{"version":3,"sources":["webpack:///./src/components/dataQuality/dataAvailabilityModal/DataAvailabilityModalFooter.vue?0b92","webpack:///../../../src/components/VSkeletonLoader/VSkeletonLoader.ts","webpack:///./node_modules/@microsoft/signalr/dist/esm/ILogger.js","webpack:///./node_modules/node-libs-browser/mock/process.js","webpack:///./src/views/dataQuality/DataAvailability.vue?60c9","webpack:///./node_modules/core-js/modules/es.array.flat-map.js","webpack:///./src/views/dataQuality/DataAvailability.vue?8c0f","webpack:///./src/components/dataQuality/dataAvailabilityModal/DataAvailabilityModal.vue?8046","webpack:///./src/components/dataQuality/dataAvailabilityModal/DataAvailabilityModalFooter.vue?6de9","webpack:///./src/components/dataQuality/dataAvailabilityModal/DataAvailabilityModalFooter.vue","webpack:///./src/components/dataQuality/dataAvailabilityModal/DataAvailabilityModalFooter.vue?cf3b","webpack:///./src/components/dataQuality/dataAvailabilityModal/DataAvailabilityModalFooter.vue?c9cc","webpack:///./src/components/dataQuality/dataAvailabilityModal/DataAvailabilityModalConfigureTags.vue?01f1","webpack:///./src/components/dataQuality/DataQualityIndicator.vue?d472","webpack:///./src/components/dataQuality/DataQualityIndicator.vue","webpack:///./src/components/dataQuality/DataQualityIndicator.vue?c5a5","webpack:///./src/components/dataQuality/DataQualityIndicator.vue?5086","webpack:///./src/components/dataQuality/dataAvailabilityModal/DataAvailabilityModalConfigureTags.vue","webpack:///./src/components/dataQuality/dataAvailabilityModal/DataAvailabilityModalConfigureTags.vue?bf9f","webpack:///./src/components/dataQuality/dataAvailabilityModal/DataAvailabilityModalConfigureTags.vue?963a","webpack:///./src/components/dataQuality/dataAvailabilityModal/DataAvailabilityModal.vue","webpack:///./src/components/dataQuality/dataAvailabilityModal/DataAvailabilityModal.vue?77aa","webpack:///./src/components/dataQuality/dataAvailabilityModal/DataAvailabilityModal.vue?f32f","webpack:///./src/components/dataQuality/dataQualityTable/DataQualityTable.vue?2ab7","webpack:///./src/components/dataQuality/dataQualityTable/DataQualityTableRow.vue?5c61","webpack:///./src/components/dataQuality/DataQualityPercentageIndicator.vue?8d1d","webpack:///./src/components/dataQuality/DataQualityPercentageIndicator.vue?9651","webpack:///./src/components/dataQuality/DataQualityPercentageIndicator.vue?a67c","webpack:///./src/components/dataQuality/DataQualityPercentageIndicator.vue?6557","webpack:///./src/components/dataQuality/dataQualityTable/DataQualityTableRow.vue","webpack:///./src/components/dataQuality/dataQualityTable/DataQualityTableRow.vue?791e","webpack:///./src/components/dataQuality/dataQualityTable/DataQualityTableRow.vue?e6f0","webpack:///./node_modules/@microsoft/signalr/dist/esm/DefaultReconnectPolicy.js","webpack:///./node_modules/@microsoft/signalr/dist/esm/HeaderNames.js","webpack:///./node_modules/@microsoft/signalr/dist/esm/HttpClient.js","webpack:///./node_modules/@microsoft/signalr/dist/esm/AccessTokenHttpClient.js","webpack:///./node_modules/@microsoft/signalr/dist/esm/Errors.js","webpack:///./node_modules/@microsoft/signalr/dist/esm/ITransport.js","webpack:///./node_modules/@microsoft/signalr/dist/esm/FetchHttpClient.js","webpack:///./node_modules/@microsoft/signalr/dist/esm/XhrHttpClient.js","webpack:///./node_modules/@microsoft/signalr/dist/esm/DefaultHttpClient.js","webpack:///./node_modules/@microsoft/signalr/dist/esm/AbortController.js","webpack:///./node_modules/@microsoft/signalr/dist/esm/LongPollingTransport.js","webpack:///./node_modules/@microsoft/signalr/dist/esm/ServerSentEventsTransport.js","webpack:///./node_modules/@microsoft/signalr/dist/esm/WebSocketTransport.js","webpack:///./node_modules/@microsoft/signalr/dist/esm/HttpConnection.js","webpack:///./node_modules/@microsoft/signalr/dist/esm/TextMessageFormat.js","webpack:///./node_modules/@microsoft/signalr/dist/esm/HandshakeProtocol.js","webpack:///./node_modules/@microsoft/signalr/dist/esm/IHubProtocol.js","webpack:///./node_modules/@microsoft/signalr/dist/esm/Subject.js","webpack:///./node_modules/@microsoft/signalr/dist/esm/MessageBuffer.js","webpack:///./node_modules/@microsoft/signalr/dist/esm/HubConnection.js","webpack:///./node_modules/@microsoft/signalr/dist/esm/JsonHubProtocol.js","webpack:///./node_modules/@microsoft/signalr/dist/esm/HubConnectionBuilder.js","webpack:///./src/utilities/signalr/signalr-outagehub-service.ts","webpack:///./src/components/dataQuality/dataQualityTable/DataQualityTable.vue","webpack:///./src/components/dataQuality/dataQualityTable/DataQualityTable.vue?45a8","webpack:///./src/components/dataQuality/dataQualityTable/DataQualityTable.vue?abf2","webpack:///./src/components/dataQuality/DataQualityIndicatorLegend.vue?f252","webpack:///./src/components/dataQuality/DataQualityIndicatorLegend.vue","webpack:///./src/components/dataQuality/DataQualityIndicatorLegend.vue?557c","webpack:///./src/components/dataQuality/DataQualityIndicatorLegend.vue?0368","webpack:///./src/views/dataQuality/DataAvailability.vue","webpack:///./src/views/dataQuality/DataAvailability.vue?456c","webpack:///./src/views/dataQuality/DataAvailability.vue?9bf7","webpack:///./src/components/dataQuality/dataAvailabilityModal/DataAvailabilityModalConfigureTags.vue?bc87","webpack:///./node_modules/core-js/modules/es.array.unscopables.flat-map.js","webpack:///./node_modules/@microsoft/signalr/dist/esm/Utils.js","webpack:///./src/components/dataQuality/DataQualityPercentageIndicator.vue?6f7e","webpack:///./src/components/dataQuality/DataQualityIndicator.vue?2039","webpack:///../../../src/components/VSwitch/VSwitch.ts","webpack:///./node_modules/@microsoft/signalr/dist/esm/Loggers.js","webpack:///./src/components/dataQuality/dataAvailabilityModal/DataAvailabilityModal.vue?fa4f","webpack:///./src/components/dataQuality/dataQualityTable/DataQualityTableRow.vue?d1f3","webpack:///./node_modules/path-browserify/index.js","webpack:///./src/components/dataQuality/dataQualityTable/DataQualityTable.vue?dcce"],"names":["mixins","Elevatable","Measurable","Themeable","extend","name","props","boilerplate","Boolean","loading","tile","transition","String","type","types","Object","default","computed","attrs","this","isLoading","role","$attrs","classes","themeClasses","elevationClasses","$scopedSlots","rootTypes","actions","article","avatar","button","card","chip","heading","image","paragraph","sentences","table","text","methods","genBone","children","$createElement","staticClass","genBones","bone","split","length","generator","genStructure","Array","from","map","indexOf","mapBones","push","genSkeleton","getSlot","on","afterEnter","resetStyles","beforeEnter","onBeforeEnter","beforeLeave","onBeforeLeave","leaveCancelled","bones","replace","el","_initialStyle","display","style","setProperty","render","h","$listeners","class","measurableStyles","undefined","LogLevel","exports","nextTick","fn","args","prototype","slice","call","arguments","shift","setTimeout","apply","platform","arch","execPath","title","pid","browser","env","argv","binding","Error","path","cwd","chdir","dir","resolve","exit","kill","umask","dlopen","uptime","memoryUsage","uvCounters","features","$","flattenIntoArray","aCallable","toObject","lengthOfArrayLike","arraySpeciesCreate","target","proto","flatMap","callbackfn","A","O","sourceLen","_vm","_h","_c","_self","model","value","callback","$$v","searchQuery","expression","$event","stopPropagation","preventDefault","dialog","_v","isSkeletonLoading","_s","lastUpdatedTimestamp","headers","dataAvailability","tableLoading","updateOldestDataTimestamp","staticRenderFns","staticStyle","closeModal","dataAvailabilityConfigModel","commonConfig","applySameConfig","hasGlobalError","updateConfigurationTag","getButtonAvailability","alertMessage","submitConfiguration","isDisabled","$emit","DataAvailabilityModalFooter","Vue","__decorate","PropSync","Prop","Component","component","VBtn","VCardActions","VCard","VCol","VRow","hasError","ref","onInput","onBlur","numericFilter","$set","items","top","offsetY","_l","data","index","key","tagName","refInFor","onTagBlur","isOverallStatusColumn","showOverallStatus","withText","_e","navigateToLink","lastDataTimestamp","outageStartTime","scopedSlots","_u","_g","_b","status","tagTimeSpanByStatus","unit","getFormatedDateTimeString","DataQuality","getModule","DataQualityModule","store","DataQualityIndicator","columnName","dataAvailabilityConfig","config","configurations","find","item","featureName","observeTimeSpan","convertToCorrectTimeUnit","warningTimeSeconds","observeTimeSpanUnit","criticalTimeSpan","criticalTimeSeconds","criticalTimeSpanUnit","tagTimeSpan","link","$router","numberInSeconds","Math","round","toString","timestamp","dateHelper","getHumanizeDuration","moment","valueOf","Number","VIcon","VTooltip","DataAvailabilityModalConfigureTags","state","syncHasGlobalError","tagsHasError","commonConfigHasError","tagsToConfigure","some","tag","$value","$refs","internalValue","convertToSeconds","event","window","expect","test","number","Watch","deep","immediate","components","VSelect","VSkeletonLoader","VSwitch","VTextField","Snackbar","SnackbarModule","DataAvailabilityModal","updatedConfigurationTags","featureId","filter","includes","Promise","all","refreshDataAvailabilityConfig","isGlobalConfig","invalidTag","isNaN","updateDataAvailabilityConfig","applySameConfigurationToAllTags","refreshDataAvailability","showSnackbar","color","updatedConfigurationList","forEach","VCardSubtitle","VCardText","VCardTitle","VDialog","VSpacer","rows","customSort","limitPerPage","isLessThanLimitPerPage","header","domProps","tooltip","links","skeletonStructure","proxy","dataQualityRow","outageDetectionTime","warningThreshold","criticalThreshold","percentageColor","percentage","DataQualityPercentageIndicator","criticalDeviation","warningDeviation","DataQualityTableRow","DEFAULT_RETRY_DELAYS_IN_MILLISECONDS","DefaultReconnectPolicy","retryDelays","_retryDelays","retryContext","previousRetryCount","HeaderNames","Authorization","Cookie","HttpResponse","statusCode","statusText","content","HttpClient","url","options","send","method","innerClient","accessTokenFactory","super","_innerClient","_accessTokenFactory","request","allowRetry","_accessToken","_setAuthorizationHeader","response","getCookieString","HttpError","errorMessage","trueProto","__proto__","TimeoutError","AbortError","UnsupportedTransportError","message","transport","errorType","DisabledTransportError","FailedToStartTransportError","FailedToNegotiateWithServerError","AggregateErrors","innerErrors","HttpTransportType","TransferFormat","logger","_logger","fetch","isNode","requireFunc","_jar","CookieJar","_fetchType","bind","AbortController","_abortControllerType","abortSignal","aborted","abortController","error","onabort","abort","timeoutId","timeout","msTimeout","log","Warning","body","cache","credentials","withCredentials","mode","redirect","signal","e","clearTimeout","ok","deserializeContent","responseType","payload","cookies","getCookies","c","join","arrayBuffer","reject","xhr","XMLHttpRequest","open","setRequestHeader","keys","onload","responseText","onerror","ontimeout","_httpClient","_isAborted","_pollAbort","httpClient","_options","_running","onreceive","onclose","transferFormat","isRequired","isIn","_url","Trace","Binary","pollOptions","pollUrl","Date","now","get","_closeError","_receiving","_poll","Information","logMessageContent","pollAborted","_raiseOnClose","deleteOptions","delete","err","logMessage","accessToken","encodeURIComponent","eventSource","opened","Text","isBrowser","isWebWorker","EventSource","onmessage","_close","onopen","_eventSource","close","webSocketConstructor","_logMessageContent","_webSocketConstructor","_headers","token","webSocket","isReactNative","binaryType","_event","_webSocket","ErrorEvent","readyState","OPEN","_isCloseEvent","wasClean","code","reason","MAX_REDIRECTS","_stopPromiseResolver","_negotiateVersion","baseUrl","_resolveUrl","webSocketModule","eventSourceModule","WebSocket","_connectionState","_connectionStarted","Debug","_startInternalPromise","_startInternal","_stopPromise","_sendQueue","TransportSendQueue","_stopInternal","_stopError","stop","_stopConnection","skipNegotiation","WebSockets","_constructTransport","_startTransport","negotiateResponse","redirects","_getNegotiationResponse","ProtocolVersion","_createTransport","inherentKeepAlive","negotiateUrl","_resolveNegotiateUrl","post","JSON","parse","negotiateVersion","connectionToken","connectionId","useStatefulReconnect","_useStatefulReconnect","requestedTransport","requestedTransferFormat","connectUrl","_createConnectUrl","_isITransport","transportExceptions","transports","availableTransports","negotiate","endpoint","transportOrError","_resolveTransportOrError","ex","ServerSentEvents","LongPolling","reconnect","async","callStop","disconnected","connect","resend","transportMatches","transferFormats","s","catch","lastIndexOf","aTag","document","createElement","href","URL","pathname","endsWith","searchParams","URLSearchParams","has","append","search","actualTransport","_transport","_buffer","_executing","_sendBufferedData","PromiseSource","_transportResult","_sendLoopPromise","_sendLoop","_bufferData","promise","transportResult","_concatBuffers","arrayBuffers","totalLength","b","byteLength","reduce","a","result","Uint8Array","offset","set","buffer","_resolver","_rejecter","TextMessageFormat","output","RecordSeparator","input","messages","pop","RecordSeparatorCode","fromCharCode","handshakeRequest","write","stringify","messageData","remainingData","binaryData","separatorIndex","responseLength","textData","substring","responseMessage","MessageType","observers","observer","next","complete","protocol","connection","bufferSize","_bufferSize","_messages","_totalMessageCount","_waitForSequenceMessage","_nextReceivingSequenceId","_latestReceivedSequenceId","_bufferedByteCount","_reconnectInProgress","_protocol","_connection","serializedMessage","writeMessage","backpressurePromise","_isInvocationMessage","backpressurePromiseResolver","backpressurePromiseRejector","BufferedItem","_disconnected","ackMessage","newestAckedMessage","element","_id","sequenceId","_message","Sequence","currentId","_ackTimer","_rejector","Invocation","StreamItem","Completion","StreamInvocation","CancelInvocation","Close","Ping","Ack","_ackTimerHandle","id","resolver","rejector","DEFAULT_TIMEOUT_IN_MS","DEFAULT_PING_INTERVAL_IN_MS","DEFAULT_STATEFUL_RECONNECT_BUFFER_SIZE","HubConnectionState","reconnectPolicy","serverTimeoutInMilliseconds","keepAliveIntervalInMilliseconds","statefulReconnectBufferSize","_nextKeepAlive","_freezeEventListener","_statefulReconnectBufferSize","_reconnectPolicy","_handshakeProtocol","_processIncomingData","_connectionClosed","_callbacks","_methods","_closedCallbacks","_reconnectingCallbacks","_reconnectedCallbacks","_invocationId","_receivedHandshakeResponse","Disconnected","_cachedPingMessage","Reconnecting","_startPromise","_startWithStateTransitions","Connecting","addEventListener","Connected","_stopDuringStartError","handshakePromise","_handshakeResolver","_handshakeRejecter","start","version","_sendMessage","writeHandshakeRequest","_cleanupTimeout","_resetTimeoutPeriod","_resetKeepAliveInterval","_messageBuffer","_resend","_cleanupPingTimer","startPromise","Disconnecting","_reconnectDelayHandle","_completeClose","_sendCloseMessage","_sendWithProtocol","_createCloseMessage","methodName","streams","streamIds","_replaceStreamingParams","invocationDescriptor","_createStreamInvocation","promiseQueue","subject","cancelCallback","cancelInvocation","_createCancelInvocation","invocationId","then","invocationEvent","_launchStreams","_send","sendPromise","_createInvocation","p","newMethod","toLowerCase","handlers","removeIdx","splice","_processHandshakeResponse","parseMessages","_shouldProcessMessage","_invokeClientMethod","allowReconnect","_ack","_resetSequence","parseHandshakeResponse","getTime","_timeoutHandle","serverTimeout","_pingServerHandle","nextPing","invocationMessage","_createCompletionMessage","methodsCopy","expectsResponse","res","exception","completionMessage","m","prevRes","_cancelCallbacksWithError","_reconnect","_dispose","removeEventListener","reconnectStartTime","previousReconnectAttempts","retryError","nextRetryDelay","_getNextRetryDelay","elapsedMilliseconds","retryReason","nextRetryDelayInMilliseconds","callbacks","nonblocking","streamId","subscribe","_createStreamItemMessage","i","argument","_isObservable","arg","JSON_HUB_PROTOCOL_NAME","instance","hubMessages","parsedMessage","_isStreamItemMessage","_isCompletionMessage","_isAckMessage","_isSequenceMessage","_assertNotEmptyString","LogLevelNameMapping","trace","debug","info","information","warn","warning","critical","Critical","none","None","parseLogLevel","mapping","logging","isLogger","logLevel","transportTypeOrOptions","isNotEmpty","httpConnectionOptions","retryDelaysOrReconnectPolicy","isArray","milliseconds","_serverTimeoutInMilliseconds","_keepAliveIntervalInMilliseconds","create","isLocal","location","hostname","process","origin","outageHubConnection","signalR","withUrl","getters","withAutomaticReconnect","build","User","UserModule","DataQualityTable","invoke","userCompanyId","console","outage","vesselInfo","vesselName","off","sortBy","isDesc","sort","VDataTable","DataQualityIndicatorLegend","VContainer","Vessels","VesselsModule","DataAvailability","skeletonTimeout","width","sortable","refreshExtendedVessels","dataIndicatorHeaders","indicator","align","indicatorsWithNAStatusForEachVessel","oldestDataTimestamp","allIndicators","acc","outageState","every","timestamps","oldestTimestamp","oldest","current","indicators","vesselId","overallStatus","overallOutageState","trim","loadingState","newVal","updatedOldestTimeStamp","startSkeletonLoading","addToUnscopables","VERSION","Arg","val","match","values","Platform","self","release","getDataDetail","includeContent","detail","isArrayBuffer","formatArrayBuffer","view","str","num","pad","substr","ArrayBuffer","constructor","sendMessage","transportName","getUserAgentHeader","createLogger","ConsoleLogger","SubjectSubscription","_subject","_observer","_","minimumLogLevel","_minLevel","out","msg","toISOString","userAgentHeaderName","constructUserAgent","getOsName","getRuntime","getRuntimeVersion","os","runtime","runtimeVersion","userAgent","majorAndMinor","versions","node","getErrorString","stack","getGlobalThis","globalThis","global","Selectable","directives","Touch","inset","flat","VInput","isActive","validationState","shouldValidate","hasSuccess","hasColor","computedColor","switchData","setTextColor","genDefaultSlot","genSwitch","genLabel","attrs$","switchAttrs","genInput","genRipple","left","onSwipeLeft","right","onSwipeRight","genProgress","VFabTransition","$slots","progress","VProgressCircular","size","indeterminate","onChange","onKeydown","keyCode","keyCodes","NullLogger","_logLevel","normalizeArray","parts","allowAboveRoot","up","last","unshift","basename","end","matchedSlash","charCodeAt","xs","f","resolvedPath","resolvedAbsolute","TypeError","charAt","normalize","isAbsolute","trailingSlash","paths","relative","to","arr","fromParts","toParts","min","samePartsLength","outputParts","concat","sep","delimiter","dirname","hasRoot","ext","extname","startDot","startPart","preDotState","len"],"mappings":"4IAAA,W,oPCwBeA,sBACbC,OACAC,OACAC,QACAC,OAAO,CACPC,KAAM,kBAENC,MAAO,CACLC,YAAaC,QACbC,QAASD,QACTE,KAAMF,QACNG,WAAYC,OACZC,KAAMD,OACNE,MAAO,CACLD,KAAME,OACNC,QAAS,iBAAO,MAIpBC,SAAU,CACRC,MADQ,WAEN,OAAKC,KAAKC,UAEFD,KAAKZ,YAKT,GALG,gBACL,aAAa,EACb,YAAa,SACbc,KAAM,SACHF,KAAKG,QANkBH,KAAKG,QASnCC,QAXQ,WAYN,sCACE,iCAAkCJ,KAAKZ,YACvC,gCAAiCY,KAAKC,UACtC,0BAA2BD,KAAKT,MAC7BS,KAAKK,cACLL,KAAKM,mBAGZL,UApBQ,WAqBN,QAAS,YAAaD,KAAKO,eAAiBP,KAAKV,SAEnDkB,UAvBQ,WAwBN,uBACEC,QAAS,WACTC,QAAS,qBACTC,OAAQ,SACRC,OAAQ,SACRC,KAAM,sBACN,cAAe,0BACf,eAAgB,UAChBC,KAAM,OACN,cAAe,mFACf,sBAAuB,iBACvB,mBAAoB,YACpBC,QAAS,UACTC,MAAO,QACP,YAAa,OACb,mBAAoB,eACpB,qBAAsB,YACtB,4BAA6B,oBAC7B,uBAAwB,YACxB,8BAA+B,oBAC/BC,UAAW,SACXC,UAAW,SACXC,MAAO,uDACP,gBAAiB,gBACjB,cAAe,YACf,cAAe,sBACf,oBAAqB,qBACrB,YAAa,eACb,aAAc,OACd,cAAe,mBACfC,KAAM,QACHpB,KAAKL,SAKd0B,QAAS,CACPC,QADO,SACEF,E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GA,EAAQ6L,EAAI5yB,OAAS+mB,GAC7B6L,EAAIG,OAAOhM,EAAO8S,M,wDC3SjC,W","file":"js/chunk-432d910e.b7aa2db4.js","sourcesContent":["export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--9-oneOf-1-0!../../../../node_modules/css-loader/dist/cjs.js??ref--9-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--9-oneOf-1-2!../../../../node_modules/sass-loader/dist/cjs.js??ref--9-oneOf-1-3!../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./DataAvailabilityModalFooter.vue?vue&type=style&index=0&id=eb771c4e&lang=scss&scoped=true&\"","// Styles\nimport './VSkeletonLoader.sass'\n\n// Mixins\nimport Elevatable from '../../mixins/elevatable'\nimport Measurable from '../../mixins/measurable'\nimport Themeable from '../../mixins/themeable'\n\n// Utilities\nimport mixins from '../../util/mixins'\n\n// Types\nimport { VNode } from 'vue'\nimport { getSlot } from '../../util/helpers'\nimport { PropValidator } from 'vue/types/options'\n\nexport interface HTMLSkeletonLoaderElement extends HTMLElement {\n _initialStyle?: {\n display: string | null\n transition: string\n }\n}\n\n/* @vue/component */\nexport default mixins(\n Elevatable,\n Measurable,\n Themeable,\n).extend({\n name: 'VSkeletonLoader',\n\n props: {\n boilerplate: Boolean,\n loading: Boolean,\n tile: Boolean,\n transition: String,\n type: String,\n types: {\n type: Object,\n default: () => ({}),\n } as PropValidator>,\n },\n\n computed: {\n attrs (): object {\n if (!this.isLoading) return this.$attrs\n\n return !this.boilerplate ? {\n 'aria-busy': true,\n 'aria-live': 'polite',\n role: 'alert',\n ...this.$attrs,\n } : {}\n },\n classes (): object {\n return {\n 'v-skeleton-loader--boilerplate': this.boilerplate,\n 'v-skeleton-loader--is-loading': this.isLoading,\n 'v-skeleton-loader--tile': this.tile,\n ...this.themeClasses,\n ...this.elevationClasses,\n }\n },\n isLoading (): boolean {\n return !('default' in this.$scopedSlots) || this.loading\n },\n rootTypes (): Record {\n return {\n actions: 'button@2',\n article: 'heading, paragraph',\n avatar: 'avatar',\n button: 'button',\n card: 'image, card-heading',\n 'card-avatar': 'image, list-item-avatar',\n 'card-heading': 'heading',\n chip: 'chip',\n 'date-picker': 'list-item, card-heading, divider, date-picker-options, date-picker-days, actions',\n 'date-picker-options': 'text, avatar@2',\n 'date-picker-days': 'avatar@28',\n heading: 'heading',\n image: 'image',\n 'list-item': 'text',\n 'list-item-avatar': 'avatar, text',\n 'list-item-two-line': 'sentences',\n 'list-item-avatar-two-line': 'avatar, sentences',\n 'list-item-three-line': 'paragraph',\n 'list-item-avatar-three-line': 'avatar, paragraph',\n paragraph: 'text@3',\n sentences: 'text@2',\n table: 'table-heading, table-thead, table-tbody, table-tfoot',\n 'table-heading': 'heading, text',\n 'table-thead': 'heading@6',\n 'table-tbody': 'table-row-divider@6',\n 'table-row-divider': 'table-row, divider',\n 'table-row': 'table-cell@6',\n 'table-cell': 'text',\n 'table-tfoot': 'text@2, avatar@2',\n text: 'text',\n ...this.types,\n }\n },\n },\n\n methods: {\n genBone (text: string, children: VNode[]) {\n return this.$createElement('div', {\n staticClass: `v-skeleton-loader__${text} v-skeleton-loader__bone`,\n }, children)\n },\n genBones (bone: string): VNode[] {\n // e.g. 'text@3'\n const [type, length] = bone.split('@') as [string, number]\n const generator = () => this.genStructure(type)\n\n // Generate a length array based upon\n // value after @ in the bone string\n return Array.from({ length }).map(generator)\n },\n // Fix type when this is merged\n // https://github.com/microsoft/TypeScript/pull/33050\n genStructure (type?: string): any {\n let children = []\n type = type || this.type || ''\n const bone = this.rootTypes[type] || ''\n\n // End of recursion, do nothing\n /* eslint-disable-next-line no-empty, brace-style */\n if (type === bone) {}\n // Array of values - e.g. 'heading, paragraph, text@2'\n else if (type.indexOf(',') > -1) return this.mapBones(type)\n // Array of values - e.g. 'paragraph@4'\n else if (type.indexOf('@') > -1) return this.genBones(type)\n // Array of values - e.g. 'card@2'\n else if (bone.indexOf(',') > -1) children = this.mapBones(bone)\n // Array of values - e.g. 'list-item@2'\n else if (bone.indexOf('@') > -1) children = this.genBones(bone)\n // Single value - e.g. 'card-heading'\n else if (bone) children.push(this.genStructure(bone))\n\n return [this.genBone(type, children)]\n },\n genSkeleton () {\n const children = []\n\n if (!this.isLoading) children.push(getSlot(this))\n else children.push(this.genStructure())\n\n /* istanbul ignore else */\n if (!this.transition) return children\n\n /* istanbul ignore next */\n return this.$createElement('transition', {\n props: {\n name: this.transition,\n },\n // Only show transition when\n // content has been loaded\n on: {\n afterEnter: this.resetStyles,\n beforeEnter: this.onBeforeEnter,\n beforeLeave: this.onBeforeLeave,\n leaveCancelled: this.resetStyles,\n },\n }, children)\n },\n mapBones (bones: string) {\n // Remove spaces and return array of structures\n return bones.replace(/\\s/g, '').split(',').map(this.genStructure)\n },\n onBeforeEnter (el: HTMLSkeletonLoaderElement) {\n this.resetStyles(el)\n\n if (!this.isLoading) return\n\n el._initialStyle = {\n display: el.style.display,\n transition: el.style.transition,\n }\n\n el.style.setProperty('transition', 'none', 'important')\n },\n onBeforeLeave (el: HTMLSkeletonLoaderElement) {\n el.style.setProperty('display', 'none', 'important')\n },\n resetStyles (el: HTMLSkeletonLoaderElement) {\n if (!el._initialStyle) return\n\n el.style.display = el._initialStyle.display || ''\n el.style.transition = el._initialStyle.transition\n\n delete el._initialStyle\n },\n },\n\n render (h): VNode {\n return h('div', {\n staticClass: 'v-skeleton-loader',\n attrs: this.attrs,\n on: this.$listeners,\n class: this.classes,\n style: this.isLoading ? this.measurableStyles : undefined,\n }, [this.genSkeleton()])\n },\n})\n","// Licensed to the .NET Foundation under one or more agreements.\r\n// The .NET Foundation licenses this file to you under the MIT license.\r\n// These values are designed to match the ASP.NET Log Levels since that's the pattern we're emulating here.\r\n/** Indicates the severity of a log message.\r\n *\r\n * Log Levels are ordered in increasing severity. So `Debug` is more severe than `Trace`, etc.\r\n */\r\nexport var LogLevel;\r\n(function (LogLevel) {\r\n /** Log level for very low severity diagnostic messages. */\r\n LogLevel[LogLevel[\"Trace\"] = 0] = \"Trace\";\r\n /** Log level for low severity diagnostic messages. */\r\n LogLevel[LogLevel[\"Debug\"] = 1] = \"Debug\";\r\n /** Log level for informational diagnostic messages. */\r\n LogLevel[LogLevel[\"Information\"] = 2] = \"Information\";\r\n /** Log level for diagnostic messages that indicate a non-fatal problem. */\r\n LogLevel[LogLevel[\"Warning\"] = 3] = \"Warning\";\r\n /** Log level for diagnostic messages that indicate a failure in the current operation. */\r\n LogLevel[LogLevel[\"Error\"] = 4] = \"Error\";\r\n /** Log level for diagnostic messages that indicate a failure that will terminate the entire application. */\r\n LogLevel[LogLevel[\"Critical\"] = 5] = \"Critical\";\r\n /** The highest possible log level. Used when configuring logging to indicate that no log messages should be emitted. */\r\n LogLevel[LogLevel[\"None\"] = 6] = \"None\";\r\n})(LogLevel || (LogLevel = {}));\r\n//# sourceMappingURL=ILogger.js.map","exports.nextTick = function nextTick(fn) {\n var args = Array.prototype.slice.call(arguments);\n args.shift();\n setTimeout(function () {\n fn.apply(null, args);\n }, 0);\n};\n\nexports.platform = exports.arch = \nexports.execPath = exports.title = 'browser';\nexports.pid = 1;\nexports.browser = true;\nexports.env = {};\nexports.argv = [];\n\nexports.binding = function (name) {\n\tthrow new Error('No such module. (Possibly not yet loaded)')\n};\n\n(function () {\n var cwd = '/';\n var path;\n exports.cwd = function () { return cwd };\n exports.chdir = function (dir) {\n if (!path) path = require('path');\n cwd = path.resolve(dir, cwd);\n };\n})();\n\nexports.exit = exports.kill = \nexports.umask = exports.dlopen = \nexports.uptime = exports.memoryUsage = \nexports.uvCounters = function() {};\nexports.features = {};\n","export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--9-oneOf-1-0!../../../node_modules/css-loader/dist/cjs.js??ref--9-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--9-oneOf-1-2!../../../node_modules/sass-loader/dist/cjs.js??ref--9-oneOf-1-3!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./DataAvailability.vue?vue&type=style&index=0&id=d0b0424c&lang=scss&scoped=true&\"","'use strict';\nvar $ = require('../internals/export');\nvar flattenIntoArray = require('../internals/flatten-into-array');\nvar aCallable = require('../internals/a-callable');\nvar toObject = require('../internals/to-object');\nvar lengthOfArrayLike = require('../internals/length-of-array-like');\nvar arraySpeciesCreate = require('../internals/array-species-create');\n\n// `Array.prototype.flatMap` method\n// https://tc39.es/ecma262/#sec-array.prototype.flatmap\n$({ target: 'Array', proto: true }, {\n flatMap: function flatMap(callbackfn /* , thisArg */) {\n var O = toObject(this);\n var sourceLen = lengthOfArrayLike(O);\n var A;\n aCallable(callbackfn);\n A = arraySpeciesCreate(O, 0);\n A.length = flattenIntoArray(A, O, O, sourceLen, 0, 1, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n return A;\n }\n});\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('v-container',{staticClass:\"main pa-2\",attrs:{\"fluid\":\"\"}},[_c('div',{staticClass:\"topline d-flex align-center\"},[_c('v-text-field',{staticClass:\"search-input\",attrs:{\"prepend-inner-icon\":\"mdi-magnify\",\"placeholder\":\"Search for vessel\",\"outlined\":\"\",\"dense\":\"\",\"hide-details\":\"auto\",\"clearable\":\"\"},model:{value:(_vm.searchQuery),callback:function ($$v) {_vm.searchQuery=$$v},expression:\"searchQuery\"}}),_c('v-btn',{staticClass:\"settings-btn ml-2 mr-0 font-weight-bold primary--text\",attrs:{\"color\":\"neutralLighten100\",\"elevation\":\"0\"},on:{\"click\":function($event){$event.stopPropagation();$event.preventDefault();_vm.dialog = true}}},[_vm._v(\"settings\")])],1),_c('div',{staticClass:\"mb-4 d-flex flex-row align-center\"},[_c('span',{staticClass:\"last-updated-text mr-1\"},[_vm._v(\"Last updated: \")]),_c('span',{staticClass:\"skeleton-wrap\"},[_c('v-skeleton-loader',{attrs:{\"loading\":_vm.isSkeletonLoading,\"type\":\"heading\"}},[_c('span',{staticClass:\"last-updated-text\"},[_vm._v(\" \"+_vm._s(_vm.lastUpdatedTimestamp)+\" UTC\")])])],1)]),_c('DataAvailabilityModal',{attrs:{\"isOpen\":_vm.dialog},on:{\"update:isOpen\":function($event){_vm.dialog=$event},\"update:is-open\":function($event){_vm.dialog=$event}}}),_c('DataQualityTable',{attrs:{\"showOverallStatus\":true,\"headers\":_vm.headers,\"rows\":_vm.dataAvailability,\"loading\":_vm.tableLoading},on:{\"outage-updated\":_vm.updateOldestDataTimestamp}})],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('v-dialog',{staticStyle:{\"z-index\":\"500\"},attrs:{\"width\":\"auto\"},on:{\"click:outside\":_vm.closeModal},model:{value:(_vm.dialog),callback:function ($$v) {_vm.dialog=$$v},expression:\"dialog\"}},[_c('v-card',{staticClass:\"d-flex flex-column pa-6\",attrs:{\"width\":\"601\",\"height\":\"700\"}},[_c('v-card-title',{staticClass:\"pa-0 mb-6 font-weight-medium\"},[_c('span',[_vm._v(\"Settings\")]),_c('v-btn',{staticClass:\"close-btn ml-auto\",attrs:{\"color\":\"mainGrey100\",\"small\":\"\",\"icon\":\"\"},on:{\"click\":function($event){return _vm.closeModal()}}},[_c('v-icon',{attrs:{\"size\":\"14\"}},[_vm._v(\"mdi-close\")])],1)],1),_c('v-card-subtitle',{staticClass:\"mainGrey100--text pa-0\"},[_vm._v(\" Define time thresholds for 'Warning' and 'Alert' based on the duration of detected outages. These settings will apply to all vessels. \")]),_c('v-card-text',{staticClass:\"pa-0\"},[_c('DataAvailabilityModalConfigureTags',{attrs:{\"loading\":false,\"selectedTags\":_vm.dataAvailabilityConfigModel,\"commonConfiguration\":_vm.commonConfig,\"switch\":_vm.applySameConfig,\"hasGlobalError\":_vm.hasGlobalError},on:{\"update:selectedTags\":function($event){_vm.dataAvailabilityConfigModel=$event},\"update:selected-tags\":function($event){_vm.dataAvailabilityConfigModel=$event},\"update:commonConfiguration\":function($event){_vm.commonConfig=$event},\"update:common-configuration\":function($event){_vm.commonConfig=$event},\"update:switch\":function($event){_vm.applySameConfig=$event},\"update:hasGlobalError\":function($event){_vm.hasGlobalError=$event},\"update:has-global-error\":function($event){_vm.hasGlobalError=$event},\"updateConfigurationTag\":_vm.updateConfigurationTag}})],1),_c('v-spacer'),_c('DataAvailabilityModalFooter',{attrs:{\"isDisabled\":_vm.getButtonAvailability,\"displayedMessage\":_vm.alertMessage,\"isOpen\":_vm.dialog},on:{\"submitForm\":_vm.submitConfiguration,\"closeModal\":_vm.closeModal,\"update:displayedMessage\":function($event){_vm.alertMessage=$event},\"update:displayed-message\":function($event){_vm.alertMessage=$event},\"update:isOpen\":function($event){_vm.dialog=$event},\"update:is-open\":function($event){_vm.dialog=$event}}})],1)],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('v-card-actions',{staticClass:\"px-0 py-2\"},[_c('v-row',{attrs:{\"justify\":\"space-between\"}},[_c('v-col',{staticClass:\"d-flex justify-end align-center px-1 pa-0\"},[_c('v-btn',{staticClass:\"ma-1 font-weight-bold\",attrs:{\"disabled\":_vm.isDisabled,\"color\":\"neutralLighten100\",\"elevation\":\"0\"},on:{\"click\":function($event){$event.stopPropagation();$event.preventDefault();return _vm.$emit('submitForm')}}},[_vm._v(\" Set status \")])],1)],1)],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport { Component, Prop, PropSync, Vue } from \"vue-property-decorator\";\n\n@Component\nexport default class DataAvailabilityModalFooter extends Vue {\n @PropSync(\"isOpen\", { type: Boolean, default: false }) dialog!: boolean;\n @Prop({ type: String, default: \"\" }) displayedMessage!: string;\n @Prop({ type: Boolean, default: \"\" }) isDisabled!: boolean;\n}\n","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--15-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/ts-loader/index.js??ref--15-3!../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./DataAvailabilityModalFooter.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--15-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/ts-loader/index.js??ref--15-3!../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./DataAvailabilityModalFooter.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./DataAvailabilityModalFooter.vue?vue&type=template&id=eb771c4e&scoped=true&\"\nimport script from \"./DataAvailabilityModalFooter.vue?vue&type=script&lang=ts&\"\nexport * from \"./DataAvailabilityModalFooter.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./DataAvailabilityModalFooter.vue?vue&type=style&index=0&id=eb771c4e&lang=scss&scoped=true&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"eb771c4e\",\n null\n \n)\n\nexport default component.exports\n\n/* vuetify-loader */\nimport installComponents from \"!../../../../node_modules/vuetify-loader/lib/runtime/installComponents.js\"\nimport { VBtn } from 'vuetify/lib/components/VBtn';\nimport { VCardActions } from 'vuetify/lib/components/VCard';\nimport { VCol } from 'vuetify/lib/components/VGrid';\nimport { VRow } from 'vuetify/lib/components/VGrid';\ninstallComponents(component, {VBtn,VCardActions,VCol,VRow})\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"data-availability-configure-tags\"},[_c('v-switch',{staticClass:\"v-switch mb-7 mt-6\",attrs:{\"label\":\"Set the same time configuration for all data tags\",\"hide-details\":\"\",\"inset\":\"\"},model:{value:(_vm.applySameConfig),callback:function ($$v) {_vm.applySameConfig=$$v},expression:\"applySameConfig\"}}),(!_vm.applySameConfig)?_c('div',{staticClass:\"scrollable px-0\"},[(_vm.loading)?_c('v-skeleton-loader',{attrs:{\"type\":\"list-item-avatar\"}}):_c('div',{staticClass:\"tag-list\"},_vm._l((_vm.tagsToConfigure),function(data,index){return _c('div',{key:index,staticClass:\"tag-list__item justify-center\"},[_c('p',{staticClass:\"tag-list__item__name ma-0 mb-3\"},[_vm._v(_vm._s(data.tagName))]),_c('div',{staticClass:\"tag-list__item__action-list\",class:{ 'has-error': _vm.hasError(data) }},[_c('div',{staticClass:\"tag-list__item__action tag-list__item__action_observe\"},[_c('DataQualityIndicator',{attrs:{\"showOverallStatus\":2,\"with-text\":\"\"}}),_c('span',{staticClass:\"tag-list__item__action__text\"},[_vm._v(\"if outage is detected for at least\")]),_c('div',{staticClass:\"inputs d-inline-flex flex-column ml-auto\",class:{ 'has-error': _vm.hasError(data) }},[_c('div',{staticClass:\"wrap d-inline-flex\"},[_c('v-text-field',{ref:(\"observe\" + (data.featureId)),refInFor:true,staticClass:\"tag-list__item__action__input ml-auto\",attrs:{\"type\":\"number\",\"min\":\"1\",\"hide-details\":\"auto\",\"dense\":\"\",\"outlined\":\"\"},on:{\"input\":function($event){return _vm.updateConfigurationTag($event, (\"observe\" + (data.featureId)), data)},\"blur\":function($event){return _vm.onTagBlur((\"observe\" + (data.featureId)), data)},\"keypress\":_vm.numericFilter},model:{value:(data.observeTimeSpan),callback:function ($$v) {_vm.$set(data, \"observeTimeSpan\", $$v)},expression:\"data.observeTimeSpan\"}}),_c('v-select',{staticClass:\"tag-list__item__action__select ml-2\",attrs:{\"items\":_vm.items,\"menu-props\":{ top: false, offsetY: true },\"item-text\":\"state\",\"hide-details\":\"auto\",\"outlined\":\"\",\"dense\":\"\"},on:{\"change\":function($event){return _vm.updateConfigurationTag(null, null, data)}},model:{value:(data.observeTimeSpanUnit),callback:function ($$v) {_vm.$set(data, \"observeTimeSpanUnit\", $$v)},expression:\"data.observeTimeSpanUnit\"}})],1)])],1),_c('div',{staticClass:\"tag-list__item__action tag-list__item__action_critical\"},[_c('DataQualityIndicator',{attrs:{\"showOverallStatus\":3,\"with-text\":\"\"}}),_c('span',{staticClass:\"tag-list__item__action__text\"},[_vm._v(\"if outage is detected for at least\")]),_c('div',{staticClass:\"inputs d-inline-flex flex-column ml-auto\",class:{ 'has-error': _vm.hasError(data) }},[_c('div',{staticClass:\"wrap d-inline-flex\"},[_c('v-text-field',{ref:(\"alert\" + (data.featureId)),refInFor:true,staticClass:\"tag-list__item__action__input ml-auto\",attrs:{\"type\":\"number\",\"min\":\"1\",\"hide-details\":\"auto\",\"dense\":\"\",\"outlined\":\"\"},on:{\"input\":function($event){return _vm.updateConfigurationTag($event, (\"alert\" + (data.featureId)), data)},\"blur\":function($event){return _vm.onTagBlur((\"alert\" + (data.featureId)), data)},\"keypress\":_vm.numericFilter},model:{value:(data.criticalTimeSpan),callback:function ($$v) {_vm.$set(data, \"criticalTimeSpan\", $$v)},expression:\"data.criticalTimeSpan\"}}),_c('v-select',{staticClass:\"tag-list__item__action__select ml-2\",attrs:{\"items\":_vm.items,\"outlined\":\"\",\"item-text\":\"state\",\"hide-details\":\"auto\",\"dense\":\"\",\"menu-props\":{ top: false, offsetY: true }},on:{\"change\":function($event){return _vm.updateConfigurationTag(null, null, data)}},model:{value:(data.criticalTimeSpanUnit),callback:function ($$v) {_vm.$set(data, \"criticalTimeSpanUnit\", $$v)},expression:\"data.criticalTimeSpanUnit\"}})],1)])],1),_c('div',{staticClass:\"inputs__error\"},[_vm._v(\"Set 'Alert' duration longer than 'Observe'\")])])])}),0)],1):_c('div',{staticClass:\"tag-list\"},[_c('div',{staticClass:\"tag-list__item justify-center\"},[_c('p',{staticClass:\"tag-list__item__name ma-0 mb-3\"},[_vm._v(\"All Data Tags\")]),_c('div',{staticClass:\"tag-list__item__action-list\",class:{ 'has-error': _vm.hasError(_vm.commonConfig) }},[_c('div',{staticClass:\"tag-list__item__action tag-list__item__action_observe\"},[_c('DataQualityIndicator',{attrs:{\"showOverallStatus\":2,\"with-text\":\"\"}}),_c('span',{staticClass:\"tag-list__item__action__text\"},[_vm._v(\"if outage is detected for at least\")]),_c('div',{staticClass:\"inputs d-inline-flex flex-column ml-auto\",class:{ 'has-error': _vm.hasError(_vm.commonConfig) }},[_c('div',{staticClass:\"wrap d-inline-flex\"},[_c('v-text-field',{ref:\"globalObserve\",staticClass:\"tag-list__item__action__input ml-auto\",attrs:{\"type\":\"number\",\"min\":\"1\",\"hide-details\":\"auto\",\"dense\":\"\",\"outlined\":\"\"},on:{\"input\":function($event){return _vm.onInput($event, 'globalObserve')},\"blur\":function($event){return _vm.onBlur($event, 'globalObserve')},\"keypress\":_vm.numericFilter},model:{value:(_vm.commonConfig.observeTimeSpan),callback:function ($$v) {_vm.$set(_vm.commonConfig, \"observeTimeSpan\", $$v)},expression:\"commonConfig.observeTimeSpan\"}}),_c('v-select',{staticClass:\"tag-list__item__action__select ml-2\",attrs:{\"items\":_vm.items,\"menu-props\":{ top: false, offsetY: true },\"item-text\":\"state\",\"hide-details\":\"auto\",\"outlined\":\"\",\"dense\":\"\"},model:{value:(_vm.commonConfig.observeTimeSpanUnit),callback:function ($$v) {_vm.$set(_vm.commonConfig, \"observeTimeSpanUnit\", $$v)},expression:\"commonConfig.observeTimeSpanUnit\"}})],1)])],1),_c('div',{staticClass:\"tag-list__item__action tag-list__item__action_critical\"},[_c('DataQualityIndicator',{attrs:{\"showOverallStatus\":3,\"with-text\":\"\"}}),_c('span',{staticClass:\"tag-list__item__action__text\"},[_vm._v(\"if outage is detected for at least\")]),_c('div',{staticClass:\"inputs d-inline-flex flex-column ml-auto\",class:{ 'has-error': _vm.hasError(_vm.commonConfig) }},[_c('div',{staticClass:\"wrap d-inline-flex\"},[_c('v-text-field',{ref:\"globalAlert\",staticClass:\"tag-list__item__action__input ml-auto\",attrs:{\"type\":\"number\",\"min\":\"1\",\"hide-details\":\"auto\",\"dense\":\"\",\"outlined\":\"\"},on:{\"input\":function($event){return _vm.onInput($event, 'globalAlert')},\"blur\":function($event){return _vm.onBlur($event, 'globalAlert')},\"keypress\":_vm.numericFilter},model:{value:(_vm.commonConfig.criticalTimeSpan),callback:function ($$v) {_vm.$set(_vm.commonConfig, \"criticalTimeSpan\", $$v)},expression:\"commonConfig.criticalTimeSpan\"}}),_c('v-select',{staticClass:\"tag-list__item__action__select ml-2\",attrs:{\"items\":_vm.items,\"menu-props\":{ top: false, offsetY: true },\"item-text\":\"state\",\"hide-details\":\"auto\",\"outlined\":\"\",\"dense\":\"\"},model:{value:(_vm.commonConfig.criticalTimeSpanUnit),callback:function ($$v) {_vm.$set(_vm.commonConfig, \"criticalTimeSpanUnit\", $$v)},expression:\"commonConfig.criticalTimeSpanUnit\"}})],1)])],1),_c('div',{staticClass:\"inputs__error\"},[_vm._v(\"Set 'Alert' duration longer than 'Observe'\")])])])])],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"data-quality-indicator d-flex\",class:{ 'justify-center': !_vm.isOverallStatusColumn }},[(_vm.showOverallStatus === 1)?_c('div',{class:[ 'status', { 'with-border' : _vm.isOverallStatusColumn && _vm.showOverallStatus !== 0 || _vm.withText }]},[_c('v-icon',{attrs:{\"size\":_vm.isOverallStatusColumn ? 12 : 16,\"color\":\"success100\"}},[_vm._v(\" mdi-check-circle \")]),(_vm.isOverallStatusColumn || _vm.withText)?_c('span',[_vm._v(\" Available \")]):_vm._e()],1):(_vm.showOverallStatus === 2)?_c('div',{class:[ 'status', { 'with-border' : _vm.isOverallStatusColumn && _vm.showOverallStatus !== 0 || _vm.withText }]},[_c('v-icon',{attrs:{\"size\":_vm.isOverallStatusColumn ? 12 : 16,\"color\":\"warning100\"}},[_vm._v(\" mdi-alert-circle \")]),(_vm.isOverallStatusColumn || _vm.withText)?_c('span',[_vm._v(\" Observe \")]):_vm._e()],1):(_vm.showOverallStatus === 3)?_c('div',{class:[ 'status', { 'with-border' : _vm.isOverallStatusColumn && _vm.showOverallStatus !== 0 || _vm.withText }]},[_c('v-icon',{attrs:{\"size\":_vm.isOverallStatusColumn ? 12 : 16,\"color\":\"error100\"}},[_vm._v(\" mdi-minus-circle \")]),(_vm.isOverallStatusColumn || _vm.withText)?_c('span',[_vm._v(\" Alert \")]):_vm._e()],1):_c('div',{class:[ 'status', { 'with-border' : _vm.isOverallStatusColumn && _vm.showOverallStatus !== 0 || _vm.withText }]},[_c('v-icon',{attrs:{\"size\":16,\"color\":\"darkGrey100\"}},[_vm._v(\" mdi-close-circle \")]),(_vm.isOverallStatusColumn || _vm.withText)?_c('span',{staticClass:\"darkGrey100--text\"},[_vm._v(\" N/A \")]):_vm._e()],1),(_vm.link)?_c('a',{staticClass:\"link\",attrs:{\"href\":\"https://www.google.co.uk/\"},on:{\"click\":function($event){$event.preventDefault();return _vm.navigateToLink.apply(null, arguments)}}}):_vm._e(),((_vm.lastDataTimestamp || _vm.outageStartTime) && !_vm.isOverallStatusColumn)?_c('v-tooltip',{attrs:{\"color\":\"black\",\"content-class\":\"with-triangle\",\"max-width\":\"151\",\"bottom\":\"\"},scopedSlots:_vm._u([{key:\"activator\",fn:function(ref){\nvar on = ref.on;\nvar attrs = ref.attrs;\nreturn [_c('span',_vm._g(_vm._b({staticClass:\"tooltip-overlay\"},'span',attrs,false),on))]}}],null,false,338026003)},[(_vm.showOverallStatus !== 0)?_c('span',{staticClass:\"tooltip-text d-flex flex-column\"},[_c('span',{staticClass:\"tooltip-header\"},[_vm._v(\"Status: \"+_vm._s(_vm.status)+\" \"),_c('br'),_vm._v(\" \"),(_vm.showOverallStatus !== 1 && _vm.outageStartTime && _vm.tagTimeSpanByStatus)?_c('span',[_vm._v(\" (outage is detected for at least \"+_vm._s(_vm.tagTimeSpanByStatus.value)+\" \"+_vm._s(_vm.tagTimeSpanByStatus.unit)+\")\")]):_vm._e()]),(_vm.lastDataTimestamp && _vm.showOverallStatus == 1)?_c('span',{staticClass:\"tooltip-footer\"},[_vm._v(\"Last data observed: \"),_c('br'),_vm._v(\" \"+_vm._s(_vm.getFormatedDateTimeString(_vm.lastDataTimestamp))+\" UTC\")]):_vm._e(),(_vm.outageStartTime && _vm.showOverallStatus !== 1)?_c('span',{staticClass:\"tooltip-footer\"},[_vm._v(\"Outage started at: \"),_c('br'),_vm._v(\" \"+_vm._s(_vm.getFormatedDateTimeString(_vm.outageStartTime))+\" UTC\")]):_vm._e()]):_c('span',{staticClass:\"tooltip-text d-flex flex-column\"},[_vm._v(\" Feature is not available for this vessel \")])]):_vm._e()],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport { Component, Prop, Vue } from \"vue-property-decorator\";\nimport store from \"@/store\";\n// utilities\nimport dateHelper from \"Utilities/date-helper\";\nimport moment from \"moment\";\n\nimport { getModule } from \"vuex-module-decorators\";\nimport DataQualityModule from \"@/store/clients/DataQuality.module\";\n\nconst DataQuality = getModule(DataQualityModule, store);\n\n@Component({})\nexport default class DataQualityIndicator extends Vue {\n @Prop({ type: Number, default: 0 }) showOverallStatus!: Number;\n @Prop({ type: Boolean, default: false }) withText!: boolean;\n @Prop({ type: String, default: \"\" }) columnName!: string;\n @Prop({ type: String, default: \"\" }) link?: string;\n @Prop({ type: String, default: null }) lastDataTimestamp?: string | null;\n @Prop({ type: String, default: null }) outageStartTime?: string | null;\n\n // @Getters\n get isOverallStatusColumn(): boolean {\n return this.columnName === \"Overall Status\";\n }\n\n get status(): string {\n switch (this.showOverallStatus) {\n case 1:\n return \"Available\";\n case 2:\n return \"Observe\";\n case 3:\n return \"Alert\";\n default:\n return \"N/A\";\n }\n }\n\n get tagTimeSpan(): any {\n if (!DataQuality.dataAvailabilityConfig) return null;\n const config = DataQuality.dataAvailabilityConfig.configurations.find(item => this.columnName === item.featureName);\n if (!config) return null;\n return {\n observeTimeSpan: this.convertToCorrectTimeUnit(config.warningTimeSeconds)[0],\n observeTimeSpanUnit: this.convertToCorrectTimeUnit(config.warningTimeSeconds)[1],\n criticalTimeSpan: this.convertToCorrectTimeUnit(config.criticalTimeSeconds)[0],\n criticalTimeSpanUnit: this.convertToCorrectTimeUnit(config.criticalTimeSeconds)[1],\n };\n }\n\n get tagTimeSpanByStatus(): { value: string; unit: string } | null {\n if (this.tagTimeSpan == null) return null;\n if (this.status === \"Observe\") {\n return { value: this.tagTimeSpan.observeTimeSpan, unit: this.tagTimeSpan.observeTimeSpanUnit };\n } else if (this.status === \"Alert\") {\n return { value: this.tagTimeSpan.criticalTimeSpan, unit: this.tagTimeSpan.criticalTimeSpanUnit };\n } else return null;\n }\n\n // @Methods\n navigateToLink(): void {\n if (this.link === undefined) {\n throw new Error(\"Link is undefined\");\n }\n this.$router.push(this.link);\n }\n\n convertToCorrectTimeUnit(numberInSeconds: number): [string, string] {\n if (numberInSeconds >= 2592000) {\n return [Math.round(numberInSeconds / 2592000).toString(), \"month (s)\"];\n }\n if (numberInSeconds >= 86400) {\n return [Math.round(numberInSeconds / 86400).toString(), \"day (s)\"];\n }\n if (numberInSeconds >= 3600) {\n return [Math.round(numberInSeconds / 3600).toString(), \"hour (s)\"];\n }\n\n return [numberInSeconds.toString(), \"second (s)\"];\n }\n\n getFormatedDateTimeString(timestamp: string): string {\n return dateHelper.getFormatedDateTimeString(timestamp);\n }\n\n duration(timestamp: string): string {\n return dateHelper.getHumanizeDuration(timestamp, moment().valueOf());\n }\n}\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--15-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/ts-loader/index.js??ref--15-3!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./DataQualityIndicator.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--15-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/ts-loader/index.js??ref--15-3!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./DataQualityIndicator.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./DataQualityIndicator.vue?vue&type=template&id=0374cdfc&scoped=true&\"\nimport script from \"./DataQualityIndicator.vue?vue&type=script&lang=ts&\"\nexport * from \"./DataQualityIndicator.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./DataQualityIndicator.vue?vue&type=style&index=0&id=0374cdfc&lang=scss&scoped=true&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"0374cdfc\",\n null\n \n)\n\nexport default component.exports\n\n/* vuetify-loader */\nimport installComponents from \"!../../../node_modules/vuetify-loader/lib/runtime/installComponents.js\"\nimport { VIcon } from 'vuetify/lib/components/VIcon';\nimport { VTooltip } from 'vuetify/lib/components/VTooltip';\ninstallComponents(component, {VIcon,VTooltip})\n","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport { Vue, Component, PropSync, Prop, Watch } from \"vue-property-decorator\";\nimport DataQualityIndicator from \"@/components/dataQuality/DataQualityIndicator.vue\";\nimport { DataQualityTagConfiguration } from \"@/types/dataQuality/dataQualityTagConfiguration\";\n\n@Component({\n components: {\n DataQualityIndicator,\n },\n})\nexport default class DataAvailabilityModalConfigureTags extends Vue {\n @PropSync(\"selectedTags\", { type: Array, default: [] }) tagsToConfigure!: DataQualityTagConfiguration[];\n @PropSync(\"commonConfiguration\", { type: Object, default: [] }) commonConfig!: DataQualityTagConfiguration;\n @PropSync(\"switch\", { type: Boolean, default: false }) applySameConfig!: boolean;\n @PropSync(\"hasGlobalError\", { type: Boolean, default: false }) syncHasGlobalError!: boolean;\n @Prop({ type: Boolean, default: () => [] }) loading!: boolean[];\n\n items = [{ state: \"hour (s)\" }, { state: \"day (s)\" }, { state: \"month (s)\" }];\n\n // @Watchers\n @Watch(\"tagsToConfigure\", { deep: true, immediate: true })\n onTagsToConfigureChanged(): void {\n this.syncHasGlobalError = this.tagsHasError;\n }\n @Watch(\"commonConfig\", { deep: true, immediate: true })\n onCommonConfigChanged(): void {\n this.syncHasGlobalError = this.commonConfigHasError;\n }\n\n @Watch(\"applySameConfig\", { immediate: true })\n onApplySameConfigChanged(): void {\n this.syncHasGlobalError = this.applySameConfig ? this.commonConfigHasError : this.tagsHasError;\n }\n\n // @Getters\n get tagsHasError(): boolean {\n return this.tagsToConfigure.some(tag => this.hasError(tag));\n }\n\n get commonConfigHasError(): boolean {\n return this.hasError(this.commonConfig);\n }\n\n // @Methods\n updateConfigurationTag($value: number | null, ref: string | null, data: DataQualityTagConfiguration): void {\n if ($value && ref && Number($value) === 0) {\n $value = 1;\n (this.$refs[ref] as any)[0].internalValue = $value;\n }\n this.$emit(\"updateConfigurationTag\", data);\n }\n onTagBlur(ref: string | null, data: DataQualityTagConfiguration): void {\n if (ref && Number((this.$refs[ref] as any)[0].internalValue) === 0) {\n const $value = 1;\n (this.$refs[ref] as any)[0].internalValue = $value;\n }\n this.$emit(\"updateConfigurationTag\", data);\n }\n\n hasError(data: DataQualityTagConfiguration): boolean {\n return this.convertToSeconds(data.observeTimeSpan, data.observeTimeSpanUnit) >= this.convertToSeconds(data.criticalTimeSpan, data.criticalTimeSpanUnit);\n }\n\n onInput($value: number, ref: string): void {\n if ($value && ref && Number($value) === 0) {\n $value = 1;\n (this.$refs[ref] as any).internalValue = $value;\n }\n }\n\n onBlur($value: number, ref: string): void {\n if (ref && Number((this.$refs[ref] as any).internalValue) === 0) {\n $value = 1;\n (this.$refs[ref] as any).internalValue = $value;\n }\n }\n\n numericFilter(event: any): void {\n event = event ? event : window.event;\n const expect = event.target.value.toString() + event.key.toString();\n return !/^\\d+$/.test(expect) ? event.preventDefault() : false;\n }\n\n convertToSeconds(number: string, unit: string): number {\n if (unit === \"year (s)\") {\n return Number(number) * 31536000;\n }\n if (unit === \"month (s)\") {\n return Number(number) * 2592000;\n }\n if (unit === \"day (s)\") {\n return Number(number) * 86400;\n }\n if (unit === \"hour (s)\") {\n return Number(number) * 3600;\n }\n if (unit === \"minute (s)\") {\n return Number(number) * 60;\n }\n return Number(number);\n }\n}\n","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--15-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/ts-loader/index.js??ref--15-3!../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./DataAvailabilityModalConfigureTags.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--15-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/ts-loader/index.js??ref--15-3!../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./DataAvailabilityModalConfigureTags.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./DataAvailabilityModalConfigureTags.vue?vue&type=template&id=752d9970&scoped=true&\"\nimport script from \"./DataAvailabilityModalConfigureTags.vue?vue&type=script&lang=ts&\"\nexport * from \"./DataAvailabilityModalConfigureTags.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./DataAvailabilityModalConfigureTags.vue?vue&type=style&index=0&id=752d9970&lang=scss&scoped=true&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"752d9970\",\n null\n \n)\n\nexport default component.exports\n\n/* vuetify-loader */\nimport installComponents from \"!../../../../node_modules/vuetify-loader/lib/runtime/installComponents.js\"\nimport { VSelect } from 'vuetify/lib/components/VSelect';\nimport { VSkeletonLoader } from 'vuetify/lib/components/VSkeletonLoader';\nimport { VSwitch } from 'vuetify/lib/components/VSwitch';\nimport { VTextField } from 'vuetify/lib/components/VTextField';\ninstallComponents(component, {VSelect,VSkeletonLoader,VSwitch,VTextField})\n","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport { Component, PropSync, Vue } from \"vue-property-decorator\";\nimport store from \"@/store\";\n// components\nimport DataAvailabilityModalFooter from \"./DataAvailabilityModalFooter.vue\";\nimport DataAvailabilityModalConfigureTags from \"./DataAvailabilityModalConfigureTags.vue\";\n// types\nimport { DataQualityTagConfiguration } from \"@/types/dataQuality/dataQualityTagConfiguration\";\nimport { DataAvailabilityConfiguration } from \"@/types/dataQuality/dataAvailability\";\n// modules\nimport { getModule } from \"vuex-module-decorators\";\nimport DataQualityModule from \"@/store/clients/DataQuality.module\";\nimport SnackbarModule from \"@/store/clients/Snackbar.module\";\n\nconst DataQuality = getModule(DataQualityModule, store);\nconst Snackbar = getModule(SnackbarModule, store);\n\n@Component({\n components: {\n DataAvailabilityModalFooter,\n DataAvailabilityModalConfigureTags,\n },\n})\nexport default class DataAvailabilityModal extends Vue {\n @PropSync(\"isOpen\", { type: Boolean, default: false }) dialog!: boolean;\n\n applySameConfig = false;\n dataAvailabilityConfigModel: DataQualityTagConfiguration[] = [];\n updatedConfigurationTags: number[] = [];\n hasGlobalError = false;\n\n get dataAvailabilityConfig(): DataQualityTagConfiguration[] {\n if (!DataQuality.dataAvailabilityConfig) return [];\n var config: DataQualityTagConfiguration[] = DataQuality.dataAvailabilityConfig.configurations.map(item => ({\n featureId: item.featureId,\n tagName: item.featureName ?? \"\",\n observeTimeSpan: this.convertToCorrectTimeUnit(item.warningTimeSeconds)[0],\n observeTimeSpanUnit: this.convertToCorrectTimeUnit(item.warningTimeSeconds)[1],\n criticalTimeSpan: this.convertToCorrectTimeUnit(item.criticalTimeSeconds)[0],\n criticalTimeSpanUnit: this.convertToCorrectTimeUnit(item.criticalTimeSeconds)[1],\n }));\n return config;\n }\n\n get updatedConfigurationList(): DataAvailabilityConfiguration[] {\n return this.dataAvailabilityConfigModel\n .filter(item => (item.featureId !== null ? this.updatedConfigurationTags.includes(item.featureId) : false))\n .map(item => ({\n featureId: item.featureId,\n featureName: item.tagName,\n warningTimeSeconds: this.convertToSeconds(item.observeTimeSpan, item.observeTimeSpanUnit),\n criticalTimeSeconds: this.convertToSeconds(item.criticalTimeSpan, item.criticalTimeSpanUnit),\n }));\n }\n\n async created(): Promise {\n await Promise.all([DataQuality.refreshDataAvailabilityConfig()]);\n this.dataAvailabilityConfigModel = this.dataAvailabilityConfig;\n this.applySameConfig = DataQuality.dataAvailabilityConfig?.isGlobalConfig ?? false;\n if (this.applySameConfig) {\n this.commonConfig = {\n featureId: null,\n tagName: \"\",\n observeTimeSpan: this.dataAvailabilityConfigModel[0].observeTimeSpan,\n observeTimeSpanUnit: this.dataAvailabilityConfigModel[0].observeTimeSpanUnit,\n criticalTimeSpan: this.dataAvailabilityConfigModel[0].criticalTimeSpan,\n criticalTimeSpanUnit: this.dataAvailabilityConfigModel[0].criticalTimeSpanUnit,\n };\n }\n }\n\n convertToCorrectTimeUnit(numberInSeconds: number): [string, string] {\n // if (numberInSeconds >= 31536000) {\n // return [Math.round(numberInSeconds / 31536000).toString(), \"year (s)\"];\n // }\n if (numberInSeconds >= 2592000) {\n return [Math.round(numberInSeconds / 2592000).toString(), \"month (s)\"];\n }\n if (numberInSeconds >= 86400) {\n return [Math.round(numberInSeconds / 86400).toString(), \"day (s)\"];\n }\n if (numberInSeconds >= 3600) {\n return [Math.round(numberInSeconds / 3600).toString(), \"hour (s)\"];\n }\n // if (numberInSeconds >= 60) {\n // return [Math.round(numberInSeconds / 60).toString(), \"minute (s)\"];\n // }\n\n return [numberInSeconds.toString(), \"second (s)\"];\n }\n\n convertToSeconds(number: string, unit: string): number {\n if (unit === \"year (s)\") {\n return Number(number) * 31536000;\n }\n if (unit === \"month (s)\") {\n return Number(number) * 2592000;\n }\n if (unit === \"day (s)\") {\n return Number(number) * 86400;\n }\n if (unit === \"hour (s)\") {\n return Number(number) * 3600;\n }\n if (unit === \"minute (s)\") {\n return Number(number) * 60;\n }\n return Number(number);\n }\n\n commonConfig: DataQualityTagConfiguration = {\n featureId: null,\n tagName: \"\",\n observeTimeSpan: \"1\",\n observeTimeSpanUnit: \"hour (s)\",\n criticalTimeSpan: \"1\",\n criticalTimeSpanUnit: \"day (s)\",\n };\n\n get getButtonAvailability(): boolean {\n if (this.hasGlobalError) return true;\n if (this.applySameConfig) {\n if (this.commonConfig.observeTimeSpan === \"\" || this.commonConfig.observeTimeSpan === \"0\") {\n return true;\n }\n if (this.commonConfig.criticalTimeSpan === \"\" || this.commonConfig.criticalTimeSpan === \"0\") {\n return true;\n }\n } else {\n const invalidTag = this.dataAvailabilityConfigModel.find(tag => {\n if (tag.tagName === \"\") {\n return true;\n }\n if (tag.observeTimeSpan === \"\" || tag.observeTimeSpan === \"0\") {\n return true;\n }\n if (tag.criticalTimeSpan === \"\" || tag.criticalTimeSpan === \"0\") {\n return true;\n }\n if (isNaN(Number(tag.observeTimeSpan)) || isNaN(Number(tag.criticalTimeSpan))) {\n return true;\n }\n return false;\n });\n if (invalidTag) {\n return true;\n }\n }\n return false;\n }\n\n get alertMessage(): string {\n if (this.applySameConfig) {\n if (this.commonConfig.observeTimeSpan === \"\" || this.commonConfig.observeTimeSpan === \"0\") {\n return \"Observe time span cannot be empty or 0\";\n }\n if (this.commonConfig.criticalTimeSpan === \"\" || this.commonConfig.criticalTimeSpan === \"0\") {\n return \"Alert time span cannot be empty or 0\";\n }\n if (isNaN(Number(this.commonConfig.observeTimeSpan)) || isNaN(Number(this.commonConfig.criticalTimeSpan))) {\n return \"Time span must be a number\";\n }\n } else {\n const invalidTag = this.dataAvailabilityConfigModel.find(tag => {\n if (tag.tagName === \"\") {\n return true;\n }\n if (tag.observeTimeSpan === \"\" || tag.observeTimeSpan === \"0\") {\n return true;\n }\n if (tag.criticalTimeSpan === \"\" || tag.criticalTimeSpan === \"0\") {\n return true;\n }\n if (isNaN(Number(tag.observeTimeSpan)) || isNaN(Number(tag.criticalTimeSpan))) {\n return true;\n }\n return false;\n });\n if (invalidTag) {\n if (invalidTag.tagName === \"\") {\n return \"Tag name cannot be empty\";\n }\n if (invalidTag.observeTimeSpan === \"\" || invalidTag.observeTimeSpan == \"0\") {\n return \"Observe time span cannot be empty or 0\";\n }\n if (invalidTag.criticalTimeSpan === \"\" || invalidTag.criticalTimeSpan == \"0\") {\n return \"Alert time span cannot be empty or 0\";\n }\n if (isNaN(Number(invalidTag.observeTimeSpan)) || isNaN(Number(invalidTag.criticalTimeSpan))) {\n return \"Time span must be a number\";\n }\n }\n }\n return \"\";\n }\n\n async submitConfiguration(): Promise {\n if (this.applySameConfig) {\n let config = [\n {\n featureId: this.commonConfig.featureId,\n warningTimeSeconds: this.convertToSeconds(this.commonConfig.observeTimeSpan, this.commonConfig.observeTimeSpanUnit),\n criticalTimeSeconds: this.convertToSeconds(this.commonConfig.criticalTimeSpan, this.commonConfig.criticalTimeSpanUnit),\n },\n ];\n try {\n await DataQuality.updateDataAvailabilityConfig(config);\n this.applySameConfigurationToAllTags();\n await DataQuality.refreshDataAvailability();\n await DataQuality.refreshDataAvailabilityConfig();\n Snackbar.showSnackbar({\n text: `Configurations was successfully updated`,\n color: \"success\",\n });\n } catch (error) {\n Snackbar.showSnackbar({ text: \"Failed to submit configurations\" });\n }\n } else {\n let config: DataAvailabilityConfiguration[] = this.updatedConfigurationList;\n try {\n await DataQuality.updateDataAvailabilityConfig(config);\n await DataQuality.refreshDataAvailability();\n await DataQuality.refreshDataAvailabilityConfig();\n Snackbar.showSnackbar({\n text: `Configurations was successfully updated`,\n color: \"success\",\n });\n } catch (error) {\n Snackbar.showSnackbar({ text: \"Failed to submit configurations\" });\n }\n }\n\n this.closeModal();\n }\n\n applySameConfigurationToAllTags(): void {\n this.dataAvailabilityConfigModel.forEach(tag => {\n tag.observeTimeSpan = this.commonConfig.observeTimeSpan;\n tag.observeTimeSpanUnit = this.commonConfig.observeTimeSpanUnit;\n tag.criticalTimeSpan = this.commonConfig.criticalTimeSpan;\n tag.criticalTimeSpanUnit = this.commonConfig.criticalTimeSpanUnit;\n });\n }\n\n updateConfigurationTag(data: DataQualityTagConfiguration): void {\n if (data.featureId === null) return;\n if (this.updatedConfigurationTags.includes(data.featureId)) return;\n this.updatedConfigurationTags.push(data.featureId);\n }\n\n closeModal(): void {\n this.dialog = false;\n }\n}\n","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--15-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/ts-loader/index.js??ref--15-3!../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./DataAvailabilityModal.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--15-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/ts-loader/index.js??ref--15-3!../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./DataAvailabilityModal.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./DataAvailabilityModal.vue?vue&type=template&id=1afde6cb&scoped=true&\"\nimport script from \"./DataAvailabilityModal.vue?vue&type=script&lang=ts&\"\nexport * from \"./DataAvailabilityModal.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./DataAvailabilityModal.vue?vue&type=style&index=0&id=1afde6cb&lang=scss&scoped=true&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"1afde6cb\",\n null\n \n)\n\nexport default component.exports\n\n/* vuetify-loader */\nimport installComponents from \"!../../../../node_modules/vuetify-loader/lib/runtime/installComponents.js\"\nimport { VBtn } from 'vuetify/lib/components/VBtn';\nimport { VCard } from 'vuetify/lib/components/VCard';\nimport { VCardSubtitle } from 'vuetify/lib/components/VCard';\nimport { VCardText } from 'vuetify/lib/components/VCard';\nimport { VCardTitle } from 'vuetify/lib/components/VCard';\nimport { VDialog } from 'vuetify/lib/components/VDialog';\nimport { VIcon } from 'vuetify/lib/components/VIcon';\nimport { VSpacer } from 'vuetify/lib/components/VGrid';\ninstallComponents(component, {VBtn,VCard,VCardSubtitle,VCardText,VCardTitle,VDialog,VIcon,VSpacer})\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('v-data-table',{attrs:{\"loading\":_vm.loading,\"items\":_vm.rows,\"headers\":_vm.headers,\"custom-sort\":_vm.customSort,\"items-per-page\":_vm.limitPerPage,\"hide-default-footer\":_vm.isLessThanLimitPerPage},scopedSlots:_vm._u([_vm._l((_vm.headers),function(header){return {key:(\"header.\" + (header.value)),fn:function(ref){\nvar header = ref.header;\nreturn [(!_vm.loading)?_c('div',{staticClass:\"d-inline-flex\"},[_c('span',{domProps:{\"innerHTML\":_vm._s(header.text)}}),(header.tooltip)?_c('v-tooltip',{attrs:{\"bottom\":\"\",\"color\":\"black\",\"content-class\":\"with-triangle\",\"max-width\":\"280\"},scopedSlots:_vm._u([{key:\"activator\",fn:function(ref){\nvar on = ref.on;\nvar attrs = ref.attrs;\nreturn [_c('v-icon',_vm._g(_vm._b({staticClass:\"ml-1\",attrs:{\"color\":\"darkGrey75\",\"size\":\"medium\"}},'v-icon',attrs,false),on),[_vm._v(\"mdi-information-outline\")])]}}],null,true)},[_c('span',{staticClass:\"tooltip-text\"},[_vm._v(_vm._s(header.tooltip))])]):_vm._e()],1):_vm._e()]}}}),{key:\"item\",fn:function(ref){\nvar item = ref.item;\nreturn [(!_vm.loading)?_c('tr',_vm._l((_vm.headers),function(header,index){return _c('td',{key:index,class:{\n 'first-column': index === 0,\n }},[(item[header.value])?_c('DataQualityTableRow',{attrs:{\"dataQualityRow\":item[header.value],\"type\":header.type,\"columnName\":header.text,\"link\":_vm.links ? _vm.links[index] : null}}):_vm._e()],1)}),0):_vm._e()]}},(true)?{key:\"progress\",fn:function(){return [_c('v-skeleton-loader',{attrs:{\"type\":\"table-tbody\",\"types\":_vm.skeletonStructure}})]},proxy:true}:null],null,true)})],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[(_vm.type === 'string')?_c('div',[(_vm.dataQualityRow.link)?_c('a',{attrs:{\"href\":_vm.dataQualityRow.link}},[_vm._v(_vm._s(_vm.dataQualityRow.value))]):_c('span',[_vm._v(_vm._s(_vm.dataQualityRow.value))])]):_vm._e(),(_vm.type == 'dataIndicator')?_c('div',[_c('DataQualityIndicator',{attrs:{\"showOverallStatus\":_vm.dataQualityRow.value,\"columnName\":_vm.columnName,\"link\":_vm.link,\"lastDataTimestamp\":_vm.dataQualityRow.lastDataTimestamp,\"outageStartTime\":_vm.dataQualityRow.outageStartTime,\"outageDetectionTime\":_vm.dataQualityRow.outageDetectionTime}})],1):_vm._e(),(_vm.type == 'percentIndicator')?_c('div',[_c('DataQualityPercentageIndicator',{attrs:{\"percentage\":_vm.dataQualityRow.value,\"warningDeviation\":_vm.dataQualityRow.warningThreshold,\"criticalDeviation\":_vm.dataQualityRow.criticalThreshold}})],1):_vm._e()])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{class:_vm.percentageColor},[_vm._v(\" \"+_vm._s(_vm.percentage + \"%\")+\" \")])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n\n\n\n\n import { Component, Prop, Vue } from \"vue-property-decorator\";\n\n@Component({})\n export default class DataQualityPercentageIndicator extends Vue {\n @Prop({ type: Number, default: 0 }) percentage!: number;\n @Prop({ type: Number, default: 5 }) warningDeviation!: number;\n @Prop({ type: Number, default: 10 }) criticalDeviation!: number;\n\n get percentageColor(): string {\n if (this.percentage > this.criticalDeviation!) {\n return \"redText\";\n }\n if (this.percentage > this.warningDeviation!) {\n return \"orangeText\";\n }\n return \"greenText\";\n }\n }\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--15-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/ts-loader/index.js??ref--15-3!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./DataQualityPercentageIndicator.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--15-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/ts-loader/index.js??ref--15-3!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./DataQualityPercentageIndicator.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./DataQualityPercentageIndicator.vue?vue&type=template&id=cce00b3c&scoped=true&\"\nimport script from \"./DataQualityPercentageIndicator.vue?vue&type=script&lang=ts&\"\nexport * from \"./DataQualityPercentageIndicator.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./DataQualityPercentageIndicator.vue?vue&type=style&index=0&id=cce00b3c&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"cce00b3c\",\n null\n \n)\n\nexport default component.exports","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport { DataQualityRow } from \"@/types/dataQuality/dataQualityTable\";\nimport { Component, Prop, Vue } from \"vue-property-decorator\";\nimport DataQualityIndicator from \"@/components/dataQuality/DataQualityIndicator.vue\";\nimport DataQualityPercentageIndicator from \"@/components/dataQuality/DataQualityPercentageIndicator.vue\";\n\n@Component({\n components: {\n DataQualityIndicator,\n DataQualityPercentageIndicator,\n },\n})\nexport default class DataQualityTableRow extends Vue {\n @Prop({ type: Object }) dataQualityRow!: DataQualityRow;\n @Prop({ type: String, default: \"\" }) type!: string;\n @Prop({ type: String, default: \"\" }) columnName!: string;\n @Prop({ type: String, default: \"\" }) link?: string;\n}\n","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--15-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/ts-loader/index.js??ref--15-3!../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./DataQualityTableRow.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--15-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/ts-loader/index.js??ref--15-3!../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./DataQualityTableRow.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./DataQualityTableRow.vue?vue&type=template&id=693bcc24&scoped=true&\"\nimport script from \"./DataQualityTableRow.vue?vue&type=script&lang=ts&\"\nexport * from \"./DataQualityTableRow.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./DataQualityTableRow.vue?vue&type=style&index=0&id=693bcc24&lang=scss&scoped=true&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"693bcc24\",\n null\n \n)\n\nexport default component.exports","// Licensed to the .NET Foundation under one or more agreements.\r\n// The .NET Foundation licenses this file to you under the MIT license.\r\n// 0, 2, 10, 30 second delays before reconnect attempts.\r\nconst DEFAULT_RETRY_DELAYS_IN_MILLISECONDS = [0, 2000, 10000, 30000, null];\r\n/** @private */\r\nexport class DefaultReconnectPolicy {\r\n constructor(retryDelays) {\r\n this._retryDelays = retryDelays !== undefined ? [...retryDelays, null] : DEFAULT_RETRY_DELAYS_IN_MILLISECONDS;\r\n }\r\n nextRetryDelayInMilliseconds(retryContext) {\r\n return this._retryDelays[retryContext.previousRetryCount];\r\n }\r\n}\r\n//# sourceMappingURL=DefaultReconnectPolicy.js.map","// Licensed to the .NET Foundation under one or more agreements.\r\n// The .NET Foundation licenses this file to you under the MIT license.\r\nexport class HeaderNames {\r\n}\r\nHeaderNames.Authorization = \"Authorization\";\r\nHeaderNames.Cookie = \"Cookie\";\r\n//# sourceMappingURL=HeaderNames.js.map","// Licensed to the .NET Foundation under one or more agreements.\r\n// The .NET Foundation licenses this file to you under the MIT license.\r\n/** Represents an HTTP response. */\r\nexport class HttpResponse {\r\n constructor(statusCode, statusText, content) {\r\n this.statusCode = statusCode;\r\n this.statusText = statusText;\r\n this.content = content;\r\n }\r\n}\r\n/** Abstraction over an HTTP client.\r\n *\r\n * This class provides an abstraction over an HTTP client so that a different implementation can be provided on different platforms.\r\n */\r\nexport class HttpClient {\r\n get(url, options) {\r\n return this.send({\r\n ...options,\r\n method: \"GET\",\r\n url,\r\n });\r\n }\r\n post(url, options) {\r\n return this.send({\r\n ...options,\r\n method: \"POST\",\r\n url,\r\n });\r\n }\r\n delete(url, options) {\r\n return this.send({\r\n ...options,\r\n method: \"DELETE\",\r\n url,\r\n });\r\n }\r\n /** Gets all cookies that apply to the specified URL.\r\n *\r\n * @param url The URL that the cookies are valid for.\r\n * @returns {string} A string containing all the key-value cookie pairs for the specified URL.\r\n */\r\n // @ts-ignore\r\n getCookieString(url) {\r\n return \"\";\r\n }\r\n}\r\n//# sourceMappingURL=HttpClient.js.map","// Licensed to the .NET Foundation under one or more agreements.\r\n// The .NET Foundation licenses this file to you under the MIT license.\r\nimport { HeaderNames } from \"./HeaderNames\";\r\nimport { HttpClient } from \"./HttpClient\";\r\n/** @private */\r\nexport class AccessTokenHttpClient extends HttpClient {\r\n constructor(innerClient, accessTokenFactory) {\r\n super();\r\n this._innerClient = innerClient;\r\n this._accessTokenFactory = accessTokenFactory;\r\n }\r\n async send(request) {\r\n let allowRetry = true;\r\n if (this._accessTokenFactory && (!this._accessToken || (request.url && request.url.indexOf(\"/negotiate?\") > 0))) {\r\n // don't retry if the request is a negotiate or if we just got a potentially new token from the access token factory\r\n allowRetry = false;\r\n this._accessToken = await this._accessTokenFactory();\r\n }\r\n this._setAuthorizationHeader(request);\r\n const response = await this._innerClient.send(request);\r\n if (allowRetry && response.statusCode === 401 && this._accessTokenFactory) {\r\n this._accessToken = await this._accessTokenFactory();\r\n this._setAuthorizationHeader(request);\r\n return await this._innerClient.send(request);\r\n }\r\n return response;\r\n }\r\n _setAuthorizationHeader(request) {\r\n if (!request.headers) {\r\n request.headers = {};\r\n }\r\n if (this._accessToken) {\r\n request.headers[HeaderNames.Authorization] = `Bearer ${this._accessToken}`;\r\n }\r\n // don't remove the header if there isn't an access token factory, the user manually added the header in this case\r\n else if (this._accessTokenFactory) {\r\n if (request.headers[HeaderNames.Authorization]) {\r\n delete request.headers[HeaderNames.Authorization];\r\n }\r\n }\r\n }\r\n getCookieString(url) {\r\n return this._innerClient.getCookieString(url);\r\n }\r\n}\r\n//# sourceMappingURL=AccessTokenHttpClient.js.map","// Licensed to the .NET Foundation under one or more agreements.\r\n// The .NET Foundation licenses this file to you under the MIT license.\r\n/** Error thrown when an HTTP request fails. */\r\nexport class HttpError extends Error {\r\n /** Constructs a new instance of {@link @microsoft/signalr.HttpError}.\r\n *\r\n * @param {string} errorMessage A descriptive error message.\r\n * @param {number} statusCode The HTTP status code represented by this error.\r\n */\r\n constructor(errorMessage, statusCode) {\r\n const trueProto = new.target.prototype;\r\n super(`${errorMessage}: Status code '${statusCode}'`);\r\n this.statusCode = statusCode;\r\n // Workaround issue in Typescript compiler\r\n // https://github.com/Microsoft/TypeScript/issues/13965#issuecomment-278570200\r\n this.__proto__ = trueProto;\r\n }\r\n}\r\n/** Error thrown when a timeout elapses. */\r\nexport class TimeoutError extends Error {\r\n /** Constructs a new instance of {@link @microsoft/signalr.TimeoutError}.\r\n *\r\n * @param {string} errorMessage A descriptive error message.\r\n */\r\n constructor(errorMessage = \"A timeout occurred.\") {\r\n const trueProto = new.target.prototype;\r\n super(errorMessage);\r\n // Workaround issue in Typescript compiler\r\n // https://github.com/Microsoft/TypeScript/issues/13965#issuecomment-278570200\r\n this.__proto__ = trueProto;\r\n }\r\n}\r\n/** Error thrown when an action is aborted. */\r\nexport class AbortError extends Error {\r\n /** Constructs a new instance of {@link AbortError}.\r\n *\r\n * @param {string} errorMessage A descriptive error message.\r\n */\r\n constructor(errorMessage = \"An abort occurred.\") {\r\n const trueProto = new.target.prototype;\r\n super(errorMessage);\r\n // Workaround issue in Typescript compiler\r\n // https://github.com/Microsoft/TypeScript/issues/13965#issuecomment-278570200\r\n this.__proto__ = trueProto;\r\n }\r\n}\r\n/** Error thrown when the selected transport is unsupported by the browser. */\r\n/** @private */\r\nexport class UnsupportedTransportError extends Error {\r\n /** Constructs a new instance of {@link @microsoft/signalr.UnsupportedTransportError}.\r\n *\r\n * @param {string} message A descriptive error message.\r\n * @param {HttpTransportType} transport The {@link @microsoft/signalr.HttpTransportType} this error occurred on.\r\n */\r\n constructor(message, transport) {\r\n const trueProto = new.target.prototype;\r\n super(message);\r\n this.transport = transport;\r\n this.errorType = 'UnsupportedTransportError';\r\n // Workaround issue in Typescript compiler\r\n // https://github.com/Microsoft/TypeScript/issues/13965#issuecomment-278570200\r\n this.__proto__ = trueProto;\r\n }\r\n}\r\n/** Error thrown when the selected transport is disabled by the browser. */\r\n/** @private */\r\nexport class DisabledTransportError extends Error {\r\n /** Constructs a new instance of {@link @microsoft/signalr.DisabledTransportError}.\r\n *\r\n * @param {string} message A descriptive error message.\r\n * @param {HttpTransportType} transport The {@link @microsoft/signalr.HttpTransportType} this error occurred on.\r\n */\r\n constructor(message, transport) {\r\n const trueProto = new.target.prototype;\r\n super(message);\r\n this.transport = transport;\r\n this.errorType = 'DisabledTransportError';\r\n // Workaround issue in Typescript compiler\r\n // https://github.com/Microsoft/TypeScript/issues/13965#issuecomment-278570200\r\n this.__proto__ = trueProto;\r\n }\r\n}\r\n/** Error thrown when the selected transport cannot be started. */\r\n/** @private */\r\nexport class FailedToStartTransportError extends Error {\r\n /** Constructs a new instance of {@link @microsoft/signalr.FailedToStartTransportError}.\r\n *\r\n * @param {string} message A descriptive error message.\r\n * @param {HttpTransportType} transport The {@link @microsoft/signalr.HttpTransportType} this error occurred on.\r\n */\r\n constructor(message, transport) {\r\n const trueProto = new.target.prototype;\r\n super(message);\r\n this.transport = transport;\r\n this.errorType = 'FailedToStartTransportError';\r\n // Workaround issue in Typescript compiler\r\n // https://github.com/Microsoft/TypeScript/issues/13965#issuecomment-278570200\r\n this.__proto__ = trueProto;\r\n }\r\n}\r\n/** Error thrown when the negotiation with the server failed to complete. */\r\n/** @private */\r\nexport class FailedToNegotiateWithServerError extends Error {\r\n /** Constructs a new instance of {@link @microsoft/signalr.FailedToNegotiateWithServerError}.\r\n *\r\n * @param {string} message A descriptive error message.\r\n */\r\n constructor(message) {\r\n const trueProto = new.target.prototype;\r\n super(message);\r\n this.errorType = 'FailedToNegotiateWithServerError';\r\n // Workaround issue in Typescript compiler\r\n // https://github.com/Microsoft/TypeScript/issues/13965#issuecomment-278570200\r\n this.__proto__ = trueProto;\r\n }\r\n}\r\n/** Error thrown when multiple errors have occurred. */\r\n/** @private */\r\nexport class AggregateErrors extends Error {\r\n /** Constructs a new instance of {@link @microsoft/signalr.AggregateErrors}.\r\n *\r\n * @param {string} message A descriptive error message.\r\n * @param {Error[]} innerErrors The collection of errors this error is aggregating.\r\n */\r\n constructor(message, innerErrors) {\r\n const trueProto = new.target.prototype;\r\n super(message);\r\n this.innerErrors = innerErrors;\r\n // Workaround issue in Typescript compiler\r\n // https://github.com/Microsoft/TypeScript/issues/13965#issuecomment-278570200\r\n this.__proto__ = trueProto;\r\n }\r\n}\r\n//# sourceMappingURL=Errors.js.map","// Licensed to the .NET Foundation under one or more agreements.\r\n// The .NET Foundation licenses this file to you under the MIT license.\r\n// This will be treated as a bit flag in the future, so we keep it using power-of-two values.\r\n/** Specifies a specific HTTP transport type. */\r\nexport var HttpTransportType;\r\n(function (HttpTransportType) {\r\n /** Specifies no transport preference. */\r\n HttpTransportType[HttpTransportType[\"None\"] = 0] = \"None\";\r\n /** Specifies the WebSockets transport. */\r\n HttpTransportType[HttpTransportType[\"WebSockets\"] = 1] = \"WebSockets\";\r\n /** Specifies the Server-Sent Events transport. */\r\n HttpTransportType[HttpTransportType[\"ServerSentEvents\"] = 2] = \"ServerSentEvents\";\r\n /** Specifies the Long Polling transport. */\r\n HttpTransportType[HttpTransportType[\"LongPolling\"] = 4] = \"LongPolling\";\r\n})(HttpTransportType || (HttpTransportType = {}));\r\n/** Specifies the transfer format for a connection. */\r\nexport var TransferFormat;\r\n(function (TransferFormat) {\r\n /** Specifies that only text data will be transmitted over the connection. */\r\n TransferFormat[TransferFormat[\"Text\"] = 1] = \"Text\";\r\n /** Specifies that binary data will be transmitted over the connection. */\r\n TransferFormat[TransferFormat[\"Binary\"] = 2] = \"Binary\";\r\n})(TransferFormat || (TransferFormat = {}));\r\n//# sourceMappingURL=ITransport.js.map","// Licensed to the .NET Foundation under one or more agreements.\r\n// The .NET Foundation licenses this file to you under the MIT license.\r\nimport { AbortError, HttpError, TimeoutError } from \"./Errors\";\r\nimport { HttpClient, HttpResponse } from \"./HttpClient\";\r\nimport { LogLevel } from \"./ILogger\";\r\nimport { Platform, getGlobalThis, isArrayBuffer } from \"./Utils\";\r\nexport class FetchHttpClient extends HttpClient {\r\n constructor(logger) {\r\n super();\r\n this._logger = logger;\r\n // Node added a fetch implementation to the global scope starting in v18.\r\n // We need to add a cookie jar in node to be able to share cookies with WebSocket\r\n if (typeof fetch === \"undefined\" || Platform.isNode) {\r\n // In order to ignore the dynamic require in webpack builds we need to do this magic\r\n // @ts-ignore: TS doesn't know about these names\r\n const requireFunc = typeof __webpack_require__ === \"function\" ? __non_webpack_require__ : require;\r\n // Cookies aren't automatically handled in Node so we need to add a CookieJar to preserve cookies across requests\r\n this._jar = new (requireFunc(\"tough-cookie\")).CookieJar();\r\n if (typeof fetch === \"undefined\") {\r\n this._fetchType = requireFunc(\"node-fetch\");\r\n }\r\n else {\r\n // Use fetch from Node if available\r\n this._fetchType = fetch;\r\n }\r\n // node-fetch doesn't have a nice API for getting and setting cookies\r\n // fetch-cookie will wrap a fetch implementation with a default CookieJar or a provided one\r\n this._fetchType = requireFunc(\"fetch-cookie\")(this._fetchType, this._jar);\r\n }\r\n else {\r\n this._fetchType = fetch.bind(getGlobalThis());\r\n }\r\n if (typeof AbortController === \"undefined\") {\r\n // In order to ignore the dynamic require in webpack builds we need to do this magic\r\n // @ts-ignore: TS doesn't know about these names\r\n const requireFunc = typeof __webpack_require__ === \"function\" ? __non_webpack_require__ : require;\r\n // Node needs EventListener methods on AbortController which our custom polyfill doesn't provide\r\n this._abortControllerType = requireFunc(\"abort-controller\");\r\n }\r\n else {\r\n this._abortControllerType = AbortController;\r\n }\r\n }\r\n /** @inheritDoc */\r\n async send(request) {\r\n // Check that abort was not signaled before calling send\r\n if (request.abortSignal && request.abortSignal.aborted) {\r\n throw new AbortError();\r\n }\r\n if (!request.method) {\r\n throw new Error(\"No method defined.\");\r\n }\r\n if (!request.url) {\r\n throw new Error(\"No url defined.\");\r\n }\r\n const abortController = new this._abortControllerType();\r\n let error;\r\n // Hook our abortSignal into the abort controller\r\n if (request.abortSignal) {\r\n request.abortSignal.onabort = () => {\r\n abortController.abort();\r\n error = new AbortError();\r\n };\r\n }\r\n // If a timeout has been passed in, setup a timeout to call abort\r\n // Type needs to be any to fit window.setTimeout and NodeJS.setTimeout\r\n let timeoutId = null;\r\n if (request.timeout) {\r\n const msTimeout = request.timeout;\r\n timeoutId = setTimeout(() => {\r\n abortController.abort();\r\n this._logger.log(LogLevel.Warning, `Timeout from HTTP request.`);\r\n error = new TimeoutError();\r\n }, msTimeout);\r\n }\r\n if (request.content === \"\") {\r\n request.content = undefined;\r\n }\r\n if (request.content) {\r\n // Explicitly setting the Content-Type header for React Native on Android platform.\r\n request.headers = request.headers || {};\r\n if (isArrayBuffer(request.content)) {\r\n request.headers[\"Content-Type\"] = \"application/octet-stream\";\r\n }\r\n else {\r\n request.headers[\"Content-Type\"] = \"text/plain;charset=UTF-8\";\r\n }\r\n }\r\n let response;\r\n try {\r\n response = await this._fetchType(request.url, {\r\n body: request.content,\r\n cache: \"no-cache\",\r\n credentials: request.withCredentials === true ? \"include\" : \"same-origin\",\r\n headers: {\r\n \"X-Requested-With\": \"XMLHttpRequest\",\r\n ...request.headers,\r\n },\r\n method: request.method,\r\n mode: \"cors\",\r\n redirect: \"follow\",\r\n signal: abortController.signal,\r\n });\r\n }\r\n catch (e) {\r\n if (error) {\r\n throw error;\r\n }\r\n this._logger.log(LogLevel.Warning, `Error from HTTP request. ${e}.`);\r\n throw e;\r\n }\r\n finally {\r\n if (timeoutId) {\r\n clearTimeout(timeoutId);\r\n }\r\n if (request.abortSignal) {\r\n request.abortSignal.onabort = null;\r\n }\r\n }\r\n if (!response.ok) {\r\n const errorMessage = await deserializeContent(response, \"text\");\r\n throw new HttpError(errorMessage || response.statusText, response.status);\r\n }\r\n const content = deserializeContent(response, request.responseType);\r\n const payload = await content;\r\n return new HttpResponse(response.status, response.statusText, payload);\r\n }\r\n getCookieString(url) {\r\n let cookies = \"\";\r\n if (Platform.isNode && this._jar) {\r\n // @ts-ignore: unused variable\r\n this._jar.getCookies(url, (e, c) => cookies = c.join(\"; \"));\r\n }\r\n return cookies;\r\n }\r\n}\r\nfunction deserializeContent(response, responseType) {\r\n let content;\r\n switch (responseType) {\r\n case \"arraybuffer\":\r\n content = response.arrayBuffer();\r\n break;\r\n case \"text\":\r\n content = response.text();\r\n break;\r\n case \"blob\":\r\n case \"document\":\r\n case \"json\":\r\n throw new Error(`${responseType} is not supported.`);\r\n default:\r\n content = response.text();\r\n break;\r\n }\r\n return content;\r\n}\r\n//# sourceMappingURL=FetchHttpClient.js.map","// Licensed to the .NET Foundation under one or more agreements.\r\n// The .NET Foundation licenses this file to you under the MIT license.\r\nimport { AbortError, HttpError, TimeoutError } from \"./Errors\";\r\nimport { HttpClient, HttpResponse } from \"./HttpClient\";\r\nimport { LogLevel } from \"./ILogger\";\r\nimport { isArrayBuffer } from \"./Utils\";\r\nexport class XhrHttpClient extends HttpClient {\r\n constructor(logger) {\r\n super();\r\n this._logger = logger;\r\n }\r\n /** @inheritDoc */\r\n send(request) {\r\n // Check that abort was not signaled before calling send\r\n if (request.abortSignal && request.abortSignal.aborted) {\r\n return Promise.reject(new AbortError());\r\n }\r\n if (!request.method) {\r\n return Promise.reject(new Error(\"No method defined.\"));\r\n }\r\n if (!request.url) {\r\n return Promise.reject(new Error(\"No url defined.\"));\r\n }\r\n return new Promise((resolve, reject) => {\r\n const xhr = new XMLHttpRequest();\r\n xhr.open(request.method, request.url, true);\r\n xhr.withCredentials = request.withCredentials === undefined ? true : request.withCredentials;\r\n xhr.setRequestHeader(\"X-Requested-With\", \"XMLHttpRequest\");\r\n if (request.content === \"\") {\r\n request.content = undefined;\r\n }\r\n if (request.content) {\r\n // Explicitly setting the Content-Type header for React Native on Android platform.\r\n if (isArrayBuffer(request.content)) {\r\n xhr.setRequestHeader(\"Content-Type\", \"application/octet-stream\");\r\n }\r\n else {\r\n xhr.setRequestHeader(\"Content-Type\", \"text/plain;charset=UTF-8\");\r\n }\r\n }\r\n const headers = request.headers;\r\n if (headers) {\r\n Object.keys(headers)\r\n .forEach((header) => {\r\n xhr.setRequestHeader(header, headers[header]);\r\n });\r\n }\r\n if (request.responseType) {\r\n xhr.responseType = request.responseType;\r\n }\r\n if (request.abortSignal) {\r\n request.abortSignal.onabort = () => {\r\n xhr.abort();\r\n reject(new AbortError());\r\n };\r\n }\r\n if (request.timeout) {\r\n xhr.timeout = request.timeout;\r\n }\r\n xhr.onload = () => {\r\n if (request.abortSignal) {\r\n request.abortSignal.onabort = null;\r\n }\r\n if (xhr.status >= 200 && xhr.status < 300) {\r\n resolve(new HttpResponse(xhr.status, xhr.statusText, xhr.response || xhr.responseText));\r\n }\r\n else {\r\n reject(new HttpError(xhr.response || xhr.responseText || xhr.statusText, xhr.status));\r\n }\r\n };\r\n xhr.onerror = () => {\r\n this._logger.log(LogLevel.Warning, `Error from HTTP request. ${xhr.status}: ${xhr.statusText}.`);\r\n reject(new HttpError(xhr.statusText, xhr.status));\r\n };\r\n xhr.ontimeout = () => {\r\n this._logger.log(LogLevel.Warning, `Timeout from HTTP request.`);\r\n reject(new TimeoutError());\r\n };\r\n xhr.send(request.content);\r\n });\r\n }\r\n}\r\n//# sourceMappingURL=XhrHttpClient.js.map","// Licensed to the .NET Foundation under one or more agreements.\r\n// The .NET Foundation licenses this file to you under the MIT license.\r\nimport { AbortError } from \"./Errors\";\r\nimport { FetchHttpClient } from \"./FetchHttpClient\";\r\nimport { HttpClient } from \"./HttpClient\";\r\nimport { Platform } from \"./Utils\";\r\nimport { XhrHttpClient } from \"./XhrHttpClient\";\r\n/** Default implementation of {@link @microsoft/signalr.HttpClient}. */\r\nexport class DefaultHttpClient extends HttpClient {\r\n /** Creates a new instance of the {@link @microsoft/signalr.DefaultHttpClient}, using the provided {@link @microsoft/signalr.ILogger} to log messages. */\r\n constructor(logger) {\r\n super();\r\n if (typeof fetch !== \"undefined\" || Platform.isNode) {\r\n this._httpClient = new FetchHttpClient(logger);\r\n }\r\n else if (typeof XMLHttpRequest !== \"undefined\") {\r\n this._httpClient = new XhrHttpClient(logger);\r\n }\r\n else {\r\n throw new Error(\"No usable HttpClient found.\");\r\n }\r\n }\r\n /** @inheritDoc */\r\n send(request) {\r\n // Check that abort was not signaled before calling send\r\n if (request.abortSignal && request.abortSignal.aborted) {\r\n return Promise.reject(new AbortError());\r\n }\r\n if (!request.method) {\r\n return Promise.reject(new Error(\"No method defined.\"));\r\n }\r\n if (!request.url) {\r\n return Promise.reject(new Error(\"No url defined.\"));\r\n }\r\n return this._httpClient.send(request);\r\n }\r\n getCookieString(url) {\r\n return this._httpClient.getCookieString(url);\r\n }\r\n}\r\n//# sourceMappingURL=DefaultHttpClient.js.map","// Licensed to the .NET Foundation under one or more agreements.\r\n// The .NET Foundation licenses this file to you under the MIT license.\r\n// Rough polyfill of https://developer.mozilla.org/en-US/docs/Web/API/AbortController\r\n// We don't actually ever use the API being polyfilled, we always use the polyfill because\r\n// it's a very new API right now.\r\n// Not exported from index.\r\n/** @private */\r\nexport class AbortController {\r\n constructor() {\r\n this._isAborted = false;\r\n this.onabort = null;\r\n }\r\n abort() {\r\n if (!this._isAborted) {\r\n this._isAborted = true;\r\n if (this.onabort) {\r\n this.onabort();\r\n }\r\n }\r\n }\r\n get signal() {\r\n return this;\r\n }\r\n get aborted() {\r\n return this._isAborted;\r\n }\r\n}\r\n//# sourceMappingURL=AbortController.js.map","// Licensed to the .NET Foundation under one or more agreements.\r\n// The .NET Foundation licenses this file to you under the MIT license.\r\nimport { AbortController } from \"./AbortController\";\r\nimport { HttpError, TimeoutError } from \"./Errors\";\r\nimport { LogLevel } from \"./ILogger\";\r\nimport { TransferFormat } from \"./ITransport\";\r\nimport { Arg, getDataDetail, getUserAgentHeader, sendMessage } from \"./Utils\";\r\n// Not exported from 'index', this type is internal.\r\n/** @private */\r\nexport class LongPollingTransport {\r\n // This is an internal type, not exported from 'index' so this is really just internal.\r\n get pollAborted() {\r\n return this._pollAbort.aborted;\r\n }\r\n constructor(httpClient, logger, options) {\r\n this._httpClient = httpClient;\r\n this._logger = logger;\r\n this._pollAbort = new AbortController();\r\n this._options = options;\r\n this._running = false;\r\n this.onreceive = null;\r\n this.onclose = null;\r\n }\r\n async connect(url, transferFormat) {\r\n Arg.isRequired(url, \"url\");\r\n Arg.isRequired(transferFormat, \"transferFormat\");\r\n Arg.isIn(transferFormat, TransferFormat, \"transferFormat\");\r\n this._url = url;\r\n this._logger.log(LogLevel.Trace, \"(LongPolling transport) Connecting.\");\r\n // Allow binary format on Node and Browsers that support binary content (indicated by the presence of responseType property)\r\n if (transferFormat === TransferFormat.Binary &&\r\n (typeof XMLHttpRequest !== \"undefined\" && typeof new XMLHttpRequest().responseType !== \"string\")) {\r\n throw new Error(\"Binary protocols over XmlHttpRequest not implementing advanced features are not supported.\");\r\n }\r\n const [name, value] = getUserAgentHeader();\r\n const headers = { [name]: value, ...this._options.headers };\r\n const pollOptions = {\r\n abortSignal: this._pollAbort.signal,\r\n headers,\r\n timeout: 100000,\r\n withCredentials: this._options.withCredentials,\r\n };\r\n if (transferFormat === TransferFormat.Binary) {\r\n pollOptions.responseType = \"arraybuffer\";\r\n }\r\n // Make initial long polling request\r\n // Server uses first long polling request to finish initializing connection and it returns without data\r\n const pollUrl = `${url}&_=${Date.now()}`;\r\n this._logger.log(LogLevel.Trace, `(LongPolling transport) polling: ${pollUrl}.`);\r\n const response = await this._httpClient.get(pollUrl, pollOptions);\r\n if (response.statusCode !== 200) {\r\n this._logger.log(LogLevel.Error, `(LongPolling transport) Unexpected response code: ${response.statusCode}.`);\r\n // Mark running as false so that the poll immediately ends and runs the close logic\r\n this._closeError = new HttpError(response.statusText || \"\", response.statusCode);\r\n this._running = false;\r\n }\r\n else {\r\n this._running = true;\r\n }\r\n this._receiving = this._poll(this._url, pollOptions);\r\n }\r\n async _poll(url, pollOptions) {\r\n try {\r\n while (this._running) {\r\n try {\r\n const pollUrl = `${url}&_=${Date.now()}`;\r\n this._logger.log(LogLevel.Trace, `(LongPolling transport) polling: ${pollUrl}.`);\r\n const response = await this._httpClient.get(pollUrl, pollOptions);\r\n if (response.statusCode === 204) {\r\n this._logger.log(LogLevel.Information, \"(LongPolling transport) Poll terminated by server.\");\r\n this._running = false;\r\n }\r\n else if (response.statusCode !== 200) {\r\n this._logger.log(LogLevel.Error, `(LongPolling transport) Unexpected response code: ${response.statusCode}.`);\r\n // Unexpected status code\r\n this._closeError = new HttpError(response.statusText || \"\", response.statusCode);\r\n this._running = false;\r\n }\r\n else {\r\n // Process the response\r\n if (response.content) {\r\n this._logger.log(LogLevel.Trace, `(LongPolling transport) data received. ${getDataDetail(response.content, this._options.logMessageContent)}.`);\r\n if (this.onreceive) {\r\n this.onreceive(response.content);\r\n }\r\n }\r\n else {\r\n // This is another way timeout manifest.\r\n this._logger.log(LogLevel.Trace, \"(LongPolling transport) Poll timed out, reissuing.\");\r\n }\r\n }\r\n }\r\n catch (e) {\r\n if (!this._running) {\r\n // Log but disregard errors that occur after stopping\r\n this._logger.log(LogLevel.Trace, `(LongPolling transport) Poll errored after shutdown: ${e.message}`);\r\n }\r\n else {\r\n if (e instanceof TimeoutError) {\r\n // Ignore timeouts and reissue the poll.\r\n this._logger.log(LogLevel.Trace, \"(LongPolling transport) Poll timed out, reissuing.\");\r\n }\r\n else {\r\n // Close the connection with the error as the result.\r\n this._closeError = e;\r\n this._running = false;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n finally {\r\n this._logger.log(LogLevel.Trace, \"(LongPolling transport) Polling complete.\");\r\n // We will reach here with pollAborted==false when the server returned a response causing the transport to stop.\r\n // If pollAborted==true then client initiated the stop and the stop method will raise the close event after DELETE is sent.\r\n if (!this.pollAborted) {\r\n this._raiseOnClose();\r\n }\r\n }\r\n }\r\n async send(data) {\r\n if (!this._running) {\r\n return Promise.reject(new Error(\"Cannot send until the transport is connected\"));\r\n }\r\n return sendMessage(this._logger, \"LongPolling\", this._httpClient, this._url, data, this._options);\r\n }\r\n async stop() {\r\n this._logger.log(LogLevel.Trace, \"(LongPolling transport) Stopping polling.\");\r\n // Tell receiving loop to stop, abort any current request, and then wait for it to finish\r\n this._running = false;\r\n this._pollAbort.abort();\r\n try {\r\n await this._receiving;\r\n // Send DELETE to clean up long polling on the server\r\n this._logger.log(LogLevel.Trace, `(LongPolling transport) sending DELETE request to ${this._url}.`);\r\n const headers = {};\r\n const [name, value] = getUserAgentHeader();\r\n headers[name] = value;\r\n const deleteOptions = {\r\n headers: { ...headers, ...this._options.headers },\r\n timeout: this._options.timeout,\r\n withCredentials: this._options.withCredentials,\r\n };\r\n let error;\r\n try {\r\n await this._httpClient.delete(this._url, deleteOptions);\r\n }\r\n catch (err) {\r\n error = err;\r\n }\r\n if (error) {\r\n if (error instanceof HttpError) {\r\n if (error.statusCode === 404) {\r\n this._logger.log(LogLevel.Trace, \"(LongPolling transport) A 404 response was returned from sending a DELETE request.\");\r\n }\r\n else {\r\n this._logger.log(LogLevel.Trace, `(LongPolling transport) Error sending a DELETE request: ${error}`);\r\n }\r\n }\r\n }\r\n else {\r\n this._logger.log(LogLevel.Trace, \"(LongPolling transport) DELETE request accepted.\");\r\n }\r\n }\r\n finally {\r\n this._logger.log(LogLevel.Trace, \"(LongPolling transport) Stop finished.\");\r\n // Raise close event here instead of in polling\r\n // It needs to happen after the DELETE request is sent\r\n this._raiseOnClose();\r\n }\r\n }\r\n _raiseOnClose() {\r\n if (this.onclose) {\r\n let logMessage = \"(LongPolling transport) Firing onclose event.\";\r\n if (this._closeError) {\r\n logMessage += \" Error: \" + this._closeError;\r\n }\r\n this._logger.log(LogLevel.Trace, logMessage);\r\n this.onclose(this._closeError);\r\n }\r\n }\r\n}\r\n//# sourceMappingURL=LongPollingTransport.js.map","// Licensed to the .NET Foundation under one or more agreements.\r\n// The .NET Foundation licenses this file to you under the MIT license.\r\nimport { LogLevel } from \"./ILogger\";\r\nimport { TransferFormat } from \"./ITransport\";\r\nimport { Arg, getDataDetail, getUserAgentHeader, Platform, sendMessage } from \"./Utils\";\r\n/** @private */\r\nexport class ServerSentEventsTransport {\r\n constructor(httpClient, accessToken, logger, options) {\r\n this._httpClient = httpClient;\r\n this._accessToken = accessToken;\r\n this._logger = logger;\r\n this._options = options;\r\n this.onreceive = null;\r\n this.onclose = null;\r\n }\r\n async connect(url, transferFormat) {\r\n Arg.isRequired(url, \"url\");\r\n Arg.isRequired(transferFormat, \"transferFormat\");\r\n Arg.isIn(transferFormat, TransferFormat, \"transferFormat\");\r\n this._logger.log(LogLevel.Trace, \"(SSE transport) Connecting.\");\r\n // set url before accessTokenFactory because this._url is only for send and we set the auth header instead of the query string for send\r\n this._url = url;\r\n if (this._accessToken) {\r\n url += (url.indexOf(\"?\") < 0 ? \"?\" : \"&\") + `access_token=${encodeURIComponent(this._accessToken)}`;\r\n }\r\n return new Promise((resolve, reject) => {\r\n let opened = false;\r\n if (transferFormat !== TransferFormat.Text) {\r\n reject(new Error(\"The Server-Sent Events transport only supports the 'Text' transfer format\"));\r\n return;\r\n }\r\n let eventSource;\r\n if (Platform.isBrowser || Platform.isWebWorker) {\r\n eventSource = new this._options.EventSource(url, { withCredentials: this._options.withCredentials });\r\n }\r\n else {\r\n // Non-browser passes cookies via the dictionary\r\n const cookies = this._httpClient.getCookieString(url);\r\n const headers = {};\r\n headers.Cookie = cookies;\r\n const [name, value] = getUserAgentHeader();\r\n headers[name] = value;\r\n eventSource = new this._options.EventSource(url, { withCredentials: this._options.withCredentials, headers: { ...headers, ...this._options.headers } });\r\n }\r\n try {\r\n eventSource.onmessage = (e) => {\r\n if (this.onreceive) {\r\n try {\r\n this._logger.log(LogLevel.Trace, `(SSE transport) data received. ${getDataDetail(e.data, this._options.logMessageContent)}.`);\r\n this.onreceive(e.data);\r\n }\r\n catch (error) {\r\n this._close(error);\r\n return;\r\n }\r\n }\r\n };\r\n // @ts-ignore: not using event on purpose\r\n eventSource.onerror = (e) => {\r\n // EventSource doesn't give any useful information about server side closes.\r\n if (opened) {\r\n this._close();\r\n }\r\n else {\r\n reject(new Error(\"EventSource failed to connect. The connection could not be found on the server,\"\r\n + \" either the connection ID is not present on the server, or a proxy is refusing/buffering the connection.\"\r\n + \" If you have multiple servers check that sticky sessions are enabled.\"));\r\n }\r\n };\r\n eventSource.onopen = () => {\r\n this._logger.log(LogLevel.Information, `SSE connected to ${this._url}`);\r\n this._eventSource = eventSource;\r\n opened = true;\r\n resolve();\r\n };\r\n }\r\n catch (e) {\r\n reject(e);\r\n return;\r\n }\r\n });\r\n }\r\n async send(data) {\r\n if (!this._eventSource) {\r\n return Promise.reject(new Error(\"Cannot send until the transport is connected\"));\r\n }\r\n return sendMessage(this._logger, \"SSE\", this._httpClient, this._url, data, this._options);\r\n }\r\n stop() {\r\n this._close();\r\n return Promise.resolve();\r\n }\r\n _close(e) {\r\n if (this._eventSource) {\r\n this._eventSource.close();\r\n this._eventSource = undefined;\r\n if (this.onclose) {\r\n this.onclose(e);\r\n }\r\n }\r\n }\r\n}\r\n//# sourceMappingURL=ServerSentEventsTransport.js.map","// Licensed to the .NET Foundation under one or more agreements.\r\n// The .NET Foundation licenses this file to you under the MIT license.\r\nimport { HeaderNames } from \"./HeaderNames\";\r\nimport { LogLevel } from \"./ILogger\";\r\nimport { TransferFormat } from \"./ITransport\";\r\nimport { Arg, getDataDetail, getUserAgentHeader, Platform } from \"./Utils\";\r\n/** @private */\r\nexport class WebSocketTransport {\r\n constructor(httpClient, accessTokenFactory, logger, logMessageContent, webSocketConstructor, headers) {\r\n this._logger = logger;\r\n this._accessTokenFactory = accessTokenFactory;\r\n this._logMessageContent = logMessageContent;\r\n this._webSocketConstructor = webSocketConstructor;\r\n this._httpClient = httpClient;\r\n this.onreceive = null;\r\n this.onclose = null;\r\n this._headers = headers;\r\n }\r\n async connect(url, transferFormat) {\r\n Arg.isRequired(url, \"url\");\r\n Arg.isRequired(transferFormat, \"transferFormat\");\r\n Arg.isIn(transferFormat, TransferFormat, \"transferFormat\");\r\n this._logger.log(LogLevel.Trace, \"(WebSockets transport) Connecting.\");\r\n let token;\r\n if (this._accessTokenFactory) {\r\n token = await this._accessTokenFactory();\r\n }\r\n return new Promise((resolve, reject) => {\r\n url = url.replace(/^http/, \"ws\");\r\n let webSocket;\r\n const cookies = this._httpClient.getCookieString(url);\r\n let opened = false;\r\n if (Platform.isNode || Platform.isReactNative) {\r\n const headers = {};\r\n const [name, value] = getUserAgentHeader();\r\n headers[name] = value;\r\n if (token) {\r\n headers[HeaderNames.Authorization] = `Bearer ${token}`;\r\n }\r\n if (cookies) {\r\n headers[HeaderNames.Cookie] = cookies;\r\n }\r\n // Only pass headers when in non-browser environments\r\n webSocket = new this._webSocketConstructor(url, undefined, {\r\n headers: { ...headers, ...this._headers },\r\n });\r\n }\r\n else {\r\n if (token) {\r\n url += (url.indexOf(\"?\") < 0 ? \"?\" : \"&\") + `access_token=${encodeURIComponent(token)}`;\r\n }\r\n }\r\n if (!webSocket) {\r\n // Chrome is not happy with passing 'undefined' as protocol\r\n webSocket = new this._webSocketConstructor(url);\r\n }\r\n if (transferFormat === TransferFormat.Binary) {\r\n webSocket.binaryType = \"arraybuffer\";\r\n }\r\n webSocket.onopen = (_event) => {\r\n this._logger.log(LogLevel.Information, `WebSocket connected to ${url}.`);\r\n this._webSocket = webSocket;\r\n opened = true;\r\n resolve();\r\n };\r\n webSocket.onerror = (event) => {\r\n let error = null;\r\n // ErrorEvent is a browser only type we need to check if the type exists before using it\r\n if (typeof ErrorEvent !== \"undefined\" && event instanceof ErrorEvent) {\r\n error = event.error;\r\n }\r\n else {\r\n error = \"There was an error with the transport\";\r\n }\r\n this._logger.log(LogLevel.Information, `(WebSockets transport) ${error}.`);\r\n };\r\n webSocket.onmessage = (message) => {\r\n this._logger.log(LogLevel.Trace, `(WebSockets transport) data received. ${getDataDetail(message.data, this._logMessageContent)}.`);\r\n if (this.onreceive) {\r\n try {\r\n this.onreceive(message.data);\r\n }\r\n catch (error) {\r\n this._close(error);\r\n return;\r\n }\r\n }\r\n };\r\n webSocket.onclose = (event) => {\r\n // Don't call close handler if connection was never established\r\n // We'll reject the connect call instead\r\n if (opened) {\r\n this._close(event);\r\n }\r\n else {\r\n let error = null;\r\n // ErrorEvent is a browser only type we need to check if the type exists before using it\r\n if (typeof ErrorEvent !== \"undefined\" && event instanceof ErrorEvent) {\r\n error = event.error;\r\n }\r\n else {\r\n error = \"WebSocket failed to connect. The connection could not be found on the server,\"\r\n + \" either the endpoint may not be a SignalR endpoint,\"\r\n + \" the connection ID is not present on the server, or there is a proxy blocking WebSockets.\"\r\n + \" If you have multiple servers check that sticky sessions are enabled.\";\r\n }\r\n reject(new Error(error));\r\n }\r\n };\r\n });\r\n }\r\n send(data) {\r\n if (this._webSocket && this._webSocket.readyState === this._webSocketConstructor.OPEN) {\r\n this._logger.log(LogLevel.Trace, `(WebSockets transport) sending data. ${getDataDetail(data, this._logMessageContent)}.`);\r\n this._webSocket.send(data);\r\n return Promise.resolve();\r\n }\r\n return Promise.reject(\"WebSocket is not in the OPEN state\");\r\n }\r\n stop() {\r\n if (this._webSocket) {\r\n // Manually invoke onclose callback inline so we know the HttpConnection was closed properly before returning\r\n // This also solves an issue where websocket.onclose could take 18+ seconds to trigger during network disconnects\r\n this._close(undefined);\r\n }\r\n return Promise.resolve();\r\n }\r\n _close(event) {\r\n // webSocket will be null if the transport did not start successfully\r\n if (this._webSocket) {\r\n // Clear websocket handlers because we are considering the socket closed now\r\n this._webSocket.onclose = () => { };\r\n this._webSocket.onmessage = () => { };\r\n this._webSocket.onerror = () => { };\r\n this._webSocket.close();\r\n this._webSocket = undefined;\r\n }\r\n this._logger.log(LogLevel.Trace, \"(WebSockets transport) socket closed.\");\r\n if (this.onclose) {\r\n if (this._isCloseEvent(event) && (event.wasClean === false || event.code !== 1000)) {\r\n this.onclose(new Error(`WebSocket closed with status code: ${event.code} (${event.reason || \"no reason given\"}).`));\r\n }\r\n else if (event instanceof Error) {\r\n this.onclose(event);\r\n }\r\n else {\r\n this.onclose();\r\n }\r\n }\r\n }\r\n _isCloseEvent(event) {\r\n return event && typeof event.wasClean === \"boolean\" && typeof event.code === \"number\";\r\n }\r\n}\r\n//# sourceMappingURL=WebSocketTransport.js.map","// Licensed to the .NET Foundation under one or more agreements.\r\n// The .NET Foundation licenses this file to you under the MIT license.\r\nimport { AccessTokenHttpClient } from \"./AccessTokenHttpClient\";\r\nimport { DefaultHttpClient } from \"./DefaultHttpClient\";\r\nimport { AggregateErrors, DisabledTransportError, FailedToNegotiateWithServerError, FailedToStartTransportError, HttpError, UnsupportedTransportError, AbortError } from \"./Errors\";\r\nimport { LogLevel } from \"./ILogger\";\r\nimport { HttpTransportType, TransferFormat } from \"./ITransport\";\r\nimport { LongPollingTransport } from \"./LongPollingTransport\";\r\nimport { ServerSentEventsTransport } from \"./ServerSentEventsTransport\";\r\nimport { Arg, createLogger, getUserAgentHeader, Platform } from \"./Utils\";\r\nimport { WebSocketTransport } from \"./WebSocketTransport\";\r\nconst MAX_REDIRECTS = 100;\r\n/** @private */\r\nexport class HttpConnection {\r\n constructor(url, options = {}) {\r\n this._stopPromiseResolver = () => { };\r\n this.features = {};\r\n this._negotiateVersion = 1;\r\n Arg.isRequired(url, \"url\");\r\n this._logger = createLogger(options.logger);\r\n this.baseUrl = this._resolveUrl(url);\r\n options = options || {};\r\n options.logMessageContent = options.logMessageContent === undefined ? false : options.logMessageContent;\r\n if (typeof options.withCredentials === \"boolean\" || options.withCredentials === undefined) {\r\n options.withCredentials = options.withCredentials === undefined ? true : options.withCredentials;\r\n }\r\n else {\r\n throw new Error(\"withCredentials option was not a 'boolean' or 'undefined' value\");\r\n }\r\n options.timeout = options.timeout === undefined ? 100 * 1000 : options.timeout;\r\n let webSocketModule = null;\r\n let eventSourceModule = null;\r\n if (Platform.isNode && typeof require !== \"undefined\") {\r\n // In order to ignore the dynamic require in webpack builds we need to do this magic\r\n // @ts-ignore: TS doesn't know about these names\r\n const requireFunc = typeof __webpack_require__ === \"function\" ? __non_webpack_require__ : require;\r\n webSocketModule = requireFunc(\"ws\");\r\n eventSourceModule = requireFunc(\"eventsource\");\r\n }\r\n if (!Platform.isNode && typeof WebSocket !== \"undefined\" && !options.WebSocket) {\r\n options.WebSocket = WebSocket;\r\n }\r\n else if (Platform.isNode && !options.WebSocket) {\r\n if (webSocketModule) {\r\n options.WebSocket = webSocketModule;\r\n }\r\n }\r\n if (!Platform.isNode && typeof EventSource !== \"undefined\" && !options.EventSource) {\r\n options.EventSource = EventSource;\r\n }\r\n else if (Platform.isNode && !options.EventSource) {\r\n if (typeof eventSourceModule !== \"undefined\") {\r\n options.EventSource = eventSourceModule;\r\n }\r\n }\r\n this._httpClient = new AccessTokenHttpClient(options.httpClient || new DefaultHttpClient(this._logger), options.accessTokenFactory);\r\n this._connectionState = \"Disconnected\" /* ConnectionState.Disconnected */;\r\n this._connectionStarted = false;\r\n this._options = options;\r\n this.onreceive = null;\r\n this.onclose = null;\r\n }\r\n async start(transferFormat) {\r\n transferFormat = transferFormat || TransferFormat.Binary;\r\n Arg.isIn(transferFormat, TransferFormat, \"transferFormat\");\r\n this._logger.log(LogLevel.Debug, `Starting connection with transfer format '${TransferFormat[transferFormat]}'.`);\r\n if (this._connectionState !== \"Disconnected\" /* ConnectionState.Disconnected */) {\r\n return Promise.reject(new Error(\"Cannot start an HttpConnection that is not in the 'Disconnected' state.\"));\r\n }\r\n this._connectionState = \"Connecting\" /* ConnectionState.Connecting */;\r\n this._startInternalPromise = this._startInternal(transferFormat);\r\n await this._startInternalPromise;\r\n // The TypeScript compiler thinks that connectionState must be Connecting here. The TypeScript compiler is wrong.\r\n if (this._connectionState === \"Disconnecting\" /* ConnectionState.Disconnecting */) {\r\n // stop() was called and transitioned the client into the Disconnecting state.\r\n const message = \"Failed to start the HttpConnection before stop() was called.\";\r\n this._logger.log(LogLevel.Error, message);\r\n // We cannot await stopPromise inside startInternal since stopInternal awaits the startInternalPromise.\r\n await this._stopPromise;\r\n return Promise.reject(new AbortError(message));\r\n }\r\n else if (this._connectionState !== \"Connected\" /* ConnectionState.Connected */) {\r\n // stop() was called and transitioned the client into the Disconnecting state.\r\n const message = \"HttpConnection.startInternal completed gracefully but didn't enter the connection into the connected state!\";\r\n this._logger.log(LogLevel.Error, message);\r\n return Promise.reject(new AbortError(message));\r\n }\r\n this._connectionStarted = true;\r\n }\r\n send(data) {\r\n if (this._connectionState !== \"Connected\" /* ConnectionState.Connected */) {\r\n return Promise.reject(new Error(\"Cannot send data if the connection is not in the 'Connected' State.\"));\r\n }\r\n if (!this._sendQueue) {\r\n this._sendQueue = new TransportSendQueue(this.transport);\r\n }\r\n // Transport will not be null if state is connected\r\n return this._sendQueue.send(data);\r\n }\r\n async stop(error) {\r\n if (this._connectionState === \"Disconnected\" /* ConnectionState.Disconnected */) {\r\n this._logger.log(LogLevel.Debug, `Call to HttpConnection.stop(${error}) ignored because the connection is already in the disconnected state.`);\r\n return Promise.resolve();\r\n }\r\n if (this._connectionState === \"Disconnecting\" /* ConnectionState.Disconnecting */) {\r\n this._logger.log(LogLevel.Debug, `Call to HttpConnection.stop(${error}) ignored because the connection is already in the disconnecting state.`);\r\n return this._stopPromise;\r\n }\r\n this._connectionState = \"Disconnecting\" /* ConnectionState.Disconnecting */;\r\n this._stopPromise = new Promise((resolve) => {\r\n // Don't complete stop() until stopConnection() completes.\r\n this._stopPromiseResolver = resolve;\r\n });\r\n // stopInternal should never throw so just observe it.\r\n await this._stopInternal(error);\r\n await this._stopPromise;\r\n }\r\n async _stopInternal(error) {\r\n // Set error as soon as possible otherwise there is a race between\r\n // the transport closing and providing an error and the error from a close message\r\n // We would prefer the close message error.\r\n this._stopError = error;\r\n try {\r\n await this._startInternalPromise;\r\n }\r\n catch (e) {\r\n // This exception is returned to the user as a rejected Promise from the start method.\r\n }\r\n // The transport's onclose will trigger stopConnection which will run our onclose event.\r\n // The transport should always be set if currently connected. If it wasn't set, it's likely because\r\n // stop was called during start() and start() failed.\r\n if (this.transport) {\r\n try {\r\n await this.transport.stop();\r\n }\r\n catch (e) {\r\n this._logger.log(LogLevel.Error, `HttpConnection.transport.stop() threw error '${e}'.`);\r\n this._stopConnection();\r\n }\r\n this.transport = undefined;\r\n }\r\n else {\r\n this._logger.log(LogLevel.Debug, \"HttpConnection.transport is undefined in HttpConnection.stop() because start() failed.\");\r\n }\r\n }\r\n async _startInternal(transferFormat) {\r\n // Store the original base url and the access token factory since they may change\r\n // as part of negotiating\r\n let url = this.baseUrl;\r\n this._accessTokenFactory = this._options.accessTokenFactory;\r\n this._httpClient._accessTokenFactory = this._accessTokenFactory;\r\n try {\r\n if (this._options.skipNegotiation) {\r\n if (this._options.transport === HttpTransportType.WebSockets) {\r\n // No need to add a connection ID in this case\r\n this.transport = this._constructTransport(HttpTransportType.WebSockets);\r\n // We should just call connect directly in this case.\r\n // No fallback or negotiate in this case.\r\n await this._startTransport(url, transferFormat);\r\n }\r\n else {\r\n throw new Error(\"Negotiation can only be skipped when using the WebSocket transport directly.\");\r\n }\r\n }\r\n else {\r\n let negotiateResponse = null;\r\n let redirects = 0;\r\n do {\r\n negotiateResponse = await this._getNegotiationResponse(url);\r\n // the user tries to stop the connection when it is being started\r\n if (this._connectionState === \"Disconnecting\" /* ConnectionState.Disconnecting */ || this._connectionState === \"Disconnected\" /* ConnectionState.Disconnected */) {\r\n throw new AbortError(\"The connection was stopped during negotiation.\");\r\n }\r\n if (negotiateResponse.error) {\r\n throw new Error(negotiateResponse.error);\r\n }\r\n if (negotiateResponse.ProtocolVersion) {\r\n 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.\");\r\n }\r\n if (negotiateResponse.url) {\r\n url = negotiateResponse.url;\r\n }\r\n if (negotiateResponse.accessToken) {\r\n // Replace the current access token factory with one that uses\r\n // the returned access token\r\n const accessToken = negotiateResponse.accessToken;\r\n this._accessTokenFactory = () => accessToken;\r\n // set the factory to undefined so the AccessTokenHttpClient won't retry with the same token, since we know it won't change until a connection restart\r\n this._httpClient._accessToken = accessToken;\r\n this._httpClient._accessTokenFactory = undefined;\r\n }\r\n redirects++;\r\n } while (negotiateResponse.url && redirects < MAX_REDIRECTS);\r\n if (redirects === MAX_REDIRECTS && negotiateResponse.url) {\r\n throw new Error(\"Negotiate redirection limit exceeded.\");\r\n }\r\n await this._createTransport(url, this._options.transport, negotiateResponse, transferFormat);\r\n }\r\n if (this.transport instanceof LongPollingTransport) {\r\n this.features.inherentKeepAlive = true;\r\n }\r\n if (this._connectionState === \"Connecting\" /* ConnectionState.Connecting */) {\r\n // Ensure the connection transitions to the connected state prior to completing this.startInternalPromise.\r\n // start() will handle the case when stop was called and startInternal exits still in the disconnecting state.\r\n this._logger.log(LogLevel.Debug, \"The HttpConnection connected successfully.\");\r\n this._connectionState = \"Connected\" /* ConnectionState.Connected */;\r\n }\r\n // stop() is waiting on us via this.startInternalPromise so keep this.transport around so it can clean up.\r\n // This is the only case startInternal can exit in neither the connected nor disconnected state because stopConnection()\r\n // will transition to the disconnected state. start() will wait for the transition using the stopPromise.\r\n }\r\n catch (e) {\r\n this._logger.log(LogLevel.Error, \"Failed to start the connection: \" + e);\r\n this._connectionState = \"Disconnected\" /* ConnectionState.Disconnected */;\r\n this.transport = undefined;\r\n // if start fails, any active calls to stop assume that start will complete the stop promise\r\n this._stopPromiseResolver();\r\n return Promise.reject(e);\r\n }\r\n }\r\n async _getNegotiationResponse(url) {\r\n const headers = {};\r\n const [name, value] = getUserAgentHeader();\r\n headers[name] = value;\r\n const negotiateUrl = this._resolveNegotiateUrl(url);\r\n this._logger.log(LogLevel.Debug, `Sending negotiation request: ${negotiateUrl}.`);\r\n try {\r\n const response = await this._httpClient.post(negotiateUrl, {\r\n content: \"\",\r\n headers: { ...headers, ...this._options.headers },\r\n timeout: this._options.timeout,\r\n withCredentials: this._options.withCredentials,\r\n });\r\n if (response.statusCode !== 200) {\r\n return Promise.reject(new Error(`Unexpected status code returned from negotiate '${response.statusCode}'`));\r\n }\r\n const negotiateResponse = JSON.parse(response.content);\r\n if (!negotiateResponse.negotiateVersion || negotiateResponse.negotiateVersion < 1) {\r\n // Negotiate version 0 doesn't use connectionToken\r\n // So we set it equal to connectionId so all our logic can use connectionToken without being aware of the negotiate version\r\n negotiateResponse.connectionToken = negotiateResponse.connectionId;\r\n }\r\n if (negotiateResponse.useStatefulReconnect && this._options._useStatefulReconnect !== true) {\r\n return Promise.reject(new FailedToNegotiateWithServerError(\"Client didn't negotiate Stateful Reconnect but the server did.\"));\r\n }\r\n return negotiateResponse;\r\n }\r\n catch (e) {\r\n let errorMessage = \"Failed to complete negotiation with the server: \" + e;\r\n if (e instanceof HttpError) {\r\n if (e.statusCode === 404) {\r\n errorMessage = errorMessage + \" Either this is not a SignalR endpoint or there is a proxy blocking the connection.\";\r\n }\r\n }\r\n this._logger.log(LogLevel.Error, errorMessage);\r\n return Promise.reject(new FailedToNegotiateWithServerError(errorMessage));\r\n }\r\n }\r\n _createConnectUrl(url, connectionToken) {\r\n if (!connectionToken) {\r\n return url;\r\n }\r\n return url + (url.indexOf(\"?\") === -1 ? \"?\" : \"&\") + `id=${connectionToken}`;\r\n }\r\n async _createTransport(url, requestedTransport, negotiateResponse, requestedTransferFormat) {\r\n let connectUrl = this._createConnectUrl(url, negotiateResponse.connectionToken);\r\n if (this._isITransport(requestedTransport)) {\r\n this._logger.log(LogLevel.Debug, \"Connection was provided an instance of ITransport, using that directly.\");\r\n this.transport = requestedTransport;\r\n await this._startTransport(connectUrl, requestedTransferFormat);\r\n this.connectionId = negotiateResponse.connectionId;\r\n return;\r\n }\r\n const transportExceptions = [];\r\n const transports = negotiateResponse.availableTransports || [];\r\n let negotiate = negotiateResponse;\r\n for (const endpoint of transports) {\r\n const transportOrError = this._resolveTransportOrError(endpoint, requestedTransport, requestedTransferFormat, (negotiate === null || negotiate === void 0 ? void 0 : negotiate.useStatefulReconnect) === true);\r\n if (transportOrError instanceof Error) {\r\n // Store the error and continue, we don't want to cause a re-negotiate in these cases\r\n transportExceptions.push(`${endpoint.transport} failed:`);\r\n transportExceptions.push(transportOrError);\r\n }\r\n else if (this._isITransport(transportOrError)) {\r\n this.transport = transportOrError;\r\n if (!negotiate) {\r\n try {\r\n negotiate = await this._getNegotiationResponse(url);\r\n }\r\n catch (ex) {\r\n return Promise.reject(ex);\r\n }\r\n connectUrl = this._createConnectUrl(url, negotiate.connectionToken);\r\n }\r\n try {\r\n await this._startTransport(connectUrl, requestedTransferFormat);\r\n this.connectionId = negotiate.connectionId;\r\n return;\r\n }\r\n catch (ex) {\r\n this._logger.log(LogLevel.Error, `Failed to start the transport '${endpoint.transport}': ${ex}`);\r\n negotiate = undefined;\r\n transportExceptions.push(new FailedToStartTransportError(`${endpoint.transport} failed: ${ex}`, HttpTransportType[endpoint.transport]));\r\n if (this._connectionState !== \"Connecting\" /* ConnectionState.Connecting */) {\r\n const message = \"Failed to select transport before stop() was called.\";\r\n this._logger.log(LogLevel.Debug, message);\r\n return Promise.reject(new AbortError(message));\r\n }\r\n }\r\n }\r\n }\r\n if (transportExceptions.length > 0) {\r\n return Promise.reject(new AggregateErrors(`Unable to connect to the server with any of the available transports. ${transportExceptions.join(\" \")}`, transportExceptions));\r\n }\r\n return Promise.reject(new Error(\"None of the transports supported by the client are supported by the server.\"));\r\n }\r\n _constructTransport(transport) {\r\n switch (transport) {\r\n case HttpTransportType.WebSockets:\r\n if (!this._options.WebSocket) {\r\n throw new Error(\"'WebSocket' is not supported in your environment.\");\r\n }\r\n return new WebSocketTransport(this._httpClient, this._accessTokenFactory, this._logger, this._options.logMessageContent, this._options.WebSocket, this._options.headers || {});\r\n case HttpTransportType.ServerSentEvents:\r\n if (!this._options.EventSource) {\r\n throw new Error(\"'EventSource' is not supported in your environment.\");\r\n }\r\n return new ServerSentEventsTransport(this._httpClient, this._httpClient._accessToken, this._logger, this._options);\r\n case HttpTransportType.LongPolling:\r\n return new LongPollingTransport(this._httpClient, this._logger, this._options);\r\n default:\r\n throw new Error(`Unknown transport: ${transport}.`);\r\n }\r\n }\r\n _startTransport(url, transferFormat) {\r\n this.transport.onreceive = this.onreceive;\r\n if (this.features.reconnect) {\r\n this.transport.onclose = async (e) => {\r\n let callStop = false;\r\n if (this.features.reconnect) {\r\n try {\r\n this.features.disconnected();\r\n await this.transport.connect(url, transferFormat);\r\n await this.features.resend();\r\n }\r\n catch {\r\n callStop = true;\r\n }\r\n }\r\n else {\r\n this._stopConnection(e);\r\n return;\r\n }\r\n if (callStop) {\r\n this._stopConnection(e);\r\n }\r\n };\r\n }\r\n else {\r\n this.transport.onclose = (e) => this._stopConnection(e);\r\n }\r\n return this.transport.connect(url, transferFormat);\r\n }\r\n _resolveTransportOrError(endpoint, requestedTransport, requestedTransferFormat, useStatefulReconnect) {\r\n const transport = HttpTransportType[endpoint.transport];\r\n if (transport === null || transport === undefined) {\r\n this._logger.log(LogLevel.Debug, `Skipping transport '${endpoint.transport}' because it is not supported by this client.`);\r\n return new Error(`Skipping transport '${endpoint.transport}' because it is not supported by this client.`);\r\n }\r\n else {\r\n if (transportMatches(requestedTransport, transport)) {\r\n const transferFormats = endpoint.transferFormats.map((s) => TransferFormat[s]);\r\n if (transferFormats.indexOf(requestedTransferFormat) >= 0) {\r\n if ((transport === HttpTransportType.WebSockets && !this._options.WebSocket) ||\r\n (transport === HttpTransportType.ServerSentEvents && !this._options.EventSource)) {\r\n this._logger.log(LogLevel.Debug, `Skipping transport '${HttpTransportType[transport]}' because it is not supported in your environment.'`);\r\n return new UnsupportedTransportError(`'${HttpTransportType[transport]}' is not supported in your environment.`, transport);\r\n }\r\n else {\r\n this._logger.log(LogLevel.Debug, `Selecting transport '${HttpTransportType[transport]}'.`);\r\n try {\r\n this.features.reconnect = transport === HttpTransportType.WebSockets ? useStatefulReconnect : undefined;\r\n return this._constructTransport(transport);\r\n }\r\n catch (ex) {\r\n return ex;\r\n }\r\n }\r\n }\r\n else {\r\n this._logger.log(LogLevel.Debug, `Skipping transport '${HttpTransportType[transport]}' because it does not support the requested transfer format '${TransferFormat[requestedTransferFormat]}'.`);\r\n return new Error(`'${HttpTransportType[transport]}' does not support ${TransferFormat[requestedTransferFormat]}.`);\r\n }\r\n }\r\n else {\r\n this._logger.log(LogLevel.Debug, `Skipping transport '${HttpTransportType[transport]}' because it was disabled by the client.`);\r\n return new DisabledTransportError(`'${HttpTransportType[transport]}' is disabled by the client.`, transport);\r\n }\r\n }\r\n }\r\n _isITransport(transport) {\r\n return transport && typeof (transport) === \"object\" && \"connect\" in transport;\r\n }\r\n _stopConnection(error) {\r\n this._logger.log(LogLevel.Debug, `HttpConnection.stopConnection(${error}) called while in state ${this._connectionState}.`);\r\n this.transport = undefined;\r\n // If we have a stopError, it takes precedence over the error from the transport\r\n error = this._stopError || error;\r\n this._stopError = undefined;\r\n if (this._connectionState === \"Disconnected\" /* ConnectionState.Disconnected */) {\r\n this._logger.log(LogLevel.Debug, `Call to HttpConnection.stopConnection(${error}) was ignored because the connection is already in the disconnected state.`);\r\n return;\r\n }\r\n if (this._connectionState === \"Connecting\" /* ConnectionState.Connecting */) {\r\n this._logger.log(LogLevel.Warning, `Call to HttpConnection.stopConnection(${error}) was ignored because the connection is still in the connecting state.`);\r\n throw new Error(`HttpConnection.stopConnection(${error}) was called while the connection is still in the connecting state.`);\r\n }\r\n if (this._connectionState === \"Disconnecting\" /* ConnectionState.Disconnecting */) {\r\n // A call to stop() induced this call to stopConnection and needs to be completed.\r\n // Any stop() awaiters will be scheduled to continue after the onclose callback fires.\r\n this._stopPromiseResolver();\r\n }\r\n if (error) {\r\n this._logger.log(LogLevel.Error, `Connection disconnected with error '${error}'.`);\r\n }\r\n else {\r\n this._logger.log(LogLevel.Information, \"Connection disconnected.\");\r\n }\r\n if (this._sendQueue) {\r\n this._sendQueue.stop().catch((e) => {\r\n this._logger.log(LogLevel.Error, `TransportSendQueue.stop() threw error '${e}'.`);\r\n });\r\n this._sendQueue = undefined;\r\n }\r\n this.connectionId = undefined;\r\n this._connectionState = \"Disconnected\" /* ConnectionState.Disconnected */;\r\n if (this._connectionStarted) {\r\n this._connectionStarted = false;\r\n try {\r\n if (this.onclose) {\r\n this.onclose(error);\r\n }\r\n }\r\n catch (e) {\r\n this._logger.log(LogLevel.Error, `HttpConnection.onclose(${error}) threw error '${e}'.`);\r\n }\r\n }\r\n }\r\n _resolveUrl(url) {\r\n // startsWith is not supported in IE\r\n if (url.lastIndexOf(\"https://\", 0) === 0 || url.lastIndexOf(\"http://\", 0) === 0) {\r\n return url;\r\n }\r\n if (!Platform.isBrowser) {\r\n throw new Error(`Cannot resolve '${url}'.`);\r\n }\r\n // Setting the url to the href propery of an anchor tag handles normalization\r\n // for us. There are 3 main cases.\r\n // 1. Relative path normalization e.g \"b\" -> \"http://localhost:5000/a/b\"\r\n // 2. Absolute path normalization e.g \"/a/b\" -> \"http://localhost:5000/a/b\"\r\n // 3. Networkpath reference normalization e.g \"//localhost:5000/a/b\" -> \"http://localhost:5000/a/b\"\r\n const aTag = window.document.createElement(\"a\");\r\n aTag.href = url;\r\n this._logger.log(LogLevel.Information, `Normalizing '${url}' to '${aTag.href}'.`);\r\n return aTag.href;\r\n }\r\n _resolveNegotiateUrl(url) {\r\n const negotiateUrl = new URL(url);\r\n if (negotiateUrl.pathname.endsWith('/')) {\r\n negotiateUrl.pathname += \"negotiate\";\r\n }\r\n else {\r\n negotiateUrl.pathname += \"/negotiate\";\r\n }\r\n const searchParams = new URLSearchParams(negotiateUrl.searchParams);\r\n if (!searchParams.has(\"negotiateVersion\")) {\r\n searchParams.append(\"negotiateVersion\", this._negotiateVersion.toString());\r\n }\r\n if (searchParams.has(\"useStatefulReconnect\")) {\r\n if (searchParams.get(\"useStatefulReconnect\") === \"true\") {\r\n this._options._useStatefulReconnect = true;\r\n }\r\n }\r\n else if (this._options._useStatefulReconnect === true) {\r\n searchParams.append(\"useStatefulReconnect\", \"true\");\r\n }\r\n negotiateUrl.search = searchParams.toString();\r\n return negotiateUrl.toString();\r\n }\r\n}\r\nfunction transportMatches(requestedTransport, actualTransport) {\r\n return !requestedTransport || ((actualTransport & requestedTransport) !== 0);\r\n}\r\n/** @private */\r\nexport class TransportSendQueue {\r\n constructor(_transport) {\r\n this._transport = _transport;\r\n this._buffer = [];\r\n this._executing = true;\r\n this._sendBufferedData = new PromiseSource();\r\n this._transportResult = new PromiseSource();\r\n this._sendLoopPromise = this._sendLoop();\r\n }\r\n send(data) {\r\n this._bufferData(data);\r\n if (!this._transportResult) {\r\n this._transportResult = new PromiseSource();\r\n }\r\n return this._transportResult.promise;\r\n }\r\n stop() {\r\n this._executing = false;\r\n this._sendBufferedData.resolve();\r\n return this._sendLoopPromise;\r\n }\r\n _bufferData(data) {\r\n if (this._buffer.length && typeof (this._buffer[0]) !== typeof (data)) {\r\n throw new Error(`Expected data to be of type ${typeof (this._buffer)} but was of type ${typeof (data)}`);\r\n }\r\n this._buffer.push(data);\r\n this._sendBufferedData.resolve();\r\n }\r\n async _sendLoop() {\r\n while (true) {\r\n await this._sendBufferedData.promise;\r\n if (!this._executing) {\r\n if (this._transportResult) {\r\n this._transportResult.reject(\"Connection stopped.\");\r\n }\r\n break;\r\n }\r\n this._sendBufferedData = new PromiseSource();\r\n const transportResult = this._transportResult;\r\n this._transportResult = undefined;\r\n const data = typeof (this._buffer[0]) === \"string\" ?\r\n this._buffer.join(\"\") :\r\n TransportSendQueue._concatBuffers(this._buffer);\r\n this._buffer.length = 0;\r\n try {\r\n await this._transport.send(data);\r\n transportResult.resolve();\r\n }\r\n catch (error) {\r\n transportResult.reject(error);\r\n }\r\n }\r\n }\r\n static _concatBuffers(arrayBuffers) {\r\n const totalLength = arrayBuffers.map((b) => b.byteLength).reduce((a, b) => a + b);\r\n const result = new Uint8Array(totalLength);\r\n let offset = 0;\r\n for (const item of arrayBuffers) {\r\n result.set(new Uint8Array(item), offset);\r\n offset += item.byteLength;\r\n }\r\n return result.buffer;\r\n }\r\n}\r\nclass PromiseSource {\r\n constructor() {\r\n this.promise = new Promise((resolve, reject) => [this._resolver, this._rejecter] = [resolve, reject]);\r\n }\r\n resolve() {\r\n this._resolver();\r\n }\r\n reject(reason) {\r\n this._rejecter(reason);\r\n }\r\n}\r\n//# sourceMappingURL=HttpConnection.js.map","// Licensed to the .NET Foundation under one or more agreements.\r\n// The .NET Foundation licenses this file to you under the MIT license.\r\n// Not exported from index\r\n/** @private */\r\nexport class TextMessageFormat {\r\n static write(output) {\r\n return `${output}${TextMessageFormat.RecordSeparator}`;\r\n }\r\n static parse(input) {\r\n if (input[input.length - 1] !== TextMessageFormat.RecordSeparator) {\r\n throw new Error(\"Message is incomplete.\");\r\n }\r\n const messages = input.split(TextMessageFormat.RecordSeparator);\r\n messages.pop();\r\n return messages;\r\n }\r\n}\r\nTextMessageFormat.RecordSeparatorCode = 0x1e;\r\nTextMessageFormat.RecordSeparator = String.fromCharCode(TextMessageFormat.RecordSeparatorCode);\r\n//# sourceMappingURL=TextMessageFormat.js.map","// Licensed to the .NET Foundation under one or more agreements.\r\n// The .NET Foundation licenses this file to you under the MIT license.\r\nimport { TextMessageFormat } from \"./TextMessageFormat\";\r\nimport { isArrayBuffer } from \"./Utils\";\r\n/** @private */\r\nexport class HandshakeProtocol {\r\n // Handshake request is always JSON\r\n writeHandshakeRequest(handshakeRequest) {\r\n return TextMessageFormat.write(JSON.stringify(handshakeRequest));\r\n }\r\n parseHandshakeResponse(data) {\r\n let messageData;\r\n let remainingData;\r\n if (isArrayBuffer(data)) {\r\n // Format is binary but still need to read JSON text from handshake response\r\n const binaryData = new Uint8Array(data);\r\n const separatorIndex = binaryData.indexOf(TextMessageFormat.RecordSeparatorCode);\r\n if (separatorIndex === -1) {\r\n throw new Error(\"Message is incomplete.\");\r\n }\r\n // content before separator is handshake response\r\n // optional content after is additional messages\r\n const responseLength = separatorIndex + 1;\r\n messageData = String.fromCharCode.apply(null, Array.prototype.slice.call(binaryData.slice(0, responseLength)));\r\n remainingData = (binaryData.byteLength > responseLength) ? binaryData.slice(responseLength).buffer : null;\r\n }\r\n else {\r\n const textData = data;\r\n const separatorIndex = textData.indexOf(TextMessageFormat.RecordSeparator);\r\n if (separatorIndex === -1) {\r\n throw new Error(\"Message is incomplete.\");\r\n }\r\n // content before separator is handshake response\r\n // optional content after is additional messages\r\n const responseLength = separatorIndex + 1;\r\n messageData = textData.substring(0, responseLength);\r\n remainingData = (textData.length > responseLength) ? textData.substring(responseLength) : null;\r\n }\r\n // At this point we should have just the single handshake message\r\n const messages = TextMessageFormat.parse(messageData);\r\n const response = JSON.parse(messages[0]);\r\n if (response.type) {\r\n throw new Error(\"Expected a handshake response from the server.\");\r\n }\r\n const responseMessage = response;\r\n // multiple messages could have arrived with handshake\r\n // return additional data to be parsed as usual, or null if all parsed\r\n return [remainingData, responseMessage];\r\n }\r\n}\r\n//# sourceMappingURL=HandshakeProtocol.js.map","// Licensed to the .NET Foundation under one or more agreements.\r\n// The .NET Foundation licenses this file to you under the MIT license.\r\n/** Defines the type of a Hub Message. */\r\nexport var MessageType;\r\n(function (MessageType) {\r\n /** Indicates the message is an Invocation message and implements the {@link @microsoft/signalr.InvocationMessage} interface. */\r\n MessageType[MessageType[\"Invocation\"] = 1] = \"Invocation\";\r\n /** Indicates the message is a StreamItem message and implements the {@link @microsoft/signalr.StreamItemMessage} interface. */\r\n MessageType[MessageType[\"StreamItem\"] = 2] = \"StreamItem\";\r\n /** Indicates the message is a Completion message and implements the {@link @microsoft/signalr.CompletionMessage} interface. */\r\n MessageType[MessageType[\"Completion\"] = 3] = \"Completion\";\r\n /** Indicates the message is a Stream Invocation message and implements the {@link @microsoft/signalr.StreamInvocationMessage} interface. */\r\n MessageType[MessageType[\"StreamInvocation\"] = 4] = \"StreamInvocation\";\r\n /** Indicates the message is a Cancel Invocation message and implements the {@link @microsoft/signalr.CancelInvocationMessage} interface. */\r\n MessageType[MessageType[\"CancelInvocation\"] = 5] = \"CancelInvocation\";\r\n /** Indicates the message is a Ping message and implements the {@link @microsoft/signalr.PingMessage} interface. */\r\n MessageType[MessageType[\"Ping\"] = 6] = \"Ping\";\r\n /** Indicates the message is a Close message and implements the {@link @microsoft/signalr.CloseMessage} interface. */\r\n MessageType[MessageType[\"Close\"] = 7] = \"Close\";\r\n MessageType[MessageType[\"Ack\"] = 8] = \"Ack\";\r\n MessageType[MessageType[\"Sequence\"] = 9] = \"Sequence\";\r\n})(MessageType || (MessageType = {}));\r\n//# sourceMappingURL=IHubProtocol.js.map","// Licensed to the .NET Foundation under one or more agreements.\r\n// The .NET Foundation licenses this file to you under the MIT license.\r\nimport { SubjectSubscription } from \"./Utils\";\r\n/** Stream implementation to stream items to the server. */\r\nexport class Subject {\r\n constructor() {\r\n this.observers = [];\r\n }\r\n next(item) {\r\n for (const observer of this.observers) {\r\n observer.next(item);\r\n }\r\n }\r\n error(err) {\r\n for (const observer of this.observers) {\r\n if (observer.error) {\r\n observer.error(err);\r\n }\r\n }\r\n }\r\n complete() {\r\n for (const observer of this.observers) {\r\n if (observer.complete) {\r\n observer.complete();\r\n }\r\n }\r\n }\r\n subscribe(observer) {\r\n this.observers.push(observer);\r\n return new SubjectSubscription(this, observer);\r\n }\r\n}\r\n//# sourceMappingURL=Subject.js.map","// Licensed to the .NET Foundation under one or more agreements.\r\n// The .NET Foundation licenses this file to you under the MIT license.\r\nimport { MessageType } from \"./IHubProtocol\";\r\nimport { isArrayBuffer } from \"./Utils\";\r\n/** @private */\r\nexport class MessageBuffer {\r\n constructor(protocol, connection, bufferSize) {\r\n this._bufferSize = 100000;\r\n this._messages = [];\r\n this._totalMessageCount = 0;\r\n this._waitForSequenceMessage = false;\r\n // Message IDs start at 1 and always increment by 1\r\n this._nextReceivingSequenceId = 1;\r\n this._latestReceivedSequenceId = 0;\r\n this._bufferedByteCount = 0;\r\n this._reconnectInProgress = false;\r\n this._protocol = protocol;\r\n this._connection = connection;\r\n this._bufferSize = bufferSize;\r\n }\r\n async _send(message) {\r\n const serializedMessage = this._protocol.writeMessage(message);\r\n let backpressurePromise = Promise.resolve();\r\n // Only count invocation messages. Acks, pings, etc. don't need to be resent on reconnect\r\n if (this._isInvocationMessage(message)) {\r\n this._totalMessageCount++;\r\n let backpressurePromiseResolver = () => { };\r\n let backpressurePromiseRejector = () => { };\r\n if (isArrayBuffer(serializedMessage)) {\r\n this._bufferedByteCount += serializedMessage.byteLength;\r\n }\r\n else {\r\n this._bufferedByteCount += serializedMessage.length;\r\n }\r\n if (this._bufferedByteCount >= this._bufferSize) {\r\n backpressurePromise = new Promise((resolve, reject) => {\r\n backpressurePromiseResolver = resolve;\r\n backpressurePromiseRejector = reject;\r\n });\r\n }\r\n this._messages.push(new BufferedItem(serializedMessage, this._totalMessageCount, backpressurePromiseResolver, backpressurePromiseRejector));\r\n }\r\n try {\r\n // If this is set it means we are reconnecting or resending\r\n // We don't want to send on a disconnected connection\r\n // And we don't want to send if resend is running since that would mean sending\r\n // this message twice\r\n if (!this._reconnectInProgress) {\r\n await this._connection.send(serializedMessage);\r\n }\r\n }\r\n catch {\r\n this._disconnected();\r\n }\r\n await backpressurePromise;\r\n }\r\n _ack(ackMessage) {\r\n let newestAckedMessage = -1;\r\n // Find index of newest message being acked\r\n for (let index = 0; index < this._messages.length; index++) {\r\n const element = this._messages[index];\r\n if (element._id <= ackMessage.sequenceId) {\r\n newestAckedMessage = index;\r\n if (isArrayBuffer(element._message)) {\r\n this._bufferedByteCount -= element._message.byteLength;\r\n }\r\n else {\r\n this._bufferedByteCount -= element._message.length;\r\n }\r\n // resolve items that have already been sent and acked\r\n element._resolver();\r\n }\r\n else if (this._bufferedByteCount < this._bufferSize) {\r\n // resolve items that now fall under the buffer limit but haven't been acked\r\n element._resolver();\r\n }\r\n else {\r\n break;\r\n }\r\n }\r\n if (newestAckedMessage !== -1) {\r\n // We're removing everything including the message pointed to, so add 1\r\n this._messages = this._messages.slice(newestAckedMessage + 1);\r\n }\r\n }\r\n _shouldProcessMessage(message) {\r\n if (this._waitForSequenceMessage) {\r\n if (message.type !== MessageType.Sequence) {\r\n return false;\r\n }\r\n else {\r\n this._waitForSequenceMessage = false;\r\n return true;\r\n }\r\n }\r\n // No special processing for acks, pings, etc.\r\n if (!this._isInvocationMessage(message)) {\r\n return true;\r\n }\r\n const currentId = this._nextReceivingSequenceId;\r\n this._nextReceivingSequenceId++;\r\n if (currentId <= this._latestReceivedSequenceId) {\r\n if (currentId === this._latestReceivedSequenceId) {\r\n // Should only hit this if we just reconnected and the server is sending\r\n // Messages it has buffered, which would mean it hasn't seen an Ack for these messages\r\n this._ackTimer();\r\n }\r\n // Ignore, this is a duplicate message\r\n return false;\r\n }\r\n this._latestReceivedSequenceId = currentId;\r\n // Only start the timer for sending an Ack message when we have a message to ack. This also conveniently solves\r\n // timer throttling by not having a recursive timer, and by starting the timer via a network call (recv)\r\n this._ackTimer();\r\n return true;\r\n }\r\n _resetSequence(message) {\r\n if (message.sequenceId > this._nextReceivingSequenceId) {\r\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\r\n this._connection.stop(new Error(\"Sequence ID greater than amount of messages we've received.\"));\r\n return;\r\n }\r\n this._nextReceivingSequenceId = message.sequenceId;\r\n }\r\n _disconnected() {\r\n this._reconnectInProgress = true;\r\n this._waitForSequenceMessage = true;\r\n }\r\n async _resend() {\r\n const sequenceId = this._messages.length !== 0\r\n ? this._messages[0]._id\r\n : this._totalMessageCount + 1;\r\n await this._connection.send(this._protocol.writeMessage({ type: MessageType.Sequence, sequenceId }));\r\n // Get a local variable to the _messages, just in case messages are acked while resending\r\n // Which would slice the _messages array (which creates a new copy)\r\n const messages = this._messages;\r\n for (const element of messages) {\r\n await this._connection.send(element._message);\r\n }\r\n this._reconnectInProgress = false;\r\n }\r\n _dispose(error) {\r\n error !== null && error !== void 0 ? error : (error = new Error(\"Unable to reconnect to server.\"));\r\n // Unblock backpressure if any\r\n for (const element of this._messages) {\r\n element._rejector(error);\r\n }\r\n }\r\n _isInvocationMessage(message) {\r\n // There is no way to check if something implements an interface.\r\n // So we individually check the messages in a switch statement.\r\n // To make sure we don't miss any message types we rely on the compiler\r\n // seeing the function returns a value and it will do the\r\n // exhaustive check for us on the switch statement, since we don't use 'case default'\r\n switch (message.type) {\r\n case MessageType.Invocation:\r\n case MessageType.StreamItem:\r\n case MessageType.Completion:\r\n case MessageType.StreamInvocation:\r\n case MessageType.CancelInvocation:\r\n return true;\r\n case MessageType.Close:\r\n case MessageType.Sequence:\r\n case MessageType.Ping:\r\n case MessageType.Ack:\r\n return false;\r\n }\r\n }\r\n _ackTimer() {\r\n if (this._ackTimerHandle === undefined) {\r\n this._ackTimerHandle = setTimeout(async () => {\r\n try {\r\n if (!this._reconnectInProgress) {\r\n await this._connection.send(this._protocol.writeMessage({ type: MessageType.Ack, sequenceId: this._latestReceivedSequenceId }));\r\n }\r\n // Ignore errors, that means the connection is closed and we don't care about the Ack message anymore.\r\n }\r\n catch { }\r\n clearTimeout(this._ackTimerHandle);\r\n this._ackTimerHandle = undefined;\r\n // 1 second delay so we don't spam Ack messages if there are many messages being received at once.\r\n }, 1000);\r\n }\r\n }\r\n}\r\nclass BufferedItem {\r\n constructor(message, id, resolver, rejector) {\r\n this._message = message;\r\n this._id = id;\r\n this._resolver = resolver;\r\n this._rejector = rejector;\r\n }\r\n}\r\n//# sourceMappingURL=MessageBuffer.js.map","// Licensed to the .NET Foundation under one or more agreements.\r\n// The .NET Foundation licenses this file to you under the MIT license.\r\nimport { HandshakeProtocol } from \"./HandshakeProtocol\";\r\nimport { AbortError } from \"./Errors\";\r\nimport { MessageType } from \"./IHubProtocol\";\r\nimport { LogLevel } from \"./ILogger\";\r\nimport { Subject } from \"./Subject\";\r\nimport { Arg, getErrorString, Platform } from \"./Utils\";\r\nimport { MessageBuffer } from \"./MessageBuffer\";\r\nconst DEFAULT_TIMEOUT_IN_MS = 30 * 1000;\r\nconst DEFAULT_PING_INTERVAL_IN_MS = 15 * 1000;\r\nconst DEFAULT_STATEFUL_RECONNECT_BUFFER_SIZE = 100000;\r\n/** Describes the current state of the {@link HubConnection} to the server. */\r\nexport var HubConnectionState;\r\n(function (HubConnectionState) {\r\n /** The hub connection is disconnected. */\r\n HubConnectionState[\"Disconnected\"] = \"Disconnected\";\r\n /** The hub connection is connecting. */\r\n HubConnectionState[\"Connecting\"] = \"Connecting\";\r\n /** The hub connection is connected. */\r\n HubConnectionState[\"Connected\"] = \"Connected\";\r\n /** The hub connection is disconnecting. */\r\n HubConnectionState[\"Disconnecting\"] = \"Disconnecting\";\r\n /** The hub connection is reconnecting. */\r\n HubConnectionState[\"Reconnecting\"] = \"Reconnecting\";\r\n})(HubConnectionState || (HubConnectionState = {}));\r\n/** Represents a connection to a SignalR Hub. */\r\nexport class HubConnection {\r\n /** @internal */\r\n // Using a public static factory method means we can have a private constructor and an _internal_\r\n // create method that can be used by HubConnectionBuilder. An \"internal\" constructor would just\r\n // be stripped away and the '.d.ts' file would have no constructor, which is interpreted as a\r\n // public parameter-less constructor.\r\n static create(connection, logger, protocol, reconnectPolicy, serverTimeoutInMilliseconds, keepAliveIntervalInMilliseconds, statefulReconnectBufferSize) {\r\n return new HubConnection(connection, logger, protocol, reconnectPolicy, serverTimeoutInMilliseconds, keepAliveIntervalInMilliseconds, statefulReconnectBufferSize);\r\n }\r\n constructor(connection, logger, protocol, reconnectPolicy, serverTimeoutInMilliseconds, keepAliveIntervalInMilliseconds, statefulReconnectBufferSize) {\r\n this._nextKeepAlive = 0;\r\n this._freezeEventListener = () => {\r\n this._logger.log(LogLevel.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\");\r\n };\r\n Arg.isRequired(connection, \"connection\");\r\n Arg.isRequired(logger, \"logger\");\r\n Arg.isRequired(protocol, \"protocol\");\r\n this.serverTimeoutInMilliseconds = serverTimeoutInMilliseconds !== null && serverTimeoutInMilliseconds !== void 0 ? serverTimeoutInMilliseconds : DEFAULT_TIMEOUT_IN_MS;\r\n this.keepAliveIntervalInMilliseconds = keepAliveIntervalInMilliseconds !== null && keepAliveIntervalInMilliseconds !== void 0 ? keepAliveIntervalInMilliseconds : DEFAULT_PING_INTERVAL_IN_MS;\r\n this._statefulReconnectBufferSize = statefulReconnectBufferSize !== null && statefulReconnectBufferSize !== void 0 ? statefulReconnectBufferSize : DEFAULT_STATEFUL_RECONNECT_BUFFER_SIZE;\r\n this._logger = logger;\r\n this._protocol = protocol;\r\n this.connection = connection;\r\n this._reconnectPolicy = reconnectPolicy;\r\n this._handshakeProtocol = new HandshakeProtocol();\r\n this.connection.onreceive = (data) => this._processIncomingData(data);\r\n this.connection.onclose = (error) => this._connectionClosed(error);\r\n this._callbacks = {};\r\n this._methods = {};\r\n this._closedCallbacks = [];\r\n this._reconnectingCallbacks = [];\r\n this._reconnectedCallbacks = [];\r\n this._invocationId = 0;\r\n this._receivedHandshakeResponse = false;\r\n this._connectionState = HubConnectionState.Disconnected;\r\n this._connectionStarted = false;\r\n this._cachedPingMessage = this._protocol.writeMessage({ type: MessageType.Ping });\r\n }\r\n /** Indicates the state of the {@link HubConnection} to the server. */\r\n get state() {\r\n return this._connectionState;\r\n }\r\n /** Represents the connection id of the {@link HubConnection} on the server. The connection id will be null when the connection is either\r\n * in the disconnected state or if the negotiation step was skipped.\r\n */\r\n get connectionId() {\r\n return this.connection ? (this.connection.connectionId || null) : null;\r\n }\r\n /** Indicates the url of the {@link HubConnection} to the server. */\r\n get baseUrl() {\r\n return this.connection.baseUrl || \"\";\r\n }\r\n /**\r\n * Sets a new url for the HubConnection. Note that the url can only be changed when the connection is in either the Disconnected or\r\n * Reconnecting states.\r\n * @param {string} url The url to connect to.\r\n */\r\n set baseUrl(url) {\r\n if (this._connectionState !== HubConnectionState.Disconnected && this._connectionState !== HubConnectionState.Reconnecting) {\r\n throw new Error(\"The HubConnection must be in the Disconnected or Reconnecting state to change the url.\");\r\n }\r\n if (!url) {\r\n throw new Error(\"The HubConnection url must be a valid url.\");\r\n }\r\n this.connection.baseUrl = url;\r\n }\r\n /** Starts the connection.\r\n *\r\n * @returns {Promise} A Promise that resolves when the connection has been successfully established, or rejects with an error.\r\n */\r\n start() {\r\n this._startPromise = this._startWithStateTransitions();\r\n return this._startPromise;\r\n }\r\n async _startWithStateTransitions() {\r\n if (this._connectionState !== HubConnectionState.Disconnected) {\r\n return Promise.reject(new Error(\"Cannot start a HubConnection that is not in the 'Disconnected' state.\"));\r\n }\r\n this._connectionState = HubConnectionState.Connecting;\r\n this._logger.log(LogLevel.Debug, \"Starting HubConnection.\");\r\n try {\r\n await this._startInternal();\r\n if (Platform.isBrowser) {\r\n // Log when the browser freezes the tab so users know why their connection unexpectedly stopped working\r\n window.document.addEventListener(\"freeze\", this._freezeEventListener);\r\n }\r\n this._connectionState = HubConnectionState.Connected;\r\n this._connectionStarted = true;\r\n this._logger.log(LogLevel.Debug, \"HubConnection connected successfully.\");\r\n }\r\n catch (e) {\r\n this._connectionState = HubConnectionState.Disconnected;\r\n this._logger.log(LogLevel.Debug, `HubConnection failed to start successfully because of error '${e}'.`);\r\n return Promise.reject(e);\r\n }\r\n }\r\n async _startInternal() {\r\n this._stopDuringStartError = undefined;\r\n this._receivedHandshakeResponse = false;\r\n // Set up the promise before any connection is (re)started otherwise it could race with received messages\r\n const handshakePromise = new Promise((resolve, reject) => {\r\n this._handshakeResolver = resolve;\r\n this._handshakeRejecter = reject;\r\n });\r\n await this.connection.start(this._protocol.transferFormat);\r\n try {\r\n let version = this._protocol.version;\r\n if (!this.connection.features.reconnect) {\r\n // Stateful Reconnect starts with HubProtocol version 2, newer clients connecting to older servers will fail to connect due to\r\n // the handshake only supporting version 1, so we will try to send version 1 during the handshake to keep old servers working.\r\n version = 1;\r\n }\r\n const handshakeRequest = {\r\n protocol: this._protocol.name,\r\n version,\r\n };\r\n this._logger.log(LogLevel.Debug, \"Sending handshake request.\");\r\n await this._sendMessage(this._handshakeProtocol.writeHandshakeRequest(handshakeRequest));\r\n this._logger.log(LogLevel.Information, `Using HubProtocol '${this._protocol.name}'.`);\r\n // defensively cleanup timeout in case we receive a message from the server before we finish start\r\n this._cleanupTimeout();\r\n this._resetTimeoutPeriod();\r\n this._resetKeepAliveInterval();\r\n await handshakePromise;\r\n // It's important to check the stopDuringStartError instead of just relying on the handshakePromise\r\n // being rejected on close, because this continuation can run after both the handshake completed successfully\r\n // and the connection was closed.\r\n if (this._stopDuringStartError) {\r\n // It's important to throw instead of returning a rejected promise, because we don't want to allow any state\r\n // transitions to occur between now and the calling code observing the exceptions. Returning a rejected promise\r\n // will cause the calling continuation to get scheduled to run later.\r\n // eslint-disable-next-line @typescript-eslint/no-throw-literal\r\n throw this._stopDuringStartError;\r\n }\r\n const useStatefulReconnect = this.connection.features.reconnect || false;\r\n if (useStatefulReconnect) {\r\n this._messageBuffer = new MessageBuffer(this._protocol, this.connection, this._statefulReconnectBufferSize);\r\n this.connection.features.disconnected = this._messageBuffer._disconnected.bind(this._messageBuffer);\r\n this.connection.features.resend = () => {\r\n if (this._messageBuffer) {\r\n return this._messageBuffer._resend();\r\n }\r\n };\r\n }\r\n if (!this.connection.features.inherentKeepAlive) {\r\n await this._sendMessage(this._cachedPingMessage);\r\n }\r\n }\r\n catch (e) {\r\n this._logger.log(LogLevel.Debug, `Hub handshake failed with error '${e}' during start(). Stopping HubConnection.`);\r\n this._cleanupTimeout();\r\n this._cleanupPingTimer();\r\n // HttpConnection.stop() should not complete until after the onclose callback is invoked.\r\n // This will transition the HubConnection to the disconnected state before HttpConnection.stop() completes.\r\n await this.connection.stop(e);\r\n throw e;\r\n }\r\n }\r\n /** Stops the connection.\r\n *\r\n * @returns {Promise} A Promise that resolves when the connection has been successfully terminated, or rejects with an error.\r\n */\r\n async stop() {\r\n // Capture the start promise before the connection might be restarted in an onclose callback.\r\n const startPromise = this._startPromise;\r\n this.connection.features.reconnect = false;\r\n this._stopPromise = this._stopInternal();\r\n await this._stopPromise;\r\n try {\r\n // Awaiting undefined continues immediately\r\n await startPromise;\r\n }\r\n catch (e) {\r\n // This exception is returned to the user as a rejected Promise from the start method.\r\n }\r\n }\r\n _stopInternal(error) {\r\n if (this._connectionState === HubConnectionState.Disconnected) {\r\n this._logger.log(LogLevel.Debug, `Call to HubConnection.stop(${error}) ignored because it is already in the disconnected state.`);\r\n return Promise.resolve();\r\n }\r\n if (this._connectionState === HubConnectionState.Disconnecting) {\r\n this._logger.log(LogLevel.Debug, `Call to HttpConnection.stop(${error}) ignored because the connection is already in the disconnecting state.`);\r\n return this._stopPromise;\r\n }\r\n const state = this._connectionState;\r\n this._connectionState = HubConnectionState.Disconnecting;\r\n this._logger.log(LogLevel.Debug, \"Stopping HubConnection.\");\r\n if (this._reconnectDelayHandle) {\r\n // We're in a reconnect delay which means the underlying connection is currently already stopped.\r\n // Just clear the handle to stop the reconnect loop (which no one is waiting on thankfully) and\r\n // fire the onclose callbacks.\r\n this._logger.log(LogLevel.Debug, \"Connection stopped during reconnect delay. Done reconnecting.\");\r\n clearTimeout(this._reconnectDelayHandle);\r\n this._reconnectDelayHandle = undefined;\r\n this._completeClose();\r\n return Promise.resolve();\r\n }\r\n if (state === HubConnectionState.Connected) {\r\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\r\n this._sendCloseMessage();\r\n }\r\n this._cleanupTimeout();\r\n this._cleanupPingTimer();\r\n this._stopDuringStartError = error || new AbortError(\"The connection was stopped before the hub handshake could complete.\");\r\n // HttpConnection.stop() should not complete until after either HttpConnection.start() fails\r\n // or the onclose callback is invoked. The onclose callback will transition the HubConnection\r\n // to the disconnected state if need be before HttpConnection.stop() completes.\r\n return this.connection.stop(error);\r\n }\r\n async _sendCloseMessage() {\r\n try {\r\n await this._sendWithProtocol(this._createCloseMessage());\r\n }\r\n catch {\r\n // Ignore, this is a best effort attempt to let the server know the client closed gracefully.\r\n }\r\n }\r\n /** Invokes a streaming hub method on the server using the specified name and arguments.\r\n *\r\n * @typeparam T The type of the items returned by the server.\r\n * @param {string} methodName The name of the server method to invoke.\r\n * @param {any[]} args The arguments used to invoke the server method.\r\n * @returns {IStreamResult} An object that yields results from the server as they are received.\r\n */\r\n stream(methodName, ...args) {\r\n const [streams, streamIds] = this._replaceStreamingParams(args);\r\n const invocationDescriptor = this._createStreamInvocation(methodName, args, streamIds);\r\n // eslint-disable-next-line prefer-const\r\n let promiseQueue;\r\n const subject = new Subject();\r\n subject.cancelCallback = () => {\r\n const cancelInvocation = this._createCancelInvocation(invocationDescriptor.invocationId);\r\n delete this._callbacks[invocationDescriptor.invocationId];\r\n return promiseQueue.then(() => {\r\n return this._sendWithProtocol(cancelInvocation);\r\n });\r\n };\r\n this._callbacks[invocationDescriptor.invocationId] = (invocationEvent, error) => {\r\n if (error) {\r\n subject.error(error);\r\n return;\r\n }\r\n else if (invocationEvent) {\r\n // invocationEvent will not be null when an error is not passed to the callback\r\n if (invocationEvent.type === MessageType.Completion) {\r\n if (invocationEvent.error) {\r\n subject.error(new Error(invocationEvent.error));\r\n }\r\n else {\r\n subject.complete();\r\n }\r\n }\r\n else {\r\n subject.next((invocationEvent.item));\r\n }\r\n }\r\n };\r\n promiseQueue = this._sendWithProtocol(invocationDescriptor)\r\n .catch((e) => {\r\n subject.error(e);\r\n delete this._callbacks[invocationDescriptor.invocationId];\r\n });\r\n this._launchStreams(streams, promiseQueue);\r\n return subject;\r\n }\r\n _sendMessage(message) {\r\n this._resetKeepAliveInterval();\r\n return this.connection.send(message);\r\n }\r\n /**\r\n * Sends a js object to the server.\r\n * @param message The js object to serialize and send.\r\n */\r\n _sendWithProtocol(message) {\r\n if (this._messageBuffer) {\r\n return this._messageBuffer._send(message);\r\n }\r\n else {\r\n return this._sendMessage(this._protocol.writeMessage(message));\r\n }\r\n }\r\n /** Invokes a hub method on the server using the specified name and arguments. Does not wait for a response from the receiver.\r\n *\r\n * The Promise returned by this method resolves when the client has sent the invocation to the server. The server may still\r\n * be processing the invocation.\r\n *\r\n * @param {string} methodName The name of the server method to invoke.\r\n * @param {any[]} args The arguments used to invoke the server method.\r\n * @returns {Promise} A Promise that resolves when the invocation has been successfully sent, or rejects with an error.\r\n */\r\n send(methodName, ...args) {\r\n const [streams, streamIds] = this._replaceStreamingParams(args);\r\n const sendPromise = this._sendWithProtocol(this._createInvocation(methodName, args, true, streamIds));\r\n this._launchStreams(streams, sendPromise);\r\n return sendPromise;\r\n }\r\n /** Invokes a hub method on the server using the specified name and arguments.\r\n *\r\n * The Promise returned by this method resolves when the server indicates it has finished invoking the method. When the promise\r\n * resolves, the server has finished invoking the method. If the server method returns a result, it is produced as the result of\r\n * resolving the Promise.\r\n *\r\n * @typeparam T The expected return type.\r\n * @param {string} methodName The name of the server method to invoke.\r\n * @param {any[]} args The arguments used to invoke the server method.\r\n * @returns {Promise} A Promise that resolves with the result of the server method (if any), or rejects with an error.\r\n */\r\n invoke(methodName, ...args) {\r\n const [streams, streamIds] = this._replaceStreamingParams(args);\r\n const invocationDescriptor = this._createInvocation(methodName, args, false, streamIds);\r\n const p = new Promise((resolve, reject) => {\r\n // invocationId will always have a value for a non-blocking invocation\r\n this._callbacks[invocationDescriptor.invocationId] = (invocationEvent, error) => {\r\n if (error) {\r\n reject(error);\r\n return;\r\n }\r\n else if (invocationEvent) {\r\n // invocationEvent will not be null when an error is not passed to the callback\r\n if (invocationEvent.type === MessageType.Completion) {\r\n if (invocationEvent.error) {\r\n reject(new Error(invocationEvent.error));\r\n }\r\n else {\r\n resolve(invocationEvent.result);\r\n }\r\n }\r\n else {\r\n reject(new Error(`Unexpected message type: ${invocationEvent.type}`));\r\n }\r\n }\r\n };\r\n const promiseQueue = this._sendWithProtocol(invocationDescriptor)\r\n .catch((e) => {\r\n reject(e);\r\n // invocationId will always have a value for a non-blocking invocation\r\n delete this._callbacks[invocationDescriptor.invocationId];\r\n });\r\n this._launchStreams(streams, promiseQueue);\r\n });\r\n return p;\r\n }\r\n on(methodName, newMethod) {\r\n if (!methodName || !newMethod) {\r\n return;\r\n }\r\n methodName = methodName.toLowerCase();\r\n if (!this._methods[methodName]) {\r\n this._methods[methodName] = [];\r\n }\r\n // Preventing adding the same handler multiple times.\r\n if (this._methods[methodName].indexOf(newMethod) !== -1) {\r\n return;\r\n }\r\n this._methods[methodName].push(newMethod);\r\n }\r\n off(methodName, method) {\r\n if (!methodName) {\r\n return;\r\n }\r\n methodName = methodName.toLowerCase();\r\n const handlers = this._methods[methodName];\r\n if (!handlers) {\r\n return;\r\n }\r\n if (method) {\r\n const removeIdx = handlers.indexOf(method);\r\n if (removeIdx !== -1) {\r\n handlers.splice(removeIdx, 1);\r\n if (handlers.length === 0) {\r\n delete this._methods[methodName];\r\n }\r\n }\r\n }\r\n else {\r\n delete this._methods[methodName];\r\n }\r\n }\r\n /** Registers a handler that will be invoked when the connection is closed.\r\n *\r\n * @param {Function} callback The handler that will be invoked when the connection is closed. Optionally receives a single argument containing the error that caused the connection to close (if any).\r\n */\r\n onclose(callback) {\r\n if (callback) {\r\n this._closedCallbacks.push(callback);\r\n }\r\n }\r\n /** Registers a handler that will be invoked when the connection starts reconnecting.\r\n *\r\n * @param {Function} callback The handler that will be invoked when the connection starts reconnecting. Optionally receives a single argument containing the error that caused the connection to start reconnecting (if any).\r\n */\r\n onreconnecting(callback) {\r\n if (callback) {\r\n this._reconnectingCallbacks.push(callback);\r\n }\r\n }\r\n /** Registers a handler that will be invoked when the connection successfully reconnects.\r\n *\r\n * @param {Function} callback The handler that will be invoked when the connection successfully reconnects.\r\n */\r\n onreconnected(callback) {\r\n if (callback) {\r\n this._reconnectedCallbacks.push(callback);\r\n }\r\n }\r\n _processIncomingData(data) {\r\n this._cleanupTimeout();\r\n if (!this._receivedHandshakeResponse) {\r\n data = this._processHandshakeResponse(data);\r\n this._receivedHandshakeResponse = true;\r\n }\r\n // Data may have all been read when processing handshake response\r\n if (data) {\r\n // Parse the messages\r\n const messages = this._protocol.parseMessages(data, this._logger);\r\n for (const message of messages) {\r\n if (this._messageBuffer && !this._messageBuffer._shouldProcessMessage(message)) {\r\n // Don't process the message, we are either waiting for a SequenceMessage or received a duplicate message\r\n continue;\r\n }\r\n switch (message.type) {\r\n case MessageType.Invocation:\r\n this._invokeClientMethod(message)\r\n .catch((e) => {\r\n this._logger.log(LogLevel.Error, `Invoke client method threw error: ${getErrorString(e)}`);\r\n });\r\n break;\r\n case MessageType.StreamItem:\r\n case MessageType.Completion: {\r\n const callback = this._callbacks[message.invocationId];\r\n if (callback) {\r\n if (message.type === MessageType.Completion) {\r\n delete this._callbacks[message.invocationId];\r\n }\r\n try {\r\n callback(message);\r\n }\r\n catch (e) {\r\n this._logger.log(LogLevel.Error, `Stream callback threw error: ${getErrorString(e)}`);\r\n }\r\n }\r\n break;\r\n }\r\n case MessageType.Ping:\r\n // Don't care about pings\r\n break;\r\n case MessageType.Close: {\r\n this._logger.log(LogLevel.Information, \"Close message received from server.\");\r\n const error = message.error ? new Error(\"Server returned an error on close: \" + message.error) : undefined;\r\n if (message.allowReconnect === true) {\r\n // It feels wrong not to await connection.stop() here, but processIncomingData is called as part of an onreceive callback which is not async,\r\n // this is already the behavior for serverTimeout(), and HttpConnection.Stop() should catch and log all possible exceptions.\r\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\r\n this.connection.stop(error);\r\n }\r\n else {\r\n // We cannot await stopInternal() here, but subsequent calls to stop() will await this if stopInternal() is still ongoing.\r\n this._stopPromise = this._stopInternal(error);\r\n }\r\n break;\r\n }\r\n case MessageType.Ack:\r\n if (this._messageBuffer) {\r\n this._messageBuffer._ack(message);\r\n }\r\n break;\r\n case MessageType.Sequence:\r\n if (this._messageBuffer) {\r\n this._messageBuffer._resetSequence(message);\r\n }\r\n break;\r\n default:\r\n this._logger.log(LogLevel.Warning, `Invalid message type: ${message.type}.`);\r\n break;\r\n }\r\n }\r\n }\r\n this._resetTimeoutPeriod();\r\n }\r\n _processHandshakeResponse(data) {\r\n let responseMessage;\r\n let remainingData;\r\n try {\r\n [remainingData, responseMessage] = this._handshakeProtocol.parseHandshakeResponse(data);\r\n }\r\n catch (e) {\r\n const message = \"Error parsing handshake response: \" + e;\r\n this._logger.log(LogLevel.Error, message);\r\n const error = new Error(message);\r\n this._handshakeRejecter(error);\r\n throw error;\r\n }\r\n if (responseMessage.error) {\r\n const message = \"Server returned handshake error: \" + responseMessage.error;\r\n this._logger.log(LogLevel.Error, message);\r\n const error = new Error(message);\r\n this._handshakeRejecter(error);\r\n throw error;\r\n }\r\n else {\r\n this._logger.log(LogLevel.Debug, \"Server handshake complete.\");\r\n }\r\n this._handshakeResolver();\r\n return remainingData;\r\n }\r\n _resetKeepAliveInterval() {\r\n if (this.connection.features.inherentKeepAlive) {\r\n return;\r\n }\r\n // Set the time we want the next keep alive to be sent\r\n // Timer will be setup on next message receive\r\n this._nextKeepAlive = new Date().getTime() + this.keepAliveIntervalInMilliseconds;\r\n this._cleanupPingTimer();\r\n }\r\n _resetTimeoutPeriod() {\r\n if (!this.connection.features || !this.connection.features.inherentKeepAlive) {\r\n // Set the timeout timer\r\n this._timeoutHandle = setTimeout(() => this.serverTimeout(), this.serverTimeoutInMilliseconds);\r\n // Set keepAlive timer if there isn't one\r\n if (this._pingServerHandle === undefined) {\r\n let nextPing = this._nextKeepAlive - new Date().getTime();\r\n if (nextPing < 0) {\r\n nextPing = 0;\r\n }\r\n // The timer needs to be set from a networking callback to avoid Chrome timer throttling from causing timers to run once a minute\r\n this._pingServerHandle = setTimeout(async () => {\r\n if (this._connectionState === HubConnectionState.Connected) {\r\n try {\r\n await this._sendMessage(this._cachedPingMessage);\r\n }\r\n catch {\r\n // We don't care about the error. It should be seen elsewhere in the client.\r\n // The connection is probably in a bad or closed state now, cleanup the timer so it stops triggering\r\n this._cleanupPingTimer();\r\n }\r\n }\r\n }, nextPing);\r\n }\r\n }\r\n }\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n serverTimeout() {\r\n // The server hasn't talked to us in a while. It doesn't like us anymore ... :(\r\n // Terminate the connection, but we don't need to wait on the promise. This could trigger reconnecting.\r\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\r\n this.connection.stop(new Error(\"Server timeout elapsed without receiving a message from the server.\"));\r\n }\r\n async _invokeClientMethod(invocationMessage) {\r\n const methodName = invocationMessage.target.toLowerCase();\r\n const methods = this._methods[methodName];\r\n if (!methods) {\r\n this._logger.log(LogLevel.Warning, `No client method with the name '${methodName}' found.`);\r\n // No handlers provided by client but the server is expecting a response still, so we send an error\r\n if (invocationMessage.invocationId) {\r\n this._logger.log(LogLevel.Warning, `No result given for '${methodName}' method and invocation ID '${invocationMessage.invocationId}'.`);\r\n await this._sendWithProtocol(this._createCompletionMessage(invocationMessage.invocationId, \"Client didn't provide a result.\", null));\r\n }\r\n return;\r\n }\r\n // Avoid issues with handlers removing themselves thus modifying the list while iterating through it\r\n const methodsCopy = methods.slice();\r\n // Server expects a response\r\n const expectsResponse = invocationMessage.invocationId ? true : false;\r\n // We preserve the last result or exception but still call all handlers\r\n let res;\r\n let exception;\r\n let completionMessage;\r\n for (const m of methodsCopy) {\r\n try {\r\n const prevRes = res;\r\n res = await m.apply(this, invocationMessage.arguments);\r\n if (expectsResponse && res && prevRes) {\r\n this._logger.log(LogLevel.Error, `Multiple results provided for '${methodName}'. Sending error to server.`);\r\n completionMessage = this._createCompletionMessage(invocationMessage.invocationId, `Client provided multiple results.`, null);\r\n }\r\n // Ignore exception if we got a result after, the exception will be logged\r\n exception = undefined;\r\n }\r\n catch (e) {\r\n exception = e;\r\n this._logger.log(LogLevel.Error, `A callback for the method '${methodName}' threw error '${e}'.`);\r\n }\r\n }\r\n if (completionMessage) {\r\n await this._sendWithProtocol(completionMessage);\r\n }\r\n else if (expectsResponse) {\r\n // If there is an exception that means either no result was given or a handler after a result threw\r\n if (exception) {\r\n completionMessage = this._createCompletionMessage(invocationMessage.invocationId, `${exception}`, null);\r\n }\r\n else if (res !== undefined) {\r\n completionMessage = this._createCompletionMessage(invocationMessage.invocationId, null, res);\r\n }\r\n else {\r\n this._logger.log(LogLevel.Warning, `No result given for '${methodName}' method and invocation ID '${invocationMessage.invocationId}'.`);\r\n // Client didn't provide a result or throw from a handler, server expects a response so we send an error\r\n completionMessage = this._createCompletionMessage(invocationMessage.invocationId, \"Client didn't provide a result.\", null);\r\n }\r\n await this._sendWithProtocol(completionMessage);\r\n }\r\n else {\r\n if (res) {\r\n this._logger.log(LogLevel.Error, `Result given for '${methodName}' method but server is not expecting a result.`);\r\n }\r\n }\r\n }\r\n _connectionClosed(error) {\r\n this._logger.log(LogLevel.Debug, `HubConnection.connectionClosed(${error}) called while in state ${this._connectionState}.`);\r\n // Triggering this.handshakeRejecter is insufficient because it could already be resolved without the continuation having run yet.\r\n this._stopDuringStartError = this._stopDuringStartError || error || new AbortError(\"The underlying connection was closed before the hub handshake could complete.\");\r\n // If the handshake is in progress, start will be waiting for the handshake promise, so we complete it.\r\n // If it has already completed, this should just noop.\r\n if (this._handshakeResolver) {\r\n this._handshakeResolver();\r\n }\r\n this._cancelCallbacksWithError(error || new Error(\"Invocation canceled due to the underlying connection being closed.\"));\r\n this._cleanupTimeout();\r\n this._cleanupPingTimer();\r\n if (this._connectionState === HubConnectionState.Disconnecting) {\r\n this._completeClose(error);\r\n }\r\n else if (this._connectionState === HubConnectionState.Connected && this._reconnectPolicy) {\r\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\r\n this._reconnect(error);\r\n }\r\n else if (this._connectionState === HubConnectionState.Connected) {\r\n this._completeClose(error);\r\n }\r\n // If none of the above if conditions were true were called the HubConnection must be in either:\r\n // 1. The Connecting state in which case the handshakeResolver will complete it and stopDuringStartError will fail it.\r\n // 2. The Reconnecting state in which case the handshakeResolver will complete it and stopDuringStartError will fail the current reconnect attempt\r\n // and potentially continue the reconnect() loop.\r\n // 3. The Disconnected state in which case we're already done.\r\n }\r\n _completeClose(error) {\r\n if (this._connectionStarted) {\r\n this._connectionState = HubConnectionState.Disconnected;\r\n this._connectionStarted = false;\r\n if (this._messageBuffer) {\r\n this._messageBuffer._dispose(error !== null && error !== void 0 ? error : new Error(\"Connection closed.\"));\r\n this._messageBuffer = undefined;\r\n }\r\n if (Platform.isBrowser) {\r\n window.document.removeEventListener(\"freeze\", this._freezeEventListener);\r\n }\r\n try {\r\n this._closedCallbacks.forEach((c) => c.apply(this, [error]));\r\n }\r\n catch (e) {\r\n this._logger.log(LogLevel.Error, `An onclose callback called with error '${error}' threw error '${e}'.`);\r\n }\r\n }\r\n }\r\n async _reconnect(error) {\r\n const reconnectStartTime = Date.now();\r\n let previousReconnectAttempts = 0;\r\n let retryError = error !== undefined ? error : new Error(\"Attempting to reconnect due to a unknown error.\");\r\n let nextRetryDelay = this._getNextRetryDelay(previousReconnectAttempts++, 0, retryError);\r\n if (nextRetryDelay === null) {\r\n this._logger.log(LogLevel.Debug, \"Connection not reconnecting because the IRetryPolicy returned null on the first reconnect attempt.\");\r\n this._completeClose(error);\r\n return;\r\n }\r\n this._connectionState = HubConnectionState.Reconnecting;\r\n if (error) {\r\n this._logger.log(LogLevel.Information, `Connection reconnecting because of error '${error}'.`);\r\n }\r\n else {\r\n this._logger.log(LogLevel.Information, \"Connection reconnecting.\");\r\n }\r\n if (this._reconnectingCallbacks.length !== 0) {\r\n try {\r\n this._reconnectingCallbacks.forEach((c) => c.apply(this, [error]));\r\n }\r\n catch (e) {\r\n this._logger.log(LogLevel.Error, `An onreconnecting callback called with error '${error}' threw error '${e}'.`);\r\n }\r\n // Exit early if an onreconnecting callback called connection.stop().\r\n if (this._connectionState !== HubConnectionState.Reconnecting) {\r\n this._logger.log(LogLevel.Debug, \"Connection left the reconnecting state in onreconnecting callback. Done reconnecting.\");\r\n return;\r\n }\r\n }\r\n while (nextRetryDelay !== null) {\r\n this._logger.log(LogLevel.Information, `Reconnect attempt number ${previousReconnectAttempts} will start in ${nextRetryDelay} ms.`);\r\n await new Promise((resolve) => {\r\n this._reconnectDelayHandle = setTimeout(resolve, nextRetryDelay);\r\n });\r\n this._reconnectDelayHandle = undefined;\r\n if (this._connectionState !== HubConnectionState.Reconnecting) {\r\n this._logger.log(LogLevel.Debug, \"Connection left the reconnecting state during reconnect delay. Done reconnecting.\");\r\n return;\r\n }\r\n try {\r\n await this._startInternal();\r\n this._connectionState = HubConnectionState.Connected;\r\n this._logger.log(LogLevel.Information, \"HubConnection reconnected successfully.\");\r\n if (this._reconnectedCallbacks.length !== 0) {\r\n try {\r\n this._reconnectedCallbacks.forEach((c) => c.apply(this, [this.connection.connectionId]));\r\n }\r\n catch (e) {\r\n this._logger.log(LogLevel.Error, `An onreconnected callback called with connectionId '${this.connection.connectionId}; threw error '${e}'.`);\r\n }\r\n }\r\n return;\r\n }\r\n catch (e) {\r\n this._logger.log(LogLevel.Information, `Reconnect attempt failed because of error '${e}'.`);\r\n if (this._connectionState !== HubConnectionState.Reconnecting) {\r\n this._logger.log(LogLevel.Debug, `Connection moved to the '${this._connectionState}' from the reconnecting state during reconnect attempt. Done reconnecting.`);\r\n // The TypeScript compiler thinks that connectionState must be Connected here. The TypeScript compiler is wrong.\r\n if (this._connectionState === HubConnectionState.Disconnecting) {\r\n this._completeClose();\r\n }\r\n return;\r\n }\r\n retryError = e instanceof Error ? e : new Error(e.toString());\r\n nextRetryDelay = this._getNextRetryDelay(previousReconnectAttempts++, Date.now() - reconnectStartTime, retryError);\r\n }\r\n }\r\n this._logger.log(LogLevel.Information, `Reconnect retries have been exhausted after ${Date.now() - reconnectStartTime} ms and ${previousReconnectAttempts} failed attempts. Connection disconnecting.`);\r\n this._completeClose();\r\n }\r\n _getNextRetryDelay(previousRetryCount, elapsedMilliseconds, retryReason) {\r\n try {\r\n return this._reconnectPolicy.nextRetryDelayInMilliseconds({\r\n elapsedMilliseconds,\r\n previousRetryCount,\r\n retryReason,\r\n });\r\n }\r\n catch (e) {\r\n this._logger.log(LogLevel.Error, `IRetryPolicy.nextRetryDelayInMilliseconds(${previousRetryCount}, ${elapsedMilliseconds}) threw error '${e}'.`);\r\n return null;\r\n }\r\n }\r\n _cancelCallbacksWithError(error) {\r\n const callbacks = this._callbacks;\r\n this._callbacks = {};\r\n Object.keys(callbacks)\r\n .forEach((key) => {\r\n const callback = callbacks[key];\r\n try {\r\n callback(null, error);\r\n }\r\n catch (e) {\r\n this._logger.log(LogLevel.Error, `Stream 'error' callback called with '${error}' threw error: ${getErrorString(e)}`);\r\n }\r\n });\r\n }\r\n _cleanupPingTimer() {\r\n if (this._pingServerHandle) {\r\n clearTimeout(this._pingServerHandle);\r\n this._pingServerHandle = undefined;\r\n }\r\n }\r\n _cleanupTimeout() {\r\n if (this._timeoutHandle) {\r\n clearTimeout(this._timeoutHandle);\r\n }\r\n }\r\n _createInvocation(methodName, args, nonblocking, streamIds) {\r\n if (nonblocking) {\r\n if (streamIds.length !== 0) {\r\n return {\r\n arguments: args,\r\n streamIds,\r\n target: methodName,\r\n type: MessageType.Invocation,\r\n };\r\n }\r\n else {\r\n return {\r\n arguments: args,\r\n target: methodName,\r\n type: MessageType.Invocation,\r\n };\r\n }\r\n }\r\n else {\r\n const invocationId = this._invocationId;\r\n this._invocationId++;\r\n if (streamIds.length !== 0) {\r\n return {\r\n arguments: args,\r\n invocationId: invocationId.toString(),\r\n streamIds,\r\n target: methodName,\r\n type: MessageType.Invocation,\r\n };\r\n }\r\n else {\r\n return {\r\n arguments: args,\r\n invocationId: invocationId.toString(),\r\n target: methodName,\r\n type: MessageType.Invocation,\r\n };\r\n }\r\n }\r\n }\r\n _launchStreams(streams, promiseQueue) {\r\n if (streams.length === 0) {\r\n return;\r\n }\r\n // Synchronize stream data so they arrive in-order on the server\r\n if (!promiseQueue) {\r\n promiseQueue = Promise.resolve();\r\n }\r\n // We want to iterate over the keys, since the keys are the stream ids\r\n // eslint-disable-next-line guard-for-in\r\n for (const streamId in streams) {\r\n streams[streamId].subscribe({\r\n complete: () => {\r\n promiseQueue = promiseQueue.then(() => this._sendWithProtocol(this._createCompletionMessage(streamId)));\r\n },\r\n error: (err) => {\r\n let message;\r\n if (err instanceof Error) {\r\n message = err.message;\r\n }\r\n else if (err && err.toString) {\r\n message = err.toString();\r\n }\r\n else {\r\n message = \"Unknown error\";\r\n }\r\n promiseQueue = promiseQueue.then(() => this._sendWithProtocol(this._createCompletionMessage(streamId, message)));\r\n },\r\n next: (item) => {\r\n promiseQueue = promiseQueue.then(() => this._sendWithProtocol(this._createStreamItemMessage(streamId, item)));\r\n },\r\n });\r\n }\r\n }\r\n _replaceStreamingParams(args) {\r\n const streams = [];\r\n const streamIds = [];\r\n for (let i = 0; i < args.length; i++) {\r\n const argument = args[i];\r\n if (this._isObservable(argument)) {\r\n const streamId = this._invocationId;\r\n this._invocationId++;\r\n // Store the stream for later use\r\n streams[streamId] = argument;\r\n streamIds.push(streamId.toString());\r\n // remove stream from args\r\n args.splice(i, 1);\r\n }\r\n }\r\n return [streams, streamIds];\r\n }\r\n _isObservable(arg) {\r\n // This allows other stream implementations to just work (like rxjs)\r\n return arg && arg.subscribe && typeof arg.subscribe === \"function\";\r\n }\r\n _createStreamInvocation(methodName, args, streamIds) {\r\n const invocationId = this._invocationId;\r\n this._invocationId++;\r\n if (streamIds.length !== 0) {\r\n return {\r\n arguments: args,\r\n invocationId: invocationId.toString(),\r\n streamIds,\r\n target: methodName,\r\n type: MessageType.StreamInvocation,\r\n };\r\n }\r\n else {\r\n return {\r\n arguments: args,\r\n invocationId: invocationId.toString(),\r\n target: methodName,\r\n type: MessageType.StreamInvocation,\r\n };\r\n }\r\n }\r\n _createCancelInvocation(id) {\r\n return {\r\n invocationId: id,\r\n type: MessageType.CancelInvocation,\r\n };\r\n }\r\n _createStreamItemMessage(id, item) {\r\n return {\r\n invocationId: id,\r\n item,\r\n type: MessageType.StreamItem,\r\n };\r\n }\r\n _createCompletionMessage(id, error, result) {\r\n if (error) {\r\n return {\r\n error,\r\n invocationId: id,\r\n type: MessageType.Completion,\r\n };\r\n }\r\n return {\r\n invocationId: id,\r\n result,\r\n type: MessageType.Completion,\r\n };\r\n }\r\n _createCloseMessage() {\r\n return { type: MessageType.Close };\r\n }\r\n}\r\n//# sourceMappingURL=HubConnection.js.map","// Licensed to the .NET Foundation under one or more agreements.\r\n// The .NET Foundation licenses this file to you under the MIT license.\r\nimport { MessageType } from \"./IHubProtocol\";\r\nimport { LogLevel } from \"./ILogger\";\r\nimport { TransferFormat } from \"./ITransport\";\r\nimport { NullLogger } from \"./Loggers\";\r\nimport { TextMessageFormat } from \"./TextMessageFormat\";\r\nconst JSON_HUB_PROTOCOL_NAME = \"json\";\r\n/** Implements the JSON Hub Protocol. */\r\nexport class JsonHubProtocol {\r\n constructor() {\r\n /** @inheritDoc */\r\n this.name = JSON_HUB_PROTOCOL_NAME;\r\n /** @inheritDoc */\r\n this.version = 2;\r\n /** @inheritDoc */\r\n this.transferFormat = TransferFormat.Text;\r\n }\r\n /** Creates an array of {@link @microsoft/signalr.HubMessage} objects from the specified serialized representation.\r\n *\r\n * @param {string} input A string containing the serialized representation.\r\n * @param {ILogger} logger A logger that will be used to log messages that occur during parsing.\r\n */\r\n parseMessages(input, logger) {\r\n // The interface does allow \"ArrayBuffer\" to be passed in, but this implementation does not. So let's throw a useful error.\r\n if (typeof input !== \"string\") {\r\n throw new Error(\"Invalid input for JSON hub protocol. Expected a string.\");\r\n }\r\n if (!input) {\r\n return [];\r\n }\r\n if (logger === null) {\r\n logger = NullLogger.instance;\r\n }\r\n // Parse the messages\r\n const messages = TextMessageFormat.parse(input);\r\n const hubMessages = [];\r\n for (const message of messages) {\r\n const parsedMessage = JSON.parse(message);\r\n if (typeof parsedMessage.type !== \"number\") {\r\n throw new Error(\"Invalid payload.\");\r\n }\r\n switch (parsedMessage.type) {\r\n case MessageType.Invocation:\r\n this._isInvocationMessage(parsedMessage);\r\n break;\r\n case MessageType.StreamItem:\r\n this._isStreamItemMessage(parsedMessage);\r\n break;\r\n case MessageType.Completion:\r\n this._isCompletionMessage(parsedMessage);\r\n break;\r\n case MessageType.Ping:\r\n // Single value, no need to validate\r\n break;\r\n case MessageType.Close:\r\n // All optional values, no need to validate\r\n break;\r\n case MessageType.Ack:\r\n this._isAckMessage(parsedMessage);\r\n break;\r\n case MessageType.Sequence:\r\n this._isSequenceMessage(parsedMessage);\r\n break;\r\n default:\r\n // Future protocol changes can add message types, old clients can ignore them\r\n logger.log(LogLevel.Information, \"Unknown message type '\" + parsedMessage.type + \"' ignored.\");\r\n continue;\r\n }\r\n hubMessages.push(parsedMessage);\r\n }\r\n return hubMessages;\r\n }\r\n /** Writes the specified {@link @microsoft/signalr.HubMessage} to a string and returns it.\r\n *\r\n * @param {HubMessage} message The message to write.\r\n * @returns {string} A string containing the serialized representation of the message.\r\n */\r\n writeMessage(message) {\r\n return TextMessageFormat.write(JSON.stringify(message));\r\n }\r\n _isInvocationMessage(message) {\r\n this._assertNotEmptyString(message.target, \"Invalid payload for Invocation message.\");\r\n if (message.invocationId !== undefined) {\r\n this._assertNotEmptyString(message.invocationId, \"Invalid payload for Invocation message.\");\r\n }\r\n }\r\n _isStreamItemMessage(message) {\r\n this._assertNotEmptyString(message.invocationId, \"Invalid payload for StreamItem message.\");\r\n if (message.item === undefined) {\r\n throw new Error(\"Invalid payload for StreamItem message.\");\r\n }\r\n }\r\n _isCompletionMessage(message) {\r\n if (message.result && message.error) {\r\n throw new Error(\"Invalid payload for Completion message.\");\r\n }\r\n if (!message.result && message.error) {\r\n this._assertNotEmptyString(message.error, \"Invalid payload for Completion message.\");\r\n }\r\n this._assertNotEmptyString(message.invocationId, \"Invalid payload for Completion message.\");\r\n }\r\n _isAckMessage(message) {\r\n if (typeof message.sequenceId !== 'number') {\r\n throw new Error(\"Invalid SequenceId for Ack message.\");\r\n }\r\n }\r\n _isSequenceMessage(message) {\r\n if (typeof message.sequenceId !== 'number') {\r\n throw new Error(\"Invalid SequenceId for Sequence message.\");\r\n }\r\n }\r\n _assertNotEmptyString(value, errorMessage) {\r\n if (typeof value !== \"string\" || value === \"\") {\r\n throw new Error(errorMessage);\r\n }\r\n }\r\n}\r\n//# sourceMappingURL=JsonHubProtocol.js.map","// Licensed to the .NET Foundation under one or more agreements.\r\n// The .NET Foundation licenses this file to you under the MIT license.\r\nimport { DefaultReconnectPolicy } from \"./DefaultReconnectPolicy\";\r\nimport { HttpConnection } from \"./HttpConnection\";\r\nimport { HubConnection } from \"./HubConnection\";\r\nimport { LogLevel } from \"./ILogger\";\r\nimport { JsonHubProtocol } from \"./JsonHubProtocol\";\r\nimport { NullLogger } from \"./Loggers\";\r\nimport { Arg, ConsoleLogger } from \"./Utils\";\r\nconst LogLevelNameMapping = {\r\n trace: LogLevel.Trace,\r\n debug: LogLevel.Debug,\r\n info: LogLevel.Information,\r\n information: LogLevel.Information,\r\n warn: LogLevel.Warning,\r\n warning: LogLevel.Warning,\r\n error: LogLevel.Error,\r\n critical: LogLevel.Critical,\r\n none: LogLevel.None,\r\n};\r\nfunction parseLogLevel(name) {\r\n // Case-insensitive matching via lower-casing\r\n // Yes, I know case-folding is a complicated problem in Unicode, but we only support\r\n // the ASCII strings defined in LogLevelNameMapping anyway, so it's fine -anurse.\r\n const mapping = LogLevelNameMapping[name.toLowerCase()];\r\n if (typeof mapping !== \"undefined\") {\r\n return mapping;\r\n }\r\n else {\r\n throw new Error(`Unknown log level: ${name}`);\r\n }\r\n}\r\n/** A builder for configuring {@link @microsoft/signalr.HubConnection} instances. */\r\nexport class HubConnectionBuilder {\r\n configureLogging(logging) {\r\n Arg.isRequired(logging, \"logging\");\r\n if (isLogger(logging)) {\r\n this.logger = logging;\r\n }\r\n else if (typeof logging === \"string\") {\r\n const logLevel = parseLogLevel(logging);\r\n this.logger = new ConsoleLogger(logLevel);\r\n }\r\n else {\r\n this.logger = new ConsoleLogger(logging);\r\n }\r\n return this;\r\n }\r\n withUrl(url, transportTypeOrOptions) {\r\n Arg.isRequired(url, \"url\");\r\n Arg.isNotEmpty(url, \"url\");\r\n this.url = url;\r\n // Flow-typing knows where it's at. Since HttpTransportType is a number and IHttpConnectionOptions is guaranteed\r\n // to be an object, we know (as does TypeScript) this comparison is all we need to figure out which overload was called.\r\n if (typeof transportTypeOrOptions === \"object\") {\r\n this.httpConnectionOptions = { ...this.httpConnectionOptions, ...transportTypeOrOptions };\r\n }\r\n else {\r\n this.httpConnectionOptions = {\r\n ...this.httpConnectionOptions,\r\n transport: transportTypeOrOptions,\r\n };\r\n }\r\n return this;\r\n }\r\n /** Configures the {@link @microsoft/signalr.HubConnection} to use the specified Hub Protocol.\r\n *\r\n * @param {IHubProtocol} protocol The {@link @microsoft/signalr.IHubProtocol} implementation to use.\r\n */\r\n withHubProtocol(protocol) {\r\n Arg.isRequired(protocol, \"protocol\");\r\n this.protocol = protocol;\r\n return this;\r\n }\r\n withAutomaticReconnect(retryDelaysOrReconnectPolicy) {\r\n if (this.reconnectPolicy) {\r\n throw new Error(\"A reconnectPolicy has already been set.\");\r\n }\r\n if (!retryDelaysOrReconnectPolicy) {\r\n this.reconnectPolicy = new DefaultReconnectPolicy();\r\n }\r\n else if (Array.isArray(retryDelaysOrReconnectPolicy)) {\r\n this.reconnectPolicy = new DefaultReconnectPolicy(retryDelaysOrReconnectPolicy);\r\n }\r\n else {\r\n this.reconnectPolicy = retryDelaysOrReconnectPolicy;\r\n }\r\n return this;\r\n }\r\n /** Configures {@link @microsoft/signalr.HubConnection.serverTimeoutInMilliseconds} for the {@link @microsoft/signalr.HubConnection}.\r\n *\r\n * @returns The {@link @microsoft/signalr.HubConnectionBuilder} instance, for chaining.\r\n */\r\n withServerTimeout(milliseconds) {\r\n Arg.isRequired(milliseconds, \"milliseconds\");\r\n this._serverTimeoutInMilliseconds = milliseconds;\r\n return this;\r\n }\r\n /** Configures {@link @microsoft/signalr.HubConnection.keepAliveIntervalInMilliseconds} for the {@link @microsoft/signalr.HubConnection}.\r\n *\r\n * @returns The {@link @microsoft/signalr.HubConnectionBuilder} instance, for chaining.\r\n */\r\n withKeepAliveInterval(milliseconds) {\r\n Arg.isRequired(milliseconds, \"milliseconds\");\r\n this._keepAliveIntervalInMilliseconds = milliseconds;\r\n return this;\r\n }\r\n /** Enables and configures options for the Stateful Reconnect feature.\r\n *\r\n * @returns The {@link @microsoft/signalr.HubConnectionBuilder} instance, for chaining.\r\n */\r\n withStatefulReconnect(options) {\r\n if (this.httpConnectionOptions === undefined) {\r\n this.httpConnectionOptions = {};\r\n }\r\n this.httpConnectionOptions._useStatefulReconnect = true;\r\n this._statefulReconnectBufferSize = options === null || options === void 0 ? void 0 : options.bufferSize;\r\n return this;\r\n }\r\n /** Creates a {@link @microsoft/signalr.HubConnection} from the configuration options specified in this builder.\r\n *\r\n * @returns {HubConnection} The configured {@link @microsoft/signalr.HubConnection}.\r\n */\r\n build() {\r\n // If httpConnectionOptions has a logger, use it. Otherwise, override it with the one\r\n // provided to configureLogger\r\n const httpConnectionOptions = this.httpConnectionOptions || {};\r\n // If it's 'null', the user **explicitly** asked for null, don't mess with it.\r\n if (httpConnectionOptions.logger === undefined) {\r\n // If our logger is undefined or null, that's OK, the HttpConnection constructor will handle it.\r\n httpConnectionOptions.logger = this.logger;\r\n }\r\n // Now create the connection\r\n if (!this.url) {\r\n throw new Error(\"The 'HubConnectionBuilder.withUrl' method must be called before building the connection.\");\r\n }\r\n const connection = new HttpConnection(this.url, httpConnectionOptions);\r\n return HubConnection.create(connection, this.logger || NullLogger.instance, this.protocol || new JsonHubProtocol(), this.reconnectPolicy, this._serverTimeoutInMilliseconds, this._keepAliveIntervalInMilliseconds, this._statefulReconnectBufferSize);\r\n }\r\n}\r\nfunction isLogger(logger) {\r\n return logger.log !== undefined;\r\n}\r\n//# sourceMappingURL=HubConnectionBuilder.js.map","import * as signalR from \"@microsoft/signalr\";\r\nimport store from \"@/store\";\r\n\r\nconst isLocal = window.location.hostname === 'localhost';\r\nconst baseUrl = isLocal ? process.env.VUE_APP_SIGNALR_BASE_HUB_URL : window.location.origin;\r\n\r\nconst outageHubConnection = new signalR.HubConnectionBuilder()\r\n .withUrl(`${baseUrl}/outagehub`, {\r\n accessTokenFactory: () => store.getters[\"Auth/getAccessToken\"],\r\n })\r\n .withAutomaticReconnect()\r\n .build();\r\n\r\nexport default outageHubConnection;\r\n","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport { Component, Prop, Vue } from \"vue-property-decorator\";\nimport DataQualityTableRow from \"@/components/dataQuality/dataQualityTable/DataQualityTableRow.vue\";\nimport { DataQualityHeader, DataQualityRow } from \"@/types/dataQuality/dataQualityTable\";\nimport outageHubConnection from \"../../../utilities/signalr/signalr-outagehub-service\";\nimport UserModule from \"@/store/clients/User.module\";\nimport { getModule } from \"vuex-module-decorators\";\nimport store from \"@/store\";\n\nconst User = getModule(UserModule, store);\n\n@Component({\n components: {\n DataQualityTableRow,\n },\n})\nexport default class DataQualityTable extends Vue {\n @Prop({ type: Boolean, default: false }) showOverallStatus!: Boolean;\n @Prop({ type: Boolean, default: false }) loading!: Boolean;\n @Prop({ type: Array, default: () => [] }) headers!: DataQualityHeader[];\n @Prop({ type: Array, default: () => [] }) rows!: DataQualityRow[];\n @Prop({ type: Array, default: () => [] }) links!: string[] | null;\n\n limitPerPage = 10;\n\n get isLessThanLimitPerPage(): boolean {\n return this.rows.length <= this.limitPerPage;\n }\n\n created() {\n if (outageHubConnection.state === \"Disconnected\") {\n outageHubConnection\n .start()\n .then(() => {\n outageHubConnection.invoke(\"JoinGroup\", `company-${User.userCompanyId}`);\n })\n .catch(err => console.error(err.toString()));\n } else {\n console.log(\"Connection is already started or in the process of starting.\");\n }\n\n outageHubConnection.on(\"OutageUpdated\", (outage, vesselInfo) => {\n this.$emit(\"outage-updated\", vesselInfo.vesselName, outage.featureName, outage);\n });\n }\n\n beforeDestroy() {\n outageHubConnection\n .invoke(\"LeaveGroup\", `company-${User.userCompanyId}`)\n .then(() => {\n outageHubConnection.off(\"OutageUpdated\");\n outageHubConnection.stop();\n })\n .catch(err => console.error(err.toString()));\n }\n\n get indicatorsCount(): number {\n return this.headers.length;\n }\n\n get skeletonStructure(): object {\n return { \"table-row\": `table-cell@6` };\n }\n\n customSort(items: any, sortBy: any, isDesc: any): [] {\n // do nothing when the sorting is reset\n if (!sortBy[0]) return items;\n\n // sort as strings\n const result = items.sort((a: any, b: any) => {\n if (isDesc[0]) return b[sortBy].value < a[sortBy].value ? -1 : 1;\n return a[sortBy].value < b[sortBy].value ? -1 : 1;\n });\n return result;\n }\n}\n","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--15-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/ts-loader/index.js??ref--15-3!../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./DataQualityTable.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--15-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/ts-loader/index.js??ref--15-3!../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./DataQualityTable.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./DataQualityTable.vue?vue&type=template&id=296f349c&scoped=true&\"\nimport script from \"./DataQualityTable.vue?vue&type=script&lang=ts&\"\nexport * from \"./DataQualityTable.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./DataQualityTable.vue?vue&type=style&index=0&id=296f349c&lang=scss&scoped=true&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"296f349c\",\n null\n \n)\n\nexport default component.exports\n\n/* vuetify-loader */\nimport installComponents from \"!../../../../node_modules/vuetify-loader/lib/runtime/installComponents.js\"\nimport { VDataTable } from 'vuetify/lib/components/VDataTable';\nimport { VIcon } from 'vuetify/lib/components/VIcon';\nimport { VSkeletonLoader } from 'vuetify/lib/components/VSkeletonLoader';\nimport { VTooltip } from 'vuetify/lib/components/VTooltip';\ninstallComponents(component, {VDataTable,VIcon,VSkeletonLoader,VTooltip})\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('v-container',{staticClass:\"pa-0\"},[_c('v-row',[_c('v-col',{staticClass:\"pa-1\",attrs:{\"cols\":\"1\"}},[_c('DataQualityIndicator',{attrs:{\"showOverallStatus\":1}})],1),_c('v-col',{staticClass:\"d-flex align-center pa-1 ml-n5\"},[_vm._v(\" Indicates a normal data status \")])],1),_c('v-row',[_c('v-col',{staticClass:\"pa-1\",attrs:{\"cols\":\"1\"}},[_c('DataQualityIndicator',{attrs:{\"showOverallStatus\":2}})],1),_c('v-col',{staticClass:\"d-flex align-center pa-1 ml-n5\"},[_vm._v(\" Indicates a warning status \")])],1),_c('v-row',[_c('v-col',{staticClass:\"pa-1\",attrs:{\"cols\":\"1\"}},[_c('DataQualityIndicator',{attrs:{\"showOverallStatus\":3}})],1),_c('v-col',{staticClass:\"d-flex align-center pa-1 ml-n5\"},[_vm._v(\" Indicates a critical status \")])],1),_c('v-row',[_c('v-col',{staticClass:\"pa-1\",attrs:{\"cols\":\"1\"}},[_c('DataQualityIndicator',{attrs:{\"showOverallStatus\":0}})],1),_c('v-col',{staticClass:\"d-flex align-center pa-1 ml-n5\"},[_vm._v(\" Indicates that the data is not available \")])],1)],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n import { Vue, Component } from \"vue-property-decorator\";\n import DataQualityIndicator from \"@/components/dataQuality/DataQualityIndicator.vue\";\n\n@Component({\n components: {\n DataQualityIndicator,\n },\n})\n export default class DataQualityIndicatorLegend extends Vue {\n\n }\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--15-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/ts-loader/index.js??ref--15-3!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./DataQualityIndicatorLegend.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--15-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/ts-loader/index.js??ref--15-3!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./DataQualityIndicatorLegend.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./DataQualityIndicatorLegend.vue?vue&type=template&id=75b5558c&\"\nimport script from \"./DataQualityIndicatorLegend.vue?vue&type=script&lang=ts&\"\nexport * from \"./DataQualityIndicatorLegend.vue?vue&type=script&lang=ts&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports\n\n/* vuetify-loader */\nimport installComponents from \"!../../../node_modules/vuetify-loader/lib/runtime/installComponents.js\"\nimport { VCol } from 'vuetify/lib/components/VGrid';\nimport { VContainer } from 'vuetify/lib/components/VGrid';\nimport { VRow } from 'vuetify/lib/components/VGrid';\ninstallComponents(component, {VCol,VContainer,VRow})\n","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nimport { Vue, Component, Watch } from \"vue-property-decorator\";\nimport DataAvailabilityModal from \"@/components/dataQuality/dataAvailabilityModal/DataAvailabilityModal.vue\";\nimport DataQualityTable from \"@/components/dataQuality/dataQualityTable/DataQualityTable.vue\";\nimport DataQualityIndicatorLegend from \"@/components/dataQuality/DataQualityIndicatorLegend.vue\";\nimport { getModule } from \"vuex-module-decorators\";\nimport VesselsModule from \"@/store/clients/Vessels.module\";\nimport DataQualityModule from \"@/store/clients/DataQuality.module\";\nimport store from \"@/store\";\nimport { DataQualityHeader } from \"@/types/dataQuality/dataQualityTable\";\nimport dateHelper from \"@/Scripts/utilities/date-helper\";\n\nconst Vessels = getModule(VesselsModule, store);\nconst DataQuality = getModule(DataQualityModule, store);\n\n@Component({\n components: {\n DataQualityTable,\n DataAvailabilityModal,\n DataQualityIndicatorLegend,\n },\n})\nexport default class DataAvailability extends Vue {\n dialog = false;\n searchQuery = \"\";\n lastUpdatedTimestamp = \" \";\n isSkeletonLoading = true;\n skeletonTimeout: number | null = null;\n\n headers: DataQualityHeader[] = [\n {\n text: \"Vessel\",\n type: \"string\",\n value: \"vesselName\",\n width: \"260px\",\n sortable: true,\n class: \"text-left\",\n },\n {\n text: \"Overall Status\",\n type: \"dataIndicator\",\n value: \"overallStatus\",\n sortable: false,\n tooltip: \"Indicates overall data availability status of the vessel and is determined by the most critical status.\",\n class: \"text-left\",\n },\n ];\n\n async created(): Promise {\n await Promise.all([Vessels.refreshExtendedVessels(), DataQuality.refreshDataAvailability()]);\n const dataIndicatorHeaders = DataQuality.dataAvailability[0].data\n .map(indicator => ({\n text: indicator.featureName,\n type: \"dataIndicator\",\n value: indicator.featureName.replace(/\\s/g, \"\"),\n width: \"140px\",\n align: \"center\",\n class: \"text-center\",\n sortable: false,\n }))\n .filter(indicator => !this.indicatorsWithNAStatusForEachVessel.includes(indicator.text));\n this.headers = [...this.headers, ...dataIndicatorHeaders];\n\n this.lastUpdatedTimestamp = this.oldestDataTimestamp() ?? \"\";\n this.isSkeletonLoading = false;\n }\n\n get indicatorsWithNAStatusForEachVessel(): string[] {\n const allIndicators = DataQuality.dataAvailability.reduce((acc: any, item) => {\n item.data.forEach(indicator => {\n if (!acc[indicator.featureName]) {\n acc[indicator.featureName] = [];\n }\n acc[indicator.featureName].push(indicator.outageState);\n });\n return acc;\n }, {});\n\n return Object.keys(allIndicators).filter(key => allIndicators[key].every((value: any) => value === 0));\n }\n\n oldestDataTimestamp(): string | null {\n if (DataQuality.dataAvailability.length === 0) return null;\n\n const timestamps = DataQuality.dataAvailability.flatMap(item => item.data.map(indicator => indicator.outageDetectionTime)).filter(timestamp => timestamp !== null) as string[];\n\n if (timestamps.length === 0) return null;\n\n const oldestTimestamp = timestamps.reduce((oldest, current) => (new Date(current) < new Date(oldest) ? current : oldest));\n\n return this.getFormatedDateTimeString(oldestTimestamp);\n }\n\n get dataAvailability(): any {\n var dataAvailability = DataQuality.dataAvailability.map(item => {\n const indicators = item.data.reduce((acc: any, indicator) => {\n if (this.indicatorsWithNAStatusForEachVessel.includes(indicator.featureName)) return acc;\n acc[indicator.featureName.replace(/\\s/g, \"\")] = {\n value: indicator.outageState,\n lastDataTimestamp: indicator.lastDataTimestamp,\n outageStartTime: indicator.outageStartTime,\n outageDetectionTime: indicator.outageDetectionTime,\n };\n return acc;\n }, {});\n return {\n vesselName: {\n value: item.vesselName ?? \"Unknown Vessel\",\n link: `/Vessel/${item.vesselId}/${encodeURIComponent(item.vesselName)}`,\n },\n overallStatus: {\n value: item.overallOutageState,\n },\n ...indicators,\n };\n });\n return Boolean(this.searchQuery !== null && this.searchQuery.trim())\n ? dataAvailability.filter(item => item.vesselName.value.toLowerCase().includes(this.searchQuery.toLowerCase()))\n : dataAvailability;\n }\n\n get tableLoading(): boolean {\n return DataQuality.loadingState;\n }\n\n @Watch(\"isSkeletonLoading\")\n onSkeletonLoadingChange(newVal: boolean) {\n if (newVal) {\n if (this.skeletonTimeout) {\n clearTimeout(this.skeletonTimeout);\n }\n this.skeletonTimeout = window.setTimeout(() => {\n this.isSkeletonLoading = false;\n }, 4000);\n }\n }\n\n startSkeletonLoading(): void {\n this.isSkeletonLoading = true;\n }\n\n getFormatedDateTimeString(timestamp: string): string {\n return dateHelper.getFormatedDateTimeString(timestamp);\n }\n\n updateOldestDataTimestamp(vesselName: string, featureName: string, dataQualityRow: any): void {\n DataQuality.dataAvailability.forEach(item => {\n if (item.vesselName === vesselName) {\n item.data.forEach(indicator => {\n if (indicator.featureName === featureName) {\n indicator.outageDetectionTime = dataQualityRow.outageDetectionTime;\n indicator.lastDataTimestamp = dataQualityRow.lastDataTimestamp;\n indicator.outageStartTime = dataQualityRow.outageStartTime;\n indicator.outageState = dataQualityRow.outageState;\n }\n });\n\n item.overallOutageState = item.data.reduce((acc, indicator) => {\n if (indicator.outageState > acc) {\n return indicator.outageState;\n }\n return acc;\n }, 0);\n }\n });\n\n const updatedOldestTimeStamp = this.oldestDataTimestamp();\n if (updatedOldestTimeStamp) {\n this.lastUpdatedTimestamp = updatedOldestTimeStamp;\n }\n\n this.startSkeletonLoading();\n }\n\n closeModal(): void {\n this.dialog = false;\n }\n}\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--15-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/ts-loader/index.js??ref--15-3!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./DataAvailability.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--15-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/ts-loader/index.js??ref--15-3!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./DataAvailability.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./DataAvailability.vue?vue&type=template&id=d0b0424c&scoped=true&\"\nimport script from \"./DataAvailability.vue?vue&type=script&lang=ts&\"\nexport * from \"./DataAvailability.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./DataAvailability.vue?vue&type=style&index=0&id=d0b0424c&lang=scss&scoped=true&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"d0b0424c\",\n null\n \n)\n\nexport default component.exports\n\n/* vuetify-loader */\nimport installComponents from \"!../../../node_modules/vuetify-loader/lib/runtime/installComponents.js\"\nimport { VBtn } from 'vuetify/lib/components/VBtn';\nimport { VContainer } from 'vuetify/lib/components/VGrid';\nimport { VSkeletonLoader } from 'vuetify/lib/components/VSkeletonLoader';\nimport { VTextField } from 'vuetify/lib/components/VTextField';\ninstallComponents(component, {VBtn,VContainer,VSkeletonLoader,VTextField})\n","export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--9-oneOf-1-0!../../../../node_modules/css-loader/dist/cjs.js??ref--9-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--9-oneOf-1-2!../../../../node_modules/sass-loader/dist/cjs.js??ref--9-oneOf-1-3!../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./DataAvailabilityModalConfigureTags.vue?vue&type=style&index=0&id=752d9970&lang=scss&scoped=true&\"","// this method was added to unscopables after implementation\n// in popular engines, so it's moved to a separate module\nvar addToUnscopables = require('../internals/add-to-unscopables');\n\n// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables\naddToUnscopables('flatMap');\n","// Licensed to the .NET Foundation under one or more agreements.\r\n// The .NET Foundation licenses this file to you under the MIT license.\r\nimport { LogLevel } from \"./ILogger\";\r\nimport { NullLogger } from \"./Loggers\";\r\n// Version token that will be replaced by the prepack command\r\n/** The version of the SignalR client. */\r\nexport const VERSION = \"8.0.7\";\r\n/** @private */\r\nexport class Arg {\r\n static isRequired(val, name) {\r\n if (val === null || val === undefined) {\r\n throw new Error(`The '${name}' argument is required.`);\r\n }\r\n }\r\n static isNotEmpty(val, name) {\r\n if (!val || val.match(/^\\s*$/)) {\r\n throw new Error(`The '${name}' argument should not be empty.`);\r\n }\r\n }\r\n static isIn(val, values, name) {\r\n // TypeScript enums have keys for **both** the name and the value of each enum member on the type itself.\r\n if (!(val in values)) {\r\n throw new Error(`Unknown ${name} value: ${val}.`);\r\n }\r\n }\r\n}\r\n/** @private */\r\nexport class Platform {\r\n // react-native has a window but no document so we should check both\r\n static get isBrowser() {\r\n return !Platform.isNode && typeof window === \"object\" && typeof window.document === \"object\";\r\n }\r\n // WebWorkers don't have a window object so the isBrowser check would fail\r\n static get isWebWorker() {\r\n return !Platform.isNode && typeof self === \"object\" && \"importScripts\" in self;\r\n }\r\n // react-native has a window but no document\r\n static get isReactNative() {\r\n return !Platform.isNode && typeof window === \"object\" && typeof window.document === \"undefined\";\r\n }\r\n // Node apps shouldn't have a window object, but WebWorkers don't either\r\n // so we need to check for both WebWorker and window\r\n static get isNode() {\r\n return typeof process !== \"undefined\" && process.release && process.release.name === \"node\";\r\n }\r\n}\r\n/** @private */\r\nexport function getDataDetail(data, includeContent) {\r\n let detail = \"\";\r\n if (isArrayBuffer(data)) {\r\n detail = `Binary data of length ${data.byteLength}`;\r\n if (includeContent) {\r\n detail += `. Content: '${formatArrayBuffer(data)}'`;\r\n }\r\n }\r\n else if (typeof data === \"string\") {\r\n detail = `String data of length ${data.length}`;\r\n if (includeContent) {\r\n detail += `. Content: '${data}'`;\r\n }\r\n }\r\n return detail;\r\n}\r\n/** @private */\r\nexport function formatArrayBuffer(data) {\r\n const view = new Uint8Array(data);\r\n // Uint8Array.map only supports returning another Uint8Array?\r\n let str = \"\";\r\n view.forEach((num) => {\r\n const pad = num < 16 ? \"0\" : \"\";\r\n str += `0x${pad}${num.toString(16)} `;\r\n });\r\n // Trim of trailing space.\r\n return str.substr(0, str.length - 1);\r\n}\r\n// Also in signalr-protocol-msgpack/Utils.ts\r\n/** @private */\r\nexport function isArrayBuffer(val) {\r\n return val && typeof ArrayBuffer !== \"undefined\" &&\r\n (val instanceof ArrayBuffer ||\r\n // Sometimes we get an ArrayBuffer that doesn't satisfy instanceof\r\n (val.constructor && val.constructor.name === \"ArrayBuffer\"));\r\n}\r\n/** @private */\r\nexport async function sendMessage(logger, transportName, httpClient, url, content, options) {\r\n const headers = {};\r\n const [name, value] = getUserAgentHeader();\r\n headers[name] = value;\r\n logger.log(LogLevel.Trace, `(${transportName} transport) sending data. ${getDataDetail(content, options.logMessageContent)}.`);\r\n const responseType = isArrayBuffer(content) ? \"arraybuffer\" : \"text\";\r\n const response = await httpClient.post(url, {\r\n content,\r\n headers: { ...headers, ...options.headers },\r\n responseType,\r\n timeout: options.timeout,\r\n withCredentials: options.withCredentials,\r\n });\r\n logger.log(LogLevel.Trace, `(${transportName} transport) request complete. Response status: ${response.statusCode}.`);\r\n}\r\n/** @private */\r\nexport function createLogger(logger) {\r\n if (logger === undefined) {\r\n return new ConsoleLogger(LogLevel.Information);\r\n }\r\n if (logger === null) {\r\n return NullLogger.instance;\r\n }\r\n if (logger.log !== undefined) {\r\n return logger;\r\n }\r\n return new ConsoleLogger(logger);\r\n}\r\n/** @private */\r\nexport class SubjectSubscription {\r\n constructor(subject, observer) {\r\n this._subject = subject;\r\n this._observer = observer;\r\n }\r\n dispose() {\r\n const index = this._subject.observers.indexOf(this._observer);\r\n if (index > -1) {\r\n this._subject.observers.splice(index, 1);\r\n }\r\n if (this._subject.observers.length === 0 && this._subject.cancelCallback) {\r\n this._subject.cancelCallback().catch((_) => { });\r\n }\r\n }\r\n}\r\n/** @private */\r\nexport class ConsoleLogger {\r\n constructor(minimumLogLevel) {\r\n this._minLevel = minimumLogLevel;\r\n this.out = console;\r\n }\r\n log(logLevel, message) {\r\n if (logLevel >= this._minLevel) {\r\n const msg = `[${new Date().toISOString()}] ${LogLevel[logLevel]}: ${message}`;\r\n switch (logLevel) {\r\n case LogLevel.Critical:\r\n case LogLevel.Error:\r\n this.out.error(msg);\r\n break;\r\n case LogLevel.Warning:\r\n this.out.warn(msg);\r\n break;\r\n case LogLevel.Information:\r\n this.out.info(msg);\r\n break;\r\n default:\r\n // console.debug only goes to attached debuggers in Node, so we use console.log for Trace and Debug\r\n this.out.log(msg);\r\n break;\r\n }\r\n }\r\n }\r\n}\r\n/** @private */\r\nexport function getUserAgentHeader() {\r\n let userAgentHeaderName = \"X-SignalR-User-Agent\";\r\n if (Platform.isNode) {\r\n userAgentHeaderName = \"User-Agent\";\r\n }\r\n return [userAgentHeaderName, constructUserAgent(VERSION, getOsName(), getRuntime(), getRuntimeVersion())];\r\n}\r\n/** @private */\r\nexport function constructUserAgent(version, os, runtime, runtimeVersion) {\r\n // Microsoft SignalR/[Version] ([Detailed Version]; [Operating System]; [Runtime]; [Runtime Version])\r\n let userAgent = \"Microsoft SignalR/\";\r\n const majorAndMinor = version.split(\".\");\r\n userAgent += `${majorAndMinor[0]}.${majorAndMinor[1]}`;\r\n userAgent += ` (${version}; `;\r\n if (os && os !== \"\") {\r\n userAgent += `${os}; `;\r\n }\r\n else {\r\n userAgent += \"Unknown OS; \";\r\n }\r\n userAgent += `${runtime}`;\r\n if (runtimeVersion) {\r\n userAgent += `; ${runtimeVersion}`;\r\n }\r\n else {\r\n userAgent += \"; Unknown Runtime Version\";\r\n }\r\n userAgent += \")\";\r\n return userAgent;\r\n}\r\n// eslint-disable-next-line spaced-comment\r\n/*#__PURE__*/ function getOsName() {\r\n if (Platform.isNode) {\r\n switch (process.platform) {\r\n case \"win32\":\r\n return \"Windows NT\";\r\n case \"darwin\":\r\n return \"macOS\";\r\n case \"linux\":\r\n return \"Linux\";\r\n default:\r\n return process.platform;\r\n }\r\n }\r\n else {\r\n return \"\";\r\n }\r\n}\r\n// eslint-disable-next-line spaced-comment\r\n/*#__PURE__*/ function getRuntimeVersion() {\r\n if (Platform.isNode) {\r\n return process.versions.node;\r\n }\r\n return undefined;\r\n}\r\nfunction getRuntime() {\r\n if (Platform.isNode) {\r\n return \"NodeJS\";\r\n }\r\n else {\r\n return \"Browser\";\r\n }\r\n}\r\n/** @private */\r\nexport function getErrorString(e) {\r\n if (e.stack) {\r\n return e.stack;\r\n }\r\n else if (e.message) {\r\n return e.message;\r\n }\r\n return `${e}`;\r\n}\r\n/** @private */\r\nexport function getGlobalThis() {\r\n // globalThis is semi-new and not available in Node until v12\r\n if (typeof globalThis !== \"undefined\") {\r\n return globalThis;\r\n }\r\n if (typeof self !== \"undefined\") {\r\n return self;\r\n }\r\n if (typeof window !== \"undefined\") {\r\n return window;\r\n }\r\n if (typeof global !== \"undefined\") {\r\n return global;\r\n }\r\n throw new Error(\"could not find global\");\r\n}\r\n//# sourceMappingURL=Utils.js.map","export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--7-oneOf-1-0!../../../node_modules/css-loader/dist/cjs.js??ref--7-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--7-oneOf-1-2!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./DataQualityPercentageIndicator.vue?vue&type=style&index=0&id=cce00b3c&scoped=true&lang=css&\"","export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--9-oneOf-1-0!../../../node_modules/css-loader/dist/cjs.js??ref--9-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--9-oneOf-1-2!../../../node_modules/sass-loader/dist/cjs.js??ref--9-oneOf-1-3!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./DataQualityIndicator.vue?vue&type=style&index=0&id=0374cdfc&lang=scss&scoped=true&\"","// Styles\nimport '../../styles/components/_selection-controls.sass'\nimport './VSwitch.sass'\n\n// Mixins\nimport Selectable from '../../mixins/selectable'\nimport VInput from '../VInput'\n\n// Directives\nimport Touch from '../../directives/touch'\n\n// Components\nimport { VFabTransition } from '../transitions'\nimport VProgressCircular from '../VProgressCircular/VProgressCircular'\n\n// Helpers\nimport { keyCodes } from '../../util/helpers'\n\n// Types\nimport { VNode, VNodeData } from 'vue'\n\n/* @vue/component */\nexport default Selectable.extend({\n name: 'v-switch',\n\n directives: { Touch },\n\n props: {\n inset: Boolean,\n loading: {\n type: [Boolean, String],\n default: false,\n },\n flat: {\n type: Boolean,\n default: false,\n },\n },\n\n computed: {\n classes (): object {\n return {\n ...VInput.options.computed.classes.call(this),\n 'v-input--selection-controls v-input--switch': true,\n 'v-input--switch--flat': this.flat,\n 'v-input--switch--inset': this.inset,\n }\n },\n attrs (): object {\n return {\n 'aria-checked': String(this.isActive),\n 'aria-disabled': String(this.isDisabled),\n role: 'switch',\n }\n },\n // Do not return undefined if disabled,\n // according to spec, should still show\n // a color when disabled and active\n validationState (): string | undefined {\n if (this.hasError && this.shouldValidate) return 'error'\n if (this.hasSuccess) return 'success'\n if (this.hasColor !== null) return this.computedColor\n return undefined\n },\n switchData (): VNodeData {\n return this.setTextColor(this.loading ? undefined : this.validationState, {\n class: this.themeClasses,\n })\n },\n },\n\n methods: {\n genDefaultSlot (): (VNode | null)[] {\n return [\n this.genSwitch(),\n this.genLabel(),\n ]\n },\n genSwitch (): VNode {\n const { title, ...switchAttrs } = this.attrs$\n\n return this.$createElement('div', {\n staticClass: 'v-input--selection-controls__input',\n }, [\n this.genInput('checkbox', {\n ...this.attrs,\n ...switchAttrs,\n }),\n this.genRipple(this.setTextColor(this.validationState, {\n directives: [{\n name: 'touch',\n value: {\n left: this.onSwipeLeft,\n right: this.onSwipeRight,\n },\n }],\n })),\n this.$createElement('div', {\n staticClass: 'v-input--switch__track',\n ...this.switchData,\n }),\n this.$createElement('div', {\n staticClass: 'v-input--switch__thumb',\n ...this.switchData,\n }, [this.genProgress()]),\n ])\n },\n genProgress (): VNode {\n return this.$createElement(VFabTransition, {}, [\n this.loading === false\n ? null\n : this.$slots.progress || this.$createElement(VProgressCircular, {\n props: {\n color: (this.loading === true || this.loading === '')\n ? (this.color || 'primary')\n : this.loading,\n size: 16,\n width: 2,\n indeterminate: true,\n },\n }),\n ])\n },\n onSwipeLeft () {\n if (this.isActive) this.onChange()\n },\n onSwipeRight () {\n if (!this.isActive) this.onChange()\n },\n onKeydown (e: KeyboardEvent) {\n if (\n (e.keyCode === keyCodes.left && this.isActive) ||\n (e.keyCode === keyCodes.right && !this.isActive)\n ) this.onChange()\n },\n },\n})\n","// Licensed to the .NET Foundation under one or more agreements.\r\n// The .NET Foundation licenses this file to you under the MIT license.\r\n/** A logger that does nothing when log messages are sent to it. */\r\nexport class NullLogger {\r\n constructor() { }\r\n /** @inheritDoc */\r\n // eslint-disable-next-line\r\n log(_logLevel, _message) {\r\n }\r\n}\r\n/** The singleton instance of the {@link @microsoft/signalr.NullLogger}. */\r\nNullLogger.instance = new NullLogger();\r\n//# sourceMappingURL=Loggers.js.map","export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--9-oneOf-1-0!../../../../node_modules/css-loader/dist/cjs.js??ref--9-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--9-oneOf-1-2!../../../../node_modules/sass-loader/dist/cjs.js??ref--9-oneOf-1-3!../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./DataAvailabilityModal.vue?vue&type=style&index=0&id=1afde6cb&lang=scss&scoped=true&\"","export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--9-oneOf-1-0!../../../../node_modules/css-loader/dist/cjs.js??ref--9-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--9-oneOf-1-2!../../../../node_modules/sass-loader/dist/cjs.js??ref--9-oneOf-1-3!../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./DataQualityTableRow.vue?vue&type=style&index=0&id=693bcc24&lang=scss&scoped=true&\"","// .dirname, .basename, and .extname methods are extracted from Node.js v8.11.1,\n// backported and transplited with Babel, with backwards-compat fixes\n\n// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n// resolves . and .. elements in a path array with directory names there\n// must be no slashes, empty elements, or device names (c:\\) in the array\n// (so also no leading and trailing slashes - it does not distinguish\n// relative and absolute paths)\nfunction normalizeArray(parts, allowAboveRoot) {\n // if the path tries to go above the root, `up` ends up > 0\n var up = 0;\n for (var i = parts.length - 1; i >= 0; i--) {\n var last = parts[i];\n if (last === '.') {\n parts.splice(i, 1);\n } else if (last === '..') {\n parts.splice(i, 1);\n up++;\n } else if (up) {\n parts.splice(i, 1);\n up--;\n }\n }\n\n // if the path is allowed to go above the root, restore leading ..s\n if (allowAboveRoot) {\n for (; up--; up) {\n parts.unshift('..');\n }\n }\n\n return parts;\n}\n\n// path.resolve([from ...], to)\n// posix version\nexports.resolve = function() {\n var resolvedPath = '',\n resolvedAbsolute = false;\n\n for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) {\n var path = (i >= 0) ? arguments[i] : process.cwd();\n\n // Skip empty and invalid entries\n if (typeof path !== 'string') {\n throw new TypeError('Arguments to path.resolve must be strings');\n } else if (!path) {\n continue;\n }\n\n resolvedPath = path + '/' + resolvedPath;\n resolvedAbsolute = path.charAt(0) === '/';\n }\n\n // At this point the path should be resolved to a full absolute path, but\n // handle relative paths to be safe (might happen when process.cwd() fails)\n\n // Normalize the path\n resolvedPath = normalizeArray(filter(resolvedPath.split('/'), function(p) {\n return !!p;\n }), !resolvedAbsolute).join('/');\n\n return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.';\n};\n\n// path.normalize(path)\n// posix version\nexports.normalize = function(path) {\n var isAbsolute = exports.isAbsolute(path),\n trailingSlash = substr(path, -1) === '/';\n\n // Normalize the path\n path = normalizeArray(filter(path.split('/'), function(p) {\n return !!p;\n }), !isAbsolute).join('/');\n\n if (!path && !isAbsolute) {\n path = '.';\n }\n if (path && trailingSlash) {\n path += '/';\n }\n\n return (isAbsolute ? '/' : '') + path;\n};\n\n// posix version\nexports.isAbsolute = function(path) {\n return path.charAt(0) === '/';\n};\n\n// posix version\nexports.join = function() {\n var paths = Array.prototype.slice.call(arguments, 0);\n return exports.normalize(filter(paths, function(p, index) {\n if (typeof p !== 'string') {\n throw new TypeError('Arguments to path.join must be strings');\n }\n return p;\n }).join('/'));\n};\n\n\n// path.relative(from, to)\n// posix version\nexports.relative = function(from, to) {\n from = exports.resolve(from).substr(1);\n to = exports.resolve(to).substr(1);\n\n function trim(arr) {\n var start = 0;\n for (; start < arr.length; start++) {\n if (arr[start] !== '') break;\n }\n\n var end = arr.length - 1;\n for (; end >= 0; end--) {\n if (arr[end] !== '') break;\n }\n\n if (start > end) return [];\n return arr.slice(start, end - start + 1);\n }\n\n var fromParts = trim(from.split('/'));\n var toParts = trim(to.split('/'));\n\n var length = Math.min(fromParts.length, toParts.length);\n var samePartsLength = length;\n for (var i = 0; i < length; i++) {\n if (fromParts[i] !== toParts[i]) {\n samePartsLength = i;\n break;\n }\n }\n\n var outputParts = [];\n for (var i = samePartsLength; i < fromParts.length; i++) {\n outputParts.push('..');\n }\n\n outputParts = outputParts.concat(toParts.slice(samePartsLength));\n\n return outputParts.join('/');\n};\n\nexports.sep = '/';\nexports.delimiter = ':';\n\nexports.dirname = function (path) {\n if (typeof path !== 'string') path = path + '';\n if (path.length === 0) return '.';\n var code = path.charCodeAt(0);\n var hasRoot = code === 47 /*/*/;\n var end = -1;\n var matchedSlash = true;\n for (var i = path.length - 1; i >= 1; --i) {\n code = path.charCodeAt(i);\n if (code === 47 /*/*/) {\n if (!matchedSlash) {\n end = i;\n break;\n }\n } else {\n // We saw the first non-path separator\n matchedSlash = false;\n }\n }\n\n if (end === -1) return hasRoot ? '/' : '.';\n if (hasRoot && end === 1) {\n // return '//';\n // Backwards-compat fix:\n return '/';\n }\n return path.slice(0, end);\n};\n\nfunction basename(path) {\n if (typeof path !== 'string') path = path + '';\n\n var start = 0;\n var end = -1;\n var matchedSlash = true;\n var i;\n\n for (i = path.length - 1; i >= 0; --i) {\n if (path.charCodeAt(i) === 47 /*/*/) {\n // If we reached a path separator that was not part of a set of path\n // separators at the end of the string, stop now\n if (!matchedSlash) {\n start = i + 1;\n break;\n }\n } else if (end === -1) {\n // We saw the first non-path separator, mark this as the end of our\n // path component\n matchedSlash = false;\n end = i + 1;\n }\n }\n\n if (end === -1) return '';\n return path.slice(start, end);\n}\n\n// Uses a mixed approach for backwards-compatibility, as ext behavior changed\n// in new Node.js versions, so only basename() above is backported here\nexports.basename = function (path, ext) {\n var f = basename(path);\n if (ext && f.substr(-1 * ext.length) === ext) {\n f = f.substr(0, f.length - ext.length);\n }\n return f;\n};\n\nexports.extname = function (path) {\n if (typeof path !== 'string') path = path + '';\n var startDot = -1;\n var startPart = 0;\n var end = -1;\n var matchedSlash = true;\n // Track the state of characters (if any) we see before our first dot and\n // after any path separator we find\n var preDotState = 0;\n for (var i = path.length - 1; i >= 0; --i) {\n var code = path.charCodeAt(i);\n if (code === 47 /*/*/) {\n // If we reached a path separator that was not part of a set of path\n // separators at the end of the string, stop now\n if (!matchedSlash) {\n startPart = i + 1;\n break;\n }\n continue;\n }\n if (end === -1) {\n // We saw the first non-path separator, mark this as the end of our\n // extension\n matchedSlash = false;\n end = i + 1;\n }\n if (code === 46 /*.*/) {\n // If this is our first dot, mark it as the start of our extension\n if (startDot === -1)\n startDot = i;\n else if (preDotState !== 1)\n preDotState = 1;\n } else if (startDot !== -1) {\n // We saw a non-dot and non-path separator before our dot, so we should\n // have a good chance at having a non-empty extension\n preDotState = -1;\n }\n }\n\n if (startDot === -1 || end === -1 ||\n // We saw a non-dot character immediately before the dot\n preDotState === 0 ||\n // The (right-most) trimmed path component is exactly '..'\n preDotState === 1 && startDot === end - 1 && startDot === startPart + 1) {\n return '';\n }\n return path.slice(startDot, end);\n};\n\nfunction filter (xs, f) {\n if (xs.filter) return xs.filter(f);\n var res = [];\n for (var i = 0; i < xs.length; i++) {\n if (f(xs[i], i, xs)) res.push(xs[i]);\n }\n return res;\n}\n\n// String.prototype.substr - negative index don't work in IE8\nvar substr = 'ab'.substr(-1) === 'b'\n ? function (str, start, len) { return str.substr(start, len) }\n : function (str, start, len) {\n if (start < 0) start = str.length + start;\n return str.substr(start, len);\n }\n;\n","export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--9-oneOf-1-0!../../../../node_modules/css-loader/dist/cjs.js??ref--9-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--9-oneOf-1-2!../../../../node_modules/sass-loader/dist/cjs.js??ref--9-oneOf-1-3!../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./DataQualityTable.vue?vue&type=style&index=0&id=296f349c&lang=scss&scoped=true&\""],"sourceRoot":""}