@sentio/runtime 2.59.1 → 2.59.2

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.
@@ -27,7 +27,7 @@ ${e}`;return Object.assign(new Error(t),r,{stack:i})}Cr.callErrorFromStatus=P8;v
27
27
  `+((d=b.stack)===null||d===void 0?void 0:d.substring(b.stack.indexOf(`
28
28
  `)+1))),this.lastActivityTimestamp=new Date}getChannelzInfo(){return{target:this.originalTarget,state:this.connectivityState,trace:this.channelzTrace,callTracker:this.callTracker,children:this.childrenTracker.getChildLists()}}trace(e,t){(0,Xf.trace)(t??Fi.LogVerbosity.DEBUG,"channel","("+this.channelzRef.id+") "+(0,eh.uriToString)(this.target)+" "+e)}callRefTimerRef(){var e,t,n,i;!((t=(e=this.callRefTimer).hasRef)===null||t===void 0)&&t.call(e)||(this.trace("callRefTimer.ref | configSelectionQueue.length="+this.configSelectionQueue.length+" pickQueue.length="+this.pickQueue.length),(i=(n=this.callRefTimer).ref)===null||i===void 0||i.call(n))}callRefTimerUnref(){var e,t;(!this.callRefTimer.hasRef||this.callRefTimer.hasRef())&&(this.trace("callRefTimer.unref | configSelectionQueue.length="+this.configSelectionQueue.length+" pickQueue.length="+this.pickQueue.length),(t=(e=this.callRefTimer).unref)===null||t===void 0||t.call(e))}removeConnectivityStateWatcher(e){let t=this.connectivityStateWatchers.findIndex(n=>n===e);t>=0&&this.connectivityStateWatchers.splice(t,1)}updateState(e){(0,Xf.trace)(Fi.LogVerbosity.DEBUG,"connectivity_state","("+this.channelzRef.id+") "+(0,eh.uriToString)(this.target)+" "+Gr.ConnectivityState[this.connectivityState]+" -> "+Gr.ConnectivityState[e]),this.channelzEnabled&&this.channelzTrace.addTrace("CT_INFO","Connectivity state change to "+Gr.ConnectivityState[e]),this.connectivityState=e;let t=this.connectivityStateWatchers.slice();for(let n of t)e!==n.currentState&&(n.timer&&clearTimeout(n.timer),this.removeConnectivityStateWatcher(n),n.callback());e!==Gr.ConnectivityState.TRANSIENT_FAILURE&&(this.currentResolutionError=null)}throttleKeepalive(e){if(e>this.keepaliveTime){this.keepaliveTime=e;for(let t of this.wrappedSubchannels)t.throttleKeepalive(e)}}removeWrappedSubchannel(e){this.wrappedSubchannels.delete(e)}doPick(e,t){return this.currentPicker.pick({metadata:e,extraPickInfo:t})}queueCallForPick(e){this.pickQueue.push(e),this.callRefTimerRef()}getConfig(e,t){return this.connectivityState!==Gr.ConnectivityState.SHUTDOWN&&this.resolvingLoadBalancer.exitIdle(),this.configSelector?{type:"SUCCESS",config:this.configSelector(e,t,this.randomChannelId)}:this.currentResolutionError?{type:"ERROR",error:this.currentResolutionError}:{type:"NONE"}}queueCallForConfig(e){this.configSelectionQueue.push(e),this.callRefTimerRef()}enterIdle(){this.resolvingLoadBalancer.destroy(),this.updateState(Gr.ConnectivityState.IDLE),this.currentPicker=new S_.QueuePicker(this.resolvingLoadBalancer),this.idleTimer&&(clearTimeout(this.idleTimer),this.idleTimer=null)}startIdleTimeout(e){var t,n;this.idleTimer=setTimeout(()=>{if(this.callCount>0){this.startIdleTimeout(this.idleTimeoutMs);return}let s=new Date().valueOf()-this.lastActivityTimestamp.valueOf();s>=this.idleTimeoutMs?(this.trace("Idle timer triggered after "+this.idleTimeoutMs+"ms of inactivity"),this.enterIdle()):this.startIdleTimeout(this.idleTimeoutMs-s)},e),(n=(t=this.idleTimer).unref)===null||n===void 0||n.call(t)}maybeStartIdleTimer(){this.connectivityState!==Gr.ConnectivityState.SHUTDOWN&&!this.idleTimer&&this.startIdleTimeout(this.idleTimeoutMs)}onCallStart(){this.channelzEnabled&&this.callTracker.addCallStarted(),this.callCount+=1}onCallEnd(e){this.channelzEnabled&&(e.code===Fi.Status.OK?this.callTracker.addCallSucceeded():this.callTracker.addCallFailed()),this.callCount-=1,this.lastActivityTimestamp=new Date,this.maybeStartIdleTimer()}createLoadBalancingCall(e,t,n,i,s){let o=(0,w_.getNextCallNumber)();return this.trace("createLoadBalancingCall ["+o+'] method="'+t+'"'),new cz.LoadBalancingCall(this,e,t,n,i,s,o)}createRetryingCall(e,t,n,i,s){let o=(0,w_.getNextCallNumber)();return this.trace("createRetryingCall ["+o+'] method="'+t+'"'),new E_.RetryingCall(this,e,t,n,i,s,o,this.retryBufferTracker,th.get(this.getTarget()))}createInnerCall(e,t,n,i,s){return this.options["grpc.enable_retries"]===0?this.createLoadBalancingCall(e,t,n,i,s):this.createRetryingCall(e,t,n,i,s)}createResolvingCall(e,t,n,i,s){let o=(0,w_.getNextCallNumber)();this.trace("createResolvingCall ["+o+'] method="'+e+'", deadline='+(0,lz.deadlineToString)(t));let a={deadline:t,flags:s??Fi.Propagate.DEFAULTS,host:n??this.defaultAuthority,parentCall:i},c=new uz.ResolvingCall(this,e,a,this.filterStackFactory.clone(),this.credentials._getCallCredentials(),o);return this.onCallStart(),c.addStatusWatcher(l=>{this.onCallEnd(l)}),c}close(){this.resolvingLoadBalancer.destroy(),this.updateState(Gr.ConnectivityState.SHUTDOWN),this.currentPicker=new C_;for(let e of this.configSelectionQueue)e.cancelWithStatus(Fi.Status.UNAVAILABLE,"Channel closed before call started");this.configSelectionQueue=[];for(let e of this.pickQueue)e.cancelWithStatus(Fi.Status.UNAVAILABLE,"Channel closed before call started");this.pickQueue=[],clearInterval(this.callRefTimer),this.idleTimer&&clearTimeout(this.idleTimer),this.channelzEnabled&&(0,Ql.unregisterChannelzRef)(this.channelzRef),this.subchannelPool.unrefUnusedSubchannels()}getTarget(){return(0,eh.uriToString)(this.target)}getConnectivityState(e){let t=this.connectivityState;return e&&(this.resolvingLoadBalancer.exitIdle(),this.lastActivityTimestamp=new Date,this.maybeStartIdleTimer()),t}watchConnectivityState(e,t,n){if(this.connectivityState===Gr.ConnectivityState.SHUTDOWN)throw new Error("Channel has been shut down");let i=null;if(t!==1/0){let o=t instanceof Date?t:new Date(t),a=new Date;if(t===-1/0||o<=a){process.nextTick(n,new Error("Deadline passed without connectivity state change"));return}i=setTimeout(()=>{this.removeConnectivityStateWatcher(s),n(new Error("Deadline passed without connectivity state change"))},o.getTime()-a.getTime())}let s={currentState:e,callback:n,timer:i};this.connectivityStateWatchers.push(s)}getChannelzRef(){return this.channelzRef}createCall(e,t,n,i,s){if(typeof e!="string")throw new TypeError("Channel#createCall: method must be a string");if(!(typeof t=="number"||t instanceof Date))throw new TypeError("Channel#createCall: deadline must be a number or Date");if(this.connectivityState===Gr.ConnectivityState.SHUTDOWN)throw new Error("Channel has been shut down");return this.createResolvingCall(e,t,n,i,s)}getOptions(){return this.options}};rh.InternalChannel=x_});var Gv=m(nh=>{"use strict";Object.defineProperty(nh,"__esModule",{value:!0});nh.ChannelImplementation=void 0;var vz=Al(),bz=qI(),O_=class{constructor(e,t,n){if(typeof e!="string")throw new TypeError("Channel target must be a string");if(!(t instanceof vz.ChannelCredentials))throw new TypeError("Channel credentials must be a ChannelCredentials object");if(n&&typeof n!="object")throw new TypeError("Channel options must be an object");this.internalChannel=new bz.InternalChannel(e,t,n)}close(){this.internalChannel.close()}getTarget(){return this.internalChannel.getTarget()}getConnectivityState(e){return this.internalChannel.getConnectivityState(e)}watchConnectivityState(e,t,n){this.internalChannel.watchConnectivityState(e,t,n)}getChannelzRef(){return this.internalChannel.getChannelzRef()}createCall(e,t,n,i,s){if(typeof e!="string")throw new TypeError("Channel#createCall: method must be a string");if(!(typeof t=="number"||t instanceof Date))throw new TypeError("Channel#createCall: deadline must be a number or Date");return this.internalChannel.createCall(e,t,n,i,s)}};nh.ChannelImplementation=O_});var BI=m(Nr=>{"use strict";Object.defineProperty(Nr,"__esModule",{value:!0});Nr.ServerDuplexStreamImpl=Nr.ServerWritableStreamImpl=Nr.ServerReadableStreamImpl=Nr.ServerUnaryCallImpl=Nr.serverErrorToStatus=void 0;var _z=se("events"),N_=se("stream"),M_=ve(),LI=Pt();function D_(r,e){var t;let n={code:M_.Status.UNKNOWN,details:"message"in r?r.message:"Unknown Error",metadata:(t=e??r.metadata)!==null&&t!==void 0?t:null};return"code"in r&&typeof r.code=="number"&&Number.isInteger(r.code)&&(n.code=r.code,"details"in r&&typeof r.details=="string"&&(n.details=r.details)),n}Nr.serverErrorToStatus=D_;var I_=class extends _z.EventEmitter{constructor(e,t,n,i){super(),this.path=e,this.call=t,this.metadata=n,this.request=i,this.cancelled=!1}getPeer(){return this.call.getPeer()}sendMetadata(e){this.call.sendMetadata(e)}getDeadline(){return this.call.getDeadline()}getPath(){return this.path}getHost(){return this.call.getHost()}};Nr.ServerUnaryCallImpl=I_;var P_=class extends N_.Readable{constructor(e,t,n){super({objectMode:!0}),this.path=e,this.call=t,this.metadata=n,this.cancelled=!1}_read(e){this.call.startRead()}getPeer(){return this.call.getPeer()}sendMetadata(e){this.call.sendMetadata(e)}getDeadline(){return this.call.getDeadline()}getPath(){return this.path}getHost(){return this.call.getHost()}};Nr.ServerReadableStreamImpl=P_;var k_=class extends N_.Writable{constructor(e,t,n,i){super({objectMode:!0}),this.path=e,this.call=t,this.metadata=n,this.request=i,this.pendingStatus={code:M_.Status.OK,details:"OK"},this.cancelled=!1,this.trailingMetadata=new LI.Metadata,this.on("error",s=>{this.pendingStatus=D_(s),this.end()})}getPeer(){return this.call.getPeer()}sendMetadata(e){this.call.sendMetadata(e)}getDeadline(){return this.call.getDeadline()}getPath(){return this.path}getHost(){return this.call.getHost()}_write(e,t,n){this.call.sendMessage(e,n)}_final(e){var t;e(null),this.call.sendStatus(Object.assign(Object.assign({},this.pendingStatus),{metadata:(t=this.pendingStatus.metadata)!==null&&t!==void 0?t:this.trailingMetadata}))}end(e){return e&&(this.trailingMetadata=e),super.end()}};Nr.ServerWritableStreamImpl=k_;var R_=class extends N_.Duplex{constructor(e,t,n){super({objectMode:!0}),this.path=e,this.call=t,this.metadata=n,this.pendingStatus={code:M_.Status.OK,details:"OK"},this.cancelled=!1,this.trailingMetadata=new LI.Metadata,this.on("error",i=>{this.pendingStatus=D_(i),this.end()})}getPeer(){return this.call.getPeer()}sendMetadata(e){this.call.sendMetadata(e)}getDeadline(){return this.call.getDeadline()}getPath(){return this.path}getHost(){return this.call.getHost()}_read(e){this.call.startRead()}_write(e,t,n){this.call.sendMessage(e,n)}_final(e){var t;e(null),this.call.sendStatus(Object.assign(Object.assign({},this.pendingStatus),{metadata:(t=this.pendingStatus.metadata)!==null&&t!==void 0?t:this.trailingMetadata}))}end(e){return e&&(this.trailingMetadata=e),super.end()}};Nr.ServerDuplexStreamImpl=R_});var ih=m(Ui=>{"use strict";Object.defineProperty(Ui,"__esModule",{value:!0});Ui.createServerCredentialsWithInterceptors=Ui.createCertificateProviderServerCredentials=Ui.ServerCredentials=void 0;var FI=fv(),to=class{constructor(){this.watchers=new Set,this.latestContextOptions=null}_addWatcher(e){this.watchers.add(e)}_removeWatcher(e){this.watchers.delete(e)}getWatcherCount(){return this.watchers.size}updateSecureContextOptions(e){this.latestContextOptions=e;for(let t of this.watchers)t(this.latestContextOptions)}_getSettings(){return this.latestContextOptions}_getInterceptors(){return[]}static createInsecure(){return new q_}static createSsl(e,t,n=!1){var i;if(e!==null&&!Buffer.isBuffer(e))throw new TypeError("rootCerts must be null or a Buffer");if(!Array.isArray(t))throw new TypeError("keyCertPairs must be an array");if(typeof n!="boolean")throw new TypeError("checkClientCertificate must be a boolean");let s=[],o=[];for(let a=0;a<t.length;a++){let c=t[a];if(c===null||typeof c!="object")throw new TypeError(`keyCertPair[${a}] must be an object`);if(!Buffer.isBuffer(c.private_key))throw new TypeError(`keyCertPair[${a}].private_key must be a Buffer`);if(!Buffer.isBuffer(c.cert_chain))throw new TypeError(`keyCertPair[${a}].cert_chain must be a Buffer`);s.push(c.cert_chain),o.push(c.private_key)}return new L_({ca:(i=e??(0,FI.getDefaultRootsData)())!==null&&i!==void 0?i:void 0,cert:s,key:o,requestCert:n,ciphers:FI.CIPHER_SUITES})}};Ui.ServerCredentials=to;var q_=class r extends to{_isSecure(){return!1}_getSettings(){return null}_equals(e){return e instanceof r}},L_=class r extends to{constructor(e){super(),this.options=e}_isSecure(){return!0}_getSettings(){return this.options}_equals(e){if(this===e)return!0;if(!(e instanceof r))return!1;if(Buffer.isBuffer(this.options.ca)&&Buffer.isBuffer(e.options.ca)){if(!this.options.ca.equals(e.options.ca))return!1}else if(this.options.ca!==e.options.ca)return!1;if(Array.isArray(this.options.cert)&&Array.isArray(e.options.cert)){if(this.options.cert.length!==e.options.cert.length)return!1;for(let t=0;t<this.options.cert.length;t++){let n=this.options.cert[t],i=e.options.cert[t];if(Buffer.isBuffer(n)&&Buffer.isBuffer(i)){if(!n.equals(i))return!1}else if(n!==i)return!1}}else if(this.options.cert!==e.options.cert)return!1;if(Array.isArray(this.options.key)&&Array.isArray(e.options.key)){if(this.options.key.length!==e.options.key.length)return!1;for(let t=0;t<this.options.key.length;t++){let n=this.options.key[t],i=e.options.key[t];if(Buffer.isBuffer(n)&&Buffer.isBuffer(i)){if(!n.equals(i))return!1}else if(n!==i)return!1}}else if(this.options.key!==e.options.key)return!1;return this.options.requestCert===e.options.requestCert}},B_=class r extends to{constructor(e,t,n){super(),this.identityCertificateProvider=e,this.caCertificateProvider=t,this.requireClientCertificate=n,this.latestCaUpdate=null,this.latestIdentityUpdate=null,this.caCertificateUpdateListener=this.handleCaCertificateUpdate.bind(this),this.identityCertificateUpdateListener=this.handleIdentityCertitificateUpdate.bind(this)}_addWatcher(e){var t;this.getWatcherCount()===0&&((t=this.caCertificateProvider)===null||t===void 0||t.addCaCertificateListener(this.caCertificateUpdateListener),this.identityCertificateProvider.addIdentityCertificateListener(this.identityCertificateUpdateListener)),super._addWatcher(e)}_removeWatcher(e){var t;super._removeWatcher(e),this.getWatcherCount()===0&&((t=this.caCertificateProvider)===null||t===void 0||t.removeCaCertificateListener(this.caCertificateUpdateListener),this.identityCertificateProvider.removeIdentityCertificateListener(this.identityCertificateUpdateListener))}_isSecure(){return!0}_equals(e){return this===e?!0:e instanceof r?this.caCertificateProvider===e.caCertificateProvider&&this.identityCertificateProvider===e.identityCertificateProvider&&this.requireClientCertificate===e.requireClientCertificate:!1}calculateSecureContextOptions(){var e;return this.latestIdentityUpdate===null||this.caCertificateProvider!==null&&this.latestCaUpdate===null?null:{ca:(e=this.latestCaUpdate)===null||e===void 0?void 0:e.caCertificate,cert:this.latestIdentityUpdate.certificate,key:this.latestIdentityUpdate.privateKey,requestCert:this.latestIdentityUpdate!==null,rejectUnauthorized:this.requireClientCertificate}}finalizeUpdate(){this.updateSecureContextOptions(this.calculateSecureContextOptions())}handleCaCertificateUpdate(e){this.latestCaUpdate=e,this.finalizeUpdate()}handleIdentityCertitificateUpdate(e){this.latestIdentityUpdate=e,this.finalizeUpdate()}};function Az(r,e,t){return new B_(r,e,t)}Ui.createCertificateProviderServerCredentials=Az;var F_=class r extends to{constructor(e,t){super(),this.childCredentials=e,this.interceptors=t}_isSecure(){return this.childCredentials._isSecure()}_equals(e){if(!(e instanceof r)||!this.childCredentials._equals(e.childCredentials)||this.interceptors.length!==e.interceptors.length)return!1;for(let t=0;t<this.interceptors.length;t++)if(this.interceptors[t]!==e.interceptors[t])return!1;return!0}_getInterceptors(){return this.interceptors}_addWatcher(e){this.childCredentials._addWatcher(e)}_removeWatcher(e){this.childCredentials._removeWatcher(e)}};function wz(r,e){return new F_(r,e)}Ui.createServerCredentialsWithInterceptors=wz});var W_=m(Xt=>{"use strict";Object.defineProperty(Xt,"__esModule",{value:!0});Xt.getServerInterceptingCall=Xt.BaseServerInterceptingCall=Xt.ServerInterceptingCall=Xt.ResponderBuilder=Xt.isInterceptingServerListener=Xt.ServerListenerBuilder=void 0;var UI=Pt(),Zt=ve(),Pa=se("http2"),jI=Dd(),zI=se("zlib"),Ez=Zb(),WI=Fe(),KI="server_call";function ro(r){WI.trace(Zt.LogVerbosity.DEBUG,KI,r)}var j_=class{constructor(){this.metadata=void 0,this.message=void 0,this.halfClose=void 0,this.cancel=void 0}withOnReceiveMetadata(e){return this.metadata=e,this}withOnReceiveMessage(e){return this.message=e,this}withOnReceiveHalfClose(e){return this.halfClose=e,this}withOnCancel(e){return this.cancel=e,this}build(){return{onReceiveMetadata:this.metadata,onReceiveMessage:this.message,onReceiveHalfClose:this.halfClose,onCancel:this.cancel}}};Xt.ServerListenerBuilder=j_;function Sz(r){return r.onReceiveMetadata!==void 0&&r.onReceiveMetadata.length===1}Xt.isInterceptingServerListener=Sz;var z_=class{constructor(e,t){this.listener=e,this.nextListener=t,this.cancelled=!1,this.processingMetadata=!1,this.hasPendingMessage=!1,this.pendingMessage=null,this.processingMessage=!1,this.hasPendingHalfClose=!1}processPendingMessage(){this.hasPendingMessage&&(this.nextListener.onReceiveMessage(this.pendingMessage),this.pendingMessage=null,this.hasPendingMessage=!1)}processPendingHalfClose(){this.hasPendingHalfClose&&(this.nextListener.onReceiveHalfClose(),this.hasPendingHalfClose=!1)}onReceiveMetadata(e){this.cancelled||(this.processingMetadata=!0,this.listener.onReceiveMetadata(e,t=>{this.processingMetadata=!1,!this.cancelled&&(this.nextListener.onReceiveMetadata(t),this.processPendingMessage(),this.processPendingHalfClose())}))}onReceiveMessage(e){this.cancelled||(this.processingMessage=!0,this.listener.onReceiveMessage(e,t=>{this.processingMessage=!1,!this.cancelled&&(this.processingMetadata?(this.pendingMessage=t,this.hasPendingMessage=!0):(this.nextListener.onReceiveMessage(t),this.processPendingHalfClose()))}))}onReceiveHalfClose(){this.cancelled||this.listener.onReceiveHalfClose(()=>{this.cancelled||(this.processingMetadata||this.processingMessage?this.hasPendingHalfClose=!0:this.nextListener.onReceiveHalfClose())})}onCancel(){this.cancelled=!0,this.listener.onCancel(),this.nextListener.onCancel()}},H_=class{constructor(){this.start=void 0,this.metadata=void 0,this.message=void 0,this.status=void 0}withStart(e){return this.start=e,this}withSendMetadata(e){return this.metadata=e,this}withSendMessage(e){return this.message=e,this}withSendStatus(e){return this.status=e,this}build(){return{start:this.start,sendMetadata:this.metadata,sendMessage:this.message,sendStatus:this.status}}};Xt.ResponderBuilder=H_;var sh={onReceiveMetadata:(r,e)=>{e(r)},onReceiveMessage:(r,e)=>{e(r)},onReceiveHalfClose:r=>{r()},onCancel:()=>{}},oh={start:r=>{r()},sendMetadata:(r,e)=>{e(r)},sendMessage:(r,e)=>{e(r)},sendStatus:(r,e)=>{e(r)}},G_=class{constructor(e,t){var n,i,s,o;this.nextCall=e,this.processingMetadata=!1,this.processingMessage=!1,this.pendingMessage=null,this.pendingMessageCallback=null,this.pendingStatus=null,this.responder={start:(n=t?.start)!==null&&n!==void 0?n:oh.start,sendMetadata:(i=t?.sendMetadata)!==null&&i!==void 0?i:oh.sendMetadata,sendMessage:(s=t?.sendMessage)!==null&&s!==void 0?s:oh.sendMessage,sendStatus:(o=t?.sendStatus)!==null&&o!==void 0?o:oh.sendStatus}}processPendingMessage(){this.pendingMessageCallback&&(this.nextCall.sendMessage(this.pendingMessage,this.pendingMessageCallback),this.pendingMessage=null,this.pendingMessageCallback=null)}processPendingStatus(){this.pendingStatus&&(this.nextCall.sendStatus(this.pendingStatus),this.pendingStatus=null)}start(e){this.responder.start(t=>{var n,i,s,o;let a={onReceiveMetadata:(n=t?.onReceiveMetadata)!==null&&n!==void 0?n:sh.onReceiveMetadata,onReceiveMessage:(i=t?.onReceiveMessage)!==null&&i!==void 0?i:sh.onReceiveMessage,onReceiveHalfClose:(s=t?.onReceiveHalfClose)!==null&&s!==void 0?s:sh.onReceiveHalfClose,onCancel:(o=t?.onCancel)!==null&&o!==void 0?o:sh.onCancel},c=new z_(a,e);this.nextCall.start(c)})}sendMetadata(e){this.processingMetadata=!0,this.responder.sendMetadata(e,t=>{this.processingMetadata=!1,this.nextCall.sendMetadata(t),this.processPendingMessage(),this.processPendingStatus()})}sendMessage(e,t){this.processingMessage=!0,this.responder.sendMessage(e,n=>{this.processingMessage=!1,this.processingMetadata?(this.pendingMessage=n,this.pendingMessageCallback=t):this.nextCall.sendMessage(n,t)})}sendStatus(e){this.responder.sendStatus(e,t=>{this.processingMetadata||this.processingMessage?this.pendingStatus=t:this.nextCall.sendStatus(t)})}startRead(){this.nextCall.startRead()}getPeer(){return this.nextCall.getPeer()}getDeadline(){return this.nextCall.getDeadline()}getHost(){return this.nextCall.getHost()}};Xt.ServerInterceptingCall=G_;var QI="grpc-accept-encoding",V_="grpc-encoding",HI="grpc-message",GI="grpc-status",U_="grpc-timeout",Tz=/(\d{1,8})\s*([HMSmun])/,Cz={H:36e5,M:6e4,S:1e3,m:1,u:.001,n:1e-6},xz={[QI]:"identity,deflate,gzip",[V_]:"identity"},VI={[Pa.constants.HTTP2_HEADER_STATUS]:Pa.constants.HTTP_STATUS_OK,[Pa.constants.HTTP2_HEADER_CONTENT_TYPE]:"application/grpc+proto"},Oz={waitForTrailers:!0},ah=class{constructor(e,t,n,i,s){var o;this.stream=e,this.callEventTracker=n,this.handler=i,this.listener=null,this.deadlineTimer=null,this.deadline=1/0,this.maxSendMessageSize=Zt.DEFAULT_MAX_SEND_MESSAGE_LENGTH,this.maxReceiveMessageSize=Zt.DEFAULT_MAX_RECEIVE_MESSAGE_LENGTH,this.cancelled=!1,this.metadataSent=!1,this.wantTrailers=!1,this.cancelNotified=!1,this.incomingEncoding="identity",this.readQueue=[],this.isReadPending=!1,this.receivedHalfClose=!1,this.streamEnded=!1,this.stream.once("error",u=>{}),this.stream.once("close",()=>{var u;ro("Request to method "+((u=this.handler)===null||u===void 0?void 0:u.path)+" stream closed with rstCode "+this.stream.rstCode),this.callEventTracker&&!this.streamEnded&&(this.streamEnded=!0,this.callEventTracker.onStreamEnd(!1),this.callEventTracker.onCallEnd({code:Zt.Status.CANCELLED,details:"Stream closed before sending status",metadata:null})),this.notifyOnCancel()}),this.stream.on("data",u=>{this.handleDataFrame(u)}),this.stream.pause(),this.stream.on("end",()=>{this.handleEndEvent()}),"grpc.max_send_message_length"in s&&(this.maxSendMessageSize=s["grpc.max_send_message_length"]),"grpc.max_receive_message_length"in s&&(this.maxReceiveMessageSize=s["grpc.max_receive_message_length"]),this.host=(o=t[":authority"])!==null&&o!==void 0?o:t.host,this.decoder=new Ez.StreamDecoder(this.maxReceiveMessageSize);let a=UI.Metadata.fromHttp2Headers(t);WI.isTracerEnabled(KI)&&ro("Request to "+this.handler.path+" received headers "+JSON.stringify(a.toJSON()));let c=a.get(U_);c.length>0&&this.handleTimeoutHeader(c[0]);let l=a.get(V_);l.length>0&&(this.incomingEncoding=l[0]),a.remove(U_),a.remove(V_),a.remove(QI),a.remove(Pa.constants.HTTP2_HEADER_ACCEPT_ENCODING),a.remove(Pa.constants.HTTP2_HEADER_TE),a.remove(Pa.constants.HTTP2_HEADER_CONTENT_TYPE),this.metadata=a}handleTimeoutHeader(e){let t=e.toString().match(Tz);if(t===null){let s={code:Zt.Status.INTERNAL,details:`Invalid ${U_} value "${e}"`,metadata:null};process.nextTick(()=>{this.sendStatus(s)});return}let n=+t[1]*Cz[t[2]]|0,i=new Date;this.deadline=i.setMilliseconds(i.getMilliseconds()+n),this.deadlineTimer=setTimeout(()=>{let s={code:Zt.Status.DEADLINE_EXCEEDED,details:"Deadline exceeded",metadata:null};this.sendStatus(s)},n)}checkCancelled(){return!this.cancelled&&(this.stream.destroyed||this.stream.closed)&&(this.notifyOnCancel(),this.cancelled=!0),this.cancelled}notifyOnCancel(){this.cancelNotified||(this.cancelNotified=!0,this.cancelled=!0,process.nextTick(()=>{var e;(e=this.listener)===null||e===void 0||e.onCancel()}),this.deadlineTimer&&clearTimeout(this.deadlineTimer),this.stream.resume())}maybeSendMetadata(){this.metadataSent||this.sendMetadata(new UI.Metadata)}serializeMessage(e){let t=this.handler.serialize(e),n=t.byteLength,i=Buffer.allocUnsafe(n+5);return i.writeUInt8(0,0),i.writeUInt32BE(n,1),t.copy(i,5),i}decompressMessage(e,t){let n=e.subarray(5);if(t==="identity")return n;if(t==="deflate"||t==="gzip"){let i;return t==="deflate"?i=zI.createInflate():i=zI.createGunzip(),new Promise((s,o)=>{let a=0,c=[];i.on("data",l=>{c.push(l),a+=l.byteLength,this.maxReceiveMessageSize!==-1&&a>this.maxReceiveMessageSize&&(i.destroy(),o({code:Zt.Status.RESOURCE_EXHAUSTED,details:`Received message that decompresses to a size larger than ${this.maxReceiveMessageSize}`}))}),i.on("end",()=>{s(Buffer.concat(c))}),i.write(n),i.end()})}else return Promise.reject({code:Zt.Status.UNIMPLEMENTED,details:`Received message compressed with unsupported encoding "${t}"`})}async decompressAndMaybePush(e){if(e.type!=="COMPRESSED")throw new Error(`Invalid queue entry type: ${e.type}`);let n=e.compressedMessage.readUInt8(0)===1?this.incomingEncoding:"identity",i;try{i=await this.decompressMessage(e.compressedMessage,n)}catch(s){this.sendStatus(s);return}try{e.parsedMessage=this.handler.deserialize(i)}catch(s){this.sendStatus({code:Zt.Status.INTERNAL,details:`Error deserializing request: ${s.message}`});return}e.type="READABLE",this.maybePushNextMessage()}maybePushNextMessage(){if(this.listener&&this.isReadPending&&this.readQueue.length>0&&this.readQueue[0].type!=="COMPRESSED"){this.isReadPending=!1;let e=this.readQueue.shift();e.type==="READABLE"?this.listener.onReceiveMessage(e.parsedMessage):this.listener.onReceiveHalfClose()}}handleDataFrame(e){var t;if(this.checkCancelled())return;ro("Request to "+this.handler.path+" received data frame of size "+e.length);let n;try{n=this.decoder.write(e)}catch(i){this.sendStatus({code:Zt.Status.RESOURCE_EXHAUSTED,details:i.message});return}for(let i of n){this.stream.pause();let s={type:"COMPRESSED",compressedMessage:i,parsedMessage:null};this.readQueue.push(s),this.decompressAndMaybePush(s),(t=this.callEventTracker)===null||t===void 0||t.addMessageReceived()}}handleEndEvent(){this.readQueue.push({type:"HALF_CLOSE",compressedMessage:null,parsedMessage:null}),this.receivedHalfClose=!0,this.maybePushNextMessage()}start(e){ro("Request to "+this.handler.path+" start called"),!this.checkCancelled()&&(this.listener=e,e.onReceiveMetadata(this.metadata))}sendMetadata(e){if(this.checkCancelled()||this.metadataSent)return;this.metadataSent=!0;let t=e?e.toHttp2Headers():null,n=Object.assign(Object.assign(Object.assign({},VI),xz),t);this.stream.respond(n,Oz)}sendMessage(e,t){if(this.checkCancelled())return;let n;try{n=this.serializeMessage(e)}catch(i){this.sendStatus({code:Zt.Status.INTERNAL,details:`Error serializing response: ${(0,jI.getErrorMessage)(i)}`,metadata:null});return}if(this.maxSendMessageSize!==-1&&n.length-5>this.maxSendMessageSize){this.sendStatus({code:Zt.Status.RESOURCE_EXHAUSTED,details:`Sent message larger than max (${n.length} vs. ${this.maxSendMessageSize})`,metadata:null});return}this.maybeSendMetadata(),ro("Request to "+this.handler.path+" sent data frame of size "+n.length),this.stream.write(n,i=>{var s;if(i){this.sendStatus({code:Zt.Status.INTERNAL,details:`Error writing message: ${(0,jI.getErrorMessage)(i)}`,metadata:null});return}(s=this.callEventTracker)===null||s===void 0||s.addMessageSent(),t()})}sendStatus(e){var t,n;if(!this.checkCancelled())if(ro("Request to method "+((t=this.handler)===null||t===void 0?void 0:t.path)+" ended with status code: "+Zt.Status[e.code]+" details: "+e.details),this.metadataSent)this.wantTrailers?this.notifyOnCancel():(this.wantTrailers=!0,this.stream.once("wantTrailers",()=>{var i;this.callEventTracker&&!this.streamEnded&&(this.streamEnded=!0,this.callEventTracker.onStreamEnd(!0),this.callEventTracker.onCallEnd(e));let s=Object.assign({[GI]:e.code,[HI]:encodeURI(e.details)},(i=e.metadata)===null||i===void 0?void 0:i.toHttp2Headers());this.stream.sendTrailers(s),this.notifyOnCancel()}),this.stream.end());else{this.callEventTracker&&!this.streamEnded&&(this.streamEnded=!0,this.callEventTracker.onStreamEnd(!0),this.callEventTracker.onCallEnd(e));let i=Object.assign(Object.assign({[GI]:e.code,[HI]:encodeURI(e.details)},VI),(n=e.metadata)===null||n===void 0?void 0:n.toHttp2Headers());this.stream.respond(i,{endStream:!0}),this.notifyOnCancel()}}startRead(){ro("Request to "+this.handler.path+" startRead called"),!this.checkCancelled()&&(this.isReadPending=!0,this.readQueue.length===0?this.receivedHalfClose||this.stream.resume():this.maybePushNextMessage())}getPeer(){var e;let t=(e=this.stream.session)===null||e===void 0?void 0:e.socket;return t?.remoteAddress?t.remotePort?`${t.remoteAddress}:${t.remotePort}`:t.remoteAddress:"unknown"}getDeadline(){return this.deadline}getHost(){return this.host}};Xt.BaseServerInterceptingCall=ah;function Iz(r,e,t,n,i,s){let o={path:i.path,requestStream:i.type==="clientStream"||i.type==="bidi",responseStream:i.type==="serverStream"||i.type==="bidi",requestDeserialize:i.deserialize,responseSerialize:i.serialize},a=new ah(e,t,n,i,s);return r.reduce((c,l)=>l(o,c),a)}Xt.getServerInterceptingCall=Iz});var tP=m(zi=>{"use strict";var Pz=zi&&zi.__runInitializers||function(r,e,t){for(var n=arguments.length>2,i=0;i<e.length;i++)t=n?e[i].call(r,t):e[i].call(r);return n?t:void 0},kz=zi&&zi.__esDecorate||function(r,e,t,n,i,s){function o(y){if(y!==void 0&&typeof y!="function")throw new TypeError("Function expected");return y}for(var a=n.kind,c=a==="getter"?"get":a==="setter"?"set":"value",l=!e&&r?n.static?r:r.prototype:null,u=e||(l?Object.getOwnPropertyDescriptor(l,n.name):{}),d,f=!1,h=t.length-1;h>=0;h--){var g={};for(var p in n)g[p]=p==="access"?{}:n[p];for(var p in n.access)g.access[p]=n.access[p];g.addInitializer=function(y){if(f)throw new TypeError("Cannot add initializers after decoration has completed");s.push(o(y||null))};var b=(0,t[h])(a==="accessor"?{get:u.get,set:u.set}:u[c],g);if(a==="accessor"){if(b===void 0)continue;if(b===null||typeof b!="object")throw new TypeError("Object expected");(d=o(b.get))&&(u.get=d),(d=o(b.set))&&(u.set=d),(d=o(b.init))&&i.unshift(d)}else(d=o(b))&&(a==="field"?i.unshift(d):u[c]=d)}l&&Object.defineProperty(l,n.name,u),f=!0};Object.defineProperty(zi,"__esModule",{value:!0});zi.Server=void 0;var er=se("http2"),Rz=se("util"),ot=ve(),Ra=BI(),JI=ih(),$I=cn(),ch=Fe(),ji=Tr(),Vr=cr(),mt=Ys(),YI=W_(),ka=~(1<<31),K_=~(1<<31),Nz=2e4,ZI=~(1<<31),{HTTP2_HEADER_PATH:XI}=er.constants,Mz="server",eP=Buffer.from("max_age");function Dz(){}function qz(r){return function(e,t){return Rz.deprecate(e,r)}}function Q_(r){return{code:ot.Status.UNIMPLEMENTED,details:`The server does not implement the method ${r}`}}function Lz(r,e){let t=Q_(e);switch(r){case"unary":return(n,i)=>{i(t,null)};case"clientStream":return(n,i)=>{i(t,null)};case"serverStream":return n=>{n.emit("error",t)};case"bidi":return n=>{n.emit("error",t)};default:throw new Error(`Invalid handlerType ${r}`)}}var Bz=(()=>{var r;let e=[],t;return r=class{constructor(i){var s,o,a,c,l,u;this.boundPorts=(Pz(this,e),new Map),this.http2Servers=new Map,this.sessionIdleTimeouts=new Map,this.handlers=new Map,this.sessions=new Map,this.started=!1,this.shutdown=!1,this.serverAddressString="null",this.channelzEnabled=!0,this.options=i??{},this.options["grpc.enable_channelz"]===0?(this.channelzEnabled=!1,this.channelzTrace=new mt.ChannelzTraceStub,this.callTracker=new mt.ChannelzCallTrackerStub,this.listenerChildrenTracker=new mt.ChannelzChildrenTrackerStub,this.sessionChildrenTracker=new mt.ChannelzChildrenTrackerStub):(this.channelzTrace=new mt.ChannelzTrace,this.callTracker=new mt.ChannelzCallTracker,this.listenerChildrenTracker=new mt.ChannelzChildrenTracker,this.sessionChildrenTracker=new mt.ChannelzChildrenTracker),this.channelzRef=(0,mt.registerChannelzServer)("server",()=>this.getChannelzInfo(),this.channelzEnabled),this.channelzTrace.addTrace("CT_INFO","Server created"),this.maxConnectionAgeMs=(s=this.options["grpc.max_connection_age_ms"])!==null&&s!==void 0?s:ka,this.maxConnectionAgeGraceMs=(o=this.options["grpc.max_connection_age_grace_ms"])!==null&&o!==void 0?o:ka,this.keepaliveTimeMs=(a=this.options["grpc.keepalive_time_ms"])!==null&&a!==void 0?a:K_,this.keepaliveTimeoutMs=(c=this.options["grpc.keepalive_timeout_ms"])!==null&&c!==void 0?c:Nz,this.sessionIdleTimeout=(l=this.options["grpc.max_connection_idle_ms"])!==null&&l!==void 0?l:ZI,this.commonServerOptions={maxSendHeaderBlockLength:Number.MAX_SAFE_INTEGER},"grpc-node.max_session_memory"in this.options?this.commonServerOptions.maxSessionMemory=this.options["grpc-node.max_session_memory"]:this.commonServerOptions.maxSessionMemory=Number.MAX_SAFE_INTEGER,"grpc.max_concurrent_streams"in this.options&&(this.commonServerOptions.settings={maxConcurrentStreams:this.options["grpc.max_concurrent_streams"]}),this.interceptors=(u=this.options.interceptors)!==null&&u!==void 0?u:[],this.trace("Server constructed")}getChannelzInfo(){return{trace:this.channelzTrace,callTracker:this.callTracker,listenerChildren:this.listenerChildrenTracker.getChildLists(),sessionChildren:this.sessionChildrenTracker.getChildLists()}}getChannelzSessionInfo(i){var s,o,a;let c=this.sessions.get(i),l=i.socket,u=l.remoteAddress?(0,ji.stringToSubchannelAddress)(l.remoteAddress,l.remotePort):null,d=l.localAddress?(0,ji.stringToSubchannelAddress)(l.localAddress,l.localPort):null,f;if(i.encrypted){let g=l,p=g.getCipher(),b=g.getCertificate(),y=g.getPeerCertificate();f={cipherSuiteStandardName:(s=p.standardName)!==null&&s!==void 0?s:null,cipherSuiteOtherName:p.standardName?null:p.name,localCertificate:b&&"raw"in b?b.raw:null,remoteCertificate:y&&"raw"in y?y.raw:null}}else f=null;return{remoteAddress:u,localAddress:d,security:f,remoteName:null,streamsStarted:c.streamTracker.callsStarted,streamsSucceeded:c.streamTracker.callsSucceeded,streamsFailed:c.streamTracker.callsFailed,messagesSent:c.messagesSent,messagesReceived:c.messagesReceived,keepAlivesSent:c.keepAlivesSent,lastLocalStreamCreatedTimestamp:null,lastRemoteStreamCreatedTimestamp:c.streamTracker.lastCallStartedTimestamp,lastMessageSentTimestamp:c.lastMessageSentTimestamp,lastMessageReceivedTimestamp:c.lastMessageReceivedTimestamp,localFlowControlWindow:(o=i.state.localWindowSize)!==null&&o!==void 0?o:null,remoteFlowControlWindow:(a=i.state.remoteWindowSize)!==null&&a!==void 0?a:null}}trace(i){ch.trace(ot.LogVerbosity.DEBUG,Mz,"("+this.channelzRef.id+") "+i)}keepaliveTrace(i){ch.trace(ot.LogVerbosity.DEBUG,"keepalive","("+this.channelzRef.id+") "+i)}addProtoService(){throw new Error("Not implemented. Use addService() instead")}addService(i,s){if(i===null||typeof i!="object"||s===null||typeof s!="object")throw new Error("addService() requires two objects as arguments");let o=Object.keys(i);if(o.length===0)throw new Error("Cannot add an empty service to a server");o.forEach(a=>{let c=i[a],l;c.requestStream?c.responseStream?l="bidi":l="clientStream":c.responseStream?l="serverStream":l="unary";let u=s[a],d;if(u===void 0&&typeof c.originalName=="string"&&(u=s[c.originalName]),u!==void 0?d=u.bind(s):d=Lz(l,a),this.register(c.path,d,c.responseSerialize,c.requestDeserialize,l)===!1)throw new Error(`Method handler for ${c.path} already provided.`)})}removeService(i){if(i===null||typeof i!="object")throw new Error("removeService() requires object as argument");Object.keys(i).forEach(o=>{let a=i[o];this.unregister(a.path)})}bind(i,s){throw new Error("Not implemented. Use bindAsync() instead")}registerListenerToChannelz(i){return(0,mt.registerChannelzSocket)((0,ji.subchannelAddressToString)(i),()=>({localAddress:i,remoteAddress:null,security:null,remoteName:null,streamsStarted:0,streamsSucceeded:0,streamsFailed:0,messagesSent:0,messagesReceived:0,keepAlivesSent:0,lastLocalStreamCreatedTimestamp:null,lastRemoteStreamCreatedTimestamp:null,lastMessageSentTimestamp:null,lastMessageReceivedTimestamp:null,localFlowControlWindow:null,remoteFlowControlWindow:null}),this.channelzEnabled)}createHttp2Server(i){let s;if(i._isSecure()){let o=i._getSettings(),a=Object.assign(Object.assign(Object.assign({},this.commonServerOptions),o),{enableTrace:this.options["grpc-node.tls_enable_trace"]===1}),c=o!==null;s=er.createSecureServer(a),s.on("connection",u=>{c||u.destroy()}),s.on("secureConnection",u=>{u.on("error",d=>{this.trace("An incoming TLS connection closed with error: "+d.message)})});let l=u=>{u&&s.setSecureContext(u),c=u!==null};i._addWatcher(l),s.on("close",()=>{i._removeWatcher(l)})}else s=er.createServer(this.commonServerOptions);return s.setTimeout(0,Dz),this._setupHandlers(s,i._getInterceptors()),s}bindOneAddress(i,s){this.trace("Attempting to bind "+(0,ji.subchannelAddressToString)(i));let o=this.createHttp2Server(s.credentials);return new Promise((a,c)=>{let l=u=>{this.trace("Failed to bind "+(0,ji.subchannelAddressToString)(i)+" with error "+u.message),a({port:"port"in i?i.port:1,error:u.message})};o.once("error",l),o.listen(i,()=>{let u=o.address(),d;typeof u=="string"?d={path:u}:d={host:u.address,port:u.port};let f=this.registerListenerToChannelz(d);this.listenerChildrenTracker.refChild(f),this.http2Servers.set(o,{channelzRef:f,sessions:new Set}),s.listeningServers.add(o),this.trace("Successfully bound "+(0,ji.subchannelAddressToString)(d)),a({port:"port"in d?d.port:1}),o.removeListener("error",l)})})}async bindManyPorts(i,s){if(i.length===0)return{count:0,port:0,errors:[]};if((0,ji.isTcpSubchannelAddress)(i[0])&&i[0].port===0){let o=await this.bindOneAddress(i[0],s);if(o.error){let a=await this.bindManyPorts(i.slice(1),s);return Object.assign(Object.assign({},a),{errors:[o.error,...a.errors]})}else{let a=i.slice(1).map(u=>(0,ji.isTcpSubchannelAddress)(u)?{host:u.host,port:o.port}:u),c=await Promise.all(a.map(u=>this.bindOneAddress(u,s))),l=[o,...c];return{count:l.filter(u=>u.error===void 0).length,port:o.port,errors:l.filter(u=>u.error).map(u=>u.error)}}}else{let o=await Promise.all(i.map(a=>this.bindOneAddress(a,s)));return{count:o.filter(a=>a.error===void 0).length,port:o[0].port,errors:o.filter(a=>a.error).map(a=>a.error)}}}async bindAddressList(i,s){let o=await this.bindManyPorts(i,s);if(o.count>0)return o.count<i.length&&ch.log(ot.LogVerbosity.INFO,`WARNING Only ${o.count} addresses added out of total ${i.length} resolved`),o.port;{let a=`No address added out of total ${i.length} resolved`;throw ch.log(ot.LogVerbosity.ERROR,a),new Error(`${a} errors: [${o.errors.join(",")}]`)}}resolvePort(i){return new Promise((s,o)=>{let a={onSuccessfulResolution:(l,u,d)=>{a.onSuccessfulResolution=()=>{};let f=[].concat(...l.map(h=>h.addresses));if(f.length===0){o(new Error(`No addresses resolved for port ${i}`));return}s(f)},onError:l=>{o(new Error(l.details))}};(0,$I.createResolver)(i,a,this.options).updateResolution()})}async bindPort(i,s){let o=await this.resolvePort(i);if(s.cancelled)throw this.completeUnbind(s),new Error("bindAsync operation cancelled by unbind call");let a=await this.bindAddressList(o,s);if(s.cancelled)throw this.completeUnbind(s),new Error("bindAsync operation cancelled by unbind call");return a}normalizePort(i){let s=(0,Vr.parseUri)(i);if(s===null)throw new Error(`Could not parse port "${i}"`);let o=(0,$I.mapUriDefaultScheme)(s);if(o===null)throw new Error(`Could not get a default scheme for port "${i}"`);return o}bindAsync(i,s,o){if(this.shutdown)throw new Error("bindAsync called after shutdown");if(typeof i!="string")throw new TypeError("port must be a string");if(s===null||!(s instanceof JI.ServerCredentials))throw new TypeError("creds must be a ServerCredentials object");if(typeof o!="function")throw new TypeError("callback must be a function");this.trace("bindAsync port="+i);let a=this.normalizePort(i),c=(f,h)=>{process.nextTick(()=>o(f,h))},l=this.boundPorts.get((0,Vr.uriToString)(a));if(l){if(!s._equals(l.credentials)){c(new Error(`${i} already bound with incompatible credentials`),0);return}l.cancelled=!1,l.completionPromise?l.completionPromise.then(f=>o(null,f),f=>o(f,0)):c(null,l.portNumber);return}l={mapKey:(0,Vr.uriToString)(a),originalUri:a,completionPromise:null,cancelled:!1,portNumber:0,credentials:s,listeningServers:new Set};let u=(0,Vr.splitHostPort)(a.path),d=this.bindPort(a,l);l.completionPromise=d,u?.port===0?d.then(f=>{let h={scheme:a.scheme,authority:a.authority,path:(0,Vr.combineHostPort)({host:u.host,port:f})};l.mapKey=(0,Vr.uriToString)(h),l.completionPromise=null,l.portNumber=f,this.boundPorts.set(l.mapKey,l),o(null,f)},f=>{o(f,0)}):(this.boundPorts.set(l.mapKey,l),d.then(f=>{l.completionPromise=null,l.portNumber=f,o(null,f)},f=>{o(f,0)}))}registerInjectorToChannelz(){return(0,mt.registerChannelzSocket)("injector",()=>({localAddress:null,remoteAddress:null,security:null,remoteName:null,streamsStarted:0,streamsSucceeded:0,streamsFailed:0,messagesSent:0,messagesReceived:0,keepAlivesSent:0,lastLocalStreamCreatedTimestamp:null,lastRemoteStreamCreatedTimestamp:null,lastMessageSentTimestamp:null,lastMessageReceivedTimestamp:null,localFlowControlWindow:null,remoteFlowControlWindow:null}),this.channelzEnabled)}createConnectionInjector(i){if(i===null||!(i instanceof JI.ServerCredentials))throw new TypeError("creds must be a ServerCredentials object");let s=this.createHttp2Server(i),o=this.registerInjectorToChannelz();this.channelzEnabled&&this.listenerChildrenTracker.refChild(o);let a=new Set;return this.http2Servers.set(s,{channelzRef:o,sessions:a}),{injectConnection:c=>{s.emit("connection",c)},drain:c=>{var l,u;for(let d of a)this.closeSession(d);(u=(l=setTimeout(()=>{for(let d of a)d.destroy(er.constants.NGHTTP2_CANCEL)},c)).unref)===null||u===void 0||u.call(l)},destroy:()=>{this.closeServer(s);for(let c of a)this.closeSession(c)}}}closeServer(i,s){this.trace("Closing server with address "+JSON.stringify(i.address()));let o=this.http2Servers.get(i);i.close(()=>{o&&(this.listenerChildrenTracker.unrefChild(o.channelzRef),(0,mt.unregisterChannelzRef)(o.channelzRef)),this.http2Servers.delete(i),s?.()})}closeSession(i,s){var o;this.trace("Closing session initiated by "+((o=i.socket)===null||o===void 0?void 0:o.remoteAddress));let a=this.sessions.get(i),c=()=>{a&&(this.sessionChildrenTracker.unrefChild(a.ref),(0,mt.unregisterChannelzRef)(a.ref)),s?.()};i.closed?queueMicrotask(c):i.close(c)}completeUnbind(i){for(let s of i.listeningServers){let o=this.http2Servers.get(s);if(this.closeServer(s,()=>{i.listeningServers.delete(s)}),o)for(let a of o.sessions)this.closeSession(a)}this.boundPorts.delete(i.mapKey)}unbind(i){this.trace("unbind port="+i);let s=this.normalizePort(i),o=(0,Vr.splitHostPort)(s.path);if(o?.port===0)throw new Error("Cannot unbind port 0");let a=this.boundPorts.get((0,Vr.uriToString)(s));a&&(this.trace("unbinding "+a.mapKey+" originally bound as "+(0,Vr.uriToString)(a.originalUri)),a.completionPromise?a.cancelled=!0:this.completeUnbind(a))}drain(i,s){var o,a;this.trace("drain port="+i+" graceTimeMs="+s);let c=this.normalizePort(i),l=(0,Vr.splitHostPort)(c.path);if(l?.port===0)throw new Error("Cannot drain port 0");let u=this.boundPorts.get((0,Vr.uriToString)(c));if(!u)return;let d=new Set;for(let f of u.listeningServers){let h=this.http2Servers.get(f);if(h)for(let g of h.sessions)d.add(g),this.closeSession(g,()=>{d.delete(g)})}(a=(o=setTimeout(()=>{for(let f of d)f.destroy(er.constants.NGHTTP2_CANCEL)},s)).unref)===null||a===void 0||a.call(o)}forceShutdown(){for(let i of this.boundPorts.values())i.cancelled=!0;this.boundPorts.clear();for(let i of this.http2Servers.keys())this.closeServer(i);this.sessions.forEach((i,s)=>{this.closeSession(s),s.destroy(er.constants.NGHTTP2_CANCEL)}),this.sessions.clear(),(0,mt.unregisterChannelzRef)(this.channelzRef),this.shutdown=!0}register(i,s,o,a,c){return this.handlers.has(i)?!1:(this.handlers.set(i,{func:s,serialize:o,deserialize:a,type:c,path:i}),!0)}unregister(i){return this.handlers.delete(i)}start(){if(this.http2Servers.size===0||[...this.http2Servers.keys()].every(i=>!i.listening))throw new Error("server must be bound in order to start");if(this.started===!0)throw new Error("server is already started");this.started=!0}tryShutdown(i){var s;let o=l=>{(0,mt.unregisterChannelzRef)(this.channelzRef),i(l)},a=0;function c(){a--,a===0&&o()}this.shutdown=!0;for(let[l,u]of this.http2Servers.entries()){a++;let d=u.channelzRef.name;this.trace("Waiting for server "+d+" to close"),this.closeServer(l,()=>{this.trace("Server "+d+" finished closing"),c()});for(let f of u.sessions.keys()){a++;let h=(s=f.socket)===null||s===void 0?void 0:s.remoteAddress;this.trace("Waiting for session "+h+" to close"),this.closeSession(f,()=>{this.trace("Session "+h+" finished closing"),c()})}}a===0&&o()}addHttp2Port(){throw new Error("Not yet implemented")}getChannelzRef(){return this.channelzRef}_verifyContentType(i,s){let o=s[er.constants.HTTP2_HEADER_CONTENT_TYPE];return typeof o!="string"||!o.startsWith("application/grpc")?(i.respond({[er.constants.HTTP2_HEADER_STATUS]:er.constants.HTTP_STATUS_UNSUPPORTED_MEDIA_TYPE},{endStream:!0}),!1):!0}_retrieveHandler(i){this.trace("Received call to method "+i+" at address "+this.serverAddressString);let s=this.handlers.get(i);return s===void 0?(this.trace("No handler registered for method "+i+". Sending UNIMPLEMENTED status."),null):s}_respondWithError(i,s,o=null){var a,c;let l=Object.assign({"grpc-status":(a=i.code)!==null&&a!==void 0?a:ot.Status.INTERNAL,"grpc-message":i.details,[er.constants.HTTP2_HEADER_STATUS]:er.constants.HTTP_STATUS_OK,[er.constants.HTTP2_HEADER_CONTENT_TYPE]:"application/grpc+proto"},(c=i.metadata)===null||c===void 0?void 0:c.toHttp2Headers());s.respond(l,{endStream:!0}),this.callTracker.addCallFailed(),o?.streamTracker.addCallFailed()}_channelzHandler(i,s,o){this.onStreamOpened(s);let a=this.sessions.get(s.session);if(this.callTracker.addCallStarted(),a?.streamTracker.addCallStarted(),!this._verifyContentType(s,o)){this.callTracker.addCallFailed(),a?.streamTracker.addCallFailed();return}let c=o[XI],l=this._retrieveHandler(c);if(!l){this._respondWithError(Q_(c),s,a);return}let u={addMessageSent:()=>{a&&(a.messagesSent+=1,a.lastMessageSentTimestamp=new Date)},addMessageReceived:()=>{a&&(a.messagesReceived+=1,a.lastMessageReceivedTimestamp=new Date)},onCallEnd:f=>{f.code===ot.Status.OK?this.callTracker.addCallSucceeded():this.callTracker.addCallFailed()},onStreamEnd:f=>{a&&(f?a.streamTracker.addCallSucceeded():a.streamTracker.addCallFailed())}},d=(0,YI.getServerInterceptingCall)([...i,...this.interceptors],s,o,u,l,this.options);this._runHandlerForCall(d,l)||(this.callTracker.addCallFailed(),a?.streamTracker.addCallFailed(),d.sendStatus({code:ot.Status.INTERNAL,details:`Unknown handler type: ${l.type}`}))}_streamHandler(i,s,o){if(this.onStreamOpened(s),this._verifyContentType(s,o)!==!0)return;let a=o[XI],c=this._retrieveHandler(a);if(!c){this._respondWithError(Q_(a),s,null);return}let l=(0,YI.getServerInterceptingCall)([...i,...this.interceptors],s,o,null,c,this.options);this._runHandlerForCall(l,c)||l.sendStatus({code:ot.Status.INTERNAL,details:`Unknown handler type: ${c.type}`})}_runHandlerForCall(i,s){let{type:o}=s;if(o==="unary")Fz(i,s);else if(o==="clientStream")Uz(i,s);else if(o==="serverStream")jz(i,s);else if(o==="bidi")zz(i,s);else return!1;return!0}_setupHandlers(i,s){if(i===null)return;let o=i.address(),a="null";o&&(typeof o=="string"?a=o:a=o.address+":"+o.port),this.serverAddressString=a;let c=this.channelzEnabled?this._channelzHandler:this._streamHandler,l=this.channelzEnabled?this._channelzSessionHandler(i):this._sessionHandler(i);i.on("stream",c.bind(this,s)),i.on("session",l)}_sessionHandler(i){return s=>{var o,a;(o=this.http2Servers.get(i))===null||o===void 0||o.sessions.add(s);let c=null,l=null,u=null,d=!1,f=this.enableIdleTimeout(s);if(this.maxConnectionAgeMs!==ka){let y=this.maxConnectionAgeMs/10,A=Math.random()*y*2-y;c=setTimeout(()=>{var E,C;d=!0,this.trace("Connection dropped by max connection age: "+((E=s.socket)===null||E===void 0?void 0:E.remoteAddress));try{s.goaway(er.constants.NGHTTP2_NO_ERROR,~(1<<31),eP)}catch{s.destroy();return}s.close(),this.maxConnectionAgeGraceMs!==ka&&(l=setTimeout(()=>{s.destroy()},this.maxConnectionAgeGraceMs),(C=l.unref)===null||C===void 0||C.call(l))},this.maxConnectionAgeMs+A),(a=c.unref)===null||a===void 0||a.call(c)}let h=()=>{u&&(clearTimeout(u),u=null)},g=()=>!s.destroyed&&this.keepaliveTimeMs<K_&&this.keepaliveTimeMs>0,p,b=()=>{var y;g()&&(this.keepaliveTrace("Starting keepalive timer for "+this.keepaliveTimeMs+"ms"),u=setTimeout(()=>{h(),p()},this.keepaliveTimeMs),(y=u.unref)===null||y===void 0||y.call(u))};p=()=>{var y;if(!g())return;this.keepaliveTrace("Sending ping with timeout "+this.keepaliveTimeoutMs+"ms");let A="";try{s.ping((C,k,I)=>{h(),C?(this.keepaliveTrace("Ping failed with error: "+C.message),d=!0,s.close()):(this.keepaliveTrace("Received ping response"),b())})||(A="Ping returned false")}catch(E){A=(E instanceof Error?E.message:"")||"Unknown error"}if(A){this.keepaliveTrace("Ping send failed: "+A),this.trace("Connection dropped due to ping send error: "+A),d=!0,s.close();return}u=setTimeout(()=>{h(),this.keepaliveTrace("Ping timeout passed without response"),this.trace("Connection dropped by keepalive timeout"),d=!0,s.close()},this.keepaliveTimeoutMs),(y=u.unref)===null||y===void 0||y.call(u)},b(),s.on("close",()=>{var y,A;d||this.trace(`Connection dropped by client ${(y=s.socket)===null||y===void 0?void 0:y.remoteAddress}`),c&&clearTimeout(c),l&&clearTimeout(l),h(),f!==null&&(clearTimeout(f.timeout),this.sessionIdleTimeouts.delete(s)),(A=this.http2Servers.get(i))===null||A===void 0||A.sessions.delete(s)})}}_channelzSessionHandler(i){return s=>{var o,a,c,l;let u=(0,mt.registerChannelzSocket)((a=(o=s.socket)===null||o===void 0?void 0:o.remoteAddress)!==null&&a!==void 0?a:"unknown",this.getChannelzSessionInfo.bind(this,s),this.channelzEnabled),d={ref:u,streamTracker:new mt.ChannelzCallTracker,messagesSent:0,messagesReceived:0,keepAlivesSent:0,lastMessageSentTimestamp:null,lastMessageReceivedTimestamp:null};(c=this.http2Servers.get(i))===null||c===void 0||c.sessions.add(s),this.sessions.set(s,d);let f=`${s.socket.remoteAddress}:${s.socket.remotePort}`;this.channelzTrace.addTrace("CT_INFO","Connection established by client "+f),this.trace("Connection established by client "+f),this.sessionChildrenTracker.refChild(u);let h=null,g=null,p=null,b=!1,y=this.enableIdleTimeout(s);if(this.maxConnectionAgeMs!==ka){let I=this.maxConnectionAgeMs/10,D=Math.random()*I*2-I;h=setTimeout(()=>{var j;b=!0,this.channelzTrace.addTrace("CT_INFO","Connection dropped by max connection age from "+f);try{s.goaway(er.constants.NGHTTP2_NO_ERROR,~(1<<31),eP)}catch{s.destroy();return}s.close(),this.maxConnectionAgeGraceMs!==ka&&(g=setTimeout(()=>{s.destroy()},this.maxConnectionAgeGraceMs),(j=g.unref)===null||j===void 0||j.call(g))},this.maxConnectionAgeMs+D),(l=h.unref)===null||l===void 0||l.call(h)}let A=()=>{p&&(clearTimeout(p),p=null)},E=()=>!s.destroyed&&this.keepaliveTimeMs<K_&&this.keepaliveTimeMs>0,C,k=()=>{var I;E()&&(this.keepaliveTrace("Starting keepalive timer for "+this.keepaliveTimeMs+"ms"),p=setTimeout(()=>{A(),C()},this.keepaliveTimeMs),(I=p.unref)===null||I===void 0||I.call(p))};C=()=>{var I;if(!E())return;this.keepaliveTrace("Sending ping with timeout "+this.keepaliveTimeoutMs+"ms");let D="";try{s.ping((L,q,T)=>{A(),L?(this.keepaliveTrace("Ping failed with error: "+L.message),this.channelzTrace.addTrace("CT_INFO","Connection dropped due to error of a ping frame "+L.message+" return in "+q),b=!0,s.close()):(this.keepaliveTrace("Received ping response"),k())})||(D="Ping returned false")}catch(j){D=(j instanceof Error?j.message:"")||"Unknown error"}if(D){this.keepaliveTrace("Ping send failed: "+D),this.channelzTrace.addTrace("CT_INFO","Connection dropped due to ping send error: "+D),b=!0,s.close();return}d.keepAlivesSent+=1,p=setTimeout(()=>{A(),this.keepaliveTrace("Ping timeout passed without response"),this.channelzTrace.addTrace("CT_INFO","Connection dropped by keepalive timeout from "+f),b=!0,s.close()},this.keepaliveTimeoutMs),(I=p.unref)===null||I===void 0||I.call(p)},k(),s.on("close",()=>{var I;b||this.channelzTrace.addTrace("CT_INFO","Connection dropped by client "+f),this.sessionChildrenTracker.unrefChild(u),(0,mt.unregisterChannelzRef)(u),h&&clearTimeout(h),g&&clearTimeout(g),A(),y!==null&&(clearTimeout(y.timeout),this.sessionIdleTimeouts.delete(s)),(I=this.http2Servers.get(i))===null||I===void 0||I.sessions.delete(s),this.sessions.delete(s)})}}enableIdleTimeout(i){var s,o;if(this.sessionIdleTimeout>=ZI)return null;let a={activeStreams:0,lastIdle:Date.now(),onClose:this.onStreamClose.bind(this,i),timeout:setTimeout(this.onIdleTimeout,this.sessionIdleTimeout,this,i)};(o=(s=a.timeout).unref)===null||o===void 0||o.call(s),this.sessionIdleTimeouts.set(i,a);let{socket:c}=i;return this.trace("Enable idle timeout for "+c.remoteAddress+":"+c.remotePort),a}onIdleTimeout(i,s){let{socket:o}=s,a=i.sessionIdleTimeouts.get(s);a!==void 0&&a.activeStreams===0&&(Date.now()-a.lastIdle>=i.sessionIdleTimeout?(i.trace("Session idle timeout triggered for "+o?.remoteAddress+":"+o?.remotePort+" last idle at "+a.lastIdle),i.closeSession(s)):a.timeout.refresh())}onStreamOpened(i){let s=i.session,o=this.sessionIdleTimeouts.get(s);o&&(o.activeStreams+=1,i.once("close",o.onClose))}onStreamClose(i){var s,o;let a=this.sessionIdleTimeouts.get(i);a&&(a.activeStreams-=1,a.activeStreams===0&&(a.lastIdle=Date.now(),a.timeout.refresh(),this.trace("Session onStreamClose"+((s=i.socket)===null||s===void 0?void 0:s.remoteAddress)+":"+((o=i.socket)===null||o===void 0?void 0:o.remotePort)+" at "+a.lastIdle)))}},(()=>{let n=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;t=[qz("Calling start() is no longer necessary. It can be safely omitted.")],kz(r,null,t,{kind:"method",name:"start",static:!1,private:!1,access:{has:i=>"start"in i,get:i=>i.start},metadata:n},null,e),n&&Object.defineProperty(r,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:n})})(),r})();zi.Server=Bz;async function Fz(r,e){let t;function n(o,a,c,l){if(o){r.sendStatus((0,Ra.serverErrorToStatus)(o,c));return}r.sendMessage(a,()=>{r.sendStatus({code:ot.Status.OK,details:"OK",metadata:c??null})})}let i,s=null;r.start({onReceiveMetadata(o){i=o,r.startRead()},onReceiveMessage(o){if(s){r.sendStatus({code:ot.Status.UNIMPLEMENTED,details:`Received a second request message for server streaming method ${e.path}`,metadata:null});return}s=o,r.startRead()},onReceiveHalfClose(){if(!s){r.sendStatus({code:ot.Status.UNIMPLEMENTED,details:`Received no request message for server streaming method ${e.path}`,metadata:null});return}t=new Ra.ServerWritableStreamImpl(e.path,r,i,s);try{e.func(t,n)}catch(o){r.sendStatus({code:ot.Status.UNKNOWN,details:`Server method handler threw error ${o.message}`,metadata:null})}},onCancel(){t&&(t.cancelled=!0,t.emit("cancelled","cancelled"))}})}function Uz(r,e){let t;function n(i,s,o,a){if(i){r.sendStatus((0,Ra.serverErrorToStatus)(i,o));return}r.sendMessage(s,()=>{r.sendStatus({code:ot.Status.OK,details:"OK",metadata:o??null})})}r.start({onReceiveMetadata(i){t=new Ra.ServerDuplexStreamImpl(e.path,r,i);try{e.func(t,n)}catch(s){r.sendStatus({code:ot.Status.UNKNOWN,details:`Server method handler threw error ${s.message}`,metadata:null})}},onReceiveMessage(i){t.push(i)},onReceiveHalfClose(){t.push(null)},onCancel(){t&&(t.cancelled=!0,t.emit("cancelled","cancelled"),t.destroy())}})}function jz(r,e){let t,n,i=null;r.start({onReceiveMetadata(s){n=s,r.startRead()},onReceiveMessage(s){if(i){r.sendStatus({code:ot.Status.UNIMPLEMENTED,details:`Received a second request message for server streaming method ${e.path}`,metadata:null});return}i=s,r.startRead()},onReceiveHalfClose(){if(!i){r.sendStatus({code:ot.Status.UNIMPLEMENTED,details:`Received no request message for server streaming method ${e.path}`,metadata:null});return}t=new Ra.ServerWritableStreamImpl(e.path,r,n,i);try{e.func(t)}catch(s){r.sendStatus({code:ot.Status.UNKNOWN,details:`Server method handler threw error ${s.message}`,metadata:null})}},onCancel(){t&&(t.cancelled=!0,t.emit("cancelled","cancelled"),t.destroy())}})}function zz(r,e){let t;r.start({onReceiveMetadata(n){t=new Ra.ServerDuplexStreamImpl(e.path,r,n);try{e.func(t)}catch(i){r.sendStatus({code:ot.Status.UNKNOWN,details:`Server method handler threw error ${i.message}`,metadata:null})}},onReceiveMessage(n){t.push(n)},onReceiveHalfClose(){t.push(null)},onCancel(){t&&(t.cancelled=!0,t.emit("cancelled","cancelled"),t.destroy())}})}});var rP=m(lh=>{"use strict";Object.defineProperty(lh,"__esModule",{value:!0});lh.StatusBuilder=void 0;var J_=class{constructor(){this.code=null,this.details=null,this.metadata=null}withCode(e){return this.code=e,this}withDetails(e){return this.details=e,this}withMetadata(e){return this.metadata=e,this}build(){let e={};return this.code!==null&&(e.code=this.code),this.details!==null&&(e.details=this.details),this.metadata!==null&&(e.metadata=this.metadata),e}};lh.StatusBuilder=J_});var $_=m(An=>{"use strict";Object.defineProperty(An,"__esModule",{value:!0});An.parseDuration=An.isDuration=An.durationToMs=An.msToDuration=void 0;function Hz(r){return{seconds:r/1e3|0,nanos:r%1e3*1e6|0}}An.msToDuration=Hz;function Gz(r){return r.seconds*1e3+r.nanos/1e6|0}An.durationToMs=Gz;function Vz(r){return typeof r.seconds=="number"&&typeof r.nanos=="number"}An.isDuration=Vz;var Wz=/^(\d+)(?:\.(\d+))?s$/;function Kz(r){let e=r.match(Wz);return e?{seconds:Number.parseInt(e[1],10),nanos:e[2]?Number.parseInt(e[2].padEnd(9,"0"),10):0}:null}An.parseDuration=Kz});var uh=m(Mr=>{"use strict";Object.defineProperty(Mr,"__esModule",{value:!0});Mr.setup=Mr.LeafLoadBalancer=Mr.PickFirstLoadBalancer=Mr.shuffled=Mr.PickFirstLoadBalancingConfig=void 0;var Y_=Vs(),at=Er(),Na=Ci(),nP=Tr(),Qz=Fe(),Jz=ve(),iP=Tr(),sP=se("net"),$z="pick_first";function Jl(r){Qz.trace(Jz.LogVerbosity.DEBUG,$z,r)}var $l="pick_first",Yz=250,Ma=class r{constructor(e){this.shuffleAddressList=e}getLoadBalancerName(){return $l}toJsonObject(){return{[$l]:{shuffleAddressList:this.shuffleAddressList}}}getShuffleAddressList(){return this.shuffleAddressList}static createFromJson(e){if("shuffleAddressList"in e&&typeof e.shuffleAddressList!="boolean")throw new Error("pick_first config field shuffleAddressList must be a boolean if provided");return new r(e.shuffleAddressList===!0)}};Mr.PickFirstLoadBalancingConfig=Ma;var Z_=class{constructor(e){this.subchannel=e}pick(e){return{pickResultType:Na.PickResultType.COMPLETE,subchannel:this.subchannel,status:null,onCallStarted:null,onCallEnded:null}}};function oP(r){let e=r.slice();for(let t=e.length-1;t>1;t--){let n=Math.floor(Math.random()*(t+1)),i=e[t];e[t]=e[n],e[n]=i}return e}Mr.shuffled=oP;function Zz(r){let e=[],t=[],n=[],i=(0,iP.isTcpSubchannelAddress)(r[0])&&(0,sP.isIPv6)(r[0].host);for(let a of r)(0,iP.isTcpSubchannelAddress)(a)&&(0,sP.isIPv6)(a.host)?t.push(a):n.push(a);let s=i?t:n,o=i?n:t;for(let a=0;a<Math.max(s.length,o.length);a++)a<s.length&&e.push(s[a]),a<o.length&&e.push(o[a]);return e}var aP="grpc-node.internal.pick-first.report_health_status",Yl=class{constructor(e,t,n){this.channelControlHelper=e,this.children=[],this.currentState=at.ConnectivityState.IDLE,this.currentSubchannelIndex=0,this.currentPick=null,this.subchannelStateListener=(i,s,o,a,c)=>{this.onSubchannelStateUpdate(i,s,o,c)},this.pickedSubchannelHealthListener=()=>this.calculateAndReportNewState(),this.stickyTransientFailureMode=!1,this.lastError=null,this.latestAddressList=null,this.connectionDelayTimeout=setTimeout(()=>{},0),clearTimeout(this.connectionDelayTimeout),this.reportHealthStatus=n[aP]}allChildrenHaveReportedTF(){return this.children.every(e=>e.hasReportedTransientFailure)}resetChildrenReportedTF(){this.children.every(e=>e.hasReportedTransientFailure=!1)}calculateAndReportNewState(){this.currentPick?this.reportHealthStatus&&!this.currentPick.isHealthy()?this.updateState(at.ConnectivityState.TRANSIENT_FAILURE,new Na.UnavailablePicker({details:`Picked subchannel ${this.currentPick.getAddress()} is unhealthy`})):this.updateState(at.ConnectivityState.READY,new Z_(this.currentPick)):this.children.length===0?this.updateState(at.ConnectivityState.IDLE,new Na.QueuePicker(this)):this.stickyTransientFailureMode?this.updateState(at.ConnectivityState.TRANSIENT_FAILURE,new Na.UnavailablePicker({details:`No connection established. Last error: ${this.lastError}`})):this.updateState(at.ConnectivityState.CONNECTING,new Na.QueuePicker(this))}requestReresolution(){this.channelControlHelper.requestReresolution()}maybeEnterStickyTransientFailureMode(){if(this.allChildrenHaveReportedTF()){if(this.requestReresolution(),this.resetChildrenReportedTF(),this.stickyTransientFailureMode){this.calculateAndReportNewState();return}this.stickyTransientFailureMode=!0;for(let{subchannel:e}of this.children)e.startConnecting();this.calculateAndReportNewState()}}removeCurrentPick(){this.currentPick!==null&&(this.currentPick.removeConnectivityStateListener(this.subchannelStateListener),this.channelControlHelper.removeChannelzChild(this.currentPick.getChannelzRef()),this.currentPick.removeHealthStateWatcher(this.pickedSubchannelHealthListener),this.currentPick.unref(),this.currentPick=null)}onSubchannelStateUpdate(e,t,n,i){var s;if(!((s=this.currentPick)===null||s===void 0)&&s.realSubchannelEquals(e)){n!==at.ConnectivityState.READY&&(this.removeCurrentPick(),this.calculateAndReportNewState());return}for(let[o,a]of this.children.entries())if(e.realSubchannelEquals(a.subchannel)){n===at.ConnectivityState.READY&&this.pickSubchannel(a.subchannel),n===at.ConnectivityState.TRANSIENT_FAILURE&&(a.hasReportedTransientFailure=!0,i&&(this.lastError=i),this.maybeEnterStickyTransientFailureMode(),o===this.currentSubchannelIndex&&this.startNextSubchannelConnecting(o+1)),a.subchannel.startConnecting();return}}startNextSubchannelConnecting(e){clearTimeout(this.connectionDelayTimeout);for(let[t,n]of this.children.entries())if(t>=e){let i=n.subchannel.getConnectivityState();if(i===at.ConnectivityState.IDLE||i===at.ConnectivityState.CONNECTING){this.startConnecting(t);return}}this.maybeEnterStickyTransientFailureMode()}startConnecting(e){var t,n;clearTimeout(this.connectionDelayTimeout),this.currentSubchannelIndex=e,this.children[e].subchannel.getConnectivityState()===at.ConnectivityState.IDLE&&(Jl("Start connecting to subchannel with address "+this.children[e].subchannel.getAddress()),process.nextTick(()=>{var i;(i=this.children[e])===null||i===void 0||i.subchannel.startConnecting()})),this.connectionDelayTimeout=setTimeout(()=>{this.startNextSubchannelConnecting(e+1)},Yz),(n=(t=this.connectionDelayTimeout).unref)===null||n===void 0||n.call(t)}pickSubchannel(e){Jl("Pick subchannel with address "+e.getAddress()),this.stickyTransientFailureMode=!1,e.ref(),this.channelControlHelper.addChannelzChild(e.getChannelzRef()),this.removeCurrentPick(),this.resetSubchannelList(),e.addConnectivityStateListener(this.subchannelStateListener),e.addHealthStateWatcher(this.pickedSubchannelHealthListener),this.currentPick=e,clearTimeout(this.connectionDelayTimeout),this.calculateAndReportNewState()}updateState(e,t){Jl(at.ConnectivityState[this.currentState]+" -> "+at.ConnectivityState[e]),this.currentState=e,this.channelControlHelper.updateState(e,t)}resetSubchannelList(){for(let e of this.children)e.subchannel.removeConnectivityStateListener(this.subchannelStateListener),e.subchannel.unref(),this.channelControlHelper.removeChannelzChild(e.subchannel.getChannelzRef());this.currentSubchannelIndex=0,this.children=[]}connectToAddressList(e){Jl("connectToAddressList(["+e.map(n=>(0,nP.subchannelAddressToString)(n))+"])");let t=e.map(n=>({subchannel:this.channelControlHelper.createSubchannel(n,{},null),hasReportedTransientFailure:!1}));for(let{subchannel:n}of t)if(n.getConnectivityState()===at.ConnectivityState.READY){this.pickSubchannel(n);return}for(let{subchannel:n}of t)n.ref(),this.channelControlHelper.addChannelzChild(n.getChannelzRef());this.resetSubchannelList(),this.children=t;for(let{subchannel:n}of this.children)n.addConnectivityStateListener(this.subchannelStateListener);for(let n of this.children)n.subchannel.getConnectivityState()===at.ConnectivityState.TRANSIENT_FAILURE&&(n.hasReportedTransientFailure=!0);this.startNextSubchannelConnecting(0),this.calculateAndReportNewState()}updateAddressList(e,t){if(!(t instanceof Ma))return;t.getShuffleAddressList()&&(e=oP(e));let n=[].concat(...e.map(s=>s.addresses));if(Jl("updateAddressList(["+n.map(s=>(0,nP.subchannelAddressToString)(s))+"])"),n.length===0)throw new Error("No addresses in endpoint list passed to pick_first");let i=Zz(n);this.latestAddressList=i,this.connectToAddressList(i)}exitIdle(){this.currentState===at.ConnectivityState.IDLE&&this.latestAddressList&&this.connectToAddressList(this.latestAddressList)}resetBackoff(){}destroy(){this.resetSubchannelList(),this.removeCurrentPick()}getTypeName(){return $l}};Mr.PickFirstLoadBalancer=Yl;var Xz=new Ma(!1),X_=class{constructor(e,t,n,i){this.endpoint=e,this.latestState=at.ConnectivityState.IDLE;let s=(0,Y_.createChildChannelControlHelper)(t,{updateState:(o,a)=>{this.latestState=o,this.latestPicker=a,t.updateState(o,a)}});this.pickFirstBalancer=new Yl(s,n,Object.assign(Object.assign({},i),{[aP]:!0})),this.latestPicker=new Na.QueuePicker(this.pickFirstBalancer)}startConnecting(){this.pickFirstBalancer.updateAddressList([this.endpoint],Xz)}updateEndpoint(e){this.endpoint=e,this.latestState!==at.ConnectivityState.IDLE&&this.startConnecting()}getConnectivityState(){return this.latestState}getPicker(){return this.latestPicker}getEndpoint(){return this.endpoint}exitIdle(){this.pickFirstBalancer.exitIdle()}destroy(){this.pickFirstBalancer.destroy()}};Mr.LeafLoadBalancer=X_;function eH(){(0,Y_.registerLoadBalancerType)($l,Yl,Ma),(0,Y_.registerDefaultLoadBalancerType)($l)}Mr.setup=eH});var cP=m(fh=>{"use strict";Object.defineProperty(fh,"__esModule",{value:!0});fh.FileWatcherCertificateProvider=void 0;var tH=se("fs"),rH=Fe(),nH=ve(),iH=se("util"),sH="certificate_provider";function dh(r){rH.trace(nH.LogVerbosity.DEBUG,sH,r)}var e1=(0,iH.promisify)(tH.readFile),t1=class{constructor(e){if(this.config=e,this.refreshTimer=null,this.fileResultPromise=null,this.latestCaUpdate=null,this.caListeners=new Set,this.latestIdentityUpdate=null,this.identityListeners=new Set,this.lastUpdateTime=null,e.certificateFile===void 0!=(e.privateKeyFile===void 0))throw new Error("certificateFile and privateKeyFile must be set or unset together");if(e.certificateFile===void 0&&e.caCertificateFile===void 0)throw new Error("At least one of certificateFile and caCertificateFile must be set");dh("File watcher constructed with config "+JSON.stringify(e))}updateCertificates(){this.fileResultPromise||(this.fileResultPromise=Promise.allSettled([this.config.certificateFile?e1(this.config.certificateFile):Promise.reject(),this.config.privateKeyFile?e1(this.config.privateKeyFile):Promise.reject(),this.config.caCertificateFile?e1(this.config.caCertificateFile):Promise.reject()]),this.fileResultPromise.then(([e,t,n])=>{if(this.refreshTimer){dh("File watcher read certificates certificate"+(e?"!=":"==")+"null, privateKey"+(t?"!=":"==")+"null, CA certificate"+(n?"!=":"==")+"null"),this.lastUpdateTime=new Date,this.fileResultPromise=null,e.status==="fulfilled"&&t.status==="fulfilled"?this.latestIdentityUpdate={certificate:e.value,privateKey:t.value}:this.latestIdentityUpdate=null,n.status==="fulfilled"&&(this.latestCaUpdate={caCertificate:n.value});for(let i of this.identityListeners)i(this.latestIdentityUpdate);for(let i of this.caListeners)i(this.latestCaUpdate)}}),dh("File watcher initiated certificate update"))}maybeStartWatchingFiles(){if(!this.refreshTimer){let e=this.lastUpdateTime?new Date().getTime()-this.lastUpdateTime.getTime():1/0;e>this.config.refreshIntervalMs&&this.updateCertificates(),e>this.config.refreshIntervalMs*2&&(this.latestCaUpdate=null,this.latestIdentityUpdate=null),this.refreshTimer=setInterval(()=>this.updateCertificates(),this.config.refreshIntervalMs),dh("File watcher started watching")}}maybeStopWatchingFiles(){this.caListeners.size===0&&this.identityListeners.size===0&&(this.fileResultPromise=null,this.refreshTimer&&(clearInterval(this.refreshTimer),this.refreshTimer=null))}addCaCertificateListener(e){this.caListeners.add(e),this.maybeStartWatchingFiles(),process.nextTick(e,this.latestCaUpdate)}removeCaCertificateListener(e){this.caListeners.delete(e),this.maybeStopWatchingFiles()}addIdentityCertificateListener(e){this.identityListeners.add(e),this.maybeStartWatchingFiles(),process.nextTick(e,this.latestIdentityUpdate)}removeIdentityCertificateListener(e){this.identityListeners.delete(e),this.maybeStopWatchingFiles()}};fh.FileWatcherCertificateProvider=t1});var n1=m(X=>{"use strict";Object.defineProperty(X,"__esModule",{value:!0});X.createCertificateProviderChannelCredentials=X.FileWatcherCertificateProvider=X.createCertificateProviderServerCredentials=X.createServerCredentialsWithInterceptors=X.BaseSubchannelWrapper=X.registerAdminService=X.FilterStackFactory=X.BaseFilter=X.PickResultType=X.QueuePicker=X.UnavailablePicker=X.ChildLoadBalancerHandler=X.EndpointMap=X.endpointHasAddress=X.endpointToString=X.subchannelAddressToString=X.LeafLoadBalancer=X.isLoadBalancerNameRegistered=X.parseLoadBalancingConfig=X.selectLbConfigFromList=X.registerLoadBalancerType=X.createChildChannelControlHelper=X.BackoffTimeout=X.parseDuration=X.durationToMs=X.splitHostPort=X.uriToString=X.createResolver=X.registerResolver=X.log=X.trace=void 0;var lP=Fe();Object.defineProperty(X,"trace",{enumerable:!0,get:function(){return lP.trace}});Object.defineProperty(X,"log",{enumerable:!0,get:function(){return lP.log}});var uP=cn();Object.defineProperty(X,"registerResolver",{enumerable:!0,get:function(){return uP.registerResolver}});Object.defineProperty(X,"createResolver",{enumerable:!0,get:function(){return uP.createResolver}});var dP=cr();Object.defineProperty(X,"uriToString",{enumerable:!0,get:function(){return dP.uriToString}});Object.defineProperty(X,"splitHostPort",{enumerable:!0,get:function(){return dP.splitHostPort}});var fP=$_();Object.defineProperty(X,"durationToMs",{enumerable:!0,get:function(){return fP.durationToMs}});Object.defineProperty(X,"parseDuration",{enumerable:!0,get:function(){return fP.parseDuration}});var oH=El();Object.defineProperty(X,"BackoffTimeout",{enumerable:!0,get:function(){return oH.BackoffTimeout}});var Zl=Vs();Object.defineProperty(X,"createChildChannelControlHelper",{enumerable:!0,get:function(){return Zl.createChildChannelControlHelper}});Object.defineProperty(X,"registerLoadBalancerType",{enumerable:!0,get:function(){return Zl.registerLoadBalancerType}});Object.defineProperty(X,"selectLbConfigFromList",{enumerable:!0,get:function(){return Zl.selectLbConfigFromList}});Object.defineProperty(X,"parseLoadBalancingConfig",{enumerable:!0,get:function(){return Zl.parseLoadBalancingConfig}});Object.defineProperty(X,"isLoadBalancerNameRegistered",{enumerable:!0,get:function(){return Zl.isLoadBalancerNameRegistered}});var aH=uh();Object.defineProperty(X,"LeafLoadBalancer",{enumerable:!0,get:function(){return aH.LeafLoadBalancer}});var hh=Tr();Object.defineProperty(X,"subchannelAddressToString",{enumerable:!0,get:function(){return hh.subchannelAddressToString}});Object.defineProperty(X,"endpointToString",{enumerable:!0,get:function(){return hh.endpointToString}});Object.defineProperty(X,"endpointHasAddress",{enumerable:!0,get:function(){return hh.endpointHasAddress}});Object.defineProperty(X,"EndpointMap",{enumerable:!0,get:function(){return hh.EndpointMap}});var cH=Kd();Object.defineProperty(X,"ChildLoadBalancerHandler",{enumerable:!0,get:function(){return cH.ChildLoadBalancerHandler}});var r1=Ci();Object.defineProperty(X,"UnavailablePicker",{enumerable:!0,get:function(){return r1.UnavailablePicker}});Object.defineProperty(X,"QueuePicker",{enumerable:!0,get:function(){return r1.QueuePicker}});Object.defineProperty(X,"PickResultType",{enumerable:!0,get:function(){return r1.PickResultType}});var lH=l_();Object.defineProperty(X,"BaseFilter",{enumerable:!0,get:function(){return lH.BaseFilter}});var uH=o_();Object.defineProperty(X,"FilterStackFactory",{enumerable:!0,get:function(){return uH.FilterStackFactory}});var dH=$d();Object.defineProperty(X,"registerAdminService",{enumerable:!0,get:function(){return dH.registerAdminService}});var fH=Zf();Object.defineProperty(X,"BaseSubchannelWrapper",{enumerable:!0,get:function(){return fH.BaseSubchannelWrapper}});var hP=ih();Object.defineProperty(X,"createServerCredentialsWithInterceptors",{enumerable:!0,get:function(){return hP.createServerCredentialsWithInterceptors}});Object.defineProperty(X,"createCertificateProviderServerCredentials",{enumerable:!0,get:function(){return hP.createCertificateProviderServerCredentials}});var hH=cP();Object.defineProperty(X,"FileWatcherCertificateProvider",{enumerable:!0,get:function(){return hH.FileWatcherCertificateProvider}});var pH=Al();Object.defineProperty(X,"createCertificateProviderChannelCredentials",{enumerable:!0,get:function(){return pH.createCertificateProviderChannelCredentials}})});var pP=m(ph=>{"use strict";Object.defineProperty(ph,"__esModule",{value:!0});ph.setup=void 0;var mH=cn(),i1=class{constructor(e,t,n){this.listener=t,this.hasReturnedResult=!1,this.endpoints=[];let i;e.authority===""?i="/"+e.path:i=e.path,this.endpoints=[{addresses:[{path:i}]}]}updateResolution(){this.hasReturnedResult||(this.hasReturnedResult=!0,process.nextTick(this.listener.onSuccessfulResolution,this.endpoints,null,null,null,{}))}destroy(){this.hasReturnedResult=!1}static getDefaultAuthority(e){return"localhost"}};function gH(){(0,mH.registerResolver)("unix",i1)}ph.setup=gH});var bP=m(yh=>{"use strict";Object.defineProperty(yh,"__esModule",{value:!0});yh.setup=void 0;var mP=se("net"),mh=ve(),s1=Pt(),gP=cn(),yP=cr(),yH=Fe(),vH="ip_resolver";function vP(r){yH.trace(mh.LogVerbosity.DEBUG,vH,r)}var o1="ipv4",a1="ipv6",bH=443,gh=class{constructor(e,t,n){var i;this.listener=t,this.endpoints=[],this.error=null,this.hasReturnedResult=!1,vP("Resolver constructed for target "+(0,yP.uriToString)(e));let s=[];if(!(e.scheme===o1||e.scheme===a1)){this.error={code:mh.Status.UNAVAILABLE,details:`Unrecognized scheme ${e.scheme} in IP resolver`,metadata:new s1.Metadata};return}let o=e.path.split(",");for(let a of o){let c=(0,yP.splitHostPort)(a);if(c===null){this.error={code:mh.Status.UNAVAILABLE,details:`Failed to parse ${e.scheme} address ${a}`,metadata:new s1.Metadata};return}if(e.scheme===o1&&!(0,mP.isIPv4)(c.host)||e.scheme===a1&&!(0,mP.isIPv6)(c.host)){this.error={code:mh.Status.UNAVAILABLE,details:`Failed to parse ${e.scheme} address ${a}`,metadata:new s1.Metadata};return}s.push({host:c.host,port:(i=c.port)!==null&&i!==void 0?i:bH})}this.endpoints=s.map(a=>({addresses:[a]})),vP("Parsed "+e.scheme+" address list "+s)}updateResolution(){this.hasReturnedResult||(this.hasReturnedResult=!0,process.nextTick(()=>{this.error?this.listener.onError(this.error):this.listener.onSuccessfulResolution(this.endpoints,null,null,null,{})}))}destroy(){this.hasReturnedResult=!1}static getDefaultAuthority(e){return e.path.split(",")[0]}};function _H(){(0,gP.registerResolver)(o1,gh),(0,gP.registerResolver)(a1,gh)}yh.setup=_H});var EP=m(Da=>{"use strict";Object.defineProperty(Da,"__esModule",{value:!0});Da.setup=Da.RoundRobinLoadBalancer=void 0;var wP=Vs(),Ht=Er(),c1=Ci(),AH=Fe(),wH=ve(),_P=Tr(),EH=uh(),SH="round_robin";function AP(r){AH.trace(wH.LogVerbosity.DEBUG,SH,r)}var vh="round_robin",l1=class r{getLoadBalancerName(){return vh}constructor(){}toJsonObject(){return{[vh]:{}}}static createFromJson(e){return new r}},u1=class{constructor(e,t=0){this.children=e,this.nextIndex=t}pick(e){let t=this.children[this.nextIndex].picker;return this.nextIndex=(this.nextIndex+1)%this.children.length,t.pick(e)}peekNextEndpoint(){return this.children[this.nextIndex].endpoint}},bh=class{constructor(e,t,n){this.channelControlHelper=e,this.credentials=t,this.options=n,this.children=[],this.currentState=Ht.ConnectivityState.IDLE,this.currentReadyPicker=null,this.updatesPaused=!1,this.lastError=null,this.childChannelControlHelper=(0,wP.createChildChannelControlHelper)(e,{updateState:(i,s)=>{this.currentState===Ht.ConnectivityState.READY&&i!==Ht.ConnectivityState.READY&&this.channelControlHelper.requestReresolution(),this.calculateAndUpdateState()}})}countChildrenWithState(e){return this.children.filter(t=>t.getConnectivityState()===e).length}calculateAndUpdateState(){if(!this.updatesPaused){if(this.countChildrenWithState(Ht.ConnectivityState.READY)>0){let e=this.children.filter(n=>n.getConnectivityState()===Ht.ConnectivityState.READY),t=0;if(this.currentReadyPicker!==null){let n=this.currentReadyPicker.peekNextEndpoint();t=e.findIndex(i=>(0,_P.endpointEqual)(i.getEndpoint(),n)),t<0&&(t=0)}this.updateState(Ht.ConnectivityState.READY,new u1(e.map(n=>({endpoint:n.getEndpoint(),picker:n.getPicker()})),t))}else this.countChildrenWithState(Ht.ConnectivityState.CONNECTING)>0?this.updateState(Ht.ConnectivityState.CONNECTING,new c1.QueuePicker(this)):this.countChildrenWithState(Ht.ConnectivityState.TRANSIENT_FAILURE)>0?this.updateState(Ht.ConnectivityState.TRANSIENT_FAILURE,new c1.UnavailablePicker({details:`No connection established. Last error: ${this.lastError}`})):this.updateState(Ht.ConnectivityState.IDLE,new c1.QueuePicker(this));for(let e of this.children)e.getConnectivityState()===Ht.ConnectivityState.IDLE&&e.exitIdle()}}updateState(e,t){AP(Ht.ConnectivityState[this.currentState]+" -> "+Ht.ConnectivityState[e]),e===Ht.ConnectivityState.READY?this.currentReadyPicker=t:this.currentReadyPicker=null,this.currentState=e,this.channelControlHelper.updateState(e,t)}resetSubchannelList(){for(let e of this.children)e.destroy()}updateAddressList(e,t){this.resetSubchannelList(),AP("Connect to endpoint list "+e.map(_P.endpointToString)),this.updatesPaused=!0,this.children=e.map(n=>new EH.LeafLoadBalancer(n,this.childChannelControlHelper,this.credentials,this.options));for(let n of this.children)n.startConnecting();this.updatesPaused=!1,this.calculateAndUpdateState()}exitIdle(){}resetBackoff(){}destroy(){this.resetSubchannelList()}getTypeName(){return vh}};Da.RoundRobinLoadBalancer=bh;function TH(){(0,wP.registerLoadBalancerType)(vh,bh,l1)}Da.setup=TH});var CP=m(Hi=>{"use strict";var d1;Object.defineProperty(Hi,"__esModule",{value:!0});Hi.setup=Hi.OutlierDetectionLoadBalancer=Hi.OutlierDetectionLoadBalancingConfig=void 0;var CH=Er(),SP=ve(),no=$_(),TP=n1(),xH=Vs(),OH=Kd(),IH=Ci(),f1=Tr(),PH=Zf(),kH=Fe(),RH="outlier_detection";function vt(r){kH.trace(SP.LogVerbosity.DEBUG,RH,r)}var v1="outlier_detection",NH=((d1=process.env.GRPC_EXPERIMENTAL_ENABLE_OUTLIER_DETECTION)!==null&&d1!==void 0?d1:"true")==="true",MH={stdev_factor:1900,enforcement_percentage:100,minimum_hosts:5,request_volume:100},DH={threshold:85,enforcement_percentage:100,minimum_hosts:5,request_volume:50};function qa(r,e,t,n){if(e in r&&r[e]!==void 0&&typeof r[e]!==t){let i=n?`${n}.${e}`:e;throw new Error(`outlier detection config ${i} parse error: expected ${t}, got ${typeof r[e]}`)}}function h1(r,e,t){let n=t?`${t}.${e}`:e;if(e in r&&r[e]!==void 0){if(!(0,no.isDuration)(r[e]))throw new Error(`outlier detection config ${n} parse error: expected Duration, got ${typeof r[e]}`);if(!(r[e].seconds>=0&&r[e].seconds<=315576e6&&r[e].nanos>=0&&r[e].nanos<=999999999))throw new Error(`outlier detection config ${n} parse error: values out of range for non-negative Duaration`)}}function _h(r,e,t){let n=t?`${t}.${e}`:e;if(qa(r,e,"number",t),e in r&&r[e]!==void 0&&!(r[e]>=0&&r[e]<=100))throw new Error(`outlier detection config ${n} parse error: value out of range for percentage (0-100)`)}var Xl=class r{constructor(e,t,n,i,s,o,a){if(this.childPolicy=a,a.getLoadBalancerName()==="pick_first")throw new Error("outlier_detection LB policy cannot have a pick_first child policy");this.intervalMs=e??1e4,this.baseEjectionTimeMs=t??3e4,this.maxEjectionTimeMs=n??3e5,this.maxEjectionPercent=i??10,this.successRateEjection=s?Object.assign(Object.assign({},MH),s):null,this.failurePercentageEjection=o?Object.assign(Object.assign({},DH),o):null}getLoadBalancerName(){return v1}toJsonObject(){var e,t;return{outlier_detection:{interval:(0,no.msToDuration)(this.intervalMs),base_ejection_time:(0,no.msToDuration)(this.baseEjectionTimeMs),max_ejection_time:(0,no.msToDuration)(this.maxEjectionTimeMs),max_ejection_percent:this.maxEjectionPercent,success_rate_ejection:(e=this.successRateEjection)!==null&&e!==void 0?e:void 0,failure_percentage_ejection:(t=this.failurePercentageEjection)!==null&&t!==void 0?t:void 0,child_policy:[this.childPolicy.toJsonObject()]}}}getIntervalMs(){return this.intervalMs}getBaseEjectionTimeMs(){return this.baseEjectionTimeMs}getMaxEjectionTimeMs(){return this.maxEjectionTimeMs}getMaxEjectionPercent(){return this.maxEjectionPercent}getSuccessRateEjectionConfig(){return this.successRateEjection}getFailurePercentageEjectionConfig(){return this.failurePercentageEjection}getChildPolicy(){return this.childPolicy}static createFromJson(e){var t;if(h1(e,"interval"),h1(e,"base_ejection_time"),h1(e,"max_ejection_time"),_h(e,"max_ejection_percent"),"success_rate_ejection"in e&&e.success_rate_ejection!==void 0){if(typeof e.success_rate_ejection!="object")throw new Error("outlier detection config success_rate_ejection must be an object");qa(e.success_rate_ejection,"stdev_factor","number","success_rate_ejection"),_h(e.success_rate_ejection,"enforcement_percentage","success_rate_ejection"),qa(e.success_rate_ejection,"minimum_hosts","number","success_rate_ejection"),qa(e.success_rate_ejection,"request_volume","number","success_rate_ejection")}if("failure_percentage_ejection"in e&&e.failure_percentage_ejection!==void 0){if(typeof e.failure_percentage_ejection!="object")throw new Error("outlier detection config failure_percentage_ejection must be an object");_h(e.failure_percentage_ejection,"threshold","failure_percentage_ejection"),_h(e.failure_percentage_ejection,"enforcement_percentage","failure_percentage_ejection"),qa(e.failure_percentage_ejection,"minimum_hosts","number","failure_percentage_ejection"),qa(e.failure_percentage_ejection,"request_volume","number","failure_percentage_ejection")}if(!("child_policy"in e)||!Array.isArray(e.child_policy))throw new Error("outlier detection config child_policy must be an array");let n=(0,xH.selectLbConfigFromList)(e.child_policy);if(!n)throw new Error("outlier detection config child_policy: no valid recognized policy found");return new r(e.interval?(0,no.durationToMs)(e.interval):null,e.base_ejection_time?(0,no.durationToMs)(e.base_ejection_time):null,e.max_ejection_time?(0,no.durationToMs)(e.max_ejection_time):null,(t=e.max_ejection_percent)!==null&&t!==void 0?t:null,e.success_rate_ejection,e.failure_percentage_ejection,n)}};Hi.OutlierDetectionLoadBalancingConfig=Xl;var m1=class extends PH.BaseSubchannelWrapper{constructor(e,t){super(e),this.mapEntry=t,this.refCount=0}ref(){this.child.ref(),this.refCount+=1}unref(){if(this.child.unref(),this.refCount-=1,this.refCount<=0&&this.mapEntry){let e=this.mapEntry.subchannelWrappers.indexOf(this);e>=0&&this.mapEntry.subchannelWrappers.splice(e,1)}}eject(){this.setHealthy(!1)}uneject(){this.setHealthy(!0)}getMapEntry(){return this.mapEntry}getWrappedSubchannel(){return this.child}};function p1(){return{success:0,failure:0}}var g1=class{constructor(){this.activeBucket=p1(),this.inactiveBucket=p1()}addSuccess(){this.activeBucket.success+=1}addFailure(){this.activeBucket.failure+=1}switchBuckets(){this.inactiveBucket=this.activeBucket,this.activeBucket=p1()}getLastSuccesses(){return this.inactiveBucket.success}getLastFailures(){return this.inactiveBucket.failure}},y1=class{constructor(e,t){this.wrappedPicker=e,this.countCalls=t}pick(e){let t=this.wrappedPicker.pick(e);if(t.pickResultType===IH.PickResultType.COMPLETE){let n=t.subchannel,i=n.getMapEntry();if(i){let s=t.onCallEnded;return this.countCalls&&(s=o=>{var a;o===SP.Status.OK?i.counter.addSuccess():i.counter.addFailure(),(a=t.onCallEnded)===null||a===void 0||a.call(t,o)}),Object.assign(Object.assign({},t),{subchannel:n.getWrappedSubchannel(),onCallEnded:s})}else return Object.assign(Object.assign({},t),{subchannel:n.getWrappedSubchannel()})}else return t}},Ah=class{constructor(e,t,n){this.entryMap=new f1.EndpointMap,this.latestConfig=null,this.timerStartTime=null,this.childBalancer=new OH.ChildLoadBalancerHandler((0,TP.createChildChannelControlHelper)(e,{createSubchannel:(i,s,o)=>{let a=e.createSubchannel(i,s,o),c=this.entryMap.getForSubchannelAddress(i),l=new m1(a,c);return c?.currentEjectionTimestamp!==null&&l.eject(),c?.subchannelWrappers.push(l),l},updateState:(i,s)=>{i===CH.ConnectivityState.READY?e.updateState(i,new y1(s,this.isCountingEnabled())):e.updateState(i,s)}}),t,n),this.ejectionTimer=setInterval(()=>{},0),clearInterval(this.ejectionTimer)}isCountingEnabled(){return this.latestConfig!==null&&(this.latestConfig.getSuccessRateEjectionConfig()!==null||this.latestConfig.getFailurePercentageEjectionConfig()!==null)}getCurrentEjectionPercent(){let e=0;for(let t of this.entryMap.values())t.currentEjectionTimestamp!==null&&(e+=1);return e*100/this.entryMap.size}runSuccessRateCheck(e){if(!this.latestConfig)return;let t=this.latestConfig.getSuccessRateEjectionConfig();if(!t)return;vt("Running success rate check");let n=t.request_volume,i=0,s=[];for(let[d,f]of this.entryMap.entries()){let h=f.counter.getLastSuccesses(),g=f.counter.getLastFailures();vt("Stats for "+(0,f1.endpointToString)(d)+": successes="+h+" failures="+g+" targetRequestVolume="+n),h+g>=n&&(i+=1,s.push(h/(h+g)))}if(vt("Found "+i+" success rate candidates; currentEjectionPercent="+this.getCurrentEjectionPercent()+" successRates=["+s+"]"),i<t.minimum_hosts)return;let o=s.reduce((d,f)=>d+f)/s.length,a=0;for(let d of s){let f=d-o;a+=f*f}let c=a/s.length,l=Math.sqrt(c),u=o-l*(t.stdev_factor/1e3);vt("stdev="+l+" ejectionThreshold="+u);for(let[d,f]of this.entryMap.entries()){if(this.getCurrentEjectionPercent()>=this.latestConfig.getMaxEjectionPercent())break;let h=f.counter.getLastSuccesses(),g=f.counter.getLastFailures();if(h+g<n)continue;let p=h/(h+g);if(vt("Checking candidate "+d+" successRate="+p),p<u){let b=Math.random()*100;vt("Candidate "+d+" randomNumber="+b+" enforcement_percentage="+t.enforcement_percentage),b<t.enforcement_percentage&&(vt("Ejecting candidate "+d),this.eject(f,e))}}}runFailurePercentageCheck(e){if(!this.latestConfig)return;let t=this.latestConfig.getFailurePercentageEjectionConfig();if(!t)return;vt("Running failure percentage check. threshold="+t.threshold+" request volume threshold="+t.request_volume);let n=0;for(let i of this.entryMap.values()){let s=i.counter.getLastSuccesses(),o=i.counter.getLastFailures();s+o>=t.request_volume&&(n+=1)}if(!(n<t.minimum_hosts))for(let[i,s]of this.entryMap.entries()){if(this.getCurrentEjectionPercent()>=this.latestConfig.getMaxEjectionPercent())break;let o=s.counter.getLastSuccesses(),a=s.counter.getLastFailures();if(vt("Candidate successes="+o+" failures="+a),o+a<t.request_volume)continue;if(a*100/(a+o)>t.threshold){let l=Math.random()*100;vt("Candidate "+i+" randomNumber="+l+" enforcement_percentage="+t.enforcement_percentage),l<t.enforcement_percentage&&(vt("Ejecting candidate "+i),this.eject(s,e))}}}eject(e,t){e.currentEjectionTimestamp=new Date,e.ejectionTimeMultiplier+=1;for(let n of e.subchannelWrappers)n.eject()}uneject(e){e.currentEjectionTimestamp=null;for(let t of e.subchannelWrappers)t.uneject()}switchAllBuckets(){for(let e of this.entryMap.values())e.counter.switchBuckets()}startTimer(e){var t,n;this.ejectionTimer=setTimeout(()=>this.runChecks(),e),(n=(t=this.ejectionTimer).unref)===null||n===void 0||n.call(t)}runChecks(){let e=new Date;if(vt("Ejection timer running"),this.switchAllBuckets(),!!this.latestConfig){this.timerStartTime=e,this.startTimer(this.latestConfig.getIntervalMs()),this.runSuccessRateCheck(e),this.runFailurePercentageCheck(e);for(let[t,n]of this.entryMap.entries())if(n.currentEjectionTimestamp===null)n.ejectionTimeMultiplier>0&&(n.ejectionTimeMultiplier-=1);else{let i=this.latestConfig.getBaseEjectionTimeMs(),s=this.latestConfig.getMaxEjectionTimeMs(),o=new Date(n.currentEjectionTimestamp.getTime());o.setMilliseconds(o.getMilliseconds()+Math.min(i*n.ejectionTimeMultiplier,Math.max(i,s))),o<new Date&&(vt("Unejecting "+t),this.uneject(n))}}}updateAddressList(e,t,n){if(!(t instanceof Xl))return;for(let s of e)this.entryMap.has(s)||(vt("Adding map entry for "+(0,f1.endpointToString)(s)),this.entryMap.set(s,{counter:new g1,currentEjectionTimestamp:null,ejectionTimeMultiplier:0,subchannelWrappers:[]}));this.entryMap.deleteMissing(e);let i=t.getChildPolicy();if(this.childBalancer.updateAddressList(e,i,n),t.getSuccessRateEjectionConfig()||t.getFailurePercentageEjectionConfig())if(this.timerStartTime){vt("Previous timer existed. Replacing timer"),clearTimeout(this.ejectionTimer);let s=t.getIntervalMs()-(new Date().getTime()-this.timerStartTime.getTime());this.startTimer(s)}else vt("Starting new timer"),this.timerStartTime=new Date,this.startTimer(t.getIntervalMs()),this.switchAllBuckets();else{vt("Counting disabled. Cancelling timer."),this.timerStartTime=null,clearTimeout(this.ejectionTimer);for(let s of this.entryMap.values())this.uneject(s),s.ejectionTimeMultiplier=0}this.latestConfig=t}exitIdle(){this.childBalancer.exitIdle()}resetBackoff(){this.childBalancer.resetBackoff()}destroy(){clearTimeout(this.ejectionTimer),this.childBalancer.destroy()}getTypeName(){return v1}};Hi.OutlierDetectionLoadBalancer=Ah;function qH(){NH&&(0,TP.registerLoadBalancerType)(v1,Ah,Xl)}Hi.setup=qH});var Gi=m(W=>{"use strict";Object.defineProperty(W,"__esModule",{value:!0});W.experimental=W.ServerInterceptingCall=W.ResponderBuilder=W.ServerListenerBuilder=W.addAdminServicesToServer=W.getChannelzHandlers=W.getChannelzServiceDefinition=W.InterceptorConfigurationError=W.InterceptingCall=W.RequesterBuilder=W.ListenerBuilder=W.StatusBuilder=W.getClientChannel=W.ServerCredentials=W.Server=W.setLogVerbosity=W.setLogger=W.load=W.loadObject=W.CallCredentials=W.ChannelCredentials=W.waitForClientReady=W.closeClient=W.Channel=W.makeGenericClientConstructor=W.makeClientConstructor=W.loadPackageDefinition=W.Client=W.compressionAlgorithms=W.propagate=W.connectivityState=W.status=W.logVerbosity=W.Metadata=W.credentials=void 0;var wh=uv();Object.defineProperty(W,"CallCredentials",{enumerable:!0,get:function(){return wh.CallCredentials}});var LH=Gv();Object.defineProperty(W,"Channel",{enumerable:!0,get:function(){return LH.ChannelImplementation}});var BH=a_();Object.defineProperty(W,"compressionAlgorithms",{enumerable:!0,get:function(){return BH.CompressionAlgorithms}});var FH=Er();Object.defineProperty(W,"connectivityState",{enumerable:!0,get:function(){return FH.ConnectivityState}});var Eh=Al();Object.defineProperty(W,"ChannelCredentials",{enumerable:!0,get:function(){return Eh.ChannelCredentials}});var xP=Hv();Object.defineProperty(W,"Client",{enumerable:!0,get:function(){return xP.Client}});var b1=ve();Object.defineProperty(W,"logVerbosity",{enumerable:!0,get:function(){return b1.LogVerbosity}});Object.defineProperty(W,"status",{enumerable:!0,get:function(){return b1.Status}});Object.defineProperty(W,"propagate",{enumerable:!0,get:function(){return b1.Propagate}});var OP=Fe(),_1=Wv();Object.defineProperty(W,"loadPackageDefinition",{enumerable:!0,get:function(){return _1.loadPackageDefinition}});Object.defineProperty(W,"makeClientConstructor",{enumerable:!0,get:function(){return _1.makeClientConstructor}});Object.defineProperty(W,"makeGenericClientConstructor",{enumerable:!0,get:function(){return _1.makeClientConstructor}});var UH=Pt();Object.defineProperty(W,"Metadata",{enumerable:!0,get:function(){return UH.Metadata}});var jH=tP();Object.defineProperty(W,"Server",{enumerable:!0,get:function(){return jH.Server}});var zH=ih();Object.defineProperty(W,"ServerCredentials",{enumerable:!0,get:function(){return zH.ServerCredentials}});var HH=rP();Object.defineProperty(W,"StatusBuilder",{enumerable:!0,get:function(){return HH.StatusBuilder}});W.credentials={combineChannelCredentials:(r,...e)=>e.reduce((t,n)=>t.compose(n),r),combineCallCredentials:(r,...e)=>e.reduce((t,n)=>t.compose(n),r),createInsecure:Eh.ChannelCredentials.createInsecure,createSsl:Eh.ChannelCredentials.createSsl,createFromSecureContext:Eh.ChannelCredentials.createFromSecureContext,createFromMetadataGenerator:wh.CallCredentials.createFromMetadataGenerator,createFromGoogleCredential:wh.CallCredentials.createFromGoogleCredential,createEmpty:wh.CallCredentials.createEmpty};var GH=r=>r.close();W.closeClient=GH;var VH=(r,e,t)=>r.waitForReady(e,t);W.waitForClientReady=VH;var WH=(r,e)=>{throw new Error("Not available in this library. Use @grpc/proto-loader and loadPackageDefinition instead")};W.loadObject=WH;var KH=(r,e,t)=>{throw new Error("Not available in this library. Use @grpc/proto-loader and loadPackageDefinition instead")};W.load=KH;var QH=r=>{OP.setLogger(r)};W.setLogger=QH;var JH=r=>{OP.setLoggerVerbosity(r)};W.setLogVerbosity=JH;var $H=r=>xP.Client.prototype.getChannel.call(r);W.getClientChannel=$H;var Sh=Uv();Object.defineProperty(W,"ListenerBuilder",{enumerable:!0,get:function(){return Sh.ListenerBuilder}});Object.defineProperty(W,"RequesterBuilder",{enumerable:!0,get:function(){return Sh.RequesterBuilder}});Object.defineProperty(W,"InterceptingCall",{enumerable:!0,get:function(){return Sh.InterceptingCall}});Object.defineProperty(W,"InterceptorConfigurationError",{enumerable:!0,get:function(){return Sh.InterceptorConfigurationError}});var IP=Ys();Object.defineProperty(W,"getChannelzServiceDefinition",{enumerable:!0,get:function(){return IP.getChannelzServiceDefinition}});Object.defineProperty(W,"getChannelzHandlers",{enumerable:!0,get:function(){return IP.getChannelzHandlers}});var YH=$d();Object.defineProperty(W,"addAdminServicesToServer",{enumerable:!0,get:function(){return YH.addAdminServicesToServer}});var A1=W_();Object.defineProperty(W,"ServerListenerBuilder",{enumerable:!0,get:function(){return A1.ServerListenerBuilder}});Object.defineProperty(W,"ResponderBuilder",{enumerable:!0,get:function(){return A1.ResponderBuilder}});Object.defineProperty(W,"ServerInterceptingCall",{enumerable:!0,get:function(){return A1.ServerInterceptingCall}});var ZH=n1();W.experimental=ZH;var XH=Jb(),eG=pP(),tG=bP(),rG=uh(),nG=EP(),iG=CP(),sG=Ys();XH.setup(),eG.setup(),tG.setup(),rG.setup(),nG.setup(),iG.setup(),sG.setup()});var PP=m(Th=>{"use strict";Object.defineProperty(Th,"__esModule",{value:!0});Th.Metadata=void 0;Th.Metadata=function(e){let t=new Map,n={set(i,s){if(i=La(i),Array.isArray(s))if(s.length===0)t.delete(i);else{for(let o of s)w1(i,o);t.set(i,i.endsWith("-bin")?s:[s.join(", ")])}else w1(i,s),t.set(i,[s]);return n},append(i,s){i=La(i),w1(i,s);let o=t.get(i);return o==null&&(o=[],t.set(i,o)),o.push(s),i.endsWith("-bin")||t.set(i,[o.join(", ")]),n},delete(i){i=La(i),t.delete(i)},get(i){var s;return i=La(i),(s=t.get(i))===null||s===void 0?void 0:s[0]},getAll(i){var s;return i=La(i),(s=t.get(i))!==null&&s!==void 0?s:[]},has(i){return i=La(i),t.has(i)},[Symbol.iterator](){return t[Symbol.iterator]()}};if(e!=null){let i=oG(e)?e:Object.entries(e);for(let[s,o]of i)n.set(s,o)}return n};function La(r){return r.toLowerCase()}function w1(r,e){if(!/^[0-9a-z_.-]+$/.test(r))throw new Error(`Metadata key '${r}' contains illegal characters`);if(r.endsWith("-bin")){if(!(e instanceof Uint8Array))throw new Error(`Metadata key '${r}' ends with '-bin', thus it must have binary value`)}else{if(typeof e!="string")throw new Error(`Metadata key '${r}' doesn't end with '-bin', thus it must have string value`);if(!/^[ -~]*$/.test(e))throw new Error(`Metadata value '${e}' of key '${r}' contains illegal characters`)}}function oG(r){return Symbol.iterator in r}});var Ch=m(eu=>{"use strict";Object.defineProperty(eu,"__esModule",{value:!0});eu.Status=void 0;var aG;(function(r){r[r.OK=0]="OK",r[r.CANCELLED=1]="CANCELLED",r[r.UNKNOWN=2]="UNKNOWN",r[r.INVALID_ARGUMENT=3]="INVALID_ARGUMENT",r[r.DEADLINE_EXCEEDED=4]="DEADLINE_EXCEEDED",r[r.NOT_FOUND=5]="NOT_FOUND",r[r.ALREADY_EXISTS=6]="ALREADY_EXISTS",r[r.PERMISSION_DENIED=7]="PERMISSION_DENIED",r[r.RESOURCE_EXHAUSTED=8]="RESOURCE_EXHAUSTED",r[r.FAILED_PRECONDITION=9]="FAILED_PRECONDITION",r[r.ABORTED=10]="ABORTED",r[r.OUT_OF_RANGE=11]="OUT_OF_RANGE",r[r.UNIMPLEMENTED=12]="UNIMPLEMENTED",r[r.INTERNAL=13]="INTERNAL",r[r.UNAVAILABLE=14]="UNAVAILABLE",r[r.DATA_LOSS=15]="DATA_LOSS",r[r.UNAUTHENTICATED=16]="UNAUTHENTICATED"})(aG=eu.Status||(eu.Status={}))});var RP=m(kP=>{"use strict";Object.defineProperty(kP,"__esModule",{value:!0})});var MP=m(NP=>{"use strict";Object.defineProperty(NP,"__esModule",{value:!0})});var qP=m(DP=>{"use strict";Object.defineProperty(DP,"__esModule",{value:!0})});var LP=m(xh=>{"use strict";Object.defineProperty(xh,"__esModule",{value:!0});xh.composeClientMiddleware=void 0;function cG(r,e){return(t,n)=>e(Object.assign(Object.assign({},t),{next:(i,s)=>r(Object.assign(Object.assign({},t),{request:i}),s)}),n)}xh.composeClientMiddleware=cG});var E1={};dl(E1,{ExtendableError:()=>Oh,default:()=>lG});var Oh,lG,S1=ee(()=>{"use strict";Oh=class extends Error{constructor(...e){super(...e);var t=e.length>0&&typeof e[0]=="string"?e[0]:"";(this.name===void 0||this.name==="Error")&&Object.defineProperty(this,"name",{configurable:!0,enumerable:!1,value:this.constructor.name,writable:!0}),Object.defineProperty(this,"message",{configurable:!0,enumerable:!1,value:t,writable:!0}),Object.defineProperty(this,"stack",{configurable:!0,enumerable:!1,value:"",writable:!0}),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack===""&&(this.stack=new Error(t).stack)}},lG=Oh});var BP=m(Ih=>{"use strict";Object.defineProperty(Ih,"__esModule",{value:!0});Ih.ClientError=void 0;var uG=(S1(),sn(E1)),dG=Ch(),T1=class r extends uG.ExtendableError{constructor(e,t,n){super(`${e} ${dG.Status[t]}: ${n}`),this.path=e,this.code=t,this.details=n,this.name="ClientError",Object.defineProperty(this,"@@nice-grpc",{value:!0}),Object.defineProperty(this,"@@nice-grpc:ClientError",{value:!0})}static[Symbol.hasInstance](e){return this!==r?this.prototype.isPrototypeOf(e):typeof e=="object"&&e!==null&&(e.constructor===r||e["@@nice-grpc:ClientError"]===!0||e.name==="ClientError"&&e["@@nice-grpc"]===!0)}};Ih.ClientError=T1});var UP=m(FP=>{"use strict";Object.defineProperty(FP,"__esModule",{value:!0})});var zP=m(jP=>{"use strict";Object.defineProperty(jP,"__esModule",{value:!0})});var HP=m(Ph=>{"use strict";Object.defineProperty(Ph,"__esModule",{value:!0});Ph.composeServerMiddleware=void 0;function fG(r,e){return(t,n)=>r(Object.assign(Object.assign({},t),{next:(i,s)=>e(Object.assign(Object.assign({},t),{request:i}),s)}),n)}Ph.composeServerMiddleware=fG});var GP=m(kh=>{"use strict";Object.defineProperty(kh,"__esModule",{value:!0});kh.ServerError=void 0;var hG=(S1(),sn(E1)),pG=Ch(),C1=class r extends hG.ExtendableError{constructor(e,t){super(`${pG.Status[e]}: ${t}`),this.code=e,this.details=t,this.name="ServerError",Object.defineProperty(this,"@@nice-grpc",{value:!0}),Object.defineProperty(this,"@@nice-grpc:ServerError",{value:!0})}static[Symbol.hasInstance](e){return this!==r?this.prototype.isPrototypeOf(e):typeof e=="object"&&e!==null&&(e.constructor===r||e["@@nice-grpc:ServerError"]===!0||e.name==="ServerError"&&e["@@nice-grpc"]===!0)}};kh.ServerError=C1});var Gt=m(bt=>{"use strict";var mG=bt&&bt.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(r,n,i)}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),Wr=bt&&bt.__exportStar||function(r,e){for(var t in r)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&mG(e,r,t)};Object.defineProperty(bt,"__esModule",{value:!0});Wr(PP(),bt);Wr(Ch(),bt);Wr(RP(),bt);Wr(MP(),bt);Wr(qP(),bt);Wr(LP(),bt);Wr(BP(),bt);Wr(UP(),bt);Wr(zP(),bt);Wr(HP(),bt);Wr(GP(),bt)});var VP=m(Rh=>{"use strict";Object.defineProperty(Rh,"__esModule",{value:!0});Rh.fromGrpcJsServiceDefinition=gG;Rh.isGrpcJsServiceDefinition=yG;function gG(r){let e={};for(let[t,n]of Object.entries(r))e[t]={path:n.path,requestStream:n.requestStream,responseStream:n.responseStream,requestDeserialize:i=>n.requestDeserialize(Buffer.from(i)),requestSerialize:n.requestSerialize,responseDeserialize:i=>n.responseDeserialize(Buffer.from(i)),responseSerialize:n.responseSerialize,options:{}};return e}function yG(r){return Object.values(r).every(e=>typeof e=="object"&&e!=null&&typeof e.path=="string")}});var WP=m(Nh=>{"use strict";Object.defineProperty(Nh,"__esModule",{value:!0});Nh.fromTsProtoServiceDefinition=vG;Nh.isTsProtoServiceDefinition=bG;function vG(r){let e={};for(let[t,n]of Object.entries(r.methods)){let i=n.requestType.encode,s=n.requestType.fromPartial,o=n.responseType.encode,a=n.responseType.fromPartial;e[t]={path:`/${r.fullName}/${n.name}`,requestStream:n.requestStream,responseStream:n.responseStream,requestDeserialize:n.requestType.decode,requestSerialize:s!=null?c=>i(s(c)).finish():c=>i(c).finish(),responseDeserialize:n.responseType.decode,responseSerialize:a!=null?c=>o(a(c)).finish():c=>o(c).finish(),options:n.options}}return e}function bG(r){return"name"in r&&"fullName"in r&&"methods"in r}});var io=m(tu=>{"use strict";Object.defineProperty(tu,"__esModule",{value:!0});tu.normalizeServiceDefinition=_G;tu.toGrpcJsServiceDefinition=AG;tu.toGrpcJsMethodDefinition=JP;var KP=VP(),QP=WP();function _G(r){return(0,KP.isGrpcJsServiceDefinition)(r)?(0,KP.fromGrpcJsServiceDefinition)(r):(0,QP.isTsProtoServiceDefinition)(r)?(0,QP.fromTsProtoServiceDefinition)(r):r}function AG(r){let e={};for(let[t,n]of Object.entries(r))e[t]=JP(n);return e}function JP(r){return{path:r.path,requestStream:r.requestStream,responseStream:r.responseStream,requestDeserialize:r.requestDeserialize,requestSerialize:e=>Buffer.from(r.requestSerialize(e)),responseDeserialize:r.responseDeserialize,responseSerialize:e=>Buffer.from(r.responseSerialize(e))}}});function dr(r){return typeof r=="object"&&r!==null&&r.name==="AbortError"}function wG(r){if(r.aborted)throw new Vt}function x1(r){if(dr(r))throw r}function so(r){if(!dr(r))throw r}var Vt,Jn=ee(()=>{"use strict";Vt=class extends Error{constructor(){super("The operation has been aborted"),this.message="The operation has been aborted",this.name="AbortError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,this.constructor)}}});function Kr(r,e){return new Promise((t,n)=>{if(r.aborted){n(new Vt);return}let i,s=!1;function o(){s||(s=!0,i?.())}let a=e(c=>{t(c),o()},c=>{n(c),o()});if(!s){let c=()=>{let l=a();l==null?n(new Vt):l.then(()=>{n(new Vt)},u=>{n(u)}),o()};r.addEventListener("abort",c),i=()=>{r.removeEventListener("abort",c)}}})}var oo=ee(()=>{"use strict";Jn()});function EG(r,e){if(r.aborted){let t=()=>{};e.then(t,t)}return Kr(r,(t,n)=>(e.then(t,n),()=>{}))}var $P=ee(()=>{"use strict";oo()});function ru(r,e){return Kr(r,t=>{let n=typeof e=="number"?e:e.getTime()-Date.now(),i=setTimeout(t,n);return()=>{clearTimeout(i)}})}var Mh=ee(()=>{"use strict";oo()});function SG(r){return Kr(r,()=>()=>{})}var YP=ee(()=>{"use strict";oo()});function TG(r,e,t,n){return Kr(r,i=>{let s,o=!1;return s=CG(e,t,(...c)=>{i(c.length>1?c:c[0]),o=!0,s?.()},n),o&&s(),()=>{o=!0,s?.()}})}function CG(r,e,t,n){if(IG(r))return r.addEventListener(e,t,n),()=>r.removeEventListener(e,t,n);if(OG(r))return r.on(e,t),()=>r.off(e,t);if(xG(r))return r.addListener(e,t),()=>r.removeListener(e,t);throw new Error("Invalid event target")}function xG(r){return Ba(r.addListener)&&Ba(r.removeListener)}function OG(r){return Ba(r.on)&&Ba(r.off)}function IG(r){return Ba(r.addEventListener)&&Ba(r.removeEventListener)}var Ba,ZP=ee(()=>{"use strict";oo();Ba=r=>typeof r=="function"});function PG(r,e){return new Promise((t,n)=>{if(r.aborted){n(new Vt);return}let i=new AbortController,s=e(i.signal);if(s.length===0){t([]);return}let o=()=>{i.abort()};r.addEventListener("abort",o);let a,c=new Array(s.length),l=0;function u(){l+=1,l===s.length&&(r.removeEventListener("abort",o),a!=null?n(a.reason):t(c))}for(let[d,f]of s.entries())f.then(h=>{c[d]=h,u()},h=>{i.abort(),(a==null||!dr(h)&&dr(a.reason))&&(a={reason:h}),u()})})}var XP=ee(()=>{"use strict";Jn()});function kG(r,e){return new Promise((t,n)=>{if(r.aborted){n(new Vt);return}let i=new AbortController,s=e(i.signal),o=()=>{i.abort()};r.addEventListener("abort",o);let a=0;function c(u){i.abort(),a+=1,a===s.length&&(r.removeEventListener("abort",o),u.status==="fulfilled"?t(u.value):n(u.reason))}let l;for(let u of s)u.then(d=>{l==null&&(l={status:"fulfilled",value:d}),c(l)},d=>{(l==null||!dr(d)&&(l.status==="fulfilled"||dr(l.reason)))&&(l={status:"rejected",reason:d}),c(l)})})}var ek=ee(()=>{"use strict";Jn()});async function RG(r,e,t={}){let{baseMs:n=1e3,maxDelayMs:i=3e4,onError:s,maxAttempts:o=1/0}=t,a=0,c=()=>{a=-1};for(;;)try{return await e(r,a,c)}catch(l){if(x1(l),a>=o)throw l;let u;if(a===-1)u=0;else{let d=Math.min(i,Math.pow(2,a)*n);u=Math.round(d*(1+Math.random())/2)}s&&s(l,a,u),u!==0&&await ru(r,u),a+=1}}var tk=ee(()=>{"use strict";Mh();Jn()});function NG(r,e){if(r.aborted)return Promise.reject(new Vt);let t=[],n=new AbortController,i=n.signal,s=()=>{n.abort()};r.addEventListener("abort",s);let o=()=>{r.removeEventListener("abort",s)},a=new Set,c=()=>{for(let d of a)d.abort()};i.addEventListener("abort",c);let l=()=>{i.removeEventListener("abort",c)},u=new Promise((d,f)=>{let h,g;p(b=>e(b,{defer(y){t.push(y)},fork:p})).join().then(b=>{n.abort(),h={value:b}},b=>{n.abort(),(!dr(b)||g==null)&&(g={error:b})});function p(b){if(i.aborted)return{abort(){},async join(){throw new Vt}};let y=new AbortController,A=y.signal,E=b(A),C={abort(){y.abort()},join:()=>E};return a.add(C),E.catch(so).catch(k=>{g={error:k},n.abort()}).finally(()=>{a.delete(C),a.size===0&&(g!=null?f(g.error):d(h.value))}),C}});return u=u.finally(()=>{o(),l();let d=Promise.resolve();for(let f=t.length-1;f>=0;f--)d=d.finally(t[f]);return d}),u}var rk=ee(()=>{"use strict";Jn()});function MG(r){let e=new AbortController,t=r(e.signal).catch(so);return()=>(e.abort(),t)}var nk=ee(()=>{"use strict";Jn()});function DG(r,e,t={}){let{baseMs:n=1e3,onError:i,maxAttempts:s=1/0}=t;return Kr(r,(o,a)=>{let c=new AbortController,l=!1,u=new Map;function d(g){c.abort(),u.clear(),o(g)}function f(g,p){if(u.delete(p),l&&u.size===0){a(g);return}if(!dr(g)&&i)try{i(g,p)}catch(b){c.abort(),u.clear(),a(b)}}async function h(g){for(let p=0;;p++){let b=e(g,p);if(u.set(p,b),b.then(d,E=>f(E,p)),p+1>=s)break;let y=Math.pow(2,p)*n,A=Math.round(y*(1+Math.random())/2);await ru(g,A)}l=!0}return h(c.signal).catch(so),()=>{c.abort()}})}var ik=ee(()=>{"use strict";Jn();Mh();oo()});var Vi={};dl(Vi,{AbortError:()=>Vt,abortable:()=>EG,all:()=>PG,catchAbortError:()=>so,delay:()=>ru,execute:()=>Kr,forever:()=>SG,isAbortError:()=>dr,proactiveRetry:()=>DG,race:()=>kG,rethrowAbortError:()=>x1,retry:()=>RG,run:()=>MG,spawn:()=>NG,throwIfAborted:()=>wG,waitForEvent:()=>TG});var Wi=ee(()=>{"use strict";$P();Jn();Mh();oo();YP();ZP();XP();ek();tk();rk();nk();ik()});var En=m(wn=>{"use strict";var qG=wn&&wn.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(r,n,i)}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),LG=wn&&wn.__setModuleDefault||(Object.create?function(r,e){Object.defineProperty(r,"default",{enumerable:!0,value:e})}:function(r,e){r.default=e}),BG=wn&&wn.__importStar||function(r){if(r&&r.__esModule)return r;var e={};if(r!=null)for(var t in r)t!=="default"&&Object.prototype.hasOwnProperty.call(r,t)&&qG(e,r,t);return LG(e,r),e};Object.defineProperty(wn,"__esModule",{value:!0});wn.convertMetadataToGrpcJs=jG;wn.convertMetadataFromGrpcJs=zG;var FG=BG(Gi()),UG=Gt();function jG(r){let e=new FG.Metadata;for(let[t,n]of r)for(let i of n)e.add(t,typeof i=="string"?i:Buffer.from(i));return e}function zG(r){let e=(0,UG.Metadata)();for(let t of Object.keys(r.getMap())){let n=r.get(t);e.set(t,n)}return e}});var $n=m(O1=>{"use strict";Object.defineProperty(O1,"__esModule",{value:!0});O1.isAsyncIterable=HG;function HG(r){return r!=null&&Symbol.asyncIterator in r}});var nu=m(I1=>{"use strict";Object.defineProperty(I1,"__esModule",{value:!0});I1.readableToAsyncIterable=VG;var sk=!1;function GG(r){if(sk)return!0;let e=r&&typeof r=="object"&&"errored"in r&&"errorEmitted"in r&&"endEmitted"in r&&"closeEmitted"in r&&typeof r.errorEmitted=="boolean"&&typeof r.endEmitted=="boolean"&&typeof r.closeEmitted=="boolean";return sk=e,e}async function*VG(r){let e=ok;function t(c){this===r?(e(),e=ok):e=c}let n=r._readableState;if(!GG(n))throw new Error("nice-grpc: _readableState members incompatible");let i=n.errored,s=n.errorEmitted,o=n.endEmitted,a=n.closeEmitted;for(r.on("readable",t).on("error",function(c){i=c,s=!0,t.call(this)}).on("end",function(){o=!0,t.call(this)}).on("close",function(){a=!0,t.call(this)});;){let c=r.destroyed?null:r.read();if(c!==null)yield c;else{if(s)throw i;if(o)break;if(a)break;await new Promise(t)}}}var ok=()=>{}});var iu=m(P1=>{"use strict";Object.defineProperty(P1,"__esModule",{value:!0});P1.createCallContext=WG;var ak=Gt(),ck=En();function WG(r){let e=new AbortController,t={signal:e.signal,cancel(){e.abort()}},n=(0,ak.Metadata)(),i=(0,ak.Metadata)();r.cancelled?(t.cancel?.(),t.cancel=void 0):(r.on("close",()=>{t.cancel=void 0}),r.on("finish",()=>{t.cancel=void 0}),r.on("cancelled",()=>{t.cancel?.(),t.cancel=void 0}));let s=!1;return{context:{metadata:(0,ck.convertMetadataFromGrpcJs)(r.metadata),peer:r.getPeer(),header:n,sendHeader(){s||(r.sendMetadata((0,ck.convertMetadataToGrpcJs)(n)),s=!0)},trailer:i,signal:t.signal},maybeCancel:t}}});var su=m(k1=>{"use strict";Object.defineProperty(k1,"__esModule",{value:!0});k1.createErrorStatusObject=JG;var lk=Gi(),KG=(Wi(),sn(Vi)),QG=Gt();function JG(r,e,t){return e instanceof QG.ServerError?{code:e.code,details:e.details,metadata:t}:(0,KG.isAbortError)(e)?{code:lk.status.CANCELLED,details:"The operation was cancelled",metadata:t}:(process.emitWarning(`${r}: Uncaught error in server implementation method. Server methods should only throw ServerError or AbortError. ${e instanceof Error?e.stack:e}`),{code:lk.status.UNKNOWN,details:"Unknown server error occurred",metadata:t})}});var fk=m(R1=>{"use strict";Object.defineProperty(R1,"__esModule",{value:!0});R1.createBidiStreamingMethodHandler=eV;var uk=(Wi(),sn(Vi)),dk=En(),$G=$n(),YG=nu(),ZG=iu(),XG=su();function eV(r,e,t){let n={path:r.path,requestStream:r.requestStream,responseStream:r.responseStream,options:r.options};async function*i(o,a){if(!(0,$G.isAsyncIterable)(o))throw new Error("A middleware passed invalid request to next(): expected a single message for bidirectional streaming method");yield*e(o,a)}let s=t==null?i:(o,a)=>t({method:n,requestStream:!0,request:o,responseStream:!0,next:i},a);return o=>{let{context:a,maybeCancel:c}=(0,ZG.createCallContext)(o);Promise.resolve().then(async()=>{let u=s((0,YG.readableToAsyncIterable)(o),a)[Symbol.asyncIterator]();try{let d=await u.next();for(;;){if(!d.done){try{a.sendHeader(),o.write(d.value)||await(0,uk.waitForEvent)(a.signal,o,"drain")}catch(f){d=(0,uk.isAbortError)(f)?await u.return():await u.throw(f);continue}d=await u.next();continue}if(d.value!=null){d=await u.throw(new Error("A middleware returned a message, but expected to return void for bidirectional streaming method"));continue}break}}finally{c.cancel=void 0,a.sendHeader()}}).then(()=>{o.end((0,dk.convertMetadataToGrpcJs)(a.trailer))},l=>{o.emit("error",(0,XG.createErrorStatusObject)(r.path,l,(0,dk.convertMetadataToGrpcJs)(a.trailer)))})}}});var pk=m(N1=>{"use strict";Object.defineProperty(N1,"__esModule",{value:!0});N1.createClientStreamingMethodHandler=sV;var hk=En(),tV=$n(),rV=nu(),nV=iu(),iV=su();function sV(r,e,t){let n={path:r.path,requestStream:r.requestStream,responseStream:r.responseStream,options:r.options};async function*i(o,a){if(!(0,tV.isAsyncIterable)(o))throw new Error("A middleware passed invalid request to next(): expected a single message for client streaming method");return await e(o,a)}let s=t==null?i:(o,a)=>t({method:n,requestStream:!0,request:o,responseStream:!1,next:i},a);return(o,a)=>{let{context:c,maybeCancel:l}=(0,nV.createCallContext)(o);Promise.resolve().then(async()=>{let d=s((0,rV.readableToAsyncIterable)(o),c)[Symbol.asyncIterator]();try{let f=await d.next();for(;;){if(!f.done){f=await d.throw(new Error("A middleware yielded a message, but expected to only return a message for client streaming method"));continue}if(f.value==null){f=await d.throw(new Error("A middleware returned void, but expected to return a message for client streaming method"));continue}return f.value}}finally{l.cancel=void 0,c.sendHeader()}}).then(u=>{a(null,u,(0,hk.convertMetadataToGrpcJs)(c.trailer))},u=>{a((0,iV.createErrorStatusObject)(r.path,u,(0,hk.convertMetadataToGrpcJs)(c.trailer)))})}}});var yk=m(M1=>{"use strict";Object.defineProperty(M1,"__esModule",{value:!0});M1.createServerStreamingMethodHandler=lV;var mk=(Wi(),sn(Vi)),gk=En(),oV=$n(),aV=iu(),cV=su();function lV(r,e,t){let n={path:r.path,requestStream:r.requestStream,responseStream:r.responseStream,options:r.options};async function*i(o,a){if((0,oV.isAsyncIterable)(o))throw new Error("A middleware passed invalid request to next(): expected a single message for server streaming method");yield*e(o,a)}let s=t==null?i:(o,a)=>t({method:n,requestStream:!1,request:o,responseStream:!0,next:i},a);return o=>{let{context:a,maybeCancel:c}=(0,aV.createCallContext)(o);Promise.resolve().then(async()=>{let u=s(o.request,a)[Symbol.asyncIterator]();try{let d=await u.next();for(;;){if(!d.done){try{a.sendHeader(),o.write(d.value)||await(0,mk.waitForEvent)(a.signal,o,"drain")}catch(f){d=(0,mk.isAbortError)(f)?await u.return():await u.throw(f);continue}d=await u.next();continue}if(d.value!=null){d=await u.throw(new Error("A middleware returned a message, but expected to return void for server streaming method"));continue}break}}finally{c.cancel=void 0,a.sendHeader()}}).then(()=>{o.end((0,gk.convertMetadataToGrpcJs)(a.trailer))},l=>{o.emit("error",(0,cV.createErrorStatusObject)(r.path,l,(0,gk.convertMetadataToGrpcJs)(a.trailer)))})}}});var bk=m(D1=>{"use strict";Object.defineProperty(D1,"__esModule",{value:!0});D1.createUnaryMethodHandler=hV;var vk=En(),uV=$n(),dV=iu(),fV=su();function hV(r,e,t){let n={path:r.path,requestStream:r.requestStream,responseStream:r.responseStream,options:r.options};async function*i(o,a){if((0,uV.isAsyncIterable)(o))throw new Error("A middleware passed invalid request to next(): expected a single message for unary method");return await e(o,a)}let s=t==null?i:(o,a)=>t({method:n,requestStream:!1,request:o,responseStream:!1,next:i},a);return(o,a)=>{let{context:c,maybeCancel:l}=(0,dV.createCallContext)(o);Promise.resolve().then(async()=>{let d=s(o.request,c)[Symbol.asyncIterator]();try{let f=await d.next();for(;;){if(!f.done){f=await d.throw(new Error("A middleware yielded a message, but expected to only return a message for unary method"));continue}if(f.value==null){f=await d.throw(new Error("A middleware returned void, but expected to return a message for unary method"));continue}return f.value}}finally{l.cancel=void 0,c.sendHeader()}}).then(u=>{a(null,u,(0,vk.convertMetadataToGrpcJs)(c.trailer))},u=>{a((0,fV.createErrorStatusObject)(r.path,u,(0,vk.convertMetadataToGrpcJs)(c.trailer)))})}}});var Sk=m(q1=>{"use strict";Object.defineProperty(q1,"__esModule",{value:!0});q1.createServer=vV;var _k=Gi(),Ak=Gt(),wk=io(),pV=fk(),mV=pk(),gV=yk(),yV=bk();function vV(r={}){return Ek(r)}function Ek(r,e){let t=[],n;function i(s){return{with(o){return i(s==null?o:(0,Ak.composeServerMiddleware)(s,o))},add(o,a){if(n!=null)throw new Error("server.add() must be used before listen()");t.push({definition:(0,wk.normalizeServiceDefinition)(o),middleware:s,implementation:a})}}}return{use(s){if(n!=null)throw new Error("server.use() must be used before listen()");if(t.length>0)throw new Error("server.use() must be used before adding any services");return Ek(r,e==null?s:(0,Ak.composeServerMiddleware)(e,s))},...i(e),async listen(s,o){if(n!=null)throw new Error("server.listen() has already been called");n=new _k.Server(r);for(let{definition:c,middleware:l,implementation:u}of t){let d={};for(let[f,h]of Object.entries(c)){let g=u[f].bind(u);h.requestStream?h.responseStream?d[f]=(0,pV.createBidiStreamingMethodHandler)(h,g,l):d[f]=(0,mV.createClientStreamingMethodHandler)(h,g,l):h.responseStream?d[f]=(0,gV.createServerStreamingMethodHandler)(h,g,l):d[f]=(0,yV.createUnaryMethodHandler)(h,g,l)}n.addService((0,wk.toGrpcJsServiceDefinition)(c),d)}return await new Promise((c,l)=>{n.bindAsync(s,o??_k.ServerCredentials.createInsecure(),(u,d)=>{u!=null?(n=void 0,l(u)):c(d)})})},async shutdown(){n!=null&&(await new Promise((s,o)=>{n.tryShutdown(a=>{a!=null?o(a):s()})}),n=void 0)},forceShutdown(){n!=null&&(n.forceShutdown(),n=void 0)}}}});var Ck=m(Tk=>{"use strict";Object.defineProperty(Tk,"__esModule",{value:!0})});var xk=m(qh=>{"use strict";Object.defineProperty(qh,"__esModule",{value:!0});qh.createChannel=_V;qh.waitForChannelReady=AV;var Dh=Gi(),bV=new Set(["http","https"]);function _V(r,e,t={}){let n=/^(?:([^:]+):\/\/)?(.*?)(?::(\d+))?$/.exec(r);if(n==null)throw new Error(`Invalid address: '${r}'`);let[,i,s,o]=n,a=!i||bV.has(i),c=e?._isSecure()||i?.includes("https");e??(e=c?Dh.ChannelCredentials.createSsl():Dh.ChannelCredentials.createInsecure()),o??(o=c?"443":"80");let l=a?`${s}:${o}`:r;return new Dh.Channel(l,e,t)}async function AV(r,e){for(;;){let t=r.getConnectivityState(!0);if(t===Dh.connectivityState.READY)return;await new Promise((n,i)=>{r.watchConnectivityState(t,e,s=>{s!=null?i(s):n()})})}}});var ou=m(L1=>{"use strict";Object.defineProperty(L1,"__esModule",{value:!0});L1.wrapClientError=SV;var wV=Gt(),EV=Gi();function SV(r,e){return TV(r)?new wV.ClientError(e,r.code,r.details):r}function TV(r){return typeof r=="object"&&r!==null&&typeof r.code=="number"&&typeof r.details=="string"&&r.metadata instanceof EV.Metadata}});var Ok=m(F1=>{"use strict";Object.defineProperty(F1,"__esModule",{value:!0});F1.createBidiStreamingMethod=kV;var Lh=(Wi(),sn(Vi)),CV=Gt(),xV=io(),B1=En(),OV=$n(),IV=nu(),PV=ou();function kV(r,e,t,n){let i=(0,xV.toGrpcJsMethodDefinition)(r),s={path:r.path,requestStream:r.requestStream,responseStream:r.responseStream,options:r.options};async function*o(c,l){if(!(0,OV.isAsyncIterable)(c))throw new Error("A middleware passed invalid request to next(): expected a single message for bidirectional streaming method");let{metadata:u=(0,CV.Metadata)(),onHeader:d,onTrailer:f}=l,h=l.signal??new AbortController().signal,g=new AbortController,p=e.makeBidiStreamRequest(i.path,i.requestSerialize,i.responseDeserialize,(0,B1.convertMetadataToGrpcJs)(u));p.on("metadata",A=>{d?.((0,B1.convertMetadataFromGrpcJs)(A))}),p.on("status",A=>{f?.((0,B1.convertMetadataFromGrpcJs)(A.metadata))});let b;RV(g.signal,c,p).then(()=>{p.end()},A=>{(0,Lh.isAbortError)(A)||(b=A,p.cancel())});let y=()=>{g.abort(),p.cancel()};h.addEventListener("abort",y);try{yield*(0,IV.readableToAsyncIterable)(p)}catch(A){throw(0,PV.wrapClientError)(A,r.path)}finally{if(g.abort(),h.removeEventListener("abort",y),(0,Lh.throwIfAborted)(h),p.cancel(),b)throw b}}let a=t==null?o:(c,l)=>t({method:s,requestStream:!0,request:c,responseStream:!0,next:o},l);return(c,l)=>{let d=a(c,{...n,...l})[Symbol.asyncIterator]();return{[Symbol.asyncIterator](){return{async next(){let f=await d.next();return f.done&&f.value!=null?await d.throw(new Error("A middleware returned a message, but expected to return void for bidirectional streaming method")):f},return(){return d.return()},throw(f){return d.throw(f)}}}}}}async function RV(r,e,t){for await(let n of e)(0,Lh.throwIfAborted)(r),t.write(n)||await(0,Lh.waitForEvent)(r,t,"drain")}});var Ik=m(j1=>{"use strict";Object.defineProperty(j1,"__esModule",{value:!0});j1.createClientStreamingMethod=LV;var Bh=(Wi(),sn(Vi)),NV=Gt(),MV=io(),U1=En(),DV=$n(),qV=ou();function LV(r,e,t,n){let i=(0,MV.toGrpcJsMethodDefinition)(r),s={path:r.path,requestStream:r.requestStream,responseStream:r.responseStream,options:r.options};async function*o(c,l){if(!(0,DV.isAsyncIterable)(c))throw new Error("A middleware passed invalid request to next(): expected a single message for client streaming method");let{metadata:u=(0,NV.Metadata)(),signal:d=new AbortController().signal,onHeader:f,onTrailer:h}=l;return await(0,Bh.execute)(d,(g,p)=>{let b=new AbortController,y=e.makeClientStreamRequest(i.path,i.requestSerialize,i.responseDeserialize,(0,U1.convertMetadataToGrpcJs)(u),(A,E)=>{b.abort(),A!=null?p((0,qV.wrapClientError)(A,r.path)):g(E)});return y.on("metadata",A=>{f?.((0,U1.convertMetadataFromGrpcJs)(A))}),y.on("status",A=>{h?.((0,U1.convertMetadataFromGrpcJs)(A.metadata))}),BV(b.signal,c,y).then(()=>{y.end()},A=>{(0,Bh.isAbortError)(A)||(p(A),y.cancel())}),()=>{b.abort(),y.cancel()}})}let a=t==null?o:(c,l)=>t({method:s,requestStream:!0,request:c,responseStream:!1,next:o},l);return async(c,l)=>{let d=a(c,{...n,...l})[Symbol.asyncIterator](),f=await d.next();for(;;){if(!f.done){f=await d.throw(new Error("A middleware yielded a message, but expected to only return a message for client streaming method"));continue}if(f.value==null){f=await d.throw(new Error("A middleware returned void, but expected to return a message for client streaming method"));continue}return f.value}}}async function BV(r,e,t){for await(let n of e)(0,Bh.throwIfAborted)(r),t.write(n)||await(0,Bh.waitForEvent)(r,t,"drain")}});var Pk=m(H1=>{"use strict";Object.defineProperty(H1,"__esModule",{value:!0});H1.createServerStreamingMethod=VV;var FV=(Wi(),sn(Vi)),UV=Gt(),jV=io(),z1=En(),zV=$n(),HV=nu(),GV=ou();function VV(r,e,t,n){let i=(0,jV.toGrpcJsMethodDefinition)(r),s={path:r.path,requestStream:r.requestStream,responseStream:r.responseStream,options:r.options};async function*o(c,l){if((0,zV.isAsyncIterable)(c))throw new Error("A middleware passed invalid request to next(): expected a single message for server streaming method");let{metadata:u=(0,UV.Metadata)(),onHeader:d,onTrailer:f}=l,h=l.signal??new AbortController().signal,g=e.makeServerStreamRequest(i.path,i.requestSerialize,i.responseDeserialize,c,(0,z1.convertMetadataToGrpcJs)(u));g.on("metadata",b=>{d?.((0,z1.convertMetadataFromGrpcJs)(b))}),g.on("status",b=>{f?.((0,z1.convertMetadataFromGrpcJs)(b.metadata))});let p=()=>{g.cancel()};h.addEventListener("abort",p);try{yield*(0,HV.readableToAsyncIterable)(g)}catch(b){throw(0,GV.wrapClientError)(b,r.path)}finally{h.removeEventListener("abort",p),(0,FV.throwIfAborted)(h),g.cancel()}}let a=t==null?o:(c,l)=>t({method:s,requestStream:!1,request:c,responseStream:!0,next:o},l);return(c,l)=>{let d=a(c,{...n,...l})[Symbol.asyncIterator]();return{[Symbol.asyncIterator](){return{async next(){let f=await d.next();return f.done&&f.value!=null?await d.throw(new Error("A middleware returned a message, but expected to return void for server streaming method")):f},return(){return d.return()},throw(f){return d.throw(f)}}}}}}});var kk=m(V1=>{"use strict";Object.defineProperty(V1,"__esModule",{value:!0});V1.createUnaryMethod=YV;var WV=(Wi(),sn(Vi)),KV=Gt(),QV=io(),G1=En(),JV=$n(),$V=ou();function YV(r,e,t,n){let i=(0,QV.toGrpcJsMethodDefinition)(r),s={path:r.path,requestStream:r.requestStream,responseStream:r.responseStream,options:r.options};async function*o(c,l){if((0,JV.isAsyncIterable)(c))throw new Error("A middleware passed invalid request to next(): expected a single message for unary method");let{metadata:u=(0,KV.Metadata)(),signal:d=new AbortController().signal,onHeader:f,onTrailer:h}=l;return await(0,WV.execute)(d,(g,p)=>{let b=e.makeUnaryRequest(i.path,i.requestSerialize,i.responseDeserialize,c,(0,G1.convertMetadataToGrpcJs)(u),(y,A)=>{y!=null?p((0,$V.wrapClientError)(y,r.path)):g(A)});return b.on("metadata",y=>{f?.((0,G1.convertMetadataFromGrpcJs)(y))}),b.on("status",y=>{h?.((0,G1.convertMetadataFromGrpcJs)(y.metadata))}),()=>{b.cancel()}})}let a=t==null?o:(c,l)=>t({method:s,requestStream:!1,request:c,responseStream:!1,next:o},l);return async(c,l)=>{let d=a(c,{...n,...l})[Symbol.asyncIterator](),f=await d.next();for(;;){if(!f.done){f=await d.throw(new Error("A middleware yielded a message, but expected to only return a message for unary method"));continue}if(f.value==null){f=await d.throw(new Error("A middleware returned void, but expected to return a message for unary method"));continue}return f.value}}}});var Mk=m(Fh=>{"use strict";Object.defineProperty(Fh,"__esModule",{value:!0});Fh.createClientFactory=Rk;Fh.createClient=sW;var ZV=Gi(),XV=Gt(),eW=io(),tW=Ok(),rW=Ik(),nW=Pk(),iW=kk();function Rk(){return Nk()}function sW(r,e,t){return Rk().create(r,e,t)}function Nk(r){return{use(e){return Nk(r==null?e:(0,XV.composeClientMiddleware)(r,e))},create(e,t,n={}){let i=(0,ZV.makeClientConstructor)({},""),s=new i("",null,{channelOverride:t}),o={},a=Object.entries((0,eW.normalizeServiceDefinition)(e));for(let[c,l]of a){let u={...n["*"],...n[c]};l.requestStream?l.responseStream?o[c]=(0,tW.createBidiStreamingMethod)(l,s,r,u):o[c]=(0,rW.createClientStreamingMethod)(l,s,r,u):l.responseStream?o[c]=(0,nW.createServerStreamingMethod)(l,s,r,u):o[c]=(0,iW.createUnaryMethod)(l,s,r,u)}return o}}}});var qk=m(Dk=>{"use strict";Object.defineProperty(Dk,"__esModule",{value:!0})});var Fk=m(ct=>{"use strict";var oW=ct&&ct.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(r,n,i)}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),au=ct&&ct.__exportStar||function(r,e){for(var t in r)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&oW(e,r,t)};Object.defineProperty(ct,"__esModule",{value:!0});ct.ChannelCredentials=ct.Channel=ct.waitForChannelReady=ct.createChannel=void 0;au(Gt(),ct);au(Sk(),ct);au(Ck(),ct);var Lk=xk();Object.defineProperty(ct,"createChannel",{enumerable:!0,get:function(){return Lk.createChannel}});Object.defineProperty(ct,"waitForChannelReady",{enumerable:!0,get:function(){return Lk.waitForChannelReady}});var Bk=Gi();Object.defineProperty(ct,"Channel",{enumerable:!0,get:function(){return Bk.Channel}});Object.defineProperty(ct,"ChannelCredentials",{enumerable:!0,get:function(){return Bk.ChannelCredentials}});au(Mk(),ct);au(qk(),ct)});var cu=m(Uh=>{"use strict";Object.defineProperty(Uh,"__esModule",{value:!0});Uh.messageTypeRegistry=void 0;Uh.messageTypeRegistry=new Map});var zk=m(Yn=>{"use strict";Object.defineProperty(Yn,"__esModule",{value:!0});Yn.Duration=Yn.protobufPackage=void 0;var Fa=Ed(),aW=cu(),Uk=kb();Yn.protobufPackage="google.protobuf";function jk(){return{$type:"google.protobuf.Duration",seconds:0,nanos:0}}Yn.Duration={$type:"google.protobuf.Duration",encode(r,e=Fa.Writer.create()){return r.seconds!==0&&e.uint32(8).int64(r.seconds),r.nanos!==0&&e.uint32(16).int32(r.nanos),e},decode(r,e){let t=r instanceof Fa.Reader?r:Fa.Reader.create(r),n=e===void 0?t.len:t.pos+e,i=jk();for(;t.pos<n;){let s=t.uint32();switch(s>>>3){case 1:if(s!==8)break;i.seconds=cW(t.int64());continue;case 2:if(s!==16)break;i.nanos=t.int32();continue}if((s&7)===4||s===0)break;t.skipType(s&7)}return i},create(r){return Yn.Duration.fromPartial(r??{})},fromPartial(r){var e,t;let n=jk();return n.seconds=(e=r.seconds)!==null&&e!==void 0?e:0,n.nanos=(t=r.nanos)!==null&&t!==void 0?t:0,n}};aW.messageTypeRegistry.set(Yn.Duration.$type,Yn.Duration);function cW(r){if(r.gt(globalThis.Number.MAX_SAFE_INTEGER))throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");return r.toNumber()}Fa.util.Long!==Uk&&(Fa.util.Long=Uk,Fa.configure())});var K1=m(B=>{"use strict";Object.defineProperty(B,"__esModule",{value:!0});B.LocalizedMessage=B.Help_Link=B.Help=B.ResourceInfo=B.RequestInfo=B.BadRequest_FieldViolation=B.BadRequest=B.PreconditionFailure_Violation=B.PreconditionFailure=B.ErrorInfo_MetadataEntry=B.ErrorInfo=B.QuotaFailure_Violation=B.QuotaFailure=B.DebugInfo=B.RetryInfo=B.protobufPackage=void 0;var le=Ed(),Wt=cu(),W1=zk();B.protobufPackage="google.rpc";function Hk(){return{$type:"google.rpc.RetryInfo",retryDelay:void 0}}B.RetryInfo={$type:"google.rpc.RetryInfo",encode(r,e=le.Writer.create()){return r.retryDelay!==void 0&&W1.Duration.encode(r.retryDelay,e.uint32(10).fork()).ldelim(),e},decode(r,e){let t=r instanceof le.Reader?r:le.Reader.create(r),n=e===void 0?t.len:t.pos+e,i=Hk();for(;t.pos<n;){let s=t.uint32();switch(s>>>3){case 1:if(s!==10)break;i.retryDelay=W1.Duration.decode(t,t.uint32());continue}if((s&7)===4||s===0)break;t.skipType(s&7)}return i},create(r){return B.RetryInfo.fromPartial(r??{})},fromPartial(r){let e=Hk();return e.retryDelay=r.retryDelay!==void 0&&r.retryDelay!==null?W1.Duration.fromPartial(r.retryDelay):void 0,e}};Wt.messageTypeRegistry.set(B.RetryInfo.$type,B.RetryInfo);function Gk(){return{$type:"google.rpc.DebugInfo",stackEntries:[],detail:""}}B.DebugInfo={$type:"google.rpc.DebugInfo",encode(r,e=le.Writer.create()){for(let t of r.stackEntries)e.uint32(10).string(t);return r.detail!==""&&e.uint32(18).string(r.detail),e},decode(r,e){let t=r instanceof le.Reader?r:le.Reader.create(r),n=e===void 0?t.len:t.pos+e,i=Gk();for(;t.pos<n;){let s=t.uint32();switch(s>>>3){case 1:if(s!==10)break;i.stackEntries.push(t.string());continue;case 2:if(s!==18)break;i.detail=t.string();continue}if((s&7)===4||s===0)break;t.skipType(s&7)}return i},create(r){return B.DebugInfo.fromPartial(r??{})},fromPartial(r){var e,t;let n=Gk();return n.stackEntries=((e=r.stackEntries)===null||e===void 0?void 0:e.map(i=>i))||[],n.detail=(t=r.detail)!==null&&t!==void 0?t:"",n}};Wt.messageTypeRegistry.set(B.DebugInfo.$type,B.DebugInfo);function Vk(){return{$type:"google.rpc.QuotaFailure",violations:[]}}B.QuotaFailure={$type:"google.rpc.QuotaFailure",encode(r,e=le.Writer.create()){for(let t of r.violations)B.QuotaFailure_Violation.encode(t,e.uint32(10).fork()).ldelim();return e},decode(r,e){let t=r instanceof le.Reader?r:le.Reader.create(r),n=e===void 0?t.len:t.pos+e,i=Vk();for(;t.pos<n;){let s=t.uint32();switch(s>>>3){case 1:if(s!==10)break;i.violations.push(B.QuotaFailure_Violation.decode(t,t.uint32()));continue}if((s&7)===4||s===0)break;t.skipType(s&7)}return i},create(r){return B.QuotaFailure.fromPartial(r??{})},fromPartial(r){var e;let t=Vk();return t.violations=((e=r.violations)===null||e===void 0?void 0:e.map(n=>B.QuotaFailure_Violation.fromPartial(n)))||[],t}};Wt.messageTypeRegistry.set(B.QuotaFailure.$type,B.QuotaFailure);function Wk(){return{$type:"google.rpc.QuotaFailure.Violation",subject:"",description:""}}B.QuotaFailure_Violation={$type:"google.rpc.QuotaFailure.Violation",encode(r,e=le.Writer.create()){return r.subject!==""&&e.uint32(10).string(r.subject),r.description!==""&&e.uint32(18).string(r.description),e},decode(r,e){let t=r instanceof le.Reader?r:le.Reader.create(r),n=e===void 0?t.len:t.pos+e,i=Wk();for(;t.pos<n;){let s=t.uint32();switch(s>>>3){case 1:if(s!==10)break;i.subject=t.string();continue;case 2:if(s!==18)break;i.description=t.string();continue}if((s&7)===4||s===0)break;t.skipType(s&7)}return i},create(r){return B.QuotaFailure_Violation.fromPartial(r??{})},fromPartial(r){var e,t;let n=Wk();return n.subject=(e=r.subject)!==null&&e!==void 0?e:"",n.description=(t=r.description)!==null&&t!==void 0?t:"",n}};Wt.messageTypeRegistry.set(B.QuotaFailure_Violation.$type,B.QuotaFailure_Violation);function Kk(){return{$type:"google.rpc.ErrorInfo",reason:"",domain:"",metadata:{}}}B.ErrorInfo={$type:"google.rpc.ErrorInfo",encode(r,e=le.Writer.create()){return r.reason!==""&&e.uint32(10).string(r.reason),r.domain!==""&&e.uint32(18).string(r.domain),Object.entries(r.metadata).forEach(([t,n])=>{B.ErrorInfo_MetadataEntry.encode({$type:"google.rpc.ErrorInfo.MetadataEntry",key:t,value:n},e.uint32(26).fork()).ldelim()}),e},decode(r,e){let t=r instanceof le.Reader?r:le.Reader.create(r),n=e===void 0?t.len:t.pos+e,i=Kk();for(;t.pos<n;){let s=t.uint32();switch(s>>>3){case 1:if(s!==10)break;i.reason=t.string();continue;case 2:if(s!==18)break;i.domain=t.string();continue;case 3:if(s!==26)break;let o=B.ErrorInfo_MetadataEntry.decode(t,t.uint32());o.value!==void 0&&(i.metadata[o.key]=o.value);continue}if((s&7)===4||s===0)break;t.skipType(s&7)}return i},create(r){return B.ErrorInfo.fromPartial(r??{})},fromPartial(r){var e,t,n;let i=Kk();return i.reason=(e=r.reason)!==null&&e!==void 0?e:"",i.domain=(t=r.domain)!==null&&t!==void 0?t:"",i.metadata=Object.entries((n=r.metadata)!==null&&n!==void 0?n:{}).reduce((s,[o,a])=>(a!==void 0&&(s[o]=globalThis.String(a)),s),{}),i}};Wt.messageTypeRegistry.set(B.ErrorInfo.$type,B.ErrorInfo);function Qk(){return{$type:"google.rpc.ErrorInfo.MetadataEntry",key:"",value:""}}B.ErrorInfo_MetadataEntry={$type:"google.rpc.ErrorInfo.MetadataEntry",encode(r,e=le.Writer.create()){return r.key!==""&&e.uint32(10).string(r.key),r.value!==""&&e.uint32(18).string(r.value),e},decode(r,e){let t=r instanceof le.Reader?r:le.Reader.create(r),n=e===void 0?t.len:t.pos+e,i=Qk();for(;t.pos<n;){let s=t.uint32();switch(s>>>3){case 1:if(s!==10)break;i.key=t.string();continue;case 2:if(s!==18)break;i.value=t.string();continue}if((s&7)===4||s===0)break;t.skipType(s&7)}return i},create(r){return B.ErrorInfo_MetadataEntry.fromPartial(r??{})},fromPartial(r){var e,t;let n=Qk();return n.key=(e=r.key)!==null&&e!==void 0?e:"",n.value=(t=r.value)!==null&&t!==void 0?t:"",n}};Wt.messageTypeRegistry.set(B.ErrorInfo_MetadataEntry.$type,B.ErrorInfo_MetadataEntry);function Jk(){return{$type:"google.rpc.PreconditionFailure",violations:[]}}B.PreconditionFailure={$type:"google.rpc.PreconditionFailure",encode(r,e=le.Writer.create()){for(let t of r.violations)B.PreconditionFailure_Violation.encode(t,e.uint32(10).fork()).ldelim();return e},decode(r,e){let t=r instanceof le.Reader?r:le.Reader.create(r),n=e===void 0?t.len:t.pos+e,i=Jk();for(;t.pos<n;){let s=t.uint32();switch(s>>>3){case 1:if(s!==10)break;i.violations.push(B.PreconditionFailure_Violation.decode(t,t.uint32()));continue}if((s&7)===4||s===0)break;t.skipType(s&7)}return i},create(r){return B.PreconditionFailure.fromPartial(r??{})},fromPartial(r){var e;let t=Jk();return t.violations=((e=r.violations)===null||e===void 0?void 0:e.map(n=>B.PreconditionFailure_Violation.fromPartial(n)))||[],t}};Wt.messageTypeRegistry.set(B.PreconditionFailure.$type,B.PreconditionFailure);function $k(){return{$type:"google.rpc.PreconditionFailure.Violation",type:"",subject:"",description:""}}B.PreconditionFailure_Violation={$type:"google.rpc.PreconditionFailure.Violation",encode(r,e=le.Writer.create()){return r.type!==""&&e.uint32(10).string(r.type),r.subject!==""&&e.uint32(18).string(r.subject),r.description!==""&&e.uint32(26).string(r.description),e},decode(r,e){let t=r instanceof le.Reader?r:le.Reader.create(r),n=e===void 0?t.len:t.pos+e,i=$k();for(;t.pos<n;){let s=t.uint32();switch(s>>>3){case 1:if(s!==10)break;i.type=t.string();continue;case 2:if(s!==18)break;i.subject=t.string();continue;case 3:if(s!==26)break;i.description=t.string();continue}if((s&7)===4||s===0)break;t.skipType(s&7)}return i},create(r){return B.PreconditionFailure_Violation.fromPartial(r??{})},fromPartial(r){var e,t,n;let i=$k();return i.type=(e=r.type)!==null&&e!==void 0?e:"",i.subject=(t=r.subject)!==null&&t!==void 0?t:"",i.description=(n=r.description)!==null&&n!==void 0?n:"",i}};Wt.messageTypeRegistry.set(B.PreconditionFailure_Violation.$type,B.PreconditionFailure_Violation);function Yk(){return{$type:"google.rpc.BadRequest",fieldViolations:[]}}B.BadRequest={$type:"google.rpc.BadRequest",encode(r,e=le.Writer.create()){for(let t of r.fieldViolations)B.BadRequest_FieldViolation.encode(t,e.uint32(10).fork()).ldelim();return e},decode(r,e){let t=r instanceof le.Reader?r:le.Reader.create(r),n=e===void 0?t.len:t.pos+e,i=Yk();for(;t.pos<n;){let s=t.uint32();switch(s>>>3){case 1:if(s!==10)break;i.fieldViolations.push(B.BadRequest_FieldViolation.decode(t,t.uint32()));continue}if((s&7)===4||s===0)break;t.skipType(s&7)}return i},create(r){return B.BadRequest.fromPartial(r??{})},fromPartial(r){var e;let t=Yk();return t.fieldViolations=((e=r.fieldViolations)===null||e===void 0?void 0:e.map(n=>B.BadRequest_FieldViolation.fromPartial(n)))||[],t}};Wt.messageTypeRegistry.set(B.BadRequest.$type,B.BadRequest);function Zk(){return{$type:"google.rpc.BadRequest.FieldViolation",field:"",description:""}}B.BadRequest_FieldViolation={$type:"google.rpc.BadRequest.FieldViolation",encode(r,e=le.Writer.create()){return r.field!==""&&e.uint32(10).string(r.field),r.description!==""&&e.uint32(18).string(r.description),e},decode(r,e){let t=r instanceof le.Reader?r:le.Reader.create(r),n=e===void 0?t.len:t.pos+e,i=Zk();for(;t.pos<n;){let s=t.uint32();switch(s>>>3){case 1:if(s!==10)break;i.field=t.string();continue;case 2:if(s!==18)break;i.description=t.string();continue}if((s&7)===4||s===0)break;t.skipType(s&7)}return i},create(r){return B.BadRequest_FieldViolation.fromPartial(r??{})},fromPartial(r){var e,t;let n=Zk();return n.field=(e=r.field)!==null&&e!==void 0?e:"",n.description=(t=r.description)!==null&&t!==void 0?t:"",n}};Wt.messageTypeRegistry.set(B.BadRequest_FieldViolation.$type,B.BadRequest_FieldViolation);function Xk(){return{$type:"google.rpc.RequestInfo",requestId:"",servingData:""}}B.RequestInfo={$type:"google.rpc.RequestInfo",encode(r,e=le.Writer.create()){return r.requestId!==""&&e.uint32(10).string(r.requestId),r.servingData!==""&&e.uint32(18).string(r.servingData),e},decode(r,e){let t=r instanceof le.Reader?r:le.Reader.create(r),n=e===void 0?t.len:t.pos+e,i=Xk();for(;t.pos<n;){let s=t.uint32();switch(s>>>3){case 1:if(s!==10)break;i.requestId=t.string();continue;case 2:if(s!==18)break;i.servingData=t.string();continue}if((s&7)===4||s===0)break;t.skipType(s&7)}return i},create(r){return B.RequestInfo.fromPartial(r??{})},fromPartial(r){var e,t;let n=Xk();return n.requestId=(e=r.requestId)!==null&&e!==void 0?e:"",n.servingData=(t=r.servingData)!==null&&t!==void 0?t:"",n}};Wt.messageTypeRegistry.set(B.RequestInfo.$type,B.RequestInfo);function eR(){return{$type:"google.rpc.ResourceInfo",resourceType:"",resourceName:"",owner:"",description:""}}B.ResourceInfo={$type:"google.rpc.ResourceInfo",encode(r,e=le.Writer.create()){return r.resourceType!==""&&e.uint32(10).string(r.resourceType),r.resourceName!==""&&e.uint32(18).string(r.resourceName),r.owner!==""&&e.uint32(26).string(r.owner),r.description!==""&&e.uint32(34).string(r.description),e},decode(r,e){let t=r instanceof le.Reader?r:le.Reader.create(r),n=e===void 0?t.len:t.pos+e,i=eR();for(;t.pos<n;){let s=t.uint32();switch(s>>>3){case 1:if(s!==10)break;i.resourceType=t.string();continue;case 2:if(s!==18)break;i.resourceName=t.string();continue;case 3:if(s!==26)break;i.owner=t.string();continue;case 4:if(s!==34)break;i.description=t.string();continue}if((s&7)===4||s===0)break;t.skipType(s&7)}return i},create(r){return B.ResourceInfo.fromPartial(r??{})},fromPartial(r){var e,t,n,i;let s=eR();return s.resourceType=(e=r.resourceType)!==null&&e!==void 0?e:"",s.resourceName=(t=r.resourceName)!==null&&t!==void 0?t:"",s.owner=(n=r.owner)!==null&&n!==void 0?n:"",s.description=(i=r.description)!==null&&i!==void 0?i:"",s}};Wt.messageTypeRegistry.set(B.ResourceInfo.$type,B.ResourceInfo);function tR(){return{$type:"google.rpc.Help",links:[]}}B.Help={$type:"google.rpc.Help",encode(r,e=le.Writer.create()){for(let t of r.links)B.Help_Link.encode(t,e.uint32(10).fork()).ldelim();return e},decode(r,e){let t=r instanceof le.Reader?r:le.Reader.create(r),n=e===void 0?t.len:t.pos+e,i=tR();for(;t.pos<n;){let s=t.uint32();switch(s>>>3){case 1:if(s!==10)break;i.links.push(B.Help_Link.decode(t,t.uint32()));continue}if((s&7)===4||s===0)break;t.skipType(s&7)}return i},create(r){return B.Help.fromPartial(r??{})},fromPartial(r){var e;let t=tR();return t.links=((e=r.links)===null||e===void 0?void 0:e.map(n=>B.Help_Link.fromPartial(n)))||[],t}};Wt.messageTypeRegistry.set(B.Help.$type,B.Help);function rR(){return{$type:"google.rpc.Help.Link",description:"",url:""}}B.Help_Link={$type:"google.rpc.Help.Link",encode(r,e=le.Writer.create()){return r.description!==""&&e.uint32(10).string(r.description),r.url!==""&&e.uint32(18).string(r.url),e},decode(r,e){let t=r instanceof le.Reader?r:le.Reader.create(r),n=e===void 0?t.len:t.pos+e,i=rR();for(;t.pos<n;){let s=t.uint32();switch(s>>>3){case 1:if(s!==10)break;i.description=t.string();continue;case 2:if(s!==18)break;i.url=t.string();continue}if((s&7)===4||s===0)break;t.skipType(s&7)}return i},create(r){return B.Help_Link.fromPartial(r??{})},fromPartial(r){var e,t;let n=rR();return n.description=(e=r.description)!==null&&e!==void 0?e:"",n.url=(t=r.url)!==null&&t!==void 0?t:"",n}};Wt.messageTypeRegistry.set(B.Help_Link.$type,B.Help_Link);function nR(){return{$type:"google.rpc.LocalizedMessage",locale:"",message:""}}B.LocalizedMessage={$type:"google.rpc.LocalizedMessage",encode(r,e=le.Writer.create()){return r.locale!==""&&e.uint32(10).string(r.locale),r.message!==""&&e.uint32(18).string(r.message),e},decode(r,e){let t=r instanceof le.Reader?r:le.Reader.create(r),n=e===void 0?t.len:t.pos+e,i=nR();for(;t.pos<n;){let s=t.uint32();switch(s>>>3){case 1:if(s!==10)break;i.locale=t.string();continue;case 2:if(s!==18)break;i.message=t.string();continue}if((s&7)===4||s===0)break;t.skipType(s&7)}return i},create(r){return B.LocalizedMessage.fromPartial(r??{})},fromPartial(r){var e,t;let n=nR();return n.locale=(e=r.locale)!==null&&e!==void 0?e:"",n.message=(t=r.message)!==null&&t!==void 0?t:"",n}};Wt.messageTypeRegistry.set(B.LocalizedMessage.$type,B.LocalizedMessage)});var jh=m(Zn=>{"use strict";Object.defineProperty(Zn,"__esModule",{value:!0});Zn.Any=Zn.protobufPackage=void 0;var Q1=Ed(),lW=cu();Zn.protobufPackage="google.protobuf";function iR(){return{$type:"google.protobuf.Any",typeUrl:"",value:new Uint8Array(0)}}Zn.Any={$type:"google.protobuf.Any",encode(r,e=Q1.Writer.create()){return r.typeUrl!==""&&e.uint32(10).string(r.typeUrl),r.value.length!==0&&e.uint32(18).bytes(r.value),e},decode(r,e){let t=r instanceof Q1.Reader?r:Q1.Reader.create(r),n=e===void 0?t.len:t.pos+e,i=iR();for(;t.pos<n;){let s=t.uint32();switch(s>>>3){case 1:if(s!==10)break;i.typeUrl=t.string();continue;case 2:if(s!==18)break;i.value=t.bytes();continue}if((s&7)===4||s===0)break;t.skipType(s&7)}return i},create(r){return Zn.Any.fromPartial(r??{})},fromPartial(r){var e,t;let n=iR();return n.typeUrl=(e=r.typeUrl)!==null&&e!==void 0?e:"",n.value=(t=r.value)!==null&&t!==void 0?t:new Uint8Array(0),n}};lW.messageTypeRegistry.set(Zn.Any.$type,Zn.Any)});var $1=m(zh=>{"use strict";Object.defineProperty(zh,"__esModule",{value:!0});zh.RichServerError=void 0;var uW=Gt(),J1=class extends uW.ServerError{constructor(e,t,n=[]){super(e,t),this.name="RichServerError",this.extra=n}};zh.RichServerError=J1});var Y1=m(Ua=>{"use strict";Object.defineProperty(Ua,"__esModule",{value:!0});Ua.encodeErrorDetails=Ua.decodeErrorDetails=void 0;var fr=K1(),sR=jh(),oR=[fr.RetryInfo,fr.DebugInfo,fr.QuotaFailure,fr.QuotaFailure_Violation,fr.ErrorInfo,fr.PreconditionFailure,fr.PreconditionFailure_Violation,fr.BadRequest,fr.BadRequest_FieldViolation,fr.RequestInfo,fr.ResourceInfo,fr.Help,fr.LocalizedMessage];function dW(r){return r.map(e=>{let t=oR.find(n=>e.typeUrl.endsWith(`/${n.$type}`));return t==null?e:t.decode(e.value)})}Ua.decodeErrorDetails=dW;function fW(r){return r.map(e=>{if(e.$type===sR.Any.$type)return e;let t=oR.find(n=>n.$type===e.$type);if(t==null)throw new Error(`Unknown error details type: ${e.$type}`);return sR.Any.fromPartial({typeUrl:`type.googleapis.com/${e.$type}`,value:t.encode(e).finish()})})}Ua.encodeErrorDetails=fW});var eA=m(Xn=>{"use strict";Object.defineProperty(Xn,"__esModule",{value:!0});Xn.Status=Xn.protobufPackage=void 0;var Z1=Ed(),hW=cu(),X1=jh();Xn.protobufPackage="google.rpc";function aR(){return{$type:"google.rpc.Status",code:0,message:"",details:[]}}Xn.Status={$type:"google.rpc.Status",encode(r,e=Z1.Writer.create()){r.code!==0&&e.uint32(8).int32(r.code),r.message!==""&&e.uint32(18).string(r.message);for(let t of r.details)X1.Any.encode(t,e.uint32(26).fork()).ldelim();return e},decode(r,e){let t=r instanceof Z1.Reader?r:Z1.Reader.create(r),n=e===void 0?t.len:t.pos+e,i=aR();for(;t.pos<n;){let s=t.uint32();switch(s>>>3){case 1:if(s!==8)break;i.code=t.int32();continue;case 2:if(s!==18)break;i.message=t.string();continue;case 3:if(s!==26)break;i.details.push(X1.Any.decode(t,t.uint32()));continue}if((s&7)===4||s===0)break;t.skipType(s&7)}return i},create(r){return Xn.Status.fromPartial(r??{})},fromPartial(r){var e,t,n;let i=aR();return i.code=(e=r.code)!==null&&e!==void 0?e:0,i.message=(t=r.message)!==null&&t!==void 0?t:"",i.details=((n=r.details)===null||n===void 0?void 0:n.map(s=>X1.Any.fromPartial(s)))||[],i}};hW.messageTypeRegistry.set(Xn.Status.$type,Xn.Status)});var lR=m(Hh=>{"use strict";Object.defineProperty(Hh,"__esModule",{value:!0});Hh.errorDetailsServerMiddleware=void 0;var pW=Y1(),cR=eA(),mW=$1(),gW=async function*(e,t){try{return yield*e.next(e.request,t)}catch(n){if(n instanceof mW.RichServerError){let i=cR.Status.fromPartial({code:n.code,message:n.details,details:(0,pW.encodeErrorDetails)(n.extra)});t.trailer.set("grpc-status-details-bin",cR.Status.encode(i).finish())}throw n}};Hh.errorDetailsServerMiddleware=gW});var rA=m(Gh=>{"use strict";Object.defineProperty(Gh,"__esModule",{value:!0});Gh.RichClientError=void 0;var yW=Gt(),tA=class extends yW.ClientError{constructor(e,t,n,i){super(e,t,n),this.name="RichClientError",this.extra=i}};Gh.RichClientError=tA});var uR=m(Vh=>{"use strict";Object.defineProperty(Vh,"__esModule",{value:!0});Vh.errorDetailsClientMiddleware=void 0;var vW=Gt(),bW=Y1(),_W=eA(),AW=rA(),wW=async function*(e,t){let n;try{return yield*e.next(e.request,{...t,onTrailer(i){var s;let o=i.get("grpc-status-details-bin");o!=null&&(n=_W.Status.decode(o)),(s=t.onTrailer)===null||s===void 0||s.call(t,i)}})}catch(i){throw n!=null&&i instanceof vW.ClientError?new AW.RichClientError(i.path,i.code,i.details,(0,bW.decodeErrorDetails)(n.details)):i}};Vh.errorDetailsClientMiddleware=wW});var dR=m(_t=>{"use strict";var EW=_t&&_t.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(r,n,i)}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),SW=_t&&_t.__exportStar||function(r,e){for(var t in r)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&EW(e,r,t)};Object.defineProperty(_t,"__esModule",{value:!0});_t.errorDetailsClientMiddleware=_t.RichClientError=_t.errorDetailsServerMiddleware=_t.RichServerError=_t.Any=void 0;SW(K1(),_t);var TW=jh();Object.defineProperty(_t,"Any",{enumerable:!0,get:function(){return TW.Any}});var CW=$1();Object.defineProperty(_t,"RichServerError",{enumerable:!0,get:function(){return CW.RichServerError}});var xW=lR();Object.defineProperty(_t,"errorDetailsServerMiddleware",{enumerable:!0,get:function(){return xW.errorDetailsServerMiddleware}});var OW=rA();Object.defineProperty(_t,"RichClientError",{enumerable:!0,get:function(){return OW.RichClientError}});var IW=uR();Object.defineProperty(_t,"errorDetailsClientMiddleware",{enumerable:!0,get:function(){return IW.errorDetailsClientMiddleware}})});var pR,mR=ee(()=>{"use strict";pR=typeof globalThis=="object"?globalThis:global});var gR=ee(()=>{"use strict";mR()});var yR=ee(()=>{"use strict";gR()});var ei,nA=ee(()=>{"use strict";ei="1.9.0"});function PW(r){var e=new Set([r]),t=new Set,n=r.match(vR);if(!n)return function(){return!1};var i={major:+n[1],minor:+n[2],patch:+n[3],prerelease:n[4]};if(i.prerelease!=null)return function(c){return c===r};function s(a){return t.add(a),!1}function o(a){return e.add(a),!0}return function(c){if(e.has(c))return!0;if(t.has(c))return!1;var l=c.match(vR);if(!l)return s(c);var u={major:+l[1],minor:+l[2],patch:+l[3],prerelease:l[4]};return u.prerelease!=null||i.major!==u.major?s(c):i.major===0?i.minor===u.minor&&i.patch<=u.patch?o(c):s(c):i.minor<=u.minor?o(c):s(c)}}var vR,bR,_R=ee(()=>{"use strict";nA();vR=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;bR=PW(ei)});function Sn(r,e,t,n){var i;n===void 0&&(n=!1);var s=uu[lu]=(i=uu[lu])!==null&&i!==void 0?i:{version:ei};if(!n&&s[r]){var o=new Error("@opentelemetry/api: Attempted duplicate registration of API: "+r);return t.error(o.stack||o.message),!1}if(s.version!==ei){var o=new Error("@opentelemetry/api: Registration of version v"+s.version+" for "+r+" does not match previously registered API v"+ei);return t.error(o.stack||o.message),!1}return s[r]=e,t.debug("@opentelemetry/api: Registered a global for "+r+" v"+ei+"."),!0}function hr(r){var e,t,n=(e=uu[lu])===null||e===void 0?void 0:e.version;if(!(!n||!bR(n)))return(t=uu[lu])===null||t===void 0?void 0:t[r]}function Tn(r,e){e.debug("@opentelemetry/api: Unregistering a global for "+r+" v"+ei+".");var t=uu[lu];t&&delete t[r]}var kW,lu,uu,ao=ee(()=>{"use strict";yR();nA();_R();kW=ei.split(".")[0],lu=Symbol.for("opentelemetry.js.api."+kW),uu=pR});function du(r,e,t){var n=hr("diag");if(n)return t.unshift(e),n[r].apply(n,NW([],RW(t),!1))}var RW,NW,AR,wR=ee(()=>{"use strict";ao();RW=function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,s=[],o;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(o)throw o.error}}return s},NW=function(r,e,t){if(t||arguments.length===2)for(var n=0,i=e.length,s;n<i;n++)(s||!(n in e))&&(s||(s=Array.prototype.slice.call(e,0,n)),s[n]=e[n]);return r.concat(s||Array.prototype.slice.call(e))},AR=function(){function r(e){this._namespace=e.namespace||"DiagComponentLogger"}return r.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return du("debug",this._namespace,e)},r.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return du("error",this._namespace,e)},r.prototype.info=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return du("info",this._namespace,e)},r.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return du("warn",this._namespace,e)},r.prototype.verbose=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return du("verbose",this._namespace,e)},r}()});var At,Wh=ee(()=>{"use strict";(function(r){r[r.NONE=0]="NONE",r[r.ERROR=30]="ERROR",r[r.WARN=50]="WARN",r[r.INFO=60]="INFO",r[r.DEBUG=70]="DEBUG",r[r.VERBOSE=80]="VERBOSE",r[r.ALL=9999]="ALL"})(At||(At={}))});function ER(r,e){r<At.NONE?r=At.NONE:r>At.ALL&&(r=At.ALL),e=e||{};function t(n,i){var s=e[n];return typeof s=="function"&&r>=i?s.bind(e):function(){}}return{error:t("error",At.ERROR),warn:t("warn",At.WARN),info:t("info",At.INFO),debug:t("debug",At.DEBUG),verbose:t("verbose",At.VERBOSE)}}var SR=ee(()=>{"use strict";Wh()});var MW,DW,qW,Rt,co=ee(()=>{"use strict";wR();SR();Wh();ao();MW=function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,s=[],o;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(o)throw o.error}}return s},DW=function(r,e,t){if(t||arguments.length===2)for(var n=0,i=e.length,s;n<i;n++)(s||!(n in e))&&(s||(s=Array.prototype.slice.call(e,0,n)),s[n]=e[n]);return r.concat(s||Array.prototype.slice.call(e))},qW="diag",Rt=function(){function r(){function e(i){return function(){for(var s=[],o=0;o<arguments.length;o++)s[o]=arguments[o];var a=hr("diag");if(a)return a[i].apply(a,DW([],MW(s),!1))}}var t=this,n=function(i,s){var o,a,c;if(s===void 0&&(s={logLevel:At.INFO}),i===t){var l=new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");return t.error((o=l.stack)!==null&&o!==void 0?o:l.message),!1}typeof s=="number"&&(s={logLevel:s});var u=hr("diag"),d=ER((a=s.logLevel)!==null&&a!==void 0?a:At.INFO,i);if(u&&!s.suppressOverrideMessage){var f=(c=new Error().stack)!==null&&c!==void 0?c:"<failed to generate stacktrace>";u.warn("Current logger will be overwritten from "+f),d.warn("Current logger will overwrite one already registered from "+f)}return Sn("diag",d,t,!0)};t.setLogger=n,t.disable=function(){Tn(qW,t)},t.createComponentLogger=function(i){return new AR(i)},t.verbose=e("verbose"),t.debug=e("debug"),t.info=e("info"),t.warn=e("warn"),t.error=e("error")}return r.instance=function(){return this._instance||(this._instance=new r),this._instance},r}()});var LW,BW,TR,CR=ee(()=>{"use strict";LW=function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,s=[],o;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(o)throw o.error}}return s},BW=function(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},TR=function(){function r(e){this._entries=e?new Map(e):new Map}return r.prototype.getEntry=function(e){var t=this._entries.get(e);if(t)return Object.assign({},t)},r.prototype.getAllEntries=function(){return Array.from(this._entries.entries()).map(function(e){var t=LW(e,2),n=t[0],i=t[1];return[n,i]})},r.prototype.setEntry=function(e,t){var n=new r(this._entries);return n._entries.set(e,t),n},r.prototype.removeEntry=function(e){var t=new r(this._entries);return t._entries.delete(e),t},r.prototype.removeEntries=function(){for(var e,t,n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];var s=new r(this._entries);try{for(var o=BW(n),a=o.next();!a.done;a=o.next()){var c=a.value;s._entries.delete(c)}}catch(l){e={error:l}}finally{try{a&&!a.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}return s},r.prototype.clear=function(){return new r},r}()});var xR,OR=ee(()=>{"use strict";xR=Symbol("BaggageEntryMetadata")});function IR(r){return r===void 0&&(r={}),new TR(new Map(Object.entries(r)))}function PR(r){return typeof r!="string"&&(FW.error("Cannot create baggage metadata from unknown type: "+typeof r),r=""),{__TYPE__:xR,toString:function(){return r}}}var FW,iA=ee(()=>{"use strict";co();CR();OR();FW=Rt.instance()});function za(r){return Symbol.for(r)}var UW,Kh,fu=ee(()=>{"use strict";UW=function(){function r(e){var t=this;t._currentContext=e?new Map(e):new Map,t.getValue=function(n){return t._currentContext.get(n)},t.setValue=function(n,i){var s=new r(t._currentContext);return s._currentContext.set(n,i),s},t.deleteValue=function(n){var i=new r(t._currentContext);return i._currentContext.delete(n),i}}return r}(),Kh=new UW});var sA,kR,RR=ee(()=>{"use strict";sA=[{n:"error",c:"error"},{n:"warn",c:"warn"},{n:"info",c:"info"},{n:"debug",c:"debug"},{n:"verbose",c:"trace"}],kR=function(){function r(){function e(n){return function(){for(var i=[],s=0;s<arguments.length;s++)i[s]=arguments[s];if(console){var o=console[n];if(typeof o!="function"&&(o=console.log),typeof o=="function")return o.apply(console,i)}}}for(var t=0;t<sA.length;t++)this[sA[t].n]=e(sA[t].c)}return r}()});function NR(){return aA}var lo,jW,Qh,zW,HW,GW,VW,oA,WW,KW,QW,aA,JW,$W,YW,ZW,XW,eK,tK,cA=ee(()=>{"use strict";lo=function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),jW=function(){function r(){}return r.prototype.createGauge=function(e,t){return $W},r.prototype.createHistogram=function(e,t){return YW},r.prototype.createCounter=function(e,t){return JW},r.prototype.createUpDownCounter=function(e,t){return ZW},r.prototype.createObservableGauge=function(e,t){return eK},r.prototype.createObservableCounter=function(e,t){return XW},r.prototype.createObservableUpDownCounter=function(e,t){return tK},r.prototype.addBatchObservableCallback=function(e,t){},r.prototype.removeBatchObservableCallback=function(e){},r}(),Qh=function(){function r(){}return r}(),zW=function(r){lo(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.add=function(t,n){},e}(Qh),HW=function(r){lo(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.add=function(t,n){},e}(Qh),GW=function(r){lo(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.record=function(t,n){},e}(Qh),VW=function(r){lo(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.record=function(t,n){},e}(Qh),oA=function(){function r(){}return r.prototype.addCallback=function(e){},r.prototype.removeCallback=function(e){},r}(),WW=function(r){lo(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e}(oA),KW=function(r){lo(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e}(oA),QW=function(r){lo(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e}(oA),aA=new jW,JW=new zW,$W=new GW,YW=new VW,ZW=new HW,XW=new WW,eK=new KW,tK=new QW});var Jh,MR=ee(()=>{"use strict";(function(r){r[r.INT=0]="INT",r[r.DOUBLE=1]="DOUBLE"})(Jh||(Jh={}))});var $h,Yh,lA=ee(()=>{"use strict";$h={get:function(r,e){if(r!=null)return r[e]},keys:function(r){return r==null?[]:Object.keys(r)}},Yh={set:function(r,e,t){r!=null&&(r[e]=t)}}});var rK,nK,DR,qR=ee(()=>{"use strict";fu();rK=function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,s=[],o;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(o)throw o.error}}return s},nK=function(r,e,t){if(t||arguments.length===2)for(var n=0,i=e.length,s;n<i;n++)(s||!(n in e))&&(s||(s=Array.prototype.slice.call(e,0,n)),s[n]=e[n]);return r.concat(s||Array.prototype.slice.call(e))},DR=function(){function r(){}return r.prototype.active=function(){return Kh},r.prototype.with=function(e,t,n){for(var i=[],s=3;s<arguments.length;s++)i[s-3]=arguments[s];return t.call.apply(t,nK([n],rK(i),!1))},r.prototype.bind=function(e,t){return t},r.prototype.enable=function(){return this},r.prototype.disable=function(){return this},r}()});var iK,sK,uA,oK,Ki,hu=ee(()=>{"use strict";qR();ao();co();iK=function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,s=[],o;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(o)throw o.error}}return s},sK=function(r,e,t){if(t||arguments.length===2)for(var n=0,i=e.length,s;n<i;n++)(s||!(n in e))&&(s||(s=Array.prototype.slice.call(e,0,n)),s[n]=e[n]);return r.concat(s||Array.prototype.slice.call(e))},uA="context",oK=new DR,Ki=function(){function r(){}return r.getInstance=function(){return this._instance||(this._instance=new r),this._instance},r.prototype.setGlobalContextManager=function(e){return Sn(uA,e,Rt.instance())},r.prototype.active=function(){return this._getContextManager().active()},r.prototype.with=function(e,t,n){for(var i,s=[],o=3;o<arguments.length;o++)s[o-3]=arguments[o];return(i=this._getContextManager()).with.apply(i,sK([e,t,n],iK(s),!1))},r.prototype.bind=function(e,t){return this._getContextManager().bind(e,t)},r.prototype._getContextManager=function(){return hr(uA)||oK},r.prototype.disable=function(){this._getContextManager().disable(),Tn(uA,Rt.instance())},r}()});var Ha,dA=ee(()=>{"use strict";(function(r){r[r.NONE=0]="NONE",r[r.SAMPLED=1]="SAMPLED"})(Ha||(Ha={}))});var pu,mu,Zh,Xh=ee(()=>{"use strict";dA();pu="0000000000000000",mu="00000000000000000000000000000000",Zh={traceId:mu,spanId:pu,traceFlags:Ha.NONE}});var Qi,ep=ee(()=>{"use strict";Xh();Qi=function(){function r(e){e===void 0&&(e=Zh),this._spanContext=e}return r.prototype.spanContext=function(){return this._spanContext},r.prototype.setAttribute=function(e,t){return this},r.prototype.setAttributes=function(e){return this},r.prototype.addEvent=function(e,t){return this},r.prototype.addLink=function(e){return this},r.prototype.addLinks=function(e){return this},r.prototype.setStatus=function(e){return this},r.prototype.updateName=function(e){return this},r.prototype.end=function(e){},r.prototype.isRecording=function(){return!1},r.prototype.recordException=function(e,t){},r}()});function tp(r){return r.getValue(fA)||void 0}function LR(){return tp(Ki.getInstance().active())}function gu(r,e){return r.setValue(fA,e)}function BR(r){return r.deleteValue(fA)}function FR(r,e){return gu(r,new Qi(e))}function rp(r){var e;return(e=tp(r))===null||e===void 0?void 0:e.spanContext()}var fA,hA=ee(()=>{"use strict";fu();ep();hu();fA=za("OpenTelemetry Context Key SPAN")});function pA(r){return aK.test(r)&&r!==mu}function mA(r){return cK.test(r)&&r!==pu}function Ga(r){return pA(r.traceId)&&mA(r.spanId)}function UR(r){return new Qi(r)}var aK,cK,np=ee(()=>{"use strict";Xh();ep();aK=/^([0-9a-f]{32})$/i,cK=/^[0-9a-f]{16}$/i});function lK(r){return typeof r=="object"&&typeof r.spanId=="string"&&typeof r.traceId=="string"&&typeof r.traceFlags=="number"}var gA,ip,yA=ee(()=>{"use strict";hu();hA();ep();np();gA=Ki.getInstance(),ip=function(){function r(){}return r.prototype.startSpan=function(e,t,n){n===void 0&&(n=gA.active());var i=!!t?.root;if(i)return new Qi;var s=n&&rp(n);return lK(s)&&Ga(s)?new Qi(s):new Qi},r.prototype.startActiveSpan=function(e,t,n,i){var s,o,a;if(!(arguments.length<2)){arguments.length===2?a=t:arguments.length===3?(s=t,a=n):(s=t,o=n,a=i);var c=o??gA.active(),l=this.startSpan(e,s,c),u=gu(c,l);return gA.with(u,a,void 0,l)}},r}()});var uK,sp,vA=ee(()=>{"use strict";yA();uK=new ip,sp=function(){function r(e,t,n,i){this._provider=e,this.name=t,this.version=n,this.options=i}return r.prototype.startSpan=function(e,t,n){return this._getTracer().startSpan(e,t,n)},r.prototype.startActiveSpan=function(e,t,n,i){var s=this._getTracer();return Reflect.apply(s.startActiveSpan,s,arguments)},r.prototype._getTracer=function(){if(this._delegate)return this._delegate;var e=this._provider.getDelegateTracer(this.name,this.version,this.options);return e?(this._delegate=e,this._delegate):uK},r}()});var jR,zR=ee(()=>{"use strict";yA();jR=function(){function r(){}return r.prototype.getTracer=function(e,t,n){return new ip},r}()});var dK,yu,bA=ee(()=>{"use strict";vA();zR();dK=new jR,yu=function(){function r(){}return r.prototype.getTracer=function(e,t,n){var i;return(i=this.getDelegateTracer(e,t,n))!==null&&i!==void 0?i:new sp(this,e,t,n)},r.prototype.getDelegate=function(){var e;return(e=this._delegate)!==null&&e!==void 0?e:dK},r.prototype.setDelegate=function(e){this._delegate=e},r.prototype.getDelegateTracer=function(e,t,n){var i;return(i=this._delegate)===null||i===void 0?void 0:i.getTracer(e,t,n)},r}()});var op,HR=ee(()=>{"use strict";(function(r){r[r.NOT_RECORD=0]="NOT_RECORD",r[r.RECORD=1]="RECORD",r[r.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(op||(op={}))});var ap,GR=ee(()=>{"use strict";(function(r){r[r.INTERNAL=0]="INTERNAL",r[r.SERVER=1]="SERVER",r[r.CLIENT=2]="CLIENT",r[r.PRODUCER=3]="PRODUCER",r[r.CONSUMER=4]="CONSUMER"})(ap||(ap={}))});var cp,VR=ee(()=>{"use strict";(function(r){r[r.UNSET=0]="UNSET",r[r.OK=1]="OK",r[r.ERROR=2]="ERROR"})(cp||(cp={}))});function WR(r){return pK.test(r)}function KR(r){return mK.test(r)&&!gK.test(r)}var _A,fK,hK,pK,mK,gK,QR=ee(()=>{"use strict";_A="[_0-9a-z-*/]",fK="[a-z]"+_A+"{0,255}",hK="[a-z0-9]"+_A+"{0,240}@[a-z]"+_A+"{0,13}",pK=new RegExp("^(?:"+fK+"|"+hK+")$"),mK=/^[ -~]{0,255}[!-~]$/,gK=/,|=/});var JR,yK,$R,YR,ZR,XR=ee(()=>{"use strict";QR();JR=32,yK=512,$R=",",YR="=",ZR=function(){function r(e){this._internalState=new Map,e&&this._parse(e)}return r.prototype.set=function(e,t){var n=this._clone();return n._internalState.has(e)&&n._internalState.delete(e),n._internalState.set(e,t),n},r.prototype.unset=function(e){var t=this._clone();return t._internalState.delete(e),t},r.prototype.get=function(e){return this._internalState.get(e)},r.prototype.serialize=function(){var e=this;return this._keys().reduce(function(t,n){return t.push(n+YR+e.get(n)),t},[]).join($R)},r.prototype._parse=function(e){e.length>yK||(this._internalState=e.split($R).reverse().reduce(function(t,n){var i=n.trim(),s=i.indexOf(YR);if(s!==-1){var o=i.slice(0,s),a=i.slice(s+1,n.length);WR(o)&&KR(a)&&t.set(o,a)}return t},new Map),this._internalState.size>JR&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,JR))))},r.prototype._keys=function(){return Array.from(this._internalState.keys()).reverse()},r.prototype._clone=function(){var e=new r;return e._internalState=new Map(this._internalState),e},r}()});function eN(r){return new ZR(r)}var tN=ee(()=>{"use strict";XR()});var AA,rN=ee(()=>{"use strict";hu();AA=Ki.getInstance()});var wA,nN=ee(()=>{"use strict";co();wA=Rt.instance()});var vK,iN,sN=ee(()=>{"use strict";cA();vK=function(){function r(){}return r.prototype.getMeter=function(e,t,n){return aA},r}(),iN=new vK});var EA,oN,aN=ee(()=>{"use strict";sN();ao();co();EA="metrics",oN=function(){function r(){}return r.getInstance=function(){return this._instance||(this._instance=new r),this._instance},r.prototype.setGlobalMeterProvider=function(e){return Sn(EA,e,Rt.instance())},r.prototype.getMeterProvider=function(){return hr(EA)||iN},r.prototype.getMeter=function(e,t,n){return this.getMeterProvider().getMeter(e,t,n)},r.prototype.disable=function(){Tn(EA,Rt.instance())},r}()});var vu,cN=ee(()=>{"use strict";aN();vu=oN.getInstance()});var lN,uN=ee(()=>{"use strict";lN=function(){function r(){}return r.prototype.inject=function(e,t){},r.prototype.extract=function(e,t){return e},r.prototype.fields=function(){return[]},r}()});function TA(r){return r.getValue(SA)||void 0}function dN(){return TA(Ki.getInstance().active())}function fN(r,e){return r.setValue(SA,e)}function hN(r){return r.deleteValue(SA)}var SA,pN=ee(()=>{"use strict";hu();fu();SA=za("OpenTelemetry Baggage Key")});var CA,bK,mN,gN=ee(()=>{"use strict";ao();uN();lA();pN();iA();co();CA="propagation",bK=new lN,mN=function(){function r(){this.createBaggage=IR,this.getBaggage=TA,this.getActiveBaggage=dN,this.setBaggage=fN,this.deleteBaggage=hN}return r.getInstance=function(){return this._instance||(this._instance=new r),this._instance},r.prototype.setGlobalPropagator=function(e){return Sn(CA,e,Rt.instance())},r.prototype.inject=function(e,t,n){return n===void 0&&(n=Yh),this._getGlobalPropagator().inject(e,t,n)},r.prototype.extract=function(e,t,n){return n===void 0&&(n=$h),this._getGlobalPropagator().extract(e,t,n)},r.prototype.fields=function(){return this._getGlobalPropagator().fields()},r.prototype.disable=function(){Tn(CA,Rt.instance())},r.prototype._getGlobalPropagator=function(){return hr(CA)||bK},r}()});var xA,yN=ee(()=>{"use strict";gN();xA=mN.getInstance()});var OA,vN,bN=ee(()=>{"use strict";ao();bA();np();hA();co();OA="trace",vN=function(){function r(){this._proxyTracerProvider=new yu,this.wrapSpanContext=UR,this.isSpanContextValid=Ga,this.deleteSpan=BR,this.getSpan=tp,this.getActiveSpan=LR,this.getSpanContext=rp,this.setSpan=gu,this.setSpanContext=FR}return r.getInstance=function(){return this._instance||(this._instance=new r),this._instance},r.prototype.setGlobalTracerProvider=function(e){var t=Sn(OA,this._proxyTracerProvider,Rt.instance());return t&&this._proxyTracerProvider.setDelegate(e),t},r.prototype.getTracerProvider=function(){return hr(OA)||this._proxyTracerProvider},r.prototype.getTracer=function(e,t){return this.getTracerProvider().getTracer(e,t)},r.prototype.disable=function(){Tn(OA,Rt.instance()),this._proxyTracerProvider=new yu},r}()});var IA,_N=ee(()=>{"use strict";bN();IA=vN.getInstance()});var AK={};dl(AK,{DiagConsoleLogger:()=>kR,DiagLogLevel:()=>At,INVALID_SPANID:()=>pu,INVALID_SPAN_CONTEXT:()=>Zh,INVALID_TRACEID:()=>mu,ProxyTracer:()=>sp,ProxyTracerProvider:()=>yu,ROOT_CONTEXT:()=>Kh,SamplingDecision:()=>op,SpanKind:()=>ap,SpanStatusCode:()=>cp,TraceFlags:()=>Ha,ValueType:()=>Jh,baggageEntryMetadataFromString:()=>PR,context:()=>AA,createContextKey:()=>za,createNoopMeter:()=>NR,createTraceState:()=>eN,default:()=>_K,defaultTextMapGetter:()=>$h,defaultTextMapSetter:()=>Yh,diag:()=>wA,isSpanContextValid:()=>Ga,isValidSpanId:()=>mA,isValidTraceId:()=>pA,metrics:()=>vu,propagation:()=>xA,trace:()=>IA});var _K,AN=ee(()=>{"use strict";iA();fu();RR();Wh();cA();MR();lA();vA();bA();HR();GR();VR();dA();tN();np();Xh();rN();nN();cN();yN();_N();_K={context:AA,diag:wA,metrics:vu,propagation:xA,trace:IA}});var Ce=m(lp=>{"use strict";Object.defineProperty(lp,"__esModule",{value:!0});lp.isFunction=void 0;function xK(r){return typeof r=="function"}lp.isFunction=xK});var Ji=m(up=>{"use strict";Object.defineProperty(up,"__esModule",{value:!0});up.createErrorClass=void 0;function OK(r){var e=function(n){Error.call(n),n.stack=new Error().stack},t=r(e);return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}up.createErrorClass=OK});var NA=m(dp=>{"use strict";Object.defineProperty(dp,"__esModule",{value:!0});dp.UnsubscriptionError=void 0;var IK=Ji();dp.UnsubscriptionError=IK.createErrorClass(function(r){return function(t){r(this),this.message=t?t.length+` errors occurred during unsubscription:
29
29
  `+t.map(function(n,i){return i+1+") "+n.toString()}).join(`
30
- `):"",this.name="UnsubscriptionError",this.errors=t}})});var ti=m(fp=>{"use strict";Object.defineProperty(fp,"__esModule",{value:!0});fp.arrRemove=void 0;function PK(r,e){if(r){var t=r.indexOf(e);0<=t&&r.splice(t,1)}}fp.arrRemove=PK});var pr=m(tr=>{"use strict";var kN=tr&&tr.__values||function(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},RN=tr&&tr.__read||function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,s=[],o;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(o)throw o.error}}return s},NN=tr&&tr.__spreadArray||function(r,e){for(var t=0,n=e.length,i=r.length;t<n;t++,i++)r[i]=e[t];return r};Object.defineProperty(tr,"__esModule",{value:!0});tr.isSubscription=tr.EMPTY_SUBSCRIPTION=tr.Subscription=void 0;var _u=Ce(),MA=NA(),MN=ti(),DA=function(){function r(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return r.prototype.unsubscribe=function(){var e,t,n,i,s;if(!this.closed){this.closed=!0;var o=this._parentage;if(o)if(this._parentage=null,Array.isArray(o))try{for(var a=kN(o),c=a.next();!c.done;c=a.next()){var l=c.value;l.remove(this)}}catch(p){e={error:p}}finally{try{c&&!c.done&&(t=a.return)&&t.call(a)}finally{if(e)throw e.error}}else o.remove(this);var u=this.initialTeardown;if(_u.isFunction(u))try{u()}catch(p){s=p instanceof MA.UnsubscriptionError?p.errors:[p]}var d=this._finalizers;if(d){this._finalizers=null;try{for(var f=kN(d),h=f.next();!h.done;h=f.next()){var g=h.value;try{DN(g)}catch(p){s=s??[],p instanceof MA.UnsubscriptionError?s=NN(NN([],RN(s)),RN(p.errors)):s.push(p)}}}catch(p){n={error:p}}finally{try{h&&!h.done&&(i=f.return)&&i.call(f)}finally{if(n)throw n.error}}}if(s)throw new MA.UnsubscriptionError(s)}},r.prototype.add=function(e){var t;if(e&&e!==this)if(this.closed)DN(e);else{if(e instanceof r){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=(t=this._finalizers)!==null&&t!==void 0?t:[]).push(e)}},r.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},r.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},r.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&MN.arrRemove(t,e)},r.prototype.remove=function(e){var t=this._finalizers;t&&MN.arrRemove(t,e),e instanceof r&&e._removeParent(this)},r.EMPTY=function(){var e=new r;return e.closed=!0,e}(),r}();tr.Subscription=DA;tr.EMPTY_SUBSCRIPTION=DA.EMPTY;function kK(r){return r instanceof DA||r&&"closed"in r&&_u.isFunction(r.remove)&&_u.isFunction(r.add)&&_u.isFunction(r.unsubscribe)}tr.isSubscription=kK;function DN(r){_u.isFunction(r)?r():r.unsubscribe()}});var Qa=m(hp=>{"use strict";Object.defineProperty(hp,"__esModule",{value:!0});hp.config=void 0;hp.config={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1}});var qA=m(Cn=>{"use strict";var qN=Cn&&Cn.__read||function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,s=[],o;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(o)throw o.error}}return s},LN=Cn&&Cn.__spreadArray||function(r,e){for(var t=0,n=e.length,i=r.length;t<n;t++,i++)r[i]=e[t];return r};Object.defineProperty(Cn,"__esModule",{value:!0});Cn.timeoutProvider=void 0;Cn.timeoutProvider={setTimeout:function(r,e){for(var t=[],n=2;n<arguments.length;n++)t[n-2]=arguments[n];var i=Cn.timeoutProvider.delegate;return i?.setTimeout?i.setTimeout.apply(i,LN([r,e],qN(t))):setTimeout.apply(void 0,LN([r,e],qN(t)))},clearTimeout:function(r){var e=Cn.timeoutProvider.delegate;return(e?.clearTimeout||clearTimeout)(r)},delegate:void 0}});var LA=m(pp=>{"use strict";Object.defineProperty(pp,"__esModule",{value:!0});pp.reportUnhandledError=void 0;var RK=Qa(),NK=qA();function MK(r){NK.timeoutProvider.setTimeout(function(){var e=RK.config.onUnhandledError;if(e)e(r);else throw r})}pp.reportUnhandledError=MK});var wt=m(mp=>{"use strict";Object.defineProperty(mp,"__esModule",{value:!0});mp.noop=void 0;function DK(){}mp.noop=DK});var BN=m(xn=>{"use strict";Object.defineProperty(xn,"__esModule",{value:!0});xn.createNotification=xn.nextNotification=xn.errorNotification=xn.COMPLETE_NOTIFICATION=void 0;xn.COMPLETE_NOTIFICATION=function(){return gp("C",void 0,void 0)}();function qK(r){return gp("E",void 0,r)}xn.errorNotification=qK;function LK(r){return gp("N",r,void 0)}xn.nextNotification=LK;function gp(r,e,t){return{kind:r,value:e,error:t}}xn.createNotification=gp});var yp=m(Ja=>{"use strict";Object.defineProperty(Ja,"__esModule",{value:!0});Ja.captureError=Ja.errorContext=void 0;var FN=Qa(),fo=null;function BK(r){if(FN.config.useDeprecatedSynchronousErrorHandling){var e=!fo;if(e&&(fo={errorThrown:!1,error:null}),r(),e){var t=fo,n=t.errorThrown,i=t.error;if(fo=null,n)throw i}}else r()}Ja.errorContext=BK;function FK(r){FN.config.useDeprecatedSynchronousErrorHandling&&fo&&(fo.errorThrown=!0,fo.error=r)}Ja.captureError=FK});var $a=m(Qr=>{"use strict";var zN=Qr&&Qr.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}();Object.defineProperty(Qr,"__esModule",{value:!0});Qr.EMPTY_OBSERVER=Qr.SafeSubscriber=Qr.Subscriber=void 0;var UK=Ce(),UN=pr(),jA=Qa(),jK=LA(),jN=wt(),BA=BN(),zK=qA(),HK=yp(),HN=function(r){zN(e,r);function e(t){var n=r.call(this)||this;return n.isStopped=!1,t?(n.destination=t,UN.isSubscription(t)&&t.add(n)):n.destination=Qr.EMPTY_OBSERVER,n}return e.create=function(t,n,i){return new GN(t,n,i)},e.prototype.next=function(t){this.isStopped?UA(BA.nextNotification(t),this):this._next(t)},e.prototype.error=function(t){this.isStopped?UA(BA.errorNotification(t),this):(this.isStopped=!0,this._error(t))},e.prototype.complete=function(){this.isStopped?UA(BA.COMPLETE_NOTIFICATION,this):(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,r.prototype.unsubscribe.call(this),this.destination=null)},e.prototype._next=function(t){this.destination.next(t)},e.prototype._error=function(t){try{this.destination.error(t)}finally{this.unsubscribe()}},e.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},e}(UN.Subscription);Qr.Subscriber=HN;var GK=Function.prototype.bind;function FA(r,e){return GK.call(r,e)}var VK=function(){function r(e){this.partialObserver=e}return r.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(n){vp(n)}},r.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(n){vp(n)}else vp(e)},r.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(t){vp(t)}},r}(),GN=function(r){zN(e,r);function e(t,n,i){var s=r.call(this)||this,o;if(UK.isFunction(t)||!t)o={next:t??void 0,error:n??void 0,complete:i??void 0};else{var a;s&&jA.config.useDeprecatedNextContext?(a=Object.create(t),a.unsubscribe=function(){return s.unsubscribe()},o={next:t.next&&FA(t.next,a),error:t.error&&FA(t.error,a),complete:t.complete&&FA(t.complete,a)}):o=t}return s.destination=new VK(o),s}return e}(HN);Qr.SafeSubscriber=GN;function vp(r){jA.config.useDeprecatedSynchronousErrorHandling?HK.captureError(r):jK.reportUnhandledError(r)}function WK(r){throw r}function UA(r,e){var t=jA.config.onStoppedNotification;t&&zK.timeoutProvider.setTimeout(function(){return t(r,e)})}Qr.EMPTY_OBSERVER={closed:!0,next:jN.noop,error:WK,complete:jN.noop}});var Au=m(bp=>{"use strict";Object.defineProperty(bp,"__esModule",{value:!0});bp.observable=void 0;bp.observable=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}()});var Et=m(_p=>{"use strict";Object.defineProperty(_p,"__esModule",{value:!0});_p.identity=void 0;function KK(r){return r}_p.identity=KK});var wu=m(Ya=>{"use strict";Object.defineProperty(Ya,"__esModule",{value:!0});Ya.pipeFromArray=Ya.pipe=void 0;var QK=Et();function JK(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];return VN(r)}Ya.pipe=JK;function VN(r){return r.length===0?QK.identity:r.length===1?r[0]:function(t){return r.reduce(function(n,i){return i(n)},t)}}Ya.pipeFromArray=VN});var Pe=m(Ap=>{"use strict";Object.defineProperty(Ap,"__esModule",{value:!0});Ap.Observable=void 0;var HA=$a(),$K=pr(),YK=Au(),ZK=wu(),XK=Qa(),zA=Ce(),eQ=yp(),tQ=function(){function r(e){e&&(this._subscribe=e)}return r.prototype.lift=function(e){var t=new r;return t.source=this,t.operator=e,t},r.prototype.subscribe=function(e,t,n){var i=this,s=nQ(e)?e:new HA.SafeSubscriber(e,t,n);return eQ.errorContext(function(){var o=i,a=o.operator,c=o.source;s.add(a?a.call(s,c):c?i._subscribe(s):i._trySubscribe(s))}),s},r.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){e.error(t)}},r.prototype.forEach=function(e,t){var n=this;return t=WN(t),new t(function(i,s){var o=new HA.SafeSubscriber({next:function(a){try{e(a)}catch(c){s(c),o.unsubscribe()}},error:s,complete:i});n.subscribe(o)})},r.prototype._subscribe=function(e){var t;return(t=this.source)===null||t===void 0?void 0:t.subscribe(e)},r.prototype[YK.observable]=function(){return this},r.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return ZK.pipeFromArray(e)(this)},r.prototype.toPromise=function(e){var t=this;return e=WN(e),new e(function(n,i){var s;t.subscribe(function(o){return s=o},function(o){return i(o)},function(){return n(s)})})},r.create=function(e){return new r(e)},r}();Ap.Observable=tQ;function WN(r){var e;return(e=r??XK.config.Promise)!==null&&e!==void 0?e:Promise}function rQ(r){return r&&zA.isFunction(r.next)&&zA.isFunction(r.error)&&zA.isFunction(r.complete)}function nQ(r){return r&&r instanceof HA.Subscriber||rQ(r)&&$K.isSubscription(r)}});var K=m(Za=>{"use strict";Object.defineProperty(Za,"__esModule",{value:!0});Za.operate=Za.hasLift=void 0;var iQ=Ce();function KN(r){return iQ.isFunction(r?.lift)}Za.hasLift=KN;function sQ(r){return function(e){if(KN(e))return e.lift(function(t){try{return r(t,this)}catch(n){this.error(n)}});throw new TypeError("Unable to lift unknown Observable type")}}Za.operate=sQ});var te=m($i=>{"use strict";var oQ=$i&&$i.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}();Object.defineProperty($i,"__esModule",{value:!0});$i.OperatorSubscriber=$i.createOperatorSubscriber=void 0;var aQ=$a();function cQ(r,e,t,n,i){return new QN(r,e,t,n,i)}$i.createOperatorSubscriber=cQ;var QN=function(r){oQ(e,r);function e(t,n,i,s,o,a){var c=r.call(this,t)||this;return c.onFinalize=o,c.shouldUnsubscribe=a,c._next=n?function(l){try{n(l)}catch(u){t.error(u)}}:r.prototype._next,c._error=s?function(l){try{s(l)}catch(u){t.error(u)}finally{this.unsubscribe()}}:r.prototype._error,c._complete=i?function(){try{i()}catch(l){t.error(l)}finally{this.unsubscribe()}}:r.prototype._complete,c}return e.prototype.unsubscribe=function(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var n=this.closed;r.prototype.unsubscribe.call(this),!n&&((t=this.onFinalize)===null||t===void 0||t.call(this))}},e}(aQ.Subscriber);$i.OperatorSubscriber=QN});var GA=m(wp=>{"use strict";Object.defineProperty(wp,"__esModule",{value:!0});wp.refCount=void 0;var lQ=K(),uQ=te();function dQ(){return lQ.operate(function(r,e){var t=null;r._refCount++;var n=uQ.createOperatorSubscriber(e,void 0,void 0,void 0,function(){if(!r||r._refCount<=0||0<--r._refCount){t=null;return}var i=r._connection,s=t;t=null,i&&(!s||i===s)&&i.unsubscribe(),e.unsubscribe()});r.subscribe(n),n.closed||(t=r.connect())})}wp.refCount=dQ});var Eu=m(Xa=>{"use strict";var fQ=Xa&&Xa.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}();Object.defineProperty(Xa,"__esModule",{value:!0});Xa.ConnectableObservable=void 0;var hQ=Pe(),JN=pr(),pQ=GA(),mQ=te(),gQ=K(),yQ=function(r){fQ(e,r);function e(t,n){var i=r.call(this)||this;return i.source=t,i.subjectFactory=n,i._subject=null,i._refCount=0,i._connection=null,gQ.hasLift(t)&&(i.lift=t.lift),i}return e.prototype._subscribe=function(t){return this.getSubject().subscribe(t)},e.prototype.getSubject=function(){var t=this._subject;return(!t||t.isStopped)&&(this._subject=this.subjectFactory()),this._subject},e.prototype._teardown=function(){this._refCount=0;var t=this._connection;this._subject=this._connection=null,t?.unsubscribe()},e.prototype.connect=function(){var t=this,n=this._connection;if(!n){n=this._connection=new JN.Subscription;var i=this.getSubject();n.add(this.source.subscribe(mQ.createOperatorSubscriber(i,void 0,function(){t._teardown(),i.complete()},function(s){t._teardown(),i.error(s)},function(){return t._teardown()}))),n.closed&&(this._connection=null,n=JN.Subscription.EMPTY)}return n},e.prototype.refCount=function(){return pQ.refCount()(this)},e}(hQ.Observable);Xa.ConnectableObservable=yQ});var $N=m(Su=>{"use strict";Object.defineProperty(Su,"__esModule",{value:!0});Su.performanceTimestampProvider=void 0;Su.performanceTimestampProvider={now:function(){return(Su.performanceTimestampProvider.delegate||performance).now()},delegate:void 0}});var VA=m(Jr=>{"use strict";var YN=Jr&&Jr.__read||function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,s=[],o;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(o)throw o.error}}return s},ZN=Jr&&Jr.__spreadArray||function(r,e){for(var t=0,n=e.length,i=r.length;t<n;t++,i++)r[i]=e[t];return r};Object.defineProperty(Jr,"__esModule",{value:!0});Jr.animationFrameProvider=void 0;var vQ=pr();Jr.animationFrameProvider={schedule:function(r){var e=requestAnimationFrame,t=cancelAnimationFrame,n=Jr.animationFrameProvider.delegate;n&&(e=n.requestAnimationFrame,t=n.cancelAnimationFrame);var i=e(function(s){t=void 0,r(s)});return new vQ.Subscription(function(){return t?.(i)})},requestAnimationFrame:function(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var t=Jr.animationFrameProvider.delegate;return(t?.requestAnimationFrame||requestAnimationFrame).apply(void 0,ZN([],YN(r)))},cancelAnimationFrame:function(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var t=Jr.animationFrameProvider.delegate;return(t?.cancelAnimationFrame||cancelAnimationFrame).apply(void 0,ZN([],YN(r)))},delegate:void 0}});var tM=m(Ep=>{"use strict";Object.defineProperty(Ep,"__esModule",{value:!0});Ep.animationFrames=void 0;var bQ=Pe(),_Q=$N(),XN=VA();function AQ(r){return r?eM(r):wQ}Ep.animationFrames=AQ;function eM(r){return new bQ.Observable(function(e){var t=r||_Q.performanceTimestampProvider,n=t.now(),i=0,s=function(){e.closed||(i=XN.animationFrameProvider.requestAnimationFrame(function(o){i=0;var a=t.now();e.next({timestamp:r?a:o,elapsed:a-n}),s()}))};return s(),function(){i&&XN.animationFrameProvider.cancelAnimationFrame(i)}})}var wQ=eM()});var WA=m(Sp=>{"use strict";Object.defineProperty(Sp,"__esModule",{value:!0});Sp.ObjectUnsubscribedError=void 0;var EQ=Ji();Sp.ObjectUnsubscribedError=EQ.createErrorClass(function(r){return function(){r(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}})});var St=m(On=>{"use strict";var nM=On&&On.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),SQ=On&&On.__values||function(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(On,"__esModule",{value:!0});On.AnonymousSubject=On.Subject=void 0;var rM=Pe(),QA=pr(),TQ=WA(),CQ=ti(),KA=yp(),iM=function(r){nM(e,r);function e(){var t=r.call(this)||this;return t.closed=!1,t.currentObservers=null,t.observers=[],t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return e.prototype.lift=function(t){var n=new JA(this,this);return n.operator=t,n},e.prototype._throwIfClosed=function(){if(this.closed)throw new TQ.ObjectUnsubscribedError},e.prototype.next=function(t){var n=this;KA.errorContext(function(){var i,s;if(n._throwIfClosed(),!n.isStopped){n.currentObservers||(n.currentObservers=Array.from(n.observers));try{for(var o=SQ(n.currentObservers),a=o.next();!a.done;a=o.next()){var c=a.value;c.next(t)}}catch(l){i={error:l}}finally{try{a&&!a.done&&(s=o.return)&&s.call(o)}finally{if(i)throw i.error}}}})},e.prototype.error=function(t){var n=this;KA.errorContext(function(){if(n._throwIfClosed(),!n.isStopped){n.hasError=n.isStopped=!0,n.thrownError=t;for(var i=n.observers;i.length;)i.shift().error(t)}})},e.prototype.complete=function(){var t=this;KA.errorContext(function(){if(t._throwIfClosed(),!t.isStopped){t.isStopped=!0;for(var n=t.observers;n.length;)n.shift().complete()}})},e.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(e.prototype,"observed",{get:function(){var t;return((t=this.observers)===null||t===void 0?void 0:t.length)>0},enumerable:!1,configurable:!0}),e.prototype._trySubscribe=function(t){return this._throwIfClosed(),r.prototype._trySubscribe.call(this,t)},e.prototype._subscribe=function(t){return this._throwIfClosed(),this._checkFinalizedStatuses(t),this._innerSubscribe(t)},e.prototype._innerSubscribe=function(t){var n=this,i=this,s=i.hasError,o=i.isStopped,a=i.observers;return s||o?QA.EMPTY_SUBSCRIPTION:(this.currentObservers=null,a.push(t),new QA.Subscription(function(){n.currentObservers=null,CQ.arrRemove(a,t)}))},e.prototype._checkFinalizedStatuses=function(t){var n=this,i=n.hasError,s=n.thrownError,o=n.isStopped;i?t.error(s):o&&t.complete()},e.prototype.asObservable=function(){var t=new rM.Observable;return t.source=this,t},e.create=function(t,n){return new JA(t,n)},e}(rM.Observable);On.Subject=iM;var JA=function(r){nM(e,r);function e(t,n){var i=r.call(this)||this;return i.destination=t,i.source=n,i}return e.prototype.next=function(t){var n,i;(i=(n=this.destination)===null||n===void 0?void 0:n.next)===null||i===void 0||i.call(n,t)},e.prototype.error=function(t){var n,i;(i=(n=this.destination)===null||n===void 0?void 0:n.error)===null||i===void 0||i.call(n,t)},e.prototype.complete=function(){var t,n;(n=(t=this.destination)===null||t===void 0?void 0:t.complete)===null||n===void 0||n.call(t)},e.prototype._subscribe=function(t){var n,i;return(i=(n=this.source)===null||n===void 0?void 0:n.subscribe(t))!==null&&i!==void 0?i:QA.EMPTY_SUBSCRIPTION},e}(iM);On.AnonymousSubject=JA});var $A=m(ec=>{"use strict";var xQ=ec&&ec.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}();Object.defineProperty(ec,"__esModule",{value:!0});ec.BehaviorSubject=void 0;var OQ=St(),IQ=function(r){xQ(e,r);function e(t){var n=r.call(this)||this;return n._value=t,n}return Object.defineProperty(e.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),e.prototype._subscribe=function(t){var n=r.prototype._subscribe.call(this,t);return!n.closed&&t.next(this._value),n},e.prototype.getValue=function(){var t=this,n=t.hasError,i=t.thrownError,s=t._value;if(n)throw i;return this._throwIfClosed(),s},e.prototype.next=function(t){r.prototype.next.call(this,this._value=t)},e}(OQ.Subject);ec.BehaviorSubject=IQ});var Tp=m(Tu=>{"use strict";Object.defineProperty(Tu,"__esModule",{value:!0});Tu.dateTimestampProvider=void 0;Tu.dateTimestampProvider={now:function(){return(Tu.dateTimestampProvider.delegate||Date).now()},delegate:void 0}});var Cp=m(tc=>{"use strict";var PQ=tc&&tc.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}();Object.defineProperty(tc,"__esModule",{value:!0});tc.ReplaySubject=void 0;var kQ=St(),RQ=Tp(),NQ=function(r){PQ(e,r);function e(t,n,i){t===void 0&&(t=1/0),n===void 0&&(n=1/0),i===void 0&&(i=RQ.dateTimestampProvider);var s=r.call(this)||this;return s._bufferSize=t,s._windowTime=n,s._timestampProvider=i,s._buffer=[],s._infiniteTimeWindow=!0,s._infiniteTimeWindow=n===1/0,s._bufferSize=Math.max(1,t),s._windowTime=Math.max(1,n),s}return e.prototype.next=function(t){var n=this,i=n.isStopped,s=n._buffer,o=n._infiniteTimeWindow,a=n._timestampProvider,c=n._windowTime;i||(s.push(t),!o&&s.push(a.now()+c)),this._trimBuffer(),r.prototype.next.call(this,t)},e.prototype._subscribe=function(t){this._throwIfClosed(),this._trimBuffer();for(var n=this._innerSubscribe(t),i=this,s=i._infiniteTimeWindow,o=i._buffer,a=o.slice(),c=0;c<a.length&&!t.closed;c+=s?1:2)t.next(a[c]);return this._checkFinalizedStatuses(t),n},e.prototype._trimBuffer=function(){var t=this,n=t._bufferSize,i=t._timestampProvider,s=t._buffer,o=t._infiniteTimeWindow,a=(o?1:2)*n;if(n<1/0&&a<s.length&&s.splice(0,s.length-a),!o){for(var c=i.now(),l=0,u=1;u<s.length&&s[u]<=c;u+=2)l=u;l&&s.splice(0,l+1)}},e}(kQ.Subject);tc.ReplaySubject=NQ});var xp=m(rc=>{"use strict";var MQ=rc&&rc.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}();Object.defineProperty(rc,"__esModule",{value:!0});rc.AsyncSubject=void 0;var DQ=St(),qQ=function(r){MQ(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t._value=null,t._hasValue=!1,t._isComplete=!1,t}return e.prototype._checkFinalizedStatuses=function(t){var n=this,i=n.hasError,s=n._hasValue,o=n._value,a=n.thrownError,c=n.isStopped,l=n._isComplete;i?t.error(a):(c||l)&&(s&&t.next(o),t.complete())},e.prototype.next=function(t){this.isStopped||(this._value=t,this._hasValue=!0)},e.prototype.complete=function(){var t=this,n=t._hasValue,i=t._value,s=t._isComplete;s||(this._isComplete=!0,n&&r.prototype.next.call(this,i),r.prototype.complete.call(this))},e}(DQ.Subject);rc.AsyncSubject=qQ});var sM=m(nc=>{"use strict";var LQ=nc&&nc.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}();Object.defineProperty(nc,"__esModule",{value:!0});nc.Action=void 0;var BQ=pr(),FQ=function(r){LQ(e,r);function e(t,n){return r.call(this)||this}return e.prototype.schedule=function(t,n){return n===void 0&&(n=0),this},e}(BQ.Subscription);nc.Action=FQ});var cM=m(In=>{"use strict";var oM=In&&In.__read||function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,s=[],o;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(o)throw o.error}}return s},aM=In&&In.__spreadArray||function(r,e){for(var t=0,n=e.length,i=r.length;t<n;t++,i++)r[i]=e[t];return r};Object.defineProperty(In,"__esModule",{value:!0});In.intervalProvider=void 0;In.intervalProvider={setInterval:function(r,e){for(var t=[],n=2;n<arguments.length;n++)t[n-2]=arguments[n];var i=In.intervalProvider.delegate;return i?.setInterval?i.setInterval.apply(i,aM([r,e],oM(t))):setInterval.apply(void 0,aM([r,e],oM(t)))},clearInterval:function(r){var e=In.intervalProvider.delegate;return(e?.clearInterval||clearInterval)(r)},delegate:void 0}});var sc=m(ic=>{"use strict";var UQ=ic&&ic.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}();Object.defineProperty(ic,"__esModule",{value:!0});ic.AsyncAction=void 0;var jQ=sM(),lM=cM(),zQ=ti(),HQ=function(r){UQ(e,r);function e(t,n){var i=r.call(this,t,n)||this;return i.scheduler=t,i.work=n,i.pending=!1,i}return e.prototype.schedule=function(t,n){var i;if(n===void 0&&(n=0),this.closed)return this;this.state=t;var s=this.id,o=this.scheduler;return s!=null&&(this.id=this.recycleAsyncId(o,s,n)),this.pending=!0,this.delay=n,this.id=(i=this.id)!==null&&i!==void 0?i:this.requestAsyncId(o,this.id,n),this},e.prototype.requestAsyncId=function(t,n,i){return i===void 0&&(i=0),lM.intervalProvider.setInterval(t.flush.bind(t,this),i)},e.prototype.recycleAsyncId=function(t,n,i){if(i===void 0&&(i=0),i!=null&&this.delay===i&&this.pending===!1)return n;n!=null&&lM.intervalProvider.clearInterval(n)},e.prototype.execute=function(t,n){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var i=this._execute(t,n);if(i)return i;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},e.prototype._execute=function(t,n){var i=!1,s;try{this.work(t)}catch(o){i=!0,s=o||new Error("Scheduled action threw falsy error")}if(i)return this.unsubscribe(),s},e.prototype.unsubscribe=function(){if(!this.closed){var t=this,n=t.id,i=t.scheduler,s=i.actions;this.work=this.state=this.scheduler=null,this.pending=!1,zQ.arrRemove(s,this),n!=null&&(this.id=this.recycleAsyncId(i,n,null)),this.delay=null,r.prototype.unsubscribe.call(this)}},e}(jQ.Action);ic.AsyncAction=HQ});var dM=m(oc=>{"use strict";Object.defineProperty(oc,"__esModule",{value:!0});oc.TestTools=oc.Immediate=void 0;var GQ=1,YA,Op={};function uM(r){return r in Op?(delete Op[r],!0):!1}oc.Immediate={setImmediate:function(r){var e=GQ++;return Op[e]=!0,YA||(YA=Promise.resolve()),YA.then(function(){return uM(e)&&r()}),e},clearImmediate:function(r){uM(r)}};oc.TestTools={pending:function(){return Object.keys(Op).length}}});var hM=m(Pn=>{"use strict";var VQ=Pn&&Pn.__read||function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,s=[],o;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(o)throw o.error}}return s},WQ=Pn&&Pn.__spreadArray||function(r,e){for(var t=0,n=e.length,i=r.length;t<n;t++,i++)r[i]=e[t];return r};Object.defineProperty(Pn,"__esModule",{value:!0});Pn.immediateProvider=void 0;var fM=dM(),KQ=fM.Immediate.setImmediate,QQ=fM.Immediate.clearImmediate;Pn.immediateProvider={setImmediate:function(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var t=Pn.immediateProvider.delegate;return(t?.setImmediate||KQ).apply(void 0,WQ([],VQ(r)))},clearImmediate:function(r){var e=Pn.immediateProvider.delegate;return(e?.clearImmediate||QQ)(r)},delegate:void 0}});var mM=m(ac=>{"use strict";var JQ=ac&&ac.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}();Object.defineProperty(ac,"__esModule",{value:!0});ac.AsapAction=void 0;var $Q=sc(),pM=hM(),YQ=function(r){JQ(e,r);function e(t,n){var i=r.call(this,t,n)||this;return i.scheduler=t,i.work=n,i}return e.prototype.requestAsyncId=function(t,n,i){return i===void 0&&(i=0),i!==null&&i>0?r.prototype.requestAsyncId.call(this,t,n,i):(t.actions.push(this),t._scheduled||(t._scheduled=pM.immediateProvider.setImmediate(t.flush.bind(t,void 0))))},e.prototype.recycleAsyncId=function(t,n,i){var s;if(i===void 0&&(i=0),i!=null?i>0:this.delay>0)return r.prototype.recycleAsyncId.call(this,t,n,i);var o=t.actions;n!=null&&((s=o[o.length-1])===null||s===void 0?void 0:s.id)!==n&&(pM.immediateProvider.clearImmediate(n),t._scheduled===n&&(t._scheduled=void 0))},e}($Q.AsyncAction);ac.AsapAction=YQ});var ZA=m(Ip=>{"use strict";Object.defineProperty(Ip,"__esModule",{value:!0});Ip.Scheduler=void 0;var ZQ=Tp(),XQ=function(){function r(e,t){t===void 0&&(t=r.now),this.schedulerActionCtor=e,this.now=t}return r.prototype.schedule=function(e,t,n){return t===void 0&&(t=0),new this.schedulerActionCtor(this,e).schedule(n,t)},r.now=ZQ.dateTimestampProvider.now,r}();Ip.Scheduler=XQ});var lc=m(cc=>{"use strict";var eJ=cc&&cc.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}();Object.defineProperty(cc,"__esModule",{value:!0});cc.AsyncScheduler=void 0;var gM=ZA(),tJ=function(r){eJ(e,r);function e(t,n){n===void 0&&(n=gM.Scheduler.now);var i=r.call(this,t,n)||this;return i.actions=[],i._active=!1,i}return e.prototype.flush=function(t){var n=this.actions;if(this._active){n.push(t);return}var i;this._active=!0;do if(i=t.execute(t.state,t.delay))break;while(t=n.shift());if(this._active=!1,i){for(;t=n.shift();)t.unsubscribe();throw i}},e}(gM.Scheduler);cc.AsyncScheduler=tJ});var yM=m(uc=>{"use strict";var rJ=uc&&uc.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}();Object.defineProperty(uc,"__esModule",{value:!0});uc.AsapScheduler=void 0;var nJ=lc(),iJ=function(r){rJ(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.flush=function(t){this._active=!0;var n=this._scheduled;this._scheduled=void 0;var i=this.actions,s;t=t||i.shift();do if(s=t.execute(t.state,t.delay))break;while((t=i[0])&&t.id===n&&i.shift());if(this._active=!1,s){for(;(t=i[0])&&t.id===n&&i.shift();)t.unsubscribe();throw s}},e}(nJ.AsyncScheduler);uc.AsapScheduler=iJ});var vM=m(ho=>{"use strict";Object.defineProperty(ho,"__esModule",{value:!0});ho.asap=ho.asapScheduler=void 0;var sJ=mM(),oJ=yM();ho.asapScheduler=new oJ.AsapScheduler(sJ.AsapAction);ho.asap=ho.asapScheduler});var rr=m(po=>{"use strict";Object.defineProperty(po,"__esModule",{value:!0});po.async=po.asyncScheduler=void 0;var aJ=sc(),cJ=lc();po.asyncScheduler=new cJ.AsyncScheduler(aJ.AsyncAction);po.async=po.asyncScheduler});var bM=m(dc=>{"use strict";var lJ=dc&&dc.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}();Object.defineProperty(dc,"__esModule",{value:!0});dc.QueueAction=void 0;var uJ=sc(),dJ=function(r){lJ(e,r);function e(t,n){var i=r.call(this,t,n)||this;return i.scheduler=t,i.work=n,i}return e.prototype.schedule=function(t,n){return n===void 0&&(n=0),n>0?r.prototype.schedule.call(this,t,n):(this.delay=n,this.state=t,this.scheduler.flush(this),this)},e.prototype.execute=function(t,n){return n>0||this.closed?r.prototype.execute.call(this,t,n):this._execute(t,n)},e.prototype.requestAsyncId=function(t,n,i){return i===void 0&&(i=0),i!=null&&i>0||i==null&&this.delay>0?r.prototype.requestAsyncId.call(this,t,n,i):(t.flush(this),0)},e}(uJ.AsyncAction);dc.QueueAction=dJ});var _M=m(fc=>{"use strict";var fJ=fc&&fc.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}();Object.defineProperty(fc,"__esModule",{value:!0});fc.QueueScheduler=void 0;var hJ=lc(),pJ=function(r){fJ(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e}(hJ.AsyncScheduler);fc.QueueScheduler=pJ});var AM=m(mo=>{"use strict";Object.defineProperty(mo,"__esModule",{value:!0});mo.queue=mo.queueScheduler=void 0;var mJ=bM(),gJ=_M();mo.queueScheduler=new gJ.QueueScheduler(mJ.QueueAction);mo.queue=mo.queueScheduler});var EM=m(hc=>{"use strict";var yJ=hc&&hc.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}();Object.defineProperty(hc,"__esModule",{value:!0});hc.AnimationFrameAction=void 0;var vJ=sc(),wM=VA(),bJ=function(r){yJ(e,r);function e(t,n){var i=r.call(this,t,n)||this;return i.scheduler=t,i.work=n,i}return e.prototype.requestAsyncId=function(t,n,i){return i===void 0&&(i=0),i!==null&&i>0?r.prototype.requestAsyncId.call(this,t,n,i):(t.actions.push(this),t._scheduled||(t._scheduled=wM.animationFrameProvider.requestAnimationFrame(function(){return t.flush(void 0)})))},e.prototype.recycleAsyncId=function(t,n,i){var s;if(i===void 0&&(i=0),i!=null?i>0:this.delay>0)return r.prototype.recycleAsyncId.call(this,t,n,i);var o=t.actions;n!=null&&((s=o[o.length-1])===null||s===void 0?void 0:s.id)!==n&&(wM.animationFrameProvider.cancelAnimationFrame(n),t._scheduled=void 0)},e}(vJ.AsyncAction);hc.AnimationFrameAction=bJ});var SM=m(pc=>{"use strict";var _J=pc&&pc.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}();Object.defineProperty(pc,"__esModule",{value:!0});pc.AnimationFrameScheduler=void 0;var AJ=lc(),wJ=function(r){_J(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.flush=function(t){this._active=!0;var n=this._scheduled;this._scheduled=void 0;var i=this.actions,s;t=t||i.shift();do if(s=t.execute(t.state,t.delay))break;while((t=i[0])&&t.id===n&&i.shift());if(this._active=!1,s){for(;(t=i[0])&&t.id===n&&i.shift();)t.unsubscribe();throw s}},e}(AJ.AsyncScheduler);pc.AnimationFrameScheduler=wJ});var TM=m(go=>{"use strict";Object.defineProperty(go,"__esModule",{value:!0});go.animationFrame=go.animationFrameScheduler=void 0;var EJ=EM(),SJ=SM();go.animationFrameScheduler=new SJ.AnimationFrameScheduler(EJ.AnimationFrameAction);go.animationFrame=go.animationFrameScheduler});var OM=m(Yi=>{"use strict";var CM=Yi&&Yi.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}();Object.defineProperty(Yi,"__esModule",{value:!0});Yi.VirtualAction=Yi.VirtualTimeScheduler=void 0;var TJ=sc(),CJ=pr(),xJ=lc(),OJ=function(r){CM(e,r);function e(t,n){t===void 0&&(t=xM),n===void 0&&(n=1/0);var i=r.call(this,t,function(){return i.frame})||this;return i.maxFrames=n,i.frame=0,i.index=-1,i}return e.prototype.flush=function(){for(var t=this,n=t.actions,i=t.maxFrames,s,o;(o=n[0])&&o.delay<=i&&(n.shift(),this.frame=o.delay,!(s=o.execute(o.state,o.delay))););if(s){for(;o=n.shift();)o.unsubscribe();throw s}},e.frameTimeFactor=10,e}(xJ.AsyncScheduler);Yi.VirtualTimeScheduler=OJ;var xM=function(r){CM(e,r);function e(t,n,i){i===void 0&&(i=t.index+=1);var s=r.call(this,t,n)||this;return s.scheduler=t,s.work=n,s.index=i,s.active=!0,s.index=t.index=i,s}return e.prototype.schedule=function(t,n){if(n===void 0&&(n=0),Number.isFinite(n)){if(!this.id)return r.prototype.schedule.call(this,t,n);this.active=!1;var i=new e(this.scheduler,this.work);return this.add(i),i.schedule(t,n)}else return CJ.Subscription.EMPTY},e.prototype.requestAsyncId=function(t,n,i){i===void 0&&(i=0),this.delay=t.frame+i;var s=t.actions;return s.push(this),s.sort(e.sortActions),1},e.prototype.recycleAsyncId=function(t,n,i){i===void 0&&(i=0)},e.prototype._execute=function(t,n){if(this.active===!0)return r.prototype._execute.call(this,t,n)},e.sortActions=function(t,n){return t.delay===n.delay?t.index===n.index?0:t.index>n.index?1:-1:t.delay>n.delay?1:-1},e}(TJ.AsyncAction);Yi.VirtualAction=xM});var $r=m(yo=>{"use strict";Object.defineProperty(yo,"__esModule",{value:!0});yo.empty=yo.EMPTY=void 0;var IM=Pe();yo.EMPTY=new IM.Observable(function(r){return r.complete()});function IJ(r){return r?PJ(r):yo.EMPTY}yo.empty=IJ;function PJ(r){return new IM.Observable(function(e){return r.schedule(function(){return e.complete()})})}});var Cu=m(Pp=>{"use strict";Object.defineProperty(Pp,"__esModule",{value:!0});Pp.isScheduler=void 0;var kJ=Ce();function RJ(r){return r&&kJ.isFunction(r.schedule)}Pp.isScheduler=RJ});var nr=m(Zi=>{"use strict";Object.defineProperty(Zi,"__esModule",{value:!0});Zi.popNumber=Zi.popScheduler=Zi.popResultSelector=void 0;var NJ=Ce(),MJ=Cu();function XA(r){return r[r.length-1]}function DJ(r){return NJ.isFunction(XA(r))?r.pop():void 0}Zi.popResultSelector=DJ;function qJ(r){return MJ.isScheduler(XA(r))?r.pop():void 0}Zi.popScheduler=qJ;function LJ(r,e){return typeof XA(r)=="number"?r.pop():e}Zi.popNumber=LJ});var Rp=m(kp=>{"use strict";Object.defineProperty(kp,"__esModule",{value:!0});kp.isArrayLike=void 0;kp.isArrayLike=function(r){return r&&typeof r.length=="number"&&typeof r!="function"}});var ew=m(Np=>{"use strict";Object.defineProperty(Np,"__esModule",{value:!0});Np.isPromise=void 0;var BJ=Ce();function FJ(r){return BJ.isFunction(r?.then)}Np.isPromise=FJ});var tw=m(Mp=>{"use strict";Object.defineProperty(Mp,"__esModule",{value:!0});Mp.isInteropObservable=void 0;var UJ=Au(),jJ=Ce();function zJ(r){return jJ.isFunction(r[UJ.observable])}Mp.isInteropObservable=zJ});var rw=m(Dp=>{"use strict";Object.defineProperty(Dp,"__esModule",{value:!0});Dp.isAsyncIterable=void 0;var HJ=Ce();function GJ(r){return Symbol.asyncIterator&&HJ.isFunction(r?.[Symbol.asyncIterator])}Dp.isAsyncIterable=GJ});var nw=m(qp=>{"use strict";Object.defineProperty(qp,"__esModule",{value:!0});qp.createInvalidObservableTypeError=void 0;function VJ(r){return new TypeError("You provided "+(r!==null&&typeof r=="object"?"an invalid object":"'"+r+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}qp.createInvalidObservableTypeError=VJ});var iw=m(mc=>{"use strict";Object.defineProperty(mc,"__esModule",{value:!0});mc.iterator=mc.getSymbolIterator=void 0;function PM(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}mc.getSymbolIterator=PM;mc.iterator=PM()});var sw=m(Lp=>{"use strict";Object.defineProperty(Lp,"__esModule",{value:!0});Lp.isIterable=void 0;var WJ=iw(),KJ=Ce();function QJ(r){return KJ.isFunction(r?.[WJ.iterator])}Lp.isIterable=QJ});var Bp=m(Dr=>{"use strict";var JJ=Dr&&Dr.__generator||function(r,e){var t={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,o;return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(l){return function(u){return c([l,u])}}function c(l){if(n)throw new TypeError("Generator is already executing.");for(;t;)try{if(n=1,i&&(s=l[0]&2?i.return:l[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,l[1])).done)return s;switch(i=0,s&&(l=[l[0]&2,s.value]),l[0]){case 0:case 1:s=l;break;case 4:return t.label++,{value:l[1],done:!1};case 5:t.label++,i=l[1],l=[0];continue;case 7:l=t.ops.pop(),t.trys.pop();continue;default:if(s=t.trys,!(s=s.length>0&&s[s.length-1])&&(l[0]===6||l[0]===2)){t=0;continue}if(l[0]===3&&(!s||l[1]>s[0]&&l[1]<s[3])){t.label=l[1];break}if(l[0]===6&&t.label<s[1]){t.label=s[1],s=l;break}if(s&&t.label<s[2]){t.label=s[2],t.ops.push(l);break}s[2]&&t.ops.pop(),t.trys.pop();continue}l=e.call(r,t)}catch(u){l=[6,u],i=0}finally{n=s=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},gc=Dr&&Dr.__await||function(r){return this instanceof gc?(this.v=r,this):new gc(r)},$J=Dr&&Dr.__asyncGenerator||function(r,e,t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=t.apply(r,e||[]),i,s=[];return i={},o("next"),o("throw"),o("return"),i[Symbol.asyncIterator]=function(){return this},i;function o(f){n[f]&&(i[f]=function(h){return new Promise(function(g,p){s.push([f,h,g,p])>1||a(f,h)})})}function a(f,h){try{c(n[f](h))}catch(g){d(s[0][3],g)}}function c(f){f.value instanceof gc?Promise.resolve(f.value.v).then(l,u):d(s[0][2],f)}function l(f){a("next",f)}function u(f){a("throw",f)}function d(f,h){f(h),s.shift(),s.length&&a(s[0][0],s[0][1])}};Object.defineProperty(Dr,"__esModule",{value:!0});Dr.isReadableStreamLike=Dr.readableStreamLikeToAsyncGenerator=void 0;var YJ=Ce();function ZJ(r){return $J(this,arguments,function(){var t,n,i,s;return JJ(this,function(o){switch(o.label){case 0:t=r.getReader(),o.label=1;case 1:o.trys.push([1,,9,10]),o.label=2;case 2:return[4,gc(t.read())];case 3:return n=o.sent(),i=n.value,s=n.done,s?[4,gc(void 0)]:[3,5];case 4:return[2,o.sent()];case 5:return[4,gc(i)];case 6:return[4,o.sent()];case 7:return o.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}})})}Dr.readableStreamLikeToAsyncGenerator=ZJ;function XJ(r){return YJ.isFunction(r?.getReader)}Dr.isReadableStreamLike=XJ});var ue=m(Ue=>{"use strict";var e$=Ue&&Ue.__awaiter||function(r,e,t,n){function i(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(u){try{l(n.next(u))}catch(d){o(d)}}function c(u){try{l(n.throw(u))}catch(d){o(d)}}function l(u){u.done?s(u.value):i(u.value).then(a,c)}l((n=n.apply(r,e||[])).next())})},t$=Ue&&Ue.__generator||function(r,e){var t={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,o;return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(l){return function(u){return c([l,u])}}function c(l){if(n)throw new TypeError("Generator is already executing.");for(;t;)try{if(n=1,i&&(s=l[0]&2?i.return:l[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,l[1])).done)return s;switch(i=0,s&&(l=[l[0]&2,s.value]),l[0]){case 0:case 1:s=l;break;case 4:return t.label++,{value:l[1],done:!1};case 5:t.label++,i=l[1],l=[0];continue;case 7:l=t.ops.pop(),t.trys.pop();continue;default:if(s=t.trys,!(s=s.length>0&&s[s.length-1])&&(l[0]===6||l[0]===2)){t=0;continue}if(l[0]===3&&(!s||l[1]>s[0]&&l[1]<s[3])){t.label=l[1];break}if(l[0]===6&&t.label<s[1]){t.label=s[1],s=l;break}if(s&&t.label<s[2]){t.label=s[2],t.ops.push(l);break}s[2]&&t.ops.pop(),t.trys.pop();continue}l=e.call(r,t)}catch(u){l=[6,u],i=0}finally{n=s=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},r$=Ue&&Ue.__asyncValues||function(r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=r[Symbol.asyncIterator],t;return e?e.call(r):(r=typeof ow=="function"?ow(r):r[Symbol.iterator](),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(s){t[s]=r[s]&&function(o){return new Promise(function(a,c){o=r[s](o),i(a,c,o.done,o.value)})}}function i(s,o,a,c){Promise.resolve(c).then(function(l){s({value:l,done:a})},o)}},ow=Ue&&Ue.__values||function(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(Ue,"__esModule",{value:!0});Ue.fromReadableStreamLike=Ue.fromAsyncIterable=Ue.fromIterable=Ue.fromPromise=Ue.fromArrayLike=Ue.fromInteropObservable=Ue.innerFrom=void 0;var n$=Rp(),i$=ew(),yc=Pe(),s$=tw(),o$=rw(),a$=nw(),c$=sw(),kM=Bp(),l$=Ce(),u$=LA(),d$=Au();function f$(r){if(r instanceof yc.Observable)return r;if(r!=null){if(s$.isInteropObservable(r))return RM(r);if(n$.isArrayLike(r))return NM(r);if(i$.isPromise(r))return MM(r);if(o$.isAsyncIterable(r))return aw(r);if(c$.isIterable(r))return DM(r);if(kM.isReadableStreamLike(r))return qM(r)}throw a$.createInvalidObservableTypeError(r)}Ue.innerFrom=f$;function RM(r){return new yc.Observable(function(e){var t=r[d$.observable]();if(l$.isFunction(t.subscribe))return t.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}Ue.fromInteropObservable=RM;function NM(r){return new yc.Observable(function(e){for(var t=0;t<r.length&&!e.closed;t++)e.next(r[t]);e.complete()})}Ue.fromArrayLike=NM;function MM(r){return new yc.Observable(function(e){r.then(function(t){e.closed||(e.next(t),e.complete())},function(t){return e.error(t)}).then(null,u$.reportUnhandledError)})}Ue.fromPromise=MM;function DM(r){return new yc.Observable(function(e){var t,n;try{for(var i=ow(r),s=i.next();!s.done;s=i.next()){var o=s.value;if(e.next(o),e.closed)return}}catch(a){t={error:a}}finally{try{s&&!s.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}e.complete()})}Ue.fromIterable=DM;function aw(r){return new yc.Observable(function(e){h$(r,e).catch(function(t){return e.error(t)})})}Ue.fromAsyncIterable=aw;function qM(r){return aw(kM.readableStreamLikeToAsyncGenerator(r))}Ue.fromReadableStreamLike=qM;function h$(r,e){var t,n,i,s;return e$(this,void 0,void 0,function(){var o,a;return t$(this,function(c){switch(c.label){case 0:c.trys.push([0,5,6,11]),t=r$(r),c.label=1;case 1:return[4,t.next()];case 2:if(n=c.sent(),!!n.done)return[3,4];if(o=n.value,e.next(o),e.closed)return[2];c.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return a=c.sent(),i={error:a},[3,11];case 6:return c.trys.push([6,,9,10]),n&&!n.done&&(s=t.return)?[4,s.call(t)]:[3,8];case 7:c.sent(),c.label=8;case 8:return[3,10];case 9:if(i)throw i.error;return[7];case 10:return[7];case 11:return e.complete(),[2]}})})}});var ri=m(Fp=>{"use strict";Object.defineProperty(Fp,"__esModule",{value:!0});Fp.executeSchedule=void 0;function p$(r,e,t,n,i){n===void 0&&(n=0),i===void 0&&(i=!1);var s=e.schedule(function(){t(),i?r.add(this.schedule(null,n)):this.unsubscribe()},n);if(r.add(s),!i)return s}Fp.executeSchedule=p$});var xu=m(Up=>{"use strict";Object.defineProperty(Up,"__esModule",{value:!0});Up.observeOn=void 0;var cw=ri(),m$=K(),g$=te();function y$(r,e){return e===void 0&&(e=0),m$.operate(function(t,n){t.subscribe(g$.createOperatorSubscriber(n,function(i){return cw.executeSchedule(n,r,function(){return n.next(i)},e)},function(){return cw.executeSchedule(n,r,function(){return n.complete()},e)},function(i){return cw.executeSchedule(n,r,function(){return n.error(i)},e)}))})}Up.observeOn=y$});var Ou=m(jp=>{"use strict";Object.defineProperty(jp,"__esModule",{value:!0});jp.subscribeOn=void 0;var v$=K();function b$(r,e){return e===void 0&&(e=0),v$.operate(function(t,n){n.add(r.schedule(function(){return t.subscribe(n)},e))})}jp.subscribeOn=b$});var LM=m(zp=>{"use strict";Object.defineProperty(zp,"__esModule",{value:!0});zp.scheduleObservable=void 0;var _$=ue(),A$=xu(),w$=Ou();function E$(r,e){return _$.innerFrom(r).pipe(w$.subscribeOn(e),A$.observeOn(e))}zp.scheduleObservable=E$});var BM=m(Hp=>{"use strict";Object.defineProperty(Hp,"__esModule",{value:!0});Hp.schedulePromise=void 0;var S$=ue(),T$=xu(),C$=Ou();function x$(r,e){return S$.innerFrom(r).pipe(C$.subscribeOn(e),T$.observeOn(e))}Hp.schedulePromise=x$});var FM=m(Gp=>{"use strict";Object.defineProperty(Gp,"__esModule",{value:!0});Gp.scheduleArray=void 0;var O$=Pe();function I$(r,e){return new O$.Observable(function(t){var n=0;return e.schedule(function(){n===r.length?t.complete():(t.next(r[n++]),t.closed||this.schedule())})})}Gp.scheduleArray=I$});var lw=m(Vp=>{"use strict";Object.defineProperty(Vp,"__esModule",{value:!0});Vp.scheduleIterable=void 0;var P$=Pe(),k$=iw(),R$=Ce(),UM=ri();function N$(r,e){return new P$.Observable(function(t){var n;return UM.executeSchedule(t,e,function(){n=r[k$.iterator](),UM.executeSchedule(t,e,function(){var i,s,o;try{i=n.next(),s=i.value,o=i.done}catch(a){t.error(a);return}o?t.complete():t.next(s)},0,!0)}),function(){return R$.isFunction(n?.return)&&n.return()}})}Vp.scheduleIterable=N$});var uw=m(Wp=>{"use strict";Object.defineProperty(Wp,"__esModule",{value:!0});Wp.scheduleAsyncIterable=void 0;var M$=Pe(),jM=ri();function D$(r,e){if(!r)throw new Error("Iterable cannot be null");return new M$.Observable(function(t){jM.executeSchedule(t,e,function(){var n=r[Symbol.asyncIterator]();jM.executeSchedule(t,e,function(){n.next().then(function(i){i.done?t.complete():t.next(i.value)})},0,!0)})})}Wp.scheduleAsyncIterable=D$});var zM=m(Kp=>{"use strict";Object.defineProperty(Kp,"__esModule",{value:!0});Kp.scheduleReadableStreamLike=void 0;var q$=uw(),L$=Bp();function B$(r,e){return q$.scheduleAsyncIterable(L$.readableStreamLikeToAsyncGenerator(r),e)}Kp.scheduleReadableStreamLike=B$});var dw=m(Qp=>{"use strict";Object.defineProperty(Qp,"__esModule",{value:!0});Qp.scheduled=void 0;var F$=LM(),U$=BM(),j$=FM(),z$=lw(),H$=uw(),G$=tw(),V$=ew(),W$=Rp(),K$=sw(),Q$=rw(),J$=nw(),$$=Bp(),Y$=zM();function Z$(r,e){if(r!=null){if(G$.isInteropObservable(r))return F$.scheduleObservable(r,e);if(W$.isArrayLike(r))return j$.scheduleArray(r,e);if(V$.isPromise(r))return U$.schedulePromise(r,e);if(Q$.isAsyncIterable(r))return H$.scheduleAsyncIterable(r,e);if(K$.isIterable(r))return z$.scheduleIterable(r,e);if($$.isReadableStreamLike(r))return Y$.scheduleReadableStreamLike(r,e)}throw J$.createInvalidObservableTypeError(r)}Qp.scheduled=Z$});var ni=m(Jp=>{"use strict";Object.defineProperty(Jp,"__esModule",{value:!0});Jp.from=void 0;var X$=dw(),eY=ue();function tY(r,e){return e?X$.scheduled(r,e):eY.innerFrom(r)}Jp.from=tY});var Yp=m($p=>{"use strict";Object.defineProperty($p,"__esModule",{value:!0});$p.of=void 0;var rY=nr(),nY=ni();function iY(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var t=rY.popScheduler(r);return nY.from(r,t)}$p.of=iY});var fw=m(Zp=>{"use strict";Object.defineProperty(Zp,"__esModule",{value:!0});Zp.throwError=void 0;var sY=Pe(),oY=Ce();function aY(r,e){var t=oY.isFunction(r)?r:function(){return r},n=function(i){return i.error(t())};return new sY.Observable(e?function(i){return e.schedule(n,0,i)}:n)}Zp.throwError=aY});var Xp=m(ii=>{"use strict";Object.defineProperty(ii,"__esModule",{value:!0});ii.observeNotification=ii.Notification=ii.NotificationKind=void 0;var cY=$r(),lY=Yp(),uY=fw(),dY=Ce(),fY;(function(r){r.NEXT="N",r.ERROR="E",r.COMPLETE="C"})(fY=ii.NotificationKind||(ii.NotificationKind={}));var hY=function(){function r(e,t,n){this.kind=e,this.value=t,this.error=n,this.hasValue=e==="N"}return r.prototype.observe=function(e){return HM(this,e)},r.prototype.do=function(e,t,n){var i=this,s=i.kind,o=i.value,a=i.error;return s==="N"?e?.(o):s==="E"?t?.(a):n?.()},r.prototype.accept=function(e,t,n){var i;return dY.isFunction((i=e)===null||i===void 0?void 0:i.next)?this.observe(e):this.do(e,t,n)},r.prototype.toObservable=function(){var e=this,t=e.kind,n=e.value,i=e.error,s=t==="N"?lY.of(n):t==="E"?uY.throwError(function(){return i}):t==="C"?cY.EMPTY:0;if(!s)throw new TypeError("Unexpected notification kind "+t);return s},r.createNext=function(e){return new r("N",e)},r.createError=function(e){return new r("E",void 0,e)},r.createComplete=function(){return r.completeNotification},r.completeNotification=new r("C"),r}();ii.Notification=hY;function HM(r,e){var t,n,i,s=r,o=s.kind,a=s.value,c=s.error;if(typeof o!="string")throw new TypeError('Invalid notification, missing "kind"');o==="N"?(t=e.next)===null||t===void 0||t.call(e,a):o==="E"?(n=e.error)===null||n===void 0||n.call(e,c):(i=e.complete)===null||i===void 0||i.call(e)}ii.observeNotification=HM});var VM=m(e0=>{"use strict";Object.defineProperty(e0,"__esModule",{value:!0});e0.isObservable=void 0;var pY=Pe(),GM=Ce();function mY(r){return!!r&&(r instanceof pY.Observable||GM.isFunction(r.lift)&&GM.isFunction(r.subscribe))}e0.isObservable=mY});var Xi=m(t0=>{"use strict";Object.defineProperty(t0,"__esModule",{value:!0});t0.EmptyError=void 0;var gY=Ji();t0.EmptyError=gY.createErrorClass(function(r){return function(){r(this),this.name="EmptyError",this.message="no elements in sequence"}})});var WM=m(r0=>{"use strict";Object.defineProperty(r0,"__esModule",{value:!0});r0.lastValueFrom=void 0;var yY=Xi();function vY(r,e){var t=typeof e=="object";return new Promise(function(n,i){var s=!1,o;r.subscribe({next:function(a){o=a,s=!0},error:i,complete:function(){s?n(o):t?n(e.defaultValue):i(new yY.EmptyError)}})})}r0.lastValueFrom=vY});var KM=m(n0=>{"use strict";Object.defineProperty(n0,"__esModule",{value:!0});n0.firstValueFrom=void 0;var bY=Xi(),_Y=$a();function AY(r,e){var t=typeof e=="object";return new Promise(function(n,i){var s=new _Y.SafeSubscriber({next:function(o){n(o),s.unsubscribe()},error:i,complete:function(){t?n(e.defaultValue):i(new bY.EmptyError)}});r.subscribe(s)})}n0.firstValueFrom=AY});var hw=m(i0=>{"use strict";Object.defineProperty(i0,"__esModule",{value:!0});i0.ArgumentOutOfRangeError=void 0;var wY=Ji();i0.ArgumentOutOfRangeError=wY.createErrorClass(function(r){return function(){r(this),this.name="ArgumentOutOfRangeError",this.message="argument out of range"}})});var pw=m(s0=>{"use strict";Object.defineProperty(s0,"__esModule",{value:!0});s0.NotFoundError=void 0;var EY=Ji();s0.NotFoundError=EY.createErrorClass(function(r){return function(t){r(this),this.name="NotFoundError",this.message=t}})});var mw=m(o0=>{"use strict";Object.defineProperty(o0,"__esModule",{value:!0});o0.SequenceError=void 0;var SY=Ji();o0.SequenceError=SY.createErrorClass(function(r){return function(t){r(this),this.name="SequenceError",this.message=t}})});var c0=m(a0=>{"use strict";Object.defineProperty(a0,"__esModule",{value:!0});a0.isValidDate=void 0;function TY(r){return r instanceof Date&&!isNaN(r)}a0.isValidDate=TY});var l0=m(vo=>{"use strict";Object.defineProperty(vo,"__esModule",{value:!0});vo.timeout=vo.TimeoutError=void 0;var CY=rr(),xY=c0(),OY=K(),IY=ue(),PY=Ji(),kY=te(),RY=ri();vo.TimeoutError=PY.createErrorClass(function(r){return function(t){t===void 0&&(t=null),r(this),this.message="Timeout has occurred",this.name="TimeoutError",this.info=t}});function NY(r,e){var t=xY.isValidDate(r)?{first:r}:typeof r=="number"?{each:r}:r,n=t.first,i=t.each,s=t.with,o=s===void 0?MY:s,a=t.scheduler,c=a===void 0?e??CY.asyncScheduler:a,l=t.meta,u=l===void 0?null:l;if(n==null&&i==null)throw new TypeError("No timeout provided.");return OY.operate(function(d,f){var h,g,p=null,b=0,y=function(A){g=RY.executeSchedule(f,c,function(){try{h.unsubscribe(),IY.innerFrom(o({meta:u,lastValue:p,seen:b})).subscribe(f)}catch(E){f.error(E)}},A)};h=d.subscribe(kY.createOperatorSubscriber(f,function(A){g?.unsubscribe(),b++,f.next(p=A),i>0&&y(i)},void 0,void 0,function(){g?.closed||g?.unsubscribe(),p=null})),!b&&y(n!=null?typeof n=="number"?n:+n-c.now():i)})}vo.timeout=NY;function MY(r){throw new vo.TimeoutError(r)}});var es=m(u0=>{"use strict";Object.defineProperty(u0,"__esModule",{value:!0});u0.map=void 0;var DY=K(),qY=te();function LY(r,e){return DY.operate(function(t,n){var i=0;t.subscribe(qY.createOperatorSubscriber(n,function(s){n.next(r.call(e,s,i++))}))})}u0.map=LY});var rs=m(ts=>{"use strict";var BY=ts&&ts.__read||function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,s=[],o;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(o)throw o.error}}return s},FY=ts&&ts.__spreadArray||function(r,e){for(var t=0,n=e.length,i=r.length;t<n;t++,i++)r[i]=e[t];return r};Object.defineProperty(ts,"__esModule",{value:!0});ts.mapOneOrManyArgs=void 0;var UY=es(),jY=Array.isArray;function zY(r,e){return jY(e)?r.apply(void 0,FY([],BY(e))):r(e)}function HY(r){return UY.map(function(e){return zY(r,e)})}ts.mapOneOrManyArgs=HY});var yw=m(ns=>{"use strict";var GY=ns&&ns.__read||function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,s=[],o;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(o)throw o.error}}return s},QM=ns&&ns.__spreadArray||function(r,e){for(var t=0,n=e.length,i=r.length;t<n;t++,i++)r[i]=e[t];return r};Object.defineProperty(ns,"__esModule",{value:!0});ns.bindCallbackInternals=void 0;var VY=Cu(),WY=Pe(),KY=Ou(),QY=rs(),JY=xu(),$Y=xp();function gw(r,e,t,n){if(t)if(VY.isScheduler(t))n=t;else return function(){for(var i=[],s=0;s<arguments.length;s++)i[s]=arguments[s];return gw(r,e,n).apply(this,i).pipe(QY.mapOneOrManyArgs(t))};return n?function(){for(var i=[],s=0;s<arguments.length;s++)i[s]=arguments[s];return gw(r,e).apply(this,i).pipe(KY.subscribeOn(n),JY.observeOn(n))}:function(){for(var i=this,s=[],o=0;o<arguments.length;o++)s[o]=arguments[o];var a=new $Y.AsyncSubject,c=!0;return new WY.Observable(function(l){var u=a.subscribe(l);if(c){c=!1;var d=!1,f=!1;e.apply(i,QM(QM([],GY(s)),[function(){for(var h=[],g=0;g<arguments.length;g++)h[g]=arguments[g];if(r){var p=h.shift();if(p!=null){a.error(p);return}}a.next(1<h.length?h:h[0]),f=!0,d&&a.complete()}])),f&&a.complete(),d=!0}return u})}}ns.bindCallbackInternals=gw});var JM=m(d0=>{"use strict";Object.defineProperty(d0,"__esModule",{value:!0});d0.bindCallback=void 0;var YY=yw();function ZY(r,e,t){return YY.bindCallbackInternals(!1,r,e,t)}d0.bindCallback=ZY});var $M=m(f0=>{"use strict";Object.defineProperty(f0,"__esModule",{value:!0});f0.bindNodeCallback=void 0;var XY=yw();function eZ(r,e,t){return XY.bindCallbackInternals(!0,r,e,t)}f0.bindNodeCallback=eZ});var vw=m(h0=>{"use strict";Object.defineProperty(h0,"__esModule",{value:!0});h0.argsArgArrayOrObject=void 0;var tZ=Array.isArray,rZ=Object.getPrototypeOf,nZ=Object.prototype,iZ=Object.keys;function sZ(r){if(r.length===1){var e=r[0];if(tZ(e))return{args:e,keys:null};if(oZ(e)){var t=iZ(e);return{args:t.map(function(n){return e[n]}),keys:t}}}return{args:r,keys:null}}h0.argsArgArrayOrObject=sZ;function oZ(r){return r&&typeof r=="object"&&rZ(r)===nZ}});var bw=m(p0=>{"use strict";Object.defineProperty(p0,"__esModule",{value:!0});p0.createObject=void 0;function aZ(r,e){return r.reduce(function(t,n,i){return t[n]=e[i],t},{})}p0.createObject=aZ});var m0=m(vc=>{"use strict";Object.defineProperty(vc,"__esModule",{value:!0});vc.combineLatestInit=vc.combineLatest=void 0;var cZ=Pe(),lZ=vw(),XM=ni(),e2=Et(),uZ=rs(),YM=nr(),dZ=bw(),fZ=te(),hZ=ri();function pZ(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var t=YM.popScheduler(r),n=YM.popResultSelector(r),i=lZ.argsArgArrayOrObject(r),s=i.args,o=i.keys;if(s.length===0)return XM.from([],t);var a=new cZ.Observable(t2(s,t,o?function(c){return dZ.createObject(o,c)}:e2.identity));return n?a.pipe(uZ.mapOneOrManyArgs(n)):a}vc.combineLatest=pZ;function t2(r,e,t){return t===void 0&&(t=e2.identity),function(n){ZM(e,function(){for(var i=r.length,s=new Array(i),o=i,a=i,c=function(u){ZM(e,function(){var d=XM.from(r[u],e),f=!1;d.subscribe(fZ.createOperatorSubscriber(n,function(h){s[u]=h,f||(f=!0,a--),a||n.next(t(s.slice()))},function(){--o||n.complete()}))},n)},l=0;l<i;l++)c(l)},n)}}vc.combineLatestInit=t2;function ZM(r,e,t){r?hZ.executeSchedule(t,r,e):e()}});var y0=m(g0=>{"use strict";Object.defineProperty(g0,"__esModule",{value:!0});g0.mergeInternals=void 0;var mZ=ue(),gZ=ri(),r2=te();function yZ(r,e,t,n,i,s,o,a){var c=[],l=0,u=0,d=!1,f=function(){d&&!c.length&&!l&&e.complete()},h=function(p){return l<n?g(p):c.push(p)},g=function(p){s&&e.next(p),l++;var b=!1;mZ.innerFrom(t(p,u++)).subscribe(r2.createOperatorSubscriber(e,function(y){i?.(y),s?h(y):e.next(y)},function(){b=!0},void 0,function(){if(b)try{l--;for(var y=function(){var A=c.shift();o?gZ.executeSchedule(e,o,function(){return g(A)}):g(A)};c.length&&l<n;)y();f()}catch(A){e.error(A)}}))};return r.subscribe(r2.createOperatorSubscriber(e,h,function(){d=!0,f()})),function(){a?.()}}g0.mergeInternals=yZ});var si=m(v0=>{"use strict";Object.defineProperty(v0,"__esModule",{value:!0});v0.mergeMap=void 0;var vZ=es(),bZ=ue(),_Z=K(),AZ=y0(),wZ=Ce();function n2(r,e,t){return t===void 0&&(t=1/0),wZ.isFunction(e)?n2(function(n,i){return vZ.map(function(s,o){return e(n,s,i,o)})(bZ.innerFrom(r(n,i)))},t):(typeof e=="number"&&(t=e),_Z.operate(function(n,i){return AZ.mergeInternals(n,i,r,t)}))}v0.mergeMap=n2});var Iu=m(b0=>{"use strict";Object.defineProperty(b0,"__esModule",{value:!0});b0.mergeAll=void 0;var EZ=si(),SZ=Et();function TZ(r){return r===void 0&&(r=1/0),EZ.mergeMap(SZ.identity,r)}b0.mergeAll=TZ});var A0=m(_0=>{"use strict";Object.defineProperty(_0,"__esModule",{value:!0});_0.concatAll=void 0;var CZ=Iu();function xZ(){return CZ.mergeAll(1)}_0.concatAll=xZ});var Pu=m(w0=>{"use strict";Object.defineProperty(w0,"__esModule",{value:!0});w0.concat=void 0;var OZ=A0(),IZ=nr(),PZ=ni();function kZ(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];return OZ.concatAll()(PZ.from(r,IZ.popScheduler(r)))}w0.concat=kZ});var ku=m(E0=>{"use strict";Object.defineProperty(E0,"__esModule",{value:!0});E0.defer=void 0;var RZ=Pe(),NZ=ue();function MZ(r){return new RZ.Observable(function(e){NZ.innerFrom(r()).subscribe(e)})}E0.defer=MZ});var i2=m(S0=>{"use strict";Object.defineProperty(S0,"__esModule",{value:!0});S0.connectable=void 0;var DZ=St(),qZ=Pe(),LZ=ku(),BZ={connector:function(){return new DZ.Subject},resetOnDisconnect:!0};function FZ(r,e){e===void 0&&(e=BZ);var t=null,n=e.connector,i=e.resetOnDisconnect,s=i===void 0?!0:i,o=n(),a=new qZ.Observable(function(c){return o.subscribe(c)});return a.connect=function(){return(!t||t.closed)&&(t=LZ.defer(function(){return r}).subscribe(o),s&&t.add(function(){return o=n()})),t},a}S0.connectable=FZ});var s2=m(T0=>{"use strict";Object.defineProperty(T0,"__esModule",{value:!0});T0.forkJoin=void 0;var UZ=Pe(),jZ=vw(),zZ=ue(),HZ=nr(),GZ=te(),VZ=rs(),WZ=bw();function KZ(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var t=HZ.popResultSelector(r),n=jZ.argsArgArrayOrObject(r),i=n.args,s=n.keys,o=new UZ.Observable(function(a){var c=i.length;if(!c){a.complete();return}for(var l=new Array(c),u=c,d=c,f=function(g){var p=!1;zZ.innerFrom(i[g]).subscribe(GZ.createOperatorSubscriber(a,function(b){p||(p=!0,d--),l[g]=b},function(){return u--},void 0,function(){(!u||!p)&&(d||a.next(s?WZ.createObject(s,l):l),a.complete())}))},h=0;h<c;h++)f(h)});return t?o.pipe(VZ.mapOneOrManyArgs(t)):o}T0.forkJoin=KZ});var a2=m(bc=>{"use strict";var QZ=bc&&bc.__read||function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,s=[],o;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(o)throw o.error}}return s};Object.defineProperty(bc,"__esModule",{value:!0});bc.fromEvent=void 0;var JZ=ue(),$Z=Pe(),YZ=si(),ZZ=Rp(),bo=Ce(),XZ=rs(),eX=["addListener","removeListener"],tX=["addEventListener","removeEventListener"],rX=["on","off"];function _w(r,e,t,n){if(bo.isFunction(t)&&(n=t,t=void 0),n)return _w(r,e,t).pipe(XZ.mapOneOrManyArgs(n));var i=QZ(sX(r)?tX.map(function(a){return function(c){return r[a](e,c,t)}}):nX(r)?eX.map(o2(r,e)):iX(r)?rX.map(o2(r,e)):[],2),s=i[0],o=i[1];if(!s&&ZZ.isArrayLike(r))return YZ.mergeMap(function(a){return _w(a,e,t)})(JZ.innerFrom(r));if(!s)throw new TypeError("Invalid event target");return new $Z.Observable(function(a){var c=function(){for(var l=[],u=0;u<arguments.length;u++)l[u]=arguments[u];return a.next(1<l.length?l:l[0])};return s(c),function(){return o(c)}})}bc.fromEvent=_w;function o2(r,e){return function(t){return function(n){return r[t](e,n)}}}function nX(r){return bo.isFunction(r.addListener)&&bo.isFunction(r.removeListener)}function iX(r){return bo.isFunction(r.on)&&bo.isFunction(r.off)}function sX(r){return bo.isFunction(r.addEventListener)&&bo.isFunction(r.removeEventListener)}});var l2=m(C0=>{"use strict";Object.defineProperty(C0,"__esModule",{value:!0});C0.fromEventPattern=void 0;var oX=Pe(),aX=Ce(),cX=rs();function c2(r,e,t){return t?c2(r,e).pipe(cX.mapOneOrManyArgs(t)):new oX.Observable(function(n){var i=function(){for(var o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];return n.next(o.length===1?o[0]:o)},s=r(i);return aX.isFunction(e)?function(){return e(i,s)}:void 0})}C0.fromEventPattern=c2});var d2=m(_c=>{"use strict";var lX=_c&&_c.__generator||function(r,e){var t={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,o;return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(l){return function(u){return c([l,u])}}function c(l){if(n)throw new TypeError("Generator is already executing.");for(;t;)try{if(n=1,i&&(s=l[0]&2?i.return:l[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,l[1])).done)return s;switch(i=0,s&&(l=[l[0]&2,s.value]),l[0]){case 0:case 1:s=l;break;case 4:return t.label++,{value:l[1],done:!1};case 5:t.label++,i=l[1],l=[0];continue;case 7:l=t.ops.pop(),t.trys.pop();continue;default:if(s=t.trys,!(s=s.length>0&&s[s.length-1])&&(l[0]===6||l[0]===2)){t=0;continue}if(l[0]===3&&(!s||l[1]>s[0]&&l[1]<s[3])){t.label=l[1];break}if(l[0]===6&&t.label<s[1]){t.label=s[1],s=l;break}if(s&&t.label<s[2]){t.label=s[2],t.ops.push(l);break}s[2]&&t.ops.pop(),t.trys.pop();continue}l=e.call(r,t)}catch(u){l=[6,u],i=0}finally{n=s=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}};Object.defineProperty(_c,"__esModule",{value:!0});_c.generate=void 0;var u2=Et(),uX=Cu(),dX=ku(),fX=lw();function hX(r,e,t,n,i){var s,o,a,c;arguments.length===1?(s=r,c=s.initialState,e=s.condition,t=s.iterate,o=s.resultSelector,a=o===void 0?u2.identity:o,i=s.scheduler):(c=r,!n||uX.isScheduler(n)?(a=u2.identity,i=n):a=n);function l(){var u;return lX(this,function(d){switch(d.label){case 0:u=c,d.label=1;case 1:return!e||e(u)?[4,a(u)]:[3,4];case 2:d.sent(),d.label=3;case 3:return u=t(u),[3,1];case 4:return[2]}})}return dX.defer(i?function(){return fX.scheduleIterable(l(),i)}:l)}_c.generate=hX});var f2=m(x0=>{"use strict";Object.defineProperty(x0,"__esModule",{value:!0});x0.iif=void 0;var pX=ku();function mX(r,e,t){return pX.defer(function(){return r()?e:t})}x0.iif=mX});var is=m(O0=>{"use strict";Object.defineProperty(O0,"__esModule",{value:!0});O0.timer=void 0;var gX=Pe(),yX=rr(),vX=Cu(),bX=c0();function _X(r,e,t){r===void 0&&(r=0),t===void 0&&(t=yX.async);var n=-1;return e!=null&&(vX.isScheduler(e)?t=e:n=e),new gX.Observable(function(i){var s=bX.isValidDate(r)?+r-t.now():r;s<0&&(s=0);var o=0;return t.schedule(function(){i.closed||(i.next(o++),0<=n?this.schedule(void 0,n):i.complete())},s)})}O0.timer=_X});var Aw=m(I0=>{"use strict";Object.defineProperty(I0,"__esModule",{value:!0});I0.interval=void 0;var AX=rr(),wX=is();function EX(r,e){return r===void 0&&(r=0),e===void 0&&(e=AX.asyncScheduler),r<0&&(r=0),wX.timer(r,r,e)}I0.interval=EX});var p2=m(P0=>{"use strict";Object.defineProperty(P0,"__esModule",{value:!0});P0.merge=void 0;var SX=Iu(),TX=ue(),CX=$r(),h2=nr(),xX=ni();function OX(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var t=h2.popScheduler(r),n=h2.popNumber(r,1/0),i=r;return i.length?i.length===1?TX.innerFrom(i[0]):SX.mergeAll(n)(xX.from(i,t)):CX.EMPTY}P0.merge=OX});var ww=m(_o=>{"use strict";Object.defineProperty(_o,"__esModule",{value:!0});_o.never=_o.NEVER=void 0;var IX=Pe(),PX=wt();_o.NEVER=new IX.Observable(PX.noop);function kX(){return _o.NEVER}_o.never=kX});var Ao=m(k0=>{"use strict";Object.defineProperty(k0,"__esModule",{value:!0});k0.argsOrArgArray=void 0;var RX=Array.isArray;function NX(r){return r.length===1&&RX(r[0])?r[0]:r}k0.argsOrArgArray=NX});var Ew=m(R0=>{"use strict";Object.defineProperty(R0,"__esModule",{value:!0});R0.onErrorResumeNext=void 0;var MX=Pe(),DX=Ao(),qX=te(),m2=wt(),LX=ue();function BX(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var t=DX.argsOrArgArray(r);return new MX.Observable(function(n){var i=0,s=function(){if(i<t.length){var o=void 0;try{o=LX.innerFrom(t[i++])}catch{s();return}var a=new qX.OperatorSubscriber(n,void 0,m2.noop,m2.noop);o.subscribe(a),a.add(s)}else n.complete()};s()})}R0.onErrorResumeNext=BX});var g2=m(N0=>{"use strict";Object.defineProperty(N0,"__esModule",{value:!0});N0.pairs=void 0;var FX=ni();function UX(r,e){return FX.from(Object.entries(r),e)}N0.pairs=UX});var y2=m(M0=>{"use strict";Object.defineProperty(M0,"__esModule",{value:!0});M0.not=void 0;function jX(r,e){return function(t,n){return!r.call(e,t,n)}}M0.not=jX});var wo=m(D0=>{"use strict";Object.defineProperty(D0,"__esModule",{value:!0});D0.filter=void 0;var zX=K(),HX=te();function GX(r,e){return zX.operate(function(t,n){var i=0;t.subscribe(HX.createOperatorSubscriber(n,function(s){return r.call(e,s,i++)&&n.next(s)}))})}D0.filter=GX});var _2=m(q0=>{"use strict";Object.defineProperty(q0,"__esModule",{value:!0});q0.partition=void 0;var VX=y2(),v2=wo(),b2=ue();function WX(r,e,t){return[v2.filter(e,t)(b2.innerFrom(r)),v2.filter(VX.not(e,t))(b2.innerFrom(r))]}q0.partition=WX});var Sw=m(Ac=>{"use strict";Object.defineProperty(Ac,"__esModule",{value:!0});Ac.raceInit=Ac.race=void 0;var KX=Pe(),A2=ue(),QX=Ao(),JX=te();function $X(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];return r=QX.argsOrArgArray(r),r.length===1?A2.innerFrom(r[0]):new KX.Observable(w2(r))}Ac.race=$X;function w2(r){return function(e){for(var t=[],n=function(s){t.push(A2.innerFrom(r[s]).subscribe(JX.createOperatorSubscriber(e,function(o){if(t){for(var a=0;a<t.length;a++)a!==s&&t[a].unsubscribe();t=null}e.next(o)})))},i=0;t&&!e.closed&&i<r.length;i++)n(i)}}Ac.raceInit=w2});var E2=m(L0=>{"use strict";Object.defineProperty(L0,"__esModule",{value:!0});L0.range=void 0;var YX=Pe(),ZX=$r();function XX(r,e,t){if(e==null&&(e=r,r=0),e<=0)return ZX.EMPTY;var n=e+r;return new YX.Observable(t?function(i){var s=r;return t.schedule(function(){s<n?(i.next(s++),this.schedule()):i.complete()})}:function(i){for(var s=r;s<n&&!i.closed;)i.next(s++);i.complete()})}L0.range=XX});var S2=m(B0=>{"use strict";Object.defineProperty(B0,"__esModule",{value:!0});B0.using=void 0;var eee=Pe(),tee=ue(),ree=$r();function nee(r,e){return new eee.Observable(function(t){var n=r(),i=e(n),s=i?tee.innerFrom(i):ree.EMPTY;return s.subscribe(t),function(){n&&n.unsubscribe()}})}B0.using=nee});var F0=m(ss=>{"use strict";var iee=ss&&ss.__read||function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,s=[],o;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(o)throw o.error}}return s},see=ss&&ss.__spreadArray||function(r,e){for(var t=0,n=e.length,i=r.length;t<n;t++,i++)r[i]=e[t];return r};Object.defineProperty(ss,"__esModule",{value:!0});ss.zip=void 0;var oee=Pe(),aee=ue(),cee=Ao(),lee=$r(),uee=te(),dee=nr();function fee(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var t=dee.popResultSelector(r),n=cee.argsOrArgArray(r);return n.length?new oee.Observable(function(i){var s=n.map(function(){return[]}),o=n.map(function(){return!1});i.add(function(){s=o=null});for(var a=function(l){aee.innerFrom(n[l]).subscribe(uee.createOperatorSubscriber(i,function(u){if(s[l].push(u),s.every(function(f){return f.length})){var d=s.map(function(f){return f.shift()});i.next(t?t.apply(void 0,see([],iee(d))):d),s.some(function(f,h){return!f.length&&o[h]})&&i.complete()}},function(){o[l]=!0,!s[l].length&&i.complete()}))},c=0;!i.closed&&c<n.length;c++)a(c);return function(){s=o=null}}):lee.EMPTY}ss.zip=fee});var C2=m(T2=>{"use strict";Object.defineProperty(T2,"__esModule",{value:!0})});var Tw=m(U0=>{"use strict";Object.defineProperty(U0,"__esModule",{value:!0});U0.audit=void 0;var hee=K(),pee=ue(),x2=te();function mee(r){return hee.operate(function(e,t){var n=!1,i=null,s=null,o=!1,a=function(){if(s?.unsubscribe(),s=null,n){n=!1;var l=i;i=null,t.next(l)}o&&t.complete()},c=function(){s=null,o&&t.complete()};e.subscribe(x2.createOperatorSubscriber(t,function(l){n=!0,i=l,s||pee.innerFrom(r(l)).subscribe(s=x2.createOperatorSubscriber(t,a,c))},function(){o=!0,(!n||!s||s.closed)&&t.complete()}))})}U0.audit=mee});var O2=m(j0=>{"use strict";Object.defineProperty(j0,"__esModule",{value:!0});j0.auditTime=void 0;var gee=rr(),yee=Tw(),vee=is();function bee(r,e){return e===void 0&&(e=gee.asyncScheduler),yee.audit(function(){return vee.timer(r,e)})}j0.auditTime=bee});var P2=m(z0=>{"use strict";Object.defineProperty(z0,"__esModule",{value:!0});z0.buffer=void 0;var _ee=K(),Aee=wt(),I2=te(),wee=ue();function Eee(r){return _ee.operate(function(e,t){var n=[];return e.subscribe(I2.createOperatorSubscriber(t,function(i){return n.push(i)},function(){t.next(n),t.complete()})),wee.innerFrom(r).subscribe(I2.createOperatorSubscriber(t,function(){var i=n;n=[],t.next(i)},Aee.noop)),function(){n=null}})}z0.buffer=Eee});var k2=m(wc=>{"use strict";var Cw=wc&&wc.__values||function(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(wc,"__esModule",{value:!0});wc.bufferCount=void 0;var See=K(),Tee=te(),Cee=ti();function xee(r,e){return e===void 0&&(e=null),e=e??r,See.operate(function(t,n){var i=[],s=0;t.subscribe(Tee.createOperatorSubscriber(n,function(o){var a,c,l,u,d=null;s++%e===0&&i.push([]);try{for(var f=Cw(i),h=f.next();!h.done;h=f.next()){var g=h.value;g.push(o),r<=g.length&&(d=d??[],d.push(g))}}catch(y){a={error:y}}finally{try{h&&!h.done&&(c=f.return)&&c.call(f)}finally{if(a)throw a.error}}if(d)try{for(var p=Cw(d),b=p.next();!b.done;b=p.next()){var g=b.value;Cee.arrRemove(i,g),n.next(g)}}catch(y){l={error:y}}finally{try{b&&!b.done&&(u=p.return)&&u.call(p)}finally{if(l)throw l.error}}},function(){var o,a;try{for(var c=Cw(i),l=c.next();!l.done;l=c.next()){var u=l.value;n.next(u)}}catch(d){o={error:d}}finally{try{l&&!l.done&&(a=c.return)&&a.call(c)}finally{if(o)throw o.error}}n.complete()},void 0,function(){i=null}))})}wc.bufferCount=xee});var N2=m(Ec=>{"use strict";var Oee=Ec&&Ec.__values||function(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(Ec,"__esModule",{value:!0});Ec.bufferTime=void 0;var Iee=pr(),Pee=K(),kee=te(),Ree=ti(),Nee=rr(),Mee=nr(),R2=ri();function Dee(r){for(var e,t,n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];var s=(e=Mee.popScheduler(n))!==null&&e!==void 0?e:Nee.asyncScheduler,o=(t=n[0])!==null&&t!==void 0?t:null,a=n[1]||1/0;return Pee.operate(function(c,l){var u=[],d=!1,f=function(p){var b=p.buffer,y=p.subs;y.unsubscribe(),Ree.arrRemove(u,p),l.next(b),d&&h()},h=function(){if(u){var p=new Iee.Subscription;l.add(p);var b=[],y={buffer:b,subs:p};u.push(y),R2.executeSchedule(p,s,function(){return f(y)},r)}};o!==null&&o>=0?R2.executeSchedule(l,s,h,o,!0):d=!0,h();var g=kee.createOperatorSubscriber(l,function(p){var b,y,A=u.slice();try{for(var E=Oee(A),C=E.next();!C.done;C=E.next()){var k=C.value,I=k.buffer;I.push(p),a<=I.length&&f(k)}}catch(D){b={error:D}}finally{try{C&&!C.done&&(y=E.return)&&y.call(E)}finally{if(b)throw b.error}}},function(){for(;u?.length;)l.next(u.shift().buffer);g?.unsubscribe(),l.complete(),l.unsubscribe()},void 0,function(){return u=null});c.subscribe(g)})}Ec.bufferTime=Dee});var q2=m(Sc=>{"use strict";var qee=Sc&&Sc.__values||function(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(Sc,"__esModule",{value:!0});Sc.bufferToggle=void 0;var Lee=pr(),Bee=K(),M2=ue(),xw=te(),D2=wt(),Fee=ti();function Uee(r,e){return Bee.operate(function(t,n){var i=[];M2.innerFrom(r).subscribe(xw.createOperatorSubscriber(n,function(s){var o=[];i.push(o);var a=new Lee.Subscription,c=function(){Fee.arrRemove(i,o),n.next(o),a.unsubscribe()};a.add(M2.innerFrom(e(s)).subscribe(xw.createOperatorSubscriber(n,c,D2.noop)))},D2.noop)),t.subscribe(xw.createOperatorSubscriber(n,function(s){var o,a;try{for(var c=qee(i),l=c.next();!l.done;l=c.next()){var u=l.value;u.push(s)}}catch(d){o={error:d}}finally{try{l&&!l.done&&(a=c.return)&&a.call(c)}finally{if(o)throw o.error}}},function(){for(;i.length>0;)n.next(i.shift());n.complete()}))})}Sc.bufferToggle=Uee});var B2=m(H0=>{"use strict";Object.defineProperty(H0,"__esModule",{value:!0});H0.bufferWhen=void 0;var jee=K(),zee=wt(),L2=te(),Hee=ue();function Gee(r){return jee.operate(function(e,t){var n=null,i=null,s=function(){i?.unsubscribe();var o=n;n=[],o&&t.next(o),Hee.innerFrom(r()).subscribe(i=L2.createOperatorSubscriber(t,s,zee.noop))};s(),e.subscribe(L2.createOperatorSubscriber(t,function(o){return n?.push(o)},function(){n&&t.next(n),t.complete()},void 0,function(){return n=i=null}))})}H0.bufferWhen=Gee});var U2=m(G0=>{"use strict";Object.defineProperty(G0,"__esModule",{value:!0});G0.catchError=void 0;var Vee=ue(),Wee=te(),Kee=K();function F2(r){return Kee.operate(function(e,t){var n=null,i=!1,s;n=e.subscribe(Wee.createOperatorSubscriber(t,void 0,void 0,function(o){s=Vee.innerFrom(r(o,F2(r)(e))),n?(n.unsubscribe(),n=null,s.subscribe(t)):i=!0})),i&&(n.unsubscribe(),n=null,s.subscribe(t))})}G0.catchError=F2});var Ow=m(V0=>{"use strict";Object.defineProperty(V0,"__esModule",{value:!0});V0.scanInternals=void 0;var Qee=te();function Jee(r,e,t,n,i){return function(s,o){var a=t,c=e,l=0;s.subscribe(Qee.createOperatorSubscriber(o,function(u){var d=l++;c=a?r(c,u,d):(a=!0,u),n&&o.next(c)},i&&function(){a&&o.next(c),o.complete()}))}}V0.scanInternals=Jee});var Tc=m(W0=>{"use strict";Object.defineProperty(W0,"__esModule",{value:!0});W0.reduce=void 0;var $ee=Ow(),Yee=K();function Zee(r,e){return Yee.operate($ee.scanInternals(r,e,arguments.length>=2,!1,!0))}W0.reduce=Zee});var Iw=m(K0=>{"use strict";Object.defineProperty(K0,"__esModule",{value:!0});K0.toArray=void 0;var Xee=Tc(),ete=K(),tte=function(r,e){return r.push(e),r};function rte(){return ete.operate(function(r,e){Xee.reduce(tte,[])(r).subscribe(e)})}K0.toArray=rte});var Pw=m(Q0=>{"use strict";Object.defineProperty(Q0,"__esModule",{value:!0});Q0.joinAllInternals=void 0;var nte=Et(),ite=rs(),ste=wu(),ote=si(),ate=Iw();function cte(r,e){return ste.pipe(ate.toArray(),ote.mergeMap(function(t){return r(t)}),e?ite.mapOneOrManyArgs(e):nte.identity)}Q0.joinAllInternals=cte});var kw=m(J0=>{"use strict";Object.defineProperty(J0,"__esModule",{value:!0});J0.combineLatestAll=void 0;var lte=m0(),ute=Pw();function dte(r){return ute.joinAllInternals(lte.combineLatest,r)}J0.combineLatestAll=dte});var j2=m($0=>{"use strict";Object.defineProperty($0,"__esModule",{value:!0});$0.combineAll=void 0;var fte=kw();$0.combineAll=fte.combineLatestAll});var V2=m(os=>{"use strict";var z2=os&&os.__read||function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,s=[],o;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(o)throw o.error}}return s},H2=os&&os.__spreadArray||function(r,e){for(var t=0,n=e.length,i=r.length;t<n;t++,i++)r[i]=e[t];return r};Object.defineProperty(os,"__esModule",{value:!0});os.combineLatest=void 0;var hte=m0(),pte=K(),mte=Ao(),gte=rs(),yte=wu(),vte=nr();function G2(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var t=vte.popResultSelector(r);return t?yte.pipe(G2.apply(void 0,H2([],z2(r))),gte.mapOneOrManyArgs(t)):pte.operate(function(n,i){hte.combineLatestInit(H2([n],z2(mte.argsOrArgArray(r))))(i)})}os.combineLatest=G2});var W2=m(as=>{"use strict";var bte=as&&as.__read||function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,s=[],o;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(o)throw o.error}}return s},_te=as&&as.__spreadArray||function(r,e){for(var t=0,n=e.length,i=r.length;t<n;t++,i++)r[i]=e[t];return r};Object.defineProperty(as,"__esModule",{value:!0});as.combineLatestWith=void 0;var Ate=V2();function wte(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];return Ate.combineLatest.apply(void 0,_te([],bte(r)))}as.combineLatestWith=wte});var Rw=m(Y0=>{"use strict";Object.defineProperty(Y0,"__esModule",{value:!0});Y0.concatMap=void 0;var K2=si(),Ete=Ce();function Ste(r,e){return Ete.isFunction(e)?K2.mergeMap(r,e,1):K2.mergeMap(r,1)}Y0.concatMap=Ste});var J2=m(Z0=>{"use strict";Object.defineProperty(Z0,"__esModule",{value:!0});Z0.concatMapTo=void 0;var Q2=Rw(),Tte=Ce();function Cte(r,e){return Tte.isFunction(e)?Q2.concatMap(function(){return r},e):Q2.concatMap(function(){return r})}Z0.concatMapTo=Cte});var $2=m(cs=>{"use strict";var xte=cs&&cs.__read||function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,s=[],o;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(o)throw o.error}}return s},Ote=cs&&cs.__spreadArray||function(r,e){for(var t=0,n=e.length,i=r.length;t<n;t++,i++)r[i]=e[t];return r};Object.defineProperty(cs,"__esModule",{value:!0});cs.concat=void 0;var Ite=K(),Pte=A0(),kte=nr(),Rte=ni();function Nte(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var t=kte.popScheduler(r);return Ite.operate(function(n,i){Pte.concatAll()(Rte.from(Ote([n],xte(r)),t)).subscribe(i)})}cs.concat=Nte});var Y2=m(ls=>{"use strict";var Mte=ls&&ls.__read||function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,s=[],o;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(o)throw o.error}}return s},Dte=ls&&ls.__spreadArray||function(r,e){for(var t=0,n=e.length,i=r.length;t<n;t++,i++)r[i]=e[t];return r};Object.defineProperty(ls,"__esModule",{value:!0});ls.concatWith=void 0;var qte=$2();function Lte(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];return qte.concat.apply(void 0,Dte([],Mte(r)))}ls.concatWith=Lte});var Z2=m(X0=>{"use strict";Object.defineProperty(X0,"__esModule",{value:!0});X0.fromSubscribable=void 0;var Bte=Pe();function Fte(r){return new Bte.Observable(function(e){return r.subscribe(e)})}X0.fromSubscribable=Fte});var tm=m(em=>{"use strict";Object.defineProperty(em,"__esModule",{value:!0});em.connect=void 0;var Ute=St(),jte=ue(),zte=K(),Hte=Z2(),Gte={connector:function(){return new Ute.Subject}};function Vte(r,e){e===void 0&&(e=Gte);var t=e.connector;return zte.operate(function(n,i){var s=t();jte.innerFrom(r(Hte.fromSubscribable(s))).subscribe(i),i.add(n.subscribe(s))})}em.connect=Vte});var X2=m(rm=>{"use strict";Object.defineProperty(rm,"__esModule",{value:!0});rm.count=void 0;var Wte=Tc();function Kte(r){return Wte.reduce(function(e,t,n){return!r||r(t,n)?e+1:e},0)}rm.count=Kte});var t3=m(nm=>{"use strict";Object.defineProperty(nm,"__esModule",{value:!0});nm.debounce=void 0;var Qte=K(),Jte=wt(),e3=te(),$te=ue();function Yte(r){return Qte.operate(function(e,t){var n=!1,i=null,s=null,o=function(){if(s?.unsubscribe(),s=null,n){n=!1;var a=i;i=null,t.next(a)}};e.subscribe(e3.createOperatorSubscriber(t,function(a){s?.unsubscribe(),n=!0,i=a,s=e3.createOperatorSubscriber(t,o,Jte.noop),$te.innerFrom(r(a)).subscribe(s)},function(){o(),t.complete()},void 0,function(){i=s=null}))})}nm.debounce=Yte});var r3=m(im=>{"use strict";Object.defineProperty(im,"__esModule",{value:!0});im.debounceTime=void 0;var Zte=rr(),Xte=K(),ere=te();function tre(r,e){return e===void 0&&(e=Zte.asyncScheduler),Xte.operate(function(t,n){var i=null,s=null,o=null,a=function(){if(i){i.unsubscribe(),i=null;var l=s;s=null,n.next(l)}};function c(){var l=o+r,u=e.now();if(u<l){i=this.schedule(void 0,l-u),n.add(i);return}a()}t.subscribe(ere.createOperatorSubscriber(n,function(l){s=l,o=e.now(),i||(i=e.schedule(c,r),n.add(i))},function(){a(),n.complete()},void 0,function(){s=i=null}))})}im.debounceTime=tre});var Ru=m(sm=>{"use strict";Object.defineProperty(sm,"__esModule",{value:!0});sm.defaultIfEmpty=void 0;var rre=K(),nre=te();function ire(r){return rre.operate(function(e,t){var n=!1;e.subscribe(nre.createOperatorSubscriber(t,function(i){n=!0,t.next(i)},function(){n||t.next(r),t.complete()}))})}sm.defaultIfEmpty=ire});var Nu=m(om=>{"use strict";Object.defineProperty(om,"__esModule",{value:!0});om.take=void 0;var sre=$r(),ore=K(),are=te();function cre(r){return r<=0?function(){return sre.EMPTY}:ore.operate(function(e,t){var n=0;e.subscribe(are.createOperatorSubscriber(t,function(i){++n<=r&&(t.next(i),r<=n&&t.complete())}))})}om.take=cre});var Nw=m(am=>{"use strict";Object.defineProperty(am,"__esModule",{value:!0});am.ignoreElements=void 0;var lre=K(),ure=te(),dre=wt();function fre(){return lre.operate(function(r,e){r.subscribe(ure.createOperatorSubscriber(e,dre.noop))})}am.ignoreElements=fre});var Mw=m(cm=>{"use strict";Object.defineProperty(cm,"__esModule",{value:!0});cm.mapTo=void 0;var hre=es();function pre(r){return hre.map(function(){return r})}cm.mapTo=pre});var Dw=m(lm=>{"use strict";Object.defineProperty(lm,"__esModule",{value:!0});lm.delayWhen=void 0;var mre=Pu(),n3=Nu(),gre=Nw(),yre=Mw(),vre=si(),bre=ue();function i3(r,e){return e?function(t){return mre.concat(e.pipe(n3.take(1),gre.ignoreElements()),t.pipe(i3(r)))}:vre.mergeMap(function(t,n){return bre.innerFrom(r(t,n)).pipe(n3.take(1),yre.mapTo(t))})}lm.delayWhen=i3});var s3=m(um=>{"use strict";Object.defineProperty(um,"__esModule",{value:!0});um.delay=void 0;var _re=rr(),Are=Dw(),wre=is();function Ere(r,e){e===void 0&&(e=_re.asyncScheduler);var t=wre.timer(r,e);return Are.delayWhen(function(){return t})}um.delay=Ere});var o3=m(dm=>{"use strict";Object.defineProperty(dm,"__esModule",{value:!0});dm.dematerialize=void 0;var Sre=Xp(),Tre=K(),Cre=te();function xre(){return Tre.operate(function(r,e){r.subscribe(Cre.createOperatorSubscriber(e,function(t){return Sre.observeNotification(t,e)}))})}dm.dematerialize=xre});var c3=m(fm=>{"use strict";Object.defineProperty(fm,"__esModule",{value:!0});fm.distinct=void 0;var Ore=K(),a3=te(),Ire=wt(),Pre=ue();function kre(r,e){return Ore.operate(function(t,n){var i=new Set;t.subscribe(a3.createOperatorSubscriber(n,function(s){var o=r?r(s):s;i.has(o)||(i.add(o),n.next(s))})),e&&Pre.innerFrom(e).subscribe(a3.createOperatorSubscriber(n,function(){return i.clear()},Ire.noop))})}fm.distinct=kre});var qw=m(hm=>{"use strict";Object.defineProperty(hm,"__esModule",{value:!0});hm.distinctUntilChanged=void 0;var Rre=Et(),Nre=K(),Mre=te();function Dre(r,e){return e===void 0&&(e=Rre.identity),r=r??qre,Nre.operate(function(t,n){var i,s=!0;t.subscribe(Mre.createOperatorSubscriber(n,function(o){var a=e(o);(s||!r(i,a))&&(s=!1,i=a,n.next(o))}))})}hm.distinctUntilChanged=Dre;function qre(r,e){return r===e}});var l3=m(pm=>{"use strict";Object.defineProperty(pm,"__esModule",{value:!0});pm.distinctUntilKeyChanged=void 0;var Lre=qw();function Bre(r,e){return Lre.distinctUntilChanged(function(t,n){return e?e(t[r],n[r]):t[r]===n[r]})}pm.distinctUntilKeyChanged=Bre});var Mu=m(mm=>{"use strict";Object.defineProperty(mm,"__esModule",{value:!0});mm.throwIfEmpty=void 0;var Fre=Xi(),Ure=K(),jre=te();function zre(r){return r===void 0&&(r=Hre),Ure.operate(function(e,t){var n=!1;e.subscribe(jre.createOperatorSubscriber(t,function(i){n=!0,t.next(i)},function(){return n?t.complete():t.error(r())}))})}mm.throwIfEmpty=zre;function Hre(){return new Fre.EmptyError}});var d3=m(gm=>{"use strict";Object.defineProperty(gm,"__esModule",{value:!0});gm.elementAt=void 0;var u3=hw(),Gre=wo(),Vre=Mu(),Wre=Ru(),Kre=Nu();function Qre(r,e){if(r<0)throw new u3.ArgumentOutOfRangeError;var t=arguments.length>=2;return function(n){return n.pipe(Gre.filter(function(i,s){return s===r}),Kre.take(1),t?Wre.defaultIfEmpty(e):Vre.throwIfEmpty(function(){return new u3.ArgumentOutOfRangeError}))}}gm.elementAt=Qre});var f3=m(us=>{"use strict";var Jre=us&&us.__read||function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,s=[],o;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(o)throw o.error}}return s},$re=us&&us.__spreadArray||function(r,e){for(var t=0,n=e.length,i=r.length;t<n;t++,i++)r[i]=e[t];return r};Object.defineProperty(us,"__esModule",{value:!0});us.endWith=void 0;var Yre=Pu(),Zre=Yp();function Xre(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];return function(t){return Yre.concat(t,Zre.of.apply(void 0,$re([],Jre(r))))}}us.endWith=Xre});var h3=m(ym=>{"use strict";Object.defineProperty(ym,"__esModule",{value:!0});ym.every=void 0;var ene=K(),tne=te();function rne(r,e){return ene.operate(function(t,n){var i=0;t.subscribe(tne.createOperatorSubscriber(n,function(s){r.call(e,s,i++,t)||(n.next(!1),n.complete())},function(){n.next(!0),n.complete()}))})}ym.every=rne});var Lw=m(vm=>{"use strict";Object.defineProperty(vm,"__esModule",{value:!0});vm.exhaustMap=void 0;var nne=es(),p3=ue(),ine=K(),m3=te();function g3(r,e){return e?function(t){return t.pipe(g3(function(n,i){return p3.innerFrom(r(n,i)).pipe(nne.map(function(s,o){return e(n,s,i,o)}))}))}:ine.operate(function(t,n){var i=0,s=null,o=!1;t.subscribe(m3.createOperatorSubscriber(n,function(a){s||(s=m3.createOperatorSubscriber(n,void 0,function(){s=null,o&&n.complete()}),p3.innerFrom(r(a,i++)).subscribe(s))},function(){o=!0,!s&&n.complete()}))})}vm.exhaustMap=g3});var Bw=m(bm=>{"use strict";Object.defineProperty(bm,"__esModule",{value:!0});bm.exhaustAll=void 0;var sne=Lw(),one=Et();function ane(){return sne.exhaustMap(one.identity)}bm.exhaustAll=ane});var y3=m(_m=>{"use strict";Object.defineProperty(_m,"__esModule",{value:!0});_m.exhaust=void 0;var cne=Bw();_m.exhaust=cne.exhaustAll});var v3=m(Am=>{"use strict";Object.defineProperty(Am,"__esModule",{value:!0});Am.expand=void 0;var lne=K(),une=y0();function dne(r,e,t){return e===void 0&&(e=1/0),e=(e||0)<1?1/0:e,lne.operate(function(n,i){return une.mergeInternals(n,i,r,e,void 0,!0,t)})}Am.expand=dne});var b3=m(wm=>{"use strict";Object.defineProperty(wm,"__esModule",{value:!0});wm.finalize=void 0;var fne=K();function hne(r){return fne.operate(function(e,t){try{e.subscribe(t)}finally{t.add(r)}})}wm.finalize=hne});var Fw=m(Cc=>{"use strict";Object.defineProperty(Cc,"__esModule",{value:!0});Cc.createFind=Cc.find=void 0;var pne=K(),mne=te();function gne(r,e){return pne.operate(_3(r,e,"value"))}Cc.find=gne;function _3(r,e,t){var n=t==="index";return function(i,s){var o=0;i.subscribe(mne.createOperatorSubscriber(s,function(a){var c=o++;r.call(e,a,c,i)&&(s.next(n?c:a),s.complete())},function(){s.next(n?-1:void 0),s.complete()}))}}Cc.createFind=_3});var A3=m(Em=>{"use strict";Object.defineProperty(Em,"__esModule",{value:!0});Em.findIndex=void 0;var yne=K(),vne=Fw();function bne(r,e){return yne.operate(vne.createFind(r,e,"index"))}Em.findIndex=bne});var w3=m(Sm=>{"use strict";Object.defineProperty(Sm,"__esModule",{value:!0});Sm.first=void 0;var _ne=Xi(),Ane=wo(),wne=Nu(),Ene=Ru(),Sne=Mu(),Tne=Et();function Cne(r,e){var t=arguments.length>=2;return function(n){return n.pipe(r?Ane.filter(function(i,s){return r(i,s,n)}):Tne.identity,wne.take(1),t?Ene.defaultIfEmpty(e):Sne.throwIfEmpty(function(){return new _ne.EmptyError}))}}Sm.first=Cne});var S3=m(Tm=>{"use strict";Object.defineProperty(Tm,"__esModule",{value:!0});Tm.groupBy=void 0;var xne=Pe(),One=ue(),Ine=St(),Pne=K(),E3=te();function kne(r,e,t,n){return Pne.operate(function(i,s){var o;!e||typeof e=="function"?o=e:(t=e.duration,o=e.element,n=e.connector);var a=new Map,c=function(g){a.forEach(g),g(s)},l=function(g){return c(function(p){return p.error(g)})},u=0,d=!1,f=new E3.OperatorSubscriber(s,function(g){try{var p=r(g),b=a.get(p);if(!b){a.set(p,b=n?n():new Ine.Subject);var y=h(p,b);if(s.next(y),t){var A=E3.createOperatorSubscriber(b,function(){b.complete(),A?.unsubscribe()},void 0,void 0,function(){return a.delete(p)});f.add(One.innerFrom(t(y)).subscribe(A))}}b.next(o?o(g):g)}catch(E){l(E)}},function(){return c(function(g){return g.complete()})},l,function(){return a.clear()},function(){return d=!0,u===0});i.subscribe(f);function h(g,p){var b=new xne.Observable(function(y){u++;var A=p.subscribe(y);return function(){A.unsubscribe(),--u===0&&d&&f.unsubscribe()}});return b.key=g,b}})}Tm.groupBy=kne});var T3=m(Cm=>{"use strict";Object.defineProperty(Cm,"__esModule",{value:!0});Cm.isEmpty=void 0;var Rne=K(),Nne=te();function Mne(){return Rne.operate(function(r,e){r.subscribe(Nne.createOperatorSubscriber(e,function(){e.next(!1),e.complete()},function(){e.next(!0),e.complete()}))})}Cm.isEmpty=Mne});var Uw=m(xc=>{"use strict";var Dne=xc&&xc.__values||function(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(xc,"__esModule",{value:!0});xc.takeLast=void 0;var qne=$r(),Lne=K(),Bne=te();function Fne(r){return r<=0?function(){return qne.EMPTY}:Lne.operate(function(e,t){var n=[];e.subscribe(Bne.createOperatorSubscriber(t,function(i){n.push(i),r<n.length&&n.shift()},function(){var i,s;try{for(var o=Dne(n),a=o.next();!a.done;a=o.next()){var c=a.value;t.next(c)}}catch(l){i={error:l}}finally{try{a&&!a.done&&(s=o.return)&&s.call(o)}finally{if(i)throw i.error}}t.complete()},void 0,function(){n=null}))})}xc.takeLast=Fne});var C3=m(xm=>{"use strict";Object.defineProperty(xm,"__esModule",{value:!0});xm.last=void 0;var Une=Xi(),jne=wo(),zne=Uw(),Hne=Mu(),Gne=Ru(),Vne=Et();function Wne(r,e){var t=arguments.length>=2;return function(n){return n.pipe(r?jne.filter(function(i,s){return r(i,s,n)}):Vne.identity,zne.takeLast(1),t?Gne.defaultIfEmpty(e):Hne.throwIfEmpty(function(){return new Une.EmptyError}))}}xm.last=Wne});var x3=m(Om=>{"use strict";Object.defineProperty(Om,"__esModule",{value:!0});Om.materialize=void 0;var jw=Xp(),Kne=K(),Qne=te();function Jne(){return Kne.operate(function(r,e){r.subscribe(Qne.createOperatorSubscriber(e,function(t){e.next(jw.Notification.createNext(t))},function(){e.next(jw.Notification.createComplete()),e.complete()},function(t){e.next(jw.Notification.createError(t)),e.complete()}))})}Om.materialize=Jne});var O3=m(Im=>{"use strict";Object.defineProperty(Im,"__esModule",{value:!0});Im.max=void 0;var $ne=Tc(),Yne=Ce();function Zne(r){return $ne.reduce(Yne.isFunction(r)?function(e,t){return r(e,t)>0?e:t}:function(e,t){return e>t?e:t})}Im.max=Zne});var I3=m(Pm=>{"use strict";Object.defineProperty(Pm,"__esModule",{value:!0});Pm.flatMap=void 0;var Xne=si();Pm.flatMap=Xne.mergeMap});var k3=m(km=>{"use strict";Object.defineProperty(km,"__esModule",{value:!0});km.mergeMapTo=void 0;var P3=si(),eie=Ce();function tie(r,e,t){return t===void 0&&(t=1/0),eie.isFunction(e)?P3.mergeMap(function(){return r},e,t):(typeof e=="number"&&(t=e),P3.mergeMap(function(){return r},t))}km.mergeMapTo=tie});var R3=m(Rm=>{"use strict";Object.defineProperty(Rm,"__esModule",{value:!0});Rm.mergeScan=void 0;var rie=K(),nie=y0();function iie(r,e,t){return t===void 0&&(t=1/0),rie.operate(function(n,i){var s=e;return nie.mergeInternals(n,i,function(o,a){return r(s,o,a)},t,function(o){s=o},!1,void 0,function(){return s=null})})}Rm.mergeScan=iie});var M3=m(ds=>{"use strict";var sie=ds&&ds.__read||function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,s=[],o;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(o)throw o.error}}return s},oie=ds&&ds.__spreadArray||function(r,e){for(var t=0,n=e.length,i=r.length;t<n;t++,i++)r[i]=e[t];return r};Object.defineProperty(ds,"__esModule",{value:!0});ds.merge=void 0;var aie=K(),cie=Ao(),lie=Iu(),N3=nr(),uie=ni();function die(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var t=N3.popScheduler(r),n=N3.popNumber(r,1/0);return r=cie.argsOrArgArray(r),aie.operate(function(i,s){lie.mergeAll(n)(uie.from(oie([i],sie(r)),t)).subscribe(s)})}ds.merge=die});var D3=m(fs=>{"use strict";var fie=fs&&fs.__read||function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,s=[],o;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(o)throw o.error}}return s},hie=fs&&fs.__spreadArray||function(r,e){for(var t=0,n=e.length,i=r.length;t<n;t++,i++)r[i]=e[t];return r};Object.defineProperty(fs,"__esModule",{value:!0});fs.mergeWith=void 0;var pie=M3();function mie(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];return pie.merge.apply(void 0,hie([],fie(r)))}fs.mergeWith=mie});var q3=m(Nm=>{"use strict";Object.defineProperty(Nm,"__esModule",{value:!0});Nm.min=void 0;var gie=Tc(),yie=Ce();function vie(r){return gie.reduce(yie.isFunction(r)?function(e,t){return r(e,t)<0?e:t}:function(e,t){return e<t?e:t})}Nm.min=vie});var Dm=m(Mm=>{"use strict";Object.defineProperty(Mm,"__esModule",{value:!0});Mm.multicast=void 0;var bie=Eu(),L3=Ce(),_ie=tm();function Aie(r,e){var t=L3.isFunction(r)?r:function(){return r};return L3.isFunction(e)?_ie.connect(e,{connector:t}):function(n){return new bie.ConnectableObservable(n,t)}}Mm.multicast=Aie});var F3=m(kn=>{"use strict";var wie=kn&&kn.__read||function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,s=[],o;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(o)throw o.error}}return s},Eie=kn&&kn.__spreadArray||function(r,e){for(var t=0,n=e.length,i=r.length;t<n;t++,i++)r[i]=e[t];return r};Object.defineProperty(kn,"__esModule",{value:!0});kn.onErrorResumeNext=kn.onErrorResumeNextWith=void 0;var Sie=Ao(),Tie=Ew();function B3(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var t=Sie.argsOrArgArray(r);return function(n){return Tie.onErrorResumeNext.apply(void 0,Eie([n],wie(t)))}}kn.onErrorResumeNextWith=B3;kn.onErrorResumeNext=B3});var U3=m(qm=>{"use strict";Object.defineProperty(qm,"__esModule",{value:!0});qm.pairwise=void 0;var Cie=K(),xie=te();function Oie(){return Cie.operate(function(r,e){var t,n=!1;r.subscribe(xie.createOperatorSubscriber(e,function(i){var s=t;t=i,n&&e.next([s,i]),n=!0}))})}qm.pairwise=Oie});var j3=m(Lm=>{"use strict";Object.defineProperty(Lm,"__esModule",{value:!0});Lm.pluck=void 0;var Iie=es();function Pie(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var t=r.length;if(t===0)throw new Error("list of properties cannot be empty.");return Iie.map(function(n){for(var i=n,s=0;s<t;s++){var o=i?.[r[s]];if(typeof o<"u")i=o;else return}return i})}Lm.pluck=Pie});var z3=m(Bm=>{"use strict";Object.defineProperty(Bm,"__esModule",{value:!0});Bm.publish=void 0;var kie=St(),Rie=Dm(),Nie=tm();function Mie(r){return r?function(e){return Nie.connect(r)(e)}:function(e){return Rie.multicast(new kie.Subject)(e)}}Bm.publish=Mie});var H3=m(Fm=>{"use strict";Object.defineProperty(Fm,"__esModule",{value:!0});Fm.publishBehavior=void 0;var Die=$A(),qie=Eu();function Lie(r){return function(e){var t=new Die.BehaviorSubject(r);return new qie.ConnectableObservable(e,function(){return t})}}Fm.publishBehavior=Lie});var G3=m(Um=>{"use strict";Object.defineProperty(Um,"__esModule",{value:!0});Um.publishLast=void 0;var Bie=xp(),Fie=Eu();function Uie(){return function(r){var e=new Bie.AsyncSubject;return new Fie.ConnectableObservable(r,function(){return e})}}Um.publishLast=Uie});var W3=m(jm=>{"use strict";Object.defineProperty(jm,"__esModule",{value:!0});jm.publishReplay=void 0;var jie=Cp(),zie=Dm(),V3=Ce();function Hie(r,e,t,n){t&&!V3.isFunction(t)&&(n=t);var i=V3.isFunction(t)?t:void 0;return function(s){return zie.multicast(new jie.ReplaySubject(r,e,n),i)(s)}}jm.publishReplay=Hie});var K3=m(hs=>{"use strict";var Gie=hs&&hs.__read||function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,s=[],o;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(o)throw o.error}}return s},Vie=hs&&hs.__spreadArray||function(r,e){for(var t=0,n=e.length,i=r.length;t<n;t++,i++)r[i]=e[t];return r};Object.defineProperty(hs,"__esModule",{value:!0});hs.raceWith=void 0;var Wie=Sw(),Kie=K(),Qie=Et();function Jie(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];return r.length?Kie.operate(function(t,n){Wie.raceInit(Vie([t],Gie(r)))(n)}):Qie.identity}hs.raceWith=Jie});var J3=m(zm=>{"use strict";Object.defineProperty(zm,"__esModule",{value:!0});zm.repeat=void 0;var $ie=$r(),Yie=K(),Q3=te(),Zie=ue(),Xie=is();function ese(r){var e,t=1/0,n;return r!=null&&(typeof r=="object"?(e=r.count,t=e===void 0?1/0:e,n=r.delay):t=r),t<=0?function(){return $ie.EMPTY}:Yie.operate(function(i,s){var o=0,a,c=function(){if(a?.unsubscribe(),a=null,n!=null){var u=typeof n=="number"?Xie.timer(n):Zie.innerFrom(n(o)),d=Q3.createOperatorSubscriber(s,function(){d.unsubscribe(),l()});u.subscribe(d)}else l()},l=function(){var u=!1;a=i.subscribe(Q3.createOperatorSubscriber(s,void 0,function(){++o<t?a?c():u=!0:s.complete()})),u&&c()};l()})}zm.repeat=ese});var Y3=m(Hm=>{"use strict";Object.defineProperty(Hm,"__esModule",{value:!0});Hm.repeatWhen=void 0;var tse=ue(),rse=St(),nse=K(),$3=te();function ise(r){return nse.operate(function(e,t){var n,i=!1,s,o=!1,a=!1,c=function(){return a&&o&&(t.complete(),!0)},l=function(){return s||(s=new rse.Subject,tse.innerFrom(r(s)).subscribe($3.createOperatorSubscriber(t,function(){n?u():i=!0},function(){o=!0,c()}))),s},u=function(){a=!1,n=e.subscribe($3.createOperatorSubscriber(t,void 0,function(){a=!0,!c()&&l().next()})),i&&(n.unsubscribe(),n=null,i=!1,u())};u()})}Hm.repeatWhen=ise});var X3=m(Gm=>{"use strict";Object.defineProperty(Gm,"__esModule",{value:!0});Gm.retry=void 0;var sse=K(),Z3=te(),ose=Et(),ase=is(),cse=ue();function lse(r){r===void 0&&(r=1/0);var e;r&&typeof r=="object"?e=r:e={count:r};var t=e.count,n=t===void 0?1/0:t,i=e.delay,s=e.resetOnSuccess,o=s===void 0?!1:s;return n<=0?ose.identity:sse.operate(function(a,c){var l=0,u,d=function(){var f=!1;u=a.subscribe(Z3.createOperatorSubscriber(c,function(h){o&&(l=0),c.next(h)},void 0,function(h){if(l++<n){var g=function(){u?(u.unsubscribe(),u=null,d()):f=!0};if(i!=null){var p=typeof i=="number"?ase.timer(i):cse.innerFrom(i(h,l)),b=Z3.createOperatorSubscriber(c,function(){b.unsubscribe(),g()},function(){c.complete()});p.subscribe(b)}else g()}else c.error(h)})),f&&(u.unsubscribe(),u=null,d())};d()})}Gm.retry=lse});var tD=m(Vm=>{"use strict";Object.defineProperty(Vm,"__esModule",{value:!0});Vm.retryWhen=void 0;var use=ue(),dse=St(),fse=K(),eD=te();function hse(r){return fse.operate(function(e,t){var n,i=!1,s,o=function(){n=e.subscribe(eD.createOperatorSubscriber(t,void 0,void 0,function(a){s||(s=new dse.Subject,use.innerFrom(r(s)).subscribe(eD.createOperatorSubscriber(t,function(){return n?o():i=!0}))),s&&s.next(a)})),i&&(n.unsubscribe(),n=null,i=!1,o())};o()})}Vm.retryWhen=hse});var zw=m(Wm=>{"use strict";Object.defineProperty(Wm,"__esModule",{value:!0});Wm.sample=void 0;var pse=ue(),mse=K(),gse=wt(),rD=te();function yse(r){return mse.operate(function(e,t){var n=!1,i=null;e.subscribe(rD.createOperatorSubscriber(t,function(s){n=!0,i=s})),pse.innerFrom(r).subscribe(rD.createOperatorSubscriber(t,function(){if(n){n=!1;var s=i;i=null,t.next(s)}},gse.noop))})}Wm.sample=yse});var nD=m(Km=>{"use strict";Object.defineProperty(Km,"__esModule",{value:!0});Km.sampleTime=void 0;var vse=rr(),bse=zw(),_se=Aw();function Ase(r,e){return e===void 0&&(e=vse.asyncScheduler),bse.sample(_se.interval(r,e))}Km.sampleTime=Ase});var iD=m(Qm=>{"use strict";Object.defineProperty(Qm,"__esModule",{value:!0});Qm.scan=void 0;var wse=K(),Ese=Ow();function Sse(r,e){return wse.operate(Ese.scanInternals(r,e,arguments.length>=2,!0))}Qm.scan=Sse});var oD=m(Jm=>{"use strict";Object.defineProperty(Jm,"__esModule",{value:!0});Jm.sequenceEqual=void 0;var Tse=K(),Cse=te(),xse=ue();function Ose(r,e){return e===void 0&&(e=function(t,n){return t===n}),Tse.operate(function(t,n){var i=sD(),s=sD(),o=function(c){n.next(c),n.complete()},a=function(c,l){var u=Cse.createOperatorSubscriber(n,function(d){var f=l.buffer,h=l.complete;f.length===0?h?o(!1):c.buffer.push(d):!e(d,f.shift())&&o(!1)},function(){c.complete=!0;var d=l.complete,f=l.buffer;d&&o(f.length===0),u?.unsubscribe()});return u};t.subscribe(a(i,s)),xse.innerFrom(r).subscribe(a(s,i))})}Jm.sequenceEqual=Ose;function sD(){return{buffer:[],complete:!1}}});var Gw=m(ps=>{"use strict";var Ise=ps&&ps.__read||function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,s=[],o;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(o)throw o.error}}return s},Pse=ps&&ps.__spreadArray||function(r,e){for(var t=0,n=e.length,i=r.length;t<n;t++,i++)r[i]=e[t];return r};Object.defineProperty(ps,"__esModule",{value:!0});ps.share=void 0;var aD=ue(),kse=St(),cD=$a(),Rse=K();function Nse(r){r===void 0&&(r={});var e=r.connector,t=e===void 0?function(){return new kse.Subject}:e,n=r.resetOnError,i=n===void 0?!0:n,s=r.resetOnComplete,o=s===void 0?!0:s,a=r.resetOnRefCountZero,c=a===void 0?!0:a;return function(l){var u,d,f,h=0,g=!1,p=!1,b=function(){d?.unsubscribe(),d=void 0},y=function(){b(),u=f=void 0,g=p=!1},A=function(){var E=u;y(),E?.unsubscribe()};return Rse.operate(function(E,C){h++,!p&&!g&&b();var k=f=f??t();C.add(function(){h--,h===0&&!p&&!g&&(d=Hw(A,c))}),k.subscribe(C),!u&&h>0&&(u=new cD.SafeSubscriber({next:function(I){return k.next(I)},error:function(I){p=!0,b(),d=Hw(y,i,I),k.error(I)},complete:function(){g=!0,b(),d=Hw(y,o),k.complete()}}),aD.innerFrom(E).subscribe(u))})(l)}}ps.share=Nse;function Hw(r,e){for(var t=[],n=2;n<arguments.length;n++)t[n-2]=arguments[n];if(e===!0){r();return}if(e!==!1){var i=new cD.SafeSubscriber({next:function(){i.unsubscribe(),r()}});return aD.innerFrom(e.apply(void 0,Pse([],Ise(t)))).subscribe(i)}}});var lD=m($m=>{"use strict";Object.defineProperty($m,"__esModule",{value:!0});$m.shareReplay=void 0;var Mse=Cp(),Dse=Gw();function qse(r,e,t){var n,i,s,o,a=!1;return r&&typeof r=="object"?(n=r.bufferSize,o=n===void 0?1/0:n,i=r.windowTime,e=i===void 0?1/0:i,s=r.refCount,a=s===void 0?!1:s,t=r.scheduler):o=r??1/0,Dse.share({connector:function(){return new Mse.ReplaySubject(o,e,t)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:a})}$m.shareReplay=qse});var uD=m(Ym=>{"use strict";Object.defineProperty(Ym,"__esModule",{value:!0});Ym.single=void 0;var Lse=Xi(),Bse=mw(),Fse=pw(),Use=K(),jse=te();function zse(r){return Use.operate(function(e,t){var n=!1,i,s=!1,o=0;e.subscribe(jse.createOperatorSubscriber(t,function(a){s=!0,(!r||r(a,o++,e))&&(n&&t.error(new Bse.SequenceError("Too many matching values")),n=!0,i=a)},function(){n?(t.next(i),t.complete()):t.error(s?new Fse.NotFoundError("No matching values"):new Lse.EmptyError)}))})}Ym.single=zse});var dD=m(Zm=>{"use strict";Object.defineProperty(Zm,"__esModule",{value:!0});Zm.skip=void 0;var Hse=wo();function Gse(r){return Hse.filter(function(e,t){return r<=t})}Zm.skip=Gse});var fD=m(Xm=>{"use strict";Object.defineProperty(Xm,"__esModule",{value:!0});Xm.skipLast=void 0;var Vse=Et(),Wse=K(),Kse=te();function Qse(r){return r<=0?Vse.identity:Wse.operate(function(e,t){var n=new Array(r),i=0;return e.subscribe(Kse.createOperatorSubscriber(t,function(s){var o=i++;if(o<r)n[o]=s;else{var a=o%r,c=n[a];n[a]=s,t.next(c)}})),function(){n=null}})}Xm.skipLast=Qse});var pD=m(eg=>{"use strict";Object.defineProperty(eg,"__esModule",{value:!0});eg.skipUntil=void 0;var Jse=K(),hD=te(),$se=ue(),Yse=wt();function Zse(r){return Jse.operate(function(e,t){var n=!1,i=hD.createOperatorSubscriber(t,function(){i?.unsubscribe(),n=!0},Yse.noop);$se.innerFrom(r).subscribe(i),e.subscribe(hD.createOperatorSubscriber(t,function(s){return n&&t.next(s)}))})}eg.skipUntil=Zse});var mD=m(tg=>{"use strict";Object.defineProperty(tg,"__esModule",{value:!0});tg.skipWhile=void 0;var Xse=K(),eoe=te();function toe(r){return Xse.operate(function(e,t){var n=!1,i=0;e.subscribe(eoe.createOperatorSubscriber(t,function(s){return(n||(n=!r(s,i++)))&&t.next(s)}))})}tg.skipWhile=toe});var yD=m(rg=>{"use strict";Object.defineProperty(rg,"__esModule",{value:!0});rg.startWith=void 0;var gD=Pu(),roe=nr(),noe=K();function ioe(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var t=roe.popScheduler(r);return noe.operate(function(n,i){(t?gD.concat(r,n,t):gD.concat(r,n)).subscribe(i)})}rg.startWith=ioe});var Du=m(ng=>{"use strict";Object.defineProperty(ng,"__esModule",{value:!0});ng.switchMap=void 0;var soe=ue(),ooe=K(),vD=te();function aoe(r,e){return ooe.operate(function(t,n){var i=null,s=0,o=!1,a=function(){return o&&!i&&n.complete()};t.subscribe(vD.createOperatorSubscriber(n,function(c){i?.unsubscribe();var l=0,u=s++;soe.innerFrom(r(c,u)).subscribe(i=vD.createOperatorSubscriber(n,function(d){return n.next(e?e(c,d,u,l++):d)},function(){i=null,a()}))},function(){o=!0,a()}))})}ng.switchMap=aoe});var bD=m(ig=>{"use strict";Object.defineProperty(ig,"__esModule",{value:!0});ig.switchAll=void 0;var coe=Du(),loe=Et();function uoe(){return coe.switchMap(loe.identity)}ig.switchAll=uoe});var AD=m(sg=>{"use strict";Object.defineProperty(sg,"__esModule",{value:!0});sg.switchMapTo=void 0;var _D=Du(),doe=Ce();function foe(r,e){return doe.isFunction(e)?_D.switchMap(function(){return r},e):_D.switchMap(function(){return r})}sg.switchMapTo=foe});var wD=m(og=>{"use strict";Object.defineProperty(og,"__esModule",{value:!0});og.switchScan=void 0;var hoe=Du(),poe=K();function moe(r,e){return poe.operate(function(t,n){var i=e;return hoe.switchMap(function(s,o){return r(i,s,o)},function(s,o){return i=o,o})(t).subscribe(n),function(){i=null}})}og.switchScan=moe});var ED=m(ag=>{"use strict";Object.defineProperty(ag,"__esModule",{value:!0});ag.takeUntil=void 0;var goe=K(),yoe=te(),voe=ue(),boe=wt();function _oe(r){return goe.operate(function(e,t){voe.innerFrom(r).subscribe(yoe.createOperatorSubscriber(t,function(){return t.complete()},boe.noop)),!t.closed&&e.subscribe(t)})}ag.takeUntil=_oe});var SD=m(cg=>{"use strict";Object.defineProperty(cg,"__esModule",{value:!0});cg.takeWhile=void 0;var Aoe=K(),woe=te();function Eoe(r,e){return e===void 0&&(e=!1),Aoe.operate(function(t,n){var i=0;t.subscribe(woe.createOperatorSubscriber(n,function(s){var o=r(s,i++);(o||e)&&n.next(s),!o&&n.complete()}))})}cg.takeWhile=Eoe});var TD=m(lg=>{"use strict";Object.defineProperty(lg,"__esModule",{value:!0});lg.tap=void 0;var Soe=Ce(),Toe=K(),Coe=te(),xoe=Et();function Ooe(r,e,t){var n=Soe.isFunction(r)||e||t?{next:r,error:e,complete:t}:r;return n?Toe.operate(function(i,s){var o;(o=n.subscribe)===null||o===void 0||o.call(n);var a=!0;i.subscribe(Coe.createOperatorSubscriber(s,function(c){var l;(l=n.next)===null||l===void 0||l.call(n,c),s.next(c)},function(){var c;a=!1,(c=n.complete)===null||c===void 0||c.call(n),s.complete()},function(c){var l;a=!1,(l=n.error)===null||l===void 0||l.call(n,c),s.error(c)},function(){var c,l;a&&((c=n.unsubscribe)===null||c===void 0||c.call(n)),(l=n.finalize)===null||l===void 0||l.call(n)}))}):xoe.identity}lg.tap=Ooe});var Vw=m(ug=>{"use strict";Object.defineProperty(ug,"__esModule",{value:!0});ug.throttle=void 0;var Ioe=K(),CD=te(),Poe=ue();function koe(r,e){return Ioe.operate(function(t,n){var i=e??{},s=i.leading,o=s===void 0?!0:s,a=i.trailing,c=a===void 0?!1:a,l=!1,u=null,d=null,f=!1,h=function(){d?.unsubscribe(),d=null,c&&(b(),f&&n.complete())},g=function(){d=null,f&&n.complete()},p=function(y){return d=Poe.innerFrom(r(y)).subscribe(CD.createOperatorSubscriber(n,h,g))},b=function(){if(l){l=!1;var y=u;u=null,n.next(y),!f&&p(y)}};t.subscribe(CD.createOperatorSubscriber(n,function(y){l=!0,u=y,!(d&&!d.closed)&&(o?b():p(y))},function(){f=!0,!(c&&l&&d&&!d.closed)&&n.complete()}))})}ug.throttle=koe});var xD=m(dg=>{"use strict";Object.defineProperty(dg,"__esModule",{value:!0});dg.throttleTime=void 0;var Roe=rr(),Noe=Vw(),Moe=is();function Doe(r,e,t){e===void 0&&(e=Roe.asyncScheduler);var n=Moe.timer(r,e);return Noe.throttle(function(){return n},t)}dg.throttleTime=Doe});var ID=m(Oc=>{"use strict";Object.defineProperty(Oc,"__esModule",{value:!0});Oc.TimeInterval=Oc.timeInterval=void 0;var qoe=rr(),Loe=K(),Boe=te();function Foe(r){return r===void 0&&(r=qoe.asyncScheduler),Loe.operate(function(e,t){var n=r.now();e.subscribe(Boe.createOperatorSubscriber(t,function(i){var s=r.now(),o=s-n;n=s,t.next(new OD(i,o))}))})}Oc.timeInterval=Foe;var OD=function(){function r(e,t){this.value=e,this.interval=t}return r}();Oc.TimeInterval=OD});var PD=m(fg=>{"use strict";Object.defineProperty(fg,"__esModule",{value:!0});fg.timeoutWith=void 0;var Uoe=rr(),joe=c0(),zoe=l0();function Hoe(r,e,t){var n,i,s;if(t=t??Uoe.async,joe.isValidDate(r)?n=r:typeof r=="number"&&(i=r),e)s=function(){return e};else throw new TypeError("No observable provided to switch to");if(n==null&&i==null)throw new TypeError("No timeout provided.");return zoe.timeout({first:n,each:i,scheduler:t,with:s})}fg.timeoutWith=Hoe});var kD=m(hg=>{"use strict";Object.defineProperty(hg,"__esModule",{value:!0});hg.timestamp=void 0;var Goe=Tp(),Voe=es();function Woe(r){return r===void 0&&(r=Goe.dateTimestampProvider),Voe.map(function(e){return{value:e,timestamp:r.now()}})}hg.timestamp=Woe});var MD=m(pg=>{"use strict";Object.defineProperty(pg,"__esModule",{value:!0});pg.window=void 0;var RD=St(),Koe=K(),ND=te(),Qoe=wt(),Joe=ue();function $oe(r){return Koe.operate(function(e,t){var n=new RD.Subject;t.next(n.asObservable());var i=function(s){n.error(s),t.error(s)};return e.subscribe(ND.createOperatorSubscriber(t,function(s){return n?.next(s)},function(){n.complete(),t.complete()},i)),Joe.innerFrom(r).subscribe(ND.createOperatorSubscriber(t,function(){n.complete(),t.next(n=new RD.Subject)},Qoe.noop,i)),function(){n?.unsubscribe(),n=null}})}pg.window=$oe});var qD=m(Ic=>{"use strict";var Yoe=Ic&&Ic.__values||function(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(Ic,"__esModule",{value:!0});Ic.windowCount=void 0;var DD=St(),Zoe=K(),Xoe=te();function eae(r,e){e===void 0&&(e=0);var t=e>0?e:r;return Zoe.operate(function(n,i){var s=[new DD.Subject],o=[],a=0;i.next(s[0].asObservable()),n.subscribe(Xoe.createOperatorSubscriber(i,function(c){var l,u;try{for(var d=Yoe(s),f=d.next();!f.done;f=d.next()){var h=f.value;h.next(c)}}catch(b){l={error:b}}finally{try{f&&!f.done&&(u=d.return)&&u.call(d)}finally{if(l)throw l.error}}var g=a-r+1;if(g>=0&&g%t===0&&s.shift().complete(),++a%t===0){var p=new DD.Subject;s.push(p),i.next(p.asObservable())}},function(){for(;s.length>0;)s.shift().complete();i.complete()},function(c){for(;s.length>0;)s.shift().error(c);i.error(c)},function(){o=null,s=null}))})}Ic.windowCount=eae});var BD=m(mg=>{"use strict";Object.defineProperty(mg,"__esModule",{value:!0});mg.windowTime=void 0;var tae=St(),rae=rr(),nae=pr(),iae=K(),sae=te(),oae=ti(),aae=nr(),LD=ri();function cae(r){for(var e,t,n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];var s=(e=aae.popScheduler(n))!==null&&e!==void 0?e:rae.asyncScheduler,o=(t=n[0])!==null&&t!==void 0?t:null,a=n[1]||1/0;return iae.operate(function(c,l){var u=[],d=!1,f=function(b){var y=b.window,A=b.subs;y.complete(),A.unsubscribe(),oae.arrRemove(u,b),d&&h()},h=function(){if(u){var b=new nae.Subscription;l.add(b);var y=new tae.Subject,A={window:y,subs:b,seen:0};u.push(A),l.next(y.asObservable()),LD.executeSchedule(b,s,function(){return f(A)},r)}};o!==null&&o>=0?LD.executeSchedule(l,s,h,o,!0):d=!0,h();var g=function(b){return u.slice().forEach(b)},p=function(b){g(function(y){var A=y.window;return b(A)}),b(l),l.unsubscribe()};return c.subscribe(sae.createOperatorSubscriber(l,function(b){g(function(y){y.window.next(b),a<=++y.seen&&f(y)})},function(){return p(function(b){return b.complete()})},function(b){return p(function(y){return y.error(b)})})),function(){u=null}})}mg.windowTime=cae});var jD=m(Pc=>{"use strict";var lae=Pc&&Pc.__values||function(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(Pc,"__esModule",{value:!0});Pc.windowToggle=void 0;var uae=St(),dae=pr(),fae=K(),FD=ue(),Ww=te(),UD=wt(),hae=ti();function pae(r,e){return fae.operate(function(t,n){var i=[],s=function(o){for(;0<i.length;)i.shift().error(o);n.error(o)};FD.innerFrom(r).subscribe(Ww.createOperatorSubscriber(n,function(o){var a=new uae.Subject;i.push(a);var c=new dae.Subscription,l=function(){hae.arrRemove(i,a),a.complete(),c.unsubscribe()},u;try{u=FD.innerFrom(e(o))}catch(d){s(d);return}n.next(a.asObservable()),c.add(u.subscribe(Ww.createOperatorSubscriber(n,l,UD.noop,s)))},UD.noop)),t.subscribe(Ww.createOperatorSubscriber(n,function(o){var a,c,l=i.slice();try{for(var u=lae(l),d=u.next();!d.done;d=u.next()){var f=d.value;f.next(o)}}catch(h){a={error:h}}finally{try{d&&!d.done&&(c=u.return)&&c.call(u)}finally{if(a)throw a.error}}},function(){for(;0<i.length;)i.shift().complete();n.complete()},s,function(){for(;0<i.length;)i.shift().unsubscribe()}))})}Pc.windowToggle=pae});var HD=m(gg=>{"use strict";Object.defineProperty(gg,"__esModule",{value:!0});gg.windowWhen=void 0;var mae=St(),gae=K(),zD=te(),yae=ue();function vae(r){return gae.operate(function(e,t){var n,i,s=function(a){n.error(a),t.error(a)},o=function(){i?.unsubscribe(),n?.complete(),n=new mae.Subject,t.next(n.asObservable());var a;try{a=yae.innerFrom(r())}catch(c){s(c);return}a.subscribe(i=zD.createOperatorSubscriber(t,o,o,s))};o(),e.subscribe(zD.createOperatorSubscriber(t,function(a){return n.next(a)},function(){n.complete(),t.complete()},s,function(){i?.unsubscribe(),n=null}))})}gg.windowWhen=vae});var KD=m(ms=>{"use strict";var GD=ms&&ms.__read||function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,s=[],o;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(o)throw o.error}}return s},VD=ms&&ms.__spreadArray||function(r,e){for(var t=0,n=e.length,i=r.length;t<n;t++,i++)r[i]=e[t];return r};Object.defineProperty(ms,"__esModule",{value:!0});ms.withLatestFrom=void 0;var bae=K(),WD=te(),_ae=ue(),Aae=Et(),wae=wt(),Eae=nr();function Sae(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var t=Eae.popResultSelector(r);return bae.operate(function(n,i){for(var s=r.length,o=new Array(s),a=r.map(function(){return!1}),c=!1,l=function(d){_ae.innerFrom(r[d]).subscribe(WD.createOperatorSubscriber(i,function(f){o[d]=f,!c&&!a[d]&&(a[d]=!0,(c=a.every(Aae.identity))&&(a=null))},wae.noop))},u=0;u<s;u++)l(u);n.subscribe(WD.createOperatorSubscriber(i,function(d){if(c){var f=VD([d],GD(o));i.next(t?t.apply(void 0,VD([],GD(f))):f)}}))})}ms.withLatestFrom=Sae});var QD=m(yg=>{"use strict";Object.defineProperty(yg,"__esModule",{value:!0});yg.zipAll=void 0;var Tae=F0(),Cae=Pw();function xae(r){return Cae.joinAllInternals(Tae.zip,r)}yg.zipAll=xae});var JD=m(gs=>{"use strict";var Oae=gs&&gs.__read||function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,s=[],o;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(o)throw o.error}}return s},Iae=gs&&gs.__spreadArray||function(r,e){for(var t=0,n=e.length,i=r.length;t<n;t++,i++)r[i]=e[t];return r};Object.defineProperty(gs,"__esModule",{value:!0});gs.zip=void 0;var Pae=F0(),kae=K();function Rae(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];return kae.operate(function(t,n){Pae.zip.apply(void 0,Iae([t],Oae(r))).subscribe(n)})}gs.zip=Rae});var $D=m(ys=>{"use strict";var Nae=ys&&ys.__read||function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,s=[],o;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(o)throw o.error}}return s},Mae=ys&&ys.__spreadArray||function(r,e){for(var t=0,n=e.length,i=r.length;t<n;t++,i++)r[i]=e[t];return r};Object.defineProperty(ys,"__esModule",{value:!0});ys.zipWith=void 0;var Dae=JD();function qae(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];return Dae.zip.apply(void 0,Mae([],Nae(r)))}ys.zipWith=qae});var nq=m(v=>{"use strict";var Lae=v&&v.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),Bae=v&&v.__exportStar||function(r,e){for(var t in r)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&Lae(e,r,t)};Object.defineProperty(v,"__esModule",{value:!0});v.interval=v.iif=v.generate=v.fromEventPattern=v.fromEvent=v.from=v.forkJoin=v.empty=v.defer=v.connectable=v.concat=v.combineLatest=v.bindNodeCallback=v.bindCallback=v.UnsubscriptionError=v.TimeoutError=v.SequenceError=v.ObjectUnsubscribedError=v.NotFoundError=v.EmptyError=v.ArgumentOutOfRangeError=v.firstValueFrom=v.lastValueFrom=v.isObservable=v.identity=v.noop=v.pipe=v.NotificationKind=v.Notification=v.Subscriber=v.Subscription=v.Scheduler=v.VirtualAction=v.VirtualTimeScheduler=v.animationFrameScheduler=v.animationFrame=v.queueScheduler=v.queue=v.asyncScheduler=v.async=v.asapScheduler=v.asap=v.AsyncSubject=v.ReplaySubject=v.BehaviorSubject=v.Subject=v.animationFrames=v.observable=v.ConnectableObservable=v.Observable=void 0;v.filter=v.expand=v.exhaustMap=v.exhaustAll=v.exhaust=v.every=v.endWith=v.elementAt=v.distinctUntilKeyChanged=v.distinctUntilChanged=v.distinct=v.dematerialize=v.delayWhen=v.delay=v.defaultIfEmpty=v.debounceTime=v.debounce=v.count=v.connect=v.concatWith=v.concatMapTo=v.concatMap=v.concatAll=v.combineLatestWith=v.combineLatestAll=v.combineAll=v.catchError=v.bufferWhen=v.bufferToggle=v.bufferTime=v.bufferCount=v.buffer=v.auditTime=v.audit=v.config=v.NEVER=v.EMPTY=v.scheduled=v.zip=v.using=v.timer=v.throwError=v.range=v.race=v.partition=v.pairs=v.onErrorResumeNext=v.of=v.never=v.merge=void 0;v.switchMap=v.switchAll=v.subscribeOn=v.startWith=v.skipWhile=v.skipUntil=v.skipLast=v.skip=v.single=v.shareReplay=v.share=v.sequenceEqual=v.scan=v.sampleTime=v.sample=v.refCount=v.retryWhen=v.retry=v.repeatWhen=v.repeat=v.reduce=v.raceWith=v.publishReplay=v.publishLast=v.publishBehavior=v.publish=v.pluck=v.pairwise=v.onErrorResumeNextWith=v.observeOn=v.multicast=v.min=v.mergeWith=v.mergeScan=v.mergeMapTo=v.mergeMap=v.flatMap=v.mergeAll=v.max=v.materialize=v.mapTo=v.map=v.last=v.isEmpty=v.ignoreElements=v.groupBy=v.first=v.findIndex=v.find=v.finalize=void 0;v.zipWith=v.zipAll=v.withLatestFrom=v.windowWhen=v.windowToggle=v.windowTime=v.windowCount=v.window=v.toArray=v.timestamp=v.timeoutWith=v.timeout=v.timeInterval=v.throwIfEmpty=v.throttleTime=v.throttle=v.tap=v.takeWhile=v.takeUntil=v.takeLast=v.take=v.switchScan=v.switchMapTo=void 0;var Fae=Pe();Object.defineProperty(v,"Observable",{enumerable:!0,get:function(){return Fae.Observable}});var Uae=Eu();Object.defineProperty(v,"ConnectableObservable",{enumerable:!0,get:function(){return Uae.ConnectableObservable}});var jae=Au();Object.defineProperty(v,"observable",{enumerable:!0,get:function(){return jae.observable}});var zae=tM();Object.defineProperty(v,"animationFrames",{enumerable:!0,get:function(){return zae.animationFrames}});var Hae=St();Object.defineProperty(v,"Subject",{enumerable:!0,get:function(){return Hae.Subject}});var Gae=$A();Object.defineProperty(v,"BehaviorSubject",{enumerable:!0,get:function(){return Gae.BehaviorSubject}});var Vae=Cp();Object.defineProperty(v,"ReplaySubject",{enumerable:!0,get:function(){return Vae.ReplaySubject}});var Wae=xp();Object.defineProperty(v,"AsyncSubject",{enumerable:!0,get:function(){return Wae.AsyncSubject}});var YD=vM();Object.defineProperty(v,"asap",{enumerable:!0,get:function(){return YD.asap}});Object.defineProperty(v,"asapScheduler",{enumerable:!0,get:function(){return YD.asapScheduler}});var ZD=rr();Object.defineProperty(v,"async",{enumerable:!0,get:function(){return ZD.async}});Object.defineProperty(v,"asyncScheduler",{enumerable:!0,get:function(){return ZD.asyncScheduler}});var XD=AM();Object.defineProperty(v,"queue",{enumerable:!0,get:function(){return XD.queue}});Object.defineProperty(v,"queueScheduler",{enumerable:!0,get:function(){return XD.queueScheduler}});var eq=TM();Object.defineProperty(v,"animationFrame",{enumerable:!0,get:function(){return eq.animationFrame}});Object.defineProperty(v,"animationFrameScheduler",{enumerable:!0,get:function(){return eq.animationFrameScheduler}});var tq=OM();Object.defineProperty(v,"VirtualTimeScheduler",{enumerable:!0,get:function(){return tq.VirtualTimeScheduler}});Object.defineProperty(v,"VirtualAction",{enumerable:!0,get:function(){return tq.VirtualAction}});var Kae=ZA();Object.defineProperty(v,"Scheduler",{enumerable:!0,get:function(){return Kae.Scheduler}});var Qae=pr();Object.defineProperty(v,"Subscription",{enumerable:!0,get:function(){return Qae.Subscription}});var Jae=$a();Object.defineProperty(v,"Subscriber",{enumerable:!0,get:function(){return Jae.Subscriber}});var rq=Xp();Object.defineProperty(v,"Notification",{enumerable:!0,get:function(){return rq.Notification}});Object.defineProperty(v,"NotificationKind",{enumerable:!0,get:function(){return rq.NotificationKind}});var $ae=wu();Object.defineProperty(v,"pipe",{enumerable:!0,get:function(){return $ae.pipe}});var Yae=wt();Object.defineProperty(v,"noop",{enumerable:!0,get:function(){return Yae.noop}});var Zae=Et();Object.defineProperty(v,"identity",{enumerable:!0,get:function(){return Zae.identity}});var Xae=VM();Object.defineProperty(v,"isObservable",{enumerable:!0,get:function(){return Xae.isObservable}});var ece=WM();Object.defineProperty(v,"lastValueFrom",{enumerable:!0,get:function(){return ece.lastValueFrom}});var tce=KM();Object.defineProperty(v,"firstValueFrom",{enumerable:!0,get:function(){return tce.firstValueFrom}});var rce=hw();Object.defineProperty(v,"ArgumentOutOfRangeError",{enumerable:!0,get:function(){return rce.ArgumentOutOfRangeError}});var nce=Xi();Object.defineProperty(v,"EmptyError",{enumerable:!0,get:function(){return nce.EmptyError}});var ice=pw();Object.defineProperty(v,"NotFoundError",{enumerable:!0,get:function(){return ice.NotFoundError}});var sce=WA();Object.defineProperty(v,"ObjectUnsubscribedError",{enumerable:!0,get:function(){return sce.ObjectUnsubscribedError}});var oce=mw();Object.defineProperty(v,"SequenceError",{enumerable:!0,get:function(){return oce.SequenceError}});var ace=l0();Object.defineProperty(v,"TimeoutError",{enumerable:!0,get:function(){return ace.TimeoutError}});var cce=NA();Object.defineProperty(v,"UnsubscriptionError",{enumerable:!0,get:function(){return cce.UnsubscriptionError}});var lce=JM();Object.defineProperty(v,"bindCallback",{enumerable:!0,get:function(){return lce.bindCallback}});var uce=$M();Object.defineProperty(v,"bindNodeCallback",{enumerable:!0,get:function(){return uce.bindNodeCallback}});var dce=m0();Object.defineProperty(v,"combineLatest",{enumerable:!0,get:function(){return dce.combineLatest}});var fce=Pu();Object.defineProperty(v,"concat",{enumerable:!0,get:function(){return fce.concat}});var hce=i2();Object.defineProperty(v,"connectable",{enumerable:!0,get:function(){return hce.connectable}});var pce=ku();Object.defineProperty(v,"defer",{enumerable:!0,get:function(){return pce.defer}});var mce=$r();Object.defineProperty(v,"empty",{enumerable:!0,get:function(){return mce.empty}});var gce=s2();Object.defineProperty(v,"forkJoin",{enumerable:!0,get:function(){return gce.forkJoin}});var yce=ni();Object.defineProperty(v,"from",{enumerable:!0,get:function(){return yce.from}});var vce=a2();Object.defineProperty(v,"fromEvent",{enumerable:!0,get:function(){return vce.fromEvent}});var bce=l2();Object.defineProperty(v,"fromEventPattern",{enumerable:!0,get:function(){return bce.fromEventPattern}});var _ce=d2();Object.defineProperty(v,"generate",{enumerable:!0,get:function(){return _ce.generate}});var Ace=f2();Object.defineProperty(v,"iif",{enumerable:!0,get:function(){return Ace.iif}});var wce=Aw();Object.defineProperty(v,"interval",{enumerable:!0,get:function(){return wce.interval}});var Ece=p2();Object.defineProperty(v,"merge",{enumerable:!0,get:function(){return Ece.merge}});var Sce=ww();Object.defineProperty(v,"never",{enumerable:!0,get:function(){return Sce.never}});var Tce=Yp();Object.defineProperty(v,"of",{enumerable:!0,get:function(){return Tce.of}});var Cce=Ew();Object.defineProperty(v,"onErrorResumeNext",{enumerable:!0,get:function(){return Cce.onErrorResumeNext}});var xce=g2();Object.defineProperty(v,"pairs",{enumerable:!0,get:function(){return xce.pairs}});var Oce=_2();Object.defineProperty(v,"partition",{enumerable:!0,get:function(){return Oce.partition}});var Ice=Sw();Object.defineProperty(v,"race",{enumerable:!0,get:function(){return Ice.race}});var Pce=E2();Object.defineProperty(v,"range",{enumerable:!0,get:function(){return Pce.range}});var kce=fw();Object.defineProperty(v,"throwError",{enumerable:!0,get:function(){return kce.throwError}});var Rce=is();Object.defineProperty(v,"timer",{enumerable:!0,get:function(){return Rce.timer}});var Nce=S2();Object.defineProperty(v,"using",{enumerable:!0,get:function(){return Nce.using}});var Mce=F0();Object.defineProperty(v,"zip",{enumerable:!0,get:function(){return Mce.zip}});var Dce=dw();Object.defineProperty(v,"scheduled",{enumerable:!0,get:function(){return Dce.scheduled}});var qce=$r();Object.defineProperty(v,"EMPTY",{enumerable:!0,get:function(){return qce.EMPTY}});var Lce=ww();Object.defineProperty(v,"NEVER",{enumerable:!0,get:function(){return Lce.NEVER}});Bae(C2(),v);var Bce=Qa();Object.defineProperty(v,"config",{enumerable:!0,get:function(){return Bce.config}});var Fce=Tw();Object.defineProperty(v,"audit",{enumerable:!0,get:function(){return Fce.audit}});var Uce=O2();Object.defineProperty(v,"auditTime",{enumerable:!0,get:function(){return Uce.auditTime}});var jce=P2();Object.defineProperty(v,"buffer",{enumerable:!0,get:function(){return jce.buffer}});var zce=k2();Object.defineProperty(v,"bufferCount",{enumerable:!0,get:function(){return zce.bufferCount}});var Hce=N2();Object.defineProperty(v,"bufferTime",{enumerable:!0,get:function(){return Hce.bufferTime}});var Gce=q2();Object.defineProperty(v,"bufferToggle",{enumerable:!0,get:function(){return Gce.bufferToggle}});var Vce=B2();Object.defineProperty(v,"bufferWhen",{enumerable:!0,get:function(){return Vce.bufferWhen}});var Wce=U2();Object.defineProperty(v,"catchError",{enumerable:!0,get:function(){return Wce.catchError}});var Kce=j2();Object.defineProperty(v,"combineAll",{enumerable:!0,get:function(){return Kce.combineAll}});var Qce=kw();Object.defineProperty(v,"combineLatestAll",{enumerable:!0,get:function(){return Qce.combineLatestAll}});var Jce=W2();Object.defineProperty(v,"combineLatestWith",{enumerable:!0,get:function(){return Jce.combineLatestWith}});var $ce=A0();Object.defineProperty(v,"concatAll",{enumerable:!0,get:function(){return $ce.concatAll}});var Yce=Rw();Object.defineProperty(v,"concatMap",{enumerable:!0,get:function(){return Yce.concatMap}});var Zce=J2();Object.defineProperty(v,"concatMapTo",{enumerable:!0,get:function(){return Zce.concatMapTo}});var Xce=Y2();Object.defineProperty(v,"concatWith",{enumerable:!0,get:function(){return Xce.concatWith}});var ele=tm();Object.defineProperty(v,"connect",{enumerable:!0,get:function(){return ele.connect}});var tle=X2();Object.defineProperty(v,"count",{enumerable:!0,get:function(){return tle.count}});var rle=t3();Object.defineProperty(v,"debounce",{enumerable:!0,get:function(){return rle.debounce}});var nle=r3();Object.defineProperty(v,"debounceTime",{enumerable:!0,get:function(){return nle.debounceTime}});var ile=Ru();Object.defineProperty(v,"defaultIfEmpty",{enumerable:!0,get:function(){return ile.defaultIfEmpty}});var sle=s3();Object.defineProperty(v,"delay",{enumerable:!0,get:function(){return sle.delay}});var ole=Dw();Object.defineProperty(v,"delayWhen",{enumerable:!0,get:function(){return ole.delayWhen}});var ale=o3();Object.defineProperty(v,"dematerialize",{enumerable:!0,get:function(){return ale.dematerialize}});var cle=c3();Object.defineProperty(v,"distinct",{enumerable:!0,get:function(){return cle.distinct}});var lle=qw();Object.defineProperty(v,"distinctUntilChanged",{enumerable:!0,get:function(){return lle.distinctUntilChanged}});var ule=l3();Object.defineProperty(v,"distinctUntilKeyChanged",{enumerable:!0,get:function(){return ule.distinctUntilKeyChanged}});var dle=d3();Object.defineProperty(v,"elementAt",{enumerable:!0,get:function(){return dle.elementAt}});var fle=f3();Object.defineProperty(v,"endWith",{enumerable:!0,get:function(){return fle.endWith}});var hle=h3();Object.defineProperty(v,"every",{enumerable:!0,get:function(){return hle.every}});var ple=y3();Object.defineProperty(v,"exhaust",{enumerable:!0,get:function(){return ple.exhaust}});var mle=Bw();Object.defineProperty(v,"exhaustAll",{enumerable:!0,get:function(){return mle.exhaustAll}});var gle=Lw();Object.defineProperty(v,"exhaustMap",{enumerable:!0,get:function(){return gle.exhaustMap}});var yle=v3();Object.defineProperty(v,"expand",{enumerable:!0,get:function(){return yle.expand}});var vle=wo();Object.defineProperty(v,"filter",{enumerable:!0,get:function(){return vle.filter}});var ble=b3();Object.defineProperty(v,"finalize",{enumerable:!0,get:function(){return ble.finalize}});var _le=Fw();Object.defineProperty(v,"find",{enumerable:!0,get:function(){return _le.find}});var Ale=A3();Object.defineProperty(v,"findIndex",{enumerable:!0,get:function(){return Ale.findIndex}});var wle=w3();Object.defineProperty(v,"first",{enumerable:!0,get:function(){return wle.first}});var Ele=S3();Object.defineProperty(v,"groupBy",{enumerable:!0,get:function(){return Ele.groupBy}});var Sle=Nw();Object.defineProperty(v,"ignoreElements",{enumerable:!0,get:function(){return Sle.ignoreElements}});var Tle=T3();Object.defineProperty(v,"isEmpty",{enumerable:!0,get:function(){return Tle.isEmpty}});var Cle=C3();Object.defineProperty(v,"last",{enumerable:!0,get:function(){return Cle.last}});var xle=es();Object.defineProperty(v,"map",{enumerable:!0,get:function(){return xle.map}});var Ole=Mw();Object.defineProperty(v,"mapTo",{enumerable:!0,get:function(){return Ole.mapTo}});var Ile=x3();Object.defineProperty(v,"materialize",{enumerable:!0,get:function(){return Ile.materialize}});var Ple=O3();Object.defineProperty(v,"max",{enumerable:!0,get:function(){return Ple.max}});var kle=Iu();Object.defineProperty(v,"mergeAll",{enumerable:!0,get:function(){return kle.mergeAll}});var Rle=I3();Object.defineProperty(v,"flatMap",{enumerable:!0,get:function(){return Rle.flatMap}});var Nle=si();Object.defineProperty(v,"mergeMap",{enumerable:!0,get:function(){return Nle.mergeMap}});var Mle=k3();Object.defineProperty(v,"mergeMapTo",{enumerable:!0,get:function(){return Mle.mergeMapTo}});var Dle=R3();Object.defineProperty(v,"mergeScan",{enumerable:!0,get:function(){return Dle.mergeScan}});var qle=D3();Object.defineProperty(v,"mergeWith",{enumerable:!0,get:function(){return qle.mergeWith}});var Lle=q3();Object.defineProperty(v,"min",{enumerable:!0,get:function(){return Lle.min}});var Ble=Dm();Object.defineProperty(v,"multicast",{enumerable:!0,get:function(){return Ble.multicast}});var Fle=xu();Object.defineProperty(v,"observeOn",{enumerable:!0,get:function(){return Fle.observeOn}});var Ule=F3();Object.defineProperty(v,"onErrorResumeNextWith",{enumerable:!0,get:function(){return Ule.onErrorResumeNextWith}});var jle=U3();Object.defineProperty(v,"pairwise",{enumerable:!0,get:function(){return jle.pairwise}});var zle=j3();Object.defineProperty(v,"pluck",{enumerable:!0,get:function(){return zle.pluck}});var Hle=z3();Object.defineProperty(v,"publish",{enumerable:!0,get:function(){return Hle.publish}});var Gle=H3();Object.defineProperty(v,"publishBehavior",{enumerable:!0,get:function(){return Gle.publishBehavior}});var Vle=G3();Object.defineProperty(v,"publishLast",{enumerable:!0,get:function(){return Vle.publishLast}});var Wle=W3();Object.defineProperty(v,"publishReplay",{enumerable:!0,get:function(){return Wle.publishReplay}});var Kle=K3();Object.defineProperty(v,"raceWith",{enumerable:!0,get:function(){return Kle.raceWith}});var Qle=Tc();Object.defineProperty(v,"reduce",{enumerable:!0,get:function(){return Qle.reduce}});var Jle=J3();Object.defineProperty(v,"repeat",{enumerable:!0,get:function(){return Jle.repeat}});var $le=Y3();Object.defineProperty(v,"repeatWhen",{enumerable:!0,get:function(){return $le.repeatWhen}});var Yle=X3();Object.defineProperty(v,"retry",{enumerable:!0,get:function(){return Yle.retry}});var Zle=tD();Object.defineProperty(v,"retryWhen",{enumerable:!0,get:function(){return Zle.retryWhen}});var Xle=GA();Object.defineProperty(v,"refCount",{enumerable:!0,get:function(){return Xle.refCount}});var eue=zw();Object.defineProperty(v,"sample",{enumerable:!0,get:function(){return eue.sample}});var tue=nD();Object.defineProperty(v,"sampleTime",{enumerable:!0,get:function(){return tue.sampleTime}});var rue=iD();Object.defineProperty(v,"scan",{enumerable:!0,get:function(){return rue.scan}});var nue=oD();Object.defineProperty(v,"sequenceEqual",{enumerable:!0,get:function(){return nue.sequenceEqual}});var iue=Gw();Object.defineProperty(v,"share",{enumerable:!0,get:function(){return iue.share}});var sue=lD();Object.defineProperty(v,"shareReplay",{enumerable:!0,get:function(){return sue.shareReplay}});var oue=uD();Object.defineProperty(v,"single",{enumerable:!0,get:function(){return oue.single}});var aue=dD();Object.defineProperty(v,"skip",{enumerable:!0,get:function(){return aue.skip}});var cue=fD();Object.defineProperty(v,"skipLast",{enumerable:!0,get:function(){return cue.skipLast}});var lue=pD();Object.defineProperty(v,"skipUntil",{enumerable:!0,get:function(){return lue.skipUntil}});var uue=mD();Object.defineProperty(v,"skipWhile",{enumerable:!0,get:function(){return uue.skipWhile}});var due=yD();Object.defineProperty(v,"startWith",{enumerable:!0,get:function(){return due.startWith}});var fue=Ou();Object.defineProperty(v,"subscribeOn",{enumerable:!0,get:function(){return fue.subscribeOn}});var hue=bD();Object.defineProperty(v,"switchAll",{enumerable:!0,get:function(){return hue.switchAll}});var pue=Du();Object.defineProperty(v,"switchMap",{enumerable:!0,get:function(){return pue.switchMap}});var mue=AD();Object.defineProperty(v,"switchMapTo",{enumerable:!0,get:function(){return mue.switchMapTo}});var gue=wD();Object.defineProperty(v,"switchScan",{enumerable:!0,get:function(){return gue.switchScan}});var yue=Nu();Object.defineProperty(v,"take",{enumerable:!0,get:function(){return yue.take}});var vue=Uw();Object.defineProperty(v,"takeLast",{enumerable:!0,get:function(){return vue.takeLast}});var bue=ED();Object.defineProperty(v,"takeUntil",{enumerable:!0,get:function(){return bue.takeUntil}});var _ue=SD();Object.defineProperty(v,"takeWhile",{enumerable:!0,get:function(){return _ue.takeWhile}});var Aue=TD();Object.defineProperty(v,"tap",{enumerable:!0,get:function(){return Aue.tap}});var wue=Vw();Object.defineProperty(v,"throttle",{enumerable:!0,get:function(){return wue.throttle}});var Eue=xD();Object.defineProperty(v,"throttleTime",{enumerable:!0,get:function(){return Eue.throttleTime}});var Sue=Mu();Object.defineProperty(v,"throwIfEmpty",{enumerable:!0,get:function(){return Sue.throwIfEmpty}});var Tue=ID();Object.defineProperty(v,"timeInterval",{enumerable:!0,get:function(){return Tue.timeInterval}});var Cue=l0();Object.defineProperty(v,"timeout",{enumerable:!0,get:function(){return Cue.timeout}});var xue=PD();Object.defineProperty(v,"timeoutWith",{enumerable:!0,get:function(){return xue.timeoutWith}});var Oue=kD();Object.defineProperty(v,"timestamp",{enumerable:!0,get:function(){return Oue.timestamp}});var Iue=Iw();Object.defineProperty(v,"toArray",{enumerable:!0,get:function(){return Iue.toArray}});var Pue=MD();Object.defineProperty(v,"window",{enumerable:!0,get:function(){return Pue.window}});var kue=qD();Object.defineProperty(v,"windowCount",{enumerable:!0,get:function(){return kue.windowCount}});var Rue=BD();Object.defineProperty(v,"windowTime",{enumerable:!0,get:function(){return Rue.windowTime}});var Nue=jD();Object.defineProperty(v,"windowToggle",{enumerable:!0,get:function(){return Nue.windowToggle}});var Mue=HD();Object.defineProperty(v,"windowWhen",{enumerable:!0,get:function(){return Mue.windowWhen}});var Due=KD();Object.defineProperty(v,"withLatestFrom",{enumerable:!0,get:function(){return Due.withLatestFrom}});var que=QD();Object.defineProperty(v,"zipAll",{enumerable:!0,get:function(){return que.zipAll}});var Lue=$D();Object.defineProperty(v,"zipWith",{enumerable:!0,get:function(){return Lue.zipWith}})});var i6=m((ZIe,rS)=>{"use strict";var Khe=Object.prototype.hasOwnProperty,$t="~";function pd(){}Object.create&&(pd.prototype=Object.create(null),new pd().__proto__||($t=!1));function Qhe(r,e,t){this.fn=r,this.context=e,this.once=t||!1}function n6(r,e,t,n,i){if(typeof t!="function")throw new TypeError("The listener must be a function");var s=new Qhe(t,n||r,i),o=$t?$t+e:e;return r._events[o]?r._events[o].fn?r._events[o]=[r._events[o],s]:r._events[o].push(s):(r._events[o]=s,r._eventsCount++),r}function Sy(r,e){--r._eventsCount===0?r._events=new pd:delete r._events[e]}function Mt(){this._events=new pd,this._eventsCount=0}Mt.prototype.eventNames=function(){var e=[],t,n;if(this._eventsCount===0)return e;for(n in t=this._events)Khe.call(t,n)&&e.push($t?n.slice(1):n);return Object.getOwnPropertySymbols?e.concat(Object.getOwnPropertySymbols(t)):e};Mt.prototype.listeners=function(e){var t=$t?$t+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var i=0,s=n.length,o=new Array(s);i<s;i++)o[i]=n[i].fn;return o};Mt.prototype.listenerCount=function(e){var t=$t?$t+e:e,n=this._events[t];return n?n.fn?1:n.length:0};Mt.prototype.emit=function(e,t,n,i,s,o){var a=$t?$t+e:e;if(!this._events[a])return!1;var c=this._events[a],l=arguments.length,u,d;if(c.fn){switch(c.once&&this.removeListener(e,c.fn,void 0,!0),l){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,t),!0;case 3:return c.fn.call(c.context,t,n),!0;case 4:return c.fn.call(c.context,t,n,i),!0;case 5:return c.fn.call(c.context,t,n,i,s),!0;case 6:return c.fn.call(c.context,t,n,i,s,o),!0}for(d=1,u=new Array(l-1);d<l;d++)u[d-1]=arguments[d];c.fn.apply(c.context,u)}else{var f=c.length,h;for(d=0;d<f;d++)switch(c[d].once&&this.removeListener(e,c[d].fn,void 0,!0),l){case 1:c[d].fn.call(c[d].context);break;case 2:c[d].fn.call(c[d].context,t);break;case 3:c[d].fn.call(c[d].context,t,n);break;case 4:c[d].fn.call(c[d].context,t,n,i);break;default:if(!u)for(h=1,u=new Array(l-1);h<l;h++)u[h-1]=arguments[h];c[d].fn.apply(c[d].context,u)}}return!0};Mt.prototype.on=function(e,t,n){return n6(this,e,t,n,!1)};Mt.prototype.once=function(e,t,n){return n6(this,e,t,n,!0)};Mt.prototype.removeListener=function(e,t,n,i){var s=$t?$t+e:e;if(!this._events[s])return this;if(!t)return Sy(this,s),this;var o=this._events[s];if(o.fn)o.fn===t&&(!i||o.once)&&(!n||o.context===n)&&Sy(this,s);else{for(var a=0,c=[],l=o.length;a<l;a++)(o[a].fn!==t||i&&!o[a].once||n&&o[a].context!==n)&&c.push(o[a]);c.length?this._events[s]=c.length===1?c[0]:c:Sy(this,s)}return this};Mt.prototype.removeAllListeners=function(e){var t;return e?(t=$t?$t+e:e,this._events[t]&&Sy(this,t)):(this._events=new pd,this._eventsCount=0),this};Mt.prototype.off=Mt.prototype.removeListener;Mt.prototype.addListener=Mt.prototype.on;Mt.prefixed=$t;Mt.EventEmitter=Mt;typeof rS<"u"&&(rS.exports=Mt)});var Ty=m(ze=>{"use strict";Object.defineProperty(ze,"__esModule",{value:!0});ze.getChainType=ze.ChainId=ze.BTCChainId=ze.StarknetChainId=ze.CosmosChainId=ze.FuelChainId=ze.SolanaChainId=ze.SuiChainId=ze.AptosChainId=ze.EthChainId=ze.ChainType=void 0;var zo;(function(r){r.SOLANA="solana",r.SUI="sui",r.APTOS="aptos",r.ETH="evm",r.BTC="btc"})(zo||(ze.ChainType=zo={}));var aS;(function(r){r.ETHEREUM="1",r.OPTIMISM="10",r.CRONOS="25",r.BSC="56",r.BSC_TESTNET="97",r.UNICHAIN="130",r.POLYGON="137",r.MANTA_PACIFIC="169",r.XLAYER_TESTNET="195",r.XLAYER_MAINNET="196",r.OP_BNB_MAINNET="204",r.SONIC_MAINNET="146",r.SONIC_TESTNET="57054",r.B2_MAINNET="223",r.FANTOM="250",r.FRAXTAL="252",r.KUCOIN="321",r.CRONOS_ZKEVM="388",r.ZKSYNC_ERA="324",r.CRONOS_TESTNET="338",r.ASTAR="592",r.DERIVE="957",r.HYPER_EVM="999",r.POLYGON_ZKEVM="1101",r.CONFLUX="1030",r.METIS="1088",r.MOONBEAM="1284",r.UNICHAIN_SEPOLIA="1301",r.SEI="1329",r.SONEIUM_TESTNET="1946",r.SONEIUM_MAINNET="1868",r.SWELL_TESTNET="1924",r.SWELL_MAINNET="1923",r.TAC_TESTNET="2390",r.KARAK="2410",r.BEVM="11501",r.MERLIN_MAINNET="4200",r.MANTLE="5000",r.BASE="8453",r.MEV_COMMIT="8855",r.MONAD_TESTNET="10143",r.HOLESKY="17000",r.MODE="34443",r.ARBITRUM="42161",r.HEMI="43111",r.AVALANCHE="43114",r.ZIRCUIT_TESTNET="48899",r.ZIRCUIT_MAINNET="48900",r.BOB="60808",r.LINEA="59144",r.BERACHAIN="80094",r.BLAST="81457",r.CHILIZ="88888",r.TAIKO="167000",r.TAIKO_TESTNET="167008",r.BITLAYER="200901",r.SCROLL="534352",r.ZKLINK_NOVA="810180",r.SEPOLIA="11155111",r.ETHERLINK="42793",r.CORN_MAIZENET="21000000",r.AURORA="1313161554",r.BLAST_SEPOLIA="168587773"})(aS||(ze.EthChainId=aS={}));var cS;(function(r){r.APTOS_MAINNET="aptos_mainnet",r.APTOS_TESTNET="aptos_testnet",r.APTOS_MOVEMENT_TESTNET="aptos_movement_testnet",r.APTOS_MOVEMENT_MAINNET="aptos_movement_mainnet",r.INITIA_ECHELON="aptos_echelon"})(cS||(ze.AptosChainId=cS={}));var lS;(function(r){r.SUI_MAINNET="sui_mainnet",r.SUI_TESTNET="sui_testnet"})(lS||(ze.SuiChainId=lS={}));var uS;(function(r){r.SOLANA_MAINNET="sol_mainnet",r.SOLANA_DEVNET="sol_devnet",r.SOLANA_TESTNET="sol_testnet",r.SOLANA_PYTH="sol_pyth"})(uS||(ze.SolanaChainId=uS={}));var dS;(function(r){r.FUEL_MAINNET="fuel_mainnet",r.FUEL_TESTNET="fuel_testnet"})(dS||(ze.FuelChainId=dS={}));var fS;(function(r){r.INJECTIVE_MAINNET="injective_mainnet",r.INJECTIVE_TESTNET="injective_testnet"})(fS||(ze.CosmosChainId=fS={}));var hS;(function(r){r.STARKNET_MAINNET="starknet_mainnet",r.STARKNET_SEPOLIA="starknet_sepolia"})(hS||(ze.StarknetChainId=hS={}));var pS;(function(r){r.BTC_MAINNET="btc_mainnet",r.BTC_TESTNET="btc_testnet"})(pS||(ze.BTCChainId=pS={}));ze.ChainId={...aS,...cS,...lS,...uS,...dS,...fS,...hS,...pS};function Jhe(r){let e=String(r).toLowerCase();return e.startsWith("sol")?zo.SOLANA:e.startsWith("sui")?zo.SUI:e.startsWith("apt")?zo.APTOS:e.startsWith("btc")?zo.BTC:zo.ETH}ze.getChainType=Jhe});var mS=m(he=>{"use strict";Object.defineProperty(he,"__esModule",{value:!0});he.getChainLogo=he.getSuiscanUrl=he.getChainBlockscoutUrl=he.getChainExternalUrl=he.SolanaChainInfo=he.AptosChainInfo=he.BTCChainInfo=he.EthChainInfo=he.EthVariation=he.ExplorerApiType=void 0;var x=Ty(),re;(function(r){r.ETHERSCAN="etherscan",r.BLOCKSCOUT="blockscout",r.L2_SCAN="l2scan",r.OK_LINK="oklink",r.UNKNOWN="unknown"})(re||(he.ExplorerApiType=re={}));var Z;(function(r){r[r.DEFAULT=0]="DEFAULT",r[r.ARBITRUM=1]="ARBITRUM",r[r.OPTIMISM=2]="OPTIMISM",r[r.ZKSYNC=3]="ZKSYNC",r[r.POLYGON_ZKEVM=4]="POLYGON_ZKEVM",r[r.SUBSTRATE=5]="SUBSTRATE"})(Z||(he.EthVariation=Z={}));he.EthChainInfo={[x.EthChainId.ETHEREUM]:{name:"Ethereum",slug:"mainnet",chainId:x.EthChainId.ETHEREUM,variation:Z.DEFAULT,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",tokenSymbol:"ETH",tokenDecimals:18,explorerApiType:re.ETHERSCAN,explorerUrl:"https://etherscan.io",explorerApi:"https://api.etherscan.io",blockscoutUrl:"https://eth.blockscout.com",lightIcon:"https://sentio.xyz/chains/eth.svg",darkIcon:"https://sentio.xyz/chains/eth-dark.svg"},[x.EthChainId.SEPOLIA]:{name:"Sepolia",slug:"sepolia",chainId:x.EthChainId.SEPOLIA,mainnetChainId:x.EthChainId.ETHEREUM,variation:Z.DEFAULT,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x1ef5f52bdbe11af2377c58ecc914a8c72ea807cf",tokenSymbol:"ETH",tokenDecimals:18,explorerApiType:re.ETHERSCAN,explorerUrl:"https://sepolia.etherscan.io",explorerApi:"https://api-sepolia.etherscan.io",blockscoutUrl:"https://eth-sepolia.blockscout.com",lightIcon:"https://sentio.xyz/chains/eth.svg",darkIcon:"https://sentio.xyz/chains/eth-dark.svg"},[x.EthChainId.HOLESKY]:{name:"Holesky",slug:"holesky",chainId:x.EthChainId.HOLESKY,mainnetChainId:x.EthChainId.ETHEREUM,variation:Z.DEFAULT,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x94373a4919B3240D86eA41593D5eBa789FEF3848",tokenSymbol:"ETH",tokenDecimals:18,explorerApiType:re.ETHERSCAN,explorerUrl:"https://holesky.etherscan.io",explorerApi:"https://api-holesky.etherscan.io",blockscoutUrl:"https://eth-holesky.blockscout.com",lightIcon:"https://sentio.xyz/chains/eth.svg",darkIcon:"https://sentio.xyz/chains/eth-dark.svg"},[x.EthChainId.BSC]:{name:"Binance Smart Chain",slug:"bsc",chainId:x.EthChainId.BSC,variation:Z.DEFAULT,priceTokenAddress:"0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c",tokenSymbol:"BNB",tokenDecimals:18,explorerApiType:re.ETHERSCAN,explorerUrl:"https://bscscan.com",explorerApi:"https://api.bscscan.com",lightIcon:"https://sentio.xyz/chains/bnb-chain.svg"},[x.EthChainId.BSC_TESTNET]:{name:"Binance Smart Chain Testnet",slug:"bsc-testnet",chainId:x.EthChainId.BSC_TESTNET,mainnetChainId:x.EthChainId.BSC,variation:Z.DEFAULT,priceTokenAddress:"0xae13d989dac2f0debff460ac112a837c89baa7cd",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0xae13d989dac2f0debff460ac112a837c89baa7cd",tokenSymbol:"tBNB",tokenDecimals:18,explorerApiType:re.ETHERSCAN,explorerUrl:"https://testnet.bscscan.com",explorerApi:"https://api-testnet.bscscan.com",lightIcon:"https://sentio.xyz/chains/bnb-chain.svg"},[x.EthChainId.OP_BNB_MAINNET]:{name:"opBNB Mainnet",slug:"opbnb",chainId:x.EthChainId.OP_BNB_MAINNET,variation:Z.OPTIMISM,priceTokenAddress:"0x4200000000000000000000000000000000000006",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x4200000000000000000000000000000000000006",tokenSymbol:"BNB",tokenDecimals:18,explorerUrl:"https://opbnb.bscscan.com",explorerApiType:re.ETHERSCAN,explorerApi:"https://api-opbnb.bscscan.com",lightIcon:"https://sentio.xyz/chains/bnb-chain.svg"},[x.EthChainId.POLYGON]:{name:"Polygon",slug:"matic",chainId:x.EthChainId.POLYGON,variation:Z.DEFAULT,priceTokenAddress:"0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270",tokenSymbol:"MATIC",tokenDecimals:18,explorerApiType:re.ETHERSCAN,explorerUrl:"https://polygonscan.com",explorerApi:"https://api.polygonscan.com",lightIcon:"https://sentio.xyz/chains/polygon.svg"},[x.EthChainId.ARBITRUM]:{name:"Arbitrum",slug:"arbitrum-one",chainId:x.EthChainId.ARBITRUM,variation:Z.ARBITRUM,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x82aF49447D8a07e3bd95BD0d56f35241523fBab1",tokenSymbol:"ETH",tokenDecimals:18,explorerApiType:re.ETHERSCAN,explorerUrl:"https://arbiscan.io",explorerApi:"https://api.arbiscan.io",lightIcon:"https://sentio.xyz/chains/arbitrum.svg"},[x.EthChainId.AVALANCHE]:{name:"Avalanche",slug:"avalanche",chainId:x.EthChainId.AVALANCHE,variation:Z.DEFAULT,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7",tokenSymbol:"ETH",tokenDecimals:18,explorerApiType:re.ETHERSCAN,explorerUrl:"https://snowtrace.io",explorerApi:"https://api.routescan.io/v2/network/mainnet/evm/43114/etherscan",lightIcon:"https://sentio.xyz/chains/avalanche.svg"},[x.EthChainId.POLYGON_ZKEVM]:{name:"Polygon zkEVM",chainId:x.EthChainId.POLYGON_ZKEVM,slug:"polygon-zkevm",variation:Z.POLYGON_ZKEVM,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x4F9A0e7FD2Bf6067db6994CF12E4495Df938E6e9",tokenSymbol:"ETH",tokenDecimals:18,explorerApiType:re.ETHERSCAN,explorerUrl:"https://zkevm.polygonscan.com",explorerApi:"https://api-zkevm.polygonscan.com",lightIcon:"https://sentio.xyz/chains/polygon.svg"},[x.EthChainId.MOONBEAM]:{name:"Moonbeam",slug:"moonbeam",chainId:x.EthChainId.MOONBEAM,variation:Z.SUBSTRATE,priceTokenAddress:"0xacc15dc74880c9944775448304b263d191c6077f",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0xacc15dc74880c9944775448304b263d191c6077f",tokenSymbol:"GLMR",tokenDecimals:18,explorerApiType:re.ETHERSCAN,explorerUrl:"https://moonscan.io",explorerApi:"https://api-moonbeam.moonscan.io",lightIcon:"https://sentio.xyz/chains/moonbeam.svg"},[x.EthChainId.ASTAR]:{name:"Astar",slug:"astar",chainId:x.EthChainId.ASTAR,variation:Z.SUBSTRATE,priceTokenAddress:"0xaeaaf0e2c81af264101b9129c00f4440ccf0f720",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0xaeaaf0e2c81af264101b9129c00f4440ccf0f720",tokenSymbol:"ASTR",tokenDecimals:18,explorerApiType:re.BLOCKSCOUT,explorerUrl:"https://astar.blockscout.com",explorerApi:"https://astar.blockscout.com",lightIcon:"https://sentio.xyz/chains/astar.svg"},[x.EthChainId.LINEA]:{name:"Linea",slug:"linea",chainId:x.EthChainId.LINEA,variation:Z.DEFAULT,priceTokenAddress:"0xe5d7c2a44ffddf6b295a15c148167daaaf5cf34f",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0xe5D7C2a44FfDDf6b295A15c148167daaAf5Cf34f",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://lineascan.build",explorerApiType:re.ETHERSCAN,explorerApi:"https://api.lineascan.build",lightIcon:"https://sentio.xyz/chains/linea.svg",darkIcon:"https://sentio.xyz/chains/linea-dark.svg"},[x.EthChainId.SCROLL]:{name:"Scroll",slug:"scroll",chainId:x.EthChainId.SCROLL,variation:Z.DEFAULT,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x5300000000000000000000000000000000000004",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://scrollscan.com",explorerApiType:re.ETHERSCAN,explorerApi:"https://api.scrollscan.com",lightIcon:"https://sentio.xyz/chains/scroll.svg"},[x.EthChainId.TAIKO]:{name:"Taiko Mainnet",slug:"taiko",chainId:x.EthChainId.TAIKO,variation:Z.DEFAULT,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0xA51894664A773981C6C112C43ce576f315d5b1B6",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://taikoscan.io",explorerApiType:re.ETHERSCAN,explorerApi:"https://api.taikoscan.io",lightIcon:"https://sentio.xyz/chains/taiko.svg"},[x.EthChainId.TAIKO_TESTNET]:{name:"Taiko Testnet",slug:"taiko-hekla-testnet",chainId:x.EthChainId.TAIKO_TESTNET,mainnetChainId:x.EthChainId.TAIKO,variation:Z.DEFAULT,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0xae2C46ddb314B9Ba743C6dEE4878F151881333D9",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://hekla.taikoscan.io",explorerApiType:re.ETHERSCAN,explorerApi:"https://api-hekla.taikoscan.io",lightIcon:"https://sentio.xyz/chains/taiko.svg"},[x.EthChainId.XLAYER_TESTNET]:{name:"X Layer Testnet",slug:"xlayer-sepolia",chainId:x.EthChainId.XLAYER_TESTNET,mainnetChainId:x.EthChainId.XLAYER_MAINNET,variation:Z.POLYGON_ZKEVM,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0xa749ad81913cdc19881ebeb64631df72be708335",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://www.oklink.com/xlayer-test",explorerApiType:re.OK_LINK,explorerApi:"https://www.oklink.com/api/v5/explorer",lightIcon:"https://sentio.xyz/chains/x1-logo.png"},[x.EthChainId.XLAYER_MAINNET]:{name:"X Layer Mainnet",slug:"xlayer-mainnet",chainId:x.EthChainId.XLAYER_MAINNET,variation:Z.POLYGON_ZKEVM,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x5a77f1443d16ee5761d310e38b62f77f726bc71c",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://www.oklink.com/xlayer",explorerApiType:re.OK_LINK,explorerApi:"https://www.oklink.com/api/v5/explorer",lightIcon:"https://sentio.xyz/chains/x1-logo.png"},[x.EthChainId.BLAST]:{name:"Blast Mainnet",slug:"blast-mainnet",chainId:x.EthChainId.BLAST,variation:Z.OPTIMISM,priceTokenAddress:"0x4300000000000000000000000000000000000004",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x4300000000000000000000000000000000000004",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://blastscan.io",explorerApiType:re.ETHERSCAN,explorerApi:"https://api.blastscan.io",lightIcon:"https://sentio.xyz/chains/blast-logo.png"},[x.EthChainId.BLAST_SEPOLIA]:{name:"Blast Testnet",slug:"blast-testnet",chainId:x.EthChainId.BLAST_SEPOLIA,mainnetChainId:x.EthChainId.BLAST,variation:Z.OPTIMISM,priceTokenAddress:"0x4200000000000000000000000000000000000023",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x4200000000000000000000000000000000000023",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://sepolia.blastscan.io",explorerApiType:re.ETHERSCAN,explorerApi:"https://api-sepolia.blastscan.io",lightIcon:"https://sentio.xyz/chains/blast-logo.png"},[x.EthChainId.BASE]:{name:"Base",slug:"base",chainId:x.EthChainId.BASE,variation:Z.OPTIMISM,priceTokenAddress:"0x4200000000000000000000000000000000000006",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x4200000000000000000000000000000000000006",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://basescan.org",explorerApiType:re.ETHERSCAN,explorerApi:"https://api.basescan.org",lightIcon:"https://sentio.xyz/chains/base.svg",darkIcon:"https://sentio.xyz/chains/base_blue.svg"},[x.EthChainId.ZKSYNC_ERA]:{name:"zkSync Era",slug:"zksync-era",chainId:x.EthChainId.ZKSYNC_ERA,variation:Z.ZKSYNC,priceTokenAddress:"0x000000000000000000000000000000000000800A",tokenAddress:"0x000000000000000000000000000000000000800A",wrappedTokenAddress:"0x000000000000000000000000000000000000800A",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://explorer.zksync.io",explorerApiType:re.ETHERSCAN,explorerApi:"https://block-explorer-api.mainnet.zksync.io",lightIcon:"https://sentio.xyz/chains/zksync.svg"},[x.EthChainId.ZIRCUIT_TESTNET]:{name:"Zircuit Testnet",slug:"zircuit-testnet",chainId:x.EthChainId.ZIRCUIT_TESTNET,mainnetChainId:x.EthChainId.ZIRCUIT_MAINNET,variation:Z.OPTIMISM,priceTokenAddress:"0x4200000000000000000000000000000000000006",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x4200000000000000000000000000000000000006",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://explorer.testnet.zircuit.com",lightIcon:"https://sentio.xyz/chains/zircuit-inverted-icon.svg",darkIcon:"https://sentio.xyz/chains/zircuit-green-icon.svg"},[x.EthChainId.ZIRCUIT_MAINNET]:{name:"Zircuit Mainnet",slug:"zircuit",chainId:x.EthChainId.ZIRCUIT_MAINNET,variation:Z.OPTIMISM,priceTokenAddress:"0x4200000000000000000000000000000000000006",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x4200000000000000000000000000000000000006",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://explorer.zircuit.com",lightIcon:"https://sentio.xyz/chains/zircuit-inverted-icon.svg",darkIcon:"https://sentio.xyz/chains/zircuit-green-icon.svg"},[x.EthChainId.FANTOM]:{name:"Fantom Opera",slug:"fantom",chainId:x.EthChainId.FANTOM,variation:Z.DEFAULT,priceTokenAddress:"0x21be370d5312f44cb42ce377bc9b8a0cef1a4c83",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x21be370d5312f44cb42ce377bc9b8a0cef1a4c83",tokenSymbol:"WFTM",tokenDecimals:18,explorerUrl:"https://ftmscan.com",explorerApiType:re.ETHERSCAN,explorerApi:"https://api.ftmscan.com",lightIcon:"https://sentio.xyz/chains/fantom.svg"},[x.EthChainId.OPTIMISM]:{name:"Optimism Mainnet",slug:"optimism",chainId:x.EthChainId.OPTIMISM,variation:Z.OPTIMISM,priceTokenAddress:"0x4200000000000000000000000000000000000006",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x4200000000000000000000000000000000000006",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://optimistic.etherscan.io",explorerApiType:re.ETHERSCAN,explorerApi:"https://api-optimistic.etherscan.io",lightIcon:"https://sentio.xyz/chains/optimism.svg"},[x.EthChainId.CRONOS]:{name:"Cronos Mainnet",slug:"cronos",chainId:x.EthChainId.CRONOS,variation:Z.DEFAULT,priceTokenAddress:"0x5c7f8a570d578ed84e63fdfa7b1ee72deae1ae23",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x5c7f8a570d578ed84e63fdfa7b1ee72deae1ae23",tokenSymbol:"CRO",tokenDecimals:18,explorerUrl:"https://cronoscan.com",explorerApiType:re.ETHERSCAN,explorerApi:"https://api.cronoscan.com",lightIcon:"https://sentio.xyz/chains/cronos.svg",darkIcon:"https://sentio.xyz/chains/cronos_light.svg"},[x.EthChainId.CRONOS_TESTNET]:{name:"Cronos Testnet",slug:"cronos-testnet",chainId:x.EthChainId.CRONOS_TESTNET,mainnetChainId:x.EthChainId.CRONOS,variation:Z.DEFAULT,priceTokenAddress:"0x6a3173618859c7cd40faf6921b5e9eb6a76f1fd4",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x6a3173618859c7cd40faf6921b5e9eb6a76f1fd4",tokenSymbol:"CRO",tokenDecimals:18,explorerUrl:"https://explorer.cronos.org/testnet",lightIcon:"https://sentio.xyz/chains/cronos.svg",darkIcon:"https://sentio.xyz/chains/cronos_light.svg"},[x.EthChainId.BITLAYER]:{name:"Bitlayer Mainnet",slug:"bitlayer",chainId:x.EthChainId.BITLAYER,variation:Z.DEFAULT,priceTokenAddress:"0xff204e2681a6fa0e2c3fade68a1b28fb90e4fc5f",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0xff204e2681a6fa0e2c3fade68a1b28fb90e4fc5f",tokenSymbol:"BTC",tokenDecimals:18,explorerUrl:"https://www.btrscan.com",explorerApiType:re.ETHERSCAN,explorerApi:"https://api.btrscan.com/scan",lightIcon:"https://sentio.xyz/chains/bitlayer.svg"},[x.EthChainId.MANTA_PACIFIC]:{name:"Manta Pacific",slug:"manta-pacific-mainnet",chainId:x.EthChainId.MANTA_PACIFIC,variation:Z.OPTIMISM,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x0Dc808adcE2099A9F62AA87D9670745AbA741746",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://pacific-explorer.manta.network",explorerApiType:re.BLOCKSCOUT,explorerApi:"https://pacific-explorer.manta.network",lightIcon:"https://sentio.xyz/chains/manta.png"},[x.EthChainId.MANTLE]:{name:"Mantle",slug:"mantle",chainId:x.EthChainId.MANTLE,variation:Z.OPTIMISM,priceTokenAddress:"0x78c1b0c915c4faa5fffa6cabf0219da63d7f4cb8",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x78c1b0c915c4faa5fffa6cabf0219da63d7f4cb8",tokenSymbol:"MNT",tokenDecimals:18,explorerUrl:"https://mantlescan.xyz",explorerApiType:re.ETHERSCAN,explorerApi:"https://api.mantlescan.xyz",lightIcon:"https://sentio.xyz/chains/mantle.svg",darkIcon:"https://sentio.xyz/chains/mantle-white.svg"},[x.EthChainId.B2_MAINNET]:{name:"B2 Mainnet",slug:"b2-mainnet",chainId:x.EthChainId.B2_MAINNET,variation:Z.OPTIMISM,priceTokenAddress:"0x4200000000000000000000000000000000000006",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x4200000000000000000000000000000000000006",tokenSymbol:"BTC",tokenDecimals:18,explorerUrl:"https://explorer.bsquared.network",explorerApiType:re.L2_SCAN,explorerApi:"https://explorer.bsquared.network/api",lightIcon:"https://sentio.xyz/chains/b2.svg"},[x.EthChainId.MODE]:{name:"Mode Mainnet",slug:"mode-mainnet",chainId:x.EthChainId.MODE,variation:Z.OPTIMISM,priceTokenAddress:"0x4200000000000000000000000000000000000006",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x4200000000000000000000000000000000000006",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://modescan.io",explorerApiType:re.ETHERSCAN,explorerApi:"https://api.routescan.io/v2/network/mainnet/evm/34443/etherscan"},[x.EthChainId.BOB]:{name:"Bob Mainnet",slug:"bob",chainId:x.EthChainId.BOB,variation:Z.OPTIMISM,priceTokenAddress:"0x4200000000000000000000000000000000000006",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x4200000000000000000000000000000000000006",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://explorer.gobob.xyz",explorerApiType:re.BLOCKSCOUT,explorerApi:"https://explorer.gobob.xyz",lightIcon:"https://sentio.xyz/chains/bob.svg"},[x.EthChainId.FRAXTAL]:{name:"Fraxtal Mainnet",slug:"frax-mainnet",chainId:x.EthChainId.FRAXTAL,variation:Z.OPTIMISM,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0xFC00000000000000000000000000000000000006",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://fraxscan.com",explorerApiType:re.ETHERSCAN,explorerApi:"https://api.fraxscan.com",lightIcon:"https://sentio.xyz/chains/fraxtal.svg"},[x.EthChainId.KUCOIN]:{name:"KCC Mainnet",slug:"kucoin",chainId:x.EthChainId.KUCOIN,variation:Z.DEFAULT,priceTokenAddress:"0x4446Fc4eb47f2f6586f9fAAb68B3498F86C07521",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x4446Fc4eb47f2f6586f9fAAb68B3498F86C07521",tokenSymbol:"KCS",tokenDecimals:18,explorerUrl:"https://scan.kcc.io",explorerApiType:re.ETHERSCAN,explorerApi:"https://scan.kcc.io",lightIcon:"https://sentio.xyz/chains/kcc.svg"},[x.EthChainId.CONFLUX]:{name:"Conflux eSpace",slug:"conflux-espace",chainId:x.EthChainId.CONFLUX,variation:Z.DEFAULT,priceTokenAddress:"0x14b2d3bc65e74dae1030eafd8ac30c533c976a9b",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x14b2d3bc65e74dae1030eafd8ac30c533c976a9b",tokenSymbol:"CFX",tokenDecimals:18,explorerUrl:"https://evm.confluxscan.io",explorerApiType:re.ETHERSCAN,explorerApi:"https://evmapi.confluxscan.io",lightIcon:"https://sentio.xyz/chains/conflux.svg",darkIcon:"https://sentio.xyz/chains/conflux-white.svg"},[x.EthChainId.METIS]:{name:"Metis",slug:"metis",chainId:x.EthChainId.METIS,variation:Z.DEFAULT,priceTokenAddress:"0x75cb093E4D61d2A2e65D8e0BBb01DE8d89b53481",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x75cb093E4D61d2A2e65D8e0BBb01DE8d89b53481",tokenSymbol:"METIS",tokenDecimals:18,explorerUrl:"https://explorer.metis.io",explorerApiType:re.ETHERSCAN,explorerApi:"https://api.routescan.io/v2/network/mainnet/evm/1088/etherscan/",lightIcon:"https://sentio.xyz/chains/metis.svg"},[x.EthChainId.BEVM]:{name:"BEVM",slug:"bevm",chainId:x.EthChainId.BEVM,variation:Z.SUBSTRATE,priceTokenAddress:"0xB5136FEba197f5fF4B765E5b50c74db717796dcD",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0xB5136FEba197f5fF4B765E5b50c74db717796dcD",tokenSymbol:"BTC",tokenDecimals:18,explorerUrl:"https://scan.bevm.io",explorerApiType:re.BLOCKSCOUT,explorerApi:"https://scan.bevm.io",lightIcon:"https://sentio.xyz/chains/bevm.svg"},[x.EthChainId.MERLIN_MAINNET]:{name:"Merlin Mainnet",slug:"merlin",chainId:x.EthChainId.MERLIN_MAINNET,variation:Z.POLYGON_ZKEVM,priceTokenAddress:"0xF6D226f9Dc15d9bB51182815b320D3fBE324e1bA",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0xF6D226f9Dc15d9bB51182815b320D3fBE324e1bA",tokenSymbol:"BTC",tokenDecimals:18,explorerUrl:"https://scan.merlinchain.io",explorerApiType:re.L2_SCAN,explorerApi:"https://scan.merlinchain.io/api",lightIcon:"https://sentio.xyz/chains/merlin.png"},[x.EthChainId.CHILIZ]:{name:"Chiliz",slug:"chiliz",chainId:x.EthChainId.CHILIZ,variation:Z.DEFAULT,priceTokenAddress:"0x721EF6871f1c4Efe730Dce047D40D1743B886946",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x721EF6871f1c4Efe730Dce047D40D1743B886946",tokenSymbol:"CHZ",tokenDecimals:18,explorerUrl:"https://chiliscan.com",explorerApiType:re.ETHERSCAN,explorerApi:"https://api.routescan.io/v2/network/mainnet/evm/88888/etherscan",lightIcon:"https://sentio.xyz/chains/chiliz.svg"},[x.EthChainId.ZKLINK_NOVA]:{name:"zkLink Nova",slug:"zklink-nova",chainId:x.EthChainId.ZKLINK_NOVA,variation:Z.ZKSYNC,priceTokenAddress:"0x000000000000000000000000000000000000800A",tokenAddress:"0x000000000000000000000000000000000000800A",wrappedTokenAddress:"0x000000000000000000000000000000000000800A",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://explorer.zklink.io",explorerApiType:re.ETHERSCAN,explorerApi:"https://explorer-api.zklink.io",lightIcon:"https://sentio.xyz/chains/zklink.svg"},[x.EthChainId.AURORA]:{name:"Aurora",slug:"aurora",chainId:x.EthChainId.AURORA,variation:Z.DEFAULT,priceTokenAddress:"0xC9BdeEd33CD01541e1eeD10f90519d2C06Fe3feB",tokenAddress:"0x000000000000000000000000000000000000800A",wrappedTokenAddress:"0xC9BdeEd33CD01541e1eeD10f90519d2C06Fe3feB",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://explorer.aurora.dev",explorerApiType:re.BLOCKSCOUT,explorerApi:"https://explorer.aurora.dev",lightIcon:"https://sentio.xyz/chains/aurora.svg"},[x.EthChainId.SONIC_MAINNET]:{name:"Sonic Mainnet",slug:"sonic-mainnet",chainId:x.EthChainId.SONIC_MAINNET,variation:Z.DEFAULT,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x000000000000000000000000000000000000800A",tokenSymbol:"S",tokenDecimals:18,explorerUrl:"https://sonicscan.org",explorerApiType:re.ETHERSCAN,explorerApi:"https://api.sonicscan.org/api",lightIcon:"https://sentio.xyz/chains/sonic.svg",darkIcon:"https://sentio.xyz/chains/sonic-dark.svg"},[x.EthChainId.SONIC_TESTNET]:{name:"Sonic Testnet",slug:"sonic-testnet",chainId:x.EthChainId.SONIC_TESTNET,mainnetChainId:x.EthChainId.SONIC_MAINNET,variation:Z.DEFAULT,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x000000000000000000000000000000000000800A",tokenSymbol:"S",tokenDecimals:18,explorerUrl:"https://testnet.sonicscan.org",explorerApiType:re.ETHERSCAN,explorerApi:"https://api-testnet.sonicscan.org",lightIcon:"https://sentio.xyz/chains/sonic.svg",darkIcon:"https://sentio.xyz/chains/sonic-dark.svg"},[x.EthChainId.SONEIUM_MAINNET]:{name:"Soneium Mainnet",slug:"soneium-mainnet",chainId:x.EthChainId.SONEIUM_MAINNET,variation:Z.OPTIMISM,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x4200000000000000000000000000000000000006",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://soneium.blockscout.com",explorerApiType:re.BLOCKSCOUT,explorerApi:"https://soneium.blockscout.com",lightIcon:"https://sentio.xyz/chains/soneium.svg"},[x.EthChainId.SONEIUM_TESTNET]:{name:"Soneium Testnet",slug:"soneium-minato",chainId:x.EthChainId.SONEIUM_TESTNET,mainnetChainId:x.EthChainId.SONEIUM_MAINNET,variation:Z.OPTIMISM,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x728F2745410A56620B50a6E0592743450e08Cac6",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://soneium-minato.blockscout.com",explorerApiType:re.BLOCKSCOUT,explorerApi:"https://soneium-minato.blockscout.com",lightIcon:"https://sentio.xyz/chains/soneium.svg"},[x.EthChainId.CRONOS_ZKEVM]:{name:"Cronos zkEVM",slug:"cronos-zkevm",chainId:x.EthChainId.CRONOS_ZKEVM,variation:Z.ZKSYNC,priceTokenAddress:"0x000000000000000000000000000000000000800a",tokenAddress:"0x000000000000000000000000000000000000800a",wrappedTokenAddress:"0xc1bf55ee54e16229d9b369a5502bfe5fc9f20b6d",tokenSymbol:"zkCRO",tokenDecimals:18,explorerUrl:"https://explorer.zkevm.cronos.org",explorerApiType:re.ETHERSCAN,explorerApi:"https://explorer.zkevm.cronos.org",lightIcon:"https://sentio.xyz/chains/cronos.svg",darkIcon:"https://sentio.xyz/chains/cronos_light.svg"},[x.EthChainId.DERIVE]:{name:"Derive Mainnet",slug:"derive-mainnet",chainId:x.EthChainId.DERIVE,variation:Z.OPTIMISM,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x15CEcd5190A43C7798dD2058308781D0662e678E",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://explorer.lyra.finance",explorerApiType:re.BLOCKSCOUT,explorerApi:"https://explorer.lyra.finance",lightIcon:"https://sentio.xyz/chains/derive.svg"},[x.EthChainId.UNICHAIN_SEPOLIA]:{name:"Unichain Sepolia",slug:"unichain-sepolia",chainId:x.EthChainId.UNICHAIN_SEPOLIA,mainnetChainId:x.EthChainId.UNICHAIN,variation:Z.OPTIMISM,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x4200000000000000000000000000000000000006",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://unichain-sepolia.blockscout.com",explorerApiType:re.BLOCKSCOUT,explorerApi:"https://unichain-sepolia.blockscout.com",lightIcon:"https://sentio.xyz/chains/unichain-testnet.svg"},[x.EthChainId.UNICHAIN]:{name:"Unichain",slug:"unichain-mainnet",chainId:x.EthChainId.UNICHAIN,variation:Z.OPTIMISM,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x4200000000000000000000000000000000000006",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://unichain.blockscout.com",explorerApiType:re.BLOCKSCOUT,explorerApi:"https://unichain.blockscout.com",lightIcon:"https://sentio.xyz/chains/unichain.svg"},[x.EthChainId.CORN_MAIZENET]:{name:"Corn Maizenet",slug:"corn-maizenet",chainId:x.EthChainId.CORN_MAIZENET,variation:Z.OPTIMISM,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x0000000000000000000000000000000000000000",tokenSymbol:"BTCN",tokenDecimals:18,explorerUrl:"https://maizenet-explorer.usecorn.com",explorerApiType:re.BLOCKSCOUT,explorerApi:"https://maizenet-explorer.usecorn.com",lightIcon:"https://sentio.xyz/chains/corn.svg"},[x.EthChainId.KARAK]:{name:"Karak Mainnet",slug:"karak-mainnet",chainId:x.EthChainId.KARAK,variation:Z.DEFAULT,priceTokenAddress:"0x4200000000000000000000000000000000000006",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x4200000000000000000000000000000000000006",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://explorer.karak.network",explorerApiType:re.BLOCKSCOUT,explorerApi:"https://explorer.karak.network",lightIcon:"https://sentio.xyz/chains/karak.svg"},[x.EthChainId.SEI]:{name:"Sei Mainnet",slug:"sei",chainId:x.EthChainId.SEI,variation:Z.DEFAULT,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x0000000000000000000000000000000000000000",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://seistream.app",lightIcon:"https://sentio.xyz/chains/sei.svg"},[x.EthChainId.SWELL_MAINNET]:{name:"Swell Mainnet",slug:"swell-mainnet",chainId:x.EthChainId.SWELL_MAINNET,variation:Z.OPTIMISM,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x0000000000000000000000000000000000000000",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://explorer.swellnetwork.io",explorerApiType:re.BLOCKSCOUT,explorerApi:"https://explorer.swellnetwork.io",lightIcon:"https://sentio.xyz/chains/swell.svg"},[x.EthChainId.SWELL_TESTNET]:{name:"Swell Testnet",slug:"swell-testnet",chainId:x.EthChainId.SWELL_TESTNET,mainnetChainId:x.EthChainId.SWELL_MAINNET,variation:Z.OPTIMISM,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x0000000000000000000000000000000000000000",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://swell-testnet-explorer.alt.technology",explorerApiType:re.BLOCKSCOUT,explorerApi:"https://swell-testnet-explorer.alt.technology",lightIcon:"https://sentio.xyz/chains/swell.svg"},[x.EthChainId.TAC_TESTNET]:{name:"TAC Testnet",slug:"tac-testnet",chainId:x.EthChainId.TAC_TESTNET,variation:Z.DEFAULT,priceTokenAddress:"0x392D1cCB04d25fCBcA7D4fc0E429Dbc1F9fEe73F",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x392D1cCB04d25fCBcA7D4fc0E429Dbc1F9fEe73F",tokenSymbol:"TAC",tokenDecimals:18,explorerUrl:"https://turin.explorer.tac.build",explorerApiType:re.BLOCKSCOUT,explorerApi:"https://turin.explorer.tac.build",lightIcon:"https://sentio.xyz/chains/tac.svg"},[x.EthChainId.MONAD_TESTNET]:{name:"Monad Testnet",slug:"monad-testnet",chainId:x.EthChainId.MONAD_TESTNET,variation:Z.DEFAULT,priceTokenAddress:"0x760AfE86e5de5fa0Ee542fc7B7B713e1c5425701",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x760AfE86e5de5fa0Ee542fc7B7B713e1c5425701",tokenSymbol:"MON",tokenDecimals:18,explorerUrl:"https://testnet.monadexplorer.com",explorerApiType:re.UNKNOWN},[x.EthChainId.BERACHAIN]:{name:"Berachain",slug:"berachain",chainId:x.EthChainId.BERACHAIN,variation:Z.DEFAULT,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x0000000000000000000000000000000000000000",tokenSymbol:"BERA",tokenDecimals:18,explorerUrl:"https://berascan.com",explorerApi:"https://api.berascan.com",explorerApiType:re.ETHERSCAN,lightIcon:"https://sentio.xyz/chains/berachain.svg"},[x.EthChainId.HYPER_EVM]:{name:"HyperEVM",slug:"hyper-evm",chainId:x.EthChainId.HYPER_EVM,variation:Z.DEFAULT,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x0000000000000000000000000000000000000000",tokenSymbol:"HYPE",tokenDecimals:18,explorerUrl:"https://liquidscan.xyz/mainnet",lightIcon:"https://sentio.xyz/chains/hype.svg",darkIcon:"https://sentio.xyz/chains/hype-dark.svg"},[x.EthChainId.ETHERLINK]:{name:"Etherlink",slug:"etherlink",chainId:x.EthChainId.ETHERLINK,variation:Z.DEFAULT,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0xc9B53AB2679f573e480d01e0f49e2B5CFB7a3EAb",tokenSymbol:"XTZ",tokenDecimals:18,explorerUrl:"https://explorer.etherlink.com",explorerApiType:re.BLOCKSCOUT,explorerApi:"https://explorer.etherlink.com",lightIcon:"https://sentio.xyz/chains/etherlink.svg"},[x.EthChainId.MEV_COMMIT]:{name:"MEV Commit",slug:"mev-commit",chainId:x.EthChainId.MEV_COMMIT,variation:Z.DEFAULT,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x0000000000000000000000000000000000000000",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://www.mev-commit.xyz/",lightIcon:"https://sentio.xyz/chains/mev-commit-dark.svg",darkIcon:"https://sentio.xyz/chains/mev-commit.svg"},[x.EthChainId.HEMI]:{name:"Hemi",slug:"hemi",chainId:x.EthChainId.HEMI,variation:Z.DEFAULT,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x0000000000000000000000000000000000000000",tokenSymbol:"ETH",tokenDecimals:18,explorerApiType:re.BLOCKSCOUT,explorerUrl:"https://explorer.hemi.xyz",explorerApi:"https://explorer.hemi.xyz",lightIcon:"https://sentio.xyz/chains/eth.svg",darkIcon:"https://sentio.xyz/chains/eth-dark.svg"}};function $he(r,e,t){let n=t,i=he.EthChainInfo[r];if(i)return i.explorerApiType===re.L2_SCAN&&t==="block"&&(n="blocks"),`${i.explorerUrl}/${n}/${e}`}he.BTCChainInfo={[x.BTCChainId.BTC_MAINNET]:{name:"Bitcoin Mainnet",chainId:x.BTCChainId.BTC_MAINNET,explorerUrl:"https://mempool.space",lightIcon:"https://sentio.xyz/chains/bitcoin.svg"},[x.BTCChainId.BTC_TESTNET]:{name:"Bitcoin Mainnet",chainId:x.BTCChainId.BTC_TESTNET,explorerUrl:"https://mempool.space/testnet4",lightIcon:"https://sentio.xyz/chains/bitcoin-testnet.svg"}};var Yhe={block:"block",address:"address",tx:"tx",token:void 0};function Zhe(r,e,t){let n=he.BTCChainInfo[r]?.explorerUrl,i=Yhe[t];if(!(!n||!i))return`${n}/${i}/${e}`}he.AptosChainInfo={[x.AptosChainId.APTOS_MAINNET]:{name:"Aptos Mainnet",chainId:x.AptosChainId.APTOS_MAINNET,explorerUrl:"https://explorer.aptoslabs.com",suffix:"?network=mainnet",lightIcon:"https://sentio.xyz/chains/aptos.svg",darkIcon:"https://sentio.xyz/chains/aptos-dark.svg"},[x.AptosChainId.APTOS_TESTNET]:{name:"Aptos Testnet",chainId:x.AptosChainId.APTOS_TESTNET,explorerUrl:"https://explorer.aptoslabs.com",suffix:"?network=testnet",lightIcon:"https://sentio.xyz/chains/aptos.svg",darkIcon:"https://sentio.xyz/chains/aptos-dark.svg"},[x.AptosChainId.APTOS_MOVEMENT_MAINNET]:{name:"Movement Mainnet Aptos",chainId:x.AptosChainId.APTOS_MOVEMENT_MAINNET,explorerUrl:"https://explorer.movementnetwork.xyz",suffix:"?network=mainnet",lightIcon:"https://sentio.xyz/chains/movement.svg",darkIcon:"https://sentio.xyz/chains/movement-dark.svg"},[x.AptosChainId.APTOS_MOVEMENT_TESTNET]:{name:"Movement Testnet Aptos",chainId:x.AptosChainId.APTOS_MOVEMENT_TESTNET,explorerUrl:"https://explorer.movementnetwork.xyz",suffix:"?network=testnet",lightIcon:"https://sentio.xyz/chains/movement.svg",darkIcon:"https://sentio.xyz/chains/movement-dark.svg"}};var Xhe={block:"block",address:"account",tx:"txn",token:void 0};function epe(r,e,t){let{explorerUrl:n,suffix:i}=he.AptosChainInfo[r],s=Xhe[t];if(s)return`${n}/${s}/${e}${i}`}he.SolanaChainInfo={[x.SolanaChainId.SOLANA_MAINNET]:{name:"Solana Mainnet",chainId:x.SolanaChainId.SOLANA_MAINNET,explorerUrl:"https://solscan.io/",suffix:"",lightIcon:"https://sentio.xyz/solana.svg"},[x.SolanaChainId.SOLANA_TESTNET]:{name:"Solana Testnet",chainId:x.SolanaChainId.SOLANA_MAINNET,explorerUrl:"https://solscan.io/",suffix:"?cluster=testnet",lightIcon:"https://sentio.xyz/solana.svg"}};var tpe={block:"block",address:"address",tx:"tx",token:"token"};function rpe(r,e,t){let{explorerUrl:n,suffix:i}=he.SolanaChainInfo[r],s=tpe[t];if(s)return`${n}${s}/${e}${i}`}var vd={[x.SuiChainId.SUI_MAINNET]:{name:"Sui Mainnet",chainId:x.SuiChainId.SUI_MAINNET,suivisionUrl:"https://suivision.xyz",explorerUrl:"https://suiscan.xyz/mainnet",lightIcon:"https://sentio.xyz/chains/sui.svg",darkIcon:"https://sentio.xyz/chains/sui-dark.svg"},[x.SuiChainId.SUI_TESTNET]:{name:"Sui Testnet",chainId:x.SuiChainId.SUI_TESTNET,suivisionUrl:"https://testnet.suivision.xyz",explorerUrl:"https://suiscan.xyz/testnet",lightIcon:"https://sentio.xyz/chains/sui.svg",darkIcon:"https://sentio.xyz/chains/sui-dark.svg"}},npe={block:"checkpoint",address:"account",tx:"tx",token:"coin",object:"object"},ipe={block:"checkpoint",address:"account",tx:"txblock",token:"coin",object:"object"};function spe(r,e,t){let n=vd[r];if(!n||!n.explorerUrl)return;let i=npe[t];if(i)return`${n.explorerUrl}/${i}/${e}`}function ope(r,e,t){let n=vd[r];if(!n||!n.suivisionUrl)return;let i=ipe[t];if(i)return`${n.suivisionUrl}/${i}/${e}`}var Cy={[x.FuelChainId.FUEL_MAINNET]:{name:"Fuel Mainnet",chainId:x.FuelChainId.FUEL_MAINNET,explorerUrl:"https://app.fuel.network",lightIcon:"https://sentio.xyz/chains/fuel.svg"},[x.FuelChainId.FUEL_TESTNET]:{name:"Fuel Testnet",chainId:x.FuelChainId.FUEL_TESTNET,explorerUrl:"https://app-testnet.fuel.network",lightIcon:"https://sentio.xyz/chains/fuel.svg"}},ape={block:"block",address:"account",tx:"tx",token:void 0};function cpe(r,e,t){let{explorerUrl:n}=Cy[r],i=ape[t];if(i)return`${n}/${i}/${e}`}function lpe(r,e,t){if(!r||!e||!t)return;let n=r.toString();if(Object.keys(he.EthChainInfo).includes(n))return $he(n,e,t);if(Object.keys(he.BTCChainInfo).includes(n))return Zhe(n,e,t);if(Object.keys(he.AptosChainInfo).includes(n))return epe(n,e,t);if(Object.keys(he.SolanaChainInfo).includes(n))return rpe(n,e,t);if(Object.keys(vd).includes(n))return ope(n,e,t);if(Object.keys(Cy).includes(n))return cpe(n,e,t)}he.getChainExternalUrl=lpe;function upe(r,e,t){if(!r||!e||!t)return;let n=he.EthChainInfo[r];if(n&&n.blockscoutUrl)return`${n.blockscoutUrl}/${t}/${e}`}he.getChainBlockscoutUrl=upe;function dpe(r,e,t){if(!(!r||!e||!t))return spe(r,e,t)}he.getSuiscanUrl=dpe;function Ho(r,e){let t="https://sentio.xyz/chains/chain-unknown.webp";return r?e&&r?.darkIcon?r.darkIcon:r?.lightIcon?r.lightIcon:t:t}function fpe(r,e){if(!r)return;let t=r.toString();return Object.keys(he.EthChainInfo).includes(t)?Ho(he.EthChainInfo[t],e):Object.keys(he.BTCChainInfo).includes(t)?Ho(he.BTCChainInfo[t],e):Object.keys(he.AptosChainInfo).includes(t)?Ho(he.AptosChainInfo[t],e):Object.keys(he.SolanaChainInfo).includes(t)?Ho(he.SolanaChainInfo[t],e):Object.keys(vd).includes(t)?Ho(vd[t],e):Object.keys(Cy).includes(t)?Ho(Cy[t],e):Ho()}he.getChainLogo=fpe});var c6=m(Lr=>{"use strict";Object.defineProperty(Lr,"__esModule",{value:!0});Lr.getChainScanUrl=Lr.getChainName=Lr.CHAIN_MAP=void 0;var il=Ty(),hpe=mS();Lr.CHAIN_MAP={[il.ChainId.APTOS_MOVEMENT_MAINNET]:"Movement Mainnet",[il.ChainId.APTOS_MOVEMENT_TESTNET]:"Movement Testnet",[il.ChainId.BTC_MAINNET]:"Bitcoin Mainnet",[il.ChainId.BTC_TESTNET]:"Bitcoin Testnet",[il.ChainId.MEV_COMMIT]:"Mev-commit"};for(let[r,e]of Object.entries(il.ChainId)){if(Lr.CHAIN_MAP[e])continue;let t=hpe.EthChainInfo[e];if(t){Lr.CHAIN_MAP[e]=t.name;continue}let n=r.split("_");Lr.CHAIN_MAP[e]=n.map((i,s)=>i[0]+i.slice(1).toLowerCase()).join(" ")}function a6(r){if(typeof r=="number"&&(r=r.toString()),r){let e=Lr.CHAIN_MAP[r];if(e)return e}return r||""}Lr.getChainName=a6;function ppe(r,e,t){let n=a6(r);if(n==="Ethereum")return t==="block"?`https://etherscan.io/block/${e}`:t==="address"?`https://etherscan.io/address/${e}`:`https://etherscan.io/tx/${e}`;if(n==="Polygon")return t==="block"?`https://polygonscan.com/block/${e}`:t==="address"?`https://polygonscan.com/address/${e}`:`https://polygonscan.com/tx/${e}`;if(n.startsWith("Aptos ")){let i="?network=mainnet";return n.includes("Testnet")?i="?network=testnet":n.includes("Devnet")&&(i="?network=devnet"),t==="block"?`https://explorer.aptoslabs.com/block/${e}/${i}`:t==="address"?`https://explorer.aptoslabs.com/account/${e}/${i}`:`https://explorer.aptoslabs.com/txn/${e}/${i}`}if(n.startsWith("Solana "))return t==="block"?`https://explorer.solana.com/block/${e}`:t==="address"?`https://explorer.solana.com/address/${e}`:`https://explorer.solana.io/tx/${e}`;if(n.startsWith("Sui "))return t==="block"?`https://suivision.xyz/checkpoint/${e}`:t==="address"?`https://suivision.xyz/account/${e}`:`https://suivision.xyz/txblock/${e}`}Lr.getChainScanUrl=ppe});var l6=m(mi=>{"use strict";var mpe=mi&&mi.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(r,n,i)}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),gS=mi&&mi.__exportStar||function(r,e){for(var t in r)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&mpe(e,r,t)};Object.defineProperty(mi,"__esModule",{value:!0});gS(Ty(),mi);gS(mS(),mi);gS(c6(),mi)});function NS(r){let e={...RS.create(),states:Ly.create()};return B6(e,r)}function B6(r,e){r.states=r.states||Ly.create();for(let t of e)fl(r.counters,t.counters),fl(r.gauges,t.gauges),fl(r.events,t.events),fl(r.exports,t.exports),fl(r.timeseriesResult,t.timeseriesResult),r.states={configUpdated:r.states?.configUpdated||t.states?.configUpdated||!1};return r}function fl(r,e){for(let t of e)r.push(t)}function hl(r){return r.message+`
30
+ `):"",this.name="UnsubscriptionError",this.errors=t}})});var ti=m(fp=>{"use strict";Object.defineProperty(fp,"__esModule",{value:!0});fp.arrRemove=void 0;function PK(r,e){if(r){var t=r.indexOf(e);0<=t&&r.splice(t,1)}}fp.arrRemove=PK});var pr=m(tr=>{"use strict";var kN=tr&&tr.__values||function(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},RN=tr&&tr.__read||function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,s=[],o;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(o)throw o.error}}return s},NN=tr&&tr.__spreadArray||function(r,e){for(var t=0,n=e.length,i=r.length;t<n;t++,i++)r[i]=e[t];return r};Object.defineProperty(tr,"__esModule",{value:!0});tr.isSubscription=tr.EMPTY_SUBSCRIPTION=tr.Subscription=void 0;var _u=Ce(),MA=NA(),MN=ti(),DA=function(){function r(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}return r.prototype.unsubscribe=function(){var e,t,n,i,s;if(!this.closed){this.closed=!0;var o=this._parentage;if(o)if(this._parentage=null,Array.isArray(o))try{for(var a=kN(o),c=a.next();!c.done;c=a.next()){var l=c.value;l.remove(this)}}catch(p){e={error:p}}finally{try{c&&!c.done&&(t=a.return)&&t.call(a)}finally{if(e)throw e.error}}else o.remove(this);var u=this.initialTeardown;if(_u.isFunction(u))try{u()}catch(p){s=p instanceof MA.UnsubscriptionError?p.errors:[p]}var d=this._finalizers;if(d){this._finalizers=null;try{for(var f=kN(d),h=f.next();!h.done;h=f.next()){var g=h.value;try{DN(g)}catch(p){s=s??[],p instanceof MA.UnsubscriptionError?s=NN(NN([],RN(s)),RN(p.errors)):s.push(p)}}}catch(p){n={error:p}}finally{try{h&&!h.done&&(i=f.return)&&i.call(f)}finally{if(n)throw n.error}}}if(s)throw new MA.UnsubscriptionError(s)}},r.prototype.add=function(e){var t;if(e&&e!==this)if(this.closed)DN(e);else{if(e instanceof r){if(e.closed||e._hasParent(this))return;e._addParent(this)}(this._finalizers=(t=this._finalizers)!==null&&t!==void 0?t:[]).push(e)}},r.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},r.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},r.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&MN.arrRemove(t,e)},r.prototype.remove=function(e){var t=this._finalizers;t&&MN.arrRemove(t,e),e instanceof r&&e._removeParent(this)},r.EMPTY=function(){var e=new r;return e.closed=!0,e}(),r}();tr.Subscription=DA;tr.EMPTY_SUBSCRIPTION=DA.EMPTY;function kK(r){return r instanceof DA||r&&"closed"in r&&_u.isFunction(r.remove)&&_u.isFunction(r.add)&&_u.isFunction(r.unsubscribe)}tr.isSubscription=kK;function DN(r){_u.isFunction(r)?r():r.unsubscribe()}});var Qa=m(hp=>{"use strict";Object.defineProperty(hp,"__esModule",{value:!0});hp.config=void 0;hp.config={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1}});var qA=m(Cn=>{"use strict";var qN=Cn&&Cn.__read||function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,s=[],o;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(o)throw o.error}}return s},LN=Cn&&Cn.__spreadArray||function(r,e){for(var t=0,n=e.length,i=r.length;t<n;t++,i++)r[i]=e[t];return r};Object.defineProperty(Cn,"__esModule",{value:!0});Cn.timeoutProvider=void 0;Cn.timeoutProvider={setTimeout:function(r,e){for(var t=[],n=2;n<arguments.length;n++)t[n-2]=arguments[n];var i=Cn.timeoutProvider.delegate;return i?.setTimeout?i.setTimeout.apply(i,LN([r,e],qN(t))):setTimeout.apply(void 0,LN([r,e],qN(t)))},clearTimeout:function(r){var e=Cn.timeoutProvider.delegate;return(e?.clearTimeout||clearTimeout)(r)},delegate:void 0}});var LA=m(pp=>{"use strict";Object.defineProperty(pp,"__esModule",{value:!0});pp.reportUnhandledError=void 0;var RK=Qa(),NK=qA();function MK(r){NK.timeoutProvider.setTimeout(function(){var e=RK.config.onUnhandledError;if(e)e(r);else throw r})}pp.reportUnhandledError=MK});var wt=m(mp=>{"use strict";Object.defineProperty(mp,"__esModule",{value:!0});mp.noop=void 0;function DK(){}mp.noop=DK});var BN=m(xn=>{"use strict";Object.defineProperty(xn,"__esModule",{value:!0});xn.createNotification=xn.nextNotification=xn.errorNotification=xn.COMPLETE_NOTIFICATION=void 0;xn.COMPLETE_NOTIFICATION=function(){return gp("C",void 0,void 0)}();function qK(r){return gp("E",void 0,r)}xn.errorNotification=qK;function LK(r){return gp("N",r,void 0)}xn.nextNotification=LK;function gp(r,e,t){return{kind:r,value:e,error:t}}xn.createNotification=gp});var yp=m(Ja=>{"use strict";Object.defineProperty(Ja,"__esModule",{value:!0});Ja.captureError=Ja.errorContext=void 0;var FN=Qa(),fo=null;function BK(r){if(FN.config.useDeprecatedSynchronousErrorHandling){var e=!fo;if(e&&(fo={errorThrown:!1,error:null}),r(),e){var t=fo,n=t.errorThrown,i=t.error;if(fo=null,n)throw i}}else r()}Ja.errorContext=BK;function FK(r){FN.config.useDeprecatedSynchronousErrorHandling&&fo&&(fo.errorThrown=!0,fo.error=r)}Ja.captureError=FK});var $a=m(Qr=>{"use strict";var zN=Qr&&Qr.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}();Object.defineProperty(Qr,"__esModule",{value:!0});Qr.EMPTY_OBSERVER=Qr.SafeSubscriber=Qr.Subscriber=void 0;var UK=Ce(),UN=pr(),jA=Qa(),jK=LA(),jN=wt(),BA=BN(),zK=qA(),HK=yp(),HN=function(r){zN(e,r);function e(t){var n=r.call(this)||this;return n.isStopped=!1,t?(n.destination=t,UN.isSubscription(t)&&t.add(n)):n.destination=Qr.EMPTY_OBSERVER,n}return e.create=function(t,n,i){return new GN(t,n,i)},e.prototype.next=function(t){this.isStopped?UA(BA.nextNotification(t),this):this._next(t)},e.prototype.error=function(t){this.isStopped?UA(BA.errorNotification(t),this):(this.isStopped=!0,this._error(t))},e.prototype.complete=function(){this.isStopped?UA(BA.COMPLETE_NOTIFICATION,this):(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,r.prototype.unsubscribe.call(this),this.destination=null)},e.prototype._next=function(t){this.destination.next(t)},e.prototype._error=function(t){try{this.destination.error(t)}finally{this.unsubscribe()}},e.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},e}(UN.Subscription);Qr.Subscriber=HN;var GK=Function.prototype.bind;function FA(r,e){return GK.call(r,e)}var VK=function(){function r(e){this.partialObserver=e}return r.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(n){vp(n)}},r.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(n){vp(n)}else vp(e)},r.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(t){vp(t)}},r}(),GN=function(r){zN(e,r);function e(t,n,i){var s=r.call(this)||this,o;if(UK.isFunction(t)||!t)o={next:t??void 0,error:n??void 0,complete:i??void 0};else{var a;s&&jA.config.useDeprecatedNextContext?(a=Object.create(t),a.unsubscribe=function(){return s.unsubscribe()},o={next:t.next&&FA(t.next,a),error:t.error&&FA(t.error,a),complete:t.complete&&FA(t.complete,a)}):o=t}return s.destination=new VK(o),s}return e}(HN);Qr.SafeSubscriber=GN;function vp(r){jA.config.useDeprecatedSynchronousErrorHandling?HK.captureError(r):jK.reportUnhandledError(r)}function WK(r){throw r}function UA(r,e){var t=jA.config.onStoppedNotification;t&&zK.timeoutProvider.setTimeout(function(){return t(r,e)})}Qr.EMPTY_OBSERVER={closed:!0,next:jN.noop,error:WK,complete:jN.noop}});var Au=m(bp=>{"use strict";Object.defineProperty(bp,"__esModule",{value:!0});bp.observable=void 0;bp.observable=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}()});var Et=m(_p=>{"use strict";Object.defineProperty(_p,"__esModule",{value:!0});_p.identity=void 0;function KK(r){return r}_p.identity=KK});var wu=m(Ya=>{"use strict";Object.defineProperty(Ya,"__esModule",{value:!0});Ya.pipeFromArray=Ya.pipe=void 0;var QK=Et();function JK(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];return VN(r)}Ya.pipe=JK;function VN(r){return r.length===0?QK.identity:r.length===1?r[0]:function(t){return r.reduce(function(n,i){return i(n)},t)}}Ya.pipeFromArray=VN});var Pe=m(Ap=>{"use strict";Object.defineProperty(Ap,"__esModule",{value:!0});Ap.Observable=void 0;var HA=$a(),$K=pr(),YK=Au(),ZK=wu(),XK=Qa(),zA=Ce(),eQ=yp(),tQ=function(){function r(e){e&&(this._subscribe=e)}return r.prototype.lift=function(e){var t=new r;return t.source=this,t.operator=e,t},r.prototype.subscribe=function(e,t,n){var i=this,s=nQ(e)?e:new HA.SafeSubscriber(e,t,n);return eQ.errorContext(function(){var o=i,a=o.operator,c=o.source;s.add(a?a.call(s,c):c?i._subscribe(s):i._trySubscribe(s))}),s},r.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){e.error(t)}},r.prototype.forEach=function(e,t){var n=this;return t=WN(t),new t(function(i,s){var o=new HA.SafeSubscriber({next:function(a){try{e(a)}catch(c){s(c),o.unsubscribe()}},error:s,complete:i});n.subscribe(o)})},r.prototype._subscribe=function(e){var t;return(t=this.source)===null||t===void 0?void 0:t.subscribe(e)},r.prototype[YK.observable]=function(){return this},r.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return ZK.pipeFromArray(e)(this)},r.prototype.toPromise=function(e){var t=this;return e=WN(e),new e(function(n,i){var s;t.subscribe(function(o){return s=o},function(o){return i(o)},function(){return n(s)})})},r.create=function(e){return new r(e)},r}();Ap.Observable=tQ;function WN(r){var e;return(e=r??XK.config.Promise)!==null&&e!==void 0?e:Promise}function rQ(r){return r&&zA.isFunction(r.next)&&zA.isFunction(r.error)&&zA.isFunction(r.complete)}function nQ(r){return r&&r instanceof HA.Subscriber||rQ(r)&&$K.isSubscription(r)}});var K=m(Za=>{"use strict";Object.defineProperty(Za,"__esModule",{value:!0});Za.operate=Za.hasLift=void 0;var iQ=Ce();function KN(r){return iQ.isFunction(r?.lift)}Za.hasLift=KN;function sQ(r){return function(e){if(KN(e))return e.lift(function(t){try{return r(t,this)}catch(n){this.error(n)}});throw new TypeError("Unable to lift unknown Observable type")}}Za.operate=sQ});var te=m($i=>{"use strict";var oQ=$i&&$i.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}();Object.defineProperty($i,"__esModule",{value:!0});$i.OperatorSubscriber=$i.createOperatorSubscriber=void 0;var aQ=$a();function cQ(r,e,t,n,i){return new QN(r,e,t,n,i)}$i.createOperatorSubscriber=cQ;var QN=function(r){oQ(e,r);function e(t,n,i,s,o,a){var c=r.call(this,t)||this;return c.onFinalize=o,c.shouldUnsubscribe=a,c._next=n?function(l){try{n(l)}catch(u){t.error(u)}}:r.prototype._next,c._error=s?function(l){try{s(l)}catch(u){t.error(u)}finally{this.unsubscribe()}}:r.prototype._error,c._complete=i?function(){try{i()}catch(l){t.error(l)}finally{this.unsubscribe()}}:r.prototype._complete,c}return e.prototype.unsubscribe=function(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var n=this.closed;r.prototype.unsubscribe.call(this),!n&&((t=this.onFinalize)===null||t===void 0||t.call(this))}},e}(aQ.Subscriber);$i.OperatorSubscriber=QN});var GA=m(wp=>{"use strict";Object.defineProperty(wp,"__esModule",{value:!0});wp.refCount=void 0;var lQ=K(),uQ=te();function dQ(){return lQ.operate(function(r,e){var t=null;r._refCount++;var n=uQ.createOperatorSubscriber(e,void 0,void 0,void 0,function(){if(!r||r._refCount<=0||0<--r._refCount){t=null;return}var i=r._connection,s=t;t=null,i&&(!s||i===s)&&i.unsubscribe(),e.unsubscribe()});r.subscribe(n),n.closed||(t=r.connect())})}wp.refCount=dQ});var Eu=m(Xa=>{"use strict";var fQ=Xa&&Xa.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}();Object.defineProperty(Xa,"__esModule",{value:!0});Xa.ConnectableObservable=void 0;var hQ=Pe(),JN=pr(),pQ=GA(),mQ=te(),gQ=K(),yQ=function(r){fQ(e,r);function e(t,n){var i=r.call(this)||this;return i.source=t,i.subjectFactory=n,i._subject=null,i._refCount=0,i._connection=null,gQ.hasLift(t)&&(i.lift=t.lift),i}return e.prototype._subscribe=function(t){return this.getSubject().subscribe(t)},e.prototype.getSubject=function(){var t=this._subject;return(!t||t.isStopped)&&(this._subject=this.subjectFactory()),this._subject},e.prototype._teardown=function(){this._refCount=0;var t=this._connection;this._subject=this._connection=null,t?.unsubscribe()},e.prototype.connect=function(){var t=this,n=this._connection;if(!n){n=this._connection=new JN.Subscription;var i=this.getSubject();n.add(this.source.subscribe(mQ.createOperatorSubscriber(i,void 0,function(){t._teardown(),i.complete()},function(s){t._teardown(),i.error(s)},function(){return t._teardown()}))),n.closed&&(this._connection=null,n=JN.Subscription.EMPTY)}return n},e.prototype.refCount=function(){return pQ.refCount()(this)},e}(hQ.Observable);Xa.ConnectableObservable=yQ});var $N=m(Su=>{"use strict";Object.defineProperty(Su,"__esModule",{value:!0});Su.performanceTimestampProvider=void 0;Su.performanceTimestampProvider={now:function(){return(Su.performanceTimestampProvider.delegate||performance).now()},delegate:void 0}});var VA=m(Jr=>{"use strict";var YN=Jr&&Jr.__read||function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,s=[],o;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(o)throw o.error}}return s},ZN=Jr&&Jr.__spreadArray||function(r,e){for(var t=0,n=e.length,i=r.length;t<n;t++,i++)r[i]=e[t];return r};Object.defineProperty(Jr,"__esModule",{value:!0});Jr.animationFrameProvider=void 0;var vQ=pr();Jr.animationFrameProvider={schedule:function(r){var e=requestAnimationFrame,t=cancelAnimationFrame,n=Jr.animationFrameProvider.delegate;n&&(e=n.requestAnimationFrame,t=n.cancelAnimationFrame);var i=e(function(s){t=void 0,r(s)});return new vQ.Subscription(function(){return t?.(i)})},requestAnimationFrame:function(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var t=Jr.animationFrameProvider.delegate;return(t?.requestAnimationFrame||requestAnimationFrame).apply(void 0,ZN([],YN(r)))},cancelAnimationFrame:function(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var t=Jr.animationFrameProvider.delegate;return(t?.cancelAnimationFrame||cancelAnimationFrame).apply(void 0,ZN([],YN(r)))},delegate:void 0}});var tM=m(Ep=>{"use strict";Object.defineProperty(Ep,"__esModule",{value:!0});Ep.animationFrames=void 0;var bQ=Pe(),_Q=$N(),XN=VA();function AQ(r){return r?eM(r):wQ}Ep.animationFrames=AQ;function eM(r){return new bQ.Observable(function(e){var t=r||_Q.performanceTimestampProvider,n=t.now(),i=0,s=function(){e.closed||(i=XN.animationFrameProvider.requestAnimationFrame(function(o){i=0;var a=t.now();e.next({timestamp:r?a:o,elapsed:a-n}),s()}))};return s(),function(){i&&XN.animationFrameProvider.cancelAnimationFrame(i)}})}var wQ=eM()});var WA=m(Sp=>{"use strict";Object.defineProperty(Sp,"__esModule",{value:!0});Sp.ObjectUnsubscribedError=void 0;var EQ=Ji();Sp.ObjectUnsubscribedError=EQ.createErrorClass(function(r){return function(){r(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}})});var St=m(On=>{"use strict";var nM=On&&On.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}(),SQ=On&&On.__values||function(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(On,"__esModule",{value:!0});On.AnonymousSubject=On.Subject=void 0;var rM=Pe(),QA=pr(),TQ=WA(),CQ=ti(),KA=yp(),iM=function(r){nM(e,r);function e(){var t=r.call(this)||this;return t.closed=!1,t.currentObservers=null,t.observers=[],t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return e.prototype.lift=function(t){var n=new JA(this,this);return n.operator=t,n},e.prototype._throwIfClosed=function(){if(this.closed)throw new TQ.ObjectUnsubscribedError},e.prototype.next=function(t){var n=this;KA.errorContext(function(){var i,s;if(n._throwIfClosed(),!n.isStopped){n.currentObservers||(n.currentObservers=Array.from(n.observers));try{for(var o=SQ(n.currentObservers),a=o.next();!a.done;a=o.next()){var c=a.value;c.next(t)}}catch(l){i={error:l}}finally{try{a&&!a.done&&(s=o.return)&&s.call(o)}finally{if(i)throw i.error}}}})},e.prototype.error=function(t){var n=this;KA.errorContext(function(){if(n._throwIfClosed(),!n.isStopped){n.hasError=n.isStopped=!0,n.thrownError=t;for(var i=n.observers;i.length;)i.shift().error(t)}})},e.prototype.complete=function(){var t=this;KA.errorContext(function(){if(t._throwIfClosed(),!t.isStopped){t.isStopped=!0;for(var n=t.observers;n.length;)n.shift().complete()}})},e.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(e.prototype,"observed",{get:function(){var t;return((t=this.observers)===null||t===void 0?void 0:t.length)>0},enumerable:!1,configurable:!0}),e.prototype._trySubscribe=function(t){return this._throwIfClosed(),r.prototype._trySubscribe.call(this,t)},e.prototype._subscribe=function(t){return this._throwIfClosed(),this._checkFinalizedStatuses(t),this._innerSubscribe(t)},e.prototype._innerSubscribe=function(t){var n=this,i=this,s=i.hasError,o=i.isStopped,a=i.observers;return s||o?QA.EMPTY_SUBSCRIPTION:(this.currentObservers=null,a.push(t),new QA.Subscription(function(){n.currentObservers=null,CQ.arrRemove(a,t)}))},e.prototype._checkFinalizedStatuses=function(t){var n=this,i=n.hasError,s=n.thrownError,o=n.isStopped;i?t.error(s):o&&t.complete()},e.prototype.asObservable=function(){var t=new rM.Observable;return t.source=this,t},e.create=function(t,n){return new JA(t,n)},e}(rM.Observable);On.Subject=iM;var JA=function(r){nM(e,r);function e(t,n){var i=r.call(this)||this;return i.destination=t,i.source=n,i}return e.prototype.next=function(t){var n,i;(i=(n=this.destination)===null||n===void 0?void 0:n.next)===null||i===void 0||i.call(n,t)},e.prototype.error=function(t){var n,i;(i=(n=this.destination)===null||n===void 0?void 0:n.error)===null||i===void 0||i.call(n,t)},e.prototype.complete=function(){var t,n;(n=(t=this.destination)===null||t===void 0?void 0:t.complete)===null||n===void 0||n.call(t)},e.prototype._subscribe=function(t){var n,i;return(i=(n=this.source)===null||n===void 0?void 0:n.subscribe(t))!==null&&i!==void 0?i:QA.EMPTY_SUBSCRIPTION},e}(iM);On.AnonymousSubject=JA});var $A=m(ec=>{"use strict";var xQ=ec&&ec.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}();Object.defineProperty(ec,"__esModule",{value:!0});ec.BehaviorSubject=void 0;var OQ=St(),IQ=function(r){xQ(e,r);function e(t){var n=r.call(this)||this;return n._value=t,n}return Object.defineProperty(e.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),e.prototype._subscribe=function(t){var n=r.prototype._subscribe.call(this,t);return!n.closed&&t.next(this._value),n},e.prototype.getValue=function(){var t=this,n=t.hasError,i=t.thrownError,s=t._value;if(n)throw i;return this._throwIfClosed(),s},e.prototype.next=function(t){r.prototype.next.call(this,this._value=t)},e}(OQ.Subject);ec.BehaviorSubject=IQ});var Tp=m(Tu=>{"use strict";Object.defineProperty(Tu,"__esModule",{value:!0});Tu.dateTimestampProvider=void 0;Tu.dateTimestampProvider={now:function(){return(Tu.dateTimestampProvider.delegate||Date).now()},delegate:void 0}});var Cp=m(tc=>{"use strict";var PQ=tc&&tc.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}();Object.defineProperty(tc,"__esModule",{value:!0});tc.ReplaySubject=void 0;var kQ=St(),RQ=Tp(),NQ=function(r){PQ(e,r);function e(t,n,i){t===void 0&&(t=1/0),n===void 0&&(n=1/0),i===void 0&&(i=RQ.dateTimestampProvider);var s=r.call(this)||this;return s._bufferSize=t,s._windowTime=n,s._timestampProvider=i,s._buffer=[],s._infiniteTimeWindow=!0,s._infiniteTimeWindow=n===1/0,s._bufferSize=Math.max(1,t),s._windowTime=Math.max(1,n),s}return e.prototype.next=function(t){var n=this,i=n.isStopped,s=n._buffer,o=n._infiniteTimeWindow,a=n._timestampProvider,c=n._windowTime;i||(s.push(t),!o&&s.push(a.now()+c)),this._trimBuffer(),r.prototype.next.call(this,t)},e.prototype._subscribe=function(t){this._throwIfClosed(),this._trimBuffer();for(var n=this._innerSubscribe(t),i=this,s=i._infiniteTimeWindow,o=i._buffer,a=o.slice(),c=0;c<a.length&&!t.closed;c+=s?1:2)t.next(a[c]);return this._checkFinalizedStatuses(t),n},e.prototype._trimBuffer=function(){var t=this,n=t._bufferSize,i=t._timestampProvider,s=t._buffer,o=t._infiniteTimeWindow,a=(o?1:2)*n;if(n<1/0&&a<s.length&&s.splice(0,s.length-a),!o){for(var c=i.now(),l=0,u=1;u<s.length&&s[u]<=c;u+=2)l=u;l&&s.splice(0,l+1)}},e}(kQ.Subject);tc.ReplaySubject=NQ});var xp=m(rc=>{"use strict";var MQ=rc&&rc.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}();Object.defineProperty(rc,"__esModule",{value:!0});rc.AsyncSubject=void 0;var DQ=St(),qQ=function(r){MQ(e,r);function e(){var t=r!==null&&r.apply(this,arguments)||this;return t._value=null,t._hasValue=!1,t._isComplete=!1,t}return e.prototype._checkFinalizedStatuses=function(t){var n=this,i=n.hasError,s=n._hasValue,o=n._value,a=n.thrownError,c=n.isStopped,l=n._isComplete;i?t.error(a):(c||l)&&(s&&t.next(o),t.complete())},e.prototype.next=function(t){this.isStopped||(this._value=t,this._hasValue=!0)},e.prototype.complete=function(){var t=this,n=t._hasValue,i=t._value,s=t._isComplete;s||(this._isComplete=!0,n&&r.prototype.next.call(this,i),r.prototype.complete.call(this))},e}(DQ.Subject);rc.AsyncSubject=qQ});var sM=m(nc=>{"use strict";var LQ=nc&&nc.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}();Object.defineProperty(nc,"__esModule",{value:!0});nc.Action=void 0;var BQ=pr(),FQ=function(r){LQ(e,r);function e(t,n){return r.call(this)||this}return e.prototype.schedule=function(t,n){return n===void 0&&(n=0),this},e}(BQ.Subscription);nc.Action=FQ});var cM=m(In=>{"use strict";var oM=In&&In.__read||function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,s=[],o;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(o)throw o.error}}return s},aM=In&&In.__spreadArray||function(r,e){for(var t=0,n=e.length,i=r.length;t<n;t++,i++)r[i]=e[t];return r};Object.defineProperty(In,"__esModule",{value:!0});In.intervalProvider=void 0;In.intervalProvider={setInterval:function(r,e){for(var t=[],n=2;n<arguments.length;n++)t[n-2]=arguments[n];var i=In.intervalProvider.delegate;return i?.setInterval?i.setInterval.apply(i,aM([r,e],oM(t))):setInterval.apply(void 0,aM([r,e],oM(t)))},clearInterval:function(r){var e=In.intervalProvider.delegate;return(e?.clearInterval||clearInterval)(r)},delegate:void 0}});var sc=m(ic=>{"use strict";var UQ=ic&&ic.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}();Object.defineProperty(ic,"__esModule",{value:!0});ic.AsyncAction=void 0;var jQ=sM(),lM=cM(),zQ=ti(),HQ=function(r){UQ(e,r);function e(t,n){var i=r.call(this,t,n)||this;return i.scheduler=t,i.work=n,i.pending=!1,i}return e.prototype.schedule=function(t,n){var i;if(n===void 0&&(n=0),this.closed)return this;this.state=t;var s=this.id,o=this.scheduler;return s!=null&&(this.id=this.recycleAsyncId(o,s,n)),this.pending=!0,this.delay=n,this.id=(i=this.id)!==null&&i!==void 0?i:this.requestAsyncId(o,this.id,n),this},e.prototype.requestAsyncId=function(t,n,i){return i===void 0&&(i=0),lM.intervalProvider.setInterval(t.flush.bind(t,this),i)},e.prototype.recycleAsyncId=function(t,n,i){if(i===void 0&&(i=0),i!=null&&this.delay===i&&this.pending===!1)return n;n!=null&&lM.intervalProvider.clearInterval(n)},e.prototype.execute=function(t,n){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var i=this._execute(t,n);if(i)return i;this.pending===!1&&this.id!=null&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},e.prototype._execute=function(t,n){var i=!1,s;try{this.work(t)}catch(o){i=!0,s=o||new Error("Scheduled action threw falsy error")}if(i)return this.unsubscribe(),s},e.prototype.unsubscribe=function(){if(!this.closed){var t=this,n=t.id,i=t.scheduler,s=i.actions;this.work=this.state=this.scheduler=null,this.pending=!1,zQ.arrRemove(s,this),n!=null&&(this.id=this.recycleAsyncId(i,n,null)),this.delay=null,r.prototype.unsubscribe.call(this)}},e}(jQ.Action);ic.AsyncAction=HQ});var dM=m(oc=>{"use strict";Object.defineProperty(oc,"__esModule",{value:!0});oc.TestTools=oc.Immediate=void 0;var GQ=1,YA,Op={};function uM(r){return r in Op?(delete Op[r],!0):!1}oc.Immediate={setImmediate:function(r){var e=GQ++;return Op[e]=!0,YA||(YA=Promise.resolve()),YA.then(function(){return uM(e)&&r()}),e},clearImmediate:function(r){uM(r)}};oc.TestTools={pending:function(){return Object.keys(Op).length}}});var hM=m(Pn=>{"use strict";var VQ=Pn&&Pn.__read||function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,s=[],o;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(o)throw o.error}}return s},WQ=Pn&&Pn.__spreadArray||function(r,e){for(var t=0,n=e.length,i=r.length;t<n;t++,i++)r[i]=e[t];return r};Object.defineProperty(Pn,"__esModule",{value:!0});Pn.immediateProvider=void 0;var fM=dM(),KQ=fM.Immediate.setImmediate,QQ=fM.Immediate.clearImmediate;Pn.immediateProvider={setImmediate:function(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var t=Pn.immediateProvider.delegate;return(t?.setImmediate||KQ).apply(void 0,WQ([],VQ(r)))},clearImmediate:function(r){var e=Pn.immediateProvider.delegate;return(e?.clearImmediate||QQ)(r)},delegate:void 0}});var mM=m(ac=>{"use strict";var JQ=ac&&ac.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}();Object.defineProperty(ac,"__esModule",{value:!0});ac.AsapAction=void 0;var $Q=sc(),pM=hM(),YQ=function(r){JQ(e,r);function e(t,n){var i=r.call(this,t,n)||this;return i.scheduler=t,i.work=n,i}return e.prototype.requestAsyncId=function(t,n,i){return i===void 0&&(i=0),i!==null&&i>0?r.prototype.requestAsyncId.call(this,t,n,i):(t.actions.push(this),t._scheduled||(t._scheduled=pM.immediateProvider.setImmediate(t.flush.bind(t,void 0))))},e.prototype.recycleAsyncId=function(t,n,i){var s;if(i===void 0&&(i=0),i!=null?i>0:this.delay>0)return r.prototype.recycleAsyncId.call(this,t,n,i);var o=t.actions;n!=null&&((s=o[o.length-1])===null||s===void 0?void 0:s.id)!==n&&(pM.immediateProvider.clearImmediate(n),t._scheduled===n&&(t._scheduled=void 0))},e}($Q.AsyncAction);ac.AsapAction=YQ});var ZA=m(Ip=>{"use strict";Object.defineProperty(Ip,"__esModule",{value:!0});Ip.Scheduler=void 0;var ZQ=Tp(),XQ=function(){function r(e,t){t===void 0&&(t=r.now),this.schedulerActionCtor=e,this.now=t}return r.prototype.schedule=function(e,t,n){return t===void 0&&(t=0),new this.schedulerActionCtor(this,e).schedule(n,t)},r.now=ZQ.dateTimestampProvider.now,r}();Ip.Scheduler=XQ});var lc=m(cc=>{"use strict";var eJ=cc&&cc.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}();Object.defineProperty(cc,"__esModule",{value:!0});cc.AsyncScheduler=void 0;var gM=ZA(),tJ=function(r){eJ(e,r);function e(t,n){n===void 0&&(n=gM.Scheduler.now);var i=r.call(this,t,n)||this;return i.actions=[],i._active=!1,i}return e.prototype.flush=function(t){var n=this.actions;if(this._active){n.push(t);return}var i;this._active=!0;do if(i=t.execute(t.state,t.delay))break;while(t=n.shift());if(this._active=!1,i){for(;t=n.shift();)t.unsubscribe();throw i}},e}(gM.Scheduler);cc.AsyncScheduler=tJ});var yM=m(uc=>{"use strict";var rJ=uc&&uc.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}();Object.defineProperty(uc,"__esModule",{value:!0});uc.AsapScheduler=void 0;var nJ=lc(),iJ=function(r){rJ(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.flush=function(t){this._active=!0;var n=this._scheduled;this._scheduled=void 0;var i=this.actions,s;t=t||i.shift();do if(s=t.execute(t.state,t.delay))break;while((t=i[0])&&t.id===n&&i.shift());if(this._active=!1,s){for(;(t=i[0])&&t.id===n&&i.shift();)t.unsubscribe();throw s}},e}(nJ.AsyncScheduler);uc.AsapScheduler=iJ});var vM=m(ho=>{"use strict";Object.defineProperty(ho,"__esModule",{value:!0});ho.asap=ho.asapScheduler=void 0;var sJ=mM(),oJ=yM();ho.asapScheduler=new oJ.AsapScheduler(sJ.AsapAction);ho.asap=ho.asapScheduler});var rr=m(po=>{"use strict";Object.defineProperty(po,"__esModule",{value:!0});po.async=po.asyncScheduler=void 0;var aJ=sc(),cJ=lc();po.asyncScheduler=new cJ.AsyncScheduler(aJ.AsyncAction);po.async=po.asyncScheduler});var bM=m(dc=>{"use strict";var lJ=dc&&dc.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}();Object.defineProperty(dc,"__esModule",{value:!0});dc.QueueAction=void 0;var uJ=sc(),dJ=function(r){lJ(e,r);function e(t,n){var i=r.call(this,t,n)||this;return i.scheduler=t,i.work=n,i}return e.prototype.schedule=function(t,n){return n===void 0&&(n=0),n>0?r.prototype.schedule.call(this,t,n):(this.delay=n,this.state=t,this.scheduler.flush(this),this)},e.prototype.execute=function(t,n){return n>0||this.closed?r.prototype.execute.call(this,t,n):this._execute(t,n)},e.prototype.requestAsyncId=function(t,n,i){return i===void 0&&(i=0),i!=null&&i>0||i==null&&this.delay>0?r.prototype.requestAsyncId.call(this,t,n,i):(t.flush(this),0)},e}(uJ.AsyncAction);dc.QueueAction=dJ});var _M=m(fc=>{"use strict";var fJ=fc&&fc.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}();Object.defineProperty(fc,"__esModule",{value:!0});fc.QueueScheduler=void 0;var hJ=lc(),pJ=function(r){fJ(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e}(hJ.AsyncScheduler);fc.QueueScheduler=pJ});var AM=m(mo=>{"use strict";Object.defineProperty(mo,"__esModule",{value:!0});mo.queue=mo.queueScheduler=void 0;var mJ=bM(),gJ=_M();mo.queueScheduler=new gJ.QueueScheduler(mJ.QueueAction);mo.queue=mo.queueScheduler});var EM=m(hc=>{"use strict";var yJ=hc&&hc.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}();Object.defineProperty(hc,"__esModule",{value:!0});hc.AnimationFrameAction=void 0;var vJ=sc(),wM=VA(),bJ=function(r){yJ(e,r);function e(t,n){var i=r.call(this,t,n)||this;return i.scheduler=t,i.work=n,i}return e.prototype.requestAsyncId=function(t,n,i){return i===void 0&&(i=0),i!==null&&i>0?r.prototype.requestAsyncId.call(this,t,n,i):(t.actions.push(this),t._scheduled||(t._scheduled=wM.animationFrameProvider.requestAnimationFrame(function(){return t.flush(void 0)})))},e.prototype.recycleAsyncId=function(t,n,i){var s;if(i===void 0&&(i=0),i!=null?i>0:this.delay>0)return r.prototype.recycleAsyncId.call(this,t,n,i);var o=t.actions;n!=null&&((s=o[o.length-1])===null||s===void 0?void 0:s.id)!==n&&(wM.animationFrameProvider.cancelAnimationFrame(n),t._scheduled=void 0)},e}(vJ.AsyncAction);hc.AnimationFrameAction=bJ});var SM=m(pc=>{"use strict";var _J=pc&&pc.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}();Object.defineProperty(pc,"__esModule",{value:!0});pc.AnimationFrameScheduler=void 0;var AJ=lc(),wJ=function(r){_J(e,r);function e(){return r!==null&&r.apply(this,arguments)||this}return e.prototype.flush=function(t){this._active=!0;var n=this._scheduled;this._scheduled=void 0;var i=this.actions,s;t=t||i.shift();do if(s=t.execute(t.state,t.delay))break;while((t=i[0])&&t.id===n&&i.shift());if(this._active=!1,s){for(;(t=i[0])&&t.id===n&&i.shift();)t.unsubscribe();throw s}},e}(AJ.AsyncScheduler);pc.AnimationFrameScheduler=wJ});var TM=m(go=>{"use strict";Object.defineProperty(go,"__esModule",{value:!0});go.animationFrame=go.animationFrameScheduler=void 0;var EJ=EM(),SJ=SM();go.animationFrameScheduler=new SJ.AnimationFrameScheduler(EJ.AnimationFrameAction);go.animationFrame=go.animationFrameScheduler});var OM=m(Yi=>{"use strict";var CM=Yi&&Yi.__extends||function(){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var s in i)Object.prototype.hasOwnProperty.call(i,s)&&(n[s]=i[s])},r(e,t)};return function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");r(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}}();Object.defineProperty(Yi,"__esModule",{value:!0});Yi.VirtualAction=Yi.VirtualTimeScheduler=void 0;var TJ=sc(),CJ=pr(),xJ=lc(),OJ=function(r){CM(e,r);function e(t,n){t===void 0&&(t=xM),n===void 0&&(n=1/0);var i=r.call(this,t,function(){return i.frame})||this;return i.maxFrames=n,i.frame=0,i.index=-1,i}return e.prototype.flush=function(){for(var t=this,n=t.actions,i=t.maxFrames,s,o;(o=n[0])&&o.delay<=i&&(n.shift(),this.frame=o.delay,!(s=o.execute(o.state,o.delay))););if(s){for(;o=n.shift();)o.unsubscribe();throw s}},e.frameTimeFactor=10,e}(xJ.AsyncScheduler);Yi.VirtualTimeScheduler=OJ;var xM=function(r){CM(e,r);function e(t,n,i){i===void 0&&(i=t.index+=1);var s=r.call(this,t,n)||this;return s.scheduler=t,s.work=n,s.index=i,s.active=!0,s.index=t.index=i,s}return e.prototype.schedule=function(t,n){if(n===void 0&&(n=0),Number.isFinite(n)){if(!this.id)return r.prototype.schedule.call(this,t,n);this.active=!1;var i=new e(this.scheduler,this.work);return this.add(i),i.schedule(t,n)}else return CJ.Subscription.EMPTY},e.prototype.requestAsyncId=function(t,n,i){i===void 0&&(i=0),this.delay=t.frame+i;var s=t.actions;return s.push(this),s.sort(e.sortActions),1},e.prototype.recycleAsyncId=function(t,n,i){i===void 0&&(i=0)},e.prototype._execute=function(t,n){if(this.active===!0)return r.prototype._execute.call(this,t,n)},e.sortActions=function(t,n){return t.delay===n.delay?t.index===n.index?0:t.index>n.index?1:-1:t.delay>n.delay?1:-1},e}(TJ.AsyncAction);Yi.VirtualAction=xM});var $r=m(yo=>{"use strict";Object.defineProperty(yo,"__esModule",{value:!0});yo.empty=yo.EMPTY=void 0;var IM=Pe();yo.EMPTY=new IM.Observable(function(r){return r.complete()});function IJ(r){return r?PJ(r):yo.EMPTY}yo.empty=IJ;function PJ(r){return new IM.Observable(function(e){return r.schedule(function(){return e.complete()})})}});var Cu=m(Pp=>{"use strict";Object.defineProperty(Pp,"__esModule",{value:!0});Pp.isScheduler=void 0;var kJ=Ce();function RJ(r){return r&&kJ.isFunction(r.schedule)}Pp.isScheduler=RJ});var nr=m(Zi=>{"use strict";Object.defineProperty(Zi,"__esModule",{value:!0});Zi.popNumber=Zi.popScheduler=Zi.popResultSelector=void 0;var NJ=Ce(),MJ=Cu();function XA(r){return r[r.length-1]}function DJ(r){return NJ.isFunction(XA(r))?r.pop():void 0}Zi.popResultSelector=DJ;function qJ(r){return MJ.isScheduler(XA(r))?r.pop():void 0}Zi.popScheduler=qJ;function LJ(r,e){return typeof XA(r)=="number"?r.pop():e}Zi.popNumber=LJ});var Rp=m(kp=>{"use strict";Object.defineProperty(kp,"__esModule",{value:!0});kp.isArrayLike=void 0;kp.isArrayLike=function(r){return r&&typeof r.length=="number"&&typeof r!="function"}});var ew=m(Np=>{"use strict";Object.defineProperty(Np,"__esModule",{value:!0});Np.isPromise=void 0;var BJ=Ce();function FJ(r){return BJ.isFunction(r?.then)}Np.isPromise=FJ});var tw=m(Mp=>{"use strict";Object.defineProperty(Mp,"__esModule",{value:!0});Mp.isInteropObservable=void 0;var UJ=Au(),jJ=Ce();function zJ(r){return jJ.isFunction(r[UJ.observable])}Mp.isInteropObservable=zJ});var rw=m(Dp=>{"use strict";Object.defineProperty(Dp,"__esModule",{value:!0});Dp.isAsyncIterable=void 0;var HJ=Ce();function GJ(r){return Symbol.asyncIterator&&HJ.isFunction(r?.[Symbol.asyncIterator])}Dp.isAsyncIterable=GJ});var nw=m(qp=>{"use strict";Object.defineProperty(qp,"__esModule",{value:!0});qp.createInvalidObservableTypeError=void 0;function VJ(r){return new TypeError("You provided "+(r!==null&&typeof r=="object"?"an invalid object":"'"+r+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}qp.createInvalidObservableTypeError=VJ});var iw=m(mc=>{"use strict";Object.defineProperty(mc,"__esModule",{value:!0});mc.iterator=mc.getSymbolIterator=void 0;function PM(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}mc.getSymbolIterator=PM;mc.iterator=PM()});var sw=m(Lp=>{"use strict";Object.defineProperty(Lp,"__esModule",{value:!0});Lp.isIterable=void 0;var WJ=iw(),KJ=Ce();function QJ(r){return KJ.isFunction(r?.[WJ.iterator])}Lp.isIterable=QJ});var Bp=m(Dr=>{"use strict";var JJ=Dr&&Dr.__generator||function(r,e){var t={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,o;return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(l){return function(u){return c([l,u])}}function c(l){if(n)throw new TypeError("Generator is already executing.");for(;t;)try{if(n=1,i&&(s=l[0]&2?i.return:l[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,l[1])).done)return s;switch(i=0,s&&(l=[l[0]&2,s.value]),l[0]){case 0:case 1:s=l;break;case 4:return t.label++,{value:l[1],done:!1};case 5:t.label++,i=l[1],l=[0];continue;case 7:l=t.ops.pop(),t.trys.pop();continue;default:if(s=t.trys,!(s=s.length>0&&s[s.length-1])&&(l[0]===6||l[0]===2)){t=0;continue}if(l[0]===3&&(!s||l[1]>s[0]&&l[1]<s[3])){t.label=l[1];break}if(l[0]===6&&t.label<s[1]){t.label=s[1],s=l;break}if(s&&t.label<s[2]){t.label=s[2],t.ops.push(l);break}s[2]&&t.ops.pop(),t.trys.pop();continue}l=e.call(r,t)}catch(u){l=[6,u],i=0}finally{n=s=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},gc=Dr&&Dr.__await||function(r){return this instanceof gc?(this.v=r,this):new gc(r)},$J=Dr&&Dr.__asyncGenerator||function(r,e,t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=t.apply(r,e||[]),i,s=[];return i={},o("next"),o("throw"),o("return"),i[Symbol.asyncIterator]=function(){return this},i;function o(f){n[f]&&(i[f]=function(h){return new Promise(function(g,p){s.push([f,h,g,p])>1||a(f,h)})})}function a(f,h){try{c(n[f](h))}catch(g){d(s[0][3],g)}}function c(f){f.value instanceof gc?Promise.resolve(f.value.v).then(l,u):d(s[0][2],f)}function l(f){a("next",f)}function u(f){a("throw",f)}function d(f,h){f(h),s.shift(),s.length&&a(s[0][0],s[0][1])}};Object.defineProperty(Dr,"__esModule",{value:!0});Dr.isReadableStreamLike=Dr.readableStreamLikeToAsyncGenerator=void 0;var YJ=Ce();function ZJ(r){return $J(this,arguments,function(){var t,n,i,s;return JJ(this,function(o){switch(o.label){case 0:t=r.getReader(),o.label=1;case 1:o.trys.push([1,,9,10]),o.label=2;case 2:return[4,gc(t.read())];case 3:return n=o.sent(),i=n.value,s=n.done,s?[4,gc(void 0)]:[3,5];case 4:return[2,o.sent()];case 5:return[4,gc(i)];case 6:return[4,o.sent()];case 7:return o.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}})})}Dr.readableStreamLikeToAsyncGenerator=ZJ;function XJ(r){return YJ.isFunction(r?.getReader)}Dr.isReadableStreamLike=XJ});var ue=m(Ue=>{"use strict";var e$=Ue&&Ue.__awaiter||function(r,e,t,n){function i(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(u){try{l(n.next(u))}catch(d){o(d)}}function c(u){try{l(n.throw(u))}catch(d){o(d)}}function l(u){u.done?s(u.value):i(u.value).then(a,c)}l((n=n.apply(r,e||[])).next())})},t$=Ue&&Ue.__generator||function(r,e){var t={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,o;return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(l){return function(u){return c([l,u])}}function c(l){if(n)throw new TypeError("Generator is already executing.");for(;t;)try{if(n=1,i&&(s=l[0]&2?i.return:l[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,l[1])).done)return s;switch(i=0,s&&(l=[l[0]&2,s.value]),l[0]){case 0:case 1:s=l;break;case 4:return t.label++,{value:l[1],done:!1};case 5:t.label++,i=l[1],l=[0];continue;case 7:l=t.ops.pop(),t.trys.pop();continue;default:if(s=t.trys,!(s=s.length>0&&s[s.length-1])&&(l[0]===6||l[0]===2)){t=0;continue}if(l[0]===3&&(!s||l[1]>s[0]&&l[1]<s[3])){t.label=l[1];break}if(l[0]===6&&t.label<s[1]){t.label=s[1],s=l;break}if(s&&t.label<s[2]){t.label=s[2],t.ops.push(l);break}s[2]&&t.ops.pop(),t.trys.pop();continue}l=e.call(r,t)}catch(u){l=[6,u],i=0}finally{n=s=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},r$=Ue&&Ue.__asyncValues||function(r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=r[Symbol.asyncIterator],t;return e?e.call(r):(r=typeof ow=="function"?ow(r):r[Symbol.iterator](),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(s){t[s]=r[s]&&function(o){return new Promise(function(a,c){o=r[s](o),i(a,c,o.done,o.value)})}}function i(s,o,a,c){Promise.resolve(c).then(function(l){s({value:l,done:a})},o)}},ow=Ue&&Ue.__values||function(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(Ue,"__esModule",{value:!0});Ue.fromReadableStreamLike=Ue.fromAsyncIterable=Ue.fromIterable=Ue.fromPromise=Ue.fromArrayLike=Ue.fromInteropObservable=Ue.innerFrom=void 0;var n$=Rp(),i$=ew(),yc=Pe(),s$=tw(),o$=rw(),a$=nw(),c$=sw(),kM=Bp(),l$=Ce(),u$=LA(),d$=Au();function f$(r){if(r instanceof yc.Observable)return r;if(r!=null){if(s$.isInteropObservable(r))return RM(r);if(n$.isArrayLike(r))return NM(r);if(i$.isPromise(r))return MM(r);if(o$.isAsyncIterable(r))return aw(r);if(c$.isIterable(r))return DM(r);if(kM.isReadableStreamLike(r))return qM(r)}throw a$.createInvalidObservableTypeError(r)}Ue.innerFrom=f$;function RM(r){return new yc.Observable(function(e){var t=r[d$.observable]();if(l$.isFunction(t.subscribe))return t.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}Ue.fromInteropObservable=RM;function NM(r){return new yc.Observable(function(e){for(var t=0;t<r.length&&!e.closed;t++)e.next(r[t]);e.complete()})}Ue.fromArrayLike=NM;function MM(r){return new yc.Observable(function(e){r.then(function(t){e.closed||(e.next(t),e.complete())},function(t){return e.error(t)}).then(null,u$.reportUnhandledError)})}Ue.fromPromise=MM;function DM(r){return new yc.Observable(function(e){var t,n;try{for(var i=ow(r),s=i.next();!s.done;s=i.next()){var o=s.value;if(e.next(o),e.closed)return}}catch(a){t={error:a}}finally{try{s&&!s.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}e.complete()})}Ue.fromIterable=DM;function aw(r){return new yc.Observable(function(e){h$(r,e).catch(function(t){return e.error(t)})})}Ue.fromAsyncIterable=aw;function qM(r){return aw(kM.readableStreamLikeToAsyncGenerator(r))}Ue.fromReadableStreamLike=qM;function h$(r,e){var t,n,i,s;return e$(this,void 0,void 0,function(){var o,a;return t$(this,function(c){switch(c.label){case 0:c.trys.push([0,5,6,11]),t=r$(r),c.label=1;case 1:return[4,t.next()];case 2:if(n=c.sent(),!!n.done)return[3,4];if(o=n.value,e.next(o),e.closed)return[2];c.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return a=c.sent(),i={error:a},[3,11];case 6:return c.trys.push([6,,9,10]),n&&!n.done&&(s=t.return)?[4,s.call(t)]:[3,8];case 7:c.sent(),c.label=8;case 8:return[3,10];case 9:if(i)throw i.error;return[7];case 10:return[7];case 11:return e.complete(),[2]}})})}});var ri=m(Fp=>{"use strict";Object.defineProperty(Fp,"__esModule",{value:!0});Fp.executeSchedule=void 0;function p$(r,e,t,n,i){n===void 0&&(n=0),i===void 0&&(i=!1);var s=e.schedule(function(){t(),i?r.add(this.schedule(null,n)):this.unsubscribe()},n);if(r.add(s),!i)return s}Fp.executeSchedule=p$});var xu=m(Up=>{"use strict";Object.defineProperty(Up,"__esModule",{value:!0});Up.observeOn=void 0;var cw=ri(),m$=K(),g$=te();function y$(r,e){return e===void 0&&(e=0),m$.operate(function(t,n){t.subscribe(g$.createOperatorSubscriber(n,function(i){return cw.executeSchedule(n,r,function(){return n.next(i)},e)},function(){return cw.executeSchedule(n,r,function(){return n.complete()},e)},function(i){return cw.executeSchedule(n,r,function(){return n.error(i)},e)}))})}Up.observeOn=y$});var Ou=m(jp=>{"use strict";Object.defineProperty(jp,"__esModule",{value:!0});jp.subscribeOn=void 0;var v$=K();function b$(r,e){return e===void 0&&(e=0),v$.operate(function(t,n){n.add(r.schedule(function(){return t.subscribe(n)},e))})}jp.subscribeOn=b$});var LM=m(zp=>{"use strict";Object.defineProperty(zp,"__esModule",{value:!0});zp.scheduleObservable=void 0;var _$=ue(),A$=xu(),w$=Ou();function E$(r,e){return _$.innerFrom(r).pipe(w$.subscribeOn(e),A$.observeOn(e))}zp.scheduleObservable=E$});var BM=m(Hp=>{"use strict";Object.defineProperty(Hp,"__esModule",{value:!0});Hp.schedulePromise=void 0;var S$=ue(),T$=xu(),C$=Ou();function x$(r,e){return S$.innerFrom(r).pipe(C$.subscribeOn(e),T$.observeOn(e))}Hp.schedulePromise=x$});var FM=m(Gp=>{"use strict";Object.defineProperty(Gp,"__esModule",{value:!0});Gp.scheduleArray=void 0;var O$=Pe();function I$(r,e){return new O$.Observable(function(t){var n=0;return e.schedule(function(){n===r.length?t.complete():(t.next(r[n++]),t.closed||this.schedule())})})}Gp.scheduleArray=I$});var lw=m(Vp=>{"use strict";Object.defineProperty(Vp,"__esModule",{value:!0});Vp.scheduleIterable=void 0;var P$=Pe(),k$=iw(),R$=Ce(),UM=ri();function N$(r,e){return new P$.Observable(function(t){var n;return UM.executeSchedule(t,e,function(){n=r[k$.iterator](),UM.executeSchedule(t,e,function(){var i,s,o;try{i=n.next(),s=i.value,o=i.done}catch(a){t.error(a);return}o?t.complete():t.next(s)},0,!0)}),function(){return R$.isFunction(n?.return)&&n.return()}})}Vp.scheduleIterable=N$});var uw=m(Wp=>{"use strict";Object.defineProperty(Wp,"__esModule",{value:!0});Wp.scheduleAsyncIterable=void 0;var M$=Pe(),jM=ri();function D$(r,e){if(!r)throw new Error("Iterable cannot be null");return new M$.Observable(function(t){jM.executeSchedule(t,e,function(){var n=r[Symbol.asyncIterator]();jM.executeSchedule(t,e,function(){n.next().then(function(i){i.done?t.complete():t.next(i.value)})},0,!0)})})}Wp.scheduleAsyncIterable=D$});var zM=m(Kp=>{"use strict";Object.defineProperty(Kp,"__esModule",{value:!0});Kp.scheduleReadableStreamLike=void 0;var q$=uw(),L$=Bp();function B$(r,e){return q$.scheduleAsyncIterable(L$.readableStreamLikeToAsyncGenerator(r),e)}Kp.scheduleReadableStreamLike=B$});var dw=m(Qp=>{"use strict";Object.defineProperty(Qp,"__esModule",{value:!0});Qp.scheduled=void 0;var F$=LM(),U$=BM(),j$=FM(),z$=lw(),H$=uw(),G$=tw(),V$=ew(),W$=Rp(),K$=sw(),Q$=rw(),J$=nw(),$$=Bp(),Y$=zM();function Z$(r,e){if(r!=null){if(G$.isInteropObservable(r))return F$.scheduleObservable(r,e);if(W$.isArrayLike(r))return j$.scheduleArray(r,e);if(V$.isPromise(r))return U$.schedulePromise(r,e);if(Q$.isAsyncIterable(r))return H$.scheduleAsyncIterable(r,e);if(K$.isIterable(r))return z$.scheduleIterable(r,e);if($$.isReadableStreamLike(r))return Y$.scheduleReadableStreamLike(r,e)}throw J$.createInvalidObservableTypeError(r)}Qp.scheduled=Z$});var ni=m(Jp=>{"use strict";Object.defineProperty(Jp,"__esModule",{value:!0});Jp.from=void 0;var X$=dw(),eY=ue();function tY(r,e){return e?X$.scheduled(r,e):eY.innerFrom(r)}Jp.from=tY});var Yp=m($p=>{"use strict";Object.defineProperty($p,"__esModule",{value:!0});$p.of=void 0;var rY=nr(),nY=ni();function iY(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var t=rY.popScheduler(r);return nY.from(r,t)}$p.of=iY});var fw=m(Zp=>{"use strict";Object.defineProperty(Zp,"__esModule",{value:!0});Zp.throwError=void 0;var sY=Pe(),oY=Ce();function aY(r,e){var t=oY.isFunction(r)?r:function(){return r},n=function(i){return i.error(t())};return new sY.Observable(e?function(i){return e.schedule(n,0,i)}:n)}Zp.throwError=aY});var Xp=m(ii=>{"use strict";Object.defineProperty(ii,"__esModule",{value:!0});ii.observeNotification=ii.Notification=ii.NotificationKind=void 0;var cY=$r(),lY=Yp(),uY=fw(),dY=Ce(),fY;(function(r){r.NEXT="N",r.ERROR="E",r.COMPLETE="C"})(fY=ii.NotificationKind||(ii.NotificationKind={}));var hY=function(){function r(e,t,n){this.kind=e,this.value=t,this.error=n,this.hasValue=e==="N"}return r.prototype.observe=function(e){return HM(this,e)},r.prototype.do=function(e,t,n){var i=this,s=i.kind,o=i.value,a=i.error;return s==="N"?e?.(o):s==="E"?t?.(a):n?.()},r.prototype.accept=function(e,t,n){var i;return dY.isFunction((i=e)===null||i===void 0?void 0:i.next)?this.observe(e):this.do(e,t,n)},r.prototype.toObservable=function(){var e=this,t=e.kind,n=e.value,i=e.error,s=t==="N"?lY.of(n):t==="E"?uY.throwError(function(){return i}):t==="C"?cY.EMPTY:0;if(!s)throw new TypeError("Unexpected notification kind "+t);return s},r.createNext=function(e){return new r("N",e)},r.createError=function(e){return new r("E",void 0,e)},r.createComplete=function(){return r.completeNotification},r.completeNotification=new r("C"),r}();ii.Notification=hY;function HM(r,e){var t,n,i,s=r,o=s.kind,a=s.value,c=s.error;if(typeof o!="string")throw new TypeError('Invalid notification, missing "kind"');o==="N"?(t=e.next)===null||t===void 0||t.call(e,a):o==="E"?(n=e.error)===null||n===void 0||n.call(e,c):(i=e.complete)===null||i===void 0||i.call(e)}ii.observeNotification=HM});var VM=m(e0=>{"use strict";Object.defineProperty(e0,"__esModule",{value:!0});e0.isObservable=void 0;var pY=Pe(),GM=Ce();function mY(r){return!!r&&(r instanceof pY.Observable||GM.isFunction(r.lift)&&GM.isFunction(r.subscribe))}e0.isObservable=mY});var Xi=m(t0=>{"use strict";Object.defineProperty(t0,"__esModule",{value:!0});t0.EmptyError=void 0;var gY=Ji();t0.EmptyError=gY.createErrorClass(function(r){return function(){r(this),this.name="EmptyError",this.message="no elements in sequence"}})});var WM=m(r0=>{"use strict";Object.defineProperty(r0,"__esModule",{value:!0});r0.lastValueFrom=void 0;var yY=Xi();function vY(r,e){var t=typeof e=="object";return new Promise(function(n,i){var s=!1,o;r.subscribe({next:function(a){o=a,s=!0},error:i,complete:function(){s?n(o):t?n(e.defaultValue):i(new yY.EmptyError)}})})}r0.lastValueFrom=vY});var KM=m(n0=>{"use strict";Object.defineProperty(n0,"__esModule",{value:!0});n0.firstValueFrom=void 0;var bY=Xi(),_Y=$a();function AY(r,e){var t=typeof e=="object";return new Promise(function(n,i){var s=new _Y.SafeSubscriber({next:function(o){n(o),s.unsubscribe()},error:i,complete:function(){t?n(e.defaultValue):i(new bY.EmptyError)}});r.subscribe(s)})}n0.firstValueFrom=AY});var hw=m(i0=>{"use strict";Object.defineProperty(i0,"__esModule",{value:!0});i0.ArgumentOutOfRangeError=void 0;var wY=Ji();i0.ArgumentOutOfRangeError=wY.createErrorClass(function(r){return function(){r(this),this.name="ArgumentOutOfRangeError",this.message="argument out of range"}})});var pw=m(s0=>{"use strict";Object.defineProperty(s0,"__esModule",{value:!0});s0.NotFoundError=void 0;var EY=Ji();s0.NotFoundError=EY.createErrorClass(function(r){return function(t){r(this),this.name="NotFoundError",this.message=t}})});var mw=m(o0=>{"use strict";Object.defineProperty(o0,"__esModule",{value:!0});o0.SequenceError=void 0;var SY=Ji();o0.SequenceError=SY.createErrorClass(function(r){return function(t){r(this),this.name="SequenceError",this.message=t}})});var c0=m(a0=>{"use strict";Object.defineProperty(a0,"__esModule",{value:!0});a0.isValidDate=void 0;function TY(r){return r instanceof Date&&!isNaN(r)}a0.isValidDate=TY});var l0=m(vo=>{"use strict";Object.defineProperty(vo,"__esModule",{value:!0});vo.timeout=vo.TimeoutError=void 0;var CY=rr(),xY=c0(),OY=K(),IY=ue(),PY=Ji(),kY=te(),RY=ri();vo.TimeoutError=PY.createErrorClass(function(r){return function(t){t===void 0&&(t=null),r(this),this.message="Timeout has occurred",this.name="TimeoutError",this.info=t}});function NY(r,e){var t=xY.isValidDate(r)?{first:r}:typeof r=="number"?{each:r}:r,n=t.first,i=t.each,s=t.with,o=s===void 0?MY:s,a=t.scheduler,c=a===void 0?e??CY.asyncScheduler:a,l=t.meta,u=l===void 0?null:l;if(n==null&&i==null)throw new TypeError("No timeout provided.");return OY.operate(function(d,f){var h,g,p=null,b=0,y=function(A){g=RY.executeSchedule(f,c,function(){try{h.unsubscribe(),IY.innerFrom(o({meta:u,lastValue:p,seen:b})).subscribe(f)}catch(E){f.error(E)}},A)};h=d.subscribe(kY.createOperatorSubscriber(f,function(A){g?.unsubscribe(),b++,f.next(p=A),i>0&&y(i)},void 0,void 0,function(){g?.closed||g?.unsubscribe(),p=null})),!b&&y(n!=null?typeof n=="number"?n:+n-c.now():i)})}vo.timeout=NY;function MY(r){throw new vo.TimeoutError(r)}});var es=m(u0=>{"use strict";Object.defineProperty(u0,"__esModule",{value:!0});u0.map=void 0;var DY=K(),qY=te();function LY(r,e){return DY.operate(function(t,n){var i=0;t.subscribe(qY.createOperatorSubscriber(n,function(s){n.next(r.call(e,s,i++))}))})}u0.map=LY});var rs=m(ts=>{"use strict";var BY=ts&&ts.__read||function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,s=[],o;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(o)throw o.error}}return s},FY=ts&&ts.__spreadArray||function(r,e){for(var t=0,n=e.length,i=r.length;t<n;t++,i++)r[i]=e[t];return r};Object.defineProperty(ts,"__esModule",{value:!0});ts.mapOneOrManyArgs=void 0;var UY=es(),jY=Array.isArray;function zY(r,e){return jY(e)?r.apply(void 0,FY([],BY(e))):r(e)}function HY(r){return UY.map(function(e){return zY(r,e)})}ts.mapOneOrManyArgs=HY});var yw=m(ns=>{"use strict";var GY=ns&&ns.__read||function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,s=[],o;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(o)throw o.error}}return s},QM=ns&&ns.__spreadArray||function(r,e){for(var t=0,n=e.length,i=r.length;t<n;t++,i++)r[i]=e[t];return r};Object.defineProperty(ns,"__esModule",{value:!0});ns.bindCallbackInternals=void 0;var VY=Cu(),WY=Pe(),KY=Ou(),QY=rs(),JY=xu(),$Y=xp();function gw(r,e,t,n){if(t)if(VY.isScheduler(t))n=t;else return function(){for(var i=[],s=0;s<arguments.length;s++)i[s]=arguments[s];return gw(r,e,n).apply(this,i).pipe(QY.mapOneOrManyArgs(t))};return n?function(){for(var i=[],s=0;s<arguments.length;s++)i[s]=arguments[s];return gw(r,e).apply(this,i).pipe(KY.subscribeOn(n),JY.observeOn(n))}:function(){for(var i=this,s=[],o=0;o<arguments.length;o++)s[o]=arguments[o];var a=new $Y.AsyncSubject,c=!0;return new WY.Observable(function(l){var u=a.subscribe(l);if(c){c=!1;var d=!1,f=!1;e.apply(i,QM(QM([],GY(s)),[function(){for(var h=[],g=0;g<arguments.length;g++)h[g]=arguments[g];if(r){var p=h.shift();if(p!=null){a.error(p);return}}a.next(1<h.length?h:h[0]),f=!0,d&&a.complete()}])),f&&a.complete(),d=!0}return u})}}ns.bindCallbackInternals=gw});var JM=m(d0=>{"use strict";Object.defineProperty(d0,"__esModule",{value:!0});d0.bindCallback=void 0;var YY=yw();function ZY(r,e,t){return YY.bindCallbackInternals(!1,r,e,t)}d0.bindCallback=ZY});var $M=m(f0=>{"use strict";Object.defineProperty(f0,"__esModule",{value:!0});f0.bindNodeCallback=void 0;var XY=yw();function eZ(r,e,t){return XY.bindCallbackInternals(!0,r,e,t)}f0.bindNodeCallback=eZ});var vw=m(h0=>{"use strict";Object.defineProperty(h0,"__esModule",{value:!0});h0.argsArgArrayOrObject=void 0;var tZ=Array.isArray,rZ=Object.getPrototypeOf,nZ=Object.prototype,iZ=Object.keys;function sZ(r){if(r.length===1){var e=r[0];if(tZ(e))return{args:e,keys:null};if(oZ(e)){var t=iZ(e);return{args:t.map(function(n){return e[n]}),keys:t}}}return{args:r,keys:null}}h0.argsArgArrayOrObject=sZ;function oZ(r){return r&&typeof r=="object"&&rZ(r)===nZ}});var bw=m(p0=>{"use strict";Object.defineProperty(p0,"__esModule",{value:!0});p0.createObject=void 0;function aZ(r,e){return r.reduce(function(t,n,i){return t[n]=e[i],t},{})}p0.createObject=aZ});var m0=m(vc=>{"use strict";Object.defineProperty(vc,"__esModule",{value:!0});vc.combineLatestInit=vc.combineLatest=void 0;var cZ=Pe(),lZ=vw(),XM=ni(),e2=Et(),uZ=rs(),YM=nr(),dZ=bw(),fZ=te(),hZ=ri();function pZ(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var t=YM.popScheduler(r),n=YM.popResultSelector(r),i=lZ.argsArgArrayOrObject(r),s=i.args,o=i.keys;if(s.length===0)return XM.from([],t);var a=new cZ.Observable(t2(s,t,o?function(c){return dZ.createObject(o,c)}:e2.identity));return n?a.pipe(uZ.mapOneOrManyArgs(n)):a}vc.combineLatest=pZ;function t2(r,e,t){return t===void 0&&(t=e2.identity),function(n){ZM(e,function(){for(var i=r.length,s=new Array(i),o=i,a=i,c=function(u){ZM(e,function(){var d=XM.from(r[u],e),f=!1;d.subscribe(fZ.createOperatorSubscriber(n,function(h){s[u]=h,f||(f=!0,a--),a||n.next(t(s.slice()))},function(){--o||n.complete()}))},n)},l=0;l<i;l++)c(l)},n)}}vc.combineLatestInit=t2;function ZM(r,e,t){r?hZ.executeSchedule(t,r,e):e()}});var y0=m(g0=>{"use strict";Object.defineProperty(g0,"__esModule",{value:!0});g0.mergeInternals=void 0;var mZ=ue(),gZ=ri(),r2=te();function yZ(r,e,t,n,i,s,o,a){var c=[],l=0,u=0,d=!1,f=function(){d&&!c.length&&!l&&e.complete()},h=function(p){return l<n?g(p):c.push(p)},g=function(p){s&&e.next(p),l++;var b=!1;mZ.innerFrom(t(p,u++)).subscribe(r2.createOperatorSubscriber(e,function(y){i?.(y),s?h(y):e.next(y)},function(){b=!0},void 0,function(){if(b)try{l--;for(var y=function(){var A=c.shift();o?gZ.executeSchedule(e,o,function(){return g(A)}):g(A)};c.length&&l<n;)y();f()}catch(A){e.error(A)}}))};return r.subscribe(r2.createOperatorSubscriber(e,h,function(){d=!0,f()})),function(){a?.()}}g0.mergeInternals=yZ});var si=m(v0=>{"use strict";Object.defineProperty(v0,"__esModule",{value:!0});v0.mergeMap=void 0;var vZ=es(),bZ=ue(),_Z=K(),AZ=y0(),wZ=Ce();function n2(r,e,t){return t===void 0&&(t=1/0),wZ.isFunction(e)?n2(function(n,i){return vZ.map(function(s,o){return e(n,s,i,o)})(bZ.innerFrom(r(n,i)))},t):(typeof e=="number"&&(t=e),_Z.operate(function(n,i){return AZ.mergeInternals(n,i,r,t)}))}v0.mergeMap=n2});var Iu=m(b0=>{"use strict";Object.defineProperty(b0,"__esModule",{value:!0});b0.mergeAll=void 0;var EZ=si(),SZ=Et();function TZ(r){return r===void 0&&(r=1/0),EZ.mergeMap(SZ.identity,r)}b0.mergeAll=TZ});var A0=m(_0=>{"use strict";Object.defineProperty(_0,"__esModule",{value:!0});_0.concatAll=void 0;var CZ=Iu();function xZ(){return CZ.mergeAll(1)}_0.concatAll=xZ});var Pu=m(w0=>{"use strict";Object.defineProperty(w0,"__esModule",{value:!0});w0.concat=void 0;var OZ=A0(),IZ=nr(),PZ=ni();function kZ(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];return OZ.concatAll()(PZ.from(r,IZ.popScheduler(r)))}w0.concat=kZ});var ku=m(E0=>{"use strict";Object.defineProperty(E0,"__esModule",{value:!0});E0.defer=void 0;var RZ=Pe(),NZ=ue();function MZ(r){return new RZ.Observable(function(e){NZ.innerFrom(r()).subscribe(e)})}E0.defer=MZ});var i2=m(S0=>{"use strict";Object.defineProperty(S0,"__esModule",{value:!0});S0.connectable=void 0;var DZ=St(),qZ=Pe(),LZ=ku(),BZ={connector:function(){return new DZ.Subject},resetOnDisconnect:!0};function FZ(r,e){e===void 0&&(e=BZ);var t=null,n=e.connector,i=e.resetOnDisconnect,s=i===void 0?!0:i,o=n(),a=new qZ.Observable(function(c){return o.subscribe(c)});return a.connect=function(){return(!t||t.closed)&&(t=LZ.defer(function(){return r}).subscribe(o),s&&t.add(function(){return o=n()})),t},a}S0.connectable=FZ});var s2=m(T0=>{"use strict";Object.defineProperty(T0,"__esModule",{value:!0});T0.forkJoin=void 0;var UZ=Pe(),jZ=vw(),zZ=ue(),HZ=nr(),GZ=te(),VZ=rs(),WZ=bw();function KZ(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var t=HZ.popResultSelector(r),n=jZ.argsArgArrayOrObject(r),i=n.args,s=n.keys,o=new UZ.Observable(function(a){var c=i.length;if(!c){a.complete();return}for(var l=new Array(c),u=c,d=c,f=function(g){var p=!1;zZ.innerFrom(i[g]).subscribe(GZ.createOperatorSubscriber(a,function(b){p||(p=!0,d--),l[g]=b},function(){return u--},void 0,function(){(!u||!p)&&(d||a.next(s?WZ.createObject(s,l):l),a.complete())}))},h=0;h<c;h++)f(h)});return t?o.pipe(VZ.mapOneOrManyArgs(t)):o}T0.forkJoin=KZ});var a2=m(bc=>{"use strict";var QZ=bc&&bc.__read||function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,s=[],o;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(o)throw o.error}}return s};Object.defineProperty(bc,"__esModule",{value:!0});bc.fromEvent=void 0;var JZ=ue(),$Z=Pe(),YZ=si(),ZZ=Rp(),bo=Ce(),XZ=rs(),eX=["addListener","removeListener"],tX=["addEventListener","removeEventListener"],rX=["on","off"];function _w(r,e,t,n){if(bo.isFunction(t)&&(n=t,t=void 0),n)return _w(r,e,t).pipe(XZ.mapOneOrManyArgs(n));var i=QZ(sX(r)?tX.map(function(a){return function(c){return r[a](e,c,t)}}):nX(r)?eX.map(o2(r,e)):iX(r)?rX.map(o2(r,e)):[],2),s=i[0],o=i[1];if(!s&&ZZ.isArrayLike(r))return YZ.mergeMap(function(a){return _w(a,e,t)})(JZ.innerFrom(r));if(!s)throw new TypeError("Invalid event target");return new $Z.Observable(function(a){var c=function(){for(var l=[],u=0;u<arguments.length;u++)l[u]=arguments[u];return a.next(1<l.length?l:l[0])};return s(c),function(){return o(c)}})}bc.fromEvent=_w;function o2(r,e){return function(t){return function(n){return r[t](e,n)}}}function nX(r){return bo.isFunction(r.addListener)&&bo.isFunction(r.removeListener)}function iX(r){return bo.isFunction(r.on)&&bo.isFunction(r.off)}function sX(r){return bo.isFunction(r.addEventListener)&&bo.isFunction(r.removeEventListener)}});var l2=m(C0=>{"use strict";Object.defineProperty(C0,"__esModule",{value:!0});C0.fromEventPattern=void 0;var oX=Pe(),aX=Ce(),cX=rs();function c2(r,e,t){return t?c2(r,e).pipe(cX.mapOneOrManyArgs(t)):new oX.Observable(function(n){var i=function(){for(var o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];return n.next(o.length===1?o[0]:o)},s=r(i);return aX.isFunction(e)?function(){return e(i,s)}:void 0})}C0.fromEventPattern=c2});var d2=m(_c=>{"use strict";var lX=_c&&_c.__generator||function(r,e){var t={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,o;return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(l){return function(u){return c([l,u])}}function c(l){if(n)throw new TypeError("Generator is already executing.");for(;t;)try{if(n=1,i&&(s=l[0]&2?i.return:l[0]?i.throw||((s=i.return)&&s.call(i),0):i.next)&&!(s=s.call(i,l[1])).done)return s;switch(i=0,s&&(l=[l[0]&2,s.value]),l[0]){case 0:case 1:s=l;break;case 4:return t.label++,{value:l[1],done:!1};case 5:t.label++,i=l[1],l=[0];continue;case 7:l=t.ops.pop(),t.trys.pop();continue;default:if(s=t.trys,!(s=s.length>0&&s[s.length-1])&&(l[0]===6||l[0]===2)){t=0;continue}if(l[0]===3&&(!s||l[1]>s[0]&&l[1]<s[3])){t.label=l[1];break}if(l[0]===6&&t.label<s[1]){t.label=s[1],s=l;break}if(s&&t.label<s[2]){t.label=s[2],t.ops.push(l);break}s[2]&&t.ops.pop(),t.trys.pop();continue}l=e.call(r,t)}catch(u){l=[6,u],i=0}finally{n=s=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}};Object.defineProperty(_c,"__esModule",{value:!0});_c.generate=void 0;var u2=Et(),uX=Cu(),dX=ku(),fX=lw();function hX(r,e,t,n,i){var s,o,a,c;arguments.length===1?(s=r,c=s.initialState,e=s.condition,t=s.iterate,o=s.resultSelector,a=o===void 0?u2.identity:o,i=s.scheduler):(c=r,!n||uX.isScheduler(n)?(a=u2.identity,i=n):a=n);function l(){var u;return lX(this,function(d){switch(d.label){case 0:u=c,d.label=1;case 1:return!e||e(u)?[4,a(u)]:[3,4];case 2:d.sent(),d.label=3;case 3:return u=t(u),[3,1];case 4:return[2]}})}return dX.defer(i?function(){return fX.scheduleIterable(l(),i)}:l)}_c.generate=hX});var f2=m(x0=>{"use strict";Object.defineProperty(x0,"__esModule",{value:!0});x0.iif=void 0;var pX=ku();function mX(r,e,t){return pX.defer(function(){return r()?e:t})}x0.iif=mX});var is=m(O0=>{"use strict";Object.defineProperty(O0,"__esModule",{value:!0});O0.timer=void 0;var gX=Pe(),yX=rr(),vX=Cu(),bX=c0();function _X(r,e,t){r===void 0&&(r=0),t===void 0&&(t=yX.async);var n=-1;return e!=null&&(vX.isScheduler(e)?t=e:n=e),new gX.Observable(function(i){var s=bX.isValidDate(r)?+r-t.now():r;s<0&&(s=0);var o=0;return t.schedule(function(){i.closed||(i.next(o++),0<=n?this.schedule(void 0,n):i.complete())},s)})}O0.timer=_X});var Aw=m(I0=>{"use strict";Object.defineProperty(I0,"__esModule",{value:!0});I0.interval=void 0;var AX=rr(),wX=is();function EX(r,e){return r===void 0&&(r=0),e===void 0&&(e=AX.asyncScheduler),r<0&&(r=0),wX.timer(r,r,e)}I0.interval=EX});var p2=m(P0=>{"use strict";Object.defineProperty(P0,"__esModule",{value:!0});P0.merge=void 0;var SX=Iu(),TX=ue(),CX=$r(),h2=nr(),xX=ni();function OX(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var t=h2.popScheduler(r),n=h2.popNumber(r,1/0),i=r;return i.length?i.length===1?TX.innerFrom(i[0]):SX.mergeAll(n)(xX.from(i,t)):CX.EMPTY}P0.merge=OX});var ww=m(_o=>{"use strict";Object.defineProperty(_o,"__esModule",{value:!0});_o.never=_o.NEVER=void 0;var IX=Pe(),PX=wt();_o.NEVER=new IX.Observable(PX.noop);function kX(){return _o.NEVER}_o.never=kX});var Ao=m(k0=>{"use strict";Object.defineProperty(k0,"__esModule",{value:!0});k0.argsOrArgArray=void 0;var RX=Array.isArray;function NX(r){return r.length===1&&RX(r[0])?r[0]:r}k0.argsOrArgArray=NX});var Ew=m(R0=>{"use strict";Object.defineProperty(R0,"__esModule",{value:!0});R0.onErrorResumeNext=void 0;var MX=Pe(),DX=Ao(),qX=te(),m2=wt(),LX=ue();function BX(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var t=DX.argsOrArgArray(r);return new MX.Observable(function(n){var i=0,s=function(){if(i<t.length){var o=void 0;try{o=LX.innerFrom(t[i++])}catch{s();return}var a=new qX.OperatorSubscriber(n,void 0,m2.noop,m2.noop);o.subscribe(a),a.add(s)}else n.complete()};s()})}R0.onErrorResumeNext=BX});var g2=m(N0=>{"use strict";Object.defineProperty(N0,"__esModule",{value:!0});N0.pairs=void 0;var FX=ni();function UX(r,e){return FX.from(Object.entries(r),e)}N0.pairs=UX});var y2=m(M0=>{"use strict";Object.defineProperty(M0,"__esModule",{value:!0});M0.not=void 0;function jX(r,e){return function(t,n){return!r.call(e,t,n)}}M0.not=jX});var wo=m(D0=>{"use strict";Object.defineProperty(D0,"__esModule",{value:!0});D0.filter=void 0;var zX=K(),HX=te();function GX(r,e){return zX.operate(function(t,n){var i=0;t.subscribe(HX.createOperatorSubscriber(n,function(s){return r.call(e,s,i++)&&n.next(s)}))})}D0.filter=GX});var _2=m(q0=>{"use strict";Object.defineProperty(q0,"__esModule",{value:!0});q0.partition=void 0;var VX=y2(),v2=wo(),b2=ue();function WX(r,e,t){return[v2.filter(e,t)(b2.innerFrom(r)),v2.filter(VX.not(e,t))(b2.innerFrom(r))]}q0.partition=WX});var Sw=m(Ac=>{"use strict";Object.defineProperty(Ac,"__esModule",{value:!0});Ac.raceInit=Ac.race=void 0;var KX=Pe(),A2=ue(),QX=Ao(),JX=te();function $X(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];return r=QX.argsOrArgArray(r),r.length===1?A2.innerFrom(r[0]):new KX.Observable(w2(r))}Ac.race=$X;function w2(r){return function(e){for(var t=[],n=function(s){t.push(A2.innerFrom(r[s]).subscribe(JX.createOperatorSubscriber(e,function(o){if(t){for(var a=0;a<t.length;a++)a!==s&&t[a].unsubscribe();t=null}e.next(o)})))},i=0;t&&!e.closed&&i<r.length;i++)n(i)}}Ac.raceInit=w2});var E2=m(L0=>{"use strict";Object.defineProperty(L0,"__esModule",{value:!0});L0.range=void 0;var YX=Pe(),ZX=$r();function XX(r,e,t){if(e==null&&(e=r,r=0),e<=0)return ZX.EMPTY;var n=e+r;return new YX.Observable(t?function(i){var s=r;return t.schedule(function(){s<n?(i.next(s++),this.schedule()):i.complete()})}:function(i){for(var s=r;s<n&&!i.closed;)i.next(s++);i.complete()})}L0.range=XX});var S2=m(B0=>{"use strict";Object.defineProperty(B0,"__esModule",{value:!0});B0.using=void 0;var eee=Pe(),tee=ue(),ree=$r();function nee(r,e){return new eee.Observable(function(t){var n=r(),i=e(n),s=i?tee.innerFrom(i):ree.EMPTY;return s.subscribe(t),function(){n&&n.unsubscribe()}})}B0.using=nee});var F0=m(ss=>{"use strict";var iee=ss&&ss.__read||function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,s=[],o;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(o)throw o.error}}return s},see=ss&&ss.__spreadArray||function(r,e){for(var t=0,n=e.length,i=r.length;t<n;t++,i++)r[i]=e[t];return r};Object.defineProperty(ss,"__esModule",{value:!0});ss.zip=void 0;var oee=Pe(),aee=ue(),cee=Ao(),lee=$r(),uee=te(),dee=nr();function fee(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var t=dee.popResultSelector(r),n=cee.argsOrArgArray(r);return n.length?new oee.Observable(function(i){var s=n.map(function(){return[]}),o=n.map(function(){return!1});i.add(function(){s=o=null});for(var a=function(l){aee.innerFrom(n[l]).subscribe(uee.createOperatorSubscriber(i,function(u){if(s[l].push(u),s.every(function(f){return f.length})){var d=s.map(function(f){return f.shift()});i.next(t?t.apply(void 0,see([],iee(d))):d),s.some(function(f,h){return!f.length&&o[h]})&&i.complete()}},function(){o[l]=!0,!s[l].length&&i.complete()}))},c=0;!i.closed&&c<n.length;c++)a(c);return function(){s=o=null}}):lee.EMPTY}ss.zip=fee});var C2=m(T2=>{"use strict";Object.defineProperty(T2,"__esModule",{value:!0})});var Tw=m(U0=>{"use strict";Object.defineProperty(U0,"__esModule",{value:!0});U0.audit=void 0;var hee=K(),pee=ue(),x2=te();function mee(r){return hee.operate(function(e,t){var n=!1,i=null,s=null,o=!1,a=function(){if(s?.unsubscribe(),s=null,n){n=!1;var l=i;i=null,t.next(l)}o&&t.complete()},c=function(){s=null,o&&t.complete()};e.subscribe(x2.createOperatorSubscriber(t,function(l){n=!0,i=l,s||pee.innerFrom(r(l)).subscribe(s=x2.createOperatorSubscriber(t,a,c))},function(){o=!0,(!n||!s||s.closed)&&t.complete()}))})}U0.audit=mee});var O2=m(j0=>{"use strict";Object.defineProperty(j0,"__esModule",{value:!0});j0.auditTime=void 0;var gee=rr(),yee=Tw(),vee=is();function bee(r,e){return e===void 0&&(e=gee.asyncScheduler),yee.audit(function(){return vee.timer(r,e)})}j0.auditTime=bee});var P2=m(z0=>{"use strict";Object.defineProperty(z0,"__esModule",{value:!0});z0.buffer=void 0;var _ee=K(),Aee=wt(),I2=te(),wee=ue();function Eee(r){return _ee.operate(function(e,t){var n=[];return e.subscribe(I2.createOperatorSubscriber(t,function(i){return n.push(i)},function(){t.next(n),t.complete()})),wee.innerFrom(r).subscribe(I2.createOperatorSubscriber(t,function(){var i=n;n=[],t.next(i)},Aee.noop)),function(){n=null}})}z0.buffer=Eee});var k2=m(wc=>{"use strict";var Cw=wc&&wc.__values||function(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(wc,"__esModule",{value:!0});wc.bufferCount=void 0;var See=K(),Tee=te(),Cee=ti();function xee(r,e){return e===void 0&&(e=null),e=e??r,See.operate(function(t,n){var i=[],s=0;t.subscribe(Tee.createOperatorSubscriber(n,function(o){var a,c,l,u,d=null;s++%e===0&&i.push([]);try{for(var f=Cw(i),h=f.next();!h.done;h=f.next()){var g=h.value;g.push(o),r<=g.length&&(d=d??[],d.push(g))}}catch(y){a={error:y}}finally{try{h&&!h.done&&(c=f.return)&&c.call(f)}finally{if(a)throw a.error}}if(d)try{for(var p=Cw(d),b=p.next();!b.done;b=p.next()){var g=b.value;Cee.arrRemove(i,g),n.next(g)}}catch(y){l={error:y}}finally{try{b&&!b.done&&(u=p.return)&&u.call(p)}finally{if(l)throw l.error}}},function(){var o,a;try{for(var c=Cw(i),l=c.next();!l.done;l=c.next()){var u=l.value;n.next(u)}}catch(d){o={error:d}}finally{try{l&&!l.done&&(a=c.return)&&a.call(c)}finally{if(o)throw o.error}}n.complete()},void 0,function(){i=null}))})}wc.bufferCount=xee});var N2=m(Ec=>{"use strict";var Oee=Ec&&Ec.__values||function(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(Ec,"__esModule",{value:!0});Ec.bufferTime=void 0;var Iee=pr(),Pee=K(),kee=te(),Ree=ti(),Nee=rr(),Mee=nr(),R2=ri();function Dee(r){for(var e,t,n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];var s=(e=Mee.popScheduler(n))!==null&&e!==void 0?e:Nee.asyncScheduler,o=(t=n[0])!==null&&t!==void 0?t:null,a=n[1]||1/0;return Pee.operate(function(c,l){var u=[],d=!1,f=function(p){var b=p.buffer,y=p.subs;y.unsubscribe(),Ree.arrRemove(u,p),l.next(b),d&&h()},h=function(){if(u){var p=new Iee.Subscription;l.add(p);var b=[],y={buffer:b,subs:p};u.push(y),R2.executeSchedule(p,s,function(){return f(y)},r)}};o!==null&&o>=0?R2.executeSchedule(l,s,h,o,!0):d=!0,h();var g=kee.createOperatorSubscriber(l,function(p){var b,y,A=u.slice();try{for(var E=Oee(A),C=E.next();!C.done;C=E.next()){var k=C.value,I=k.buffer;I.push(p),a<=I.length&&f(k)}}catch(D){b={error:D}}finally{try{C&&!C.done&&(y=E.return)&&y.call(E)}finally{if(b)throw b.error}}},function(){for(;u?.length;)l.next(u.shift().buffer);g?.unsubscribe(),l.complete(),l.unsubscribe()},void 0,function(){return u=null});c.subscribe(g)})}Ec.bufferTime=Dee});var q2=m(Sc=>{"use strict";var qee=Sc&&Sc.__values||function(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(Sc,"__esModule",{value:!0});Sc.bufferToggle=void 0;var Lee=pr(),Bee=K(),M2=ue(),xw=te(),D2=wt(),Fee=ti();function Uee(r,e){return Bee.operate(function(t,n){var i=[];M2.innerFrom(r).subscribe(xw.createOperatorSubscriber(n,function(s){var o=[];i.push(o);var a=new Lee.Subscription,c=function(){Fee.arrRemove(i,o),n.next(o),a.unsubscribe()};a.add(M2.innerFrom(e(s)).subscribe(xw.createOperatorSubscriber(n,c,D2.noop)))},D2.noop)),t.subscribe(xw.createOperatorSubscriber(n,function(s){var o,a;try{for(var c=qee(i),l=c.next();!l.done;l=c.next()){var u=l.value;u.push(s)}}catch(d){o={error:d}}finally{try{l&&!l.done&&(a=c.return)&&a.call(c)}finally{if(o)throw o.error}}},function(){for(;i.length>0;)n.next(i.shift());n.complete()}))})}Sc.bufferToggle=Uee});var B2=m(H0=>{"use strict";Object.defineProperty(H0,"__esModule",{value:!0});H0.bufferWhen=void 0;var jee=K(),zee=wt(),L2=te(),Hee=ue();function Gee(r){return jee.operate(function(e,t){var n=null,i=null,s=function(){i?.unsubscribe();var o=n;n=[],o&&t.next(o),Hee.innerFrom(r()).subscribe(i=L2.createOperatorSubscriber(t,s,zee.noop))};s(),e.subscribe(L2.createOperatorSubscriber(t,function(o){return n?.push(o)},function(){n&&t.next(n),t.complete()},void 0,function(){return n=i=null}))})}H0.bufferWhen=Gee});var U2=m(G0=>{"use strict";Object.defineProperty(G0,"__esModule",{value:!0});G0.catchError=void 0;var Vee=ue(),Wee=te(),Kee=K();function F2(r){return Kee.operate(function(e,t){var n=null,i=!1,s;n=e.subscribe(Wee.createOperatorSubscriber(t,void 0,void 0,function(o){s=Vee.innerFrom(r(o,F2(r)(e))),n?(n.unsubscribe(),n=null,s.subscribe(t)):i=!0})),i&&(n.unsubscribe(),n=null,s.subscribe(t))})}G0.catchError=F2});var Ow=m(V0=>{"use strict";Object.defineProperty(V0,"__esModule",{value:!0});V0.scanInternals=void 0;var Qee=te();function Jee(r,e,t,n,i){return function(s,o){var a=t,c=e,l=0;s.subscribe(Qee.createOperatorSubscriber(o,function(u){var d=l++;c=a?r(c,u,d):(a=!0,u),n&&o.next(c)},i&&function(){a&&o.next(c),o.complete()}))}}V0.scanInternals=Jee});var Tc=m(W0=>{"use strict";Object.defineProperty(W0,"__esModule",{value:!0});W0.reduce=void 0;var $ee=Ow(),Yee=K();function Zee(r,e){return Yee.operate($ee.scanInternals(r,e,arguments.length>=2,!1,!0))}W0.reduce=Zee});var Iw=m(K0=>{"use strict";Object.defineProperty(K0,"__esModule",{value:!0});K0.toArray=void 0;var Xee=Tc(),ete=K(),tte=function(r,e){return r.push(e),r};function rte(){return ete.operate(function(r,e){Xee.reduce(tte,[])(r).subscribe(e)})}K0.toArray=rte});var Pw=m(Q0=>{"use strict";Object.defineProperty(Q0,"__esModule",{value:!0});Q0.joinAllInternals=void 0;var nte=Et(),ite=rs(),ste=wu(),ote=si(),ate=Iw();function cte(r,e){return ste.pipe(ate.toArray(),ote.mergeMap(function(t){return r(t)}),e?ite.mapOneOrManyArgs(e):nte.identity)}Q0.joinAllInternals=cte});var kw=m(J0=>{"use strict";Object.defineProperty(J0,"__esModule",{value:!0});J0.combineLatestAll=void 0;var lte=m0(),ute=Pw();function dte(r){return ute.joinAllInternals(lte.combineLatest,r)}J0.combineLatestAll=dte});var j2=m($0=>{"use strict";Object.defineProperty($0,"__esModule",{value:!0});$0.combineAll=void 0;var fte=kw();$0.combineAll=fte.combineLatestAll});var V2=m(os=>{"use strict";var z2=os&&os.__read||function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,s=[],o;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(o)throw o.error}}return s},H2=os&&os.__spreadArray||function(r,e){for(var t=0,n=e.length,i=r.length;t<n;t++,i++)r[i]=e[t];return r};Object.defineProperty(os,"__esModule",{value:!0});os.combineLatest=void 0;var hte=m0(),pte=K(),mte=Ao(),gte=rs(),yte=wu(),vte=nr();function G2(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var t=vte.popResultSelector(r);return t?yte.pipe(G2.apply(void 0,H2([],z2(r))),gte.mapOneOrManyArgs(t)):pte.operate(function(n,i){hte.combineLatestInit(H2([n],z2(mte.argsOrArgArray(r))))(i)})}os.combineLatest=G2});var W2=m(as=>{"use strict";var bte=as&&as.__read||function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,s=[],o;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(o)throw o.error}}return s},_te=as&&as.__spreadArray||function(r,e){for(var t=0,n=e.length,i=r.length;t<n;t++,i++)r[i]=e[t];return r};Object.defineProperty(as,"__esModule",{value:!0});as.combineLatestWith=void 0;var Ate=V2();function wte(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];return Ate.combineLatest.apply(void 0,_te([],bte(r)))}as.combineLatestWith=wte});var Rw=m(Y0=>{"use strict";Object.defineProperty(Y0,"__esModule",{value:!0});Y0.concatMap=void 0;var K2=si(),Ete=Ce();function Ste(r,e){return Ete.isFunction(e)?K2.mergeMap(r,e,1):K2.mergeMap(r,1)}Y0.concatMap=Ste});var J2=m(Z0=>{"use strict";Object.defineProperty(Z0,"__esModule",{value:!0});Z0.concatMapTo=void 0;var Q2=Rw(),Tte=Ce();function Cte(r,e){return Tte.isFunction(e)?Q2.concatMap(function(){return r},e):Q2.concatMap(function(){return r})}Z0.concatMapTo=Cte});var $2=m(cs=>{"use strict";var xte=cs&&cs.__read||function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,s=[],o;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(o)throw o.error}}return s},Ote=cs&&cs.__spreadArray||function(r,e){for(var t=0,n=e.length,i=r.length;t<n;t++,i++)r[i]=e[t];return r};Object.defineProperty(cs,"__esModule",{value:!0});cs.concat=void 0;var Ite=K(),Pte=A0(),kte=nr(),Rte=ni();function Nte(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var t=kte.popScheduler(r);return Ite.operate(function(n,i){Pte.concatAll()(Rte.from(Ote([n],xte(r)),t)).subscribe(i)})}cs.concat=Nte});var Y2=m(ls=>{"use strict";var Mte=ls&&ls.__read||function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,s=[],o;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(o)throw o.error}}return s},Dte=ls&&ls.__spreadArray||function(r,e){for(var t=0,n=e.length,i=r.length;t<n;t++,i++)r[i]=e[t];return r};Object.defineProperty(ls,"__esModule",{value:!0});ls.concatWith=void 0;var qte=$2();function Lte(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];return qte.concat.apply(void 0,Dte([],Mte(r)))}ls.concatWith=Lte});var Z2=m(X0=>{"use strict";Object.defineProperty(X0,"__esModule",{value:!0});X0.fromSubscribable=void 0;var Bte=Pe();function Fte(r){return new Bte.Observable(function(e){return r.subscribe(e)})}X0.fromSubscribable=Fte});var tm=m(em=>{"use strict";Object.defineProperty(em,"__esModule",{value:!0});em.connect=void 0;var Ute=St(),jte=ue(),zte=K(),Hte=Z2(),Gte={connector:function(){return new Ute.Subject}};function Vte(r,e){e===void 0&&(e=Gte);var t=e.connector;return zte.operate(function(n,i){var s=t();jte.innerFrom(r(Hte.fromSubscribable(s))).subscribe(i),i.add(n.subscribe(s))})}em.connect=Vte});var X2=m(rm=>{"use strict";Object.defineProperty(rm,"__esModule",{value:!0});rm.count=void 0;var Wte=Tc();function Kte(r){return Wte.reduce(function(e,t,n){return!r||r(t,n)?e+1:e},0)}rm.count=Kte});var t3=m(nm=>{"use strict";Object.defineProperty(nm,"__esModule",{value:!0});nm.debounce=void 0;var Qte=K(),Jte=wt(),e3=te(),$te=ue();function Yte(r){return Qte.operate(function(e,t){var n=!1,i=null,s=null,o=function(){if(s?.unsubscribe(),s=null,n){n=!1;var a=i;i=null,t.next(a)}};e.subscribe(e3.createOperatorSubscriber(t,function(a){s?.unsubscribe(),n=!0,i=a,s=e3.createOperatorSubscriber(t,o,Jte.noop),$te.innerFrom(r(a)).subscribe(s)},function(){o(),t.complete()},void 0,function(){i=s=null}))})}nm.debounce=Yte});var r3=m(im=>{"use strict";Object.defineProperty(im,"__esModule",{value:!0});im.debounceTime=void 0;var Zte=rr(),Xte=K(),ere=te();function tre(r,e){return e===void 0&&(e=Zte.asyncScheduler),Xte.operate(function(t,n){var i=null,s=null,o=null,a=function(){if(i){i.unsubscribe(),i=null;var l=s;s=null,n.next(l)}};function c(){var l=o+r,u=e.now();if(u<l){i=this.schedule(void 0,l-u),n.add(i);return}a()}t.subscribe(ere.createOperatorSubscriber(n,function(l){s=l,o=e.now(),i||(i=e.schedule(c,r),n.add(i))},function(){a(),n.complete()},void 0,function(){s=i=null}))})}im.debounceTime=tre});var Ru=m(sm=>{"use strict";Object.defineProperty(sm,"__esModule",{value:!0});sm.defaultIfEmpty=void 0;var rre=K(),nre=te();function ire(r){return rre.operate(function(e,t){var n=!1;e.subscribe(nre.createOperatorSubscriber(t,function(i){n=!0,t.next(i)},function(){n||t.next(r),t.complete()}))})}sm.defaultIfEmpty=ire});var Nu=m(om=>{"use strict";Object.defineProperty(om,"__esModule",{value:!0});om.take=void 0;var sre=$r(),ore=K(),are=te();function cre(r){return r<=0?function(){return sre.EMPTY}:ore.operate(function(e,t){var n=0;e.subscribe(are.createOperatorSubscriber(t,function(i){++n<=r&&(t.next(i),r<=n&&t.complete())}))})}om.take=cre});var Nw=m(am=>{"use strict";Object.defineProperty(am,"__esModule",{value:!0});am.ignoreElements=void 0;var lre=K(),ure=te(),dre=wt();function fre(){return lre.operate(function(r,e){r.subscribe(ure.createOperatorSubscriber(e,dre.noop))})}am.ignoreElements=fre});var Mw=m(cm=>{"use strict";Object.defineProperty(cm,"__esModule",{value:!0});cm.mapTo=void 0;var hre=es();function pre(r){return hre.map(function(){return r})}cm.mapTo=pre});var Dw=m(lm=>{"use strict";Object.defineProperty(lm,"__esModule",{value:!0});lm.delayWhen=void 0;var mre=Pu(),n3=Nu(),gre=Nw(),yre=Mw(),vre=si(),bre=ue();function i3(r,e){return e?function(t){return mre.concat(e.pipe(n3.take(1),gre.ignoreElements()),t.pipe(i3(r)))}:vre.mergeMap(function(t,n){return bre.innerFrom(r(t,n)).pipe(n3.take(1),yre.mapTo(t))})}lm.delayWhen=i3});var s3=m(um=>{"use strict";Object.defineProperty(um,"__esModule",{value:!0});um.delay=void 0;var _re=rr(),Are=Dw(),wre=is();function Ere(r,e){e===void 0&&(e=_re.asyncScheduler);var t=wre.timer(r,e);return Are.delayWhen(function(){return t})}um.delay=Ere});var o3=m(dm=>{"use strict";Object.defineProperty(dm,"__esModule",{value:!0});dm.dematerialize=void 0;var Sre=Xp(),Tre=K(),Cre=te();function xre(){return Tre.operate(function(r,e){r.subscribe(Cre.createOperatorSubscriber(e,function(t){return Sre.observeNotification(t,e)}))})}dm.dematerialize=xre});var c3=m(fm=>{"use strict";Object.defineProperty(fm,"__esModule",{value:!0});fm.distinct=void 0;var Ore=K(),a3=te(),Ire=wt(),Pre=ue();function kre(r,e){return Ore.operate(function(t,n){var i=new Set;t.subscribe(a3.createOperatorSubscriber(n,function(s){var o=r?r(s):s;i.has(o)||(i.add(o),n.next(s))})),e&&Pre.innerFrom(e).subscribe(a3.createOperatorSubscriber(n,function(){return i.clear()},Ire.noop))})}fm.distinct=kre});var qw=m(hm=>{"use strict";Object.defineProperty(hm,"__esModule",{value:!0});hm.distinctUntilChanged=void 0;var Rre=Et(),Nre=K(),Mre=te();function Dre(r,e){return e===void 0&&(e=Rre.identity),r=r??qre,Nre.operate(function(t,n){var i,s=!0;t.subscribe(Mre.createOperatorSubscriber(n,function(o){var a=e(o);(s||!r(i,a))&&(s=!1,i=a,n.next(o))}))})}hm.distinctUntilChanged=Dre;function qre(r,e){return r===e}});var l3=m(pm=>{"use strict";Object.defineProperty(pm,"__esModule",{value:!0});pm.distinctUntilKeyChanged=void 0;var Lre=qw();function Bre(r,e){return Lre.distinctUntilChanged(function(t,n){return e?e(t[r],n[r]):t[r]===n[r]})}pm.distinctUntilKeyChanged=Bre});var Mu=m(mm=>{"use strict";Object.defineProperty(mm,"__esModule",{value:!0});mm.throwIfEmpty=void 0;var Fre=Xi(),Ure=K(),jre=te();function zre(r){return r===void 0&&(r=Hre),Ure.operate(function(e,t){var n=!1;e.subscribe(jre.createOperatorSubscriber(t,function(i){n=!0,t.next(i)},function(){return n?t.complete():t.error(r())}))})}mm.throwIfEmpty=zre;function Hre(){return new Fre.EmptyError}});var d3=m(gm=>{"use strict";Object.defineProperty(gm,"__esModule",{value:!0});gm.elementAt=void 0;var u3=hw(),Gre=wo(),Vre=Mu(),Wre=Ru(),Kre=Nu();function Qre(r,e){if(r<0)throw new u3.ArgumentOutOfRangeError;var t=arguments.length>=2;return function(n){return n.pipe(Gre.filter(function(i,s){return s===r}),Kre.take(1),t?Wre.defaultIfEmpty(e):Vre.throwIfEmpty(function(){return new u3.ArgumentOutOfRangeError}))}}gm.elementAt=Qre});var f3=m(us=>{"use strict";var Jre=us&&us.__read||function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,s=[],o;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(o)throw o.error}}return s},$re=us&&us.__spreadArray||function(r,e){for(var t=0,n=e.length,i=r.length;t<n;t++,i++)r[i]=e[t];return r};Object.defineProperty(us,"__esModule",{value:!0});us.endWith=void 0;var Yre=Pu(),Zre=Yp();function Xre(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];return function(t){return Yre.concat(t,Zre.of.apply(void 0,$re([],Jre(r))))}}us.endWith=Xre});var h3=m(ym=>{"use strict";Object.defineProperty(ym,"__esModule",{value:!0});ym.every=void 0;var ene=K(),tne=te();function rne(r,e){return ene.operate(function(t,n){var i=0;t.subscribe(tne.createOperatorSubscriber(n,function(s){r.call(e,s,i++,t)||(n.next(!1),n.complete())},function(){n.next(!0),n.complete()}))})}ym.every=rne});var Lw=m(vm=>{"use strict";Object.defineProperty(vm,"__esModule",{value:!0});vm.exhaustMap=void 0;var nne=es(),p3=ue(),ine=K(),m3=te();function g3(r,e){return e?function(t){return t.pipe(g3(function(n,i){return p3.innerFrom(r(n,i)).pipe(nne.map(function(s,o){return e(n,s,i,o)}))}))}:ine.operate(function(t,n){var i=0,s=null,o=!1;t.subscribe(m3.createOperatorSubscriber(n,function(a){s||(s=m3.createOperatorSubscriber(n,void 0,function(){s=null,o&&n.complete()}),p3.innerFrom(r(a,i++)).subscribe(s))},function(){o=!0,!s&&n.complete()}))})}vm.exhaustMap=g3});var Bw=m(bm=>{"use strict";Object.defineProperty(bm,"__esModule",{value:!0});bm.exhaustAll=void 0;var sne=Lw(),one=Et();function ane(){return sne.exhaustMap(one.identity)}bm.exhaustAll=ane});var y3=m(_m=>{"use strict";Object.defineProperty(_m,"__esModule",{value:!0});_m.exhaust=void 0;var cne=Bw();_m.exhaust=cne.exhaustAll});var v3=m(Am=>{"use strict";Object.defineProperty(Am,"__esModule",{value:!0});Am.expand=void 0;var lne=K(),une=y0();function dne(r,e,t){return e===void 0&&(e=1/0),e=(e||0)<1?1/0:e,lne.operate(function(n,i){return une.mergeInternals(n,i,r,e,void 0,!0,t)})}Am.expand=dne});var b3=m(wm=>{"use strict";Object.defineProperty(wm,"__esModule",{value:!0});wm.finalize=void 0;var fne=K();function hne(r){return fne.operate(function(e,t){try{e.subscribe(t)}finally{t.add(r)}})}wm.finalize=hne});var Fw=m(Cc=>{"use strict";Object.defineProperty(Cc,"__esModule",{value:!0});Cc.createFind=Cc.find=void 0;var pne=K(),mne=te();function gne(r,e){return pne.operate(_3(r,e,"value"))}Cc.find=gne;function _3(r,e,t){var n=t==="index";return function(i,s){var o=0;i.subscribe(mne.createOperatorSubscriber(s,function(a){var c=o++;r.call(e,a,c,i)&&(s.next(n?c:a),s.complete())},function(){s.next(n?-1:void 0),s.complete()}))}}Cc.createFind=_3});var A3=m(Em=>{"use strict";Object.defineProperty(Em,"__esModule",{value:!0});Em.findIndex=void 0;var yne=K(),vne=Fw();function bne(r,e){return yne.operate(vne.createFind(r,e,"index"))}Em.findIndex=bne});var w3=m(Sm=>{"use strict";Object.defineProperty(Sm,"__esModule",{value:!0});Sm.first=void 0;var _ne=Xi(),Ane=wo(),wne=Nu(),Ene=Ru(),Sne=Mu(),Tne=Et();function Cne(r,e){var t=arguments.length>=2;return function(n){return n.pipe(r?Ane.filter(function(i,s){return r(i,s,n)}):Tne.identity,wne.take(1),t?Ene.defaultIfEmpty(e):Sne.throwIfEmpty(function(){return new _ne.EmptyError}))}}Sm.first=Cne});var S3=m(Tm=>{"use strict";Object.defineProperty(Tm,"__esModule",{value:!0});Tm.groupBy=void 0;var xne=Pe(),One=ue(),Ine=St(),Pne=K(),E3=te();function kne(r,e,t,n){return Pne.operate(function(i,s){var o;!e||typeof e=="function"?o=e:(t=e.duration,o=e.element,n=e.connector);var a=new Map,c=function(g){a.forEach(g),g(s)},l=function(g){return c(function(p){return p.error(g)})},u=0,d=!1,f=new E3.OperatorSubscriber(s,function(g){try{var p=r(g),b=a.get(p);if(!b){a.set(p,b=n?n():new Ine.Subject);var y=h(p,b);if(s.next(y),t){var A=E3.createOperatorSubscriber(b,function(){b.complete(),A?.unsubscribe()},void 0,void 0,function(){return a.delete(p)});f.add(One.innerFrom(t(y)).subscribe(A))}}b.next(o?o(g):g)}catch(E){l(E)}},function(){return c(function(g){return g.complete()})},l,function(){return a.clear()},function(){return d=!0,u===0});i.subscribe(f);function h(g,p){var b=new xne.Observable(function(y){u++;var A=p.subscribe(y);return function(){A.unsubscribe(),--u===0&&d&&f.unsubscribe()}});return b.key=g,b}})}Tm.groupBy=kne});var T3=m(Cm=>{"use strict";Object.defineProperty(Cm,"__esModule",{value:!0});Cm.isEmpty=void 0;var Rne=K(),Nne=te();function Mne(){return Rne.operate(function(r,e){r.subscribe(Nne.createOperatorSubscriber(e,function(){e.next(!1),e.complete()},function(){e.next(!0),e.complete()}))})}Cm.isEmpty=Mne});var Uw=m(xc=>{"use strict";var Dne=xc&&xc.__values||function(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(xc,"__esModule",{value:!0});xc.takeLast=void 0;var qne=$r(),Lne=K(),Bne=te();function Fne(r){return r<=0?function(){return qne.EMPTY}:Lne.operate(function(e,t){var n=[];e.subscribe(Bne.createOperatorSubscriber(t,function(i){n.push(i),r<n.length&&n.shift()},function(){var i,s;try{for(var o=Dne(n),a=o.next();!a.done;a=o.next()){var c=a.value;t.next(c)}}catch(l){i={error:l}}finally{try{a&&!a.done&&(s=o.return)&&s.call(o)}finally{if(i)throw i.error}}t.complete()},void 0,function(){n=null}))})}xc.takeLast=Fne});var C3=m(xm=>{"use strict";Object.defineProperty(xm,"__esModule",{value:!0});xm.last=void 0;var Une=Xi(),jne=wo(),zne=Uw(),Hne=Mu(),Gne=Ru(),Vne=Et();function Wne(r,e){var t=arguments.length>=2;return function(n){return n.pipe(r?jne.filter(function(i,s){return r(i,s,n)}):Vne.identity,zne.takeLast(1),t?Gne.defaultIfEmpty(e):Hne.throwIfEmpty(function(){return new Une.EmptyError}))}}xm.last=Wne});var x3=m(Om=>{"use strict";Object.defineProperty(Om,"__esModule",{value:!0});Om.materialize=void 0;var jw=Xp(),Kne=K(),Qne=te();function Jne(){return Kne.operate(function(r,e){r.subscribe(Qne.createOperatorSubscriber(e,function(t){e.next(jw.Notification.createNext(t))},function(){e.next(jw.Notification.createComplete()),e.complete()},function(t){e.next(jw.Notification.createError(t)),e.complete()}))})}Om.materialize=Jne});var O3=m(Im=>{"use strict";Object.defineProperty(Im,"__esModule",{value:!0});Im.max=void 0;var $ne=Tc(),Yne=Ce();function Zne(r){return $ne.reduce(Yne.isFunction(r)?function(e,t){return r(e,t)>0?e:t}:function(e,t){return e>t?e:t})}Im.max=Zne});var I3=m(Pm=>{"use strict";Object.defineProperty(Pm,"__esModule",{value:!0});Pm.flatMap=void 0;var Xne=si();Pm.flatMap=Xne.mergeMap});var k3=m(km=>{"use strict";Object.defineProperty(km,"__esModule",{value:!0});km.mergeMapTo=void 0;var P3=si(),eie=Ce();function tie(r,e,t){return t===void 0&&(t=1/0),eie.isFunction(e)?P3.mergeMap(function(){return r},e,t):(typeof e=="number"&&(t=e),P3.mergeMap(function(){return r},t))}km.mergeMapTo=tie});var R3=m(Rm=>{"use strict";Object.defineProperty(Rm,"__esModule",{value:!0});Rm.mergeScan=void 0;var rie=K(),nie=y0();function iie(r,e,t){return t===void 0&&(t=1/0),rie.operate(function(n,i){var s=e;return nie.mergeInternals(n,i,function(o,a){return r(s,o,a)},t,function(o){s=o},!1,void 0,function(){return s=null})})}Rm.mergeScan=iie});var M3=m(ds=>{"use strict";var sie=ds&&ds.__read||function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,s=[],o;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(o)throw o.error}}return s},oie=ds&&ds.__spreadArray||function(r,e){for(var t=0,n=e.length,i=r.length;t<n;t++,i++)r[i]=e[t];return r};Object.defineProperty(ds,"__esModule",{value:!0});ds.merge=void 0;var aie=K(),cie=Ao(),lie=Iu(),N3=nr(),uie=ni();function die(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var t=N3.popScheduler(r),n=N3.popNumber(r,1/0);return r=cie.argsOrArgArray(r),aie.operate(function(i,s){lie.mergeAll(n)(uie.from(oie([i],sie(r)),t)).subscribe(s)})}ds.merge=die});var D3=m(fs=>{"use strict";var fie=fs&&fs.__read||function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,s=[],o;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(o)throw o.error}}return s},hie=fs&&fs.__spreadArray||function(r,e){for(var t=0,n=e.length,i=r.length;t<n;t++,i++)r[i]=e[t];return r};Object.defineProperty(fs,"__esModule",{value:!0});fs.mergeWith=void 0;var pie=M3();function mie(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];return pie.merge.apply(void 0,hie([],fie(r)))}fs.mergeWith=mie});var q3=m(Nm=>{"use strict";Object.defineProperty(Nm,"__esModule",{value:!0});Nm.min=void 0;var gie=Tc(),yie=Ce();function vie(r){return gie.reduce(yie.isFunction(r)?function(e,t){return r(e,t)<0?e:t}:function(e,t){return e<t?e:t})}Nm.min=vie});var Dm=m(Mm=>{"use strict";Object.defineProperty(Mm,"__esModule",{value:!0});Mm.multicast=void 0;var bie=Eu(),L3=Ce(),_ie=tm();function Aie(r,e){var t=L3.isFunction(r)?r:function(){return r};return L3.isFunction(e)?_ie.connect(e,{connector:t}):function(n){return new bie.ConnectableObservable(n,t)}}Mm.multicast=Aie});var F3=m(kn=>{"use strict";var wie=kn&&kn.__read||function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,s=[],o;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(o)throw o.error}}return s},Eie=kn&&kn.__spreadArray||function(r,e){for(var t=0,n=e.length,i=r.length;t<n;t++,i++)r[i]=e[t];return r};Object.defineProperty(kn,"__esModule",{value:!0});kn.onErrorResumeNext=kn.onErrorResumeNextWith=void 0;var Sie=Ao(),Tie=Ew();function B3(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var t=Sie.argsOrArgArray(r);return function(n){return Tie.onErrorResumeNext.apply(void 0,Eie([n],wie(t)))}}kn.onErrorResumeNextWith=B3;kn.onErrorResumeNext=B3});var U3=m(qm=>{"use strict";Object.defineProperty(qm,"__esModule",{value:!0});qm.pairwise=void 0;var Cie=K(),xie=te();function Oie(){return Cie.operate(function(r,e){var t,n=!1;r.subscribe(xie.createOperatorSubscriber(e,function(i){var s=t;t=i,n&&e.next([s,i]),n=!0}))})}qm.pairwise=Oie});var j3=m(Lm=>{"use strict";Object.defineProperty(Lm,"__esModule",{value:!0});Lm.pluck=void 0;var Iie=es();function Pie(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var t=r.length;if(t===0)throw new Error("list of properties cannot be empty.");return Iie.map(function(n){for(var i=n,s=0;s<t;s++){var o=i?.[r[s]];if(typeof o<"u")i=o;else return}return i})}Lm.pluck=Pie});var z3=m(Bm=>{"use strict";Object.defineProperty(Bm,"__esModule",{value:!0});Bm.publish=void 0;var kie=St(),Rie=Dm(),Nie=tm();function Mie(r){return r?function(e){return Nie.connect(r)(e)}:function(e){return Rie.multicast(new kie.Subject)(e)}}Bm.publish=Mie});var H3=m(Fm=>{"use strict";Object.defineProperty(Fm,"__esModule",{value:!0});Fm.publishBehavior=void 0;var Die=$A(),qie=Eu();function Lie(r){return function(e){var t=new Die.BehaviorSubject(r);return new qie.ConnectableObservable(e,function(){return t})}}Fm.publishBehavior=Lie});var G3=m(Um=>{"use strict";Object.defineProperty(Um,"__esModule",{value:!0});Um.publishLast=void 0;var Bie=xp(),Fie=Eu();function Uie(){return function(r){var e=new Bie.AsyncSubject;return new Fie.ConnectableObservable(r,function(){return e})}}Um.publishLast=Uie});var W3=m(jm=>{"use strict";Object.defineProperty(jm,"__esModule",{value:!0});jm.publishReplay=void 0;var jie=Cp(),zie=Dm(),V3=Ce();function Hie(r,e,t,n){t&&!V3.isFunction(t)&&(n=t);var i=V3.isFunction(t)?t:void 0;return function(s){return zie.multicast(new jie.ReplaySubject(r,e,n),i)(s)}}jm.publishReplay=Hie});var K3=m(hs=>{"use strict";var Gie=hs&&hs.__read||function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,s=[],o;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(o)throw o.error}}return s},Vie=hs&&hs.__spreadArray||function(r,e){for(var t=0,n=e.length,i=r.length;t<n;t++,i++)r[i]=e[t];return r};Object.defineProperty(hs,"__esModule",{value:!0});hs.raceWith=void 0;var Wie=Sw(),Kie=K(),Qie=Et();function Jie(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];return r.length?Kie.operate(function(t,n){Wie.raceInit(Vie([t],Gie(r)))(n)}):Qie.identity}hs.raceWith=Jie});var J3=m(zm=>{"use strict";Object.defineProperty(zm,"__esModule",{value:!0});zm.repeat=void 0;var $ie=$r(),Yie=K(),Q3=te(),Zie=ue(),Xie=is();function ese(r){var e,t=1/0,n;return r!=null&&(typeof r=="object"?(e=r.count,t=e===void 0?1/0:e,n=r.delay):t=r),t<=0?function(){return $ie.EMPTY}:Yie.operate(function(i,s){var o=0,a,c=function(){if(a?.unsubscribe(),a=null,n!=null){var u=typeof n=="number"?Xie.timer(n):Zie.innerFrom(n(o)),d=Q3.createOperatorSubscriber(s,function(){d.unsubscribe(),l()});u.subscribe(d)}else l()},l=function(){var u=!1;a=i.subscribe(Q3.createOperatorSubscriber(s,void 0,function(){++o<t?a?c():u=!0:s.complete()})),u&&c()};l()})}zm.repeat=ese});var Y3=m(Hm=>{"use strict";Object.defineProperty(Hm,"__esModule",{value:!0});Hm.repeatWhen=void 0;var tse=ue(),rse=St(),nse=K(),$3=te();function ise(r){return nse.operate(function(e,t){var n,i=!1,s,o=!1,a=!1,c=function(){return a&&o&&(t.complete(),!0)},l=function(){return s||(s=new rse.Subject,tse.innerFrom(r(s)).subscribe($3.createOperatorSubscriber(t,function(){n?u():i=!0},function(){o=!0,c()}))),s},u=function(){a=!1,n=e.subscribe($3.createOperatorSubscriber(t,void 0,function(){a=!0,!c()&&l().next()})),i&&(n.unsubscribe(),n=null,i=!1,u())};u()})}Hm.repeatWhen=ise});var X3=m(Gm=>{"use strict";Object.defineProperty(Gm,"__esModule",{value:!0});Gm.retry=void 0;var sse=K(),Z3=te(),ose=Et(),ase=is(),cse=ue();function lse(r){r===void 0&&(r=1/0);var e;r&&typeof r=="object"?e=r:e={count:r};var t=e.count,n=t===void 0?1/0:t,i=e.delay,s=e.resetOnSuccess,o=s===void 0?!1:s;return n<=0?ose.identity:sse.operate(function(a,c){var l=0,u,d=function(){var f=!1;u=a.subscribe(Z3.createOperatorSubscriber(c,function(h){o&&(l=0),c.next(h)},void 0,function(h){if(l++<n){var g=function(){u?(u.unsubscribe(),u=null,d()):f=!0};if(i!=null){var p=typeof i=="number"?ase.timer(i):cse.innerFrom(i(h,l)),b=Z3.createOperatorSubscriber(c,function(){b.unsubscribe(),g()},function(){c.complete()});p.subscribe(b)}else g()}else c.error(h)})),f&&(u.unsubscribe(),u=null,d())};d()})}Gm.retry=lse});var tD=m(Vm=>{"use strict";Object.defineProperty(Vm,"__esModule",{value:!0});Vm.retryWhen=void 0;var use=ue(),dse=St(),fse=K(),eD=te();function hse(r){return fse.operate(function(e,t){var n,i=!1,s,o=function(){n=e.subscribe(eD.createOperatorSubscriber(t,void 0,void 0,function(a){s||(s=new dse.Subject,use.innerFrom(r(s)).subscribe(eD.createOperatorSubscriber(t,function(){return n?o():i=!0}))),s&&s.next(a)})),i&&(n.unsubscribe(),n=null,i=!1,o())};o()})}Vm.retryWhen=hse});var zw=m(Wm=>{"use strict";Object.defineProperty(Wm,"__esModule",{value:!0});Wm.sample=void 0;var pse=ue(),mse=K(),gse=wt(),rD=te();function yse(r){return mse.operate(function(e,t){var n=!1,i=null;e.subscribe(rD.createOperatorSubscriber(t,function(s){n=!0,i=s})),pse.innerFrom(r).subscribe(rD.createOperatorSubscriber(t,function(){if(n){n=!1;var s=i;i=null,t.next(s)}},gse.noop))})}Wm.sample=yse});var nD=m(Km=>{"use strict";Object.defineProperty(Km,"__esModule",{value:!0});Km.sampleTime=void 0;var vse=rr(),bse=zw(),_se=Aw();function Ase(r,e){return e===void 0&&(e=vse.asyncScheduler),bse.sample(_se.interval(r,e))}Km.sampleTime=Ase});var iD=m(Qm=>{"use strict";Object.defineProperty(Qm,"__esModule",{value:!0});Qm.scan=void 0;var wse=K(),Ese=Ow();function Sse(r,e){return wse.operate(Ese.scanInternals(r,e,arguments.length>=2,!0))}Qm.scan=Sse});var oD=m(Jm=>{"use strict";Object.defineProperty(Jm,"__esModule",{value:!0});Jm.sequenceEqual=void 0;var Tse=K(),Cse=te(),xse=ue();function Ose(r,e){return e===void 0&&(e=function(t,n){return t===n}),Tse.operate(function(t,n){var i=sD(),s=sD(),o=function(c){n.next(c),n.complete()},a=function(c,l){var u=Cse.createOperatorSubscriber(n,function(d){var f=l.buffer,h=l.complete;f.length===0?h?o(!1):c.buffer.push(d):!e(d,f.shift())&&o(!1)},function(){c.complete=!0;var d=l.complete,f=l.buffer;d&&o(f.length===0),u?.unsubscribe()});return u};t.subscribe(a(i,s)),xse.innerFrom(r).subscribe(a(s,i))})}Jm.sequenceEqual=Ose;function sD(){return{buffer:[],complete:!1}}});var Gw=m(ps=>{"use strict";var Ise=ps&&ps.__read||function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,s=[],o;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(o)throw o.error}}return s},Pse=ps&&ps.__spreadArray||function(r,e){for(var t=0,n=e.length,i=r.length;t<n;t++,i++)r[i]=e[t];return r};Object.defineProperty(ps,"__esModule",{value:!0});ps.share=void 0;var aD=ue(),kse=St(),cD=$a(),Rse=K();function Nse(r){r===void 0&&(r={});var e=r.connector,t=e===void 0?function(){return new kse.Subject}:e,n=r.resetOnError,i=n===void 0?!0:n,s=r.resetOnComplete,o=s===void 0?!0:s,a=r.resetOnRefCountZero,c=a===void 0?!0:a;return function(l){var u,d,f,h=0,g=!1,p=!1,b=function(){d?.unsubscribe(),d=void 0},y=function(){b(),u=f=void 0,g=p=!1},A=function(){var E=u;y(),E?.unsubscribe()};return Rse.operate(function(E,C){h++,!p&&!g&&b();var k=f=f??t();C.add(function(){h--,h===0&&!p&&!g&&(d=Hw(A,c))}),k.subscribe(C),!u&&h>0&&(u=new cD.SafeSubscriber({next:function(I){return k.next(I)},error:function(I){p=!0,b(),d=Hw(y,i,I),k.error(I)},complete:function(){g=!0,b(),d=Hw(y,o),k.complete()}}),aD.innerFrom(E).subscribe(u))})(l)}}ps.share=Nse;function Hw(r,e){for(var t=[],n=2;n<arguments.length;n++)t[n-2]=arguments[n];if(e===!0){r();return}if(e!==!1){var i=new cD.SafeSubscriber({next:function(){i.unsubscribe(),r()}});return aD.innerFrom(e.apply(void 0,Pse([],Ise(t)))).subscribe(i)}}});var lD=m($m=>{"use strict";Object.defineProperty($m,"__esModule",{value:!0});$m.shareReplay=void 0;var Mse=Cp(),Dse=Gw();function qse(r,e,t){var n,i,s,o,a=!1;return r&&typeof r=="object"?(n=r.bufferSize,o=n===void 0?1/0:n,i=r.windowTime,e=i===void 0?1/0:i,s=r.refCount,a=s===void 0?!1:s,t=r.scheduler):o=r??1/0,Dse.share({connector:function(){return new Mse.ReplaySubject(o,e,t)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:a})}$m.shareReplay=qse});var uD=m(Ym=>{"use strict";Object.defineProperty(Ym,"__esModule",{value:!0});Ym.single=void 0;var Lse=Xi(),Bse=mw(),Fse=pw(),Use=K(),jse=te();function zse(r){return Use.operate(function(e,t){var n=!1,i,s=!1,o=0;e.subscribe(jse.createOperatorSubscriber(t,function(a){s=!0,(!r||r(a,o++,e))&&(n&&t.error(new Bse.SequenceError("Too many matching values")),n=!0,i=a)},function(){n?(t.next(i),t.complete()):t.error(s?new Fse.NotFoundError("No matching values"):new Lse.EmptyError)}))})}Ym.single=zse});var dD=m(Zm=>{"use strict";Object.defineProperty(Zm,"__esModule",{value:!0});Zm.skip=void 0;var Hse=wo();function Gse(r){return Hse.filter(function(e,t){return r<=t})}Zm.skip=Gse});var fD=m(Xm=>{"use strict";Object.defineProperty(Xm,"__esModule",{value:!0});Xm.skipLast=void 0;var Vse=Et(),Wse=K(),Kse=te();function Qse(r){return r<=0?Vse.identity:Wse.operate(function(e,t){var n=new Array(r),i=0;return e.subscribe(Kse.createOperatorSubscriber(t,function(s){var o=i++;if(o<r)n[o]=s;else{var a=o%r,c=n[a];n[a]=s,t.next(c)}})),function(){n=null}})}Xm.skipLast=Qse});var pD=m(eg=>{"use strict";Object.defineProperty(eg,"__esModule",{value:!0});eg.skipUntil=void 0;var Jse=K(),hD=te(),$se=ue(),Yse=wt();function Zse(r){return Jse.operate(function(e,t){var n=!1,i=hD.createOperatorSubscriber(t,function(){i?.unsubscribe(),n=!0},Yse.noop);$se.innerFrom(r).subscribe(i),e.subscribe(hD.createOperatorSubscriber(t,function(s){return n&&t.next(s)}))})}eg.skipUntil=Zse});var mD=m(tg=>{"use strict";Object.defineProperty(tg,"__esModule",{value:!0});tg.skipWhile=void 0;var Xse=K(),eoe=te();function toe(r){return Xse.operate(function(e,t){var n=!1,i=0;e.subscribe(eoe.createOperatorSubscriber(t,function(s){return(n||(n=!r(s,i++)))&&t.next(s)}))})}tg.skipWhile=toe});var yD=m(rg=>{"use strict";Object.defineProperty(rg,"__esModule",{value:!0});rg.startWith=void 0;var gD=Pu(),roe=nr(),noe=K();function ioe(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var t=roe.popScheduler(r);return noe.operate(function(n,i){(t?gD.concat(r,n,t):gD.concat(r,n)).subscribe(i)})}rg.startWith=ioe});var Du=m(ng=>{"use strict";Object.defineProperty(ng,"__esModule",{value:!0});ng.switchMap=void 0;var soe=ue(),ooe=K(),vD=te();function aoe(r,e){return ooe.operate(function(t,n){var i=null,s=0,o=!1,a=function(){return o&&!i&&n.complete()};t.subscribe(vD.createOperatorSubscriber(n,function(c){i?.unsubscribe();var l=0,u=s++;soe.innerFrom(r(c,u)).subscribe(i=vD.createOperatorSubscriber(n,function(d){return n.next(e?e(c,d,u,l++):d)},function(){i=null,a()}))},function(){o=!0,a()}))})}ng.switchMap=aoe});var bD=m(ig=>{"use strict";Object.defineProperty(ig,"__esModule",{value:!0});ig.switchAll=void 0;var coe=Du(),loe=Et();function uoe(){return coe.switchMap(loe.identity)}ig.switchAll=uoe});var AD=m(sg=>{"use strict";Object.defineProperty(sg,"__esModule",{value:!0});sg.switchMapTo=void 0;var _D=Du(),doe=Ce();function foe(r,e){return doe.isFunction(e)?_D.switchMap(function(){return r},e):_D.switchMap(function(){return r})}sg.switchMapTo=foe});var wD=m(og=>{"use strict";Object.defineProperty(og,"__esModule",{value:!0});og.switchScan=void 0;var hoe=Du(),poe=K();function moe(r,e){return poe.operate(function(t,n){var i=e;return hoe.switchMap(function(s,o){return r(i,s,o)},function(s,o){return i=o,o})(t).subscribe(n),function(){i=null}})}og.switchScan=moe});var ED=m(ag=>{"use strict";Object.defineProperty(ag,"__esModule",{value:!0});ag.takeUntil=void 0;var goe=K(),yoe=te(),voe=ue(),boe=wt();function _oe(r){return goe.operate(function(e,t){voe.innerFrom(r).subscribe(yoe.createOperatorSubscriber(t,function(){return t.complete()},boe.noop)),!t.closed&&e.subscribe(t)})}ag.takeUntil=_oe});var SD=m(cg=>{"use strict";Object.defineProperty(cg,"__esModule",{value:!0});cg.takeWhile=void 0;var Aoe=K(),woe=te();function Eoe(r,e){return e===void 0&&(e=!1),Aoe.operate(function(t,n){var i=0;t.subscribe(woe.createOperatorSubscriber(n,function(s){var o=r(s,i++);(o||e)&&n.next(s),!o&&n.complete()}))})}cg.takeWhile=Eoe});var TD=m(lg=>{"use strict";Object.defineProperty(lg,"__esModule",{value:!0});lg.tap=void 0;var Soe=Ce(),Toe=K(),Coe=te(),xoe=Et();function Ooe(r,e,t){var n=Soe.isFunction(r)||e||t?{next:r,error:e,complete:t}:r;return n?Toe.operate(function(i,s){var o;(o=n.subscribe)===null||o===void 0||o.call(n);var a=!0;i.subscribe(Coe.createOperatorSubscriber(s,function(c){var l;(l=n.next)===null||l===void 0||l.call(n,c),s.next(c)},function(){var c;a=!1,(c=n.complete)===null||c===void 0||c.call(n),s.complete()},function(c){var l;a=!1,(l=n.error)===null||l===void 0||l.call(n,c),s.error(c)},function(){var c,l;a&&((c=n.unsubscribe)===null||c===void 0||c.call(n)),(l=n.finalize)===null||l===void 0||l.call(n)}))}):xoe.identity}lg.tap=Ooe});var Vw=m(ug=>{"use strict";Object.defineProperty(ug,"__esModule",{value:!0});ug.throttle=void 0;var Ioe=K(),CD=te(),Poe=ue();function koe(r,e){return Ioe.operate(function(t,n){var i=e??{},s=i.leading,o=s===void 0?!0:s,a=i.trailing,c=a===void 0?!1:a,l=!1,u=null,d=null,f=!1,h=function(){d?.unsubscribe(),d=null,c&&(b(),f&&n.complete())},g=function(){d=null,f&&n.complete()},p=function(y){return d=Poe.innerFrom(r(y)).subscribe(CD.createOperatorSubscriber(n,h,g))},b=function(){if(l){l=!1;var y=u;u=null,n.next(y),!f&&p(y)}};t.subscribe(CD.createOperatorSubscriber(n,function(y){l=!0,u=y,!(d&&!d.closed)&&(o?b():p(y))},function(){f=!0,!(c&&l&&d&&!d.closed)&&n.complete()}))})}ug.throttle=koe});var xD=m(dg=>{"use strict";Object.defineProperty(dg,"__esModule",{value:!0});dg.throttleTime=void 0;var Roe=rr(),Noe=Vw(),Moe=is();function Doe(r,e,t){e===void 0&&(e=Roe.asyncScheduler);var n=Moe.timer(r,e);return Noe.throttle(function(){return n},t)}dg.throttleTime=Doe});var ID=m(Oc=>{"use strict";Object.defineProperty(Oc,"__esModule",{value:!0});Oc.TimeInterval=Oc.timeInterval=void 0;var qoe=rr(),Loe=K(),Boe=te();function Foe(r){return r===void 0&&(r=qoe.asyncScheduler),Loe.operate(function(e,t){var n=r.now();e.subscribe(Boe.createOperatorSubscriber(t,function(i){var s=r.now(),o=s-n;n=s,t.next(new OD(i,o))}))})}Oc.timeInterval=Foe;var OD=function(){function r(e,t){this.value=e,this.interval=t}return r}();Oc.TimeInterval=OD});var PD=m(fg=>{"use strict";Object.defineProperty(fg,"__esModule",{value:!0});fg.timeoutWith=void 0;var Uoe=rr(),joe=c0(),zoe=l0();function Hoe(r,e,t){var n,i,s;if(t=t??Uoe.async,joe.isValidDate(r)?n=r:typeof r=="number"&&(i=r),e)s=function(){return e};else throw new TypeError("No observable provided to switch to");if(n==null&&i==null)throw new TypeError("No timeout provided.");return zoe.timeout({first:n,each:i,scheduler:t,with:s})}fg.timeoutWith=Hoe});var kD=m(hg=>{"use strict";Object.defineProperty(hg,"__esModule",{value:!0});hg.timestamp=void 0;var Goe=Tp(),Voe=es();function Woe(r){return r===void 0&&(r=Goe.dateTimestampProvider),Voe.map(function(e){return{value:e,timestamp:r.now()}})}hg.timestamp=Woe});var MD=m(pg=>{"use strict";Object.defineProperty(pg,"__esModule",{value:!0});pg.window=void 0;var RD=St(),Koe=K(),ND=te(),Qoe=wt(),Joe=ue();function $oe(r){return Koe.operate(function(e,t){var n=new RD.Subject;t.next(n.asObservable());var i=function(s){n.error(s),t.error(s)};return e.subscribe(ND.createOperatorSubscriber(t,function(s){return n?.next(s)},function(){n.complete(),t.complete()},i)),Joe.innerFrom(r).subscribe(ND.createOperatorSubscriber(t,function(){n.complete(),t.next(n=new RD.Subject)},Qoe.noop,i)),function(){n?.unsubscribe(),n=null}})}pg.window=$oe});var qD=m(Ic=>{"use strict";var Yoe=Ic&&Ic.__values||function(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(Ic,"__esModule",{value:!0});Ic.windowCount=void 0;var DD=St(),Zoe=K(),Xoe=te();function eae(r,e){e===void 0&&(e=0);var t=e>0?e:r;return Zoe.operate(function(n,i){var s=[new DD.Subject],o=[],a=0;i.next(s[0].asObservable()),n.subscribe(Xoe.createOperatorSubscriber(i,function(c){var l,u;try{for(var d=Yoe(s),f=d.next();!f.done;f=d.next()){var h=f.value;h.next(c)}}catch(b){l={error:b}}finally{try{f&&!f.done&&(u=d.return)&&u.call(d)}finally{if(l)throw l.error}}var g=a-r+1;if(g>=0&&g%t===0&&s.shift().complete(),++a%t===0){var p=new DD.Subject;s.push(p),i.next(p.asObservable())}},function(){for(;s.length>0;)s.shift().complete();i.complete()},function(c){for(;s.length>0;)s.shift().error(c);i.error(c)},function(){o=null,s=null}))})}Ic.windowCount=eae});var BD=m(mg=>{"use strict";Object.defineProperty(mg,"__esModule",{value:!0});mg.windowTime=void 0;var tae=St(),rae=rr(),nae=pr(),iae=K(),sae=te(),oae=ti(),aae=nr(),LD=ri();function cae(r){for(var e,t,n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];var s=(e=aae.popScheduler(n))!==null&&e!==void 0?e:rae.asyncScheduler,o=(t=n[0])!==null&&t!==void 0?t:null,a=n[1]||1/0;return iae.operate(function(c,l){var u=[],d=!1,f=function(b){var y=b.window,A=b.subs;y.complete(),A.unsubscribe(),oae.arrRemove(u,b),d&&h()},h=function(){if(u){var b=new nae.Subscription;l.add(b);var y=new tae.Subject,A={window:y,subs:b,seen:0};u.push(A),l.next(y.asObservable()),LD.executeSchedule(b,s,function(){return f(A)},r)}};o!==null&&o>=0?LD.executeSchedule(l,s,h,o,!0):d=!0,h();var g=function(b){return u.slice().forEach(b)},p=function(b){g(function(y){var A=y.window;return b(A)}),b(l),l.unsubscribe()};return c.subscribe(sae.createOperatorSubscriber(l,function(b){g(function(y){y.window.next(b),a<=++y.seen&&f(y)})},function(){return p(function(b){return b.complete()})},function(b){return p(function(y){return y.error(b)})})),function(){u=null}})}mg.windowTime=cae});var jD=m(Pc=>{"use strict";var lae=Pc&&Pc.__values||function(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(Pc,"__esModule",{value:!0});Pc.windowToggle=void 0;var uae=St(),dae=pr(),fae=K(),FD=ue(),Ww=te(),UD=wt(),hae=ti();function pae(r,e){return fae.operate(function(t,n){var i=[],s=function(o){for(;0<i.length;)i.shift().error(o);n.error(o)};FD.innerFrom(r).subscribe(Ww.createOperatorSubscriber(n,function(o){var a=new uae.Subject;i.push(a);var c=new dae.Subscription,l=function(){hae.arrRemove(i,a),a.complete(),c.unsubscribe()},u;try{u=FD.innerFrom(e(o))}catch(d){s(d);return}n.next(a.asObservable()),c.add(u.subscribe(Ww.createOperatorSubscriber(n,l,UD.noop,s)))},UD.noop)),t.subscribe(Ww.createOperatorSubscriber(n,function(o){var a,c,l=i.slice();try{for(var u=lae(l),d=u.next();!d.done;d=u.next()){var f=d.value;f.next(o)}}catch(h){a={error:h}}finally{try{d&&!d.done&&(c=u.return)&&c.call(u)}finally{if(a)throw a.error}}},function(){for(;0<i.length;)i.shift().complete();n.complete()},s,function(){for(;0<i.length;)i.shift().unsubscribe()}))})}Pc.windowToggle=pae});var HD=m(gg=>{"use strict";Object.defineProperty(gg,"__esModule",{value:!0});gg.windowWhen=void 0;var mae=St(),gae=K(),zD=te(),yae=ue();function vae(r){return gae.operate(function(e,t){var n,i,s=function(a){n.error(a),t.error(a)},o=function(){i?.unsubscribe(),n?.complete(),n=new mae.Subject,t.next(n.asObservable());var a;try{a=yae.innerFrom(r())}catch(c){s(c);return}a.subscribe(i=zD.createOperatorSubscriber(t,o,o,s))};o(),e.subscribe(zD.createOperatorSubscriber(t,function(a){return n.next(a)},function(){n.complete(),t.complete()},s,function(){i?.unsubscribe(),n=null}))})}gg.windowWhen=vae});var KD=m(ms=>{"use strict";var GD=ms&&ms.__read||function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,s=[],o;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(o)throw o.error}}return s},VD=ms&&ms.__spreadArray||function(r,e){for(var t=0,n=e.length,i=r.length;t<n;t++,i++)r[i]=e[t];return r};Object.defineProperty(ms,"__esModule",{value:!0});ms.withLatestFrom=void 0;var bae=K(),WD=te(),_ae=ue(),Aae=Et(),wae=wt(),Eae=nr();function Sae(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];var t=Eae.popResultSelector(r);return bae.operate(function(n,i){for(var s=r.length,o=new Array(s),a=r.map(function(){return!1}),c=!1,l=function(d){_ae.innerFrom(r[d]).subscribe(WD.createOperatorSubscriber(i,function(f){o[d]=f,!c&&!a[d]&&(a[d]=!0,(c=a.every(Aae.identity))&&(a=null))},wae.noop))},u=0;u<s;u++)l(u);n.subscribe(WD.createOperatorSubscriber(i,function(d){if(c){var f=VD([d],GD(o));i.next(t?t.apply(void 0,VD([],GD(f))):f)}}))})}ms.withLatestFrom=Sae});var QD=m(yg=>{"use strict";Object.defineProperty(yg,"__esModule",{value:!0});yg.zipAll=void 0;var Tae=F0(),Cae=Pw();function xae(r){return Cae.joinAllInternals(Tae.zip,r)}yg.zipAll=xae});var JD=m(gs=>{"use strict";var Oae=gs&&gs.__read||function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,s=[],o;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(o)throw o.error}}return s},Iae=gs&&gs.__spreadArray||function(r,e){for(var t=0,n=e.length,i=r.length;t<n;t++,i++)r[i]=e[t];return r};Object.defineProperty(gs,"__esModule",{value:!0});gs.zip=void 0;var Pae=F0(),kae=K();function Rae(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];return kae.operate(function(t,n){Pae.zip.apply(void 0,Iae([t],Oae(r))).subscribe(n)})}gs.zip=Rae});var $D=m(ys=>{"use strict";var Nae=ys&&ys.__read||function(r,e){var t=typeof Symbol=="function"&&r[Symbol.iterator];if(!t)return r;var n=t.call(r),i,s=[],o;try{for(;(e===void 0||e-- >0)&&!(i=n.next()).done;)s.push(i.value)}catch(a){o={error:a}}finally{try{i&&!i.done&&(t=n.return)&&t.call(n)}finally{if(o)throw o.error}}return s},Mae=ys&&ys.__spreadArray||function(r,e){for(var t=0,n=e.length,i=r.length;t<n;t++,i++)r[i]=e[t];return r};Object.defineProperty(ys,"__esModule",{value:!0});ys.zipWith=void 0;var Dae=JD();function qae(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];return Dae.zip.apply(void 0,Mae([],Nae(r)))}ys.zipWith=qae});var nq=m(v=>{"use strict";var Lae=v&&v.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t),Object.defineProperty(r,n,{enumerable:!0,get:function(){return e[t]}})}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),Bae=v&&v.__exportStar||function(r,e){for(var t in r)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&Lae(e,r,t)};Object.defineProperty(v,"__esModule",{value:!0});v.interval=v.iif=v.generate=v.fromEventPattern=v.fromEvent=v.from=v.forkJoin=v.empty=v.defer=v.connectable=v.concat=v.combineLatest=v.bindNodeCallback=v.bindCallback=v.UnsubscriptionError=v.TimeoutError=v.SequenceError=v.ObjectUnsubscribedError=v.NotFoundError=v.EmptyError=v.ArgumentOutOfRangeError=v.firstValueFrom=v.lastValueFrom=v.isObservable=v.identity=v.noop=v.pipe=v.NotificationKind=v.Notification=v.Subscriber=v.Subscription=v.Scheduler=v.VirtualAction=v.VirtualTimeScheduler=v.animationFrameScheduler=v.animationFrame=v.queueScheduler=v.queue=v.asyncScheduler=v.async=v.asapScheduler=v.asap=v.AsyncSubject=v.ReplaySubject=v.BehaviorSubject=v.Subject=v.animationFrames=v.observable=v.ConnectableObservable=v.Observable=void 0;v.filter=v.expand=v.exhaustMap=v.exhaustAll=v.exhaust=v.every=v.endWith=v.elementAt=v.distinctUntilKeyChanged=v.distinctUntilChanged=v.distinct=v.dematerialize=v.delayWhen=v.delay=v.defaultIfEmpty=v.debounceTime=v.debounce=v.count=v.connect=v.concatWith=v.concatMapTo=v.concatMap=v.concatAll=v.combineLatestWith=v.combineLatestAll=v.combineAll=v.catchError=v.bufferWhen=v.bufferToggle=v.bufferTime=v.bufferCount=v.buffer=v.auditTime=v.audit=v.config=v.NEVER=v.EMPTY=v.scheduled=v.zip=v.using=v.timer=v.throwError=v.range=v.race=v.partition=v.pairs=v.onErrorResumeNext=v.of=v.never=v.merge=void 0;v.switchMap=v.switchAll=v.subscribeOn=v.startWith=v.skipWhile=v.skipUntil=v.skipLast=v.skip=v.single=v.shareReplay=v.share=v.sequenceEqual=v.scan=v.sampleTime=v.sample=v.refCount=v.retryWhen=v.retry=v.repeatWhen=v.repeat=v.reduce=v.raceWith=v.publishReplay=v.publishLast=v.publishBehavior=v.publish=v.pluck=v.pairwise=v.onErrorResumeNextWith=v.observeOn=v.multicast=v.min=v.mergeWith=v.mergeScan=v.mergeMapTo=v.mergeMap=v.flatMap=v.mergeAll=v.max=v.materialize=v.mapTo=v.map=v.last=v.isEmpty=v.ignoreElements=v.groupBy=v.first=v.findIndex=v.find=v.finalize=void 0;v.zipWith=v.zipAll=v.withLatestFrom=v.windowWhen=v.windowToggle=v.windowTime=v.windowCount=v.window=v.toArray=v.timestamp=v.timeoutWith=v.timeout=v.timeInterval=v.throwIfEmpty=v.throttleTime=v.throttle=v.tap=v.takeWhile=v.takeUntil=v.takeLast=v.take=v.switchScan=v.switchMapTo=void 0;var Fae=Pe();Object.defineProperty(v,"Observable",{enumerable:!0,get:function(){return Fae.Observable}});var Uae=Eu();Object.defineProperty(v,"ConnectableObservable",{enumerable:!0,get:function(){return Uae.ConnectableObservable}});var jae=Au();Object.defineProperty(v,"observable",{enumerable:!0,get:function(){return jae.observable}});var zae=tM();Object.defineProperty(v,"animationFrames",{enumerable:!0,get:function(){return zae.animationFrames}});var Hae=St();Object.defineProperty(v,"Subject",{enumerable:!0,get:function(){return Hae.Subject}});var Gae=$A();Object.defineProperty(v,"BehaviorSubject",{enumerable:!0,get:function(){return Gae.BehaviorSubject}});var Vae=Cp();Object.defineProperty(v,"ReplaySubject",{enumerable:!0,get:function(){return Vae.ReplaySubject}});var Wae=xp();Object.defineProperty(v,"AsyncSubject",{enumerable:!0,get:function(){return Wae.AsyncSubject}});var YD=vM();Object.defineProperty(v,"asap",{enumerable:!0,get:function(){return YD.asap}});Object.defineProperty(v,"asapScheduler",{enumerable:!0,get:function(){return YD.asapScheduler}});var ZD=rr();Object.defineProperty(v,"async",{enumerable:!0,get:function(){return ZD.async}});Object.defineProperty(v,"asyncScheduler",{enumerable:!0,get:function(){return ZD.asyncScheduler}});var XD=AM();Object.defineProperty(v,"queue",{enumerable:!0,get:function(){return XD.queue}});Object.defineProperty(v,"queueScheduler",{enumerable:!0,get:function(){return XD.queueScheduler}});var eq=TM();Object.defineProperty(v,"animationFrame",{enumerable:!0,get:function(){return eq.animationFrame}});Object.defineProperty(v,"animationFrameScheduler",{enumerable:!0,get:function(){return eq.animationFrameScheduler}});var tq=OM();Object.defineProperty(v,"VirtualTimeScheduler",{enumerable:!0,get:function(){return tq.VirtualTimeScheduler}});Object.defineProperty(v,"VirtualAction",{enumerable:!0,get:function(){return tq.VirtualAction}});var Kae=ZA();Object.defineProperty(v,"Scheduler",{enumerable:!0,get:function(){return Kae.Scheduler}});var Qae=pr();Object.defineProperty(v,"Subscription",{enumerable:!0,get:function(){return Qae.Subscription}});var Jae=$a();Object.defineProperty(v,"Subscriber",{enumerable:!0,get:function(){return Jae.Subscriber}});var rq=Xp();Object.defineProperty(v,"Notification",{enumerable:!0,get:function(){return rq.Notification}});Object.defineProperty(v,"NotificationKind",{enumerable:!0,get:function(){return rq.NotificationKind}});var $ae=wu();Object.defineProperty(v,"pipe",{enumerable:!0,get:function(){return $ae.pipe}});var Yae=wt();Object.defineProperty(v,"noop",{enumerable:!0,get:function(){return Yae.noop}});var Zae=Et();Object.defineProperty(v,"identity",{enumerable:!0,get:function(){return Zae.identity}});var Xae=VM();Object.defineProperty(v,"isObservable",{enumerable:!0,get:function(){return Xae.isObservable}});var ece=WM();Object.defineProperty(v,"lastValueFrom",{enumerable:!0,get:function(){return ece.lastValueFrom}});var tce=KM();Object.defineProperty(v,"firstValueFrom",{enumerable:!0,get:function(){return tce.firstValueFrom}});var rce=hw();Object.defineProperty(v,"ArgumentOutOfRangeError",{enumerable:!0,get:function(){return rce.ArgumentOutOfRangeError}});var nce=Xi();Object.defineProperty(v,"EmptyError",{enumerable:!0,get:function(){return nce.EmptyError}});var ice=pw();Object.defineProperty(v,"NotFoundError",{enumerable:!0,get:function(){return ice.NotFoundError}});var sce=WA();Object.defineProperty(v,"ObjectUnsubscribedError",{enumerable:!0,get:function(){return sce.ObjectUnsubscribedError}});var oce=mw();Object.defineProperty(v,"SequenceError",{enumerable:!0,get:function(){return oce.SequenceError}});var ace=l0();Object.defineProperty(v,"TimeoutError",{enumerable:!0,get:function(){return ace.TimeoutError}});var cce=NA();Object.defineProperty(v,"UnsubscriptionError",{enumerable:!0,get:function(){return cce.UnsubscriptionError}});var lce=JM();Object.defineProperty(v,"bindCallback",{enumerable:!0,get:function(){return lce.bindCallback}});var uce=$M();Object.defineProperty(v,"bindNodeCallback",{enumerable:!0,get:function(){return uce.bindNodeCallback}});var dce=m0();Object.defineProperty(v,"combineLatest",{enumerable:!0,get:function(){return dce.combineLatest}});var fce=Pu();Object.defineProperty(v,"concat",{enumerable:!0,get:function(){return fce.concat}});var hce=i2();Object.defineProperty(v,"connectable",{enumerable:!0,get:function(){return hce.connectable}});var pce=ku();Object.defineProperty(v,"defer",{enumerable:!0,get:function(){return pce.defer}});var mce=$r();Object.defineProperty(v,"empty",{enumerable:!0,get:function(){return mce.empty}});var gce=s2();Object.defineProperty(v,"forkJoin",{enumerable:!0,get:function(){return gce.forkJoin}});var yce=ni();Object.defineProperty(v,"from",{enumerable:!0,get:function(){return yce.from}});var vce=a2();Object.defineProperty(v,"fromEvent",{enumerable:!0,get:function(){return vce.fromEvent}});var bce=l2();Object.defineProperty(v,"fromEventPattern",{enumerable:!0,get:function(){return bce.fromEventPattern}});var _ce=d2();Object.defineProperty(v,"generate",{enumerable:!0,get:function(){return _ce.generate}});var Ace=f2();Object.defineProperty(v,"iif",{enumerable:!0,get:function(){return Ace.iif}});var wce=Aw();Object.defineProperty(v,"interval",{enumerable:!0,get:function(){return wce.interval}});var Ece=p2();Object.defineProperty(v,"merge",{enumerable:!0,get:function(){return Ece.merge}});var Sce=ww();Object.defineProperty(v,"never",{enumerable:!0,get:function(){return Sce.never}});var Tce=Yp();Object.defineProperty(v,"of",{enumerable:!0,get:function(){return Tce.of}});var Cce=Ew();Object.defineProperty(v,"onErrorResumeNext",{enumerable:!0,get:function(){return Cce.onErrorResumeNext}});var xce=g2();Object.defineProperty(v,"pairs",{enumerable:!0,get:function(){return xce.pairs}});var Oce=_2();Object.defineProperty(v,"partition",{enumerable:!0,get:function(){return Oce.partition}});var Ice=Sw();Object.defineProperty(v,"race",{enumerable:!0,get:function(){return Ice.race}});var Pce=E2();Object.defineProperty(v,"range",{enumerable:!0,get:function(){return Pce.range}});var kce=fw();Object.defineProperty(v,"throwError",{enumerable:!0,get:function(){return kce.throwError}});var Rce=is();Object.defineProperty(v,"timer",{enumerable:!0,get:function(){return Rce.timer}});var Nce=S2();Object.defineProperty(v,"using",{enumerable:!0,get:function(){return Nce.using}});var Mce=F0();Object.defineProperty(v,"zip",{enumerable:!0,get:function(){return Mce.zip}});var Dce=dw();Object.defineProperty(v,"scheduled",{enumerable:!0,get:function(){return Dce.scheduled}});var qce=$r();Object.defineProperty(v,"EMPTY",{enumerable:!0,get:function(){return qce.EMPTY}});var Lce=ww();Object.defineProperty(v,"NEVER",{enumerable:!0,get:function(){return Lce.NEVER}});Bae(C2(),v);var Bce=Qa();Object.defineProperty(v,"config",{enumerable:!0,get:function(){return Bce.config}});var Fce=Tw();Object.defineProperty(v,"audit",{enumerable:!0,get:function(){return Fce.audit}});var Uce=O2();Object.defineProperty(v,"auditTime",{enumerable:!0,get:function(){return Uce.auditTime}});var jce=P2();Object.defineProperty(v,"buffer",{enumerable:!0,get:function(){return jce.buffer}});var zce=k2();Object.defineProperty(v,"bufferCount",{enumerable:!0,get:function(){return zce.bufferCount}});var Hce=N2();Object.defineProperty(v,"bufferTime",{enumerable:!0,get:function(){return Hce.bufferTime}});var Gce=q2();Object.defineProperty(v,"bufferToggle",{enumerable:!0,get:function(){return Gce.bufferToggle}});var Vce=B2();Object.defineProperty(v,"bufferWhen",{enumerable:!0,get:function(){return Vce.bufferWhen}});var Wce=U2();Object.defineProperty(v,"catchError",{enumerable:!0,get:function(){return Wce.catchError}});var Kce=j2();Object.defineProperty(v,"combineAll",{enumerable:!0,get:function(){return Kce.combineAll}});var Qce=kw();Object.defineProperty(v,"combineLatestAll",{enumerable:!0,get:function(){return Qce.combineLatestAll}});var Jce=W2();Object.defineProperty(v,"combineLatestWith",{enumerable:!0,get:function(){return Jce.combineLatestWith}});var $ce=A0();Object.defineProperty(v,"concatAll",{enumerable:!0,get:function(){return $ce.concatAll}});var Yce=Rw();Object.defineProperty(v,"concatMap",{enumerable:!0,get:function(){return Yce.concatMap}});var Zce=J2();Object.defineProperty(v,"concatMapTo",{enumerable:!0,get:function(){return Zce.concatMapTo}});var Xce=Y2();Object.defineProperty(v,"concatWith",{enumerable:!0,get:function(){return Xce.concatWith}});var ele=tm();Object.defineProperty(v,"connect",{enumerable:!0,get:function(){return ele.connect}});var tle=X2();Object.defineProperty(v,"count",{enumerable:!0,get:function(){return tle.count}});var rle=t3();Object.defineProperty(v,"debounce",{enumerable:!0,get:function(){return rle.debounce}});var nle=r3();Object.defineProperty(v,"debounceTime",{enumerable:!0,get:function(){return nle.debounceTime}});var ile=Ru();Object.defineProperty(v,"defaultIfEmpty",{enumerable:!0,get:function(){return ile.defaultIfEmpty}});var sle=s3();Object.defineProperty(v,"delay",{enumerable:!0,get:function(){return sle.delay}});var ole=Dw();Object.defineProperty(v,"delayWhen",{enumerable:!0,get:function(){return ole.delayWhen}});var ale=o3();Object.defineProperty(v,"dematerialize",{enumerable:!0,get:function(){return ale.dematerialize}});var cle=c3();Object.defineProperty(v,"distinct",{enumerable:!0,get:function(){return cle.distinct}});var lle=qw();Object.defineProperty(v,"distinctUntilChanged",{enumerable:!0,get:function(){return lle.distinctUntilChanged}});var ule=l3();Object.defineProperty(v,"distinctUntilKeyChanged",{enumerable:!0,get:function(){return ule.distinctUntilKeyChanged}});var dle=d3();Object.defineProperty(v,"elementAt",{enumerable:!0,get:function(){return dle.elementAt}});var fle=f3();Object.defineProperty(v,"endWith",{enumerable:!0,get:function(){return fle.endWith}});var hle=h3();Object.defineProperty(v,"every",{enumerable:!0,get:function(){return hle.every}});var ple=y3();Object.defineProperty(v,"exhaust",{enumerable:!0,get:function(){return ple.exhaust}});var mle=Bw();Object.defineProperty(v,"exhaustAll",{enumerable:!0,get:function(){return mle.exhaustAll}});var gle=Lw();Object.defineProperty(v,"exhaustMap",{enumerable:!0,get:function(){return gle.exhaustMap}});var yle=v3();Object.defineProperty(v,"expand",{enumerable:!0,get:function(){return yle.expand}});var vle=wo();Object.defineProperty(v,"filter",{enumerable:!0,get:function(){return vle.filter}});var ble=b3();Object.defineProperty(v,"finalize",{enumerable:!0,get:function(){return ble.finalize}});var _le=Fw();Object.defineProperty(v,"find",{enumerable:!0,get:function(){return _le.find}});var Ale=A3();Object.defineProperty(v,"findIndex",{enumerable:!0,get:function(){return Ale.findIndex}});var wle=w3();Object.defineProperty(v,"first",{enumerable:!0,get:function(){return wle.first}});var Ele=S3();Object.defineProperty(v,"groupBy",{enumerable:!0,get:function(){return Ele.groupBy}});var Sle=Nw();Object.defineProperty(v,"ignoreElements",{enumerable:!0,get:function(){return Sle.ignoreElements}});var Tle=T3();Object.defineProperty(v,"isEmpty",{enumerable:!0,get:function(){return Tle.isEmpty}});var Cle=C3();Object.defineProperty(v,"last",{enumerable:!0,get:function(){return Cle.last}});var xle=es();Object.defineProperty(v,"map",{enumerable:!0,get:function(){return xle.map}});var Ole=Mw();Object.defineProperty(v,"mapTo",{enumerable:!0,get:function(){return Ole.mapTo}});var Ile=x3();Object.defineProperty(v,"materialize",{enumerable:!0,get:function(){return Ile.materialize}});var Ple=O3();Object.defineProperty(v,"max",{enumerable:!0,get:function(){return Ple.max}});var kle=Iu();Object.defineProperty(v,"mergeAll",{enumerable:!0,get:function(){return kle.mergeAll}});var Rle=I3();Object.defineProperty(v,"flatMap",{enumerable:!0,get:function(){return Rle.flatMap}});var Nle=si();Object.defineProperty(v,"mergeMap",{enumerable:!0,get:function(){return Nle.mergeMap}});var Mle=k3();Object.defineProperty(v,"mergeMapTo",{enumerable:!0,get:function(){return Mle.mergeMapTo}});var Dle=R3();Object.defineProperty(v,"mergeScan",{enumerable:!0,get:function(){return Dle.mergeScan}});var qle=D3();Object.defineProperty(v,"mergeWith",{enumerable:!0,get:function(){return qle.mergeWith}});var Lle=q3();Object.defineProperty(v,"min",{enumerable:!0,get:function(){return Lle.min}});var Ble=Dm();Object.defineProperty(v,"multicast",{enumerable:!0,get:function(){return Ble.multicast}});var Fle=xu();Object.defineProperty(v,"observeOn",{enumerable:!0,get:function(){return Fle.observeOn}});var Ule=F3();Object.defineProperty(v,"onErrorResumeNextWith",{enumerable:!0,get:function(){return Ule.onErrorResumeNextWith}});var jle=U3();Object.defineProperty(v,"pairwise",{enumerable:!0,get:function(){return jle.pairwise}});var zle=j3();Object.defineProperty(v,"pluck",{enumerable:!0,get:function(){return zle.pluck}});var Hle=z3();Object.defineProperty(v,"publish",{enumerable:!0,get:function(){return Hle.publish}});var Gle=H3();Object.defineProperty(v,"publishBehavior",{enumerable:!0,get:function(){return Gle.publishBehavior}});var Vle=G3();Object.defineProperty(v,"publishLast",{enumerable:!0,get:function(){return Vle.publishLast}});var Wle=W3();Object.defineProperty(v,"publishReplay",{enumerable:!0,get:function(){return Wle.publishReplay}});var Kle=K3();Object.defineProperty(v,"raceWith",{enumerable:!0,get:function(){return Kle.raceWith}});var Qle=Tc();Object.defineProperty(v,"reduce",{enumerable:!0,get:function(){return Qle.reduce}});var Jle=J3();Object.defineProperty(v,"repeat",{enumerable:!0,get:function(){return Jle.repeat}});var $le=Y3();Object.defineProperty(v,"repeatWhen",{enumerable:!0,get:function(){return $le.repeatWhen}});var Yle=X3();Object.defineProperty(v,"retry",{enumerable:!0,get:function(){return Yle.retry}});var Zle=tD();Object.defineProperty(v,"retryWhen",{enumerable:!0,get:function(){return Zle.retryWhen}});var Xle=GA();Object.defineProperty(v,"refCount",{enumerable:!0,get:function(){return Xle.refCount}});var eue=zw();Object.defineProperty(v,"sample",{enumerable:!0,get:function(){return eue.sample}});var tue=nD();Object.defineProperty(v,"sampleTime",{enumerable:!0,get:function(){return tue.sampleTime}});var rue=iD();Object.defineProperty(v,"scan",{enumerable:!0,get:function(){return rue.scan}});var nue=oD();Object.defineProperty(v,"sequenceEqual",{enumerable:!0,get:function(){return nue.sequenceEqual}});var iue=Gw();Object.defineProperty(v,"share",{enumerable:!0,get:function(){return iue.share}});var sue=lD();Object.defineProperty(v,"shareReplay",{enumerable:!0,get:function(){return sue.shareReplay}});var oue=uD();Object.defineProperty(v,"single",{enumerable:!0,get:function(){return oue.single}});var aue=dD();Object.defineProperty(v,"skip",{enumerable:!0,get:function(){return aue.skip}});var cue=fD();Object.defineProperty(v,"skipLast",{enumerable:!0,get:function(){return cue.skipLast}});var lue=pD();Object.defineProperty(v,"skipUntil",{enumerable:!0,get:function(){return lue.skipUntil}});var uue=mD();Object.defineProperty(v,"skipWhile",{enumerable:!0,get:function(){return uue.skipWhile}});var due=yD();Object.defineProperty(v,"startWith",{enumerable:!0,get:function(){return due.startWith}});var fue=Ou();Object.defineProperty(v,"subscribeOn",{enumerable:!0,get:function(){return fue.subscribeOn}});var hue=bD();Object.defineProperty(v,"switchAll",{enumerable:!0,get:function(){return hue.switchAll}});var pue=Du();Object.defineProperty(v,"switchMap",{enumerable:!0,get:function(){return pue.switchMap}});var mue=AD();Object.defineProperty(v,"switchMapTo",{enumerable:!0,get:function(){return mue.switchMapTo}});var gue=wD();Object.defineProperty(v,"switchScan",{enumerable:!0,get:function(){return gue.switchScan}});var yue=Nu();Object.defineProperty(v,"take",{enumerable:!0,get:function(){return yue.take}});var vue=Uw();Object.defineProperty(v,"takeLast",{enumerable:!0,get:function(){return vue.takeLast}});var bue=ED();Object.defineProperty(v,"takeUntil",{enumerable:!0,get:function(){return bue.takeUntil}});var _ue=SD();Object.defineProperty(v,"takeWhile",{enumerable:!0,get:function(){return _ue.takeWhile}});var Aue=TD();Object.defineProperty(v,"tap",{enumerable:!0,get:function(){return Aue.tap}});var wue=Vw();Object.defineProperty(v,"throttle",{enumerable:!0,get:function(){return wue.throttle}});var Eue=xD();Object.defineProperty(v,"throttleTime",{enumerable:!0,get:function(){return Eue.throttleTime}});var Sue=Mu();Object.defineProperty(v,"throwIfEmpty",{enumerable:!0,get:function(){return Sue.throwIfEmpty}});var Tue=ID();Object.defineProperty(v,"timeInterval",{enumerable:!0,get:function(){return Tue.timeInterval}});var Cue=l0();Object.defineProperty(v,"timeout",{enumerable:!0,get:function(){return Cue.timeout}});var xue=PD();Object.defineProperty(v,"timeoutWith",{enumerable:!0,get:function(){return xue.timeoutWith}});var Oue=kD();Object.defineProperty(v,"timestamp",{enumerable:!0,get:function(){return Oue.timestamp}});var Iue=Iw();Object.defineProperty(v,"toArray",{enumerable:!0,get:function(){return Iue.toArray}});var Pue=MD();Object.defineProperty(v,"window",{enumerable:!0,get:function(){return Pue.window}});var kue=qD();Object.defineProperty(v,"windowCount",{enumerable:!0,get:function(){return kue.windowCount}});var Rue=BD();Object.defineProperty(v,"windowTime",{enumerable:!0,get:function(){return Rue.windowTime}});var Nue=jD();Object.defineProperty(v,"windowToggle",{enumerable:!0,get:function(){return Nue.windowToggle}});var Mue=HD();Object.defineProperty(v,"windowWhen",{enumerable:!0,get:function(){return Mue.windowWhen}});var Due=KD();Object.defineProperty(v,"withLatestFrom",{enumerable:!0,get:function(){return Due.withLatestFrom}});var que=QD();Object.defineProperty(v,"zipAll",{enumerable:!0,get:function(){return que.zipAll}});var Lue=$D();Object.defineProperty(v,"zipWith",{enumerable:!0,get:function(){return Lue.zipWith}})});var i6=m((ZIe,rS)=>{"use strict";var Khe=Object.prototype.hasOwnProperty,$t="~";function pd(){}Object.create&&(pd.prototype=Object.create(null),new pd().__proto__||($t=!1));function Qhe(r,e,t){this.fn=r,this.context=e,this.once=t||!1}function n6(r,e,t,n,i){if(typeof t!="function")throw new TypeError("The listener must be a function");var s=new Qhe(t,n||r,i),o=$t?$t+e:e;return r._events[o]?r._events[o].fn?r._events[o]=[r._events[o],s]:r._events[o].push(s):(r._events[o]=s,r._eventsCount++),r}function Sy(r,e){--r._eventsCount===0?r._events=new pd:delete r._events[e]}function Mt(){this._events=new pd,this._eventsCount=0}Mt.prototype.eventNames=function(){var e=[],t,n;if(this._eventsCount===0)return e;for(n in t=this._events)Khe.call(t,n)&&e.push($t?n.slice(1):n);return Object.getOwnPropertySymbols?e.concat(Object.getOwnPropertySymbols(t)):e};Mt.prototype.listeners=function(e){var t=$t?$t+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var i=0,s=n.length,o=new Array(s);i<s;i++)o[i]=n[i].fn;return o};Mt.prototype.listenerCount=function(e){var t=$t?$t+e:e,n=this._events[t];return n?n.fn?1:n.length:0};Mt.prototype.emit=function(e,t,n,i,s,o){var a=$t?$t+e:e;if(!this._events[a])return!1;var c=this._events[a],l=arguments.length,u,d;if(c.fn){switch(c.once&&this.removeListener(e,c.fn,void 0,!0),l){case 1:return c.fn.call(c.context),!0;case 2:return c.fn.call(c.context,t),!0;case 3:return c.fn.call(c.context,t,n),!0;case 4:return c.fn.call(c.context,t,n,i),!0;case 5:return c.fn.call(c.context,t,n,i,s),!0;case 6:return c.fn.call(c.context,t,n,i,s,o),!0}for(d=1,u=new Array(l-1);d<l;d++)u[d-1]=arguments[d];c.fn.apply(c.context,u)}else{var f=c.length,h;for(d=0;d<f;d++)switch(c[d].once&&this.removeListener(e,c[d].fn,void 0,!0),l){case 1:c[d].fn.call(c[d].context);break;case 2:c[d].fn.call(c[d].context,t);break;case 3:c[d].fn.call(c[d].context,t,n);break;case 4:c[d].fn.call(c[d].context,t,n,i);break;default:if(!u)for(h=1,u=new Array(l-1);h<l;h++)u[h-1]=arguments[h];c[d].fn.apply(c[d].context,u)}}return!0};Mt.prototype.on=function(e,t,n){return n6(this,e,t,n,!1)};Mt.prototype.once=function(e,t,n){return n6(this,e,t,n,!0)};Mt.prototype.removeListener=function(e,t,n,i){var s=$t?$t+e:e;if(!this._events[s])return this;if(!t)return Sy(this,s),this;var o=this._events[s];if(o.fn)o.fn===t&&(!i||o.once)&&(!n||o.context===n)&&Sy(this,s);else{for(var a=0,c=[],l=o.length;a<l;a++)(o[a].fn!==t||i&&!o[a].once||n&&o[a].context!==n)&&c.push(o[a]);c.length?this._events[s]=c.length===1?c[0]:c:Sy(this,s)}return this};Mt.prototype.removeAllListeners=function(e){var t;return e?(t=$t?$t+e:e,this._events[t]&&Sy(this,t)):(this._events=new pd,this._eventsCount=0),this};Mt.prototype.off=Mt.prototype.removeListener;Mt.prototype.addListener=Mt.prototype.on;Mt.prefixed=$t;Mt.EventEmitter=Mt;typeof rS<"u"&&(rS.exports=Mt)});var Ty=m(ze=>{"use strict";Object.defineProperty(ze,"__esModule",{value:!0});ze.getChainType=ze.ChainId=ze.BTCChainId=ze.StarknetChainId=ze.CosmosChainId=ze.FuelChainId=ze.SolanaChainId=ze.SuiChainId=ze.AptosChainId=ze.EthChainId=ze.ChainType=void 0;var zo;(function(r){r.SOLANA="solana",r.SUI="sui",r.APTOS="aptos",r.ETH="evm",r.BTC="btc"})(zo||(ze.ChainType=zo={}));var aS;(function(r){r.ETHEREUM="1",r.OPTIMISM="10",r.CRONOS="25",r.BSC="56",r.BSC_TESTNET="97",r.UNICHAIN="130",r.POLYGON="137",r.MANTA_PACIFIC="169",r.XLAYER_TESTNET="195",r.XLAYER_MAINNET="196",r.OP_BNB_MAINNET="204",r.SONIC_MAINNET="146",r.SONIC_TESTNET="57054",r.B2_MAINNET="223",r.FANTOM="250",r.FRAXTAL="252",r.KUCOIN="321",r.CRONOS_ZKEVM="388",r.ZKSYNC_ERA="324",r.CRONOS_TESTNET="338",r.ASTAR="592",r.DERIVE="957",r.HYPER_EVM="999",r.POLYGON_ZKEVM="1101",r.CONFLUX="1030",r.METIS="1088",r.MOONBEAM="1284",r.UNICHAIN_SEPOLIA="1301",r.SEI="1329",r.SONEIUM_TESTNET="1946",r.SONEIUM_MAINNET="1868",r.SWELL_TESTNET="1924",r.SWELL_MAINNET="1923",r.TAC_TESTNET="2390",r.KARAK="2410",r.BEVM="11501",r.MERLIN_MAINNET="4200",r.MANTLE="5000",r.BASE="8453",r.MEV_COMMIT="8855",r.MONAD_TESTNET="10143",r.HOLESKY="17000",r.MODE="34443",r.ARBITRUM="42161",r.HEMI="43111",r.AVALANCHE="43114",r.ZIRCUIT_TESTNET="48899",r.ZIRCUIT_MAINNET="48900",r.BOB="60808",r.LINEA="59144",r.BERACHAIN="80094",r.BLAST="81457",r.CHILIZ="88888",r.TAIKO="167000",r.TAIKO_TESTNET="167008",r.BITLAYER="200901",r.SCROLL="534352",r.ZKLINK_NOVA="810180",r.SEPOLIA="11155111",r.ETHERLINK="42793",r.CORN_MAIZENET="21000000",r.AURORA="1313161554",r.BLAST_SEPOLIA="168587773"})(aS||(ze.EthChainId=aS={}));var cS;(function(r){r.APTOS_MAINNET="aptos_mainnet",r.APTOS_TESTNET="aptos_testnet",r.APTOS_MOVEMENT_TESTNET="aptos_movement_testnet",r.APTOS_MOVEMENT_MAINNET="aptos_movement_mainnet",r.INITIA_ECHELON="aptos_echelon"})(cS||(ze.AptosChainId=cS={}));var lS;(function(r){r.SUI_MAINNET="sui_mainnet",r.SUI_TESTNET="sui_testnet"})(lS||(ze.SuiChainId=lS={}));var uS;(function(r){r.SOLANA_MAINNET="sol_mainnet",r.SOLANA_DEVNET="sol_devnet",r.SOLANA_TESTNET="sol_testnet",r.SOLANA_PYTH="sol_pyth"})(uS||(ze.SolanaChainId=uS={}));var dS;(function(r){r.FUEL_MAINNET="fuel_mainnet",r.FUEL_TESTNET="fuel_testnet"})(dS||(ze.FuelChainId=dS={}));var fS;(function(r){r.INJECTIVE_MAINNET="injective_mainnet",r.INJECTIVE_TESTNET="injective_testnet"})(fS||(ze.CosmosChainId=fS={}));var hS;(function(r){r.STARKNET_MAINNET="starknet_mainnet",r.STARKNET_SEPOLIA="starknet_sepolia"})(hS||(ze.StarknetChainId=hS={}));var pS;(function(r){r.BTC_MAINNET="btc_mainnet",r.BTC_TESTNET="btc_testnet"})(pS||(ze.BTCChainId=pS={}));ze.ChainId={...aS,...cS,...lS,...uS,...dS,...fS,...hS,...pS};function Jhe(r){let e=String(r).toLowerCase();return e.startsWith("sol")?zo.SOLANA:e.startsWith("sui")?zo.SUI:e.startsWith("apt")?zo.APTOS:e.startsWith("btc")?zo.BTC:zo.ETH}ze.getChainType=Jhe});var mS=m(he=>{"use strict";Object.defineProperty(he,"__esModule",{value:!0});he.getChainLogo=he.getSuiscanUrl=he.getChainBlockscoutUrl=he.getChainExternalUrl=he.SolanaChainInfo=he.AptosChainInfo=he.BTCChainInfo=he.EthChainInfo=he.EthVariation=he.ExplorerApiType=void 0;var x=Ty(),re;(function(r){r.ETHERSCAN="etherscan",r.BLOCKSCOUT="blockscout",r.L2_SCAN="l2scan",r.OK_LINK="oklink",r.UNKNOWN="unknown"})(re||(he.ExplorerApiType=re={}));var Z;(function(r){r[r.DEFAULT=0]="DEFAULT",r[r.ARBITRUM=1]="ARBITRUM",r[r.OPTIMISM=2]="OPTIMISM",r[r.ZKSYNC=3]="ZKSYNC",r[r.POLYGON_ZKEVM=4]="POLYGON_ZKEVM",r[r.SUBSTRATE=5]="SUBSTRATE"})(Z||(he.EthVariation=Z={}));he.EthChainInfo={[x.EthChainId.ETHEREUM]:{name:"Ethereum",slug:"mainnet",chainId:x.EthChainId.ETHEREUM,variation:Z.DEFAULT,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",tokenSymbol:"ETH",tokenDecimals:18,explorerApiType:re.ETHERSCAN,explorerUrl:"https://etherscan.io",explorerApi:"https://api.etherscan.io",blockscoutUrl:"https://eth.blockscout.com",lightIcon:"https://sentio.xyz/chains/eth.svg",darkIcon:"https://sentio.xyz/chains/eth-dark.svg"},[x.EthChainId.SEPOLIA]:{name:"Sepolia",slug:"sepolia",chainId:x.EthChainId.SEPOLIA,mainnetChainId:x.EthChainId.ETHEREUM,variation:Z.DEFAULT,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x1ef5f52bdbe11af2377c58ecc914a8c72ea807cf",tokenSymbol:"ETH",tokenDecimals:18,explorerApiType:re.ETHERSCAN,explorerUrl:"https://sepolia.etherscan.io",explorerApi:"https://api-sepolia.etherscan.io",blockscoutUrl:"https://eth-sepolia.blockscout.com",lightIcon:"https://sentio.xyz/chains/eth.svg",darkIcon:"https://sentio.xyz/chains/eth-dark.svg"},[x.EthChainId.HOLESKY]:{name:"Holesky",slug:"holesky",chainId:x.EthChainId.HOLESKY,mainnetChainId:x.EthChainId.ETHEREUM,variation:Z.DEFAULT,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x94373a4919B3240D86eA41593D5eBa789FEF3848",tokenSymbol:"ETH",tokenDecimals:18,explorerApiType:re.ETHERSCAN,explorerUrl:"https://holesky.etherscan.io",explorerApi:"https://api-holesky.etherscan.io",blockscoutUrl:"https://eth-holesky.blockscout.com",lightIcon:"https://sentio.xyz/chains/eth.svg",darkIcon:"https://sentio.xyz/chains/eth-dark.svg"},[x.EthChainId.BSC]:{name:"Binance Smart Chain",slug:"bsc",chainId:x.EthChainId.BSC,variation:Z.DEFAULT,priceTokenAddress:"0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c",tokenSymbol:"BNB",tokenDecimals:18,explorerApiType:re.ETHERSCAN,explorerUrl:"https://bscscan.com",explorerApi:"https://api.bscscan.com",lightIcon:"https://sentio.xyz/chains/bnb-chain.svg"},[x.EthChainId.BSC_TESTNET]:{name:"Binance Smart Chain Testnet",slug:"bsc-testnet",chainId:x.EthChainId.BSC_TESTNET,mainnetChainId:x.EthChainId.BSC,variation:Z.DEFAULT,priceTokenAddress:"0xae13d989dac2f0debff460ac112a837c89baa7cd",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0xae13d989dac2f0debff460ac112a837c89baa7cd",tokenSymbol:"tBNB",tokenDecimals:18,explorerApiType:re.ETHERSCAN,explorerUrl:"https://testnet.bscscan.com",explorerApi:"https://api-testnet.bscscan.com",lightIcon:"https://sentio.xyz/chains/bnb-chain.svg"},[x.EthChainId.OP_BNB_MAINNET]:{name:"opBNB Mainnet",slug:"opbnb",chainId:x.EthChainId.OP_BNB_MAINNET,variation:Z.OPTIMISM,priceTokenAddress:"0x4200000000000000000000000000000000000006",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x4200000000000000000000000000000000000006",tokenSymbol:"BNB",tokenDecimals:18,explorerUrl:"https://opbnb.bscscan.com",explorerApiType:re.ETHERSCAN,explorerApi:"https://api-opbnb.bscscan.com",lightIcon:"https://sentio.xyz/chains/bnb-chain.svg"},[x.EthChainId.POLYGON]:{name:"Polygon",slug:"matic",chainId:x.EthChainId.POLYGON,variation:Z.DEFAULT,priceTokenAddress:"0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270",tokenSymbol:"MATIC",tokenDecimals:18,explorerApiType:re.ETHERSCAN,explorerUrl:"https://polygonscan.com",explorerApi:"https://api.polygonscan.com",lightIcon:"https://sentio.xyz/chains/polygon.svg"},[x.EthChainId.ARBITRUM]:{name:"Arbitrum",slug:"arbitrum-one",chainId:x.EthChainId.ARBITRUM,variation:Z.ARBITRUM,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x82aF49447D8a07e3bd95BD0d56f35241523fBab1",tokenSymbol:"ETH",tokenDecimals:18,explorerApiType:re.ETHERSCAN,explorerUrl:"https://arbiscan.io",explorerApi:"https://api.arbiscan.io",lightIcon:"https://sentio.xyz/chains/arbitrum.svg"},[x.EthChainId.AVALANCHE]:{name:"Avalanche",slug:"avalanche",chainId:x.EthChainId.AVALANCHE,variation:Z.DEFAULT,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7",tokenSymbol:"ETH",tokenDecimals:18,explorerApiType:re.ETHERSCAN,explorerUrl:"https://snowtrace.io",explorerApi:"https://api.routescan.io/v2/network/mainnet/evm/43114/etherscan",lightIcon:"https://sentio.xyz/chains/avalanche.svg"},[x.EthChainId.POLYGON_ZKEVM]:{name:"Polygon zkEVM",chainId:x.EthChainId.POLYGON_ZKEVM,slug:"polygon-zkevm",variation:Z.POLYGON_ZKEVM,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x4F9A0e7FD2Bf6067db6994CF12E4495Df938E6e9",tokenSymbol:"ETH",tokenDecimals:18,explorerApiType:re.ETHERSCAN,explorerUrl:"https://zkevm.polygonscan.com",explorerApi:"https://api-zkevm.polygonscan.com",lightIcon:"https://sentio.xyz/chains/polygon.svg"},[x.EthChainId.MOONBEAM]:{name:"Moonbeam",slug:"moonbeam",chainId:x.EthChainId.MOONBEAM,variation:Z.SUBSTRATE,priceTokenAddress:"0xacc15dc74880c9944775448304b263d191c6077f",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0xacc15dc74880c9944775448304b263d191c6077f",tokenSymbol:"GLMR",tokenDecimals:18,explorerApiType:re.ETHERSCAN,explorerUrl:"https://moonscan.io",explorerApi:"https://api-moonbeam.moonscan.io",lightIcon:"https://sentio.xyz/chains/moonbeam.svg"},[x.EthChainId.ASTAR]:{name:"Astar",slug:"astar",chainId:x.EthChainId.ASTAR,variation:Z.SUBSTRATE,priceTokenAddress:"0xaeaaf0e2c81af264101b9129c00f4440ccf0f720",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0xaeaaf0e2c81af264101b9129c00f4440ccf0f720",tokenSymbol:"ASTR",tokenDecimals:18,explorerApiType:re.BLOCKSCOUT,explorerUrl:"https://astar.blockscout.com",explorerApi:"https://astar.blockscout.com",lightIcon:"https://sentio.xyz/chains/astar.svg"},[x.EthChainId.LINEA]:{name:"Linea",slug:"linea",chainId:x.EthChainId.LINEA,variation:Z.DEFAULT,priceTokenAddress:"0xe5d7c2a44ffddf6b295a15c148167daaaf5cf34f",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0xe5D7C2a44FfDDf6b295A15c148167daaAf5Cf34f",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://lineascan.build",explorerApiType:re.ETHERSCAN,explorerApi:"https://api.lineascan.build",lightIcon:"https://sentio.xyz/chains/linea.svg",darkIcon:"https://sentio.xyz/chains/linea-dark.svg"},[x.EthChainId.SCROLL]:{name:"Scroll",slug:"scroll",chainId:x.EthChainId.SCROLL,variation:Z.DEFAULT,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x5300000000000000000000000000000000000004",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://scrollscan.com",explorerApiType:re.ETHERSCAN,explorerApi:"https://api.scrollscan.com",lightIcon:"https://sentio.xyz/chains/scroll.svg"},[x.EthChainId.TAIKO]:{name:"Taiko Mainnet",slug:"taiko",chainId:x.EthChainId.TAIKO,variation:Z.DEFAULT,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0xA51894664A773981C6C112C43ce576f315d5b1B6",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://taikoscan.io",explorerApiType:re.ETHERSCAN,explorerApi:"https://api.taikoscan.io",lightIcon:"https://sentio.xyz/chains/taiko.svg"},[x.EthChainId.TAIKO_TESTNET]:{name:"Taiko Testnet",slug:"taiko-hekla-testnet",chainId:x.EthChainId.TAIKO_TESTNET,mainnetChainId:x.EthChainId.TAIKO,variation:Z.DEFAULT,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0xae2C46ddb314B9Ba743C6dEE4878F151881333D9",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://hekla.taikoscan.io",explorerApiType:re.ETHERSCAN,explorerApi:"https://api-hekla.taikoscan.io",lightIcon:"https://sentio.xyz/chains/taiko.svg"},[x.EthChainId.XLAYER_TESTNET]:{name:"X Layer Testnet",slug:"xlayer-sepolia",chainId:x.EthChainId.XLAYER_TESTNET,mainnetChainId:x.EthChainId.XLAYER_MAINNET,variation:Z.POLYGON_ZKEVM,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0xa749ad81913cdc19881ebeb64631df72be708335",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://www.oklink.com/xlayer-test",explorerApiType:re.OK_LINK,explorerApi:"https://www.oklink.com/api/v5/explorer",lightIcon:"https://sentio.xyz/chains/x1-logo.png"},[x.EthChainId.XLAYER_MAINNET]:{name:"X Layer Mainnet",slug:"xlayer-mainnet",chainId:x.EthChainId.XLAYER_MAINNET,variation:Z.POLYGON_ZKEVM,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x5a77f1443d16ee5761d310e38b62f77f726bc71c",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://www.oklink.com/xlayer",explorerApiType:re.OK_LINK,explorerApi:"https://www.oklink.com/api/v5/explorer",lightIcon:"https://sentio.xyz/chains/x1-logo.png"},[x.EthChainId.BLAST]:{name:"Blast Mainnet",slug:"blast-mainnet",chainId:x.EthChainId.BLAST,variation:Z.OPTIMISM,priceTokenAddress:"0x4300000000000000000000000000000000000004",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x4300000000000000000000000000000000000004",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://blastscan.io",explorerApiType:re.ETHERSCAN,explorerApi:"https://api.blastscan.io",lightIcon:"https://sentio.xyz/chains/blast-logo.png"},[x.EthChainId.BLAST_SEPOLIA]:{name:"Blast Testnet",slug:"blast-testnet",chainId:x.EthChainId.BLAST_SEPOLIA,mainnetChainId:x.EthChainId.BLAST,variation:Z.OPTIMISM,priceTokenAddress:"0x4200000000000000000000000000000000000023",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x4200000000000000000000000000000000000023",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://sepolia.blastscan.io",explorerApiType:re.ETHERSCAN,explorerApi:"https://api-sepolia.blastscan.io",lightIcon:"https://sentio.xyz/chains/blast-logo.png"},[x.EthChainId.BASE]:{name:"Base",slug:"base",chainId:x.EthChainId.BASE,variation:Z.OPTIMISM,priceTokenAddress:"0x4200000000000000000000000000000000000006",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x4200000000000000000000000000000000000006",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://basescan.org",explorerApiType:re.ETHERSCAN,explorerApi:"https://api.basescan.org",lightIcon:"https://sentio.xyz/chains/base.svg",darkIcon:"https://sentio.xyz/chains/base_blue.svg"},[x.EthChainId.ZKSYNC_ERA]:{name:"zkSync Era",slug:"zksync-era",chainId:x.EthChainId.ZKSYNC_ERA,variation:Z.ZKSYNC,priceTokenAddress:"0x000000000000000000000000000000000000800A",tokenAddress:"0x000000000000000000000000000000000000800A",wrappedTokenAddress:"0x000000000000000000000000000000000000800A",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://explorer.zksync.io",explorerApiType:re.ETHERSCAN,explorerApi:"https://block-explorer-api.mainnet.zksync.io",lightIcon:"https://sentio.xyz/chains/zksync.svg"},[x.EthChainId.ZIRCUIT_TESTNET]:{name:"Zircuit Testnet",slug:"zircuit-testnet",chainId:x.EthChainId.ZIRCUIT_TESTNET,mainnetChainId:x.EthChainId.ZIRCUIT_MAINNET,variation:Z.OPTIMISM,priceTokenAddress:"0x4200000000000000000000000000000000000006",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x4200000000000000000000000000000000000006",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://explorer.testnet.zircuit.com",lightIcon:"https://sentio.xyz/chains/zircuit-inverted-icon.svg",darkIcon:"https://sentio.xyz/chains/zircuit-green-icon.svg"},[x.EthChainId.ZIRCUIT_MAINNET]:{name:"Zircuit Mainnet",slug:"zircuit",chainId:x.EthChainId.ZIRCUIT_MAINNET,variation:Z.OPTIMISM,priceTokenAddress:"0x4200000000000000000000000000000000000006",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x4200000000000000000000000000000000000006",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://explorer.zircuit.com",lightIcon:"https://sentio.xyz/chains/zircuit-inverted-icon.svg",darkIcon:"https://sentio.xyz/chains/zircuit-green-icon.svg"},[x.EthChainId.FANTOM]:{name:"Fantom Opera",slug:"fantom",chainId:x.EthChainId.FANTOM,variation:Z.DEFAULT,priceTokenAddress:"0x21be370d5312f44cb42ce377bc9b8a0cef1a4c83",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x21be370d5312f44cb42ce377bc9b8a0cef1a4c83",tokenSymbol:"WFTM",tokenDecimals:18,explorerUrl:"https://ftmscan.com",explorerApiType:re.ETHERSCAN,explorerApi:"https://api.ftmscan.com",lightIcon:"https://sentio.xyz/chains/fantom.svg"},[x.EthChainId.OPTIMISM]:{name:"Optimism Mainnet",slug:"optimism",chainId:x.EthChainId.OPTIMISM,variation:Z.OPTIMISM,priceTokenAddress:"0x4200000000000000000000000000000000000006",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x4200000000000000000000000000000000000006",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://optimistic.etherscan.io",explorerApiType:re.ETHERSCAN,explorerApi:"https://api-optimistic.etherscan.io",lightIcon:"https://sentio.xyz/chains/optimism.svg"},[x.EthChainId.CRONOS]:{name:"Cronos Mainnet",slug:"cronos",chainId:x.EthChainId.CRONOS,variation:Z.DEFAULT,priceTokenAddress:"0x5c7f8a570d578ed84e63fdfa7b1ee72deae1ae23",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x5c7f8a570d578ed84e63fdfa7b1ee72deae1ae23",tokenSymbol:"CRO",tokenDecimals:18,explorerUrl:"https://cronoscan.com",explorerApiType:re.ETHERSCAN,explorerApi:"https://api.cronoscan.com",lightIcon:"https://sentio.xyz/chains/cronos.svg",darkIcon:"https://sentio.xyz/chains/cronos_light.svg"},[x.EthChainId.CRONOS_TESTNET]:{name:"Cronos Testnet",slug:"cronos-testnet",chainId:x.EthChainId.CRONOS_TESTNET,mainnetChainId:x.EthChainId.CRONOS,variation:Z.DEFAULT,priceTokenAddress:"0x6a3173618859c7cd40faf6921b5e9eb6a76f1fd4",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x6a3173618859c7cd40faf6921b5e9eb6a76f1fd4",tokenSymbol:"CRO",tokenDecimals:18,explorerUrl:"https://explorer.cronos.org/testnet",lightIcon:"https://sentio.xyz/chains/cronos.svg",darkIcon:"https://sentio.xyz/chains/cronos_light.svg"},[x.EthChainId.BITLAYER]:{name:"Bitlayer Mainnet",slug:"bitlayer",chainId:x.EthChainId.BITLAYER,variation:Z.DEFAULT,priceTokenAddress:"0xff204e2681a6fa0e2c3fade68a1b28fb90e4fc5f",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0xff204e2681a6fa0e2c3fade68a1b28fb90e4fc5f",tokenSymbol:"BTC",tokenDecimals:18,explorerUrl:"https://www.btrscan.com",explorerApiType:re.ETHERSCAN,explorerApi:"https://api.btrscan.com/scan",lightIcon:"https://sentio.xyz/chains/bitlayer.svg"},[x.EthChainId.MANTA_PACIFIC]:{name:"Manta Pacific",slug:"manta-pacific-mainnet",chainId:x.EthChainId.MANTA_PACIFIC,variation:Z.OPTIMISM,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x0Dc808adcE2099A9F62AA87D9670745AbA741746",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://pacific-explorer.manta.network",explorerApiType:re.BLOCKSCOUT,explorerApi:"https://pacific-explorer.manta.network",lightIcon:"https://sentio.xyz/chains/manta.png"},[x.EthChainId.MANTLE]:{name:"Mantle",slug:"mantle",chainId:x.EthChainId.MANTLE,variation:Z.OPTIMISM,priceTokenAddress:"0x78c1b0c915c4faa5fffa6cabf0219da63d7f4cb8",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x78c1b0c915c4faa5fffa6cabf0219da63d7f4cb8",tokenSymbol:"MNT",tokenDecimals:18,explorerUrl:"https://mantlescan.xyz",explorerApiType:re.ETHERSCAN,explorerApi:"https://api.mantlescan.xyz",lightIcon:"https://sentio.xyz/chains/mantle.svg",darkIcon:"https://sentio.xyz/chains/mantle-white.svg"},[x.EthChainId.B2_MAINNET]:{name:"B2 Mainnet",slug:"b2-mainnet",chainId:x.EthChainId.B2_MAINNET,variation:Z.OPTIMISM,priceTokenAddress:"0x4200000000000000000000000000000000000006",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x4200000000000000000000000000000000000006",tokenSymbol:"BTC",tokenDecimals:18,explorerUrl:"https://explorer.bsquared.network",explorerApiType:re.L2_SCAN,explorerApi:"https://explorer.bsquared.network/api",lightIcon:"https://sentio.xyz/chains/b2.svg"},[x.EthChainId.MODE]:{name:"Mode Mainnet",slug:"mode-mainnet",chainId:x.EthChainId.MODE,variation:Z.OPTIMISM,priceTokenAddress:"0x4200000000000000000000000000000000000006",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x4200000000000000000000000000000000000006",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://modescan.io",explorerApiType:re.ETHERSCAN,explorerApi:"https://api.routescan.io/v2/network/mainnet/evm/34443/etherscan"},[x.EthChainId.BOB]:{name:"Bob Mainnet",slug:"bob",chainId:x.EthChainId.BOB,variation:Z.OPTIMISM,priceTokenAddress:"0x4200000000000000000000000000000000000006",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x4200000000000000000000000000000000000006",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://explorer.gobob.xyz",explorerApiType:re.BLOCKSCOUT,explorerApi:"https://explorer.gobob.xyz",lightIcon:"https://sentio.xyz/chains/bob.svg"},[x.EthChainId.FRAXTAL]:{name:"Fraxtal Mainnet",slug:"frax-mainnet",chainId:x.EthChainId.FRAXTAL,variation:Z.OPTIMISM,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0xFC00000000000000000000000000000000000006",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://fraxscan.com",explorerApiType:re.ETHERSCAN,explorerApi:"https://api.fraxscan.com",lightIcon:"https://sentio.xyz/chains/fraxtal.svg"},[x.EthChainId.KUCOIN]:{name:"KCC Mainnet",slug:"kucoin",chainId:x.EthChainId.KUCOIN,variation:Z.DEFAULT,priceTokenAddress:"0x4446Fc4eb47f2f6586f9fAAb68B3498F86C07521",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x4446Fc4eb47f2f6586f9fAAb68B3498F86C07521",tokenSymbol:"KCS",tokenDecimals:18,explorerUrl:"https://scan.kcc.io",explorerApiType:re.ETHERSCAN,explorerApi:"https://scan.kcc.io",lightIcon:"https://sentio.xyz/chains/kcc.svg"},[x.EthChainId.CONFLUX]:{name:"Conflux eSpace",slug:"conflux-espace",chainId:x.EthChainId.CONFLUX,variation:Z.DEFAULT,priceTokenAddress:"0x14b2d3bc65e74dae1030eafd8ac30c533c976a9b",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x14b2d3bc65e74dae1030eafd8ac30c533c976a9b",tokenSymbol:"CFX",tokenDecimals:18,explorerUrl:"https://evm.confluxscan.io",explorerApiType:re.ETHERSCAN,explorerApi:"https://evmapi.confluxscan.io",lightIcon:"https://sentio.xyz/chains/conflux.svg",darkIcon:"https://sentio.xyz/chains/conflux-white.svg"},[x.EthChainId.METIS]:{name:"Metis",slug:"metis",chainId:x.EthChainId.METIS,variation:Z.DEFAULT,priceTokenAddress:"0x75cb093E4D61d2A2e65D8e0BBb01DE8d89b53481",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x75cb093E4D61d2A2e65D8e0BBb01DE8d89b53481",tokenSymbol:"METIS",tokenDecimals:18,explorerUrl:"https://explorer.metis.io",explorerApiType:re.ETHERSCAN,explorerApi:"https://api.routescan.io/v2/network/mainnet/evm/1088/etherscan/",lightIcon:"https://sentio.xyz/chains/metis.svg"},[x.EthChainId.BEVM]:{name:"BEVM",slug:"bevm",chainId:x.EthChainId.BEVM,variation:Z.SUBSTRATE,priceTokenAddress:"0xB5136FEba197f5fF4B765E5b50c74db717796dcD",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0xB5136FEba197f5fF4B765E5b50c74db717796dcD",tokenSymbol:"BTC",tokenDecimals:18,explorerUrl:"https://scan.bevm.io",explorerApiType:re.BLOCKSCOUT,explorerApi:"https://scan.bevm.io",lightIcon:"https://sentio.xyz/chains/bevm.svg"},[x.EthChainId.MERLIN_MAINNET]:{name:"Merlin Mainnet",slug:"merlin",chainId:x.EthChainId.MERLIN_MAINNET,variation:Z.POLYGON_ZKEVM,priceTokenAddress:"0xF6D226f9Dc15d9bB51182815b320D3fBE324e1bA",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0xF6D226f9Dc15d9bB51182815b320D3fBE324e1bA",tokenSymbol:"BTC",tokenDecimals:18,explorerUrl:"https://scan.merlinchain.io",explorerApiType:re.L2_SCAN,explorerApi:"https://scan.merlinchain.io/api",lightIcon:"https://sentio.xyz/chains/merlin.png"},[x.EthChainId.CHILIZ]:{name:"Chiliz",slug:"chiliz",chainId:x.EthChainId.CHILIZ,variation:Z.DEFAULT,priceTokenAddress:"0x721EF6871f1c4Efe730Dce047D40D1743B886946",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x721EF6871f1c4Efe730Dce047D40D1743B886946",tokenSymbol:"CHZ",tokenDecimals:18,explorerUrl:"https://chiliscan.com",explorerApiType:re.ETHERSCAN,explorerApi:"https://api.routescan.io/v2/network/mainnet/evm/88888/etherscan",lightIcon:"https://sentio.xyz/chains/chiliz.svg"},[x.EthChainId.ZKLINK_NOVA]:{name:"zkLink Nova",slug:"zklink-nova",chainId:x.EthChainId.ZKLINK_NOVA,variation:Z.ZKSYNC,priceTokenAddress:"0x000000000000000000000000000000000000800A",tokenAddress:"0x000000000000000000000000000000000000800A",wrappedTokenAddress:"0x000000000000000000000000000000000000800A",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://explorer.zklink.io",explorerApiType:re.ETHERSCAN,explorerApi:"https://explorer-api.zklink.io",lightIcon:"https://sentio.xyz/chains/zklink.svg"},[x.EthChainId.AURORA]:{name:"Aurora",slug:"aurora",chainId:x.EthChainId.AURORA,variation:Z.DEFAULT,priceTokenAddress:"0xC9BdeEd33CD01541e1eeD10f90519d2C06Fe3feB",tokenAddress:"0x000000000000000000000000000000000000800A",wrappedTokenAddress:"0xC9BdeEd33CD01541e1eeD10f90519d2C06Fe3feB",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://explorer.aurora.dev",explorerApiType:re.BLOCKSCOUT,explorerApi:"https://explorer.aurora.dev",lightIcon:"https://sentio.xyz/chains/aurora.svg"},[x.EthChainId.SONIC_MAINNET]:{name:"Sonic Mainnet",slug:"sonic-mainnet",chainId:x.EthChainId.SONIC_MAINNET,variation:Z.DEFAULT,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x000000000000000000000000000000000000800A",tokenSymbol:"S",tokenDecimals:18,explorerUrl:"https://sonicscan.org",explorerApiType:re.ETHERSCAN,explorerApi:"https://api.sonicscan.org/api",lightIcon:"https://sentio.xyz/chains/sonic.svg",darkIcon:"https://sentio.xyz/chains/sonic-dark.svg"},[x.EthChainId.SONIC_TESTNET]:{name:"Sonic Testnet",slug:"sonic-testnet",chainId:x.EthChainId.SONIC_TESTNET,mainnetChainId:x.EthChainId.SONIC_MAINNET,variation:Z.DEFAULT,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x000000000000000000000000000000000000800A",tokenSymbol:"S",tokenDecimals:18,explorerUrl:"https://testnet.sonicscan.org",explorerApiType:re.ETHERSCAN,explorerApi:"https://api-testnet.sonicscan.org",lightIcon:"https://sentio.xyz/chains/sonic.svg",darkIcon:"https://sentio.xyz/chains/sonic-dark.svg"},[x.EthChainId.SONEIUM_MAINNET]:{name:"Soneium Mainnet",slug:"soneium-mainnet",chainId:x.EthChainId.SONEIUM_MAINNET,variation:Z.OPTIMISM,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x4200000000000000000000000000000000000006",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://soneium.blockscout.com",explorerApiType:re.BLOCKSCOUT,explorerApi:"https://soneium.blockscout.com",lightIcon:"https://sentio.xyz/chains/soneium.svg"},[x.EthChainId.SONEIUM_TESTNET]:{name:"Soneium Testnet",slug:"soneium-minato",chainId:x.EthChainId.SONEIUM_TESTNET,mainnetChainId:x.EthChainId.SONEIUM_MAINNET,variation:Z.OPTIMISM,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x728F2745410A56620B50a6E0592743450e08Cac6",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://soneium-minato.blockscout.com",explorerApiType:re.BLOCKSCOUT,explorerApi:"https://soneium-minato.blockscout.com",lightIcon:"https://sentio.xyz/chains/soneium.svg"},[x.EthChainId.CRONOS_ZKEVM]:{name:"Cronos zkEVM",slug:"cronos-zkevm",chainId:x.EthChainId.CRONOS_ZKEVM,variation:Z.ZKSYNC,priceTokenAddress:"0x000000000000000000000000000000000000800a",tokenAddress:"0x000000000000000000000000000000000000800a",wrappedTokenAddress:"0xc1bf55ee54e16229d9b369a5502bfe5fc9f20b6d",tokenSymbol:"zkCRO",tokenDecimals:18,explorerUrl:"https://explorer.zkevm.cronos.org",explorerApiType:re.ETHERSCAN,explorerApi:"https://explorer.zkevm.cronos.org",lightIcon:"https://sentio.xyz/chains/cronos.svg",darkIcon:"https://sentio.xyz/chains/cronos_light.svg"},[x.EthChainId.DERIVE]:{name:"Derive Mainnet",slug:"derive-mainnet",chainId:x.EthChainId.DERIVE,variation:Z.OPTIMISM,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x15CEcd5190A43C7798dD2058308781D0662e678E",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://explorer.lyra.finance",explorerApiType:re.BLOCKSCOUT,explorerApi:"https://explorer.lyra.finance",lightIcon:"https://sentio.xyz/chains/derive.svg"},[x.EthChainId.UNICHAIN_SEPOLIA]:{name:"Unichain Sepolia",slug:"unichain-sepolia",chainId:x.EthChainId.UNICHAIN_SEPOLIA,mainnetChainId:x.EthChainId.UNICHAIN,variation:Z.OPTIMISM,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x4200000000000000000000000000000000000006",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://unichain-sepolia.blockscout.com",explorerApiType:re.BLOCKSCOUT,explorerApi:"https://unichain-sepolia.blockscout.com",lightIcon:"https://sentio.xyz/chains/unichain-testnet.svg"},[x.EthChainId.UNICHAIN]:{name:"Unichain",slug:"unichain-mainnet",chainId:x.EthChainId.UNICHAIN,variation:Z.OPTIMISM,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x4200000000000000000000000000000000000006",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://unichain.blockscout.com",explorerApiType:re.BLOCKSCOUT,explorerApi:"https://unichain.blockscout.com",lightIcon:"https://sentio.xyz/chains/unichain.svg"},[x.EthChainId.CORN_MAIZENET]:{name:"Corn Maizenet",slug:"corn-maizenet",chainId:x.EthChainId.CORN_MAIZENET,variation:Z.OPTIMISM,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x0000000000000000000000000000000000000000",tokenSymbol:"BTCN",tokenDecimals:18,explorerUrl:"https://maizenet-explorer.usecorn.com",explorerApiType:re.BLOCKSCOUT,explorerApi:"https://maizenet-explorer.usecorn.com",lightIcon:"https://sentio.xyz/chains/corn.svg"},[x.EthChainId.KARAK]:{name:"Karak Mainnet",slug:"karak-mainnet",chainId:x.EthChainId.KARAK,variation:Z.DEFAULT,priceTokenAddress:"0x4200000000000000000000000000000000000006",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x4200000000000000000000000000000000000006",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://explorer.karak.network",explorerApiType:re.BLOCKSCOUT,explorerApi:"https://explorer.karak.network",lightIcon:"https://sentio.xyz/chains/karak.svg"},[x.EthChainId.SEI]:{name:"Sei Mainnet",slug:"sei",chainId:x.EthChainId.SEI,variation:Z.DEFAULT,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x0000000000000000000000000000000000000000",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://seistream.app",lightIcon:"https://sentio.xyz/chains/sei.svg"},[x.EthChainId.SWELL_MAINNET]:{name:"Swell Mainnet",slug:"swell-mainnet",chainId:x.EthChainId.SWELL_MAINNET,variation:Z.OPTIMISM,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x0000000000000000000000000000000000000000",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://explorer.swellnetwork.io",explorerApiType:re.BLOCKSCOUT,explorerApi:"https://explorer.swellnetwork.io",lightIcon:"https://sentio.xyz/chains/swell.svg"},[x.EthChainId.SWELL_TESTNET]:{name:"Swell Testnet",slug:"swell-testnet",chainId:x.EthChainId.SWELL_TESTNET,mainnetChainId:x.EthChainId.SWELL_MAINNET,variation:Z.OPTIMISM,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x0000000000000000000000000000000000000000",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://swell-testnet-explorer.alt.technology",explorerApiType:re.BLOCKSCOUT,explorerApi:"https://swell-testnet-explorer.alt.technology",lightIcon:"https://sentio.xyz/chains/swell.svg"},[x.EthChainId.TAC_TESTNET]:{name:"TAC Testnet",slug:"tac-testnet",chainId:x.EthChainId.TAC_TESTNET,variation:Z.DEFAULT,priceTokenAddress:"0x392D1cCB04d25fCBcA7D4fc0E429Dbc1F9fEe73F",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x392D1cCB04d25fCBcA7D4fc0E429Dbc1F9fEe73F",tokenSymbol:"TAC",tokenDecimals:18,explorerUrl:"https://turin.explorer.tac.build",explorerApiType:re.BLOCKSCOUT,explorerApi:"https://turin.explorer.tac.build",lightIcon:"https://sentio.xyz/chains/tac.svg"},[x.EthChainId.MONAD_TESTNET]:{name:"Monad Testnet",slug:"monad-testnet",chainId:x.EthChainId.MONAD_TESTNET,variation:Z.DEFAULT,priceTokenAddress:"0x760AfE86e5de5fa0Ee542fc7B7B713e1c5425701",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x760AfE86e5de5fa0Ee542fc7B7B713e1c5425701",tokenSymbol:"MON",tokenDecimals:18,explorerUrl:"https://testnet.monadexplorer.com",explorerApiType:re.UNKNOWN},[x.EthChainId.BERACHAIN]:{name:"Berachain",slug:"berachain",chainId:x.EthChainId.BERACHAIN,variation:Z.DEFAULT,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x0000000000000000000000000000000000000000",tokenSymbol:"BERA",tokenDecimals:18,explorerUrl:"https://berascan.com",explorerApi:"https://api.berascan.com",explorerApiType:re.ETHERSCAN,lightIcon:"https://sentio.xyz/chains/berachain.svg"},[x.EthChainId.HYPER_EVM]:{name:"HyperEVM",slug:"hyper-evm",chainId:x.EthChainId.HYPER_EVM,variation:Z.DEFAULT,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x0000000000000000000000000000000000000000",tokenSymbol:"HYPE",tokenDecimals:18,explorerUrl:"https://liquidscan.xyz/mainnet",lightIcon:"https://sentio.xyz/chains/hype.svg",darkIcon:"https://sentio.xyz/chains/hype-dark.svg"},[x.EthChainId.ETHERLINK]:{name:"Etherlink",slug:"etherlink",chainId:x.EthChainId.ETHERLINK,variation:Z.DEFAULT,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0xc9B53AB2679f573e480d01e0f49e2B5CFB7a3EAb",tokenSymbol:"XTZ",tokenDecimals:18,explorerUrl:"https://explorer.etherlink.com",explorerApiType:re.BLOCKSCOUT,explorerApi:"https://explorer.etherlink.com",lightIcon:"https://sentio.xyz/chains/etherlink.svg"},[x.EthChainId.MEV_COMMIT]:{name:"MEV Commit",slug:"mev-commit",chainId:x.EthChainId.MEV_COMMIT,variation:Z.DEFAULT,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x0000000000000000000000000000000000000000",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://www.mev-commit.xyz/",lightIcon:"https://sentio.xyz/chains/mev-commit-dark.svg",darkIcon:"https://sentio.xyz/chains/mev-commit.svg"},[x.EthChainId.HEMI]:{name:"Hemi",slug:"hemi",chainId:x.EthChainId.HEMI,variation:Z.DEFAULT,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x0000000000000000000000000000000000000000",tokenSymbol:"ETH",tokenDecimals:18,explorerApiType:re.BLOCKSCOUT,explorerUrl:"https://explorer.hemi.xyz",explorerApi:"https://explorer.hemi.xyz",lightIcon:"https://sentio.xyz/chains/eth.svg",darkIcon:"https://sentio.xyz/chains/eth-dark.svg"}};function $he(r,e,t){let n=t,i=he.EthChainInfo[r];if(i)return i.explorerApiType===re.L2_SCAN&&t==="block"&&(n="blocks"),`${i.explorerUrl}/${n}/${e}`}he.BTCChainInfo={[x.BTCChainId.BTC_MAINNET]:{name:"Bitcoin Mainnet",chainId:x.BTCChainId.BTC_MAINNET,explorerUrl:"https://mempool.space",lightIcon:"https://sentio.xyz/chains/bitcoin.svg"},[x.BTCChainId.BTC_TESTNET]:{name:"Bitcoin Mainnet",chainId:x.BTCChainId.BTC_TESTNET,explorerUrl:"https://mempool.space/testnet4",lightIcon:"https://sentio.xyz/chains/bitcoin-testnet.svg"}};var Yhe={block:"block",address:"address",tx:"tx",token:void 0};function Zhe(r,e,t){let n=he.BTCChainInfo[r]?.explorerUrl,i=Yhe[t];if(!(!n||!i))return`${n}/${i}/${e}`}he.AptosChainInfo={[x.AptosChainId.APTOS_MAINNET]:{name:"Aptos Mainnet",chainId:x.AptosChainId.APTOS_MAINNET,explorerUrl:"https://explorer.aptoslabs.com",suffix:"?network=mainnet",lightIcon:"https://sentio.xyz/chains/aptos.svg",darkIcon:"https://sentio.xyz/chains/aptos-dark.svg"},[x.AptosChainId.APTOS_TESTNET]:{name:"Aptos Testnet",chainId:x.AptosChainId.APTOS_TESTNET,explorerUrl:"https://explorer.aptoslabs.com",suffix:"?network=testnet",lightIcon:"https://sentio.xyz/chains/aptos.svg",darkIcon:"https://sentio.xyz/chains/aptos-dark.svg"},[x.AptosChainId.APTOS_MOVEMENT_MAINNET]:{name:"Movement Mainnet Aptos",chainId:x.AptosChainId.APTOS_MOVEMENT_MAINNET,explorerUrl:"https://explorer.movementnetwork.xyz",suffix:"?network=mainnet",lightIcon:"https://sentio.xyz/chains/movement.svg",darkIcon:"https://sentio.xyz/chains/movement-dark.svg"},[x.AptosChainId.APTOS_MOVEMENT_TESTNET]:{name:"Movement Testnet Aptos",chainId:x.AptosChainId.APTOS_MOVEMENT_TESTNET,explorerUrl:"https://explorer.movementnetwork.xyz",suffix:"?network=testnet",lightIcon:"https://sentio.xyz/chains/movement.svg",darkIcon:"https://sentio.xyz/chains/movement-dark.svg"}};var Xhe={block:"block",address:"account",tx:"txn",token:void 0};function epe(r,e,t){let{explorerUrl:n,suffix:i}=he.AptosChainInfo[r],s=Xhe[t];if(s)return`${n}/${s}/${e}${i}`}he.SolanaChainInfo={[x.SolanaChainId.SOLANA_MAINNET]:{name:"Solana Mainnet",chainId:x.SolanaChainId.SOLANA_MAINNET,explorerUrl:"https://solscan.io/",suffix:"",lightIcon:"https://sentio.xyz/solana.svg"},[x.SolanaChainId.SOLANA_TESTNET]:{name:"Solana Testnet",chainId:x.SolanaChainId.SOLANA_MAINNET,explorerUrl:"https://solscan.io/",suffix:"?cluster=testnet",lightIcon:"https://sentio.xyz/solana.svg"}};var tpe={block:"block",address:"address",tx:"tx",token:"token"};function rpe(r,e,t){let{explorerUrl:n,suffix:i}=he.SolanaChainInfo[r],s=tpe[t];if(s)return`${n}${s}/${e}${i}`}var vd={[x.SuiChainId.SUI_MAINNET]:{name:"Sui Mainnet",chainId:x.SuiChainId.SUI_MAINNET,suivisionUrl:"https://suivision.xyz",explorerUrl:"https://suiscan.xyz/mainnet",lightIcon:"https://sentio.xyz/chains/sui.svg",darkIcon:"https://sentio.xyz/chains/sui-dark.svg"},[x.SuiChainId.SUI_TESTNET]:{name:"Sui Testnet",chainId:x.SuiChainId.SUI_TESTNET,suivisionUrl:"https://testnet.suivision.xyz",explorerUrl:"https://suiscan.xyz/testnet",lightIcon:"https://sentio.xyz/chains/sui.svg",darkIcon:"https://sentio.xyz/chains/sui-dark.svg"}},npe={block:"checkpoint",address:"account",tx:"tx",token:"coin",object:"object"},ipe={block:"checkpoint",address:"account",tx:"txblock",token:"coin",object:"object"};function spe(r,e,t){let n=vd[r];if(!n||!n.explorerUrl)return;let i=npe[t];if(i)return`${n.explorerUrl}/${i}/${e}`}function ope(r,e,t){let n=vd[r];if(!n||!n.suivisionUrl)return;let i=ipe[t];if(i)return`${n.suivisionUrl}/${i}/${e}`}var Cy={[x.FuelChainId.FUEL_MAINNET]:{name:"Fuel Mainnet",chainId:x.FuelChainId.FUEL_MAINNET,explorerUrl:"https://app.fuel.network",lightIcon:"https://sentio.xyz/chains/fuel.svg"},[x.FuelChainId.FUEL_TESTNET]:{name:"Fuel Testnet",chainId:x.FuelChainId.FUEL_TESTNET,explorerUrl:"https://app-testnet.fuel.network",lightIcon:"https://sentio.xyz/chains/fuel.svg"}},ape={block:"block",address:"account",tx:"tx",token:void 0};function cpe(r,e,t){let{explorerUrl:n}=Cy[r],i=ape[t];if(i)return`${n}/${i}/${e}`}function lpe(r,e,t){if(!r||!e||!t)return;let n=r.toString();if(Object.keys(he.EthChainInfo).includes(n))return $he(n,e,t);if(Object.keys(he.BTCChainInfo).includes(n))return Zhe(n,e,t);if(Object.keys(he.AptosChainInfo).includes(n))return epe(n,e,t);if(Object.keys(he.SolanaChainInfo).includes(n))return rpe(n,e,t);if(Object.keys(vd).includes(n))return ope(n,e,t);if(Object.keys(Cy).includes(n))return cpe(n,e,t)}he.getChainExternalUrl=lpe;function upe(r,e,t){if(!r||!e||!t)return;let n=he.EthChainInfo[r];if(n&&n.blockscoutUrl)return`${n.blockscoutUrl}/${t}/${e}`}he.getChainBlockscoutUrl=upe;function dpe(r,e,t){if(!(!r||!e||!t))return spe(r,e,t)}he.getSuiscanUrl=dpe;function Ho(r,e){let t="https://sentio.xyz/chains/chain-unknown.webp";return r?e&&r?.darkIcon?r.darkIcon:r?.lightIcon?r.lightIcon:t:t}function fpe(r,e){if(!r)return;let t=r.toString();return Object.keys(he.EthChainInfo).includes(t)?Ho(he.EthChainInfo[t],e):Object.keys(he.BTCChainInfo).includes(t)?Ho(he.BTCChainInfo[t],e):Object.keys(he.AptosChainInfo).includes(t)?Ho(he.AptosChainInfo[t],e):Object.keys(he.SolanaChainInfo).includes(t)?Ho(he.SolanaChainInfo[t],e):Object.keys(vd).includes(t)?Ho(vd[t],e):Object.keys(Cy).includes(t)?Ho(Cy[t],e):Ho()}he.getChainLogo=fpe});var c6=m(Lr=>{"use strict";Object.defineProperty(Lr,"__esModule",{value:!0});Lr.getChainScanUrl=Lr.getChainName=Lr.CHAIN_MAP=void 0;var il=Ty(),hpe=mS();Lr.CHAIN_MAP={[il.ChainId.APTOS_MOVEMENT_MAINNET]:"Movement Mainnet",[il.ChainId.APTOS_MOVEMENT_TESTNET]:"Movement Testnet",[il.ChainId.BTC_MAINNET]:"Bitcoin Mainnet",[il.ChainId.BTC_TESTNET]:"Bitcoin Testnet",[il.ChainId.MEV_COMMIT]:"Mev-commit"};for(let[r,e]of Object.entries(il.ChainId)){if(Lr.CHAIN_MAP[e])continue;let t=hpe.EthChainInfo[e];if(t){Lr.CHAIN_MAP[e]=t.name;continue}let n=r.split("_");Lr.CHAIN_MAP[e]=n.map((i,s)=>i[0]+i.slice(1).toLowerCase()).join(" ")}function a6(r){if(typeof r=="number"&&(r=r.toString()),r){let e=Lr.CHAIN_MAP[r];if(e)return e}return r||""}Lr.getChainName=a6;function ppe(r,e,t){let n=a6(r);if(n==="Ethereum")return t==="block"?`https://etherscan.io/block/${e}`:t==="address"?`https://etherscan.io/address/${e}`:`https://etherscan.io/tx/${e}`;if(n==="Polygon")return t==="block"?`https://polygonscan.com/block/${e}`:t==="address"?`https://polygonscan.com/address/${e}`:`https://polygonscan.com/tx/${e}`;if(n.startsWith("Aptos ")){let i="?network=mainnet";return n.includes("Testnet")?i="?network=testnet":n.includes("Devnet")&&(i="?network=devnet"),t==="block"?`https://explorer.aptoslabs.com/block/${e}/${i}`:t==="address"?`https://explorer.aptoslabs.com/account/${e}/${i}`:`https://explorer.aptoslabs.com/txn/${e}/${i}`}if(n.startsWith("Solana "))return t==="block"?`https://explorer.solana.com/block/${e}`:t==="address"?`https://explorer.solana.com/address/${e}`:`https://explorer.solana.io/tx/${e}`;if(n.startsWith("Sui "))return t==="block"?`https://suivision.xyz/checkpoint/${e}`:t==="address"?`https://suivision.xyz/account/${e}`:`https://suivision.xyz/txblock/${e}`}Lr.getChainScanUrl=ppe});var l6=m(mi=>{"use strict";var mpe=mi&&mi.__createBinding||(Object.create?function(r,e,t,n){n===void 0&&(n=t);var i=Object.getOwnPropertyDescriptor(e,t);(!i||("get"in i?!e.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return e[t]}}),Object.defineProperty(r,n,i)}:function(r,e,t,n){n===void 0&&(n=t),r[n]=e[t]}),gS=mi&&mi.__exportStar||function(r,e){for(var t in r)t!=="default"&&!Object.prototype.hasOwnProperty.call(e,t)&&mpe(e,r,t)};Object.defineProperty(mi,"__esModule",{value:!0});gS(Ty(),mi);gS(mS(),mi);gS(c6(),mi)});function NS(r){let e={...RS.create(),states:Ly.create()};return B6(e,r)}function B6(r,e){r.states=r.states||Ly.create();for(let t of e)r.counters=fl(r.counters,t.counters),r.gauges=fl(r.gauges,t.gauges),r.events=fl(r.events,t.events),r.exports=fl(r.exports,t.exports),r.timeseriesResult=fl(r.timeseriesResult,t.timeseriesResult),r.states={configUpdated:r.states?.configUpdated||t.states?.configUpdated||!1};return r}function fl(r,e){let t=r||[];if(Array.isArray(e))for(let n of e)t.push(n);return t}function hl(r){return r.message+`
31
31
  `+r.stack}var Npe="user_processor";function By(r){if(!r.context)throw new Error("null context for eth call");let{chainId:e,address:t,blockTag:n}=r.context;return`${e}|${t}|${n}|${r.calldata}`.toLowerCase()}function Mpe(r){let[e,t,n,i,s,o]=r.match(/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/)??[];return{semVer:e,major:parseInt(t),minor:parseInt(n),patch:parseInt(i),prerelease:s,buildmetadata:o}}function Dpe(r,e){let{major:t,minor:n,patch:i,prerelease:s}=r,{major:o,minor:a,patch:c,prerelease:l}=e;if(t!==o)return t-o;if(n!==a)return n-a;if(i!==c)return i-c;if(s&&l){let[u,d]=s.split("."),[f,h]=l.split(".");return u!==f?u.localeCompare(f):parseInt(d)-parseInt(h)}else{if(s)return-1;if(l)return 1}return 0}import("node:process").then(r=>r.stdout.write(""));var OC=Go(xC(),1);import U7 from"path";var ar=class r{static INSTANCE=new r;concurrency=8;chainQueryAPI="";priceFeedAPI="";chainServer=new Map;batchCount=1};function v0e(r){let e=U7.resolve(r["chains-config"]),t=OC.default.readJsonSync(e),n=process.env.OVERRIDE_CONCURRENCY?parseInt(process.env.OVERRIDE_CONCURRENCY):void 0,i=process.env.OVERRIDE_BATCH_COUNT?parseInt(process.env.OVERRIDE_BATCH_COUNT):void 0;ar.INSTANCE.concurrency=n??r.concurrency,ar.INSTANCE.batchCount=i??r["batch-count"],ar.INSTANCE.chainQueryAPI=r["chainquery-server"],ar.INSTANCE.priceFeedAPI=r["pricefeed-server"];for(let[s,o]of Object.entries(t)){let a=o;if(a.ChainServer)ar.INSTANCE.chainServer.set(s,a.ChainServer);else{let c=a.Https?.[0];c?ar.INSTANCE.chainServer.set(s,c):console.error("not valid config for chain",s)}}}import("node:process").then(r=>r.stdout.write(""));var ja={execution:{sequential:!1,forceExactBlockTime:!1}};function fR(){hR(ja.execution)}function hR(r){let e=Reflect.ownKeys(r);for(let t of e){let n=r[t];(n&&typeof n=="object"||typeof n=="function")&&hR(n)}return Object.freeze(r)}import("node:process").then(r=>r.stdout.write(""));AN();import{AsyncLocalStorage as wK}from"node:async_hooks";var PA=()=>vu.getMeter("processor"),fe=class{constructor(e){this.name=e}_counter;value=0;get counter(){return this._counter||(this._counter=PA().createCounter(this.name)),this._counter}add(e,t){this.counter.add(e,t),this.value+=e}get(){return this.value}},Va=class{constructor(e){this.name=e}_gauge;value=0;get gauge(){return this._gauge||(this._gauge=PA().createGauge(this.name)),this._gauge}record(e,t){this.gauge.record(e,t),this.value=e}get(){return this.value}},bu=class{constructor(e){this.name=e}_histogram;value=0;get histogram(){return this._histogram||(this._histogram=PA().createHistogram(this.name)),this._histogram}record(e,t){this.histogram.record(e,t),this.value=e}get(){return this.value}},wN={send_counts:{get:new fe("store_get_send"),upsert:new fe("store_upsert_send"),list:new fe("store_list_send"),delete:new fe("store_delete_send"),update:new fe("store_update_send")},recv_counts:{get:new fe("store_get_recv"),upsert:new fe("store_upsert_recv"),list:new fe("store_list_recv"),delete:new fe("store_delete_recv"),update:new fe("store_update_recv")},request_times:{get:new fe("store_get_time"),upsert:new fe("store_upsert_time"),list:new fe("store_list_time"),delete:new fe("store_delete_time"),update:new fe("store_update_time")},request_errors:{get:new fe("store_get_error"),upsert:new fe("store_upsert_error"),list:new fe("store_list_error"),delete:new fe("store_delete_error"),update:new fe("store_update_error")},batched_total_count:new fe("batched_total_count"),batched_request_count:new fe("batched_request_count"),unsolved_requests:new Va("store_unsolved_requests"),stats(){return{send_counts:{get:this.send_counts.get.get(),upsert:this.send_counts.upsert.get(),list:this.send_counts.list.get(),delete:this.send_counts.delete.get()},recv_counts:{get:this.recv_counts.get.get(),upsert:this.recv_counts.upsert.get(),list:this.recv_counts.list.get(),delete:this.recv_counts.delete.get()},request_times:{get:this.request_times.get.get(),upsert:this.request_times.upsert.get(),list:this.request_times.list.get(),delete:this.request_times.delete.get()},request_errors:{get:this.request_errors.get.get(),upsert:this.request_errors.upsert.get(),list:this.request_errors.list.get(),delete:this.request_errors.delete.get()},batched_total_count:this.batched_total_count.get(),batched_request_count:this.batched_request_count.get(),unsolved_requests:this.unsolved_requests.get(),average_request_time:{get:this.request_times.get.get()/this.send_counts.get.get(),upsert:this.request_times.upsert.get()/this.send_counts.upsert.get(),list:this.request_times.list.get()/this.send_counts.list.get()}}}},EN={hit_count:new fe("provider_hit_count"),miss_count:new fe("provider_miss_count"),queue_size:new Va("provider_queue_size"),total_duration:new fe("provider_total_duration"),total_queued:new fe("provider_total_queued"),stats(){return{hit_count:this.hit_count.get(),miss_count:this.miss_count.get(),queue_size:this.queue_size.get(),total_duration:this.total_duration.get(),total_queued:this.total_queued.get(),average_queue_time:this.total_queued.get()/(this.hit_count.get()+this.miss_count.get()),average_duration:this.total_duration.get()/(this.hit_count.get()+this.miss_count.get())}}},uo={process_binding_count:new fe("process_binding_count"),process_binding_time:new fe("process_binding_time"),process_binding_error:new fe("process_binding_error"),process_ethcall_count:new fe("process_ethcall_count"),process_eventemit_count:new fe("process_eventemit_count"),process_metricrecord_count:new fe("process_metricrecord_count"),process_pricecall_count:new fe("process_pricecall_count"),process_template_count:new fe("process_template_count"),process_handler_duration:new Va("process_handler_duration"),processor_handler_duration:new bu("processor_handler_duration"),processor_rpc_duration:new bu("processor_rpc_duration"),processor_rpc_queue_duration:new bu("processor_rpc_queue_duration"),processor_template_instance_count:new fe("process_template_instance_count"),processor_worker_run_time:new fe("processor_worker_run_time"),processor_worker_wait_time:new fe("processor_worker_wait_time"),processor_worker_queue_size:new Va("processor_worker_queue_size"),processor_worker_completed:new fe("processor_worker_completed"),stats(){return{process_binding_count:this.process_binding_count.get(),process_binding_time:this.process_binding_time.get(),process_binding_error:this.process_binding_error.get(),process_ethcall_count:this.process_ethcall_count.get(),process_eventemit_count:this.process_eventemit_count.get(),process_metricrecord_count:this.process_metricrecord_count.get(),process_pricecall_count:this.process_pricecall_count.get(),process_template_count:this.process_template_count.get(),process_handler_duration:this.process_handler_duration.get(),processor_handler_duration:this.processor_handler_duration.get(),processor_rpc_duration:this.processor_rpc_duration.get(),processor_rpc_queue_duration:this.processor_rpc_queue_duration.get(),processor_template_instance_count:this.processor_template_instance_count.get(),processor_worker_run_time:this.processor_worker_run_time.get(),processor_worker_wait_time:this.processor_worker_wait_time.get(),processor_worker_queue_size:this.processor_worker_queue_size.get(),processor_worker_completed:this.processor_worker_completed.get()}}},SN=new wK;import("node:process").then(r=>r.stdout.write(""));import*as Wa from"node:process";var{request_errors:EK,unsolved_requests:TN,request_times:CN,batched_request_count:SK,batched_total_count:TK,send_counts:xN,recv_counts:CK}=wN,ON=Wa.env.STORE_BATCH_MAX_IDLE?parseInt(Wa.env.STORE_BATCH_MAX_IDLE):1,IN=Wa.env.STORE_BATCH_SIZE?parseInt(Wa.env.STORE_BATCH_SIZE):10,kA=Wa.env.STORE_UPSERT_NO_WAIT==="true",PN=new Error("timeout"),RA=class{constructor(e){this.processId=e}static opCounter=0n;defers=new Map;statsInterval;pendings=[];newPromise(e,t){return new Promise((n,i)=>{this.defers.set(e,{resolve:n,reject:i,requestType:t}),TN.record(this.defers.size,{processId:this.processId})})}sendRequest(e,t){if(ON>0&&IN>1&&e.upsert)return this.sendUpsertInBatch(e.upsert);let n=Object.keys(e)[0],i=Ka.opCounter++,s=this.newPromise(i,n),o=Date.now(),a=[s],c;if(t){let l=new Promise((u,d)=>c=setTimeout(d,t*1e3,PN));a.push(l)}return this.doSend({dbRequest:{...e,opId:i}}),xN[n]?.add(1),n==="upsert"&&kA?(this.pendings.push(s),Promise.resolve({opId:i})):Promise.race(a).then(l=>(CN[n]?.add(Date.now()-o),l)).catch(l=>{throw l===PN&&console.error("db request",n,"op:",i," timeout"),EK[n]?.add(1),l}).finally(()=>{c&&clearTimeout(c)})}result(e){let t=e.opId,n=this.defers.get(t);n&&(n.requestType&&CK[n.requestType]?.add(1),e.error?n.reject(new Error(e.error)):n.resolve(e),this.defers.delete(t)),TN.record(this.defers.size,{processId:this.processId})}error(e,t){let n=t.stack;console.error("process error",e,t,n);let i=Sd.create({states:{error:t?.toString()+(n?`
32
32
  ${n}`:"")}});this.doSend({result:i,processId:e})}close(){for(let[e,t]of this.defers)t.reject(new Error("context closed before db response, processId: "+this.processId+" opId: "+e));this.defers.clear(),this.statsInterval&&clearInterval(this.statsInterval)}upsertBatch=void 0;async sendUpsertInBatch(e){if(this.upsertBatch){let{request:t,promise:n}=this.upsertBatch;return t.entity=this.upsertBatch.request.entity.concat(e.entity),t.entityData=this.upsertBatch.request.entityData.concat(e.entityData),t.id=this.upsertBatch.request.id.concat(e.id),t.entity.length>=IN&&this.sendBatch(),kA?{opId:this.upsertBatch.opId}:n}else{let t=Ka.opCounter++,n=setTimeout(()=>{this.sendBatch()},ON),i=Date.now(),s=this.newPromise(t,"upsert").finally(()=>{CN.upsert.add(Date.now()-i)});return this.upsertBatch={opId:t,request:e,promise:s,timer:n},kA?(this.pendings.push(s),{opId:this.upsertBatch.opId}):s}}sendBatch(){if(this.upsertBatch){let{request:e,opId:t,timer:n}=this.upsertBatch;clearTimeout(n),this.upsertBatch=void 0,this.doSend({dbRequest:{upsert:e,opId:t}}),xN.upsert?.add(1),SK.add(1),TK.add(e.entity.length)}}async awaitPendings(){await Promise.all(this.pendings)}},Ka=class extends RA{constructor(t,n){super(n);this.subject=t}doSend(t){this.subject.next({...t,processId:this.processId})}};import("node:process").then(r=>r.stdout.write(""));var iq="6.13.1";function Bue(r,e,t){let n=e.split("|").map(s=>s.trim());for(let s=0;s<n.length;s++)switch(e){case"any":return;case"bigint":case"boolean":case"number":case"string":if(typeof r===e)return}let i=new Error(`invalid value for type ${e}`);throw i.code="INVALID_ARGUMENT",i.argument=`value.${t}`,i.value=r,i}async function Je(r){let e=Object.keys(r);return(await Promise.all(e.map(n=>Promise.resolve(r[n])))).reduce((n,i,s)=>(n[e[s]]=i,n),{})}function Q(r,e,t){for(let n in e){let i=e[n],s=t?t[n]:null;s&&Bue(i,s,n),Object.defineProperty(r,n,{enumerable:!0,value:i,writable:!1})}}function kc(r){if(r==null)return"null";if(Array.isArray(r))return"[ "+r.map(kc).join(", ")+" ]";if(r instanceof Uint8Array){let e="0123456789abcdef",t="0x";for(let n=0;n<r.length;n++)t+=e[r[n]>>4],t+=e[r[n]&15];return t}if(typeof r=="object"&&typeof r.toJSON=="function")return kc(r.toJSON());switch(typeof r){case"boolean":case"symbol":return r.toString();case"bigint":return BigInt(r).toString();case"number":return r.toString();case"string":return JSON.stringify(r);case"object":{let e=Object.keys(r);return e.sort(),"{ "+e.map(t=>`${kc(t)}: ${kc(r[t])}`).join(", ")+" }"}}return"[ COULD NOT SERIALIZE ]"}function je(r,e){return r&&r.code===e}function Rc(r){return je(r,"CALL_EXCEPTION")}function xe(r,e,t){let n=r;{let s=[];if(t){if("message"in t||"code"in t||"name"in t)throw new Error(`value will overwrite populated values: ${kc(t)}`);for(let o in t){if(o==="shortMessage")continue;let a=t[o];s.push(o+"="+kc(a))}}s.push(`code=${e}`),s.push(`version=${iq}`),s.length&&(r+=" ("+s.join(", ")+")")}let i;switch(e){case"INVALID_ARGUMENT":i=new TypeError(r);break;case"NUMERIC_FAULT":case"BUFFER_OVERRUN":i=new RangeError(r);break;default:i=new Error(r)}return Q(i,{code:e}),t&&Object.assign(i,t),i.shortMessage==null&&Q(i,{shortMessage:n}),i}function P(r,e,t,n){if(!r)throw xe(e,t,n)}function w(r,e,t,n){P(r,e,"INVALID_ARGUMENT",{argument:t,value:n})}function qu(r,e,t){t==null&&(t=""),t&&(t=": "+t),P(r>=e,"missing arguemnt"+t,"MISSING_ARGUMENT",{count:r,expectedCount:e}),P(r<=e,"too many arguments"+t,"UNEXPECTED_ARGUMENT",{count:r,expectedCount:e})}var Fue=["NFD","NFC","NFKD","NFKC"].reduce((r,e)=>{try{if("test".normalize(e)!=="test")throw new Error("bad");if(e==="NFD"&&"\xE9".normalize("NFD")!=="e\u0301")throw new Error("broken");r.push(e)}catch{}return r},[]);function Kw(r){P(Fue.indexOf(r)>=0,"platform missing String.prototype.normalize","UNSUPPORTED_OPERATION",{operation:"String.prototype.normalize",info:{form:r}})}function vs(r,e,t){if(t==null&&(t=""),r!==e){let n=t,i="new";t&&(n+=".",i+=" "+t),P(!1,`private constructor; use ${n}from* methods`,"UNSUPPORTED_OPERATION",{operation:i})}}function oq(r,e,t){if(r instanceof Uint8Array)return t?new Uint8Array(r):r;if(typeof r=="string"&&r.match(/^0x(?:[0-9a-f][0-9a-f])*$/i)){let n=new Uint8Array((r.length-2)/2),i=2;for(let s=0;s<n.length;s++)n[s]=parseInt(r.substring(i,i+2),16),i+=2;return n}w(!1,"invalid BytesLike value",e||"value",r)}function ie(r,e){return oq(r,e,!1)}function Ge(r,e){return oq(r,e,!0)}function me(r,e){return!(typeof r!="string"||!r.match(/^0x[0-9A-Fa-f]*$/)||typeof e=="number"&&r.length!==2+2*e||e===!0&&r.length%2!==0)}function Eo(r){return me(r,!0)||r instanceof Uint8Array}var sq="0123456789abcdef";function U(r){let e=ie(r),t="0x";for(let n=0;n<e.length;n++){let i=e[n];t+=sq[(i&240)>>4]+sq[i&15]}return t}function Ee(r){return"0x"+r.map(e=>U(e).substring(2)).join("")}function Rn(r){return me(r,!0)?(r.length-2)/2:ie(r).length}function Le(r,e,t){let n=ie(r);return t!=null&&t>n.length&&P(!1,"cannot slice beyond data bounds","BUFFER_OVERRUN",{buffer:n,length:n.length,offset:t}),U(n.slice(e??0,t??n.length))}function aq(r,e,t){let n=ie(r);P(e>=n.length,"padding exceeds data length","BUFFER_OVERRUN",{buffer:new Uint8Array(n),length:e,offset:e+1});let i=new Uint8Array(e);return i.fill(0),t?i.set(n,e-n.length):i.set(n,0),U(i)}function mr(r,e){return aq(r,e,!0)}function Qw(r,e){return aq(r,e,!1)}var vg=BigInt(0),Yr=BigInt(1),Nc=9007199254740991;function Jw(r,e){let t=Bu(r,"value"),n=BigInt(ce(e,"width"));if(P(t>>n===vg,"overflow","NUMERIC_FAULT",{operation:"fromTwos",fault:"overflow",value:r}),t>>n-Yr){let i=(Yr<<n)-Yr;return-((~t&i)+Yr)}return t}function Lu(r,e){let t=H(r,"value"),n=BigInt(ce(e,"width")),i=Yr<<n-Yr;if(t<vg){t=-t,P(t<=i,"too low","NUMERIC_FAULT",{operation:"toTwos",fault:"overflow",value:r});let s=(Yr<<n)-Yr;return(~t&s)+Yr}else P(t<i,"too high","NUMERIC_FAULT",{operation:"toTwos",fault:"overflow",value:r});return t}function bs(r,e){let t=Bu(r,"value"),n=BigInt(ce(e,"bits"));return t&(Yr<<n)-Yr}function H(r,e){switch(typeof r){case"bigint":return r;case"number":return w(Number.isInteger(r),"underflow",e||"value",r),w(r>=-Nc&&r<=Nc,"overflow",e||"value",r),BigInt(r);case"string":try{if(r==="")throw new Error("empty string");return r[0]==="-"&&r[1]!=="-"?-BigInt(r.substring(1)):BigInt(r)}catch(t){w(!1,`invalid BigNumberish string: ${t.message}`,e||"value",r)}}w(!1,"invalid BigNumberish value",e||"value",r)}function Bu(r,e){let t=H(r,e);return P(t>=vg,"unsigned value cannot be negative","NUMERIC_FAULT",{fault:"overflow",operation:"getUint",value:r}),t}var cq="0123456789abcdef";function Mc(r){if(r instanceof Uint8Array){let e="0x0";for(let t of r)e+=cq[t>>4],e+=cq[t&15];return BigInt(e)}return H(r)}function ce(r,e){switch(typeof r){case"bigint":return w(r>=-Nc&&r<=Nc,"overflow",e||"value",r),Number(r);case"number":return w(Number.isInteger(r),"underflow",e||"value",r),w(r>=-Nc&&r<=Nc,"overflow",e||"value",r),r;case"string":try{if(r==="")throw new Error("empty string");return ce(BigInt(r),e)}catch(t){w(!1,`invalid numeric string: ${t.message}`,e||"value",r)}}w(!1,"invalid numeric value",e||"value",r)}function $w(r){return ce(Mc(r))}function ir(r,e){let n=Bu(r,"value").toString(16);if(e==null)n.length%2&&(n="0"+n);else{let i=ce(e,"width");for(P(i*2>=n.length,`value exceeds width (${i} bytes)`,"NUMERIC_FAULT",{operation:"toBeHex",fault:"overflow",value:r});n.length<i*2;)n="0"+n}return"0x"+n}function et(r){let e=Bu(r,"value");if(e===vg)return new Uint8Array([]);let t=e.toString(16);t.length%2&&(t="0"+t);let n=new Uint8Array(t.length/2);for(let i=0;i<n.length;i++){let s=i*2;n[i]=parseInt(t.substring(s,s+2),16)}return n}function Nn(r){let e=U(Eo(r)?r:et(r)).substring(2);for(;e.startsWith("0");)e=e.substring(1);return e===""&&(e="0"),"0x"+e}var lq="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";var LEe=BigInt(0),uq=BigInt(58);function Yw(r){let e=ie(r),t=Mc(e),n="";for(;t;)n=lq[Number(t%uq)]+n,t/=uq;for(let i=0;i<e.length&&!e[i];i++)n=lq[0]+n;return n}function dq(r){return Ge(Buffer.from(r,"base64"))}function fq(r){return Buffer.from(ie(r)).toString("base64")}var So=class{filter;emitter;#e;constructor(e,t,n){this.#e=t,Q(this,{emitter:e,filter:n})}async removeListener(){this.#e!=null&&await this.emitter.off(this.filter,this.#e)}};function Uue(r,e,t,n,i){w(!1,`invalid codepoint at offset ${e}; ${r}`,"bytes",t)}function hq(r,e,t,n,i){if(r==="BAD_PREFIX"||r==="UNEXPECTED_CONTINUE"){let s=0;for(let o=e+1;o<t.length&&t[o]>>6===2;o++)s++;return s}return r==="OVERRUN"?t.length-e-1:0}function jue(r,e,t,n,i){return r==="OVERLONG"?(w(typeof i=="number","invalid bad code point for replacement","badCodepoint",i),n.push(i),0):(n.push(65533),hq(r,e,t,n,i))}var pq=Object.freeze({error:Uue,ignore:hq,replace:jue});function zue(r,e){e==null&&(e=pq.error);let t=ie(r,"bytes"),n=[],i=0;for(;i<t.length;){let s=t[i++];if(!(s>>7)){n.push(s);continue}let o=null,a=null;if((s&224)===192)o=1,a=127;else if((s&240)===224)o=2,a=2047;else if((s&248)===240)o=3,a=65535;else{(s&192)===128?i+=e("UNEXPECTED_CONTINUE",i-1,t,n):i+=e("BAD_PREFIX",i-1,t,n);continue}if(i-1+o>=t.length){i+=e("OVERRUN",i-1,t,n);continue}let c=s&(1<<8-o-1)-1;for(let l=0;l<o;l++){let u=t[i];if((u&192)!=128){i+=e("MISSING_CONTINUE",i,t,n),c=null;break}c=c<<6|u&63,i++}if(c!==null){if(c>1114111){i+=e("OUT_OF_RANGE",i-1-o,t,n,c);continue}if(c>=55296&&c<=57343){i+=e("UTF16_SURROGATE",i-1-o,t,n,c);continue}if(c<=a){i+=e("OVERLONG",i-1-o,t,n,c);continue}n.push(c)}}return n}function Kt(r,e){w(typeof r=="string","invalid string value","str",r),e!=null&&(Kw(e),r=r.normalize(e));let t=[];for(let n=0;n<r.length;n++){let i=r.charCodeAt(n);if(i<128)t.push(i);else if(i<2048)t.push(i>>6|192),t.push(i&63|128);else if((i&64512)==55296){n++;let s=r.charCodeAt(n);w(n<r.length&&(s&64512)===56320,"invalid surrogate pair","str",r);let o=65536+((i&1023)<<10)+(s&1023);t.push(o>>18|240),t.push(o>>12&63|128),t.push(o>>6&63|128),t.push(o&63|128)}else t.push(i>>12|224),t.push(i>>6&63|128),t.push(i&63|128)}return new Uint8Array(t)}function Hue(r){return r.map(e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10&1023)+55296,(e&1023)+56320))).join("")}function _s(r,e){return Hue(zue(r,e))}import Gue from"http";import Vue from"https";import{gunzipSync as Wue}from"zlib";function bg(r){async function e(t,n){P(n==null||!n.cancelled,"request cancelled before sending","CANCELLED");let i=t.url.split(":")[0].toLowerCase();P(i==="http"||i==="https",`unsupported protocol ${i}`,"UNSUPPORTED_OPERATION",{info:{protocol:i},operation:"request"}),P(i==="https"||!t.credentials||t.allowInsecureAuthentication,"insecure authorized connections unsupported","UNSUPPORTED_OPERATION",{operation:"request"});let s=t.method,o=Object.assign({},t.headers),a={method:s,headers:o};r&&r.agent&&(a.agent=r.agent);let c=null;try{c=new AbortController,a.abort=c.signal}catch(d){console.log(d)}let l=(i==="http"?Gue:Vue).request(t.url,a);l.setTimeout(t.timeout);let u=t.body;return u&&l.write(Buffer.from(u)),l.end(),new Promise((d,f)=>{n&&n.addListener(()=>{c&&c.abort(),f(xe("request cancelled","CANCELLED"))}),l.on("timeout",()=>{let h;if(u)try{h=JSON.parse(Buffer.from(u).toString("utf8"))}catch{}f(xe("request timeout","TIMEOUT",{payload:h}))}),l.once("response",h=>{let g=h.statusCode||0,p=h.statusMessage||"",b=Object.keys(h.headers||{}).reduce((A,E)=>{let C=h.headers[E]||"";return Array.isArray(C)&&(C=C.join(", ")),A[E]=C,A},{}),y=null;h.on("data",A=>{if(n)try{n.checkSignal()}catch(E){return f(E)}if(y==null)y=A;else{let E=new Uint8Array(y.length+A.length);E.set(y,0),E.set(A,y.length),y=E}}),h.on("end",()=>{b["content-encoding"]==="gzip"&&y&&(y=ie(Wue(y))),d({statusCode:g,statusMessage:p,headers:b,body:y})}),h.on("error",A=>{A.response={statusCode:g,statusMessage:p,headers:b,body:y},f(A)})}),l.on("error",h=>{f(h)})})}return e}var YEe=bg({});var Kue=12,Que=250,mq=bg(),Jue=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),$ue=new RegExp("^ipfs://(ipfs/)?(.*)$","i"),Zw=!1;async function yq(r,e){try{let t=r.match(Jue);if(!t)throw new Error("invalid data");return new oi(200,"OK",{"content-type":t[1]||"text/plain"},t[2]?dq(t[3]):Yue(t[3]))}catch{return new oi(599,"BAD REQUEST (invalid data: URI)",{},null,new gr(r))}}function vq(r){async function e(t,n){try{let i=t.match($ue);if(!i)throw new Error("invalid link");return new gr(`${r}${i[2]}`)}catch{return new oi(599,"BAD REQUEST (invalid IPFS URI)",{},null,new gr(t))}}return e}var _g={data:yq,ipfs:vq("https://gateway.ipfs.io/ipfs/")},bq=new WeakMap,wg=class{#e;#t;constructor(e){this.#e=[],this.#t=!1,bq.set(e,()=>{if(!this.#t){this.#t=!0;for(let t of this.#e)setTimeout(()=>{t()},0);this.#e=[]}})}addListener(e){P(!this.#t,"singal already cancelled","UNSUPPORTED_OPERATION",{operation:"fetchCancelSignal.addCancelListener"}),this.#e.push(e)}get cancelled(){return this.#t}checkSignal(){P(!this.cancelled,"cancelled","CANCELLED",{})}};function Ag(r){if(r==null)throw new Error("missing signal; should not happen");return r.checkSignal(),r}var gr=class r{#e;#t;#r;#n;#s;#a;#i;#d;#l;#c;#o;#p;#u;#f;#h;get url(){return this.#a}set url(e){this.#a=String(e)}get body(){return this.#i==null?null:new Uint8Array(this.#i)}set body(e){if(e==null)this.#i=void 0,this.#d=void 0;else if(typeof e=="string")this.#i=Kt(e),this.#d="text/plain";else if(e instanceof Uint8Array)this.#i=e,this.#d="application/octet-stream";else if(typeof e=="object")this.#i=Kt(JSON.stringify(e)),this.#d="application/json";else throw new Error("invalid body")}hasBody(){return this.#i!=null}get method(){return this.#n?this.#n:this.hasBody()?"POST":"GET"}set method(e){e==null&&(e=""),this.#n=String(e).toUpperCase()}get headers(){let e=Object.assign({},this.#r);return this.#l&&(e.authorization=`Basic ${fq(Kt(this.#l))}`),this.allowGzip&&(e["accept-encoding"]="gzip"),e["content-type"]==null&&this.#d&&(e["content-type"]=this.#d),this.body&&(e["content-length"]=String(this.body.length)),e}getHeader(e){return this.headers[e.toLowerCase()]}setHeader(e,t){this.#r[String(e).toLowerCase()]=String(t)}clearHeaders(){this.#r={}}[Symbol.iterator](){let e=this.headers,t=Object.keys(e),n=0;return{next:()=>{if(n<t.length){let i=t[n++];return{value:[i,e[i]],done:!1}}return{value:void 0,done:!0}}}}get credentials(){return this.#l||null}setCredentials(e,t){w(!e.match(/:/),"invalid basic authentication username","username","[REDACTED]"),this.#l=`${e}:${t}`}get allowGzip(){return this.#t}set allowGzip(e){this.#t=!!e}get allowInsecureAuthentication(){return!!this.#e}set allowInsecureAuthentication(e){this.#e=!!e}get timeout(){return this.#s}set timeout(e){w(e>=0,"timeout must be non-zero","timeout",e),this.#s=e}get preflightFunc(){return this.#c||null}set preflightFunc(e){this.#c=e}get processFunc(){return this.#o||null}set processFunc(e){this.#o=e}get retryFunc(){return this.#p||null}set retryFunc(e){this.#p=e}get getUrlFunc(){return this.#h||mq}set getUrlFunc(e){this.#h=e}constructor(e){this.#a=String(e),this.#e=!1,this.#t=!0,this.#r={},this.#n="",this.#s=3e5,this.#f={slotInterval:Que,maxAttempts:Kue},this.#h=null}toString(){return`<FetchRequest method=${JSON.stringify(this.method)} url=${JSON.stringify(this.url)} headers=${JSON.stringify(this.headers)} body=${this.#i?U(this.#i):"null"}>`}setThrottleParams(e){e.slotInterval!=null&&(this.#f.slotInterval=e.slotInterval),e.maxAttempts!=null&&(this.#f.maxAttempts=e.maxAttempts)}async#m(e,t,n,i,s){if(e>=this.#f.maxAttempts)return s.makeServerError("exceeded maximum retry limit");P(gq()<=t,"timeout","TIMEOUT",{operation:"request.send",reason:"timeout",request:i}),n>0&&await Zue(n);let o=this.clone(),a=(o.url.split(":")[0]||"").toLowerCase();if(a in _g){let u=await _g[a](o.url,Ag(i.#u));if(u instanceof oi){let d=u;if(this.processFunc){Ag(i.#u);try{d=await this.processFunc(o,d)}catch(f){(f.throttle==null||typeof f.stall!="number")&&d.makeServerError("error in post-processing function",f).assertOk()}}return d}o=u}this.preflightFunc&&(o=await this.preflightFunc(o));let c=await this.getUrlFunc(o,Ag(i.#u)),l=new oi(c.statusCode,c.statusMessage,c.headers,c.body,i);if(l.statusCode===301||l.statusCode===302){try{let u=l.headers.location||"";return o.redirect(u).#m(e+1,t,0,i,l)}catch{}return l}else if(l.statusCode===429&&(this.retryFunc==null||await this.retryFunc(o,l,e))){let u=l.headers["retry-after"],d=this.#f.slotInterval*Math.trunc(Math.random()*Math.pow(2,e));return typeof u=="string"&&u.match(/^[1-9][0-9]*$/)&&(d=parseInt(u)),o.clone().#m(e+1,t,d,i,l)}if(this.processFunc){Ag(i.#u);try{l=await this.processFunc(o,l)}catch(u){(u.throttle==null||typeof u.stall!="number")&&l.makeServerError("error in post-processing function",u).assertOk();let d=this.#f.slotInterval*Math.trunc(Math.random()*Math.pow(2,e));return u.stall>=0&&(d=u.stall),o.clone().#m(e+1,t,d,i,l)}}return l}send(){return P(this.#u==null,"request already sent","UNSUPPORTED_OPERATION",{operation:"fetchRequest.send"}),this.#u=new wg(this),this.#m(0,gq()+this.timeout,0,this,new oi(0,"",{},null,this))}cancel(){P(this.#u!=null,"request has not been sent","UNSUPPORTED_OPERATION",{operation:"fetchRequest.cancel"});let e=bq.get(this);if(!e)throw new Error("missing signal; should not happen");e()}redirect(e){let t=this.url.split(":")[0].toLowerCase(),n=e.split(":")[0].toLowerCase();P(this.method==="GET"&&(t!=="https"||n!=="http")&&e.match(/^https?:/),"unsupported redirect","UNSUPPORTED_OPERATION",{operation:`redirect(${this.method} ${JSON.stringify(this.url)} => ${JSON.stringify(e)})`});let i=new r(e);return i.method="GET",i.allowGzip=this.allowGzip,i.timeout=this.timeout,i.#r=Object.assign({},this.#r),this.#i&&(i.#i=new Uint8Array(this.#i)),i.#d=this.#d,i}clone(){let e=new r(this.url);return e.#n=this.#n,this.#i&&(e.#i=this.#i),e.#d=this.#d,e.#r=Object.assign({},this.#r),e.#l=this.#l,this.allowGzip&&(e.allowGzip=!0),e.timeout=this.timeout,this.allowInsecureAuthentication&&(e.allowInsecureAuthentication=!0),e.#c=this.#c,e.#o=this.#o,e.#p=this.#p,e.#f=Object.assign({},this.#f),e.#h=this.#h,e}static lockConfig(){Zw=!0}static getGateway(e){return _g[e.toLowerCase()]||null}static registerGateway(e,t){if(e=e.toLowerCase(),e==="http"||e==="https")throw new Error(`cannot intercept ${e}; use registerGetUrl`);if(Zw)throw new Error("gateways locked");_g[e]=t}static registerGetUrl(e){if(Zw)throw new Error("gateways locked");mq=e}static createGetUrlFunc(e){return bg(e)}static createDataGateway(){return yq}static createIpfsGatewayFunc(e){return vq(e)}},oi=class r{#e;#t;#r;#n;#s;#a;toString(){return`<FetchResponse status=${this.statusCode} body=${this.#n?U(this.#n):"null"}>`}get statusCode(){return this.#e}get statusMessage(){return this.#t}get headers(){return Object.assign({},this.#r)}get body(){return this.#n==null?null:new Uint8Array(this.#n)}get bodyText(){try{return this.#n==null?"":_s(this.#n)}catch{P(!1,"response body is not valid UTF-8 data","UNSUPPORTED_OPERATION",{operation:"bodyText",info:{response:this}})}}get bodyJson(){try{return JSON.parse(this.bodyText)}catch{P(!1,"response body is not valid JSON","UNSUPPORTED_OPERATION",{operation:"bodyJson",info:{response:this}})}}[Symbol.iterator](){let e=this.headers,t=Object.keys(e),n=0;return{next:()=>{if(n<t.length){let i=t[n++];return{value:[i,e[i]],done:!1}}return{value:void 0,done:!0}}}}constructor(e,t,n,i,s){this.#e=e,this.#t=t,this.#r=Object.keys(n).reduce((o,a)=>(o[a.toLowerCase()]=String(n[a]),o),{}),this.#n=i==null?null:new Uint8Array(i),this.#s=s||null,this.#a={message:""}}makeServerError(e,t){let n;e?n=`CLIENT ESCALATED SERVER ERROR (${this.statusCode} ${this.statusMessage}; ${e})`:(e=`${this.statusCode} ${this.statusMessage}`,n=`CLIENT ESCALATED SERVER ERROR (${e})`);let i=new r(599,n,this.headers,this.body,this.#s||void 0);return i.#a={message:e,error:t},i}throwThrottleError(e,t){t==null?t=-1:w(Number.isInteger(t)&&t>=0,"invalid stall timeout","stall",t);let n=new Error(e||"throttling requests");throw Q(n,{stall:t,throttle:!0}),n}getHeader(e){return this.headers[e.toLowerCase()]}hasBody(){return this.#n!=null}get request(){return this.#s}ok(){return this.#a.message===""&&this.statusCode>=200&&this.statusCode<300}assertOk(){if(this.ok())return;let{message:e,error:t}=this.#a;e===""&&(e=`server response ${this.statusCode} ${this.statusMessage}`);let n=null;this.request&&(n=this.request.url);let i=null;try{this.#n&&(i=_s(this.#n))}catch{}P(!1,e,"SERVER_ERROR",{request:this.request||"unknown request",response:this,error:t,info:{requestUrl:n,responseBody:i,responseStatus:`${this.statusCode} ${this.statusMessage}`}})}};function gq(){return new Date().getTime()}function Yue(r){return Kt(r.replace(/%([0-9a-f][0-9a-f])/gi,(e,t)=>String.fromCharCode(parseInt(t,16))))}function Zue(r){return new Promise(e=>setTimeout(e,r))}function Xue(r){let e=r.toString(16);for(;e.length<2;)e="0"+e;return"0x"+e}function _q(r,e,t){let n=0;for(let i=0;i<t;i++)n=n*256+r[e+i];return n}function Aq(r,e,t,n){let i=[];for(;t<e+1+n;){let s=wq(r,t);i.push(s.result),t+=s.consumed,P(t<=e+1+n,"child data too short","BUFFER_OVERRUN",{buffer:r,length:n,offset:e})}return{consumed:1+n,result:i}}function wq(r,e){P(r.length!==0,"data too short","BUFFER_OVERRUN",{buffer:r,length:0,offset:1});let t=n=>{P(n<=r.length,"data short segment too short","BUFFER_OVERRUN",{buffer:r,length:r.length,offset:n})};if(r[e]>=248){let n=r[e]-247;t(e+1+n);let i=_q(r,e+1,n);return t(e+1+n+i),Aq(r,e,e+1+n,n+i)}else if(r[e]>=192){let n=r[e]-192;return t(e+1+n),Aq(r,e,e+1,n)}else if(r[e]>=184){let n=r[e]-183;t(e+1+n);let i=_q(r,e+1,n);t(e+1+n+i);let s=U(r.slice(e+1+n,e+1+n+i));return{consumed:1+n+i,result:s}}else if(r[e]>=128){let n=r[e]-128;t(e+1+n);let i=U(r.slice(e+1,e+1+n));return{consumed:1+n,result:i}}return{consumed:1,result:Xue(r[e])}}function Dc(r){let e=ie(r,"data"),t=wq(e,0);return w(t.consumed===e.length,"unexpected junk after rlp payload","data",r),t.result}function Eq(r){let e=[];for(;r;)e.unshift(r&255),r>>=8;return e}function Tq(r){if(Array.isArray(r)){let n=[];if(r.forEach(function(s){n=n.concat(Tq(s))}),n.length<=55)return n.unshift(192+n.length),n;let i=Eq(n.length);return i.unshift(247+i.length),i.concat(n)}let e=Array.prototype.slice.call(ie(r,"object"));if(e.length===1&&e[0]<=127)return e;if(e.length<=55)return e.unshift(128+e.length),e;let t=Eq(e.length);return t.unshift(183+t.length),t.concat(e)}var Sq="0123456789abcdef";function Mn(r){let e="0x";for(let t of Tq(r))e+=Sq[t>>4],e+=Sq[t&15];return e}var Tt=32,Xw=new Uint8Array(Tt),ede=["then"],Eg={},Oq=new WeakMap;function To(r){return Oq.get(r)}function Cq(r,e){Oq.set(r,e)}function Fu(r,e){let t=new Error(`deferred error during ABI decoding triggered accessing ${r}`);throw t.error=e,t}function eE(r,e,t){return r.indexOf(null)>=0?e.map((n,i)=>n instanceof Dn?eE(To(n),n,t):n):r.reduce((n,i,s)=>{let o=e.getValue(i);return i in n||(t&&o instanceof Dn&&(o=eE(To(o),o,t)),n[i]=o),n},{})}var Dn=class r extends Array{#e;constructor(...e){let t=e[0],n=e[1],i=(e[2]||[]).slice(),s=!0;t!==Eg&&(n=e,i=[],s=!1),super(n.length),n.forEach((c,l)=>{this[l]=c});let o=i.reduce((c,l)=>(typeof l=="string"&&c.set(l,(c.get(l)||0)+1),c),new Map);if(Cq(this,Object.freeze(n.map((c,l)=>{let u=i[l];return u!=null&&o.get(u)===1?u:null}))),this.#e=[],this.#e==null&&this.#e,!s)return;Object.freeze(this);let a=new Proxy(this,{get:(c,l,u)=>{if(typeof l=="string"){if(l.match(/^[0-9]+$/)){let f=ce(l,"%index");if(f<0||f>=this.length)throw new RangeError("out of result range");let h=c[f];return h instanceof Error&&Fu(`index ${f}`,h),h}if(ede.indexOf(l)>=0)return Reflect.get(c,l,u);let d=c[l];if(d instanceof Function)return function(...f){return d.apply(this===u?c:this,f)};if(!(l in c))return c.getValue.apply(this===u?c:this,[l])}return Reflect.get(c,l,u)}});return Cq(a,To(this)),a}toArray(e){let t=[];return this.forEach((n,i)=>{n instanceof Error&&Fu(`index ${i}`,n),e&&n instanceof r&&(n=n.toArray(e)),t.push(n)}),t}toObject(e){let t=To(this);return t.reduce((n,i,s)=>(P(i!=null,`value at index ${s} unnamed`,"UNSUPPORTED_OPERATION",{operation:"toObject()"}),eE(t,this,e)),{})}slice(e,t){e==null&&(e=0),e<0&&(e+=this.length,e<0&&(e=0)),t==null&&(t=this.length),t<0&&(t+=this.length,t<0&&(t=0)),t>this.length&&(t=this.length);let n=To(this),i=[],s=[];for(let o=e;o<t;o++)i.push(this[o]),s.push(n[o]);return new r(Eg,i,s)}filter(e,t){let n=To(this),i=[],s=[];for(let o=0;o<this.length;o++){let a=this[o];a instanceof Error&&Fu(`index ${o}`,a),e.call(t,a,o,this)&&(i.push(a),s.push(n[o]))}return new r(Eg,i,s)}map(e,t){let n=[];for(let i=0;i<this.length;i++){let s=this[i];s instanceof Error&&Fu(`index ${i}`,s),n.push(e.call(t,s,i,this))}return n}getValue(e){let t=To(this).indexOf(e);if(t===-1)return;let n=this[t];return n instanceof Error&&Fu(`property ${JSON.stringify(e)}`,n.error),n}static fromItems(e,t){return new r(Eg,e,t)}};function xq(r){let e=et(r);return P(e.length<=Tt,"value out-of-bounds","BUFFER_OVERRUN",{buffer:e,length:Tt,offset:e.length}),e.length!==Tt&&(e=Ge(Ee([Xw.slice(e.length%Tt),e]))),e}var tt=class{name;type;localName;dynamic;constructor(e,t,n,i){Q(this,{name:e,type:t,localName:n,dynamic:i},{name:"string",type:"string",localName:"string",dynamic:"boolean"})}_throwError(e,t){w(!1,e,this.localName,t)}},Co=class{#e;#t;constructor(){this.#e=[],this.#t=0}get data(){return Ee(this.#e)}get length(){return this.#t}#r(e){return this.#e.push(e),this.#t+=e.length,e.length}appendWriter(e){return this.#r(Ge(e.data))}writeBytes(e){let t=Ge(e),n=t.length%Tt;return n&&(t=Ge(Ee([t,Xw.slice(n)]))),this.#r(t)}writeValue(e){return this.#r(xq(e))}writeUpdatableValue(){let e=this.#e.length;return this.#e.push(Xw),this.#t+=Tt,t=>{this.#e[e]=xq(t)}}},Sg=class r{allowLoose;#e;#t;#r;#n;#s;constructor(e,t,n){Q(this,{allowLoose:!!t}),this.#e=Ge(e),this.#r=0,this.#n=null,this.#s=n??1024,this.#t=0}get data(){return U(this.#e)}get dataLength(){return this.#e.length}get consumed(){return this.#t}get bytes(){return new Uint8Array(this.#e)}#a(e){if(this.#n)return this.#n.#a(e);this.#r+=e,P(this.#s<1||this.#r<=this.#s*this.dataLength,`compressed ABI data exceeds inflation ratio of ${this.#s} ( see: https://github.com/ethers-io/ethers.js/issues/4537 )`,"BUFFER_OVERRUN",{buffer:Ge(this.#e),offset:this.#t,length:e,info:{bytesRead:this.#r,dataLength:this.dataLength}})}#i(e,t,n){let i=Math.ceil(t/Tt)*Tt;return this.#t+i>this.#e.length&&(this.allowLoose&&n&&this.#t+t<=this.#e.length?i=t:P(!1,"data out-of-bounds","BUFFER_OVERRUN",{buffer:Ge(this.#e),length:this.#e.length,offset:this.#t+i})),this.#e.slice(this.#t,this.#t+i)}subReader(e){let t=new r(this.#e.slice(this.#t+e),this.allowLoose,this.#s);return t.#n=this,t}readBytes(e,t){let n=this.#i(0,e,!!t);return this.#a(e),this.#t+=n.length,n.slice(0,e)}readValue(){return Mc(this.readBytes(Tt))}readIndex(){return $w(this.readBytes(Tt))}};import{createHash as tE,createHmac as PSe,pbkdf2Sync as kSe,randomBytes as RSe}from"crypto";function Uu(r){if(!Number.isSafeInteger(r)||r<0)throw new Error(`Wrong positive integer: ${r}`)}function ju(r,...e){if(!(r instanceof Uint8Array))throw new Error("Expected Uint8Array");if(e.length>0&&!e.includes(r.length))throw new Error(`Expected Uint8Array of length ${e}, not of length=${r.length}`)}function Iq(r){if(typeof r!="function"||typeof r.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");Uu(r.outputLen),Uu(r.blockLen)}function ai(r,e=!0){if(r.destroyed)throw new Error("Hash instance has been destroyed");if(e&&r.finished)throw new Error("Hash#digest() has already been called")}function Tg(r,e){ju(r);let t=e.outputLen;if(r.length<t)throw new Error(`digestInto() expects output buffer of length at least ${t}`)}var Cg=BigInt(4294967295),Pq=BigInt(32);function tde(r,e=!1){return e?{h:Number(r&Cg),l:Number(r>>Pq&Cg)}:{h:Number(r>>Pq&Cg)|0,l:Number(r&Cg)|0}}function kq(r,e=!1){let t=new Uint32Array(r.length),n=new Uint32Array(r.length);for(let i=0;i<r.length;i++){let{h:s,l:o}=tde(r[i],e);[t[i],n[i]]=[s,o]}return[t,n]}var Rq=(r,e,t)=>r<<t|e>>>32-t,Nq=(r,e,t)=>e<<t|r>>>32-t,Mq=(r,e,t)=>e<<t-32|r>>>64-t,Dq=(r,e,t)=>r<<t-32|e>>>64-t;import*as zu from"node:crypto";var xg=zu&&typeof zu=="object"&&"webcrypto"in zu?zu.webcrypto:void 0;var qq=r=>r instanceof Uint8Array;var Lq=r=>new Uint32Array(r.buffer,r.byteOffset,Math.floor(r.byteLength/4)),Og=r=>new DataView(r.buffer,r.byteOffset,r.byteLength),Zr=(r,e)=>r<<32-e|r>>>e,rde=new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68;if(!rde)throw new Error("Non little-endian hardware is not supported");function nde(r){if(typeof r!="string")throw new Error(`utf8ToBytes expected string, got ${typeof r}`);return new Uint8Array(new TextEncoder().encode(r))}function ws(r){if(typeof r=="string"&&(r=nde(r)),!qq(r))throw new Error(`expected Uint8Array, got ${typeof r}`);return r}function Bq(...r){let e=new Uint8Array(r.reduce((n,i)=>n+i.length,0)),t=0;return r.forEach(n=>{if(!qq(n))throw new Error("Uint8Array expected");e.set(n,t),t+=n.length}),e}var As=class{clone(){return this._cloneInto()}},LSe={}.toString;function Ig(r){let e=n=>r().update(ws(n)).digest(),t=r();return e.outputLen=t.outputLen,e.blockLen=t.blockLen,e.create=()=>r(),e}function Fq(r){let e=(n,i)=>r(i).update(ws(n)).digest(),t=r({});return e.outputLen=t.outputLen,e.blockLen=t.blockLen,e.create=n=>r(n),e}function Uq(r=32){if(xg&&typeof xg.getRandomValues=="function")return xg.getRandomValues(new Uint8Array(r));throw new Error("crypto.getRandomValues must be defined")}var[Hq,Gq,Vq]=[[],[],[]],ide=BigInt(0),Hu=BigInt(1),sde=BigInt(2),ode=BigInt(7),ade=BigInt(256),cde=BigInt(113);for(let r=0,e=Hu,t=1,n=0;r<24;r++){[t,n]=[n,(2*t+3*n)%5],Hq.push(2*(5*n+t)),Gq.push((r+1)*(r+2)/2%64);let i=ide;for(let s=0;s<7;s++)e=(e<<Hu^(e>>ode)*cde)%ade,e&sde&&(i^=Hu<<(Hu<<BigInt(s))-Hu);Vq.push(i)}var[lde,ude]=kq(Vq,!0),jq=(r,e,t)=>t>32?Mq(r,e,t):Rq(r,e,t),zq=(r,e,t)=>t>32?Dq(r,e,t):Nq(r,e,t);function dde(r,e=24){let t=new Uint32Array(10);for(let n=24-e;n<24;n++){for(let o=0;o<10;o++)t[o]=r[o]^r[o+10]^r[o+20]^r[o+30]^r[o+40];for(let o=0;o<10;o+=2){let a=(o+8)%10,c=(o+2)%10,l=t[c],u=t[c+1],d=jq(l,u,1)^t[a],f=zq(l,u,1)^t[a+1];for(let h=0;h<50;h+=10)r[o+h]^=d,r[o+h+1]^=f}let i=r[2],s=r[3];for(let o=0;o<24;o++){let a=Gq[o],c=jq(i,s,a),l=zq(i,s,a),u=Hq[o];i=r[u],s=r[u+1],r[u]=c,r[u+1]=l}for(let o=0;o<50;o+=10){for(let a=0;a<10;a++)t[a]=r[o+a];for(let a=0;a<10;a++)r[o+a]^=~t[(a+2)%10]&t[(a+4)%10]}r[0]^=lde[n],r[1]^=ude[n]}t.fill(0)}var Pg=class r extends As{constructor(e,t,n,i=!1,s=24){if(super(),this.blockLen=e,this.suffix=t,this.outputLen=n,this.enableXOF=i,this.rounds=s,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,Uu(n),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=Lq(this.state)}keccak(){dde(this.state32,this.rounds),this.posOut=0,this.pos=0}update(e){ai(this);let{blockLen:t,state:n}=this;e=ws(e);let i=e.length;for(let s=0;s<i;){let o=Math.min(t-this.pos,i-s);for(let a=0;a<o;a++)n[this.pos++]^=e[s++];this.pos===t&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;let{state:e,suffix:t,pos:n,blockLen:i}=this;e[n]^=t,t&128&&n===i-1&&this.keccak(),e[i-1]^=128,this.keccak()}writeInto(e){ai(this,!1),ju(e),this.finish();let t=this.state,{blockLen:n}=this;for(let i=0,s=e.length;i<s;){this.posOut>=n&&this.keccak();let o=Math.min(n-this.posOut,s-i);e.set(t.subarray(this.posOut,this.posOut+o),i),this.posOut+=o,i+=o}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return Uu(e),this.xofInto(new Uint8Array(e))}digestInto(e){if(Tg(e,this),this.finished)throw new Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(e){let{blockLen:t,suffix:n,outputLen:i,rounds:s,enableXOF:o}=this;return e||(e=new r(t,n,i,o,s)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=s,e.suffix=n,e.outputLen=i,e.enableXOF=o,e.destroyed=this.destroyed,e}},Es=(r,e,t)=>Ig(()=>new Pg(e,r,t)),zSe=Es(6,144,224/8),HSe=Es(6,136,256/8),GSe=Es(6,104,384/8),VSe=Es(6,72,512/8),WSe=Es(1,144,224/8),Wq=Es(1,136,256/8),KSe=Es(1,104,384/8),QSe=Es(1,72,512/8),Kq=(r,e,t)=>Fq((n={})=>new Pg(e,r,n.dkLen===void 0?t:n.dkLen,!0)),JSe=Kq(31,168,128/8),$Se=Kq(31,136,256/8);var Qq=!1,Jq=function(r){return Wq(r)},$q=Jq;function Oe(r){let e=ie(r,"data");return U($q(e))}Oe._=Jq;Oe.lock=function(){Qq=!0};Oe.register=function(r){if(Qq)throw new TypeError("keccak256 is locked");$q=r};Object.freeze(Oe);function fde(r,e,t,n){if(typeof r.setBigUint64=="function")return r.setBigUint64(e,t,n);let i=BigInt(32),s=BigInt(4294967295),o=Number(t>>i&s),a=Number(t&s),c=n?4:0,l=n?0:4;r.setUint32(e+c,o,n),r.setUint32(e+l,a,n)}var kg=class extends As{constructor(e,t,n,i){super(),this.blockLen=e,this.outputLen=t,this.padOffset=n,this.isLE=i,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=Og(this.buffer)}update(e){ai(this);let{view:t,buffer:n,blockLen:i}=this;e=ws(e);let s=e.length;for(let o=0;o<s;){let a=Math.min(i-this.pos,s-o);if(a===i){let c=Og(e);for(;i<=s-o;o+=i)this.process(c,o);continue}n.set(e.subarray(o,o+a),this.pos),this.pos+=a,o+=a,this.pos===i&&(this.process(t,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){ai(this),Tg(e,this),this.finished=!0;let{buffer:t,view:n,blockLen:i,isLE:s}=this,{pos:o}=this;t[o++]=128,this.buffer.subarray(o).fill(0),this.padOffset>i-o&&(this.process(n,0),o=0);for(let d=o;d<i;d++)t[d]=0;fde(n,i-8,BigInt(this.length*8),s),this.process(n,0);let a=Og(e),c=this.outputLen;if(c%4)throw new Error("_sha2: outputLen should be aligned to 32bit");let l=c/4,u=this.get();if(l>u.length)throw new Error("_sha2: outputLen bigger than state");for(let d=0;d<l;d++)a.setUint32(4*d,u[d],s)}digest(){let{buffer:e,outputLen:t}=this;this.digestInto(e);let n=e.slice(0,t);return this.destroy(),n}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());let{blockLen:t,buffer:n,length:i,finished:s,destroyed:o,pos:a}=this;return e.length=i,e.pos=a,e.finished=s,e.destroyed=o,i%t&&e.buffer.set(n),e}};var hde=(r,e,t)=>r&e^~r&t,pde=(r,e,t)=>r&e^r&t^e&t,mde=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),Ss=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),Ts=new Uint32Array(64),rE=class extends kg{constructor(){super(64,32,8,!1),this.A=Ss[0]|0,this.B=Ss[1]|0,this.C=Ss[2]|0,this.D=Ss[3]|0,this.E=Ss[4]|0,this.F=Ss[5]|0,this.G=Ss[6]|0,this.H=Ss[7]|0}get(){let{A:e,B:t,C:n,D:i,E:s,F:o,G:a,H:c}=this;return[e,t,n,i,s,o,a,c]}set(e,t,n,i,s,o,a,c){this.A=e|0,this.B=t|0,this.C=n|0,this.D=i|0,this.E=s|0,this.F=o|0,this.G=a|0,this.H=c|0}process(e,t){for(let d=0;d<16;d++,t+=4)Ts[d]=e.getUint32(t,!1);for(let d=16;d<64;d++){let f=Ts[d-15],h=Ts[d-2],g=Zr(f,7)^Zr(f,18)^f>>>3,p=Zr(h,17)^Zr(h,19)^h>>>10;Ts[d]=p+Ts[d-7]+g+Ts[d-16]|0}let{A:n,B:i,C:s,D:o,E:a,F:c,G:l,H:u}=this;for(let d=0;d<64;d++){let f=Zr(a,6)^Zr(a,11)^Zr(a,25),h=u+f+hde(a,c,l)+mde[d]+Ts[d]|0,p=(Zr(n,2)^Zr(n,13)^Zr(n,22))+pde(n,i,s)|0;u=l,l=c,c=a,a=o+h|0,o=s,s=i,i=n,n=h+p|0}n=n+this.A|0,i=i+this.B|0,s=s+this.C|0,o=o+this.D|0,a=a+this.E|0,c=c+this.F|0,l=l+this.G|0,u=u+this.H|0,this.set(n,i,s,o,a,c,l,u)}roundClean(){Ts.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}};var Yq=Ig(()=>new rE);var Rg=class extends As{constructor(e,t){super(),this.finished=!1,this.destroyed=!1,Iq(e);let n=ws(t);if(this.iHash=e.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;let i=this.blockLen,s=new Uint8Array(i);s.set(n.length>i?e.create().update(n).digest():n);for(let o=0;o<s.length;o++)s[o]^=54;this.iHash.update(s),this.oHash=e.create();for(let o=0;o<s.length;o++)s[o]^=106;this.oHash.update(s),s.fill(0)}update(e){return ai(this),this.iHash.update(e),this}digestInto(e){ai(this),ju(e,this.outputLen),this.finished=!0,this.iHash.digestInto(e),this.oHash.update(e),this.oHash.digestInto(e),this.destroy()}digest(){let e=new Uint8Array(this.oHash.outputLen);return this.digestInto(e),e}_cloneInto(e){e||(e=Object.create(Object.getPrototypeOf(this),{}));let{oHash:t,iHash:n,finished:i,destroyed:s,blockLen:o,outputLen:a}=this;return e=e,e.finished=i,e.destroyed=s,e.blockLen=o,e.outputLen=a,e.oHash=t._cloneInto(e.oHash),e.iHash=n._cloneInto(e.iHash),e}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}},nE=(r,e,t)=>new Rg(r,e).update(t).digest();nE.create=(r,e)=>new Rg(r,e);var Zq=function(r){return tE("sha256").update(r).digest()},Xq=function(r){return tE("sha512").update(r).digest()},eL=Zq,tL=Xq,rL=!1,nL=!1;function Cs(r){let e=ie(r,"data");return U(eL(e))}Cs._=Zq;Cs.lock=function(){rL=!0};Cs.register=function(r){if(rL)throw new Error("sha256 is locked");eL=r};Object.freeze(Cs);function Ng(r){let e=ie(r,"data");return U(tL(e))}Ng._=Xq;Ng.lock=function(){nL=!0};Ng.register=function(r){if(nL)throw new Error("sha512 is locked");tL=r};Object.freeze(Cs);var aE={};dl(aE,{bitGet:()=>wde,bitLen:()=>Ade,bitMask:()=>Gu,bitSet:()=>Ede,bytesToHex:()=>xo,bytesToNumberBE:()=>ci,bytesToNumberLE:()=>qg,concatBytes:()=>qc,createHmacDrbg:()=>oE,ensureBytes:()=>yr,equalBytes:()=>bde,hexToBytes:()=>Oo,hexToNumber:()=>sE,numberToBytesBE:()=>xs,numberToBytesLE:()=>Lg,numberToHexUnpadded:()=>oL,numberToVarBytesBE:()=>vde,utf8ToBytes:()=>_de,validateObject:()=>Os});var sL=BigInt(0),Mg=BigInt(1),gde=BigInt(2),Dg=r=>r instanceof Uint8Array,yde=Array.from({length:256},(r,e)=>e.toString(16).padStart(2,"0"));function xo(r){if(!Dg(r))throw new Error("Uint8Array expected");let e="";for(let t=0;t<r.length;t++)e+=yde[r[t]];return e}function oL(r){let e=r.toString(16);return e.length&1?`0${e}`:e}function sE(r){if(typeof r!="string")throw new Error("hex string expected, got "+typeof r);return BigInt(r===""?"0":`0x${r}`)}function Oo(r){if(typeof r!="string")throw new Error("hex string expected, got "+typeof r);let e=r.length;if(e%2)throw new Error("padded hex string expected, got unpadded hex of length "+e);let t=new Uint8Array(e/2);for(let n=0;n<t.length;n++){let i=n*2,s=r.slice(i,i+2),o=Number.parseInt(s,16);if(Number.isNaN(o)||o<0)throw new Error("Invalid byte sequence");t[n]=o}return t}function ci(r){return sE(xo(r))}function qg(r){if(!Dg(r))throw new Error("Uint8Array expected");return sE(xo(Uint8Array.from(r).reverse()))}function xs(r,e){return Oo(r.toString(16).padStart(e*2,"0"))}function Lg(r,e){return xs(r,e).reverse()}function vde(r){return Oo(oL(r))}function yr(r,e,t){let n;if(typeof e=="string")try{n=Oo(e)}catch(s){throw new Error(`${r} must be valid hex string, got "${e}". Cause: ${s}`)}else if(Dg(e))n=Uint8Array.from(e);else throw new Error(`${r} must be hex string or Uint8Array`);let i=n.length;if(typeof t=="number"&&i!==t)throw new Error(`${r} expected ${t} bytes, got ${i}`);return n}function qc(...r){let e=new Uint8Array(r.reduce((n,i)=>n+i.length,0)),t=0;return r.forEach(n=>{if(!Dg(n))throw new Error("Uint8Array expected");e.set(n,t),t+=n.length}),e}function bde(r,e){if(r.length!==e.length)return!1;for(let t=0;t<r.length;t++)if(r[t]!==e[t])return!1;return!0}function _de(r){if(typeof r!="string")throw new Error(`utf8ToBytes expected string, got ${typeof r}`);return new Uint8Array(new TextEncoder().encode(r))}function Ade(r){let e;for(e=0;r>sL;r>>=Mg,e+=1);return e}function wde(r,e){return r>>BigInt(e)&Mg}var Ede=(r,e,t)=>r|(t?Mg:sL)<<BigInt(e),Gu=r=>(gde<<BigInt(r-1))-Mg,iE=r=>new Uint8Array(r),iL=r=>Uint8Array.from(r);function oE(r,e,t){if(typeof r!="number"||r<2)throw new Error("hashLen must be a number");if(typeof e!="number"||e<2)throw new Error("qByteLen must be a number");if(typeof t!="function")throw new Error("hmacFn must be a function");let n=iE(r),i=iE(r),s=0,o=()=>{n.fill(1),i.fill(0),s=0},a=(...d)=>t(i,n,...d),c=(d=iE())=>{i=a(iL([0]),d),n=a(),d.length!==0&&(i=a(iL([1]),d),n=a())},l=()=>{if(s++>=1e3)throw new Error("drbg: tried 1000 values");let d=0,f=[];for(;d<e;){n=a();let h=n.slice();f.push(h),d+=n.length}return qc(...f)};return(d,f)=>{o(),c(d);let h;for(;!(h=f(l()));)c();return o(),h}}var Sde={bigint:r=>typeof r=="bigint",function:r=>typeof r=="function",boolean:r=>typeof r=="boolean",string:r=>typeof r=="string",stringOrUint8Array:r=>typeof r=="string"||r instanceof Uint8Array,isSafeInteger:r=>Number.isSafeInteger(r),array:r=>Array.isArray(r),field:(r,e)=>e.Fp.isValid(r),hash:r=>typeof r=="function"&&Number.isSafeInteger(r.outputLen)};function Os(r,e,t={}){let n=(i,s,o)=>{let a=Sde[s];if(typeof a!="function")throw new Error(`Invalid validator "${s}", expected function`);let c=r[i];if(!(o&&c===void 0)&&!a(c,r))throw new Error(`Invalid param ${String(i)}=${c} (${typeof c}), expected ${s}`)};for(let[i,s]of Object.entries(e))n(i,s,!1);for(let[i,s]of Object.entries(t))n(i,s,!0);return r}var lt=BigInt(0),We=BigInt(1),Io=BigInt(2),Tde=BigInt(3),cE=BigInt(4),aL=BigInt(5),cL=BigInt(8),Cde=BigInt(9),xde=BigInt(16);function Nt(r,e){let t=r%e;return t>=lt?t:e+t}function Ode(r,e,t){if(t<=lt||e<lt)throw new Error("Expected power/modulo > 0");if(t===We)return lt;let n=We;for(;e>lt;)e&We&&(n=n*r%t),r=r*r%t,e>>=We;return n}function vr(r,e,t){let n=r;for(;e-- >lt;)n*=n,n%=t;return n}function Bg(r,e){if(r===lt||e<=lt)throw new Error(`invert: expected positive integers, got n=${r} mod=${e}`);let t=Nt(r,e),n=e,i=lt,s=We,o=We,a=lt;for(;t!==lt;){let l=n/t,u=n%t,d=i-o*l,f=s-a*l;n=t,t=u,i=o,s=a,o=d,a=f}if(n!==We)throw new Error("invert: does not exist");return Nt(i,e)}function Ide(r){let e=(r-We)/Io,t,n,i;for(t=r-We,n=0;t%Io===lt;t/=Io,n++);for(i=Io;i<r&&Ode(i,e,r)!==r-We;i++);if(n===1){let o=(r+We)/cE;return function(c,l){let u=c.pow(l,o);if(!c.eql(c.sqr(u),l))throw new Error("Cannot find square root");return u}}let s=(t+We)/Io;return function(a,c){if(a.pow(c,e)===a.neg(a.ONE))throw new Error("Cannot find square root");let l=n,u=a.pow(a.mul(a.ONE,i),t),d=a.pow(c,s),f=a.pow(c,t);for(;!a.eql(f,a.ONE);){if(a.eql(f,a.ZERO))return a.ZERO;let h=1;for(let p=a.sqr(f);h<l&&!a.eql(p,a.ONE);h++)p=a.sqr(p);let g=a.pow(u,We<<BigInt(l-h-1));u=a.sqr(g),d=a.mul(d,g),f=a.mul(f,u),l=h}return d}}function Pde(r){if(r%cE===Tde){let e=(r+We)/cE;return function(n,i){let s=n.pow(i,e);if(!n.eql(n.sqr(s),i))throw new Error("Cannot find square root");return s}}if(r%cL===aL){let e=(r-aL)/cL;return function(n,i){let s=n.mul(i,Io),o=n.pow(s,e),a=n.mul(i,o),c=n.mul(n.mul(a,Io),o),l=n.mul(a,n.sub(c,n.ONE));if(!n.eql(n.sqr(l),i))throw new Error("Cannot find square root");return l}}return r%xde,Ide(r)}var kde=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function lE(r){let e={ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"},t=kde.reduce((n,i)=>(n[i]="function",n),e);return Os(r,t)}function Rde(r,e,t){if(t<lt)throw new Error("Expected power > 0");if(t===lt)return r.ONE;if(t===We)return e;let n=r.ONE,i=e;for(;t>lt;)t&We&&(n=r.mul(n,i)),i=r.sqr(i),t>>=We;return n}function Nde(r,e){let t=new Array(e.length),n=e.reduce((s,o,a)=>r.is0(o)?s:(t[a]=s,r.mul(s,o)),r.ONE),i=r.inv(n);return e.reduceRight((s,o,a)=>r.is0(o)?s:(t[a]=r.mul(s,t[a]),r.mul(s,o)),i),t}function uE(r,e){let t=e!==void 0?e:r.toString(2).length,n=Math.ceil(t/8);return{nBitLength:t,nByteLength:n}}function lL(r,e,t=!1,n={}){if(r<=lt)throw new Error(`Expected Field ORDER > 0, got ${r}`);let{nBitLength:i,nByteLength:s}=uE(r,e);if(s>2048)throw new Error("Field lengths over 2048 bytes are not supported");let o=Pde(r),a=Object.freeze({ORDER:r,BITS:i,BYTES:s,MASK:Gu(i),ZERO:lt,ONE:We,create:c=>Nt(c,r),isValid:c=>{if(typeof c!="bigint")throw new Error(`Invalid field element: expected bigint, got ${typeof c}`);return lt<=c&&c<r},is0:c=>c===lt,isOdd:c=>(c&We)===We,neg:c=>Nt(-c,r),eql:(c,l)=>c===l,sqr:c=>Nt(c*c,r),add:(c,l)=>Nt(c+l,r),sub:(c,l)=>Nt(c-l,r),mul:(c,l)=>Nt(c*l,r),pow:(c,l)=>Rde(a,c,l),div:(c,l)=>Nt(c*Bg(l,r),r),sqrN:c=>c*c,addN:(c,l)=>c+l,subN:(c,l)=>c-l,mulN:(c,l)=>c*l,inv:c=>Bg(c,r),sqrt:n.sqrt||(c=>o(a,c)),invertBatch:c=>Nde(a,c),cmov:(c,l,u)=>u?l:c,toBytes:c=>t?Lg(c,s):xs(c,s),fromBytes:c=>{if(c.length!==s)throw new Error(`Fp.fromBytes: expected ${s}, got ${c.length}`);return t?qg(c):ci(c)}});return Object.freeze(a)}function uL(r){if(typeof r!="bigint")throw new Error("field order must be bigint");let e=r.toString(2).length;return Math.ceil(e/8)}function dE(r){let e=uL(r);return e+Math.ceil(e/2)}function dL(r,e,t=!1){let n=r.length,i=uL(e),s=dE(e);if(n<16||n<s||n>1024)throw new Error(`expected ${s}-1024 bytes of input, got ${n}`);let o=t?ci(r):qg(r),a=Nt(o,e-We)+We;return t?Lg(a,i):xs(a,i)}var Dde=BigInt(0),fE=BigInt(1);function fL(r,e){let t=(i,s)=>{let o=s.negate();return i?o:s},n=i=>{let s=Math.ceil(e/i)+1,o=2**(i-1);return{windows:s,windowSize:o}};return{constTimeNegate:t,unsafeLadder(i,s){let o=r.ZERO,a=i;for(;s>Dde;)s&fE&&(o=o.add(a)),a=a.double(),s>>=fE;return o},precomputeWindow(i,s){let{windows:o,windowSize:a}=n(s),c=[],l=i,u=l;for(let d=0;d<o;d++){u=l,c.push(u);for(let f=1;f<a;f++)u=u.add(l),c.push(u);l=u.double()}return c},wNAF(i,s,o){let{windows:a,windowSize:c}=n(i),l=r.ZERO,u=r.BASE,d=BigInt(2**i-1),f=2**i,h=BigInt(i);for(let g=0;g<a;g++){let p=g*c,b=Number(o&d);o>>=h,b>c&&(b-=f,o+=fE);let y=p,A=p+Math.abs(b)-1,E=g%2!==0,C=b<0;b===0?u=u.add(t(E,s[y])):l=l.add(t(C,s[A]))}return{p:l,f:u}},wNAFCached(i,s,o,a){let c=i._WINDOW_SIZE||1,l=s.get(i);return l||(l=this.precomputeWindow(i,c),c!==1&&s.set(i,a(l))),this.wNAF(c,l,o)}}}function hE(r){return lE(r.Fp),Os(r,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...uE(r.n,r.nBitLength),...r,p:r.Fp.ORDER})}function qde(r){let e=hE(r);Os(e,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});let{endo:t,Fp:n,a:i}=e;if(t){if(!n.eql(i,n.ZERO))throw new Error("Endomorphism can only be defined for Koblitz curves that have a=0");if(typeof t!="object"||typeof t.beta!="bigint"||typeof t.splitScalar!="function")throw new Error("Expected endomorphism with beta: bigint and splitScalar: function")}return Object.freeze({...e})}var{bytesToNumberBE:Lde,hexToBytes:Bde}=aE,Po={Err:class extends Error{constructor(e=""){super(e)}},_parseInt(r){let{Err:e}=Po;if(r.length<2||r[0]!==2)throw new e("Invalid signature integer tag");let t=r[1],n=r.subarray(2,t+2);if(!t||n.length!==t)throw new e("Invalid signature integer: wrong length");if(n[0]&128)throw new e("Invalid signature integer: negative");if(n[0]===0&&!(n[1]&128))throw new e("Invalid signature integer: unnecessary leading zero");return{d:Lde(n),l:r.subarray(t+2)}},toSig(r){let{Err:e}=Po,t=typeof r=="string"?Bde(r):r;if(!(t instanceof Uint8Array))throw new Error("ui8a expected");let n=t.length;if(n<2||t[0]!=48)throw new e("Invalid signature tag");if(t[1]!==n-2)throw new e("Invalid signature: incorrect length");let{d:i,l:s}=Po._parseInt(t.subarray(2)),{d:o,l:a}=Po._parseInt(s);if(a.length)throw new e("Invalid signature: left bytes after parsing");return{r:i,s:o}},hexFromSig(r){let e=l=>Number.parseInt(l[0],16)&8?"00"+l:l,t=l=>{let u=l.toString(16);return u.length&1?`0${u}`:u},n=e(t(r.s)),i=e(t(r.r)),s=n.length/2,o=i.length/2,a=t(s),c=t(o);return`30${t(o+s+4)}02${c}${i}02${a}${n}`}},li=BigInt(0),qr=BigInt(1),_Te=BigInt(2),hL=BigInt(3),ATe=BigInt(4);function Fde(r){let e=qde(r),{Fp:t}=e,n=e.toBytes||((g,p,b)=>{let y=p.toAffine();return qc(Uint8Array.from([4]),t.toBytes(y.x),t.toBytes(y.y))}),i=e.fromBytes||(g=>{let p=g.subarray(1),b=t.fromBytes(p.subarray(0,t.BYTES)),y=t.fromBytes(p.subarray(t.BYTES,2*t.BYTES));return{x:b,y}});function s(g){let{a:p,b}=e,y=t.sqr(g),A=t.mul(y,g);return t.add(t.add(A,t.mul(g,p)),b)}if(!t.eql(t.sqr(e.Gy),s(e.Gx)))throw new Error("bad generator point: equation left != right");function o(g){return typeof g=="bigint"&&li<g&&g<e.n}function a(g){if(!o(g))throw new Error("Expected valid bigint: 0 < bigint < curve.n")}function c(g){let{allowedPrivateKeyLengths:p,nByteLength:b,wrapPrivateKey:y,n:A}=e;if(p&&typeof g!="bigint"){if(g instanceof Uint8Array&&(g=xo(g)),typeof g!="string"||!p.includes(g.length))throw new Error("Invalid key");g=g.padStart(b*2,"0")}let E;try{E=typeof g=="bigint"?g:ci(yr("private key",g,b))}catch{throw new Error(`private key must be ${b} bytes, hex or bigint, not ${typeof g}`)}return y&&(E=Nt(E,A)),a(E),E}let l=new Map;function u(g){if(!(g instanceof d))throw new Error("ProjectivePoint expected")}class d{constructor(p,b,y){if(this.px=p,this.py=b,this.pz=y,p==null||!t.isValid(p))throw new Error("x required");if(b==null||!t.isValid(b))throw new Error("y required");if(y==null||!t.isValid(y))throw new Error("z required")}static fromAffine(p){let{x:b,y}=p||{};if(!p||!t.isValid(b)||!t.isValid(y))throw new Error("invalid affine point");if(p instanceof d)throw new Error("projective point not allowed");let A=E=>t.eql(E,t.ZERO);return A(b)&&A(y)?d.ZERO:new d(b,y,t.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(p){let b=t.invertBatch(p.map(y=>y.pz));return p.map((y,A)=>y.toAffine(b[A])).map(d.fromAffine)}static fromHex(p){let b=d.fromAffine(i(yr("pointHex",p)));return b.assertValidity(),b}static fromPrivateKey(p){return d.BASE.multiply(c(p))}_setWindowSize(p){this._WINDOW_SIZE=p,l.delete(this)}assertValidity(){if(this.is0()){if(e.allowInfinityPoint&&!t.is0(this.py))return;throw new Error("bad point: ZERO")}let{x:p,y:b}=this.toAffine();if(!t.isValid(p)||!t.isValid(b))throw new Error("bad point: x or y not FE");let y=t.sqr(b),A=s(p);if(!t.eql(y,A))throw new Error("bad point: equation left != right");if(!this.isTorsionFree())throw new Error("bad point: not in prime-order subgroup")}hasEvenY(){let{y:p}=this.toAffine();if(t.isOdd)return!t.isOdd(p);throw new Error("Field doesn't support isOdd")}equals(p){u(p);let{px:b,py:y,pz:A}=this,{px:E,py:C,pz:k}=p,I=t.eql(t.mul(b,k),t.mul(E,A)),D=t.eql(t.mul(y,k),t.mul(C,A));return I&&D}negate(){return new d(this.px,t.neg(this.py),this.pz)}double(){let{a:p,b}=e,y=t.mul(b,hL),{px:A,py:E,pz:C}=this,k=t.ZERO,I=t.ZERO,D=t.ZERO,j=t.mul(A,A),L=t.mul(E,E),q=t.mul(C,C),T=t.mul(A,E);return T=t.add(T,T),D=t.mul(A,C),D=t.add(D,D),k=t.mul(p,D),I=t.mul(y,q),I=t.add(k,I),k=t.sub(L,I),I=t.add(L,I),I=t.mul(k,I),k=t.mul(T,k),D=t.mul(y,D),q=t.mul(p,q),T=t.sub(j,q),T=t.mul(p,T),T=t.add(T,D),D=t.add(j,j),j=t.add(D,j),j=t.add(j,q),j=t.mul(j,T),I=t.add(I,j),q=t.mul(E,C),q=t.add(q,q),j=t.mul(q,T),k=t.sub(k,j),D=t.mul(q,L),D=t.add(D,D),D=t.add(D,D),new d(k,I,D)}add(p){u(p);let{px:b,py:y,pz:A}=this,{px:E,py:C,pz:k}=p,I=t.ZERO,D=t.ZERO,j=t.ZERO,L=e.a,q=t.mul(e.b,hL),T=t.mul(b,E),ne=t.mul(y,C),O=t.mul(A,k),_=t.add(b,y),S=t.add(E,C);_=t.mul(_,S),S=t.add(T,ne),_=t.sub(_,S),S=t.add(b,A);let R=t.add(E,k);return S=t.mul(S,R),R=t.add(T,O),S=t.sub(S,R),R=t.add(y,A),I=t.add(C,k),R=t.mul(R,I),I=t.add(ne,O),R=t.sub(R,I),j=t.mul(L,S),I=t.mul(q,O),j=t.add(I,j),I=t.sub(ne,j),j=t.add(ne,j),D=t.mul(I,j),ne=t.add(T,T),ne=t.add(ne,T),O=t.mul(L,O),S=t.mul(q,S),ne=t.add(ne,O),O=t.sub(T,O),O=t.mul(L,O),S=t.add(S,O),T=t.mul(ne,S),D=t.add(D,T),T=t.mul(R,S),I=t.mul(_,I),I=t.sub(I,T),T=t.mul(_,ne),j=t.mul(R,j),j=t.add(j,T),new d(I,D,j)}subtract(p){return this.add(p.negate())}is0(){return this.equals(d.ZERO)}wNAF(p){return h.wNAFCached(this,l,p,b=>{let y=t.invertBatch(b.map(A=>A.pz));return b.map((A,E)=>A.toAffine(y[E])).map(d.fromAffine)})}multiplyUnsafe(p){let b=d.ZERO;if(p===li)return b;if(a(p),p===qr)return this;let{endo:y}=e;if(!y)return h.unsafeLadder(this,p);let{k1neg:A,k1:E,k2neg:C,k2:k}=y.splitScalar(p),I=b,D=b,j=this;for(;E>li||k>li;)E&qr&&(I=I.add(j)),k&qr&&(D=D.add(j)),j=j.double(),E>>=qr,k>>=qr;return A&&(I=I.negate()),C&&(D=D.negate()),D=new d(t.mul(D.px,y.beta),D.py,D.pz),I.add(D)}multiply(p){a(p);let b=p,y,A,{endo:E}=e;if(E){let{k1neg:C,k1:k,k2neg:I,k2:D}=E.splitScalar(b),{p:j,f:L}=this.wNAF(k),{p:q,f:T}=this.wNAF(D);j=h.constTimeNegate(C,j),q=h.constTimeNegate(I,q),q=new d(t.mul(q.px,E.beta),q.py,q.pz),y=j.add(q),A=L.add(T)}else{let{p:C,f:k}=this.wNAF(b);y=C,A=k}return d.normalizeZ([y,A])[0]}multiplyAndAddUnsafe(p,b,y){let A=d.BASE,E=(k,I)=>I===li||I===qr||!k.equals(A)?k.multiplyUnsafe(I):k.multiply(I),C=E(this,b).add(E(p,y));return C.is0()?void 0:C}toAffine(p){let{px:b,py:y,pz:A}=this,E=this.is0();p==null&&(p=E?t.ONE:t.inv(A));let C=t.mul(b,p),k=t.mul(y,p),I=t.mul(A,p);if(E)return{x:t.ZERO,y:t.ZERO};if(!t.eql(I,t.ONE))throw new Error("invZ was invalid");return{x:C,y:k}}isTorsionFree(){let{h:p,isTorsionFree:b}=e;if(p===qr)return!0;if(b)return b(d,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){let{h:p,clearCofactor:b}=e;return p===qr?this:b?b(d,this):this.multiplyUnsafe(e.h)}toRawBytes(p=!0){return this.assertValidity(),n(d,this,p)}toHex(p=!0){return xo(this.toRawBytes(p))}}d.BASE=new d(e.Gx,e.Gy,t.ONE),d.ZERO=new d(t.ZERO,t.ONE,t.ZERO);let f=e.nBitLength,h=fL(d,e.endo?Math.ceil(f/2):f);return{CURVE:e,ProjectivePoint:d,normPrivateKeyToScalar:c,weierstrassEquation:s,isWithinCurveOrder:o}}function Ude(r){let e=hE(r);return Os(e,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...e})}function pL(r){let e=Ude(r),{Fp:t,n}=e,i=t.BYTES+1,s=2*t.BYTES+1;function o(S){return li<S&&S<t.ORDER}function a(S){return Nt(S,n)}function c(S){return Bg(S,n)}let{ProjectivePoint:l,normPrivateKeyToScalar:u,weierstrassEquation:d,isWithinCurveOrder:f}=Fde({...e,toBytes(S,R,F){let V=R.toAffine(),G=t.toBytes(V.x),oe=qc;return F?oe(Uint8Array.from([R.hasEvenY()?2:3]),G):oe(Uint8Array.from([4]),G,t.toBytes(V.y))},fromBytes(S){let R=S.length,F=S[0],V=S.subarray(1);if(R===i&&(F===2||F===3)){let G=ci(V);if(!o(G))throw new Error("Point is not on curve");let oe=d(G),Te=t.sqrt(oe),ye=(Te&qr)===qr;return(F&1)===1!==ye&&(Te=t.neg(Te)),{x:G,y:Te}}else if(R===s&&F===4){let G=t.fromBytes(V.subarray(0,t.BYTES)),oe=t.fromBytes(V.subarray(t.BYTES,2*t.BYTES));return{x:G,y:oe}}else throw new Error(`Point of length ${R} was invalid. Expected ${i} compressed bytes or ${s} uncompressed bytes`)}}),h=S=>xo(xs(S,e.nByteLength));function g(S){let R=n>>qr;return S>R}function p(S){return g(S)?a(-S):S}let b=(S,R,F)=>ci(S.slice(R,F));class y{constructor(R,F,V){this.r=R,this.s=F,this.recovery=V,this.assertValidity()}static fromCompact(R){let F=e.nByteLength;return R=yr("compactSignature",R,F*2),new y(b(R,0,F),b(R,F,2*F))}static fromDER(R){let{r:F,s:V}=Po.toSig(yr("DER",R));return new y(F,V)}assertValidity(){if(!f(this.r))throw new Error("r must be 0 < r < CURVE.n");if(!f(this.s))throw new Error("s must be 0 < s < CURVE.n")}addRecoveryBit(R){return new y(this.r,this.s,R)}recoverPublicKey(R){let{r:F,s:V,recovery:G}=this,oe=D(yr("msgHash",R));if(G==null||![0,1,2,3].includes(G))throw new Error("recovery id invalid");let Te=G===2||G===3?F+e.n:F;if(Te>=t.ORDER)throw new Error("recovery id 2 or 3 invalid");let ye=G&1?"03":"02",we=l.fromHex(ye+h(Te)),Me=c(Te),ke=a(-oe*Me),Ke=a(V*Me),qt=l.BASE.multiplyAndAddUnsafe(we,ke,Ke);if(!qt)throw new Error("point at infinify");return qt.assertValidity(),qt}hasHighS(){return g(this.s)}normalizeS(){return this.hasHighS()?new y(this.r,a(-this.s),this.recovery):this}toDERRawBytes(){return Oo(this.toDERHex())}toDERHex(){return Po.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return Oo(this.toCompactHex())}toCompactHex(){return h(this.r)+h(this.s)}}let A={isValidPrivateKey(S){try{return u(S),!0}catch{return!1}},normPrivateKeyToScalar:u,randomPrivateKey:()=>{let S=dE(e.n);return dL(e.randomBytes(S),e.n)},precompute(S=8,R=l.BASE){return R._setWindowSize(S),R.multiply(BigInt(3)),R}};function E(S,R=!0){return l.fromPrivateKey(S).toRawBytes(R)}function C(S){let R=S instanceof Uint8Array,F=typeof S=="string",V=(R||F)&&S.length;return R?V===i||V===s:F?V===2*i||V===2*s:S instanceof l}function k(S,R,F=!0){if(C(S))throw new Error("first arg must be private key");if(!C(R))throw new Error("second arg must be public key");return l.fromHex(R).multiply(u(S)).toRawBytes(F)}let I=e.bits2int||function(S){let R=ci(S),F=S.length*8-e.nBitLength;return F>0?R>>BigInt(F):R},D=e.bits2int_modN||function(S){return a(I(S))},j=Gu(e.nBitLength);function L(S){if(typeof S!="bigint")throw new Error("bigint expected");if(!(li<=S&&S<j))throw new Error(`bigint expected < 2^${e.nBitLength}`);return xs(S,e.nByteLength)}function q(S,R,F=T){if(["recovered","canonical"].some(N=>N in F))throw new Error("sign() legacy options not supported");let{hash:V,randomBytes:G}=e,{lowS:oe,prehash:Te,extraEntropy:ye}=F;oe==null&&(oe=!0),S=yr("msgHash",S),Te&&(S=yr("prehashed msgHash",V(S)));let we=D(S),Me=u(R),ke=[L(Me),L(we)];if(ye!=null){let N=ye===!0?G(t.BYTES):ye;ke.push(yr("extraEntropy",N))}let Ke=qc(...ke),qt=we;function Ze(N){let M=I(N);if(!f(M))return;let z=c(M),$=l.BASE.multiply(M).toAffine(),J=a($.x);if(J===li)return;let ae=a(z*a(qt+J*Me));if(ae===li)return;let De=($.x===J?0:2)|Number($.y&qr),Br=ae;return oe&&g(ae)&&(Br=p(ae),De^=1),new y(J,Br,De)}return{seed:Ke,k2sig:Ze}}let T={lowS:e.lowS,prehash:!1},ne={lowS:e.lowS,prehash:!1};function O(S,R,F=T){let{seed:V,k2sig:G}=q(S,R,F),oe=e;return oE(oe.hash.outputLen,oe.nByteLength,oe.hmac)(V,G)}l.BASE._setWindowSize(8);function _(S,R,F,V=ne){let G=S;if(R=yr("msgHash",R),F=yr("publicKey",F),"strict"in V)throw new Error("options.strict was renamed to lowS");let{lowS:oe,prehash:Te}=V,ye,we;try{if(typeof G=="string"||G instanceof Uint8Array)try{ye=y.fromDER(G)}catch($){if(!($ instanceof Po.Err))throw $;ye=y.fromCompact(G)}else if(typeof G=="object"&&typeof G.r=="bigint"&&typeof G.s=="bigint"){let{r:$,s:J}=G;ye=new y($,J)}else throw new Error("PARSE");we=l.fromHex(F)}catch($){if($.message==="PARSE")throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(oe&&ye.hasHighS())return!1;Te&&(R=e.hash(R));let{r:Me,s:ke}=ye,Ke=D(R),qt=c(ke),Ze=a(Ke*qt),N=a(Me*qt),M=l.BASE.multiplyAndAddUnsafe(we,Ze,N)?.toAffine();return M?a(M.x)===Me:!1}return{CURVE:e,getPublicKey:E,getSharedSecret:k,sign:O,verify:_,ProjectivePoint:l,Signature:y,utils:A}}function jde(r){return{hash:r,hmac:(e,...t)=>nE(r,e,Bq(...t)),randomBytes:Uq}}function mL(r,e){let t=n=>pL({...r,...jde(n)});return Object.freeze({...t(e),create:t})}var vL=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),gL=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),zde=BigInt(1),pE=BigInt(2),yL=(r,e)=>(r+e/pE)/e;function Hde(r){let e=vL,t=BigInt(3),n=BigInt(6),i=BigInt(11),s=BigInt(22),o=BigInt(23),a=BigInt(44),c=BigInt(88),l=r*r*r%e,u=l*l*r%e,d=vr(u,t,e)*u%e,f=vr(d,t,e)*u%e,h=vr(f,pE,e)*l%e,g=vr(h,i,e)*h%e,p=vr(g,s,e)*g%e,b=vr(p,a,e)*p%e,y=vr(b,c,e)*b%e,A=vr(y,a,e)*p%e,E=vr(A,t,e)*u%e,C=vr(E,o,e)*g%e,k=vr(C,n,e)*l%e,I=vr(k,pE,e);if(!mE.eql(mE.sqr(I),r))throw new Error("Cannot find square root");return I}var mE=lL(vL,void 0,void 0,{sqrt:Hde}),ui=mL({a:BigInt(0),b:BigInt(7),Fp:mE,n:gL,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:r=>{let e=gL,t=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),n=-zde*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),i=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),s=t,o=BigInt("0x100000000000000000000000000000000"),a=yL(s*r,e),c=yL(-n*r,e),l=Nt(r-a*t-c*i,e),u=Nt(-a*n-c*s,e),d=l>o,f=u>o;if(d&&(l=e-l),f&&(u=e-u),l>o||u>o)throw new Error("splitScalar: Endomorphism failed, k="+r);return{k1neg:d,k1:l,k2neg:f,k2:u}}}},Yq),PTe=BigInt(0);var kTe=ui.ProjectivePoint;var di="0x0000000000000000000000000000000000000000";var Fg="0x0000000000000000000000000000000000000000000000000000000000000000";var bL=BigInt(0),_L=BigInt(1),AL=BigInt(2),wL=BigInt(27),EL=BigInt(28),Ug=BigInt(35),Lc={};function SL(r){return mr(et(r),32)}var Qt=class r{#e;#t;#r;#n;get r(){return this.#e}set r(e){w(Rn(e)===32,"invalid r","value",e),this.#e=U(e)}get s(){return this.#t}set s(e){w(Rn(e)===32,"invalid s","value",e);let t=U(e);w(parseInt(t.substring(0,3))<8,"non-canonical s","value",t),this.#t=t}get v(){return this.#r}set v(e){let t=ce(e,"value");w(t===27||t===28,"invalid v","v",e),this.#r=t}get networkV(){return this.#n}get legacyChainId(){let e=this.networkV;return e==null?null:r.getChainId(e)}get yParity(){return this.v===27?0:1}get yParityAndS(){let e=ie(this.s);return this.yParity&&(e[0]|=128),U(e)}get compactSerialized(){return Ee([this.r,this.yParityAndS])}get serialized(){return Ee([this.r,this.s,this.yParity?"0x1c":"0x1b"])}constructor(e,t,n,i){vs(e,Lc,"Signature"),this.#e=t,this.#t=n,this.#r=i,this.#n=null}[Symbol.for("nodejs.util.inspect.custom")](){return`Signature { r: "${this.r}", s: "${this.s}", yParity: ${this.yParity}, networkV: ${this.networkV} }`}clone(){let e=new r(Lc,this.r,this.s,this.v);return this.networkV&&(e.#n=this.networkV),e}toJSON(){let e=this.networkV;return{_type:"signature",networkV:e!=null?e.toString():null,r:this.r,s:this.s,v:this.v}}static getChainId(e){let t=H(e,"v");return t==wL||t==EL?bL:(w(t>=Ug,"invalid EIP-155 v","v",e),(t-Ug)/AL)}static getChainIdV(e,t){return H(e)*AL+BigInt(35+t-27)}static getNormalizedV(e){let t=H(e);return t===bL||t===wL?27:t===_L||t===EL?28:(w(t>=Ug,"invalid v","v",e),t&_L?27:28)}static from(e){function t(l,u){w(l,u,"signature",e)}if(e==null)return new r(Lc,Fg,Fg,27);if(typeof e=="string"){let l=ie(e,"signature");if(l.length===64){let u=U(l.slice(0,32)),d=l.slice(32,64),f=d[0]&128?28:27;return d[0]&=127,new r(Lc,u,U(d),f)}if(l.length===65){let u=U(l.slice(0,32)),d=l.slice(32,64);t((d[0]&128)===0,"non-canonical s");let f=r.getNormalizedV(l[64]);return new r(Lc,u,U(d),f)}t(!1,"invalid raw signature length")}if(e instanceof r)return e.clone();let n=e.r;t(n!=null,"missing r");let i=SL(n),s=function(l,u){if(l!=null)return SL(l);if(u!=null){t(me(u,32),"invalid yParityAndS");let d=ie(u);return d[0]&=127,U(d)}t(!1,"missing s")}(e.s,e.yParityAndS);t((ie(s)[0]&128)==0,"non-canonical s");let{networkV:o,v:a}=function(l,u,d){if(l!=null){let f=H(l);return{networkV:f>=Ug?f:void 0,v:r.getNormalizedV(f)}}if(u!=null)return t(me(u,32),"invalid yParityAndS"),{v:ie(u)[0]&128?28:27};if(d!=null){switch(ce(d,"sig.yParity")){case 0:return{v:27};case 1:return{v:28}}t(!1,"invalid yParity")}t(!1,"missing v")}(e.v,e.yParityAndS,e.yParity),c=new r(Lc,i,s,a);return o&&(c.#n=o),t(e.yParity==null||ce(e.yParity,"sig.yParity")===c.yParity,"yParity mismatch"),t(e.yParityAndS==null||e.yParityAndS===c.yParityAndS,"yParityAndS mismatch"),c}};var Is=class r{#e;constructor(e){w(Rn(e)===32,"invalid private key","privateKey","[REDACTED]"),this.#e=U(e)}get privateKey(){return this.#e}get publicKey(){return r.computePublicKey(this.#e)}get compressedPublicKey(){return r.computePublicKey(this.#e,!0)}sign(e){w(Rn(e)===32,"invalid digest length","digest",e);let t=ui.sign(Ge(e),Ge(this.#e),{lowS:!0});return Qt.from({r:ir(t.r,32),s:ir(t.s,32),v:t.recovery?28:27})}computeSharedSecret(e){let t=r.computePublicKey(e);return U(ui.getSharedSecret(Ge(this.#e),ie(t),!1))}static computePublicKey(e,t){let n=ie(e,"key");if(n.length===32){let s=ui.getPublicKey(n,!!t);return U(s)}if(n.length===64){let s=new Uint8Array(65);s[0]=4,s.set(n,1),n=s}let i=ui.ProjectivePoint.fromHex(n);return U(i.toRawBytes(t))}static recoverPublicKey(e,t){w(Rn(e)===32,"invalid digest length","digest",e);let n=Qt.from(t),i=ui.Signature.fromCompact(Ge(Ee([n.r,n.s])));i=i.addRecoveryBit(n.yParity);let s=i.recoverPublicKey(Ge(e));return w(s!=null,"invalid signautre for digest","signature",t),"0x"+s.toHex(!1)}static addPoints(e,t,n){let i=ui.ProjectivePoint.fromHex(r.computePublicKey(e).substring(2)),s=ui.ProjectivePoint.fromHex(r.computePublicKey(t).substring(2));return"0x"+i.add(s).toHex(!!n)}};var Gde=BigInt(0),Vde=BigInt(36);function TL(r){r=r.toLowerCase();let e=r.substring(2).split(""),t=new Uint8Array(40);for(let i=0;i<40;i++)t[i]=e[i].charCodeAt(0);let n=ie(Oe(t));for(let i=0;i<40;i+=2)n[i>>1]>>4>=8&&(e[i]=e[i].toUpperCase()),(n[i>>1]&15)>=8&&(e[i+1]=e[i+1].toUpperCase());return"0x"+e.join("")}var gE={};for(let r=0;r<10;r++)gE[String(r)]=String(r);for(let r=0;r<26;r++)gE[String.fromCharCode(65+r)]=String(10+r);var CL=15;function Wde(r){r=r.toUpperCase(),r=r.substring(4)+r.substring(0,2)+"00";let e=r.split("").map(n=>gE[n]).join("");for(;e.length>=CL;){let n=e.substring(0,CL);e=parseInt(n,10)%97+e.substring(n.length)}let t=String(98-parseInt(e,10)%97);for(;t.length<2;)t="0"+t;return t}var Kde=function(){let r={};for(let e=0;e<36;e++){let t="0123456789abcdefghijklmnopqrstuvwxyz"[e];r[t]=BigInt(e)}return r}();function Qde(r){r=r.toLowerCase();let e=Gde;for(let t=0;t<r.length;t++)e=e*Vde+Kde[r[t]];return e}function de(r){if(w(typeof r=="string","invalid address","address",r),r.match(/^(0x)?[0-9a-fA-F]{40}$/)){r.startsWith("0x")||(r="0x"+r);let e=TL(r);return w(!r.match(/([A-F].*[a-f])|([a-f].*[A-F])/)||e===r,"bad address checksum","address",r),e}if(r.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){w(r.substring(2,4)===Wde(r),"bad icap checksum","address",r);let e=Qde(r.substring(4)).toString(16);for(;e.length<40;)e="0"+e;return TL("0x"+e)}w(!1,"invalid address","address",r)}function yE(r){let e=de(r.from),n=H(r.nonce,"tx.nonce").toString(16);return n==="0"?n="0x":n.length%2?n="0x0"+n:n="0x"+n,de(Le(Oe(Mn([e,n])),12))}function jg(r){return r&&typeof r.getAddress=="function"}async function vE(r,e){let t=await e;return(t==null||t==="0x0000000000000000000000000000000000000000")&&(P(typeof r!="string","unconfigured name","UNCONFIGURED_NAME",{value:r}),w(!1,"invalid AddressLike value; did not resolve to a value address","target",r)),de(t)}function rt(r,e){if(typeof r=="string")return r.match(/^0x[0-9a-f]{40}$/i)?de(r):(P(e!=null,"ENS resolution requires a provider","UNSUPPORTED_OPERATION",{operation:"resolveName"}),vE(r,e.resolveName(r)));if(jg(r))return vE(r,r.getAddress());if(r&&typeof r.then=="function")return vE(r,r);w(!1,"unsupported addressable value","target",r)}var Xr={};function Y(r,e){let t=!1;return e<0&&(t=!0,e*=-1),new Ne(Xr,`${t?"":"u"}int${e}`,r,{signed:t,width:e})}function Ae(r,e){return new Ne(Xr,`bytes${e||""}`,r,{size:e})}var xL=Symbol.for("_ethers_typed"),Ne=class r{type;value;#e;_typedSymbol;constructor(e,t,n,i){i==null&&(i=null),vs(Xr,e,"Typed"),Q(this,{_typedSymbol:xL,type:t,value:n}),this.#e=i,this.format()}format(){if(this.type==="array")throw new Error("");if(this.type==="dynamicArray")throw new Error("");return this.type==="tuple"?`tuple(${this.value.map(e=>e.format()).join(",")})`:this.type}defaultValue(){return 0}minValue(){return 0}maxValue(){return 0}isBigInt(){return!!this.type.match(/^u?int[0-9]+$/)}isData(){return this.type.startsWith("bytes")}isString(){return this.type==="string"}get tupleName(){if(this.type!=="tuple")throw TypeError("not a tuple");return this.#e}get arrayLength(){if(this.type!=="array")throw TypeError("not an array");return this.#e===!0?-1:this.#e===!1?this.value.length:null}static from(e,t){return new r(Xr,e,t)}static uint8(e){return Y(e,8)}static uint16(e){return Y(e,16)}static uint24(e){return Y(e,24)}static uint32(e){return Y(e,32)}static uint40(e){return Y(e,40)}static uint48(e){return Y(e,48)}static uint56(e){return Y(e,56)}static uint64(e){return Y(e,64)}static uint72(e){return Y(e,72)}static uint80(e){return Y(e,80)}static uint88(e){return Y(e,88)}static uint96(e){return Y(e,96)}static uint104(e){return Y(e,104)}static uint112(e){return Y(e,112)}static uint120(e){return Y(e,120)}static uint128(e){return Y(e,128)}static uint136(e){return Y(e,136)}static uint144(e){return Y(e,144)}static uint152(e){return Y(e,152)}static uint160(e){return Y(e,160)}static uint168(e){return Y(e,168)}static uint176(e){return Y(e,176)}static uint184(e){return Y(e,184)}static uint192(e){return Y(e,192)}static uint200(e){return Y(e,200)}static uint208(e){return Y(e,208)}static uint216(e){return Y(e,216)}static uint224(e){return Y(e,224)}static uint232(e){return Y(e,232)}static uint240(e){return Y(e,240)}static uint248(e){return Y(e,248)}static uint256(e){return Y(e,256)}static uint(e){return Y(e,256)}static int8(e){return Y(e,-8)}static int16(e){return Y(e,-16)}static int24(e){return Y(e,-24)}static int32(e){return Y(e,-32)}static int40(e){return Y(e,-40)}static int48(e){return Y(e,-48)}static int56(e){return Y(e,-56)}static int64(e){return Y(e,-64)}static int72(e){return Y(e,-72)}static int80(e){return Y(e,-80)}static int88(e){return Y(e,-88)}static int96(e){return Y(e,-96)}static int104(e){return Y(e,-104)}static int112(e){return Y(e,-112)}static int120(e){return Y(e,-120)}static int128(e){return Y(e,-128)}static int136(e){return Y(e,-136)}static int144(e){return Y(e,-144)}static int152(e){return Y(e,-152)}static int160(e){return Y(e,-160)}static int168(e){return Y(e,-168)}static int176(e){return Y(e,-176)}static int184(e){return Y(e,-184)}static int192(e){return Y(e,-192)}static int200(e){return Y(e,-200)}static int208(e){return Y(e,-208)}static int216(e){return Y(e,-216)}static int224(e){return Y(e,-224)}static int232(e){return Y(e,-232)}static int240(e){return Y(e,-240)}static int248(e){return Y(e,-248)}static int256(e){return Y(e,-256)}static int(e){return Y(e,-256)}static bytes1(e){return Ae(e,1)}static bytes2(e){return Ae(e,2)}static bytes3(e){return Ae(e,3)}static bytes4(e){return Ae(e,4)}static bytes5(e){return Ae(e,5)}static bytes6(e){return Ae(e,6)}static bytes7(e){return Ae(e,7)}static bytes8(e){return Ae(e,8)}static bytes9(e){return Ae(e,9)}static bytes10(e){return Ae(e,10)}static bytes11(e){return Ae(e,11)}static bytes12(e){return Ae(e,12)}static bytes13(e){return Ae(e,13)}static bytes14(e){return Ae(e,14)}static bytes15(e){return Ae(e,15)}static bytes16(e){return Ae(e,16)}static bytes17(e){return Ae(e,17)}static bytes18(e){return Ae(e,18)}static bytes19(e){return Ae(e,19)}static bytes20(e){return Ae(e,20)}static bytes21(e){return Ae(e,21)}static bytes22(e){return Ae(e,22)}static bytes23(e){return Ae(e,23)}static bytes24(e){return Ae(e,24)}static bytes25(e){return Ae(e,25)}static bytes26(e){return Ae(e,26)}static bytes27(e){return Ae(e,27)}static bytes28(e){return Ae(e,28)}static bytes29(e){return Ae(e,29)}static bytes30(e){return Ae(e,30)}static bytes31(e){return Ae(e,31)}static bytes32(e){return Ae(e,32)}static address(e){return new r(Xr,"address",e)}static bool(e){return new r(Xr,"bool",!!e)}static bytes(e){return new r(Xr,"bytes",e)}static string(e){return new r(Xr,"string",e)}static array(e,t){throw new Error("not implemented yet")}static tuple(e,t){throw new Error("not implemented yet")}static overrides(e){return new r(Xr,"overrides",Object.assign({},e))}static isTyped(e){return e&&typeof e=="object"&&"_typedSymbol"in e&&e._typedSymbol===xL}static dereference(e,t){if(r.isTyped(e)){if(e.type!==t)throw new Error(`invalid type: expecetd ${t}, got ${e.type}`);return e.value}return e}};var zg=class extends tt{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,t){let n=Ne.dereference(t,"string");try{n=de(n)}catch(i){return this._throwError(i.message,t)}return e.writeValue(n)}decode(e){return de(ir(e.readValue(),20))}};var Hg=class extends tt{coder;constructor(e){super(e.name,e.type,"_",e.dynamic),this.coder=e}defaultValue(){return this.coder.defaultValue()}encode(e,t){return this.coder.encode(e,t)}decode(e){return this.coder.decode(e)}};function bE(r,e,t){let n=[];if(Array.isArray(t))n=t;else if(t&&typeof t=="object"){let c={};n=e.map(l=>{let u=l.localName;return P(u,"cannot encode object for signature with missing names","INVALID_ARGUMENT",{argument:"values",info:{coder:l},value:t}),P(!c[u],"cannot encode object for signature with duplicate names","INVALID_ARGUMENT",{argument:"values",info:{coder:l},value:t}),c[u]=!0,t[u]})}else w(!1,"invalid tuple value","tuple",t);w(e.length===n.length,"types/value length mismatch","tuple",t);let i=new Co,s=new Co,o=[];e.forEach((c,l)=>{let u=n[l];if(c.dynamic){let d=s.length;c.encode(s,u);let f=i.writeUpdatableValue();o.push(h=>{f(h+d)})}else c.encode(i,u)}),o.forEach(c=>{c(i.length)});let a=r.appendWriter(i);return a+=r.appendWriter(s),a}function _E(r,e){let t=[],n=[],i=r.subReader(0);return e.forEach(s=>{let o=null;if(s.dynamic){let a=r.readIndex(),c=i.subReader(a);try{o=s.decode(c)}catch(l){if(je(l,"BUFFER_OVERRUN"))throw l;o=l,o.baseType=s.name,o.name=s.localName,o.type=s.type}}else try{o=s.decode(r)}catch(a){if(je(a,"BUFFER_OVERRUN"))throw a;o=a,o.baseType=s.name,o.name=s.localName,o.type=s.type}if(o==null)throw new Error("investigate");t.push(o),n.push(s.localName||null)}),Dn.fromItems(t,n)}var Gg=class extends tt{coder;length;constructor(e,t,n){let i=e.type+"["+(t>=0?t:"")+"]",s=t===-1||e.dynamic;super("array",i,n,s),Q(this,{coder:e,length:t})}defaultValue(){let e=this.coder.defaultValue(),t=[];for(let n=0;n<this.length;n++)t.push(e);return t}encode(e,t){let n=Ne.dereference(t,"array");Array.isArray(n)||this._throwError("expected array value",n);let i=this.length;i===-1&&(i=n.length,e.writeValue(n.length)),qu(n.length,i,"coder array"+(this.localName?" "+this.localName:""));let s=[];for(let o=0;o<n.length;o++)s.push(this.coder);return bE(e,s,n)}decode(e){let t=this.length;t===-1&&(t=e.readIndex(),P(t*Tt<=e.dataLength,"insufficient data length","BUFFER_OVERRUN",{buffer:e.bytes,offset:t*Tt,length:e.dataLength}));let n=[];for(let i=0;i<t;i++)n.push(new Hg(this.coder));return _E(e,n)}};var Vg=class extends tt{constructor(e){super("bool","bool",e,!1)}defaultValue(){return!1}encode(e,t){let n=Ne.dereference(t,"bool");return e.writeValue(n?1:0)}decode(e){return!!e.readValue()}};var Vu=class extends tt{constructor(e,t){super(e,e,t,!0)}defaultValue(){return"0x"}encode(e,t){t=Ge(t);let n=e.writeValue(t.length);return n+=e.writeBytes(t),n}decode(e){return e.readBytes(e.readIndex(),!0)}},Wg=class extends Vu{constructor(e){super("bytes",e)}decode(e){return U(super.decode(e))}};var Kg=class extends tt{size;constructor(e,t){let n="bytes"+String(e);super(n,n,t,!1),Q(this,{size:e},{size:"number"})}defaultValue(){return"0x0000000000000000000000000000000000000000000000000000000000000000".substring(0,2+this.size*2)}encode(e,t){let n=Ge(Ne.dereference(t,this.type));return n.length!==this.size&&this._throwError("incorrect data length",t),e.writeBytes(n)}decode(e){return U(e.readBytes(this.size))}};var Jde=new Uint8Array([]),Qg=class extends tt{constructor(e){super("null","",e,!1)}defaultValue(){return null}encode(e,t){return t!=null&&this._throwError("not null",t),e.writeBytes(Jde)}decode(e){return e.readBytes(0),null}};var $de=BigInt(0),Yde=BigInt(1),Zde=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),Jg=class extends tt{size;signed;constructor(e,t,n){let i=(t?"int":"uint")+e*8;super(i,i,n,!1),Q(this,{size:e,signed:t},{size:"number",signed:"boolean"})}defaultValue(){return 0}encode(e,t){let n=H(Ne.dereference(t,this.type)),i=bs(Zde,Tt*8);if(this.signed){let s=bs(i,this.size*8-1);(n>s||n<-(s+Yde))&&this._throwError("value out-of-bounds",t),n=Lu(n,8*Tt)}else(n<$de||n>bs(i,this.size*8))&&this._throwError("value out-of-bounds",t);return e.writeValue(n)}decode(e){let t=bs(e.readValue(),this.size*8);return this.signed&&(t=Jw(t,this.size*8)),t}};var $g=class extends Vu{constructor(e){super("string",e)}defaultValue(){return""}encode(e,t){return super.encode(e,Kt(Ne.dereference(t,"string")))}decode(e){return _s(super.decode(e))}};var ko=class extends tt{coders;constructor(e,t){let n=!1,i=[];e.forEach(o=>{o.dynamic&&(n=!0),i.push(o.type)});let s="tuple("+i.join(",")+")";super("tuple",s,t,n),Q(this,{coders:Object.freeze(e.slice())})}defaultValue(){let e=[];this.coders.forEach(n=>{e.push(n.defaultValue())});let t=this.coders.reduce((n,i)=>{let s=i.localName;return s&&(n[s]||(n[s]=0),n[s]++),n},{});return this.coders.forEach((n,i)=>{let s=n.localName;!s||t[s]!==1||(s==="length"&&(s="_length"),e[s]==null&&(e[s]=e[i]))}),Object.freeze(e)}encode(e,t){let n=Ne.dereference(t,"tuple");return bE(e,this.coders,n)}decode(e){return _E(e,this.coders)}};function en(r){return Oe(Kt(r))}var Xde="AEEUdwmgDS8BxQKKAP4BOgDjATAAngDUAIMAoABoAOAAagCOAEQAhABMAHIAOwA9ACsANgAmAGIAHgAuACgAJwAXAC0AGgAjAB8ALwAUACkAEgAeAAkAGwARABkAFgA5ACgALQArADcAFQApABAAHgAiABAAGgAeABMAGAUhBe8BFxREN8sF2wC5AK5HAW8ArQkDzQCuhzc3NzcBP68NEfMABQdHBuw5BV8FYAA9MzkI9r4ZBg7QyQAWA9CeOwLNCjcCjqkChuA/lm+RAsXTAoP6ASfnEQDytQFJAjWVCkeXAOsA6godAB/cwdAUE0WlBCN/AQUCQRjFD/MRBjHxDQSJbw0jBzUAswBxme+tnIcAYwabAysG8QAjAEMMmxcDqgPKQyDXCMMxA7kUQwD3NXOrAKmFIAAfBC0D3x4BJQDBGdUFAhEgVD8JnwmQJiNWYUzrg0oAGwAUAB0AFnNcACkAFgBP9h3gPfsDOWDKneY2ChglX1UDYD30ABsAFAAdABZzIGRAnwDD8wAjAEEMzRbDqgMB2sAFYwXqAtCnAsS4AwpUJKRtFHsadUz9AMMVbwLpABM1NJEX0ZkCgYMBEyMAxRVvAukAEzUBUFAtmUwSAy4DBTER33EftQHfSwB5MxJ/AjkWKQLzL8E/cwBB6QH9LQDPDtO9ASNriQC5DQANAwCK21EFI91zHwCoL9kBqQcHBwcHKzUDowBvAQohPvU3fAQgHwCyAc8CKQMA5zMSezr7ULgFmDp/LzVQBgEGAi8FYQVgt8AFcTtlQhpCWEmfe5tmZ6IAExsDzQ8t+X8rBKtTAltbAn0jsy8Bl6utPWMDTR8Ei2kRANkDBrNHNysDBzECQWUAcwFpJ3kAiyUhAJ0BUb8AL3EfAbfNAz81KUsFWwF3YQZtAm0A+VEfAzEJDQBRSQCzAQBlAHsAM70GD/v3IZWHBwARKQAxALsjTwHZAeMPEzmXgIHwABIAGQA8AEUAQDt3gdvIEGcQZAkGTRFMdEIVEwK0D64L7REdDNkq09PgADSxB/MDWwfzA1sDWwfzB/MDWwfzA1sDWwNbA1scEvAi28gQZw9QBHUFlgWTBN4IiyZREYkHMAjaVBV0JhxPA00BBCMtSSQ7mzMTJUpMFE0LCAQ2SmyvfUADTzGzVP2QqgPTMlc5dAkGHnkSqAAyD3skNb1OhnpPcagKU0+2tYdJak5vAsY6sEAACikJm2/Dd1YGRRAfJ6kQ+ww3AbkBPw3xS9wE9QY/BM0fgRkdD9GVoAipLeEM8SbnLqWAXiP5KocF8Uv4POELUVFsD10LaQnnOmeBUgMlAREijwrhDT0IcRD3Cs1vDekRSQc9A9lJngCpBwULFR05FbkmFGKwCw05ewb/GvoLkyazEy17AAXXGiUGUQEtGwMA0y7rhbRaNVwgT2MGBwspI8sUrFAkDSlAu3hMGh8HGSWtApVDdEqLUToelyH6PEENai4XUYAH+TwJGVMLhTyiRq9FEhHWPpE9TCJNTDAEOYMsMyePCdMPiQy9fHYBXQklCbUMdRM1ERs3yQg9Bx0xlygnGQglRplgngT7owP3E9UDDwVDCUUHFwO5HDETMhUtBRGBKNsC9zbZLrcCk1aEARsFzw8pH+MQVEfkDu0InwJpA4cl7wAxFSUAGyKfCEdnAGOP3FMJLs8Iy2pwI3gDaxTrZRF3B5UOWwerHDcVwxzlcMxeD4YMKKezCV8BeQmdAWME5wgNNV+MpCBFZ1eLXBifIGVBQ14AAjUMaRWjRMGHfAKPD28SHwE5AXcHPQ0FAnsR8RFvEJkI74YINbkz/DopBFMhhyAVCisDU2zSCysm/Qz8bQGnEmYDEDRBd/Jnr2C6KBgBBx0yyUFkIfULlk/RDKAaxRhGVDIZ6AfDA/ca9yfuQVsGAwOnBxc6UTPyBMELbQiPCUMATQ6nGwfbGG4KdYzUATWPAbudA1uVhwJzkwY7Bw8Aaw+LBX3pACECqwinAAkA0wNbAD0CsQehAB0AiUUBQQMrMwEl6QKTA5cINc8BmTMB9y0EH8cMGQD7O25OAsO1AoBuZqYF4VwCkgJNOQFRKQQJUktVA7N15QDfAE8GF+NLARmvTs8e50cB43MvAMsA/wAJOQcJRQHRAfdxALsBYws1Caa3uQFR7S0AhwAZbwHbAo0A4QA5AIP1AVcAUQVd/QXXAlNNARU1HC9bZQG/AyMBNwERAH0Gz5GpzQsjBHEH1wIQHxXlAu8yB7kFAyLjE9FCyQK94lkAMhoKPAqrCqpgX2Q3CjV2PVQAEh+sPss/UgVVO1c7XDtXO1w7VztcO1c7XDtXO1wDm8Pmw+YKcF9JYe8Mqg3YRMw6TRPfYFVgNhPMLbsUxRXSJVoZQRrAJwkl6FUNDwgt12Y0CDA0eRfAAEMpbINFY4oeNApPHOtTlVT8LR8AtUumM7MNsBsZREQFS3XxYi4WEgomAmSFAmJGX1GzAV83JAKh+wJonAJmDQKfiDgfDwJmPwJmKgRyBIMDfxcDfpY5Cjl7GzmGOicnAmwhAjI6OA4CbcsCbbLzjgM3a0kvAWsA4gDlAE4JB5wMkQECD8YAEbkCdzMCdqZDAnlPRwJ4viFg30WyRvcCfEMCeswCfQ0CfPRIBEiBZygALxlJXEpfGRtK0ALRBQLQ0EsrA4hTA4fqRMmRNgLypV0HAwOyS9JMMSkH001QTbMCi0MCitzFHwshR2sJuwKOOwKOYESbhQKO3QKOYHxRuFM5AQ5S2FSJApP/ApMQAO0AIFUiVbNV1AosHymZijLleGpFPz0Cl6MC77ZYJawAXSkClpMCloCgAK1ZsFoNhVEAPwKWuQKWUlxIXNUCmc8CmWhczl0LHQKcnznGOqECnBoCn58CnryOACETNS4TAp31Ap6WALlBYThh8wKe1wKgcgGtAp6jIwKeUqljzGQrKS8CJ7MCJoICoP8CoFDbAqYzAqXSAqgDAIECp/ZogGi1AAdNaiBq1QKs5wKssgKtawKtBgJXIQJV4AKx5dsDH1JsmwKywRECsuwbbORtZ21MYwMl0QK2YD9DbpQDKUkCuGICuUsZArkue3A6cOUCvR0DLbYDMhUCvoxyBgMzdQK+HnMmc1MCw88CwwhzhnRPOUl05AM8qwEDPJ4DPcMCxYACxksCxhSNAshtVQLISALJUwLJMgJkoQLd1nh9ZXiyeSlL1AMYp2cGAmH4GfeVKHsPXpZevxUCz28Cz3AzT1fW9xejAMqxAs93AS3uA04Wfk8JAtwrAtuOAtJTA1JgA1NjAQUDVZCAjUMEzxrxZEl5A4LSg5EC2ssC2eKEFIRNp0ADhqkAMwNkEoZ1Xf0AWQLfaQLevHd7AuIz7RgB8zQrAfSfAfLWiwLr9wLpdH0DAur9AuroAP1LAb0C7o0C66CWrpcHAu5DA4XkmH1w5HGlAvMHAG0DjhqZlwL3FwORcgOSiwL3nAL53QL4apogmq+/O5siA52HAv7+AR8APZ8gAZ+3AwWRA6ZuA6bdANXJAwZuoYyiCQ0DDE0BEwEjB3EGZb1rCQC/BG/DFY8etxEAG3k9ACcDNxJRA42DAWcrJQCM8wAlAOanC6OVCLsGI6fJBgCvBRnDBvElRUYFFoAFcD9GSDNCKUK8X3kZX8QAls0FOgCQVCGbwTsuYDoZutcONxjOGJHJ/gVfBWAFXwVgBWsFYAVfBWAFXwVgBV8FYAVfBWBOHQjfjW8KCgoKbF7xMwTRA7kGN8PDAMMEr8MA70gxFroFTj5xPnhCR0K+X30/X/AAWBkzswCNBsxzzASm70aCRS4rDDMeLz49fnXfcsH5GcoscQFz13Y4HwVnBXLJycnACNdRYwgICAqEXoWTxgA7P4kACxbZBu21Kw0AjMsTAwkVAOVtJUUsJ1JCuULESUArXy9gPi9AKwnJRQYKTD9LPoA+iT54PnkCkULEUUpDX9NWV3JVEjQAc1w3A3IBE3YnX+g7QiMJb6MKaiszRCUuQrNCxDPMCcwEX9EWJzYREBEEBwIHKn6l33JCNVIfybPJtAltydPUCmhBZw/tEKsZAJOVJU1CLRuxbUHOQAo7P0s+eEJHHA8SJVRPdGM0NVrpvBoKhfUlM0JHHGUQUhEWO1xLSj8MO0ucNAqJIzVCRxv9EFsqKyA4OQgNj2nwZgp5ZNFgE2A1K3YHS2AhQQojJmC7DgpzGG1WYFUZCQYHZO9gHWCdYIVgu2BTYJlwFh8GvRbcXbG8YgtDHrMBwzPVyQonHQgkCyYBgQJ0Ajc4nVqIAwGSCsBPIgDsK3SWEtIVBa5N8gGjAo+kVwVIZwD/AEUSCDweX4ITrRQsJ8K3TwBXFDwEAB0TvzVcAtoTS20RIwDgVgZ9BBImYgA5AL4Coi8LFnezOkCnIQFjAY4KBAPh9RcGsgZSBsEAJctdsWIRu2kTkQstRw7DAcMBKgpPBGIGMDAwKCYnKTQaLg4AKRSVAFwCdl+YUZ0JdicFD3lPAdt1F9ZZKCGxuE3yBxkFVGcA/wBFEgiCBwAOLHQSjxOtQDg1z7deFRMAZ8QTAGtKb1ApIiPHADkAvgKiLy1DFtYCmBiDAlDDWNB0eo7fpaMO/aEVRRv0ATEQZBIODyMEAc8JQhCbDRgzFD4TAEMAu9YBCgCsAOkAm5I3ABwAYxvONnR+MhXJAxgKQyxL2+kkJhMbhQKDBMkSsvF0AD9BNQ6uQC7WqSQHwxEAEEIu1hkhAH2z4iQPwyJPHNWpdyYBRSpnJALzoBAEVPPsH20MxA0CCEQKRgAFyAtFAlMNwwjEDUQJRArELtapMg7DDZgJIw+TGukEIwvDFkMAqAtDEMMMBhioe+QAO3MMRAACrgnEBSPY9Q0FDnbSBoMAB8MSYxkSxAEJAPIJAAB8FWMOFtMc/HcXwxhDAC7DAvOowwAewwJdKDKHAAHDAALrFUQVwwAbwyvzpWMWv8wA/ABpAy++bcYDUKPD0KhDCwKmJ1MAAmMA5+UZwxAagwipBRL/eADfw6fDGOMCGsOjk3l6BwOpo4sAEsMOGxMAA5sAbcMOAAvDp0MJGkMDwgipnNIPAwfIqUMGAOGDAAPzABXDAAcDAAnDAGmTABrDAA7DChjDjnEWAwABYwAOcwAuUyYABsMAF8MIKQANUgC6wy4AA8MADqMq8wCyYgAcIwAB8wqpAAXOCx0V4wAHowBCwwEKAGnDAAuDAB3DAAjDCakABdIAbqcZ3QCZCCkABdIAAAFDAAfjAB2jCCkABqIACYMAGzMAbSMA5sOIAAhjAAhDABTDBAkpAAbSAOOTAAlDC6kOzPtnAAdDAG6kQFAATwAKwwwAA0MACbUDPwAHIwAZgwACE6cDAAojAApDAAoDp/MGwwAJIwADEwAQQwgAFEMAEXMAD5MADfMADcMAGRMOFiMAFUMAbqMWuwHDAMIAE0MLAGkzEgDhUwACQwAEWgAXgwUjAAbYABjDBSYBgzBaAEFNALcQBxUMegAwMngBrA0IZgJ0KxQHBREPd1N0ZzKRJwaIHAZqNT4DqQq8BwngAB4DAwt2AX56T1ocKQNXAh1GATQGC3tOxYNagkgAMQA5CQADAQEAWxLjAIOYNAEzAH7tFRk6TglSAF8NAAlYAQ+S1ACAQwQorQBiAN4dAJ1wPyeTANVzuQDX3AIeEMp9eyMgXiUAEdkBkJizKltbVVAaRMqRAAEAhyQ/SDEz6BmfVwB6ATEsOClKIRcDOF0E/832AFNt5AByAnkCRxGCOs94NjXdAwINGBonDBwPALW2AwICAgAAAAAAAAYDBQMDARrUAwAtAAAAAgEGBgYGBgYFBQUFBQUEBQYHCAkEBQUFBQQAAAICAAAAIgCNAJAAlT0A6gC7ANwApEQAwgCyAK0AqADuAKYA2gCjAOcBCAEDAMcAgQBiANIA1AEDAN4A8gCQAKkBMQDqAN8A3AsBCQ8yO9ra2tq8xuLT1tRJOB0BUgFcNU0BWgFpAWgBWwFMUUlLbhMBUxsNEAs6PhMOACcUKy0vMj5AQENDQ0RFFEYGJFdXV1dZWVhZL1pbXVxcI2NnZ2ZoZypsbnZ1eHh4eHh4enp6enp6enp6enp8fH18e2IARPIASQCaAHgAMgBm+ACOAFcAVwA3AnbvAIsABfj4AGQAk/IAnwBPAGIAZP//sACFAIUAaQBWALEAJAC2AIMCQAJDAPwA5wD+AP4A6AD/AOkA6QDoAOYALwJ7AVEBQAE+AVQBPgE+AT4BOQE4ATgBOAEcAVgXADEQCAEAUx8SHgsdHhYAjgCWAKYAUQBqIAIxAHYAbwCXAxUDJzIDIUlGTzEAkQJPAMcCVwKkAMAClgKWApYClgKWApYCiwKWApYClgKWApYClgKVApUCmAKgApcClgKWApQClAKUApQCkgKVAnUB1AKXAp8ClgKWApUeAIETBQD+DQOfAmECOh8BVBg9AuIZEjMbAU4/G1WZAXusRAFpYQEFA0FPAQYAmTEeIJdyADFoAHEANgCRA5zMk/C2jGINwjMWygIZCaXdfDILBCs5dAE7YnQBugDlhoiHhoiGiYqKhouOjIaNkI6Ij4qQipGGkoaThpSSlYaWhpeKmIaZhpqGm4aci52QnoqfhuIC4XTpAt90AIp0LHSoAIsAdHQEQwRABEIERQRDBEkERgRBBEcESQRIBEQERgRJAJ5udACrA490ALxuAQ10ANFZdHQA13QCFHQA/mJ0AP4BIQD+APwA/AD9APwDhGZ03ASMK23HAP4A/AD8AP0A/CR0dACRYnQA/gCRASEA/gCRAvQA/gCRA4RmdNwEjCttxyR0AP9idAEhAP4A/gD8APwA/QD8AP8A/AD8AP0A/AOEZnTcBIwrbcckdHQAkWJ0ASEA/gCRAP4AkQL0AP4AkQOEZnTcBIwrbcckdAJLAT50AlIBQXQCU8l0dAJfdHQDpgL0A6YDpgOnA6cDpwOnA4RmdNwEjCttxyR0dACRYnQBIQOmAJEDpgCRAvQDpgCRA4RmdNwEjCttxyR0BDh0AJEEOQCRDpU5dSgCADR03gV2CwArdAEFAM5iCnR0AF1iAAYcOgp0dACRCnQAXAEIwWZ0CnRmdHQAkWZ0CnRmdEXgAFF03gp0dEY0tlT2u3SOAQTwscwhjZZKrhYcBSfFp9XNbKiVDOD2b+cpe4/Z17mQnbtzzhaeQtE2GGj0IDNTjRUSyTxxw/RPHW/+vS7d1NfRt9z9QPZg4X7QFfhCnkvgNPIItOsC2eV6hPannZNHlZ9xrwZXIMOlu3jSoQSq78WEjwLjw1ELSlF1aBvfzwk5ZX7AUvQzjPQKbDuQ+sm4wNOp4A6AdVuRS0t1y/DZpg4R6m7FNjM9HgvW7Bi88zaMjOo6lM8wtBBdj8LP4ylv3zCXPhebMKJc066o9sF71oFW/8JXu86HJbwDID5lzw5GWLR/LhT0Qqnp2JQxNZNfcbLIzPy+YypqRm/lBmGmex+82+PisxUumSeJkALIT6rJezxMH+CTJmQtt5uwTVbL3ptmjDUQzlSIvWi8Tl7ng1NpuRn1Ng4n14Qc+3Iil7OwkvNWogLSPkn3pihIFytyIGmMhOe3n1tWsuMy9BdKyqF4Z3v2SgggTL9KVvMXPnCbRe+oOuFFP3HejBG/w9gvmfNYvg6JuWia2lcSSN1uIjBktzoIazOHPJZ7kKHPz8mRWVdW3lA8WGF9dQF6Bm673boov3BUWDU2JNcahR23GtfHKLOz/viZ+rYnZFaIznXO67CYEJ1fXuTRpZhYZkKe54xeoagkNGLs+NTZHE0rX45/XvQ2RGADX6vcAvdxIUBV27wxGm2zjZo4X3ILgAlrOFheuZ6wtsvaIj4yLY7qqawlliaIcrz2G+c3vscAnCkCuMzMmZvMfu9lLwTvfX+3cVSyPdN9ZwgDZhfjRgNJcLiJ67b9xx8JHswprbiE3v9UphotAPIgnXVIN5KmMc0piXhc6cChPnN+MRhG9adtdttQTTwSIpl8I4/j//d3sz1326qTBTpPRM/Hgh3kzqEXs8ZAk4ErQhNO8hzrQ0DLkWMA/N+91tn2MdOJnWC2FCZehkQrwzwbKOjhvZsbM95QoeL9skYyMf4srVPVJSgg7pOLUtr/n9eT99oe9nLtFRpjA9okV2Kj8h9k5HaC0oivRD8VyXkJ81tcd4fHNXPCfloIQasxsuO18/46dR2jgul/UIet2G0kRvnyONMKhHs6J26FEoqSqd+rfYjeEGwHWVDpX1fh1jBBcKGMqRepju9Y00mDVHC+Xdij/j44rKfvfjGinNs1jO/0F3jB83XCDINN/HB84axlP+3E/klktRo+vl3U/aiyMJbIodE1XSsDn6UAzIoMtUObY2+k/4gY/l+AkZJ5Sj2vQrkyLm3FoxjhDX+31UXBFf9XrAH31fFqoBmDEZvhvvpnZ87N+oZEu7U9O/nnk+QWj3x8uyoRbEnf+O5UMr9i0nHP38IF5AvzrBW8YWBUR0mIAzIvndQq9N3v/Jto3aPjPXUPl8ASdPPyAp7jENf8bk7VMM9ol9XGmlBmeDMuGqt+WzuL6CXAxXjIhCPM5vACchgMJ/8XBGLO/D1isVvGhwwHHr1DLaI5mn2Jr/b1pUD90uciDaS8cXNDzCWvNmT/PhQe5e8nTnnnkt8Ds/SIjibcum/fqDhKopxAY8AkSrPn+IGDEKOO+U3XOP6djFs2H5N9+orhOahiQk5KnEUWa+CzkVzhp8bMHRbg81qhjjXuIKbHjSLSIBKWqockGtKinY+z4/RdBUF6pcc3JmnlxVcNgrI4SEzKUZSwcD2QCyxzKve+gAmg6ZuSRkpPFa6mfThu7LJNu3H5K42uCpNvPAsoedolKV/LHe/eJ+BbaG5MG0NaSGVPRUmNFMFFSSpXEcXwbVh7UETOZZtoVNRGOIbbkig3McEtR68cG0RZAoJevWYo7Dg/lZ1CQzblWeUvVHmr8fY4Nqd9JJiH/zEX24mJviH60fAyFr0A3c4bC1j3yZU60VgJxXn8JgJXLUIsiBnmKmMYz+7yBQFBvqb2eYnuW59joZBf56/wXvWIR4R8wTmV80i1mZy+S4+BUES+hzjk0uXpC///z/IlqHZ1monzlXp8aCfhGKMti73FI1KbL1q6IKO4fuBuZ59gagjn5xU79muMpHXg6S+e+gDM/U9BKLHbl9l6o8czQKl4RUkJJiqftQG2i3BMg/TQlUYFkJDYBOOvAugYuzYSDnZbDDd/aSd9x0Oe6F+bJcHfl9+gp6L5/TgA+BdFFovbfCrQ40s5vMPw8866pNX8zyFGeFWdxIpPVp9Rg1UPOVFbFZrvaFq/YAzHQgqMWpahMYfqHpmwXfHL1/kpYmGuHFwT55mQu0dylfNuq2Oq0hTMCPwqfxnuBIPLXfci4Y1ANy+1CUipQxld/izVh16WyG2Q0CQQ9NqtAnx1HCHwDj7sYxOSB0wopZSnOzxQOcExmxrVTF2BkOthVpGfuhaGECfCJpJKpjnihY+xOT2QJxN61+9K6QSqtv2Shr82I3jgJrqBg0wELFZPjvHpvzTtaJnLK6Vb97Yn933koO/saN7fsjwNKzp4l2lJVx2orjCGzC/4ZL4zCver6aQYtC5sdoychuFE6ufOiog+VWi5UDkbmvmtah/3aArEBIi39s5ILUnlFLgilcGuz9CQshEY7fw2ouoILAYPVT/gyAIq3TFAIwVsl+ktkRz/qGfnCDGrm5gsl/l9QdvCWGsjPz3dU7XuqKfdUrr/6XIgjp4rey6AJBmCmUJMjITHVdFb5m1p+dLMCL8t55zD42cmftmLEJC0Da04YiRCVUBLLa8D071/N5UBNBXDh0LFsmhV/5B5ExOB4j3WVG/S3lfK5o+V6ELHvy6RR9n4ac+VsK4VE4yphPvV+kG9FegTBH4ZRXL2HytUHCduJazB/KykjfetYxOXTLws267aGOd+I+JhKP//+VnXmS90OD/jvLcVu0asyqcuYN1mSb6XTlCkqv1vigZPIYwNF/zpWcT1GR/6aEIRjkh0yhg4LXJfaGobYJTY4JI58KiAKgmmgAKWdl5nYCeLqavRJGQNuYuZtZFGx+IkI4w4NS2xwbetNMunOjBu/hmKCI/w7tfiiyUd//4rbTeWt4izBY8YvGIN6vyKYmP/8X8wHKCeN+WRcKM70+tXKNGyevU9H2Dg5BsljnTf8YbsJ1TmMs74Ce2XlHisleguhyeg44rQOHZuw/6HTkhnnurK2d62q6yS7210SsAIaR+jXMQA+svkrLpsUY+F30Uw89uOdGAR6vo4FIME0EfVVeHTu6eKicfhSqOeXJhbftcd08sWEnNUL1C9fnprTgd83IMut8onVUF0hvqzZfHduPjbjwEXIcoYmy+P6tcJZHmeOv6VrvEdkHDJecjHuHeWANe79VG662qTjA/HCvumVv3qL+LrOcpqGps2ZGwQdFJ7PU4iuyRlBrwfO+xnPyr47s2cXVbWzAyznDiBGjCM3ksxjjqM62GE9C8f5U38kB3VjtabKp/nRdvMESPGDG90bWRLAt1Qk5DyLuazRR1YzdC1c+hZXvAWV8xA72S4A8B67vjVhbba3MMop293FeEXpe7zItMWrJG/LOH9ByOXmYnNJfjmfuX9KbrpgLOba4nZ+fl8Gbdv/ihv+6wFGKHCYrVwmhFC0J3V2bn2tIB1wCc1CST3d3X2OyxhguXcs4sm679UngzofuSeBewMFJboIQHbUh/m2JhW2hG9DIvG2t7yZIzKBTz9wBtnNC+2pCRYhSIuQ1j8xsz5VvqnyUIthvuoyyu7fNIrg/KQUVmGQaqkqZk/Vx5b33/gsEs8yX7SC1J+NV4icz6bvIE7C5G6McBaI8rVg56q5QBJWxn/87Q1sPK4+sQa8fLU5gXo4paaq4cOcQ4wR0VBHPGjKh+UlPCbA1nLXyEUX45qZ8J7/Ln4FPJE2TdzD0Z8MLSNQiykMMmSyOCiFfy84Rq60emYB2vD09KjYwsoIpeDcBDTElBbXxND72yhd9pC/1CMid/5HUMvAL27OtcIJDzNKpRPNqPOpyt2aPGz9QWIs9hQ9LiX5s8m9hjTUu/f7MyIatjjd+tSfQ3ufZxPpmJhTaBtZtKLUcfOCUqADuO+QoH8B9v6U+P0HV1GLQmtoNFTb3s74ivZgjES0qfK+8RdGgBbcCMSy8eBvh98+et1KIFqSe1KQPyXULBMTsIYnysIwiZBJYdI20vseV+wuJkcqGemehKjaAb9L57xZm3g2zX0bZ2xk/fU+bCo7TlnbW7JuF1YdURo/2Gw7VclDG1W7LOtas2LX4upifZ/23rzpsnY/ALfRgrcWP5hYmV9VxVOQA1fZvp9F2UNU+7d7xRyVm5wiLp3/0dlV7vdw1PMiZrbDAYzIVqEjRY2YU03sJhPnlwIPcZUG5ltL6S8XCxU1eYS5cjr34veBmXAvy7yN4ZjArIG0dfD/5UpBNlX1ZPoxJOwyqRi3wQWtOzd4oNKh0LkoTm8cwqgIfKhqqGOhwo71I+zXnMemTv2B2AUzABWyFztGgGULjDDzWYwJUVBTjKCn5K2QGMK1CQT7SzziOjo+BhAmqBjzuc3xYym2eedGeOIRJVyTwDw37iCMe4g5Vbnsb5ZBdxOAnMT7HU4DHpxWGuQ7GeiY30Cpbvzss55+5Km1YsbD5ea3NI9QNYIXol5apgSu9dZ8f8xS5dtHpido5BclDuLWY4lhik0tbJa07yJhH0BOyEut/GRbYTS6RfiTYWGMCkNpfSHi7HvdiTglEVHKZXaVhezH4kkXiIvKopYAlPusftpE4a5IZwvw1x/eLvoDIh/zpo9FiQInsTb2SAkKHV42XYBjpJDg4374XiVb3ws4qM0s9eSQ5HzsMU4OZJKuopFjBM+dAZEl8RUMx5uU2N486Kr141tVsGQfGjORYMCJAMsxELeNT4RmWjRcpdTGBwcx6XN9drWqPmJzcrGrH4+DRc7+n1w3kPZwu0BkNr6hQrqgo7JTB9A5kdJ/H7P4cWBMwsmuixAzJB3yrQpnGIq90lxAXLzDCdn1LPibsRt7rHNjgQBklRgPZ8vTbjXdgXrTWQsK5MdrXXQVPp0Rinq3frzZKJ0qD6Qhc40VzAraUXlob1gvkhK3vpmHgI6FRlQZNx6eRqkp0zy4AQlX813fAPtL3jMRaitGFFjo0zmErloC+h+YYdVQ6k4F/epxAoF0BmqEoKNTt6j4vQZNQ2BoqF9Vj53TOIoNmDiu9Xp15RkIgQIGcoLpfoIbenzpGUAtqFJp5W+LLnx38jHeECTJ/navKY1NWfN0sY1T8/pB8kIH3DU3DX+u6W3YwpypBMYOhbSxGjq84RZ84fWJow8pyHqn4S/9J15EcCMsXqrfwyd9mhiu3+rEo9pPpoJkdZqHjra4NvzFwuThNKy6hao/SlLw3ZADUcUp3w3SRVfW2rhl80zOgTYnKE0Hs2qp1J6H3xqPqIkvUDRMFDYyRbsFI3M9MEyovPk8rlw7/0a81cDVLmBsR2ze2pBuKb23fbeZC0uXoIvDppfTwIDxk1Oq2dGesGc+oJXWJLGkOha3CX+DUnzgAp9HGH9RsPZN63Hn4RMA5eSVhPHO+9RcRb/IOgtW31V1Q5IPGtoxPjC+MEJbVlIMYADd9aHYWUIQKopuPOHmoqSkubnAKnzgKHqgIOfW5RdAgotN6BN+O2ZYHkuemLnvQ8U9THVrS1RtLmKbcC7PeeDsYznvqzeg6VCNwmr0Yyx1wnLjyT84BZz3EJyCptD3yeueAyDWIs0L2qs/VQ3HUyqfrja0V1LdDzqAikeWuV4sc7RLIB69jEIBjCkyZedoUHqCrOvShVzyd73OdrJW0hPOuQv2qOoHDc9xVb6Yu6uq3Xqp2ZaH46A7lzevbxQEmfrzvAYSJuZ4WDk1Hz3QX1LVdiUK0EvlAGAYlG3Md30r7dcPN63yqBCIj25prpvZP0nI4+EgWoFG95V596CurXpKRBGRjQlHCvy5Ib/iW8nZJWwrET3mgd6mEhfP4KCuaLjopWs7h+MdXFdIv8dHQJgg1xi1eYqB0uDYjxwVmri0Sv5XKut/onqapC+FQiC2C1lvYJ9MVco6yDYsS3AANUfMtvtbYI2hfwZatiSsnoUeMZd34GVjkMMKA+XnjJpXgRW2SHTZplVowPmJsvXy6w3cfO1AK2dvtZEKTkC/TY9LFiKHCG0DnrMQdGm2lzlBHM9iEYynH2UcVMhUEjsc0oDBTgo2ZSQ1gzkAHeWeBXYFjYLuuf8yzTCy7/RFR81WDjXMbq2BOH5dURnxo6oivmxL3cKzKInlZkD31nvpHB9Kk7GfcfE1t+1V64b9LtgeJGlpRFxQCAqWJ5DoY77ski8gsOEOr2uywZaoO/NGa0X0y1pNQHBi3b2SUGNpcZxDT7rLbBf1FSnQ8guxGW3W+36BW0gBje4DOz6Ba6SVk0xiKgt+q2JOFyr4SYfnu+Ic1QZYIuwHBrgzr6UvOcSCzPTOo7D6IC4ISeS7zkl4h+2VoeHpnG/uWR3+ysNgPcOIXQbv0n4mr3BwQcdKJxgPSeyuP/z1Jjg4e9nUvoXegqQVIE30EHx5GHv+FAVUNTowYDJgyFhf5IvlYmEqRif6+WN1MkEJmDcQITx9FX23a4mxy1AQRsOHO/+eImX9l8EMJI3oPWzVXxSOeHU1dUWYr2uAA7AMb+vAEZSbU3qob9ibCyXeypEMpZ6863o6QPqlqGHZkuWABSTVNd4cOh9hv3qEpSx2Zy/DJMP6cItEmiBJ5PFqQnDEIt3NrA3COlOSgz43D7gpNFNJ5MBh4oFzhDPiglC2ypsNU4ISywY2erkyb1NC3Qh/IfWj0eDgZI4/ln8WPfBsT3meTjq1Uqt1E7Zl/qftqkx6aM9KueMCekSnMrcHj1CqTWWzEzPsZGcDe3Ue4Ws+XFYVxNbOFF8ezkvQGR6ZOtOLU2lQEnMBStx47vE6Pb7AYMBRj2OOfZXfisjJnpTfSNjo6sZ6qSvNxZNmDeS7Gk3yYyCk1HtKN2UnhMIjOXUzAqDv90lx9O/q/AT1ZMnit5XQe9wmQxnE/WSH0CqZ9/2Hy+Sfmpeg8RwsHI5Z8kC8H293m/LHVVM/BA7HaTJYg5Enk7M/xWpq0192ACfBai2LA/qrCjCr6Dh1BIMzMXINBmX96MJ5Hn2nxln/RXPFhwHxUmSV0EV2V0jm86/dxxuYSU1W7sVkEbN9EzkG0QFwPhyHKyb3t+Fj5WoUUTErcazE/N6EW6Lvp0d//SDPj7EV9UdJN+Amnf3Wwk3A0SlJ9Z00yvXZ7n3z70G47Hfsow8Wq1JXcfwnA+Yxa5mFsgV464KKP4T31wqIgzFPd3eCe3j5ory5fBF2hgCFyVFrLzI9eetNXvM7oQqyFgDo4CTp/hDV9NMX9JDHQ/nyHTLvZLNLF6ftn2OxjGm8+PqOwhxnPHWipkE/8wbtyri80Sr7pMNkQGMfo4ZYK9OcCC4ESVFFbLMIvlxSoRqWie0wxqnLfcLSXMSpMMQEJYDVObYsXIQNv4TGNwjq1kvT1UOkicTrG3IaBZ3XdScS3u8sgeZPVpOLkbiF940FjbCeNRINNvDbd01EPBrTCPpm12m43ze1bBB59Ia6Ovhnur/Nvx3IxwSWol+3H2qfCJR8df6aQf4v6WiONxkK+IqT4pKQrZK/LplgDI/PJZbOep8dtbV7oCr6CgfpWa8NczOkPx81iSHbsNhVSJBOtrLIMrL31LK9TqHqAbAHe0RLmmV806kRLDLNEhUEJfm9u0sxpkL93Zgd6rw+tqBfTMi59xqXHLXSHwSbSBl0EK0+loECOPtrl+/nsaFe197di4yUgoe4jKoAJDXc6DGDjrQOoFDWZJ9HXwt8xDrQP+7aRwWKWI1GF8s8O4KzxWBBcwnl3vnl1Oez3oh6Ea1vjR7/z7DDTrFtqU2W/KAEzAuXDNZ7MY73MF216dzdSbWmUp4lcm7keJfWaMHgut9x5C9mj66Z0lJ+yhsjVvyiWrfk1lzPOTdhG15Y7gQlXtacvI7qv/XNSscDwqkgwHT/gUsD5yB7LdRRvJxQGYINn9hTpodKFVSTPrtGvyQw+HlRFXIkodErAGu9Iy1YpfSPc3jkFh5CX3lPxv7aqjE/JAfTIpEjGb/H7MO0e2vsViSW1qa/Lmi4/n4DEI3g7lYrcanspDfEpKkdV1OjSLOy0BCUqVoECaB55vs06rXl4jqmLsPsFM/7vYJ0vrBhDCm/00A/H81l1uekJ/6Lml3Hb9+NKiLqATJmDpyzfYZFHumEjC662L0Bwkxi7E9U4cQA0XMVDuMYAIeLMPgQaMVOd8fmt5SflFIfuBoszeAw7ow5gXPE2Y/yBc/7jExARUf/BxIHQBF5Sn3i61w4z5xJdCyO1F1X3+3ax+JSvMeZ7S6QSKp1Fp/sjYz6Z+VgCZzibGeEoujryfMulH7Rai5kAft9ebcW50DyJr2uo2z97mTWIu45YsSnNSMrrNUuG1XsYBtD9TDYzQffKB87vWbkM4EbPAFgoBV4GQS+vtFDUqOFAoi1nTtmIOvg38N4hT2Sn8r8clmBCXspBlMBYTnrqFJGBT3wZOzAyJDre9dHH7+x7qaaKDOB4UQALD5ecS0DE4obubQEiuJZ0EpBVpLuYcce8Aa4PYd/V4DLDAJBYKQPCWTcrEaZ5HYbJi11Gd6hjGom1ii18VHYnG28NKpkz2UKVPxlhYSp8uZr367iOmoy7zsxehW9wzcy2zG0a80PBMCRQMb32hnaHeOR8fnNDzZhaNYhkOdDsBUZ3loDMa1YP0uS0cjUP3b/6DBlqmZOeNABDsLl5BI5QJups8uxAuWJdkUB/pO6Zax6tsg7fN5mjjDgMGngO+DPcKqiHIDbFIGudxtPTIyDi9SFMKBDcfdGQRv41q1AqmxgkVfJMnP8w/Bc7N9/TR6C7mGObFqFkIEom8sKi2xYqJLTCHK7cxzaZvqODo22c3wisBCP4HeAgcRbNPAsBkNRhSmD48dHupdBRw4mIvtS5oeF6zeT1KMCyhMnmhpkFAGWnGscoNkwvQ8ZM5lE/vgTHFYL99OuNxdFBxTEDd5v2qLR8y9WkXsWgG6kZNndFG+pO/UAkOCipqIhL3hq7cRSdrCq7YhUsTocEcnaFa6nVkhnSeRYUA1YO0z5itF9Sly3VlxYDw239TJJH6f3EUfYO5lb7bcFcz8Bp7Oo8QmnsUHOz/fagVUBtKEw1iT88j+aKkv8cscKNkMxjYr8344D1kFoZ7/td1W6LCNYN594301tUGRmFjAzeRg5vyoM1F6+bJZ/Q54jN/k8SFd3DxPTYaAUsivsBfgTn7Mx8H2SpPt4GOdYRnEJOH6jHM2p6SgB0gzIRq6fHxGMmSmqaPCmlfwxiuloaVIitLGN8wie2CDWhkzLoCJcODh7KIOAqbHEvXdUxaS4TTTs07Clzj/6GmVs9kiZDerMxEnhUB6QQPlcfqkG9882RqHoLiHGBoHfQuXIsAG8GTAtao2KVwRnvvam8jo1e312GQAKWEa4sUVEAMG4G6ckcONDwRcg1e2D3+ohXgY4UAWF8wHKQMrSnzCgfFpsxh+aHXMGtPQroQasRY4U6UdG0rz1Vjbka0MekOGRZQEvqQFlxseFor8zWFgHek3v29+WqN6gaK5gZOTOMZzpQIC1201LkMCXild3vWXSc5UX9xcFYfbRPzGFa1FDcPfPB/jUEq/FeGt419CI3YmBlVoHsa4KdcwQP5ZSwHHhFJ7/Ph/Rap/4vmG91eDwPP0lDfCDRCLszTqfzM71xpmiKi2HwS4WlqvGNwtvwF5Dqpn6KTq8ax00UMPkxDcZrEEEsIvHiUXXEphdb4GB4FymlPwBz4Gperqq5pW7TQ6/yNRhW8VT5NhuP0udlxo4gILq5ZxAZk8ZGh3g4CqxJlPKY7AQxupfUcVpWT5VItp1+30UqoyP4wWsRo3olRRgkWZZ2ZN6VC3OZFeXB8NbnUrSdikNptD1QiGuKkr8EmSR/AK9Rw+FF3s5uwuPbvHGiPeFOViltMK7AUaOsq9+x9cndk3iJEE5LKZRlWJbKOZweROzmPNVPkjE3K/TyA57Rs68TkZ3MR8akKpm7cFjnjPd/DdkWjgYoKHSr5Wu5ssoBYU4acRs5g2DHxUmdq8VXOXRbunD8QN0LhgkssgahcdoYsNvuXGUK/KXD/7oFb+VGdhqIn02veuM5bLudJOc2Ky0GMaG4W/xWBxIJcL7yliJOXOpx0AkBqUgzlDczmLT4iILXDxxtRR1oZa2JWFgiAb43obrJnG/TZC2KSK2wqOzRZTXavZZFMb1f3bXvVaNaK828w9TO610gk8JNf3gMfETzXXsbcvRGCG9JWQZ6+cDPqc4466Yo2RcKH+PILeKOqtnlbInR3MmBeGG3FH10yzkybuqEC2HSQwpA0An7d9+73BkDUTm30bZmoP/RGbgFN+GrCOfADgqr0WbI1a1okpFms8iHYw9hm0zUvlEMivBRxModrbJJ+9/p3jUdQQ9BCtQdxnOGrT5dzRUmw0593/mbRSdBg0nRvRZM5/E16m7ZHmDEtWhwvfdZCZ8J8M12W0yRMszXamWfQTwIZ4ayYktrnscQuWr8idp3PjT2eF/jmtdhIfcpMnb+IfZY2FebW6UY/AK3jP4u3Tu4zE4qlnQgLFbM19EBIsNf7KhjdbqQ/D6yiDb+NlEi2SKD+ivXVUK8ib0oBo366gXkR8ZxGjpJIDcEgZPa9TcYe0TIbiPl/rPUQDu3XBJ9X/GNq3FAUsKsll57DzaGMrjcT+gctp+9MLYXCq+sqP81eVQ0r9lt+gcQfZbACRbEjvlMskztZG8gbC8Qn9tt26Q7y7nDrbZq/LEz7kR6Jc6pg3N9rVX8Y5MJrGlML9p9lU4jbTkKqCveeZUJjHB03m2KRKR2TytoFkTXOLg7keU1s1lrPMQJpoOKLuAAC+y1HlJucU6ysB5hsXhvSPPLq5J7JtnqHKZ4vYjC4Vy8153QY+6780xDuGARsGbOs1WqzH0QS765rnSKEbbKlkO8oI/VDwUd0is13tKpqILu1mDJFNy/iJAWcvDgjxvusIT+PGz3ST/J9r9Mtfd0jpaGeiLYIqXc7DiHSS8TcjFVksi66PEkxW1z6ujbLLUGNNYnzOWpH8BZGK4bCK7iR+MbIv8ncDAz1u4StN3vTTzewr9IQjk9wxFxn+6N1ddKs0vffJiS08N3a4G1SVrlZ97Q/M+8G9fe5AP6d9/Qq4WRnORVhofPIKEdCr3llspUfE0oKIIYoByBRPh+bX1HLS3JWGJRhIvE1aW4NTd8ePi4Z+kXb+Z8snYfSNcqijhAgVsx4RCM54cXUiYkjeBmmC4ajOHrChoELscJJC7+9jjMjw5BagZKlgRMiSNYz7h7vvZIoQqbtQmspc0cUk1G/73iXtSpROl5wtLgQi0mW2Ex8i3WULhcggx6E1LMVHUsdc9GHI1PH3U2Ko0PyGdn9KdVOLm7FPBui0i9a0HpA60MsewVE4z8CAt5d401Gv6zXlIT5Ybit1VIA0FCs7wtvYreru1fUyW3oLAZ/+aTnZrOcYRNVA8spoRtlRoWflsRClFcgzkqiHOrf0/SVw+EpVaFlJ0g4Kxq1MMOmiQdpMNpte8lMMQqm6cIFXlnGbfJllysKDi+0JJMotkqgIxOSQgU9dn/lWkeVf8nUm3iwX2Nl3WDw9i6AUK3vBAbZZrcJpDQ/N64AVwjT07Jef30GSSmtNu2WlW7YoyW2FlWfZFQUwk867EdLYKk9VG6JgEnBiBxkY7LMo4YLQJJlAo9l/oTvJkSARDF/XtyAzM8O2t3eT/iXa6wDN3WewNmQHdPfsxChU/KtLG2Mn8i4ZqKdSlIaBZadxJmRzVS/o4yA65RTSViq60oa395Lqw0pzY4SipwE0SXXsKV+GZraGSkr/RW08wPRvqvSUkYBMA9lPx4m24az+IHmCbXA+0faxTRE9wuGeO06DIXa6QlKJ3puIyiuAVfPr736vzo2pBirS+Vxel3TMm3JKhz9o2ZoRvaFVpIkykb0Hcm4oHFBMcNSNj7/4GJt43ogonY2Vg4nsDQIWxAcorpXACzgBqQPjYsE/VUpXpwNManEru4NwMCFPkXvMoqvoeLN3qyu/N1eWEHttMD65v19l/0kH2mR35iv/FI+yjoHJ9gPMz67af3Mq/BoWXqu3rphiWMXVkmnPSEkpGpUI2h1MThideGFEOK6YZHPwYzMBvpNC7+ZHxPb7epfefGyIB4JzO9DTNEYnDLVVHdQyvOEVefrk6Uv5kTQYVYWWdqrdcIl7yljwwIWdfQ/y+2QB3eR/qxYObuYyB4gTbo2in4PzarU1sO9nETkmj9/AoxDA+JM3GMqQtJR4jtduHtnoCLxd1gQUscHRB/MoRYIEsP2pDZ9KvHgtlk1iTbWWbHhohwFEYX7y51fUV2nuUmnoUcqnWIQAAgl9LTVX+Bc0QGNEhChxHR4YjfE51PUdGfsSFE6ck7BL3/hTf9jLq4G1IafINxOLKeAtO7quulYvH5YOBc+zX7CrMgWnW47/jfRsWnJjYYoE7xMfWV2HN2iyIqLI",OL=new Map([[8217,"apostrophe"],[8260,"fraction slash"],[12539,"middle dot"]]),IL=4;function efe(r){let e=0;function t(){return r[e++]<<8|r[e++]}let n=t(),i=1,s=[0,1];for(let k=1;k<n;k++)s.push(i+=t());let o=t(),a=e;e+=o;let c=0,l=0;function u(){return c==0&&(l=l<<8|r[e++],c=8),l>>--c&1}let d=31,f=2**d,h=f>>>1,g=h>>1,p=f-1,b=0;for(let k=0;k<d;k++)b=b<<1|u();let y=[],A=0,E=f;for(;;){let k=Math.floor(((b-A+1)*i-1)/E),I=0,D=n;for(;D-I>1;){let q=I+D>>>1;k<s[q]?D=q:I=q}if(I==0)break;y.push(I);let j=A+Math.floor(E*s[I]/i),L=A+Math.floor(E*s[I+1]/i)-1;for(;!((j^L)&h);)b=b<<1&p|u(),j=j<<1&p,L=L<<1&p|1;for(;j&~L&g;)b=b&h|b<<1&p>>>1|u(),j=j<<1^h,L=(L^h)<<1|h|1;A=j,E=1+L-j}let C=n-4;return y.map(k=>{switch(k-C){case 3:return C+65792+(r[a++]<<16|r[a++]<<8|r[a++]);case 2:return C+256+(r[a++]<<8|r[a++]);case 1:return C+r[a++];default:return k-1}})}function tfe(r){let e=0;return()=>r[e++]}function NL(r){return tfe(efe(rfe(r)))}function rfe(r){let e=[];[..."ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"].forEach((i,s)=>e[i.charCodeAt(0)]=s);let t=r.length,n=new Uint8Array(6*t>>3);for(let i=0,s=0,o=0,a=0;i<t;i++)a=a<<6|e[r.charCodeAt(i)],o+=6,o>=8&&(n[s++]=a>>(o-=8));return n}function nfe(r){return r&1?~r>>1:r>>1}function ife(r,e){let t=Array(r);for(let n=0,i=0;n<r;n++)t[n]=i+=nfe(e());return t}function Qu(r,e=0){let t=[];for(;;){let n=r(),i=r();if(!i)break;e+=n;for(let s=0;s<i;s++)t.push(e+s);e+=i+1}return t}function ML(r){return Ju(()=>{let e=Qu(r);if(e.length)return e})}function DL(r){let e=[];for(;;){let t=r();if(t==0)break;e.push(sfe(t,r))}for(;;){let t=r()-1;if(t<0)break;e.push(ofe(t,r))}return e.flat()}function Ju(r){let e=[];for(;;){let t=r(e.length);if(!t)break;e.push(t)}return e}function qL(r,e,t){let n=Array(r).fill().map(()=>[]);for(let i=0;i<e;i++)ife(r,t).forEach((s,o)=>n[o].push(s));return n}function sfe(r,e){let t=1+e(),n=e(),i=Ju(e);return qL(i.length,1+r,e).flatMap((o,a)=>{let[c,...l]=o;return Array(i[a]).fill().map((u,d)=>{let f=d*n;return[c+d*t,l.map(h=>h+f)]})})}function ofe(r,e){let t=1+e();return qL(t,1+r,e).map(i=>[i[0],i.slice(1)])}function afe(r){let e=[],t=Qu(r);return i(n([]),[]),e;function n(s){let o=r(),a=Ju(()=>{let c=Qu(r).map(l=>t[l]);if(c.length)return n(c)});return{S:o,B:a,Q:s}}function i({S:s,B:o},a,c){if(!(s&4&&c===a[a.length-1])){s&2&&(c=a[a.length-1]),s&1&&e.push(a);for(let l of o)for(let u of l.Q)i(l,[...a,u],c)}}}function cfe(r){return r.toString(16).toUpperCase().padStart(2,"0")}function LL(r){return`{${cfe(r)}}`}function lfe(r){let e=[];for(let t=0,n=r.length;t<n;){let i=r.codePointAt(t);t+=i<65536?1:2,e.push(i)}return e}function Uc(r){let t=r.length;if(t<4096)return String.fromCodePoint(...r);let n=[];for(let i=0;i<t;)n.push(String.fromCodePoint(...r.slice(i,i+=4096)));return n.join("")}function ufe(r,e){let t=r.length,n=t-e.length;for(let i=0;n==0&&i<t;i++)n=r[i]-e[i];return n}var dfe="AEUDTAHBCFQATQDRADAAcgAgADQAFAAsABQAHwAOACQADQARAAoAFwAHABIACAAPAAUACwAFAAwABAAQAAMABwAEAAoABQAIAAIACgABAAQAFAALAAIACwABAAIAAQAHAAMAAwAEAAsADAAMAAwACgANAA0AAwAKAAkABAAdAAYAZwDSAdsDJgC0CkMB8xhZAqfoC190UGcThgBurwf7PT09Pb09AjgJum8OjDllxHYUKXAPxzq6tABAxgK8ysUvWAgMPT09PT09PSs6LT2HcgWXWwFLoSMEEEl5RFVMKvO0XQ8ExDdJMnIgsj26PTQyy8FfEQ8AY8IPAGcEbwRwBHEEcgRzBHQEdQR2BHcEeAR6BHsEfAR+BIAEgfndBQoBYgULAWIFDAFiBNcE2ATZBRAFEQUvBdALFAsVDPcNBw13DYcOMA4xDjMB4BllHI0B2grbAMDpHLkQ7QHVAPRNQQFnGRUEg0yEB2uaJF8AJpIBpob5AERSMAKNoAXqaQLUBMCzEiACnwRZEkkVsS7tANAsBG0RuAQLEPABv9HICTUBXigPZwRBApMDOwAamhtaABqEAY8KvKx3LQ4ArAB8UhwEBAVSagD8AEFZADkBIadVj2UMUgx5Il4ANQC9AxIB1BlbEPMAs30CGxlXAhwZKQIECBc6EbsCoxngzv7UzRQA8M0BawL6ZwkN7wABAD33OQRcsgLJCjMCjqUChtw/km+NAsXPAoP2BT84PwURAK0RAvptb6cApQS/OMMey5HJS84UdxpxTPkCogVFITaTOwERAK5pAvkNBOVyA7q3BKlOJSALAgUIBRcEdASpBXqzABXFSWZOawLCOqw//AolCZdvv3dSBkEQGyelEPcMMwG1ATsN7UvYBPEGOwTJH30ZGQ/NlZwIpS3dDO0m4y6hgFoj9SqDBe1L9DzdC01RaA9ZC2UJ4zpjgU4DIQENIosK3Q05CG0Q8wrJaw3lEUUHOQPVSZoApQcBCxEdNRW1JhBirAsJOXcG+xr2C48mrxMpevwF0xohBk0BKRr/AM8u54WwWjFcHE9fBgMLJSPHFKhQIA0lQLd4SBobBxUlqQKRQ3BKh1E2HpMh9jw9DWYuE1F8B/U8BRlPC4E8nkarRQ4R0j6NPUgiSUwsBDV/LC8niwnPD4UMuXxyAVkJIQmxDHETMREXN8UIOQcZLZckJxUIIUaVYJoE958D8xPRAwsFPwlBBxMDtRwtEy4VKQUNgSTXAvM21S6zAo9WgAEXBcsPJR/fEFBH4A7pCJsCZQODJesALRUhABcimwhDYwBfj9hTBS7LCMdqbCN0A2cU52ERcweRDlcHpxwzFb8c4XDIXguGCCijrwlbAXUJmQFfBOMICTVbjKAgQWdTi1gYmyBhQT9d/AIxDGUVn0S9h3gCiw9rEhsBNQFzBzkNAQJ3Ee0RaxCVCOuGBDW1M/g6JQRPIYMgEQonA09szgsnJvkM+GkBoxJiAww0PXfuZ6tgtiQX/QcZMsVBYCHxC5JPzQycGsEYQlQuGeQHvwPzGvMn6kFXBf8DowMTOk0z7gS9C2kIiwk/AEkOoxcH1xhqCnGM0AExiwG3mQNXkYMCb48GNwcLAGcLhwV55QAdAqcIowAFAM8DVwA5Aq0HnQAZAIVBAT0DJy8BIeUCjwOTCDHLAZUvAfMpBBvDDBUA9zduSgLDsQKAamaiBd1YAo4CSTUBTSUEBU5HUQOvceEA2wBLBhPfRwEVq0rLGuNDAd9vKwDHAPsABTUHBUEBzQHzbQC3AV8LMQmis7UBTekpAIMAFWsB1wKJAN0ANQB/8QFTAE0FWfkF0wJPSQERMRgrV2EBuwMfATMBDQB5BsuNpckHHwRtB9MCEBsV4QLvLge1AQMi3xPNQsUCvd5VoWACZIECYkJbTa9bNyACofcCaJgCZgkCn4Q4GwsCZjsCZiYEbgR/A38TA36SOQY5dxc5gjojIwJsHQIyNjgKAm3HAm2u74ozZ0UrAWcA3gDhAEoFB5gMjQD+C8IADbUCdy8CdqI/AnlLQwJ4uh1c20WuRtcCfD8CesgCfQkCfPAFWQUgSABIfWMkAoFtAoAAAoAFAn+uSVhKWxUXSswC0QEC0MxLJwOITwOH5kTFkTIC8qFdAwMDrkvOTC0lA89NTE2vAos/AorYwRsHHUNnBbcCjjcCjlxAl4ECjtkCjlx4UbRTNQpS1FSFApP7ApMMAOkAHFUeVa9V0AYsGymVhjLheGZFOzkCl58C77JYIagAWSUClo8ClnycAKlZrFoJgU0AOwKWtQKWTlxEXNECmcsCmWRcyl0HGQKcmznCOp0CnBYCn5sCnriKAB0PMSoPAp3xAp6SALU9YTRh7wKe0wKgbgGpAp6fHwKeTqVjyGQnJSsCJ68CJn4CoPsCoEwCot0CocQCpi8Cpc4Cp/8AfQKn8mh8aLEAA0lqHGrRAqzjAqyuAq1nAq0CAlcdAlXcArHh1wMfTmyXArK9DQKy6Bds4G1jbUhfAyXNArZcOz9ukAMpRQK4XgK5RxUCuSp3cDZw4QK9GQK72nCWAzIRAr6IcgIDM3ECvhpzInNPAsPLAsMEc4J0SzVFdOADPKcDPJoDPb8CxXwCxkcCxhCJAshpUQLIRALJTwLJLgJknQLd0nh5YXiueSVL0AMYo2cCAmH0GfOVJHsLXpJeuxECz2sCz2wvS1PS8xOfAMatAs9zASnqA04SfksFAtwnAtuKAtJPA1JcA1NfAQEDVYyAiT8AyxbtYEWCHILTgs6DjQLaxwLZ3oQQhEmnPAOGpQAvA2QOhnFZ+QBVAt9lAt64c3cC4i/tFAHzMCcB9JsB8tKHAuvzAulweQLq+QLq5AD5RwG5Au6JAuuclqqXAwLuPwOF4Jh5cOBxoQLzAwBpA44WmZMC9xMDkW4DkocC95gC+dkC+GaaHJqruzebHgOdgwL++gEbADmfHJ+zAwWNA6ZqA6bZANHFAwZqoYiiBQkDDEkCwAA/AwDhQRdTARHzA2sHl2cFAJMtK7evvdsBiZkUfxEEOQH7KQUhDp0JnwCS/SlXxQL3AZ0AtwW5AG8LbUEuFCaNLgFDAYD8AbUmAHUDDgRtACwCFgyhAAAKAj0CagPdA34EkQEgRQUhfAoABQBEABMANhICdwEABdUDa+8KxQIA9wqfJ7+xt+UBkSFBQgHpFH8RNMCJAAQAGwBaAkUChIsABjpTOpSNbQC4Oo860ACNOME63AClAOgAywE6gTo7Ofw5+Tt2iTpbO56JOm85GAFWATMBbAUvNV01njWtNWY1dTW2NcU1gjWRNdI14TWeNa017jX9NbI1wTYCNhE1xjXVNhY2JzXeNe02LjY9Ni41LSE2OjY9Njw2yTcIBJA8VzY4Nt03IDcPNsogN4k3MAoEsDxnNiQ3GTdsOo03IULUQwdC4EMLHA8PCZsobShRVQYA6X8A6bABFCnXAukBowC9BbcAbwNzBL8MDAMMAQgDAAkKCwsLCQoGBAVVBI/DvwDz9b29kaUCb0QtsRTNLt4eGBcSHAMZFhYZEhYEARAEBUEcQRxBHEEcQRxBHEEaQRxBHEFCSTxBPElISUhBNkM2QTYbNklISVmBVIgBFLWZAu0BhQCjBcEAbykBvwGJAaQcEZ0ePCklMAAhMvAIMAL54gC7Bm8EescjzQMpARQpKgDUABavAj626xQAJP0A3etzuf4NNRA7efy2Z9NQrCnC0OSyANz5BBIbJ5IFDR6miIavYS6tprjjmuKebxm5C74Q225X1pkaYYPb6f1DK4k3xMEBb9S2WMjEibTNWhsRJIA+vwNVEiXTE5iXs/wezV66oFLfp9NZGYW+Gk19J2+bCT6Ye2w6LDYdgzKMUabk595eLBCXANz9HUpWbATq9vqXVx9XDg+Pc9Xp4+bsS005SVM/BJBM4687WUuf+Uj9dEi8aDNaPxtpbDxcG1THTImUMZq4UCaaNYpsVqraNyKLJXDYsFZ/5jl7bLRtO88t7P3xZaAxhb5OdPMXqsSkp1WCieG8jXm1U99+blvLlXzPCS+M93VnJCiK+09LfaSaBAVBomyDgJua8dfUzR7ga34IvR2Nvj+A9heJ6lsl1KG4NkI1032Cnff1m1wof2B9oHJK4bi6JkEdSqeNeiuo6QoZZincoc73/TH9SXF8sCE7XyuYyW8WSgbGFCjPV0ihLKhdPs08Tx82fYAkLLc4I2wdl4apY7GU5lHRFzRWJep7Ww3wbeA3qmd59/86P4xuNaqDpygXt6M85glSBHOCGgJDnt+pN9bK7HApMguX6+06RZNjzVmcZJ+wcUrJ9//bpRNxNuKpNl9uFds+S9tdx7LaM5ZkIrPj6nIU9mnbFtVbs9s/uLgl8MVczAwet+iOEzzBlYW7RCMgE6gyNLeq6+1tIx4dpgZnd0DksJS5f+JNDpwwcPNXaaVspq1fbQajOrJgK0ofKtJ1Ne90L6VO4MOl5S886p7u6xo7OLjG8TGL+HU1JXGJgppg4nNbNJ5nlzSpuPYy21JUEcUA94PoFiZfjZue+QnyQ80ekOuZVkxx4g+cvhJfHgNl4hy1/a6+RKcKlar/J29y//EztlbVPHVUeQ1zX86eQVAjR/M3dA9w4W8LfaXp4EgM85wOWasli837PzVMOnsLzR+k3o75/lRPAJSE1xAKQzEi5v10ke+VBvRt1cwQRMd+U5mLCTGVd6XiZtgBG5cDi0w22GKcVNvHiu5LQbZEDVtz0onn7k5+heuKXVsZtSzilkLRAUmjMXEMB3J9YC50XBxPiz53SC+EhnPl9WsKCv92SM/OFFIMJZYfl0WW8tIO3UxYcwdMAj7FSmgrsZ2aAZO03BOhP1bNNZItyXYQFTpC3SG1VuPDqH9GkiCDmE+JwxyIVSO5siDErAOpEXFgjy6PQtOVDj+s6e1r8heWVvmZnTciuf4EiNZzCAd7SOMhXERIOlsHIMG399i9aLTy3m2hRLZjJVDNLS53iGIK11dPqQt0zBDyg6qc7YqkDm2M5Ve6dCWCaCbTXX2rToaIgz6+zh4lYUi/+6nqcFMAkQJKHYLK0wYk5N9szV6xihDbDDFr45lN1K4aCXBq/FitPSud9gLt5ZVn+ZqGX7cwm2z5EGMgfFpIFyhGGuDPmso6TItTMwny+7uPnLCf4W6goFQFV0oQSsc9VfMmVLcLr6ZetDZbaSFTLqnSO/bIPjA3/zAUoqgGFAEQS4IhuMzEp2I3jJzbzkk/IEmyax+rhZTwd6f+CGtwPixu8IvzACquPWPREu9ZvGkUzpRwvRRuaNN6cr0W1wWits9ICdYJ7ltbgMiSL3sTPeufgNcVqMVWFkCPDH4jG2jA0XcVgQj62Cb29v9f/z/+2KbYvIv/zzjpQAPkliaVDzNrW57TZ/ZOyZD0nlfMmAIBIAGAI0D3k/mdN4xr9v85ZbZbbqfH2jGd5hUqNZWwl5SPfoGmfElmazUIeNL1j/mkF7VNAzTq4jNt8JoQ11NQOcmhprXoxSxfRGJ9LDEOAQ+dmxAQH90iti9e2u/MoeuaGcDTHoC+xsmEeWmxEKefQuIzHbpw5Tc5cEocboAD09oipWQhtTO1wivf/O+DRe2rpl/E9wlrzBorjJsOeG1B/XPW4EaJEFdNlECEZga5ZoGRHXgYouGRuVkm8tDESiEyFNo+3s5M5puSdTyUL2llnINVHEt91XUNW4ewdMgJ4boJfEyt/iY5WXqbA+A2Fkt5Z0lutiWhe9nZIyIUjyXDC3UsaG1t+eNx6z4W/OYoTB7A6x+dNSTOi9AInctbESqm5gvOLww7OWXPrmHwVZasrl4eD113pm+JtT7JVOvnCXqdzzdTRHgJ0PiGTFYW5Gvt9R9LD6Lzfs0v/TZZHSmyVNq7viIHE6DBK7Qp07Iz55EM8SYtQvZf/obBniTWi5C2/ovHfw4VndkE5XYdjOhCMRjDeOEfXeN/CwfGduiUIfsoFeUxXeQXba7c7972XNv8w+dTjjUM0QeNAReW+J014dKAD/McQYXT7c0GQPIkn3Ll6R7gGjuiQoZD0TEeEqQpKoZ15g/0OPQI17QiSv9AUROa/V/TQN3dvLArec3RrsYlvBm1b8LWzltdugsC50lNKYLEp2a+ZZYqPejULRlOJh5zj/LVMyTDvwKhMxxwuDkxJ1QpoNI0OTWLom4Z71SNzI9TV1iXJrIu9Wcnd+MCaAw8o1jSXd94YU/1gnkrC9BUEOtQvEIQ7g0i6h+KL2JKk8Ydl7HruvgWMSAmNe+LshGhV4qnWHhO9/RIPQzY1tHRj2VqOyNsDpK0cww+56AdDC4gsWwY0XxoucIWIqs/GcwnWqlaT0KPr8mbK5U94/301i1WLt4YINTVvCFBrFZbIbY8eycOdeJ2teD5IfPLCRg7jjcFTwlMFNl9zdh/o3E/hHPwj7BWg0MU09pPrBLbrCgm54A6H+I6v27+jL5gkjWg/iYdks9jbfVP5y/n0dlgWEMlKasl7JvFZd56LfybW1eeaVO0gxTfXZwD8G4SI116yx7UKVRgui6Ya1YpixqXeNLc8IxtAwCU5IhwQgn+NqHnRaDv61CxKhOq4pOX7M6pkA+Pmpd4j1vn6ACUALoLLc4vpXci8VidLxzm7qFBe7s+quuJs6ETYmnpgS3LwSZxPIltgBDXz8M1k/W2ySNv2f9/NPhxLGK2D21dkHeSGmenRT3Yqcdl0m/h3OYr8V+lXNYGf8aCCpd4bWjE4QIPj7vUKN4Nrfs7ML6Y2OyS830JCnofg/k7lpFpt4SqZc5HGg1HCOrHvOdC8bP6FGDbE/VV0mX4IakzbdS/op+Kt3G24/8QbBV7y86sGSQ/vZzU8FXs7u6jIvwchsEP2BpIhW3G8uWNwa3HmjfH/ZjhhCWvluAcF+nMf14ClKg5hGgtPLJ98ueNAkc5Hs2WZlk2QHvfreCK1CCGO6nMZVSb99VM/ajr8WHTte9JSmkXq/i/U943HEbdzW6Re/S88dKgg8pGOLlAeNiqrcLkUR3/aClFpMXcOUP3rmETcWSfMXZE3TUOi8i+fqRnTYLflVx/Vb/6GJ7eIRZUA6k3RYR3iFSK9c4iDdNwJuZL2FKz/IK5VimcNWEqdXjSoxSgmF0UPlDoUlNrPcM7ftmA8Y9gKiqKEHuWN+AZRIwtVSxye2Kf8rM3lhJ5XcBXU9n4v0Oy1RU2M+4qM8AQPVwse8ErNSob5oFPWxuqZnVzo1qB/IBxkM3EVUKFUUlO3e51259GgNcJbCmlvrdjtoTW7rChm1wyCKzpCTwozUUEOIcWLneRLgMXh+SjGSFkAllzbGS5HK7LlfCMRNRDSvbQPjcXaenNYxCvu2Qyznz6StuxVj66SgI0T8B6/sfHAJYZaZ78thjOSIFumNWLQbeZixDCCC+v0YBtkxiBB3jefHqZ/dFHU+crbj6OvS1x/JDD7vlm7zOVPwpUC01nhxZuY/63E7g",$u=44032,Zg=4352,Xg=4449,ey=4519,BL=19,FL=21,jc=28,ty=FL*jc,ffe=BL*ty,hfe=$u+ffe,pfe=Zg+BL,mfe=Xg+FL,gfe=ey+jc;function Wu(r){return r>>24&255}function UL(r){return r&16777215}var wE,PL,EE,Yg;function yfe(){let r=NL(dfe);wE=new Map(ML(r).flatMap((e,t)=>e.map(n=>[n,t+1<<24]))),PL=new Set(Qu(r)),EE=new Map,Yg=new Map;for(let[e,t]of DL(r)){if(!PL.has(e)&&t.length==2){let[n,i]=t,s=Yg.get(n);s||(s=new Map,Yg.set(n,s)),s.set(i,e)}EE.set(e,t.reverse())}}function jL(r){return r>=$u&&r<hfe}function vfe(r,e){if(r>=Zg&&r<pfe&&e>=Xg&&e<mfe)return $u+(r-Zg)*ty+(e-Xg)*jc;if(jL(r)&&e>ey&&e<gfe&&(r-$u)%jc==0)return r+(e-ey);{let t=Yg.get(r);return t&&(t=t.get(e),t)?t:-1}}function zL(r){wE||yfe();let e=[],t=[],n=!1;function i(s){let o=wE.get(s);o&&(n=!0,s|=o),e.push(s)}for(let s of r)for(;;){if(s<128)e.push(s);else if(jL(s)){let o=s-$u,a=o/ty|0,c=o%ty/jc|0,l=o%jc;i(Zg+a),i(Xg+c),l>0&&i(ey+l)}else{let o=EE.get(s);o?t.push(...o):i(s)}if(!t.length)break;s=t.pop()}if(n&&e.length>1){let s=Wu(e[0]);for(let o=1;o<e.length;o++){let a=Wu(e[o]);if(a==0||s<=a){s=a;continue}let c=o-1;for(;;){let l=e[c+1];if(e[c+1]=e[c],e[c]=l,!c||(s=Wu(e[--c]),s<=a))break}s=Wu(e[o])}}return e}function bfe(r){let e=[],t=[],n=-1,i=0;for(let s of r){let o=Wu(s),a=UL(s);if(n==-1)o==0?n=a:e.push(a);else if(i>0&&i>=o)o==0?(e.push(n,...t),t.length=0,n=a):t.push(a),i=o;else{let c=vfe(n,a);c>=0?n=c:i==0&&o==0?(e.push(n),n=a):(t.push(a),i=o)}}return n>=0&&e.push(n,...t),e}function HL(r){return zL(r).map(UL)}function _fe(r){return bfe(zL(r))}var kL=45;var GL=".",VL=65039,WL=1,ry=r=>Array.from(r);function Yu(r,e){return r.P.has(e)||r.Q.has(e)}var SE=class extends Array{get is_emoji(){return!0}},TE,KL,No,CE,QL,Afe,Fc,AE,Bc,Ro,RL,xE;function OE(){if(TE)return;let r=NL(Xde),e=()=>Qu(r),t=()=>new Set(e()),n=(u,d)=>d.forEach(f=>u.add(f));TE=new Map(DL(r)),KL=t(),No=e(),CE=new Set(e().map(u=>No[u])),No=new Set(No),QL=t(),Afe=t();let i=ML(r),s=r(),o=()=>{let u=new Set;return e().forEach(d=>n(u,i[d])),n(u,e()),u};Fc=Ju(u=>{let d=Ju(r).map(f=>f+96);if(d.length){let f=u>=s;d[0]-=32,d=Uc(d),f&&(d=`Restricted[${d}]`);let h=o(),g=o(),p=!r();return{N:d,P:h,Q:g,M:p,R:f}}}),AE=t(),Bc=new Map;let a=e().concat(ry(AE)).sort((u,d)=>u-d);a.forEach((u,d)=>{let f=r(),h=a[d]=f?a[d-f]:{V:[],M:new Map};h.V.push(u),AE.has(u)||Bc.set(u,h)});for(let{V:u,M:d}of new Set(Bc.values())){let f=[];for(let g of u){let p=Fc.filter(y=>Yu(y,g)),b=f.find(({G:y})=>p.some(A=>y.has(A)));b||(b={G:new Set,V:[]},f.push(b)),b.V.push(g),n(b.G,p)}let h=f.flatMap(g=>ry(g.G));for(let{G:g,V:p}of f){let b=new Set(h.filter(y=>!g.has(y)));for(let y of p)d.set(y,b)}}Ro=new Set;let c=new Set,l=u=>Ro.has(u)?c.add(u):Ro.add(u);for(let u of Fc){for(let d of u.P)l(d);for(let d of u.Q)l(d)}for(let u of Ro)!Bc.has(u)&&!c.has(u)&&Bc.set(u,WL);n(Ro,HL(Ro)),RL=afe(r).map(u=>SE.from(u)).sort(ufe),xE=new Map;for(let u of RL){let d=[xE];for(let f of u){let h=d.map(g=>{let p=g.get(f);return p||(p=new Map,g.set(f,p)),p});f===VL?d.push(...h):d=h}for(let f of d)f.V=u}}function IE(r){return(JL(r)?"":`${PE(ny([r]))} `)+LL(r)}function PE(r){return`"${r}"\u200E`}function wfe(r){if(r.length>=4&&r[2]==kL&&r[3]==kL)throw new Error(`invalid label extension: "${Uc(r.slice(0,4))}"`)}function Efe(r){for(let t=r.lastIndexOf(95);t>0;)if(r[--t]!==95)throw new Error("underscore allowed only at start")}function Sfe(r){let e=r[0],t=OL.get(e);if(t)throw Ku(`leading ${t}`);let n=r.length,i=-1;for(let s=1;s<n;s++){e=r[s];let o=OL.get(e);if(o){if(i==s)throw Ku(`${t} + ${o}`);i=s+1,t=o}}if(i==n)throw Ku(`trailing ${t}`)}function ny(r,e=1/0,t=LL){let n=[];Tfe(r[0])&&n.push("\u25CC"),r.length>e&&(e>>=1,r=[...r.slice(0,e),8230,...r.slice(-e)]);let i=0,s=r.length;for(let o=0;o<s;o++){let a=r[o];JL(a)&&(n.push(Uc(r.slice(i,o))),n.push(t(a)),i=o+1)}return n.push(Uc(r.slice(i,s))),n.join("")}function Tfe(r){return OE(),No.has(r)}function JL(r){return OE(),QL.has(r)}function $L(r){return Ife(Cfe(r,_fe,Rfe))}function Cfe(r,e,t){if(!r)return[];OE();let n=0;return r.split(GL).map(i=>{let s=lfe(i),o={input:s,offset:n};n+=s.length+1;try{let a=o.tokens=kfe(s,e,t),c=a.length,l;if(!c)throw new Error("empty label");let u=o.output=a.flat();if(Efe(u),!(o.emoji=c>1||a[0].is_emoji)&&u.every(f=>f<128))wfe(u),l="ASCII";else{let f=a.flatMap(h=>h.is_emoji?[]:h);if(!f.length)l="Emoji";else{if(No.has(u[0]))throw Ku("leading combining mark");for(let p=1;p<c;p++){let b=a[p];if(!b.is_emoji&&No.has(b[0]))throw Ku(`emoji + combining mark: "${Uc(a[p-1])} + ${ny([b[0]])}"`)}Sfe(u);let h=ry(new Set(f)),[g]=Ofe(h);Pfe(g,f),xfe(g,h),l=g.N}}o.type=l}catch(a){o.error=a}return o})}function xfe(r,e){let t,n=[];for(let i of e){let s=Bc.get(i);if(s===WL)return;if(s){let o=s.M.get(i);if(t=t?t.filter(a=>o.has(a)):ry(o),!t.length)return}else n.push(i)}if(t){for(let i of t)if(n.every(s=>Yu(i,s)))throw new Error(`whole-script confusable: ${r.N}/${i.N}`)}}function Ofe(r){let e=Fc;for(let t of r){let n=e.filter(i=>Yu(i,t));if(!n.length)throw Fc.some(i=>Yu(i,t))?ZL(e[0],t):YL(t);if(e=n,n.length==1)break}return e}function Ife(r){return r.map(({input:e,error:t,output:n})=>{if(t){let i=t.message;throw new Error(r.length==1?i:`Invalid label ${PE(ny(e,63))}: ${i}`)}return Uc(n)}).join(GL)}function YL(r){return new Error(`disallowed character: ${IE(r)}`)}function ZL(r,e){let t=IE(e),n=Fc.find(i=>i.P.has(e));return n&&(t=`${n.N} ${t}`),new Error(`illegal mixture: ${r.N} + ${t}`)}function Ku(r){return new Error(`illegal placement: ${r}`)}function Pfe(r,e){for(let t of e)if(!Yu(r,t))throw ZL(r,t);if(r.M){let t=HL(e);for(let n=1,i=t.length;n<i;n++)if(CE.has(t[n])){let s=n+1;for(let o;s<i&&CE.has(o=t[s]);s++)for(let a=n;a<s;a++)if(t[a]==o)throw new Error(`duplicate non-spacing marks: ${IE(o)}`);if(s-n>IL)throw new Error(`excessive non-spacing marks: ${PE(ny(t.slice(n-1,s)))} (${s-n}/${IL})`);n=s}}}function kfe(r,e,t){let n=[],i=[];for(r=r.slice().reverse();r.length;){let s=Nfe(r);if(s)i.length&&(n.push(e(i)),i=[]),n.push(t(s));else{let o=r.pop();if(Ro.has(o))i.push(o);else{let a=TE.get(o);if(a)i.push(...a);else if(!KL.has(o))throw YL(o)}}}return i.length&&n.push(e(i)),n}function Rfe(r){return r.filter(e=>e!=VL)}function Nfe(r,e){let t=xE,n,i=r.length;for(;i&&(t=t.get(r[--i]),!!t);){let{V:s}=t;s&&(n=s,e&&e.push(...r.slice(i).reverse()),r.length=i)}return n}var eB=new Uint8Array(32);eB.fill(0);function XL(r){return w(r.length!==0,"invalid ENS name; empty component","comp",r),r}function tB(r){let e=Kt(rB(r)),t=[];if(r.length===0)return t;let n=0;for(let i=0;i<e.length;i++)e[i]===46&&(t.push(XL(e.slice(n,i))),n=i+1);return w(n<e.length,"invalid ENS name; empty component","name",r),t.push(XL(e.slice(n))),t}function rB(r){try{if(r.length===0)throw new Error("empty label");return $L(r)}catch(e){w(!1,`invalid ENS name (${e.message})`,"name",r)}}function zc(r){w(typeof r=="string","invalid ENS name; not a string","name",r),w(r.length,"invalid ENS name (empty label)","name",r);let e=eB,t=tB(r);for(;t.length;)e=Oe(Ee([e,Oe(t.pop())]));return U(e)}function kE(r,e){let t=e??63;return w(t<=255,"DNS encoded label cannot exceed 255","length",t),U(Ee(tB(r).map(n=>{w(n.length<=t,`label ${JSON.stringify(r)} exceeds ${t} bytes`,"name",r);let i=new Uint8Array(n.length+1);return i.set(n,1),i[0]=i.length-1,i})))+"00"}function RE(r,e){return{address:de(r),storageKeys:e.map((t,n)=>(w(me(t,32),"invalid slot",`storageKeys[${n}]`,t),t.toLowerCase()))}}function br(r){if(Array.isArray(r))return r.map((t,n)=>Array.isArray(t)?(w(t.length===2,"invalid slot set",`value[${n}]`,t),RE(t[0],t[1])):(w(t!=null&&typeof t=="object","invalid address-slot set","value",r),RE(t.address,t.storageKeys)));w(r!=null&&typeof r=="object","invalid access list","value",r);let e=Object.keys(r).map(t=>{let n=r[t].reduce((i,s)=>(i[s]=!0,i),{});return RE(t,Object.keys(n).sort())});return e.sort((t,n)=>t.address.localeCompare(n.address)),e}function Mfe(r){let e;return typeof r=="string"?e=Is.computePublicKey(r,!1):e=r.publicKey,de(Oe("0x"+e.substring(4)).substring(26))}function nB(r,e){return Mfe(Is.recoverPublicKey(r,e))}var gt=BigInt(0),Dfe=BigInt(2),qfe=BigInt(27),Lfe=BigInt(28),Bfe=BigInt(35),Ffe=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),NE=4096*32;function iB(r,e){let t=r.toString(16);for(;t.length<2;)t="0"+t;return t+=Cs(e).substring(4),"0x"+t}function iy(r){return r==="0x"?null:de(r)}function ME(r,e){try{return br(r)}catch(t){w(!1,t.message,e,r)}}function Zu(r,e){return r==="0x"?0:ce(r,e)}function $e(r,e){if(r==="0x")return gt;let t=H(r,e);return w(t<=Ffe,"value exceeds uint size",e,t),t}function Be(r,e){let t=H(r,"value"),n=et(t);return w(n.length<=32,"value too large",`tx.${e}`,t),n}function DE(r){return br(r).map(e=>[e.address,e.storageKeys])}function Ufe(r,e){w(Array.isArray(r),`invalid ${e}`,"value",r);for(let t=0;t<r.length;t++)w(me(r[t],32),"invalid ${ param } hash",`value[${t}]`,r[t]);return r}function jfe(r){let e=Dc(r);w(Array.isArray(e)&&(e.length===9||e.length===6),"invalid field count for legacy transaction","data",r);let t={type:0,nonce:Zu(e[0],"nonce"),gasPrice:$e(e[1],"gasPrice"),gasLimit:$e(e[2],"gasLimit"),to:iy(e[3]),value:$e(e[4],"value"),data:U(e[5]),chainId:gt};if(e.length===6)return t;let n=$e(e[6],"v"),i=$e(e[7],"r"),s=$e(e[8],"s");if(i===gt&&s===gt)t.chainId=n;else{let o=(n-Bfe)/Dfe;o<gt&&(o=gt),t.chainId=o,w(o!==gt||n===qfe||n===Lfe,"non-canonical legacy v","v",e[6]),t.signature=Qt.from({r:mr(e[7],32),s:mr(e[8],32),v:n})}return t}function zfe(r,e){let t=[Be(r.nonce,"nonce"),Be(r.gasPrice||0,"gasPrice"),Be(r.gasLimit,"gasLimit"),r.to||"0x",Be(r.value,"value"),r.data],n=gt;if(r.chainId!=gt)n=H(r.chainId,"tx.chainId"),w(!e||e.networkV==null||e.legacyChainId===n,"tx.chainId/sig.v mismatch","sig",e);else if(r.signature){let s=r.signature.legacyChainId;s!=null&&(n=s)}if(!e)return n!==gt&&(t.push(et(n)),t.push("0x"),t.push("0x")),Mn(t);let i=BigInt(27+e.yParity);return n!==gt?i=Qt.getChainIdV(n,e.v):BigInt(e.v)!==i&&w(!1,"tx.chainId/sig.v mismatch","sig",e),t.push(et(i)),t.push(et(e.r)),t.push(et(e.s)),Mn(t)}function qE(r,e){let t;try{if(t=Zu(e[0],"yParity"),t!==0&&t!==1)throw new Error("bad yParity")}catch{w(!1,"invalid yParity","yParity",e[0])}let n=mr(e[1],32),i=mr(e[2],32),s=Qt.from({r:n,s:i,yParity:t});r.signature=s}function Hfe(r){let e=Dc(ie(r).slice(1));w(Array.isArray(e)&&(e.length===9||e.length===12),"invalid field count for transaction type: 2","data",U(r));let t={type:2,chainId:$e(e[0],"chainId"),nonce:Zu(e[1],"nonce"),maxPriorityFeePerGas:$e(e[2],"maxPriorityFeePerGas"),maxFeePerGas:$e(e[3],"maxFeePerGas"),gasPrice:null,gasLimit:$e(e[4],"gasLimit"),to:iy(e[5]),value:$e(e[6],"value"),data:U(e[7]),accessList:ME(e[8],"accessList")};return e.length===9||qE(t,e.slice(9)),t}function Gfe(r,e){let t=[Be(r.chainId,"chainId"),Be(r.nonce,"nonce"),Be(r.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),Be(r.maxFeePerGas||0,"maxFeePerGas"),Be(r.gasLimit,"gasLimit"),r.to||"0x",Be(r.value,"value"),r.data,DE(r.accessList||[])];return e&&(t.push(Be(e.yParity,"yParity")),t.push(et(e.r)),t.push(et(e.s))),Ee(["0x02",Mn(t)])}function Vfe(r){let e=Dc(ie(r).slice(1));w(Array.isArray(e)&&(e.length===8||e.length===11),"invalid field count for transaction type: 1","data",U(r));let t={type:1,chainId:$e(e[0],"chainId"),nonce:Zu(e[1],"nonce"),gasPrice:$e(e[2],"gasPrice"),gasLimit:$e(e[3],"gasLimit"),to:iy(e[4]),value:$e(e[5],"value"),data:U(e[6]),accessList:ME(e[7],"accessList")};return e.length===8||qE(t,e.slice(8)),t}function Wfe(r,e){let t=[Be(r.chainId,"chainId"),Be(r.nonce,"nonce"),Be(r.gasPrice||0,"gasPrice"),Be(r.gasLimit,"gasLimit"),r.to||"0x",Be(r.value,"value"),r.data,DE(r.accessList||[])];return e&&(t.push(Be(e.yParity,"recoveryParam")),t.push(et(e.r)),t.push(et(e.s))),Ee(["0x01",Mn(t)])}function Kfe(r){let e=Dc(ie(r).slice(1)),t="3",n=null;if(e.length===4&&Array.isArray(e[0])){t="3 (network format)";let s=e[1],o=e[2],a=e[3];w(Array.isArray(s),"invalid network format: blobs not an array","fields[1]",s),w(Array.isArray(o),"invalid network format: commitments not an array","fields[2]",o),w(Array.isArray(a),"invalid network format: proofs not an array","fields[3]",a),w(s.length===o.length,"invalid network format: blobs/commitments length mismatch","fields",e),w(s.length===a.length,"invalid network format: blobs/proofs length mismatch","fields",e),n=[];for(let c=0;c<e[1].length;c++)n.push({data:s[c],commitment:o[c],proof:a[c]});e=e[0]}w(Array.isArray(e)&&(e.length===11||e.length===14),`invalid field count for transaction type: ${t}`,"data",U(r));let i={type:3,chainId:$e(e[0],"chainId"),nonce:Zu(e[1],"nonce"),maxPriorityFeePerGas:$e(e[2],"maxPriorityFeePerGas"),maxFeePerGas:$e(e[3],"maxFeePerGas"),gasPrice:null,gasLimit:$e(e[4],"gasLimit"),to:iy(e[5]),value:$e(e[6],"value"),data:U(e[7]),accessList:ME(e[8],"accessList"),maxFeePerBlobGas:$e(e[9],"maxFeePerBlobGas"),blobVersionedHashes:e[10]};n&&(i.blobs=n),w(i.to!=null,`invalid address for transaction type: ${t}`,"data",r),w(Array.isArray(i.blobVersionedHashes),"invalid blobVersionedHashes: must be an array","data",r);for(let s=0;s<i.blobVersionedHashes.length;s++)w(me(i.blobVersionedHashes[s],32),`invalid blobVersionedHash at index ${s}: must be length 32`,"data",r);return e.length===11||qE(i,e.slice(11)),i}function Qfe(r,e,t){let n=[Be(r.chainId,"chainId"),Be(r.nonce,"nonce"),Be(r.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),Be(r.maxFeePerGas||0,"maxFeePerGas"),Be(r.gasLimit,"gasLimit"),r.to||di,Be(r.value,"value"),r.data,DE(r.accessList||[]),Be(r.maxFeePerBlobGas||0,"maxFeePerBlobGas"),Ufe(r.blobVersionedHashes||[],"blobVersionedHashes")];return e&&(n.push(Be(e.yParity,"yParity")),n.push(et(e.r)),n.push(et(e.s)),t)?Ee(["0x03",Mn([n,t.map(i=>i.data),t.map(i=>i.commitment),t.map(i=>i.proof)])]):Ee(["0x03",Mn(n)])}var Mo=class r{#e;#t;#r;#n;#s;#a;#i;#d;#l;#c;#o;#p;#u;#f;#h;#m;get type(){return this.#e}set type(e){switch(e){case null:this.#e=null;break;case 0:case"legacy":this.#e=0;break;case 1:case"berlin":case"eip-2930":this.#e=1;break;case 2:case"london":case"eip-1559":this.#e=2;break;case 3:case"cancun":case"eip-4844":this.#e=3;break;default:w(!1,"unsupported transaction type","type",e)}}get typeName(){switch(this.type){case 0:return"legacy";case 1:return"eip-2930";case 2:return"eip-1559";case 3:return"eip-4844"}return null}get to(){let e=this.#t;return e==null&&this.type===3?di:e}set to(e){this.#t=e==null?null:de(e)}get nonce(){return this.#n}set nonce(e){this.#n=ce(e,"value")}get gasLimit(){return this.#s}set gasLimit(e){this.#s=H(e)}get gasPrice(){let e=this.#a;return e==null&&(this.type===0||this.type===1)?gt:e}set gasPrice(e){this.#a=e==null?null:H(e,"gasPrice")}get maxPriorityFeePerGas(){let e=this.#i;return e??(this.type===2||this.type===3?gt:null)}set maxPriorityFeePerGas(e){this.#i=e==null?null:H(e,"maxPriorityFeePerGas")}get maxFeePerGas(){let e=this.#d;return e??(this.type===2||this.type===3?gt:null)}set maxFeePerGas(e){this.#d=e==null?null:H(e,"maxFeePerGas")}get data(){return this.#r}set data(e){this.#r=U(e)}get value(){return this.#l}set value(e){this.#l=H(e,"value")}get chainId(){return this.#c}set chainId(e){this.#c=H(e)}get signature(){return this.#o||null}set signature(e){this.#o=e==null?null:Qt.from(e)}get accessList(){let e=this.#p||null;return e??(this.type===1||this.type===2||this.type===3?[]:null)}set accessList(e){this.#p=e==null?null:br(e)}get maxFeePerBlobGas(){let e=this.#u;return e==null&&this.type===3?gt:e}set maxFeePerBlobGas(e){this.#u=e==null?null:H(e,"maxFeePerBlobGas")}get blobVersionedHashes(){let e=this.#f;return e==null&&this.type===3?[]:e}set blobVersionedHashes(e){if(e!=null){w(Array.isArray(e),"blobVersionedHashes must be an Array","value",e),e=e.slice();for(let t=0;t<e.length;t++)w(me(e[t],32),"invalid blobVersionedHash",`value[${t}]`,e[t])}this.#f=e}get blobs(){return this.#m==null?null:this.#m.map(e=>Object.assign({},e))}set blobs(e){if(e==null){this.#m=null;return}let t=[],n=[];for(let i=0;i<e.length;i++){let s=e[i];if(Eo(s)){P(this.#h,"adding a raw blob requires a KZG library","UNSUPPORTED_OPERATION",{operation:"set blobs()"});let o=ie(s);if(w(o.length<=NE,"blob is too large",`blobs[${i}]`,s),o.length!==NE){let l=new Uint8Array(NE);l.set(o),o=l}let a=this.#h.blobToKzgCommitment(o),c=U(this.#h.computeBlobKzgProof(o,a));t.push({data:U(o),commitment:U(a),proof:c}),n.push(iB(1,a))}else{let o=U(s.commitment);t.push({data:U(s.data),commitment:o,proof:U(s.proof)}),n.push(iB(1,o))}}this.#m=t,this.#f=n}get kzg(){return this.#h}set kzg(e){this.#h=e}constructor(){this.#e=null,this.#t=null,this.#n=0,this.#s=gt,this.#a=null,this.#i=null,this.#d=null,this.#r="0x",this.#l=gt,this.#c=gt,this.#o=null,this.#p=null,this.#u=null,this.#f=null,this.#m=null,this.#h=null}get hash(){return this.signature==null?null:Oe(this.#g(!0,!1))}get unsignedHash(){return Oe(this.unsignedSerialized)}get from(){return this.signature==null?null:nB(this.unsignedHash,this.signature)}get fromPublicKey(){return this.signature==null?null:Is.recoverPublicKey(this.unsignedHash,this.signature)}isSigned(){return this.signature!=null}#g(e,t){P(!e||this.signature!=null,"cannot serialize unsigned transaction; maybe you meant .unsignedSerialized","UNSUPPORTED_OPERATION",{operation:".serialized"});let n=e?this.signature:null;switch(this.inferType()){case 0:return zfe(this,n);case 1:return Wfe(this,n);case 2:return Gfe(this,n);case 3:return Qfe(this,n,t?this.blobs:null)}P(!1,"unsupported transaction type","UNSUPPORTED_OPERATION",{operation:".serialized"})}get serialized(){return this.#g(!0,!0)}get unsignedSerialized(){return this.#g(!1,!1)}inferType(){let e=this.inferTypes();return e.indexOf(2)>=0?2:e.pop()}inferTypes(){let e=this.gasPrice!=null,t=this.maxFeePerGas!=null||this.maxPriorityFeePerGas!=null,n=this.accessList!=null,i=this.#u!=null||this.#f;this.maxFeePerGas!=null&&this.maxPriorityFeePerGas!=null&&P(this.maxFeePerGas>=this.maxPriorityFeePerGas,"priorityFee cannot be more than maxFee","BAD_DATA",{value:this}),P(!t||this.type!==0&&this.type!==1,"transaction type cannot have maxFeePerGas or maxPriorityFeePerGas","BAD_DATA",{value:this}),P(this.type!==0||!n,"legacy transaction cannot have accessList","BAD_DATA",{value:this});let s=[];return this.type!=null?s.push(this.type):t?s.push(2):e?(s.push(1),n||s.push(0)):n?(s.push(1),s.push(2)):(i&&this.to||(s.push(0),s.push(1),s.push(2)),s.push(3)),s.sort(),s}isLegacy(){return this.type===0}isBerlin(){return this.type===1}isLondon(){return this.type===2}isCancun(){return this.type===3}clone(){return r.from(this)}toJSON(){let e=t=>t==null?null:t.toString();return{type:this.type,to:this.to,data:this.data,nonce:this.nonce,gasLimit:e(this.gasLimit),gasPrice:e(this.gasPrice),maxPriorityFeePerGas:e(this.maxPriorityFeePerGas),maxFeePerGas:e(this.maxFeePerGas),value:e(this.value),chainId:e(this.chainId),sig:this.signature?this.signature.toJSON():null,accessList:this.accessList}}static from(e){if(e==null)return new r;if(typeof e=="string"){let n=ie(e);if(n[0]>=127)return r.from(jfe(n));switch(n[0]){case 1:return r.from(Vfe(n));case 2:return r.from(Hfe(n));case 3:return r.from(Kfe(n))}P(!1,"unsupported transaction type","UNSUPPORTED_OPERATION",{operation:"from"})}let t=new r;return e.type!=null&&(t.type=e.type),e.to!=null&&(t.to=e.to),e.nonce!=null&&(t.nonce=e.nonce),e.gasLimit!=null&&(t.gasLimit=e.gasLimit),e.gasPrice!=null&&(t.gasPrice=e.gasPrice),e.maxPriorityFeePerGas!=null&&(t.maxPriorityFeePerGas=e.maxPriorityFeePerGas),e.maxFeePerGas!=null&&(t.maxFeePerGas=e.maxFeePerGas),e.maxFeePerBlobGas!=null&&(t.maxFeePerBlobGas=e.maxFeePerBlobGas),e.data!=null&&(t.data=e.data),e.value!=null&&(t.value=e.value),e.chainId!=null&&(t.chainId=e.chainId),e.signature!=null&&(t.signature=Qt.from(e.signature)),e.accessList!=null&&(t.accessList=e.accessList),e.blobVersionedHashes!=null&&(t.blobVersionedHashes=e.blobVersionedHashes),e.kzg!=null&&(t.kzg=e.kzg),e.blobs!=null&&(t.blobs=e.blobs),e.hash!=null&&(w(t.isSigned(),"unsigned transaction cannot define '.hash'","tx",e),w(t.hash===e.hash,"hash mismatch","tx",e)),e.from!=null&&(w(t.isSigned(),"unsigned transaction cannot define '.from'","tx",e),w(t.from.toLowerCase()===(e.from||"").toLowerCase(),"from mismatch","tx",e)),t}};var cB=new Uint8Array(32);cB.fill(0);var Jfe=BigInt(-1),lB=BigInt(0),uB=BigInt(1),$fe=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function Yfe(r){let e=ie(r),t=e.length%32;return t?Ee([e,cB.slice(t)]):U(e)}var Zfe=ir(uB,32),Xfe=ir(lB,32),sB={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},LE=["name","version","chainId","verifyingContract","salt"];function oB(r){return function(e){return w(typeof e=="string",`invalid domain value for ${JSON.stringify(r)}`,`domain.${r}`,e),e}}var ehe={name:oB("name"),version:oB("version"),chainId:function(r){let e=H(r,"domain.chainId");return w(e>=0,"invalid chain ID","domain.chainId",r),Number.isSafeInteger(e)?Number(e):Nn(e)},verifyingContract:function(r){try{return de(r).toLowerCase()}catch{}w(!1,'invalid domain value "verifyingContract"',"domain.verifyingContract",r)},salt:function(r){let e=ie(r,"domain.salt");return w(e.length===32,'invalid domain value "salt"',"domain.salt",r),U(e)}};function BE(r){{let e=r.match(/^(u?)int(\d+)$/);if(e){let t=e[1]==="",n=parseInt(e[2]);w(n%8===0&&n!==0&&n<=256&&e[2]===String(n),"invalid numeric width","type",r);let i=bs($fe,t?n-1:n),s=t?(i+uB)*Jfe:lB;return function(o){let a=H(o,"value");return w(a>=s&&a<=i,`value out-of-bounds for ${r}`,"value",a),ir(t?Lu(a,256):a,32)}}}{let e=r.match(/^bytes(\d+)$/);if(e){let t=parseInt(e[1]);return w(t!==0&&t<=32&&e[1]===String(t),"invalid bytes width","type",r),function(n){let i=ie(n);return w(i.length===t,`invalid length for ${r}`,"value",n),Yfe(n)}}}switch(r){case"address":return function(e){return mr(de(e),32)};case"bool":return function(e){return e?Zfe:Xfe};case"bytes":return function(e){return Oe(e)};case"string":return function(e){return en(e)}}return null}function aB(r,e){return`${r}(${e.map(({name:t,type:n})=>n+" "+t).join(",")})`}function sy(r){let e=r.match(/^([^\x5b]*)((\x5b\d*\x5d)*)(\x5b(\d*)\x5d)$/);return e?{base:e[1],index:e[2]+e[4],array:{base:e[1],prefix:e[1]+e[2],count:e[5]?parseInt(e[5]):-1}}:{base:r}}var Hc=class r{primaryType;#e;get types(){return JSON.parse(this.#e)}#t;#r;constructor(e){this.#t=new Map,this.#r=new Map;let t=new Map,n=new Map,i=new Map,s={};Object.keys(e).forEach(c=>{s[c]=e[c].map(({name:l,type:u})=>{let{base:d,index:f}=sy(u);return d==="int"&&!e.int&&(d="int256"),d==="uint"&&!e.uint&&(d="uint256"),{name:l,type:d+(f||"")}}),t.set(c,new Set),n.set(c,[]),i.set(c,new Set)}),this.#e=JSON.stringify(s);for(let c in s){let l=new Set;for(let u of s[c]){w(!l.has(u.name),`duplicate variable name ${JSON.stringify(u.name)} in ${JSON.stringify(c)}`,"types",e),l.add(u.name);let d=sy(u.type).base;w(d!==c,`circular type reference to ${JSON.stringify(d)}`,"types",e),!BE(d)&&(w(n.has(d),`unknown type ${JSON.stringify(d)}`,"types",e),n.get(d).push(c),t.get(c).add(d))}}let o=Array.from(n.keys()).filter(c=>n.get(c).length===0);w(o.length!==0,"missing primary type","types",e),w(o.length===1,`ambiguous primary types or unused types: ${o.map(c=>JSON.stringify(c)).join(", ")}`,"types",e),Q(this,{primaryType:o[0]});function a(c,l){w(!l.has(c),`circular type reference to ${JSON.stringify(c)}`,"types",e),l.add(c);for(let u of t.get(c))if(n.has(u)){a(u,l);for(let d of l)i.get(d).add(u)}l.delete(c)}a(this.primaryType,new Set);for(let[c,l]of i){let u=Array.from(l);u.sort(),this.#t.set(c,aB(c,s[c])+u.map(d=>aB(d,s[d])).join(""))}}getEncoder(e){let t=this.#r.get(e);return t||(t=this.#n(e),this.#r.set(e,t)),t}#n(e){{let i=BE(e);if(i)return i}let t=sy(e).array;if(t){let i=t.prefix,s=this.getEncoder(i);return o=>{w(t.count===-1||t.count===o.length,`array length mismatch; expected length ${t.count}`,"value",o);let a=o.map(s);return this.#t.has(i)&&(a=a.map(Oe)),Oe(Ee(a))}}let n=this.types[e];if(n){let i=en(this.#t.get(e));return s=>{let o=n.map(({name:a,type:c})=>{let l=this.getEncoder(c)(s[a]);return this.#t.has(c)?Oe(l):l});return o.unshift(i),Ee(o)}}w(!1,`unknown type: ${e}`,"type",e)}encodeType(e){let t=this.#t.get(e);return w(t,`unknown type: ${JSON.stringify(e)}`,"name",e),t}encodeData(e,t){return this.getEncoder(e)(t)}hashStruct(e,t){return Oe(this.encodeData(e,t))}encode(e){return this.encodeData(this.primaryType,e)}hash(e){return this.hashStruct(this.primaryType,e)}_visit(e,t,n){if(BE(e))return n(e,t);let i=sy(e).array;if(i)return w(i.count===-1||i.count===t.length,`array length mismatch; expected length ${i.count}`,"value",t),t.map(o=>this._visit(i.prefix,o,n));let s=this.types[e];if(s)return s.reduce((o,{name:a,type:c})=>(o[a]=this._visit(c,t[a],n),o),{});w(!1,`unknown type: ${e}`,"type",e)}visit(e,t){return this._visit(this.primaryType,e,t)}static from(e){return new r(e)}static getPrimaryType(e){return r.from(e).primaryType}static hashStruct(e,t,n){return r.from(t).hashStruct(e,n)}static hashDomain(e){let t=[];for(let n in e){if(e[n]==null)continue;let i=sB[n];w(i,`invalid typed-data domain key: ${JSON.stringify(n)}`,"domain",e),t.push({name:n,type:i})}return t.sort((n,i)=>LE.indexOf(n.name)-LE.indexOf(i.name)),r.hashStruct("EIP712Domain",{EIP712Domain:t},e)}static encode(e,t,n){return Ee(["0x1901",r.hashDomain(e),r.from(t).hash(n)])}static hash(e,t,n){return Oe(r.encode(e,t,n))}static async resolveNames(e,t,n,i){e=Object.assign({},e);for(let a in e)e[a]==null&&delete e[a];let s={};e.verifyingContract&&!me(e.verifyingContract,20)&&(s[e.verifyingContract]="0x");let o=r.from(t);o.visit(n,(a,c)=>(a==="address"&&!me(c,20)&&(s[c]="0x"),c));for(let a in s)s[a]=await i(a);return e.verifyingContract&&s[e.verifyingContract]&&(e.verifyingContract=s[e.verifyingContract]),n=o.visit(n,(a,c)=>a==="address"&&s[c]?s[c]:c),{domain:e,value:n}}static getPayload(e,t,n){r.hashDomain(e);let i={},s=[];LE.forEach(c=>{let l=e[c];l!=null&&(i[c]=ehe[c](l),s.push({name:c,type:sB[c]}))});let o=r.from(t);t=o.types;let a=Object.assign({},t);return w(a.EIP712Domain==null,"types must not contain EIP712Domain type","types.EIP712Domain",t),a.EIP712Domain=s,o.encode(n),{types:a,domain:i,primaryType:o.primaryType,message:o.visit(n,(c,l)=>{if(c.match(/^bytes(\d*)/))return U(ie(l));if(c.match(/^u?int/))return H(l).toString();switch(c){case"address":return l.toLowerCase();case"bool":return!!l;case"string":return w(typeof l=="string","invalid string","value",l),l}w(!1,"unsupported type","type",c)})}}};function Jt(r){let e=new Set;return r.forEach(t=>e.add(t)),Object.freeze(e)}var the="external public payable override",rhe=Jt(the.split(" ")),_B="constant external internal payable private public pure view override",nhe=Jt(_B.split(" ")),AB="constructor error event fallback function receive struct",wB=Jt(AB.split(" ")),EB="calldata memory storage payable indexed",ihe=Jt(EB.split(" ")),she="tuple returns",ohe=[AB,EB,she,_B].join(" "),ahe=Jt(ohe.split(" ")),che={"(":"OPEN_PAREN",")":"CLOSE_PAREN","[":"OPEN_BRACKET","]":"CLOSE_BRACKET",",":"COMMA","@":"AT"},lhe=new RegExp("^(\\s*)"),uhe=new RegExp("^([0-9]+)"),dhe=new RegExp("^([a-zA-Z$_][a-zA-Z0-9$_]*)"),SB=new RegExp("^([a-zA-Z$_][a-zA-Z0-9$_]*)$"),TB=new RegExp("^(address|bool|bytes([0-9]*)|string|u?int([0-9]*))$"),tn=class r{#e;#t;get offset(){return this.#e}get length(){return this.#t.length-this.#e}constructor(e){this.#e=0,this.#t=e.slice()}clone(){return new r(this.#t)}reset(){this.#e=0}#r(e=0,t=0){return new r(this.#t.slice(e,t).map(n=>Object.freeze(Object.assign({},n,{match:n.match-e,linkBack:n.linkBack-e,linkNext:n.linkNext-e}))))}popKeyword(e){let t=this.peek();if(t.type!=="KEYWORD"||!e.has(t.text))throw new Error(`expected keyword ${t.text}`);return this.pop().text}popType(e){if(this.peek().type!==e){let t=this.peek();throw new Error(`expected ${e}; got ${t.type} ${JSON.stringify(t.text)}`)}return this.pop().text}popParen(){let e=this.peek();if(e.type!=="OPEN_PAREN")throw new Error("bad start");let t=this.#r(this.#e+1,e.match+1);return this.#e=e.match+1,t}popParams(){let e=this.peek();if(e.type!=="OPEN_PAREN")throw new Error("bad start");let t=[];for(;this.#e<e.match-1;){let n=this.peek().linkNext;t.push(this.#r(this.#e+1,n)),this.#e=n}return this.#e=e.match+1,t}peek(){if(this.#e>=this.#t.length)throw new Error("out-of-bounds");return this.#t[this.#e]}peekKeyword(e){let t=this.peekType("KEYWORD");return t!=null&&e.has(t)?t:null}peekType(e){if(this.length===0)return null;let t=this.peek();return t.type===e?t.text:null}pop(){let e=this.peek();return this.#e++,e}toString(){let e=[];for(let t=this.#e;t<this.#t.length;t++){let n=this.#t[t];e.push(`${n.type}:${n.text}`)}return`<TokenString ${e.join(" ")}>`}};function Ms(r){let e=[],t=o=>{let a=s<r.length?JSON.stringify(r[s]):"$EOI";throw new Error(`invalid token ${a} at ${s}: ${o}`)},n=[],i=[],s=0;for(;s<r.length;){let o=r.substring(s),a=o.match(lhe);a&&(s+=a[1].length,o=r.substring(s));let c={depth:n.length,linkBack:-1,linkNext:-1,match:-1,type:"",text:"",offset:s,value:-1};e.push(c);let l=che[o[0]]||"";if(l){if(c.type=l,c.text=o[0],s++,l==="OPEN_PAREN")n.push(e.length-1),i.push(e.length-1);else if(l=="CLOSE_PAREN")n.length===0&&t("no matching open bracket"),c.match=n.pop(),e[c.match].match=e.length-1,c.depth--,c.linkBack=i.pop(),e[c.linkBack].linkNext=e.length-1;else if(l==="COMMA")c.linkBack=i.pop(),e[c.linkBack].linkNext=e.length-1,i.push(e.length-1);else if(l==="OPEN_BRACKET")c.type="BRACKET";else if(l==="CLOSE_BRACKET"){let u=e.pop().text;if(e.length>0&&e[e.length-1].type==="NUMBER"){let d=e.pop().text;u=d+u,e[e.length-1].value=ce(d)}if(e.length===0||e[e.length-1].type!=="BRACKET")throw new Error("missing opening bracket");e[e.length-1].text+=u}continue}if(a=o.match(dhe),a){if(c.text=a[1],s+=c.text.length,ahe.has(c.text)){c.type="KEYWORD";continue}if(c.text.match(TB)){c.type="TYPE";continue}c.type="ID";continue}if(a=o.match(uhe),a){c.text=a[1],c.type="NUMBER",s+=c.text.length;continue}throw new Error(`unexpected token ${JSON.stringify(o[0])} at position ${s}`)}return new tn(e.map(o=>Object.freeze(o)))}function dB(r,e){let t=[];for(let n in e.keys())r.has(n)&&t.push(n);if(t.length>1)throw new Error(`conflicting types: ${t.join(", ")}`)}function oy(r,e){if(e.peekKeyword(wB)){let t=e.pop().text;if(t!==r)throw new Error(`expected ${r}, got ${t}`)}return e.popType("ID")}function hi(r,e){let t=new Set;for(;;){let n=r.peekType("KEYWORD");if(n==null||e&&!e.has(n))break;if(r.pop(),t.has(n))throw new Error(`duplicate keywords: ${JSON.stringify(n)}`);t.add(n)}return Object.freeze(t)}function CB(r){let e=hi(r,nhe);return dB(e,Jt("constant payable nonpayable".split(" "))),dB(e,Jt("pure view payable nonpayable".split(" "))),e.has("view")?"view":e.has("pure")?"pure":e.has("payable")?"payable":e.has("nonpayable")?"nonpayable":e.has("constant")?"view":"nonpayable"}function fi(r,e){return r.popParams().map(t=>nt.from(t,e))}function xB(r){if(r.peekType("AT")){if(r.pop(),r.peekType("NUMBER"))return H(r.pop().text);throw new Error("invalid gas")}return null}function Do(r){if(r.length)throw new Error(`unexpected tokens at offset ${r.offset}: ${r.toString()}`)}var fhe=new RegExp(/^(.*)\[([0-9]*)\]$/);function fB(r){let e=r.match(TB);if(w(e,"invalid type","type",r),r==="uint")return"uint256";if(r==="int")return"int256";if(e[2]){let t=parseInt(e[2]);w(t!==0&&t<=32,"invalid bytes length","type",r)}else if(e[3]){let t=parseInt(e[3]);w(t!==0&&t<=256&&t%8===0,"invalid numeric width","type",r)}return r}var Ve={},sr=Symbol.for("_ethers_internal"),hB="_ParamTypeInternal",pB="_ErrorInternal",mB="_EventInternal",gB="_ConstructorInternal",yB="_FallbackInternal",vB="_FunctionInternal",bB="_StructInternal",nt=class r{name;type;baseType;indexed;components;arrayLength;arrayChildren;constructor(e,t,n,i,s,o,a,c){if(vs(e,Ve,"ParamType"),Object.defineProperty(this,sr,{value:hB}),o&&(o=Object.freeze(o.slice())),i==="array"){if(a==null||c==null)throw new Error("")}else if(a!=null||c!=null)throw new Error("");if(i==="tuple"){if(o==null)throw new Error("")}else if(o!=null)throw new Error("");Q(this,{name:t,type:n,baseType:i,indexed:s,components:o,arrayLength:a,arrayChildren:c})}format(e){if(e==null&&(e="sighash"),e==="json"){let n=this.name||"";if(this.isArray()){let s=JSON.parse(this.arrayChildren.format("json"));return s.name=n,s.type+=`[${this.arrayLength<0?"":String(this.arrayLength)}]`,JSON.stringify(s)}let i={type:this.baseType==="tuple"?"tuple":this.type,name:n};return typeof this.indexed=="boolean"&&(i.indexed=this.indexed),this.isTuple()&&(i.components=this.components.map(s=>JSON.parse(s.format(e)))),JSON.stringify(i)}let t="";return this.isArray()?(t+=this.arrayChildren.format(e),t+=`[${this.arrayLength<0?"":String(this.arrayLength)}]`):this.isTuple()?t+="("+this.components.map(n=>n.format(e)).join(e==="full"?", ":",")+")":t+=this.type,e!=="sighash"&&(this.indexed===!0&&(t+=" indexed"),e==="full"&&this.name&&(t+=" "+this.name)),t}isArray(){return this.baseType==="array"}isTuple(){return this.baseType==="tuple"}isIndexable(){return this.indexed!=null}walk(e,t){if(this.isArray()){if(!Array.isArray(e))throw new Error("invalid array value");if(this.arrayLength!==-1&&e.length!==this.arrayLength)throw new Error("array is wrong length");let n=this;return e.map(i=>n.arrayChildren.walk(i,t))}if(this.isTuple()){if(!Array.isArray(e))throw new Error("invalid tuple value");if(e.length!==this.components.length)throw new Error("array is wrong length");let n=this;return e.map((i,s)=>n.components[s].walk(i,t))}return t(this.type,e)}#e(e,t,n,i){if(this.isArray()){if(!Array.isArray(t))throw new Error("invalid array value");if(this.arrayLength!==-1&&t.length!==this.arrayLength)throw new Error("array is wrong length");let o=this.arrayChildren,a=t.slice();a.forEach((c,l)=>{o.#e(e,c,n,u=>{a[l]=u})}),i(a);return}if(this.isTuple()){let o=this.components,a;if(Array.isArray(t))a=t.slice();else{if(t==null||typeof t!="object")throw new Error("invalid tuple value");a=o.map(c=>{if(!c.name)throw new Error("cannot use object value with unnamed components");if(!(c.name in t))throw new Error(`missing value for component ${c.name}`);return t[c.name]})}if(a.length!==this.components.length)throw new Error("array is wrong length");a.forEach((c,l)=>{o[l].#e(e,c,n,u=>{a[l]=u})}),i(a);return}let s=n(this.type,t);s.then?e.push(async function(){i(await s)}()):i(s)}async walkAsync(e,t){let n=[],i=[e];return this.#e(n,e,t,s=>{i[0]=s}),n.length&&await Promise.all(n),i[0]}static from(e,t){if(r.isParamType(e))return e;if(typeof e=="string")try{return r.from(Ms(e),t)}catch{w(!1,"invalid param type","obj",e)}else if(e instanceof tn){let a="",c="",l=null;hi(e,Jt(["tuple"])).has("tuple")||e.peekType("OPEN_PAREN")?(c="tuple",l=e.popParams().map(p=>r.from(p)),a=`tuple(${l.map(p=>p.format()).join(",")})`):(a=fB(e.popType("TYPE")),c=a);let u=null,d=null;for(;e.length&&e.peekType("BRACKET");){let p=e.pop();u=new r(Ve,"",a,c,null,l,d,u),d=p.value,a+=p.text,c="array",l=null}let f=null;if(hi(e,ihe).has("indexed")){if(!t)throw new Error("");f=!0}let g=e.peekType("ID")?e.pop().text:"";if(e.length)throw new Error("leftover tokens");return new r(Ve,g,a,c,f,l,d,u)}let n=e.name;w(!n||typeof n=="string"&&n.match(SB),"invalid name","obj.name",n);let i=e.indexed;i==!0?(w(t,"parameter cannot be indexed","obj.indexed",e.indexed),i=!0):i=!1;let s=e.type,o=s.match(fhe);if(o){let a=parseInt(o[2]||"-1"),c=r.from({type:o[1],components:e.components});return new r(Ve,n||"",s,"array",i,null,a,c)}if(s==="tuple"||s.startsWith("tuple(")||s.startsWith("(")){let a=e.components!=null?e.components.map(l=>r.from(l)):null;return new r(Ve,n||"",s,"tuple",i,a,null,null)}return s=fB(e.type),new r(Ve,n||"",s,s,i,null,null,null)}static isParamType(e){return e&&e[sr]===hB}},Ns=class r{type;inputs;constructor(e,t,n){vs(e,Ve,"Fragment"),n=Object.freeze(n.slice()),Q(this,{type:t,inputs:n})}static from(e){if(typeof e=="string"){try{r.from(JSON.parse(e))}catch{}return r.from(Ms(e))}if(e instanceof tn)switch(e.peekKeyword(wB)){case"constructor":return ks.from(e);case"error":return _r.from(e);case"event":return Ps.from(e);case"fallback":case"receive":return ed.from(e);case"function":return Rs.from(e);case"struct":return Gc.from(e)}else if(typeof e=="object"){switch(e.type){case"constructor":return ks.from(e);case"error":return _r.from(e);case"event":return Ps.from(e);case"fallback":case"receive":return ed.from(e);case"function":return Rs.from(e);case"struct":return Gc.from(e)}P(!1,`unsupported type: ${e.type}`,"UNSUPPORTED_OPERATION",{operation:"Fragment.from"})}w(!1,"unsupported frgament object","obj",e)}static isConstructor(e){return ks.isFragment(e)}static isError(e){return _r.isFragment(e)}static isEvent(e){return Ps.isFragment(e)}static isFunction(e){return Rs.isFragment(e)}static isStruct(e){return Gc.isFragment(e)}},qo=class extends Ns{name;constructor(e,t,n,i){super(e,t,i),w(typeof n=="string"&&n.match(SB),"invalid identifier","name",n),i=Object.freeze(i.slice()),Q(this,{name:n})}};function Xu(r,e){return"("+e.map(t=>t.format(r)).join(r==="full"?", ":",")+")"}var _r=class r extends qo{constructor(e,t,n){super(e,"error",t,n),Object.defineProperty(this,sr,{value:pB})}get selector(){return en(this.format("sighash")).substring(0,10)}format(e){if(e==null&&(e="sighash"),e==="json")return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});let t=[];return e!=="sighash"&&t.push("error"),t.push(this.name+Xu(e,this.inputs)),t.join(" ")}static from(e){if(r.isFragment(e))return e;if(typeof e=="string")return r.from(Ms(e));if(e instanceof tn){let t=oy("error",e),n=fi(e);return Do(e),new r(Ve,t,n)}return new r(Ve,e.name,e.inputs?e.inputs.map(nt.from):[])}static isFragment(e){return e&&e[sr]===pB}},Ps=class r extends qo{anonymous;constructor(e,t,n,i){super(e,"event",t,n),Object.defineProperty(this,sr,{value:mB}),Q(this,{anonymous:i})}get topicHash(){return en(this.format("sighash"))}format(e){if(e==null&&(e="sighash"),e==="json")return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});let t=[];return e!=="sighash"&&t.push("event"),t.push(this.name+Xu(e,this.inputs)),e!=="sighash"&&this.anonymous&&t.push("anonymous"),t.join(" ")}static getTopicHash(e,t){return t=(t||[]).map(i=>nt.from(i)),new r(Ve,e,t,!1).topicHash}static from(e){if(r.isFragment(e))return e;if(typeof e=="string")try{return r.from(Ms(e))}catch{w(!1,"invalid event fragment","obj",e)}else if(e instanceof tn){let t=oy("event",e),n=fi(e,!0),i=!!hi(e,Jt(["anonymous"])).has("anonymous");return Do(e),new r(Ve,t,n,i)}return new r(Ve,e.name,e.inputs?e.inputs.map(t=>nt.from(t,!0)):[],!!e.anonymous)}static isFragment(e){return e&&e[sr]===mB}},ks=class r extends Ns{payable;gas;constructor(e,t,n,i,s){super(e,t,n),Object.defineProperty(this,sr,{value:gB}),Q(this,{payable:i,gas:s})}format(e){if(P(e!=null&&e!=="sighash","cannot format a constructor for sighash","UNSUPPORTED_OPERATION",{operation:"format(sighash)"}),e==="json")return JSON.stringify({type:"constructor",stateMutability:this.payable?"payable":"undefined",payable:this.payable,gas:this.gas!=null?this.gas:void 0,inputs:this.inputs.map(n=>JSON.parse(n.format(e)))});let t=[`constructor${Xu(e,this.inputs)}`];return this.payable&&t.push("payable"),this.gas!=null&&t.push(`@${this.gas.toString()}`),t.join(" ")}static from(e){if(r.isFragment(e))return e;if(typeof e=="string")try{return r.from(Ms(e))}catch{w(!1,"invalid constuctor fragment","obj",e)}else if(e instanceof tn){hi(e,Jt(["constructor"]));let t=fi(e),n=!!hi(e,rhe).has("payable"),i=xB(e);return Do(e),new r(Ve,"constructor",t,n,i)}return new r(Ve,"constructor",e.inputs?e.inputs.map(nt.from):[],!!e.payable,e.gas!=null?e.gas:null)}static isFragment(e){return e&&e[sr]===gB}},ed=class r extends Ns{payable;constructor(e,t,n){super(e,"fallback",t),Object.defineProperty(this,sr,{value:yB}),Q(this,{payable:n})}format(e){let t=this.inputs.length===0?"receive":"fallback";if(e==="json"){let n=this.payable?"payable":"nonpayable";return JSON.stringify({type:t,stateMutability:n})}return`${t}()${this.payable?" payable":""}`}static from(e){if(r.isFragment(e))return e;if(typeof e=="string")try{return r.from(Ms(e))}catch{w(!1,"invalid fallback fragment","obj",e)}else if(e instanceof tn){let t=e.toString(),n=e.peekKeyword(Jt(["fallback","receive"]));if(w(n,"type must be fallback or receive","obj",t),e.popKeyword(Jt(["fallback","receive"]))==="receive"){let a=fi(e);return w(a.length===0,"receive cannot have arguments","obj.inputs",a),hi(e,Jt(["payable"])),Do(e),new r(Ve,[],!0)}let s=fi(e);s.length?w(s.length===1&&s[0].type==="bytes","invalid fallback inputs","obj.inputs",s.map(a=>a.format("minimal")).join(", ")):s=[nt.from("bytes")];let o=CB(e);if(w(o==="nonpayable"||o==="payable","fallback cannot be constants","obj.stateMutability",o),hi(e,Jt(["returns"])).has("returns")){let a=fi(e);w(a.length===1&&a[0].type==="bytes","invalid fallback outputs","obj.outputs",a.map(c=>c.format("minimal")).join(", "))}return Do(e),new r(Ve,s,o==="payable")}if(e.type==="receive")return new r(Ve,[],!0);if(e.type==="fallback"){let t=[nt.from("bytes")],n=e.stateMutability==="payable";return new r(Ve,t,n)}w(!1,"invalid fallback description","obj",e)}static isFragment(e){return e&&e[sr]===yB}},Rs=class r extends qo{constant;outputs;stateMutability;payable;gas;constructor(e,t,n,i,s,o){super(e,"function",t,i),Object.defineProperty(this,sr,{value:vB}),s=Object.freeze(s.slice()),Q(this,{constant:n==="view"||n==="pure",gas:o,outputs:s,payable:n==="payable",stateMutability:n})}get selector(){return en(this.format("sighash")).substring(0,10)}format(e){if(e==null&&(e="sighash"),e==="json")return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:this.stateMutability!=="nonpayable"?this.stateMutability:void 0,payable:this.payable,gas:this.gas!=null?this.gas:void 0,inputs:this.inputs.map(n=>JSON.parse(n.format(e))),outputs:this.outputs.map(n=>JSON.parse(n.format(e)))});let t=[];return e!=="sighash"&&t.push("function"),t.push(this.name+Xu(e,this.inputs)),e!=="sighash"&&(this.stateMutability!=="nonpayable"&&t.push(this.stateMutability),this.outputs&&this.outputs.length&&(t.push("returns"),t.push(Xu(e,this.outputs))),this.gas!=null&&t.push(`@${this.gas.toString()}`)),t.join(" ")}static getSelector(e,t){return t=(t||[]).map(i=>nt.from(i)),new r(Ve,e,"view",t,[],null).selector}static from(e){if(r.isFragment(e))return e;if(typeof e=="string")try{return r.from(Ms(e))}catch{w(!1,"invalid function fragment","obj",e)}else if(e instanceof tn){let n=oy("function",e),i=fi(e),s=CB(e),o=[];hi(e,Jt(["returns"])).has("returns")&&(o=fi(e));let a=xB(e);return Do(e),new r(Ve,n,s,i,o,a)}let t=e.stateMutability;return t==null&&(t="payable",typeof e.constant=="boolean"?(t="view",e.constant||(t="payable",typeof e.payable=="boolean"&&!e.payable&&(t="nonpayable"))):typeof e.payable=="boolean"&&!e.payable&&(t="nonpayable")),new r(Ve,e.name,t,e.inputs?e.inputs.map(nt.from):[],e.outputs?e.outputs.map(nt.from):[],e.gas!=null?e.gas:null)}static isFragment(e){return e&&e[sr]===vB}},Gc=class r extends qo{constructor(e,t,n){super(e,"struct",t,n),Object.defineProperty(this,sr,{value:bB})}format(){throw new Error("@TODO")}static from(e){if(typeof e=="string")try{return r.from(Ms(e))}catch{w(!1,"invalid struct fragment","obj",e)}else if(e instanceof tn){let t=oy("struct",e),n=fi(e);return Do(e),new r(Ve,t,n)}return new r(Ve,e.name,e.inputs?e.inputs.map(nt.from):[])}static isFragment(e){return e&&e[sr]===bB}};var rn=new Map;rn.set(0,"GENERIC_PANIC");rn.set(1,"ASSERT_FALSE");rn.set(17,"OVERFLOW");rn.set(18,"DIVIDE_BY_ZERO");rn.set(33,"ENUM_RANGE_ERROR");rn.set(34,"BAD_STORAGE_DATA");rn.set(49,"STACK_UNDERFLOW");rn.set(50,"ARRAY_RANGE_ERROR");rn.set(65,"OUT_OF_MEMORY");rn.set(81,"UNINITIALIZED_FUNCTION_CALL");var hhe=new RegExp(/^bytes([0-9]*)$/),phe=new RegExp(/^(u?int)([0-9]*)$/),FE=null,OB=1024;function mhe(r,e,t,n){let i="missing revert data",s=null,o=null,a=null;if(t){i="execution reverted";let l=ie(t);if(t=U(t),l.length===0)i+=" (no data present; likely require(false) occurred",s="require(false)";else if(l.length%32!==4)i+=" (could not decode reason; invalid data length)";else if(U(l.slice(0,4))==="0x08c379a0")try{s=n.decode(["string"],l.slice(4))[0],a={signature:"Error(string)",name:"Error",args:[s]},i+=`: ${JSON.stringify(s)}`}catch{i+=" (could not decode reason; invalid string data)"}else if(U(l.slice(0,4))==="0x4e487b71")try{let u=Number(n.decode(["uint256"],l.slice(4))[0]);a={signature:"Panic(uint256)",name:"Panic",args:[u]},s=`Panic due to ${rn.get(u)||"UNKNOWN"}(${u})`,i+=`: ${s}`}catch{i+=" (could not decode panic code)"}else i+=" (unknown custom error)"}let c={to:e.to?de(e.to):null,data:e.data||"0x"};return e.from&&(c.from=de(e.from)),xe(i,"CALL_EXCEPTION",{action:r,data:t,reason:s,transaction:c,invocation:o,revert:a})}var pi=class r{#e(e){if(e.isArray())return new Gg(this.#e(e.arrayChildren),e.arrayLength,e.name);if(e.isTuple())return new ko(e.components.map(n=>this.#e(n)),e.name);switch(e.baseType){case"address":return new zg(e.name);case"bool":return new Vg(e.name);case"string":return new $g(e.name);case"bytes":return new Wg(e.name);case"":return new Qg(e.name)}let t=e.type.match(phe);if(t){let n=parseInt(t[2]||"256");return w(n!==0&&n<=256&&n%8===0,"invalid "+t[1]+" bit length","param",e),new Jg(n/8,t[1]==="int",e.name)}if(t=e.type.match(hhe),t){let n=parseInt(t[1]);return w(n!==0&&n<=32,"invalid bytes length","param",e),new Kg(n,e.name)}w(!1,"invalid type","type",e.type)}getDefaultValue(e){let t=e.map(i=>this.#e(nt.from(i)));return new ko(t,"_").defaultValue()}encode(e,t){qu(t.length,e.length,"types/values length mismatch");let n=e.map(o=>this.#e(nt.from(o))),i=new ko(n,"_"),s=new Co;return i.encode(s,t),s.data}decode(e,t,n){let i=e.map(o=>this.#e(nt.from(o)));return new ko(i,"_").decode(new Sg(t,n,OB))}static _setDefaultMaxInflation(e){w(typeof e=="number"&&Number.isInteger(e),"invalid defaultMaxInflation factor","value",e),OB=e}static defaultAbiCoder(){return FE==null&&(FE=new r),FE}static getBuiltinCallException(e,t,n){return mhe(e,t,n,r.defaultAbiCoder())}};var td=class{fragment;name;signature;topic;args;constructor(e,t,n){let i=e.name,s=e.format();Q(this,{fragment:e,name:i,signature:s,topic:t,args:n})}},rd=class{fragment;name;args;signature;selector;value;constructor(e,t,n,i){let s=e.name,o=e.format();Q(this,{fragment:e,name:s,args:n,signature:o,selector:t,value:i})}},nd=class{fragment;name;args;signature;selector;constructor(e,t,n){let i=e.name,s=e.format();Q(this,{fragment:e,name:i,args:n,signature:s,selector:t})}},Vc=class{hash;_isIndexed;static isIndexed(e){return!!(e&&e._isIndexed)}constructor(e){Q(this,{hash:e,_isIndexed:!0})}},IB={0:"generic panic",1:"assert(false)",17:"arithmetic overflow",18:"division or modulo by zero",33:"enum overflow",34:"invalid encoded storage byte array accessed",49:"out-of-bounds array access; popping on an empty array",50:"out-of-bounds access of an array or bytesN",65:"out of memory",81:"uninitialized function"},PB={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:r=>`reverted with reason string ${JSON.stringify(r)}`},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"],reason:r=>{let e="unknown panic code";return r>=0&&r<=255&&IB[r.toString()]&&(e=IB[r.toString()]),`reverted with panic code 0x${r.toString(16)} (${e})`}}},Ds=class r{fragments;deploy;fallback;receive;#e;#t;#r;#n;constructor(e){let t=[];typeof e=="string"?t=JSON.parse(e):t=e,this.#r=new Map,this.#e=new Map,this.#t=new Map;let n=[];for(let o of t)try{n.push(Ns.from(o))}catch(a){console.log(`[Warning] Invalid Fragment ${JSON.stringify(o)}:`,a.message)}Q(this,{fragments:Object.freeze(n)});let i=null,s=!1;this.#n=this.getAbiCoder(),this.fragments.forEach((o,a)=>{let c;switch(o.type){case"constructor":if(this.deploy){console.log("duplicate definition - constructor");return}Q(this,{deploy:o});return;case"fallback":o.inputs.length===0?s=!0:(w(!i||o.payable!==i.payable,"conflicting fallback fragments",`fragments[${a}]`,o),i=o,s=i.payable);return;case"function":c=this.#r;break;case"event":c=this.#t;break;case"error":c=this.#e;break;default:return}let l=o.format();c.has(l)||c.set(l,o)}),this.deploy||Q(this,{deploy:ks.from("constructor()")}),Q(this,{fallback:i,receive:s})}format(e){let t=e?"minimal":"full";return this.fragments.map(i=>i.format(t))}formatJson(){let e=this.fragments.map(t=>t.format("json"));return JSON.stringify(e.map(t=>JSON.parse(t)))}getAbiCoder(){return pi.defaultAbiCoder()}#s(e,t,n){if(me(e)){let s=e.toLowerCase();for(let o of this.#r.values())if(s===o.selector)return o;return null}if(e.indexOf("(")===-1){let s=[];for(let[o,a]of this.#r)o.split("(")[0]===e&&s.push(a);if(t){let o=t.length>0?t[t.length-1]:null,a=t.length,c=!0;Ne.isTyped(o)&&o.type==="overrides"&&(c=!1,a--);for(let l=s.length-1;l>=0;l--){let u=s[l].inputs.length;u!==a&&(!c||u!==a-1)&&s.splice(l,1)}for(let l=s.length-1;l>=0;l--){let u=s[l].inputs;for(let d=0;d<t.length;d++)if(Ne.isTyped(t[d])){if(d>=u.length){if(t[d].type==="overrides")continue;s.splice(l,1);break}if(t[d].type!==u[d].baseType){s.splice(l,1);break}}}}if(s.length===1&&t&&t.length!==s[0].inputs.length){let o=t[t.length-1];(o==null||Array.isArray(o)||typeof o!="object")&&s.splice(0,1)}if(s.length===0)return null;if(s.length>1&&n){let o=s.map(a=>JSON.stringify(a.format())).join(", ");w(!1,`ambiguous function description (i.e. matches ${o})`,"key",e)}return s[0]}let i=this.#r.get(Rs.from(e).format());return i||null}getFunctionName(e){let t=this.#s(e,null,!1);return w(t,"no matching function","key",e),t.name}hasFunction(e){return!!this.#s(e,null,!1)}getFunction(e,t){return this.#s(e,t||null,!0)}forEachFunction(e){let t=Array.from(this.#r.keys());t.sort((n,i)=>n.localeCompare(i));for(let n=0;n<t.length;n++){let i=t[n];e(this.#r.get(i),n)}}#a(e,t,n){if(me(e)){let s=e.toLowerCase();for(let o of this.#t.values())if(s===o.topicHash)return o;return null}if(e.indexOf("(")===-1){let s=[];for(let[o,a]of this.#t)o.split("(")[0]===e&&s.push(a);if(t){for(let o=s.length-1;o>=0;o--)s[o].inputs.length<t.length&&s.splice(o,1);for(let o=s.length-1;o>=0;o--){let a=s[o].inputs;for(let c=0;c<t.length;c++)if(Ne.isTyped(t[c])&&t[c].type!==a[c].baseType){s.splice(o,1);break}}}if(s.length===0)return null;if(s.length>1&&n){let o=s.map(a=>JSON.stringify(a.format())).join(", ");w(!1,`ambiguous event description (i.e. matches ${o})`,"key",e)}return s[0]}let i=this.#t.get(Ps.from(e).format());return i||null}getEventName(e){let t=this.#a(e,null,!1);return w(t,"no matching event","key",e),t.name}hasEvent(e){return!!this.#a(e,null,!1)}getEvent(e,t){return this.#a(e,t||null,!0)}forEachEvent(e){let t=Array.from(this.#t.keys());t.sort((n,i)=>n.localeCompare(i));for(let n=0;n<t.length;n++){let i=t[n];e(this.#t.get(i),n)}}getError(e,t){if(me(e)){let i=e.toLowerCase();if(PB[i])return _r.from(PB[i].signature);for(let s of this.#e.values())if(i===s.selector)return s;return null}if(e.indexOf("(")===-1){let i=[];for(let[s,o]of this.#e)s.split("(")[0]===e&&i.push(o);if(i.length===0)return e==="Error"?_r.from("error Error(string)"):e==="Panic"?_r.from("error Panic(uint256)"):null;if(i.length>1){let s=i.map(o=>JSON.stringify(o.format())).join(", ");w(!1,`ambiguous error description (i.e. ${s})`,"name",e)}return i[0]}if(e=_r.from(e).format(),e==="Error(string)")return _r.from("error Error(string)");if(e==="Panic(uint256)")return _r.from("error Panic(uint256)");let n=this.#e.get(e);return n||null}forEachError(e){let t=Array.from(this.#e.keys());t.sort((n,i)=>n.localeCompare(i));for(let n=0;n<t.length;n++){let i=t[n];e(this.#e.get(i),n)}}_decodeParams(e,t){return this.#n.decode(e,t)}_encodeParams(e,t){return this.#n.encode(e,t)}encodeDeploy(e){return this._encodeParams(this.deploy.inputs,e||[])}decodeErrorResult(e,t){if(typeof e=="string"){let n=this.getError(e);w(n,"unknown error","fragment",e),e=n}return w(Le(t,0,4)===e.selector,`data signature does not match error ${e.name}.`,"data",t),this._decodeParams(e.inputs,Le(t,4))}encodeErrorResult(e,t){if(typeof e=="string"){let n=this.getError(e);w(n,"unknown error","fragment",e),e=n}return Ee([e.selector,this._encodeParams(e.inputs,t||[])])}decodeFunctionData(e,t){if(typeof e=="string"){let n=this.getFunction(e);w(n,"unknown function","fragment",e),e=n}return w(Le(t,0,4)===e.selector,`data signature does not match function ${e.name}.`,"data",t),this._decodeParams(e.inputs,Le(t,4))}encodeFunctionData(e,t){if(typeof e=="string"){let n=this.getFunction(e);w(n,"unknown function","fragment",e),e=n}return Ee([e.selector,this._encodeParams(e.inputs,t||[])])}decodeFunctionResult(e,t){if(typeof e=="string"){let s=this.getFunction(e);w(s,"unknown function","fragment",e),e=s}let n="invalid length for result data",i=Ge(t);if(i.length%32===0)try{return this.#n.decode(e.outputs,i)}catch{n="could not decode result data"}P(!1,n,"BAD_DATA",{value:U(i),info:{method:e.name,signature:e.format()}})}makeError(e,t){let n=ie(e,"data"),i=pi.getBuiltinCallException("call",t,n);if(i.message.startsWith("execution reverted (unknown custom error)")){let a=U(n.slice(0,4)),c=this.getError(a);if(c)try{let l=this.#n.decode(c.inputs,n.slice(4));i.revert={name:c.name,signature:c.format(),args:l},i.reason=i.revert.signature,i.message=`execution reverted: ${i.reason}`}catch{i.message="execution reverted (coult not decode custom error)"}}let o=this.parseTransaction(t);return o&&(i.invocation={method:o.name,signature:o.signature,args:o.args}),i}encodeFunctionResult(e,t){if(typeof e=="string"){let n=this.getFunction(e);w(n,"unknown function","fragment",e),e=n}return U(this.#n.encode(e.outputs,t||[]))}encodeFilterTopics(e,t){if(typeof e=="string"){let s=this.getEvent(e);w(s,"unknown event","eventFragment",e),e=s}P(t.length<=e.inputs.length,`too many arguments for ${e.format()}`,"UNEXPECTED_ARGUMENT",{count:t.length,expectedCount:e.inputs.length});let n=[];e.anonymous||n.push(e.topicHash);let i=(s,o)=>s.type==="string"?en(o):s.type==="bytes"?Oe(U(o)):(s.type==="bool"&&typeof o=="boolean"?o=o?"0x01":"0x00":s.type.match(/^u?int/)?o=ir(o):s.type.match(/^bytes/)?o=Qw(o,32):s.type==="address"&&this.#n.encode(["address"],[o]),mr(U(o),32));for(t.forEach((s,o)=>{let a=e.inputs[o];if(!a.indexed){w(s==null,"cannot filter non-indexed parameters; must be null","contract."+a.name,s);return}s==null?n.push(null):a.baseType==="array"||a.baseType==="tuple"?w(!1,"filtering with tuples or arrays not supported","contract."+a.name,s):Array.isArray(s)?n.push(s.map(c=>i(a,c))):n.push(i(a,s))});n.length&&n[n.length-1]===null;)n.pop();return n}encodeEventLog(e,t){if(typeof e=="string"){let o=this.getEvent(e);w(o,"unknown event","eventFragment",e),e=o}let n=[],i=[],s=[];return e.anonymous||n.push(e.topicHash),w(t.length===e.inputs.length,"event arguments/values mismatch","values",t),e.inputs.forEach((o,a)=>{let c=t[a];if(o.indexed)if(o.type==="string")n.push(en(c));else if(o.type==="bytes")n.push(Oe(c));else{if(o.baseType==="tuple"||o.baseType==="array")throw new Error("not implemented");n.push(this.#n.encode([o.type],[c]))}else i.push(o),s.push(c)}),{data:this.#n.encode(i,s),topics:n}}decodeEventLog(e,t,n){if(typeof e=="string"){let h=this.getEvent(e);w(h,"unknown event","eventFragment",e),e=h}if(n!=null&&!e.anonymous){let h=e.topicHash;w(me(n[0],32)&&n[0].toLowerCase()===h,"fragment/topic mismatch","topics[0]",n[0]),n=n.slice(1)}let i=[],s=[],o=[];e.inputs.forEach((h,g)=>{h.indexed?h.type==="string"||h.type==="bytes"||h.baseType==="tuple"||h.baseType==="array"?(i.push(nt.from({type:"bytes32",name:h.name})),o.push(!0)):(i.push(h),o.push(!1)):(s.push(h),o.push(!1))});let a=n!=null?this.#n.decode(i,Ee(n)):null,c=this.#n.decode(s,t,!0),l=[],u=[],d=0,f=0;return e.inputs.forEach((h,g)=>{let p=null;if(h.indexed)if(a==null)p=new Vc(null);else if(o[g])p=new Vc(a[f++]);else try{p=a[f++]}catch(b){p=b}else try{p=c[d++]}catch(b){p=b}l.push(p),u.push(h.name||null)}),Dn.fromItems(l,u)}parseTransaction(e){let t=ie(e.data,"tx.data"),n=H(e.value!=null?e.value:0,"tx.value"),i=this.getFunction(U(t.slice(0,4)));if(!i)return null;let s=this.#n.decode(i.inputs,t.slice(4));return new rd(i,i.selector,s,n)}parseCallResult(e){throw new Error("@TODO")}parseLog(e){let t=this.getEvent(e.topics[0]);return!t||t.anonymous?null:new td(t,t.topicHash,this.decodeEventLog(t,e.data,e.topics))}parseError(e){let t=U(e),n=this.getError(Le(t,0,4));if(!n)return null;let i=this.#n.decode(n.inputs,Le(t,4));return new nd(n,n.selector,i)}static from(e){return e instanceof r?e:typeof e=="string"?new r(JSON.parse(e)):typeof e.formatJson=="function"?new r(e.formatJson()):typeof e.format=="function"?new r(e.format("json")):new r(e)}};var RB=BigInt(0);function Wc(r){return r??null}function Ye(r){return r==null?null:r.toString()}var Kc=class{gasPrice;maxFeePerGas;maxPriorityFeePerGas;constructor(e,t,n){Q(this,{gasPrice:Wc(e),maxFeePerGas:Wc(t),maxPriorityFeePerGas:Wc(n)})}toJSON(){let{gasPrice:e,maxFeePerGas:t,maxPriorityFeePerGas:n}=this;return{_type:"FeeData",gasPrice:Ye(e),maxFeePerGas:Ye(t),maxPriorityFeePerGas:Ye(n)}}};function Ls(r){let e={};r.to&&(e.to=r.to),r.from&&(e.from=r.from),r.data&&(e.data=U(r.data));let t="chainId,gasLimit,gasPrice,maxFeePerBlobGas,maxFeePerGas,maxPriorityFeePerGas,value".split(/,/);for(let i of t)!(i in r)||r[i]==null||(e[i]=H(r[i],`request.${i}`));let n="type,nonce".split(/,/);for(let i of n)!(i in r)||r[i]==null||(e[i]=ce(r[i],`request.${i}`));return r.accessList&&(e.accessList=br(r.accessList)),"blockTag"in r&&(e.blockTag=r.blockTag),"enableCcipRead"in r&&(e.enableCcipRead=!!r.enableCcipRead),"customData"in r&&(e.customData=r.customData),"blobVersionedHashes"in r&&r.blobVersionedHashes&&(e.blobVersionedHashes=r.blobVersionedHashes.slice()),"kzg"in r&&(e.kzg=r.kzg),"blobs"in r&&r.blobs&&(e.blobs=r.blobs.map(i=>Eo(i)?U(i):Object.assign({},i))),e}var id=class{provider;number;hash;timestamp;parentHash;parentBeaconBlockRoot;nonce;difficulty;gasLimit;gasUsed;stateRoot;receiptsRoot;blobGasUsed;excessBlobGas;miner;prevRandao;extraData;baseFeePerGas;#e;constructor(e,t){this.#e=e.transactions.map(n=>typeof n!="string"?new qs(n,t):n),Q(this,{provider:t,hash:Wc(e.hash),number:e.number,timestamp:e.timestamp,parentHash:e.parentHash,parentBeaconBlockRoot:e.parentBeaconBlockRoot,nonce:e.nonce,difficulty:e.difficulty,gasLimit:e.gasLimit,gasUsed:e.gasUsed,blobGasUsed:e.blobGasUsed,excessBlobGas:e.excessBlobGas,miner:e.miner,prevRandao:Wc(e.prevRandao),extraData:e.extraData,baseFeePerGas:Wc(e.baseFeePerGas),stateRoot:e.stateRoot,receiptsRoot:e.receiptsRoot})}get transactions(){return this.#e.map(e=>typeof e=="string"?e:e.hash)}get prefetchedTransactions(){let e=this.#e.slice();return e.length===0?[]:(P(typeof e[0]=="object","transactions were not prefetched with block request","UNSUPPORTED_OPERATION",{operation:"transactionResponses()"}),e)}toJSON(){let{baseFeePerGas:e,difficulty:t,extraData:n,gasLimit:i,gasUsed:s,hash:o,miner:a,prevRandao:c,nonce:l,number:u,parentHash:d,parentBeaconBlockRoot:f,stateRoot:h,receiptsRoot:g,timestamp:p,transactions:b}=this;return{_type:"Block",baseFeePerGas:Ye(e),difficulty:Ye(t),extraData:n,gasLimit:Ye(i),gasUsed:Ye(s),blobGasUsed:Ye(this.blobGasUsed),excessBlobGas:Ye(this.excessBlobGas),hash:o,miner:a,prevRandao:c,nonce:l,number:u,parentHash:d,timestamp:p,parentBeaconBlockRoot:f,stateRoot:h,receiptsRoot:g,transactions:b}}[Symbol.iterator](){let e=0,t=this.transactions;return{next:()=>e<this.length?{value:t[e++],done:!1}:{value:void 0,done:!0}}}get length(){return this.#e.length}get date(){return this.timestamp==null?null:new Date(this.timestamp*1e3)}async getTransaction(e){let t;if(typeof e=="number")t=this.#e[e];else{let n=e.toLowerCase();for(let i of this.#e)if(typeof i=="string"){if(i!==n)continue;t=i;break}else{if(i.hash===n)continue;t=i;break}}if(t==null)throw new Error("no such tx");return typeof t=="string"?await this.provider.getTransaction(t):t}getPrefetchedTransaction(e){let t=this.prefetchedTransactions;if(typeof e=="number")return t[e];e=e.toLowerCase();for(let n of t)if(n.hash===e)return n;w(!1,"no matching transaction","indexOrHash",e)}isMined(){return!!this.hash}isLondon(){return!!this.baseFeePerGas}orphanedEvent(){if(!this.isMined())throw new Error("");return ghe(this)}},nn=class{provider;transactionHash;blockHash;blockNumber;removed;address;data;topics;index;transactionIndex;constructor(e,t){this.provider=t;let n=Object.freeze(e.topics.slice());Q(this,{transactionHash:e.transactionHash,blockHash:e.blockHash,blockNumber:e.blockNumber,removed:e.removed,address:e.address,data:e.data,topics:n,index:e.index,transactionIndex:e.transactionIndex})}toJSON(){let{address:e,blockHash:t,blockNumber:n,data:i,index:s,removed:o,topics:a,transactionHash:c,transactionIndex:l}=this;return{_type:"log",address:e,blockHash:t,blockNumber:n,data:i,index:s,removed:o,topics:a,transactionHash:c,transactionIndex:l}}async getBlock(){let e=await this.provider.getBlock(this.blockHash);return P(!!e,"failed to find transaction","UNKNOWN_ERROR",{}),e}async getTransaction(){let e=await this.provider.getTransaction(this.transactionHash);return P(!!e,"failed to find transaction","UNKNOWN_ERROR",{}),e}async getTransactionReceipt(){let e=await this.provider.getTransactionReceipt(this.transactionHash);return P(!!e,"failed to find transaction receipt","UNKNOWN_ERROR",{}),e}removedEvent(){return yhe(this)}},Lo=class{provider;to;from;contractAddress;hash;index;blockHash;blockNumber;logsBloom;gasUsed;blobGasUsed;cumulativeGasUsed;gasPrice;blobGasPrice;type;status;root;#e;constructor(e,t){this.#e=Object.freeze(e.logs.map(i=>new nn(i,t)));let n=RB;e.effectiveGasPrice!=null?n=e.effectiveGasPrice:e.gasPrice!=null&&(n=e.gasPrice),Q(this,{provider:t,to:e.to,from:e.from,contractAddress:e.contractAddress,hash:e.hash,index:e.index,blockHash:e.blockHash,blockNumber:e.blockNumber,logsBloom:e.logsBloom,gasUsed:e.gasUsed,cumulativeGasUsed:e.cumulativeGasUsed,blobGasUsed:e.blobGasUsed,gasPrice:n,blobGasPrice:e.blobGasPrice,type:e.type,status:e.status,root:e.root})}get logs(){return this.#e}toJSON(){let{to:e,from:t,contractAddress:n,hash:i,index:s,blockHash:o,blockNumber:a,logsBloom:c,logs:l,status:u,root:d}=this;return{_type:"TransactionReceipt",blockHash:o,blockNumber:a,contractAddress:n,cumulativeGasUsed:Ye(this.cumulativeGasUsed),from:t,gasPrice:Ye(this.gasPrice),blobGasUsed:Ye(this.blobGasUsed),blobGasPrice:Ye(this.blobGasPrice),gasUsed:Ye(this.gasUsed),hash:i,index:s,logs:l,logsBloom:c,root:d,status:u,to:e}}get length(){return this.logs.length}[Symbol.iterator](){let e=0;return{next:()=>e<this.length?{value:this.logs[e++],done:!1}:{value:void 0,done:!0}}}get fee(){return this.gasUsed*this.gasPrice}async getBlock(){let e=await this.provider.getBlock(this.blockHash);if(e==null)throw new Error("TODO");return e}async getTransaction(){let e=await this.provider.getTransaction(this.hash);if(e==null)throw new Error("TODO");return e}async getResult(){return await this.provider.getTransactionResult(this.hash)}async confirmations(){return await this.provider.getBlockNumber()-this.blockNumber+1}removedEvent(){return MB(this)}reorderedEvent(e){return P(!e||e.isMined(),"unmined 'other' transction cannot be orphaned","UNSUPPORTED_OPERATION",{operation:"reorderedEvent(other)"}),NB(this,e)}},qs=class r{provider;blockNumber;blockHash;index;hash;type;to;from;nonce;gasLimit;gasPrice;maxPriorityFeePerGas;maxFeePerGas;maxFeePerBlobGas;data;value;chainId;signature;accessList;blobVersionedHashes;#e;constructor(e,t){this.provider=t,this.blockNumber=e.blockNumber!=null?e.blockNumber:null,this.blockHash=e.blockHash!=null?e.blockHash:null,this.hash=e.hash,this.index=e.index,this.type=e.type,this.from=e.from,this.to=e.to||null,this.gasLimit=e.gasLimit,this.nonce=e.nonce,this.data=e.data,this.value=e.value,this.gasPrice=e.gasPrice,this.maxPriorityFeePerGas=e.maxPriorityFeePerGas!=null?e.maxPriorityFeePerGas:null,this.maxFeePerGas=e.maxFeePerGas!=null?e.maxFeePerGas:null,this.maxFeePerBlobGas=e.maxFeePerBlobGas!=null?e.maxFeePerBlobGas:null,this.chainId=e.chainId,this.signature=e.signature,this.accessList=e.accessList!=null?e.accessList:null,this.blobVersionedHashes=e.blobVersionedHashes!=null?e.blobVersionedHashes:null,this.#e=-1}toJSON(){let{blockNumber:e,blockHash:t,index:n,hash:i,type:s,to:o,from:a,nonce:c,data:l,signature:u,accessList:d,blobVersionedHashes:f}=this;return{_type:"TransactionResponse",accessList:d,blockNumber:e,blockHash:t,blobVersionedHashes:f,chainId:Ye(this.chainId),data:l,from:a,gasLimit:Ye(this.gasLimit),gasPrice:Ye(this.gasPrice),hash:i,maxFeePerGas:Ye(this.maxFeePerGas),maxPriorityFeePerGas:Ye(this.maxPriorityFeePerGas),maxFeePerBlobGas:Ye(this.maxFeePerBlobGas),nonce:c,signature:u,to:o,index:n,type:s,value:Ye(this.value)}}async getBlock(){let e=this.blockNumber;if(e==null){let n=await this.getTransaction();n&&(e=n.blockNumber)}if(e==null)return null;let t=this.provider.getBlock(e);if(t==null)throw new Error("TODO");return t}async getTransaction(){return this.provider.getTransaction(this.hash)}async confirmations(){if(this.blockNumber==null){let{tx:t,blockNumber:n}=await Je({tx:this.getTransaction(),blockNumber:this.provider.getBlockNumber()});return t==null||t.blockNumber==null?0:n-t.blockNumber+1}return await this.provider.getBlockNumber()-this.blockNumber+1}async wait(e,t){let n=e??1,i=t??0,s=this.#e,o=-1,a=s===-1,c=async()=>{if(a)return null;let{blockNumber:f,nonce:h}=await Je({blockNumber:this.provider.getBlockNumber(),nonce:this.provider.getTransactionCount(this.from)});if(h<this.nonce){s=f;return}if(a)return null;let g=await this.getTransaction();if(!(g&&g.blockNumber!=null))for(o===-1&&(o=s-3,o<this.#e&&(o=this.#e));o<=f;){if(a)return null;let p=await this.provider.getBlock(o,!0);if(p==null)return;for(let b of p)if(b===this.hash)return;for(let b=0;b<p.length;b++){let y=await p.getTransaction(b);if(y.from===this.from&&y.nonce===this.nonce){if(a)return null;let A=await this.provider.getTransactionReceipt(y.hash);if(A==null||f-A.blockNumber+1<n)return;let E="replaced";y.data===this.data&&y.to===this.to&&y.value===this.value?E="repriced":y.data==="0x"&&y.from===y.to&&y.value===RB&&(E="cancelled"),P(!1,"transaction was replaced","TRANSACTION_REPLACED",{cancelled:E==="replaced"||E==="cancelled",reason:E,replacement:y.replaceableTransaction(s),hash:y.hash,receipt:A})}}o++}},l=f=>{if(f==null||f.status!==0)return f;P(!1,"transaction execution reverted","CALL_EXCEPTION",{action:"sendTransaction",data:null,reason:null,invocation:null,revert:null,transaction:{to:f.to,from:f.from,data:""},receipt:f})},u=await this.provider.getTransactionReceipt(this.hash);if(n===0)return l(u);if(u){if(await u.confirmations()>=n)return l(u)}else if(await c(),n===0)return null;return await new Promise((f,h)=>{let g=[],p=()=>{g.forEach(y=>y())};if(g.push(()=>{a=!0}),i>0){let y=setTimeout(()=>{p(),h(xe("wait for transaction timeout","TIMEOUT"))},i);g.push(()=>{clearTimeout(y)})}let b=async y=>{if(await y.confirmations()>=n){p();try{f(l(y))}catch(A){h(A)}}};if(g.push(()=>{this.provider.off(this.hash,b)}),this.provider.on(this.hash,b),s>=0){let y=async()=>{try{await c()}catch(A){if(je(A,"TRANSACTION_REPLACED")){p(),h(A);return}}a||this.provider.once("block",y)};g.push(()=>{this.provider.off("block",y)}),this.provider.once("block",y)}})}isMined(){return this.blockHash!=null}isLegacy(){return this.type===0}isBerlin(){return this.type===1}isLondon(){return this.type===2}isCancun(){return this.type===3}removedEvent(){return P(this.isMined(),"unmined transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),MB(this)}reorderedEvent(e){return P(this.isMined(),"unmined transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),P(!e||e.isMined(),"unmined 'other' transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),NB(this,e)}replaceableTransaction(e){w(Number.isInteger(e)&&e>=0,"invalid startBlock","startBlock",e);let t=new r(this,this.provider);return t.#e=e,t}};function ghe(r){return{orphan:"drop-block",hash:r.hash,number:r.number}}function NB(r,e){return{orphan:"reorder-transaction",tx:r,other:e}}function MB(r){return{orphan:"drop-transaction",tx:r}}function yhe(r){return{orphan:"drop-log",log:{transactionHash:r.transactionHash,blockHash:r.blockHash,blockNumber:r.blockNumber,address:r.address,data:r.data,topics:Object.freeze(r.topics.slice()),index:r.index}}}var Qc=class extends nn{interface;fragment;args;constructor(e,t,n){super(e,e.provider);let i=t.decodeEventLog(n,e.data,e.topics);Q(this,{args:i,fragment:n,interface:t})}get eventName(){return this.fragment.name}get eventSignature(){return this.fragment.format()}},sd=class extends nn{error;constructor(e,t){super(e,e.provider),Q(this,{error:t})}},UE=class extends Lo{#e;constructor(e,t,n){super(n,t),this.#e=e}get logs(){return super.logs.map(e=>{let t=e.topics.length?this.#e.getEvent(e.topics[0]):null;if(t)try{return new Qc(e,this.#e,t)}catch(n){return new sd(e,n)}return e})}},Jc=class extends qs{#e;constructor(e,t,n){super(n,t),this.#e=e}async wait(e,t){let n=await super.wait(e,t);return n==null?null:new UE(this.#e,this.provider,n)}},od=class extends So{log;constructor(e,t,n,i){super(e,t,n),Q(this,{log:i})}async getBlock(){return await this.log.getBlock()}async getTransaction(){return await this.log.getTransaction()}async getTransactionReceipt(){return await this.log.getTransactionReceipt()}},ay=class extends od{constructor(e,t,n,i,s){super(e,t,n,new Qc(s,e.interface,i));let o=e.interface.decodeEventLog(i,this.log.data,this.log.topics);Q(this,{args:o,fragment:i})}get eventName(){return this.fragment.name}get eventSignature(){return this.fragment.format()}};var DB=BigInt(0);function LB(r){return r&&typeof r.call=="function"}function BB(r){return r&&typeof r.estimateGas=="function"}function dy(r){return r&&typeof r.resolveName=="function"}function FB(r){return r&&typeof r.sendTransaction=="function"}function UB(r){if(r!=null){if(dy(r))return r;if(r.provider)return r.provider}}var jE=class{#e;fragment;constructor(e,t,n){if(Q(this,{fragment:t}),t.inputs.length<n.length)throw new Error("too many arguments");let i=Fo(e.runner,"resolveName"),s=dy(i)?i:null;this.#e=async function(){let o=await Promise.all(t.inputs.map((a,c)=>n[c]==null?null:a.walkAsync(n[c],(u,d)=>u==="address"?Array.isArray(d)?Promise.all(d.map(f=>rt(f,s))):rt(d,s):d)));return e.interface.encodeFilterTopics(t,o)}()}getTopicFilter(){return this.#e}};function Fo(r,e){return r==null?null:typeof r[e]=="function"?r:r.provider&&typeof r.provider[e]=="function"?r.provider:null}function Bo(r){return r==null?null:r.provider||null}async function jB(r,e){let t=Ne.dereference(r,"overrides");w(typeof t=="object","invalid overrides parameter","overrides",r);let n=Ls(t);return w(n.to==null||(e||[]).indexOf("to")>=0,"cannot override to","overrides.to",n.to),w(n.data==null||(e||[]).indexOf("data")>=0,"cannot override data","overrides.data",n.data),n.from&&(n.from=n.from),n}async function vhe(r,e,t){let n=Fo(r,"resolveName"),i=dy(n)?n:null;return await Promise.all(e.map((s,o)=>s.walkAsync(t[o],(a,c)=>(c=Ne.dereference(c,a),a==="address"?rt(c,i):c))))}function bhe(r){let e=async function(o){let a=await jB(o,["data"]);a.to=await r.getAddress(),a.from&&(a.from=await rt(a.from,UB(r.runner)));let c=r.interface,l=H(a.value||DB,"overrides.value")===DB,u=(a.data||"0x")==="0x";c.fallback&&!c.fallback.payable&&c.receive&&!u&&!l&&w(!1,"cannot send data to receive or send value to non-payable fallback","overrides",o),w(c.fallback||u,"cannot send data to receive-only contract","overrides.data",a.data);let d=c.receive||c.fallback&&c.fallback.payable;return w(d||l,"cannot send value to non-payable fallback","overrides.value",a.value),w(c.fallback||u,"cannot send data to receive-only contract","overrides.data",a.data),a},t=async function(o){let a=Fo(r.runner,"call");P(LB(a),"contract runner does not support calling","UNSUPPORTED_OPERATION",{operation:"call"});let c=await e(o);try{return await a.call(c)}catch(l){throw Rc(l)&&l.data?r.interface.makeError(l.data,c):l}},n=async function(o){let a=r.runner;P(FB(a),"contract runner does not support sending transactions","UNSUPPORTED_OPERATION",{operation:"sendTransaction"});let c=await a.sendTransaction(await e(o)),l=Bo(r.runner);return new Jc(r.interface,l,c)},i=async function(o){let a=Fo(r.runner,"estimateGas");return P(BB(a),"contract runner does not support gas estimation","UNSUPPORTED_OPERATION",{operation:"estimateGas"}),await a.estimateGas(await e(o))},s=async o=>await n(o);return Q(s,{_contract:r,estimateGas:i,populateTransaction:e,send:n,staticCall:t}),s}function _he(r,e){let t=function(...l){let u=r.interface.getFunction(e,l);return P(u,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:e,args:l}}),u},n=async function(...l){let u=t(...l),d={};if(u.inputs.length+1===l.length&&(d=await jB(l.pop()),d.from&&(d.from=await rt(d.from,UB(r.runner)))),u.inputs.length!==l.length)throw new Error("internal error: fragment inputs doesn't match arguments; should not happen");let f=await vhe(r.runner,u.inputs,l);return Object.assign({},d,await Je({to:r.getAddress(),data:r.interface.encodeFunctionData(u,f)}))},i=async function(...l){let u=await a(...l);return u.length===1?u[0]:u},s=async function(...l){let u=r.runner;P(FB(u),"contract runner does not support sending transactions","UNSUPPORTED_OPERATION",{operation:"sendTransaction"});let d=await u.sendTransaction(await n(...l)),f=Bo(r.runner);return new Jc(r.interface,f,d)},o=async function(...l){let u=Fo(r.runner,"estimateGas");return P(BB(u),"contract runner does not support gas estimation","UNSUPPORTED_OPERATION",{operation:"estimateGas"}),await u.estimateGas(await n(...l))},a=async function(...l){let u=Fo(r.runner,"call");P(LB(u),"contract runner does not support calling","UNSUPPORTED_OPERATION",{operation:"call"});let d;try{d=await n(...l)}catch(g){let p=l.at(-1).blockTag;throw p&&(g.blockNumber=p),g}let f="0x";try{f=await u.call(d)}catch(g){throw Rc(g)&&g.data?r.interface.makeError(g.data,d):g}let h=t(...l);return r.interface.decodeFunctionResult(h,f)},c=async(...l)=>t(...l).constant?await i(...l):await s(...l);return Q(c,{name:r.interface.getFunctionName(e),_contract:r,_key:e,getFragment:t,estimateGas:o,populateTransaction:n,send:s,staticCall:i,staticCallResult:a}),Object.defineProperty(c,"fragment",{configurable:!1,enumerable:!0,get:()=>{let l=r.interface.getFunction(e);return P(l,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:e}}),l}}),c}function Ahe(r,e){let t=function(...i){let s=r.interface.getEvent(e,i);return P(s,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:e,args:i}}),s},n=function(...i){return new jE(r,t(...i),i)};return Q(n,{name:r.interface.getEventName(e),_contract:r,_key:e,getFragment:t}),Object.defineProperty(n,"fragment",{configurable:!1,enumerable:!0,get:()=>{let i=r.interface.getEvent(e);return P(i,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:e}}),i}}),n}var ly=Symbol.for("_ethersInternal_contract"),zB=new WeakMap;function whe(r,e){zB.set(r[ly],e)}function Ar(r){return zB.get(r[ly])}function Ehe(r){return r&&typeof r=="object"&&"getTopicFilter"in r&&typeof r.getTopicFilter=="function"&&r.fragment}async function GE(r,e){let t,n=null;if(Array.isArray(e)){let s=function(o){if(me(o,32))return o;let a=r.interface.getEvent(o);return w(a,"unknown fragment","name",o),a.topicHash};t=e.map(o=>o==null?null:Array.isArray(o)?o.map(s):s(o))}else e==="*"?t=[null]:typeof e=="string"?me(e,32)?t=[e]:(n=r.interface.getEvent(e),w(n,"unknown fragment","event",e),t=[n.topicHash]):Ehe(e)?t=await e.getTopicFilter():"fragment"in e?(n=e.fragment,t=[n.topicHash]):w(!1,"unknown event name","event",e);t=t.map(s=>{if(s==null)return null;if(Array.isArray(s)){let o=Array.from(new Set(s.map(a=>a.toLowerCase())).values());return o.length===1?o[0]:(o.sort(),o)}return s.toLowerCase()});let i=t.map(s=>s==null?"null":Array.isArray(s)?s.join("|"):s).join("&");return{fragment:n,tag:i,topics:t}}async function ad(r,e){let{subs:t}=Ar(r);return t.get((await GE(r,e)).tag)||null}async function qB(r,e,t){let n=Bo(r.runner);P(n,"contract runner does not support subscribing","UNSUPPORTED_OPERATION",{operation:e});let{fragment:i,tag:s,topics:o}=await GE(r,t),{addr:a,subs:c}=Ar(r),l=c.get(s);if(!l){let d={address:a||r,topics:o},f=b=>{let y=i;if(y==null)try{y=r.interface.getEvent(b.topics[0])}catch{}if(y){let A=y,E=i?r.interface.decodeEventLog(i,b.data,b.topics):[];HE(r,t,E,C=>new ay(r,C,t,A,b))}else HE(r,t,[],A=>new od(r,A,t,b))},h=[];l={tag:s,listeners:[],start:()=>{h.length||h.push(n.on(d,f))},stop:async()=>{if(h.length==0)return;let b=h;h=[],await Promise.all(b),n.off(d,f)}},c.set(s,l)}return l}var zE=Promise.resolve();async function She(r,e,t,n){await zE;let i=await ad(r,e);if(!i)return!1;let s=i.listeners.length;return i.listeners=i.listeners.filter(({listener:o,once:a})=>{let c=Array.from(t);n&&c.push(n(a?null:o));try{o.call(r,...c)}catch{}return!a}),i.listeners.length===0&&(i.stop(),Ar(r).subs.delete(i.tag)),s>0}async function HE(r,e,t,n){try{await zE}catch{}let i=She(r,e,t,n);return zE=i,await i}var cy=["then"],uy=class r{target;interface;runner;filters;[ly];fallback;constructor(e,t,n,i){w(typeof e=="string"||jg(e),"invalid value for Contract target","target",e),n==null&&(n=null);let s=Ds.from(t);Q(this,{target:e,runner:n,interface:s}),Object.defineProperty(this,ly,{value:{}});let o,a=null,c=null;if(i){let d=Bo(n);c=new Jc(this.interface,d,i)}let l=new Map;if(typeof e=="string")if(me(e))a=e,o=Promise.resolve(e);else{let d=Fo(n,"resolveName");if(!dy(d))throw xe("contract runner does not support name resolution","UNSUPPORTED_OPERATION",{operation:"resolveName"});o=d.resolveName(e).then(f=>{if(f==null)throw xe("an ENS name used for a contract target must be correctly configured","UNCONFIGURED_NAME",{value:e});return Ar(this).addr=f,f})}else o=e.getAddress().then(d=>{if(d==null)throw new Error("TODO");return Ar(this).addr=d,d});whe(this,{addrPromise:o,addr:a,deployTx:c,subs:l});let u=new Proxy({},{get:(d,f,h)=>{if(typeof f=="symbol"||cy.indexOf(f)>=0)return Reflect.get(d,f,h);try{return this.getEvent(f)}catch(g){if(!je(g,"INVALID_ARGUMENT")||g.argument!=="key")throw g}},has:(d,f)=>cy.indexOf(f)>=0?Reflect.has(d,f):Reflect.has(d,f)||this.interface.hasEvent(String(f))});return Q(this,{filters:u}),Q(this,{fallback:s.receive||s.fallback?bhe(this):null}),new Proxy(this,{get:(d,f,h)=>{if(typeof f=="symbol"||f in d||cy.indexOf(f)>=0)return Reflect.get(d,f,h);try{return d.getFunction(f)}catch(g){if(!je(g,"INVALID_ARGUMENT")||g.argument!=="key")throw g}},has:(d,f)=>typeof f=="symbol"||f in d||cy.indexOf(f)>=0?Reflect.has(d,f):d.interface.hasFunction(f)})}connect(e){return new r(this.target,this.interface,e)}attach(e){return new r(e,this.interface,this.runner)}async getAddress(){return await Ar(this).addrPromise}async getDeployedCode(){let e=Bo(this.runner);P(e,"runner does not support .provider","UNSUPPORTED_OPERATION",{operation:"getDeployedCode"});let t=await e.getCode(await this.getAddress());return t==="0x"?null:t}async waitForDeployment(){let e=this.deploymentTransaction();if(e)return await e.wait(),this;if(await this.getDeployedCode()!=null)return this;let n=Bo(this.runner);return P(n!=null,"contract runner does not support .provider","UNSUPPORTED_OPERATION",{operation:"waitForDeployment"}),new Promise((i,s)=>{let o=async()=>{try{if(await this.getDeployedCode()!=null)return i(this);n.once("block",o)}catch(a){s(a)}};o()})}deploymentTransaction(){return Ar(this).deployTx}getFunction(e){return typeof e!="string"&&(e=e.format()),_he(this,e)}getEvent(e){return typeof e!="string"&&(e=e.format()),Ahe(this,e)}async queryTransaction(e){throw new Error("@TODO")}async queryFilter(e,t,n){t==null&&(t=0),n==null&&(n="latest");let{addr:i,addrPromise:s}=Ar(this),o=i||await s,{fragment:a,topics:c}=await GE(this,e),l={address:o,topics:c,fromBlock:t,toBlock:n},u=Bo(this.runner);return P(u,"contract runner does not have a provider","UNSUPPORTED_OPERATION",{operation:"queryFilter"}),(await u.getLogs(l)).map(d=>{let f=a;if(f==null)try{f=this.interface.getEvent(d.topics[0])}catch{}if(f)try{return new Qc(d,this.interface,f)}catch(h){return new sd(d,h)}return new nn(d,u)})}async on(e,t){let n=await qB(this,"on",e);return n.listeners.push({listener:t,once:!1}),n.start(),this}async once(e,t){let n=await qB(this,"once",e);return n.listeners.push({listener:t,once:!0}),n.start(),this}async emit(e,...t){return await HE(this,e,t,null)}async listenerCount(e){if(e){let i=await ad(this,e);return i?i.listeners.length:0}let{subs:t}=Ar(this),n=0;for(let{listeners:i}of t.values())n+=i.length;return n}async listeners(e){if(e){let i=await ad(this,e);return i?i.listeners.map(({listener:s})=>s):[]}let{subs:t}=Ar(this),n=[];for(let{listeners:i}of t.values())n=n.concat(i.map(({listener:s})=>s));return n}async off(e,t){let n=await ad(this,e);if(!n)return this;if(t){let i=n.listeners.map(({listener:s})=>s).indexOf(t);i>=0&&n.listeners.splice(i,1)}return(t==null||n.listeners.length===0)&&(n.stop(),Ar(this).subs.delete(n.tag)),this}async removeAllListeners(e){if(e){let t=await ad(this,e);if(!t)return this;t.stop(),Ar(this).subs.delete(t.tag)}else{let{subs:t}=Ar(this);for(let{tag:n,stop:i}of t.values())i(),t.delete(n)}return this}async addListener(e,t){return await this.on(e,t)}async removeListener(e,t){return await this.off(e,t)}static buildClass(e){class t extends r{constructor(i,s=null){super(i,e,s)}}return t}static from(e,t,n){return n==null&&(n=null),new this(e,t,n)}};function The(){return uy}var qn=class extends The(){};function VE(r){return r.match(/^ipfs:\/\/ipfs\//i)?r=r.substring(12):r.match(/^ipfs:\/\//i)?r=r.substring(7):w(!1,"unsupported IPFS format","link",r),`https://gateway.ipfs.io/ipfs/${r}`}var fy=class{name;constructor(e){Q(this,{name:e})}connect(e){return this}supportsCoinType(e){return!1}async encodeAddress(e,t){throw new Error("unsupported coin")}async decodeAddress(e,t){throw new Error("unsupported coin")}};var GB=new RegExp("^(ipfs)://(.*)$","i"),HB=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),GB,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")],$c=class r{provider;address;name;#e;#t;constructor(e,t,n){Q(this,{provider:e,address:t,name:n}),this.#e=null,this.#t=new qn(t,["function supportsInterface(bytes4) view returns (bool)","function resolve(bytes, bytes) view returns (bytes)","function addr(bytes32) view returns (address)","function addr(bytes32, uint) view returns (bytes)","function text(bytes32, string) view returns (string)","function contenthash(bytes32) view returns (bytes)"],e)}async supportsWildcard(){return this.#e==null&&(this.#e=(async()=>{try{return await this.#t.supportsInterface("0x9061b923")}catch(e){if(je(e,"CALL_EXCEPTION"))return!1;throw this.#e=null,e}})()),await this.#e}async#r(e,t){t=(t||[]).slice();let n=this.#t.interface;t.unshift(zc(this.name));let i=null;await this.supportsWildcard()&&(i=n.getFunction(e),P(i,"missing fragment","UNKNOWN_ERROR",{info:{funcName:e}}),t=[kE(this.name,255),n.encodeFunctionData(i,t)],e="resolve(bytes,bytes)"),t.push({enableCcipRead:!0});try{let s=await this.#t[e](...t);return i?n.decodeFunctionResult(i,s)[0]:s}catch(s){if(!je(s,"CALL_EXCEPTION"))throw s}return null}async getAddress(e){if(e==null&&(e=60),e===60)try{let s=await this.#r("addr(bytes32)");return s==null||s===di?null:s}catch(s){if(je(s,"CALL_EXCEPTION"))return null;throw s}if(e>=0&&e<2147483648){let s=e+2147483648,o=await this.#r("addr(bytes32,uint)",[s]);if(me(o,20))return de(o)}let t=null;for(let s of this.provider.plugins)if(s instanceof fy&&s.supportsCoinType(e)){t=s;break}if(t==null)return null;let n=await this.#r("addr(bytes32,uint)",[e]);if(n==null||n==="0x")return null;let i=await t.decodeAddress(e,n);if(i!=null)return i;P(!1,"invalid coin data","UNSUPPORTED_OPERATION",{operation:`getAddress(${e})`,info:{coinType:e,data:n}})}async getText(e){let t=await this.#r("text(bytes32,string)",[e]);return t==null||t==="0x"?null:t}async getContentHash(){let e=await this.#r("contenthash(bytes32)");if(e==null||e==="0x")return null;let t=e.match(/^0x(e3010170|e5010172)(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/);if(t){let i=t[1]==="e3010170"?"ipfs":"ipns",s=parseInt(t[4],16);if(t[5].length===s*2)return`${i}://${Yw("0x"+t[2])}`}let n=e.match(/^0xe40101fa011b20([0-9a-f]*)$/);if(n&&n[1].length===64)return`bzz://${n[1]}`;P(!1,"invalid or unsupported content hash data","UNSUPPORTED_OPERATION",{operation:"getContentHash()",info:{data:e}})}async getAvatar(){return(await this._getAvatar()).url}async _getAvatar(){let e=[{type:"name",value:this.name}];try{let t=await this.getText("avatar");if(t==null)return e.push({type:"!avatar",value:""}),{url:null,linkage:e};e.push({type:"avatar",value:t});for(let n=0;n<HB.length;n++){let i=t.match(HB[n]);if(i==null)continue;let s=i[1].toLowerCase();switch(s){case"https":case"data":return e.push({type:"url",value:t}),{linkage:e,url:t};case"ipfs":{let o=VE(t);return e.push({type:"ipfs",value:t}),e.push({type:"url",value:o}),{linkage:e,url:o}}case"erc721":case"erc1155":{let o=s==="erc721"?"tokenURI(uint256)":"uri(uint256)";e.push({type:s,value:t});let a=await this.getAddress();if(a==null)return e.push({type:"!owner",value:""}),{url:null,linkage:e};let c=(i[2]||"").split("/");if(c.length!==2)return e.push({type:`!${s}caip`,value:i[2]||""}),{url:null,linkage:e};let l=c[1],u=new qn(c[0],["function tokenURI(uint) view returns (string)","function ownerOf(uint) view returns (address)","function uri(uint) view returns (string)","function balanceOf(address, uint256) view returns (uint)"],this.provider);if(s==="erc721"){let p=await u.ownerOf(l);if(a!==p)return e.push({type:"!owner",value:p}),{url:null,linkage:e};e.push({type:"owner",value:p})}else if(s==="erc1155"){let p=await u.balanceOf(a,l);if(!p)return e.push({type:"!balance",value:"0"}),{url:null,linkage:e};e.push({type:"balance",value:p.toString()})}let d=await u[o](l);if(d==null||d==="0x")return e.push({type:"!metadata-url",value:""}),{url:null,linkage:e};e.push({type:"metadata-url-base",value:d}),s==="erc1155"&&(d=d.replace("{id}",ir(l,32).substring(2)),e.push({type:"metadata-url-expanded",value:d})),d.match(/^ipfs:/i)&&(d=VE(d)),e.push({type:"metadata-url",value:d});let f={},h=await new gr(d).send();h.assertOk();try{f=h.bodyJson}catch{try{e.push({type:"!metadata",value:h.bodyText})}catch{let y=h.body;return y&&e.push({type:"!metadata",value:U(y)}),{url:null,linkage:e}}return{url:null,linkage:e}}if(!f)return e.push({type:"!metadata",value:""}),{url:null,linkage:e};e.push({type:"metadata",value:JSON.stringify(f)});let g=f.image;if(typeof g!="string")return e.push({type:"!imageUrl",value:""}),{url:null,linkage:e};if(!g.match(/^(https:\/\/|data:)/i)){if(g.match(GB)==null)return e.push({type:"!imageUrl-ipfs",value:g}),{url:null,linkage:e};e.push({type:"imageUrl-ipfs",value:g}),g=VE(g)}return e.push({type:"url",value:g}),{linkage:e,url:g}}}}}catch{}return{linkage:e,url:null}}static async getEnsAddress(e){let t=await e.getNetwork(),n=t.getPlugin("org.ethers.plugins.network.Ens");return P(n,"network does not support ENS","UNSUPPORTED_OPERATION",{operation:"getEnsAddress",info:{network:t}}),n.address}static async#n(e,t){let n=await r.getEnsAddress(e);try{let s=await new qn(n,["function resolver(bytes32) view returns (address)"],e).resolver(zc(t),{enableCcipRead:!0});return s===di?null:s}catch(i){throw i}return null}static async fromName(e,t){let n=t;for(;;){if(n===""||n==="."||t!=="eth"&&n==="eth")return null;let i=await r.#n(e,n);if(i!=null){let s=new r(e,i,t);return n!==t&&!await s.supportsWildcard()?null:s}n=n.split(".").slice(1).join(".")}}};var VB=BigInt(0);function ge(r,e){return function(t){return t==null?e:r(t)}}function hy(r,e){return t=>{if(e&&t==null)return null;if(!Array.isArray(t))throw new Error("not an array");return t.map(n=>r(n))}}function cd(r,e){return t=>{let n={};for(let i in r){let s=i;if(e&&i in e&&!(s in t)){for(let o of e[i])if(o in t){s=o;break}}try{let o=r[i](t[s]);o!==void 0&&(n[i]=o)}catch(o){let a=o instanceof Error?o.message:"not-an-error";P(!1,`invalid value for value.${i} (${a})`,"BAD_DATA",{value:t})}}return n}}function Che(r){switch(r){case!0:case"true":return!0;case!1:case"false":return!1}w(!1,`invalid boolean; ${JSON.stringify(r)}`,"value",r)}function Yc(r){return w(me(r,!0),"invalid data","value",r),r}function Ct(r){return w(me(r,32),"invalid hash","value",r),r}var xhe=cd({address:de,blockHash:Ct,blockNumber:ce,data:Yc,index:ce,removed:ge(Che,!1),topics:hy(Ct),transactionHash:Ct,transactionIndex:ce},{index:["logIndex"]});function WB(r){return xhe(r)}var Ohe=cd({hash:ge(Ct),parentHash:Ct,parentBeaconBlockRoot:ge(Ct,null),number:ce,timestamp:ce,nonce:ge(Yc),difficulty:H,gasLimit:H,gasUsed:H,stateRoot:ge(Ct,null),receiptsRoot:ge(Ct,null),blobGasUsed:ge(H,null),excessBlobGas:ge(H,null),miner:ge(de),prevRandao:ge(Ct,null),extraData:Yc,baseFeePerGas:ge(H)},{prevRandao:["mixHash"]});function KB(r){let e=Ohe(r);return e.transactions=r.transactions.map(t=>typeof t=="string"?t:WE(t)),e}var Ihe=cd({transactionIndex:ce,blockNumber:ce,transactionHash:Ct,address:de,topics:hy(Ct),data:Yc,index:ce,blockHash:Ct},{index:["logIndex"]});function Phe(r){return Ihe(r)}var khe=cd({to:ge(de,null),from:ge(de,null),contractAddress:ge(de,null),index:ce,root:ge(U),gasUsed:H,blobGasUsed:ge(H,null),logsBloom:ge(Yc),blockHash:Ct,hash:Ct,logs:hy(Phe),blockNumber:ce,cumulativeGasUsed:H,effectiveGasPrice:ge(H),blobGasPrice:ge(H,null),l1Fee:ge(H,null),status:ge(ce),type:ge(ce,0)},{effectiveGasPrice:["gasPrice"],hash:["transactionHash"],index:["transactionIndex"]});function QB(r){return khe(r)}function WE(r){r.to&&H(r.to)===VB&&(r.to="0x0000000000000000000000000000000000000000");let e=cd({hash:Ct,index:ge(ce,void 0),type:t=>t==="0x"||t==null?0:ce(t),accessList:ge(br,null),blobVersionedHashes:ge(hy(Ct,!0),null),blockHash:ge(Ct,null),blockNumber:ge(ce,null),transactionIndex:ge(ce,null),from:de,gasPrice:ge(H),maxPriorityFeePerGas:ge(H),maxFeePerGas:ge(H),maxFeePerBlobGas:ge(H,null),gasLimit:H,to:ge(de,null),value:H,nonce:ce,data:Yc,creates:ge(de,null),chainId:ge(H,null)},{data:["input"],gasLimit:["gas"],index:["transactionIndex"]})(r);if(e.to==null&&e.creates==null&&(e.creates=yE(e)),(r.type===1||r.type===2)&&r.accessList==null&&(e.accessList=[]),r.signature?e.signature=Qt.from(r.signature):e.signature=Qt.from(r),e.chainId==null){let t=e.signature.legacyChainId;t!=null&&(e.chainId=t)}return e.blockHash&&H(e.blockHash)===VB&&(e.blockHash=null),e}var Rhe="0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",Zc=class r{name;constructor(e){Q(this,{name:e})}clone(){return new r(this.name)}},Xc=class r extends Zc{effectiveBlock;txBase;txCreate;txDataZero;txDataNonzero;txAccessListStorageKey;txAccessListAddress;constructor(e,t){e==null&&(e=0),super(`org.ethers.network.plugins.GasCost#${e||0}`);let n={effectiveBlock:e};function i(s,o){let a=(t||{})[s];a==null&&(a=o),w(typeof a=="number",`invalud value for ${s}`,"costs",t),n[s]=a}i("txBase",21e3),i("txCreate",32e3),i("txDataZero",4),i("txDataNonzero",16),i("txAccessListStorageKey",1900),i("txAccessListAddress",2400),Q(this,n)}clone(){return new r(this.effectiveBlock,this)}},el=class r extends Zc{address;targetNetwork;constructor(e,t){super("org.ethers.plugins.network.Ens"),Q(this,{address:e||Rhe,targetNetwork:t??1})}clone(){return new r(this.address,this.targetNetwork)}};var ld=class extends Zc{#e;#t;get url(){return this.#e}get processFunc(){return this.#t}constructor(e,t){super("org.ethers.plugins.network.FetchUrlFeeDataPlugin"),this.#e=e,this.#t=t}clone(){return this}};var KE=new Map,xt=class r{#e;#t;#r;constructor(e,t){this.#e=e,this.#t=H(t),this.#r=new Map}toJSON(){return{name:this.name,chainId:String(this.chainId)}}get name(){return this.#e}set name(e){this.#e=e}get chainId(){return this.#t}set chainId(e){this.#t=H(e,"chainId")}matches(e){if(e==null)return!1;if(typeof e=="string"){try{return this.chainId===H(e)}catch{}return this.name===e}if(typeof e=="number"||typeof e=="bigint"){try{return this.chainId===H(e)}catch{}return!1}if(typeof e=="object"){if(e.chainId!=null){try{return this.chainId===H(e.chainId)}catch{}return!1}return e.name!=null?this.name===e.name:!1}return!1}get plugins(){return Array.from(this.#r.values())}attachPlugin(e){if(this.#r.get(e.name))throw new Error(`cannot replace existing plugin: ${e.name} `);return this.#r.set(e.name,e.clone()),this}getPlugin(e){return this.#r.get(e)||null}getPlugins(e){return this.plugins.filter(t=>t.name.split("#")[0]===e)}clone(){let e=new r(this.name,this.chainId);return this.plugins.forEach(t=>{e.attachPlugin(t.clone())}),e}computeIntrinsicGas(e){let t=this.getPlugin("org.ethers.plugins.network.GasCost")||new Xc,n=t.txBase;if(e.to==null&&(n+=t.txCreate),e.data)for(let i=2;i<e.data.length;i+=2)e.data.substring(i,i+2)==="00"?n+=t.txDataZero:n+=t.txDataNonzero;if(e.accessList){let i=br(e.accessList);for(let s in i)n+=t.txAccessListAddress+t.txAccessListStorageKey*i[s].storageKeys.length}return n}static from(e){if(Nhe(),e==null)return r.from("mainnet");if(typeof e=="number"&&(e=BigInt(e)),typeof e=="string"||typeof e=="bigint"){let t=KE.get(e);if(t)return t();if(typeof e=="bigint")return new r("unknown",e);w(!1,"unknown network","network",e)}if(typeof e.clone=="function")return e.clone();if(typeof e=="object"){w(typeof e.name=="string"&&typeof e.chainId=="number","invalid network object name or chainId","network",e);let t=new r(e.name,e.chainId);return(e.ensAddress||e.ensNetwork!=null)&&t.attachPlugin(new el(e.ensAddress,e.ensNetwork)),t}w(!1,"invalid network","network",e)}static register(e,t){typeof e=="number"&&(e=BigInt(e));let n=KE.get(e);n&&w(!1,`conflicting network for ${JSON.stringify(n.name)}`,"nameOrChainId",e),KE.set(e,t)}};function JB(r,e){let t=String(r);if(!t.match(/^[0-9.]+$/))throw new Error(`invalid gwei value: ${r}`);let n=t.split(".");if(n.length===1&&n.push(""),n.length!==2)throw new Error(`invalid gwei value: ${r}`);for(;n[1].length<e;)n[1]+="0";if(n[1].length>9){let i=BigInt(n[1].substring(0,9));n[1].substring(9).match(/^0+$/)||i++,n[1]=i.toString()}return BigInt(n[0]+n[1])}function $B(r){return new ld(r,async(e,t,n)=>{n.setHeader("User-Agent","ethers");let i;try{let[s,o]=await Promise.all([n.send(),e()]);i=s;let a=i.bodyJson.standard;return{gasPrice:o.gasPrice,maxFeePerGas:JB(a.maxFee,9),maxPriorityFeePerGas:JB(a.maxPriorityFee,9)}}catch(s){P(!1,`error encountered with polygon gas station (${JSON.stringify(n.url)})`,"SERVER_ERROR",{request:n,response:i,error:s})}})}var YB=!1;function Nhe(){if(YB)return;YB=!0;function r(e,t,n){let i=function(){let s=new xt(e,t);return n.ensNetwork!=null&&s.attachPlugin(new el(null,n.ensNetwork)),s.attachPlugin(new Xc),(n.plugins||[]).forEach(o=>{s.attachPlugin(o)}),s};xt.register(e,i),xt.register(t,i),n.altNames&&n.altNames.forEach(s=>{xt.register(s,i)})}r("mainnet",1,{ensNetwork:1,altNames:["homestead"]}),r("ropsten",3,{ensNetwork:3}),r("rinkeby",4,{ensNetwork:4}),r("goerli",5,{ensNetwork:5}),r("kovan",42,{ensNetwork:42}),r("sepolia",11155111,{ensNetwork:11155111}),r("holesky",17e3,{ensNetwork:17e3}),r("classic",61,{}),r("classicKotti",6,{}),r("arbitrum",42161,{ensNetwork:1}),r("arbitrum-goerli",421613,{}),r("arbitrum-sepolia",421614,{}),r("base",8453,{ensNetwork:1}),r("base-goerli",84531,{}),r("base-sepolia",84532,{}),r("bnb",56,{ensNetwork:1}),r("bnbt",97,{}),r("linea",59144,{ensNetwork:1}),r("linea-goerli",59140,{}),r("linea-sepolia",59141,{}),r("matic",137,{ensNetwork:1,plugins:[$B("https://gasstation.polygon.technology/v2")]}),r("matic-amoy",80002,{}),r("matic-mumbai",80001,{altNames:["maticMumbai","maticmum"],plugins:[$B("https://gasstation-testnet.polygon.technology/v2")]}),r("optimism",10,{ensNetwork:1,plugins:[]}),r("optimism-goerli",420,{}),r("optimism-sepolia",11155420,{}),r("xdai",100,{ensNetwork:1})}function QE(r){return JSON.parse(JSON.stringify(r))}var py=class{#e;#t;#r;#n;constructor(e){this.#e=e,this.#t=null,this.#r=4e3,this.#n=-2}get pollingInterval(){return this.#r}set pollingInterval(e){this.#r=e}async#s(){try{let e=await this.#e.getBlockNumber();if(this.#n===-2){this.#n=e;return}if(e!==this.#n){for(let t=this.#n+1;t<=e;t++){if(this.#t==null)return;await this.#e.emit("block",t)}this.#n=e}}catch{}this.#t!=null&&(this.#t=this.#e._setTimeout(this.#s.bind(this),this.#r))}start(){this.#t||(this.#t=this.#e._setTimeout(this.#s.bind(this),this.#r),this.#s())}stop(){this.#t&&(this.#e._clearTimeout(this.#t),this.#t=null)}pause(e){this.stop(),e&&(this.#n=-2)}resume(){this.start()}},ud=class{#e;#t;#r;constructor(e){this.#e=e,this.#r=!1,this.#t=t=>{this._poll(t,this.#e)}}async _poll(e,t){throw new Error("sub-classes must override this")}start(){this.#r||(this.#r=!0,this.#t(-2),this.#e.on("block",this.#t))}stop(){this.#r&&(this.#r=!1,this.#e.off("block",this.#t))}pause(e){this.stop()}resume(){this.start()}},my=class extends ud{#e;#t;constructor(e,t){super(e),this.#e=t,this.#t=-2}pause(e){e&&(this.#t=-2),super.pause(e)}async _poll(e,t){let n=await t.getBlock(this.#e);n!=null&&(this.#t===-2?this.#t=n.number:n.number>this.#t&&(t.emit(this.#e,n.number),this.#t=n.number))}},gy=class extends ud{#e;constructor(e,t){super(e),this.#e=QE(t)}async _poll(e,t){throw new Error("@TODO")}},yy=class extends ud{#e;constructor(e,t){super(e),this.#e=t}async _poll(e,t){let n=await t.getTransactionReceipt(this.#e);n&&t.emit(this.#e,n)}},Bs=class{#e;#t;#r;#n;#s;constructor(e,t){this.#e=e,this.#t=QE(t),this.#r=this.#a.bind(this),this.#n=!1,this.#s=-2}async#a(e){if(this.#s===-2)return;let t=QE(this.#t);t.fromBlock=this.#s+1,t.toBlock=e;let n=await this.#e.getLogs(t);if(n.length===0){this.#s<e-60&&(this.#s=e-60);return}for(let i of n)this.#e.emit(this.#t,i),this.#s=i.blockNumber}start(){this.#n||(this.#n=!0,this.#s===-2&&this.#e.getBlockNumber().then(e=>{this.#s=e}),this.#e.on("block",this.#r))}stop(){this.#n&&(this.#n=!1,this.#e.off("block",this.#r))}pause(e){this.stop(),e&&(this.#s=-2)}resume(){this.start()}};var Mhe=BigInt(2),Dhe=10;function vy(r){return r&&typeof r.then=="function"}function by(r,e){return r+":"+JSON.stringify(e,(t,n)=>{if(n==null)return"null";if(typeof n=="bigint")return`bigint:${n.toString()}`;if(typeof n=="string")return n.toLowerCase();if(typeof n=="object"&&!Array.isArray(n)){let i=Object.keys(n);return i.sort(),i.reduce((s,o)=>(s[o]=n[o],s),{})}return n})}var tl=class{name;constructor(e){Q(this,{name:e})}start(){}stop(){}pause(e){}resume(){}};function qhe(r){return JSON.parse(JSON.stringify(r))}function YE(r){return r=Array.from(new Set(r).values()),r.sort(),r}async function JE(r,e){if(r==null)throw new Error("invalid event");if(Array.isArray(r)&&(r={topics:r}),typeof r=="string")switch(r){case"block":case"debug":case"error":case"finalized":case"network":case"pending":case"safe":return{type:r,tag:r}}if(me(r,32)){let t=r.toLowerCase();return{type:"transaction",tag:by("tx",{hash:t}),hash:t}}if(r.orphan){let t=r;return{type:"orphan",tag:by("orphan",t),filter:qhe(t)}}if(r.address||r.topics){let t=r,n={topics:(t.topics||[]).map(i=>i==null?null:Array.isArray(i)?YE(i.map(s=>s.toLowerCase())):i.toLowerCase())};if(t.address){let i=[],s=[],o=a=>{me(a)?i.push(a):s.push((async()=>{i.push(await rt(a,e))})())};Array.isArray(t.address)?t.address.forEach(o):o(t.address),s.length&&await Promise.all(s),n.address=YE(i.map(a=>a.toLowerCase()))}return{filter:n,tag:by("event",n),type:"event"}}w(!1,"unknown ProviderEvent","event",r)}function $E(){return new Date().getTime()}var Lhe={cacheTimeout:250,pollingInterval:4e3},dd=class{#e;#t;#r;#n;#s;#a;#i;#d;#l;#c;#o;#p;constructor(e,t){if(this.#p=Object.assign({},Lhe,t||{}),e==="any")this.#a=!0,this.#s=null;else if(e){let n=xt.from(e);this.#a=!1,this.#s=Promise.resolve(n),setTimeout(()=>{this.emit("network",n,null)},0)}else this.#a=!1,this.#s=null;this.#d=-1,this.#i=new Map,this.#e=new Map,this.#t=new Map,this.#r=null,this.#n=!1,this.#l=1,this.#c=new Map,this.#o=!1}get pollingInterval(){return this.#p.pollingInterval}get provider(){return this}get plugins(){return Array.from(this.#t.values())}attachPlugin(e){if(this.#t.get(e.name))throw new Error(`cannot replace existing plugin: ${e.name} `);return this.#t.set(e.name,e.connect(this)),this}getPlugin(e){return this.#t.get(e)||null}get disableCcipRead(){return this.#o}set disableCcipRead(e){this.#o=!!e}async#u(e){let t=this.#p.cacheTimeout;if(t<0)return await this._perform(e);let n=by(e.method,e),i=this.#i.get(n);return i||(i=this._perform(e),this.#i.set(n,i),setTimeout(()=>{this.#i.get(n)===i&&this.#i.delete(n)},t)),await i}async ccipReadFetch(e,t,n){if(this.disableCcipRead||n.length===0||e.to==null)return null;let i=e.to.toLowerCase(),s=t.toLowerCase(),o=[];for(let a=0;a<n.length;a++){let c=n[a],l=c.replace("{sender}",i).replace("{data}",s),u=new gr(l);c.indexOf("{data}")===-1&&(u.body={data:s,sender:i}),this.emit("debug",{action:"sendCcipReadFetchRequest",request:u,index:a,urls:n});let d="unknown error",f=await u.send();try{let h=f.bodyJson;if(h.data)return this.emit("debug",{action:"receiveCcipReadFetchResult",request:u,result:h}),h.data;h.message&&(d=h.message),this.emit("debug",{action:"receiveCcipReadFetchError",request:u,result:h})}catch{}P(f.statusCode<400||f.statusCode>=500,`response not found during CCIP fetch: ${d}`,"OFFCHAIN_FAULT",{reason:"404_MISSING_RESOURCE",transaction:e,info:{url:c,errorMessage:d}}),o.push(d)}P(!1,`error encountered during CCIP fetch: ${o.map(a=>JSON.stringify(a)).join(", ")}`,"OFFCHAIN_FAULT",{reason:"500_SERVER_ERROR",transaction:e,info:{urls:n,errorMessages:o}})}_wrapBlock(e,t){return new id(KB(e),this)}_wrapLog(e,t){return new nn(WB(e),this)}_wrapTransactionReceipt(e,t){return new Lo(QB(e),this)}_wrapTransactionResponse(e,t){return new qs(WE(e),this)}_detectNetwork(){P(!1,"sub-classes must implement this","UNSUPPORTED_OPERATION",{operation:"_detectNetwork"})}async _perform(e){P(!1,`unsupported method: ${e.method}`,"UNSUPPORTED_OPERATION",{operation:e.method,info:e})}async getBlockNumber(){let e=ce(await this.#u({method:"getBlockNumber"}),"%response");return this.#d>=0&&(this.#d=e),e}_getAddress(e){return rt(e,this)}_getBlockTag(e){if(e==null)return"latest";switch(e){case"earliest":return"0x0";case"finalized":case"latest":case"pending":case"safe":return e}if(me(e))return me(e,32)?e:Nn(e);if(typeof e=="bigint"&&(e=ce(e,"blockTag")),typeof e=="number")return e>=0?Nn(e):this.#d>=0?Nn(this.#d+e):this.getBlockNumber().then(t=>Nn(t+e));w(!1,"invalid blockTag","blockTag",e)}_getFilter(e){let t=(e.topics||[]).map(c=>c==null?null:Array.isArray(c)?YE(c.map(l=>l.toLowerCase())):c.toLowerCase()),n="blockHash"in e?e.blockHash:void 0,i=(c,l,u)=>{let d;switch(c.length){case 0:break;case 1:d=c[0];break;default:c.sort(),d=c}if(n&&(l!=null||u!=null))throw new Error("invalid filter");let f={};return d&&(f.address=d),t.length&&(f.topics=t),l&&(f.fromBlock=l),u&&(f.toBlock=u),n&&(f.blockHash=n),f},s=[];if(e.address)if(Array.isArray(e.address))for(let c of e.address)s.push(this._getAddress(c));else s.push(this._getAddress(e.address));let o;"fromBlock"in e&&(o=this._getBlockTag(e.fromBlock));let a;return"toBlock"in e&&(a=this._getBlockTag(e.toBlock)),s.filter(c=>typeof c!="string").length||o!=null&&typeof o!="string"||a!=null&&typeof a!="string"?Promise.all([Promise.all(s),o,a]).then(c=>i(c[0],c[1],c[2])):i(s,o,a)}_getTransactionRequest(e){let t=Ls(e),n=[];if(["to","from"].forEach(i=>{if(t[i]==null)return;let s=rt(t[i],this);vy(s)?n.push(async function(){t[i]=await s}()):t[i]=s}),t.blockTag!=null){let i=this._getBlockTag(t.blockTag);vy(i)?n.push(async function(){t.blockTag=await i}()):t.blockTag=i}return n.length?async function(){return await Promise.all(n),t}():t}async getNetwork(){if(this.#s==null){let i=(async()=>{try{let s=await this._detectNetwork();return this.emit("network",s,null),s}catch(s){throw this.#s===i&&(this.#s=null),s}})();return this.#s=i,(await i).clone()}let e=this.#s,[t,n]=await Promise.all([e,this._detectNetwork()]);return t.chainId!==n.chainId&&(this.#a?(this.emit("network",n,t),this.#s===e&&(this.#s=Promise.resolve(n))):P(!1,`network changed: ${t.chainId} => ${n.chainId} `,"NETWORK_ERROR",{event:"changed"})),t.clone()}async getFeeData(){let e=await this.getNetwork(),t=async()=>{let{_block:i,gasPrice:s,priorityFee:o}=await Je({_block:this.#g("latest",!1),gasPrice:(async()=>{try{let u=await this.#u({method:"getGasPrice"});return H(u,"%response")}catch{}return null})(),priorityFee:(async()=>{try{let u=await this.#u({method:"getPriorityFee"});return H(u,"%response")}catch{}return null})()}),a=null,c=null,l=this._wrapBlock(i,e);return l&&l.baseFeePerGas&&(c=o??BigInt("1000000000"),a=l.baseFeePerGas*Mhe+c),new Kc(s,a,c)},n=e.getPlugin("org.ethers.plugins.network.FetchUrlFeeDataPlugin");if(n){let i=new gr(n.url),s=await n.processFunc(t,this,i);return new Kc(s.gasPrice,s.maxFeePerGas,s.maxPriorityFeePerGas)}return await t()}async estimateGas(e){let t=this._getTransactionRequest(e);return vy(t)&&(t=await t),H(await this.#u({method:"estimateGas",transaction:t}),"%response")}async#f(e,t,n){P(n<Dhe,"CCIP read exceeded maximum redirections","OFFCHAIN_FAULT",{reason:"TOO_MANY_REDIRECTS",transaction:Object.assign({},e,{blockTag:t,enableCcipRead:!0})});let i=Ls(e);try{return U(await this._perform({method:"call",transaction:i,blockTag:t}))}catch(s){if(!this.disableCcipRead&&Rc(s)&&s.data&&n>=0&&t==="latest"&&i.to!=null&&Le(s.data,0,4)==="0x556f1830"){let o=s.data,a=await rt(i.to,this),c;try{c=zhe(Le(s.data,4))}catch(d){P(!1,d.message,"OFFCHAIN_FAULT",{reason:"BAD_DATA",transaction:i,info:{data:o}})}P(c.sender.toLowerCase()===a.toLowerCase(),"CCIP Read sender mismatch","CALL_EXCEPTION",{action:"call",data:o,reason:"OffchainLookup",transaction:i,invocation:null,revert:{signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",name:"OffchainLookup",args:c.errorArgs}});let l=await this.ccipReadFetch(i,c.calldata,c.urls);P(l!=null,"CCIP Read failed to fetch data","OFFCHAIN_FAULT",{reason:"FETCH_FAILED",transaction:i,info:{data:s.data,errorArgs:c.errorArgs}});let u={to:a,data:Ee([c.selector,jhe([l,c.extraData])])};this.emit("debug",{action:"sendCcipReadCall",transaction:u});try{let d=await this.#f(u,t,n+1);return this.emit("debug",{action:"receiveCcipReadCallResult",transaction:Object.assign({},u),result:d}),d}catch(d){throw this.emit("debug",{action:"receiveCcipReadCallError",transaction:Object.assign({},u),error:d}),d}}throw s}}async#h(e){let{value:t}=await Je({network:this.getNetwork(),value:e});return t}async call(e){let{tx:t,blockTag:n}=await Je({tx:this._getTransactionRequest(e),blockTag:this._getBlockTag(e.blockTag)});return await this.#h(this.#f(t,n,e.enableCcipRead?0:-1))}async#m(e,t,n){let i=this._getAddress(t),s=this._getBlockTag(n);return(typeof i!="string"||typeof s!="string")&&([i,s]=await Promise.all([i,s])),await this.#h(this.#u(Object.assign(e,{address:i,blockTag:s})))}async getBalance(e,t){return H(await this.#m({method:"getBalance"},e,t),"%response")}async getTransactionCount(e,t){return ce(await this.#m({method:"getTransactionCount"},e,t),"%response")}async getCode(e,t){return U(await this.#m({method:"getCode"},e,t))}async getStorage(e,t,n){let i=H(t,"position");return U(await this.#m({method:"getStorage",position:i},e,n))}async broadcastTransaction(e){let{blockNumber:t,hash:n,network:i}=await Je({blockNumber:this.getBlockNumber(),hash:this._perform({method:"broadcastTransaction",signedTransaction:e}),network:this.getNetwork()}),s=Mo.from(e);if(s.hash!==n)throw new Error("@TODO: the returned hash did not match");return this._wrapTransactionResponse(s,i).replaceableTransaction(t)}async#g(e,t){if(me(e,32))return await this.#u({method:"getBlock",blockHash:e,includeTransactions:t});let n=this._getBlockTag(e);return typeof n!="string"&&(n=await n),await this.#u({method:"getBlock",blockTag:n,includeTransactions:t})}async getBlock(e,t){let{network:n,params:i}=await Je({network:this.getNetwork(),params:this.#g(e,!!t)});return i==null?null:this._wrapBlock(i,n)}async getTransaction(e){let{network:t,params:n}=await Je({network:this.getNetwork(),params:this.#u({method:"getTransaction",hash:e})});return n==null?null:this._wrapTransactionResponse(n,t)}async getTransactionReceipt(e){let{network:t,params:n}=await Je({network:this.getNetwork(),params:this.#u({method:"getTransactionReceipt",hash:e})});if(n==null)return null;if(n.gasPrice==null&&n.effectiveGasPrice==null){let i=await this.#u({method:"getTransaction",hash:e});if(i==null)throw new Error("report this; could not find tx or effectiveGasPrice");n.effectiveGasPrice=i.gasPrice}return this._wrapTransactionReceipt(n,t)}async getTransactionResult(e){let{result:t}=await Je({network:this.getNetwork(),result:this.#u({method:"getTransactionResult",hash:e})});return t==null?null:U(t)}async getLogs(e){let t=this._getFilter(e);vy(t)&&(t=await t);let{network:n,params:i}=await Je({network:this.getNetwork(),params:this.#u({method:"getLogs",filter:t})});return i.map(s=>this._wrapLog(s,n))}_getProvider(e){P(!1,"provider cannot connect to target network","UNSUPPORTED_OPERATION",{operation:"_getProvider()"})}async getResolver(e){return await $c.fromName(this,e)}async getAvatar(e){let t=await this.getResolver(e);return t?await t.getAvatar():null}async resolveName(e){let t=await this.getResolver(e);return t?await t.getAddress():null}async lookupAddress(e){e=de(e);let t=zc(e.substring(2).toLowerCase()+".addr.reverse");try{let n=await $c.getEnsAddress(this),s=await new qn(n,["function resolver(bytes32) view returns (address)"],this).resolver(t);if(s==null||s===di)return null;let a=await new qn(s,["function name(bytes32) view returns (string)"],this).name(t);return await this.resolveName(a)!==e?null:a}catch(n){if(je(n,"BAD_DATA")&&n.value==="0x"||je(n,"CALL_EXCEPTION"))return null;throw n}return null}async waitForTransaction(e,t,n){let i=t??1;return i===0?this.getTransactionReceipt(e):new Promise(async(s,o)=>{let a=null,c=async l=>{try{let u=await this.getTransactionReceipt(e);if(u!=null&&l-u.blockNumber+1>=i){s(u),a&&(clearTimeout(a),a=null);return}}catch(u){console.log("EEE",u)}this.once("block",c)};n!=null&&(a=setTimeout(()=>{a!=null&&(a=null,this.off("block",c),o(xe("timeout","TIMEOUT",{reason:"timeout"})))},n)),c(await this.getBlockNumber())})}async waitForBlock(e){P(!1,"not implemented yet","NOT_IMPLEMENTED",{operation:"waitForBlock"})}_clearTimeout(e){let t=this.#c.get(e);t&&(t.timer&&clearTimeout(t.timer),this.#c.delete(e))}_setTimeout(e,t){t==null&&(t=0);let n=this.#l++,i=()=>{this.#c.delete(n),e()};if(this.paused)this.#c.set(n,{timer:null,func:i,time:t});else{let s=setTimeout(i,t);this.#c.set(n,{timer:s,func:i,time:$E()})}return n}_forEachSubscriber(e){for(let t of this.#e.values())e(t.subscriber)}_getSubscriber(e){switch(e.type){case"debug":case"error":case"network":return new tl(e.type);case"block":{let t=new py(this);return t.pollingInterval=this.pollingInterval,t}case"safe":case"finalized":return new my(this,e.type);case"event":return new Bs(this,e.filter);case"transaction":return new yy(this,e.hash);case"orphan":return new gy(this,e.filter)}throw new Error(`unsupported event: ${e.type}`)}_recoverSubscriber(e,t){for(let n of this.#e.values())if(n.subscriber===e){n.started&&n.subscriber.stop(),n.subscriber=t,n.started&&t.start(),this.#r!=null&&t.pause(this.#r);break}}async#b(e,t){let n=await JE(e,this);return n.type==="event"&&t&&t.length>0&&t[0].removed===!0&&(n=await JE({orphan:"drop-log",log:t[0]},this)),this.#e.get(n.tag)||null}async#_(e){let t=await JE(e,this),n=t.tag,i=this.#e.get(n);return i||(i={subscriber:this._getSubscriber(t),tag:n,addressableMap:new WeakMap,nameMap:new Map,started:!1,listeners:[]},this.#e.set(n,i)),i}async on(e,t){let n=await this.#_(e);return n.listeners.push({listener:t,once:!1}),n.started||(n.subscriber.start(),n.started=!0,this.#r!=null&&n.subscriber.pause(this.#r)),this}async once(e,t){let n=await this.#_(e);return n.listeners.push({listener:t,once:!0}),n.started||(n.subscriber.start(),n.started=!0,this.#r!=null&&n.subscriber.pause(this.#r)),this}async emit(e,...t){let n=await this.#b(e,t);if(!n||n.listeners.length===0)return!1;let i=n.listeners.length;return n.listeners=n.listeners.filter(({listener:s,once:o})=>{let a=new So(this,o?null:s,e);try{s.call(this,...t,a)}catch{}return!o}),n.listeners.length===0&&(n.started&&n.subscriber.stop(),this.#e.delete(n.tag)),i>0}async listenerCount(e){if(e){let n=await this.#b(e);return n?n.listeners.length:0}let t=0;for(let{listeners:n}of this.#e.values())t+=n.length;return t}async listeners(e){if(e){let n=await this.#b(e);return n?n.listeners.map(({listener:i})=>i):[]}let t=[];for(let{listeners:n}of this.#e.values())t=t.concat(n.map(({listener:i})=>i));return t}async off(e,t){let n=await this.#b(e);if(!n)return this;if(t){let i=n.listeners.map(({listener:s})=>s).indexOf(t);i>=0&&n.listeners.splice(i,1)}return(!t||n.listeners.length===0)&&(n.started&&n.subscriber.stop(),this.#e.delete(n.tag)),this}async removeAllListeners(e){if(e){let{tag:t,started:n,subscriber:i}=await this.#_(e);n&&i.stop(),this.#e.delete(t)}else for(let[t,{started:n,subscriber:i}]of this.#e)n&&i.stop(),this.#e.delete(t);return this}async addListener(e,t){return await this.on(e,t)}async removeListener(e,t){return this.off(e,t)}get destroyed(){return this.#n}destroy(){this.removeAllListeners();for(let e of this.#c.keys())this._clearTimeout(e);this.#n=!0}get paused(){return this.#r!=null}set paused(e){!!e!==this.paused&&(this.paused?this.resume():this.pause(!1))}pause(e){if(this.#d=-1,this.#r!=null){if(this.#r==!!e)return;P(!1,"cannot change pause type; resume first","UNSUPPORTED_OPERATION",{operation:"pause"})}this._forEachSubscriber(t=>t.pause(e)),this.#r=!!e;for(let t of this.#c.values())t.timer&&clearTimeout(t.timer),t.time=$E()-t.time}resume(){if(this.#r!=null){this._forEachSubscriber(e=>e.resume()),this.#r=null;for(let e of this.#c.values()){let t=e.time;t<0&&(t=0),e.time=$E(),setTimeout(e.func,t)}}}};function Bhe(r,e){try{let t=ZE(r,e);if(t)return _s(t)}catch{}return null}function ZE(r,e){if(r==="0x")return null;try{let t=ce(Le(r,e,e+32)),n=ce(Le(r,t,t+32));return Le(r,t+32,t+32+n)}catch{}return null}function ZB(r){let e=et(r);if(e.length>32)throw new Error("internal; should not happen");let t=new Uint8Array(32);return t.set(e,32-e.length),t}function Fhe(r){if(r.length%32===0)return r;let e=new Uint8Array(Math.ceil(r.length/32)*32);return e.set(r),e}var Uhe=new Uint8Array([]);function jhe(r){let e=[],t=0;for(let n=0;n<r.length;n++)e.push(Uhe),t+=32;for(let n=0;n<r.length;n++){let i=ie(r[n]);e[n]=ZB(t),e.push(ZB(i.length)),e.push(Fhe(i)),t+=32+Math.ceil(i.length/32)*32}return Ee(e)}var XB="0x0000000000000000000000000000000000000000000000000000000000000000";function zhe(r){let e={sender:"",urls:[],calldata:"",selector:"",extraData:"",errorArgs:[]};P(Rn(r)>=5*32,"insufficient OffchainLookup data","OFFCHAIN_FAULT",{reason:"insufficient OffchainLookup data"});let t=Le(r,0,32);P(Le(t,0,12)===Le(XB,0,12),"corrupt OffchainLookup sender","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup sender"}),e.sender=Le(t,12);try{let n=[],i=ce(Le(r,32,64)),s=ce(Le(r,i,i+32)),o=Le(r,i+32);for(let a=0;a<s;a++){let c=Bhe(o,a*32);if(c==null)throw new Error("abort");n.push(c)}e.urls=n}catch{P(!1,"corrupt OffchainLookup urls","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup urls"})}try{let n=ZE(r,64);if(n==null)throw new Error("abort");e.calldata=n}catch{P(!1,"corrupt OffchainLookup calldata","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup calldata"})}P(Le(r,100,128)===Le(XB,0,28),"corrupt OffchainLookup callbaackSelector","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup callbaackSelector"}),e.selector=Le(r,96,100);try{let n=ZE(r,128);if(n==null)throw new Error("abort");e.extraData=n}catch{P(!1,"corrupt OffchainLookup extraData","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup extraData"})}return e.errorArgs="sender,urls,calldata,selector,extraData".split(/,/).map(n=>e[n]),e}function rl(r,e){if(r.provider)return r.provider;P(!1,"missing provider","UNSUPPORTED_OPERATION",{operation:e})}async function e6(r,e){let t=Ls(e);if(t.to!=null&&(t.to=rt(t.to,r)),t.from!=null){let n=t.from;t.from=Promise.all([r.getAddress(),rt(n,r)]).then(([i,s])=>(w(i.toLowerCase()===s.toLowerCase(),"transaction from mismatch","tx.from",s),i))}else t.from=r.getAddress();return await Je(t)}var fd=class{provider;constructor(e){Q(this,{provider:e||null})}async getNonce(e){return rl(this,"getTransactionCount").getTransactionCount(await this.getAddress(),e)}async populateCall(e){return await e6(this,e)}async populateTransaction(e){let t=rl(this,"populateTransaction"),n=await e6(this,e);n.nonce==null&&(n.nonce=await this.getNonce("pending")),n.gasLimit==null&&(n.gasLimit=await this.estimateGas(n));let i=await this.provider.getNetwork();if(n.chainId!=null){let o=H(n.chainId);w(o===i.chainId,"transaction chainId mismatch","tx.chainId",e.chainId)}else n.chainId=i.chainId;let s=n.maxFeePerGas!=null||n.maxPriorityFeePerGas!=null;if(n.gasPrice!=null&&(n.type===2||s)?w(!1,"eip-1559 transaction do not support gasPrice","tx",e):(n.type===0||n.type===1)&&s&&w(!1,"pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","tx",e),(n.type===2||n.type==null)&&n.maxFeePerGas!=null&&n.maxPriorityFeePerGas!=null)n.type=2;else if(n.type===0||n.type===1){let o=await t.getFeeData();P(o.gasPrice!=null,"network does not support gasPrice","UNSUPPORTED_OPERATION",{operation:"getGasPrice"}),n.gasPrice==null&&(n.gasPrice=o.gasPrice)}else{let o=await t.getFeeData();if(n.type==null)if(o.maxFeePerGas!=null&&o.maxPriorityFeePerGas!=null)if(n.type=2,n.gasPrice!=null){let a=n.gasPrice;delete n.gasPrice,n.maxFeePerGas=a,n.maxPriorityFeePerGas=a}else n.maxFeePerGas==null&&(n.maxFeePerGas=o.maxFeePerGas),n.maxPriorityFeePerGas==null&&(n.maxPriorityFeePerGas=o.maxPriorityFeePerGas);else o.gasPrice!=null?(P(!s,"network does not support EIP-1559","UNSUPPORTED_OPERATION",{operation:"populateTransaction"}),n.gasPrice==null&&(n.gasPrice=o.gasPrice),n.type=0):P(!1,"failed to get consistent fee data","UNSUPPORTED_OPERATION",{operation:"signer.getFeeData"});else(n.type===2||n.type===3)&&(n.maxFeePerGas==null&&(n.maxFeePerGas=o.maxFeePerGas),n.maxPriorityFeePerGas==null&&(n.maxPriorityFeePerGas=o.maxPriorityFeePerGas))}return await Je(n)}async estimateGas(e){return rl(this,"estimateGas").estimateGas(await this.populateCall(e))}async call(e){return rl(this,"call").call(await this.populateCall(e))}async resolveName(e){return await rl(this,"resolveName").resolveName(e)}async sendTransaction(e){let t=rl(this,"sendTransaction"),n=await this.populateTransaction(e);delete n.from;let i=Mo.from(n);return await t.broadcastTransaction(await this.signTransaction(i))}};function Hhe(r){return JSON.parse(JSON.stringify(r))}var _y=class{#e;#t;#r;#n;#s;#a;constructor(e){this.#e=e,this.#t=null,this.#r=this.#i.bind(this),this.#n=!1,this.#s=null,this.#a=!1}_subscribe(e){throw new Error("subclasses must override this")}_emitResults(e,t){throw new Error("subclasses must override this")}_recover(e){throw new Error("subclasses must override this")}async#i(e){try{this.#t==null&&(this.#t=this._subscribe(this.#e));let t=null;try{t=await this.#t}catch(s){if(!je(s,"UNSUPPORTED_OPERATION")||s.operation!=="eth_newFilter")throw s}if(t==null){this.#t=null,this.#e._recoverSubscriber(this,this._recover(this.#e));return}let n=await this.#e.getNetwork();if(this.#s||(this.#s=n),this.#s.chainId!==n.chainId)throw new Error("chaid changed");if(this.#a)return;let i=await this.#e.send("eth_getFilterChanges",[t]);await this._emitResults(this.#e,i)}catch(t){console.log("@TODO",t)}this.#e.once("block",this.#r)}#d(){let e=this.#t;e&&(this.#t=null,e.then(t=>{this.#e.destroyed||this.#e.send("eth_uninstallFilter",[t])}))}start(){this.#n||(this.#n=!0,this.#i(-2))}stop(){this.#n&&(this.#n=!1,this.#a=!0,this.#d(),this.#e.off("block",this.#r))}pause(e){e&&this.#d(),this.#e.off("block",this.#r)}resume(){this.start()}},Ay=class extends _y{#e;constructor(e,t){super(e),this.#e=Hhe(t)}_recover(e){return new Bs(e,this.#e)}async _subscribe(e){return await e.send("eth_newFilter",[this.#e])}async _emitResults(e,t){for(let n of t)e.emit(this.#e,e._wrapLog(n,e._network))}},wy=class extends _y{async _subscribe(e){return await e.send("eth_newPendingTransactionFilter",[])}async _emitResults(e,t){for(let n of t)e.emit("pending",n)}};var Ghe="bigint,boolean,function,number,string,symbol".split(/,/g);function Ey(r){if(r==null||Ghe.indexOf(typeof r)>=0||typeof r.getAddress=="function")return r;if(Array.isArray(r))return r.map(Ey);if(typeof r=="object")return Object.keys(r).reduce((e,t)=>(e[t]=r[t],e),{});throw new Error(`should not happen: ${r} (${typeof r})`)}function Vhe(r){return new Promise(e=>{setTimeout(e,r)})}function nl(r){return r&&r.toLowerCase()}function t6(r){return r&&typeof r.pollingInterval=="number"}var r6={polling:!1,staticNetwork:null,batchStallTime:10,batchMaxSize:1<<20,batchMaxCount:100,cacheTimeout:250,pollingInterval:4e3},Uo=class extends fd{address;constructor(e,t){super(e),t=de(t),Q(this,{address:t})}connect(e){P(!1,"cannot reconnect JsonRpcSigner","UNSUPPORTED_OPERATION",{operation:"signer.connect"})}async getAddress(){return this.address}async populateTransaction(e){return await this.populateCall(e)}async sendUncheckedTransaction(e){let t=Ey(e),n=[];if(t.from){let s=t.from;n.push((async()=>{let o=await rt(s,this.provider);w(o!=null&&o.toLowerCase()===this.address.toLowerCase(),"from address mismatch","transaction",e),t.from=o})())}else t.from=this.address;if(t.gasLimit==null&&n.push((async()=>{t.gasLimit=await this.provider.estimateGas({...t,from:this.address})})()),t.to!=null){let s=t.to;n.push((async()=>{t.to=await rt(s,this.provider)})())}n.length&&await Promise.all(n);let i=this.provider.getRpcTransaction(t);return this.provider.send("eth_sendTransaction",[i])}async sendTransaction(e){let t=await this.provider.getBlockNumber(),n=await this.sendUncheckedTransaction(e);return await new Promise((i,s)=>{let o=[1e3,100],a=0,c=async()=>{try{let l=await this.provider.getTransaction(n);if(l!=null){i(l.replaceableTransaction(t));return}}catch(l){if(je(l,"CANCELLED")||je(l,"BAD_DATA")||je(l,"NETWORK_ERROR")){l.info==null&&(l.info={}),l.info.sendTransactionHash=n,s(l);return}if(je(l,"INVALID_ARGUMENT")&&(a++,l.info==null&&(l.info={}),l.info.sendTransactionHash=n,a>10)){s(l);return}this.provider.emit("error",xe("failed to fetch transation after sending (will try again)","UNKNOWN_ERROR",{error:l}))}this.provider._setTimeout(()=>{c()},o.pop()||4e3)};c()})}async signTransaction(e){let t=Ey(e);if(t.from){let i=await rt(t.from,this.provider);w(i!=null&&i.toLowerCase()===this.address.toLowerCase(),"from address mismatch","transaction",e),t.from=i}else t.from=this.address;let n=this.provider.getRpcTransaction(t);return await this.provider.send("eth_signTransaction",[n])}async signMessage(e){let t=typeof e=="string"?Kt(e):e;return await this.provider.send("personal_sign",[U(t),this.address.toLowerCase()])}async signTypedData(e,t,n){let i=Ey(n),s=await Hc.resolveNames(e,t,i,async o=>{let a=await rt(o);return w(a!=null,"TypedData does not support null address","value",o),a});return await this.provider.send("eth_signTypedData_v4",[this.address.toLowerCase(),JSON.stringify(Hc.getPayload(s.domain,t,s.value))])}async unlock(e){return this.provider.send("personal_unlockAccount",[this.address.toLowerCase(),e,null])}async _legacySignMessage(e){let t=typeof e=="string"?Kt(e):e;return await this.provider.send("eth_sign",[this.address.toLowerCase(),U(t)])}},hd=class extends dd{#e;#t;#r;#n;#s;#a;#i;#d(){if(this.#n)return;let e=this._getOption("batchMaxCount")===1?0:this._getOption("batchStallTime");this.#n=setTimeout(()=>{this.#n=null;let t=this.#r;for(this.#r=[];t.length;){let n=[t.shift()];for(;t.length&&n.length!==this.#e.batchMaxCount;)if(n.push(t.shift()),JSON.stringify(n.map(s=>s.payload)).length>this.#e.batchMaxSize){t.unshift(n.pop());break}(async()=>{let i=n.length===1?n[0].payload:n.map(s=>s.payload);this.emit("debug",{action:"sendRpcPayload",payload:i});try{let s=await this._send(i);this.emit("debug",{action:"receiveRpcResult",result:s});for(let{resolve:o,reject:a,payload:c}of n){if(this.destroyed){a(xe("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:c.method}));continue}let l=s.filter(u=>u.id===c.id)[0];if(l==null){let u=xe("missing response for request","BAD_DATA",{value:s,info:{payload:c}});this.emit("error",u),a(u);continue}if("error"in l){a(this.getRpcError(c,l));continue}if(c.method==="eth_call")try{if(U(l.result)==="0x"){a(this.getRpcError(c,l));continue}}catch{}o(l.result)}}catch(s){this.emit("debug",{action:"receiveRpcError",error:s});for(let{reject:o}of n)o(s)}})()}},e)}constructor(e,t){super(e,t),this.#t=1,this.#e=Object.assign({},r6,t||{}),this.#r=[],this.#n=null,this.#a=null,this.#i=null;{let i=null,s=new Promise(o=>{i=o});this.#s={promise:s,resolve:i}}let n=this._getOption("staticNetwork");typeof n=="boolean"?(w(!n||e!=="any","staticNetwork cannot be used on special network 'any'","options",t),n&&e!=null&&(this.#a=xt.from(e))):n&&(w(e==null||n.matches(e),"staticNetwork MUST match network object","options",t),this.#a=n)}_getOption(e){return this.#e[e]}get _network(){return P(this.#a,"network is not available yet","NETWORK_ERROR"),this.#a}async _perform(e){if(e.method==="call"||e.method==="estimateGas"){let n=e.transaction;if(n&&n.type!=null&&H(n.type)&&n.maxFeePerGas==null&&n.maxPriorityFeePerGas==null){let i=await this.getFeeData();i.maxFeePerGas==null&&i.maxPriorityFeePerGas==null&&(e=Object.assign({},e,{transaction:Object.assign({},n,{type:void 0})}))}}let t=this.getRpcRequest(e);return t!=null?await this.send(t.method,t.args):super._perform(e)}async _detectNetwork(){let e=this._getOption("staticNetwork");if(e)if(e===!0){if(this.#a)return this.#a}else return e;return this.#i?await this.#i:this.ready?(this.#i=(async()=>{try{let t=xt.from(H(await this.send("eth_chainId",[])));return this.#i=null,t}catch(t){throw this.#i=null,t}})(),await this.#i):(this.#i=(async()=>{let t={id:this.#t++,method:"eth_chainId",params:[],jsonrpc:"2.0"};this.emit("debug",{action:"sendRpcPayload",payload:t});let n;try{n=(await this._send(t))[0],this.#i=null}catch(i){throw this.#i=null,this.emit("debug",{action:"receiveRpcError",error:i}),i}if(this.emit("debug",{action:"receiveRpcResult",result:n}),"result"in n)return xt.from(H(n.result));throw this.getRpcError(t,n)})(),await this.#i)}_start(){this.#s==null||this.#s.resolve==null||(this.#s.resolve(),this.#s=null,(async()=>{for(;this.#a==null&&!this.destroyed;)try{this.#a=await this._detectNetwork()}catch(e){if(this.destroyed)break;console.log("JsonRpcProvider failed to detect network and cannot start up; retry in 1s (perhaps the URL is wrong or the node is not started)"),this.emit("error",xe("failed to bootstrap network detection","NETWORK_ERROR",{event:"initial-network-discovery",info:{error:e}})),await Vhe(1e3)}this.#d()})())}async _waitUntilReady(){if(this.#s!=null)return await this.#s.promise}_getSubscriber(e){return e.type==="pending"?new wy(this):e.type==="event"?this._getOption("polling")?new Bs(this,e.filter):new Ay(this,e.filter):e.type==="orphan"&&e.filter.orphan==="drop-log"?new tl("orphan"):super._getSubscriber(e)}get ready(){return this.#s==null}getRpcTransaction(e){let t={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach(n=>{if(e[n]==null)return;let i=n;n==="gasLimit"&&(i="gas"),t[i]=Nn(H(e[n],`tx.${n}`))}),["from","to","data"].forEach(n=>{e[n]!=null&&(t[n]=U(e[n]))}),e.accessList&&(t.accessList=br(e.accessList)),e.blobVersionedHashes&&(t.blobVersionedHashes=e.blobVersionedHashes.map(n=>n.toLowerCase())),t}getRpcRequest(e){switch(e.method){case"chainId":return{method:"eth_chainId",args:[]};case"getBlockNumber":return{method:"eth_blockNumber",args:[]};case"getGasPrice":return{method:"eth_gasPrice",args:[]};case"getPriorityFee":return{method:"eth_maxPriorityFeePerGas",args:[]};case"getBalance":return{method:"eth_getBalance",args:[nl(e.address),e.blockTag]};case"getTransactionCount":return{method:"eth_getTransactionCount",args:[nl(e.address),e.blockTag]};case"getCode":return{method:"eth_getCode",args:[nl(e.address),e.blockTag]};case"getStorage":return{method:"eth_getStorageAt",args:[nl(e.address),"0x"+e.position.toString(16),e.blockTag]};case"broadcastTransaction":return{method:"eth_sendRawTransaction",args:[e.signedTransaction]};case"getBlock":if("blockTag"in e)return{method:"eth_getBlockByNumber",args:[e.blockTag,!!e.includeTransactions]};if("blockHash"in e)return{method:"eth_getBlockByHash",args:[e.blockHash,!!e.includeTransactions]};break;case"getTransaction":return{method:"eth_getTransactionByHash",args:[e.hash]};case"getTransactionReceipt":return{method:"eth_getTransactionReceipt",args:[e.hash]};case"call":return{method:"eth_call",args:[this.getRpcTransaction(e.transaction),e.blockTag]};case"estimateGas":return{method:"eth_estimateGas",args:[this.getRpcTransaction(e.transaction)]};case"getLogs":return e.filter&&e.filter.address!=null&&(Array.isArray(e.filter.address)?e.filter.address=e.filter.address.map(nl):e.filter.address=nl(e.filter.address)),{method:"eth_getLogs",args:[e.filter]}}return null}getRpcError(e,t){let{method:n}=e,{error:i,headers:s}=t;if(n==="eth_estimateGas"&&i.message){let c=i.message;if(!c.match(/revert/i)&&c.match(/insufficient funds/i))return xe("insufficient funds","INSUFFICIENT_FUNDS",{transaction:e.params[0],info:{payload:e,error:i}})}if(n==="eth_call"||n==="eth_estimateGas"){let c=eS(i),l=pi.getBuiltinCallException(n==="eth_call"?"call":"estimateGas",e.params[0],c?c.data:null);return l.info={error:i,payload:e,headers:s},l}let o=JSON.stringify(Whe(i));if(typeof i.message=="string"&&i.message.match(/user denied|ethers-user-denied/i))return xe("user rejected action","ACTION_REJECTED",{action:{eth_sign:"signMessage",personal_sign:"signMessage",eth_signTypedData_v4:"signTypedData",eth_signTransaction:"signTransaction",eth_sendTransaction:"sendTransaction",eth_requestAccounts:"requestAccess",wallet_requestAccounts:"requestAccess"}[n]||"unknown",reason:"rejected",info:{payload:e,error:i}});if(n==="eth_sendRawTransaction"||n==="eth_sendTransaction"){let c=e.params[0];if(o.match(/insufficient funds|base fee exceeds gas limit/i))return xe("insufficient funds for intrinsic transaction cost","INSUFFICIENT_FUNDS",{transaction:c,info:{error:i}});if(o.match(/nonce/i)&&o.match(/too low/i))return xe("nonce has already been used","NONCE_EXPIRED",{transaction:c,info:{error:i}});if(o.match(/replacement transaction/i)&&o.match(/underpriced/i))return xe("replacement fee too low","REPLACEMENT_UNDERPRICED",{transaction:c,info:{error:i}});if(o.match(/only replay-protected/i))return xe("legacy pre-eip-155 transactions not supported","UNSUPPORTED_OPERATION",{operation:n,info:{transaction:c,info:{error:i}}})}let a=!!o.match(/the method .* does not exist/i);return a||i&&i.details&&i.details.startsWith("Unauthorized method:")&&(a=!0),a?xe("unsupported operation","UNSUPPORTED_OPERATION",{operation:e.method,info:{error:i,payload:e}}):xe("could not coalesce error","UNKNOWN_ERROR",{error:i,payload:e})}send(e,t){if(this.destroyed)return Promise.reject(xe("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:e}));let n=this.#t++,i=new Promise((s,o)=>{this.#r.push({resolve:s,reject:o,payload:{method:e,params:t,id:n,jsonrpc:"2.0"}})});return this.#d(),i}async getSigner(e){e==null&&(e=0);let t=this.send("eth_accounts",[]);if(typeof e=="number"){let i=await t;if(e>=i.length)throw new Error("no such account");return new Uo(this,i[e])}let{accounts:n}=await Je({network:this.getNetwork(),accounts:t});e=de(e);for(let i of n)if(de(i)===e)return new Uo(this,e);throw new Error("invalid account")}async listAccounts(){return(await this.send("eth_accounts",[])).map(t=>new Uo(this,t))}destroy(){this.#n&&(clearTimeout(this.#n),this.#n=null);for(let{payload:e,reject:t}of this.#r)t(xe("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:e.method}));this.#r=[],super.destroy()}},XE=class extends hd{#e;constructor(e,t){super(e,t);let n=this._getOption("pollingInterval");n==null&&(n=r6.pollingInterval),this.#e=n}_getSubscriber(e){let t=super._getSubscriber(e);return t6(t)&&(t.pollingInterval=this.#e),t}get pollingInterval(){return this.#e}set pollingInterval(e){if(!Number.isInteger(e)||e<0)throw new Error("invalid interval");this.#e=e,this._forEachSubscriber(t=>{t6(t)&&(t.pollingInterval=this.#e)})}},jo=class extends XE{#e;constructor(e,t,n){e==null&&(e="http://localhost:8545"),super(t,n),typeof e=="string"?this.#e=new gr(e):this.#e=e.clone()}_getConnection(){return this.#e.clone()}async send(e,t){return await this._start(),await super.send(e,t)}async _send(e){let t=this._getConnection();t.body=JSON.stringify(e),t.setHeader("content-type","application/json");let n=await t.send();n.assertOk();let i=n.bodyJson;return Array.isArray(i)||(i=[i]),i.forEach(s=>{let o="error"in s;if(!o)try{U(s.result)==="0x"&&(o=!0)}catch{}if(o){s.headers={};for(let[a,c]of Object.entries(n.headers))a.toLowerCase().includes("sentio")&&(s.headers[a]=c)}}),i}};function eS(r){if(r==null)return null;if(typeof r.message=="string"&&r.message.match(/revert/i)&&me(r.data))return{message:r.message,data:r.data};if(typeof r=="object"){for(let e in r){let t=eS(r[e]);if(t)return t}return null}if(typeof r=="string")try{return eS(JSON.parse(r))}catch{}return null}function tS(r,e){if(r!=null){if(typeof r.message=="string"&&e.push(r.message),typeof r=="object")for(let t in r)tS(r[t],e);if(typeof r=="string")try{return tS(JSON.parse(r),e)}catch{}}}function Whe(r){let e=[];return tS(r,e),e}var nS=Go(i6(),1);var md=class extends Error{constructor(e){super(e),this.name="TimeoutError"}},iS=class extends Error{constructor(e){super(),this.name="AbortError",this.message=e}},s6=r=>globalThis.DOMException===void 0?new iS(r):new DOMException(r),o6=r=>{let e=r.reason===void 0?s6("This operation was aborted."):r.reason;return e instanceof Error?e:s6(e)};function sS(r,e){let{milliseconds:t,fallback:n,message:i,customTimers:s={setTimeout,clearTimeout}}=e,o,c=new Promise((l,u)=>{if(typeof t!="number"||Math.sign(t)!==1)throw new TypeError(`Expected \`milliseconds\` to be a positive number, got \`${t}\``);if(e.signal){let{signal:f}=e;f.aborted&&u(o6(f)),f.addEventListener("abort",()=>{u(o6(f))})}if(t===Number.POSITIVE_INFINITY){r.then(l,u);return}let d=new md;o=s.setTimeout.call(void 0,()=>{if(n){try{l(n())}catch(f){u(f)}return}typeof r.cancel=="function"&&r.cancel(),i===!1?l():i instanceof Error?u(i):(d.message=i??`Promise timed out after ${t} milliseconds`,u(d))},t),(async()=>{try{l(await r)}catch(f){u(f)}})()}).finally(()=>{c.clear()});return c.clear=()=>{s.clearTimeout.call(void 0,o),o=void 0},c}function oS(r,e,t){let n=0,i=r.length;for(;i>0;){let s=Math.trunc(i/2),o=n+s;t(r[o],e)<=0?(n=++o,i-=s+1):i=s}return n}var gd=class{#e=[];enqueue(e,t){t={priority:0,...t};let n={priority:t.priority,run:e};if(this.size&&this.#e[this.size-1].priority>=t.priority){this.#e.push(n);return}let i=oS(this.#e,n,(s,o)=>o.priority-s.priority);this.#e.splice(i,0,n)}dequeue(){return this.#e.shift()?.run}filter(e){return this.#e.filter(t=>t.priority===e.priority).map(t=>t.run)}get size(){return this.#e.length}};var yd=class extends nS.default{#e;#t;#r=0;#n;#s;#a=0;#i;#d;#l;#c;#o=0;#p;#u;#f;timeout;constructor(e){if(super(),e={carryoverConcurrencyCount:!1,intervalCap:Number.POSITIVE_INFINITY,interval:0,concurrency:Number.POSITIVE_INFINITY,autoStart:!0,queueClass:gd,...e},!(typeof e.intervalCap=="number"&&e.intervalCap>=1))throw new TypeError(`Expected \`intervalCap\` to be a number from 1 and up, got \`${e.intervalCap?.toString()??""}\` (${typeof e.intervalCap})`);if(e.interval===void 0||!(Number.isFinite(e.interval)&&e.interval>=0))throw new TypeError(`Expected \`interval\` to be a finite number >= 0, got \`${e.interval?.toString()??""}\` (${typeof e.interval})`);this.#e=e.carryoverConcurrencyCount,this.#t=e.intervalCap===Number.POSITIVE_INFINITY||e.interval===0,this.#n=e.intervalCap,this.#s=e.interval,this.#l=new e.queueClass,this.#c=e.queueClass,this.concurrency=e.concurrency,this.timeout=e.timeout,this.#f=e.throwOnTimeout===!0,this.#u=e.autoStart===!1}get#h(){return this.#t||this.#r<this.#n}get#m(){return this.#o<this.#p}#g(){this.#o--,this.#A(),this.emit("next")}#b(){this.#S(),this.#w(),this.#d=void 0}get#_(){let e=Date.now();if(this.#i===void 0){let t=this.#a-e;if(t<0)this.#r=this.#e?this.#o:0;else return this.#d===void 0&&(this.#d=setTimeout(()=>{this.#b()},t)),!0}return!1}#A(){if(this.#l.size===0)return this.#i&&clearInterval(this.#i),this.#i=void 0,this.emit("empty"),this.#o===0&&this.emit("idle"),!1;if(!this.#u){let e=!this.#_;if(this.#h&&this.#m){let t=this.#l.dequeue();return t?(this.emit("active"),t(),e&&this.#w(),!0):!1}}return!1}#w(){this.#t||this.#i!==void 0||(this.#i=setInterval(()=>{this.#S()},this.#s),this.#a=Date.now()+this.#s)}#S(){this.#r===0&&this.#o===0&&this.#i&&(clearInterval(this.#i),this.#i=void 0),this.#r=this.#e?this.#o:0,this.#v()}#v(){for(;this.#A(););}get concurrency(){return this.#p}set concurrency(e){if(!(typeof e=="number"&&e>=1))throw new TypeError(`Expected \`concurrency\` to be a number from 1 and up, got \`${e}\` (${typeof e})`);this.#p=e,this.#v()}async#P(e){return new Promise((t,n)=>{e.addEventListener("abort",()=>{n(e.reason)},{once:!0})})}async add(e,t={}){return t={timeout:this.timeout,throwOnTimeout:this.#f,...t},new Promise((n,i)=>{this.#l.enqueue(async()=>{this.#o++,this.#r++;try{t.signal?.throwIfAborted();let s=e({signal:t.signal});t.timeout&&(s=sS(Promise.resolve(s),{milliseconds:t.timeout})),t.signal&&(s=Promise.race([s,this.#P(t.signal)]));let o=await s;n(o),this.emit("completed",o)}catch(s){if(s instanceof md&&!t.throwOnTimeout){n();return}i(s),this.emit("error",s)}finally{this.#g()}},t),this.emit("add"),this.#A()})}async addAll(e,t){return Promise.all(e.map(async n=>this.add(n,t)))}start(){return this.#u?(this.#u=!1,this.#v(),this):this}pause(){this.#u=!0}clear(){this.#l=new this.#c}async onEmpty(){this.#l.size!==0&&await this.#T("empty")}async onSizeLessThan(e){this.#l.size<e||await this.#T("next",()=>this.#l.size<e)}async onIdle(){this.#o===0&&this.#l.size===0||await this.#T("idle")}async#T(e,t){return new Promise(n=>{let i=()=>{t&&!t()||(this.off(e,i),n())};this.on(e,i)})}get size(){return this.#l.size}sizeBy(e){return this.#l.filter(e).length}get pending(){return this.#o}get isPaused(){return this.#u}};var m6=Go(l6(),1);var sl=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,d6=new Set,yS=typeof process=="object"&&process?process:{},f6=(r,e,t,n)=>{typeof yS.emitWarning=="function"?yS.emitWarning(r,e,t,n):console.error(`[${t}] ${e}: ${r}`)},xy=globalThis.AbortController,u6=globalThis.AbortSignal;if(typeof xy>"u"){u6=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(n,i){this._onabort.push(i)}},xy=class{constructor(){e()}signal=new u6;abort(n){if(!this.signal.aborted){this.signal.reason=n,this.signal.aborted=!0;for(let i of this.signal._onabort)i(n);this.signal.onabort?.(n)}}};let r=yS.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",e=()=>{r&&(r=!1,f6("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",e))}}var gpe=r=>!d6.has(r),pPe=Symbol("type"),Fs=r=>r&&r===Math.floor(r)&&r>0&&isFinite(r),h6=r=>Fs(r)?r<=Math.pow(2,8)?Uint8Array:r<=Math.pow(2,16)?Uint16Array:r<=Math.pow(2,32)?Uint32Array:r<=Number.MAX_SAFE_INTEGER?ol:null:null,ol=class extends Array{constructor(e){super(e),this.fill(0)}},vS=class r{heap;length;static#e=!1;static create(e){let t=h6(e);if(!t)return[];r.#e=!0;let n=new r(e,t);return r.#e=!1,n}constructor(e,t){if(!r.#e)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new t(e),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}},bd=class r{#e;#t;#r;#n;#s;#a;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#i;#d;#l;#c;#o;#p;#u;#f;#h;#m;#g;#b;#_;#A;#w;#S;#v;static unsafeExposeInternals(e){return{starts:e.#_,ttls:e.#A,sizes:e.#b,keyMap:e.#l,keyList:e.#c,valList:e.#o,next:e.#p,prev:e.#u,get head(){return e.#f},get tail(){return e.#h},free:e.#m,isBackgroundFetch:t=>e.#y(t),backgroundFetch:(t,n,i,s)=>e.#D(t,n,i,s),moveToTail:t=>e.#R(t),indexes:t=>e.#C(t),rindexes:t=>e.#x(t),isStale:t=>e.#E(t)}}get max(){return this.#e}get maxSize(){return this.#t}get calculatedSize(){return this.#d}get size(){return this.#i}get fetchMethod(){return this.#s}get memoMethod(){return this.#a}get dispose(){return this.#r}get disposeAfter(){return this.#n}constructor(e){let{max:t=0,ttl:n,ttlResolution:i=1,ttlAutopurge:s,updateAgeOnGet:o,updateAgeOnHas:a,allowStale:c,dispose:l,disposeAfter:u,noDisposeOnSet:d,noUpdateTTL:f,maxSize:h=0,maxEntrySize:g=0,sizeCalculation:p,fetchMethod:b,memoMethod:y,noDeleteOnFetchRejection:A,noDeleteOnStaleGet:E,allowStaleOnFetchRejection:C,allowStaleOnFetchAbort:k,ignoreFetchAbort:I}=e;if(t!==0&&!Fs(t))throw new TypeError("max option must be a nonnegative integer");let D=t?h6(t):Array;if(!D)throw new Error("invalid max value: "+t);if(this.#e=t,this.#t=h,this.maxEntrySize=g||this.#t,this.sizeCalculation=p,this.sizeCalculation){if(!this.#t&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(y!==void 0&&typeof y!="function")throw new TypeError("memoMethod must be a function if defined");if(this.#a=y,b!==void 0&&typeof b!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#s=b,this.#S=!!b,this.#l=new Map,this.#c=new Array(t).fill(void 0),this.#o=new Array(t).fill(void 0),this.#p=new D(t),this.#u=new D(t),this.#f=0,this.#h=0,this.#m=vS.create(t),this.#i=0,this.#d=0,typeof l=="function"&&(this.#r=l),typeof u=="function"?(this.#n=u,this.#g=[]):(this.#n=void 0,this.#g=void 0),this.#w=!!this.#r,this.#v=!!this.#n,this.noDisposeOnSet=!!d,this.noUpdateTTL=!!f,this.noDeleteOnFetchRejection=!!A,this.allowStaleOnFetchRejection=!!C,this.allowStaleOnFetchAbort=!!k,this.ignoreFetchAbort=!!I,this.maxEntrySize!==0){if(this.#t!==0&&!Fs(this.#t))throw new TypeError("maxSize must be a positive integer if specified");if(!Fs(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#j()}if(this.allowStale=!!c,this.noDeleteOnStaleGet=!!E,this.updateAgeOnGet=!!o,this.updateAgeOnHas=!!a,this.ttlResolution=Fs(i)||i===0?i:1,this.ttlAutopurge=!!s,this.ttl=n||0,this.ttl){if(!Fs(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#P()}if(this.#e===0&&this.ttl===0&&this.#t===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#e&&!this.#t){let j="LRU_CACHE_UNBOUNDED";gpe(j)&&(d6.add(j),f6("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",j,r))}}getRemainingTTL(e){return this.#l.has(e)?1/0:0}#P(){let e=new ol(this.#e),t=new ol(this.#e);this.#A=e,this.#_=t,this.#q=(s,o,a=sl.now())=>{if(t[s]=o!==0?a:0,e[s]=o,o!==0&&this.ttlAutopurge){let c=setTimeout(()=>{this.#E(s)&&this.#O(this.#c[s],"expire")},o+1);c.unref&&c.unref()}},this.#T=s=>{t[s]=e[s]!==0?sl.now():0},this.#I=(s,o)=>{if(e[o]){let a=e[o],c=t[o];if(!a||!c)return;s.ttl=a,s.start=c,s.now=n||i();let l=s.now-c;s.remainingTTL=a-l}};let n=0,i=()=>{let s=sl.now();if(this.ttlResolution>0){n=s;let o=setTimeout(()=>n=0,this.ttlResolution);o.unref&&o.unref()}return s};this.getRemainingTTL=s=>{let o=this.#l.get(s);if(o===void 0)return 0;let a=e[o],c=t[o];if(!a||!c)return 1/0;let l=(n||i())-c;return a-l},this.#E=s=>{let o=t[s],a=e[s];return!!a&&!!o&&(n||i())-o>a}}#T=()=>{};#I=()=>{};#q=()=>{};#E=()=>!1;#j(){let e=new ol(this.#e);this.#d=0,this.#b=e,this.#k=t=>{this.#d-=e[t],e[t]=0},this.#L=(t,n,i,s)=>{if(this.#y(n))return 0;if(!Fs(i))if(s){if(typeof s!="function")throw new TypeError("sizeCalculation must be a function");if(i=s(n,t),!Fs(i))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return i},this.#N=(t,n,i)=>{if(e[t]=n,this.#t){let s=this.#t-e[t];for(;this.#d>s;)this.#M(!0)}this.#d+=e[t],i&&(i.entrySize=n,i.totalCalculatedSize=this.#d)}}#k=e=>{};#N=(e,t,n)=>{};#L=(e,t,n,i)=>{if(n||i)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#C({allowStale:e=this.allowStale}={}){if(this.#i)for(let t=this.#h;!(!this.#B(t)||((e||!this.#E(t))&&(yield t),t===this.#f));)t=this.#u[t]}*#x({allowStale:e=this.allowStale}={}){if(this.#i)for(let t=this.#f;!(!this.#B(t)||((e||!this.#E(t))&&(yield t),t===this.#h));)t=this.#p[t]}#B(e){return e!==void 0&&this.#l.get(this.#c[e])===e}*entries(){for(let e of this.#C())this.#o[e]!==void 0&&this.#c[e]!==void 0&&!this.#y(this.#o[e])&&(yield[this.#c[e],this.#o[e]])}*rentries(){for(let e of this.#x())this.#o[e]!==void 0&&this.#c[e]!==void 0&&!this.#y(this.#o[e])&&(yield[this.#c[e],this.#o[e]])}*keys(){for(let e of this.#C()){let t=this.#c[e];t!==void 0&&!this.#y(this.#o[e])&&(yield t)}}*rkeys(){for(let e of this.#x()){let t=this.#c[e];t!==void 0&&!this.#y(this.#o[e])&&(yield t)}}*values(){for(let e of this.#C())this.#o[e]!==void 0&&!this.#y(this.#o[e])&&(yield this.#o[e])}*rvalues(){for(let e of this.#x())this.#o[e]!==void 0&&!this.#y(this.#o[e])&&(yield this.#o[e])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(e,t={}){for(let n of this.#C()){let i=this.#o[n],s=this.#y(i)?i.__staleWhileFetching:i;if(s!==void 0&&e(s,this.#c[n],this))return this.get(this.#c[n],t)}}forEach(e,t=this){for(let n of this.#C()){let i=this.#o[n],s=this.#y(i)?i.__staleWhileFetching:i;s!==void 0&&e.call(t,s,this.#c[n],this)}}rforEach(e,t=this){for(let n of this.#x()){let i=this.#o[n],s=this.#y(i)?i.__staleWhileFetching:i;s!==void 0&&e.call(t,s,this.#c[n],this)}}purgeStale(){let e=!1;for(let t of this.#x({allowStale:!0}))this.#E(t)&&(this.#O(this.#c[t],"expire"),e=!0);return e}info(e){let t=this.#l.get(e);if(t===void 0)return;let n=this.#o[t],i=this.#y(n)?n.__staleWhileFetching:n;if(i===void 0)return;let s={value:i};if(this.#A&&this.#_){let o=this.#A[t],a=this.#_[t];if(o&&a){let c=o-(sl.now()-a);s.ttl=c,s.start=Date.now()}}return this.#b&&(s.size=this.#b[t]),s}dump(){let e=[];for(let t of this.#C({allowStale:!0})){let n=this.#c[t],i=this.#o[t],s=this.#y(i)?i.__staleWhileFetching:i;if(s===void 0||n===void 0)continue;let o={value:s};if(this.#A&&this.#_){o.ttl=this.#A[t];let a=sl.now()-this.#_[t];o.start=Math.floor(Date.now()-a)}this.#b&&(o.size=this.#b[t]),e.unshift([n,o])}return e}load(e){this.clear();for(let[t,n]of e){if(n.start){let i=Date.now()-n.start;n.start=sl.now()-i}this.set(t,n.value,n)}}set(e,t,n={}){if(t===void 0)return this.delete(e),this;let{ttl:i=this.ttl,start:s,noDisposeOnSet:o=this.noDisposeOnSet,sizeCalculation:a=this.sizeCalculation,status:c}=n,{noUpdateTTL:l=this.noUpdateTTL}=n,u=this.#L(e,t,n.size||0,a);if(this.maxEntrySize&&u>this.maxEntrySize)return c&&(c.set="miss",c.maxEntrySizeExceeded=!0),this.#O(e,"set"),this;let d=this.#i===0?void 0:this.#l.get(e);if(d===void 0)d=this.#i===0?this.#h:this.#m.length!==0?this.#m.pop():this.#i===this.#e?this.#M(!1):this.#i,this.#c[d]=e,this.#o[d]=t,this.#l.set(e,d),this.#p[this.#h]=d,this.#u[d]=this.#h,this.#h=d,this.#i++,this.#N(d,u,c),c&&(c.set="add"),l=!1;else{this.#R(d);let f=this.#o[d];if(t!==f){if(this.#S&&this.#y(f)){f.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:h}=f;h!==void 0&&!o&&(this.#w&&this.#r?.(h,e,"set"),this.#v&&this.#g?.push([h,e,"set"]))}else o||(this.#w&&this.#r?.(f,e,"set"),this.#v&&this.#g?.push([f,e,"set"]));if(this.#k(d),this.#N(d,u,c),this.#o[d]=t,c){c.set="replace";let h=f&&this.#y(f)?f.__staleWhileFetching:f;h!==void 0&&(c.oldValue=h)}}else c&&(c.set="update")}if(i!==0&&!this.#A&&this.#P(),this.#A&&(l||this.#q(d,i,s),c&&this.#I(c,d)),!o&&this.#v&&this.#g){let f=this.#g,h;for(;h=f?.shift();)this.#n?.(...h)}return this}pop(){try{for(;this.#i;){let e=this.#o[this.#f];if(this.#M(!0),this.#y(e)){if(e.__staleWhileFetching)return e.__staleWhileFetching}else if(e!==void 0)return e}}finally{if(this.#v&&this.#g){let e=this.#g,t;for(;t=e?.shift();)this.#n?.(...t)}}}#M(e){let t=this.#f,n=this.#c[t],i=this.#o[t];return this.#S&&this.#y(i)?i.__abortController.abort(new Error("evicted")):(this.#w||this.#v)&&(this.#w&&this.#r?.(i,n,"evict"),this.#v&&this.#g?.push([i,n,"evict"])),this.#k(t),e&&(this.#c[t]=void 0,this.#o[t]=void 0,this.#m.push(t)),this.#i===1?(this.#f=this.#h=0,this.#m.length=0):this.#f=this.#p[t],this.#l.delete(n),this.#i--,t}has(e,t={}){let{updateAgeOnHas:n=this.updateAgeOnHas,status:i}=t,s=this.#l.get(e);if(s!==void 0){let o=this.#o[s];if(this.#y(o)&&o.__staleWhileFetching===void 0)return!1;if(this.#E(s))i&&(i.has="stale",this.#I(i,s));else return n&&this.#T(s),i&&(i.has="hit",this.#I(i,s)),!0}else i&&(i.has="miss");return!1}peek(e,t={}){let{allowStale:n=this.allowStale}=t,i=this.#l.get(e);if(i===void 0||!n&&this.#E(i))return;let s=this.#o[i];return this.#y(s)?s.__staleWhileFetching:s}#D(e,t,n,i){let s=t===void 0?void 0:this.#o[t];if(this.#y(s))return s;let o=new xy,{signal:a}=n;a?.addEventListener("abort",()=>o.abort(a.reason),{signal:o.signal});let c={signal:o.signal,options:n,context:i},l=(p,b=!1)=>{let{aborted:y}=o.signal,A=n.ignoreFetchAbort&&p!==void 0;if(n.status&&(y&&!b?(n.status.fetchAborted=!0,n.status.fetchError=o.signal.reason,A&&(n.status.fetchAbortIgnored=!0)):n.status.fetchResolved=!0),y&&!A&&!b)return d(o.signal.reason);let E=h;return this.#o[t]===h&&(p===void 0?E.__staleWhileFetching?this.#o[t]=E.__staleWhileFetching:this.#O(e,"fetch"):(n.status&&(n.status.fetchUpdated=!0),this.set(e,p,c.options))),p},u=p=>(n.status&&(n.status.fetchRejected=!0,n.status.fetchError=p),d(p)),d=p=>{let{aborted:b}=o.signal,y=b&&n.allowStaleOnFetchAbort,A=y||n.allowStaleOnFetchRejection,E=A||n.noDeleteOnFetchRejection,C=h;if(this.#o[t]===h&&(!E||C.__staleWhileFetching===void 0?this.#O(e,"fetch"):y||(this.#o[t]=C.__staleWhileFetching)),A)return n.status&&C.__staleWhileFetching!==void 0&&(n.status.returnedStale=!0),C.__staleWhileFetching;if(C.__returned===C)throw p},f=(p,b)=>{let y=this.#s?.(e,s,c);y&&y instanceof Promise&&y.then(A=>p(A===void 0?void 0:A),b),o.signal.addEventListener("abort",()=>{(!n.ignoreFetchAbort||n.allowStaleOnFetchAbort)&&(p(void 0),n.allowStaleOnFetchAbort&&(p=A=>l(A,!0)))})};n.status&&(n.status.fetchDispatched=!0);let h=new Promise(f).then(l,u),g=Object.assign(h,{__abortController:o,__staleWhileFetching:s,__returned:void 0});return t===void 0?(this.set(e,g,{...c.options,status:void 0}),t=this.#l.get(e)):this.#o[t]=g,g}#y(e){if(!this.#S)return!1;let t=e;return!!t&&t instanceof Promise&&t.hasOwnProperty("__staleWhileFetching")&&t.__abortController instanceof xy}async fetch(e,t={}){let{allowStale:n=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:s=this.noDeleteOnStaleGet,ttl:o=this.ttl,noDisposeOnSet:a=this.noDisposeOnSet,size:c=0,sizeCalculation:l=this.sizeCalculation,noUpdateTTL:u=this.noUpdateTTL,noDeleteOnFetchRejection:d=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:f=this.allowStaleOnFetchRejection,ignoreFetchAbort:h=this.ignoreFetchAbort,allowStaleOnFetchAbort:g=this.allowStaleOnFetchAbort,context:p,forceRefresh:b=!1,status:y,signal:A}=t;if(!this.#S)return y&&(y.fetch="get"),this.get(e,{allowStale:n,updateAgeOnGet:i,noDeleteOnStaleGet:s,status:y});let E={allowStale:n,updateAgeOnGet:i,noDeleteOnStaleGet:s,ttl:o,noDisposeOnSet:a,size:c,sizeCalculation:l,noUpdateTTL:u,noDeleteOnFetchRejection:d,allowStaleOnFetchRejection:f,allowStaleOnFetchAbort:g,ignoreFetchAbort:h,status:y,signal:A},C=this.#l.get(e);if(C===void 0){y&&(y.fetch="miss");let k=this.#D(e,C,E,p);return k.__returned=k}else{let k=this.#o[C];if(this.#y(k)){let q=n&&k.__staleWhileFetching!==void 0;return y&&(y.fetch="inflight",q&&(y.returnedStale=!0)),q?k.__staleWhileFetching:k.__returned=k}let I=this.#E(C);if(!b&&!I)return y&&(y.fetch="hit"),this.#R(C),i&&this.#T(C),y&&this.#I(y,C),k;let D=this.#D(e,C,E,p),L=D.__staleWhileFetching!==void 0&&n;return y&&(y.fetch=I?"stale":"refresh",L&&I&&(y.returnedStale=!0)),L?D.__staleWhileFetching:D.__returned=D}}async forceFetch(e,t={}){let n=await this.fetch(e,t);if(n===void 0)throw new Error("fetch() returned undefined");return n}memo(e,t={}){let n=this.#a;if(!n)throw new Error("no memoMethod provided to constructor");let{context:i,forceRefresh:s,...o}=t,a=this.get(e,o);if(!s&&a!==void 0)return a;let c=n(e,a,{options:o,context:i});return this.set(e,c,o),c}get(e,t={}){let{allowStale:n=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:s=this.noDeleteOnStaleGet,status:o}=t,a=this.#l.get(e);if(a!==void 0){let c=this.#o[a],l=this.#y(c);return o&&this.#I(o,a),this.#E(a)?(o&&(o.get="stale"),l?(o&&n&&c.__staleWhileFetching!==void 0&&(o.returnedStale=!0),n?c.__staleWhileFetching:void 0):(s||this.#O(e,"expire"),o&&n&&(o.returnedStale=!0),n?c:void 0)):(o&&(o.get="hit"),l?c.__staleWhileFetching:(this.#R(a),i&&this.#T(a),c))}else o&&(o.get="miss")}#F(e,t){this.#u[t]=e,this.#p[e]=t}#R(e){e!==this.#h&&(e===this.#f?this.#f=this.#p[e]:this.#F(this.#u[e],this.#p[e]),this.#F(this.#h,e),this.#h=e)}delete(e){return this.#O(e,"delete")}#O(e,t){let n=!1;if(this.#i!==0){let i=this.#l.get(e);if(i!==void 0)if(n=!0,this.#i===1)this.#U(t);else{this.#k(i);let s=this.#o[i];if(this.#y(s)?s.__abortController.abort(new Error("deleted")):(this.#w||this.#v)&&(this.#w&&this.#r?.(s,e,t),this.#v&&this.#g?.push([s,e,t])),this.#l.delete(e),this.#c[i]=void 0,this.#o[i]=void 0,i===this.#h)this.#h=this.#u[i];else if(i===this.#f)this.#f=this.#p[i];else{let o=this.#u[i];this.#p[o]=this.#p[i];let a=this.#p[i];this.#u[a]=this.#u[i]}this.#i--,this.#m.push(i)}}if(this.#v&&this.#g?.length){let i=this.#g,s;for(;s=i?.shift();)this.#n?.(...s)}return n}clear(){return this.#U("delete")}#U(e){for(let t of this.#x({allowStale:!0})){let n=this.#o[t];if(this.#y(n))n.__abortController.abort(new Error("deleted"));else{let i=this.#c[t];this.#w&&this.#r?.(n,i,e),this.#v&&this.#g?.push([n,i,e])}}if(this.#l.clear(),this.#o.fill(void 0),this.#c.fill(void 0),this.#A&&this.#_&&(this.#A.fill(0),this.#_.fill(0)),this.#b&&this.#b.fill(0),this.#f=0,this.#h=0,this.#m.length=0,this.#d=0,this.#i=0,this.#v&&this.#g){let t=this.#g,n;for(;n=t?.shift();)this.#n?.(...n)}}};var{miss_count:ype,hit_count:vpe,queue_size:bpe}=EN,wPe=new jo("",xt.from(1)),p6=new Map;function g6(r){r||(r=m6.EthChainId.ETHEREUM);let e=xt.from(parseInt(r)),t=ar.INSTANCE.chainServer.get(r),n=e.chainId.toString()+"-"+t,i=p6.get(n);if(i)return i;if(t===void 0)throw Error("Provider not found for chain "+e.chainId+", configured chains: "+[...ar.INSTANCE.chainServer.keys()].join(" "));return i=new bS(t,e,ar.INSTANCE.concurrency,ar.INSTANCE.batchCount),p6.set(n,i),i}function _pe(r,e){return r+":"+JSON.stringify(e,(t,n)=>{if(n==null)return"null";if(typeof n=="bigint")return`bigint:${n.toString()}`;if(typeof n=="string")return n.toLowerCase();if(typeof n=="object"&&!Array.isArray(n)){let i=Object.keys(n);return i.sort(),i.reduce((s,o)=>(s[o]=n[o],s),{})}return n})}var bS=class extends jo{executor;#e=new bd({max:3e5,maxSize:500*1024*1024});#t=new bd({max:3e5});constructor(e,t,n,i=1){super(e,t,{staticNetwork:t,batchMaxCount:i}),this.executor=new yd({concurrency:n})}async send(e,t){if(e!=="eth_call")return await this.executor.add(()=>super.send(e,t));let n=_pe(e,t),i=t[t.length-1],s=this.#e.get(n);if(s)vpe.add(1);else{ype.add(1);let a=SN.getStore(),c=Date.now();s=this.executor.add(()=>{let l=Date.now();uo.processor_rpc_queue_duration.record(l-c,{chain_id:this._network.chainId.toString(),handler:a});let u=!0;return super.send(e,t).catch(d=>{throw u=!1,d}).finally(()=>{uo.processor_rpc_duration.record(Date.now()-l,{chain_id:this._network.chainId.toString(),handler:a,success:u})})}),bpe.record(this.executor.size),this.#e.set(n,s,{size:n.length}),i==="latest"&&setTimeout(()=>{this.#e.get(n)===s&&this.#e.delete(n)},60*1e3)}let o;try{o=await s}catch(a){if(this.#e.delete(n),a.code==="TIMEOUT"){let c=this.#t.get(n);if(ja.execution.rpcRetryTimes&&c===void 0&&(c=ja.execution.rpcRetryTimes),c)return this.#t.set(n,c-1),this.send(e,t)}throw a}if(!o)throw Error("Unexpected null response");return o}toString(){return"QueuedStaticJsonRpcProvider"}};import("node:process").then(r=>r.stdout.write(""));var Dt=Go(Fk(),1),ul=Go(dR(),1);function Oy(r,e,t,n){function i(s){return s instanceof t?s:new t(function(o){o(s)})}return new(t||(t=Promise))(function(s,o){function a(u){try{l(n.next(u))}catch(d){o(d)}}function c(u){try{l(n.throw(u))}catch(d){o(d)}}function l(u){u.done?s(u.value):i(u.value).then(a,c)}l((n=n.apply(r,e||[])).next())})}function y6(r){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&r[e],n=0;if(t)return t.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&n>=r.length&&(r=void 0),{value:r&&r[n++],done:!r}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function it(r){return this instanceof it?(this.v=r,this):new it(r)}function _d(r,e,t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=t.apply(r,e||[]),i,s=[];return i={},a("next"),a("throw"),a("return",o),i[Symbol.asyncIterator]=function(){return this},i;function o(h){return function(g){return Promise.resolve(g).then(h,d)}}function a(h,g){n[h]&&(i[h]=function(p){return new Promise(function(b,y){s.push([h,p,b,y])>1||c(h,p)})},g&&(i[h]=g(i[h])))}function c(h,g){try{l(n[h](g))}catch(p){f(s[0][3],p)}}function l(h){h.value instanceof it?Promise.resolve(h.value.v).then(u,d):f(s[0][2],h)}function u(h){c("next",h)}function d(h){c("throw",h)}function f(h,g){h(g),s.shift(),s.length&&c(s[0][0],s[0][1])}}function Iy(r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=r[Symbol.asyncIterator],t;return e?e.call(r):(r=typeof y6=="function"?y6(r):r[Symbol.iterator](),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(s){t[s]=r[s]&&function(o){return new Promise(function(a,c){o=r[s](o),i(a,c,o.done,o.value)})}}function i(s,o,a,c){Promise.resolve(c).then(function(l){s({value:l,done:a})},o)}}function v6(r,e,t){if(typeof e>"u")return r;switch(t){case 0:return function(){return r.call(e)};case 1:return function(n){return r.call(e,n)};case 2:return function(n,i){return r.call(e,n,i)};case 3:return function(n,i,s){return r.call(e,n,i,s)};default:return function(){return r.apply(e,arguments)}}}function Us(r){return Oy(this,void 0,void 0,function*(){return r})}var Ape=r=>typeof r=="number",b6=r=>typeof r=="boolean",gi=r=>typeof r=="function",Ln=r=>r!=null&&Object(r)===r,_S=r=>Ln(r)&&gi(r.then);function AS(r){return Ln(r)&&Ape(r.length)}function wS(r){return r!=null&&gi(r[Symbol.iterator])}function _6(r){return Ln(r)&&!gi(r[Symbol.iterator])&&gi(r.next)}function ES(r){return Ln(r)&&gi(r[Symbol.asyncIterator])}function SS(r){return r!=null&&Object(r)===r&&typeof r.subscribe=="function"}var A6=r=>Ln(r)&&gi(r.pipe)&&gi(r._read)&&b6(r.readable)&&Ln(r._readableState),w6=r=>Ln(r)&&gi(r.end)&&gi(r._write)&&b6(r.writable)&&Ln(r._writableState);function E6(r){let e=Number(r);return isNaN(e)?0:e===0||!isFinite(e)?e:(e>0?1:-1)*Math.floor(Math.abs(e))}var wpe=Math.pow(2,53)-1;function S6(r){let e=E6(r);return Math.min(Math.max(e,0),wpe)}var al=class r extends Error{constructor(e="The operation has been aborted"){super(e),Object.setPrototypeOf(this,r.prototype),Error.captureStackTrace(this,this.constructor),this.name="AbortError"}get[Symbol.toStringTag](){return"AbortError"}};function cl(r){if(r&&r.aborted)throw new al}Object.defineProperty(al,Symbol.hasInstance,{writable:!0,configurable:!0,value(r){return Ln(r)&&(r.constructor.name==="AbortError"||r[Symbol.toStringTag]==="AbortError")}});var Ot=class r{forEach(e,t,n){var i,s,o,a;return Oy(this,void 0,void 0,function*(){let c=n?new Ny(this,n):this,l=0;try{for(var u=!0,d=Iy(c),f;f=yield d.next(),i=f.done,!i;u=!0){a=f.value,u=!1;let h=a;yield e.call(t,h,l++,n)}}catch(h){s={error:h}}finally{try{!u&&!i&&(o=d.return)&&(yield o.call(d))}finally{if(s)throw s.error}}})}pipe(...e){let t=-1,n=e.length,i=this;for(;++t<n;)i=e[t](r.as(i));return i}static from(e,t=Us,n){let i=v6(t,n,2);if(wS(e)||ES(e))return new Ad(e,i);if(_S(e))return new ky(e,i);if(SS(e))return new Ry(e,i);if(AS(e))return new ll(e,i);if(_6(e))return new Ad({[Symbol.asyncIterator]:()=>e},i);throw new TypeError("Input type not supported")}static as(e){return e instanceof r?e:typeof e=="string"?new ll([e],Us):wS(e)||ES(e)?new Ad(e,Us):_S(e)?new ky(e,Us):SS(e)?new Ry(e,Us):AS(e)?new ll(e,Us):new ll([e],Us)}};Ot.prototype[Symbol.toStringTag]="AsyncIterableX";Object.defineProperty(Ot,Symbol.hasInstance,{writable:!0,configurable:!0,value(r){return!!(r&&r[Symbol.toStringTag]==="AsyncIterableX")}});var Epe="value",TS="error",Py=class{constructor(){this._ended=!1,this._values=[],this._resolvers=[]}[Symbol.asyncIterator](){return this}write(e){this._push({type:Epe,value:e})}error(e){this._push({type:TS,error:e})}_push(e){if(this._ended)throw new Error("AsyncSink already ended");if(this._resolvers.length>0){let{resolve:t,reject:n}=this._resolvers.shift();e.type===TS?n(e.error):t({done:!1,value:e.value})}else this._values.push(e)}next(){if(this._values.length>0){let{type:e,value:t,error:n}=this._values.shift();return e===TS?Promise.reject(n):Promise.resolve({done:!1,value:t})}return this._ended?Promise.resolve({done:!0}):new Promise((e,t)=>{this._resolvers.push({resolve:e,reject:t})})}end(){for(;this._resolvers.length>0;)this._resolvers.shift().resolve({done:!0});this._ended=!0}},ll=class extends Ot{constructor(e,t){super(),this._source=e,this._selector=t}[Symbol.asyncIterator](){return _d(this,arguments,function*(){let t=0,n=S6(this._source.length);for(;t<n;)yield yield it(yield it(this._selector(this._source[t],t++)))})}},Ad=class extends Ot{constructor(e,t){super(),this._source=e,this._selector=t}[Symbol.asyncIterator](e){return _d(this,arguments,function*(){var n,i,s,o,a,c,l,u;let d=0;if(e&&this._source instanceof Ot)try{for(var f=!0,h=Iy(new Ny(this._source,e)),g;g=yield it(h.next()),n=g.done,!n;f=!0){o=g.value,f=!1;let A=o;yield yield it(yield it(this._selector(A,d++)))}}catch(A){i={error:A}}finally{try{!f&&!n&&(s=h.return)&&(yield it(s.call(h)))}finally{if(i)throw i.error}}else{cl(e);try{for(var p=!0,b=Iy(this._source),y;y=yield it(b.next()),a=y.done,!a;p=!0){u=y.value,p=!1;let A=u;cl(e);let E=yield it(this._selector(A,d++));cl(e),yield yield it(E)}}catch(A){c={error:A}}finally{try{!p&&!a&&(l=b.return)&&(yield it(l.call(b)))}finally{if(c)throw c.error}}}})}},ky=class extends Ot{constructor(e,t){super(),this._source=e,this._selector=t}[Symbol.asyncIterator](){return _d(this,arguments,function*(){let t=yield it(this._source);yield yield it(yield it(this._selector(t,0)))})}},Ry=class extends Ot{constructor(e,t){super(),this._observable=e,this._selector=t}[Symbol.asyncIterator](e){return _d(this,arguments,function*(){cl(e);let n=new Py,i=this._observable.subscribe({next(a){n.write(a)},error(a){n.error(a)},complete(){n.end()}});function s(){n.error(new al)}e&&e.addEventListener("abort",s);let o=0;try{for(let a;!(a=yield it(n.next())).done;)cl(e),yield yield it(yield it(this._selector(a.value,o++)))}finally{e&&e.removeEventListener("abort",s),i.unsubscribe()}})}},Ny=class{constructor(e,t){this._source=e,this._signal=t}[Symbol.asyncIterator](){return this._source[Symbol.asyncIterator](this._signal)}};try{(r=>{if(r)return;Ot.prototype.pipe=t;let e=(n,i=n._writableState||{objectMode:!0})=>i;function t(...n){let i=-1,s,o=n.length,a=this,c;for(;++i<o;)if(c=n[i],typeof c=="function")a=c(Ot.as(a));else if(w6(c))return{end:s=!0}=n[i+1]||{},A6(a)?a.pipe(c,{end:s}):Ot.as(a).toNodeStream(e(c)).pipe(c,{end:s});return a}})(typeof window=="object"&&typeof document=="object"&&document.nodeType===9)}catch{}var Spe=Ot.as,My=Ot.from;var CS=class r extends Ot{constructor(e,t){super(),this._source=e,this._signal=t}withAbort(e){return new r(this._source,e)}[Symbol.asyncIterator](){return this._source[Symbol.asyncIterator](this._signal)}};function xS(r){return function(t){return new CS(t,r)}}var OS=Go(nq(),1);var Tpe=[{inputs:[{components:[{internalType:"address",name:"target",type:"address"},{internalType:"bytes",name:"callData",type:"bytes"}],internalType:"struct Multicall3.Call[]",name:"calls",type:"tuple[]"}],name:"aggregate",outputs:[{internalType:"uint256",name:"blockNumber",type:"uint256"},{internalType:"bytes[]",name:"returnData",type:"bytes[]"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"address",name:"target",type:"address"},{internalType:"bool",name:"allowFailure",type:"bool"},{internalType:"bytes",name:"callData",type:"bytes"}],internalType:"struct Multicall3.Call3[]",name:"calls",type:"tuple[]"}],name:"aggregate3",outputs:[{components:[{internalType:"bool",name:"success",type:"bool"},{internalType:"bytes",name:"returnData",type:"bytes"}],internalType:"struct Multicall3.Result[]",name:"returnData",type:"tuple[]"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"address",name:"target",type:"address"},{internalType:"bool",name:"allowFailure",type:"bool"},{internalType:"uint256",name:"value",type:"uint256"},{internalType:"bytes",name:"callData",type:"bytes"}],internalType:"struct Multicall3.Call3Value[]",name:"calls",type:"tuple[]"}],name:"aggregate3Value",outputs:[{components:[{internalType:"bool",name:"success",type:"bool"},{internalType:"bytes",name:"returnData",type:"bytes"}],internalType:"struct Multicall3.Result[]",name:"returnData",type:"tuple[]"}],stateMutability:"payable",type:"function"},{inputs:[{components:[{internalType:"address",name:"target",type:"address"},{internalType:"bytes",name:"callData",type:"bytes"}],internalType:"struct Multicall3.Call[]",name:"calls",type:"tuple[]"}],name:"blockAndAggregate",outputs:[{internalType:"uint256",name:"blockNumber",type:"uint256"},{internalType:"bytes32",name:"blockHash",type:"bytes32"},{components:[{internalType:"bool",name:"success",type:"bool"},{internalType:"bytes",name:"returnData",type:"bytes"}],internalType:"struct Multicall3.Result[]",name:"returnData",type:"tuple[]"}],stateMutability:"payable",type:"function"},{inputs:[],name:"getBasefee",outputs:[{internalType:"uint256",name:"basefee",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"uint256",name:"blockNumber",type:"uint256"}],name:"getBlockHash",outputs:[{internalType:"bytes32",name:"blockHash",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[],name:"getBlockNumber",outputs:[{internalType:"uint256",name:"blockNumber",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getChainId",outputs:[{internalType:"uint256",name:"chainid",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCurrentBlockCoinbase",outputs:[{internalType:"address",name:"coinbase",type:"address"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCurrentBlockDifficulty",outputs:[{internalType:"uint256",name:"difficulty",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCurrentBlockGasLimit",outputs:[{internalType:"uint256",name:"gaslimit",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getCurrentBlockTimestamp",outputs:[{internalType:"uint256",name:"timestamp",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"address",name:"addr",type:"address"}],name:"getEthBalance",outputs:[{internalType:"uint256",name:"balance",type:"uint256"}],stateMutability:"view",type:"function"},{inputs:[],name:"getLastBlockHash",outputs:[{internalType:"bytes32",name:"blockHash",type:"bytes32"}],stateMutability:"view",type:"function"},{inputs:[{internalType:"bool",name:"requireSuccess",type:"bool"},{components:[{internalType:"address",name:"target",type:"address"},{internalType:"bytes",name:"callData",type:"bytes"}],internalType:"struct Multicall3.Call[]",name:"calls",type:"tuple[]"}],name:"tryAggregate",outputs:[{components:[{internalType:"bool",name:"success",type:"bool"},{internalType:"bytes",name:"returnData",type:"bytes"}],internalType:"struct Multicall3.Result[]",name:"returnData",type:"tuple[]"}],stateMutability:"payable",type:"function"},{inputs:[{internalType:"bool",name:"requireSuccess",type:"bool"},{components:[{internalType:"address",name:"target",type:"address"},{internalType:"bytes",name:"callData",type:"bytes"}],internalType:"struct Multicall3.Call[]",name:"calls",type:"tuple[]"}],name:"tryBlockAndAggregate",outputs:[{internalType:"uint256",name:"blockNumber",type:"uint256"},{internalType:"bytes32",name:"blockHash",type:"bytes32"},{components:[{internalType:"bool",name:"success",type:"bool"},{internalType:"bytes",name:"returnData",type:"bytes"}],internalType:"struct Multicall3.Result[]",name:"returnData",type:"tuple[]"}],stateMutability:"payable",type:"function"}],Cpe=[{name:"Mainnet",chainId:1,url:"https://etherscan.io/address/0xcA11bde05977b3631167028862bE2a173976CA11#code"},{name:"Kovan",chainId:42,url:"https://kovan.etherscan.io/address/0xcA11bde05977b3631167028862bE2a173976CA11#code"},{name:"Rinkeby",chainId:4,url:"https://rinkeby.etherscan.io/address/0xcA11bde05977b3631167028862bE2a173976CA11#code"},{name:"G\xF6rli",chainId:5,url:"https://goerli.etherscan.io/address/0xcA11bde05977b3631167028862bE2a173976CA11#code"},{name:"Ropsten",chainId:3,url:"https://ropsten.etherscan.io/address/0xcA11bde05977b3631167028862bE2a173976CA11#code"},{name:"Sepolia",chainId:11155111,url:"https://sepolia.etherscan.io/address/0xcA11bde05977b3631167028862bE2a173976CA11#code"},{name:"Holesky",chainId:17e3,url:"https://holesky.etherscan.io/address/0xcA11bde05977b3631167028862bE2a173976CA11#code"},{name:"Xterio Chain",chainId:112358,url:"https://xterscan.io/address/0xcA11bde05977b3631167028862bE2a173976CA11?tab=contract"},{name:"Xterio Testnet",chainId:1637450,url:"https://testnet.xterscan.io/address/0xcA11bde05977b3631167028862bE2a173976CA11?tab=contract"},{name:"Optimism",chainId:10,url:"https://optimistic.etherscan.io/address/0xcA11bde05977b3631167028862bE2a173976CA11#code"},{name:"Optimism Kovan",chainId:69,url:"https://kovan-optimistic.etherscan.io/address/0xcA11bde05977b3631167028862bE2a173976CA11#code"},{name:"Optimism G\xF6rli",chainId:420,url:"https://blockscout.com/optimism/goerli/address/0xcA11bde05977b3631167028862bE2a173976CA11/contracts"},{name:"Optimism Sepolia",chainId:11155420,url:"https://optimism-sepolia.blockscout.com/address/0xcA11bde05977b3631167028862bE2a173976CA11?tab=contract"},{name:"Arbitrum",chainId:42161,url:"https://arbiscan.io/address/0xcA11bde05977b3631167028862bE2a173976CA11#code"},{name:"Arbitrum Nova",chainId:42170,url:"https://nova.arbiscan.io/address/0xcA11bde05977b3631167028862bE2a173976CA11#code"},{name:"Arbitrum G\xF6rli",chainId:421613,url:"https://goerli-rollup-explorer.arbitrum.io/address/0xcA11bde05977b3631167028862bE2a173976CA11/contracts"},{name:"Arbitrum Sepolia",chainId:421614,url:"https://sepolia-explorer.arbitrum.io/address/0xcA11bde05977b3631167028862bE2a173976CA11/contracts#address-tabs"},{name:"Arbitrum Rinkeby",chainId:421611,url:"https://testnet.arbiscan.io/address/0xcA11bde05977b3631167028862bE2a173976CA11#code"},{name:"Stylus Testnet",chainId:23011913,url:"https://stylus-testnet-explorer.arbitrum.io/address/0xcA11bde05977b3631167028862bE2a173976CA11/contracts#address-tabs"},{name:"Polygon",chainId:137,url:"https://polygonscan.com/address/0xcA11bde05977b3631167028862bE2a173976CA11#code"},{name:"Mumbai",chainId:80001,url:"https://mumbai.polygonscan.com/address/0xcA11bde05977b3631167028862bE2a173976CA11#code"},{name:"Amoy",chainId:80002,url:"https://amoy.polygonscan.com/address/0xcA11bde05977b3631167028862bE2a173976CA11#code"},{name:"Polygon zkEVM",chainId:1101,url:"https://zkevm.polygonscan.com/address/0xca11bde05977b3631167028862be2a173976ca11#code"},{name:"Polygon zkEVM Testnet",chainId:1442,url:"https://testnet-zkevm.polygonscan.com/address/0xca11bde05977b3631167028862be2a173976ca11#code"},{name:"Cardona zkEVM Testnet",chainId:2442,url:"https://cardona-zkevm.polygonscan.com/address/0xca11bde05977b3631167028862be2a173976ca11#code"},{name:"Gnosis Chain (xDai)",chainId:100,url:"https://blockscout.com/xdai/mainnet/address/0xcA11bde05977b3631167028862bE2a173976CA11/contracts"},{name:"Chiado (Gnosis Chain Testnet)",chainId:10200,url:"https://blockscout.chiadochain.net/address/0xcA11bde05977b3631167028862bE2a173976CA11/contracts#address-tabs"},{name:"Avalanche",chainId:43114,url:"https://snowtrace.io/address/0xcA11bde05977b3631167028862bE2a173976CA11#code"},{name:"Avalanche Fuji",chainId:43113,url:"https://testnet.snowtrace.io/address/0xcA11bde05977b3631167028862bE2a173976CA11#code"},{name:"Fantom Testnet",chainId:4002,url:"https://testnet.ftmscan.com/address/0xcA11bde05977b3631167028862bE2a173976CA11#code"},{name:"Fantom Opera",chainId:250,url:"https://ftmscan.com/address/0xcA11bde05977b3631167028862bE2a173976CA11#code"},{name:"Fantom Sonic",chainId:64240,url:"https://public-sonic.fantom.network/address/0xca11bde05977b3631167028862be2a173976ca11"},{name:"BNB Smart Chain",chainId:56,url:"https://bscscan.com/address/0xcA11bde05977b3631167028862bE2a173976CA11#code"},{name:"BNB Smart Chain Testnet",chainId:97,url:"https://testnet.bscscan.com/address/0xcA11bde05977b3631167028862bE2a173976CA11#code"},{name:"opBNB Testnet",chainId:5611,url:"https://opbnbscan.com/address/0xcA11bde05977b3631167028862bE2a173976CA11?p=1&tab=Contract"},{name:"opBNB Mainnet",chainId:204,url:"https://mainnet.opbnbscan.com/address/0xcA11bde05977b3631167028862bE2a173976CA11?p=1&tab=Contract"},{name:"Moonbeam",chainId:1284,url:"https://moonscan.io/address/0xcA11bde05977b3631167028862bE2a173976CA11#code"},{name:"Moonriver",chainId:1285,url:"https://moonriver.moonscan.io/address/0xcA11bde05977b3631167028862bE2a173976CA11#code"},{name:"Moonbase Alpha Testnet",chainId:1287,url:"https://moonbase.moonscan.io/address/0xcA11bde05977b3631167028862bE2a173976CA11#code"},{name:"Palm",chainId:11297108109,url:"https://palm.chainlens.com/contracts/0xca11bde05977b3631167028862be2a173976ca11/sources"},{name:"Palm Testnet",chainId:11297108099,url:"https://testnet.palm.chainlens.com/contracts/0xca11bde05977b3631167028862be2a173976ca11/sources"},{name:"Harmony",chainId:16666e5,url:"https://explorer.harmony.one/address/0xcA11bde05977b3631167028862bE2a173976CA11?activeTab=7"},{name:"Cronos",chainId:25,url:"https://cronoscan.com/address/0xcA11bde05977b3631167028862bE2a173976CA11#code"},{name:"Cronos Testnet",chainId:338,url:"https://cronos.org/explorer/testnet3/address/0xcA11bde05977b3631167028862bE2a173976CA11/contracts#address-tabs"},{name:"Fuse",chainId:122,url:"https://explorer.fuse.io/address/0xcA11bde05977b3631167028862bE2a173976CA11/contracts"},{name:"Flare Mainnet",chainId:14,url:"https://flare-explorer.flare.network/address/0xcA11bde05977b3631167028862bE2a173976CA11/contracts"},{name:"Songbird Canary Network",chainId:19,url:"https://songbird-explorer.flare.network/address/0xcA11bde05977b3631167028862bE2a173976CA11/contracts"},{name:"Coston Testnet",chainId:16,url:"https://coston-explorer.flare.network/address/0xcA11bde05977b3631167028862bE2a173976CA11/contracts"},{name:"Coston2 Testnet",chainId:114,url:"https://coston2-explorer.flare.network/address/0xcA11bde05977b3631167028862bE2a173976CA11/contracts"},{name:"Boba",chainId:288,url:"https://blockexplorer.boba.network/address/0xcA11bde05977b3631167028862bE2a173976CA11/contracts"},{name:"Aurora",chainId:1313161554,url:"https://explorer.mainnet.aurora.dev/address/0xcA11bde05977b3631167028862bE2a173976CA11"},{name:"Astar",chainId:592,url:"https://blockscout.com/astar/address/0xcA11bde05977b3631167028862bE2a173976CA11/contracts"},{name:"Astar zKyoto Testnet",chainId:6038361,url:"https://zkyoto.explorer.startale.com/address/0xcA11bde05977b3631167028862bE2a173976CA11"},{name:"Astar zkEVM",chainId:3776,url:"https://astar-zkevm.explorer.startale.com/address/0xcA11bde05977b3631167028862bE2a173976CA11"},{name:"OKC",chainId:66,url:"https://www.oklink.com/en/okc/address/0xcA11bde05977b3631167028862bE2a173976CA11"},{name:"Heco Chain",chainId:128,url:"https://hecoinfo.com/address/0xcA11bde05977b3631167028862bE2a173976CA11#code"},{name:"Metis Andromeda",chainId:1088,url:"https://andromeda-explorer.metis.io/address/0xcA11bde05977b3631167028862bE2a173976CA11/contracts"},{name:"Metis Goerli",chainId:599,url:"https://goerli.explorer.metisdevops.link/address/0xcA11bde05977b3631167028862bE2a173976CA11/contracts#address-tabs"},{name:"Metis Sepolia",chainId:59902,url:"https://sepolia-explorer.metisdevops.link/address/0xcA11bde05977b3631167028862bE2a173976CA11?tab=contract"},{name:"RSK",chainId:30,url:"https://explorer.rsk.co/address/0xcA11bde05977b3631167028862bE2a173976CA11"},{name:"RSK Testnet",chainId:31,url:"https://explorer.testnet.rsk.co/address/0xcA11bde05977b3631167028862bE2a173976CA11"},{name:"Evmos",chainId:9001,url:"https://evm.evmos.org/address/0xcA11bde05977b3631167028862bE2a173976CA11/contracts"},{name:"Evmos Testnet",chainId:9e3,url:"https://evm.evmos.dev/address/0xcA11bde05977b3631167028862bE2a173976CA11/contracts"},{name:"Thundercore",chainId:108,url:"https://viewblock.io/thundercore/address/0xcA11bde05977b3631167028862bE2a173976CA11?tab=code"},{name:"Thundercore Testnet",chainId:18,url:"https://explorer-testnet.thundercore.com/address/0xcA11bde05977b3631167028862bE2a173976CA11/contracts"},{name:"Oasis",chainId:42262,url:"https://explorer.emerald.oasis.dev/address/0xcA11bde05977b3631167028862bE2a173976CA11/contracts"},{name:"Oasis Sapphire",chainId:23294,url:"https://explorer.sapphire.oasis.io/address/0xcA11bde05977b3631167028862bE2a173976CA11/contracts"},{name:"Celo",chainId:42220,url:"https://explorer.celo.org/address/0xcA11bde05977b3631167028862bE2a173976CA11/contracts"},{name:"Celo Alfajores Testnet",chainId:44787,url:"https://explorer.celo.org/alfajores/address/0xcA11bde05977b3631167028862bE2a173976CA11/contracts"},{name:"Godwoken",chainId:71402,url:"https://v1.gwscan.com/account/0xcA11bde05977b3631167028862bE2a173976CA11"},{name:"Godwoken Testnet",chainId:71401,url:"https://gw-explorer.nervosdao.community/address/0xcA11bde05977b3631167028862bE2a173976CA11/contracts"},{name:"Klaytn",chainId:8217,url:"https://scope.klaytn.com/account/0xcA11bde05977b3631167028862bE2a173976CA11"},{name:"Klaytn Testnet (Baobab)",chainId:1001,url:"https://baobab.klaytnscope.com/account/0xca11bde05977b3631167028862be2a173976ca11?tabId=contractCode"},{name:"Milkomeda",chainId:2001,url:"https://explorer-mainnet-cardano-evm.c1.milkomeda.com/address/0xcA11bde05977b3631167028862bE2a173976CA11/contracts"},{name:"KCC",chainId:321,url:"https://explorer.kcc.io/en/address/0xcA11bde05977b3631167028862bE2a173976CA11"},{name:"Velas",chainId:106,url:"https://evmexplorer.velas.com/address/0xcA11bde05977b3631167028862bE2a173976CA11/contracts"},{name:"Telos",chainId:40,url:"https://www.teloscan.io/address/0xcA11bde05977b3631167028862bE2a173976CA11#contract"},{name:"Step Network",chainId:1234,url:"https://stepscan.io/address/0xcA11bde05977b3631167028862bE2a173976CA11/contracts#address-tabs"},{name:"Canto",chainId:7700,url:"https://tuber.build/address/0xcA11bde05977b3631167028862bE2a173976CA11/contracts#address-tabs"},{name:"Canto Testnet",chainId:7701,url:"https://testnet.tuber.build/address/0xcA11bde05977b3631167028862bE2a173976CA11/contracts#address-tabs"},{name:"Iotex",chainId:4689,url:"https://iotexscan.io/address/0xcA11bde05977b3631167028862bE2a173976CA11#transactions"},{name:"Bitgert",chainId:32520,url:"https://brisescan.com/address/0xcA11bde05977b3631167028862bE2a173976CA11/contracts"},{name:"Kava",chainId:2222,url:"https://explorer.kava.io/address/0xcA11bde05977b3631167028862bE2a173976CA11/contracts"},{name:"Mantle Sepolia Testnet",chainId:5003,url:"https://explorer.sepolia.mantle.xyz/address/0xcA11bde05977b3631167028862bE2a173976CA11?tab=contract"},{name:"Mantle Testnet",chainId:5001,url:"https://explorer.testnet.mantle.xyz/address/0xcA11bde05977b3631167028862bE2a173976CA11/contracts#address-tabs"},{name:"Mantle",chainId:5e3,url:"https://explorer.mantle.xyz/address/0xcA11bde05977b3631167028862bE2a173976CA11/contracts#address-tabs"},{name:"Shardeum Sphinx",chainId:8082,url:"https://explorer.testnet.mantle.xyz/address/0xcA11bde05977b3631167028862bE2a173976CA11/contracts#address-tabs"},{name:"Base Testnet (Goerli)",chainId:84531,url:"https://goerli.basescan.org/address/0xca11bde05977b3631167028862be2a173976ca11#code"},{name:"Base Testnet (Sepolia)",chainId:84532,url:"https://base-sepolia.blockscout.com/address/0xcA11bde05977b3631167028862bE2a173976CA11?tab=contract"},{name:"Base",chainId:8453,url:"https://basescan.org/address/0xca11bde05977b3631167028862be2a173976ca11#code"},{name:"Kroma Testnet (Sepolia)",chainId:2358,url:"https://sepolia.kromascan.com/address/0xcA11bde05977b3631167028862bE2a173976CA11#code"},{name:"DeFiChain EVM Mainnet",chainId:1130,url:"https://meta.defiscan.live/address/0xcA11bde05977b3631167028862bE2a173976CA11"},{name:"DeFiChain EVM Testnet",chainId:1131,url:"https://meta.defiscan.live/address/0xcA11bde05977b3631167028862bE2a173976CA11?network=TestNet"},{name:"Defi Oracle Meta Mainnet",chainId:138,url:"https://blockscout.defi-oracle.io/address/0xcA11bde05977b3631167028862bE2a173976CA11"},{name:"DFK Chain Test",chainId:335,url:"https://subnets-test.avax.network/defi-kingdoms/address/0xcA11bde05977b3631167028862bE2a173976CA11"},{name:"DFK Chain",chainId:53935,url:"https://subnets.avax.network/defi-kingdoms/address/0xcA11bde05977b3631167028862bE2a173976CA11"},{name:"Neon EVM DevNet",chainId:245022926,url:"https://devnet.neonscan.org/address/0xcA11bde05977b3631167028862bE2a173976CA11#contract"},{name:"Linea Sepolia Testnet",chainId:59141,url:"https://sepolia.lineascan.build/address/0xca11bde05977b3631167028862be2a173976ca11#code"},{name:"Linea Goerli Testnet",chainId:59140,url:"https://explorer.goerli.linea.build/address/0xcA11bde05977b3631167028862bE2a173976CA11/contracts#address-tabs"},{name:"Linea Mainnet",chainId:59144,url:"https://lineascan.build/address/0xcA11bde05977b3631167028862bE2a173976CA11#code"},{name:"Hashbit",chainId:11119,url:"https://explorer.hashbit.org/address/0xcA11bde05977b3631167028862bE2a173976CA11/contracts#address-tabs"},{name:"Syscoin",chainId:57,url:"https://explorer.syscoin.org/address/0xcA11bde05977b3631167028862bE2a173976CA11/contracts#address-tabs"},{name:"Syscoin Rollux Mainnet",chainId:570,url:"https://explorer.rollux.com/address/0xcA11bde05977b3631167028862bE2a173976CA11/contracts#address-tabs"},{name:"Syscoin Tannebaum Testnet",chainId:5700,url:"https://tanenbaum.io/address/0xcA11bde05977b3631167028862bE2a173976CA11/contracts#address-tabs"},{name:"Syscoin Tannebaum Rollux",chainId:57e3,url:"https://rollux.tanenbaum.io/address/0xcA11bde05977b3631167028862bE2a173976CA11/contracts#address-tabs"},{name:"Pulsechain v4 Testnet",chainId:943,url:"https://scan.v4.testnet.pulsechain.com/address/0xcA11bde05977b3631167028862bE2a173976CA11"},{name:"Pulsechain Mainnet",chainId:369,url:"https://scan.pulsechain.com/address/0xcA11bde05977b3631167028862bE2a173976CA11"},{name:"Zora Goerli Testnet",chainId:999,url:"https://testnet.explorer.zora.co/address/0xcA11bde05977b3631167028862bE2a173976CA11?tab=contract"},{name:"Zora",chainId:7777777,url:"https://explorer.zora.co/address/0xcA11bde05977b3631167028862bE2a173976CA11?tab=contract"},{name:"Zora Sepolia Testnet",chainId:999999999,url:"https://sepolia.explorer.zora.energy/address/0xcA11bde05977b3631167028862bE2a173976CA11?tab=contract"},{name:"Darwinia Crab Network",chainId:44,url:"https://crab.subscan.io/account/0xca11bde05977b3631167028862be2a173976ca11"},{name:"Darwinia Network",chainId:46,url:"https://darwinia.subscan.io/account/0xca11bde05977b3631167028862be2a173976ca11"},{name:"Chain Verse Mainnet",chainId:5555,url:"https://explorer.chainverse.info/address/0xcA11bde05977b3631167028862bE2a173976CA11/contracts#address-tabs"},{name:"Scroll Alpha Testnet",chainId:534353,url:"https://blockscout.scroll.io/address/0xcA11bde05977b3631167028862bE2a173976CA11/contracts#address-tabs"},{name:"Scroll Sepolia Testnet",chainId:534351,url:"https://sepolia.scrollscan.dev/address/0xca11bde05977b3631167028862be2a173976ca11#code"},{name:"Scroll",chainId:534352,url:"https://scrollscan.com/address/0xcA11bde05977b3631167028862bE2a173976CA11"},{name:"Xodex",chainId:2415,url:"https://explorer.xo-dex.com/contracts/0xcA11bde05977b3631167028862bE2a173976CA11"},{name:"EOS EVM Testnet",chainId:15557,url:"https://explorer.testnet.evm.eosnetwork.com/address/0xcA11bde05977b3631167028862bE2a173976CA11/contracts#address-tabs"},{name:"EOS EVM",chainId:17777,url:"https://explorer.evm.eosnetwork.com/address/0xcA11bde05977b3631167028862bE2a173976CA11/contracts#address-tabs"},{name:"Crossbell",chainId:3737,url:"https://scan.crossbell.io/address/0xcA11bde05977b3631167028862bE2a173976CA11/contracts#address-tabs"},{name:"Dogechain",chainId:2e3,url:"https://explorer.dogechain.dog/address/0xcA11bde05977b3631167028862bE2a173976CA11/contracts#address-tabs"},{name:"MEVerse Chain Testnet",chainId:4759,url:"https://testnet.meversescan.io/address/0xcA11bde05977b3631167028862bE2a173976CA11"},{name:"MEVerse Chain Mainnet",chainId:7518,url:"https://meversescan.io/address/0xcA11bde05977b3631167028862bE2a173976CA11"},{name:"SKALE Calypso Testnet",chainId:974399131,url:"https://giant-half-dual-testnet.explorer.testnet.skalenodes.com/address/0xcA11bde05977b3631167028862bE2a173976CA11/contracts"},{name:"SKALE Europa Testnet",chainId:1444673419,url:"https://juicy-low-small-testnet.explorer.testnet.skalenodes.com/address/0xcA11bde05977b3631167028862bE2a173976CA11/contracts"},{name:"SKALE Nebula Testnet",chainId:37084624,url:"https://lanky-ill-funny-testnet.explorer.testnet.skalenodes.com/address/0xcA11bde05977b3631167028862bE2a173976CA11/contracts"},{name:"SKALE Titan Testnet",chainId:1020352220,url:"https://aware-fake-trim-testnet.explorer.testnet.skalenodes.com/address/0xcA11bde05977b3631167028862bE2a173976CA11/contracts"},{name:"SKALE Calypso Hub",chainId:1564830818,url:"https://honorable-steel-rasalhague.explorer.mainnet.skalenodes.com/address/0xcA11bde05977b3631167028862bE2a173976CA11/contracts"},{name:"SKALE Europa Liquidity Hub",chainId:2046399126,url:"https://elated-tan-skat.explorer.mainnet.skalenodes.com/address/0xcA11bde05977b3631167028862bE2a173976CA11/contracts"},{name:"SKALE Nebula Gaming Hub",chainId:1482601649,url:"https://green-giddy-denebola.explorer.mainnet.skalenodes.com/address/0xcA11bde05977b3631167028862bE2a173976CA11/contracts"},{name:"SKALE Titan AI Hub",chainId:1350216234,url:"https://parallel-stormy-spica.explorer.mainnet.skalenodes.com/address/0xcA11bde05977b3631167028862bE2a173976CA11/contracts"},{name:"Ronin Saigon Testnet",chainId:2021,url:"https://saigon-app.roninchain.com/address/ronin:ca11bde05977b3631167028862be2a173976ca11?t=contract"},{name:"Ronin Mainnet",chainId:2020,url:"https://app.roninchain.com/address/ronin:ca11bde05977b3631167028862be2a173976ca11"},{name:"Qitmeer Testnet",chainId:8131,url:"https://testnet-qng.qitmeer.io/address/0xcA11bde05977b3631167028862bE2a173976CA11?tab=contract"},{name:"Qitmeer QNG Mainnet",chainId:813,url:"https://qng.meerscan.io/address/0xcA11bde05977b3631167028862bE2a173976CA11/contracts#address-tabs"},{name:"Q Testnet",chainId:35443,url:"https://explorer.qtestnet.org/address/0xcA11bde05977b3631167028862bE2a173976CA11/contracts#address-tabs"},{name:"Q Devnet",chainId:35442,url:"https://explorer.qdevnet.org/address/0xcA11bde05977b3631167028862bE2a173976CA11/contracts#address-tabs"},{name:"Q Mainnet",chainId:35441,url:"https://explorer.q.org/address/0xcA11bde05977b3631167028862bE2a173976CA11/contracts#address-tabs"},{name:"Neon Mainnet",chainId:245022934,url:"https://neonscan.org/address/0xca11bde05977b3631167028862be2a173976ca11#contract"},{name:"LUKSO Testnet",chainId:4201,url:"https://explorer.execution.testnet.lukso.network/address/0xcA11bde05977b3631167028862bE2a173976CA11/contracts#address-tabs"},{name:"LUKSO Mainnet",chainId:42,url:"https://explorer.execution.mainnet.lukso.network/address/0xcA11bde05977b3631167028862bE2a173976CA11/contracts#address-tabs"},{name:"Edgeware EdgeEVM",chainId:2021,url:"https://edgscan.live/address/0xcA11bde05977b3631167028862bE2a173976CA11/contracts"},{name:"Meter Testnet",chainId:83,url:"https://scan-warringstakes.meter.io/address/0xca11bde05977b3631167028862be2a173976ca11?tab=0&p=1"},{name:"Meter",chainId:82,url:"https://scan.meter.io/address/0xca11bde05977b3631167028862be2a173976ca11?tab=0&p=1"},{name:"Sepolia PGN (Public Goods Network) Testnet",chainId:58008,url:"https://explorer.sepolia.publicgoods.network/address/0xcA11bde05977b3631167028862bE2a173976CA11?tab=contract"},{name:"PGN (Public Goods Network)",chainId:424,url:"https://explorer.publicgoods.network/address/0xcA11bde05977b3631167028862bE2a173976CA11?tab=contract"},{name:"ShimmerEVM",chainId:148,url:"https://explorer.evm.shimmer.network/address/0xcA11bde05977b3631167028862bE2a173976CA11/contracts#address-tabs"},{name:"Highbury EVM",chainId:710,url:"https://explorer.furya.io/address/0xcA11bde05977b3631167028862bE2a173976CA11"},{name:"Arthera Testnet",chainId:10243,url:"https://explorer-test.arthera.net/address/0xcA11bde05977b3631167028862bE2a173976CA11?tab=contract"},{name:"Arthera Mainnet",chainId:10242,url:"https://explorer.arthera.net/address/0xcA11bde05977b3631167028862bE2a173976CA11?tab=contract"},{name:"Manta Pacific Mainnet",chainId:169,url:"https://pacific-explorer.manta.network/address/0xcA11bde05977b3631167028862bE2a173976CA11/contracts#address-tabs"},{name:"Jolnir (Taiko Testnet)",chainId:167007,url:"https://explorer.jolnir.taiko.xyz/address/0xcA11bde05977b3631167028862bE2a173976CA11?tab=contract"},{name:"Katla (Taiko A6 Testnet)",chainId:167008,url:"https://explorer.katla.taiko.xyz/address/0xcA11bde05977b3631167028862bE2a173976CA11?tab=contract"},{name:"Filecoin Mainnet",chainId:314,url:"https://filfox.info/en/address/0xcA11bde05977b3631167028862bE2a173976CA11"},{name:"Filecoin Calibration Testnet",chainId:314159,url:"https://calibration.filscan.io/en/tx/0xdbfa261cd7d17bb40479a0493ad6c0fee435859e37aae73aa7e803f3122cc465/"},{name:"Fusion",chainId:32659,url:"https://fsnscan.com/address/0xcA11bde05977b3631167028862bE2a173976CA11#contract"},{name:"Fusion Testnet",chainId:46688,url:"https://testnet.fsnscan.com/address/0xcA11bde05977b3631167028862bE2a173976CA11#contract"},{name:"Xai Testnet",chainId:47279324479,url:"https://testnet-explorer.xai-chain.net/address/0xcA11bde05977b3631167028862bE2a173976CA11/contracts#address-tabs"},{name:"JFIN Chain",chainId:3501,url:"https://jfinscan.com/address/0xcA11bde05977b3631167028862bE2a173976CA11?tab=contract"},{name:"JFIN Chain Testnet",chainId:3502,url:"https://testnet.jfinscan.com/address/0xcA11bde05977b3631167028862bE2a173976CA11?tab=contract"},{name:"Chiliz Chain",chainId:88888,url:"https://scan.chiliz.com/address/0xcA11bde05977b3631167028862bE2a173976CA11/contracts#address-tabs"},{name:"Chiliz Spicy Testnet",chainId:88882,url:"https://testnet.chiliscan.com/address/0xcA11bde05977b3631167028862bE2a173976CA11/contract/88882/code"},{name:"CORE",chainId:1116,url:"https://scan.coredao.org/address/0xcA11bde05977b3631167028862bE2a173976CA11#code"},{name:"Core Testnet",chainId:1115,url:"https://scan.test.btcs.network/address/0xcA11bde05977b3631167028862bE2a173976CA11"},{name:"Ethereum Classic",chainId:61,url:"https://etc.blockscout.com/address/0xcA11bde05977b3631167028862bE2a173976CA11"},{name:"Frame Testnet",chainId:68840142,url:"https://explorer.testnet.frame.xyz/address/0xcA11bde05977b3631167028862bE2a173976CA11"},{name:"Etherlink Mainnet",chainId:42793,url:"https://explorer.etherlink.com/address/0xcA11bde05977b3631167028862bE2a173976CA11"},{name:"Etherlink Testnet",chainId:128123,url:"https://testnet-explorer.etherlink.com/address/0xcA11bde05977b3631167028862bE2a173976CA11"},{name:"ZetaChain Athens 3 Testnet",chainId:7001,url:"https://explorer.zetachain.com/address/0xca11bde05977b3631167028862be2a173976ca11"},{name:"ZetaChain ",chainId:7e3,url:"https://explorer.zetachain.com/address/0xcA11bde05977b3631167028862bE2a173976CA11"},{name:"X1 Testnet",chainId:195,url:"https://www.oklink.com/x1-test/address/0xca11bde05977b3631167028862be2a173976ca11/contract"},{name:"Lumiterra Layer3",chainId:94168,url:"https://scan.layerlumi.com/address/0xcA11bde05977b3631167028862bE2a173976CA11"},{name:"BitTorrent Chain Mainnet",chainId:199,url:"https://bttcscan.com/address/0xca11bde05977b3631167028862be2a173976ca11#code"},{name:"BTT Chain Testnet",chainId:1029,url:"https://testnet.bttcscan.com/address/0xca11bde05977b3631167028862be2a173976ca11"},{name:"Callisto Mainnet",chainId:820,url:"https://explorer.callisto.network/address/0xcA11bde05977b3631167028862bE2a173976CA11/transactions"},{name:"Areon Network Testnet",chainId:462,url:"https://areonscan.com/contracts/0xca11bde05977b3631167028862be2a173976ca11?page=0"},{name:"Areon Network Mainnet",chainId:463,url:"https://areonscan.com/contracts/0xca11bde05977b3631167028862be2a173976ca11"},{name:"zkFair Mainnet",chainId:42766,url:"https://scan.zkfair.io/address/0xcA11bde05977b3631167028862bE2a173976CA11/contracts#address-tabs"},{name:"Mode Mainnet",chainId:34443,url:"https://explorer.mode.network/address/0xcA11bde05977b3631167028862bE2a173976CA11?tab=contract"},{name:"Blast Sepolia",chainId:168587773,url:"https://testnet.blastscan.io/address/0xcA11bde05977b3631167028862bE2a173976CA11/contract/168587773/code"},{name:"Blast",chainId:81457,url:"https://blastscan.io/address/0xcA11bde05977b3631167028862bE2a173976CA11#code"},{name:"Xai",chainId:660279,url:"https://explorer.xai-chain.net/address/0xcA11bde05977b3631167028862bE2a173976CA11/contracts#address-tabs"},{name:"DOS Chain",chainId:7979,url:"https://doscan.io/address/0xcA11bde05977b3631167028862bE2a173976CA11"},{name:"DOS Chain Testnet",chainId:3939,url:"https://test.doscan.io/address/0xcA11bde05977b3631167028862bE2a173976CA11?tab=contract"},{name:"Tron",chainId:728126428,url:"https://tronscan.org/#/contract/TEazPvZwDjDtFeJupyo7QunvnrnUjPH8ED/code",address:"TEazPvZwDjDtFeJupyo7QunvnrnUjPH8ED"},{name:"zkSync Era",chainId:324,url:"https://explorer.zksync.io/address/0xF9cda624FBC7e059355ce98a31693d299FACd963#contract",address:"0xF9cda624FBC7e059355ce98a31693d299FACd963"},{name:"zkSync Era Goerli Testnet",chainId:280,url:"https://goerli.explorer.zksync.io/address/0xF9cda624FBC7e059355ce98a31693d299FACd963#contract",address:"0xF9cda624FBC7e059355ce98a31693d299FACd963"},{name:"zkSync Era Sepolia Testnet",chainId:300,url:"https://sepolia.explorer.zksync.io/address/0xF9cda624FBC7e059355ce98a31693d299FACd963#contract",address:"0xF9cda624FBC7e059355ce98a31693d299FACd963"},{name:"PlayFi Albireo Testnet",chainId:1612127,url:"https://albireo-explorer.playfi.ai/address/0xF9cda624FBC7e059355ce98a31693d299FACd963#contract",address:"0xF9cda624FBC7e059355ce98a31693d299FACd963"},{name:"Fraxtal Mainnet",chainId:252,url:"https://fraxscan.com/address/0xcA11bde05977b3631167028862bE2a173976CA11#code"},{name:"Fraxtal Holesky Testnet",chainId:2522,url:"https://holesky.fraxscan.com/address/0xcA11bde05977b3631167028862bE2a173976CA11#code"},{name:"Omax Mainnet",chainId:311,url:"https://omaxray.com/address/0xcA11bde05977b3631167028862bE2a173976CA11"},{name:"Syndicate Frame Chain",chainId:5101,url:"https://explorer-frame.syndicate.io/address/0xcA11bde05977b3631167028862bE2a173976CA11?tab=contract"},{name:"Dela Sepolia",chainId:9393,url:"https://sepolia-delascan.deperp.com/address/0xcA11bde05977b3631167028862bE2a173976CA11?tab=contract"},{name:"NeoX Testnet",chainId:12227330,url:"https://xt2scan.ngd.network/address/0xcA11bde05977b3631167028862bE2a173976CA11?tab=contract"},{name:"Sanko Testnet",chainId:1992,url:"https://testnet.sankoscan.io/address/0xcA11bde05977b3631167028862bE2a173976CA11?tab=contract"},{name:"Berachain Testnet (Artio)",chainId:80085,url:"https://artio.beratrail.io/address/0xcA11bde05977b3631167028862bE2a173976CA11"},{name:"Shibarium",chainId:109,url:"https://www.shibariumscan.io/address/0xcA11bde05977b3631167028862bE2a173976CA11?tab=contract"},{name:"Immutable zkEVM Mainnet",chainId:13371,url:"https://explorer.immutable.com/address/0xcA11bde05977b3631167028862bE2a173976CA11?tab=contract"},{name:"Immutable zkEVM Testnet",chainId:13473,url:"https://explorer.testnet.immutable.com/address/0xcA11bde05977b3631167028862bE2a173976CA11"},{name:"RSS3 VSL Mainnet",chainId:12553,url:"https://scan.rss3.io/address/0xcA11bde05977b3631167028862bE2a173976CA11"},{name:"RSS3 VSL Sepolia Testnet",chainId:2331,url:"https://scan.testnet.rss3.io/address/0xcA11bde05977b3631167028862bE2a173976CA11"},{name:"Morph Sepolia Testnet",chainId:2710,url:"https://explorer-testnet.morphl2.io/address/0xcA11bde05977b3631167028862bE2a173976CA11?tab=contract"},{name:"JIBCHAIN L1",chainId:8899,url:"https://exp-l1.jibchain.net/address/0xcA11bde05977b3631167028862bE2a173976CA11?tab=contract"},{name:"Haqq Mainnet",chainId:11235,url:"https://explorer.haqq.network/address/0xcA11bde05977b3631167028862bE2a173976CA11?tab=contract"},{name:"Zircuit Sepolia Testnet",chainId:48899,url:"https://explorer.zircuit.com/address/0xcA11bde05977b3631167028862bE2a173976CA11?activeTab=3"},{name:"re.al",chainId:111188,url:"https://explorer.re.al/address/0xcA11bde05977b3631167028862bE2a173976CA11?tab=contract"},{name:"Merlin Testnet",chainId:686868,url:"https://testnet-scan.merlinchain.io/address/0xcA11bde05977b3631167028862bE2a173976CA11"},{name:"IOTA EVM",chainId:8822,url:"https://iota-evm.blockscout.com/address/0xcA11bde05977b3631167028862bE2a173976CA11?tab=contract"},{name:"Planq",chainId:7070,url:"https://evm.planq.network/address/0xcA11bde05977b3631167028862bE2a173976CA11"},{name:"Cyber Testnet",chainId:111557560,url:"https://testnet.cyberscan.co/address/0xcA11bde05977b3631167028862bE2a173976CA11?tab=contract"},{name:"Unit Zero Stagenet",chainId:88819,url:"https://explorer-stagenet.unit0.dev/address/0xcA11bde05977b3631167028862bE2a173976CA11"},{name:"Unit Zero Testnet",chainId:88817,url:"https://explorer-testnet.unit0.dev/address/0xcA11bde05977b3631167028862bE2a173976CA11"},{name:"Sei EVM Devnet",chainId:713715,url:"https://seitrace.com/address/0xcA11bde05977b3631167028862bE2a173976CA11?tab=contract"},{name:"Sei EVM Mainnet",chainId:1329,url:"https://seitrace.com/address/0xcA11bde05977b3631167028862bE2a173976CA11?chain=pacific-1&tab=contract"},{name:"Hekla (Taiko A7 Testnet)",chainId:167009,url:"https://explorer.hekla.taiko.xyz/address/0xcA11bde05977b3631167028862bE2a173976CA11?tab=contract"},{name:"Taiko Mainnet",chainId:167e3,url:"https://taikoscan.io/address/0xca11bde05977b3631167028862be2a173976ca11#code"},{name:"Cyber Mainnet",chainId:7560,url:"https://cyberscan.co/address/0xcA11bde05977b3631167028862bE2a173976CA11?tab=contract"},{name:"DreyerX Mainnet",chainId:23451,url:"https://scan.dreyerx.com/address/0xcA11bde05977b3631167028862bE2a173976CA11?tab=contract"},{name:"Sahara Testnet",chainId:313313,url:"https://explorer.saharaa.info/address/0xcA11bde05977b3631167028862bE2a173976CA11?tab=contract"},{name:"BOX Chain",chainId:42299,url:"https://explorerl2new-boxchain-t4zoh9y5dr.t.conduit.xyz/address/0xcA11bde05977b3631167028862bE2a173976CA11?tab=contract"},{name:"OX Chain",chainId:6699,url:"https://explorer-ox-chain-2s86s7wp21.t.conduit.xyz/address/0xcA11bde05977b3631167028862bE2a173976CA11?tab=contract"},{name:"Conflux Espace",chainId:1030,url:"https://evm.confluxscan.net/address/0xca11bde05977b3631167028862be2a173976ca11?tab=contract-viewer"},{name:"BEVM Testnet",chainId:11503,url:"https://scan-testnet.bevm.io/address/0xcA11bde05977b3631167028862bE2a173976CA11?tab=contract"},{name:"Aura Mainnet",chainId:6322,url:"https://aurascan.io/evm-contracts/0xca11bde05977b3631167028862be2a173976ca11"},{name:"Superposition Testnet",chainId:98985,url:"https://testnet-explorer.superposition.so/address/0xcA11bde05977b3631167028862bE2a173976CA11"}],xpe=Object.fromEntries(Cpe.map(r=>{let e=r.url.indexOf("0x"),t=e>-1?r.url.slice(e,e+42):"0x"+r.url.slice(-40);return[r.chainId.toString(),t]})),T6=new Ds(Tpe);function C6(r){return T6.encodeFunctionData("aggregate",[r])}function x6(r){return T6.decodeFunctionResult("aggregate",r).toObject()}function O6(r){return xpe[r]}import("node:process").then(r=>r.stdout.write(""));var{process_binding_count:Ope,process_binding_time:Ipe,process_binding_error:Ppe}=uo;BigInt.prototype.toJSON=function(){return this.toString()};var I6=class{started=!1;unhandled;loader;shutdownHandler;enablePreprocess;preparedData;enablePartition;constructor(e,t,n){this.loader=e,this.shutdownHandler=n,this.enablePreprocess=process.env.ENABLE_PREPROCESS?process.env.ENABLE_PREPROCESS.toLowerCase()=="true":!1,this.enablePartition=t?.["enable-partition"]==!0}async getConfig(e,t){if(!this.started)throw new Dt.ServerError(Dt.Status.UNAVAILABLE,"Service Not started.");let n=kS.fromPartial({});return await yi.INSTANCE.configure(n),n}async start(e,t){if(this.started)return{};fR();try{await this.loader()}catch(n){throw new Dt.ServerError(Dt.Status.INVALID_ARGUMENT,"Failed to load processor: "+hl(n))}return await yi.INSTANCE.start(e),this.started=!0,{}}async stop(e,t){return console.log("Server Shutting down in 5 seconds"),this.shutdownHandler&&setTimeout(this.shutdownHandler,5e3),{}}async processBindings(e,t){let n=this.enablePreprocess?await this.preprocessBindings(e.bindings,{},void 0,t):{ethCallResults:{}},i=[];for(let a of e.bindings){let c=this.processBinding(a,n);ja.execution.sequential&&await c,i.push(c)}let s;try{s=await Promise.all(i),uo.process_binding_count.add(e.bindings.length)}catch(a){throw uo.process_binding_error.add(e.bindings.length),a}return{result:NS(s)}}async preprocessBindings(e,t,n,i){let s=[];for(let g of e)s.push(this.preprocessBinding(g,t,n,i));let o;try{o=await Promise.all(s)}catch(g){throw g}let a=new Map,c=new Map;for(let g of o)for(let p of g.ethCallParams){let{chainId:b,blockTag:y}=p.context;c.has(b)||c.set(b,g6(b));let A=[b,y].join("|");a.has(A)||a.set(A,[]),a.get(A).push(p)}let l=Date.now(),u=1,d=[],f=[];for(let g of a.values()){let{chainId:p,blockTag:b}=g[0].context,y=O6(p);if(g.length<=u||!y){for(let E of g)d.push(c.get(p).call({to:E.context.address,data:E.calldata,blockTag:b}).then(C=>[By(E),C]));continue}let A=128;for(let E=0;E<g.length;E+=A){let C=g.slice(E,E+A),k=C.map(D=>({target:D.context.address,callData:D.calldata})),I=C6(k);f.push(c.get(p).call({to:y,data:I,blockTag:b}).then(D=>{let j=x6(D).returnData;if(j.length!=C.length)throw new Error(`multicall result length mismatch, params: ${C.length}, result: ${j.length}`);let L=[];for(let q=0;q<C.length;q++)L.push([By(C[q]),j[q]]);return L}))}}let h={};try{h=Object.fromEntries(await Promise.all(d));for(let g of await Promise.all(f))h={...h,...Object.fromEntries(g)}}catch(g){console.error(`eth call error: ${g}`)}return{ethCallResults:h}}async preprocessBinding(e,t,n,i){if(!this.started)throw new Dt.ServerError(Dt.Status.UNAVAILABLE,"Service Not started.");if(this.unhandled)throw new ul.RichServerError(Dt.Status.UNAVAILABLE,"Unhandled exception/rejection in previous request: "+hl(this.unhandled),[ul.DebugInfo.fromPartial({detail:this.unhandled.message,stackEntries:this.unhandled.stack?.split(`
33
33
  `)})]);return await yi.INSTANCE.preprocessBinding(e,t,n)}async processBinding(e,t,n){if(!this.started)throw new Dt.ServerError(Dt.Status.UNAVAILABLE,"Service Not started.");if(this.unhandled)throw new ul.RichServerError(Dt.Status.UNAVAILABLE,"Unhandled exception/rejection in previous request: "+hl(this.unhandled),[ul.DebugInfo.fromPartial({detail:this.unhandled.message,stackEntries:this.unhandled.stack?.split(`
@@ -114,4 +114,4 @@ long/umd/index.js:
114
114
  @noble/curves/esm/secp256k1.js:
115
115
  (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)
116
116
  */
117
- //# sourceMappingURL=chunk-X4FFDWU5.js.map
117
+ //# sourceMappingURL=chunk-PEHR2WT4.js.map