@combeenation/custom-code-sdk 0.0.1-alpha1 โ 0.0.1-alpha11
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 +1 -14
- package/dist/bundle.es.js +496 -16949
- package/dist/index.d.ts +904 -31
- package/package.json +3 -3
- package/dist/tsconfig.tsbuildinfo +0 -1
package/dist/bundle.cjs.js
CHANGED
|
@@ -1,14 +1 @@
|
|
|
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 tf(n,e||[])}/*!
|
|
3
|
-
* NevWare21 Solutions LLC - ts-async, 0.5.5
|
|
4
|
-
* https://github.com/nevware21/ts-async
|
|
5
|
-
* Copyright (c) NevWare21 Solutions LLC and contributors. All rights reserved.
|
|
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 ck(t){for(var e=[],n=t[Ta](`
|
|
9
|
-
`),r=0;r<n[_e];r++){var i=n[r];n[r+1]&&(i+="@"+n[r+1],r++),e.push(i)}return{src:t,obj:e}}function i_(t){var e=null;if(t)try{if(t[fn])e=hi(t[fn]);else if(t[ga]&&t[ga][fn])e=hi(t[ga][fn]);else if(t.exception&&t.exception[fn])e=hi(t.exception[fn]);else if(gv(t))e=t;else if(gv(t[Jd]))e=t[Jd];else if(an()&&an().opera&&t[Gd])e=ck(t[lc]);else if(t.reason&&t.reason[fn])e=hi(t.reason[fn]);else if(de(t))e=hi(t);else{var n=t[Gd]||t[n_]||"";de(t[hv])&&(n&&(n+=`
|
|
10
|
-
`),n+=" from "+t[hv]),n&&(e=hi(n))}}catch(r){e=hi(r)}return e||{src:"",obj:null}}function uk(t){var e="";return t&&(t.obj?e=t.obj.join(`
|
|
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},a.createNew=function(s,c,u){var l=r.slice(0);s=s||e,c=c||{};var f=u?new R_(s,c):new Op(s,c);return ee(l,function(m){f[Qi](m)}),f}})}return t.__ieDyn=1,t})(),Op=(function(t){tr(e,t);function e(n,r){var i=t.call(this,n,r)||this;return He(e,i,function(o,a){o[il]=function(s){a[_a]()},o[Ps]=function(s){}}),i}return e.__ieDyn=1,e})(D_),rT=["AI_buffer","AI_sentBuffer"],R_=(function(t){tr(e,t);function e(r,i){var o=t.call(this,r,i)||this,a=!1,s=i==null?void 0:i.namePrefix,c=i[Wp]||{getItem:Xd,setItem:Yy},u=c.getItem,l=c.setItem,f=i.maxRetryCnt;return He(e,o,function(m,d){var h=x(e[Ja]),g=x(e[Ur]),p=A(),v=g[Oo](p),b=m._set(h[Oo](v));b[xe]>e[Ga]&&(b[xe]=e[Ga]),q(e[Ur],[]),q(e[Ja],b),m[Qi]=function(W){if(m[Zi]()>=e[Ga]){a||(G(r,2,67,"Maximum buffer size reached: "+m[Zi](),!0),a=!0);return}W.cnt=W.cnt||0,!(!B(f)&&W.cnt>f)&&(d[Qi](W),q(e[Ja],m._get()))},m[_a]=function(){d[_a](),q(e[Ja],m._get()),q(e[Ur],[]),a=!1},m[il]=function(W){q(e[Ja],m._set(P(W,m._get())));var j=x(e[Ur]);j instanceof Array&&W instanceof Array&&(j=j[Oo](W),j[xe]>e[Ga]&&(G(r,1,67,"Sent buffer reached its maximum size: "+j[xe],!0),j[xe]=e[Ga]),q(e[Ur],j))},m[Ps]=function(W){var j=x(e[Ur]);j=P(W,j),q(e[Ur],j)},m.createNew=function(W,j,K){K=!!K;var re=m._get().slice(0),ae=x(e[Ur]).slice(0);W=W||r,j=j||{},m[_a]();var _=K?new e(W,j):new Op(W,j);return ee(re,function(E){_[Qi](E)}),K&&_[il](ae),_};function P(W,j){var K=[],re=[];return ee(W,function(ae){re[wr](ae.item)}),ee(j,function(ae){!pe(ae)&&Dt(re,ae.item)===-1&&K[wr](ae)}),K}function x(W){var j=W;return j=s?s+"_"+j:j,R(j)}function R(W){try{var j=u(r,W);if(j){var K=Dn().parse(j);if(de(K)&&(K=Dn().parse(K)),K&&we(K))return K}}catch(re){G(r,1,42," storage key: "+W+", "+Ne(re),{exception:te(re)})}return[]}function q(W,j){var K=W;try{K=s?s+"_"+K:K;var re=JSON[ec](j);l(r,K,re)}catch(ae){l(r,K,JSON[ec]([])),G(r,2,41," storage key: "+K+", "+Ne(ae)+". Buffer cleared",{exception:te(ae)})}}function A(){var W=[];try{return ee(rT,function(j){var K=I(j);if(W=W[Oo](K),s){var re=s+"_"+j,ae=I(re);W=W[Oo](ae)}}),W}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 I(W){try{var j=R(W),K=[];return ee(j,function(re){var ae={item:re,cnt:0};K[wr](ae)}),e_(r,W),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})(D_),iT=(function(){function t(e){He(t,this,function(n){n.serialize=function(a){var s=r(a,"root");try{return Dn()[ec](s)}catch(c){G(e,1,48,c&&pe(c[Ci])?c[Ci]():"Error serializing object",null,!0)}};function r(a,s){var c="__aiCircularRefCheck",u={};if(!a)return G(e,1,48,"cannot serialize object because it is null or undefined",{name:s},!0),u;if(a[c])return G(e,2,50,"Circular reference detected while serializing object",{name:s},!0),u;if(!a.aiDataContract){if(s==="measurements")u=o(a,"number",s);else if(s==="properties")u=o(a,"string",s);else if(s==="tags")u=o(a,"string",s);else if(we(a))u=i(a,s);else{G(e,2,49,"Attempting to serialize an object which does not implement ISerializable",{name:s},!0);try{Dn()[ec](a),u=a}catch(l){G(e,1,48,l&&pe(l[Ci])?l[Ci]():"Error serializing object",null,!0)}}return u}return a[c]=!0,Pe(a.aiDataContract,function(l,f){var m=pe(f)?f()&1:f&1,d=pe(f)?f()&4:f&4,h=f&2,g=a[l]!==void 0,p=Bt(a[l])&&a[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:s});else if(!d){var v=void 0;p?h?v=i(a[l],l):v=r(a[l],l):v=a[l],v!==void 0&&(u[l]=v)}}),delete a[c],u}function i(a,s){var c;if(a)if(!we(a))G(e,1,54,`This field was specified as an array in the contract but the item is not an array.\r
|
|
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;
|
|
1
|
+
"use strict";var Ae=Object.defineProperty;var K=e=>{throw TypeError(e)};var Ve=(e,n,t)=>n in e?Ae(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t;var d=(e,n,t)=>Ve(e,typeof n!="symbol"?n+"":n,t),G=(e,n,t)=>n.has(e)||K("Cannot "+t);var i=(e,n,t)=>(G(e,n,"read from private field"),t?t.call(e):n.get(e)),a=(e,n,t)=>n.has(e)?K("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(e):n.set(e,t),u=(e,n,t,s)=>(G(e,n,"write to private field"),s?s.call(e,t):n.set(e,t),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("zod"),N="0.0.1-alpha11";var F,g;class ke{constructor(n){d(this,"id");a(this,F,"v1");a(this,g);var s,o;this.id=n;const t=(o=(s=window.Cbn)==null?void 0:s.getCustomCodeSdkBridge)==null?void 0:o.call(s,i(this,F));if(u(this,g,t==null?void 0:t.getButtonSdkBridge(this.id)),!i(this,g))throw new Error(`Cannot access API for Button "${this.id}".`)}onRendered(n){var t;return((t=i(this,g))==null?void 0:t.addOnRenderedCallback(n))??{unsubscribe:()=>{}}}onClick(n){var t;return((t=i(this,g))==null?void 0:t.addOnClickCallback(n))??{unsubscribe:()=>{}}}async setVisible(n){var t;await((t=i(this,g))==null?void 0:t.setVisible(n))}setText(n){var t;(t=i(this,g))==null||t.setText(n)}}F=new WeakMap,g=new WeakMap;var T,p;class Pe{constructor(n){d(this,"id");a(this,T,"v1");a(this,p);var s,o;this.id=n;const t=(o=(s=window.Cbn)==null?void 0:s.getCustomCodeSdkBridge)==null?void 0:o.call(s,i(this,T));if(u(this,p,t==null?void 0:t.getCheckboxSdkBridge(this.id)),!i(this,p))throw new Error(`Cannot access API for Checkbox "${this.id}".`)}onRendered(n){var t;return((t=i(this,p))==null?void 0:t.addOnRenderedCallback(n))??{unsubscribe:()=>{}}}async setVisible(n){var t;await((t=i(this,p))==null?void 0:t.setVisible(n))}}T=new WeakMap,p=new WeakMap;var O,b;class Ie{constructor(n){d(this,"id");a(this,O,"v1");a(this,b);var s,o;this.id=n;const t=(o=(s=window.Cbn)==null?void 0:s.getCustomCodeSdkBridge)==null?void 0:o.call(s,i(this,O));if(u(this,b,t==null?void 0:t.getCollapsibleSdkBridge(this.id)),!i(this,b))throw new Error(`Cannot access API for Collapsible "${this.id}".`)}onRendered(n){var t;return((t=i(this,b))==null?void 0:t.addOnRenderedCallback(n))??{unsubscribe:()=>{}}}async setVisible(n){var t;await((t=i(this,b))==null?void 0:t.setVisible(n))}}O=new WeakMap,b=new WeakMap;var $,c;class ye{constructor(n){d(this,"id");a(this,$,"v1");a(this,c);var s,o;this.id=n;const t=(o=(s=window.Cbn)==null?void 0:s.getCustomCodeSdkBridge)==null?void 0:o.call(s,i(this,$));if(u(this,c,t==null?void 0:t.getCustomCtrlSdkBridge(this.id)),!i(this,c))throw new Error(`Cannot access API for Custom Control "${this.id}".`)}set renderFn(n){var t;(t=i(this,c))==null||t.setRenderFn(n)}async render(n){var t;typeof n=="function"&&(this.renderFn=n),await((t=i(this,c))==null?void 0:t.render())}onRendered(n){var t;return((t=i(this,c))==null?void 0:t.addOnRenderedCallback(n))??{unsubscribe:()=>{}}}getElement(){var t;return(t=i(this,c))==null?void 0:t.getElement()}async setVisible(n){var t;await((t=i(this,c))==null?void 0:t.setVisible(n))}}$=new WeakMap,c=new WeakMap;var x,m;class Ee{constructor(n){d(this,"id");a(this,x,"v1");a(this,m);var s,o;this.id=n;const t=(o=(s=window.Cbn)==null?void 0:s.getCustomCodeSdkBridge)==null?void 0:o.call(s,i(this,x));if(u(this,m,t==null?void 0:t.getDataviewSdkBridge(this.id)),!i(this,m))throw new Error(`Cannot access API for Dataview "${this.id}".`)}onRendered(n){var t;return((t=i(this,m))==null?void 0:t.addOnRenderedCallback(n))??{unsubscribe:()=>{}}}async setVisible(n){var t;await((t=i(this,m))==null?void 0:t.setVisible(n))}}x=new WeakMap,m=new WeakMap;var M,f;class Be{constructor(n){d(this,"id");a(this,M,"v1");a(this,f);var s,o;this.id=n;const t=(o=(s=window.Cbn)==null?void 0:s.getCustomCodeSdkBridge)==null?void 0:o.call(s,i(this,M));if(u(this,f,t==null?void 0:t.getInputSdkBridge(this.id)),!i(this,f))throw new Error(`Cannot access API for Input "${this.id}".`)}onRendered(n){var t;return((t=i(this,f))==null?void 0:t.addOnRenderedCallback(n))??{unsubscribe:()=>{}}}async setVisible(n){var t;await((t=i(this,f))==null?void 0:t.setVisible(n))}}M=new WeakMap,f=new WeakMap;var L,w;class Se{constructor(n){d(this,"id");a(this,L,"v1");a(this,w);var s,o;this.id=n;const t=(o=(s=window.Cbn)==null?void 0:s.getCustomCodeSdkBridge)==null?void 0:o.call(s,i(this,L));if(u(this,w,t==null?void 0:t.getPanelSdkBridge(this.id)),!i(this,w))throw new Error(`Cannot access API for Panel "${this.id}".`)}onRendered(n){var t;return((t=i(this,w))==null?void 0:t.addOnRenderedCallback(n))??{unsubscribe:()=>{}}}async setVisible(n){var t;await((t=i(this,w))==null?void 0:t.setVisible(n))}}L=new WeakMap,w=new WeakMap;var _,l;class ve{constructor(n){d(this,"id");a(this,_,"v1");a(this,l);var s,o;this.id=n;const t=(o=(s=window.Cbn)==null?void 0:s.getCustomCodeSdkBridge)==null?void 0:o.call(s,i(this,_));if(u(this,l,t==null?void 0:t.getTextSdkBridge(this.id)),!i(this,l))throw new Error(`Cannot access API for Text "${this.id}".`)}onRendered(n){var t;return((t=i(this,l))==null?void 0:t.addOnRenderedCallback(n))??{unsubscribe:()=>{}}}async setVisible(n){var t;await((t=i(this,l))==null?void 0:t.setVisible(n))}setText(n){var t;(t=i(this,l))==null||t.setText(n)}}_=new WeakMap,l=new WeakMap;const X=1,R=[];function Re(e,n){if(R.length>=X)throw new Error(`Only ${X} \`ConfiguratorClient\` can be created at a time.`);R.push({client:e,internals:n})}function q(){const e=R[0];if(!e)throw new Error("Operation not possible as no `ConfiguratorClient` has been registered yet.");return e.client}function ze(){const e=R[0];if(!e)throw new Error("Operation not possible as no `ConfiguratorClient` has been registered yet.");return e.internals}const Fe="v1";var v,J;const B=(J=(v=window.Cbn)==null?void 0:v.getCustomCodeSdkBridge)==null?void 0:J.call(v,"v1");if(!B)throw new Error("Cannot access Configurator SDK bridge. Make sure to only use the `custom-code-sdk` inside a Combeenation Configurator.");const H=B.createCfgrClient(Fe,Re);if(!H)throw new Error("Cannot create Configurator Client. Make sure to only use the `custom-code-sdk` inside a Combeenation Configurator.");const A=B.getParentPageUtilsSdkBridge(),V=B.getCfgrUtilsSdkBridge(),Te=B.getViewer3dSdkBridge(),z=H;var Z=(e=>(e[e.Any=1]="Any",e[e.Image=2]="Image",e))(Z||{}),h=(e=>(e[e.PdfAsset=0]="PdfAsset",e[e.Asset=1]="Asset",e[e.Merge=2]="Merge",e[e.Watermark=3]="Watermark",e[e.OutputToCfgnFile=4]="OutputToCfgnFile",e))(h||{}),W=(e=>(e[e.Left=0]="Left",e[e.Center=1]="Center",e[e.Right=2]="Right",e))(W||{}),ee=(e=>(e[e.Top=0]="Top",e[e.Center=1]="Center",e[e.Bottom=2]="Bottom",e))(ee||{}),j=(e=>(e[e.PdfAsset=h.PdfAsset]="PdfAsset",e[e.Asset=h.Asset]="Asset",e))(j||{});const te=e=>V.uploadCfgnFiles(e,Z.Image),ne=e=>V.uploadCfgnFiles(e,Z.Any),se=e=>V.convertDocument(e);async function ie(e,n,t,s){const o=n.length>1,k="MergeTask",P="Task_",I=n.map((C,D)=>C.type===j.PdfAsset?{type:h.PdfAsset,name:`${P}${D}`,bundleAliasName:e,assetPath:C.assetPath,context:C.context}:{type:h.Asset,name:`${P}${D}`,bundleAliasName:e,assetPath:C.assetPath});return o&&I.push({type:h.Merge,name:k,inputTaskNames:I.map(C=>C.name)}),I.push({type:h.OutputToCfgnFile,inputTaskName:o?k:I[0].name,name:"OutputPdfTask",cfgnFileExtension:"pdf",cfgnFileName:t,cfgnFileDisplayName:s}),V.convertDocument(I)}const U={Text:"Text",Number:"Number",Logic:"Logic"},y={ValueComponent:"ValueComponent",TableComponent:"TableComponent",RecordComponent:"RecordComponent",ResourceComponent:"ResourceComponent",GraphicComponent:"GraphicComponent",CheckoutComponent:"CheckoutComponent"},E={ValueEditor:"ValueEditor",TableEditor:"TableEditor",Fiber:"Fiber",FiberEditor:"FiberEditor",CfgrField:"CfgrField"};r.z.enum([E.ValueEditor,E.TableEditor,E.Fiber,E.FiberEditor,E.CfgrField]);r.z.union([r.z.string(),r.z.number(),r.z.boolean()]);const S=e=>typeof e=="string";r.z.string();r.z.enum([U.Text,U.Number,U.Logic]);r.z.string();r.z.custom(e=>S(e)&&e.toLowerCase()===e);const oe=e=>(e==null?void 0:e.toLowerCase())??"";r.z.string();const Oe=r.z.custom(e=>S(e)?new RegExp(`^${y.ValueComponent}<.*>$`).test(e):!1),$e=r.z.custom(e=>S(e)?new RegExp(`^${y.RecordComponent}<.*>$`).test(e):!1),xe=r.z.custom(e=>S(e)?new RegExp(`^${y.ResourceComponent}<.*>$`).test(e):!1),Me=r.z.custom(e=>S(e)?new RegExp(`^${y.TableComponent}<.*>$`).test(e):!1);r.z.union([Oe,Me,$e,xe,r.z.literal(y.GraphicComponent),r.z.literal(y.CheckoutComponent)]);const Q=r.z.union([r.z.string(),r.z.number(),r.z.boolean()]),Le=r.z.union([Q,r.z.array(Q),r.z.object({}),r.z.unknown()]),_e=r.z.object({$typ:r.z.literal("Error"),Id:r.z.string(),Message:r.z.string(),route:r.z.unknown().optional()});_e.or(Le);const Y=new Map;function Ue(e){const n=oe(e.name);Y.has(n)||Y.set(n,e)}class Ne{constructor(n,t){d(this,"name");d(this,"zodType");this.name=n,this.zodType=t,Ue(this)}async getValue(){return await q().getCmpValue(this.name)}async setInput(n){const t=oe(this.name);await ze().setCmpInput(t,n,this.zodType)}onValueChanged(n,t=!1,s){q().onCmpValueChanged(this.name,n,s,t)}}const re=()=>V.getAssetPaths();var ae=(e=>(e[e.Facebook=0]="Facebook",e[e.Pinterest=1]="Pinterest",e[e.Twitter=2]="Twitter",e[e.LinkedIn=3]="LinkedIn",e[e.WhatsApp=4]="WhatsApp",e[e.Custom=5]="Custom",e[e.NativeShare=6]="NativeShare",e))(ae||{});const Ze="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8/x8AAwMCAO+X2ZkAAAAASUVORK5CYII=",de=z.onAnyCmpValueChanged.bind(z),ce=async e=>{if(await z.finishConfiguration(e==null?void 0:e.input),e.sendDataToParentPage){const n=e.transformParentPageData();await A.sendConfigurationFinished(n)}},ue=async e=>{const n=ae[e.platform],t=e.imageUrl??Ze,s={...e,platform:n,imageUrl:t},o=await z.shareConfiguration(s);await V.openShareWindow(e.platform,o);const{shareUrl:k,shareConfigurationId:P}=o;return{shareUrl:k,shareConfigurationId:P}},ge=()=>A.isInIFrame(),Ce=e=>A.setIFrameSize(e),le=e=>V.navigateToLogin(e),he=async e=>{const{promise:n,resolve:t}=Promise.withResolvers(),s={};for(const[o,k]of Object.entries(e))k.onValueChanged(P=>{s[o]=P,Object.keys(e).every(C=>C in s)&&t(s)},!0);return n},pe=(e,n)=>A.sendCustomMsg(e,n),be=e=>A.redirectParentPage(e),me=()=>A.getParentPageUrl(),fe=(e,n)=>A.fireAnalyticsEvent(e,n),we=async(e,n)=>Te.createArPage(e,n),je=Object.freeze(Object.defineProperty({__proto__:null,configuratorIsInIFrame:ge,convertDocument:se,createArPage:we,createPdfFromAssets:ie,createSyncCmpValuesStore:he,finishConfiguration:ce,fireAnalyticsEvent:fe,getAssetPaths:re,getParentPageUrl:me,navigateToLogin:le,onAnyCmpValueChanged:de,redirectParentPage:be,sendCustomMsgToParentPage:pe,setConfiguratorIFrameSize:Ce,shareConfiguration:ue,uploadFiles:ne,uploadImages:te,version:N},Symbol.toStringTag,{value:"Module"}));console.log(`Loading custom code SDK v${N}`);exports.Button=ke;exports.CbnSdk=je;exports.Checkbox=Pe;exports.Collapsible=Ie;exports.CreatePdfTaskTypes=j;exports.CustomControl=ye;exports.Dataview=Ee;exports.DocumentConvertTaskTypes=h;exports.Input=Be;exports.Panel=Se;exports.Text=ve;exports.ValueComponent=Ne;exports.WatermarkHorizontalAlignment=W;exports.WatermarkVerticalAlignment=ee;exports.configuratorIsInIFrame=ge;exports.convertDocument=se;exports.createArPage=we;exports.createPdfFromAssets=ie;exports.createSyncCmpValuesStore=he;exports.finishConfiguration=ce;exports.fireAnalyticsEvent=fe;exports.getAssetPaths=re;exports.getParentPageUrl=me;exports.navigateToLogin=le;exports.onAnyCmpValueChanged=de;exports.redirectParentPage=be;exports.sendCustomMsgToParentPage=pe;exports.setConfiguratorIFrameSize=Ce;exports.shareConfiguration=ue;exports.uploadFiles=ne;exports.uploadImages=te;exports.version=N;
|