ApplicationInsights-JS/AISKU/dist-history/aisdk.0.0.13.js.map

1 строка
372 KiB
Plaintext
Исходник Постоянная ссылка Ответственный История

Этот файл содержит невидимые символы Юникода!

Этот файл содержит невидимые символы Юникода, которые могут быть отображены не так, как показано ниже. Если это намеренно, можете спокойно проигнорировать это предупреждение. Используйте кнопку Экранировать, чтобы показать скрытые символы.

{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///webpack/bootstrap","webpack:///../../Init.ts","webpack:///../../Initialization.ts","webpack:///./node_modules/applicationinsights-analytics-js/bundle/JavaScriptSDK/ApplicationInsights.js","webpack:///./node_modules/applicationinsights-analytics-js/bundle/JavaScriptSDK/Telemetry/PageViewManager.js","webpack:///./node_modules/applicationinsights-analytics-js/bundle/applicationinsights-analytics-js.js","webpack:///./node_modules/applicationinsights-channel-js/bundle/EnvelopeCreator.js","webpack:///./node_modules/applicationinsights-channel-js/bundle/SendBuffer.js","webpack:///./node_modules/applicationinsights-channel-js/bundle/Sender.js","webpack:///./node_modules/applicationinsights-channel-js/bundle/Serializer.js","webpack:///./node_modules/applicationinsights-channel-js/bundle/TelemetryValidation/EventValidator.js","webpack:///./node_modules/applicationinsights-channel-js/bundle/TelemetryValidation/ExceptionValidator.js","webpack:///./node_modules/applicationinsights-channel-js/bundle/TelemetryValidation/MetricValidator.js","webpack:///./node_modules/applicationinsights-channel-js/bundle/TelemetryValidation/PageViewPerformanceValidator.js","webpack:///./node_modules/applicationinsights-channel-js/bundle/TelemetryValidation/PageViewValidator.js","webpack:///./node_modules/applicationinsights-channel-js/bundle/TelemetryValidation/RemoteDepdencyValidator.js","webpack:///./node_modules/applicationinsights-channel-js/bundle/TelemetryValidation/TraceValidator.js","webpack:///./node_modules/applicationinsights-channel-js/bundle/applicationinsights-channel-js.js","webpack:///./node_modules/applicationinsights-common/bundle/Constants.js","webpack:///./node_modules/applicationinsights-common/bundle/Enums.js","webpack:///./node_modules/applicationinsights-common/bundle/Interfaces/Contracts/Generated/Base.js","webpack:///./node_modules/applicationinsights-common/bundle/Interfaces/Contracts/Generated/ContextTagKeys.js","webpack:///./node_modules/applicationinsights-common/bundle/Interfaces/Contracts/Generated/Data.js","webpack:///./node_modules/applicationinsights-common/bundle/Interfaces/Contracts/Generated/DataPoint.js","webpack:///./node_modules/applicationinsights-common/bundle/Interfaces/Contracts/Generated/DataPointType.js","webpack:///./node_modules/applicationinsights-common/bundle/Interfaces/Contracts/Generated/Domain.js","webpack:///./node_modules/applicationinsights-common/bundle/Interfaces/Contracts/Generated/Envelope.js","webpack:///./node_modules/applicationinsights-common/bundle/Interfaces/Contracts/Generated/EventData.js","webpack:///./node_modules/applicationinsights-common/bundle/Interfaces/Contracts/Generated/ExceptionData.js","webpack:///./node_modules/applicationinsights-common/bundle/Interfaces/Contracts/Generated/ExceptionDetails.js","webpack:///./node_modules/applicationinsights-common/bundle/Interfaces/Contracts/Generated/MessageData.js","webpack:///./node_modules/applicationinsights-common/bundle/Interfaces/Contracts/Generated/MetricData.js","webpack:///./node_modules/applicationinsights-common/bundle/Interfaces/Contracts/Generated/PageViewData.js","webpack:///./node_modules/applicationinsights-common/bundle/Interfaces/Contracts/Generated/PageViewPerfData.js","webpack:///./node_modules/applicationinsights-common/bundle/Interfaces/Contracts/Generated/RemoteDependencyData.js","webpack:///./node_modules/applicationinsights-common/bundle/Interfaces/Contracts/Generated/SeverityLevel.js","webpack:///./node_modules/applicationinsights-common/bundle/Interfaces/Contracts/Generated/StackFrame.js","webpack:///./node_modules/applicationinsights-common/bundle/RequestResponseHeaders.js","webpack:///./node_modules/applicationinsights-common/bundle/Telemetry/Common/Data.js","webpack:///./node_modules/applicationinsights-common/bundle/Telemetry/Common/DataPoint.js","webpack:///./node_modules/applicationinsights-common/bundle/Telemetry/Common/DataSanitizer.js","webpack:///./node_modules/applicationinsights-common/bundle/Telemetry/Common/Envelope.js","webpack:///./node_modules/applicationinsights-common/bundle/Telemetry/Event.js","webpack:///./node_modules/applicationinsights-common/bundle/Telemetry/Exception.js","webpack:///./node_modules/applicationinsights-common/bundle/Telemetry/Metric.js","webpack:///./node_modules/applicationinsights-common/bundle/Telemetry/PageView.js","webpack:///./node_modules/applicationinsights-common/bundle/Telemetry/PageViewPerformance.js","webpack:///./node_modules/applicationinsights-common/bundle/Telemetry/RemoteDependencyData.js","webpack:///./node_modules/applicationinsights-common/bundle/Telemetry/Trace.js","webpack:///./node_modules/applicationinsights-common/bundle/TelemetryItemCreator.js","webpack:///./node_modules/applicationinsights-common/bundle/Util.js","webpack:///./node_modules/applicationinsights-common/bundle/applicationinsights-common.js","webpack:///./node_modules/applicationinsights-core-js/bundle/JavaScriptSDK.Enums/EventsDiscardedReason.js","webpack:///./node_modules/applicationinsights-core-js/bundle/JavaScriptSDK.Enums/LoggingEnums.js","webpack:///./node_modules/applicationinsights-core-js/bundle/JavaScriptSDK.Interfaces/IChannelControls.js","webpack:///./node_modules/applicationinsights-core-js/bundle/JavaScriptSDK/AppInsightsCore.js","webpack:///./node_modules/applicationinsights-core-js/bundle/JavaScriptSDK/CoreUtils.js","webpack:///./node_modules/applicationinsights-core-js/bundle/JavaScriptSDK/DiagnosticLogger.js","webpack:///./node_modules/applicationinsights-core-js/bundle/JavaScriptSDK/NotificationManager.js","webpack:///./node_modules/applicationinsights-core-js/bundle/applicationinsights-core-js.js","webpack:///./node_modules/applicationinsights-dependencies-js/bundle/ajax.js","webpack:///./node_modules/applicationinsights-dependencies-js/bundle/ajaxRecord.js","webpack:///./node_modules/applicationinsights-dependencies-js/bundle/ajaxUtils.js","webpack:///./node_modules/applicationinsights-dependencies-js/bundle/applicationinsights-dependencies-js.js","webpack:///./node_modules/applicationinsights-properties-js/bundle/Context/Application.js","webpack:///./node_modules/applicationinsights-properties-js/bundle/Context/Device.js","webpack:///./node_modules/applicationinsights-properties-js/bundle/Context/Internal.js","webpack:///./node_modules/applicationinsights-properties-js/bundle/Context/Location.js","webpack:///./node_modules/applicationinsights-properties-js/bundle/Context/Operation.js","webpack:///./node_modules/applicationinsights-properties-js/bundle/Context/Sample.js","webpack:///./node_modules/applicationinsights-properties-js/bundle/Context/Session.js","webpack:///./node_modules/applicationinsights-properties-js/bundle/Context/User.js","webpack:///./node_modules/applicationinsights-properties-js/bundle/HashCodeScoreGenerator.js","webpack:///./node_modules/applicationinsights-properties-js/bundle/PropertiesPlugin.js","webpack:///./node_modules/applicationinsights-properties-js/bundle/SamplingScoreGenerator.js","webpack:///./node_modules/applicationinsights-properties-js/bundle/applicationinsights-properties-js.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD,O;ACVA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,kDAA0C,gCAAgC;AAC1E;AACA;;AAEA;AACA;AACA;AACA,gEAAwD,kBAAkB;AAC1E;AACA,yDAAiD,cAAc;AAC/D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAyC,iCAAiC;AAC1E,wHAAgH,mBAAmB,EAAE;AACrI;AACA;;AAEA;AACA;AACA;AACA,mCAA2B,0BAA0B,EAAE;AACvD,yCAAiC,eAAe;AAChD;AACA;AACA;;AAEA;AACA,8DAAsD,+DAA+D;;AAErH;AACA;;;AAGA;AACA;;;;;;;;;;;;;;;IC/EA,YAAY,CAAC;IACb,iEAAiE;IACjE,IAAI,CAAC;QAED,yFAAyF;QACzF,IAAI,MAAM,CAAC;QACX,EAAE,CAAC,CAAC,OAAO,MAAM,KAAK,WAAW,IAAI,OAAO,IAAI,KAAK,WAAW,CAAC,CAAC,CAAC;YAC/D,+CAA+C;YAE/C,qGAAqG;YACrG,MAAM,GAAG,MAAM,CAAC,gBAAgB,CAAC,CAAC;YAElC,EAAE,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,SAAS,CAAC,CAAC,CAAC;gBAC/B,sDAAsD;gBACtD,sDAAmB,CAAC,wBAAwB,GAAG,+BAAc,CAAC,gBAAgB,EAAE,CAAC;YACrF,CAAC;YAAC,IAAI,CAAC,CAAC;gBACJ,EAAE,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC;oBAC5B,+CAA+C;oBAC/C,IAAI,OAAO,GAAY,MAAM,CAAC,MAAM,CAAC,IAAS,EAAE,CAAC;oBAEjD,0CAA0C;oBAC1C,IAAI,cAAc,GAAG,IAAI,+BAAc,CAAC,OAAO,CAAC,CAAC;oBACjD,IAAI,gBAAgB,GAAG,cAAc,CAAC,eAAe,EAAE,CAAC;oBAExD,oFAAoF;oBACpF,GAAG,CAAC,CAAC,IAAI,KAAK,IAAI,gBAAgB,CAAC,CAAC,CAAC;wBACjC,OAAO,CAAC,KAAK,CAAC,GAAG,gBAAgB,CAAC,KAAK,CAAC,CAAC;oBAC7C,CAAC;oBAED,4DAA4D;oBAC5D,cAAc,CAAC,UAAU,EAAE,CAAC;oBAE5B,cAAc,CAAC,2BAA2B,CAAC,gBAAgB,CAAC,CAAC;gBACjE,CAAC;YACL,CAAC;QACL,CAAC;IACL,CAAC;IAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACT,2EAA2E;QAC3E,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;YACV,OAAO,CAAC,IAAI,CAAC,uDAAuD,GAAG,MAAM,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC;QAC/F,CAAC;IACL,CAAC;;;;;;;;;;;;;;;;;ICrCD,YAAY,CAAC;IASZ,CAAC;IAEF;QAQI,wBAAY,OAAgB;YAExB,6DAA6D;YAC7D,OAAO,CAAC,KAAK,GAAG,OAAO,CAAC,KAAK,IAAI,EAAE,CAAC;YACpC,IAAI,MAAM,GAAmB,OAAO,CAAC,MAAM,IAAS,EAAE,CAAC;YAEvD,yCAAyC;YACzC,EAAE,CAAC,CAAC,MAAM,IAAI,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAC,CAAC;gBACvC,MAAM,GAAQ,OAAO,CAAC;gBACtB,sDAAmB,CAAC,OAAO,GAAG,OAAO,CAAC;YAC1C,CAAC;YAED,IAAI,CAAC,WAAW,GAAG,IAAI,sDAAmB,EAAE,CAAC;YAC7C,yDAAyD;YACzD,MAAM,GAAG,cAAc,CAAC,gBAAgB,CAAC,MAAM,EAAE,IAAI,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;YAE9E,IAAI,CAAC,UAAU,GAAG,IAAI,oDAAgB,EAAE,CAAC;YACzC,IAAI,CAAC,YAAY,GAAG,IAAI,gDAAkB,EAAE,CAAC;YAE7C,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;YACvB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACzB,CAAC;QAED,mBAAmB;QACZ,sCAAa,GAApB,UAAqB,QAA4B,EAAE,gBAA0C;YACzF,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC,QAAQ,EAAE,gBAAgB,CAAC,CAAC;QAC/D,CAAC;QACM,uCAAc,GAArB,UAAsB,SAA8B,EAAE,gBAA0C;YAC5F,IAAI,CAAC,WAAW,CAAC,cAAc,CAAC,SAAS,EAAE,gBAAgB,CAAC,CAAC;QACjE,CAAC;QACM,iCAAQ,GAAf,UAAgB,SAAkC;YAC9C,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;QACzC,CAAC;QACM,mCAAU,GAAjB,UAAkB,KAAsB,EAAE,gBAA0C;YAChF,IAAI,CAAC,WAAW,CAAC,UAAU,CAAC,KAAK,EAAE,gBAAgB,CAAC,CAAC;QACzD,CAAC;QACM,oCAAW,GAAlB,UAAmB,MAAwB,EAAE,gBAA0C;YACnF,IAAI,CAAC,WAAW,CAAC,WAAW,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;QAC3D,CAAC;QACM,uCAAc,GAArB,UAAsB,IAAa;YAC/B,IAAI,CAAC,WAAW,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;QAC1C,CAAC;QACM,sCAAa,GAApB,UAAqB,IAAa,EAAE,GAAY,EAAE,gBAAyB;YACvE,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC,IAAI,EAAE,GAAG,EAAE,gBAAgB,CAAC,CAAC;QAChE,CAAC;QACM,gDAAuB,GAA9B,UAA+B,oBAA8D;YACzF,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,uBAAuB,CAAC,oBAAoB,CAAC,CAAC;QAC1E,CAAC;QAED,oBAAoB;QACb,oDAA2B,GAAlC,UAAmC,mBAA2B,EAAE,SAAkB,EAAE,aAAqB;YAArB,qDAAqB;YACpG,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,2BAA2B,CAAC,mBAAmB,EAAE,SAAS,EAAE,aAAa,CAAC,CAAC;QACrG,CAAC;QACM,sDAA6B,GAApC;YACK,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,6BAA6B,EAAE,CAAC;QAC1D,CAAC;QAED,sBAAsB;QACf,4CAAmB,GAA1B,UAA2B,UAAgC,EAAE,gBAAuC,EAAE,gBAAuC;YACzI,IAAI,CAAC,YAAY,CAAC,mBAAmB,CAAC,UAAU,EAAE,gBAAgB,EAAE,gBAAgB,CAAC,CAAC;QAC1F,CAAC;QAEM,wCAAe,GAAtB;YAEI,IAAI,CAAC,IAAI,GAAG,IAAI,6CAAe,EAAE,CAAC;YAClC,IAAI,UAAU,GAAG,EAAE,CAAC;YACpB,IAAI,kBAAkB,GAAW,IAAI,uCAAM,EAAE,CAAC;YAE9C,UAAU,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC;YACpC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;YACjC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;YACnC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;YAElC,kBAAkB;YAClB,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;YAE9C,wBAAwB;YACxB,IAAI,CAAC,WAAW,CAAC,UAAU,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;YAChE,kBAAkB,CAAC,UAAU,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;YAClE,MAAM,CAAC,IAAI,CAAC;QAChB,CAAC;QAEM,mCAAU,GAAjB;YAEI,oEAAoE;YACpE,IAAI,CAAC;gBACD,EAAE,CAAC,CAAC,iCAAI,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;oBACnC,8HAA8H;oBAC9H,IAAI,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC;oBACvC,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;wBAC9B,IAAI,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;wBACjC,IAAI,EAAE,CAAC;oBACX,CAAC;oBAED,IAAI,CAAC,OAAO,CAAC,KAAK,GAAG,SAAS,CAAC;oBAC/B,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC;gBAC9B,CAAC;YACL,CAAC;YAAC,KAAK,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC;gBACjB,IAAI,UAAU,GAAQ,EAAE,CAAC;gBACzB,EAAE,CAAC,CAAC,SAAS,IAAI,OAAO,SAAS,CAAC,QAAQ,KAAK,UAAU,CAAC,CAAC,CAAC;oBACxD,UAAU,CAAC,SAAS,GAAG,SAAS,CAAC,QAAQ,EAAE,CAAC;gBAChD,CAAC;gBAED,iBAAiB;gBACjB,gEAAgE;gBAChE,+BAA+B;gBAC/B,sDAAsD;gBACtD,yCAAyC;gBACzC,mBAAmB;YACvB,CAAC;QACL,CAAC;QAEM,wCAAe,GAAtB,UAAuB,mBAAwC;YAC3D,6BAA6B;YAC7B,0FAA0F;YAC1F,iCAAiC;YACjC,yCAAyC;YACzC,4DAA4D;YAC5D,QAAQ;YACR,wBAAwB;YACxB,yCAAyC;QAC7C,CAAC;QAEM,oDAA2B,GAAlC,UAAmC,mBAAyC;YACxE,2DAA2D;YAE3D,EAAE,CAAC,CAAC,CAAC,mBAAmB,CAAC,WAAW,CAAC,MAAM,CAAC,0BAA0B,IAAI,CAAC,gBAAgB,IAAI,MAAM,CAAC,CAAC,CAAC,CAAC;gBACrG,IAAI,mBAAmB,GAAG;oBACtB,8DAA8D;oBAC9D,iGAAiG;oBACjG,0FAA0F;oBAC1F,sEAAsE;oBACtE,4FAA4F;oBAC5F,6BAA6B;oBAE7B,oDAAoD;oBAEpD,mBAAmB,CAAC,WAAW,CAAC,IAAI,CAAC,uBAAuB,EAAE,CAAC,OAAO,CAAC,gBAAM;wBACzE,MAAM,CAAC,OAAO,CAAC,iBAAO,IAAI,cAAO,CAAC,KAAK,CAAC,IAAI,CAAC,EAAnB,CAAmB,CAAC,CAAC;oBACnD,CAAC,CAAC,CAAC;oBAEH,+CAA+C;oBAC/C,0EAA0E;oBAC1E,6CAA6C;oBAC7C,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,6BAA6B,CAAC;wBACnD,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,6BAA6B,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC;wBACtE,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,6BAA6B,CAAC,CAAC,eAAe,CAAC,MAAM,EAAE,CAAC;oBACjF,CAAC;gBACL,CAAC,CAAC;gBAEF,EAAE,CAAC,CAAC,CAAC,iCAAI,CAAC,eAAe,CAAC,cAAc,EAAE,mBAAmB,CAAC,CAAC,CAAC,CAAC;oBAC7D,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,aAAa,CAC1B,6CAAe,CAAC,QAAQ,EACxB,gDAAkB,CAAC,mCAAmC,EACtD,wCAAwC,CAAC,CAAC;gBAClD,CAAC;YACL,CAAC;QACL,CAAC;QAEa,+BAAgB,GAA9B,UAA+B,aAA8B,EAAE,UAAmB;YAC9E,EAAE,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC;gBACjB,aAAa,GAAmB,EAAE,CAAC;YACvC,CAAC;YAED,EAAE,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC;gBAChB,UAAU,GAAG,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,8BAA8B,CAAC;YAC1E,CAAC;YAED,IAAI,MAAM,GAAG,aAAa,CAAC,UAAU,CAAC,CAAC,CAAU,aAAa,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;YAE3F,qBAAqB;YACrB,aAAa,CAAC,WAAW,GAAG,aAAa,CAAC,WAAW,IAAI,+CAA+C,CAAC;YACzG,MAAM,CAAC,gBAAgB,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;YACzC,MAAM,CAAC,mBAAmB,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;YAEjD,MAAM,CAAC,WAAW,GAAG,iCAAI,CAAC,qBAAqB,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;YACpE,MAAM,CAAC,wBAAwB,GAAG,iCAAI,CAAC,qBAAqB,CAAC,MAAM,CAAC,wBAAwB,CAAC,CAAC;YAC9F,MAAM,CAAC,mBAAmB,GAAG,MAAM,CAAC,mBAAmB,IAAI,CAAC,CAAC,CAAC,2BAA2B;YACzF,MAAM,CAAC,qBAAqB,GAAG,MAAM,CAAC,qBAAqB,IAAI,CAAC,CAAC,CAAC,eAAe;YACjF,MAAM,CAAC,qBAAqB,GAAG,MAAM,CAAC,qBAAqB,IAAI,KAAK,CAAC;YACrE,MAAM,CAAC,sBAAsB,GAAG,iCAAI,CAAC,qBAAqB,CAAC,MAAM,CAAC,sBAAsB,CAAC,CAAC;YAE1F,EAAE,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,kBAAkB,CAAC,IAAI,MAAM,CAAC,kBAAkB,IAAI,CAAC,IAAI,MAAM,CAAC,kBAAkB,IAAI,GAAG,CAAC,CAAC,CAAC;gBACzG,MAAM,CAAC,kBAAkB,GAAG,GAAG,CAAC;YACpC,CAAC;YAED,MAAM,CAAC,mBAAmB,GAAG,iCAAI,CAAC,qBAAqB,CAAC,MAAM,CAAC,mBAAmB,CAAC;YACnF,MAAM,CAAC,mBAAmB,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,mBAAmB,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,mBAAmB,CAAC,CAAC,CAAC,GAAG,CAAC;YAEnG,MAAM,CAAC,yBAAyB,GAAG,iCAAI,CAAC,qBAAqB,CAAC,MAAM,CAAC,yBAAyB,CAAC,CAAC;YAChG,MAAM,CAAC,gCAAgC,GAAG,MAAM,CAAC,gCAAgC,IAAI;gBACjF,yBAAyB;gBACzB,8BAA8B;gBAC9B,yBAAyB;gBACzB,+BAA+B;aAAC,CAAC;YACrC,MAAM,CAAC,0BAA0B,GAAG,iCAAI,CAAC,qBAAqB,CAAC,MAAM,CAAC,0BAA0B,CAAC,CAAC;YAClG,MAAM,CAAC,mBAAmB,GAAG,iCAAI,CAAC,qBAAqB,CAAC,MAAM,CAAC,mBAAmB,CAAC,CAAC;YACpF,MAAM,CAAC,oBAAoB,GAAG,iCAAI,CAAC,qBAAqB,CAAC,MAAM,CAAC,oBAAoB,CAAC,CAAC;YACtF,MAAM,CAAC,4BAA4B,GAAG,iCAAI,CAAC,qBAAqB,CAAC,MAAM,CAAC,4BAA4B,CAAC,CAAC;YACtG,MAAM,CAAC,qBAAqB,GAAG,iCAAI,CAAC,qBAAqB,CAAC,MAAM,CAAC,qBAAqB,CAAC,CAAC;YAExF,MAAM,CAAC,aAAa,CAAC;QACzB,CAAC;QACL,qBAAC;IAAD,CAAC;IAnNY,wCAAc;;;;;;;;;;;;;;AClB3B;AACA;AACA;AACA;AACA,iCAAO,CAAC,mBAAS,EAAE,OAAS,EAAE,uIAA4B,EAAE,0IAA6B,EAAE,2JAA6B,CAAC,mCAAE;AAC3H;AACA,kDAAkD,cAAc;AAChE;AACA;AACA;AACA;AACA;AACA,gCAAgC;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,gCAAgC;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oTAAoT,uDAAuD;AAC3W;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,gBAAgB;AACnC,oBAAoB,oBAAoB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kRAAkR,uDAAuD;AACzU;AACA;AACA;AACA;AACA;AACA,+CAA+C,uBAAuB;AACtE;AACA;AACA,mBAAmB,iBAAiB;AACpC,oBAAoB,oBAAoB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sRAAsR,uDAAuD;AAC7U;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uRAAuR,uDAAuD;AAC9U;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD,yBAAyB;AAClF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0RAA0R,uDAAuD;AACjV;AACA;AACA;AACA,kEAAkE,qBAAqB;AACvF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yRAAyR,uDAAuD;AAChV;AACA;AACA;AACA;AACA;AACA,mBAAmB,oBAAoB;AACvC,oBAAoB,oBAAoB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+RAA+R,uDAAuD;AACtV;AACA;AACA;AACA;AACA,mBAAmB,wBAAwB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yCAAyC,0FAA0F;AACnI;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8EAA8E,iFAAiF;AAC/J;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,kCAAkC,EAAE;AACrF,wCAAwC,+BAA+B,EAAE;AACzE,+CAA+C,sCAAsC,EAAE;AACvF,kDAAkD,yCAAyC,EAAE;AAC7F,yCAAyC,wCAAwC,EAAE;AACnF,2CAA2C,kCAAkC,EAAE;AAC/E,2CAA2C,kCAAkC,EAAE;AAC/E,2DAA2D,kDAAkD,EAAE;AAC/G,oCAAoC,2BAA2B;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2CAA2C,+BAA+B;AAC1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yNAAyN,WAAW;AACpO;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D,EAAE;AAChE;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qPAAqP,8BAA8B;AACnR;AACA;AACA;AACA;AACA;AACA;AACA,8NAA8N,8BAA8B;AAC5P;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL,CAAC;AAAA,oGAAC;AACF,+C;;;;;;;;;;;AC7XA,iGAAO,CAAC,mBAAS,EAAE,OAAS,EAAE,uIAA4B,EAAE,0IAA6B,CAAC,mCAAE;AAC5F;AACA,kDAAkD,cAAc;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6CAA6C,yCAAyC;AACtF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D,8BAA8B,sBAAsB,EAAE,EAAE,EAAE;AACrH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D,8BAA8B,sBAAsB,EAAE,EAAE,EAAE;AACrH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wEAAwE,8BAA8B,sBAAsB,EAAE,EAAE,EAAE;AAClI;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wEAAwE,8BAA8B,sBAAsB,EAAE,EAAE,EAAE;AAClI;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wEAAwE,8BAA8B,sBAAsB,EAAE,EAAE,EAAE;AAClI;AACA;AACA;AACA;AACA,wRAAwR,uDAAuD;AAC/U;AACA,aAAa;AACb;AACA;AACA,KAAK;AACL;AACA,CAAC;AAAA,oGAAC;AACF,2C;;;;;;;;;;;AC5HA,iGAAO,CAAC,mBAAS,EAAE,OAAS,EAAE,6JAAqC,CAAC,mCAAE;AACtE;AACA,kDAAkD,cAAc;AAChE;AACA,CAAC;AAAA,oGAAC;AACF,4D;;;;;;;;;;;ACLA;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD,iCAAO,CAAC,mBAAS,EAAE,OAAS,EAAE,uIAA4B,EAAE,0IAA6B,CAAC,mCAAE;AAC5F;AACA,kDAAkD,cAAc;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,EAAE;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC;AAAA,oGAAC;AACF,2C;;;;;;;;;;;AClVA,iGAAO,CAAC,mBAAS,EAAE,OAAS,EAAE,uIAA4B,EAAE,0IAA6B,CAAC,mCAAE;AAC5F;AACA,kDAAkD,cAAc;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0QAA0Q,uDAAuD;AACjU;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0RAA0R,uDAAuD;AACjV;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC;AAAA,oGAAC;AACF,sC;;;;;;;;;;;ACvKA,iGAAO,CAAC,mBAAS,EAAE,OAAS,EAAE,6GAAc,EAAE,uHAAmB,EAAE,6JAAsC,EAAE,6JAAsC,EAAE,qKAA0C,EAAE,+JAAuC,EAAE,yLAAoD,EAAE,mKAAyC,EAAE,+KAA+C,EAAE,6GAAc,EAAE,uIAA4B,EAAE,0IAA6B,EAAE,0IAA6B,CAAC,mCAAE;AACve;AACA,kDAAkD,cAAc;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6QAA6Q,uDAAuD;AACpU;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4TAA4T,uDAAuD;AACnX;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB,QAAQ;AACjC;AACA;AACA,mCAAmC,cAAc;AACjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qSAAqS,uDAAuD;AAC5V;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sLAAsL,mBAAmB;AACzM;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C,sBAAsB;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,8EAA8E;AAClI,8DAA8D,oGAAoG;AAClK,yDAAyD,sFAAsF;AAC/I,4DAA4D,yFAAyF,GAAG;AACxJ,yDAAyD,+FAA+F;AACxJ,mEAAmE,+GAA+G;AAClL,wDAAwD,8FAA8F;AACtJ,4DAA4D,wGAAwG;AACpK;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,OAAO;AAClC,2BAA2B,QAAQ;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD,mBAAmB,gBAAgB;AACvF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,OAAO;AAClC,2BAA2B,QAAQ;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kDAAkD,iEAAiE;AACnH,4CAA4C,0EAA0E;AACtH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,uBAAuB;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qCAAqC;AACrC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,OAAO;AAClC,2BAA2B,QAAQ;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,uCAAuC;AAC7E,4CAA4C,0EAA0E;AACtH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC;AAAA,oGAAC;AACF,kC;;;;;;;;;;;ACxdA,iGAAO,CAAC,mBAAS,EAAE,OAAS,EAAE,uIAA4B,EAAE,0IAA6B,CAAC,mCAAE;AAC5F;AACA,kDAAkD,cAAc;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uOAAuO,aAAa;AACpP;AACA;AACA;AACA,uOAAuO,aAAa;AACpP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0QAA0Q,aAAa;AACvR;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qRAAqR,2BAA2B;AAChT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wCAAwC;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mQAAmQ,aAAa;AAChR;AACA;AACA;AACA,mCAAmC,oBAAoB;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC;AAAA,oGAAC;AACF,sC;;;;;;;;;;;AC/JA,iGAAO,CAAC,mBAAS,EAAE,OAAS,CAAC,mCAAE;AAC/B;AACA,kDAAkD,cAAc;AAChE;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC;AAAA,oGAAC;AACF,0C;;;;;;;;;;;AC1BA,iGAAO,CAAC,mBAAS,EAAE,OAAS,CAAC,mCAAE;AAC/B;AACA,kDAAkD,cAAc;AAChE;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC;AAAA,oGAAC;AACF,8C;;;;;;;;;;;ACtCA,iGAAO,CAAC,mBAAS,EAAE,OAAS,CAAC,mCAAE;AAC/B;AACA,kDAAkD,cAAc;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC;AAAA,oGAAC;AACF,2C;;;;;;;;;;;ACdA,iGAAO,CAAC,mBAAS,EAAE,OAAS,CAAC,mCAAE;AAC/B;AACA,kDAAkD,cAAc;AAChE;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC;AAAA,oGAAC;AACF,wD;;;;;;;;;;;ACnCA,iGAAO,CAAC,mBAAS,EAAE,OAAS,CAAC,mCAAE;AAC/B;AACA,kDAAkD,cAAc;AAChE;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC;AAAA,oGAAC;AACF,6C;;;;;;;;;;;AC/BA,iGAAO,CAAC,mBAAS,EAAE,OAAS,CAAC,mCAAE;AAC/B;AACA,kDAAkD,cAAc;AAChE;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC;AAAA,oGAAC;AACF,mD;;;;;;;;;;;ACnCA,iGAAO,CAAC,mBAAS,EAAE,OAAS,CAAC,mCAAE;AAC/B;AACA,kDAAkD,cAAc;AAChE;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC;AAAA,oGAAC;AACF,0C;;;;;;;;;;;AC7BA,iGAAO,CAAC,mBAAS,EAAE,OAAS,EAAE,qGAAU,CAAC,mCAAE;AAC3C;AACA,kDAAkD,cAAc;AAChE;AACA,CAAC;AAAA,oGAAC;AACF,0D;;;;;;;;;;;ACLA,iGAAO,CAAC,mBAAS,EAAE,OAAS,CAAC,mCAAE;AAC/B;AACA,kDAAkD,cAAc;AAChE;AACA,CAAC;AAAA,oGAAC;AACF,qC;;;;;;;;;;;ACLA,iGAAO,CAAC,mBAAS,EAAE,OAAS,CAAC,mCAAE;AAC/B;AACA,kDAAkD,cAAc;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,gEAAgE;AACrE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,0DAA0D;AAC/D;AACA,CAAC;AAAA,oGAAC;AACF,iC;;;;;;;;;;;ACxBA;AACA,iCAAO,CAAC,mBAAS,EAAE,OAAS,CAAC,mCAAE;AAC/B;AACA,kDAAkD,cAAc;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC;AAAA,oGAAC;AACF,gC;;;;;;;;;;;ACdA,iGAAO,CAAC,mBAAS,EAAE,OAAS,CAAC,mCAAE;AAC/B;AACA,kDAAkD,cAAc;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC;AAAA,oGAAC;AACF,0C;;;;;;;;;;;AClEA;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD,iCAAO,CAAC,mBAAS,EAAE,OAAS,EAAE,4HAAQ,CAAC,mCAAE;AACzC;AACA,kDAAkD,cAAc;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC;AAAA,oGAAC;AACF,gC;;;;;;;;;;;ACzBA,iGAAO,CAAC,mBAAS,EAAE,OAAS,EAAE,8IAAiB,CAAC,mCAAE;AAClD;AACA,kDAAkD,cAAc;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC;AAAA,oGAAC;AACF,qC;;;;;;;;;;;ACdA,iGAAO,CAAC,mBAAS,EAAE,OAAS,CAAC,mCAAE;AAC/B;AACA,kDAAkD,cAAc;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,sEAAsE;AAC3E,CAAC;AAAA,oGAAC;AACF,yC;;;;;;;;;;;ACbA;AACA,iCAAO,CAAC,mBAAS,EAAE,OAAS,CAAC,mCAAE;AAC/B;AACA,kDAAkD,cAAc;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC;AAAA,oGAAC;AACF,kC;;;;;;;;;;;ACdA,iGAAO,CAAC,mBAAS,EAAE,OAAS,CAAC,mCAAE;AAC/B;AACA,kDAAkD,cAAc;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC;AAAA,oGAAC;AACF,oC;;;;;;;;;;;AChBA;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD,iCAAO,CAAC,mBAAS,EAAE,OAAS,EAAE,gIAAU,CAAC,mCAAE;AAC3C;AACA,kDAAkD,cAAc;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC;AAAA,oGAAC;AACF,qC;;;;;;;;;;;AC7BA;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD,iCAAO,CAAC,mBAAS,EAAE,OAAS,EAAE,gIAAU,CAAC,mCAAE;AAC3C;AACA,kDAAkD,cAAc;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC;AAAA,oGAAC;AACF,yC;;;;;;;;;;;AC9BA,iGAAO,CAAC,mBAAS,EAAE,OAAS,CAAC,mCAAE;AAC/B;AACA,kDAAkD,cAAc;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC;AAAA,oGAAC;AACF,4C;;;;;;;;;;;ACfA;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD,iCAAO,CAAC,mBAAS,EAAE,OAAS,EAAE,gIAAU,CAAC,mCAAE;AAC3C;AACA,kDAAkD,cAAc;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC;AAAA,oGAAC;AACF,uC;;;;;;;;;;;AC5BA;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD,iCAAO,CAAC,mBAAS,EAAE,OAAS,EAAE,gIAAU,CAAC,mCAAE;AAC3C;AACA,kDAAkD,cAAc;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC;AAAA,oGAAC;AACF,sC;;;;;;;;;;;AC7BA;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD,iCAAO,CAAC,mBAAS,EAAE,OAAS,EAAE,sIAAa,CAAC,mCAAE;AAC9C;AACA,kDAAkD,cAAc;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC;AAAA,oGAAC;AACF,wC;;;;;;;;;;;AC7BA;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD,iCAAO,CAAC,mBAAS,EAAE,OAAS,EAAE,4IAAgB,CAAC,mCAAE;AACjD;AACA,kDAAkD,cAAc;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC;AAAA,oGAAC;AACF,4C;;;;;;;;;;;AC7BA;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD,iCAAO,CAAC,mBAAS,EAAE,OAAS,EAAE,gIAAU,CAAC,mCAAE;AAC3C;AACA,kDAAkD,cAAc;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC;AAAA,oGAAC;AACF,gD;;;;;;;;;;;AC9BA;AACA,iCAAO,CAAC,mBAAS,EAAE,OAAS,CAAC,mCAAE;AAC/B;AACA,kDAAkD,cAAc;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,sEAAsE;AAC3E,CAAC;AAAA,oGAAC;AACF,yC;;;;;;;;;;;AChBA,iGAAO,CAAC,mBAAS,EAAE,OAAS,CAAC,mCAAE;AAC/B;AACA,kDAAkD,cAAc;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC;AAAA,oGAAC;AACF,sC;;;;;;;;;;;ACdA,iGAAO,CAAC,mBAAS,EAAE,OAAS,CAAC,mCAAE;AAC/B;AACA,kDAAkD,cAAc;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC;AAAA,oGAAC;AACF,kD;;;;;;;;;;;ACrCA;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD,iCAAO,CAAC,mBAAS,EAAE,OAAS,EAAE,+JAA2C,EAAE,mGAAa,CAAC,mCAAE;AAC3F;AACA,kDAAkD,cAAc;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC;AAAA,oGAAC;AACF,gC;;;;;;;;;;;ACnCA;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD,iCAAO,CAAC,mBAAS,EAAE,OAAS,EAAE,yKAAgD,EAAE,mGAAa,CAAC,mCAAE;AAChG;AACA,kDAAkD,cAAc;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC;AAAA,oGAAC;AACF,qC;;;;;;;;;;;ACnCA,iGAAO,CAAC,mBAAS,EAAE,OAAS,EAAE,0IAA6B,EAAE,iGAAY,CAAC,mCAAE;AAC5E;AACA,kDAAkD,cAAc;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gQAAgQ,aAAa;AAC7Q;AACA;AACA;AACA;AACA;AACA,uCAAuC,6CAA6C;AACpF;AACA,oFAAoF;AACpF;AACA;AACA;AACA,0PAA0P,eAAe;AACzQ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0QAA0Q,mBAAmB;AAC7R;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gRAAgR,uBAAuB;AACvS;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sLAAsL,cAAc;AACpM;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC;AAAA,oGAAC;AACF,yC;;;;;;;;;;;AC3IA;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD,iCAAO,CAAC,mBAAS,EAAE,OAAS,EAAE,uKAA+C,EAAE,gIAAiB,EAAE,mGAAa,EAAE,iGAAY,CAAC,mCAAE;AAChI;AACA,kDAAkD,cAAc;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC;AAAA,oGAAC;AACF,oC;;;;;;;;;;;ACvCA;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD,iCAAO,CAAC,mBAAS,EAAE,OAAS,EAAE,sKAA6C,EAAE,uIAAwB,EAAE,gGAAU,EAAE,8FAAS,CAAC,mCAAE;AAC/H;AACA,kDAAkD,cAAc;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D,EAAE;AAC/D;AACA;AACA,KAAK;AACL;AACA,CAAC;AAAA,oGAAC;AACF,iC;;;;;;;;;;;ACrCA;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD,iCAAO,CAAC,mBAAS,EAAE,OAAS,EAAE,wKAA8C,EAAE,8KAAiD,EAAE,oLAAoD,EAAE,uIAAwB,EAAE,gGAAU,EAAE,8FAAS,CAAC,mCAAE;AACzO;AACA,kDAAkD,cAAc;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iEAAiE,EAAE;AACnE;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,oBAAoB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,kCAAkC,KAAK,yDAAyD;AAChG;AACA,KAAK;AACL;AACA,CAAC;AAAA,oGAAC;AACF,qC;;;;;;;;;;;ACjKA;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD,iCAAO,CAAC,mBAAS,EAAE,OAAS,EAAE,wKAA8C,EAAE,uIAAwB,EAAE,gGAAU,EAAE,+HAAoB,EAAE,8FAAS,CAAC,mCAAE;AACtJ;AACA,kDAAkD,cAAc;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8DAA8D,EAAE;AAChE;AACA;AACA,KAAK;AACL;AACA,CAAC;AAAA,oGAAC;AACF,kC;;;;;;;;;;;ACzCA;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD,iCAAO,CAAC,mBAAS,EAAE,OAAS,EAAE,4KAAgD,EAAE,uIAAwB,EAAE,gGAAU,EAAE,8FAAS,CAAC,mCAAE;AAClI;AACA,kDAAkD,cAAc;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gEAAgE,EAAE;AAClE;AACA;AACA,KAAK;AACL;AACA,CAAC;AAAA,oGAAC;AACF,oC;;;;;;;;;;;AC7CA;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD,iCAAO,CAAC,mBAAS,EAAE,OAAS,EAAE,oLAAoD,EAAE,gGAAU,EAAE,uIAAwB,EAAE,8FAAS,EAAE,0IAA6B,CAAC,mCAAE;AACrK;AACA,kDAAkD,cAAc;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2MAA2M,iFAAiF;AAC5R;AACA;AACA,8OAA8O,iFAAiF;AAC/T;AACA;AACA;AACA;AACA,gNAAgN,iFAAiF;AACjS;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,uBAAuB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC,4BAA4B;AAC7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,sBAAsB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2EAA2E,EAAE;AAC7E;AACA,2DAA2D;AAC3D;AACA,KAAK;AACL;AACA,CAAC;AAAA,oGAAC;AACF,+C;;;;;;;;;;;ACrKA;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD,iCAAO,CAAC,mBAAS,EAAE,OAAS,EAAE,uIAAwB,EAAE,gGAAU,EAAE,8FAAS,EAAE,8FAAS,EAAE,4LAAwD,CAAC,mCAAE;AACrJ;AACA,kDAAkD,cAAc;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4EAA4E,EAAE;AAC9E;AACA;AACA,KAAK;AACL;AACA,CAAC;AAAA,oGAAC;AACF,gD;;;;;;;;;;;AC9DA;AACA;AACA,UAAU,gBAAgB,sCAAsC,iBAAiB,EAAE;AACnF,yBAAyB,uDAAuD;AAChF;AACA;AACA,uBAAuB,sBAAsB;AAC7C;AACA;AACA,CAAC;AACD,iCAAO,CAAC,mBAAS,EAAE,OAAS,EAAE,0KAA+C,EAAE,uIAAwB,EAAE,gGAAU,EAAE,8FAAS,CAAC,mCAAE;AACjI;AACA,kDAAkD,cAAc;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D,EAAE;AAC/D;AACA;AACA,KAAK;AACL;AACA,CAAC;AAAA,oGAAC;AACF,iC;;;;;;;;;;;ACxCA,iGAAO,CAAC,mBAAS,EAAE,OAAS,EAAE,6FAAQ,EAAE,iJAAkC,EAAE,0IAA6B,CAAC,mCAAE;AAC5G;AACA,kDAAkD,cAAc;AAChE;AACA;AACA;AACA;AACA;AACA,kDAAkD;AAClD;AACA;AACA,kEAAkE;AAClE,mFAAmF;AACnF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6DAA6D;AAC7D;AACA,wBAAwB;AACxB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC;AAAA,oGAAC;AACF,gD;;;;;;;;;;;AC9CA,iGAAO,CAAC,mBAAS,EAAE,OAAS,EAAE,+FAAS,EAAE,0IAA6B,EAAE,iIAA0B,EAAE,iJAAkC,CAAC,mCAAE;AACzI;AACA,kDAAkD,cAAc;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,QAAQ;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,QAAQ;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,QAAQ;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,QAAQ;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,OAAO;AAC3B,sBAAsB,OAAO;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sPAAsP,0BAA0B;AAChR;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,OAAO;AAC3B,oBAAoB,OAAO;AAC3B,sBAAsB,QAAQ;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wPAAwP,0BAA0B;AAClR;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,OAAO;AAC3B,sBAAsB,QAAQ;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qQAAqQ,0BAA0B;AAC/R;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,QAAQ;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,QAAQ;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sBAAsB,SAAS;AAC/B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,OAAO;AAC3B,sBAAsB,OAAO;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0PAA0P,0BAA0B;AACpR;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,OAAO;AAC3B,oBAAoB,OAAO;AAC3B,sBAAsB,QAAQ;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4PAA4P,0BAA0B;AACtR;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,OAAO;AAC3B,sBAAsB,QAAQ;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yQAAyQ,0BAA0B;AACnS;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qOAAqO,0BAA0B;AAC/P;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iCAAiC;AACjC;AACA;AACA,iCAAiC;AACjC;AACA;AACA,6EAA6E;AAC7E;AACA;AACA;AACA,0CAA0C,sBAAsB;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D;AAC3D,+BAA+B,oBAAoB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,OAAO,sCAAsC;AAC9F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oDAAoD;AACpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0CAA0C,qBAAqB;AAC/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,OAAO;AACpC,4BAA4B,IAAI;AAChC,oBAAoB,QAAQ;AAC5B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,4BAA4B;AACvD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+BAA+B,sBAAsB;AACrD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC;AAAA,oGAAC;AACF,gC;;;;;;;;;;;AChnBA,iGAAO,CAAC,mBAAS,EAAE,OAAS,EAAE,6FAAQ,EAAE,+FAAS,EAAE,iIAA0B,EAAE,uGAAa,EAAE,2JAAuC,EAAE,2JAAuC,EAAE,uIAA6B,EAAE,mHAAmB,EAAE,2HAAuB,EAAE,qHAAoB,EAAE,yHAAsB,EAAE,2KAA+C,EAAE,iJAAkC,EAAE,mHAAmB,EAAE,+IAAiC,EAAE,+HAAyB,EAAE,6KAAgD,EAAE,+KAAiD,EAAE,iJAAkC,EAAE,6HAAwB,CAAC,mCAAE;AACvnB;AACA,kDAAkD,cAAc;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAAA,oGAAC;AACF,sD;;;;;;;;;;;AC3BA,iGAAO,CAAC,mBAAS,EAAE,OAAS,CAAC,mCAAE;AAC/B;AACA,kDAAkD,cAAc;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAAA,oGAAC;AACF,iD;;;;;;;;;;;ACjCA,iGAAO,CAAC,mBAAS,EAAE,OAAS,CAAC,mCAAE;AAC/B;AACA,kDAAkD,cAAc;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,4EAA4E;AACjF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAAA,oGAAC;AACF,wC;;;;;;;;;;;AC5FA,iGAAO,CAAC,mBAAS,EAAE,OAAS,CAAC,mCAAE;AAC/B;AACA,kDAAkD,cAAc;AAChE;AACA,CAAC;AAAA,oGAAC;AACF,4C;;;;;;;;;;;ACLA,iGAAO,CAAC,mBAAS,EAAE,OAAS,EAAE,yKAA8C,EAAE,sHAAa,EAAE,0IAAuB,EAAE,oIAAoB,CAAC,mCAAE;AAC7I;AACA,kDAAkD,cAAc;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mHAAmH;AACnH;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4DAA4D;AAC5D;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,2EAA2E;AAC3E;AACA,aAAa;AACb;AACA;AACA,6BAA6B,mCAAmC;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAA0B;AAC1B;AACA,+EAA+E;AAC/E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wEAAwE;AACxE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,sBAAsB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,sBAAsB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCAAmC;AACnC;AACA;AACA,iBAAiB;AACjB;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA,sDAAsD;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA,4DAA4D,uDAAuD,EAAE;AACrH,uCAAuC,kBAAkB;AACzD,iEAAiE;AACjE;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA,+BAA+B,uBAAuB;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA,sDAAsD,uDAAuD,EAAE;AAC/G;AACA,mCAAmC,gBAAgB;AACnD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA,CAAC;AAAA,oGAAC;AACF,2C;;;;;;;;;;;AC9QA,iGAAO,CAAC,mBAAS,EAAE,OAAS,CAAC,mCAAE;AAC/B;AACA,kDAAkD,cAAc;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,OAAO;AACtB;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,KAAK;AACL;AACA;AACA,CAAC;AAAA,oGAAC;AACF,qC;;;;;;;;;;;ACxBA,iGAAO,CAAC,mBAAS,EAAE,OAAS,EAAE,uJAAqC,EAAE,sHAAa,CAAC,mCAAE;AACrF;AACA,kDAAkD,cAAc;AAChE;AACA;AACA,uCAAuC,mBAAmB;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sDAAsD,cAAc;AACpE;AACA;AACA;AACA;AACA;AACA,oDAAoD,UAAU;AAC9D;AACA;AACA;AACA;AACA;AACA,sDAAsD,UAAU;AAChE;AACA;AACA;AACA,wDAAwD,WAAW;AACnE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wDAAwD,mCAAmC;AAC3F;AACA;AACA,0DAA0D,qCAAqC;AAC/F;AACA;AACA,4DAA4D,+BAA+B;AAC3F;AACA;AACA,0DAA0D,qCAAqC;AAC/F;AACA;AACA;AACA;AACA,4BAA4B,gBAAgB;AAC5C,2BAA2B,oBAAoB;AAC/C;AACA;AACA,uCAAuC,mBAAmB;AAC1D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,OAAO;AAClC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,4BAA4B,gBAAgB;AAC5C,2BAA2B,oBAAoB;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC;AAAA,oGAAC;AACF,4C;;;;;;;;;;;ACxLA,iGAAO,CAAC,mBAAS,EAAE,OAAS,CAAC,mCAAE;AAC/B;AACA,kDAAkD,cAAc;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,sBAAsB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,sBAAsB;AACzC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB,iBAAiB;AACpC;AACA;AACA;AACA;AACA;AACA,4CAA4C,8CAA8C,EAAE;AAC5F;AACA;AACA;AACA,2BAA2B,2BAA2B;AACtD;AACA;AACA;AACA;AACA;AACA,mBAAmB,iBAAiB;AACpC,mBAAmB,OAAO;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA,4CAA4C,2DAA2D,EAAE;AACzG;AACA;AACA;AACA,2BAA2B,2BAA2B;AACtD;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC;AAAA,oGAAC;AACF,+C;;;;;;;;;;;AClEA,iGAAO,CAAC,mBAAS,EAAE,OAAS,EAAE,wKAA6C,EAAE,wKAA6C,EAAE,gJAAiC,EAAE,oIAA2B,EAAE,wJAAqC,EAAE,kJAAkC,EAAE,sJAAoC,CAAC,mCAAE;AAC9S;AACA,kDAAkD,cAAc;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAAA,oGAAC;AACF,uD;;;;;;;;;;;ACbA,iGAAO,CAAC,mBAAS,EAAE,OAAS,EAAE,uIAA4B,EAAE,0IAA6B,EAAE,kHAAc,EAAE,gHAAa,CAAC,mCAAE;AAC3H;AACA,kDAAkD,cAAc;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,+CAA+C;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,qBAAqB;AACrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yBAAyB;AACzB;AACA;AACA,aAAa;AACb;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC;AAAA,oGAAC;AACF,gC;;;;;;;;;;;ACrQA,iGAAO,CAAC,mBAAS,EAAE,OAAS,EAAE,uIAA4B,CAAC,mCAAE;AAC7D;AACA,kDAAkD,cAAc;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA,CAAC;AAAA,oGAAC;AACF,sC;;;;;;;;;;;AChEA,iGAAO,CAAC,mBAAS,EAAE,OAAS,EAAE,0IAA6B,CAAC,mCAAE;AAC9D;AACA,kDAAkD,cAAc;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC;AAAA,oGAAC;AACF,qC;;;;;;;;;;;AClEA,iGAAO,CAAC,mBAAS,EAAE,OAAS,EAAE,sGAAQ,CAAC,mCAAE;AACzC;AACA,kDAAkD,cAAc;AAChE;AACA,CAAC;AAAA,oGAAC;AACF,+D;;;;;;;;;;;ACLA,iGAAO,CAAC,mBAAS,EAAE,OAAS,CAAC,mCAAE;AAC/B;AACA,kDAAkD,cAAc;AAChE;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC;AAAA,oGAAC;AACF,uC;;;;;;;;;;;ACVA,iGAAO,CAAC,mBAAS,EAAE,OAAS,CAAC,mCAAE;AAC/B;AACA,kDAAkD,cAAc;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC;AAAA,oGAAC;AACF,kC;;;;;;;;;;;AClBA,iGAAO,CAAC,mBAAS,EAAE,OAAS,CAAC,mCAAE;AAC/B;AACA,kDAAkD,cAAc;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC;AAAA,oGAAC;AACF,oC;;;;;;;;;;;ACfA,iGAAO,CAAC,mBAAS,EAAE,OAAS,CAAC,mCAAE;AAC/B;AACA,kDAAkD,cAAc;AAChE;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC;AAAA,oGAAC;AACF,oC;;;;;;;;;;;ACVA,iGAAO,CAAC,mBAAS,EAAE,OAAS,EAAE,uIAA4B,CAAC,mCAAE;AAC7D;AACA,kDAAkD,cAAc;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC;AAAA,oGAAC;AACF,qC;;;;;;;;;;;ACdA,iGAAO,CAAC,mBAAS,EAAE,OAAS,EAAE,yIAA2B,EAAE,0IAA6B,CAAC,mCAAE;AAC3F;AACA,kDAAkD,cAAc;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yTAAyT,2BAA2B;AACpV;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC;AAAA,oGAAC;AACF,kC;;;;;;;;;;;AC/BA,iGAAO,CAAC,mBAAS,EAAE,OAAS,EAAE,uIAA4B,EAAE,0IAA6B,CAAC,mCAAE;AAC5F;AACA,kDAAkD,cAAc;AAChE;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0DAA0D,wCAAwC;AAClG;AACA;AACA,uDAAuD,oCAAoC;AAC3F;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,OAAO;AAC3B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sSAAsS,uDAAuD;AAC7V;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yGAAyG;AACzG;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mDAAmD;AACnD,8CAA8C;AAC9C,qDAAqD;AACrD;AACA,KAAK;AACL;AACA,CAAC;AAAA,oGAAC;AACF,mC;;;;;;;;;;;ACzJA,iGAAO,CAAC,mBAAS,EAAE,OAAS,EAAE,uIAA4B,EAAE,0IAA6B,CAAC,mCAAE;AAC5F;AACA,kDAAkD,cAAc;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,wIAAwI;AACxI;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,sCAAsC,OAAO;AAC7C,4BAA4B,OAAO;AACnC;AACA;AACA,2CAA2C,uBAAuB;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC;AAAA,oGAAC;AACF,gC;;;;;;;;;;;ACvGA,iGAAO,CAAC,mBAAS,EAAE,OAAS,CAAC,mCAAE;AAC/B;AACA,kDAAkD,cAAc;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2BAA2B,kBAAkB;AAC7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC;AAAA,oGAAC;AACF,kD;;;;;;;;;;;ACnCA;AACA;AACA;AACA;AACA,iCAAO,CAAC,mBAAS,EAAE,OAAS,EAAE,0IAA6B,EAAE,uIAA4B,EAAE,0HAAmB,EAAE,kIAAuB,EAAE,wHAAkB,EAAE,4HAAoB,EAAE,4HAAoB,EAAE,8HAAqB,EAAE,oHAAgB,EAAE,wHAAkB,CAAC,mCAAE;AACvQ;AACA,kDAAkD,cAAc;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAiD,2CAA2C,EAAE;AAC9F,wCAAwC,kCAAkC,EAAE;AAC5E,+CAA+C,yCAAyC,EAAE;AAC1F,yCAAyC,mCAAmC,EAAE;AAC9E,kDAAkD,4CAA4C,EAAE;AAChG,2CAA2C,qCAAqC,EAAE;AAClF,2CAA2C,qCAAqC,EAAE;AAClF,2DAA2D,qDAAqD,EAAE;AAClH,oCAAoC,8BAA8B;AAClE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yDAAyD;AACzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC;AAAA,oGAAC;AACF,4C;;;;;;;;;;;AChOA,iGAAO,CAAC,mBAAS,EAAE,OAAS,EAAE,wIAA0B,EAAE,uIAA4B,CAAC,mCAAE;AACzF;AACA,kDAAkD,cAAc;AAChE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,CAAC;AAAA,oGAAC;AACF,kD;;;;;;;;;;;ACzBA,iGAAO,CAAC,mBAAS,EAAE,OAAS,EAAE,4HAAoB,CAAC,mCAAE;AACrD;AACA,kDAAkD,cAAc;AAChE;AACA,CAAC;AAAA,oGAAC;AACF,6D","file":"./aisdk.0.0.13.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse {\n\t\tvar a = factory();\n\t\tfor(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];\n\t}\n})(window, function() {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 0);\n","import { ApplicationInsights } from \"applicationinsights-analytics-js\";\r\nimport { Initialization, Snippet } from \"./Initialization\";\r\n\r\n\"use strict\";\r\n//should be global function that should load as soon as SDK loads\r\ntry {\r\n\r\n // E2E sku on load initializes core and pipeline using snippet as input for configuration\r\n var aiName;\r\n if (typeof window !== \"undefined\" && typeof JSON !== \"undefined\") {\r\n // get snippet or initialize to an empty object\r\n\r\n // get sdk instance name should not conflict if page uses existing sdk for a layer of instrumentation\r\n aiName = window[\"appInsightsSDK\"];\r\n\r\n if (window[aiName] === undefined) {\r\n // if no snippet is present, initialize default values\r\n ApplicationInsights.appInsightsDefaultConfig = Initialization.getDefaultConfig();\r\n } else {\r\n if (window[aiName].initialize) { // initialize if required\r\n // this is the typical case for browser+snippet\r\n var snippet: Snippet = window[aiName] || <any>{};\r\n\r\n // overwrite snippet with full appInsights\r\n var initialization = new Initialization(snippet);\r\n var appInsightsLocal = initialization.loadAppInsights();\r\n\r\n // apply full appInsights to the global instance that was initialized in the snippet\r\n for (var field in appInsightsLocal) {\r\n snippet[field] = appInsightsLocal[field];\r\n }\r\n\r\n // Empty queue of all api calls logged prior to sdk download\r\n initialization.emptyQueue();\r\n\r\n initialization.addHousekeepingBeforeUnload(appInsightsLocal);\r\n }\r\n }\r\n }\r\n} catch (e) {\r\n // TODO: Find better place to warn to console when SDK initialization fails\r\n if (console) {\r\n console.warn('Failed to initialize AppInsights JS SDK for instance ' + aiName + e.message);\r\n }\r\n}","import { IConfiguration, AppInsightsCore, IAppInsightsCore, LoggingSeverity, _InternalMessageId, ITelemetryItem } from \"applicationinsights-core-js\";\r\nimport { ApplicationInsights, IAppInsights, IPageViewTelemetry, IExceptionTelemetry, IAutoExceptionTelemetry, ITraceTelemetry, IMetricTelemetry } from \"applicationinsights-analytics-js\";\r\nimport { Util, IConfig, RemoteDependencyData, IDependencyTelemetry } from \"applicationinsights-common\";\r\nimport { Sender } from \"applicationinsights-channel-js\";\r\nimport { PropertiesPlugin, IPropertiesPlugin } from \"applicationinsights-properties-js\";\r\nimport { AjaxPlugin as DependenciesPlugin, IDependenciesPlugin } from 'applicationinsights-dependencies-js';\r\n\r\n\"use strict\";\r\n\r\nexport interface Snippet {\r\n queue: Array<() => void>;\r\n config: IConfiguration;\r\n}\r\n\r\nexport interface IApplicationInsights extends IAppInsights, IDependenciesPlugin, IPropertiesPlugin {\r\n appInsights: ApplicationInsights;\r\n};\r\n\r\nexport class Initialization implements IApplicationInsights {\r\n public snippet: Snippet;\r\n public config: IConfiguration;\r\n private core: IAppInsightsCore;\r\n public appInsights: ApplicationInsights;\r\n private properties: PropertiesPlugin;\r\n private dependencies: DependenciesPlugin;\r\n\r\n constructor(snippet: Snippet) {\r\n\r\n // initialize the queue and config in case they are undefined\r\n snippet.queue = snippet.queue || [];\r\n var config: IConfiguration = snippet.config || <any>{};\r\n\r\n // ensure instrumentationKey is specified\r\n if (config && !config.instrumentationKey) {\r\n config = <any>snippet;\r\n ApplicationInsights.Version = \"2.0.0\";\r\n }\r\n\r\n this.appInsights = new ApplicationInsights();\r\n // set default values using config passed through snippet\r\n config = Initialization.getDefaultConfig(config, this.appInsights.identifier);\r\n\r\n this.properties = new PropertiesPlugin();\r\n this.dependencies = new DependenciesPlugin();\r\n\r\n this.snippet = snippet;\r\n this.config = config;\r\n }\r\n \r\n // Analytics Plugin\r\n public trackPageView(pageView: IPageViewTelemetry, customProperties?: { [key: string]: any; }) {\r\n this.appInsights.trackPageView(pageView, customProperties);\r\n }\r\n public trackException(exception: IExceptionTelemetry, customProperties?: { [key: string]: any; }): void {\r\n this.appInsights.trackException(exception, customProperties);\r\n }\r\n public _onerror(exception: IAutoExceptionTelemetry): void {\r\n this.appInsights._onerror(exception);\r\n }\r\n public trackTrace(trace: ITraceTelemetry, customProperties?: { [key: string]: any; }): void {\r\n this.appInsights.trackTrace(trace, customProperties);\r\n }\r\n public trackMetric(metric: IMetricTelemetry, customProperties?: { [key: string]: any; }): void {\r\n this.appInsights.trackMetric(metric, customProperties);\r\n }\r\n public startTrackPage(name?: string): void {\r\n this.appInsights.startTrackPage(name);\r\n }\r\n public stopTrackPage(name?: string, url?: string, customProperties?: Object) {\r\n this.appInsights.stopTrackPage(name, url, customProperties);\r\n }\r\n public addTelemetryInitializer(telemetryInitializer: (item: ITelemetryItem) => boolean | void) {\r\n return this.appInsights.addTelemetryInitializer(telemetryInitializer);\r\n }\r\n\r\n // Properties Plugin\r\n public setAuthenticatedUserContext(authenticatedUserId: string, accountId?: string, storeInCookie = false): void {\r\n this.properties.user.setAuthenticatedUserContext(authenticatedUserId, accountId, storeInCookie);\r\n }\r\n public clearAuthenticatedUserContext(): void {\r\n this.properties.user.clearAuthenticatedUserContext();\r\n }\r\n\r\n // Dependencies Plugin\r\n public trackDependencyData(dependency: IDependencyTelemetry, customProperties?: {[key: string]: any}, systemProperties?: {[key: string]: any}): void {\r\n this.dependencies.trackDependencyData(dependency, customProperties, systemProperties);\r\n }\r\n\r\n public loadAppInsights(): IApplicationInsights {\r\n\r\n this.core = new AppInsightsCore();\r\n let extensions = [];\r\n let appInsightsChannel: Sender = new Sender();\r\n\r\n extensions.push(appInsightsChannel);\r\n extensions.push(this.properties);\r\n extensions.push(this.dependencies);\r\n extensions.push(this.appInsights);\r\n\r\n // initialize core\r\n this.core.initialize(this.config, extensions);\r\n\r\n // initialize extensions\r\n this.appInsights.initialize(this.config, this.core, extensions);\r\n appInsightsChannel.initialize(this.config, this.core, extensions);\r\n return this;\r\n }\r\n\r\n public emptyQueue() {\r\n\r\n // call functions that were queued before the main script was loaded\r\n try {\r\n if (Util.isArray(this.snippet.queue)) {\r\n // note: do not check length in the for-loop conditional in case something goes wrong and the stub methods are not overridden.\r\n var length = this.snippet.queue.length;\r\n for (var i = 0; i < length; i++) {\r\n var call = this.snippet.queue[i];\r\n call();\r\n }\r\n\r\n this.snippet.queue = undefined;\r\n delete this.snippet.queue;\r\n }\r\n } catch (exception) {\r\n var properties: any = {};\r\n if (exception && typeof exception.toString === \"function\") {\r\n properties.exception = exception.toString();\r\n }\r\n\r\n // need from core\r\n // Microsoft.ApplicationInsights._InternalLogging.throwInternal(\r\n // LoggingSeverity.WARNING,\r\n // _InternalMessageId.FailedToSendQueuedTelemetry,\r\n // \"Failed to send queued telemetry\",\r\n // properties);\r\n }\r\n }\r\n\r\n public pollInteralLogs(appInsightsInstance: ApplicationInsights) {\r\n // return setInterval(() => {\r\n // var queue: Array<_InternalLogMessage> = ApplicationInsights._InternalLogging.queue;\r\n // var length = queue.length;\r\n // for (var i = 0; i < length; i++) {\r\n // appInsightsInstance.trackTrace(queue[i].message);\r\n // }\r\n // queue.length = 0;\r\n // }, this.config.diagnosticLogInterval);\r\n }\r\n\r\n public addHousekeepingBeforeUnload(appInsightsInstance: IApplicationInsights): void {\r\n // Add callback to push events when the user navigates away\r\n\r\n if (!appInsightsInstance.appInsights.config.disableFlushOnBeforeUnload && ('onbeforeunload' in window)) {\r\n var performHousekeeping = function () {\r\n // Adds the ability to flush all data before the page unloads.\r\n // Note: This approach tries to push an async request with all the pending events onbeforeunload.\r\n // Firefox does not respect this.Other browsers DO push out the call with < 100% hit rate.\r\n // Telemetry here will help us analyze how effective this approach is.\r\n // Another approach would be to make this call sync with a acceptable timeout to reduce the \r\n // impact on user experience.\r\n\r\n //appInsightsInstance.context._sender.triggerSend();\r\n\r\n appInsightsInstance.appInsights.core.getTransmissionControls().forEach(queues => {\r\n queues.forEach(channel => channel.flush(true));\r\n });\r\n \r\n // Back up the current session to local storage\r\n // This lets us close expired sessions after the cookies themselves expire\r\n // Todo: move this against interface behavior\r\n if (this.core.extensions[\"AppInsightsPropertiesPlugin\"] &&\r\n this.core.extensions[\"AppInsightsPropertiesPlugin\"]._sessionManager) {\r\n this.core.extensions[\"AppInsightsPropertiesPlugin\"]._sessionManager.backup();\r\n }\r\n };\r\n\r\n if (!Util.addEventHandler('beforeunload', performHousekeeping)) {\r\n this.core.logger.throwInternal(\r\n LoggingSeverity.CRITICAL,\r\n _InternalMessageId.FailedToAddHandlerForOnBeforeUnload,\r\n 'Could not add handler for beforeunload');\r\n }\r\n }\r\n }\r\n\r\n public static getDefaultConfig(configuration?: IConfiguration, identifier?: string): IConfiguration {\r\n if (!configuration) {\r\n configuration = <IConfiguration>{};\r\n }\r\n\r\n if (configuration) {\r\n identifier = identifier ? identifier : \"ApplicationInsightsAnalytics\";\r\n }\r\n\r\n let config = configuration.extensions ? <IConfig>configuration.extensions[identifier] : {};\r\n\r\n // set default values\r\n configuration.endpointUrl = configuration.endpointUrl || \"https://dc.services.visualstudio.com/v2/track\";\r\n config.sessionRenewalMs = 30 * 60 * 1000;\r\n config.sessionExpirationMs = 24 * 60 * 60 * 1000;\r\n\r\n config.enableDebug = Util.stringToBoolOrDefault(config.enableDebug);\r\n config.disableExceptionTracking = Util.stringToBoolOrDefault(config.disableExceptionTracking);\r\n config.consoleLoggingLevel = config.consoleLoggingLevel || 1; // Show only CRITICAL level\r\n config.telemetryLoggingLevel = config.telemetryLoggingLevel || 0; // Send nothing\r\n config.diagnosticLogInterval = config.diagnosticLogInterval || 10000;\r\n config.autoTrackPageVisitTime = Util.stringToBoolOrDefault(config.autoTrackPageVisitTime);\r\n\r\n if (isNaN(config.samplingPercentage) || config.samplingPercentage <= 0 || config.samplingPercentage >= 100) {\r\n config.samplingPercentage = 100;\r\n }\r\n\r\n config.disableAjaxTracking = Util.stringToBoolOrDefault(config.disableAjaxTracking)\r\n config.maxAjaxCallsPerView = !isNaN(config.maxAjaxCallsPerView) ? config.maxAjaxCallsPerView : 500;\r\n\r\n config.disableCorrelationHeaders = Util.stringToBoolOrDefault(config.disableCorrelationHeaders);\r\n config.correlationHeaderExcludedDomains = config.correlationHeaderExcludedDomains || [\r\n \"*.blob.core.windows.net\",\r\n \"*.blob.core.chinacloudapi.cn\",\r\n \"*.blob.core.cloudapi.de\",\r\n \"*.blob.core.usgovcloudapi.net\"];\r\n config.disableFlushOnBeforeUnload = Util.stringToBoolOrDefault(config.disableFlushOnBeforeUnload);\r\n config.isCookieUseDisabled = Util.stringToBoolOrDefault(config.isCookieUseDisabled);\r\n config.isStorageUseDisabled = Util.stringToBoolOrDefault(config.isStorageUseDisabled);\r\n config.isBrowserLinkTrackingEnabled = Util.stringToBoolOrDefault(config.isBrowserLinkTrackingEnabled);\r\n config.enableCorsCorrelation = Util.stringToBoolOrDefault(config.enableCorsCorrelation);\r\n\r\n return configuration;\r\n }\r\n}","/**\r\n * ApplicationInsights.ts\r\n * @copyright Microsoft 2018\r\n */\r\ndefine([\"require\", \"exports\", \"applicationinsights-common\", \"applicationinsights-core-js\", \"./Telemetry/PageViewManager\"], function (require, exports, applicationinsights_common_1, applicationinsights_core_js_1, PageViewManager_1) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n \"use strict\";\r\n var durationProperty = \"duration\";\r\n var ApplicationInsights = /** @class */ (function () {\r\n function ApplicationInsights() {\r\n this.identifier = \"ApplicationInsightsAnalytics\";\r\n this.priority = 160; // take from reserved priority range 100- 200\r\n this._isInitialized = false;\r\n // Counts number of trackAjax invokations.\r\n // By default we only monitor X ajax call per view to avoid too much load.\r\n // Default value is set in config.\r\n // This counter keeps increasing even after the limit is reached.\r\n this._trackAjaxAttempts = 0;\r\n this.initialize = this._initialize.bind(this);\r\n }\r\n ApplicationInsights.prototype.processTelemetry = function (env) {\r\n var doNotSendItem = false;\r\n try {\r\n var telemetryInitializersCount = this._telemetryInitializers.length;\r\n for (var i = 0; i < telemetryInitializersCount; ++i) {\r\n var telemetryInitializer = this._telemetryInitializers[i];\r\n if (telemetryInitializer) {\r\n if (telemetryInitializer.apply(null, [env]) === false) {\r\n doNotSendItem = true;\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n catch (e) {\r\n doNotSendItem = true;\r\n this._logger.throwInternal(applicationinsights_core_js_1.LoggingSeverity.CRITICAL, applicationinsights_core_js_1._InternalMessageId.TelemetryInitializerFailed, \"One of telemetry initializers failed, telemetry item will not be sent: \" + applicationinsights_common_1.Util.getExceptionName(e), { exception: applicationinsights_common_1.Util.dump(e) }, true);\r\n }\r\n if (!doNotSendItem && !applicationinsights_core_js_1.CoreUtils.isNullOrUndefined(this._nextPlugin)) {\r\n this._nextPlugin.processTelemetry(env);\r\n }\r\n };\r\n ApplicationInsights.prototype.setNextPlugin = function (next) {\r\n this._nextPlugin = next;\r\n };\r\n /**\r\n * @description Log a diagnostic message\r\n * @param {ITraceTelemetry} trace\r\n * @param {{[key: string]: any}} [customProperties]\r\n * @memberof ApplicationInsights\r\n */\r\n ApplicationInsights.prototype.trackTrace = function (trace, customProperties) {\r\n try {\r\n var telemetryItem = applicationinsights_common_1.TelemetryItemCreator.create(trace, applicationinsights_common_1.Trace.dataType, applicationinsights_common_1.Trace.envelopeType, this._logger, customProperties);\r\n this._setTelemetryNameAndIKey(telemetryItem);\r\n this.core.track(telemetryItem);\r\n }\r\n catch (e) {\r\n this._logger.throwInternal(applicationinsights_core_js_1.LoggingSeverity.WARNING, applicationinsights_core_js_1._InternalMessageId.TrackTraceFailed, \"trackTrace failed, trace will not be collected: \" + applicationinsights_common_1.Util.getExceptionName(e), { exception: applicationinsights_common_1.Util.dump(e) });\r\n }\r\n };\r\n /**\r\n * @description Log a numeric value that is not associated with a specific event. Typically\r\n * used to send regular reports of performance indicators. To send single measurement, just\r\n * use the name and average fields of {@link IMetricTelemetry}. If you take measurements\r\n * frequently, you can reduce the telemetry bandwidth by aggregating multiple measurements\r\n * and sending the resulting average at intervals\r\n * @param {IMetricTelemetry} metric input object argument. Only name and average are mandatory.\r\n * @param {{[key: string]: any}} customProperties additional data used to filter metrics in the\r\n * portal. Defaults to empty.\r\n * @memberof ApplicationInsights\r\n */\r\n ApplicationInsights.prototype.trackMetric = function (metric, customProperties) {\r\n try {\r\n var telemetryItem = applicationinsights_common_1.TelemetryItemCreator.create(metric, applicationinsights_common_1.Metric.dataType, applicationinsights_common_1.Metric.envelopeType, this._logger, customProperties);\r\n this._setTelemetryNameAndIKey(telemetryItem);\r\n this.core.track(telemetryItem);\r\n }\r\n catch (e) {\r\n this._logger.throwInternal(applicationinsights_core_js_1.LoggingSeverity.CRITICAL, applicationinsights_core_js_1._InternalMessageId.TrackMetricFailed, \"trackMetric failed, metric will not be collected: \" + applicationinsights_common_1.Util.getExceptionName(e), { exception: applicationinsights_common_1.Util.dump(e) });\r\n }\r\n };\r\n /**\r\n * Logs that a page or other item was viewed.\r\n * @param IPageViewTelemetry The string you used as the name in startTrackPage. Defaults to the document title.\r\n * @param customProperties Additional data used to filter events and metrics. Defaults to empty. If a user wants\r\n * to provide a custom duration, it'll have to be in customProperties\r\n */\r\n ApplicationInsights.prototype.trackPageView = function (pageView, customProperties) {\r\n try {\r\n this._pageViewManager.trackPageView(pageView, customProperties);\r\n if (this.config.autoTrackPageVisitTime) {\r\n this._pageVisitTimeManager.trackPreviousPageVisit(pageView.name, pageView.uri);\r\n }\r\n }\r\n catch (e) {\r\n this._logger.throwInternal(applicationinsights_core_js_1.LoggingSeverity.CRITICAL, applicationinsights_core_js_1._InternalMessageId.TrackPVFailed, \"trackPageView failed, page view will not be collected: \" + applicationinsights_common_1.Util.getExceptionName(e), { exception: applicationinsights_common_1.Util.dump(e) });\r\n }\r\n };\r\n /**\r\n * Create a page view telemetry item and send it to the SDK pipeline through the core.track API\r\n * @param pageView Page view item to be sent\r\n * @param properties Custom properties (Part C) that a user can add to the telemetry item\r\n * @param systemProperties System level properties (Part A) that a user can add to the telemetry item\r\n */\r\n ApplicationInsights.prototype.sendPageViewInternal = function (pageView, properties, systemProperties) {\r\n var telemetryItem = applicationinsights_common_1.TelemetryItemCreator.create(pageView, applicationinsights_common_1.PageView.dataType, applicationinsights_common_1.PageView.envelopeType, this._logger, properties, systemProperties);\r\n // set instrumentation key\r\n this._setTelemetryNameAndIKey(telemetryItem);\r\n this.core.track(telemetryItem);\r\n // reset ajaxes counter\r\n this._trackAjaxAttempts = 0;\r\n };\r\n ApplicationInsights.prototype.sendPageViewPerformanceInternal = function (pageViewPerformance, properties) {\r\n var telemetryItem = applicationinsights_common_1.TelemetryItemCreator.create(pageViewPerformance, applicationinsights_common_1.PageViewPerformance.dataType, applicationinsights_common_1.PageViewPerformance.envelopeType, this._logger, properties);\r\n // set instrumentation key\r\n this._setTelemetryNameAndIKey(telemetryItem);\r\n this.core.track(telemetryItem);\r\n };\r\n /**\r\n * Starts timing how long the user views a page or other item. Call this when the page opens.\r\n * This method doesn't send any telemetry. Call {@link stopTrackTelemetry} to log the page when it closes.\r\n * @param name A string that idenfities this item, unique within this HTML document. Defaults to the document title.\r\n */\r\n ApplicationInsights.prototype.startTrackPage = function (name) {\r\n try {\r\n if (typeof name !== \"string\") {\r\n name = window.document && window.document.title || \"\";\r\n }\r\n this._pageTracking.start(name);\r\n }\r\n catch (e) {\r\n this._logger.throwInternal(applicationinsights_core_js_1.LoggingSeverity.CRITICAL, applicationinsights_core_js_1._InternalMessageId.StartTrackFailed, \"startTrackPage failed, page view may not be collected: \" + applicationinsights_common_1.Util.getExceptionName(e), { exception: applicationinsights_common_1.Util.dump(e) });\r\n }\r\n };\r\n /**\r\n * Logs how long a page or other item was visible, after {@link startTrackPage}. Call this when the page closes.\r\n * @param name The string you used as the name in startTrackPage. Defaults to the document title.\r\n * @param url A relative or absolute URL that identifies the page or other item. Defaults to the window location.\r\n * @param properties Additional data used to filter pages and metrics in the portal. Defaults to empty.\r\n * Any property of type double will be considered a measurement, and will be treated by Application Insights as a metric\r\n */\r\n ApplicationInsights.prototype.stopTrackPage = function (name, url, properties) {\r\n try {\r\n if (typeof name !== \"string\") {\r\n name = window.document && window.document.title || \"\";\r\n }\r\n if (typeof url !== \"string\") {\r\n url = window.location && window.location.href || \"\";\r\n }\r\n this._pageTracking.stop(name, url, properties);\r\n if (this.config.autoTrackPageVisitTime) {\r\n this._pageVisitTimeManager.trackPreviousPageVisit(name, url);\r\n }\r\n }\r\n catch (e) {\r\n this._logger.throwInternal(applicationinsights_core_js_1.LoggingSeverity.CRITICAL, applicationinsights_core_js_1._InternalMessageId.StopTrackFailed, \"stopTrackPage failed, page view will not be collected: \" + applicationinsights_common_1.Util.getExceptionName(e), { exception: applicationinsights_common_1.Util.dump(e) });\r\n }\r\n };\r\n /**\r\n * Log an exception you have caught.\r\n *\r\n * @param {IExceptionTelemetry} exception Object which contains exception to be sent\r\n * @param {{[key: string]: any}} customProperties Additional data used to filter pages and metrics in the portal. Defaults to empty.\r\n *\r\n * Any property of type double will be considered a measurement, and will be treated by Application Insights as a metric.\r\n * @memberof ApplicationInsights\r\n */\r\n ApplicationInsights.prototype.trackException = function (exception, customProperties) {\r\n try {\r\n var telemetryItem = applicationinsights_common_1.TelemetryItemCreator.create(exception, applicationinsights_common_1.Exception.dataType, applicationinsights_common_1.Exception.envelopeType, this._logger, customProperties);\r\n this._setTelemetryNameAndIKey(telemetryItem);\r\n this.core.track(telemetryItem);\r\n }\r\n catch (e) {\r\n this._logger.throwInternal(applicationinsights_core_js_1.LoggingSeverity.CRITICAL, applicationinsights_core_js_1._InternalMessageId.TrackExceptionFailed, \"trackException failed, exception will not be collected: \" + applicationinsights_common_1.Util.getExceptionName(e), { exception: applicationinsights_common_1.Util.dump(e) });\r\n }\r\n };\r\n /**\r\n * @description Custom error handler for Application Insights Analytics\r\n * @param {IAutoExceptionTelemetry} exception\r\n * @memberof ApplicationInsights\r\n */\r\n ApplicationInsights.prototype._onerror = function (exception) {\r\n try {\r\n var properties = {\r\n url: (exception && exception.url) || document.URL,\r\n lineNumber: exception.lineNumber,\r\n columnNumber: exception.columnNumber,\r\n message: exception.message\r\n };\r\n if (applicationinsights_common_1.Util.isCrossOriginError(exception.message, exception.url, exception.lineNumber, exception.columnNumber, exception.error)) {\r\n this._sendCORSException(properties.url);\r\n }\r\n else {\r\n if (!applicationinsights_common_1.Util.isError(exception.error)) {\r\n var stack = \"window.onerror@\" + properties.url + \":\" + exception.lineNumber + \":\" + (exception.columnNumber || 0);\r\n exception.error = new Error(exception.message);\r\n exception.error.stack = stack;\r\n }\r\n this.trackException({ error: exception.error, severityLevel: applicationinsights_common_1.SeverityLevel.Error }, properties);\r\n }\r\n }\r\n catch (e) {\r\n var errorString = exception.error ?\r\n (exception.error.name + \", \" + exception.error.message)\r\n : \"null\";\r\n this._logger.throwInternal(applicationinsights_core_js_1.LoggingSeverity.CRITICAL, applicationinsights_core_js_1._InternalMessageId.ExceptionWhileLoggingError, \"_onError threw exception while logging error, error will not be collected: \"\r\n + applicationinsights_common_1.Util.getExceptionName(e), { exception: applicationinsights_common_1.Util.dump(e), errorString: errorString });\r\n }\r\n };\r\n ApplicationInsights.prototype.addTelemetryInitializer = function (telemetryInitializer) {\r\n this._telemetryInitializers.push(telemetryInitializer);\r\n };\r\n ApplicationInsights.prototype._initialize = function (config, core, extensions) {\r\n var _this = this;\r\n if (this._isInitialized) {\r\n return;\r\n }\r\n if (applicationinsights_core_js_1.CoreUtils.isNullOrUndefined(core)) {\r\n throw Error(\"Error initializing\");\r\n }\r\n this.core = core;\r\n this._logger = core.logger;\r\n this._globalconfig = {\r\n instrumentationKey: config.instrumentationKey,\r\n endpointUrl: config.endpointUrl\r\n };\r\n this.config = config.extensionConfig && config.extensionConfig[this.identifier] ? config.extensionConfig[this.identifier] : {};\r\n // load default values if specified\r\n var defaults = ApplicationInsights.appInsightsDefaultConfig;\r\n if (defaults !== undefined) {\r\n if (defaults.extensions && defaults.extensions[this.identifier]) {\r\n for (var field in defaults.extensions[this.identifier]) {\r\n // for each unspecified field, set the default value\r\n if (this.config[field] === undefined) {\r\n this.config[field] = defaults[field];\r\n }\r\n }\r\n }\r\n if (this._globalconfig) {\r\n for (var field in defaults) {\r\n if (this._globalconfig[field] === undefined) {\r\n this._globalconfig[field] = defaults[field];\r\n }\r\n }\r\n }\r\n }\r\n // Todo: move this out of static state\r\n if (this.config.isCookieUseDisabled) {\r\n applicationinsights_common_1.Util.disableCookies();\r\n }\r\n // Todo: move this out of static state\r\n if (this.config.isStorageUseDisabled) {\r\n applicationinsights_common_1.Util.disableStorage();\r\n }\r\n var configGetters = {\r\n instrumentationKey: function () { return config.instrumentationKey; },\r\n accountId: function () { return _this.config.accountId; },\r\n sessionRenewalMs: function () { return _this.config.sessionRenewalMs; },\r\n sessionExpirationMs: function () { return _this.config.sessionExpirationMs; },\r\n sampleRate: function () { return _this.config.samplingPercentage; },\r\n cookieDomain: function () { return _this.config.cookieDomain; },\r\n sdkExtension: function () { return _this.config.sdkExtension; },\r\n isBrowserLinkTrackingEnabled: function () { return _this.config.isBrowserLinkTrackingEnabled; },\r\n appId: function () { return _this.config.appId; }\r\n };\r\n this._pageViewManager = new PageViewManager_1.PageViewManager(this, this.config.overridePageViewDuration, this.core);\r\n this._telemetryInitializers = [];\r\n this._addDefaultTelemetryInitializers(configGetters);\r\n // initialize page view timing\r\n this._pageTracking = new Timing(this._logger, \"trackPageView\");\r\n this._pageTracking.action = function (name, url, duration, properties) {\r\n var pageViewItem = {\r\n name: name,\r\n uri: url\r\n };\r\n // duration must be a custom property in order for the collector to extract it\r\n if (applicationinsights_core_js_1.CoreUtils.isNullOrUndefined(properties)) {\r\n properties = {};\r\n }\r\n properties[durationProperty] = duration;\r\n _this.sendPageViewInternal(pageViewItem, properties);\r\n };\r\n if (this.config.disableExceptionTracking === false &&\r\n !this.config.autoExceptionsInstrumented) {\r\n // We want to enable exception auto collection and it has not been done so yet\r\n var onerror_1 = \"onerror\";\r\n var originalOnError_1 = window[onerror_1];\r\n window.onerror = function (message, url, lineNumber, columnNumber, error) {\r\n var handled = originalOnError_1 && originalOnError_1(message, url, lineNumber, columnNumber, error);\r\n if (handled !== true) {\r\n this._onerror({\r\n message: message,\r\n url: url,\r\n lineNumber: lineNumber,\r\n columnNumber: columnNumber,\r\n error: error\r\n });\r\n }\r\n return handled;\r\n };\r\n this.config.autoExceptionsInstrumented = true;\r\n }\r\n this._isInitialized = true;\r\n };\r\n ApplicationInsights.prototype._addDefaultTelemetryInitializers = function (configGetters) {\r\n if (!configGetters.isBrowserLinkTrackingEnabled()) {\r\n var browserLinkPaths_1 = ['/browserLinkSignalR/', '/__browserLink/'];\r\n var dropBrowserLinkRequests = function (envelope) {\r\n if (envelope.baseType === applicationinsights_common_1.RemoteDependencyData.dataType) {\r\n var remoteData = envelope.baseData;\r\n if (remoteData) {\r\n for (var i = 0; i < browserLinkPaths_1.length; i++) {\r\n if (remoteData.absoluteUrl && remoteData.absoluteUrl.indexOf(browserLinkPaths_1[i]) >= 0) {\r\n return false;\r\n }\r\n }\r\n }\r\n }\r\n return true;\r\n };\r\n this._addTelemetryInitializer(dropBrowserLinkRequests);\r\n }\r\n };\r\n ApplicationInsights.prototype._addTelemetryInitializer = function (telemetryInitializer) {\r\n this._telemetryInitializers.push(telemetryInitializer);\r\n };\r\n ApplicationInsights.prototype._sendCORSException = function (url) {\r\n var exception = {\r\n message: \"Script error: The browser's same-origin policy prevents us from getting the details of this exception. Consider using the 'crossorigin' attribute.\",\r\n url: url,\r\n lineNumber: 0,\r\n columnNumber: 0,\r\n error: undefined\r\n };\r\n var telemetryItem = applicationinsights_common_1.TelemetryItemCreator.create(exception, applicationinsights_common_1.Exception.dataType, applicationinsights_common_1.Exception.envelopeType, this._logger, { url: url });\r\n this.core.track(telemetryItem);\r\n };\r\n // Mutate telemetryItem inplace to add boilerplate iKey & name info\r\n ApplicationInsights.prototype._setTelemetryNameAndIKey = function (telemetryItem) {\r\n telemetryItem.instrumentationKey = this._globalconfig.instrumentationKey;\r\n var iKeyNoDashes = this._globalconfig.instrumentationKey.replace(/-/g, \"\");\r\n telemetryItem.name = telemetryItem.name.replace(\"{0}\", iKeyNoDashes);\r\n };\r\n ApplicationInsights.Version = \"2.0.1-beta\";\r\n return ApplicationInsights;\r\n }());\r\n exports.ApplicationInsights = ApplicationInsights;\r\n /**\r\n * Used to record timed events and page views.\r\n */\r\n var Timing = /** @class */ (function () {\r\n function Timing(logger, name) {\r\n this._name = name;\r\n this._events = {};\r\n this._logger = logger;\r\n }\r\n Timing.prototype.start = function (name) {\r\n if (typeof this._events[name] !== \"undefined\") {\r\n this._logger.throwInternal(applicationinsights_core_js_1.LoggingSeverity.WARNING, applicationinsights_core_js_1._InternalMessageId.StartCalledMoreThanOnce, \"start was called more than once for this event without calling stop.\", { name: this._name, key: name }, true);\r\n }\r\n this._events[name] = +new Date;\r\n };\r\n Timing.prototype.stop = function (name, url, properties) {\r\n var start = this._events[name];\r\n if (isNaN(start)) {\r\n this._logger.throwInternal(applicationinsights_core_js_1.LoggingSeverity.WARNING, applicationinsights_core_js_1._InternalMessageId.StopCalledWithoutStart, \"stop was called without a corresponding start.\", { name: this._name, key: name }, true);\r\n }\r\n else {\r\n var end = +new Date;\r\n var duration = applicationinsights_common_1.PageViewPerformance.getDuration(start, end);\r\n this.action(name, url, duration, properties);\r\n }\r\n delete this._events[name];\r\n this._events[name] = undefined;\r\n };\r\n return Timing;\r\n }());\r\n});\r\n//# sourceMappingURL=ApplicationInsights.js.map","define([\"require\", \"exports\", \"applicationinsights-common\", \"applicationinsights-core-js\"], function (require, exports, applicationinsights_common_1, applicationinsights_core_js_1) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n /**\r\n * Class encapsulates sending page views and page view performance telemetry.\r\n */\r\n var PageViewManager = /** @class */ (function () {\r\n function PageViewManager(appInsights, overridePageViewDuration, core) {\r\n this.pageViewPerformanceSent = false;\r\n this.overridePageViewDuration = false;\r\n this.overridePageViewDuration = overridePageViewDuration;\r\n this.appInsights = appInsights;\r\n if (core) {\r\n this._channel = function () { return (core.getTransmissionControls()); };\r\n this._logger = core.logger;\r\n }\r\n }\r\n /**\r\n * Currently supported cases:\r\n * 1) (default case) track page view called with default parameters, overridePageViewDuration = false. Page view is sent with page view performance when navigation timing data is available.\r\n * a. If navigation timing is not supported then page view is sent right away with undefined duration. Page view performance is not sent.\r\n * 2) overridePageViewDuration = true, custom duration provided. Custom duration is used, page view sends right away.\r\n * 3) overridePageViewDuration = true, custom duration NOT provided. Page view is sent right away, duration is time spent from page load till now (or undefined if navigation timing is not supported).\r\n * 4) overridePageViewDuration = false, custom duration is provided. Page view is sent right away with custom duration.\r\n *\r\n * In all cases page view performance is sent once (only for the 1st call of trackPageView), or not sent if navigation timing is not supported.\r\n */\r\n PageViewManager.prototype.trackPageView = function (pageView, customProperties) {\r\n var _this = this;\r\n var name = pageView.name;\r\n if (applicationinsights_core_js_1.CoreUtils.isNullOrUndefined(name) || typeof name !== \"string\") {\r\n pageView.name = window.document && window.document.title || \"\";\r\n }\r\n var uri = pageView.uri;\r\n if (applicationinsights_core_js_1.CoreUtils.isNullOrUndefined(uri) || typeof uri !== \"string\") {\r\n pageView.uri = window.location && window.location.href || \"\";\r\n }\r\n // case 1a. if performance timing is not supported by the browser, send the page view telemetry with the duration provided by the user. If the user\r\n // do not provide the duration, set duration to undefined\r\n // Also this is case 4\r\n if (!applicationinsights_common_1.PageViewPerformance.isPerformanceTimingSupported()) {\r\n this.appInsights.sendPageViewInternal(pageView, customProperties);\r\n this._channel().forEach(function (queues) { queues.forEach(function (q) { return q.flush(true); }); });\r\n // no navigation timing (IE 8, iOS Safari 8.4, Opera Mini 8 - see http://caniuse.com/#feat=nav-timing)\r\n this._logger.throwInternal(applicationinsights_core_js_1.LoggingSeverity.WARNING, applicationinsights_core_js_1._InternalMessageId.NavigationTimingNotSupported, \"trackPageView: navigation timing API used for calculation of page duration is not supported in this browser. This page view will be collected without duration and timing info.\");\r\n return;\r\n }\r\n var pageViewSent = false;\r\n var customDuration = undefined;\r\n // if the performance timing is supported by the browser, calculate the custom duration\r\n var start = applicationinsights_common_1.PageViewPerformance.getPerformanceTiming().navigationStart;\r\n customDuration = applicationinsights_common_1.PageViewPerformance.getDuration(start, +new Date);\r\n if (!applicationinsights_common_1.PageViewPerformance.shouldCollectDuration(customDuration)) {\r\n customDuration = undefined;\r\n }\r\n // if the user has provided duration, send a page view telemetry with the provided duration. Otherwise, if\r\n // overridePageViewDuration is set to true, send a page view telemetry with the custom duration calculated earlier\r\n var duration = undefined;\r\n if (!applicationinsights_core_js_1.CoreUtils.isNullOrUndefined(customProperties) &&\r\n !applicationinsights_core_js_1.CoreUtils.isNullOrUndefined(customProperties.duration)) {\r\n duration = customProperties.duration;\r\n }\r\n if (this.overridePageViewDuration || !isNaN(duration)) {\r\n if (isNaN(duration)) {\r\n // case 3\r\n if (!customProperties) {\r\n customProperties = {};\r\n }\r\n customProperties[\"duration\"] = customDuration;\r\n }\r\n // case 2\r\n this.appInsights.sendPageViewInternal(pageView, customProperties);\r\n this._channel().forEach(function (queues) { queues.forEach(function (q) { return q.flush(true); }); });\r\n pageViewSent = true;\r\n }\r\n // now try to send the page view performance telemetry\r\n var maxDurationLimit = 60000;\r\n if (!customProperties) {\r\n customProperties = {};\r\n }\r\n var handle = setInterval((function () {\r\n try {\r\n if (applicationinsights_common_1.PageViewPerformance.isPerformanceTimingDataReady()) {\r\n clearInterval(handle);\r\n var pageViewPerformance = new applicationinsights_common_1.PageViewPerformance(_this._logger, name, uri, null);\r\n if (!pageViewPerformance.getIsValid() && !pageViewSent) {\r\n // If navigation timing gives invalid numbers, then go back to \"override page view duration\" mode.\r\n // That's the best value we can get that makes sense.\r\n customProperties[\"duration\"] = customDuration;\r\n _this.appInsights.sendPageViewInternal(pageView, customProperties);\r\n _this._channel().forEach(function (queues) { queues.forEach(function (q) { return q.flush(true); }); });\r\n }\r\n else {\r\n if (!pageViewSent) {\r\n customProperties[\"duration\"] = pageViewPerformance.getDurationMs();\r\n _this.appInsights.sendPageViewInternal(pageView, customProperties);\r\n }\r\n if (!_this.pageViewPerformanceSent) {\r\n _this.appInsights.sendPageViewPerformanceInternal(pageViewPerformance, customProperties);\r\n _this.pageViewPerformanceSent = true;\r\n }\r\n _this._channel().forEach(function (queues) { queues.forEach(function (q) { return q.flush(true); }); });\r\n }\r\n }\r\n else if (applicationinsights_common_1.PageViewPerformance.getDuration(start, +new Date) > maxDurationLimit) {\r\n // if performance timings are not ready but we exceeded the maximum duration limit, just log a page view telemetry\r\n // with the maximum duration limit. Otherwise, keep waiting until performance timings are ready\r\n clearInterval(handle);\r\n if (!pageViewSent) {\r\n customProperties[\"duration\"] = maxDurationLimit;\r\n _this.appInsights.sendPageViewInternal(pageView, customProperties);\r\n _this._channel().forEach(function (queues) { queues.forEach(function (q) { return q.flush(true); }); });\r\n }\r\n }\r\n }\r\n catch (e) {\r\n _this._logger.throwInternal(applicationinsights_core_js_1.LoggingSeverity.CRITICAL, applicationinsights_core_js_1._InternalMessageId.TrackPVFailedCalc, \"trackPageView failed on page load calculation: \" + applicationinsights_common_1.Util.getExceptionName(e), { exception: applicationinsights_common_1.Util.dump(e) });\r\n }\r\n }), 100);\r\n };\r\n return PageViewManager;\r\n }());\r\n exports.PageViewManager = PageViewManager;\r\n});\r\n//# sourceMappingURL=PageViewManager.js.map","define([\"require\", \"exports\", \"./JavaScriptSDK/ApplicationInsights\"], function (require, exports, ApplicationInsights_1) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n exports.ApplicationInsights = ApplicationInsights_1.ApplicationInsights;\r\n});\r\n//# sourceMappingURL=applicationinsights-analytics-js.js.map","var __extends = (this && this.__extends) || (function () {\r\n var extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return function (d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\ndefine([\"require\", \"exports\", \"applicationinsights-common\", \"applicationinsights-core-js\"], function (require, exports, applicationinsights_common_1, applicationinsights_core_js_1) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n exports.ContextTagKeys = [\r\n \"ai.application.ver\",\r\n \"ai.application.build\",\r\n \"ai.application.typeId\",\r\n \"ai.application.applicationId\",\r\n \"ai.application.layer\",\r\n \"ai.device.id\",\r\n \"ai.device.ip\",\r\n \"ai.device.language\",\r\n \"ai.device.locale\",\r\n \"ai.device.model\",\r\n \"ai.device.friendlyName\",\r\n \"ai.device.network\",\r\n \"ai.device.networkName\",\r\n \"ai.device.oemName\",\r\n \"ai.device.os\",\r\n \"ai.device.osVersion\",\r\n \"ai.device.roleInstance\",\r\n \"ai.device.roleName\",\r\n \"ai.device.screenResolution\",\r\n \"ai.device.type\",\r\n \"ai.device.machineName\",\r\n \"ai.device.vmName\",\r\n \"ai.device.browser\",\r\n \"ai.device.browserVersion\",\r\n \"ai.location.ip\",\r\n \"ai.location.country\",\r\n \"ai.location.province\",\r\n \"ai.location.city\",\r\n \"ai.operation.id\",\r\n \"ai.operation.name\",\r\n \"ai.operation.parentId\",\r\n \"ai.operation.rootId\",\r\n \"ai.operation.syntheticSource\",\r\n \"ai.operation.correlationVector\",\r\n \"ai.session.id\",\r\n \"ai.session.isFirst\",\r\n \"ai.session.isNew\",\r\n \"ai.user.accountAcquisitionDate\",\r\n \"ai.user.accountId\",\r\n \"ai.user.userAgent\",\r\n \"ai.user.id\",\r\n \"ai.user.storeRegion\",\r\n \"ai.user.authUserId\",\r\n \"ai.user.anonUserAcquisitionDate\",\r\n \"ai.user.authUserAcquisitionDate\",\r\n \"ai.cloud.name\",\r\n \"ai.cloud.role\",\r\n \"ai.cloud.roleVer\",\r\n \"ai.cloud.roleInstance\",\r\n \"ai.cloud.environment\",\r\n \"ai.cloud.location\",\r\n \"ai.cloud.deploymentUnit\",\r\n \"ai.internal.sdkVersion\",\r\n \"ai.internal.agentVersion\",\r\n \"ai.internal.nodeName\",\r\n ];\r\n // these two constants are used to filter out properties not needed when trying to extract custom properties and measurements from the incoming payload\r\n var baseType = \"baseType\";\r\n var baseData = \"baseData\";\r\n var EnvelopeCreator = /** @class */ (function () {\r\n function EnvelopeCreator() {\r\n }\r\n EnvelopeCreator.extractProperties = function (data) {\r\n var customProperties = null;\r\n for (var key in data) {\r\n if (data.hasOwnProperty(key)) {\r\n var value = data[key];\r\n if (typeof value !== \"number\") {\r\n if (!customProperties) {\r\n customProperties = {};\r\n }\r\n customProperties[key] = value;\r\n }\r\n }\r\n }\r\n return customProperties;\r\n };\r\n EnvelopeCreator.extractPropsAndMeasurements = function (data, properties, measurements) {\r\n if (!applicationinsights_core_js_1.CoreUtils.isNullOrUndefined(data)) {\r\n for (var key in data) {\r\n if (data.hasOwnProperty(key)) {\r\n var value = data[key];\r\n if (typeof value === \"number\") {\r\n measurements[key] = value;\r\n }\r\n else {\r\n properties[key] = value;\r\n }\r\n }\r\n }\r\n }\r\n };\r\n // TODO: Do we want this to take logger as arg or use this._logger as nonstatic?\r\n EnvelopeCreator.createEnvelope = function (logger, envelopeType, telemetryItem, data) {\r\n var envelope = new applicationinsights_common_1.Envelope(logger, data, envelopeType);\r\n envelope.iKey = telemetryItem.instrumentationKey;\r\n var iKeyNoDashes = telemetryItem.instrumentationKey.replace(/-/g, \"\");\r\n envelope.name = envelope.name.replace(\"{0}\", iKeyNoDashes);\r\n // loop through the envelope ctx (Part A) and pick out the ones that should go in outgoing envelope tags\r\n for (var key in telemetryItem.ctx) {\r\n if (telemetryItem.ctx.hasOwnProperty(key)) {\r\n if (exports.ContextTagKeys.indexOf(key) >= 0) {\r\n envelope.tags[key] = telemetryItem.ctx[key];\r\n }\r\n }\r\n }\r\n // loop through the envelope tags (extension of Part A) and pick out the ones that should go in outgoing envelope tags\r\n telemetryItem.tags.forEach(function (tag) {\r\n for (var key in tag) {\r\n if (tag.hasOwnProperty(key)) {\r\n if (exports.ContextTagKeys.indexOf(key) >= 0) {\r\n envelope.tags[key] = tag[key];\r\n }\r\n }\r\n }\r\n });\r\n return envelope;\r\n };\r\n return EnvelopeCreator;\r\n }());\r\n exports.EnvelopeCreator = EnvelopeCreator;\r\n var DependencyEnvelopeCreator = /** @class */ (function (_super) {\r\n __extends(DependencyEnvelopeCreator, _super);\r\n function DependencyEnvelopeCreator() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n DependencyEnvelopeCreator.prototype.Create = function (logger, telemetryItem) {\r\n this._logger = logger;\r\n if (applicationinsights_core_js_1.CoreUtils.isNullOrUndefined(telemetryItem.baseData)) {\r\n this._logger.throwInternal(applicationinsights_core_js_1.LoggingSeverity.CRITICAL, applicationinsights_core_js_1._InternalMessageId.TelemetryEnvelopeInvalid, \"telemetryItem.baseData cannot be null.\");\r\n }\r\n var customMeasurements = {};\r\n var customProperties = {};\r\n EnvelopeCreator.extractPropsAndMeasurements(telemetryItem.data, customProperties, customMeasurements);\r\n var bd = telemetryItem.baseData;\r\n if (applicationinsights_core_js_1.CoreUtils.isNullOrUndefined(bd)) {\r\n logger.warnToConsole(\"Invalid input for dependency data\");\r\n return null;\r\n }\r\n var id = bd.id;\r\n var absoluteUrl = bd.absoluteUrl;\r\n var command = bd.commandName;\r\n var duration = bd.duration;\r\n var success = bd.success;\r\n var resultCode = bd.resultCode;\r\n var method = bd.method;\r\n var baseData = new applicationinsights_common_1.RemoteDependencyData(logger, id, absoluteUrl, command, duration, success, resultCode, method, customProperties, customMeasurements);\r\n var data = new applicationinsights_common_1.Data(applicationinsights_common_1.RemoteDependencyData.dataType, baseData);\r\n return EnvelopeCreator.createEnvelope(logger, applicationinsights_common_1.RemoteDependencyData.envelopeType, telemetryItem, data);\r\n };\r\n DependencyEnvelopeCreator.DependencyEnvelopeCreator = new DependencyEnvelopeCreator();\r\n return DependencyEnvelopeCreator;\r\n }(EnvelopeCreator));\r\n exports.DependencyEnvelopeCreator = DependencyEnvelopeCreator;\r\n var EventEnvelopeCreator = /** @class */ (function (_super) {\r\n __extends(EventEnvelopeCreator, _super);\r\n function EventEnvelopeCreator() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n EventEnvelopeCreator.prototype.Create = function (logger, telemetryItem) {\r\n this._logger = logger;\r\n if (applicationinsights_core_js_1.CoreUtils.isNullOrUndefined(telemetryItem.baseData)) {\r\n this._logger.throwInternal(applicationinsights_core_js_1.LoggingSeverity.CRITICAL, applicationinsights_core_js_1._InternalMessageId.TelemetryEnvelopeInvalid, \"telemetryItem.baseData cannot be null.\");\r\n }\r\n var customProperties = {};\r\n var customMeasurements = {};\r\n if (telemetryItem.baseType !== applicationinsights_common_1.Event.dataType) {\r\n EnvelopeCreator.extractPropsAndMeasurements(telemetryItem.baseData, customProperties, customMeasurements);\r\n }\r\n EnvelopeCreator.extractPropsAndMeasurements(telemetryItem.data, customProperties, customMeasurements);\r\n var eventName = telemetryItem.baseData.name;\r\n var baseData = new applicationinsights_common_1.Event(logger, eventName, customProperties, customMeasurements);\r\n var data = new applicationinsights_common_1.Data(applicationinsights_common_1.Event.dataType, baseData);\r\n return EnvelopeCreator.createEnvelope(logger, applicationinsights_common_1.Event.envelopeType, telemetryItem, data);\r\n };\r\n EventEnvelopeCreator.EventEnvelopeCreator = new EventEnvelopeCreator();\r\n return EventEnvelopeCreator;\r\n }(EnvelopeCreator));\r\n exports.EventEnvelopeCreator = EventEnvelopeCreator;\r\n var ExceptionEnvelopeCreator = /** @class */ (function (_super) {\r\n __extends(ExceptionEnvelopeCreator, _super);\r\n function ExceptionEnvelopeCreator() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n ExceptionEnvelopeCreator.prototype.Create = function (logger, telemetryItem) {\r\n this._logger = logger;\r\n if (applicationinsights_core_js_1.CoreUtils.isNullOrUndefined(telemetryItem.baseData)) {\r\n this._logger.throwInternal(applicationinsights_core_js_1.LoggingSeverity.CRITICAL, applicationinsights_core_js_1._InternalMessageId.TelemetryEnvelopeInvalid, \"telemetryItem.baseData cannot be null.\");\r\n }\r\n var customProperties = {};\r\n var customMeasurements = {};\r\n EnvelopeCreator.extractPropsAndMeasurements(telemetryItem.data, customProperties, customMeasurements);\r\n var exception = telemetryItem.baseData.error;\r\n var severityLevel = telemetryItem.baseData.severityLevel;\r\n var baseData = new applicationinsights_common_1.Exception(logger, exception, customProperties, customMeasurements, severityLevel);\r\n var data = new applicationinsights_common_1.Data(applicationinsights_common_1.Exception.dataType, baseData);\r\n return EnvelopeCreator.createEnvelope(logger, applicationinsights_common_1.Exception.envelopeType, telemetryItem, data);\r\n };\r\n ExceptionEnvelopeCreator.ExceptionEnvelopeCreator = new ExceptionEnvelopeCreator();\r\n return ExceptionEnvelopeCreator;\r\n }(EnvelopeCreator));\r\n exports.ExceptionEnvelopeCreator = ExceptionEnvelopeCreator;\r\n var MetricEnvelopeCreator = /** @class */ (function (_super) {\r\n __extends(MetricEnvelopeCreator, _super);\r\n function MetricEnvelopeCreator() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n MetricEnvelopeCreator.prototype.Create = function (logger, telemetryItem) {\r\n this._logger = logger;\r\n if (applicationinsights_core_js_1.CoreUtils.isNullOrUndefined(telemetryItem.baseData)) {\r\n this._logger.throwInternal(applicationinsights_core_js_1.LoggingSeverity.CRITICAL, applicationinsights_core_js_1._InternalMessageId.TelemetryEnvelopeInvalid, \"telemetryItem.baseData cannot be null.\");\r\n }\r\n var customProperties = EnvelopeCreator.extractProperties(telemetryItem.data);\r\n var name = telemetryItem.baseData.name;\r\n var average = telemetryItem.baseData.average;\r\n var sampleCount = telemetryItem.baseData.sampleCount;\r\n var min = telemetryItem.baseData.min;\r\n var max = telemetryItem.baseData.max;\r\n var baseData = new applicationinsights_common_1.Metric(logger, name, average, sampleCount, min, max, customProperties);\r\n var data = new applicationinsights_common_1.Data(applicationinsights_common_1.Metric.dataType, baseData);\r\n return EnvelopeCreator.createEnvelope(logger, applicationinsights_common_1.Metric.envelopeType, telemetryItem, data);\r\n };\r\n MetricEnvelopeCreator.MetricEnvelopeCreator = new MetricEnvelopeCreator();\r\n return MetricEnvelopeCreator;\r\n }(EnvelopeCreator));\r\n exports.MetricEnvelopeCreator = MetricEnvelopeCreator;\r\n var PageViewEnvelopeCreator = /** @class */ (function (_super) {\r\n __extends(PageViewEnvelopeCreator, _super);\r\n function PageViewEnvelopeCreator() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n PageViewEnvelopeCreator.prototype.Create = function (logger, telemetryItem) {\r\n this._logger = logger;\r\n if (applicationinsights_core_js_1.CoreUtils.isNullOrUndefined(telemetryItem.baseData)) {\r\n this._logger.throwInternal(applicationinsights_core_js_1.LoggingSeverity.CRITICAL, applicationinsights_core_js_1._InternalMessageId.TelemetryEnvelopeInvalid, \"telemetryItem.baseData cannot be null.\");\r\n }\r\n // Since duration is not part of the domain properties in Common Schema, extract it from part C \r\n var duration = undefined;\r\n if (!applicationinsights_core_js_1.CoreUtils.isNullOrUndefined(telemetryItem.data) &&\r\n !applicationinsights_core_js_1.CoreUtils.isNullOrUndefined(telemetryItem.data.duration)) {\r\n duration = telemetryItem.data.duration;\r\n delete telemetryItem.data.duration;\r\n }\r\n var customProperties = {};\r\n var customMeasurements = {};\r\n EnvelopeCreator.extractPropsAndMeasurements(telemetryItem.data, customProperties, customMeasurements);\r\n var name = telemetryItem.baseData.name;\r\n var url = telemetryItem.baseData.uri;\r\n // Todo: move IPageViewTelemetry to common as we are missing type checks on baseData here\r\n // refUri is a field that Breeze still does not recognize as part of Part B. For now, put it in Part C until it supports it as a domain property\r\n if (!applicationinsights_core_js_1.CoreUtils.isNullOrUndefined(telemetryItem.baseData.refUri)) {\r\n customProperties[\"refUri\"] = telemetryItem.baseData.refUri;\r\n }\r\n // pageType is a field that Breeze still does not recognize as part of Part B. For now, put it in Part C until it supports it as a domain property\r\n if (!applicationinsights_core_js_1.CoreUtils.isNullOrUndefined(telemetryItem.baseData.pageType)) {\r\n customProperties[\"pageType\"] = telemetryItem.baseData.pageType;\r\n }\r\n // isLoggedIn is a field that Breeze still does not recognize as part of Part B. For now, put it in Part C until it supports it as a domain property\r\n if (!applicationinsights_core_js_1.CoreUtils.isNullOrUndefined(telemetryItem.baseData.isLoggedIn)) {\r\n customProperties[\"isLoggedIn\"] = telemetryItem.baseData.isLoggedIn;\r\n }\r\n // pageTags is a field that Breeze still does not recognize as part of Part B. For now, put it in Part C until it supports it as a domain property\r\n if (!applicationinsights_core_js_1.CoreUtils.isNullOrUndefined(telemetryItem.baseData.pageTags)) {\r\n var pageTags = telemetryItem.baseData.pageTags;\r\n for (var key in pageTags) {\r\n if (pageTags.hasOwnProperty(key)) {\r\n customProperties[key] = pageTags[key];\r\n }\r\n }\r\n }\r\n var baseData = new applicationinsights_common_1.PageView(logger, name, url, duration, customProperties, customMeasurements);\r\n var data = new applicationinsights_common_1.Data(applicationinsights_common_1.PageView.dataType, baseData);\r\n return EnvelopeCreator.createEnvelope(logger, applicationinsights_common_1.PageView.envelopeType, telemetryItem, data);\r\n };\r\n PageViewEnvelopeCreator.PageViewEnvelopeCreator = new PageViewEnvelopeCreator();\r\n return PageViewEnvelopeCreator;\r\n }(EnvelopeCreator));\r\n exports.PageViewEnvelopeCreator = PageViewEnvelopeCreator;\r\n var PageViewPerformanceEnvelopeCreator = /** @class */ (function (_super) {\r\n __extends(PageViewPerformanceEnvelopeCreator, _super);\r\n function PageViewPerformanceEnvelopeCreator() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n PageViewPerformanceEnvelopeCreator.prototype.Create = function (logger, telemetryItem) {\r\n this._logger = logger;\r\n if (applicationinsights_core_js_1.CoreUtils.isNullOrUndefined(telemetryItem.baseData)) {\r\n this._logger.throwInternal(applicationinsights_core_js_1.LoggingSeverity.CRITICAL, applicationinsights_core_js_1._InternalMessageId.TelemetryEnvelopeInvalid, \"telemetryItem.baseData cannot be null.\");\r\n }\r\n var customProperties = {};\r\n var customMeasurements = {};\r\n EnvelopeCreator.extractPropsAndMeasurements(telemetryItem.data, customProperties, customMeasurements);\r\n var name = telemetryItem.baseData.name;\r\n var url = telemetryItem.baseData.uri;\r\n var duration = telemetryItem.baseData.duration;\r\n var baseData = new applicationinsights_common_1.PageViewPerformance(logger, name, url, duration, customProperties, customMeasurements);\r\n var data = new applicationinsights_common_1.Data(applicationinsights_common_1.PageViewPerformance.dataType, baseData);\r\n return EnvelopeCreator.createEnvelope(logger, applicationinsights_common_1.PageViewPerformance.envelopeType, telemetryItem, data);\r\n };\r\n PageViewPerformanceEnvelopeCreator.PageViewPerformanceEnvelopeCreator = new PageViewPerformanceEnvelopeCreator();\r\n return PageViewPerformanceEnvelopeCreator;\r\n }(EnvelopeCreator));\r\n exports.PageViewPerformanceEnvelopeCreator = PageViewPerformanceEnvelopeCreator;\r\n var TraceEnvelopeCreator = /** @class */ (function (_super) {\r\n __extends(TraceEnvelopeCreator, _super);\r\n function TraceEnvelopeCreator() {\r\n return _super !== null && _super.apply(this, arguments) || this;\r\n }\r\n TraceEnvelopeCreator.prototype.Create = function (logger, telemetryItem) {\r\n this._logger = logger;\r\n if (applicationinsights_core_js_1.CoreUtils.isNullOrUndefined(telemetryItem.baseData)) {\r\n this._logger.throwInternal(applicationinsights_core_js_1.LoggingSeverity.CRITICAL, applicationinsights_core_js_1._InternalMessageId.TelemetryEnvelopeInvalid, \"telemetryItem.baseData cannot be null.\");\r\n }\r\n var message = telemetryItem.baseData.message;\r\n var severityLevel = telemetryItem.baseData.severityLevel;\r\n var customProperties = EnvelopeCreator.extractProperties(telemetryItem.data);\r\n var baseData = new applicationinsights_common_1.Trace(logger, message, customProperties, severityLevel);\r\n var data = new applicationinsights_common_1.Data(applicationinsights_common_1.Trace.dataType, baseData);\r\n return EnvelopeCreator.createEnvelope(logger, applicationinsights_common_1.Trace.envelopeType, telemetryItem, data);\r\n };\r\n TraceEnvelopeCreator.TraceEnvelopeCreator = new TraceEnvelopeCreator();\r\n return TraceEnvelopeCreator;\r\n }(EnvelopeCreator));\r\n exports.TraceEnvelopeCreator = TraceEnvelopeCreator;\r\n});\r\n//# sourceMappingURL=EnvelopeCreator.js.map","define([\"require\", \"exports\", \"applicationinsights-common\", \"applicationinsights-core-js\"], function (require, exports, applicationinsights_common_1, applicationinsights_core_js_1) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n /*\r\n * An array based send buffer.\r\n */\r\n var ArraySendBuffer = /** @class */ (function () {\r\n function ArraySendBuffer(config) {\r\n this._config = config;\r\n this._buffer = [];\r\n }\r\n ArraySendBuffer.prototype.enqueue = function (payload) {\r\n this._buffer.push(payload);\r\n };\r\n ArraySendBuffer.prototype.count = function () {\r\n return this._buffer.length;\r\n };\r\n ArraySendBuffer.prototype.clear = function () {\r\n this._buffer.length = 0;\r\n };\r\n ArraySendBuffer.prototype.getItems = function () {\r\n return this._buffer.slice(0);\r\n };\r\n ArraySendBuffer.prototype.batchPayloads = function (payload) {\r\n if (payload && payload.length > 0) {\r\n var batch = this._config.emitLineDelimitedJson() ?\r\n payload.join(\"\\n\") :\r\n \"[\" + payload.join(\",\") + \"]\";\r\n return batch;\r\n }\r\n return null;\r\n };\r\n ArraySendBuffer.prototype.markAsSent = function (payload) {\r\n this.clear();\r\n };\r\n ArraySendBuffer.prototype.clearSent = function (payload) {\r\n // not supported\r\n };\r\n return ArraySendBuffer;\r\n }());\r\n exports.ArraySendBuffer = ArraySendBuffer;\r\n /*\r\n * Session storege buffer holds a copy of all unsent items in the browser session storage.\r\n */\r\n var SessionStorageSendBuffer = /** @class */ (function () {\r\n function SessionStorageSendBuffer(logger, config) {\r\n this._bufferFullMessageSent = false;\r\n this._logger = logger;\r\n this._config = config;\r\n var bufferItems = this.getBuffer(SessionStorageSendBuffer.BUFFER_KEY);\r\n var notDeliveredItems = this.getBuffer(SessionStorageSendBuffer.SENT_BUFFER_KEY);\r\n this._buffer = bufferItems.concat(notDeliveredItems);\r\n // If the buffer has too many items, drop items from the end.\r\n if (this._buffer.length > SessionStorageSendBuffer.MAX_BUFFER_SIZE) {\r\n this._buffer.length = SessionStorageSendBuffer.MAX_BUFFER_SIZE;\r\n }\r\n // update DataLossAnalyzer with the number of recovered items\r\n // Uncomment if you want to use DataLossanalyzer\r\n // DataLossAnalyzer.itemsRestoredFromSessionBuffer = this._buffer.length;\r\n this.setBuffer(SessionStorageSendBuffer.SENT_BUFFER_KEY, []);\r\n this.setBuffer(SessionStorageSendBuffer.BUFFER_KEY, this._buffer);\r\n }\r\n SessionStorageSendBuffer.prototype.enqueue = function (payload) {\r\n if (this._buffer.length >= SessionStorageSendBuffer.MAX_BUFFER_SIZE) {\r\n // sent internal log only once per page view\r\n if (!this._bufferFullMessageSent) {\r\n this._logger.throwInternal(applicationinsights_core_js_1.LoggingSeverity.WARNING, applicationinsights_core_js_1._InternalMessageId.SessionStorageBufferFull, \"Maximum buffer size reached: \" + this._buffer.length, true);\r\n this._bufferFullMessageSent = true;\r\n }\r\n return;\r\n }\r\n this._buffer.push(payload);\r\n this.setBuffer(SessionStorageSendBuffer.BUFFER_KEY, this._buffer);\r\n };\r\n SessionStorageSendBuffer.prototype.count = function () {\r\n return this._buffer.length;\r\n };\r\n SessionStorageSendBuffer.prototype.clear = function () {\r\n this._buffer.length = 0;\r\n this.setBuffer(SessionStorageSendBuffer.BUFFER_KEY, []);\r\n this.setBuffer(SessionStorageSendBuffer.SENT_BUFFER_KEY, []);\r\n this._bufferFullMessageSent = false;\r\n };\r\n SessionStorageSendBuffer.prototype.getItems = function () {\r\n return this._buffer.slice(0);\r\n };\r\n SessionStorageSendBuffer.prototype.batchPayloads = function (payload) {\r\n if (payload && payload.length > 0) {\r\n var batch = this._config.emitLineDelimitedJson() ?\r\n payload.join(\"\\n\") :\r\n \"[\" + payload.join(\",\") + \"]\";\r\n return batch;\r\n }\r\n return null;\r\n };\r\n SessionStorageSendBuffer.prototype.markAsSent = function (payload) {\r\n this._buffer = this.removePayloadsFromBuffer(payload, this._buffer);\r\n this.setBuffer(SessionStorageSendBuffer.BUFFER_KEY, this._buffer);\r\n var sentElements = this.getBuffer(SessionStorageSendBuffer.SENT_BUFFER_KEY);\r\n if (sentElements instanceof Array && payload instanceof Array) {\r\n sentElements = sentElements.concat(payload);\r\n if (sentElements.length > SessionStorageSendBuffer.MAX_BUFFER_SIZE) {\r\n // We send telemetry normally. If the SENT_BUFFER is too big we don't add new elements\r\n // until we receive a response from the backend and the buffer has free space again (see clearSent method)\r\n this._logger.throwInternal(applicationinsights_core_js_1.LoggingSeverity.CRITICAL, applicationinsights_core_js_1._InternalMessageId.SessionStorageBufferFull, \"Sent buffer reached its maximum size: \" + sentElements.length, true);\r\n sentElements.length = SessionStorageSendBuffer.MAX_BUFFER_SIZE;\r\n }\r\n this.setBuffer(SessionStorageSendBuffer.SENT_BUFFER_KEY, sentElements);\r\n }\r\n };\r\n SessionStorageSendBuffer.prototype.clearSent = function (payload) {\r\n var sentElements = this.getBuffer(SessionStorageSendBuffer.SENT_BUFFER_KEY);\r\n sentElements = this.removePayloadsFromBuffer(payload, sentElements);\r\n this.setBuffer(SessionStorageSendBuffer.SENT_BUFFER_KEY, sentElements);\r\n };\r\n SessionStorageSendBuffer.prototype.removePayloadsFromBuffer = function (payloads, buffer) {\r\n var remaining = [];\r\n for (var i in buffer) {\r\n var contains = false;\r\n for (var j in payloads) {\r\n if (payloads[j] === buffer[i]) {\r\n contains = true;\r\n break;\r\n }\r\n }\r\n if (!contains) {\r\n remaining.push(buffer[i]);\r\n }\r\n }\r\n ;\r\n return remaining;\r\n };\r\n SessionStorageSendBuffer.prototype.getBuffer = function (key) {\r\n try {\r\n var bufferJson = applicationinsights_common_1.Util.getSessionStorage(this._logger, key);\r\n if (bufferJson) {\r\n var buffer = JSON.parse(bufferJson);\r\n if (buffer) {\r\n return buffer;\r\n }\r\n }\r\n }\r\n catch (e) {\r\n this._logger.throwInternal(applicationinsights_core_js_1.LoggingSeverity.CRITICAL, applicationinsights_core_js_1._InternalMessageId.FailedToRestoreStorageBuffer, \" storage key: \" + key + \", \" + applicationinsights_common_1.Util.getExceptionName(e), { exception: applicationinsights_common_1.Util.dump(e) });\r\n }\r\n return [];\r\n };\r\n SessionStorageSendBuffer.prototype.setBuffer = function (key, buffer) {\r\n try {\r\n var bufferJson = JSON.stringify(buffer);\r\n applicationinsights_common_1.Util.setSessionStorage(this._logger, key, bufferJson);\r\n }\r\n catch (e) {\r\n // if there was an error, clear the buffer\r\n // telemetry is stored in the _buffer array so we won't loose any items\r\n applicationinsights_common_1.Util.setSessionStorage(this._logger, key, JSON.stringify([]));\r\n this._logger.throwInternal(applicationinsights_core_js_1.LoggingSeverity.WARNING, applicationinsights_core_js_1._InternalMessageId.FailedToSetStorageBuffer, \" storage key: \" + key + \", \" + applicationinsights_common_1.Util.getExceptionName(e) + \". Buffer cleared\", { exception: applicationinsights_common_1.Util.dump(e) });\r\n }\r\n };\r\n SessionStorageSendBuffer.BUFFER_KEY = \"AI_buffer\";\r\n SessionStorageSendBuffer.SENT_BUFFER_KEY = \"AI_sentBuffer\";\r\n // Maximum number of payloads stored in the buffer. If the buffer is full, new elements will be dropped. \r\n SessionStorageSendBuffer.MAX_BUFFER_SIZE = 2000;\r\n return SessionStorageSendBuffer;\r\n }());\r\n exports.SessionStorageSendBuffer = SessionStorageSendBuffer;\r\n});\r\n//# sourceMappingURL=SendBuffer.js.map","define([\"require\", \"exports\", \"./SendBuffer\", \"./EnvelopeCreator\", \"./TelemetryValidation/EventValidator\", \"./TelemetryValidation/TraceValidator\", \"./TelemetryValidation/ExceptionValidator\", \"./TelemetryValidation/MetricValidator\", \"./TelemetryValidation/PageViewPerformanceValidator\", \"./TelemetryValidation/PageViewValidator\", \"./TelemetryValidation/RemoteDepdencyValidator\", \"./Serializer\", \"applicationinsights-common\", \"applicationinsights-core-js\", \"applicationinsights-core-js\"], function (require, exports, SendBuffer_1, EnvelopeCreator_1, EventValidator_1, TraceValidator_1, ExceptionValidator_1, MetricValidator_1, PageViewPerformanceValidator_1, PageViewValidator_1, RemoteDepdencyValidator_1, Serializer_1, applicationinsights_common_1, applicationinsights_core_js_1, applicationinsights_core_js_2) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n var Sender = /** @class */ (function () {\r\n function Sender() {\r\n this.priority = 201;\r\n /**\r\n * Whether XMLHttpRequest object is supported. Older version of IE (8,9) do not support it.\r\n */\r\n this._XMLHttpRequestSupported = false;\r\n }\r\n Sender.prototype.pause = function () {\r\n throw new Error(\"Method not implemented.\");\r\n };\r\n Sender.prototype.resume = function () {\r\n throw new Error(\"Method not implemented.\");\r\n };\r\n Sender.prototype.flush = function () {\r\n try {\r\n this.triggerSend();\r\n }\r\n catch (e) {\r\n this._logger.throwInternal(applicationinsights_core_js_1.LoggingSeverity.CRITICAL, applicationinsights_core_js_1._InternalMessageId.FlushFailed, \"flush failed, telemetry will not be collected: \" + applicationinsights_common_1.Util.getExceptionName(e), { exception: applicationinsights_common_1.Util.dump(e) });\r\n }\r\n };\r\n Sender.prototype.teardown = function () {\r\n throw new Error(\"Method not implemented.\");\r\n };\r\n Sender.prototype.initialize = function (config, core, extensions) {\r\n this.identifier = \"AppInsightsChannelPlugin\";\r\n this._logger = core.logger;\r\n this._serializer = new Serializer_1.Serializer(core.logger);\r\n this._consecutiveErrors = 0;\r\n this._retryAt = null;\r\n this._lastSend = 0;\r\n this._config = Sender._getDefaultAppInsightsChannelConfig(config, this.identifier);\r\n this._sender = null;\r\n this._buffer = (applicationinsights_common_1.Util.canUseSessionStorage() && this._config.enableSessionStorageBuffer)\r\n ? new SendBuffer_1.SessionStorageSendBuffer(this._logger, this._config) : new SendBuffer_1.ArraySendBuffer(this._config);\r\n if (!this._config.isBeaconApiDisabled() && applicationinsights_common_1.Util.IsBeaconApiSupported()) {\r\n this._sender = this._beaconSender;\r\n }\r\n else {\r\n if (typeof XMLHttpRequest != \"undefined\") {\r\n var testXhr = new XMLHttpRequest();\r\n if (\"withCredentials\" in testXhr) {\r\n this._sender = this._xhrSender;\r\n this._XMLHttpRequestSupported = true;\r\n }\r\n else if (typeof XDomainRequest !== \"undefined\") {\r\n this._sender = this._xdrSender; //IE 8 and 9\r\n }\r\n }\r\n }\r\n };\r\n Sender.prototype.processTelemetry = function (telemetryItem) {\r\n try {\r\n // if master off switch is set, don't send any data\r\n if (this._config.disableTelemetry()) {\r\n // Do not send/save data\r\n return;\r\n }\r\n // validate input\r\n if (!telemetryItem) {\r\n this._logger.throwInternal(applicationinsights_core_js_1.LoggingSeverity.CRITICAL, applicationinsights_core_js_1._InternalMessageId.CannotSendEmptyTelemetry, \"Cannot send empty telemetry\");\r\n return;\r\n }\r\n // ensure a sender was constructed\r\n if (!this._sender) {\r\n this._logger.throwInternal(applicationinsights_core_js_1.LoggingSeverity.CRITICAL, applicationinsights_core_js_1._InternalMessageId.SenderNotInitialized, \"Sender was not initialized\");\r\n return;\r\n }\r\n // first we need to validate that the envelope passed down is valid\r\n var isValid = Sender._validate(telemetryItem);\r\n if (!isValid) {\r\n this._logger.throwInternal(applicationinsights_core_js_1.LoggingSeverity.CRITICAL, applicationinsights_core_js_1._InternalMessageId.TelemetryEnvelopeInvalid, \"Invalid telemetry envelope\");\r\n return;\r\n }\r\n // construct an envelope that Application Insights endpoint can understand\r\n var aiEnvelope = this._constructEnvelope(telemetryItem);\r\n if (!aiEnvelope) {\r\n this._logger.throwInternal(applicationinsights_core_js_1.LoggingSeverity.CRITICAL, applicationinsights_core_js_1._InternalMessageId.CreateEnvelopeError, \"Unable to create an AppInsights envelope\");\r\n return;\r\n }\r\n // check if the incoming payload is too large, truncate if necessary\r\n var payload = this._serializer.serialize(aiEnvelope);\r\n // flush if we would exceed the max-size limit by adding this item\r\n var bufferPayload = this._buffer.getItems();\r\n var batch = this._buffer.batchPayloads(bufferPayload);\r\n if (batch && (batch.length + payload.length > this._config.maxBatchSizeInBytes())) {\r\n this.triggerSend();\r\n }\r\n // enqueue the payload\r\n this._buffer.enqueue(payload);\r\n // ensure an invocation timeout is set\r\n this._setupTimer();\r\n }\r\n catch (e) {\r\n this._logger.throwInternal(applicationinsights_core_js_1.LoggingSeverity.WARNING, applicationinsights_core_js_1._InternalMessageId.FailedAddingTelemetryToBuffer, \"Failed adding telemetry to the sender's buffer, some telemetry will be lost: \" + applicationinsights_common_1.Util.getExceptionName(e), { exception: applicationinsights_common_1.Util.dump(e) });\r\n }\r\n // hand off the telemetry item to the next plugin\r\n if (!applicationinsights_core_js_2.CoreUtils.isNullOrUndefined(this._nextPlugin)) {\r\n this._nextPlugin.processTelemetry(telemetryItem);\r\n }\r\n };\r\n Sender.prototype.setNextPlugin = function (next) {\r\n this._nextPlugin = next;\r\n };\r\n /**\r\n * xhr state changes\r\n */\r\n Sender.prototype._xhrReadyStateChange = function (xhr, payload, countOfItemsInPayload) {\r\n if (xhr.readyState === 4) {\r\n var response = null;\r\n if (!this._appId) {\r\n response = this._parseResponse(xhr.responseText || xhr.response);\r\n if (response && response.appId) {\r\n this._appId = response.appId;\r\n }\r\n }\r\n if ((xhr.status < 200 || xhr.status >= 300) && xhr.status !== 0) {\r\n if (!this._config.isRetryDisabled() && this._isRetriable(xhr.status)) {\r\n this._resendPayload(payload);\r\n this._logger.throwInternal(applicationinsights_core_js_1.LoggingSeverity.WARNING, applicationinsights_core_js_1._InternalMessageId.TransmissionFailed, \". \" +\r\n \"Response code \" + xhr.status + \". Will retry to send \" + payload.length + \" items.\");\r\n }\r\n else {\r\n this._onError(payload, this._formatErrorMessageXhr(xhr));\r\n }\r\n }\r\n else {\r\n if (xhr.status === 206) {\r\n if (!response) {\r\n response = this._parseResponse(xhr.responseText || xhr.response);\r\n }\r\n if (response && !this._config.isRetryDisabled()) {\r\n this._onPartialSuccess(payload, response);\r\n }\r\n else {\r\n this._onError(payload, this._formatErrorMessageXhr(xhr));\r\n }\r\n }\r\n else {\r\n this._consecutiveErrors = 0;\r\n this._onSuccess(payload, countOfItemsInPayload);\r\n }\r\n }\r\n }\r\n };\r\n /**\r\n * Immediately send buffered data\r\n * @param async {boolean} - Indicates if the events should be sent asynchronously\r\n */\r\n Sender.prototype.triggerSend = function (async) {\r\n if (async === void 0) { async = true; }\r\n try {\r\n // Send data only if disableTelemetry is false\r\n if (!this._config.disableTelemetry()) {\r\n if (this._buffer.count() > 0) {\r\n var payload = this._buffer.getItems();\r\n // invoke send\r\n this._sender(payload, async);\r\n }\r\n // update lastSend time to enable throttling\r\n this._lastSend = +new Date;\r\n }\r\n else {\r\n this._buffer.clear();\r\n }\r\n clearTimeout(this._timeoutHandle);\r\n this._timeoutHandle = null;\r\n this._retryAt = null;\r\n }\r\n catch (e) {\r\n /* Ignore this error for IE under v10 */\r\n if (!applicationinsights_common_1.Util.getIEVersion() || applicationinsights_common_1.Util.getIEVersion() > 9) {\r\n this._logger.throwInternal(applicationinsights_core_js_1.LoggingSeverity.CRITICAL, applicationinsights_core_js_1._InternalMessageId.TransmissionFailed, \"Telemetry transmission failed, some telemetry will be lost: \" + applicationinsights_common_1.Util.getExceptionName(e), { exception: applicationinsights_common_1.Util.dump(e) });\r\n }\r\n }\r\n };\r\n /**\r\n * error handler\r\n */\r\n Sender.prototype._onError = function (payload, message, event) {\r\n this._logger.throwInternal(applicationinsights_core_js_1.LoggingSeverity.WARNING, applicationinsights_core_js_1._InternalMessageId.OnError, \"Failed to send telemetry.\", { message: message });\r\n this._buffer.clearSent(payload);\r\n };\r\n /**\r\n * partial success handler\r\n */\r\n Sender.prototype._onPartialSuccess = function (payload, results) {\r\n var failed = [];\r\n var retry = [];\r\n // Iterate through the reversed array of errors so that splicing doesn't have invalid indexes after the first item.\r\n var errors = results.errors.reverse();\r\n for (var _i = 0, errors_1 = errors; _i < errors_1.length; _i++) {\r\n var error = errors_1[_i];\r\n var extracted = payload.splice(error.index, 1)[0];\r\n if (this._isRetriable(error.statusCode)) {\r\n retry.push(extracted);\r\n }\r\n else {\r\n // All other errors, including: 402 (Monthly quota exceeded) and 439 (Too many requests and refresh cache).\r\n failed.push(extracted);\r\n }\r\n }\r\n if (payload.length > 0) {\r\n this._onSuccess(payload, results.itemsAccepted);\r\n }\r\n if (failed.length > 0) {\r\n this._onError(failed, this._formatErrorMessageXhr(null, ['partial success', results.itemsAccepted, 'of', results.itemsReceived].join(' ')));\r\n }\r\n if (retry.length > 0) {\r\n this._resendPayload(retry);\r\n this._logger.throwInternal(applicationinsights_core_js_1.LoggingSeverity.WARNING, applicationinsights_core_js_1._InternalMessageId.TransmissionFailed, \"Partial success. \" +\r\n \"Delivered: \" + payload.length + \", Failed: \" + failed.length +\r\n \". Will retry to send \" + retry.length + \" our of \" + results.itemsReceived + \" items\");\r\n }\r\n };\r\n /**\r\n * success handler\r\n */\r\n Sender.prototype._onSuccess = function (payload, countOfItemsInPayload) {\r\n this._buffer.clearSent(payload);\r\n };\r\n /**\r\n * xdr state changes\r\n */\r\n Sender.prototype._xdrOnLoad = function (xdr, payload) {\r\n if (xdr && (xdr.responseText + \"\" === \"200\" || xdr.responseText === \"\")) {\r\n this._consecutiveErrors = 0;\r\n this._onSuccess(payload, 0);\r\n }\r\n else {\r\n var results = this._parseResponse(xdr.responseText);\r\n if (results && results.itemsReceived && results.itemsReceived > results.itemsAccepted\r\n && !this._config.isRetryDisabled()) {\r\n this._onPartialSuccess(payload, results);\r\n }\r\n else {\r\n this._onError(payload, this._formatErrorMessageXdr(xdr));\r\n }\r\n }\r\n };\r\n Sender.prototype._constructEnvelope = function (envelope) {\r\n switch (envelope.baseType) {\r\n case applicationinsights_common_1.Event.dataType:\r\n return EnvelopeCreator_1.EventEnvelopeCreator.EventEnvelopeCreator.Create(this._logger, envelope);\r\n case applicationinsights_common_1.Trace.dataType:\r\n return EnvelopeCreator_1.TraceEnvelopeCreator.TraceEnvelopeCreator.Create(this._logger, envelope);\r\n case applicationinsights_common_1.PageView.dataType:\r\n return EnvelopeCreator_1.PageViewEnvelopeCreator.PageViewEnvelopeCreator.Create(this._logger, envelope);\r\n case applicationinsights_common_1.PageViewPerformance.dataType:\r\n return EnvelopeCreator_1.PageViewPerformanceEnvelopeCreator.PageViewPerformanceEnvelopeCreator.Create(this._logger, envelope);\r\n case applicationinsights_common_1.Exception.dataType:\r\n return EnvelopeCreator_1.ExceptionEnvelopeCreator.ExceptionEnvelopeCreator.Create(this._logger, envelope);\r\n case applicationinsights_common_1.Metric.dataType:\r\n return EnvelopeCreator_1.MetricEnvelopeCreator.MetricEnvelopeCreator.Create(this._logger, envelope);\r\n case applicationinsights_common_1.RemoteDependencyData.dataType:\r\n return EnvelopeCreator_1.DependencyEnvelopeCreator.DependencyEnvelopeCreator.Create(this._logger, envelope);\r\n default:\r\n // default create custom event type\r\n return EnvelopeCreator_1.EventEnvelopeCreator.EventEnvelopeCreator.Create(this._logger, envelope);\r\n }\r\n };\r\n Sender._getDefaultAppInsightsChannelConfig = function (config, identifier) {\r\n var resultConfig = {};\r\n var pluginConfig = config.extensionConfig && config.extensionConfig[identifier] ? config.extensionConfig[identifier] : {};\r\n // set default values\r\n resultConfig.endpointUrl = function () { return config.endpointUrl || \"https://dc.services.visualstudio.com/v2/track\"; };\r\n resultConfig.emitLineDelimitedJson = function () { return applicationinsights_common_1.Util.stringToBoolOrDefault(pluginConfig.emitLineDelimitedJson); };\r\n resultConfig.maxBatchInterval = function () { return !isNaN(pluginConfig.maxBatchInterval) ? pluginConfig.maxBatchInterval : 15000; };\r\n resultConfig.maxBatchSizeInBytes = function () { return pluginConfig.maxBatchSizeInBytes > 0 ? pluginConfig.maxBatchSizeInBytes : 102400; }; // 100kb\r\n resultConfig.disableTelemetry = function () { return applicationinsights_common_1.Util.stringToBoolOrDefault(pluginConfig.disableTelemetry); };\r\n resultConfig.enableSessionStorageBuffer = function () { return applicationinsights_common_1.Util.stringToBoolOrDefault(pluginConfig.enableSessionStorageBuffer, true); };\r\n resultConfig.isRetryDisabled = function () { return applicationinsights_common_1.Util.stringToBoolOrDefault(pluginConfig.isRetryDisabled); };\r\n resultConfig.isBeaconApiDisabled = function () { return applicationinsights_common_1.Util.stringToBoolOrDefault(pluginConfig.isBeaconApiDisabled, true); };\r\n return resultConfig;\r\n };\r\n Sender._validate = function (envelope) {\r\n // call the appropriate Validate depending on the baseType\r\n switch (envelope.baseType) {\r\n case applicationinsights_common_1.Event.dataType:\r\n return EventValidator_1.EventValidator.EventValidator.Validate(envelope);\r\n case applicationinsights_common_1.Trace.dataType:\r\n return TraceValidator_1.TraceValidator.TraceValidator.Validate(envelope);\r\n case applicationinsights_common_1.Exception.dataType:\r\n return ExceptionValidator_1.ExceptionValidator.ExceptionValidator.Validate(envelope);\r\n case applicationinsights_common_1.Metric.dataType:\r\n return MetricValidator_1.MetricValidator.MetricValidator.Validate(envelope);\r\n case applicationinsights_common_1.PageView.dataType:\r\n return PageViewValidator_1.PageViewValidator.PageViewValidator.Validate(envelope);\r\n case applicationinsights_common_1.PageViewPerformance.dataType:\r\n return PageViewPerformanceValidator_1.PageViewPerformanceValidator.PageViewPerformanceValidator.Validate(envelope);\r\n case applicationinsights_common_1.RemoteDependencyData.dataType:\r\n return RemoteDepdencyValidator_1.RemoteDepdencyValidator.RemoteDepdencyValidator.Validate(envelope);\r\n default:\r\n return EventValidator_1.EventValidator.EventValidator.Validate(envelope);\r\n }\r\n };\r\n /**\r\n * Send Beacon API request\r\n * @param payload {string} - The data payload to be sent.\r\n * @param isAsync {boolean} - not used\r\n * Note: Beacon API does not support custom headers and we are not able to get\r\n * appId from the backend for the correct correlation.\r\n */\r\n Sender.prototype._beaconSender = function (payload, isAsync) {\r\n var url = this._config.endpointUrl();\r\n var batch = this._buffer.batchPayloads(payload);\r\n // Chrome only allows CORS-safelisted values for the sendBeacon data argument\r\n // see: https://bugs.chromium.org/p/chromium/issues/detail?id=720283\r\n var plainTextBatch = new Blob([batch], { type: 'text/plain;charset=UTF-8' });\r\n // The sendBeacon method returns true if the user agent is able to successfully queue the data for transfer. Otherwise it returns false.\r\n var queued = navigator.sendBeacon(url, plainTextBatch);\r\n if (queued) {\r\n this._buffer.markAsSent(payload);\r\n }\r\n else {\r\n this._logger.throwInternal(applicationinsights_core_js_1.LoggingSeverity.CRITICAL, applicationinsights_core_js_1._InternalMessageId.TransmissionFailed, \". \" + \"Failed to send telemetry with Beacon API.\");\r\n }\r\n };\r\n /**\r\n * Send XMLHttpRequest\r\n * @param payload {string} - The data payload to be sent.\r\n * @param isAsync {boolean} - Indicates if the request should be sent asynchronously\r\n */\r\n Sender.prototype._xhrSender = function (payload, isAsync) {\r\n var _this = this;\r\n var xhr = new XMLHttpRequest();\r\n xhr[applicationinsights_common_1.DisabledPropertyName] = true;\r\n xhr.open(\"POST\", this._config.endpointUrl(), isAsync);\r\n xhr.setRequestHeader(\"Content-type\", \"application/json\");\r\n // append Sdk-Context request header only in case of breeze endpoint \r\n if (applicationinsights_common_1.Util.isInternalApplicationInsightsEndpoint(this._config.endpointUrl())) {\r\n xhr.setRequestHeader(applicationinsights_common_1.RequestHeaders.sdkContextHeader, applicationinsights_common_1.RequestHeaders.sdkContextHeaderAppIdRequest);\r\n }\r\n xhr.onreadystatechange = function () { return _this._xhrReadyStateChange(xhr, payload, payload.length); };\r\n xhr.onerror = function (event) { return _this._onError(payload, _this._formatErrorMessageXhr(xhr), event); };\r\n // compose an array of payloads\r\n var batch = this._buffer.batchPayloads(payload);\r\n xhr.send(batch);\r\n this._buffer.markAsSent(payload);\r\n };\r\n /**\r\n * Parses the response from the backend.\r\n * @param response - XMLHttpRequest or XDomainRequest response\r\n */\r\n Sender.prototype._parseResponse = function (response) {\r\n try {\r\n if (response && response !== \"\") {\r\n var result = JSON.parse(response);\r\n if (result && result.itemsReceived && result.itemsReceived >= result.itemsAccepted &&\r\n result.itemsReceived - result.itemsAccepted == result.errors.length) {\r\n return result;\r\n }\r\n }\r\n }\r\n catch (e) {\r\n this._logger.throwInternal(applicationinsights_core_js_1.LoggingSeverity.CRITICAL, applicationinsights_core_js_1._InternalMessageId.InvalidBackendResponse, \"Cannot parse the response. \" + applicationinsights_common_1.Util.getExceptionName(e), {\r\n response: response\r\n });\r\n }\r\n return null;\r\n };\r\n /**\r\n * Resend payload. Adds payload back to the send buffer and setup a send timer (with exponential backoff).\r\n * @param payload\r\n */\r\n Sender.prototype._resendPayload = function (payload) {\r\n if (!payload || payload.length === 0) {\r\n return;\r\n }\r\n this._buffer.clearSent(payload);\r\n this._consecutiveErrors++;\r\n for (var _i = 0, payload_1 = payload; _i < payload_1.length; _i++) {\r\n var item = payload_1[_i];\r\n this._buffer.enqueue(item);\r\n }\r\n // setup timer\r\n this._setRetryTime();\r\n this._setupTimer();\r\n };\r\n /** Calculates the time to wait before retrying in case of an error based on\r\n * http://en.wikipedia.org/wiki/Exponential_backoff\r\n */\r\n Sender.prototype._setRetryTime = function () {\r\n var SlotDelayInSeconds = 10;\r\n var delayInSeconds;\r\n if (this._consecutiveErrors <= 1) {\r\n delayInSeconds = SlotDelayInSeconds;\r\n }\r\n else {\r\n var backOffSlot = (Math.pow(2, this._consecutiveErrors) - 1) / 2;\r\n var backOffDelay = Math.floor(Math.random() * backOffSlot * SlotDelayInSeconds) + 1;\r\n delayInSeconds = Math.max(Math.min(backOffDelay, 3600), SlotDelayInSeconds);\r\n }\r\n // TODO: Log the backoff time like the C# version does.\r\n var retryAfterTimeSpan = Date.now() + (delayInSeconds * 1000);\r\n // TODO: Log the retry at time like the C# version does.\r\n this._retryAt = retryAfterTimeSpan;\r\n };\r\n /**\r\n * Sets up the timer which triggers actually sending the data.\r\n */\r\n Sender.prototype._setupTimer = function () {\r\n var _this = this;\r\n if (!this._timeoutHandle) {\r\n var retryInterval = this._retryAt ? Math.max(0, this._retryAt - Date.now()) : 0;\r\n var timerValue = Math.max(this._config.maxBatchInterval(), retryInterval);\r\n this._timeoutHandle = setTimeout(function () {\r\n _this.triggerSend();\r\n }, timerValue);\r\n }\r\n };\r\n /**\r\n * Checks if the SDK should resend the payload after receiving this status code from the backend.\r\n * @param statusCode\r\n */\r\n Sender.prototype._isRetriable = function (statusCode) {\r\n return statusCode == 408 // Timeout\r\n || statusCode == 429 // Too many requests.\r\n || statusCode == 500 // Internal server error.\r\n || statusCode == 503; // Service unavailable.\r\n };\r\n Sender.prototype._formatErrorMessageXhr = function (xhr, message) {\r\n if (xhr) {\r\n return \"XMLHttpRequest,Status:\" + xhr.status + \",Response:\" + xhr.responseText || xhr.response || \"\";\r\n }\r\n return message;\r\n };\r\n /**\r\n * Send XDomainRequest\r\n * @param payload {string} - The data payload to be sent.\r\n * @param isAsync {boolean} - Indicates if the request should be sent asynchronously\r\n *\r\n * Note: XDomainRequest does not support sync requests. This 'isAsync' parameter is added\r\n * to maintain consistency with the xhrSender's contract\r\n * Note: XDomainRequest does not support custom headers and we are not able to get\r\n * appId from the backend for the correct correlation.\r\n */\r\n Sender.prototype._xdrSender = function (payload, isAsync) {\r\n var _this = this;\r\n var xdr = new XDomainRequest();\r\n xdr.onload = function () { return _this._xdrOnLoad(xdr, payload); };\r\n xdr.onerror = function (event) { return _this._onError(payload, _this._formatErrorMessageXdr(xdr), event); };\r\n // XDomainRequest requires the same protocol as the hosting page. \r\n // If the protocol doesn't match, we can't send the telemetry :(. \r\n var hostingProtocol = window.location.protocol;\r\n if (this._config.endpointUrl().lastIndexOf(hostingProtocol, 0) !== 0) {\r\n this._logger.throwInternal(applicationinsights_core_js_1.LoggingSeverity.WARNING, applicationinsights_core_js_1._InternalMessageId.TransmissionFailed, \". \" +\r\n \"Cannot send XDomain request. The endpoint URL protocol doesn't match the hosting page protocol.\");\r\n this._buffer.clear();\r\n return;\r\n }\r\n var endpointUrl = this._config.endpointUrl().replace(/^(https?:)/, \"\");\r\n xdr.open('POST', endpointUrl);\r\n // compose an array of payloads\r\n var batch = this._buffer.batchPayloads(payload);\r\n xdr.send(batch);\r\n this._buffer.markAsSent(payload);\r\n };\r\n Sender.prototype._formatErrorMessageXdr = function (xdr, message) {\r\n if (xdr) {\r\n return \"XDomainRequest,Response:\" + xdr.responseText || \"\";\r\n }\r\n return message;\r\n };\r\n return Sender;\r\n }());\r\n exports.Sender = Sender;\r\n});\r\n//# sourceMappingURL=Sender.js.map","define([\"require\", \"exports\", \"applicationinsights-common\", \"applicationinsights-core-js\"], function (require, exports, applicationinsights_common_1, applicationinsights_core_js_1) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n var Serializer = /** @class */ (function () {\r\n function Serializer(logger) {\r\n this._logger = logger;\r\n }\r\n /**\r\n * Serializes the current object to a JSON string.\r\n */\r\n Serializer.prototype.serialize = function (input) {\r\n var output = this._serializeObject(input, \"root\");\r\n return JSON.stringify(output);\r\n };\r\n Serializer.prototype._serializeObject = function (source, name) {\r\n var circularReferenceCheck = \"__aiCircularRefCheck\";\r\n var output = {};\r\n if (!source) {\r\n this._logger.throwInternal(applicationinsights_core_js_1.LoggingSeverity.CRITICAL, applicationinsights_core_js_1._InternalMessageId.CannotSerializeObject, \"cannot serialize object because it is null or undefined\", { name: name }, true);\r\n return output;\r\n }\r\n if (source[circularReferenceCheck]) {\r\n this._logger.throwInternal(applicationinsights_core_js_1.LoggingSeverity.WARNING, applicationinsights_core_js_1._InternalMessageId.CircularReferenceDetected, \"Circular reference detected while serializing object\", { name: name }, true);\r\n return output;\r\n }\r\n if (!source.aiDataContract) {\r\n // special case for measurements/properties/tags\r\n if (name === \"measurements\") {\r\n output = this._serializeStringMap(source, \"number\", name);\r\n }\r\n else if (name === \"properties\") {\r\n output = this._serializeStringMap(source, \"string\", name);\r\n }\r\n else if (name === \"tags\") {\r\n output = this._serializeStringMap(source, \"string\", name);\r\n }\r\n else if (applicationinsights_common_1.Util.isArray(source)) {\r\n output = this._serializeArray(source, name);\r\n }\r\n else {\r\n this._logger.throwInternal(applicationinsights_core_js_1.LoggingSeverity.WARNING, applicationinsights_core_js_1._InternalMessageId.CannotSerializeObjectNonSerializable, \"Attempting to serialize an object which does not implement ISerializable\", { name: name }, true);\r\n try {\r\n // verify that the object can be stringified\r\n JSON.stringify(source);\r\n output = source;\r\n }\r\n catch (e) {\r\n // if serialization fails return an empty string\r\n this._logger.throwInternal(applicationinsights_core_js_1.LoggingSeverity.CRITICAL, applicationinsights_core_js_1._InternalMessageId.CannotSerializeObject, (e && typeof e.toString === 'function') ? e.toString() : \"Error serializing object\", null, true);\r\n }\r\n }\r\n return output;\r\n }\r\n source[circularReferenceCheck] = true;\r\n for (var field in source.aiDataContract) {\r\n var contract = source.aiDataContract[field];\r\n var isRequired = (typeof contract === \"function\") ? (contract() & applicationinsights_common_1.FieldType.Required) : (contract & applicationinsights_common_1.FieldType.Required);\r\n var isHidden = (typeof contract === \"function\") ? (contract() & applicationinsights_common_1.FieldType.Hidden) : (contract & applicationinsights_common_1.FieldType.Hidden);\r\n var isArray = contract & applicationinsights_common_1.FieldType.Array;\r\n var isPresent = source[field] !== undefined;\r\n var isObject = typeof source[field] === \"object\" && source[field] !== null;\r\n if (isRequired && !isPresent && !isArray) {\r\n this._logger.throwInternal(applicationinsights_core_js_1.LoggingSeverity.CRITICAL, applicationinsights_core_js_1._InternalMessageId.MissingRequiredFieldSpecification, \"Missing required field specification. The field is required but not present on source\", { field: field, name: name });\r\n // If not in debug mode, continue and hope the error is permissible\r\n continue;\r\n }\r\n if (isHidden) {\r\n // Don't serialize hidden fields\r\n continue;\r\n }\r\n var value;\r\n if (isObject) {\r\n if (isArray) {\r\n // special case; resurse on each object in the source array\r\n value = this._serializeArray(source[field], field);\r\n }\r\n else {\r\n // recurse on the source object in this field\r\n value = this._serializeObject(source[field], field);\r\n }\r\n }\r\n else {\r\n // assign the source field to the output even if undefined or required\r\n value = source[field];\r\n }\r\n // only emit this field if the value is defined\r\n if (value !== undefined) {\r\n output[field] = value;\r\n }\r\n }\r\n delete source[circularReferenceCheck];\r\n return output;\r\n };\r\n Serializer.prototype._serializeArray = function (sources, name) {\r\n var output = undefined;\r\n if (!!sources) {\r\n if (!applicationinsights_common_1.Util.isArray(sources)) {\r\n this._logger.throwInternal(applicationinsights_core_js_1.LoggingSeverity.CRITICAL, applicationinsights_core_js_1._InternalMessageId.ItemNotInArray, \"This field was specified as an array in the contract but the item is not an array.\\r\\n\", { name: name }, true);\r\n }\r\n else {\r\n output = [];\r\n for (var i = 0; i < sources.length; i++) {\r\n var source = sources[i];\r\n var item = this._serializeObject(source, name + \"[\" + i + \"]\");\r\n output.push(item);\r\n }\r\n }\r\n }\r\n return output;\r\n };\r\n Serializer.prototype._serializeStringMap = function (map, expectedType, name) {\r\n var output = undefined;\r\n if (map) {\r\n output = {};\r\n for (var field in map) {\r\n var value = map[field];\r\n if (expectedType === \"string\") {\r\n if (value === undefined) {\r\n output[field] = \"undefined\";\r\n }\r\n else if (value === null) {\r\n output[field] = \"null\";\r\n }\r\n else if (!value.toString) {\r\n output[field] = \"invalid field: toString() is not defined.\";\r\n }\r\n else {\r\n output[field] = value.toString();\r\n }\r\n }\r\n else if (expectedType === \"number\") {\r\n if (value === undefined) {\r\n output[field] = \"undefined\";\r\n }\r\n else if (value === null) {\r\n output[field] = \"null\";\r\n }\r\n else {\r\n var num = parseFloat(value);\r\n if (isNaN(num)) {\r\n output[field] = \"NaN\";\r\n }\r\n else {\r\n output[field] = num;\r\n }\r\n }\r\n }\r\n else {\r\n output[field] = \"invalid field: \" + name + \" is of unknown type.\";\r\n this._logger.throwInternal(applicationinsights_core_js_1.LoggingSeverity.CRITICAL, output[field], null, true);\r\n }\r\n }\r\n }\r\n return output;\r\n };\r\n return Serializer;\r\n }());\r\n exports.Serializer = Serializer;\r\n});\r\n//# sourceMappingURL=Serializer.js.map","define([\"require\", \"exports\"], function (require, exports) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n var EventValidator = /** @class */ (function () {\r\n function EventValidator() {\r\n }\r\n EventValidator.prototype.Validate = function (item) {\r\n /* TODO re-enable once design of iTelemetryItem is finalized. Task used to track this:\r\n https://mseng.visualstudio.com/AppInsights/_workitems/edit/1310871\r\n \r\n // verify system properties has a ver field\r\n if (!item.sytemProperties || !item.sytemProperties[\"ver\"]) {\r\n return false;\r\n }\r\n \r\n if (!item.domainProperties || !item.domainProperties[\"name\"]) {\r\n return false;\r\n }\r\n */\r\n return true;\r\n };\r\n EventValidator.EventValidator = new EventValidator();\r\n return EventValidator;\r\n }());\r\n exports.EventValidator = EventValidator;\r\n});\r\n//# sourceMappingURL=EventValidator.js.map","define([\"require\", \"exports\"], function (require, exports) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n var ExceptionValidator = /** @class */ (function () {\r\n function ExceptionValidator() {\r\n }\r\n ExceptionValidator.prototype.Validate = function (item) {\r\n /* TODO re-enable once design of iTelemetryItem is finalized. Task used to track this:\r\n https://mseng.visualstudio.com/AppInsights/_workitems/edit/1310871\r\n \r\n // verify system properties has a ver field\r\n if (!item.sytemProperties ||\r\n !item.sytemProperties[\"ver\"]) {\r\n return false;\r\n }\r\n \r\n if (!item.domainProperties ||\r\n !item.domainProperties[\"exceptions\"] ||\r\n !ExceptionValidator._validateExceptions(item.domainProperties[\"exceptions\"])) {\r\n return false;\r\n }\r\n */\r\n return true;\r\n };\r\n // TODO implement validation of exceptions\r\n ExceptionValidator._validateExceptions = function (exceptions) {\r\n // typeName\r\n // message\r\n // parsedStack\r\n // stack\r\n // hasFullStack\r\n return true;\r\n };\r\n ExceptionValidator.ExceptionValidator = new ExceptionValidator();\r\n return ExceptionValidator;\r\n }());\r\n exports.ExceptionValidator = ExceptionValidator;\r\n});\r\n//# sourceMappingURL=ExceptionValidator.js.map","define([\"require\", \"exports\"], function (require, exports) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n var MetricValidator = /** @class */ (function () {\r\n function MetricValidator() {\r\n }\r\n MetricValidator.prototype.Validate = function (event) {\r\n return true;\r\n };\r\n MetricValidator.MetricValidator = new MetricValidator();\r\n return MetricValidator;\r\n }());\r\n exports.MetricValidator = MetricValidator;\r\n});\r\n//# sourceMappingURL=MetricValidator.js.map","define([\"require\", \"exports\"], function (require, exports) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n var PageViewPerformanceValidator = /** @class */ (function () {\r\n function PageViewPerformanceValidator() {\r\n }\r\n PageViewPerformanceValidator.prototype.Validate = function (item) {\r\n /* TODO re-enable once design of iTelemetryItem is finalized. Task used to track this:\r\n https://mseng.visualstudio.com/AppInsights/_workitems/edit/1310871\r\n \r\n // verify system properties has a ver field\r\n if (!item.sytemProperties ||\r\n !item.sytemProperties[\"ver\"]) {\r\n return false;\r\n }\r\n \r\n if (!item.domainProperties ||\r\n !item.domainProperties[\"domProcessing\"] ||\r\n !item.domainProperties[\"duration\"] ||\r\n !item.domainProperties[\"name\"] ||\r\n !item.domainProperties[\"networkConnect\"] ||\r\n !item.domainProperties[\"perfTotal\"] ||\r\n !item.domainProperties[\"receivedResponse\"] ||\r\n !item.domainProperties[\"sentRequest\"] ||\r\n !item.domainProperties[\"url\"]) {\r\n return false;\r\n }\r\n */\r\n return true;\r\n };\r\n PageViewPerformanceValidator.PageViewPerformanceValidator = new PageViewPerformanceValidator();\r\n return PageViewPerformanceValidator;\r\n }());\r\n exports.PageViewPerformanceValidator = PageViewPerformanceValidator;\r\n});\r\n//# sourceMappingURL=PageViewPerformanceValidator.js.map","define([\"require\", \"exports\"], function (require, exports) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n var PageViewValidator = /** @class */ (function () {\r\n function PageViewValidator() {\r\n }\r\n PageViewValidator.prototype.Validate = function (item) {\r\n /* TODO re-enable once design of iTelemetryItem is finalized. Task used to track this:\r\n https://mseng.visualstudio.com/AppInsights/_workitems/edit/1310871\r\n \r\n // verify system properties has a ver field\r\n if (!item.sytemProperties ||\r\n !item.sytemProperties[\"ver\"]) {\r\n return false;\r\n }\r\n \r\n if (!item.domainProperties ||\r\n !item.domainProperties[\"id\"] ||\r\n !item.domainProperties[\"name\"] ||\r\n !item.domainProperties[\"duration\"] ||\r\n !item.domainProperties[\"url\"]) {\r\n return false;\r\n }\r\n */\r\n return true;\r\n };\r\n PageViewValidator.PageViewValidator = new PageViewValidator();\r\n return PageViewValidator;\r\n }());\r\n exports.PageViewValidator = PageViewValidator;\r\n});\r\n//# sourceMappingURL=PageViewValidator.js.map","define([\"require\", \"exports\"], function (require, exports) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n var RemoteDepdencyValidator = /** @class */ (function () {\r\n function RemoteDepdencyValidator() {\r\n }\r\n RemoteDepdencyValidator.prototype.Validate = function (item) {\r\n /* TODO re-enable once design of iTelemetryItem is finalized. Task used to track this:\r\n https://mseng.visualstudio.com/AppInsights/_workitems/edit/1310871\r\n \r\n // verify system properties has a ver field\r\n if (!item.sytemProperties ||\r\n !item.sytemProperties[\"ver\"]) {\r\n return false;\r\n }\r\n \r\n if (!item.domainProperties ||\r\n !item.domainProperties[\"id\"] ||\r\n !item.domainProperties[\"name\"] ||\r\n !item.domainProperties[\"resultCode\"] ||\r\n !item.domainProperties[\"duration\"] ||\r\n !item.domainProperties[\"success\"] ||\r\n !item.domainProperties[\"data\"] ||\r\n !item.domainProperties[\"target\"] ||\r\n !item.domainProperties[\"type\"]) {\r\n return false;\r\n }\r\n */\r\n return true;\r\n };\r\n RemoteDepdencyValidator.RemoteDepdencyValidator = new RemoteDepdencyValidator();\r\n return RemoteDepdencyValidator;\r\n }());\r\n exports.RemoteDepdencyValidator = RemoteDepdencyValidator;\r\n});\r\n//# sourceMappingURL=RemoteDepdencyValidator.js.map","define([\"require\", \"exports\"], function (require, exports) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n var TraceValidator = /** @class */ (function () {\r\n function TraceValidator() {\r\n }\r\n TraceValidator.prototype.Validate = function (item) {\r\n /* TODO re-enable once design of iTelemetryItem is finalized. Task used to track this:\r\n https://mseng.visualstudio.com/AppInsights/_workitems/edit/1310871\r\n \r\n // verify system properties has a ver field\r\n if (!item.sytemProperties ||\r\n !item.sytemProperties[\"ver\"]) {\r\n return false;\r\n }\r\n \r\n if (!item.domainProperties ||\r\n !item.domainProperties[\"message\"] ||\r\n !item.domainProperties[\"severityLevel\"]) {\r\n return false;\r\n }\r\n */\r\n return true;\r\n };\r\n TraceValidator.TraceValidator = new TraceValidator();\r\n return TraceValidator;\r\n }());\r\n exports.TraceValidator = TraceValidator;\r\n});\r\n//# sourceMappingURL=TraceValidator.js.map","define([\"require\", \"exports\", \"./Sender\"], function (require, exports, Sender_1) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n exports.Sender = Sender_1.Sender;\r\n});\r\n//# sourceMappingURL=applicationinsights-channel-js.js.map","define([\"require\", \"exports\"], function (require, exports) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n exports.DisabledPropertyName = \"Microsoft_ApplicationInsights_BypassAjaxInstrumentation\";\r\n});\r\n//# sourceMappingURL=Constants.js.map","define([\"require\", \"exports\"], function (require, exports) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n /**\r\n * Type of storage to differentiate between local storage and session storage\r\n */\r\n var StorageType;\r\n (function (StorageType) {\r\n StorageType[StorageType[\"LocalStorage\"] = 0] = \"LocalStorage\";\r\n StorageType[StorageType[\"SessionStorage\"] = 1] = \"SessionStorage\";\r\n })(StorageType = exports.StorageType || (exports.StorageType = {}));\r\n /**\r\n * Enum is used in aiDataContract to describe how fields are serialized.\r\n * For instance: (Fieldtype.Required | FieldType.Array) will mark the field as required and indicate it's an array\r\n */\r\n var FieldType;\r\n (function (FieldType) {\r\n FieldType[FieldType[\"Default\"] = 0] = \"Default\";\r\n FieldType[FieldType[\"Required\"] = 1] = \"Required\";\r\n FieldType[FieldType[\"Array\"] = 2] = \"Array\";\r\n FieldType[FieldType[\"Hidden\"] = 4] = \"Hidden\";\r\n })(FieldType = exports.FieldType || (exports.FieldType = {}));\r\n ;\r\n});\r\n//# sourceMappingURL=Enums.js.map","// THIS FILE WAS AUTOGENERATED\r\ndefine([\"require\", \"exports\"], function (require, exports) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n /**\r\n * Data struct to contain only C section with custom fields.\r\n */\r\n var Base = /** @class */ (function () {\r\n function Base() {\r\n }\r\n return Base;\r\n }());\r\n exports.Base = Base;\r\n});\r\n//# sourceMappingURL=Base.js.map","define([\"require\", \"exports\"], function (require, exports) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n // THIS FILE WAS AUTOGENERATED\r\n var ContextTagKeys = /** @class */ (function () {\r\n function ContextTagKeys() {\r\n this.applicationVersion = \"ai.application.ver\";\r\n this.applicationBuild = \"ai.application.build\";\r\n this.applicationTypeId = \"ai.application.typeId\";\r\n this.applicationId = \"ai.application.applicationId\";\r\n this.applicationLayer = \"ai.application.layer\";\r\n this.deviceId = \"ai.device.id\";\r\n this.deviceIp = \"ai.device.ip\";\r\n this.deviceLanguage = \"ai.device.language\";\r\n this.deviceLocale = \"ai.device.locale\";\r\n this.deviceModel = \"ai.device.model\";\r\n this.deviceFriendlyName = \"ai.device.friendlyName\";\r\n this.deviceNetwork = \"ai.device.network\";\r\n this.deviceNetworkName = \"ai.device.networkName\";\r\n this.deviceOEMName = \"ai.device.oemName\";\r\n this.deviceOS = \"ai.device.os\";\r\n this.deviceOSVersion = \"ai.device.osVersion\";\r\n this.deviceRoleInstance = \"ai.device.roleInstance\";\r\n this.deviceRoleName = \"ai.device.roleName\";\r\n this.deviceScreenResolution = \"ai.device.screenResolution\";\r\n this.deviceType = \"ai.device.type\";\r\n this.deviceMachineName = \"ai.device.machineName\";\r\n this.deviceVMName = \"ai.device.vmName\";\r\n this.deviceBrowser = \"ai.device.browser\";\r\n this.deviceBrowserVersion = \"ai.device.browserVersion\";\r\n this.locationIp = \"ai.location.ip\";\r\n this.locationCountry = \"ai.location.country\";\r\n this.locationProvince = \"ai.location.province\";\r\n this.locationCity = \"ai.location.city\";\r\n this.operationId = \"ai.operation.id\";\r\n this.operationName = \"ai.operation.name\";\r\n this.operationParentId = \"ai.operation.parentId\";\r\n this.operationRootId = \"ai.operation.rootId\";\r\n this.operationSyntheticSource = \"ai.operation.syntheticSource\";\r\n this.operationCorrelationVector = \"ai.operation.correlationVector\";\r\n this.sessionId = \"ai.session.id\";\r\n this.sessionIsFirst = \"ai.session.isFirst\";\r\n this.sessionIsNew = \"ai.session.isNew\";\r\n this.userAccountAcquisitionDate = \"ai.user.accountAcquisitionDate\";\r\n this.userAccountId = \"ai.user.accountId\";\r\n this.userAgent = \"ai.user.userAgent\";\r\n this.userId = \"ai.user.id\";\r\n this.userStoreRegion = \"ai.user.storeRegion\";\r\n this.userAuthUserId = \"ai.user.authUserId\";\r\n this.userAnonymousUserAcquisitionDate = \"ai.user.anonUserAcquisitionDate\";\r\n this.userAuthenticatedUserAcquisitionDate = \"ai.user.authUserAcquisitionDate\";\r\n this.cloudName = \"ai.cloud.name\";\r\n this.cloudRole = \"ai.cloud.role\";\r\n this.cloudRoleVer = \"ai.cloud.roleVer\";\r\n this.cloudRoleInstance = \"ai.cloud.roleInstance\";\r\n this.cloudEnvironment = \"ai.cloud.environment\";\r\n this.cloudLocation = \"ai.cloud.location\";\r\n this.cloudDeploymentUnit = \"ai.cloud.deploymentUnit\";\r\n this.internalSdkVersion = \"ai.internal.sdkVersion\";\r\n this.internalAgentVersion = \"ai.internal.agentVersion\";\r\n this.internalNodeName = \"ai.internal.nodeName\";\r\n }\r\n return ContextTagKeys;\r\n }());\r\n exports.ContextTagKeys = ContextTagKeys;\r\n});\r\n//# sourceMappingURL=ContextTagKeys.js.map","var __extends = (this && this.__extends) || (function () {\r\n var extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return function (d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\ndefine([\"require\", \"exports\", \"./Base\"], function (require, exports, Base_1) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n /**\r\n * Data struct to contain both B and C sections.\r\n */\r\n var Data = /** @class */ (function (_super) {\r\n __extends(Data, _super);\r\n function Data() {\r\n return _super.call(this) || this;\r\n }\r\n return Data;\r\n }(Base_1.Base));\r\n exports.Data = Data;\r\n});\r\n//# sourceMappingURL=Data.js.map","define([\"require\", \"exports\", \"./DataPointType\"], function (require, exports, DataPointType_1) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n /**\r\n * Metric data single measurement.\r\n */\r\n var DataPoint = /** @class */ (function () {\r\n function DataPoint() {\r\n this.kind = DataPointType_1.DataPointType.Measurement;\r\n }\r\n return DataPoint;\r\n }());\r\n exports.DataPoint = DataPoint;\r\n});\r\n//# sourceMappingURL=DataPoint.js.map","define([\"require\", \"exports\"], function (require, exports) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n // THIS FILE WAS AUTOGENERATED\r\n /**\r\n * Type of the metric data measurement.\r\n */\r\n var DataPointType;\r\n (function (DataPointType) {\r\n DataPointType[DataPointType[\"Measurement\"] = 0] = \"Measurement\";\r\n DataPointType[DataPointType[\"Aggregation\"] = 1] = \"Aggregation\";\r\n })(DataPointType = exports.DataPointType || (exports.DataPointType = {}));\r\n});\r\n//# sourceMappingURL=DataPointType.js.map","// THIS FILE WAS AUTOGENERATED\r\ndefine([\"require\", \"exports\"], function (require, exports) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n /**\r\n * The abstract common base of all domains.\r\n */\r\n var Domain = /** @class */ (function () {\r\n function Domain() {\r\n }\r\n return Domain;\r\n }());\r\n exports.Domain = Domain;\r\n});\r\n//# sourceMappingURL=Domain.js.map","define([\"require\", \"exports\"], function (require, exports) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n /**\r\n * System variables for a telemetry item.\r\n */\r\n var Envelope = /** @class */ (function () {\r\n function Envelope() {\r\n this.ver = 1;\r\n this.sampleRate = 100.0;\r\n this.tags = {};\r\n }\r\n return Envelope;\r\n }());\r\n exports.Envelope = Envelope;\r\n});\r\n//# sourceMappingURL=Envelope.js.map","var __extends = (this && this.__extends) || (function () {\r\n var extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return function (d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\ndefine([\"require\", \"exports\", \"./Domain\"], function (require, exports, Domain_1) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n /**\r\n * Instances of Event represent structured event records that can be grouped and searched by their properties. Event data item also creates a metric of event count by name.\r\n */\r\n var EventData = /** @class */ (function (_super) {\r\n __extends(EventData, _super);\r\n function EventData() {\r\n var _this = _super.call(this) || this;\r\n _this.ver = 2;\r\n _this.properties = {};\r\n _this.measurements = {};\r\n return _this;\r\n }\r\n return EventData;\r\n }(Domain_1.Domain));\r\n exports.EventData = EventData;\r\n});\r\n//# sourceMappingURL=EventData.js.map","var __extends = (this && this.__extends) || (function () {\r\n var extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return function (d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\ndefine([\"require\", \"exports\", \"./Domain\"], function (require, exports, Domain_1) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n /**\r\n * An instance of Exception represents a handled or unhandled exception that occurred during execution of the monitored application.\r\n */\r\n var ExceptionData = /** @class */ (function (_super) {\r\n __extends(ExceptionData, _super);\r\n function ExceptionData() {\r\n var _this = _super.call(this) || this;\r\n _this.ver = 2;\r\n _this.exceptions = [];\r\n _this.properties = {};\r\n _this.measurements = {};\r\n return _this;\r\n }\r\n return ExceptionData;\r\n }(Domain_1.Domain));\r\n exports.ExceptionData = ExceptionData;\r\n});\r\n//# sourceMappingURL=ExceptionData.js.map","define([\"require\", \"exports\"], function (require, exports) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n /**\r\n * Exception details of the exception in a chain.\r\n */\r\n var ExceptionDetails = /** @class */ (function () {\r\n function ExceptionDetails() {\r\n this.hasFullStack = true;\r\n this.parsedStack = [];\r\n }\r\n return ExceptionDetails;\r\n }());\r\n exports.ExceptionDetails = ExceptionDetails;\r\n});\r\n//# sourceMappingURL=ExceptionDetails.js.map","var __extends = (this && this.__extends) || (function () {\r\n var extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return function (d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\ndefine([\"require\", \"exports\", \"./Domain\"], function (require, exports, Domain_1) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n /**\r\n * Instances of Message represent printf-like trace statements that are text-searched. Log4Net, NLog and other text-based log file entries are translated into intances of this type. The message does not have measurements.\r\n */\r\n var MessageData = /** @class */ (function (_super) {\r\n __extends(MessageData, _super);\r\n function MessageData() {\r\n var _this = _super.call(this) || this;\r\n _this.ver = 2;\r\n _this.properties = {};\r\n return _this;\r\n }\r\n return MessageData;\r\n }(Domain_1.Domain));\r\n exports.MessageData = MessageData;\r\n});\r\n//# sourceMappingURL=MessageData.js.map","var __extends = (this && this.__extends) || (function () {\r\n var extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return function (d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\ndefine([\"require\", \"exports\", \"./Domain\"], function (require, exports, Domain_1) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n /**\r\n * An instance of the Metric item is a list of measurements (single data points) and/or aggregations.\r\n */\r\n var MetricData = /** @class */ (function (_super) {\r\n __extends(MetricData, _super);\r\n function MetricData() {\r\n var _this = _super.call(this) || this;\r\n _this.ver = 2;\r\n _this.metrics = [];\r\n _this.properties = {};\r\n return _this;\r\n }\r\n return MetricData;\r\n }(Domain_1.Domain));\r\n exports.MetricData = MetricData;\r\n});\r\n//# sourceMappingURL=MetricData.js.map","var __extends = (this && this.__extends) || (function () {\r\n var extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return function (d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\ndefine([\"require\", \"exports\", \"./EventData\"], function (require, exports, EventData_1) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n /**\r\n * An instance of PageView represents a generic action on a page like a button click. It is also the base type for PageView.\r\n */\r\n var PageViewData = /** @class */ (function (_super) {\r\n __extends(PageViewData, _super);\r\n function PageViewData() {\r\n var _this = _super.call(this) || this;\r\n _this.ver = 2;\r\n _this.properties = {};\r\n _this.measurements = {};\r\n return _this;\r\n }\r\n return PageViewData;\r\n }(EventData_1.EventData));\r\n exports.PageViewData = PageViewData;\r\n});\r\n//# sourceMappingURL=PageViewData.js.map","var __extends = (this && this.__extends) || (function () {\r\n var extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return function (d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\ndefine([\"require\", \"exports\", \"./PageViewData\"], function (require, exports, PageViewData_1) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n /**\r\n * An instance of PageViewPerf represents: a page view with no performance data, a page view with performance data, or just the performance data of an earlier page request.\r\n */\r\n var PageViewPerfData = /** @class */ (function (_super) {\r\n __extends(PageViewPerfData, _super);\r\n function PageViewPerfData() {\r\n var _this = _super.call(this) || this;\r\n _this.ver = 2;\r\n _this.properties = {};\r\n _this.measurements = {};\r\n return _this;\r\n }\r\n return PageViewPerfData;\r\n }(PageViewData_1.PageViewData));\r\n exports.PageViewPerfData = PageViewPerfData;\r\n});\r\n//# sourceMappingURL=PageViewPerfData.js.map","var __extends = (this && this.__extends) || (function () {\r\n var extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return function (d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\ndefine([\"require\", \"exports\", \"./Domain\"], function (require, exports, Domain_1) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n /**\r\n * An instance of Remote Dependency represents an interaction of the monitored component with a remote component/service like SQL or an HTTP endpoint.\r\n */\r\n var RemoteDependencyData = /** @class */ (function (_super) {\r\n __extends(RemoteDependencyData, _super);\r\n function RemoteDependencyData() {\r\n var _this = _super.call(this) || this;\r\n _this.ver = 2;\r\n _this.success = true;\r\n _this.properties = {};\r\n _this.measurements = {};\r\n return _this;\r\n }\r\n return RemoteDependencyData;\r\n }(Domain_1.Domain));\r\n exports.RemoteDependencyData = RemoteDependencyData;\r\n});\r\n//# sourceMappingURL=RemoteDependencyData.js.map","// THIS FILE WAS AUTOGENERATED\r\ndefine([\"require\", \"exports\"], function (require, exports) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n /**\r\n * Defines the level of severity for the event.\r\n */\r\n var SeverityLevel;\r\n (function (SeverityLevel) {\r\n SeverityLevel[SeverityLevel[\"Verbose\"] = 0] = \"Verbose\";\r\n SeverityLevel[SeverityLevel[\"Information\"] = 1] = \"Information\";\r\n SeverityLevel[SeverityLevel[\"Warning\"] = 2] = \"Warning\";\r\n SeverityLevel[SeverityLevel[\"Error\"] = 3] = \"Error\";\r\n SeverityLevel[SeverityLevel[\"Critical\"] = 4] = \"Critical\";\r\n })(SeverityLevel = exports.SeverityLevel || (exports.SeverityLevel = {}));\r\n});\r\n//# sourceMappingURL=SeverityLevel.js.map","define([\"require\", \"exports\"], function (require, exports) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n // THIS FILE WAS AUTOGENERATED\r\n /**\r\n * Stack frame information.\r\n */\r\n var StackFrame = /** @class */ (function () {\r\n function StackFrame() {\r\n }\r\n return StackFrame;\r\n }());\r\n exports.StackFrame = StackFrame;\r\n});\r\n//# sourceMappingURL=StackFrame.js.map","define([\"require\", \"exports\"], function (require, exports) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n var RequestHeaders = /** @class */ (function () {\r\n function RequestHeaders() {\r\n }\r\n /**\r\n * Request-Context header\r\n */\r\n RequestHeaders.requestContextHeader = \"Request-Context\";\r\n /**\r\n * Target instrumentation header that is added to the response and retrieved by the\r\n * calling application when processing incoming responses.\r\n */\r\n RequestHeaders.requestContextTargetKey = \"appId\";\r\n /**\r\n * Request-Context appId format\r\n */\r\n RequestHeaders.requestContextAppIdFormat = \"appId=cid-v1:\";\r\n /**\r\n * Request-Id header\r\n */\r\n RequestHeaders.requestIdHeader = \"Request-Id\";\r\n /**\r\n * Sdk-Context header\r\n * If this header passed with appId in content then appId will be returned back by the backend.\r\n */\r\n RequestHeaders.sdkContextHeader = \"Sdk-Context\";\r\n /**\r\n * String to pass in header for requesting appId back from the backend.\r\n */\r\n RequestHeaders.sdkContextHeaderAppIdRequest = \"appId\";\r\n RequestHeaders.requestContextHeaderLowerCase = \"request-context\";\r\n return RequestHeaders;\r\n }());\r\n exports.RequestHeaders = RequestHeaders;\r\n});\r\n//# sourceMappingURL=RequestResponseHeaders.js.map","var __extends = (this && this.__extends) || (function () {\r\n var extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return function (d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\ndefine([\"require\", \"exports\", \"../../Interfaces/Contracts/Generated/Data\", \"../../Enums\"], function (require, exports, Data_1, Enums_1) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n var Data = /** @class */ (function (_super) {\r\n __extends(Data, _super);\r\n /**\r\n * Constructs a new instance of telemetry data.\r\n */\r\n function Data(type, data) {\r\n var _this = _super.call(this) || this;\r\n /**\r\n * The data contract for serializing this object.\r\n */\r\n _this.aiDataContract = {\r\n baseType: Enums_1.FieldType.Required,\r\n baseData: Enums_1.FieldType.Required\r\n };\r\n _this.baseType = type;\r\n _this.baseData = data;\r\n return _this;\r\n }\r\n return Data;\r\n }(Data_1.Data));\r\n exports.Data = Data;\r\n});\r\n//# sourceMappingURL=Data.js.map","var __extends = (this && this.__extends) || (function () {\r\n var extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return function (d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\ndefine([\"require\", \"exports\", \"../../Interfaces/Contracts/Generated/DataPoint\", \"../../Enums\"], function (require, exports, DataPoint_1, Enums_1) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n var DataPoint = /** @class */ (function (_super) {\r\n __extends(DataPoint, _super);\r\n function DataPoint() {\r\n var _this = _super !== null && _super.apply(this, arguments) || this;\r\n /**\r\n * The data contract for serializing this object.\r\n */\r\n _this.aiDataContract = {\r\n name: Enums_1.FieldType.Required,\r\n kind: Enums_1.FieldType.Default,\r\n value: Enums_1.FieldType.Required,\r\n count: Enums_1.FieldType.Default,\r\n min: Enums_1.FieldType.Default,\r\n max: Enums_1.FieldType.Default,\r\n stdDev: Enums_1.FieldType.Default\r\n };\r\n return _this;\r\n }\r\n return DataPoint;\r\n }(DataPoint_1.DataPoint));\r\n exports.DataPoint = DataPoint;\r\n});\r\n//# sourceMappingURL=DataPoint.js.map","define([\"require\", \"exports\", \"applicationinsights-core-js\", \"../../Util\"], function (require, exports, applicationinsights_core_js_1, Util_1) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n var DataSanitizer = /** @class */ (function () {\r\n function DataSanitizer() {\r\n }\r\n DataSanitizer.sanitizeKeyAndAddUniqueness = function (logger, key, map) {\r\n var origLength = key.length;\r\n var field = DataSanitizer.sanitizeKey(logger, key);\r\n // validation truncated the length. We need to add uniqueness\r\n if (field.length !== origLength) {\r\n var i = 0;\r\n var uniqueField = field;\r\n while (map[uniqueField] !== undefined) {\r\n i++;\r\n uniqueField = field.substring(0, DataSanitizer.MAX_NAME_LENGTH - 3) + DataSanitizer.padNumber(i);\r\n }\r\n field = uniqueField;\r\n }\r\n return field;\r\n };\r\n DataSanitizer.sanitizeKey = function (logger, name) {\r\n if (name) {\r\n // Remove any leading or trailing whitepace\r\n name = Util_1.Util.trim(name.toString());\r\n // truncate the string to 150 chars\r\n if (name.length > DataSanitizer.MAX_NAME_LENGTH) {\r\n name = name.substring(0, DataSanitizer.MAX_NAME_LENGTH);\r\n logger.throwInternal(applicationinsights_core_js_1.LoggingSeverity.WARNING, applicationinsights_core_js_1._InternalMessageId.NameTooLong, \"name is too long. It has been truncated to \" + DataSanitizer.MAX_NAME_LENGTH + \" characters.\", { name: name }, true);\r\n }\r\n }\r\n return name;\r\n };\r\n DataSanitizer.sanitizeString = function (logger, value, maxLength) {\r\n if (maxLength === void 0) { maxLength = DataSanitizer.MAX_STRING_LENGTH; }\r\n if (value) {\r\n maxLength = maxLength ? maxLength : DataSanitizer.MAX_STRING_LENGTH; // in case default parameters dont work\r\n value = Util_1.Util.trim(value);\r\n if (value.toString().length > maxLength) {\r\n value = value.toString().substring(0, maxLength);\r\n logger.throwInternal(applicationinsights_core_js_1.LoggingSeverity.WARNING, applicationinsights_core_js_1._InternalMessageId.StringValueTooLong, \"string value is too long. It has been truncated to \" + maxLength + \" characters.\", { value: value }, true);\r\n }\r\n }\r\n return value;\r\n };\r\n DataSanitizer.sanitizeUrl = function (logger, url) {\r\n return DataSanitizer.sanitizeInput(logger, url, DataSanitizer.MAX_URL_LENGTH, applicationinsights_core_js_1._InternalMessageId.UrlTooLong);\r\n };\r\n DataSanitizer.sanitizeMessage = function (logger, message) {\r\n if (message) {\r\n if (message.length > DataSanitizer.MAX_MESSAGE_LENGTH) {\r\n message = message.substring(0, DataSanitizer.MAX_MESSAGE_LENGTH);\r\n logger.throwInternal(applicationinsights_core_js_1.LoggingSeverity.WARNING, applicationinsights_core_js_1._InternalMessageId.MessageTruncated, \"message is too long, it has been truncated to \" + DataSanitizer.MAX_MESSAGE_LENGTH + \" characters.\", { message: message }, true);\r\n }\r\n }\r\n return message;\r\n };\r\n DataSanitizer.sanitizeException = function (logger, exception) {\r\n if (exception) {\r\n if (exception.length > DataSanitizer.MAX_EXCEPTION_LENGTH) {\r\n exception = exception.substring(0, DataSanitizer.MAX_EXCEPTION_LENGTH);\r\n logger.throwInternal(applicationinsights_core_js_1.LoggingSeverity.WARNING, applicationinsights_core_js_1._InternalMessageId.ExceptionTruncated, \"exception is too long, it has been truncated to \" + DataSanitizer.MAX_EXCEPTION_LENGTH + \" characters.\", { exception: exception }, true);\r\n }\r\n }\r\n return exception;\r\n };\r\n DataSanitizer.sanitizeProperties = function (logger, properties) {\r\n if (properties) {\r\n var tempProps = {};\r\n for (var prop in properties) {\r\n var value = DataSanitizer.sanitizeString(logger, properties[prop], DataSanitizer.MAX_PROPERTY_LENGTH);\r\n prop = DataSanitizer.sanitizeKeyAndAddUniqueness(logger, prop, tempProps);\r\n tempProps[prop] = value;\r\n }\r\n properties = tempProps;\r\n }\r\n return properties;\r\n };\r\n DataSanitizer.sanitizeMeasurements = function (logger, measurements) {\r\n if (measurements) {\r\n var tempMeasurements = {};\r\n for (var measure in measurements) {\r\n var value = measurements[measure];\r\n measure = DataSanitizer.sanitizeKeyAndAddUniqueness(logger, measure, tempMeasurements);\r\n tempMeasurements[measure] = value;\r\n }\r\n measurements = tempMeasurements;\r\n }\r\n return measurements;\r\n };\r\n DataSanitizer.sanitizeId = function (logger, id) {\r\n return id ? DataSanitizer.sanitizeInput(logger, id, DataSanitizer.MAX_ID_LENGTH, applicationinsights_core_js_1._InternalMessageId.IdTooLong).toString() : id;\r\n };\r\n DataSanitizer.sanitizeInput = function (logger, input, maxLength, _msgId) {\r\n if (input) {\r\n input = Util_1.Util.trim(input);\r\n if (input.length > maxLength) {\r\n input = input.substring(0, maxLength);\r\n logger.throwInternal(applicationinsights_core_js_1.LoggingSeverity.WARNING, _msgId, \"input is too long, it has been truncated to \" + maxLength + \" characters.\", { data: input }, true);\r\n }\r\n }\r\n return input;\r\n };\r\n DataSanitizer.padNumber = function (num) {\r\n var s = \"00\" + num;\r\n return s.substr(s.length - 3);\r\n };\r\n /**\r\n * Max length allowed for custom names.\r\n */\r\n DataSanitizer.MAX_NAME_LENGTH = 150;\r\n /**\r\n * Max length allowed for Id field in page views.\r\n */\r\n DataSanitizer.MAX_ID_LENGTH = 128;\r\n /**\r\n * Max length allowed for custom values.\r\n */\r\n DataSanitizer.MAX_PROPERTY_LENGTH = 8192;\r\n /**\r\n * Max length allowed for names\r\n */\r\n DataSanitizer.MAX_STRING_LENGTH = 1024;\r\n /**\r\n * Max length allowed for url.\r\n */\r\n DataSanitizer.MAX_URL_LENGTH = 2048;\r\n /**\r\n * Max length allowed for messages.\r\n */\r\n DataSanitizer.MAX_MESSAGE_LENGTH = 32768;\r\n /**\r\n * Max length allowed for exceptions.\r\n */\r\n DataSanitizer.MAX_EXCEPTION_LENGTH = 32768;\r\n return DataSanitizer;\r\n }());\r\n exports.DataSanitizer = DataSanitizer;\r\n});\r\n//# sourceMappingURL=DataSanitizer.js.map","var __extends = (this && this.__extends) || (function () {\r\n var extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return function (d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\ndefine([\"require\", \"exports\", \"../../Interfaces/Contracts/Generated/Envelope\", \"./DataSanitizer\", \"../../Enums\", \"../../Util\"], function (require, exports, Envelope_1, DataSanitizer_1, Enums_1, Util_1) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n var Envelope = /** @class */ (function (_super) {\r\n __extends(Envelope, _super);\r\n /**\r\n * Constructs a new instance of telemetry data.\r\n */\r\n function Envelope(logger, data, name) {\r\n var _this = _super.call(this) || this;\r\n _this.name = DataSanitizer_1.DataSanitizer.sanitizeString(logger, name) || Util_1.Util.NotSpecified;\r\n _this.data = data;\r\n _this.time = Util_1.Util.toISOStringForIE8(new Date());\r\n _this.aiDataContract = {\r\n time: Enums_1.FieldType.Required,\r\n iKey: Enums_1.FieldType.Required,\r\n name: Enums_1.FieldType.Required,\r\n sampleRate: function () {\r\n return (_this.sampleRate == 100) ? Enums_1.FieldType.Hidden : Enums_1.FieldType.Required;\r\n },\r\n tags: Enums_1.FieldType.Required,\r\n data: Enums_1.FieldType.Required\r\n };\r\n return _this;\r\n }\r\n return Envelope;\r\n }(Envelope_1.Envelope));\r\n exports.Envelope = Envelope;\r\n});\r\n//# sourceMappingURL=Envelope.js.map","var __extends = (this && this.__extends) || (function () {\r\n var extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return function (d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\ndefine([\"require\", \"exports\", \"../Interfaces/Contracts/Generated/EventData\", \"./Common/DataSanitizer\", \"../Enums\", \"../Util\"], function (require, exports, EventData_1, DataSanitizer_1, Enums_1, Util_1) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n var Event = /** @class */ (function (_super) {\r\n __extends(Event, _super);\r\n /**\r\n * Constructs a new instance of the EventTelemetry object\r\n */\r\n function Event(logger, name, properties, measurements) {\r\n var _this = _super.call(this) || this;\r\n _this.aiDataContract = {\r\n ver: Enums_1.FieldType.Required,\r\n name: Enums_1.FieldType.Required,\r\n properties: Enums_1.FieldType.Default,\r\n measurements: Enums_1.FieldType.Default\r\n };\r\n _this.name = DataSanitizer_1.DataSanitizer.sanitizeString(logger, name) || Util_1.Util.NotSpecified;\r\n _this.properties = DataSanitizer_1.DataSanitizer.sanitizeProperties(logger, properties);\r\n _this.measurements = DataSanitizer_1.DataSanitizer.sanitizeMeasurements(logger, measurements);\r\n return _this;\r\n }\r\n Event.envelopeType = \"Microsoft.ApplicationInsights.{0}.Event\";\r\n Event.dataType = \"EventData\";\r\n return Event;\r\n }(EventData_1.EventData));\r\n exports.Event = Event;\r\n});\r\n//# sourceMappingURL=Event.js.map","var __extends = (this && this.__extends) || (function () {\r\n var extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return function (d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\ndefine([\"require\", \"exports\", \"../Interfaces/Contracts/Generated/StackFrame\", \"../Interfaces/Contracts/Generated/ExceptionData\", \"../Interfaces/Contracts/Generated/ExceptionDetails\", \"./Common/DataSanitizer\", \"../Enums\", \"../Util\"], function (require, exports, StackFrame_1, ExceptionData_1, ExceptionDetails_1, DataSanitizer_1, Enums_1, Util_1) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n var Exception = /** @class */ (function (_super) {\r\n __extends(Exception, _super);\r\n /**\r\n * Constructs a new isntance of the ExceptionTelemetry object\r\n */\r\n function Exception(logger, exception, properties, measurements, severityLevel) {\r\n var _this = _super.call(this) || this;\r\n _this.aiDataContract = {\r\n ver: Enums_1.FieldType.Required,\r\n exceptions: Enums_1.FieldType.Required,\r\n severityLevel: Enums_1.FieldType.Default,\r\n properties: Enums_1.FieldType.Default,\r\n measurements: Enums_1.FieldType.Default\r\n };\r\n _this.properties = DataSanitizer_1.DataSanitizer.sanitizeProperties(logger, properties);\r\n _this.measurements = DataSanitizer_1.DataSanitizer.sanitizeMeasurements(logger, measurements);\r\n _this.exceptions = [new _ExceptionDetails(logger, exception)];\r\n if (severityLevel) {\r\n _this.severityLevel = severityLevel;\r\n }\r\n return _this;\r\n }\r\n /**\r\n * Creates a simple exception with 1 stack frame. Useful for manual constracting of exception.\r\n */\r\n Exception.CreateSimpleException = function (message, typeName, assembly, fileName, details, line) {\r\n return {\r\n exceptions: [\r\n {\r\n hasFullStack: true,\r\n message: message,\r\n stack: details,\r\n typeName: typeName\r\n }\r\n ]\r\n };\r\n };\r\n Exception.envelopeType = \"Microsoft.ApplicationInsights.{0}.Exception\";\r\n Exception.dataType = \"ExceptionData\";\r\n return Exception;\r\n }(ExceptionData_1.ExceptionData));\r\n exports.Exception = Exception;\r\n var _ExceptionDetails = /** @class */ (function (_super) {\r\n __extends(_ExceptionDetails, _super);\r\n function _ExceptionDetails(logger, exception) {\r\n var _this = _super.call(this) || this;\r\n _this.aiDataContract = {\r\n id: Enums_1.FieldType.Default,\r\n outerId: Enums_1.FieldType.Default,\r\n typeName: Enums_1.FieldType.Required,\r\n message: Enums_1.FieldType.Required,\r\n hasFullStack: Enums_1.FieldType.Default,\r\n stack: Enums_1.FieldType.Default,\r\n parsedStack: Enums_1.FieldType.Array\r\n };\r\n _this.typeName = DataSanitizer_1.DataSanitizer.sanitizeString(logger, exception.name) || Util_1.Util.NotSpecified;\r\n _this.message = DataSanitizer_1.DataSanitizer.sanitizeMessage(logger, exception.message) || Util_1.Util.NotSpecified;\r\n var stack = exception[\"stack\"];\r\n _this.parsedStack = _this.parseStack(stack);\r\n _this.stack = DataSanitizer_1.DataSanitizer.sanitizeException(logger, stack);\r\n _this.hasFullStack = Util_1.Util.isArray(_this.parsedStack) && _this.parsedStack.length > 0;\r\n return _this;\r\n }\r\n _ExceptionDetails.prototype.parseStack = function (stack) {\r\n var parsedStack = undefined;\r\n if (typeof stack === \"string\") {\r\n var frames = stack.split('\\n');\r\n parsedStack = [];\r\n var level = 0;\r\n var totalSizeInBytes = 0;\r\n for (var i = 0; i <= frames.length; i++) {\r\n var frame = frames[i];\r\n if (_StackFrame.regex.test(frame)) {\r\n var parsedFrame = new _StackFrame(frames[i], level++);\r\n totalSizeInBytes += parsedFrame.sizeInBytes;\r\n parsedStack.push(parsedFrame);\r\n }\r\n }\r\n // DP Constraint - exception parsed stack must be < 32KB\r\n // remove frames from the middle to meet the threshold\r\n var exceptionParsedStackThreshold = 32 * 1024;\r\n if (totalSizeInBytes > exceptionParsedStackThreshold) {\r\n var left = 0;\r\n var right = parsedStack.length - 1;\r\n var size = 0;\r\n var acceptedLeft = left;\r\n var acceptedRight = right;\r\n while (left < right) {\r\n // check size\r\n var lSize = parsedStack[left].sizeInBytes;\r\n var rSize = parsedStack[right].sizeInBytes;\r\n size += lSize + rSize;\r\n if (size > exceptionParsedStackThreshold) {\r\n // remove extra frames from the middle\r\n var howMany = acceptedRight - acceptedLeft + 1;\r\n parsedStack.splice(acceptedLeft, howMany);\r\n break;\r\n }\r\n // update pointers\r\n acceptedLeft = left;\r\n acceptedRight = right;\r\n left++;\r\n right--;\r\n }\r\n }\r\n }\r\n return parsedStack;\r\n };\r\n return _ExceptionDetails;\r\n }(ExceptionDetails_1.ExceptionDetails));\r\n var _StackFrame = /** @class */ (function (_super) {\r\n __extends(_StackFrame, _super);\r\n function _StackFrame(frame, level) {\r\n var _this = _super.call(this) || this;\r\n _this.sizeInBytes = 0;\r\n _this.aiDataContract = {\r\n level: Enums_1.FieldType.Required,\r\n method: Enums_1.FieldType.Required,\r\n assembly: Enums_1.FieldType.Default,\r\n fileName: Enums_1.FieldType.Default,\r\n line: Enums_1.FieldType.Default\r\n };\r\n _this.level = level;\r\n _this.method = \"<no_method>\";\r\n _this.assembly = Util_1.Util.trim(frame);\r\n var matches = frame.match(_StackFrame.regex);\r\n if (matches && matches.length >= 5) {\r\n _this.method = Util_1.Util.trim(matches[2]) || _this.method;\r\n _this.fileName = Util_1.Util.trim(matches[4]);\r\n _this.line = parseInt(matches[5]) || 0;\r\n }\r\n _this.sizeInBytes += _this.method.length;\r\n _this.sizeInBytes += _this.fileName.length;\r\n _this.sizeInBytes += _this.assembly.length;\r\n // todo: these might need to be removed depending on how the back-end settles on their size calculation\r\n _this.sizeInBytes += _StackFrame.baseSize;\r\n _this.sizeInBytes += _this.level.toString().length;\r\n _this.sizeInBytes += _this.line.toString().length;\r\n return _this;\r\n }\r\n // regex to match stack frames from ie/chrome/ff\r\n // methodName=$2, fileName=$4, lineNo=$5, column=$6\r\n _StackFrame.regex = /^([\\s]+at)?(.*?)(\\@|\\s\\(|\\s)([^\\(\\@\\n]+):([0-9]+):([0-9]+)(\\)?)$/;\r\n _StackFrame.baseSize = 58; //'{\"method\":\"\",\"level\":,\"assembly\":\"\",\"fileName\":\"\",\"line\":}'.length\r\n return _StackFrame;\r\n }(StackFrame_1.StackFrame));\r\n exports._StackFrame = _StackFrame;\r\n});\r\n//# sourceMappingURL=Exception.js.map","var __extends = (this && this.__extends) || (function () {\r\n var extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return function (d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\ndefine([\"require\", \"exports\", \"../Interfaces/Contracts/Generated/MetricData\", \"./Common/DataSanitizer\", \"../Enums\", \"./Common/DataPoint\", \"../Util\"], function (require, exports, MetricData_1, DataSanitizer_1, Enums_1, DataPoint_1, Util_1) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n var Metric = /** @class */ (function (_super) {\r\n __extends(Metric, _super);\r\n /**\r\n * Constructs a new instance of the MetricTelemetry object\r\n */\r\n function Metric(logger, name, value, count, min, max, properties) {\r\n var _this = _super.call(this) || this;\r\n _this.aiDataContract = {\r\n ver: Enums_1.FieldType.Required,\r\n metrics: Enums_1.FieldType.Required,\r\n properties: Enums_1.FieldType.Default\r\n };\r\n var dataPoint = new DataPoint_1.DataPoint();\r\n dataPoint.count = count > 0 ? count : undefined;\r\n dataPoint.max = isNaN(max) || max === null ? undefined : max;\r\n dataPoint.min = isNaN(min) || min === null ? undefined : min;\r\n dataPoint.name = DataSanitizer_1.DataSanitizer.sanitizeString(logger, name) || Util_1.Util.NotSpecified;\r\n dataPoint.value = value;\r\n _this.metrics = [dataPoint];\r\n _this.properties = DataSanitizer_1.DataSanitizer.sanitizeProperties(logger, properties);\r\n return _this;\r\n }\r\n Metric.envelopeType = \"Microsoft.ApplicationInsights.{0}.Metric\";\r\n Metric.dataType = \"MetricData\";\r\n return Metric;\r\n }(MetricData_1.MetricData));\r\n exports.Metric = Metric;\r\n});\r\n//# sourceMappingURL=Metric.js.map","var __extends = (this && this.__extends) || (function () {\r\n var extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return function (d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\ndefine([\"require\", \"exports\", \"../Interfaces/Contracts/Generated/PageViewData\", \"./Common/DataSanitizer\", \"../Enums\", \"../Util\"], function (require, exports, PageViewData_1, DataSanitizer_1, Enums_1, Util_1) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n var PageView = /** @class */ (function (_super) {\r\n __extends(PageView, _super);\r\n /**\r\n * Constructs a new instance of the PageEventTelemetry object\r\n */\r\n function PageView(logger, name, url, durationMs, properties, measurements, id) {\r\n var _this = _super.call(this) || this;\r\n _this.aiDataContract = {\r\n ver: Enums_1.FieldType.Required,\r\n name: Enums_1.FieldType.Default,\r\n url: Enums_1.FieldType.Default,\r\n duration: Enums_1.FieldType.Default,\r\n properties: Enums_1.FieldType.Default,\r\n measurements: Enums_1.FieldType.Default,\r\n id: Enums_1.FieldType.Default,\r\n };\r\n _this.id = DataSanitizer_1.DataSanitizer.sanitizeId(logger, id);\r\n _this.url = DataSanitizer_1.DataSanitizer.sanitizeUrl(logger, url);\r\n _this.name = DataSanitizer_1.DataSanitizer.sanitizeString(logger, name) || Util_1.Util.NotSpecified;\r\n if (!isNaN(durationMs)) {\r\n _this.duration = Util_1.Util.msToTimeSpan(durationMs);\r\n }\r\n _this.properties = DataSanitizer_1.DataSanitizer.sanitizeProperties(logger, properties);\r\n _this.measurements = DataSanitizer_1.DataSanitizer.sanitizeMeasurements(logger, measurements);\r\n return _this;\r\n }\r\n PageView.envelopeType = \"Microsoft.ApplicationInsights.{0}.Pageview\";\r\n PageView.dataType = \"PageviewData\";\r\n return PageView;\r\n }(PageViewData_1.PageViewData));\r\n exports.PageView = PageView;\r\n});\r\n//# sourceMappingURL=PageView.js.map","var __extends = (this && this.__extends) || (function () {\r\n var extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return function (d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\ndefine([\"require\", \"exports\", \"../Interfaces/Contracts/Generated/PageViewPerfData\", \"../Enums\", \"./Common/DataSanitizer\", \"../Util\", \"applicationinsights-core-js\"], function (require, exports, PageViewPerfData_1, Enums_1, DataSanitizer_1, Util_1, applicationinsights_core_js_1) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n var PageViewPerformance = /** @class */ (function (_super) {\r\n __extends(PageViewPerformance, _super);\r\n /**\r\n * Constructs a new instance of the PageEventTelemetry object\r\n */\r\n function PageViewPerformance(logger, name, url, unused, properties, measurements) {\r\n var _this = _super.call(this) || this;\r\n _this.aiDataContract = {\r\n ver: Enums_1.FieldType.Required,\r\n name: Enums_1.FieldType.Default,\r\n url: Enums_1.FieldType.Default,\r\n duration: Enums_1.FieldType.Default,\r\n perfTotal: Enums_1.FieldType.Default,\r\n networkConnect: Enums_1.FieldType.Default,\r\n sentRequest: Enums_1.FieldType.Default,\r\n receivedResponse: Enums_1.FieldType.Default,\r\n domProcessing: Enums_1.FieldType.Default,\r\n properties: Enums_1.FieldType.Default,\r\n measurements: Enums_1.FieldType.Default\r\n };\r\n _this.isValid = false;\r\n /*\r\n * http://www.w3.org/TR/navigation-timing/#processing-model\r\n * |-navigationStart\r\n * | |-connectEnd\r\n * | ||-requestStart\r\n * | || |-responseStart\r\n * | || | |-responseEnd\r\n * | || | |\r\n * | || | | |-loadEventEnd\r\n * |---network---||---request---|---response---|---dom---|\r\n * |--------------------------total----------------------|\r\n */\r\n var timing = PageViewPerformance.getPerformanceTiming();\r\n if (timing) {\r\n var total = PageViewPerformance.getDuration(timing.navigationStart, timing.loadEventEnd);\r\n var network = PageViewPerformance.getDuration(timing.navigationStart, timing.connectEnd);\r\n var request = PageViewPerformance.getDuration(timing.requestStart, timing.responseStart);\r\n var response = PageViewPerformance.getDuration(timing.responseStart, timing.responseEnd);\r\n var dom = PageViewPerformance.getDuration(timing.responseEnd, timing.loadEventEnd);\r\n if (total == 0) {\r\n logger.throwInternal(applicationinsights_core_js_1.LoggingSeverity.WARNING, applicationinsights_core_js_1._InternalMessageId.ErrorPVCalc, \"error calculating page view performance.\", { total: total, network: network, request: request, response: response, dom: dom });\r\n }\r\n else if (!PageViewPerformance.shouldCollectDuration(total, network, request, response, dom)) {\r\n logger.throwInternal(applicationinsights_core_js_1.LoggingSeverity.WARNING, applicationinsights_core_js_1._InternalMessageId.InvalidDurationValue, \"Invalid page load duration value. Browser perf data won't be sent.\", { total: total, network: network, request: request, response: response, dom: dom });\r\n }\r\n else if (total < Math.floor(network) + Math.floor(request) + Math.floor(response) + Math.floor(dom)) {\r\n // some browsers may report individual components incorrectly so that the sum of the parts will be bigger than total PLT\r\n // in this case, don't report client performance from this page\r\n logger.throwInternal(applicationinsights_core_js_1.LoggingSeverity.WARNING, applicationinsights_core_js_1._InternalMessageId.ClientPerformanceMathError, \"client performance math error.\", { total: total, network: network, request: request, response: response, dom: dom });\r\n }\r\n else {\r\n _this.durationMs = total;\r\n // convert to timespans\r\n _this.perfTotal = _this.duration = Util_1.Util.msToTimeSpan(total);\r\n _this.networkConnect = Util_1.Util.msToTimeSpan(network);\r\n _this.sentRequest = Util_1.Util.msToTimeSpan(request);\r\n _this.receivedResponse = Util_1.Util.msToTimeSpan(response);\r\n _this.domProcessing = Util_1.Util.msToTimeSpan(dom);\r\n _this.isValid = true;\r\n }\r\n }\r\n _this.url = DataSanitizer_1.DataSanitizer.sanitizeUrl(logger, url);\r\n _this.name = DataSanitizer_1.DataSanitizer.sanitizeString(logger, name) || Util_1.Util.NotSpecified;\r\n _this.properties = DataSanitizer_1.DataSanitizer.sanitizeProperties(logger, properties);\r\n _this.measurements = DataSanitizer_1.DataSanitizer.sanitizeMeasurements(logger, measurements);\r\n return _this;\r\n }\r\n /**\r\n * Indicates whether this instance of PageViewPerformance is valid and should be sent\r\n */\r\n PageViewPerformance.prototype.getIsValid = function () {\r\n return this.isValid;\r\n };\r\n /**\r\n * Gets the total duration (PLT) in milliseconds. Check getIsValid() before using this method.\r\n */\r\n PageViewPerformance.prototype.getDurationMs = function () {\r\n return this.durationMs;\r\n };\r\n PageViewPerformance.getPerformanceTiming = function () {\r\n if (PageViewPerformance.isPerformanceTimingSupported()) {\r\n return window.performance.timing;\r\n }\r\n return null;\r\n };\r\n /**\r\n * Returns true is window performance timing API is supported, false otherwise.\r\n */\r\n PageViewPerformance.isPerformanceTimingSupported = function () {\r\n return typeof window != \"undefined\" && window.performance && window.performance.timing;\r\n };\r\n /**\r\n * As page loads different parts of performance timing numbers get set. When all of them are set we can report it.\r\n * Returns true if ready, false otherwise.\r\n */\r\n PageViewPerformance.isPerformanceTimingDataReady = function () {\r\n var timing = window.performance.timing;\r\n return timing.domainLookupStart > 0\r\n && timing.navigationStart > 0\r\n && timing.responseStart > 0\r\n && timing.requestStart > 0\r\n && timing.loadEventEnd > 0\r\n && timing.responseEnd > 0\r\n && timing.connectEnd > 0\r\n && timing.domLoading > 0;\r\n };\r\n PageViewPerformance.getDuration = function (start, end) {\r\n var duration = undefined;\r\n if (!(isNaN(start) || isNaN(end))) {\r\n duration = Math.max(end - start, 0);\r\n }\r\n return duration;\r\n };\r\n /**\r\n * This method tells if given durations should be excluded from collection.\r\n */\r\n PageViewPerformance.shouldCollectDuration = function () {\r\n var durations = [];\r\n for (var _i = 0; _i < arguments.length; _i++) {\r\n durations[_i] = arguments[_i];\r\n }\r\n // a full list of Google crawlers user agent strings - https://support.google.com/webmasters/answer/1061943?hl=en\r\n var botAgentNames = ['googlebot', 'adsbot-google', 'apis-google', 'mediapartners-google'];\r\n var userAgent = navigator.userAgent;\r\n var isGoogleBot = false;\r\n if (userAgent) {\r\n for (var i_1 = 0; i_1 < botAgentNames.length; i_1++) {\r\n isGoogleBot = isGoogleBot || userAgent.toLowerCase().indexOf(botAgentNames[i_1]) !== -1;\r\n }\r\n }\r\n if (isGoogleBot) {\r\n // Don't report durations for GoogleBot, it is returning invalid values in performance.timing API. \r\n return false;\r\n }\r\n else {\r\n // for other page views, don't report if it's outside of a reasonable range\r\n for (var i = 0; i < durations.length; i++) {\r\n if (durations[i] >= PageViewPerformance.MAX_DURATION_ALLOWED) {\r\n return false;\r\n }\r\n }\r\n }\r\n return true;\r\n };\r\n PageViewPerformance.envelopeType = \"Microsoft.ApplicationInsights.{0}.PageviewPerformance\";\r\n PageViewPerformance.dataType = \"PageviewPerformanceData\";\r\n PageViewPerformance.MAX_DURATION_ALLOWED = 3600000; // 1h\r\n return PageViewPerformance;\r\n }(PageViewPerfData_1.PageViewPerfData));\r\n exports.PageViewPerformance = PageViewPerformance;\r\n});\r\n//# sourceMappingURL=PageViewPerformance.js.map","var __extends = (this && this.__extends) || (function () {\r\n var extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return function (d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\ndefine([\"require\", \"exports\", \"./Common/DataSanitizer\", \"../Enums\", \"../Util\", \"../Util\", \"../Interfaces/Contracts/Generated/RemoteDependencyData\"], function (require, exports, DataSanitizer_1, Enums_1, Util_1, Util_2, RemoteDependencyData_1) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n var RemoteDependencyData = /** @class */ (function (_super) {\r\n __extends(RemoteDependencyData, _super);\r\n /**\r\n * Constructs a new instance of the RemoteDependencyData object\r\n */\r\n function RemoteDependencyData(logger, id, absoluteUrl, commandName, value, success, resultCode, method, properties, measurements) {\r\n var _this = _super.call(this) || this;\r\n _this.aiDataContract = {\r\n id: Enums_1.FieldType.Required,\r\n ver: Enums_1.FieldType.Required,\r\n name: Enums_1.FieldType.Default,\r\n resultCode: Enums_1.FieldType.Default,\r\n duration: Enums_1.FieldType.Default,\r\n success: Enums_1.FieldType.Default,\r\n data: Enums_1.FieldType.Default,\r\n target: Enums_1.FieldType.Default,\r\n type: Enums_1.FieldType.Default,\r\n properties: Enums_1.FieldType.Default,\r\n measurements: Enums_1.FieldType.Default,\r\n kind: Enums_1.FieldType.Default,\r\n value: Enums_1.FieldType.Default,\r\n count: Enums_1.FieldType.Default,\r\n min: Enums_1.FieldType.Default,\r\n max: Enums_1.FieldType.Default,\r\n stdDev: Enums_1.FieldType.Default,\r\n dependencyKind: Enums_1.FieldType.Default,\r\n dependencySource: Enums_1.FieldType.Default,\r\n commandName: Enums_1.FieldType.Default,\r\n dependencyTypeName: Enums_1.FieldType.Default,\r\n };\r\n _this.id = id;\r\n _this.duration = Util_1.Util.msToTimeSpan(value);\r\n _this.success = success;\r\n _this.resultCode = resultCode + \"\";\r\n _this.type = \"Ajax\";\r\n _this.data = DataSanitizer_1.DataSanitizer.sanitizeUrl(logger, commandName);\r\n var dependencyFields = Util_2.AjaxHelper.ParseDependencyPath(logger, absoluteUrl, method, commandName);\r\n _this.target = dependencyFields.target;\r\n _this.name = dependencyFields.name;\r\n _this.properties = DataSanitizer_1.DataSanitizer.sanitizeProperties(logger, properties);\r\n _this.measurements = DataSanitizer_1.DataSanitizer.sanitizeMeasurements(logger, measurements);\r\n return _this;\r\n }\r\n RemoteDependencyData.envelopeType = \"Microsoft.ApplicationInsights.{0}.RemoteDependency\";\r\n RemoteDependencyData.dataType = \"RemoteDependencyData\";\r\n return RemoteDependencyData;\r\n }(RemoteDependencyData_1.RemoteDependencyData));\r\n exports.RemoteDependencyData = RemoteDependencyData;\r\n});\r\n//# sourceMappingURL=RemoteDependencyData.js.map","var __extends = (this && this.__extends) || (function () {\r\n var extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return function (d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n };\r\n})();\r\ndefine([\"require\", \"exports\", \"../Interfaces/Contracts/Generated/MessageData\", \"./Common/DataSanitizer\", \"../Enums\", \"../Util\"], function (require, exports, MessageData_1, DataSanitizer_1, Enums_1, Util_1) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n var Trace = /** @class */ (function (_super) {\r\n __extends(Trace, _super);\r\n /**\r\n * Constructs a new instance of the TraceTelemetry object\r\n */\r\n function Trace(logger, message, properties, severityLevel) {\r\n var _this = _super.call(this) || this;\r\n _this.aiDataContract = {\r\n ver: Enums_1.FieldType.Required,\r\n message: Enums_1.FieldType.Required,\r\n severityLevel: Enums_1.FieldType.Default,\r\n properties: Enums_1.FieldType.Default\r\n };\r\n message = message || Util_1.Util.NotSpecified;\r\n _this.message = DataSanitizer_1.DataSanitizer.sanitizeMessage(logger, message);\r\n _this.properties = DataSanitizer_1.DataSanitizer.sanitizeProperties(logger, properties);\r\n if (severityLevel) {\r\n _this.severityLevel = severityLevel;\r\n }\r\n return _this;\r\n }\r\n Trace.envelopeType = \"Microsoft.ApplicationInsights.{0}.Message\";\r\n Trace.dataType = \"MessageData\";\r\n return Trace;\r\n }(MessageData_1.MessageData));\r\n exports.Trace = Trace;\r\n});\r\n//# sourceMappingURL=Trace.js.map","define([\"require\", \"exports\", \"./Util\", \"./Telemetry/Common/DataSanitizer\", \"applicationinsights-core-js\"], function (require, exports, Util_1, DataSanitizer_1, applicationinsights_core_js_1) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n var TelemetryItemCreator = /** @class */ (function () {\r\n function TelemetryItemCreator() {\r\n }\r\n /**\r\n * Create a telemetry item that the 1DS channel understands\r\n * @param item domain specific properties; part B\r\n * @param baseType telemetry item type. ie PageViewData\r\n * @param envelopeName name of the envelope. ie Microsoft.ApplicationInsights.<instrumentation key>.PageView\r\n * @param customProperties user defined custom properties; part C\r\n * @param systemProperties system properties that are added to the context; part A\r\n * @returns ITelemetryItem that is sent to channel\r\n */\r\n TelemetryItemCreator.create = function (item, baseType, envelopeName, logger, customProperties, systemProperties) {\r\n envelopeName = DataSanitizer_1.DataSanitizer.sanitizeString(logger, envelopeName) || Util_1.Util.NotSpecified;\r\n if (applicationinsights_core_js_1.CoreUtils.isNullOrUndefined(item) ||\r\n applicationinsights_core_js_1.CoreUtils.isNullOrUndefined(baseType) ||\r\n applicationinsights_core_js_1.CoreUtils.isNullOrUndefined(envelopeName)) {\r\n throw Error(\"Input doesn't contain all required fields\");\r\n }\r\n var telemetryItem = {\r\n name: envelopeName,\r\n timestamp: new Date(),\r\n instrumentationKey: \"\",\r\n ctx: systemProperties ? systemProperties : {},\r\n tags: [],\r\n data: {},\r\n baseType: baseType,\r\n baseData: item\r\n };\r\n // Part C\r\n if (!applicationinsights_core_js_1.CoreUtils.isNullOrUndefined(customProperties)) {\r\n for (var prop in customProperties) {\r\n if (customProperties.hasOwnProperty(prop)) {\r\n telemetryItem.data[prop] = customProperties[prop];\r\n }\r\n }\r\n }\r\n return telemetryItem;\r\n };\r\n return TelemetryItemCreator;\r\n }());\r\n exports.TelemetryItemCreator = TelemetryItemCreator;\r\n});\r\n//# sourceMappingURL=TelemetryItemCreator.js.map","define([\"require\", \"exports\", \"./Enums\", \"applicationinsights-core-js\", \"./RequestResponseHeaders\", \"./Telemetry/Common/DataSanitizer\"], function (require, exports, Enums_1, applicationinsights_core_js_1, RequestResponseHeaders_1, DataSanitizer_1) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n var Util = /** @class */ (function () {\r\n function Util() {\r\n }\r\n /*\r\n * Force the SDK not to use local and session storage\r\n */\r\n Util.disableStorage = function () {\r\n Util._canUseLocalStorage = false;\r\n Util._canUseSessionStorage = false;\r\n };\r\n /**\r\n * Gets the localStorage object if available\r\n * @return {Storage} - Returns the storage object if available else returns null\r\n */\r\n Util._getLocalStorageObject = function () {\r\n if (Util.canUseLocalStorage()) {\r\n return Util._getVerifiedStorageObject(Enums_1.StorageType.LocalStorage);\r\n }\r\n return null;\r\n };\r\n /**\r\n * Tests storage object (localStorage or sessionStorage) to verify that it is usable\r\n * More details here: https://mathiasbynens.be/notes/localstorage-pattern\r\n * @param storageType Type of storage\r\n * @return {Storage} Returns storage object verified that it is usable\r\n */\r\n Util._getVerifiedStorageObject = function (storageType) {\r\n var storage = null;\r\n var fail;\r\n var uid;\r\n try {\r\n uid = new Date;\r\n storage = storageType === Enums_1.StorageType.LocalStorage ? window.localStorage : window.sessionStorage;\r\n storage.setItem(uid, uid);\r\n fail = storage.getItem(uid) != uid;\r\n storage.removeItem(uid);\r\n if (fail) {\r\n storage = null;\r\n }\r\n }\r\n catch (exception) {\r\n storage = null;\r\n }\r\n return storage;\r\n };\r\n /**\r\n * Checks if endpoint URL is application insights internal injestion service URL.\r\n *\r\n * @param endpointUrl Endpoint URL to check.\r\n * @returns {boolean} True if if endpoint URL is application insights internal injestion service URL.\r\n */\r\n Util.isInternalApplicationInsightsEndpoint = function (endpointUrl) {\r\n return Util._internalEndpoints.indexOf(endpointUrl.toLowerCase()) !== -1;\r\n };\r\n /**\r\n * Check if the browser supports local storage.\r\n *\r\n * @returns {boolean} True if local storage is supported.\r\n */\r\n Util.canUseLocalStorage = function () {\r\n if (Util._canUseLocalStorage === undefined) {\r\n Util._canUseLocalStorage = !!Util._getVerifiedStorageObject(Enums_1.StorageType.LocalStorage);\r\n }\r\n return Util._canUseLocalStorage;\r\n };\r\n /**\r\n * Get an object from the browser's local storage\r\n *\r\n * @param {string} name - the name of the object to get from storage\r\n * @returns {string} The contents of the storage object with the given name. Null if storage is not supported.\r\n */\r\n Util.getStorage = function (logger, name) {\r\n var storage = Util._getLocalStorageObject();\r\n if (storage !== null) {\r\n try {\r\n return storage.getItem(name);\r\n }\r\n catch (e) {\r\n Util._canUseLocalStorage = false;\r\n logger.throwInternal(applicationinsights_core_js_1.LoggingSeverity.WARNING, applicationinsights_core_js_1._InternalMessageId.BrowserCannotReadLocalStorage, \"Browser failed read of local storage. \" + Util.getExceptionName(e), { exception: Util.dump(e) });\r\n }\r\n }\r\n return null;\r\n };\r\n /**\r\n * Set the contents of an object in the browser's local storage\r\n *\r\n * @param {string} name - the name of the object to set in storage\r\n * @param {string} data - the contents of the object to set in storage\r\n * @returns {boolean} True if the storage object could be written.\r\n */\r\n Util.setStorage = function (logger, name, data) {\r\n var storage = Util._getLocalStorageObject();\r\n if (storage !== null) {\r\n try {\r\n storage.setItem(name, data);\r\n return true;\r\n }\r\n catch (e) {\r\n Util._canUseLocalStorage = false;\r\n logger.throwInternal(applicationinsights_core_js_1.LoggingSeverity.WARNING, applicationinsights_core_js_1._InternalMessageId.BrowserCannotWriteLocalStorage, \"Browser failed write to local storage. \" + Util.getExceptionName(e), { exception: Util.dump(e) });\r\n }\r\n }\r\n return false;\r\n };\r\n /**\r\n * Remove an object from the browser's local storage\r\n *\r\n * @param {string} name - the name of the object to remove from storage\r\n * @returns {boolean} True if the storage object could be removed.\r\n */\r\n Util.removeStorage = function (logger, name) {\r\n var storage = Util._getLocalStorageObject();\r\n if (storage !== null) {\r\n try {\r\n storage.removeItem(name);\r\n return true;\r\n }\r\n catch (e) {\r\n Util._canUseLocalStorage = false;\r\n logger.throwInternal(applicationinsights_core_js_1.LoggingSeverity.WARNING, applicationinsights_core_js_1._InternalMessageId.BrowserFailedRemovalFromLocalStorage, \"Browser failed removal of local storage item. \" + Util.getExceptionName(e), { exception: Util.dump(e) });\r\n }\r\n }\r\n return false;\r\n };\r\n /**\r\n * Gets the sessionStorage object if available\r\n * @return {Storage} - Returns the storage object if available else returns null\r\n */\r\n Util._getSessionStorageObject = function () {\r\n if (Util.canUseSessionStorage()) {\r\n return Util._getVerifiedStorageObject(Enums_1.StorageType.SessionStorage);\r\n }\r\n return null;\r\n };\r\n /**\r\n * Check if the browser supports session storage.\r\n *\r\n * @returns {boolean} True if session storage is supported.\r\n */\r\n Util.canUseSessionStorage = function () {\r\n if (Util._canUseSessionStorage === undefined) {\r\n Util._canUseSessionStorage = !!Util._getVerifiedStorageObject(Enums_1.StorageType.SessionStorage);\r\n }\r\n return Util._canUseSessionStorage;\r\n };\r\n /**\r\n * Gets the list of session storage keys\r\n *\r\n * @returns {string[]} List of session storage keys\r\n */\r\n Util.getSessionStorageKeys = function () {\r\n var keys = [];\r\n if (Util.canUseSessionStorage()) {\r\n for (var key in window.sessionStorage) {\r\n keys.push(key);\r\n }\r\n }\r\n return keys;\r\n };\r\n /**\r\n * Get an object from the browser's session storage\r\n *\r\n * @param {string} name - the name of the object to get from storage\r\n * @returns {string} The contents of the storage object with the given name. Null if storage is not supported.\r\n */\r\n Util.getSessionStorage = function (logger, name) {\r\n var storage = Util._getSessionStorageObject();\r\n if (storage !== null) {\r\n try {\r\n return storage.getItem(name);\r\n }\r\n catch (e) {\r\n Util._canUseSessionStorage = false;\r\n logger.throwInternal(applicationinsights_core_js_1.LoggingSeverity.WARNING, applicationinsights_core_js_1._InternalMessageId.BrowserCannotReadSessionStorage, \"Browser failed read of session storage. \" + Util.getExceptionName(e), { exception: Util.dump(e) });\r\n }\r\n }\r\n return null;\r\n };\r\n /**\r\n * Set the contents of an object in the browser's session storage\r\n *\r\n * @param {string} name - the name of the object to set in storage\r\n * @param {string} data - the contents of the object to set in storage\r\n * @returns {boolean} True if the storage object could be written.\r\n */\r\n Util.setSessionStorage = function (logger, name, data) {\r\n var storage = Util._getSessionStorageObject();\r\n if (storage !== null) {\r\n try {\r\n storage.setItem(name, data);\r\n return true;\r\n }\r\n catch (e) {\r\n Util._canUseSessionStorage = false;\r\n logger.throwInternal(applicationinsights_core_js_1.LoggingSeverity.WARNING, applicationinsights_core_js_1._InternalMessageId.BrowserCannotWriteSessionStorage, \"Browser failed write to session storage. \" + Util.getExceptionName(e), { exception: Util.dump(e) });\r\n }\r\n }\r\n return false;\r\n };\r\n /**\r\n * Remove an object from the browser's session storage\r\n *\r\n * @param {string} name - the name of the object to remove from storage\r\n * @returns {boolean} True if the storage object could be removed.\r\n */\r\n Util.removeSessionStorage = function (logger, name) {\r\n var storage = Util._getSessionStorageObject();\r\n if (storage !== null) {\r\n try {\r\n storage.removeItem(name);\r\n return true;\r\n }\r\n catch (e) {\r\n Util._canUseSessionStorage = false;\r\n logger.throwInternal(applicationinsights_core_js_1.LoggingSeverity.WARNING, applicationinsights_core_js_1._InternalMessageId.BrowserFailedRemovalFromSessionStorage, \"Browser failed removal of session storage item. \" + Util.getExceptionName(e), { exception: Util.dump(e) });\r\n }\r\n }\r\n return false;\r\n };\r\n /*\r\n * Force the SDK not to store and read any data from cookies\r\n */\r\n Util.disableCookies = function () {\r\n Util._canUseCookies = false;\r\n };\r\n /*\r\n * helper method to tell if document.cookie object is available\r\n */\r\n Util.canUseCookies = function (logger) {\r\n if (Util._canUseCookies === undefined) {\r\n Util._canUseCookies = false;\r\n try {\r\n Util._canUseCookies = Util.document.cookie !== undefined;\r\n }\r\n catch (e) {\r\n logger.throwInternal(applicationinsights_core_js_1.LoggingSeverity.WARNING, applicationinsights_core_js_1._InternalMessageId.CannotAccessCookie, \"Cannot access document.cookie - \" + Util.getExceptionName(e), { exception: Util.dump(e) });\r\n }\r\n ;\r\n }\r\n return Util._canUseCookies;\r\n };\r\n /**\r\n * helper method to set userId and sessionId cookie\r\n */\r\n Util.setCookie = function (logger, name, value, domain) {\r\n var domainAttrib = \"\";\r\n var secureAttrib = \"\";\r\n if (domain) {\r\n domainAttrib = \";domain=\" + domain;\r\n }\r\n if (Util.document.location && Util.document.location.protocol === \"https:\") {\r\n secureAttrib = \";secure\";\r\n }\r\n if (Util.canUseCookies(logger)) {\r\n Util.document.cookie = name + \"=\" + value + domainAttrib + \";path=/\" + secureAttrib;\r\n }\r\n };\r\n Util.stringToBoolOrDefault = function (str, defaultValue) {\r\n if (defaultValue === void 0) { defaultValue = false; }\r\n if (str === undefined || str === null) {\r\n return defaultValue;\r\n }\r\n return str.toString().toLowerCase() === \"true\";\r\n };\r\n /**\r\n * helper method to access userId and sessionId cookie\r\n */\r\n Util.getCookie = function (logger, name) {\r\n if (!Util.canUseCookies(logger)) {\r\n return;\r\n }\r\n var value = \"\";\r\n if (name && name.length) {\r\n var cookieName = name + \"=\";\r\n var cookies = Util.document.cookie.split(\";\");\r\n for (var i = 0; i < cookies.length; i++) {\r\n var cookie = cookies[i];\r\n cookie = Util.trim(cookie);\r\n if (cookie && cookie.indexOf(cookieName) === 0) {\r\n value = cookie.substring(cookieName.length, cookies[i].length);\r\n break;\r\n }\r\n }\r\n }\r\n return value;\r\n };\r\n /**\r\n * Deletes a cookie by setting it's expiration time in the past.\r\n * @param name - The name of the cookie to delete.\r\n */\r\n Util.deleteCookie = function (logger, name) {\r\n if (Util.canUseCookies(logger)) {\r\n // Setting the expiration date in the past immediately removes the cookie\r\n Util.document.cookie = name + \"=;path=/;expires=Thu, 01 Jan 1970 00:00:01 GMT;\";\r\n }\r\n };\r\n /**\r\n * helper method to trim strings (IE8 does not implement String.prototype.trim)\r\n */\r\n Util.trim = function (str) {\r\n if (typeof str !== \"string\")\r\n return str;\r\n return str.replace(/^\\s+|\\s+$/g, \"\");\r\n };\r\n /**\r\n * generate random id string\r\n */\r\n Util.newId = function () {\r\n var base64chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\r\n var result = \"\";\r\n var random = Math.random() * 1073741824; //5 symbols in base64, almost maxint\r\n while (random > 0) {\r\n var char = base64chars.charAt(random % 64);\r\n result += char;\r\n random = Math.floor(random / 64);\r\n }\r\n return result;\r\n };\r\n /**\r\n * Check if an object is of type Array\r\n */\r\n Util.isArray = function (obj) {\r\n return Object.prototype.toString.call(obj) === \"[object Array]\";\r\n };\r\n /**\r\n * Check if an object is of type Error\r\n */\r\n Util.isError = function (obj) {\r\n return Object.prototype.toString.call(obj) === \"[object Error]\";\r\n };\r\n /**\r\n * Check if an object is of type Date\r\n */\r\n Util.isDate = function (obj) {\r\n return Object.prototype.toString.call(obj) === \"[object Date]\";\r\n };\r\n /**\r\n * Convert a date to I.S.O. format in IE8\r\n */\r\n Util.toISOStringForIE8 = function (date) {\r\n if (Util.isDate(date)) {\r\n if (Date.prototype.toISOString) {\r\n return date.toISOString();\r\n }\r\n else {\r\n var pad = function (number) {\r\n var r = String(number);\r\n if (r.length === 1) {\r\n r = \"0\" + r;\r\n }\r\n return r;\r\n };\r\n return date.getUTCFullYear()\r\n + \"-\" + pad(date.getUTCMonth() + 1)\r\n + \"-\" + pad(date.getUTCDate())\r\n + \"T\" + pad(date.getUTCHours())\r\n + \":\" + pad(date.getUTCMinutes())\r\n + \":\" + pad(date.getUTCSeconds())\r\n + \".\" + String((date.getUTCMilliseconds() / 1000).toFixed(3)).slice(2, 5)\r\n + \"Z\";\r\n }\r\n }\r\n };\r\n /**\r\n * Gets IE version if we are running on IE, or null otherwise\r\n */\r\n Util.getIEVersion = function (userAgentStr) {\r\n if (userAgentStr === void 0) { userAgentStr = null; }\r\n var myNav = userAgentStr ? userAgentStr.toLowerCase() : navigator.userAgent.toLowerCase();\r\n return (myNav.indexOf('msie') != -1) ? parseInt(myNav.split('msie')[1]) : null;\r\n };\r\n /**\r\n * Convert ms to c# time span format\r\n */\r\n Util.msToTimeSpan = function (totalms) {\r\n if (isNaN(totalms) || totalms < 0) {\r\n totalms = 0;\r\n }\r\n totalms = Math.round(totalms);\r\n var ms = \"\" + totalms % 1000;\r\n var sec = \"\" + Math.floor(totalms / 1000) % 60;\r\n var min = \"\" + Math.floor(totalms / (1000 * 60)) % 60;\r\n var hour = \"\" + Math.floor(totalms / (1000 * 60 * 60)) % 24;\r\n var days = Math.floor(totalms / (1000 * 60 * 60 * 24));\r\n ms = ms.length === 1 ? \"00\" + ms : ms.length === 2 ? \"0\" + ms : ms;\r\n sec = sec.length < 2 ? \"0\" + sec : sec;\r\n min = min.length < 2 ? \"0\" + min : min;\r\n hour = hour.length < 2 ? \"0\" + hour : hour;\r\n return (days > 0 ? days + \".\" : \"\") + hour + \":\" + min + \":\" + sec + \".\" + ms;\r\n };\r\n /**\r\n * Checks if error has no meaningful data inside. Ususally such errors are received by window.onerror when error\r\n * happens in a script from other domain (cross origin, CORS).\r\n */\r\n Util.isCrossOriginError = function (message, url, lineNumber, columnNumber, error) {\r\n return (message === \"Script error.\" || message === \"Script error\") && !error;\r\n };\r\n /**\r\n * Returns string representation of an object suitable for diagnostics logging.\r\n */\r\n Util.dump = function (object) {\r\n var objectTypeDump = Object.prototype.toString.call(object);\r\n var propertyValueDump = JSON.stringify(object);\r\n if (objectTypeDump === \"[object Error]\") {\r\n propertyValueDump = \"{ stack: '\" + object.stack + \"', message: '\" + object.message + \"', name: '\" + object.name + \"'\";\r\n }\r\n return objectTypeDump + propertyValueDump;\r\n };\r\n /**\r\n * Returns the name of object if it's an Error. Otherwise, returns empty string.\r\n */\r\n Util.getExceptionName = function (object) {\r\n var objectTypeDump = Object.prototype.toString.call(object);\r\n if (objectTypeDump === \"[object Error]\") {\r\n return object.name;\r\n }\r\n return \"\";\r\n };\r\n /**\r\n * Adds an event handler for the specified event\r\n * @param eventName {string} - The name of the event\r\n * @param callback {any} - The callback function that needs to be executed for the given event\r\n * @return {boolean} - true if the handler was successfully added\r\n */\r\n Util.addEventHandler = function (eventName, callback) {\r\n if (!window || typeof eventName !== 'string' || typeof callback !== 'function') {\r\n return false;\r\n }\r\n // Create verb for the event\r\n var verbEventName = 'on' + eventName;\r\n // check if addEventListener is available\r\n if (window.addEventListener) {\r\n window.addEventListener(eventName, callback, false);\r\n }\r\n else if (window[\"attachEvent\"]) {\r\n window[\"attachEvent\"](verbEventName, callback);\r\n }\r\n else {\r\n return false;\r\n }\r\n return true;\r\n };\r\n /**\r\n * Tells if a browser supports a Beacon API\r\n */\r\n Util.IsBeaconApiSupported = function () {\r\n return ('sendBeacon' in navigator && navigator.sendBeacon);\r\n };\r\n Util.document = typeof document !== \"undefined\" ? document : {};\r\n Util._canUseCookies = undefined;\r\n Util._canUseLocalStorage = undefined;\r\n Util._canUseSessionStorage = undefined;\r\n // listing only non-geo specific locations \r\n Util._internalEndpoints = [\r\n \"https://dc.services.visualstudio.com/v2/track\",\r\n \"https://breeze.aimon.applicationinsights.io/v2/track\",\r\n \"https://dc-int.services.visualstudio.com/v2/track\"\r\n ];\r\n Util.NotSpecified = \"not_specified\";\r\n return Util;\r\n }());\r\n exports.Util = Util;\r\n var UrlHelper = /** @class */ (function () {\r\n function UrlHelper() {\r\n }\r\n UrlHelper.parseUrl = function (url) {\r\n if (!UrlHelper.htmlAnchorElement) {\r\n UrlHelper.htmlAnchorElement = !!UrlHelper.document.createElement ? UrlHelper.document.createElement('a') : {};\r\n }\r\n UrlHelper.htmlAnchorElement.href = url;\r\n return UrlHelper.htmlAnchorElement;\r\n };\r\n UrlHelper.getAbsoluteUrl = function (url) {\r\n var result;\r\n var a = UrlHelper.parseUrl(url);\r\n if (a) {\r\n result = a.href;\r\n }\r\n return result;\r\n };\r\n UrlHelper.getPathName = function (url) {\r\n var result;\r\n var a = UrlHelper.parseUrl(url);\r\n if (a) {\r\n result = a.pathname;\r\n }\r\n return result;\r\n };\r\n UrlHelper.getCompleteUrl = function (method, absoluteUrl) {\r\n if (method) {\r\n return method.toUpperCase() + \" \" + absoluteUrl;\r\n }\r\n else {\r\n return absoluteUrl;\r\n }\r\n };\r\n UrlHelper.document = typeof document !== \"undefined\" ? document : {};\r\n return UrlHelper;\r\n }());\r\n exports.UrlHelper = UrlHelper;\r\n var CorrelationIdHelper = /** @class */ (function () {\r\n function CorrelationIdHelper() {\r\n }\r\n /**\r\n * Checks if a request url is not on a excluded domain list and if it is safe to add correlation headers\r\n */\r\n CorrelationIdHelper.canIncludeCorrelationHeader = function (config, requestUrl, currentHost) {\r\n if (config && config.disableCorrelationHeaders) {\r\n return false;\r\n }\r\n if (!requestUrl) {\r\n return false;\r\n }\r\n var requestHost = UrlHelper.parseUrl(requestUrl).host.toLowerCase();\r\n if ((!config || !config.enableCorsCorrelation) && requestHost !== currentHost) {\r\n return false;\r\n }\r\n var excludedDomains = config && config.correlationHeaderExcludedDomains;\r\n if (!excludedDomains || excludedDomains.length == 0) {\r\n return true;\r\n }\r\n for (var i = 0; i < excludedDomains.length; i++) {\r\n var regex = new RegExp(excludedDomains[i].toLowerCase().replace(/\\./g, \"\\.\").replace(/\\*/g, \".*\"));\r\n if (regex.test(requestHost)) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n };\r\n /**\r\n * Combines target appId and target role name from response header.\r\n */\r\n CorrelationIdHelper.getCorrelationContext = function (responseHeader) {\r\n if (responseHeader) {\r\n var correlationId = CorrelationIdHelper.getCorrelationContextValue(responseHeader, RequestResponseHeaders_1.RequestHeaders.requestContextTargetKey);\r\n if (correlationId && correlationId !== CorrelationIdHelper.correlationIdPrefix) {\r\n return correlationId;\r\n }\r\n }\r\n };\r\n /**\r\n * Gets key from correlation response header\r\n */\r\n CorrelationIdHelper.getCorrelationContextValue = function (responseHeader, key) {\r\n if (responseHeader) {\r\n var keyValues = responseHeader.split(\",\");\r\n for (var i = 0; i < keyValues.length; ++i) {\r\n var keyValue = keyValues[i].split(\"=\");\r\n if (keyValue.length == 2 && keyValue[0] == key) {\r\n return keyValue[1];\r\n }\r\n }\r\n }\r\n };\r\n CorrelationIdHelper.correlationIdPrefix = \"cid-v1:\";\r\n return CorrelationIdHelper;\r\n }());\r\n exports.CorrelationIdHelper = CorrelationIdHelper;\r\n var AjaxHelper = /** @class */ (function () {\r\n function AjaxHelper() {\r\n }\r\n AjaxHelper.ParseDependencyPath = function (logger, absoluteUrl, method, pathName) {\r\n var target, name;\r\n if (absoluteUrl && absoluteUrl.length > 0) {\r\n var parsedUrl = UrlHelper.parseUrl(absoluteUrl);\r\n target = parsedUrl.host;\r\n if (parsedUrl.pathname != null) {\r\n var pathName = (parsedUrl.pathname.length === 0) ? \"/\" : parsedUrl.pathname;\r\n if (pathName.charAt(0) !== '/') {\r\n pathName = \"/\" + pathName;\r\n }\r\n name = DataSanitizer_1.DataSanitizer.sanitizeString(logger, method ? method + \" \" + pathName : pathName);\r\n }\r\n else {\r\n name = DataSanitizer_1.DataSanitizer.sanitizeString(logger, absoluteUrl);\r\n }\r\n }\r\n else {\r\n target = pathName;\r\n name = pathName;\r\n }\r\n return {\r\n target: target,\r\n name: name\r\n };\r\n };\r\n return AjaxHelper;\r\n }());\r\n exports.AjaxHelper = AjaxHelper;\r\n /**\r\n * A utility class that helps getting time related parameters\r\n */\r\n var DateTimeUtils = /** @class */ (function () {\r\n function DateTimeUtils() {\r\n }\r\n /**\r\n * Get the number of milliseconds since 1970/01/01 in local timezone\r\n */\r\n DateTimeUtils.Now = (window.performance && window.performance.now && window.performance.timing) ?\r\n function () {\r\n return window.performance.now() + window.performance.timing.navigationStart;\r\n }\r\n :\r\n function () {\r\n return new Date().getTime();\r\n };\r\n /**\r\n * Gets duration between two timestamps\r\n */\r\n DateTimeUtils.GetDuration = function (start, end) {\r\n var result = null;\r\n if (start !== 0 && end !== 0 && !applicationinsights_core_js_1.CoreUtils.isNullOrUndefined(start) && !applicationinsights_core_js_1.CoreUtils.isNullOrUndefined(end)) {\r\n result = end - start;\r\n }\r\n return result;\r\n };\r\n return DateTimeUtils;\r\n }());\r\n exports.DateTimeUtils = DateTimeUtils;\r\n});\r\n//# sourceMappingURL=Util.js.map","define([\"require\", \"exports\", \"./Util\", \"./Enums\", \"./RequestResponseHeaders\", \"./Constants\", \"./Interfaces/Contracts/Generated/Data\", \"./Interfaces/Contracts/Generated/Base\", \"./Telemetry/Common/Envelope\", \"./Telemetry/Event\", \"./Telemetry/Exception\", \"./Telemetry/Metric\", \"./Telemetry/PageView\", \"./Interfaces/Contracts/Generated/PageViewData\", \"./Telemetry/RemoteDependencyData\", \"./Telemetry/Trace\", \"./Telemetry/PageViewPerformance\", \"./Telemetry/Common/Data\", \"./Interfaces/Contracts/Generated/SeverityLevel\", \"./Interfaces/Contracts/Generated/ContextTagKeys\", \"./Telemetry/Common/DataSanitizer\", \"./TelemetryItemCreator\"], function (require, exports, Util_1, Enums_1, RequestResponseHeaders_1, Constants_1, Data_1, Base_1, Envelope_1, Event_1, Exception_1, Metric_1, PageView_1, PageViewData_1, RemoteDependencyData_1, Trace_1, PageViewPerformance_1, Data_2, SeverityLevel_1, ContextTagKeys_1, DataSanitizer_1, TelemetryItemCreator_1) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n exports.Util = Util_1.Util;\r\n exports.CorrelationIdHelper = Util_1.CorrelationIdHelper;\r\n exports.UrlHelper = Util_1.UrlHelper;\r\n exports.DateTimeUtils = Util_1.DateTimeUtils;\r\n exports.FieldType = Enums_1.FieldType;\r\n exports.RequestHeaders = RequestResponseHeaders_1.RequestHeaders;\r\n exports.DisabledPropertyName = Constants_1.DisabledPropertyName;\r\n exports.AIData = Data_1.Data;\r\n exports.AIBase = Base_1.Base;\r\n exports.Envelope = Envelope_1.Envelope;\r\n exports.Event = Event_1.Event;\r\n exports.Exception = Exception_1.Exception;\r\n exports.Metric = Metric_1.Metric;\r\n exports.PageView = PageView_1.PageView;\r\n exports.PageViewData = PageViewData_1.PageViewData;\r\n exports.RemoteDependencyData = RemoteDependencyData_1.RemoteDependencyData;\r\n exports.Trace = Trace_1.Trace;\r\n exports.PageViewPerformance = PageViewPerformance_1.PageViewPerformance;\r\n exports.Data = Data_2.Data;\r\n exports.SeverityLevel = SeverityLevel_1.SeverityLevel;\r\n exports.ContextTagKeys = ContextTagKeys_1.ContextTagKeys;\r\n exports.DataSanitizer = DataSanitizer_1.DataSanitizer;\r\n exports.TelemetryItemCreator = TelemetryItemCreator_1.TelemetryItemCreator;\r\n});\r\n//# sourceMappingURL=applicationinsights-common.js.map","define([\"require\", \"exports\"], function (require, exports) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n /**\r\n * The EventsDiscardedReason enumeration contains a set of values that specify the reason for discarding an event.\r\n */\r\n exports.EventsDiscardedReason = {\r\n /**\r\n * Unknown.\r\n */\r\n Unknown: 0,\r\n /**\r\n * Status set to non-retryable.\r\n */\r\n NonRetryableStatus: 1,\r\n /**\r\n * The event is invalid.\r\n */\r\n InvalidEvent: 2,\r\n /**\r\n * The size of the event is too large.\r\n */\r\n SizeLimitExceeded: 3,\r\n /**\r\n * The server is not accepting events from this instrumentation key.\r\n */\r\n KillSwitch: 4,\r\n /**\r\n * The event queue is full.\r\n */\r\n QueueFull: 5,\r\n };\r\n});\r\n//# sourceMappingURL=EventsDiscardedReason.js.map","define([\"require\", \"exports\"], function (require, exports) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n var LoggingSeverity;\r\n (function (LoggingSeverity) {\r\n /**\r\n * Error will be sent as internal telemetry\r\n */\r\n LoggingSeverity[LoggingSeverity[\"CRITICAL\"] = 1] = \"CRITICAL\";\r\n /**\r\n * Error will NOT be sent as internal telemetry, and will only be shown in browser console\r\n */\r\n LoggingSeverity[LoggingSeverity[\"WARNING\"] = 2] = \"WARNING\";\r\n })(LoggingSeverity = exports.LoggingSeverity || (exports.LoggingSeverity = {}));\r\n /**\r\n * Internal message ID. Please create a new one for every conceptually different message. Please keep alphabetically ordered\r\n */ ;\r\n exports._InternalMessageId = {\r\n // Non user actionable\r\n BrowserDoesNotSupportLocalStorage: 0,\r\n BrowserCannotReadLocalStorage: 1,\r\n BrowserCannotReadSessionStorage: 2,\r\n BrowserCannotWriteLocalStorage: 3,\r\n BrowserCannotWriteSessionStorage: 4,\r\n BrowserFailedRemovalFromLocalStorage: 5,\r\n BrowserFailedRemovalFromSessionStorage: 6,\r\n CannotSendEmptyTelemetry: 7,\r\n ClientPerformanceMathError: 8,\r\n ErrorParsingAISessionCookie: 9,\r\n ErrorPVCalc: 10,\r\n ExceptionWhileLoggingError: 11,\r\n FailedAddingTelemetryToBuffer: 12,\r\n FailedMonitorAjaxAbort: 13,\r\n FailedMonitorAjaxDur: 14,\r\n FailedMonitorAjaxOpen: 15,\r\n FailedMonitorAjaxRSC: 16,\r\n FailedMonitorAjaxSend: 17,\r\n FailedMonitorAjaxGetCorrelationHeader: 18,\r\n FailedToAddHandlerForOnBeforeUnload: 19,\r\n FailedToSendQueuedTelemetry: 20,\r\n FailedToReportDataLoss: 21,\r\n FlushFailed: 22,\r\n MessageLimitPerPVExceeded: 23,\r\n MissingRequiredFieldSpecification: 24,\r\n NavigationTimingNotSupported: 25,\r\n OnError: 26,\r\n SessionRenewalDateIsZero: 27,\r\n SenderNotInitialized: 28,\r\n StartTrackEventFailed: 29,\r\n StopTrackEventFailed: 30,\r\n StartTrackFailed: 31,\r\n StopTrackFailed: 32,\r\n TelemetrySampledAndNotSent: 33,\r\n TrackEventFailed: 34,\r\n TrackExceptionFailed: 35,\r\n TrackMetricFailed: 36,\r\n TrackPVFailed: 37,\r\n TrackPVFailedCalc: 38,\r\n TrackTraceFailed: 39,\r\n TransmissionFailed: 40,\r\n FailedToSetStorageBuffer: 41,\r\n FailedToRestoreStorageBuffer: 42,\r\n InvalidBackendResponse: 43,\r\n FailedToFixDepricatedValues: 44,\r\n InvalidDurationValue: 45,\r\n TelemetryEnvelopeInvalid: 46,\r\n CreateEnvelopeError: 47,\r\n // User actionable\r\n CannotSerializeObject: 48,\r\n CannotSerializeObjectNonSerializable: 49,\r\n CircularReferenceDetected: 50,\r\n ClearAuthContextFailed: 51,\r\n ExceptionTruncated: 52,\r\n IllegalCharsInName: 53,\r\n ItemNotInArray: 54,\r\n MaxAjaxPerPVExceeded: 55,\r\n MessageTruncated: 56,\r\n NameTooLong: 57,\r\n SampleRateOutOfRange: 58,\r\n SetAuthContextFailed: 59,\r\n SetAuthContextFailedAccountName: 60,\r\n StringValueTooLong: 61,\r\n StartCalledMoreThanOnce: 62,\r\n StopCalledWithoutStart: 63,\r\n TelemetryInitializerFailed: 64,\r\n TrackArgumentsNotSpecified: 65,\r\n UrlTooLong: 66,\r\n SessionStorageBufferFull: 67,\r\n CannotAccessCookie: 68,\r\n IdTooLong: 69,\r\n };\r\n});\r\n//# sourceMappingURL=LoggingEnums.js.map","define([\"require\", \"exports\"], function (require, exports) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n exports.MinChannelPriorty = 100;\r\n});\r\n//# sourceMappingURL=IChannelControls.js.map","define([\"require\", \"exports\", \"../JavaScriptSDK.Enums/EventsDiscardedReason\", \"./CoreUtils\", \"./NotificationManager\", \"./DiagnosticLogger\"], function (require, exports, EventsDiscardedReason_1, CoreUtils_1, NotificationManager_1, DiagnosticLogger_1) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n \"use strict\";\r\n var AppInsightsCore = /** @class */ (function () {\r\n function AppInsightsCore() {\r\n this._isInitialized = false;\r\n this._extensions = new Array();\r\n this._channelController = new ChannelController();\r\n }\r\n AppInsightsCore.prototype.initialize = function (config, extensions) {\r\n var _this = this;\r\n // Make sure core is only initialized once\r\n if (this._isInitialized) {\r\n throw Error(\"Core should not be initialized more than once\");\r\n }\r\n if (!config || CoreUtils_1.CoreUtils.isNullOrUndefined(config.instrumentationKey)) {\r\n throw Error(\"Please provide instrumentation key\");\r\n }\r\n this.config = config;\r\n this._notificationManager = new NotificationManager_1.NotificationManager();\r\n this.config.extensions = CoreUtils_1.CoreUtils.isNullOrUndefined(this.config.extensions) ? [] : this.config.extensions;\r\n // add notification to the extensions in the config so other plugins can access it\r\n this.config.extensionConfig = CoreUtils_1.CoreUtils.isNullOrUndefined(this.config.extensionConfig) ? {} : this.config.extensionConfig;\r\n this.config.extensionConfig.NotificationManager = this._notificationManager;\r\n this.logger = new DiagnosticLogger_1.DiagnosticLogger(config);\r\n // Initial validation\r\n extensions.forEach(function (extension) {\r\n if (CoreUtils_1.CoreUtils.isNullOrUndefined(extension.initialize)) {\r\n throw Error(validationError);\r\n }\r\n });\r\n if (this.config.extensions.length > 0) {\r\n var isValid_1 = true;\r\n this.config.extensions.forEach(function (item) {\r\n if (CoreUtils_1.CoreUtils.isNullOrUndefined(item)) {\r\n isValid_1 = false;\r\n }\r\n });\r\n if (!isValid_1) {\r\n throw Error(validationError);\r\n }\r\n }\r\n // Initial validation complete\r\n // Concat all available extensions before sorting by priority\r\n (_a = this._extensions).push.apply(_a, [this._channelController].concat(extensions, this.config.extensions));\r\n this._extensions = this._extensions.sort(function (a, b) {\r\n var extA = a;\r\n var extB = b;\r\n var typeExtA = typeof extA.processTelemetry;\r\n var typeExtB = typeof extB.processTelemetry;\r\n if (typeExtA === 'function' && typeExtB === 'function') {\r\n return extA.priority - extB.priority;\r\n }\r\n if (typeExtA === 'function' && typeExtB !== 'function') {\r\n // keep non telemetryplugin specific extensions at start\r\n return 1;\r\n }\r\n if (typeExtA !== 'function' && typeExtB === 'function') {\r\n return -1;\r\n }\r\n });\r\n // sort complete\r\n // Check if any two extensions have the same priority, then warn to console\r\n var priority = {};\r\n this._extensions.forEach(function (ext) {\r\n var t = ext;\r\n if (t && t.priority) {\r\n if (!CoreUtils_1.CoreUtils.isNullOrUndefined(priority[t.priority])) {\r\n _this.logger.warnToConsole(\"Two extensions have same priority\" + priority[t.priority] + \", \" + t.identifier);\r\n }\r\n else {\r\n priority[t.priority] = t.identifier; // set a value\r\n }\r\n }\r\n });\r\n // initialize plugins including channel controller\r\n this._extensions.forEach(function (ext) {\r\n var e = ext;\r\n if (e && e.priority <= ChannelControllerPriority) {\r\n ext.initialize(_this.config, _this, _this._extensions); // initialize\r\n }\r\n });\r\n var c = -1;\r\n // Set next plugin for all until channel controller\r\n for (var idx = 0; idx < this._extensions.length - 1; idx++) {\r\n var curr = (this._extensions[idx]);\r\n if (curr && typeof curr.processTelemetry !== 'function') {\r\n // these are initialized only, allowing an entry point for extensions to be initialized when SDK initializes\r\n continue;\r\n }\r\n if (curr.priority === ChannelControllerPriority) {\r\n c = idx + 1;\r\n break; // channel controller will set remaining pipeline\r\n }\r\n this._extensions[idx].setNextPlugin(this._extensions[idx + 1]); // set next plugin\r\n }\r\n // Remove sender channels from main list\r\n if (c < this._extensions.length) {\r\n this._extensions.splice(c);\r\n }\r\n if (this.getTransmissionControls().length === 0) {\r\n throw new Error(\"No channels available\");\r\n }\r\n this._isInitialized = true;\r\n var _a;\r\n };\r\n AppInsightsCore.prototype.getTransmissionControls = function () {\r\n return this._channelController.ChannelControls;\r\n };\r\n AppInsightsCore.prototype.track = function (telemetryItem) {\r\n if (telemetryItem === null) {\r\n this._notifiyInvalidEvent(telemetryItem);\r\n // throw error\r\n throw Error(\"Invalid telemetry item\");\r\n }\r\n if (telemetryItem.baseData && !telemetryItem.baseType) {\r\n this._notifiyInvalidEvent(telemetryItem);\r\n throw Error(\"Provide data.baseType for data.baseData\");\r\n }\r\n if (!telemetryItem.baseType) {\r\n // Hard coded from Common::Event.ts::Event.dataType\r\n telemetryItem.baseType = \"EventData\";\r\n }\r\n if (!telemetryItem.instrumentationKey) {\r\n // setup default ikey if not passed in\r\n telemetryItem.instrumentationKey = this.config.instrumentationKey;\r\n }\r\n if (!telemetryItem.timestamp) {\r\n // add default timestamp if not passed in\r\n telemetryItem.timestamp = new Date();\r\n }\r\n // do basic validation before sending it through the pipeline\r\n this._validateTelmetryItem(telemetryItem);\r\n // invoke any common telemetry processors before sending through pipeline\r\n var i = 0;\r\n while (i < this._extensions.length) {\r\n if (this._extensions[i].processTelemetry) {\r\n this._extensions[i].processTelemetry(telemetryItem); // pass on to first extension that can support processing\r\n break;\r\n }\r\n i++;\r\n }\r\n };\r\n /**\r\n * Adds a notification listener. The SDK calls methods on the listener when an appropriate notification is raised.\r\n * The added plugins must raise notifications. If the plugins do not implement the notifications, then no methods will be\r\n * called.\r\n * @param {INotificationListener} listener - An INotificationListener object.\r\n */\r\n AppInsightsCore.prototype.addNotificationListener = function (listener) {\r\n this._notificationManager.addNotificationListener(listener);\r\n };\r\n /**\r\n * Removes all instances of the listener.\r\n * @param {INotificationListener} listener - INotificationListener to remove.\r\n */\r\n AppInsightsCore.prototype.removeNotificationListener = function (listener) {\r\n this._notificationManager.removeNotificationListener(listener);\r\n };\r\n /**\r\n * Periodically check logger.queue for\r\n */\r\n AppInsightsCore.prototype.pollInternalLogs = function () {\r\n var _this = this;\r\n if (!(this.config.diagnosticLoggingInterval > 0)) {\r\n throw Error(\"config.diagnosticLoggingInterval must be a positive integer\");\r\n }\r\n return setInterval(function () {\r\n var queue = _this.logger.queue;\r\n queue.forEach(function (logMessage) {\r\n var item = {\r\n name: \"InternalMessageId: \" + logMessage.messageId,\r\n instrumentationKey: _this.config.instrumentationKey,\r\n timestamp: new Date(),\r\n baseType: DiagnosticLogger_1._InternalLogMessage.dataType,\r\n baseData: { message: logMessage.message }\r\n };\r\n _this.track(item);\r\n });\r\n queue.length = 0;\r\n }, this.config.diagnosticLoggingInterval);\r\n };\r\n AppInsightsCore.prototype._validateTelmetryItem = function (telemetryItem) {\r\n if (CoreUtils_1.CoreUtils.isNullOrUndefined(telemetryItem.name)) {\r\n this._notifiyInvalidEvent(telemetryItem);\r\n throw Error(\"telemetry name required\");\r\n }\r\n if (CoreUtils_1.CoreUtils.isNullOrUndefined(telemetryItem.timestamp)) {\r\n this._notifiyInvalidEvent(telemetryItem);\r\n throw Error(\"telemetry timestamp required\");\r\n }\r\n if (CoreUtils_1.CoreUtils.isNullOrUndefined(telemetryItem.instrumentationKey)) {\r\n this._notifiyInvalidEvent(telemetryItem);\r\n throw Error(\"telemetry instrumentationKey required\");\r\n }\r\n };\r\n AppInsightsCore.prototype._notifiyInvalidEvent = function (telemetryItem) {\r\n this._notificationManager.eventsDiscarded([telemetryItem], EventsDiscardedReason_1.EventsDiscardedReason.InvalidEvent);\r\n };\r\n return AppInsightsCore;\r\n }());\r\n exports.AppInsightsCore = AppInsightsCore;\r\n var ChannelController = /** @class */ (function () {\r\n function ChannelController() {\r\n this.identifier = \"ChannelControllerPlugin\";\r\n this.priority = ChannelControllerPriority; // in reserved range 100 to 200\r\n }\r\n ChannelController.prototype.processTelemetry = function (item) {\r\n this.channelQueue.forEach(function (queues) {\r\n // pass on to first item in queue\r\n if (queues.length > 0) {\r\n queues[0].processTelemetry(item);\r\n }\r\n });\r\n };\r\n Object.defineProperty(ChannelController.prototype, \"ChannelControls\", {\r\n get: function () {\r\n return this.channelQueue;\r\n },\r\n enumerable: true,\r\n configurable: true\r\n });\r\n ChannelController.prototype.initialize = function (config, core, extensions) {\r\n var _this = this;\r\n this.channelQueue = new Array();\r\n if (config.channels) {\r\n config.channels.forEach(function (queue) {\r\n if (queue && queue.length > 0) {\r\n queue = queue.sort(function (a, b) {\r\n return a.priority - b.priority;\r\n });\r\n // Initialize each plugin\r\n queue.forEach(function (queueItem) { return queueItem.initialize(config, core, extensions); });\r\n for (var i = 1; i < queue.length; i++) {\r\n queue[i - 1].setNextPlugin(queue[i]); // setup processing chain\r\n }\r\n _this.channelQueue.push(queue);\r\n }\r\n });\r\n }\r\n else {\r\n var arr = new Array();\r\n for (var i = 0; i < extensions.length; i++) {\r\n var plugin = extensions[i];\r\n if (plugin.priority > ChannelControllerPriority) {\r\n arr.push(plugin);\r\n }\r\n }\r\n if (arr.length > 0) {\r\n // sort if not sorted\r\n arr = arr.sort(function (a, b) {\r\n return a.priority - b.priority;\r\n });\r\n // Initialize each plugin\r\n arr.forEach(function (queueItem) { return queueItem.initialize(config, core, extensions); });\r\n // setup next plugin\r\n for (var i = 1; i < arr.length; i++) {\r\n arr[i - 1].setNextPlugin(arr[i]);\r\n }\r\n this.channelQueue.push(arr);\r\n }\r\n }\r\n };\r\n return ChannelController;\r\n }());\r\n var validationError = \"Extensions must provide callback to initialize\";\r\n var ChannelControllerPriority = 200;\r\n var duplicatePriority = \"One or more extensions are set at same priority\";\r\n});\r\n//# sourceMappingURL=AppInsightsCore.js.map","define([\"require\", \"exports\"], function (require, exports) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n var CoreUtils = /** @class */ (function () {\r\n function CoreUtils() {\r\n }\r\n CoreUtils.isNullOrUndefined = function (input) {\r\n return input === null || input === undefined;\r\n };\r\n /**\r\n * Creates a new GUID.\r\n * @return {string} A GUID.\r\n */\r\n CoreUtils.newGuid = function () {\r\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(GuidRegex, function (c) {\r\n var r = (Math.random() * 16 | 0), v = (c === 'x' ? r : r & 0x3 | 0x8);\r\n return v.toString(16);\r\n });\r\n };\r\n return CoreUtils;\r\n }());\r\n exports.CoreUtils = CoreUtils;\r\n var GuidRegex = /[xy]/g;\r\n});\r\n//# sourceMappingURL=CoreUtils.js.map","define([\"require\", \"exports\", \"../JavaScriptSDK.Enums/LoggingEnums\", \"./CoreUtils\"], function (require, exports, LoggingEnums_1, CoreUtils_1) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n var _InternalLogMessage = /** @class */ (function () {\r\n function _InternalLogMessage(msgId, msg, isUserAct, properties) {\r\n if (isUserAct === void 0) { isUserAct = false; }\r\n this.messageId = msgId;\r\n this.message =\r\n (isUserAct ? _InternalLogMessage.AiUserActionablePrefix : _InternalLogMessage.AiNonUserActionablePrefix) +\r\n msgId;\r\n var diagnosticText = (msg ? \" message:\" + _InternalLogMessage.sanitizeDiagnosticText(msg) : \"\") +\r\n (properties ? \" props:\" + _InternalLogMessage.sanitizeDiagnosticText(JSON.stringify(properties)) : \"\");\r\n this.message += diagnosticText;\r\n }\r\n _InternalLogMessage.sanitizeDiagnosticText = function (text) {\r\n return \"\\\"\" + text.replace(/\\\"/g, \"\") + \"\\\"\";\r\n };\r\n _InternalLogMessage.dataType = \"MessageData\";\r\n /**\r\n * For user non actionable traces use AI Internal prefix.\r\n */\r\n _InternalLogMessage.AiNonUserActionablePrefix = \"AI (Internal): \";\r\n /**\r\n * Prefix of the traces in portal.\r\n */\r\n _InternalLogMessage.AiUserActionablePrefix = \"AI: \";\r\n return _InternalLogMessage;\r\n }());\r\n exports._InternalLogMessage = _InternalLogMessage;\r\n var DiagnosticLogger = /** @class */ (function () {\r\n function DiagnosticLogger(config) {\r\n /**\r\n * Session storage key for the prefix for the key indicating message type already logged\r\n */\r\n this.AIInternalMessagePrefix = \"AITR_\";\r\n /**\r\n * When this is true the SDK will throw exceptions to aid in debugging.\r\n */\r\n this.enableDebugExceptions = function () { return false; };\r\n /**\r\n * 0: OFF\r\n * 1: CRITICAL (default)\r\n * 2: >= WARNING\r\n */\r\n this.consoleLoggingLevel = function () { return 1; };\r\n /**\r\n * 0: OFF (default)\r\n * 1: CRITICAL\r\n * 2: >= WARNING\r\n */\r\n this.telemetryLoggingLevel = function () { return 0; };\r\n /**\r\n * The maximum number of internal messages allowed to be sent per page view\r\n */\r\n this.maxInternalMessageLimit = function () { return 25; };\r\n /**\r\n * The internal logging queue\r\n */\r\n this.queue = [];\r\n /**\r\n * Count of internal messages sent\r\n */\r\n this._messageCount = 0;\r\n /**\r\n * Holds information about what message types were already logged to console or sent to server.\r\n */\r\n this._messageLogged = {};\r\n if (CoreUtils_1.CoreUtils.isNullOrUndefined(config)) {\r\n // TODO: Use default config\r\n // config = AppInsightsCore.defaultConfig;\r\n // For now, use defaults specified in DiagnosticLogger members;\r\n return;\r\n }\r\n if (!CoreUtils_1.CoreUtils.isNullOrUndefined(config.loggingLevelConsole)) {\r\n this.consoleLoggingLevel = function () { return config.loggingLevelConsole; };\r\n }\r\n if (!CoreUtils_1.CoreUtils.isNullOrUndefined(config.loggingLevelTelemetry)) {\r\n this.telemetryLoggingLevel = function () { return config.loggingLevelTelemetry; };\r\n }\r\n if (!CoreUtils_1.CoreUtils.isNullOrUndefined(config.maxMessageLimit)) {\r\n this.maxInternalMessageLimit = function () { return config.maxMessageLimit; };\r\n }\r\n if (!CoreUtils_1.CoreUtils.isNullOrUndefined(config.enableDebugExceptions)) {\r\n this.enableDebugExceptions = function () { return config.enableDebugExceptions; };\r\n }\r\n }\r\n /**\r\n * This method will throw exceptions in debug mode or attempt to log the error as a console warning.\r\n * @param severity {LoggingSeverity} - The severity of the log message\r\n * @param message {_InternalLogMessage} - The log message.\r\n */\r\n DiagnosticLogger.prototype.throwInternal = function (severity, msgId, msg, properties, isUserAct) {\r\n if (isUserAct === void 0) { isUserAct = false; }\r\n var message = new _InternalLogMessage(msgId, msg, isUserAct, properties);\r\n if (this.enableDebugExceptions()) {\r\n throw message;\r\n }\r\n else {\r\n if (typeof (message) !== \"undefined\" && !!message) {\r\n if (typeof (message.message) !== \"undefined\") {\r\n if (isUserAct) {\r\n // check if this message type was already logged to console for this page view and if so, don't log it again\r\n var messageKey = +message.messageId;\r\n if (!this._messageLogged[messageKey] || this.consoleLoggingLevel() >= LoggingEnums_1.LoggingSeverity.WARNING) {\r\n this.warnToConsole(message.message);\r\n this._messageLogged[messageKey] = true;\r\n }\r\n }\r\n else {\r\n // don't log internal AI traces in the console, unless the verbose logging is enabled\r\n if (this.consoleLoggingLevel() >= LoggingEnums_1.LoggingSeverity.WARNING) {\r\n this.warnToConsole(message.message);\r\n }\r\n }\r\n this.logInternalMessage(severity, message);\r\n }\r\n }\r\n }\r\n };\r\n /**\r\n * This will write a warning to the console if possible\r\n * @param message {string} - The warning message\r\n */\r\n DiagnosticLogger.prototype.warnToConsole = function (message) {\r\n if (typeof console !== \"undefined\" && !!console) {\r\n if (typeof console.warn === \"function\") {\r\n console.warn(message);\r\n }\r\n else if (typeof console.log === \"function\") {\r\n console.log(message);\r\n }\r\n }\r\n };\r\n /**\r\n * Resets the internal message count\r\n */\r\n DiagnosticLogger.prototype.resetInternalMessageCount = function () {\r\n this._messageCount = 0;\r\n this._messageLogged = {};\r\n };\r\n /**\r\n * Logs a message to the internal queue.\r\n * @param severity {LoggingSeverity} - The severity of the log message\r\n * @param message {_InternalLogMessage} - The message to log.\r\n */\r\n DiagnosticLogger.prototype.logInternalMessage = function (severity, message) {\r\n if (this._areInternalMessagesThrottled()) {\r\n return;\r\n }\r\n // check if this message type was already logged for this session and if so, don't log it again\r\n var logMessage = true;\r\n var messageKey = this.AIInternalMessagePrefix + message.messageId;\r\n // if the session storage is not available, limit to only one message type per page view\r\n if (this._messageLogged[messageKey]) {\r\n logMessage = false;\r\n }\r\n else {\r\n this._messageLogged[messageKey] = true;\r\n }\r\n if (logMessage) {\r\n // Push the event in the internal queue\r\n if (severity <= this.telemetryLoggingLevel()) {\r\n this.queue.push(message);\r\n this._messageCount++;\r\n }\r\n // When throttle limit reached, send a special event\r\n if (this._messageCount == this.maxInternalMessageLimit()) {\r\n var throttleLimitMessage = \"Internal events throttle limit per PageView reached for this app.\";\r\n var throttleMessage = new _InternalLogMessage(LoggingEnums_1._InternalMessageId.MessageLimitPerPVExceeded, throttleLimitMessage, false);\r\n this.queue.push(throttleMessage);\r\n this.warnToConsole(throttleLimitMessage);\r\n }\r\n }\r\n };\r\n /**\r\n * Indicates whether the internal events are throttled\r\n */\r\n DiagnosticLogger.prototype._areInternalMessagesThrottled = function () {\r\n return this._messageCount >= this.maxInternalMessageLimit();\r\n };\r\n return DiagnosticLogger;\r\n }());\r\n exports.DiagnosticLogger = DiagnosticLogger;\r\n});\r\n//# sourceMappingURL=DiagnosticLogger.js.map","define([\"require\", \"exports\"], function (require, exports) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n /**\r\n * Class to manage sending notifications to all the listeners.\r\n */\r\n var NotificationManager = /** @class */ (function () {\r\n function NotificationManager() {\r\n this.listeners = [];\r\n }\r\n /**\r\n * Adds a notification listener.\r\n * @param {INotificationListener} listener - The notification listener to be added.\r\n */\r\n NotificationManager.prototype.addNotificationListener = function (listener) {\r\n this.listeners.push(listener);\r\n };\r\n /**\r\n * Removes all instances of the listener.\r\n * @param {INotificationListener} listener - AWTNotificationListener to remove.\r\n */\r\n NotificationManager.prototype.removeNotificationListener = function (listener) {\r\n var index = this.listeners.indexOf(listener);\r\n while (index > -1) {\r\n this.listeners.splice(index, 1);\r\n index = this.listeners.indexOf(listener);\r\n }\r\n };\r\n /**\r\n * Notification for events sent.\r\n * @param {ITelemetryItem[]} events - The array of events that have been sent.\r\n */\r\n NotificationManager.prototype.eventsSent = function (events) {\r\n var _this = this;\r\n var _loop_1 = function (i) {\r\n if (this_1.listeners[i].eventsSent) {\r\n setTimeout(function () { return _this.listeners[i].eventsSent(events); }, 0);\r\n }\r\n };\r\n var this_1 = this;\r\n for (var i = 0; i < this.listeners.length; ++i) {\r\n _loop_1(i);\r\n }\r\n };\r\n /**\r\n * Notification for events being discarded.\r\n * @param {ITelemetryItem[]} events - The array of events that have been discarded by the SDK.\r\n * @param {number} reason - The reason for which the SDK discarded the events. The EventsDiscardedReason\r\n * constant should be used to check the different values.\r\n */\r\n NotificationManager.prototype.eventsDiscarded = function (events, reason) {\r\n var _this = this;\r\n var _loop_2 = function (i) {\r\n if (this_2.listeners[i].eventsDiscarded) {\r\n setTimeout(function () { return _this.listeners[i].eventsDiscarded(events, reason); }, 0);\r\n }\r\n };\r\n var this_2 = this;\r\n for (var i = 0; i < this.listeners.length; ++i) {\r\n _loop_2(i);\r\n }\r\n };\r\n return NotificationManager;\r\n }());\r\n exports.NotificationManager = NotificationManager;\r\n});\r\n//# sourceMappingURL=NotificationManager.js.map","define([\"require\", \"exports\", \"./JavaScriptSDK.Interfaces/IChannelControls\", \"./JavaScriptSDK.Enums/EventsDiscardedReason\", \"./JavaScriptSDK/AppInsightsCore\", \"./JavaScriptSDK/CoreUtils\", \"./JavaScriptSDK/NotificationManager\", \"./JavaScriptSDK/DiagnosticLogger\", \"./JavaScriptSDK.Enums/LoggingEnums\"], function (require, exports, IChannelControls_1, EventsDiscardedReason_1, AppInsightsCore_1, CoreUtils_1, NotificationManager_1, DiagnosticLogger_1, LoggingEnums_1) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n exports.MinChannelPriorty = IChannelControls_1.MinChannelPriorty;\r\n exports.EventsDiscardedReason = EventsDiscardedReason_1.EventsDiscardedReason;\r\n exports.AppInsightsCore = AppInsightsCore_1.AppInsightsCore;\r\n exports.CoreUtils = CoreUtils_1.CoreUtils;\r\n exports.NotificationManager = NotificationManager_1.NotificationManager;\r\n exports.DiagnosticLogger = DiagnosticLogger_1.DiagnosticLogger;\r\n exports._InternalLogMessage = DiagnosticLogger_1._InternalLogMessage;\r\n exports._InternalMessageId = LoggingEnums_1._InternalMessageId;\r\n exports.LoggingSeverity = LoggingEnums_1.LoggingSeverity;\r\n});\r\n//# sourceMappingURL=applicationinsights-core-js.js.map","define([\"require\", \"exports\", \"applicationinsights-common\", \"applicationinsights-core-js\", \"./ajaxRecord\", \"./ajaxUtils\"], function (require, exports, applicationinsights_common_1, applicationinsights_core_js_1, ajaxRecord_1, ajaxUtils_1) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n var AjaxMonitor = /** @class */ (function () {\r\n function AjaxMonitor() {\r\n this._trackAjaxAttempts = 0;\r\n this.identifier = \"AjaxDependencyPlugin\";\r\n this.priority = 161;\r\n this.currentWindowHost = window && window.location.host && window.location.host.toLowerCase();\r\n this.initialized = false;\r\n }\r\n ///<summary>Verifies that particalar instance of XMLHttpRequest needs to be monitored</summary>\r\n ///<param name=\"excludeAjaxDataValidation\">Optional parameter. True if ajaxData must be excluded from verification</param>\r\n ///<returns type=\"bool\">True if instance needs to be monitored, otherwise false</returns>\r\n AjaxMonitor.prototype.isMonitoredInstance = function (xhr, excludeAjaxDataValidation) {\r\n // checking to see that all interested functions on xhr were instrumented\r\n return this.initialized\r\n // checking on ajaxData to see that it was not removed in user code\r\n && (excludeAjaxDataValidation === true || !applicationinsights_core_js_1.CoreUtils.isNullOrUndefined(xhr.ajaxData))\r\n // check that this instance is not not used by ajax call performed inside client side monitoring to send data to collector\r\n && xhr[applicationinsights_common_1.DisabledPropertyName] !== true;\r\n };\r\n ///<summary>Determines whether ajax monitoring can be enabled on this document</summary>\r\n ///<returns>True if Ajax monitoring is supported on this page, otherwise false</returns>\r\n AjaxMonitor.prototype.supportsMonitoring = function () {\r\n var result = true;\r\n if (applicationinsights_core_js_1.CoreUtils.isNullOrUndefined(XMLHttpRequest) ||\r\n applicationinsights_core_js_1.CoreUtils.isNullOrUndefined(XMLHttpRequest.prototype) ||\r\n applicationinsights_core_js_1.CoreUtils.isNullOrUndefined(XMLHttpRequest.prototype.open) ||\r\n applicationinsights_core_js_1.CoreUtils.isNullOrUndefined(XMLHttpRequest.prototype.send) ||\r\n applicationinsights_core_js_1.CoreUtils.isNullOrUndefined(XMLHttpRequest.prototype.abort)) {\r\n result = false;\r\n }\r\n // disable in IE8 or older (https://www.w3schools.com/jsref/jsref_trim_string.asp)\r\n try {\r\n \" a \".trim();\r\n }\r\n catch (ex) {\r\n result = false;\r\n }\r\n return result;\r\n };\r\n AjaxMonitor.prototype.instrumentOpen = function () {\r\n var originalOpen = XMLHttpRequest.prototype.open;\r\n var ajaxMonitorInstance = this;\r\n XMLHttpRequest.prototype.open = function (method, url, async) {\r\n try {\r\n if (ajaxMonitorInstance.isMonitoredInstance(this, true) &&\r\n (!this.ajaxData ||\r\n !this.ajaxData.xhrMonitoringState.openDone)) {\r\n ajaxMonitorInstance.openHandler(this, method, url, async);\r\n }\r\n }\r\n catch (e) {\r\n this._core.logger.throwInternal(applicationinsights_core_js_1.LoggingSeverity.CRITICAL, applicationinsights_core_js_1._InternalMessageId.FailedMonitorAjaxOpen, \"Failed to monitor XMLHttpRequest.open, monitoring data for this ajax call may be incorrect.\", {\r\n ajaxDiagnosticsMessage: AjaxMonitor.getFailedAjaxDiagnosticsMessage(this),\r\n exception: applicationinsights_common_1.Util.dump(e)\r\n });\r\n }\r\n return originalOpen.apply(this, arguments);\r\n };\r\n };\r\n AjaxMonitor.prototype.openHandler = function (xhr, method, url, async) {\r\n /* todo:\r\n Disabling the following block of code as CV is not yet supported in 1DS for 3rd Part.\r\n // this format corresponds with activity logic on server-side and is required for the correct correlation\r\n var id = \"|\" + this.appInsights.context.operation.id + \".\" + Util.newId();\r\n */\r\n var id = applicationinsights_common_1.Util.newId();\r\n var ajaxData = new ajaxRecord_1.ajaxRecord(id, this._core._logger);\r\n ajaxData.method = method;\r\n ajaxData.requestUrl = url;\r\n ajaxData.xhrMonitoringState.openDone = true;\r\n xhr.ajaxData = ajaxData;\r\n this.attachToOnReadyStateChange(xhr);\r\n };\r\n AjaxMonitor.getFailedAjaxDiagnosticsMessage = function (xhr) {\r\n var result = \"\";\r\n try {\r\n if (!applicationinsights_core_js_1.CoreUtils.isNullOrUndefined(xhr) &&\r\n !applicationinsights_core_js_1.CoreUtils.isNullOrUndefined(xhr.ajaxData) &&\r\n !applicationinsights_core_js_1.CoreUtils.isNullOrUndefined(xhr.ajaxData.requestUrl)) {\r\n result += \"(url: '\" + xhr.ajaxData.requestUrl + \"')\";\r\n }\r\n }\r\n catch (e) { }\r\n return result;\r\n };\r\n AjaxMonitor.prototype.instrumentSend = function () {\r\n var originalSend = XMLHttpRequest.prototype.send;\r\n var ajaxMonitorInstance = this;\r\n XMLHttpRequest.prototype.send = function (content) {\r\n try {\r\n if (ajaxMonitorInstance.isMonitoredInstance(this) && !this.ajaxData.xhrMonitoringState.sendDone) {\r\n ajaxMonitorInstance.sendHandler(this, content);\r\n }\r\n }\r\n catch (e) {\r\n this._core.logger.throwInternal(applicationinsights_core_js_1.LoggingSeverity.CRITICAL, applicationinsights_core_js_1._InternalMessageId.FailedMonitorAjaxSend, \"Failed to monitor XMLHttpRequest, monitoring data for this ajax call may be incorrect.\", {\r\n ajaxDiagnosticsMessage: AjaxMonitor.getFailedAjaxDiagnosticsMessage(this),\r\n exception: applicationinsights_common_1.Util.dump(e)\r\n });\r\n }\r\n return originalSend.apply(this, arguments);\r\n };\r\n };\r\n AjaxMonitor.prototype.sendHandler = function (xhr, content) {\r\n xhr.ajaxData.requestSentTime = applicationinsights_common_1.DateTimeUtils.Now();\r\n if (this.currentWindowHost && applicationinsights_common_1.CorrelationIdHelper.canIncludeCorrelationHeader(this._config, xhr.ajaxData.getAbsoluteUrl(), this.currentWindowHost)) {\r\n xhr.setRequestHeader(applicationinsights_common_1.RequestHeaders.requestIdHeader, xhr.ajaxData.id);\r\n var appId = this._config.appId; // Todo: also, get appId from channel as breeze returns it\r\n if (appId) {\r\n xhr.setRequestHeader(applicationinsights_common_1.RequestHeaders.requestContextHeader, applicationinsights_common_1.RequestHeaders.requestContextAppIdFormat + appId);\r\n }\r\n }\r\n xhr.ajaxData.xhrMonitoringState.sendDone = true;\r\n };\r\n AjaxMonitor.prototype.instrumentAbort = function () {\r\n var originalAbort = XMLHttpRequest.prototype.abort;\r\n var ajaxMonitorInstance = this;\r\n XMLHttpRequest.prototype.abort = function () {\r\n try {\r\n if (ajaxMonitorInstance.isMonitoredInstance(this) && !this.ajaxData.xhrMonitoringState.abortDone) {\r\n this.ajaxData.aborted = 1;\r\n this.ajaxData.xhrMonitoringState.abortDone = true;\r\n }\r\n }\r\n catch (e) {\r\n this._core.logger.throwInternal(applicationinsights_core_js_1.LoggingSeverity.CRITICAL, applicationinsights_core_js_1._InternalMessageId.FailedMonitorAjaxAbort, \"Failed to monitor XMLHttpRequest.abort, monitoring data for this ajax call may be incorrect.\", {\r\n ajaxDiagnosticsMessage: AjaxMonitor.getFailedAjaxDiagnosticsMessage(this),\r\n exception: applicationinsights_common_1.Util.dump(e)\r\n });\r\n }\r\n return originalAbort.apply(this, arguments);\r\n };\r\n };\r\n AjaxMonitor.prototype.attachToOnReadyStateChange = function (xhr) {\r\n var _this = this;\r\n var ajaxMonitorInstance = this;\r\n xhr.ajaxData.xhrMonitoringState.onreadystatechangeCallbackAttached = ajaxUtils_1.EventHelper.AttachEvent(xhr, \"readystatechange\", function () {\r\n try {\r\n if (ajaxMonitorInstance.isMonitoredInstance(xhr)) {\r\n if (xhr.readyState === 4) {\r\n ajaxMonitorInstance.onAjaxComplete(xhr);\r\n }\r\n }\r\n }\r\n catch (e) {\r\n var exceptionText = applicationinsights_common_1.Util.dump(e);\r\n // ignore messages with c00c023f, as this a known IE9 XHR abort issue\r\n if (!exceptionText || exceptionText.toLowerCase().indexOf(\"c00c023f\") == -1) {\r\n _this._core.logger.throwInternal(applicationinsights_core_js_1.LoggingSeverity.CRITICAL, applicationinsights_core_js_1._InternalMessageId.FailedMonitorAjaxRSC, \"Failed to monitor XMLHttpRequest 'readystatechange' event handler, monitoring data for this ajax call may be incorrect.\", {\r\n ajaxDiagnosticsMessage: AjaxMonitor.getFailedAjaxDiagnosticsMessage(xhr),\r\n exception: applicationinsights_common_1.Util.dump(e)\r\n });\r\n }\r\n }\r\n });\r\n };\r\n AjaxMonitor.prototype.onAjaxComplete = function (xhr) {\r\n xhr.ajaxData.responseFinishedTime = applicationinsights_common_1.DateTimeUtils.Now();\r\n xhr.ajaxData.status = xhr.status;\r\n xhr.ajaxData.CalculateMetrics();\r\n if (xhr.ajaxData.ajaxTotalDuration < 0) {\r\n this._core.logger.throwInternal(applicationinsights_core_js_1.LoggingSeverity.WARNING, applicationinsights_core_js_1._InternalMessageId.FailedMonitorAjaxDur, \"Failed to calculate the duration of the ajax call, monitoring data for this ajax call won't be sent.\", {\r\n ajaxDiagnosticsMessage: AjaxMonitor.getFailedAjaxDiagnosticsMessage(xhr),\r\n requestSentTime: xhr.ajaxData.requestSentTime,\r\n responseFinishedTime: xhr.ajaxData.responseFinishedTime\r\n });\r\n }\r\n else {\r\n var dependency = {\r\n id: xhr.ajaxData.id,\r\n absoluteUrl: xhr.ajaxData.getAbsoluteUrl(),\r\n commandName: xhr.ajaxData.getPathName(),\r\n duration: xhr.ajaxData.ajaxTotalDuration,\r\n success: (+(xhr.ajaxData.status)) >= 200 && (+(xhr.ajaxData.status)) < 400,\r\n resultCode: +xhr.ajaxData.status,\r\n method: xhr.ajaxData.method\r\n };\r\n // enrich dependency target with correlation context from the server\r\n var correlationContext = this.getCorrelationContext(xhr);\r\n if (correlationContext) {\r\n dependency.correlationContext = /* dependency.target + \" | \" + */ correlationContext;\r\n }\r\n this.trackDependencyData(dependency);\r\n xhr.ajaxData = null;\r\n }\r\n };\r\n AjaxMonitor.prototype.getCorrelationContext = function (xhr) {\r\n try {\r\n var responseHeadersString = xhr.getAllResponseHeaders();\r\n if (responseHeadersString !== null) {\r\n var index = responseHeadersString.toLowerCase().indexOf(applicationinsights_common_1.RequestHeaders.requestContextHeaderLowerCase);\r\n if (index !== -1) {\r\n var responseHeader = xhr.getResponseHeader(applicationinsights_common_1.RequestHeaders.requestContextHeader);\r\n return applicationinsights_common_1.CorrelationIdHelper.getCorrelationContext(responseHeader);\r\n }\r\n }\r\n }\r\n catch (e) {\r\n this._core.logger.throwInternal(applicationinsights_core_js_1.LoggingSeverity.WARNING, applicationinsights_core_js_1._InternalMessageId.FailedMonitorAjaxGetCorrelationHeader, \"Failed to get Request-Context correlation header as it may be not included in the response or not accessible.\", {\r\n ajaxDiagnosticsMessage: AjaxMonitor.getFailedAjaxDiagnosticsMessage(xhr),\r\n exception: applicationinsights_common_1.Util.dump(e)\r\n });\r\n }\r\n };\r\n /**\r\n * Logs dependency call\r\n * @param dependencyData dependency data object\r\n */\r\n AjaxMonitor.prototype.trackDependencyData = function (dependency, properties, systemProperties) {\r\n if (this._config.maxAjaxCallsPerView === -1 || this._trackAjaxAttempts < this._config.maxAjaxCallsPerView) {\r\n var item = applicationinsights_common_1.TelemetryItemCreator.create(dependency, applicationinsights_common_1.RemoteDependencyData.dataType, applicationinsights_common_1.RemoteDependencyData.envelopeType, this._core._logger, properties, systemProperties);\r\n this._core.track(item);\r\n }\r\n else if (this._trackAjaxAttempts === this._config.maxAjaxCallsPerView) {\r\n this._core.logger.throwInternal(applicationinsights_core_js_1.LoggingSeverity.CRITICAL, applicationinsights_core_js_1._InternalMessageId.MaxAjaxPerPVExceeded, \"Maximum ajax per page view limit reached, ajax monitoring is paused until the next trackPageView(). In order to increase the limit set the maxAjaxCallsPerView configuration parameter.\", true);\r\n }\r\n ++this._trackAjaxAttempts;\r\n };\r\n AjaxMonitor.prototype.processTelemetry = function (item) {\r\n if (this._nextPlugin && this._nextPlugin.processTelemetry) {\r\n this._nextPlugin.processTelemetry(item);\r\n }\r\n };\r\n AjaxMonitor.prototype.setNextPlugin = function (next) {\r\n if (next) {\r\n this._nextPlugin = next;\r\n }\r\n };\r\n AjaxMonitor.prototype.initialize = function (config, core, extensions) {\r\n if (!this.initialized) {\r\n this._core = core;\r\n config.extensionConfig = config.extensionConfig ? config.extensionConfig : {};\r\n var c = config.extensionConfig[this.identifier] ? config.extensionConfig[this.identifier] : {};\r\n this._config = {\r\n maxAjaxCallsPerView: !isNaN(c.maxAjaxCallsPerView) ? c.maxAjaxCallsPerView : 500,\r\n disableAjaxTracking: applicationinsights_common_1.Util.stringToBoolOrDefault(c.disableAjaxTracking),\r\n disableCorrelationHeaders: applicationinsights_common_1.Util.stringToBoolOrDefault(c.disableCorrelationHeaders),\r\n correlationHeaderExcludedDomains: c.correlationHeaderExcludedDomains || [\r\n \"*.blob.core.windows.net\",\r\n \"*.blob.core.chinacloudapi.cn\",\r\n \"*.blob.core.cloudapi.de\",\r\n \"*.blob.core.usgovcloudapi.net\"\r\n ],\r\n appId: c.appId,\r\n enableCorsCorrelation: applicationinsights_common_1.Util.stringToBoolOrDefault(c.enableCorsCorrelation)\r\n };\r\n if (this.supportsMonitoring() && !this._config.disableAjaxTracking) {\r\n this.instrumentOpen();\r\n this.instrumentSend();\r\n this.instrumentAbort();\r\n this.initialized = true;\r\n }\r\n }\r\n };\r\n return AjaxMonitor;\r\n }());\r\n exports.AjaxMonitor = AjaxMonitor;\r\n});\r\n//# sourceMappingURL=ajax.js.map","define([\"require\", \"exports\", \"applicationinsights-common\"], function (require, exports, applicationinsights_common_1) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n var XHRMonitoringState = /** @class */ (function () {\r\n function XHRMonitoringState() {\r\n this.openDone = false;\r\n this.setRequestHeaderDone = false;\r\n this.sendDone = false;\r\n this.abortDone = false;\r\n //<summary>True, if onreadyStateChangeCallback function attached to xhr, otherwise false</summary>\r\n this.onreadystatechangeCallbackAttached = false;\r\n }\r\n return XHRMonitoringState;\r\n }());\r\n exports.XHRMonitoringState = XHRMonitoringState;\r\n var ajaxRecord = /** @class */ (function () {\r\n function ajaxRecord(id, logger) {\r\n this.completed = false;\r\n this.requestHeadersSize = null;\r\n this.ttfb = null;\r\n this.responseReceivingDuration = null;\r\n this.callbackDuration = null;\r\n this.ajaxTotalDuration = null;\r\n this.aborted = null;\r\n this.pageUrl = null;\r\n this.requestUrl = null;\r\n this.requestSize = 0;\r\n this.method = null;\r\n ///<summary>Returns the HTTP status code.</summary>\r\n this.status = null;\r\n //<summary>The timestamp when open method was invoked</summary>\r\n this.requestSentTime = null;\r\n //<summary>The timestamps when first byte was received</summary>\r\n this.responseStartedTime = null;\r\n //<summary>The timestamp when last byte was received</summary>\r\n this.responseFinishedTime = null;\r\n //<summary>The timestamp when onreadystatechange callback in readyState 4 finished</summary>\r\n this.callbackFinishedTime = null;\r\n //<summary>The timestamp at which ajax was ended</summary>\r\n this.endTime = null;\r\n //<summary>The original xhr onreadystatechange event</summary>\r\n this.originalOnreadystatechage = null;\r\n this.xhrMonitoringState = new XHRMonitoringState();\r\n //<summary>Determines whether or not JavaScript exception occured in xhr.onreadystatechange code. 1 if occured, otherwise 0.</summary>\r\n this.clientFailure = 0;\r\n this.CalculateMetrics = function () {\r\n var self = this;\r\n // round to 3 decimal points\r\n self.ajaxTotalDuration = Math.round(applicationinsights_common_1.DateTimeUtils.GetDuration(self.requestSentTime, self.responseFinishedTime) * 1000) / 1000;\r\n };\r\n this.id = id;\r\n this._logger = logger;\r\n }\r\n ajaxRecord.prototype.getAbsoluteUrl = function () {\r\n return this.requestUrl ? applicationinsights_common_1.UrlHelper.getAbsoluteUrl(this.requestUrl) : null;\r\n };\r\n ajaxRecord.prototype.getPathName = function () {\r\n return this.requestUrl ? applicationinsights_common_1.DataSanitizer.sanitizeUrl(this._logger, applicationinsights_common_1.UrlHelper.getCompleteUrl(this.method, this.requestUrl)) : null;\r\n };\r\n return ajaxRecord;\r\n }());\r\n exports.ajaxRecord = ajaxRecord;\r\n ;\r\n});\r\n//# sourceMappingURL=ajaxRecord.js.map","define([\"require\", \"exports\", \"applicationinsights-core-js\"], function (require, exports, applicationinsights_core_js_1) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n var stringUtils = /** @class */ (function () {\r\n function stringUtils() {\r\n }\r\n stringUtils.GetLength = function (strObject) {\r\n var res = 0;\r\n if (!applicationinsights_core_js_1.CoreUtils.isNullOrUndefined(strObject)) {\r\n var stringified = \"\";\r\n try {\r\n stringified = strObject.toString();\r\n }\r\n catch (ex) {\r\n // some troubles with complex object\r\n }\r\n res = stringified.length;\r\n res = isNaN(res) ? 0 : res;\r\n }\r\n return res;\r\n };\r\n return stringUtils;\r\n }());\r\n exports.stringUtils = stringUtils;\r\n var EventHelper = /** @class */ (function () {\r\n function EventHelper() {\r\n }\r\n ///<summary>Binds the specified function to an event, so that the function gets called whenever the event fires on the object</summary>\r\n ///<param name=\"obj\">Object to which </param>\r\n ///<param name=\"eventNameWithoutOn\">String that specifies any of the standard DHTML Events without \"on\" prefix</param>\r\n ///<param name=\"handlerRef\">Pointer that specifies the function to call when event fires</param>\r\n ///<returns>True if the function was bound successfully to the event, otherwise false</returns>\r\n EventHelper.AttachEvent = function (obj, eventNameWithoutOn, handlerRef) {\r\n var result = false;\r\n if (!applicationinsights_core_js_1.CoreUtils.isNullOrUndefined(obj)) {\r\n if (!applicationinsights_core_js_1.CoreUtils.isNullOrUndefined(obj.attachEvent)) {\r\n // IE before version 9 \r\n obj.attachEvent(\"on\" + eventNameWithoutOn, handlerRef);\r\n result = true;\r\n }\r\n else {\r\n if (!applicationinsights_core_js_1.CoreUtils.isNullOrUndefined(obj.addEventListener)) {\r\n // all browsers except IE before version 9\r\n obj.addEventListener(eventNameWithoutOn, handlerRef, false);\r\n result = true;\r\n }\r\n }\r\n }\r\n return result;\r\n };\r\n EventHelper.DetachEvent = function (obj, eventNameWithoutOn, handlerRef) {\r\n if (!applicationinsights_core_js_1.CoreUtils.isNullOrUndefined(obj)) {\r\n if (!applicationinsights_core_js_1.CoreUtils.isNullOrUndefined(obj.detachEvent)) {\r\n obj.detachEvent(\"on\" + eventNameWithoutOn, handlerRef);\r\n }\r\n else {\r\n if (!applicationinsights_core_js_1.CoreUtils.isNullOrUndefined(obj.removeEventListener)) {\r\n obj.removeEventListener(eventNameWithoutOn, handlerRef, false);\r\n }\r\n }\r\n }\r\n };\r\n return EventHelper;\r\n }());\r\n exports.EventHelper = EventHelper;\r\n});\r\n//# sourceMappingURL=ajaxUtils.js.map","define([\"require\", \"exports\", \"./ajax\"], function (require, exports, ajax_1) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n exports.AjaxPlugin = ajax_1.AjaxMonitor;\r\n});\r\n//# sourceMappingURL=applicationinsights-dependencies-js.js.map","define([\"require\", \"exports\"], function (require, exports) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n var Application = /** @class */ (function () {\r\n function Application() {\r\n }\r\n return Application;\r\n }());\r\n exports.Application = Application;\r\n});\r\n//# sourceMappingURL=Application.js.map","define([\"require\", \"exports\"], function (require, exports) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n var Device = /** @class */ (function () {\r\n /**\r\n * Constructs a new instance of the Device class\r\n */\r\n function Device() {\r\n // don't attempt to fingerprint browsers\r\n this.id = \"browser\";\r\n // Device type is a dimension in our data platform\r\n // Setting it to 'Browser' allows to separate client and server dependencies/exceptions\r\n this.type = \"Browser\";\r\n }\r\n return Device;\r\n }());\r\n exports.Device = Device;\r\n});\r\n//# sourceMappingURL=Device.js.map","define([\"require\", \"exports\"], function (require, exports) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n var Version = \"2.0.1-beta\";\r\n var Internal = /** @class */ (function () {\r\n /**\r\n * Constructs a new instance of the internal telemetry data class.\r\n */\r\n function Internal(config) {\r\n this.sdkVersion = (config.sdkExtension && config.sdkExtension() ? config.sdkExtension() + \"_\" : \"\") + \"javascript:\" + Version;\r\n }\r\n return Internal;\r\n }());\r\n exports.Internal = Internal;\r\n});\r\n//# sourceMappingURL=Internal.js.map","define([\"require\", \"exports\"], function (require, exports) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n var Location = /** @class */ (function () {\r\n function Location() {\r\n }\r\n return Location;\r\n }());\r\n exports.Location = Location;\r\n});\r\n//# sourceMappingURL=Location.js.map","define([\"require\", \"exports\", \"applicationinsights-common\"], function (require, exports, applicationinsights_common_1) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n var Operation = /** @class */ (function () {\r\n function Operation() {\r\n this.id = applicationinsights_common_1.Util.newId();\r\n if (window && window.location && window.location.pathname) {\r\n this.name = window.location.pathname;\r\n }\r\n }\r\n return Operation;\r\n }());\r\n exports.Operation = Operation;\r\n});\r\n//# sourceMappingURL=Operation.js.map","define([\"require\", \"exports\", \"../SamplingScoreGenerator\", \"applicationinsights-core-js\"], function (require, exports, SamplingScoreGenerator_1, applicationinsights_core_js_1) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n var Sample = /** @class */ (function () {\r\n function Sample(sampleRate, logger) {\r\n // We're using 32 bit math, hence max value is (2^31 - 1)\r\n this.INT_MAX_VALUE = 2147483647;\r\n if (applicationinsights_core_js_1.CoreUtils.isNullOrUndefined(logger)) {\r\n this._logger = new applicationinsights_core_js_1.DiagnosticLogger();\r\n }\r\n else {\r\n this._logger = logger;\r\n }\r\n if (sampleRate > 100 || sampleRate < 0) {\r\n this._logger.throwInternal(applicationinsights_core_js_1.LoggingSeverity.WARNING, applicationinsights_core_js_1._InternalMessageId.SampleRateOutOfRange, \"Sampling rate is out of range (0..100). Sampling will be disabled, you may be sending too much data which may affect your AI service level.\", { samplingRate: sampleRate }, true);\r\n this.sampleRate = 100;\r\n }\r\n this.sampleRate = sampleRate;\r\n this.samplingScoreGenerator = new SamplingScoreGenerator_1.SamplingScoreGenerator();\r\n }\r\n /**\r\n * Determines if an envelope is sampled in (i.e. will be sent) or not (i.e. will be dropped).\r\n */\r\n Sample.prototype.isSampledIn = function (envelope) {\r\n // return true as sampling will move to different extension\r\n return true;\r\n };\r\n return Sample;\r\n }());\r\n exports.Sample = Sample;\r\n});\r\n//# sourceMappingURL=Sample.js.map","define([\"require\", \"exports\", \"applicationinsights-common\", \"applicationinsights-core-js\"], function (require, exports, applicationinsights_common_1, applicationinsights_core_js_1) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n var Session = /** @class */ (function () {\r\n function Session() {\r\n }\r\n return Session;\r\n }());\r\n exports.Session = Session;\r\n var _SessionManager = /** @class */ (function () {\r\n function _SessionManager(config, logger) {\r\n if (applicationinsights_core_js_1.CoreUtils.isNullOrUndefined(logger)) {\r\n this._logger = new applicationinsights_core_js_1.DiagnosticLogger();\r\n }\r\n else {\r\n this._logger = logger;\r\n }\r\n if (!config) {\r\n config = {};\r\n }\r\n if (!(typeof config.sessionExpirationMs === \"function\")) {\r\n config.sessionExpirationMs = function () { return _SessionManager.acquisitionSpan; };\r\n }\r\n if (!(typeof config.sessionRenewalMs === \"function\")) {\r\n config.sessionRenewalMs = function () { return _SessionManager.renewalSpan; };\r\n }\r\n this.config = config;\r\n this.automaticSession = new Session();\r\n }\r\n _SessionManager.prototype.update = function () {\r\n if (!this.automaticSession.id) {\r\n this.initializeAutomaticSession();\r\n }\r\n var now = applicationinsights_common_1.DateTimeUtils.Now();\r\n var acquisitionExpired = now - this.automaticSession.acquisitionDate > this.config.sessionExpirationMs();\r\n var renewalExpired = now - this.automaticSession.renewalDate > this.config.sessionRenewalMs();\r\n // renew if acquisitionSpan or renewalSpan has ellapsed\r\n if (acquisitionExpired || renewalExpired) {\r\n // update automaticSession so session state has correct id \r\n this.automaticSession.isFirst = undefined;\r\n this.renew();\r\n }\r\n else {\r\n // do not update the cookie more often than cookieUpdateInterval\r\n if (!this.cookieUpdatedTimestamp || now - this.cookieUpdatedTimestamp > _SessionManager.cookieUpdateInterval) {\r\n this.automaticSession.renewalDate = now;\r\n this.setCookie(this.automaticSession.id, this.automaticSession.acquisitionDate, this.automaticSession.renewalDate);\r\n }\r\n }\r\n };\r\n /**\r\n * Record the current state of the automatic session and store it in our cookie string format\r\n * into the browser's local storage. This is used to restore the session data when the cookie\r\n * expires.\r\n */\r\n _SessionManager.prototype.backup = function () {\r\n this.setStorage(this.automaticSession.id, this.automaticSession.acquisitionDate, this.automaticSession.renewalDate);\r\n };\r\n /**\r\n * Use ai_session cookie data or local storage data (when the cookie is unavailable) to\r\n * initialize the automatic session.\r\n */\r\n _SessionManager.prototype.initializeAutomaticSession = function () {\r\n var cookie = applicationinsights_common_1.Util.getCookie(this._logger, 'ai_session');\r\n if (cookie && typeof cookie.split === \"function\") {\r\n this.initializeAutomaticSessionWithData(cookie);\r\n }\r\n else {\r\n // There's no cookie, but we might have session data in local storage\r\n // This can happen if the session expired or the user actively deleted the cookie\r\n // We only want to recover data if the cookie is missing from expiry. We should respect the user's wishes if the cookie was deleted actively.\r\n // The User class handles this for us and deletes our local storage object if the persistent user cookie was removed.\r\n var storage = applicationinsights_common_1.Util.getStorage(this._logger, 'ai_session');\r\n if (storage) {\r\n this.initializeAutomaticSessionWithData(storage);\r\n }\r\n }\r\n if (!this.automaticSession.id) {\r\n this.automaticSession.isFirst = true;\r\n this.renew();\r\n }\r\n };\r\n /**\r\n * Extract id, aquisitionDate, and renewalDate from an ai_session payload string and\r\n * use this data to initialize automaticSession.\r\n *\r\n * @param {string} sessionData - The string stored in an ai_session cookie or local storage backup\r\n */\r\n _SessionManager.prototype.initializeAutomaticSessionWithData = function (sessionData) {\r\n var params = sessionData.split(\"|\");\r\n if (params.length > 0) {\r\n this.automaticSession.id = params[0];\r\n }\r\n try {\r\n if (params.length > 1) {\r\n var acq = +params[1];\r\n this.automaticSession.acquisitionDate = +new Date(acq);\r\n this.automaticSession.acquisitionDate = this.automaticSession.acquisitionDate > 0 ? this.automaticSession.acquisitionDate : 0;\r\n }\r\n if (params.length > 2) {\r\n var renewal = +params[2];\r\n this.automaticSession.renewalDate = +new Date(renewal);\r\n this.automaticSession.renewalDate = this.automaticSession.renewalDate > 0 ? this.automaticSession.renewalDate : 0;\r\n }\r\n }\r\n catch (e) {\r\n this._logger.throwInternal(applicationinsights_core_js_1.LoggingSeverity.CRITICAL, applicationinsights_core_js_1._InternalMessageId.ErrorParsingAISessionCookie, \"Error parsing ai_session cookie, session will be reset: \" + applicationinsights_common_1.Util.getExceptionName(e), { exception: applicationinsights_common_1.Util.dump(e) });\r\n }\r\n if (this.automaticSession.renewalDate == 0) {\r\n this._logger.throwInternal(applicationinsights_core_js_1.LoggingSeverity.WARNING, applicationinsights_core_js_1._InternalMessageId.SessionRenewalDateIsZero, \"AI session renewal date is 0, session will be reset.\");\r\n }\r\n };\r\n _SessionManager.prototype.renew = function () {\r\n var now = applicationinsights_common_1.DateTimeUtils.Now();\r\n this.automaticSession.id = applicationinsights_common_1.Util.newId();\r\n this.automaticSession.acquisitionDate = now;\r\n this.automaticSession.renewalDate = now;\r\n this.setCookie(this.automaticSession.id, this.automaticSession.acquisitionDate, this.automaticSession.renewalDate);\r\n // If this browser does not support local storage, fire an internal log to keep track of it at this point\r\n if (!applicationinsights_common_1.Util.canUseLocalStorage()) {\r\n this._logger.throwInternal(applicationinsights_core_js_1.LoggingSeverity.WARNING, applicationinsights_core_js_1._InternalMessageId.BrowserDoesNotSupportLocalStorage, \"Browser does not support local storage. Session durations will be inaccurate.\");\r\n }\r\n };\r\n _SessionManager.prototype.setCookie = function (guid, acq, renewal) {\r\n // Set cookie to expire after the session expiry time passes or the session renewal deadline, whichever is sooner\r\n // Expiring the cookie will cause the session to expire even if the user isn't on the page\r\n var acquisitionExpiry = acq + this.config.sessionExpirationMs();\r\n var renewalExpiry = renewal + this.config.sessionRenewalMs();\r\n var cookieExpiry = new Date();\r\n var cookie = [guid, acq, renewal];\r\n if (acquisitionExpiry < renewalExpiry) {\r\n cookieExpiry.setTime(acquisitionExpiry);\r\n }\r\n else {\r\n cookieExpiry.setTime(renewalExpiry);\r\n }\r\n var cookieDomnain = this.config.cookieDomain ? this.config.cookieDomain() : null;\r\n applicationinsights_common_1.Util.setCookie(this._logger, 'ai_session', cookie.join('|') + ';expires=' + cookieExpiry.toUTCString(), cookieDomnain);\r\n this.cookieUpdatedTimestamp = applicationinsights_common_1.DateTimeUtils.Now();\r\n };\r\n _SessionManager.prototype.setStorage = function (guid, acq, renewal) {\r\n // Keep data in local storage to retain the last session id, allowing us to cleanly end the session when it expires\r\n // Browsers that don't support local storage won't be able to end sessions cleanly from the client\r\n // The server will notice this and end the sessions itself, with loss of accurate session duration\r\n applicationinsights_common_1.Util.setStorage(this._logger, 'ai_session', [guid, acq, renewal].join('|'));\r\n };\r\n _SessionManager.acquisitionSpan = 86400000; // 24 hours in ms\r\n _SessionManager.renewalSpan = 1800000; // 30 minutes in ms\r\n _SessionManager.cookieUpdateInterval = 60000; // 1 minute in ms\r\n return _SessionManager;\r\n }());\r\n exports._SessionManager = _SessionManager;\r\n});\r\n//# sourceMappingURL=Session.js.map","define([\"require\", \"exports\", \"applicationinsights-common\", \"applicationinsights-core-js\"], function (require, exports, applicationinsights_common_1, applicationinsights_core_js_1) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n var User = /** @class */ (function () {\r\n function User(config, logger) {\r\n this._logger = logger;\r\n //get userId or create new one if none exists\r\n var cookie = applicationinsights_common_1.Util.getCookie(this._logger, User.userCookieName);\r\n if (cookie) {\r\n var params = cookie.split(User.cookieSeparator);\r\n if (params.length > 0) {\r\n this.id = params[0];\r\n }\r\n }\r\n this.config = config;\r\n if (!this.id) {\r\n this.id = applicationinsights_common_1.Util.newId();\r\n var date = new Date();\r\n var acqStr = applicationinsights_common_1.Util.toISOStringForIE8(date);\r\n this.accountAcquisitionDate = acqStr;\r\n // without expiration, cookies expire at the end of the session\r\n // set it to 365 days from now\r\n // 365 * 24 * 60 * 60 * 1000 = 31536000000 \r\n date.setTime(date.getTime() + 31536000000);\r\n var newCookie = [this.id, acqStr];\r\n var cookieDomain = this.config.cookieDomain ? this.config.cookieDomain() : undefined;\r\n applicationinsights_common_1.Util.setCookie(this._logger, User.userCookieName, newCookie.join(User.cookieSeparator) + ';expires=' + date.toUTCString(), cookieDomain);\r\n // If we have an ai_session in local storage this means the user actively removed our cookies.\r\n // We should respect their wishes and clear ourselves from local storage\r\n applicationinsights_common_1.Util.removeStorage(this._logger, 'ai_session');\r\n }\r\n // We still take the account id from the ctor param for backward compatibility. \r\n // But if the the customer set the accountId through the newer setAuthenticatedUserContext API, we will override it.\r\n this.accountId = config.accountId ? config.accountId() : undefined;\r\n // Get the auth user id and account id from the cookie if exists\r\n // Cookie is in the pattern: <authenticatedId>|<accountId>\r\n var authCookie = applicationinsights_common_1.Util.getCookie(this._logger, User.authUserCookieName);\r\n if (authCookie) {\r\n authCookie = decodeURI(authCookie);\r\n var authCookieString = authCookie.split(User.cookieSeparator);\r\n if (authCookieString[0]) {\r\n this.authenticatedId = authCookieString[0];\r\n }\r\n if (authCookieString.length > 1 && authCookieString[1]) {\r\n this.accountId = authCookieString[1];\r\n }\r\n }\r\n }\r\n /**\r\n * Sets the authenticated user id and the account id in this session.\r\n *\r\n * @param authenticatedUserId {string} - The authenticated user id. A unique and persistent string that represents each authenticated user in the service.\r\n * @param accountId {string} - An optional string to represent the account associated with the authenticated user.\r\n */\r\n User.prototype.setAuthenticatedUserContext = function (authenticatedUserId, accountId, storeInCookie) {\r\n if (storeInCookie === void 0) { storeInCookie = false; }\r\n // Validate inputs to ensure no cookie control characters.\r\n var isInvalidInput = !this.validateUserInput(authenticatedUserId) || (accountId && !this.validateUserInput(accountId));\r\n if (isInvalidInput) {\r\n this._logger.throwInternal(applicationinsights_core_js_1.LoggingSeverity.WARNING, applicationinsights_core_js_1._InternalMessageId.SetAuthContextFailedAccountName, \"Setting auth user context failed. \" +\r\n \"User auth/account id should be of type string, and not contain commas, semi-colons, equal signs, spaces, or vertical-bars.\", true);\r\n return;\r\n }\r\n // Create cookie string.\r\n this.authenticatedId = authenticatedUserId;\r\n var authCookie = this.authenticatedId;\r\n if (accountId) {\r\n this.accountId = accountId;\r\n authCookie = [this.authenticatedId, this.accountId].join(User.cookieSeparator);\r\n }\r\n if (storeInCookie) {\r\n // Set the cookie. No expiration date because this is a session cookie (expires when browser closed).\r\n // Encoding the cookie to handle unexpected unicode characters.\r\n applicationinsights_common_1.Util.setCookie(this._logger, User.authUserCookieName, encodeURI(authCookie), this.config.cookieDomain());\r\n }\r\n };\r\n /**\r\n * Clears the authenticated user id and the account id from the user context.\r\n * @returns {}\r\n */\r\n User.prototype.clearAuthenticatedUserContext = function () {\r\n this.authenticatedId = null;\r\n this.accountId = null;\r\n applicationinsights_common_1.Util.deleteCookie(this._logger, User.authUserCookieName);\r\n };\r\n User.prototype.validateUserInput = function (id) {\r\n // Validate:\r\n // 1. Id is a non-empty string.\r\n // 2. It does not contain special characters for cookies.\r\n if (typeof id !== 'string' ||\r\n !id ||\r\n id.match(/,|;|=| |\\|/)) {\r\n return false;\r\n }\r\n return true;\r\n };\r\n User.cookieSeparator = '|';\r\n User.userCookieName = 'ai_user';\r\n User.authUserCookieName = 'ai_authUser';\r\n return User;\r\n }());\r\n exports.User = User;\r\n});\r\n//# sourceMappingURL=User.js.map","define([\"require\", \"exports\"], function (require, exports) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n var HashCodeScoreGenerator = /** @class */ (function () {\r\n function HashCodeScoreGenerator() {\r\n }\r\n HashCodeScoreGenerator.prototype.getHashCodeScore = function (key) {\r\n var score = this.getHashCode(key) / HashCodeScoreGenerator.INT_MAX_VALUE;\r\n return score * 100;\r\n };\r\n HashCodeScoreGenerator.prototype.getHashCode = function (input) {\r\n if (input == \"\") {\r\n return 0;\r\n }\r\n while (input.length < HashCodeScoreGenerator.MIN_INPUT_LENGTH) {\r\n input = input.concat(input);\r\n }\r\n // 5381 is a magic number: http://stackoverflow.com/questions/10696223/reason-for-5381-number-in-djb-hash-function\r\n var hash = 5381;\r\n for (var i = 0; i < input.length; ++i) {\r\n hash = ((hash << 5) + hash) + input.charCodeAt(i);\r\n // 'hash' is of number type which means 53 bit integer (http://www.ecma-international.org/ecma-262/6.0/#sec-ecmascript-language-types-number-type)\r\n // 'hash & hash' will keep it 32 bit integer - just to make it clearer what the result is.\r\n hash = hash & hash;\r\n }\r\n return Math.abs(hash);\r\n };\r\n // We're using 32 bit math, hence max value is (2^31 - 1)\r\n HashCodeScoreGenerator.INT_MAX_VALUE = 2147483647;\r\n // (Magic number) DJB algorithm can't work on shorter strings (results in poor distribution\r\n HashCodeScoreGenerator.MIN_INPUT_LENGTH = 8;\r\n return HashCodeScoreGenerator;\r\n }());\r\n exports.HashCodeScoreGenerator = HashCodeScoreGenerator;\r\n});\r\n//# sourceMappingURL=HashCodeScoreGenerator.js.map","/**\r\n * PropertiesPlugin.ts\r\n * @copyright Microsoft 2018\r\n */\r\ndefine([\"require\", \"exports\", \"applicationinsights-core-js\", \"applicationinsights-common\", \"./Context/Session\", \"./Context/Application\", \"./Context/Device\", \"./Context/Internal\", \"./Context/Location\", \"./Context/Operation\", \"./Context/User\", \"./Context/Sample\"], function (require, exports, applicationinsights_core_js_1, applicationinsights_common_1, Session_1, Application_1, Device_1, Internal_1, Location_1, Operation_1, User_1, Sample_1) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n var PropertiesPlugin = /** @class */ (function () {\r\n function PropertiesPlugin() {\r\n this.priority = 170;\r\n this.identifier = \"AppInsightsPropertiesPlugin\";\r\n }\r\n PropertiesPlugin.prototype.initialize = function (config, core, extensions) {\r\n var extensionConfig = config.extensions &&\r\n config.extensions[this.identifier] ?\r\n config.extensions[this.identifier] : {};\r\n this._extensionConfig = {\r\n instrumentationKey: function () { return extensionConfig.instrumentationKey; },\r\n accountId: function () { return extensionConfig.accountId; },\r\n sessionRenewalMs: function () { return extensionConfig.sessionRenewalMs; },\r\n sampleRate: function () { return extensionConfig.sampleRate; },\r\n sessionExpirationMs: function () { return extensionConfig.sessionExpirationMs; },\r\n cookieDomain: function () { return extensionConfig.cookieDomain; },\r\n sdkExtension: function () { return extensionConfig.sdkExtension; },\r\n isBrowserLinkTrackingEnabled: function () { return extensionConfig.isBrowserLinkTrackingEnabled; },\r\n appId: function () { return extensionConfig.appId; }\r\n };\r\n if (typeof window !== 'undefined') {\r\n this._sessionManager = new Session_1._SessionManager(this._extensionConfig, core.logger);\r\n this.application = new Application_1.Application();\r\n this.device = new Device_1.Device();\r\n this.internal = new Internal_1.Internal(this._extensionConfig);\r\n this.location = new Location_1.Location();\r\n this.user = new User_1.User(this._extensionConfig, core.logger);\r\n this.operation = new Operation_1.Operation();\r\n this.session = new Session_1.Session();\r\n this.sample = new Sample_1.Sample(this._extensionConfig.sampleRate(), core.logger);\r\n }\r\n };\r\n /**\r\n * Add Part A fields to the event\r\n * @param event The event that needs to be processed\r\n */\r\n PropertiesPlugin.prototype.processTelemetry = function (event) {\r\n if (applicationinsights_core_js_1.CoreUtils.isNullOrUndefined(event)) {\r\n // TODO(barustum): throw an internal event once we have support for internal logging\r\n }\r\n else {\r\n // if the event is not sampled in, do not bother going through the pipeline\r\n if (this.sample.isSampledIn(event)) {\r\n // If the envelope is PageView, reset the internal message count so that we can send internal telemetry for the new page.\r\n if (event.name === applicationinsights_common_1.PageView.envelopeType) {\r\n // TODO(barustum): resetInternalMessageCount once we have support for internal logging\r\n //_InternalLogging.resetInternalMessageCount();\r\n }\r\n if (this.session) {\r\n // If customer did not provide custom session id update the session manager\r\n if (typeof this.session.id !== \"string\") {\r\n this._sessionManager.update();\r\n }\r\n }\r\n this._processTelemetryInternal(event);\r\n }\r\n if (!applicationinsights_core_js_1.CoreUtils.isNullOrUndefined(this._nextPlugin)) {\r\n this._nextPlugin.processTelemetry(event);\r\n }\r\n }\r\n };\r\n /**\r\n * Sets the next plugin that comes after this plugin\r\n * @param nextPlugin The next plugin\r\n */\r\n PropertiesPlugin.prototype.setNextPlugin = function (nextPlugin) {\r\n this._nextPlugin = nextPlugin;\r\n };\r\n PropertiesPlugin.prototype._processTelemetryInternal = function (event) {\r\n var tagsItem = {};\r\n if (this.session) {\r\n // If customer set id, apply his context; otherwise apply context generated from cookies \r\n if (typeof this.session.id === \"string\") {\r\n PropertiesPlugin._applySessionContext(tagsItem, this.session);\r\n }\r\n else {\r\n PropertiesPlugin._applySessionContext(tagsItem, this._sessionManager.automaticSession);\r\n }\r\n }\r\n // set part A fields\r\n PropertiesPlugin._applyApplicationContext(tagsItem, this.application);\r\n PropertiesPlugin._applyDeviceContext(tagsItem, this.device);\r\n PropertiesPlugin._applyInternalContext(tagsItem, this.internal);\r\n PropertiesPlugin._applyLocationContext(tagsItem, this.location);\r\n PropertiesPlugin._applySampleContext(tagsItem, this.sample);\r\n PropertiesPlugin._applyUserContext(tagsItem, this.user);\r\n PropertiesPlugin._applyOperationContext(tagsItem, this.operation);\r\n event.tags.push(tagsItem);\r\n };\r\n PropertiesPlugin._applySessionContext = function (tags, sessionContext) {\r\n if (sessionContext) {\r\n var tagKeys = new applicationinsights_common_1.ContextTagKeys();\r\n if (typeof sessionContext.id === \"string\") {\r\n tags[tagKeys.sessionId] = sessionContext.id;\r\n }\r\n if (typeof sessionContext.isFirst !== \"undefined\") {\r\n tags[tagKeys.sessionIsFirst] = sessionContext.isFirst;\r\n }\r\n }\r\n };\r\n PropertiesPlugin._applyApplicationContext = function (tagsItem, appContext) {\r\n if (appContext) {\r\n var tagKeys = new applicationinsights_common_1.ContextTagKeys();\r\n if (typeof appContext.ver === \"string\") {\r\n tagsItem[tagKeys.applicationVersion] = appContext.ver;\r\n }\r\n if (typeof appContext.build === \"string\") {\r\n tagsItem[tagKeys.applicationBuild] = appContext.build;\r\n }\r\n }\r\n };\r\n PropertiesPlugin._applyDeviceContext = function (tagsItem, deviceContext) {\r\n var tagKeys = new applicationinsights_common_1.ContextTagKeys();\r\n if (deviceContext) {\r\n if (typeof deviceContext.id === \"string\") {\r\n tagsItem[tagKeys.deviceId] = deviceContext.id;\r\n }\r\n if (typeof deviceContext.ip === \"string\") {\r\n tagsItem[tagKeys.deviceIp] = deviceContext.ip;\r\n }\r\n if (typeof deviceContext.language === \"string\") {\r\n tagsItem[tagKeys.deviceLanguage] = deviceContext.language;\r\n }\r\n if (typeof deviceContext.locale === \"string\") {\r\n tagsItem[tagKeys.deviceLocale] = deviceContext.locale;\r\n }\r\n if (typeof deviceContext.model === \"string\") {\r\n tagsItem[tagKeys.deviceModel] = deviceContext.model;\r\n }\r\n if (typeof deviceContext.network !== \"undefined\") {\r\n tagsItem[tagKeys.deviceNetwork] = deviceContext.network;\r\n }\r\n if (typeof deviceContext.oemName === \"string\") {\r\n tagsItem[tagKeys.deviceOEMName] = deviceContext.oemName;\r\n }\r\n if (typeof deviceContext.os === \"string\") {\r\n tagsItem[tagKeys.deviceOS] = deviceContext.os;\r\n }\r\n if (typeof deviceContext.osversion === \"string\") {\r\n tagsItem[tagKeys.deviceOSVersion] = deviceContext.osversion;\r\n }\r\n if (typeof deviceContext.resolution === \"string\") {\r\n tagsItem[tagKeys.deviceScreenResolution] = deviceContext.resolution;\r\n }\r\n if (typeof deviceContext.type === \"string\") {\r\n tagsItem[tagKeys.deviceType] = deviceContext.type;\r\n }\r\n }\r\n };\r\n PropertiesPlugin._applyInternalContext = function (tagsItem, internalContext) {\r\n if (internalContext) {\r\n var tagKeys = new applicationinsights_common_1.ContextTagKeys();\r\n if (typeof internalContext.agentVersion === \"string\") {\r\n tagsItem[tagKeys.internalAgentVersion] = internalContext.agentVersion;\r\n }\r\n if (typeof internalContext.sdkVersion === \"string\") {\r\n tagsItem[tagKeys.internalSdkVersion] = internalContext.sdkVersion;\r\n }\r\n }\r\n };\r\n PropertiesPlugin._applyLocationContext = function (tagsItem, locationContext) {\r\n if (locationContext) {\r\n var tagKeys = new applicationinsights_common_1.ContextTagKeys();\r\n if (typeof locationContext.ip === \"string\") {\r\n tagsItem[tagKeys.locationIp] = locationContext.ip;\r\n }\r\n }\r\n };\r\n PropertiesPlugin._applySampleContext = function (tagsItem, sampleContext) {\r\n if (sampleContext) {\r\n tagsItem.sampleRate = sampleContext.sampleRate;\r\n }\r\n };\r\n PropertiesPlugin._applyOperationContext = function (tagsItem, operationContext) {\r\n if (operationContext) {\r\n var tagKeys = new applicationinsights_common_1.ContextTagKeys();\r\n if (typeof operationContext.id === \"string\") {\r\n tagsItem[tagKeys.operationId] = operationContext.id;\r\n }\r\n if (typeof operationContext.name === \"string\") {\r\n tagsItem[tagKeys.operationName] = operationContext.name;\r\n }\r\n if (typeof operationContext.parentId === \"string\") {\r\n tagsItem[tagKeys.operationParentId] = operationContext.parentId;\r\n }\r\n if (typeof operationContext.rootId === \"string\") {\r\n tagsItem[tagKeys.operationRootId] = operationContext.rootId;\r\n }\r\n if (typeof operationContext.syntheticSource === \"string\") {\r\n tagsItem[tagKeys.operationSyntheticSource] = operationContext.syntheticSource;\r\n }\r\n }\r\n };\r\n PropertiesPlugin._applyUserContext = function (tagsItem, userContext) {\r\n if (userContext) {\r\n var tagKeys = new applicationinsights_common_1.ContextTagKeys();\r\n if (typeof userContext.accountId === \"string\") {\r\n tagsItem[tagKeys.userAccountId] = userContext.accountId;\r\n }\r\n if (typeof userContext.agent === \"string\") {\r\n tagsItem[tagKeys.userAgent] = userContext.agent;\r\n }\r\n if (typeof userContext.id === \"string\") {\r\n tagsItem[tagKeys.userId] = userContext.id;\r\n }\r\n if (typeof userContext.authenticatedId === \"string\") {\r\n tagsItem[tagKeys.userAuthUserId] = userContext.authenticatedId;\r\n }\r\n if (typeof userContext.storeRegion === \"string\") {\r\n tagsItem[tagKeys.userStoreRegion] = userContext.storeRegion;\r\n }\r\n }\r\n };\r\n return PropertiesPlugin;\r\n }());\r\n exports.default = PropertiesPlugin;\r\n});\r\n//# sourceMappingURL=PropertiesPlugin.js.map","define([\"require\", \"exports\", \"./HashCodeScoreGenerator\", \"applicationinsights-common\"], function (require, exports, HashCodeScoreGenerator_1, applicationinsights_common_1) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n var SamplingScoreGenerator = /** @class */ (function () {\r\n function SamplingScoreGenerator() {\r\n this.hashCodeGeneragor = new HashCodeScoreGenerator_1.HashCodeScoreGenerator();\r\n }\r\n SamplingScoreGenerator.prototype.getSamplingScore = function (envelope) {\r\n var tagKeys = new applicationinsights_common_1.ContextTagKeys();\r\n var score = 0;\r\n if (envelope.tags[tagKeys.userId]) {\r\n score = this.hashCodeGeneragor.getHashCodeScore(envelope.tags[tagKeys.userId]);\r\n }\r\n else if (envelope.tags[tagKeys.operationId]) {\r\n score = this.hashCodeGeneragor.getHashCodeScore(envelope.tags[tagKeys.operationId]);\r\n }\r\n else {\r\n score = Math.random();\r\n }\r\n return score;\r\n };\r\n return SamplingScoreGenerator;\r\n }());\r\n exports.SamplingScoreGenerator = SamplingScoreGenerator;\r\n});\r\n//# sourceMappingURL=SamplingScoreGenerator.js.map","define([\"require\", \"exports\", \"./PropertiesPlugin\"], function (require, exports, PropertiesPlugin_1) {\r\n \"use strict\";\r\n Object.defineProperty(exports, \"__esModule\", { value: true });\r\n exports.PropertiesPlugin = PropertiesPlugin_1.default;\r\n});\r\n//# sourceMappingURL=applicationinsights-properties-js.js.map"],"sourceRoot":""}