@combeenation/custom-code-sdk 0.0.1-alpha1 โ 0.0.1-alpha2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/bundle.cjs.js +10 -10
- package/dist/bundle.es.js +6593 -6408
- package/dist/index.d.ts +132 -13
- package/package.json +3 -2
- package/dist/tsconfig.tsbuildinfo +0 -1
package/dist/bundle.cjs.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const k=require("zod"),tm="1.5.2-alpha4";function _0(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var $l={exports:{}},qp;function b0(){return qp||(qp=1,(function(t){var e=Object.prototype.hasOwnProperty,n="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(n=!1));function i(c,u,l){this.fn=c,this.context=u,this.once=l||!1}function o(c,u,l,f,m){if(typeof l!="function")throw new TypeError("The listener must be a function");var d=new i(l,f||c,m),h=n?n+u:u;return c._events[h]?c._events[h].fn?c._events[h]=[c._events[h],d]:c._events[h].push(d):(c._events[h]=d,c._eventsCount++),c}function a(c,u){--c._eventsCount===0?c._events=new r:delete c._events[u]}function s(){this._events=new r,this._eventsCount=0}s.prototype.eventNames=function(){var u=[],l,f;if(this._eventsCount===0)return u;for(f in l=this._events)e.call(l,f)&&u.push(n?f.slice(1):f);return Object.getOwnPropertySymbols?u.concat(Object.getOwnPropertySymbols(l)):u},s.prototype.listeners=function(u){var l=n?n+u:u,f=this._events[l];if(!f)return[];if(f.fn)return[f.fn];for(var m=0,d=f.length,h=new Array(d);m<d;m++)h[m]=f[m].fn;return h},s.prototype.listenerCount=function(u){var l=n?n+u:u,f=this._events[l];return f?f.fn?1:f.length:0},s.prototype.emit=function(u,l,f,m,d,h){var g=n?n+u:u;if(!this._events[g])return!1;var p=this._events[g],v=arguments.length,b,P;if(p.fn){switch(p.once&&this.removeListener(u,p.fn,void 0,!0),v){case 1:return p.fn.call(p.context),!0;case 2:return p.fn.call(p.context,l),!0;case 3:return p.fn.call(p.context,l,f),!0;case 4:return p.fn.call(p.context,l,f,m),!0;case 5:return p.fn.call(p.context,l,f,m,d),!0;case 6:return p.fn.call(p.context,l,f,m,d,h),!0}for(P=1,b=new Array(v-1);P<v;P++)b[P-1]=arguments[P];p.fn.apply(p.context,b)}else{var x=p.length,R;for(P=0;P<x;P++)switch(p[P].once&&this.removeListener(u,p[P].fn,void 0,!0),v){case 1:p[P].fn.call(p[P].context);break;case 2:p[P].fn.call(p[P].context,l);break;case 3:p[P].fn.call(p[P].context,l,f);break;case 4:p[P].fn.call(p[P].context,l,f,m);break;default:if(!b)for(R=1,b=new Array(v-1);R<v;R++)b[R-1]=arguments[R];p[P].fn.apply(p[P].context,b)}}return!0},s.prototype.on=function(u,l,f){return o(this,u,l,f,!1)},s.prototype.once=function(u,l,f){return o(this,u,l,f,!0)},s.prototype.removeListener=function(u,l,f,m){var d=n?n+u:u;if(!this._events[d])return this;if(!l)return a(this,d),this;var h=this._events[d];if(h.fn)h.fn===l&&(!m||h.once)&&(!f||h.context===f)&&a(this,d);else{for(var g=0,p=[],v=h.length;g<v;g++)(h[g].fn!==l||m&&!h[g].once||f&&h[g].context!==f)&&p.push(h[g]);p.length?this._events[d]=p.length===1?p[0]:p:a(this,d)}return this},s.prototype.removeAllListeners=function(u){var l;return u?(l=n?n+u:u,this._events[l]&&a(this,l)):(this._events=new r,this._eventsCount=0),this},s.prototype.off=s.prototype.removeListener,s.prototype.addListener=s.prototype.on,s.prefixed=n,s.EventEmitter=s,t.exports=s})($l)),$l.exports}var w0=b0();const tc=_0(w0);function C0(t,e){if(window.CfgrClientRegistry||(window.CfgrClientRegistry=[]),window.CfgrClientRegistry.length>=1)throw new Error("Only 1 `ConfiguratorClient` can be created at a time.");window.CfgrClientRegistry.push({client:t,internals:e})}function dd(t){var e,n;const r=(n=(e=window.CfgrClientRegistry)==null?void 0:e[0])==null?void 0:n.client;if(!r)throw new Error("Operation not possible as no `ConfiguratorClient` has been created yet.");return r}function Fc(){var t,e;const n=(e=(t=window.CfgrClientRegistry)==null?void 0:t[0])==null?void 0:e.internals;if(!n)throw new Error("Operation not possible as no `ConfiguratorClient` has been created yet.");return n}var S0=Object.defineProperty,nm=t=>{throw TypeError(t)},I0=(t,e,n)=>e in t?S0(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,k0=(t,e,n)=>I0(t,e+"",n),Hh=(t,e,n)=>e.has(t)||nm("Cannot "+n),Mi=(t,e,n)=>(Hh(t,e,"read from private field"),e.get(t)),gc=(t,e,n)=>e.has(t)?nm("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),vu=(t,e,n,r)=>(Hh(t,e,"write to private field"),e.set(t,n),n),T0=(t,e,n)=>(Hh(t,e,"access private method"),n);function E0(){var t;return window.CtrlEventEmitters||(window.CtrlEventEmitters={}),window.CtrlEventEmitters.CustomControl||(window.CtrlEventEmitters.CustomControl=new tc),(t=window.CtrlApis)!=null&&t.CustomControl||(window.CtrlApis||(window.CtrlApis={}),window.CtrlApis.CustomControl={},window.CtrlEventEmitters.CustomControl.on("apiChanged",(e,n)=>{window.CtrlApis.CustomControl[e]=n})),window.CtrlEventEmitters.CustomControl}function x0(t){var e;return(e=window.CtrlApis)!=null&&e.CustomControl?window.CtrlApis.CustomControl[t]:void 0}var xi,Ss,Is,hd,rm;class P0{constructor(e){gc(this,hd),k0(this,"name"),gc(this,xi),gc(this,Ss,[]),gc(this,Is),this.name=e,vu(this,xi,x0(this.name)),E0().on("apiChanged",(n,r)=>T0(this,hd,rm).call(this,n,r))}onRendered(e){Mi(this,xi)?(vu(this,Is,e),Mi(this,xi).onRendered(e)):Mi(this,Ss).push(()=>this.onRendered(e))}getElement(){var e;return(e=Mi(this,xi))==null?void 0:e.getElement()}}xi=new WeakMap,Ss=new WeakMap,Is=new WeakMap,hd=new WeakSet,rm=function(t,e){t===this.name&&(vu(this,xi,e),e&&(Mi(this,Ss).forEach(n=>n(e)),vu(this,Ss,[]),Mi(this,Is)&&this.onRendered(Mi(this,Is))))};class Oi extends Error{constructor(e,n){const r=new.target.prototype;super(`${e}: Status code '${n}'`),this.statusCode=n,this.__proto__=r}}class qh extends Error{constructor(e="A timeout occurred."){const n=new.target.prototype;super(e),this.__proto__=n}}class Tn extends Error{constructor(e="An abort occurred."){const n=new.target.prototype;super(e),this.__proto__=n}}class D0 extends Error{constructor(e,n){const r=new.target.prototype;super(e),this.transport=n,this.errorType="UnsupportedTransportError",this.__proto__=r}}class R0 extends Error{constructor(e,n){const r=new.target.prototype;super(e),this.transport=n,this.errorType="DisabledTransportError",this.__proto__=r}}class A0 extends Error{constructor(e,n){const r=new.target.prototype;super(e),this.transport=n,this.errorType="FailedToStartTransportError",this.__proto__=r}}class Vp extends Error{constructor(e){const n=new.target.prototype;super(e),this.errorType="FailedToNegotiateWithServerError",this.__proto__=n}}class M0 extends Error{constructor(e,n){const r=new.target.prototype;super(e),this.innerErrors=n,this.__proto__=r}}class im{constructor(e,n,r){this.statusCode=e,this.statusText=n,this.content=r}}class hl{get(e,n){return this.send({...n,method:"GET",url:e})}post(e,n){return this.send({...n,method:"POST",url:e})}delete(e,n){return this.send({...n,method:"DELETE",url:e})}getCookieString(e){return""}}var N;(function(t){t[t.Trace=0]="Trace",t[t.Debug=1]="Debug",t[t.Information=2]="Information",t[t.Warning=3]="Warning",t[t.Error=4]="Error",t[t.Critical=5]="Critical",t[t.None=6]="None"})(N||(N={}));class zs{constructor(){}log(e,n){}}zs.instance=new zs;const z0="10.0.0";class ft{static isRequired(e,n){if(e==null)throw new Error(`The '${n}' argument is required.`)}static isNotEmpty(e,n){if(!e||e.match(/^\s*$/))throw new Error(`The '${n}' argument should not be empty.`)}static isIn(e,n,r){if(!(e in n))throw new Error(`Unknown ${r} value: ${e}.`)}}class tt{static get isBrowser(){return!tt.isNode&&typeof window=="object"&&typeof window.document=="object"}static get isWebWorker(){return!tt.isNode&&typeof self=="object"&&"importScripts"in self}static get isReactNative(){return!tt.isNode&&typeof window=="object"&&typeof window.document>"u"}static get isNode(){return typeof process<"u"&&process.release&&process.release.name==="node"}}function Us(t,e){let n="";return Yi(t)?(n=`Binary data of length ${t.byteLength}`,e&&(n+=`. Content: '${U0(t)}'`)):typeof t=="string"&&(n=`String data of length ${t.length}`,e&&(n+=`. Content: '${t}'`)),n}function U0(t){const e=new Uint8Array(t);let n="";return e.forEach(r=>{const i=r<16?"0":"";n+=`0x${i}${r.toString(16)} `}),n.substring(0,n.length-1)}function Yi(t){return t&&typeof ArrayBuffer<"u"&&(t instanceof ArrayBuffer||t.constructor&&t.constructor.name==="ArrayBuffer")}async function om(t,e,n,r,i,o){const a={},[s,c]=Ca();a[s]=c,t.log(N.Trace,`(${e} transport) sending data. ${Us(i,o.logMessageContent)}.`);const u=Yi(i)?"arraybuffer":"text",l=await n.post(r,{content:i,headers:{...a,...o.headers},responseType:u,timeout:o.timeout,withCredentials:o.withCredentials});t.log(N.Trace,`(${e} transport) request complete. Response status: ${l.statusCode}.`)}function N0(t){return t===void 0?new mu(N.Information):t===null?zs.instance:t.log!==void 0?t:new mu(t)}class $0{constructor(e,n){this._subject=e,this._observer=n}dispose(){const e=this._subject.observers.indexOf(this._observer);e>-1&&this._subject.observers.splice(e,1),this._subject.observers.length===0&&this._subject.cancelCallback&&this._subject.cancelCallback().catch(n=>{})}}class mu{constructor(e){this._minLevel=e,this.out=console}log(e,n){if(e>=this._minLevel){const r=`[${new Date().toISOString()}] ${N[e]}: ${n}`;switch(e){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);break}}}}function Ca(){let t="X-SignalR-User-Agent";return tt.isNode&&(t="User-Agent"),[t,L0(z0,j0(),O0(),W0())]}function L0(t,e,n,r){let i="Microsoft SignalR/";const o=t.split(".");return i+=`${o[0]}.${o[1]}`,i+=` (${t}; `,e&&e!==""?i+=`${e}; `:i+="Unknown OS; ",i+=`${n}`,r?i+=`; ${r}`:i+="; Unknown Runtime Version",i+=")",i}function j0(){if(tt.isNode)switch(process.platform){case"win32":return"Windows NT";case"darwin":return"macOS";case"linux":return"Linux";default:return process.platform}else return""}function W0(){if(tt.isNode)return process.versions.node}function O0(){return tt.isNode?"NodeJS":"Browser"}function Ll(t){return t.stack?t.stack:t.message?t.message:`${t}`}function F0(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("could not find global")}class H0 extends hl{constructor(e){if(super(),this._logger=e,typeof fetch>"u"||tt.isNode){const n=typeof __webpack_require__=="function"?__non_webpack_require__:require;this._jar=new(n("tough-cookie")).CookieJar,typeof fetch>"u"?this._fetchType=n("node-fetch"):this._fetchType=fetch,this._fetchType=n("fetch-cookie")(this._fetchType,this._jar)}else this._fetchType=fetch.bind(F0());if(typeof AbortController>"u"){const n=typeof __webpack_require__=="function"?__non_webpack_require__:require;this._abortControllerType=n("abort-controller")}else this._abortControllerType=AbortController}async send(e){if(e.abortSignal&&e.abortSignal.aborted)throw new Tn;if(!e.method)throw new Error("No method defined.");if(!e.url)throw new Error("No url defined.");const n=new this._abortControllerType;let r;e.abortSignal&&(e.abortSignal.onabort=()=>{n.abort(),r=new Tn});let i=null;if(e.timeout){const c=e.timeout;i=setTimeout(()=>{n.abort(),this._logger.log(N.Warning,"Timeout from HTTP request."),r=new qh},c)}e.content===""&&(e.content=void 0),e.content&&(e.headers=e.headers||{},Yi(e.content)?e.headers["Content-Type"]="application/octet-stream":e.headers["Content-Type"]="text/plain;charset=UTF-8");let o;try{o=await this._fetchType(e.url,{body:e.content,cache:"no-cache",credentials:e.withCredentials===!0?"include":"same-origin",headers:{"X-Requested-With":"XMLHttpRequest",...e.headers},method:e.method,mode:"cors",redirect:"follow",signal:n.signal})}catch(c){throw r||(this._logger.log(N.Warning,`Error from HTTP request. ${c}.`),c)}finally{i&&clearTimeout(i),e.abortSignal&&(e.abortSignal.onabort=null)}if(!o.ok){const c=await Bp(o,"text");throw new Oi(c||o.statusText,o.status)}const s=await Bp(o,e.responseType);return new im(o.status,o.statusText,s)}getCookieString(e){let n="";return tt.isNode&&this._jar&&this._jar.getCookies(e,(r,i)=>n=i.join("; ")),n}}function Bp(t,e){let n;switch(e){case"arraybuffer":n=t.arrayBuffer();break;case"text":n=t.text();break;case"blob":case"document":case"json":throw new Error(`${e} is not supported.`);default:n=t.text();break}return n}class q0 extends hl{constructor(e){super(),this._logger=e}send(e){return e.abortSignal&&e.abortSignal.aborted?Promise.reject(new Tn):e.method?e.url?new Promise((n,r)=>{const i=new XMLHttpRequest;i.open(e.method,e.url,!0),i.withCredentials=e.withCredentials===void 0?!0:e.withCredentials,i.setRequestHeader("X-Requested-With","XMLHttpRequest"),e.content===""&&(e.content=void 0),e.content&&(Yi(e.content)?i.setRequestHeader("Content-Type","application/octet-stream"):i.setRequestHeader("Content-Type","text/plain;charset=UTF-8"));const o=e.headers;o&&Object.keys(o).forEach(a=>{i.setRequestHeader(a,o[a])}),e.responseType&&(i.responseType=e.responseType),e.abortSignal&&(e.abortSignal.onabort=()=>{i.abort(),r(new Tn)}),e.timeout&&(i.timeout=e.timeout),i.onload=()=>{e.abortSignal&&(e.abortSignal.onabort=null),i.status>=200&&i.status<300?n(new im(i.status,i.statusText,i.response||i.responseText)):r(new Oi(i.response||i.responseText||i.statusText,i.status))},i.onerror=()=>{this._logger.log(N.Warning,`Error from HTTP request. ${i.status}: ${i.statusText}.`),r(new Oi(i.statusText,i.status))},i.ontimeout=()=>{this._logger.log(N.Warning,"Timeout from HTTP request."),r(new qh)},i.send(e.content)}):Promise.reject(new Error("No url defined.")):Promise.reject(new Error("No method defined."))}}class V0 extends hl{constructor(e){if(super(),typeof fetch<"u"||tt.isNode)this._httpClient=new H0(e);else if(typeof XMLHttpRequest<"u")this._httpClient=new q0(e);else throw new Error("No usable HttpClient found.")}send(e){return e.abortSignal&&e.abortSignal.aborted?Promise.reject(new Tn):e.method?e.url?this._httpClient.send(e):Promise.reject(new Error("No url defined.")):Promise.reject(new Error("No method defined."))}getCookieString(e){return this._httpClient.getCookieString(e)}}class tn{static write(e){return`${e}${tn.RecordSeparator}`}static parse(e){if(e[e.length-1]!==tn.RecordSeparator)throw new Error("Message is incomplete.");const n=e.split(tn.RecordSeparator);return n.pop(),n}}tn.RecordSeparatorCode=30;tn.RecordSeparator=String.fromCharCode(tn.RecordSeparatorCode);class B0{writeHandshakeRequest(e){return tn.write(JSON.stringify(e))}parseHandshakeResponse(e){let n,r;if(Yi(e)){const s=new Uint8Array(e),c=s.indexOf(tn.RecordSeparatorCode);if(c===-1)throw new Error("Message is incomplete.");const u=c+1;n=String.fromCharCode.apply(null,Array.prototype.slice.call(s.slice(0,u))),r=s.byteLength>u?s.slice(u).buffer:null}else{const s=e,c=s.indexOf(tn.RecordSeparator);if(c===-1)throw new Error("Message is incomplete.");const u=c+1;n=s.substring(0,u),r=s.length>u?s.substring(u):null}const i=tn.parse(n),o=JSON.parse(i[0]);if(o.type)throw new Error("Expected a handshake response from the server.");return[r,o]}}var Se;(function(t){t[t.Invocation=1]="Invocation",t[t.StreamItem=2]="StreamItem",t[t.Completion=3]="Completion",t[t.StreamInvocation=4]="StreamInvocation",t[t.CancelInvocation=5]="CancelInvocation",t[t.Ping=6]="Ping",t[t.Close=7]="Close",t[t.Ack=8]="Ack",t[t.Sequence=9]="Sequence"})(Se||(Se={}));class K0{constructor(){this.observers=[]}next(e){for(const n of this.observers)n.next(e)}error(e){for(const n of this.observers)n.error&&n.error(e)}complete(){for(const e of this.observers)e.complete&&e.complete()}subscribe(e){return this.observers.push(e),new $0(this,e)}}class X0{constructor(e,n,r){this._bufferSize=1e5,this._messages=[],this._totalMessageCount=0,this._waitForSequenceMessage=!1,this._nextReceivingSequenceId=1,this._latestReceivedSequenceId=0,this._bufferedByteCount=0,this._reconnectInProgress=!1,this._protocol=e,this._connection=n,this._bufferSize=r}async _send(e){const n=this._protocol.writeMessage(e);let r=Promise.resolve();if(this._isInvocationMessage(e)){this._totalMessageCount++;let i=()=>{},o=()=>{};Yi(n)?this._bufferedByteCount+=n.byteLength:this._bufferedByteCount+=n.length,this._bufferedByteCount>=this._bufferSize&&(r=new Promise((a,s)=>{i=a,o=s})),this._messages.push(new J0(n,this._totalMessageCount,i,o))}try{this._reconnectInProgress||await this._connection.send(n)}catch{this._disconnected()}await r}_ack(e){let n=-1;for(let r=0;r<this._messages.length;r++){const i=this._messages[r];if(i._id<=e.sequenceId)n=r,Yi(i._message)?this._bufferedByteCount-=i._message.byteLength:this._bufferedByteCount-=i._message.length,i._resolver();else if(this._bufferedByteCount<this._bufferSize)i._resolver();else break}n!==-1&&(this._messages=this._messages.slice(n+1))}_shouldProcessMessage(e){if(this._waitForSequenceMessage)return e.type!==Se.Sequence?!1:(this._waitForSequenceMessage=!1,!0);if(!this._isInvocationMessage(e))return!0;const n=this._nextReceivingSequenceId;return this._nextReceivingSequenceId++,n<=this._latestReceivedSequenceId?(n===this._latestReceivedSequenceId&&this._ackTimer(),!1):(this._latestReceivedSequenceId=n,this._ackTimer(),!0)}_resetSequence(e){if(e.sequenceId>this._nextReceivingSequenceId){this._connection.stop(new Error("Sequence ID greater than amount of messages we've received."));return}this._nextReceivingSequenceId=e.sequenceId}_disconnected(){this._reconnectInProgress=!0,this._waitForSequenceMessage=!0}async _resend(){const e=this._messages.length!==0?this._messages[0]._id:this._totalMessageCount+1;await this._connection.send(this._protocol.writeMessage({type:Se.Sequence,sequenceId:e}));const n=this._messages;for(const r of n)await this._connection.send(r._message);this._reconnectInProgress=!1}_dispose(e){e??(e=new Error("Unable to reconnect to server."));for(const n of this._messages)n._rejector(e)}_isInvocationMessage(e){switch(e.type){case Se.Invocation:case Se.StreamItem:case Se.Completion:case Se.StreamInvocation:case Se.CancelInvocation:return!0;case Se.Close:case Se.Sequence:case Se.Ping:case Se.Ack:return!1}}_ackTimer(){this._ackTimerHandle===void 0&&(this._ackTimerHandle=setTimeout(async()=>{try{this._reconnectInProgress||await this._connection.send(this._protocol.writeMessage({type:Se.Ack,sequenceId:this._latestReceivedSequenceId}))}catch{}clearTimeout(this._ackTimerHandle),this._ackTimerHandle=void 0},1e3))}}class J0{constructor(e,n,r,i){this._message=e,this._id=n,this._resolver=r,this._rejector=i}}const G0=30*1e3,Q0=15*1e3,Z0=1e5;var Ke;(function(t){t.Disconnected="Disconnected",t.Connecting="Connecting",t.Connected="Connected",t.Disconnecting="Disconnecting",t.Reconnecting="Reconnecting"})(Ke||(Ke={}));class Vh{static create(e,n,r,i,o,a,s){return new Vh(e,n,r,i,o,a,s)}constructor(e,n,r,i,o,a,s){this._nextKeepAlive=0,this._freezeEventListener=()=>{this._logger.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://learn.microsoft.com/aspnet/core/signalr/javascript-client#bsleep")},ft.isRequired(e,"connection"),ft.isRequired(n,"logger"),ft.isRequired(r,"protocol"),this.serverTimeoutInMilliseconds=o??G0,this.keepAliveIntervalInMilliseconds=a??Q0,this._statefulReconnectBufferSize=s??Z0,this._logger=n,this._protocol=r,this.connection=e,this._reconnectPolicy=i,this._handshakeProtocol=new B0,this.connection.onreceive=c=>this._processIncomingData(c),this.connection.onclose=c=>this._connectionClosed(c),this._callbacks={},this._methods={},this._closedCallbacks=[],this._reconnectingCallbacks=[],this._reconnectedCallbacks=[],this._invocationId=0,this._receivedHandshakeResponse=!1,this._connectionState=Ke.Disconnected,this._connectionStarted=!1,this._cachedPingMessage=this._protocol.writeMessage({type:Se.Ping})}get state(){return this._connectionState}get connectionId(){return this.connection&&this.connection.connectionId||null}get baseUrl(){return this.connection.baseUrl||""}set baseUrl(e){if(this._connectionState!==Ke.Disconnected&&this._connectionState!==Ke.Reconnecting)throw new Error("The HubConnection must be in the Disconnected or Reconnecting state to change the url.");if(!e)throw new Error("The HubConnection url must be a valid url.");this.connection.baseUrl=e}start(){return this._startPromise=this._startWithStateTransitions(),this._startPromise}async _startWithStateTransitions(){if(this._connectionState!==Ke.Disconnected)return Promise.reject(new Error("Cannot start a HubConnection that is not in the 'Disconnected' state."));this._connectionState=Ke.Connecting,this._logger.log(N.Debug,"Starting HubConnection.");try{await this._startInternal(),tt.isBrowser&&window.document.addEventListener("freeze",this._freezeEventListener),this._connectionState=Ke.Connected,this._connectionStarted=!0,this._logger.log(N.Debug,"HubConnection connected successfully.")}catch(e){return this._connectionState=Ke.Disconnected,this._logger.log(N.Debug,`HubConnection failed to start successfully because of error '${e}'.`),Promise.reject(e)}}async _startInternal(){this._stopDuringStartError=void 0,this._receivedHandshakeResponse=!1;const e=new Promise((n,r)=>{this._handshakeResolver=n,this._handshakeRejecter=r});await this.connection.start(this._protocol.transferFormat);try{let n=this._protocol.version;this.connection.features.reconnect||(n=1);const r={protocol:this._protocol.name,version:n};if(this._logger.log(N.Debug,"Sending handshake request."),await this._sendMessage(this._handshakeProtocol.writeHandshakeRequest(r)),this._logger.log(N.Information,`Using HubProtocol '${this._protocol.name}'.`),this._cleanupTimeout(),this._resetTimeoutPeriod(),this._resetKeepAliveInterval(),await e,this._stopDuringStartError)throw this._stopDuringStartError;(this.connection.features.reconnect||!1)&&(this._messageBuffer=new X0(this._protocol,this.connection,this._statefulReconnectBufferSize),this.connection.features.disconnected=this._messageBuffer._disconnected.bind(this._messageBuffer),this.connection.features.resend=()=>{if(this._messageBuffer)return this._messageBuffer._resend()}),this.connection.features.inherentKeepAlive||await this._sendMessage(this._cachedPingMessage)}catch(n){throw this._logger.log(N.Debug,`Hub handshake failed with error '${n}' during start(). Stopping HubConnection.`),this._cleanupTimeout(),this._cleanupPingTimer(),await this.connection.stop(n),n}}async stop(){const e=this._startPromise;this.connection.features.reconnect=!1,this._stopPromise=this._stopInternal(),await this._stopPromise;try{await e}catch{}}_stopInternal(e){if(this._connectionState===Ke.Disconnected)return this._logger.log(N.Debug,`Call to HubConnection.stop(${e}) ignored because it is already in the disconnected state.`),Promise.resolve();if(this._connectionState===Ke.Disconnecting)return this._logger.log(N.Debug,`Call to HttpConnection.stop(${e}) ignored because the connection is already in the disconnecting state.`),this._stopPromise;const n=this._connectionState;return this._connectionState=Ke.Disconnecting,this._logger.log(N.Debug,"Stopping HubConnection."),this._reconnectDelayHandle?(this._logger.log(N.Debug,"Connection stopped during reconnect delay. Done reconnecting."),clearTimeout(this._reconnectDelayHandle),this._reconnectDelayHandle=void 0,this._completeClose(),Promise.resolve()):(n===Ke.Connected&&this._sendCloseMessage(),this._cleanupTimeout(),this._cleanupPingTimer(),this._stopDuringStartError=e||new Tn("The connection was stopped before the hub handshake could complete."),this.connection.stop(e))}async _sendCloseMessage(){try{await this._sendWithProtocol(this._createCloseMessage())}catch{}}stream(e,...n){const[r,i]=this._replaceStreamingParams(n),o=this._createStreamInvocation(e,n,i);let a;const s=new K0;return s.cancelCallback=()=>{const c=this._createCancelInvocation(o.invocationId);return delete this._callbacks[o.invocationId],a.then(()=>this._sendWithProtocol(c))},this._callbacks[o.invocationId]=(c,u)=>{if(u){s.error(u);return}else c&&(c.type===Se.Completion?c.error?s.error(new Error(c.error)):s.complete():s.next(c.item))},a=this._sendWithProtocol(o).catch(c=>{s.error(c),delete this._callbacks[o.invocationId]}),this._launchStreams(r,a),s}_sendMessage(e){return this._resetKeepAliveInterval(),this.connection.send(e)}_sendWithProtocol(e){return this._messageBuffer?this._messageBuffer._send(e):this._sendMessage(this._protocol.writeMessage(e))}send(e,...n){const[r,i]=this._replaceStreamingParams(n),o=this._sendWithProtocol(this._createInvocation(e,n,!0,i));return this._launchStreams(r,o),o}invoke(e,...n){const[r,i]=this._replaceStreamingParams(n),o=this._createInvocation(e,n,!1,i);return new Promise((s,c)=>{this._callbacks[o.invocationId]=(l,f)=>{if(f){c(f);return}else l&&(l.type===Se.Completion?l.error?c(new Error(l.error)):s(l.result):c(new Error(`Unexpected message type: ${l.type}`)))};const u=this._sendWithProtocol(o).catch(l=>{c(l),delete this._callbacks[o.invocationId]});this._launchStreams(r,u)})}on(e,n){!e||!n||(e=e.toLowerCase(),this._methods[e]||(this._methods[e]=[]),this._methods[e].indexOf(n)===-1&&this._methods[e].push(n))}off(e,n){if(!e)return;e=e.toLowerCase();const r=this._methods[e];if(r)if(n){const i=r.indexOf(n);i!==-1&&(r.splice(i,1),r.length===0&&delete this._methods[e])}else delete this._methods[e]}onclose(e){e&&this._closedCallbacks.push(e)}onreconnecting(e){e&&this._reconnectingCallbacks.push(e)}onreconnected(e){e&&this._reconnectedCallbacks.push(e)}_processIncomingData(e){if(this._cleanupTimeout(),this._receivedHandshakeResponse||(e=this._processHandshakeResponse(e),this._receivedHandshakeResponse=!0),e){const n=this._protocol.parseMessages(e,this._logger);for(const r of n)if(!(this._messageBuffer&&!this._messageBuffer._shouldProcessMessage(r)))switch(r.type){case Se.Invocation:this._invokeClientMethod(r).catch(i=>{this._logger.log(N.Error,`Invoke client method threw error: ${Ll(i)}`)});break;case Se.StreamItem:case Se.Completion:{const i=this._callbacks[r.invocationId];if(i){r.type===Se.Completion&&delete this._callbacks[r.invocationId];try{i(r)}catch(o){this._logger.log(N.Error,`Stream callback threw error: ${Ll(o)}`)}}break}case Se.Ping:break;case Se.Close:{this._logger.log(N.Information,"Close message received from server.");const i=r.error?new Error("Server returned an error on close: "+r.error):void 0;r.allowReconnect===!0?this.connection.stop(i):this._stopPromise=this._stopInternal(i);break}case Se.Ack:this._messageBuffer&&this._messageBuffer._ack(r);break;case Se.Sequence:this._messageBuffer&&this._messageBuffer._resetSequence(r);break;default:this._logger.log(N.Warning,`Invalid message type: ${r.type}.`);break}}this._resetTimeoutPeriod()}_processHandshakeResponse(e){let n,r;try{[r,n]=this._handshakeProtocol.parseHandshakeResponse(e)}catch(i){const o="Error parsing handshake response: "+i;this._logger.log(N.Error,o);const a=new Error(o);throw this._handshakeRejecter(a),a}if(n.error){const i="Server returned handshake error: "+n.error;this._logger.log(N.Error,i);const o=new Error(i);throw this._handshakeRejecter(o),o}else this._logger.log(N.Debug,"Server handshake complete.");return this._handshakeResolver(),r}_resetKeepAliveInterval(){this.connection.features.inherentKeepAlive||(this._nextKeepAlive=new Date().getTime()+this.keepAliveIntervalInMilliseconds,this._cleanupPingTimer())}_resetTimeoutPeriod(){if(!this.connection.features||!this.connection.features.inherentKeepAlive){this._timeoutHandle=setTimeout(()=>this.serverTimeout(),this.serverTimeoutInMilliseconds);let e=this._nextKeepAlive-new Date().getTime();if(e<0){this._connectionState===Ke.Connected&&this._trySendPingMessage();return}this._pingServerHandle===void 0&&(e<0&&(e=0),this._pingServerHandle=setTimeout(async()=>{this._connectionState===Ke.Connected&&await this._trySendPingMessage()},e))}}serverTimeout(){this.connection.stop(new Error("Server timeout elapsed without receiving a message from the server."))}async _invokeClientMethod(e){const n=e.target.toLowerCase(),r=this._methods[n];if(!r){this._logger.log(N.Warning,`No client method with the name '${n}' found.`),e.invocationId&&(this._logger.log(N.Warning,`No result given for '${n}' method and invocation ID '${e.invocationId}'.`),await this._sendWithProtocol(this._createCompletionMessage(e.invocationId,"Client didn't provide a result.",null)));return}const i=r.slice(),o=!!e.invocationId;let a,s,c;for(const u of i)try{const l=a;a=await u.apply(this,e.arguments),o&&a&&l&&(this._logger.log(N.Error,`Multiple results provided for '${n}'. Sending error to server.`),c=this._createCompletionMessage(e.invocationId,"Client provided multiple results.",null)),s=void 0}catch(l){s=l,this._logger.log(N.Error,`A callback for the method '${n}' threw error '${l}'.`)}c?await this._sendWithProtocol(c):o?(s?c=this._createCompletionMessage(e.invocationId,`${s}`,null):a!==void 0?c=this._createCompletionMessage(e.invocationId,null,a):(this._logger.log(N.Warning,`No result given for '${n}' method and invocation ID '${e.invocationId}'.`),c=this._createCompletionMessage(e.invocationId,"Client didn't provide a result.",null)),await this._sendWithProtocol(c)):a&&this._logger.log(N.Error,`Result given for '${n}' method but server is not expecting a result.`)}_connectionClosed(e){this._logger.log(N.Debug,`HubConnection.connectionClosed(${e}) called while in state ${this._connectionState}.`),this._stopDuringStartError=this._stopDuringStartError||e||new Tn("The underlying connection was closed before the hub handshake could complete."),this._handshakeResolver&&this._handshakeResolver(),this._cancelCallbacksWithError(e||new Error("Invocation canceled due to the underlying connection being closed.")),this._cleanupTimeout(),this._cleanupPingTimer(),this._connectionState===Ke.Disconnecting?this._completeClose(e):this._connectionState===Ke.Connected&&this._reconnectPolicy?this._reconnect(e):this._connectionState===Ke.Connected&&this._completeClose(e)}_completeClose(e){if(this._connectionStarted){this._connectionState=Ke.Disconnected,this._connectionStarted=!1,this._messageBuffer&&(this._messageBuffer._dispose(e??new Error("Connection closed.")),this._messageBuffer=void 0),tt.isBrowser&&window.document.removeEventListener("freeze",this._freezeEventListener);try{this._closedCallbacks.forEach(n=>n.apply(this,[e]))}catch(n){this._logger.log(N.Error,`An onclose callback called with error '${e}' threw error '${n}'.`)}}}async _reconnect(e){const n=Date.now();let r=0,i=e!==void 0?e:new Error("Attempting to reconnect due to a unknown error."),o=this._getNextRetryDelay(r,0,i);if(o===null){this._logger.log(N.Debug,"Connection not reconnecting because the IRetryPolicy returned null on the first reconnect attempt."),this._completeClose(e);return}if(this._connectionState=Ke.Reconnecting,e?this._logger.log(N.Information,`Connection reconnecting because of error '${e}'.`):this._logger.log(N.Information,"Connection reconnecting."),this._reconnectingCallbacks.length!==0){try{this._reconnectingCallbacks.forEach(a=>a.apply(this,[e]))}catch(a){this._logger.log(N.Error,`An onreconnecting callback called with error '${e}' threw error '${a}'.`)}if(this._connectionState!==Ke.Reconnecting){this._logger.log(N.Debug,"Connection left the reconnecting state in onreconnecting callback. Done reconnecting.");return}}for(;o!==null;){if(this._logger.log(N.Information,`Reconnect attempt number ${r+1} will start in ${o} ms.`),await new Promise(a=>{this._reconnectDelayHandle=setTimeout(a,o)}),this._reconnectDelayHandle=void 0,this._connectionState!==Ke.Reconnecting){this._logger.log(N.Debug,"Connection left the reconnecting state during reconnect delay. Done reconnecting.");return}try{if(await this._startInternal(),this._connectionState=Ke.Connected,this._logger.log(N.Information,"HubConnection reconnected successfully."),this._reconnectedCallbacks.length!==0)try{this._reconnectedCallbacks.forEach(a=>a.apply(this,[this.connection.connectionId]))}catch(a){this._logger.log(N.Error,`An onreconnected callback called with connectionId '${this.connection.connectionId}; threw error '${a}'.`)}return}catch(a){if(this._logger.log(N.Information,`Reconnect attempt failed because of error '${a}'.`),this._connectionState!==Ke.Reconnecting){this._logger.log(N.Debug,`Connection moved to the '${this._connectionState}' from the reconnecting state during reconnect attempt. Done reconnecting.`),this._connectionState===Ke.Disconnecting&&this._completeClose();return}r++,i=a instanceof Error?a:new Error(a.toString()),o=this._getNextRetryDelay(r,Date.now()-n,i)}}this._logger.log(N.Information,`Reconnect retries have been exhausted after ${Date.now()-n} ms and ${r} failed attempts. Connection disconnecting.`),this._completeClose()}_getNextRetryDelay(e,n,r){try{return this._reconnectPolicy.nextRetryDelayInMilliseconds({elapsedMilliseconds:n,previousRetryCount:e,retryReason:r})}catch(i){return this._logger.log(N.Error,`IRetryPolicy.nextRetryDelayInMilliseconds(${e}, ${n}) threw error '${i}'.`),null}}_cancelCallbacksWithError(e){const n=this._callbacks;this._callbacks={},Object.keys(n).forEach(r=>{const i=n[r];try{i(null,e)}catch(o){this._logger.log(N.Error,`Stream 'error' callback called with '${e}' threw error: ${Ll(o)}`)}})}_cleanupPingTimer(){this._pingServerHandle&&(clearTimeout(this._pingServerHandle),this._pingServerHandle=void 0)}_cleanupTimeout(){this._timeoutHandle&&clearTimeout(this._timeoutHandle)}_createInvocation(e,n,r,i){if(r)return i.length!==0?{target:e,arguments:n,streamIds:i,type:Se.Invocation}:{target:e,arguments:n,type:Se.Invocation};{const o=this._invocationId;return this._invocationId++,i.length!==0?{target:e,arguments:n,invocationId:o.toString(),streamIds:i,type:Se.Invocation}:{target:e,arguments:n,invocationId:o.toString(),type:Se.Invocation}}}_launchStreams(e,n){if(e.length!==0){n||(n=Promise.resolve());for(const r in e)e[r].subscribe({complete:()=>{n=n.then(()=>this._sendWithProtocol(this._createCompletionMessage(r)))},error:i=>{let o;i instanceof Error?o=i.message:i&&i.toString?o=i.toString():o="Unknown error",n=n.then(()=>this._sendWithProtocol(this._createCompletionMessage(r,o)))},next:i=>{n=n.then(()=>this._sendWithProtocol(this._createStreamItemMessage(r,i)))}})}}_replaceStreamingParams(e){const n=[],r=[];for(let i=0;i<e.length;i++){const o=e[i];if(this._isObservable(o)){const a=this._invocationId;this._invocationId++,n[a]=o,r.push(a.toString()),e.splice(i,1)}}return[n,r]}_isObservable(e){return e&&e.subscribe&&typeof e.subscribe=="function"}_createStreamInvocation(e,n,r){const i=this._invocationId;return this._invocationId++,r.length!==0?{target:e,arguments:n,invocationId:i.toString(),streamIds:r,type:Se.StreamInvocation}:{target:e,arguments:n,invocationId:i.toString(),type:Se.StreamInvocation}}_createCancelInvocation(e){return{invocationId:e,type:Se.CancelInvocation}}_createStreamItemMessage(e,n){return{invocationId:e,item:n,type:Se.StreamItem}}_createCompletionMessage(e,n,r){return n?{error:n,invocationId:e,type:Se.Completion}:{invocationId:e,result:r,type:Se.Completion}}_createCloseMessage(){return{type:Se.Close}}async _trySendPingMessage(){try{await this._sendMessage(this._cachedPingMessage)}catch{this._cleanupPingTimer()}}}const Y0=[0,2e3,1e4,3e4,null];class Kp{constructor(e){this._retryDelays=e!==void 0?[...e,null]:Y0}nextRetryDelayInMilliseconds(e){return this._retryDelays[e.previousRetryCount]}}class Fi{}Fi.Authorization="Authorization";Fi.Cookie="Cookie";class eb extends hl{constructor(e,n){super(),this._innerClient=e,this._accessTokenFactory=n}async send(e){let n=!0;this._accessTokenFactory&&(!this._accessToken||e.url&&e.url.indexOf("/negotiate?")>0)&&(n=!1,this._accessToken=await this._accessTokenFactory()),this._setAuthorizationHeader(e);const r=await this._innerClient.send(e);return n&&r.statusCode===401&&this._accessTokenFactory?(this._accessToken=await this._accessTokenFactory(),this._setAuthorizationHeader(e),await this._innerClient.send(e)):r}_setAuthorizationHeader(e){e.headers||(e.headers={}),this._accessToken?e.headers[Fi.Authorization]=`Bearer ${this._accessToken}`:this._accessTokenFactory&&e.headers[Fi.Authorization]&&delete e.headers[Fi.Authorization]}getCookieString(e){return this._innerClient.getCookieString(e)}}var ct;(function(t){t[t.None=0]="None",t[t.WebSockets=1]="WebSockets",t[t.ServerSentEvents=2]="ServerSentEvents",t[t.LongPolling=4]="LongPolling"})(ct||(ct={}));var Pt;(function(t){t[t.Text=1]="Text",t[t.Binary=2]="Binary"})(Pt||(Pt={}));let tb=class{constructor(){this._isAborted=!1,this.onabort=null}abort(){this._isAborted||(this._isAborted=!0,this.onabort&&this.onabort())}get signal(){return this}get aborted(){return this._isAborted}};class Xp{get pollAborted(){return this._pollAbort.aborted}constructor(e,n,r){this._httpClient=e,this._logger=n,this._pollAbort=new tb,this._options=r,this._running=!1,this.onreceive=null,this.onclose=null}async connect(e,n){if(ft.isRequired(e,"url"),ft.isRequired(n,"transferFormat"),ft.isIn(n,Pt,"transferFormat"),this._url=e,this._logger.log(N.Trace,"(LongPolling transport) Connecting."),n===Pt.Binary&&typeof XMLHttpRequest<"u"&&typeof new XMLHttpRequest().responseType!="string")throw new Error("Binary protocols over XmlHttpRequest not implementing advanced features are not supported.");const[r,i]=Ca(),o={[r]:i,...this._options.headers},a={abortSignal:this._pollAbort.signal,headers:o,timeout:1e5,withCredentials:this._options.withCredentials};n===Pt.Binary&&(a.responseType="arraybuffer");const s=`${e}&_=${Date.now()}`;this._logger.log(N.Trace,`(LongPolling transport) polling: ${s}.`);const c=await this._httpClient.get(s,a);c.statusCode!==200?(this._logger.log(N.Error,`(LongPolling transport) Unexpected response code: ${c.statusCode}.`),this._closeError=new Oi(c.statusText||"",c.statusCode),this._running=!1):this._running=!0,this._receiving=this._poll(this._url,a)}async _poll(e,n){try{for(;this._running;)try{const r=`${e}&_=${Date.now()}`;this._logger.log(N.Trace,`(LongPolling transport) polling: ${r}.`);const i=await this._httpClient.get(r,n);i.statusCode===204?(this._logger.log(N.Information,"(LongPolling transport) Poll terminated by server."),this._running=!1):i.statusCode!==200?(this._logger.log(N.Error,`(LongPolling transport) Unexpected response code: ${i.statusCode}.`),this._closeError=new Oi(i.statusText||"",i.statusCode),this._running=!1):i.content?(this._logger.log(N.Trace,`(LongPolling transport) data received. ${Us(i.content,this._options.logMessageContent)}.`),this.onreceive&&this.onreceive(i.content)):this._logger.log(N.Trace,"(LongPolling transport) Poll timed out, reissuing.")}catch(r){this._running?r instanceof qh?this._logger.log(N.Trace,"(LongPolling transport) Poll timed out, reissuing."):(this._closeError=r,this._running=!1):this._logger.log(N.Trace,`(LongPolling transport) Poll errored after shutdown: ${r.message}`)}}finally{this._logger.log(N.Trace,"(LongPolling transport) Polling complete."),this.pollAborted||this._raiseOnClose()}}async send(e){return this._running?om(this._logger,"LongPolling",this._httpClient,this._url,e,this._options):Promise.reject(new Error("Cannot send until the transport is connected"))}async stop(){this._logger.log(N.Trace,"(LongPolling transport) Stopping polling."),this._running=!1,this._pollAbort.abort();try{await this._receiving,this._logger.log(N.Trace,`(LongPolling transport) sending DELETE request to ${this._url}.`);const e={},[n,r]=Ca();e[n]=r;const i={headers:{...e,...this._options.headers},timeout:this._options.timeout,withCredentials:this._options.withCredentials};let o;try{await this._httpClient.delete(this._url,i)}catch(a){o=a}o?o instanceof Oi&&(o.statusCode===404?this._logger.log(N.Trace,"(LongPolling transport) A 404 response was returned from sending a DELETE request."):this._logger.log(N.Trace,`(LongPolling transport) Error sending a DELETE request: ${o}`)):this._logger.log(N.Trace,"(LongPolling transport) DELETE request accepted.")}finally{this._logger.log(N.Trace,"(LongPolling transport) Stop finished."),this._raiseOnClose()}}_raiseOnClose(){if(this.onclose){let e="(LongPolling transport) Firing onclose event.";this._closeError&&(e+=" Error: "+this._closeError),this._logger.log(N.Trace,e),this.onclose(this._closeError)}}}class nb{constructor(e,n,r,i){this._httpClient=e,this._accessToken=n,this._logger=r,this._options=i,this.onreceive=null,this.onclose=null}async connect(e,n){return ft.isRequired(e,"url"),ft.isRequired(n,"transferFormat"),ft.isIn(n,Pt,"transferFormat"),this._logger.log(N.Trace,"(SSE transport) Connecting."),this._url=e,this._accessToken&&(e+=(e.indexOf("?")<0?"?":"&")+`access_token=${encodeURIComponent(this._accessToken)}`),new Promise((r,i)=>{let o=!1;if(n!==Pt.Text){i(new Error("The Server-Sent Events transport only supports the 'Text' transfer format"));return}let a;if(tt.isBrowser||tt.isWebWorker)a=new this._options.EventSource(e,{withCredentials:this._options.withCredentials});else{const s=this._httpClient.getCookieString(e),c={};c.Cookie=s;const[u,l]=Ca();c[u]=l,a=new this._options.EventSource(e,{withCredentials:this._options.withCredentials,headers:{...c,...this._options.headers}})}try{a.onmessage=s=>{if(this.onreceive)try{this._logger.log(N.Trace,`(SSE transport) data received. ${Us(s.data,this._options.logMessageContent)}.`),this.onreceive(s.data)}catch(c){this._close(c);return}},a.onerror=s=>{o?this._close():i(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."))},a.onopen=()=>{this._logger.log(N.Information,`SSE connected to ${this._url}`),this._eventSource=a,o=!0,r()}}catch(s){i(s);return}})}async send(e){return this._eventSource?om(this._logger,"SSE",this._httpClient,this._url,e,this._options):Promise.reject(new Error("Cannot send until the transport is connected"))}stop(){return this._close(),Promise.resolve()}_close(e){this._eventSource&&(this._eventSource.close(),this._eventSource=void 0,this.onclose&&this.onclose(e))}}class rb{constructor(e,n,r,i,o,a){this._logger=r,this._accessTokenFactory=n,this._logMessageContent=i,this._webSocketConstructor=o,this._httpClient=e,this.onreceive=null,this.onclose=null,this._headers=a}async connect(e,n){ft.isRequired(e,"url"),ft.isRequired(n,"transferFormat"),ft.isIn(n,Pt,"transferFormat"),this._logger.log(N.Trace,"(WebSockets transport) Connecting.");let r;return this._accessTokenFactory&&(r=await this._accessTokenFactory()),new Promise((i,o)=>{e=e.replace(/^http/,"ws");let a;const s=this._httpClient.getCookieString(e);let c=!1;if(tt.isNode||tt.isReactNative){const u={},[l,f]=Ca();u[l]=f,r&&(u[Fi.Authorization]=`Bearer ${r}`),s&&(u[Fi.Cookie]=s),a=new this._webSocketConstructor(e,void 0,{headers:{...u,...this._headers}})}else r&&(e+=(e.indexOf("?")<0?"?":"&")+`access_token=${encodeURIComponent(r)}`);a||(a=new this._webSocketConstructor(e)),n===Pt.Binary&&(a.binaryType="arraybuffer"),a.onopen=u=>{this._logger.log(N.Information,`WebSocket connected to ${e}.`),this._webSocket=a,c=!0,i()},a.onerror=u=>{let l=null;typeof ErrorEvent<"u"&&u instanceof ErrorEvent?l=u.error:l="There was an error with the transport",this._logger.log(N.Information,`(WebSockets transport) ${l}.`)},a.onmessage=u=>{if(this._logger.log(N.Trace,`(WebSockets transport) data received. ${Us(u.data,this._logMessageContent)}.`),this.onreceive)try{this.onreceive(u.data)}catch(l){this._close(l);return}},a.onclose=u=>{if(c)this._close(u);else{let l=null;typeof ErrorEvent<"u"&&u instanceof ErrorEvent?l=u.error:l="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.",o(new Error(l))}}})}send(e){return this._webSocket&&this._webSocket.readyState===this._webSocketConstructor.OPEN?(this._logger.log(N.Trace,`(WebSockets transport) sending data. ${Us(e,this._logMessageContent)}.`),this._webSocket.send(e),Promise.resolve()):Promise.reject("WebSocket is not in the OPEN state")}stop(){return this._webSocket&&this._close(void 0),Promise.resolve()}_close(e){this._webSocket&&(this._webSocket.onclose=()=>{},this._webSocket.onmessage=()=>{},this._webSocket.onerror=()=>{},this._webSocket.close(),this._webSocket=void 0),this._logger.log(N.Trace,"(WebSockets transport) socket closed."),this.onclose&&(this._isCloseEvent(e)&&(e.wasClean===!1||e.code!==1e3)?this.onclose(new Error(`WebSocket closed with status code: ${e.code} (${e.reason||"no reason given"}).`)):e instanceof Error?this.onclose(e):this.onclose())}_isCloseEvent(e){return e&&typeof e.wasClean=="boolean"&&typeof e.code=="number"}}const Jp=100;class ib{constructor(e,n={}){if(this._stopPromiseResolver=()=>{},this.features={},this._negotiateVersion=1,ft.isRequired(e,"url"),this._logger=N0(n.logger),this.baseUrl=this._resolveUrl(e),n=n||{},n.logMessageContent=n.logMessageContent===void 0?!1:n.logMessageContent,typeof n.withCredentials=="boolean"||n.withCredentials===void 0)n.withCredentials=n.withCredentials===void 0?!0:n.withCredentials;else throw new Error("withCredentials option was not a 'boolean' or 'undefined' value");n.timeout=n.timeout===void 0?100*1e3:n.timeout;let r=null,i=null;if(tt.isNode&&typeof require<"u"){const o=typeof __webpack_require__=="function"?__non_webpack_require__:require;r=o("ws"),i=o("eventsource")}!tt.isNode&&typeof WebSocket<"u"&&!n.WebSocket?n.WebSocket=WebSocket:tt.isNode&&!n.WebSocket&&r&&(n.WebSocket=r),!tt.isNode&&typeof EventSource<"u"&&!n.EventSource?n.EventSource=EventSource:tt.isNode&&!n.EventSource&&typeof i<"u"&&(n.EventSource=i),this._httpClient=new eb(n.httpClient||new V0(this._logger),n.accessTokenFactory),this._connectionState="Disconnected",this._connectionStarted=!1,this._options=n,this.onreceive=null,this.onclose=null}async start(e){if(e=e||Pt.Binary,ft.isIn(e,Pt,"transferFormat"),this._logger.log(N.Debug,`Starting connection with transfer format '${Pt[e]}'.`),this._connectionState!=="Disconnected")return Promise.reject(new Error("Cannot start an HttpConnection that is not in the 'Disconnected' state."));if(this._connectionState="Connecting",this._startInternalPromise=this._startInternal(e),await this._startInternalPromise,this._connectionState==="Disconnecting"){const n="Failed to start the HttpConnection before stop() was called.";return this._logger.log(N.Error,n),await this._stopPromise,Promise.reject(new Tn(n))}else if(this._connectionState!=="Connected"){const n="HttpConnection.startInternal completed gracefully but didn't enter the connection into the connected state!";return this._logger.log(N.Error,n),Promise.reject(new Tn(n))}this._connectionStarted=!0}send(e){return this._connectionState!=="Connected"?Promise.reject(new Error("Cannot send data if the connection is not in the 'Connected' State.")):(this._sendQueue||(this._sendQueue=new Bh(this.transport)),this._sendQueue.send(e))}async stop(e){if(this._connectionState==="Disconnected")return this._logger.log(N.Debug,`Call to HttpConnection.stop(${e}) ignored because the connection is already in the disconnected state.`),Promise.resolve();if(this._connectionState==="Disconnecting")return this._logger.log(N.Debug,`Call to HttpConnection.stop(${e}) ignored because the connection is already in the disconnecting state.`),this._stopPromise;this._connectionState="Disconnecting",this._stopPromise=new Promise(n=>{this._stopPromiseResolver=n}),await this._stopInternal(e),await this._stopPromise}async _stopInternal(e){this._stopError=e;try{await this._startInternalPromise}catch{}if(this.transport){try{await this.transport.stop()}catch(n){this._logger.log(N.Error,`HttpConnection.transport.stop() threw error '${n}'.`),this._stopConnection()}this.transport=void 0}else this._logger.log(N.Debug,"HttpConnection.transport is undefined in HttpConnection.stop() because start() failed.")}async _startInternal(e){let n=this.baseUrl;this._accessTokenFactory=this._options.accessTokenFactory,this._httpClient._accessTokenFactory=this._accessTokenFactory;try{if(this._options.skipNegotiation)if(this._options.transport===ct.WebSockets)this.transport=this._constructTransport(ct.WebSockets),await this._startTransport(n,e);else throw new Error("Negotiation can only be skipped when using the WebSocket transport directly.");else{let r=null,i=0;do{if(r=await this._getNegotiationResponse(n),this._connectionState==="Disconnecting"||this._connectionState==="Disconnected")throw new Tn("The connection was stopped during negotiation.");if(r.error)throw new Error(r.error);if(r.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(r.url&&(n=r.url),r.accessToken){const o=r.accessToken;this._accessTokenFactory=()=>o,this._httpClient._accessToken=o,this._httpClient._accessTokenFactory=void 0}i++}while(r.url&&i<Jp);if(i===Jp&&r.url)throw new Error("Negotiate redirection limit exceeded.");await this._createTransport(n,this._options.transport,r,e)}this.transport instanceof Xp&&(this.features.inherentKeepAlive=!0),this._connectionState==="Connecting"&&(this._logger.log(N.Debug,"The HttpConnection connected successfully."),this._connectionState="Connected")}catch(r){return this._logger.log(N.Error,"Failed to start the connection: "+r),this._connectionState="Disconnected",this.transport=void 0,this._stopPromiseResolver(),Promise.reject(r)}}async _getNegotiationResponse(e){const n={},[r,i]=Ca();n[r]=i;const o=this._resolveNegotiateUrl(e);this._logger.log(N.Debug,`Sending negotiation request: ${o}.`);try{const a=await this._httpClient.post(o,{content:"",headers:{...n,...this._options.headers},timeout:this._options.timeout,withCredentials:this._options.withCredentials});if(a.statusCode!==200)return Promise.reject(new Error(`Unexpected status code returned from negotiate '${a.statusCode}'`));const s=JSON.parse(a.content);return(!s.negotiateVersion||s.negotiateVersion<1)&&(s.connectionToken=s.connectionId),s.useStatefulReconnect&&this._options._useStatefulReconnect!==!0?Promise.reject(new Vp("Client didn't negotiate Stateful Reconnect but the server did.")):s}catch(a){let s="Failed to complete negotiation with the server: "+a;return a instanceof Oi&&a.statusCode===404&&(s=s+" Either this is not a SignalR endpoint or there is a proxy blocking the connection."),this._logger.log(N.Error,s),Promise.reject(new Vp(s))}}_createConnectUrl(e,n){return n?e+(e.indexOf("?")===-1?"?":"&")+`id=${n}`:e}async _createTransport(e,n,r,i){let o=this._createConnectUrl(e,r.connectionToken);if(this._isITransport(n)){this._logger.log(N.Debug,"Connection was provided an instance of ITransport, using that directly."),this.transport=n,await this._startTransport(o,i),this.connectionId=r.connectionId;return}const a=[],s=r.availableTransports||[];let c=r;for(const u of s){const l=this._resolveTransportOrError(u,n,i,(c==null?void 0:c.useStatefulReconnect)===!0);if(l instanceof Error)a.push(`${u.transport} failed:`),a.push(l);else if(this._isITransport(l)){if(this.transport=l,!c){try{c=await this._getNegotiationResponse(e)}catch(f){return Promise.reject(f)}o=this._createConnectUrl(e,c.connectionToken)}try{await this._startTransport(o,i),this.connectionId=c.connectionId;return}catch(f){if(this._logger.log(N.Error,`Failed to start the transport '${u.transport}': ${f}`),c=void 0,a.push(new A0(`${u.transport} failed: ${f}`,ct[u.transport])),this._connectionState!=="Connecting"){const m="Failed to select transport before stop() was called.";return this._logger.log(N.Debug,m),Promise.reject(new Tn(m))}}}}return a.length>0?Promise.reject(new M0(`Unable to connect to the server with any of the available transports. ${a.join(" ")}`,a)):Promise.reject(new Error("None of the transports supported by the client are supported by the server."))}_constructTransport(e){switch(e){case ct.WebSockets:if(!this._options.WebSocket)throw new Error("'WebSocket' is not supported in your environment.");return new rb(this._httpClient,this._accessTokenFactory,this._logger,this._options.logMessageContent,this._options.WebSocket,this._options.headers||{});case ct.ServerSentEvents:if(!this._options.EventSource)throw new Error("'EventSource' is not supported in your environment.");return new nb(this._httpClient,this._httpClient._accessToken,this._logger,this._options);case ct.LongPolling:return new Xp(this._httpClient,this._logger,this._options);default:throw new Error(`Unknown transport: ${e}.`)}}_startTransport(e,n){return this.transport.onreceive=this.onreceive,this.features.reconnect?this.transport.onclose=async r=>{let i=!1;if(this.features.reconnect)try{this.features.disconnected(),await this.transport.connect(e,n),await this.features.resend()}catch{i=!0}else{this._stopConnection(r);return}i&&this._stopConnection(r)}:this.transport.onclose=r=>this._stopConnection(r),this.transport.connect(e,n)}_resolveTransportOrError(e,n,r,i){const o=ct[e.transport];if(o==null)return this._logger.log(N.Debug,`Skipping transport '${e.transport}' because it is not supported by this client.`),new Error(`Skipping transport '${e.transport}' because it is not supported by this client.`);if(ob(n,o))if(e.transferFormats.map(s=>Pt[s]).indexOf(r)>=0){if(o===ct.WebSockets&&!this._options.WebSocket||o===ct.ServerSentEvents&&!this._options.EventSource)return this._logger.log(N.Debug,`Skipping transport '${ct[o]}' because it is not supported in your environment.'`),new D0(`'${ct[o]}' is not supported in your environment.`,o);this._logger.log(N.Debug,`Selecting transport '${ct[o]}'.`);try{return this.features.reconnect=o===ct.WebSockets?i:void 0,this._constructTransport(o)}catch(s){return s}}else return this._logger.log(N.Debug,`Skipping transport '${ct[o]}' because it does not support the requested transfer format '${Pt[r]}'.`),new Error(`'${ct[o]}' does not support ${Pt[r]}.`);else return this._logger.log(N.Debug,`Skipping transport '${ct[o]}' because it was disabled by the client.`),new R0(`'${ct[o]}' is disabled by the client.`,o)}_isITransport(e){return e&&typeof e=="object"&&"connect"in e}_stopConnection(e){if(this._logger.log(N.Debug,`HttpConnection.stopConnection(${e}) called while in state ${this._connectionState}.`),this.transport=void 0,e=this._stopError||e,this._stopError=void 0,this._connectionState==="Disconnected"){this._logger.log(N.Debug,`Call to HttpConnection.stopConnection(${e}) was ignored because the connection is already in the disconnected state.`);return}if(this._connectionState==="Connecting")throw this._logger.log(N.Warning,`Call to HttpConnection.stopConnection(${e}) was ignored because the connection is still in the connecting state.`),new Error(`HttpConnection.stopConnection(${e}) was called while the connection is still in the connecting state.`);if(this._connectionState==="Disconnecting"&&this._stopPromiseResolver(),e?this._logger.log(N.Error,`Connection disconnected with error '${e}'.`):this._logger.log(N.Information,"Connection disconnected."),this._sendQueue&&(this._sendQueue.stop().catch(n=>{this._logger.log(N.Error,`TransportSendQueue.stop() threw error '${n}'.`)}),this._sendQueue=void 0),this.connectionId=void 0,this._connectionState="Disconnected",this._connectionStarted){this._connectionStarted=!1;try{this.onclose&&this.onclose(e)}catch(n){this._logger.log(N.Error,`HttpConnection.onclose(${e}) threw error '${n}'.`)}}}_resolveUrl(e){if(e.lastIndexOf("https://",0)===0||e.lastIndexOf("http://",0)===0)return e;if(!tt.isBrowser)throw new Error(`Cannot resolve '${e}'.`);const n=window.document.createElement("a");return n.href=e,this._logger.log(N.Information,`Normalizing '${e}' to '${n.href}'.`),n.href}_resolveNegotiateUrl(e){const n=new URL(e);n.pathname.endsWith("/")?n.pathname+="negotiate":n.pathname+="/negotiate";const r=new URLSearchParams(n.searchParams);return r.has("negotiateVersion")||r.append("negotiateVersion",this._negotiateVersion.toString()),r.has("useStatefulReconnect")?r.get("useStatefulReconnect")==="true"&&(this._options._useStatefulReconnect=!0):this._options._useStatefulReconnect===!0&&r.append("useStatefulReconnect","true"),n.search=r.toString(),n.toString()}}function ob(t,e){return!t||(e&t)!==0}class Bh{constructor(e){this._transport=e,this._buffer=[],this._executing=!0,this._sendBufferedData=new vc,this._transportResult=new vc,this._sendLoopPromise=this._sendLoop()}send(e){return this._bufferData(e),this._transportResult||(this._transportResult=new vc),this._transportResult.promise}stop(){return this._executing=!1,this._sendBufferedData.resolve(),this._sendLoopPromise}_bufferData(e){if(this._buffer.length&&typeof this._buffer[0]!=typeof e)throw new Error(`Expected data to be of type ${typeof this._buffer} but was of type ${typeof e}`);this._buffer.push(e),this._sendBufferedData.resolve()}async _sendLoop(){for(;;){if(await this._sendBufferedData.promise,!this._executing){this._transportResult&&this._transportResult.reject("Connection stopped.");break}this._sendBufferedData=new vc;const e=this._transportResult;this._transportResult=void 0;const n=typeof this._buffer[0]=="string"?this._buffer.join(""):Bh._concatBuffers(this._buffer);this._buffer.length=0;try{await this._transport.send(n),e.resolve()}catch(r){e.reject(r)}}}static _concatBuffers(e){const n=e.map(o=>o.byteLength).reduce((o,a)=>o+a),r=new Uint8Array(n);let i=0;for(const o of e)r.set(new Uint8Array(o),i),i+=o.byteLength;return r.buffer}}class vc{constructor(){this.promise=new Promise((e,n)=>[this._resolver,this._rejecter]=[e,n])}resolve(){this._resolver()}reject(e){this._rejecter(e)}}const ab="json";class sb{constructor(){this.name=ab,this.version=2,this.transferFormat=Pt.Text}parseMessages(e,n){if(typeof e!="string")throw new Error("Invalid input for JSON hub protocol. Expected a string.");if(!e)return[];n===null&&(n=zs.instance);const r=tn.parse(e),i=[];for(const o of r){const a=JSON.parse(o);if(typeof a.type!="number")throw new Error("Invalid payload.");switch(a.type){case Se.Invocation:this._isInvocationMessage(a);break;case Se.StreamItem:this._isStreamItemMessage(a);break;case Se.Completion:this._isCompletionMessage(a);break;case Se.Ping:break;case Se.Close:break;case Se.Ack:this._isAckMessage(a);break;case Se.Sequence:this._isSequenceMessage(a);break;default:n.log(N.Information,"Unknown message type '"+a.type+"' ignored.");continue}i.push(a)}return i}writeMessage(e){return tn.write(JSON.stringify(e))}_isInvocationMessage(e){this._assertNotEmptyString(e.target,"Invalid payload for Invocation message."),e.invocationId!==void 0&&this._assertNotEmptyString(e.invocationId,"Invalid payload for Invocation message.")}_isStreamItemMessage(e){if(this._assertNotEmptyString(e.invocationId,"Invalid payload for StreamItem message."),e.item===void 0)throw new Error("Invalid payload for StreamItem message.")}_isCompletionMessage(e){if(e.result&&e.error)throw new Error("Invalid payload for Completion message.");!e.result&&e.error&&this._assertNotEmptyString(e.error,"Invalid payload for Completion message."),this._assertNotEmptyString(e.invocationId,"Invalid payload for Completion message.")}_isAckMessage(e){if(typeof e.sequenceId!="number")throw new Error("Invalid SequenceId for Ack message.")}_isSequenceMessage(e){if(typeof e.sequenceId!="number")throw new Error("Invalid SequenceId for Sequence message.")}_assertNotEmptyString(e,n){if(typeof e!="string"||e==="")throw new Error(n)}}const cb={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};function ub(t){const e=cb[t.toLowerCase()];if(typeof e<"u")return e;throw new Error(`Unknown log level: ${t}`)}class lb{configureLogging(e){if(ft.isRequired(e,"logging"),fb(e))this.logger=e;else if(typeof e=="string"){const n=ub(e);this.logger=new mu(n)}else this.logger=new mu(e);return this}withUrl(e,n){return ft.isRequired(e,"url"),ft.isNotEmpty(e,"url"),this.url=e,typeof n=="object"?this.httpConnectionOptions={...this.httpConnectionOptions,...n}:this.httpConnectionOptions={...this.httpConnectionOptions,transport:n},this}withHubProtocol(e){return ft.isRequired(e,"protocol"),this.protocol=e,this}withAutomaticReconnect(e){if(this.reconnectPolicy)throw new Error("A reconnectPolicy has already been set.");return e?Array.isArray(e)?this.reconnectPolicy=new Kp(e):this.reconnectPolicy=e:this.reconnectPolicy=new Kp,this}withServerTimeout(e){return ft.isRequired(e,"milliseconds"),this._serverTimeoutInMilliseconds=e,this}withKeepAliveInterval(e){return ft.isRequired(e,"milliseconds"),this._keepAliveIntervalInMilliseconds=e,this}withStatefulReconnect(e){return this.httpConnectionOptions===void 0&&(this.httpConnectionOptions={}),this.httpConnectionOptions._useStatefulReconnect=!0,this._statefulReconnectBufferSize=e==null?void 0:e.bufferSize,this}build(){const e=this.httpConnectionOptions||{};if(e.logger===void 0&&(e.logger=this.logger),!this.url)throw new Error("The 'HubConnectionBuilder.withUrl' method must be called before building the connection.");const n=new ib(this.url,e);return Vh.create(n,this.logger||zs.instance,this.protocol||new sb,this.reconnectPolicy,this._serverTimeoutInMilliseconds,this._keepAliveIntervalInMilliseconds,this._statefulReconnectBufferSize)}}function fb(t){return t.log!==void 0}const Gp=t=>{if(typeof t=="object"&&t!==null){if(typeof Object.getPrototypeOf=="function"){const e=Object.getPrototypeOf(t);return e===Object.prototype||e===null}return Object.prototype.toString.call(t)==="[object Object]"}return!1},Wn=(...t)=>t.reduce((e,n)=>{if(Array.isArray(n))throw new TypeError("Arguments provided to ts-deepmerge must be objects, not arrays.");return Object.keys(n).forEach(r=>{["__proto__","constructor","prototype"].includes(r)||(Array.isArray(e[r])&&Array.isArray(n[r])?e[r]=Wn.options.mergeArrays?Wn.options.uniqueArrayItems?Array.from(new Set(e[r].concat(n[r]))):[...e[r],...n[r]]:n[r]:Gp(e[r])&&Gp(n[r])?e[r]=Wn(e[r],n[r]):e[r]=n[r]===void 0?Wn.options.allowUndefinedOverrides?n[r]:e[r]:n[r])}),e},{}),pd={allowUndefinedOverrides:!0,mergeArrays:!0,uniqueArrayItems:!0};Wn.options=pd;Wn.withOptions=(t,...e)=>{Wn.options=Object.assign(Object.assign({},pd),t);const n=Wn(...e);return Wn.options=pd,n};var db=Object.defineProperty,am=t=>{throw TypeError(t)},hb=(t,e,n)=>e in t?db(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,eo=(t,e,n)=>hb(t,typeof e!="symbol"?e+"":e,n),Kh=(t,e,n)=>e.has(t)||am("Cannot "+n),S=(t,e,n)=>(Kh(t,e,"read from private field"),n?n.call(t):e.get(t)),fe=(t,e,n)=>e.has(t)?am("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),Ae=(t,e,n,r)=>(Kh(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n),nn=(t,e,n)=>(Kh(t,e,"access private method"),n),pb=(t,e,n,r)=>({set _(i){Ae(t,e,i,n)},get _(){return S(t,e,r)}});const gb="0.0.2-alpha6",oa={Text:"Text",Number:"Number",Logic:"Logic"},rn={ValueComponent:"ValueComponent",TableComponent:"TableComponent",RecordComponent:"RecordComponent",ResourceComponent:"ResourceComponent",GraphicComponent:"GraphicComponent",CheckoutComponent:"CheckoutComponent"},vb=t=>Object.values(rn).includes(t),mb=[rn.GraphicComponent,rn.CheckoutComponent,rn.ResourceComponent,rn.RecordComponent],hr={ValueEditor:"ValueEditor",TableEditor:"TableEditor",Fiber:"Fiber",FiberEditor:"FiberEditor"},yb=k.z.enum([hr.ValueEditor,hr.TableEditor,hr.Fiber,hr.FiberEditor]),Qp={Fiber:"fiber"},ir={CtrlFibers:"CtrlFibers"};function Hc(t){try{return[null,t()]}catch(e){if(e instanceof Error)return[e,null];throw e}}async function aa(t){try{return[null,await t]}catch(e){if(e instanceof Error)return[e,null];throw e}}function pl(t){return Hc(()=>JSON.parse(t))}const Er=t=>typeof t=="string",_b=t=>t===void 0||t==null||t===""||Ct(t)&&t.length===0,Ct=t=>Array.isArray(t),pr=t=>Object.prototype.toString.call(t)==="[object Object]",gd=async t=>new Promise(e=>setTimeout(e,t)),bb=k.z.string(),wb=k.z.enum([oa.Text,oa.Number,oa.Logic]),Cb=t=>wb.safeParse(t).success,sm=k.z.string(),Sb=t=>sm.safeParse(t).success,Ib=k.z.custom(t=>Er(t)&&t.toLowerCase()===t),Da=t=>(t==null?void 0:t.toLowerCase())??"",cm=k.z.string(),kb=k.z.custom(t=>Er(t)?new RegExp(`^${rn.ValueComponent}<.*>$`).test(t):!1),Tb=k.z.custom(t=>Er(t)?new RegExp(`^${rn.RecordComponent}<.*>$`).test(t):!1),Eb=k.z.custom(t=>Er(t)?new RegExp(`^${rn.ResourceComponent}<.*>$`).test(t):!1),xb=k.z.custom(t=>Er(t)?new RegExp(`^${rn.TableComponent}<.*>$`).test(t):!1),um=k.z.union([kb,xb,Tb,Eb,k.z.literal(rn.GraphicComponent),k.z.literal(rn.CheckoutComponent)]),Zp=k.z.union([k.z.string(),k.z.number(),k.z.boolean()]),lm=k.z.union([Zp,k.z.array(Zp),k.z.object({}),k.z.unknown()]),Xh=k.z.object({$typ:k.z.literal("Error"),Id:k.z.string(),Message:k.z.string(),route:k.z.unknown().optional()}),Yp=t=>Xh.safeParse(t).success,fm=Xh.or(lm),vd=new Map;function Pb(t){const e=Da(t.name);vd.has(e)||vd.set(e,t)}function dm(t){const e=Da(t);return vd.get(e)}class Jh{constructor(e,n){eo(this,"name"),eo(this,"zodType"),this.name=e,this.zodType=n,Pb(this)}async getValue(){return await dd().getCmpValue(this.name)}async setInput(e){const n=Da(this.name);await Fc().setCmpInput(n,e,this.zodType)}onValueChanged(e,n=!1,r){dd().onCmpValueChanged(this.name,e,r,n)}}const Db=k.z.number().transform(t=>t*1e3).pipe(k.z.coerce.date());function hm(t){return t._def.typeName===k.z.ZodFirstPartyTypeKind.ZodArray}function pm(t){return t._def.typeName===k.z.ZodFirstPartyTypeKind.ZodObject}function Rb(t){const[,e]=pl(t.description??"{}");return e?e.elementity:!1}const gm={green:"#36D792",yellow:"#D19A66",red:"red"};function vm(t,e){return t&&e?`[${t}.${e}]`:t?`[${t}]`:e?`[${e}]`:""}function Xe(t,e,n="",r,i="green"){const o=vm(t,e),a=gm[i]??"inherit";console.log(`%c${o}%c ${n}`,`color: ${a}`,"color: inherit",r)}function Ze(t,e,n="",r,i="green"){const o=vm(t,e),a=gm[i]??"inherit";console.error(`%c${o}%c ${n}`,`color: ${a}`,"color: inherit",r)}const Ab=t=>pr(t)&&Object.values(t).every(e=>pr(e)&&"$key"in e&&"$idx"in e&&"definition"in e),mm=[{open:"List<",openReplace:"[",closeReplace:"]"},{open:"Table<",openReplace:"[",closeReplace:"]"},{open:`${rn.ValueComponent}<`,openReplace:`"${rn.ValueComponent}<`,closeReplace:'>"',preventInnerParsing:!0,allowInnerParsingOnRootLevel:!0},{open:"RecordComponent<",openReplace:'"RecordComponent<',closeReplace:'>"',preventInnerParsing:!0,allowInnerParsingOnRootLevel:!0},{open:"TableComponent<",openReplace:'"TableComponent<',closeReplace:'>"',preventInnerParsing:!0,allowInnerParsingOnRootLevel:!0},{open:"ResourceComponent<",openReplace:'"ResourceComponent<',closeReplace:'>"',preventInnerParsing:!0},{open:"ComposedVisual<",openReplace:'"ComposedVisual<',closeReplace:'>"',preventInnerParsing:!0},{open:"DynamicVisual<",openReplace:'"DynamicVisual<',closeReplace:'>"',preventInnerParsing:!0},{open:"Map<",openReplace:'"Map<',closeReplace:'>"',preventInnerParsing:!0},{open:"DataSource<",openReplace:'"DataSource<',closeReplace:'>"',preventInnerParsing:!0},{open:"Resource<",openReplace:"{",closeReplace:"}"},{open:"Record<{",openReplace:"{",closeReplace:""}];function Mb(t){let e=1;for(let n=0;n<t.length;n++)if(t[n]==="<"?e++:t[n]===">"&&e--,e===0)return n;return-1}function ym(t){const e=[",","}",">"],n=/=|,|<|{|}|]/,r="!!TYPEPLACEHOLDER!!";if(t.indexOf("=")===-1)return'"'+t+'"';let i="",o=!1,a=0,s=t||"";for(;s.length>0;){const c=mm.find(u=>s.indexOf(u.open)===0);if(e.includes(s[0]))i+=s[0],s=s.slice(1);else if(c){s=s.slice(c.open.length);const u=Mb(s),l=c.preventInnerParsing?s.substring(0,u):ym(s.substring(0,u)),f=c.openReplace+l+c.closeReplace;i=i.length>0?i.replace(r,f):f,s=s.slice(u+1),o=!1}else if(o){const u=s.search(n);u>0?(i=i.replace(r,'"'+s.substring(0,u)+'"')+s[u],s=s.slice(u+1)):(Ze("HiveUtils","_parseHiveTypeToJsonStr","Fallback: Full remaining string appended. Possible parsing issue!",{errorName:"Hive type to JSON - parsing issue",jsonObj:{typeDefinition:t}}),i+=s,s=""),o=!1}else{const u=s.indexOf("="),l=s.substring(0,u).trim();i+=`"${l}":{ "$key": "${l}", "$idx": ${a}, "definition": ${r} }`,a++,s=s.slice(u+1),o=!0}}return i}function md(t,e,n,r=n){if(!pr(t)&&!Ct(t))return t;const i=hm(e);if(Ct(t)&&i)return[md(t[0],e.element,n,r)];if(Ct(t)||i)return Ze("HiveUtils","_recursiveHiveSchemaMapping","Type mismatch because either the schema or the type expects an array!",{cmpName:n,propertyPath:r,hive:t,zod:JSON.stringify(e)}),t;if(!pm(e))return Ze("HiveUtils","_recursiveHiveSchemaMapping","Generated schema doesn't match the retrieved component type!",{cmpName:n,propertyPath:r,hive:t,zod:JSON.stringify(e)}),t;const o=Object.keys(e.shape).reduce((s,c)=>(s[c.toLowerCase()]=c,s),{}),a={};return Object.values(t).forEach(function(s){const c=s.$key.toLowerCase(),u=o[c];if(u){const l=e.shape[u];a[u]=s,a[u].$key=u,delete o[c];const f=r+"."+u,m=md(s.definition,l,u,f);a[u].definition=m}else a[s.$key]=s}),a}function eg(t){const e=t.match(/^(\w+)<.+>/),n=e&&2>=e.length?e[1]:t;if(!vb(n))throw Ze("HiveUtils","getBaseHiveType","Unknown base type found!",{type:t,baseType:n}),new Error(`Unknown base component type found: ${JSON.stringify({type:t,baseType:n})}`);return n}function _m(t,e){const n=(t||"").match(new RegExp("<(.+)>"));return n&&2>=n.length?n[1]:""}function zb(t){const e=t.indexOf("=")>-1,n=e&&mm.find(i=>t.indexOf(i.open)===0),r=n&&n.preventInnerParsing&&!n.allowInnerParsingOnRootLevel;return e&&!r}function Ub(t,e,n){const r=_m(t)||t;let i=bm(r);if(t.startsWith("TableComponent<")&&(i=[i]),!i){Ze("HiveUtils","parseAndMapSchema","Schema parsing not successful",{jsonObj:{type:r,fullType:t}});return}return i=md(i,e,n),i}function qc(t,e,n){const r=Ct(e),i=r&&Ct(t)&&(pr(e[0])||Ct(e[0]));if(_b(t)||r&&!i)return t;if(i)return t.map(a=>qc(a,e[0]));const o={};return Object.values(e.$key!==void 0?e.definition:e).forEach(function(a){const s=a.definition,c=t&&t[a.$idx];let u;Ct(s)&&pr(s[0])?(u=c==null?void 0:c.map(l=>qc(l,s[0])),JSON.stringify(s)):!Ct(s)&&pr(s)?(u=qc(c,s),JSON.stringify(s)):u=c,o[a.$key]=u}),o}function bm(t){const e=t.replace(/Resource<\w+>/g,"Text"),n=ym(e),[r,i]=pl(n);return r&&Ze("HiveUtils","parseHiveTypeToSchema","Schema parsing resulted in an invalid JSON",{jsonObj:{typeDefinition:t,parsed:n},exc:r}),r?void 0:i}const Nb={[oa.Text]:k.z.string(),[oa.Number]:k.z.number(),[oa.Logic]:k.z.boolean()};function $b(t){const e=bm(t),n=r=>{const i=Ct(r),o=i?r[0]:r,a=Ab(o)?k.z.object(Object.values(o).reduce((s,c)=>(s[c.$key]=n(c.definition),s),{})):Nb[o];return a?i?k.z.array(a):a:(Ze("HiveUtils","parseHiveTypeToZodSchema","Unknown simple Hive type",{typeDefinition:t,schema:JSON.stringify(r)}),k.z.unknown())};return e?n(e):(Ze("HiveUtils","parseHiveTypeToZodSchema","Schema is undefined",{typeDefinition:t}),k.z.unknown())}class yd extends Error{constructor(e){super(e),this.name="ConversionError"}}function Lb(t,e,n){const r=n.safeParse(e);if(!r.success)throw new yd(r.error.message);const i=function(o,a){if(Rb(o))return a;const s=pm(o),c=hm(o);if(s&&pr(a)){const u=o.shape;return Object.keys(u).reduce(function(l,f){const m=i(u[f],a[f]);return l.push(m),l},[])}else return c&&Ct(a)?a.map(function(u){return i(o.element,u)}):a};return i(n,e)}function wm(t){return Ct(t)?wm(t[0]):pr(t)}const tg=Symbol("UnknownCmpType");function jb(t,e){if(t==null)return;const{success:n,error:r}=e.safeParse(t);if(!n)throw Ze("CmpUtils","_assertCmpValueValid","Parser error:",r),new Error("Value received for component doesn't match its zod schema")}function Wb(t,e,n){return Ub(t,e,n)}function Ob(t,e,n,r){const i=zb(e),o=i?Wb(e,n,r):void 0;return i&&o?qc(t,o):t}function Fb(t,e,n){const r=dm(t);if(!r)throw new Error("Component does not exist in the component definitions.");const i=r instanceof Jh?Ob(n,e,r.zodType,t):tg;if(i===tg)throw new Error("Component has unknown type.");return i&&jb(i,r.zodType),i}var $r,$o;class Hb{constructor(){fe(this,$r,new Map),fe(this,$o,new Map)}updateCmp(e,n,r){const i=S(this,$r).get(e)??{value:n,freshProperties:new Set};i.value=n,i.freshProperties.add("Value"),r&&S(this,$o).set(e,{property:"Value",lazy:!1,isInitialSubscription:!0}),S(this,$r).set(e,i)}markCmpPropertiesAsStale(e,n){const r=S(this,$r).get(e);r&&n.forEach(i=>r.freshProperties.delete(i))}markAllCmpPropertiesAsStale(){for(const e of S(this,$r).values())e.freshProperties.clear()}async subscribeToCmpUpdates(e,n,r=!1){Xe("CmpsStore","subscribeToCmpUpdates","",{cmpName:e,property:n,lazy:r});const i=S(this,$o).get(e);(!i||i.lazy===!0&&r===!1)&&(S(this,$o).set(e,{property:n,lazy:r,isInitialSubscription:!1}),await Fc().subscribeToCmpUpdates(e,n,r))}async resubscribeToCmpUpdates(){const e=Array.from(S(this,$o)).filter(([,n])=>!n.isInitialSubscription).map(([n,{property:r,lazy:i}])=>Fc().subscribeToCmpUpdates(n,r,i));await Promise.all(e)}async getCmpValue(e){Xe("CmpsStore","getCmpValue","",{name:e});const n=S(this,$r).get(e);if(n!=null&&n.freshProperties.has("Value"))return n.value;const r=Da(e);await Fc().fetchCmpPropertyValue([{name:r,property:"Value"}]);const i=S(this,$r).get(e);return structuredClone(i==null?void 0:i.value)}}$r=new WeakMap,$o=new WeakMap;function ng(t){return t instanceof Jh}function qb(t){const e=t.split("-");return{companyName:e[0],distributorName:e.length>1?e[1]:""}}function Cm(t){const{pathname:e}=new URL(t),n=new RegExp("^/(cfgr|preview|staging)/","i"),r=new RegExp("/$"),i=e.replace(n,"").replace(r,"").split("/");if(i.length<2)return;let o,a,s,c,u,l;const f=e.toLowerCase(),m=f.startsWith("/preview/"),d=f.startsWith("/staging/");m||d?(l=i[2],s=i[3],o=i[4]==="copy"?"copy":"edit",c=i[5],a=m?"preview":"staging",u=!1):f.startsWith("/cfgr/")&&(s=i[2]==="copy"?void 0:i[2],c=void 0,i[3]==="edit"?(o="edit",c=i[4]):o="copy",a="cfgr",u=i[i.length-1]!=="copy"||i[i.length-1]==="copy"&&s===void 0);const h=qb(i[0]);return{tenant:i[0],companyName:h.companyName,planName:i[1],planVersion:l||void 0,cfgnId:s||void 0,startAction:o,authToken:c||void 0,cfgrMode:a,isPresetCopy:u}}function Vb(t){const e=new RegExp("^/|/$","g"),n=new URL(t).pathname.replace(e,"").split("/"),r=["cfgr","preview","staging"];return n.length>=2&&r.includes(n[0].toLowerCase())}var Sm=(t=>(t[t.NotActivated=0]="NotActivated",t[t.Activated=1]="Activated",t[t.Deactivated=2]="Deactivated",t[t.MarkedForDeletion=3]="MarkedForDeletion",t))(Sm||{});const Bb=k.z.object({mailNotifications:k.z.object({quoteAssignment:k.z.boolean(),insightsAssignment:k.z.boolean()})});k.z.object({id:k.z.string(),firstname:k.z.string(),lastname:k.z.string(),email:k.z.string(),isCbnAdmin:k.z.boolean().optional(),isSuperAdmin:k.z.boolean().optional(),state:k.z.nativeEnum(Sm),avatarUrl:k.z.string().nullable().optional(),settings:Bb});const rg={local:void 0,session:void 0};function ig(t=!1){var e;(e=Kb(t).storage)==null||e.clear()}function Kb(t=!1){const e="CbnStorageTestKey",n="CbnStorageTestValue",r=t?"session":"local",i=rg[r];if(i!==void 0)return i;const o={storage:t?window.sessionStorage:window.localStorage,writeable:!1,readable:!1};if(o.storage){try{o.storage.setItem(e,n),o.writeable=!0}catch{}try{const a=o.storage.getItem(e);o.readable=o.writeable?a===n:!0}catch{}o.writeable&&o.storage.removeItem(e)}return rg[r]=o,o}const Xb="/login",Jb="redirectTo";function Gb(t){ig(),ig(!0);const e=encodeURIComponent(window.location.pathname+window.location.search);window.location.href=`${Xb}?${Jb}=${e}`}var Im="function",km="object",Gh="undefined",qn="prototype",Qh=Object,Qb=Qh[qn];/*! https://github.com/nevware21/ts-utils v0.12.6 */function Kt(t,e){return t||e}function rt(t,e){return t[e]}var Mt=void 0,gt=null,Zh="",gl="function",nc="object",gr="prototype",yu="__proto__",zi="undefined",_u="constructor",Yh="Symbol",sa="length",bu="name",It="call",rc="toString",ep="getOwnPropertyDescriptor",Lt=Kt(Object),tp=rt(Lt,gr),Tm=Kt(String),co=rt(Tm,gr),ic=Kt(Math),Em=Kt(Array),vl=rt(Em,gr),Cr=rt(vl,"slice"),og="_polyfill",ag="__nw21$polytype__";function nt(t,e){try{return{v:t.apply(this,e)}}catch(n){return{e:n}}}function Zb(t,e,n){var r=nt(t,n);return r.e?e:r.v}var jl;function ml(t){return function(e){return typeof e===t}}function xm(t){var e="[object "+t+"]";return function(n){return!!(n&&Yb(n)===e)}}function Yb(t){return tp[rc].call(t)}function Qe(t){return typeof t===zi||t===zi}function ew(t){return t===Mt}function B(t){return t===gt||Qe(t)}function np(t){return t===gt||t===Mt}function tw(t){return!!t||t!==Mt}function nw(t){return!jl&&(jl=["string","number","boolean",zi,"symbol","bigint"]),t!==nc&&jl.indexOf(t)!==-1}var de=ml("string"),pe=ml(gl);function Bt(t){return!t&&B(t)?!1:!!t&&typeof t===nc}var we=rt(Em,"isArray"),rw=xm("Date"),oc=ml("number"),Pm=ml("boolean"),rp=xm("Error");function ii(t){return!!(t&&t.then&&pe(t.then))}function wu(t){return!(!t||Zb(function(){return!(t&&0+t)},!t))}function ip(){}function iw(){return!1}var Ut=Kt(Tm),ow="[object Error]";function te(t,e){var n=Zh,r=tp[rc][It](t);r===ow&&(t={stack:Ut(t.stack),message:Ut(t.message),name:Ut(t.name)});try{n=JSON.stringify(t,gt,e?typeof e=="number"?e:4:Mt),n=(n?n.replace(/"(\w+)"\s*:\s{0,1}/g,"$1: "):gt)||Ut(t)}catch(i){n=" - "+te(i,e)}return r+": "+n}function Qt(t){throw new Error(t)}function Yn(t){throw new TypeError(t)}function yl(t){np(t)&&Yn("Cannot convert undefined or null to object")}function aw(t){de(t)||Yn("'"+te(t)+"' is not a string")}function hn(t,e){return!!t&&tp.hasOwnProperty[It](t,e)}var sw=Kt(rt(Lt,ep),ip),Qr=Kt(rt(Lt,"hasOwn"),cw);function cw(t,e){return yl(t),hn(t,e)||!!sw(t,e)}function Pe(t,e,n){if(t&&(Bt(t)||pe(t))){for(var r in t)if(Qr(t,r)&&e[It](t,r,t[r])===-1)break}}function ee(t,e,n){if(t)for(var r=t[sa]>>>0,i=0;i<r&&!(i in t&&e[It](t,t[i],i,t)===-1);i++);}var uo=_l;function _l(t,e,n){var r=e?e[t]:gt;return function(i){var o=(i?i[t]:gt)||r;if(o||n){var a=arguments;return(o||n).apply(i,o?Cr[It](a,1):a)}Yn('"'+Ut(t)+'" not defined for '+te(i))}}function uw(t){return function(e){return e[t]}}var lw=Kt(rt(Lt,ep),ip),mc={e:"enumerable",c:"configurable",v:"value",w:"writable",g:"get",s:"set"};function Dm(t){var e={};if(e[mc.c]=!0,e[mc.e]=!0,t.l){e.get=function(){return t.l.v};var n=lw(t.l,"v");n&&n.set&&(e.set=function(r){t.l.v=r})}return Pe(t,function(r,i){e[mc[r]]=ew(i)?e[mc[r]]:i}),e}var Xn=rt(Lt,"defineProperty"),fw=rt(Lt,"defineProperties");function dw(t,e,n,r,i,o){var a={e:o,c:i};return n&&(a.g=n),Xn(t,e,Dm(a))}function Re(t,e,n){return Xn(t,e,Dm(n))}function Rm(t,e,n,r,i){var o={};return Pe(t,function(a,s){Cu(o,a,e?s:a),Cu(o,s,a)}),r?r(o):o}function Cu(t,e,n,r){Xn(t,e,{value:n,enumerable:!0,writable:!1})}var hw=Kt(rt(Lt,"isFrozen"),iw),Am=rt(Lt,"freeze");function pw(t){return t}function gw(t){return yl(t),t[yu]||gt}var _d=rt(Lt,"assign"),vr=rt(Lt,"keys");function Mm(t,e){if((we(t)||Bt(t)||pe(t))&&!hw(t)){for(var n=0;n<e.length;n++)if(e[n]===t)return t;e.push(t),Pe(t,function(r,i){Mm(i,e)}),xn(t)}return t}function Ra(t){return Am?Mm(t,[]):t}var xn=Kt(Am,pw),bd=Kt(rt(Lt,"getPrototypeOf"),gw);function vw(t){return Rm(t,1,0,xn)}function mw(t){return Rm(t,0,0,xn)}function yw(t){var e={};return Pe(t,function(n,r){Cu(e,n,r[1]),Cu(e,r[0],r[1])}),xn(e)}function _w(t){return yw(t)}var zm=mw({asyncIterator:0,hasInstance:1,isConcatSpreadable:2,iterator:3,match:4,matchAll:5,replace:6,search:7,species:8,split:9,toPrimitive:10,toStringTag:11,unscopables:12}),sg="__tsUtils$gblCfg",Wl;function Um(){var t;return typeof globalThis!==zi&&(t=globalThis),!t&&typeof self!==zi&&(t=self),!t&&typeof window!==zi&&(t=window),!t&&typeof global!==zi&&(t=global),t}function bl(){if(!Wl){var t=nt(Um).v||{};Wl=t[sg]=t[sg]||{}}return Wl}var Nm=rt(ic,"min"),ks=rt(ic,"max"),cg=uo("slice",co),qt=uo("substring",co),qr=_l("substr",co,bw);function bw(t,e,n){return yl(t),n<0?Zh:(e=e||0,e<0&&(e=ks(e+t[sa],0)),Qe(n)?cg(t,e):cg(t,e,e+n))}function Su(t,e){return qt(t,0,e)}function ww(t,e){return t&&(nt(function(){t[og]=!0,t[ag]=e}),nt(Re,[t,og,{v:!0,w:!1,e:!1}]),nt(Re,[t,ag,{v:e,w:!1,e:!1}])),t}var Sr=Kt(rt(Lt,"create"),Cw);function Cw(t,e){var n=null;function r(){}if(np(t))n={};else{var i=typeof t;i!==nc&&i!==gl&&Yn("Prototype must be an Object or function: "+te(t)),r[gr]=t,nt(function(){r[yu]=t}),n=new r}return e&&nt(fw,[n,e]),n}function Pn(){return(Date.now||Sw)()}function Sw(){return new Date().getTime()}function Ui(t,e,n){return t.apply(e,n)}var dt;function si(){dt=bl()}function $m(t,e){var n={};return!dt&&si(),n.b=dt.lzy,Xn(n,"v",{configurable:!0,get:function(){var r=Ui(t,null,e);return dt.lzy||Xn(n,"v",{value:r}),n.b=dt.lzy,r}}),n}var Iw=rt(ic,"random"),kw=$m(function(){for(var t=Pn().toString(36).slice(2);t.length<16;)t+=Iw().toString(36).slice(2);return t=t.substring(0,16),t}),ug="_urid",Tw="$nw21sym",Ol,Ew=0;function xw(){if(!Ol){var t=bl();Ol=t.gblSym=t.gblSym||{k:{},s:{}}}return Ol}var yc;function op(t){var e="_"+Ew+++"_"+kw.v,n=Yh+"("+t+")";function r(o,a){Re(i,o,{v:a,e:!1,w:!1})}var i=Sr(null);return r("description",Ut(t)),r(rc,function(){return n+Tw+e}),r("valueOf",function(){return i}),r("v",n),r("_uid",e),ww(i,"symbol")}function Pw(t){var e=xw();if(!Qr(e.k,t)){var n=op(t),r=vr(e.s).length;n[ug]=function(){return r+"_"+n[rc]()},e.k[t]=n,e.s[n[ug]()]=Ut(t)}return e.k[t]}function Dw(t){!yc&&(yc={});var e,n=zm[t];return n&&(e=yc[n]=yc[n]||op(Yh+"."+n)),e}function mn(t){return Xn({toJSON:function(){return t}},"v",{value:t})}var Lm="window",Ts;function Aa(t,e){var n;return function(){return!dt&&si(),(!n||dt.lzy)&&(n=mn(nt(t,e).v)),n.v}}function dn(t){return!dt&&si(),(!Ts||t===!1||dt.lzy)&&(Ts=mn(nt(Um).v||gt)),Ts.v}function et(t,e){var n;if(!Ts||e===!1?n=dn(e):n=Ts.v,n&&n[t])return n[t];if(t===Lm)try{return window}catch{}return gt}function jm(){return!!St()}var St=Aa(et,["document"]);function wl(){return!!an()}var an=Aa(et,[Lm]);function Rw(){return!!er()}var er=Aa(et,["navigator"]);function Aw(){return!!Wm()}var Wm=Aa(et,["history"]),Mw=Aa(function(){return!!nt(function(){return process&&(process.versions||{}).node}).v}),Om=Aa(function(){return!!nt(function(){return self&&self instanceof WorkerGlobalScope}).v}),Sa,Fl;function Cl(){return Sa=mn(nt(et,[Yh]).v),Sa}function zw(t){var e=(dt.lzy?0:Sa)||Cl();return e.v?e.v[t]:Mt}function Uw(){return!!Nw()}function Nw(){return!dt&&si(),((dt.lzy?0:Sa)||Cl()).v}function ap(t,e){var n=zm[t];!dt&&si();var r=(dt.lzy?0:Sa)||Cl();return r.v?r.v[n||t]:Dw(t)}function $a(t,e){!dt&&si();var n=(dt.lzy?0:Sa)||Cl();return n.v?n.v(t):op(t)}function sp(t){return!dt&&si(),Fl=(dt.lzy?0:Fl)||mn(nt(zw,["for"]).v),(Fl.v||Pw)(t)}function wd(t){return!!t&&pe(t.next)}function Fm(t){return!np(t)&&pe(t[ap(3)])}var _c;function cp(t,e,n){if(t&&(wd(t)||(!_c&&(_c=mn(ap(3))),t=t[_c.v]?t[_c.v]():gt),wd(t))){var r=Mt,i=Mt;try{for(var o=0;!(i=t.next()).done&&e[It](n||t,i.value,o,t)!==-1;)o++}catch(a){r={e:a},t.throw&&(i=gt,t.throw(r))}finally{try{i&&!i.done&&t.return&&t.return(i)}finally{if(r)throw r.e}}}}function Qo(t,e){return!Qe(e)&&t&&(we(e)?Ui(t.push,t,e):wd(e)||Fm(e)?cp(e,function(n){t.push(n)}):t.push(e)),t}var Dt=uo("indexOf",vl),Ns=uo("map",vl);function Sl(t,e,n){return((t?t.slice:gt)||Cr).apply(t,Cr[It](arguments,1))}var $w=uo("reduce",vl),Hl,Hm=Kt(rt(Lt,"setPrototypeOf"),Lw);function Lw(t,e){var n;return!Hl&&(Hl=mn((n={},n[yu]=[],n instanceof Array))),Hl.v?t[yu]=e:Pe(e,function(r,i){return t[r]=i}),t}function jw(t,e,n){nt(Re,[e,bu,{v:t,c:!0,e:!1}]),e=Hm(e,n);function r(){this[_u]=e,nt(Re,[this,bu,{v:t,c:!0,e:!1}])}return e[gr]=n===gt?Sr(n):(r[gr]=n[gr],new r),e}function lg(t,e){e&&(t[bu]=e)}function qm(t,e,n){var r=Error,i=r[gr][bu],o=Error.captureStackTrace;return jw(t,function(){var a=this,s=arguments;try{nt(lg,[r,t]);var c=Ui(r,a,Cr[It](s))||a;if(c!==a){var u=bd(a);u!==bd(c)&&Hm(c,u)}return o&&o(c,a[_u]),e&&e(c,s),c}finally{nt(lg,[r,i])}},r)}var ql;function Ww(t){throw ql||(ql=qm("UnsupportedError")),new ql(t)}function Ow(t){return function(e){return yl(e),e&&e.replace&&(e=e.replace(t,Zh)),e}}var Fw=Ow(/^\s+|(?=\s)\s+$/g),Fe=_l("trim",co,Fw),on=rt(ic,"floor"),Vl,Bl,Kl;function Nt(t){if(!t||typeof t!==nc)return!1;Kl||(Kl=wl()?an():!0);var e=!1;if(t!==Kl){Bl||(Vl=Function[gr][rc],Bl=Vl[It](Lt));try{var n=bd(t);e=!n,e||(hn(n,_u)&&(n=n[_u]),e=!!(n&&typeof n===gl&&Vl[It](n)===Bl))}catch{}}return e}function Hw(t){return t.value&&Bm(t),!0}var fg=[Kw,Bm,Jw,Xw];function qw(t,e,n,r){var i;return ee(t,function(o){if(o.k===e)return i=o,-1}),i||(i={k:e,v:e},t.push(i),r(i)),i.v}function up(t,e,n,r){var i=n.handler,o=n.path?r?n.path.concat(r):n.path:[],a={handler:n.handler,src:n.src,path:o},s=typeof e,c=!1,u=e===gt;u||(e&&s===nc?c=Nt(e):u=nw(s));var l={type:s,isPrim:u,isPlain:c,value:e,result:e,path:o,origin:n.src,copy:function(f,m){return up(t,f,m?a:n,m)},copyTo:function(f,m){return Vm(t,f,m,a)}};return l.isPrim?i&&i[It](n,l)?l.result:e:qw(t,e,o,function(f){Re(l,"result",{g:function(){return f.v},s:function(h){f.v=h}});for(var m=0,d=i;!(d||(m<fg.length?fg[m++]:Hw))[It](n,l);)d=gt})}function Vm(t,e,n,r){if(!B(n))for(var i in n)e[i]=up(t,n[i],r,i);return e}function Vw(t,e,n){var r={handler:n,src:e,path:[]};return Vm([],t,e,r)}function Bw(t,e){var n={handler:e,src:t};return up([],t,n)}function Kw(t){var e=t.value;if(we(e)){var n=t.result=[];return n.length=e.length,t.copyTo(n,e),!0}return!1}function Xw(t){var e=t.value;return rw(e)?(t.result=new Date(e.getTime()),!0):!1}function Jw(t){return t.type===gl}function Bm(t){var e=t.value;if(e&&t.isPlain){var n=t.result={};return t.copyTo(n,e),!0}return!1}function Km(t,e){return ee(e,function(n){Vw(t,n)}),t}function dg(t,e,n,r,i,o,a){return Km(Bw(t)||{},Cr[It](arguments))}function Gw(t,e,n,r,i,o,a){return Km(t||{},Cr[It](arguments))}var Xm=uo("split",co);function Jm(t,e,n){if(t&&e){var r=Xm(e,"."),i=r.pop();ee(r,function(o){B(t[o])&&(t[o]={}),t=t[o]}),t[i]=n}}var Qw=uw(sa),Xl;function Ir(){return!dt&&si(),(!Xl||dt.lzy)&&(Xl=mn(nt(et,["performance"]).v)),Xl.v}var Gm=rt(ic,"round"),Zw=Kt(rt(Lt,ep),ip),Qm=_l("endsWith",co,Yw);function Yw(t,e,n){aw(t);var r=de(e)?e:Ut(e),i=!Qe(n)&&n<t[sa]?n:t[sa];return qt(t,i-r[sa],i)===r}var ot=uo("indexOf",co),Jl="ref",Gl="unref",Ql="hasRef",eC="enabled";function tC(t,e,n){var r=!0,i=t?e(gt):gt,o;function a(){return r=!1,i&&i[Gl]&&i[Gl](),o}function s(){i&&n(i),i=gt}function c(){return i=e(i),r||a(),o}function u(l){!l&&i&&s(),l&&!i&&c()}return o={cancel:s,refresh:c},o[Ql]=function(){return i&&i[Ql]?i[Ql]():r},o[Jl]=function(){return r=!0,i&&i[Jl]&&i[Jl](),o},o[Gl]=a,o=Xn(o,eC,{get:function(){return!!i},set:u}),{h:o,dn:function(){i=gt}}}var nC,rC;function iC(t){var e=pe(t)?t:nC;if(!e){var n=bl().tmOut||[];we(n)&&n.length>0&&pe(n[0])&&(e=n[0])}return e||setTimeout}function oC(t){var e=pe(t)?t:rC;if(!e){var n=bl().tmOut||[];we(n)&&n.length>1&&pe(n[1])&&(e=n[1])}return e||clearTimeout}function Zm(t,e,n){var r=we(e),i=r?e.length:0,o=iC(i>0?e[0]:r?Mt:e),a=oC(i>1?e[1]:Mt),s=n[0];n[0]=function(){c.dn(),Ui(s,Mt,Cr[It](arguments))};var c=tC(t,function(u){if(u){if(u.refresh)return u.refresh(),u;Ui(a,Mt,[u])}return Ui(o,Mt,n)},function(u){Ui(a,Mt,[u])});return c.h}function pn(t,e){return Zm(!0,Mt,Cr[It](arguments))}function aC(t,e){return Zm(!1,Mt,Cr[It](arguments))}(dn()||{}).Symbol;(dn()||{}).Reflect;var Ym="hasOwnProperty",sC=function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)Qb[Ym].call(e,i)&&(t[i]=e[i])}return t},$t=_d||sC,Cd=function(t,e){return Cd=Qh.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)r[Ym](i)&&(n[i]=r[i])},Cd(t,e)};function tr(t,e){typeof e!==Im&&e!==null&&Yn("Class extends value "+String(e)+" is not a constructor or null"),Cd(t,e);function n(){this.constructor=t}t[qn]=e===null?Sr(e):(n[qn]=e[qn],new n)}function hg(t,e){for(var n=0,r=e.length,i=t.length;n<r;n++,i++)t[i]=e[n];return t}var bc,Iu="constructor",kr="prototype",ku="function",Tu="_dynInstFuncs",Sd="_isDynProxy",ca="_dynClass",cC="_dynCls$",Id="_dynInstChk",$s=Id,ey="_dfOpts",pg="_unknown_",lp="__proto__",wc="_dyn"+lp,gg="__dynProto$Gbl",Zl="_dynInstProto",Vc="useBaseInst",kd="setInstFuncs",fp=Object,Ls=fp.getPrototypeOf,vg=fp.getOwnPropertyNames,mg=dn(),Td=mg[gg]||(mg[gg]={o:(bc={},bc[kd]=!0,bc[Vc]=!0,bc),n:1e3});function Bc(t){return t&&(t===fp[kr]||t===Array[kr])}function dp(t){return Bc(t)||t===Function[kr]}function to(t){var e;if(t){if(Ls)return Ls(t);var n=t[lp]||t[kr]||(t[Iu]?t[Iu][kr]:null);e=t[wc]||n,hn(t,wc)||(delete t[Zl],e=t[wc]=t[Zl]||t[wc],t[Zl]=n)}return e}function Eu(t,e){var n=[];if(vg)n=vg(t);else for(var r in t)typeof r=="string"&&hn(t,r)&&n.push(r);if(n&&n.length>0)for(var i=0;i<n.length;i++)e(n[i])}function hp(t,e,n){return e!==Iu&&typeof t[e]===ku&&(n||hn(t,e))&&e!==lp&&e!==kr}function xu(t){Yn("DynamicProto: "+t)}function uC(t){var e=Sr(null);return Eu(t,function(n){!e[n]&&hp(t,n,!1)&&(e[n]=t[n])}),e}function pp(t,e){for(var n=t.length-1;n>=0;n--)if(t[n]===e)return!0;return!1}function lC(t,e,n,r){function i(c,u,l){var f=u[l];if(f[Sd]&&r){var m=c[Tu]||{};m[$s]!==!1&&(f=(m[u[ca]]||{})[l]||f)}return function(){return f.apply(c,arguments)}}var o=Sr(null);Eu(n,function(c){o[c]=i(e,n,c)});for(var a=to(t),s=[];a&&!dp(a)&&!pp(s,a);)Eu(a,function(c){!o[c]&&hp(a,c,!Ls)&&(o[c]=i(e,a,c))}),s.push(a),a=to(a);return o}function fC(t,e,n,r){var i=null;if(t&&hn(n,ca)){var o=t[Tu]||Sr(null);if(i=(o[n[ca]]||Sr(null))[e],i||xu("Missing ["+e+"] "+ku),!i[Id]&&o[$s]!==!1){for(var a=!hn(t,e),s=to(t),c=[];a&&s&&!dp(s)&&!pp(c,s);){var u=s[e];if(u){a=u===r;break}c.push(s),s=to(s)}try{a&&(t[e]=i),i[Id]=1}catch{o[$s]=!1}}}return i}function dC(t,e,n){var r=e[t];return r===n&&(r=to(e)[t]),typeof r!==ku&&xu("["+t+"] is not a "+ku),r}function hC(t,e,n,r,i){function o(c,u){var l=function(){var f=fC(this,u,c,l)||dC(u,c,l);return f.apply(this,arguments)};return l[Sd]=1,l}if(!Bc(t)){var a=n[Tu]=n[Tu]||Sr(null);if(!Bc(a)){var s=a[e]=a[e]||Sr(null);a[$s]!==!1&&(a[$s]=!!i),Bc(s)||Eu(n,function(c){hp(n,c,!1)&&n[c]!==r[c]&&(s[c]=n[c],delete n[c],(!hn(t,c)||t[c]&&!t[c][Sd])&&(t[c]=o(t,c)))})}}}function pC(t,e){if(Ls){for(var n=[],r=to(e);r&&!dp(r)&&!pp(n,r);){if(r===t)return!0;n.push(r),r=to(r)}return!1}return!0}function Yl(t,e){return hn(t,kr)?t.name||e||pg:((t||{})[Iu]||{}).name||e||pg}function He(t,e,n,r){hn(t,kr)||xu("theClass is an invalid class definition.");var i=t[kr];pC(i,e)||xu("["+Yl(t)+"] not in hierarchy of ["+Yl(e)+"]");var o=null;hn(i,ca)?o=i[ca]:(o=cC+Yl(t,"_")+"$"+Td.n,Td.n++,i[ca]=o);var a=He[ey],s=!!a[Vc];s&&r&&r[Vc]!==void 0&&(s=!!r[Vc]);var c=uC(e),u=lC(i,e,c,s);n(e,u);var l=!!Ls&&!!a[kd];l&&r&&(l=!!r[kd]),hC(i,o,e,c,l!==!1)}He[ey]=Td.o;var gp=vw,gC=_w,Or=gp({NONE:0,PENDING:3,INACTIVE:1,ACTIVE:2}),Ia="toLowerCase",he="length",Pu="warnToConsole",ac="throwInternal",Hi="watch",no="apply",Ee="push",lo="splice",ut="logger",Pi="cancel",sc="initialize",Vr="identifier",Du="removeNotificationListener",Ru="addNotificationListener",On="isInitialized",Cc="getNotifyMgr",js="getPlugin",ro="name",zt="processNext",ty="getProcessTelContext",Ni="value",Zo="enabled",yg="stopPollingInternalLogs",io="unload",Sc="onComplete",Ed="version",ny="loggingLevelConsole",oo="createNew",ur="teardown",Au="messageId",qi="message",mr="diagLog",Mu="_doTeardown",Ws="update",Vn="getNext",Os="setNextPlugin",xd="userAgent",ao="split",Vi="replace",Pd="substring",ry="indexOf",Zr="type",_g="evtName",sr="status",bg="getAllResponseHeaders",Dd="isChildEvt",_n="data",ua="getCtx",$n="setCtx",wg="itemsReceived",Ic="headers",La="urlString",Io="timeout",Rd="traceFlags",ef="getAttribute",tf;function vC(t,e){tf||(tf=qm("AggregationError",function(r,i){i[he]>1&&(r.errors=i[1])}));var n=t;throw ee(e,function(r,i){n+=`
|
|
2
|
-
`.concat(i," > ").concat(te(r))}),new
|
|
1
|
+
"use strict";var P_=Object.defineProperty;var Zp=t=>{throw TypeError(t)};var D_=(t,e,n)=>e in t?P_(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var wt=(t,e,n)=>D_(t,typeof e!="symbol"?e+"":e,n),Yp=(t,e,n)=>e.has(t)||Zp("Cannot "+n);var Le=(t,e,n)=>(Yp(t,e,"read from private field"),n?n.call(t):e.get(t)),sr=(t,e,n)=>e.has(t)?Zp("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),ar=(t,e,n,r)=>(Yp(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const I=require("zod"),dm="0.0.1-alpha2";var pr;class R_{constructor(e){wt(this,"name");wt(this,"sdkBridgeVersion","v1");sr(this,pr);var r,i;this.name=e;const n=(i=(r=window.Cbn)==null?void 0:r.getCustomCodeSdkBridge)==null?void 0:i.call(r,"v1");if(ar(this,pr,n==null?void 0:n.getButtonSdkBridge(this.name,this.sdkBridgeVersion)),!Le(this,pr))throw new Error(`Cannot access API for Button "${this.name}".`)}onRendered(e){var n;return((n=Le(this,pr))==null?void 0:n.addOnRenderedCallback(e))??{unsubscribe:()=>{}}}onClick(e){var n;return((n=Le(this,pr))==null?void 0:n.addOnClickCallback(e))??{unsubscribe:()=>{}}}setVisible(e){var n;(n=Le(this,pr))==null||n.setVisible(e)}setText(e){var n;(n=Le(this,pr))==null||n.setText(e)}}pr=new WeakMap;var Bi;class A_{constructor(e){wt(this,"name");wt(this,"sdkBridgeVersion","v1");sr(this,Bi);var r,i;this.name=e;const n=(i=(r=window.Cbn)==null?void 0:r.getCustomCodeSdkBridge)==null?void 0:i.call(r,"v1");if(ar(this,Bi,n==null?void 0:n.getCheckboxSdkBridge(this.name,this.sdkBridgeVersion)),!Le(this,Bi))throw new Error(`Cannot access API for Checkbox "${this.name}".`)}onRendered(e){var n;return((n=Le(this,Bi))==null?void 0:n.addOnRenderedCallback(e))??{unsubscribe:()=>{}}}setVisible(e){var n;(n=Le(this,Bi))==null||n.setVisible(e)}}Bi=new WeakMap;var Ki;class M_{constructor(e){wt(this,"name");wt(this,"sdkBridgeVersion","v1");sr(this,Ki);var r,i;this.name=e;const n=(i=(r=window.Cbn)==null?void 0:r.getCustomCodeSdkBridge)==null?void 0:i.call(r,"v1");if(ar(this,Ki,n==null?void 0:n.getCollapsibleSdkBridge(this.name,this.sdkBridgeVersion)),!Le(this,Ki))throw new Error(`Cannot access API for Collapsible "${this.name}".`)}onRendered(e){var n;return((n=Le(this,Ki))==null?void 0:n.addOnRenderedCallback(e))??{unsubscribe:()=>{}}}setVisible(e){var n;(n=Le(this,Ki))==null||n.setVisible(e)}}Ki=new WeakMap;var Yr;class z_{constructor(e){wt(this,"name");wt(this,"sdkBridgeVersion","v1");sr(this,Yr);var r,i;this.name=e;const n=(i=(r=window.Cbn)==null?void 0:r.getCustomCodeSdkBridge)==null?void 0:i.call(r,"v1");if(ar(this,Yr,n==null?void 0:n.getCustomCtrlSdkBridge(this.name,this.sdkBridgeVersion)),!Le(this,Yr))throw new Error(`Cannot access API for Custom Control "${this.name}".`)}set render(e){var n;(n=Le(this,Yr))==null||n.setRenderCallback(e)}getElement(){var n;return(n=Le(this,Yr))==null?void 0:n.getElement()}setVisible(e){var n;(n=Le(this,Yr))==null||n.setVisible(e)}}Yr=new WeakMap;var Xi;class U_{constructor(e){wt(this,"name");wt(this,"sdkBridgeVersion","v1");sr(this,Xi);var r,i;this.name=e;const n=(i=(r=window.Cbn)==null?void 0:r.getCustomCodeSdkBridge)==null?void 0:i.call(r,"v1");if(ar(this,Xi,n==null?void 0:n.getDataviewSdkBridge(this.name,this.sdkBridgeVersion)),!Le(this,Xi))throw new Error(`Cannot access API for Dataview "${this.name}".`)}onRendered(e){var n;return((n=Le(this,Xi))==null?void 0:n.addOnRenderedCallback(e))??{unsubscribe:()=>{}}}setVisible(e){var n;(n=Le(this,Xi))==null||n.setVisible(e)}}Xi=new WeakMap;var Ji;class N_{constructor(e){wt(this,"name");wt(this,"sdkBridgeVersion","v1");sr(this,Ji);var r,i;this.name=e;const n=(i=(r=window.Cbn)==null?void 0:r.getCustomCodeSdkBridge)==null?void 0:i.call(r,"v1");if(ar(this,Ji,n==null?void 0:n.getInputSdkBridge(this.name,this.sdkBridgeVersion)),!Le(this,Ji))throw new Error(`Cannot access API for Input "${this.name}".`)}onRendered(e){var n;return((n=Le(this,Ji))==null?void 0:n.addOnRenderedCallback(e))??{unsubscribe:()=>{}}}setVisible(e){var n;(n=Le(this,Ji))==null||n.setVisible(e)}}Ji=new WeakMap;var Gi;class $_{constructor(e){wt(this,"name");wt(this,"sdkBridgeVersion","v1");sr(this,Gi);var r,i;this.name=e;const n=(i=(r=window.Cbn)==null?void 0:r.getCustomCodeSdkBridge)==null?void 0:i.call(r,"v1");if(ar(this,Gi,n==null?void 0:n.getPanelSdkBridge(this.name,this.sdkBridgeVersion)),!Le(this,Gi))throw new Error(`Cannot access API for Panel "${this.name}".`)}onRendered(e){var n;return((n=Le(this,Gi))==null?void 0:n.addOnRenderedCallback(e))??{unsubscribe:()=>{}}}setVisible(e){var n;(n=Le(this,Gi))==null||n.setVisible(e)}}Gi=new WeakMap;var ei;class L_{constructor(e){wt(this,"name");wt(this,"sdkBridgeVersion","v1");sr(this,ei);var r,i;this.name=e;const n=(i=(r=window.Cbn)==null?void 0:r.getCustomCodeSdkBridge)==null?void 0:i.call(r,"v1");if(ar(this,ei,n==null?void 0:n.getTextSdkBridge(this.name,this.sdkBridgeVersion)),!Le(this,ei))throw new Error(`Cannot access API for Text "${this.name}".`)}onRendered(e){var n;return((n=Le(this,ei))==null?void 0:n.addOnRenderedCallback(e))??{unsubscribe:()=>{}}}setVisible(e){var n;(n=Le(this,ei))==null||n.setVisible(e)}setText(e){var n;(n=Le(this,ei))==null||n.setText(e)}}ei=new WeakMap;const ku=[];function hm(t,e){if(ku.length>=1)throw new Error("Only 1 `ConfiguratorClient` can be created at a time.");ku.push({client:t,internals:e})}function eg(){const t=ku[0];if(!t)throw new Error("Operation not possible as no `ConfiguratorClient` has been registered yet.");return t.client}function Gc(){const t=ku[0];if(!t)throw new Error("Operation not possible as no `ConfiguratorClient` has been registered yet.");return t.internals}function j_(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Bl={exports:{}},tg;function O_(){return tg||(tg=1,(function(t){var e=Object.prototype.hasOwnProperty,n="~";function r(){}Object.create&&(r.prototype=Object.create(null),new r().__proto__||(n=!1));function i(c,u,l){this.fn=c,this.context=u,this.once=l||!1}function o(c,u,l,f,m){if(typeof l!="function")throw new TypeError("The listener must be a function");var d=new i(l,f||c,m),h=n?n+u:u;return c._events[h]?c._events[h].fn?c._events[h]=[c._events[h],d]:c._events[h].push(d):(c._events[h]=d,c._eventsCount++),c}function s(c,u){--c._eventsCount===0?c._events=new r:delete c._events[u]}function a(){this._events=new r,this._eventsCount=0}a.prototype.eventNames=function(){var u=[],l,f;if(this._eventsCount===0)return u;for(f in l=this._events)e.call(l,f)&&u.push(n?f.slice(1):f);return Object.getOwnPropertySymbols?u.concat(Object.getOwnPropertySymbols(l)):u},a.prototype.listeners=function(u){var l=n?n+u:u,f=this._events[l];if(!f)return[];if(f.fn)return[f.fn];for(var m=0,d=f.length,h=new Array(d);m<d;m++)h[m]=f[m].fn;return h},a.prototype.listenerCount=function(u){var l=n?n+u:u,f=this._events[l];return f?f.fn?1:f.length:0},a.prototype.emit=function(u,l,f,m,d,h){var g=n?n+u:u;if(!this._events[g])return!1;var p=this._events[g],v=arguments.length,_,P;if(p.fn){switch(p.once&&this.removeListener(u,p.fn,void 0,!0),v){case 1:return p.fn.call(p.context),!0;case 2:return p.fn.call(p.context,l),!0;case 3:return p.fn.call(p.context,l,f),!0;case 4:return p.fn.call(p.context,l,f,m),!0;case 5:return p.fn.call(p.context,l,f,m,d),!0;case 6:return p.fn.call(p.context,l,f,m,d,h),!0}for(P=1,_=new Array(v-1);P<v;P++)_[P-1]=arguments[P];p.fn.apply(p.context,_)}else{var x=p.length,R;for(P=0;P<x;P++)switch(p[P].once&&this.removeListener(u,p[P].fn,void 0,!0),v){case 1:p[P].fn.call(p[P].context);break;case 2:p[P].fn.call(p[P].context,l);break;case 3:p[P].fn.call(p[P].context,l,f);break;case 4:p[P].fn.call(p[P].context,l,f,m);break;default:if(!_)for(R=1,_=new Array(v-1);R<v;R++)_[R-1]=arguments[R];p[P].fn.apply(p[P].context,_)}}return!0},a.prototype.on=function(u,l,f){return o(this,u,l,f,!1)},a.prototype.once=function(u,l,f){return o(this,u,l,f,!0)},a.prototype.removeListener=function(u,l,f,m){var d=n?n+u:u;if(!this._events[d])return this;if(!l)return s(this,d),this;var h=this._events[d];if(h.fn)h.fn===l&&(!m||h.once)&&(!f||h.context===f)&&s(this,d);else{for(var g=0,p=[],v=h.length;g<v;g++)(h[g].fn!==l||m&&!h[g].once||f&&h[g].context!==f)&&p.push(h[g]);p.length?this._events[d]=p.length===1?p[0]:p:s(this,d)}return this},a.prototype.removeAllListeners=function(u){var l;return u?(l=n?n+u:u,this._events[l]&&s(this,l)):(this._events=new r,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=n,a.EventEmitter=a,t.exports=a})(Bl)),Bl.exports}var F_=O_();const Cl=j_(F_);class Qi extends Error{constructor(e,n){const r=new.target.prototype;super(`${e}: Status code '${n}'`),this.statusCode=n,this.__proto__=r}}class Zh extends Error{constructor(e="A timeout occurred."){const n=new.target.prototype;super(e),this.__proto__=n}}class xn extends Error{constructor(e="An abort occurred."){const n=new.target.prototype;super(e),this.__proto__=n}}class W_ extends Error{constructor(e,n){const r=new.target.prototype;super(e),this.transport=n,this.errorType="UnsupportedTransportError",this.__proto__=r}}class V_ extends Error{constructor(e,n){const r=new.target.prototype;super(e),this.transport=n,this.errorType="DisabledTransportError",this.__proto__=r}}class H_ extends Error{constructor(e,n){const r=new.target.prototype;super(e),this.transport=n,this.errorType="FailedToStartTransportError",this.__proto__=r}}class ng extends Error{constructor(e){const n=new.target.prototype;super(e),this.errorType="FailedToNegotiateWithServerError",this.__proto__=n}}class q_ extends Error{constructor(e,n){const r=new.target.prototype;super(e),this.innerErrors=n,this.__proto__=r}}class pm{constructor(e,n,r){this.statusCode=e,this.statusText=n,this.content=r}}class wl{get(e,n){return this.send({...n,method:"GET",url:e})}post(e,n){return this.send({...n,method:"POST",url:e})}delete(e,n){return this.send({...n,method:"DELETE",url:e})}getCookieString(e){return""}}var N;(function(t){t[t.Trace=0]="Trace",t[t.Debug=1]="Debug",t[t.Information=2]="Information",t[t.Warning=3]="Warning",t[t.Error=4]="Error",t[t.Critical=5]="Critical",t[t.None=6]="None"})(N||(N={}));class Wa{constructor(){}log(e,n){}}Wa.instance=new Wa;const B_="10.0.0";class dt{static isRequired(e,n){if(e==null)throw new Error(`The '${n}' argument is required.`)}static isNotEmpty(e,n){if(!e||e.match(/^\s*$/))throw new Error(`The '${n}' argument should not be empty.`)}static isIn(e,n,r){if(!(e in n))throw new Error(`Unknown ${r} value: ${e}.`)}}class nt{static get isBrowser(){return!nt.isNode&&typeof window=="object"&&typeof window.document=="object"}static get isWebWorker(){return!nt.isNode&&typeof self=="object"&&"importScripts"in self}static get isReactNative(){return!nt.isNode&&typeof window=="object"&&typeof window.document>"u"}static get isNode(){return typeof process<"u"&&process.release&&process.release.name==="node"}}function Va(t,e){let n="";return uo(t)?(n=`Binary data of length ${t.byteLength}`,e&&(n+=`. Content: '${K_(t)}'`)):typeof t=="string"&&(n=`String data of length ${t.length}`,e&&(n+=`. Content: '${t}'`)),n}function K_(t){const e=new Uint8Array(t);let n="";return e.forEach(r=>{const i=r<16?"0":"";n+=`0x${i}${r.toString(16)} `}),n.substring(0,n.length-1)}function uo(t){return t&&typeof ArrayBuffer<"u"&&(t instanceof ArrayBuffer||t.constructor&&t.constructor.name==="ArrayBuffer")}async function gm(t,e,n,r,i,o){const s={},[a,c]=As();s[a]=c,t.log(N.Trace,`(${e} transport) sending data. ${Va(i,o.logMessageContent)}.`);const u=uo(i)?"arraybuffer":"text",l=await n.post(r,{content:i,headers:{...s,...o.headers},responseType:u,timeout:o.timeout,withCredentials:o.withCredentials});t.log(N.Trace,`(${e} transport) request complete. Response status: ${l.statusCode}.`)}function X_(t){return t===void 0?new Iu(N.Information):t===null?Wa.instance:t.log!==void 0?t:new Iu(t)}class J_{constructor(e,n){this._subject=e,this._observer=n}dispose(){const e=this._subject.observers.indexOf(this._observer);e>-1&&this._subject.observers.splice(e,1),this._subject.observers.length===0&&this._subject.cancelCallback&&this._subject.cancelCallback().catch(n=>{})}}class Iu{constructor(e){this._minLevel=e,this.out=console}log(e,n){if(e>=this._minLevel){const r=`[${new Date().toISOString()}] ${N[e]}: ${n}`;switch(e){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);break}}}}function As(){let t="X-SignalR-User-Agent";return nt.isNode&&(t="User-Agent"),[t,G_(B_,Q_(),Y_(),Z_())]}function G_(t,e,n,r){let i="Microsoft SignalR/";const o=t.split(".");return i+=`${o[0]}.${o[1]}`,i+=` (${t}; `,e&&e!==""?i+=`${e}; `:i+="Unknown OS; ",i+=`${n}`,r?i+=`; ${r}`:i+="; Unknown Runtime Version",i+=")",i}function Q_(){if(nt.isNode)switch(process.platform){case"win32":return"Windows NT";case"darwin":return"macOS";case"linux":return"Linux";default:return process.platform}else return""}function Z_(){if(nt.isNode)return process.versions.node}function Y_(){return nt.isNode?"NodeJS":"Browser"}function Kl(t){return t.stack?t.stack:t.message?t.message:`${t}`}function e0(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;throw new Error("could not find global")}class t0 extends wl{constructor(e){if(super(),this._logger=e,typeof fetch>"u"||nt.isNode){const n=typeof __webpack_require__=="function"?__non_webpack_require__:require;this._jar=new(n("tough-cookie")).CookieJar,typeof fetch>"u"?this._fetchType=n("node-fetch"):this._fetchType=fetch,this._fetchType=n("fetch-cookie")(this._fetchType,this._jar)}else this._fetchType=fetch.bind(e0());if(typeof AbortController>"u"){const n=typeof __webpack_require__=="function"?__non_webpack_require__:require;this._abortControllerType=n("abort-controller")}else this._abortControllerType=AbortController}async send(e){if(e.abortSignal&&e.abortSignal.aborted)throw new xn;if(!e.method)throw new Error("No method defined.");if(!e.url)throw new Error("No url defined.");const n=new this._abortControllerType;let r;e.abortSignal&&(e.abortSignal.onabort=()=>{n.abort(),r=new xn});let i=null;if(e.timeout){const c=e.timeout;i=setTimeout(()=>{n.abort(),this._logger.log(N.Warning,"Timeout from HTTP request."),r=new Zh},c)}e.content===""&&(e.content=void 0),e.content&&(e.headers=e.headers||{},uo(e.content)?e.headers["Content-Type"]="application/octet-stream":e.headers["Content-Type"]="text/plain;charset=UTF-8");let o;try{o=await this._fetchType(e.url,{body:e.content,cache:"no-cache",credentials:e.withCredentials===!0?"include":"same-origin",headers:{"X-Requested-With":"XMLHttpRequest",...e.headers},method:e.method,mode:"cors",redirect:"follow",signal:n.signal})}catch(c){throw r||(this._logger.log(N.Warning,`Error from HTTP request. ${c}.`),c)}finally{i&&clearTimeout(i),e.abortSignal&&(e.abortSignal.onabort=null)}if(!o.ok){const c=await rg(o,"text");throw new Qi(c||o.statusText,o.status)}const a=await rg(o,e.responseType);return new pm(o.status,o.statusText,a)}getCookieString(e){let n="";return nt.isNode&&this._jar&&this._jar.getCookies(e,(r,i)=>n=i.join("; ")),n}}function rg(t,e){let n;switch(e){case"arraybuffer":n=t.arrayBuffer();break;case"text":n=t.text();break;case"blob":case"document":case"json":throw new Error(`${e} is not supported.`);default:n=t.text();break}return n}class n0 extends wl{constructor(e){super(),this._logger=e}send(e){return e.abortSignal&&e.abortSignal.aborted?Promise.reject(new xn):e.method?e.url?new Promise((n,r)=>{const i=new XMLHttpRequest;i.open(e.method,e.url,!0),i.withCredentials=e.withCredentials===void 0?!0:e.withCredentials,i.setRequestHeader("X-Requested-With","XMLHttpRequest"),e.content===""&&(e.content=void 0),e.content&&(uo(e.content)?i.setRequestHeader("Content-Type","application/octet-stream"):i.setRequestHeader("Content-Type","text/plain;charset=UTF-8"));const o=e.headers;o&&Object.keys(o).forEach(s=>{i.setRequestHeader(s,o[s])}),e.responseType&&(i.responseType=e.responseType),e.abortSignal&&(e.abortSignal.onabort=()=>{i.abort(),r(new xn)}),e.timeout&&(i.timeout=e.timeout),i.onload=()=>{e.abortSignal&&(e.abortSignal.onabort=null),i.status>=200&&i.status<300?n(new pm(i.status,i.statusText,i.response||i.responseText)):r(new Qi(i.response||i.responseText||i.statusText,i.status))},i.onerror=()=>{this._logger.log(N.Warning,`Error from HTTP request. ${i.status}: ${i.statusText}.`),r(new Qi(i.statusText,i.status))},i.ontimeout=()=>{this._logger.log(N.Warning,"Timeout from HTTP request."),r(new Zh)},i.send(e.content)}):Promise.reject(new Error("No url defined.")):Promise.reject(new Error("No method defined."))}}class r0 extends wl{constructor(e){if(super(),typeof fetch<"u"||nt.isNode)this._httpClient=new t0(e);else if(typeof XMLHttpRequest<"u")this._httpClient=new n0(e);else throw new Error("No usable HttpClient found.")}send(e){return e.abortSignal&&e.abortSignal.aborted?Promise.reject(new xn):e.method?e.url?this._httpClient.send(e):Promise.reject(new Error("No url defined.")):Promise.reject(new Error("No method defined."))}getCookieString(e){return this._httpClient.getCookieString(e)}}class rn{static write(e){return`${e}${rn.RecordSeparator}`}static parse(e){if(e[e.length-1]!==rn.RecordSeparator)throw new Error("Message is incomplete.");const n=e.split(rn.RecordSeparator);return n.pop(),n}}rn.RecordSeparatorCode=30;rn.RecordSeparator=String.fromCharCode(rn.RecordSeparatorCode);class i0{writeHandshakeRequest(e){return rn.write(JSON.stringify(e))}parseHandshakeResponse(e){let n,r;if(uo(e)){const a=new Uint8Array(e),c=a.indexOf(rn.RecordSeparatorCode);if(c===-1)throw new Error("Message is incomplete.");const u=c+1;n=String.fromCharCode.apply(null,Array.prototype.slice.call(a.slice(0,u))),r=a.byteLength>u?a.slice(u).buffer:null}else{const a=e,c=a.indexOf(rn.RecordSeparator);if(c===-1)throw new Error("Message is incomplete.");const u=c+1;n=a.substring(0,u),r=a.length>u?a.substring(u):null}const i=rn.parse(n),o=JSON.parse(i[0]);if(o.type)throw new Error("Expected a handshake response from the server.");return[r,o]}}var Se;(function(t){t[t.Invocation=1]="Invocation",t[t.StreamItem=2]="StreamItem",t[t.Completion=3]="Completion",t[t.StreamInvocation=4]="StreamInvocation",t[t.CancelInvocation=5]="CancelInvocation",t[t.Ping=6]="Ping",t[t.Close=7]="Close",t[t.Ack=8]="Ack",t[t.Sequence=9]="Sequence"})(Se||(Se={}));class o0{constructor(){this.observers=[]}next(e){for(const n of this.observers)n.next(e)}error(e){for(const n of this.observers)n.error&&n.error(e)}complete(){for(const e of this.observers)e.complete&&e.complete()}subscribe(e){return this.observers.push(e),new J_(this,e)}}class s0{constructor(e,n,r){this._bufferSize=1e5,this._messages=[],this._totalMessageCount=0,this._waitForSequenceMessage=!1,this._nextReceivingSequenceId=1,this._latestReceivedSequenceId=0,this._bufferedByteCount=0,this._reconnectInProgress=!1,this._protocol=e,this._connection=n,this._bufferSize=r}async _send(e){const n=this._protocol.writeMessage(e);let r=Promise.resolve();if(this._isInvocationMessage(e)){this._totalMessageCount++;let i=()=>{},o=()=>{};uo(n)?this._bufferedByteCount+=n.byteLength:this._bufferedByteCount+=n.length,this._bufferedByteCount>=this._bufferSize&&(r=new Promise((s,a)=>{i=s,o=a})),this._messages.push(new a0(n,this._totalMessageCount,i,o))}try{this._reconnectInProgress||await this._connection.send(n)}catch{this._disconnected()}await r}_ack(e){let n=-1;for(let r=0;r<this._messages.length;r++){const i=this._messages[r];if(i._id<=e.sequenceId)n=r,uo(i._message)?this._bufferedByteCount-=i._message.byteLength:this._bufferedByteCount-=i._message.length,i._resolver();else if(this._bufferedByteCount<this._bufferSize)i._resolver();else break}n!==-1&&(this._messages=this._messages.slice(n+1))}_shouldProcessMessage(e){if(this._waitForSequenceMessage)return e.type!==Se.Sequence?!1:(this._waitForSequenceMessage=!1,!0);if(!this._isInvocationMessage(e))return!0;const n=this._nextReceivingSequenceId;return this._nextReceivingSequenceId++,n<=this._latestReceivedSequenceId?(n===this._latestReceivedSequenceId&&this._ackTimer(),!1):(this._latestReceivedSequenceId=n,this._ackTimer(),!0)}_resetSequence(e){if(e.sequenceId>this._nextReceivingSequenceId){this._connection.stop(new Error("Sequence ID greater than amount of messages we've received."));return}this._nextReceivingSequenceId=e.sequenceId}_disconnected(){this._reconnectInProgress=!0,this._waitForSequenceMessage=!0}async _resend(){const e=this._messages.length!==0?this._messages[0]._id:this._totalMessageCount+1;await this._connection.send(this._protocol.writeMessage({type:Se.Sequence,sequenceId:e}));const n=this._messages;for(const r of n)await this._connection.send(r._message);this._reconnectInProgress=!1}_dispose(e){e??(e=new Error("Unable to reconnect to server."));for(const n of this._messages)n._rejector(e)}_isInvocationMessage(e){switch(e.type){case Se.Invocation:case Se.StreamItem:case Se.Completion:case Se.StreamInvocation:case Se.CancelInvocation:return!0;case Se.Close:case Se.Sequence:case Se.Ping:case Se.Ack:return!1}}_ackTimer(){this._ackTimerHandle===void 0&&(this._ackTimerHandle=setTimeout(async()=>{try{this._reconnectInProgress||await this._connection.send(this._protocol.writeMessage({type:Se.Ack,sequenceId:this._latestReceivedSequenceId}))}catch{}clearTimeout(this._ackTimerHandle),this._ackTimerHandle=void 0},1e3))}}class a0{constructor(e,n,r,i){this._message=e,this._id=n,this._resolver=r,this._rejector=i}}const c0=30*1e3,u0=15*1e3,l0=1e5;var Xe;(function(t){t.Disconnected="Disconnected",t.Connecting="Connecting",t.Connected="Connected",t.Disconnecting="Disconnecting",t.Reconnecting="Reconnecting"})(Xe||(Xe={}));class Yh{static create(e,n,r,i,o,s,a){return new Yh(e,n,r,i,o,s,a)}constructor(e,n,r,i,o,s,a){this._nextKeepAlive=0,this._freezeEventListener=()=>{this._logger.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://learn.microsoft.com/aspnet/core/signalr/javascript-client#bsleep")},dt.isRequired(e,"connection"),dt.isRequired(n,"logger"),dt.isRequired(r,"protocol"),this.serverTimeoutInMilliseconds=o??c0,this.keepAliveIntervalInMilliseconds=s??u0,this._statefulReconnectBufferSize=a??l0,this._logger=n,this._protocol=r,this.connection=e,this._reconnectPolicy=i,this._handshakeProtocol=new i0,this.connection.onreceive=c=>this._processIncomingData(c),this.connection.onclose=c=>this._connectionClosed(c),this._callbacks={},this._methods={},this._closedCallbacks=[],this._reconnectingCallbacks=[],this._reconnectedCallbacks=[],this._invocationId=0,this._receivedHandshakeResponse=!1,this._connectionState=Xe.Disconnected,this._connectionStarted=!1,this._cachedPingMessage=this._protocol.writeMessage({type:Se.Ping})}get state(){return this._connectionState}get connectionId(){return this.connection&&this.connection.connectionId||null}get baseUrl(){return this.connection.baseUrl||""}set baseUrl(e){if(this._connectionState!==Xe.Disconnected&&this._connectionState!==Xe.Reconnecting)throw new Error("The HubConnection must be in the Disconnected or Reconnecting state to change the url.");if(!e)throw new Error("The HubConnection url must be a valid url.");this.connection.baseUrl=e}start(){return this._startPromise=this._startWithStateTransitions(),this._startPromise}async _startWithStateTransitions(){if(this._connectionState!==Xe.Disconnected)return Promise.reject(new Error("Cannot start a HubConnection that is not in the 'Disconnected' state."));this._connectionState=Xe.Connecting,this._logger.log(N.Debug,"Starting HubConnection.");try{await this._startInternal(),nt.isBrowser&&window.document.addEventListener("freeze",this._freezeEventListener),this._connectionState=Xe.Connected,this._connectionStarted=!0,this._logger.log(N.Debug,"HubConnection connected successfully.")}catch(e){return this._connectionState=Xe.Disconnected,this._logger.log(N.Debug,`HubConnection failed to start successfully because of error '${e}'.`),Promise.reject(e)}}async _startInternal(){this._stopDuringStartError=void 0,this._receivedHandshakeResponse=!1;const e=new Promise((n,r)=>{this._handshakeResolver=n,this._handshakeRejecter=r});await this.connection.start(this._protocol.transferFormat);try{let n=this._protocol.version;this.connection.features.reconnect||(n=1);const r={protocol:this._protocol.name,version:n};if(this._logger.log(N.Debug,"Sending handshake request."),await this._sendMessage(this._handshakeProtocol.writeHandshakeRequest(r)),this._logger.log(N.Information,`Using HubProtocol '${this._protocol.name}'.`),this._cleanupTimeout(),this._resetTimeoutPeriod(),this._resetKeepAliveInterval(),await e,this._stopDuringStartError)throw this._stopDuringStartError;(this.connection.features.reconnect||!1)&&(this._messageBuffer=new s0(this._protocol,this.connection,this._statefulReconnectBufferSize),this.connection.features.disconnected=this._messageBuffer._disconnected.bind(this._messageBuffer),this.connection.features.resend=()=>{if(this._messageBuffer)return this._messageBuffer._resend()}),this.connection.features.inherentKeepAlive||await this._sendMessage(this._cachedPingMessage)}catch(n){throw this._logger.log(N.Debug,`Hub handshake failed with error '${n}' during start(). Stopping HubConnection.`),this._cleanupTimeout(),this._cleanupPingTimer(),await this.connection.stop(n),n}}async stop(){const e=this._startPromise;this.connection.features.reconnect=!1,this._stopPromise=this._stopInternal(),await this._stopPromise;try{await e}catch{}}_stopInternal(e){if(this._connectionState===Xe.Disconnected)return this._logger.log(N.Debug,`Call to HubConnection.stop(${e}) ignored because it is already in the disconnected state.`),Promise.resolve();if(this._connectionState===Xe.Disconnecting)return this._logger.log(N.Debug,`Call to HttpConnection.stop(${e}) ignored because the connection is already in the disconnecting state.`),this._stopPromise;const n=this._connectionState;return this._connectionState=Xe.Disconnecting,this._logger.log(N.Debug,"Stopping HubConnection."),this._reconnectDelayHandle?(this._logger.log(N.Debug,"Connection stopped during reconnect delay. Done reconnecting."),clearTimeout(this._reconnectDelayHandle),this._reconnectDelayHandle=void 0,this._completeClose(),Promise.resolve()):(n===Xe.Connected&&this._sendCloseMessage(),this._cleanupTimeout(),this._cleanupPingTimer(),this._stopDuringStartError=e||new xn("The connection was stopped before the hub handshake could complete."),this.connection.stop(e))}async _sendCloseMessage(){try{await this._sendWithProtocol(this._createCloseMessage())}catch{}}stream(e,...n){const[r,i]=this._replaceStreamingParams(n),o=this._createStreamInvocation(e,n,i);let s;const a=new o0;return a.cancelCallback=()=>{const c=this._createCancelInvocation(o.invocationId);return delete this._callbacks[o.invocationId],s.then(()=>this._sendWithProtocol(c))},this._callbacks[o.invocationId]=(c,u)=>{if(u){a.error(u);return}else c&&(c.type===Se.Completion?c.error?a.error(new Error(c.error)):a.complete():a.next(c.item))},s=this._sendWithProtocol(o).catch(c=>{a.error(c),delete this._callbacks[o.invocationId]}),this._launchStreams(r,s),a}_sendMessage(e){return this._resetKeepAliveInterval(),this.connection.send(e)}_sendWithProtocol(e){return this._messageBuffer?this._messageBuffer._send(e):this._sendMessage(this._protocol.writeMessage(e))}send(e,...n){const[r,i]=this._replaceStreamingParams(n),o=this._sendWithProtocol(this._createInvocation(e,n,!0,i));return this._launchStreams(r,o),o}invoke(e,...n){const[r,i]=this._replaceStreamingParams(n),o=this._createInvocation(e,n,!1,i);return new Promise((a,c)=>{this._callbacks[o.invocationId]=(l,f)=>{if(f){c(f);return}else l&&(l.type===Se.Completion?l.error?c(new Error(l.error)):a(l.result):c(new Error(`Unexpected message type: ${l.type}`)))};const u=this._sendWithProtocol(o).catch(l=>{c(l),delete this._callbacks[o.invocationId]});this._launchStreams(r,u)})}on(e,n){!e||!n||(e=e.toLowerCase(),this._methods[e]||(this._methods[e]=[]),this._methods[e].indexOf(n)===-1&&this._methods[e].push(n))}off(e,n){if(!e)return;e=e.toLowerCase();const r=this._methods[e];if(r)if(n){const i=r.indexOf(n);i!==-1&&(r.splice(i,1),r.length===0&&delete this._methods[e])}else delete this._methods[e]}onclose(e){e&&this._closedCallbacks.push(e)}onreconnecting(e){e&&this._reconnectingCallbacks.push(e)}onreconnected(e){e&&this._reconnectedCallbacks.push(e)}_processIncomingData(e){if(this._cleanupTimeout(),this._receivedHandshakeResponse||(e=this._processHandshakeResponse(e),this._receivedHandshakeResponse=!0),e){const n=this._protocol.parseMessages(e,this._logger);for(const r of n)if(!(this._messageBuffer&&!this._messageBuffer._shouldProcessMessage(r)))switch(r.type){case Se.Invocation:this._invokeClientMethod(r).catch(i=>{this._logger.log(N.Error,`Invoke client method threw error: ${Kl(i)}`)});break;case Se.StreamItem:case Se.Completion:{const i=this._callbacks[r.invocationId];if(i){r.type===Se.Completion&&delete this._callbacks[r.invocationId];try{i(r)}catch(o){this._logger.log(N.Error,`Stream callback threw error: ${Kl(o)}`)}}break}case Se.Ping:break;case Se.Close:{this._logger.log(N.Information,"Close message received from server.");const i=r.error?new Error("Server returned an error on close: "+r.error):void 0;r.allowReconnect===!0?this.connection.stop(i):this._stopPromise=this._stopInternal(i);break}case Se.Ack:this._messageBuffer&&this._messageBuffer._ack(r);break;case Se.Sequence:this._messageBuffer&&this._messageBuffer._resetSequence(r);break;default:this._logger.log(N.Warning,`Invalid message type: ${r.type}.`);break}}this._resetTimeoutPeriod()}_processHandshakeResponse(e){let n,r;try{[r,n]=this._handshakeProtocol.parseHandshakeResponse(e)}catch(i){const o="Error parsing handshake response: "+i;this._logger.log(N.Error,o);const s=new Error(o);throw this._handshakeRejecter(s),s}if(n.error){const i="Server returned handshake error: "+n.error;this._logger.log(N.Error,i);const o=new Error(i);throw this._handshakeRejecter(o),o}else this._logger.log(N.Debug,"Server handshake complete.");return this._handshakeResolver(),r}_resetKeepAliveInterval(){this.connection.features.inherentKeepAlive||(this._nextKeepAlive=new Date().getTime()+this.keepAliveIntervalInMilliseconds,this._cleanupPingTimer())}_resetTimeoutPeriod(){if(!this.connection.features||!this.connection.features.inherentKeepAlive){this._timeoutHandle=setTimeout(()=>this.serverTimeout(),this.serverTimeoutInMilliseconds);let e=this._nextKeepAlive-new Date().getTime();if(e<0){this._connectionState===Xe.Connected&&this._trySendPingMessage();return}this._pingServerHandle===void 0&&(e<0&&(e=0),this._pingServerHandle=setTimeout(async()=>{this._connectionState===Xe.Connected&&await this._trySendPingMessage()},e))}}serverTimeout(){this.connection.stop(new Error("Server timeout elapsed without receiving a message from the server."))}async _invokeClientMethod(e){const n=e.target.toLowerCase(),r=this._methods[n];if(!r){this._logger.log(N.Warning,`No client method with the name '${n}' found.`),e.invocationId&&(this._logger.log(N.Warning,`No result given for '${n}' method and invocation ID '${e.invocationId}'.`),await this._sendWithProtocol(this._createCompletionMessage(e.invocationId,"Client didn't provide a result.",null)));return}const i=r.slice(),o=!!e.invocationId;let s,a,c;for(const u of i)try{const l=s;s=await u.apply(this,e.arguments),o&&s&&l&&(this._logger.log(N.Error,`Multiple results provided for '${n}'. Sending error to server.`),c=this._createCompletionMessage(e.invocationId,"Client provided multiple results.",null)),a=void 0}catch(l){a=l,this._logger.log(N.Error,`A callback for the method '${n}' threw error '${l}'.`)}c?await this._sendWithProtocol(c):o?(a?c=this._createCompletionMessage(e.invocationId,`${a}`,null):s!==void 0?c=this._createCompletionMessage(e.invocationId,null,s):(this._logger.log(N.Warning,`No result given for '${n}' method and invocation ID '${e.invocationId}'.`),c=this._createCompletionMessage(e.invocationId,"Client didn't provide a result.",null)),await this._sendWithProtocol(c)):s&&this._logger.log(N.Error,`Result given for '${n}' method but server is not expecting a result.`)}_connectionClosed(e){this._logger.log(N.Debug,`HubConnection.connectionClosed(${e}) called while in state ${this._connectionState}.`),this._stopDuringStartError=this._stopDuringStartError||e||new xn("The underlying connection was closed before the hub handshake could complete."),this._handshakeResolver&&this._handshakeResolver(),this._cancelCallbacksWithError(e||new Error("Invocation canceled due to the underlying connection being closed.")),this._cleanupTimeout(),this._cleanupPingTimer(),this._connectionState===Xe.Disconnecting?this._completeClose(e):this._connectionState===Xe.Connected&&this._reconnectPolicy?this._reconnect(e):this._connectionState===Xe.Connected&&this._completeClose(e)}_completeClose(e){if(this._connectionStarted){this._connectionState=Xe.Disconnected,this._connectionStarted=!1,this._messageBuffer&&(this._messageBuffer._dispose(e??new Error("Connection closed.")),this._messageBuffer=void 0),nt.isBrowser&&window.document.removeEventListener("freeze",this._freezeEventListener);try{this._closedCallbacks.forEach(n=>n.apply(this,[e]))}catch(n){this._logger.log(N.Error,`An onclose callback called with error '${e}' threw error '${n}'.`)}}}async _reconnect(e){const n=Date.now();let r=0,i=e!==void 0?e:new Error("Attempting to reconnect due to a unknown error."),o=this._getNextRetryDelay(r,0,i);if(o===null){this._logger.log(N.Debug,"Connection not reconnecting because the IRetryPolicy returned null on the first reconnect attempt."),this._completeClose(e);return}if(this._connectionState=Xe.Reconnecting,e?this._logger.log(N.Information,`Connection reconnecting because of error '${e}'.`):this._logger.log(N.Information,"Connection reconnecting."),this._reconnectingCallbacks.length!==0){try{this._reconnectingCallbacks.forEach(s=>s.apply(this,[e]))}catch(s){this._logger.log(N.Error,`An onreconnecting callback called with error '${e}' threw error '${s}'.`)}if(this._connectionState!==Xe.Reconnecting){this._logger.log(N.Debug,"Connection left the reconnecting state in onreconnecting callback. Done reconnecting.");return}}for(;o!==null;){if(this._logger.log(N.Information,`Reconnect attempt number ${r+1} will start in ${o} ms.`),await new Promise(s=>{this._reconnectDelayHandle=setTimeout(s,o)}),this._reconnectDelayHandle=void 0,this._connectionState!==Xe.Reconnecting){this._logger.log(N.Debug,"Connection left the reconnecting state during reconnect delay. Done reconnecting.");return}try{if(await this._startInternal(),this._connectionState=Xe.Connected,this._logger.log(N.Information,"HubConnection reconnected successfully."),this._reconnectedCallbacks.length!==0)try{this._reconnectedCallbacks.forEach(s=>s.apply(this,[this.connection.connectionId]))}catch(s){this._logger.log(N.Error,`An onreconnected callback called with connectionId '${this.connection.connectionId}; threw error '${s}'.`)}return}catch(s){if(this._logger.log(N.Information,`Reconnect attempt failed because of error '${s}'.`),this._connectionState!==Xe.Reconnecting){this._logger.log(N.Debug,`Connection moved to the '${this._connectionState}' from the reconnecting state during reconnect attempt. Done reconnecting.`),this._connectionState===Xe.Disconnecting&&this._completeClose();return}r++,i=s instanceof Error?s:new Error(s.toString()),o=this._getNextRetryDelay(r,Date.now()-n,i)}}this._logger.log(N.Information,`Reconnect retries have been exhausted after ${Date.now()-n} ms and ${r} failed attempts. Connection disconnecting.`),this._completeClose()}_getNextRetryDelay(e,n,r){try{return this._reconnectPolicy.nextRetryDelayInMilliseconds({elapsedMilliseconds:n,previousRetryCount:e,retryReason:r})}catch(i){return this._logger.log(N.Error,`IRetryPolicy.nextRetryDelayInMilliseconds(${e}, ${n}) threw error '${i}'.`),null}}_cancelCallbacksWithError(e){const n=this._callbacks;this._callbacks={},Object.keys(n).forEach(r=>{const i=n[r];try{i(null,e)}catch(o){this._logger.log(N.Error,`Stream 'error' callback called with '${e}' threw error: ${Kl(o)}`)}})}_cleanupPingTimer(){this._pingServerHandle&&(clearTimeout(this._pingServerHandle),this._pingServerHandle=void 0)}_cleanupTimeout(){this._timeoutHandle&&clearTimeout(this._timeoutHandle)}_createInvocation(e,n,r,i){if(r)return i.length!==0?{target:e,arguments:n,streamIds:i,type:Se.Invocation}:{target:e,arguments:n,type:Se.Invocation};{const o=this._invocationId;return this._invocationId++,i.length!==0?{target:e,arguments:n,invocationId:o.toString(),streamIds:i,type:Se.Invocation}:{target:e,arguments:n,invocationId:o.toString(),type:Se.Invocation}}}_launchStreams(e,n){if(e.length!==0){n||(n=Promise.resolve());for(const r in e)e[r].subscribe({complete:()=>{n=n.then(()=>this._sendWithProtocol(this._createCompletionMessage(r)))},error:i=>{let o;i instanceof Error?o=i.message:i&&i.toString?o=i.toString():o="Unknown error",n=n.then(()=>this._sendWithProtocol(this._createCompletionMessage(r,o)))},next:i=>{n=n.then(()=>this._sendWithProtocol(this._createStreamItemMessage(r,i)))}})}}_replaceStreamingParams(e){const n=[],r=[];for(let i=0;i<e.length;i++){const o=e[i];if(this._isObservable(o)){const s=this._invocationId;this._invocationId++,n[s]=o,r.push(s.toString()),e.splice(i,1)}}return[n,r]}_isObservable(e){return e&&e.subscribe&&typeof e.subscribe=="function"}_createStreamInvocation(e,n,r){const i=this._invocationId;return this._invocationId++,r.length!==0?{target:e,arguments:n,invocationId:i.toString(),streamIds:r,type:Se.StreamInvocation}:{target:e,arguments:n,invocationId:i.toString(),type:Se.StreamInvocation}}_createCancelInvocation(e){return{invocationId:e,type:Se.CancelInvocation}}_createStreamItemMessage(e,n){return{invocationId:e,item:n,type:Se.StreamItem}}_createCompletionMessage(e,n,r){return n?{error:n,invocationId:e,type:Se.Completion}:{invocationId:e,result:r,type:Se.Completion}}_createCloseMessage(){return{type:Se.Close}}async _trySendPingMessage(){try{await this._sendMessage(this._cachedPingMessage)}catch{this._cleanupPingTimer()}}}const f0=[0,2e3,1e4,3e4,null];class ig{constructor(e){this._retryDelays=e!==void 0?[...e,null]:f0}nextRetryDelayInMilliseconds(e){return this._retryDelays[e.previousRetryCount]}}class Zi{}Zi.Authorization="Authorization";Zi.Cookie="Cookie";class d0 extends wl{constructor(e,n){super(),this._innerClient=e,this._accessTokenFactory=n}async send(e){let n=!0;this._accessTokenFactory&&(!this._accessToken||e.url&&e.url.indexOf("/negotiate?")>0)&&(n=!1,this._accessToken=await this._accessTokenFactory()),this._setAuthorizationHeader(e);const r=await this._innerClient.send(e);return n&&r.statusCode===401&&this._accessTokenFactory?(this._accessToken=await this._accessTokenFactory(),this._setAuthorizationHeader(e),await this._innerClient.send(e)):r}_setAuthorizationHeader(e){e.headers||(e.headers={}),this._accessToken?e.headers[Zi.Authorization]=`Bearer ${this._accessToken}`:this._accessTokenFactory&&e.headers[Zi.Authorization]&&delete e.headers[Zi.Authorization]}getCookieString(e){return this._innerClient.getCookieString(e)}}var ut;(function(t){t[t.None=0]="None",t[t.WebSockets=1]="WebSockets",t[t.ServerSentEvents=2]="ServerSentEvents",t[t.LongPolling=4]="LongPolling"})(ut||(ut={}));var Rt;(function(t){t[t.Text=1]="Text",t[t.Binary=2]="Binary"})(Rt||(Rt={}));let h0=class{constructor(){this._isAborted=!1,this.onabort=null}abort(){this._isAborted||(this._isAborted=!0,this.onabort&&this.onabort())}get signal(){return this}get aborted(){return this._isAborted}};class og{get pollAborted(){return this._pollAbort.aborted}constructor(e,n,r){this._httpClient=e,this._logger=n,this._pollAbort=new h0,this._options=r,this._running=!1,this.onreceive=null,this.onclose=null}async connect(e,n){if(dt.isRequired(e,"url"),dt.isRequired(n,"transferFormat"),dt.isIn(n,Rt,"transferFormat"),this._url=e,this._logger.log(N.Trace,"(LongPolling transport) Connecting."),n===Rt.Binary&&typeof XMLHttpRequest<"u"&&typeof new XMLHttpRequest().responseType!="string")throw new Error("Binary protocols over XmlHttpRequest not implementing advanced features are not supported.");const[r,i]=As(),o={[r]:i,...this._options.headers},s={abortSignal:this._pollAbort.signal,headers:o,timeout:1e5,withCredentials:this._options.withCredentials};n===Rt.Binary&&(s.responseType="arraybuffer");const a=`${e}&_=${Date.now()}`;this._logger.log(N.Trace,`(LongPolling transport) polling: ${a}.`);const c=await this._httpClient.get(a,s);c.statusCode!==200?(this._logger.log(N.Error,`(LongPolling transport) Unexpected response code: ${c.statusCode}.`),this._closeError=new Qi(c.statusText||"",c.statusCode),this._running=!1):this._running=!0,this._receiving=this._poll(this._url,s)}async _poll(e,n){try{for(;this._running;)try{const r=`${e}&_=${Date.now()}`;this._logger.log(N.Trace,`(LongPolling transport) polling: ${r}.`);const i=await this._httpClient.get(r,n);i.statusCode===204?(this._logger.log(N.Information,"(LongPolling transport) Poll terminated by server."),this._running=!1):i.statusCode!==200?(this._logger.log(N.Error,`(LongPolling transport) Unexpected response code: ${i.statusCode}.`),this._closeError=new Qi(i.statusText||"",i.statusCode),this._running=!1):i.content?(this._logger.log(N.Trace,`(LongPolling transport) data received. ${Va(i.content,this._options.logMessageContent)}.`),this.onreceive&&this.onreceive(i.content)):this._logger.log(N.Trace,"(LongPolling transport) Poll timed out, reissuing.")}catch(r){this._running?r instanceof Zh?this._logger.log(N.Trace,"(LongPolling transport) Poll timed out, reissuing."):(this._closeError=r,this._running=!1):this._logger.log(N.Trace,`(LongPolling transport) Poll errored after shutdown: ${r.message}`)}}finally{this._logger.log(N.Trace,"(LongPolling transport) Polling complete."),this.pollAborted||this._raiseOnClose()}}async send(e){return this._running?gm(this._logger,"LongPolling",this._httpClient,this._url,e,this._options):Promise.reject(new Error("Cannot send until the transport is connected"))}async stop(){this._logger.log(N.Trace,"(LongPolling transport) Stopping polling."),this._running=!1,this._pollAbort.abort();try{await this._receiving,this._logger.log(N.Trace,`(LongPolling transport) sending DELETE request to ${this._url}.`);const e={},[n,r]=As();e[n]=r;const i={headers:{...e,...this._options.headers},timeout:this._options.timeout,withCredentials:this._options.withCredentials};let o;try{await this._httpClient.delete(this._url,i)}catch(s){o=s}o?o instanceof Qi&&(o.statusCode===404?this._logger.log(N.Trace,"(LongPolling transport) A 404 response was returned from sending a DELETE request."):this._logger.log(N.Trace,`(LongPolling transport) Error sending a DELETE request: ${o}`)):this._logger.log(N.Trace,"(LongPolling transport) DELETE request accepted.")}finally{this._logger.log(N.Trace,"(LongPolling transport) Stop finished."),this._raiseOnClose()}}_raiseOnClose(){if(this.onclose){let e="(LongPolling transport) Firing onclose event.";this._closeError&&(e+=" Error: "+this._closeError),this._logger.log(N.Trace,e),this.onclose(this._closeError)}}}class p0{constructor(e,n,r,i){this._httpClient=e,this._accessToken=n,this._logger=r,this._options=i,this.onreceive=null,this.onclose=null}async connect(e,n){return dt.isRequired(e,"url"),dt.isRequired(n,"transferFormat"),dt.isIn(n,Rt,"transferFormat"),this._logger.log(N.Trace,"(SSE transport) Connecting."),this._url=e,this._accessToken&&(e+=(e.indexOf("?")<0?"?":"&")+`access_token=${encodeURIComponent(this._accessToken)}`),new Promise((r,i)=>{let o=!1;if(n!==Rt.Text){i(new Error("The Server-Sent Events transport only supports the 'Text' transfer format"));return}let s;if(nt.isBrowser||nt.isWebWorker)s=new this._options.EventSource(e,{withCredentials:this._options.withCredentials});else{const a=this._httpClient.getCookieString(e),c={};c.Cookie=a;const[u,l]=As();c[u]=l,s=new this._options.EventSource(e,{withCredentials:this._options.withCredentials,headers:{...c,...this._options.headers}})}try{s.onmessage=a=>{if(this.onreceive)try{this._logger.log(N.Trace,`(SSE transport) data received. ${Va(a.data,this._options.logMessageContent)}.`),this.onreceive(a.data)}catch(c){this._close(c);return}},s.onerror=a=>{o?this._close():i(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."))},s.onopen=()=>{this._logger.log(N.Information,`SSE connected to ${this._url}`),this._eventSource=s,o=!0,r()}}catch(a){i(a);return}})}async send(e){return this._eventSource?gm(this._logger,"SSE",this._httpClient,this._url,e,this._options):Promise.reject(new Error("Cannot send until the transport is connected"))}stop(){return this._close(),Promise.resolve()}_close(e){this._eventSource&&(this._eventSource.close(),this._eventSource=void 0,this.onclose&&this.onclose(e))}}class g0{constructor(e,n,r,i,o,s){this._logger=r,this._accessTokenFactory=n,this._logMessageContent=i,this._webSocketConstructor=o,this._httpClient=e,this.onreceive=null,this.onclose=null,this._headers=s}async connect(e,n){dt.isRequired(e,"url"),dt.isRequired(n,"transferFormat"),dt.isIn(n,Rt,"transferFormat"),this._logger.log(N.Trace,"(WebSockets transport) Connecting.");let r;return this._accessTokenFactory&&(r=await this._accessTokenFactory()),new Promise((i,o)=>{e=e.replace(/^http/,"ws");let s;const a=this._httpClient.getCookieString(e);let c=!1;if(nt.isNode||nt.isReactNative){const u={},[l,f]=As();u[l]=f,r&&(u[Zi.Authorization]=`Bearer ${r}`),a&&(u[Zi.Cookie]=a),s=new this._webSocketConstructor(e,void 0,{headers:{...u,...this._headers}})}else r&&(e+=(e.indexOf("?")<0?"?":"&")+`access_token=${encodeURIComponent(r)}`);s||(s=new this._webSocketConstructor(e)),n===Rt.Binary&&(s.binaryType="arraybuffer"),s.onopen=u=>{this._logger.log(N.Information,`WebSocket connected to ${e}.`),this._webSocket=s,c=!0,i()},s.onerror=u=>{let l=null;typeof ErrorEvent<"u"&&u instanceof ErrorEvent?l=u.error:l="There was an error with the transport",this._logger.log(N.Information,`(WebSockets transport) ${l}.`)},s.onmessage=u=>{if(this._logger.log(N.Trace,`(WebSockets transport) data received. ${Va(u.data,this._logMessageContent)}.`),this.onreceive)try{this.onreceive(u.data)}catch(l){this._close(l);return}},s.onclose=u=>{if(c)this._close(u);else{let l=null;typeof ErrorEvent<"u"&&u instanceof ErrorEvent?l=u.error:l="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.",o(new Error(l))}}})}send(e){return this._webSocket&&this._webSocket.readyState===this._webSocketConstructor.OPEN?(this._logger.log(N.Trace,`(WebSockets transport) sending data. ${Va(e,this._logMessageContent)}.`),this._webSocket.send(e),Promise.resolve()):Promise.reject("WebSocket is not in the OPEN state")}stop(){return this._webSocket&&this._close(void 0),Promise.resolve()}_close(e){this._webSocket&&(this._webSocket.onclose=()=>{},this._webSocket.onmessage=()=>{},this._webSocket.onerror=()=>{},this._webSocket.close(),this._webSocket=void 0),this._logger.log(N.Trace,"(WebSockets transport) socket closed."),this.onclose&&(this._isCloseEvent(e)&&(e.wasClean===!1||e.code!==1e3)?this.onclose(new Error(`WebSocket closed with status code: ${e.code} (${e.reason||"no reason given"}).`)):e instanceof Error?this.onclose(e):this.onclose())}_isCloseEvent(e){return e&&typeof e.wasClean=="boolean"&&typeof e.code=="number"}}const sg=100;class v0{constructor(e,n={}){if(this._stopPromiseResolver=()=>{},this.features={},this._negotiateVersion=1,dt.isRequired(e,"url"),this._logger=X_(n.logger),this.baseUrl=this._resolveUrl(e),n=n||{},n.logMessageContent=n.logMessageContent===void 0?!1:n.logMessageContent,typeof n.withCredentials=="boolean"||n.withCredentials===void 0)n.withCredentials=n.withCredentials===void 0?!0:n.withCredentials;else throw new Error("withCredentials option was not a 'boolean' or 'undefined' value");n.timeout=n.timeout===void 0?100*1e3:n.timeout;let r=null,i=null;if(nt.isNode&&typeof require<"u"){const o=typeof __webpack_require__=="function"?__non_webpack_require__:require;r=o("ws"),i=o("eventsource")}!nt.isNode&&typeof WebSocket<"u"&&!n.WebSocket?n.WebSocket=WebSocket:nt.isNode&&!n.WebSocket&&r&&(n.WebSocket=r),!nt.isNode&&typeof EventSource<"u"&&!n.EventSource?n.EventSource=EventSource:nt.isNode&&!n.EventSource&&typeof i<"u"&&(n.EventSource=i),this._httpClient=new d0(n.httpClient||new r0(this._logger),n.accessTokenFactory),this._connectionState="Disconnected",this._connectionStarted=!1,this._options=n,this.onreceive=null,this.onclose=null}async start(e){if(e=e||Rt.Binary,dt.isIn(e,Rt,"transferFormat"),this._logger.log(N.Debug,`Starting connection with transfer format '${Rt[e]}'.`),this._connectionState!=="Disconnected")return Promise.reject(new Error("Cannot start an HttpConnection that is not in the 'Disconnected' state."));if(this._connectionState="Connecting",this._startInternalPromise=this._startInternal(e),await this._startInternalPromise,this._connectionState==="Disconnecting"){const n="Failed to start the HttpConnection before stop() was called.";return this._logger.log(N.Error,n),await this._stopPromise,Promise.reject(new xn(n))}else if(this._connectionState!=="Connected"){const n="HttpConnection.startInternal completed gracefully but didn't enter the connection into the connected state!";return this._logger.log(N.Error,n),Promise.reject(new xn(n))}this._connectionStarted=!0}send(e){return this._connectionState!=="Connected"?Promise.reject(new Error("Cannot send data if the connection is not in the 'Connected' State.")):(this._sendQueue||(this._sendQueue=new ep(this.transport)),this._sendQueue.send(e))}async stop(e){if(this._connectionState==="Disconnected")return this._logger.log(N.Debug,`Call to HttpConnection.stop(${e}) ignored because the connection is already in the disconnected state.`),Promise.resolve();if(this._connectionState==="Disconnecting")return this._logger.log(N.Debug,`Call to HttpConnection.stop(${e}) ignored because the connection is already in the disconnecting state.`),this._stopPromise;this._connectionState="Disconnecting",this._stopPromise=new Promise(n=>{this._stopPromiseResolver=n}),await this._stopInternal(e),await this._stopPromise}async _stopInternal(e){this._stopError=e;try{await this._startInternalPromise}catch{}if(this.transport){try{await this.transport.stop()}catch(n){this._logger.log(N.Error,`HttpConnection.transport.stop() threw error '${n}'.`),this._stopConnection()}this.transport=void 0}else this._logger.log(N.Debug,"HttpConnection.transport is undefined in HttpConnection.stop() because start() failed.")}async _startInternal(e){let n=this.baseUrl;this._accessTokenFactory=this._options.accessTokenFactory,this._httpClient._accessTokenFactory=this._accessTokenFactory;try{if(this._options.skipNegotiation)if(this._options.transport===ut.WebSockets)this.transport=this._constructTransport(ut.WebSockets),await this._startTransport(n,e);else throw new Error("Negotiation can only be skipped when using the WebSocket transport directly.");else{let r=null,i=0;do{if(r=await this._getNegotiationResponse(n),this._connectionState==="Disconnecting"||this._connectionState==="Disconnected")throw new xn("The connection was stopped during negotiation.");if(r.error)throw new Error(r.error);if(r.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(r.url&&(n=r.url),r.accessToken){const o=r.accessToken;this._accessTokenFactory=()=>o,this._httpClient._accessToken=o,this._httpClient._accessTokenFactory=void 0}i++}while(r.url&&i<sg);if(i===sg&&r.url)throw new Error("Negotiate redirection limit exceeded.");await this._createTransport(n,this._options.transport,r,e)}this.transport instanceof og&&(this.features.inherentKeepAlive=!0),this._connectionState==="Connecting"&&(this._logger.log(N.Debug,"The HttpConnection connected successfully."),this._connectionState="Connected")}catch(r){return this._logger.log(N.Error,"Failed to start the connection: "+r),this._connectionState="Disconnected",this.transport=void 0,this._stopPromiseResolver(),Promise.reject(r)}}async _getNegotiationResponse(e){const n={},[r,i]=As();n[r]=i;const o=this._resolveNegotiateUrl(e);this._logger.log(N.Debug,`Sending negotiation request: ${o}.`);try{const s=await this._httpClient.post(o,{content:"",headers:{...n,...this._options.headers},timeout:this._options.timeout,withCredentials:this._options.withCredentials});if(s.statusCode!==200)return Promise.reject(new Error(`Unexpected status code returned from negotiate '${s.statusCode}'`));const a=JSON.parse(s.content);return(!a.negotiateVersion||a.negotiateVersion<1)&&(a.connectionToken=a.connectionId),a.useStatefulReconnect&&this._options._useStatefulReconnect!==!0?Promise.reject(new ng("Client didn't negotiate Stateful Reconnect but the server did.")):a}catch(s){let a="Failed to complete negotiation with the server: "+s;return s instanceof Qi&&s.statusCode===404&&(a=a+" Either this is not a SignalR endpoint or there is a proxy blocking the connection."),this._logger.log(N.Error,a),Promise.reject(new ng(a))}}_createConnectUrl(e,n){return n?e+(e.indexOf("?")===-1?"?":"&")+`id=${n}`:e}async _createTransport(e,n,r,i){let o=this._createConnectUrl(e,r.connectionToken);if(this._isITransport(n)){this._logger.log(N.Debug,"Connection was provided an instance of ITransport, using that directly."),this.transport=n,await this._startTransport(o,i),this.connectionId=r.connectionId;return}const s=[],a=r.availableTransports||[];let c=r;for(const u of a){const l=this._resolveTransportOrError(u,n,i,(c==null?void 0:c.useStatefulReconnect)===!0);if(l instanceof Error)s.push(`${u.transport} failed:`),s.push(l);else if(this._isITransport(l)){if(this.transport=l,!c){try{c=await this._getNegotiationResponse(e)}catch(f){return Promise.reject(f)}o=this._createConnectUrl(e,c.connectionToken)}try{await this._startTransport(o,i),this.connectionId=c.connectionId;return}catch(f){if(this._logger.log(N.Error,`Failed to start the transport '${u.transport}': ${f}`),c=void 0,s.push(new H_(`${u.transport} failed: ${f}`,ut[u.transport])),this._connectionState!=="Connecting"){const m="Failed to select transport before stop() was called.";return this._logger.log(N.Debug,m),Promise.reject(new xn(m))}}}}return s.length>0?Promise.reject(new q_(`Unable to connect to the server with any of the available transports. ${s.join(" ")}`,s)):Promise.reject(new Error("None of the transports supported by the client are supported by the server."))}_constructTransport(e){switch(e){case ut.WebSockets:if(!this._options.WebSocket)throw new Error("'WebSocket' is not supported in your environment.");return new g0(this._httpClient,this._accessTokenFactory,this._logger,this._options.logMessageContent,this._options.WebSocket,this._options.headers||{});case ut.ServerSentEvents:if(!this._options.EventSource)throw new Error("'EventSource' is not supported in your environment.");return new p0(this._httpClient,this._httpClient._accessToken,this._logger,this._options);case ut.LongPolling:return new og(this._httpClient,this._logger,this._options);default:throw new Error(`Unknown transport: ${e}.`)}}_startTransport(e,n){return this.transport.onreceive=this.onreceive,this.features.reconnect?this.transport.onclose=async r=>{let i=!1;if(this.features.reconnect)try{this.features.disconnected(),await this.transport.connect(e,n),await this.features.resend()}catch{i=!0}else{this._stopConnection(r);return}i&&this._stopConnection(r)}:this.transport.onclose=r=>this._stopConnection(r),this.transport.connect(e,n)}_resolveTransportOrError(e,n,r,i){const o=ut[e.transport];if(o==null)return this._logger.log(N.Debug,`Skipping transport '${e.transport}' because it is not supported by this client.`),new Error(`Skipping transport '${e.transport}' because it is not supported by this client.`);if(m0(n,o))if(e.transferFormats.map(a=>Rt[a]).indexOf(r)>=0){if(o===ut.WebSockets&&!this._options.WebSocket||o===ut.ServerSentEvents&&!this._options.EventSource)return this._logger.log(N.Debug,`Skipping transport '${ut[o]}' because it is not supported in your environment.'`),new W_(`'${ut[o]}' is not supported in your environment.`,o);this._logger.log(N.Debug,`Selecting transport '${ut[o]}'.`);try{return this.features.reconnect=o===ut.WebSockets?i:void 0,this._constructTransport(o)}catch(a){return a}}else return this._logger.log(N.Debug,`Skipping transport '${ut[o]}' because it does not support the requested transfer format '${Rt[r]}'.`),new Error(`'${ut[o]}' does not support ${Rt[r]}.`);else return this._logger.log(N.Debug,`Skipping transport '${ut[o]}' because it was disabled by the client.`),new V_(`'${ut[o]}' is disabled by the client.`,o)}_isITransport(e){return e&&typeof e=="object"&&"connect"in e}_stopConnection(e){if(this._logger.log(N.Debug,`HttpConnection.stopConnection(${e}) called while in state ${this._connectionState}.`),this.transport=void 0,e=this._stopError||e,this._stopError=void 0,this._connectionState==="Disconnected"){this._logger.log(N.Debug,`Call to HttpConnection.stopConnection(${e}) was ignored because the connection is already in the disconnected state.`);return}if(this._connectionState==="Connecting")throw this._logger.log(N.Warning,`Call to HttpConnection.stopConnection(${e}) was ignored because the connection is still in the connecting state.`),new Error(`HttpConnection.stopConnection(${e}) was called while the connection is still in the connecting state.`);if(this._connectionState==="Disconnecting"&&this._stopPromiseResolver(),e?this._logger.log(N.Error,`Connection disconnected with error '${e}'.`):this._logger.log(N.Information,"Connection disconnected."),this._sendQueue&&(this._sendQueue.stop().catch(n=>{this._logger.log(N.Error,`TransportSendQueue.stop() threw error '${n}'.`)}),this._sendQueue=void 0),this.connectionId=void 0,this._connectionState="Disconnected",this._connectionStarted){this._connectionStarted=!1;try{this.onclose&&this.onclose(e)}catch(n){this._logger.log(N.Error,`HttpConnection.onclose(${e}) threw error '${n}'.`)}}}_resolveUrl(e){if(e.lastIndexOf("https://",0)===0||e.lastIndexOf("http://",0)===0)return e;if(!nt.isBrowser)throw new Error(`Cannot resolve '${e}'.`);const n=window.document.createElement("a");return n.href=e,this._logger.log(N.Information,`Normalizing '${e}' to '${n.href}'.`),n.href}_resolveNegotiateUrl(e){const n=new URL(e);n.pathname.endsWith("/")?n.pathname+="negotiate":n.pathname+="/negotiate";const r=new URLSearchParams(n.searchParams);return r.has("negotiateVersion")||r.append("negotiateVersion",this._negotiateVersion.toString()),r.has("useStatefulReconnect")?r.get("useStatefulReconnect")==="true"&&(this._options._useStatefulReconnect=!0):this._options._useStatefulReconnect===!0&&r.append("useStatefulReconnect","true"),n.search=r.toString(),n.toString()}}function m0(t,e){return!t||(e&t)!==0}class ep{constructor(e){this._transport=e,this._buffer=[],this._executing=!0,this._sendBufferedData=new Sc,this._transportResult=new Sc,this._sendLoopPromise=this._sendLoop()}send(e){return this._bufferData(e),this._transportResult||(this._transportResult=new Sc),this._transportResult.promise}stop(){return this._executing=!1,this._sendBufferedData.resolve(),this._sendLoopPromise}_bufferData(e){if(this._buffer.length&&typeof this._buffer[0]!=typeof e)throw new Error(`Expected data to be of type ${typeof this._buffer} but was of type ${typeof e}`);this._buffer.push(e),this._sendBufferedData.resolve()}async _sendLoop(){for(;;){if(await this._sendBufferedData.promise,!this._executing){this._transportResult&&this._transportResult.reject("Connection stopped.");break}this._sendBufferedData=new Sc;const e=this._transportResult;this._transportResult=void 0;const n=typeof this._buffer[0]=="string"?this._buffer.join(""):ep._concatBuffers(this._buffer);this._buffer.length=0;try{await this._transport.send(n),e.resolve()}catch(r){e.reject(r)}}}static _concatBuffers(e){const n=e.map(o=>o.byteLength).reduce((o,s)=>o+s),r=new Uint8Array(n);let i=0;for(const o of e)r.set(new Uint8Array(o),i),i+=o.byteLength;return r.buffer}}class Sc{constructor(){this.promise=new Promise((e,n)=>[this._resolver,this._rejecter]=[e,n])}resolve(){this._resolver()}reject(e){this._rejecter(e)}}const y0="json";class b0{constructor(){this.name=y0,this.version=2,this.transferFormat=Rt.Text}parseMessages(e,n){if(typeof e!="string")throw new Error("Invalid input for JSON hub protocol. Expected a string.");if(!e)return[];n===null&&(n=Wa.instance);const r=rn.parse(e),i=[];for(const o of r){const s=JSON.parse(o);if(typeof s.type!="number")throw new Error("Invalid payload.");switch(s.type){case Se.Invocation:this._isInvocationMessage(s);break;case Se.StreamItem:this._isStreamItemMessage(s);break;case Se.Completion:this._isCompletionMessage(s);break;case Se.Ping:break;case Se.Close:break;case Se.Ack:this._isAckMessage(s);break;case Se.Sequence:this._isSequenceMessage(s);break;default:n.log(N.Information,"Unknown message type '"+s.type+"' ignored.");continue}i.push(s)}return i}writeMessage(e){return rn.write(JSON.stringify(e))}_isInvocationMessage(e){this._assertNotEmptyString(e.target,"Invalid payload for Invocation message."),e.invocationId!==void 0&&this._assertNotEmptyString(e.invocationId,"Invalid payload for Invocation message.")}_isStreamItemMessage(e){if(this._assertNotEmptyString(e.invocationId,"Invalid payload for StreamItem message."),e.item===void 0)throw new Error("Invalid payload for StreamItem message.")}_isCompletionMessage(e){if(e.result&&e.error)throw new Error("Invalid payload for Completion message.");!e.result&&e.error&&this._assertNotEmptyString(e.error,"Invalid payload for Completion message."),this._assertNotEmptyString(e.invocationId,"Invalid payload for Completion message.")}_isAckMessage(e){if(typeof e.sequenceId!="number")throw new Error("Invalid SequenceId for Ack message.")}_isSequenceMessage(e){if(typeof e.sequenceId!="number")throw new Error("Invalid SequenceId for Sequence message.")}_assertNotEmptyString(e,n){if(typeof e!="string"||e==="")throw new Error(n)}}const _0={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};function C0(t){const e=_0[t.toLowerCase()];if(typeof e<"u")return e;throw new Error(`Unknown log level: ${t}`)}class w0{configureLogging(e){if(dt.isRequired(e,"logging"),S0(e))this.logger=e;else if(typeof e=="string"){const n=C0(e);this.logger=new Iu(n)}else this.logger=new Iu(e);return this}withUrl(e,n){return dt.isRequired(e,"url"),dt.isNotEmpty(e,"url"),this.url=e,typeof n=="object"?this.httpConnectionOptions={...this.httpConnectionOptions,...n}:this.httpConnectionOptions={...this.httpConnectionOptions,transport:n},this}withHubProtocol(e){return dt.isRequired(e,"protocol"),this.protocol=e,this}withAutomaticReconnect(e){if(this.reconnectPolicy)throw new Error("A reconnectPolicy has already been set.");return e?Array.isArray(e)?this.reconnectPolicy=new ig(e):this.reconnectPolicy=e:this.reconnectPolicy=new ig,this}withServerTimeout(e){return dt.isRequired(e,"milliseconds"),this._serverTimeoutInMilliseconds=e,this}withKeepAliveInterval(e){return dt.isRequired(e,"milliseconds"),this._keepAliveIntervalInMilliseconds=e,this}withStatefulReconnect(e){return this.httpConnectionOptions===void 0&&(this.httpConnectionOptions={}),this.httpConnectionOptions._useStatefulReconnect=!0,this._statefulReconnectBufferSize=e==null?void 0:e.bufferSize,this}build(){const e=this.httpConnectionOptions||{};if(e.logger===void 0&&(e.logger=this.logger),!this.url)throw new Error("The 'HubConnectionBuilder.withUrl' method must be called before building the connection.");const n=new v0(this.url,e);return Yh.create(n,this.logger||Wa.instance,this.protocol||new b0,this.reconnectPolicy,this._serverTimeoutInMilliseconds,this._keepAliveIntervalInMilliseconds,this._statefulReconnectBufferSize)}}function S0(t){return t.log!==void 0}const ag=t=>{if(typeof t=="object"&&t!==null){if(typeof Object.getPrototypeOf=="function"){const e=Object.getPrototypeOf(t);return e===Object.prototype||e===null}return Object.prototype.toString.call(t)==="[object Object]"}return!1},Wn=(...t)=>t.reduce((e,n)=>{if(Array.isArray(n))throw new TypeError("Arguments provided to ts-deepmerge must be objects, not arrays.");return Object.keys(n).forEach(r=>{["__proto__","constructor","prototype"].includes(r)||(Array.isArray(e[r])&&Array.isArray(n[r])?e[r]=Wn.options.mergeArrays?Wn.options.uniqueArrayItems?Array.from(new Set(e[r].concat(n[r]))):[...e[r],...n[r]]:n[r]:ag(e[r])&&ag(n[r])?e[r]=Wn(e[r],n[r]):e[r]=n[r]===void 0?Wn.options.allowUndefinedOverrides?n[r]:e[r]:n[r])}),e},{}),wd={allowUndefinedOverrides:!0,mergeArrays:!0,uniqueArrayItems:!0};Wn.options=wd;Wn.withOptions=(t,...e)=>{Wn.options=Object.assign(Object.assign({},wd),t);const n=Wn(...e);return Wn.options=wd,n};var k0=Object.defineProperty,vm=t=>{throw TypeError(t)},I0=(t,e,n)=>e in t?k0(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,lo=(t,e,n)=>I0(t,typeof e!="symbol"?e+"":e,n),tp=(t,e,n)=>e.has(t)||vm("Cannot "+n),S=(t,e,n)=>(tp(t,e,"read from private field"),n?n.call(t):e.get(t)),fe=(t,e,n)=>e.has(t)?vm("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),Ae=(t,e,n,r)=>(tp(t,e,"write to private field"),r?r.call(t,n):e.set(t,n),n),on=(t,e,n)=>(tp(t,e,"access private method"),n),T0=(t,e,n,r)=>({set _(i){Ae(t,e,i,n)},get _(){return S(t,e,r)}});const E0="0.0.2-alpha6",gs={Text:"Text",Number:"Number",Logic:"Logic"},sn={ValueComponent:"ValueComponent",TableComponent:"TableComponent",RecordComponent:"RecordComponent",ResourceComponent:"ResourceComponent",GraphicComponent:"GraphicComponent",CheckoutComponent:"CheckoutComponent"},x0=t=>Object.values(sn).includes(t),P0=[sn.GraphicComponent,sn.CheckoutComponent,sn.ResourceComponent,sn.RecordComponent],yr={ValueEditor:"ValueEditor",TableEditor:"TableEditor",Fiber:"Fiber",FiberEditor:"FiberEditor"},D0=I.z.enum([yr.ValueEditor,yr.TableEditor,yr.Fiber,yr.FiberEditor]),cg={Fiber:"fiber"},cr={CtrlFibers:"CtrlFibers"};function Qc(t){try{return[null,t()]}catch(e){if(e instanceof Error)return[e,null];throw e}}async function vs(t){try{return[null,await t]}catch(e){if(e instanceof Error)return[e,null];throw e}}function Sl(t){return Qc(()=>JSON.parse(t))}const Ar=t=>typeof t=="string",R0=t=>t===void 0||t==null||t===""||kt(t)&&t.length===0,kt=t=>Array.isArray(t),br=t=>Object.prototype.toString.call(t)==="[object Object]",Sd=async t=>new Promise(e=>setTimeout(e,t)),A0=I.z.string(),M0=I.z.enum([gs.Text,gs.Number,gs.Logic]),z0=t=>M0.safeParse(t).success,mm=I.z.string(),U0=t=>mm.safeParse(t).success,N0=I.z.custom(t=>Ar(t)&&t.toLowerCase()===t),Os=t=>(t==null?void 0:t.toLowerCase())??"",ym=I.z.string(),$0=I.z.custom(t=>Ar(t)?new RegExp(`^${sn.ValueComponent}<.*>$`).test(t):!1),L0=I.z.custom(t=>Ar(t)?new RegExp(`^${sn.RecordComponent}<.*>$`).test(t):!1),j0=I.z.custom(t=>Ar(t)?new RegExp(`^${sn.ResourceComponent}<.*>$`).test(t):!1),O0=I.z.custom(t=>Ar(t)?new RegExp(`^${sn.TableComponent}<.*>$`).test(t):!1),bm=I.z.union([$0,O0,L0,j0,I.z.literal(sn.GraphicComponent),I.z.literal(sn.CheckoutComponent)]),ug=I.z.union([I.z.string(),I.z.number(),I.z.boolean()]),_m=I.z.union([ug,I.z.array(ug),I.z.object({}),I.z.unknown()]),np=I.z.object({$typ:I.z.literal("Error"),Id:I.z.string(),Message:I.z.string(),route:I.z.unknown().optional()}),lg=t=>np.safeParse(t).success,Cm=np.or(_m),kd=new Map;function F0(t){const e=Os(t.name);kd.has(e)||kd.set(e,t)}function wm(t){const e=Os(t);return kd.get(e)}class rp{constructor(e,n){lo(this,"name"),lo(this,"zodType"),this.name=e,this.zodType=n,F0(this)}async getValue(){return await eg().getCmpValue(this.name)}async setInput(e){const n=Os(this.name);await Gc().setCmpInput(n,e,this.zodType)}onValueChanged(e,n=!1,r){eg().onCmpValueChanged(this.name,e,r,n)}}const W0=I.z.number().transform(t=>t*1e3).pipe(I.z.coerce.date());function Sm(t){return t._def.typeName===I.z.ZodFirstPartyTypeKind.ZodArray}function km(t){return t._def.typeName===I.z.ZodFirstPartyTypeKind.ZodObject}function V0(t){const[,e]=Sl(t.description??"{}");return e?e.elementity:!1}const Im={green:"#36D792",yellow:"#D19A66",red:"red"};function Tm(t,e){return t&&e?`[${t}.${e}]`:t?`[${t}]`:e?`[${e}]`:""}function Je(t,e,n="",r,i="green"){const o=Tm(t,e),s=Im[i]??"inherit";console.log(`%c${o}%c ${n}`,`color: ${s}`,"color: inherit",r)}function Ye(t,e,n="",r,i="green"){const o=Tm(t,e),s=Im[i]??"inherit";console.error(`%c${o}%c ${n}`,`color: ${s}`,"color: inherit",r)}const H0=t=>br(t)&&Object.values(t).every(e=>br(e)&&"$key"in e&&"$idx"in e&&"definition"in e),Em=[{open:"List<",openReplace:"[",closeReplace:"]"},{open:"Table<",openReplace:"[",closeReplace:"]"},{open:`${sn.ValueComponent}<`,openReplace:`"${sn.ValueComponent}<`,closeReplace:'>"',preventInnerParsing:!0,allowInnerParsingOnRootLevel:!0},{open:"RecordComponent<",openReplace:'"RecordComponent<',closeReplace:'>"',preventInnerParsing:!0,allowInnerParsingOnRootLevel:!0},{open:"TableComponent<",openReplace:'"TableComponent<',closeReplace:'>"',preventInnerParsing:!0,allowInnerParsingOnRootLevel:!0},{open:"ResourceComponent<",openReplace:'"ResourceComponent<',closeReplace:'>"',preventInnerParsing:!0},{open:"ComposedVisual<",openReplace:'"ComposedVisual<',closeReplace:'>"',preventInnerParsing:!0},{open:"DynamicVisual<",openReplace:'"DynamicVisual<',closeReplace:'>"',preventInnerParsing:!0},{open:"Map<",openReplace:'"Map<',closeReplace:'>"',preventInnerParsing:!0},{open:"DataSource<",openReplace:'"DataSource<',closeReplace:'>"',preventInnerParsing:!0},{open:"Resource<",openReplace:"{",closeReplace:"}"},{open:"Record<{",openReplace:"{",closeReplace:""}];function q0(t){let e=1;for(let n=0;n<t.length;n++)if(t[n]==="<"?e++:t[n]===">"&&e--,e===0)return n;return-1}function xm(t){const e=[",","}",">"],n=/=|,|<|{|}|]/,r="!!TYPEPLACEHOLDER!!";if(t.indexOf("=")===-1)return'"'+t+'"';let i="",o=!1,s=0,a=t||"";for(;a.length>0;){const c=Em.find(u=>a.indexOf(u.open)===0);if(e.includes(a[0]))i+=a[0],a=a.slice(1);else if(c){a=a.slice(c.open.length);const u=q0(a),l=c.preventInnerParsing?a.substring(0,u):xm(a.substring(0,u)),f=c.openReplace+l+c.closeReplace;i=i.length>0?i.replace(r,f):f,a=a.slice(u+1),o=!1}else if(o){const u=a.search(n);u>0?(i=i.replace(r,'"'+a.substring(0,u)+'"')+a[u],a=a.slice(u+1)):(Ye("HiveUtils","_parseHiveTypeToJsonStr","Fallback: Full remaining string appended. Possible parsing issue!",{errorName:"Hive type to JSON - parsing issue",jsonObj:{typeDefinition:t}}),i+=a,a=""),o=!1}else{const u=a.indexOf("="),l=a.substring(0,u).trim();i+=`"${l}":{ "$key": "${l}", "$idx": ${s}, "definition": ${r} }`,s++,a=a.slice(u+1),o=!0}}return i}function Id(t,e,n,r=n){if(!br(t)&&!kt(t))return t;const i=Sm(e);if(kt(t)&&i)return[Id(t[0],e.element,n,r)];if(kt(t)||i)return Ye("HiveUtils","_recursiveHiveSchemaMapping","Type mismatch because either the schema or the type expects an array!",{cmpName:n,propertyPath:r,hive:t,zod:JSON.stringify(e)}),t;if(!km(e))return Ye("HiveUtils","_recursiveHiveSchemaMapping","Generated schema doesn't match the retrieved component type!",{cmpName:n,propertyPath:r,hive:t,zod:JSON.stringify(e)}),t;const o=Object.keys(e.shape).reduce((a,c)=>(a[c.toLowerCase()]=c,a),{}),s={};return Object.values(t).forEach(function(a){const c=a.$key.toLowerCase(),u=o[c];if(u){const l=e.shape[u];s[u]=a,s[u].$key=u,delete o[c];const f=r+"."+u,m=Id(a.definition,l,u,f);s[u].definition=m}else s[a.$key]=a}),s}function fg(t){const e=t.match(/^(\w+)<.+>/),n=e&&2>=e.length?e[1]:t;if(!x0(n))throw Ye("HiveUtils","getBaseHiveType","Unknown base type found!",{type:t,baseType:n}),new Error(`Unknown base component type found: ${JSON.stringify({type:t,baseType:n})}`);return n}function Pm(t,e){const n=(t||"").match(new RegExp("<(.+)>"));return n&&2>=n.length?n[1]:""}function B0(t){const e=t.indexOf("=")>-1,n=e&&Em.find(i=>t.indexOf(i.open)===0),r=n&&n.preventInnerParsing&&!n.allowInnerParsingOnRootLevel;return e&&!r}function K0(t,e,n){const r=Pm(t)||t;let i=Dm(r);if(t.startsWith("TableComponent<")&&(i=[i]),!i){Ye("HiveUtils","parseAndMapSchema","Schema parsing not successful",{jsonObj:{type:r,fullType:t}});return}return i=Id(i,e,n),i}function Zc(t,e,n){const r=kt(e),i=r&&kt(t)&&(br(e[0])||kt(e[0]));if(R0(t)||r&&!i)return t;if(i)return t.map(s=>Zc(s,e[0]));const o={};return Object.values(e.$key!==void 0?e.definition:e).forEach(function(s){const a=s.definition,c=t&&t[s.$idx];let u;kt(a)&&br(a[0])?(u=c==null?void 0:c.map(l=>Zc(l,a[0])),JSON.stringify(a)):!kt(a)&&br(a)?(u=Zc(c,a),JSON.stringify(a)):u=c,o[s.$key]=u}),o}function Dm(t){const e=t.replace(/Resource<\w+>/g,"Text"),n=xm(e),[r,i]=Sl(n);return r&&Ye("HiveUtils","parseHiveTypeToSchema","Schema parsing resulted in an invalid JSON",{jsonObj:{typeDefinition:t,parsed:n},exc:r}),r?void 0:i}const X0={[gs.Text]:I.z.string(),[gs.Number]:I.z.number(),[gs.Logic]:I.z.boolean()};function J0(t){const e=Dm(t),n=r=>{const i=kt(r),o=i?r[0]:r,s=H0(o)?I.z.object(Object.values(o).reduce((a,c)=>(a[c.$key]=n(c.definition),a),{})):X0[o];return s?i?I.z.array(s):s:(Ye("HiveUtils","parseHiveTypeToZodSchema","Unknown simple Hive type",{typeDefinition:t,schema:JSON.stringify(r)}),I.z.unknown())};return e?n(e):(Ye("HiveUtils","parseHiveTypeToZodSchema","Schema is undefined",{typeDefinition:t}),I.z.unknown())}class Td extends Error{constructor(e){super(e),this.name="ConversionError"}}function G0(t,e,n){const r=n.safeParse(e);if(!r.success)throw new Td(r.error.message);const i=function(o,s){if(V0(o))return s;const a=km(o),c=Sm(o);if(a&&br(s)){const u=o.shape;return Object.keys(u).reduce(function(l,f){const m=i(u[f],s[f]);return l.push(m),l},[])}else return c&&kt(s)?s.map(function(u){return i(o.element,u)}):s};return i(n,e)}function Rm(t){return kt(t)?Rm(t[0]):br(t)}const dg=Symbol("UnknownCmpType");function Q0(t,e){if(t==null)return;const{success:n,error:r}=e.safeParse(t);if(!n)throw Ye("CmpUtils","_assertCmpValueValid","Parser error:",r),new Error("Value received for component doesn't match its zod schema")}function Z0(t,e,n){return K0(t,e,n)}function Y0(t,e,n,r){const i=B0(e),o=i?Z0(e,n,r):void 0;return i&&o?Zc(t,o):t}function eC(t,e,n){const r=wm(t);if(!r)throw new Error("Component does not exist in the component definitions.");const i=r instanceof rp?Y0(n,e,r.zodType,t):dg;if(i===dg)throw new Error("Component has unknown type.");return i&&Q0(i,r.zodType),i}var Wr,Ko;class tC{constructor(){fe(this,Wr,new Map),fe(this,Ko,new Map)}updateCmp(e,n,r){const i=S(this,Wr).get(e)??{value:n,freshProperties:new Set};i.value=n,i.freshProperties.add("Value"),r&&S(this,Ko).set(e,{property:"Value",lazy:!1,isInitialSubscription:!0}),S(this,Wr).set(e,i)}markCmpPropertiesAsStale(e,n){const r=S(this,Wr).get(e);r&&n.forEach(i=>r.freshProperties.delete(i))}markAllCmpPropertiesAsStale(){for(const e of S(this,Wr).values())e.freshProperties.clear()}async subscribeToCmpUpdates(e,n,r=!1){Je("CmpsStore","subscribeToCmpUpdates","",{cmpName:e,property:n,lazy:r});const i=S(this,Ko).get(e);(!i||i.lazy===!0&&r===!1)&&(S(this,Ko).set(e,{property:n,lazy:r,isInitialSubscription:!1}),await Gc().subscribeToCmpUpdates(e,n,r))}async resubscribeToCmpUpdates(){const e=Gc(),n=Array.from(S(this,Ko)).filter(([,r])=>!r.isInitialSubscription).map(([r,{property:i,lazy:o}])=>e.subscribeToCmpUpdates(r,i,o));await Promise.all(n)}async getCmpValue(e){Je("CmpsStore","getCmpValue","",{name:e});const n=S(this,Wr).get(e);if(n!=null&&n.freshProperties.has("Value"))return n.value;const r=Os(e);await Gc().fetchCmpPropertyValue([{name:r,property:"Value"}]);const i=S(this,Wr).get(e);return structuredClone(i==null?void 0:i.value)}}Wr=new WeakMap,Ko=new WeakMap;function hg(t){return t instanceof rp}function nC(t){const e=t.split("-");return{companyName:e[0],distributorName:e.length>1?e[1]:""}}function Am(t){const{pathname:e}=new URL(t),n=new RegExp("^/(cfgr|preview|staging)/","i"),r=new RegExp("/$"),i=e.replace(n,"").replace(r,"").split("/");if(i.length<2)return;let o,s,a,c,u,l;const f=e.toLowerCase(),m=f.startsWith("/preview/"),d=f.startsWith("/staging/");m||d?(l=i[2],a=i[3],o=i[4]==="copy"?"copy":"edit",c=i[5],s=m?"preview":"staging",u=!1):f.startsWith("/cfgr/")&&(a=i[2]==="copy"?void 0:i[2],c=void 0,i[3]==="edit"?(o="edit",c=i[4]):o="copy",s="cfgr",u=i[i.length-1]!=="copy"||i[i.length-1]==="copy"&&a===void 0);const h=nC(i[0]);return{tenant:i[0],companyName:h.companyName,planName:i[1],planVersion:l||void 0,cfgnId:a||void 0,startAction:o,authToken:c||void 0,cfgrMode:s,isPresetCopy:u}}function rC(t){const e=new RegExp("^/|/$","g"),n=new URL(t).pathname.replace(e,"").split("/"),r=["cfgr","preview","staging"];return n.length>=2&&r.includes(n[0].toLowerCase())}var Mm=(t=>(t[t.NotActivated=0]="NotActivated",t[t.Activated=1]="Activated",t[t.Deactivated=2]="Deactivated",t[t.MarkedForDeletion=3]="MarkedForDeletion",t))(Mm||{});const iC=I.z.object({mailNotifications:I.z.object({quoteAssignment:I.z.boolean(),insightsAssignment:I.z.boolean()})});I.z.object({id:I.z.string(),firstname:I.z.string(),lastname:I.z.string(),email:I.z.string(),isCbnAdmin:I.z.boolean().optional(),isSuperAdmin:I.z.boolean().optional(),state:I.z.nativeEnum(Mm),avatarUrl:I.z.string().nullable().optional(),settings:iC});const pg={local:void 0,session:void 0};function gg(t=!1){var e;(e=oC(t).storage)==null||e.clear()}function oC(t=!1){const e="CbnStorageTestKey",n="CbnStorageTestValue",r=t?"session":"local",i=pg[r];if(i!==void 0)return i;const o={storage:t?window.sessionStorage:window.localStorage,writeable:!1,readable:!1};if(o.storage){try{o.storage.setItem(e,n),o.writeable=!0}catch{}try{const s=o.storage.getItem(e);o.readable=o.writeable?s===n:!0}catch{}o.writeable&&o.storage.removeItem(e)}return pg[r]=o,o}const sC="/login",aC="redirectTo";function cC(t){gg(),gg(!0);const e=encodeURIComponent(window.location.pathname+window.location.search);window.location.href=`${sC}?${aC}=${e}`}var zm="function",Um="object",ip="undefined",Bn="prototype",op=Object,uC=op[Bn];/*! https://github.com/nevware21/ts-utils v0.12.6 */function Jt(t,e){return t||e}function it(t,e){return t[e]}var Ut=void 0,vt=null,sp="",kl="function",lc="object",_r="prototype",Tu="__proto__",ji="undefined",Eu="constructor",ap="Symbol",ms="length",xu="name",Tt="call",fc="toString",cp="getOwnPropertyDescriptor",Ot=Jt(Object),up=it(Ot,_r),Nm=Jt(String),bo=it(Nm,_r),dc=Jt(Math),$m=Jt(Array),Il=it($m,_r),Er=it(Il,"slice"),vg="_polyfill",mg="__nw21$polytype__";function rt(t,e){try{return{v:t.apply(this,e)}}catch(n){return{e:n}}}function lC(t,e,n){var r=rt(t,n);return r.e?e:r.v}var Xl;function Tl(t){return function(e){return typeof e===t}}function Lm(t){var e="[object "+t+"]";return function(n){return!!(n&&fC(n)===e)}}function fC(t){return up[fc].call(t)}function Ze(t){return typeof t===ji||t===ji}function dC(t){return t===Ut}function B(t){return t===vt||Ze(t)}function lp(t){return t===vt||t===Ut}function hC(t){return!!t||t!==Ut}function pC(t){return!Xl&&(Xl=["string","number","boolean",ji,"symbol","bigint"]),t!==lc&&Xl.indexOf(t)!==-1}var de=Tl("string"),pe=Tl(kl);function Xt(t){return!t&&B(t)?!1:!!t&&typeof t===lc}var Ce=it($m,"isArray"),gC=Lm("Date"),hc=Tl("number"),jm=Tl("boolean"),fp=Lm("Error");function fi(t){return!!(t&&t.then&&pe(t.then))}function Pu(t){return!(!t||lC(function(){return!(t&&0+t)},!t))}function dp(){}function vC(){return!1}var $t=Jt(Nm),mC="[object Error]";function te(t,e){var n=sp,r=up[fc][Tt](t);r===mC&&(t={stack:$t(t.stack),message:$t(t.message),name:$t(t.name)});try{n=JSON.stringify(t,vt,e?typeof e=="number"?e:4:Ut),n=(n?n.replace(/"(\w+)"\s*:\s{0,1}/g,"$1: "):vt)||$t(t)}catch(i){n=" - "+te(i,e)}return r+": "+n}function Yt(t){throw new Error(t)}function tr(t){throw new TypeError(t)}function El(t){lp(t)&&tr("Cannot convert undefined or null to object")}function yC(t){de(t)||tr("'"+te(t)+"' is not a string")}function gn(t,e){return!!t&&up.hasOwnProperty[Tt](t,e)}var bC=Jt(it(Ot,cp),dp),ii=Jt(it(Ot,"hasOwn"),_C);function _C(t,e){return El(t),gn(t,e)||!!bC(t,e)}function Pe(t,e,n){if(t&&(Xt(t)||pe(t))){for(var r in t)if(ii(t,r)&&e[Tt](t,r,t[r])===-1)break}}function ee(t,e,n){if(t)for(var r=t[ms]>>>0,i=0;i<r&&!(i in t&&e[Tt](t,t[i],i,t)===-1);i++);}var _o=xl;function xl(t,e,n){var r=e?e[t]:vt;return function(i){var o=(i?i[t]:vt)||r;if(o||n){var s=arguments;return(o||n).apply(i,o?Er[Tt](s,1):s)}tr('"'+$t(t)+'" not defined for '+te(i))}}function CC(t){return function(e){return e[t]}}var wC=Jt(it(Ot,cp),dp),kc={e:"enumerable",c:"configurable",v:"value",w:"writable",g:"get",s:"set"};function Om(t){var e={};if(e[kc.c]=!0,e[kc.e]=!0,t.l){e.get=function(){return t.l.v};var n=wC(t.l,"v");n&&n.set&&(e.set=function(r){t.l.v=r})}return Pe(t,function(r,i){e[kc[r]]=dC(i)?e[kc[r]]:i}),e}var Gn=it(Ot,"defineProperty"),SC=it(Ot,"defineProperties");function kC(t,e,n,r,i,o){var s={e:o,c:i};return n&&(s.g=n),Gn(t,e,Om(s))}function Re(t,e,n){return Gn(t,e,Om(n))}function Fm(t,e,n,r,i){var o={};return Pe(t,function(s,a){Du(o,s,e?a:s),Du(o,a,s)}),r?r(o):o}function Du(t,e,n,r){Gn(t,e,{value:n,enumerable:!0,writable:!1})}var IC=Jt(it(Ot,"isFrozen"),vC),Wm=it(Ot,"freeze");function TC(t){return t}function EC(t){return El(t),t[Tu]||vt}var Ed=it(Ot,"assign"),Cr=it(Ot,"keys");function Vm(t,e){if((Ce(t)||Xt(t)||pe(t))&&!IC(t)){for(var n=0;n<e.length;n++)if(e[n]===t)return t;e.push(t),Pe(t,function(r,i){Vm(i,e)}),Dn(t)}return t}function Fs(t){return Wm?Vm(t,[]):t}var Dn=Jt(Wm,TC),xd=Jt(it(Ot,"getPrototypeOf"),EC);function xC(t){return Fm(t,1,0,Dn)}function PC(t){return Fm(t,0,0,Dn)}function DC(t){var e={};return Pe(t,function(n,r){Du(e,n,r[1]),Du(e,r[0],r[1])}),Dn(e)}function RC(t){return DC(t)}var Hm=PC({asyncIterator:0,hasInstance:1,isConcatSpreadable:2,iterator:3,match:4,matchAll:5,replace:6,search:7,species:8,split:9,toPrimitive:10,toStringTag:11,unscopables:12}),yg="__tsUtils$gblCfg",Jl;function qm(){var t;return typeof globalThis!==ji&&(t=globalThis),!t&&typeof self!==ji&&(t=self),!t&&typeof window!==ji&&(t=window),!t&&typeof global!==ji&&(t=global),t}function Pl(){if(!Jl){var t=rt(qm).v||{};Jl=t[yg]=t[yg]||{}}return Jl}var Bm=it(dc,"min"),Ma=it(dc,"max"),bg=_o("slice",bo),Bt=_o("substring",bo),Jr=xl("substr",bo,AC);function AC(t,e,n){return El(t),n<0?sp:(e=e||0,e<0&&(e=Ma(e+t[ms],0)),Ze(n)?bg(t,e):bg(t,e,e+n))}function Ru(t,e){return Bt(t,0,e)}function MC(t,e){return t&&(rt(function(){t[vg]=!0,t[mg]=e}),rt(Re,[t,vg,{v:!0,w:!1,e:!1}]),rt(Re,[t,mg,{v:e,w:!1,e:!1}])),t}var xr=Jt(it(Ot,"create"),zC);function zC(t,e){var n=null;function r(){}if(lp(t))n={};else{var i=typeof t;i!==lc&&i!==kl&&tr("Prototype must be an Object or function: "+te(t)),r[_r]=t,rt(function(){r[Tu]=t}),n=new r}return e&&rt(SC,[n,e]),n}function Rn(){return(Date.now||UC)()}function UC(){return new Date().getTime()}function Oi(t,e,n){return t.apply(e,n)}var ht;function pi(){ht=Pl()}function Km(t,e){var n={};return!ht&&pi(),n.b=ht.lzy,Gn(n,"v",{configurable:!0,get:function(){var r=Oi(t,null,e);return ht.lzy||Gn(n,"v",{value:r}),n.b=ht.lzy,r}}),n}var NC=it(dc,"random"),$C=Km(function(){for(var t=Rn().toString(36).slice(2);t.length<16;)t+=NC().toString(36).slice(2);return t=t.substring(0,16),t}),_g="_urid",LC="$nw21sym",Gl,jC=0;function OC(){if(!Gl){var t=Pl();Gl=t.gblSym=t.gblSym||{k:{},s:{}}}return Gl}var Ic;function hp(t){var e="_"+jC+++"_"+$C.v,n=ap+"("+t+")";function r(o,s){Re(i,o,{v:s,e:!1,w:!1})}var i=xr(null);return r("description",$t(t)),r(fc,function(){return n+LC+e}),r("valueOf",function(){return i}),r("v",n),r("_uid",e),MC(i,"symbol")}function FC(t){var e=OC();if(!ii(e.k,t)){var n=hp(t),r=Cr(e.s).length;n[_g]=function(){return r+"_"+n[fc]()},e.k[t]=n,e.s[n[_g]()]=$t(t)}return e.k[t]}function WC(t){!Ic&&(Ic={});var e,n=Hm[t];return n&&(e=Ic[n]=Ic[n]||hp(ap+"."+n)),e}function bn(t){return Gn({toJSON:function(){return t}},"v",{value:t})}var Xm="window",za;function Ws(t,e){var n;return function(){return!ht&&pi(),(!n||ht.lzy)&&(n=bn(rt(t,e).v)),n.v}}function pn(t){return!ht&&pi(),(!za||t===!1||ht.lzy)&&(za=bn(rt(qm).v||vt)),za.v}function tt(t,e){var n;if(!za||e===!1?n=pn(e):n=za.v,n&&n[t])return n[t];if(t===Xm)try{return window}catch{}return vt}function Jm(){return!!It()}var It=Ws(tt,["document"]);function Dl(){return!!cn()}var cn=Ws(tt,[Xm]);function VC(){return!!nr()}var nr=Ws(tt,["navigator"]);function HC(){return!!Gm()}var Gm=Ws(tt,["history"]),qC=Ws(function(){return!!rt(function(){return process&&(process.versions||{}).node}).v}),Qm=Ws(function(){return!!rt(function(){return self&&self instanceof WorkerGlobalScope}).v}),Ms,Ql;function Rl(){return Ms=bn(rt(tt,[ap]).v),Ms}function BC(t){var e=(ht.lzy?0:Ms)||Rl();return e.v?e.v[t]:Ut}function KC(){return!!XC()}function XC(){return!ht&&pi(),((ht.lzy?0:Ms)||Rl()).v}function pp(t,e){var n=Hm[t];!ht&&pi();var r=(ht.lzy?0:Ms)||Rl();return r.v?r.v[n||t]:WC(t)}function Ks(t,e){!ht&&pi();var n=(ht.lzy?0:Ms)||Rl();return n.v?n.v(t):hp(t)}function gp(t){return!ht&&pi(),Ql=(ht.lzy?0:Ql)||bn(rt(BC,["for"]).v),(Ql.v||FC)(t)}function Pd(t){return!!t&&pe(t.next)}function Zm(t){return!lp(t)&&pe(t[pp(3)])}var Tc;function vp(t,e,n){if(t&&(Pd(t)||(!Tc&&(Tc=bn(pp(3))),t=t[Tc.v]?t[Tc.v]():vt),Pd(t))){var r=Ut,i=Ut;try{for(var o=0;!(i=t.next()).done&&e[Tt](n||t,i.value,o,t)!==-1;)o++}catch(s){r={e:s},t.throw&&(i=vt,t.throw(r))}finally{try{i&&!i.done&&t.return&&t.return(i)}finally{if(r)throw r.e}}}}function as(t,e){return!Ze(e)&&t&&(Ce(e)?Oi(t.push,t,e):Pd(e)||Zm(e)?vp(e,function(n){t.push(n)}):t.push(e)),t}var At=_o("indexOf",Il),Ha=_o("map",Il);function Al(t,e,n){return((t?t.slice:vt)||Er).apply(t,Er[Tt](arguments,1))}var JC=_o("reduce",Il),Zl,Ym=Jt(it(Ot,"setPrototypeOf"),GC);function GC(t,e){var n;return!Zl&&(Zl=bn((n={},n[Tu]=[],n instanceof Array))),Zl.v?t[Tu]=e:Pe(e,function(r,i){return t[r]=i}),t}function QC(t,e,n){rt(Re,[e,xu,{v:t,c:!0,e:!1}]),e=Ym(e,n);function r(){this[Eu]=e,rt(Re,[this,xu,{v:t,c:!0,e:!1}])}return e[_r]=n===vt?xr(n):(r[_r]=n[_r],new r),e}function Cg(t,e){e&&(t[xu]=e)}function ey(t,e,n){var r=Error,i=r[_r][xu],o=Error.captureStackTrace;return QC(t,function(){var s=this,a=arguments;try{rt(Cg,[r,t]);var c=Oi(r,s,Er[Tt](a))||s;if(c!==s){var u=xd(s);u!==xd(c)&&Ym(c,u)}return o&&o(c,s[Eu]),e&&e(c,a),c}finally{rt(Cg,[r,i])}},r)}var Yl;function ZC(t){throw Yl||(Yl=ey("UnsupportedError")),new Yl(t)}function YC(t){return function(e){return El(e),e&&e.replace&&(e=e.replace(t,sp)),e}}var ew=YC(/^\s+|(?=\s)\s+$/g),Ve=xl("trim",bo,ew),an=it(dc,"floor"),ef,tf,nf;function Lt(t){if(!t||typeof t!==lc)return!1;nf||(nf=Dl()?cn():!0);var e=!1;if(t!==nf){tf||(ef=Function[_r][fc],tf=ef[Tt](Ot));try{var n=xd(t);e=!n,e||(gn(n,Eu)&&(n=n[Eu]),e=!!(n&&typeof n===kl&&ef[Tt](n)===tf))}catch{}}return e}function tw(t){return t.value&&ny(t),!0}var wg=[ow,ny,aw,sw];function nw(t,e,n,r){var i;return ee(t,function(o){if(o.k===e)return i=o,-1}),i||(i={k:e,v:e},t.push(i),r(i)),i.v}function mp(t,e,n,r){var i=n.handler,o=n.path?r?n.path.concat(r):n.path:[],s={handler:n.handler,src:n.src,path:o},a=typeof e,c=!1,u=e===vt;u||(e&&a===lc?c=Lt(e):u=pC(a));var l={type:a,isPrim:u,isPlain:c,value:e,result:e,path:o,origin:n.src,copy:function(f,m){return mp(t,f,m?s:n,m)},copyTo:function(f,m){return ty(t,f,m,s)}};return l.isPrim?i&&i[Tt](n,l)?l.result:e:nw(t,e,o,function(f){Re(l,"result",{g:function(){return f.v},s:function(h){f.v=h}});for(var m=0,d=i;!(d||(m<wg.length?wg[m++]:tw))[Tt](n,l);)d=vt})}function ty(t,e,n,r){if(!B(n))for(var i in n)e[i]=mp(t,n[i],r,i);return e}function rw(t,e,n){var r={handler:n,src:e,path:[]};return ty([],t,e,r)}function iw(t,e){var n={handler:e,src:t};return mp([],t,n)}function ow(t){var e=t.value;if(Ce(e)){var n=t.result=[];return n.length=e.length,t.copyTo(n,e),!0}return!1}function sw(t){var e=t.value;return gC(e)?(t.result=new Date(e.getTime()),!0):!1}function aw(t){return t.type===kl}function ny(t){var e=t.value;if(e&&t.isPlain){var n=t.result={};return t.copyTo(n,e),!0}return!1}function ry(t,e){return ee(e,function(n){rw(t,n)}),t}function Sg(t,e,n,r,i,o,s){return ry(iw(t)||{},Er[Tt](arguments))}function cw(t,e,n,r,i,o,s){return ry(t||{},Er[Tt](arguments))}var iy=_o("split",bo);function oy(t,e,n){if(t&&e){var r=iy(e,"."),i=r.pop();ee(r,function(o){B(t[o])&&(t[o]={}),t=t[o]}),t[i]=n}}var uw=CC(ms),rf;function Pr(){return!ht&&pi(),(!rf||ht.lzy)&&(rf=bn(rt(tt,["performance"]).v)),rf.v}var sy=it(dc,"round"),lw=Jt(it(Ot,cp),dp),ay=xl("endsWith",bo,fw);function fw(t,e,n){yC(t);var r=de(e)?e:$t(e),i=!Ze(n)&&n<t[ms]?n:t[ms];return Bt(t,i-r[ms],i)===r}var st=_o("indexOf",bo),of="ref",sf="unref",af="hasRef",dw="enabled";function hw(t,e,n){var r=!0,i=t?e(vt):vt,o;function s(){return r=!1,i&&i[sf]&&i[sf](),o}function a(){i&&n(i),i=vt}function c(){return i=e(i),r||s(),o}function u(l){!l&&i&&a(),l&&!i&&c()}return o={cancel:a,refresh:c},o[af]=function(){return i&&i[af]?i[af]():r},o[of]=function(){return r=!0,i&&i[of]&&i[of](),o},o[sf]=s,o=Gn(o,dw,{get:function(){return!!i},set:u}),{h:o,dn:function(){i=vt}}}var pw,gw;function vw(t){var e=pe(t)?t:pw;if(!e){var n=Pl().tmOut||[];Ce(n)&&n.length>0&&pe(n[0])&&(e=n[0])}return e||setTimeout}function mw(t){var e=pe(t)?t:gw;if(!e){var n=Pl().tmOut||[];Ce(n)&&n.length>1&&pe(n[1])&&(e=n[1])}return e||clearTimeout}function cy(t,e,n){var r=Ce(e),i=r?e.length:0,o=vw(i>0?e[0]:r?Ut:e),s=mw(i>1?e[1]:Ut),a=n[0];n[0]=function(){c.dn(),Oi(a,Ut,Er[Tt](arguments))};var c=hw(t,function(u){if(u){if(u.refresh)return u.refresh(),u;Oi(s,Ut,[u])}return Oi(o,Ut,n)},function(u){Oi(s,Ut,[u])});return c.h}function vn(t,e){return cy(!0,Ut,Er[Tt](arguments))}function yw(t,e){return cy(!1,Ut,Er[Tt](arguments))}(pn()||{}).Symbol;(pn()||{}).Reflect;var uy="hasOwnProperty",bw=function(t){for(var e,n=1,r=arguments.length;n<r;n++){e=arguments[n];for(var i in e)uC[uy].call(e,i)&&(t[i]=e[i])}return t},jt=Ed||bw,Dd=function(t,e){return Dd=op.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)r[uy](i)&&(n[i]=r[i])},Dd(t,e)};function rr(t,e){typeof e!==zm&&e!==null&&tr("Class extends value "+String(e)+" is not a constructor or null"),Dd(t,e);function n(){this.constructor=t}t[Bn]=e===null?xr(e):(n[Bn]=e[Bn],new n)}function kg(t,e){for(var n=0,r=e.length,i=t.length;n<r;n++,i++)t[i]=e[n];return t}var Ec,Au="constructor",Dr="prototype",Mu="function",zu="_dynInstFuncs",Rd="_isDynProxy",ys="_dynClass",_w="_dynCls$",Ad="_dynInstChk",qa=Ad,ly="_dfOpts",Ig="_unknown_",yp="__proto__",xc="_dyn"+yp,Tg="__dynProto$Gbl",cf="_dynInstProto",Yc="useBaseInst",Md="setInstFuncs",bp=Object,Ba=bp.getPrototypeOf,Eg=bp.getOwnPropertyNames,xg=pn(),zd=xg[Tg]||(xg[Tg]={o:(Ec={},Ec[Md]=!0,Ec[Yc]=!0,Ec),n:1e3});function eu(t){return t&&(t===bp[Dr]||t===Array[Dr])}function _p(t){return eu(t)||t===Function[Dr]}function fo(t){var e;if(t){if(Ba)return Ba(t);var n=t[yp]||t[Dr]||(t[Au]?t[Au][Dr]:null);e=t[xc]||n,gn(t,xc)||(delete t[cf],e=t[xc]=t[cf]||t[xc],t[cf]=n)}return e}function Uu(t,e){var n=[];if(Eg)n=Eg(t);else for(var r in t)typeof r=="string"&&gn(t,r)&&n.push(r);if(n&&n.length>0)for(var i=0;i<n.length;i++)e(n[i])}function Cp(t,e,n){return e!==Au&&typeof t[e]===Mu&&(n||gn(t,e))&&e!==yp&&e!==Dr}function Nu(t){tr("DynamicProto: "+t)}function Cw(t){var e=xr(null);return Uu(t,function(n){!e[n]&&Cp(t,n,!1)&&(e[n]=t[n])}),e}function wp(t,e){for(var n=t.length-1;n>=0;n--)if(t[n]===e)return!0;return!1}function ww(t,e,n,r){function i(c,u,l){var f=u[l];if(f[Rd]&&r){var m=c[zu]||{};m[qa]!==!1&&(f=(m[u[ys]]||{})[l]||f)}return function(){return f.apply(c,arguments)}}var o=xr(null);Uu(n,function(c){o[c]=i(e,n,c)});for(var s=fo(t),a=[];s&&!_p(s)&&!wp(a,s);)Uu(s,function(c){!o[c]&&Cp(s,c,!Ba)&&(o[c]=i(e,s,c))}),a.push(s),s=fo(s);return o}function Sw(t,e,n,r){var i=null;if(t&&gn(n,ys)){var o=t[zu]||xr(null);if(i=(o[n[ys]]||xr(null))[e],i||Nu("Missing ["+e+"] "+Mu),!i[Ad]&&o[qa]!==!1){for(var s=!gn(t,e),a=fo(t),c=[];s&&a&&!_p(a)&&!wp(c,a);){var u=a[e];if(u){s=u===r;break}c.push(a),a=fo(a)}try{s&&(t[e]=i),i[Ad]=1}catch{o[qa]=!1}}}return i}function kw(t,e,n){var r=e[t];return r===n&&(r=fo(e)[t]),typeof r!==Mu&&Nu("["+t+"] is not a "+Mu),r}function Iw(t,e,n,r,i){function o(c,u){var l=function(){var f=Sw(this,u,c,l)||kw(u,c,l);return f.apply(this,arguments)};return l[Rd]=1,l}if(!eu(t)){var s=n[zu]=n[zu]||xr(null);if(!eu(s)){var a=s[e]=s[e]||xr(null);s[qa]!==!1&&(s[qa]=!!i),eu(a)||Uu(n,function(c){Cp(n,c,!1)&&n[c]!==r[c]&&(a[c]=n[c],delete n[c],(!gn(t,c)||t[c]&&!t[c][Rd])&&(t[c]=o(t,c)))})}}}function Tw(t,e){if(Ba){for(var n=[],r=fo(e);r&&!_p(r)&&!wp(n,r);){if(r===t)return!0;n.push(r),r=fo(r)}return!1}return!0}function uf(t,e){return gn(t,Dr)?t.name||e||Ig:((t||{})[Au]||{}).name||e||Ig}function He(t,e,n,r){gn(t,Dr)||Nu("theClass is an invalid class definition.");var i=t[Dr];Tw(i,e)||Nu("["+uf(t)+"] not in hierarchy of ["+uf(e)+"]");var o=null;gn(i,ys)?o=i[ys]:(o=_w+uf(t,"_")+"$"+zd.n,zd.n++,i[ys]=o);var s=He[ly],a=!!s[Yc];a&&r&&r[Yc]!==void 0&&(a=!!r[Yc]);var c=Cw(e),u=ww(i,e,c,a);n(e,u);var l=!!Ba&&!!s[Md];l&&r&&(l=!!r[Md]),Iw(i,o,e,c,l!==!1)}He[ly]=zd.o;var Sp=xC,Ew=RC,Br=Sp({NONE:0,PENDING:3,INACTIVE:1,ACTIVE:2}),zs="toLowerCase",he="length",$u="warnToConsole",pc="throwInternal",Yi="watch",ho="apply",Ee="push",Co="splice",lt="logger",Ui="cancel",gc="initialize",Gr="identifier",Lu="removeNotificationListener",ju="addNotificationListener",Vn="isInitialized",Pc="getNotifyMgr",Ka="getPlugin",po="name",Nt="processNext",fy="getProcessTelContext",Fi="value",cs="enabled",Pg="stopPollingInternalLogs",go="unload",Dc="onComplete",Ud="version",dy="loggingLevelConsole",vo="createNew",hr="teardown",Ou="messageId",eo="message",wr="diagLog",Fu="_doTeardown",Xa="update",Kn="getNext",Ja="setNextPlugin",Nd="userAgent",mo="split",to="replace",$d="substring",hy="indexOf",oi="type",Dg="evtName",fr="status",Rg="getAllResponseHeaders",Ld="isChildEvt",Cn="data",bs="getCtx",jn="setCtx",Ag="itemsReceived",Rc="headers",Xs="urlString",zo="timeout",jd="traceFlags",lf="getAttribute",ff;function xw(t,e){ff||(ff=ey("AggregationError",function(r,i){i[he]>1&&(r.errors=i[1])}));var n=t;throw ee(e,function(r,i){n+=`
|
|
2
|
+
`.concat(i," > ").concat(te(r))}),new ff(n,e||[])}/*!
|
|
3
3
|
* NevWare21 Solutions LLC - ts-async, 0.5.5
|
|
4
4
|
* https://github.com/nevware21/ts-async
|
|
5
5
|
* Copyright (c) NevWare21 Solutions LLC and contributors. All rights reserved.
|
|
6
6
|
* Licensed under the MIT license.
|
|
7
|
-
*/var zu="Promise",vp="rejected";function Vt(t,e){return mp(t,function(n){return e?e({status:"fulfilled",rejected:!1,value:n}):n},function(n){return e?e({status:vp,rejected:!0,reason:n}):n})}function mp(t,e,n,r){var i=t;try{if(ii(t))(e||n)&&(i=t.then(e,n));else try{e&&(i=e(t))}catch(o){if(n)i=n(o);else throw o}}finally{}return i}var iy=["pending","resolving","resolved",vp],Cg="dispatchEvent",kc;function mC(t){var e;return t&&t.createEvent&&(e=t.createEvent("Event")),!!e&&e.initEvent}function yC(t,e,n,r){var i=St();!kc&&(kc=mn(!!nt(mC,[i]).v));var o=kc.v?i.createEvent("Event"):r?new Event(e):{};if(n&&n(o),kc.v&&o.initEvent(e,!1,!0),o&&t[Cg])t[Cg](o);else{var a=t["on"+e];if(a)a(o);else{var s=et("console");s&&(s.error||s.log)(e,te(o))}}}var oy="unhandledRejection",_C=oy.toLowerCase(),Sg=[],bC=0,wC=10,nf;function Ig(t){return pe(t)?t.toString():te(t)}function ay(t,e,n){var r=Sl(arguments,3),i=0,o=!1,a,s=[],c=bC++,u=!1,l=null,f;function m(x,R){try{Sg.push(c),u=!0,l&&l.cancel(),l=null;var q=t(function(A,I){s.push(function(){try{var W=i===2?x:R,j=Qe(W)?a:pe(W)?W(a):W;ii(j)?j.then(A,I):W?A(j):i===3?I(j):A(j)}catch(K){I(K)}}),o&&p()},r);return q}finally{Sg.pop()}}function d(x){return m(void 0,x)}function h(x){var R=x,q=x;return pe(x)&&(R=function(A){return x&&x(),A},q=function(A){throw x&&x(),A}),m(R,q)}function g(){return iy[i]}function p(){if(s.length>0){var x=s.slice();s=[],u=!0,l&&l.cancel(),l=null,e(x)}}function v(x,R){return function(q){if(i===R){if(x===2&&ii(q)){i=1,q.then(v(2,1),v(3,1));return}i=x,o=!0,a=q,p(),!u&&x===3&&!l&&(l=pn(b,wC))}}}function b(){if(!u)if(u=!0,Mw())process.emit(oy,a,f);else{var x=an()||dn();!nf&&(nf=mn(nt(et,[zu+"RejectionEvent"]).v)),yC(x,_C,function(R){return Re(R,"promise",{g:function(){return f}}),R.reason=a,R},!!nf.v)}}f={then:m,catch:d,finally:h},Xn(f,"state",{get:g}),Uw()&&(f[ap(11)]="IPromise");function P(){return"IPromise "+g()+(o?" - "+Ig(a):"")}return f.toString=P,(function(){pe(n)||Yn(zu+": executor is not a function - "+Ig(n));var x=v(3,0);try{n.call(f,v(2,0),x)}catch(R){x(R)}})(),f}function CC(t){return function(e){var n=Sl(arguments,1);return t(function(r,i){try{var o=[],a=1;cp(e,function(s,c){s&&(a++,mp(s,function(u){o[c]=u,--a===0&&r(o)},i))}),a--,a===0&&r(o)}catch(s){i(s)}},n)}}function SC(t){return mn(function(e){var n=Sl(arguments,1);return t(function(r,i){var o=[],a=1;function s(c,u){a++,Vt(c,function(l){l.rejected?o[u]={status:vp,reason:l.reason}:o[u]={status:"fulfilled",value:l.value},--a===0&&r(o)})}try{we(e)?ee(e,s):Fm(e)?cp(e,s):Yn("Input is not an iterable"),a--,a===0&&r(o)}catch(c){i(c)}},n)})}function sy(t){ee(t,function(e){try{e()}catch{}})}function IC(t){var e=oc(t)?t:0;return function(n){pn(function(){sy(n)},e)}}function cy(t,e){return ay(cy,IC(e),t,e)}var rf;function kC(t,e){!rf&&(rf=mn(nt(et,[zu]).v||null));var n=rf.v;if(!n)return cy(t);pe(t)||Yn(zu+": executor is not a function - "+te(t));var r=0;function i(){return iy[r]}var o=new n(function(a,s){function c(l){r=2,a(l)}function u(l){r=3,s(l)}t(c,u)});return Xn(o,"state",{get:i}),o}var of;function Fs(t){return ay(Fs,sy,t)}function TC(t,e){return!of&&(of=SC(Fs)),of.v(t,e)}var af;function Jn(t,e){return!af&&(af=mn(kC)),af.v.call(this,t,e)}var EC=CC(Jn),jn=void 0,De="",Lo="channels",mt="core",Ad="createPerfMgr",Md="disabled",la="extensionConfig",jo="extensions",Gn="processTelemetry",Uu="priority",Kc="eventsSent",Es="eventsDiscarded",Xc="eventsSendRequest",$i="perfEvent",sf="offlineEventsStored",cf="offlineBatchSent",uf="offlineBatchDrop",Nu="getPerfMgr",zd="domain",lf="path",xC="Not dynamic - ",PC="REDACTED",kg=["sig","Signature","AWSAccessKeyId","X-Goog-Signature"],DC="getPrototypeOf",RC=/-([a-z])/g,AC=/([^\w\d_$])/g,MC=/^(\d+[\w\d_$])/,zC=Object[DC];function Bi(t){return!B(t)}function $u(t){var e=t;return e&&de(e)&&(e=e[Vi](RC,function(n,r){return r.toUpperCase()}),e=e[Vi](AC,"_"),e=e[Vi](MC,function(n,r){return"_"+r})),e}function xt(t,e){return t&&e?ot(t,e)!==-1:!1}function ka(t){return t&&t.toISOString()||""}function Ne(t){return rp(t)?t[ro]:De}function Oe(t,e,n,r,i){var o=n;return t&&(o=t[e],o!==n&&(!i||i(o))&&(!r||r(n))&&(o=n,t[e]=o)),o}function At(t,e,n){var r;return t?(r=t[e],!r&&B(r)&&(r=Qe(n)?{}:n,t[e]=r)):r=Qe(n)?{}:n,r}function uy(t,e){var n=null,r=null;return pe(t)?n=t:r=t,function(){var i=arguments;if(n&&(r=n()),r)return r[e][no](r,i)}}function UC(t,e,n){if(t&&e&&Bt(t)&&Bt(e)){var r=function(o){if(de(o)){var a=e[o];pe(a)?(!n||n(o,!0,e,t))&&(t[o]=uy(e,o)):(!n||n(o,!1,e,t))&&(Qr(t,o)&&delete t[o],Re(t,o,{g:function(){return e[o]},s:function(s){e[o]=s}}))}};for(var i in e)r(i)}return t}function Lu(t,e,n,r,i){t&&e&&n&&(t[e]=uy(n,r))}function Yo(t,e,n,r){return t&&e&&Bt(t)&&we(n)&&ee(n,function(i){de(i)&&Lu(t,i,e,i)}),t}function NC(t){return(function(){function e(){var n=this;t&&Pe(t,function(r,i){n[r]=i})}return e})()}function ly(t){return t&&_d&&(t=Qh(_d({},t))),t}function fy(t,e,n,r,i,o){var a=arguments,s=a[0]||{},c=a[he],u=!1,l=1;for(c>0&&Pm(s)&&(u=s,s=a[l]||{},l++),Bt(s)||(s={});l<c;l++){var f=a[l],m=we(f),d=Bt(f);for(var h in f){var g=m&&h in f||d&&Qr(f,h);if(g){var p=f[h],v=void 0;if(u&&p&&((v=we(p))||Nt(p))){var b=s[h];v?we(b)||(b=[]):Nt(b)||(b={}),p=fy(u,b,p)}p!==void 0&&(s[h]=p)}}}return s}function Jc(t,e,n){var r=e&&e.featureOptIn&&e.featureOptIn[t];if(t&&r){var i=r.mode;if(i===3)return!0;if(i===2)return!1}return n}function ju(t){try{return t.responseText}catch{}return null}function dy(t,e){return t?"XDomainRequest,Response:"+ju(t)||"":e}function Wu(t,e){return t?"XMLHttpRequest,Status:"+t[sr]+",Response:"+ju(t)||t.response||"":e}function Tg(t,e){return e&&(oc(e)?t=[e].concat(t):we(e)&&(t=e.concat(t))),t}var $C="Microsoft_ApplicationInsights_BypassAjaxInstrumentation",Eg="withCredentials",LC="timeout";function jC(t,e,n,r,i,o){i===void 0&&(i=!1);function a(c,u,l){try{c[u]=l}catch{}}var s=new XMLHttpRequest;return a(s,$C,r),n&&a(s,Eg,n),s.open(t,e,!i),n&&a(s,Eg,n),!i&&o&&a(s,LC,o),s}function WC(t){var e={};if(de(t)){var n=Fe(t)[ao](/[\r\n]+/);ee(n,function(r){if(r){var i=r[ry](": ");if(i!==-1){var o=Fe(r.substring(0,i))[Ia](),a=Fe(r[Pd](i+1));e[o]=a}else e[Fe(r)]=1}})}return e}function ff(t,e,n){if(!t[n]&&e&&e.getResponseHeader){var r=e.getResponseHeader(n);r&&(t[n]=Fe(r))}return t}var OC="kill-duration",FC="kill-duration-seconds",HC="time-delta-millis";function df(t,e){var n={};return t[bg]?n=WC(t[bg]()):e&&(n=ff(n,t,HC),n=ff(n,t,OC),n=ff(n,t,FC)),n}var qC="documentMode",VC="location",BC="console",hy="JSON",KC="crypto",XC="msCrypto",JC="ReactNative",Ud="msie",Nd="trident/",py="XMLHttpRequest",hf=null,pf=null,ko=null,gf=null;function gy(t,e){var n=!1;if(t){try{if(n=e in t,!n){var r=t[qn];r&&(n=e in r)}}catch{}if(!n)try{var i=new t;n=!Qe(i[e])}catch{}}return n}function Fn(t){return typeof location===km&&location?location:et(VC)}function GC(){return typeof console!==Gh?console:et(BC)}function cc(){return!!(typeof JSON===km&&JSON||et(hy)!==null)}function Dn(){return cc()?JSON||et(hy):null}function QC(){return et(KC)}function ZC(){return et(XC)}function YC(){var t=er();return t&&t.product?t.product===JC:!1}function $d(){var t=er();if(t&&(t[xd]!==pf||hf===null)){pf=t[xd];var e=(pf||De)[Ia]();hf=xt(e,Ud)||xt(e,Nd)}return hf}function vy(t){if(t===void 0&&(t=null),!t){var e=er()||{};t=e?(e.userAgent||De)[Ia]():De}var n=(t||De)[Ia]();if(xt(n,Ud)){var r=St()||{};return ks(parseInt(n[ao](Ud)[1]),r[qC]||0)}else if(xt(n,Nd)){var i=parseInt(n[ao](Nd)[1]);if(i)return i+4}return null}function as(t){return(gf===null||t===!1)&&(gf=Rw()&&!!er().sendBeacon),gf}function yp(t){var e=!1;try{e=!!et("fetch");var n=et("Request");e&&t&&n&&(e=gy(n,"keepalive"))}catch{}return e}function eS(){return ko===null&&(ko=typeof XDomainRequest!==Gh,ko&&Il()&&(ko=ko&&!gy(et(py),"withCredentials"))),ko}function Il(){var t=!1;try{var e=et(py);t=!!e}catch{}return t}function tS(t,e){return t&&t.dispatchEvent&&e?(t.dispatchEvent(e),!0):!1}function nS(t,e){var n=null,r={detail:e||null};if(pe(CustomEvent))n=new CustomEvent(t,r);else{var i=St();i&&i.createEvent&&(n=i.createEvent("CustomEvent"),n.initCustomEvent(t,!0,!0,r))}return n}function rS(t,e,n){var r=dn();if(r&&r.CustomEvent)try{var i={cfg:e||null,customDetails:n||null};return tS(r,nS(t,i))}catch{}return!1}function iS(t){return t.replace(/^([a-zA-Z][a-zA-Z0-9+.-]*:\/\/)([^:@]{1,200}):([^@]{1,200})@(.*)$/,"$1REDACTED:REDACTED@$4")}function oS(t,e){var n,r=ot(t,"?");if(r===-1)return t;e&&e.redactQueryParams?n=kg.concat(e.redactQueryParams):n=kg;var i=qt(t,0,r+1),o=qt(t,r+1),a=De,s=ot(o,"#");s!==-1&&(a=qt(o,s),o=qt(o,0,s));for(var c=!1,u=0;u<n[he];u++){var l=n[u]+"=";if(ot(o,l)!==-1){c=!0;break}}if(!c)return t;var f=[],m=!1;if(o&&o[he])for(var d=o[ao]("&"),u=0;u<d[he];u++){var h=d[u];if(h){var g=ot(h,"=");if(g===-1)f[Ee](h);else{var p=h[Pd](0,g),v=h[Pd](g+1);if(v===De)f[Ee](h);else{for(var b=!1,P=0;P<n[he];P++)if(p===n[P]){b=!0,m=!0;break}b?f[Ee](p+"="+PC):f[Ee](h)}}}}return m?i+f.join("&")+a:t}function lr(t,e){if(!t||!de(t)||t[ry](" ")!==-1)return t;var n=e&&e.redactUrls===!1;if(n)return t;var r=ot(t,"@")!==-1,i=ot(t,"?")!==-1;if(!r&&!i)return t;try{var o=t;return r&&(o=iS(t)),i&&(o=oS(o,e)),o}catch{return t}}var my=4294967296,Yr=4294967295,yy=123456789,_y=987654321,by=!1,ss=yy,cs=_y;function aS(t){t<0&&(t>>>=0),ss=yy+t&Yr,cs=_y-t&Yr,by=!0}function sS(){try{var t=Pn()&2147483647;aS((Math.random()*my^t)+t)}catch{}}function cS(t){return on(Hs()/Yr*(t+1))>>>0}function Hs(t){var e=0,n=QC()||ZC();return n&&n.getRandomValues&&(e=n.getRandomValues(new Uint32Array(1))[0]&Yr),e===0&&$d()&&(by||sS(),e=uS()&Yr),e===0&&(e=on(my*Math.random()|0)),e>>>=0,e}function uS(t){cs=36969*(cs&65535)+(cs>>16)&Yr,ss=18e3*(ss&65535)+(ss>>16)&Yr;var e=(cs<<16)+(ss&65535)>>>0&Yr|0;return e>>>=0,e}function _p(t){t===void 0&&(t=22);for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n=Hs()>>>0,r=0,i=De;i[he]<t;)r++,i+=e.charAt(n&63),n>>>=6,r===5&&(n=(Hs()<<2&4294967295|n&3)>>>0,r=0);return i}var wy="3.3.11",lS="."+_p(6),fS=0;function Cy(t){return t.nodeType===1||t.nodeType===9||!+t.nodeType}function dS(t,e){var n=e[t.id];if(!n){n={};try{Cy(e)&&Re(e,t.id,{e:!1,v:n})}catch{}}return n}function gn(t,e){return e===void 0&&(e=!1),$u(t+fS+++(e?"."+wy:De)+lS)}function Sy(t){var e={id:gn("_aiData-"+(t||De)+"."+wy),accept:function(n){return Cy(n)},get:function(n,r,i,o){var a=n[e.id];return a?a[$u(r)]:(o&&(a=dS(e,n),a[$u(r)]=i),i)},kill:function(n,r){if(n&&n[r])try{delete n[r]}catch{}}};return e}function Gc(t){return t&&Bt(t)&&!we(t)&&(t.isVal||t.fb||Qr(t,"v")||Qr(t,"mrg")||Qr(t,"ref")||t.set)}function Iy(t,e,n){var r,i=n.dfVal||tw;if(e&&n.fb){var o=n.fb;we(o)||(o=[o]);for(var a=0;a<o[he];a++){var s=o[a],c=e[s];if(i(c)?r=c:t&&(c=t.cfg[s],i(c)&&(r=c),t.set(t.cfg,Ut(s),c)),i(r))break}}return!i(r)&&i(n.v)&&(r=n.v),r}function Ld(t,e,n){var r=n;if(n&&Gc(n)&&(r=Iy(t,e,n)),r){Gc(r)&&(r=Ld(t,e,r));var i;we(r)?(i=[],i[he]=r[he]):Nt(r)&&(i={}),i&&(Pe(r,function(o,a){a&&Gc(a)&&(a=Ld(t,e,a)),i[o]=a}),r=i)}return r}function bp(t,e,n,r){var i,o,a,s=r,c,u,l,f;Gc(s)?(i=s.isVal,o=s.set,l=s.rdOnly,f=s.blkVal,c=s.mrg,u=s.ref,!u&&Qe(u)&&(u=!!c),a=Iy(t,e,s)):a=r,f&&t.blkVal(e,n);var m,d=!0,h=e[n];(h||!B(h))&&(m=h,d=!1,i&&m!==a&&!i(m)&&(m=a,d=!0),o&&(m=o(m,a,e),d=m===a)),d?a?m=Ld(t,e,a):m=a:(Nt(m)||we(a))&&c&&a&&(Nt(a)||we(a))&&Pe(a,function(g,p){bp(t,m,g,p)}),t.set(e,n,m),u&&t.ref(e,n),l&&t.rdOnly(e,n)}var oi=sp("[[ai_dynCfg_1]]"),ky=sp("[[ai_blkDynCfg_1]]"),hS=sp("[[ai_frcDynCfg_1]]");function Ty(t){if(t){var e;if(we(t)?(e=[],e[he]=t[he]):Nt(t)&&(e={}),e)return Pe(t,function(n,r){e[n]=Ty(r)}),e}return t}function pS(t){if(t){var e=t[oi]||t;if(e.cfg&&(e.cfg===t||e.cfg[oi]===e))return e}return null}function gS(t){if(t&&(Nt(t)||we(t)))try{t[ky]=!0}catch{}return t}function vf(t,e,n){var r=!1;return n&&!t[e.blkVal]&&(r=n[hS],!r&&!n[ky]&&(r=Nt(n)||we(n))),r}function Ey(t){Yn("InvalidAccess:"+t)}var vS=["push","pop","shift","unshift","splice"],qs=function(t,e,n,r){t&&t[ac](3,108,"".concat(n," [").concat(e,"] failed - ")+te(r))};function mS(t,e,n){we(e)&&ee(vS,function(r){var i=e[r];e[r]=function(){for(var o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];var s=i[no](this,o);return Fu(t,e,n,"Patching"),s}})}function Ou(t,e){var n=Zw(t,e);return n&&n.get}function yS(t,e,n,r){var i={n,h:[],trk:function(u){u&&u.fn&&(Dt(i.h,u)===-1&&i.h[Ee](u),t.trk(u,i))},clr:function(u){var l=Dt(i.h,u);l!==-1&&i.h[lo](l,1)}},o=!0,a=!1;function s(){o&&(a=a||vf(s,t,r),r&&!r[oi]&&a&&(r=Fu(t,r,n,"Converting")),o=!1);var u=t.act;return u&&i.trk(u),r}s[t.prop]={chng:function(){t.add(i)}};function c(u){if(r!==u){s[t.ro]&&!t.upd&&Ey("["+n+"] is read-only:"+te(e)),o&&(a=a||vf(s,t,r),o=!1);var l=a&&s[t.rf];if(a)if(l){Pe(r,function(m){r[m]=u?u[m]:jn});try{Pe(u,function(m,d){kl(t,r,m,d)}),u=r}catch(m){qs((t.hdlr||{})[ut],n,"Assigning",m),a=!1}}else r&&r[oi]&&Pe(r,function(m){var d=Ou(r,m);if(d){var h=d[t.prop];h&&h.chng()}});if(u!==r){var f=u&&vf(s,t,u);!l&&f&&(u=Fu(t,u,n,"Converting")),r=u,a=f}t.add(i)}}Re(e,i.n,{g:s,s:c})}function kl(t,e,n,r){if(e){var i=Ou(e,n),o=i&&!!i[t.prop];o?e[n]=r:yS(t,e,n,r)}return e}function mf(t,e,n,r){if(e){var i=Ou(e,n),o=i&&!!i[t.prop],a=r&&r[0],s=r&&r[1],c=r&&r[2];if(!o){if(c)try{gS(e)}catch(u){qs((t.hdlr||{})[ut],n,"Blocking",u)}try{kl(t,e,n,e[n]),i=Ou(e,n)}catch(u){qs((t.hdlr||{})[ut],n,"State",u)}}a&&(i[t.rf]=a),s&&(i[t.ro]=s),c&&(i[t.blkVal]=!0)}return e}function Fu(t,e,n,r){try{Pe(e,function(i,o){kl(t,e,i,o)}),e[oi]||(Xn(e,oi,{get:function(){return t.hdlr}}),mS(t,e,n))}catch(i){qs((t.hdlr||{})[ut],n,r,i)}return e}var ja="[[ai_",Wa="]]";function _S(t){var e=$a(ja+"get"+t.uid+Wa),n=$a(ja+"ro"+t.uid+Wa),r=$a(ja+"rf"+t.uid+Wa),i=$a(ja+"blkVal"+t.uid+Wa),o=$a(ja+"dtl"+t.uid+Wa),a=null,s=null,c;function u(d,h){var g=c.act;try{c.act=d,d&&d[o]&&(ee(d[o],function(v){v.clr(d)}),d[o]=[]),h({cfg:t.cfg,set:t.set.bind(t),setDf:t.setDf.bind(t),ref:t.ref.bind(t),rdOnly:t.rdOnly.bind(t)})}catch(v){var p=t[ut];throw p&&p[ac](1,107,te(v)),v}finally{c.act=g||null}}function l(){if(a){var d=a;a=null,s&&s[Pi](),s=null;var h=[];if(ee(d,function(g){if(g&&(g[o]&&(ee(g[o],function(p){p.clr(g)}),g[o]=null),g.fn))try{u(g,g.fn)}catch(p){h[Ee](p)}}),a)try{l()}catch(g){h[Ee](g)}h[he]>0&&vC("Watcher error(s): ",h)}}function f(d){if(d&&d.h[he]>0){a||(a=[]),s||(s=pn(function(){s=null,l()},0));for(var h=0;h<d.h[he];h++){var g=d.h[h];g&&Dt(a,g)===-1&&a[Ee](g)}}}function m(d,h){if(d){var g=d[o]=d[o]||[];Dt(g,h)===-1&&g[Ee](h)}}return c={prop:e,ro:n,rf:r,blkVal:i,hdlr:t,add:f,notify:l,use:u,trk:m},c}function bS(t,e){var n={fn:e,rm:function(){n.fn=null,t=null,e=null}};return Re(n,"toJSON",{v:function(){return"WatcherHandler"+(n.fn?"":"[X]")}}),t.use(n,e),n}function wS(t,e,n){var r=pS(e);if(r)return r;var i=gn("dyncfg",!0),o=e&&n!==!1?e:Ty(e),a;function s(){a.notify()}function c(p,v,b){try{p=kl(a,p,v,b)}catch(P){qs(t,v,"Setting value",P)}return p[v]}function u(p){return bS(a,p)}function l(p,v){a.use(null,function(b){var P=a.upd;try{Qe(v)||(a.upd=v),p(b)}finally{a.upd=P}})}function f(p,v){var b;return mf(a,p,v,(b={},b[0]=!0,b))[v]}function m(p,v){var b;return mf(a,p,v,(b={},b[1]=!0,b))[v]}function d(p,v){var b;return mf(a,p,v,(b={},b[2]=!0,b))[v]}function h(p,v){return v&&Pe(v,function(b,P){bp(g,p,b,P)}),p}var g={uid:null,cfg:o,logger:t,notify:s,set:c,setDf:h,watch:u,ref:f,rdOnly:m,blkVal:d,_block:l};return Re(g,"uid",{c:!1,e:!1,w:!1,v:i}),a=_S(g),Fu(a,o,"config","Creating"),g}function CS(t,e){t?(t[Pu](e),t[ac](2,108,e)):Ey(e)}function vn(t,e,n,r){var i=wS(n,t||{},r);return e&&i.setDf(i.cfg,e),i}function at(t,e,n){var r=t[oi]||t;return r.cfg&&(r.cfg===t||r.cfg[oi]===r)?r[Hi](e):(CS(n,xC+te(t)),vn(t,null,n)[Hi](e))}function ea(t,e){if(t&&t[io])return t[io](e)}function xy(t,e,n){var r;return n||(r=Jn(function(i){n=i})),t&&Qw(t)>0?Vt(ea(t[0],e),function(){xy(Sl(t,1),e,n)}):n(),r}var SS=500,xg="Microsoft_ApplicationInsights_BypassAjaxInstrumentation";function IS(t,e,n){return!t&&B(t)?e:Pm(t)?t:Ut(t)[Ia]()==="true"}function Cn(t){return{mrg:!0,v:t}}function Pg(t,e){return{set:t,v:e}}function Hu(t,e,n){return{fb:n,isVal:t,v:e}}function lt(t,e){return{fb:e,set:IS,v:!!t}}function kS(t){return{isVal:de,v:Ut(De)}}var yf=[Kc,Es,Xc,$i],qu=null,Tc;function TS(t,e){return function(){var n=arguments,r=Py(e);if(r){var i=r.listener;i&&i[t]&&i[t][no](i,n)}}}function ES(){var t=et("Microsoft");return t&&(qu=t.ApplicationInsights),qu}function Py(t){var e=qu;return!e&&t.disableDbgExt!==!0&&(e=qu||ES()),e?e.ChromeDbgExt:null}function xS(t){if(!Tc){Tc={};for(var e=0;e<yf[he];e++)Tc[yf[e]]=TS(yf[e],t)}return Tc}var To,Dy="warnToConsole",PS="AI (Internal): ",DS="AI: ",RS="AITR_",AS={loggingLevelConsole:0,loggingLevelTelemetry:1,maxMessageLimit:25,enableDebug:!1},MS=(To={},To[0]=null,To[1]="errorToConsole",To[2]=Dy,To[3]="debugToConsole",To);function Dg(t){return t?'"'+t[Vi](/\"/g,De)+'"':De}function _f(t,e){var n=GC();if(n){var r="log";n[t]&&(r=t),pe(n[r])&&n[r](e)}}var Vs=(function(){function t(e,n,r,i){r===void 0&&(r=!1);var o=this;o[Au]=e,o[qi]=(r?DS:PS)+e;var a=De;cc()&&(a=Dn().stringify(i));var s=(n?" message:"+Dg(n):De)+(i?" props:"+Dg(a):De);o[qi]+=s}return t.dataType="MessageData",t})();function fo(t,e){return(t||{})[ut]||new Vu(e)}var Vu=(function(){function t(e){this.identifier="DiagnosticLogger",this.queue=[];var n=0,r={},i,o,a,s,c;He(t,this,function(u){c=f(e||{}),u.consoleLoggingLevel=function(){return i},u[ac]=function(h,g,p,v,b){b===void 0&&(b=!1);var P=new Vs(g,p,b,v);if(s)throw te(P);var x=MS[h]||Dy;if(Qe(P[qi]))d("throw"+(h===1?"Critical":"Warning"),P);else{if(b){var R=+P[Au];!r[R]&&i>=h&&(u[x](P[qi]),r[R]=!0)}else i>=h&&u[x](P[qi]);l(h,P)}},u.debugToConsole=function(h){_f("debug",h),d("warning",h)},u[Pu]=function(h){_f("warn",h),d("warning",h)},u.errorToConsole=function(h){_f("error",h),d("error",h)},u.resetInternalMessageCount=function(){n=0,r={}},u.logInternalMessage=l,u[io]=function(h){c&&c.rm(),c=null};function l(h,g){if(!m()){var p=!0,v=RS+g[Au];if(r[v]?p=!1:r[v]=!0,p&&(h<=o&&(u.queue[Ee](g),n++,d(h===1?"error":"warn",g)),n===a)){var b="Internal events throttle limit per PageView reached for this app.",P=new Vs(23,b,!1);u.queue[Ee](P),h===1?u.errorToConsole(b):u[Pu](b)}}}function f(h){return at(vn(h,AS,u).cfg,function(g){var p=g.cfg;i=p[ny],o=p.loggingLevelTelemetry,a=p.maxMessageLimit,s=p.enableDebug})}function m(){return n>=a}function d(h,g){var p=Py(e||{});p&&p[mr]&&p[mr](h,g)}})}return t.__ieDyn=1,t})();function wp(t){return t||new Vu}function G(t,e,n,r,i,o){o===void 0&&(o=!1),wp(t)[ac](e,n,r,i,o)}function Ki(t,e){wp(t)[Pu](e)}function zS(t,e,n){wp(t).logInternalMessage(e,n)}var bf,Pr,Rg="toGMTString",Ag="toUTCString",Cp="cookie",wf="expires",Mg="isCookieUseDisabled",Bs="disableCookiesUsage",ta="_ckMgr",Ec=null,Cf=null,zg=null,Bn,Ug={},Bu={},US=(bf={cookieCfg:Cn((Pr={},Pr[zd]={fb:"cookieDomain",dfVal:Bi},Pr.path={fb:"cookiePath",dfVal:Bi},Pr.enabled=jn,Pr.ignoreCookies=jn,Pr.blockedCookies=jn,Pr.disableCookieDefer=!1,Pr)),cookieDomain:jn,cookiePath:jn},bf[Bs]=jn,bf);function Sp(){!Bn&&(Bn=$m(function(){return St()}))}function NS(t,e){var n=Qc[ta]||Bu[ta];return n||(n=Qc[ta]=Qc(t,e),Bu[ta]=n),n}function xc(t){return t?t.isEnabled():!0}function Ry(t,e){return e&&t&&we(t.ignoreCookies)?Dt(t.ignoreCookies,e)!==-1:!1}function Ng(t,e){return e&&t&&we(t.blockedCookies)&&Dt(t.blockedCookies,e)!==-1?!0:Ry(t,e)}function $g(t,e){var n=e[Zo];if(B(n)){var r=void 0;Qe(t[Mg])||(r=!t[Mg]),Qe(t[Bs])||(r=!t[Bs]),n=r}return n}function Tl(t,e){var n;return t&&(n=t.getCookieMgr()),n||(n=NS(e,(t||{})[ut])),n}function Qc(t,e){var n,r,i,o,a,s,c,u,l=[];function f(p){var v,b=(v={},v[lf]=p||"/",v[wf]="Thu, 01 Jan 1970 00:00:01 GMT",v);return $d()||(b["max-age"]="0"),jg(De,b)}function m(p,v,b,P){var x={},R=Fe(p||De),q=ot(R,";");if(q!==-1&&(R=Fe(Su(p,q)),x=Ay(qt(p,q+1))),Oe(x,zd,b||i,wu,Qe),!B(v)){var A=$d();if(Qe(x[wf])){var I=Pn(),W=I+v*1e3;if(W>0){var j=new Date;j.setTime(W),Oe(x,wf,Lg(j,A?Rg:Ag)||Lg(j,A?Rg:Ag)||De,wu)}}A||Oe(x,"max-age",De+v,null,Qe)}var K=Fn();return K&&K.protocol==="https:"&&(Oe(x,"secure",null,null,Qe),Cf===null&&(Cf=!LS((er()||{})[xd])),Cf&&Oe(x,"SameSite","None",null,Qe)),Oe(x,lf,P||r,null,Qe),jg(R,x)}function d(p){if(l)for(var v=l[he]-1;v>=0;v--)l[v].n===p&&l[lo](v,1)}function h(){Sf(e)&&l&&(ee(l,function(p){Ng(n,p.n)||(p.o===0?c(p.n,p.v):p.o===1&&u(p.n,p.v))}),l=[])}t=vn(t||Bu,null,e).cfg,o=at(t,function(p){p.setDf(p.cfg,US),n=p.ref(p.cfg,"cookieCfg"),r=n[lf]||"/",i=n[zd],n.disableCookieDefer?l=null:l===null&&(l=[]);var v=a;a=$g(t,n)!==!1,s=n.getCookie||$S,c=n.setCookie||Wg,u=n.delCookie||Wg,!v&&a&&l&&h()},e);var g={isEnabled:function(){var p=$g(t,n)!==!1&&a&&Sf(e),v=Bu[ta];return p&&v&&g!==v&&(p=xc(v)),p},setEnabled:function(p){n[Zo]=p,Qe(t[Bs])||(t[Bs]=!p)},set:function(p,v,b,P,x){var R=!1,q=Ng(n,p);if(!q){var A=m(v,b,P,x);xc(g)?(c(p,A),R=!0):l&&(d(p),l[Ee]({n:p,o:0,v:A}),R=!0)}return R},get:function(p){var v=De,b=Ry(n,p);if(!b){if(xc(g))v=s(p);else if(l)for(var P=l[he]-1;P>=0;P--){var x=l[P];if(x.n===p){if(x.o===0){var R=x.v,q=ot(R,";");v=Fe(q!==-1?Su(R,q):R)}break}}}return v},del:function(p,v){var b=!1;return xc(g)?b=g.purge(p,v):l&&(d(p),l[Ee]({n:p,o:1,v:f(v)}),b=!0),b},purge:function(p,v){var b=!1;return Sf(e)&&(u(p,f(v)),b=!0),b},unload:function(p){o&&o.rm(),o=null,l=null}};return g[ta]=g,g}function Sf(t){if(Ec===null){Ec=!1,!Bn&&Sp();try{var e=Bn.v||{};Ec=e[Cp]!==void 0}catch(n){G(t,2,68,"Cannot access document.cookie - "+Ne(n),{exception:te(n)})}}return Ec}function Ay(t){var e={};if(t&&t[he]){var n=Fe(t)[ao](";");ee(n,function(r){if(r=Fe(r||De),r){var i=ot(r,"=");i===-1?e[r]=null:e[Fe(Su(r,i))]=Fe(qt(r,i+1))}})}return e}function Lg(t,e){return pe(t[e])?t[e]():null}function jg(t,e){var n=t||De;return Pe(e,function(r,i){n+="; "+r+(B(i)?De:"="+i)}),n}function $S(t){var e=De;if(!Bn&&Sp(),Bn.v){var n=Bn.v[Cp]||De;zg!==n&&(Ug=Ay(n),zg=n),e=Fe(Ug[t]||De)}return e}function Wg(t,e){!Bn&&Sp(),Bn.v&&(Bn.v[Cp]=t+"="+e)}function LS(t){return de(t)?!!(xt(t,"CPU iPhone OS 12")||xt(t,"iPad; CPU OS 12")||xt(t,"Macintosh; Intel Mac OS X 10_14")&&xt(t,"Version/")&&xt(t,"Safari")||xt(t,"Macintosh; Intel Mac OS X 10_14")&&Qm(t,"AppleWebKit/605.1.15 (KHTML, like Gecko)")||xt(t,"Chrome/5")||xt(t,"Chrome/6")||xt(t,"UnrealEngine")&&!xt(t,"Chrome")||xt(t,"UCBrowser/12")||xt(t,"UCBrowser/11")):!1}var jS={perfEvtsSendAll:!1};function WS(t){t.h=null;var e=t.cb;t.cb=[],ee(e,function(n){nt(n.fn,[n.arg])})}function Dr(t,e,n,r){ee(t,function(i){i&&i[e]&&(n?(n.cb[Ee]({fn:r,arg:i}),n.h=n.h||pn(WS,0,n)):nt(r,[i]))})}var OS=(function(){function t(e){this.listeners=[];var n,r,i=[],o={h:null,cb:[]},a=vn(e,jS);r=a[Hi](function(s){n=!!s.cfg.perfEvtsSendAll}),He(t,this,function(s){Re(s,"listeners",{g:function(){return i}}),s[Ru]=function(c){i[Ee](c)},s[Du]=function(c){for(var u=Dt(i,c);u>-1;)i[lo](u,1),u=Dt(i,c)},s[Kc]=function(c){Dr(i,Kc,o,function(u){u[Kc](c)})},s[Es]=function(c,u,l){Dr(i,Es,o,function(f){f[Es](c,u,l)})},s[Xc]=function(c,u){Dr(i,Xc,u?o:null,function(l){l[Xc](c,u)})},s[$i]=function(c){c&&(n||!c[Dd]())&&Dr(i,$i,null,function(u){c.isAsync?pn(function(){return u[$i](c)},0):u[$i](c)})},s[sf]=function(c){c&&c[he]&&Dr(i,sf,o,function(u){u[sf](c)})},s[cf]=function(c){c&&c[_n]&&Dr(i,cf,o,function(u){u[cf](c)})},s[uf]=function(c,u){if(c>0){var l=u||0;Dr(i,uf,o,function(f){f[uf](c,l)})}},s[io]=function(c){var u=function(){r&&r.rm(),r=null,i=[],o.h&&o.h[Pi](),o.h=null,o.cb=[]},l;if(Dr(i,"unload",null,function(f){var m=f[io](c);m&&(l||(l=[]),l[Ee](m))}),l)return Jn(function(f){return Vt(EC(l),function(){u(),f()})});u()}})}return t.__ieDyn=1,t})(),fa="ctx",jd="ParentContextKey",xs="ChildrenContextKey",FS=null,Zc=(function(){function t(e,n,r){var i=this;if(i.start=Pn(),i[ro]=e,i.isAsync=r,i[Dd]=function(){return!1},pe(n)){var o;Re(i,"payload",{g:function(){return!o&&pe(n)&&(o=n(),n=null),o}})}i[ua]=function(a){return a?a===t[jd]||a===t[xs]?i[a]:(i[fa]||{})[a]:null},i[$n]=function(a,s){if(a)if(a===t[jd])i[a]||(i[Dd]=function(){return!0}),i[a]=s;else if(a===t[xs])i[a]=s;else{var c=i[fa]=i[fa]||{};c[a]=s}},i.complete=function(){var a=0,s=i[ua](t[xs]);if(we(s))for(var c=0;c<s[he];c++){var u=s[c];u&&(a+=u.time)}i.time=Pn()-i.start,i.exTime=i.time-a,i.complete=function(){}}}return t.ParentContextKey="parent",t.ChildrenContextKey="childEvts",t})(),HS=(function(){function t(e){this.ctx={},He(t,this,function(n){n.create=function(r,i,o){return new Zc(r,i,o)},n.fire=function(r){r&&(r.complete(),e&&pe(e[$i])&&e[$i](r))},n[$n]=function(r,i){if(r){var o=n[fa]=n[fa]||{};o[r]=i}},n[ua]=function(r){return(n[fa]||{})[r]}})}return t.__ieDyn=1,t})(),If="CoreUtils.doPerf";function Ku(t,e,n,r,i){if(t){var o=t;if(o[Nu]&&(o=o[Nu]()),o){var a=void 0,s=o[ua](If);try{if(a=o.create(e(),r,i),a){if(s&&a[$n]&&(a[$n](Zc[jd],s),s[ua]&&s[$n])){var c=s[ua](Zc[xs]);c||(c=[],s[$n](Zc[xs],c)),c[Ee](a)}return o[$n](If,a),n(a)}}catch(u){a&&a[$n]&&a[$n]("exception",u)}finally{a&&o.fire(a),o[$n](If,s)}}}return n()}function qS(){return FS}function Xr(){for(var t=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],e=De,n,r=0;r<4;r++)n=Hs(),e+=t[n&15]+t[n>>4&15]+t[n>>8&15]+t[n>>12&15]+t[n>>16&15]+t[n>>20&15]+t[n>>24&15]+t[n>>28&15];var i=t[8+(Hs()&3)|0];return qr(e,0,8)+qr(e,9,4)+"4"+qr(e,13,3)+i+qr(e,16,3)+qr(e,19,12)}var Wd="00",VS="ff",My="00000000000000000000000000000000",zy="0000000000000000";function uc(t,e,n){return t&&t[he]===e&&t!==n?!!t.match(/^[\da-f]*$/i):!1}function Og(t,e,n){return uc(t,e)?t:n}function BS(t){(isNaN(t)||t<0||t>255)&&(t=1);for(var e=t.toString(16);e[he]<2;)e="0"+e;return e}function Fg(t,e,n,r){return{version:uc(r,2,VS)?r:Wd,traceId:Ip(t)?t:Xr(),spanId:kp(e)?e:Su(Xr(),16),traceFlags:n>=0&&n<=255?n:1}}function Ip(t){return uc(t,32,My)}function kp(t){return uc(t,16,zy)}function Hg(t){if(t){var e=BS(t[Rd]);uc(e,2)||(e="01");var n=t[Ed]||Wd;return n!=="00"&&n!=="ff"&&(n=Wd),"".concat(n.toLowerCase(),"-").concat(Og(t.traceId,32,My).toLowerCase(),"-").concat(Og(t.spanId,16,zy).toLowerCase(),"-").concat(e.toLowerCase())}return""}function KS(t){var e=t.getElementsByTagName("script"),n=[];return ee(e,function(r){var i=r[ef]("src");if(i){var o=r[ef]("crossorigin"),a=r.hasAttribute("async")===!0,s=r.hasAttribute("defer")===!0,c=r[ef]("referrerpolicy"),u={url:i};o&&(u.crossOrigin=o),a&&(u.async=a),s&&(u.defer=s),c&&(u.referrerPolicy=c),n[Ee](u)}}),n}var XS=Sy("plugin");function Xi(t){return XS.get(t,"state",{},!0)}function qg(t,e){for(var n=[],r=null,i=t[Vn](),o;i;){var a=i[js]();if(a){r&&r[Os]&&a[Gn]&&r[Os](a),o=Xi(a);var s=!!o[On];a[On]&&(s=a[On]()),s||n[Ee](a),r=a,i=i[Vn]()}}ee(n,function(c){var u=t[mt]();c[sc](t.getCfg(),u,e,t[Vn]()),o=Xi(c),!c[mt]&&!o[mt]&&(o[mt]=u),o[On]=!0,delete o[ur]})}function kf(t){return t.sort(function(e,n){var r=0;if(n){var i=n[Gn];e[Gn]?r=i?e[Uu]-n[Uu]:1:i&&(r=-1)}else r=e?1:-1;return r})}function JS(t){var e={};return{getName:function(){return e[ro]},setName:function(n){e[ro]=n},getTraceId:function(){return e.traceId},setTraceId:function(n){Ip(n)&&(e.traceId=n)},getSpanId:function(){return e.spanId},setSpanId:function(n){kp(n)&&(e.spanId=n)},getTraceFlags:function(){return e[Rd]},setTraceFlags:function(n){e[Rd]=n}}}var GS="TelemetryPluginChain",Vg="_hasRun",Bg="_getTelCtx",Kg=0;function QS(t,e,n){for(;t;){if(t[js]()===n)return t;t=t[Vn]()}return so([n],e.config||{},e)}function Tp(t,e,n,r){var i=null,o=[];e||(e=vn({},null,n[ut])),r!==null&&(i=r?QS(t,n,r):t);var a={_next:c,ctx:{core:function(){return n},diagLog:function(){return fo(n,e.cfg)},getCfg:function(){return e.cfg},getExtCfg:l,getConfig:f,hasNext:function(){return!!i},getNext:function(){return i},setNext:function(d){i=d},iterate:m,onComplete:s}};function s(d,h){for(var g=[],p=2;p<arguments.length;p++)g[p-2]=arguments[p];d&&o[Ee]({func:d,self:Qe(h)?a.ctx:h,args:g})}function c(){var d=i;if(i=d?d[Vn]():null,!d){var h=o;h&&h[he]>0&&(ee(h,function(g){try{g.func.call(g.self,g.args)}catch(p){G(n[ut],2,73,"Unexpected Exception during onComplete - "+te(p))}}),o=[])}return d}function u(d,h){var g=null,p=e.cfg;if(p&&d){var v=p[la];!v&&h&&(v={}),p[la]=v,v=e.ref(p,la),v&&(g=v[d],!g&&h&&(g={}),v[d]=g,g=e.ref(v,d))}return g}function l(d,h){var g=u(d,!0);return h&&Pe(h,function(p,v){if(B(g[p])){var b=e.cfg[p];(b||!B(b))&&(g[p]=b)}bp(e,g,p,v)}),e.setDf(g,h)}function f(d,h,g){g===void 0&&(g=!1);var p,v=u(d,!1),b=e.cfg;return v&&(v[h]||!B(v[h]))?p=v[h]:(b[h]||!B(b[h]))&&(p=b[h]),p||!B(p)?p:g}function m(d){for(var h;h=a._next();){var g=h[js]();g&&d(g)}}return a}function Rn(t,e,n,r){var i=vn(e),o=Tp(t,i,n,r),a=o.ctx;function s(u){var l=o._next();return l&&l[Gn](u,a),!l}function c(u,l){return u===void 0&&(u=null),we(u)&&(u=so(u,i.cfg,n,l)),Rn(u||a[Vn](),i.cfg,n,l)}return a[zt]=s,a[oo]=c,a}function Xu(t,e,n){var r=vn(e.config),i=Tp(t,r,e,n),o=i.ctx;function a(c){var u=i._next();return u&&u[io](o,c),!u}function s(c,u){return c===void 0&&(c=null),we(c)&&(c=so(c,r.cfg,e,u)),Xu(c||o[Vn](),e,u)}return o[zt]=a,o[oo]=s,o}function Ep(t,e,n){var r=vn(e.config),i=Tp(t,r,e,n),o=i.ctx;function a(c){return o.iterate(function(u){pe(u[Ws])&&u[Ws](o,c)})}function s(c,u){return c===void 0&&(c=null),we(c)&&(c=so(c,r.cfg,e,u)),Ep(c||o[Vn](),e,u)}return o[zt]=a,o[oo]=s,o}function so(t,e,n,r){var i=null,o=!r;if(we(t)&&t[he]>0){var a=null;ee(t,function(s){if(!o&&r===s&&(o=!0),o&&s&&pe(s[Gn])){var c=ZS(s,e,n);i||(i=c),a&&a._setNext(c),a=c}})}return r&&!i?so([r],e,n):i}function ZS(t,e,n){var r=null,i=pe(t[Gn]),o=pe(t[Os]),a;t?a=t[Vr]+"-"+t[Uu]+"-"+Kg++:a="Unknown-0-"+Kg++;var s={getPlugin:function(){return t},getNext:function(){return r},processTelemetry:l,unload:f,update:m,_id:a,_setNext:function(d){r=d}};function c(){var d;return t&&pe(t[Bg])&&(d=t[Bg]()),d||(d=Rn(s,e,n)),d}function u(d,h,g,p,v){var b=!1,P=t?t[Vr]:GS,x=d[Vg];return x||(x=d[Vg]={}),d.setNext(r),t&&Ku(d[mt](),function(){return P+":"+g},function(){x[a]=!0;try{var R=r?r._id:De;R&&(x[R]=!1),b=h(d)}catch(A){var q=r?x[r._id]:!0;q&&(b=!0),(!r||!q)&&G(d[mr](),1,73,"Plugin ["+P+"] failed during "+g+" - "+te(A)+", run flags: "+te(x))}},p,v),b}function l(d,h){h=h||c();function g(p){if(!t||!i)return!1;var v=Xi(t);return v[ur]||v[Md]?!1:(o&&t[Os](r),t[Gn](d,p),!0)}u(h,g,"processTelemetry",function(){return{item:d}},!d.sync)||h[zt](d)}function f(d,h){function g(){var p=!1;if(t){var v=Xi(t),b=t[mt]||v[mt];t&&(!b||b===d.core())&&!v[ur]&&(v[mt]=null,v[ur]=!0,v[On]=!1,t[ur]&&t[ur](d,h)===!0&&(p=!0))}return p}u(d,g,"unload",function(){},h.isAsync)||d[zt](h)}function m(d,h){function g(){var p=!1;if(t){var v=Xi(t),b=t[mt]||v[mt];t&&(!b||b===d.core())&&!v[ur]&&t[Ws]&&t[Ws](d,h)===!0&&(p=!0)}return p}u(d,g,"update",function(){},!1)||d[zt](h)}return xn(s)}function Uy(){var t=[];function e(r){r&&t[Ee](r)}function n(r,i){ee(t,function(o){try{o(r,i)}catch(a){G(r[mr](),2,73,"Unexpected error calling unload handler - "+te(a))}}),t=[]}return{add:e,run:n}}function Ny(){var t=[];function e(r){var i=t;t=[],ee(i,function(o){try{(o.rm||o.remove).call(o)}catch(a){G(r,2,73,"Unloading:"+te(a))}})}function n(r){r&&Qo(t,r)}return{run:e,add:n}}var Tf,Rr="getPlugin",YS=(Tf={},Tf[la]={isVal:Bi,v:{}},Tf),ho=(function(){function t(){var e=this,n,r,i,o,a;u(),He(t,e,function(l){l[sc]=function(f,m,d,h){c(f,m,h),n=!0},l[ur]=function(f,m){var d=l[mt];if(!d||f&&d!==f[mt]())return;var h,g=!1,p=f||Xu(null,d,i&&i[Rr]?i[Rr]():i),v=m||{reason:0,isAsync:!1};function b(){g||(g=!0,o.run(p,m),a.run(p[mr]()),h===!0&&p[zt](v),u())}return!l[Mu]||l[Mu](p,v,b)!==!0?b():h=!0,h},l[Ws]=function(f,m){var d=l[mt];if(!d||f&&d!==f[mt]())return;var h,g=!1,p=f||Ep(null,d,i&&i[Rr]?i[Rr]():i),v=m||{reason:0};function b(){g||(g=!0,c(p.getCfg(),p.core(),p[Vn]()))}return!l._doUpdate||l._doUpdate(p,v,b)!==!0?b():h=!0,h},Lu(l,"_addUnloadCb",function(){return o},"add"),Lu(l,"_addHook",function(){return a},"add"),Re(l,"_unloadHooks",{g:function(){return a}})}),e[mr]=function(l){return s(l)[mr]()},e[On]=function(){return n},e.setInitialized=function(l){n=l},e[Os]=function(l){i=l},e[zt]=function(l,f){f?f[zt](l):i&&pe(i[Gn])&&i[Gn](l,null)},e._getTelCtx=s;function s(l){l===void 0&&(l=null);var f=l;if(!f){var m=r||Rn(null,{},e[mt]);i&&i[Rr]?f=m[oo](null,i[Rr]):f=m[oo](null,i)}return f}function c(l,f,m){vn(l,YS,fo(f)),!m&&f&&(m=f[ty]()[Vn]());var d=i;i&&i[Rr]&&(d=i[Rr]()),e[mt]=f,r=Rn(m,l,f,d)}function u(){n=!1,e[mt]=null,r=null,i=null,a=Ny(),o=Uy()}}return t.__ieDyn=1,t})();function eI(t,e,n){var r={id:e,fn:n};Qo(t,r);var i={remove:function(){ee(t,function(o,a){if(o.id===r.id)return t[lo](a,1),-1})}};return i}function tI(t,e,n){for(var r=!1,i=t[he],o=0;o<i;++o){var a=t[o];if(a)try{if(a.fn[no](null,[e])===!1){r=!0;break}}catch(s){G(n,2,64,"Telemetry initializer failed: "+Ne(s),{exception:te(s)},!0)}}return!r}var nI=(function(t){tr(e,t);function e(){var n=t.call(this)||this;n.identifier="TelemetryInitializerPlugin",n.priority=199;var r,i;o(),He(e,n,function(a,s){a.addTelemetryInitializer=function(c){return eI(i,r++,c)},a[Gn]=function(c,u){tI(i,c,u?u[mr]():a[mr]())&&a[zt](c,u)},a[Mu]=function(){o()}});function o(){r=0,i=[]}return n}return e.__ieDyn=1,e})(ho),Ar,$y="Plugins must provide initialize method",rI="_notificationManager",Xg="SDK is still unloading...",iI="SDK is not initialized",oI=100,aI=5e4,Ef=Ra((Ar={cookieCfg:{}},Ar[jo]={rdOnly:!0,ref:!0,v:[]},Ar[Lo]={rdOnly:!0,ref:!0,v:[]},Ar[la]={ref:!0,v:{}},Ar[Ad]=jn,Ar.loggingLevelConsole=0,Ar.diagnosticLogInterval=jn,Ar));function sI(t,e){return new HS(e)}function cI(t,e,n){var r=[],i=[],o={};return ee(n,function(a){(B(a)||B(a[sc]))&&Qt($y);var s=a[Uu],c=a[Vr];a&&s&&(B(o[s])?o[s]=c:Ki(t,"Two extensions have same priority #"+s+" - "+o[s]+", "+c)),!s||s<e?r[Ee](a):i[Ee](a)}),{core:r,channels:i}}function Jg(t,e){var n=!1;return ee(e,function(r){if(r===t)return n=!0,-1}),n}function Od(t,e,n,r){n&&Pe(n,function(i,o){r&&Nt(o)&&Nt(e[i])&&Od(t,e[i],o,r),r&&Nt(o)&&Nt(e[i])?Od(t,e[i],o,r):t.set(e,i,o)})}function Gg(t,e){var n=null,r=-1;return ee(t,function(i,o){if(i.w===e)return n=i,r=o,-1}),{i:r,l:n}}function uI(t,e){var n=Gg(t,e).l;return n||(n={w:e,rm:function(){var r=Gg(t,e);r.i!==-1&&t[lo](r.i,1)}},t[Ee](n)),n}function lI(t,e,n){ee(e,function(r){var i=at(t,r.w,n);delete r.w,r.rm=function(){i.rm()}})}function fI(t,e,n,r){return e.add(t[Hi](function(i){var o=i.cfg.disableDbgExt;o===!0&&r&&(n[Du](r),r=null),n&&!r&&o!==!0&&(r=xS(i.cfg),n[Ru](r))})),r}function dI(t){return Re({rm:function(){t.rm()}},"toJSON",{v:function(){return"aicore::onCfgChange<"+JSON.stringify(t)+">"}})}var hI=(function(){function t(){var e,n,r,i,o,a,s,c,u,l,f,m,d,h,g,p,v,b,P,x,R,q,A,I,W,j,K,re,ae,_,E,V,M;He(t,this,function(D){U(),D._getDbgPlgTargets=function(){return[A,i]},D[On]=function(){return n},D.activeStatus=function(){return j},D._setPendingStatus=function(){j=3},D[sc]=function($,Z,ue,ne){d&&Qt(Xg),D[On]()&&Qt("Core cannot be initialized more than once"),e=vn($,Ef,ue||D[ut],!1),$=e.cfg,sn(e[Hi](function(F){var O=F.cfg;re=O.initInMemoMaxSize||oI,ce(O);var X=F.ref(F.cfg,la);Pe(X,function(ie){F.ref(X,ie)})})),o=ne,P=fI(e,b,o&&D[Cc](),P),je(),D[ut]=ue;var C=$[jo];if(l=[],l[Ee].apply(l,hg(hg([],Z,!1),C)),f=$[Lo],Y(null),(!m||m[he]===0)&&Qt("No "+Lo+" available"),f&&f[he]>1){var z=D[js]("TeeChannelController");(!z||!z.plugin)&&G(r,1,28,"TeeChannel required")}lI($,q,r),q=null,n=!0,j===Or.ACTIVE&&H()},D.getChannels=function(){var $=[];return m&&ee(m,function(Z){$[Ee](Z)}),xn($)},D.track=function($){Ku(D[Nu](),function(){return"AppInsightsCore:track"},function(){$===null&&(nr($),Qt("Invalid telemetry item")),!$[ro]&&B($[ro])&&(nr($),Qt("telemetry name required")),$.iKey=$.iKey||R,$.time=$.time||ka(new Date),$.ver=$.ver||"4.0",!d&&D[On]()&&j===Or.ACTIVE?J()[zt]($):j!==Or.INACTIVE&&i[he]<=re&&i[Ee]($)},function(){return{item:$}},!$.sync)},D[ty]=J,D[Cc]=function(){return o||(o=new OS(e.cfg),D[rI]=o),o},D[Ru]=function($){D.getNotifyMgr()[Ru]($)},D[Du]=function($){o&&o[Du]($)},D.getCookieMgr=function(){return c||(c=Qc(e.cfg,D[ut])),c},D.setCookieMgr=function($){c!==$&&(ea(c,!1),c=$)},D[Nu]=function(){return a||s||qS()},D.setPerfMgr=function($){a=$},D.eventCnt=function(){return i[he]},D.releaseQueue=function(){if(n&&i[he]>0){var $=i;i=[],j===2?ee($,function(Z){Z.iKey=Z.iKey||R,J()[zt](Z)}):G(r,2,20,"core init status is not active")}},D.pollInternalLogs=function($){return g=$||null,M=!1,E&&E[Pi](),w(!0)};function ce($){var Z=$.instrumentationKey,ue=$.endpointUrl;if(j!==3){if(B(Z)){R=null,j=Or.INACTIVE;var ne="Please provide instrumentation key";n?(G(r,1,100,ne),H()):Qt(ne);return}var C=[];ii(Z)?(C[Ee](Z),R=null):R=Z,ii(ue)?(C[Ee](ue),K=null):K=ue,C[he]?me($,C):oe()}}function me($,Z){ae=!1,j=3;var ue=Bi($.initTimeOut)?$.initTimeOut:aI,ne=TC(Z);_&&_[Pi](),_=pn(function(){_=null,ae||oe()},ue),Vt(ne,function(C){try{if(ae)return;if(!C.rejected){var z=C[Ni];if(z&&z[he]){var F=z[0];if(R=F&&F[Ni],z[he]>1){var O=z[1];K=O&&O[Ni]}}R&&($.instrumentationKey=R,$.endpointUrl=K)}oe()}catch{ae||oe()}})}function oe(){ae=!0,B(R)?(j=Or.INACTIVE,G(r,1,112,"ikey can't be resolved from promises")):j=Or.ACTIVE,H()}function H(){n&&(D.releaseQueue(),D.pollInternalLogs())}function w($){if((!E||!E[Zo])&&!M){var Z=$||r&&r.queue[he]>0;Z&&(V||(V=!0,sn(e[Hi](function(ue){var ne=ue.cfg.diagnosticLogInterval;(!ne||!(ne>0))&&(ne=1e4);var C=!1;E&&(C=E[Zo],E[Pi]()),E=aC(Ue,ne),E.unref(),E[Zo]=C}))),E[Zo]=!0)}return E}D[yg]=function(){M=!0,E&&E[Pi](),Ue()},Yo(D,function(){return h},["addTelemetryInitializer"]),D[io]=function($,Z,ue){$===void 0&&($=!0),n||Qt(iI),d&&Qt(Xg);var ne={reason:50,isAsync:$,flushComplete:!1},C;$&&!Z&&(C=Jn(function(O){Z=O}));var z=Xu(ke(),D);z[Sc](function(){b.run(D[ut]),xy([c,o,r],$,function(){U(),Z&&Z(ne)})},D);function F(O){ne.flushComplete=O,d=!0,v.run(z,ne),D[yg](),z[zt](ne)}return Ue(),kt($,F,6,ue),C},D[js]=be,D.addPlugin=function($,Z,ue,ne){if(!$){ne&&ne(!1),Tt($y);return}var C=be($[Vr]);if(C&&!Z){ne&&ne(!1),Tt("Plugin ["+$[Vr]+"] is already loaded!");return}var z={reason:16};function F(ie){l[Ee]($),z.added=[$],Y(z),ne&&ne(!0)}if(C){var O=[C.plugin],X={reason:2,isAsync:!!ue};Te(O,X,function(ie){ie?(z.removed=O,z.reason|=32,F()):ne&&ne(!1)})}else F()},D.updateCfg=function($,Z){Z===void 0&&(Z=!0);var ue;if(D[On]()){ue={reason:1,cfg:e.cfg,oldCfg:dg({},e.cfg),newConfig:dg({},$),merge:Z},$=ue.newConfig;var ne=e.cfg;$[jo]=ne[jo],$[Lo]=ne[Lo]}e._block(function(C){var z=C.cfg;Od(C,z,$,Z),Z||Pe(z,function(F){Qr($,F)||C.set(z,F,jn)}),C.setDf(z,Ef)},!0),e.notify(),ue&&We(ue)},D.evtNamespace=function(){return p},D.flush=kt,D.getTraceCtx=function($){return x||(x=JS()),x},D.setTraceCtx=function($){x=$||null},D.addUnloadHook=sn,Lu(D,"addUnloadCb",function(){return v},"add"),D.onCfgChange=function($){var Z;return n?Z=at(e.cfg,$,D[ut]):Z=uI(q,$),dI(Z)},D.getWParam=function(){return jm()||e.cfg.enableWParam?0:-1};function y(){var $={};I=[];var Z=function(ue){ue&&ee(ue,function(ne){if(ne[Vr]&&ne[Ed]&&!$[ne.identifier]){var C=ne[Vr]+"="+ne[Ed];I[Ee](C),$[ne.identifier]=ne}})};Z(m),f&&ee(f,function(ue){Z(ue)}),Z(l)}function U(){n=!1,e=vn({},Ef,D[ut]),e.cfg[ny]=1,Re(D,"config",{g:function(){return e.cfg},s:function(Z){D.updateCfg(Z,!1)}}),Re(D,"pluginVersionStringArr",{g:function(){return I||y(),I}}),Re(D,"pluginVersionString",{g:function(){return W||(I||y(),W=I.join(";")),W||De}}),Re(D,"logger",{g:function(){return r||(r=new Vu(e.cfg),e[ut]=r),r},s:function(Z){e[ut]=Z,r!==Z&&(ea(r,!1),r=Z)}}),D[ut]=new Vu(e.cfg),A=[];var $=D.config[jo]||[];$.splice(0,$[he]),Qo($,A),h=new nI,i=[],ea(o,!1),o=null,a=null,s=null,ea(c,!1),c=null,u=null,l=[],f=null,m=null,d=!1,g=null,p=gn("AIBaseCore",!0),v=Uy(),x=null,R=null,b=Ny(),q=[],W=null,I=null,M=!1,E=null,V=!1,j=0,K=null,re=null,ae=!1,_=null}function J(){var $=Rn(ke(),e.cfg,D);return $[Sc](w),$}function Y($){var Z=cI(D[ut],SS,l);u=null,W=null,I=null,m=(f||[])[0]||[],m=kf(Qo(m,Z[Lo]));var ue=Qo(kf(Z[mt]),m);A=xn(ue);var ne=D.config[jo]||[];ne.splice(0,ne[he]),Qo(ne,A);var C=J();m&&m[he]>0&&qg(C[oo](m),ue),qg(C,ue),$&&We($)}function be($){var Z=null,ue=null,ne=[];return ee(A,function(C){if(C[Vr]===$&&C!==h)return ue=C,-1;C.getChannel&&ne[Ee](C)}),!ue&&ne[he]>0&&ee(ne,function(C){if(ue=C.getChannel($),!ue)return-1}),ue&&(Z={plugin:ue,setEnabled:function(C){Xi(ue)[Md]=!C},isEnabled:function(){var C=Xi(ue);return!C[ur]&&!C[Md]},remove:function(C,z){C===void 0&&(C=!0);var F=[ue],O={reason:1,isAsync:C};Te(F,O,function(X){X&&Y({reason:32,removed:F}),z&&z(X)})}}),Z}function ke(){if(!u){var $=(A||[]).slice();Dt($,h)===-1&&$[Ee](h),u=so(kf($),e.cfg,D)}return u}function Te($,Z,ue){if($&&$[he]>0){var ne=so($,e.cfg,D),C=Xu(ne,D);C[Sc](function(){var z=!1,F=[];ee(l,function(X,ie){Jg(X,$)?z=!0:F[Ee](X)}),l=F,W=null,I=null;var O=[];f&&(ee(f,function(X,ie){var le=[];ee(X,function(Ie){Jg(Ie,$)?z=!0:le[Ee](Ie)}),O[Ee](le)}),f=O),ue&&ue(z),w()}),C[zt](Z)}else ue(!1)}function Ue(){if(r&&r.queue){var $=r.queue.slice(0);r.queue[he]=0,ee($,function(Z){var ue={name:g||"InternalMessageId: "+Z[Au],iKey:R,time:ka(new Date),baseType:Vs.dataType,baseData:{message:Z[qi]}};D.track(ue)})}}function kt($,Z,ue,ne){var C=1,z=!1,F=null;ne=ne||5e3;function O(){C--,z&&C===0&&(F&&F[Pi](),F=null,Z&&Z(z),Z=null)}if(m&&m[he]>0){var X=J()[oo](m);X.iterate(function(ie){if(ie.flush){C++;var le=!1;ie.flush($,function(){le=!0,O()},ue)||le||($&&F==null?F=pn(function(){F=null,O()},ne):O())}})}return z=!0,O(),!0}function je(){var $;sn(e[Hi](function(Z){var ue=Z.cfg.enablePerfMgr;if(ue){var ne=Z.cfg[Ad];($!==ne||!$)&&(ne||(ne=sI),At(Z.cfg,Ad,ne),$=ne,s=null),!a&&!s&&pe(ne)&&(s=ne(D,D[Cc]()))}else s=null,$=null}))}function We($){var Z=Ep(ke(),D);Z[Sc](w),(!D._updateHook||D._updateHook(Z,$)!==!0)&&Z[zt]($)}function Tt($){var Z=D[ut];Z?(G(Z,2,73,$),w()):Qt($)}function nr($){var Z=D[Cc]();Z&&Z[Es]([$],2)}function sn($){b.add($)}})}return t.__ieDyn=1,t})();function xf(t,e){try{if(t&&t!==""){var n=Dn().parse(t);if(n&&n[wg]&&n[wg]>=n.itemsAccepted&&n.itemsReceived-n.itemsAccepted===n.errors[he])return n}}catch(r){G(e,1,43,"Cannot parse the response. "+(r[ro]||te(r)),{response:t})}return null}var yn="",pI="NoResponseBody",Qg="&"+pI+"=true",Pf="POST",gI=(function(){function t(){var e=0,n,r,i,o,a,s,c,u,l,f,m,d,h,g;He(t,this,function(p,v){var b=!0;ae(),p[sc]=function(_,E){i=E,r&&G(i,1,28,"Sender is already initialized"),p.SetConfig(_),r=!0},p._getDbgPlgTargets=function(){return[r,o,s,n]},p.SetConfig=function(_){try{if(a=_.senderOnCompleteCallBack||{},s=!!_.disableCredentials,c=_.fetchCredentials,o=!!_.isOneDs,n=!!_.enableSendPromise,l=!!_.disableXhr,f=!!_.disableBeacon,m=!!_.disableBeaconSync,g=_.timeWrapper,h=!!_.addNoResponse,d=!!_.disableFetchKeepAlive,u={sendPOST:j},o||(b=!1),s){var E=Fn();E&&E.protocol&&E.protocol[Ia]()==="file:"&&(b=!1)}return!0}catch{}return!1},p.getSyncFetchPayload=function(){return e},p.getSenderInst=function(_,E){return _&&_[he]?q(_,E):null},p.getFallbackInst=function(){return u},p[Mu]=function(_,E){ae()},p.preparePayload=function(_,E,V,M){if(!E||M||!V[_n]){_(V);return}try{var D=et("CompressionStream");if(!pe(D)){_(V);return}var ce=new ReadableStream({start:function(U){U.enqueue(de(V[_n])?new TextEncoder().encode(V[_n]):V[_n]),U.close()}}),me=ce.pipeThrough(new D("gzip")),oe=me.getReader(),H=[],w=0,y=!1;return Vt(oe.read(),function U(J){if(!y&&!J.rejected){var Y=J[Ni];if(!Y.done)return H[Ee](Y[Ni]),w+=Y.value[he],Vt(oe.read(),U);for(var be=new Uint8Array(w),ke=0,Te=0,Ue=H;Te<Ue.length;Te++){var kt=Ue[Te];be.set(kt,ke),ke+=kt[he]}V[_n]=be,V[Ic]["Content-Encoding"]="gzip",V._chunkCount=H[he]}y||(y=!0,_(V))}),oe}catch{_(V);return}};function P(_,E){A(E,200,{},_)}function x(_,E){G(i,2,26,"Failed to send telemetry.",{message:_}),A(E,400,{})}function R(_){x("No endpoint url is provided for the batch",_)}function q(_,E){for(var V=0,M=null,D=0;M==null&&D<_[he];)V=_[D],!l&&V===1?eS()?M=re:Il()&&(M=j):V===2&&yp(E)&&(!E||!d)?M=K:V===3&&as()&&(E?!m:!f)&&(M=W),D++;return M?{_transport:V,_isSync:E,sendPOST:M}:null}function A(_,E,V,M){try{_&&_(E,V,M)}catch{}}function I(_,E){var V=er(),M=_[La];if(!M)return R(E),!0;M=_[La]+(h?Qg:yn);var D=_[_n],ce=o?D:new Blob([D],{type:"text/plain;charset=UTF-8"}),me=V.sendBeacon(M,ce);return me}function W(_,E,V){var M=_[_n];try{if(M)if(I(_,E))P(yn,E);else{var D=a&&a.beaconOnRetry;D&&pe(D)?D(_,E,I):(u&&u.sendPOST(_,E,!0),G(i,2,40,". Failed to send telemetry with Beacon API, retried with normal sender."))}}catch(ce){o&&Ki(i,"Failed to send telemetry using sendBeacon API. Ex:"+te(ce)),A(E,o?0:400,{},yn)}}function j(_,E,V){var M,D,ce,me=_[Ic]||{};!V&&n&&(M=Jn(function(y,U){D=y,ce=U})),o&&V&&_.disableXhrSync&&(V=!1);var oe=_[La];if(!oe){R(E),D&&D(!1);return}var H=jC(Pf,oe,b,!0,V,_[Io]);o||H.setRequestHeader("Content-type","application/json"),ee(vr(me),function(y){H.setRequestHeader(y,me[y])}),H.onreadystatechange=function(){o||(w(H),H.readyState===4&&D&&D(!0))},H.onload=function(){o&&w(H)};function w(y){var U=a&&a.xhrOnComplete,J=U&&pe(U);if(J)U(y,E,_);else{var Y=ju(y);A(E,y[sr],df(y,o),Y)}}return H.onerror=function(y){A(E,o?H[sr]:400,df(H,o),o?yn:Wu(H)),ce&&ce(y)},H.ontimeout=function(){A(E,o?H[sr]:500,df(H,o),o?yn:Wu(H)),D&&D(!1)},H.send(_[_n]),M}function K(_,E,V){var M,D=_[La],ce=_[_n],me=o?ce:new Blob([ce],{type:"application/json"}),oe,H,w,y=new Headers,U=ce[he],J=!1,Y=!1,be=_[Ic]||{},ke=(M={method:Pf,body:me},M[xg]=!0,M);_.headers&&vr(_.headers)[he]>0&&(ee(vr(be),function(je){y.append(je,be[je])}),ke[Ic]=y),c?ke.credentials=c:b&&o&&(ke.credentials="include"),V&&(ke.keepalive=!0,e+=U,o?_._sendReason===2&&(J=!0,h&&(D+=Qg)):J=!0);var Te=new Request(D,ke);try{Te[xg]=!0}catch{}if(!V&&n&&(oe=Jn(function(je,We){H=je,w=We})),!D){R(E),H&&H(!1);return}function Ue(je,We){We?A(E,o?0:We,{},o?yn:je):A(E,o?0:400,{},o?yn:je)}function kt(je,We,Tt){var nr=je[sr],sn=a.fetchOnComplete;sn&&pe(sn)?sn(je,E,Tt||yn,We):A(E,nr,{},Tt||yn)}try{Vt(fetch(o?D:Te,o?ke:null),function(je){if(V&&(e-=U,U=0),!Y)if(Y=!0,je.rejected)Ue(je.reason&&je.reason[qi],499),w&&w(je.reason);else{var We=je[Ni];try{!o&&!We.ok?(We[sr]?Ue(We.statusText,We[sr]):Ue(We.statusText,499),H&&H(!1)):o&&!We.body?(kt(We,null,yn),H&&H(!0)):Vt(We.text(),function(Tt){kt(We,_,Tt[Ni]),H&&H(!0)})}catch(Tt){We&&We[sr]?Ue(te(Tt),We[sr]):Ue(te(Tt),499),w&&w(Tt)}}})}catch(je){Y||(Ue(te(je),499),w&&w(je))}return J&&!Y&&(Y=!0,A(E,200,{}),H&&H(!0)),o&&!Y&&_[Io]>0&&g&&g.set(function(){Y||(Y=!0,A(E,500,{}),H&&H(!0))},_[Io]),oe}function re(_,E,V){var M=an(),D=new XDomainRequest,ce=_[_n];D.onload=function(){var y=ju(D),U=a&&a.xdrOnComplete;U&&pe(U)?U(D,E,_):A(E,200,{},y)},D.onerror=function(){A(E,400,{},o?yn:dy(D))},D.ontimeout=function(){A(E,500,{})},D.onprogress=function(){};var me=M&&M.location&&M.location.protocol||"",oe=_[La];if(!oe){R(E);return}if(!o&&oe.lastIndexOf(me,0)!==0){var H="Cannot send XDomain request. The endpoint URL protocol doesn't match the hosting page protocol.";G(i,2,40,". "+H),x(H,E);return}var w=o?oe:oe[Vi](/^(https?:)/,"");D.open(Pf,w),_[Io]&&(D[Io]=_[Io]),D.send(ce),o&&V?g&&g.set(function(){D.send(ce)},0):D.send(ce)}function ae(){e=0,r=!1,n=!1,i=null,o=null,a=null,s=null,c=null,u=null,l=!1,f=!1,m=!1,d=!1,h=!1,g=null}})}return t.__ieDyn=1,t})(),Ly="on",Zg="attachEvent",Yg="addEventListener",ev="detachEvent",tv="removeEventListener",Fd="events",Hd="visibilitychange",El="pagehide",jy="unload",Wy="beforeunload",Oy=gn("aiEvtPageHide");gn("aiEvtPageShow");var vI=/\.[\.]+/g,mI=/[\.]+$/,yI=1,Ju=Sy("events"),_I=/^([^.]*)(?:\.(.+)|)/;function nv(t){return t&&t[Vi]?t[Vi](/^[\s\.]+|(?=[\s\.])[\.\s]+$/g,De):t}function xp(t,e){if(e){var n=De;we(e)?(n=De,ee(e,function(i){i=nv(i),i&&(i[0]!=="."&&(i="."+i),n+=i)})):n=nv(e),n&&(n[0]!=="."&&(n="."+n),t=(t||De)+n)}var r=_I.exec(t||De)||[];return{type:r[1],ns:(r[2]||De).replace(vI,".").replace(mI,De)[ao](".").sort().join(".")}}function Fy(t,e,n){n===void 0&&(n=!0);var r=Ju.get(t,Fd,{},n),i=r[e];return i||(i=r[e]=[]),i}function Hy(t,e,n,r){t&&e&&e[Zr]&&(t[tv]?t[tv](e[Zr],n,r):t[ev]&&t[ev](Ly+e[Zr],n))}function bI(t,e,n,r){var i=!1;return t&&e&&e[Zr]&&n&&(t[Yg]?(t[Yg](e[Zr],n,r),i=!0):t[Zg]&&(t[Zg](Ly+e[Zr],n),i=!0)),i}function rv(t,e,n,r){for(var i=e[he];i--;){var o=e[i];o&&(!n.ns||n.ns===o[_g].ns)&&(!r||r(o))&&(Hy(t,o[_g],o.handler,o.capture),e[lo](i,1))}}function wI(t,e,n){if(e[Zr])rv(t,Fy(t,e[Zr]),e,n);else{var r=Ju.get(t,Fd,{});Pe(r,function(i,o){rv(t,o,e,n)}),vr(r)[he]===0&&Ju.kill(t,Fd)}}function ci(t,e){var n;return e?(we(e)?n=[t].concat(e):n=[t,e],n=xp("xx",n).ns[ao](".")):n=t,n}function yr(t,e,n,r,i){i===void 0&&(i=!1);var o=!1;if(t)try{var a=xp(e,r);if(o=bI(t,a,n,i),o&&Ju.accept(t)){var s={guid:yI++,evtName:a,handler:n,capture:i};Fy(t,a.type)[Ee](s)}}catch{}return o}function da(t,e,n,r,i){if(i===void 0&&(i=!1),t)try{var o=xp(e,r),a=!1;wI(t,o,function(s){return o.ns&&!n||s.handler===n?(a=!0,!0):!1}),a||Hy(t,o,n,i)}catch{}}function CI(t,e,n){var r=!1,i=an();i&&(r=yr(i,t,e,n),r=yr(i.body,t,e,n)||r);var o=St();return o&&(r=yr(o,t,e,n)||r),r}function SI(t,e,n){var r=an();r&&(da(r,t,e,n),da(r.body,t,e,n));var i=St();i&&da(i,t,e,n)}function Gu(t,e,n,r){var i=!1;return e&&t&&t[he]>0&&ee(t,function(o){o&&(!n||Dt(n,o)===-1)&&(i=CI(o,e,r)||i)}),i}function II(t,e,n,r){var i=!1;return e&&t&&we(t)&&(i=Gu(t,e,n,r),!i&&n&&n[he]>0&&(i=Gu(t,e,null,r))),i}function qd(t,e,n){t&&we(t)&&ee(t,function(r){r&&SI(r,e,n)})}function kI(t,e,n){return II([Wy,jy,El],t,e,n)}function TI(t,e){qd([Wy,jy,El],t,e)}function Vd(t,e,n){function r(a){var s=St();t&&s&&s.visibilityState==="hidden"&&t(a)}var i=ci(Oy,n),o=Gu([El],t,e,i);return(!e||Dt(e,Hd)===-1)&&(o=Gu([Hd],r,e,i)||o),!o&&e&&(o=Vd(t,null,n)),o}function EI(t,e){var n=ci(Oy,e);qd([El],t,n),qd([Hd],null,n)}var iv="_aiHooks",ov=["req","rsp","hkErr","fnErr"];function Pp(t,e){if(t)for(var n=0;n<t[he]&&!e(t[n],n);n++);}function Df(t,e,n,r,i){i>=0&&i<=2&&Pp(t,function(o,a){var s=o.cbks,c=s[ov[i]];if(c){e.ctx=function(){var f=r[a]=r[a]||{};return f};try{c[no](e.inst,n)}catch(f){var u=e.err;try{var l=s[ov[2]];l&&(e.err=f,l[no](e.inst,n))}catch{}finally{e.err=u}}}})}function xI(t){return function(){var e=this,n=arguments,r=t.h,i={name:t.n,inst:e,ctx:null,set:c},o=[],a=s([i],n);i.evt=et("event");function s(l,f){return Pp(f,function(m){l[Ee](m)}),l}function c(l,f){n=s([],n),n[l]=f,a=s([i],n)}Df(r,i,a,o,0);var u=t.f;if(u)try{i.rslt=u[no](e,n)}catch(l){throw i.err=l,Df(r,i,a,o,3),l}return Df(r,i,a,o,1),i.rslt}}function Dp(t,e,n,r){var i=null;return t&&(hn(t,e)?i=t:n&&(i=Dp(zC(t),e,r,!1))),i}function PI(t,e,n){return t?Bd(t[qn],e,n,!1):null}function qy(t,e,n,r){var i=n&&n[iv];if(!i){i={i:0,n:e,f:n,h:[]};var o=xI(i);o[iv]=i,t[e]=o}var a={id:i.i,cbks:r,rm:function(){var s=this.id;Pp(i.h,function(c,u){if(c.id===s)return i.h[lo](u,1),1})}};return i.i++,i.h[Ee](a),a}function Bd(t,e,n,r,i){if(r===void 0&&(r=!0),t&&e&&n){var o=Dp(t,e,r,i);if(o){var a=o[e];if(typeof a===Im)return qy(o,e,a,n)}}return null}function Pc(t,e,n,r,i){if(t&&e&&n){var o=Dp(t,e,r,i)||t;if(o)return qy(o,e,o[e],n)}return null}var Li="Microsoft_ApplicationInsights_BypassAjaxInstrumentation",Vy="sampleRate",Rf="ProcessLegacy",av="http.method",Rp="https://dc.services.visualstudio.com",ha="/v2/track",Qn="not_specified",Af="iKey",Le=gC({requestContextHeader:[0,"Request-Context"],requestContextTargetKey:[1,"appId"],requestContextAppIdFormat:[2,"appId=cid-v1:"],requestIdHeader:[3,"Request-Id"],traceParentHeader:[4,"traceparent"],traceStateHeader:[5,"tracestate"],sdkContextHeader:[6,"Sdk-Context"],sdkContextHeaderAppIdRequest:[7,"appId"],requestContextHeaderLowerCase:[8,"request-context"]}),Ta="split",_e="length",Ks="toLowerCase",di="ingestionendpoint",Xs="toString",Ap="removeItem",lc="message",Wo="count",Mf="preTriggerDate",zf="getUTCDate",Qu="stringify",Uf="pathname",Js="match",sv="correlationHeaderExcludePatterns",Zn="name",Hn="properties",_r="measurements",Yc="sizeInBytes",eu="typeName",Oa="exceptions",us="severityLevel",Nf="problemGroup",pa="parsedStack",Zu="hasFullStack",Yu="assembly",br="fileName",Ea="line",xl="aiDataContract",el="duration";function By(t,e,n){var r=e[_e],i=DI(t,e);if(i[_e]!==r){for(var o=0,a=i;n[a]!==void 0;)o++,a=qt(i,0,147)+MI(o);i=a}return i}function DI(t,e){var n;return e&&(e=Fe(Ut(e)),e[_e]>150&&(n=qt(e,0,150),G(t,2,57,"name is too long. It has been truncated to 150 characters.",{name:e},!0))),n||e}function ht(t,e,n){n===void 0&&(n=1024);var r;return e&&(n=n||1024,e=Fe(Ut(e)),e[_e]>n&&(r=qt(e,0,n),G(t,2,61,"string value is too long. It has been truncated to "+n+" characters.",{value:e},!0))),r||e}function Pl(t,e,n){return de(e)&&(e=lr(e,n)),Xy(t,e,2048,66)}function Ky(t,e){var n;return e&&e[_e]>32768&&(n=qt(e,0,32768),G(t,2,56,"message is too long, it has been truncated to 32768 characters.",{message:e},!0)),n||e}function RI(t,e){var n;if(e){var r=""+e;r[_e]>32768&&(n=qt(r,0,32768),G(t,2,52,"exception is too long, it has been truncated to 32768 characters.",{exception:e},!0))}return n||e}function po(t,e){if(e){var n={};Pe(e,function(r,i){if(Bt(i)&&cc())try{i=Dn()[Qu](i)}catch(o){G(t,2,49,"custom property is not valid",{exception:o},!0)}i=ht(t,i,8192),r=By(t,r,n),n[r]=i}),e=n}return e}function go(t,e){if(e){var n={};Pe(e,function(r,i){r=By(t,r,n),n[r]=i}),e=n}return e}function AI(t,e){return e&&Xy(t,e,128,69)[Xs]()}function Xy(t,e,n,r){var i;return e&&(e=Fe(Ut(e)),e[_e]>n&&(i=qt(e,0,n),G(t,2,r,"input is too long, it has been truncated to "+n+" characters.",{data:e},!0))),i||e}function MI(t){var e="00"+t;return qr(e,e[_e]-3)}var cv=St()||{},uv=0,zI=[null,null,null,null,null];function Mp(t){var e=uv,n=zI,r=n[e];return cv.createElement?n[e]||(r=n[e]=cv.createElement("a")):r={host:$I(t)},r.href=t,e++,e>=n[_e]&&(e=0),uv=e,r}function UI(t){var e,n=Mp(t);return n&&(e=n.href),e}function NI(t,e){return t?t.toUpperCase()+" "+e:e}function $I(t,e){var n=Jy(t)||"";if(n){var r=n[Js](/(www\d{0,5}\.)?([^\/:]{1,256})(:\d{1,20})?/i);if(r!=null&&r[_e]>3&&de(r[2])&&r[2][_e]>0)return r[2]+(r[3]||"")}return n}function Jy(t,e){var n=null;if(t){var r=t[Js](/(\w{1,150}):\/\/([^\/:]{1,256})(:\d{1,20})?/i);if(r!=null&&r[_e]>2&&de(r[2])&&r[2][_e]>0&&(n=r[2]||"",r[_e]>2)){var i=(r[1]||"")[Ks](),o=r[3]||"";(i==="http"&&o===":80"||i==="https"&&o===":443")&&(o=""),n+=o}}return n}var LI=[Rp+ha,"https://breeze.aimon.applicationinsights.io"+ha,"https://dc-int.services.visualstudio.com"+ha],jI="cid-v1:";function Kd(t){return Dt(LI,t[Ks]())!==-1}function lv(t,e,n){if(!e||t&&t.disableCorrelationHeaders)return!1;if(t&&t[sv]){for(var r=0;r<t.correlationHeaderExcludePatterns[_e];r++)if(t[sv][r].test(e))return!1}var i=Mp(e).host[Ks]();if(i&&(ot(i,":443")!==-1||ot(i,":80")!==-1)&&(i=(Jy(e)||"")[Ks]()),(!t||!t.enableCorsCorrelation)&&i&&i!==n)return!1;var o=t&&t.correlationHeaderDomains;if(o){var a;if(ee(o,function(u){var l=new RegExp(u.toLowerCase().replace(/\\/g,"\\\\").replace(/\./g,"\\.").replace(/\*/g,".*"));a=a||l.test(i)}),!a)return!1}var s=t&&t.correlationHeaderExcludedDomains;if(!s||s[_e]===0)return!0;for(var r=0;r<s[_e];r++){var c=new RegExp(s[r].toLowerCase().replace(/\\/g,"\\\\").replace(/\./g,"\\.").replace(/\*/g,".*"));if(c.test(i))return!1}return i&&i[_e]>0}function fv(t){if(t){var e=WI(t,Le[1]);if(e&&e!==jI)return e}}function WI(t,e){if(t)for(var n=t[Ta](","),r=0;r<n[_e];++r){var i=n[r][Ta]("=");if(i[_e]===2&&i[0]===e)return i[1]}}function OI(t,e,n,r){var i,o=r,a=r;if(e&&e[_e]>0){var s=Mp(e);if(i=s.host,!o)if(s[Uf]!=null){var c=s.pathname[_e]===0?"/":s[Uf];c.charAt(0)!=="/"&&(c="/"+c),a=s[Uf],o=ht(t,n?n+" "+c:c)}else o=ht(t,e)}else i=r,o=r;return{target:i,name:o,data:a}}function Dc(){var t=Ir();if(t&&t.now&&t.timing){var e=t.now()+t.timing.navigationStart;if(e>0)return e}return Pn()}function Ft(t,e){var n=null;return t!==0&&e!==0&&!B(t)&&!B(e)&&(n=e-t),n}function zp(t,e){var n=t||{};return{getName:function(){return n[Zn]},setName:function(r){e&&e.setName(r),n[Zn]=r},getTraceId:function(){return n.traceID},setTraceId:function(r){e&&e.setTraceId(r),Ip(r)&&(n.traceID=r)},getSpanId:function(){return n.parentID},setSpanId:function(r){e&&e.setSpanId(r),kp(r)&&(n.parentID=r)},getTraceFlags:function(){return n.traceFlags},setTraceFlags:function(r){e&&e.setTraceFlags(r),n.traceFlags=r}}}var fc=gp({LocalStorage:0,SessionStorage:1}),ei=void 0,ti=void 0,Gy="";function Up(){return Rl()?Dl(fc.LocalStorage):null}function Dl(t){try{if(B(dn()))return null;var e=new Date()[Xs](),n=et(t===fc.LocalStorage?"localStorage":"sessionStorage"),r=Gy+e;n.setItem(r,e);var i=n.getItem(r)!==e;if(n[Ap](r),!i)return n}catch{}return null}function Np(){return Gs()?Dl(fc.SessionStorage):null}function FI(){ei=!1,ti=!1}function $p(t){Gy=t||""}function HI(){ei=Rl(!0),ti=Gs(!0)}function Rl(t){return(t||ei===void 0)&&(ei=!!Dl(fc.LocalStorage)),ei}function Qy(t,e){var n=Up();if(n!==null)try{return n.getItem(e)}catch(r){ei=!1,G(t,2,1,"Browser failed read of local storage. "+Ne(r),{exception:te(r)})}return null}function Zy(t,e,n){var r=Up();if(r!==null)try{return r.setItem(e,n),!0}catch(i){ei=!1,G(t,2,3,"Browser failed write to local storage. "+Ne(i),{exception:te(i)})}return!1}function qI(t,e){var n=Up();if(n!==null)try{return n[Ap](e),!0}catch(r){ei=!1,G(t,2,5,"Browser failed removal of local storage item. "+Ne(r),{exception:te(r)})}return!1}function Gs(t){return(t||ti===void 0)&&(ti=!!Dl(fc.SessionStorage)),ti}function Xd(t,e){var n=Np();if(n!==null)try{return n.getItem(e)}catch(r){ti=!1,G(t,2,2,"Browser failed read of session storage. "+Ne(r),{exception:te(r)})}return null}function Yy(t,e,n){var r=Np();if(r!==null)try{return r.setItem(e,n),!0}catch(i){ti=!1,G(t,2,4,"Browser failed write to session storage. "+Ne(i),{exception:te(i)})}return!1}function e_(t,e){var n=Np();if(n!==null)try{return n[Ap](e),!0}catch(r){ti=!1,G(t,2,6,"Browser failed removal of session storage item. "+Ne(r),{exception:te(r)})}return!1}var VI="appInsightsThrottle",BI=(function(){function t(e,n){var r=this,i,o,a,s,c,u,l,f=!1,m=!1;h(),r._getDbgPlgTargets=function(){return[l]},r.getConfig=function(){return a},r.canThrottle=function(_){var E=K(_),V=g(_);return b(V,i,E)},r.isTriggered=function(_){return re(_)},r.isReady=function(){return f},r.flush=function(_){try{var E=ae(_);if(E&&E[_e]>0){var V=E.slice(0);return l[_]=[],ee(V,function(M){d(M.msgID,M[lc],M.severity,!1)}),!0}}catch{}return!1},r.flushAll=function(){try{if(l){var _=!0;return Pe(l,function(E){var V=r.flush(parseInt(E));_=_&&V}),_}}catch{}return!1},r.onReadyState=function(_,E){return E===void 0&&(E=!0),f=B(_)?!0:_,f&&E?r.flushAll():null},r.sendMessage=function(_,E,V){return d(_,E,V,!0)};function d(_,E,V,M){if(f){var D=j(_);if(!D)return;var ce=g(_),me=K(_),oe=b(ce,i,me),H=!1,w=0,y=re(_);try{oe&&!y?(w=Nm(ce.limit.maxSendNumber,me[Wo]+1),me[Wo]=0,H=!0,c[_]=!0,me[Mf]=new Date):(c[_]=oe,me[Wo]+=1);var U=P(_);A(o,U,me);for(var J=0;J<w;J++)W(_,o,E,V)}catch{}return{isThrottled:H,throttleNum:w}}else if(M){var Y=ae(_);Y.push({msgID:_,message:E,severity:V})}return null}function h(){o=fo(e),c={},s={},l={},a={},p(109),u=Bi(n)?n:"",e.addUnloadHook(at(e.config,function(_){var E=_.cfg;i=Rl();var V=E.throttleMgrCfg||{};Pe(V,function(M,D){p(parseInt(M),D)})}))}function g(_){return a[_]||a[109]}function p(_,E){var V,M;try{var D=E||{},ce={};ce.disabled=!!D.disabled;var me=D.interval||{};m=(me==null?void 0:me.daysOfMonth)&&(me==null?void 0:me.daysOfMonth[_e])>0,ce.interval=v(me);var oe={samplingRate:((V=D.limit)===null||V===void 0?void 0:V.samplingRate)||100,maxSendNumber:((M=D.limit)===null||M===void 0?void 0:M.maxSendNumber)||1};ce.limit=oe,a[_]=ce}catch{}}function v(_){_=_||{};var E=_==null?void 0:_.monthInterval,V=_==null?void 0:_.dayInterval;return B(E)&&B(V)&&(_.monthInterval=3,m||(_.daysOfMonth=[28],m=!0)),_={monthInterval:_==null?void 0:_.monthInterval,dayInterval:_==null?void 0:_.dayInterval,daysOfMonth:_==null?void 0:_.daysOfMonth},_}function b(_,E,V){if(_&&!_.disabled&&E&&Bi(V)){var M=q(),D=V.date,ce=_.interval,me=1;if(ce!=null&&ce.monthInterval){var oe=(M.getUTCFullYear()-D.getUTCFullYear())*12+M.getUTCMonth()-D.getUTCMonth();me=I(ce.monthInterval,0,oe)}var H=1;if(m)H=Dt(ce.daysOfMonth,M[zf]());else if(ce!=null&&ce.dayInterval){var w=on((M.getTime()-D.getTime())/864e5);H=I(ce.dayInterval,0,w)}return me>=0&&H>=0}return!1}function P(_,E){var V=Bi(E)?E:"";return _?VI+V+"-"+_:null}function x(_){try{if(_){var E=new Date;return _.getUTCFullYear()===E.getUTCFullYear()&&_.getUTCMonth()===E.getUTCMonth()&&_[zf]()===E[zf]()}}catch{}return!1}function R(_,E,V){try{var M={date:q(),count:0};if(_){var D=JSON.parse(_),ce={date:q(D.date)||M.date,count:D[Wo]||M[Wo],preTriggerDate:D.preTriggerDate?q(D[Mf]):void 0};return ce}else return A(E,V,M),M}catch{}return null}function q(_){try{if(_){var E=new Date(_);if(!isNaN(E.getDate()))return E}else return new Date}catch{}return null}function A(_,E,V){try{return Zy(_,E,Fe(JSON[Qu](V)))}catch{}return!1}function I(_,E,V){return _<=0?1:V>=E&&(V-E)%_==0?on((V-E)/_)+1:-1}function W(_,E,V,M){G(E,M||1,_,V)}function j(_){try{var E=g(_);return cS(1e6)<=E.limit.samplingRate}catch{}return!1}function K(_){try{var E=s[_];if(!E){var V=P(_,u);E=R(Qy(o,V),o,V),s[_]=E}return s[_]}catch{}return null}function re(_){var E=c[_];if(B(E)){E=!1;var V=K(_);V&&(E=x(V[Mf])),c[_]=E}return c[_]}function ae(_){return l=l||{},B(l[_])&&(l[_]=[]),l[_]}}return t})(),KI=";",XI="=";function t_(t){if(!t)return{};var e=t[Ta](KI),n=$w(e,function(i,o){var a=o[Ta](XI);if(a[_e]===2){var s=a[0][Ks](),c=a[1];i[s]=c}return i},{});if(vr(n)[_e]>0){if(n.endpointsuffix){var r=n.location?n.location+".":"";n[di]=n[di]||"https://"+r+"dc."+n.endpointsuffix}n[di]=n[di]||Rp,Qm(n[di],"/")&&(n[di]=n[di].slice(0,-1))}return n}var JI=(function(){function t(e,n,r){var i=this,o=this;o.ver=1,o.sampleRate=100,o.tags={},o[Zn]=ht(e,r)||Qn,o.data=n,o.time=ka(new Date),o[xl]={time:1,iKey:1,name:1,sampleRate:function(){return i.sampleRate===100?4:1},tags:1,data:1}}return t})(),fr=(function(){function t(e,n,r,i){this.aiDataContract={ver:1,name:1,properties:0,measurements:0};var o=this;o.ver=2,o[Zn]=ht(e,n)||Qn,o[Hn]=po(e,r),o[_r]=go(e,i)}return t.envelopeType="Microsoft.ApplicationInsights.{0}.Event",t.dataType="EventData",t})(),GI=58,QI=/^\s{0,50}(from\s|at\s|Line\s{1,5}\d{1,10}\s{1,5}of|\w{1,50}@\w{1,80}|[^\(\s\n]+:[0-9\?]+(?::[0-9\?]+)?)/,ZI=/^(?:\s{0,50}at)?\s{0,50}([^\@\()\s]+)?\s{0,50}(?:\s|\@|\()\s{0,5}([^\(\s\n\]]+):([0-9\?]+):([0-9\?]+)\)?$/,YI=/^(?:\s{0,50}at)?\s{0,50}([^\@\()\s]+)?\s{0,50}(?:\s|\@|\()\s{0,5}([^\(\s\n\]]+):([0-9\?]+)\)?$/,ek=/^(?:\s{0,50}at)?\s{0,50}([^\@\()\s]+)?\s{0,50}(?:\s|\@|\()\s{0,5}([^\(\s\n\)\]]+)\)?$/,tk=/(?:^|\(|\s{0,10}[\w\)]+\@)?([^\(\n\s\]\)]+)(?:\:([0-9]+)(?:\:([0-9]+))?)?\)?(?:,|$)/,nk=/([^\(\s\n]+):([0-9]+):([0-9]+)$/,rk=/([^\(\s\n]+):([0-9]+)$/,dv="<no_method>",ga="error",fn="stack",Jd="stackDetails",hv="errorSrc",Gd="message",n_="description",pv=[{re:ZI,len:5,m:1,fn:2,ln:3,col:4},{chk:ok,pre:ik,re:YI,len:4,m:1,fn:2,ln:3},{re:ek,len:3,m:1,fn:2,hdl:vv},{re:tk,len:2,fn:1,hdl:vv}];function ik(t){return t.replace(/(\(anonymous\))/,"<anonymous>")}function ok(t){return ot(t,"[native")<0}function Qd(t,e){var n=t;return n&&!de(n)&&(JSON&&JSON[Qu]?(n=JSON[Qu](t),e&&(!n||n==="{}")&&(pe(t[Xs])?n=t[Xs]():n=""+t)):n=""+t+" - (Missing JSON.stringify)"),n||""}function r_(t,e){var n=t;return t&&(n&&!de(n)&&(n=t[Gd]||t[n_]||n),n&&!de(n)&&(n=Qd(n,!0)),t.filename&&(n=n+" @"+(t.filename||"")+":"+(t.lineno||"?")+":"+(t.colno||"?"))),e&&e!=="String"&&e!=="Object"&&e!=="Error"&&ot(n||"",e)===-1&&(n=e+": "+n),n||""}function ak(t){try{if(Bt(t))return"hasFullStack"in t&&"typeName"in t}catch{}return!1}function sk(t){try{if(Bt(t))return"ver"in t&&"exceptions"in t&&"properties"in t}catch{}return!1}function gv(t){return t&&t.src&&de(t.src)&&t.obj&&we(t.obj)}function hi(t){var e=t||"";de(e)||(de(e[fn])?e=e[fn]:e=""+e);var n=e[Ta](`
|
|
8
|
-
`);return{src:e,obj:n}}function
|
|
9
|
-
`),r=0;r<n[
|
|
10
|
-
`),n+=" from "+t[
|
|
11
|
-
`):e=t.src||""),e}function lk(t){var e,n=t.obj;if(n&&n[_e]>0){e=[];var r=0,i=!1,o=0;ee(n,function(g){if(i||pk(g)){var p=Ut(g);i=!0;var v=gk(p,r);v&&(o+=v[Yc],e.push(v),r++)}});var a=32*1024;if(o>a)for(var s=0,c=e[_e]-1,u=0,l=s,f=c;s<c;){var m=e[s][Yc],d=e[c][Yc];if(u+=m+d,u>a){var h=f-l+1;e.splice(l,h);break}l=s,f=c,s++,c--}}return e}function tl(t){var e="";if(t&&(e=t.typeName||t[Zn]||"",!e))try{var n=/function (.{1,200})\(/,r=n.exec(t.constructor[Xs]());e=r&&r[_e]>1?r[1]:""}catch{}return e}function $f(t){if(t)try{if(!de(t)){var e=tl(t),n=Qd(t,!1);return(!n||n==="{}")&&(t[ga]&&(t=t[ga],e=tl(t)),n=Qd(t,!0)),ot(n,e)!==0&&e!=="String"?e+":"+n:n}}catch{}return""+(t||"")}var Ht=(function(){function t(e,n,r,i,o,a){this.aiDataContract={ver:1,exceptions:1,severityLevel:0,properties:0,measurements:0};var s=this;s.ver=2,sk(n)?(s[Oa]=n[Oa]||[],s[Hn]=n[Hn],s[_r]=n[_r],n[us]&&(s[us]=n[us]),n.id&&(s.id=n.id,n[Hn].id=n.id),n[Nf]&&(s[Nf]=n[Nf]),B(n.isManual)||(s.isManual=n.isManual)):(r||(r={}),a&&(r.id=a),s[Oa]=[o_(e,n,r)],s[Hn]=po(e,r),s[_r]=go(e,i),o&&(s[us]=o),a&&(s.id=a))}return t.CreateAutoException=function(e,n,r,i,o,a,s,c){var u=tl(o||a||e);return{message:r_(e,u),url:n,lineNumber:r,columnNumber:i,error:$f(o||a||e),evt:$f(a||e),typeName:u,stackDetails:i_(s||o||a),errorSrc:c}},t.CreateFromInterface=function(e,n,r,i){var o=n[Oa]&&Ns(n[Oa],function(s){return hk(e,s)}),a=new t(e,$t($t({},n),{exceptions:o}),r,i);return a},t.prototype.toInterface=function(){var e=this,n=e.exceptions,r=e.properties,i=e.measurements,o=e.severityLevel,a=e.problemGroup,s=e.id,c=e.isManual,u=n instanceof Array&&Ns(n,function(l){return l.toInterface()})||void 0;return{ver:"4.0",exceptions:u,severityLevel:o,properties:r,measurements:i,problemGroup:a,id:s,isManual:c}},t.CreateSimpleException=function(e,n,r,i,o,a){var s;return{exceptions:[(s={},s[Zu]=!0,s.message=e,s.stack=o,s.typeName=n,s)]}},t.envelopeType="Microsoft.ApplicationInsights.{0}.Exception",t.dataType="ExceptionData",t.formatError=$f,t})(),fk=xn({id:0,outerId:0,typeName:1,message:1,hasFullStack:0,stack:0,parsedStack:2});function dk(){var t=this,e=we(t[pa])&&Ns(t[pa],function(r){return mk(r)}),n={id:t.id,outerId:t.outerId,typeName:t[eu],message:t[lc],hasFullStack:t[Zu],stack:t[fn],parsedStack:e||void 0};return n}function o_(t,e,n){var r,i,o,a,s,c,u,l;if(ak(e))a=e[eu],s=e[lc],u=e[fn],l=e[pa]||[],c=e[Zu];else{var f=e,m=f&&f.evt;rp(f)||(f=f[ga]||m||f),a=ht(t,tl(f))||Qn,s=Ky(t,r_(e||f,a))||Qn;var d=e[Jd]||i_(e);l=lk(d),we(l)&&Ns(l,function(h){h[Yu]=ht(t,h[Yu]),h[br]=ht(t,h[br])}),u=RI(t,uk(d)),c=we(l)&&l[_e]>0,n&&(n[eu]=n[eu]||a)}return r={},r[xl]=fk,r.id=i,r.outerId=o,r.typeName=a,r.message=s,r[Zu]=c,r.stack=u,r.parsedStack=l,r.toInterface=dk,r}function hk(t,e){var n=we(e[pa])&&Ns(e[pa],function(i){return vk(i)})||e[pa],r=o_(t,$t($t({},e),{parsedStack:n}));return r}function a_(t,e){var n=e[Js](nk);if(n&&n[_e]>=4)t[br]=n[1],t[Ea]=parseInt(n[2]);else{var r=e[Js](rk);r&&r[_e]>=3?(t[br]=r[1],t[Ea]=parseInt(r[2])):t[br]=e}}function vv(t,e,n){var r=t[br];e.fn&&n&&n[_e]>e.fn&&(e.ln&&n[_e]>e.ln?(r=Fe(n[e.fn]||""),t[Ea]=parseInt(Fe(n[e.ln]||""))||0):r=Fe(n[e.fn]||"")),r&&a_(t,r)}function pk(t){var e=!1;if(t&&de(t)){var n=Fe(t);n&&(e=QI.test(n))}return e}var s_=xn({level:1,method:1,assembly:0,fileName:0,line:0});function gk(t,e){var n,r;if(t&&de(t)&&Fe(t)){r=(n={},n[xl]=s_,n.level=e,n.assembly=Fe(t),n.method=dv,n.fileName="",n.line=0,n.sizeInBytes=0,n);for(var i=0;i<pv[_e];){var o=pv[i];if(o.chk&&!o.chk(t))break;o.pre&&(t=o.pre(t));var a=t[Js](o.re);if(a&&a[_e]>=o.len){o.m&&(r.method=Fe(a[o.m]||dv)),o.hdl?o.hdl(r,o,a):o.fn&&(o.ln?(r[br]=Fe(a[o.fn]||""),r[Ea]=parseInt(Fe(a[o.ln]||""))||0):a_(r,a[o.fn]||""));break}i++}}return c_(r)}function vk(t){var e,n=(e={},e[xl]=s_,e.level=t.level,e.method=t.method,e.assembly=t[Yu],e.fileName=t[br],e.line=t[Ea],e.sizeInBytes=0,e);return c_(n)}function c_(t){var e=GI;return t&&(e+=t.method[_e],e+=t.assembly[_e],e+=t.fileName[_e],e+=t.level.toString()[_e],e+=t.line.toString()[_e],t[Yc]=e),t}function mk(t){return{level:t.level,method:t.method,assembly:t[Yu],fileName:t[br],line:t[Ea]}}var yk=(function(){function t(){this.aiDataContract={name:1,kind:0,value:1,count:0,min:0,max:0,stdDev:0},this.kind=0}return t})(),Ji=(function(){function t(e,n,r,i,o,a,s,c,u){this.aiDataContract={ver:1,metrics:1,properties:0};var l=this;l.ver=2;var f=new yk;f[Wo]=i>0?i:void 0,f.max=isNaN(a)||a===null?void 0:a,f.min=isNaN(o)||o===null?void 0:o,f[Zn]=ht(e,n)||Qn,f.value=r,f.stdDev=isNaN(s)||s===null?void 0:s,l.metrics=[f],l[Hn]=po(e,c),l[_r]=go(e,u)}return t.envelopeType="Microsoft.ApplicationInsights.{0}.Metric",t.dataType="MetricData",t})(),Fa="";function Br(t){(isNaN(t)||t<0)&&(t=0),t=Gm(t);var e=Fa+t%1e3,n=Fa+on(t/1e3)%60,r=Fa+on(t/(1e3*60))%60,i=Fa+on(t/(1e3*60*60))%24,o=on(t/(1e3*60*60*24));return e=e[_e]===1?"00"+e:e[_e]===2?"0"+e:e,n=n[_e]<2?"0"+n:n,r=r[_e]<2?"0"+r:r,i=i[_e]<2?"0"+i:i,(o>0?o+".":Fa)+i+":"+r+":"+n+"."+e}function _k(t,e,n,r,i){return!i&&de(t)&&(t==="Script error."||t==="Script error")}var ni=(function(){function t(e,n,r,i,o,a,s){this.aiDataContract={ver:1,name:0,url:0,duration:0,properties:0,measurements:0,id:0};var c=this;c.ver=2,c.id=AI(e,s),c.url=Pl(e,r),c[Zn]=ht(e,n)||Qn,isNaN(i)||(c[el]=Br(i)),c[Hn]=po(e,o),c[_r]=go(e,a)}return t.envelopeType="Microsoft.ApplicationInsights.{0}.Pageview",t.dataType="PageviewData",t})(),Gi=(function(){function t(e,n,r,i,o,a,s,c,u,l,f,m){u===void 0&&(u="Ajax"),this.aiDataContract={id:1,ver:1,name:0,resultCode:0,duration:0,success:0,data:0,target:0,type:0,properties:0,measurements:0,kind:0,value:0,count:0,min:0,max:0,stdDev:0,dependencyKind:0,dependencySource:0,commandName:0,dependencyTypeName:0};var d=this;d.ver=2,d.id=n,d[el]=Br(o),d.success=a,d.resultCode=s+"",d.type=ht(e,u);var h=OI(e,r,c,i);d.data=Pl(e,i)||h.data,d.target=ht(e,h.target),l&&(d.target="".concat(d.target," | ").concat(l)),d[Zn]=ht(e,h[Zn]),d[Hn]=po(e,f),d[_r]=go(e,m)}return t.envelopeType="Microsoft.ApplicationInsights.{0}.RemoteDependency",t.dataType="RemoteDependencyData",t})(),va=(function(){function t(e,n,r,i,o){this.aiDataContract={ver:1,message:1,severityLevel:0,properties:0};var a=this;a.ver=2,n=n||Qn,a[lc]=Ky(e,n),a[Hn]=po(e,i),a[_r]=go(e,o),r&&(a[us]=r)}return t.envelopeType="Microsoft.ApplicationInsights.{0}.Message",t.dataType="MessageData",t})(),ma=(function(){function t(e,n,r,i,o,a,s){this.aiDataContract={ver:1,name:0,url:0,duration:0,perfTotal:0,networkConnect:0,sentRequest:0,receivedResponse:0,domProcessing:0,properties:0,measurements:0};var c=this;c.ver=2,c.url=Pl(e,r),c[Zn]=ht(e,n)||Qn,c[Hn]=po(e,o),c[_r]=go(e,a),s&&(c.domProcessing=s.domProcessing,c[el]=s[el],c.networkConnect=s.networkConnect,c.perfTotal=s.perfTotal,c.receivedResponse=s.receivedResponse,c.sentRequest=s.sentRequest)}return t.envelopeType="Microsoft.ApplicationInsights.{0}.PageviewPerformance",t.dataType="PageviewPerformanceData",t})(),vo=(function(){function t(e,n){this.aiDataContract={baseType:1,baseData:1},this.baseType=e,this.baseData=n}return t})(),Qs=gp({Verbose:0,Information:1,Warning:2,Error:3,Critical:4});function ui(t){var e="ai."+t+".";return function(n){return e+n}}var Ha=ui("application"),pt=ui("device"),Rc=ui("location"),Eo=ui("operation"),Lf=ui("session"),Mr=ui("user"),pi=ui("cloud"),qa=ui("internal"),u_=(function(t){tr(e,t);function e(){return t.call(this)||this}return e})(NC({applicationVersion:Ha("ver"),applicationBuild:Ha("build"),applicationTypeId:Ha("typeId"),applicationId:Ha("applicationId"),applicationLayer:Ha("layer"),deviceId:pt("id"),deviceIp:pt("ip"),deviceLanguage:pt("language"),deviceLocale:pt("locale"),deviceModel:pt("model"),deviceFriendlyName:pt("friendlyName"),deviceNetwork:pt("network"),deviceNetworkName:pt("networkName"),deviceOEMName:pt("oemName"),deviceOS:pt("os"),deviceOSVersion:pt("osVersion"),deviceRoleInstance:pt("roleInstance"),deviceRoleName:pt("roleName"),deviceScreenResolution:pt("screenResolution"),deviceType:pt("type"),deviceMachineName:pt("machineName"),deviceVMName:pt("vmName"),deviceBrowser:pt("browser"),deviceBrowserVersion:pt("browserVersion"),locationIp:Rc("ip"),locationCountry:Rc("country"),locationProvince:Rc("province"),locationCity:Rc("city"),operationId:Eo("id"),operationName:Eo("name"),operationParentId:Eo("parentId"),operationRootId:Eo("rootId"),operationSyntheticSource:Eo("syntheticSource"),operationCorrelationVector:Eo("correlationVector"),sessionId:Lf("id"),sessionIsFirst:Lf("isFirst"),sessionIsNew:Lf("isNew"),userAccountAcquisitionDate:Mr("accountAcquisitionDate"),userAccountId:Mr("accountId"),userAgent:Mr("userAgent"),userId:Mr("id"),userStoreRegion:Mr("storeRegion"),userAuthUserId:Mr("authUserId"),userAnonymousUserAcquisitionDate:Mr("anonUserAcquisitionDate"),userAuthenticatedUserAcquisitionDate:Mr("authUserAcquisitionDate"),cloudName:pi("name"),cloudRole:pi("role"),cloudRoleVer:pi("roleVer"),cloudRoleInstance:pi("roleInstance"),cloudEnvironment:pi("environment"),cloudLocation:pi("location"),cloudDeploymentUnit:pi("deploymentUnit"),internalNodeName:qa("nodeName"),internalSdkVersion:qa("sdkVersion"),internalAgentVersion:qa("agentVersion"),internalSnippet:qa("snippet"),internalSdkSrc:qa("sdkSrc")}));function Lr(t,e,n,r,i,o){n=ht(r,n)||Qn,(B(t)||B(e)||B(n))&&Qt("Input doesn't contain all required fields");var a="";t[Af]&&(a=t[Af],delete t[Af]);var s={name:n,time:ka(new Date),iKey:a,ext:o||{},tags:[],data:{},baseType:e,baseData:t};return B(i)||Pe(i,function(c,u){s.data[c]=u}),s}var Gt={UserExt:"user",DeviceExt:"device",TraceExt:"trace",WebExt:"web",AppExt:"app",OSExt:"os"},Be=new u_;function Va(t){var e=null;if(pe(Event))e=new Event(t);else{var n=St();n&&n.createEvent&&(e=n.createEvent("Event"),e.initEvent(t,!0,!0))}return e}function mv(t,e){da(t,null,null,e)}function bk(t){var e=St(),n=er(),r=!1,i=[],o=1;n&&!B(n.onLine)&&!n.onLine&&(o=2);var a=0,s=m(),c=ci(gn("OfflineListener"),t);try{if(l(an())&&(r=!0),e){var u=e.body||e;u.ononline&&l(u)&&(r=!0)}}catch{r=!1}function l(P){var x=!1;return P&&(x=yr(P,"online",g,c),x&&yr(P,"offline",p,c)),x}function f(){return s}function m(){return!(a===2||o===2)}function d(){var P=m();s!==P&&(s=P,ee(i,function(x){var R={isOnline:s,rState:o,uState:a};try{x(R)}catch{}}))}function h(P){a=P,d()}function g(){o=1,d()}function p(){o=2,d()}function v(){var P=an();if(P&&r){if(mv(P,c),e){var x=e.body||e;Qe(x.ononline)||mv(x,c)}r=!1}}function b(P){return i.push(P),{rm:function(){var x=i.indexOf(P);if(x>-1)return i.splice(x,1)}}}return{isOnline:f,isListening:function(){return r},unload:v,addListener:b,setOnlineState:h}}var Al="AppInsightsPropertiesPlugin",l_="AppInsightsChannelPlugin",Lp="ApplicationInsightsAnalytics",wk=Ra({history:{blkVal:!0,v:void 0}}),Ck=(function(t){tr(e,t);function e(){var n=t.call(this)||this;n.priority=185,n.identifier="ReactPlugin";var r,i,o,a,s;return He(e,n,function(c,u){l(),c.initialize=function(d,h,g,p){t.prototype.initialize.call(n,d,h,g,p),c._addHook(at(d,function(v){var b,P=c._getTelCtx();if(i=P.getExtCfg(n.identifier,wk),r=(b=h.getPlugin(Lp))===null||b===void 0?void 0:b.plugin,pe(o)&&(o(),o=null),i.history&&(m(i.history),!s)){var x={uri:i.history.location.pathname};c.trackPageView(x),s=!0}}))},c.getCookieMgr=function(){return Tl(c.core)},c.getAppInsights=f,c.processTelemetry=function(d,h){c.processNext(d,h)},c._doTeardown=function(d,h,g){pe(o)&&o(),a&&clearTimeout(a),l()},Yo(c,f,["trackMetric","trackPageView","trackEvent","trackException","trackTrace"]);function l(){r=null,i=null,o=null,a=null,s=!1}function f(){return r||G(c.diagLog(),1,64,"Analytics plugin is not available, React plugin telemetry will not be sent: "),r}function m(d){var h=function(g){var p=null;"location"in g?p=g.location:p=g,a=setTimeout(function(){a=null;var v={uri:p.pathname};c.trackPageView(v)},500)};o=d.listen(h)}dw(c,"_extensionConfig",function(){return i})}),n}return e.__ieDyn=1,e})(ho),nl="toString",Zd="isStorageUseDisabled",xo="_addHook",ze="core",zr="dataType",gi="envelopeType",Xt="diagLog",vi="track",tu="trackPageView",un="config",Yd="trackPreviousPageVisit",Di="sendPageViewInternal",jf="refUri",xa="startTime",ls="properties",Ln="duration",eh="sendPageViewPerformanceInternal",jp="populatePageViewPerformanceEvent",fs="href",yv="sendExceptionInternal",Ba="error",Wf="lineNumber",Of="columnNumber",Ff="CreateAutoException",Ac="addTelemetryInitializer",Sk="overridePageViewDuration",Hf="autoExceptionInstrumented",f_="autoTrackPageVisitTime",d_="isBrowserLinkTrackingEnabled",Zs="length",h_="enableAutoRouteTracking",p_="enableUnhandledPromiseRejectionTracking",th="autoUnhandledPromiseInstrumented",nh="getEntriesByType",g_="isPerformanceTimingSupported",v_="getPerformanceTiming",rl="navigationStart",rh="shouldCollectDuration",m_="isPerformanceTimingDataReady",ds="responseStart",Ik="requestStart",nu="loadEventEnd",ih="responseEnd",ru="connectEnd",kk=(function(){function t(e,n,r,i){He(t,this,function(o){var a=null,s=[],c=!1,u=!1,l;r&&(l=r.logger);function f(h){r&&r.flush(h,function(){})}function m(){a||(a=pn((function(){a=null;var h=s.slice(0),g=!1;s=[],ee(h,function(p){p()?g=!0:s.push(p)}),s[Zs]>0&&m(),g&&f(!0)}),100))}function d(h){s.push(h),m()}o[tu]=function(h,g){var p=h.name;if(B(p)||typeof p!="string"){var v=St();p=h.name=v&&v.title||""}var b=h.uri;if(B(b)||typeof b!="string"){var P=Fn();b=h.uri=P&&P[fs]||""}if(r&&r[un]&&(b=h.uri=lr(h.uri,r[un])),!u){var x=Ir(),R=x&&x[nh]&&x[nh]("navigation");if(R&&R[0]&&!Qe(x.timeOrigin)){var q=R[0].loadEventStart;h[xa]=new Date(x.timeOrigin+q)}else{var A=(g||h[ls]||{})[Ln]||0;h[xa]=new Date(new Date().getTime()-A)}u=!0}if(!i[g_]()){e[Di](h,g),f(!0),Om()||G(l,2,25,"trackPageView: navigation timing API used for calculation of page duration is not supported in this browser. This page view will be collected without duration and timing info.");return}var I=!1,W,j=i[v_]()[rl];j>0&&(W=Ft(j,+new Date),i[rh](W)||(W=void 0));var K;!B(g)&&!B(g[Ln])&&(K=g[Ln]),(n||!isNaN(K))&&(isNaN(K)&&(g||(g={}),g[Ln]=W),e[Di](h,g),f(!0),I=!0);var re=6e4;g||(g={}),d(function(){var ae=!1;try{if(i[m_]()){ae=!0;var _={name:p,uri:b};i[jp](_),!_.isValid&&!I?(g[Ln]=W,e[Di](h,g)):(I||(g[Ln]=_.durationMs,e[Di](h,g)),c||(e[eh](_,g),c=!0))}else j>0&&Ft(j,+new Date)>re&&(ae=!0,I||(g[Ln]=re,e[Di](h,g)))}catch(E){G(l,1,38,"trackPageView failed on page load calculation: "+Ne(E),{exception:te(E)})}return ae})},o.teardown=function(h,g){if(a){a.cancel(),a=null;var p=s.slice(0);s=[],ee(p,function(v){v()})}}})}return t.__ieDyn=1,t})(),Tk=36e5,_v=["googlebot","adsbot-google","apis-google","mediapartners-google"];function y_(){var t=Ir();return t&&!!t.timing}function Ek(){var t=Ir();return t&&t.getEntriesByType&&t.getEntriesByType("navigation")[Zs]>0}function xk(){var t=Ir(),e=t?t.timing:0;return e&&e.domainLookupStart>0&&e[rl]>0&&e[ds]>0&&e[Ik]>0&&e[nu]>0&&e[ih]>0&&e[ru]>0&&e.domLoading>0}function bv(){return y_()?Ir().timing:null}function Pk(){return Ek()?Ir()[nh]("navigation")[0]:null}function Dk(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=er()||{},r=n.userAgent,i=!1;if(r)for(var o=0;o<_v[Zs];o++)i=i||ot(r.toLowerCase(),_v[o])!==-1;if(i)return!1;for(var o=0;o<t[Zs];o++)if(t[o]<0||t[o]>=Tk)return!1;return!0}var Rk=(function(){function t(e){var n=fo(e);He(t,this,function(r){r[jp]=function(i){i.isValid=!1;var o=Pk(),a=bv(),s=0,c=0,u=0,l=0,f=0;(o||a)&&(o?(s=o[Ln],c=o[xa]===0?o[ru]:Ft(o[xa],o[ru]),u=Ft(o.requestStart,o[ds]),l=Ft(o[ds],o[ih]),f=Ft(o.responseEnd,o[nu])):(s=Ft(a[rl],a[nu]),c=Ft(a[rl],a[ru]),u=Ft(a.requestStart,a[ds]),l=Ft(a[ds],a[ih]),f=Ft(a.responseEnd,a[nu])),s===0?G(n,2,10,"error calculating page view performance.",{total:s,network:c,request:u,response:l,dom:f}):r[rh](s,c,u,l,f)?s<on(c)+on(u)+on(l)+on(f)?G(n,2,8,"client performance math error.",{total:s,network:c,request:u,response:l,dom:f}):(i.durationMs=s,i.perfTotal=i[Ln]=Br(s),i.networkConnect=Br(c),i.sentRequest=Br(u),i.receivedResponse=Br(l),i.domProcessing=Br(f),i.isValid=!0):G(n,2,45,"Invalid page load duration value. Browser perf data won't be sent.",{total:s,network:c,request:u,response:l,dom:f}))},r[v_]=bv,r[g_]=y_,r[m_]=xk,r[rh]=Dk})}return t.__ieDyn=1,t})(),Ak=(function(){function t(e,n){var r="prevPageVisitData";He(t,this,function(i){i[Yd]=function(s,c){try{var u=o(s,c);u&&n(u.pageName,u.pageUrl,u.pageVisitTime)}catch(l){Ki(e,"Auto track page visit time failed, metric will not be collected: "+te(l))}};function o(s,c){var u=null;try{if(u=a(),Gs()){Xd(e,r)!=null&&Qt("Cannot call startPageVisit consecutively without first calling stopPageVisit");var l=Dn().stringify(new Mk(s,c));Yy(e,r,l)}}catch(f){Ki(e,"Call to restart failed: "+te(f)),u=null}return u}function a(){var s=null;try{if(Gs()){var c=Pn(),u=Xd(e,r);u&&cc()&&(s=Dn().parse(u),s.pageVisitTime=c-s.pageVisitStartTime,e_(e,r))}}catch(l){Ki(e,"Stop page visit timer failed: "+te(l)),s=null}return s}Re(i,"_logger",{g:function(){return e}}),Re(i,"pageVisitTimeTrackingHandler",{g:function(){return n}})})}return t.__ieDyn=1,t})(),Mk=(function(){function t(e,n){this.pageVisitStartTime=Pn(),this.pageName=e,this.pageUrl=n}return t})(),wv=(function(){function t(e,n){var r=this,i={};r.start=function(o){typeof i[o]<"u"&&G(e,2,62,"start was called more than once for this event without calling stop.",{name:o,key:o},!0),i[o]=+new Date},r.stop=function(o,a,s,c){var u=i[o];if(isNaN(u))G(e,2,63,"stop was called without a corresponding start.",{name:o,key:o},!0);else{var l=+new Date,f=Ft(u,l);r.action(o,a,f,s,c)}delete i[o],i[o]=void 0}}return t})(),Rt,zk="event";function Ka(t,e){t&&t.dispatchEvent&&e&&t.dispatchEvent(e)}function Uk(t){if(t&&t.reason){var e=t.reason;return!de(e)&&pe(e[nl])?e[nl]():te(e)}return t||""}var Cv=6e4,Nk=Ra((Rt={sessionRenewalMs:Pg(Sv,1800*1e3),sessionExpirationMs:Pg(Sv,1440*60*1e3),disableExceptionTracking:lt()},Rt[f_]=lt(),Rt[Sk]=lt(),Rt[p_]=lt(),Rt[th]=!1,Rt.samplingPercentage=Hu($k,100),Rt[Zd]=lt(),Rt[d_]=lt(),Rt[h_]=lt(),Rt.namePrefix=kS(),Rt.enableDebug=lt(),Rt.disableFlushOnBeforeUnload=lt(),Rt.disableFlushOnUnload=lt(!1,"disableFlushOnBeforeUnload"),Rt.expCfg=Cn({inclScripts:!1,expLog:void 0,maxLogs:50}),Rt));function Sv(t,e){return t=t||e,t<Cv&&(t=Cv),+t}function $k(t){return!isNaN(t)&&t>0&&t<=100}function Lk(t){Qe(t[Zd])||(t[Zd]?FI():HI())}var jk=(function(t){tr(e,t);function e(){var n=t.call(this)||this;n.identifier=Lp,n.priority=180,n.autoRoutePVDelay=500;var r,i,o,a,s,c,u,l,f,m,d,h,g,p,v,b,P,x,R,q,A;return He(e,n,function(I,W){var j=W[xo];H(),I.getCookieMgr=function(){return Tl(I[ze])},I.processTelemetry=function(w,y){I.processNext(w,y)},I.trackEvent=function(w,y){try{var U=Lr(w,fr[zr],fr[gi],I[Xt](),y);I[ze][vi](U)}catch(J){oe(2,39,"trackTrace failed, trace will not be collected: "+Ne(J),{exception:te(J)})}},I.startTrackEvent=function(w){try{r.start(w)}catch(y){oe(1,29,"startTrackEvent failed, event will not be collected: "+Ne(y),{exception:te(y)})}},I.stopTrackEvent=function(w,y,U){try{r.stop(w,void 0,y,U)}catch(J){oe(1,30,"stopTrackEvent failed, event will not be collected: "+Ne(J),{exception:te(J)})}},I.trackTrace=function(w,y){try{var U=Lr(w,va[zr],va[gi],I[Xt](),y);I[ze][vi](U)}catch(J){oe(2,39,"trackTrace failed, trace will not be collected: "+Ne(J),{exception:te(J)})}},I.trackMetric=function(w,y){try{var U=Lr(w,Ji[zr],Ji[gi],I[Xt](),y);I[ze][vi](U)}catch(J){oe(1,36,"trackMetric failed, metric will not be collected: "+Ne(J),{exception:te(J)})}},I[tu]=function(w,y){try{var U=w||{};I[ze]&&I[ze][un]&&(U.uri=lr(U.uri,I[ze][un])),o[tu](U,$t($t($t({},U.properties),U.measurements),y)),b&&s[Yd](U.name,U.uri)}catch(J){oe(1,37,"trackPageView failed, page view will not be collected: "+Ne(J),{exception:te(J)})}},I[Di]=function(w,y,U){var J=St();if(J&&(w[jf]=w[jf]===void 0?J.referrer:w[jf]),I[ze]&&I[ze][un]&&(w.refUri=lr(w.refUri,I[ze][un])),B(w[xa])){var Y=(y||w[ls]||{})[Ln]||0;w[xa]=new Date(new Date().getTime()-Y)}var be=Lr(w,ni[zr],ni[gi],I[Xt](),y,U);I[ze][vi](be),K()},I[eh]=function(w,y,U){var J=Lr(w,ma[zr],ma[gi],I[Xt](),y,U);I[ze][vi](J)},I.trackPageViewPerformance=function(w,y){var U=w||{};try{a[jp](U),I[eh](U,y)}catch(J){oe(1,37,"trackPageViewPerformance failed, page view will not be collected: "+Ne(J),{exception:te(J)})}},I.startTrackPage=function(w){try{if(typeof w!="string"){var y=St();w=y&&y.title||""}i.start(w)}catch(U){oe(1,31,"startTrackPage failed, page view may not be collected: "+Ne(U),{exception:te(U)})}},I.stopTrackPage=function(w,y,U,J){try{if(typeof w!="string"){var Y=St();w=Y&&Y.title||""}if(typeof y!="string"){var be=Fn();y=be&&be[fs]||""}I[ze]&&I[ze][un]&&(y=lr(y,I[ze][un])),i.stop(w,y,U,J),b&&s[Yd](w,y)}catch(ke){oe(1,32,"stopTrackPage failed, page view will not be collected: "+Ne(ke),{exception:te(ke)})}},I[yv]=function(w,y,U){var J=w&&(w.exception||w[Ba])||rp(w)&&w||{name:w&&typeof w,message:w||Qn};w=w||{};var Y=new Ht(I[Xt](),J,w[ls]||y,w.measurements,w.severityLevel,w.id).toInterface(),be=St();if(be&&P!=null&&P.inclScripts){var ke=KS(be);Y[ls].exceptionScripts=JSON.stringify(ke)}if(P!=null&&P.expLog){var Te=P.expLog();Te&&Te.logs&&we(Te.logs)&&(Y[ls].exceptionLog=Te.logs.slice(0,P.maxLogs).join(`
|
|
12
|
-
`))}var Ue=Lr(Y,Ht[zr],Ht[gi],I[Xt](),y,U);I[ze][vi](Ue)},I.trackException=function(w,y){w&&!w.exception&&w[Ba]&&(w.exception=w[Ba]);try{I[yv](w,y)}catch(U){oe(1,35,"trackException failed, exception will not be collected: "+Ne(U),{exception:te(U)})}},I._onerror=function(w){var y=w&&w[Ba],U=w&&w.evt;try{if(!U){var J=an();J&&(U=J[zk])}var Y=w&&w.url||(St()||{}).URL,be=w.errorSrc||"window.onerror@"+Y+":"+(w[Wf]||0)+":"+(w[Of]||0),ke={errorSrc:be,url:Y,lineNumber:w[Wf]||0,columnNumber:w[Of]||0,message:w.message};_k(w.message,w.url,w.lineNumber,w.columnNumber,w[Ba])?E(Ht[Ff]("Script error: The browser's same-origin policy prevents us from getting the details of this exception. Consider using the 'crossorigin' attribute.",Y,w[Wf]||0,w[Of]||0,y,U,null,be),ke):(w.errorSrc||(w.errorSrc=be),I.trackException({exception:w,severityLevel:3},ke))}catch(Ue){var Te=y?y.name+", "+y.message:"null";oe(1,11,"_onError threw exception while logging error, error will not be collected: "+Ne(Ue),{exception:te(Ue),errorString:Te})}},I[Ac]=function(w){if(I[ze])return I[ze][Ac](w);c||(c=[]),c.push(w)},I.initialize=function(w,y,U,J){if(!I.isInitialized()){B(y)&&Qt("Error initializing"),W.initialize(w,y,U,J);try{q=ci(gn(I.identifier),y.evtNamespace&&y.evtNamespace()),c&&(ee(c,function(Y){y[Ac](Y)}),c=null),re(w),a=new Rk(I[ze]),o=new kk(I,v.overridePageViewDuration,I[ze],a),s=new Ak(I[Xt](),function(Y,be,ke){return ae(Y,be,ke)}),r=new wv(I[Xt](),"trackEvent"),r.action=function(Y,be,ke,Te,Ue){Te||(Te={}),Ue||(Ue={}),Te.duration=ke[nl](),I.trackEvent({name:Y,properties:Te,measurements:Ue})},i=new wv(I[Xt](),"trackPageView"),i.action=function(Y,be,ke,Te,Ue){B(Te)&&(Te={}),Te.duration=ke[nl]();var kt={name:Y,uri:be,properties:Te,measurements:Ue};I[Di](kt,Te)},wl()&&(V(),M())}catch(Y){throw I.setInitialized(!1),Y}}},I._doTeardown=function(w,y){o&&o.teardown(w,y),da(window,null,null,q),H()},I._getDbgPlgTargets=function(){return[A,h]};function K(){if(I[ze]){var w=I[ze].getPlugin("AjaxDependencyPlugin");w&&w.plugin&&w.plugin.resetAjaxAttempts&&w.plugin.resetAjaxAttempts()}}function re(w){var y=I.identifier,U=I[ze];I[xo](at(w,function(){var J=Rn(null,w,U);v=J.getExtCfg(y,Nk),h=h||w[Hf]||v[Hf],P=v.expCfg,b=v[f_],w.storagePrefix&&$p(w.storagePrefix),Lk(v),u=v[d_],_()}))}function ae(w,y,U){var J={PageName:w,PageUrl:y};I.trackMetric({name:"PageVisitTime",average:U,max:U,min:U,sampleCount:1},J)}function _(){if(!l&&u){var w=["/browserLinkSignalR/","/__browserLink/"],y=function(U){if(u&&U.baseType===Gi[zr]){var J=U.baseData;if(J){for(var Y=0;Y<w[Zs];Y++)if(J.target&&ot(J.target,w[Y])>=0)return!1}}return!0};I[xo](I[Ac](y)),l=!0}}function E(w,y){var U=Lr(w,Ht[zr],Ht[gi],I[Xt](),y);I[ze][vi](U)}function V(){var w=an(),y=Fn();I[xo](at(v,function(){d=v.disableExceptionTracking,!d&&!h&&!v[Hf]&&(j(Pc(w,"onerror",{ns:q,rsp:function(U,J,Y,be,ke,Te){!d&&U.rslt!==!0&&I._onerror(Ht[Ff](J,Y,be,ke,Te,U.evt))}},!1)),A++,h=!0)})),me(w,y)}function M(){var w=an(),y=Fn();I[xo](at(v,function(){if(f=v[h_]===!0,w&&f&&!m&&Aw()){var U=Wm();pe(U.pushState)&&pe(U.replaceState)&&typeof Event!==Gh&&ce(w,U,y)}}))}function D(){var w=null;if(I[ze]&&I[ze].getTraceCtx&&(w=I[ze].getTraceCtx(!1)),!w){var y=I[ze].getPlugin(Al);if(y){var U=y.plugin.context;U&&(w=zp(U.telemetryTrace))}}return w}function ce(w,y,U){if(m)return;var J=v.namePrefix||"";function Y(){f&&Ka(w,Va(J+"locationchange"))}function be(){if(R&&(x=R),R=U&&U[fs]||"",I[ze]&&I[ze][un]&&(R=lr(R,I[ze][un])),f){var ke=D();if(ke){ke.setTraceId(Xr());var Te="_unknown_";U&&U.pathname&&(Te=U.pathname+(U.hash||"")),ke.setName(ht(I[Xt](),Te))}pn((function(Ue){I[tu]({refUri:Ue,properties:{duration:0}})}).bind(I,x),I.autoRoutePVDelay)}}j(Pc(y,"pushState",{ns:q,rsp:function(){f&&(Ka(w,Va(J+"pushState")),Ka(w,Va(J+"locationchange")))}},!0)),j(Pc(y,"replaceState",{ns:q,rsp:function(){f&&(Ka(w,Va(J+"replaceState")),Ka(w,Va(J+"locationchange")))}},!0)),yr(w,J+"popstate",Y,q),yr(w,J+"locationchange",be,q),m=!0}function me(w,y){I[xo](at(v,function(){g=v[p_]===!0,h=h||v[th],g&&!p&&(j(Pc(w,"onunhandledrejection",{ns:q,rsp:function(U,J){g&&U.rslt!==!0&&I._onerror(Ht[Ff](Uk(J),y?y[fs]:"",0,0,J,U.evt))}},!1)),A++,v[th]=p=!0)}))}function oe(w,y,U,J,Y){I[Xt]().throwInternal(w,y,U,J,Y)}function H(){r=null,i=null,o=null,a=null,s=null,c=null,u=!1,l=!1,f=!1,m=!1,d=!1,h=!1,g=!1,p=!1,b=!1,K();var w=Fn();x=w&&w[fs]||"",I[ze]&&I[ze][un]&&(x=lr(x,I[ze][un])),R=null,q=null,v=null,A=0,Re(I,"config",{g:function(){return v}})}Re(I,"_pageViewManager",{g:function(){return o}}),Re(I,"_pageViewPerformanceManager",{g:function(){return a}}),Re(I,"_pageVisitTimeManager",{g:function(){return s}}),Re(I,"_evtNamespace",{g:function(){return"."+q}})}),n}return e.Version="3.3.11",e})(ho),iu="featureOptIn",__="scheduleFetchTimeout";function b_(t,e,n,r){try{var i=n>r;i&&(t=null);var o=n==0?Gw({},t):t;return o&&e&&!i&&Pe(o,function(a){var s=e[a];s&&(Bt(o[a])&&Bt(s)?o[a]=b_(o[a],s,++n,r):delete o[a])}),o}catch{}return t}var ya="featureOptIn.",w_=".mode",C_=".onCfg",S_=".offCfg";function Wk(t,e,n){var r;if(!e||!e.enabled)return null;var i=(e[iu]||{})[t]||{mode:1},o=i.mode,a=i.onCfg,s=i.offCfg,c=(n||{})[t]||{mode:2},u=c.mode,l=c.onCfg,f=c.offCfg,m=!!c.blockCdnCfg,d=ya+t+w_,h=ya+t+C_,g=ya+t+S_,p=u,v=l,b=f;return m||(o===4||o===5?(p=o==4?3:2,v=a||l,b=s||f):o===2||u===2?(p=2,v=l||a,b=f||s):o===3?(p=3,v=l||a,b=f||s):o===1&&u===1&&(p=1)),r={},r[d]=p,r[h]=v,r[g]=b,r}function Ok(t,e){try{if(!t||!t.enabled)return null;if(!t[iu])return t.config;var n=t[iu],r=t.config||{};return Pe(n,function(i){var o=Wk(i,t,e.config[iu]);B(o)||(Pe(o,function(a,s){Jm(r,a,s)}),Fk(i,o,r))}),r}catch{}return null}function Fk(t,e,n){var r=e[ya+t+w_],i=e[ya+t+C_],o=e[ya+t+S_],a=null;r===3&&(a=i),r===2&&(a=o),a&&Pe(a,function(s,c){Jm(n,s,c)})}var Xa,Hk="ai_cfgsync",Iv="GET",qk=18e5,Po=void 0,Vk={instrumentationKey:!0,connectionString:!0,endpointUrl:!0},Bk=Ra((Xa={syncMode:1,blkCdnCfg:Po,customEvtName:Po,cfgUrl:Po,overrideSyncFn:Po,overrideFetchFn:Po,onCfgChangeReceive:Po},Xa[__]=qk,Xa.nonOverrideConfigs=Vk,Xa.enableAjax=!1,Xa)),Kk=(function(t){tr(e,t);function e(){var n=t.call(this)||this;n.priority=198,n.identifier="AppInsightsCfgSyncPlugin";var r,i,o,a,s,c,u,l,f,m,d,h,g,p,v,b,P=!1,x;return He(e,n,function(R,q){A(),R.initialize=function(H,w,y,U){q.initialize(H,w,y,U),a=ci(gn(R.identifier),w.evtNamespace&&w.evtNamespace()),I(H)},R.getCfg=function(){return i},R.pause=function(){P=!0,oe()},R.resume=function(){P=!1,me()},R.setCfg=function(H){return W(H)},R.sync=function(H){return K(H)},R.updateEventListenerName=function(H){return re(H)},R._doTeardown=function(H,w){j(),oe(),A()},R._getDbgPlgTargets=function(){return[l,u,o,f,g]};function A(){i=null,o=null,a=null,s=null,u=null,l=null,g=null,c=null,m=null,d=null,f=null,x=!1,v=null,b=null,h=null}function I(H){var w=R.identifier,y=R.core;R._addHook(at(H,function(){var U=Rn(null,H,y);r=U.getExtCfg(w,Bk);var J=f;f=!!r.blkCdnCfg,x=!!r.enableAjax,!B(J)&&J!==f&&(!f&&s?p&&p(s,V,l):oe()),B(u)&&(u=r.syncMode===2),B(l)&&(l=r.syncMode===1);var Y=r.customEvtName||Hk;o!==Y&&(u?re(Y):(j(),o=Y)),B(s)&&(s=r.cfgUrl),s||(i=H,l&&K())})),b=r.overrideSyncFn,v=r.overrideFetchFn,h=r.onCfgChangeReceive,g=r.nonOverrideConfigs,m=r[__],p=ae(),d=0,s&&!f&&p&&p(s,V,l)}function W(H,w){if(H){if(i=H,w&&!P)return K();if(u&&!P)return R.core.updateCfg(H),!0}return!1}function j(){try{var H=dn();H&&da(H,null,null,a)}catch{}}function K(H){try{return b&&pe(b)?b(i,H):rS(o,i,H)}catch{}return!1}function re(H){try{return j(),H&&(o=H,D()),!0}catch{}return!1}function ae(){var H=v;return B(H)&&(yp()?H=_:Il()&&(H=E)),H}function _(H,w,y){var U=dn(),J=U&&U.fetch||null;if(H&&J&&pe(J))try{var Y={method:Iv};x||(Y[Li]=!0);var be=new Request(H,Y);if(!x)try{be[Li]=!0}catch{}Vt(fetch(be),function(ke){var Te=ke.value;ke.rejected?M(w,400):Te.ok?Vt(Te.text(),function(Ue){M(w,Te.status,Ue.value,y)}):M(w,Te.status,null,y)})}catch{}}function E(H,w,y){try{var U=new XMLHttpRequest;x||(U[Li]=!0),U.open(Iv,H),U.onreadystatechange=function(){U.readyState===XMLHttpRequest.DONE&&M(w,U.status,U.responseText,y)},U.onerror=function(){M(w,400)},U.ontimeout=function(){M(w,400)},U.send()}catch{}}function V(H,w,y){try{if(H>=200&&H<400&&w){d=0;var U=Dn();if(U){var J=U.parse(w),Y=Ok(J,R.core),be=Y&&Nt(Y)&&ce(Y);be&&W(be,y)}}else d++;d<3&&me()}catch{}}function M(H,w,y,U){try{H(w,y,U)}catch{}}function D(){if(u){var H=dn();if(H)try{yr(H,o,function(w){var y=w&&w.detail;if(h&&y)h(y);else{var U=y&&y.cfg,J=U&&Nt(U)&&ce(U);J&&W(J)}},a,!0)}catch{}}}function ce(H,w){var y=null;try{H&&(y=b_(H,g,0,5))}catch{}return y}function me(){!c&&m&&(c=pn(function(){c=null,p(s,V,l)},m),c.unref())}function oe(){c&&c.cancel(),c=null,d=0}R.processTelemetry=function(H,w){R.processNext(H,w)}}),n}return e.__ieDyn=1,e})(ho),wi="duration",wt="tags",qf="deviceType",en="data",Tr="name",Ys="traceID",xe="length",ec="stringify",mo="measurements",Kn="dataType",yo="envelopeType",Ci="toString",Qi="enqueue",Zi="count",wr="push",oh="emitLineDelimitedJson",_a="clear",il="markAsSent",Ps="clearSent",Wp="bufferOverride",Ja="BUFFER_KEY",Ur="SENT_BUFFER_KEY",Oo="concat",Ga="MAX_BUFFER_SIZE",Qa="triggerSend",Et="diagLog",Vf="initialize",Za="_sender",Ya="endpointUrl",hs="instrumentationKey",ah="customHeaders",I_="maxBatchSizeInBytes",sh="onunloadDisableBeacon",ch="isBeaconApiDisabled",k_="alwaysUseXhrOverride",T_="enableSessionStorageBuffer",zn="_buffer",E_="onunloadDisableFetch",x_="disableSendBeaconSplit",Mc="getSenderInst",mi="_onError",Bf="_onPartialSuccess",zc="_onSuccess",Kf="itemsReceived",Xf="itemsAccepted",Jf="baseType",ol="sampleRate",Xk="getHashCodeScore",Gf="baseType",Ye="baseData",yt="properties",kv="true";function st(t,e,n){return Oe(t,e,n,wu)}function Jk(t,e,n){var r=n[wt]=n[wt]||{},i=e.ext=e.ext||{},o=e[wt]=e[wt]||[],a=i.user;a&&(st(r,Be.userAuthUserId,a.authId),st(r,Be.userId,a.id||a.localId));var s=i.app;s&&st(r,Be.sessionId,s.sesId);var c=i.device;c&&(st(r,Be.deviceId,c.id||c.localId),st(r,Be[qf],c.deviceClass),st(r,Be.deviceIp,c.ip),st(r,Be.deviceModel,c.model),st(r,Be[qf],c[qf]));var u=e.ext.web;if(u){st(r,Be.deviceLanguage,u.browserLang),st(r,Be.deviceBrowserVersion,u.browserVer),st(r,Be.deviceBrowser,u.browser);var l=n[en]=n[en]||{},f=l[Ye]=l[Ye]||{},m=f[yt]=f[yt]||{};st(m,"domain",u.domain),st(m,"isManual",u.isManual?kv:null),st(m,"screenRes",u.screenRes),st(m,"userConsent",u.userConsent?kv:null)}var d=i.os;d&&(st(r,Be.deviceOS,d[Tr]),st(r,Be.deviceOSVersion,d.osVer));var h=i.trace;h&&(st(r,Be.operationParentId,h.parentID),st(r,Be.operationName,ht(t,h[Tr])),st(r,Be.operationId,h[Ys]));for(var g={},p=o[xe]-1;p>=0;p--){var v=o[p];Pe(v,function(P,x){g[P]=x}),o.splice(p,1)}Pe(o,function(P,x){g[P]=x});var b=$t($t({},r),g);b[Be.internalSdkVersion]||(b[Be.internalSdkVersion]=ht(t,"javascript:".concat(Gk.Version),64)),n[wt]=ly(b)}function ai(t,e,n){B(t)||Pe(t,function(r,i){oc(i)?n[r]=i:de(i)?e[r]=i:cc()&&(e[r]=Dn()[ec](i))})}function _o(t,e){B(t)||Pe(t,function(n,r){t[n]=r||e})}function bo(t,e,n,r){var i=new JI(t,r,e);st(i,"sampleRate",n[Vy]),(n[Ye]||{}).startTime&&(i.time=ka(n[Ye].startTime)),i.iKey=n.iKey;var o=n.iKey.replace(/-/g,"");return i[Tr]=i[Tr].replace("{0}",o),Jk(t,n,i),n[wt]=n[wt]||[],ly(i)}function wo(t,e){B(e[Ye])&&G(t,1,46,"telemetryItem.baseData cannot be null.")}var Gk={Version:"3.3.11"};function Qk(t,e,n){wo(t,e);var r=e[Ye][mo]||{},i=e[Ye][yt]||{};ai(e[en],i,r),B(n)||_o(i,n);var o=e[Ye];if(B(o))return Ki(t,"Invalid input for dependency data"),null;var a=o[yt]&&o[yt][av]?o[yt][av]:"GET",s=new Gi(t,o.id,o.target,o[Tr],o[wi],o.success,o.responseCode,a,o.type,o.correlationContext,i,r),c=new vo(Gi[Kn],s);return bo(t,Gi[yo],e,c)}function P_(t,e,n){wo(t,e);var r={},i={};e[Gf]!==fr[Kn]&&(r.baseTypeSource=e[Gf]),e[Gf]===fr[Kn]?(r=e[Ye][yt]||{},i=e[Ye][mo]||{}):e[Ye]&&ai(e[Ye],r,i),ai(e[en],r,i),B(n)||_o(r,n);var o=e[Ye][Tr],a=new fr(t,o,r,i),s=new vo(fr[Kn],a);return bo(t,fr[yo],e,s)}function Zk(t,e,n){wo(t,e);var r=e[Ye][mo]||{},i=e[Ye][yt]||{};ai(e[en],i,r),B(n)||_o(i,n);var o=e[Ye],a=Ht.CreateFromInterface(t,o,i,r),s=new vo(Ht[Kn],a);return bo(t,Ht[yo],e,s)}function Yk(t,e,n){wo(t,e);var r=e[Ye],i=r[yt]||{},o=r[mo]||{};ai(e[en],i,o),B(n)||_o(i,n);var a=new Ji(t,r[Tr],r.average,r.sampleCount,r.min,r.max,r.stdDev,i,o),s=new vo(Ji[Kn],a);return bo(t,Ji[yo],e,s)}function eT(t,e,n){wo(t,e);var r,i=e[Ye];!B(i)&&!B(i[yt])&&!B(i[yt][wi])?(r=i[yt][wi],delete i[yt][wi]):!B(e[en])&&!B(e[en][wi])&&(r=e[en][wi],delete e[en][wi]);var o=e[Ye],a;((e.ext||{}).trace||{})[Ys]&&(a=e.ext.trace[Ys]);var s=o.id||a,c=o[Tr],u=o.uri,l=o[yt]||{},f=o[mo]||{};if(B(o.refUri)||(l.refUri=o.refUri),B(o.pageType)||(l.pageType=o.pageType),B(o.isLoggedIn)||(l.isLoggedIn=o.isLoggedIn[Ci]()),!B(o[yt])){var m=o[yt];Pe(m,function(g,p){l[g]=p})}ai(e[en],l,f),B(n)||_o(l,n);var d=new ni(t,c,u,r,l,f,s),h=new vo(ni[Kn],d);return bo(t,ni[yo],e,h)}function tT(t,e,n){wo(t,e);var r=e[Ye],i=r[Tr],o=r.uri||r.url,a=r[yt]||{},s=r[mo]||{};ai(e[en],a,s),B(n)||_o(a,n);var c=new ma(t,i,o,void 0,a,s,r),u=new vo(ma[Kn],c);return bo(t,ma[yo],e,u)}function nT(t,e,n){wo(t,e);var r=e[Ye].message,i=e[Ye].severityLevel,o=e[Ye][yt]||{},a=e[Ye][mo]||{};ai(e[en],o,a),B(n)||_o(o,n);var s=new va(t,r,i,o,a),c=new vo(va[Kn],s);return bo(t,va[yo],e,c)}var D_=(function(){function t(e,n){var r=[],i=!1,o=n.maxRetryCnt;this._get=function(){return r},this._set=function(a){return r=a,r},He(t,this,function(a){a[Qi]=function(s){if(a[Zi]()>=n.eventsLimitInMem){i||(G(e,2,105,"Maximum in-memory buffer size reached: "+a[Zi](),!0),i=!0);return}s.cnt=s.cnt||0,!(!B(o)&&s.cnt>o)&&r[wr](s)},a[Zi]=function(){return r[xe]},a.size=function(){for(var s=r[xe],c=0;c<r[xe];c++)s+=r[c].item[xe];return n[oh]||(s+=2),s},a[_a]=function(){r=[],i=!1},a.getItems=function(){return r.slice(0)},a.batchPayloads=function(s){if(s&&s[xe]>0){var c=[];ee(s,function(l){c[wr](l.item)});var u=n[oh]?c.join(`
|
|
13
|
-
`):"["+c.join(",")+"]";return u}return null},
|
|
14
|
-
`,{name:s},!0);else{c=[];for(var u=0;u<a[xe];u++){var l=a[u],f=r(l,s+"["+u+"]");c[wr](f)}}return c}function o(a,s,c){var u;return a&&(u={},Pe(a,function(l,f){if(s==="string")f===void 0?u[l]="undefined":f===null?u[l]="null":f[Ci]?u[l]=f[Ci]():u[l]="invalid field: toString() is not defined.";else if(s==="number")if(f===void 0)u[l]="undefined";else if(f===null)u[l]="null";else{var m=parseFloat(f);u[l]=m}else u[l]="invalid field: "+c+" is of unknown type.",G(e,1,u[l],null,!0)})),u}})}return t.__ieDyn=1,t})(),oT=8,aT=(function(){function t(){}return t.prototype.getHashCodeScore=function(e){var n=this.getHashCode(e)/t.INT_MAX_VALUE;return n*100},t.prototype.getHashCode=function(e){if(e==="")return 0;for(;e[xe]<oT;)e=e[Oo](e);for(var n=5381,r=0;r<e[xe];++r)n=(n<<5)+n+e.charCodeAt(r),n=n&n;return Math.abs(n)},t.INT_MAX_VALUE=2147483647,t})(),sT=(function(){function t(){var e=this,n=new aT,r=new u_;e.getSamplingScore=function(i){var o=0;return i[wt]&&i[wt][r.userId]?o=n.getHashCodeScore(i[wt][r.userId]):i.ext&&i.ext.user&&i.ext.user.id?o=n[Xk](i.ext.user.id):i[wt]&&i[wt][r.operationId]?o=n.getHashCodeScore(i[wt][r.operationId]):i.ext&&i.ext.telemetryTrace&&i.ext.telemetryTrace[Ys]?o=n.getHashCodeScore(i.ext.telemetryTrace[Ys]):o=Math.random()*100,o}}return t})(),cT=(function(){function t(e,n){this.INT_MAX_VALUE=2147483647;var r=n||fo(null);(e>100||e<0)&&(r.throwInternal(2,58,"Sampling rate is out of range (0..100). Sampling will be disabled, you may be sending too much data which may affect your AI service level.",{samplingRate:e},!0),e=100),this[ol]=e,this.samplingScoreGenerator=new sT}return t.prototype.isSampledIn=function(e){var n=this[ol],r=!1;return n==null||n>=100||e.baseType===Ji[Kn]?!0:(r=this.samplingScoreGenerator.getSamplingScore(e)<n,r)},t})(),Ve,or,wn=void 0,Tv="",uT=65e3;function Ev(t){try{return t.responseText}catch{}return null}function lT(t){return t&&t.sendPOST}var xv=Ra((Ve={endpointUrl:Hu(wu,Rp+ha)},Ve[oh]=lt(),Ve.maxBatchInterval=15e3,Ve[I_]=102400,Ve.disableTelemetry=lt(),Ve[T_]=lt(!0),Ve.isRetryDisabled=lt(),Ve[ch]=lt(!0),Ve[x_]=lt(!0),Ve.disableXhr=lt(),Ve[E_]=lt(),Ve[sh]=lt(),Ve[hs]=wn,Ve.namePrefix=wn,Ve.samplingPercentage=Hu(fT,100),Ve[ah]=wn,Ve.convertUndefined=wn,Ve.eventsLimitInMem=1e4,Ve[Wp]=!1,Ve.httpXHROverride={isVal:lT,v:wn},Ve[k_]=lt(),Ve.transports=wn,Ve.retryCodes=wn,Ve.corsPolicy=wn,Ve.maxRetryCnt={isVal:oc,v:10},Ve)),Pv="X-Set-Cross-Origin-Resource-Policy";function fT(t){return!isNaN(t)&&t>0&&t<=100}var dT=(or={},or[fr.dataType]=P_,or[va.dataType]=nT,or[ni.dataType]=eT,or[ma.dataType]=tT,or[Ht.dataType]=Zk,or[Ji.dataType]=Yk,or[Gi.dataType]=Qk,or),hT=(function(t){tr(e,t);function e(){var n=t.call(this)||this;n.priority=1001,n.identifier=l_;var r,i,o,a,s,c,u,l,f=0,m,d,h,g,p,v,b,P,x,R,q,A,I,W,j,K,re,ae,_,E,V,M,D,ce,me,oe,H,w;return He(e,n,function(y,U){dc(),y.pause=function(){_t(),a=!0},y.resume=function(){a&&(a=!1,i=null,z(),qe())},y.flush=function(T,L,Q){if(T===void 0&&(T=!0),!a){_t();try{var se=y[Qa](T,null,Q||1);return Vt(se,function(ge){return L?(L(!ge.rejected),!0):T?Jn(function(ve){ve(!ge.rejected)}):se})}catch(ge){G(y[Et](),1,22,"flush failed, telemetry will not be collected: "+Ne(ge),{exception:te(ge)})}}},y.onunloadFlush=function(){if(!a)if(b||E)try{return y[Qa](!0,X,2)}catch(T){G(y[Et](),1,20,"failed to flush with beacon sender on page unload, telemetry will not be collected: "+Ne(T),{exception:te(T)})}else y.flush(!1)},y.addHeader=function(T,L){l[T]=L},y[Vf]=function(T,L,Q,se){y.isInitialized()&&G(y[Et](),1,28,"Sender is already initialized"),U[Vf](T,L,Q,se);var ge=y.identifier;c=new iT(L.logger),r=0,i=null,o=0,y[Za]=null,u=0;var ve=y[Et]();h=ci(gn("Sender"),L.evtNamespace&&L.evtNamespace()),d=bk(h),y._addHook(at(T,function(Me){var Je=Me.cfg;Je.storagePrefix&&$p(Je.storagePrefix);var Wt=Rn(null,Je,L),Ce=Wt.getExtCfg(ge,xv),za=Ce[Ya];if(g&&za===g){var rr=Je[Ya];rr&&rr!==za&&(Ce[Ya]=rr)}var Ua=et("CompressionStream");w=Jc("zipPayload",Je,!1),pe(Ua)||(w=!1);var li=Ce.corsPolicy;li?(li==="same-origin"||li==="same-site"||li==="cross-origin")&&n.addHeader(Pv,li):delete l[Pv],ii(Ce[hs])&&(Ce[hs]=Je[hs]),Re(y,"_senderConfig",{g:function(){return Ce}}),p!==Ce[Ya]&&(g=p=Ce[Ya]),L.activeStatus()===Or.PENDING?y.pause():L.activeStatus()===Or.ACTIVE&&y.resume(),R&&R!==Ce[ah]&&ee(R,function(bt){delete l[bt.header]}),v=Ce[I_],b=(Ce[sh]===!1||Ce[ch]===!1)&&as(),P=Ce[sh]===!1&&as(),x=Ce[ch]===!1&&as(),E=Ce[k_],V=!!Ce.disableXhr,H=Ce.retryCodes;var zl=Ce[Wp],So=!!Ce[T_]&&(!!zl||Gs()),Fp=Ce.namePrefix,m0=So!==K||So&&ae!==Fp||So&&re!==zl;if(y[zn]){if(m0)try{y[zn]=y[zn].createNew(ve,Ce,So)}catch(bt){G(y[Et](),1,12,"failed to transfer telemetry to different buffer storage, telemetry will be lost: "+Ne(bt),{exception:te(bt)})}z()}else y[zn]=So?new R_(ve,Ce):new Op(ve,Ce);ae=Fp,K=So,re=zl,M=!Ce[E_]&&yp(!0),me=!!Ce[x_],y._sample=new cT(Ce.samplingPercentage,ve),A=Ce[hs],!ii(A)&&!Co(A,Je)&&G(ve,1,100,"Invalid Instrumentation key "+A),R=Ce[ah],de(g)&&!Kd(g)&&R&&R[xe]>0?ee(R,function(bt){n.addHeader(bt.header,bt.value)}):R=null,_=Ce.enableSendPromise;var Hp=Y();oe?oe.SetConfig(Hp):(oe=new gI,oe[Vf](Hp,ve));var hc=Ce.httpXHROverride,pc=null,Na=null,y0=Tg([3,1,2],Ce.transports);pc=oe&&oe[Mc](y0,!1);var Ul=oe&&oe.getFallbackInst();D=function(bt,fi){return ue(Ul,bt,fi)},ce=function(bt,fi){return ue(Ul,bt,fi,!1)},pc=E?hc:pc||hc||Ul,y[Za]=function(bt,fi){return ue(pc,bt,fi)},M&&(m=Ie);var Nl=Tg([3,1],Ce.unloadTransports);M||(Nl=Nl.filter(function(bt){return bt!==2})),Na=oe&&oe[Mc](Nl,!0),Na=E?hc:Na||hc,(E||Ce.unloadTransports||!m)&&Na&&(m=function(bt,fi){return ue(Na,bt,fi)}),m||(m=D),q=Ce.disableTelemetry,I=Ce.convertUndefined||wn,W=Ce.isRetryDisabled,j=Ce.maxBatchInterval}))},y.processTelemetry=function(T,L){L=y._getTelCtx(L);var Q=L[Et]();try{var se=je(T,Q);if(!se)return;var ge=We(T,Q);if(!ge)return;var ve=c.serialize(ge),Me=y[zn];z(ve);var Je={item:ve,cnt:0};Me[Qi](Je),qe()}catch(Wt){G(Q,2,12,"Failed adding telemetry to the sender's buffer, some telemetry will be lost: "+Ne(Wt),{exception:te(Wt)})}y.processNext(T,L)},y.isCompletelyIdle=function(){return!a&&f===0&&y._buffer[Zi]()===0},y.getOfflineListener=function(){return d},y._xhrReadyStateChange=function(T,L,Q){if(!le(L))return be(T,L,Q)},y[Qa]=function(T,L,Q){T===void 0&&(T=!0);var se;if(!a)try{var ge=y[zn];if(q)ge[_a]();else{if(ge[Zi]()>0){var ve=ge.getItems();jt(Q||0,T),L?se=L.call(y,ve,T):se=y[Za](ve,T)}o=+new Date}_t()}catch(Je){var Me=vy();(!Me||Me>9)&&G(y[Et](),1,40,"Telemetry transmission failed, some telemetry will be lost: "+Ne(Je),{exception:te(Je)})}return se},y.getOfflineSupport=function(){return{getUrl:function(){return g},createPayload:sn,serialize:Tt,batch:nr,shouldProcess:function(T){return!!je(T)}}},y._doTeardown=function(T,L){y.onunloadFlush(),ea(d,!1),dc()},y[mi]=function(T,L,Q){if(!le(T))return ke(T,L)},y[Bf]=function(T,L){if(!le(T))return Te(T,L)},y[zc]=function(T,L){if(!le(T))return Ue(T)},y._xdrOnLoad=function(T,L){if(!le(L))return J(T,L)};function J(T,L){var Q=Ev(T);if(T&&(Q+""=="200"||Q===""))r=0,y[zc](L,0);else{var se=xf(Q);se&&se[Kf]&&se[Kf]>se[Xf]&&!W?y[Bf](L,se):y[mi](L,dy(T))}}function Y(){try{var T={xdrOnComplete:function(Q,se,ge){var ve=kt(ge);if(ve)return J(Q,ve)},fetchOnComplete:function(Q,se,ge,ve){var Me=kt(ve);if(Me)return F(Q.status,Me,Q.url,Me[xe],Q.statusText,ge||"")},xhrOnComplete:function(Q,se,ge){var ve=kt(ge);if(ve)return be(Q,ve,ve[xe])},beaconOnRetry:function(Q,se,ge){return ie(Q,se,ge)}},L={enableSendPromise:_,isOneDs:!1,disableCredentials:!1,disableXhr:V,disableBeacon:!x,disableBeaconSync:!P,senderOnCompleteCallBack:T};return L}catch{}return null}function be(T,L,Q){T.readyState===4&&F(T.status,L,T.responseURL,Q,Wu(T),Ev(T)||T.response)}function ke(T,L,Q){G(y[Et](),2,26,"Failed to send telemetry.",{message:L}),y._buffer&&y._buffer[Ps](T)}function Te(T,L){for(var Q=[],se=[],ge=L.errors.reverse(),ve=0,Me=ge;ve<Me.length;ve++){var Je=Me[ve],Wt=T.splice(Je.index,1)[0];An(Je.statusCode)?se[wr](Wt):Q[wr](Wt)}T[xe]>0&&y[zc](T,L[Xf]),Q[xe]>0&&y[mi](Q,Wu(null,["partial success",L[Xf],"of",L.itemsReceived].join(" "))),se[xe]>0&&(ye(se),G(y[Et](),2,40,"Partial success. Delivered: "+T[xe]+", Failed: "+Q[xe]+". Will retry to send "+se[xe]+" our of "+L[Kf]+" items"))}function Ue(T,L){y._buffer&&y._buffer[Ps](T)}function kt(T){try{if(T){var L=T,Q=L.oriPayload;return Q&&Q[xe]?Q:null}}catch{}return null}function je(T,L){if(q)return!1;if(!T)return L&&G(L,1,7,"Cannot send empty telemetry"),!1;if(T.baseData&&!T[Jf])return L&&G(L,1,70,"Cannot send telemetry without baseData and baseType"),!1;if(T[Jf]||(T[Jf]="EventData"),!y[Za])return L&&G(L,1,28,"Sender was not initialized"),!1;if($(T))T[Vy]=y._sample[ol];else return L&&G(L,2,33,"Telemetry item was sampled out and not sent",{SampleRate:y._sample[ol]}),!1;return!0}function We(T,L){var Q=T.iKey||A,se=e.constructEnvelope(T,Q,L,I);if(!se){G(L,1,47,"Unable to create an AppInsights envelope");return}var ge=!1;if(T[wt]&&T[wt][Rf]&&(ee(T[wt][Rf],function(ve){try{ve&&ve(se)===!1&&(ge=!0,Ki(L,"Telemetry processor check returns false"))}catch(Me){G(L,1,64,"One of telemetry initializers failed, telemetry item will not be sent: "+Ne(Me),{exception:te(Me)},!0)}}),delete T[wt][Rf]),!ge)return se}function Tt(T){var L=Tv,Q=y[Et]();try{var se=je(T,Q),ge=null;se&&(ge=We(T,Q)),ge&&(L=c.serialize(ge))}catch{}return L}function nr(T){var L=Tv;return T&&T[xe]&&(L="["+T.join(",")+"]"),L}function sn(T){var L=C();return{urlString:g,data:T,headers:L}}function $(T){return y._sample.isSampledIn(T)}function Z(T,L,Q,se){L===200&&T?y._onSuccess(T,T[xe]):se&&y[mi](T,se)}function ue(T,L,Q,se){se===void 0&&(se=!0);var ge=function(rr,Ua,li){return Z(L,rr,Ua,li)},ve=ne(L),Me=T&&T.sendPOST;if(Me&&ve){se&&y._buffer[il](L);var Je,Wt=!1,Ce,za;return oe.preparePayload(function(rr){Je=Me(rr,ge,!Q),Wt=!0,Ce&&mp(Je,Ce,za)},w,ve,!Q),Wt?Je:Jn(function(rr,Ua){Ce=rr,za=Ua})}return null}function ne(T){if(we(T)&&T[xe]>0){var L=y[zn].batchPayloads(T),Q=C(),se={data:L,urlString:g,headers:Q,disableXhrSync:V,disableFetchKeepAlive:!M,oriPayload:T};return se}return null}function C(){try{var T=l||{};return Kd(g)&&(T[Le[6]]=Le[7]),T}catch{}return null}function z(T){var L=T?T[xe]:0;return y[zn].size()+L>v?((!d||d.isOnline())&&y[Qa](!0,null,10),!0):!1}function F(T,L,Q,se,ge,ve){var Me=null;if(y._appId||(Me=xf(ve),Me&&Me.appId&&(y._appId=Me.appId)),(T<200||T>=300)&&T!==0){if((T===301||T===307||T===308)&&!O(Q)){y[mi](L,ge);return}if(d&&!d.isOnline()){if(!W){var Je=10;ye(L,Je),G(y[Et](),2,40,". Offline - Response Code: ".concat(T,". Offline status: ").concat(!d.isOnline(),". Will retry to send ").concat(L.length," items."))}return}!W&&An(T)?(ye(L),G(y[Et](),2,40,". Response code "+T+". Will retry to send "+L[xe]+" items.")):y[mi](L,ge)}else O(Q),T===206?(Me||(Me=xf(ve)),Me&&!W?y[Bf](L,Me):y[mi](L,ge)):(r=0,y[zc](L,se))}function O(T){return u>=10?!1:!B(T)&&T!==""&&T!==g?(g=T,++u,!0):!1}function X(T,L){if(m)m(T,!1);else{var Q=oe&&oe[Mc]([3],!0);return ue(Q,T,L)}}function ie(T,L,Q){var se=T,ge=se&&se.oriPayload;if(me)ce&&ce(ge,!0),G(y[Et](),2,40,". Failed to send telemetry with Beacon API, retried with normal sender.");else{for(var ve=[],Me=0;Me<ge[xe];Me++){var Je=ge[Me],Wt=[Je],Ce=ne(Wt);Q(Ce,L)?y._onSuccess(Wt,Wt[xe]):ve[wr](Je)}ve[xe]>0&&(ce&&ce(ve,!0),G(y[Et](),2,40,". Failed to send telemetry with Beacon API, retried with normal sender."))}}function le(T){try{if(T&&T[xe])return de(T[0])}catch{}return null}function Ie(T,L){var Q=null;if(we(T)){for(var se=T[xe],ge=0;ge<T[xe];ge++)se+=T[ge].item[xe];var ve=oe.getSyncFetchPayload();ve+se<=uT?Q=2:as()?Q=3:(Q=1,G(y[Et](),2,40,". Failed to send telemetry with Beacon API, retried with xhrSender."));var Me=oe&&oe[Mc]([Q],!0);return ue(Me,T,L)}return null}function ye(T,L){if(L===void 0&&(L=1),!(!T||T[xe]===0)){var Q=y[zn];Q[Ps](T),r++;for(var se=0,ge=T;se<ge.length;se++){var ve=ge[se];ve.cnt=ve.cnt||0,ve.cnt++,Q[Qi](ve)}$e(L),qe()}}function $e(T){var L=10,Q;if(r<=1)Q=L;else{var se=(Math.pow(2,r)-1)/2,ge=on(Math.random()*se*L)+1;ge=T*ge,Q=ks(Nm(ge,3600),L)}var ve=Pn()+Q*1e3;i=ve}function qe(){if(!s&&!a){var T=i?ks(0,i-Pn()):0,L=ks(j,T);s=pn(function(){s=null,y[Qa](!0,null,1)},L)}}function _t(){s&&s.cancel(),s=null,i=null}function An(T){return B(H)?T===401||T===408||T===429||T===500||T===502||T===503||T===504:H[xe]&&H.indexOf(T)>-1}function Mn(){var T="getNotifyMgr",L,Q=y.core;return Q&&(Q[T]?L=Q[T]():L=Q._notificationManager),L}function jt(T,L){var Q=Mn();if(Q&&Q.eventsSendRequest)try{Q.eventsSendRequest(T,L)}catch(se){G(y[Et](),1,74,"send request notification failed: "+Ne(se),{exception:te(se)})}}function Co(T,L){var Q=L.disableInstrumentationKeyValidation,se=B(Q)?!1:Q;if(se)return!0;var ge="^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",ve=new RegExp(ge);return ve.test(T)}function dc(){y[Za]=null,y[zn]=null,y._appId=null,y._sample=null,l={},d=null,r=0,i=null,o=null,a=!1,s=null,c=null,u=0,f=0,m=null,h=null,g=null,p=null,v=0,b=!1,R=null,q=!1,A=null,I=wn,W=!1,K=null,ae=wn,V=!1,M=!1,me=!1,D=null,ce=null,oe=null,Re(y,"_senderConfig",{g:function(){return fy({},xv)}})}}),n}return e.constructEnvelope=function(n,r,i,o){var a;r!==n.iKey&&!B(r)?a=$t($t({},n),{iKey:r}):a=n;var s=dT[a.baseType]||P_;return s(i,a,o)},e})(ho),Dv="duration",Pa="properties",kn="requestUrl",ji="length",Jr="traceID",Gr="spanID",En="traceFlags",Ds="context",ba="aborted",Uc="_addHook",Jt="core",Qf="includeCorrelationHeaders",uh="getAbsoluteUrl",yi="headers",ln="requestHeaders",Zf="setRequestHeader",Rv="trackDependencyDataInternal",na="startTime",Do="toLowerCase",lh="enableRequestHeaderTracking",A_="enableAjaxErrorStatusText",M_="enableAjaxPerfTracking",z_="maxAjaxCallsPerView",U_="excludeRequestFromAutoTrackingPatterns",fh="disableAjaxTracking",N_="ajaxPerfLookupDelay",$_="disableFetchTracking",L_="enableResponseHeaderTracking",In="status",Ri="statusText",al="headerMap",Wi="requestSentTime",dh="getTraceId",hh="getTraceFlags",Kr="method",ph="errorStatusText",j_="stateChangeAttached",Av="responseText",ps="responseFinishedTime",gh="CreateTrackItem",Mv="getAllResponseHeaders",vh="getPartAProps",sl="perfMark",mh="perfTiming",yh="ajaxDiagnosticsMessage",_h="correlationContext",Yf="ajaxTotalDuration",ed="eventTraceCtx";function W_(t,e,n){var r=0,i=t[e],o=t[n];return i&&o&&(r=Ft(i,o)),r}function _i(t,e,n,r,i){var o=0,a=W_(n,r,i);return a&&(o=jr(t,e,Br(a))),o}function jr(t,e,n){var r="ajaxPerf",i=0;if(t&&e&&n){var o=t[r]=t[r]||{};o[e]=n,i=1}return i}function pT(t,e){var n=t[mh],r=e[Pa]||{},i=0,o="name",a="Start",s="End",c="domainLookup",u="connect",l="redirect",f="request",m="response",d="startTime",h=c+a,g=c+s,p=u+a,v=u+s,b=f+a,P=f+s,x=m+a,R=m+s,q=l+a,A=l=s,I="transferSize",W="encodedBodySize",j="decodedBodySize",K="serverTiming";if(n){i|=_i(r,l,n,q,A),i|=_i(r,c,n,h,g),i|=_i(r,u,n,p,v),i|=_i(r,f,n,b,P),i|=_i(r,m,n,x,R),i|=_i(r,"networkConnect",n,d,v),i|=_i(r,"sentRequest",n,b,R);var re=n[Dv];re||(re=W_(n,d,R)||0),i|=jr(r,Dv,re),i|=jr(r,"perfTotal",re);var ae=n[K];if(ae){var _={};ee(ae,function(E,V){var M=$u(E[o]||""+V),D=_[M]||{};Pe(E,function(ce,me){(ce!==o&&de(me)||oc(me))&&(D[ce]&&(me=D[ce]+";"+me),(me||!de(me))&&(D[ce]=me))}),_[M]=D}),i|=jr(r,K,_)}i|=jr(r,I,n[I]),i|=jr(r,W,n[W]),i|=jr(r,j,n[j])}else t[sl]&&(i|=jr(r,"missing",t.perfAttempts));i&&(e[Pa]=r)}var gT=(function(){function t(){var e=this;e.openDone=!1,e.setRequestHeaderDone=!1,e.sendDone=!1,e.abortDone=!1,e[j_]=!1}return t})(),zv=(function(){function t(e,n,r,i){var o=this,a=r,s="responseText";o[sl]=null,o.completed=!1,o.requestHeadersSize=null,o[ln]=null,o.responseReceivingDuration=null,o.callbackDuration=null,o[Yf]=null,o[ba]=0,o.pageUrl=null,o[kn]=null,o.requestSize=0,o[Kr]=null,o[In]=null,o[Wi]=null,o.responseStartedTime=null,o[ps]=null,o.callbackFinishedTime=null,o.endTime=null,o.xhrMonitoringState=new gT,o.clientFailure=0,o[Jr]=e,o[Gr]=n,o[En]=i==null?void 0:i.getTraceFlags(),i?o[ed]={traceId:i[dh](),spanId:i.getSpanId(),traceFlags:i[hh]()}:o[ed]=null,He(t,o,function(c){c.getAbsoluteUrl=function(){return c[kn]?UI(c[kn]):null},c.getPathName=function(){return c[kn]?Pl(a,NI(c[Kr],c[kn])):null},c[gh]=function(u,l,f){var m;if(c.ajaxTotalDuration=Gm(Ft(c.requestSentTime,c.responseFinishedTime)*1e3)/1e3,c[Yf]<0)return null;var d=(m={id:"|"+c[Jr]+"."+c[Gr],target:c[uh](),name:c.getPathName(),type:u,startTime:null,duration:c[Yf],success:+c[In]>=200&&+c[In]<400,responseCode:+c[In]},m[Pa]={HttpMethod:c[Kr]},m),h=d[Pa];if(c[ba]&&(h[ba]=!0),c[Wi]&&(d[na]=new Date,d[na].setTime(c[Wi])),pT(c,d),l&&vr(c.requestHeaders)[ji]>0&&(h[ln]=c[ln]),f){var g=f();if(g){var p=g[_h];if(p&&(d.correlationContext=p),g[al]&&vr(g.headerMap)[ji]>0&&(h.responseHeaders=g[al]),c[ph])if(c[In]>=400){var v=g.type;(v===""||v==="text")&&(h.responseText=g.responseText?g[Ri]+" - "+g[s]:g[Ri]),v==="json"&&(h.responseText=g.response?g[Ri]+" - "+JSON.stringify(g.response):g[Ri])}else c[In]===0&&(h.responseText=g[Ri]||"")}}return d},c[vh]=function(){var u=null,l=c[ed];if(l&&(l.traceId||l.spanId)){u={};var f=u[Gt.TraceExt]={traceID:l.traceId,parentID:l.spanId};B(l[En])||(f[En]=l[En])}return u}})}return t.__ieDyn=1,t})(),it,Rs="diagLog",ri="_ajaxData",Ai="fetch",es="Failed to monitor XMLHttpRequest",O_=", monitoring data for this ajax call ",Ro=O_+"may be incorrect.",Uv=O_+"won't be sent.",Nv="Failed to get Request-Context correlation header as it may be not included in the response or not accessible.",$v="Failed to add custom defined request context as configured call back may missing a null check.",Lv="Failed to calculate the duration of the ",jv=0;function vT(){var t=dn();return!t||B(t.Request)||B(t.Request[qn])||B(t[Ai])?null:t[Ai]}function mT(t,e){var n,r=!1;if(Il()){var i=XMLHttpRequest[qn];r=!B(i)&&!B(i.open)&&!B(i.send)&&!B(i.abort)}var o=vy();if(o&&o<9&&(r=!1),r)try{var a=new XMLHttpRequest,s={xh:[],i:(n={},n[e]={},n)};a[ri]=s;var c=XMLHttpRequest[qn].open;XMLHttpRequest[qn].open=c}catch(u){r=!1,As(t,15,"Failed to enable XMLHttpRequest monitoring, extension is not supported",{exception:te(u)})}return r}var Fo=function(t,e){return t&&e&&t[ri]?(t[ri].i||{})[e]:null},yT=function(t,e,n){if(t){var r=(t[ri]||{}).xh;r&&r.push({n:e,v:n})}},td=function(t,e){var n=!1;if(t){var r=(t[ri]||{}).xh;r&&ee(r,function(i){if(i.n===e)return n=!0,-1})}return n};function ou(t,e){var n="";try{var r=Fo(t,e);r&&r[kn]&&(n+="(url: '"+r[kn]+"')")}catch{}return n}function As(t,e,n,r,i){G(t[Rs](),1,e,n,r,i)}function ar(t,e,n,r,i){G(t[Rs](),2,e,n,r,i)}function ts(t,e,n){return function(r){var i;As(t,e,n,(i={},i[yh]=ou(r.inst,t._ajaxDataId),i.exception=te(r.err),i))}}function Ao(t,e){return t&&e?ot(t,e):-1}function Wv(t,e,n){var r={id:e,fn:n};return t.push(r),{remove:function(){ee(t,function(i,o){if(i.id===r.id)return t.splice(o,1),-1})}}}function F_(t,e,n,r){var i=!0;return ee(e,function(o,a){try{o.fn.call(null,n)===!1&&(i=!1)}catch(s){G(t&&t.logger,1,64,"Dependency "+r+" [#"+a+"] failed: "+Ne(s),{exception:te(s)},!0)}}),i}function _T(t,e,n,r,i,o){var a=t[ji],s=!0;if(a>0){var c={core:e,xhr:r,input:i,init:o,traceId:n[Jr],spanId:n[Gr],traceFlags:n[En],context:n[Ds]||{},aborted:!!n[ba]};s=F_(e,t,c,"listener"),n[Jr]=c.traceId,n[Gr]=c.spanId,n[En]=c[En],n[Ds]=c[Ds]}return s}var Nc="*.blob.core.",bT=xn([Nc+"windows.net",Nc+"chinacloudapi.cn",Nc+"cloudapi.de",Nc+"usgovcloudapi.net"]),wT=[/https:\/\/[^\/]*(\.pipe\.aria|aria\.pipe|events\.data|collector\.azure)\.[^\/]+\/(OneCollector\/1|Collector\/3)\.0/i],CT=xn((it={},it[z_]=500,it[fh]=!1,it[$_]=!1,it[U_]=void 0,it.disableCorrelationHeaders=!1,it.distributedTracingMode=1,it.correlationHeaderExcludedDomains=bT,it.correlationHeaderDomains=void 0,it.correlationHeaderExcludePatterns=void 0,it.appId=void 0,it.enableCorsCorrelation=!1,it[lh]=!1,it[L_]=!1,it[A_]=!1,it[M_]=!1,it.maxAjaxPerfLookupAttempts=3,it[N_]=25,it.ignoreHeaders=["Authorization","X-API-Key","WWW-Authenticate"],it.addRequestContext=void 0,it.addIntEndpoints=!0,it)),ST=(function(t){tr(e,t);function e(){var n=t.call(this)||this;n.identifier=e.identifier,n.priority=120;var r,i,o,a,s,c,u,l,f,m,d,h,g,p,v,b,P,x,R,q,A,I,W,j,K,re,ae,_,E,V;return He(e,n,function(M,D){var ce=D[Uc];me(),M.initialize=function(C,z,F,O){M.isInitialized()||(D.initialize(C,z,F,O),q=ci(gn("ajax"),z&&z.evtNamespace&&z.evtNamespace()),oe(C),J(),y(),H())},M._doTeardown=function(){me()},M.trackDependencyData=function(C,z){ne(j,M[Jt],null,C,z)},M.resetAjaxAttempts=function(){u=0},M[Qf]=function(C,z,F,O){var X=M._currentWindowHost||o;if(_T(W,M[Jt],C,O,z,F)){if(z||z===""){if(lv(a,C[uh](),X)){F||(F={});var ie=new Headers(F[yi]||(z instanceof Request?z[yi]||{}:{}));if(m){var le="|"+C[Jr]+"."+C[Gr];ie.set(Le[3],le),s&&(C[ln][Le[3]]=le)}var Ie=E||l&&l.appId();if(Ie&&(ie.set(Le[0],Le[2]+Ie),s&&(C[ln][Le[0]]=Le[2]+Ie)),f){var ye=C[En];B(ye)&&(ye=1);var $e=Hg(Fg(C[Jr],C[Gr],ye));ie.set(Le[4],$e),s&&(C[ln][Le[4]]=$e)}F[yi]=ie}}else if(O&&lv(a,C[uh](),X)){if(m)if(td(O,Le[3]))ar(M,71,"Unable to set ["+Le[3]+"] as it has already been set by another instance");else{var le="|"+C[Jr]+"."+C[Gr];O[Zf](Le[3],le),s&&(C[ln][Le[3]]=le)}var Ie=E||l&&l.appId();if(Ie&&(td(O,Le[0])?ar(M,71,"Unable to set ["+Le[0]+"] as it has already been set by another instance"):(O[Zf](Le[0],Le[2]+Ie),s&&(C[ln][Le[0]]=Le[2]+Ie))),f){var ye=C[En];if(B(ye)&&(ye=1),td(O,Le[4]))ar(M,71,"Unable to set ["+Le[4]+"] as it has already been set by another instance");else{var $e=Hg(Fg(C[Jr],C[Gr],ye));O[Zf](Le[4],$e),s&&(C[ln][Le[4]]=$e)}}}}return O||F},M[Rv]=function(C,z,F){if(g===-1||u<g){(_===2||_===1)&&typeof C.id=="string"&&C.id[C.id[ji]-1]!=="."&&(C.id+="."),B(C[na])&&(C[na]=new Date);var O=Lr(C,Gi.dataType,Gi.envelopeType,M[Rs](),z,F);M[Jt].track(O)}else u===g&&As(M,55,"Maximum ajax per page view limit reached, ajax monitoring is paused until the next trackPageView(). In order to increase the limit set the maxAjaxCallsPerView configuration parameter.",!0);++u},M.addDependencyListener=function(C){return Wv(W,I++,C)},M.addDependencyInitializer=function(C){return Wv(j,I++,C)};function me(){var C=Fn();r=!1,i=!1,V=!1,o=C&&C.host&&C.host[Do](),a=null,s=!1,c=!1,u=0,l=null,f=!1,m=!1,d=null,h=!1,g=0,p=!1,v={},b=!1,P=!1,x=null,R=null,q=null,I=0,W=[],j=[],A=gn("ajaxData"),M._ajaxDataId=A,K=null,re=1,ae=1,_=1,E=null}function oe(C){M[Uc](at(C,function(z){var F=z.cfg,O=Rn(null,F,M[Jt]);a=O.getExtCfg(e.identifier,CT),_=a.distributedTracingMode,s=a[lh],c=a[A_],h=a[M_],g=a[z_],x=[].concat(a[U_]||[],a.addIntEndpoints!==!1?wT:[]),R=a.addRequestContext,m=_===0||_===1,f=_===1||_===2,h&&(d=A),b=!!a[fh],re=a.maxAjaxPerfLookupAttempts,ae=a[N_],K=a.ignoreHeaders,E=a.appId}))}function H(){var C=M[Jt].getPlugin(Al);C&&(l=C.plugin[Ds])}function w(C){var z=!0;return(C||K)&&ee(K,(function(F){if(F[Do]()===C[Do]())return z=!1,-1})),z}function y(){var C=vT();if(C){var z=dn(),F=C.polyfill;M[Uc](at(a,function(){P=!!a[$_],p=a[L_],!P&&!r?(ce(Bd(z,Ai,{ns:q,req:function(O,X,ie){var le;if(!P&&r&&!Y(null,X,ie)&&!(F&&i)){var Ie=O.ctx();le=sn(X,ie);var ye=M[Qf](le,X,ie);ye!==ie&&O.set(1,ye),Ie.data=le}},rsp:function(O,X){if(!P){var ie=O.ctx().data;ie&&(O.rslt=O.rslt.then(function(le){return Z(O,(le||{})[In],X,le,ie,function(){var Ie,ye=(Ie={statusText:(le||{})[Ri],headerMap:null},Ie[_h]=ue(le),Ie);if(p&&le){var $e={};le.headers.forEach(function(qe,_t){w(_t)&&($e[_t]=qe)}),ye[al]=$e}return ye}),le}).catch(function(le){throw Z(O,0,X,null,ie,null,{error:le.message||te(le)}),le}))}},hkErr:ts(M,15,"Failed to monitor Window.fetch"+Ro)},!0,Om())),r=!0):F&&!V&&(ce(Bd(z,Ai,{ns:q,req:function(O,X,ie){Y(null,X,ie)}})),V=!0)})),F&&(z[Ai].polyfill=F)}}function U(C,z,F){ce(PI(C,z,F))}function J(){mT(M,A)&&M[Uc](at(a,function(){b=!!a[fh],s=a[lh],!b&&!i&&(U(XMLHttpRequest,"open",{ns:q,req:function(C,z,F,O){if(!b){var X=C.inst,ie=Fo(X,A);!Y(X,F)&&be(X,ie,!0)&&((!ie||!ie.xhrMonitoringState.openDone)&&(ie=Te(X,z,F,O)),Ue(X,ie))}},hkErr:ts(M,15,es+".open"+Ro)}),U(XMLHttpRequest,"send",{ns:q,req:function(C,z){if(!b){var F=C.inst,O=Fo(F,A);be(F,O)&&!O.xhrMonitoringState.sendDone&&(Tt("xhr",O),O[Wi]=Dc(),M[Qf](O,void 0,void 0,F),O.xhrMonitoringState.sendDone=!0)}},hkErr:ts(M,17,es+Ro)}),U(XMLHttpRequest,"abort",{ns:q,req:function(C){if(!b){var z=C.inst,F=Fo(z,A);be(z,F)&&!F.xhrMonitoringState.abortDone&&(F[ba]=1,F.xhrMonitoringState.abortDone=!0)}},hkErr:ts(M,13,es+".abort"+Ro)}),U(XMLHttpRequest,"setRequestHeader",{ns:q,req:function(C,z,F){if(!b){var O=C.inst,X=Fo(O,A);X&&be(O,X)&&(yT(O,z,F),s&&w(z)&&(X[ln][z]=F))}},hkErr:ts(M,71,es+".setRequestHeader"+Ro)}),i=!0)}))}function Y(C,z,F){var O=!1,X=((de(z)?z:(z||{}).url||"")||"")[Do]();if(ee(x,function(Ie){var ye=Ie;de(Ie)&&(ye=new RegExp(Ie)),O||(O=ye.test(X))}),O)return O;var ie=Ao(X,"?"),le=Ao(X,"#");return(ie===-1||le!==-1&&le<ie)&&(ie=le),ie!==-1&&(X=X.substring(0,ie)),B(C)?B(z)||(O=(typeof z=="object"?z[Li]===!0:!1)||(F?F[Li]===!0:!1)):O=C[Li]===!0||X[Li]===!0,!O&&X&&Kd(X)&&(O=!0),O?v[X]||(v[X]=1):v[X]&&(O=!0),O}function be(C,z,F){var O=!0,X=i;return B(C)||(O=F===!0||!B(z)),X&&O}function ke(){var C=null;return M[Jt]&&M[Jt].getTraceCtx&&(C=M[Jt].getTraceCtx(!1)),!C&&l&&l.telemetryTrace&&(C=zp(l.telemetryTrace)),C}function Te(C,z,F,O){var X,ie=ke(),le=ie&&ie[dh]()||Xr(),Ie=qr(Xr(),0,16),ye=C[ri]=C[ri]||{xh:[],i:{}},$e=ye.i=ye.i||{},qe=$e[A]=$e[A]||new zv(le,Ie,M[Rs](),(X=M.core)===null||X===void 0?void 0:X.getTraceCtx());return qe[En]=ie&&ie[hh](),qe[Kr]=z,qe[kn]=F,qe.xhrMonitoringState.openDone=!0,qe[ln]={},qe.async=O,qe[ph]=c,qe}function Ue(C,z){z.xhrMonitoringState[j_]=yr(C,"readystatechange",function(){var F;try{C&&C.readyState===4&&be(C,z)&&je(C)}catch(X){var O=te(X);(!O||Ao(O[Do](),"c00c023f")===-1)&&As(M,16,es+" 'readystatechange' event handler"+Ro,(F={},F[yh]=ou(C,A),F.exception=O,F))}},q)}function kt(C){try{var z=C.responseType;if(z===""||z==="text")return C[Av]}catch{}return null}function je(C){var z=Fo(C,A);z[ps]=Dc(),z[In]=C[In];function F(O,X){var ie=X||{};ie.ajaxDiagnosticsMessage=ou(C,A),O&&(ie.exception=te(O)),ar(M,14,Lv+"ajax call"+Uv,ie)}nr("xmlhttprequest",z,function(){try{var O=z[gh]("Ajax",s,function(){var ye,$e=(ye={statusText:C[Ri],headerMap:null},ye[_h]=We(C),ye.type=C.responseType,ye[Av]=kt(C),ye.response=C.response,ye);if(p){var qe=C[Mv]();if(qe){var _t=Fe(qe).split(/[\r\n]+/),An={};ee(_t,function(Mn){var jt=Mn.split(": "),Co=jt.shift(),dc=jt.join(": ");w(Co)&&(An[Co]=dc)}),$e[al]=An}}return $e}),X=void 0;try{R&&(X=R({status:C[In],xhr:C}))}catch{ar(M,104,$v)}if(O){X!==void 0&&(O[Pa]=$t($t({},O.properties),X));var ie=z[vh]();ne(j,M[Jt],z,O,null,ie)}else F(null,{requestSentTime:z[Wi],responseFinishedTime:z[ps]})}finally{try{var le=C[ri]||{i:{}},Ie=le.i||{};Ie[A]&&(Ie[A]=null)}catch{}}},function(O){F(O,null)})}function We(C){var z;try{var F=C[Mv]();if(F!==null){var O=Ao(F[Do](),Le[8]);if(O!==-1){var X=C.getResponseHeader(Le[0]);return fv(X)}}}catch(ie){ar(M,18,Nv,(z={},z[yh]=ou(C,A),z.exception=te(ie),z))}}function Tt(C,z){if(z[kn]&&d&&h){var F=Ir();if(F&&pe(F.mark)){jv++;var O=d+C+"#"+jv;F.mark(O);var X=F.getEntriesByName(O);X&&X[ji]===1&&(z[sl]=X[0])}}}function nr(C,z,F,O){var X=z[sl],ie=Ir(),le=re,Ie=ae,ye=z[kn],$e=0;(function qe(){try{if(ie&&X){$e++;for(var _t=null,An=ie.getEntries(),Mn=An[ji]-1;Mn>=0;Mn--){var jt=An[Mn];if(jt){if(jt.entryType==="resource")jt.initiatorType===C&&(Ao(jt.name,ye)!==-1||Ao(ye,jt.name)!==-1)&&(_t=jt);else if(jt.entryType==="mark"&&jt.name===X.name){z[mh]=_t;break}if(jt[na]<X[na]-1e3)break}}}!X||z[mh]||$e>=le||z.async===!1?(X&&pe(ie.clearMarks)&&ie.clearMarks(X.name),z.perfAttempts=$e,F()):pn(qe,Ie)}catch(Co){O(Co)}})()}function sn(C,z){var F,O=ke(),X=O&&O[dh]()||Xr(),ie=qr(Xr(),0,16),le=new zv(X,ie,M[Rs](),(F=M.core)===null||F===void 0?void 0:F.getTraceCtx());le[En]=O&&O[hh](),le[Wi]=Dc(),le[ph]=c;var Ie;if(C instanceof Request?Ie=(C||{}).url||"":Ie=C,Ie===""){var ye=Fn();ye&&ye.href&&(Ie=Xm(ye.href,"#")[0])}M[Jt]&&M[Jt].config&&(Ie=lr(Ie,M[Jt].config)),le[kn]=Ie;var $e="GET";z&&z[Kr]?$e=z[Kr]:C&&C instanceof Request&&($e=C[Kr]),le[Kr]=$e;var qe={};if(s){var _t=new Headers((z?z[yi]:0)||(C instanceof Request?C[yi]||{}:{}));_t.forEach(function(An,Mn){w(Mn)&&(qe[Mn]=An)})}return le[ln]=qe,Tt(Ai,le),le}function $(C){var z="";try{B(C)||(typeof C=="string"?z+="(url: '".concat(C,"')"):z+="(url: '".concat(C.url,"')"))}catch(F){As(M,15,"Failed to grab failed fetch diagnostics message",{exception:te(F)})}return z}function Z(C,z,F,O,X,ie,le){if(!X)return;function Ie(ye,$e,qe){var _t=qe||{};_t.fetchDiagnosticsMessage=$(F),$e&&(_t.exception=te($e)),ar(M,ye,Lv+"fetch call"+Uv,_t)}X[ps]=Dc(),X[In]=z,nr(Ai,X,function(){var ye=X[gh]("Fetch",s,ie),$e;try{R&&($e=R({status:z,request:F,response:O}))}catch{ar(M,104,$v)}if(ye){$e!==void 0&&(ye[Pa]=$t($t({},ye.properties),$e));var qe=X[vh]();ne(j,M[Jt],X,ye,null,qe)}else Ie(14,null,{requestSentTime:X[Wi],responseFinishedTime:X[ps]})},function(ye){Ie(18,ye,null)})}function ue(C){if(C&&C[yi])try{var z=C[yi].get(Le[0]);return fv(z)}catch(F){ar(M,18,Nv,{fetchDiagnosticsMessage:$(C),exception:te(F)})}}function ne(C,z,F,O,X,ie){var le=!0,Ie=C[ji];if(Ie>0){var ye={item:O,properties:X,sysProperties:ie,context:F?F[Ds]:null,aborted:F?!!F[ba]:!1};le=F_(z,C,ye,"initializer")}le&&M[Rv](O,X,ie)}}),n}return e.prototype.processTelemetry=function(n,r){this.processNext(n,r)},e.prototype.addDependencyInitializer=function(n){return null},e.identifier="AjaxDependencyPlugin",e})(ho),IT=(function(){function t(){}return t})(),kT=(function(){function t(){this.id="browser",this.deviceClass="Browser"}return t})(),TT="3.3.11",ET=(function(){function t(e,n){var r=this,i=at(e,function(){var o=e.sdkExtension;r.sdkVersion=(o?o+"_":"")+"javascript:"+TT});n&&n.add(i)}return t})(),xT=(function(){function t(){}return t})(),cl="session",ul="sessionManager",au="isUserCookieSet",ll="isNewUser",nd="getTraceCtx",bh="telemetryTrace",H_="applySessionContext",q_="applyApplicationContext",V_="applyOperationContext",B_="applyOperatingSystemContxt",K_="applyLocationContext",X_="applyInternalContext",su="getSessionId",J_="sessionCookiePostfix",Si="automaticSession",Ho="accountId",qo="authenticatedId",ns="acquisitionDate",$c="renewalDate",rs="cookieSeparator",rd="authUserCookieName",PT="ai_session",DT=864e5,RT=18e5,AT=6e4,G_=(function(){function t(){}return t})(),MT=(function(){function t(e,n,r){var i=this,o,a,s=fo(n),c=Tl(n),u,l;He(t,i,function(f){e||(e={});var m=at(e,function(b){u=e.sessionExpirationMs||DT,l=e.sessionRenewalMs||RT;var P=e[J_]||e.namePrefix||"";o=PT+P});r&&r.add(m),f[Si]=new G_,f.update=function(){var b=Pn(),P=!1,x=f[Si];if(x.id||(P=!d(x)),!P&&u>0){var R=b-x[ns],q=b-x[$c];P=R<0||q<0,P=P||R>u,P=P||q>l}P?g(b):(!a||b-a>AT)&&p(x,b)},f.backup=function(){var b=f[Si];v(b.id,b[ns],b[$c])};function d(b,P){var x=!1,R=c.get(o);if(R&&pe(R.split))x=h(b,R);else{var q=Qy(s,o);q&&(x=h(b,q))}return x||!!b.id}function h(b,P){var x=!1,R=", session will be reset",q=P.split("|");if(q.length>=2)try{var A=+q[1]||0,I=+q[2]||0;isNaN(A)||A<=0?G(s,2,27,"AI session acquisition date is 0"+R):isNaN(I)||I<=0?G(s,2,27,"AI session renewal date is 0"+R):q[0]&&(b.id=q[0],b[ns]=A,b[$c]=I,x=!0)}catch(W){G(s,1,9,"Error parsing ai_session value ["+(P||"")+"]"+R+" - "+Ne(W),{exception:te(W)})}return x}function g(b){var P=e.getNewId||_p;f[Si].id=P(e.idLength||22),f[Si][ns]=b,p(f[Si],b),Rl()||G(s,2,0,"Browser does not support local storage. Session durations will be inaccurate.")}function p(b,P){var x=b[ns];b[$c]=P;var R=l,q=x+u-P,A=[b.id,x,P],I=0;q<R?I=q/1e3:I=R/1e3;var W=e.cookieDomain||null;c.set(o,A.join("|"),u>0?I:null,W),a=P}function v(b,P,x){Zy(s,o,[b,P,x].join("|"))}})}return t.__ieDyn=1,t})(),zT=(function(){function t(e,n,r,i,o){var a=this;a.traceID=e||Xr(),a.parentID=n;var s=Fn();!r&&s&&s.pathname&&(r=s.pathname,o&&(r=lr(r,o))),a.name=ht(i,r)}return t})();function Ov(t){return!(typeof t!="string"||!t||t.match(/,|;|=| |\|/))}var UT=(function(){function t(e,n,r){this.isNewUser=!1,this.isUserCookieSet=!1;var i=fo(n),o=Tl(n),a;He(t,this,function(s){Re(s,"config",{g:function(){return e}});var c=at(e,function(){var m=e.userCookiePostfix||"";a=t.userCookieName+m;var d=o.get(a);if(d){s[ll]=!1;var h=d.split(t[rs]);h.length>0&&(s.id=h[0],s[au]=!!s.id)}if(!s.id){s.id=u();var g=l(s.id);f(g.join(t[rs]));var p=(e.namePrefix||"")+"ai_session";qI(i,p)}s[Ho]=e[Ho]||void 0;var v=o.get(t[rd]);if(v){v=decodeURI(v);var b=v.split(t[rs]);b[0]&&(s[qo]=b[0]),b.length>1&&b[1]&&(s[Ho]=b[1])}});r&&r.add(c);function u(){var m=e||{},d=m.getNewId||_p,h=d(m.idLength?e.idLength:22);return h}function l(m){var d=ka(new Date);s.accountAcquisitionDate=d,s[ll]=!0;var h=[m,d];return h}function f(m){var d=31536e3;s[au]=o.set(a,m,d)}s.setAuthenticatedUserContext=function(m,d,h){h===void 0&&(h=!1);var g=!Ov(m)||d&&!Ov(d);if(g){G(i,2,60,"Setting auth user context failed. User auth/account id should be of type string, and not contain commas, semi-colons, equal signs, spaces, or vertical-bars.",!0);return}s[qo]=m;var p=s[qo];d&&(s[Ho]=d,p=[s[qo],s.accountId].join(t[rs])),h&&o.set(t[rd],encodeURI(p))},s.clearAuthenticatedUserContext=function(){s[qo]=null,s[Ho]=null,o.del(t[rd])},s.update=function(m){if(s.id!==m||!s[au]){var d=m||u(),h=l(d);f(h.join(t[rs]))}}})}return t.cookieSeparator="|",t.userCookieName="ai_user",t.authUserCookieName="ai_authUser",t})(),Lc="ext",jc="tags";function Mo(t,e){t&&t[e]&&vr(t[e]).length===0&&delete t[e]}function Fv(){return null}var NT=(function(){function t(e,n,r,i){var o=this,a=e.logger;He(t,this,function(s){if(s.appId=Fv,s[su]=Fv,s.application=new IT,s.internal=new ET(n,i),wl()){s[ul]=new MT(n,e,i),s.device=new kT,s.location=new xT,s.user=new UT(n,e,i);var c=void 0,u=void 0,l;r&&(c=r.getTraceId(),u=r.getSpanId(),l=r.getName()),s[bh]=new zT(c,u,l,a),s[cl]=new G_}s[su]=function(){var f=s[cl],m=null;if(f&&de(f.id))m=f.id;else{var d=(s[ul]||{})[Si];m=d&&de(d.id)?d.id:null}return m},s[H_]=function(f,m){Oe(At(f.ext,Gt.AppExt),"sesId",s[su](),de)},s[B_]=function(f,m){Oe(f.ext,Gt.OSExt,s.os)},s[q_]=function(f,m){var d=s.application;if(d){var h=At(f,jc);Oe(h,Be.applicationVersion,d.ver,de),Oe(h,Be.applicationBuild,d.build,de)}},s.applyDeviceContext=function(f,m){var d=s.device;if(d){var h=At(At(f,Lc),Gt.DeviceExt);Oe(h,"localId",d.id,de),Oe(h,"ip",d.ip,de),Oe(h,"model",d.model,de),Oe(h,"deviceClass",d.deviceClass,de)}},s[X_]=function(f,m){var d=s.internal;if(d){var h=At(f,jc);Oe(h,Be.internalAgentVersion,d.agentVersion,de),Oe(h,Be.internalSdkVersion,ht(a,d.sdkVersion,64),de),(f.baseType===Vs.dataType||f.baseType===ni.dataType)&&(Oe(h,Be.internalSnippet,d.snippetVer,de),Oe(h,Be.internalSdkSrc,d.sdkSrc,de))}},s[K_]=function(f,m){var d=o.location;d&&Oe(At(f,jc,[]),Be.locationIp,d.ip,de)},s[V_]=function(f,m){var d=s[bh];if(d){var h=At(At(f,Lc),Gt.TraceExt,{traceID:void 0,parentID:void 0});Oe(h,"traceID",d.traceID,de,B),Oe(h,"name",d.name,de,B),Oe(h,"parentID",d.parentID,de,B)}},s.applyWebContext=function(f,m){var d=o.web;d&&Oe(At(f,Lc),Gt.WebExt,d)},s.applyUserContext=function(f,m){var d=s.user;if(d){var h=At(f,jc,[]);Oe(h,Be.userAccountId,d[Ho],de);var g=At(At(f,Lc),Gt.UserExt);Oe(g,"id",d.id,de),Oe(g,"authId",d[qo],de)}},s.cleanUp=function(f,m){var d=f.ext;d&&(Mo(d,Gt.DeviceExt),Mo(d,Gt.UserExt),Mo(d,Gt.WebExt),Mo(d,Gt.OSExt),Mo(d,Gt.AppExt),Mo(d,Gt.TraceExt))}})}return t.__ieDyn=1,t})(),Nr,id,zo=null,$T=Ra((Nr={accountId:zo,sessionRenewalMs:1800*1e3,samplingPercentage:100,sessionExpirationMs:1440*60*1e3,cookieDomain:zo,sdkExtension:zo,isBrowserLinkTrackingEnabled:!1,appId:zo},Nr[su]=zo,Nr.namePrefix=id,Nr[J_]=id,Nr.userCookiePostfix=id,Nr.idLength=22,Nr.getNewId=zo,Nr)),LT=(function(t){tr(e,t);function e(){var n=t.call(this)||this;n.priority=110,n.identifier=Al;var r,i,o,a,s;return He(e,n,function(c,u){l(),Re(c,"context",{g:function(){return a}}),c.initialize=function(d,h,g,p){u.initialize(d,h,g,p),f(d)},c.processTelemetry=function(d,h){if(!B(d)){h=c._getTelCtx(h),d.name===ni.envelopeType&&h.diagLog().resetInternalMessageCount();var g=a||{};g[cl]&&typeof a[cl].id!="string"&&g[ul]&&g[ul].update();var p=g.user;if(p&&!p[au]&&p.update(g.user.id),m(d,h),p&&p[ll]&&(p[ll]=!1,!s)){var v=new Vs(72,(er()||{}).userAgent||"");zS(h.diagLog(),1,v)}c.processNext(d,h)}},c._doTeardown=function(d,h){var g=(d||{}).core();if(g&&g[nd]){var p=g[nd](!1);p===i&&g.setTraceCtx(o)}l()};function l(){r=null,i=null,o=null,a=null,s=!0}function f(d){var h=c.identifier,g=c.core;c._addHook(at(d,function(){var p=Rn(null,d,g);d.storagePrefix&&$p(d.storagePrefix),s=d.disableUserInitMessage!==!1,r=p.getExtCfg(h,$T),c._extConfig=r})),o=g[nd](!1),a=new NT(g,r,o,c._unloadHooks),i=zp(c.context[bh],o),g.setTraceCtx(i),c.context.appId=function(){var p=g.getPlugin(l_);return p?p.plugin._appId:null}}function m(d,h){At(d,"tags",[]),At(d,"ext",{});var g=c.context;g[H_](d,h),g[q_](d,h),g.applyDeviceContext(d,h),g[V_](d,h),g.applyUserContext(d,h),g[B_](d,h),g.applyWebContext(d,h),g[K_](d,h),g[X_](d,h),g.cleanUp(d,h)}}),n}return e.__ieDyn=1,e})(ho),Q_="AuthenticatedUserContext",Ma="track",wh="snippet",jT="getCookieMgr",WT="startTrackPage",OT="stopTrackPage",od="flush",FT="startTrackEvent",HT="stopTrackEvent",qT="addTelemetryInitializer",Hv="pollInternalLogs",ad="getPlugin",sd="evtNamespace",VT=Ma+"Event",BT=Ma+"Trace",KT=Ma+"Metric",XT=Ma+"PageView",JT=Ma+"Exception",GT=Ma+"DependencyData",QT="set"+Q_,ZT="clear"+Q_,YT="https://js.monitor.azure.com/scripts/b/ai.config.1.cfg.json",fl="connectionString",cd="version",bi="queue",gs="instrumentationKey",Vo="userOverrideEndpointUrl",ud="endpointUrl",is="onunloadFlush",cn="context",qv="addHousekeepingBeforeUnload",ld="sendMessage",e1="updateSnippetDefinitions",Un,Uo,No,fd,os,Vv=[wh,"dependencies","properties","_snippetVersion","appInsightsNew","getSKUDefaults"],Z_="iKeyUsage",Y_="CdnUsage",e0="SdkLoaderVer",t1="zipPayload",Wc=void 0,n1={samplingRate:100,maxSendNumber:1},r1={monthInterval:3,daysOfMonth:[28]},Oc={disabled:!0,limit:Cn(n1),interval:Cn(r1)},i1=(Un={},Un[fl]=Wc,Un.endpointUrl=Wc,Un[gs]=Wc,Un[Vo]=Wc,Un.diagnosticLogInterval=Hu(o1,1e4),Un.featureOptIn=(Uo={},Uo[Z_]={mode:3},Uo[Y_]={mode:2},Uo[e0]={mode:2},Uo[t1]={mode:1},Uo),Un.throttleMgrCfg=Cn((No={},No[109]=Cn(Oc),No[106]=Cn(Oc),No[111]=Cn(Oc),No[110]=Cn(Oc),No)),Un.extensionConfig=Cn((fd={},fd.AppInsightsCfgSyncPlugin=Cn({cfgUrl:YT,syncMode:2}),fd)),Un);function o1(t){return t&&t>0}function Bv(t,e){return Fs(function(n,r){Vt(e,function(i){var o=i&&i.value,a=null;!i.rejected&&o&&(t[fl]=o,a=t_(o)),n(a)})})}var a1=(function(){function t(e){var n=this,r,i,o,a,s,c,u,l,f,m,d,h,g,p;He(t,this,function(v){x(),Re(v,"config",{g:function(){return l}}),ee(["pluginVersionStringArr","pluginVersionString"],function(A){Re(v,A,{g:function(){return u?u[A]:null}})}),a=""+(e.sv||e[cd]||""),e[bi]=e[bi]||[],e[cd]=e[cd]||2;var b=vn(e.config||{},i1);l=b.cfg,f=new jk,Re(v,"appInsights",{g:function(){return f}}),i=new LT,r=new ST,o=new hT,u=new hI,Re(v,"core",{g:function(){return u}}),q(at(b,function(){var A=l[fl];if(ii(A)){var I=Fs(function(re,ae){Vt(Bv(l,A),function(_){if(_.rejected)re(null);else{var E=l[gs],V=_.value;E=V&&V.instrumentationkey||E,re(E)}})}),W=l[Vo];B(W)&&(W=Fs(function(re,ae){Vt(Bv(l,A),function(_){if(_.rejected)re(null);else{var E=l[ud],V=_.value,M=V&&V.ingestionendpoint;E=M?M+ha:E,re(E)}})})),l[gs]=I,l[ud]=W}if(de(A)&&A){var j=t_(A),K=j.ingestionendpoint;l.endpointUrl=l[Vo]?l[Vo]:K+ha,l[gs]=j.instrumentationkey||l[gs]}l.endpointUrl=l[Vo]?l[Vo]:l[ud]})),v[wh]=e,v[od]=function(A,I){A===void 0&&(A=!0);var W;return Ku(u,function(){return"AISKU.flush"},function(){A&&!I&&(W=Jn(function(re){I=re}));var j=1,K=function(){j--,j===0&&I()};ee(u.getChannels(),function(re){re&&(j++,re[od](A,K))}),K()},null,A),W},v[is]=function(A){A===void 0&&(A=!0),ee(u.getChannels(),function(I){I[is]?I[is]():I[od](A)})},v.loadAppInsights=function(A,I,W){A===void 0&&(A=!1),A&&Ww("Legacy Mode is no longer supported");function j(K){if(K){var re="";B(a)||(re+=a),v[cn]&&v[cn].internal&&(v[cn].internal.snippetVer=re||"-"),Pe(v,function(ae,_){de(ae)&&!pe(_)&&ae&&ae[0]!=="_"&&Dt(Vv,ae)===-1&&K[ae]!==_&&(K[ae]=_)})}}return Ku(v.core,function(){return"AISKU.loadAppInsights"},function(){u.initialize(l,[o,i,r,f,m],I,W),Re(v,"context",{g:function(){return i[cn]}}),d||(d=new BI(u));var K=s1();K&&v[cn]&&(v[cn].internal.sdkSrc=K),j(v[wh]),v.emptyQueue(),v[Hv](),v[qv](v),q(at(b,function(){var re=!1;l.throttleMgrCfg[109]&&(re=!l.throttleMgrCfg[109].disabled),!d.isReady()&&l.extensionConfig&&l.extensionConfig[m.identifier]&&re&&d.onReadyState(!0),!h&&!l[fl]&&Jc(Z_,l,!0)&&(d[ld](106,"See Instrumentation key support at aka.ms/IkeyMigrate"),h=!0),!g&&v[cn].internal.sdkSrc&&v[cn].internal.sdkSrc.indexOf("az416426")!=-1&&Jc(Y_,l,!0)&&(d[ld](110,"See Cdn support notice at aka.ms/JsActiveCdn"),g=!0),!p&&parseInt(a)<6&&Jc(e0,l,!0)&&(d[ld](111,"An updated Sdk Loader is available, see aka.ms/SnippetVer"),p=!0)}))}),v},v[e1]=function(A){UC(A,v,function(I){return I&&Dt(Vv,I)===-1})},v.emptyQueue=function(){try{if(we(v.snippet[bi])){for(var A=v.snippet[bi].length,I=0;I<A;I++){var W=v.snippet[bi][I];W()}v.snippet[bi]=void 0,delete v.snippet[bi]}}catch(K){var j={};K&&pe(K.toString)&&(j.exception=K.toString())}},v[qv]=function(A){if(wl()||jm()){var I=function(){if(A[is](!1),pe(v.core[ad])){var j=n.core[ad](Al);if(j){var K=j.plugin;K&&K[cn]&&K[cn]._sessionManager&&K[cn]._sessionManager.backup()}}},W=!1;c||(c=ci(s,u[sd]&&u[sd]())),q(at(l,function(j){var K=j.cfg,re=A.appInsights,ae=Rn(null,K,re.core),_=ae.getExtCfg(re.identifier||Lp);R();var E=K.disablePageUnloadEvents;_.disableFlushOnBeforeUnload||(kI(I,E,c)&&(W=!0),Vd(I,E,c)&&(W=!0),!W&&!YC()&&G(u.logger,1,19,"Could not add handler for beforeunload and pagehide")),!W&&!_.disableFlushOnUnload&&Vd(I,E,c)}))}},v.getSender=function(){return o},v.unload=function(A,I,W){var j=!1,K;A!==!1&&!I&&(K=Jn(function(ae){I=ae}));function re(ae){j||(j=!0,x(),I&&I(ae))}return v[is](A),R(),u.unload&&u.unload(A,re,W),K},Yo(v,f,[jT,VT,XT,"trackPageViewPerformance",JT,"_onerror",BT,KT,WT,OT,FT,HT]),Yo(v,P,[GT,"addDependencyListener","addDependencyInitializer"]),Yo(v,u,[qT,Hv,"stopPollingInternalLogs",ad,"addPlugin",sd,"addUnloadCb","getTraceCtx","updateCfg","onCfgChange"]),Yo(v,function(){var A=i[cn];return A?A.user:null},[QT,ZT]);function P(){return r}function x(){s=gn("AISKU"),c=null,r=null,i=null,o=null,a=null,d=null,h=!1,g=!1,p=!1,m=new Kk}function R(){c&&(TI(null,c),EI(null,c))}function q(A){u.addUnloadHook(A)}})}return t.prototype.addDependencyInitializer=function(e){return null},t})();function s1(){if(os)return os;var t=null,e=!1,n=["://js.monitor.azure.com/","://az416426.vo.msecnd.net/"];try{var r=(document||{}).currentScript;r&&(t=r.src)}catch{}if(t){try{var i=t.toLowerCase();if(i){var o="";ee(n,function(a,s){if(ot(i,a)!==-1)return o="cdn"+(s+1),ot(i,"/scripts/")===-1&&(ot(i,"/next/")!==-1?o+="-next":ot(i,"/beta/")!==-1&&(o+="-beta")),os=o+(e?".mod":""),-1})}}catch{}os=t}return os}const c1=["NotLoggedIn","LoginFailed"],u1=["ResizeObserver loop limit exceeded","ResizeObserver loop completed with undelivered notifications."],l1=new Ck,xr=new a1({config:{enableResponseHeaderTracking:!0,connectionString:window.appInsightsConnectionString??"",enableAutoRouteTracking:!0,enableUnhandledPromiseRejectionTracking:!0,extensions:[l1],enableAjaxErrorStatusText:!0,disableCookiesUsage:!0}}),f1=()=>!!window.appInsightsConnectionString&&window.appInsightsConnectionString!=="InstrumentationKey=00000000-0000-0000-0000-000000000000",d1=t=>{var e,n,r,i,o;if((e=t.data)!=null&&e.message){const a=m1(t.data.message);if(u1.includes(a))return vs.addLog(t.data.message,"Error",{sendToTracker:!1}),!1;if(a==="Network Error"&&!window.navigator.onLine||a.includes("status code 401")||a==="Uncaught SyntaxError: Unexpected token '<'"&&(n=t.data.errorSrc)!=null&&n.startsWith("window.onerror")&&(r=t.data.errorSrc)!=null&&r.endsWith(".chunk.js:1:1"))return!1;const s=T1((i=t.data)==null?void 0:i.message);if((o=s==null?void 0:s.Causes)!=null&&o.some(c=>c1.includes(c.Id)))return!1}},h1=t=>{var e;const n=(e=t.baseData)==null?void 0:e.exceptions;if(!n)return!0;if(n.some(r=>r.stack.includes("chrome-extension://")))return!1},p1=t=>{var e;const n=t.data??{};t.baseType===Ht.dataType&&t.baseData&&(t.baseData.id=((e=t.baseData)==null?void 0:e.id)??t0(),n.errorGuid=t.baseData.id),t.data=n},g1=t=>{var e,n,r;const i=Qs[(e=t.baseData)==null?void 0:e.severityLevel]??"Information";switch(t.baseType){case Ht.dataType:{const o=t.baseData,a=Qs[o.severityLevel];o.exceptions.forEach(s=>{vs.addLog(s.message,a??i,{envelope:t,sendToTracker:!1});const c=t.data??{};if(c._cbnUserDialogPrevented!==!0&&c._cbnErrorBoundary!==!0){const u=c._cbnUserMsg??s.message;vs._Internals.showErrorDialog({header:"Error",text:u,errorId:o.id})}})}break;case fr.dataType:vs.addLog(`Event "${(n=t.baseData)==null?void 0:n.name}"`,i,{envelope:t,sendToTracker:!1});break;default:vs.addLog(((r=t.baseData)==null?void 0:r.message)??t.name,i,{envelope:t,sendToTracker:!1});break}};var Kv;const v1=window.appInsightsConnectionString!==void 0&&((Kv=window.appInsightsConnectionString)==null?void 0:Kv.startsWith("InstrumentationKey="));v1?xr.loadAppInsights():console.warn("AppInsights not initialized! The connections string wasn't properly injected.");function m1(t){return t.replace("PromiseRejectionEvent: ","").replace("ErrorEvent: ","").replace("AxiosError: ","")}xr.trackPageView();xr.addTelemetryInitializer(h1);xr.addTelemetryInitializer(p1);xr.addTelemetryInitializer(d1);xr.addTelemetryInitializer(g1);xr.addTelemetryInitializer(f1);const y1=()=>Math.floor(Math.random()*999).toString().padStart(3,"0"),t0=()=>Date.now().toString()+y1(),_1=()=>new Date().toISOString().slice(11,23);function b1(){const t=(new Error().stack||"").replace(/(\r\n|\n|\r)/gm,"").split(/\s{2,10}at /gm);return t.shift(),t}const w1={Verbose:{emoji:"๐งพ",style:"color: grey;"},Information:{emoji:"๐",style:"color: #466FD5;"},Warning:{emoji:"โ ๏ธ",style:"color: #ebc334;"},Error:{emoji:"๐",style:"color: red;"},Critical:{emoji:"๐ฅ",style:"color: red;"}};function C1(t,e,n){var r,i,o,a;const s=w1[e],c=n!=null&&n.customProperties?" | data = %O":"",u=n!=null&&n.envelope?" | envelope = %O":"",l=e==="Critical"?"[Critical] ":"",f=[((a=(o=(i=(r=n==null?void 0:n.envelope)==null?void 0:r.baseData)==null?void 0:i.exceptions)==null?void 0:o[0])==null?void 0:a.parsedStack)??b1(),s.style];n!=null&&n.customProperties&&f.push(n.customProperties),n!=null&&n.envelope&&f.push(n.envelope),console.log(`%O ${s.emoji} %c[${_1()}] ${l}${t}${u}${c}`,...f)}function S1(t){if(!t)return;const e={};return(t==null?void 0:t.show)!=="dialog"&&(e._cbnUserDialogPrevented=!0),t!=null&&t.userMessage&&(e._cbnUserMsg=t.userMessage),e}function I1(t,e){const n=t0(),r={id:n,exception:t instanceof Error?t:new Error(t),severityLevel:e!=null&&e.isCritical?Qs.Critical:Qs.Error,properties:{title:t.toString(),...e==null?void 0:e.customProperties}};return xr.trackException(r,S1(e)),n}var Bo,Ko,Ch,n0;class k1{constructor(){fe(this,Ch),fe(this,Bo),fe(this,Ko,[]),eo(this,"_Internals",{subscribeUiListener:e=>{if(S(this,Bo)){console.warn("Logger UI listener is already registered. Ensure that this only happens once!");return}Ae(this,Bo,e),S(this,Ko).forEach(n=>this._Internals.showErrorDialog(n)),Ae(this,Ko,[])},showErrorDialog:e=>{S(this,Bo)?S(this,Bo).call(this,e):(S(this,Ko).length===0&&nn(this,Ch,n0).call(this),S(this,Ko).push(e))}})}addLog(e,n="Information",r){(r==null?void 0:r.sendToTracker)!==!1?xr.trackTrace({message:e,severityLevel:Qs[n],properties:r==null?void 0:r.customProperties}):C1(e,n,r)}reportError(e,n){return I1(e,n)}}Bo=new WeakMap,Ko=new WeakMap,Ch=new WeakSet,n0=async function(){};const vs=new k1,r0=t=>typeof t=="object"&&t!==null&&t.$typ!==void 0&&t.Id!==void 0;function cu(t,e){return r0(t)?e?e.includes(t.Id):!0:!1}function T1(t){const e=t.replace(/^[^{]+/g,"");let n;try{n=JSON.parse(e)}catch{return}return cu(n)?n:void 0}function Nn(t){throw new Error(r0(t)?`${t.Id} - ${t.Message}`:"Unknown error")}const Sh="CmpEditor_",i0=k.z.custom(t=>Er(t)&&t.startsWith(Sh)&&Ib.safeParse(t.substring(Sh.length)).success),E1=t=>i0.safeParse(t).success,Xv=t=>`CmpEditor_${t}`,x1=t=>t.substring(Sh.length);function P1(t){const e=t.substring(t.indexOf("<")+1,t.lastIndexOf(">"));if(!Sb(e))throw new Error(`Invalid input type: ${e}`);return e}const o0=k.z.string();k.z.array(o0);const D1=k.z.string(),R1=t=>t.split("."),A1=t=>{const e=R1(t);return e[e.length-1]},Ml=k.z.enum(["value","width","height","minWidth","maxWidth","minHeight","maxHeight","backgroundNormal","backgroundHover","backgroundPressed","border","borderRadius","font","color","captionText","captionWidth","errorMsg","description","flexGrow","flexWrap","opacity","gap","visible","enabled","tooltipText","rawHtml","wrapText","text","placeholder","dataEntries","dataTemplate","tooltipKey","collapsed","group"]),M1=k.z.record(Ml,fm),a0=k.z.lazy(()=>k.z.union([M1,k.z.record(a0)])),z1=k.z.record(Ml,cm),s0=k.z.lazy(()=>k.z.union([z1,k.z.record(s0)])),U1=k.z.object({Name:k.z.literal("Fiber"),$val:a0,$typ:s0.optional()}),N1=k.z.object({Fibers:k.z.record(Ml,k.z.object({$src:bb,$typ:cm})),Name:k.z.literal(hr.FiberEditor),Pack:D1}),c0=t=>N1.safeParse(t).success;function uu(t,e){const n=[];for(const[r,i]of Object.entries(t))if(e&&r==="$val")n.push({ctrlId:e,values:i});else if(r!=="$val"){const o=uu(i,r);n.push(...o)}return n}const Jv="CtrlFiberEditor_",$1=k.z.custom(t=>Er(t)&&t.startsWith(Jv)&&o0.safeParse(t.substring(Jv.length)).success),u0=t=>$1.safeParse(t).success,Gv=t=>`CtrlFiberEditor_${t}`,L1=["NotLoggedIn","AuthenticationFailed","SessionTimedOut","CfgnSessionTimedOut","Unauthorized"];var Ge,bn,Ii,lu,ki,fu,Ih,Ti,Ei;class j1{constructor(e,n){fe(this,fu),fe(this,Ge),fe(this,bn),fe(this,Ii,[]),fe(this,lu,async()=>{if(S(this,Ii).length===0)return;Xe("WsConfiguratorClientInternals","#sendDeferredServerCallsAfterReconnect","Sending queued messages",S(this,Ii));const r=S(this,Ii).map(i=>this._callServer(...i));Ae(this,Ii,[]),await Promise.all(r)}),eo(this,"_callServer",async(r,i,o)=>{const a=S(this,Ge).connection;if(!a||S(this,Ge).state!=="connected"){Xe("ConfiguratorClientInternals","_callServer","Not connected. Message queued to be sent later.",{method:r,args:i,options:o}),S(this,Ii).push([r,i,o]);const f=S(this,Ge).state==="connecting";return S(this,Ge).isInitialized&&!f&&S(this,Ge).restoreConnection(),null}const s=(o==null?void 0:o.requestId)??S(this,Ge).getNextRequestId();Xe("ConfiguratorClientInternals",`_callServer, ID ${s}`,"",{method:r,args:i,options:o}),S(this,Ge).extendSessionLifetime();const c=o!=null&&o.requestId?[...i,o.requestId]:i,[u,l]=await aa(a.invoke(r,...c));return u?Ze("ConfiguratorClientInternals",`_callServer, ID ${s}`,"InvocationError:",u):l.error&&(cu(l.error,L1)&&Gb(),Ze("ConfiguratorClientInternals",`_callServer, ID ${s}`,"Error in response:",l.error)),Xe("ConfiguratorClientInternals",`_callServer, ID ${s}`,"Result:",l),l}),fe(this,ki,[]),fe(this,Ti,[]),fe(this,Ei,[]),Ae(this,Ge,e),S(this,Ge).onConnected(()=>S(this,lu).call(this)),S(this,Ge).onConnectionRestored(()=>S(this,lu).call(this)),Ae(this,bn,n)}async setCmpInput(e,n,r){const[i]=await aa(nn(this,fu,Ih).call(this,e,n,"change-cfgn-value",r));if(i instanceof yd)return i.message;if(i)throw i}async setCmpPresetInput(e,n,r,i){const o=!Cb(r)&&Er(n),[a,s]=o?pl(n):[null,n];if(a)return a.message;const c=$b(r),[u]=await aa(nn(this,fu,Ih).call(this,e,s,i,c));if(u instanceof yd)return u.message;if(u)throw u}async setCmpInputType(e,n){const r=await this._callServer("ChangeConfigurationValueType",[e,n],{isChunkable:!0});if(r!=null&&r.error){if(cu(r.error))return r.error.Message;throw new Error("Unknown error")}else return}async setCmpHiveRule(e,n,r){const i={name:e,changes:[{name:r?"Query":"Value",value:n}]};await this._callServer("SetCmpValue",[i],{isChunkable:!0})}async setCmpGroup(e,n){const r={name:e,changes:[{name:"Group",value:n}]};await this._callServer("SetCmpValue",[r])}async fetchCmpPropertyValue(e){let n=()=>{};const r=new Promise(i=>n=i);if(S(this,Ti).push({resolver:n,values:e}),await gd(0),S(this,Ti).length){const i=S(this,Ti).map(s=>s.resolver),o=S(this,Ti).flatMap(({values:s})=>s.map(({name:c,property:u})=>({name:c,...u!=="Value"&&{property:[u]}})));Ae(this,Ti,[]);const a=S(this,Ge).getNextRequestId();this._callServer("GetCmpValue",[o],{requestId:a}),await S(this,bn).awaitCspdUpdateResponse(a),i.forEach(s=>s())}return r}async subscribeToCmpUpdates(e,n,r=!1){let i=()=>{};const o=new Promise(a=>i=a);if(S(this,Ei).push({resolver:i,values:{name:e,property:n,lazy:r}}),await gd(0),S(this,Ei).length){const a=S(this,Ei).map(u=>u.resolver),s=S(this,Ei).map(({values:{name:u,property:l,lazy:f}})=>({name:u,...l!=="Value"&&{property:[l]},...f===!0&&{lazy:f}}));Ae(this,Ei,[]);const c=S(this,Ge).getNextRequestId();this._callServer("SubscribeCmpUpdate",[s],{requestId:c}),await S(this,bn).awaitCspdUpdateResponse(c),a.forEach(u=>u())}return o}async requestCmpEditorCspd(e,n){const r=S(this,Ge).getNextRequestId(),i=Xv(e);this._callServer("RequestCspd",[[{slot:i,cspdId:n?hr.TableEditor:hr.ValueEditor,targetComponent:e,parameters:void 0}]],{requestId:r}),await S(this,bn).awaitCspdUpdateResponse(r)}async releaseCmpEditorCspd(e){const n=e.map(r=>Xv(r));await this._callServer("ReleaseCspd",n)}async createCmp(e,n,r){const i=[e,n,r],o=await this._callServer("CreateComponent",i);o!=null&&o.error&&Nn(o.error)}async renameCmp(e,n){const r=[e,n],i=await this._callServer("RenameComponent",r);i!=null&&i.error&&Nn(i.error)}async renameCmpGroup(e,n){const r=[e,n],i=await this._callServer("RenameComponentGroup",r);i!=null&&i.error&&Nn(i.error)}async copyCmp(e,n){const r=[e,n],i=await this._callServer("CopyComponent",r);i!=null&&i.error&&Nn(i.error)}async deleteCmp(e){const n=[e],r=await this._callServer("DeleteComponent",n);r!=null&&r.error&&Nn(r.error)}async initiateCfgrFiles(e){const n=await this._callServer("InitiateCfgrFiles",[e]);return Xe("ConfiguratorClientInternals","initiateCfgrFiles","After initiate",{payload:e,result:n}),n!=null&&n.error&&Nn(n.error),(n==null?void 0:n.value)??{}}async completeCfgrFiles(e){const n=S(this,Ge).getNextRequestId(),r=await this._callServer("CompleteCfgrFiles",[e],{requestId:n});return Xe("ConfiguratorClientInternals","completeCfgrFiles","After complete",{payload:e,result:r}),r!=null&&r.error&&Nn(r.error),(r==null?void 0:r.value)??{}}async deleteCfgrFile(e,n){const r=S(this,Ge).getNextRequestId(),i=await this._callServer("DeleteCfgrFile",[e,n],{requestId:r});Xe("ConfiguratorClientInternals","deleteCfgrFile","After complete",{payload:{type:e,fileName:n},result:i}),i!=null&&i.error&&Nn(i.error)}async initiateCfgnFiles(e){const n=await this._callServer("InitiateCfgnFiles",[e]);return Xe("ConfiguratorClientInternals","initiateCfgnFiles","After initiate",{payload:e,result:n}),(n==null?void 0:n.value)??{}}async completeCfgnFiles(e){const n=S(this,Ge).getNextRequestId(),r=[this._callServer("CompleteCfgnFiles",[e],{requestId:n}),S(this,bn).awaitCspdUpdateResponse(n)],[i]=await Promise.all(r);return Xe("ConfiguratorClientInternals","completeCfgnFiles","After complete",{payload:e,result:i}),(i==null?void 0:i.value)??{}}async completeCfgnFileAndConvertToPdf(e,n,r){const i=S(this,Ge).getNextRequestId(),o=[this._callServer("CompleteCfgnFileAndConvertToPdf",[e,n,r],{requestId:i}),S(this,bn).awaitCspdUpdateResponse(i)],[a]=await Promise.all(o);return Xe("ConfiguratorClientInternals","completeCfgnFiles","After complete",{payload:{fileName:e,sasUri:n,pdfOptions:r},result:a}),a}async shareConfiguration(e){const n=S(this,Ge).getNextRequestId(),r=await this._callServer("ShareConfiguration",[e],{requestId:n});return r==null?void 0:r.value}async checkoutConfiguration(e){const n=S(this,Ge).getNextRequestId(),r=await this._callServer("Checkout",[e],{requestId:n});return r==null?void 0:r.value}async assignAssetBundleToCfgrDraft(e,n,r,i){const o=[e,n,r,i],a=await this._callServer("AssignAssetBundleToCfgrDraft",o);a!=null&&a.error&&Nn(a.error)}async unassignAssetBundleFromCfgrDraft(e){const n=[e],r=await this._callServer("UnassignAssetBundleFromCfgrDraft",n);r!=null&&r.error&&Nn(r.error)}async requestCtrlFiberCspd(){const e=S(this,Ge).getNextRequestId();this._callServer("RequestCspd",[[{slot:Qp.Fiber,cspdId:hr.Fiber,targetComponent:ir.CtrlFibers,parameters:void 0}]],{requestId:e}),await S(this,bn).awaitCspdUpdateResponse(e)}async releaseCtrlFiberCspd(){await this._callServer("ReleaseCspd",[Qp.Fiber])}async requestCtrlFiberEditorCspd(e,n){const r=S(this,Ge).getNextRequestId(),i=Gv(e);this._callServer("RequestCspd",[[{slot:i,cspdId:hr.FiberEditor,targetComponent:`${ir.CtrlFibers}.${n}`,parameters:void 0}]],{requestId:r}),await S(this,bn).awaitCspdUpdateResponse(r)}async releaseCtrlFiberEditorCspd(e){const n=e.map(r=>Gv(r));await this._callServer("ReleaseCspd",n)}async createOrChangeCtrlFiber(e,n,r,i){const o=`${ir.CtrlFibers}.${e}`;await this._callServer("CreateOrChangeFiber",[o,n,r,i])}async deleteCtrlFiber(e,n){const r=`${ir.CtrlFibers}.${e}`;await this._callServer("DeleteFiber",[r,n])}async deleteCtrlFiberPack(e){const n=`${ir.CtrlFibers}.${e}`;await this._callServer("DeleteFiberPack",[n])}async moveCtrlFiberPack(e,n){const r=`${ir.CtrlFibers}.${e}`,i=`${ir.CtrlFibers}.${n}`;await this._callServer("MoveFiberPack",[r,i])}async copyCtrlFiberPack(e,n,r){const i=`${ir.CtrlFibers}.${e}`,o=`${ir.CtrlFibers}.${n}`;await this._callServer("CopyFiberPack",[i,o,r])}async publishCfgr(e,n,r,i){const o=await this._callServer("Publish",[e,n,r,i]);if(cu(o==null?void 0:o.error))return o.error}}Ge=new WeakMap,bn=new WeakMap,Ii=new WeakMap,lu=new WeakMap,ki=new WeakMap,fu=new WeakSet,Ih=async function(t,e,n,r){let i=()=>{};const o=new Promise(a=>i=a);if(S(this,ki).push({resolver:i,values:{name:t,value:e,zodType:r}}),await gd(0),S(this,ki).length){const a=S(this,ki).map(m=>m.resolver),s=S(this,ki).filter((m,d,h)=>h.findLastIndex(g=>g.values.name===m.values.name)<=d);Ae(this,ki,[]);const c=s.map(({values:{name:m,value:d,zodType:h}})=>{const g=d!==void 0&&wm(d)?Lb(m,d,h):d;return{name:m,value:g}}),u=n==="change-preset-value",l=u?void 0:S(this,Ge).getNextRequestId(),f=u?"ChangePresetValue":"ChangeConfigurationValue";this._callServer(f,[c],{requestId:l,isChunkable:!0}),l&&await S(this,bn).awaitCspdUpdateResponse(l),a.forEach(m=>m())}return o},Ti=new WeakMap,Ei=new WeakMap;var l0=(t=>(t[t.Fedl=1]="Fedl",t[t.Css=2]="Css",t[t.JavaScript=3]="JavaScript",t[t.CustomCodePack=4]="CustomCodePack",t[t.Fedl2=5]="Fedl2",t))(l0||{}),kh,Xo,ms;class W1{constructor(){fe(this,kh,600*1e3-60*1e3),fe(this,Xo),fe(this,ms),Ae(this,ms,new tc)}onSessionLifeTimeReached(e){S(this,ms).on("sessionLifeTimeReached",e)}restartSessionLifeTimer(){this.stopSessionLifeTimer(),Ae(this,Xo,window.setTimeout(()=>{S(this,ms).emit("sessionLifeTimeReached")},S(this,kh)))}stopSessionLifeTimer(){S(this,Xo)&&(window.clearTimeout(S(this,Xo)),Ae(this,Xo,void 0))}}kh=new WeakMap,Xo=new WeakMap,ms=new WeakMap;const O1=k.z.enum(["edit","view"]),F1=t=>O1.safeParse(t).success,H1="wss://portal.combeenation.com/signalR",q1={[N.Trace]:"Trace",[N.Debug]:"Debug",[N.Information]:"Information",[N.Warning]:"Warning",[N.Error]:"Error",[N.Critical]:"Critical",[N.None]:"None"},V1="userland",B1=k.z.enum(["theme","user",V1]),K1=k.z.object({lastEditedAt:k.z.number(),lastEditedBy:k.z.string(),size:k.z.number(),type:k.z.nativeEnum(l0),url:k.z.string().url()}),X1=k.z.object({fedl:k.z.object({lastEditedAt:Db,lastEditedBy:k.z.string(),metadata:k.z.object({LayoutVersion:k.z.string()}),size:k.z.number(),url:k.z.string().url()}),customCode:k.z.record(k.z.string(),K1).optional(),css:k.z.record(B1,k.z.object({url:k.z.string().url()})).optional()}),J1=k.z.object({value:k.z.object({cfgrVersion:k.z.string(),draftName:k.z.string(),lastEditedAt:k.z.number(),lastEditedBy:k.z.string(),presetId:k.z.string(),published:k.z.object({isPublished:k.z.boolean(),version:k.z.string()}),files:X1})}),f0=k.z.object({value:k.z.object({cfgrVersion:k.z.string(),copyUrl:k.z.string(),editUrl:k.z.string(),newUrl:k.z.string()})}),Qv=t=>f0.safeParse(t).success;var dr,Zt,Th,dl,Yt,ra,wa,Ot,Eh,d0,Zv,Yv,du;class G1{constructor(){fe(this,Yt),fe(this,dr),fe(this,Zt),fe(this,Th,N.Warning),fe(this,dl,"not-initialized"),fe(this,wa),fe(this,Ot),fe(this,Eh,0),eo(this,"getNextRequestId",()=>(++pb(this,Eh)._).toString()),Ae(this,dr,new W1),S(this,dr).onSessionLifeTimeReached(()=>nn(this,Yt,d0).call(this)),Ae(this,Zt,new tc)}get state(){return S(this,dl)}get isInitialized(){return this.state!=="not-initialized"}get connection(){return S(this,Ot)}onConnected(e){S(this,Zt).on("connectionEstablished",e)}onConnectionClosed(e){S(this,Zt).on("connectionClosed",e)}onCspdUpdate(e){S(this,Zt).on("cspdUpdate",e)}onCspdUpdateParts(e){S(this,Zt).on("cspdUpdateParts",e)}onConnectionRestored(e){S(this,Zt).on("connectionRestored",e)}async connectEditor(e){return await nn(this,Yt,du).call(this,e)}async connectCfgr(e){return await nn(this,Yt,du).call(this,e)}async restoreConnection(){if(!S(this,wa)){Ze("ConnectionManager","restoreConnection","There's no previous connection to restore. Create a connection with `client.connectEditor()` or `client.connectCfgr()` first.");return}S(this,dr).stopSessionLifeTimer();const[e]=await aa(this.closeConnection());e&&Ze("ConnectionManager","restoreConnection","Error closing connection",e),await nn(this,Yt,du).call(this,S(this,wa))&&S(this,Zt).emit("connectionRestored")}async closeConnection(){var e;Ae(this,Yt,"disconnecting",ra);try{await((e=S(this,Ot))==null?void 0:e.stop())}catch{}Ae(this,Yt,"disconnected",ra)}extendSessionLifetime(){S(this,dr).restartSessionLifeTimer()}}dr=new WeakMap,Zt=new WeakMap,Th=new WeakMap,dl=new WeakMap,Yt=new WeakSet,ra=function(t){Ae(this,dl,t),Xe("ConnectionManager","",`State changed to "${t}"`)},wa=new WeakMap,Ot=new WeakMap,Eh=new WeakMap,d0=function(){Xe("ConnectionManager","#onSessionLifeTimeReached","Session lifetime reached"),this.closeConnection()},Zv=function(t,e){if(t<S(this,Th))return;const n=q1[t];Xe("ConnectionManager","#onConnectionLog",`[SignalR ${n}] ${e}`,{logLevel:t},"yellow")},Yv=function(t){t?Ze("ConnectionManager","#handleConnectionClosed","Connection closed with error",t):this.state!=="disconnecting"?Ze("ConnectionManager","#handleConnectionClosed","Connection closed unexpectedly"):Xe("ConnectionManager","#handleConnectionClosed","Connection closed"),Ae(this,Ot,void 0),Ae(this,Yt,"disconnected",ra),S(this,dr).stopSessionLifeTimer(),S(this,Zt).emit("connectionClosed")},du=async function(t){if(Xe("ConnectionManager","connect","Connecting to configurator"),this.isInitialized&&this.state!=="disconnected"){Ze("ConnectionManager","connect",`Cannot connect whilst in state "${this.state}"`);return}Ae(this,Yt,"connecting",ra),Ae(this,wa,t),S(this,dr).stopSessionLifeTimer();const e=t.serverUrl??H1;Ae(this,Ot,new lb().withUrl(e,{transport:ct.WebSockets,skipNegotiation:!0}).configureLogging({log:nn(this,Yt,Zv).bind(this)}).build()),S(this,Ot).onclose(g=>nn(this,Yt,Yv).call(this,g)),S(this,Ot).on("cspdUpdate",g=>{S(this,Zt).emit("cspdUpdate",g)}),S(this,Ot).on("cspdUpdateParts",(g,p,v,b)=>S(this,Zt).emit("cspdUpdateParts",g,p,v,b));const[n]=await aa(S(this,Ot).start());if(n){Ze("ConnectionManager","connect","Connecting to configurator failed",n),await this.closeConnection();return}Xe("ConnectionManager","connect","WS connection established");const r=F1(t.mode),i=r?["",t.companyName,t.configuratorName,t.draftName,t.mode,"000"]:[t.mode,t.companyName,t.configuratorName,...t.mode==="preview"?[t.draftName]:[],...t.editCfgn?[t.editCfgn.cfgnId,"edit",t.editCfgn.authToken]:[]],o=this.getNextRequestId(),a=window.innerWidth,s=window.innerHeight,c={cbnInitialWindowWidth:a.toString(),cbnInitialWindowHeight:s.toString()},u={width:a,height:s,userAgent:navigator.userAgent},l=void 0,[f,m]=await aa(r?S(this,Ot).invoke("StartProductEditor",i,o,c,l):S(this,Ot).invoke("StartConfiguration",i,o,c,l,u)),d=r?J1.safeParse(m):f0.safeParse(m);if(f||!d.success){const g=f??d.error;Ze("ConnectionManager","connect",f?"Error starting configuration":"Error parsing start response",{error:g,startCfgnResponse:m}),await this.closeConnection();return}const h=Qv(d.data)?Cm(d.data.value.editUrl):{cfgnId:"not-used-in-editor",authToken:"not-used-in-editor"};if(!h||!h.cfgnId||!h.authToken)throw new Error("Error parsing edit URL from start response");if(Xe("ConnectionManager","connect","Connection to configurator established",{startCfgnResponseParsed:d}),Ae(this,Yt,"connected",ra),S(this,dr).restartSessionLifeTimer(),S(this,Zt).emit("connectionEstablished"),Qv(d.data)){const{cfgnId:g,authToken:p}=h;return S(this,wa).editCfgn={cfgnId:g,authToken:p},{connection:S(this,Ot),...d.data.value,cfgnId:g,authToken:p}}else return{connection:S(this,Ot),...d.data.value}};const Q1=k.z.object({Name:yb,ComponentInfo:k.z.object({$nam:k.z.string(),$typ:um}).optional(),Group:k.z.object({$val:k.z.string()}).optional(),Value:k.z.object({$val:fm,$inp:lm.optional(),$ipt:sm.optional(),$src:k.z.string().optional()}).optional(),Query:k.z.union([k.z.object({$val:k.z.union([k.z.literal("[DataSourceQuery]"),Xh]),$src:k.z.string()}),k.z.object({}).transform(()=>{})]).optional(),Archive:k.z.object({$val:k.z.boolean()}).optional()}),Z1=k.z.record(i0,Q1),Y1=k.z.enum(["Value","Records"]),eE=k.z.object({Name:k.z.literal("ComponentList").or(k.z.literal("Configurator")),$val:k.z.record(k.z.string(),k.z.union([k.z.object({$typ:um.optional(),$chg:k.z.array(Y1).optional(),Value:k.z.any().optional(),Group:k.z.string().optional()}),k.z.string().array()]))}),tE=k.z.union([k.z.number(),k.z.array(k.z.number()),k.z.null()]),h0=k.z.lazy(()=>k.z.union([tE,k.z.record(h0)])),nE=k.z.record(Ml,k.z.union([k.z.number(),k.z.array(k.z.number()),k.z.null()])),p0=k.z.lazy(()=>k.z.union([nE,k.z.record(p0)])),rE=k.z.object({Name:k.z.literal("ConfiguratorInspector"),Errors:k.z.object({Cfgr:h0.optional(),Fibers:k.z.object({CtrlFibers:p0.optional()}).optional(),$val:k.z.array(k.z.object({Id:k.z.string(),Message:k.z.string(),route:k.z.any()}))})}),iE=k.z.object({number:k.z.number(),partialNumber:k.z.number().optional(),isPartial:k.z.boolean().optional(),request:k.z.string().optional(),west:eE.optional(),fiber:U1.optional(),inspector:rE.optional()}).passthrough().refine(t=>Object.keys(t).filter(u0).every(e=>c0(t[e]))),oE=t=>!isNaN(t.partialNumber??NaN);var vt,Ms,hu,pu,Jo,ys,gu,xh,Ph,g0,_s,Dh,cr,Rh,Ah,Mh,ia,zh,Fr,Uh,Nh,$h,Lh,jh,Wh,Go;class aE{constructor(e,n){fe(this,Ph),fe(this,vt),fe(this,Ms,!1),fe(this,hu,{}),fe(this,pu,{}),fe(this,Jo),fe(this,ys,new Map),fe(this,gu,new Map),eo(this,"awaitCspdUpdateResponse",async r=>{const i=S(this,gu).get(r);if(i)return i;const o=new Promise(a=>S(this,ys).set(r,a));return S(this,gu).set(r,o),o}),fe(this,xh,r=>{const i=S(this,ys).get(r);i&&(i(),S(this,ys).delete(r))}),fe(this,_s,{}),fe(this,Dh,async(r,i,o,a)=>{Xe("WsCspdUpdateHandler","#handleCspdUpdateParts","Received cspd update part",{msgId:r,partNr:i,totalParts:o,msgPart:a});const s=S(this,_s)[r]??{messageParts:[],receivedPartsCnt:0,totalParts:o};if(s.receivedPartsCnt++,s.messageParts[i]=a,S(this,_s)[r]=s,s.totalParts===s.receivedPartsCnt){delete S(this,_s)[r];const c=s.messageParts.join("");Xe("WsCspdUpdateHandler","#handleCspdUpdateParts","All cspd update parts received",{message:c}),S(this,Go).call(this,c)}}),fe(this,cr,{}),fe(this,Rh,async r=>{Xe("WsCspdUpdateHandler","#handleCspdUpdatePartial","",{data:r});const i=r.number;S(this,cr)[i]||(S(this,cr)[i]=[]),S(this,cr)[i][r.partialNumber]=r;const o=Object.values(S(this,cr)[i]).find(s=>!s.isPartial),a=S(this,cr)[i].filter(Boolean);if(o&&a.length===o.partialNumber+1&&a.every((s,c)=>s.partialNumber===c)){const s=Wn(...S(this,cr)[i]);delete s.partialNumber,delete s.isPartial,Xe("WsCspdUpdateHandler","#handleCspdUpdatePartial","All partial parts received",{mergedData:s}),delete S(this,cr)[i],S(this,Go).call(this,s)}}),fe(this,Ah,2147483647),fe(this,Mh,-2147483648),fe(this,ia,0),fe(this,zh,()=>{const r=S(this,ia);return S(this,Ah)===r?S(this,Mh):r+1}),fe(this,Fr,[]),fe(this,Uh,r=>{const[i,o]=pl(r);if(i)return[i,null];const{error:a,data:s}=iE.safeParse(o);if(a)return[a,null];const c=(o&&typeof o=="object"?Object.entries(o):[]).reduce((m,[d,h])=>(E1(d)&&(m[d]=h),m),{}),{error:u,data:l}=Z1.safeParse(c);if(u)return[u,null];const f={...s,...Object.keys(l).length&&{editorData:l}};return[null,{rawResponse:o,parsedResponse:f}]}),fe(this,Nh,r=>{const i=r.$del??[],o=Object.entries(r),{staleCmps:a,updatedCmps:s}=(o==null?void 0:o.reduce((c,[u,l])=>{if(Ct(l))return c;const{$chg:f,$typ:m,Value:d,Group:h}=l;f&&c.staleCmps.push({name:u,changedCmpProperties:f});const g=Da(u);m&&(S(this,hu)[g]=m);const p=S(this,hu)[g],v=eg(p),b=mb.some(x=>v===x),P=f==null?void 0:f.includes("Value");if(!b&&!P){const[x,R]=Hc(()=>S(this,Jo).call(this,g,p,d));if(x){const q=x instanceof Error?x.message:"Unknown error",A={name:u,type:p,value:d,error:x};Ze("WsCspdUpdateHandler","#getCmpListDataFromCspdUpdate",`Failed to parse cmp value: ${q}`,A)}else c.updatedCmps.push({name:u,value:R,type:p,group:h})}return c},{staleCmps:[],updatedCmps:[]}))??{staleCmps:[],updatedCmps:[]};return{staleCmps:a,updatedCmps:s,deletedCmps:i}}),fe(this,$h,r=>Object.entries(r).map(([i,o])=>{const a=x1(i),{$typ:s}=o.ComponentInfo??{},{$inp:c,$ipt:u,$src:l,$val:f}=o.Value??{},{$src:m}=o.Query??{};s&&(S(this,pu)[a]=s);const d=S(this,pu)[a],h=Yp(f)?f:void 0,[g,p]=h?[void 0,void 0]:Hc(()=>S(this,Jo).call(this,a,d,f));if(g){const W=g instanceof Error?g.message:"Unknown error",j={cmpId:a,cmpType:d,value:f};Ze("WsCspdUpdateHandler","#getCmpEditorDataFromCspdUpdate",`Failed to parse cmp editor value: ${W}`,j)}const v=eg(d),b=_m(d),P=u||d&&P1(d),x=`${v}<${P}>`,[R,q]=Hc(()=>S(this,Jo).call(this,a,x,c));if(R){const W=R instanceof Error?R.message:"Unknown error",j={cmpId:a,cmpType:d,value:c};Ze("WsCspdUpdateHandler","#getCmpEditorDataFromCspdUpdate",`Failed to parse cmp editor input value: ${W}`,j)}const A=l??m??"",I=pr(q)||Ct(q)?JSON.stringify(q):q;return{cmpId:a,value:p,error:h,input:I,inputType:P,source:A,type:b,baseType:v}})??[]),fe(this,Lh,r=>{const i=uu(r.$val),o=r.$typ?uu(r.$typ):[];return{updatedFibers:i.reduce((a,{ctrlId:s,values:c})=>(a[s]=Object.entries(c).map(([u,l])=>{var f;const m=u,d=(f=o.find(g=>g.ctrlId===s))==null?void 0:f.values[m],h=Yp(l)?l:void 0;return{propertyName:m,type:d,value:h?void 0:l,error:h}}),a),{})}}),fe(this,jh,r=>r.map(i=>{const o=A1(i.Pack),a=Object.entries(i.Fibers).map(([s,c])=>({propertyName:s,type:c.$typ,hiveRule:c.$src}));return{ctrlId:o,fibers:a}})),fe(this,Wh,r=>{var i;const o=v=>{if(typeof v=="number"||Ct(v)||v===null)return v;const b=Object.keys(v).filter(x=>x!=="$err")[0],P=v[b];return o(P)},a={cmpsWithSourceErrors:[],cmpsWithCascadingErrors:[],cmpsWithResolvedErrors:[]},s=r.Errors.Cfgr,{cmpsWithSourceErrors:c,cmpsWithCascadingErrors:u,cmpsWithResolvedErrors:l}=s?Object.entries(s).reduce((v,[b,P])=>{const x=o(P);return typeof x=="number"?v.cmpsWithSourceErrors.push(b):Ct(x)?v.cmpsWithCascadingErrors.push(b):x===null&&v.cmpsWithResolvedErrors.push(b),v},a):a,f={ctrlFibersWithSourceErrors:[],ctrlFibersWithCascadingErrors:[],ctrlFibersWithResolvedErrors:[]},m=(i=r.Errors.Fibers)==null?void 0:i.CtrlFibers,d=m&&uu(m),{ctrlFibersWithSourceErrors:h,ctrlFibersWithCascadingErrors:g,ctrlFibersWithResolvedErrors:p}=d?d.reduce((v,{ctrlId:b,values:P})=>(Object.entries(P).forEach(([x,R])=>{const q=x;typeof R=="number"?v.ctrlFibersWithSourceErrors.push({ctrlId:b,fiberName:q}):Ct(R)?v.ctrlFibersWithCascadingErrors.push({ctrlId:b,fiberName:q}):R===null&&v.ctrlFibersWithResolvedErrors.push({ctrlId:b,fiberName:q})}),v),f):f;return{cmpsWithSourceErrors:c,cmpsWithCascadingErrors:u,cmpsWithResolvedErrors:l,ctrlFibersWithSourceErrors:h,ctrlFibersWithCascadingErrors:g,ctrlFibersWithResolvedErrors:p}}),fe(this,Go,r=>{var i;const[o,a]=Er(r)?S(this,Uh).call(this,r):[null,{parsedResponse:r,rawResponse:r}];if(o){Ze("WsCspdUpdateHandler","#handleCspdUpdate","Failed to parse cspd update",{error:o,errorMsg:o.message,rawResponse:r});return}const{parsedResponse:s,rawResponse:c}=a;if(oE(s)){S(this,Rh).call(this,s);return}const u=S(this,ia);if(s.number!==u){S(this,Fr).push(s),Xe("WsCspdUpdateHandler","#handleCspdUpdate",`Waiting for msg number ${u}, received ${s.number}. Saving data for later processing.`,{rawResponse:c,parsedResponse:s,queue:S(this,Fr)});return}Xe("WsCspdUpdateHandler",`#handleCspdUpdate, ID ${s.request}`,"",{rawResponse:c,parsedResponse:s});const l=!S(this,Ms);Ae(this,Ms,!0);const f=S(this,zh).call(this);Ae(this,ia,f);const m=(i=s.west)==null?void 0:i.$val,{staleCmps:d,updatedCmps:h,deletedCmps:g}=m?S(this,Nh).call(this,m):{staleCmps:[],updatedCmps:[],deletedCmps:[]};S(this,vt).emit("cmpListCspdUpdateProcessed",{isFirstCspdUpdate:l,staleCmps:d,updatedCmps:h,deletedCmps:g});const p=s.editorData,v=p?S(this,$h).call(this,p):[];v.length&&S(this,vt).emit("cmpEditorCspdUpdateProcessed",v);const b=s.fiber,P=b&&S(this,Lh).call(this,b);P&&S(this,vt).emit("ctrlFiberCspdUpdateProcessed",P);const x=Object.entries(s).map(([W,j])=>u0(W)&&c0(j)?j:void 0).filter(W=>W!==void 0),R=x&&S(this,jh).call(this,x);R&&S(this,vt).emit("ctrlFiberEditorCspdUpdateProcessed",R);const q=s.inspector,A=q&&S(this,Wh).call(this,q);A&&S(this,vt).emit("inspectorCspdUpdateProcessed",A),s.request&&S(this,xh).call(this,s.request);const I=S(this,Fr).findIndex(W=>W.number===f);if(I>=0){const W=S(this,Fr)[I];S(this,Fr).splice(I,1),S(this,Go).call(this,W)}}),Ae(this,vt,new tc),Ae(this,Jo,n),e.onCspdUpdate(r=>S(this,Go).call(this,r)),e.onCspdUpdateParts((...r)=>S(this,Dh).call(this,...r)),e.onConnectionClosed(()=>nn(this,Ph,g0).call(this))}onCmpListCspdUpdateProcessed(e){return S(this,vt).on("cmpListCspdUpdateProcessed",e),{unsubscribe:()=>S(this,vt).off("cmpListCspdUpdateProcessed",e)}}onCmpEditorCspdUpdateProcessed(e,n){const r=i=>{const o=i.find(a=>a.cmpId===e);o&&n(o)};return S(this,vt).on("cmpEditorCspdUpdateProcessed",r),{unsubscribe:()=>S(this,vt).off("cmpEditorCspdUpdateProcessed",r)}}onCtrlFiberCspdUpdateProcessed(e){return S(this,vt).on("ctrlFiberCspdUpdateProcessed",e),{unsubscribe:()=>S(this,vt).off("ctrlFiberCspdUpdateProcessed",e)}}onCtrlFiberEditorCspdUpdateProcessed(e,n){const r=i=>{const o=i.find(a=>a.ctrlId===e);o&&n(o)};return S(this,vt).on("ctrlFiberEditorCspdUpdateProcessed",r),{unsubscribe:()=>S(this,vt).off("ctrlFiberEditorCspdUpdateProcessed",r)}}onInspectorCspdUpdateProcessed(e){return S(this,vt).on("inspectorCspdUpdateProcessed",e),{unsubscribe:()=>S(this,vt).off("inspectorCspdUpdateProcessed",e)}}}vt=new WeakMap,Ms=new WeakMap,hu=new WeakMap,pu=new WeakMap,Jo=new WeakMap,ys=new WeakMap,gu=new WeakMap,xh=new WeakMap,Ph=new WeakSet,g0=function(){Ae(this,Ms,!1),Ae(this,ia,0),Ae(this,Fr,[])},_s=new WeakMap,Dh=new WeakMap,cr=new WeakMap,Rh=new WeakMap,Ah=new WeakMap,Mh=new WeakMap,ia=new WeakMap,zh=new WeakMap,Fr=new WeakMap,Uh=new WeakMap,Nh=new WeakMap,$h=new WeakMap,Lh=new WeakMap,jh=new WeakMap,Wh=new WeakMap,Go=new WeakMap;var Wr,Hr,bs,ws,Sn,Oh,Cs,Fh,v0;class sE{constructor(e){fe(this,Cs),fe(this,Wr),fe(this,Hr),fe(this,bs),fe(this,ws),fe(this,Sn),fe(this,Oh,async()=>{await S(this,Sn).resubscribeToCmpUpdates()});const{connectionMgr:n,cspdUpdateHandler:r,cfgrClientInternals:i}=(e==null?void 0:e.internals)??{};Ae(this,Wr,n??new G1),S(this,Wr).onConnectionClosed(()=>S(this,Sn).markAllCmpPropertiesAsStale()),S(this,Wr).onConnectionRestored(()=>S(this,Oh).call(this)),Ae(this,Hr,new tc),Ae(this,Sn,new Hb),Ae(this,bs,r??new aE(S(this,Wr),Fb)),S(this,bs).onCmpListCspdUpdateProcessed(o=>nn(this,Cs,v0).call(this,o)),Ae(this,ws,i??new j1(S(this,Wr),S(this,bs))),C0(this,S(this,ws))}onNewCfgnIdCreated(e){S(this,Hr).on("newCfgnIdCreated",e)}async connect(e){const n=window.location.href,r=Vb(n)?Cm(n):void 0,i=r?{serverUrl:e.serverUrl,mode:e.mode,companyName:r.companyName,configuratorName:r.planName,draftName:r.planVersion,...(r==null?void 0:r.cfgnId)&&(r==null?void 0:r.authToken)&&{editCfgn:{cfgnId:r.cfgnId,authToken:r.authToken}}}:e,o=await S(this,Wr).connectCfgr(i);if(o&&(S(this,Hr).emit("newCfgnIdCreated",o.cfgnId,o.authToken),r)){const a=o.editUrl+window.location.search;window.history.replaceState({},"",a)}}async getCmpValue(e){return await S(this,Sn).getCmpValue(e)}async onCmpValueChanged(e,n,r,i=!1){await S(this,Sn).subscribeToCmpUpdates(e,"Value"),S(this,Hr).on("cmpsUpdated",o=>{o.find(a=>a===e)&&nn(this,Cs,Fh).call(this,e,n,r)}),i&&nn(this,Cs,Fh).call(this,e,n,r)}async onAnyCmpValueChanged(e,n,r=!1){n.length||Ze("ConfiguratorClient","onAnyCmpValueChanged","Please define at least one component!");const i=n.map(a=>S(this,Sn).subscribeToCmpUpdates(a.name,"Value",r));await Promise.all(i);const o=n.map(a=>a.name);S(this,Hr).on("cmpsUpdated",a=>{if(a.some(s=>o.includes(s))){const s=o.reduce((c,u)=>(c[u]=a.includes(u),c),{});e(s)}})}async setCmpInputs(e){const n=e.map(o=>({...o,cmp:dm(o.name)})),r=n.filter(o=>!ng(o.cmp));if(r.length){Ze("ConfiguratorClient","setCmpInputs","The following components have not been registered with the `ConfiguratorClient` or are not supported by `setCmpInputs`. They will be ignored:",r);return}const i=n.filter(o=>ng(o.cmp)).map(o=>{const{zodType:a}=o.cmp,s=Da(o.name);return S(this,ws).setCmpInput(s,o.value,a)});await Promise.all(i)}}Wr=new WeakMap,Hr=new WeakMap,bs=new WeakMap,ws=new WeakMap,Sn=new WeakMap,Oh=new WeakMap,Cs=new WeakSet,Fh=async function(t,e,n){const r=await S(this,Sn).getCmpValue(t);(typeof n!="function"||await n(r))&&e(r)},v0=function(t){const{isFirstCspdUpdate:e,staleCmps:n,updatedCmps:r}=t;if(n.forEach(({name:i,changedCmpProperties:o})=>{S(this,Sn).markCmpPropertiesAsStale(i,o)}),r.forEach(({name:i,value:o})=>{S(this,Sn).updateCmp(i,o,e)}),r.length){const i=r.map(o=>o.name);S(this,Hr).emit("cmpsUpdated",i)}},eo(sE,"version",gb);const em=dd(),cE=em.onAnyCmpValueChanged.bind(em),uE=tm;console.log(`Loading custom code sdk v${tm}`);exports.CustomControl=P0;exports.ValueComponent=Jh;exports.onAnyCmpValueChanged=cE;exports.version=uE;
|
|
7
|
+
*/var Wu="Promise",kp="rejected";function Kt(t,e){return Ip(t,function(n){return e?e({status:"fulfilled",rejected:!1,value:n}):n},function(n){return e?e({status:kp,rejected:!0,reason:n}):n})}function Ip(t,e,n,r){var i=t;try{if(fi(t))(e||n)&&(i=t.then(e,n));else try{e&&(i=e(t))}catch(o){if(n)i=n(o);else throw o}}finally{}return i}var py=["pending","resolving","resolved",kp],Mg="dispatchEvent",Ac;function Pw(t){var e;return t&&t.createEvent&&(e=t.createEvent("Event")),!!e&&e.initEvent}function Dw(t,e,n,r){var i=It();!Ac&&(Ac=bn(!!rt(Pw,[i]).v));var o=Ac.v?i.createEvent("Event"):r?new Event(e):{};if(n&&n(o),Ac.v&&o.initEvent(e,!1,!0),o&&t[Mg])t[Mg](o);else{var s=t["on"+e];if(s)s(o);else{var a=tt("console");a&&(a.error||a.log)(e,te(o))}}}var gy="unhandledRejection",Rw=gy.toLowerCase(),zg=[],Aw=0,Mw=10,df;function Ug(t){return pe(t)?t.toString():te(t)}function vy(t,e,n){var r=Al(arguments,3),i=0,o=!1,s,a=[],c=Aw++,u=!1,l=null,f;function m(x,R){try{zg.push(c),u=!0,l&&l.cancel(),l=null;var H=t(function(A,k){a.push(function(){try{var O=i===2?x:R,j=Ze(O)?s:pe(O)?O(s):O;fi(j)?j.then(A,k):O?A(j):i===3?k(j):A(j)}catch(K){k(K)}}),o&&p()},r);return H}finally{zg.pop()}}function d(x){return m(void 0,x)}function h(x){var R=x,H=x;return pe(x)&&(R=function(A){return x&&x(),A},H=function(A){throw x&&x(),A}),m(R,H)}function g(){return py[i]}function p(){if(a.length>0){var x=a.slice();a=[],u=!0,l&&l.cancel(),l=null,e(x)}}function v(x,R){return function(H){if(i===R){if(x===2&&fi(H)){i=1,H.then(v(2,1),v(3,1));return}i=x,o=!0,s=H,p(),!u&&x===3&&!l&&(l=vn(_,Mw))}}}function _(){if(!u)if(u=!0,qC())process.emit(gy,s,f);else{var x=cn()||pn();!df&&(df=bn(rt(tt,[Wu+"RejectionEvent"]).v)),Dw(x,Rw,function(R){return Re(R,"promise",{g:function(){return f}}),R.reason=s,R},!!df.v)}}f={then:m,catch:d,finally:h},Gn(f,"state",{get:g}),KC()&&(f[pp(11)]="IPromise");function P(){return"IPromise "+g()+(o?" - "+Ug(s):"")}return f.toString=P,(function(){pe(n)||tr(Wu+": executor is not a function - "+Ug(n));var x=v(3,0);try{n.call(f,v(2,0),x)}catch(R){x(R)}})(),f}function zw(t){return function(e){var n=Al(arguments,1);return t(function(r,i){try{var o=[],s=1;vp(e,function(a,c){a&&(s++,Ip(a,function(u){o[c]=u,--s===0&&r(o)},i))}),s--,s===0&&r(o)}catch(a){i(a)}},n)}}function Uw(t){return bn(function(e){var n=Al(arguments,1);return t(function(r,i){var o=[],s=1;function a(c,u){s++,Kt(c,function(l){l.rejected?o[u]={status:kp,reason:l.reason}:o[u]={status:"fulfilled",value:l.value},--s===0&&r(o)})}try{Ce(e)?ee(e,a):Zm(e)?vp(e,a):tr("Input is not an iterable"),s--,s===0&&r(o)}catch(c){i(c)}},n)})}function my(t){ee(t,function(e){try{e()}catch{}})}function Nw(t){var e=hc(t)?t:0;return function(n){vn(function(){my(n)},e)}}function yy(t,e){return vy(yy,Nw(e),t,e)}var hf;function $w(t,e){!hf&&(hf=bn(rt(tt,[Wu]).v||null));var n=hf.v;if(!n)return yy(t);pe(t)||tr(Wu+": executor is not a function - "+te(t));var r=0;function i(){return py[r]}var o=new n(function(s,a){function c(l){r=2,s(l)}function u(l){r=3,a(l)}t(c,u)});return Gn(o,"state",{get:i}),o}var pf;function Ga(t){return vy(Ga,my,t)}function Lw(t,e){return!pf&&(pf=Uw(Ga)),pf.v(t,e)}var gf;function Qn(t,e){return!gf&&(gf=bn($w)),gf.v.call(this,t,e)}var jw=zw(Qn),Fn=void 0,De="",Xo="channels",yt="core",Od="createPerfMgr",Fd="disabled",_s="extensionConfig",Jo="extensions",Zn="processTelemetry",Vu="priority",tu="eventsSent",Ua="eventsDiscarded",nu="eventsSendRequest",Wi="perfEvent",vf="offlineEventsStored",mf="offlineBatchSent",yf="offlineBatchDrop",Hu="getPerfMgr",Wd="domain",bf="path",Ow="Not dynamic - ",Fw="REDACTED",Ng=["sig","Signature","AWSAccessKeyId","X-Goog-Signature"],Ww="getPrototypeOf",Vw=/-([a-z])/g,Hw=/([^\w\d_$])/g,qw=/^(\d+[\w\d_$])/,Bw=Object[Ww];function no(t){return!B(t)}function qu(t){var e=t;return e&&de(e)&&(e=e[to](Vw,function(n,r){return r.toUpperCase()}),e=e[to](Hw,"_"),e=e[to](qw,function(n,r){return"_"+r})),e}function Dt(t,e){return t&&e?st(t,e)!==-1:!1}function Us(t){return t&&t.toISOString()||""}function Ne(t){return fp(t)?t[po]:De}function We(t,e,n,r,i){var o=n;return t&&(o=t[e],o!==n&&(!i||i(o))&&(!r||r(n))&&(o=n,t[e]=o)),o}function zt(t,e,n){var r;return t?(r=t[e],!r&&B(r)&&(r=Ze(n)?{}:n,t[e]=r)):r=Ze(n)?{}:n,r}function by(t,e){var n=null,r=null;return pe(t)?n=t:r=t,function(){var i=arguments;if(n&&(r=n()),r)return r[e][ho](r,i)}}function Kw(t,e,n){if(t&&e&&Xt(t)&&Xt(e)){var r=function(o){if(de(o)){var s=e[o];pe(s)?(!n||n(o,!0,e,t))&&(t[o]=by(e,o)):(!n||n(o,!1,e,t))&&(ii(t,o)&&delete t[o],Re(t,o,{g:function(){return e[o]},s:function(a){e[o]=a}}))}};for(var i in e)r(i)}return t}function Bu(t,e,n,r,i){t&&e&&n&&(t[e]=by(n,r))}function us(t,e,n,r){return t&&e&&Xt(t)&&Ce(n)&&ee(n,function(i){de(i)&&Bu(t,i,e,i)}),t}function Xw(t){return(function(){function e(){var n=this;t&&Pe(t,function(r,i){n[r]=i})}return e})()}function _y(t){return t&&Ed&&(t=op(Ed({},t))),t}function Cy(t,e,n,r,i,o){var s=arguments,a=s[0]||{},c=s[he],u=!1,l=1;for(c>0&&jm(a)&&(u=a,a=s[l]||{},l++),Xt(a)||(a={});l<c;l++){var f=s[l],m=Ce(f),d=Xt(f);for(var h in f){var g=m&&h in f||d&&ii(f,h);if(g){var p=f[h],v=void 0;if(u&&p&&((v=Ce(p))||Lt(p))){var _=a[h];v?Ce(_)||(_=[]):Lt(_)||(_={}),p=Cy(u,_,p)}p!==void 0&&(a[h]=p)}}}return a}function ru(t,e,n){var r=e&&e.featureOptIn&&e.featureOptIn[t];if(t&&r){var i=r.mode;if(i===3)return!0;if(i===2)return!1}return n}function Ku(t){try{return t.responseText}catch{}return null}function wy(t,e){return t?"XDomainRequest,Response:"+Ku(t)||"":e}function Xu(t,e){return t?"XMLHttpRequest,Status:"+t[fr]+",Response:"+Ku(t)||t.response||"":e}function $g(t,e){return e&&(hc(e)?t=[e].concat(t):Ce(e)&&(t=e.concat(t))),t}var Jw="Microsoft_ApplicationInsights_BypassAjaxInstrumentation",Lg="withCredentials",Gw="timeout";function Qw(t,e,n,r,i,o){i===void 0&&(i=!1);function s(c,u,l){try{c[u]=l}catch{}}var a=new XMLHttpRequest;return s(a,Jw,r),n&&s(a,Lg,n),a.open(t,e,!i),n&&s(a,Lg,n),!i&&o&&s(a,Gw,o),a}function Zw(t){var e={};if(de(t)){var n=Ve(t)[mo](/[\r\n]+/);ee(n,function(r){if(r){var i=r[hy](": ");if(i!==-1){var o=Ve(r.substring(0,i))[zs](),s=Ve(r[$d](i+1));e[o]=s}else e[Ve(r)]=1}})}return e}function _f(t,e,n){if(!t[n]&&e&&e.getResponseHeader){var r=e.getResponseHeader(n);r&&(t[n]=Ve(r))}return t}var Yw="kill-duration",eS="kill-duration-seconds",tS="time-delta-millis";function Cf(t,e){var n={};return t[Rg]?n=Zw(t[Rg]()):e&&(n=_f(n,t,tS),n=_f(n,t,Yw),n=_f(n,t,eS)),n}var nS="documentMode",rS="location",iS="console",Sy="JSON",oS="crypto",sS="msCrypto",aS="ReactNative",Vd="msie",Hd="trident/",ky="XMLHttpRequest",wf=null,Sf=null,Uo=null,kf=null;function Iy(t,e){var n=!1;if(t){try{if(n=e in t,!n){var r=t[Bn];r&&(n=e in r)}}catch{}if(!n)try{var i=new t;n=!Ze(i[e])}catch{}}return n}function Hn(t){return typeof location===Um&&location?location:tt(rS)}function cS(){return typeof console!==ip?console:tt(iS)}function vc(){return!!(typeof JSON===Um&&JSON||tt(Sy)!==null)}function An(){return vc()?JSON||tt(Sy):null}function uS(){return tt(oS)}function lS(){return tt(sS)}function fS(){var t=nr();return t&&t.product?t.product===aS:!1}function qd(){var t=nr();if(t&&(t[Nd]!==Sf||wf===null)){Sf=t[Nd];var e=(Sf||De)[zs]();wf=Dt(e,Vd)||Dt(e,Hd)}return wf}function Ty(t){if(t===void 0&&(t=null),!t){var e=nr()||{};t=e?(e.userAgent||De)[zs]():De}var n=(t||De)[zs]();if(Dt(n,Vd)){var r=It()||{};return Ma(parseInt(n[mo](Vd)[1]),r[nS]||0)}else if(Dt(n,Hd)){var i=parseInt(n[mo](Hd)[1]);if(i)return i+4}return null}function va(t){return(kf===null||t===!1)&&(kf=VC()&&!!nr().sendBeacon),kf}function Tp(t){var e=!1;try{e=!!tt("fetch");var n=tt("Request");e&&t&&n&&(e=Iy(n,"keepalive"))}catch{}return e}function dS(){return Uo===null&&(Uo=typeof XDomainRequest!==ip,Uo&&Ml()&&(Uo=Uo&&!Iy(tt(ky),"withCredentials"))),Uo}function Ml(){var t=!1;try{var e=tt(ky);t=!!e}catch{}return t}function hS(t,e){return t&&t.dispatchEvent&&e?(t.dispatchEvent(e),!0):!1}function pS(t,e){var n=null,r={detail:e||null};if(pe(CustomEvent))n=new CustomEvent(t,r);else{var i=It();i&&i.createEvent&&(n=i.createEvent("CustomEvent"),n.initCustomEvent(t,!0,!0,r))}return n}function gS(t,e,n){var r=pn();if(r&&r.CustomEvent)try{var i={cfg:e||null,customDetails:n||null};return hS(r,pS(t,i))}catch{}return!1}function vS(t){return t.replace(/^([a-zA-Z][a-zA-Z0-9+.-]*:\/\/)([^:@]{1,200}):([^@]{1,200})@(.*)$/,"$1REDACTED:REDACTED@$4")}function mS(t,e){var n,r=st(t,"?");if(r===-1)return t;e&&e.redactQueryParams?n=Ng.concat(e.redactQueryParams):n=Ng;var i=Bt(t,0,r+1),o=Bt(t,r+1),s=De,a=st(o,"#");a!==-1&&(s=Bt(o,a),o=Bt(o,0,a));for(var c=!1,u=0;u<n[he];u++){var l=n[u]+"=";if(st(o,l)!==-1){c=!0;break}}if(!c)return t;var f=[],m=!1;if(o&&o[he])for(var d=o[mo]("&"),u=0;u<d[he];u++){var h=d[u];if(h){var g=st(h,"=");if(g===-1)f[Ee](h);else{var p=h[$d](0,g),v=h[$d](g+1);if(v===De)f[Ee](h);else{for(var _=!1,P=0;P<n[he];P++)if(p===n[P]){_=!0,m=!0;break}_?f[Ee](p+"="+Fw):f[Ee](h)}}}}return m?i+f.join("&")+s:t}function gr(t,e){if(!t||!de(t)||t[hy](" ")!==-1)return t;var n=e&&e.redactUrls===!1;if(n)return t;var r=st(t,"@")!==-1,i=st(t,"?")!==-1;if(!r&&!i)return t;try{var o=t;return r&&(o=vS(t)),i&&(o=mS(o,e)),o}catch{return t}}var Ey=4294967296,si=4294967295,xy=123456789,Py=987654321,Dy=!1,ma=xy,ya=Py;function yS(t){t<0&&(t>>>=0),ma=xy+t&si,ya=Py-t&si,Dy=!0}function bS(){try{var t=Rn()&2147483647;yS((Math.random()*Ey^t)+t)}catch{}}function _S(t){return an(Qa()/si*(t+1))>>>0}function Qa(t){var e=0,n=uS()||lS();return n&&n.getRandomValues&&(e=n.getRandomValues(new Uint32Array(1))[0]&si),e===0&&qd()&&(Dy||bS(),e=CS()&si),e===0&&(e=an(Ey*Math.random()|0)),e>>>=0,e}function CS(t){ya=36969*(ya&65535)+(ya>>16)&si,ma=18e3*(ma&65535)+(ma>>16)&si;var e=(ya<<16)+(ma&65535)>>>0&si|0;return e>>>=0,e}function Ep(t){t===void 0&&(t=22);for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n=Qa()>>>0,r=0,i=De;i[he]<t;)r++,i+=e.charAt(n&63),n>>>=6,r===5&&(n=(Qa()<<2&4294967295|n&3)>>>0,r=0);return i}var Ry="3.3.11",wS="."+Ep(6),SS=0;function Ay(t){return t.nodeType===1||t.nodeType===9||!+t.nodeType}function kS(t,e){var n=e[t.id];if(!n){n={};try{Ay(e)&&Re(e,t.id,{e:!1,v:n})}catch{}}return n}function mn(t,e){return e===void 0&&(e=!1),qu(t+SS+++(e?"."+Ry:De)+wS)}function My(t){var e={id:mn("_aiData-"+(t||De)+"."+Ry),accept:function(n){return Ay(n)},get:function(n,r,i,o){var s=n[e.id];return s?s[qu(r)]:(o&&(s=kS(e,n),s[qu(r)]=i),i)},kill:function(n,r){if(n&&n[r])try{delete n[r]}catch{}}};return e}function iu(t){return t&&Xt(t)&&!Ce(t)&&(t.isVal||t.fb||ii(t,"v")||ii(t,"mrg")||ii(t,"ref")||t.set)}function zy(t,e,n){var r,i=n.dfVal||hC;if(e&&n.fb){var o=n.fb;Ce(o)||(o=[o]);for(var s=0;s<o[he];s++){var a=o[s],c=e[a];if(i(c)?r=c:t&&(c=t.cfg[a],i(c)&&(r=c),t.set(t.cfg,$t(a),c)),i(r))break}}return!i(r)&&i(n.v)&&(r=n.v),r}function Bd(t,e,n){var r=n;if(n&&iu(n)&&(r=zy(t,e,n)),r){iu(r)&&(r=Bd(t,e,r));var i;Ce(r)?(i=[],i[he]=r[he]):Lt(r)&&(i={}),i&&(Pe(r,function(o,s){s&&iu(s)&&(s=Bd(t,e,s)),i[o]=s}),r=i)}return r}function xp(t,e,n,r){var i,o,s,a=r,c,u,l,f;iu(a)?(i=a.isVal,o=a.set,l=a.rdOnly,f=a.blkVal,c=a.mrg,u=a.ref,!u&&Ze(u)&&(u=!!c),s=zy(t,e,a)):s=r,f&&t.blkVal(e,n);var m,d=!0,h=e[n];(h||!B(h))&&(m=h,d=!1,i&&m!==s&&!i(m)&&(m=s,d=!0),o&&(m=o(m,s,e),d=m===s)),d?s?m=Bd(t,e,s):m=s:(Lt(m)||Ce(s))&&c&&s&&(Lt(s)||Ce(s))&&Pe(s,function(g,p){xp(t,m,g,p)}),t.set(e,n,m),u&&t.ref(e,n),l&&t.rdOnly(e,n)}var di=gp("[[ai_dynCfg_1]]"),Uy=gp("[[ai_blkDynCfg_1]]"),IS=gp("[[ai_frcDynCfg_1]]");function Ny(t){if(t){var e;if(Ce(t)?(e=[],e[he]=t[he]):Lt(t)&&(e={}),e)return Pe(t,function(n,r){e[n]=Ny(r)}),e}return t}function TS(t){if(t){var e=t[di]||t;if(e.cfg&&(e.cfg===t||e.cfg[di]===e))return e}return null}function ES(t){if(t&&(Lt(t)||Ce(t)))try{t[Uy]=!0}catch{}return t}function If(t,e,n){var r=!1;return n&&!t[e.blkVal]&&(r=n[IS],!r&&!n[Uy]&&(r=Lt(n)||Ce(n))),r}function $y(t){tr("InvalidAccess:"+t)}var xS=["push","pop","shift","unshift","splice"],Za=function(t,e,n,r){t&&t[pc](3,108,"".concat(n," [").concat(e,"] failed - ")+te(r))};function PS(t,e,n){Ce(e)&&ee(xS,function(r){var i=e[r];e[r]=function(){for(var o=[],s=0;s<arguments.length;s++)o[s]=arguments[s];var a=i[ho](this,o);return Gu(t,e,n,"Patching"),a}})}function Ju(t,e){var n=lw(t,e);return n&&n.get}function DS(t,e,n,r){var i={n,h:[],trk:function(u){u&&u.fn&&(At(i.h,u)===-1&&i.h[Ee](u),t.trk(u,i))},clr:function(u){var l=At(i.h,u);l!==-1&&i.h[Co](l,1)}},o=!0,s=!1;function a(){o&&(s=s||If(a,t,r),r&&!r[di]&&s&&(r=Gu(t,r,n,"Converting")),o=!1);var u=t.act;return u&&i.trk(u),r}a[t.prop]={chng:function(){t.add(i)}};function c(u){if(r!==u){a[t.ro]&&!t.upd&&$y("["+n+"] is read-only:"+te(e)),o&&(s=s||If(a,t,r),o=!1);var l=s&&a[t.rf];if(s)if(l){Pe(r,function(m){r[m]=u?u[m]:Fn});try{Pe(u,function(m,d){zl(t,r,m,d)}),u=r}catch(m){Za((t.hdlr||{})[lt],n,"Assigning",m),s=!1}}else r&&r[di]&&Pe(r,function(m){var d=Ju(r,m);if(d){var h=d[t.prop];h&&h.chng()}});if(u!==r){var f=u&&If(a,t,u);!l&&f&&(u=Gu(t,u,n,"Converting")),r=u,s=f}t.add(i)}}Re(e,i.n,{g:a,s:c})}function zl(t,e,n,r){if(e){var i=Ju(e,n),o=i&&!!i[t.prop];o?e[n]=r:DS(t,e,n,r)}return e}function Tf(t,e,n,r){if(e){var i=Ju(e,n),o=i&&!!i[t.prop],s=r&&r[0],a=r&&r[1],c=r&&r[2];if(!o){if(c)try{ES(e)}catch(u){Za((t.hdlr||{})[lt],n,"Blocking",u)}try{zl(t,e,n,e[n]),i=Ju(e,n)}catch(u){Za((t.hdlr||{})[lt],n,"State",u)}}s&&(i[t.rf]=s),a&&(i[t.ro]=a),c&&(i[t.blkVal]=!0)}return e}function Gu(t,e,n,r){try{Pe(e,function(i,o){zl(t,e,i,o)}),e[di]||(Gn(e,di,{get:function(){return t.hdlr}}),PS(t,e,n))}catch(i){Za((t.hdlr||{})[lt],n,r,i)}return e}var Js="[[ai_",Gs="]]";function RS(t){var e=Ks(Js+"get"+t.uid+Gs),n=Ks(Js+"ro"+t.uid+Gs),r=Ks(Js+"rf"+t.uid+Gs),i=Ks(Js+"blkVal"+t.uid+Gs),o=Ks(Js+"dtl"+t.uid+Gs),s=null,a=null,c;function u(d,h){var g=c.act;try{c.act=d,d&&d[o]&&(ee(d[o],function(v){v.clr(d)}),d[o]=[]),h({cfg:t.cfg,set:t.set.bind(t),setDf:t.setDf.bind(t),ref:t.ref.bind(t),rdOnly:t.rdOnly.bind(t)})}catch(v){var p=t[lt];throw p&&p[pc](1,107,te(v)),v}finally{c.act=g||null}}function l(){if(s){var d=s;s=null,a&&a[Ui](),a=null;var h=[];if(ee(d,function(g){if(g&&(g[o]&&(ee(g[o],function(p){p.clr(g)}),g[o]=null),g.fn))try{u(g,g.fn)}catch(p){h[Ee](p)}}),s)try{l()}catch(g){h[Ee](g)}h[he]>0&&xw("Watcher error(s): ",h)}}function f(d){if(d&&d.h[he]>0){s||(s=[]),a||(a=vn(function(){a=null,l()},0));for(var h=0;h<d.h[he];h++){var g=d.h[h];g&&At(s,g)===-1&&s[Ee](g)}}}function m(d,h){if(d){var g=d[o]=d[o]||[];At(g,h)===-1&&g[Ee](h)}}return c={prop:e,ro:n,rf:r,blkVal:i,hdlr:t,add:f,notify:l,use:u,trk:m},c}function AS(t,e){var n={fn:e,rm:function(){n.fn=null,t=null,e=null}};return Re(n,"toJSON",{v:function(){return"WatcherHandler"+(n.fn?"":"[X]")}}),t.use(n,e),n}function MS(t,e,n){var r=TS(e);if(r)return r;var i=mn("dyncfg",!0),o=e&&n!==!1?e:Ny(e),s;function a(){s.notify()}function c(p,v,_){try{p=zl(s,p,v,_)}catch(P){Za(t,v,"Setting value",P)}return p[v]}function u(p){return AS(s,p)}function l(p,v){s.use(null,function(_){var P=s.upd;try{Ze(v)||(s.upd=v),p(_)}finally{s.upd=P}})}function f(p,v){var _;return Tf(s,p,v,(_={},_[0]=!0,_))[v]}function m(p,v){var _;return Tf(s,p,v,(_={},_[1]=!0,_))[v]}function d(p,v){var _;return Tf(s,p,v,(_={},_[2]=!0,_))[v]}function h(p,v){return v&&Pe(v,function(_,P){xp(g,p,_,P)}),p}var g={uid:null,cfg:o,logger:t,notify:a,set:c,setDf:h,watch:u,ref:f,rdOnly:m,blkVal:d,_block:l};return Re(g,"uid",{c:!1,e:!1,w:!1,v:i}),s=RS(g),Gu(s,o,"config","Creating"),g}function zS(t,e){t?(t[$u](e),t[pc](2,108,e)):$y(e)}function yn(t,e,n,r){var i=MS(n,t||{},r);return e&&i.setDf(i.cfg,e),i}function at(t,e,n){var r=t[di]||t;return r.cfg&&(r.cfg===t||r.cfg[di]===r)?r[Yi](e):(zS(n,Ow+te(t)),yn(t,null,n)[Yi](e))}function ls(t,e){if(t&&t[go])return t[go](e)}function Ly(t,e,n){var r;return n||(r=Qn(function(i){n=i})),t&&uw(t)>0?Kt(ls(t[0],e),function(){Ly(Al(t,1),e,n)}):n(),r}var US=500,jg="Microsoft_ApplicationInsights_BypassAjaxInstrumentation";function NS(t,e,n){return!t&&B(t)?e:jm(t)?t:$t(t)[zs]()==="true"}function kn(t){return{mrg:!0,v:t}}function Og(t,e){return{set:t,v:e}}function Qu(t,e,n){return{fb:n,isVal:t,v:e}}function ft(t,e){return{fb:e,set:NS,v:!!t}}function $S(t){return{isVal:de,v:$t(De)}}var Ef=[tu,Ua,nu,Wi],Zu=null,Mc;function LS(t,e){return function(){var n=arguments,r=jy(e);if(r){var i=r.listener;i&&i[t]&&i[t][ho](i,n)}}}function jS(){var t=tt("Microsoft");return t&&(Zu=t.ApplicationInsights),Zu}function jy(t){var e=Zu;return!e&&t.disableDbgExt!==!0&&(e=Zu||jS()),e?e.ChromeDbgExt:null}function OS(t){if(!Mc){Mc={};for(var e=0;e<Ef[he];e++)Mc[Ef[e]]=LS(Ef[e],t)}return Mc}var No,Oy="warnToConsole",FS="AI (Internal): ",WS="AI: ",VS="AITR_",HS={loggingLevelConsole:0,loggingLevelTelemetry:1,maxMessageLimit:25,enableDebug:!1},qS=(No={},No[0]=null,No[1]="errorToConsole",No[2]=Oy,No[3]="debugToConsole",No);function Fg(t){return t?'"'+t[to](/\"/g,De)+'"':De}function xf(t,e){var n=cS();if(n){var r="log";n[t]&&(r=t),pe(n[r])&&n[r](e)}}var Ya=(function(){function t(e,n,r,i){r===void 0&&(r=!1);var o=this;o[Ou]=e,o[eo]=(r?WS:FS)+e;var s=De;vc()&&(s=An().stringify(i));var a=(n?" message:"+Fg(n):De)+(i?" props:"+Fg(s):De);o[eo]+=a}return t.dataType="MessageData",t})();function wo(t,e){return(t||{})[lt]||new Yu(e)}var Yu=(function(){function t(e){this.identifier="DiagnosticLogger",this.queue=[];var n=0,r={},i,o,s,a,c;He(t,this,function(u){c=f(e||{}),u.consoleLoggingLevel=function(){return i},u[pc]=function(h,g,p,v,_){_===void 0&&(_=!1);var P=new Ya(g,p,_,v);if(a)throw te(P);var x=qS[h]||Oy;if(Ze(P[eo]))d("throw"+(h===1?"Critical":"Warning"),P);else{if(_){var R=+P[Ou];!r[R]&&i>=h&&(u[x](P[eo]),r[R]=!0)}else i>=h&&u[x](P[eo]);l(h,P)}},u.debugToConsole=function(h){xf("debug",h),d("warning",h)},u[$u]=function(h){xf("warn",h),d("warning",h)},u.errorToConsole=function(h){xf("error",h),d("error",h)},u.resetInternalMessageCount=function(){n=0,r={}},u.logInternalMessage=l,u[go]=function(h){c&&c.rm(),c=null};function l(h,g){if(!m()){var p=!0,v=VS+g[Ou];if(r[v]?p=!1:r[v]=!0,p&&(h<=o&&(u.queue[Ee](g),n++,d(h===1?"error":"warn",g)),n===s)){var _="Internal events throttle limit per PageView reached for this app.",P=new Ya(23,_,!1);u.queue[Ee](P),h===1?u.errorToConsole(_):u[$u](_)}}}function f(h){return at(yn(h,HS,u).cfg,function(g){var p=g.cfg;i=p[dy],o=p.loggingLevelTelemetry,s=p.maxMessageLimit,a=p.enableDebug})}function m(){return n>=s}function d(h,g){var p=jy(e||{});p&&p[wr]&&p[wr](h,g)}})}return t.__ieDyn=1,t})();function Pp(t){return t||new Yu}function G(t,e,n,r,i,o){o===void 0&&(o=!1),Pp(t)[pc](e,n,r,i,o)}function ro(t,e){Pp(t)[$u](e)}function BS(t,e,n){Pp(t).logInternalMessage(e,n)}var Pf,zr,Wg="toGMTString",Vg="toUTCString",Dp="cookie",Df="expires",Hg="isCookieUseDisabled",ec="disableCookiesUsage",fs="_ckMgr",zc=null,Rf=null,qg=null,Xn,Bg={},el={},KS=(Pf={cookieCfg:kn((zr={},zr[Wd]={fb:"cookieDomain",dfVal:no},zr.path={fb:"cookiePath",dfVal:no},zr.enabled=Fn,zr.ignoreCookies=Fn,zr.blockedCookies=Fn,zr.disableCookieDefer=!1,zr)),cookieDomain:Fn,cookiePath:Fn},Pf[ec]=Fn,Pf);function Rp(){!Xn&&(Xn=Km(function(){return It()}))}function XS(t,e){var n=ou[fs]||el[fs];return n||(n=ou[fs]=ou(t,e),el[fs]=n),n}function Uc(t){return t?t.isEnabled():!0}function Fy(t,e){return e&&t&&Ce(t.ignoreCookies)?At(t.ignoreCookies,e)!==-1:!1}function Kg(t,e){return e&&t&&Ce(t.blockedCookies)&&At(t.blockedCookies,e)!==-1?!0:Fy(t,e)}function Xg(t,e){var n=e[cs];if(B(n)){var r=void 0;Ze(t[Hg])||(r=!t[Hg]),Ze(t[ec])||(r=!t[ec]),n=r}return n}function Ul(t,e){var n;return t&&(n=t.getCookieMgr()),n||(n=XS(e,(t||{})[lt])),n}function ou(t,e){var n,r,i,o,s,a,c,u,l=[];function f(p){var v,_=(v={},v[bf]=p||"/",v[Df]="Thu, 01 Jan 1970 00:00:01 GMT",v);return qd()||(_["max-age"]="0"),Gg(De,_)}function m(p,v,_,P){var x={},R=Ve(p||De),H=st(R,";");if(H!==-1&&(R=Ve(Ru(p,H)),x=Wy(Bt(p,H+1))),We(x,Wd,_||i,Pu,Ze),!B(v)){var A=qd();if(Ze(x[Df])){var k=Rn(),O=k+v*1e3;if(O>0){var j=new Date;j.setTime(O),We(x,Df,Jg(j,A?Wg:Vg)||Jg(j,A?Wg:Vg)||De,Pu)}}A||We(x,"max-age",De+v,null,Ze)}var K=Hn();return K&&K.protocol==="https:"&&(We(x,"secure",null,null,Ze),Rf===null&&(Rf=!GS((nr()||{})[Nd])),Rf&&We(x,"SameSite","None",null,Ze)),We(x,bf,P||r,null,Ze),Gg(R,x)}function d(p){if(l)for(var v=l[he]-1;v>=0;v--)l[v].n===p&&l[Co](v,1)}function h(){Af(e)&&l&&(ee(l,function(p){Kg(n,p.n)||(p.o===0?c(p.n,p.v):p.o===1&&u(p.n,p.v))}),l=[])}t=yn(t||el,null,e).cfg,o=at(t,function(p){p.setDf(p.cfg,KS),n=p.ref(p.cfg,"cookieCfg"),r=n[bf]||"/",i=n[Wd],n.disableCookieDefer?l=null:l===null&&(l=[]);var v=s;s=Xg(t,n)!==!1,a=n.getCookie||JS,c=n.setCookie||Qg,u=n.delCookie||Qg,!v&&s&&l&&h()},e);var g={isEnabled:function(){var p=Xg(t,n)!==!1&&s&&Af(e),v=el[fs];return p&&v&&g!==v&&(p=Uc(v)),p},setEnabled:function(p){n[cs]=p,Ze(t[ec])||(t[ec]=!p)},set:function(p,v,_,P,x){var R=!1,H=Kg(n,p);if(!H){var A=m(v,_,P,x);Uc(g)?(c(p,A),R=!0):l&&(d(p),l[Ee]({n:p,o:0,v:A}),R=!0)}return R},get:function(p){var v=De,_=Fy(n,p);if(!_){if(Uc(g))v=a(p);else if(l)for(var P=l[he]-1;P>=0;P--){var x=l[P];if(x.n===p){if(x.o===0){var R=x.v,H=st(R,";");v=Ve(H!==-1?Ru(R,H):R)}break}}}return v},del:function(p,v){var _=!1;return Uc(g)?_=g.purge(p,v):l&&(d(p),l[Ee]({n:p,o:1,v:f(v)}),_=!0),_},purge:function(p,v){var _=!1;return Af(e)&&(u(p,f(v)),_=!0),_},unload:function(p){o&&o.rm(),o=null,l=null}};return g[fs]=g,g}function Af(t){if(zc===null){zc=!1,!Xn&&Rp();try{var e=Xn.v||{};zc=e[Dp]!==void 0}catch(n){G(t,2,68,"Cannot access document.cookie - "+Ne(n),{exception:te(n)})}}return zc}function Wy(t){var e={};if(t&&t[he]){var n=Ve(t)[mo](";");ee(n,function(r){if(r=Ve(r||De),r){var i=st(r,"=");i===-1?e[r]=null:e[Ve(Ru(r,i))]=Ve(Bt(r,i+1))}})}return e}function Jg(t,e){return pe(t[e])?t[e]():null}function Gg(t,e){var n=t||De;return Pe(e,function(r,i){n+="; "+r+(B(i)?De:"="+i)}),n}function JS(t){var e=De;if(!Xn&&Rp(),Xn.v){var n=Xn.v[Dp]||De;qg!==n&&(Bg=Wy(n),qg=n),e=Ve(Bg[t]||De)}return e}function Qg(t,e){!Xn&&Rp(),Xn.v&&(Xn.v[Dp]=t+"="+e)}function GS(t){return de(t)?!!(Dt(t,"CPU iPhone OS 12")||Dt(t,"iPad; CPU OS 12")||Dt(t,"Macintosh; Intel Mac OS X 10_14")&&Dt(t,"Version/")&&Dt(t,"Safari")||Dt(t,"Macintosh; Intel Mac OS X 10_14")&&ay(t,"AppleWebKit/605.1.15 (KHTML, like Gecko)")||Dt(t,"Chrome/5")||Dt(t,"Chrome/6")||Dt(t,"UnrealEngine")&&!Dt(t,"Chrome")||Dt(t,"UCBrowser/12")||Dt(t,"UCBrowser/11")):!1}var QS={perfEvtsSendAll:!1};function ZS(t){t.h=null;var e=t.cb;t.cb=[],ee(e,function(n){rt(n.fn,[n.arg])})}function Ur(t,e,n,r){ee(t,function(i){i&&i[e]&&(n?(n.cb[Ee]({fn:r,arg:i}),n.h=n.h||vn(ZS,0,n)):rt(r,[i]))})}var YS=(function(){function t(e){this.listeners=[];var n,r,i=[],o={h:null,cb:[]},s=yn(e,QS);r=s[Yi](function(a){n=!!a.cfg.perfEvtsSendAll}),He(t,this,function(a){Re(a,"listeners",{g:function(){return i}}),a[ju]=function(c){i[Ee](c)},a[Lu]=function(c){for(var u=At(i,c);u>-1;)i[Co](u,1),u=At(i,c)},a[tu]=function(c){Ur(i,tu,o,function(u){u[tu](c)})},a[Ua]=function(c,u,l){Ur(i,Ua,o,function(f){f[Ua](c,u,l)})},a[nu]=function(c,u){Ur(i,nu,u?o:null,function(l){l[nu](c,u)})},a[Wi]=function(c){c&&(n||!c[Ld]())&&Ur(i,Wi,null,function(u){c.isAsync?vn(function(){return u[Wi](c)},0):u[Wi](c)})},a[vf]=function(c){c&&c[he]&&Ur(i,vf,o,function(u){u[vf](c)})},a[mf]=function(c){c&&c[Cn]&&Ur(i,mf,o,function(u){u[mf](c)})},a[yf]=function(c,u){if(c>0){var l=u||0;Ur(i,yf,o,function(f){f[yf](c,l)})}},a[go]=function(c){var u=function(){r&&r.rm(),r=null,i=[],o.h&&o.h[Ui](),o.h=null,o.cb=[]},l;if(Ur(i,"unload",null,function(f){var m=f[go](c);m&&(l||(l=[]),l[Ee](m))}),l)return Qn(function(f){return Kt(jw(l),function(){u(),f()})});u()}})}return t.__ieDyn=1,t})(),Cs="ctx",Kd="ParentContextKey",Na="ChildrenContextKey",ek=null,su=(function(){function t(e,n,r){var i=this;if(i.start=Rn(),i[po]=e,i.isAsync=r,i[Ld]=function(){return!1},pe(n)){var o;Re(i,"payload",{g:function(){return!o&&pe(n)&&(o=n(),n=null),o}})}i[bs]=function(s){return s?s===t[Kd]||s===t[Na]?i[s]:(i[Cs]||{})[s]:null},i[jn]=function(s,a){if(s)if(s===t[Kd])i[s]||(i[Ld]=function(){return!0}),i[s]=a;else if(s===t[Na])i[s]=a;else{var c=i[Cs]=i[Cs]||{};c[s]=a}},i.complete=function(){var s=0,a=i[bs](t[Na]);if(Ce(a))for(var c=0;c<a[he];c++){var u=a[c];u&&(s+=u.time)}i.time=Rn()-i.start,i.exTime=i.time-s,i.complete=function(){}}}return t.ParentContextKey="parent",t.ChildrenContextKey="childEvts",t})(),tk=(function(){function t(e){this.ctx={},He(t,this,function(n){n.create=function(r,i,o){return new su(r,i,o)},n.fire=function(r){r&&(r.complete(),e&&pe(e[Wi])&&e[Wi](r))},n[jn]=function(r,i){if(r){var o=n[Cs]=n[Cs]||{};o[r]=i}},n[bs]=function(r){return(n[Cs]||{})[r]}})}return t.__ieDyn=1,t})(),Mf="CoreUtils.doPerf";function tl(t,e,n,r,i){if(t){var o=t;if(o[Hu]&&(o=o[Hu]()),o){var s=void 0,a=o[bs](Mf);try{if(s=o.create(e(),r,i),s){if(a&&s[jn]&&(s[jn](su[Kd],a),a[bs]&&a[jn])){var c=a[bs](su[Na]);c||(c=[],a[jn](su[Na],c)),c[Ee](s)}return o[jn](Mf,s),n(s)}}catch(u){s&&s[jn]&&s[jn]("exception",u)}finally{s&&o.fire(s),o[jn](Mf,a)}}}return n()}function nk(){return ek}function ti(){for(var t=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"],e=De,n,r=0;r<4;r++)n=Qa(),e+=t[n&15]+t[n>>4&15]+t[n>>8&15]+t[n>>12&15]+t[n>>16&15]+t[n>>20&15]+t[n>>24&15]+t[n>>28&15];var i=t[8+(Qa()&3)|0];return Jr(e,0,8)+Jr(e,9,4)+"4"+Jr(e,13,3)+i+Jr(e,16,3)+Jr(e,19,12)}var Xd="00",rk="ff",Vy="00000000000000000000000000000000",Hy="0000000000000000";function mc(t,e,n){return t&&t[he]===e&&t!==n?!!t.match(/^[\da-f]*$/i):!1}function Zg(t,e,n){return mc(t,e)?t:n}function ik(t){(isNaN(t)||t<0||t>255)&&(t=1);for(var e=t.toString(16);e[he]<2;)e="0"+e;return e}function Yg(t,e,n,r){return{version:mc(r,2,rk)?r:Xd,traceId:Ap(t)?t:ti(),spanId:Mp(e)?e:Ru(ti(),16),traceFlags:n>=0&&n<=255?n:1}}function Ap(t){return mc(t,32,Vy)}function Mp(t){return mc(t,16,Hy)}function ev(t){if(t){var e=ik(t[jd]);mc(e,2)||(e="01");var n=t[Ud]||Xd;return n!=="00"&&n!=="ff"&&(n=Xd),"".concat(n.toLowerCase(),"-").concat(Zg(t.traceId,32,Vy).toLowerCase(),"-").concat(Zg(t.spanId,16,Hy).toLowerCase(),"-").concat(e.toLowerCase())}return""}function ok(t){var e=t.getElementsByTagName("script"),n=[];return ee(e,function(r){var i=r[lf]("src");if(i){var o=r[lf]("crossorigin"),s=r.hasAttribute("async")===!0,a=r.hasAttribute("defer")===!0,c=r[lf]("referrerpolicy"),u={url:i};o&&(u.crossOrigin=o),s&&(u.async=s),a&&(u.defer=a),c&&(u.referrerPolicy=c),n[Ee](u)}}),n}var sk=My("plugin");function io(t){return sk.get(t,"state",{},!0)}function tv(t,e){for(var n=[],r=null,i=t[Kn](),o;i;){var s=i[Ka]();if(s){r&&r[Ja]&&s[Zn]&&r[Ja](s),o=io(s);var a=!!o[Vn];s[Vn]&&(a=s[Vn]()),a||n[Ee](s),r=s,i=i[Kn]()}}ee(n,function(c){var u=t[yt]();c[gc](t.getCfg(),u,e,t[Kn]()),o=io(c),!c[yt]&&!o[yt]&&(o[yt]=u),o[Vn]=!0,delete o[hr]})}function zf(t){return t.sort(function(e,n){var r=0;if(n){var i=n[Zn];e[Zn]?r=i?e[Vu]-n[Vu]:1:i&&(r=-1)}else r=e?1:-1;return r})}function ak(t){var e={};return{getName:function(){return e[po]},setName:function(n){e[po]=n},getTraceId:function(){return e.traceId},setTraceId:function(n){Ap(n)&&(e.traceId=n)},getSpanId:function(){return e.spanId},setSpanId:function(n){Mp(n)&&(e.spanId=n)},getTraceFlags:function(){return e[jd]},setTraceFlags:function(n){e[jd]=n}}}var ck="TelemetryPluginChain",nv="_hasRun",rv="_getTelCtx",iv=0;function uk(t,e,n){for(;t;){if(t[Ka]()===n)return t;t=t[Kn]()}return yo([n],e.config||{},e)}function zp(t,e,n,r){var i=null,o=[];e||(e=yn({},null,n[lt])),r!==null&&(i=r?uk(t,n,r):t);var s={_next:c,ctx:{core:function(){return n},diagLog:function(){return wo(n,e.cfg)},getCfg:function(){return e.cfg},getExtCfg:l,getConfig:f,hasNext:function(){return!!i},getNext:function(){return i},setNext:function(d){i=d},iterate:m,onComplete:a}};function a(d,h){for(var g=[],p=2;p<arguments.length;p++)g[p-2]=arguments[p];d&&o[Ee]({func:d,self:Ze(h)?s.ctx:h,args:g})}function c(){var d=i;if(i=d?d[Kn]():null,!d){var h=o;h&&h[he]>0&&(ee(h,function(g){try{g.func.call(g.self,g.args)}catch(p){G(n[lt],2,73,"Unexpected Exception during onComplete - "+te(p))}}),o=[])}return d}function u(d,h){var g=null,p=e.cfg;if(p&&d){var v=p[_s];!v&&h&&(v={}),p[_s]=v,v=e.ref(p,_s),v&&(g=v[d],!g&&h&&(g={}),v[d]=g,g=e.ref(v,d))}return g}function l(d,h){var g=u(d,!0);return h&&Pe(h,function(p,v){if(B(g[p])){var _=e.cfg[p];(_||!B(_))&&(g[p]=_)}xp(e,g,p,v)}),e.setDf(g,h)}function f(d,h,g){g===void 0&&(g=!1);var p,v=u(d,!1),_=e.cfg;return v&&(v[h]||!B(v[h]))?p=v[h]:(_[h]||!B(_[h]))&&(p=_[h]),p||!B(p)?p:g}function m(d){for(var h;h=s._next();){var g=h[Ka]();g&&d(g)}}return s}function Mn(t,e,n,r){var i=yn(e),o=zp(t,i,n,r),s=o.ctx;function a(u){var l=o._next();return l&&l[Zn](u,s),!l}function c(u,l){return u===void 0&&(u=null),Ce(u)&&(u=yo(u,i.cfg,n,l)),Mn(u||s[Kn](),i.cfg,n,l)}return s[Nt]=a,s[vo]=c,s}function nl(t,e,n){var r=yn(e.config),i=zp(t,r,e,n),o=i.ctx;function s(c){var u=i._next();return u&&u[go](o,c),!u}function a(c,u){return c===void 0&&(c=null),Ce(c)&&(c=yo(c,r.cfg,e,u)),nl(c||o[Kn](),e,u)}return o[Nt]=s,o[vo]=a,o}function Up(t,e,n){var r=yn(e.config),i=zp(t,r,e,n),o=i.ctx;function s(c){return o.iterate(function(u){pe(u[Xa])&&u[Xa](o,c)})}function a(c,u){return c===void 0&&(c=null),Ce(c)&&(c=yo(c,r.cfg,e,u)),Up(c||o[Kn](),e,u)}return o[Nt]=s,o[vo]=a,o}function yo(t,e,n,r){var i=null,o=!r;if(Ce(t)&&t[he]>0){var s=null;ee(t,function(a){if(!o&&r===a&&(o=!0),o&&a&&pe(a[Zn])){var c=lk(a,e,n);i||(i=c),s&&s._setNext(c),s=c}})}return r&&!i?yo([r],e,n):i}function lk(t,e,n){var r=null,i=pe(t[Zn]),o=pe(t[Ja]),s;t?s=t[Gr]+"-"+t[Vu]+"-"+iv++:s="Unknown-0-"+iv++;var a={getPlugin:function(){return t},getNext:function(){return r},processTelemetry:l,unload:f,update:m,_id:s,_setNext:function(d){r=d}};function c(){var d;return t&&pe(t[rv])&&(d=t[rv]()),d||(d=Mn(a,e,n)),d}function u(d,h,g,p,v){var _=!1,P=t?t[Gr]:ck,x=d[nv];return x||(x=d[nv]={}),d.setNext(r),t&&tl(d[yt](),function(){return P+":"+g},function(){x[s]=!0;try{var R=r?r._id:De;R&&(x[R]=!1),_=h(d)}catch(A){var H=r?x[r._id]:!0;H&&(_=!0),(!r||!H)&&G(d[wr](),1,73,"Plugin ["+P+"] failed during "+g+" - "+te(A)+", run flags: "+te(x))}},p,v),_}function l(d,h){h=h||c();function g(p){if(!t||!i)return!1;var v=io(t);return v[hr]||v[Fd]?!1:(o&&t[Ja](r),t[Zn](d,p),!0)}u(h,g,"processTelemetry",function(){return{item:d}},!d.sync)||h[Nt](d)}function f(d,h){function g(){var p=!1;if(t){var v=io(t),_=t[yt]||v[yt];t&&(!_||_===d.core())&&!v[hr]&&(v[yt]=null,v[hr]=!0,v[Vn]=!1,t[hr]&&t[hr](d,h)===!0&&(p=!0))}return p}u(d,g,"unload",function(){},h.isAsync)||d[Nt](h)}function m(d,h){function g(){var p=!1;if(t){var v=io(t),_=t[yt]||v[yt];t&&(!_||_===d.core())&&!v[hr]&&t[Xa]&&t[Xa](d,h)===!0&&(p=!0)}return p}u(d,g,"update",function(){},!1)||d[Nt](h)}return Dn(a)}function qy(){var t=[];function e(r){r&&t[Ee](r)}function n(r,i){ee(t,function(o){try{o(r,i)}catch(s){G(r[wr](),2,73,"Unexpected error calling unload handler - "+te(s))}}),t=[]}return{add:e,run:n}}function By(){var t=[];function e(r){var i=t;t=[],ee(i,function(o){try{(o.rm||o.remove).call(o)}catch(s){G(r,2,73,"Unloading:"+te(s))}})}function n(r){r&&as(t,r)}return{run:e,add:n}}var Uf,Nr="getPlugin",fk=(Uf={},Uf[_s]={isVal:no,v:{}},Uf),So=(function(){function t(){var e=this,n,r,i,o,s;u(),He(t,e,function(l){l[gc]=function(f,m,d,h){c(f,m,h),n=!0},l[hr]=function(f,m){var d=l[yt];if(!d||f&&d!==f[yt]())return;var h,g=!1,p=f||nl(null,d,i&&i[Nr]?i[Nr]():i),v=m||{reason:0,isAsync:!1};function _(){g||(g=!0,o.run(p,m),s.run(p[wr]()),h===!0&&p[Nt](v),u())}return!l[Fu]||l[Fu](p,v,_)!==!0?_():h=!0,h},l[Xa]=function(f,m){var d=l[yt];if(!d||f&&d!==f[yt]())return;var h,g=!1,p=f||Up(null,d,i&&i[Nr]?i[Nr]():i),v=m||{reason:0};function _(){g||(g=!0,c(p.getCfg(),p.core(),p[Kn]()))}return!l._doUpdate||l._doUpdate(p,v,_)!==!0?_():h=!0,h},Bu(l,"_addUnloadCb",function(){return o},"add"),Bu(l,"_addHook",function(){return s},"add"),Re(l,"_unloadHooks",{g:function(){return s}})}),e[wr]=function(l){return a(l)[wr]()},e[Vn]=function(){return n},e.setInitialized=function(l){n=l},e[Ja]=function(l){i=l},e[Nt]=function(l,f){f?f[Nt](l):i&&pe(i[Zn])&&i[Zn](l,null)},e._getTelCtx=a;function a(l){l===void 0&&(l=null);var f=l;if(!f){var m=r||Mn(null,{},e[yt]);i&&i[Nr]?f=m[vo](null,i[Nr]):f=m[vo](null,i)}return f}function c(l,f,m){yn(l,fk,wo(f)),!m&&f&&(m=f[fy]()[Kn]());var d=i;i&&i[Nr]&&(d=i[Nr]()),e[yt]=f,r=Mn(m,l,f,d)}function u(){n=!1,e[yt]=null,r=null,i=null,s=By(),o=qy()}}return t.__ieDyn=1,t})();function dk(t,e,n){var r={id:e,fn:n};as(t,r);var i={remove:function(){ee(t,function(o,s){if(o.id===r.id)return t[Co](s,1),-1})}};return i}function hk(t,e,n){for(var r=!1,i=t[he],o=0;o<i;++o){var s=t[o];if(s)try{if(s.fn[ho](null,[e])===!1){r=!0;break}}catch(a){G(n,2,64,"Telemetry initializer failed: "+Ne(a),{exception:te(a)},!0)}}return!r}var pk=(function(t){rr(e,t);function e(){var n=t.call(this)||this;n.identifier="TelemetryInitializerPlugin",n.priority=199;var r,i;o(),He(e,n,function(s,a){s.addTelemetryInitializer=function(c){return dk(i,r++,c)},s[Zn]=function(c,u){hk(i,c,u?u[wr]():s[wr]())&&s[Nt](c,u)},s[Fu]=function(){o()}});function o(){r=0,i=[]}return n}return e.__ieDyn=1,e})(So),$r,Ky="Plugins must provide initialize method",gk="_notificationManager",ov="SDK is still unloading...",vk="SDK is not initialized",mk=100,yk=5e4,Nf=Fs(($r={cookieCfg:{}},$r[Jo]={rdOnly:!0,ref:!0,v:[]},$r[Xo]={rdOnly:!0,ref:!0,v:[]},$r[_s]={ref:!0,v:{}},$r[Od]=Fn,$r.loggingLevelConsole=0,$r.diagnosticLogInterval=Fn,$r));function bk(t,e){return new tk(e)}function _k(t,e,n){var r=[],i=[],o={};return ee(n,function(s){(B(s)||B(s[gc]))&&Yt(Ky);var a=s[Vu],c=s[Gr];s&&a&&(B(o[a])?o[a]=c:ro(t,"Two extensions have same priority #"+a+" - "+o[a]+", "+c)),!a||a<e?r[Ee](s):i[Ee](s)}),{core:r,channels:i}}function sv(t,e){var n=!1;return ee(e,function(r){if(r===t)return n=!0,-1}),n}function Jd(t,e,n,r){n&&Pe(n,function(i,o){r&&Lt(o)&&Lt(e[i])&&Jd(t,e[i],o,r),r&&Lt(o)&&Lt(e[i])?Jd(t,e[i],o,r):t.set(e,i,o)})}function av(t,e){var n=null,r=-1;return ee(t,function(i,o){if(i.w===e)return n=i,r=o,-1}),{i:r,l:n}}function Ck(t,e){var n=av(t,e).l;return n||(n={w:e,rm:function(){var r=av(t,e);r.i!==-1&&t[Co](r.i,1)}},t[Ee](n)),n}function wk(t,e,n){ee(e,function(r){var i=at(t,r.w,n);delete r.w,r.rm=function(){i.rm()}})}function Sk(t,e,n,r){return e.add(t[Yi](function(i){var o=i.cfg.disableDbgExt;o===!0&&r&&(n[Lu](r),r=null),n&&!r&&o!==!0&&(r=OS(i.cfg),n[ju](r))})),r}function kk(t){return Re({rm:function(){t.rm()}},"toJSON",{v:function(){return"aicore::onCfgChange<"+JSON.stringify(t)+">"}})}var Ik=(function(){function t(){var e,n,r,i,o,s,a,c,u,l,f,m,d,h,g,p,v,_,P,x,R,H,A,k,O,j,K,re,se,b,E,q,M;He(t,this,function(D){U(),D._getDbgPlgTargets=function(){return[A,i]},D[Vn]=function(){return n},D.activeStatus=function(){return j},D._setPendingStatus=function(){j=3},D[gc]=function($,Z,ue,ne){d&&Yt(ov),D[Vn]()&&Yt("Core cannot be initialized more than once"),e=yn($,Nf,ue||D[lt],!1),$=e.cfg,un(e[Yi](function(W){var F=W.cfg;re=F.initInMemoMaxSize||mk,ce(F);var X=W.ref(W.cfg,_s);Pe(X,function(ie){W.ref(X,ie)})})),o=ne,P=Sk(e,_,o&&D[Pc](),P),Oe(),D[lt]=ue;var w=$[Jo];if(l=[],l[Ee].apply(l,kg(kg([],Z,!1),w)),f=$[Xo],Y(null),(!m||m[he]===0)&&Yt("No "+Xo+" available"),f&&f[he]>1){var z=D[Ka]("TeeChannelController");(!z||!z.plugin)&&G(r,1,28,"TeeChannel required")}wk($,H,r),H=null,n=!0,j===Br.ACTIVE&&V()},D.getChannels=function(){var $=[];return m&&ee(m,function(Z){$[Ee](Z)}),Dn($)},D.track=function($){tl(D[Hu](),function(){return"AppInsightsCore:track"},function(){$===null&&(ir($),Yt("Invalid telemetry item")),!$[po]&&B($[po])&&(ir($),Yt("telemetry name required")),$.iKey=$.iKey||R,$.time=$.time||Us(new Date),$.ver=$.ver||"4.0",!d&&D[Vn]()&&j===Br.ACTIVE?J()[Nt]($):j!==Br.INACTIVE&&i[he]<=re&&i[Ee]($)},function(){return{item:$}},!$.sync)},D[fy]=J,D[Pc]=function(){return o||(o=new YS(e.cfg),D[gk]=o),o},D[ju]=function($){D.getNotifyMgr()[ju]($)},D[Lu]=function($){o&&o[Lu]($)},D.getCookieMgr=function(){return c||(c=ou(e.cfg,D[lt])),c},D.setCookieMgr=function($){c!==$&&(ls(c,!1),c=$)},D[Hu]=function(){return s||a||nk()},D.setPerfMgr=function($){s=$},D.eventCnt=function(){return i[he]},D.releaseQueue=function(){if(n&&i[he]>0){var $=i;i=[],j===2?ee($,function(Z){Z.iKey=Z.iKey||R,J()[Nt](Z)}):G(r,2,20,"core init status is not active")}},D.pollInternalLogs=function($){return g=$||null,M=!1,E&&E[Ui](),C(!0)};function ce($){var Z=$.instrumentationKey,ue=$.endpointUrl;if(j!==3){if(B(Z)){R=null,j=Br.INACTIVE;var ne="Please provide instrumentation key";n?(G(r,1,100,ne),V()):Yt(ne);return}var w=[];fi(Z)?(w[Ee](Z),R=null):R=Z,fi(ue)?(w[Ee](ue),K=null):K=ue,w[he]?me($,w):oe()}}function me($,Z){se=!1,j=3;var ue=no($.initTimeOut)?$.initTimeOut:yk,ne=Lw(Z);b&&b[Ui](),b=vn(function(){b=null,se||oe()},ue),Kt(ne,function(w){try{if(se)return;if(!w.rejected){var z=w[Fi];if(z&&z[he]){var W=z[0];if(R=W&&W[Fi],z[he]>1){var F=z[1];K=F&&F[Fi]}}R&&($.instrumentationKey=R,$.endpointUrl=K)}oe()}catch{se||oe()}})}function oe(){se=!0,B(R)?(j=Br.INACTIVE,G(r,1,112,"ikey can't be resolved from promises")):j=Br.ACTIVE,V()}function V(){n&&(D.releaseQueue(),D.pollInternalLogs())}function C($){if((!E||!E[cs])&&!M){var Z=$||r&&r.queue[he]>0;Z&&(q||(q=!0,un(e[Yi](function(ue){var ne=ue.cfg.diagnosticLogInterval;(!ne||!(ne>0))&&(ne=1e4);var w=!1;E&&(w=E[cs],E[Ui]()),E=yw(Ue,ne),E.unref(),E[cs]=w}))),E[cs]=!0)}return E}D[Pg]=function(){M=!0,E&&E[Ui](),Ue()},us(D,function(){return h},["addTelemetryInitializer"]),D[go]=function($,Z,ue){$===void 0&&($=!0),n||Yt(vk),d&&Yt(ov);var ne={reason:50,isAsync:$,flushComplete:!1},w;$&&!Z&&(w=Qn(function(F){Z=F}));var z=nl(Ie(),D);z[Dc](function(){_.run(D[lt]),Ly([c,o,r],$,function(){U(),Z&&Z(ne)})},D);function W(F){ne.flushComplete=F,d=!0,v.run(z,ne),D[Pg](),z[Nt](ne)}return Ue(),Et($,W,6,ue),w},D[Ka]=_e,D.addPlugin=function($,Z,ue,ne){if(!$){ne&&ne(!1),xt(Ky);return}var w=_e($[Gr]);if(w&&!Z){ne&&ne(!1),xt("Plugin ["+$[Gr]+"] is already loaded!");return}var z={reason:16};function W(ie){l[Ee]($),z.added=[$],Y(z),ne&&ne(!0)}if(w){var F=[w.plugin],X={reason:2,isAsync:!!ue};Te(F,X,function(ie){ie?(z.removed=F,z.reason|=32,W()):ne&&ne(!1)})}else W()},D.updateCfg=function($,Z){Z===void 0&&(Z=!0);var ue;if(D[Vn]()){ue={reason:1,cfg:e.cfg,oldCfg:Sg({},e.cfg),newConfig:Sg({},$),merge:Z},$=ue.newConfig;var ne=e.cfg;$[Jo]=ne[Jo],$[Xo]=ne[Xo]}e._block(function(w){var z=w.cfg;Jd(w,z,$,Z),Z||Pe(z,function(W){ii($,W)||w.set(z,W,Fn)}),w.setDf(z,Nf)},!0),e.notify(),ue&&Fe(ue)},D.evtNamespace=function(){return p},D.flush=Et,D.getTraceCtx=function($){return x||(x=ak()),x},D.setTraceCtx=function($){x=$||null},D.addUnloadHook=un,Bu(D,"addUnloadCb",function(){return v},"add"),D.onCfgChange=function($){var Z;return n?Z=at(e.cfg,$,D[lt]):Z=Ck(H,$),kk(Z)},D.getWParam=function(){return Jm()||e.cfg.enableWParam?0:-1};function y(){var $={};k=[];var Z=function(ue){ue&&ee(ue,function(ne){if(ne[Gr]&&ne[Ud]&&!$[ne.identifier]){var w=ne[Gr]+"="+ne[Ud];k[Ee](w),$[ne.identifier]=ne}})};Z(m),f&&ee(f,function(ue){Z(ue)}),Z(l)}function U(){n=!1,e=yn({},Nf,D[lt]),e.cfg[dy]=1,Re(D,"config",{g:function(){return e.cfg},s:function(Z){D.updateCfg(Z,!1)}}),Re(D,"pluginVersionStringArr",{g:function(){return k||y(),k}}),Re(D,"pluginVersionString",{g:function(){return O||(k||y(),O=k.join(";")),O||De}}),Re(D,"logger",{g:function(){return r||(r=new Yu(e.cfg),e[lt]=r),r},s:function(Z){e[lt]=Z,r!==Z&&(ls(r,!1),r=Z)}}),D[lt]=new Yu(e.cfg),A=[];var $=D.config[Jo]||[];$.splice(0,$[he]),as($,A),h=new pk,i=[],ls(o,!1),o=null,s=null,a=null,ls(c,!1),c=null,u=null,l=[],f=null,m=null,d=!1,g=null,p=mn("AIBaseCore",!0),v=qy(),x=null,R=null,_=By(),H=[],O=null,k=null,M=!1,E=null,q=!1,j=0,K=null,re=null,se=!1,b=null}function J(){var $=Mn(Ie(),e.cfg,D);return $[Dc](C),$}function Y($){var Z=_k(D[lt],US,l);u=null,O=null,k=null,m=(f||[])[0]||[],m=zf(as(m,Z[Xo]));var ue=as(zf(Z[yt]),m);A=Dn(ue);var ne=D.config[Jo]||[];ne.splice(0,ne[he]),as(ne,A);var w=J();m&&m[he]>0&&tv(w[vo](m),ue),tv(w,ue),$&&Fe($)}function _e($){var Z=null,ue=null,ne=[];return ee(A,function(w){if(w[Gr]===$&&w!==h)return ue=w,-1;w.getChannel&&ne[Ee](w)}),!ue&&ne[he]>0&&ee(ne,function(w){if(ue=w.getChannel($),!ue)return-1}),ue&&(Z={plugin:ue,setEnabled:function(w){io(ue)[Fd]=!w},isEnabled:function(){var w=io(ue);return!w[hr]&&!w[Fd]},remove:function(w,z){w===void 0&&(w=!0);var W=[ue],F={reason:1,isAsync:w};Te(W,F,function(X){X&&Y({reason:32,removed:W}),z&&z(X)})}}),Z}function Ie(){if(!u){var $=(A||[]).slice();At($,h)===-1&&$[Ee](h),u=yo(zf($),e.cfg,D)}return u}function Te($,Z,ue){if($&&$[he]>0){var ne=yo($,e.cfg,D),w=nl(ne,D);w[Dc](function(){var z=!1,W=[];ee(l,function(X,ie){sv(X,$)?z=!0:W[Ee](X)}),l=W,O=null,k=null;var F=[];f&&(ee(f,function(X,ie){var le=[];ee(X,function(ke){sv(ke,$)?z=!0:le[Ee](ke)}),F[Ee](le)}),f=F),ue&&ue(z),C()}),w[Nt](Z)}else ue(!1)}function Ue(){if(r&&r.queue){var $=r.queue.slice(0);r.queue[he]=0,ee($,function(Z){var ue={name:g||"InternalMessageId: "+Z[Ou],iKey:R,time:Us(new Date),baseType:Ya.dataType,baseData:{message:Z[eo]}};D.track(ue)})}}function Et($,Z,ue,ne){var w=1,z=!1,W=null;ne=ne||5e3;function F(){w--,z&&w===0&&(W&&W[Ui](),W=null,Z&&Z(z),Z=null)}if(m&&m[he]>0){var X=J()[vo](m);X.iterate(function(ie){if(ie.flush){w++;var le=!1;ie.flush($,function(){le=!0,F()},ue)||le||($&&W==null?W=vn(function(){W=null,F()},ne):F())}})}return z=!0,F(),!0}function Oe(){var $;un(e[Yi](function(Z){var ue=Z.cfg.enablePerfMgr;if(ue){var ne=Z.cfg[Od];($!==ne||!$)&&(ne||(ne=bk),zt(Z.cfg,Od,ne),$=ne,a=null),!s&&!a&&pe(ne)&&(a=ne(D,D[Pc]()))}else a=null,$=null}))}function Fe($){var Z=Up(Ie(),D);Z[Dc](C),(!D._updateHook||D._updateHook(Z,$)!==!0)&&Z[Nt]($)}function xt($){var Z=D[lt];Z?(G(Z,2,73,$),C()):Yt($)}function ir($){var Z=D[Pc]();Z&&Z[Ua]([$],2)}function un($){_.add($)}})}return t.__ieDyn=1,t})();function $f(t,e){try{if(t&&t!==""){var n=An().parse(t);if(n&&n[Ag]&&n[Ag]>=n.itemsAccepted&&n.itemsReceived-n.itemsAccepted===n.errors[he])return n}}catch(r){G(e,1,43,"Cannot parse the response. "+(r[po]||te(r)),{response:t})}return null}var _n="",Tk="NoResponseBody",cv="&"+Tk+"=true",Lf="POST",Ek=(function(){function t(){var e=0,n,r,i,o,s,a,c,u,l,f,m,d,h,g;He(t,this,function(p,v){var _=!0;se(),p[gc]=function(b,E){i=E,r&&G(i,1,28,"Sender is already initialized"),p.SetConfig(b),r=!0},p._getDbgPlgTargets=function(){return[r,o,a,n]},p.SetConfig=function(b){try{if(s=b.senderOnCompleteCallBack||{},a=!!b.disableCredentials,c=b.fetchCredentials,o=!!b.isOneDs,n=!!b.enableSendPromise,l=!!b.disableXhr,f=!!b.disableBeacon,m=!!b.disableBeaconSync,g=b.timeWrapper,h=!!b.addNoResponse,d=!!b.disableFetchKeepAlive,u={sendPOST:j},o||(_=!1),a){var E=Hn();E&&E.protocol&&E.protocol[zs]()==="file:"&&(_=!1)}return!0}catch{}return!1},p.getSyncFetchPayload=function(){return e},p.getSenderInst=function(b,E){return b&&b[he]?H(b,E):null},p.getFallbackInst=function(){return u},p[Fu]=function(b,E){se()},p.preparePayload=function(b,E,q,M){if(!E||M||!q[Cn]){b(q);return}try{var D=tt("CompressionStream");if(!pe(D)){b(q);return}var ce=new ReadableStream({start:function(U){U.enqueue(de(q[Cn])?new TextEncoder().encode(q[Cn]):q[Cn]),U.close()}}),me=ce.pipeThrough(new D("gzip")),oe=me.getReader(),V=[],C=0,y=!1;return Kt(oe.read(),function U(J){if(!y&&!J.rejected){var Y=J[Fi];if(!Y.done)return V[Ee](Y[Fi]),C+=Y.value[he],Kt(oe.read(),U);for(var _e=new Uint8Array(C),Ie=0,Te=0,Ue=V;Te<Ue.length;Te++){var Et=Ue[Te];_e.set(Et,Ie),Ie+=Et[he]}q[Cn]=_e,q[Rc]["Content-Encoding"]="gzip",q._chunkCount=V[he]}y||(y=!0,b(q))}),oe}catch{b(q);return}};function P(b,E){A(E,200,{},b)}function x(b,E){G(i,2,26,"Failed to send telemetry.",{message:b}),A(E,400,{})}function R(b){x("No endpoint url is provided for the batch",b)}function H(b,E){for(var q=0,M=null,D=0;M==null&&D<b[he];)q=b[D],!l&&q===1?dS()?M=re:Ml()&&(M=j):q===2&&Tp(E)&&(!E||!d)?M=K:q===3&&va()&&(E?!m:!f)&&(M=O),D++;return M?{_transport:q,_isSync:E,sendPOST:M}:null}function A(b,E,q,M){try{b&&b(E,q,M)}catch{}}function k(b,E){var q=nr(),M=b[Xs];if(!M)return R(E),!0;M=b[Xs]+(h?cv:_n);var D=b[Cn],ce=o?D:new Blob([D],{type:"text/plain;charset=UTF-8"}),me=q.sendBeacon(M,ce);return me}function O(b,E,q){var M=b[Cn];try{if(M)if(k(b,E))P(_n,E);else{var D=s&&s.beaconOnRetry;D&&pe(D)?D(b,E,k):(u&&u.sendPOST(b,E,!0),G(i,2,40,". Failed to send telemetry with Beacon API, retried with normal sender."))}}catch(ce){o&&ro(i,"Failed to send telemetry using sendBeacon API. Ex:"+te(ce)),A(E,o?0:400,{},_n)}}function j(b,E,q){var M,D,ce,me=b[Rc]||{};!q&&n&&(M=Qn(function(y,U){D=y,ce=U})),o&&q&&b.disableXhrSync&&(q=!1);var oe=b[Xs];if(!oe){R(E),D&&D(!1);return}var V=Qw(Lf,oe,_,!0,q,b[zo]);o||V.setRequestHeader("Content-type","application/json"),ee(Cr(me),function(y){V.setRequestHeader(y,me[y])}),V.onreadystatechange=function(){o||(C(V),V.readyState===4&&D&&D(!0))},V.onload=function(){o&&C(V)};function C(y){var U=s&&s.xhrOnComplete,J=U&&pe(U);if(J)U(y,E,b);else{var Y=Ku(y);A(E,y[fr],Cf(y,o),Y)}}return V.onerror=function(y){A(E,o?V[fr]:400,Cf(V,o),o?_n:Xu(V)),ce&&ce(y)},V.ontimeout=function(){A(E,o?V[fr]:500,Cf(V,o),o?_n:Xu(V)),D&&D(!1)},V.send(b[Cn]),M}function K(b,E,q){var M,D=b[Xs],ce=b[Cn],me=o?ce:new Blob([ce],{type:"application/json"}),oe,V,C,y=new Headers,U=ce[he],J=!1,Y=!1,_e=b[Rc]||{},Ie=(M={method:Lf,body:me},M[jg]=!0,M);b.headers&&Cr(b.headers)[he]>0&&(ee(Cr(_e),function(Oe){y.append(Oe,_e[Oe])}),Ie[Rc]=y),c?Ie.credentials=c:_&&o&&(Ie.credentials="include"),q&&(Ie.keepalive=!0,e+=U,o?b._sendReason===2&&(J=!0,h&&(D+=cv)):J=!0);var Te=new Request(D,Ie);try{Te[jg]=!0}catch{}if(!q&&n&&(oe=Qn(function(Oe,Fe){V=Oe,C=Fe})),!D){R(E),V&&V(!1);return}function Ue(Oe,Fe){Fe?A(E,o?0:Fe,{},o?_n:Oe):A(E,o?0:400,{},o?_n:Oe)}function Et(Oe,Fe,xt){var ir=Oe[fr],un=s.fetchOnComplete;un&&pe(un)?un(Oe,E,xt||_n,Fe):A(E,ir,{},xt||_n)}try{Kt(fetch(o?D:Te,o?Ie:null),function(Oe){if(q&&(e-=U,U=0),!Y)if(Y=!0,Oe.rejected)Ue(Oe.reason&&Oe.reason[eo],499),C&&C(Oe.reason);else{var Fe=Oe[Fi];try{!o&&!Fe.ok?(Fe[fr]?Ue(Fe.statusText,Fe[fr]):Ue(Fe.statusText,499),V&&V(!1)):o&&!Fe.body?(Et(Fe,null,_n),V&&V(!0)):Kt(Fe.text(),function(xt){Et(Fe,b,xt[Fi]),V&&V(!0)})}catch(xt){Fe&&Fe[fr]?Ue(te(xt),Fe[fr]):Ue(te(xt),499),C&&C(xt)}}})}catch(Oe){Y||(Ue(te(Oe),499),C&&C(Oe))}return J&&!Y&&(Y=!0,A(E,200,{}),V&&V(!0)),o&&!Y&&b[zo]>0&&g&&g.set(function(){Y||(Y=!0,A(E,500,{}),V&&V(!0))},b[zo]),oe}function re(b,E,q){var M=cn(),D=new XDomainRequest,ce=b[Cn];D.onload=function(){var y=Ku(D),U=s&&s.xdrOnComplete;U&&pe(U)?U(D,E,b):A(E,200,{},y)},D.onerror=function(){A(E,400,{},o?_n:wy(D))},D.ontimeout=function(){A(E,500,{})},D.onprogress=function(){};var me=M&&M.location&&M.location.protocol||"",oe=b[Xs];if(!oe){R(E);return}if(!o&&oe.lastIndexOf(me,0)!==0){var V="Cannot send XDomain request. The endpoint URL protocol doesn't match the hosting page protocol.";G(i,2,40,". "+V),x(V,E);return}var C=o?oe:oe[to](/^(https?:)/,"");D.open(Lf,C),b[zo]&&(D[zo]=b[zo]),D.send(ce),o&&q?g&&g.set(function(){D.send(ce)},0):D.send(ce)}function se(){e=0,r=!1,n=!1,i=null,o=null,s=null,a=null,c=null,u=null,l=!1,f=!1,m=!1,d=!1,h=!1,g=null}})}return t.__ieDyn=1,t})(),Xy="on",uv="attachEvent",lv="addEventListener",fv="detachEvent",dv="removeEventListener",Gd="events",Qd="visibilitychange",Nl="pagehide",Jy="unload",Gy="beforeunload",Qy=mn("aiEvtPageHide");mn("aiEvtPageShow");var xk=/\.[\.]+/g,Pk=/[\.]+$/,Dk=1,rl=My("events"),Rk=/^([^.]*)(?:\.(.+)|)/;function hv(t){return t&&t[to]?t[to](/^[\s\.]+|(?=[\s\.])[\.\s]+$/g,De):t}function Np(t,e){if(e){var n=De;Ce(e)?(n=De,ee(e,function(i){i=hv(i),i&&(i[0]!=="."&&(i="."+i),n+=i)})):n=hv(e),n&&(n[0]!=="."&&(n="."+n),t=(t||De)+n)}var r=Rk.exec(t||De)||[];return{type:r[1],ns:(r[2]||De).replace(xk,".").replace(Pk,De)[mo](".").sort().join(".")}}function Zy(t,e,n){n===void 0&&(n=!0);var r=rl.get(t,Gd,{},n),i=r[e];return i||(i=r[e]=[]),i}function Yy(t,e,n,r){t&&e&&e[oi]&&(t[dv]?t[dv](e[oi],n,r):t[fv]&&t[fv](Xy+e[oi],n))}function Ak(t,e,n,r){var i=!1;return t&&e&&e[oi]&&n&&(t[lv]?(t[lv](e[oi],n,r),i=!0):t[uv]&&(t[uv](Xy+e[oi],n),i=!0)),i}function pv(t,e,n,r){for(var i=e[he];i--;){var o=e[i];o&&(!n.ns||n.ns===o[Dg].ns)&&(!r||r(o))&&(Yy(t,o[Dg],o.handler,o.capture),e[Co](i,1))}}function Mk(t,e,n){if(e[oi])pv(t,Zy(t,e[oi]),e,n);else{var r=rl.get(t,Gd,{});Pe(r,function(i,o){pv(t,o,e,n)}),Cr(r)[he]===0&&rl.kill(t,Gd)}}function gi(t,e){var n;return e?(Ce(e)?n=[t].concat(e):n=[t,e],n=Np("xx",n).ns[mo](".")):n=t,n}function Sr(t,e,n,r,i){i===void 0&&(i=!1);var o=!1;if(t)try{var s=Np(e,r);if(o=Ak(t,s,n,i),o&&rl.accept(t)){var a={guid:Dk++,evtName:s,handler:n,capture:i};Zy(t,s.type)[Ee](a)}}catch{}return o}function ws(t,e,n,r,i){if(i===void 0&&(i=!1),t)try{var o=Np(e,r),s=!1;Mk(t,o,function(a){return o.ns&&!n||a.handler===n?(s=!0,!0):!1}),s||Yy(t,o,n,i)}catch{}}function zk(t,e,n){var r=!1,i=cn();i&&(r=Sr(i,t,e,n),r=Sr(i.body,t,e,n)||r);var o=It();return o&&(r=Sr(o,t,e,n)||r),r}function Uk(t,e,n){var r=cn();r&&(ws(r,t,e,n),ws(r.body,t,e,n));var i=It();i&&ws(i,t,e,n)}function il(t,e,n,r){var i=!1;return e&&t&&t[he]>0&&ee(t,function(o){o&&(!n||At(n,o)===-1)&&(i=zk(o,e,r)||i)}),i}function Nk(t,e,n,r){var i=!1;return e&&t&&Ce(t)&&(i=il(t,e,n,r),!i&&n&&n[he]>0&&(i=il(t,e,null,r))),i}function Zd(t,e,n){t&&Ce(t)&&ee(t,function(r){r&&Uk(r,e,n)})}function $k(t,e,n){return Nk([Gy,Jy,Nl],t,e,n)}function Lk(t,e){Zd([Gy,Jy,Nl],t,e)}function Yd(t,e,n){function r(s){var a=It();t&&a&&a.visibilityState==="hidden"&&t(s)}var i=gi(Qy,n),o=il([Nl],t,e,i);return(!e||At(e,Qd)===-1)&&(o=il([Qd],r,e,i)||o),!o&&e&&(o=Yd(t,null,n)),o}function jk(t,e){var n=gi(Qy,e);Zd([Nl],t,n),Zd([Qd],null,n)}var gv="_aiHooks",vv=["req","rsp","hkErr","fnErr"];function $p(t,e){if(t)for(var n=0;n<t[he]&&!e(t[n],n);n++);}function jf(t,e,n,r,i){i>=0&&i<=2&&$p(t,function(o,s){var a=o.cbks,c=a[vv[i]];if(c){e.ctx=function(){var f=r[s]=r[s]||{};return f};try{c[ho](e.inst,n)}catch(f){var u=e.err;try{var l=a[vv[2]];l&&(e.err=f,l[ho](e.inst,n))}catch{}finally{e.err=u}}}})}function Ok(t){return function(){var e=this,n=arguments,r=t.h,i={name:t.n,inst:e,ctx:null,set:c},o=[],s=a([i],n);i.evt=tt("event");function a(l,f){return $p(f,function(m){l[Ee](m)}),l}function c(l,f){n=a([],n),n[l]=f,s=a([i],n)}jf(r,i,s,o,0);var u=t.f;if(u)try{i.rslt=u[ho](e,n)}catch(l){throw i.err=l,jf(r,i,s,o,3),l}return jf(r,i,s,o,1),i.rslt}}function Lp(t,e,n,r){var i=null;return t&&(gn(t,e)?i=t:n&&(i=Lp(Bw(t),e,r,!1))),i}function Fk(t,e,n){return t?eh(t[Bn],e,n,!1):null}function eb(t,e,n,r){var i=n&&n[gv];if(!i){i={i:0,n:e,f:n,h:[]};var o=Ok(i);o[gv]=i,t[e]=o}var s={id:i.i,cbks:r,rm:function(){var a=this.id;$p(i.h,function(c,u){if(c.id===a)return i.h[Co](u,1),1})}};return i.i++,i.h[Ee](s),s}function eh(t,e,n,r,i){if(r===void 0&&(r=!0),t&&e&&n){var o=Lp(t,e,r,i);if(o){var s=o[e];if(typeof s===zm)return eb(o,e,s,n)}}return null}function Nc(t,e,n,r,i){if(t&&e&&n){var o=Lp(t,e,r,i)||t;if(o)return eb(o,e,o[e],n)}return null}var Vi="Microsoft_ApplicationInsights_BypassAjaxInstrumentation",tb="sampleRate",Of="ProcessLegacy",mv="http.method",jp="https://dc.services.visualstudio.com",Ss="/v2/track",Yn="not_specified",Ff="iKey",je=Ew({requestContextHeader:[0,"Request-Context"],requestContextTargetKey:[1,"appId"],requestContextAppIdFormat:[2,"appId=cid-v1:"],requestIdHeader:[3,"Request-Id"],traceParentHeader:[4,"traceparent"],traceStateHeader:[5,"tracestate"],sdkContextHeader:[6,"Sdk-Context"],sdkContextHeaderAppIdRequest:[7,"appId"],requestContextHeaderLowerCase:[8,"request-context"]}),Ns="split",be="length",tc="toLowerCase",bi="ingestionendpoint",nc="toString",Op="removeItem",yc="message",Go="count",Wf="preTriggerDate",Vf="getUTCDate",ol="stringify",Hf="pathname",rc="match",yv="correlationHeaderExcludePatterns",er="name",qn="properties",kr="measurements",au="sizeInBytes",cu="typeName",Qs="exceptions",ba="severityLevel",qf="problemGroup",ks="parsedStack",sl="hasFullStack",al="assembly",Ir="fileName",$s="line",$l="aiDataContract",cl="duration";function nb(t,e,n){var r=e[be],i=Wk(t,e);if(i[be]!==r){for(var o=0,s=i;n[s]!==void 0;)o++,s=Bt(i,0,147)+qk(o);i=s}return i}function Wk(t,e){var n;return e&&(e=Ve($t(e)),e[be]>150&&(n=Bt(e,0,150),G(t,2,57,"name is too long. It has been truncated to 150 characters.",{name:e},!0))),n||e}function pt(t,e,n){n===void 0&&(n=1024);var r;return e&&(n=n||1024,e=Ve($t(e)),e[be]>n&&(r=Bt(e,0,n),G(t,2,61,"string value is too long. It has been truncated to "+n+" characters.",{value:e},!0))),r||e}function Ll(t,e,n){return de(e)&&(e=gr(e,n)),ib(t,e,2048,66)}function rb(t,e){var n;return e&&e[be]>32768&&(n=Bt(e,0,32768),G(t,2,56,"message is too long, it has been truncated to 32768 characters.",{message:e},!0)),n||e}function Vk(t,e){var n;if(e){var r=""+e;r[be]>32768&&(n=Bt(r,0,32768),G(t,2,52,"exception is too long, it has been truncated to 32768 characters.",{exception:e},!0))}return n||e}function ko(t,e){if(e){var n={};Pe(e,function(r,i){if(Xt(i)&&vc())try{i=An()[ol](i)}catch(o){G(t,2,49,"custom property is not valid",{exception:o},!0)}i=pt(t,i,8192),r=nb(t,r,n),n[r]=i}),e=n}return e}function Io(t,e){if(e){var n={};Pe(e,function(r,i){r=nb(t,r,n),n[r]=i}),e=n}return e}function Hk(t,e){return e&&ib(t,e,128,69)[nc]()}function ib(t,e,n,r){var i;return e&&(e=Ve($t(e)),e[be]>n&&(i=Bt(e,0,n),G(t,2,r,"input is too long, it has been truncated to "+n+" characters.",{data:e},!0))),i||e}function qk(t){var e="00"+t;return Jr(e,e[be]-3)}var bv=It()||{},_v=0,Bk=[null,null,null,null,null];function Fp(t){var e=_v,n=Bk,r=n[e];return bv.createElement?n[e]||(r=n[e]=bv.createElement("a")):r={host:Jk(t)},r.href=t,e++,e>=n[be]&&(e=0),_v=e,r}function Kk(t){var e,n=Fp(t);return n&&(e=n.href),e}function Xk(t,e){return t?t.toUpperCase()+" "+e:e}function Jk(t,e){var n=ob(t)||"";if(n){var r=n[rc](/(www\d{0,5}\.)?([^\/:]{1,256})(:\d{1,20})?/i);if(r!=null&&r[be]>3&&de(r[2])&&r[2][be]>0)return r[2]+(r[3]||"")}return n}function ob(t,e){var n=null;if(t){var r=t[rc](/(\w{1,150}):\/\/([^\/:]{1,256})(:\d{1,20})?/i);if(r!=null&&r[be]>2&&de(r[2])&&r[2][be]>0&&(n=r[2]||"",r[be]>2)){var i=(r[1]||"")[tc](),o=r[3]||"";(i==="http"&&o===":80"||i==="https"&&o===":443")&&(o=""),n+=o}}return n}var Gk=[jp+Ss,"https://breeze.aimon.applicationinsights.io"+Ss,"https://dc-int.services.visualstudio.com"+Ss],Qk="cid-v1:";function th(t){return At(Gk,t[tc]())!==-1}function Cv(t,e,n){if(!e||t&&t.disableCorrelationHeaders)return!1;if(t&&t[yv]){for(var r=0;r<t.correlationHeaderExcludePatterns[be];r++)if(t[yv][r].test(e))return!1}var i=Fp(e).host[tc]();if(i&&(st(i,":443")!==-1||st(i,":80")!==-1)&&(i=(ob(e)||"")[tc]()),(!t||!t.enableCorsCorrelation)&&i&&i!==n)return!1;var o=t&&t.correlationHeaderDomains;if(o){var s;if(ee(o,function(u){var l=new RegExp(u.toLowerCase().replace(/\\/g,"\\\\").replace(/\./g,"\\.").replace(/\*/g,".*"));s=s||l.test(i)}),!s)return!1}var a=t&&t.correlationHeaderExcludedDomains;if(!a||a[be]===0)return!0;for(var r=0;r<a[be];r++){var c=new RegExp(a[r].toLowerCase().replace(/\\/g,"\\\\").replace(/\./g,"\\.").replace(/\*/g,".*"));if(c.test(i))return!1}return i&&i[be]>0}function wv(t){if(t){var e=Zk(t,je[1]);if(e&&e!==Qk)return e}}function Zk(t,e){if(t)for(var n=t[Ns](","),r=0;r<n[be];++r){var i=n[r][Ns]("=");if(i[be]===2&&i[0]===e)return i[1]}}function Yk(t,e,n,r){var i,o=r,s=r;if(e&&e[be]>0){var a=Fp(e);if(i=a.host,!o)if(a[Hf]!=null){var c=a.pathname[be]===0?"/":a[Hf];c.charAt(0)!=="/"&&(c="/"+c),s=a[Hf],o=pt(t,n?n+" "+c:c)}else o=pt(t,e)}else i=r,o=r;return{target:i,name:o,data:s}}function $c(){var t=Pr();if(t&&t.now&&t.timing){var e=t.now()+t.timing.navigationStart;if(e>0)return e}return Rn()}function Ht(t,e){var n=null;return t!==0&&e!==0&&!B(t)&&!B(e)&&(n=e-t),n}function Wp(t,e){var n=t||{};return{getName:function(){return n[er]},setName:function(r){e&&e.setName(r),n[er]=r},getTraceId:function(){return n.traceID},setTraceId:function(r){e&&e.setTraceId(r),Ap(r)&&(n.traceID=r)},getSpanId:function(){return n.parentID},setSpanId:function(r){e&&e.setSpanId(r),Mp(r)&&(n.parentID=r)},getTraceFlags:function(){return n.traceFlags},setTraceFlags:function(r){e&&e.setTraceFlags(r),n.traceFlags=r}}}var bc=Sp({LocalStorage:0,SessionStorage:1}),ai=void 0,ci=void 0,sb="";function Vp(){return Ol()?jl(bc.LocalStorage):null}function jl(t){try{if(B(pn()))return null;var e=new Date()[nc](),n=tt(t===bc.LocalStorage?"localStorage":"sessionStorage"),r=sb+e;n.setItem(r,e);var i=n.getItem(r)!==e;if(n[Op](r),!i)return n}catch{}return null}function Hp(){return ic()?jl(bc.SessionStorage):null}function eI(){ai=!1,ci=!1}function qp(t){sb=t||""}function tI(){ai=Ol(!0),ci=ic(!0)}function Ol(t){return(t||ai===void 0)&&(ai=!!jl(bc.LocalStorage)),ai}function ab(t,e){var n=Vp();if(n!==null)try{return n.getItem(e)}catch(r){ai=!1,G(t,2,1,"Browser failed read of local storage. "+Ne(r),{exception:te(r)})}return null}function cb(t,e,n){var r=Vp();if(r!==null)try{return r.setItem(e,n),!0}catch(i){ai=!1,G(t,2,3,"Browser failed write to local storage. "+Ne(i),{exception:te(i)})}return!1}function nI(t,e){var n=Vp();if(n!==null)try{return n[Op](e),!0}catch(r){ai=!1,G(t,2,5,"Browser failed removal of local storage item. "+Ne(r),{exception:te(r)})}return!1}function ic(t){return(t||ci===void 0)&&(ci=!!jl(bc.SessionStorage)),ci}function nh(t,e){var n=Hp();if(n!==null)try{return n.getItem(e)}catch(r){ci=!1,G(t,2,2,"Browser failed read of session storage. "+Ne(r),{exception:te(r)})}return null}function ub(t,e,n){var r=Hp();if(r!==null)try{return r.setItem(e,n),!0}catch(i){ci=!1,G(t,2,4,"Browser failed write to session storage. "+Ne(i),{exception:te(i)})}return!1}function lb(t,e){var n=Hp();if(n!==null)try{return n[Op](e),!0}catch(r){ci=!1,G(t,2,6,"Browser failed removal of session storage item. "+Ne(r),{exception:te(r)})}return!1}var rI="appInsightsThrottle",iI=(function(){function t(e,n){var r=this,i,o,s,a,c,u,l,f=!1,m=!1;h(),r._getDbgPlgTargets=function(){return[l]},r.getConfig=function(){return s},r.canThrottle=function(b){var E=K(b),q=g(b);return _(q,i,E)},r.isTriggered=function(b){return re(b)},r.isReady=function(){return f},r.flush=function(b){try{var E=se(b);if(E&&E[be]>0){var q=E.slice(0);return l[b]=[],ee(q,function(M){d(M.msgID,M[yc],M.severity,!1)}),!0}}catch{}return!1},r.flushAll=function(){try{if(l){var b=!0;return Pe(l,function(E){var q=r.flush(parseInt(E));b=b&&q}),b}}catch{}return!1},r.onReadyState=function(b,E){return E===void 0&&(E=!0),f=B(b)?!0:b,f&&E?r.flushAll():null},r.sendMessage=function(b,E,q){return d(b,E,q,!0)};function d(b,E,q,M){if(f){var D=j(b);if(!D)return;var ce=g(b),me=K(b),oe=_(ce,i,me),V=!1,C=0,y=re(b);try{oe&&!y?(C=Bm(ce.limit.maxSendNumber,me[Go]+1),me[Go]=0,V=!0,c[b]=!0,me[Wf]=new Date):(c[b]=oe,me[Go]+=1);var U=P(b);A(o,U,me);for(var J=0;J<C;J++)O(b,o,E,q)}catch{}return{isThrottled:V,throttleNum:C}}else if(M){var Y=se(b);Y.push({msgID:b,message:E,severity:q})}return null}function h(){o=wo(e),c={},a={},l={},s={},p(109),u=no(n)?n:"",e.addUnloadHook(at(e.config,function(b){var E=b.cfg;i=Ol();var q=E.throttleMgrCfg||{};Pe(q,function(M,D){p(parseInt(M),D)})}))}function g(b){return s[b]||s[109]}function p(b,E){var q,M;try{var D=E||{},ce={};ce.disabled=!!D.disabled;var me=D.interval||{};m=(me==null?void 0:me.daysOfMonth)&&(me==null?void 0:me.daysOfMonth[be])>0,ce.interval=v(me);var oe={samplingRate:((q=D.limit)===null||q===void 0?void 0:q.samplingRate)||100,maxSendNumber:((M=D.limit)===null||M===void 0?void 0:M.maxSendNumber)||1};ce.limit=oe,s[b]=ce}catch{}}function v(b){b=b||{};var E=b==null?void 0:b.monthInterval,q=b==null?void 0:b.dayInterval;return B(E)&&B(q)&&(b.monthInterval=3,m||(b.daysOfMonth=[28],m=!0)),b={monthInterval:b==null?void 0:b.monthInterval,dayInterval:b==null?void 0:b.dayInterval,daysOfMonth:b==null?void 0:b.daysOfMonth},b}function _(b,E,q){if(b&&!b.disabled&&E&&no(q)){var M=H(),D=q.date,ce=b.interval,me=1;if(ce!=null&&ce.monthInterval){var oe=(M.getUTCFullYear()-D.getUTCFullYear())*12+M.getUTCMonth()-D.getUTCMonth();me=k(ce.monthInterval,0,oe)}var V=1;if(m)V=At(ce.daysOfMonth,M[Vf]());else if(ce!=null&&ce.dayInterval){var C=an((M.getTime()-D.getTime())/864e5);V=k(ce.dayInterval,0,C)}return me>=0&&V>=0}return!1}function P(b,E){var q=no(E)?E:"";return b?rI+q+"-"+b:null}function x(b){try{if(b){var E=new Date;return b.getUTCFullYear()===E.getUTCFullYear()&&b.getUTCMonth()===E.getUTCMonth()&&b[Vf]()===E[Vf]()}}catch{}return!1}function R(b,E,q){try{var M={date:H(),count:0};if(b){var D=JSON.parse(b),ce={date:H(D.date)||M.date,count:D[Go]||M[Go],preTriggerDate:D.preTriggerDate?H(D[Wf]):void 0};return ce}else return A(E,q,M),M}catch{}return null}function H(b){try{if(b){var E=new Date(b);if(!isNaN(E.getDate()))return E}else return new Date}catch{}return null}function A(b,E,q){try{return cb(b,E,Ve(JSON[ol](q)))}catch{}return!1}function k(b,E,q){return b<=0?1:q>=E&&(q-E)%b==0?an((q-E)/b)+1:-1}function O(b,E,q,M){G(E,M||1,b,q)}function j(b){try{var E=g(b);return _S(1e6)<=E.limit.samplingRate}catch{}return!1}function K(b){try{var E=a[b];if(!E){var q=P(b,u);E=R(ab(o,q),o,q),a[b]=E}return a[b]}catch{}return null}function re(b){var E=c[b];if(B(E)){E=!1;var q=K(b);q&&(E=x(q[Wf])),c[b]=E}return c[b]}function se(b){return l=l||{},B(l[b])&&(l[b]=[]),l[b]}}return t})(),oI=";",sI="=";function fb(t){if(!t)return{};var e=t[Ns](oI),n=JC(e,function(i,o){var s=o[Ns](sI);if(s[be]===2){var a=s[0][tc](),c=s[1];i[a]=c}return i},{});if(Cr(n)[be]>0){if(n.endpointsuffix){var r=n.location?n.location+".":"";n[bi]=n[bi]||"https://"+r+"dc."+n.endpointsuffix}n[bi]=n[bi]||jp,ay(n[bi],"/")&&(n[bi]=n[bi].slice(0,-1))}return n}var aI=(function(){function t(e,n,r){var i=this,o=this;o.ver=1,o.sampleRate=100,o.tags={},o[er]=pt(e,r)||Yn,o.data=n,o.time=Us(new Date),o[$l]={time:1,iKey:1,name:1,sampleRate:function(){return i.sampleRate===100?4:1},tags:1,data:1}}return t})(),vr=(function(){function t(e,n,r,i){this.aiDataContract={ver:1,name:1,properties:0,measurements:0};var o=this;o.ver=2,o[er]=pt(e,n)||Yn,o[qn]=ko(e,r),o[kr]=Io(e,i)}return t.envelopeType="Microsoft.ApplicationInsights.{0}.Event",t.dataType="EventData",t})(),cI=58,uI=/^\s{0,50}(from\s|at\s|Line\s{1,5}\d{1,10}\s{1,5}of|\w{1,50}@\w{1,80}|[^\(\s\n]+:[0-9\?]+(?::[0-9\?]+)?)/,lI=/^(?:\s{0,50}at)?\s{0,50}([^\@\()\s]+)?\s{0,50}(?:\s|\@|\()\s{0,5}([^\(\s\n\]]+):([0-9\?]+):([0-9\?]+)\)?$/,fI=/^(?:\s{0,50}at)?\s{0,50}([^\@\()\s]+)?\s{0,50}(?:\s|\@|\()\s{0,5}([^\(\s\n\]]+):([0-9\?]+)\)?$/,dI=/^(?:\s{0,50}at)?\s{0,50}([^\@\()\s]+)?\s{0,50}(?:\s|\@|\()\s{0,5}([^\(\s\n\)\]]+)\)?$/,hI=/(?:^|\(|\s{0,10}[\w\)]+\@)?([^\(\n\s\]\)]+)(?:\:([0-9]+)(?:\:([0-9]+))?)?\)?(?:,|$)/,pI=/([^\(\s\n]+):([0-9]+):([0-9]+)$/,gI=/([^\(\s\n]+):([0-9]+)$/,Sv="<no_method>",Is="error",hn="stack",rh="stackDetails",kv="errorSrc",ih="message",db="description",Iv=[{re:lI,len:5,m:1,fn:2,ln:3,col:4},{chk:mI,pre:vI,re:fI,len:4,m:1,fn:2,ln:3},{re:dI,len:3,m:1,fn:2,hdl:Ev},{re:hI,len:2,fn:1,hdl:Ev}];function vI(t){return t.replace(/(\(anonymous\))/,"<anonymous>")}function mI(t){return st(t,"[native")<0}function oh(t,e){var n=t;return n&&!de(n)&&(JSON&&JSON[ol]?(n=JSON[ol](t),e&&(!n||n==="{}")&&(pe(t[nc])?n=t[nc]():n=""+t)):n=""+t+" - (Missing JSON.stringify)"),n||""}function hb(t,e){var n=t;return t&&(n&&!de(n)&&(n=t[ih]||t[db]||n),n&&!de(n)&&(n=oh(n,!0)),t.filename&&(n=n+" @"+(t.filename||"")+":"+(t.lineno||"?")+":"+(t.colno||"?"))),e&&e!=="String"&&e!=="Object"&&e!=="Error"&&st(n||"",e)===-1&&(n=e+": "+n),n||""}function yI(t){try{if(Xt(t))return"hasFullStack"in t&&"typeName"in t}catch{}return!1}function bI(t){try{if(Xt(t))return"ver"in t&&"exceptions"in t&&"properties"in t}catch{}return!1}function Tv(t){return t&&t.src&&de(t.src)&&t.obj&&Ce(t.obj)}function _i(t){var e=t||"";de(e)||(de(e[hn])?e=e[hn]:e=""+e);var n=e[Ns](`
|
|
8
|
+
`);return{src:e,obj:n}}function _I(t){for(var e=[],n=t[Ns](`
|
|
9
|
+
`),r=0;r<n[be];r++){var i=n[r];n[r+1]&&(i+="@"+n[r+1],r++),e.push(i)}return{src:t,obj:e}}function pb(t){var e=null;if(t)try{if(t[hn])e=_i(t[hn]);else if(t[Is]&&t[Is][hn])e=_i(t[Is][hn]);else if(t.exception&&t.exception[hn])e=_i(t.exception[hn]);else if(Tv(t))e=t;else if(Tv(t[rh]))e=t[rh];else if(cn()&&cn().opera&&t[ih])e=_I(t[yc]);else if(t.reason&&t.reason[hn])e=_i(t.reason[hn]);else if(de(t))e=_i(t);else{var n=t[ih]||t[db]||"";de(t[kv])&&(n&&(n+=`
|
|
10
|
+
`),n+=" from "+t[kv]),n&&(e=_i(n))}}catch(r){e=_i(r)}return e||{src:"",obj:null}}function CI(t){var e="";return t&&(t.obj?e=t.obj.join(`
|
|
11
|
+
`):e=t.src||""),e}function wI(t){var e,n=t.obj;if(n&&n[be]>0){e=[];var r=0,i=!1,o=0;ee(n,function(g){if(i||TI(g)){var p=$t(g);i=!0;var v=EI(p,r);v&&(o+=v[au],e.push(v),r++)}});var s=32*1024;if(o>s)for(var a=0,c=e[be]-1,u=0,l=a,f=c;a<c;){var m=e[a][au],d=e[c][au];if(u+=m+d,u>s){var h=f-l+1;e.splice(l,h);break}l=a,f=c,a++,c--}}return e}function ul(t){var e="";if(t&&(e=t.typeName||t[er]||"",!e))try{var n=/function (.{1,200})\(/,r=n.exec(t.constructor[nc]());e=r&&r[be]>1?r[1]:""}catch{}return e}function Bf(t){if(t)try{if(!de(t)){var e=ul(t),n=oh(t,!1);return(!n||n==="{}")&&(t[Is]&&(t=t[Is],e=ul(t)),n=oh(t,!0)),st(n,e)!==0&&e!=="String"?e+":"+n:n}}catch{}return""+(t||"")}var qt=(function(){function t(e,n,r,i,o,s){this.aiDataContract={ver:1,exceptions:1,severityLevel:0,properties:0,measurements:0};var a=this;a.ver=2,bI(n)?(a[Qs]=n[Qs]||[],a[qn]=n[qn],a[kr]=n[kr],n[ba]&&(a[ba]=n[ba]),n.id&&(a.id=n.id,n[qn].id=n.id),n[qf]&&(a[qf]=n[qf]),B(n.isManual)||(a.isManual=n.isManual)):(r||(r={}),s&&(r.id=s),a[Qs]=[gb(e,n,r)],a[qn]=ko(e,r),a[kr]=Io(e,i),o&&(a[ba]=o),s&&(a.id=s))}return t.CreateAutoException=function(e,n,r,i,o,s,a,c){var u=ul(o||s||e);return{message:hb(e,u),url:n,lineNumber:r,columnNumber:i,error:Bf(o||s||e),evt:Bf(s||e),typeName:u,stackDetails:pb(a||o||s),errorSrc:c}},t.CreateFromInterface=function(e,n,r,i){var o=n[Qs]&&Ha(n[Qs],function(a){return II(e,a)}),s=new t(e,jt(jt({},n),{exceptions:o}),r,i);return s},t.prototype.toInterface=function(){var e=this,n=e.exceptions,r=e.properties,i=e.measurements,o=e.severityLevel,s=e.problemGroup,a=e.id,c=e.isManual,u=n instanceof Array&&Ha(n,function(l){return l.toInterface()})||void 0;return{ver:"4.0",exceptions:u,severityLevel:o,properties:r,measurements:i,problemGroup:s,id:a,isManual:c}},t.CreateSimpleException=function(e,n,r,i,o,s){var a;return{exceptions:[(a={},a[sl]=!0,a.message=e,a.stack=o,a.typeName=n,a)]}},t.envelopeType="Microsoft.ApplicationInsights.{0}.Exception",t.dataType="ExceptionData",t.formatError=Bf,t})(),SI=Dn({id:0,outerId:0,typeName:1,message:1,hasFullStack:0,stack:0,parsedStack:2});function kI(){var t=this,e=Ce(t[ks])&&Ha(t[ks],function(r){return PI(r)}),n={id:t.id,outerId:t.outerId,typeName:t[cu],message:t[yc],hasFullStack:t[sl],stack:t[hn],parsedStack:e||void 0};return n}function gb(t,e,n){var r,i,o,s,a,c,u,l;if(yI(e))s=e[cu],a=e[yc],u=e[hn],l=e[ks]||[],c=e[sl];else{var f=e,m=f&&f.evt;fp(f)||(f=f[Is]||m||f),s=pt(t,ul(f))||Yn,a=rb(t,hb(e||f,s))||Yn;var d=e[rh]||pb(e);l=wI(d),Ce(l)&&Ha(l,function(h){h[al]=pt(t,h[al]),h[Ir]=pt(t,h[Ir])}),u=Vk(t,CI(d)),c=Ce(l)&&l[be]>0,n&&(n[cu]=n[cu]||s)}return r={},r[$l]=SI,r.id=i,r.outerId=o,r.typeName=s,r.message=a,r[sl]=c,r.stack=u,r.parsedStack=l,r.toInterface=kI,r}function II(t,e){var n=Ce(e[ks])&&Ha(e[ks],function(i){return xI(i)})||e[ks],r=gb(t,jt(jt({},e),{parsedStack:n}));return r}function vb(t,e){var n=e[rc](pI);if(n&&n[be]>=4)t[Ir]=n[1],t[$s]=parseInt(n[2]);else{var r=e[rc](gI);r&&r[be]>=3?(t[Ir]=r[1],t[$s]=parseInt(r[2])):t[Ir]=e}}function Ev(t,e,n){var r=t[Ir];e.fn&&n&&n[be]>e.fn&&(e.ln&&n[be]>e.ln?(r=Ve(n[e.fn]||""),t[$s]=parseInt(Ve(n[e.ln]||""))||0):r=Ve(n[e.fn]||"")),r&&vb(t,r)}function TI(t){var e=!1;if(t&&de(t)){var n=Ve(t);n&&(e=uI.test(n))}return e}var mb=Dn({level:1,method:1,assembly:0,fileName:0,line:0});function EI(t,e){var n,r;if(t&&de(t)&&Ve(t)){r=(n={},n[$l]=mb,n.level=e,n.assembly=Ve(t),n.method=Sv,n.fileName="",n.line=0,n.sizeInBytes=0,n);for(var i=0;i<Iv[be];){var o=Iv[i];if(o.chk&&!o.chk(t))break;o.pre&&(t=o.pre(t));var s=t[rc](o.re);if(s&&s[be]>=o.len){o.m&&(r.method=Ve(s[o.m]||Sv)),o.hdl?o.hdl(r,o,s):o.fn&&(o.ln?(r[Ir]=Ve(s[o.fn]||""),r[$s]=parseInt(Ve(s[o.ln]||""))||0):vb(r,s[o.fn]||""));break}i++}}return yb(r)}function xI(t){var e,n=(e={},e[$l]=mb,e.level=t.level,e.method=t.method,e.assembly=t[al],e.fileName=t[Ir],e.line=t[$s],e.sizeInBytes=0,e);return yb(n)}function yb(t){var e=cI;return t&&(e+=t.method[be],e+=t.assembly[be],e+=t.fileName[be],e+=t.level.toString()[be],e+=t.line.toString()[be],t[au]=e),t}function PI(t){return{level:t.level,method:t.method,assembly:t[al],fileName:t[Ir],line:t[$s]}}var DI=(function(){function t(){this.aiDataContract={name:1,kind:0,value:1,count:0,min:0,max:0,stdDev:0},this.kind=0}return t})(),oo=(function(){function t(e,n,r,i,o,s,a,c,u){this.aiDataContract={ver:1,metrics:1,properties:0};var l=this;l.ver=2;var f=new DI;f[Go]=i>0?i:void 0,f.max=isNaN(s)||s===null?void 0:s,f.min=isNaN(o)||o===null?void 0:o,f[er]=pt(e,n)||Yn,f.value=r,f.stdDev=isNaN(a)||a===null?void 0:a,l.metrics=[f],l[qn]=ko(e,c),l[kr]=Io(e,u)}return t.envelopeType="Microsoft.ApplicationInsights.{0}.Metric",t.dataType="MetricData",t})(),Zs="";function Qr(t){(isNaN(t)||t<0)&&(t=0),t=sy(t);var e=Zs+t%1e3,n=Zs+an(t/1e3)%60,r=Zs+an(t/(1e3*60))%60,i=Zs+an(t/(1e3*60*60))%24,o=an(t/(1e3*60*60*24));return e=e[be]===1?"00"+e:e[be]===2?"0"+e:e,n=n[be]<2?"0"+n:n,r=r[be]<2?"0"+r:r,i=i[be]<2?"0"+i:i,(o>0?o+".":Zs)+i+":"+r+":"+n+"."+e}function RI(t,e,n,r,i){return!i&&de(t)&&(t==="Script error."||t==="Script error")}var ui=(function(){function t(e,n,r,i,o,s,a){this.aiDataContract={ver:1,name:0,url:0,duration:0,properties:0,measurements:0,id:0};var c=this;c.ver=2,c.id=Hk(e,a),c.url=Ll(e,r),c[er]=pt(e,n)||Yn,isNaN(i)||(c[cl]=Qr(i)),c[qn]=ko(e,o),c[kr]=Io(e,s)}return t.envelopeType="Microsoft.ApplicationInsights.{0}.Pageview",t.dataType="PageviewData",t})(),so=(function(){function t(e,n,r,i,o,s,a,c,u,l,f,m){u===void 0&&(u="Ajax"),this.aiDataContract={id:1,ver:1,name:0,resultCode:0,duration:0,success:0,data:0,target:0,type:0,properties:0,measurements:0,kind:0,value:0,count:0,min:0,max:0,stdDev:0,dependencyKind:0,dependencySource:0,commandName:0,dependencyTypeName:0};var d=this;d.ver=2,d.id=n,d[cl]=Qr(o),d.success=s,d.resultCode=a+"",d.type=pt(e,u);var h=Yk(e,r,c,i);d.data=Ll(e,i)||h.data,d.target=pt(e,h.target),l&&(d.target="".concat(d.target," | ").concat(l)),d[er]=pt(e,h[er]),d[qn]=ko(e,f),d[kr]=Io(e,m)}return t.envelopeType="Microsoft.ApplicationInsights.{0}.RemoteDependency",t.dataType="RemoteDependencyData",t})(),Ts=(function(){function t(e,n,r,i,o){this.aiDataContract={ver:1,message:1,severityLevel:0,properties:0};var s=this;s.ver=2,n=n||Yn,s[yc]=rb(e,n),s[qn]=ko(e,i),s[kr]=Io(e,o),r&&(s[ba]=r)}return t.envelopeType="Microsoft.ApplicationInsights.{0}.Message",t.dataType="MessageData",t})(),Es=(function(){function t(e,n,r,i,o,s,a){this.aiDataContract={ver:1,name:0,url:0,duration:0,perfTotal:0,networkConnect:0,sentRequest:0,receivedResponse:0,domProcessing:0,properties:0,measurements:0};var c=this;c.ver=2,c.url=Ll(e,r),c[er]=pt(e,n)||Yn,c[qn]=ko(e,o),c[kr]=Io(e,s),a&&(c.domProcessing=a.domProcessing,c[cl]=a[cl],c.networkConnect=a.networkConnect,c.perfTotal=a.perfTotal,c.receivedResponse=a.receivedResponse,c.sentRequest=a.sentRequest)}return t.envelopeType="Microsoft.ApplicationInsights.{0}.PageviewPerformance",t.dataType="PageviewPerformanceData",t})(),To=(function(){function t(e,n){this.aiDataContract={baseType:1,baseData:1},this.baseType=e,this.baseData=n}return t})(),oc=Sp({Verbose:0,Information:1,Warning:2,Error:3,Critical:4});function vi(t){var e="ai."+t+".";return function(n){return e+n}}var Ys=vi("application"),gt=vi("device"),Lc=vi("location"),$o=vi("operation"),Kf=vi("session"),Lr=vi("user"),Ci=vi("cloud"),ea=vi("internal"),bb=(function(t){rr(e,t);function e(){return t.call(this)||this}return e})(Xw({applicationVersion:Ys("ver"),applicationBuild:Ys("build"),applicationTypeId:Ys("typeId"),applicationId:Ys("applicationId"),applicationLayer:Ys("layer"),deviceId:gt("id"),deviceIp:gt("ip"),deviceLanguage:gt("language"),deviceLocale:gt("locale"),deviceModel:gt("model"),deviceFriendlyName:gt("friendlyName"),deviceNetwork:gt("network"),deviceNetworkName:gt("networkName"),deviceOEMName:gt("oemName"),deviceOS:gt("os"),deviceOSVersion:gt("osVersion"),deviceRoleInstance:gt("roleInstance"),deviceRoleName:gt("roleName"),deviceScreenResolution:gt("screenResolution"),deviceType:gt("type"),deviceMachineName:gt("machineName"),deviceVMName:gt("vmName"),deviceBrowser:gt("browser"),deviceBrowserVersion:gt("browserVersion"),locationIp:Lc("ip"),locationCountry:Lc("country"),locationProvince:Lc("province"),locationCity:Lc("city"),operationId:$o("id"),operationName:$o("name"),operationParentId:$o("parentId"),operationRootId:$o("rootId"),operationSyntheticSource:$o("syntheticSource"),operationCorrelationVector:$o("correlationVector"),sessionId:Kf("id"),sessionIsFirst:Kf("isFirst"),sessionIsNew:Kf("isNew"),userAccountAcquisitionDate:Lr("accountAcquisitionDate"),userAccountId:Lr("accountId"),userAgent:Lr("userAgent"),userId:Lr("id"),userStoreRegion:Lr("storeRegion"),userAuthUserId:Lr("authUserId"),userAnonymousUserAcquisitionDate:Lr("anonUserAcquisitionDate"),userAuthenticatedUserAcquisitionDate:Lr("authUserAcquisitionDate"),cloudName:Ci("name"),cloudRole:Ci("role"),cloudRoleVer:Ci("roleVer"),cloudRoleInstance:Ci("roleInstance"),cloudEnvironment:Ci("environment"),cloudLocation:Ci("location"),cloudDeploymentUnit:Ci("deploymentUnit"),internalNodeName:ea("nodeName"),internalSdkVersion:ea("sdkVersion"),internalAgentVersion:ea("agentVersion"),internalSnippet:ea("snippet"),internalSdkSrc:ea("sdkSrc")}));function Vr(t,e,n,r,i,o){n=pt(r,n)||Yn,(B(t)||B(e)||B(n))&&Yt("Input doesn't contain all required fields");var s="";t[Ff]&&(s=t[Ff],delete t[Ff]);var a={name:n,time:Us(new Date),iKey:s,ext:o||{},tags:[],data:{},baseType:e,baseData:t};return B(i)||Pe(i,function(c,u){a.data[c]=u}),a}var Zt={UserExt:"user",DeviceExt:"device",TraceExt:"trace",WebExt:"web",AppExt:"app",OSExt:"os"},Ke=new bb;function ta(t){var e=null;if(pe(Event))e=new Event(t);else{var n=It();n&&n.createEvent&&(e=n.createEvent("Event"),e.initEvent(t,!0,!0))}return e}function xv(t,e){ws(t,null,null,e)}function AI(t){var e=It(),n=nr(),r=!1,i=[],o=1;n&&!B(n.onLine)&&!n.onLine&&(o=2);var s=0,a=m(),c=gi(mn("OfflineListener"),t);try{if(l(cn())&&(r=!0),e){var u=e.body||e;u.ononline&&l(u)&&(r=!0)}}catch{r=!1}function l(P){var x=!1;return P&&(x=Sr(P,"online",g,c),x&&Sr(P,"offline",p,c)),x}function f(){return a}function m(){return!(s===2||o===2)}function d(){var P=m();a!==P&&(a=P,ee(i,function(x){var R={isOnline:a,rState:o,uState:s};try{x(R)}catch{}}))}function h(P){s=P,d()}function g(){o=1,d()}function p(){o=2,d()}function v(){var P=cn();if(P&&r){if(xv(P,c),e){var x=e.body||e;Ze(x.ononline)||xv(x,c)}r=!1}}function _(P){return i.push(P),{rm:function(){var x=i.indexOf(P);if(x>-1)return i.splice(x,1)}}}return{isOnline:f,isListening:function(){return r},unload:v,addListener:_,setOnlineState:h}}var Fl="AppInsightsPropertiesPlugin",_b="AppInsightsChannelPlugin",Bp="ApplicationInsightsAnalytics",MI=Fs({history:{blkVal:!0,v:void 0}}),zI=(function(t){rr(e,t);function e(){var n=t.call(this)||this;n.priority=185,n.identifier="ReactPlugin";var r,i,o,s,a;return He(e,n,function(c,u){l(),c.initialize=function(d,h,g,p){t.prototype.initialize.call(n,d,h,g,p),c._addHook(at(d,function(v){var _,P=c._getTelCtx();if(i=P.getExtCfg(n.identifier,MI),r=(_=h.getPlugin(Bp))===null||_===void 0?void 0:_.plugin,pe(o)&&(o(),o=null),i.history&&(m(i.history),!a)){var x={uri:i.history.location.pathname};c.trackPageView(x),a=!0}}))},c.getCookieMgr=function(){return Ul(c.core)},c.getAppInsights=f,c.processTelemetry=function(d,h){c.processNext(d,h)},c._doTeardown=function(d,h,g){pe(o)&&o(),s&&clearTimeout(s),l()},us(c,f,["trackMetric","trackPageView","trackEvent","trackException","trackTrace"]);function l(){r=null,i=null,o=null,s=null,a=!1}function f(){return r||G(c.diagLog(),1,64,"Analytics plugin is not available, React plugin telemetry will not be sent: "),r}function m(d){var h=function(g){var p=null;"location"in g?p=g.location:p=g,s=setTimeout(function(){s=null;var v={uri:p.pathname};c.trackPageView(v)},500)};o=d.listen(h)}kC(c,"_extensionConfig",function(){return i})}),n}return e.__ieDyn=1,e})(So),ll="toString",sh="isStorageUseDisabled",Lo="_addHook",ze="core",jr="dataType",wi="envelopeType",Gt="diagLog",Si="track",uu="trackPageView",fn="config",ah="trackPreviousPageVisit",Ni="sendPageViewInternal",Xf="refUri",Ls="startTime",_a="properties",On="duration",ch="sendPageViewPerformanceInternal",Kp="populatePageViewPerformanceEvent",Ca="href",Pv="sendExceptionInternal",na="error",Jf="lineNumber",Gf="columnNumber",Qf="CreateAutoException",jc="addTelemetryInitializer",UI="overridePageViewDuration",Zf="autoExceptionInstrumented",Cb="autoTrackPageVisitTime",wb="isBrowserLinkTrackingEnabled",sc="length",Sb="enableAutoRouteTracking",kb="enableUnhandledPromiseRejectionTracking",uh="autoUnhandledPromiseInstrumented",lh="getEntriesByType",Ib="isPerformanceTimingSupported",Tb="getPerformanceTiming",fl="navigationStart",fh="shouldCollectDuration",Eb="isPerformanceTimingDataReady",wa="responseStart",NI="requestStart",lu="loadEventEnd",dh="responseEnd",fu="connectEnd",$I=(function(){function t(e,n,r,i){He(t,this,function(o){var s=null,a=[],c=!1,u=!1,l;r&&(l=r.logger);function f(h){r&&r.flush(h,function(){})}function m(){s||(s=vn((function(){s=null;var h=a.slice(0),g=!1;a=[],ee(h,function(p){p()?g=!0:a.push(p)}),a[sc]>0&&m(),g&&f(!0)}),100))}function d(h){a.push(h),m()}o[uu]=function(h,g){var p=h.name;if(B(p)||typeof p!="string"){var v=It();p=h.name=v&&v.title||""}var _=h.uri;if(B(_)||typeof _!="string"){var P=Hn();_=h.uri=P&&P[Ca]||""}if(r&&r[fn]&&(_=h.uri=gr(h.uri,r[fn])),!u){var x=Pr(),R=x&&x[lh]&&x[lh]("navigation");if(R&&R[0]&&!Ze(x.timeOrigin)){var H=R[0].loadEventStart;h[Ls]=new Date(x.timeOrigin+H)}else{var A=(g||h[_a]||{})[On]||0;h[Ls]=new Date(new Date().getTime()-A)}u=!0}if(!i[Ib]()){e[Ni](h,g),f(!0),Qm()||G(l,2,25,"trackPageView: navigation timing API used for calculation of page duration is not supported in this browser. This page view will be collected without duration and timing info.");return}var k=!1,O,j=i[Tb]()[fl];j>0&&(O=Ht(j,+new Date),i[fh](O)||(O=void 0));var K;!B(g)&&!B(g[On])&&(K=g[On]),(n||!isNaN(K))&&(isNaN(K)&&(g||(g={}),g[On]=O),e[Ni](h,g),f(!0),k=!0);var re=6e4;g||(g={}),d(function(){var se=!1;try{if(i[Eb]()){se=!0;var b={name:p,uri:_};i[Kp](b),!b.isValid&&!k?(g[On]=O,e[Ni](h,g)):(k||(g[On]=b.durationMs,e[Ni](h,g)),c||(e[ch](b,g),c=!0))}else j>0&&Ht(j,+new Date)>re&&(se=!0,k||(g[On]=re,e[Ni](h,g)))}catch(E){G(l,1,38,"trackPageView failed on page load calculation: "+Ne(E),{exception:te(E)})}return se})},o.teardown=function(h,g){if(s){s.cancel(),s=null;var p=a.slice(0);a=[],ee(p,function(v){v()})}}})}return t.__ieDyn=1,t})(),LI=36e5,Dv=["googlebot","adsbot-google","apis-google","mediapartners-google"];function xb(){var t=Pr();return t&&!!t.timing}function jI(){var t=Pr();return t&&t.getEntriesByType&&t.getEntriesByType("navigation")[sc]>0}function OI(){var t=Pr(),e=t?t.timing:0;return e&&e.domainLookupStart>0&&e[fl]>0&&e[wa]>0&&e[NI]>0&&e[lu]>0&&e[dh]>0&&e[fu]>0&&e.domLoading>0}function Rv(){return xb()?Pr().timing:null}function FI(){return jI()?Pr()[lh]("navigation")[0]:null}function WI(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=nr()||{},r=n.userAgent,i=!1;if(r)for(var o=0;o<Dv[sc];o++)i=i||st(r.toLowerCase(),Dv[o])!==-1;if(i)return!1;for(var o=0;o<t[sc];o++)if(t[o]<0||t[o]>=LI)return!1;return!0}var VI=(function(){function t(e){var n=wo(e);He(t,this,function(r){r[Kp]=function(i){i.isValid=!1;var o=FI(),s=Rv(),a=0,c=0,u=0,l=0,f=0;(o||s)&&(o?(a=o[On],c=o[Ls]===0?o[fu]:Ht(o[Ls],o[fu]),u=Ht(o.requestStart,o[wa]),l=Ht(o[wa],o[dh]),f=Ht(o.responseEnd,o[lu])):(a=Ht(s[fl],s[lu]),c=Ht(s[fl],s[fu]),u=Ht(s.requestStart,s[wa]),l=Ht(s[wa],s[dh]),f=Ht(s.responseEnd,s[lu])),a===0?G(n,2,10,"error calculating page view performance.",{total:a,network:c,request:u,response:l,dom:f}):r[fh](a,c,u,l,f)?a<an(c)+an(u)+an(l)+an(f)?G(n,2,8,"client performance math error.",{total:a,network:c,request:u,response:l,dom:f}):(i.durationMs=a,i.perfTotal=i[On]=Qr(a),i.networkConnect=Qr(c),i.sentRequest=Qr(u),i.receivedResponse=Qr(l),i.domProcessing=Qr(f),i.isValid=!0):G(n,2,45,"Invalid page load duration value. Browser perf data won't be sent.",{total:a,network:c,request:u,response:l,dom:f}))},r[Tb]=Rv,r[Ib]=xb,r[Eb]=OI,r[fh]=WI})}return t.__ieDyn=1,t})(),HI=(function(){function t(e,n){var r="prevPageVisitData";He(t,this,function(i){i[ah]=function(a,c){try{var u=o(a,c);u&&n(u.pageName,u.pageUrl,u.pageVisitTime)}catch(l){ro(e,"Auto track page visit time failed, metric will not be collected: "+te(l))}};function o(a,c){var u=null;try{if(u=s(),ic()){nh(e,r)!=null&&Yt("Cannot call startPageVisit consecutively without first calling stopPageVisit");var l=An().stringify(new qI(a,c));ub(e,r,l)}}catch(f){ro(e,"Call to restart failed: "+te(f)),u=null}return u}function s(){var a=null;try{if(ic()){var c=Rn(),u=nh(e,r);u&&vc()&&(a=An().parse(u),a.pageVisitTime=c-a.pageVisitStartTime,lb(e,r))}}catch(l){ro(e,"Stop page visit timer failed: "+te(l)),a=null}return a}Re(i,"_logger",{g:function(){return e}}),Re(i,"pageVisitTimeTrackingHandler",{g:function(){return n}})})}return t.__ieDyn=1,t})(),qI=(function(){function t(e,n){this.pageVisitStartTime=Rn(),this.pageName=e,this.pageUrl=n}return t})(),Av=(function(){function t(e,n){var r=this,i={};r.start=function(o){typeof i[o]<"u"&&G(e,2,62,"start was called more than once for this event without calling stop.",{name:o,key:o},!0),i[o]=+new Date},r.stop=function(o,s,a,c){var u=i[o];if(isNaN(u))G(e,2,63,"stop was called without a corresponding start.",{name:o,key:o},!0);else{var l=+new Date,f=Ht(u,l);r.action(o,s,f,a,c)}delete i[o],i[o]=void 0}}return t})(),Mt,BI="event";function ra(t,e){t&&t.dispatchEvent&&e&&t.dispatchEvent(e)}function KI(t){if(t&&t.reason){var e=t.reason;return!de(e)&&pe(e[ll])?e[ll]():te(e)}return t||""}var Mv=6e4,XI=Fs((Mt={sessionRenewalMs:Og(zv,1800*1e3),sessionExpirationMs:Og(zv,1440*60*1e3),disableExceptionTracking:ft()},Mt[Cb]=ft(),Mt[UI]=ft(),Mt[kb]=ft(),Mt[uh]=!1,Mt.samplingPercentage=Qu(JI,100),Mt[sh]=ft(),Mt[wb]=ft(),Mt[Sb]=ft(),Mt.namePrefix=$S(),Mt.enableDebug=ft(),Mt.disableFlushOnBeforeUnload=ft(),Mt.disableFlushOnUnload=ft(!1,"disableFlushOnBeforeUnload"),Mt.expCfg=kn({inclScripts:!1,expLog:void 0,maxLogs:50}),Mt));function zv(t,e){return t=t||e,t<Mv&&(t=Mv),+t}function JI(t){return!isNaN(t)&&t>0&&t<=100}function GI(t){Ze(t[sh])||(t[sh]?eI():tI())}var QI=(function(t){rr(e,t);function e(){var n=t.call(this)||this;n.identifier=Bp,n.priority=180,n.autoRoutePVDelay=500;var r,i,o,s,a,c,u,l,f,m,d,h,g,p,v,_,P,x,R,H,A;return He(e,n,function(k,O){var j=O[Lo];V(),k.getCookieMgr=function(){return Ul(k[ze])},k.processTelemetry=function(C,y){k.processNext(C,y)},k.trackEvent=function(C,y){try{var U=Vr(C,vr[jr],vr[wi],k[Gt](),y);k[ze][Si](U)}catch(J){oe(2,39,"trackTrace failed, trace will not be collected: "+Ne(J),{exception:te(J)})}},k.startTrackEvent=function(C){try{r.start(C)}catch(y){oe(1,29,"startTrackEvent failed, event will not be collected: "+Ne(y),{exception:te(y)})}},k.stopTrackEvent=function(C,y,U){try{r.stop(C,void 0,y,U)}catch(J){oe(1,30,"stopTrackEvent failed, event will not be collected: "+Ne(J),{exception:te(J)})}},k.trackTrace=function(C,y){try{var U=Vr(C,Ts[jr],Ts[wi],k[Gt](),y);k[ze][Si](U)}catch(J){oe(2,39,"trackTrace failed, trace will not be collected: "+Ne(J),{exception:te(J)})}},k.trackMetric=function(C,y){try{var U=Vr(C,oo[jr],oo[wi],k[Gt](),y);k[ze][Si](U)}catch(J){oe(1,36,"trackMetric failed, metric will not be collected: "+Ne(J),{exception:te(J)})}},k[uu]=function(C,y){try{var U=C||{};k[ze]&&k[ze][fn]&&(U.uri=gr(U.uri,k[ze][fn])),o[uu](U,jt(jt(jt({},U.properties),U.measurements),y)),_&&a[ah](U.name,U.uri)}catch(J){oe(1,37,"trackPageView failed, page view will not be collected: "+Ne(J),{exception:te(J)})}},k[Ni]=function(C,y,U){var J=It();if(J&&(C[Xf]=C[Xf]===void 0?J.referrer:C[Xf]),k[ze]&&k[ze][fn]&&(C.refUri=gr(C.refUri,k[ze][fn])),B(C[Ls])){var Y=(y||C[_a]||{})[On]||0;C[Ls]=new Date(new Date().getTime()-Y)}var _e=Vr(C,ui[jr],ui[wi],k[Gt](),y,U);k[ze][Si](_e),K()},k[ch]=function(C,y,U){var J=Vr(C,Es[jr],Es[wi],k[Gt](),y,U);k[ze][Si](J)},k.trackPageViewPerformance=function(C,y){var U=C||{};try{s[Kp](U),k[ch](U,y)}catch(J){oe(1,37,"trackPageViewPerformance failed, page view will not be collected: "+Ne(J),{exception:te(J)})}},k.startTrackPage=function(C){try{if(typeof C!="string"){var y=It();C=y&&y.title||""}i.start(C)}catch(U){oe(1,31,"startTrackPage failed, page view may not be collected: "+Ne(U),{exception:te(U)})}},k.stopTrackPage=function(C,y,U,J){try{if(typeof C!="string"){var Y=It();C=Y&&Y.title||""}if(typeof y!="string"){var _e=Hn();y=_e&&_e[Ca]||""}k[ze]&&k[ze][fn]&&(y=gr(y,k[ze][fn])),i.stop(C,y,U,J),_&&a[ah](C,y)}catch(Ie){oe(1,32,"stopTrackPage failed, page view will not be collected: "+Ne(Ie),{exception:te(Ie)})}},k[Pv]=function(C,y,U){var J=C&&(C.exception||C[na])||fp(C)&&C||{name:C&&typeof C,message:C||Yn};C=C||{};var Y=new qt(k[Gt](),J,C[_a]||y,C.measurements,C.severityLevel,C.id).toInterface(),_e=It();if(_e&&P!=null&&P.inclScripts){var Ie=ok(_e);Y[_a].exceptionScripts=JSON.stringify(Ie)}if(P!=null&&P.expLog){var Te=P.expLog();Te&&Te.logs&&Ce(Te.logs)&&(Y[_a].exceptionLog=Te.logs.slice(0,P.maxLogs).join(`
|
|
12
|
+
`))}var Ue=Vr(Y,qt[jr],qt[wi],k[Gt](),y,U);k[ze][Si](Ue)},k.trackException=function(C,y){C&&!C.exception&&C[na]&&(C.exception=C[na]);try{k[Pv](C,y)}catch(U){oe(1,35,"trackException failed, exception will not be collected: "+Ne(U),{exception:te(U)})}},k._onerror=function(C){var y=C&&C[na],U=C&&C.evt;try{if(!U){var J=cn();J&&(U=J[BI])}var Y=C&&C.url||(It()||{}).URL,_e=C.errorSrc||"window.onerror@"+Y+":"+(C[Jf]||0)+":"+(C[Gf]||0),Ie={errorSrc:_e,url:Y,lineNumber:C[Jf]||0,columnNumber:C[Gf]||0,message:C.message};RI(C.message,C.url,C.lineNumber,C.columnNumber,C[na])?E(qt[Qf]("Script error: The browser's same-origin policy prevents us from getting the details of this exception. Consider using the 'crossorigin' attribute.",Y,C[Jf]||0,C[Gf]||0,y,U,null,_e),Ie):(C.errorSrc||(C.errorSrc=_e),k.trackException({exception:C,severityLevel:3},Ie))}catch(Ue){var Te=y?y.name+", "+y.message:"null";oe(1,11,"_onError threw exception while logging error, error will not be collected: "+Ne(Ue),{exception:te(Ue),errorString:Te})}},k[jc]=function(C){if(k[ze])return k[ze][jc](C);c||(c=[]),c.push(C)},k.initialize=function(C,y,U,J){if(!k.isInitialized()){B(y)&&Yt("Error initializing"),O.initialize(C,y,U,J);try{H=gi(mn(k.identifier),y.evtNamespace&&y.evtNamespace()),c&&(ee(c,function(Y){y[jc](Y)}),c=null),re(C),s=new VI(k[ze]),o=new $I(k,v.overridePageViewDuration,k[ze],s),a=new HI(k[Gt](),function(Y,_e,Ie){return se(Y,_e,Ie)}),r=new Av(k[Gt](),"trackEvent"),r.action=function(Y,_e,Ie,Te,Ue){Te||(Te={}),Ue||(Ue={}),Te.duration=Ie[ll](),k.trackEvent({name:Y,properties:Te,measurements:Ue})},i=new Av(k[Gt](),"trackPageView"),i.action=function(Y,_e,Ie,Te,Ue){B(Te)&&(Te={}),Te.duration=Ie[ll]();var Et={name:Y,uri:_e,properties:Te,measurements:Ue};k[Ni](Et,Te)},Dl()&&(q(),M())}catch(Y){throw k.setInitialized(!1),Y}}},k._doTeardown=function(C,y){o&&o.teardown(C,y),ws(window,null,null,H),V()},k._getDbgPlgTargets=function(){return[A,h]};function K(){if(k[ze]){var C=k[ze].getPlugin("AjaxDependencyPlugin");C&&C.plugin&&C.plugin.resetAjaxAttempts&&C.plugin.resetAjaxAttempts()}}function re(C){var y=k.identifier,U=k[ze];k[Lo](at(C,function(){var J=Mn(null,C,U);v=J.getExtCfg(y,XI),h=h||C[Zf]||v[Zf],P=v.expCfg,_=v[Cb],C.storagePrefix&&qp(C.storagePrefix),GI(v),u=v[wb],b()}))}function se(C,y,U){var J={PageName:C,PageUrl:y};k.trackMetric({name:"PageVisitTime",average:U,max:U,min:U,sampleCount:1},J)}function b(){if(!l&&u){var C=["/browserLinkSignalR/","/__browserLink/"],y=function(U){if(u&&U.baseType===so[jr]){var J=U.baseData;if(J){for(var Y=0;Y<C[sc];Y++)if(J.target&&st(J.target,C[Y])>=0)return!1}}return!0};k[Lo](k[jc](y)),l=!0}}function E(C,y){var U=Vr(C,qt[jr],qt[wi],k[Gt](),y);k[ze][Si](U)}function q(){var C=cn(),y=Hn();k[Lo](at(v,function(){d=v.disableExceptionTracking,!d&&!h&&!v[Zf]&&(j(Nc(C,"onerror",{ns:H,rsp:function(U,J,Y,_e,Ie,Te){!d&&U.rslt!==!0&&k._onerror(qt[Qf](J,Y,_e,Ie,Te,U.evt))}},!1)),A++,h=!0)})),me(C,y)}function M(){var C=cn(),y=Hn();k[Lo](at(v,function(){if(f=v[Sb]===!0,C&&f&&!m&&HC()){var U=Gm();pe(U.pushState)&&pe(U.replaceState)&&typeof Event!==ip&&ce(C,U,y)}}))}function D(){var C=null;if(k[ze]&&k[ze].getTraceCtx&&(C=k[ze].getTraceCtx(!1)),!C){var y=k[ze].getPlugin(Fl);if(y){var U=y.plugin.context;U&&(C=Wp(U.telemetryTrace))}}return C}function ce(C,y,U){if(m)return;var J=v.namePrefix||"";function Y(){f&&ra(C,ta(J+"locationchange"))}function _e(){if(R&&(x=R),R=U&&U[Ca]||"",k[ze]&&k[ze][fn]&&(R=gr(R,k[ze][fn])),f){var Ie=D();if(Ie){Ie.setTraceId(ti());var Te="_unknown_";U&&U.pathname&&(Te=U.pathname+(U.hash||"")),Ie.setName(pt(k[Gt](),Te))}vn((function(Ue){k[uu]({refUri:Ue,properties:{duration:0}})}).bind(k,x),k.autoRoutePVDelay)}}j(Nc(y,"pushState",{ns:H,rsp:function(){f&&(ra(C,ta(J+"pushState")),ra(C,ta(J+"locationchange")))}},!0)),j(Nc(y,"replaceState",{ns:H,rsp:function(){f&&(ra(C,ta(J+"replaceState")),ra(C,ta(J+"locationchange")))}},!0)),Sr(C,J+"popstate",Y,H),Sr(C,J+"locationchange",_e,H),m=!0}function me(C,y){k[Lo](at(v,function(){g=v[kb]===!0,h=h||v[uh],g&&!p&&(j(Nc(C,"onunhandledrejection",{ns:H,rsp:function(U,J){g&&U.rslt!==!0&&k._onerror(qt[Qf](KI(J),y?y[Ca]:"",0,0,J,U.evt))}},!1)),A++,v[uh]=p=!0)}))}function oe(C,y,U,J,Y){k[Gt]().throwInternal(C,y,U,J,Y)}function V(){r=null,i=null,o=null,s=null,a=null,c=null,u=!1,l=!1,f=!1,m=!1,d=!1,h=!1,g=!1,p=!1,_=!1,K();var C=Hn();x=C&&C[Ca]||"",k[ze]&&k[ze][fn]&&(x=gr(x,k[ze][fn])),R=null,H=null,v=null,A=0,Re(k,"config",{g:function(){return v}})}Re(k,"_pageViewManager",{g:function(){return o}}),Re(k,"_pageViewPerformanceManager",{g:function(){return s}}),Re(k,"_pageVisitTimeManager",{g:function(){return a}}),Re(k,"_evtNamespace",{g:function(){return"."+H}})}),n}return e.Version="3.3.11",e})(So),du="featureOptIn",Pb="scheduleFetchTimeout";function Db(t,e,n,r){try{var i=n>r;i&&(t=null);var o=n==0?cw({},t):t;return o&&e&&!i&&Pe(o,function(s){var a=e[s];a&&(Xt(o[s])&&Xt(a)?o[s]=Db(o[s],a,++n,r):delete o[s])}),o}catch{}return t}var xs="featureOptIn.",Rb=".mode",Ab=".onCfg",Mb=".offCfg";function ZI(t,e,n){var r;if(!e||!e.enabled)return null;var i=(e[du]||{})[t]||{mode:1},o=i.mode,s=i.onCfg,a=i.offCfg,c=(n||{})[t]||{mode:2},u=c.mode,l=c.onCfg,f=c.offCfg,m=!!c.blockCdnCfg,d=xs+t+Rb,h=xs+t+Ab,g=xs+t+Mb,p=u,v=l,_=f;return m||(o===4||o===5?(p=o==4?3:2,v=s||l,_=a||f):o===2||u===2?(p=2,v=l||s,_=f||a):o===3?(p=3,v=l||s,_=f||a):o===1&&u===1&&(p=1)),r={},r[d]=p,r[h]=v,r[g]=_,r}function YI(t,e){try{if(!t||!t.enabled)return null;if(!t[du])return t.config;var n=t[du],r=t.config||{};return Pe(n,function(i){var o=ZI(i,t,e.config[du]);B(o)||(Pe(o,function(s,a){oy(r,s,a)}),eT(i,o,r))}),r}catch{}return null}function eT(t,e,n){var r=e[xs+t+Rb],i=e[xs+t+Ab],o=e[xs+t+Mb],s=null;r===3&&(s=i),r===2&&(s=o),s&&Pe(s,function(a,c){oy(n,a,c)})}var ia,tT="ai_cfgsync",Uv="GET",nT=18e5,jo=void 0,rT={instrumentationKey:!0,connectionString:!0,endpointUrl:!0},iT=Fs((ia={syncMode:1,blkCdnCfg:jo,customEvtName:jo,cfgUrl:jo,overrideSyncFn:jo,overrideFetchFn:jo,onCfgChangeReceive:jo},ia[Pb]=nT,ia.nonOverrideConfigs=rT,ia.enableAjax=!1,ia)),oT=(function(t){rr(e,t);function e(){var n=t.call(this)||this;n.priority=198,n.identifier="AppInsightsCfgSyncPlugin";var r,i,o,s,a,c,u,l,f,m,d,h,g,p,v,_,P=!1,x;return He(e,n,function(R,H){A(),R.initialize=function(V,C,y,U){H.initialize(V,C,y,U),s=gi(mn(R.identifier),C.evtNamespace&&C.evtNamespace()),k(V)},R.getCfg=function(){return i},R.pause=function(){P=!0,oe()},R.resume=function(){P=!1,me()},R.setCfg=function(V){return O(V)},R.sync=function(V){return K(V)},R.updateEventListenerName=function(V){return re(V)},R._doTeardown=function(V,C){j(),oe(),A()},R._getDbgPlgTargets=function(){return[l,u,o,f,g]};function A(){i=null,o=null,s=null,a=null,u=null,l=null,g=null,c=null,m=null,d=null,f=null,x=!1,v=null,_=null,h=null}function k(V){var C=R.identifier,y=R.core;R._addHook(at(V,function(){var U=Mn(null,V,y);r=U.getExtCfg(C,iT);var J=f;f=!!r.blkCdnCfg,x=!!r.enableAjax,!B(J)&&J!==f&&(!f&&a?p&&p(a,q,l):oe()),B(u)&&(u=r.syncMode===2),B(l)&&(l=r.syncMode===1);var Y=r.customEvtName||tT;o!==Y&&(u?re(Y):(j(),o=Y)),B(a)&&(a=r.cfgUrl),a||(i=V,l&&K())})),_=r.overrideSyncFn,v=r.overrideFetchFn,h=r.onCfgChangeReceive,g=r.nonOverrideConfigs,m=r[Pb],p=se(),d=0,a&&!f&&p&&p(a,q,l)}function O(V,C){if(V){if(i=V,C&&!P)return K();if(u&&!P)return R.core.updateCfg(V),!0}return!1}function j(){try{var V=pn();V&&ws(V,null,null,s)}catch{}}function K(V){try{return _&&pe(_)?_(i,V):gS(o,i,V)}catch{}return!1}function re(V){try{return j(),V&&(o=V,D()),!0}catch{}return!1}function se(){var V=v;return B(V)&&(Tp()?V=b:Ml()&&(V=E)),V}function b(V,C,y){var U=pn(),J=U&&U.fetch||null;if(V&&J&&pe(J))try{var Y={method:Uv};x||(Y[Vi]=!0);var _e=new Request(V,Y);if(!x)try{_e[Vi]=!0}catch{}Kt(fetch(_e),function(Ie){var Te=Ie.value;Ie.rejected?M(C,400):Te.ok?Kt(Te.text(),function(Ue){M(C,Te.status,Ue.value,y)}):M(C,Te.status,null,y)})}catch{}}function E(V,C,y){try{var U=new XMLHttpRequest;x||(U[Vi]=!0),U.open(Uv,V),U.onreadystatechange=function(){U.readyState===XMLHttpRequest.DONE&&M(C,U.status,U.responseText,y)},U.onerror=function(){M(C,400)},U.ontimeout=function(){M(C,400)},U.send()}catch{}}function q(V,C,y){try{if(V>=200&&V<400&&C){d=0;var U=An();if(U){var J=U.parse(C),Y=YI(J,R.core),_e=Y&&Lt(Y)&&ce(Y);_e&&O(_e,y)}}else d++;d<3&&me()}catch{}}function M(V,C,y,U){try{V(C,y,U)}catch{}}function D(){if(u){var V=pn();if(V)try{Sr(V,o,function(C){var y=C&&C.detail;if(h&&y)h(y);else{var U=y&&y.cfg,J=U&&Lt(U)&&ce(U);J&&O(J)}},s,!0)}catch{}}}function ce(V,C){var y=null;try{V&&(y=Db(V,g,0,5))}catch{}return y}function me(){!c&&m&&(c=vn(function(){c=null,p(a,q,l)},m),c.unref())}function oe(){c&&c.cancel(),c=null,d=0}R.processTelemetry=function(V,C){R.processNext(V,C)}}),n}return e.__ieDyn=1,e})(So),xi="duration",St="tags",Yf="deviceType",nn="data",Rr="name",ac="traceID",xe="length",cc="stringify",Eo="measurements",Jn="dataType",xo="envelopeType",Pi="toString",ao="enqueue",co="count",Tr="push",hh="emitLineDelimitedJson",Ps="clear",dl="markAsSent",$a="clearSent",Xp="bufferOverride",oa="BUFFER_KEY",Or="SENT_BUFFER_KEY",Qo="concat",sa="MAX_BUFFER_SIZE",aa="triggerSend",Pt="diagLog",ed="initialize",ca="_sender",ua="endpointUrl",Sa="instrumentationKey",ph="customHeaders",zb="maxBatchSizeInBytes",gh="onunloadDisableBeacon",vh="isBeaconApiDisabled",Ub="alwaysUseXhrOverride",Nb="enableSessionStorageBuffer",Nn="_buffer",$b="onunloadDisableFetch",Lb="disableSendBeaconSplit",Oc="getSenderInst",ki="_onError",td="_onPartialSuccess",Fc="_onSuccess",nd="itemsReceived",rd="itemsAccepted",id="baseType",hl="sampleRate",sT="getHashCodeScore",od="baseType",et="baseData",bt="properties",Nv="true";function ct(t,e,n){return We(t,e,n,Pu)}function aT(t,e,n){var r=n[St]=n[St]||{},i=e.ext=e.ext||{},o=e[St]=e[St]||[],s=i.user;s&&(ct(r,Ke.userAuthUserId,s.authId),ct(r,Ke.userId,s.id||s.localId));var a=i.app;a&&ct(r,Ke.sessionId,a.sesId);var c=i.device;c&&(ct(r,Ke.deviceId,c.id||c.localId),ct(r,Ke[Yf],c.deviceClass),ct(r,Ke.deviceIp,c.ip),ct(r,Ke.deviceModel,c.model),ct(r,Ke[Yf],c[Yf]));var u=e.ext.web;if(u){ct(r,Ke.deviceLanguage,u.browserLang),ct(r,Ke.deviceBrowserVersion,u.browserVer),ct(r,Ke.deviceBrowser,u.browser);var l=n[nn]=n[nn]||{},f=l[et]=l[et]||{},m=f[bt]=f[bt]||{};ct(m,"domain",u.domain),ct(m,"isManual",u.isManual?Nv:null),ct(m,"screenRes",u.screenRes),ct(m,"userConsent",u.userConsent?Nv:null)}var d=i.os;d&&(ct(r,Ke.deviceOS,d[Rr]),ct(r,Ke.deviceOSVersion,d.osVer));var h=i.trace;h&&(ct(r,Ke.operationParentId,h.parentID),ct(r,Ke.operationName,pt(t,h[Rr])),ct(r,Ke.operationId,h[ac]));for(var g={},p=o[xe]-1;p>=0;p--){var v=o[p];Pe(v,function(P,x){g[P]=x}),o.splice(p,1)}Pe(o,function(P,x){g[P]=x});var _=jt(jt({},r),g);_[Ke.internalSdkVersion]||(_[Ke.internalSdkVersion]=pt(t,"javascript:".concat(cT.Version),64)),n[St]=_y(_)}function hi(t,e,n){B(t)||Pe(t,function(r,i){hc(i)?n[r]=i:de(i)?e[r]=i:vc()&&(e[r]=An()[cc](i))})}function Po(t,e){B(t)||Pe(t,function(n,r){t[n]=r||e})}function Do(t,e,n,r){var i=new aI(t,r,e);ct(i,"sampleRate",n[tb]),(n[et]||{}).startTime&&(i.time=Us(n[et].startTime)),i.iKey=n.iKey;var o=n.iKey.replace(/-/g,"");return i[Rr]=i[Rr].replace("{0}",o),aT(t,n,i),n[St]=n[St]||[],_y(i)}function Ro(t,e){B(e[et])&&G(t,1,46,"telemetryItem.baseData cannot be null.")}var cT={Version:"3.3.11"};function uT(t,e,n){Ro(t,e);var r=e[et][Eo]||{},i=e[et][bt]||{};hi(e[nn],i,r),B(n)||Po(i,n);var o=e[et];if(B(o))return ro(t,"Invalid input for dependency data"),null;var s=o[bt]&&o[bt][mv]?o[bt][mv]:"GET",a=new so(t,o.id,o.target,o[Rr],o[xi],o.success,o.responseCode,s,o.type,o.correlationContext,i,r),c=new To(so[Jn],a);return Do(t,so[xo],e,c)}function jb(t,e,n){Ro(t,e);var r={},i={};e[od]!==vr[Jn]&&(r.baseTypeSource=e[od]),e[od]===vr[Jn]?(r=e[et][bt]||{},i=e[et][Eo]||{}):e[et]&&hi(e[et],r,i),hi(e[nn],r,i),B(n)||Po(r,n);var o=e[et][Rr],s=new vr(t,o,r,i),a=new To(vr[Jn],s);return Do(t,vr[xo],e,a)}function lT(t,e,n){Ro(t,e);var r=e[et][Eo]||{},i=e[et][bt]||{};hi(e[nn],i,r),B(n)||Po(i,n);var o=e[et],s=qt.CreateFromInterface(t,o,i,r),a=new To(qt[Jn],s);return Do(t,qt[xo],e,a)}function fT(t,e,n){Ro(t,e);var r=e[et],i=r[bt]||{},o=r[Eo]||{};hi(e[nn],i,o),B(n)||Po(i,n);var s=new oo(t,r[Rr],r.average,r.sampleCount,r.min,r.max,r.stdDev,i,o),a=new To(oo[Jn],s);return Do(t,oo[xo],e,a)}function dT(t,e,n){Ro(t,e);var r,i=e[et];!B(i)&&!B(i[bt])&&!B(i[bt][xi])?(r=i[bt][xi],delete i[bt][xi]):!B(e[nn])&&!B(e[nn][xi])&&(r=e[nn][xi],delete e[nn][xi]);var o=e[et],s;((e.ext||{}).trace||{})[ac]&&(s=e.ext.trace[ac]);var a=o.id||s,c=o[Rr],u=o.uri,l=o[bt]||{},f=o[Eo]||{};if(B(o.refUri)||(l.refUri=o.refUri),B(o.pageType)||(l.pageType=o.pageType),B(o.isLoggedIn)||(l.isLoggedIn=o.isLoggedIn[Pi]()),!B(o[bt])){var m=o[bt];Pe(m,function(g,p){l[g]=p})}hi(e[nn],l,f),B(n)||Po(l,n);var d=new ui(t,c,u,r,l,f,a),h=new To(ui[Jn],d);return Do(t,ui[xo],e,h)}function hT(t,e,n){Ro(t,e);var r=e[et],i=r[Rr],o=r.uri||r.url,s=r[bt]||{},a=r[Eo]||{};hi(e[nn],s,a),B(n)||Po(s,n);var c=new Es(t,i,o,void 0,s,a,r),u=new To(Es[Jn],c);return Do(t,Es[xo],e,u)}function pT(t,e,n){Ro(t,e);var r=e[et].message,i=e[et].severityLevel,o=e[et][bt]||{},s=e[et][Eo]||{};hi(e[nn],o,s),B(n)||Po(o,n);var a=new Ts(t,r,i,o,s),c=new To(Ts[Jn],a);return Do(t,Ts[xo],e,c)}var Ob=(function(){function t(e,n){var r=[],i=!1,o=n.maxRetryCnt;this._get=function(){return r},this._set=function(s){return r=s,r},He(t,this,function(s){s[ao]=function(a){if(s[co]()>=n.eventsLimitInMem){i||(G(e,2,105,"Maximum in-memory buffer size reached: "+s[co](),!0),i=!0);return}a.cnt=a.cnt||0,!(!B(o)&&a.cnt>o)&&r[Tr](a)},s[co]=function(){return r[xe]},s.size=function(){for(var a=r[xe],c=0;c<r[xe];c++)a+=r[c].item[xe];return n[hh]||(a+=2),a},s[Ps]=function(){r=[],i=!1},s.getItems=function(){return r.slice(0)},s.batchPayloads=function(a){if(a&&a[xe]>0){var c=[];ee(a,function(l){c[Tr](l.item)});var u=n[hh]?c.join(`
|
|
13
|
+
`):"["+c.join(",")+"]";return u}return null},s.createNew=function(a,c,u){var l=r.slice(0);a=a||e,c=c||{};var f=u?new Fb(a,c):new Jp(a,c);return ee(l,function(m){f[ao](m)}),f}})}return t.__ieDyn=1,t})(),Jp=(function(t){rr(e,t);function e(n,r){var i=t.call(this,n,r)||this;return He(e,i,function(o,s){o[dl]=function(a){s[Ps]()},o[$a]=function(a){}}),i}return e.__ieDyn=1,e})(Ob),gT=["AI_buffer","AI_sentBuffer"],Fb=(function(t){rr(e,t);function e(r,i){var o=t.call(this,r,i)||this,s=!1,a=i==null?void 0:i.namePrefix,c=i[Xp]||{getItem:nh,setItem:ub},u=c.getItem,l=c.setItem,f=i.maxRetryCnt;return He(e,o,function(m,d){var h=x(e[oa]),g=x(e[Or]),p=A(),v=g[Qo](p),_=m._set(h[Qo](v));_[xe]>e[sa]&&(_[xe]=e[sa]),H(e[Or],[]),H(e[oa],_),m[ao]=function(O){if(m[co]()>=e[sa]){s||(G(r,2,67,"Maximum buffer size reached: "+m[co](),!0),s=!0);return}O.cnt=O.cnt||0,!(!B(f)&&O.cnt>f)&&(d[ao](O),H(e[oa],m._get()))},m[Ps]=function(){d[Ps](),H(e[oa],m._get()),H(e[Or],[]),s=!1},m[dl]=function(O){H(e[oa],m._set(P(O,m._get())));var j=x(e[Or]);j instanceof Array&&O instanceof Array&&(j=j[Qo](O),j[xe]>e[sa]&&(G(r,1,67,"Sent buffer reached its maximum size: "+j[xe],!0),j[xe]=e[sa]),H(e[Or],j))},m[$a]=function(O){var j=x(e[Or]);j=P(O,j),H(e[Or],j)},m.createNew=function(O,j,K){K=!!K;var re=m._get().slice(0),se=x(e[Or]).slice(0);O=O||r,j=j||{},m[Ps]();var b=K?new e(O,j):new Jp(O,j);return ee(re,function(E){b[ao](E)}),K&&b[dl](se),b};function P(O,j){var K=[],re=[];return ee(O,function(se){re[Tr](se.item)}),ee(j,function(se){!pe(se)&&At(re,se.item)===-1&&K[Tr](se)}),K}function x(O){var j=O;return j=a?a+"_"+j:j,R(j)}function R(O){try{var j=u(r,O);if(j){var K=An().parse(j);if(de(K)&&(K=An().parse(K)),K&&Ce(K))return K}}catch(re){G(r,1,42," storage key: "+O+", "+Ne(re),{exception:te(re)})}return[]}function H(O,j){var K=O;try{K=a?a+"_"+K:K;var re=JSON[cc](j);l(r,K,re)}catch(se){l(r,K,JSON[cc]([])),G(r,2,41," storage key: "+K+", "+Ne(se)+". Buffer cleared",{exception:te(se)})}}function A(){var O=[];try{return ee(gT,function(j){var K=k(j);if(O=O[Qo](K),a){var re=a+"_"+j,se=k(re);O=O[Qo](se)}}),O}catch(j){G(r,2,41,"Transfer events from previous buffers: "+Ne(j)+". previous Buffer items can not be removed",{exception:te(j)})}return[]}function k(O){try{var j=R(O),K=[];return ee(j,function(re){var se={item:re,cnt:0};K[Tr](se)}),lb(r,O),K}catch{}return[]}}),o}var n;return n=e,e.VERSION="_1",e.BUFFER_KEY="AI_buffer"+n.VERSION,e.SENT_BUFFER_KEY="AI_sentBuffer"+n.VERSION,e.MAX_BUFFER_SIZE=2e3,e})(Ob),vT=(function(){function t(e){He(t,this,function(n){n.serialize=function(s){var a=r(s,"root");try{return An()[cc](a)}catch(c){G(e,1,48,c&&pe(c[Pi])?c[Pi]():"Error serializing object",null,!0)}};function r(s,a){var c="__aiCircularRefCheck",u={};if(!s)return G(e,1,48,"cannot serialize object because it is null or undefined",{name:a},!0),u;if(s[c])return G(e,2,50,"Circular reference detected while serializing object",{name:a},!0),u;if(!s.aiDataContract){if(a==="measurements")u=o(s,"number",a);else if(a==="properties")u=o(s,"string",a);else if(a==="tags")u=o(s,"string",a);else if(Ce(s))u=i(s,a);else{G(e,2,49,"Attempting to serialize an object which does not implement ISerializable",{name:a},!0);try{An()[cc](s),u=s}catch(l){G(e,1,48,l&&pe(l[Pi])?l[Pi]():"Error serializing object",null,!0)}}return u}return s[c]=!0,Pe(s.aiDataContract,function(l,f){var m=pe(f)?f()&1:f&1,d=pe(f)?f()&4:f&4,h=f&2,g=s[l]!==void 0,p=Xt(s[l])&&s[l]!==null;if(m&&!g&&!h)G(e,1,24,"Missing required field specification. The field is required but not present on source",{field:l,name:a});else if(!d){var v=void 0;p?h?v=i(s[l],l):v=r(s[l],l):v=s[l],v!==void 0&&(u[l]=v)}}),delete s[c],u}function i(s,a){var c;if(s)if(!Ce(s))G(e,1,54,`This field was specified as an array in the contract but the item is not an array.\r
|
|
14
|
+
`,{name:a},!0);else{c=[];for(var u=0;u<s[xe];u++){var l=s[u],f=r(l,a+"["+u+"]");c[Tr](f)}}return c}function o(s,a,c){var u;return s&&(u={},Pe(s,function(l,f){if(a==="string")f===void 0?u[l]="undefined":f===null?u[l]="null":f[Pi]?u[l]=f[Pi]():u[l]="invalid field: toString() is not defined.";else if(a==="number")if(f===void 0)u[l]="undefined";else if(f===null)u[l]="null";else{var m=parseFloat(f);u[l]=m}else u[l]="invalid field: "+c+" is of unknown type.",G(e,1,u[l],null,!0)})),u}})}return t.__ieDyn=1,t})(),mT=8,yT=(function(){function t(){}return t.prototype.getHashCodeScore=function(e){var n=this.getHashCode(e)/t.INT_MAX_VALUE;return n*100},t.prototype.getHashCode=function(e){if(e==="")return 0;for(;e[xe]<mT;)e=e[Qo](e);for(var n=5381,r=0;r<e[xe];++r)n=(n<<5)+n+e.charCodeAt(r),n=n&n;return Math.abs(n)},t.INT_MAX_VALUE=2147483647,t})(),bT=(function(){function t(){var e=this,n=new yT,r=new bb;e.getSamplingScore=function(i){var o=0;return i[St]&&i[St][r.userId]?o=n.getHashCodeScore(i[St][r.userId]):i.ext&&i.ext.user&&i.ext.user.id?o=n[sT](i.ext.user.id):i[St]&&i[St][r.operationId]?o=n.getHashCodeScore(i[St][r.operationId]):i.ext&&i.ext.telemetryTrace&&i.ext.telemetryTrace[ac]?o=n.getHashCodeScore(i.ext.telemetryTrace[ac]):o=Math.random()*100,o}}return t})(),_T=(function(){function t(e,n){this.INT_MAX_VALUE=2147483647;var r=n||wo(null);(e>100||e<0)&&(r.throwInternal(2,58,"Sampling rate is out of range (0..100). Sampling will be disabled, you may be sending too much data which may affect your AI service level.",{samplingRate:e},!0),e=100),this[hl]=e,this.samplingScoreGenerator=new bT}return t.prototype.isSampledIn=function(e){var n=this[hl],r=!1;return n==null||n>=100||e.baseType===oo[Jn]?!0:(r=this.samplingScoreGenerator.getSamplingScore(e)<n,r)},t})(),Be,ur,Sn=void 0,$v="",CT=65e3;function Lv(t){try{return t.responseText}catch{}return null}function wT(t){return t&&t.sendPOST}var jv=Fs((Be={endpointUrl:Qu(Pu,jp+Ss)},Be[hh]=ft(),Be.maxBatchInterval=15e3,Be[zb]=102400,Be.disableTelemetry=ft(),Be[Nb]=ft(!0),Be.isRetryDisabled=ft(),Be[vh]=ft(!0),Be[Lb]=ft(!0),Be.disableXhr=ft(),Be[$b]=ft(),Be[gh]=ft(),Be[Sa]=Sn,Be.namePrefix=Sn,Be.samplingPercentage=Qu(ST,100),Be[ph]=Sn,Be.convertUndefined=Sn,Be.eventsLimitInMem=1e4,Be[Xp]=!1,Be.httpXHROverride={isVal:wT,v:Sn},Be[Ub]=ft(),Be.transports=Sn,Be.retryCodes=Sn,Be.corsPolicy=Sn,Be.maxRetryCnt={isVal:hc,v:10},Be)),Ov="X-Set-Cross-Origin-Resource-Policy";function ST(t){return!isNaN(t)&&t>0&&t<=100}var kT=(ur={},ur[vr.dataType]=jb,ur[Ts.dataType]=pT,ur[ui.dataType]=dT,ur[Es.dataType]=hT,ur[qt.dataType]=lT,ur[oo.dataType]=fT,ur[so.dataType]=uT,ur),IT=(function(t){rr(e,t);function e(){var n=t.call(this)||this;n.priority=1001,n.identifier=_b;var r,i,o,s,a,c,u,l,f=0,m,d,h,g,p,v,_,P,x,R,H,A,k,O,j,K,re,se,b,E,q,M,D,ce,me,oe,V,C;return He(e,n,function(y,U){_c(),y.pause=function(){_t(),s=!0},y.resume=function(){s&&(s=!1,i=null,z(),qe())},y.flush=function(T,L,Q){if(T===void 0&&(T=!0),!s){_t();try{var ae=y[aa](T,null,Q||1);return Kt(ae,function(ge){return L?(L(!ge.rejected),!0):T?Qn(function(ve){ve(!ge.rejected)}):ae})}catch(ge){G(y[Pt](),1,22,"flush failed, telemetry will not be collected: "+Ne(ge),{exception:te(ge)})}}},y.onunloadFlush=function(){if(!s)if(_||E)try{return y[aa](!0,X,2)}catch(T){G(y[Pt](),1,20,"failed to flush with beacon sender on page unload, telemetry will not be collected: "+Ne(T),{exception:te(T)})}else y.flush(!1)},y.addHeader=function(T,L){l[T]=L},y[ed]=function(T,L,Q,ae){y.isInitialized()&&G(y[Pt](),1,28,"Sender is already initialized"),U[ed](T,L,Q,ae);var ge=y.identifier;c=new vT(L.logger),r=0,i=null,o=0,y[ca]=null,u=0;var ve=y[Pt]();h=gi(mn("Sender"),L.evtNamespace&&L.evtNamespace()),d=AI(h),y._addHook(at(T,function(Me){var Ge=Me.cfg;Ge.storagePrefix&&qp(Ge.storagePrefix);var Wt=Mn(null,Ge,L),we=Wt.getExtCfg(ge,jv),Hs=we[ua];if(g&&Hs===g){var or=Ge[ua];or&&or!==Hs&&(we[ua]=or)}var qs=tt("CompressionStream");C=ru("zipPayload",Ge,!1),pe(qs)||(C=!1);var mi=we.corsPolicy;mi?(mi==="same-origin"||mi==="same-site"||mi==="cross-origin")&&n.addHeader(Ov,mi):delete l[Ov],fi(we[Sa])&&(we[Sa]=Ge[Sa]),Re(y,"_senderConfig",{g:function(){return we}}),p!==we[ua]&&(g=p=we[ua]),L.activeStatus()===Br.PENDING?y.pause():L.activeStatus()===Br.ACTIVE&&y.resume(),R&&R!==we[ph]&&ee(R,function(Ct){delete l[Ct.header]}),v=we[zb],_=(we[gh]===!1||we[vh]===!1)&&va(),P=we[gh]===!1&&va(),x=we[vh]===!1&&va(),E=we[Ub],q=!!we.disableXhr,V=we.retryCodes;var Vl=we[Xp],Mo=!!we[Nb]&&(!!Vl||ic()),Gp=we.namePrefix,E_=Mo!==K||Mo&&se!==Gp||Mo&&re!==Vl;if(y[Nn]){if(E_)try{y[Nn]=y[Nn].createNew(ve,we,Mo)}catch(Ct){G(y[Pt](),1,12,"failed to transfer telemetry to different buffer storage, telemetry will be lost: "+Ne(Ct),{exception:te(Ct)})}z()}else y[Nn]=Mo?new Fb(ve,we):new Jp(ve,we);se=Gp,K=Mo,re=Vl,M=!we[$b]&&Tp(!0),me=!!we[Lb],y._sample=new _T(we.samplingPercentage,ve),A=we[Sa],!fi(A)&&!Ao(A,Ge)&&G(ve,1,100,"Invalid Instrumentation key "+A),R=we[ph],de(g)&&!th(g)&&R&&R[xe]>0?ee(R,function(Ct){n.addHeader(Ct.header,Ct.value)}):R=null,b=we.enableSendPromise;var Qp=Y();oe?oe.SetConfig(Qp):(oe=new Ek,oe[ed](Qp,ve));var Cc=we.httpXHROverride,wc=null,Bs=null,x_=$g([3,1,2],we.transports);wc=oe&&oe[Oc](x_,!1);var Hl=oe&&oe.getFallbackInst();D=function(Ct,yi){return ue(Hl,Ct,yi)},ce=function(Ct,yi){return ue(Hl,Ct,yi,!1)},wc=E?Cc:wc||Cc||Hl,y[ca]=function(Ct,yi){return ue(wc,Ct,yi)},M&&(m=ke);var ql=$g([3,1],we.unloadTransports);M||(ql=ql.filter(function(Ct){return Ct!==2})),Bs=oe&&oe[Oc](ql,!0),Bs=E?Cc:Bs||Cc,(E||we.unloadTransports||!m)&&Bs&&(m=function(Ct,yi){return ue(Bs,Ct,yi)}),m||(m=D),H=we.disableTelemetry,k=we.convertUndefined||Sn,O=we.isRetryDisabled,j=we.maxBatchInterval}))},y.processTelemetry=function(T,L){L=y._getTelCtx(L);var Q=L[Pt]();try{var ae=Oe(T,Q);if(!ae)return;var ge=Fe(T,Q);if(!ge)return;var ve=c.serialize(ge),Me=y[Nn];z(ve);var Ge={item:ve,cnt:0};Me[ao](Ge),qe()}catch(Wt){G(Q,2,12,"Failed adding telemetry to the sender's buffer, some telemetry will be lost: "+Ne(Wt),{exception:te(Wt)})}y.processNext(T,L)},y.isCompletelyIdle=function(){return!s&&f===0&&y._buffer[co]()===0},y.getOfflineListener=function(){return d},y._xhrReadyStateChange=function(T,L,Q){if(!le(L))return _e(T,L,Q)},y[aa]=function(T,L,Q){T===void 0&&(T=!0);var ae;if(!s)try{var ge=y[Nn];if(H)ge[Ps]();else{if(ge[co]()>0){var ve=ge.getItems();Ft(Q||0,T),L?ae=L.call(y,ve,T):ae=y[ca](ve,T)}o=+new Date}_t()}catch(Ge){var Me=Ty();(!Me||Me>9)&&G(y[Pt](),1,40,"Telemetry transmission failed, some telemetry will be lost: "+Ne(Ge),{exception:te(Ge)})}return ae},y.getOfflineSupport=function(){return{getUrl:function(){return g},createPayload:un,serialize:xt,batch:ir,shouldProcess:function(T){return!!Oe(T)}}},y._doTeardown=function(T,L){y.onunloadFlush(),ls(d,!1),_c()},y[ki]=function(T,L,Q){if(!le(T))return Ie(T,L)},y[td]=function(T,L){if(!le(T))return Te(T,L)},y[Fc]=function(T,L){if(!le(T))return Ue(T)},y._xdrOnLoad=function(T,L){if(!le(L))return J(T,L)};function J(T,L){var Q=Lv(T);if(T&&(Q+""=="200"||Q===""))r=0,y[Fc](L,0);else{var ae=$f(Q);ae&&ae[nd]&&ae[nd]>ae[rd]&&!O?y[td](L,ae):y[ki](L,wy(T))}}function Y(){try{var T={xdrOnComplete:function(Q,ae,ge){var ve=Et(ge);if(ve)return J(Q,ve)},fetchOnComplete:function(Q,ae,ge,ve){var Me=Et(ve);if(Me)return W(Q.status,Me,Q.url,Me[xe],Q.statusText,ge||"")},xhrOnComplete:function(Q,ae,ge){var ve=Et(ge);if(ve)return _e(Q,ve,ve[xe])},beaconOnRetry:function(Q,ae,ge){return ie(Q,ae,ge)}},L={enableSendPromise:b,isOneDs:!1,disableCredentials:!1,disableXhr:q,disableBeacon:!x,disableBeaconSync:!P,senderOnCompleteCallBack:T};return L}catch{}return null}function _e(T,L,Q){T.readyState===4&&W(T.status,L,T.responseURL,Q,Xu(T),Lv(T)||T.response)}function Ie(T,L,Q){G(y[Pt](),2,26,"Failed to send telemetry.",{message:L}),y._buffer&&y._buffer[$a](T)}function Te(T,L){for(var Q=[],ae=[],ge=L.errors.reverse(),ve=0,Me=ge;ve<Me.length;ve++){var Ge=Me[ve],Wt=T.splice(Ge.index,1)[0];zn(Ge.statusCode)?ae[Tr](Wt):Q[Tr](Wt)}T[xe]>0&&y[Fc](T,L[rd]),Q[xe]>0&&y[ki](Q,Xu(null,["partial success",L[rd],"of",L.itemsReceived].join(" "))),ae[xe]>0&&(ye(ae),G(y[Pt](),2,40,"Partial success. Delivered: "+T[xe]+", Failed: "+Q[xe]+". Will retry to send "+ae[xe]+" our of "+L[nd]+" items"))}function Ue(T,L){y._buffer&&y._buffer[$a](T)}function Et(T){try{if(T){var L=T,Q=L.oriPayload;return Q&&Q[xe]?Q:null}}catch{}return null}function Oe(T,L){if(H)return!1;if(!T)return L&&G(L,1,7,"Cannot send empty telemetry"),!1;if(T.baseData&&!T[id])return L&&G(L,1,70,"Cannot send telemetry without baseData and baseType"),!1;if(T[id]||(T[id]="EventData"),!y[ca])return L&&G(L,1,28,"Sender was not initialized"),!1;if($(T))T[tb]=y._sample[hl];else return L&&G(L,2,33,"Telemetry item was sampled out and not sent",{SampleRate:y._sample[hl]}),!1;return!0}function Fe(T,L){var Q=T.iKey||A,ae=e.constructEnvelope(T,Q,L,k);if(!ae){G(L,1,47,"Unable to create an AppInsights envelope");return}var ge=!1;if(T[St]&&T[St][Of]&&(ee(T[St][Of],function(ve){try{ve&&ve(ae)===!1&&(ge=!0,ro(L,"Telemetry processor check returns false"))}catch(Me){G(L,1,64,"One of telemetry initializers failed, telemetry item will not be sent: "+Ne(Me),{exception:te(Me)},!0)}}),delete T[St][Of]),!ge)return ae}function xt(T){var L=$v,Q=y[Pt]();try{var ae=Oe(T,Q),ge=null;ae&&(ge=Fe(T,Q)),ge&&(L=c.serialize(ge))}catch{}return L}function ir(T){var L=$v;return T&&T[xe]&&(L="["+T.join(",")+"]"),L}function un(T){var L=w();return{urlString:g,data:T,headers:L}}function $(T){return y._sample.isSampledIn(T)}function Z(T,L,Q,ae){L===200&&T?y._onSuccess(T,T[xe]):ae&&y[ki](T,ae)}function ue(T,L,Q,ae){ae===void 0&&(ae=!0);var ge=function(or,qs,mi){return Z(L,or,qs,mi)},ve=ne(L),Me=T&&T.sendPOST;if(Me&&ve){ae&&y._buffer[dl](L);var Ge,Wt=!1,we,Hs;return oe.preparePayload(function(or){Ge=Me(or,ge,!Q),Wt=!0,we&&Ip(Ge,we,Hs)},C,ve,!Q),Wt?Ge:Qn(function(or,qs){we=or,Hs=qs})}return null}function ne(T){if(Ce(T)&&T[xe]>0){var L=y[Nn].batchPayloads(T),Q=w(),ae={data:L,urlString:g,headers:Q,disableXhrSync:q,disableFetchKeepAlive:!M,oriPayload:T};return ae}return null}function w(){try{var T=l||{};return th(g)&&(T[je[6]]=je[7]),T}catch{}return null}function z(T){var L=T?T[xe]:0;return y[Nn].size()+L>v?((!d||d.isOnline())&&y[aa](!0,null,10),!0):!1}function W(T,L,Q,ae,ge,ve){var Me=null;if(y._appId||(Me=$f(ve),Me&&Me.appId&&(y._appId=Me.appId)),(T<200||T>=300)&&T!==0){if((T===301||T===307||T===308)&&!F(Q)){y[ki](L,ge);return}if(d&&!d.isOnline()){if(!O){var Ge=10;ye(L,Ge),G(y[Pt](),2,40,". Offline - Response Code: ".concat(T,". Offline status: ").concat(!d.isOnline(),". Will retry to send ").concat(L.length," items."))}return}!O&&zn(T)?(ye(L),G(y[Pt](),2,40,". Response code "+T+". Will retry to send "+L[xe]+" items.")):y[ki](L,ge)}else F(Q),T===206?(Me||(Me=$f(ve)),Me&&!O?y[td](L,Me):y[ki](L,ge)):(r=0,y[Fc](L,ae))}function F(T){return u>=10?!1:!B(T)&&T!==""&&T!==g?(g=T,++u,!0):!1}function X(T,L){if(m)m(T,!1);else{var Q=oe&&oe[Oc]([3],!0);return ue(Q,T,L)}}function ie(T,L,Q){var ae=T,ge=ae&&ae.oriPayload;if(me)ce&&ce(ge,!0),G(y[Pt](),2,40,". Failed to send telemetry with Beacon API, retried with normal sender.");else{for(var ve=[],Me=0;Me<ge[xe];Me++){var Ge=ge[Me],Wt=[Ge],we=ne(Wt);Q(we,L)?y._onSuccess(Wt,Wt[xe]):ve[Tr](Ge)}ve[xe]>0&&(ce&&ce(ve,!0),G(y[Pt](),2,40,". Failed to send telemetry with Beacon API, retried with normal sender."))}}function le(T){try{if(T&&T[xe])return de(T[0])}catch{}return null}function ke(T,L){var Q=null;if(Ce(T)){for(var ae=T[xe],ge=0;ge<T[xe];ge++)ae+=T[ge].item[xe];var ve=oe.getSyncFetchPayload();ve+ae<=CT?Q=2:va()?Q=3:(Q=1,G(y[Pt](),2,40,". Failed to send telemetry with Beacon API, retried with xhrSender."));var Me=oe&&oe[Oc]([Q],!0);return ue(Me,T,L)}return null}function ye(T,L){if(L===void 0&&(L=1),!(!T||T[xe]===0)){var Q=y[Nn];Q[$a](T),r++;for(var ae=0,ge=T;ae<ge.length;ae++){var ve=ge[ae];ve.cnt=ve.cnt||0,ve.cnt++,Q[ao](ve)}$e(L),qe()}}function $e(T){var L=10,Q;if(r<=1)Q=L;else{var ae=(Math.pow(2,r)-1)/2,ge=an(Math.random()*ae*L)+1;ge=T*ge,Q=Ma(Bm(ge,3600),L)}var ve=Rn()+Q*1e3;i=ve}function qe(){if(!a&&!s){var T=i?Ma(0,i-Rn()):0,L=Ma(j,T);a=vn(function(){a=null,y[aa](!0,null,1)},L)}}function _t(){a&&a.cancel(),a=null,i=null}function zn(T){return B(V)?T===401||T===408||T===429||T===500||T===502||T===503||T===504:V[xe]&&V.indexOf(T)>-1}function Un(){var T="getNotifyMgr",L,Q=y.core;return Q&&(Q[T]?L=Q[T]():L=Q._notificationManager),L}function Ft(T,L){var Q=Un();if(Q&&Q.eventsSendRequest)try{Q.eventsSendRequest(T,L)}catch(ae){G(y[Pt](),1,74,"send request notification failed: "+Ne(ae),{exception:te(ae)})}}function Ao(T,L){var Q=L.disableInstrumentationKeyValidation,ae=B(Q)?!1:Q;if(ae)return!0;var ge="^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$",ve=new RegExp(ge);return ve.test(T)}function _c(){y[ca]=null,y[Nn]=null,y._appId=null,y._sample=null,l={},d=null,r=0,i=null,o=null,s=!1,a=null,c=null,u=0,f=0,m=null,h=null,g=null,p=null,v=0,_=!1,R=null,H=!1,A=null,k=Sn,O=!1,K=null,se=Sn,q=!1,M=!1,me=!1,D=null,ce=null,oe=null,Re(y,"_senderConfig",{g:function(){return Cy({},jv)}})}}),n}return e.constructEnvelope=function(n,r,i,o){var s;r!==n.iKey&&!B(r)?s=jt(jt({},n),{iKey:r}):s=n;var a=kT[s.baseType]||jb;return a(i,s,o)},e})(So),Fv="duration",js="properties",En="requestUrl",Hi="length",ni="traceID",ri="spanID",Pn="traceFlags",La="context",Ds="aborted",Wc="_addHook",Qt="core",sd="includeCorrelationHeaders",mh="getAbsoluteUrl",Ii="headers",dn="requestHeaders",ad="setRequestHeader",Wv="trackDependencyDataInternal",ds="startTime",Oo="toLowerCase",yh="enableRequestHeaderTracking",Wb="enableAjaxErrorStatusText",Vb="enableAjaxPerfTracking",Hb="maxAjaxCallsPerView",qb="excludeRequestFromAutoTrackingPatterns",bh="disableAjaxTracking",Bb="ajaxPerfLookupDelay",Kb="disableFetchTracking",Xb="enableResponseHeaderTracking",Tn="status",$i="statusText",pl="headerMap",qi="requestSentTime",_h="getTraceId",Ch="getTraceFlags",Zr="method",wh="errorStatusText",Jb="stateChangeAttached",Vv="responseText",ka="responseFinishedTime",Sh="CreateTrackItem",Hv="getAllResponseHeaders",kh="getPartAProps",gl="perfMark",Ih="perfTiming",Th="ajaxDiagnosticsMessage",Eh="correlationContext",cd="ajaxTotalDuration",ud="eventTraceCtx";function Gb(t,e,n){var r=0,i=t[e],o=t[n];return i&&o&&(r=Ht(i,o)),r}function Ti(t,e,n,r,i){var o=0,s=Gb(n,r,i);return s&&(o=Hr(t,e,Qr(s))),o}function Hr(t,e,n){var r="ajaxPerf",i=0;if(t&&e&&n){var o=t[r]=t[r]||{};o[e]=n,i=1}return i}function TT(t,e){var n=t[Ih],r=e[js]||{},i=0,o="name",s="Start",a="End",c="domainLookup",u="connect",l="redirect",f="request",m="response",d="startTime",h=c+s,g=c+a,p=u+s,v=u+a,_=f+s,P=f+a,x=m+s,R=m+a,H=l+s,A=l=a,k="transferSize",O="encodedBodySize",j="decodedBodySize",K="serverTiming";if(n){i|=Ti(r,l,n,H,A),i|=Ti(r,c,n,h,g),i|=Ti(r,u,n,p,v),i|=Ti(r,f,n,_,P),i|=Ti(r,m,n,x,R),i|=Ti(r,"networkConnect",n,d,v),i|=Ti(r,"sentRequest",n,_,R);var re=n[Fv];re||(re=Gb(n,d,R)||0),i|=Hr(r,Fv,re),i|=Hr(r,"perfTotal",re);var se=n[K];if(se){var b={};ee(se,function(E,q){var M=qu(E[o]||""+q),D=b[M]||{};Pe(E,function(ce,me){(ce!==o&&de(me)||hc(me))&&(D[ce]&&(me=D[ce]+";"+me),(me||!de(me))&&(D[ce]=me))}),b[M]=D}),i|=Hr(r,K,b)}i|=Hr(r,k,n[k]),i|=Hr(r,O,n[O]),i|=Hr(r,j,n[j])}else t[gl]&&(i|=Hr(r,"missing",t.perfAttempts));i&&(e[js]=r)}var ET=(function(){function t(){var e=this;e.openDone=!1,e.setRequestHeaderDone=!1,e.sendDone=!1,e.abortDone=!1,e[Jb]=!1}return t})(),qv=(function(){function t(e,n,r,i){var o=this,s=r,a="responseText";o[gl]=null,o.completed=!1,o.requestHeadersSize=null,o[dn]=null,o.responseReceivingDuration=null,o.callbackDuration=null,o[cd]=null,o[Ds]=0,o.pageUrl=null,o[En]=null,o.requestSize=0,o[Zr]=null,o[Tn]=null,o[qi]=null,o.responseStartedTime=null,o[ka]=null,o.callbackFinishedTime=null,o.endTime=null,o.xhrMonitoringState=new ET,o.clientFailure=0,o[ni]=e,o[ri]=n,o[Pn]=i==null?void 0:i.getTraceFlags(),i?o[ud]={traceId:i[_h](),spanId:i.getSpanId(),traceFlags:i[Ch]()}:o[ud]=null,He(t,o,function(c){c.getAbsoluteUrl=function(){return c[En]?Kk(c[En]):null},c.getPathName=function(){return c[En]?Ll(s,Xk(c[Zr],c[En])):null},c[Sh]=function(u,l,f){var m;if(c.ajaxTotalDuration=sy(Ht(c.requestSentTime,c.responseFinishedTime)*1e3)/1e3,c[cd]<0)return null;var d=(m={id:"|"+c[ni]+"."+c[ri],target:c[mh](),name:c.getPathName(),type:u,startTime:null,duration:c[cd],success:+c[Tn]>=200&&+c[Tn]<400,responseCode:+c[Tn]},m[js]={HttpMethod:c[Zr]},m),h=d[js];if(c[Ds]&&(h[Ds]=!0),c[qi]&&(d[ds]=new Date,d[ds].setTime(c[qi])),TT(c,d),l&&Cr(c.requestHeaders)[Hi]>0&&(h[dn]=c[dn]),f){var g=f();if(g){var p=g[Eh];if(p&&(d.correlationContext=p),g[pl]&&Cr(g.headerMap)[Hi]>0&&(h.responseHeaders=g[pl]),c[wh])if(c[Tn]>=400){var v=g.type;(v===""||v==="text")&&(h.responseText=g.responseText?g[$i]+" - "+g[a]:g[$i]),v==="json"&&(h.responseText=g.response?g[$i]+" - "+JSON.stringify(g.response):g[$i])}else c[Tn]===0&&(h.responseText=g[$i]||"")}}return d},c[kh]=function(){var u=null,l=c[ud];if(l&&(l.traceId||l.spanId)){u={};var f=u[Zt.TraceExt]={traceID:l.traceId,parentID:l.spanId};B(l[Pn])||(f[Pn]=l[Pn])}return u}})}return t.__ieDyn=1,t})(),ot,ja="diagLog",li="_ajaxData",Li="fetch",la="Failed to monitor XMLHttpRequest",Qb=", monitoring data for this ajax call ",Fo=Qb+"may be incorrect.",Bv=Qb+"won't be sent.",Kv="Failed to get Request-Context correlation header as it may be not included in the response or not accessible.",Xv="Failed to add custom defined request context as configured call back may missing a null check.",Jv="Failed to calculate the duration of the ",Gv=0;function xT(){var t=pn();return!t||B(t.Request)||B(t.Request[Bn])||B(t[Li])?null:t[Li]}function PT(t,e){var n,r=!1;if(Ml()){var i=XMLHttpRequest[Bn];r=!B(i)&&!B(i.open)&&!B(i.send)&&!B(i.abort)}var o=Ty();if(o&&o<9&&(r=!1),r)try{var s=new XMLHttpRequest,a={xh:[],i:(n={},n[e]={},n)};s[li]=a;var c=XMLHttpRequest[Bn].open;XMLHttpRequest[Bn].open=c}catch(u){r=!1,Oa(t,15,"Failed to enable XMLHttpRequest monitoring, extension is not supported",{exception:te(u)})}return r}var Zo=function(t,e){return t&&e&&t[li]?(t[li].i||{})[e]:null},DT=function(t,e,n){if(t){var r=(t[li]||{}).xh;r&&r.push({n:e,v:n})}},ld=function(t,e){var n=!1;if(t){var r=(t[li]||{}).xh;r&&ee(r,function(i){if(i.n===e)return n=!0,-1})}return n};function hu(t,e){var n="";try{var r=Zo(t,e);r&&r[En]&&(n+="(url: '"+r[En]+"')")}catch{}return n}function Oa(t,e,n,r,i){G(t[ja](),1,e,n,r,i)}function lr(t,e,n,r,i){G(t[ja](),2,e,n,r,i)}function fa(t,e,n){return function(r){var i;Oa(t,e,n,(i={},i[Th]=hu(r.inst,t._ajaxDataId),i.exception=te(r.err),i))}}function Wo(t,e){return t&&e?st(t,e):-1}function Qv(t,e,n){var r={id:e,fn:n};return t.push(r),{remove:function(){ee(t,function(i,o){if(i.id===r.id)return t.splice(o,1),-1})}}}function Zb(t,e,n,r){var i=!0;return ee(e,function(o,s){try{o.fn.call(null,n)===!1&&(i=!1)}catch(a){G(t&&t.logger,1,64,"Dependency "+r+" [#"+s+"] failed: "+Ne(a),{exception:te(a)},!0)}}),i}function RT(t,e,n,r,i,o){var s=t[Hi],a=!0;if(s>0){var c={core:e,xhr:r,input:i,init:o,traceId:n[ni],spanId:n[ri],traceFlags:n[Pn],context:n[La]||{},aborted:!!n[Ds]};a=Zb(e,t,c,"listener"),n[ni]=c.traceId,n[ri]=c.spanId,n[Pn]=c[Pn],n[La]=c[La]}return a}var Vc="*.blob.core.",AT=Dn([Vc+"windows.net",Vc+"chinacloudapi.cn",Vc+"cloudapi.de",Vc+"usgovcloudapi.net"]),MT=[/https:\/\/[^\/]*(\.pipe\.aria|aria\.pipe|events\.data|collector\.azure)\.[^\/]+\/(OneCollector\/1|Collector\/3)\.0/i],zT=Dn((ot={},ot[Hb]=500,ot[bh]=!1,ot[Kb]=!1,ot[qb]=void 0,ot.disableCorrelationHeaders=!1,ot.distributedTracingMode=1,ot.correlationHeaderExcludedDomains=AT,ot.correlationHeaderDomains=void 0,ot.correlationHeaderExcludePatterns=void 0,ot.appId=void 0,ot.enableCorsCorrelation=!1,ot[yh]=!1,ot[Xb]=!1,ot[Wb]=!1,ot[Vb]=!1,ot.maxAjaxPerfLookupAttempts=3,ot[Bb]=25,ot.ignoreHeaders=["Authorization","X-API-Key","WWW-Authenticate"],ot.addRequestContext=void 0,ot.addIntEndpoints=!0,ot)),UT=(function(t){rr(e,t);function e(){var n=t.call(this)||this;n.identifier=e.identifier,n.priority=120;var r,i,o,s,a,c,u,l,f,m,d,h,g,p,v,_,P,x,R,H,A,k,O,j,K,re,se,b,E,q;return He(e,n,function(M,D){var ce=D[Wc];me(),M.initialize=function(w,z,W,F){M.isInitialized()||(D.initialize(w,z,W,F),H=gi(mn("ajax"),z&&z.evtNamespace&&z.evtNamespace()),oe(w),J(),y(),V())},M._doTeardown=function(){me()},M.trackDependencyData=function(w,z){ne(j,M[Qt],null,w,z)},M.resetAjaxAttempts=function(){u=0},M[sd]=function(w,z,W,F){var X=M._currentWindowHost||o;if(RT(O,M[Qt],w,F,z,W)){if(z||z===""){if(Cv(s,w[mh](),X)){W||(W={});var ie=new Headers(W[Ii]||(z instanceof Request?z[Ii]||{}:{}));if(m){var le="|"+w[ni]+"."+w[ri];ie.set(je[3],le),a&&(w[dn][je[3]]=le)}var ke=E||l&&l.appId();if(ke&&(ie.set(je[0],je[2]+ke),a&&(w[dn][je[0]]=je[2]+ke)),f){var ye=w[Pn];B(ye)&&(ye=1);var $e=ev(Yg(w[ni],w[ri],ye));ie.set(je[4],$e),a&&(w[dn][je[4]]=$e)}W[Ii]=ie}}else if(F&&Cv(s,w[mh](),X)){if(m)if(ld(F,je[3]))lr(M,71,"Unable to set ["+je[3]+"] as it has already been set by another instance");else{var le="|"+w[ni]+"."+w[ri];F[ad](je[3],le),a&&(w[dn][je[3]]=le)}var ke=E||l&&l.appId();if(ke&&(ld(F,je[0])?lr(M,71,"Unable to set ["+je[0]+"] as it has already been set by another instance"):(F[ad](je[0],je[2]+ke),a&&(w[dn][je[0]]=je[2]+ke))),f){var ye=w[Pn];if(B(ye)&&(ye=1),ld(F,je[4]))lr(M,71,"Unable to set ["+je[4]+"] as it has already been set by another instance");else{var $e=ev(Yg(w[ni],w[ri],ye));F[ad](je[4],$e),a&&(w[dn][je[4]]=$e)}}}}return F||W},M[Wv]=function(w,z,W){if(g===-1||u<g){(b===2||b===1)&&typeof w.id=="string"&&w.id[w.id[Hi]-1]!=="."&&(w.id+="."),B(w[ds])&&(w[ds]=new Date);var F=Vr(w,so.dataType,so.envelopeType,M[ja](),z,W);M[Qt].track(F)}else u===g&&Oa(M,55,"Maximum ajax per page view limit reached, ajax monitoring is paused until the next trackPageView(). In order to increase the limit set the maxAjaxCallsPerView configuration parameter.",!0);++u},M.addDependencyListener=function(w){return Qv(O,k++,w)},M.addDependencyInitializer=function(w){return Qv(j,k++,w)};function me(){var w=Hn();r=!1,i=!1,q=!1,o=w&&w.host&&w.host[Oo](),s=null,a=!1,c=!1,u=0,l=null,f=!1,m=!1,d=null,h=!1,g=0,p=!1,v={},_=!1,P=!1,x=null,R=null,H=null,k=0,O=[],j=[],A=mn("ajaxData"),M._ajaxDataId=A,K=null,re=1,se=1,b=1,E=null}function oe(w){M[Wc](at(w,function(z){var W=z.cfg,F=Mn(null,W,M[Qt]);s=F.getExtCfg(e.identifier,zT),b=s.distributedTracingMode,a=s[yh],c=s[Wb],h=s[Vb],g=s[Hb],x=[].concat(s[qb]||[],s.addIntEndpoints!==!1?MT:[]),R=s.addRequestContext,m=b===0||b===1,f=b===1||b===2,h&&(d=A),_=!!s[bh],re=s.maxAjaxPerfLookupAttempts,se=s[Bb],K=s.ignoreHeaders,E=s.appId}))}function V(){var w=M[Qt].getPlugin(Fl);w&&(l=w.plugin[La])}function C(w){var z=!0;return(w||K)&&ee(K,(function(W){if(W[Oo]()===w[Oo]())return z=!1,-1})),z}function y(){var w=xT();if(w){var z=pn(),W=w.polyfill;M[Wc](at(s,function(){P=!!s[Kb],p=s[Xb],!P&&!r?(ce(eh(z,Li,{ns:H,req:function(F,X,ie){var le;if(!P&&r&&!Y(null,X,ie)&&!(W&&i)){var ke=F.ctx();le=un(X,ie);var ye=M[sd](le,X,ie);ye!==ie&&F.set(1,ye),ke.data=le}},rsp:function(F,X){if(!P){var ie=F.ctx().data;ie&&(F.rslt=F.rslt.then(function(le){return Z(F,(le||{})[Tn],X,le,ie,function(){var ke,ye=(ke={statusText:(le||{})[$i],headerMap:null},ke[Eh]=ue(le),ke);if(p&&le){var $e={};le.headers.forEach(function(qe,_t){C(_t)&&($e[_t]=qe)}),ye[pl]=$e}return ye}),le}).catch(function(le){throw Z(F,0,X,null,ie,null,{error:le.message||te(le)}),le}))}},hkErr:fa(M,15,"Failed to monitor Window.fetch"+Fo)},!0,Qm())),r=!0):W&&!q&&(ce(eh(z,Li,{ns:H,req:function(F,X,ie){Y(null,X,ie)}})),q=!0)})),W&&(z[Li].polyfill=W)}}function U(w,z,W){ce(Fk(w,z,W))}function J(){PT(M,A)&&M[Wc](at(s,function(){_=!!s[bh],a=s[yh],!_&&!i&&(U(XMLHttpRequest,"open",{ns:H,req:function(w,z,W,F){if(!_){var X=w.inst,ie=Zo(X,A);!Y(X,W)&&_e(X,ie,!0)&&((!ie||!ie.xhrMonitoringState.openDone)&&(ie=Te(X,z,W,F)),Ue(X,ie))}},hkErr:fa(M,15,la+".open"+Fo)}),U(XMLHttpRequest,"send",{ns:H,req:function(w,z){if(!_){var W=w.inst,F=Zo(W,A);_e(W,F)&&!F.xhrMonitoringState.sendDone&&(xt("xhr",F),F[qi]=$c(),M[sd](F,void 0,void 0,W),F.xhrMonitoringState.sendDone=!0)}},hkErr:fa(M,17,la+Fo)}),U(XMLHttpRequest,"abort",{ns:H,req:function(w){if(!_){var z=w.inst,W=Zo(z,A);_e(z,W)&&!W.xhrMonitoringState.abortDone&&(W[Ds]=1,W.xhrMonitoringState.abortDone=!0)}},hkErr:fa(M,13,la+".abort"+Fo)}),U(XMLHttpRequest,"setRequestHeader",{ns:H,req:function(w,z,W){if(!_){var F=w.inst,X=Zo(F,A);X&&_e(F,X)&&(DT(F,z,W),a&&C(z)&&(X[dn][z]=W))}},hkErr:fa(M,71,la+".setRequestHeader"+Fo)}),i=!0)}))}function Y(w,z,W){var F=!1,X=((de(z)?z:(z||{}).url||"")||"")[Oo]();if(ee(x,function(ke){var ye=ke;de(ke)&&(ye=new RegExp(ke)),F||(F=ye.test(X))}),F)return F;var ie=Wo(X,"?"),le=Wo(X,"#");return(ie===-1||le!==-1&&le<ie)&&(ie=le),ie!==-1&&(X=X.substring(0,ie)),B(w)?B(z)||(F=(typeof z=="object"?z[Vi]===!0:!1)||(W?W[Vi]===!0:!1)):F=w[Vi]===!0||X[Vi]===!0,!F&&X&&th(X)&&(F=!0),F?v[X]||(v[X]=1):v[X]&&(F=!0),F}function _e(w,z,W){var F=!0,X=i;return B(w)||(F=W===!0||!B(z)),X&&F}function Ie(){var w=null;return M[Qt]&&M[Qt].getTraceCtx&&(w=M[Qt].getTraceCtx(!1)),!w&&l&&l.telemetryTrace&&(w=Wp(l.telemetryTrace)),w}function Te(w,z,W,F){var X,ie=Ie(),le=ie&&ie[_h]()||ti(),ke=Jr(ti(),0,16),ye=w[li]=w[li]||{xh:[],i:{}},$e=ye.i=ye.i||{},qe=$e[A]=$e[A]||new qv(le,ke,M[ja](),(X=M.core)===null||X===void 0?void 0:X.getTraceCtx());return qe[Pn]=ie&&ie[Ch](),qe[Zr]=z,qe[En]=W,qe.xhrMonitoringState.openDone=!0,qe[dn]={},qe.async=F,qe[wh]=c,qe}function Ue(w,z){z.xhrMonitoringState[Jb]=Sr(w,"readystatechange",function(){var W;try{w&&w.readyState===4&&_e(w,z)&&Oe(w)}catch(X){var F=te(X);(!F||Wo(F[Oo](),"c00c023f")===-1)&&Oa(M,16,la+" 'readystatechange' event handler"+Fo,(W={},W[Th]=hu(w,A),W.exception=F,W))}},H)}function Et(w){try{var z=w.responseType;if(z===""||z==="text")return w[Vv]}catch{}return null}function Oe(w){var z=Zo(w,A);z[ka]=$c(),z[Tn]=w[Tn];function W(F,X){var ie=X||{};ie.ajaxDiagnosticsMessage=hu(w,A),F&&(ie.exception=te(F)),lr(M,14,Jv+"ajax call"+Bv,ie)}ir("xmlhttprequest",z,function(){try{var F=z[Sh]("Ajax",a,function(){var ye,$e=(ye={statusText:w[$i],headerMap:null},ye[Eh]=Fe(w),ye.type=w.responseType,ye[Vv]=Et(w),ye.response=w.response,ye);if(p){var qe=w[Hv]();if(qe){var _t=Ve(qe).split(/[\r\n]+/),zn={};ee(_t,function(Un){var Ft=Un.split(": "),Ao=Ft.shift(),_c=Ft.join(": ");C(Ao)&&(zn[Ao]=_c)}),$e[pl]=zn}}return $e}),X=void 0;try{R&&(X=R({status:w[Tn],xhr:w}))}catch{lr(M,104,Xv)}if(F){X!==void 0&&(F[js]=jt(jt({},F.properties),X));var ie=z[kh]();ne(j,M[Qt],z,F,null,ie)}else W(null,{requestSentTime:z[qi],responseFinishedTime:z[ka]})}finally{try{var le=w[li]||{i:{}},ke=le.i||{};ke[A]&&(ke[A]=null)}catch{}}},function(F){W(F,null)})}function Fe(w){var z;try{var W=w[Hv]();if(W!==null){var F=Wo(W[Oo](),je[8]);if(F!==-1){var X=w.getResponseHeader(je[0]);return wv(X)}}}catch(ie){lr(M,18,Kv,(z={},z[Th]=hu(w,A),z.exception=te(ie),z))}}function xt(w,z){if(z[En]&&d&&h){var W=Pr();if(W&&pe(W.mark)){Gv++;var F=d+w+"#"+Gv;W.mark(F);var X=W.getEntriesByName(F);X&&X[Hi]===1&&(z[gl]=X[0])}}}function ir(w,z,W,F){var X=z[gl],ie=Pr(),le=re,ke=se,ye=z[En],$e=0;(function qe(){try{if(ie&&X){$e++;for(var _t=null,zn=ie.getEntries(),Un=zn[Hi]-1;Un>=0;Un--){var Ft=zn[Un];if(Ft){if(Ft.entryType==="resource")Ft.initiatorType===w&&(Wo(Ft.name,ye)!==-1||Wo(ye,Ft.name)!==-1)&&(_t=Ft);else if(Ft.entryType==="mark"&&Ft.name===X.name){z[Ih]=_t;break}if(Ft[ds]<X[ds]-1e3)break}}}!X||z[Ih]||$e>=le||z.async===!1?(X&&pe(ie.clearMarks)&&ie.clearMarks(X.name),z.perfAttempts=$e,W()):vn(qe,ke)}catch(Ao){F(Ao)}})()}function un(w,z){var W,F=Ie(),X=F&&F[_h]()||ti(),ie=Jr(ti(),0,16),le=new qv(X,ie,M[ja](),(W=M.core)===null||W===void 0?void 0:W.getTraceCtx());le[Pn]=F&&F[Ch](),le[qi]=$c(),le[wh]=c;var ke;if(w instanceof Request?ke=(w||{}).url||"":ke=w,ke===""){var ye=Hn();ye&&ye.href&&(ke=iy(ye.href,"#")[0])}M[Qt]&&M[Qt].config&&(ke=gr(ke,M[Qt].config)),le[En]=ke;var $e="GET";z&&z[Zr]?$e=z[Zr]:w&&w instanceof Request&&($e=w[Zr]),le[Zr]=$e;var qe={};if(a){var _t=new Headers((z?z[Ii]:0)||(w instanceof Request?w[Ii]||{}:{}));_t.forEach(function(zn,Un){C(Un)&&(qe[Un]=zn)})}return le[dn]=qe,xt(Li,le),le}function $(w){var z="";try{B(w)||(typeof w=="string"?z+="(url: '".concat(w,"')"):z+="(url: '".concat(w.url,"')"))}catch(W){Oa(M,15,"Failed to grab failed fetch diagnostics message",{exception:te(W)})}return z}function Z(w,z,W,F,X,ie,le){if(!X)return;function ke(ye,$e,qe){var _t=qe||{};_t.fetchDiagnosticsMessage=$(W),$e&&(_t.exception=te($e)),lr(M,ye,Jv+"fetch call"+Bv,_t)}X[ka]=$c(),X[Tn]=z,ir(Li,X,function(){var ye=X[Sh]("Fetch",a,ie),$e;try{R&&($e=R({status:z,request:W,response:F}))}catch{lr(M,104,Xv)}if(ye){$e!==void 0&&(ye[js]=jt(jt({},ye.properties),$e));var qe=X[kh]();ne(j,M[Qt],X,ye,null,qe)}else ke(14,null,{requestSentTime:X[qi],responseFinishedTime:X[ka]})},function(ye){ke(18,ye,null)})}function ue(w){if(w&&w[Ii])try{var z=w[Ii].get(je[0]);return wv(z)}catch(W){lr(M,18,Kv,{fetchDiagnosticsMessage:$(w),exception:te(W)})}}function ne(w,z,W,F,X,ie){var le=!0,ke=w[Hi];if(ke>0){var ye={item:F,properties:X,sysProperties:ie,context:W?W[La]:null,aborted:W?!!W[Ds]:!1};le=Zb(z,w,ye,"initializer")}le&&M[Wv](F,X,ie)}}),n}return e.prototype.processTelemetry=function(n,r){this.processNext(n,r)},e.prototype.addDependencyInitializer=function(n){return null},e.identifier="AjaxDependencyPlugin",e})(So),NT=(function(){function t(){}return t})(),$T=(function(){function t(){this.id="browser",this.deviceClass="Browser"}return t})(),LT="3.3.11",jT=(function(){function t(e,n){var r=this,i=at(e,function(){var o=e.sdkExtension;r.sdkVersion=(o?o+"_":"")+"javascript:"+LT});n&&n.add(i)}return t})(),OT=(function(){function t(){}return t})(),vl="session",ml="sessionManager",pu="isUserCookieSet",yl="isNewUser",fd="getTraceCtx",xh="telemetryTrace",Yb="applySessionContext",e_="applyApplicationContext",t_="applyOperationContext",n_="applyOperatingSystemContxt",r_="applyLocationContext",i_="applyInternalContext",gu="getSessionId",o_="sessionCookiePostfix",Di="automaticSession",Yo="accountId",es="authenticatedId",da="acquisitionDate",Hc="renewalDate",ha="cookieSeparator",dd="authUserCookieName",FT="ai_session",WT=864e5,VT=18e5,HT=6e4,s_=(function(){function t(){}return t})(),qT=(function(){function t(e,n,r){var i=this,o,s,a=wo(n),c=Ul(n),u,l;He(t,i,function(f){e||(e={});var m=at(e,function(_){u=e.sessionExpirationMs||WT,l=e.sessionRenewalMs||VT;var P=e[o_]||e.namePrefix||"";o=FT+P});r&&r.add(m),f[Di]=new s_,f.update=function(){var _=Rn(),P=!1,x=f[Di];if(x.id||(P=!d(x)),!P&&u>0){var R=_-x[da],H=_-x[Hc];P=R<0||H<0,P=P||R>u,P=P||H>l}P?g(_):(!s||_-s>HT)&&p(x,_)},f.backup=function(){var _=f[Di];v(_.id,_[da],_[Hc])};function d(_,P){var x=!1,R=c.get(o);if(R&&pe(R.split))x=h(_,R);else{var H=ab(a,o);H&&(x=h(_,H))}return x||!!_.id}function h(_,P){var x=!1,R=", session will be reset",H=P.split("|");if(H.length>=2)try{var A=+H[1]||0,k=+H[2]||0;isNaN(A)||A<=0?G(a,2,27,"AI session acquisition date is 0"+R):isNaN(k)||k<=0?G(a,2,27,"AI session renewal date is 0"+R):H[0]&&(_.id=H[0],_[da]=A,_[Hc]=k,x=!0)}catch(O){G(a,1,9,"Error parsing ai_session value ["+(P||"")+"]"+R+" - "+Ne(O),{exception:te(O)})}return x}function g(_){var P=e.getNewId||Ep;f[Di].id=P(e.idLength||22),f[Di][da]=_,p(f[Di],_),Ol()||G(a,2,0,"Browser does not support local storage. Session durations will be inaccurate.")}function p(_,P){var x=_[da];_[Hc]=P;var R=l,H=x+u-P,A=[_.id,x,P],k=0;H<R?k=H/1e3:k=R/1e3;var O=e.cookieDomain||null;c.set(o,A.join("|"),u>0?k:null,O),s=P}function v(_,P,x){cb(a,o,[_,P,x].join("|"))}})}return t.__ieDyn=1,t})(),BT=(function(){function t(e,n,r,i,o){var s=this;s.traceID=e||ti(),s.parentID=n;var a=Hn();!r&&a&&a.pathname&&(r=a.pathname,o&&(r=gr(r,o))),s.name=pt(i,r)}return t})();function Zv(t){return!(typeof t!="string"||!t||t.match(/,|;|=| |\|/))}var KT=(function(){function t(e,n,r){this.isNewUser=!1,this.isUserCookieSet=!1;var i=wo(n),o=Ul(n),s;He(t,this,function(a){Re(a,"config",{g:function(){return e}});var c=at(e,function(){var m=e.userCookiePostfix||"";s=t.userCookieName+m;var d=o.get(s);if(d){a[yl]=!1;var h=d.split(t[ha]);h.length>0&&(a.id=h[0],a[pu]=!!a.id)}if(!a.id){a.id=u();var g=l(a.id);f(g.join(t[ha]));var p=(e.namePrefix||"")+"ai_session";nI(i,p)}a[Yo]=e[Yo]||void 0;var v=o.get(t[dd]);if(v){v=decodeURI(v);var _=v.split(t[ha]);_[0]&&(a[es]=_[0]),_.length>1&&_[1]&&(a[Yo]=_[1])}});r&&r.add(c);function u(){var m=e||{},d=m.getNewId||Ep,h=d(m.idLength?e.idLength:22);return h}function l(m){var d=Us(new Date);a.accountAcquisitionDate=d,a[yl]=!0;var h=[m,d];return h}function f(m){var d=31536e3;a[pu]=o.set(s,m,d)}a.setAuthenticatedUserContext=function(m,d,h){h===void 0&&(h=!1);var g=!Zv(m)||d&&!Zv(d);if(g){G(i,2,60,"Setting auth user context failed. User auth/account id should be of type string, and not contain commas, semi-colons, equal signs, spaces, or vertical-bars.",!0);return}a[es]=m;var p=a[es];d&&(a[Yo]=d,p=[a[es],a.accountId].join(t[ha])),h&&o.set(t[dd],encodeURI(p))},a.clearAuthenticatedUserContext=function(){a[es]=null,a[Yo]=null,o.del(t[dd])},a.update=function(m){if(a.id!==m||!a[pu]){var d=m||u(),h=l(d);f(h.join(t[ha]))}}})}return t.cookieSeparator="|",t.userCookieName="ai_user",t.authUserCookieName="ai_authUser",t})(),qc="ext",Bc="tags";function Vo(t,e){t&&t[e]&&Cr(t[e]).length===0&&delete t[e]}function Yv(){return null}var XT=(function(){function t(e,n,r,i){var o=this,s=e.logger;He(t,this,function(a){if(a.appId=Yv,a[gu]=Yv,a.application=new NT,a.internal=new jT(n,i),Dl()){a[ml]=new qT(n,e,i),a.device=new $T,a.location=new OT,a.user=new KT(n,e,i);var c=void 0,u=void 0,l;r&&(c=r.getTraceId(),u=r.getSpanId(),l=r.getName()),a[xh]=new BT(c,u,l,s),a[vl]=new s_}a[gu]=function(){var f=a[vl],m=null;if(f&&de(f.id))m=f.id;else{var d=(a[ml]||{})[Di];m=d&&de(d.id)?d.id:null}return m},a[Yb]=function(f,m){We(zt(f.ext,Zt.AppExt),"sesId",a[gu](),de)},a[n_]=function(f,m){We(f.ext,Zt.OSExt,a.os)},a[e_]=function(f,m){var d=a.application;if(d){var h=zt(f,Bc);We(h,Ke.applicationVersion,d.ver,de),We(h,Ke.applicationBuild,d.build,de)}},a.applyDeviceContext=function(f,m){var d=a.device;if(d){var h=zt(zt(f,qc),Zt.DeviceExt);We(h,"localId",d.id,de),We(h,"ip",d.ip,de),We(h,"model",d.model,de),We(h,"deviceClass",d.deviceClass,de)}},a[i_]=function(f,m){var d=a.internal;if(d){var h=zt(f,Bc);We(h,Ke.internalAgentVersion,d.agentVersion,de),We(h,Ke.internalSdkVersion,pt(s,d.sdkVersion,64),de),(f.baseType===Ya.dataType||f.baseType===ui.dataType)&&(We(h,Ke.internalSnippet,d.snippetVer,de),We(h,Ke.internalSdkSrc,d.sdkSrc,de))}},a[r_]=function(f,m){var d=o.location;d&&We(zt(f,Bc,[]),Ke.locationIp,d.ip,de)},a[t_]=function(f,m){var d=a[xh];if(d){var h=zt(zt(f,qc),Zt.TraceExt,{traceID:void 0,parentID:void 0});We(h,"traceID",d.traceID,de,B),We(h,"name",d.name,de,B),We(h,"parentID",d.parentID,de,B)}},a.applyWebContext=function(f,m){var d=o.web;d&&We(zt(f,qc),Zt.WebExt,d)},a.applyUserContext=function(f,m){var d=a.user;if(d){var h=zt(f,Bc,[]);We(h,Ke.userAccountId,d[Yo],de);var g=zt(zt(f,qc),Zt.UserExt);We(g,"id",d.id,de),We(g,"authId",d[es],de)}},a.cleanUp=function(f,m){var d=f.ext;d&&(Vo(d,Zt.DeviceExt),Vo(d,Zt.UserExt),Vo(d,Zt.WebExt),Vo(d,Zt.OSExt),Vo(d,Zt.AppExt),Vo(d,Zt.TraceExt))}})}return t.__ieDyn=1,t})(),Fr,hd,Ho=null,JT=Fs((Fr={accountId:Ho,sessionRenewalMs:1800*1e3,samplingPercentage:100,sessionExpirationMs:1440*60*1e3,cookieDomain:Ho,sdkExtension:Ho,isBrowserLinkTrackingEnabled:!1,appId:Ho},Fr[gu]=Ho,Fr.namePrefix=hd,Fr[o_]=hd,Fr.userCookiePostfix=hd,Fr.idLength=22,Fr.getNewId=Ho,Fr)),GT=(function(t){rr(e,t);function e(){var n=t.call(this)||this;n.priority=110,n.identifier=Fl;var r,i,o,s,a;return He(e,n,function(c,u){l(),Re(c,"context",{g:function(){return s}}),c.initialize=function(d,h,g,p){u.initialize(d,h,g,p),f(d)},c.processTelemetry=function(d,h){if(!B(d)){h=c._getTelCtx(h),d.name===ui.envelopeType&&h.diagLog().resetInternalMessageCount();var g=s||{};g[vl]&&typeof s[vl].id!="string"&&g[ml]&&g[ml].update();var p=g.user;if(p&&!p[pu]&&p.update(g.user.id),m(d,h),p&&p[yl]&&(p[yl]=!1,!a)){var v=new Ya(72,(nr()||{}).userAgent||"");BS(h.diagLog(),1,v)}c.processNext(d,h)}},c._doTeardown=function(d,h){var g=(d||{}).core();if(g&&g[fd]){var p=g[fd](!1);p===i&&g.setTraceCtx(o)}l()};function l(){r=null,i=null,o=null,s=null,a=!0}function f(d){var h=c.identifier,g=c.core;c._addHook(at(d,function(){var p=Mn(null,d,g);d.storagePrefix&&qp(d.storagePrefix),a=d.disableUserInitMessage!==!1,r=p.getExtCfg(h,JT),c._extConfig=r})),o=g[fd](!1),s=new XT(g,r,o,c._unloadHooks),i=Wp(c.context[xh],o),g.setTraceCtx(i),c.context.appId=function(){var p=g.getPlugin(_b);return p?p.plugin._appId:null}}function m(d,h){zt(d,"tags",[]),zt(d,"ext",{});var g=c.context;g[Yb](d,h),g[e_](d,h),g.applyDeviceContext(d,h),g[t_](d,h),g.applyUserContext(d,h),g[n_](d,h),g.applyWebContext(d,h),g[r_](d,h),g[i_](d,h),g.cleanUp(d,h)}}),n}return e.__ieDyn=1,e})(So),a_="AuthenticatedUserContext",Vs="track",Ph="snippet",QT="getCookieMgr",ZT="startTrackPage",YT="stopTrackPage",pd="flush",e1="startTrackEvent",t1="stopTrackEvent",n1="addTelemetryInitializer",em="pollInternalLogs",gd="getPlugin",vd="evtNamespace",r1=Vs+"Event",i1=Vs+"Trace",o1=Vs+"Metric",s1=Vs+"PageView",a1=Vs+"Exception",c1=Vs+"DependencyData",u1="set"+a_,l1="clear"+a_,f1="https://js.monitor.azure.com/scripts/b/ai.config.1.cfg.json",bl="connectionString",md="version",Ei="queue",Ia="instrumentationKey",ts="userOverrideEndpointUrl",yd="endpointUrl",pa="onunloadFlush",ln="context",tm="addHousekeepingBeforeUnload",bd="sendMessage",d1="updateSnippetDefinitions",$n,qo,Bo,_d,ga,nm=[Ph,"dependencies","properties","_snippetVersion","appInsightsNew","getSKUDefaults"],c_="iKeyUsage",u_="CdnUsage",l_="SdkLoaderVer",h1="zipPayload",Kc=void 0,p1={samplingRate:100,maxSendNumber:1},g1={monthInterval:3,daysOfMonth:[28]},Xc={disabled:!0,limit:kn(p1),interval:kn(g1)},v1=($n={},$n[bl]=Kc,$n.endpointUrl=Kc,$n[Ia]=Kc,$n[ts]=Kc,$n.diagnosticLogInterval=Qu(m1,1e4),$n.featureOptIn=(qo={},qo[c_]={mode:3},qo[u_]={mode:2},qo[l_]={mode:2},qo[h1]={mode:1},qo),$n.throttleMgrCfg=kn((Bo={},Bo[109]=kn(Xc),Bo[106]=kn(Xc),Bo[111]=kn(Xc),Bo[110]=kn(Xc),Bo)),$n.extensionConfig=kn((_d={},_d.AppInsightsCfgSyncPlugin=kn({cfgUrl:f1,syncMode:2}),_d)),$n);function m1(t){return t&&t>0}function rm(t,e){return Ga(function(n,r){Kt(e,function(i){var o=i&&i.value,s=null;!i.rejected&&o&&(t[bl]=o,s=fb(o)),n(s)})})}var y1=(function(){function t(e){var n=this,r,i,o,s,a,c,u,l,f,m,d,h,g,p;He(t,this,function(v){x(),Re(v,"config",{g:function(){return l}}),ee(["pluginVersionStringArr","pluginVersionString"],function(A){Re(v,A,{g:function(){return u?u[A]:null}})}),s=""+(e.sv||e[md]||""),e[Ei]=e[Ei]||[],e[md]=e[md]||2;var _=yn(e.config||{},v1);l=_.cfg,f=new QI,Re(v,"appInsights",{g:function(){return f}}),i=new GT,r=new UT,o=new IT,u=new Ik,Re(v,"core",{g:function(){return u}}),H(at(_,function(){var A=l[bl];if(fi(A)){var k=Ga(function(re,se){Kt(rm(l,A),function(b){if(b.rejected)re(null);else{var E=l[Ia],q=b.value;E=q&&q.instrumentationkey||E,re(E)}})}),O=l[ts];B(O)&&(O=Ga(function(re,se){Kt(rm(l,A),function(b){if(b.rejected)re(null);else{var E=l[yd],q=b.value,M=q&&q.ingestionendpoint;E=M?M+Ss:E,re(E)}})})),l[Ia]=k,l[yd]=O}if(de(A)&&A){var j=fb(A),K=j.ingestionendpoint;l.endpointUrl=l[ts]?l[ts]:K+Ss,l[Ia]=j.instrumentationkey||l[Ia]}l.endpointUrl=l[ts]?l[ts]:l[yd]})),v[Ph]=e,v[pd]=function(A,k){A===void 0&&(A=!0);var O;return tl(u,function(){return"AISKU.flush"},function(){A&&!k&&(O=Qn(function(re){k=re}));var j=1,K=function(){j--,j===0&&k()};ee(u.getChannels(),function(re){re&&(j++,re[pd](A,K))}),K()},null,A),O},v[pa]=function(A){A===void 0&&(A=!0),ee(u.getChannels(),function(k){k[pa]?k[pa]():k[pd](A)})},v.loadAppInsights=function(A,k,O){A===void 0&&(A=!1),A&&ZC("Legacy Mode is no longer supported");function j(K){if(K){var re="";B(s)||(re+=s),v[ln]&&v[ln].internal&&(v[ln].internal.snippetVer=re||"-"),Pe(v,function(se,b){de(se)&&!pe(b)&&se&&se[0]!=="_"&&At(nm,se)===-1&&K[se]!==b&&(K[se]=b)})}}return tl(v.core,function(){return"AISKU.loadAppInsights"},function(){u.initialize(l,[o,i,r,f,m],k,O),Re(v,"context",{g:function(){return i[ln]}}),d||(d=new iI(u));var K=b1();K&&v[ln]&&(v[ln].internal.sdkSrc=K),j(v[Ph]),v.emptyQueue(),v[em](),v[tm](v),H(at(_,function(){var re=!1;l.throttleMgrCfg[109]&&(re=!l.throttleMgrCfg[109].disabled),!d.isReady()&&l.extensionConfig&&l.extensionConfig[m.identifier]&&re&&d.onReadyState(!0),!h&&!l[bl]&&ru(c_,l,!0)&&(d[bd](106,"See Instrumentation key support at aka.ms/IkeyMigrate"),h=!0),!g&&v[ln].internal.sdkSrc&&v[ln].internal.sdkSrc.indexOf("az416426")!=-1&&ru(u_,l,!0)&&(d[bd](110,"See Cdn support notice at aka.ms/JsActiveCdn"),g=!0),!p&&parseInt(s)<6&&ru(l_,l,!0)&&(d[bd](111,"An updated Sdk Loader is available, see aka.ms/SnippetVer"),p=!0)}))}),v},v[d1]=function(A){Kw(A,v,function(k){return k&&At(nm,k)===-1})},v.emptyQueue=function(){try{if(Ce(v.snippet[Ei])){for(var A=v.snippet[Ei].length,k=0;k<A;k++){var O=v.snippet[Ei][k];O()}v.snippet[Ei]=void 0,delete v.snippet[Ei]}}catch(K){var j={};K&&pe(K.toString)&&(j.exception=K.toString())}},v[tm]=function(A){if(Dl()||Jm()){var k=function(){if(A[pa](!1),pe(v.core[gd])){var j=n.core[gd](Fl);if(j){var K=j.plugin;K&&K[ln]&&K[ln]._sessionManager&&K[ln]._sessionManager.backup()}}},O=!1;c||(c=gi(a,u[vd]&&u[vd]())),H(at(l,function(j){var K=j.cfg,re=A.appInsights,se=Mn(null,K,re.core),b=se.getExtCfg(re.identifier||Bp);R();var E=K.disablePageUnloadEvents;b.disableFlushOnBeforeUnload||($k(k,E,c)&&(O=!0),Yd(k,E,c)&&(O=!0),!O&&!fS()&&G(u.logger,1,19,"Could not add handler for beforeunload and pagehide")),!O&&!b.disableFlushOnUnload&&Yd(k,E,c)}))}},v.getSender=function(){return o},v.unload=function(A,k,O){var j=!1,K;A!==!1&&!k&&(K=Qn(function(se){k=se}));function re(se){j||(j=!0,x(),k&&k(se))}return v[pa](A),R(),u.unload&&u.unload(A,re,O),K},us(v,f,[QT,r1,s1,"trackPageViewPerformance",a1,"_onerror",i1,o1,ZT,YT,e1,t1]),us(v,P,[c1,"addDependencyListener","addDependencyInitializer"]),us(v,u,[n1,em,"stopPollingInternalLogs",gd,"addPlugin",vd,"addUnloadCb","getTraceCtx","updateCfg","onCfgChange"]),us(v,function(){var A=i[ln];return A?A.user:null},[u1,l1]);function P(){return r}function x(){a=mn("AISKU"),c=null,r=null,i=null,o=null,s=null,d=null,h=!1,g=!1,p=!1,m=new oT}function R(){c&&(Lk(null,c),jk(null,c))}function H(A){u.addUnloadHook(A)}})}return t.prototype.addDependencyInitializer=function(e){return null},t})();function b1(){if(ga)return ga;var t=null,e=!1,n=["://js.monitor.azure.com/","://az416426.vo.msecnd.net/"];try{var r=(document||{}).currentScript;r&&(t=r.src)}catch{}if(t){try{var i=t.toLowerCase();if(i){var o="";ee(n,function(s,a){if(st(i,s)!==-1)return o="cdn"+(a+1),st(i,"/scripts/")===-1&&(st(i,"/next/")!==-1?o+="-next":st(i,"/beta/")!==-1&&(o+="-beta")),ga=o+(e?".mod":""),-1})}}catch{}ga=t}return ga}const _1=["NotLoggedIn","LoginFailed"],C1=["ResizeObserver loop limit exceeded","ResizeObserver loop completed with undelivered notifications."];var im;const uc=((im=window.Cbn)==null?void 0:im.appInsightsConnectionString)??"",w1=new zI,Mr=new y1({config:{enableResponseHeaderTracking:!0,connectionString:uc,enableAutoRouteTracking:!0,enableUnhandledPromiseRejectionTracking:!0,extensions:[w1],enableAjaxErrorStatusText:!0,disableCookiesUsage:!0}}),S1=()=>!!uc&&uc!=="InstrumentationKey=00000000-0000-0000-0000-000000000000",k1=t=>{var e,n,r,i,o;if((e=t.data)!=null&&e.message){const s=P1(t.data.message);if(C1.includes(s))return Ta.addLog(t.data.message,"Error",{sendToTracker:!1}),!1;if(s==="Network Error"&&!window.navigator.onLine||s.includes("status code 401")||s==="Uncaught SyntaxError: Unexpected token '<'"&&(n=t.data.errorSrc)!=null&&n.startsWith("window.onerror")&&(r=t.data.errorSrc)!=null&&r.endsWith(".chunk.js:1:1"))return!1;const a=L1((i=t.data)==null?void 0:i.message);if((o=a==null?void 0:a.Causes)!=null&&o.some(c=>_1.includes(c.Id)))return!1}},I1=t=>{var e;const n=(e=t.baseData)==null?void 0:e.exceptions;if(!n)return!0;if(n.some(r=>r.stack.includes("chrome-extension://")))return!1},T1=t=>{var e;const n=t.data??{};t.baseType===qt.dataType&&t.baseData&&(t.baseData.id=((e=t.baseData)==null?void 0:e.id)??f_(),n.errorGuid=t.baseData.id),t.data=n},E1=t=>{var e,n,r;const i=oc[(e=t.baseData)==null?void 0:e.severityLevel]??"Information";switch(t.baseType){case qt.dataType:{const o=t.baseData,s=oc[o.severityLevel];o.exceptions.forEach(a=>{Ta.addLog(a.message,s??i,{envelope:t,sendToTracker:!1});const c=t.data??{};if(c._cbnUserDialogPrevented!==!0&&c._cbnErrorBoundary!==!0){const u=c._cbnUserMsg??a.message;Ta._Internals.showErrorDialog({header:"Error",text:u,errorId:o.id})}})}break;case vr.dataType:Ta.addLog(`Event "${(n=t.baseData)==null?void 0:n.name}"`,i,{envelope:t,sendToTracker:!1});break;default:Ta.addLog(((r=t.baseData)==null?void 0:r.message)??t.name,i,{envelope:t,sendToTracker:!1});break}},x1=uc!==void 0&&uc.startsWith("InstrumentationKey=");x1?Mr.loadAppInsights():console.warn("AppInsights not initialized! The connections string wasn't properly injected.");function P1(t){return t.replace("PromiseRejectionEvent: ","").replace("ErrorEvent: ","").replace("AxiosError: ","")}Mr.trackPageView();Mr.addTelemetryInitializer(I1);Mr.addTelemetryInitializer(T1);Mr.addTelemetryInitializer(k1);Mr.addTelemetryInitializer(E1);Mr.addTelemetryInitializer(S1);const D1=()=>Math.floor(Math.random()*999).toString().padStart(3,"0"),f_=()=>Date.now().toString()+D1(),R1=()=>new Date().toISOString().slice(11,23);function A1(){const t=(new Error().stack||"").replace(/(\r\n|\n|\r)/gm,"").split(/\s{2,10}at /gm);return t.shift(),t}const M1={Verbose:{emoji:"๐งพ",style:"color: grey;"},Information:{emoji:"๐",style:"color: #466FD5;"},Warning:{emoji:"โ ๏ธ",style:"color: #ebc334;"},Error:{emoji:"๐",style:"color: red;"},Critical:{emoji:"๐ฅ",style:"color: red;"}};function z1(t,e,n){var r,i,o,s;const a=M1[e],c=n!=null&&n.customProperties?" | data = %O":"",u=n!=null&&n.envelope?" | envelope = %O":"",l=e==="Critical"?"[Critical] ":"",f=[((s=(o=(i=(r=n==null?void 0:n.envelope)==null?void 0:r.baseData)==null?void 0:i.exceptions)==null?void 0:o[0])==null?void 0:s.parsedStack)??A1(),a.style];n!=null&&n.customProperties&&f.push(n.customProperties),n!=null&&n.envelope&&f.push(n.envelope),console.log(`%O ${a.emoji} %c[${R1()}] ${l}${t}${u}${c}`,...f)}function U1(t){if(!t)return;const e={};return(t==null?void 0:t.show)!=="dialog"&&(e._cbnUserDialogPrevented=!0),t!=null&&t.userMessage&&(e._cbnUserMsg=t.userMessage),e}function N1(t,e){const n=f_(),r={id:n,exception:t instanceof Error?t:new Error(t),severityLevel:e!=null&&e.isCritical?oc.Critical:oc.Error,properties:{title:t.toString(),...e==null?void 0:e.customProperties}};return Mr.trackException(r,U1(e)),n}var ns,rs,Dh,d_;class $1{constructor(){fe(this,Dh),fe(this,ns),fe(this,rs,[]),lo(this,"_Internals",{subscribeUiListener:e=>{if(S(this,ns)){console.warn("Logger UI listener is already registered. Ensure that this only happens once!");return}Ae(this,ns,e),S(this,rs).forEach(n=>this._Internals.showErrorDialog(n)),Ae(this,rs,[])},showErrorDialog:e=>{S(this,ns)?S(this,ns).call(this,e):(S(this,rs).length===0&&on(this,Dh,d_).call(this),S(this,rs).push(e))}})}addLog(e,n="Information",r){(r==null?void 0:r.sendToTracker)!==!1?Mr.trackTrace({message:e,severityLevel:oc[n],properties:r==null?void 0:r.customProperties}):z1(e,n,r)}reportError(e,n){return N1(e,n)}}ns=new WeakMap,rs=new WeakMap,Dh=new WeakSet,d_=async function(){};const Ta=new $1,h_=t=>typeof t=="object"&&t!==null&&t.$typ!==void 0&&t.Id!==void 0;function vu(t,e){return h_(t)?e?e.includes(t.Id):!0:!1}function L1(t){const e=t.replace(/^[^{]+/g,"");let n;try{n=JSON.parse(e)}catch{return}return vu(n)?n:void 0}function Ln(t){throw new Error(h_(t)?`${t.Id} - ${t.Message}`:"Unknown error")}const Rh="CmpEditor_",p_=I.z.custom(t=>Ar(t)&&t.startsWith(Rh)&&N0.safeParse(t.substring(Rh.length)).success),j1=t=>p_.safeParse(t).success,om=t=>`CmpEditor_${t}`,O1=t=>t.substring(Rh.length);function F1(t){const e=t.substring(t.indexOf("<")+1,t.lastIndexOf(">"));if(!U0(e))throw new Error(`Invalid input type: ${e}`);return e}const g_=I.z.string();I.z.array(g_);const W1=I.z.string(),V1=t=>t.split("."),H1=t=>{const e=V1(t);return e[e.length-1]},Wl=I.z.enum(["value","width","height","minWidth","maxWidth","minHeight","maxHeight","backgroundNormal","backgroundHover","backgroundPressed","border","borderRadius","font","color","captionText","captionWidth","errorMsg","description","flexGrow","flexWrap","opacity","gap","visible","enabled","tooltipText","rawHtml","wrapText","text","placeholder","dataEntries","dataTemplate","tooltipKey","collapsed","group"]),q1=I.z.record(Wl,Cm),v_=I.z.lazy(()=>I.z.union([q1,I.z.record(v_)])),B1=I.z.record(Wl,ym),m_=I.z.lazy(()=>I.z.union([B1,I.z.record(m_)])),K1=I.z.object({Name:I.z.literal("Fiber"),$val:v_,$typ:m_.optional()}),X1=I.z.object({Fibers:I.z.record(Wl,I.z.object({$src:A0,$typ:ym})),Name:I.z.literal(yr.FiberEditor),Pack:W1}),y_=t=>X1.safeParse(t).success;function mu(t,e){const n=[];for(const[r,i]of Object.entries(t))if(e&&r==="$val")n.push({ctrlId:e,values:i});else if(r!=="$val"){const o=mu(i,r);n.push(...o)}return n}const sm="CtrlFiberEditor_",J1=I.z.custom(t=>Ar(t)&&t.startsWith(sm)&&g_.safeParse(t.substring(sm.length)).success),b_=t=>J1.safeParse(t).success,am=t=>`CtrlFiberEditor_${t}`,G1=["NotLoggedIn","AuthenticationFailed","SessionTimedOut","CfgnSessionTimedOut","Unauthorized"];var Qe,wn,Ri,yu,Ai,bu,Ah,Mi,zi;class Q1{constructor(e,n){fe(this,bu),fe(this,Qe),fe(this,wn),fe(this,Ri,[]),fe(this,yu,async()=>{if(S(this,Ri).length===0)return;Je("WsConfiguratorClientInternals","#sendDeferredServerCallsAfterReconnect","Sending queued messages",S(this,Ri));const r=S(this,Ri).map(i=>this._callServer(...i));Ae(this,Ri,[]),await Promise.all(r)}),lo(this,"_callServer",async(r,i,o)=>{const s=S(this,Qe).connection;if(!s||S(this,Qe).state!=="connected"){Je("ConfiguratorClientInternals","_callServer","Not connected. Message queued to be sent later.",{method:r,args:i,options:o}),S(this,Ri).push([r,i,o]);const f=S(this,Qe).state==="connecting";return S(this,Qe).isInitialized&&!f&&S(this,Qe).restoreConnection(),null}const a=(o==null?void 0:o.requestId)??S(this,Qe).getNextRequestId();Je("ConfiguratorClientInternals",`_callServer, ID ${a}`,"",{method:r,args:i,options:o}),S(this,Qe).extendSessionLifetime();const c=o!=null&&o.requestId?[...i,o.requestId]:i,[u,l]=await vs(s.invoke(r,...c));return u?Ye("ConfiguratorClientInternals",`_callServer, ID ${a}`,"InvocationError:",u):l.error&&(vu(l.error,G1)&&cC(),Ye("ConfiguratorClientInternals",`_callServer, ID ${a}`,"Error in response:",l.error)),Je("ConfiguratorClientInternals",`_callServer, ID ${a}`,"Result:",l),l}),fe(this,Ai,[]),fe(this,Mi,[]),fe(this,zi,[]),Ae(this,Qe,e),S(this,Qe).onConnected(()=>S(this,yu).call(this)),S(this,Qe).onConnectionRestored(()=>S(this,yu).call(this)),Ae(this,wn,n)}async setCmpInput(e,n,r){const[i]=await vs(on(this,bu,Ah).call(this,e,n,"change-cfgn-value",r));if(i instanceof Td)return i.message;if(i)throw i}async setCmpPresetInput(e,n,r,i){const o=!z0(r)&&Ar(n),[s,a]=o?Sl(n):[null,n];if(s)return s.message;const c=J0(r),[u]=await vs(on(this,bu,Ah).call(this,e,a,i,c));if(u instanceof Td)return u.message;if(u)throw u}async setCmpInputType(e,n){const r=await this._callServer("ChangeConfigurationValueType",[e,n],{isChunkable:!0});if(r!=null&&r.error){if(vu(r.error))return r.error.Message;throw new Error("Unknown error")}else return}async setCmpHiveRule(e,n,r){const i={name:e,changes:[{name:r?"Query":"Value",value:n}]};await this._callServer("SetCmpValue",[i],{isChunkable:!0})}async setCmpGroup(e,n){const r={name:e,changes:[{name:"Group",value:n}]};await this._callServer("SetCmpValue",[r])}async fetchCmpPropertyValue(e){let n=()=>{};const r=new Promise(i=>n=i);if(S(this,Mi).push({resolver:n,values:e}),await Sd(0),S(this,Mi).length){const i=S(this,Mi).map(a=>a.resolver),o=S(this,Mi).flatMap(({values:a})=>a.map(({name:c,property:u})=>({name:c,...u!=="Value"&&{property:[u]}})));Ae(this,Mi,[]);const s=S(this,Qe).getNextRequestId();this._callServer("GetCmpValue",[o],{requestId:s}),await S(this,wn).awaitCspdUpdateResponse(s),i.forEach(a=>a())}return r}async subscribeToCmpUpdates(e,n,r=!1){let i=()=>{};const o=new Promise(s=>i=s);if(S(this,zi).push({resolver:i,values:{name:e,property:n,lazy:r}}),await Sd(0),S(this,zi).length){const s=S(this,zi).map(u=>u.resolver),a=S(this,zi).map(({values:{name:u,property:l,lazy:f}})=>({name:u,...l!=="Value"&&{property:[l]},...f===!0&&{lazy:f}}));Ae(this,zi,[]);const c=S(this,Qe).getNextRequestId();this._callServer("SubscribeCmpUpdate",[a],{requestId:c}),await S(this,wn).awaitCspdUpdateResponse(c),s.forEach(u=>u())}return o}async requestCmpEditorCspd(e,n){const r=S(this,Qe).getNextRequestId(),i=om(e);this._callServer("RequestCspd",[[{slot:i,cspdId:n?yr.TableEditor:yr.ValueEditor,targetComponent:e,parameters:void 0}]],{requestId:r}),await S(this,wn).awaitCspdUpdateResponse(r)}async releaseCmpEditorCspd(e){const n=e.map(r=>om(r));await this._callServer("ReleaseCspd",n)}async createCmp(e,n,r){const i=[e,n,r],o=await this._callServer("CreateComponent",i);o!=null&&o.error&&Ln(o.error)}async renameCmp(e,n){const r=[e,n],i=await this._callServer("RenameComponent",r);i!=null&&i.error&&Ln(i.error)}async renameCmpGroup(e,n){const r=[e,n],i=await this._callServer("RenameComponentGroup",r);i!=null&&i.error&&Ln(i.error)}async copyCmp(e,n){const r=[e,n],i=await this._callServer("CopyComponent",r);i!=null&&i.error&&Ln(i.error)}async deleteCmp(e){const n=[e],r=await this._callServer("DeleteComponent",n);r!=null&&r.error&&Ln(r.error)}async initiateCfgrFiles(e){const n=await this._callServer("InitiateCfgrFiles",[e]);return Je("ConfiguratorClientInternals","initiateCfgrFiles","After initiate",{payload:e,result:n}),n!=null&&n.error&&Ln(n.error),(n==null?void 0:n.value)??{}}async completeCfgrFiles(e){const n=S(this,Qe).getNextRequestId(),r=await this._callServer("CompleteCfgrFiles",[e],{requestId:n});return Je("ConfiguratorClientInternals","completeCfgrFiles","After complete",{payload:e,result:r}),r!=null&&r.error&&Ln(r.error),(r==null?void 0:r.value)??{}}async deleteCfgrFile(e,n){const r=S(this,Qe).getNextRequestId(),i=await this._callServer("DeleteCfgrFile",[e,n],{requestId:r});Je("ConfiguratorClientInternals","deleteCfgrFile","After complete",{payload:{type:e,fileName:n},result:i}),i!=null&&i.error&&Ln(i.error)}async initiateCfgnFiles(e){const n=await this._callServer("InitiateCfgnFiles",[e]);return Je("ConfiguratorClientInternals","initiateCfgnFiles","After initiate",{payload:e,result:n}),(n==null?void 0:n.value)??{}}async completeCfgnFiles(e){const n=S(this,Qe).getNextRequestId(),r=[this._callServer("CompleteCfgnFiles",[e],{requestId:n}),S(this,wn).awaitCspdUpdateResponse(n)],[i]=await Promise.all(r);return Je("ConfiguratorClientInternals","completeCfgnFiles","After complete",{payload:e,result:i}),(i==null?void 0:i.value)??{}}async completeCfgnFileAndConvertToPdf(e,n,r){const i=S(this,Qe).getNextRequestId(),o=[this._callServer("CompleteCfgnFileAndConvertToPdf",[e,n,r],{requestId:i}),S(this,wn).awaitCspdUpdateResponse(i)],[s]=await Promise.all(o);return Je("ConfiguratorClientInternals","completeCfgnFiles","After complete",{payload:{fileName:e,sasUri:n,pdfOptions:r},result:s}),s}async shareConfiguration(e){const n=S(this,Qe).getNextRequestId(),r=await this._callServer("ShareConfiguration",[e],{requestId:n});return r==null?void 0:r.value}async checkoutConfiguration(e){const n=S(this,Qe).getNextRequestId(),r=await this._callServer("Checkout",[e],{requestId:n});return r==null?void 0:r.value}async assignAssetBundleToCfgrDraft(e,n,r,i){const o=[e,n,r,i],s=await this._callServer("AssignAssetBundleToCfgrDraft",o);s!=null&&s.error&&Ln(s.error)}async unassignAssetBundleFromCfgrDraft(e){const n=[e],r=await this._callServer("UnassignAssetBundleFromCfgrDraft",n);r!=null&&r.error&&Ln(r.error)}async requestCtrlFiberCspd(){const e=S(this,Qe).getNextRequestId();this._callServer("RequestCspd",[[{slot:cg.Fiber,cspdId:yr.Fiber,targetComponent:cr.CtrlFibers,parameters:void 0}]],{requestId:e}),await S(this,wn).awaitCspdUpdateResponse(e)}async releaseCtrlFiberCspd(){await this._callServer("ReleaseCspd",[cg.Fiber])}async requestCtrlFiberEditorCspd(e,n){const r=S(this,Qe).getNextRequestId(),i=am(e);this._callServer("RequestCspd",[[{slot:i,cspdId:yr.FiberEditor,targetComponent:`${cr.CtrlFibers}.${n}`,parameters:void 0}]],{requestId:r}),await S(this,wn).awaitCspdUpdateResponse(r)}async releaseCtrlFiberEditorCspd(e){const n=e.map(r=>am(r));await this._callServer("ReleaseCspd",n)}async createOrChangeCtrlFiber(e,n,r,i){const o=`${cr.CtrlFibers}.${e}`;await this._callServer("CreateOrChangeFiber",[o,n,r,i])}async deleteCtrlFiber(e,n){const r=`${cr.CtrlFibers}.${e}`;await this._callServer("DeleteFiber",[r,n])}async deleteCtrlFiberPack(e){const n=`${cr.CtrlFibers}.${e}`;await this._callServer("DeleteFiberPack",[n])}async moveCtrlFiberPack(e,n){const r=`${cr.CtrlFibers}.${e}`,i=`${cr.CtrlFibers}.${n}`;await this._callServer("MoveFiberPack",[r,i])}async copyCtrlFiberPack(e,n,r){const i=`${cr.CtrlFibers}.${e}`,o=`${cr.CtrlFibers}.${n}`;await this._callServer("CopyFiberPack",[i,o,r])}async publishCfgr(e,n,r,i){const o=await this._callServer("Publish",[e,n,r,i]);if(vu(o==null?void 0:o.error))return o.error}}Qe=new WeakMap,wn=new WeakMap,Ri=new WeakMap,yu=new WeakMap,Ai=new WeakMap,bu=new WeakSet,Ah=async function(t,e,n,r){let i=()=>{};const o=new Promise(s=>i=s);if(S(this,Ai).push({resolver:i,values:{name:t,value:e,zodType:r}}),await Sd(0),S(this,Ai).length){const s=S(this,Ai).map(m=>m.resolver),a=S(this,Ai).filter((m,d,h)=>h.findLastIndex(g=>g.values.name===m.values.name)<=d);Ae(this,Ai,[]);const c=a.map(({values:{name:m,value:d,zodType:h}})=>{const g=d!==void 0&&Rm(d)?G0(m,d,h):d;return{name:m,value:g}}),u=n==="change-preset-value",l=u?void 0:S(this,Qe).getNextRequestId(),f=u?"ChangePresetValue":"ChangeConfigurationValue";this._callServer(f,[c],{requestId:l,isChunkable:!0}),l&&await S(this,wn).awaitCspdUpdateResponse(l),s.forEach(m=>m())}return o},Mi=new WeakMap,zi=new WeakMap;var __=(t=>(t[t.Fedl=1]="Fedl",t[t.Css=2]="Css",t[t.JavaScript=3]="JavaScript",t[t.CustomCodePack=4]="CustomCodePack",t[t.Fedl2=5]="Fedl2",t))(__||{}),Mh,is,Ea;class Z1{constructor(){fe(this,Mh,600*1e3-60*1e3),fe(this,is),fe(this,Ea),Ae(this,Ea,new Cl)}onSessionLifeTimeReached(e){S(this,Ea).on("sessionLifeTimeReached",e)}restartSessionLifeTimer(){this.stopSessionLifeTimer(),Ae(this,is,window.setTimeout(()=>{S(this,Ea).emit("sessionLifeTimeReached")},S(this,Mh)))}stopSessionLifeTimer(){S(this,is)&&(window.clearTimeout(S(this,is)),Ae(this,is,void 0))}}Mh=new WeakMap,is=new WeakMap,Ea=new WeakMap;const Y1=I.z.enum(["edit","view"]),eE=t=>Y1.safeParse(t).success,tE="wss://portal.combeenation.com/signalR",nE={[N.Trace]:"Trace",[N.Debug]:"Debug",[N.Information]:"Information",[N.Warning]:"Warning",[N.Error]:"Error",[N.Critical]:"Critical",[N.None]:"None"},rE="userland",iE=I.z.enum(["theme","user",rE]),oE=I.z.object({lastEditedAt:I.z.number(),lastEditedBy:I.z.string(),size:I.z.number(),type:I.z.nativeEnum(__),url:I.z.string().url()}),sE=I.z.object({fedl:I.z.object({lastEditedAt:W0,lastEditedBy:I.z.string(),metadata:I.z.object({LayoutVersion:I.z.string()}),size:I.z.number(),url:I.z.string().url()}),customCode:I.z.record(I.z.string(),oE).optional(),css:I.z.record(iE,I.z.object({url:I.z.string().url()})).optional()}),aE=I.z.object({value:I.z.object({cfgrVersion:I.z.string(),draftName:I.z.string(),lastEditedAt:I.z.number(),lastEditedBy:I.z.string(),presetId:I.z.string(),published:I.z.object({isPublished:I.z.boolean(),version:I.z.string()}),files:sE})}),C_=I.z.object({value:I.z.object({cfgrVersion:I.z.string(),copyUrl:I.z.string(),editUrl:I.z.string(),newUrl:I.z.string()})}),cm=t=>C_.safeParse(t).success;var mr,en,zh,_l,tn,hs,Rs,Vt,Uh,w_,um,lm,_u;class cE{constructor(){fe(this,tn),fe(this,mr),fe(this,en),fe(this,zh,N.Warning),fe(this,_l,"not-initialized"),fe(this,Rs),fe(this,Vt),fe(this,Uh,0),lo(this,"getNextRequestId",()=>(++T0(this,Uh)._).toString()),Ae(this,mr,new Z1),S(this,mr).onSessionLifeTimeReached(()=>on(this,tn,w_).call(this)),Ae(this,en,new Cl)}get state(){return S(this,_l)}get isInitialized(){return this.state!=="not-initialized"}get connection(){return S(this,Vt)}onConnected(e){S(this,en).on("connectionEstablished",e)}onConnectionClosed(e){S(this,en).on("connectionClosed",e)}onCspdUpdate(e){S(this,en).on("cspdUpdate",e)}onCspdUpdateParts(e){S(this,en).on("cspdUpdateParts",e)}onConnectionRestored(e){S(this,en).on("connectionRestored",e)}async connectEditor(e){return await on(this,tn,_u).call(this,e)}async connectCfgr(e){return await on(this,tn,_u).call(this,e)}async restoreConnection(){if(!S(this,Rs)){Ye("ConnectionManager","restoreConnection","There's no previous connection to restore. Create a connection with `client.connectEditor()` or `client.connectCfgr()` first.");return}S(this,mr).stopSessionLifeTimer();const[e]=await vs(this.closeConnection());e&&Ye("ConnectionManager","restoreConnection","Error closing connection",e),await on(this,tn,_u).call(this,S(this,Rs))&&S(this,en).emit("connectionRestored")}async closeConnection(){var e;Ae(this,tn,"disconnecting",hs);try{await((e=S(this,Vt))==null?void 0:e.stop())}catch{}Ae(this,tn,"disconnected",hs)}extendSessionLifetime(){S(this,mr).restartSessionLifeTimer()}}mr=new WeakMap,en=new WeakMap,zh=new WeakMap,_l=new WeakMap,tn=new WeakSet,hs=function(t){Ae(this,_l,t),Je("ConnectionManager","",`State changed to "${t}"`)},Rs=new WeakMap,Vt=new WeakMap,Uh=new WeakMap,w_=function(){Je("ConnectionManager","#onSessionLifeTimeReached","Session lifetime reached"),this.closeConnection()},um=function(t,e){if(t<S(this,zh))return;const n=nE[t];Je("ConnectionManager","#onConnectionLog",`[SignalR ${n}] ${e}`,{logLevel:t},"yellow")},lm=function(t){t?Ye("ConnectionManager","#handleConnectionClosed","Connection closed with error",t):this.state!=="disconnecting"?Ye("ConnectionManager","#handleConnectionClosed","Connection closed unexpectedly"):Je("ConnectionManager","#handleConnectionClosed","Connection closed"),Ae(this,Vt,void 0),Ae(this,tn,"disconnected",hs),S(this,mr).stopSessionLifeTimer(),S(this,en).emit("connectionClosed")},_u=async function(t){if(Je("ConnectionManager","connect","Connecting to configurator"),this.isInitialized&&this.state!=="disconnected"){Ye("ConnectionManager","connect",`Cannot connect whilst in state "${this.state}"`);return}Ae(this,tn,"connecting",hs),Ae(this,Rs,t),S(this,mr).stopSessionLifeTimer();const e=t.serverUrl??tE;Ae(this,Vt,new w0().withUrl(e,{transport:ut.WebSockets,skipNegotiation:!0}).configureLogging({log:on(this,tn,um).bind(this)}).build()),S(this,Vt).onclose(g=>on(this,tn,lm).call(this,g)),S(this,Vt).on("cspdUpdate",g=>{S(this,en).emit("cspdUpdate",g)}),S(this,Vt).on("cspdUpdateParts",(g,p,v,_)=>S(this,en).emit("cspdUpdateParts",g,p,v,_));const[n]=await vs(S(this,Vt).start());if(n){Ye("ConnectionManager","connect","Connecting to configurator failed",n),await this.closeConnection();return}Je("ConnectionManager","connect","WS connection established");const r=eE(t.mode),i=r?["",t.companyName,t.configuratorName,t.draftName,t.mode,"000"]:[t.mode,t.companyName,t.configuratorName,...t.mode==="preview"?[t.draftName]:[],...t.editCfgn?[t.editCfgn.cfgnId,"edit",t.editCfgn.authToken]:[]],o=this.getNextRequestId(),s=window.innerWidth,a=window.innerHeight,c={cbnInitialWindowWidth:s.toString(),cbnInitialWindowHeight:a.toString()},u={width:s,height:a,userAgent:navigator.userAgent},l=void 0,[f,m]=await vs(r?S(this,Vt).invoke("StartProductEditor",i,o,c,l):S(this,Vt).invoke("StartConfiguration",i,o,c,l,u)),d=r?aE.safeParse(m):C_.safeParse(m);if(f||!d.success){const g=f??d.error;Ye("ConnectionManager","connect",f?"Error starting configuration":"Error parsing start response",{error:g,startCfgnResponse:m}),await this.closeConnection();return}const h=cm(d.data)?Am(d.data.value.editUrl):{cfgnId:"not-used-in-editor",authToken:"not-used-in-editor"};if(!h||!h.cfgnId||!h.authToken)throw new Error("Error parsing edit URL from start response");if(Je("ConnectionManager","connect","Connection to configurator established",{startCfgnResponseParsed:d}),Ae(this,tn,"connected",hs),S(this,mr).restartSessionLifeTimer(),S(this,en).emit("connectionEstablished"),cm(d.data)){const{cfgnId:g,authToken:p}=h;return S(this,Rs).editCfgn={cfgnId:g,authToken:p},{connection:S(this,Vt),...d.data.value,cfgnId:g,authToken:p}}else return{connection:S(this,Vt),...d.data.value}};const uE=I.z.object({Name:D0,ComponentInfo:I.z.object({$nam:I.z.string(),$typ:bm}).optional(),Group:I.z.object({$val:I.z.string()}).optional(),Value:I.z.object({$val:Cm,$inp:_m.optional(),$ipt:mm.optional(),$src:I.z.string().optional()}).optional(),Query:I.z.union([I.z.object({$val:I.z.union([I.z.literal("[DataSourceQuery]"),np]),$src:I.z.string()}),I.z.object({}).transform(()=>{})]).optional(),Archive:I.z.object({$val:I.z.boolean()}).optional()}),lE=I.z.record(p_,uE),fE=I.z.enum(["Value","Records"]),dE=I.z.object({Name:I.z.literal("ComponentList").or(I.z.literal("Configurator")),$val:I.z.record(I.z.string(),I.z.union([I.z.object({$typ:bm.optional(),$chg:I.z.array(fE).optional(),Value:I.z.any().optional(),Group:I.z.string().optional()}),I.z.string().array()]))}),hE=I.z.union([I.z.number(),I.z.array(I.z.number()),I.z.null()]),S_=I.z.lazy(()=>I.z.union([hE,I.z.record(S_)])),pE=I.z.record(Wl,I.z.union([I.z.number(),I.z.array(I.z.number()),I.z.null()])),k_=I.z.lazy(()=>I.z.union([pE,I.z.record(k_)])),gE=I.z.object({Name:I.z.literal("ConfiguratorInspector"),Errors:I.z.object({Cfgr:S_.optional(),Fibers:I.z.object({CtrlFibers:k_.optional()}).optional(),$val:I.z.array(I.z.object({Id:I.z.string(),Message:I.z.string(),route:I.z.any()}))})}),vE=I.z.object({number:I.z.number(),partialNumber:I.z.number().optional(),isPartial:I.z.boolean().optional(),request:I.z.string().optional(),west:dE.optional(),fiber:K1.optional(),inspector:gE.optional()}).passthrough().refine(t=>Object.keys(t).filter(b_).every(e=>y_(t[e]))),mE=t=>!isNaN(t.partialNumber??NaN);var mt,Fa,Cu,wu,os,xa,Su,Nh,$h,I_,Pa,Lh,dr,jh,Oh,Fh,ps,Wh,Kr,Vh,Hh,qh,Bh,Kh,Xh,ss;class yE{constructor(e,n){fe(this,$h),fe(this,mt),fe(this,Fa,!1),fe(this,Cu,{}),fe(this,wu,{}),fe(this,os),fe(this,xa,new Map),fe(this,Su,new Map),lo(this,"awaitCspdUpdateResponse",async r=>{const i=S(this,Su).get(r);if(i)return i;const o=new Promise(s=>S(this,xa).set(r,s));return S(this,Su).set(r,o),o}),fe(this,Nh,r=>{const i=S(this,xa).get(r);i&&(i(),S(this,xa).delete(r))}),fe(this,Pa,{}),fe(this,Lh,async(r,i,o,s)=>{Je("WsCspdUpdateHandler","#handleCspdUpdateParts","Received cspd update part",{msgId:r,partNr:i,totalParts:o,msgPart:s});const a=S(this,Pa)[r]??{messageParts:[],receivedPartsCnt:0,totalParts:o};if(a.receivedPartsCnt++,a.messageParts[i]=s,S(this,Pa)[r]=a,a.totalParts===a.receivedPartsCnt){delete S(this,Pa)[r];const c=a.messageParts.join("");Je("WsCspdUpdateHandler","#handleCspdUpdateParts","All cspd update parts received",{message:c}),S(this,ss).call(this,c)}}),fe(this,dr,{}),fe(this,jh,async r=>{Je("WsCspdUpdateHandler","#handleCspdUpdatePartial","",{data:r});const i=r.number;S(this,dr)[i]||(S(this,dr)[i]=[]),S(this,dr)[i][r.partialNumber]=r;const o=Object.values(S(this,dr)[i]).find(a=>!a.isPartial),s=S(this,dr)[i].filter(Boolean);if(o&&s.length===o.partialNumber+1&&s.every((a,c)=>a.partialNumber===c)){const a=Wn(...S(this,dr)[i]);delete a.partialNumber,delete a.isPartial,Je("WsCspdUpdateHandler","#handleCspdUpdatePartial","All partial parts received",{mergedData:a}),delete S(this,dr)[i],S(this,ss).call(this,a)}}),fe(this,Oh,2147483647),fe(this,Fh,-2147483648),fe(this,ps,0),fe(this,Wh,()=>{const r=S(this,ps);return S(this,Oh)===r?S(this,Fh):r+1}),fe(this,Kr,[]),fe(this,Vh,r=>{const[i,o]=Sl(r);if(i)return[i,null];const{error:s,data:a}=vE.safeParse(o);if(s)return[s,null];const c=(o&&typeof o=="object"?Object.entries(o):[]).reduce((m,[d,h])=>(j1(d)&&(m[d]=h),m),{}),{error:u,data:l}=lE.safeParse(c);if(u)return[u,null];const f={...a,...Object.keys(l).length&&{editorData:l}};return[null,{rawResponse:o,parsedResponse:f}]}),fe(this,Hh,r=>{const i=r.$del??[],o=Object.entries(r),{staleCmps:s,updatedCmps:a}=(o==null?void 0:o.reduce((c,[u,l])=>{if(kt(l))return c;const{$chg:f,$typ:m,Value:d,Group:h}=l;f&&c.staleCmps.push({name:u,changedCmpProperties:f});const g=Os(u);m&&(S(this,Cu)[g]=m);const p=S(this,Cu)[g],v=fg(p),_=P0.some(x=>v===x),P=f==null?void 0:f.includes("Value");if(!_&&!P){const[x,R]=Qc(()=>S(this,os).call(this,g,p,d));if(x){const H=x instanceof Error?x.message:"Unknown error",A={name:u,type:p,value:d,error:x};Ye("WsCspdUpdateHandler","#getCmpListDataFromCspdUpdate",`Failed to parse cmp value: ${H}`,A)}else c.updatedCmps.push({name:u,value:R,type:p,group:h})}return c},{staleCmps:[],updatedCmps:[]}))??{staleCmps:[],updatedCmps:[]};return{staleCmps:s,updatedCmps:a,deletedCmps:i}}),fe(this,qh,r=>Object.entries(r).map(([i,o])=>{const s=O1(i),{$typ:a}=o.ComponentInfo??{},{$inp:c,$ipt:u,$src:l,$val:f}=o.Value??{},{$src:m}=o.Query??{};a&&(S(this,wu)[s]=a);const d=S(this,wu)[s],h=lg(f)?f:void 0,[g,p]=h?[void 0,void 0]:Qc(()=>S(this,os).call(this,s,d,f));if(g){const O=g instanceof Error?g.message:"Unknown error",j={cmpId:s,cmpType:d,value:f};Ye("WsCspdUpdateHandler","#getCmpEditorDataFromCspdUpdate",`Failed to parse cmp editor value: ${O}`,j)}const v=fg(d),_=Pm(d),P=u||d&&F1(d),x=`${v}<${P}>`,[R,H]=Qc(()=>S(this,os).call(this,s,x,c));if(R){const O=R instanceof Error?R.message:"Unknown error",j={cmpId:s,cmpType:d,value:c};Ye("WsCspdUpdateHandler","#getCmpEditorDataFromCspdUpdate",`Failed to parse cmp editor input value: ${O}`,j)}const A=l??m??"",k=br(H)||kt(H)?JSON.stringify(H):H;return{cmpId:s,value:p,error:h,input:k,inputType:P,source:A,type:_,baseType:v}})??[]),fe(this,Bh,r=>{const i=mu(r.$val),o=r.$typ?mu(r.$typ):[];return{updatedFibers:i.reduce((s,{ctrlId:a,values:c})=>(s[a]=Object.entries(c).map(([u,l])=>{var f;const m=u,d=(f=o.find(g=>g.ctrlId===a))==null?void 0:f.values[m],h=lg(l)?l:void 0;return{propertyName:m,type:d,value:h?void 0:l,error:h}}),s),{})}}),fe(this,Kh,r=>r.map(i=>{const o=H1(i.Pack),s=Object.entries(i.Fibers).map(([a,c])=>({propertyName:a,type:c.$typ,hiveRule:c.$src}));return{ctrlId:o,fibers:s}})),fe(this,Xh,r=>{var i;const o=v=>{if(typeof v=="number"||kt(v)||v===null)return v;const _=Object.keys(v).filter(x=>x!=="$err")[0],P=v[_];return o(P)},s={cmpsWithSourceErrors:[],cmpsWithCascadingErrors:[],cmpsWithResolvedErrors:[]},a=r.Errors.Cfgr,{cmpsWithSourceErrors:c,cmpsWithCascadingErrors:u,cmpsWithResolvedErrors:l}=a?Object.entries(a).reduce((v,[_,P])=>{const x=o(P);return typeof x=="number"?v.cmpsWithSourceErrors.push(_):kt(x)?v.cmpsWithCascadingErrors.push(_):x===null&&v.cmpsWithResolvedErrors.push(_),v},s):s,f={ctrlFibersWithSourceErrors:[],ctrlFibersWithCascadingErrors:[],ctrlFibersWithResolvedErrors:[]},m=(i=r.Errors.Fibers)==null?void 0:i.CtrlFibers,d=m&&mu(m),{ctrlFibersWithSourceErrors:h,ctrlFibersWithCascadingErrors:g,ctrlFibersWithResolvedErrors:p}=d?d.reduce((v,{ctrlId:_,values:P})=>(Object.entries(P).forEach(([x,R])=>{const H=x;typeof R=="number"?v.ctrlFibersWithSourceErrors.push({ctrlId:_,fiberName:H}):kt(R)?v.ctrlFibersWithCascadingErrors.push({ctrlId:_,fiberName:H}):R===null&&v.ctrlFibersWithResolvedErrors.push({ctrlId:_,fiberName:H})}),v),f):f;return{cmpsWithSourceErrors:c,cmpsWithCascadingErrors:u,cmpsWithResolvedErrors:l,ctrlFibersWithSourceErrors:h,ctrlFibersWithCascadingErrors:g,ctrlFibersWithResolvedErrors:p}}),fe(this,ss,r=>{var i;const[o,s]=Ar(r)?S(this,Vh).call(this,r):[null,{parsedResponse:r,rawResponse:r}];if(o){Ye("WsCspdUpdateHandler","#handleCspdUpdate","Failed to parse cspd update",{error:o,errorMsg:o.message,rawResponse:r});return}const{parsedResponse:a,rawResponse:c}=s;if(mE(a)){S(this,jh).call(this,a);return}const u=S(this,ps);if(a.number!==u){S(this,Kr).push(a),Je("WsCspdUpdateHandler","#handleCspdUpdate",`Waiting for msg number ${u}, received ${a.number}. Saving data for later processing.`,{rawResponse:c,parsedResponse:a,queue:S(this,Kr)});return}Je("WsCspdUpdateHandler",`#handleCspdUpdate, ID ${a.request}`,"",{rawResponse:c,parsedResponse:a});const l=!S(this,Fa);Ae(this,Fa,!0);const f=S(this,Wh).call(this);Ae(this,ps,f);const m=(i=a.west)==null?void 0:i.$val,{staleCmps:d,updatedCmps:h,deletedCmps:g}=m?S(this,Hh).call(this,m):{staleCmps:[],updatedCmps:[],deletedCmps:[]};S(this,mt).emit("cmpListCspdUpdateProcessed",{isFirstCspdUpdate:l,staleCmps:d,updatedCmps:h,deletedCmps:g});const p=a.editorData,v=p?S(this,qh).call(this,p):[];v.length&&S(this,mt).emit("cmpEditorCspdUpdateProcessed",v);const _=a.fiber,P=_&&S(this,Bh).call(this,_);P&&S(this,mt).emit("ctrlFiberCspdUpdateProcessed",P);const x=Object.entries(a).map(([O,j])=>b_(O)&&y_(j)?j:void 0).filter(O=>O!==void 0),R=x&&S(this,Kh).call(this,x);R&&S(this,mt).emit("ctrlFiberEditorCspdUpdateProcessed",R);const H=a.inspector,A=H&&S(this,Xh).call(this,H);A&&S(this,mt).emit("inspectorCspdUpdateProcessed",A),a.request&&S(this,Nh).call(this,a.request);const k=S(this,Kr).findIndex(O=>O.number===f);if(k>=0){const O=S(this,Kr)[k];S(this,Kr).splice(k,1),S(this,ss).call(this,O)}}),Ae(this,mt,new Cl),Ae(this,os,n),e.onCspdUpdate(r=>S(this,ss).call(this,r)),e.onCspdUpdateParts((...r)=>S(this,Lh).call(this,...r)),e.onConnectionClosed(()=>on(this,$h,I_).call(this))}onCmpListCspdUpdateProcessed(e){return S(this,mt).on("cmpListCspdUpdateProcessed",e),{unsubscribe:()=>S(this,mt).off("cmpListCspdUpdateProcessed",e)}}onCmpEditorCspdUpdateProcessed(e,n){const r=i=>{const o=i.find(s=>s.cmpId===e);o&&n(o)};return S(this,mt).on("cmpEditorCspdUpdateProcessed",r),{unsubscribe:()=>S(this,mt).off("cmpEditorCspdUpdateProcessed",r)}}onCtrlFiberCspdUpdateProcessed(e){return S(this,mt).on("ctrlFiberCspdUpdateProcessed",e),{unsubscribe:()=>S(this,mt).off("ctrlFiberCspdUpdateProcessed",e)}}onCtrlFiberEditorCspdUpdateProcessed(e,n){const r=i=>{const o=i.find(s=>s.ctrlId===e);o&&n(o)};return S(this,mt).on("ctrlFiberEditorCspdUpdateProcessed",r),{unsubscribe:()=>S(this,mt).off("ctrlFiberEditorCspdUpdateProcessed",r)}}onInspectorCspdUpdateProcessed(e){return S(this,mt).on("inspectorCspdUpdateProcessed",e),{unsubscribe:()=>S(this,mt).off("inspectorCspdUpdateProcessed",e)}}}mt=new WeakMap,Fa=new WeakMap,Cu=new WeakMap,wu=new WeakMap,os=new WeakMap,xa=new WeakMap,Su=new WeakMap,Nh=new WeakMap,$h=new WeakSet,I_=function(){Ae(this,Fa,!1),Ae(this,ps,0),Ae(this,Kr,[])},Pa=new WeakMap,Lh=new WeakMap,dr=new WeakMap,jh=new WeakMap,Oh=new WeakMap,Fh=new WeakMap,ps=new WeakMap,Wh=new WeakMap,Kr=new WeakMap,Vh=new WeakMap,Hh=new WeakMap,qh=new WeakMap,Bh=new WeakMap,Kh=new WeakMap,Xh=new WeakMap,ss=new WeakMap;var qr,Xr,Da,Ra,In,Jh,Aa,Gh,T_;class bE{constructor(){fe(this,Aa),fe(this,qr),fe(this,Xr),fe(this,Da),fe(this,Ra),fe(this,In),fe(this,Jh,async()=>{await S(this,In).resubscribeToCmpUpdates()});var e,n;const r=(n=(e=window.Cbn)==null?void 0:e.getCustomCodeSdkBridge)==null?void 0:n.call(e,"v1"),{connectionMgr:i,cspdUpdateHandler:o,cfgrClientInternals:s}=(r==null?void 0:r.getSharedCfgrClientCore())??{};Ae(this,qr,i??new cE),S(this,qr).onConnectionClosed(()=>S(this,In).markAllCmpPropertiesAsStale()),S(this,qr).onConnectionRestored(()=>S(this,Jh).call(this)),Ae(this,Xr,new Cl),Ae(this,In,new tC),Ae(this,Da,o??new yE(S(this,qr),eC)),S(this,Da).onCmpListCspdUpdateProcessed(a=>on(this,Aa,T_).call(this,a)),Ae(this,Ra,s??new Q1(S(this,qr),S(this,Da))),hm(this,S(this,Ra))}onNewCfgnIdCreated(e){S(this,Xr).on("newCfgnIdCreated",e)}async connect(e){const n=window.location.href,r=rC(n)?Am(n):void 0,i=r?{serverUrl:e.serverUrl,mode:e.mode,companyName:r.companyName,configuratorName:r.planName,draftName:r.planVersion,...(r==null?void 0:r.cfgnId)&&(r==null?void 0:r.authToken)&&{editCfgn:{cfgnId:r.cfgnId,authToken:r.authToken}}}:e,o=await S(this,qr).connectCfgr(i);if(o&&(S(this,Xr).emit("newCfgnIdCreated",o.cfgnId,o.authToken),r)){const s=o.editUrl+window.location.search;window.history.replaceState({},"",s)}}async getCmpValue(e){return await S(this,In).getCmpValue(e)}async onCmpValueChanged(e,n,r,i=!1){await S(this,In).subscribeToCmpUpdates(e,"Value"),S(this,Xr).on("cmpsUpdated",o=>{o.find(s=>s===e)&&on(this,Aa,Gh).call(this,e,n,r)}),i&&on(this,Aa,Gh).call(this,e,n,r)}async onAnyCmpValueChanged(e,n,r=!1){n.length||Ye("ConfiguratorClient","onAnyCmpValueChanged","Please define at least one component!");const i=n.map(s=>S(this,In).subscribeToCmpUpdates(s.name,"Value",r));await Promise.all(i);const o=n.map(s=>s.name);S(this,Xr).on("cmpsUpdated",s=>{if(s.some(a=>o.includes(a))){const a=o.reduce((c,u)=>(c[u]=s.includes(u),c),{});e(a)}})}async setCmpInputs(e){const n=e.map(o=>({...o,cmp:wm(o.name)})),r=n.filter(o=>!hg(o.cmp));if(r.length){Ye("ConfiguratorClient","setCmpInputs","The following components have not been registered with the `ConfiguratorClient` or are not supported by `setCmpInputs`. They will be ignored:",r);return}const i=n.filter(o=>hg(o.cmp)).map(o=>{const{zodType:s}=o.cmp,a=Os(o.name);return S(this,Ra).setCmpInput(a,o.value,s)});await Promise.all(i)}}qr=new WeakMap,Xr=new WeakMap,Da=new WeakMap,Ra=new WeakMap,In=new WeakMap,Jh=new WeakMap,Aa=new WeakSet,Gh=async function(t,e,n){const r=await S(this,In).getCmpValue(t);(typeof n!="function"||await n(r))&&e(r)},T_=function(t){const{isFirstCspdUpdate:e,staleCmps:n,updatedCmps:r}=t;if(n.forEach(({name:i,changedCmpProperties:o})=>{S(this,In).markCmpPropertiesAsStale(i,o)}),r.forEach(({name:i,value:o})=>{S(this,In).updateCmp(i,o,e)}),r.length){const i=r.map(o=>o.name);S(this,Xr).emit("cmpsUpdated",i)}},lo(bE,"version",E0);const _E="v1";console.log(`Loading custom code SDK v${dm}`);var Jc,fm;const Cd=(fm=(Jc=window.Cbn)==null?void 0:Jc.getCustomCodeSdkBridge)==null?void 0:fm.call(Jc,"v1"),Qh=Cd==null?void 0:Cd.createCfgrClient(_E,hm);if(!Qh)throw new Error("Cannot create Configurator Client. Make sure to only use the `custom-code-sdk` inside a Combeenation Configurator.");const CE=Qh.onAnyCmpValueChanged.bind(Qh);exports.Button=R_;exports.Checkbox=A_;exports.Collapsible=M_;exports.CustomControl=z_;exports.Dataview=U_;exports.Input=N_;exports.Panel=$_;exports.Text=L_;exports.ValueComponent=rp;exports.onAnyCmpValueChanged=CE;exports.version=dm;
|