1var t,e,ABCSTREAM;t=self;e=function(){return(()=>{function y(n,t){let i="";return nt(n)?(i=`Binary data of length ${n.byteLength}`,t&&(i+=`. Content: '${function(n){const i=new Uint8Array(n);let t="";return i.forEach(n=>{t+=`0x${n<16?"0":""}${n.toString(16)} `}),t.substr(0,t.length-1)}(n)}'`)):"string"==typeof n&&(i=`String data of length ${n.length}`,t&&(i+=`. Content: '${n}'`)),i}function nt(n){return n&&"undefined"!=typeof ArrayBuffer&&(n instanceof ArrayBuffer||n.constructor&&"ArrayBuffer"===n.constructor.name)}async function rt(t,i,r,u,f,e,o){let s={};if(f){const n=await f();n&&(s={Authorization:`Bearer ${n}`})}const[h,c]=v();s[h]=c;t.log(n.Trace,`(${i} transport) sending data. ${y(e,o.logMessageContent)}.`);const l=nt(e)?"arraybuffer":"text",a=await r.post(u,{content:e,headers:{...s,...o.headers},responseType:l,timeout:o.timeout,withCredentials:o.withCredentials});t.log(n.Trace,`(${i} transport) request complete. Response status: ${a.statusCode}.`)}function v(){let n="X-SignalR-User-Agent";return f.isNode&&(n="User-Agent"),[n,kt(it,dt(),f.isNode?"NodeJS":"Browser",gt())]}function kt(n,t,i,r){let u="Microsoft SignalR/";const f=n.split(".");return u+=`${f[0]}.${f[1]}`,u+=` (${n}; `,u+=t&&""!==t?`${t}; `:"Unknown OS; ",u+=`${i}`,u+=r?`; ${r}`:"; Unknown Runtime Version",u+=")",u}function dt(){if(!f.isNode)return"";switch(process.platform){case"win32":return"Windows NT";case"darwin":return"macOS";case"linux":return"Linux";default:return process.platform}}function gt(){if(f.isNode)return process.versions.node}function ut(n){return n.stack?n.stack:n.message?n.message:`${n}`}function ft(n,t){let i;switch(t){case"arraybuffer":i=n.arrayBuffer();break;case"text":i=n.text();break;case"blob":case"document":case"json":throw new Error(`${t} is not supported.`);default:i=n.text()}return i}var s={d:(n,t)=>{for(var i in t)s.o(t,i)&&!s.o(n,i)&&Object.defineProperty(n,i,{enumerable:!0,get:t[i]})}},n,p,t,i,r,e;s.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(n){if("object"==typeof window)return window}}();s.o=(n,t)=>Object.prototype.hasOwnProperty.call(n,t);s.r=n=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"t",{value:!0})};p={};s.r(p);s.d(p,{AbortError:()=>l,DefaultHttpClient:()=>et,HttpClient:()=>b,HttpError:()=>h,HttpResponse:()=>g,HttpTransportType:()=>r,HubConnection:()=>tt,HubConnectionBuilder:()=>hi,HubConnectionState:()=>i,JsonHubProtocol:()=>lt,LogLevel:()=>n,MessageType:()=>t,NullLogger:()=>a,Subject:()=>ot,TimeoutError:()=>w,TransferFormat:()=>e,VERSION:()=>it});
1class h extends Error{constructor(n,t){const i=new.target.prototype;super(`${n}: Status code '${t}'`);this.statusCode=t;this.__proto__=i}}class w extends Error{constructor(n="A timeout occurred."){const t=new.target.prototype;super(n);this.__proto__=t}}class l extends Error{constructor(n="An abort occurred."){const t=new.target.prototype;super(n);this.__proto__=t}}class at extends Error{constructor(n,t){const i=new.target.prototype;super(n);this.transport=t;this.errorType="UnsupportedTransportError";this.__proto__=i}}class vt extends Error{constructor(n,t){const i=new.target.prototype;super(n);this.transport=t;this.errorType="DisabledTransportError";this.__proto__=i}}class yt extends Error{constructor(n,t){const i=new.target.prototype;super(n);this.transport=t;this.errorType="FailedToStartTransportError";this.__proto__=i}}class pt extends Error{constructor(n){const t=new.target.prototype;super(n);this.errorType="FailedToNegotiateWithServerError";this.__proto__=t}}class wt extends Error{constructor(n,t){const i=new.target.prototype;super(n);this.innerErrors=t;this.__proto__=i}}class g{constructor(n,t,i){this.statusCode=n;this.statusText=t;this.content=i}}class b{get(n,t){return this.send({...t,method:"GET",url:n})}post(n,t){return this.send({...t,method:"POST",url:n})}delete(n,t){return this.send({...t,method:"DELETE",url:n})}getCookieString(){return""}}!function(n){n[n.Trace=0]="Trace";n[n.Debug=1]="Debug";n[n.Information=2]="Information";n[n.Warning=3]="Warning";n[n.Error=4]="Error";n[n.Critical=5]="Critical";n[n.None=6]="None"}(n||(n={}));class a{constructor(){}log(){}}a.instance=new a;const it="6.0.0";class u{static isRequired(n,t){if(null==n)throw new Error(`The '${t}' argument is required.`);}static isNotEmpty(n,t){if(!n||n.match(/^\s*$/))throw new Error(`The '${t}' argument should not be empty.`);}static isIn(n,t,i){if(!(n in t))throw new Error(`Unknown ${i} value: ${n}.`);}}class f{static get isBrowser(){return"object"==typeof window}static get isWebWorker(){return"object"==typeof self&&"importScripts"in self}static get isNode(){return!this.isBrowser&&!this.isWebWorker}}class bt{constructor(n,t){this.i=n;this.h=t}dispose(){const n=this.i.observers.indexOf(this.h);n>-1&&this.i.observers.splice(n,1);0===this.i.observers.length&&this.i.cancelCallback&&this.i.cancelCallback().catch(()=>{})}}class k{constructor(n){this.l=n;this.out=console}log(t,i){if(t>=this.l){const r=`[${(new Date).toISOString()}] ${n[t]}: ${i}`;switch(t){case n.Critical:case n.Error:this.out.error(r);break;case n.Warning:this.out.warn(r);break;case n.Information:this.out.info(r);break;default:this.out.log(r)}}}}class ni extends b{constructor(n){if(super(),this.u=n,"undefined"==typeof fetch){const n=require;this.p=new(n("tough-cookie").CookieJar);this.m=n("node-fetch");this.m=n("fetch-cookie")(this.m,this.p)}else this.m=fetch.bind(function(){if("undefined"!=typeof globalThis)return globalThis;if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==s.g)return s.g;throw new Error("could not find global");}());if("undefined"==typeof AbortController){const n=require;this.v=n("abort-controller")}else this.v=AbortController}async send(t){if(t.abortSignal&&t.abortSignal.aborted)throw new l;if(!t.method)throw new Error("No method defined.");if(!t.url)throw new Error("No url defined.");const u=new this.v;let r;t.abortSignal&&(t.abortSignal.onabort=()=>{u.abort(),r=new l});let i,f=null;if(t.timeout){const i=t.timeout;f=setTimeout(()=>{u.abort(),this.u.log(n.Warning,"Timeout from HTTP request."),r=new w},i)}try{i=await this.m(t.url,{body:t.content,cache:"no-cache",credentials:!0===t.withCredentials?"include":"same-origin",headers:{"Content-Type":"text/plain;charset=UTF-8","X-Requested-With":"XMLHttpRequest",...t.headers},method:t.method,mode:"cors",redirect:"follow",signal:u.signal})}catch(t){if(r)throw r;throw this.u.log(n.Warning,`Error from HTTP request. ${t}.`),t;}finally{f&&clearTimeout(f);t.abortSignal&&(t.abortSignal.onabort=null)}if(!i.ok){const n=await ft(i,"text");throw new h(n||i.statusText,i.status);}const e=ft(i,t.responseType),o=await e;return new g(i.status,i.statusText,o)}getCookieString(n){let t="";return f.isNode&&this.p&&this.p.getCookies(n,(n,i)=>t=i.join("; ")),t}}class ti extends b{constructor(n){super();this.u=n}send(t){return t.abortSignal&&t.abortSignal.aborted?Promise.reject(new l):t.method?t.url?new Promise((i,r)=>{const u=new XMLHttpRequest;u.open(t.method,t.url,!0);u.withCredentials=void 0===t.withCredentials||t.withCredentials;u.setRequestHeader("X-Requested-With","XMLHttpRequest");u.setRequestHeader("Content-Type","text/plain;charset=UTF-8");const f=t.headers;f&&Object.keys(f).forEach(n=>{u.setRequestHeader(n,f[n])});t.responseType&&(u.responseType=t.responseType);t.abortSignal&&(t.abortSignal.onabort=()=>{u.abort(),r(new l)});t.timeout&&(u.timeout=t.timeout);u.onload=()=>{t.abortSignal&&(t.abortSignal.onabort=null),u.status>=200&&u.status<300?i(new g(u.status,u.statusText,u.response||u.responseText)):r(new h(u.response||u.responseText||u.statusText,u.status))};u.onerror=()=>{this.u.log(n.Warning,`Error from HTTP request. ${u.status}: ${u.statusText}.`),r(new h(u.statusText,u.status))};u.ontimeout=()=>{this.u.log(n.Warning,"Timeout from HTTP request."),r(new w)};u.send(t.content||"")}):Promise.reject(new Error("No url defined.")):Promise.reject(new Error("No method defined."))}}class et extends b{constructor(n){if(super(),"undefined"!=typeof fetch||f.isNode)this.$=new ni(n);else{if("undefined"==typeof XMLHttpRequest)throw new Error("No usable HttpClient found.");this.$=new ti(n)}}send(n){return n.abortSignal&&n.abortSignal.aborted?Promise.reject(new l):n.method?n.url?this.$.send(n):Promise.reject(new Error("No url defined.")):Promise.reject(new Error("No method defined."))}getCookieString(n){return this.$.getCookieString(n)}}class o{static write(n){return`${n}${o.RecordSeparator}`}static parse(n){if(n[n.length-1]!==o.RecordSeparator)throw new Error("Message is incomplete.");const t=n.split(o.RecordSeparator);return t.pop(),t}}o.RecordSeparatorCode=30;o.RecordSeparator=String.fromCharCode(o.RecordSeparatorCode);
1class ii{writeHandshakeRequest(n){return o.write(JSON.stringify(n))}parseHandshakeResponse(n){let t,i;if(nt(n)){const r=new Uint8Array(n),f=r.indexOf(o.RecordSeparatorCode);if(-1===f)throw new Error("Message is incomplete.");const u=f+1;t=String.fromCharCode.apply(null,Array.prototype.slice.call(r.slice(0,u)));i=r.byteLength>u?r.slice(u).buffer:null}else{const r=n,f=r.indexOf(o.RecordSeparator);if(-1===f)throw new Error("Message is incomplete.");const u=f+1;t=r.substring(0,u);i=r.length>u?r.substring(u):null}const u=o.parse(t),r=JSON.parse(u[0]);if(r.type)throw new Error("Expected a handshake response from the server.");return[i,r]}}!function(n){n[n.Invocation=1]="Invocation";n[n.StreamItem=2]="StreamItem";n[n.Completion=3]="Completion";n[n.StreamInvocation=4]="StreamInvocation";n[n.CancelInvocation=5]="CancelInvocation";n[n.Ping=6]="Ping";n[n.Close=7]="Close"}(t||(t={}));class ot{constructor(){this.observers=[]}next(n){for(const t of this.observers)t.next(n)}error(n){for(const t of this.observers)t.error&&t.error(n)}complete(){for(const n of this.observers)n.complete&&n.complete()}subscribe(n){return this.observers.push(n),new bt(this,n)}}!function(n){n.Disconnected="Disconnected";n.Connecting="Connecting";n.Connected="Connected";n.Disconnecting="Disconnecting";n.Reconnecting="Reconnecting"}(i||(i={}));class tt{constructor(r,f,e,o){this.C=0;this.S=()=>{this.u.log(n.Warning,"The page is being frozen, this will likely lead to the connection being closed and messages being lost. For more information see the docs at https://docs.microsoft.com/aspnet/core/signalr/javascript-client#bsleep")};u.isRequired(r,"connection");u.isRequired(f,"logger");u.isRequired(e,"protocol");this.serverTimeoutInMilliseconds=3e4;this.keepAliveIntervalInMilliseconds=15e3;this.u=f;this.k=e;this.connection=r;this.P=o;this.T=new ii;this.connection.onreceive=n=>this.I(n);this.connection.onclose=n=>this._(n);this.H={};this.D={};this.A=[];this.R=[];this.U=[];this.L=0;this.N=!1;this.q=i.Disconnected;this.M=!1;this.W=this.k.writeMessage({type:t.Ping})}static create(n,t,i,r){return new tt(n,t,i,r)}get state(){return this.q}get connectionId(){return this.connection&&this.connection.connectionId||null}get baseUrl(){return this.connection.baseUrl||""}set baseUrl(n){if(this.q!==i.Disconnected&&this.q!==i.Reconnecting)throw new Error("The HubConnection must be in the Disconnected or Reconnecting state to change the url.");if(!n)throw new Error("The HubConnection url must be a valid url.");this.connection.baseUrl=n}start(){return this.O=this.j(),this.O}async j(){if(this.q!==i.Disconnected)return Promise.reject(new Error("Cannot start a HubConnection that is not in the 'Disconnected' state."));this.q=i.Connecting;this.u.log(n.Debug,"Starting HubConnection.");try{await this.F();f.isBrowser&&document&&document.addEventListener("freeze",this.S);this.q=i.Connected;this.M=!0;this.u.log(n.Debug,"HubConnection connected successfully.")}catch(t){return this.q=i.Disconnected,this.u.log(n.Debug,`HubConnection failed to start successfully because of error '${t}'.`),Promise.reject(t)}}async F(){this.B=void 0;this.N=!1;const t=new Promise((n,t)=>{this.X=n,this.J=t});await this.connection.start(this.k.transferFormat);try{const i={protocol:this.k.name,version:this.k.version};if(this.u.log(n.Debug,"Sending handshake request."),await this.V(this.T.writeHandshakeRequest(i)),this.u.log(n.Information,`Using HubProtocol '${this.k.name}'.`),this.G(),this.K(),this.Y(),await t,this.B)throw this.B;}catch(t){throw this.u.log(n.Debug,`Hub handshake failed with error '${t}' during start(). Stopping HubConnection.`),this.G(),this.Z(),await this.connection.stop(t),t;}}async stop(){const n=this.O;this.tt=this.et();await this.tt;try{await n}catch(n){}}et(t){return this.q===i.Disconnected?(this.u.log(n.Debug,`Call to HubConnection.stop(${t}) ignored because it is already in the disconnected state.`),Promise.resolve()):this.q===i.Disconnecting?(this.u.log(n.Debug,`Call to HttpConnection.stop(${t}) ignored because the connection is already in the disconnecting state.`),this.tt):(this.q=i.Disconnecting,this.u.log(n.Debug,"Stopping HubConnection."),this.st?(this.u.log(n.Debug,"Connection stopped during reconnect delay. Done reconnecting."),clearTimeout(this.st),this.st=void 0,this.nt(),Promise.resolve()):(this.G(),this.Z(),this.B=t||new Error("The connection was stopped before the hub handshake could complete."),this.connection.stop(t)))}stream(n,...i){const[e,o]=this.it(i),u=this.rt(n,i,o);let f;const r=new ot;return r.cancelCallback=()=>{const n=this.ot(u.invocationId);return delete this.H[u.invocationId],f.then(()=>this.ht(n))},this.H[u.invocationId]=(n,i)=>{i?r.error(i):n&&(n.type===t.Completion?n.error?r.error(new Error(n.error)):r.complete():r.next(n.item))},f=this.ht(u).catch(n=>{r.error(n),delete this.H[u.invocationId]}),this.ct(e,f),r}V(n){return this.Y(),this.connection.send(n)}ht(n){return this.V(this.k.writeMessage(n))}send(n,...t){const[r,u]=this.it(t),i=this.ht(this.at(n,t,!0,u));return this.ct(r,i),i}invoke(n,...i){const[u,f]=this.it(i),r=this.at(n,i,!1,f);return new Promise((n,i)=>{this.H[r.invocationId]=(r,u)=>{u?i(u):r&&(r.type===t.Completion?r.error?i(new Error(r.error)):n(r.result):i(new Error(`Unexpected message type: ${r.type}`)))};
1const f=this.ht(r).catch(n=>{i(n),delete this.H[r.invocationId]});this.ct(u,f)})}on(n,t){n&&t&&(n=n.toLowerCase(),this.D[n]||(this.D[n]=[]),-1===this.D[n].indexOf(t)&&this.D[n].push(t))}off(n,t){if(n){n=n.toLowerCase();const i=this.D[n];if(i)if(t){const r=i.indexOf(t);-1!==r&&(i.splice(r,1),0===i.length&&delete this.D[n])}else delete this.D[n]}}onclose(n){n&&this.A.push(n)}onreconnecting(n){n&&this.R.push(n)}onreconnected(n){n&&this.U.push(n)}I(i){if(this.G(),this.N||(i=this.lt(i),this.N=!0),i){const r=this.k.parseMessages(i,this.u);for(const i of r)switch(i.type){case t.Invocation:this.ut(i);break;case t.StreamItem:case t.Completion:{const r=this.H[i.invocationId];if(r){i.type===t.Completion&&delete this.H[i.invocationId];try{r(i)}catch(u){this.u.log(n.Error,`Stream callback threw error: ${ut(u)}`)}}break}case t.Ping:break;case t.Close:{this.u.log(n.Information,"Close message received from server.");const t=i.error?new Error("Server returned an error on close: "+i.error):void 0;!0===i.allowReconnect?this.connection.stop(t):this.tt=this.et(t);break}default:this.u.log(n.Warning,`Invalid message type: ${i.type}.`)}}this.K()}lt(t){let i,r;try{[r,i]=this.T.parseHandshakeResponse(t)}catch(t){const i="Error parsing handshake response: "+t;this.u.log(n.Error,i);const r=new Error(i);throw this.J(r),r;}if(i.error){const t="Server returned handshake error: "+i.error;this.u.log(n.Error,t);const r=new Error(t);throw this.J(r),r;}return this.u.log(n.Debug,"Server handshake complete."),this.X(),r}Y(){this.connection.features.inherentKeepAlive||(this.C=(new Date).getTime()+this.keepAliveIntervalInMilliseconds,this.Z())}K(){if(!(this.connection.features&&this.connection.features.inherentKeepAlive||(this.dt=setTimeout(()=>this.serverTimeout(),this.serverTimeoutInMilliseconds),void 0!==this.ft))){let n=this.C-(new Date).getTime();n<0&&(n=0);this.ft=setTimeout(async()=>{if(this.q===i.Connected)try{await this.V(this.W)}catch{this.Z()}},n)}}serverTimeout(){this.connection.stop(new Error("Server timeout elapsed without receiving a message from the server."))}ut(t){const i=this.D[t.target.toLowerCase()];if(i){try{i.forEach(n=>n.apply(this,t.arguments))}catch(i){this.u.log(n.Error,`A callback for the method ${t.target.toLowerCase()} threw error '${i}'.`)}if(t.invocationId){const t="Server requested a response, which is not supported in this version of the client.";this.u.log(n.Error,t);this.tt=this.et(new Error(t))}}else this.u.log(n.Warning,`No client method with the name '${t.target}' found.`)}_(t){this.u.log(n.Debug,`HubConnection.connectionClosed(${t}) called while in state ${this.q}.`);this.B=this.B||t||new Error("The underlying connection was closed before the hub handshake could complete.");this.X&&this.X();this.wt(t||new Error("Invocation canceled due to the underlying connection being closed."));this.G();this.Z();this.q===i.Disconnecting?this.nt(t):this.q===i.Connected&&this.P?this.gt(t):this.q===i.Connected&&this.nt(t)}nt(t){if(this.M){this.q=i.Disconnected;this.M=!1;f.isBrowser&&document&&document.removeEventListener("freeze",this.S);try{this.A.forEach(n=>n.apply(this,[t]))}catch(r){this.u.log(n.Error,`An onclose callback called with error '${t}' threw error '${r}'.`)}}}async gt(t){const f=Date.now();let u=0,e=void 0!==t?t:new Error("Attempting to reconnect due to a unknown error."),r=this.yt(u++,0,e);if(null===r)return this.u.log(n.Debug,"Connection not reconnecting because the IRetryPolicy returned null on the first reconnect attempt."),void this.nt(t);if(this.q=i.Reconnecting,t?this.u.log(n.Information,`Connection reconnecting because of error '${t}'.`):this.u.log(n.Information,"Connection reconnecting."),0!==this.R.length){try{this.R.forEach(n=>n.apply(this,[t]))}catch(f){this.u.log(n.Error,`An onreconnecting callback called with error '${t}' threw error '${f}'.`)}if(this.q!==i.Reconnecting)return void this.u.log(n.Debug,"Connection left the reconnecting state in onreconnecting callback. Done reconnecting.")}for(;null!==r;){if(this.u.log(n.Information,`Reconnect attempt number ${u} will start in ${r} ms.`),await new Promise(n=>{this.st=setTimeout(n,r)}),this.st=void 0,this.q!==i.Reconnecting)return void this.u.log(n.Debug,"Connection left the reconnecting state during reconnect delay. Done reconnecting.");try{if(await this.F(),this.q=i.Connected,this.u.log(n.Information,"HubConnection reconnected successfully."),0!==this.U.length)try{this.U.forEac
1h(n=>n.apply(this,[this.connection.connectionId]))}catch(t){this.u.log(n.Error,`An onreconnected callback called with connectionId '${this.connection.connectionId}; threw error '${t}'.`)}return}catch(t){if(this.u.log(n.Information,`Reconnect attempt failed because of error '${t}'.`),this.q!==i.Reconnecting)return this.u.log(n.Debug,`Connection moved to the '${this.q}' from the reconnecting state during reconnect attempt. Done reconnecting.`),void(this.q===i.Disconnecting&&this.nt());e=t instanceof Error?t:new Error(t.toString());r=this.yt(u++,Date.now()-f,e)}}this.u.log(n.Information,`Reconnect retries have been exhausted after ${Date.now()-f} ms and ${u} failed attempts. Connection disconnecting.`);this.nt()}yt(t,i,r){try{return this.P.nextRetryDelayInMilliseconds({elapsedMilliseconds:i,previousRetryCount:t,retryReason:r})}catch(r){return this.u.log(n.Error,`IRetryPolicy.nextRetryDelayInMilliseconds(${t}, ${i}) threw error '${r}'.`),null}}wt(t){const i=this.H;this.H={};Object.keys(i).forEach(r=>{const u=i[r];try{u(null,t)}catch(i){this.u.log(n.Error,`Stream 'error' callback called with '${t}' threw error: ${ut(i)}`)}})}Z(){this.ft&&(clearTimeout(this.ft),this.ft=void 0)}G(){this.dt&&clearTimeout(this.dt)}at(n,i,r,u){if(r)return 0!==u.length?{arguments:i,streamIds:u,target:n,type:t.Invocation}:{arguments:i,target:n,type:t.Invocation};{const r=this.L;return this.L++,0!==u.length?{arguments:i,invocationId:r.toString(),streamIds:u,target:n,type:t.Invocation}:{arguments:i,invocationId:r.toString(),target:n,type:t.Invocation}}}ct(n,t){if(0!==n.length){t||(t=Promise.resolve());for(const i in n)n[i].subscribe({complete:()=>{t=t.then(()=>this.ht(this.bt(i)))},error:n=>{let r;r=n instanceof Error?n.message:n&&n.toString?n.toString():"Unknown error";t=t.then(()=>this.ht(this.bt(i,r)))},next:n=>{t=t.then(()=>this.ht(this.vt(i,n)))}})}}it(n){const t=[],i=[];for(let r=0;r<n.length;r++){const u=n[r];if(this.Et(u)){const f=this.L;this.L++;t[f]=u;i.push(f.toString());n.splice(r,1)}}return[t,i]}Et(n){return n&&n.subscribe&&"function"==typeof n.subscribe}rt(n,i,r){const u=this.L;return this.L++,0!==r.length?{arguments:i,invocationId:u.toString(),streamIds:r,target:n,type:t.StreamInvocation}:{arguments:i,invocationId:u.toString(),target:n,type:t.StreamInvocation}}ot(n){return{invocationId:n,type:t.CancelInvocation}}vt(n,i){return{invocationId:n,item:i,type:t.StreamItem}}bt(n,i,r){return i?{error:i,invocationId:n,type:t.Completion}:{invocationId:n,result:r,type:t.Completion}}}const ri=[0,2e3,1e4,3e4,null];class st{constructor(n){this.$t=void 0!==n?[...n,null]:ri}nextRetryDelayInMilliseconds(n){return this.$t[n.previousRetryCount]}}class c{}c.Authorization="Authorization";c.Cookie="Cookie",function(n){n[n.None=0]="None";n[n.WebSockets=1]="WebSockets";n[n.ServerSentEvents=2]="ServerSentEvents";n[n.LongPolling=4]="LongPolling"}(r||(r={})),function(n){n[n.Text=1]="Text";n[n.Binary=2]="Binary"}(e||(e={}));class ui{constructor(){this.Ct=!1;this.onabort=null}abort(){this.Ct||(this.Ct=!0,this.onabort&&this.onabort())}get signal(){return this}get aborted(){return this.Ct}}class ht{constructor(n,t,i,r){this.$=n;this.St=t;this.u=i;this.kt=new ui;this.Pt=r;this.Tt=!1;this.onreceive=null;this.onclose=null}get pollAborted(){return this.kt.aborted}async connect(t,i){if(u.isRequired(t,"url"),u.isRequired(i,"transferFormat"),u.isIn(i,e,"transferFormat"),this.It=t,this.u.log(n.Trace,"(LongPolling transport) Connecting."),i===e.Binary&&"undefined"!=typeof XMLHttpRequest&&"string"!=typeof(new XMLHttpRequest).responseType)throw new Error("Binary protocols over XmlHttpRequest not implementing advanced features are not supported.");const[s,c]=v(),l={[s]:c,...this.Pt.headers},r={abortSignal:this.kt.signal,headers:l,timeout:1e5,withCredentials:this.Pt.withCredentials};i===e.Binary&&(r.responseType="arraybuffer");const a=await this._t();this.Ht(r,a);const o=`${t}&_=${Date.now()}`;this.u.log(n.Trace,`(LongPolling transport) polling: ${o}.`);const f=await this.$.get(o,r);200!==f.statusCode?(this.u.log(n.Error,`(LongPolling transport) Unexpected response code: ${f.statusCode}.`),this.Dt=new h(f.statusText||"",f.statusCode),this.Tt=!1):this.Tt=!0;this.xt=this.At(this.It,r)}async _t(){return this.St?await this.St():null}Ht(n,t){n.headers||(n.headers={});t?n.headers[c.Authorization]=`Bearer ${t}`:n.headers[c.Authorization]&&delete n.headers[c.Authorization]}async At(t,i){try{for(;this.Tt;){const r=await this._t();this.Ht(i,r);try{const u=`${t}&_=${Date.now()}`;this.u.log(n.Trace,`(LongPolling transport) polling: ${u}.`);const r=await this.$.get(u,i);204===r.statusCode?(this.u.log(n.Information,"(LongPolling transport) Poll terminated by server."),this.Tt=!1):200!==r.statusCode?(this.u.log(n.Error,`(LongPolling transport) Unexpected response code: ${r.statusCode}.`),this.Dt=new h(r.statusText||"",r.statusCode),this.Tt=!1):r.content?(this.u.log(n.Trace,`(LongPolling transport) data received. ${y(r.content,this.Pt.logMessageContent)}.`),this.onreceive&&this.onreceive(r.content)):this.u.log(n.Trace,"(LongPolling transport) Poll timed out, reissuing.")}catch(t){this.Tt?t instanceof w?this.u.log(n.Trace,"(LongPolling transport) Poll timed out, reissuing."):(this.Dt=t,this.Tt=!1):this.u.log(n.Trace,`(LongPolling transport) Poll errored after shutdown: ${t.message}`)}}}finally{this.u.log(n.Trace,"(LongPolling transport) Polling complete.");this.pollAborted||this.Rt()}}async send(n){return this.Tt?rt(this.u,"LongPolling",this.$,this.It,this.St,n,this.Pt):Promise.reject(new Error("Cannot send until the transport is connected"))}async stop(){this.u.log(n.Trace,"(LongPolling transport) Stopping polling.");this.Tt=!1;this.kt.abort();try{await this.xt;this.u.log(n.Trace,`(LongPolling transport) sending DELETE request to ${this.It}.`);const t={},[r,u]=v();t[r]=u;const i={headers:{...t,...this.Pt.headers},timeout:this.Pt.timeout,withCredentials:this.Pt.withCredentials},f=await this._t();this.Ht(i,f);await this.$.delete(this.It,i);this.u.log(n.Trace,"(LongPolling transport) DELETE request sent.")}finally{this.u.log(n.Trace,"(LongPolling transport) Stop finished.");this.Rt()}}Rt(){if(this.onclose){let t="(LongPolling transport) Firing onclose event.";this.Dt&&(t+=" Error: "+this.Dt);this.u.log(n.Trace,t);this.onclose(this.Dt)}}}class fi{constructor(n,t,i,r){this.$=n;this.St=t;this.u=i;this.Pt=r;this.onreceive=null;
1this.onclose=null}async connect(t,i){if(u.isRequired(t,"url"),u.isRequired(i,"transferFormat"),u.isIn(i,e,"transferFormat"),this.u.log(n.Trace,"(SSE transport) Connecting."),this.It=t,this.St){const n=await this.St();n&&(t+=(t.indexOf("?")<0?"?":"&")+`access_token=${encodeURIComponent(n)}`)}return new Promise((r,u)=>{let o,s=!1;if(i===e.Text){if(f.isBrowser||f.isWebWorker)o=new this.Pt.EventSource(t,{withCredentials:this.Pt.withCredentials});else{const i=this.$.getCookieString(t),n={};n.Cookie=i;const[r,u]=v();n[r]=u;o=new this.Pt.EventSource(t,{withCredentials:this.Pt.withCredentials,headers:{...n,...this.Pt.headers}})}try{o.onmessage=t=>{if(this.onreceive)try{this.u.log(n.Trace,`(SSE transport) data received. ${y(t.data,this.Pt.logMessageContent)}.`);this.onreceive(t.data)}catch(t){return void this.Ut(t)}};o.onerror=()=>{s?this.Ut():u(new Error("EventSource failed to connect. The connection could not be found on the server, either the connection ID is not present on the server, or a proxy is refusing/buffering the connection. If you have multiple servers check that sticky sessions are enabled."))};o.onopen=()=>{this.u.log(n.Information,`SSE connected to ${this.It}`),this.Lt=o,s=!0,r()}}catch(t){return void u(t)}}else u(new Error("The Server-Sent Events transport only supports the 'Text' transfer format"))})}async send(n){return this.Lt?rt(this.u,"SSE",this.$,this.It,this.St,n,this.Pt):Promise.reject(new Error("Cannot send until the transport is connected"))}stop(){return this.Ut(),Promise.resolve()}Ut(n){this.Lt&&(this.Lt.close(),this.Lt=void 0,this.onclose&&this.onclose(n))}}class ei{constructor(n,t,i,r,u,f){this.u=i;this.St=t;this.Nt=r;this.qt=u;this.$=n;this.onreceive=null;this.onclose=null;this.Mt=f}async connect(t,i){if(u.isRequired(t,"url"),u.isRequired(i,"transferFormat"),u.isIn(i,e,"transferFormat"),this.u.log(n.Trace,"(WebSockets transport) Connecting."),this.St){const n=await this.St();n&&(t+=(t.indexOf("?")<0?"?":"&")+`access_token=${encodeURIComponent(n)}`)}return new Promise((r,u)=>{let o;t=t.replace(/^http/,"ws");const s=this.$.getCookieString(t);let h=!1;if(f.isNode){const n={},[i,r]=v();n[i]=r;s&&(n[c.Cookie]=`${s}`);o=new this.qt(t,void 0,{headers:{...n,...this.Mt}})}o||(o=new this.qt(t));i===e.Binary&&(o.binaryType="arraybuffer");o.onopen=()=>{this.u.log(n.Information,`WebSocket connected to ${t}.`),this.Wt=o,h=!0,r()};o.onerror=t=>{let i=null;i="undefined"!=typeof ErrorEvent&&t instanceof ErrorEvent?t.error:"There was an error with the transport";this.u.log(n.Information,`(WebSockets transport) ${i}.`)};o.onmessage=t=>{if(this.u.log(n.Trace,`(WebSockets transport) data received. ${y(t.data,this.Nt)}.`),this.onreceive)try{this.onreceive(t.data)}catch(t){return void this.Ut(t)}};o.onclose=n=>{if(h)this.Ut(n);else{let t=null;t="undefined"!=typeof ErrorEvent&&n instanceof ErrorEvent?n.error:"WebSocket failed to connect. The connection could not be found on the server, either the endpoint may not be a SignalR endpoint, the connection ID is not present on the server, or there is a proxy blocking WebSockets. If you have multiple servers check that sticky sessions are enabled.";u(new Error(t))}}})}send(t){return this.Wt&&this.Wt.readyState===this.qt.OPEN?(this.u.log(n.Trace,`(WebSockets transport) sending data. ${y(t,this.Nt)}.`),this.Wt.send(t),Promise.resolve()):Promise.reject("WebSocket is not in the OPEN state")}stop(){return this.Wt&&this.Ut(void 0),Promise.resolve()}Ut(t){this.Wt&&(this.Wt.onclose=()=>{},this.Wt.onmessage=()=>{},this.Wt.onerror=()=>{},this.Wt.close(),this.Wt=void 0);this.u.log(n.Trace,"(WebSockets transport) socket closed.");this.onclose&&(!this.Ot(t)||!1!==t.wasClean&&1e3===t.code?t instanceof Error?this.onclose(t):this.onclose():this.onclose(new Error(`WebSocket closed with status code: ${t.code} (${t.reason||"no reason given"}).`)))}Ot(n){return n&&"boolean"==typeof n.wasClean&&"number"==typeof n.code}}class oi{constructor(t,i={}){var r;if(this.jt=()=>{},this.features={},this.Ft=1,u.isRequired(t,"url"),this.u=void 0===(r=i.logger)?new k(n.Information):null===r?a.instance:void 0!==r.log?r:new k(r),this.baseUrl=this.Bt(t),(i=i||{}).logMessageContent=void 0!==i.logMessageContent&&i.logMessageContent,"boolean"!=typeof i.withCredentials&&void 0!==i.withCredentials)throw new Error("withCredentials option was not a 'boolean' or 'undefined' value");i.withCredentials=void 0===i.withCredentials||i.withCredentials;i.timeout=void 0===i.timeout?1e5:i.timeout;let e=null,o=null;if(f.isNode){const n=require;e=n("ws");o=n("eventsource")}f.isNode||"undefined"==typeof WebSocket||i.WebSocket?f.isNode&&!i.WebSocket&&e&&(i.WebSocket=e):i.WebSocket=WebSocket;f.isNode||"undefined"==typeof EventSource||i.EventSource?f.isNode&&!i.EventSource&&void 0!==o&&(i.EventSource=o):i.EventSource=EventSource;this.$=i.httpClient||new et(this.u);this.q="Disconnected";this.M=!1;this.Pt=i;this.onreceive=null;
vendor: 6,250 bytes, line 1
1this.onclose=null}async start(t){if(t=t||e.Binary,u.isIn(t,e,"transferFormat"),this.u.log(n.Debug,`Starting connection with transfer format '${e[t]}'.`),"Disconnected"!==this.q)return Promise.reject(new Error("Cannot start an HttpConnection that is not in the 'Disconnected' state."));if(this.q="Connecting",this.Xt=this.F(t),await this.Xt,"Disconnecting"===this.q){const t="Failed to start the HttpConnection before stop() was called.";return this.u.log(n.Error,t),await this.tt,Promise.reject(new Error(t))}if("Connected"!==this.q){const t="HttpConnection.startInternal completed gracefully but didn't enter the connection into the connected state!";return this.u.log(n.Error,t),Promise.reject(new Error(t))}this.M=!0}send(n){return"Connected"!==this.q?Promise.reject(new Error("Cannot send data if the connection is not in the 'Connected' State.")):(this.Jt||(this.Jt=new ct(this.transport)),this.Jt.send(n))}async stop(t){return"Disconnected"===this.q?(this.u.log(n.Debug,`Call to HttpConnection.stop(${t}) ignored because the connection is already in the disconnected state.`),Promise.resolve()):"Disconnecting"===this.q?(this.u.log(n.Debug,`Call to HttpConnection.stop(${t}) ignored because the connection is already in the disconnecting state.`),this.tt):(this.q="Disconnecting",this.tt=new Promise(n=>{this.jt=n}),await this.et(t),void await this.tt)}async et(t){this.zt=t;try{await this.Xt}catch(t){}if(this.transport){try{await this.transport.stop()}catch(t){this.u.log(n.Error,`HttpConnection.transport.stop() threw error '${t}'.`);this.Vt()}this.transport=void 0}else this.u.log(n.Debug,"HttpConnection.transport is undefined in HttpConnection.stop() because start() failed.")}async F(t){let i=this.baseUrl;this.St=this.Pt.accessTokenFactory;try{if(this.Pt.skipNegotiation){if(this.Pt.transport!==r.WebSockets)throw new Error("Negotiation can only be skipped when using the WebSocket transport directly.");this.transport=this.Gt(r.WebSockets);await this.Kt(i,t)}else{let n=null,r=0;do{if(n=await this.Qt(i),"Disconnecting"===this.q||"Disconnected"===this.q)throw new Error("The connection was stopped during negotiation.");if(n.error)throw new Error(n.error);if(n.ProtocolVersion)throw new Error("Detected a connection attempt to an ASP.NET SignalR Server. This client only supports connecting to an ASP.NET Core SignalR Server. See https://aka.ms/signalr-core-differences for details.");if(n.url&&(i=n.url),n.accessToken){const t=n.accessToken;this.St=()=>t}r++}while(n.url&&r<100);if(100===r&&n.url)throw new Error("Negotiate redirection limit exceeded.");await this.Yt(i,this.Pt.transport,n,t)}this.transport instanceof ht&&(this.features.inherentKeepAlive=!0);"Connecting"===this.q&&(this.u.log(n.Debug,"The HttpConnection connected successfully."),this.q="Connected")}catch(t){return this.u.log(n.Error,"Failed to start the connection: "+t),this.q="Disconnected",this.transport=void 0,this.jt(),Promise.reject(t)}}async Qt(t){const i={};if(this.St){const n=await this.St();n&&(i[c.Authorization]=`Bearer ${n}`)}const[u,f]=v();i[u]=f;const r=this.Zt(t);this.u.log(n.Debug,`Sending negotiation request: ${r}.`);try{const t=await this.$.post(r,{content:"",headers:{...i,...this.Pt.headers},timeout:this.Pt.timeout,withCredentials:this.Pt.withCredentials});if(200!==t.statusCode)return Promise.reject(new Error(`Unexpected status code returned from negotiate '${t.statusCode}'`));const n=JSON.parse(t.content);return(!n.negotiateVersion||n.negotiateVersion<1)&&(n.connectionToken=n.connectionId),n}catch(t){let i="Failed to complete negotiation with the server: "+t;return t instanceof h&&404===t.statusCode&&(i+=" Either this is not a SignalR endpoint or there is a proxy blocking the connection."),this.u.log(n.Error,i),Promise.reject(new pt(i))}}te(n,t){return t?n+(-1===n.indexOf("?")?"?":"&")+`id=${t}`:n}async Yt(t,i,u,f){let s=this.te(t,u.connectionToken);if(this.ee(i))return this.u.log(n.Debug,"Connection was provided an instance of ITransport, using that directly."),this.transport=i,await this.Kt(s,f),void(this.connectionId=u.connectionId);const e=[],h=u.availableTransports||[];let o=u;for(const u of h){const h=this.se(u,i,f);if(h instanceof Error)e.push(`${u.transport} failed:`),e.push(h);else if(this.ee(h)){if(this.transport=h,!o){try{o=await this.Qt(t)}catch(t){return Promise.reject(t)}s=this.te(t,o.connectionToken)}try{return await this.Kt(s,f),void(this.connectionId=o.connectionId)}catch(t){if(this.u.log(n.Error,`Failed to start the transport '${u.transport}': ${t}`),o=void 0,e.push(new yt(`${u.transport} failed: ${t}`,r[u.transport])),"Connecting"!==this.q){const t="Failed to select transport before stop() was called.";return this.u.log(n.Debug,t),Promise.reject(new Error(t))}}}}return e.length>0?Promise.reject(new wt(`Unable to connect to the server with any of the available transports. ${e.join(" ")}`,e)):Promise.reject(new Error("None of the transports supported by the client are supported by the server."))}Gt(n){switch(n){case r.WebSockets:if(!this.Pt.WebSocket)throw new Error("'WebSocket' is not supported in your environment.");return new ei(this.$,this.St,this.u,this.Pt.logMessageContent,this.Pt.WebSocket,this.Pt.headers||{});case r.ServerSentEvents:if(!this.Pt.EventSource)throw new Error("'EventSource' is not supported in your environment.");return new fi(this.$,this.St,this.u,this.Pt);case r.LongPolling:return new ht(this.$,this.St,this.u,this.Pt);default:throw new Error(`Unknown transport: ${n}.`);}}Kt(n,t){return this.transport.onreceive=this.onreceive,this.transport.onclose=n=>this.Vt(n),this.transport.connect(n,t)}se(t,i,u){const f=r[t.transport];if(null==f)return this.u.log(n.Debug,`Skipping transport '${t.transport}' because it is not supported by this client.`),new Error(`Skipping transport '${t.transport}' because it is not supported by this client.`);if(!function(n,t){return!n||0!=(t&n)}(i,f))return this.u.log(n.Debug,`Skipping transport '${r[f]}' because it was disabled by the client.`),new vt(`'${r[f]}' is disabled by the client.`,f);if(!(t.transferFormats.map(n=>e[n]).indexOf(u)>=0))return this.u.log(n.Debug,`Skipping transport '${r[f]}' because it does not support the requested transfer format '${e[u]}'.`),new Error(`'${r[f]}' does not support ${e[u]}.`);
1if(f===r.WebSockets&&!this.Pt.WebSocket||f===r.ServerSentEvents&&!this.Pt.EventSource)return this.u.log(n.Debug,`Skipping transport '${r[f]}' because it is not supported in your environment.'`),new at(`'${r[f]}' is not supported in your environment.`,f);this.u.log(n.Debug,`Selecting transport '${r[f]}'.`);try{return this.Gt(f)}catch(t){return t}}ee(n){return n&&"object"==typeof n&&"connect"in n}Vt(t){if(this.u.log(n.Debug,`HttpConnection.stopConnection(${t}) called while in state ${this.q}.`),this.transport=void 0,t=this.zt||t,this.zt=void 0,"Disconnected"!==this.q){if("Connecting"===this.q)throw this.u.log(n.Warning,`Call to HttpConnection.stopConnection(${t}) was ignored because the connection is still in the connecting state.`),new Error(`HttpConnection.stopConnection(${t}) was called while the connection is still in the connecting state.`);if("Disconnecting"===this.q&&this.jt(),t?this.u.log(n.Error,`Connection disconnected with error '${t}'.`):this.u.log(n.Information,"Connection disconnected."),this.Jt&&(this.Jt.stop().catch(t=>{this.u.log(n.Error,`TransportSendQueue.stop() threw error '${t}'.`)}),this.Jt=void 0),this.connectionId=void 0,this.q="Disconnected",this.M){this.M=!1;try{this.onclose&&this.onclose(t)}catch(i){this.u.log(n.Error,`HttpConnection.onclose(${t}) threw error '${i}'.`)}}}else this.u.log(n.Debug,`Call to HttpConnection.stopConnection(${t}) was ignored because the connection is already in the disconnected state.`)}Bt(t){if(0===t.lastIndexOf("https://",0)||0===t.lastIndexOf("http://",0))return t;if(!f.isBrowser||!window.document)throw new Error(`Cannot resolve '${t}'.`);const i=window.document.createElement("a");return i.href=t,this.u.log(n.Information,`Normalizing '${t}' to '${i.href}'.`),i.href}Zt(n){const i=n.indexOf("?");let t=n.substring(0,-1===i?n.length:i);return"/"!==t[t.length-1]&&(t+="/"),t+="negotiate",t+=-1===i?"":n.substring(i),-1===t.indexOf("negotiateVersion")&&(t+=-1===i?"?":"&",t+="negotiateVersion="+this.Ft),t}}class ct{constructor(n){this.ne=n;this.ie=[];this.re=!0;this.oe=new d;this.he=new d;this.ce=this.ae()}send(n){return this.le(n),this.he||(this.he=new d),this.he.promise}stop(){return this.re=!1,this.oe.resolve(),this.ce}le(n){if(this.ie.length&&typeof this.ie[0]!=typeof n)throw new Error(`Expected data to be of type ${typeof this.ie} but was of type ${typeof n}`);this.ie.push(n);this.oe.resolve()}async ae(){for(;;){if(await this.oe.promise,!this.re){this.he&&this.he.reject("Connection stopped.");break}this.oe=new d;const n=this.he;this.he=void 0;const t="string"==typeof this.ie[0]?this.ie.join(""):ct.ue(this.ie);this.ie.length=0;try{await this.ne.send(t);n.resolve()}catch(t){n.reject(t)}}}static ue(n){const r=n.map(n=>n.byteLength).reduce((n,t)=>n+t),t=new Uint8Array(r);let i=0;for(const r of n)t.set(new Uint8Array(r),i),i+=r.byteLength;return t.buffer}}class d{constructor(){this.promise=new Promise((n,t)=>[this.de,this.fe]=[n,t])}resolve(){this.de()}reject(n){this.fe(n)}}class lt{constructor(){this.name="json";this.version=1;this.transferFormat=e.Text}parseMessages(i,r){if("string"!=typeof i)throw new Error("Invalid input for JSON hub protocol. Expected a string.");if(!i)return[];null===r&&(r=a.instance);const f=o.parse(i),u=[];for(const i of f){const f=JSON.parse(i);if("number"!=typeof f.type)throw new Error("Invalid payload.");switch(f.type){case t.Invocation:this.pe(f);break;case t.StreamItem:this.we(f);break;case t.Completion:this.ge(f);break;case t.Ping:case t.Close:break;default:r.log(n.Information,"Unknown message type '"+f.type+"' ignored.");continue}u.push(f)}return u}writeMessage(n){return o.write(JSON.stringify(n))}pe(n){this.me(n.target,"Invalid payload for Invocation message.");void 0!==n.invocationId&&this.me(n.invocationId,"Invalid payload for Invocation message.")}we(n){if(this.me(n.invocationId,"Invalid payload for StreamItem message."),void 0===n.item)throw new Error("Invalid payload for StreamItem message.");}ge(n){if(n.result&&n.error)throw new Error("Invalid payload for Completion message.");!n.result&&n.error&&this.me(n.error,"Invalid payload for Completion message.");this.me(n.invocationId,"Invalid payload for Completion message.")}me(n,t){if("string"!=typeof n||""===n)throw new Error(t);}}const si={trace:n.Trace,debug:n.Debug,info:n.Information,information:n.Information,warn:n.Warning,warning:n.Warning,error:n.Error,critical:n.Critical,none:n.None};class hi{configureLogging(n){if(u.isRequired(n,"logging"),void 0!==n.log)this.logger=n;else if("string"==typeof n){const t=function(n){const t=si[n.toLowerCase()];if(void 0!==t)return t;throw new Error(`Unknown log level: ${n}`);}(n);this.logger=new k(t)}else this.logger=new k(n);return this}withUrl(n,t){return u.isRequired(n,"url"),u.isNotEmpty(n,"url"),this.url=n,this.httpConnectionOptions="object"==typeof t?{...this.httpConnectionOptions,...t}:{...this.httpConnectionOptions,transport:t},this}withHubProtocol(n){return u.isRequired(n,"protocol"),this.protocol=n,this}withAutomaticReconnect(n){if(this.reconnectPolicy)throw new Error("A reconnectPolicy has already been set.");return this.reconnectPolicy=n?Array.isArray(n)?new st(n):n:new st,this}build(){const n=this.httpConnectionOptions||{};if(void 0===n.logger&&(n.logger=this.logger),!this.url)throw new Error("The 'HubConnectionBuilder.withUrl' method must be called before building the connection.");const t=new oi(this.url,n);return tt.create(t,this.logger||a.instance,this.protocol||new lt,this.reconnectPolicy)}}return Uint8Array.prototype.indexOf||Object.defineProperty(Uint8Array.prototype,"indexOf",{value:Array.prototype.indexOf,writable:!0}),Uint8Array.prototype.slice||Object.defineProperty(Uint8Array.prototype,"slice",{value:function(n,t){return new Uint8Array(Array.prototype.slice.call(this,n,t))},writable:!0}),Uint8Array.prototype.forEach||Object.defineProperty(Uint8Array.prototype,"forEach",{value:Array.prototype.forEach,writable:!0}),p})()};"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exp
1orts.signalR=e():t.signalR=e();ABCSTREAM=new function(){function r(n){const t=new Date,i=t.getDay(),f=t.getHours(),e=t.getMinutes(),r=f*60+e,u=(n,t,i,u)=>{const f=n*60+t,e=i*60+u;return r>=f&&r<=e};return n.filter(n=>{const[,r]=n.split("_"),t=parseInt(r,10);return!Number.isNaN(t)&&(i===0||i===6)?!1:[6,38,25,1594,1807,1808].includes(t)&&!u(8,55,17,36)?!1:t===899&&!u(15,25,22,16)?!1:[51,6808,6809].includes(t)?!1:!0})}function i(){clearTimeout(u);u=setTimeout(()=>{n.stop(),console.log("Déconnexion inactivité user")},s)}function o(){clearTimeout(e);e=setTimeout(()=>{clearTimeout(f),f=setTimeout(()=>{console.warn("Aucun message reçu depuis 3 minutes, fermeture de la connexion."),n.stop()},24e4)},3e3)}var n,t;this.unsubscribeSymbols=async function(t){try{if(t==null||t.length==0)return;n.state===signalR.HubConnectionState.Connected&&await n.invoke("UnsubscribeFromSymbols",t)}catch(i){}};this.unsubscribeAllSymbols=async function(){try{var i=t;if(i==null||i.length==0)return;n.state===signalR.HubConnectionState.Connected&&await n.invoke("UnsubscribeFromSymbols",i)}catch(r){}};this.subscribeToSymbols=async function(t){try{if(t==null||t.length==0)return;n.state===signalR.HubConnectionState.Disconnected&&await n.start();var i=[...new Set(t)];i=r(i);await n.invoke("SubscribeToSymbols",i);o()}catch(u){}};this.CloseConnection=async function(){try{n&&n.state===signalR.HubConnectionState.Connected&&(await n.stop(),console.log("Connexion SignalR fermée."))}catch(t){}};let u,s=24e4;document.addEventListener("mousemove",i);document.addEventListener("keydown",i);i();this.IsConnected=function(){return n&&n.state===signalR.HubConnectionState.Connected?!0:!1};this.LaunchStream=function(i){if(t=r(i),t!=null&&t.length!=0){n=(new signalR.HubConnectionBuilder).withUrl("https://streaming.abcbourse.com/stockhub").withAutomaticReconnect([2e3,5e3,1e4]).build();setInterval(async()=>{if(n.state===signalR.HubConnectionState.Connected)try{await n.invoke("Ping")}catch(t){n.stop()}},6e4);n.on("ReceiveStockData",function(n){const t=JSON.parse(n);o();ManageStreamingData(t)});this.subscribeToSymbols(t).catch(n=>console.error(n))}};let f,e;this.addClassBlink=function(n){var t=n.length;if(t!==0){const i=new Map;for(let r=0;r<t;r++){let t=n[r],u=t.text!==null&&t.text!==undefined?String(t.text):"";if(u=u.replace(/ /g," "),t.c.textContent=u,t.c.tagName==="SPAN"){const n=t.c.closest("td");if(n&&t.class){let r="";t.class.includes("lgreen")?r="lgreen":t.class.includes("lred")&&(r="lred");r&&i.set(n,r);t.c.dataset.stream==="vj"&&(t.c.classList.remove("quote_upb","quote_downb"),t.class.includes("quote_upb")&&t.c.classList.add("quote_upb"),t.class.includes("quote_downb")&&t.c.classList.add("quote_downb"))}}else t.class&&(t.c.className="",void t.c.offsetHeight,t.c.className=t.class)}i.forEach(function(n,t){t.className="";void t.offsetHeight;t.className=n})}};window.addEventListener("beforeunload",async()=>{await this.unsubscribeSymbols(t),await this.CloseConnection()})};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.