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/B,WAA6BA,UAAUmS,WAAanS,UAAUmS,UAAUqE,cAAc/J,MAAM,qBACtG,EAjIA2b,EAAQ+W,QA2OR,WACC,IAGC,OAAOpjB,YACR,CAAE,MAAOlY,GAGT,CACD,CApPkBo8B,GAClB7X,EAAQ8X,QAAU,MACjB,IAAIjY,GAAS,EAEb,MAAO,KACDA,IACJA,GAAS,EACTwB,EAAQC,KAAK,yIACd,CAED,EATiB,GAelBtB,EAAQ+X,OAAS,CAChB,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,UACA,WAwFD/X,EAAQ0J,IAAMrI,EAAQ2W,OAAS3W,EAAQqI,KAAO,MAAS,GAkEvD3J,EAAOC,QAAU,EAAQ,IAAR,CAAoBA,GAErC,MAAM,WAACiY,GAAclY,EAAOC,QAM5BiY,EAAWC,EAAI,SAAUC,GACxB,IACC,OAAOrwB,KAAKC,UAAUowB,EACvB,CAAE,MAAO18B,GACR,MAAO,+BAAiCA,EAAMK,OAC/C,CACD,+BCGAikB,EAAOC,QA3QP,SAAemX,GAqDd,SAASiB,EAAYvvB,GACpB,IAAIwvB,EAEAC,EACAC,EAFAC,EAAiB,KAIrB,SAASR,KAAS3f,GAEjB,IAAK2f,EAAMS,QACV,OAGD,MAAM39B,EAAOk9B,EAGPU,EAAOv2B,OAAO,IAAI9G,MAClBs9B,EAAKD,GAAQL,GAAYK,GAC/B59B,EAAKy7B,KAAOoC,EACZ79B,EAAK89B,KAAOP,EACZv9B,EAAK49B,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vhD,YAAYwwJ","sources":["webpack://TypeScriptModule/webpack/runtime/create fake namespace object","webpack://TypeScriptModule/webpack/runtime/load script","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidx-loop-sdk@5.11.2-76b635c642995fdf8ef1/node_modules/@fluidx/loop-sdk/lib/network/asyncWithRetry.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidx-loop-sdk@5.11.2-76b635c642995fdf8ef1/node_modules/@fluidx/loop-sdk/lib/network/delay.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidx-loop-sdk@5.11.2-76b635c642995fdf8ef1/node_modules/@fluidx/loop-sdk/lib/network/fetchWithRetry.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidx-office-fluid-types@31.19.1-6e195d1896e8e4cce177/node_modules/@fluidx/office-fluid-types/lib/TelemetryEventTypes.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidx-service-endpoints@3.10.7-0863a66cf41cfa13708d/node_modules/@fluidx/service-endpoints/lib/AugloopEndpoints.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidx-service-endpoints@3.10.7-0863a66cf41cfa13708d/node_modules/@fluidx/service-endpoints/lib/HubbleEndpoints.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidx-service-endpoints@3.10.7-0863a66cf41cfa13708d/node_modules/@fluidx/service-endpoints/lib/endpoints/DoDEndpoints.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidx-service-endpoints@3.10.7-0863a66cf41cfa13708d/node_modules/@fluidx/service-endpoints/lib/endpoints/GCCHighEndpoints.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidx-service-endpoints@3.10.7-0863a66cf41cfa13708d/node_modules/@fluidx/service-endpoints/lib/endpoints/GCCModerateEndpoints.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidx-service-endpoints@3.10.7-0863a66cf41cfa13708d/node_modules/@fluidx/service-endpoints/lib/endpoints/USNatEndpoints.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidx-service-endpoints@3.10.7-0863a66cf41cfa13708d/node_modules/@fluidx/service-endpoints/lib/endpoints/USSecEndpoints.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidx-service-endpoints@3.10.7-0863a66cf41cfa13708d/node_modules/@fluidx/service-endpoints/lib/endpoints/LocalEndpoints.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidx-service-endpoints@3.10.7-0863a66cf41cfa13708d/node_modules/@fluidx/service-endpoints/lib/endpoints/AutomationEndpoints.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidx-service-endpoints@3.10.7-0863a66cf41cfa13708d/node_modules/@fluidx/service-endpoints/lib/endpoints/DevelopmentEndpoints.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidx-service-endpoints@3.10.7-0863a66cf41cfa13708d/node_modules/@fluidx/service-endpoints/lib/endpoints/StagingEndpoints.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidx-service-endpoints@3.10.7-0863a66cf41cfa13708d/node_modules/@fluidx/service-endpoints/lib/endpoints/DogfoodEndpoints.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidx-service-endpoints@3.10.7-0863a66cf41cfa13708d/node_modules/@fluidx/service-endpoints/lib/endpoints/ProductionEndpoints.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidx-service-endpoints@3.10.7-0863a66cf41cfa13708d/node_modules/@fluidx/service-endpoints/lib/endpoints/MicrosoftEndpoints.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidx-service-endpoints@3.10.7-0863a66cf41cfa13708d/node_modules/@fluidx/service-endpoints/lib/endpoints/GallatinEndpoints.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidx-service-endpoints@3.10.7-0863a66cf41cfa13708d/node_modules/@fluidx/service-endpoints/lib/getServiceEndpoint.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidx-telemetry@13.36.3-35f136b13a92cbc832db/node_modules/@fluidx/telemetry/lib/Utilities/ActivityTracker.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidx-telemetry@13.36.3-35f136b13a92cbc832db/node_modules/@fluidx/telemetry/lib/Utilities/pageTimings.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@commonschema-oteljs-schema-pu@2.0.2-89e3f8b5bd5ffff092ff/node_modules/@commonschema/oteljs-schema-pu/dist/MsProductUsageAction.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidx-telemetry@13.36.3-35f136b13a92cbc832db/node_modules/@fluidx/telemetry/lib/Utilities/SharedUtilities.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidx-telemetry@13.36.3-35f136b13a92cbc832db/node_modules/@fluidx/telemetry/lib/Utilities/scrubPII.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidx-telemetry@13.36.3-35f136b13a92cbc832db/node_modules/@fluidx/telemetry/lib/Utilities/LoggerHelpers.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidx-telemetry@13.36.3-35f136b13a92cbc832db/node_modules/@fluidx/telemetry/lib/Utilities/NamespaceLoggerAdapter.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidx-telemetry@13.36.3-35f136b13a92cbc832db/node_modules/@fluidx/telemetry/lib/Utilities/OtelDataFieldHelpers.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidx-utilities@26.36.1-1cac92fc6b40a588ee08/node_modules/@fluidx/utilities/lib/EnvironmentDetector.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidx-utilities@26.36.1-1cac92fc6b40a588ee08/node_modules/@fluidx/utilities/lib/deviceDetector.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidx-utilities@26.36.1-1cac92fc6b40a588ee08/node_modules/@fluidx/utilities/lib/fetch/setRequestHeader.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidx-utilities@26.36.1-1cac92fc6b40a588ee08/node_modules/@fluidx/utilities/lib/fetch/addTokenToRequest.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidx-utilities@26.36.1-1cac92fc6b40a588ee08/node_modules/@fluidx/utilities/lib/fetch/getCurrentTime.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidx-utilities@26.36.1-1cac92fc6b40a588ee08/node_modules/@fluidx/utilities/lib/fetch/authorizedFetchWithRetry.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidx-utilities@26.36.1-1cac92fc6b40a588ee08/node_modules/@fluidx/utilities/lib/fetch/headerUtils.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidx-utilities@26.36.1-1cac92fc6b40a588ee08/node_modules/@fluidx/utilities/lib/fetch/parseAuthErrorClaims.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidx-utilities@26.36.1-1cac92fc6b40a588ee08/node_modules/@fluidx/utilities/lib/fetch/parseAuthErrorInvalidToken.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidx-utilities@26.36.1-1cac92fc6b40a588ee08/node_modules/@fluidx/utilities/lib/fetch/parseAuthErrorRealm.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidx-utilities@26.36.1-1cac92fc6b40a588ee08/node_modules/@fluidx/utilities/lib/fetch/getOdspAndGraphRequestIdsFromResponse.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidx-utilities@26.36.1-1cac92fc6b40a588ee08/node_modules/@fluidx/utilities/lib/fetch/getOrigin.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidx-utilities@26.36.1-1cac92fc6b40a588ee08/node_modules/@fluidx/utilities/lib/fetch/instrumentedFetchWithRetry.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidx-utilities@26.36.1-1cac92fc6b40a588ee08/node_modules/@fluidx/utilities/lib/file/getFileItem.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidx-utilities@26.36.1-1cac92fc6b40a588ee08/node_modules/@fluidx/utilities/lib/file/storageRequestPolicies.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidx-utilities@26.36.1-1cac92fc6b40a588ee08/node_modules/@fluidx/utilities/lib/misc/tryJsonParse.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidx-utilities@26.36.1-1cac92fc6b40a588ee08/node_modules/@fluidx/utilities/lib/settings/getSetting.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidx-utilities@26.36.1-1cac92fc6b40a588ee08/node_modules/@fluidx/utilities/lib/settings/getFluidExperiencesSetting.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidx-utilities@26.36.1-1cac92fc6b40a588ee08/node_modules/@fluidx/utilities/lib/settings/localStorage.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidx-utilities@26.36.1-1cac92fc6b40a588ee08/node_modules/@fluidx/utilities/lib/settings/queryParams.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@microsoft-oteljs@4.20.30-95d67577259794f29352/node_modules/@microsoft/oteljs/dist/Contracts.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@microsoft-oteljs@4.20.30-95d67577259794f29352/node_modules/@microsoft/oteljs/dist/DataFieldHelper.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@microsoft-oteljs@4.20.30-95d67577259794f29352/node_modules/@microsoft/oteljs/dist/OTelNotifications.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@microsoft-oteljs@4.20.30-95d67577259794f29352/node_modules/@microsoft/oteljs/dist/TenantTokenManager.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@microsoft-oteljs@4.20.30-95d67577259794f29352/node_modules/@microsoft/oteljs/dist/TelemetryEventValidator.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@microsoft-oteljs@4.20.30-95d67577259794f29352/node_modules/@microsoft/oteljs/dist/Version.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@microsoft-oteljs@4.20.30-95d67577259794f29352/node_modules/@microsoft/oteljs/dist/SimpleTelemetryLogger.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/assert@2.1.0-18ba70faf41700d92e7c/node_modules/assert/build/assert.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/assert@2.1.0-18ba70faf41700d92e7c/node_modules/assert/build/internal/assert/assertion_error.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/assert@2.1.0-18ba70faf41700d92e7c/node_modules/assert/build/internal/errors.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/assert@2.1.0-18ba70faf41700d92e7c/node_modules/assert/build/internal/util/comparisons.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/base64-js@1.5.1-56c972d4ee1e3395bee9/node_modules/base64-js/index.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/call-bind@1.0.7-ed8f750092275b877826/node_modules/call-bind/callBound.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/call-bind@1.0.7-ed8f750092275b877826/node_modules/call-bind/index.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/console-browserify@1.2.0-af0029c4833cb63f2105/node_modules/console-browserify/index.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/debug@4.3.6-4e06f75bd2f8e3bc93de/node_modules/debug/src/browser.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/debug@4.3.6-4e06f75bd2f8e3bc93de/node_modules/debug/src/common.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/define-data-property@1.1.4-8a21de5498d41419bada/node_modules/define-data-property/index.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/define-properties@1.2.1-5fbd543658f23e85096c/node_modules/define-properties/index.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/double-ended-queue@2.1.0-0-5c2fe620fb30c7d200b1/node_modules/double-ended-queue/js/deque.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/es-define-property@1.0.0-7a350333a1f4f1fc7da8/node_modules/es-define-property/index.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/es-errors@1.3.0-5b1bed8622cdbc286d84/node_modules/es-errors/eval.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/es-errors@1.3.0-5b1bed8622cdbc286d84/node_modules/es-errors/index.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/es-errors@1.3.0-5b1bed8622cdbc286d84/node_modules/es-errors/range.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/es-errors@1.3.0-5b1bed8622cdbc286d84/node_modules/es-errors/ref.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/es-errors@1.3.0-5b1bed8622cdbc286d84/node_modules/es-errors/syntax.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/es-errors@1.3.0-5b1bed8622cdbc286d84/node_modules/es-errors/type.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/es-errors@1.3.0-5b1bed8622cdbc286d84/node_modules/es-errors/uri.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/events@3.3.0-208d04a3cce593babd40/node_modules/events/events.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/events_pkg@3.3.0-a253feb7f79dcf30363e/node_modules/events_pkg/events.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/for-each@0.3.3-394c7a10f057f4d39afd/node_modules/for-each/index.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/function-bind@1.1.2-0dfc7b9ccbd4734e7fc3/node_modules/function-bind/implementation.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/function-bind@1.1.2-0dfc7b9ccbd4734e7fc3/node_modules/function-bind/index.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/get-intrinsic@1.2.4-ae783b14d1d1145cd886/node_modules/get-intrinsic/index.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/gopd@1.0.1-8b05b9781607f2de99c6/node_modules/gopd/index.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/has-property-descriptors@1.0.2-92e4633d770c52dcee2d/node_modules/has-property-descriptors/index.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/has-proto@1.0.3-7db9b011c59270494ada/node_modules/has-proto/index.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/has-symbols@1.0.3-a9a45015e3ab98853f58/node_modules/has-symbols/index.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/has-symbols@1.0.3-a9a45015e3ab98853f58/node_modules/has-symbols/shams.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/has-tostringtag@1.0.2-cc1131250c16079989c0/node_modules/has-tostringtag/shams.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/hasown@2.0.2-d54e98d9c84a5436d5fb/node_modules/hasown/index.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/inherits@2.0.4-811c5d3b9f8b99c1e7a4/node_modules/inherits/inherits_browser.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/is-arguments@1.1.1-e275c456857c3efa4a09/node_modules/is-arguments/index.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/is-callable@1.2.7-2fc733ea24370d9ab365/node_modules/is-callable/index.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/is-generator-function@1.0.10-b4b5bac67d4639835f8c/node_modules/is-generator-function/index.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/is-nan@1.3.2-479fe3b7d67e01ff7b41/node_modules/is-nan/implementation.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/is-nan@1.3.2-479fe3b7d67e01ff7b41/node_modules/is-nan/index.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/is-nan@1.3.2-479fe3b7d67e01ff7b41/node_modules/is-nan/polyfill.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/is-nan@1.3.2-479fe3b7d67e01ff7b41/node_modules/is-nan/shim.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/is-typed-array@1.1.13-e7fc8f6a167b2f0378e4/node_modules/is-typed-array/index.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/ms@2.1.2-c626d6ad879798a6c707/node_modules/ms/index.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/object-is@1.1.6-0a721194d6d6c9bfad68/node_modules/object-is/implementation.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/object-is@1.1.6-0a721194d6d6c9bfad68/node_modules/object-is/index.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/object-is@1.1.6-0a721194d6d6c9bfad68/node_modules/object-is/polyfill.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/object-is@1.1.6-0a721194d6d6c9bfad68/node_modules/object-is/shim.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/object-keys@1.1.1-266cb5e73aa73f7ba37f/node_modules/object-keys/implementation.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/object-keys@1.1.1-266cb5e73aa73f7ba37f/node_modules/object-keys/index.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/object-keys@1.1.1-266cb5e73aa73f7ba37f/node_modules/object-keys/isArguments.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/object.assign@4.1.5-c442f663968c8f5a67d1/node_modules/object.assign/implementation.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/object.assign@4.1.5-c442f663968c8f5a67d1/node_modules/object.assign/polyfill.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/possible-typed-array-names@1.0.0-f2ea09fb780742b72781/node_modules/possible-typed-array-names/index.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/process@0.11.10-4ed77f2a561cdd1d796a/node_modules/process/browser.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/react-dom@18.3.1-609228bf96f1261abe60/node_modules/react-dom/cjs/react-dom.production.min.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/react-dom@18.3.1-609228bf96f1261abe60/node_modules/react-dom/client.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/react-dom@18.3.1-609228bf96f1261abe60/node_modules/react-dom/index.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/react@18.3.1-c2079dca685c5b8aa3ec/node_modules/react/cjs/react.production.min.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/react@18.3.1-c2079dca685c5b8aa3ec/node_modules/react/index.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/scheduler@0.23.2-d0871d9b6a32fc954a2d/node_modules/scheduler/cjs/scheduler.production.min.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/scheduler@0.23.2-d0871d9b6a32fc954a2d/node_modules/scheduler/index.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/set-function-length@1.2.2-2e21bb839530339f289d/node_modules/set-function-length/index.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/util@0.12.5-ef14734d3e59ce03014f/node_modules/util/support/isBufferBrowser.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/util@0.12.5-ef14734d3e59ce03014f/node_modules/util/support/types.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/util@0.12.5-ef14734d3e59ce03014f/node_modules/util/util.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/uuid@8.3.2-b4fdfbc67ed529949683/node_modules/uuid/dist/esm-browser/rng.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/uuid@8.3.2-b4fdfbc67ed529949683/node_modules/uuid/dist/esm-browser/regex.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/uuid@8.3.2-b4fdfbc67ed529949683/node_modules/uuid/dist/esm-browser/validate.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/uuid@8.3.2-b4fdfbc67ed529949683/node_modules/uuid/dist/esm-browser/stringify.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/uuid@8.3.2-b4fdfbc67ed529949683/node_modules/uuid/dist/esm-browser/v4.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/uuid@9.0.1-a721e9c7846ea0cd2b8f/node_modules/uuid/dist/esm-browser/native.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/uuid@9.0.1-a721e9c7846ea0cd2b8f/node_modules/uuid/dist/esm-browser/rng.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/uuid@9.0.1-a721e9c7846ea0cd2b8f/node_modules/uuid/dist/esm-browser/stringify.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/uuid@9.0.1-a721e9c7846ea0cd2b8f/node_modules/uuid/dist/esm-browser/v4.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/which-typed-array@1.1.15-ccacdc2d739215c59ded/node_modules/which-typed-array/index.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluid-internal-client-utils@2.43.0-7d42fa0637af67398fcf/node_modules/@fluid-internal/client-utils/lib/eventEmitter.cjs","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/available-typed-arrays@1.0.7-e3abcefe0f5db7859b59/node_modules/available-typed-arrays/index.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluid-internal-client-utils@2.41.0-4f1b5f18ddd256242ffd/node_modules/@fluid-internal/client-utils/lib/base64EncodingBrowser.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluid-internal-client-utils@2.41.0-4f1b5f18ddd256242ffd/node_modules/@fluid-internal/client-utils/lib/bufferBrowser.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluid-internal-client-utils@2.43.0-7d42fa0637af67398fcf/node_modules/@fluid-internal/client-utils/lib/base64EncodingBrowser.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluid-internal-client-utils@2.43.0-7d42fa0637af67398fcf/node_modules/@fluid-internal/client-utils/lib/bufferBrowser.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluid-internal-client-utils@2.43.0-7d42fa0637af67398fcf/node_modules/@fluid-internal/client-utils/lib/performanceIsomorphic.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidframework-container-definitions@2.43.0-1bd28d3539b9e782a50f/node_modules/@fluidframework/container-definitions/lib/loader.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidframework-core-interfaces@2.43.0-094a1086bb24160621f4/node_modules/@fluidframework/core-interfaces/lib/error.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidframework-core-interfaces@2.43.0-094a1086bb24160621f4/node_modules/@fluidframework/core-interfaces/lib/logger.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidframework-core-utils@2.43.0-5b3898af632b0cc9cdce/node_modules/@fluidframework/core-utils/lib/assert.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidframework-core-utils@2.43.0-5b3898af632b0cc9cdce/node_modules/@fluidframework/core-utils/lib/lazy.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidframework-driver-definitions@2.43.0-600acf0ac6e5fd7c56e6/node_modules/@fluidframework/driver-definitions/lib/driverError.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidframework-driver-definitions@2.43.0-600acf0ac6e5fd7c56e6/node_modules/@fluidframework/driver-definitions/lib/urlResolver.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidframework-driver-utils@2.43.0-4ce13425085694533777/node_modules/@fluidframework/driver-utils/lib/network.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidframework-odsp-driver-definitions@2.43.0-bfda3aa2cb91b6e7f4f8/node_modules/@fluidframework/odsp-driver-definitions/lib/errors.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidframework-odsp-driver@2.43.0-ea4165ce93b8cf91d3cd/node_modules/@fluidframework/odsp-driver/lib/constants.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidframework-odsp-driver@2.43.0-ea4165ce93b8cf91d3cd/node_modules/@fluidframework/odsp-driver/lib/odspFluidFileLink.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidframework-odsp-doclib-utils@2.43.0-e0dfb2267bfea5295c2e/node_modules/@fluidframework/odsp-doclib-utils/lib/packageVersion.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidframework-odsp-doclib-utils@2.43.0-e0dfb2267bfea5295c2e/node_modules/@fluidframework/odsp-doclib-utils/lib/parseAuthErrorTenant.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidframework-odsp-doclib-utils@2.43.0-e0dfb2267bfea5295c2e/node_modules/@fluidframework/odsp-doclib-utils/lib/odspErrorUtils.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidframework-odsp-doclib-utils@2.43.0-e0dfb2267bfea5295c2e/node_modules/@fluidframework/odsp-doclib-utils/lib/parseAuthErrorClaims.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidframework-odsp-driver-definitions@2.43.0-bfda3aa2cb91b6e7f4f8/node_modules/@fluidframework/odsp-driver-definitions/lib/tokenFetch.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidframework-odsp-driver@2.43.0-ea4165ce93b8cf91d3cd/node_modules/@fluidframework/odsp-driver/lib/odspUtils.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidframework-odsp-driver@2.43.0-ea4165ce93b8cf91d3cd/node_modules/@fluidframework/odsp-driver/lib/packageVersion.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidframework-telemetry-utils@2.43.0-02df081ffee6d2261b11/node_modules/@fluidframework/telemetry-utils/lib/config.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidframework-telemetry-utils@2.43.0-02df081ffee6d2261b11/node_modules/@fluidframework/telemetry-utils/lib/errorLogging.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidframework-telemetry-utils@2.43.0-02df081ffee6d2261b11/node_modules/@fluidframework/telemetry-utils/lib/fluidErrorBase.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidframework-telemetry-utils@2.43.0-02df081ffee6d2261b11/node_modules/@fluidframework/telemetry-utils/lib/logger.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/tslib@2.6.3-86667b1b3c37a36dd54d/node_modules/tslib/tslib.es6.mjs","webpack://TypeScriptModule/webpack/bootstrap","webpack://TypeScriptModule/webpack/runtime/compat get default export","webpack://TypeScriptModule/webpack/runtime/define property getters","webpack://TypeScriptModule/webpack/runtime/ensure chunk","webpack://TypeScriptModule/webpack/runtime/get javascript chunk filename","webpack://TypeScriptModule/webpack/runtime/get mini-css chunk filename","webpack://TypeScriptModule/webpack/runtime/global","webpack://TypeScriptModule/webpack/runtime/hasOwnProperty shorthand","webpack://TypeScriptModule/webpack/runtime/make namespace object","webpack://TypeScriptModule/webpack/runtime/publicPath","webpack://TypeScriptModule/webpack/runtime/jsonp chunk loading","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidx-utilities@26.36.1-1cac92fc6b40a588ee08/node_modules/@fluidx/utilities/lib/localization/Locale.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidx-utilities@26.36.1-1cac92fc6b40a588ee08/node_modules/@fluidx/utilities/lib/auth/KnownTenants.js","webpack://TypeScriptModule/./src/interop/Error.ts","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@microsoft-oteljs@4.20.30-95d67577259794f29352/node_modules/@microsoft/oteljs/dist/Activity.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@microsoft-oteljs@4.20.30-95d67577259794f29352/node_modules/@microsoft/oteljs/dist/CorrelationVector.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@microsoft-oteljs@4.20.30-95d67577259794f29352/node_modules/@microsoft/oteljs/dist/InternalContracts.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@microsoft-oteljs@4.20.30-95d67577259794f29352/node_modules/@microsoft/oteljs/dist/TelemetryLogger.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@microsoft-oteljs@4.20.30-95d67577259794f29352/node_modules/@microsoft/oteljs/dist/enumObjects/EnumObjects.js","webpack://TypeScriptModule/./src/telemetry/Events.ts","webpack://TypeScriptModule/./src/telemetry/ITelemetryLogger.ts","webpack://TypeScriptModule/./src/utils/FeatureGates.ts","webpack://TypeScriptModule/./src/telemetry/OfficeTelemetrySinkWrapper.ts","webpack://TypeScriptModule/./src/telemetry/TelemetryLogger.ts","webpack://TypeScriptModule/./src/utils/promise.ts","webpack://TypeScriptModule/./src/interop/ApiBridge.ts","webpack://TypeScriptModule/./src/interop/privateApis.ts","webpack://TypeScriptModule/./src/utils/Cloud.ts","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/uuid@11.0.3-c2511256e502a6b55dca/node_modules/uuid/dist/esm-browser/native.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/uuid@11.0.3-c2511256e502a6b55dca/node_modules/uuid/dist/esm-browser/rng.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/uuid@11.0.3-c2511256e502a6b55dca/node_modules/uuid/dist/esm-browser/stringify.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/uuid@11.0.3-c2511256e502a6b55dca/node_modules/uuid/dist/esm-browser/v4.js","webpack://TypeScriptModule/./src/telemetry/ErrorUtils.ts","webpack://TypeScriptModule/./src/auth/endpoints/BleuEndpoints.ts","webpack://TypeScriptModule/./src/auth/endpoints/DelosEndpoints.ts","webpack://TypeScriptModule/./src/auth/endpoints/DoDEndpoints.ts","webpack://TypeScriptModule/./src/auth/endpoints/GCCHEndpoints.ts","webpack://TypeScriptModule/./src/auth/endpoints/GCCMEndpoints.ts","webpack://TypeScriptModule/./src/auth/endpoints/GallatinEndpoints.ts","webpack://TypeScriptModule/./src/auth/endpoints/MSAEndpoints.ts","webpack://TypeScriptModule/./src/auth/endpoints/PublicEndpoints.ts","webpack://TypeScriptModule/./src/auth/endpoints/USNatEndpoints.ts","webpack://TypeScriptModule/./src/auth/endpoints/USSecEndpoints.ts","webpack://TypeScriptModule/./src/auth/endpoints/index.ts","webpack://TypeScriptModule/./src/auth/utils.ts","webpack://TypeScriptModule/./src/auth/HostAuthServiceUtils.ts","webpack://TypeScriptModule/./src/auth/BizChatAuthService.ts","webpack://TypeScriptModule/./src/auth/HostAuthService.ts","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidx-settings-provider@7.12.23-37d755edb866654851e1/node_modules/@fluidx/settings-provider/lib/EcsClientConstants.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidx-settings-provider@7.12.23-37d755edb866654851e1/node_modules/@fluidx/settings-provider/lib/utilities/EcsClientUtilities.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidx-settings-provider@7.12.23-37d755edb866654851e1/node_modules/@fluidx/settings-provider/lib/EcsClient.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidx-settings-provider@7.12.23-37d755edb866654851e1/node_modules/@fluidx/settings-provider/lib/utilities/EcsSettingsProviderUtilities.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidx-settings-provider@7.12.23-37d755edb866654851e1/node_modules/@fluidx/settings-provider/lib/EcsSettingsProvider.js","webpack://TypeScriptModule/./src/telemetry/TelemetryActivityTracker.ts","webpack://TypeScriptModule/./src/providers/ecsUtils.ts","webpack://TypeScriptModule/./src/providers/M365ChatSettingsProvider.ts","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidx-telemetry@13.36.3-35f136b13a92cbc832db/node_modules/@fluidx/telemetry/lib/MemoryLeakTracker/MemoryLeakTracker.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidx-injected-dependencies@9.19.4-001d85c04ea6acd6d88b/node_modules/@fluidx/injected-dependencies/lib/DependencyContainer/OptimizedDependencyContainer.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidframework-synthesize@2.43.0-0badd2c32ef6cea7cb5f/node_modules/@fluidframework/synthesize/lib/IFluidDependencySynthesizer.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidx-injected-dependencies@9.19.4-001d85c04ea6acd6d88b/node_modules/@fluidx/injected-dependencies/lib/DependencyContainer/LoopDependencyContainer.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidx-loop-app-urls@4.39.4-52b66ee0830a8841c012/node_modules/@fluidx/loop-app-urls/lib/LoopOrigins.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidx-loop-app-urls@4.39.4-52b66ee0830a8841c012/node_modules/@fluidx/loop-app-urls/lib/AppRouteMetadata.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidx-loop-app-urls@4.39.4-52b66ee0830a8841c012/node_modules/@fluidx/loop-app-urls/lib/PageRoute.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidx-loop-app-urls@4.39.4-52b66ee0830a8841c012/node_modules/@fluidx/loop-app-urls/lib/PodId.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidx-loop-workspace-component@1.6.5-056bbdc98898a1534e2c/node_modules/@fluidx/loop-workspace-component/lib/routing/createRouteUrls.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidx-loop-workspace-component@1.6.5-056bbdc98898a1534e2c/node_modules/@fluidx/loop-workspace-component/lib/codeLoader/constants.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/idb@6.1.5-cfd1583ac21304024fe1/node_modules/idb/build/esm/wrap-idb-value.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/idb@6.1.5-cfd1583ac21304024fe1/node_modules/idb/build/esm/index.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidx-codeloader-utilities@1.15.1-5fd2b03a40eac16fb10c/node_modules/@fluidx/codeloader-utilities/lib/cache/CodeLoaderCache.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidx-codeloader-utilities@1.15.1-5fd2b03a40eac16fb10c/node_modules/@fluidx/codeloader-utilities/lib/cache/getCodeDetailsFromNetworkAndUpdateCache.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidx-codeloader-utilities@1.15.1-5fd2b03a40eac16fb10c/node_modules/@fluidx/codeloader-utilities/lib/isAllowedCodeUrl.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidx-codeloader-utilities@1.15.1-5fd2b03a40eac16fb10c/node_modules/@fluidx/codeloader-utilities/lib/cache/deleteContainerDetailsFromCache.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidx-codeloader-utilities@1.15.1-5fd2b03a40eac16fb10c/node_modules/@fluidx/codeloader-utilities/lib/cache/maxCacheAge.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidx-codeloader-utilities@1.15.1-5fd2b03a40eac16fb10c/node_modules/@fluidx/codeloader-utilities/lib/cache/getCodeDetailsPackageFromCache.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidx-utilities@26.36.1-1cac92fc6b40a588ee08/node_modules/@fluidx/utilities/lib/logger/documentHiddenTracker.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidx-codeloader-utilities@1.15.1-5fd2b03a40eac16fb10c/node_modules/@fluidx/codeloader-utilities/lib/cache/getCodeDetailsPackageFromCacheOrNetwork.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidx-loop-sdk@5.11.2-76b635c642995fdf8ef1/node_modules/@fluidx/loop-sdk/lib/network/loadScriptWithRetries.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidx-utilities@26.36.1-1cac92fc6b40a588ee08/node_modules/@fluidx/utilities/lib/deploymentManifest/Environment.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidx-utilities@26.36.1-1cac92fc6b40a588ee08/node_modules/@fluidx/utilities/lib/codeOrigins/defaultAllowedCodeOrigins.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidx-utilities@26.36.1-1cac92fc6b40a588ee08/node_modules/@fluidx/utilities/lib/codeOrigins/getEnvironmentSpecificAllowedCodeOrigins.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidx-service-endpoints@3.10.7-0863a66cf41cfa13708d/node_modules/@fluidx/service-endpoints/lib/criticalPathEndpoints/CDNEndpoints.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidx-service-endpoints@3.10.7-0863a66cf41cfa13708d/node_modules/@fluidx/service-endpoints/lib/criticalPathEndpoints/getCDNEndpoint.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidx-utilities@26.36.1-1cac92fc6b40a588ee08/node_modules/@fluidx/utilities/lib/file/downloadFileFromCdn.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidx-loop-workspace-component@1.6.5-056bbdc98898a1534e2c/node_modules/@fluidx/loop-workspace-component/lib/codeLoader/fetchManifestAndBaseUrl.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidx-loop-workspace-component@1.6.5-056bbdc98898a1534e2c/node_modules/@fluidx/loop-workspace-component/lib/codeLoader/WorkspaceCodeDetailsPackage.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidx-codeloader-utilities@1.15.1-5fd2b03a40eac16fb10c/node_modules/@fluidx/codeloader-utilities/lib/prefetchAssets.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidx-loop-workspace-component@1.6.5-056bbdc98898a1534e2c/node_modules/@fluidx/loop-workspace-component/lib/codeLoader/prefetchAssetsFromManifest.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidx-loop-workspace-component@1.6.5-056bbdc98898a1534e2c/node_modules/@fluidx/loop-workspace-component/lib/codeLoader/loadOverridesFromStorage.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidx-loop-workspace-component@1.6.5-056bbdc98898a1534e2c/node_modules/@fluidx/loop-workspace-component/lib/codeLoader/CdnCodeLoader.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidx-codeloader-utilities@1.15.1-5fd2b03a40eac16fb10c/node_modules/@fluidx/codeloader-utilities/lib/cache/perWindowLoopModuleCache.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidx-codeloader-utilities@1.15.1-5fd2b03a40eac16fb10c/node_modules/@fluidx/codeloader-utilities/lib/cache/parseVersionNumber.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@ms-office-web-host@16.29.1-a11a09a8378b52726e82/node_modules/@ms/office-web-host/lib/CodeLoaderBundler/LoopCodeLoaderBundler.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@ms-office-web-host@16.29.1-a11a09a8378b52726e82/node_modules/@ms/office-web-host/lib/CodeLoaderBundler/LoopCodeLoaderBundlerFactoryProvider.js","webpack://TypeScriptModule/./src/providers/CopilotConfigurationContext.ts","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidx-utilities@26.36.1-1cac92fc6b40a588ee08/node_modules/@fluidx/utilities/lib/localization/localeDirection.js","webpack://TypeScriptModule/./src/providers/InternationalizationContext.ts","webpack://TypeScriptModule/./src/providers/LoopSettingsProvider.ts","webpack://TypeScriptModule/./src/utils/HostAppSettings.ts","webpack://TypeScriptModule/./src/providers/TelemetryConfigProvider.ts","webpack://TypeScriptModule/./src/providers/ThemeProvider.ts","webpack://TypeScriptModule/./src/providers/OneNoteUrlHandlerProvider.ts","webpack://TypeScriptModule/./src/telemetry/HostLoopTelemetrySink.ts","webpack://TypeScriptModule/./src/service/DependencySynthesizerService.ts","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidframework-odsp-driver@2.41.0-e5d05eddb671b6cfa081/node_modules/@fluidframework/odsp-driver/lib/constants.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidframework-odsp-driver@2.41.0-e5d05eddb671b6cfa081/node_modules/@fluidframework/odsp-driver/lib/odspFluidFileLink.js","webpack://TypeScriptModule/./src/service/workspaceManager/constants.ts","webpack://TypeScriptModule/./src/data/Models/index.ts","webpack://TypeScriptModule/./src/service/workspaceManager/WorkspaceManager.ts","webpack://TypeScriptModule/./src/service/workspaceManager/AppWorkspaceManager.ts","webpack://TypeScriptModule/./src/utils/Environment.ts","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidx-loop-workspace-component@1.6.5-056bbdc98898a1534e2c/node_modules/@fluidx/loop-workspace-component/lib/routing/createWorkspaceComponentRouterInput.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidx-loop-workspace-component@1.6.5-056bbdc98898a1534e2c/node_modules/@fluidx/loop-workspace-component/lib/routing/createCreatePageLoopRouterInput.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidx-loop-workspace-component@1.6.5-056bbdc98898a1534e2c/node_modules/@fluidx/loop-workspace-component/lib/routing/createCreatePageTemplateLoopRouterInput.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidx-loop-workspace-component@1.6.5-056bbdc98898a1534e2c/node_modules/@fluidx/loop-workspace-component/lib/routing/createCreateNotebookLoopRouterInput.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@ms-office-web-host@16.29.1-a11a09a8378b52726e82/node_modules/@ms/office-web-host/lib/telemetryTrackers/HostActivityTracker/HostActivity.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@ms-office-web-host@16.29.1-a11a09a8378b52726e82/node_modules/@ms/office-web-host/lib/telemetryTrackers/HostActivityTracker/HostActivityTracker.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@ms-office-web-host@16.29.1-a11a09a8378b52726e82/node_modules/@ms/office-web-host/lib/npm.package.version.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@ms-office-web-host@16.29.1-a11a09a8378b52726e82/node_modules/@ms/office-web-host/lib/Telemetry.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@ms-office-web-host@16.29.1-a11a09a8378b52726e82/node_modules/@ms/office-web-host/lib/LoadHelpers/initializeTelemetryInDiv.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidx-loop-component-manifest-loader@3.31.4-dc7e3ae14fe50d2ec2d2/node_modules/@fluidx/loop-component-manifest-loader/lib/ComponentManifest/isFluidRegistrationId.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidframework-container-loader@2.43.0-bb576ed4fbef8d66eeab/node_modules/@fluidframework/container-loader/lib/location-redirection-utilities/resolveWithLocationRedirection.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidx-1p-loop-types@2.76.0-7696265851b82689392b/node_modules/@fluidx/1p-loop-types/lib/FluidExtensions/ErrorContracts.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidx-telemetry@13.36.3-35f136b13a92cbc832db/node_modules/@fluidx/telemetry/lib/Utilities/ExpectedErrors.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidx-utilities@26.36.1-1cac92fc6b40a588ee08/node_modules/@fluidx/utilities/lib/deferred/Deferred.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidx-utilities@26.36.1-1cac92fc6b40a588ee08/node_modules/@fluidx/utilities/lib/performance/computeOffsetTime.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidframework-container-definitions@2.43.0-1bd28d3539b9e782a50f/node_modules/@fluidframework/container-definitions/lib/runtime.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@ms-office-web-host@16.29.1-a11a09a8378b52726e82/node_modules/@ms/office-web-host/lib/Reliability/OfficeWebHostAsha.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@ms-office-web-host@16.29.1-a11a09a8378b52726e82/node_modules/@ms/office-web-host/lib/Reliability/QoSErrorHelpers.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@ms-office-web-host@16.29.1-a11a09a8378b52726e82/node_modules/@ms/office-web-host/lib/LoadHelpers/attachContainerListeners.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidx-telemetry@13.36.3-35f136b13a92cbc832db/node_modules/@fluidx/telemetry/lib/Utilities/redactDomains.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@ms-office-web-host@16.29.1-a11a09a8378b52726e82/node_modules/@ms/office-web-host/lib/LoadHelpers/FluidRuntimeLoggerAdapter.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@ms-office-web-host@16.29.1-a11a09a8378b52726e82/node_modules/@ms/office-web-host/lib/LoadHelpers/resumeContainerInternal.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidframework-container-loader@2.43.0-bb576ed4fbef8d66eeab/node_modules/@fluidframework/container-loader/lib/connectionState.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluid-internal-client-utils@2.43.0-7d42fa0637af67398fcf/node_modules/@fluid-internal/client-utils/lib/typedEventEmitter.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidframework-container-definitions@2.43.0-1bd28d3539b9e782a50f/node_modules/@fluidframework/container-definitions/lib/fluidPackage.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidframework-core-utils@2.43.0-5b3898af632b0cc9cdce/node_modules/@fluidframework/core-utils/lib/unreachable.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidframework-driver-definitions@2.43.0-600acf0ac6e5fd7c56e6/node_modules/@fluidframework/driver-definitions/lib/protocol/summary.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidframework-driver-definitions@2.43.0-600acf0ac6e5fd7c56e6/node_modules/@fluidframework/driver-definitions/lib/protocol/protocol.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidframework-driver-utils@2.43.0-4ce13425085694533777/node_modules/@fluidframework/driver-utils/lib/summaryForCreateNew.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidframework-core-utils@2.43.0-5b3898af632b0cc9cdce/node_modules/@fluidframework/core-utils/lib/delay.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidframework-driver-utils@2.43.0-4ce13425085694533777/node_modules/@fluidframework/driver-utils/lib/runWithRetry.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidframework-driver-utils@2.43.0-4ce13425085694533777/node_modules/@fluidframework/driver-utils/lib/packageVersion.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidframework-driver-utils@2.43.0-4ce13425085694533777/node_modules/@fluidframework/driver-utils/lib/storageUtils.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidframework-driver-utils@2.43.0-4ce13425085694533777/node_modules/@fluidframework/driver-utils/lib/readAndParse.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidframework-telemetry-utils@2.43.0-02df081ffee6d2261b11/node_modules/@fluidframework/telemetry-utils/lib/error.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidframework-telemetry-utils@2.43.0-02df081ffee6d2261b11/node_modules/@fluidframework/telemetry-utils/lib/events.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidframework-telemetry-utils@2.43.0-02df081ffee6d2261b11/node_modules/@fluidframework/telemetry-utils/lib/eventEmitterWithErrorHandling.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@ungap-structured-clone@1.2.0-1e9410b8554f8bf02591/node_modules/@ungap/structured-clone/esm/types.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@ungap-structured-clone@1.2.0-1e9410b8554f8bf02591/node_modules/@ungap/structured-clone/esm/deserialize.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@ungap-structured-clone@1.2.0-1e9410b8554f8bf02591/node_modules/@ungap/structured-clone/esm/serialize.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@ungap-structured-clone@1.2.0-1e9410b8554f8bf02591/node_modules/@ungap/structured-clone/esm/index.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidframework-container-loader@2.43.0-bb576ed4fbef8d66eeab/node_modules/@fluidframework/container-loader/lib/utils.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidframework-core-utils@2.43.0-5b3898af632b0cc9cdce/node_modules/@fluidframework/core-utils/lib/compare.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidframework-container-loader@2.43.0-bb576ed4fbef8d66eeab/node_modules/@fluidframework/container-loader/lib/audience.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidframework-driver-definitions@2.43.0-600acf0ac6e5fd7c56e6/node_modules/@fluidframework/driver-definitions/lib/protocol/scopes.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidframework-container-loader@2.43.0-bb576ed4fbef8d66eeab/node_modules/@fluidframework/container-loader/lib/contracts.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidframework-driver-utils@2.43.0-4ce13425085694533777/node_modules/@fluidframework/driver-utils/lib/networkUtils.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidframework-driver-utils@2.43.0-4ce13425085694533777/node_modules/@fluidframework/driver-utils/lib/messageRecognition.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidframework-container-loader@2.43.0-bb576ed4fbef8d66eeab/node_modules/@fluidframework/container-loader/lib/deltaQueue.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidframework-container-loader@2.43.0-bb576ed4fbef8d66eeab/node_modules/@fluidframework/container-loader/lib/protocol/quorum.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidframework-container-loader@2.43.0-bb576ed4fbef8d66eeab/node_modules/@fluidframework/container-loader/lib/protocol/protocol.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidframework-container-loader@2.43.0-bb576ed4fbef8d66eeab/node_modules/@fluidframework/container-loader/lib/protocol.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidframework-container-loader@2.43.0-bb576ed4fbef8d66eeab/node_modules/@fluidframework/container-loader/lib/connectionManager.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidframework-core-utils@2.43.0-5b3898af632b0cc9cdce/node_modules/@fluidframework/core-utils/lib/timer.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidframework-container-loader@2.43.0-bb576ed4fbef8d66eeab/node_modules/@fluidframework/container-loader/lib/catchUpMonitor.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidframework-container-loader@2.43.0-bb576ed4fbef8d66eeab/node_modules/@fluidframework/container-loader/lib/connectionStateHandler.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluid-internal-client-utils@2.43.0-7d42fa0637af67398fcf/node_modules/@fluid-internal/client-utils/lib/layerCompat.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidframework-container-loader@2.43.0-bb576ed4fbef8d66eeab/node_modules/@fluidframework/container-loader/lib/packageVersion.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidframework-container-loader@2.43.0-bb576ed4fbef8d66eeab/node_modules/@fluidframework/container-loader/lib/loaderLayerCompatState.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidframework-container-loader@2.43.0-bb576ed4fbef8d66eeab/node_modules/@fluidframework/container-loader/lib/containerContext.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidframework-driver-utils@2.43.0-4ce13425085694533777/node_modules/@fluidframework/driver-utils/lib/error.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidframework-container-loader@2.43.0-bb576ed4fbef8d66eeab/node_modules/@fluidframework/container-loader/lib/protocolTreeDocumentStorageService.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidframework-container-loader@2.43.0-bb576ed4fbef8d66eeab/node_modules/@fluidframework/container-loader/lib/retriableDocumentStorageService.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidframework-container-loader@2.43.0-bb576ed4fbef8d66eeab/node_modules/@fluidframework/container-loader/lib/containerStorageAdapter.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidframework-container-definitions@2.43.0-1bd28d3539b9e782a50f/node_modules/@fluidframework/container-definitions/lib/error.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidframework-container-loader@2.43.0-bb576ed4fbef8d66eeab/node_modules/@fluidframework/container-loader/lib/error.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidframework-container-loader@2.43.0-bb576ed4fbef8d66eeab/node_modules/@fluidframework/container-loader/lib/deltaManager.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidframework-container-loader@2.43.0-bb576ed4fbef8d66eeab/node_modules/@fluidframework/container-loader/lib/debugLogger.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidframework-container-loader@2.43.0-bb576ed4fbef8d66eeab/node_modules/@fluidframework/container-loader/lib/loader.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidframework-container-loader@2.43.0-bb576ed4fbef8d66eeab/node_modules/@fluidframework/container-loader/lib/noopHeuristic.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidframework-driver-definitions@2.43.0-600acf0ac6e5fd7c56e6/node_modules/@fluidframework/driver-definitions/lib/storage.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidframework-container-loader@2.43.0-bb576ed4fbef8d66eeab/node_modules/@fluidframework/container-loader/lib/serializedStateManager.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidframework-container-loader@2.43.0-bb576ed4fbef8d66eeab/node_modules/@fluidframework/container-loader/lib/container.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidframework-container-loader@2.43.0-bb576ed4fbef8d66eeab/node_modules/@fluidframework/container-loader/lib/attachment.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidframework-container-loader@2.43.0-bb576ed4fbef8d66eeab/node_modules/@fluidframework/container-loader/lib/memoryBlobStorage.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidframework-core-utils@2.43.0-5b3898af632b0cc9cdce/node_modules/@fluidframework/core-utils/lib/typesGuards.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidframework-container-loader@2.43.0-bb576ed4fbef8d66eeab/node_modules/@fluidframework/container-loader/lib/quorum.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@ms-office-web-host@16.29.1-a11a09a8378b52726e82/node_modules/@ms/office-web-host/lib/Utils/containerProxy.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@ms-office-web-host@16.29.1-a11a09a8378b52726e82/node_modules/@ms/office-web-host/lib/Utils/providerProxy.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidframework-runtime-utils@2.43.0-26199d35429a4331bda5/node_modules/@fluidframework/runtime-utils/lib/requestParser.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@ms-office-web-host@16.29.1-a11a09a8378b52726e82/node_modules/@ms/office-web-host/lib/LoadHelpers/requestComponent.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidframework-core-interfaces@2.43.0-094a1086bb24160621f4/node_modules/@fluidframework/core-interfaces/lib/handles.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidframework-runtime-utils@2.43.0-26199d35429a4331bda5/node_modules/@fluidframework/runtime-utils/lib/handles.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@ms-office-web-host@16.29.1-a11a09a8378b52726e82/node_modules/@ms/office-web-host/lib/LoadHelpers/loadComponent.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@ms-bohemia-codeloader@2.29.3-d5d3f419fd79ee27ba81/node_modules/@ms/bohemia-codeloader/lib/Constants.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidx-utilities@26.36.1-1cac92fc6b40a588ee08/node_modules/@fluidx/utilities/lib/misc/getCdnBaseUrl.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@ms-bohemia-codeloader@2.29.3-d5d3f419fd79ee27ba81/node_modules/@ms/bohemia-codeloader/lib/FFXCodeDetailsHelpers.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@ms-bohemia-codeloader@2.29.3-d5d3f419fd79ee27ba81/node_modules/@ms/bohemia-codeloader/lib/createCodeDetailsProviderWithCache.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidx-service-endpoints@3.10.7-0863a66cf41cfa13708d/node_modules/@fluidx/service-endpoints/lib/criticalPathEndpoints/WhiteboardCDNEndpoints.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@ms-bohemia-codeloader@2.29.3-d5d3f419fd79ee27ba81/node_modules/@ms/bohemia-codeloader/lib/FFXCodeDetailsProviders.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidx-service-endpoints@3.10.7-0863a66cf41cfa13708d/node_modules/@fluidx/service-endpoints/lib/criticalPathEndpoints/getWhiteboardCDNEndpoint.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidframework-container-definitions@2.43.0-1bd28d3539b9e782a50f/node_modules/@fluidframework/container-definitions/lib/browserPackage.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@ms-bohemia-codeloader@2.29.3-d5d3f419fd79ee27ba81/node_modules/@ms/bohemia-codeloader/lib/getContainerTypeForLogging.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@ms-bohemia-codeloader@2.29.3-d5d3f419fd79ee27ba81/node_modules/@ms/bohemia-codeloader/lib/telemetry.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@ms-bohemia-codeloader@2.29.3-d5d3f419fd79ee27ba81/node_modules/@ms/bohemia-codeloader/lib/loadStyleSheetWithRetries.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@ms-bohemia-codeloader@2.29.3-d5d3f419fd79ee27ba81/node_modules/@ms/bohemia-codeloader/lib/SimpleCodeLoader.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@ms-bohemia-codeloader@2.29.3-d5d3f419fd79ee27ba81/node_modules/@ms/bohemia-codeloader/lib/BohemiaCodeLoader.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@ms-bohemia-codeloader@2.29.3-d5d3f419fd79ee27ba81/node_modules/@ms/bohemia-codeloader/lib/BohemiaCodeLoaderFactory.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@ms-office-web-host@16.29.1-a11a09a8378b52726e82/node_modules/@ms/office-web-host/lib/LoadHelpers/SettingsProviderAdapter.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@ms-office-web-host@16.29.1-a11a09a8378b52726e82/node_modules/@ms/office-web-host/lib/getPackageName.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@ms-office-web-host@16.29.1-a11a09a8378b52726e82/node_modules/@ms/office-web-host/lib/LoadHelpers/logContainerCodeDetails.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@ms-office-web-host@16.29.1-a11a09a8378b52726e82/node_modules/@ms/office-web-host/lib/LoadHelpers/loadContainer.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@ms-office-web-host@16.29.1-a11a09a8378b52726e82/node_modules/@ms/office-web-host/lib/getContainerInfo.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@ms-office-web-host@16.29.1-a11a09a8378b52726e82/node_modules/@ms/office-web-host/lib/Reliability/OWHErrorTypes.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@ms-office-web-host@16.29.1-a11a09a8378b52726e82/node_modules/@ms/office-web-host/lib/LoadHelpers/disposeContainer.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidx-utilities@26.36.1-1cac92fc6b40a588ee08/node_modules/@fluidx/utilities/lib/settings/enableUpToAudience.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@ms-office-web-host@16.29.1-a11a09a8378b52726e82/node_modules/@ms/office-web-host/lib/Utils/featureSettings.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@ms-office-web-host@16.29.1-a11a09a8378b52726e82/node_modules/@ms/office-web-host/lib/LoadHelpers/loadComponentInDivInternal.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidx-utilities@26.36.1-1cac92fc6b40a588ee08/node_modules/@fluidx/utilities/lib/logger/logBrowserMetadata.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@ms-office-web-host@16.29.1-a11a09a8378b52726e82/node_modules/@ms/office-web-host/lib/LoadHelpers/getTemplateSerializedContent.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidframework-odsp-driver@2.43.0-ea4165ce93b8cf91d3cd/node_modules/@fluidframework/odsp-driver/lib/contractsPublic.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidframework-odsp-driver@2.43.0-ea4165ce93b8cf91d3cd/node_modules/@fluidframework/odsp-driver/lib/createOdspUrl.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluid-internal-client-utils@2.43.0-7d42fa0637af67398fcf/node_modules/@fluid-internal/client-utils/lib/hashFileBrowser.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidframework-odsp-driver@2.43.0-ea4165ce93b8cf91d3cd/node_modules/@fluidframework/odsp-driver/lib/odspUrlHelper.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidframework-odsp-driver@2.43.0-ea4165ce93b8cf91d3cd/node_modules/@fluidframework/odsp-driver/lib/odspDriverUrlResolver.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidframework-odsp-driver@2.43.0-ea4165ce93b8cf91d3cd/node_modules/@fluidframework/odsp-driver/lib/odspPublicUtils.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidframework-core-utils@2.43.0-5b3898af632b0cc9cdce/node_modules/@fluidframework/core-utils/lib/promiseCache.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidframework-odsp-driver@2.43.0-ea4165ce93b8cf91d3cd/node_modules/@fluidframework/odsp-driver/lib/getUrlAndHeadersWithAuth.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidframework-odsp-driver@2.43.0-ea4165ce93b8cf91d3cd/node_modules/@fluidframework/odsp-driver/lib/mockify.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidframework-odsp-driver@2.43.0-ea4165ce93b8cf91d3cd/node_modules/@fluidframework/odsp-driver/lib/epochTracker.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidframework-odsp-driver@2.43.0-ea4165ce93b8cf91d3cd/node_modules/@fluidframework/odsp-driver/lib/getFileLink.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidframework-odsp-driver@2.43.0-ea4165ce93b8cf91d3cd/node_modules/@fluidframework/odsp-driver/lib/retryUtils.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidframework-odsp-driver@2.43.0-ea4165ce93b8cf91d3cd/node_modules/@fluidframework/odsp-driver/lib/odspDriverUrlResolverForShareLink.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@ms-office-web-host@16.29.1-a11a09a8378b52726e82/node_modules/@ms/office-web-host/lib/checkFluidUrl.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidframework-odsp-driver@2.43.0-ea4165ce93b8cf91d3cd/node_modules/@fluidframework/odsp-driver/lib/checkUrl.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@ms-office-web-host@16.29.1-a11a09a8378b52726e82/node_modules/@ms/office-web-host/lib/LoopLoader.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@ms-office-web-host@16.29.1-a11a09a8378b52726e82/node_modules/@ms/office-web-host/lib/LoadHelpers/getLoopComponentFromLoopFactory.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@ms-office-web-host@16.29.1-a11a09a8378b52726e82/node_modules/@ms/office-web-host/lib/LoadHelpers/createLoopLoader.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@ms-office-web-host@16.29.1-a11a09a8378b52726e82/node_modules/@ms/office-web-host/lib/LoadHelpers/loadLoopComponentHelper.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@ms-office-web-host@16.29.1-a11a09a8378b52726e82/node_modules/@ms/office-web-host/lib/getLoopComponentInternal/getLoopComponentInternal.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@ms-office-web-host@16.29.1-a11a09a8378b52726e82/node_modules/@ms/office-web-host/lib/getLoopComponentInternal/getOdspFluidDocumentServiceFactoryLazy.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@ms-office-web-host@16.29.1-a11a09a8378b52726e82/node_modules/@ms/office-web-host/lib/Utils/resolveUrlPromiseOnContainerAttach.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@ms-office-web-host@16.29.1-a11a09a8378b52726e82/node_modules/@ms/office-web-host/lib/getLoopComponentInternal/injectedDependencies.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@ms-office-web-host@16.29.1-a11a09a8378b52726e82/node_modules/@ms/office-web-host/lib/Utils/driverProvider.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidx-telemetry@13.36.3-35f136b13a92cbc832db/node_modules/@fluidx/telemetry/lib/BaseLogger.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidx-telemetry@13.36.3-35f136b13a92cbc832db/node_modules/@fluidx/telemetry/lib/LogProcessor/ConsoleLogProcessor/ConsoleLogProcessor.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidx-telemetry@13.36.3-35f136b13a92cbc832db/node_modules/@fluidx/telemetry/lib/Health/QoS/VetosByPillar.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidx-telemetry@13.36.3-35f136b13a92cbc832db/node_modules/@fluidx/telemetry/lib/LogProcessor/OfficeFluidAriaInfo.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidx-telemetry@13.36.3-35f136b13a92cbc832db/node_modules/@fluidx/telemetry/lib/LogProcessor/OfficeFluidWorkspacesAriaInfo.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidx-telemetry@13.36.3-35f136b13a92cbc832db/node_modules/@fluidx/telemetry/lib/LogProcessor/LogProcessorHelpers.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidx-telemetry@13.36.3-35f136b13a92cbc832db/node_modules/@fluidx/telemetry/lib/LogProcessor/BaseOtelLogProcessor.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidx-telemetry@13.36.3-35f136b13a92cbc832db/node_modules/@fluidx/telemetry/lib/Health/QoS/prepareQosEvent.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidx-telemetry@13.36.3-35f136b13a92cbc832db/node_modules/@fluidx/telemetry/lib/LogProcessor/HostLogProcessor/HostLogProcessor.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidx-telemetry@13.36.3-35f136b13a92cbc832db/node_modules/@fluidx/telemetry/lib/Utilities/LoopTelemetrySinkImpl.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidx-telemetry@13.36.3-35f136b13a92cbc832db/node_modules/@fluidx/telemetry/lib/LogProcessor/FluidLogProcessor/FluidLogProcessor.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidx-telemetry@13.36.3-35f136b13a92cbc832db/node_modules/@fluidx/telemetry/lib/OfficeFluidLogger/OfficeFluidLogger.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@fluidx-telemetry@13.36.3-35f136b13a92cbc832db/node_modules/@fluidx/telemetry/lib/Utilities/UnhandledEventsTypes.js","webpack://TypeScriptModule/./src/utils/loopComponent.ts","webpack://TypeScriptModule/./src/telemetry/FluidTelemetryLogger.ts","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@ms-office-web-host@16.29.1-a11a09a8378b52726e82/node_modules/@ms/office-web-host/lib/getLoopComponent.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@griffel-core@1.18.0-735d0839e3771135152b/node_modules/@griffel/core/insertionFactory.esm.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@emotion-hash@0.9.2-b539592bf66cc00b3cc1/node_modules/@emotion/hash/dist/emotion-hash.esm.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/rtl-css-js@1.16.1-c59a65475404577e03a8/node_modules/rtl-css-js/dist/esm/convert-9768a965.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@griffel-core@1.18.0-735d0839e3771135152b/node_modules/@griffel/core/constants.esm.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@griffel-core@1.18.0-735d0839e3771135152b/node_modules/@griffel/core/runtime/utils/hyphenateProperty.esm.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@griffel-core@1.18.0-735d0839e3771135152b/node_modules/@griffel/core/runtime/utils/normalizeNestedProperty.esm.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/stylis@4.3.2-d06ca0ef5731b62adac8/node_modules/stylis/src/Enum.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/stylis@4.3.2-d06ca0ef5731b62adac8/node_modules/stylis/src/Utility.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/stylis@4.3.2-d06ca0ef5731b62adac8/node_modules/stylis/src/Serializer.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/stylis@4.3.2-d06ca0ef5731b62adac8/node_modules/stylis/src/Tokenizer.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/stylis@4.3.2-d06ca0ef5731b62adac8/node_modules/stylis/src/Parser.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/stylis@4.3.2-d06ca0ef5731b62adac8/node_modules/stylis/src/Middleware.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@griffel-core@1.18.0-735d0839e3771135152b/node_modules/@griffel/core/runtime/stylis/globalPlugin.esm.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@griffel-core@1.18.0-735d0839e3771135152b/node_modules/@griffel/core/runtime/stylis/prefixerPlugin.esm.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@griffel-core@1.18.0-735d0839e3771135152b/node_modules/@griffel/core/runtime/stylis/sortClassesInAtRulesPlugin.esm.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@griffel-core@1.18.0-735d0839e3771135152b/node_modules/@griffel/core/runtime/stylis/isAtRuleElement.esm.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@griffel-core@1.18.0-735d0839e3771135152b/node_modules/@griffel/core/runtime/compileCSSRules.esm.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@griffel-core@1.18.0-735d0839e3771135152b/node_modules/@griffel/core/runtime/compileAtomicCSSRule.esm.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@griffel-core@1.18.0-735d0839e3771135152b/node_modules/@griffel/core/runtime/utils/cssifyObject.esm.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@griffel-core@1.18.0-735d0839e3771135152b/node_modules/@griffel/core/runtime/compileKeyframeCSS.esm.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@griffel-core@1.18.0-735d0839e3771135152b/node_modules/@griffel/core/runtime/shorthands.esm.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@griffel-core@1.18.0-735d0839e3771135152b/node_modules/@griffel/core/runtime/utils/generateCombinedMediaQuery.esm.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@griffel-core@1.18.0-735d0839e3771135152b/node_modules/@griffel/core/runtime/utils/isMediaQuerySelector.esm.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@griffel-core@1.18.0-735d0839e3771135152b/node_modules/@griffel/core/runtime/utils/isLayerSelector.esm.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@griffel-core@1.18.0-735d0839e3771135152b/node_modules/@griffel/core/runtime/utils/isNestedSelector.esm.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@griffel-core@1.18.0-735d0839e3771135152b/node_modules/@griffel/core/runtime/utils/isSupportQuerySelector.esm.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@griffel-core@1.18.0-735d0839e3771135152b/node_modules/@griffel/core/runtime/utils/isContainerQuerySelector.esm.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@griffel-core@1.18.0-735d0839e3771135152b/node_modules/@griffel/core/runtime/getStyleBucketName.esm.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@griffel-core@1.18.0-735d0839e3771135152b/node_modules/@griffel/core/runtime/utils/hashPropertyKey.esm.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@griffel-core@1.18.0-735d0839e3771135152b/node_modules/@griffel/core/runtime/utils/hashClassName.esm.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@griffel-core@1.18.0-735d0839e3771135152b/node_modules/@griffel/core/runtime/utils/isResetValue.esm.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@griffel-core@1.18.0-735d0839e3771135152b/node_modules/@griffel/core/runtime/utils/trimSelector.esm.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@griffel-core@1.18.0-735d0839e3771135152b/node_modules/@griffel/core/runtime/warnings/logError.esm.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@griffel-core@1.18.0-735d0839e3771135152b/node_modules/@griffel/core/runtime/resolveStyleRules.esm.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@griffel-core@1.18.0-735d0839e3771135152b/node_modules/@griffel/core/runtime/warnings/warnAboutUnsupportedProperties.esm.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@griffel-core@1.18.0-735d0839e3771135152b/node_modules/@griffel/core/runtime/utils/isObject.esm.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@griffel-core@1.18.0-735d0839e3771135152b/node_modules/@griffel/core/runtime/warnings/warnAboutUnresolvedRule.esm.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@griffel-core@1.18.0-735d0839e3771135152b/node_modules/@griffel/core/runtime/utils/hashSequence.esm.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@griffel-core@1.18.0-735d0839e3771135152b/node_modules/@griffel/core/runtime/reduceToClassNameForSlots.esm.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@griffel-core@1.18.0-735d0839e3771135152b/node_modules/@griffel/core/makeStyles.esm.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@griffel-core@1.18.0-735d0839e3771135152b/node_modules/@griffel/core/resolveStyleRulesForSlots.esm.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@griffel-react@1.5.25-d2ad81712230e63bbc2a/node_modules/@griffel/react/useInsertionEffect.esm.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@griffel-react@1.5.25-d2ad81712230e63bbc2a/node_modules/@griffel/react/insertionFactory.esm.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@griffel-react@1.5.25-d2ad81712230e63bbc2a/node_modules/@griffel/react/utils/canUseDOM.esm.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@griffel-core@1.18.0-735d0839e3771135152b/node_modules/@griffel/core/renderer/createIsomorphicStyleSheet.esm.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@griffel-core@1.18.0-735d0839e3771135152b/node_modules/@griffel/core/renderer/getStyleSheetForBucket.esm.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@griffel-core@1.18.0-735d0839e3771135152b/node_modules/@griffel/core/renderer/safeInsertRule.esm.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@griffel-core@1.18.0-735d0839e3771135152b/node_modules/@griffel/core/renderer/createDOMRenderer.esm.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@griffel-core@1.18.0-735d0839e3771135152b/node_modules/@griffel/core/runtime/utils/normalizeCSSBucketEntry.esm.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@griffel-react@1.5.25-d2ad81712230e63bbc2a/node_modules/@griffel/react/RendererContext.esm.js","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@griffel-react@1.5.25-d2ad81712230e63bbc2a/node_modules/@griffel/react/TextDirectionContext.esm.js","webpack://TypeScriptModule/./src/components/HostedWorkspaceUI.styles.ts","webpack://TypeScriptModule/../../../../npm/.store/sdx_onwebviewcomponents/@griffel-react@1.5.25-d2ad81712230e63bbc2a/node_modules/@griffel/react/makeStyles.esm.js","webpack://TypeScriptModule/./src/components/HostedWorkspaceUI.tsx","webpack://TypeScriptModule/./src/components/App.tsx","webpack://TypeScriptModule/./src/interop/nativeEvents.ts","webpack://TypeScriptModule/./src/index.tsx"],"sourcesContent":["var getProto = Object.getPrototypeOf ? (obj) => (Object.getPrototypeOf(obj)) : (obj) => (obj.__proto__);\nvar leafPrototypes;\n// create a fake namespace object\n// mode & 1: value is a module id, require it\n// mode & 2: merge all properties of value into the ns\n// mode & 4: return value when already ns object\n// mode & 16: return value when it's Promise-like\n// mode & 8|1: behave like require\n__webpack_require__.t = function(value, mode) {\n\tif(mode & 1) value = this(value);\n\tif(mode & 8) return value;\n\tif(typeof value === 'object' && value) {\n\t\tif((mode & 4) && value.__esModule) return value;\n\t\tif((mode & 16) && typeof value.then === 'function') return value;\n\t}\n\tvar ns = Object.create(null);\n\t__webpack_require__.r(ns);\n\tvar def = {};\n\tleafPrototypes = leafPrototypes || [null, getProto({}), getProto([]), getProto(getProto)];\n\tfor(var current = mode & 2 && value; typeof current == 'object' && !~leafPrototypes.indexOf(current); current = getProto(current)) {\n\t\tObject.getOwnPropertyNames(current).forEach((key) => (def[key] = () => (value[key])));\n\t}\n\tdef['default'] = () => (value);\n\t__webpack_require__.d(ns, def);\n\treturn ns;\n};","var inProgress = {};\nvar dataWebpackPrefix = \"TypeScriptModule:\";\n// loadScript function to load a script via script tag\n__webpack_require__.l = (url, done, key, chunkId) => {\n\tif(inProgress[url]) { inProgress[url].push(done); return; }\n\tvar script, needAttach;\n\tif(key !== undefined) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tfor(var i = 0; i < scripts.length; i++) {\n\t\t\tvar s = scripts[i];\n\t\t\tif(s.getAttribute(\"src\") == url || s.getAttribute(\"data-webpack\") == dataWebpackPrefix + key) { script = s; break; }\n\t\t}\n\t}\n\tif(!script) {\n\t\tneedAttach = true;\n\t\tscript = document.createElement('script');\n\n\t\tscript.charset = 'utf-8';\n\t\tscript.timeout = 120;\n\t\tif (__webpack_require__.nc) {\n\t\t\tscript.setAttribute(\"nonce\", __webpack_require__.nc);\n\t\t}\n\t\tscript.setAttribute(\"data-webpack\", dataWebpackPrefix + key);\n\n\t\tscript.src = url;\n\t}\n\tinProgress[url] = [done];\n\tvar onScriptComplete = (prev, event) => {\n\t\t// avoid mem leaks in IE.\n\t\tscript.onerror = script.onload = null;\n\t\tclearTimeout(timeout);\n\t\tvar doneFns = inProgress[url];\n\t\tdelete inProgress[url];\n\t\tscript.parentNode && script.parentNode.removeChild(script);\n\t\tdoneFns && doneFns.forEach((fn) => (fn(event)));\n\t\tif(prev) return prev(event);\n\t}\n\tvar timeout = setTimeout(onScriptComplete.bind(null, undefined, { type: 'timeout', target: script }), 120000);\n\tscript.onerror = onScriptComplete.bind(null, script.onerror);\n\tscript.onload = onScriptComplete.bind(null, script.onload);\n\tneedAttach && document.head.appendChild(script);\n};","import { delay } from './delay';\n/**\n * Determines the amount of time to wait before retrying\n */\nexport function linearBackoff(backoffTimeMs) {\n return (n) => n * backoffTimeMs;\n}\n/**\n * Always returns a contant backoff time.\n */\nexport function constantBackoff(backoffTimeMs) {\n return () => backoffTimeMs;\n}\n/**\n * Calculates an exponential backoff time\n */\nexport function exponentialBackoff(backoffTimeMs) {\n return (n) => Math.pow(2, n) * backoffTimeMs;\n}\n/**\n * Specifies no retry\n */\nexport function noRetry() {\n return () => false;\n}\n/**\n * A utility function to execute async callback with support for retries and timeout\n * @param asyncCallback function returning result as a promise.\n * If it rejects, then retrying will immediately stop.\n * @param retryPolicy how to do retries\n * @param timeoutPolicy how to treat timeout\n */\nexport function asyncWithRetry(asyncCallback, retryPolicy, timeoutPolicy) {\n const timeoutAbortController = new AbortController();\n return asyncWithRetryImpl(asyncCallback, [], timeoutAbortController, retryPolicy, timeoutPolicy);\n}\n/**\n * Should not be used directly. Internal recursive function for {@link asyncWithRetry}.\n * @param asyncCallback function returning result as a promise\n * @param tries result so far of every attempted try\n * @param timeoutAbortController used to clear setTimeouts that are used internally once we're done.\n * @param retryPolicy how to do retries\n * @param timeoutPolicy how to treat timeout\n */\nfunction asyncWithRetryImpl(asyncCallback, tries, timeoutAbortController, retryPolicy, timeoutPolicy) {\n let result;\n const promiseArr = [\n asyncCallback(tries.length).then((callbackResult) => {\n result = callbackResult;\n return false;\n })\n ];\n // If a timeout policy is used, race the timeout with the async callback\n if (timeoutPolicy && timeoutPolicy.timeoutMs > 0) {\n promiseArr.push(delay(timeoutPolicy.timeoutMs, timeoutAbortController.signal).then(() => true));\n }\n return Promise.race(promiseArr).then((timedOut) => {\n // Execute onTimeout callback in case asyncCallback did not complete in time\n if (timedOut) {\n result = timeoutPolicy.onTimeout();\n }\n // Check if the retry policy indicates a retry is not wanted or max retries has been reached\n // If no retry policy is provided, stop immediately.\n if (!retryPolicy?.filter(result) || tries.length >= retryPolicy.maxRetries) {\n // When we finally return, we want to make sure any lingering timeouts are cleared.\n timeoutAbortController.abort();\n return { result, tries };\n }\n // If a retry is wanted, wait for backoff time and then retry.\n return delay(retryPolicy.backoffFn(tries.length, result), timeoutAbortController.signal).then(() => {\n tries.push(result);\n return asyncWithRetryImpl(asyncCallback, tries, timeoutAbortController, retryPolicy, timeoutPolicy);\n });\n });\n}\n//# sourceMappingURL=asyncWithRetry.js.map","/**\n * returns a promise that resolves after timeMs\n * @param timeMs - how long to wait (in milliseconds)\n * @param signal - an optional abort signal that can be used to cancel the delay as associated timeouts.\n */\nexport function delay(timeMs, signal) {\n return new Promise((resolve) => {\n const timeoutId = setTimeout(() => resolve(), timeMs);\n signal?.addEventListener('abort', () => {\n clearTimeout(timeoutId);\n resolve();\n });\n });\n}\n/**\n * Returns a promise that resolves when any of the terminator promises resolve or the specified duration has elapsed, whichever happens first.\n * @param timeoutInMs The time to wait before resolving the returned promise if it hasn't already been resolved.\n * @param terminators An array of promises, the resolution of any of which within the timeout duration would cause the returned promise to be resolved.\n * @returns When the promise resolves, returns true if we timed out, false if any of the terminators resolved before timeout.\n */\nexport function timeoutWithTerminator(timeoutInMs, terminators) {\n const timeoutP = delay(timeoutInMs).then((_) => true);\n const terminatorsP = terminators.map((terminator) => terminator\n .then((_) => false)\n .catch((_) => false /*Intentionally ignoring errors as we expect terminator rejection to be handled individually*/));\n return Promise.race([timeoutP, ...terminatorsP]);\n}\n//# sourceMappingURL=delay.js.map","import { asyncWithRetry } from './asyncWithRetry';\nexport * from './asyncWithRetry';\n// These were originally imported from the Fluid Framework, but should not have been exported.\n// The values are not used in any other FFX code. Defining these values locally to fix Fluid\n// Framework 0.53 bump. Consider removing or replacing with something FFX specific.\n// import { offlineFetchFailureStatusCode, fetchFailureStatusCode } from '@fluidframework/odsp-doclib-utils';\nconst offlineFetchFailureStatusCode = 709;\nconst fetchFailureStatusCode = 710;\nconst clientTimeoutStatusCode = 707;\nconst windowAbortStatusCode = 711;\nfunction isOnline() {\n // We can only determine online status in browser environments currently, for now let's assume we are online until we implement a cross platform check\n if (typeof navigator === 'undefined') {\n return true;\n }\n if (navigator.onLine === false) {\n return false;\n }\n return true;\n}\nconst defaultErrorResponse = {\n durationMs: -1,\n body: null,\n bodyUsed: false,\n headers: new Headers(),\n ok: false,\n redirected: false,\n status: !isOnline() ? offlineFetchFailureStatusCode : fetchFailureStatusCode,\n statusText: '',\n type: 'error',\n url: '',\n bytes: () => Promise.resolve(new Uint8Array(0)),\n arrayBuffer() {\n return Promise.resolve(new ArrayBuffer(0));\n },\n blob() {\n return Promise.resolve(new Blob(undefined /* blobParts */));\n },\n formData() {\n return Promise.resolve(new FormData(undefined /* form */));\n },\n json() {\n return Promise.resolve(undefined);\n },\n text() {\n return Promise.resolve('');\n },\n clone() {\n return new Response();\n }\n};\n/**\n * Creates a filter that will allow retries for the allowlisted status codes\n * @param retriableCodes List of retriable HTTP status codes\n */\nexport function allowlist(retriableCodes) {\n return (response) => retriableCodes.includes(response.status);\n}\n/**\n * Creates a filter that will allow retries for everything except codes on the denylist\n * @param nonRetriableCodes List of non-retriable HTTP status codes\n */\nexport function denylist(nonRetriableCodes) {\n return (response) => !nonRetriableCodes.includes(response.status);\n}\n/**\n * Checks if the given error is an AbortError.\n * Abort errors either match the `reason` of an AbortSignal or are a DOMException with the name \"AbortError\".\n * Legacy DOMExceptions have a code of `20` (which matches the constant ABORT_ERR).\n * @see https://developer.mozilla.org/en-US/docs/Web/API/DOMException#aborterror\n */\nfunction isAbortError(error, signal) {\n if (error === signal?.reason)\n return true;\n return (typeof error === 'object' &&\n error !== null &&\n (error.name === 'AbortError' || error.code === 20));\n}\n/**\n * A utility function to do fetch with support for retries.\n *\n * Note that this function does not reject the returned promise if fetch fails due to network errors.\n * Clients are expected to inspect the status in the response to determine if the fetch succeeded or not.\n *\n * This function does reject if the fetch is aborted.\n *\n * @param requestInfo fetch requestInfo, can be a URL string. Corresponds to first `fetch` argument.\n * @param requestInit fetch requestInit. Corresponds to second `fetch` argument.\n * @param retryPolicy how to do retries.\n * @param timeoutMs time in milliseconds to treat fetch as timed out.\n * Chromium's fetch implementation will leak it's call stack until the fetch completes,\n * so we set a default timeout of 3 minutes to prevent this.\n */\nexport function fetchWithRetry(requestInfo, requestInit, retryPolicy, timeoutMs = 180000) {\n // Respect 'Retry-After' header for error responses that can return it (429 and 503):\n // https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Retry-After\n let augmentedRetryPolicy = retryPolicy;\n if (retryPolicy?.respectRetryAfterHeader) {\n augmentedRetryPolicy = { ...retryPolicy };\n augmentedRetryPolicy.backoffFn = (retriesAttempted, result) => {\n if (result.status === 429 || result.status === 503) {\n const retryAfterHeaderValue = result.headers.get('Retry-After');\n if (retryAfterHeaderValue) {\n const retryAfterInSeconds = parseInt(retryAfterHeaderValue, 10);\n if (!isNaN(retryAfterInSeconds)) {\n return retryAfterInSeconds * 1000; // this method is supposed to return time in milliseconds\n }\n }\n }\n return retryPolicy.backoffFn(retriesAttempted, result);\n };\n }\n // To avoid memory leaks, we want to make sure that the browser's fetch() call is aborted if we timeout before it completes.\n const internalAbortController = new AbortController();\n // We still want to make sure the fetch can be cancelled by the caller if they provide a signal of their own.\n if (requestInit?.signal?.aborted) {\n internalAbortController.abort(requestInit.signal.reason);\n }\n else {\n requestInit?.signal?.addEventListener('abort', function () {\n internalAbortController.abort(this.reason);\n });\n }\n const requestInitWithInternalAbortSignal = { ...requestInit, signal: internalAbortController.signal };\n // If we are in an iframe, we need to detect if the iframe is disposed so we can\n // throw a particular error code when our fetch is aborted.\n let inDisposedIframe = false;\n // If we are in an iframe, define and setup the pagehide event handler\n let handlePageHide = undefined;\n // inline the window check so the LoopWebServiceConformancePlugin can correctly detect this code as safe\n if (typeof window !== 'undefined' && window.self !== window.top) {\n handlePageHide = (e) => {\n if (!e.persisted) {\n inDisposedIframe = true;\n }\n };\n window.addEventListener('pagehide', handlePageHide);\n }\n return asyncWithRetry(() => {\n const startTime = typeof performance !== 'undefined' ? performance.now() : Date.now();\n return fetch(requestInfo, requestInitWithInternalAbortSignal)\n .then((response) => {\n // We cannot use the spread syntax here since the response object is non enumerable\n const fetchResponse = response;\n fetchResponse.durationMs = Math.round(performance.now() - startTime);\n return fetchResponse;\n })\n .catch((error) => {\n // If the fetch was aborted, reject immediately to stop retrying.\n // Clients are expected to not rely on fetch resolving if they've chosen to reject the fetch.\n if (isAbortError(error, requestInitWithInternalAbortSignal.signal)) {\n throw error;\n }\n let errorText = 'Error does not provide a message';\n if (error.name && error.message) {\n errorText = `Error type: ${error.name}, ${error.message}`;\n }\n else if (error.name) {\n errorText = `Error type: ${error.name}`;\n }\n else if (error.message) {\n errorText = `Error message: ${error.message}`;\n }\n const status = \n // If we are offline, use offlineFetchFailureStatusCode (709)\n !isOnline()\n ? offlineFetchFailureStatusCode\n : // If we are online but detected the iframe being disposed use windowAbortStatusCode (711)\n inDisposedIframe\n ? windowAbortStatusCode\n : // For all other errors, use fetchFailureStatusCode (710)\n fetchFailureStatusCode;\n return {\n ...defaultErrorResponse,\n status,\n ok: false,\n durationMs: Math.round(performance.now() - startTime),\n statusText: errorText\n };\n });\n }, augmentedRetryPolicy, {\n timeoutMs,\n onTimeout: () => {\n internalAbortController.abort();\n return { ...defaultErrorResponse, status: clientTimeoutStatusCode, ok: false, durationMs: timeoutMs };\n }\n }).finally(() => {\n // inline the window check so the LoopWebServiceConformancePlugin can correctly detect this code as safe\n if (typeof window !== 'undefined' && window.self !== window.top && handlePageHide) {\n window.removeEventListener('pagehide', handlePageHide);\n }\n });\n}\n//# sourceMappingURL=fetchWithRetry.js.map","/**\n * Categories of a telemetry event.\n */\n/* eslint-disable-next-line no-restricted-syntax, jsdoc/require-jsdoc\n-- TODO: Suppression added when adding rule to recommend avoiding enums. Enums generate a lot of bundle size bloat, please consider moving to an alternate pattern.\n-- TODO: Missing documentation! */\nexport var EventCategory;\n(function (EventCategory) {\n /**\n * Category for a generic telemetry event\n */\n EventCategory[\"Generic\"] = \"Generic\";\n /**\n * Category for an error event\n */\n EventCategory[\"Error\"] = \"Error\";\n /**\n * Category for a user action event\n */\n EventCategory[\"UserAction\"] = \"UserAction\";\n /**\n * Category for an Activity Event\n */\n EventCategory[\"Activity\"] = \"Activity\";\n /**\n * Category for a DNM Event\n */\n EventCategory[\"DNM\"] = \"DNM\";\n})(EventCategory || (EventCategory = {}));\n/**\n * Values that define the result type of activities\n * Success - Denotes a successful activity\n * Failure - Denotes a failed activity\n * Cancelled - Denotes an activity that has been cancelled(neither success nor failure)\n */\n/* eslint-disable-next-line no-restricted-syntax, jsdoc/require-jsdoc\n-- TODO: Suppression added when adding rule to recommend avoiding enums. Enums generate a lot of bundle size bloat, please consider moving to an alternate pattern.\n-- TODO: Missing documentation! */\nexport var ActivityResultType;\n(function (ActivityResultType) {\n /**\n * When activity has completed successfully.\n */\n ActivityResultType[\"Success\"] = \"Success\";\n /**\n * When activity has completed with a failure.\n */\n ActivityResultType[\"Failure\"] = \"Failure\";\n /**\n * When activity got cancelled before completion.\n */\n ActivityResultType[\"Cancelled\"] = \"Cancelled\";\n})(ActivityResultType || (ActivityResultType = {}));\n/** DNM interval */\nexport const DNMInterval = {\n Hourly: 1,\n Daily: 2\n};\n/** DNM dataType */\nexport const DNMDataType = {\n Bool: 'Bool',\n Int64: 'Int64',\n Double: 'Double'\n};\n//# sourceMappingURL=TelemetryEventTypes.js.map","/**\n * List of endpoints for AugLoop service\n * TODO: Remove old endpoints once the newAugloopServiceEndpointsEnabled gate is removed\n */ export const OldAugLoopEndpoint = {\n Automation: 'https://augloop-dogfood.officeppe.com',\n Development: 'https://augloop-dogfood.officeppe.com',\n DoD: 'https://augloop.dod.online.office365.us',\n Dogfood: 'https://augloop-dogfood.officeppe.com',\n GCC: 'https://augloop-gcc.office.com',\n 'GCC-High': 'https://augloop.gov.online.office365.us',\n Local: 'https://augloop-dogfood.officeppe.com',\n Microsoft: 'https://augloop.office.com',\n Preview: 'https://augloop.office.com',\n Production: 'https://augloop.office.com',\n Staging: 'https://augloop-dogfood.officeppe.com',\n SyntheticTraffic: 'https://augloop-dogfood.officeppe.com',\n USNat: '',\n USSec: '',\n Bleu: '',\n Delos: '',\n Gallatin: 'https://augloop.microsoftonline.cn'\n};\n/**\n * List of endpoints for new AugLoop service\n */ export const NewAugLoopEndpoint = {\n Automation: 'https://dogfood.augloop.svc.cloud.microsoft',\n Development: 'https://dogfood.augloop.svc.cloud.microsoft',\n DoD: 'https://augloop.dod.online.office365.us',\n Dogfood: 'https://dogfood.augloop.svc.cloud.microsoft',\n GCC: 'https://gcc.augloop.svc.cloud.microsoft',\n 'GCC-High': 'https://augloop.gov.online.office365.us',\n Local: 'https://dogfood.augloop.svc.cloud.microsoft',\n Microsoft: 'https://augloop.svc.cloud.microsoft',\n Preview: 'https://augloop.svc.cloud.microsoft',\n Production: 'https://augloop.svc.cloud.microsoft',\n Staging: 'https://dogfood.augloop.svc.cloud.microsoft',\n SyntheticTraffic: 'https://dogfood.augloop.svc.cloud.microsoft',\n USNat: '',\n USSec: '',\n Bleu: '',\n Delos: '',\n Gallatin: 'https://augloop.microsoftonline.cn'\n};\n\n//# sourceMappingURL=AugloopEndpoints.js.map","/**\n * List of endpoints for Hubble API\n */ export const HubbleServiceEndpoints = {\n Automation: 'https://hubblecontent.osi.officeppe.net/contentsvc/',\n Development: 'https://hubblecontent.df.osi.office.net/contentsvc/',\n Dogfood: 'https://hubblecontent.df.osi.office.net/contentsvc/',\n DoD: 'https://hubblecontent.osi.office.net/contentsvc/',\n GCC: 'https://hubblecontent.osi.office.net/contentsvc/',\n 'GCC-High': 'https://hubblecontent.osi.office.net/contentsvc/',\n Local: 'https://hubblecontent.osi.officeppe.net/contentsvc/',\n Microsoft: 'https://hubblecontent.msit.osi.office.net/contentsvc/',\n Preview: 'https://hubblecontent.msit.osi.office.net/contentsvc/',\n Production: 'https://hubblecontent.osi.office.net/contentsvc/',\n Staging: 'https://hubblecontent.df.osi.office.net/contentsvc/',\n SyntheticTraffic: 'https://hubblecontent.osi.officeppe.net/contentsvc/',\n USNat: '',\n USSec: '',\n Bleu: '',\n Delos: '',\n Gallatin: 'https://hubblecontent.osi.office.net/contentsvc/'\n};\n/**\n * List of endpoints for Hubble CDN\n */ export const HubbleStorageEndpoints = {\n Automation: 'https://osizewuspersimmon001.blob.core.windows.net/',\n Development: 'https://osizpscuspersimmon000.blob.core.windows.net/',\n Dogfood: 'https://osizpscuspersimmon000.blob.core.windows.net/',\n DoD: 'https://cdn.hubblecontent.osi.office.net/',\n GCC: 'https://cdn.hubblecontent.osi.office.net/',\n 'GCC-High': 'https://cdn.hubblecontent.osi.office.net/',\n Local: 'https://osizewuspersimmon001.blob.core.windows.net/',\n Microsoft: 'https://cdn.hubblecontent.msit.osi.office.net/',\n Preview: 'https://cdn.hubblecontent.msit.osi.office.net/',\n Production: 'https://cdn.hubblecontent.osi.office.net/',\n Staging: 'https://osizpscuspersimmon000.blob.core.windows.net/',\n SyntheticTraffic: 'https://osizewuspersimmon001.blob.core.windows.net/',\n USNat: '',\n USSec: '',\n Bleu: '',\n Delos: '',\n Gallatin: 'https://cdn.hubblecontent.osi.office.net/'\n};\n\n//# sourceMappingURL=HubbleEndpoints.js.map","import { NewAugLoopEndpoint, OldAugLoopEndpoint } from '../AugloopEndpoints';\nimport { HubbleServiceEndpoints, HubbleStorageEndpoints } from '../HubbleEndpoints';\nexport const dodEndpoints = {\n aadAuthority: 'https://login.microsoftonline.us',\n loki: 'https://dod.loki.office365.us',\n graph: 'https://dod-graph.microsoft.us',\n substrate: 'https://substrate-dod.office365.us',\n outlook: 'https://outlook-dod.office365.us',\n augloop: NewAugLoopEndpoint.DoD,\n augloopOld: OldAugLoopEndpoint.DoD,\n ocps: 'https://clients.config.dod.office365.us',\n fs: 'https://fs.microsoft.com',\n //Editor requires that there be no https:// at the start of these\n editor: 'nleditor.osi.apps.mil',\n editorSynonyms: 'editor-pathfinder-thesaurus.usgovtrafficmanager.net:9443',\n mru: 'https://ocws.osi.apps.mil/ocs',\n ecs: 'https://config.ecs.dod.teams.microsoft.us',\n project: 'https://project.apps.mil/',\n teamsTasks: '',\n plannerOld: 'https://tasks.osi.apps.mil',\n plannerNew: '',\n centro: '',\n iris: '',\n teams: 'https://dod.teams.microsoft.us',\n teamsWebTasks: '',\n hubbleService: HubbleServiceEndpoints.Production,\n hubbleStorage: HubbleStorageEndpoints.Production,\n toDo: '',\n roaming: 'https://roaming.osi.apps.mil',\n roamingToken: 'https://api.osi.apps.mil',\n mruToken: 'https://api.osi.apps.mil'\n};\n\n//# sourceMappingURL=DoDEndpoints.js.map","import { NewAugLoopEndpoint, OldAugLoopEndpoint } from '../AugloopEndpoints';\nimport { HubbleServiceEndpoints, HubbleStorageEndpoints } from '../HubbleEndpoints';\nexport const gcchEndpoints = {\n aadAuthority: 'https://login.microsoftonline.us',\n loki: 'https://gcchigh.loki.office365.us',\n graph: 'https://graph.microsoft.us',\n substrate: 'https://substrate.office365.us',\n outlook: 'https://outlook.office365.us',\n augloop: NewAugLoopEndpoint['GCC-High'],\n augloopOld: OldAugLoopEndpoint['GCC-High'],\n ocps: 'https://clients.config.high.office365.us',\n fs: 'https://fs.microsoft.com',\n //Editor requires that there be no https:// at the start of these\n editor: 'nleditor.osi.office365.us',\n editorSynonyms: 'editor-trailblazer-thesaurus.usgovtrafficmanager.net:9443',\n mru: 'https://ocws.osi.office365.us/ocs',\n ecs: 'https://config.ecs.gov.teams.microsoft.us',\n project: 'https://project.office365.us',\n plannerOld: 'https://tasks.office365.us',\n plannerNew: '',\n teamsTasks: '',\n centro: '',\n iris: '',\n teams: 'https://gov.teams.microsoft.us',\n teamsWebTasks: '',\n hubbleService: HubbleServiceEndpoints.Production,\n hubbleStorage: HubbleStorageEndpoints.Production,\n toDo: '',\n roaming: 'https://roaming.osi.office365.us',\n roamingToken: 'https://api.osi.office365.us',\n mruToken: 'https://api.osi.office365.us'\n};\n\n//# sourceMappingURL=GCCHighEndpoints.js.map","import { NewAugLoopEndpoint, OldAugLoopEndpoint } from '..//AugloopEndpoints';\nimport { HubbleServiceEndpoints, HubbleStorageEndpoints } from '../HubbleEndpoints';\nexport const gccmEndpoints = {\n aadAuthority: 'https://login.microsoftonline.com',\n loki: 'https://loki.delve.office.com',\n graph: 'https://graph.microsoft.com',\n substrate: 'https://substrate.office.com',\n outlook: 'https://outlook.office.com',\n augloop: NewAugLoopEndpoint.GCC,\n augloopOld: OldAugLoopEndpoint.GCC,\n ocps: 'https://clients.config.gcc.office.net',\n fs: 'https://fs.microsoft.com',\n //Editor requires that there be no https:// at the start of these\n editor: 'nleditor.gcc.osi.office365.us',\n editorSynonyms: 'editor-gccm-thesaurus.usgovtrafficmanager.net:9443',\n mru: 'https://ocws.officeapps.live.com/ocs',\n ecs: 'https://ecs.office.com',\n project: 'https://gcc.project.microsoft.com',\n teamsTasks: 'https://tasks.gcc.teams.microsoft.com',\n plannerOld: 'https://tasks.office.com',\n plannerNew: '',\n centro: '',\n iris: '',\n teams: 'https://teams.microsoft.com',\n teamsWebTasks: '',\n hubbleService: HubbleServiceEndpoints.Production,\n hubbleStorage: HubbleStorageEndpoints.Production,\n toDo: 'https://to-do.office.com',\n roaming: 'https://roaming.officeapps.live.com',\n roamingToken: 'https://api.office.net',\n mruToken: 'https://api.office.net'\n};\n\n//# sourceMappingURL=GCCModerateEndpoints.js.map","/**\n * Endpoints for USNat aka AirGap08 endpoint\n */ export const usNatEndpoints = {\n aadAuthority: 'https://login.microsoftonline.us',\n loki: '',\n graph: '',\n substrate: '',\n outlook: '',\n augloop: '',\n augloopOld: '',\n ocps: '',\n fs: '',\n editor: '',\n editorSynonyms: '',\n mru: '',\n ecs: 'https://config.ecs.teams.eaglex.ic.gov',\n project: '',\n teamsTasks: '',\n plannerOld: '',\n plannerNew: '',\n centro: '',\n iris: '',\n hubbleService: '',\n hubbleStorage: '',\n teams: '',\n teamsWebTasks: '',\n toDo: '',\n roaming: 'https://roaming.osi.eaglex.ic.gov',\n roamingToken: 'https://officeapps.live.com',\n mruToken: 'https://officeapps.live.com'\n};\n\n//# sourceMappingURL=USNatEndpoints.js.map","/**\n * USSec aka AirGap09 endpoint\n */ export const usSecEndpoints = {\n aadAuthority: 'https://login.microsoftonline.us',\n loki: '',\n graph: '',\n substrate: '',\n outlook: '',\n augloop: '',\n augloopOld: '',\n ocps: '',\n fs: '',\n editor: '',\n editorSynonyms: '',\n mru: '',\n ecs: 'https://config.ecs.teams.microsoft.scloud',\n project: '',\n teamsTasks: '',\n plannerOld: '',\n plannerNew: '',\n centro: '',\n iris: '',\n hubbleService: '',\n hubbleStorage: '',\n teams: '',\n teamsWebTasks: '',\n toDo: '',\n roaming: 'https://roaming.osi.microsoft.scloud',\n roamingToken: 'https://officeapps.live.com',\n mruToken: 'https://officeapps.live.com'\n};\n\n//# sourceMappingURL=USSecEndpoints.js.map","import { HubbleServiceEndpoints, HubbleStorageEndpoints } from '../HubbleEndpoints';\nimport { NewAugLoopEndpoint, OldAugLoopEndpoint } from '../AugloopEndpoints';\nexport const localEndpoints = {\n aadAuthority: 'https://login.microsoftonline.com',\n augloop: NewAugLoopEndpoint.Local,\n augloopOld: OldAugLoopEndpoint.Local,\n centro: 'https://admin-ignite.microsoft.com',\n ecs: 'https://ecs.office.com',\n editor: 'nleditor.osi.office.net',\n editorSynonyms: 'editor-prod-thesaurus.trafficmanager.net:9443',\n fs: 'https://fs.microsoft.com',\n graph: 'https://graph.microsoft.com',\n iris: 'https://arc.msn.com',\n loki: 'https://loki.delve.office.com',\n mru: 'https://ocws-df.officeapps.live.com/ocs',\n ocps: 'https://sip.clients.config.office.net',\n outlook: 'https://outlook.office.com',\n plannerNew: 'https://planner.cloud.microsoft',\n plannerOld: 'https://tasks.office.com',\n project: 'https://project.microsoft.com',\n substrate: 'https://substrate.office.com',\n teamsTasks: 'https://retailservices.teams.microsoft.com',\n teams: 'https://teams.microsoft.com',\n teamsWebTasks: 'https://tasks.teams.microsoft.com',\n hubbleService: HubbleServiceEndpoints.Production,\n hubbleStorage: HubbleStorageEndpoints.Production,\n toDo: 'https://to-do.office.com',\n roaming: 'https://roaming.officeapps.live.com',\n roamingToken: 'https://api.office.net',\n mruToken: 'https://api.office.net'\n};\n\n//# sourceMappingURL=LocalEndpoints.js.map","import { NewAugLoopEndpoint, OldAugLoopEndpoint } from '../AugloopEndpoints';\nimport { HubbleServiceEndpoints, HubbleStorageEndpoints } from '../HubbleEndpoints';\nexport const automationEndpoints = {\n aadAuthority: 'https://login.microsoftonline.com',\n augloop: NewAugLoopEndpoint.Automation,\n augloopOld: OldAugLoopEndpoint.Automation,\n centro: 'https://admin-ignite.microsoft.com',\n ecs: 'https://ecs.office.com',\n //Editor requires that there be no https:// at the start of these\n editor: 'nleditor.osi.officeppe.net',\n editorSynonyms: 'editor-edog-thesaurus.trafficmanager.net:9443',\n fs: 'https://fs.microsoft.com',\n graph: 'https://graph.microsoft.com',\n iris: 'https://arc.msn.com',\n loki: 'https://loki.delve.office.com',\n mru: 'https://ocws-df.officeapps.live.com/ocs',\n ocps: 'https://clients.config.office.net',\n outlook: 'https://outlook.office.com',\n plannerNew: 'https://planner.cloud.microsoft',\n plannerOld: 'https://tasks.office.com',\n project: 'https://project.microsoft.com',\n substrate: 'https://substrate.office.com',\n teamsTasks: 'https://retailservices.teams.microsoft.com',\n teams: 'https://teams.microsoft.com',\n teamsWebTasks: '',\n hubbleService: HubbleServiceEndpoints.Production,\n hubbleStorage: HubbleStorageEndpoints.Production,\n toDo: 'https://to-do.office.com',\n roaming: 'https://roaming.officeapps.live.com',\n roamingToken: 'https://api.office.net',\n mruToken: 'https://api.office.net'\n};\n\n//# sourceMappingURL=AutomationEndpoints.js.map","import { NewAugLoopEndpoint, OldAugLoopEndpoint } from '../AugloopEndpoints';\nimport { HubbleServiceEndpoints, HubbleStorageEndpoints } from '../HubbleEndpoints';\nexport const developmentEndpoints = {\n aadAuthority: 'https://login.microsoftonline.com',\n augloop: NewAugLoopEndpoint.Development,\n augloopOld: OldAugLoopEndpoint.Development,\n centro: 'https://admin-ignite.microsoft.com',\n ecs: 'https://ecs.office.com',\n //Editor requires that there be no https:// at the start of these\n editor: 'nleditor.osi.officeppe.net',\n editorSynonyms: 'editor-edog-thesaurus.trafficmanager.net:9443',\n fs: 'https://fs.microsoft.com',\n graph: 'https://graph.microsoft.com',\n iris: 'https://arc.msn.com',\n loki: 'https://loki.delve.office.com',\n mru: 'https://ocws-df.officeapps.live.com/ocs',\n ocps: 'https://clients.config.office.net',\n outlook: 'https://outlook.office.com',\n plannerNew: 'https://planner.cloud.microsoft',\n plannerOld: 'https://tasks.office.com',\n project: 'https://project.microsoft.com',\n substrate: 'https://substrate.office.com',\n teamsTasks: 'https://retailservices.teams.microsoft.com',\n teams: 'https://teams.microsoft.com',\n teamsWebTasks: 'https://tasks.teams.microsoft.com',\n hubbleService: HubbleServiceEndpoints.Production,\n hubbleStorage: HubbleStorageEndpoints.Production,\n toDo: 'https://to-do.office.com',\n roaming: 'https://roaming.officeapps.live.com',\n roamingToken: 'https://api.office.net',\n mruToken: 'https://api.office.net'\n};\n\n//# sourceMappingURL=DevelopmentEndpoints.js.map","import { NewAugLoopEndpoint, OldAugLoopEndpoint } from '../AugloopEndpoints';\nimport { HubbleServiceEndpoints, HubbleStorageEndpoints } from '../HubbleEndpoints';\nexport const stagingEndpoints = {\n aadAuthority: 'https://login.microsoftonline.com',\n augloop: NewAugLoopEndpoint.Staging,\n augloopOld: OldAugLoopEndpoint.Staging,\n centro: 'https://admin-ignite.microsoft.com',\n ecs: 'https://ecs.office.com',\n //Editor requires that there be no https:// at the start of these\n editor: 'nleditor.osi.officeppe.net',\n editorSynonyms: 'editor-edog-thesaurus.trafficmanager.net:9443',\n fs: 'https://fs.microsoft.com',\n graph: 'https://graph.microsoft.com',\n iris: 'https://arc.msn.com',\n loki: 'https://loki.delve.office.com',\n mru: 'https://ocws-df.officeapps.live.com/ocs',\n ocps: 'https://clients.config.office.net',\n outlook: 'https://outlook.office.com',\n plannerNew: 'https://planner.cloud.microsoft',\n plannerOld: 'https://tasks.office.com',\n project: 'https://project.microsoft.com',\n substrate: 'https://substrate.office.com',\n teamsTasks: 'https://retailservices.teams.microsoft.com',\n teams: 'https://teams.microsoft.com',\n teamsWebTasks: 'https://tasks.teams.microsoft.com',\n hubbleService: HubbleServiceEndpoints.Production,\n hubbleStorage: HubbleStorageEndpoints.Production,\n toDo: 'https://to-do.office.com',\n roaming: 'https://roaming.officeapps.live.com',\n roamingToken: 'https://api.office.net',\n mruToken: 'https://api.office.net'\n};\n\n//# sourceMappingURL=StagingEndpoints.js.map","import { NewAugLoopEndpoint, OldAugLoopEndpoint } from '../AugloopEndpoints';\nimport { HubbleServiceEndpoints, HubbleStorageEndpoints } from '../HubbleEndpoints';\nexport const dogfoodEndpoints = {\n aadAuthority: 'https://login.microsoftonline.com',\n augloop: NewAugLoopEndpoint.Dogfood,\n augloopOld: OldAugLoopEndpoint.Dogfood,\n centro: 'https://admin-ignite.microsoft.com',\n ecs: 'https://ecs.office.com',\n //Editor requires that there be no https:// at the start of these\n editor: 'nleditor.osi.officeppe.net',\n editorSynonyms: 'editor-edog-thesaurus.trafficmanager.net:9443',\n fs: 'https://fs.microsoft.com',\n graph: 'https://graph.microsoft.com',\n iris: 'https://arc.msn.com',\n loki: 'https://loki.delve.office.com',\n mru: 'https://ocws-df.officeapps.live.com/ocs',\n ocps: 'https://clients.config.office.net',\n outlook: 'https://outlook.office.com',\n plannerNew: 'https://planner.cloud.microsoft',\n plannerOld: 'https://tasks.office.com',\n project: 'https://project.microsoft.com',\n substrate: 'https://substrate.office.com',\n teamsTasks: 'https://retailservices.teams.microsoft.com',\n teams: 'https://teams.microsoft.com',\n teamsWebTasks: 'https://tasks.teams.microsoft.com',\n hubbleService: HubbleServiceEndpoints.Production,\n hubbleStorage: HubbleStorageEndpoints.Production,\n toDo: 'https://to-do.office.com',\n roaming: 'https://roaming-df.officeapps.live.com',\n roamingToken: 'https://api.office.net',\n mruToken: 'https://api.office.net'\n};\n\n//# sourceMappingURL=DogfoodEndpoints.js.map","import { NewAugLoopEndpoint, OldAugLoopEndpoint } from '../AugloopEndpoints';\nimport { HubbleServiceEndpoints, HubbleStorageEndpoints } from '../HubbleEndpoints';\nexport const prodEndpoints = {\n aadAuthority: 'https://login.microsoftonline.com',\n augloop: NewAugLoopEndpoint.Production,\n augloopOld: OldAugLoopEndpoint.Production,\n centro: 'https://admin-ignite.microsoft.com',\n ecs: 'https://ecs.office.com',\n editor: 'nleditor.osi.office.net',\n editorSynonyms: 'editor-prod-thesaurus.trafficmanager.net:9443',\n fs: 'https://fs.microsoft.com',\n graph: 'https://graph.microsoft.com',\n iris: 'https://arc.msn.com',\n loki: 'https://loki.delve.office.com',\n mru: 'https://ocws.officeapps.live.com/ocs',\n ocps: 'https://clients.config.office.net',\n outlook: 'https://outlook.office.com',\n plannerNew: 'https://planner.cloud.microsoft',\n plannerOld: 'https://tasks.office.com',\n project: 'https://project.microsoft.com',\n substrate: 'https://substrate.office.com',\n teamsTasks: 'https://retailservices.teams.microsoft.com',\n teams: 'https://teams.microsoft.com',\n teamsWebTasks: 'https://tasks.teams.microsoft.com',\n hubbleService: HubbleServiceEndpoints.Production,\n hubbleStorage: HubbleStorageEndpoints.Production,\n toDo: 'https://to-do.office.com',\n roaming: 'https://roaming.officeapps.live.com',\n roamingToken: 'https://api.office.net',\n mruToken: 'https://api.office.net'\n};\n\n//# sourceMappingURL=ProductionEndpoints.js.map","import { NewAugLoopEndpoint, OldAugLoopEndpoint } from '../AugloopEndpoints';\nimport { HubbleServiceEndpoints, HubbleStorageEndpoints } from '../HubbleEndpoints';\nexport const msitEndpoints = {\n aadAuthority: 'https://login.microsoftonline.com',\n augloop: NewAugLoopEndpoint.Microsoft,\n augloopOld: OldAugLoopEndpoint.Microsoft,\n centro: 'https://admin-ignite.microsoft.com',\n ecs: 'https://ecs.office.com',\n editor: 'nleditor.osi.office.net',\n editorSynonyms: 'editor-prod-thesaurus.trafficmanager.net:9443',\n fs: 'https://fs.microsoft.com',\n graph: 'https://graph.microsoft.com',\n iris: 'https://arc.msn.com',\n loki: 'https://loki.delve.office.com',\n mru: 'https://ocws.officeapps.live.com/ocs',\n ocps: 'https://clients.config.office.net',\n outlook: 'https://outlook.office.com',\n plannerNew: 'https://planner.cloud.microsoft',\n plannerOld: 'https://tasks.office.com',\n project: 'https://project.microsoft.com',\n substrate: 'https://substrate.office.com',\n teamsTasks: 'https://retailservices.teams.microsoft.com',\n teams: 'https://teams.microsoft.com',\n teamsWebTasks: 'https://tasks.teams.microsoft.com',\n hubbleService: HubbleServiceEndpoints.Production,\n hubbleStorage: HubbleStorageEndpoints.Production,\n toDo: 'https://to-do.office.com',\n roaming: 'https://roaming.officeapps.live.com',\n roamingToken: 'https://api.office.net',\n mruToken: 'https://api.office.net'\n};\n\n//# sourceMappingURL=MicrosoftEndpoints.js.map","import { NewAugLoopEndpoint, OldAugLoopEndpoint } from '../AugloopEndpoints';\n// TODO: (ADO 9580892) - Update service-endpoints URLs for Gallatin audience\n/**\n * Gallatin endpoints\n */ export const gallatinEndpoints = {\n aadAuthority: 'https://login.chinacloudapi.cn',\n loki: 'https://loki.office365.cn',\n graph: 'https://microsoftgraph.chinacloudapi.cn',\n substrate: 'https://substrate.partner.outlook.cn',\n outlook: 'https://outlook.partner.outlook.cn',\n augloop: NewAugLoopEndpoint.Gallatin,\n augloopOld: OldAugLoopEndpoint.Gallatin,\n ocps: '',\n fs: 'https://fs.microsoft.com',\n editor: '',\n editorSynonyms: '',\n mru: 'https://ocws.officeapps.partner.office365.cn/ocs',\n ecs: 'https://mooncake.ecs.office.com',\n project: '',\n teamsTasks: '',\n plannerOld: '',\n plannerNew: '',\n centro: '',\n iris: '',\n hubbleService: '',\n hubbleStorage: '',\n teams: '',\n teamsWebTasks: '',\n toDo: '',\n roaming: 'https://roaming.officeapps.partner.office365.cn',\n roamingToken: 'https://api.partner.office365.cn',\n mruToken: 'https://api.partner.office365.cn'\n};\n\n//# sourceMappingURL=GallatinEndpoints.js.map","import { dodEndpoints } from './endpoints/DoDEndpoints';\nimport { gcchEndpoints } from './endpoints/GCCHighEndpoints';\nimport { gccmEndpoints } from './endpoints/GCCModerateEndpoints';\nimport { usNatEndpoints } from './endpoints/USNatEndpoints';\nimport { usSecEndpoints } from './endpoints/USSecEndpoints';\nimport { localEndpoints } from './endpoints/LocalEndpoints';\nimport { automationEndpoints } from './endpoints/AutomationEndpoints';\nimport { developmentEndpoints } from './endpoints/DevelopmentEndpoints';\nimport { stagingEndpoints } from './endpoints/StagingEndpoints';\nimport { dogfoodEndpoints } from './endpoints/DogfoodEndpoints';\nimport { prodEndpoints } from './endpoints/ProductionEndpoints';\nimport { msitEndpoints } from './endpoints/MicrosoftEndpoints';\nimport { gallatinEndpoints } from './endpoints/GallatinEndpoints';\n/**\n * This api returns the service endpoint to be used for network calls or empty string if endpoint is not available for that audience.\n * The caller is responsible for handling the empty string scenario.\n *\n * @param serviceEndpointType This represents the type of service endpoint.\n * @param audience The audience of the user\n * @returns the service endpoint to be used to network calls or empty string if endpoint is not available for that audience.\n */ export function getServiceEndpoint(serviceEndpointType, audience) {\n switch(audience){\n case 'Local':\n return localEndpoints[serviceEndpointType];\n case 'Automation':\n return automationEndpoints[serviceEndpointType];\n case 'Development':\n return developmentEndpoints[serviceEndpointType];\n case 'Staging':\n return stagingEndpoints[serviceEndpointType];\n case 'SyntheticTraffic':\n case 'Dogfood':\n return dogfoodEndpoints[serviceEndpointType];\n case 'Microsoft':\n return msitEndpoints[serviceEndpointType];\n case 'Preview':\n case 'Production':\n return prodEndpoints[serviceEndpointType];\n case 'GCC':\n return gccmEndpoints[serviceEndpointType];\n case 'GCC-High':\n return gcchEndpoints[serviceEndpointType];\n case 'DoD':\n return dodEndpoints[serviceEndpointType];\n case 'USNat':\n return usNatEndpoints[serviceEndpointType];\n case 'USSec':\n return usSecEndpoints[serviceEndpointType];\n case 'Gallatin':\n return gallatinEndpoints[serviceEndpointType];\n case 'Bleu':\n case 'Delos':\n throw new Error(`Unsupported audience: ${audience}`);\n }\n}\n\n//# sourceMappingURL=getServiceEndpoint.js.map","import { ActivityResultType } from '@fluidx/office-fluid-types';\nimport { v4 as uuidv4 } from 'uuid';\nimport { sendActivityEvent } from './LoggerHelpers';\nimport { getPageTimings } from './pageTimings';\nconst inflightActivities = new Set();\n/**\n * Log all inflight activities as aborted when this method is called.\n *\n * WARNING: calling this method will abort ALL activities in the current window context.\n * Thus, this method is only safe to call on the **inside** of an iframe window,\n * NOT outside an iframe or in a div scenario. (Otherwise, if two components are starting up\n * at the same time, calling this method from one would abort all unrelated activities in the other).\n */ export function abortInflightActivities() {\n inflightActivities.forEach((activityTracker)=>activityTracker.cancel());\n}\n/**\n * Helper class to log activities with success and duration. Only logs when setResult is called.\n */ export class ActivityTracker {\n constructor(activityName, logger, activityTrackerOptions){\n this.activityName = activityName;\n this.logger = logger;\n /**\n * If set to true, this activity result will be added to pageTiming object to be picked by PAS\n */ // eslint-disable-next-line @fluidx/ffx-rules/prefer-private-fields -- TODO: Exception added when rule was enabled. Please consider refactoring this to use ECMAScript # prefixed private properties for better minification\n this.isAPerformanceMetric = false;\n this.additionalPropsToLog = activityTrackerOptions?.additionalPropsToLog;\n this.addUserTiming = activityTrackerOptions?.addUserTiming;\n this.isAPerformanceMetric = activityTrackerOptions?.isAPerformanceMetric || false;\n this.logSubactivityStartTimes = activityTrackerOptions?.logSubactivityStartTimes ?? true; // true by default\n this.subActivities = {};\n this.identifier = uuidv4();\n this.activityStartName = `${this.activityName}-start-${this.identifier}`;\n this.activityEndName = `${this.activityName}-end-${this.identifier}`;\n // Perf Profiles: Mark the start of event for browser profiling\n this.addUserTiming && performance.mark(this.activityStartName);\n this.startTime = performance.now();\n this.startTimeSinceEpoch = Date.now();\n }\n /**\n * Creates an ActivityTracker instance\n * @param activityName The name of the activity\n * @param logger\n * @param activityTrackerOptions optional configuration arguments to the activity tracker\n */ /* eslint-disable-next-line no-restricted-syntax\n-- TODO: Suppression added when adding rule to forbid static methods. Consider using a free function instead, as static methods add considerable bundle bloat. */ static start(activityName, logger, activityTrackerOptions) {\n const activityTracker = new ActivityTracker(activityName, logger, activityTrackerOptions);\n inflightActivities.add(activityTracker);\n return activityTracker;\n }\n /**\n * Start to track a sub activity.\n * @param subActivityName name of the sub activity.\n */ markSubActivityStart(subActivityName) {\n this.subActivities[subActivityName] = {\n startTime: performance.now(),\n startTimeSinceEpoch: Date.now()\n };\n this.addUserTiming && performance.mark(this.getSubActivityName(subActivityName, 'start'));\n }\n /**\n * Complete a sub activity measurement.\n * @param subActivityName name of the sub activity.\n * @param subActivityAdditionalProps additional properties.\n */ markSubActivityEnd(subActivityName, subActivityAdditionalProps) {\n const subActivity = this.subActivities[subActivityName];\n if (!subActivity) {\n // no such sub activity.\n return;\n }\n if (this.addUserTiming) {\n const endName = this.getSubActivityName(subActivityName, 'end');\n performance.mark(endName);\n performance.measure(subActivityName, this.getSubActivityName(subActivityName, 'start'), endName);\n }\n const times = {\n [`durationMs_${subActivityName}`]: Math.round(performance.now() - subActivity.startTime)\n };\n if (this.logSubactivityStartTimes) {\n times[`startTime_${subActivityName}`] = subActivity.startTimeSinceEpoch;\n }\n this.additionalPropsToLog = {\n ...times,\n ...this.additionalPropsToLog,\n ...subActivityAdditionalProps\n };\n }\n /**\n * Ends the activity and logs it using the provided logger and performance markers.\n * @param succeeded Whether the activity was successful or not.\n * @param additionalProps Properties to be logged as data. These additional props will overwrite any additional props with the same name that were specified when the activity tracker was created.\n * @param error Error related to the activity.\n * @param options Options that configure the behavior of set result\n * @param options.skipLogging\n * @param options.sampleEvent If set to true would sample the event.\n */ setResult(succeeded, additionalProps, error, options) {\n this.logActivityResult(succeeded, additionalProps, error, options?.skipLogging, undefined /*cancelled*/ , options?.sampleEvent);\n }\n /**\n * Ends the activity and logs the Activity.Result.Type as Cancelled\n * @param succeeded Whether the activity qualifies as successful\n * @param additionalProps Properties to be logged as data. These additional props will overwrite any additional props with the same name that were specified when the activity tracker was created.\n * @param error Error related to the activity.\n */ cancel(succeeded, additionalProps, error) {\n this.logActivityResult(succeeded, additionalProps, error, false, true);\n }\n /**\n * Add properties to be included when setResult() is called.\n * If the activity is ready to be logged, call setResult() with additionalProps instead.\n */ addAdditionalProps(additionalProps) {\n this.additionalPropsToLog = {\n ...this.additionalPropsToLog,\n ...additionalProps\n };\n }\n /**\n * Cancels the activity if it's still pending, and clears any performance measures/marks\n * to avoid leaking memory.\n */ dispose() {\n // If the activity hasn't already resolved/cancelled, this will cancel it (otherwise, it's a no-op).\n // Setting an activity result also releases the logger object, if it wasn't already been released.\n this.cancel();\n const clearMarks = (name)=>performance.clearMarks(name);\n const clearMeasures = (name)=>performance.clearMeasures(name);\n // Clear all browser marks and measure if userTiming API was used in this activity\n if (this.addUserTiming) {\n clearMarks(this.activityStartName);\n clearMarks(this.activityEndName);\n this.cachedMeasureName && clearMeasures(this.cachedMeasureName);\n for(const subActivityName in this.subActivities){\n clearMarks(this.getSubActivityName(subActivityName, 'start'));\n clearMarks(this.getSubActivityName(subActivityName, 'end'));\n clearMeasures(subActivityName);\n }\n }\n }\n // eslint-disable-next-line @fluidx/ffx-rules/prefer-private-fields -- TODO: Exception added when rule was enabled. Please consider refactoring this to use ECMAScript # prefixed private properties for better minification\n logActivityResult(succeeded, additionalProps, error, skipLogging, cancelled, sampleEvent) {\n if (this.hasAlreadyResolved) {\n return;\n }\n this.hasAlreadyResolved = true;\n // Perf Profiles: Mark the end of event for browser profiling\n this.addUserTiming && performance.mark(this.activityEndName);\n const currentTickMs = performance.now();\n const durationMs = Math.round(currentTickMs - this.startTime);\n if (this.isAPerformanceMetric) {\n // Adds performance timings to the window object so they can be used by the performance analyzer service.\n // Note that this intentionally will overwrite any existing pageTimings for that activity\n const pageTimings = getPageTimings();\n pageTimings[this.activityName] = additionalProps?.durationMs ? Number(additionalProps.durationMs) : durationMs;\n }\n if (this.logger && !skipLogging) {\n const activityEvent = {\n eventName: this.activityName,\n startTime: this.startTimeSinceEpoch,\n durationMs,\n succeeded,\n sampleEvent,\n resultType: cancelled ? ActivityResultType.Cancelled : succeeded ? ActivityResultType.Success : ActivityResultType.Failure,\n ...this.additionalPropsToLog,\n ...additionalProps\n };\n sendActivityEvent(this.logger, activityEvent, error);\n }\n this.logger = undefined;\n inflightActivities.delete(this);\n // Perf Profiles: Measure perf buffer between start and end of event for browser profiling\n this.addUserTiming && performance.measure(this.generateMeasureName(succeeded), this.activityStartName, this.activityEndName);\n }\n // eslint-disable-next-line @fluidx/ffx-rules/prefer-private-fields -- TODO: Exception added when rule was enabled. Please consider refactoring this to use ECMAScript # prefixed private properties for better minification\n generateMeasureName(succeeded) {\n this.cachedMeasureName = `${this.activityName}${succeeded === false ? '-FAILED' : ''}-${this.identifier}`;\n return this.cachedMeasureName;\n }\n // eslint-disable-next-line @fluidx/ffx-rules/prefer-private-fields -- TODO: Exception added when rule was enabled. Please consider refactoring this to use ECMAScript # prefixed private properties for better minification\n getSubActivityName(name, suffix) {\n return `${name}-${suffix}-${this.identifier}`;\n }\n}\n\n//# sourceMappingURL=ActivityTracker.js.map","/**\n * Gets current window._pageTimings object for reporting to MS Performance Analyzer Service\n */ export function getPageTimings() {\n const pageTimings = window._pageTimings || (window._pageTimings = {});\n return pageTimings;\n}\nexport function resetPageTimings() {\n window._pageTimings = {};\n}\n\n//# sourceMappingURL=pageTimings.js.map","import { makeBooleanDataField, makeStringDataField } from '@microsoft/oteljs';\r\nexport var Action = {\r\n contractName: 'Ms.ProductUsage.Action',\r\n instanceName: 'BaseType',\r\n /* Gets data fields for the Ms.ProductUsage.Action contract */\r\n getFields: function (contract) {\r\n var instName = this.instanceName;\r\n var dataFields = [];\r\n dataFields.push(makeStringDataField(\"zC.\".concat(instName), this.contractName));\r\n if (contract.ver) {\r\n dataFields.push(makeStringDataField(\"\".concat(instName, \".Ver\"), contract.ver));\r\n }\r\n dataFields.push(makeStringDataField(\"\".concat(instName, \".Name\"), contract.name));\r\n if (contract.featureName) {\r\n dataFields.push(makeStringDataField(\"\".concat(instName, \".FeatureName\"), contract.featureName));\r\n }\r\n if (contract.featureCategory) {\r\n dataFields.push(makeStringDataField(\"\".concat(instName, \".FeatureCategory\"), contract.featureCategory));\r\n }\r\n if (contract.inputMethod) {\r\n dataFields.push(makeStringDataField(\"\".concat(instName, \".InputMethod\"), contract.inputMethod));\r\n }\r\n dataFields.push(makeBooleanDataField(\"\".concat(instName, \".IsExportable\"), contract.isExportable));\r\n dataFields.push(makeBooleanDataField(\"\".concat(instName, \".IsIntentional\"), contract.isIntentional));\r\n if (contract.subWorkload) {\r\n dataFields.push(makeStringDataField(\"\".concat(instName, \".SubWorkload\"), contract.subWorkload));\r\n }\r\n if (contract.target) {\r\n dataFields.push(makeStringDataField(\"\".concat(instName, \".Target\"), contract.target));\r\n }\r\n return dataFields;\r\n }\r\n};\r\n//# sourceMappingURL=MsProductUsageAction.js.map","// This is the name of the FluidExperiences team in the Fluid ECS account.\nexport const fluidExperiencesEcsTeamName = 'FluidExperiences';\nexport const exemptedErrorPropertiesForLogging = [\n 'facetCodes',\n 'statusCode',\n 'innerMostErrorCode',\n 'sprequestguid'\n];\n\n//# sourceMappingURL=SharedUtilities.js.map","import { exemptedErrorPropertiesForLogging } from './SharedUtilities';\n// update this list if you need to preserve other URLs\nconst allowedHosts = [\n 'local.loop.microsoft.com',\n 'res.cdn.office.net',\n 'res-sdf.cdn.office.net'\n];\n/**\n * This function checks each property in a telemetry event, and if they contain the terms 'error', 'message', and 'stack'\n * in their property name, it scrubs email addresses and URLs from them.\n *\n * @param event The telemetry event to be scrubbed\n * @returns Scrubbed telemetry event\n */ export function scrubPII(event) {\n for(const propertyName in event){\n if (propertyName.search(/message|error|stack/i) !== -1 || exemptedErrorPropertiesForLogging.includes(propertyName)) {\n const propertyValue = event[propertyName];\n if (typeof propertyValue === 'string') {\n // Email address or UTL regex, case insensitive and globally search for reoccurrences [https://en.wikipedia.org/wiki/Email_address#Local-part]\n const emailOrUrl = /\\b([A-Z0-9.!#$%&'*+-/=?^_`{|}~]+@[A-Z0-9.-]+\\.[A-Z]{2,4})\\b|\\b((?:https?|ftp):\\/\\/([^\\/\\s]+)[^\\s]*)\\b/gi;\n event[propertyName] = propertyValue.replace(emailOrUrl, (match, email, url, host)=>{\n if (email) {\n return '(scrubbed_email)';\n } else if (url && !allowedHosts.includes(host)) {\n return '(scrubbed_URL)';\n } else {\n return match; // Return the original match if it's the excluded URL\n }\n });\n }\n }\n }\n return event;\n}\n\n//# sourceMappingURL=scrubPII.js.map","// eslint-disable-next-line @ms-cloudpack/no-unsupported-imports\nimport { Action } from '@commonschema/oteljs-schema-pu/dist/MsProductUsageAction';\nimport { ActivityResultType, EventCategory } from '@fluidx/office-fluid-types';\nimport { NamespaceLoggerAdapter } from './NamespaceLoggerAdapter';\nimport { redactSharepointDomainAndLoopPageUrl } from './redactDomains';\nimport { scrubPII } from './scrubPII';\nimport { exemptedErrorPropertiesForLogging, fluidExperiencesEcsTeamName } from './SharedUtilities';\n/**\n * Checks for a defined logger and sends the appropriate telemetry event based on the EventCategory\n * @param eventCategory - the type of event category logging required\n * @param logger - Potential Logger passed to do the logging\n * @param event - Event to send based on the event category selected\n * @param error - Optional ErrorObject for event categories that are capable of logging errors, e.g Error and Activity events\n */ export function tryLogEvent(eventCategory, logger, event, error) {\n if (!logger) {\n return;\n }\n switch(eventCategory){\n case EventCategory.Generic:\n return sendTelemetryEvent(logger, event);\n case EventCategory.Error:\n return sendErrorEvent(logger, event, error);\n case EventCategory.Activity:\n return sendActivityEvent(logger, event, error);\n case EventCategory.UserAction:\n return sendUserActionEvent(logger, event);\n default:\n return;\n }\n}\n/**\n * Send generic telemetry event\n * Since the helper has a predefined category, please do not provide a category field in the event\n * @param logger - Logger passed to do the logging\n * @param event - Event to send\n */ export function sendTelemetryEvent(logger, event) {\n const scrubbedEvent = scrubPII(event);\n logger.send({\n ...scrubbedEvent,\n category: EventCategory.Generic\n });\n}\n/**\n * Send crash telemetry event\n * This helper api reports crash related telemetry where an error from Loop Components made hosts to\n * either hide the Loop Component or show default error experience or show a blank page to user.\n * If an error doesn't qualify as crash from above definition, please use 'sendErrorEvent' api.\n *\n * @param logger - Logger passed to do the logging\n * @param event - Event to send\n * @param error - Error object passed with the error event.\n */ export function sendCrashEvent(logger, event, error) {\n prepareErrorObject(event, error);\n const scrubbedEvent = scrubPII(event);\n logAsContainerSessionError(logger, {\n ...scrubbedEvent,\n // Since a crash is inherently userImpacting, we are adding the flag here.\n isUserImpacting: true,\n // Also adding isCrashEvent flag, to differentiate crash errors from other user impacting errors.\n isCrashEvent: true\n });\n}\n/**\n * Send error telemetry event\n * Since the helper has a predefined category, please do not provide a category field in the event\n * @param logger - Logger passed to do the logging\n * @param event - Event to send. If this is a user impacting error, add isUserImpacting: true to the event object.\n * @param error - Optional Error object passed with the error event.\n */ export function sendErrorEvent(logger, event, error) {\n if (error) {\n prepareErrorObject(event, error);\n }\n const scrubbedEvent = scrubPII(event);\n // TODO: https://office.visualstudio.com/OC/_workitems/edit/8423042 - do not log if isUserImpacting is true.\n logger.send({\n ...scrubbedEvent,\n category: EventCategory.Error\n });\n if (event.isUserImpacting) {\n logAsContainerSessionError(logger, scrubbedEvent);\n }\n}\n/**\n * Report user impacting error events in ASHA QoS format.\n * @param logger - Logger passed to do the logging\n * @param event - ASHA QoS event. This should fully describe the user impact\n * @param error - Optional error object passed with the error event\n */ export function sendQoSErrorEvent(logger, event, error) {\n sendErrorEvent(logger, event, error);\n forkQoSErrorEvents(logger, event, error);\n}\n/**\n * Override logger namespace to bunch all QoSErrors into a single namespace 'QoS20'\n * This is temporary while we investigate the ideal namespacing pattern to use for ASHA QoS events\n */ function forkQoSErrorEvents(logger, event, error) {\n const qosNamespaceLogger = new NamespaceLoggerAdapter('QoS20', logger);\n sendErrorEvent(qosNamespaceLogger, event, error);\n}\nconst loggedDeprecatedEvents = new Set();\nconst loggedStack = new Set();\nconst thresholdAudienceMapping = new Map([\n [\n 'Automation',\n 1\n ],\n [\n 'SyntheticTraffic',\n 1\n ],\n [\n 'Local',\n 1\n ],\n [\n 'Staging',\n 1\n ],\n [\n 'Dogfood',\n 0.1\n ],\n [\n 'Preview',\n 0.1\n ],\n [\n 'Microsoft',\n 0.01\n ],\n [\n 'Production',\n 0.001\n ],\n [\n 'GCC',\n 0\n ],\n [\n 'GCC-High',\n 0\n ],\n [\n 'DoD',\n 0\n ],\n [\n 'Gallatin',\n 0\n ]\n]);\nlet shouldSkipLoggingDeprecatedEvent;\nconst audienceAllowedToLogEUPI = {\n Automation: true,\n SyntheticTraffic: true,\n Local: true,\n Development: true,\n Staging: true,\n Dogfood: true,\n Preview: true,\n Microsoft: true,\n Production: false,\n GCC: false,\n 'GCC-High': false,\n DoD: false,\n USNat: false,\n USSec: false,\n Gallatin: false,\n Bleu: false,\n Delos: false\n};\nfunction isExemptFromThrottling(event) {\n // DO NOT add events to this function unless you have confirmed that they are not emitted otherwise.\n return event.eventName === 'PageBreakInParagraph' && event.scenario === 'buildVisualsForLinearFlow' || event.eventName === 'PageStartAtParagraphEnd' && event.scenario === 'buildVisualsForLinearFlow' || event.eventName === 'FirstPageNotAtParagraphBegin' && event.scenario === 'FirstPage';\n}\n/**\n * Send telemetry event for deprecated code\n * Since the helper has a predefined category, please do not provide a category field in the event\n * Refer to https://eng.ms/docs/experiences-devices/opg/office-shared/loop-experiences/loop-experiences/loop-experiences-ffx-docs/docs/developer-guide/processes/how-to-deprecate-code\n * for more details on how to take advantage of the deprecated dashboard\n * @param logger - Logger passed to do the logging\n * @param event - Event to send\n * @param audience - Optional audience to send the event to. If not provided, all events sent will be limited to Prod threshold 0.001\n */ export function sendDeprecatedEvent(logger, event, audience) {\n if (shouldSkipLoggingDeprecatedEvent === undefined) {\n // The threshold approach is taken to further reduce the volume of deprecated events logged\n // We will want to get telemetry for cases when audience is not defined, treating it as Prod threshold\n // We calculate this once per session so that we either log all deprecated events or none\n const threshold = audience ? thresholdAudienceMapping.get(audience) : 0.001;\n shouldSkipLoggingDeprecatedEvent = threshold === undefined || Math.random() > threshold;\n }\n if (!isExemptFromThrottling(event) && shouldSkipLoggingDeprecatedEvent) {\n return;\n }\n // Creates a new table: Office_Fluid_Deprecated_Generic that incorporates all deprecated activities\n const namespaceLogger = new NamespaceLoggerAdapter('Deprecated', logger);\n if (!event.stack) {\n event.stack = getCallStack();\n }\n // Redact to make sure no domain info is logged\n if (event.stack) {\n event.stack = redactSharepointDomainAndLoopPageUrl(event.stack.toString());\n }\n if (loggedDeprecatedEvents.has(event.eventName) && loggedStack.has(event.stack)) {\n // If we have already logged before, early return to reduce telemetry volume\n return;\n }\n sendTelemetryEvent(namespaceLogger, event);\n loggedDeprecatedEvents.add(event.eventName);\n loggedStack.add(event.stack);\n}\n/**\n * Send activity telemetry event\n * Since the helper has a predefined category, please do not provide a category field in the event\n * @param logger - Logger passed to do the logging\n * @param event - Event to send\n * @param error - Optional Error object passed with the activity event in case of activity failure\n */ export function sendActivityEvent(logger, event, error) {\n if (error) {\n prepareErrorObject(event, error);\n }\n // If the callers do not provide resultType, use succeeded if present to derive the resultType\n if (!event.resultType && event.succeeded !== undefined) {\n event.resultType = event.succeeded ? ActivityResultType.Success : ActivityResultType.Failure;\n }\n const scrubbedEvent = scrubPII(event);\n logger.send({\n ...scrubbedEvent,\n category: EventCategory.Activity\n });\n if (event.resultType === ActivityResultType.Failure && event.isUserImpacting) {\n logAsContainerSessionError(logger, scrubbedEvent);\n }\n}\n/**\n * Send User Action telemetry event\n * Since the helper has a predefined category, please do not provide a category field in the event\n * @param logger - Logger passed to do the logging\n * @param event - Event to send\n */ export function sendUserActionEvent(logger, event, actionContract) {\n const actionEvent = event;\n if (actionContract) {\n const actionEventDataFields = Action.getFields(actionContract);\n logger.send({\n ...actionEvent,\n dataFields: actionEventDataFields,\n category: EventCategory.UserAction\n });\n } else {\n logger.send({\n ...actionEvent,\n category: EventCategory.UserAction\n });\n }\n}\nfunction logAsContainerSessionError(logger, event) {\n let nameSpaceLogger = logger;\n const eventNamespace = nameSpaceLogger.getNamespace?.();\n // At what step did the error occur - component boot, typing, connectivity, etc\n const errorAction = `${eventNamespace}_${event.eventName}`;\n nameSpaceLogger = new NamespaceLoggerAdapter('ContainerSession', logger);\n // Creates a new table: Office_Fluid_ContainerSession_Error\n nameSpaceLogger.send({\n ...event,\n errorAction,\n category: EventCategory.Error\n });\n}\nconst isObject = (e)=>typeof e === 'object' && e !== null;\nfunction extractStringFromError(propertyName, error) {\n if (!isObject(error)) {\n return undefined;\n }\n const propertyValue = error[propertyName];\n return typeof propertyValue === 'string' ? propertyValue : undefined;\n}\nfunction extractPropertiesFromError(error) {\n // Check if error is of type string and return string value.\n const errorIsString = typeof error === 'string' ? error : undefined;\n // Some api calls set the errorType on the event/additionalProperties instead of the errorObject.\n // So if error.errorType is undefined use event.errorType.\n const errorObjectErrorType = extractStringFromError('errorType', error);\n return {\n message: errorIsString ?? extractStringFromError('message', error),\n errorMessage: errorIsString ?? extractStringFromError('errorMessage', error),\n errorName: extractStringFromError('name', error),\n stack: extractStringFromError('stack', error),\n errorType: errorObjectErrorType,\n errorInstanceId: extractStringFromError('errorInstanceId', error)\n };\n}\n/** Extract some common properties from the given unknown error object\n * and apply them to the event, overwriting existing values\n */ function applyCommonErrorPropertiesToEvent(error, event) {\n const errorProperties = extractPropertiesFromError(error);\n event.message = errorProperties.message ?? event.message;\n event.errorMessage = errorProperties.errorMessage ?? event.message;\n event.errorName = errorProperties.errorName;\n event.stack = errorProperties.stack ?? (typeof event.stack === 'string' ? event.stack : undefined);\n // Some api calls set the errorType on the event/additionalProperties instead of the errorObject.\n // So if error.errorType is undefined use event.errorType.\n event.errorType = errorProperties.errorType || event['errorType'];\n event.errorInstanceId = errorProperties.errorInstanceId;\n exemptedErrorPropertiesForLogging.forEach((key)=>{\n if (isObject(error)) {\n const value = error[key];\n if (typeof value === 'boolean' || typeof value === 'number' || typeof value === 'string' || typeof value === 'undefined') {\n event[key] = value;\n }\n if (typeof value === 'object') {\n event[key] = JSON.stringify(value);\n }\n }\n });\n if (typeof error === 'object' && error && 'cause' in error) {\n const causeErrorProps = extractPropertiesFromError(error.cause);\n event.causeMessage = causeErrorProps.message;\n event.causeStack = causeErrorProps.stack;\n }\n}\nfunction prepareErrorObject(event, error) {\n // WARNING: Exceptions can contain PII!\n // For example, XHR will throw object derived from Error that contains config information\n // for failed request, including all the headers, and thus - user tokens!\n // Extract only message, call stack, and errorType.\n // Note: This will overwrite existing values on the event\n applyCommonErrorPropertiesToEvent(error, event);\n if (!event.message) {\n event.message = event.errorMessage;\n }\n // Collect stack if we were not able to extract it from error\n if (event.stack === undefined) {\n event.stack = getErrorCallStack();\n }\n}\nexport function getErrorCallStack(stackTraceLimit) {\n const originalStackTraceLimit = Error.stackTraceLimit;\n if (stackTraceLimit !== undefined) {\n Error.stackTraceLimit = stackTraceLimit;\n }\n // Some browsers will populate stack right away, others require throwing Error\n let stack = new Error().stack;\n if (!stack) {\n try {\n throw new Error();\n } catch (e) {\n stack = e.stack;\n }\n }\n Error.stackTraceLimit = originalStackTraceLimit;\n return stack;\n}\nexport function getCallStack(stackTraceLimit) {\n let callStack = getErrorCallStack(stackTraceLimit);\n if (callStack?.startsWith('Error')) {\n // removing 'Error' from stack\n callStack = callStack.substring(5);\n }\n return callStack;\n}\n/**\n * For EUDB compliance, we are not allowed to log EUPI (userId, session/correlation Ids) if the host is not passing a telemetry sink and we're in prod or above\n */ export function isAllowedToLogEUPI(audience) {\n return audienceAllowedToLogEUPI[audience];\n}\n/**\n * Send DNM event\n * This should be used only for logging sensitive data which is a direct measurement of customer content.\n * Please reach out to loop privacy team before using this event.\n * @param logger Logger passed to do the logging\n * @param event Event to send\n */ export function sendDNMEvent(logger, event, settingsProvider) {\n isDNMEventEnabled(settingsProvider) && logger.send({\n ...event,\n category: EventCategory.DNM\n });\n}\n/**\n * Feature flag to enable/disable DNM event\n * @param settingsProvider SettingsProvider used to get the setting from ECS\n * @returns\n */ function isDNMEventEnabled(settingsProvider) {\n return settingsProvider?.getSetting('telemetry.enableDNMEvent', false, fluidExperiencesEcsTeamName) ?? false;\n}\n\n//# sourceMappingURL=LoggerHelpers.js.map","/**\n * An ITelemetryNamespaceLogger implementation to persist telemetry properties\n * for a logger and log events under a single namespace.\n */ export class NamespaceLoggerAdapter {\n get NamespaceLogger() {\n return this;\n }\n get PersistedProperties() {\n return this;\n }\n //#region Disposable implementation\n get Disposable() {\n return this;\n }\n /**\n * Clean-up/disposal of resources\n * Use this guide https://office.visualstudio.com/OC/_git/office-bohemia?path=/docs/partner-guide/containers/HowToDisposeResources.md\n * for reference of what resources to dispose\n */ dispose() {\n // On dispose, set the logger to null\n // This acts as a signal not to send any more logs (e.g., to avoid logging\n // errors after an iframe has already been disposed).\n // It may also help avoid memory leaks (though we weren't observing any such issues in this flow anyway).\n this.logger = null;\n }\n //#endregion Disposable\n constructor(namespace, baseLogger, persistedProperties){\n this.namespace = namespace;\n // As a perf improvement, reduce the nesting of NamespaceLoggingAdapters if the base logger\n // is already a NamespaceLoggingAdapter. (See\n // https://office.visualstudio.com/DefaultCollection/OC/_git/office-bohemia/pullrequest/1866735)\n if (baseLogger instanceof NamespaceLoggerAdapter) {\n const combinedProperties = {\n ...baseLogger.getPersistedProperties(),\n ...persistedProperties\n };\n this.logger = baseLogger.logger;\n this.persistedProperties = combinedProperties;\n } else {\n this.logger = baseLogger;\n this.persistedProperties = persistedProperties;\n }\n this.baseLogger = baseLogger;\n }\n addPersistedProperties(properties) {\n this.persistedProperties = {\n ...this.getPersistedProperties(),\n ...properties\n };\n }\n getPersistedProperties() {\n return {\n ...this.baseLogger.PersistedProperties?.getPersistedProperties?.(),\n ...this.persistedProperties\n };\n }\n send(event) {\n this.sendWithNamespace(event, this.namespace);\n }\n sendWithNamespace(event, namespace) {\n this.logger?.sendWithNamespace({\n ...this.persistedProperties,\n ...event\n }, namespace);\n }\n getNamespace() {\n return this.namespace;\n }\n}\n\n//# sourceMappingURL=NamespaceLoggerAdapter.js.map","import { makeBooleanDataField, makeDoubleDataField, makeStringDataField } from '@microsoft/oteljs';\n// Inspect the tag, if any, and use that to interpret how the property can/should be logged\n// Alternative implementation could leverage the DataClassification enum in oteljs and leave behavior to that package\nfunction handlePropertyTag(taggableProp) {\n const { value, tag } = // Exception added when eslint rule was added, this should be revisited when modifying this code\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n taggableProp !== null && typeof taggableProp === 'object' ? taggableProp : {\n value: taggableProp,\n tag: undefined\n };\n // See TelemetryDataTag enum in @fluidframework/telemetry-utils for known values\n switch(tag){\n case undefined:\n // No tag means we can log plainly\n return value;\n case 'PackageData':\n case 'CodeArtifact':\n // We don't load 3P code in 1P apps so data about code artifacts like package name is ok for now.\n // If these could be 3P, depending on Privacy Agreement and whether the package is public or private,\n // this could be considered customer content and would need to be handled as such.\n return value;\n case 'UserData':\n // Strip out anything tagged explicitly as user personal data.\n // Alternate strategy would be to hash these props.\n return 'REDACTED (tag: UserData)';\n default:\n // If we encounter a tag we don't recognize then we should scrub to be safe.\n return `REDACTED (tag: ${tag})`;\n }\n}\n// Helper method that returns Data fields in the form that Otel expects\nexport const getOtelDataField = (taggableProp, key)=>{\n const value = handlePropertyTag(taggableProp);\n if (value === undefined) {\n return undefined;\n }\n if (typeof value === 'string') return makeStringDataField(key, value);\n if (typeof value === 'number') return makeDoubleDataField(key, value);\n return makeBooleanDataField(key, value);\n};\n\n//# sourceMappingURL=OtelDataFieldHelpers.js.map","/**\n * This file contains functions to detect the environment in which the component is running.\n * This is useful for scenarios where we need to know if the component is running in a browser or in a native application.\n */ export const isViewLessInstance = ()=>typeof window === 'undefined';\nexport const isViewInstance = ()=>!isViewLessInstance();\n/**\n * Function to detect if component is running inside Webview\n * @returns true when running inside WebView2 (and false when running in browser).\n */ export const isWebview = ()=>{\n /**\n * Reference here: https://learn.microsoft.com/en-us/microsoft-edge/webview2/reference/javascript/webview\n */ return !!window.chrome?.webview;\n};\n\n//# sourceMappingURL=EnvironmentDetector.js.map","// Code has to be aligned with Utilities package\nimport { isViewLessInstance } from './EnvironmentDetector';\nimport { TrackedOSNames } from './UANavigatorData';\n// # region cached values\nlet _isIPad = undefined;\nlet _isMac = undefined;\nlet _isWindows = undefined;\nlet _isIPhone = undefined;\nlet _isIOS = undefined;\nlet _isAndroid = undefined;\nlet _isMobile = undefined;\nlet _isChromeOS = undefined;\nlet _isUnknownLinux = undefined;\nlet _isDebian = undefined;\nlet _isUbuntu = undefined;\nlet _isFedora = undefined;\nlet _platformVersion = undefined;\nlet _platformVersionString = undefined;\nlet _platformMajorVersion = '-1';\n// # endregion cached values\n// #region Helper functions\n/**\n * Call this function to ensure that the platform version is detected accurately\n */ export async function prepareForPlatformVersionDetection() {\n const userAgentData = navigator.userAgentData;\n if (_platformVersionString || !userAgentData?.getHighEntropyValues) {\n return;\n }\n try {\n const ua = await userAgentData.getHighEntropyValues([\n 'platformVersion'\n ]);\n _platformVersionString = ua.platformVersion;\n updatePlatformMajorVersion(_platformVersionString);\n } catch (e) {\n _platformVersionString = '-1';\n }\n return;\n}\n/**\n * @private\n * Updates the platform major version based on the platform version string\n *\n * @param platformVersionString the platform version string to be used by getOSMajorVersion function\n */ function updatePlatformMajorVersion(platformVersionString) {\n if (!platformVersionString) {\n _platformMajorVersion = '-1';\n return;\n }\n const match = platformVersionString.match(/(\\d+)\\.(\\d+)\\.(\\d+)/);\n if (match) {\n _platformMajorVersion = parseInt(match[1], 10).toString();\n return;\n }\n _platformMajorVersion = '-1';\n}\n// #region Helper functions\n// #region Device detection functions\n/**\n * Tells whether or not the browser is running on an iPad\n *\n * @returns true if the host operating system an iPad, false otherwise\n */ export const isIPad = function() {\n if (_isIPad === undefined) {\n _isIPad = navigator.userAgent.indexOf('iPad') >= 0 || // iPad on iOS 13 detection\n navigator.userAgent.includes('Mac') && 'ontouchend' in document && navigator.userAgent.indexOf('Mobile') === -1;\n }\n return _isIPad;\n};\n/**\n * Tells whether or not the browser is running on a macOS host\n *\n * @returns true if the host operating system is macOS based, false otherwise\n */ export const isMac = function() {\n if (_isMac === undefined) {\n const userAgentData = navigator.userAgentData;\n if (userAgentData?.platform) {\n _isMac = userAgentData.platform === 'macOS' && // Make sure it's not an iPad\n !('ontouchend' in document);\n } else {\n _isMac = navigator.userAgent.indexOf('Macintosh') >= 0 && // Make sure it's not an iPad\n !('ontouchend' in document);\n }\n }\n return _isMac;\n};\n/**\n * Tells whether or not the browser is running on a windows host\n *\n * @returns true if the host operating system is Windows based, false otherwise\n */ export const isWindows = function() {\n if (_isWindows === undefined) {\n const userAgentData = navigator.userAgentData;\n if (userAgentData?.platform) {\n _isWindows = userAgentData.platform.startsWith('Win');\n } else {\n _isWindows = navigator.platform.indexOf('Win') >= 0;\n }\n }\n return _isWindows;\n};\n/**\n * Tells whether or not the browser is running on an iPhone or iPod Touch\n *\n * @returns true if the host device is an iPhone, false otherwise\n */ export const isIPhone = function() {\n if (_isIPhone === undefined) {\n _isIPhone = navigator.userAgent.indexOf('iPhone') >= 0 || navigator.userAgent.indexOf('iPod') >= 0;\n }\n return _isIPhone;\n};\n/**\n * Tells whether or not the browser is running on a iOS host\n *\n * @returns true if the host operating system is iOS based, false otherwise\n */ export const isIOS = function() {\n if (_isIOS === undefined) {\n _isIOS = [\n 'iPad Simulator',\n 'iPhone Simulator',\n 'iPod Simulator',\n 'iPad',\n 'iPhone',\n 'iPod'\n ].includes(navigator.platform) || // iPad on iOS 13 detection\n navigator.userAgent.includes('Mac') && 'ontouchend' in document;\n }\n return _isIOS;\n};\n/**\n * Tells whether or not the browser is running on a Android host\n *\n * @returns true if the host operating system is Android based, false otherwise\n */ export const isAndroid = function() {\n if (_isAndroid === undefined) {\n const userAgentData = navigator.userAgentData;\n if (userAgentData?.platform) {\n _isAndroid = userAgentData.platform === 'Android';\n } else {\n _isAndroid = navigator.userAgent.indexOf('Android') >= 0;\n }\n }\n return _isAndroid;\n};\n/**\n * Tells whether or not the browser is running on a ChromeOS host\n *\n * @returns true if the host operating system is ChromeOS based, false otherwise\n */ export const isChromeOS = function() {\n if (_isChromeOS === undefined) {\n const userAgentData = navigator.userAgentData;\n if (userAgentData?.platform) {\n _isChromeOS = userAgentData.platform === 'Chrome OS';\n } else {\n _isChromeOS = navigator.userAgent.indexOf('CrOS') >= 0;\n }\n }\n return _isChromeOS;\n};\n/**\n * Tells whether or not the browser is running on a Fedora Linux host\n *\n * @returns true if the host operating system is Fedora based, false otherwise\n */ export const isFedora = function() {\n if (_isFedora === undefined) {\n _isFedora = navigator.userAgent.indexOf('Fedora') >= 0;\n }\n return _isFedora;\n};\n/**\n * Tells whether or not the browser is running on a Ubuntu Linux host\n *\n * @returns true if the host operating system is Ubuntu based, false otherwise\n */ export const isUbuntu = function() {\n if (_isUbuntu === undefined) {\n _isUbuntu = navigator.userAgent.indexOf('Ubuntu') >= 0;\n }\n return _isUbuntu;\n};\n/**\n * Tells whether or not the browser is running on a Debian Linux host\n *\n * @returns true if the host operating system is Debian based, false otherwise\n */ export const isDebian = function() {\n if (_isDebian === undefined) {\n _isDebian = navigator.userAgent.indexOf('Debian') >= 0;\n }\n return _isDebian;\n};\n/**\n * Tells whether or not the browser is running on an unknown Linux distro host\n *\n * @returns true if the host operating system is Linux based, false otherwise\n */ export const isUnknownLinux = function() {\n if (_isUnknownLinux === undefined) {\n _isUnknownLinux = (navigator.userAgent.indexOf('Linux') >= 0 || navigator.userAgent.indexOf('X11') >= 0) && !isChromeOS() && !isAndroid() && !isDebian() && !isFedora() && !isUbuntu();\n }\n return _isUnknownLinux;\n};\n/**\n * Tells whether or not the device running this project is a mobile device\n *\n * @returns If the device is a mobile device or not\n */ export const isMobile = function() {\n if (isViewLessInstance()) {\n return false;\n }\n if (_isMobile === undefined) {\n const userAgentData = navigator.userAgentData;\n if (userAgentData?.mobile) {\n return true;\n } else {\n _isMobile = /Android|BlackBerry|Windows Phone|IEMobile|Opera Mini|iPhone|iPad|iPod/i.test(navigator.userAgent) || isIOS() || isAndroid();\n }\n }\n return _isMobile;\n};\n/**\n * Tells whether or not the browser is running on a tablet device\n *\n * @returns true if the host device is a tablet device\n */ export const isTablet = function() {\n return isAndroidTablet() || isIPad();\n};\n/**\n * Tells whether or not the host device is an Apple made device\n *\n * @returns true if the device is an Apple made device, false otherwise\n */ export const isApple = function() {\n return isMac() || isIOS();\n};\n/**\n * Tells whether or not the browser is running on a Android phone\n *\n * @returns true if the host device is an Android device, false otherwise\n */ export const isAndroidPhone = function() {\n return isAndroid() && navigator.userAgent.indexOf('Mobile') >= 0;\n};\n/**\n * Tells whether or not the browser is running on a Android tablet\n *\n * @returns true if the host device is an Android tablet, false otherwise\n */ export const isAndroidTablet = function() {\n return isAndroid() && navigator.userAgent.indexOf('Mobile') === -1;\n};\n// #endregion Device detection functions\n// #region OS detection functions\n/**\n * returns the OS name like Windows, Mac, Android, iOS, Linux\n *\n * @returns the name of the operating system\n */ export const getOSName = function() {\n if (_platformVersion) {\n return _platformVersion.os;\n }\n return populatePlatformVersion().os;\n};\n/**\n * Returns the major OS version like 10, 11, 13, 14, 17\n * For accurate detection call prepareForPlatformVersionDetection before calling this function\n *\n * @returns the version of the operating system\n */ export const getMajorOSVersion = function() {\n if (_platformVersion) {\n return _platformVersion.version;\n }\n return populatePlatformVersion().version;\n};\nfunction populatePlatformVersion() {\n const userAgentData = navigator.userAgentData;\n const platform = userAgentData?.platform;\n const shortenedPlatform = platform?.split(' ')[0];\n switch(shortenedPlatform){\n case 'Win32':\n case 'Win64':\n case 'Win16':\n case 'WinCE':\n case 'Windows':\n _platformVersion = {\n os: TrackedOSNames.Windows,\n version: extractWindowsMajorVersionFromUAHints().toString()\n };\n break;\n case 'macOS':\n _platformVersion = {\n os: TrackedOSNames.Mac,\n version: _platformMajorVersion\n };\n break;\n case 'Chrome OS':\n _platformVersion = {\n os: TrackedOSNames.ChromeOS,\n version: extractChromeOSMajorVersionFromUA().toString()\n };\n break;\n case 'Linux':\n // For Linux distributions we can't get the version of the OS from the user agent as it returns the Kernel version that is irrelevant for us as a Web based application\n if (isUbuntu()) {\n _platformVersion = {\n os: TrackedOSNames.Ubuntu,\n version: '-1'\n };\n } else if (isFedora()) {\n _platformVersion = {\n os: TrackedOSNames.Fedora,\n version: '-1'\n };\n } else if (isDebian()) {\n _platformVersion = {\n os: TrackedOSNames.Debian,\n version: '-1'\n };\n } else {\n _platformVersion = {\n os: TrackedOSNames.Linux,\n version: '-1'\n };\n }\n break;\n case 'Android':\n _platformVersion = {\n os: TrackedOSNames.Android,\n version: _platformMajorVersion\n };\n break;\n case 'iOS':\n case 'iPadOS':\n // No Apple Mobile device has a browser other than Safari. This is just future proofing\n _platformVersion = {\n os: TrackedOSNames.iOS,\n version: _platformMajorVersion\n };\n break;\n default:\n break;\n }\n if (_platformVersion) {\n return _platformVersion;\n }\n // The browser does not support UA Agent Hints, let's try to guess the OS from the user Agent\n if (isWindows()) {\n _platformVersion = {\n os: TrackedOSNames.Windows,\n version: extractWindowsMajorVersionFromUA().toString()\n };\n } else if (isMac()) {\n // there is not a reliable way to get the version from the user agent\n _platformVersion = {\n os: TrackedOSNames.Mac,\n version: '-1'\n };\n } else if (isIOS()) {\n _platformVersion = {\n os: TrackedOSNames.iOS,\n version: extractIOSMajorVersionFromUA().toString()\n };\n } else if (isAndroid()) {\n _platformVersion = {\n os: TrackedOSNames.Android,\n version: extractAndroidMajorVersionFromUA().toString()\n };\n } else if (isChromeOS()) {\n _platformVersion = {\n os: TrackedOSNames.ChromeOS,\n version: extractChromeOSMajorVersionFromUA().toString()\n };\n } else if (isUbuntu()) {\n // there is not a reliable way to get the version from the user agent\n _platformVersion = {\n os: TrackedOSNames.Ubuntu,\n version: '-1'\n };\n } else if (isDebian()) {\n // there is not a reliable way to get the version from the user agent\n _platformVersion = {\n os: TrackedOSNames.Debian,\n version: '-1'\n };\n } else if (isFedora()) {\n // there is not a reliable way to get the version from the user agent\n _platformVersion = {\n os: TrackedOSNames.Fedora,\n version: '-1'\n };\n } else if (isUnknownLinux()) {\n // there is not a reliable way to get the version from the user agent\n _platformVersion = {\n os: TrackedOSNames.Linux,\n version: '-1'\n };\n } else {\n // we don't know the OS from the user agent\n _platformVersion = {\n os: TrackedOSNames.Unknown,\n version: '-1'\n };\n }\n return _platformVersion;\n}\nfunction extractWindowsMajorVersionFromUA() {\n if (_platformVersionString === '-1') {\n return -1;\n }\n const match = navigator.userAgent.match(/Windows NT (\\d+).(\\d+)/);\n if (match) {\n if (match[1] === '6') {\n if (match[2] === '1') {\n return 7;\n } else if (match[2] === '2' || match[2] === '3') {\n return 8;\n }\n }\n return parseInt(match[1], 10);\n }\n return -1;\n}\n/**\n *\n * @returns the major version of Windows like 7, 8, 10, 11\n */ function extractWindowsMajorVersionFromUAHints() {\n if (_platformVersionString === '-1') {\n return -1;\n }\n if (_platformVersionString) {\n const majorPlatformVersion = parseInt(_platformVersionString.split('.')[0], 10);\n if (majorPlatformVersion >= 13) {\n return 11;\n } else if (majorPlatformVersion > 0) {\n return 10;\n } else {\n // Fallback to UA parsing\n return extractWindowsMajorVersionFromUA();\n }\n }\n return -1;\n}\n/**\n * @private\n * Extracts the major version of iOS from the user agent\n *\n * @returns the major version of IOS like 13, 14, 15\n */ function extractIOSMajorVersionFromUA() {\n const match = navigator.userAgent.match(/OS (\\d+)_(\\d+)_?(\\d+)?/);\n if (match) {\n return parseInt(match[1], 10);\n } else {\n const match = navigator.userAgent.match(/Version\\/(\\d+)(\\.\\d+)?(\\.\\d+)?/);\n if (match) {\n return parseInt(match[1], 10);\n }\n }\n return -1;\n}\n/**\n * @private\n * Extracts the major version of Android from the user agent\n *\n * @returns the major version of Android like 10, 11, 12\n */ function extractAndroidMajorVersionFromUA() {\n const match = navigator.userAgent.match(/Android\\s([\\d]+)(?:(\\.[\\d]+)|)(?:(\\.[\\d]+)|)/);\n if (match) {\n return parseInt(match[1], 10);\n }\n return -1;\n}\nfunction extractChromeOSMajorVersionFromUA() {\n const match = navigator.userAgent.match(/Chrome\\/(\\d+)?\\.(\\d+)\\.?(\\d+)?/);\n if (match) {\n return parseInt(match[1], 10);\n }\n return -1;\n}\n// #endregion OS detection functions\n// #region Test helpers\n/**\n * @private\n * Forces the device detection to be or not be a mac device\n *\n * @param forcedValue the value to be returned by isMac function or undefined to reset the value\n */ export function setIsMac(forcedValue) {\n _isMac = forcedValue;\n}\n/**\n * @private\n * Forces the device detection to be or not be a iOS device\n *\n * @param forcedValue the value to be returned by isIOS function or undefined to reset the value\n */ export function setIsIOS(forcedValue) {\n _isIOS = forcedValue;\n}\n/**\n * @private\n * Forces the device detection to be or not be a Android device\n *\n * @param forcedValue the value to be returned by isAndroid function or undefined to reset the value\n */ export function setIsAndroid(forcedValue) {\n _isAndroid = forcedValue;\n}\n/**\n * @private\n * Forces the device detection to be or not be a Windows device\n *\n * @param forcedValue the value to be returned by isAndroid function or undefined to reset the value\n */ export function setIsWindows(forcedValue) {\n _isWindows = forcedValue;\n}\n/**\n * @private\n * Forces the device detection to be or not be a Linux device\n *\n * @param forcedValue the value to be returned by isLinux function or undefined to reset the value\n */ export function setIsChromeOS(forcedValue) {\n _isChromeOS = forcedValue;\n}\n/**\n * @private\n * Forces the device detection to be or not be a Linux device\n *\n * @param forcedValue the value to be returned by isLinux function or undefined to reset the value\n */ export function setIsUnknownLinux(forcedValue) {\n _isUnknownLinux = forcedValue;\n}\n/**\n * @private\n * Forces the device detection to be or not be a mobile device\n *\n * @param forcedValue the value to be returned by isMobile function or undefined to reset the value\n */ export function setIsMobile(forcedValue) {\n _isMobile = forcedValue;\n}\n/**\n * @private\n * Forces the device detection to be or not be an IPad\n *\n * @param forcedValue the value to be returned by isIPad function or undefined to reset the value\n */ export function setIsIPad(forcedValue) {\n _isIPad = forcedValue;\n}\n/**\n * @private\n * Forces the device detection to be or not be an Ubuntu device\n *\n * @param forcedValue the value to be returned by isUbuntu function or undefined to reset the value\n */ export function setIsUbuntu(forcedValue) {\n _isUbuntu = forcedValue;\n}\n/**\n * @private\n * Forces the device detection to be or not be a Debian device\n *\n * @param forcedValue the value to be returned by isDebian function or undefined to reset the value\n */ export function setIsDebian(forcedValue) {\n _isDebian = forcedValue;\n}\n/**\n * @private\n * Forces the device detection to be or not be a Fedora device\n *\n * @param forcedValue the value to be returned by isFedora function or undefined to reset the value\n */ export function setIsFedora(forcedValue) {\n _isFedora = forcedValue;\n}\n/**\n * @private\n * Forces the device detection to be or not be a specific platform\n *\n * @param platformVersion the platform version to be returned by getOSName function or undefined to reset the value\n */ export function setPlatformVersion(platformVersion) {\n _platformVersion = platformVersion;\n}\n/**\n * @private\n * Forces the device detection to be or not be a specific platform version\n *\n * @param platformVersionString the platform version string to used by getOSMajorVersion function or undefined to reset the value\n */ export function setPlatformVersionString(platformVersionString) {\n _platformVersionString = platformVersionString;\n updatePlatformMajorVersion(_platformVersionString);\n} // #endregion Test helpers\n\n//# sourceMappingURL=deviceDetector.js.map","/**\n * Set the request headers for the fetch call.\n * @param request RequestInit object to set headers on.\n * @param header the header to set.\n * @param value the value to set the header to.\n */ export function setRequestHeader(request, header, value) {\n // this is to support requests that have headers as Headers object (e.g web api requests from Planner component)\n if (request.headers instanceof Headers) {\n request.headers.set(header, value);\n } else {\n request.headers = {\n ...request.headers,\n [header]: value\n };\n }\n}\n\n//# sourceMappingURL=setRequestHeader.js.map","import { v4 as uuid } from 'uuid';\nimport { setRequestHeader } from './setRequestHeader';\nexport const oAuthBearerScheme = 'Bearer';\n/**\n * Embeds given access token into given url or request according to given policy.\n * @param url request url\n * @param request request content, including body and headers\n * @param token access token\n * @param authorizationHeader the value that should be passed in Authorization header\n * @param tokenPolicy policy with settings dictating rules for embedding token into request\n * @returns object represented mutated url and request with embedded token\n */ export function addTokenToRequest(url, request, token, authorizationHeader, tokenPolicy) {\n const augmentedUrl = new URL(url);\n const bearerSchemeIsUsed = authorizationHeader.startsWith(oAuthBearerScheme);\n // Determine if token can be passed via query param and augment request url accordingly.\n // This is supported only for tokens that use Bearer scheme because other schemes may have token that is bound to\n // specific request, including used query params.\n let passTokenViaQueryParam = false;\n if (bearerSchemeIsUsed && tokenPolicy.queryParam) {\n augmentedUrl.searchParams.set(tokenPolicy.queryParam, token);\n passTokenViaQueryParam = !tokenPolicy.doNotExceedQueryParamsLength || augmentedUrl.search.length <= tokenPolicy.doNotExceedQueryParamsLength;\n if (!passTokenViaQueryParam) {\n augmentedUrl.searchParams.delete(tokenPolicy.queryParam);\n }\n }\n // If token is not passed via query param then pass it either via body or via Authorization header.\n // Only GET/POST should be transformed to use multipart form body.\n // This is supported only for tokens that use Bearer scheme because other schemes may have token\n // that is bound to specific request, including method type.\n let augmentedRequest = request;\n if (!passTokenViaQueryParam) {\n augmentedRequest = {\n ...request\n };\n let useMultipartFormBody = false;\n if (bearerSchemeIsUsed) {\n const requestMethod = request?.method ? request.method.toUpperCase() : 'GET';\n if (tokenPolicy.preferAuthorizationInMultipartFormBody && [\n 'GET',\n 'POST'\n ].includes(requestMethod)) {\n augmentedRequest.method = 'POST';\n const formBoundary = uuid();\n const formParams = [];\n formParams.push(`--${formBoundary}`);\n formParams.push(`Authorization: ${authorizationHeader}`);\n formParams.push(`X-HTTP-Method-Override: ${requestMethod}`);\n formParams.push(`_post: 1`);\n if (request?.body) {\n formParams.push(`\\r\\n${request.body}\\r\\n`);\n }\n formParams.push(`\\r\\n--${formBoundary}--`);\n const postBody = formParams.join('\\r\\n');\n // Check for Maximum allowed body length\n useMultipartFormBody = !tokenPolicy.doNotExceedMultipartFormBodyLength || postBody.length <= tokenPolicy.doNotExceedMultipartFormBodyLength;\n if (useMultipartFormBody) {\n augmentedRequest.body = postBody;\n setRequestHeader(augmentedRequest, 'Content-Type', `multipart/form-data;boundary=${formBoundary}`);\n // Explicit hint that request uses multipart form body\n augmentedUrl.searchParams.set('ump', '1');\n }\n }\n }\n if (!useMultipartFormBody) {\n setRequestHeader(augmentedRequest, 'Authorization', authorizationHeader);\n }\n }\n return {\n url: augmentedUrl.href,\n request: augmentedRequest\n };\n}\n\n//# sourceMappingURL=addTokenToRequest.js.map","/**\n * Get the current time\n * @returns performance.now() time if performance is defined, otherwise returns Date.now() time\n */ export function getCurrentTime() {\n return typeof performance !== 'undefined' ? performance.now() : Date.now();\n}\n\n//# sourceMappingURL=getCurrentTime.js.map","import { addTokenToRequest, oAuthBearerScheme } from './addTokenToRequest';\nimport { fetchWithRetry } from '@fluidx/loop-sdk';\nimport { instrumentedFetchWithRetry } from './instrumentedFetchWithRetry';\nimport { parseAuthErrorClaims } from './parseAuthErrorClaims';\nimport { parseAuthErrorInvalidToken } from './parseAuthErrorInvalidToken';\nimport { parseAuthErrorRealm } from './parseAuthErrorRealm';\nimport { sendTelemetryEvent } from '@fluidx/telemetry';\nimport { addRequestHeaderIfDoesNotExist } from './headerUtils';\nimport { getCurrentTime } from './getCurrentTime';\nfunction tokenRequestOptionsFromAuthorizedFetchProps(props) {\n return {\n tenantId: props.tenantId,\n request: {\n url: props.url,\n method: props.requestInit?.method ? props.requestInit.method : 'GET'\n }\n };\n}\n/**\n * A utility function to do authorized fetch with retry. Authorized fetch requires auth token to be included\n * with request. This function supports long lived tokens and handles token refresh in case of authorization\n * failure due to insufficient claims. Note that this function does not reject the returned promise if fetch fails.\n * Clients are expected to inspect the status in the response to determine if the fetch succeeded or not.\n * However, this function will reject the returned promise if props.getToken callback throws error.\n * @param props set of properties describing fetch behavior\n * @returns promise to fetch response\n * @throws in case props.getToken callback throws error\n */ export function authorizedFetchWithRetry(props) {\n return authorizedFetchWithRetryImpl(props, tokenRequestOptionsFromAuthorizedFetchProps(props));\n}\n/**\n * A utility method to perform authorized fetch with retry. It's different from authorizedFetchWithRetry in that\n * this particular method logs the results corresponding to all fetch requests. Be careful when using this since\n * this can produce huge number of logs for frequent fetch requests.\n * @param props set of properties for fetch with retry\n * @returns promise to fetch response\n * @throws in case props.getToken callback throws error\n */ export function instrumentedAuthorizedFetchWithRetry(props) {\n return authorizedFetchWithRetryImpl(props, tokenRequestOptionsFromAuthorizedFetchProps(props));\n}\nconst MAX_AUTH_RETRIES = 3;\nasync function authorizedFetchWithRetryImpl(props, tokenRequestOptions, attempt = 1) {\n const maxRetriesDueToKnownAuthError = props.retryPolicy?.maxAuthRetries ?? MAX_AUTH_RETRIES;\n const tokenFetchStartTime = getCurrentTime();\n const { token, authorizationHeader } = await props.getToken(tokenRequestOptions);\n const tokenFetchEndTime = getCurrentTime();\n const { url, requestInit, retryPolicy, timeoutMs, tokenPolicy, additionalRequestHeaders } = props;\n const { url: augmentedUrl, request: augmentedRequest } = addTokenToRequest(url, requestInit, token, // By default, use Bearer scheme for authorization header if it was not returned by token provider.\n // Remove default value when/if authorizationHeader property becomes required part of TokenResult.\n authorizationHeader || `${oAuthBearerScheme} ${token}`, tokenPolicy || {});\n // Add additionalRequestHeaders to the request headers unless the request already has the same header\n if (additionalRequestHeaders && augmentedRequest) {\n additionalRequestHeaders.forEach((value, key)=>{\n addRequestHeaderIfDoesNotExist(augmentedRequest, key, value);\n });\n }\n // This method will check for authorization error and detect the case when new token must be fetched due to insufficient claims.\n // This accounts for use of long lived token which might become invalid while its life time has not expired yet.\n const insufficientClaimsFn = (response)=>response.status === 401 && parseAuthErrorClaims(response.headers) || undefined;\n // This method will check for authorization error and detect the case when new token must be fetched due to current one being invalid.\n // This accounts for use of token which might become invalid for reasons other than the ones covered by insufficient claims.\n const invalidTokenFn = (response)=>response.status === 401 && parseAuthErrorInvalidToken(response.headers) !== undefined || undefined;\n // This method will check for authorization error and detect the case when token must be requested from specific tenant.\n // This accounts for access to resource residing in external tenant (e.g. a file).\n const specificTenantFn = (response)=>{\n if (response.status === 401) {\n const tenantId = parseAuthErrorRealm(response.headers);\n if (tenantId && tenantId !== tokenRequestOptions.tenantId) {\n return tenantId;\n }\n }\n return undefined;\n };\n // Augment retry policy to exclude case where known authentication error is returned\n let augmentedRetryPolicy;\n if (retryPolicy) {\n augmentedRetryPolicy = {\n ...retryPolicy,\n filter: (response)=>!insufficientClaimsFn(response) && !invalidTokenFn(response) && !specificTenantFn(response) && retryPolicy.filter(response)\n };\n }\n let fetchResponse;\n if ('logger' in props && 'nameForLogging' in props) {\n const getAdditionalPropsWithTokenFetchDuration = async (response, isFinalAttempt)=>{\n const additionalProps = await props.getAdditionalProps?.(response, isFinalAttempt);\n const tokenFetchDurationMs = Math.round(tokenFetchEndTime - tokenFetchStartTime);\n return {\n tokenFetchDurationMs,\n ...additionalProps\n };\n };\n fetchResponse = await instrumentedFetchWithRetry(augmentedUrl, augmentedRequest, props.nameForLogging, props.logger, props.doNotLogOnSuccess, augmentedRetryPolicy, timeoutMs, getAdditionalPropsWithTokenFetchDuration);\n } else {\n fetchResponse = await fetchWithRetry(augmentedUrl, augmentedRequest, augmentedRetryPolicy, timeoutMs);\n }\n // First attempt does not count as a retry\n if (attempt <= maxRetriesDueToKnownAuthError) {\n const isFinalAttempt = attempt === maxRetriesDueToKnownAuthError;\n const insufficientClaims = insufficientClaimsFn(fetchResponse.result);\n if (insufficientClaims) {\n logFetchRetryDueToKnownAuthError(props, 'InsufficientClaims', attempt, isFinalAttempt);\n return authorizedFetchWithRetryImpl(props, {\n ...tokenRequestOptions,\n claims: insufficientClaims,\n forceRefresh: true\n }, attempt + 1);\n }\n if (invalidTokenFn(fetchResponse.result)) {\n logFetchRetryDueToKnownAuthError(props, 'InvalidToken', attempt, isFinalAttempt);\n return authorizedFetchWithRetryImpl(props, {\n ...tokenRequestOptions,\n forceRefresh: true\n }, attempt + 1);\n }\n const specificTenant = specificTenantFn(fetchResponse.result);\n if (specificTenant) {\n logFetchRetryDueToKnownAuthError(props, 'SpecificTenant', attempt, isFinalAttempt);\n return authorizedFetchWithRetryImpl(props, {\n ...tokenRequestOptions,\n tenantId: specificTenant\n }, attempt + 1);\n }\n }\n return fetchResponse;\n}\nfunction logFetchRetryDueToKnownAuthError(props, reason, attempt, isFinalAttempt) {\n if ('logger' in props && 'nameForLogging' in props) {\n sendTelemetryEvent(props.logger, {\n eventName: `Retry${props.nameForLogging}OnAuthError`,\n subCategory: reason,\n attempt,\n isFinalAttempt\n });\n }\n}\n\n//# sourceMappingURL=authorizedFetchWithRetry.js.map","// add request header if it does not exist\nexport function addRequestHeaderIfDoesNotExist(request, header, value) {\n // this is to support requests that have headers as Headers object (e.g web api requests from Planner component)\n if (request.headers === undefined) {\n const headers = new Headers();\n headers.set(header, value);\n request.headers = headers;\n } else if (request.headers instanceof Headers) {\n if (!request.headers.has(header)) {\n request.headers.set(header, value);\n }\n } else if (Array.isArray(request.headers)) {\n for(let i = 0; i < request.headers.length; i += 1){\n if (request.headers[i][0] === header) return;\n }\n request.headers = [\n ...request.headers,\n [\n header,\n value\n ]\n ];\n } else if (request.hasOwnProperty('headers')) {\n request.headers = {\n [header]: value,\n ...request.headers\n };\n }\n}\n\n//# sourceMappingURL=headerUtils.js.map","import { tryJsonParse } from '../misc';\n/**\n * Checks if response headers contains `www-authenticate` header and extracts claims that should be\n * passed to token authority when requesting new token. More details can be found here:\n * https://microsoft.sharepoint.com/:w:/t/aad/protocols/ERSWYtOQB45GgG4e2q3Cz00B6C36zi4gAs6JhdQG_wvVeQ\n *\n * Header sample:\n * www-authenticate=Bearer realm=\"\", authorization_uri=\"https://login.microsoftonline.com/common/oauth2/authorize\",\n * error=\"insufficient_claims\", claims=\"eyJhY2Nlc3NfdG9rZW4iOnsibmJmIjp7ImVzc2VudGlhbCI6ZmFsc2UsInZhbHVlIjoxNTM5Mjg0Mzc2fX19\"\n *\n * Note that claims value is base64 encoded inside header but this method will return unencoded value.\n */ export function parseAuthErrorClaims(responseHeader) {\n const authHeaderData = responseHeader.get('www-authenticate');\n if (!authHeaderData) {\n return undefined;\n }\n let claims;\n let detectedErrorIndicator = false;\n authHeaderData.split(',').map((section)=>{\n const nameValuePair = section.split('=');\n // Values can be encoded and contain '=' symbol inside so it is possible to have more than one\n if (nameValuePair.length >= 2) {\n if (!detectedErrorIndicator && nameValuePair[0].trim().toLowerCase() === 'error') {\n detectedErrorIndicator = tryJsonParse(nameValuePair[1].trim().toLowerCase()) === 'insufficient_claims';\n } else if (!claims && nameValuePair[0].trim().toLowerCase() === 'claims') {\n const encodedClaims = tryJsonParse(section.substring(section.indexOf('=') + 1).trim());\n if (encodedClaims) {\n claims = atob(encodedClaims);\n }\n }\n }\n });\n /* eslint-disable-next-line @typescript-eslint/no-unnecessary-condition --\n Disabling this rule intentionally, conditional logic is needed */ return detectedErrorIndicator ? claims : undefined;\n}\n\n//# sourceMappingURL=parseAuthErrorClaims.js.map","import { tryJsonParse } from '../misc';\n/**\n * Checks if response headers contains `www-authenticate` header with error indicating that\n * authorization failed due to invalid_token. This error is returned when access token is revoked,\n * or invalid for some other reason. For instance, it is returned when token has expired.\n * This method will check for invalid_token. If found, it will return object with optional\n * errorDescription property in case it was defined inside header body. Otherwise, this method\n * will return undefined.\n *\n * Header sample:\n * www-authenticate=Bearer authorization_uri=\"https://login.microsoftonline.com/common/oauth2/authorize\",\n * error=\"invalid_token\", error_description=\"The access token is expired.\"\n */ export function parseAuthErrorInvalidToken(responseHeader) {\n const authHeaderData = responseHeader.get('www-authenticate');\n if (!authHeaderData) {\n return undefined;\n }\n let detectedErrorIndicator = false;\n let errorDescription;\n for (const section of authHeaderData.split(',')){\n const nameValuePair = section.split('=');\n // Values can be encoded and contain '=' symbol inside so it is possible to have more than one\n if (nameValuePair.length >= 2) {\n if (!detectedErrorIndicator && nameValuePair[0].trim().toLowerCase() === 'error') {\n detectedErrorIndicator = tryJsonParse(nameValuePair[1].trim().toLowerCase()) === 'invalid_token';\n } else if (errorDescription === undefined && nameValuePair[0].trim().toLowerCase() === 'error_description') {\n errorDescription = tryJsonParse(nameValuePair[1].trim());\n }\n }\n }\n // Disabling this rule intentionally, conditional logic is needed\n return detectedErrorIndicator ? {\n errorDescription\n } : undefined;\n}\n\n//# sourceMappingURL=parseAuthErrorInvalidToken.js.map","import { oAuthBearerScheme } from './addTokenToRequest';\n/**\n * Checks if response headers contains `www-authenticate` header and extracts realm that should be\n * used to issue access token for protected resource. More details can be found here:\n * https://tools.ietf.org/html/rfc2617#page-8\n *\n * Header sample:\n * www-authenticate=Bearer realm=\"03d0c210-38e8-47d7-9bc9-9ff2cd5ea7bc\",client_id=\"00000003-0000-0ff1-ce00-000000000000\",\n * trusted_issuers=\"00000001-0000-0000-c000-000000000000@*,D3776938-3DBA-481F-A652-4BEDFCAB7CD8@*,\n * https://sts.windows.net/*,00000003-0000-0ff1-ce00-000000000000@90140122-8516-11e1-8eff-49304924019b\",\n * authorization_uri=\"https://login.windows.net/common/oauth2/authorize\"\n *\n * Note that for ODSP vroom calls realm corresponds to AAD tenant id that owns ODSP resource.\n */ export function parseAuthErrorRealm(responseHeader) {\n const authHeaderData = responseHeader.get('www-authenticate');\n if (!authHeaderData) {\n return undefined;\n }\n // Header value must contain 'Bearer' scheme\n const indexOfBearerInfo = authHeaderData.indexOf(oAuthBearerScheme);\n if (indexOfBearerInfo < 0) {\n return undefined;\n }\n let realm;\n authHeaderData.substring(indexOfBearerInfo + oAuthBearerScheme.length).split(',').map((section)=>{\n if (!realm) {\n const nameValuePair = section.split('=');\n // Values can be encoded and contain '=' symbol inside so it is possible to have more than one\n if (nameValuePair.length >= 2) {\n if (nameValuePair[0].trim().toLowerCase() === 'realm') {\n realm = JSON.parse(nameValuePair[1].trim());\n }\n }\n }\n });\n return realm;\n}\n\n//# sourceMappingURL=parseAuthErrorRealm.js.map","/** We rename headers so that otel doesn't scrub them away. Otel doesn't allow certain characters in headers including '-' */ const headersToLog = [\n {\n headerName: 'sprequestguid',\n logName: 'spRequestGuid'\n },\n {\n headerName: 'request-id',\n logName: 'requestId'\n },\n {\n headerName: 'client-request-id',\n logName: 'clientRequestId'\n },\n {\n headerName: 'x-msedge-ref',\n logName: 'xMsedgeRef'\n }\n];\n/**\n * Extracts value of known diagnostic headers returned with Graph and ODSP fetch response.\n * @param response Fetch response to process\n */ export function getOdspAndGraphRequestIdsFromResponse(response) {\n const additionalProps = {};\n /* eslint-disable-next-line @typescript-eslint/no-unnecessary-condition --\n Exception added when eslint rule was added, this should be revisited when modifying this code */ if (response?.headers) {\n headersToLog.forEach((header)=>{\n const headerValue = response.headers.get(header.headerName);\n if (headerValue) {\n additionalProps[header.logName] = headerValue;\n }\n });\n }\n return additionalProps;\n}\n\n//# sourceMappingURL=getOdspAndGraphRequestIdsFromResponse.js.map","/**\n * Gets the origin of the provided URL\n * @param url URL whose origin is to be extracted\n */ export function getOrigin(url) {\n return new URL(url).origin;\n}\n\n//# sourceMappingURL=getOrigin.js.map","import { fetchWithRetry } from '@fluidx/loop-sdk';\nimport { sendTelemetryEvent } from '@fluidx/telemetry';\n/**\n * An implementation of fetchWithRetry that logs the fetch result\n * @param requestInfo fetch requestInfo, can be a string\n * @param requestInit fetch requestInit\n * @param nameForLogging name of the request to use for logging\n * @param logger used to log results of operation, including any error\n * @param doNotLogOnSuccess Boolean passed to fetchWithRetry. Set this to false if you want fetchWithRetry to log only the failed responses\n * @param retryPolicy how to do retries\n * @param timeoutMs time in milliseconds to treat fetch as timed out, if not included there's no retry call\n * @param getAdditionalProps optional callback used to get additional properties that get logged about the request\n */ export function instrumentedFetchWithRetry(requestInfo, requestInit, nameForLogging, logger, doNotLogOnSuccess, retryPolicy, timeoutMs = 0, getAdditionalProps) {\n return fetchWithRetry(requestInfo, requestInit, retryPolicy, timeoutMs).then(async (fetchWithRetryResponse)=>{\n if (!logger || !nameForLogging) {\n return fetchWithRetryResponse;\n }\n // The latest response is in result, and is attempted after tries.length number of prior attempts.\n // Log success only if we want to measure the latency of the request\n if (!doNotLogOnSuccess && fetchWithRetryResponse.result.ok || !fetchWithRetryResponse.result.ok) {\n await logFetchResponse(nameForLogging, true, fetchWithRetryResponse.result, fetchWithRetryResponse.tries.length + 1, logger, getAdditionalProps);\n }\n await Promise.all(fetchWithRetryResponse.tries.map(async (fetchResponse, attempt)=>await logFetchResponse(nameForLogging, false, fetchResponse, attempt + 1, logger, getAdditionalProps)));\n return fetchWithRetryResponse;\n });\n}\nasync function logFetchResponse(nameForLogging, isFinalAttempt, response, attempt, logger, getAdditionalProps) {\n const additionalProps = getAdditionalProps && await getAdditionalProps(response, isFinalAttempt).catch(()=>({\n getAdditionalPropsError: true\n }));\n sendTelemetryEvent(logger, {\n subCategory: 'Request',\n eventName: nameForLogging,\n isFinalAttempt,\n status: response.status,\n durationMs: response.durationMs,\n /* eslint-disable-next-line @typescript-eslint/no-unnecessary-condition --\n Exception needed because response is not a Response object when a network error occurs */ size: response.headers?.get('Content-Length') || -1,\n attempt,\n ...additionalProps\n });\n}\n\n//# sourceMappingURL=instrumentedFetchWithRetry.js.map","import { ResponseError } from '../errors/ExtendedError';\nimport { getOrigin } from '../fetch/getOrigin';\nimport { authorizedFetchWithRetry, instrumentedAuthorizedFetchWithRetry } from '../fetch/authorizedFetchWithRetry';\nimport { getOdspAndGraphRequestIdsFromResponse } from '../fetch/getOdspAndGraphRequestIdsFromResponse';\nimport { getVroomTokenPolicy, vroomRetryPolicy } from './storageRequestPolicies';\nimport { sendErrorEvent } from '@fluidx/telemetry';\n// Store details of the requested items for the lifetime of the app\nconst fileSharepointIdsCache = new Map();\n/**\n * Gets file item SharePoint ids info\n * soft-deprecated Use getFileSharepointIdsThrows instead (will be renamed once this method is removed). // TODO: ADO #8806507 - Actually deprecate.\n * @param tokenProvider Token provider than can supply access token needed to execute operation\n * @param siteUrl Url of the site where file resides\n * @param driveId Drive id where file resides\n * @param itemId File id\n * @param logger used to log results of operation, including any error\n * @param tenantId tenant id is used to designate AAD tenant where file resides. This can be specified in shape of GUID or\n * domain hostname. If not specified then tenant will be determined based on given siteUrl..\n * @returns Object containing SharePoint ids properties.\n */ export function getFileSharepointIds(tokenProvider, siteUrl, driveId, itemId, logger, tenantId) {\n const siteOrigin = getOrigin(siteUrl);\n const cacheKey = `${siteOrigin}_${driveId}_${itemId}`;\n if (!fileSharepointIdsCache.has(cacheKey)) {\n const fetchFileItem = async ()=>{\n const url = `${siteOrigin}/_api/v2.0/drives/${driveId}/items/${itemId}?select=sharepointIds`;\n const authorizedFetchProps = {\n // TODO: ADO 9141071 remove conditional logic once AuthorizedFetchProps.getToken signature changes to require options arg.\n getToken: (options)=>{\n if (options) {\n const odspResourceOptions = {\n ...options,\n siteUrl,\n driveId,\n itemId\n };\n return tokenProvider.getToken([\n `${siteOrigin}/files.readwrite.all`\n ], odspResourceOptions);\n }\n throw Error('Options must be specified');\n },\n url,\n tenantId,\n requestInit: {\n method: 'GET'\n },\n retryPolicy: vroomRetryPolicy,\n tokenPolicy: getVroomTokenPolicy(tokenProvider)\n };\n const fetchResponse = logger ? instrumentedAuthorizedFetchWithRetry({\n ...authorizedFetchProps,\n logger,\n nameForLogging: 'GetFileSharepointIds',\n doNotLogOnSuccess: true,\n getAdditionalProps: async (response, _isFinalAttempt)=>getOdspAndGraphRequestIdsFromResponse(response)\n }) : authorizedFetchWithRetry(authorizedFetchProps);\n let response;\n try {\n response = (await fetchResponse).result;\n } catch {}\n if (response?.ok) {\n let result;\n try {\n result = await response.json();\n } catch (error) {\n logger && sendErrorEvent(logger, {\n eventName: 'GetFileSharepointIdsResponseParseError'\n }, error);\n }\n if (result?.sharepointIds) {\n return result.sharepointIds;\n } else {\n logger && sendErrorEvent(logger, {\n eventName: 'GetFileSharepointIdsUnexpectedResponse'\n }, new Error('sharepointIds is missing from response body'));\n }\n }\n // Keep cache in case of 404 (NotFound) for failed requests\n if (response?.status !== 404) {\n fileSharepointIdsCache.delete(cacheKey);\n }\n return undefined;\n };\n fileSharepointIdsCache.set(cacheKey, fetchFileItem());\n }\n // The extra .then() is a workaround for chromium bug https://bugs.chromium.org/p/v8/issues/detail?id=13736\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- .get is behind a .has check\n return fileSharepointIdsCache.get(cacheKey).then();\n}\n/**\n * Gets file item SharePoint ids info\n * @param tokenProvider Token provider than can supply access token needed to execute operation\n * @param siteUrl Url of the site where file resides\n * @param driveId Drive id where file resides\n * @param itemId File id\n * @param logger used to log results of operation, including any error\n * @param tenantId tenant id is used to designate AAD tenant where file resides. This can be specified in shape of GUID or\n * domain hostname. If not specified then tenant will be determined based on given siteUrl..\n * @returns Object containing SharePoint ids properties.\n */ export function getFileSharepointIdsThrows(tokenProvider, siteUrl, driveId, itemId, logger, tenantId) {\n const siteOrigin = getOrigin(siteUrl);\n const cacheKey = `${siteOrigin}_${driveId}_${itemId}`;\n if (!fileSharepointIdsCache.has(cacheKey)) {\n const fetchFileItem = async ()=>{\n const url = `${siteOrigin}/_api/v2.0/drives/${driveId}/items/${itemId}?select=sharepointIds`;\n const authorizedFetchProps = {\n // TODO: ADO 9141071 remove conditional logic once AuthorizedFetchProps.getToken signature changes to require options arg.\n getToken: (options)=>{\n if (options) {\n const odspResourceOptions = {\n ...options,\n siteUrl,\n driveId,\n itemId\n };\n return tokenProvider.getToken([\n `${siteOrigin}/files.readwrite.all`\n ], odspResourceOptions);\n }\n throw Error('Options must be specified');\n },\n url,\n tenantId,\n requestInit: {\n method: 'GET'\n },\n retryPolicy: vroomRetryPolicy,\n tokenPolicy: getVroomTokenPolicy(tokenProvider)\n };\n const fetchResponse = logger ? instrumentedAuthorizedFetchWithRetry({\n ...authorizedFetchProps,\n logger,\n nameForLogging: 'GetFileSharepointIds',\n doNotLogOnSuccess: true,\n getAdditionalProps: async (response, _isFinalAttempt)=>getOdspAndGraphRequestIdsFromResponse(response)\n }) : authorizedFetchWithRetry(authorizedFetchProps);\n try {\n const responseResult = (await fetchResponse).result;\n if (!responseResult.ok) {\n throw new ResponseError('GetFileSharepointIds', responseResult);\n }\n const result = await responseResult.json();\n if (result.sharepointIds) {\n return result.sharepointIds;\n } else {\n throw new Error('sharepointIds is missing from response body');\n }\n } catch (error) {\n logger && sendErrorEvent(logger, {\n eventName: 'GetFileSharepointIdsError'\n }, error);\n // Keep cache in case of 404 (NotFound) for failed requests\n if (!(error instanceof ResponseError) || error.code !== 404) {\n fileSharepointIdsCache.delete(cacheKey);\n }\n throw error;\n }\n };\n fileSharepointIdsCache.set(cacheKey, fetchFileItem());\n }\n // The extra .then() is a workaround for chromium bug https://bugs.chromium.org/p/v8/issues/detail?id=13736\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- .get is behind a .has check\n return fileSharepointIdsCache.get(cacheKey).then();\n}\nfunction hasFileIdsAndUrl(result) {\n const maybe = result;\n return !!maybe.sharepointIds && typeof maybe.webDavUrl === 'string';\n}\n/**\n * Gets file item SharePoint ids and web dav URL.\n */ export async function getFileIdsAndUrl(tokenProvider, siteUrl, driveId, itemId, logger, tenantId) {\n const siteOrigin = getOrigin(siteUrl);\n const cacheKey = `${siteOrigin}_${driveId}_${itemId}`;\n const fetch = async ()=>{\n const url = `${siteOrigin}/_api/v2.0/drives/${driveId}/items/${itemId}?select=sharepointIds,webDavUrl`;\n const authorizedFetchProps = {\n getToken: (options)=>{\n if (options) {\n const odspResourceOptions = {\n ...options,\n siteUrl,\n driveId,\n itemId\n };\n return tokenProvider.getToken([\n `${siteOrigin}/files.readwrite.all`\n ], odspResourceOptions);\n }\n throw Error('Options must be specified');\n },\n url,\n tenantId,\n requestInit: {\n method: 'GET'\n },\n retryPolicy: vroomRetryPolicy,\n tokenPolicy: getVroomTokenPolicy(tokenProvider)\n };\n const fetchResponse = logger ? instrumentedAuthorizedFetchWithRetry({\n ...authorizedFetchProps,\n logger,\n nameForLogging: 'GetFileSharepointIdsAndWebDavUrl',\n doNotLogOnSuccess: true,\n getAdditionalProps: async (response, _isFinalAttempt)=>getOdspAndGraphRequestIdsFromResponse(response)\n }) : authorizedFetchWithRetry(authorizedFetchProps);\n try {\n const responseResult = (await fetchResponse).result;\n if (!responseResult.ok) {\n throw new ResponseError('GetFileSharepointIdsAndWebDavUrl', responseResult);\n }\n const result = await responseResult.json();\n if (hasFileIdsAndUrl(result)) {\n return result;\n } else {\n throw new Error('result is invalid');\n }\n } catch (error) {\n logger && sendErrorEvent(logger, {\n eventName: 'GetFileSharepointIdsAndWebDavUrlError'\n }, error);\n // Keep cache in case of 404 (NotFound) for failed requests\n if (!(error instanceof ResponseError && error.code === 404)) {\n fileSharepointIdsCache.delete(cacheKey);\n }\n throw error;\n }\n };\n const result = fetch();\n if (!fileSharepointIdsCache.has(cacheKey)) {\n fileSharepointIdsCache.set(cacheKey, result.then((value)=>value.sharepointIds));\n }\n return result;\n}\n/**\n * Gets file item information\n * @param tokenProvider Token provider than can supply access token needed to execute operation\n * @param siteUrl Url of the site where file resides\n * @param driveId Drive id where file resides\n * @param itemId File id\n * @param logger used to log results of operation, including any error\n * @param tenantId tenant id is used to designate AAD tenant where file resides. This can be specified in shape of GUID or\n * domain hostname. If not specified then tenant will be determined based on given siteUrl..\n * @param abortSignal Abort signal to cancel in-flight requests\n * @returns Object containing name, webUrl, webDavUrl, sharepointIds, parentReference properties.\n * - name represents file name\n * - webUrl represents file url, this is url that can be used for direct loading of file on web. Primarily used\n * as canonical url for file residing in ODC\n * - webDavUrl represents file url in WebDAV standard, this url includes file path. This is needed for APIs\n * powering MRU and Share functionality.\n * Sample webUrl for SharePoint: \"https://contoso-my.sharepoint.com/personal/johnd_contoso_com/_layouts/15/Doc.aspx?sourcedoc=%7B592D8007-BAAF-498C-8288-0DBC52870406%7D&file=test.fluid&action=default\"\n * Sample webUrl for ODC: \"https://1drv.ms/u/s!AOMVqPBIV2EghbpA\"\n * Sample webDavUrl for SharePoint: \"https://contoso-my.sharepoint.com/personal/johnd_contoso_com/Fluid%20Preview%20Docs/test.fluid\"\n * Sample webDavUrl for ODC: \"https://d.docs.live.net/20615748f0a815e3/Fluid%20Preview%20Docs/test.fluid\"\n * - parentReference represents the item's parent information, if it has a parent.\n */ export async function getFileItemLite(tokenProvider, siteUrl, driveId, itemId, logger, tenantId, abortSignal) {\n return getFileItemLiteHelper(tokenProvider, siteUrl, driveId, itemId, undefined /* relativePath */ , logger, tenantId, abortSignal);\n}\n/**\n * Gets file item information\n * @param tokenProvider Token provider than can supply access token needed to execute operation\n * @param siteUrl Url of the site where file resides\n * @param driveId Drive id where file resides\n * @param parentItemId File id\n * @param relativePath File path relative to the parent item defined by parentItemId\n * @param logger used to log results of operation, including any error\n * @param tenantId tenant id is used to designate AAD tenant where file resides. This can be specified in shape of GUID or\n * domain hostname. If not specified then tenant will be determined based on given siteUrl..\n * @param abortSignal Abort signal to cancel in-flight requests\n * @returns Object containing name, webUrl, webDavUrl, sharepointIds, parentReference properties.\n * - name represents file name\n * - webUrl represents file url, this is url that can be used for direct loading of file on web. Primarily used\n * as canonical url for file residing in ODC\n * - webDavUrl represents file url in WebDAV standard, this url includes file path. This is needed for APIs\n * powering MRU and Share functionality.\n * Sample webUrl for SharePoint: \"https://contoso-my.sharepoint.com/personal/johnd_contoso_com/_layouts/15/Doc.aspx?sourcedoc=%7B592D8007-BAAF-498C-8288-0DBC52870406%7D&file=test.fluid&action=default\"\n * Sample webUrl for ODC: \"https://1drv.ms/u/s!AOMVqPBIV2EghbpA\"\n * Sample webDavUrl for SharePoint: \"https://contoso-my.sharepoint.com/personal/johnd_contoso_com/Fluid%20Preview%20Docs/test.fluid\"\n * Sample webDavUrl for ODC: \"https://d.docs.live.net/20615748f0a815e3/Fluid%20Preview%20Docs/test.fluid\"\n * - parentReference represents the item's parent information, if it has a parent.\n */ export async function getFileItemLiteByRelativePath(tokenProvider, siteUrl, driveId, parentItemId, relativePath, logger, tenantId, abortSignal) {\n return getFileItemLiteHelper(tokenProvider, siteUrl, driveId, parentItemId, relativePath, logger, tenantId, abortSignal);\n}\n/**\n * Gets file item information\n * @param tokenProvider Token provider than can supply access token needed to execute operation\n * @param siteUrl Url of the site where file resides\n * @param driveId Drive id where file resides\n * @param itemId File id for item to retrieve, or parent item id when retrieving a child item (when relativePath is provided)\n * @param relativePath File path relative to the parent item defined by itemId. Only needed when retrieving a child item relative to a parent id.\n * @param logger used to log results of operation, including any error\n * @param tenantId tenant id is used to designate AAD tenant where file resides. This can be specified in shape of GUID or\n * domain hostname. If not specified then tenant will be determined based on given siteUrl..\n * @param abortSignal Abort signal to cancel in-flight requests\n * @returns Object containing name, webUrl, webDavUrl, sharepointIds, parentReference properties.\n * - name represents file name\n * - webUrl represents file url, this is url that can be used for direct loading of file on web. Primarily used\n * as canonical url for file residing in ODC\n * - webDavUrl represents file url in WebDAV standard, this url includes file path. This is needed for APIs\n * powering MRU and Share functionality.\n * Sample webUrl for SharePoint: \"https://contoso-my.sharepoint.com/personal/johnd_contoso_com/_layouts/15/Doc.aspx?sourcedoc=%7B592D8007-BAAF-498C-8288-0DBC52870406%7D&file=test.fluid&action=default\"\n * Sample webUrl for ODC: \"https://1drv.ms/u/s!AOMVqPBIV2EghbpA\"\n * Sample webDavUrl for SharePoint: \"https://contoso-my.sharepoint.com/personal/johnd_contoso_com/Fluid%20Preview%20Docs/test.fluid\"\n * Sample webDavUrl for ODC: \"https://d.docs.live.net/20615748f0a815e3/Fluid%20Preview%20Docs/test.fluid\"\n * - parentReference represents the item's parent information, if it has a parent.\n */ async function getFileItemLiteHelper(tokenProvider, siteUrl, driveId, itemId, relativePath, logger, tenantId, abortSignal) {\n const siteOrigin = getOrigin(siteUrl);\n const relativePathFragment = relativePath !== undefined ? `:/${encodeURIComponent(relativePath)}:/` : '';\n const url = `${siteOrigin}/_api/v2.0/drives/${driveId}/items/${itemId}${relativePathFragment}/?select=webUrl,webDavUrl,name,sharepointIds,parentReference`;\n const authorizedFetchProps = {\n // TODO: ADO 9141071 remove conditional logic once AuthorizedFetchProps.getToken signature changes to require options arg.\n getToken: (options)=>{\n if (options) {\n const odspResourceOptions = {\n ...options,\n siteUrl,\n driveId,\n itemId\n };\n return tokenProvider.getToken([\n `${siteOrigin}/files.readwrite.all`\n ], odspResourceOptions);\n }\n throw Error('Options must be specified');\n },\n url,\n tenantId,\n requestInit: {\n method: 'GET',\n signal: abortSignal\n },\n retryPolicy: vroomRetryPolicy,\n tokenPolicy: getVroomTokenPolicy(tokenProvider)\n };\n const fetchResponse = logger ? instrumentedAuthorizedFetchWithRetry({\n ...authorizedFetchProps,\n logger,\n nameForLogging: 'GetFileItemLite',\n doNotLogOnSuccess: true,\n getAdditionalProps: async (response, _isFinalAttempt)=>getOdspAndGraphRequestIdsFromResponse(response)\n }) : authorizedFetchWithRetry(authorizedFetchProps);\n let response;\n try {\n response = (await fetchResponse).result;\n } catch {}\n if (response?.ok) {\n try {\n return await response.json();\n } catch (error) {\n logger && sendErrorEvent(logger, {\n eventName: 'GetFileItemLiteResponseParseError'\n }, error);\n }\n }\n return undefined;\n}\n/**\n * Returns location of an odsp file given an Odsp resolved url\n * @param resolvedUrl Maybe IOdspResolvedUrl\n * @param tokenProvider Returns tokens with the given set of scopes\n * @param logger Namespace logger\n * @param tenantId tenant id is used to designate AAD tenant where file resides. This can be specified in shape of GUID or\n * domain hostname. If not specified then item is presumed to reside in the tenancy of currently signed in user.\n * @param abortSignal Abort signal to cancel in-flight requests\n */ export const getOdspFileLocation = async (resolvedUrl, tokenProvider, logger, tenantId, abortSignal)=>{\n if (!isOdspResolvedUrl(resolvedUrl)) {\n return undefined;\n }\n return getFileItemLite(tokenProvider, resolvedUrl.siteUrl, resolvedUrl.driveId, resolvedUrl.itemId, logger, tenantId, abortSignal).then((fileItem)=>{\n // Construct folder url by removing file name from file url\n const filenameIndex = fileItem?.webDavUrl.lastIndexOf('/');\n if (filenameIndex !== undefined && filenameIndex > 0) {\n return fileItem?.webDavUrl.substring(0, filenameIndex);\n }\n return undefined;\n });\n};\n// TODO: Task #452604: Refine IResolvedUrl types. Types should contain enough information on driver and possible features\n/** Assert resolved url is from Odsp driver */ export const isOdspResolvedUrl = (resolvedUrl)=>{\n return 'driveId' in resolvedUrl && 'siteUrl' in resolvedUrl && 'itemId' in resolvedUrl;\n};\n\n//# sourceMappingURL=getFileItem.js.map","import { constantBackoff, allowlist } from '@fluidx/loop-sdk';\nexport const vroomRetryPolicy = {\n maxRetries: 2,\n backoffFn: constantBackoff(500),\n filter: allowlist([\n 408,\n 409,\n 503\n ]),\n respectRetryAfterHeader: true\n};\nexport const vroomTokenPolicyForEnterprise = {\n queryParam: 'access_token',\n doNotExceedQueryParamsLength: 2048,\n preferAuthorizationInMultipartFormBody: true,\n doNotExceedMultipartFormBodyLength: 81920 // 80 kb\n};\n// Converged stack for Consumer does not support using 'access_token' query param as mechanism for passing token.\nexport const vroomTokenPolicyForConsumer = {\n preferAuthorizationInMultipartFormBody: true,\n doNotExceedMultipartFormBodyLength: 81920 // 80 kb\n};\nexport function getVroomTokenPolicy(tokenProvider, preferAuthorizationInMultipartFormBody = true) {\n const basePolicy = tokenProvider.identityType === 'Consumer' ? vroomTokenPolicyForConsumer : vroomTokenPolicyForEnterprise;\n return {\n ...basePolicy,\n preferAuthorizationInMultipartFormBody\n };\n}\n\n//# sourceMappingURL=storageRequestPolicies.js.map","import { sendErrorEvent } from '@fluidx/telemetry';\n/**\n * Attempts parsing of given JSON serialized string and returns deserialized object upon success.\n * This method does not throw, it will return undefined upon failure to deserialize.\n * @param input JSON string to deserialize\n * @param reviver A function that transforms the results. This function is called for each member of the object.\n * If a member contains nested objects, the nested objects are transformed before the parent object is.\n * @param errorLogging option logging properties, used to log error to deserialize\n * @param errorLogging.logger logger object used to log parsing error\n * @param errorLogging.event event to be logged in case of parsing failure\n * this will be used as message for new error object\n */ export function tryJsonParse(input, /* eslint-disable-next-line @typescript-eslint/no-explicit-any\n -- Parameter signature is copied from JSON.parse() method. */ reviver, errorLogging) {\n try {\n return JSON.parse(input, reviver);\n } catch (error) {\n if (errorLogging) {\n sendErrorEvent(errorLogging.logger, errorLogging.event, error);\n }\n return undefined;\n }\n}\n\n//# sourceMappingURL=tryJsonParse.js.map","import { tryJsonParse } from '../misc';\nimport { safeLocalStorage, safeSessionStorage } from './localStorage';\nimport { queryParams } from './queryParams';\nconst settingsCache = new Map();\n/**\n * Used whenever a setting is not intended to be hosted in ECS. Use `getFluidExperiencesSetting` if setting is intended to be stored in ECS.\n * `getSetting` is also called whenever the settingsProvider for `getFluidExperiencesSetting` is `undefined`.\n *\n * Note: When using query params you can only use `'on'` and `'off'`.\n * @param settingName Name of the setting to retrieve.\n * @param defaultValue Default value to be returned whenever there are no overrides or the setting is not found.\n * @returns The setting's value.\n */ export function getSetting(settingName, defaultValue) {\n const settingValue = getAndCacheSettingValue(settingName, defaultValue);\n return settingValue;\n}\nfunction getAndCacheSettingValue(settingName, defaultValue) {\n // Cache used to store the value of the setting within a session.\n // A page reload should be required after setting a value in localStorage.\n const cacheValue = settingsCache.get(settingName);\n if (cacheValue !== undefined) {\n return cacheValue;\n }\n let queryParamValue;\n let localStorageValue;\n let sessionStorageValue;\n let settingValue;\n if ((queryParamValue = getSettingFromQueryParam(settingName)) !== undefined) {\n settingValue = queryParamValue;\n } else if ((localStorageValue = getSettingFromLocalStorage(settingName)) !== undefined) {\n settingValue = localStorageValue;\n } else if ((sessionStorageValue = getSettingFromSessionStorage(settingName)) !== undefined) {\n settingValue = sessionStorageValue;\n } else {\n settingValue = defaultValue;\n }\n // Storing the value in the settingsCache for consistency and to avoid subsequent overrides reads\n settingsCache.set(settingName, settingValue);\n return settingValue;\n}\nfunction getSettingFromLocalStorage(settingName) {\n const localStorageValue = safeLocalStorage()?.getItem(settingName);\n return safeSettingValueParse(localStorageValue);\n}\nfunction getSettingFromSessionStorage(settingName) {\n const sessionStorageValue = safeSessionStorage()?.getItem(settingName);\n return safeSettingValueParse(sessionStorageValue);\n}\nfunction getSettingFromQueryParam(settingName) {\n const settingParamValue = queryParams.get(settingName);\n return safeSettingValueParse(settingParamValue);\n}\nfunction safeSettingValueParse(settingValue) {\n if (settingValue !== null && settingValue !== undefined) {\n const parsedValue = tryJsonParse(settingValue);\n // this check is to assign the correct value whenever the settingValue is not in Json Format\n const valueToReturn = parsedValue !== undefined ? parsedValue : settingValue;\n // We also allow 'on' and 'off' to represent true and false\n if (valueToReturn === 'on' || valueToReturn === 'off') {\n return valueToReturn === 'on';\n }\n return valueToReturn;\n }\n return undefined;\n}\n\n//# sourceMappingURL=getSetting.js.map","import { getSetting } from './getSetting';\nfunction getEcsSettingOrDefault(settingName, defaultValue, settingsProvider, settingsScope) {\n if (settingsProvider) {\n return settingsProvider.getSetting(settingName, defaultValue, settingsScope);\n }\n // Use this API whenever the settingsProvider is undefined or the setting is not ecsEnabled.\n return getSetting(settingName, defaultValue);\n}\n/**\n * Get a live setting from ECS. Live settings guarantee they come from the latest network fetch or initiate that fetch\n * if it hasn't been done for this session yet.\n *\n * @param settingName Name of the setting to retrieve.\n * @param defaultValue Default value to be returned whenever there are no overrides or the setting is not found.\n * @param settingsProvider SettingsProvider used to get the setting from ECS.\n * @param settingsScope Used to specify the ECS team's name of the setting we are trying to read (type SettingsScope, above).\n * @returns\n */ async function getEcsLiveSettingOrDefault(settingName, defaultValue, settingsProvider, settingsScope) {\n if (settingsProvider?.getLiveSetting) {\n return settingsProvider.getLiveSetting(settingName, defaultValue, settingsScope);\n }\n // If the `getLiveSetting` API is not available, fall back to the regular flow:\n return getEcsSettingOrDefault(settingName, defaultValue, settingsProvider, settingsScope);\n}\n/**\n * Reading a setting from the Fluid ECS Client to fetch any user/tenant distinctive setting.\n *\n * Use `getSetting` if setting is not intended to be stored in ECS.\n * Note: `getSetting` is the fallback mechanism whenever the settingsProvider is `undefined`.\n *\n * @param settingName Name of the setting to retrieve.\n * @param defaultValue Default value to be returned whenever there are no overrides or the setting is not found.\n * @param settingsProvider SettingsProvider used to get the setting from ECS.\n */ export const getSegmentationSetting = (settingName, defaultValue, settingsProvider)=>getEcsSettingOrDefault(settingName, defaultValue, settingsProvider, 'Segmentation');\n/**\n * Reading a live setting from the Fluid ECS Client to fetch any user/tenant distinctive setting.\n * This differs from {@link getSegmentationSetting} in that it won't use a potentially stale cache value,\n * but rather use the most recent network fetch or initiate a new network fetch.\n *\n * Use `getSetting` if setting is not intended to be stored in ECS.\n * Note: `getSetting` is the fallback mechanism whenever the settingsProvider is `undefined`.\n *\n * @param settingName Name of the setting to retrieve.\n * @param defaultValue Default value to be returned whenever there are no overrides or the setting is not found.\n * @param settingsProvider SettingsProvider used to get the setting from ECS.\n */ export const getSegmentationLiveSetting = async (settingName, defaultValue, settingsProvider)=>getEcsLiveSettingOrDefault(settingName, defaultValue, settingsProvider, 'Segmentation');\n/**\n * Reading a setting from the FluidExperiences ECS Account using the parameter `settingsProvider`.\n * Use `getSetting` if setting is not intended to be stored in ECS.\n * Note: `getSetting` is the fallback mechanism whenever the settingsProvider is `undefined`.\n * @param settingName Name of the setting to retrieve.\n * @param defaultValue Default value to be returned whenever there are no overrides or the setting is not found.\n * @param settingsProvider SettingsProvider used to get the setting from ECS.\n * @returns The setting's value.\n */ export const getFluidExperiencesSetting = (settingName, defaultValue, settingsProvider)=>getEcsSettingOrDefault(settingName, defaultValue, settingsProvider, 'FluidExperiences');\n/**\n * Reading a setting from the FluidExperiences ECS Account using the parameter `settingsProvider`.\n * This differs from {@link getFluidExperiencesSetting} in that it won't use a potentially stale cache value,\n * but rather use the most recent network fetch or initiate a new network fetch.\n *\n * Use `getSetting` if setting is not intended to be stored in ECS.\n * Note: `getSetting` is the fallback mechanism whenever the settingsProvider is `undefined`.\n * @param settingName Name of the setting to retrieve.\n * @param defaultValue Default value to be returned whenever there are no overrides or the setting is not found.\n * @param settingsProvider SettingsProvider used to get the setting from ECS.\n * @returns The setting's value.\n */ export const getFluidExperiencesLiveSetting = async (settingName, defaultValue, settingsProvider)=>getEcsLiveSettingOrDefault(settingName, defaultValue, settingsProvider, 'FluidExperiences');\n/**\n * Reads a setting from the HostExperiences ECS Account using the parameter `settingsProvider`.\n *\n * Use `getSetting` if setting is not intended to be stored in ECS.\n * Note: `getSetting` is the fallback mechanism whenever the settingsProvider is `undefined`.\n *\n * @param settingName Name of the setting to retrieve.\n * @param defaultValue Default value to be returned whenever there are no overrides or the setting is not found.\n * @param settingsProvider SettingsProvider used to get the setting from ECS.\n * @returns The setting's value.\n * @deprecated Use `getFluidExperiencesSetting` instead. Old flights should be ported to use FluidExperiences via Control Tower\n */ export const getHostExperiencesSetting = (settingName, defaultValue, settingsProvider)=>getEcsSettingOrDefault(settingName, defaultValue, settingsProvider, 'HostExperiences');\n/**\n * Reads a setting from the HostExperiences ECS Account using the parameter `settingsProvider`.\n * This differs from {@link getHostExperiencesSetting} in that it won't use a potentially stale cache value,\n * but rather use the most recent network fetch or initiate a new network fetch.\n *\n * Use `getSetting` if setting is not intended to be stored in ECS.\n * Note: `getSetting` is the fallback mechanism whenever the settingsProvider is `undefined`.\n *\n * @param settingName Name of the setting to retrieve.\n * @param defaultValue Default value to be returned whenever there are no overrides or the setting is not found.\n * @param settingsProvider SettingsProvider used to get the setting from ECS.\n * @returns The setting's value.\n */ export const getHostExperiencesLiveSetting = async (settingName, defaultValue, settingsProvider)=>getEcsLiveSettingOrDefault(settingName, defaultValue, settingsProvider, 'HostExperiences');\n\n//# sourceMappingURL=getFluidExperiencesSetting.js.map","let safeLocalStorageInstance;\ntry {\n // Test if we can actually use the storage by accessing getItem('__storage_test__')\n // Even if we get the localStorage instance, its methods might still be inaccessible\n // due to privacy settings or permission issues.\n void localStorage.getItem('__storage_test__');\n safeLocalStorageInstance = localStorage;\n} catch {\n // Storage might not be available due to tracking protection or runtime environment variations.\n // While tracking protection settings are immutable within session, other falsey states can occur\n // when environments disable localStorage differently. Note that even when localStorage exists,\n // the object may not fully implement the Storage contract at runtime.\n safeLocalStorageInstance = undefined;\n}\nlet safeSessionStorageInstance;\ntry {\n // Test if we can actually use the storage by accessing getItem('__storage_test__')\n // Even if we get the localStorage instance, its methods might still be inaccessible\n // due to privacy settings or permission issues.\n void sessionStorage.getItem('__storage_test__');\n safeSessionStorageInstance = sessionStorage;\n} catch {\n // Storage might not be available due to tracking protection or runtime environment variations.\n // While tracking protection settings are immutable within session, other falsey states can occur\n // when environments disable sessionStorage differently. Note that even when sessionStorage exists,\n // the object may not fully implement the Storage contract at runtime.\n safeSessionStorageInstance = undefined;\n}\n/**\n * Use this method to get browser local storage. Local storage object is returned, if available.\n * Otherwise, undefined is returned. Browser allows user to control whether persisted local storage\n * is supported via settings. There are various level of control where user can disable\n * persisted storage for specific site, inside incognito mode or everywhere. This is done to prevent\n * tracking user actions that can survive browser restarts.\n */ export function safeLocalStorage() {\n return safeLocalStorageInstance;\n}\n/**\n * Use this method to get browser session storage. Session storage object is returned, if available.\n * Otherwise, undefined is returned. Browser allows user to control whether session storage is supported\n * via settings. There are various level of control where user can disable session storage for specific\n * site, inside incognito mode or everywhere. This is done to prevent tracking user actions that can\n * survive page reload.\n */ export function safeSessionStorage() {\n return safeSessionStorageInstance;\n}\n/**\n * function to safely emit storage events across packages.\n * StorageEvents are a browser API, and thus may not be available\n * when the code is being run in the web service.\n * So, the dispatch event function is preceded by a check\n * to ensure that StorageEvent is available.\n * @param type event type\n * @param data data expected by event listeners\n */ export function safeDispatchStorageEvent(type, data) {\n if (typeof StorageEvent !== 'undefined') {\n window.dispatchEvent(new StorageEvent(type, data));\n }\n}\n\n//# sourceMappingURL=localStorage.js.map","export const queryParams = new URLSearchParams(typeof location !== 'undefined' ? location.search : '');\n\n//# sourceMappingURL=queryParams.js.map","import { makeBooleanDataField, makeInt64DataField, makeStringDataField } from './DataFieldHelper';\r\nfunction getFullFieldName(instanceName, fieldName) {\r\n return instanceName ? instanceName + '.' + fieldName : fieldName;\r\n}\r\n/**\r\n * Adds a data field from a contract to the data fields array.\r\n * If the data field value is empty, the field is skipped.\r\n * @param instanceName - The name of the contract instance. Empty if no instance.\r\n * @param fieldName - The name of the field to add\r\n * @param value - The value\r\n * @param dataFields - The array of data fields to which a field will be added\r\n */\r\nfunction addStringDataField(dataFields, instanceName, fieldName, value, dataClassification) {\r\n if (dataClassification === void 0) { dataClassification = 4 /* DataClassification.SystemMetadata */; }\r\n if (value) {\r\n dataFields.push(makeStringDataField(\"\".concat(getFullFieldName(instanceName, fieldName)), value, dataClassification));\r\n }\r\n}\r\nfunction addBooleanDataField(dataFields, instanceName, fieldName, value) {\r\n if (typeof value === 'boolean') {\r\n dataFields.push(makeBooleanDataField(\"\".concat(getFullFieldName(instanceName, fieldName)), value));\r\n }\r\n}\r\nfunction addInt64DataField(dataFields, instanceName, fieldName, value) {\r\n if (typeof value === 'number') {\r\n dataFields.push(makeInt64DataField(\"\".concat(getFullFieldName(instanceName, fieldName)), value));\r\n }\r\n}\r\nexport var Result = {\r\n /* Gets data fields for the Office.System.Result contract */\r\n getFields: function (contract) {\r\n var instanceName = 'Activity.Result';\r\n var contractName = 'Office.System.Result';\r\n var dataFields = [];\r\n addInt64DataField(dataFields, instanceName, 'Code', contract.code);\r\n addStringDataField(dataFields, instanceName, 'Type', contract.type);\r\n addInt64DataField(dataFields, instanceName, 'Tag', contract.tag);\r\n addBooleanDataField(dataFields, instanceName, 'IsExpected', contract.isExpected);\r\n dataFields.push(makeStringDataField('zC.Activity.Result', contractName));\r\n return dataFields;\r\n }\r\n}; // Result\r\nexport var Activity = {\r\n contractName: 'Office.System.Activity',\r\n /* Gets data fields for the Office.System.Activity contract */\r\n getFields: function (contract) {\r\n var instanceName = 'Activity';\r\n var dataFields = [];\r\n addStringDataField(dataFields, instanceName, 'CV', contract.cV);\r\n addInt64DataField(dataFields, instanceName, 'Duration', contract.duration);\r\n addInt64DataField(dataFields, instanceName, 'Count', contract.count);\r\n addInt64DataField(dataFields, instanceName, 'AggMode', contract.aggMode);\r\n addBooleanDataField(dataFields, instanceName, 'Success', contract.success);\r\n if (contract.result) {\r\n dataFields.push.apply(dataFields, Result.getFields(contract.result));\r\n }\r\n dataFields.push(makeStringDataField('zC.Activity', this.contractName));\r\n return dataFields;\r\n }\r\n}; // Activity\r\nexport var User = {\r\n /* Gets data fields for the Office.System.User contract */\r\n getFields: function (contract) {\r\n var instanceName = 'User';\r\n var dataFields = [];\r\n addStringDataField(dataFields, instanceName, 'PrimaryIdentityHash', contract.primaryIdentityHash);\r\n addStringDataField(dataFields, instanceName, 'PrimaryIdentitySpace', contract.primaryIdentitySpace);\r\n addStringDataField(dataFields, instanceName, 'TenantId', contract.tenantId, 1 /* DataClassification.EssentialServiceMetadata */);\r\n addStringDataField(dataFields, instanceName, 'TenantGroup', contract.tenantGroup, 1 /* DataClassification.EssentialServiceMetadata */);\r\n addBooleanDataField(dataFields, instanceName, 'IsAnonymous', contract.isAnonymous);\r\n addBooleanDataField(dataFields, instanceName, 'IsSignedIn', contract.isSignedIn);\r\n return dataFields;\r\n }\r\n}; // User\r\nexport var Funnel = {\r\n /* Gets data fields for the Office.System.Funnel contract */\r\n getFields: function (instanceName, contract) {\r\n var dataFields = [];\r\n addStringDataField(dataFields, instanceName, 'Name', contract.name);\r\n addStringDataField(dataFields, instanceName, 'State', contract.state);\r\n return dataFields;\r\n }\r\n}; // Funnel\r\nexport var UserAction = {\r\n /* Gets data fields for the Office.System.UserAction contract */\r\n getFields: function (contract) {\r\n var instanceName = 'UserAction';\r\n var dataFields = [];\r\n addInt64DataField(dataFields, instanceName, 'Id', contract.id);\r\n addStringDataField(dataFields, instanceName, 'Name', contract.name);\r\n addStringDataField(dataFields, instanceName, 'CommandSurface', contract.commandSurface);\r\n addStringDataField(dataFields, instanceName, 'ParentName', contract.parentName);\r\n addStringDataField(dataFields, instanceName, 'TriggerMethod', contract.triggerMethod);\r\n addInt64DataField(dataFields, instanceName, 'TimeOffsetMs', contract.timeOffsetMs);\r\n return dataFields;\r\n }\r\n}; // UserAction\r\nexport var Platform;\r\n(function (Platform) {\r\n Platform[\"Web\"] = \"Web\";\r\n Platform[\"Desktop\"] = \"Desktop\";\r\n Platform[\"Universal\"] = \"Universal\";\r\n Platform[\"Mobile\"] = \"Mobile\";\r\n Platform[\"Win32\"] = \"Win32\";\r\n Platform[\"iOS\"] = \"iOS\";\r\n Platform[\"Android\"] = \"Android\";\r\n})(Platform || (Platform = {}));\r\nexport var App = {\r\n /* Gets data fields for the Office.System.App contract */\r\n getFields: function (contract) {\r\n var instanceName = 'App';\r\n var dataFields = [];\r\n addStringDataField(dataFields, instanceName, 'Name', contract.name, 1 /* DataClassification.EssentialServiceMetadata */);\r\n addStringDataField(dataFields, instanceName, 'Platform', contract.platform, 1 /* DataClassification.EssentialServiceMetadata */);\r\n addStringDataField(dataFields, instanceName, 'Version', contract.version, 1 /* DataClassification.EssentialServiceMetadata */);\r\n return dataFields;\r\n }\r\n}; // App\r\nexport var Session = {\r\n /* Gets data fields for the Office.System.Session contract */\r\n getFields: function (contract) {\r\n var instanceName = 'Session';\r\n var dataFields = [];\r\n addStringDataField(dataFields, instanceName, 'Id', contract.id, 1 /* DataClassification.EssentialServiceMetadata */);\r\n addStringDataField(dataFields, instanceName, 'EcsETag', contract.ecsETag, 1 /* DataClassification.EssentialServiceMetadata */);\r\n return dataFields;\r\n }\r\n}; // Session\r\nexport var HealthQosError = {\r\n /**\r\n * Gets data fields for the Health contract\r\n * See https://aka.ms/asha/docs for documentation on usage and parameters.\r\n * Generally, use sendHealthQosError() instead of using this contract directly.\r\n */\r\n getFields: function (contract) {\r\n var dataFields = [];\r\n dataFields.push(makeStringDataField('Pillar', contract.pillar));\r\n dataFields.push(makeStringDataField('Veto', contract.veto));\r\n dataFields.push(makeBooleanDataField('IsIntentional', contract.isIntentional));\r\n dataFields.push(makeBooleanDataField('IsInternal', contract.isInternal));\r\n dataFields.push(makeBooleanDataField('AlertOnPillar', contract.alertOnPillar));\r\n dataFields.push(makeBooleanDataField('IsSessionEndingError', contract.isSessionEndingError));\r\n addBooleanDataField(dataFields, undefined, 'InStaging', contract.inStaging);\r\n return dataFields;\r\n }\r\n}; // HealthQosError\r\nexport var AudienceGroup;\r\n(function (AudienceGroup) {\r\n AudienceGroup[\"Automation\"] = \"Automation\";\r\n AudienceGroup[\"Dogfood\"] = \"Dogfood\";\r\n AudienceGroup[\"Microsoft\"] = \"Microsoft\";\r\n AudienceGroup[\"Insiders\"] = \"Insiders\";\r\n AudienceGroup[\"Production\"] = \"Production\";\r\n})(AudienceGroup || (AudienceGroup = {}));\r\nexport var Release = {\r\n /* Gets data fields for the Office.System.Release contract */\r\n getFields: function (contract) {\r\n var instanceName = 'Release';\r\n var dataFields = [];\r\n addStringDataField(dataFields, instanceName, 'AudienceGroup', contract.audienceGroup, 1 /* DataClassification.EssentialServiceMetadata */);\r\n return dataFields;\r\n }\r\n}; // Release\r\n// Source of truth is https://office.visualstudio.com/OE/_git/UnifiedEventSchema?version=GBmain&path=/src/Copilot.tml\r\n// Compiled with TML compiler, and manually modified to add enums and zC field\r\nexport var Copilot;\r\n(function (Copilot) {\r\n var contractName = 'Office.System.Copilot';\r\n var instanceName = 'Copilot';\r\n var FeatureActionType;\r\n (function (FeatureActionType) {\r\n FeatureActionType[\"IsEnabled\"] = \"IsEnabled\";\r\n FeatureActionType[\"IsSeen\"] = \"IsSeen\";\r\n FeatureActionType[\"IsTried\"] = \"IsTried\";\r\n FeatureActionType[\"IsKept\"] = \"IsKept\";\r\n FeatureActionType[\"IsRejected\"] = \"IsRejected\";\r\n })(FeatureActionType = Copilot.FeatureActionType || (Copilot.FeatureActionType = {}));\r\n /**\r\n * @deprecated - Use FeatureName and SubFeatureName instead\r\n */\r\n var Capability;\r\n (function (Capability) {\r\n /**\r\n * @deprecated - Use FeatureName and SubFeatureName instead\r\n */\r\n Capability[\"ContentGeneration\"] = \"Content Generation\";\r\n /**\r\n * @deprecated - Use FeatureName and SubFeatureName instead\r\n */\r\n Capability[\"Commanding\"] = \"Commanding\";\r\n /**\r\n * @deprecated - Use FeatureName and SubFeatureName instead\r\n */\r\n Capability[\"QAandSummaries\"] = \"QA and Summaries\";\r\n /**\r\n * @deprecated - Use FeatureName and SubFeatureName instead\r\n */\r\n Capability[\"Collaboration\"] = \"Collaboration\";\r\n /**\r\n * @deprecated - Use FeatureName and SubFeatureName instead\r\n */\r\n Capability[\"Suggestions\"] = \"Suggestions\";\r\n })(Capability = Copilot.Capability || (Copilot.Capability = {}));\r\n var EntryPoint;\r\n (function (EntryPoint) {\r\n EntryPoint[\"Chat\"] = \"Chat\";\r\n EntryPoint[\"Canvas\"] = \"Canvas\";\r\n })(EntryPoint = Copilot.EntryPoint || (Copilot.EntryPoint = {}));\r\n /**\r\n * @deprecated - Use FeatureName and SubFeatureName instead\r\n */\r\n var Verb;\r\n (function (Verb) {\r\n /**\r\n * @deprecated - Use FeatureName and SubFeatureName instead\r\n */\r\n Verb[\"Create\"] = \"Create\";\r\n /**\r\n * @deprecated - Use FeatureName and SubFeatureName instead\r\n */\r\n Verb[\"Command\"] = \"Command\";\r\n /**\r\n * @deprecated - Use FeatureName and SubFeatureName instead\r\n */\r\n Verb[\"Ask\"] = \"Ask\";\r\n /**\r\n * @deprecated - Use FeatureName and SubFeatureName instead\r\n */\r\n Verb[\"Summarize\"] = \"Summarize\";\r\n /**\r\n * @deprecated - Use FeatureName and SubFeatureName instead\r\n */\r\n Verb[\"Share\"] = \"Share\";\r\n /**\r\n * @deprecated - Use FeatureName and SubFeatureName instead\r\n */\r\n Verb[\"Analyze\"] = \"Analyze\";\r\n })(Verb = Copilot.Verb || (Copilot.Verb = {}));\r\n /* Gets data fields for the Office.System.Copilot contract */\r\n function getFields(contract) {\r\n var dataFields = [];\r\n addStringDataField(dataFields, instanceName, 'FeatureActionType', contract.featureActionType);\r\n addBooleanDataField(dataFields, instanceName, 'IsUserInitiated', contract.isUserInitiated);\r\n addStringDataField(dataFields, instanceName, 'FeatureName', contract.featureName);\r\n addStringDataField(dataFields, instanceName, 'SubFeatureName', contract.subFeatureName);\r\n addStringDataField(dataFields, instanceName, 'Capability', contract.capability);\r\n addBooleanDataField(dataFields, instanceName, 'IsThumbsUp', contract.isThumbsUp);\r\n addStringDataField(dataFields, instanceName, 'EntryPoint', contract.entryPoint);\r\n addStringDataField(dataFields, instanceName, 'Verb', contract.verb);\r\n addStringDataField(dataFields, instanceName, 'InteractionId', contract.interactionId);\r\n addStringDataField(dataFields, instanceName, 'ConversationId', contract.conversationId);\r\n dataFields.push(makeStringDataField(\"zC.\".concat(instanceName), contractName));\r\n return dataFields;\r\n }\r\n Copilot.getFields = getFields;\r\n})(Copilot || (Copilot = {})); // Copilot\r\n// Source of truth is https://office.visualstudio.com/DefaultCollection/_git/Office?path=/liblet/telemetryevent/Asha.tml\r\nexport var Asha;\r\n(function (Asha) {\r\n var contractName = 'Office.System.Asha';\r\n var instanceName = 'Asha';\r\n var EventType;\r\n (function (EventType) {\r\n EventType[\"Pillar\"] = \"Pillar\";\r\n EventType[\"Error\"] = \"Error\";\r\n })(EventType = Asha.EventType || (Asha.EventType = {}));\r\n /* Gets data fields for the Office.System.Asha contract */\r\n function getFields(contract) {\r\n var dataFields = [];\r\n addStringDataField(dataFields, instanceName, 'EventType', contract.eventType);\r\n addStringDataField(dataFields, instanceName, 'Pillar', contract.pillar);\r\n addStringDataField(dataFields, instanceName, 'Scenario', contract.scenario);\r\n addStringDataField(dataFields, instanceName, 'Veto', contract.veto);\r\n addStringDataField(dataFields, instanceName, 'Error', contract.error);\r\n addBooleanDataField(dataFields, instanceName, 'InStaging', contract.inStaging);\r\n addBooleanDataField(dataFields, instanceName, 'IsSessionEndingError', contract.isSessionEndingError);\r\n addBooleanDataField(dataFields, instanceName, 'IsIntentional', contract.isIntentional);\r\n addBooleanDataField(dataFields, instanceName, 'IsInternal', contract.isInternal);\r\n dataFields.push(makeStringDataField(\"zC.\".concat(instanceName), contractName));\r\n return dataFields;\r\n }\r\n Asha.getFields = getFields;\r\n})(Asha || (Asha = {})); // Asha\r\n//# sourceMappingURL=Contracts.js.map","/**\r\n * Make a boolean data field.\r\n * @param name - The name of the data field\r\n * @param value - The value of the data field\r\n */\r\nexport function makeBooleanDataField(name, value, classification) {\r\n // eslint-disable-next-line id-denylist\r\n return makeDataField(name, 1 /* DataFieldType.Boolean */, value, classification);\r\n}\r\n/**\r\n * Make a data field corresponding to the Aria Int64 data type. Note that\r\n * JavaScript doesn't actually support Int64 precision on large numbers.\r\n * @param name - The name of the data field\r\n * @param value - The value of the data field\r\n */\r\nexport function makeInt64DataField(name, value, classification) {\r\n return makeDataField(name, 2 /* DataFieldType.Int64 */, value, classification);\r\n}\r\n/**\r\n * Make a double data field\r\n * @param name - The name of the data field\r\n * @param value - The value of the data field\r\n */\r\nexport function makeDoubleDataField(name, value, classification) {\r\n return makeDataField(name, 3 /* DataFieldType.Double */, value, classification);\r\n}\r\n/**\r\n * Make a string data field\r\n * @param name - The name of the data field\r\n * @param value - The value of the data field\r\n */\r\nexport function makeStringDataField(name, value, classification) {\r\n // eslint-disable-next-line id-denylist\r\n return makeDataField(name, 0 /* DataFieldType.String */, value, classification);\r\n}\r\n/**\r\n * Make a GUID data field\r\n * !!!WARNING: Only the 1DS Sink has support for Guid types.\r\n * @param name - The name of the data field\r\n * @param value - The value of the data field\r\n */\r\nexport function makeGuidDataField(name, value, classification) {\r\n return makeDataField(name, 4 /* DataFieldType.Guid */, value, classification);\r\n}\r\nfunction makeDataField(name, dataType, value, classification) {\r\n return {\r\n name: name,\r\n dataType: dataType,\r\n value: value,\r\n classification: classification ? classification : 4 /* DataClassification.SystemMetadata */\r\n };\r\n}\r\n//# sourceMappingURL=DataFieldHelper.js.map","function getNotificationHandler() {\r\n var _listeners = [];\r\n return {\r\n /**\r\n * Fires an event to its listeners\r\n * @param args - The parameters of the event\r\n */\r\n fireEvent: function (args) {\r\n _listeners.forEach(function (listener) { return listener(args); });\r\n },\r\n /**\r\n * Add an event listener\r\n * @param listener - The listener that can process events\r\n */\r\n addListener: function (listener) {\r\n if (listener) {\r\n _listeners.push(listener);\r\n }\r\n }\r\n };\r\n}\r\nvar notificationHandler = getNotificationHandler();\r\n/**\r\n * Returns a list of notification event listeners. You can add an event listener:\r\n * onNotification().addListener(event =\\> \\{\r\n * console.log(event!.message + ' ' + event!.level); \\});\r\n *\r\n * DO NOT trigger telemetry events on these notifications, as doing so may\r\n * create an infinite loop of telemetry events.\r\n */\r\nexport function onNotification() {\r\n return notificationHandler;\r\n}\r\n/**\r\n * Internal function: log a notification\r\n * @param level - The level of notification to log\r\n * @param category - The category of the notification\r\n * @param message - A function that returns a message to log\r\n */\r\nexport function logNotification(level, category, message) {\r\n notificationHandler.fireEvent({ level: level, category: category, message: message });\r\n}\r\n/**\r\n * Internal function: log an error\r\n * @param category - The category of the notification\r\n * @param message - A message that will precede the message from error object\r\n * @param error - An error object, from which an error message might be obtained\r\n */\r\nexport function logError(category, message, error) {\r\n logNotification(0 /* LogLevel.Error */, category, function () {\r\n var errorMessage = error instanceof Error ? error.message : '';\r\n return \"\".concat(message, \": \").concat(errorMessage);\r\n });\r\n}\r\n//# sourceMappingURL=OTelNotifications.js.map","import { logNotification } from './OTelNotifications';\r\nvar NAMESPACE_SEPARATOR = '.';\r\nvar tenantTokens = {};\r\nexport function setTenantTokens(namespace, telemetryProperties) {\r\n if (\r\n // Starts with \"Office.\" and doesn't end with \".\"\r\n namespace.substring(0, 7) === 'Office' + NAMESPACE_SEPARATOR &&\r\n namespace[namespace.length - 1] !== NAMESPACE_SEPARATOR) {\r\n if (tenantTokens[namespace]) {\r\n if (telemetryProperties.ariaTenantToken) {\r\n tenantTokens[namespace].ariaTenantToken = telemetryProperties.ariaTenantToken;\r\n }\r\n if (telemetryProperties.dnmToken) {\r\n tenantTokens[namespace].dnmToken = telemetryProperties.dnmToken;\r\n }\r\n }\r\n else {\r\n tenantTokens[namespace] = telemetryProperties;\r\n }\r\n }\r\n else {\r\n logNotification(0 /* LogLevel.Error */, 0 /* Category.Core */, function () {\r\n return \"Namespace: \".concat(namespace);\r\n });\r\n return;\r\n }\r\n}\r\n/**\r\n * Gets the tenant tokens corresponding to an event\r\n * Strategy: Search for the whole string, then substrings that could be the namespace\r\n * @param eventName - The event name\r\n * @returns - The corresponding tenant tokens, or undefined if none found\r\n */\r\nexport function fillTenantTokens(eventName, telemetryProperties) {\r\n var indexOfCharacterAfterNamespace = eventName.length;\r\n while (indexOfCharacterAfterNamespace > 0) {\r\n var namespaceCandidate = eventName.substr(0, indexOfCharacterAfterNamespace);\r\n if (tenantTokens[namespaceCandidate]) {\r\n var storedTelemetryProperties = tenantTokens[namespaceCandidate];\r\n telemetryProperties.ariaTenantToken = storedTelemetryProperties.ariaTenantToken;\r\n telemetryProperties.dnmToken = storedTelemetryProperties.dnmToken;\r\n return true;\r\n }\r\n indexOfCharacterAfterNamespace = eventName.lastIndexOf(NAMESPACE_SEPARATOR, indexOfCharacterAfterNamespace - 1);\r\n }\r\n return false;\r\n}\r\nexport function clear() {\r\n tenantTokens = {};\r\n}\r\n//# sourceMappingURL=TenantTokenManager.js.map","var INT64_MAX = 9007199254740991;\r\nvar INT64_MIN = -INT64_MAX;\r\nvar MaxEventNameLength = 98; // Client Code = 100 limit; Aria Compact SDK = 98 limit.\r\n// Starts with \"Office\", and then at least two more alphanumeric tokens that start with capital letters\r\n// Tokens are separated by periods.\r\n// This regex has been manually reviewed for catastrophic backtracking.\r\n// eslint-disable-next-line security/detect-unsafe-regex\r\nvar EventNameRegex = /^Office(\\.[A-Z][a-zA-Z0-9]*){2,}$/;\r\n// Contains alphanumeric or _ or .\r\n// Must be between 1 and 95 characters long (5 characters reserved for 'Data.')\r\nvar AlphanumericRegex = /^[a-zA-Z0-9_\\.]{1,95}$/;\r\nexport function validateTelemetryEvent(telemetryEvent) {\r\n if (!isEventNameValid(telemetryEvent.eventName)) {\r\n throw new Error('Invalid eventName');\r\n }\r\n var eventContract = telemetryEvent.eventContract;\r\n if (eventContract) {\r\n if (eventContract.name && !isNameValid(eventContract.name)) {\r\n throw new Error('Invalid eventContract');\r\n }\r\n validateDataFields(eventContract.dataFields);\r\n }\r\n validateDataFields(telemetryEvent.dataFields);\r\n}\r\nfunction isEventNameValid(eventName) {\r\n if (!eventName || eventName.length > MaxEventNameLength) {\r\n return false;\r\n }\r\n return EventNameRegex.test(eventName);\r\n}\r\nfunction isNameValid(name) {\r\n return AlphanumericRegex.test(name);\r\n}\r\nfunction validateDataFields(dataFields) {\r\n if (!dataFields) {\r\n return;\r\n }\r\n dataFields.forEach(function (dataField) {\r\n if (typeof dataField.name !== 'string' || !isNameValid(dataField.name)) {\r\n throw new Error('Invalid dataField name');\r\n }\r\n if (dataField.dataType === 2 /* DataFieldType.Int64 */) {\r\n validateInt(dataField.value);\r\n }\r\n });\r\n}\r\nexport function validateInt(value) {\r\n if (typeof value !== 'number' || !isFinite(value) || Math.floor(value) !== value || value < INT64_MIN || value > INT64_MAX) {\r\n throw new Error(\"Invalid integer \".concat(JSON.stringify(value)));\r\n }\r\n}\r\n//# sourceMappingURL=TelemetryEventValidator.js.map","export var oteljsVersion = '4.20.30';\r\n//# sourceMappingURL=Version.js.map","import { __assign } from \"tslib\";\r\nimport { fillTenantTokens, setTenantTokens } from './TenantTokenManager';\r\nimport { validateTelemetryEvent } from './TelemetryEventValidator';\r\nimport { logNotification, logError } from './OTelNotifications';\r\nimport { oteljsVersion } from './Version';\r\nimport { makeStringDataField, makeInt64DataField } from './DataFieldHelper';\r\nvar CUSTOMER_CONTENT_VERSION = 2;\r\nvar MAX_EVENT_QUEUE_LENGTH = 1000;\r\n/**\r\n * Use this as the Nexus tenant token when Nexus logging is not needed or relevant\r\n */\r\nexport var SuppressNexus = -1;\r\n/**\r\n * Clone a telemetry event; generally so we don't modify the input telemetry event\r\n * Also initializes telemetryProperties and dataFields if they aren't already set\r\n * @param telemetryEvent - The event to clone\r\n */\r\nexport function cloneEvent(telemetryEvent) {\r\n var localEvent = {\r\n eventName: telemetryEvent.eventName,\r\n eventFlags: telemetryEvent.eventFlags || {},\r\n telemetryProperties: !!telemetryEvent.telemetryProperties ? __assign({}, telemetryEvent.telemetryProperties) : {},\r\n dataFields: !!telemetryEvent.dataFields ? telemetryEvent.dataFields.slice() : [],\r\n timestamp: telemetryEvent.timestamp || new Date().getTime()\r\n };\r\n if (!!telemetryEvent.eventContract) {\r\n localEvent.eventContract = { name: telemetryEvent.eventContract.name, dataFields: telemetryEvent.eventContract.dataFields.slice() };\r\n }\r\n return localEvent;\r\n}\r\n/**\r\n * SimpleTelemetryLogger is the base implementation of a telemetry logger.\r\n * It exposes sendTelemetryEvent, which is used to log a telemetry event.\r\n *\r\n * Add a sink by calling addSink() or modifying the telemetrySinks list.\r\n * If no sinks are attached, it keeps a queue of events, but starts silently\r\n */\r\nvar SimpleTelemetryLogger = /** @class */ (function () {\r\n /**\r\n * Creates a telemetry logger\r\n * @param parent - A parent telemetry logger that this telemetry logger should inherit from\r\n * This telemetry logger will send telemetry to the same sinks\r\n * and will send the same persistent data fields as the parent logger\r\n * @param persistentDataFields - Data fields to send with every event\r\n */\r\n function SimpleTelemetryLogger(parent, persistentDataFields, config) {\r\n var _a, _b, _c;\r\n /**\r\n * A list of sinks that telemetry events will be forwarded to\r\n */\r\n this.telemetrySinks = [];\r\n /**\r\n * @internal Internal variable; do not use publicly.\r\n * 'Data.' will be prepended to each field.\r\n */\r\n this.persistentDataFields = [];\r\n /**\r\n * A list of Part A data fields that should be added to every event. In the 1DS Sink,\r\n * part A data fields will be sent without 'Data.'. On native clients, these fields\r\n * will still get added as 'Data.Foo'.\r\n */\r\n this.partAFields = [];\r\n this.eventQueue = [];\r\n this.config = config || {};\r\n if (parent) {\r\n this.telemetrySinks = parent.telemetrySinks;\r\n (_a = this.persistentDataFields).push.apply(_a, parent.persistentDataFields);\r\n this.config = __assign(__assign({}, parent.getConfig()), this.config);\r\n (_b = this.partAFields).push.apply(_b, parent.partAFields);\r\n }\r\n if (persistentDataFields) {\r\n (_c = this.persistentDataFields).push.apply(_c, persistentDataFields);\r\n }\r\n }\r\n SimpleTelemetryLogger.prototype.addEventContentType = function (dataFields, eventContentType) {\r\n dataFields.push(makeInt64DataField('EventContent.Type', eventContentType));\r\n };\r\n /**\r\n * SendTelemetryEvent is the basic way to send a telemetry event.\r\n * This should be used for sending telemetry about discrete events that happened\r\n * For telemetry that includes duration and/or success/failure, the Activity API may be more appropriate.\r\n * @param telemetryEvent - The telemetry event to send\r\n */\r\n SimpleTelemetryLogger.prototype.sendTelemetryEvent = function (telemetryEvent) {\r\n var clonedEvent = cloneEvent(telemetryEvent);\r\n var telemetryProperties = clonedEvent.telemetryProperties;\r\n // Nexus is no longer supported by OTelJS\r\n telemetryProperties.nexusTenantToken = SuppressNexus;\r\n // If either one is missing, we try to fill both\r\n var ariaTenantToken = telemetryProperties.ariaTenantToken;\r\n if (!ariaTenantToken) {\r\n var success = fillTenantTokens(clonedEvent.eventName, telemetryProperties);\r\n if (!success && !ariaTenantToken) {\r\n logNotification(0 /* LogLevel.Error */, 0 /* Category.Core */, function () { return 'No tenant token: ' + telemetryEvent.eventName; });\r\n return;\r\n }\r\n }\r\n this.sendTelemetryEventInternal(clonedEvent, 1 /* EventType.SendTelemetryEvent */);\r\n };\r\n /**\r\n * Sends a non-standard telemetry event like CustomerContentEvent or DirectNumericEvent\r\n * Note: This method should not be called directly. It is meant for when the SimpleTelemetryLogger is used as a passthrough.\r\n * @param telemetryEvent - The telemetry event to send\r\n * @param eventType - The type of event like CustomerContentEvent or DirectNumericEvent\r\n */\r\n SimpleTelemetryLogger.prototype.sendNonStandardEvent = function (telemetryEvent, eventType) {\r\n var clonedEvent = cloneEvent(telemetryEvent);\r\n this.sendTelemetryEventInternal(clonedEvent, eventType);\r\n };\r\n /**\r\n * Sends customer content to an appropriate compliant endpoint\r\n * @param event - The event to send\r\n * @param customerContentType - The type of customer content\r\n */\r\n SimpleTelemetryLogger.prototype.sendCustomerContent = function (customerContentEvent) {\r\n var clonedEvent = cloneEvent(customerContentEvent);\r\n var telemetryProperties = clonedEvent.telemetryProperties;\r\n var customerContentVersion = telemetryProperties.customerContentVersion;\r\n if (!customerContentVersion || customerContentVersion > CUSTOMER_CONTENT_VERSION) {\r\n telemetryProperties.customerContentVersion = CUSTOMER_CONTENT_VERSION;\r\n }\r\n // Suppress any tenant tokens that were passed in; the event must go to the customer content tenant.\r\n telemetryProperties.ariaTenantToken = undefined;\r\n telemetryProperties.nexusTenantToken = undefined;\r\n telemetryProperties.dnmToken = undefined;\r\n this.addEventContentType(clonedEvent.dataFields, 2 /* ContentType.CustomerContent */);\r\n return this.sendTelemetryEventInternal(clonedEvent, 2 /* EventType.CustomerContent */);\r\n };\r\n /**\r\n * Send a direct numerical measurement to the a DNM tenant\r\n * @param directNumericEvent - the event to send\r\n */\r\n SimpleTelemetryLogger.prototype.sendDirectNumericEvent = function (directNumericEvent) {\r\n var clonedEvent = cloneEvent(directNumericEvent);\r\n var telemetryProperties = clonedEvent.telemetryProperties;\r\n if (!telemetryProperties.dnmToken) {\r\n var success = fillTenantTokens(clonedEvent.eventName, telemetryProperties);\r\n if (!success && !telemetryProperties.dnmToken) {\r\n logNotification(0 /* LogLevel.Error */, 0 /* Category.Core */, function () { return 'No dnm token: ' + clonedEvent.eventName; });\r\n return;\r\n }\r\n }\r\n this.addEventContentType(clonedEvent.dataFields, 1 /* ContentType.AnonymousData */);\r\n this.sendTelemetryEventInternal(clonedEvent, 3 /* EventType.DirectNumericEvent */);\r\n };\r\n /**\r\n * Internal method to send a telemetry event\r\n * @param event - The telemetry event to send.\r\n * Note that it may be a CustomerContentEvent by virtue of having a customerContentVersion and customerContentType.\r\n */\r\n SimpleTelemetryLogger.prototype.sendTelemetryEventInternal = function (telemetryEvent, eventType) {\r\n if (eventType !== 2 /* EventType.CustomerContent */ &&\r\n (telemetryEvent.telemetryProperties.customerContentVersion || telemetryEvent.telemetryProperties.customerContentType)) {\r\n logNotification(0 /* LogLevel.Error */, 0 /* Category.Core */, function () { return 'Customer content'; });\r\n return;\r\n }\r\n try {\r\n if (this.telemetrySinks.length === 0) {\r\n if (this.config.enableQueue && this.eventQueue.length < MAX_EVENT_QUEUE_LENGTH) {\r\n this.eventQueue.push([telemetryEvent, eventType]);\r\n }\r\n else {\r\n logNotification(1 /* LogLevel.Warning */, 0 /* Category.Core */, function () { return 'No telemetry sinks are attached.'; });\r\n }\r\n return;\r\n }\r\n this.processTelemetryEvent(telemetryEvent, eventType);\r\n }\r\n catch (error) {\r\n logError(0 /* Category.Core */, 'SendTelemetryEvent', error);\r\n return;\r\n }\r\n this.telemetrySinks.forEach(function (telemetrySink) {\r\n try {\r\n if (eventType === 3 /* EventType.DirectNumericEvent */ || eventType === 2 /* EventType.CustomerContent */) {\r\n if (telemetrySink.sendNonStandardEvent) {\r\n telemetrySink.sendNonStandardEvent(telemetryEvent, eventType);\r\n }\r\n }\r\n else {\r\n telemetrySink.sendTelemetryEvent(telemetryEvent);\r\n }\r\n }\r\n catch (_e) {\r\n // Sinks should handle their own errors;\r\n }\r\n });\r\n };\r\n /**\r\n * Processes a telemetry event, but does not send it\r\n * Adds persistent data fields\r\n * Validates the event\r\n * Throws if the event is invalid\r\n * @param telemetryEvent - The telemetry event to process\r\n */\r\n SimpleTelemetryLogger.prototype.processTelemetryEvent = function (telemetryEvent, eventType) {\r\n var _a, _b;\r\n var _c;\r\n // The last-added data field wins, if the same-named data field is added more than once.\r\n // Persistent data fields should have lower priority than per-event data fields\r\n if (telemetryEvent.dataFields) {\r\n (_c = telemetryEvent.dataFields) === null || _c === void 0 ? void 0 : _c.unshift(makeStringDataField('OTelJS.Version', oteljsVersion));\r\n // Do not add logger persistent data fields to DNM events\r\n // All Part C fields should be explicitly added\r\n if (eventType !== 3 /* EventType.DirectNumericEvent */ && this.persistentDataFields) {\r\n (_a = telemetryEvent.dataFields).unshift.apply(_a, this.persistentDataFields);\r\n }\r\n }\r\n if (this.partAFields.length > 0) {\r\n var eventContract = telemetryEvent.eventContract || {\r\n name: '',\r\n dataFields: []\r\n };\r\n (_b = eventContract.dataFields).push.apply(_b, this.partAFields);\r\n telemetryEvent.eventContract = eventContract;\r\n }\r\n if (!this.config.disableValidation) {\r\n validateTelemetryEvent(telemetryEvent);\r\n }\r\n };\r\n /**\r\n * Adds a telemetry sink, to which events will be sent\r\n * @param sink - The telemetry sink to add\r\n */\r\n SimpleTelemetryLogger.prototype.addSink = function (sink) {\r\n this.telemetrySinks.push(sink);\r\n this.flushQueue();\r\n };\r\n /**\r\n * Flush the queue of telemetry events that were accumulated before a sink was attached.\r\n * The queue is emptied whether or not a sink is attached.\r\n *\r\n * Note that all events are sent at once. If an event throttler is enabled on a telemetry sink,\r\n * it may be triggered; you may choose to only connect the event throttler after flushing the queue.\r\n */\r\n SimpleTelemetryLogger.prototype.flushQueue = function () {\r\n var eventQueue = this.eventQueue;\r\n this.eventQueue = [];\r\n if (this.telemetrySinks.length > 0) {\r\n for (var _i = 0, eventQueue_1 = eventQueue; _i < eventQueue_1.length; _i++) {\r\n var _a = eventQueue_1[_i], telemetryEvent = _a[0], eventType = _a[1];\r\n this.sendTelemetryEventInternal(telemetryEvent, eventType);\r\n }\r\n }\r\n };\r\n /**\r\n * Sets a tenant token for a single namespace. Events within the namespace will be sent to the corresponding tenant.\r\n * @param namespace - The namespace to which the tokens apply, such as Office.System.\r\n * @param ariaTenantToken - The Aria tenant token\r\n * @param nexusTenantToken - The Nexus tenant token\r\n */\r\n SimpleTelemetryLogger.prototype.setTenantToken = function (namespace, ariaTenantToken, nexusTenantToken) {\r\n setTenantTokens(namespace, { ariaTenantToken: ariaTenantToken, nexusTenantToken: nexusTenantToken });\r\n };\r\n /**\r\n * Sets a tenant token for a single namespace for DNM. Events within the namespace will be sent to the corresponding tenant.\r\n * @param namespace - The namespace to which the tokens apply, such as Office.System.\r\n * @param dnmToken - The Aria tenant token for direct numerical measurement events\r\n */\r\n SimpleTelemetryLogger.prototype.setDNMToken = function (namespace, dnmToken) {\r\n setTenantTokens(namespace, { dnmToken: dnmToken });\r\n };\r\n /**\r\n * Clone a telemetry event; generally so we don't modify the input telemetry event\r\n * Also sets dataFields to [] if it isn't already set\r\n * @param telemetryEvent - The event to clone\r\n */\r\n SimpleTelemetryLogger.prototype.cloneEvent = function (telemetryEvent) {\r\n return cloneEvent(telemetryEvent);\r\n };\r\n /**\r\n * Gets the currently applied configuration\r\n */\r\n SimpleTelemetryLogger.prototype.getConfig = function () {\r\n return this.config;\r\n };\r\n return SimpleTelemetryLogger;\r\n}());\r\nexport { SimpleTelemetryLogger };\r\n//# sourceMappingURL=SimpleTelemetryLogger.js.map","// Currently in sync with Node.js lib/assert.js\n// https://github.com/nodejs/node/commit/2a51ae424a513ec9a6aa3466baa0cc1d55dd4f3b\n\n// Originally from narwhal.js (http://narwhaljs.org)\n// Copyright (c) 2009 Thomas Robinson <280north.com>\n//\n// Permission is hereby granted, free of charge, to any person obtaining a copy\n// of this software and associated documentation files (the 'Software'), to\n// deal in the Software without restriction, including without limitation the\n// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n// sell copies of the Software, and to permit persons to whom the Software is\n// furnished to do so, subject to the following conditions:\n//\n// The above copyright notice and this permission notice shall be included in\n// all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n// AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN\n// ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\n// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nvar _require = require('./internal/errors'),\n _require$codes = _require.codes,\n ERR_AMBIGUOUS_ARGUMENT = _require$codes.ERR_AMBIGUOUS_ARGUMENT,\n ERR_INVALID_ARG_TYPE = _require$codes.ERR_INVALID_ARG_TYPE,\n ERR_INVALID_ARG_VALUE = _require$codes.ERR_INVALID_ARG_VALUE,\n ERR_INVALID_RETURN_VALUE = _require$codes.ERR_INVALID_RETURN_VALUE,\n ERR_MISSING_ARGS = _require$codes.ERR_MISSING_ARGS;\nvar AssertionError = require('./internal/assert/assertion_error');\nvar _require2 = require('util/'),\n inspect = _require2.inspect;\nvar _require$types = require('util/').types,\n isPromise = _require$types.isPromise,\n isRegExp = _require$types.isRegExp;\nvar objectAssign = require('object.assign/polyfill')();\nvar objectIs = require('object-is/polyfill')();\nvar RegExpPrototypeTest = require('call-bind/callBound')('RegExp.prototype.test');\nvar errorCache = new Map();\nvar isDeepEqual;\nvar isDeepStrictEqual;\nvar parseExpressionAt;\nvar findNodeAround;\nvar decoder;\nfunction lazyLoadComparison() {\n var comparison = require('./internal/util/comparisons');\n isDeepEqual = comparison.isDeepEqual;\n isDeepStrictEqual = comparison.isDeepStrictEqual;\n}\n\n// Escape control characters but not \\n and \\t to keep the line breaks and\n// indentation intact.\n// eslint-disable-next-line no-control-regex\nvar escapeSequencesRegExp = /[\\x00-\\x08\\x0b\\x0c\\x0e-\\x1f]/g;\nvar meta = [\"\\\\u0000\", \"\\\\u0001\", \"\\\\u0002\", \"\\\\u0003\", \"\\\\u0004\", \"\\\\u0005\", \"\\\\u0006\", \"\\\\u0007\", '\\\\b', '', '', \"\\\\u000b\", '\\\\f', '', \"\\\\u000e\", \"\\\\u000f\", \"\\\\u0010\", \"\\\\u0011\", \"\\\\u0012\", \"\\\\u0013\", \"\\\\u0014\", \"\\\\u0015\", \"\\\\u0016\", \"\\\\u0017\", \"\\\\u0018\", \"\\\\u0019\", \"\\\\u001a\", \"\\\\u001b\", \"\\\\u001c\", \"\\\\u001d\", \"\\\\u001e\", \"\\\\u001f\"];\nvar escapeFn = function escapeFn(str) {\n return meta[str.charCodeAt(0)];\n};\nvar warned = false;\n\n// The assert module provides functions that throw\n// AssertionError's when particular conditions are not met. The\n// assert module must conform to the following interface.\n\nvar assert = module.exports = ok;\nvar NO_EXCEPTION_SENTINEL = {};\n\n// All of the following functions must throw an AssertionError\n// when a corresponding condition is not met, with a message that\n// may be undefined if not provided. All assertion methods provide\n// both the actual and expected values to the assertion error for\n// display purposes.\n\nfunction innerFail(obj) {\n if (obj.message instanceof Error) throw obj.message;\n throw new AssertionError(obj);\n}\nfunction fail(actual, expected, message, operator, stackStartFn) {\n var argsLen = arguments.length;\n var internalMessage;\n if (argsLen === 0) {\n internalMessage = 'Failed';\n } else if (argsLen === 1) {\n message = actual;\n actual = undefined;\n } else {\n if (warned === false) {\n warned = true;\n var warn = process.emitWarning ? process.emitWarning : console.warn.bind(console);\n warn('assert.fail() with more than one argument is deprecated. ' + 'Please use assert.strictEqual() instead or only pass a message.', 'DeprecationWarning', 'DEP0094');\n }\n if (argsLen === 2) operator = '!=';\n }\n if (message instanceof Error) throw message;\n var errArgs = {\n actual: actual,\n expected: expected,\n operator: operator === undefined ? 'fail' : operator,\n stackStartFn: stackStartFn || fail\n };\n if (message !== undefined) {\n errArgs.message = message;\n }\n var err = new AssertionError(errArgs);\n if (internalMessage) {\n err.message = internalMessage;\n err.generatedMessage = true;\n }\n throw err;\n}\nassert.fail = fail;\n\n// The AssertionError is defined in internal/error.\nassert.AssertionError = AssertionError;\nfunction innerOk(fn, argLen, value, message) {\n if (!value) {\n var generatedMessage = false;\n if (argLen === 0) {\n generatedMessage = true;\n message = 'No value argument passed to `assert.ok()`';\n } else if (message instanceof Error) {\n throw message;\n }\n var err = new AssertionError({\n actual: value,\n expected: true,\n message: message,\n operator: '==',\n stackStartFn: fn\n });\n err.generatedMessage = generatedMessage;\n throw err;\n }\n}\n\n// Pure assertion tests whether a value is truthy, as determined\n// by !!value.\nfunction ok() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n innerOk.apply(void 0, [ok, args.length].concat(args));\n}\nassert.ok = ok;\n\n// The equality assertion tests shallow, coercive equality with ==.\n/* eslint-disable no-restricted-properties */\nassert.equal = function equal(actual, expected, message) {\n if (arguments.length < 2) {\n throw new ERR_MISSING_ARGS('actual', 'expected');\n }\n // eslint-disable-next-line eqeqeq\n if (actual != expected) {\n innerFail({\n actual: actual,\n expected: expected,\n message: message,\n operator: '==',\n stackStartFn: equal\n });\n }\n};\n\n// The non-equality assertion tests for whether two objects are not\n// equal with !=.\nassert.notEqual = function notEqual(actual, expected, message) {\n if (arguments.length < 2) {\n throw new ERR_MISSING_ARGS('actual', 'expected');\n }\n // eslint-disable-next-line eqeqeq\n if (actual == expected) {\n innerFail({\n actual: actual,\n expected: expected,\n message: message,\n operator: '!=',\n stackStartFn: notEqual\n });\n }\n};\n\n// The equivalence assertion tests a deep equality relation.\nassert.deepEqual = function deepEqual(actual, expected, message) {\n if (arguments.length < 2) {\n throw new ERR_MISSING_ARGS('actual', 'expected');\n }\n if (isDeepEqual === undefined) lazyLoadComparison();\n if (!isDeepEqual(actual, expected)) {\n innerFail({\n actual: actual,\n expected: expected,\n message: message,\n operator: 'deepEqual',\n stackStartFn: deepEqual\n });\n }\n};\n\n// The non-equivalence assertion tests for any deep inequality.\nassert.notDeepEqual = function notDeepEqual(actual, expected, message) {\n if (arguments.length < 2) {\n throw new ERR_MISSING_ARGS('actual', 'expected');\n }\n if (isDeepEqual === undefined) lazyLoadComparison();\n if (isDeepEqual(actual, expected)) {\n innerFail({\n actual: actual,\n expected: expected,\n message: message,\n operator: 'notDeepEqual',\n stackStartFn: notDeepEqual\n });\n }\n};\n/* eslint-enable */\n\nassert.deepStrictEqual = function deepStrictEqual(actual, expected, message) {\n if (arguments.length < 2) {\n throw new ERR_MISSING_ARGS('actual', 'expected');\n }\n if (isDeepEqual === undefined) lazyLoadComparison();\n if (!isDeepStrictEqual(actual, expected)) {\n innerFail({\n actual: actual,\n expected: expected,\n message: message,\n operator: 'deepStrictEqual',\n stackStartFn: deepStrictEqual\n });\n }\n};\nassert.notDeepStrictEqual = notDeepStrictEqual;\nfunction notDeepStrictEqual(actual, expected, message) {\n if (arguments.length < 2) {\n throw new ERR_MISSING_ARGS('actual', 'expected');\n }\n if (isDeepEqual === undefined) lazyLoadComparison();\n if (isDeepStrictEqual(actual, expected)) {\n innerFail({\n actual: actual,\n expected: expected,\n message: message,\n operator: 'notDeepStrictEqual',\n stackStartFn: notDeepStrictEqual\n });\n }\n}\nassert.strictEqual = function strictEqual(actual, expected, message) {\n if (arguments.length < 2) {\n throw new ERR_MISSING_ARGS('actual', 'expected');\n }\n if (!objectIs(actual, expected)) {\n innerFail({\n actual: actual,\n expected: expected,\n message: message,\n operator: 'strictEqual',\n stackStartFn: strictEqual\n });\n }\n};\nassert.notStrictEqual = function notStrictEqual(actual, expected, message) {\n if (arguments.length < 2) {\n throw new ERR_MISSING_ARGS('actual', 'expected');\n }\n if (objectIs(actual, expected)) {\n innerFail({\n actual: actual,\n expected: expected,\n message: message,\n operator: 'notStrictEqual',\n stackStartFn: notStrictEqual\n });\n }\n};\nvar Comparison = /*#__PURE__*/_createClass(function Comparison(obj, keys, actual) {\n var _this = this;\n _classCallCheck(this, Comparison);\n keys.forEach(function (key) {\n if (key in obj) {\n if (actual !== undefined && typeof actual[key] === 'string' && isRegExp(obj[key]) && RegExpPrototypeTest(obj[key], actual[key])) {\n _this[key] = actual[key];\n } else {\n _this[key] = obj[key];\n }\n }\n });\n});\nfunction compareExceptionKey(actual, expected, key, message, keys, fn) {\n if (!(key in actual) || !isDeepStrictEqual(actual[key], expected[key])) {\n if (!message) {\n // Create placeholder objects to create a nice output.\n var a = new Comparison(actual, keys);\n var b = new Comparison(expected, keys, actual);\n var err = new AssertionError({\n actual: a,\n expected: b,\n operator: 'deepStrictEqual',\n stackStartFn: fn\n });\n err.actual = actual;\n err.expected = expected;\n err.operator = fn.name;\n throw err;\n }\n innerFail({\n actual: actual,\n expected: expected,\n message: message,\n operator: fn.name,\n stackStartFn: fn\n });\n }\n}\nfunction expectedException(actual, expected, msg, fn) {\n if (typeof expected !== 'function') {\n if (isRegExp(expected)) return RegExpPrototypeTest(expected, actual);\n // assert.doesNotThrow does not accept objects.\n if (arguments.length === 2) {\n throw new ERR_INVALID_ARG_TYPE('expected', ['Function', 'RegExp'], expected);\n }\n\n // Handle primitives properly.\n if (_typeof(actual) !== 'object' || actual === null) {\n var err = new AssertionError({\n actual: actual,\n expected: expected,\n message: msg,\n operator: 'deepStrictEqual',\n stackStartFn: fn\n });\n err.operator = fn.name;\n throw err;\n }\n var keys = Object.keys(expected);\n // Special handle errors to make sure the name and the message are compared\n // as well.\n if (expected instanceof Error) {\n keys.push('name', 'message');\n } else if (keys.length === 0) {\n throw new ERR_INVALID_ARG_VALUE('error', expected, 'may not be an empty object');\n }\n if (isDeepEqual === undefined) lazyLoadComparison();\n keys.forEach(function (key) {\n if (typeof actual[key] === 'string' && isRegExp(expected[key]) && RegExpPrototypeTest(expected[key], actual[key])) {\n return;\n }\n compareExceptionKey(actual, expected, key, msg, keys, fn);\n });\n return true;\n }\n // Guard instanceof against arrow functions as they don't have a prototype.\n if (expected.prototype !== undefined && actual instanceof expected) {\n return true;\n }\n if (Error.isPrototypeOf(expected)) {\n return false;\n }\n return expected.call({}, actual) === true;\n}\nfunction getActual(fn) {\n if (typeof fn !== 'function') {\n throw new ERR_INVALID_ARG_TYPE('fn', 'Function', fn);\n }\n try {\n fn();\n } catch (e) {\n return e;\n }\n return NO_EXCEPTION_SENTINEL;\n}\nfunction checkIsPromise(obj) {\n // Accept native ES6 promises and promises that are implemented in a similar\n // way. Do not accept thenables that use a function as `obj` and that have no\n // `catch` handler.\n\n // TODO: thenables are checked up until they have the correct methods,\n // but according to documentation, the `then` method should receive\n // the `fulfill` and `reject` arguments as well or it may be never resolved.\n\n return isPromise(obj) || obj !== null && _typeof(obj) === 'object' && typeof obj.then === 'function' && typeof obj.catch === 'function';\n}\nfunction waitForActual(promiseFn) {\n return Promise.resolve().then(function () {\n var resultPromise;\n if (typeof promiseFn === 'function') {\n // Return a rejected promise if `promiseFn` throws synchronously.\n resultPromise = promiseFn();\n // Fail in case no promise is returned.\n if (!checkIsPromise(resultPromise)) {\n throw new ERR_INVALID_RETURN_VALUE('instance of Promise', 'promiseFn', resultPromise);\n }\n } else if (checkIsPromise(promiseFn)) {\n resultPromise = promiseFn;\n } else {\n throw new ERR_INVALID_ARG_TYPE('promiseFn', ['Function', 'Promise'], promiseFn);\n }\n return Promise.resolve().then(function () {\n return resultPromise;\n }).then(function () {\n return NO_EXCEPTION_SENTINEL;\n }).catch(function (e) {\n return e;\n });\n });\n}\nfunction expectsError(stackStartFn, actual, error, message) {\n if (typeof error === 'string') {\n if (arguments.length === 4) {\n throw new ERR_INVALID_ARG_TYPE('error', ['Object', 'Error', 'Function', 'RegExp'], error);\n }\n if (_typeof(actual) === 'object' && actual !== null) {\n if (actual.message === error) {\n throw new ERR_AMBIGUOUS_ARGUMENT('error/message', \"The error message \\\"\".concat(actual.message, \"\\\" is identical to the message.\"));\n }\n } else if (actual === error) {\n throw new ERR_AMBIGUOUS_ARGUMENT('error/message', \"The error \\\"\".concat(actual, \"\\\" is identical to the message.\"));\n }\n message = error;\n error = undefined;\n } else if (error != null && _typeof(error) !== 'object' && typeof error !== 'function') {\n throw new ERR_INVALID_ARG_TYPE('error', ['Object', 'Error', 'Function', 'RegExp'], error);\n }\n if (actual === NO_EXCEPTION_SENTINEL) {\n var details = '';\n if (error && error.name) {\n details += \" (\".concat(error.name, \")\");\n }\n details += message ? \": \".concat(message) : '.';\n var fnType = stackStartFn.name === 'rejects' ? 'rejection' : 'exception';\n innerFail({\n actual: undefined,\n expected: error,\n operator: stackStartFn.name,\n message: \"Missing expected \".concat(fnType).concat(details),\n stackStartFn: stackStartFn\n });\n }\n if (error && !expectedException(actual, error, message, stackStartFn)) {\n throw actual;\n }\n}\nfunction expectsNoError(stackStartFn, actual, error, message) {\n if (actual === NO_EXCEPTION_SENTINEL) return;\n if (typeof error === 'string') {\n message = error;\n error = undefined;\n }\n if (!error || expectedException(actual, error)) {\n var details = message ? \": \".concat(message) : '.';\n var fnType = stackStartFn.name === 'doesNotReject' ? 'rejection' : 'exception';\n innerFail({\n actual: actual,\n expected: error,\n operator: stackStartFn.name,\n message: \"Got unwanted \".concat(fnType).concat(details, \"\\n\") + \"Actual message: \\\"\".concat(actual && actual.message, \"\\\"\"),\n stackStartFn: stackStartFn\n });\n }\n throw actual;\n}\nassert.throws = function throws(promiseFn) {\n for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n args[_key2 - 1] = arguments[_key2];\n }\n expectsError.apply(void 0, [throws, getActual(promiseFn)].concat(args));\n};\nassert.rejects = function rejects(promiseFn) {\n for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {\n args[_key3 - 1] = arguments[_key3];\n }\n return waitForActual(promiseFn).then(function (result) {\n return expectsError.apply(void 0, [rejects, result].concat(args));\n });\n};\nassert.doesNotThrow = function doesNotThrow(fn) {\n for (var _len4 = arguments.length, args = new Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) {\n args[_key4 - 1] = arguments[_key4];\n }\n expectsNoError.apply(void 0, [doesNotThrow, getActual(fn)].concat(args));\n};\nassert.doesNotReject = function doesNotReject(fn) {\n for (var _len5 = arguments.length, args = new Array(_len5 > 1 ? _len5 - 1 : 0), _key5 = 1; _key5 < _len5; _key5++) {\n args[_key5 - 1] = arguments[_key5];\n }\n return waitForActual(fn).then(function (result) {\n return expectsNoError.apply(void 0, [doesNotReject, result].concat(args));\n });\n};\nassert.ifError = function ifError(err) {\n if (err !== null && err !== undefined) {\n var message = 'ifError got unwanted exception: ';\n if (_typeof(err) === 'object' && typeof err.message === 'string') {\n if (err.message.length === 0 && err.constructor) {\n message += err.constructor.name;\n } else {\n message += err.message;\n }\n } else {\n message += inspect(err);\n }\n var newErr = new AssertionError({\n actual: err,\n expected: null,\n operator: 'ifError',\n message: message,\n stackStartFn: ifError\n });\n\n // Make sure we actually have a stack trace!\n var origStack = err.stack;\n if (typeof origStack === 'string') {\n // This will remove any duplicated frames from the error frames taken\n // from within `ifError` and add the original error frames to the newly\n // created ones.\n var tmp2 = origStack.split('\\n');\n tmp2.shift();\n // Filter all frames existing in err.stack.\n var tmp1 = newErr.stack.split('\\n');\n for (var i = 0; i < tmp2.length; i++) {\n // Find the first occurrence of the frame.\n var pos = tmp1.indexOf(tmp2[i]);\n if (pos !== -1) {\n // Only keep new frames.\n tmp1 = tmp1.slice(0, pos);\n break;\n }\n }\n newErr.stack = \"\".concat(tmp1.join('\\n'), \"\\n\").concat(tmp2.join('\\n'));\n }\n throw newErr;\n }\n};\n\n// Currently in sync with Node.js lib/assert.js\n// https://github.com/nodejs/node/commit/2a871df3dfb8ea663ef5e1f8f62701ec51384ecb\nfunction internalMatch(string, regexp, message, fn, fnName) {\n if (!isRegExp(regexp)) {\n throw new ERR_INVALID_ARG_TYPE('regexp', 'RegExp', regexp);\n }\n var match = fnName === 'match';\n if (typeof string !== 'string' || RegExpPrototypeTest(regexp, string) !== match) {\n if (message instanceof Error) {\n throw message;\n }\n var generatedMessage = !message;\n\n // 'The input was expected to not match the regular expression ' +\n message = message || (typeof string !== 'string' ? 'The \"string\" argument must be of type string. Received type ' + \"\".concat(_typeof(string), \" (\").concat(inspect(string), \")\") : (match ? 'The input did not match the regular expression ' : 'The input was expected to not match the regular expression ') + \"\".concat(inspect(regexp), \". Input:\\n\\n\").concat(inspect(string), \"\\n\"));\n var err = new AssertionError({\n actual: string,\n expected: regexp,\n message: message,\n operator: fnName,\n stackStartFn: fn\n });\n err.generatedMessage = generatedMessage;\n throw err;\n }\n}\nassert.match = function match(string, regexp, message) {\n internalMatch(string, regexp, message, match, 'match');\n};\nassert.doesNotMatch = function doesNotMatch(string, regexp, message) {\n internalMatch(string, regexp, message, doesNotMatch, 'doesNotMatch');\n};\n\n// Expose a strict only variant of assert\nfunction strict() {\n for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {\n args[_key6] = arguments[_key6];\n }\n innerOk.apply(void 0, [strict, args.length].concat(args));\n}\nassert.strict = objectAssign(strict, assert, {\n equal: assert.strictEqual,\n deepEqual: assert.deepStrictEqual,\n notEqual: assert.notStrictEqual,\n notDeepEqual: assert.notDeepStrictEqual\n});\nassert.strict.strict = assert.strict;","// Currently in sync with Node.js lib/internal/assert/assertion_error.js\n// https://github.com/nodejs/node/commit/0817840f775032169ddd70c85ac059f18ffcc81c\n\n'use strict';\n\nfunction ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }\nfunction _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }\nfunction _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _wrapNativeSuper(Class) { var _cache = typeof Map === \"function\" ? new Map() : undefined; _wrapNativeSuper = function _wrapNativeSuper(Class) { if (Class === null || !_isNativeFunction(Class)) return Class; if (typeof Class !== \"function\") { throw new TypeError(\"Super expression must either be null or a function\"); } if (typeof _cache !== \"undefined\") { if (_cache.has(Class)) return _cache.get(Class); _cache.set(Class, Wrapper); } function Wrapper() { return _construct(Class, arguments, _getPrototypeOf(this).constructor); } Wrapper.prototype = Object.create(Class.prototype, { constructor: { value: Wrapper, enumerable: false, writable: true, configurable: true } }); return _setPrototypeOf(Wrapper, Class); }; return _wrapNativeSuper(Class); }\nfunction _construct(Parent, args, Class) { if (_isNativeReflectConstruct()) { _construct = Reflect.construct.bind(); } else { _construct = function _construct(Parent, args, Class) { var a = [null]; a.push.apply(a, args); var Constructor = Function.bind.apply(Parent, a); var instance = new Constructor(); if (Class) _setPrototypeOf(instance, Class.prototype); return instance; }; } return _construct.apply(null, arguments); }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _isNativeFunction(fn) { return Function.toString.call(fn).indexOf(\"[native code]\") !== -1; }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nvar _require = require('util/'),\n inspect = _require.inspect;\nvar _require2 = require('../errors'),\n ERR_INVALID_ARG_TYPE = _require2.codes.ERR_INVALID_ARG_TYPE;\n\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/endsWith\nfunction endsWith(str, search, this_len) {\n if (this_len === undefined || this_len > str.length) {\n this_len = str.length;\n }\n return str.substring(this_len - search.length, this_len) === search;\n}\n\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/repeat\nfunction repeat(str, count) {\n count = Math.floor(count);\n if (str.length == 0 || count == 0) return '';\n var maxCount = str.length * count;\n count = Math.floor(Math.log(count) / Math.log(2));\n while (count) {\n str += str;\n count--;\n }\n str += str.substring(0, maxCount - str.length);\n return str;\n}\nvar blue = '';\nvar green = '';\nvar red = '';\nvar white = '';\nvar kReadableOperator = {\n deepStrictEqual: 'Expected values to be strictly deep-equal:',\n strictEqual: 'Expected values to be strictly equal:',\n strictEqualObject: 'Expected \"actual\" to be reference-equal to \"expected\":',\n deepEqual: 'Expected values to be loosely deep-equal:',\n equal: 'Expected values to be loosely equal:',\n notDeepStrictEqual: 'Expected \"actual\" not to be strictly deep-equal to:',\n notStrictEqual: 'Expected \"actual\" to be strictly unequal to:',\n notStrictEqualObject: 'Expected \"actual\" not to be reference-equal to \"expected\":',\n notDeepEqual: 'Expected \"actual\" not to be loosely deep-equal to:',\n notEqual: 'Expected \"actual\" to be loosely unequal to:',\n notIdentical: 'Values identical but not reference-equal:'\n};\n\n// Comparing short primitives should just show === / !== instead of using the\n// diff.\nvar kMaxShortLength = 10;\nfunction copyError(source) {\n var keys = Object.keys(source);\n var target = Object.create(Object.getPrototypeOf(source));\n keys.forEach(function (key) {\n target[key] = source[key];\n });\n Object.defineProperty(target, 'message', {\n value: source.message\n });\n return target;\n}\nfunction inspectValue(val) {\n // The util.inspect default values could be changed. This makes sure the\n // error messages contain the necessary information nevertheless.\n return inspect(val, {\n compact: false,\n customInspect: false,\n depth: 1000,\n maxArrayLength: Infinity,\n // Assert compares only enumerable properties (with a few exceptions).\n showHidden: false,\n // Having a long line as error is better than wrapping the line for\n // comparison for now.\n // TODO(BridgeAR): `breakLength` should be limited as soon as soon as we\n // have meta information about the inspected properties (i.e., know where\n // in what line the property starts and ends).\n breakLength: Infinity,\n // Assert does not detect proxies currently.\n showProxy: false,\n sorted: true,\n // Inspect getters as we also check them when comparing entries.\n getters: true\n });\n}\nfunction createErrDiff(actual, expected, operator) {\n var other = '';\n var res = '';\n var lastPos = 0;\n var end = '';\n var skipped = false;\n var actualInspected = inspectValue(actual);\n var actualLines = actualInspected.split('\\n');\n var expectedLines = inspectValue(expected).split('\\n');\n var i = 0;\n var indicator = '';\n\n // In case both values are objects explicitly mark them as not reference equal\n // for the `strictEqual` operator.\n if (operator === 'strictEqual' && _typeof(actual) === 'object' && _typeof(expected) === 'object' && actual !== null && expected !== null) {\n operator = 'strictEqualObject';\n }\n\n // If \"actual\" and \"expected\" fit on a single line and they are not strictly\n // equal, check further special handling.\n if (actualLines.length === 1 && expectedLines.length === 1 && actualLines[0] !== expectedLines[0]) {\n var inputLength = actualLines[0].length + expectedLines[0].length;\n // If the character length of \"actual\" and \"expected\" together is less than\n // kMaxShortLength and if neither is an object and at least one of them is\n // not `zero`, use the strict equal comparison to visualize the output.\n if (inputLength <= kMaxShortLength) {\n if ((_typeof(actual) !== 'object' || actual === null) && (_typeof(expected) !== 'object' || expected === null) && (actual !== 0 || expected !== 0)) {\n // -0 === +0\n return \"\".concat(kReadableOperator[operator], \"\\n\\n\") + \"\".concat(actualLines[0], \" !== \").concat(expectedLines[0], \"\\n\");\n }\n } else if (operator !== 'strictEqualObject') {\n // If the stderr is a tty and the input length is lower than the current\n // columns per line, add a mismatch indicator below the output. If it is\n // not a tty, use a default value of 80 characters.\n var maxLength = process.stderr && process.stderr.isTTY ? process.stderr.columns : 80;\n if (inputLength < maxLength) {\n while (actualLines[0][i] === expectedLines[0][i]) {\n i++;\n }\n // Ignore the first characters.\n if (i > 2) {\n // Add position indicator for the first mismatch in case it is a\n // single line and the input length is less than the column length.\n indicator = \"\\n \".concat(repeat(' ', i), \"^\");\n i = 0;\n }\n }\n }\n }\n\n // Remove all ending lines that match (this optimizes the output for\n // readability by reducing the number of total changed lines).\n var a = actualLines[actualLines.length - 1];\n var b = expectedLines[expectedLines.length - 1];\n while (a === b) {\n if (i++ < 2) {\n end = \"\\n \".concat(a).concat(end);\n } else {\n other = a;\n }\n actualLines.pop();\n expectedLines.pop();\n if (actualLines.length === 0 || expectedLines.length === 0) break;\n a = actualLines[actualLines.length - 1];\n b = expectedLines[expectedLines.length - 1];\n }\n var maxLines = Math.max(actualLines.length, expectedLines.length);\n // Strict equal with identical objects that are not identical by reference.\n // E.g., assert.deepStrictEqual({ a: Symbol() }, { a: Symbol() })\n if (maxLines === 0) {\n // We have to get the result again. The lines were all removed before.\n var _actualLines = actualInspected.split('\\n');\n\n // Only remove lines in case it makes sense to collapse those.\n // TODO: Accept env to always show the full error.\n if (_actualLines.length > 30) {\n _actualLines[26] = \"\".concat(blue, \"...\").concat(white);\n while (_actualLines.length > 27) {\n _actualLines.pop();\n }\n }\n return \"\".concat(kReadableOperator.notIdentical, \"\\n\\n\").concat(_actualLines.join('\\n'), \"\\n\");\n }\n if (i > 3) {\n end = \"\\n\".concat(blue, \"...\").concat(white).concat(end);\n skipped = true;\n }\n if (other !== '') {\n end = \"\\n \".concat(other).concat(end);\n other = '';\n }\n var printedLines = 0;\n var msg = kReadableOperator[operator] + \"\\n\".concat(green, \"+ actual\").concat(white, \" \").concat(red, \"- expected\").concat(white);\n var skippedMsg = \" \".concat(blue, \"...\").concat(white, \" Lines skipped\");\n for (i = 0; i < maxLines; i++) {\n // Only extra expected lines exist\n var cur = i - lastPos;\n if (actualLines.length < i + 1) {\n // If the last diverging line is more than one line above and the\n // current line is at least line three, add some of the former lines and\n // also add dots to indicate skipped entries.\n if (cur > 1 && i > 2) {\n if (cur > 4) {\n res += \"\\n\".concat(blue, \"...\").concat(white);\n skipped = true;\n } else if (cur > 3) {\n res += \"\\n \".concat(expectedLines[i - 2]);\n printedLines++;\n }\n res += \"\\n \".concat(expectedLines[i - 1]);\n printedLines++;\n }\n // Mark the current line as the last diverging one.\n lastPos = i;\n // Add the expected line to the cache.\n other += \"\\n\".concat(red, \"-\").concat(white, \" \").concat(expectedLines[i]);\n printedLines++;\n // Only extra actual lines exist\n } else if (expectedLines.length < i + 1) {\n // If the last diverging line is more than one line above and the\n // current line is at least line three, add some of the former lines and\n // also add dots to indicate skipped entries.\n if (cur > 1 && i > 2) {\n if (cur > 4) {\n res += \"\\n\".concat(blue, \"...\").concat(white);\n skipped = true;\n } else if (cur > 3) {\n res += \"\\n \".concat(actualLines[i - 2]);\n printedLines++;\n }\n res += \"\\n \".concat(actualLines[i - 1]);\n printedLines++;\n }\n // Mark the current line as the last diverging one.\n lastPos = i;\n // Add the actual line to the result.\n res += \"\\n\".concat(green, \"+\").concat(white, \" \").concat(actualLines[i]);\n printedLines++;\n // Lines diverge\n } else {\n var expectedLine = expectedLines[i];\n var actualLine = actualLines[i];\n // If the lines diverge, specifically check for lines that only diverge by\n // a trailing comma. In that case it is actually identical and we should\n // mark it as such.\n var divergingLines = actualLine !== expectedLine && (!endsWith(actualLine, ',') || actualLine.slice(0, -1) !== expectedLine);\n // If the expected line has a trailing comma but is otherwise identical,\n // add a comma at the end of the actual line. Otherwise the output could\n // look weird as in:\n //\n // [\n // 1 // No comma at the end!\n // + 2\n // ]\n //\n if (divergingLines && endsWith(expectedLine, ',') && expectedLine.slice(0, -1) === actualLine) {\n divergingLines = false;\n actualLine += ',';\n }\n if (divergingLines) {\n // If the last diverging line is more than one line above and the\n // current line is at least line three, add some of the former lines and\n // also add dots to indicate skipped entries.\n if (cur > 1 && i > 2) {\n if (cur > 4) {\n res += \"\\n\".concat(blue, \"...\").concat(white);\n skipped = true;\n } else if (cur > 3) {\n res += \"\\n \".concat(actualLines[i - 2]);\n printedLines++;\n }\n res += \"\\n \".concat(actualLines[i - 1]);\n printedLines++;\n }\n // Mark the current line as the last diverging one.\n lastPos = i;\n // Add the actual line to the result and cache the expected diverging\n // line so consecutive diverging lines show up as +++--- and not +-+-+-.\n res += \"\\n\".concat(green, \"+\").concat(white, \" \").concat(actualLine);\n other += \"\\n\".concat(red, \"-\").concat(white, \" \").concat(expectedLine);\n printedLines += 2;\n // Lines are identical\n } else {\n // Add all cached information to the result before adding other things\n // and reset the cache.\n res += other;\n other = '';\n // If the last diverging line is exactly one line above or if it is the\n // very first line, add the line to the result.\n if (cur === 1 || i === 0) {\n res += \"\\n \".concat(actualLine);\n printedLines++;\n }\n }\n }\n // Inspected object to big (Show ~20 rows max)\n if (printedLines > 20 && i < maxLines - 2) {\n return \"\".concat(msg).concat(skippedMsg, \"\\n\").concat(res, \"\\n\").concat(blue, \"...\").concat(white).concat(other, \"\\n\") + \"\".concat(blue, \"...\").concat(white);\n }\n }\n return \"\".concat(msg).concat(skipped ? skippedMsg : '', \"\\n\").concat(res).concat(other).concat(end).concat(indicator);\n}\nvar AssertionError = /*#__PURE__*/function (_Error, _inspect$custom) {\n _inherits(AssertionError, _Error);\n var _super = _createSuper(AssertionError);\n function AssertionError(options) {\n var _this;\n _classCallCheck(this, AssertionError);\n if (_typeof(options) !== 'object' || options === null) {\n throw new ERR_INVALID_ARG_TYPE('options', 'Object', options);\n }\n var message = options.message,\n operator = options.operator,\n stackStartFn = options.stackStartFn;\n var actual = options.actual,\n expected = options.expected;\n var limit = Error.stackTraceLimit;\n Error.stackTraceLimit = 0;\n if (message != null) {\n _this = _super.call(this, String(message));\n } else {\n if (process.stderr && process.stderr.isTTY) {\n // Reset on each call to make sure we handle dynamically set environment\n // variables correct.\n if (process.stderr && process.stderr.getColorDepth && process.stderr.getColorDepth() !== 1) {\n blue = \"\\x1B[34m\";\n green = \"\\x1B[32m\";\n white = \"\\x1B[39m\";\n red = \"\\x1B[31m\";\n } else {\n blue = '';\n green = '';\n white = '';\n red = '';\n }\n }\n // Prevent the error stack from being visible by duplicating the error\n // in a very close way to the original in case both sides are actually\n // instances of Error.\n if (_typeof(actual) === 'object' && actual !== null && _typeof(expected) === 'object' && expected !== null && 'stack' in actual && actual instanceof Error && 'stack' in expected && expected instanceof Error) {\n actual = copyError(actual);\n expected = copyError(expected);\n }\n if (operator === 'deepStrictEqual' || operator === 'strictEqual') {\n _this = _super.call(this, createErrDiff(actual, expected, operator));\n } else if (operator === 'notDeepStrictEqual' || operator === 'notStrictEqual') {\n // In case the objects are equal but the operator requires unequal, show\n // the first object and say A equals B\n var base = kReadableOperator[operator];\n var res = inspectValue(actual).split('\\n');\n\n // In case \"actual\" is an object, it should not be reference equal.\n if (operator === 'notStrictEqual' && _typeof(actual) === 'object' && actual !== null) {\n base = kReadableOperator.notStrictEqualObject;\n }\n\n // Only remove lines in case it makes sense to collapse those.\n // TODO: Accept env to always show the full error.\n if (res.length > 30) {\n res[26] = \"\".concat(blue, \"...\").concat(white);\n while (res.length > 27) {\n res.pop();\n }\n }\n\n // Only print a single input.\n if (res.length === 1) {\n _this = _super.call(this, \"\".concat(base, \" \").concat(res[0]));\n } else {\n _this = _super.call(this, \"\".concat(base, \"\\n\\n\").concat(res.join('\\n'), \"\\n\"));\n }\n } else {\n var _res = inspectValue(actual);\n var other = '';\n var knownOperators = kReadableOperator[operator];\n if (operator === 'notDeepEqual' || operator === 'notEqual') {\n _res = \"\".concat(kReadableOperator[operator], \"\\n\\n\").concat(_res);\n if (_res.length > 1024) {\n _res = \"\".concat(_res.slice(0, 1021), \"...\");\n }\n } else {\n other = \"\".concat(inspectValue(expected));\n if (_res.length > 512) {\n _res = \"\".concat(_res.slice(0, 509), \"...\");\n }\n if (other.length > 512) {\n other = \"\".concat(other.slice(0, 509), \"...\");\n }\n if (operator === 'deepEqual' || operator === 'equal') {\n _res = \"\".concat(knownOperators, \"\\n\\n\").concat(_res, \"\\n\\nshould equal\\n\\n\");\n } else {\n other = \" \".concat(operator, \" \").concat(other);\n }\n }\n _this = _super.call(this, \"\".concat(_res).concat(other));\n }\n }\n Error.stackTraceLimit = limit;\n _this.generatedMessage = !message;\n Object.defineProperty(_assertThisInitialized(_this), 'name', {\n value: 'AssertionError [ERR_ASSERTION]',\n enumerable: false,\n writable: true,\n configurable: true\n });\n _this.code = 'ERR_ASSERTION';\n _this.actual = actual;\n _this.expected = expected;\n _this.operator = operator;\n if (Error.captureStackTrace) {\n // eslint-disable-next-line no-restricted-syntax\n Error.captureStackTrace(_assertThisInitialized(_this), stackStartFn);\n }\n // Create error message including the error code in the name.\n _this.stack;\n // Reset the name.\n _this.name = 'AssertionError';\n return _possibleConstructorReturn(_this);\n }\n _createClass(AssertionError, [{\n key: \"toString\",\n value: function toString() {\n return \"\".concat(this.name, \" [\").concat(this.code, \"]: \").concat(this.message);\n }\n }, {\n key: _inspect$custom,\n value: function value(recurseTimes, ctx) {\n // This limits the `actual` and `expected` property default inspection to\n // the minimum depth. Otherwise those values would be too verbose compared\n // to the actual error message which contains a combined view of these two\n // input values.\n return inspect(this, _objectSpread(_objectSpread({}, ctx), {}, {\n customInspect: false,\n depth: 0\n }));\n }\n }]);\n return AssertionError;\n}( /*#__PURE__*/_wrapNativeSuper(Error), inspect.custom);\nmodule.exports = AssertionError;","// Currently in sync with Node.js lib/internal/errors.js\n// https://github.com/nodejs/node/commit/3b044962c48fe313905877a96b5d0894a5404f6f\n\n/* eslint node-core/documented-errors: \"error\" */\n/* eslint node-core/alphabetize-errors: \"error\" */\n/* eslint node-core/prefer-util-format-errors: \"error\" */\n\n'use strict';\n\n// The whole point behind this internal module is to allow Node.js to no\n// longer be forced to treat every error message change as a semver-major\n// change. The NodeError classes here all expose a `code` property whose\n// value statically and permanently identifies the error. While the error\n// message may change, the code should not.\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, \"prototype\", { writable: false }); return Constructor; }\nfunction _toPropertyKey(arg) { var key = _toPrimitive(arg, \"string\"); return _typeof(key) === \"symbol\" ? key : String(key); }\nfunction _toPrimitive(input, hint) { if (_typeof(input) !== \"object\" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || \"default\"); if (_typeof(res) !== \"object\") return res; throw new TypeError(\"@@toPrimitive must return a primitive value.\"); } return (hint === \"string\" ? String : Number)(input); }\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, \"prototype\", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\nvar codes = {};\n\n// Lazy loaded\nvar assert;\nvar util;\nfunction createErrorType(code, message, Base) {\n if (!Base) {\n Base = Error;\n }\n function getMessage(arg1, arg2, arg3) {\n if (typeof message === 'string') {\n return message;\n } else {\n return message(arg1, arg2, arg3);\n }\n }\n var NodeError = /*#__PURE__*/function (_Base) {\n _inherits(NodeError, _Base);\n var _super = _createSuper(NodeError);\n function NodeError(arg1, arg2, arg3) {\n var _this;\n _classCallCheck(this, NodeError);\n _this = _super.call(this, getMessage(arg1, arg2, arg3));\n _this.code = code;\n return _this;\n }\n return _createClass(NodeError);\n }(Base);\n codes[code] = NodeError;\n}\n\n// https://github.com/nodejs/node/blob/v10.8.0/lib/internal/errors.js\nfunction oneOf(expected, thing) {\n if (Array.isArray(expected)) {\n var len = expected.length;\n expected = expected.map(function (i) {\n return String(i);\n });\n if (len > 2) {\n return \"one of \".concat(thing, \" \").concat(expected.slice(0, len - 1).join(', '), \", or \") + expected[len - 1];\n } else if (len === 2) {\n return \"one of \".concat(thing, \" \").concat(expected[0], \" or \").concat(expected[1]);\n } else {\n return \"of \".concat(thing, \" \").concat(expected[0]);\n }\n } else {\n return \"of \".concat(thing, \" \").concat(String(expected));\n }\n}\n\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith\nfunction startsWith(str, search, pos) {\n return str.substr(!pos || pos < 0 ? 0 : +pos, search.length) === search;\n}\n\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/endsWith\nfunction endsWith(str, search, this_len) {\n if (this_len === undefined || this_len > str.length) {\n this_len = str.length;\n }\n return str.substring(this_len - search.length, this_len) === search;\n}\n\n// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/includes\nfunction includes(str, search, start) {\n if (typeof start !== 'number') {\n start = 0;\n }\n if (start + search.length > str.length) {\n return false;\n } else {\n return str.indexOf(search, start) !== -1;\n }\n}\ncreateErrorType('ERR_AMBIGUOUS_ARGUMENT', 'The \"%s\" argument is ambiguous. %s', TypeError);\ncreateErrorType('ERR_INVALID_ARG_TYPE', function (name, expected, actual) {\n if (assert === undefined) assert = require('../assert');\n assert(typeof name === 'string', \"'name' must be a string\");\n\n // determiner: 'must be' or 'must not be'\n var determiner;\n if (typeof expected === 'string' && startsWith(expected, 'not ')) {\n determiner = 'must not be';\n expected = expected.replace(/^not /, '');\n } else {\n determiner = 'must be';\n }\n var msg;\n if (endsWith(name, ' argument')) {\n // For cases like 'first argument'\n msg = \"The \".concat(name, \" \").concat(determiner, \" \").concat(oneOf(expected, 'type'));\n } else {\n var type = includes(name, '.') ? 'property' : 'argument';\n msg = \"The \\\"\".concat(name, \"\\\" \").concat(type, \" \").concat(determiner, \" \").concat(oneOf(expected, 'type'));\n }\n\n // TODO(BridgeAR): Improve the output by showing `null` and similar.\n msg += \". Received type \".concat(_typeof(actual));\n return msg;\n}, TypeError);\ncreateErrorType('ERR_INVALID_ARG_VALUE', function (name, value) {\n var reason = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'is invalid';\n if (util === undefined) util = require('util/');\n var inspected = util.inspect(value);\n if (inspected.length > 128) {\n inspected = \"\".concat(inspected.slice(0, 128), \"...\");\n }\n return \"The argument '\".concat(name, \"' \").concat(reason, \". Received \").concat(inspected);\n}, TypeError, RangeError);\ncreateErrorType('ERR_INVALID_RETURN_VALUE', function (input, name, value) {\n var type;\n if (value && value.constructor && value.constructor.name) {\n type = \"instance of \".concat(value.constructor.name);\n } else {\n type = \"type \".concat(_typeof(value));\n }\n return \"Expected \".concat(input, \" to be returned from the \\\"\").concat(name, \"\\\"\") + \" function but got \".concat(type, \".\");\n}, TypeError);\ncreateErrorType('ERR_MISSING_ARGS', function () {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n if (assert === undefined) assert = require('../assert');\n assert(args.length > 0, 'At least one arg needs to be specified');\n var msg = 'The ';\n var len = args.length;\n args = args.map(function (a) {\n return \"\\\"\".concat(a, \"\\\"\");\n });\n switch (len) {\n case 1:\n msg += \"\".concat(args[0], \" argument\");\n break;\n case 2:\n msg += \"\".concat(args[0], \" and \").concat(args[1], \" arguments\");\n break;\n default:\n msg += args.slice(0, len - 1).join(', ');\n msg += \", and \".concat(args[len - 1], \" arguments\");\n break;\n }\n return \"\".concat(msg, \" must be specified\");\n}, TypeError);\nmodule.exports.codes = codes;","// Currently in sync with Node.js lib/internal/util/comparisons.js\n// https://github.com/nodejs/node/commit/112cc7c27551254aa2b17098fb774867f05ed0d9\n\n'use strict';\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\nfunction _iterableToArrayLimit(r, l) { var t = null == r ? null : \"undefined\" != typeof Symbol && r[Symbol.iterator] || r[\"@@iterator\"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\nfunction _typeof(o) { \"@babel/helpers - typeof\"; return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o; }, _typeof(o); }\nvar regexFlagsSupported = /a/g.flags !== undefined;\nvar arrayFromSet = function arrayFromSet(set) {\n var array = [];\n set.forEach(function (value) {\n return array.push(value);\n });\n return array;\n};\nvar arrayFromMap = function arrayFromMap(map) {\n var array = [];\n map.forEach(function (value, key) {\n return array.push([key, value]);\n });\n return array;\n};\nvar objectIs = Object.is ? Object.is : require('object-is');\nvar objectGetOwnPropertySymbols = Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols : function () {\n return [];\n};\nvar numberIsNaN = Number.isNaN ? Number.isNaN : require('is-nan');\nfunction uncurryThis(f) {\n return f.call.bind(f);\n}\nvar hasOwnProperty = uncurryThis(Object.prototype.hasOwnProperty);\nvar propertyIsEnumerable = uncurryThis(Object.prototype.propertyIsEnumerable);\nvar objectToString = uncurryThis(Object.prototype.toString);\nvar _require$types = require('util/').types,\n isAnyArrayBuffer = _require$types.isAnyArrayBuffer,\n isArrayBufferView = _require$types.isArrayBufferView,\n isDate = _require$types.isDate,\n isMap = _require$types.isMap,\n isRegExp = _require$types.isRegExp,\n isSet = _require$types.isSet,\n isNativeError = _require$types.isNativeError,\n isBoxedPrimitive = _require$types.isBoxedPrimitive,\n isNumberObject = _require$types.isNumberObject,\n isStringObject = _require$types.isStringObject,\n isBooleanObject = _require$types.isBooleanObject,\n isBigIntObject = _require$types.isBigIntObject,\n isSymbolObject = _require$types.isSymbolObject,\n isFloat32Array = _require$types.isFloat32Array,\n isFloat64Array = _require$types.isFloat64Array;\nfunction isNonIndex(key) {\n if (key.length === 0 || key.length > 10) return true;\n for (var i = 0; i < key.length; i++) {\n var code = key.charCodeAt(i);\n if (code < 48 || code > 57) return true;\n }\n // The maximum size for an array is 2 ** 32 -1.\n return key.length === 10 && key >= Math.pow(2, 32);\n}\nfunction getOwnNonIndexProperties(value) {\n return Object.keys(value).filter(isNonIndex).concat(objectGetOwnPropertySymbols(value).filter(Object.prototype.propertyIsEnumerable.bind(value)));\n}\n\n// Taken from https://github.com/feross/buffer/blob/680e9e5e488f22aac27599a57dc844a6315928dd/index.js\n// original notice:\n/*!\n * The buffer module from node.js, for the browser.\n *\n * @author Feross Aboukhadijeh \n * @license MIT\n */\nfunction compare(a, b) {\n if (a === b) {\n return 0;\n }\n var x = a.length;\n var y = b.length;\n for (var i = 0, len = Math.min(x, y); i < len; ++i) {\n if (a[i] !== b[i]) {\n x = a[i];\n y = b[i];\n break;\n }\n }\n if (x < y) {\n return -1;\n }\n if (y < x) {\n return 1;\n }\n return 0;\n}\nvar ONLY_ENUMERABLE = undefined;\nvar kStrict = true;\nvar kLoose = false;\nvar kNoIterator = 0;\nvar kIsArray = 1;\nvar kIsSet = 2;\nvar kIsMap = 3;\n\n// Check if they have the same source and flags\nfunction areSimilarRegExps(a, b) {\n return regexFlagsSupported ? a.source === b.source && a.flags === b.flags : RegExp.prototype.toString.call(a) === RegExp.prototype.toString.call(b);\n}\nfunction areSimilarFloatArrays(a, b) {\n if (a.byteLength !== b.byteLength) {\n return false;\n }\n for (var offset = 0; offset < a.byteLength; offset++) {\n if (a[offset] !== b[offset]) {\n return false;\n }\n }\n return true;\n}\nfunction areSimilarTypedArrays(a, b) {\n if (a.byteLength !== b.byteLength) {\n return false;\n }\n return compare(new Uint8Array(a.buffer, a.byteOffset, a.byteLength), new Uint8Array(b.buffer, b.byteOffset, b.byteLength)) === 0;\n}\nfunction areEqualArrayBuffers(buf1, buf2) {\n return buf1.byteLength === buf2.byteLength && compare(new Uint8Array(buf1), new Uint8Array(buf2)) === 0;\n}\nfunction isEqualBoxedPrimitive(val1, val2) {\n if (isNumberObject(val1)) {\n return isNumberObject(val2) && objectIs(Number.prototype.valueOf.call(val1), Number.prototype.valueOf.call(val2));\n }\n if (isStringObject(val1)) {\n return isStringObject(val2) && String.prototype.valueOf.call(val1) === String.prototype.valueOf.call(val2);\n }\n if (isBooleanObject(val1)) {\n return isBooleanObject(val2) && Boolean.prototype.valueOf.call(val1) === Boolean.prototype.valueOf.call(val2);\n }\n if (isBigIntObject(val1)) {\n return isBigIntObject(val2) && BigInt.prototype.valueOf.call(val1) === BigInt.prototype.valueOf.call(val2);\n }\n return isSymbolObject(val2) && Symbol.prototype.valueOf.call(val1) === Symbol.prototype.valueOf.call(val2);\n}\n\n// Notes: Type tags are historical [[Class]] properties that can be set by\n// FunctionTemplate::SetClassName() in C++ or Symbol.toStringTag in JS\n// and retrieved using Object.prototype.toString.call(obj) in JS\n// See https://tc39.github.io/ecma262/#sec-object.prototype.tostring\n// for a list of tags pre-defined in the spec.\n// There are some unspecified tags in the wild too (e.g. typed array tags).\n// Since tags can be altered, they only serve fast failures\n//\n// Typed arrays and buffers are checked by comparing the content in their\n// underlying ArrayBuffer. This optimization requires that it's\n// reasonable to interpret their underlying memory in the same way,\n// which is checked by comparing their type tags.\n// (e.g. a Uint8Array and a Uint16Array with the same memory content\n// could still be different because they will be interpreted differently).\n//\n// For strict comparison, objects should have\n// a) The same built-in type tags\n// b) The same prototypes.\n\nfunction innerDeepEqual(val1, val2, strict, memos) {\n // All identical values are equivalent, as determined by ===.\n if (val1 === val2) {\n if (val1 !== 0) return true;\n return strict ? objectIs(val1, val2) : true;\n }\n\n // Check more closely if val1 and val2 are equal.\n if (strict) {\n if (_typeof(val1) !== 'object') {\n return typeof val1 === 'number' && numberIsNaN(val1) && numberIsNaN(val2);\n }\n if (_typeof(val2) !== 'object' || val1 === null || val2 === null) {\n return false;\n }\n if (Object.getPrototypeOf(val1) !== Object.getPrototypeOf(val2)) {\n return false;\n }\n } else {\n if (val1 === null || _typeof(val1) !== 'object') {\n if (val2 === null || _typeof(val2) !== 'object') {\n // eslint-disable-next-line eqeqeq\n return val1 == val2;\n }\n return false;\n }\n if (val2 === null || _typeof(val2) !== 'object') {\n return false;\n }\n }\n var val1Tag = objectToString(val1);\n var val2Tag = objectToString(val2);\n if (val1Tag !== val2Tag) {\n return false;\n }\n if (Array.isArray(val1)) {\n // Check for sparse arrays and general fast path\n if (val1.length !== val2.length) {\n return false;\n }\n var keys1 = getOwnNonIndexProperties(val1, ONLY_ENUMERABLE);\n var keys2 = getOwnNonIndexProperties(val2, ONLY_ENUMERABLE);\n if (keys1.length !== keys2.length) {\n return false;\n }\n return keyCheck(val1, val2, strict, memos, kIsArray, keys1);\n }\n // [browserify] This triggers on certain types in IE (Map/Set) so we don't\n // wan't to early return out of the rest of the checks. However we can check\n // if the second value is one of these values and the first isn't.\n if (val1Tag === '[object Object]') {\n // return keyCheck(val1, val2, strict, memos, kNoIterator);\n if (!isMap(val1) && isMap(val2) || !isSet(val1) && isSet(val2)) {\n return false;\n }\n }\n if (isDate(val1)) {\n if (!isDate(val2) || Date.prototype.getTime.call(val1) !== Date.prototype.getTime.call(val2)) {\n return false;\n }\n } else if (isRegExp(val1)) {\n if (!isRegExp(val2) || !areSimilarRegExps(val1, val2)) {\n return false;\n }\n } else if (isNativeError(val1) || val1 instanceof Error) {\n // Do not compare the stack as it might differ even though the error itself\n // is otherwise identical.\n if (val1.message !== val2.message || val1.name !== val2.name) {\n return false;\n }\n } else if (isArrayBufferView(val1)) {\n if (!strict && (isFloat32Array(val1) || isFloat64Array(val1))) {\n if (!areSimilarFloatArrays(val1, val2)) {\n return false;\n }\n } else if (!areSimilarTypedArrays(val1, val2)) {\n return false;\n }\n // Buffer.compare returns true, so val1.length === val2.length. If they both\n // only contain numeric keys, we don't need to exam further than checking\n // the symbols.\n var _keys = getOwnNonIndexProperties(val1, ONLY_ENUMERABLE);\n var _keys2 = getOwnNonIndexProperties(val2, ONLY_ENUMERABLE);\n if (_keys.length !== _keys2.length) {\n return false;\n }\n return keyCheck(val1, val2, strict, memos, kNoIterator, _keys);\n } else if (isSet(val1)) {\n if (!isSet(val2) || val1.size !== val2.size) {\n return false;\n }\n return keyCheck(val1, val2, strict, memos, kIsSet);\n } else if (isMap(val1)) {\n if (!isMap(val2) || val1.size !== val2.size) {\n return false;\n }\n return keyCheck(val1, val2, strict, memos, kIsMap);\n } else if (isAnyArrayBuffer(val1)) {\n if (!areEqualArrayBuffers(val1, val2)) {\n return false;\n }\n } else if (isBoxedPrimitive(val1) && !isEqualBoxedPrimitive(val1, val2)) {\n return false;\n }\n return keyCheck(val1, val2, strict, memos, kNoIterator);\n}\nfunction getEnumerables(val, keys) {\n return keys.filter(function (k) {\n return propertyIsEnumerable(val, k);\n });\n}\nfunction keyCheck(val1, val2, strict, memos, iterationType, aKeys) {\n // For all remaining Object pairs, including Array, objects and Maps,\n // equivalence is determined by having:\n // a) The same number of owned enumerable properties\n // b) The same set of keys/indexes (although not necessarily the same order)\n // c) Equivalent values for every corresponding key/index\n // d) For Sets and Maps, equal contents\n // Note: this accounts for both named and indexed properties on Arrays.\n if (arguments.length === 5) {\n aKeys = Object.keys(val1);\n var bKeys = Object.keys(val2);\n\n // The pair must have the same number of owned properties.\n if (aKeys.length !== bKeys.length) {\n return false;\n }\n }\n\n // Cheap key test\n var i = 0;\n for (; i < aKeys.length; i++) {\n if (!hasOwnProperty(val2, aKeys[i])) {\n return false;\n }\n }\n if (strict && arguments.length === 5) {\n var symbolKeysA = objectGetOwnPropertySymbols(val1);\n if (symbolKeysA.length !== 0) {\n var count = 0;\n for (i = 0; i < symbolKeysA.length; i++) {\n var key = symbolKeysA[i];\n if (propertyIsEnumerable(val1, key)) {\n if (!propertyIsEnumerable(val2, key)) {\n return false;\n }\n aKeys.push(key);\n count++;\n } else if (propertyIsEnumerable(val2, key)) {\n return false;\n }\n }\n var symbolKeysB = objectGetOwnPropertySymbols(val2);\n if (symbolKeysA.length !== symbolKeysB.length && getEnumerables(val2, symbolKeysB).length !== count) {\n return false;\n }\n } else {\n var _symbolKeysB = objectGetOwnPropertySymbols(val2);\n if (_symbolKeysB.length !== 0 && getEnumerables(val2, _symbolKeysB).length !== 0) {\n return false;\n }\n }\n }\n if (aKeys.length === 0 && (iterationType === kNoIterator || iterationType === kIsArray && val1.length === 0 || val1.size === 0)) {\n return true;\n }\n\n // Use memos to handle cycles.\n if (memos === undefined) {\n memos = {\n val1: new Map(),\n val2: new Map(),\n position: 0\n };\n } else {\n // We prevent up to two map.has(x) calls by directly retrieving the value\n // and checking for undefined. The map can only contain numbers, so it is\n // safe to check for undefined only.\n var val2MemoA = memos.val1.get(val1);\n if (val2MemoA !== undefined) {\n var val2MemoB = memos.val2.get(val2);\n if (val2MemoB !== undefined) {\n return val2MemoA === val2MemoB;\n }\n }\n memos.position++;\n }\n memos.val1.set(val1, memos.position);\n memos.val2.set(val2, memos.position);\n var areEq = objEquiv(val1, val2, strict, aKeys, memos, iterationType);\n memos.val1.delete(val1);\n memos.val2.delete(val2);\n return areEq;\n}\nfunction setHasEqualElement(set, val1, strict, memo) {\n // Go looking.\n var setValues = arrayFromSet(set);\n for (var i = 0; i < setValues.length; i++) {\n var val2 = setValues[i];\n if (innerDeepEqual(val1, val2, strict, memo)) {\n // Remove the matching element to make sure we do not check that again.\n set.delete(val2);\n return true;\n }\n }\n return false;\n}\n\n// See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Equality_comparisons_and_sameness#Loose_equality_using\n// Sadly it is not possible to detect corresponding values properly in case the\n// type is a string, number, bigint or boolean. The reason is that those values\n// can match lots of different string values (e.g., 1n == '+00001').\nfunction findLooseMatchingPrimitives(prim) {\n switch (_typeof(prim)) {\n case 'undefined':\n return null;\n case 'object':\n // Only pass in null as object!\n return undefined;\n case 'symbol':\n return false;\n case 'string':\n prim = +prim;\n // Loose equal entries exist only if the string is possible to convert to\n // a regular number and not NaN.\n // Fall through\n case 'number':\n if (numberIsNaN(prim)) {\n return false;\n }\n }\n return true;\n}\nfunction setMightHaveLoosePrim(a, b, prim) {\n var altValue = findLooseMatchingPrimitives(prim);\n if (altValue != null) return altValue;\n return b.has(altValue) && !a.has(altValue);\n}\nfunction mapMightHaveLoosePrim(a, b, prim, item, memo) {\n var altValue = findLooseMatchingPrimitives(prim);\n if (altValue != null) {\n return altValue;\n }\n var curB = b.get(altValue);\n if (curB === undefined && !b.has(altValue) || !innerDeepEqual(item, curB, false, memo)) {\n return false;\n }\n return !a.has(altValue) && innerDeepEqual(item, curB, false, memo);\n}\nfunction setEquiv(a, b, strict, memo) {\n // This is a lazily initiated Set of entries which have to be compared\n // pairwise.\n var set = null;\n var aValues = arrayFromSet(a);\n for (var i = 0; i < aValues.length; i++) {\n var val = aValues[i];\n // Note: Checking for the objects first improves the performance for object\n // heavy sets but it is a minor slow down for primitives. As they are fast\n // to check this improves the worst case scenario instead.\n if (_typeof(val) === 'object' && val !== null) {\n if (set === null) {\n set = new Set();\n }\n // If the specified value doesn't exist in the second set its an not null\n // object (or non strict only: a not matching primitive) we'll need to go\n // hunting for something thats deep-(strict-)equal to it. To make this\n // O(n log n) complexity we have to copy these values in a new set first.\n set.add(val);\n } else if (!b.has(val)) {\n if (strict) return false;\n\n // Fast path to detect missing string, symbol, undefined and null values.\n if (!setMightHaveLoosePrim(a, b, val)) {\n return false;\n }\n if (set === null) {\n set = new Set();\n }\n set.add(val);\n }\n }\n if (set !== null) {\n var bValues = arrayFromSet(b);\n for (var _i = 0; _i < bValues.length; _i++) {\n var _val = bValues[_i];\n // We have to check if a primitive value is already\n // matching and only if it's not, go hunting for it.\n if (_typeof(_val) === 'object' && _val !== null) {\n if (!setHasEqualElement(set, _val, strict, memo)) return false;\n } else if (!strict && !a.has(_val) && !setHasEqualElement(set, _val, strict, memo)) {\n return false;\n }\n }\n return set.size === 0;\n }\n return true;\n}\nfunction mapHasEqualEntry(set, map, key1, item1, strict, memo) {\n // To be able to handle cases like:\n // Map([[{}, 'a'], [{}, 'b']]) vs Map([[{}, 'b'], [{}, 'a']])\n // ... we need to consider *all* matching keys, not just the first we find.\n var setValues = arrayFromSet(set);\n for (var i = 0; i < setValues.length; i++) {\n var key2 = setValues[i];\n if (innerDeepEqual(key1, key2, strict, memo) && innerDeepEqual(item1, map.get(key2), strict, memo)) {\n set.delete(key2);\n return true;\n }\n }\n return false;\n}\nfunction mapEquiv(a, b, strict, memo) {\n var set = null;\n var aEntries = arrayFromMap(a);\n for (var i = 0; i < aEntries.length; i++) {\n var _aEntries$i = _slicedToArray(aEntries[i], 2),\n key = _aEntries$i[0],\n item1 = _aEntries$i[1];\n if (_typeof(key) === 'object' && key !== null) {\n if (set === null) {\n set = new Set();\n }\n set.add(key);\n } else {\n // By directly retrieving the value we prevent another b.has(key) check in\n // almost all possible cases.\n var item2 = b.get(key);\n if (item2 === undefined && !b.has(key) || !innerDeepEqual(item1, item2, strict, memo)) {\n if (strict) return false;\n // Fast path to detect missing string, symbol, undefined and null\n // keys.\n if (!mapMightHaveLoosePrim(a, b, key, item1, memo)) return false;\n if (set === null) {\n set = new Set();\n }\n set.add(key);\n }\n }\n }\n if (set !== null) {\n var bEntries = arrayFromMap(b);\n for (var _i2 = 0; _i2 < bEntries.length; _i2++) {\n var _bEntries$_i = _slicedToArray(bEntries[_i2], 2),\n _key = _bEntries$_i[0],\n item = _bEntries$_i[1];\n if (_typeof(_key) === 'object' && _key !== null) {\n if (!mapHasEqualEntry(set, a, _key, item, strict, memo)) return false;\n } else if (!strict && (!a.has(_key) || !innerDeepEqual(a.get(_key), item, false, memo)) && !mapHasEqualEntry(set, a, _key, item, false, memo)) {\n return false;\n }\n }\n return set.size === 0;\n }\n return true;\n}\nfunction objEquiv(a, b, strict, keys, memos, iterationType) {\n // Sets and maps don't have their entries accessible via normal object\n // properties.\n var i = 0;\n if (iterationType === kIsSet) {\n if (!setEquiv(a, b, strict, memos)) {\n return false;\n }\n } else if (iterationType === kIsMap) {\n if (!mapEquiv(a, b, strict, memos)) {\n return false;\n }\n } else if (iterationType === kIsArray) {\n for (; i < a.length; i++) {\n if (hasOwnProperty(a, i)) {\n if (!hasOwnProperty(b, i) || !innerDeepEqual(a[i], b[i], strict, memos)) {\n return false;\n }\n } else if (hasOwnProperty(b, i)) {\n return false;\n } else {\n // Array is sparse.\n var keysA = Object.keys(a);\n for (; i < keysA.length; i++) {\n var key = keysA[i];\n if (!hasOwnProperty(b, key) || !innerDeepEqual(a[key], b[key], strict, memos)) {\n return false;\n }\n }\n if (keysA.length !== Object.keys(b).length) {\n return false;\n }\n return true;\n }\n }\n }\n\n // The pair must have equivalent values for every corresponding key.\n // Possibly expensive deep test:\n for (i = 0; i < keys.length; i++) {\n var _key2 = keys[i];\n if (!innerDeepEqual(a[_key2], b[_key2], strict, memos)) {\n return false;\n }\n }\n return true;\n}\nfunction isDeepEqual(val1, val2) {\n return innerDeepEqual(val1, val2, kLoose);\n}\nfunction isDeepStrictEqual(val1, val2) {\n return innerDeepEqual(val1, val2, kStrict);\n}\nmodule.exports = {\n isDeepEqual: isDeepEqual,\n isDeepStrictEqual: isDeepStrictEqual\n};","'use strict'\n\nexports.byteLength = byteLength\nexports.toByteArray = toByteArray\nexports.fromByteArray = fromByteArray\n\nvar lookup = []\nvar revLookup = []\nvar Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array\n\nvar code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'\nfor (var i = 0, len = code.length; i < len; ++i) {\n lookup[i] = code[i]\n revLookup[code.charCodeAt(i)] = i\n}\n\n// Support decoding URL-safe base64 strings, as Node.js does.\n// See: https://en.wikipedia.org/wiki/Base64#URL_applications\nrevLookup['-'.charCodeAt(0)] = 62\nrevLookup['_'.charCodeAt(0)] = 63\n\nfunction getLens (b64) {\n var len = b64.length\n\n if (len % 4 > 0) {\n throw new Error('Invalid string. Length must be a multiple of 4')\n }\n\n // Trim off extra bytes after placeholder bytes are found\n // See: https://github.com/beatgammit/base64-js/issues/42\n var validLen = b64.indexOf('=')\n if (validLen === -1) validLen = len\n\n var placeHoldersLen = validLen === len\n ? 0\n : 4 - (validLen % 4)\n\n return [validLen, placeHoldersLen]\n}\n\n// base64 is 4/3 + up to two characters of the original data\nfunction byteLength (b64) {\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction _byteLength (b64, validLen, placeHoldersLen) {\n return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen\n}\n\nfunction toByteArray (b64) {\n var tmp\n var lens = getLens(b64)\n var validLen = lens[0]\n var placeHoldersLen = lens[1]\n\n var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen))\n\n var curByte = 0\n\n // if there are placeholders, only get up to the last complete 4 chars\n var len = placeHoldersLen > 0\n ? validLen - 4\n : validLen\n\n var i\n for (i = 0; i < len; i += 4) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 18) |\n (revLookup[b64.charCodeAt(i + 1)] << 12) |\n (revLookup[b64.charCodeAt(i + 2)] << 6) |\n revLookup[b64.charCodeAt(i + 3)]\n arr[curByte++] = (tmp >> 16) & 0xFF\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 2) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 2) |\n (revLookup[b64.charCodeAt(i + 1)] >> 4)\n arr[curByte++] = tmp & 0xFF\n }\n\n if (placeHoldersLen === 1) {\n tmp =\n (revLookup[b64.charCodeAt(i)] << 10) |\n (revLookup[b64.charCodeAt(i + 1)] << 4) |\n (revLookup[b64.charCodeAt(i + 2)] >> 2)\n arr[curByte++] = (tmp >> 8) & 0xFF\n arr[curByte++] = tmp & 0xFF\n }\n\n return arr\n}\n\nfunction tripletToBase64 (num) {\n return lookup[num >> 18 & 0x3F] +\n lookup[num >> 12 & 0x3F] +\n lookup[num >> 6 & 0x3F] +\n lookup[num & 0x3F]\n}\n\nfunction encodeChunk (uint8, start, end) {\n var tmp\n var output = []\n for (var i = start; i < end; i += 3) {\n tmp =\n ((uint8[i] << 16) & 0xFF0000) +\n ((uint8[i + 1] << 8) & 0xFF00) +\n (uint8[i + 2] & 0xFF)\n output.push(tripletToBase64(tmp))\n }\n return output.join('')\n}\n\nfunction fromByteArray (uint8) {\n var tmp\n var len = uint8.length\n var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes\n var parts = []\n var maxChunkLength = 16383 // must be multiple of 3\n\n // go through the array every three bytes, we'll deal with trailing stuff later\n for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {\n parts.push(encodeChunk(uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength)))\n }\n\n // pad the end with zeros, but make sure to not forget the extra bytes\n if (extraBytes === 1) {\n tmp = uint8[len - 1]\n parts.push(\n lookup[tmp >> 2] +\n lookup[(tmp << 4) & 0x3F] +\n '=='\n )\n } else if (extraBytes === 2) {\n tmp = (uint8[len - 2] << 8) + uint8[len - 1]\n parts.push(\n lookup[tmp >> 10] +\n lookup[(tmp >> 4) & 0x3F] +\n lookup[(tmp << 2) & 0x3F] +\n '='\n )\n }\n\n return parts.join('')\n}\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar callBind = require('./');\n\nvar $indexOf = callBind(GetIntrinsic('String.prototype.indexOf'));\n\nmodule.exports = function callBoundIntrinsic(name, allowMissing) {\n\tvar intrinsic = GetIntrinsic(name, !!allowMissing);\n\tif (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {\n\t\treturn callBind(intrinsic);\n\t}\n\treturn intrinsic;\n};\n","'use strict';\n\nvar bind = require('function-bind');\nvar GetIntrinsic = require('get-intrinsic');\nvar setFunctionLength = require('set-function-length');\n\nvar $TypeError = require('es-errors/type');\nvar $apply = GetIntrinsic('%Function.prototype.apply%');\nvar $call = GetIntrinsic('%Function.prototype.call%');\nvar $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply);\n\nvar $defineProperty = require('es-define-property');\nvar $max = GetIntrinsic('%Math.max%');\n\nmodule.exports = function callBind(originalFunction) {\n\tif (typeof originalFunction !== 'function') {\n\t\tthrow new $TypeError('a function is required');\n\t}\n\tvar func = $reflectApply(bind, $call, arguments);\n\treturn setFunctionLength(\n\t\tfunc,\n\t\t1 + $max(0, originalFunction.length - (arguments.length - 1)),\n\t\ttrue\n\t);\n};\n\nvar applyBind = function applyBind() {\n\treturn $reflectApply(bind, $apply, arguments);\n};\n\nif ($defineProperty) {\n\t$defineProperty(module.exports, 'apply', { value: applyBind });\n} else {\n\tmodule.exports.apply = applyBind;\n}\n","/*global window, global*/\nvar util = require(\"util\")\nvar assert = require(\"assert\")\nfunction now() { return new Date().getTime() }\n\nvar slice = Array.prototype.slice\nvar console\nvar times = {}\n\nif (typeof global !== \"undefined\" && global.console) {\n console = global.console\n} else if (typeof window !== \"undefined\" && window.console) {\n console = window.console\n} else {\n console = {}\n}\n\nvar functions = [\n [log, \"log\"],\n [info, \"info\"],\n [warn, \"warn\"],\n [error, \"error\"],\n [time, \"time\"],\n [timeEnd, \"timeEnd\"],\n [trace, \"trace\"],\n [dir, \"dir\"],\n [consoleAssert, \"assert\"]\n]\n\nfor (var i = 0; i < functions.length; i++) {\n var tuple = functions[i]\n var f = tuple[0]\n var name = tuple[1]\n\n if (!console[name]) {\n console[name] = f\n }\n}\n\nmodule.exports = console\n\nfunction log() {}\n\nfunction info() {\n console.log.apply(console, arguments)\n}\n\nfunction warn() {\n console.log.apply(console, arguments)\n}\n\nfunction error() {\n console.warn.apply(console, arguments)\n}\n\nfunction time(label) {\n times[label] = now()\n}\n\nfunction timeEnd(label) {\n var time = times[label]\n if (!time) {\n throw new Error(\"No such label: \" + label)\n }\n\n delete times[label]\n var duration = now() - time\n console.log(label + \": \" + duration + \"ms\")\n}\n\nfunction trace() {\n var err = new Error()\n err.name = \"Trace\"\n err.message = util.format.apply(null, arguments)\n console.error(err.stack)\n}\n\nfunction dir(object) {\n console.log(util.inspect(object) + \"\\n\")\n}\n\nfunction consoleAssert(expression) {\n if (!expression) {\n var arr = slice.call(arguments, 1)\n assert.ok(false, util.format.apply(null, arr))\n }\n}\n","/* eslint-env browser */\n\n/**\n * This is the web browser implementation of `debug()`.\n */\n\nexports.formatArgs = formatArgs;\nexports.save = save;\nexports.load = load;\nexports.useColors = useColors;\nexports.storage = localstorage();\nexports.destroy = (() => {\n\tlet warned = false;\n\n\treturn () => {\n\t\tif (!warned) {\n\t\t\twarned = true;\n\t\t\tconsole.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');\n\t\t}\n\t};\n})();\n\n/**\n * Colors.\n */\n\nexports.colors = [\n\t'#0000CC',\n\t'#0000FF',\n\t'#0033CC',\n\t'#0033FF',\n\t'#0066CC',\n\t'#0066FF',\n\t'#0099CC',\n\t'#0099FF',\n\t'#00CC00',\n\t'#00CC33',\n\t'#00CC66',\n\t'#00CC99',\n\t'#00CCCC',\n\t'#00CCFF',\n\t'#3300CC',\n\t'#3300FF',\n\t'#3333CC',\n\t'#3333FF',\n\t'#3366CC',\n\t'#3366FF',\n\t'#3399CC',\n\t'#3399FF',\n\t'#33CC00',\n\t'#33CC33',\n\t'#33CC66',\n\t'#33CC99',\n\t'#33CCCC',\n\t'#33CCFF',\n\t'#6600CC',\n\t'#6600FF',\n\t'#6633CC',\n\t'#6633FF',\n\t'#66CC00',\n\t'#66CC33',\n\t'#9900CC',\n\t'#9900FF',\n\t'#9933CC',\n\t'#9933FF',\n\t'#99CC00',\n\t'#99CC33',\n\t'#CC0000',\n\t'#CC0033',\n\t'#CC0066',\n\t'#CC0099',\n\t'#CC00CC',\n\t'#CC00FF',\n\t'#CC3300',\n\t'#CC3333',\n\t'#CC3366',\n\t'#CC3399',\n\t'#CC33CC',\n\t'#CC33FF',\n\t'#CC6600',\n\t'#CC6633',\n\t'#CC9900',\n\t'#CC9933',\n\t'#CCCC00',\n\t'#CCCC33',\n\t'#FF0000',\n\t'#FF0033',\n\t'#FF0066',\n\t'#FF0099',\n\t'#FF00CC',\n\t'#FF00FF',\n\t'#FF3300',\n\t'#FF3333',\n\t'#FF3366',\n\t'#FF3399',\n\t'#FF33CC',\n\t'#FF33FF',\n\t'#FF6600',\n\t'#FF6633',\n\t'#FF9900',\n\t'#FF9933',\n\t'#FFCC00',\n\t'#FFCC33'\n];\n\n/**\n * Currently only WebKit-based Web Inspectors, Firefox >= v31,\n * and the Firebug extension (any Firefox version) are known\n * to support \"%c\" CSS customizations.\n *\n * TODO: add a `localStorage` variable to explicitly enable/disable colors\n */\n\n// eslint-disable-next-line complexity\nfunction useColors() {\n\t// NB: In an Electron preload script, document will be defined but not fully\n\t// initialized. Since we know we're in Chrome, we'll just detect this case\n\t// explicitly\n\tif (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {\n\t\treturn true;\n\t}\n\n\t// Internet Explorer and Edge do not support colors.\n\tif (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\\/(\\d+)/)) {\n\t\treturn false;\n\t}\n\n\tlet m;\n\n\t// Is webkit? http://stackoverflow.com/a/16459606/376773\n\t// document is undefined in react-native: https://github.com/facebook/react-native/pull/1632\n\treturn (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||\n\t\t// Is firebug? http://stackoverflow.com/a/398120/376773\n\t\t(typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||\n\t\t// Is firefox >= v31?\n\t\t// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages\n\t\t(typeof navigator !== 'undefined' && navigator.userAgent && (m = navigator.userAgent.toLowerCase().match(/firefox\\/(\\d+)/)) && parseInt(m[1], 10) >= 31) ||\n\t\t// Double check webkit in userAgent just in case we are in a worker\n\t\t(typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\\/(\\d+)/));\n}\n\n/**\n * Colorize log arguments if enabled.\n *\n * @api public\n */\n\nfunction formatArgs(args) {\n\targs[0] = (this.useColors ? '%c' : '') +\n\t\tthis.namespace +\n\t\t(this.useColors ? ' %c' : ' ') +\n\t\targs[0] +\n\t\t(this.useColors ? '%c ' : ' ') +\n\t\t'+' + module.exports.humanize(this.diff);\n\n\tif (!this.useColors) {\n\t\treturn;\n\t}\n\n\tconst c = 'color: ' + this.color;\n\targs.splice(1, 0, c, 'color: inherit');\n\n\t// The final \"%c\" is somewhat tricky, because there could be other\n\t// arguments passed either before or after the %c, so we need to\n\t// figure out the correct index to insert the CSS into\n\tlet index = 0;\n\tlet lastC = 0;\n\targs[0].replace(/%[a-zA-Z%]/g, match => {\n\t\tif (match === '%%') {\n\t\t\treturn;\n\t\t}\n\t\tindex++;\n\t\tif (match === '%c') {\n\t\t\t// We only are interested in the *last* %c\n\t\t\t// (the user may have provided their own)\n\t\t\tlastC = index;\n\t\t}\n\t});\n\n\targs.splice(lastC, 0, c);\n}\n\n/**\n * Invokes `console.debug()` when available.\n * No-op when `console.debug` is not a \"function\".\n * If `console.debug` is not available, falls back\n * to `console.log`.\n *\n * @api public\n */\nexports.log = console.debug || console.log || (() => {});\n\n/**\n * Save `namespaces`.\n *\n * @param {String} namespaces\n * @api private\n */\nfunction save(namespaces) {\n\ttry {\n\t\tif (namespaces) {\n\t\t\texports.storage.setItem('debug', namespaces);\n\t\t} else {\n\t\t\texports.storage.removeItem('debug');\n\t\t}\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n}\n\n/**\n * Load `namespaces`.\n *\n * @return {String} returns the previously persisted debug modes\n * @api private\n */\nfunction load() {\n\tlet r;\n\ttry {\n\t\tr = exports.storage.getItem('debug');\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n\n\t// If debug isn't set in LS, and we're in Electron, try to load $DEBUG\n\tif (!r && typeof process !== 'undefined' && 'env' in process) {\n\t\tr = process.env.DEBUG;\n\t}\n\n\treturn r;\n}\n\n/**\n * Localstorage attempts to return the localstorage.\n *\n * This is necessary because safari throws\n * when a user disables cookies/localstorage\n * and you attempt to access it.\n *\n * @return {LocalStorage}\n * @api private\n */\n\nfunction localstorage() {\n\ttry {\n\t\t// TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context\n\t\t// The Browser also has localStorage in the global context.\n\t\treturn localStorage;\n\t} catch (error) {\n\t\t// Swallow\n\t\t// XXX (@Qix-) should we be logging these?\n\t}\n}\n\nmodule.exports = require('./common')(exports);\n\nconst {formatters} = module.exports;\n\n/**\n * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.\n */\n\nformatters.j = function (v) {\n\ttry {\n\t\treturn JSON.stringify(v);\n\t} catch (error) {\n\t\treturn '[UnexpectedJSONParseError]: ' + error.message;\n\t}\n};\n","\n/**\n * This is the common logic for both the Node.js and web browser\n * implementations of `debug()`.\n */\n\nfunction setup(env) {\n\tcreateDebug.debug = createDebug;\n\tcreateDebug.default = createDebug;\n\tcreateDebug.coerce = coerce;\n\tcreateDebug.disable = disable;\n\tcreateDebug.enable = enable;\n\tcreateDebug.enabled = enabled;\n\tcreateDebug.humanize = require('ms');\n\tcreateDebug.destroy = destroy;\n\n\tObject.keys(env).forEach(key => {\n\t\tcreateDebug[key] = env[key];\n\t});\n\n\t/**\n\t* The currently active debug mode names, and names to skip.\n\t*/\n\n\tcreateDebug.names = [];\n\tcreateDebug.skips = [];\n\n\t/**\n\t* Map of special \"%n\" handling functions, for the debug \"format\" argument.\n\t*\n\t* Valid key names are a single, lower or upper-case letter, i.e. \"n\" and \"N\".\n\t*/\n\tcreateDebug.formatters = {};\n\n\t/**\n\t* Selects a color for a debug namespace\n\t* @param {String} namespace The namespace string for the debug instance to be colored\n\t* @return {Number|String} An ANSI color code for the given namespace\n\t* @api private\n\t*/\n\tfunction selectColor(namespace) {\n\t\tlet hash = 0;\n\n\t\tfor (let i = 0; i < namespace.length; i++) {\n\t\t\thash = ((hash << 5) - hash) + namespace.charCodeAt(i);\n\t\t\thash |= 0; // Convert to 32bit integer\n\t\t}\n\n\t\treturn createDebug.colors[Math.abs(hash) % createDebug.colors.length];\n\t}\n\tcreateDebug.selectColor = selectColor;\n\n\t/**\n\t* Create a debugger with the given `namespace`.\n\t*\n\t* @param {String} namespace\n\t* @return {Function}\n\t* @api public\n\t*/\n\tfunction createDebug(namespace) {\n\t\tlet prevTime;\n\t\tlet enableOverride = null;\n\t\tlet namespacesCache;\n\t\tlet enabledCache;\n\n\t\tfunction debug(...args) {\n\t\t\t// Disabled?\n\t\t\tif (!debug.enabled) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst self = debug;\n\n\t\t\t// Set `diff` timestamp\n\t\t\tconst curr = Number(new Date());\n\t\t\tconst ms = curr - (prevTime || curr);\n\t\t\tself.diff = ms;\n\t\t\tself.prev = prevTime;\n\t\t\tself.curr = curr;\n\t\t\tprevTime = curr;\n\n\t\t\targs[0] = createDebug.coerce(args[0]);\n\n\t\t\tif (typeof args[0] !== 'string') {\n\t\t\t\t// Anything else let's inspect with %O\n\t\t\t\targs.unshift('%O');\n\t\t\t}\n\n\t\t\t// Apply any `formatters` transformations\n\t\t\tlet index = 0;\n\t\t\targs[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {\n\t\t\t\t// If we encounter an escaped % then don't increase the array index\n\t\t\t\tif (match === '%%') {\n\t\t\t\t\treturn '%';\n\t\t\t\t}\n\t\t\t\tindex++;\n\t\t\t\tconst formatter = createDebug.formatters[format];\n\t\t\t\tif (typeof formatter === 'function') {\n\t\t\t\t\tconst val = args[index];\n\t\t\t\t\tmatch = formatter.call(self, val);\n\n\t\t\t\t\t// Now we need to remove `args[index]` since it's inlined in the `format`\n\t\t\t\t\targs.splice(index, 1);\n\t\t\t\t\tindex--;\n\t\t\t\t}\n\t\t\t\treturn match;\n\t\t\t});\n\n\t\t\t// Apply env-specific formatting (colors, etc.)\n\t\t\tcreateDebug.formatArgs.call(self, args);\n\n\t\t\tconst logFn = self.log || createDebug.log;\n\t\t\tlogFn.apply(self, args);\n\t\t}\n\n\t\tdebug.namespace = namespace;\n\t\tdebug.useColors = createDebug.useColors();\n\t\tdebug.color = createDebug.selectColor(namespace);\n\t\tdebug.extend = extend;\n\t\tdebug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release.\n\n\t\tObject.defineProperty(debug, 'enabled', {\n\t\t\tenumerable: true,\n\t\t\tconfigurable: false,\n\t\t\tget: () => {\n\t\t\t\tif (enableOverride !== null) {\n\t\t\t\t\treturn enableOverride;\n\t\t\t\t}\n\t\t\t\tif (namespacesCache !== createDebug.namespaces) {\n\t\t\t\t\tnamespacesCache = createDebug.namespaces;\n\t\t\t\t\tenabledCache = createDebug.enabled(namespace);\n\t\t\t\t}\n\n\t\t\t\treturn enabledCache;\n\t\t\t},\n\t\t\tset: v => {\n\t\t\t\tenableOverride = v;\n\t\t\t}\n\t\t});\n\n\t\t// Env-specific initialization logic for debug instances\n\t\tif (typeof createDebug.init === 'function') {\n\t\t\tcreateDebug.init(debug);\n\t\t}\n\n\t\treturn debug;\n\t}\n\n\tfunction extend(namespace, delimiter) {\n\t\tconst newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);\n\t\tnewDebug.log = this.log;\n\t\treturn newDebug;\n\t}\n\n\t/**\n\t* Enables a debug mode by namespaces. This can include modes\n\t* separated by a colon and wildcards.\n\t*\n\t* @param {String} namespaces\n\t* @api public\n\t*/\n\tfunction enable(namespaces) {\n\t\tcreateDebug.save(namespaces);\n\t\tcreateDebug.namespaces = namespaces;\n\n\t\tcreateDebug.names = [];\n\t\tcreateDebug.skips = [];\n\n\t\tlet i;\n\t\tconst split = (typeof namespaces === 'string' ? namespaces : '').split(/[\\s,]+/);\n\t\tconst len = split.length;\n\n\t\tfor (i = 0; i < len; i++) {\n\t\t\tif (!split[i]) {\n\t\t\t\t// ignore empty strings\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tnamespaces = split[i].replace(/\\*/g, '.*?');\n\n\t\t\tif (namespaces[0] === '-') {\n\t\t\t\tcreateDebug.skips.push(new RegExp('^' + namespaces.slice(1) + '$'));\n\t\t\t} else {\n\t\t\t\tcreateDebug.names.push(new RegExp('^' + namespaces + '$'));\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t* Disable debug output.\n\t*\n\t* @return {String} namespaces\n\t* @api public\n\t*/\n\tfunction disable() {\n\t\tconst namespaces = [\n\t\t\t...createDebug.names.map(toNamespace),\n\t\t\t...createDebug.skips.map(toNamespace).map(namespace => '-' + namespace)\n\t\t].join(',');\n\t\tcreateDebug.enable('');\n\t\treturn namespaces;\n\t}\n\n\t/**\n\t* Returns true if the given mode name is enabled, false otherwise.\n\t*\n\t* @param {String} name\n\t* @return {Boolean}\n\t* @api public\n\t*/\n\tfunction enabled(name) {\n\t\tif (name[name.length - 1] === '*') {\n\t\t\treturn true;\n\t\t}\n\n\t\tlet i;\n\t\tlet len;\n\n\t\tfor (i = 0, len = createDebug.skips.length; i < len; i++) {\n\t\t\tif (createDebug.skips[i].test(name)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\tfor (i = 0, len = createDebug.names.length; i < len; i++) {\n\t\t\tif (createDebug.names[i].test(name)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n\n\t/**\n\t* Convert regexp to namespace\n\t*\n\t* @param {RegExp} regxep\n\t* @return {String} namespace\n\t* @api private\n\t*/\n\tfunction toNamespace(regexp) {\n\t\treturn regexp.toString()\n\t\t\t.substring(2, regexp.toString().length - 2)\n\t\t\t.replace(/\\.\\*\\?$/, '*');\n\t}\n\n\t/**\n\t* Coerce `val`.\n\t*\n\t* @param {Mixed} val\n\t* @return {Mixed}\n\t* @api private\n\t*/\n\tfunction coerce(val) {\n\t\tif (val instanceof Error) {\n\t\t\treturn val.stack || val.message;\n\t\t}\n\t\treturn val;\n\t}\n\n\t/**\n\t* XXX DO NOT USE. This is a temporary stub function.\n\t* XXX It WILL be removed in the next major release.\n\t*/\n\tfunction destroy() {\n\t\tconsole.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');\n\t}\n\n\tcreateDebug.enable(createDebug.load());\n\n\treturn createDebug;\n}\n\nmodule.exports = setup;\n","'use strict';\n\nvar $defineProperty = require('es-define-property');\n\nvar $SyntaxError = require('es-errors/syntax');\nvar $TypeError = require('es-errors/type');\n\nvar gopd = require('gopd');\n\n/** @type {import('.')} */\nmodule.exports = function defineDataProperty(\n\tobj,\n\tproperty,\n\tvalue\n) {\n\tif (!obj || (typeof obj !== 'object' && typeof obj !== 'function')) {\n\t\tthrow new $TypeError('`obj` must be an object or a function`');\n\t}\n\tif (typeof property !== 'string' && typeof property !== 'symbol') {\n\t\tthrow new $TypeError('`property` must be a string or a symbol`');\n\t}\n\tif (arguments.length > 3 && typeof arguments[3] !== 'boolean' && arguments[3] !== null) {\n\t\tthrow new $TypeError('`nonEnumerable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 4 && typeof arguments[4] !== 'boolean' && arguments[4] !== null) {\n\t\tthrow new $TypeError('`nonWritable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 5 && typeof arguments[5] !== 'boolean' && arguments[5] !== null) {\n\t\tthrow new $TypeError('`nonConfigurable`, if provided, must be a boolean or null');\n\t}\n\tif (arguments.length > 6 && typeof arguments[6] !== 'boolean') {\n\t\tthrow new $TypeError('`loose`, if provided, must be a boolean');\n\t}\n\n\tvar nonEnumerable = arguments.length > 3 ? arguments[3] : null;\n\tvar nonWritable = arguments.length > 4 ? arguments[4] : null;\n\tvar nonConfigurable = arguments.length > 5 ? arguments[5] : null;\n\tvar loose = arguments.length > 6 ? arguments[6] : false;\n\n\t/* @type {false | TypedPropertyDescriptor} */\n\tvar desc = !!gopd && gopd(obj, property);\n\n\tif ($defineProperty) {\n\t\t$defineProperty(obj, property, {\n\t\t\tconfigurable: nonConfigurable === null && desc ? desc.configurable : !nonConfigurable,\n\t\t\tenumerable: nonEnumerable === null && desc ? desc.enumerable : !nonEnumerable,\n\t\t\tvalue: value,\n\t\t\twritable: nonWritable === null && desc ? desc.writable : !nonWritable\n\t\t});\n\t} else if (loose || (!nonEnumerable && !nonWritable && !nonConfigurable)) {\n\t\t// must fall back to [[Set]], and was not explicitly asked to make non-enumerable, non-writable, or non-configurable\n\t\tobj[property] = value; // eslint-disable-line no-param-reassign\n\t} else {\n\t\tthrow new $SyntaxError('This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.');\n\t}\n};\n","'use strict';\n\nvar keys = require('object-keys');\nvar hasSymbols = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol';\n\nvar toStr = Object.prototype.toString;\nvar concat = Array.prototype.concat;\nvar defineDataProperty = require('define-data-property');\n\nvar isFunction = function (fn) {\n\treturn typeof fn === 'function' && toStr.call(fn) === '[object Function]';\n};\n\nvar supportsDescriptors = require('has-property-descriptors')();\n\nvar defineProperty = function (object, name, value, predicate) {\n\tif (name in object) {\n\t\tif (predicate === true) {\n\t\t\tif (object[name] === value) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t} else if (!isFunction(predicate) || !predicate()) {\n\t\t\treturn;\n\t\t}\n\t}\n\n\tif (supportsDescriptors) {\n\t\tdefineDataProperty(object, name, value, true);\n\t} else {\n\t\tdefineDataProperty(object, name, value);\n\t}\n};\n\nvar defineProperties = function (object, map) {\n\tvar predicates = arguments.length > 2 ? arguments[2] : {};\n\tvar props = keys(map);\n\tif (hasSymbols) {\n\t\tprops = concat.call(props, Object.getOwnPropertySymbols(map));\n\t}\n\tfor (var i = 0; i < props.length; i += 1) {\n\t\tdefineProperty(object, props[i], map[props[i]], predicates[props[i]]);\n\t}\n};\n\ndefineProperties.supportsDescriptors = !!supportsDescriptors;\n\nmodule.exports = defineProperties;\n","/**\n * Copyright (c) 2013 Petka Antonov\n * \n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:

\n * \n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n * \n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\"use strict\";\nfunction Deque(capacity) {\n this._capacity = getCapacity(capacity);\n this._length = 0;\n this._front = 0;\n if (isArray(capacity)) {\n var len = capacity.length;\n for (var i = 0; i < len; ++i) {\n this[i] = capacity[i];\n }\n this._length = len;\n }\n}\n\nDeque.prototype.toArray = function Deque$toArray() {\n var len = this._length;\n var ret = new Array(len);\n var front = this._front;\n var capacity = this._capacity;\n for (var j = 0; j < len; ++j) {\n ret[j] = this[(front + j) & (capacity - 1)];\n }\n return ret;\n};\n\nDeque.prototype.push = function Deque$push(item) {\n var argsLength = arguments.length;\n var length = this._length;\n if (argsLength > 1) {\n var capacity = this._capacity;\n if (length + argsLength > capacity) {\n for (var i = 0; i < argsLength; ++i) {\n this._checkCapacity(length + 1);\n var j = (this._front + length) & (this._capacity - 1);\n this[j] = arguments[i];\n length++;\n this._length = length;\n }\n return length;\n }\n else {\n var j = this._front;\n for (var i = 0; i < argsLength; ++i) {\n this[(j + length) & (capacity - 1)] = arguments[i];\n j++;\n }\n this._length = length + argsLength;\n return length + argsLength;\n }\n\n }\n\n if (argsLength === 0) return length;\n\n this._checkCapacity(length + 1);\n var i = (this._front + length) & (this._capacity - 1);\n this[i] = item;\n this._length = length + 1;\n return length + 1;\n};\n\nDeque.prototype.pop = function Deque$pop() {\n var length = this._length;\n if (length === 0) {\n return void 0;\n }\n var i = (this._front + length - 1) & (this._capacity - 1);\n var ret = this[i];\n this[i] = void 0;\n this._length = length - 1;\n return ret;\n};\n\nDeque.prototype.shift = function Deque$shift() {\n var length = this._length;\n if (length === 0) {\n return void 0;\n }\n var front = this._front;\n var ret = this[front];\n this[front] = void 0;\n this._front = (front + 1) & (this._capacity - 1);\n this._length = length - 1;\n return ret;\n};\n\nDeque.prototype.unshift = function Deque$unshift(item) {\n var length = this._length;\n var argsLength = arguments.length;\n\n\n if (argsLength > 1) {\n var capacity = this._capacity;\n if (length + argsLength > capacity) {\n for (var i = argsLength - 1; i >= 0; i--) {\n this._checkCapacity(length + 1);\n var capacity = this._capacity;\n var j = (((( this._front - 1 ) &\n ( capacity - 1) ) ^ capacity ) - capacity );\n this[j] = arguments[i];\n length++;\n this._length = length;\n this._front = j;\n }\n return length;\n }\n else {\n var front = this._front;\n for (var i = argsLength - 1; i >= 0; i--) {\n var j = (((( front - 1 ) &\n ( capacity - 1) ) ^ capacity ) - capacity );\n this[j] = arguments[i];\n front = j;\n }\n this._front = front;\n this._length = length + argsLength;\n return length + argsLength;\n }\n }\n\n if (argsLength === 0) return length;\n\n this._checkCapacity(length + 1);\n var capacity = this._capacity;\n var i = (((( this._front - 1 ) &\n ( capacity - 1) ) ^ capacity ) - capacity );\n this[i] = item;\n this._length = length + 1;\n this._front = i;\n return length + 1;\n};\n\nDeque.prototype.peekBack = function Deque$peekBack() {\n var length = this._length;\n if (length === 0) {\n return void 0;\n }\n var index = (this._front + length - 1) & (this._capacity - 1);\n return this[index];\n};\n\nDeque.prototype.peekFront = function Deque$peekFront() {\n if (this._length === 0) {\n return void 0;\n }\n return this[this._front];\n};\n\nDeque.prototype.get = function Deque$get(index) {\n var i = index;\n if ((i !== (i | 0))) {\n return void 0;\n }\n var len = this._length;\n if (i < 0) {\n i = i + len;\n }\n if (i < 0 || i >= len) {\n return void 0;\n }\n return this[(this._front + i) & (this._capacity - 1)];\n};\n\nDeque.prototype.isEmpty = function Deque$isEmpty() {\n return this._length === 0;\n};\n\nDeque.prototype.clear = function Deque$clear() {\n var len = this._length;\n var front = this._front;\n var capacity = this._capacity;\n for (var j = 0; j < len; ++j) {\n this[(front + j) & (capacity - 1)] = void 0;\n }\n this._length = 0;\n this._front = 0;\n};\n\nDeque.prototype.toString = function Deque$toString() {\n return this.toArray().toString();\n};\n\nDeque.prototype.valueOf = Deque.prototype.toString;\nDeque.prototype.removeFront = Deque.prototype.shift;\nDeque.prototype.removeBack = Deque.prototype.pop;\nDeque.prototype.insertFront = Deque.prototype.unshift;\nDeque.prototype.insertBack = Deque.prototype.push;\nDeque.prototype.enqueue = Deque.prototype.push;\nDeque.prototype.dequeue = Deque.prototype.shift;\nDeque.prototype.toJSON = Deque.prototype.toArray;\n\nObject.defineProperty(Deque.prototype, \"length\", {\n get: function() {\n return this._length;\n },\n set: function() {\n throw new RangeError(\"\");\n }\n});\n\nDeque.prototype._checkCapacity = function Deque$_checkCapacity(size) {\n if (this._capacity < size) {\n this._resizeTo(getCapacity(this._capacity * 1.5 + 16));\n }\n};\n\nDeque.prototype._resizeTo = function Deque$_resizeTo(capacity) {\n var oldCapacity = this._capacity;\n this._capacity = capacity;\n var front = this._front;\n var length = this._length;\n if (front + length > oldCapacity) {\n var moveItemsCount = (front + length) & (oldCapacity - 1);\n arrayMove(this, 0, this, oldCapacity, moveItemsCount);\n }\n};\n\n\nvar isArray = Array.isArray;\n\nfunction arrayMove(src, srcIndex, dst, dstIndex, len) {\n for (var j = 0; j < len; ++j) {\n dst[j + dstIndex] = src[j + srcIndex];\n src[j + srcIndex] = void 0;\n }\n}\n\nfunction pow2AtLeast(n) {\n n = n >>> 0;\n n = n - 1;\n n = n | (n >> 1);\n n = n | (n >> 2);\n n = n | (n >> 4);\n n = n | (n >> 8);\n n = n | (n >> 16);\n return n + 1;\n}\n\nfunction getCapacity(capacity) {\n if (typeof capacity !== \"number\") {\n if (isArray(capacity)) {\n capacity = capacity.length;\n }\n else {\n return 16;\n }\n }\n return pow2AtLeast(\n Math.min(\n Math.max(16, capacity), 1073741824)\n );\n}\n\nmodule.exports = Deque;\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\n/** @type {import('.')} */\nvar $defineProperty = GetIntrinsic('%Object.defineProperty%', true) || false;\nif ($defineProperty) {\n\ttry {\n\t\t$defineProperty({}, 'a', { value: 1 });\n\t} catch (e) {\n\t\t// IE 8 has a broken defineProperty\n\t\t$defineProperty = false;\n\t}\n}\n\nmodule.exports = $defineProperty;\n","'use strict';\n\n/** @type {import('./eval')} */\nmodule.exports = EvalError;\n","'use strict';\n\n/** @type {import('.')} */\nmodule.exports = Error;\n","'use strict';\n\n/** @type {import('./range')} */\nmodule.exports = RangeError;\n","'use strict';\n\n/** @type {import('./ref')} */\nmodule.exports = ReferenceError;\n","'use strict';\n\n/** @type {import('./syntax')} */\nmodule.exports = SyntaxError;\n","'use strict';\n\n/** @type {import('./type')} */\nmodule.exports = TypeError;\n","'use strict';\n\n/** @type {import('./uri')} */\nmodule.exports = URIError;\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nvar R = typeof Reflect === 'object' ? Reflect : null\nvar ReflectApply = R && typeof R.apply === 'function'\n ? R.apply\n : function ReflectApply(target, receiver, args) {\n return Function.prototype.apply.call(target, receiver, args);\n }\n\nvar ReflectOwnKeys\nif (R && typeof R.ownKeys === 'function') {\n ReflectOwnKeys = R.ownKeys\n} else if (Object.getOwnPropertySymbols) {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target)\n .concat(Object.getOwnPropertySymbols(target));\n };\n} else {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target);\n };\n}\n\nfunction ProcessEmitWarning(warning) {\n if (console && console.warn) console.warn(warning);\n}\n\nvar NumberIsNaN = Number.isNaN || function NumberIsNaN(value) {\n return value !== value;\n}\n\nfunction EventEmitter() {\n EventEmitter.init.call(this);\n}\nmodule.exports = EventEmitter;\nmodule.exports.once = once;\n\n// Backwards-compat with node 0.10.x\nEventEmitter.EventEmitter = EventEmitter;\n\nEventEmitter.prototype._events = undefined;\nEventEmitter.prototype._eventsCount = 0;\nEventEmitter.prototype._maxListeners = undefined;\n\n// By default EventEmitters will print a warning if more than 10 listeners are\n// added to it. This is a useful default which helps finding memory leaks.\nvar defaultMaxListeners = 10;\n\nfunction checkListener(listener) {\n if (typeof listener !== 'function') {\n throw new TypeError('The \"listener\" argument must be of type Function. Received type ' + typeof listener);\n }\n}\n\nObject.defineProperty(EventEmitter, 'defaultMaxListeners', {\n enumerable: true,\n get: function() {\n return defaultMaxListeners;\n },\n set: function(arg) {\n if (typeof arg !== 'number' || arg < 0 || NumberIsNaN(arg)) {\n throw new RangeError('The value of \"defaultMaxListeners\" is out of range. It must be a non-negative number. Received ' + arg + '.');\n }\n defaultMaxListeners = arg;\n }\n});\n\nEventEmitter.init = function() {\n\n if (this._events === undefined ||\n this._events === Object.getPrototypeOf(this)._events) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n }\n\n this._maxListeners = this._maxListeners || undefined;\n};\n\n// Obviously not all Emitters should be limited to 10. This function allows\n// that to be increased. Set to zero for unlimited.\nEventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {\n if (typeof n !== 'number' || n < 0 || NumberIsNaN(n)) {\n throw new RangeError('The value of \"n\" is out of range. It must be a non-negative number. Received ' + n + '.');\n }\n this._maxListeners = n;\n return this;\n};\n\nfunction _getMaxListeners(that) {\n if (that._maxListeners === undefined)\n return EventEmitter.defaultMaxListeners;\n return that._maxListeners;\n}\n\nEventEmitter.prototype.getMaxListeners = function getMaxListeners() {\n return _getMaxListeners(this);\n};\n\nEventEmitter.prototype.emit = function emit(type) {\n var args = [];\n for (var i = 1; i < arguments.length; i++) args.push(arguments[i]);\n var doError = (type === 'error');\n\n var events = this._events;\n if (events !== undefined)\n doError = (doError && events.error === undefined);\n else if (!doError)\n return false;\n\n // If there is no 'error' event listener then throw.\n if (doError) {\n var er;\n if (args.length > 0)\n er = args[0];\n if (er instanceof Error) {\n // Note: The comments on the `throw` lines are intentional, they show\n // up in Node's output if this results in an unhandled exception.\n throw er; // Unhandled 'error' event\n }\n // At least give some kind of context to the user\n var err = new Error('Unhandled error.' + (er ? ' (' + er.message + ')' : ''));\n err.context = er;\n throw err; // Unhandled 'error' event\n }\n\n var handler = events[type];\n\n if (handler === undefined)\n return false;\n\n if (typeof handler === 'function') {\n ReflectApply(handler, this, args);\n } else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n ReflectApply(listeners[i], this, args);\n }\n\n return true;\n};\n\nfunction _addListener(target, type, listener, prepend) {\n var m;\n var events;\n var existing;\n\n checkListener(listener);\n\n events = target._events;\n if (events === undefined) {\n events = target._events = Object.create(null);\n target._eventsCount = 0;\n } else {\n // To avoid recursion in the case that type === \"newListener\"! Before\n // adding it to the listeners, first emit \"newListener\".\n if (events.newListener !== undefined) {\n target.emit('newListener', type,\n listener.listener ? listener.listener : listener);\n\n // Re-assign `events` because a newListener handler could have caused the\n // this._events to be assigned to a new object\n events = target._events;\n }\n existing = events[type];\n }\n\n if (existing === undefined) {\n // Optimize the case of one listener. Don't need the extra array object.\n existing = events[type] = listener;\n ++target._eventsCount;\n } else {\n if (typeof existing === 'function') {\n // Adding the second element, need to change to array.\n existing = events[type] =\n prepend ? [listener, existing] : [existing, listener];\n // If we've already got an array, just append.\n } else if (prepend) {\n existing.unshift(listener);\n } else {\n existing.push(listener);\n }\n\n // Check for listener leak\n m = _getMaxListeners(target);\n if (m > 0 && existing.length > m && !existing.warned) {\n existing.warned = true;\n // No error code for this since it is a Warning\n // eslint-disable-next-line no-restricted-syntax\n var w = new Error('Possible EventEmitter memory leak detected. ' +\n existing.length + ' ' + String(type) + ' listeners ' +\n 'added. Use emitter.setMaxListeners() to ' +\n 'increase limit');\n w.name = 'MaxListenersExceededWarning';\n w.emitter = target;\n w.type = type;\n w.count = existing.length;\n ProcessEmitWarning(w);\n }\n }\n\n return target;\n}\n\nEventEmitter.prototype.addListener = function addListener(type, listener) {\n return _addListener(this, type, listener, false);\n};\n\nEventEmitter.prototype.on = EventEmitter.prototype.addListener;\n\nEventEmitter.prototype.prependListener =\n function prependListener(type, listener) {\n return _addListener(this, type, listener, true);\n };\n\nfunction onceWrapper() {\n if (!this.fired) {\n this.target.removeListener(this.type, this.wrapFn);\n this.fired = true;\n if (arguments.length === 0)\n return this.listener.call(this.target);\n return this.listener.apply(this.target, arguments);\n }\n}\n\nfunction _onceWrap(target, type, listener) {\n var state = { fired: false, wrapFn: undefined, target: target, type: type, listener: listener };\n var wrapped = onceWrapper.bind(state);\n wrapped.listener = listener;\n state.wrapFn = wrapped;\n return wrapped;\n}\n\nEventEmitter.prototype.once = function once(type, listener) {\n checkListener(listener);\n this.on(type, _onceWrap(this, type, listener));\n return this;\n};\n\nEventEmitter.prototype.prependOnceListener =\n function prependOnceListener(type, listener) {\n checkListener(listener);\n this.prependListener(type, _onceWrap(this, type, listener));\n return this;\n };\n\n// Emits a 'removeListener' event if and only if the listener was removed.\nEventEmitter.prototype.removeListener =\n function removeListener(type, listener) {\n var list, events, position, i, originalListener;\n\n checkListener(listener);\n\n events = this._events;\n if (events === undefined)\n return this;\n\n list = events[type];\n if (list === undefined)\n return this;\n\n if (list === listener || list.listener === listener) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else {\n delete events[type];\n if (events.removeListener)\n this.emit('removeListener', type, list.listener || listener);\n }\n } else if (typeof list !== 'function') {\n position = -1;\n\n for (i = list.length - 1; i >= 0; i--) {\n if (list[i] === listener || list[i].listener === listener) {\n originalListener = list[i].listener;\n position = i;\n break;\n }\n }\n\n if (position < 0)\n return this;\n\n if (position === 0)\n list.shift();\n else {\n spliceOne(list, position);\n }\n\n if (list.length === 1)\n events[type] = list[0];\n\n if (events.removeListener !== undefined)\n this.emit('removeListener', type, originalListener || listener);\n }\n\n return this;\n };\n\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\n\nEventEmitter.prototype.removeAllListeners =\n function removeAllListeners(type) {\n var listeners, events, i;\n\n events = this._events;\n if (events === undefined)\n return this;\n\n // not listening for removeListener, no need to emit\n if (events.removeListener === undefined) {\n if (arguments.length === 0) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n } else if (events[type] !== undefined) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else\n delete events[type];\n }\n return this;\n }\n\n // emit removeListener for all listeners on all events\n if (arguments.length === 0) {\n var keys = Object.keys(events);\n var key;\n for (i = 0; i < keys.length; ++i) {\n key = keys[i];\n if (key === 'removeListener') continue;\n this.removeAllListeners(key);\n }\n this.removeAllListeners('removeListener');\n this._events = Object.create(null);\n this._eventsCount = 0;\n return this;\n }\n\n listeners = events[type];\n\n if (typeof listeners === 'function') {\n this.removeListener(type, listeners);\n } else if (listeners !== undefined) {\n // LIFO order\n for (i = listeners.length - 1; i >= 0; i--) {\n this.removeListener(type, listeners[i]);\n }\n }\n\n return this;\n };\n\nfunction _listeners(target, type, unwrap) {\n var events = target._events;\n\n if (events === undefined)\n return [];\n\n var evlistener = events[type];\n if (evlistener === undefined)\n return [];\n\n if (typeof evlistener === 'function')\n return unwrap ? [evlistener.listener || evlistener] : [evlistener];\n\n return unwrap ?\n unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length);\n}\n\nEventEmitter.prototype.listeners = function listeners(type) {\n return _listeners(this, type, true);\n};\n\nEventEmitter.prototype.rawListeners = function rawListeners(type) {\n return _listeners(this, type, false);\n};\n\nEventEmitter.listenerCount = function(emitter, type) {\n if (typeof emitter.listenerCount === 'function') {\n return emitter.listenerCount(type);\n } else {\n return listenerCount.call(emitter, type);\n }\n};\n\nEventEmitter.prototype.listenerCount = listenerCount;\nfunction listenerCount(type) {\n var events = this._events;\n\n if (events !== undefined) {\n var evlistener = events[type];\n\n if (typeof evlistener === 'function') {\n return 1;\n } else if (evlistener !== undefined) {\n return evlistener.length;\n }\n }\n\n return 0;\n}\n\nEventEmitter.prototype.eventNames = function eventNames() {\n return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : [];\n};\n\nfunction arrayClone(arr, n) {\n var copy = new Array(n);\n for (var i = 0; i < n; ++i)\n copy[i] = arr[i];\n return copy;\n}\n\nfunction spliceOne(list, index) {\n for (; index + 1 < list.length; index++)\n list[index] = list[index + 1];\n list.pop();\n}\n\nfunction unwrapListeners(arr) {\n var ret = new Array(arr.length);\n for (var i = 0; i < ret.length; ++i) {\n ret[i] = arr[i].listener || arr[i];\n }\n return ret;\n}\n\nfunction once(emitter, name) {\n return new Promise(function (resolve, reject) {\n function errorListener(err) {\n emitter.removeListener(name, resolver);\n reject(err);\n }\n\n function resolver() {\n if (typeof emitter.removeListener === 'function') {\n emitter.removeListener('error', errorListener);\n }\n resolve([].slice.call(arguments));\n };\n\n eventTargetAgnosticAddListener(emitter, name, resolver, { once: true });\n if (name !== 'error') {\n addErrorHandlerIfEventEmitter(emitter, errorListener, { once: true });\n }\n });\n}\n\nfunction addErrorHandlerIfEventEmitter(emitter, handler, flags) {\n if (typeof emitter.on === 'function') {\n eventTargetAgnosticAddListener(emitter, 'error', handler, flags);\n }\n}\n\nfunction eventTargetAgnosticAddListener(emitter, name, listener, flags) {\n if (typeof emitter.on === 'function') {\n if (flags.once) {\n emitter.once(name, listener);\n } else {\n emitter.on(name, listener);\n }\n } else if (typeof emitter.addEventListener === 'function') {\n // EventTarget does not have `error` event semantics like Node\n // EventEmitters, we do not listen for `error` events here.\n emitter.addEventListener(name, function wrapListener(arg) {\n // IE does not have builtin `{ once: true }` support so we\n // have to do it manually.\n if (flags.once) {\n emitter.removeEventListener(name, wrapListener);\n }\n listener(arg);\n });\n } else {\n throw new TypeError('The \"emitter\" argument must be of type EventEmitter. Received type ' + typeof emitter);\n }\n}\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n'use strict';\n\nvar R = typeof Reflect === 'object' ? Reflect : null\nvar ReflectApply = R && typeof R.apply === 'function'\n ? R.apply\n : function ReflectApply(target, receiver, args) {\n return Function.prototype.apply.call(target, receiver, args);\n }\n\nvar ReflectOwnKeys\nif (R && typeof R.ownKeys === 'function') {\n ReflectOwnKeys = R.ownKeys\n} else if (Object.getOwnPropertySymbols) {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target)\n .concat(Object.getOwnPropertySymbols(target));\n };\n} else {\n ReflectOwnKeys = function ReflectOwnKeys(target) {\n return Object.getOwnPropertyNames(target);\n };\n}\n\nfunction ProcessEmitWarning(warning) {\n if (console && console.warn) console.warn(warning);\n}\n\nvar NumberIsNaN = Number.isNaN || function NumberIsNaN(value) {\n return value !== value;\n}\n\nfunction EventEmitter() {\n EventEmitter.init.call(this);\n}\nmodule.exports = EventEmitter;\nmodule.exports.once = once;\n\n// Backwards-compat with node 0.10.x\nEventEmitter.EventEmitter = EventEmitter;\n\nEventEmitter.prototype._events = undefined;\nEventEmitter.prototype._eventsCount = 0;\nEventEmitter.prototype._maxListeners = undefined;\n\n// By default EventEmitters will print a warning if more than 10 listeners are\n// added to it. This is a useful default which helps finding memory leaks.\nvar defaultMaxListeners = 10;\n\nfunction checkListener(listener) {\n if (typeof listener !== 'function') {\n throw new TypeError('The \"listener\" argument must be of type Function. Received type ' + typeof listener);\n }\n}\n\nObject.defineProperty(EventEmitter, 'defaultMaxListeners', {\n enumerable: true,\n get: function() {\n return defaultMaxListeners;\n },\n set: function(arg) {\n if (typeof arg !== 'number' || arg < 0 || NumberIsNaN(arg)) {\n throw new RangeError('The value of \"defaultMaxListeners\" is out of range. It must be a non-negative number. Received ' + arg + '.');\n }\n defaultMaxListeners = arg;\n }\n});\n\nEventEmitter.init = function() {\n\n if (this._events === undefined ||\n this._events === Object.getPrototypeOf(this)._events) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n }\n\n this._maxListeners = this._maxListeners || undefined;\n};\n\n// Obviously not all Emitters should be limited to 10. This function allows\n// that to be increased. Set to zero for unlimited.\nEventEmitter.prototype.setMaxListeners = function setMaxListeners(n) {\n if (typeof n !== 'number' || n < 0 || NumberIsNaN(n)) {\n throw new RangeError('The value of \"n\" is out of range. It must be a non-negative number. Received ' + n + '.');\n }\n this._maxListeners = n;\n return this;\n};\n\nfunction _getMaxListeners(that) {\n if (that._maxListeners === undefined)\n return EventEmitter.defaultMaxListeners;\n return that._maxListeners;\n}\n\nEventEmitter.prototype.getMaxListeners = function getMaxListeners() {\n return _getMaxListeners(this);\n};\n\nEventEmitter.prototype.emit = function emit(type) {\n var args = [];\n for (var i = 1; i < arguments.length; i++) args.push(arguments[i]);\n var doError = (type === 'error');\n\n var events = this._events;\n if (events !== undefined)\n doError = (doError && events.error === undefined);\n else if (!doError)\n return false;\n\n // If there is no 'error' event listener then throw.\n if (doError) {\n var er;\n if (args.length > 0)\n er = args[0];\n if (er instanceof Error) {\n // Note: The comments on the `throw` lines are intentional, they show\n // up in Node's output if this results in an unhandled exception.\n throw er; // Unhandled 'error' event\n }\n // At least give some kind of context to the user\n var err = new Error('Unhandled error.' + (er ? ' (' + er.message + ')' : ''));\n err.context = er;\n throw err; // Unhandled 'error' event\n }\n\n var handler = events[type];\n\n if (handler === undefined)\n return false;\n\n if (typeof handler === 'function') {\n ReflectApply(handler, this, args);\n } else {\n var len = handler.length;\n var listeners = arrayClone(handler, len);\n for (var i = 0; i < len; ++i)\n ReflectApply(listeners[i], this, args);\n }\n\n return true;\n};\n\nfunction _addListener(target, type, listener, prepend) {\n var m;\n var events;\n var existing;\n\n checkListener(listener);\n\n events = target._events;\n if (events === undefined) {\n events = target._events = Object.create(null);\n target._eventsCount = 0;\n } else {\n // To avoid recursion in the case that type === \"newListener\"! Before\n // adding it to the listeners, first emit \"newListener\".\n if (events.newListener !== undefined) {\n target.emit('newListener', type,\n listener.listener ? listener.listener : listener);\n\n // Re-assign `events` because a newListener handler could have caused the\n // this._events to be assigned to a new object\n events = target._events;\n }\n existing = events[type];\n }\n\n if (existing === undefined) {\n // Optimize the case of one listener. Don't need the extra array object.\n existing = events[type] = listener;\n ++target._eventsCount;\n } else {\n if (typeof existing === 'function') {\n // Adding the second element, need to change to array.\n existing = events[type] =\n prepend ? [listener, existing] : [existing, listener];\n // If we've already got an array, just append.\n } else if (prepend) {\n existing.unshift(listener);\n } else {\n existing.push(listener);\n }\n\n // Check for listener leak\n m = _getMaxListeners(target);\n if (m > 0 && existing.length > m && !existing.warned) {\n existing.warned = true;\n // No error code for this since it is a Warning\n // eslint-disable-next-line no-restricted-syntax\n var w = new Error('Possible EventEmitter memory leak detected. ' +\n existing.length + ' ' + String(type) + ' listeners ' +\n 'added. Use emitter.setMaxListeners() to ' +\n 'increase limit');\n w.name = 'MaxListenersExceededWarning';\n w.emitter = target;\n w.type = type;\n w.count = existing.length;\n ProcessEmitWarning(w);\n }\n }\n\n return target;\n}\n\nEventEmitter.prototype.addListener = function addListener(type, listener) {\n return _addListener(this, type, listener, false);\n};\n\nEventEmitter.prototype.on = EventEmitter.prototype.addListener;\n\nEventEmitter.prototype.prependListener =\n function prependListener(type, listener) {\n return _addListener(this, type, listener, true);\n };\n\nfunction onceWrapper() {\n if (!this.fired) {\n this.target.removeListener(this.type, this.wrapFn);\n this.fired = true;\n if (arguments.length === 0)\n return this.listener.call(this.target);\n return this.listener.apply(this.target, arguments);\n }\n}\n\nfunction _onceWrap(target, type, listener) {\n var state = { fired: false, wrapFn: undefined, target: target, type: type, listener: listener };\n var wrapped = onceWrapper.bind(state);\n wrapped.listener = listener;\n state.wrapFn = wrapped;\n return wrapped;\n}\n\nEventEmitter.prototype.once = function once(type, listener) {\n checkListener(listener);\n this.on(type, _onceWrap(this, type, listener));\n return this;\n};\n\nEventEmitter.prototype.prependOnceListener =\n function prependOnceListener(type, listener) {\n checkListener(listener);\n this.prependListener(type, _onceWrap(this, type, listener));\n return this;\n };\n\n// Emits a 'removeListener' event if and only if the listener was removed.\nEventEmitter.prototype.removeListener =\n function removeListener(type, listener) {\n var list, events, position, i, originalListener;\n\n checkListener(listener);\n\n events = this._events;\n if (events === undefined)\n return this;\n\n list = events[type];\n if (list === undefined)\n return this;\n\n if (list === listener || list.listener === listener) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else {\n delete events[type];\n if (events.removeListener)\n this.emit('removeListener', type, list.listener || listener);\n }\n } else if (typeof list !== 'function') {\n position = -1;\n\n for (i = list.length - 1; i >= 0; i--) {\n if (list[i] === listener || list[i].listener === listener) {\n originalListener = list[i].listener;\n position = i;\n break;\n }\n }\n\n if (position < 0)\n return this;\n\n if (position === 0)\n list.shift();\n else {\n spliceOne(list, position);\n }\n\n if (list.length === 1)\n events[type] = list[0];\n\n if (events.removeListener !== undefined)\n this.emit('removeListener', type, originalListener || listener);\n }\n\n return this;\n };\n\nEventEmitter.prototype.off = EventEmitter.prototype.removeListener;\n\nEventEmitter.prototype.removeAllListeners =\n function removeAllListeners(type) {\n var listeners, events, i;\n\n events = this._events;\n if (events === undefined)\n return this;\n\n // not listening for removeListener, no need to emit\n if (events.removeListener === undefined) {\n if (arguments.length === 0) {\n this._events = Object.create(null);\n this._eventsCount = 0;\n } else if (events[type] !== undefined) {\n if (--this._eventsCount === 0)\n this._events = Object.create(null);\n else\n delete events[type];\n }\n return this;\n }\n\n // emit removeListener for all listeners on all events\n if (arguments.length === 0) {\n var keys = Object.keys(events);\n var key;\n for (i = 0; i < keys.length; ++i) {\n key = keys[i];\n if (key === 'removeListener') continue;\n this.removeAllListeners(key);\n }\n this.removeAllListeners('removeListener');\n this._events = Object.create(null);\n this._eventsCount = 0;\n return this;\n }\n\n listeners = events[type];\n\n if (typeof listeners === 'function') {\n this.removeListener(type, listeners);\n } else if (listeners !== undefined) {\n // LIFO order\n for (i = listeners.length - 1; i >= 0; i--) {\n this.removeListener(type, listeners[i]);\n }\n }\n\n return this;\n };\n\nfunction _listeners(target, type, unwrap) {\n var events = target._events;\n\n if (events === undefined)\n return [];\n\n var evlistener = events[type];\n if (evlistener === undefined)\n return [];\n\n if (typeof evlistener === 'function')\n return unwrap ? [evlistener.listener || evlistener] : [evlistener];\n\n return unwrap ?\n unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length);\n}\n\nEventEmitter.prototype.listeners = function listeners(type) {\n return _listeners(this, type, true);\n};\n\nEventEmitter.prototype.rawListeners = function rawListeners(type) {\n return _listeners(this, type, false);\n};\n\nEventEmitter.listenerCount = function(emitter, type) {\n if (typeof emitter.listenerCount === 'function') {\n return emitter.listenerCount(type);\n } else {\n return listenerCount.call(emitter, type);\n }\n};\n\nEventEmitter.prototype.listenerCount = listenerCount;\nfunction listenerCount(type) {\n var events = this._events;\n\n if (events !== undefined) {\n var evlistener = events[type];\n\n if (typeof evlistener === 'function') {\n return 1;\n } else if (evlistener !== undefined) {\n return evlistener.length;\n }\n }\n\n return 0;\n}\n\nEventEmitter.prototype.eventNames = function eventNames() {\n return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : [];\n};\n\nfunction arrayClone(arr, n) {\n var copy = new Array(n);\n for (var i = 0; i < n; ++i)\n copy[i] = arr[i];\n return copy;\n}\n\nfunction spliceOne(list, index) {\n for (; index + 1 < list.length; index++)\n list[index] = list[index + 1];\n list.pop();\n}\n\nfunction unwrapListeners(arr) {\n var ret = new Array(arr.length);\n for (var i = 0; i < ret.length; ++i) {\n ret[i] = arr[i].listener || arr[i];\n }\n return ret;\n}\n\nfunction once(emitter, name) {\n return new Promise(function (resolve, reject) {\n function errorListener(err) {\n emitter.removeListener(name, resolver);\n reject(err);\n }\n\n function resolver() {\n if (typeof emitter.removeListener === 'function') {\n emitter.removeListener('error', errorListener);\n }\n resolve([].slice.call(arguments));\n };\n\n eventTargetAgnosticAddListener(emitter, name, resolver, { once: true });\n if (name !== 'error') {\n addErrorHandlerIfEventEmitter(emitter, errorListener, { once: true });\n }\n });\n}\n\nfunction addErrorHandlerIfEventEmitter(emitter, handler, flags) {\n if (typeof emitter.on === 'function') {\n eventTargetAgnosticAddListener(emitter, 'error', handler, flags);\n }\n}\n\nfunction eventTargetAgnosticAddListener(emitter, name, listener, flags) {\n if (typeof emitter.on === 'function') {\n if (flags.once) {\n emitter.once(name, listener);\n } else {\n emitter.on(name, listener);\n }\n } else if (typeof emitter.addEventListener === 'function') {\n // EventTarget does not have `error` event semantics like Node\n // EventEmitters, we do not listen for `error` events here.\n emitter.addEventListener(name, function wrapListener(arg) {\n // IE does not have builtin `{ once: true }` support so we\n // have to do it manually.\n if (flags.once) {\n emitter.removeEventListener(name, wrapListener);\n }\n listener(arg);\n });\n } else {\n throw new TypeError('The \"emitter\" argument must be of type EventEmitter. Received type ' + typeof emitter);\n }\n}\n","'use strict';\n\nvar isCallable = require('is-callable');\n\nvar toStr = Object.prototype.toString;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\n\nvar forEachArray = function forEachArray(array, iterator, receiver) {\n for (var i = 0, len = array.length; i < len; i++) {\n if (hasOwnProperty.call(array, i)) {\n if (receiver == null) {\n iterator(array[i], i, array);\n } else {\n iterator.call(receiver, array[i], i, array);\n }\n }\n }\n};\n\nvar forEachString = function forEachString(string, iterator, receiver) {\n for (var i = 0, len = string.length; i < len; i++) {\n // no such thing as a sparse string.\n if (receiver == null) {\n iterator(string.charAt(i), i, string);\n } else {\n iterator.call(receiver, string.charAt(i), i, string);\n }\n }\n};\n\nvar forEachObject = function forEachObject(object, iterator, receiver) {\n for (var k in object) {\n if (hasOwnProperty.call(object, k)) {\n if (receiver == null) {\n iterator(object[k], k, object);\n } else {\n iterator.call(receiver, object[k], k, object);\n }\n }\n }\n};\n\nvar forEach = function forEach(list, iterator, thisArg) {\n if (!isCallable(iterator)) {\n throw new TypeError('iterator must be a function');\n }\n\n var receiver;\n if (arguments.length >= 3) {\n receiver = thisArg;\n }\n\n if (toStr.call(list) === '[object Array]') {\n forEachArray(list, iterator, receiver);\n } else if (typeof list === 'string') {\n forEachString(list, iterator, receiver);\n } else {\n forEachObject(list, iterator, receiver);\n }\n};\n\nmodule.exports = forEach;\n","'use strict';\n\n/* eslint no-invalid-this: 1 */\n\nvar ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';\nvar toStr = Object.prototype.toString;\nvar max = Math.max;\nvar funcType = '[object Function]';\n\nvar concatty = function concatty(a, b) {\n var arr = [];\n\n for (var i = 0; i < a.length; i += 1) {\n arr[i] = a[i];\n }\n for (var j = 0; j < b.length; j += 1) {\n arr[j + a.length] = b[j];\n }\n\n return arr;\n};\n\nvar slicy = function slicy(arrLike, offset) {\n var arr = [];\n for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) {\n arr[j] = arrLike[i];\n }\n return arr;\n};\n\nvar joiny = function (arr, joiner) {\n var str = '';\n for (var i = 0; i < arr.length; i += 1) {\n str += arr[i];\n if (i + 1 < arr.length) {\n str += joiner;\n }\n }\n return str;\n};\n\nmodule.exports = function bind(that) {\n var target = this;\n if (typeof target !== 'function' || toStr.apply(target) !== funcType) {\n throw new TypeError(ERROR_MESSAGE + target);\n }\n var args = slicy(arguments, 1);\n\n var bound;\n var binder = function () {\n if (this instanceof bound) {\n var result = target.apply(\n this,\n concatty(args, arguments)\n );\n if (Object(result) === result) {\n return result;\n }\n return this;\n }\n return target.apply(\n that,\n concatty(args, arguments)\n );\n\n };\n\n var boundLength = max(0, target.length - args.length);\n var boundArgs = [];\n for (var i = 0; i < boundLength; i++) {\n boundArgs[i] = '$' + i;\n }\n\n bound = Function('binder', 'return function (' + joiny(boundArgs, ',') + '){ return binder.apply(this,arguments); }')(binder);\n\n if (target.prototype) {\n var Empty = function Empty() {};\n Empty.prototype = target.prototype;\n bound.prototype = new Empty();\n Empty.prototype = null;\n }\n\n return bound;\n};\n","'use strict';\n\nvar implementation = require('./implementation');\n\nmodule.exports = Function.prototype.bind || implementation;\n","'use strict';\n\nvar undefined;\n\nvar $Error = require('es-errors');\nvar $EvalError = require('es-errors/eval');\nvar $RangeError = require('es-errors/range');\nvar $ReferenceError = require('es-errors/ref');\nvar $SyntaxError = require('es-errors/syntax');\nvar $TypeError = require('es-errors/type');\nvar $URIError = require('es-errors/uri');\n\nvar $Function = Function;\n\n// eslint-disable-next-line consistent-return\nvar getEvalledConstructor = function (expressionSyntax) {\n\ttry {\n\t\treturn $Function('\"use strict\"; return (' + expressionSyntax + ').constructor;')();\n\t} catch (e) {}\n};\n\nvar $gOPD = Object.getOwnPropertyDescriptor;\nif ($gOPD) {\n\ttry {\n\t\t$gOPD({}, '');\n\t} catch (e) {\n\t\t$gOPD = null; // this is IE 8, which has a broken gOPD\n\t}\n}\n\nvar throwTypeError = function () {\n\tthrow new $TypeError();\n};\nvar ThrowTypeError = $gOPD\n\t? (function () {\n\t\ttry {\n\t\t\t// eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties\n\t\t\targuments.callee; // IE 8 does not throw here\n\t\t\treturn throwTypeError;\n\t\t} catch (calleeThrows) {\n\t\t\ttry {\n\t\t\t\t// IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')\n\t\t\t\treturn $gOPD(arguments, 'callee').get;\n\t\t\t} catch (gOPDthrows) {\n\t\t\t\treturn throwTypeError;\n\t\t\t}\n\t\t}\n\t}())\n\t: throwTypeError;\n\nvar hasSymbols = require('has-symbols')();\nvar hasProto = require('has-proto')();\n\nvar getProto = Object.getPrototypeOf || (\n\thasProto\n\t\t? function (x) { return x.__proto__; } // eslint-disable-line no-proto\n\t\t: null\n);\n\nvar needsEval = {};\n\nvar TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array);\n\nvar INTRINSICS = {\n\t__proto__: null,\n\t'%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError,\n\t'%Array%': Array,\n\t'%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer,\n\t'%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined,\n\t'%AsyncFromSyncIteratorPrototype%': undefined,\n\t'%AsyncFunction%': needsEval,\n\t'%AsyncGenerator%': needsEval,\n\t'%AsyncGeneratorFunction%': needsEval,\n\t'%AsyncIteratorPrototype%': needsEval,\n\t'%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics,\n\t'%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt,\n\t'%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array,\n\t'%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array,\n\t'%Boolean%': Boolean,\n\t'%DataView%': typeof DataView === 'undefined' ? undefined : DataView,\n\t'%Date%': Date,\n\t'%decodeURI%': decodeURI,\n\t'%decodeURIComponent%': decodeURIComponent,\n\t'%encodeURI%': encodeURI,\n\t'%encodeURIComponent%': encodeURIComponent,\n\t'%Error%': $Error,\n\t'%eval%': eval, // eslint-disable-line no-eval\n\t'%EvalError%': $EvalError,\n\t'%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array,\n\t'%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array,\n\t'%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry,\n\t'%Function%': $Function,\n\t'%GeneratorFunction%': needsEval,\n\t'%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array,\n\t'%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array,\n\t'%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array,\n\t'%isFinite%': isFinite,\n\t'%isNaN%': isNaN,\n\t'%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined,\n\t'%JSON%': typeof JSON === 'object' ? JSON : undefined,\n\t'%Map%': typeof Map === 'undefined' ? undefined : Map,\n\t'%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()),\n\t'%Math%': Math,\n\t'%Number%': Number,\n\t'%Object%': Object,\n\t'%parseFloat%': parseFloat,\n\t'%parseInt%': parseInt,\n\t'%Promise%': typeof Promise === 'undefined' ? undefined : Promise,\n\t'%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy,\n\t'%RangeError%': $RangeError,\n\t'%ReferenceError%': $ReferenceError,\n\t'%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect,\n\t'%RegExp%': RegExp,\n\t'%Set%': typeof Set === 'undefined' ? undefined : Set,\n\t'%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Set()[Symbol.iterator]()),\n\t'%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer,\n\t'%String%': String,\n\t'%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined,\n\t'%Symbol%': hasSymbols ? Symbol : undefined,\n\t'%SyntaxError%': $SyntaxError,\n\t'%ThrowTypeError%': ThrowTypeError,\n\t'%TypedArray%': TypedArray,\n\t'%TypeError%': $TypeError,\n\t'%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array,\n\t'%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray,\n\t'%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array,\n\t'%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array,\n\t'%URIError%': $URIError,\n\t'%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap,\n\t'%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef,\n\t'%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet\n};\n\nif (getProto) {\n\ttry {\n\t\tnull.error; // eslint-disable-line no-unused-expressions\n\t} catch (e) {\n\t\t// https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229\n\t\tvar errorProto = getProto(getProto(e));\n\t\tINTRINSICS['%Error.prototype%'] = errorProto;\n\t}\n}\n\nvar doEval = function doEval(name) {\n\tvar value;\n\tif (name === '%AsyncFunction%') {\n\t\tvalue = getEvalledConstructor('async function () {}');\n\t} else if (name === '%GeneratorFunction%') {\n\t\tvalue = getEvalledConstructor('function* () {}');\n\t} else if (name === '%AsyncGeneratorFunction%') {\n\t\tvalue = getEvalledConstructor('async function* () {}');\n\t} else if (name === '%AsyncGenerator%') {\n\t\tvar fn = doEval('%AsyncGeneratorFunction%');\n\t\tif (fn) {\n\t\t\tvalue = fn.prototype;\n\t\t}\n\t} else if (name === '%AsyncIteratorPrototype%') {\n\t\tvar gen = doEval('%AsyncGenerator%');\n\t\tif (gen && getProto) {\n\t\t\tvalue = getProto(gen.prototype);\n\t\t}\n\t}\n\n\tINTRINSICS[name] = value;\n\n\treturn value;\n};\n\nvar LEGACY_ALIASES = {\n\t__proto__: null,\n\t'%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],\n\t'%ArrayPrototype%': ['Array', 'prototype'],\n\t'%ArrayProto_entries%': ['Array', 'prototype', 'entries'],\n\t'%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],\n\t'%ArrayProto_keys%': ['Array', 'prototype', 'keys'],\n\t'%ArrayProto_values%': ['Array', 'prototype', 'values'],\n\t'%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],\n\t'%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],\n\t'%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],\n\t'%BooleanPrototype%': ['Boolean', 'prototype'],\n\t'%DataViewPrototype%': ['DataView', 'prototype'],\n\t'%DatePrototype%': ['Date', 'prototype'],\n\t'%ErrorPrototype%': ['Error', 'prototype'],\n\t'%EvalErrorPrototype%': ['EvalError', 'prototype'],\n\t'%Float32ArrayPrototype%': ['Float32Array', 'prototype'],\n\t'%Float64ArrayPrototype%': ['Float64Array', 'prototype'],\n\t'%FunctionPrototype%': ['Function', 'prototype'],\n\t'%Generator%': ['GeneratorFunction', 'prototype'],\n\t'%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],\n\t'%Int8ArrayPrototype%': ['Int8Array', 'prototype'],\n\t'%Int16ArrayPrototype%': ['Int16Array', 'prototype'],\n\t'%Int32ArrayPrototype%': ['Int32Array', 'prototype'],\n\t'%JSONParse%': ['JSON', 'parse'],\n\t'%JSONStringify%': ['JSON', 'stringify'],\n\t'%MapPrototype%': ['Map', 'prototype'],\n\t'%NumberPrototype%': ['Number', 'prototype'],\n\t'%ObjectPrototype%': ['Object', 'prototype'],\n\t'%ObjProto_toString%': ['Object', 'prototype', 'toString'],\n\t'%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],\n\t'%PromisePrototype%': ['Promise', 'prototype'],\n\t'%PromiseProto_then%': ['Promise', 'prototype', 'then'],\n\t'%Promise_all%': ['Promise', 'all'],\n\t'%Promise_reject%': ['Promise', 'reject'],\n\t'%Promise_resolve%': ['Promise', 'resolve'],\n\t'%RangeErrorPrototype%': ['RangeError', 'prototype'],\n\t'%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],\n\t'%RegExpPrototype%': ['RegExp', 'prototype'],\n\t'%SetPrototype%': ['Set', 'prototype'],\n\t'%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],\n\t'%StringPrototype%': ['String', 'prototype'],\n\t'%SymbolPrototype%': ['Symbol', 'prototype'],\n\t'%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],\n\t'%TypedArrayPrototype%': ['TypedArray', 'prototype'],\n\t'%TypeErrorPrototype%': ['TypeError', 'prototype'],\n\t'%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],\n\t'%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],\n\t'%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],\n\t'%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],\n\t'%URIErrorPrototype%': ['URIError', 'prototype'],\n\t'%WeakMapPrototype%': ['WeakMap', 'prototype'],\n\t'%WeakSetPrototype%': ['WeakSet', 'prototype']\n};\n\nvar bind = require('function-bind');\nvar hasOwn = require('hasown');\nvar $concat = bind.call(Function.call, Array.prototype.concat);\nvar $spliceApply = bind.call(Function.apply, Array.prototype.splice);\nvar $replace = bind.call(Function.call, String.prototype.replace);\nvar $strSlice = bind.call(Function.call, String.prototype.slice);\nvar $exec = bind.call(Function.call, RegExp.prototype.exec);\n\n/* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */\nvar rePropName = /[^%.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|%$))/g;\nvar reEscapeChar = /\\\\(\\\\)?/g; /** Used to match backslashes in property paths. */\nvar stringToPath = function stringToPath(string) {\n\tvar first = $strSlice(string, 0, 1);\n\tvar last = $strSlice(string, -1);\n\tif (first === '%' && last !== '%') {\n\t\tthrow new $SyntaxError('invalid intrinsic syntax, expected closing `%`');\n\t} else if (last === '%' && first !== '%') {\n\t\tthrow new $SyntaxError('invalid intrinsic syntax, expected opening `%`');\n\t}\n\tvar result = [];\n\t$replace(string, rePropName, function (match, number, quote, subString) {\n\t\tresult[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match;\n\t});\n\treturn result;\n};\n/* end adaptation */\n\nvar getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {\n\tvar intrinsicName = name;\n\tvar alias;\n\tif (hasOwn(LEGACY_ALIASES, intrinsicName)) {\n\t\talias = LEGACY_ALIASES[intrinsicName];\n\t\tintrinsicName = '%' + alias[0] + '%';\n\t}\n\n\tif (hasOwn(INTRINSICS, intrinsicName)) {\n\t\tvar value = INTRINSICS[intrinsicName];\n\t\tif (value === needsEval) {\n\t\t\tvalue = doEval(intrinsicName);\n\t\t}\n\t\tif (typeof value === 'undefined' && !allowMissing) {\n\t\t\tthrow new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!');\n\t\t}\n\n\t\treturn {\n\t\t\talias: alias,\n\t\t\tname: intrinsicName,\n\t\t\tvalue: value\n\t\t};\n\t}\n\n\tthrow new $SyntaxError('intrinsic ' + name + ' does not exist!');\n};\n\nmodule.exports = function GetIntrinsic(name, allowMissing) {\n\tif (typeof name !== 'string' || name.length === 0) {\n\t\tthrow new $TypeError('intrinsic name must be a non-empty string');\n\t}\n\tif (arguments.length > 1 && typeof allowMissing !== 'boolean') {\n\t\tthrow new $TypeError('\"allowMissing\" argument must be a boolean');\n\t}\n\n\tif ($exec(/^%?[^%]*%?$/, name) === null) {\n\t\tthrow new $SyntaxError('`%` may not be present anywhere but at the beginning and end of the intrinsic name');\n\t}\n\tvar parts = stringToPath(name);\n\tvar intrinsicBaseName = parts.length > 0 ? parts[0] : '';\n\n\tvar intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);\n\tvar intrinsicRealName = intrinsic.name;\n\tvar value = intrinsic.value;\n\tvar skipFurtherCaching = false;\n\n\tvar alias = intrinsic.alias;\n\tif (alias) {\n\t\tintrinsicBaseName = alias[0];\n\t\t$spliceApply(parts, $concat([0, 1], alias));\n\t}\n\n\tfor (var i = 1, isOwn = true; i < parts.length; i += 1) {\n\t\tvar part = parts[i];\n\t\tvar first = $strSlice(part, 0, 1);\n\t\tvar last = $strSlice(part, -1);\n\t\tif (\n\t\t\t(\n\t\t\t\t(first === '\"' || first === \"'\" || first === '`')\n\t\t\t\t|| (last === '\"' || last === \"'\" || last === '`')\n\t\t\t)\n\t\t\t&& first !== last\n\t\t) {\n\t\t\tthrow new $SyntaxError('property names with quotes must have matching quotes');\n\t\t}\n\t\tif (part === 'constructor' || !isOwn) {\n\t\t\tskipFurtherCaching = true;\n\t\t}\n\n\t\tintrinsicBaseName += '.' + part;\n\t\tintrinsicRealName = '%' + intrinsicBaseName + '%';\n\n\t\tif (hasOwn(INTRINSICS, intrinsicRealName)) {\n\t\t\tvalue = INTRINSICS[intrinsicRealName];\n\t\t} else if (value != null) {\n\t\t\tif (!(part in value)) {\n\t\t\t\tif (!allowMissing) {\n\t\t\t\t\tthrow new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.');\n\t\t\t\t}\n\t\t\t\treturn void undefined;\n\t\t\t}\n\t\t\tif ($gOPD && (i + 1) >= parts.length) {\n\t\t\t\tvar desc = $gOPD(value, part);\n\t\t\t\tisOwn = !!desc;\n\n\t\t\t\t// By convention, when a data property is converted to an accessor\n\t\t\t\t// property to emulate a data property that does not suffer from\n\t\t\t\t// the override mistake, that accessor's getter is marked with\n\t\t\t\t// an `originalValue` property. Here, when we detect this, we\n\t\t\t\t// uphold the illusion by pretending to see that original data\n\t\t\t\t// property, i.e., returning the value rather than the getter\n\t\t\t\t// itself.\n\t\t\t\tif (isOwn && 'get' in desc && !('originalValue' in desc.get)) {\n\t\t\t\t\tvalue = desc.get;\n\t\t\t\t} else {\n\t\t\t\t\tvalue = value[part];\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tisOwn = hasOwn(value, part);\n\t\t\t\tvalue = value[part];\n\t\t\t}\n\n\t\t\tif (isOwn && !skipFurtherCaching) {\n\t\t\t\tINTRINSICS[intrinsicRealName] = value;\n\t\t\t}\n\t\t}\n\t}\n\treturn value;\n};\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\n\nvar $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);\n\nif ($gOPD) {\n\ttry {\n\t\t$gOPD([], 'length');\n\t} catch (e) {\n\t\t// IE 8 has a broken gOPD\n\t\t$gOPD = null;\n\t}\n}\n\nmodule.exports = $gOPD;\n","'use strict';\n\nvar $defineProperty = require('es-define-property');\n\nvar hasPropertyDescriptors = function hasPropertyDescriptors() {\n\treturn !!$defineProperty;\n};\n\nhasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() {\n\t// node v0.6 has a bug where array lengths can be Set but not Defined\n\tif (!$defineProperty) {\n\t\treturn null;\n\t}\n\ttry {\n\t\treturn $defineProperty([], 'length', { value: 1 }).length !== 1;\n\t} catch (e) {\n\t\t// In Firefox 4-22, defining length on an array throws an exception.\n\t\treturn true;\n\t}\n};\n\nmodule.exports = hasPropertyDescriptors;\n","'use strict';\n\nvar test = {\n\t__proto__: null,\n\tfoo: {}\n};\n\nvar $Object = Object;\n\n/** @type {import('.')} */\nmodule.exports = function hasProto() {\n\t// @ts-expect-error: TS errors on an inherited property for some reason\n\treturn { __proto__: test }.foo === test.foo\n\t\t&& !(test instanceof $Object);\n};\n","'use strict';\n\nvar origSymbol = typeof Symbol !== 'undefined' && Symbol;\nvar hasSymbolSham = require('./shams');\n\nmodule.exports = function hasNativeSymbols() {\n\tif (typeof origSymbol !== 'function') { return false; }\n\tif (typeof Symbol !== 'function') { return false; }\n\tif (typeof origSymbol('foo') !== 'symbol') { return false; }\n\tif (typeof Symbol('bar') !== 'symbol') { return false; }\n\n\treturn hasSymbolSham();\n};\n","'use strict';\n\n/* eslint complexity: [2, 18], max-statements: [2, 33] */\nmodule.exports = function hasSymbols() {\n\tif (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }\n\tif (typeof Symbol.iterator === 'symbol') { return true; }\n\n\tvar obj = {};\n\tvar sym = Symbol('test');\n\tvar symObj = Object(sym);\n\tif (typeof sym === 'string') { return false; }\n\n\tif (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; }\n\tif (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; }\n\n\t// temp disabled per https://github.com/ljharb/object.assign/issues/17\n\t// if (sym instanceof Symbol) { return false; }\n\t// temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4\n\t// if (!(symObj instanceof Symbol)) { return false; }\n\n\t// if (typeof Symbol.prototype.toString !== 'function') { return false; }\n\t// if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }\n\n\tvar symVal = 42;\n\tobj[sym] = symVal;\n\tfor (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop\n\tif (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }\n\n\tif (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }\n\n\tvar syms = Object.getOwnPropertySymbols(obj);\n\tif (syms.length !== 1 || syms[0] !== sym) { return false; }\n\n\tif (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }\n\n\tif (typeof Object.getOwnPropertyDescriptor === 'function') {\n\t\tvar descriptor = Object.getOwnPropertyDescriptor(obj, sym);\n\t\tif (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }\n\t}\n\n\treturn true;\n};\n","'use strict';\n\nvar hasSymbols = require('has-symbols/shams');\n\n/** @type {import('.')} */\nmodule.exports = function hasToStringTagShams() {\n\treturn hasSymbols() && !!Symbol.toStringTag;\n};\n","'use strict';\n\nvar call = Function.prototype.call;\nvar $hasOwn = Object.prototype.hasOwnProperty;\nvar bind = require('function-bind');\n\n/** @type {import('.')} */\nmodule.exports = bind.call(call, $hasOwn);\n","if (typeof Object.create === 'function') {\n // implementation from standard node.js 'util' module\n module.exports = function inherits(ctor, superCtor) {\n if (superCtor) {\n ctor.super_ = superCtor\n ctor.prototype = Object.create(superCtor.prototype, {\n constructor: {\n value: ctor,\n enumerable: false,\n writable: true,\n configurable: true\n }\n })\n }\n };\n} else {\n // old school shim for old browsers\n module.exports = function inherits(ctor, superCtor) {\n if (superCtor) {\n ctor.super_ = superCtor\n var TempCtor = function () {}\n TempCtor.prototype = superCtor.prototype\n ctor.prototype = new TempCtor()\n ctor.prototype.constructor = ctor\n }\n }\n}\n","'use strict';\n\nvar hasToStringTag = require('has-tostringtag/shams')();\nvar callBound = require('call-bind/callBound');\n\nvar $toString = callBound('Object.prototype.toString');\n\nvar isStandardArguments = function isArguments(value) {\n\tif (hasToStringTag && value && typeof value === 'object' && Symbol.toStringTag in value) {\n\t\treturn false;\n\t}\n\treturn $toString(value) === '[object Arguments]';\n};\n\nvar isLegacyArguments = function isArguments(value) {\n\tif (isStandardArguments(value)) {\n\t\treturn true;\n\t}\n\treturn value !== null &&\n\t\ttypeof value === 'object' &&\n\t\ttypeof value.length === 'number' &&\n\t\tvalue.length >= 0 &&\n\t\t$toString(value) !== '[object Array]' &&\n\t\t$toString(value.callee) === '[object Function]';\n};\n\nvar supportsStandardArguments = (function () {\n\treturn isStandardArguments(arguments);\n}());\n\nisStandardArguments.isLegacyArguments = isLegacyArguments; // for tests\n\nmodule.exports = supportsStandardArguments ? isStandardArguments : isLegacyArguments;\n","'use strict';\n\nvar fnToStr = Function.prototype.toString;\nvar reflectApply = typeof Reflect === 'object' && Reflect !== null && Reflect.apply;\nvar badArrayLike;\nvar isCallableMarker;\nif (typeof reflectApply === 'function' && typeof Object.defineProperty === 'function') {\n\ttry {\n\t\tbadArrayLike = Object.defineProperty({}, 'length', {\n\t\t\tget: function () {\n\t\t\t\tthrow isCallableMarker;\n\t\t\t}\n\t\t});\n\t\tisCallableMarker = {};\n\t\t// eslint-disable-next-line no-throw-literal\n\t\treflectApply(function () { throw 42; }, null, badArrayLike);\n\t} catch (_) {\n\t\tif (_ !== isCallableMarker) {\n\t\t\treflectApply = null;\n\t\t}\n\t}\n} else {\n\treflectApply = null;\n}\n\nvar constructorRegex = /^\\s*class\\b/;\nvar isES6ClassFn = function isES6ClassFunction(value) {\n\ttry {\n\t\tvar fnStr = fnToStr.call(value);\n\t\treturn constructorRegex.test(fnStr);\n\t} catch (e) {\n\t\treturn false; // not a function\n\t}\n};\n\nvar tryFunctionObject = function tryFunctionToStr(value) {\n\ttry {\n\t\tif (isES6ClassFn(value)) { return false; }\n\t\tfnToStr.call(value);\n\t\treturn true;\n\t} catch (e) {\n\t\treturn false;\n\t}\n};\nvar toStr = Object.prototype.toString;\nvar objectClass = '[object Object]';\nvar fnClass = '[object Function]';\nvar genClass = '[object GeneratorFunction]';\nvar ddaClass = '[object HTMLAllCollection]'; // IE 11\nvar ddaClass2 = '[object HTML document.all class]';\nvar ddaClass3 = '[object HTMLCollection]'; // IE 9-10\nvar hasToStringTag = typeof Symbol === 'function' && !!Symbol.toStringTag; // better: use `has-tostringtag`\n\nvar isIE68 = !(0 in [,]); // eslint-disable-line no-sparse-arrays, comma-spacing\n\nvar isDDA = function isDocumentDotAll() { return false; };\nif (typeof document === 'object') {\n\t// Firefox 3 canonicalizes DDA to undefined when it's not accessed directly\n\tvar all = document.all;\n\tif (toStr.call(all) === toStr.call(document.all)) {\n\t\tisDDA = function isDocumentDotAll(value) {\n\t\t\t/* globals document: false */\n\t\t\t// in IE 6-8, typeof document.all is \"object\" and it's truthy\n\t\t\tif ((isIE68 || !value) && (typeof value === 'undefined' || typeof value === 'object')) {\n\t\t\t\ttry {\n\t\t\t\t\tvar str = toStr.call(value);\n\t\t\t\t\treturn (\n\t\t\t\t\t\tstr === ddaClass\n\t\t\t\t\t\t|| str === ddaClass2\n\t\t\t\t\t\t|| str === ddaClass3 // opera 12.16\n\t\t\t\t\t\t|| str === objectClass // IE 6-8\n\t\t\t\t\t) && value('') == null; // eslint-disable-line eqeqeq\n\t\t\t\t} catch (e) { /**/ }\n\t\t\t}\n\t\t\treturn false;\n\t\t};\n\t}\n}\n\nmodule.exports = reflectApply\n\t? function isCallable(value) {\n\t\tif (isDDA(value)) { return true; }\n\t\tif (!value) { return false; }\n\t\tif (typeof value !== 'function' && typeof value !== 'object') { return false; }\n\t\ttry {\n\t\t\treflectApply(value, null, badArrayLike);\n\t\t} catch (e) {\n\t\t\tif (e !== isCallableMarker) { return false; }\n\t\t}\n\t\treturn !isES6ClassFn(value) && tryFunctionObject(value);\n\t}\n\t: function isCallable(value) {\n\t\tif (isDDA(value)) { return true; }\n\t\tif (!value) { return false; }\n\t\tif (typeof value !== 'function' && typeof value !== 'object') { return false; }\n\t\tif (hasToStringTag) { return tryFunctionObject(value); }\n\t\tif (isES6ClassFn(value)) { return false; }\n\t\tvar strClass = toStr.call(value);\n\t\tif (strClass !== fnClass && strClass !== genClass && !(/^\\[object HTML/).test(strClass)) { return false; }\n\t\treturn tryFunctionObject(value);\n\t};\n","'use strict';\n\nvar toStr = Object.prototype.toString;\nvar fnToStr = Function.prototype.toString;\nvar isFnRegex = /^\\s*(?:function)?\\*/;\nvar hasToStringTag = require('has-tostringtag/shams')();\nvar getProto = Object.getPrototypeOf;\nvar getGeneratorFunc = function () { // eslint-disable-line consistent-return\n\tif (!hasToStringTag) {\n\t\treturn false;\n\t}\n\ttry {\n\t\treturn Function('return function*() {}')();\n\t} catch (e) {\n\t}\n};\nvar GeneratorFunction;\n\nmodule.exports = function isGeneratorFunction(fn) {\n\tif (typeof fn !== 'function') {\n\t\treturn false;\n\t}\n\tif (isFnRegex.test(fnToStr.call(fn))) {\n\t\treturn true;\n\t}\n\tif (!hasToStringTag) {\n\t\tvar str = toStr.call(fn);\n\t\treturn str === '[object GeneratorFunction]';\n\t}\n\tif (!getProto) {\n\t\treturn false;\n\t}\n\tif (typeof GeneratorFunction === 'undefined') {\n\t\tvar generatorFunc = getGeneratorFunc();\n\t\tGeneratorFunction = generatorFunc ? getProto(generatorFunc) : false;\n\t}\n\treturn getProto(fn) === GeneratorFunction;\n};\n","'use strict';\n\n/* http://www.ecma-international.org/ecma-262/6.0/#sec-number.isnan */\n\nmodule.exports = function isNaN(value) {\n\treturn value !== value;\n};\n","'use strict';\n\nvar callBind = require('call-bind');\nvar define = require('define-properties');\n\nvar implementation = require('./implementation');\nvar getPolyfill = require('./polyfill');\nvar shim = require('./shim');\n\nvar polyfill = callBind(getPolyfill(), Number);\n\n/* http://www.ecma-international.org/ecma-262/6.0/#sec-number.isnan */\n\ndefine(polyfill, {\n\tgetPolyfill: getPolyfill,\n\timplementation: implementation,\n\tshim: shim\n});\n\nmodule.exports = polyfill;\n","'use strict';\n\nvar implementation = require('./implementation');\n\nmodule.exports = function getPolyfill() {\n\tif (Number.isNaN && Number.isNaN(NaN) && !Number.isNaN('a')) {\n\t\treturn Number.isNaN;\n\t}\n\treturn implementation;\n};\n","'use strict';\n\nvar define = require('define-properties');\nvar getPolyfill = require('./polyfill');\n\n/* http://www.ecma-international.org/ecma-262/6.0/#sec-number.isnan */\n\nmodule.exports = function shimNumberIsNaN() {\n\tvar polyfill = getPolyfill();\n\tdefine(Number, { isNaN: polyfill }, {\n\t\tisNaN: function testIsNaN() {\n\t\t\treturn Number.isNaN !== polyfill;\n\t\t}\n\t});\n\treturn polyfill;\n};\n","'use strict';\n\nvar whichTypedArray = require('which-typed-array');\n\n/** @type {import('.')} */\nmodule.exports = function isTypedArray(value) {\n\treturn !!whichTypedArray(value);\n};\n","/**\n * Helpers.\n */\n\nvar s = 1000;\nvar m = s * 60;\nvar h = m * 60;\nvar d = h * 24;\nvar w = d * 7;\nvar y = d * 365.25;\n\n/**\n * Parse or format the given `val`.\n *\n * Options:\n *\n * - `long` verbose formatting [false]\n *\n * @param {String|Number} val\n * @param {Object} [options]\n * @throws {Error} throw an error if val is not a non-empty string or a number\n * @return {String|Number}\n * @api public\n */\n\nmodule.exports = function(val, options) {\n options = options || {};\n var type = typeof val;\n if (type === 'string' && val.length > 0) {\n return parse(val);\n } else if (type === 'number' && isFinite(val)) {\n return options.long ? fmtLong(val) : fmtShort(val);\n }\n throw new Error(\n 'val is not a non-empty string or a valid number. val=' +\n JSON.stringify(val)\n );\n};\n\n/**\n * Parse the given `str` and return milliseconds.\n *\n * @param {String} str\n * @return {Number}\n * @api private\n */\n\nfunction parse(str) {\n str = String(str);\n if (str.length > 100) {\n return;\n }\n var match = /^(-?(?:\\d+)?\\.?\\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(\n str\n );\n if (!match) {\n return;\n }\n var n = parseFloat(match[1]);\n var type = (match[2] || 'ms').toLowerCase();\n switch (type) {\n case 'years':\n case 'year':\n case 'yrs':\n case 'yr':\n case 'y':\n return n * y;\n case 'weeks':\n case 'week':\n case 'w':\n return n * w;\n case 'days':\n case 'day':\n case 'd':\n return n * d;\n case 'hours':\n case 'hour':\n case 'hrs':\n case 'hr':\n case 'h':\n return n * h;\n case 'minutes':\n case 'minute':\n case 'mins':\n case 'min':\n case 'm':\n return n * m;\n case 'seconds':\n case 'second':\n case 'secs':\n case 'sec':\n case 's':\n return n * s;\n case 'milliseconds':\n case 'millisecond':\n case 'msecs':\n case 'msec':\n case 'ms':\n return n;\n default:\n return undefined;\n }\n}\n\n/**\n * Short format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtShort(ms) {\n var msAbs = Math.abs(ms);\n if (msAbs >= d) {\n return Math.round(ms / d) + 'd';\n }\n if (msAbs >= h) {\n return Math.round(ms / h) + 'h';\n }\n if (msAbs >= m) {\n return Math.round(ms / m) + 'm';\n }\n if (msAbs >= s) {\n return Math.round(ms / s) + 's';\n }\n return ms + 'ms';\n}\n\n/**\n * Long format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtLong(ms) {\n var msAbs = Math.abs(ms);\n if (msAbs >= d) {\n return plural(ms, msAbs, d, 'day');\n }\n if (msAbs >= h) {\n return plural(ms, msAbs, h, 'hour');\n }\n if (msAbs >= m) {\n return plural(ms, msAbs, m, 'minute');\n }\n if (msAbs >= s) {\n return plural(ms, msAbs, s, 'second');\n }\n return ms + ' ms';\n}\n\n/**\n * Pluralization helper.\n */\n\nfunction plural(ms, msAbs, n, name) {\n var isPlural = msAbs >= n * 1.5;\n return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');\n}\n","'use strict';\n\nvar numberIsNaN = function (value) {\n\treturn value !== value;\n};\n\nmodule.exports = function is(a, b) {\n\tif (a === 0 && b === 0) {\n\t\treturn 1 / a === 1 / b;\n\t}\n\tif (a === b) {\n\t\treturn true;\n\t}\n\tif (numberIsNaN(a) && numberIsNaN(b)) {\n\t\treturn true;\n\t}\n\treturn false;\n};\n\n","'use strict';\n\nvar define = require('define-properties');\nvar callBind = require('call-bind');\n\nvar implementation = require('./implementation');\nvar getPolyfill = require('./polyfill');\nvar shim = require('./shim');\n\nvar polyfill = callBind(getPolyfill(), Object);\n\ndefine(polyfill, {\n\tgetPolyfill: getPolyfill,\n\timplementation: implementation,\n\tshim: shim\n});\n\nmodule.exports = polyfill;\n","'use strict';\n\nvar implementation = require('./implementation');\n\nmodule.exports = function getPolyfill() {\n\treturn typeof Object.is === 'function' ? Object.is : implementation;\n};\n","'use strict';\n\nvar getPolyfill = require('./polyfill');\nvar define = require('define-properties');\n\nmodule.exports = function shimObjectIs() {\n\tvar polyfill = getPolyfill();\n\tdefine(Object, { is: polyfill }, {\n\t\tis: function testObjectIs() {\n\t\t\treturn Object.is !== polyfill;\n\t\t}\n\t});\n\treturn polyfill;\n};\n","'use strict';\n\nvar keysShim;\nif (!Object.keys) {\n\t// modified from https://github.com/es-shims/es5-shim\n\tvar has = Object.prototype.hasOwnProperty;\n\tvar toStr = Object.prototype.toString;\n\tvar isArgs = require('./isArguments'); // eslint-disable-line global-require\n\tvar isEnumerable = Object.prototype.propertyIsEnumerable;\n\tvar hasDontEnumBug = !isEnumerable.call({ toString: null }, 'toString');\n\tvar hasProtoEnumBug = isEnumerable.call(function () {}, 'prototype');\n\tvar dontEnums = [\n\t\t'toString',\n\t\t'toLocaleString',\n\t\t'valueOf',\n\t\t'hasOwnProperty',\n\t\t'isPrototypeOf',\n\t\t'propertyIsEnumerable',\n\t\t'constructor'\n\t];\n\tvar equalsConstructorPrototype = function (o) {\n\t\tvar ctor = o.constructor;\n\t\treturn ctor && ctor.prototype === o;\n\t};\n\tvar excludedKeys = {\n\t\t$applicationCache: true,\n\t\t$console: true,\n\t\t$external: true,\n\t\t$frame: true,\n\t\t$frameElement: true,\n\t\t$frames: true,\n\t\t$innerHeight: true,\n\t\t$innerWidth: true,\n\t\t$onmozfullscreenchange: true,\n\t\t$onmozfullscreenerror: true,\n\t\t$outerHeight: true,\n\t\t$outerWidth: true,\n\t\t$pageXOffset: true,\n\t\t$pageYOffset: true,\n\t\t$parent: true,\n\t\t$scrollLeft: true,\n\t\t$scrollTop: true,\n\t\t$scrollX: true,\n\t\t$scrollY: true,\n\t\t$self: true,\n\t\t$webkitIndexedDB: true,\n\t\t$webkitStorageInfo: true,\n\t\t$window: true\n\t};\n\tvar hasAutomationEqualityBug = (function () {\n\t\t/* global window */\n\t\tif (typeof window === 'undefined') { return false; }\n\t\tfor (var k in window) {\n\t\t\ttry {\n\t\t\t\tif (!excludedKeys['$' + k] && has.call(window, k) && window[k] !== null && typeof window[k] === 'object') {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tequalsConstructorPrototype(window[k]);\n\t\t\t\t\t} catch (e) {\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch (e) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}());\n\tvar equalsConstructorPrototypeIfNotBuggy = function (o) {\n\t\t/* global window */\n\t\tif (typeof window === 'undefined' || !hasAutomationEqualityBug) {\n\t\t\treturn equalsConstructorPrototype(o);\n\t\t}\n\t\ttry {\n\t\t\treturn equalsConstructorPrototype(o);\n\t\t} catch (e) {\n\t\t\treturn false;\n\t\t}\n\t};\n\n\tkeysShim = function keys(object) {\n\t\tvar isObject = object !== null && typeof object === 'object';\n\t\tvar isFunction = toStr.call(object) === '[object Function]';\n\t\tvar isArguments = isArgs(object);\n\t\tvar isString = isObject && toStr.call(object) === '[object String]';\n\t\tvar theKeys = [];\n\n\t\tif (!isObject && !isFunction && !isArguments) {\n\t\t\tthrow new TypeError('Object.keys called on a non-object');\n\t\t}\n\n\t\tvar skipProto = hasProtoEnumBug && isFunction;\n\t\tif (isString && object.length > 0 && !has.call(object, 0)) {\n\t\t\tfor (var i = 0; i < object.length; ++i) {\n\t\t\t\ttheKeys.push(String(i));\n\t\t\t}\n\t\t}\n\n\t\tif (isArguments && object.length > 0) {\n\t\t\tfor (var j = 0; j < object.length; ++j) {\n\t\t\t\ttheKeys.push(String(j));\n\t\t\t}\n\t\t} else {\n\t\t\tfor (var name in object) {\n\t\t\t\tif (!(skipProto && name === 'prototype') && has.call(object, name)) {\n\t\t\t\t\ttheKeys.push(String(name));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (hasDontEnumBug) {\n\t\t\tvar skipConstructor = equalsConstructorPrototypeIfNotBuggy(object);\n\n\t\t\tfor (var k = 0; k < dontEnums.length; ++k) {\n\t\t\t\tif (!(skipConstructor && dontEnums[k] === 'constructor') && has.call(object, dontEnums[k])) {\n\t\t\t\t\ttheKeys.push(dontEnums[k]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn theKeys;\n\t};\n}\nmodule.exports = keysShim;\n","'use strict';\n\nvar slice = Array.prototype.slice;\nvar isArgs = require('./isArguments');\n\nvar origKeys = Object.keys;\nvar keysShim = origKeys ? function keys(o) { return origKeys(o); } : require('./implementation');\n\nvar originalKeys = Object.keys;\n\nkeysShim.shim = function shimObjectKeys() {\n\tif (Object.keys) {\n\t\tvar keysWorksWithArguments = (function () {\n\t\t\t// Safari 5.0 bug\n\t\t\tvar args = Object.keys(arguments);\n\t\t\treturn args && args.length === arguments.length;\n\t\t}(1, 2));\n\t\tif (!keysWorksWithArguments) {\n\t\t\tObject.keys = function keys(object) { // eslint-disable-line func-name-matching\n\t\t\t\tif (isArgs(object)) {\n\t\t\t\t\treturn originalKeys(slice.call(object));\n\t\t\t\t}\n\t\t\t\treturn originalKeys(object);\n\t\t\t};\n\t\t}\n\t} else {\n\t\tObject.keys = keysShim;\n\t}\n\treturn Object.keys || keysShim;\n};\n\nmodule.exports = keysShim;\n","'use strict';\n\nvar toStr = Object.prototype.toString;\n\nmodule.exports = function isArguments(value) {\n\tvar str = toStr.call(value);\n\tvar isArgs = str === '[object Arguments]';\n\tif (!isArgs) {\n\t\tisArgs = str !== '[object Array]' &&\n\t\t\tvalue !== null &&\n\t\t\ttypeof value === 'object' &&\n\t\t\ttypeof value.length === 'number' &&\n\t\t\tvalue.length >= 0 &&\n\t\t\ttoStr.call(value.callee) === '[object Function]';\n\t}\n\treturn isArgs;\n};\n","'use strict';\n\n// modified from https://github.com/es-shims/es6-shim\nvar objectKeys = require('object-keys');\nvar hasSymbols = require('has-symbols/shams')();\nvar callBound = require('call-bind/callBound');\nvar toObject = Object;\nvar $push = callBound('Array.prototype.push');\nvar $propIsEnumerable = callBound('Object.prototype.propertyIsEnumerable');\nvar originalGetSymbols = hasSymbols ? Object.getOwnPropertySymbols : null;\n\n// eslint-disable-next-line no-unused-vars\nmodule.exports = function assign(target, source1) {\n\tif (target == null) { throw new TypeError('target must be an object'); }\n\tvar to = toObject(target); // step 1\n\tif (arguments.length === 1) {\n\t\treturn to; // step 2\n\t}\n\tfor (var s = 1; s < arguments.length; ++s) {\n\t\tvar from = toObject(arguments[s]); // step 3.a.i\n\n\t\t// step 3.a.ii:\n\t\tvar keys = objectKeys(from);\n\t\tvar getSymbols = hasSymbols && (Object.getOwnPropertySymbols || originalGetSymbols);\n\t\tif (getSymbols) {\n\t\t\tvar syms = getSymbols(from);\n\t\t\tfor (var j = 0; j < syms.length; ++j) {\n\t\t\t\tvar key = syms[j];\n\t\t\t\tif ($propIsEnumerable(from, key)) {\n\t\t\t\t\t$push(keys, key);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// step 3.a.iii:\n\t\tfor (var i = 0; i < keys.length; ++i) {\n\t\t\tvar nextKey = keys[i];\n\t\t\tif ($propIsEnumerable(from, nextKey)) { // step 3.a.iii.2\n\t\t\t\tvar propValue = from[nextKey]; // step 3.a.iii.2.a\n\t\t\t\tto[nextKey] = propValue; // step 3.a.iii.2.b\n\t\t\t}\n\t\t}\n\t}\n\n\treturn to; // step 4\n};\n","'use strict';\n\nvar implementation = require('./implementation');\n\nvar lacksProperEnumerationOrder = function () {\n\tif (!Object.assign) {\n\t\treturn false;\n\t}\n\t/*\n\t * v8, specifically in node 4.x, has a bug with incorrect property enumeration order\n\t * note: this does not detect the bug unless there's 20 characters\n\t */\n\tvar str = 'abcdefghijklmnopqrst';\n\tvar letters = str.split('');\n\tvar map = {};\n\tfor (var i = 0; i < letters.length; ++i) {\n\t\tmap[letters[i]] = letters[i];\n\t}\n\tvar obj = Object.assign({}, map);\n\tvar actual = '';\n\tfor (var k in obj) {\n\t\tactual += k;\n\t}\n\treturn str !== actual;\n};\n\nvar assignHasPendingExceptions = function () {\n\tif (!Object.assign || !Object.preventExtensions) {\n\t\treturn false;\n\t}\n\t/*\n\t * Firefox 37 still has \"pending exception\" logic in its Object.assign implementation,\n\t * which is 72% slower than our shim, and Firefox 40's native implementation.\n\t */\n\tvar thrower = Object.preventExtensions({ 1: 2 });\n\ttry {\n\t\tObject.assign(thrower, 'xy');\n\t} catch (e) {\n\t\treturn thrower[1] === 'y';\n\t}\n\treturn false;\n};\n\nmodule.exports = function getPolyfill() {\n\tif (!Object.assign) {\n\t\treturn implementation;\n\t}\n\tif (lacksProperEnumerationOrder()) {\n\t\treturn implementation;\n\t}\n\tif (assignHasPendingExceptions()) {\n\t\treturn implementation;\n\t}\n\treturn Object.assign;\n};\n","'use strict';\n\n/** @type {import('.')} */\nmodule.exports = [\n\t'Float32Array',\n\t'Float64Array',\n\t'Int8Array',\n\t'Int16Array',\n\t'Int32Array',\n\t'Uint8Array',\n\t'Uint8ClampedArray',\n\t'Uint16Array',\n\t'Uint32Array',\n\t'BigInt64Array',\n\t'BigUint64Array'\n];\n","// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n","/**\n * @license React\n * react-dom.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n/*\n Modernizr 3.0.0pre (Custom Build) | MIT\n*/\n'use strict';var aa=require(\"react\"),ca=require(\"scheduler\");function p(a){for(var b=\"https://reactjs.org/docs/error-decoder.html?invariant=\"+a,c=1;cb}return!1}function v(a,b,c,d,e,f,g){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=d;this.attributeNamespace=e;this.mustUseProperty=c;this.propertyName=a;this.type=b;this.sanitizeURL=f;this.removeEmptyString=g}var z={};\n\"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style\".split(\" \").forEach(function(a){z[a]=new v(a,0,!1,a,null,!1,!1)});[[\"acceptCharset\",\"accept-charset\"],[\"className\",\"class\"],[\"htmlFor\",\"for\"],[\"httpEquiv\",\"http-equiv\"]].forEach(function(a){var b=a[0];z[b]=new v(b,1,!1,a[1],null,!1,!1)});[\"contentEditable\",\"draggable\",\"spellCheck\",\"value\"].forEach(function(a){z[a]=new v(a,2,!1,a.toLowerCase(),null,!1,!1)});\n[\"autoReverse\",\"externalResourcesRequired\",\"focusable\",\"preserveAlpha\"].forEach(function(a){z[a]=new v(a,2,!1,a,null,!1,!1)});\"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope\".split(\" \").forEach(function(a){z[a]=new v(a,3,!1,a.toLowerCase(),null,!1,!1)});\n[\"checked\",\"multiple\",\"muted\",\"selected\"].forEach(function(a){z[a]=new v(a,3,!0,a,null,!1,!1)});[\"capture\",\"download\"].forEach(function(a){z[a]=new v(a,4,!1,a,null,!1,!1)});[\"cols\",\"rows\",\"size\",\"span\"].forEach(function(a){z[a]=new v(a,6,!1,a,null,!1,!1)});[\"rowSpan\",\"start\"].forEach(function(a){z[a]=new v(a,5,!1,a.toLowerCase(),null,!1,!1)});var ra=/[\\-:]([a-z])/g;function sa(a){return a[1].toUpperCase()}\n\"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height\".split(\" \").forEach(function(a){var b=a.replace(ra,\nsa);z[b]=new v(b,1,!1,a,null,!1,!1)});\"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type\".split(\" \").forEach(function(a){var b=a.replace(ra,sa);z[b]=new v(b,1,!1,a,\"http://www.w3.org/1999/xlink\",!1,!1)});[\"xml:base\",\"xml:lang\",\"xml:space\"].forEach(function(a){var b=a.replace(ra,sa);z[b]=new v(b,1,!1,a,\"http://www.w3.org/XML/1998/namespace\",!1,!1)});[\"tabIndex\",\"crossOrigin\"].forEach(function(a){z[a]=new v(a,1,!1,a.toLowerCase(),null,!1,!1)});\nz.xlinkHref=new v(\"xlinkHref\",1,!1,\"xlink:href\",\"http://www.w3.org/1999/xlink\",!0,!1);[\"src\",\"href\",\"action\",\"formAction\"].forEach(function(a){z[a]=new v(a,1,!1,a.toLowerCase(),null,!0,!0)});\nfunction ta(a,b,c,d){var e=z.hasOwnProperty(b)?z[b]:null;if(null!==e?0!==e.type:d||!(2h||e[g]!==f[h]){var k=\"\\n\"+e[g].replace(\" at new \",\" at \");a.displayName&&k.includes(\"\")&&(k=k.replace(\"\",a.displayName));return k}while(1<=g&&0<=h)}break}}}finally{Na=!1,Error.prepareStackTrace=c}return(a=a?a.displayName||a.name:\"\")?Ma(a):\"\"}\nfunction Pa(a){switch(a.tag){case 5:return Ma(a.type);case 16:return Ma(\"Lazy\");case 13:return Ma(\"Suspense\");case 19:return Ma(\"SuspenseList\");case 0:case 2:case 15:return a=Oa(a.type,!1),a;case 11:return a=Oa(a.type.render,!1),a;case 1:return a=Oa(a.type,!0),a;default:return\"\"}}\nfunction Qa(a){if(null==a)return null;if(\"function\"===typeof a)return a.displayName||a.name||null;if(\"string\"===typeof a)return a;switch(a){case ya:return\"Fragment\";case wa:return\"Portal\";case Aa:return\"Profiler\";case za:return\"StrictMode\";case Ea:return\"Suspense\";case Fa:return\"SuspenseList\"}if(\"object\"===typeof a)switch(a.$$typeof){case Ca:return(a.displayName||\"Context\")+\".Consumer\";case Ba:return(a._context.displayName||\"Context\")+\".Provider\";case Da:var b=a.render;a=a.displayName;a||(a=b.displayName||\nb.name||\"\",a=\"\"!==a?\"ForwardRef(\"+a+\")\":\"ForwardRef\");return a;case Ga:return b=a.displayName||null,null!==b?b:Qa(a.type)||\"Memo\";case Ha:b=a._payload;a=a._init;try{return Qa(a(b))}catch(c){}}return null}\nfunction Ra(a){var b=a.type;switch(a.tag){case 24:return\"Cache\";case 9:return(b.displayName||\"Context\")+\".Consumer\";case 10:return(b._context.displayName||\"Context\")+\".Provider\";case 18:return\"DehydratedFragment\";case 11:return a=b.render,a=a.displayName||a.name||\"\",b.displayName||(\"\"!==a?\"ForwardRef(\"+a+\")\":\"ForwardRef\");case 7:return\"Fragment\";case 5:return b;case 4:return\"Portal\";case 3:return\"Root\";case 6:return\"Text\";case 16:return Qa(b);case 8:return b===za?\"StrictMode\":\"Mode\";case 22:return\"Offscreen\";\ncase 12:return\"Profiler\";case 21:return\"Scope\";case 13:return\"Suspense\";case 19:return\"SuspenseList\";case 25:return\"TracingMarker\";case 1:case 0:case 17:case 2:case 14:case 15:if(\"function\"===typeof b)return b.displayName||b.name||null;if(\"string\"===typeof b)return b}return null}function Sa(a){switch(typeof a){case \"boolean\":case \"number\":case \"string\":case \"undefined\":return a;case \"object\":return a;default:return\"\"}}\nfunction Ta(a){var b=a.type;return(a=a.nodeName)&&\"input\"===a.toLowerCase()&&(\"checkbox\"===b||\"radio\"===b)}\nfunction Ua(a){var b=Ta(a)?\"checked\":\"value\",c=Object.getOwnPropertyDescriptor(a.constructor.prototype,b),d=\"\"+a[b];if(!a.hasOwnProperty(b)&&\"undefined\"!==typeof c&&\"function\"===typeof c.get&&\"function\"===typeof c.set){var e=c.get,f=c.set;Object.defineProperty(a,b,{configurable:!0,get:function(){return e.call(this)},set:function(a){d=\"\"+a;f.call(this,a)}});Object.defineProperty(a,b,{enumerable:c.enumerable});return{getValue:function(){return d},setValue:function(a){d=\"\"+a},stopTracking:function(){a._valueTracker=\nnull;delete a[b]}}}}function Va(a){a._valueTracker||(a._valueTracker=Ua(a))}function Wa(a){if(!a)return!1;var b=a._valueTracker;if(!b)return!0;var c=b.getValue();var d=\"\";a&&(d=Ta(a)?a.checked?\"true\":\"false\":a.value);a=d;return a!==c?(b.setValue(a),!0):!1}function Xa(a){a=a||(\"undefined\"!==typeof document?document:void 0);if(\"undefined\"===typeof a)return null;try{return a.activeElement||a.body}catch(b){return a.body}}\nfunction Ya(a,b){var c=b.checked;return A({},b,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=c?c:a._wrapperState.initialChecked})}function Za(a,b){var c=null==b.defaultValue?\"\":b.defaultValue,d=null!=b.checked?b.checked:b.defaultChecked;c=Sa(null!=b.value?b.value:c);a._wrapperState={initialChecked:d,initialValue:c,controlled:\"checkbox\"===b.type||\"radio\"===b.type?null!=b.checked:null!=b.value}}function ab(a,b){b=b.checked;null!=b&&ta(a,\"checked\",b,!1)}\nfunction bb(a,b){ab(a,b);var c=Sa(b.value),d=b.type;if(null!=c)if(\"number\"===d){if(0===c&&\"\"===a.value||a.value!=c)a.value=\"\"+c}else a.value!==\"\"+c&&(a.value=\"\"+c);else if(\"submit\"===d||\"reset\"===d){a.removeAttribute(\"value\");return}b.hasOwnProperty(\"value\")?cb(a,b.type,c):b.hasOwnProperty(\"defaultValue\")&&cb(a,b.type,Sa(b.defaultValue));null==b.checked&&null!=b.defaultChecked&&(a.defaultChecked=!!b.defaultChecked)}\nfunction db(a,b,c){if(b.hasOwnProperty(\"value\")||b.hasOwnProperty(\"defaultValue\")){var d=b.type;if(!(\"submit\"!==d&&\"reset\"!==d||void 0!==b.value&&null!==b.value))return;b=\"\"+a._wrapperState.initialValue;c||b===a.value||(a.value=b);a.defaultValue=b}c=a.name;\"\"!==c&&(a.name=\"\");a.defaultChecked=!!a._wrapperState.initialChecked;\"\"!==c&&(a.name=c)}\nfunction cb(a,b,c){if(\"number\"!==b||Xa(a.ownerDocument)!==a)null==c?a.defaultValue=\"\"+a._wrapperState.initialValue:a.defaultValue!==\"\"+c&&(a.defaultValue=\"\"+c)}var eb=Array.isArray;\nfunction fb(a,b,c,d){a=a.options;if(b){b={};for(var e=0;e\"+b.valueOf().toString()+\"\";for(b=mb.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;b.firstChild;)a.appendChild(b.firstChild)}});\nfunction ob(a,b){if(b){var c=a.firstChild;if(c&&c===a.lastChild&&3===c.nodeType){c.nodeValue=b;return}}a.textContent=b}\nvar pb={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,\nzoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},qb=[\"Webkit\",\"ms\",\"Moz\",\"O\"];Object.keys(pb).forEach(function(a){qb.forEach(function(b){b=b+a.charAt(0).toUpperCase()+a.substring(1);pb[b]=pb[a]})});function rb(a,b,c){return null==b||\"boolean\"===typeof b||\"\"===b?\"\":c||\"number\"!==typeof b||0===b||pb.hasOwnProperty(a)&&pb[a]?(\"\"+b).trim():b+\"px\"}\nfunction sb(a,b){a=a.style;for(var c in b)if(b.hasOwnProperty(c)){var d=0===c.indexOf(\"--\"),e=rb(c,b[c],d);\"float\"===c&&(c=\"cssFloat\");d?a.setProperty(c,e):a[c]=e}}var tb=A({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});\nfunction ub(a,b){if(b){if(tb[a]&&(null!=b.children||null!=b.dangerouslySetInnerHTML))throw Error(p(137,a));if(null!=b.dangerouslySetInnerHTML){if(null!=b.children)throw Error(p(60));if(\"object\"!==typeof b.dangerouslySetInnerHTML||!(\"__html\"in b.dangerouslySetInnerHTML))throw Error(p(61));}if(null!=b.style&&\"object\"!==typeof b.style)throw Error(p(62));}}\nfunction vb(a,b){if(-1===a.indexOf(\"-\"))return\"string\"===typeof b.is;switch(a){case \"annotation-xml\":case \"color-profile\":case \"font-face\":case \"font-face-src\":case \"font-face-uri\":case \"font-face-format\":case \"font-face-name\":case \"missing-glyph\":return!1;default:return!0}}var wb=null;function xb(a){a=a.target||a.srcElement||window;a.correspondingUseElement&&(a=a.correspondingUseElement);return 3===a.nodeType?a.parentNode:a}var yb=null,zb=null,Ab=null;\nfunction Bb(a){if(a=Cb(a)){if(\"function\"!==typeof yb)throw Error(p(280));var b=a.stateNode;b&&(b=Db(b),yb(a.stateNode,a.type,b))}}function Eb(a){zb?Ab?Ab.push(a):Ab=[a]:zb=a}function Fb(){if(zb){var a=zb,b=Ab;Ab=zb=null;Bb(a);if(b)for(a=0;a>>=0;return 0===a?32:31-(pc(a)/qc|0)|0}var rc=64,sc=4194304;\nfunction tc(a){switch(a&-a){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return a&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return a&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;\ndefault:return a}}function uc(a,b){var c=a.pendingLanes;if(0===c)return 0;var d=0,e=a.suspendedLanes,f=a.pingedLanes,g=c&268435455;if(0!==g){var h=g&~e;0!==h?d=tc(h):(f&=g,0!==f&&(d=tc(f)))}else g=c&~e,0!==g?d=tc(g):0!==f&&(d=tc(f));if(0===d)return 0;if(0!==b&&b!==d&&0===(b&e)&&(e=d&-d,f=b&-b,e>=f||16===e&&0!==(f&4194240)))return b;0!==(d&4)&&(d|=c&16);b=a.entangledLanes;if(0!==b)for(a=a.entanglements,b&=d;0c;c++)b.push(a);return b}\nfunction Ac(a,b,c){a.pendingLanes|=b;536870912!==b&&(a.suspendedLanes=0,a.pingedLanes=0);a=a.eventTimes;b=31-oc(b);a[b]=c}function Bc(a,b){var c=a.pendingLanes&~b;a.pendingLanes=b;a.suspendedLanes=0;a.pingedLanes=0;a.expiredLanes&=b;a.mutableReadLanes&=b;a.entangledLanes&=b;b=a.entanglements;var d=a.eventTimes;for(a=a.expirationTimes;0=be),ee=String.fromCharCode(32),fe=!1;\nfunction ge(a,b){switch(a){case \"keyup\":return-1!==$d.indexOf(b.keyCode);case \"keydown\":return 229!==b.keyCode;case \"keypress\":case \"mousedown\":case \"focusout\":return!0;default:return!1}}function he(a){a=a.detail;return\"object\"===typeof a&&\"data\"in a?a.data:null}var ie=!1;function je(a,b){switch(a){case \"compositionend\":return he(b);case \"keypress\":if(32!==b.which)return null;fe=!0;return ee;case \"textInput\":return a=b.data,a===ee&&fe?null:a;default:return null}}\nfunction ke(a,b){if(ie)return\"compositionend\"===a||!ae&&ge(a,b)?(a=nd(),md=ld=kd=null,ie=!1,a):null;switch(a){case \"paste\":return null;case \"keypress\":if(!(b.ctrlKey||b.altKey||b.metaKey)||b.ctrlKey&&b.altKey){if(b.char&&1=b)return{node:c,offset:b-a};a=d}a:{for(;c;){if(c.nextSibling){c=c.nextSibling;break a}c=c.parentNode}c=void 0}c=Je(c)}}function Le(a,b){return a&&b?a===b?!0:a&&3===a.nodeType?!1:b&&3===b.nodeType?Le(a,b.parentNode):\"contains\"in a?a.contains(b):a.compareDocumentPosition?!!(a.compareDocumentPosition(b)&16):!1:!1}\nfunction Me(){for(var a=window,b=Xa();b instanceof a.HTMLIFrameElement;){try{var c=\"string\"===typeof b.contentWindow.location.href}catch(d){c=!1}if(c)a=b.contentWindow;else break;b=Xa(a.document)}return b}function Ne(a){var b=a&&a.nodeName&&a.nodeName.toLowerCase();return b&&(\"input\"===b&&(\"text\"===a.type||\"search\"===a.type||\"tel\"===a.type||\"url\"===a.type||\"password\"===a.type)||\"textarea\"===b||\"true\"===a.contentEditable)}\nfunction Oe(a){var b=Me(),c=a.focusedElem,d=a.selectionRange;if(b!==c&&c&&c.ownerDocument&&Le(c.ownerDocument.documentElement,c)){if(null!==d&&Ne(c))if(b=d.start,a=d.end,void 0===a&&(a=b),\"selectionStart\"in c)c.selectionStart=b,c.selectionEnd=Math.min(a,c.value.length);else if(a=(b=c.ownerDocument||document)&&b.defaultView||window,a.getSelection){a=a.getSelection();var e=c.textContent.length,f=Math.min(d.start,e);d=void 0===d.end?f:Math.min(d.end,e);!a.extend&&f>d&&(e=d,d=f,f=e);e=Ke(c,f);var g=Ke(c,\nd);e&&g&&(1!==a.rangeCount||a.anchorNode!==e.node||a.anchorOffset!==e.offset||a.focusNode!==g.node||a.focusOffset!==g.offset)&&(b=b.createRange(),b.setStart(e.node,e.offset),a.removeAllRanges(),f>d?(a.addRange(b),a.extend(g.node,g.offset)):(b.setEnd(g.node,g.offset),a.addRange(b)))}b=[];for(a=c;a=a.parentNode;)1===a.nodeType&&b.push({element:a,left:a.scrollLeft,top:a.scrollTop});\"function\"===typeof c.focus&&c.focus();for(c=0;c=document.documentMode,Qe=null,Re=null,Se=null,Te=!1;\nfunction Ue(a,b,c){var d=c.window===c?c.document:9===c.nodeType?c:c.ownerDocument;Te||null==Qe||Qe!==Xa(d)||(d=Qe,\"selectionStart\"in d&&Ne(d)?d={start:d.selectionStart,end:d.selectionEnd}:(d=(d.ownerDocument&&d.ownerDocument.defaultView||window).getSelection(),d={anchorNode:d.anchorNode,anchorOffset:d.anchorOffset,focusNode:d.focusNode,focusOffset:d.focusOffset}),Se&&Ie(Se,d)||(Se=d,d=oe(Re,\"onSelect\"),0Tf||(a.current=Sf[Tf],Sf[Tf]=null,Tf--)}function G(a,b){Tf++;Sf[Tf]=a.current;a.current=b}var Vf={},H=Uf(Vf),Wf=Uf(!1),Xf=Vf;function Yf(a,b){var c=a.type.contextTypes;if(!c)return Vf;var d=a.stateNode;if(d&&d.__reactInternalMemoizedUnmaskedChildContext===b)return d.__reactInternalMemoizedMaskedChildContext;var e={},f;for(f in c)e[f]=b[f];d&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=b,a.__reactInternalMemoizedMaskedChildContext=e);return e}\nfunction Zf(a){a=a.childContextTypes;return null!==a&&void 0!==a}function $f(){E(Wf);E(H)}function ag(a,b,c){if(H.current!==Vf)throw Error(p(168));G(H,b);G(Wf,c)}function bg(a,b,c){var d=a.stateNode;b=b.childContextTypes;if(\"function\"!==typeof d.getChildContext)return c;d=d.getChildContext();for(var e in d)if(!(e in b))throw Error(p(108,Ra(a)||\"Unknown\",e));return A({},c,d)}\nfunction cg(a){a=(a=a.stateNode)&&a.__reactInternalMemoizedMergedChildContext||Vf;Xf=H.current;G(H,a);G(Wf,Wf.current);return!0}function dg(a,b,c){var d=a.stateNode;if(!d)throw Error(p(169));c?(a=bg(a,b,Xf),d.__reactInternalMemoizedMergedChildContext=a,E(Wf),E(H),G(H,a)):E(Wf);G(Wf,c)}var eg=null,fg=!1,gg=!1;function hg(a){null===eg?eg=[a]:eg.push(a)}function ig(a){fg=!0;hg(a)}\nfunction jg(){if(!gg&&null!==eg){gg=!0;var a=0,b=C;try{var c=eg;for(C=1;a>=g;e-=g;rg=1<<32-oc(b)+e|c<w?(x=u,u=null):x=u.sibling;var n=r(e,u,h[w],k);if(null===n){null===u&&(u=x);break}a&&u&&null===n.alternate&&b(e,u);g=f(n,g,w);null===m?l=n:m.sibling=n;m=n;u=x}if(w===h.length)return c(e,u),I&&tg(e,w),l;if(null===u){for(;ww?(x=m,m=null):x=m.sibling;var t=r(e,m,n.value,k);if(null===t){null===m&&(m=x);break}a&&m&&null===t.alternate&&b(e,m);g=f(t,g,w);null===u?l=t:u.sibling=t;u=t;m=x}if(n.done)return c(e,\nm),I&&tg(e,w),l;if(null===m){for(;!n.done;w++,n=h.next())n=q(e,n.value,k),null!==n&&(g=f(n,g,w),null===u?l=n:u.sibling=n,u=n);I&&tg(e,w);return l}for(m=d(e,m);!n.done;w++,n=h.next())n=y(m,e,w,n.value,k),null!==n&&(a&&null!==n.alternate&&m.delete(null===n.key?w:n.key),g=f(n,g,w),null===u?l=n:u.sibling=n,u=n);a&&m.forEach(function(a){return b(e,a)});I&&tg(e,w);return l}function J(a,d,f,h){\"object\"===typeof f&&null!==f&&f.type===ya&&null===f.key&&(f=f.props.children);if(\"object\"===typeof f&&null!==f){switch(f.$$typeof){case va:a:{for(var k=\nf.key,l=d;null!==l;){if(l.key===k){k=f.type;if(k===ya){if(7===l.tag){c(a,l.sibling);d=e(l,f.props.children);d.return=a;a=d;break a}}else if(l.elementType===k||\"object\"===typeof k&&null!==k&&k.$$typeof===Ha&&Ng(k)===l.type){c(a,l.sibling);d=e(l,f.props);d.ref=Lg(a,l,f);d.return=a;a=d;break a}c(a,l);break}else b(a,l);l=l.sibling}f.type===ya?(d=Tg(f.props.children,a.mode,h,f.key),d.return=a,a=d):(h=Rg(f.type,f.key,f.props,null,a.mode,h),h.ref=Lg(a,d,f),h.return=a,a=h)}return g(a);case wa:a:{for(l=f.key;null!==\nd;){if(d.key===l)if(4===d.tag&&d.stateNode.containerInfo===f.containerInfo&&d.stateNode.implementation===f.implementation){c(a,d.sibling);d=e(d,f.children||[]);d.return=a;a=d;break a}else{c(a,d);break}else b(a,d);d=d.sibling}d=Sg(f,a.mode,h);d.return=a;a=d}return g(a);case Ha:return l=f._init,J(a,d,l(f._payload),h)}if(eb(f))return n(a,d,f,h);if(Ka(f))return t(a,d,f,h);Mg(a,f)}return\"string\"===typeof f&&\"\"!==f||\"number\"===typeof f?(f=\"\"+f,null!==d&&6===d.tag?(c(a,d.sibling),d=e(d,f),d.return=a,a=d):\n(c(a,d),d=Qg(f,a.mode,h),d.return=a,a=d),g(a)):c(a,d)}return J}var Ug=Og(!0),Vg=Og(!1),Wg=Uf(null),Xg=null,Yg=null,Zg=null;function $g(){Zg=Yg=Xg=null}function ah(a){var b=Wg.current;E(Wg);a._currentValue=b}function bh(a,b,c){for(;null!==a;){var d=a.alternate;(a.childLanes&b)!==b?(a.childLanes|=b,null!==d&&(d.childLanes|=b)):null!==d&&(d.childLanes&b)!==b&&(d.childLanes|=b);if(a===c)break;a=a.return}}\nfunction ch(a,b){Xg=a;Zg=Yg=null;a=a.dependencies;null!==a&&null!==a.firstContext&&(0!==(a.lanes&b)&&(dh=!0),a.firstContext=null)}function eh(a){var b=a._currentValue;if(Zg!==a)if(a={context:a,memoizedValue:b,next:null},null===Yg){if(null===Xg)throw Error(p(308));Yg=a;Xg.dependencies={lanes:0,firstContext:a}}else Yg=Yg.next=a;return b}var fh=null;function gh(a){null===fh?fh=[a]:fh.push(a)}\nfunction hh(a,b,c,d){var e=b.interleaved;null===e?(c.next=c,gh(b)):(c.next=e.next,e.next=c);b.interleaved=c;return ih(a,d)}function ih(a,b){a.lanes|=b;var c=a.alternate;null!==c&&(c.lanes|=b);c=a;for(a=a.return;null!==a;)a.childLanes|=b,c=a.alternate,null!==c&&(c.childLanes|=b),c=a,a=a.return;return 3===c.tag?c.stateNode:null}var jh=!1;function kh(a){a.updateQueue={baseState:a.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}\nfunction lh(a,b){a=a.updateQueue;b.updateQueue===a&&(b.updateQueue={baseState:a.baseState,firstBaseUpdate:a.firstBaseUpdate,lastBaseUpdate:a.lastBaseUpdate,shared:a.shared,effects:a.effects})}function mh(a,b){return{eventTime:a,lane:b,tag:0,payload:null,callback:null,next:null}}\nfunction nh(a,b,c){var d=a.updateQueue;if(null===d)return null;d=d.shared;if(0!==(K&2)){var e=d.pending;null===e?b.next=b:(b.next=e.next,e.next=b);d.pending=b;return ih(a,c)}e=d.interleaved;null===e?(b.next=b,gh(d)):(b.next=e.next,e.next=b);d.interleaved=b;return ih(a,c)}function oh(a,b,c){b=b.updateQueue;if(null!==b&&(b=b.shared,0!==(c&4194240))){var d=b.lanes;d&=a.pendingLanes;c|=d;b.lanes=c;Cc(a,c)}}\nfunction ph(a,b){var c=a.updateQueue,d=a.alternate;if(null!==d&&(d=d.updateQueue,c===d)){var e=null,f=null;c=c.firstBaseUpdate;if(null!==c){do{var g={eventTime:c.eventTime,lane:c.lane,tag:c.tag,payload:c.payload,callback:c.callback,next:null};null===f?e=f=g:f=f.next=g;c=c.next}while(null!==c);null===f?e=f=b:f=f.next=b}else e=f=b;c={baseState:d.baseState,firstBaseUpdate:e,lastBaseUpdate:f,shared:d.shared,effects:d.effects};a.updateQueue=c;return}a=c.lastBaseUpdate;null===a?c.firstBaseUpdate=b:a.next=\nb;c.lastBaseUpdate=b}\nfunction qh(a,b,c,d){var e=a.updateQueue;jh=!1;var f=e.firstBaseUpdate,g=e.lastBaseUpdate,h=e.shared.pending;if(null!==h){e.shared.pending=null;var k=h,l=k.next;k.next=null;null===g?f=l:g.next=l;g=k;var m=a.alternate;null!==m&&(m=m.updateQueue,h=m.lastBaseUpdate,h!==g&&(null===h?m.firstBaseUpdate=l:h.next=l,m.lastBaseUpdate=k))}if(null!==f){var q=e.baseState;g=0;m=l=k=null;h=f;do{var r=h.lane,y=h.eventTime;if((d&r)===r){null!==m&&(m=m.next={eventTime:y,lane:0,tag:h.tag,payload:h.payload,callback:h.callback,\nnext:null});a:{var n=a,t=h;r=b;y=c;switch(t.tag){case 1:n=t.payload;if(\"function\"===typeof n){q=n.call(y,q,r);break a}q=n;break a;case 3:n.flags=n.flags&-65537|128;case 0:n=t.payload;r=\"function\"===typeof n?n.call(y,q,r):n;if(null===r||void 0===r)break a;q=A({},q,r);break a;case 2:jh=!0}}null!==h.callback&&0!==h.lane&&(a.flags|=64,r=e.effects,null===r?e.effects=[h]:r.push(h))}else y={eventTime:y,lane:r,tag:h.tag,payload:h.payload,callback:h.callback,next:null},null===m?(l=m=y,k=q):m=m.next=y,g|=r;\nh=h.next;if(null===h)if(h=e.shared.pending,null===h)break;else r=h,h=r.next,r.next=null,e.lastBaseUpdate=r,e.shared.pending=null}while(1);null===m&&(k=q);e.baseState=k;e.firstBaseUpdate=l;e.lastBaseUpdate=m;b=e.shared.interleaved;if(null!==b){e=b;do g|=e.lane,e=e.next;while(e!==b)}else null===f&&(e.shared.lanes=0);rh|=g;a.lanes=g;a.memoizedState=q}}\nfunction sh(a,b,c){a=b.effects;b.effects=null;if(null!==a)for(b=0;bc?c:4;a(!0);var d=Gh.transition;Gh.transition={};try{a(!1),b()}finally{C=c,Gh.transition=d}}function wi(){return Uh().memoizedState}\nfunction xi(a,b,c){var d=yi(a);c={lane:d,action:c,hasEagerState:!1,eagerState:null,next:null};if(zi(a))Ai(b,c);else if(c=hh(a,b,c,d),null!==c){var e=R();gi(c,a,d,e);Bi(c,b,d)}}\nfunction ii(a,b,c){var d=yi(a),e={lane:d,action:c,hasEagerState:!1,eagerState:null,next:null};if(zi(a))Ai(b,e);else{var f=a.alternate;if(0===a.lanes&&(null===f||0===f.lanes)&&(f=b.lastRenderedReducer,null!==f))try{var g=b.lastRenderedState,h=f(g,c);e.hasEagerState=!0;e.eagerState=h;if(He(h,g)){var k=b.interleaved;null===k?(e.next=e,gh(b)):(e.next=k.next,k.next=e);b.interleaved=e;return}}catch(l){}finally{}c=hh(a,b,e,d);null!==c&&(e=R(),gi(c,a,d,e),Bi(c,b,d))}}\nfunction zi(a){var b=a.alternate;return a===M||null!==b&&b===M}function Ai(a,b){Jh=Ih=!0;var c=a.pending;null===c?b.next=b:(b.next=c.next,c.next=b);a.pending=b}function Bi(a,b,c){if(0!==(c&4194240)){var d=b.lanes;d&=a.pendingLanes;c|=d;b.lanes=c;Cc(a,c)}}\nvar Rh={readContext:eh,useCallback:P,useContext:P,useEffect:P,useImperativeHandle:P,useInsertionEffect:P,useLayoutEffect:P,useMemo:P,useReducer:P,useRef:P,useState:P,useDebugValue:P,useDeferredValue:P,useTransition:P,useMutableSource:P,useSyncExternalStore:P,useId:P,unstable_isNewReconciler:!1},Oh={readContext:eh,useCallback:function(a,b){Th().memoizedState=[a,void 0===b?null:b];return a},useContext:eh,useEffect:mi,useImperativeHandle:function(a,b,c){c=null!==c&&void 0!==c?c.concat([a]):null;return ki(4194308,\n4,pi.bind(null,b,a),c)},useLayoutEffect:function(a,b){return ki(4194308,4,a,b)},useInsertionEffect:function(a,b){return ki(4,2,a,b)},useMemo:function(a,b){var c=Th();b=void 0===b?null:b;a=a();c.memoizedState=[a,b];return a},useReducer:function(a,b,c){var d=Th();b=void 0!==c?c(b):b;d.memoizedState=d.baseState=b;a={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:a,lastRenderedState:b};d.queue=a;a=a.dispatch=xi.bind(null,M,a);return[d.memoizedState,a]},useRef:function(a){var b=\nTh();a={current:a};return b.memoizedState=a},useState:hi,useDebugValue:ri,useDeferredValue:function(a){return Th().memoizedState=a},useTransition:function(){var a=hi(!1),b=a[0];a=vi.bind(null,a[1]);Th().memoizedState=a;return[b,a]},useMutableSource:function(){},useSyncExternalStore:function(a,b,c){var d=M,e=Th();if(I){if(void 0===c)throw Error(p(407));c=c()}else{c=b();if(null===Q)throw Error(p(349));0!==(Hh&30)||di(d,b,c)}e.memoizedState=c;var f={value:c,getSnapshot:b};e.queue=f;mi(ai.bind(null,d,\nf,a),[a]);d.flags|=2048;bi(9,ci.bind(null,d,f,c,b),void 0,null);return c},useId:function(){var a=Th(),b=Q.identifierPrefix;if(I){var c=sg;var d=rg;c=(d&~(1<<32-oc(d)-1)).toString(32)+c;b=\":\"+b+\"R\"+c;c=Kh++;0\\x3c/script>\",a=a.removeChild(a.firstChild)):\n\"string\"===typeof d.is?a=g.createElement(c,{is:d.is}):(a=g.createElement(c),\"select\"===c&&(g=a,d.multiple?g.multiple=!0:d.size&&(g.size=d.size))):a=g.createElementNS(a,c);a[Of]=b;a[Pf]=d;zj(a,b,!1,!1);b.stateNode=a;a:{g=vb(c,d);switch(c){case \"dialog\":D(\"cancel\",a);D(\"close\",a);e=d;break;case \"iframe\":case \"object\":case \"embed\":D(\"load\",a);e=d;break;case \"video\":case \"audio\":for(e=0;eGj&&(b.flags|=128,d=!0,Dj(f,!1),b.lanes=4194304)}else{if(!d)if(a=Ch(g),null!==a){if(b.flags|=128,d=!0,c=a.updateQueue,null!==c&&(b.updateQueue=c,b.flags|=4),Dj(f,!0),null===f.tail&&\"hidden\"===f.tailMode&&!g.alternate&&!I)return S(b),null}else 2*B()-f.renderingStartTime>Gj&&1073741824!==c&&(b.flags|=128,d=!0,Dj(f,!1),b.lanes=4194304);f.isBackwards?(g.sibling=b.child,b.child=g):(c=f.last,null!==c?c.sibling=g:b.child=g,f.last=g)}if(null!==f.tail)return b=f.tail,f.rendering=\nb,f.tail=b.sibling,f.renderingStartTime=B(),b.sibling=null,c=L.current,G(L,d?c&1|2:c&1),b;S(b);return null;case 22:case 23:return Hj(),d=null!==b.memoizedState,null!==a&&null!==a.memoizedState!==d&&(b.flags|=8192),d&&0!==(b.mode&1)?0!==(fj&1073741824)&&(S(b),b.subtreeFlags&6&&(b.flags|=8192)):S(b),null;case 24:return null;case 25:return null}throw Error(p(156,b.tag));}\nfunction Ij(a,b){wg(b);switch(b.tag){case 1:return Zf(b.type)&&$f(),a=b.flags,a&65536?(b.flags=a&-65537|128,b):null;case 3:return zh(),E(Wf),E(H),Eh(),a=b.flags,0!==(a&65536)&&0===(a&128)?(b.flags=a&-65537|128,b):null;case 5:return Bh(b),null;case 13:E(L);a=b.memoizedState;if(null!==a&&null!==a.dehydrated){if(null===b.alternate)throw Error(p(340));Ig()}a=b.flags;return a&65536?(b.flags=a&-65537|128,b):null;case 19:return E(L),null;case 4:return zh(),null;case 10:return ah(b.type._context),null;case 22:case 23:return Hj(),\nnull;case 24:return null;default:return null}}var Jj=!1,U=!1,Kj=\"function\"===typeof WeakSet?WeakSet:Set,V=null;function Lj(a,b){var c=a.ref;if(null!==c)if(\"function\"===typeof c)try{c(null)}catch(d){W(a,b,d)}else c.current=null}function Mj(a,b,c){try{c()}catch(d){W(a,b,d)}}var Nj=!1;\nfunction Oj(a,b){Cf=dd;a=Me();if(Ne(a)){if(\"selectionStart\"in a)var c={start:a.selectionStart,end:a.selectionEnd};else a:{c=(c=a.ownerDocument)&&c.defaultView||window;var d=c.getSelection&&c.getSelection();if(d&&0!==d.rangeCount){c=d.anchorNode;var e=d.anchorOffset,f=d.focusNode;d=d.focusOffset;try{c.nodeType,f.nodeType}catch(F){c=null;break a}var g=0,h=-1,k=-1,l=0,m=0,q=a,r=null;b:for(;;){for(var y;;){q!==c||0!==e&&3!==q.nodeType||(h=g+e);q!==f||0!==d&&3!==q.nodeType||(k=g+d);3===q.nodeType&&(g+=\nq.nodeValue.length);if(null===(y=q.firstChild))break;r=q;q=y}for(;;){if(q===a)break b;r===c&&++l===e&&(h=g);r===f&&++m===d&&(k=g);if(null!==(y=q.nextSibling))break;q=r;r=q.parentNode}q=y}c=-1===h||-1===k?null:{start:h,end:k}}else c=null}c=c||{start:0,end:0}}else c=null;Df={focusedElem:a,selectionRange:c};dd=!1;for(V=b;null!==V;)if(b=V,a=b.child,0!==(b.subtreeFlags&1028)&&null!==a)a.return=b,V=a;else for(;null!==V;){b=V;try{var n=b.alternate;if(0!==(b.flags&1024))switch(b.tag){case 0:case 11:case 15:break;\ncase 1:if(null!==n){var t=n.memoizedProps,J=n.memoizedState,x=b.stateNode,w=x.getSnapshotBeforeUpdate(b.elementType===b.type?t:Ci(b.type,t),J);x.__reactInternalSnapshotBeforeUpdate=w}break;case 3:var u=b.stateNode.containerInfo;1===u.nodeType?u.textContent=\"\":9===u.nodeType&&u.documentElement&&u.removeChild(u.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(p(163));}}catch(F){W(b,b.return,F)}a=b.sibling;if(null!==a){a.return=b.return;V=a;break}V=b.return}n=Nj;Nj=!1;return n}\nfunction Pj(a,b,c){var d=b.updateQueue;d=null!==d?d.lastEffect:null;if(null!==d){var e=d=d.next;do{if((e.tag&a)===a){var f=e.destroy;e.destroy=void 0;void 0!==f&&Mj(b,c,f)}e=e.next}while(e!==d)}}function Qj(a,b){b=b.updateQueue;b=null!==b?b.lastEffect:null;if(null!==b){var c=b=b.next;do{if((c.tag&a)===a){var d=c.create;c.destroy=d()}c=c.next}while(c!==b)}}function Rj(a){var b=a.ref;if(null!==b){var c=a.stateNode;switch(a.tag){case 5:a=c;break;default:a=c}\"function\"===typeof b?b(a):b.current=a}}\nfunction Sj(a){var b=a.alternate;null!==b&&(a.alternate=null,Sj(b));a.child=null;a.deletions=null;a.sibling=null;5===a.tag&&(b=a.stateNode,null!==b&&(delete b[Of],delete b[Pf],delete b[of],delete b[Qf],delete b[Rf]));a.stateNode=null;a.return=null;a.dependencies=null;a.memoizedProps=null;a.memoizedState=null;a.pendingProps=null;a.stateNode=null;a.updateQueue=null}function Tj(a){return 5===a.tag||3===a.tag||4===a.tag}\nfunction Uj(a){a:for(;;){for(;null===a.sibling;){if(null===a.return||Tj(a.return))return null;a=a.return}a.sibling.return=a.return;for(a=a.sibling;5!==a.tag&&6!==a.tag&&18!==a.tag;){if(a.flags&2)continue a;if(null===a.child||4===a.tag)continue a;else a.child.return=a,a=a.child}if(!(a.flags&2))return a.stateNode}}\nfunction Vj(a,b,c){var d=a.tag;if(5===d||6===d)a=a.stateNode,b?8===c.nodeType?c.parentNode.insertBefore(a,b):c.insertBefore(a,b):(8===c.nodeType?(b=c.parentNode,b.insertBefore(a,c)):(b=c,b.appendChild(a)),c=c._reactRootContainer,null!==c&&void 0!==c||null!==b.onclick||(b.onclick=Bf));else if(4!==d&&(a=a.child,null!==a))for(Vj(a,b,c),a=a.sibling;null!==a;)Vj(a,b,c),a=a.sibling}\nfunction Wj(a,b,c){var d=a.tag;if(5===d||6===d)a=a.stateNode,b?c.insertBefore(a,b):c.appendChild(a);else if(4!==d&&(a=a.child,null!==a))for(Wj(a,b,c),a=a.sibling;null!==a;)Wj(a,b,c),a=a.sibling}var X=null,Xj=!1;function Yj(a,b,c){for(c=c.child;null!==c;)Zj(a,b,c),c=c.sibling}\nfunction Zj(a,b,c){if(lc&&\"function\"===typeof lc.onCommitFiberUnmount)try{lc.onCommitFiberUnmount(kc,c)}catch(h){}switch(c.tag){case 5:U||Lj(c,b);case 6:var d=X,e=Xj;X=null;Yj(a,b,c);X=d;Xj=e;null!==X&&(Xj?(a=X,c=c.stateNode,8===a.nodeType?a.parentNode.removeChild(c):a.removeChild(c)):X.removeChild(c.stateNode));break;case 18:null!==X&&(Xj?(a=X,c=c.stateNode,8===a.nodeType?Kf(a.parentNode,c):1===a.nodeType&&Kf(a,c),bd(a)):Kf(X,c.stateNode));break;case 4:d=X;e=Xj;X=c.stateNode.containerInfo;Xj=!0;\nYj(a,b,c);X=d;Xj=e;break;case 0:case 11:case 14:case 15:if(!U&&(d=c.updateQueue,null!==d&&(d=d.lastEffect,null!==d))){e=d=d.next;do{var f=e,g=f.destroy;f=f.tag;void 0!==g&&(0!==(f&2)?Mj(c,b,g):0!==(f&4)&&Mj(c,b,g));e=e.next}while(e!==d)}Yj(a,b,c);break;case 1:if(!U&&(Lj(c,b),d=c.stateNode,\"function\"===typeof d.componentWillUnmount))try{d.props=c.memoizedProps,d.state=c.memoizedState,d.componentWillUnmount()}catch(h){W(c,b,h)}Yj(a,b,c);break;case 21:Yj(a,b,c);break;case 22:c.mode&1?(U=(d=U)||null!==\nc.memoizedState,Yj(a,b,c),U=d):Yj(a,b,c);break;default:Yj(a,b,c)}}function ak(a){var b=a.updateQueue;if(null!==b){a.updateQueue=null;var c=a.stateNode;null===c&&(c=a.stateNode=new Kj);b.forEach(function(b){var d=bk.bind(null,a,b);c.has(b)||(c.add(b),b.then(d,d))})}}\nfunction ck(a,b){var c=b.deletions;if(null!==c)for(var d=0;de&&(e=g);d&=~f}d=e;d=B()-d;d=(120>d?120:480>d?480:1080>d?1080:1920>d?1920:3E3>d?3E3:4320>d?4320:1960*lk(d/1960))-d;if(10a?16:a;if(null===wk)var d=!1;else{a=wk;wk=null;xk=0;if(0!==(K&6))throw Error(p(331));var e=K;K|=4;for(V=a.current;null!==V;){var f=V,g=f.child;if(0!==(V.flags&16)){var h=f.deletions;if(null!==h){for(var k=0;kB()-fk?Kk(a,0):rk|=c);Dk(a,b)}function Yk(a,b){0===b&&(0===(a.mode&1)?b=1:(b=sc,sc<<=1,0===(sc&130023424)&&(sc=4194304)));var c=R();a=ih(a,b);null!==a&&(Ac(a,b,c),Dk(a,c))}function uj(a){var b=a.memoizedState,c=0;null!==b&&(c=b.retryLane);Yk(a,c)}\nfunction bk(a,b){var c=0;switch(a.tag){case 13:var d=a.stateNode;var e=a.memoizedState;null!==e&&(c=e.retryLane);break;case 19:d=a.stateNode;break;default:throw Error(p(314));}null!==d&&d.delete(b);Yk(a,c)}var Vk;\nVk=function(a,b,c){if(null!==a)if(a.memoizedProps!==b.pendingProps||Wf.current)dh=!0;else{if(0===(a.lanes&c)&&0===(b.flags&128))return dh=!1,yj(a,b,c);dh=0!==(a.flags&131072)?!0:!1}else dh=!1,I&&0!==(b.flags&1048576)&&ug(b,ng,b.index);b.lanes=0;switch(b.tag){case 2:var d=b.type;ij(a,b);a=b.pendingProps;var e=Yf(b,H.current);ch(b,c);e=Nh(null,b,d,a,e,c);var f=Sh();b.flags|=1;\"object\"===typeof e&&null!==e&&\"function\"===typeof e.render&&void 0===e.$$typeof?(b.tag=1,b.memoizedState=null,b.updateQueue=\nnull,Zf(d)?(f=!0,cg(b)):f=!1,b.memoizedState=null!==e.state&&void 0!==e.state?e.state:null,kh(b),e.updater=Ei,b.stateNode=e,e._reactInternals=b,Ii(b,d,a,c),b=jj(null,b,d,!0,f,c)):(b.tag=0,I&&f&&vg(b),Xi(null,b,e,c),b=b.child);return b;case 16:d=b.elementType;a:{ij(a,b);a=b.pendingProps;e=d._init;d=e(d._payload);b.type=d;e=b.tag=Zk(d);a=Ci(d,a);switch(e){case 0:b=cj(null,b,d,a,c);break a;case 1:b=hj(null,b,d,a,c);break a;case 11:b=Yi(null,b,d,a,c);break a;case 14:b=$i(null,b,d,Ci(d.type,a),c);break a}throw Error(p(306,\nd,\"\"));}return b;case 0:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:Ci(d,e),cj(a,b,d,e,c);case 1:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:Ci(d,e),hj(a,b,d,e,c);case 3:a:{kj(b);if(null===a)throw Error(p(387));d=b.pendingProps;f=b.memoizedState;e=f.element;lh(a,b);qh(b,d,null,c);var g=b.memoizedState;d=g.element;if(f.isDehydrated)if(f={element:d,isDehydrated:!1,cache:g.cache,pendingSuspenseBoundaries:g.pendingSuspenseBoundaries,transitions:g.transitions},b.updateQueue.baseState=\nf,b.memoizedState=f,b.flags&256){e=Ji(Error(p(423)),b);b=lj(a,b,d,c,e);break a}else if(d!==e){e=Ji(Error(p(424)),b);b=lj(a,b,d,c,e);break a}else for(yg=Lf(b.stateNode.containerInfo.firstChild),xg=b,I=!0,zg=null,c=Vg(b,null,d,c),b.child=c;c;)c.flags=c.flags&-3|4096,c=c.sibling;else{Ig();if(d===e){b=Zi(a,b,c);break a}Xi(a,b,d,c)}b=b.child}return b;case 5:return Ah(b),null===a&&Eg(b),d=b.type,e=b.pendingProps,f=null!==a?a.memoizedProps:null,g=e.children,Ef(d,e)?g=null:null!==f&&Ef(d,f)&&(b.flags|=32),\ngj(a,b),Xi(a,b,g,c),b.child;case 6:return null===a&&Eg(b),null;case 13:return oj(a,b,c);case 4:return yh(b,b.stateNode.containerInfo),d=b.pendingProps,null===a?b.child=Ug(b,null,d,c):Xi(a,b,d,c),b.child;case 11:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:Ci(d,e),Yi(a,b,d,e,c);case 7:return Xi(a,b,b.pendingProps,c),b.child;case 8:return Xi(a,b,b.pendingProps.children,c),b.child;case 12:return Xi(a,b,b.pendingProps.children,c),b.child;case 10:a:{d=b.type._context;e=b.pendingProps;f=b.memoizedProps;\ng=e.value;G(Wg,d._currentValue);d._currentValue=g;if(null!==f)if(He(f.value,g)){if(f.children===e.children&&!Wf.current){b=Zi(a,b,c);break a}}else for(f=b.child,null!==f&&(f.return=b);null!==f;){var h=f.dependencies;if(null!==h){g=f.child;for(var k=h.firstContext;null!==k;){if(k.context===d){if(1===f.tag){k=mh(-1,c&-c);k.tag=2;var l=f.updateQueue;if(null!==l){l=l.shared;var m=l.pending;null===m?k.next=k:(k.next=m.next,m.next=k);l.pending=k}}f.lanes|=c;k=f.alternate;null!==k&&(k.lanes|=c);bh(f.return,\nc,b);h.lanes|=c;break}k=k.next}}else if(10===f.tag)g=f.type===b.type?null:f.child;else if(18===f.tag){g=f.return;if(null===g)throw Error(p(341));g.lanes|=c;h=g.alternate;null!==h&&(h.lanes|=c);bh(g,c,b);g=f.sibling}else g=f.child;if(null!==g)g.return=f;else for(g=f;null!==g;){if(g===b){g=null;break}f=g.sibling;if(null!==f){f.return=g.return;g=f;break}g=g.return}f=g}Xi(a,b,e.children,c);b=b.child}return b;case 9:return e=b.type,d=b.pendingProps.children,ch(b,c),e=eh(e),d=d(e),b.flags|=1,Xi(a,b,d,c),\nb.child;case 14:return d=b.type,e=Ci(d,b.pendingProps),e=Ci(d.type,e),$i(a,b,d,e,c);case 15:return bj(a,b,b.type,b.pendingProps,c);case 17:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:Ci(d,e),ij(a,b),b.tag=1,Zf(d)?(a=!0,cg(b)):a=!1,ch(b,c),Gi(b,d,e),Ii(b,d,e,c),jj(null,b,d,!0,a,c);case 19:return xj(a,b,c);case 22:return dj(a,b,c)}throw Error(p(156,b.tag));};function Fk(a,b){return ac(a,b)}\nfunction $k(a,b,c,d){this.tag=a;this.key=c;this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null;this.index=0;this.ref=null;this.pendingProps=b;this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null;this.mode=d;this.subtreeFlags=this.flags=0;this.deletions=null;this.childLanes=this.lanes=0;this.alternate=null}function Bg(a,b,c,d){return new $k(a,b,c,d)}function aj(a){a=a.prototype;return!(!a||!a.isReactComponent)}\nfunction Zk(a){if(\"function\"===typeof a)return aj(a)?1:0;if(void 0!==a&&null!==a){a=a.$$typeof;if(a===Da)return 11;if(a===Ga)return 14}return 2}\nfunction Pg(a,b){var c=a.alternate;null===c?(c=Bg(a.tag,b,a.key,a.mode),c.elementType=a.elementType,c.type=a.type,c.stateNode=a.stateNode,c.alternate=a,a.alternate=c):(c.pendingProps=b,c.type=a.type,c.flags=0,c.subtreeFlags=0,c.deletions=null);c.flags=a.flags&14680064;c.childLanes=a.childLanes;c.lanes=a.lanes;c.child=a.child;c.memoizedProps=a.memoizedProps;c.memoizedState=a.memoizedState;c.updateQueue=a.updateQueue;b=a.dependencies;c.dependencies=null===b?null:{lanes:b.lanes,firstContext:b.firstContext};\nc.sibling=a.sibling;c.index=a.index;c.ref=a.ref;return c}\nfunction Rg(a,b,c,d,e,f){var g=2;d=a;if(\"function\"===typeof a)aj(a)&&(g=1);else if(\"string\"===typeof a)g=5;else a:switch(a){case ya:return Tg(c.children,e,f,b);case za:g=8;e|=8;break;case Aa:return a=Bg(12,c,b,e|2),a.elementType=Aa,a.lanes=f,a;case Ea:return a=Bg(13,c,b,e),a.elementType=Ea,a.lanes=f,a;case Fa:return a=Bg(19,c,b,e),a.elementType=Fa,a.lanes=f,a;case Ia:return pj(c,e,f,b);default:if(\"object\"===typeof a&&null!==a)switch(a.$$typeof){case Ba:g=10;break a;case Ca:g=9;break a;case Da:g=11;\nbreak a;case Ga:g=14;break a;case Ha:g=16;d=null;break a}throw Error(p(130,null==a?a:typeof a,\"\"));}b=Bg(g,c,b,e);b.elementType=a;b.type=d;b.lanes=f;return b}function Tg(a,b,c,d){a=Bg(7,a,d,b);a.lanes=c;return a}function pj(a,b,c,d){a=Bg(22,a,d,b);a.elementType=Ia;a.lanes=c;a.stateNode={isHidden:!1};return a}function Qg(a,b,c){a=Bg(6,a,null,b);a.lanes=c;return a}\nfunction Sg(a,b,c){b=Bg(4,null!==a.children?a.children:[],a.key,b);b.lanes=c;b.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation};return b}\nfunction al(a,b,c,d,e){this.tag=b;this.containerInfo=a;this.finishedWork=this.pingCache=this.current=this.pendingChildren=null;this.timeoutHandle=-1;this.callbackNode=this.pendingContext=this.context=null;this.callbackPriority=0;this.eventTimes=zc(0);this.expirationTimes=zc(-1);this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0;this.entanglements=zc(0);this.identifierPrefix=d;this.onRecoverableError=e;this.mutableSourceEagerHydrationData=\nnull}function bl(a,b,c,d,e,f,g,h,k){a=new al(a,b,c,h,k);1===b?(b=1,!0===f&&(b|=8)):b=0;f=Bg(3,null,null,b);a.current=f;f.stateNode=a;f.memoizedState={element:d,isDehydrated:c,cache:null,transitions:null,pendingSuspenseBoundaries:null};kh(f);return a}function cl(a,b,c){var d=3>>1,e=a[d];if(0>>1;dg(C,c))ng(x,C)?(a[d]=x,a[n]=c,d=n):(a[d]=C,a[m]=c,d=m);else if(ng(x,c))a[d]=x,a[n]=c,d=n;else break a}}return b}\nfunction g(a,b){var c=a.sortIndex-b.sortIndex;return 0!==c?c:a.id-b.id}if(\"object\"===typeof performance&&\"function\"===typeof performance.now){var l=performance;exports.unstable_now=function(){return l.now()}}else{var p=Date,q=p.now();exports.unstable_now=function(){return p.now()-q}}var r=[],t=[],u=1,v=null,y=3,z=!1,A=!1,B=!1,D=\"function\"===typeof setTimeout?setTimeout:null,E=\"function\"===typeof clearTimeout?clearTimeout:null,F=\"undefined\"!==typeof setImmediate?setImmediate:null;\n\"undefined\"!==typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function G(a){for(var b=h(t);null!==b;){if(null===b.callback)k(t);else if(b.startTime<=a)k(t),b.sortIndex=b.expirationTime,f(r,b);else break;b=h(t)}}function H(a){B=!1;G(a);if(!A)if(null!==h(r))A=!0,I(J);else{var b=h(t);null!==b&&K(H,b.startTime-a)}}\nfunction J(a,b){A=!1;B&&(B=!1,E(L),L=-1);z=!0;var c=y;try{G(b);for(v=h(r);null!==v&&(!(v.expirationTime>b)||a&&!M());){var d=v.callback;if(\"function\"===typeof d){v.callback=null;y=v.priorityLevel;var e=d(v.expirationTime<=b);b=exports.unstable_now();\"function\"===typeof e?v.callback=e:v===h(r)&&k(r);G(b)}else k(r);v=h(r)}if(null!==v)var w=!0;else{var m=h(t);null!==m&&K(H,m.startTime-b);w=!1}return w}finally{v=null,y=c,z=!1}}var N=!1,O=null,L=-1,P=5,Q=-1;\nfunction M(){return exports.unstable_now()-Qa||125d?(a.sortIndex=c,f(t,a),null===h(r)&&a===h(t)&&(B?(E(L),L=-1):B=!0,K(H,c-d))):(a.sortIndex=e,f(r,a),A||z||(A=!0,I(J)));return a};\nexports.unstable_shouldYield=M;exports.unstable_wrapCallback=function(a){var b=y;return function(){var c=y;y=b;try{return a.apply(this,arguments)}finally{y=c}}};\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/scheduler.production.min.js');\n} else {\n module.exports = require('./cjs/scheduler.development.js');\n}\n","'use strict';\n\nvar GetIntrinsic = require('get-intrinsic');\nvar define = require('define-data-property');\nvar hasDescriptors = require('has-property-descriptors')();\nvar gOPD = require('gopd');\n\nvar $TypeError = require('es-errors/type');\nvar $floor = GetIntrinsic('%Math.floor%');\n\n/** @type {import('.')} */\nmodule.exports = function setFunctionLength(fn, length) {\n\tif (typeof fn !== 'function') {\n\t\tthrow new $TypeError('`fn` is not a function');\n\t}\n\tif (typeof length !== 'number' || length < 0 || length > 0xFFFFFFFF || $floor(length) !== length) {\n\t\tthrow new $TypeError('`length` must be a positive 32-bit integer');\n\t}\n\n\tvar loose = arguments.length > 2 && !!arguments[2];\n\n\tvar functionLengthIsConfigurable = true;\n\tvar functionLengthIsWritable = true;\n\tif ('length' in fn && gOPD) {\n\t\tvar desc = gOPD(fn, 'length');\n\t\tif (desc && !desc.configurable) {\n\t\t\tfunctionLengthIsConfigurable = false;\n\t\t}\n\t\tif (desc && !desc.writable) {\n\t\t\tfunctionLengthIsWritable = false;\n\t\t}\n\t}\n\n\tif (functionLengthIsConfigurable || functionLengthIsWritable || !loose) {\n\t\tif (hasDescriptors) {\n\t\t\tdefine(/** @type {Parameters[0]} */ (fn), 'length', length, true, true);\n\t\t} else {\n\t\t\tdefine(/** @type {Parameters[0]} */ (fn), 'length', length);\n\t\t}\n\t}\n\treturn fn;\n};\n","module.exports = function isBuffer(arg) {\n return arg && typeof arg === 'object'\n && typeof arg.copy === 'function'\n && typeof arg.fill === 'function'\n && typeof arg.readUInt8 === 'function';\n}","// Currently in sync with Node.js lib/internal/util/types.js\n// https://github.com/nodejs/node/commit/112cc7c27551254aa2b17098fb774867f05ed0d9\n\n'use strict';\n\nvar isArgumentsObject = require('is-arguments');\nvar isGeneratorFunction = require('is-generator-function');\nvar whichTypedArray = require('which-typed-array');\nvar isTypedArray = require('is-typed-array');\n\nfunction uncurryThis(f) {\n return f.call.bind(f);\n}\n\nvar BigIntSupported = typeof BigInt !== 'undefined';\nvar SymbolSupported = typeof Symbol !== 'undefined';\n\nvar ObjectToString = uncurryThis(Object.prototype.toString);\n\nvar numberValue = uncurryThis(Number.prototype.valueOf);\nvar stringValue = uncurryThis(String.prototype.valueOf);\nvar booleanValue = uncurryThis(Boolean.prototype.valueOf);\n\nif (BigIntSupported) {\n var bigIntValue = uncurryThis(BigInt.prototype.valueOf);\n}\n\nif (SymbolSupported) {\n var symbolValue = uncurryThis(Symbol.prototype.valueOf);\n}\n\nfunction checkBoxedPrimitive(value, prototypeValueOf) {\n if (typeof value !== 'object') {\n return false;\n }\n try {\n prototypeValueOf(value);\n return true;\n } catch(e) {\n return false;\n }\n}\n\nexports.isArgumentsObject = isArgumentsObject;\nexports.isGeneratorFunction = isGeneratorFunction;\nexports.isTypedArray = isTypedArray;\n\n// Taken from here and modified for better browser support\n// https://github.com/sindresorhus/p-is-promise/blob/cda35a513bda03f977ad5cde3a079d237e82d7ef/index.js\nfunction isPromise(input) {\n\treturn (\n\t\t(\n\t\t\ttypeof Promise !== 'undefined' &&\n\t\t\tinput instanceof Promise\n\t\t) ||\n\t\t(\n\t\t\tinput !== null &&\n\t\t\ttypeof input === 'object' &&\n\t\t\ttypeof input.then === 'function' &&\n\t\t\ttypeof input.catch === 'function'\n\t\t)\n\t);\n}\nexports.isPromise = isPromise;\n\nfunction isArrayBufferView(value) {\n if (typeof ArrayBuffer !== 'undefined' && ArrayBuffer.isView) {\n return ArrayBuffer.isView(value);\n }\n\n return (\n isTypedArray(value) ||\n isDataView(value)\n );\n}\nexports.isArrayBufferView = isArrayBufferView;\n\n\nfunction isUint8Array(value) {\n return whichTypedArray(value) === 'Uint8Array';\n}\nexports.isUint8Array = isUint8Array;\n\nfunction isUint8ClampedArray(value) {\n return whichTypedArray(value) === 'Uint8ClampedArray';\n}\nexports.isUint8ClampedArray = isUint8ClampedArray;\n\nfunction isUint16Array(value) {\n return whichTypedArray(value) === 'Uint16Array';\n}\nexports.isUint16Array = isUint16Array;\n\nfunction isUint32Array(value) {\n return whichTypedArray(value) === 'Uint32Array';\n}\nexports.isUint32Array = isUint32Array;\n\nfunction isInt8Array(value) {\n return whichTypedArray(value) === 'Int8Array';\n}\nexports.isInt8Array = isInt8Array;\n\nfunction isInt16Array(value) {\n return whichTypedArray(value) === 'Int16Array';\n}\nexports.isInt16Array = isInt16Array;\n\nfunction isInt32Array(value) {\n return whichTypedArray(value) === 'Int32Array';\n}\nexports.isInt32Array = isInt32Array;\n\nfunction isFloat32Array(value) {\n return whichTypedArray(value) === 'Float32Array';\n}\nexports.isFloat32Array = isFloat32Array;\n\nfunction isFloat64Array(value) {\n return whichTypedArray(value) === 'Float64Array';\n}\nexports.isFloat64Array = isFloat64Array;\n\nfunction isBigInt64Array(value) {\n return whichTypedArray(value) === 'BigInt64Array';\n}\nexports.isBigInt64Array = isBigInt64Array;\n\nfunction isBigUint64Array(value) {\n return whichTypedArray(value) === 'BigUint64Array';\n}\nexports.isBigUint64Array = isBigUint64Array;\n\nfunction isMapToString(value) {\n return ObjectToString(value) === '[object Map]';\n}\nisMapToString.working = (\n typeof Map !== 'undefined' &&\n isMapToString(new Map())\n);\n\nfunction isMap(value) {\n if (typeof Map === 'undefined') {\n return false;\n }\n\n return isMapToString.working\n ? isMapToString(value)\n : value instanceof Map;\n}\nexports.isMap = isMap;\n\nfunction isSetToString(value) {\n return ObjectToString(value) === '[object Set]';\n}\nisSetToString.working = (\n typeof Set !== 'undefined' &&\n isSetToString(new Set())\n);\nfunction isSet(value) {\n if (typeof Set === 'undefined') {\n return false;\n }\n\n return isSetToString.working\n ? isSetToString(value)\n : value instanceof Set;\n}\nexports.isSet = isSet;\n\nfunction isWeakMapToString(value) {\n return ObjectToString(value) === '[object WeakMap]';\n}\nisWeakMapToString.working = (\n typeof WeakMap !== 'undefined' &&\n isWeakMapToString(new WeakMap())\n);\nfunction isWeakMap(value) {\n if (typeof WeakMap === 'undefined') {\n return false;\n }\n\n return isWeakMapToString.working\n ? isWeakMapToString(value)\n : value instanceof WeakMap;\n}\nexports.isWeakMap = isWeakMap;\n\nfunction isWeakSetToString(value) {\n return ObjectToString(value) === '[object WeakSet]';\n}\nisWeakSetToString.working = (\n typeof WeakSet !== 'undefined' &&\n isWeakSetToString(new WeakSet())\n);\nfunction isWeakSet(value) {\n return isWeakSetToString(value);\n}\nexports.isWeakSet = isWeakSet;\n\nfunction isArrayBufferToString(value) {\n return ObjectToString(value) === '[object ArrayBuffer]';\n}\nisArrayBufferToString.working = (\n typeof ArrayBuffer !== 'undefined' &&\n isArrayBufferToString(new ArrayBuffer())\n);\nfunction isArrayBuffer(value) {\n if (typeof ArrayBuffer === 'undefined') {\n return false;\n }\n\n return isArrayBufferToString.working\n ? isArrayBufferToString(value)\n : value instanceof ArrayBuffer;\n}\nexports.isArrayBuffer = isArrayBuffer;\n\nfunction isDataViewToString(value) {\n return ObjectToString(value) === '[object DataView]';\n}\nisDataViewToString.working = (\n typeof ArrayBuffer !== 'undefined' &&\n typeof DataView !== 'undefined' &&\n isDataViewToString(new DataView(new ArrayBuffer(1), 0, 1))\n);\nfunction isDataView(value) {\n if (typeof DataView === 'undefined') {\n return false;\n }\n\n return isDataViewToString.working\n ? isDataViewToString(value)\n : value instanceof DataView;\n}\nexports.isDataView = isDataView;\n\n// Store a copy of SharedArrayBuffer in case it's deleted elsewhere\nvar SharedArrayBufferCopy = typeof SharedArrayBuffer !== 'undefined' ? SharedArrayBuffer : undefined;\nfunction isSharedArrayBufferToString(value) {\n return ObjectToString(value) === '[object SharedArrayBuffer]';\n}\nfunction isSharedArrayBuffer(value) {\n if (typeof SharedArrayBufferCopy === 'undefined') {\n return false;\n }\n\n if (typeof isSharedArrayBufferToString.working === 'undefined') {\n isSharedArrayBufferToString.working = isSharedArrayBufferToString(new SharedArrayBufferCopy());\n }\n\n return isSharedArrayBufferToString.working\n ? isSharedArrayBufferToString(value)\n : value instanceof SharedArrayBufferCopy;\n}\nexports.isSharedArrayBuffer = isSharedArrayBuffer;\n\nfunction isAsyncFunction(value) {\n return ObjectToString(value) === '[object AsyncFunction]';\n}\nexports.isAsyncFunction = isAsyncFunction;\n\nfunction isMapIterator(value) {\n return ObjectToString(value) === '[object Map Iterator]';\n}\nexports.isMapIterator = isMapIterator;\n\nfunction isSetIterator(value) {\n return ObjectToString(value) === '[object Set Iterator]';\n}\nexports.isSetIterator = isSetIterator;\n\nfunction isGeneratorObject(value) {\n return ObjectToString(value) === '[object Generator]';\n}\nexports.isGeneratorObject = isGeneratorObject;\n\nfunction isWebAssemblyCompiledModule(value) {\n return ObjectToString(value) === '[object WebAssembly.Module]';\n}\nexports.isWebAssemblyCompiledModule = isWebAssemblyCompiledModule;\n\nfunction isNumberObject(value) {\n return checkBoxedPrimitive(value, numberValue);\n}\nexports.isNumberObject = isNumberObject;\n\nfunction isStringObject(value) {\n return checkBoxedPrimitive(value, stringValue);\n}\nexports.isStringObject = isStringObject;\n\nfunction isBooleanObject(value) {\n return checkBoxedPrimitive(value, booleanValue);\n}\nexports.isBooleanObject = isBooleanObject;\n\nfunction isBigIntObject(value) {\n return BigIntSupported && checkBoxedPrimitive(value, bigIntValue);\n}\nexports.isBigIntObject = isBigIntObject;\n\nfunction isSymbolObject(value) {\n return SymbolSupported && checkBoxedPrimitive(value, symbolValue);\n}\nexports.isSymbolObject = isSymbolObject;\n\nfunction isBoxedPrimitive(value) {\n return (\n isNumberObject(value) ||\n isStringObject(value) ||\n isBooleanObject(value) ||\n isBigIntObject(value) ||\n isSymbolObject(value)\n );\n}\nexports.isBoxedPrimitive = isBoxedPrimitive;\n\nfunction isAnyArrayBuffer(value) {\n return typeof Uint8Array !== 'undefined' && (\n isArrayBuffer(value) ||\n isSharedArrayBuffer(value)\n );\n}\nexports.isAnyArrayBuffer = isAnyArrayBuffer;\n\n['isProxy', 'isExternal', 'isModuleNamespaceObject'].forEach(function(method) {\n Object.defineProperty(exports, method, {\n enumerable: false,\n value: function() {\n throw new Error(method + ' is not supported in userland');\n }\n });\n});\n","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nvar getOwnPropertyDescriptors = Object.getOwnPropertyDescriptors ||\n function getOwnPropertyDescriptors(obj) {\n var keys = Object.keys(obj);\n var descriptors = {};\n for (var i = 0; i < keys.length; i++) {\n descriptors[keys[i]] = Object.getOwnPropertyDescriptor(obj, keys[i]);\n }\n return descriptors;\n };\n\nvar formatRegExp = /%[sdj%]/g;\nexports.format = function(f) {\n if (!isString(f)) {\n var objects = [];\n for (var i = 0; i < arguments.length; i++) {\n objects.push(inspect(arguments[i]));\n }\n return objects.join(' ');\n }\n\n var i = 1;\n var args = arguments;\n var len = args.length;\n var str = String(f).replace(formatRegExp, function(x) {\n if (x === '%%') return '%';\n if (i >= len) return x;\n switch (x) {\n case '%s': return String(args[i++]);\n case '%d': return Number(args[i++]);\n case '%j':\n try {\n return JSON.stringify(args[i++]);\n } catch (_) {\n return '[Circular]';\n }\n default:\n return x;\n }\n });\n for (var x = args[i]; i < len; x = args[++i]) {\n if (isNull(x) || !isObject(x)) {\n str += ' ' + x;\n } else {\n str += ' ' + inspect(x);\n }\n }\n return str;\n};\n\n\n// Mark that a method should not be used.\n// Returns a modified function which warns once by default.\n// If --no-deprecation is set, then it is a no-op.\nexports.deprecate = function(fn, msg) {\n if (typeof process !== 'undefined' && process.noDeprecation === true) {\n return fn;\n }\n\n // Allow for deprecating things in the process of starting up.\n if (typeof process === 'undefined') {\n return function() {\n return exports.deprecate(fn, msg).apply(this, arguments);\n };\n }\n\n var warned = false;\n function deprecated() {\n if (!warned) {\n if (process.throwDeprecation) {\n throw new Error(msg);\n } else if (process.traceDeprecation) {\n console.trace(msg);\n } else {\n console.error(msg);\n }\n warned = true;\n }\n return fn.apply(this, arguments);\n }\n\n return deprecated;\n};\n\n\nvar debugs = {};\nvar debugEnvRegex = /^$/;\n\nif (process.env.NODE_DEBUG) {\n var debugEnv = process.env.NODE_DEBUG;\n debugEnv = debugEnv.replace(/[|\\\\{}()[\\]^$+?.]/g, '\\\\$&')\n .replace(/\\*/g, '.*')\n .replace(/,/g, '$|^')\n .toUpperCase();\n debugEnvRegex = new RegExp('^' + debugEnv + '$', 'i');\n}\nexports.debuglog = function(set) {\n set = set.toUpperCase();\n if (!debugs[set]) {\n if (debugEnvRegex.test(set)) {\n var pid = process.pid;\n debugs[set] = function() {\n var msg = exports.format.apply(exports, arguments);\n console.error('%s %d: %s', set, pid, msg);\n };\n } else {\n debugs[set] = function() {};\n }\n }\n return debugs[set];\n};\n\n\n/**\n * Echos the value of a value. Trys to print the value out\n * in the best way possible given the different types.\n *\n * @param {Object} obj The object to print out.\n * @param {Object} opts Optional options object that alters the output.\n */\n/* legacy: obj, showHidden, depth, colors*/\nfunction inspect(obj, opts) {\n // default options\n var ctx = {\n seen: [],\n stylize: stylizeNoColor\n };\n // legacy...\n if (arguments.length >= 3) ctx.depth = arguments[2];\n if (arguments.length >= 4) ctx.colors = arguments[3];\n if (isBoolean(opts)) {\n // legacy...\n ctx.showHidden = opts;\n } else if (opts) {\n // got an \"options\" object\n exports._extend(ctx, opts);\n }\n // set default options\n if (isUndefined(ctx.showHidden)) ctx.showHidden = false;\n if (isUndefined(ctx.depth)) ctx.depth = 2;\n if (isUndefined(ctx.colors)) ctx.colors = false;\n if (isUndefined(ctx.customInspect)) ctx.customInspect = true;\n if (ctx.colors) ctx.stylize = stylizeWithColor;\n return formatValue(ctx, obj, ctx.depth);\n}\nexports.inspect = inspect;\n\n\n// http://en.wikipedia.org/wiki/ANSI_escape_code#graphics\ninspect.colors = {\n 'bold' : [1, 22],\n 'italic' : [3, 23],\n 'underline' : [4, 24],\n 'inverse' : [7, 27],\n 'white' : [37, 39],\n 'grey' : [90, 39],\n 'black' : [30, 39],\n 'blue' : [34, 39],\n 'cyan' : [36, 39],\n 'green' : [32, 39],\n 'magenta' : [35, 39],\n 'red' : [31, 39],\n 'yellow' : [33, 39]\n};\n\n// Don't use 'blue' not visible on cmd.exe\ninspect.styles = {\n 'special': 'cyan',\n 'number': 'yellow',\n 'boolean': 'yellow',\n 'undefined': 'grey',\n 'null': 'bold',\n 'string': 'green',\n 'date': 'magenta',\n // \"name\": intentionally not styling\n 'regexp': 'red'\n};\n\n\nfunction stylizeWithColor(str, styleType) {\n var style = inspect.styles[styleType];\n\n if (style) {\n return '\\u001b[' + inspect.colors[style][0] + 'm' + str +\n '\\u001b[' + inspect.colors[style][1] + 'm';\n } else {\n return str;\n }\n}\n\n\nfunction stylizeNoColor(str, styleType) {\n return str;\n}\n\n\nfunction arrayToHash(array) {\n var hash = {};\n\n array.forEach(function(val, idx) {\n hash[val] = true;\n });\n\n return hash;\n}\n\n\nfunction formatValue(ctx, value, recurseTimes) {\n // Provide a hook for user-specified inspect functions.\n // Check that value is an object with an inspect function on it\n if (ctx.customInspect &&\n value &&\n isFunction(value.inspect) &&\n // Filter out the util module, it's inspect function is special\n value.inspect !== exports.inspect &&\n // Also filter out any prototype objects using the circular check.\n !(value.constructor && value.constructor.prototype === value)) {\n var ret = value.inspect(recurseTimes, ctx);\n if (!isString(ret)) {\n ret = formatValue(ctx, ret, recurseTimes);\n }\n return ret;\n }\n\n // Primitive types cannot have properties\n var primitive = formatPrimitive(ctx, value);\n if (primitive) {\n return primitive;\n }\n\n // Look up the keys of the object.\n var keys = Object.keys(value);\n var visibleKeys = arrayToHash(keys);\n\n if (ctx.showHidden) {\n keys = Object.getOwnPropertyNames(value);\n }\n\n // IE doesn't make error fields non-enumerable\n // http://msdn.microsoft.com/en-us/library/ie/dww52sbt(v=vs.94).aspx\n if (isError(value)\n && (keys.indexOf('message') >= 0 || keys.indexOf('description') >= 0)) {\n return formatError(value);\n }\n\n // Some type of object without properties can be shortcutted.\n if (keys.length === 0) {\n if (isFunction(value)) {\n var name = value.name ? ': ' + value.name : '';\n return ctx.stylize('[Function' + name + ']', 'special');\n }\n if (isRegExp(value)) {\n return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');\n }\n if (isDate(value)) {\n return ctx.stylize(Date.prototype.toString.call(value), 'date');\n }\n if (isError(value)) {\n return formatError(value);\n }\n }\n\n var base = '', array = false, braces = ['{', '}'];\n\n // Make Array say that they are Array\n if (isArray(value)) {\n array = true;\n braces = ['[', ']'];\n }\n\n // Make functions say that they are functions\n if (isFunction(value)) {\n var n = value.name ? ': ' + value.name : '';\n base = ' [Function' + n + ']';\n }\n\n // Make RegExps say that they are RegExps\n if (isRegExp(value)) {\n base = ' ' + RegExp.prototype.toString.call(value);\n }\n\n // Make dates with properties first say the date\n if (isDate(value)) {\n base = ' ' + Date.prototype.toUTCString.call(value);\n }\n\n // Make error with message first say the error\n if (isError(value)) {\n base = ' ' + formatError(value);\n }\n\n if (keys.length === 0 && (!array || value.length == 0)) {\n return braces[0] + base + braces[1];\n }\n\n if (recurseTimes < 0) {\n if (isRegExp(value)) {\n return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');\n } else {\n return ctx.stylize('[Object]', 'special');\n }\n }\n\n ctx.seen.push(value);\n\n var output;\n if (array) {\n output = formatArray(ctx, value, recurseTimes, visibleKeys, keys);\n } else {\n output = keys.map(function(key) {\n return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array);\n });\n }\n\n ctx.seen.pop();\n\n return reduceToSingleString(output, base, braces);\n}\n\n\nfunction formatPrimitive(ctx, value) {\n if (isUndefined(value))\n return ctx.stylize('undefined', 'undefined');\n if (isString(value)) {\n var simple = '\\'' + JSON.stringify(value).replace(/^\"|\"$/g, '')\n .replace(/'/g, \"\\\\'\")\n .replace(/\\\\\"/g, '\"') + '\\'';\n return ctx.stylize(simple, 'string');\n }\n if (isNumber(value))\n return ctx.stylize('' + value, 'number');\n if (isBoolean(value))\n return ctx.stylize('' + value, 'boolean');\n // For some reason typeof null is \"object\", so special case here.\n if (isNull(value))\n return ctx.stylize('null', 'null');\n}\n\n\nfunction formatError(value) {\n return '[' + Error.prototype.toString.call(value) + ']';\n}\n\n\nfunction formatArray(ctx, value, recurseTimes, visibleKeys, keys) {\n var output = [];\n for (var i = 0, l = value.length; i < l; ++i) {\n if (hasOwnProperty(value, String(i))) {\n output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,\n String(i), true));\n } else {\n output.push('');\n }\n }\n keys.forEach(function(key) {\n if (!key.match(/^\\d+$/)) {\n output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,\n key, true));\n }\n });\n return output;\n}\n\n\nfunction formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {\n var name, str, desc;\n desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] };\n if (desc.get) {\n if (desc.set) {\n str = ctx.stylize('[Getter/Setter]', 'special');\n } else {\n str = ctx.stylize('[Getter]', 'special');\n }\n } else {\n if (desc.set) {\n str = ctx.stylize('[Setter]', 'special');\n }\n }\n if (!hasOwnProperty(visibleKeys, key)) {\n name = '[' + key + ']';\n }\n if (!str) {\n if (ctx.seen.indexOf(desc.value) < 0) {\n if (isNull(recurseTimes)) {\n str = formatValue(ctx, desc.value, null);\n } else {\n str = formatValue(ctx, desc.value, recurseTimes - 1);\n }\n if (str.indexOf('\\n') > -1) {\n if (array) {\n str = str.split('\\n').map(function(line) {\n return ' ' + line;\n }).join('\\n').slice(2);\n } else {\n str = '\\n' + str.split('\\n').map(function(line) {\n return ' ' + line;\n }).join('\\n');\n }\n }\n } else {\n str = ctx.stylize('[Circular]', 'special');\n }\n }\n if (isUndefined(name)) {\n if (array && key.match(/^\\d+$/)) {\n return str;\n }\n name = JSON.stringify('' + key);\n if (name.match(/^\"([a-zA-Z_][a-zA-Z_0-9]*)\"$/)) {\n name = name.slice(1, -1);\n name = ctx.stylize(name, 'name');\n } else {\n name = name.replace(/'/g, \"\\\\'\")\n .replace(/\\\\\"/g, '\"')\n .replace(/(^\"|\"$)/g, \"'\");\n name = ctx.stylize(name, 'string');\n }\n }\n\n return name + ': ' + str;\n}\n\n\nfunction reduceToSingleString(output, base, braces) {\n var numLinesEst = 0;\n var length = output.reduce(function(prev, cur) {\n numLinesEst++;\n if (cur.indexOf('\\n') >= 0) numLinesEst++;\n return prev + cur.replace(/\\u001b\\[\\d\\d?m/g, '').length + 1;\n }, 0);\n\n if (length > 60) {\n return braces[0] +\n (base === '' ? '' : base + '\\n ') +\n ' ' +\n output.join(',\\n ') +\n ' ' +\n braces[1];\n }\n\n return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1];\n}\n\n\n// NOTE: These type checking functions intentionally don't use `instanceof`\n// because it is fragile and can be easily faked with `Object.create()`.\nexports.types = require('./support/types');\n\nfunction isArray(ar) {\n return Array.isArray(ar);\n}\nexports.isArray = isArray;\n\nfunction isBoolean(arg) {\n return typeof arg === 'boolean';\n}\nexports.isBoolean = isBoolean;\n\nfunction isNull(arg) {\n return arg === null;\n}\nexports.isNull = isNull;\n\nfunction isNullOrUndefined(arg) {\n return arg == null;\n}\nexports.isNullOrUndefined = isNullOrUndefined;\n\nfunction isNumber(arg) {\n return typeof arg === 'number';\n}\nexports.isNumber = isNumber;\n\nfunction isString(arg) {\n return typeof arg === 'string';\n}\nexports.isString = isString;\n\nfunction isSymbol(arg) {\n return typeof arg === 'symbol';\n}\nexports.isSymbol = isSymbol;\n\nfunction isUndefined(arg) {\n return arg === void 0;\n}\nexports.isUndefined = isUndefined;\n\nfunction isRegExp(re) {\n return isObject(re) && objectToString(re) === '[object RegExp]';\n}\nexports.isRegExp = isRegExp;\nexports.types.isRegExp = isRegExp;\n\nfunction isObject(arg) {\n return typeof arg === 'object' && arg !== null;\n}\nexports.isObject = isObject;\n\nfunction isDate(d) {\n return isObject(d) && objectToString(d) === '[object Date]';\n}\nexports.isDate = isDate;\nexports.types.isDate = isDate;\n\nfunction isError(e) {\n return isObject(e) &&\n (objectToString(e) === '[object Error]' || e instanceof Error);\n}\nexports.isError = isError;\nexports.types.isNativeError = isError;\n\nfunction isFunction(arg) {\n return typeof arg === 'function';\n}\nexports.isFunction = isFunction;\n\nfunction isPrimitive(arg) {\n return arg === null ||\n typeof arg === 'boolean' ||\n typeof arg === 'number' ||\n typeof arg === 'string' ||\n typeof arg === 'symbol' || // ES6 symbol\n typeof arg === 'undefined';\n}\nexports.isPrimitive = isPrimitive;\n\nexports.isBuffer = require('./support/isBuffer');\n\nfunction objectToString(o) {\n return Object.prototype.toString.call(o);\n}\n\n\nfunction pad(n) {\n return n < 10 ? '0' + n.toString(10) : n.toString(10);\n}\n\n\nvar months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep',\n 'Oct', 'Nov', 'Dec'];\n\n// 26 Feb 16:19:34\nfunction timestamp() {\n var d = new Date();\n var time = [pad(d.getHours()),\n pad(d.getMinutes()),\n pad(d.getSeconds())].join(':');\n return [d.getDate(), months[d.getMonth()], time].join(' ');\n}\n\n\n// log is just a thin wrapper to console.log that prepends a timestamp\nexports.log = function() {\n console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments));\n};\n\n\n/**\n * Inherit the prototype methods from one constructor into another.\n *\n * The Function.prototype.inherits from lang.js rewritten as a standalone\n * function (not on Function.prototype). NOTE: If this file is to be loaded\n * during bootstrapping this function needs to be rewritten using some native\n * functions as prototype setup using normal JavaScript does not work as\n * expected during bootstrapping (see mirror.js in r114903).\n *\n * @param {function} ctor Constructor function which needs to inherit the\n * prototype.\n * @param {function} superCtor Constructor function to inherit prototype from.\n */\nexports.inherits = require('inherits');\n\nexports._extend = function(origin, add) {\n // Don't do anything if add isn't an object\n if (!add || !isObject(add)) return origin;\n\n var keys = Object.keys(add);\n var i = keys.length;\n while (i--) {\n origin[keys[i]] = add[keys[i]];\n }\n return origin;\n};\n\nfunction hasOwnProperty(obj, prop) {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n}\n\nvar kCustomPromisifiedSymbol = typeof Symbol !== 'undefined' ? Symbol('util.promisify.custom') : undefined;\n\nexports.promisify = function promisify(original) {\n if (typeof original !== 'function')\n throw new TypeError('The \"original\" argument must be of type Function');\n\n if (kCustomPromisifiedSymbol && original[kCustomPromisifiedSymbol]) {\n var fn = original[kCustomPromisifiedSymbol];\n if (typeof fn !== 'function') {\n throw new TypeError('The \"util.promisify.custom\" argument must be of type Function');\n }\n Object.defineProperty(fn, kCustomPromisifiedSymbol, {\n value: fn, enumerable: false, writable: false, configurable: true\n });\n return fn;\n }\n\n function fn() {\n var promiseResolve, promiseReject;\n var promise = new Promise(function (resolve, reject) {\n promiseResolve = resolve;\n promiseReject = reject;\n });\n\n var args = [];\n for (var i = 0; i < arguments.length; i++) {\n args.push(arguments[i]);\n }\n args.push(function (err, value) {\n if (err) {\n promiseReject(err);\n } else {\n promiseResolve(value);\n }\n });\n\n try {\n original.apply(this, args);\n } catch (err) {\n promiseReject(err);\n }\n\n return promise;\n }\n\n Object.setPrototypeOf(fn, Object.getPrototypeOf(original));\n\n if (kCustomPromisifiedSymbol) Object.defineProperty(fn, kCustomPromisifiedSymbol, {\n value: fn, enumerable: false, writable: false, configurable: true\n });\n return Object.defineProperties(\n fn,\n getOwnPropertyDescriptors(original)\n );\n}\n\nexports.promisify.custom = kCustomPromisifiedSymbol\n\nfunction callbackifyOnRejected(reason, cb) {\n // `!reason` guard inspired by bluebird (Ref: https://goo.gl/t5IS6M).\n // Because `null` is a special error value in callbacks which means \"no error\n // occurred\", we error-wrap so the callback consumer can distinguish between\n // \"the promise rejected with null\" or \"the promise fulfilled with undefined\".\n if (!reason) {\n var newReason = new Error('Promise was rejected with a falsy value');\n newReason.reason = reason;\n reason = newReason;\n }\n return cb(reason);\n}\n\nfunction callbackify(original) {\n if (typeof original !== 'function') {\n throw new TypeError('The \"original\" argument must be of type Function');\n }\n\n // We DO NOT return the promise as it gives the user a false sense that\n // the promise is actually somehow related to the callback's execution\n // and that the callback throwing will reject the promise.\n function callbackified() {\n var args = [];\n for (var i = 0; i < arguments.length; i++) {\n args.push(arguments[i]);\n }\n\n var maybeCb = args.pop();\n if (typeof maybeCb !== 'function') {\n throw new TypeError('The last argument must be of type Function');\n }\n var self = this;\n var cb = function() {\n return maybeCb.apply(self, arguments);\n };\n // In true node style we process the callback on `nextTick` with all the\n // implications (stack, `uncaughtException`, `async_hooks`)\n original.apply(this, args)\n .then(function(ret) { process.nextTick(cb.bind(null, null, ret)) },\n function(rej) { process.nextTick(callbackifyOnRejected.bind(null, rej, cb)) });\n }\n\n Object.setPrototypeOf(callbackified, Object.getPrototypeOf(original));\n Object.defineProperties(callbackified,\n getOwnPropertyDescriptors(original));\n return callbackified;\n}\nexports.callbackify = callbackify;\n","// Unique ID creation requires a high quality random # generator. In the browser we therefore\n// require the crypto API and do not support built-in fallback to lower quality random number\n// generators (like Math.random()).\nvar getRandomValues;\nvar rnds8 = new Uint8Array(16);\nexport default function rng() {\n // lazy load so that environments that need to polyfill have a chance to do so\n if (!getRandomValues) {\n // getRandomValues needs to be invoked in a context where \"this\" is a Crypto implementation. Also,\n // find the complete implementation of crypto (msCrypto) on IE11.\n getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto !== 'undefined' && typeof msCrypto.getRandomValues === 'function' && msCrypto.getRandomValues.bind(msCrypto);\n\n if (!getRandomValues) {\n throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n }\n }\n\n return getRandomValues(rnds8);\n}","export default /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;","import REGEX from './regex.js';\n\nfunction validate(uuid) {\n return typeof uuid === 'string' && REGEX.test(uuid);\n}\n\nexport default validate;","import validate from './validate.js';\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\n\nvar byteToHex = [];\n\nfor (var i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).substr(1));\n}\n\nfunction stringify(arr) {\n var offset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n var uuid = (byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]]).toLowerCase(); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nexport default stringify;","import rng from './rng.js';\nimport stringify from './stringify.js';\n\nfunction v4(options, buf, offset) {\n options = options || {};\n var rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (var i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return stringify(rnds);\n}\n\nexport default v4;","const randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto);\nexport default {\n randomUUID\n};","// Unique ID creation requires a high quality random # generator. In the browser we therefore\n// require the crypto API and do not support built-in fallback to lower quality random number\n// generators (like Math.random()).\nlet getRandomValues;\nconst rnds8 = new Uint8Array(16);\nexport default function rng() {\n // lazy load so that environments that need to polyfill have a chance to do so\n if (!getRandomValues) {\n // getRandomValues needs to be invoked in a context where \"this\" is a Crypto implementation.\n getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto);\n\n if (!getRandomValues) {\n throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n }\n }\n\n return getRandomValues(rnds8);\n}","import validate from './validate.js';\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\n\nconst byteToHex = [];\n\nfor (let i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).slice(1));\n}\n\nexport function unsafeStringify(arr, offset = 0) {\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n return byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]];\n}\n\nfunction stringify(arr, offset = 0) {\n const uuid = unsafeStringify(arr, offset); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nexport default stringify;","import native from './native.js';\nimport rng from './rng.js';\nimport { unsafeStringify } from './stringify.js';\n\nfunction v4(options, buf, offset) {\n if (native.randomUUID && !buf && !options) {\n return native.randomUUID();\n }\n\n options = options || {};\n const rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (let i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return unsafeStringify(rnds);\n}\n\nexport default v4;","'use strict';\n\nvar forEach = require('for-each');\nvar availableTypedArrays = require('available-typed-arrays');\nvar callBind = require('call-bind');\nvar callBound = require('call-bind/callBound');\nvar gOPD = require('gopd');\n\n/** @type {(O: object) => string} */\nvar $toString = callBound('Object.prototype.toString');\nvar hasToStringTag = require('has-tostringtag/shams')();\n\nvar g = typeof globalThis === 'undefined' ? global : globalThis;\nvar typedArrays = availableTypedArrays();\n\nvar $slice = callBound('String.prototype.slice');\nvar getPrototypeOf = Object.getPrototypeOf; // require('getprototypeof');\n\n/** @type {(array: readonly T[], value: unknown) => number} */\nvar $indexOf = callBound('Array.prototype.indexOf', true) || function indexOf(array, value) {\n\tfor (var i = 0; i < array.length; i += 1) {\n\t\tif (array[i] === value) {\n\t\t\treturn i;\n\t\t}\n\t}\n\treturn -1;\n};\n\n/** @typedef {(receiver: import('.').TypedArray) => string | typeof Uint8Array.prototype.slice.call | typeof Uint8Array.prototype.set.call} Getter */\n/** @type {{ [k in `\\$${import('.').TypedArrayName}`]?: Getter } & { __proto__: null }} */\nvar cache = { __proto__: null };\nif (hasToStringTag && gOPD && getPrototypeOf) {\n\tforEach(typedArrays, function (typedArray) {\n\t\tvar arr = new g[typedArray]();\n\t\tif (Symbol.toStringTag in arr) {\n\t\t\tvar proto = getPrototypeOf(arr);\n\t\t\t// @ts-expect-error TS won't narrow inside a closure\n\t\t\tvar descriptor = gOPD(proto, Symbol.toStringTag);\n\t\t\tif (!descriptor) {\n\t\t\t\tvar superProto = getPrototypeOf(proto);\n\t\t\t\t// @ts-expect-error TS won't narrow inside a closure\n\t\t\t\tdescriptor = gOPD(superProto, Symbol.toStringTag);\n\t\t\t}\n\t\t\t// @ts-expect-error TODO: fix\n\t\t\tcache['$' + typedArray] = callBind(descriptor.get);\n\t\t}\n\t});\n} else {\n\tforEach(typedArrays, function (typedArray) {\n\t\tvar arr = new g[typedArray]();\n\t\tvar fn = arr.slice || arr.set;\n\t\tif (fn) {\n\t\t\t// @ts-expect-error TODO: fix\n\t\t\tcache['$' + typedArray] = callBind(fn);\n\t\t}\n\t});\n}\n\n/** @type {(value: object) => false | import('.').TypedArrayName} */\nvar tryTypedArrays = function tryAllTypedArrays(value) {\n\t/** @type {ReturnType} */ var found = false;\n\tforEach(\n\t\t// eslint-disable-next-line no-extra-parens\n\t\t/** @type {Record<`\\$${TypedArrayName}`, Getter>} */ /** @type {any} */ (cache),\n\t\t/** @type {(getter: Getter, name: `\\$${import('.').TypedArrayName}`) => void} */\n\t\tfunction (getter, typedArray) {\n\t\t\tif (!found) {\n\t\t\t\ttry {\n\t\t\t\t// @ts-expect-error TODO: fix\n\t\t\t\t\tif ('$' + getter(value) === typedArray) {\n\t\t\t\t\t\tfound = $slice(typedArray, 1);\n\t\t\t\t\t}\n\t\t\t\t} catch (e) { /**/ }\n\t\t\t}\n\t\t}\n\t);\n\treturn found;\n};\n\n/** @type {(value: object) => false | import('.').TypedArrayName} */\nvar trySlices = function tryAllSlices(value) {\n\t/** @type {ReturnType} */ var found = false;\n\tforEach(\n\t\t// eslint-disable-next-line no-extra-parens\n\t\t/** @type {Record<`\\$${TypedArrayName}`, Getter>} */ /** @type {any} */ (cache),\n\t\t/** @type {(getter: typeof cache, name: `\\$${import('.').TypedArrayName}`) => void} */ function (getter, name) {\n\t\t\tif (!found) {\n\t\t\t\ttry {\n\t\t\t\t\t// @ts-expect-error TODO: fix\n\t\t\t\t\tgetter(value);\n\t\t\t\t\tfound = $slice(name, 1);\n\t\t\t\t} catch (e) { /**/ }\n\t\t\t}\n\t\t}\n\t);\n\treturn found;\n};\n\n/** @type {import('.')} */\nmodule.exports = function whichTypedArray(value) {\n\tif (!value || typeof value !== 'object') { return false; }\n\tif (!hasToStringTag) {\n\t\t/** @type {string} */\n\t\tvar tag = $slice($toString(value), 8, -1);\n\t\tif ($indexOf(typedArrays, tag) > -1) {\n\t\t\treturn tag;\n\t\t}\n\t\tif (tag !== 'Object') {\n\t\t\treturn false;\n\t\t}\n\t\t// node < 0.6 hits here on real Typed Arrays\n\t\treturn trySlices(value);\n\t}\n\tif (!gOPD) { return null; } // unknown engine\n\treturn tryTypedArrays(value);\n};\n","\"use strict\";\n/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.EventEmitter = void 0;\n// TODO AB#7377 Provide Fluid EventEmitter using support in packages/dds/tree/src/events.\nvar events_pkg_1 = require(\"events_pkg\");\nObject.defineProperty(exports, \"EventEmitter\", { enumerable: true, get: function () { return events_pkg_1.EventEmitter; } });\n//# sourceMappingURL=eventEmitter.cjs.map","'use strict';\n\nvar possibleNames = require('possible-typed-array-names');\n\nvar g = typeof globalThis === 'undefined' ? global : globalThis;\n\n/** @type {import('.')} */\nmodule.exports = function availableTypedArrays() {\n\tvar /** @type {ReturnType} */ out = [];\n\tfor (var i = 0; i < possibleNames.length; i++) {\n\t\tif (typeof g[possibleNames[i]] === 'function') {\n\t\t\t// @ts-expect-error\n\t\t\tout[out.length] = possibleNames[i];\n\t\t}\n\t}\n\treturn out;\n};\n","/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n// This file is a Node.js-specific implementation of the base64 encoding functions.\n// Aside from the below import statement, this file should be identical to the\n// base64EncodingNode.ts.\n//\n// (See 'Isomorphic Code' section in the package README.md.)\nimport { IsoBuffer } from \"./bufferBrowser.js\";\n/**\n * Converts the provided {@link https://en.wikipedia.org/wiki/Base64 | base64}-encoded string\n * to {@link https://en.wikipedia.org/wiki/UTF-8 | utf-8}.\n *\n * @internal\n */\nexport const fromBase64ToUtf8 = (input) => IsoBuffer.from(input, \"base64\").toString(\"utf8\");\n/**\n * Converts the provided {@link https://en.wikipedia.org/wiki/UTF-8 | utf-8}-encoded string\n * to {@link https://en.wikipedia.org/wiki/Base64 | base64}.\n *\n * @internal\n */\nexport const fromUtf8ToBase64 = (input) => IsoBuffer.from(input, \"utf8\").toString(\"base64\");\n/**\n * Convenience function to convert unknown encoding to utf8 that avoids\n * buffer copies/encode ops when no conversion is needed.\n * @param input - The source string to convert.\n * @param encoding - The source string's encoding.\n *\n * @internal\n */\nexport const toUtf8 = (input, encoding) => {\n switch (encoding) {\n case \"utf8\":\n // eslint-disable-next-line unicorn/text-encoding-identifier-case -- this value is supported, just discouraged\n case \"utf-8\": {\n return input;\n }\n default: {\n return IsoBuffer.from(input, encoding).toString();\n }\n }\n};\n//# sourceMappingURL=base64EncodingBrowser.js.map","/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\nimport * as base64js from \"base64-js\";\n/**\n * Converts a Uint8Array to a string of the provided encoding\n * Useful when the array might be an {@link IsoBuffer}.\n *\n * @param arr - The array to convert.\n * @param encoding - Optional target encoding; only \"utf8\" and \"base64\" are\n * supported, with \"utf8\" being default.\n * @returns The converted string.\n *\n * @internal\n */\nexport function Uint8ArrayToString(arr, \n// eslint-disable-next-line unicorn/text-encoding-identifier-case -- this value is supported, just discouraged\nencoding) {\n switch (encoding) {\n case \"base64\": {\n return base64js.fromByteArray(arr);\n }\n case \"utf8\":\n // eslint-disable-next-line unicorn/text-encoding-identifier-case -- this value is supported, just discouraged\n case \"utf-8\":\n case undefined: {\n return new TextDecoder().decode(arr);\n }\n default: {\n throw new Error(\"invalid/unsupported encoding\");\n }\n }\n}\n/**\n * Converts a {@link https://en.wikipedia.org/wiki/Base64 | base64} or\n * {@link https://en.wikipedia.org/wiki/UTF-8 | utf-8} string to array buffer.\n *\n * @param encoding - The input string's encoding.\n *\n * @internal\n */\nexport const stringToBuffer = (input, encoding) => IsoBuffer.from(input, encoding).buffer;\n/**\n * Convert binary blob to string format\n *\n * @param blob - the binary blob\n * @param encoding - output string's encoding\n * @returns the blob in string format\n *\n * @internal\n */\nexport const bufferToString = (blob, \n// eslint-disable-next-line unicorn/text-encoding-identifier-case -- this value is supported, just discouraged\nencoding) => IsoBuffer.from(blob).toString(encoding);\n/**\n * Determines if an object is an array buffer.\n *\n * @remarks Will detect and reject TypedArrays, like Uint8Array.\n * Reason - they can be viewport into Array, they can be accepted, but caller has to deal with\n * math properly (i.e. Take into account byteOffset at minimum).\n * For example, construction of new TypedArray can be in the form of new TypedArray(typedArray) or\n * new TypedArray(buffer, byteOffset, length), but passing TypedArray will result in fist path (and\n * ignoring byteOffice, length).\n *\n * @param obj - The object to determine if it is an ArrayBuffer.\n *\n * @internal\n */\nexport function isArrayBuffer(obj) {\n const maybe = obj;\n return (obj instanceof ArrayBuffer ||\n (typeof maybe === \"object\" &&\n maybe !== null &&\n typeof maybe.byteLength === \"number\" &&\n typeof maybe.slice === \"function\" &&\n maybe.byteOffset === undefined &&\n maybe.buffer === undefined));\n}\n/**\n * Minimal implementation of Buffer for our usages in the browser environment.\n *\n * @internal\n */\nexport class IsoBuffer extends Uint8Array {\n /**\n * Convert the buffer to a string.\n * Only supports encoding the whole string (unlike the Node Buffer equivalent)\n * and only utf8 and base64 encodings.\n *\n * @param encoding - The encoding to use.\n */\n // eslint-disable-next-line unicorn/text-encoding-identifier-case -- this value is supported, just discouraged\n toString(encoding) {\n return Uint8ArrayToString(this, encoding);\n }\n /**\n * Static constructor\n * @param value - (string | ArrayBuffer)\n * @param encodingOrOffset - (string | number)\n * @param length - (number)\n *\n * @privateRemarks TODO: Use actual types\n */\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any\n static from(value, encodingOrOffset, length) {\n if (typeof value === \"string\") {\n return IsoBuffer.fromString(value, encodingOrOffset);\n // Capture any typed arrays, including Uint8Array (and thus - IsoBuffer!)\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n }\n else if (value !== null && typeof value === \"object\" && isArrayBuffer(value.buffer)) {\n // The version of the from function for the node buffer, which takes a buffer or typed array\n // as first parameter, does not have any offset or length parameters. Those are just silently\n // ignored and not taken into account\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-member-access\n return IsoBuffer.fromArrayBuffer(value.buffer, value.byteOffset, value.byteLength);\n }\n else if (isArrayBuffer(value)) {\n return IsoBuffer.fromArrayBuffer(value, encodingOrOffset, length);\n }\n else {\n throw new TypeError(\"Input value was neither a string nor an ArrayBuffer.\");\n }\n }\n static fromArrayBuffer(arrayBuffer, byteOffset, byteLength) {\n const offset = byteOffset ?? 0;\n const validLength = byteLength ?? arrayBuffer.byteLength - offset;\n if (offset < 0 ||\n offset > arrayBuffer.byteLength ||\n validLength < 0 ||\n validLength + offset > arrayBuffer.byteLength) {\n throw new RangeError(\"Invalid range specified.\");\n }\n return new IsoBuffer(arrayBuffer, offset, validLength);\n }\n static fromString(str, encoding) {\n switch (encoding) {\n case \"base64\": {\n const sanitizedString = this.sanitizeBase64(str);\n const encoded = base64js.toByteArray(sanitizedString);\n return new IsoBuffer(encoded.buffer);\n }\n case \"utf8\":\n // eslint-disable-next-line unicorn/text-encoding-identifier-case -- this value is supported, just discouraged\n case \"utf-8\":\n case undefined: {\n const encoded = new TextEncoder().encode(str);\n return new IsoBuffer(encoded.buffer);\n }\n default: {\n throw new Error(\"invalid/unsupported encoding\");\n }\n }\n }\n static isBuffer(obj) {\n throw new Error(\"unimplemented\");\n }\n /**\n * Sanitize a base64 string to provide to base64-js library.\n * {@link https://www.npmjs.com/package/base64-js} is not as tolerant of the same malformed base64 as Node'\n * Buffer is.\n */\n static sanitizeBase64(str) {\n let sanitizedStr = str;\n // Remove everything after padding - Node buffer ignores everything\n // after any padding whereas base64-js does not\n sanitizedStr = sanitizedStr.split(\"=\")[0];\n // Remove invalid characters - Node buffer strips invalid characters\n // whereas base64-js replaces them with \"A\"\n sanitizedStr = sanitizedStr.replace(/[^\\w+-/]/g, \"\");\n // Check for missing padding - Node buffer tolerates missing padding\n // whereas base64-js does not\n if (sanitizedStr.length % 4 !== 0) {\n const paddingArray = [\"\", \"===\", \"==\", \"=\"];\n sanitizedStr += paddingArray[sanitizedStr.length % 4];\n }\n return sanitizedStr;\n }\n}\n//# sourceMappingURL=bufferBrowser.js.map","/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n// This file is a Node.js-specific implementation of the base64 encoding functions.\n// Aside from the below import statement, this file should be identical to the\n// base64EncodingNode.ts.\n//\n// (See 'Isomorphic Code' section in the package README.md.)\nimport { IsoBuffer } from \"./bufferBrowser.js\";\n/**\n * Converts the provided {@link https://en.wikipedia.org/wiki/Base64 | base64}-encoded string\n * to {@link https://en.wikipedia.org/wiki/UTF-8 | utf-8}.\n *\n * @internal\n */\nexport const fromBase64ToUtf8 = (input) => IsoBuffer.from(input, \"base64\").toString(\"utf8\");\n/**\n * Converts the provided {@link https://en.wikipedia.org/wiki/UTF-8 | utf-8}-encoded string\n * to {@link https://en.wikipedia.org/wiki/Base64 | base64}.\n *\n * @internal\n */\nexport const fromUtf8ToBase64 = (input) => IsoBuffer.from(input, \"utf8\").toString(\"base64\");\n/**\n * Convenience function to convert unknown encoding to utf8 that avoids\n * buffer copies/encode ops when no conversion is needed.\n * @param input - The source string to convert.\n * @param encoding - The source string's encoding.\n *\n * @internal\n */\nexport const toUtf8 = (input, encoding) => {\n switch (encoding) {\n case \"utf8\":\n // eslint-disable-next-line unicorn/text-encoding-identifier-case -- this value is supported, just discouraged\n case \"utf-8\": {\n return input;\n }\n default: {\n return IsoBuffer.from(input, encoding).toString();\n }\n }\n};\n//# sourceMappingURL=base64EncodingBrowser.js.map","/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\nimport * as base64js from \"base64-js\";\n/**\n * Converts a Uint8Array to a string of the provided encoding\n * Useful when the array might be an {@link IsoBuffer}.\n *\n * @param arr - The array to convert.\n * @param encoding - Optional target encoding; only \"utf8\" and \"base64\" are\n * supported, with \"utf8\" being default.\n * @returns The converted string.\n *\n * @internal\n */\nexport function Uint8ArrayToString(arr, \n// eslint-disable-next-line unicorn/text-encoding-identifier-case -- this value is supported, just discouraged\nencoding) {\n switch (encoding) {\n case \"base64\": {\n return base64js.fromByteArray(arr);\n }\n case \"utf8\":\n // eslint-disable-next-line unicorn/text-encoding-identifier-case -- this value is supported, just discouraged\n case \"utf-8\":\n case undefined: {\n return new TextDecoder().decode(arr);\n }\n default: {\n throw new Error(\"invalid/unsupported encoding\");\n }\n }\n}\n/**\n * Converts a {@link https://en.wikipedia.org/wiki/Base64 | base64} or\n * {@link https://en.wikipedia.org/wiki/UTF-8 | utf-8} string to array buffer.\n *\n * @param encoding - The input string's encoding.\n *\n * @internal\n */\nexport const stringToBuffer = (input, encoding) => IsoBuffer.from(input, encoding).buffer;\n/**\n * Convert binary blob to string format\n *\n * @param blob - the binary blob\n * @param encoding - output string's encoding\n * @returns the blob in string format\n *\n * @internal\n */\nexport const bufferToString = (blob, \n// eslint-disable-next-line unicorn/text-encoding-identifier-case -- this value is supported, just discouraged\nencoding) => IsoBuffer.from(blob).toString(encoding);\n/**\n * Determines if an object is an array buffer.\n *\n * @remarks Will detect and reject TypedArrays, like Uint8Array.\n * Reason - they can be viewport into Array, they can be accepted, but caller has to deal with\n * math properly (i.e. Take into account byteOffset at minimum).\n * For example, construction of new TypedArray can be in the form of new TypedArray(typedArray) or\n * new TypedArray(buffer, byteOffset, length), but passing TypedArray will result in fist path (and\n * ignoring byteOffice, length).\n *\n * @param obj - The object to determine if it is an ArrayBuffer.\n *\n * @internal\n */\nexport function isArrayBuffer(obj) {\n const maybe = obj;\n return (obj instanceof ArrayBuffer ||\n (typeof maybe === \"object\" &&\n maybe !== null &&\n typeof maybe.byteLength === \"number\" &&\n typeof maybe.slice === \"function\" &&\n maybe.byteOffset === undefined &&\n maybe.buffer === undefined));\n}\n/**\n * Minimal implementation of Buffer for our usages in the browser environment.\n *\n * @internal\n */\nexport class IsoBuffer extends Uint8Array {\n /**\n * Convert the buffer to a string.\n * Only supports encoding the whole string (unlike the Node Buffer equivalent)\n * and only utf8 and base64 encodings.\n *\n * @param encoding - The encoding to use.\n */\n // eslint-disable-next-line unicorn/text-encoding-identifier-case -- this value is supported, just discouraged\n toString(encoding) {\n return Uint8ArrayToString(this, encoding);\n }\n /**\n * Static constructor\n * @param value - (string | ArrayBuffer)\n * @param encodingOrOffset - (string | number)\n * @param length - (number)\n *\n * @privateRemarks TODO: Use actual types\n */\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any\n static from(value, encodingOrOffset, length) {\n if (typeof value === \"string\") {\n return IsoBuffer.fromString(value, encodingOrOffset);\n // Capture any typed arrays, including Uint8Array (and thus - IsoBuffer!)\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n }\n else if (value !== null && typeof value === \"object\" && isArrayBuffer(value.buffer)) {\n // The version of the from function for the node buffer, which takes a buffer or typed array\n // as first parameter, does not have any offset or length parameters. Those are just silently\n // ignored and not taken into account\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-member-access\n return IsoBuffer.fromArrayBuffer(value.buffer, value.byteOffset, value.byteLength);\n }\n else if (isArrayBuffer(value)) {\n return IsoBuffer.fromArrayBuffer(value, encodingOrOffset, length);\n }\n else {\n throw new TypeError(\"Input value was neither a string nor an ArrayBuffer.\");\n }\n }\n static fromArrayBuffer(arrayBuffer, byteOffset, byteLength) {\n const offset = byteOffset ?? 0;\n const validLength = byteLength ?? arrayBuffer.byteLength - offset;\n if (offset < 0 ||\n offset > arrayBuffer.byteLength ||\n validLength < 0 ||\n validLength + offset > arrayBuffer.byteLength) {\n throw new RangeError(\"Invalid range specified.\");\n }\n return new IsoBuffer(arrayBuffer, offset, validLength);\n }\n static fromString(str, encoding) {\n switch (encoding) {\n case \"base64\": {\n const sanitizedString = this.sanitizeBase64(str);\n const encoded = base64js.toByteArray(sanitizedString);\n return new IsoBuffer(encoded.buffer);\n }\n case \"utf8\":\n // eslint-disable-next-line unicorn/text-encoding-identifier-case -- this value is supported, just discouraged\n case \"utf-8\":\n case undefined: {\n const encoded = new TextEncoder().encode(str);\n return new IsoBuffer(encoded.buffer);\n }\n default: {\n throw new Error(\"invalid/unsupported encoding\");\n }\n }\n }\n static isBuffer(obj) {\n throw new Error(\"unimplemented\");\n }\n /**\n * Sanitize a base64 string to provide to base64-js library.\n * {@link https://www.npmjs.com/package/base64-js} is not as tolerant of the same malformed base64 as Node'\n * Buffer is.\n */\n static sanitizeBase64(str) {\n let sanitizedStr = str;\n // Remove everything after padding - Node buffer ignores everything\n // after any padding whereas base64-js does not\n sanitizedStr = sanitizedStr.split(\"=\")[0];\n // Remove invalid characters - Node buffer strips invalid characters\n // whereas base64-js replaces them with \"A\"\n sanitizedStr = sanitizedStr.replace(/[^\\w+-/]/g, \"\");\n // Check for missing padding - Node buffer tolerates missing padding\n // whereas base64-js does not\n if (sanitizedStr.length % 4 !== 0) {\n const paddingArray = [\"\", \"===\", \"==\", \"=\"];\n sanitizedStr += paddingArray[sanitizedStr.length % 4];\n }\n return sanitizedStr;\n }\n}\n//# sourceMappingURL=bufferBrowser.js.map","/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n/**\n * Exposes `Performance.now()` in both Node and browser environments.\n *\n * @remarks\n *\n * The performance API is available as an attribute on the `WindowOrWorkerGlobalScope` object which `globalThis` points to.\n * - The [global `performance` attribute](https://w3c.github.io/hr-time/#the-performance-attribute)\n * - [`globalThis`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/globalThis)\n *\n * @internal\n */\nexport const performanceNow = () => globalThis.performance.now();\n//# sourceMappingURL=performanceIsomorphic.js.map","/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n/**\n * Accepted header keys for requests coming to the Loader\n * @legacy\n * @alpha\n */\nexport var LoaderHeader;\n(function (LoaderHeader) {\n /**\n * @deprecated This header has been deprecated and will be removed in a future release\n * Override the Loader's default caching behavior for this container.\n */\n LoaderHeader[\"cache\"] = \"fluid-cache\";\n LoaderHeader[\"clientDetails\"] = \"fluid-client-details\";\n /**\n * Start the container in a paused, unconnected state. Defaults to false\n */\n LoaderHeader[\"loadMode\"] = \"loadMode\";\n LoaderHeader[\"reconnect\"] = \"fluid-reconnect\";\n /**\n * Loads the container to at least the specified sequence number.\n * If not defined, behavior will fall back to `IContainerLoadMode.opsBeforeReturn`.\n */\n LoaderHeader[\"sequenceNumber\"] = \"fluid-sequence-number\";\n /**\n * One of the following:\n * null or \"null\": use ops, no snapshots\n * undefined: fetch latest snapshot\n * otherwise, version sha to load snapshot\n */\n LoaderHeader[\"version\"] = \"version\";\n})(LoaderHeader || (LoaderHeader = {}));\n//# sourceMappingURL=loader.js.map","/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n/**\n * Error types the Fluid Framework may report.\n * @legacy\n * @alpha\n */\nexport const FluidErrorTypes = {\n /**\n * Some error, most likely an exception caught by runtime and propagated to container as critical error\n */\n genericError: \"genericError\",\n /**\n * Throttling error from server. Server is busy and is asking not to reconnect for some time\n */\n throttlingError: \"throttlingError\",\n /**\n * Data loss error detected by Container / DeltaManager. Likely points to storage issue.\n */\n dataCorruptionError: \"dataCorruptionError\",\n /**\n * Error encountered when processing an operation. May correlate with data corruption.\n */\n dataProcessingError: \"dataProcessingError\",\n /**\n * Error indicating an API is being used improperly resulting in an invalid operation.\n */\n usageError: \"usageError\",\n};\n//# sourceMappingURL=error.js.map","/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n/**\n * Specify levels of the logs.\n * @public\n */\nexport const LogLevel = {\n verbose: 10, // To log any verbose event for example when you are debugging something.\n default: 20, // Default log level\n error: 30, // To log errors.\n};\n//# sourceMappingURL=logger.js.map","/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n/**\n * Asserts the specified condition.\n *\n * @param condition - The condition that should be true, if the condition is false an error will be thrown.\n * Only use this API when `false` indicates a logic error in the problem and thus a bug that should be fixed.\n * @param message - The message to include in the error when the condition does not hold.\n * A number should not be specified manually: use a string.\n * Before a release, policy-check should be run, which will convert any asserts still using strings to\n * use numbered error codes instead.\n * @remarks\n * Use this instead of the node 'assert' package, which requires polyfills and has a big impact on bundle sizes.\n *\n * Assertions using this API will be included in all configurations: there is no option to disable or optimize them out.\n * Thus this API is suitable for detecting conditions that should terminate the application and produce a useful diagnostic message.\n * It can be used to ensure bad states are detected early and to avoid data corruption or harder to debug errors.\n *\n * In cases where the assert is very unlikely to have an impact on production code but is still useful as documentation and for debugging, consider using `debugAssert` instead\n * to optimize bundle size.\n *\n * This API is not intended for use outside of the Fluid Framework client codebase: it will most likely be made internal in the future.\n * @privateRemarks\n * This should be deprecated (as a non internal API) then moved to purely internal.\n * When done the `debugAssert` reference above should be turned into a link.\n * @legacy\n * @alpha\n */\nexport function assert(condition, message) {\n if (!condition) {\n fail(message);\n }\n}\n/**\n * Throw an error with a constant message.\n * @remarks\n * Works like {@link assert}, but errors unconditionally instead of taking in a condition.\n *\n * Unlike `assert`, this `fail` is not \"tagged\" by the assert tagging too by default.\n * Use a `assertTagging.config.mjs` file to enable this and any other assert tagging customizations as needed.\n *\n * Returns `never` so it can be used inline as part of an expression, or as a return value.\n * @example\n * ```ts\n * const x: number = numbersMap.get(\"foo\") ?? fail(\"foo missing from map\");\n * ```\n * @internal\n */\nexport function fail(message) {\n const error = new Error(typeof message === \"number\" ? `0x${message.toString(16).padStart(3, \"0\")}` : message);\n onAssertionError(error);\n throw error;\n}\nfunction onAssertionError(error) {\n for (const handler of firstChanceAssertionHandler) {\n handler(error);\n }\n}\nconst firstChanceAssertionHandler = new Set();\n/**\n * Add a callback which can be used to report an assertion before it is thrown.\n * @param handler - Called when an assertion occurs before the exception is thrown.\n * @returns a function to remove the handler.\n * @remarks\n * The callback runs just before the exception is thrown, which makes it a better place to report telemetry for Fluid Framework bugs than a catch block or an event like `window.onerror`.\n * Using this API to report telemetry is preferred over those approaches since it eliminates the risk of the exception being swallowed or obfuscated by an intermediate stack frame's catch block\n * or missed due to not having the right catch block or event handler.\n *\n * This does not replace the need for error handling elsewhere since errors (even bugs in Fluid) can cause other kinds of exceptions which this cannot run the callback for.\n * @example\n * ```ts\n * import { onAssertionFailure } from \"fluid-framework/alpha\";\n *\n * let firstAssertion: Error | undefined;\n *\n * onAssertionFailure((error: Error) => {\n * \tconst priorErrorNote =\n * \t\tfirstAssertion === undefined\n * \t\t\t? \"Please report this bug.\"\n * \t\t\t: `Might be caused due to prior error ${JSON.stringify(firstAssertion.message)} which should be investigated first.`;\n * \tconst message = `Encountered Bug in Fluid Framework: ${error.message}\\n${priorErrorNote}\\n${error.stack}`;\n * \tconsole.error(message);\n *\n * \tdebugger;\n * \tfirstAssertion ??= error;\n * });\n * ```\n * @alpha\n */\nexport function onAssertionFailure(handler) {\n // To avoid issues if the same callback is registered twice (mainly it not triggering twice and the first unregister removing it),\n // generate a wrapper around the handler.\n const wrapper = (error) => {\n handler(error);\n };\n firstChanceAssertionHandler.add(wrapper);\n return () => {\n firstChanceAssertionHandler.delete(wrapper);\n };\n}\n/**\n * Asserts that can be conditionally enabled in debug/development builds but will be optimized out of production builds.\n *\n * Disabled by default.\n *\n * If the assert must be enforced/checked in production or enabled by default, use {@link assert} instead.\n *\n * @param predicate - A pure function that should return true if the condition holds, or a string or object describing the condition that failed.\n * This function will only be run in some configurations so it should be pure, and only used to detect bugs (when debugAssert are enabled), and must not be relied on to enforce the condition is true: for that use {@link assert}.\n * @remarks\n * Optimizing the asserts out of the bundle requires a bundler like webpack which leverages `__PURE__` annotations like https://webpack.js.org/guides/tree-shaking/#mark-a-function-call-as-side-effect-free.\n *\n * Exceptions thrown by this function must never be caught in production code, as that will result in different behavior when testing and when running optimized builds.\n * The `predicate` function must be pure (have no side-effects) to ensure that the behavior of code is the same regardless of if the asserts are disabled, enabled or optimized out.\n *\n * These asserts are disabled by default, even in debug builds to ensure that by default code will be tested as production runs, with them disabled.\n * Additionally, this ensures that apps that use a bundler which does not remove `__PURE__` will not incur the runtime cost of calling the predicate.\n * These asserts can be can be enabled by calling `configureDebugAsserts(true)`: see {@link configureDebugAsserts}.\n *\n * @privateRemarks\n * This design was chosen to accomplish two main goals:\n *\n * 1. Make it easy to compile debug asserts fully out of production builds.\n * For webpack this happens by default, avoiding the need for customers to do special configuration.\n * This is important for both performance and bundle size.\n *\n * 2. Make it easy to test (both manually and automated) with and without the predicates running.\n * This ensures it is possible to benefit from the asserts when enabled, but also test with them disabled to ensure this disablement doesn't cause bugs.\n *\n * The default behavior of having debugAsserts disabled helps ensure that tests which don't know about debug asserts will still run in a way that is most similar to production.\n * @internal\n */\nexport function debugAssert(predicate) {\n // This is valid since the contract for this function is that \"predicate\" should be side effect free and never return non true in production scenarios:\n // it returning non-true indicates a bug is present, and that the validation it does to detect the bug is only desired in specific test/debug situations.\n // Production scenarios, where pure code is removed, should never hit a failing predicate, and thus this code should be side effect free.\n skipInProduction(() => {\n if (debugAssertsEnabled) {\n const result = predicate();\n if (result !== true) {\n debugger;\n const error = new Error(`Debug assert failed: ${result.toString()}`);\n onAssertionError(error);\n throw error;\n }\n }\n });\n}\nlet debugAssertsEnabled = false;\n/**\n * Enables {@link debugAssert} validation.\n * @remarks\n * Throws if debugAsserts have been optimized out.\n * @returns The previous state of debugAsserts.\n * @internal\n */\nexport function configureDebugAsserts(enabled) {\n assert(nonProductionConditionalsIncluded(), 0xab1 /* Debug asserts cannot be configured since they have been optimized out. */);\n const old = debugAssertsEnabled;\n debugAssertsEnabled = enabled;\n return old;\n}\n/**\n * Checks if non-production conditional code like {@link debugAssert} is included in this build.\n * @remarks\n * Such code can be optimized out by bundlers: this checks if that has occurred.\n * @privateRemarks\n * See {@link skipInProduction}.\n * @internal\n */\nexport function nonProductionConditionalsIncluded() {\n let included = false;\n skipInProduction(() => {\n included = true;\n });\n return included;\n}\n/**\n * Run `conditional` only in debug/development (non optimized/minified) builds, but optimize it out of production builds.\n *\n * @param conditional - This function will only be run in some configurations so it should be pure (at least in production scenarios).\n * It can be used to interact with debug only functionality that is also removed in production builds, or to do validation/testing/debugging that can be assumed to be sideeffect free in production where it might be removed.\n * @remarks\n * Great care must be taken when using this to ensure that bugs are not introduced which only occur when `conditional` is not run.\n * One way to do this is to provide an alternative way to disable the effects of `conditional` in development builds so both configurations can be tested:\n * {@link debugAssert} uses this pattern.\n *\n * @privateRemarks\n * Since this function has no built in option for toggling it in development for testing, it is not exported and is only used as a building block for other testable options.\n * There are some additional details about syntax and bundler support in https://github.com/javascript-compiler-hints/compiler-notations-spec/tree/main .\n * This code uses both NO_SIDE_EFFECTS and PURE to maximize compatibility: for any bundler supporting both they are redundant.\n */\n// Using the exact syntax from https://github.com/javascript-compiler-hints/compiler-notations-spec/blob/main/no-side-effects-notation-spec.md to maximize compatibility with tree-shaking tools.\n// eslint-disable-next-line spaced-comment\n/*#__NO_SIDE_EFFECTS__*/\nfunction skipInProduction(conditional) {\n // Here __PURE__ annotation is used to indicate that is is safe to optimize out this call.\n // This is valid since the contract for this function is that \"conditional\" should be side effect free if it were run in production scenarios\n // See https://webpack.js.org/guides/tree-shaking/#mark-a-function-call-as-side-effect-free for documentation on this annotation.\n // Using the exact syntax from https://webpack.js.org/guides/tree-shaking/#mark-a-function-call-as-side-effect-free to maximize compatibility with tree-shaking tools.\n // eslint-disable-next-line spaced-comment\n /*#__PURE__*/ conditional();\n}\n//# sourceMappingURL=assert.js.map","/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n/**\n * Helper class for lazy initialized values. Ensures the value is only generated once, and remain immutable.\n * @internal\n */\nexport class Lazy {\n /**\n * Instantiates an instance of Lazy.\n * @param valueGenerator - The function that will generate the value when value is accessed the first time.\n */\n constructor(valueGenerator) {\n this.valueGenerator = valueGenerator;\n this._evaluated = false;\n }\n /**\n * Return true if the value as been generated, otherwise false.\n */\n get evaluated() {\n return this._evaluated;\n }\n /**\n * Get the value. If this is the first call the value will be generated.\n */\n get value() {\n if (!this._evaluated) {\n this._evaluated = true;\n this._value = this.valueGenerator();\n }\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n return this._value;\n }\n}\n/**\n * A lazy evaluated promise. The execute function is delayed until\n * the promise is used, e.g. await, then, catch ...\n * The execute function is only called once.\n * All calls are then proxied to the promise returned by the execute method.\n * @legacy\n * @alpha\n */\nexport class LazyPromise {\n // eslint-disable-next-line @typescript-eslint/class-literal-property-style\n get [Symbol.toStringTag]() {\n return \"[object LazyPromise]\";\n }\n constructor(execute) {\n this.execute = execute;\n }\n // eslint-disable-next-line unicorn/no-thenable\n async then(\n // eslint-disable-next-line @rushstack/no-new-null\n onfulfilled, \n // TODO: Use `unknown` instead (API breaking)\n // eslint-disable-next-line @rushstack/no-new-null, @typescript-eslint/no-explicit-any\n onrejected) {\n // eslint-disable-next-line prefer-rest-params\n return this.getPromise().then(...arguments);\n }\n async catch(\n // TODO: Use `unknown` instead (API breaking)\n // eslint-disable-next-line @rushstack/no-new-null, @typescript-eslint/no-explicit-any\n onrejected) {\n // eslint-disable-next-line prefer-rest-params\n return this.getPromise().catch(...arguments);\n }\n // eslint-disable-next-line @rushstack/no-new-null\n async finally(onfinally) {\n // eslint-disable-next-line prefer-rest-params\n return this.getPromise().finally(...arguments);\n }\n async getPromise() {\n if (this.result === undefined) {\n this.result = this.execute();\n }\n return this.result;\n }\n}\n//# sourceMappingURL=lazy.js.map","/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\nimport { FluidErrorTypes } from \"@fluidframework/core-interfaces/internal\";\n// Omit `dataCorruptionError` and `dataProcessingError` from the list of values inherited from FluidErrorTypes\nconst { dataCorruptionError, dataProcessingError, ...FluidErrorTypesExceptDataTypes } = FluidErrorTypes;\n/**\n * Different error types the Driver may report out to the Host.\n * @legacy\n * @alpha\n */\nexport const DriverErrorTypes = {\n // Inherit base error types\n ...FluidErrorTypesExceptDataTypes,\n /**\n * Some non-categorized (below) networking error\n * Include errors like fatal server error (usually 500).\n */\n genericNetworkError: \"genericNetworkError\",\n /**\n * Access denied - user does not have enough privileges to open a file, or continue to operate on a file\n */\n authorizationError: \"authorizationError\",\n /**\n * File not found, or file deleted during session\n */\n fileNotFoundOrAccessDeniedError: \"fileNotFoundOrAccessDeniedError\",\n /**\n * We can not reach server due to computer being offline.\n */\n offlineError: \"offlineError\",\n /*\n * Unsupported client protocol\n */\n unsupportedClientProtocolVersion: \"unsupportedClientProtocolVersion\",\n /**\n * User does not have write permissions to a file, but is changing content of a file.\n * That might be indication of some data store error - data stores should not generate ops in readonly mode.\n */\n writeError: \"writeError\",\n /**\n * A generic fetch failure that indicates we were not able to get a response from the server.\n * This may be due to the client being offline (though, if we are able to detect offline state it will be\n * logged as an offlineError instead). Other possibilities could be DNS errors, malformed fetch request,\n * CSP violation, etc.\n */\n fetchFailure: \"fetchFailure\",\n /**\n * This error occurs when token provider fails to fetch orderer token\n */\n fetchTokenError: \"fetchTokenError\",\n /**\n * Unexpected response from server. Either JSON is malformed, or some required properties are missing\n */\n incorrectServerResponse: \"incorrectServerResponse\",\n /**\n * This error occurs when the file is modified externally (not through Fluid protocol) in storage.\n * It will occur in cases where client has some state or cache that is based on old content (identity) of a file,\n * and storage / driver / loader detects such mismatch.\n * When it's hit, client needs to forget all the knowledge about this file and start over.\n */\n fileOverwrittenInStorage: \"fileOverwrittenInStorage\",\n /**\n * The document is read-only and delta stream connection is forbidden.\n */\n deltaStreamConnectionForbidden: \"deltaStreamConnectionForbidden\",\n /**\n * The location of file/container can change on server. So if the file location moves and we try to access the old\n * location, then this error is thrown to let the client know about the new location info.\n */\n locationRedirection: \"locationRedirection\",\n /**\n * When a file is not a Fluid file, but has Fluid extension such as \".note\",\n * server won't be able to open it and will return this error. The innerMostErrorCode will be\n * \"fluidInvalidSchema\"\n */\n fluidInvalidSchema: \"fluidInvalidSchema\",\n /**\n * File is locked for read/write by storage, e.g. whole collection is locked and access denied.\n */\n fileIsLocked: \"fileIsLocked\",\n /**\n * Storage is out of space\n */\n outOfStorageError: \"outOfStorageError\",\n};\n//# sourceMappingURL=driverError.js.map","/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n/**\n * Additional key in the loader request header\n * @legacy\n * @alpha\n */\nexport var DriverHeader;\n(function (DriverHeader) {\n // Key to indicate whether the request for summarizer\n DriverHeader[\"summarizingClient\"] = \"fluid-client-summarizer\";\n // createNew information, specific to each driver\n DriverHeader[\"createNew\"] = \"createNew\";\n})(DriverHeader || (DriverHeader = {}));\n//# sourceMappingURL=urlResolver.js.map","/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\nimport { DriverErrorTypes, } from \"@fluidframework/driver-definitions/internal\";\nimport { LoggingError } from \"@fluidframework/telemetry-utils/internal\";\n/**\n * @internal\n */\nexport var OnlineStatus;\n(function (OnlineStatus) {\n OnlineStatus[OnlineStatus[\"Offline\"] = 0] = \"Offline\";\n OnlineStatus[OnlineStatus[\"Online\"] = 1] = \"Online\";\n OnlineStatus[OnlineStatus[\"Unknown\"] = 2] = \"Unknown\";\n})(OnlineStatus || (OnlineStatus = {}));\n/**\n * It tells if we have local connection only - we might not have connection to web.\n * No solution for node.js (other than resolve dns names / ping specific sites)\n * Can also use window.addEventListener(\"online\" / \"offline\")\n * @internal\n */\nexport function isOnline() {\n if (typeof navigator === \"object\" &&\n navigator !== null &&\n typeof navigator.onLine === \"boolean\") {\n return navigator.onLine ? OnlineStatus.Online : OnlineStatus.Offline;\n }\n return OnlineStatus.Unknown;\n}\n/**\n * Generic network error class.\n * @internal\n */\nexport class GenericNetworkError extends LoggingError {\n constructor(message, canRetry, props) {\n super(message, props);\n this.canRetry = canRetry;\n /**\n * {@inheritDoc @fluidframework/telemetry-utils#IFluidErrorBase.errorType}\n */\n this.errorType = DriverErrorTypes.genericNetworkError;\n }\n}\n/**\n * FluidInvalidSchema error class.\n * @internal\n */\nexport class FluidInvalidSchemaError extends LoggingError {\n constructor(message, props) {\n super(message, props);\n this.errorType = DriverErrorTypes.fluidInvalidSchema;\n this.canRetry = false;\n }\n}\n/**\n * @internal\n */\nexport class DeltaStreamConnectionForbiddenError extends LoggingError {\n constructor(message, props, storageOnlyReason) {\n super(message, { ...props, statusCode: 400 });\n this.errorType = DeltaStreamConnectionForbiddenError.errorType;\n this.canRetry = false;\n this.storageOnlyReason = storageOnlyReason;\n }\n}\nDeltaStreamConnectionForbiddenError.errorType = DriverErrorTypes.deltaStreamConnectionForbidden;\n/**\n * @internal\n */\nexport class AuthorizationError extends LoggingError {\n constructor(message, claims, tenantId, props) {\n if (claims !== undefined) {\n props.claims = claims;\n }\n if (tenantId !== undefined) {\n props.tenantId = tenantId;\n }\n // don't log claims or tenantId\n super(message, props, new Set([\"claims\", \"tenantId\"]));\n this.errorType = DriverErrorTypes.authorizationError;\n this.canRetry = false;\n }\n}\n/**\n * @internal\n */\nexport class LocationRedirectionError extends LoggingError {\n constructor(message, redirectUrl, props) {\n // do not log redirectURL\n super(message, props, new Set([\"redirectUrl\"]));\n this.redirectUrl = redirectUrl;\n this.errorType = DriverErrorTypes.locationRedirection;\n this.canRetry = false;\n }\n}\n/**\n * @internal\n */\nexport class NetworkErrorBasic extends LoggingError {\n constructor(message, errorType, canRetry, props) {\n super(message, props);\n this.errorType = errorType;\n this.canRetry = canRetry;\n }\n}\n/**\n * @internal\n */\nexport class NonRetryableError extends NetworkErrorBasic {\n constructor(message, errorType, props) {\n super(message, errorType, false, props);\n this.errorType = errorType;\n }\n}\n/**\n * @internal\n */\nexport class RetryableError extends NetworkErrorBasic {\n constructor(message, errorType, props) {\n super(message, errorType, true, props);\n this.errorType = errorType;\n }\n}\n/**\n * Throttling error class - used to communicate all throttling errors\n * @internal\n */\nexport class ThrottlingError extends LoggingError {\n constructor(message, retryAfterSeconds, props) {\n super(message, props);\n this.retryAfterSeconds = retryAfterSeconds;\n this.errorType = DriverErrorTypes.throttlingError;\n this.canRetry = true;\n }\n}\n/**\n * @internal\n */\nexport const createWriteError = (message, props) => new NonRetryableError(message, DriverErrorTypes.writeError, props);\n/**\n * @internal\n */\nexport function createGenericNetworkError(message, retryInfo, props) {\n if (retryInfo.retryAfterMs !== undefined && retryInfo.canRetry) {\n return new ThrottlingError(message, retryInfo.retryAfterMs / 1000, props);\n }\n return new GenericNetworkError(message, retryInfo.canRetry, props);\n}\n/**\n * Check if a connection error can be retried. Unless explicitly allowed, retry is disallowed.\n * I.e. asserts or unexpected exceptions in our code result in container failure.\n * @param error - The error to inspect for ability to retry\n * @internal\n */\nexport const canRetryOnError = (error) => error?.canRetry === true;\n/**\n * Check retryAfterSeconds property on error\n * @internal\n */\nexport const getRetryDelaySecondsFromError = (error) => error?.retryAfterSeconds;\n/**\n * Check retryAfterSeconds property on error and convert to ms\n * @internal\n */\nexport const getRetryDelayFromError = (error) => error?.retryAfterSeconds !== undefined ? error.retryAfterSeconds * 1000 : undefined;\n//# sourceMappingURL=network.js.map","/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\nimport { DriverErrorTypes, } from \"@fluidframework/driver-definitions/internal\";\n/**\n * ODSP Error types.\n * Different error types that may be thrown by the ODSP driver.\n * @legacy\n * @alpha\n */\nexport const OdspErrorTypes = {\n // Inherit base driver error types\n ...DriverErrorTypes,\n /**\n * Invalid file name (at creation of the file)\n */\n invalidFileNameError: \"invalidFileNameError\",\n /**\n * Snapshot is too big. Host application specified limit for snapshot size, and snapshot was bigger\n * that that limit, thus request failed. Hosting application is expected to have fall-back behavior for\n * such case.\n */\n snapshotTooBig: \"snapshotTooBig\",\n /**\n * Maximum time limit to fetch reached. Host application specified limit for fetching of snapshot, when\n * that limit is reached, request fails. Hosting application is expected to have fall-back behavior for\n * such case.\n */\n fetchTimeout: \"fetchTimeout\",\n /**\n * SPO admin toggle: fluid service is not enabled.\n */\n fluidNotEnabled: \"fluidNotEnabled\",\n /**\n * This error will be raised when client is too behind with no way to catch up.\n * This condition will happen when user was offline for too long, resulting in old ops / blobs being deleted\n * by storage, and thus removing an ability for client to catch up.\n * This condition will result in any local changes being lost (i.e. only way to save state is by user\n * copying it over manually)\n */\n cannotCatchUp: \"cannotCatchUp\",\n /**\n * SPO can occasionally return 403 for r/w operations on document when there is a fail over to another data center.\n * So to preserve integrity of the data, the data becomes readonly.\n */\n serviceReadOnly: \"serviceReadOnly\",\n /**\n * Due to organizational policies, you can't access server resources from the current network location.\n */\n blockedIPAddress: \"blockedIPAddress\",\n};\n//# sourceMappingURL=errors.js.map","/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n/**\n * @legacy\n * @alpha\n */\nexport const OdcApiSiteOrigin = \"https://my.microsoftpersonalcontent.com\";\n/**\n * @legacy\n * @alpha\n */\nexport const OdcFileSiteOrigin = \"https://1drv.ms\";\n//# sourceMappingURL=constants.js.map","/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\nimport { fromBase64ToUtf8, fromUtf8ToBase64 } from \"@fluid-internal/client-utils\";\nimport { OdcApiSiteOrigin, OdcFileSiteOrigin } from \"./constants.js\";\nconst fluidSignature = \"1\";\nconst fluidSignatureParamName = \"fluid\";\nconst sitePathParamName = \"s\";\nconst driveIdParamName = \"d\";\nconst itemIdParamName = \"f\";\nconst dataStorePathParamName = \"c\";\nconst appNameParamName = \"a\";\nconst containerPackageNameParamName = \"p\";\nconst fileVersionParamName = \"v\";\nconst additionalContextParamName = \"x\";\n/**\n * Transforms given Fluid data store locator into string that can be embedded into url\n * @param locator - describes Fluid data store locator info to be encoded\n * @returns string representing encoded Fluid data store locator info\n * @legacy\n * @alpha\n */\nexport function encodeOdspFluidDataStoreLocator(locator) {\n const siteUrl = new URL(locator.siteUrl);\n const sitePath = encodeURIComponent(siteUrl.pathname);\n const driveId = encodeURIComponent(locator.driveId);\n const itemId = encodeURIComponent(locator.itemId);\n const dataStorePath = encodeURIComponent(locator.dataStorePath);\n let locatorSerialized = `${sitePathParamName}=${sitePath}&${driveIdParamName}=${driveId}&${itemIdParamName}=${itemId}&${dataStorePathParamName}=${dataStorePath}&${fluidSignatureParamName}=${fluidSignature}`;\n if (locator.appName) {\n locatorSerialized += `&${appNameParamName}=${encodeURIComponent(locator.appName)}`;\n }\n if (locator.containerPackageName) {\n locatorSerialized += `&${containerPackageNameParamName}=${encodeURIComponent(locator.containerPackageName)}`;\n }\n if (locator.fileVersion) {\n locatorSerialized += `&${fileVersionParamName}=${encodeURIComponent(locator.fileVersion)}`;\n }\n if (locator.context) {\n locatorSerialized += `&${additionalContextParamName}=${encodeURIComponent(locator.context)}`;\n }\n return fromUtf8ToBase64(locatorSerialized);\n}\n/**\n * Decodes given encoded value representing Fluid data store locator extracted from ODSP Fluid file link\n * @param encodedLocatorValue - encoded Fluid data store locator value which was produced by\n * {@link encodeOdspFluidDataStoreLocator} function\n * @param siteOriginUrl - site origin that will be appended to encoded relative path to form absolute file url\n * @param requireFluidSignature - flag representing if the Fluid signature is expected in the url, default true\n * @returns object representing Fluid data store location in ODSP terms\n */\nfunction decodeOdspFluidDataStoreLocator(encodedLocatorValue, siteOriginUrl, requireFluidSignature = true) {\n const locatorInfo = new URLSearchParams(fromBase64ToUtf8(encodedLocatorValue));\n const signatureValue = locatorInfo.get(fluidSignatureParamName);\n if (requireFluidSignature && signatureValue !== \"1\") {\n return undefined;\n }\n const sitePath = locatorInfo.get(sitePathParamName);\n const driveId = locatorInfo.get(driveIdParamName);\n const itemId = locatorInfo.get(itemIdParamName);\n const dataStorePath = locatorInfo.get(dataStorePathParamName);\n const appName = locatorInfo.get(appNameParamName) ?? undefined;\n const containerPackageName = locatorInfo.get(containerPackageNameParamName) ?? undefined;\n const fileVersion = locatorInfo.get(fileVersionParamName) ?? undefined;\n const context = locatorInfo.get(additionalContextParamName) ?? undefined;\n // \"\" is a valid value for dataStorePath so simply check for absence of the param;\n // file storage locator params must be present and non-empty\n if (!sitePath || !driveId || !itemId || dataStorePath === null) {\n return undefined;\n }\n let siteUrl;\n try {\n siteUrl = new URL(sitePath, siteOriginUrl);\n }\n catch {\n // Ignore failure to parse url as input might be malformed\n }\n if (!siteUrl) {\n return undefined;\n }\n return {\n siteUrl: siteUrl.href,\n driveId,\n itemId,\n dataStorePath,\n appName,\n containerPackageName,\n fileVersion,\n context,\n };\n}\n/**\n * This parameter is provided by host in the resolve request and it contains information about the file\n * like driveId, itemId, siteUrl, datastorePath, packageName etc.\n * @legacy\n * @alpha\n */\nexport const locatorQueryParamName = \"nav\";\n/**\n * Embeds Fluid data store locator data into given ODSP url\n * @param url - file url in ODSP format (can be either canonical or share link)\n * @param locator - object representing Fluid data store location in ODSP terms\n * @legacy\n * @alpha\n */\nexport function storeLocatorInOdspUrl(url, locator) {\n const encodedLocatorValue = encodeOdspFluidDataStoreLocator(locator);\n // IMPORTANT: Do not apply encodeURIComponent to encodedLocatorValue, param value is automatically encoded\n // when set via URLSearchParams class\n url.searchParams.set(locatorQueryParamName, encodedLocatorValue);\n}\n/**\n * Extract ODSP Fluid data store locator object from given ODSP url. This extracts things like\n * driveId, ItemId, siteUrl etc from a url where these are encoded in nav query param.\n * @param url - ODSP url representing Fluid file link\n * @param requireFluidSignature - flag representing if the Fluid signature is expected in the url, default true\n * @returns object representing Fluid data store location in ODSP terms\n * @legacy\n * @alpha\n */\nexport function getLocatorFromOdspUrl(url, requireFluidSignature = true) {\n // NOTE: No need to apply decodeURIComponent when accessing query params via URLSearchParams class.\n const encodedLocatorValue = url.searchParams.get(locatorQueryParamName);\n if (!encodedLocatorValue) {\n return undefined;\n }\n // IMPORTANT: ODC deviates from ODSP in that its file link origin is different from vroom api origin.\n // The following code passes vroom api origin as site origin instead of file origin.\n const siteOriginUrl = url.origin.toLowerCase() === OdcFileSiteOrigin ? OdcApiSiteOrigin : url.origin;\n return decodeOdspFluidDataStoreLocator(encodedLocatorValue, siteOriginUrl, requireFluidSignature);\n}\n//# sourceMappingURL=odspFluidFileLink.js.map","/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n *\n * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY\n */\nexport const pkgName = \"@fluidframework/odsp-doclib-utils\";\nexport const pkgVersion = \"2.43.0\";\n//# sourceMappingURL=packageVersion.js.map","/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\nconst oAuthBearerScheme = \"Bearer\";\n/**\n * Checks if response headers contains `www-authenticate` header and extracts tenant id that should be\n * used to identify authority which must be used to issue access token for protected resource.\n * Tenant id is represented by \"realm\" property. More details can be found here:\n * {@link https://tools.ietf.org/html/rfc2617#page-8}\n *\n * @example Header sample\n *\n * ```\n * www-authenticate=Bearer realm=\"03d0c210-38e8-47d7-9bc9-9ff2cd5ea7bc\",\n * client_id=\"00000003-0000-0ff1-ce00-000000000000\",\n * trusted_issuers=\"00000001-0000-0000-c000-000000000000@*,D3776938-3DBA-481F-A652-4BEDFCAB7CD8@*,\n * https://sts.windows.net/*,00000003-0000-0ff1-ce00-000000000000@90140122-8516-11e1-8eff-49304924019b\",\n * authorization_uri=\"https://login.windows.net/common/oauth2/authorize\"\n * ```\n */\nexport function parseAuthErrorTenant(responseHeader) {\n const authHeaderData = responseHeader.get(\"www-authenticate\");\n if (!authHeaderData) {\n return undefined;\n }\n // header value must contain 'Bearer' scheme\n const indexOfBearerInfo = authHeaderData.indexOf(oAuthBearerScheme);\n if (indexOfBearerInfo < 0) {\n return undefined;\n }\n let tenantId;\n authHeaderData\n .substring(indexOfBearerInfo + oAuthBearerScheme.length)\n .split(\",\")\n .map((section) => {\n if (!tenantId) {\n const nameValuePair = section.split(\"=\");\n // values can be encoded and contain '=' symbol inside so it is possible to have more than one\n if (nameValuePair.length >= 2) {\n if (nameValuePair[0].trim().toLowerCase() === \"realm\") {\n tenantId = JSON.parse(nameValuePair[1].trim());\n }\n }\n }\n });\n return tenantId;\n}\n//# sourceMappingURL=parseAuthErrorTenant.js.map","/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\nimport { DriverErrorTypes } from \"@fluidframework/driver-definitions/internal\";\nimport { AuthorizationError, FluidInvalidSchemaError, NonRetryableError, OnlineStatus, RetryableError, createGenericNetworkError, isOnline, } from \"@fluidframework/driver-utils/internal\";\nimport { OdspErrorTypes, } from \"@fluidframework/odsp-driver-definitions/internal\";\nimport { LoggingError, numberFromString, } from \"@fluidframework/telemetry-utils/internal\";\n// odsp-doclib-utils and odsp-driver will always release together and share the same pkgVersion\nimport { pkgVersion as driverVersion } from \"./packageVersion.js\";\nimport { parseAuthErrorClaims } from \"./parseAuthErrorClaims.js\";\nimport { parseAuthErrorTenant } from \"./parseAuthErrorTenant.js\";\n// no response, or can't parse response\n/**\n * @internal\n */\nexport const fetchIncorrectResponse = 712;\n// Error code for when the server state is read only and client tries to write. This code is set by the server\n// and is not likely to change.\n/**\n * @internal\n */\nexport const OdspServiceReadOnlyErrorCode = \"serviceReadOnly\";\n/**\n * @internal\n */\nexport function getSPOAndGraphRequestIdsFromResponse(headers) {\n // We rename headers so that otel doesn't scrub them away. Otel doesn't allow\n // certain characters in headers including '-'\n const headersToLog = [\n { headerName: \"sprequestguid\", logName: \"sprequestguid\" },\n { headerName: \"request-id\", logName: \"requestId\" },\n { headerName: \"client-request-id\", logName: \"clientRequestId\" },\n { headerName: \"x-msedge-ref\", logName: \"xMsedgeRef\" },\n { headerName: \"X-Fluid-Retries\", logName: \"serverRetries\" },\n { headerName: \"content-encoding\", logName: \"contentEncoding\" },\n { headerName: \"content-type\", logName: \"contentType\" },\n ];\n const additionalProps = {\n sprequestduration: numberFromString(headers.get(\"sprequestduration\")),\n contentsize: numberFromString(headers.get(\"content-length\")),\n };\n headersToLog.forEach((header) => {\n const headerValue = headers.get(header.headerName);\n if (headerValue !== undefined && headerValue !== null) {\n additionalProps[header.logName] = headerValue;\n }\n });\n // x-fluid-telemetry contains a key value pair in the following format:\n // x-fluid-telemetry:key1=value1,key2,key3=value3,\n // Ex. x-fluid-telemetry:Origin=c\n const fluidTelemetry = headers.get(\"x-fluid-telemetry\");\n if (fluidTelemetry !== undefined && fluidTelemetry !== null) {\n additionalProps.xFluidTelemetry = fluidTelemetry;\n const keyValueMap = fluidTelemetry\n .split(\",\")\n .map((keyValuePair) => keyValuePair.split(\"=\"));\n for (const [key, value] of keyValueMap) {\n if (\"Origin\" === key.trim()) {\n let fieldValue;\n switch (value?.trim()) {\n case \"c\":\n fieldValue = \"cache\";\n break;\n case \"g\":\n fieldValue = \"graph\";\n break;\n default:\n fieldValue = value?.trim();\n }\n const logName = \"responseOrigin\";\n additionalProps[logName] = fieldValue;\n break;\n }\n }\n }\n return additionalProps;\n}\n/**\n * Error encapsulating the error response from ODSP containing the redirect location when a resource has moved\n *\n * @internal\n */\nexport class OdspRedirectError extends LoggingError {\n constructor(message, redirectLocation, props) {\n // do not log redirectLocation (URL can contain sensitive info)\n super(message, props, new Set([\"redirectLocation\"]));\n this.redirectLocation = redirectLocation;\n this.errorType = DriverErrorTypes.fileNotFoundOrAccessDeniedError;\n this.canRetry = false;\n }\n}\n/** Empirically-based type guard for error responses from ODSP */\nfunction isOdspErrorResponse(x) {\n const error = x?.error;\n return (typeof error?.message === \"string\" &&\n (error?.code === undefined || typeof error?.code === \"string\"));\n}\n/**\n * @internal\n */\nexport function tryParseErrorResponse(response) {\n try {\n if (response !== undefined) {\n const parsed = JSON.parse(response);\n if (isOdspErrorResponse(parsed)) {\n return { success: true, errorResponse: parsed };\n }\n }\n }\n catch (e) { }\n return { success: false };\n}\n/**\n * @internal\n */\nexport function parseFacetCodes(errorResponse) {\n const stack = [];\n let error = errorResponse.error;\n while (typeof error === \"object\" && error !== null) {\n if (error.code !== undefined) {\n stack.unshift(error.code);\n }\n error = error.innerError;\n }\n return stack;\n}\n/**\n * @internal\n */\nexport function createOdspNetworkError(errorMessage, statusCode, retryAfterSeconds, response, responseText, props = {}) {\n let error;\n const parseResult = tryParseErrorResponse(responseText);\n let facetCodes;\n let innerMostErrorCode;\n if (parseResult.success) {\n const errorResponse = parseResult.errorResponse;\n // logging the error response message\n props.responseMessage = errorResponse.error.message;\n facetCodes = parseFacetCodes(errorResponse);\n if (facetCodes !== undefined) {\n innerMostErrorCode = facetCodes[0];\n props.innerMostErrorCode = innerMostErrorCode;\n }\n }\n let redirectLocation;\n const driverProps = { driverVersion, statusCode, ...props };\n switch (statusCode) {\n // The location of file can move on Spo. If the redirect:manual header is added to network call\n // it causes browser to not handle the redirects. Location header in such cases will contain the new location.\n // Refer: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/308\n case 301:\n case 302:\n case 303:\n case 307:\n case 308:\n redirectLocation = response?.headers.get(\"Location\") ?? undefined;\n if (redirectLocation !== undefined) {\n error = new OdspRedirectError(errorMessage, redirectLocation, driverProps);\n break;\n }\n // Don't break here. Let it be a generic network error if redirectLocation is not there.\n case 400:\n if (innerMostErrorCode === \"fluidInvalidSchema\") {\n error = new FluidInvalidSchemaError(errorMessage, driverProps);\n break;\n }\n error = new NonRetryableError(errorMessage, DriverErrorTypes.genericNetworkError, driverProps);\n break;\n case 401:\n case 403:\n // The server throws 403 status code with innerMostError code as \"serviceReadOnly\" for cases where the\n // database on server becomes readonly. The driver retries for such cases with exponential backup logic.\n if (innerMostErrorCode === OdspServiceReadOnlyErrorCode) {\n error = new RetryableError(errorMessage, OdspErrorTypes.serviceReadOnly, driverProps);\n }\n else if (innerMostErrorCode === \"blockedIPAddress\" ||\n innerMostErrorCode === \"conditionalAccessPolicyEnforced\") {\n error = new NonRetryableError(\"IP Address is blocked\", OdspErrorTypes.blockedIPAddress, driverProps);\n }\n else {\n const claims = response?.headers ? parseAuthErrorClaims(response.headers) : undefined;\n const tenantId = response?.headers\n ? parseAuthErrorTenant(response.headers)\n : undefined;\n error = new AuthorizationError(errorMessage, claims, tenantId, driverProps);\n }\n break;\n case 404:\n if (parseResult.success) {\n // The location of file can move on Spo. If the manual redirect prefer header is added to network call\n // it returns 404 error instead of 308. Error thrown by server will contain the new redirect location.\n // For reference we can look here: \\packages\\drivers\\odsp-driver\\src\\fetchSnapshot.ts\n const responseError = parseResult?.errorResponse?.error;\n redirectLocation = responseError?.[\"@error.redirectLocation\"];\n if (redirectLocation !== undefined) {\n error = new OdspRedirectError(errorMessage, redirectLocation, driverProps);\n break;\n }\n }\n error = new NonRetryableError(errorMessage, DriverErrorTypes.fileNotFoundOrAccessDeniedError, driverProps);\n break;\n case 406:\n error = new NonRetryableError(errorMessage, DriverErrorTypes.unsupportedClientProtocolVersion, driverProps);\n break;\n case 410:\n error = new NonRetryableError(errorMessage, OdspErrorTypes.cannotCatchUp, driverProps);\n break;\n case 409:\n // This status code is sent by the server when the client and server epoch mismatches.\n // The client sets its epoch version in the calls it makes to the server and if that mismatches\n // with the server epoch version, the server throws this error code.\n // This indicates that the file/container has been modified externally.\n error = new NonRetryableError(errorMessage, DriverErrorTypes.fileOverwrittenInStorage, driverProps);\n break;\n case 412:\n // \"Precondition Failed\" error - happens when uploadSummaryWithContext uses wrong parent.\n // Resubmitting same payload is not going to help, so this is non-recoverable failure!\n error = new NonRetryableError(errorMessage, DriverErrorTypes.genericNetworkError, driverProps);\n break;\n case 413:\n error = new NonRetryableError(errorMessage, OdspErrorTypes.snapshotTooBig, driverProps);\n break;\n case 414:\n error = new NonRetryableError(errorMessage, OdspErrorTypes.invalidFileNameError, driverProps);\n break;\n case 423: // File locked\n if (innerMostErrorCode === \"resourceLocked\" ||\n innerMostErrorCode === \"resourceCheckedOut\") {\n error = new NonRetryableError(errorMessage, DriverErrorTypes.fileIsLocked, driverProps);\n break;\n }\n case 500:\n error = new RetryableError(errorMessage, DriverErrorTypes.genericNetworkError, driverProps);\n break;\n case 501:\n error = new NonRetryableError(errorMessage, OdspErrorTypes.fluidNotEnabled, driverProps);\n break;\n case 507:\n error = new NonRetryableError(errorMessage, DriverErrorTypes.outOfStorageError, driverProps);\n break;\n case fetchIncorrectResponse:\n // Note that getWithRetryForTokenRefresh will retry it once, then it becomes non-retryable error\n error = new NonRetryableError(errorMessage, DriverErrorTypes.incorrectServerResponse, driverProps);\n break;\n default:\n const retryAfterMs = retryAfterSeconds !== undefined ? retryAfterSeconds * 1000 : undefined;\n error = createGenericNetworkError(errorMessage, { canRetry: true, retryAfterMs }, driverProps);\n break;\n }\n // Set this to true as createOdspNetworkError is called to handle error response from service.\n error.addTelemetryProperties({ endpointReached: true });\n enrichOdspError(error, response, facetCodes, undefined);\n return error;\n}\n/**\n * @internal\n */\nexport function enrichOdspError(error, response, facetCodes, props = {}) {\n error.online = OnlineStatus[isOnline()];\n if (facetCodes !== undefined) {\n error.facetCodes = facetCodes;\n }\n if (response) {\n props.responseType = response.type;\n if (response.headers) {\n const headers = getSPOAndGraphRequestIdsFromResponse(response.headers);\n for (const key of Object.keys(headers)) {\n props[key] = headers[key];\n }\n error.serverEpoch = response.headers.get(\"x-fluid-epoch\") ?? undefined;\n }\n }\n error.addTelemetryProperties(props);\n return error;\n}\n/**\n * Throws network error - an object with a bunch of network related properties\n * @internal\n */\nexport function throwOdspNetworkError(errorMessage, statusCode, response, responseText, props) {\n const networkError = createOdspNetworkError(errorMessage, statusCode, numberFromHeader(response.headers.get(\"retry-after\")) /* retryAfterSeconds */, response, responseText, props);\n networkError.addTelemetryProperties({ odspError: true, storageServiceError: true });\n throw networkError;\n}\nfunction numberFromHeader(header) {\n if (header === null) {\n return undefined;\n }\n const n = Number(header);\n if (Number.isNaN(n)) {\n return undefined;\n }\n return n;\n}\n/**\n * @internal\n */\nexport function hasFacetCodes(x) {\n return Array.isArray(x?.facetCodes);\n}\n/**\n * @internal\n */\nexport function hasRedirectionLocation(x) {\n return (x !== null &&\n typeof x === \"object\" &&\n \"redirectLocation\" in x &&\n typeof x?.redirectLocation === \"string\");\n}\n//# sourceMappingURL=odspErrorUtils.js.map","/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\nimport { fromBase64ToUtf8 } from \"@fluid-internal/client-utils\";\n/**\n * Checks if response headers contains `www-authenticate` header and extracts claims that should be\n * passed to token authority when requesting new token.\n *\n * Header sample:\n * www-authenticate=Bearer realm=\"\",\n * authorization_uri=\"https://login.microsoftonline.com/common/oauth2/authorize\",\n * error=\"insufficient_claims\",\n * claims=\"dummy\"\n *\n * Note that claims value is base64 encoded inside header but this method will return unencoded value.\n */\nexport function parseAuthErrorClaims(responseHeader) {\n const authHeaderData = responseHeader.get(\"www-authenticate\");\n if (!authHeaderData) {\n return undefined;\n }\n let claims;\n let detectedErrorIndicator = false;\n authHeaderData.split(\",\").map((section) => {\n const nameValuePair = section.split(\"=\");\n // Values can be encoded and contain '=' symbol inside so it is possible to have more than one\n if (nameValuePair.length >= 2) {\n if (!detectedErrorIndicator && nameValuePair[0].trim().toLowerCase() === \"error\") {\n detectedErrorIndicator =\n JSON.parse(nameValuePair[1].trim().toLowerCase()) === \"insufficient_claims\";\n }\n else if (!claims && nameValuePair[0].trim().toLowerCase() === \"claims\") {\n claims = fromBase64ToUtf8(JSON.parse(section.substring(section.indexOf(\"=\") + 1).trim()));\n }\n }\n });\n return detectedErrorIndicator ? claims : undefined;\n}\n//# sourceMappingURL=parseAuthErrorClaims.js.map","/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n/**\n * Helper method which transforms return value for TokenFetcher method to token string\n * @param tokenResponse - return value for TokenFetcher method\n * @returns Token value\n * @internal\n */\nexport const tokenFromResponse = (tokenResponse) => tokenResponse === null || typeof tokenResponse === \"string\"\n ? tokenResponse\n : tokenResponse === undefined\n ? null\n : tokenResponse.token;\n/**\n * Helper method which transforms return value for TokenFetcher method to Authorization header value\n * @param tokenResponse - return value for TokenFetcher method\n * @returns Authorization header value\n * @internal\n */\nexport const authHeaderFromTokenResponse = (tokenResponse) => {\n if (typeof tokenResponse === \"object\" && tokenResponse?.authorizationHeader !== undefined) {\n return tokenResponse.authorizationHeader;\n }\n const token = tokenFromResponse(tokenResponse);\n if (token !== null) {\n return `Bearer ${token}`;\n }\n return null;\n};\n/**\n * Helper method which returns flag indicating whether token response comes from local cache\n * @param tokenResponse - return value for TokenFetcher method\n * @returns Value indicating whether response came from cache.\n * Undefined is returned when we could not determine the source of token.\n * @internal\n */\nexport const isTokenFromCache = (tokenResponse) => tokenResponse === null || typeof tokenResponse === \"string\"\n ? undefined\n : tokenResponse.fromCache;\n//# sourceMappingURL=tokenFetch.js.map","/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\nimport { performanceNow } from \"@fluid-internal/client-utils\";\nimport { assert } from \"@fluidframework/core-utils/internal\";\nimport { NetworkErrorBasic, NonRetryableError, OnlineStatus, RetryableError, isOnline, } from \"@fluidframework/driver-utils/internal\";\nimport { fetchIncorrectResponse, getSPOAndGraphRequestIdsFromResponse, throwOdspNetworkError, } from \"@fluidframework/odsp-doclib-utils/internal\";\nimport { OdspErrorTypes, authHeaderFromTokenResponse, isTokenFromCache, snapshotKey, tokenFromResponse, snapshotWithLoadingGroupIdKey, } from \"@fluidframework/odsp-driver-definitions/internal\";\nimport { PerformanceEvent, TelemetryDataTag, createChildLogger, wrapError, } from \"@fluidframework/telemetry-utils/internal\";\nimport { storeLocatorInOdspUrl } from \"./odspFluidFileLink.js\";\nimport { pkgVersion as driverVersion } from \"./packageVersion.js\";\nexport const getWithRetryForTokenRefreshRepeat = \"getWithRetryForTokenRefreshRepeat\";\nfunction headersToMap(headers) {\n const newHeaders = new Map();\n for (const [key, value] of headers.entries()) {\n newHeaders.set(key, value);\n }\n return newHeaders;\n}\n/**\n * This API should be used with pretty much all network calls (fetch, webSocket connection) in order\n * to correctly handle expired tokens. It relies on callback fetching token, and be able to refetch\n * token on failure. Only specific cases get retry call with refresh = true, all other / unknown errors\n * simply propagate to caller\n */\nexport async function getWithRetryForTokenRefresh(get) {\n return get({ refresh: false }).catch(async (error) => {\n const options = { refresh: true, previousError: error };\n switch (error.errorType) {\n // If the error is 401 or 403 refresh the token and try once more.\n case OdspErrorTypes.authorizationError: {\n const authError = error;\n return get({ ...options, claims: authError.claims, tenantId: authError.tenantId });\n }\n case OdspErrorTypes.incorrectServerResponse: // some error on the wire, retry once\n case OdspErrorTypes.fetchTokenError: {\n // If the token was null, then retry once.\n return get(options);\n }\n default: {\n // Caller may determine that it wants one retry\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unnecessary-type-assertion, @typescript-eslint/no-explicit-any\n if (error[getWithRetryForTokenRefreshRepeat] === true) {\n return get(options);\n }\n throw error;\n }\n }\n });\n}\nexport async function fetchHelper(requestInfo, requestInit) {\n const start = performanceNow();\n return fetch(requestInfo, requestInit).then(async (fetchResponse) => {\n const response = fetchResponse;\n // Let's assume we can retry.\n if (!response) {\n throw new NonRetryableError(\n // pre-0.58 error message: No response from fetch call\n \"No response from ODSP fetch call\", OdspErrorTypes.incorrectServerResponse, { driverVersion });\n }\n if (!response.ok || response.status < 200 || response.status >= 300) {\n throwOdspNetworkError(\n // pre-0.58 error message prefix: odspFetchError\n `ODSP fetch error [${response.status}]`, response.status, response, await response.text());\n }\n const headers = headersToMap(response.headers);\n return {\n content: response,\n headers,\n propsToLog: getSPOAndGraphRequestIdsFromResponse(headers),\n duration: performanceNow() - start,\n };\n }, (error) => {\n const online = isOnline();\n // The error message may not be suitable to log for privacy reasons, so tag it as such\n const taggedErrorMessage = {\n value: `${error}`, // This uses toString for objects, which often results in `${error.name}: ${error.message}`\n tag: TelemetryDataTag.UserData,\n };\n // After redacting URLs we believe the error message is safe to log\n const urlRegex = /((http|https):\\/\\/(\\S*))/i;\n const redactedErrorText = taggedErrorMessage.value.replace(urlRegex, \"REDACTED_URL\");\n // This error is thrown by fetch() when AbortSignal is provided and it gets cancelled\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n if (error.name === \"AbortError\") {\n throw new RetryableError(\"Fetch Timeout (AbortError)\", OdspErrorTypes.fetchTimeout, {\n driverVersion,\n });\n }\n // TCP/IP timeout\n if (redactedErrorText.includes(\"ETIMEDOUT\")) {\n throw new RetryableError(\"Fetch Timeout (ETIMEDOUT)\", OdspErrorTypes.fetchTimeout, {\n driverVersion,\n });\n }\n // eslint-disable-next-line unicorn/prefer-ternary\n if (online === OnlineStatus.Offline) {\n throw new RetryableError(\n // pre-0.58 error message prefix: Offline\n `ODSP fetch failure (Offline): ${redactedErrorText}`, OdspErrorTypes.offlineError, {\n driverVersion,\n rawErrorMessage: taggedErrorMessage,\n });\n }\n else {\n // It is perhaps still possible that this is due to being offline, the error does not reveal enough\n // information to conclude. Could also be DNS errors, malformed fetch request, CSP violation, etc.\n throw new RetryableError(\n // pre-0.58 error message prefix: Fetch error\n `ODSP fetch failure: ${redactedErrorText}`, OdspErrorTypes.fetchFailure, {\n driverVersion,\n rawErrorMessage: taggedErrorMessage,\n });\n }\n });\n}\n// This allows `fetch` to be mocked (e.g. with sinon `stub()`)\nfetchHelper.fetch = fetch;\n/**\n * A utility function to fetch and parse as JSON with support for retries\n * @param requestInfo - fetch requestInfo, can be a string\n * @param requestInit - fetch requestInit\n */\nexport async function fetchArray(requestInfo, requestInit) {\n const { content, headers, propsToLog, duration } = await fetchHelper(requestInfo, requestInit);\n let arrayBuffer;\n try {\n arrayBuffer = await content.arrayBuffer();\n }\n catch {\n // Parsing can fail and message could contain full request URI, including\n // tokens, etc. So do not log error object itself.\n throwOdspNetworkError(\"Error while parsing fetch response\", fetchIncorrectResponse, content, // response\n undefined, // response text\n propsToLog);\n }\n propsToLog.bodySize = arrayBuffer.byteLength;\n return {\n headers,\n content: arrayBuffer,\n propsToLog,\n duration,\n };\n}\n/**\n * A utility function to fetch and parse as JSON with support for retries\n * @param requestInfo - fetch requestInfo, can be a string\n * @param requestInit - fetch requestInit\n */\nexport async function fetchAndParseAsJSONHelper(requestInfo, requestInit) {\n const { content, headers, propsToLog, duration } = await fetchHelper(requestInfo, requestInit);\n let text;\n try {\n text = await content.text();\n }\n catch {\n // JSON.parse() can fail and message would container full request URI, including\n // tokens... It fails for me with \"Unexpected end of JSON input\" quite often - an attempt to download big file\n // (many ops) almost always ends up with this error - I'd guess 1% of op request end up here... It always\n // succeeds on retry.\n // So do not log error object itself.\n throwOdspNetworkError(\n // pre-0.58 error message: errorWhileParsingFetchResponse\n \"Error while parsing fetch response\", fetchIncorrectResponse, content, // response\n text, propsToLog);\n }\n propsToLog.bodySize = text.length;\n const res = {\n headers,\n content: JSON.parse(text),\n propsToLog,\n duration,\n };\n return res;\n}\nexport function isNewFileInfo(fileInfo) {\n return fileInfo.type === undefined || fileInfo.type === \"New\";\n}\nexport function getOdspResolvedUrl(resolvedUrl) {\n assert(resolvedUrl.odspResolvedUrl === true, 0x1de /* \"Not an ODSP resolved url\" */);\n return resolvedUrl;\n}\n/**\n * Type narrowing utility to determine if the provided {@link @fluidframework/driver-definitions#IResolvedUrl}\n * is an {@link @fluidframework/odsp-driver-definitions#IOdspResolvedUrl}.\n * @legacy\n * @alpha\n */\nexport function isOdspResolvedUrl(resolvedUrl) {\n return \"odspResolvedUrl\" in resolvedUrl && resolvedUrl.odspResolvedUrl === true;\n}\nexport const createOdspLogger = (logger) => createChildLogger({\n logger,\n namespace: \"OdspDriver\",\n properties: {\n all: {\n driverVersion,\n },\n },\n});\n/**\n * Returns a function that can be used to fetch storage token.\n * Storage token can not be empty - if original delegate (tokenFetcher argument) returns null result, exception will be thrown\n */\nexport function toInstrumentedOdspStorageTokenFetcher(logger, resolvedUrlParts, tokenFetcher) {\n const res = toInstrumentedOdspTokenFetcher(logger, resolvedUrlParts, tokenFetcher, true, // throwOnNullToken\n false);\n // Drop undefined from signature - we can do it safely due to throwOnNullToken == true above\n return res;\n}\n/**\n * Returns a function that can be used to fetch storage or websocket token.\n * There are scenarios where websocket token is not required / present (consumer stack and ordering service token),\n * thus it could return null. Use toInstrumentedOdspStorageTokenFetcher if you deal with storage token.\n * @param returnPlainToken - When true, tokenResponse.token is returned. When false, tokenResponse.authorizationHeader is returned or an authorization header value is created based on tokenResponse.token\n */\nexport function toInstrumentedOdspTokenFetcher(logger, resolvedUrlParts, tokenFetcher, throwOnNullToken, returnPlainToken) {\n return async (options, name, alwaysRecordTokenFetchTelemetry = false) => {\n // Telemetry note: if options.refresh is true, there is a potential perf issue:\n // Host should optimize and provide non-expired tokens on all critical paths.\n // Exceptions: race conditions around expiration, revoked tokens, host that does not care\n // (fluid-fetcher)\n return PerformanceEvent.timedExecAsync(logger, {\n eventName: `${name}_GetToken`,\n attempts: options.refresh ? 2 : 1,\n hasClaims: !!options.claims,\n hasTenantId: !!options.tenantId,\n }, async (event) => tokenFetcher({\n ...options,\n ...resolvedUrlParts,\n }).then((tokenResponse) => {\n const returnVal = returnPlainToken\n ? tokenFromResponse(tokenResponse)\n : authHeaderFromTokenResponse(tokenResponse);\n // This event alone generates so many events that is materially impacts cost of telemetry\n // Thus do not report end event when it comes back quickly.\n // Note that most of the hosts do not report if result is comming from cache or not,\n // so we can't rely on that here. But always record if specified explicitly for cases such as\n // calling trees/latest during load.\n if (alwaysRecordTokenFetchTelemetry || event.duration >= 32) {\n event.end({\n fromCache: isTokenFromCache(tokenResponse),\n isNull: returnVal === null,\n });\n }\n if (returnVal === null && throwOnNullToken) {\n throw new NonRetryableError(\n // pre-0.58 error message: Token is null for ${name} call\n `The Host-provided token fetcher returned null`, OdspErrorTypes.fetchTokenError, { method: name, driverVersion });\n }\n return returnVal;\n }, (error) => {\n // There is an important but unofficial contract here where token providers can set canRetry: true\n // to hook into the driver's retry logic (e.g. the retry loop when initiating a connection)\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access\n const rawCanRetry = error?.canRetry;\n const tokenError = wrapError(error, (errorMessage) => new NetworkErrorBasic(`The Host-provided token fetcher threw an error`, OdspErrorTypes.fetchTokenError, typeof rawCanRetry === \"boolean\" ? rawCanRetry : false /* canRetry */, { method: name, errorMessage, driverVersion }));\n throw tokenError;\n }), { cancel: \"generic\" });\n };\n}\nexport function createCacheSnapshotKey(odspResolvedUrl, snapshotWithLoadingGroupId) {\n const cacheEntry = {\n type: snapshotWithLoadingGroupId ? snapshotWithLoadingGroupIdKey : snapshotKey,\n key: odspResolvedUrl.fileVersion ?? \"\",\n file: {\n resolvedUrl: odspResolvedUrl,\n docId: odspResolvedUrl.hashedDocumentId,\n },\n };\n return cacheEntry;\n}\nexport function snapshotWithLoadingGroupIdSupported(config) {\n return config.getBoolean(\"Fluid.Container.UseLoadingGroupIdForSnapshotFetch2\");\n}\n// 80KB is the max body size that we can put in ump post body for server to be able to accept it.\n// Keeping it 78KB to be a little cautious. As per the telemetry 99p is less than 78KB.\nexport const maxUmpPostBodySize = 79872;\n/**\n * Build request parameters to request for the creation of a sharing link along with the creation of the file\n * through the /snapshot api call.\n * @param shareLinkType - Kind of sharing link requested\n * @returns A string of request parameters that can be concatenated with the base URI\n */\nexport function buildOdspShareLinkReqParams(shareLinkType) {\n if (!shareLinkType) {\n return;\n }\n const scope = shareLinkType.scope;\n let shareLinkRequestParams = `createLinkScope=${scope}`;\n const role = shareLinkType.role;\n shareLinkRequestParams = role\n ? `${shareLinkRequestParams}&createLinkRole=${role}`\n : shareLinkRequestParams;\n return shareLinkRequestParams;\n}\nexport function measure(callback) {\n const start = performanceNow();\n const result = callback();\n const time = performanceNow() - start;\n return [result, time];\n}\nexport async function measureP(callback) {\n const start = performanceNow();\n const result = await callback();\n const time = performanceNow() - start;\n return [result, time];\n}\nexport function getJoinSessionCacheKey(odspResolvedUrl) {\n return `${odspResolvedUrl.hashedDocumentId}/joinsession`;\n}\n/**\n * Utility API to check if the type of snapshot contents is `ISnapshot`.\n * @internal\n * @param obj - obj whose type needs to be identified.\n */\nexport function isInstanceOfISnapshot(\n// eslint-disable-next-line import/no-deprecated\nobj) {\n return obj !== undefined && \"snapshotFormatV\" in obj && obj.snapshotFormatV === 1;\n}\n/**\n * This tells whether request if for a specific loading group or not. The snapshot which\n * we fetch on initial load, fetches all ungrouped content.\n */\nexport function isSnapshotFetchForLoadingGroup(loadingGroupIds) {\n return loadingGroupIds !== undefined && loadingGroupIds.length > 0;\n}\n/*\n * This tells whether we are using legacy flow for fetching snapshot where we don't use\n * groupId query param in the trees latest network call.\n */\nexport function useLegacyFlowWithoutGroupsForSnapshotFetch(loadingGroupIds) {\n return loadingGroupIds === undefined;\n}\n// back-compat: GitHub #9653\nconst isFluidPackage = (pkg) => typeof pkg === \"object\" && typeof pkg?.name === \"string\" && typeof pkg?.fluid === \"object\";\n/**\n * Appends the store locator properties to the provided base URL. This function is useful for scenarios where an application\n * has a base URL (for example a sharing link) of the Fluid file, but does not have the locator information that would be used by Fluid\n * to load the file later.\n * @param baseUrl - The input URL on which the locator params will be appended.\n * @param resolvedUrl - odsp-driver's resolvedURL object.\n * @param dataStorePath - The relative data store path URL.\n * For requesting a driver URL, this value should always be '/'. If an empty string is passed, then dataStorePath\n * will be extracted from the resolved url if present.\n * @param containerPackageName - Name of the package to be included in the URL.\n * @returns The provided base URL appended with odsp-specific locator information\n */\nexport function appendNavParam(baseUrl, odspResolvedUrl, dataStorePath, containerPackageName) {\n const url = new URL(baseUrl);\n // If the user has passed an empty dataStorePath, then extract it from the resolved url.\n const actualDataStorePath = dataStorePath || (odspResolvedUrl.dataStorePath ?? \"\");\n storeLocatorInOdspUrl(url, {\n siteUrl: odspResolvedUrl.siteUrl,\n driveId: odspResolvedUrl.driveId,\n itemId: odspResolvedUrl.itemId,\n dataStorePath: actualDataStorePath,\n appName: odspResolvedUrl.appName,\n containerPackageName,\n fileVersion: odspResolvedUrl.fileVersion,\n context: odspResolvedUrl.context,\n });\n return url.href;\n}\n/**\n * Returns the package name of the container package information.\n * @param packageInfoSource - Information of the package connected to the URL\n * @returns The package name of the container package\n */\nexport function getContainerPackageName(packageInfoSource) {\n let containerPackageName;\n if (packageInfoSource && \"name\" in packageInfoSource) {\n containerPackageName = packageInfoSource.name;\n // packageInfoSource is cast to any as it is typed to IContainerPackageInfo instead of IFluidCodeDetails\n // TODO: use a stronger type\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-explicit-any\n }\n else if (isFluidPackage(packageInfoSource?.package)) {\n // TODO: use a stronger type\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-explicit-any\n containerPackageName = packageInfoSource?.package.name;\n }\n else {\n // TODO: use a stronger type\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-explicit-any\n containerPackageName = packageInfoSource?.package;\n }\n return containerPackageName;\n}\n//# sourceMappingURL=odspUtils.js.map","/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n *\n * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY\n */\nexport const pkgName = \"@fluidframework/odsp-driver\";\nexport const pkgVersion = \"2.43.0\";\n//# sourceMappingURL=packageVersion.js.map","/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\nimport { Lazy } from \"@fluidframework/core-utils/internal\";\nimport { createChildLogger, tagCodeArtifacts } from \"./logger.js\";\n/**\n * Creates a base configuration provider based on `sessionStorage`\n *\n * @returns A lazy initialized base configuration provider with `sessionStorage` as the underlying config store\n *\n * @internal\n */\nexport const sessionStorageConfigProvider = new Lazy(() => inMemoryConfigProvider(safeSessionStorage()));\nconst NullConfigProvider = {\n getRawConfig: () => undefined,\n};\n/**\n * Creates a base configuration provider based on the supplied `Storage` instance\n *\n * @param storage - instance of `Storage` to be used as storage media for the config\n * @returns A base configuration provider with\n * the supplied `Storage` instance as the underlying config store\n */\nexport const inMemoryConfigProvider = (storage) => {\n if (storage !== undefined && storage !== null) {\n return new CachedConfigProvider(undefined, {\n getRawConfig: (name) => {\n try {\n return stronglyTypedParse(storage.getItem(name) ?? undefined)?.raw;\n }\n catch {\n return undefined;\n }\n },\n });\n }\n return NullConfigProvider;\n};\nfunction isPrimitiveType(type) {\n switch (type) {\n case \"boolean\":\n case \"number\":\n case \"string\": {\n return true;\n }\n default: {\n return false;\n }\n }\n}\n/**\n * Takes any supported config type, and returns the value with a strong type. If the type of\n * the config is not a supported type undefined will be returned.\n * The user of this function should cache the result to avoid duplicated work.\n *\n * Strings will be attempted to be parsed and coerced into a strong config type.\n * if it is not possible to parsed and coerce a string to a strong config type the original string\n * will be return with a string type for the consumer to handle further if necessary.\n */\nfunction stronglyTypedParse(input) {\n let output = input;\n let defaultReturn;\n // we do special handling for strings to try and coerce\n // them into a config type if we can. This makes it easy\n // for config sources like sessionStorage which only\n // holds strings\n if (typeof input === \"string\") {\n try {\n output = JSON.parse(input);\n // we succeeded in parsing, but we don't support parsing\n // for any object as we can't do it type safely\n // so in this case, the default return will be string\n // rather than undefined, and the consumer\n // can parse, as we don't want to provide\n // a false sense of security by just\n // casting.\n defaultReturn = { raw: input, string: input };\n }\n catch {\n // No-op\n }\n }\n if (output === undefined) {\n return defaultReturn;\n }\n const outputType = typeof output;\n if (isPrimitiveType(outputType)) {\n return { ...defaultReturn, raw: input, [outputType]: output };\n }\n if (Array.isArray(output)) {\n const firstType = typeof output[0];\n // ensure the first elements is a primitive type\n if (!isPrimitiveType(firstType)) {\n return defaultReturn;\n }\n // ensue all the elements types are homogeneous\n // aka they all have the same type as the first\n for (const v of output) {\n if (typeof v !== firstType) {\n return defaultReturn;\n }\n }\n return { ...defaultReturn, raw: input, [`${firstType}[]`]: output };\n }\n return defaultReturn;\n}\n/**\n * `sessionStorage` is undefined in some environments such as Node and web pages with session storage disabled.\n */\nconst safeSessionStorage = () => {\n // For some configurations accessing \"globalThis.sessionStorage\" throws\n // \"'sessionStorage' property from 'Window': Access is denied for this document\" rather than returning undefined.\n // Therefor check for it before accessing.\n try {\n // Using globalThis and checking for undefined is preferred over just accessing global sessionStorage\n // since it avoids an exception when running in node.\n // In some cases this has returned null when disabled in the browser, so ensure its undefined in that case:\n return globalThis.sessionStorage ?? undefined;\n }\n catch {\n // For browsers which error on the above when session storage is disabled:\n return undefined;\n }\n};\n/**\n * Creates a wrapper on top of an existing config provider which allows for\n * specifying feature gates if not present in the original provider.\n *\n * @param original - the original config provider\n * @param defaults - default feature gate configs to be used if not specified by the original provider\n * @returns A config provider that looks for any requested feature gates in the original provider and falls\n * back to the values specified in the `defaults` feature gates if they're not present in the original.\n *\n * @internal\n */\nexport const wrapConfigProviderWithDefaults = (original, defaults) => ({\n getRawConfig: (name) => original?.getRawConfig(name) ?? defaults[name],\n});\n/**\n * Implementation of {@link IConfigProvider} which contains nested {@link IConfigProviderBase} instances\n */\nexport class CachedConfigProvider {\n constructor(logger, ...orderedBaseProviders) {\n this.logger = logger;\n this.configCache = new Map();\n this.orderedBaseProviders = [];\n const knownProviders = new Set();\n const candidateProviders = [...orderedBaseProviders];\n while (candidateProviders.length > 0) {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n const baseProvider = candidateProviders.shift();\n if (baseProvider !== undefined &&\n isConfigProviderBase(baseProvider) &&\n !knownProviders.has(baseProvider)) {\n knownProviders.add(baseProvider);\n if (baseProvider instanceof CachedConfigProvider) {\n candidateProviders.push(...baseProvider.orderedBaseProviders);\n }\n else {\n this.orderedBaseProviders.push(baseProvider);\n }\n }\n }\n }\n getBoolean(name) {\n return this.getCacheEntry(name)?.boolean;\n }\n getNumber(name) {\n return this.getCacheEntry(name)?.number;\n }\n getString(name) {\n return this.getCacheEntry(name)?.string;\n }\n getBooleanArray(name) {\n return this.getCacheEntry(name)?.[\"boolean[]\"];\n }\n getNumberArray(name) {\n return this.getCacheEntry(name)?.[\"number[]\"];\n }\n getStringArray(name) {\n return this.getCacheEntry(name)?.[\"string[]\"];\n }\n getRawConfig(name) {\n return this.getCacheEntry(name)?.raw;\n }\n getCacheEntry(name) {\n if (!this.configCache.has(name)) {\n for (const provider of this.orderedBaseProviders) {\n const parsed = stronglyTypedParse(provider?.getRawConfig(name));\n if (parsed !== undefined) {\n this.configCache.set(name, parsed);\n this.logger?.send({\n category: \"generic\",\n eventName: \"ConfigRead\",\n ...tagCodeArtifacts({\n configName: name,\n configValue: JSON.stringify(parsed),\n }),\n });\n return parsed;\n }\n }\n // configs are immutable, if the first lookup returned no results, all lookups should\n this.configCache.set(name, { raw: undefined });\n }\n return this.configCache.get(name);\n }\n}\n/**\n * Determines whether or not the provided object is a {@link MonitoringContext}.\n * @remarks Can be used for type-narrowing.\n *\n * @internal\n */\nexport function loggerIsMonitoringContext(obj) {\n const maybeConfig = obj;\n return isConfigProviderBase(maybeConfig?.config) && maybeConfig?.logger !== undefined;\n}\n/**\n * Creates a {@link MonitoringContext} from the provided logger, if it isn't already one.\n *\n * @internal\n */\nexport function loggerToMonitoringContext(logger) {\n if (loggerIsMonitoringContext(logger)) {\n return logger;\n }\n return mixinMonitoringContext(logger, sessionStorageConfigProvider.value);\n}\n/**\n * Creates a {@link MonitoringContext} from the provided logger.\n *\n * @remarks\n * Assumes that the provided logger is not itself already a {@link MonitoringContext}, and will throw an error if it is.\n * If you are unsure, use {@link loggerToMonitoringContext} instead.\n *\n * @throws If the provided logger is already a {@link MonitoringContext}.\n *\n * @internal\n */\nexport function mixinMonitoringContext(logger, ...configs) {\n if (loggerIsMonitoringContext(logger)) {\n throw new Error(\"Logger is already a monitoring context\");\n }\n /**\n * this is the tricky bit we use for now to smuggle monitoring context around.\n * To the logger we mixin both config and itself, so mc.logger === logger as it is self-referential.\n * We then expose it as a Monitoring context, so via types we hide the outer logger methods.\n * To layers that expect just a logger we can pass mc.logger, but this is still a MonitoringContext\n * so if a deeper layer then converts that logger to a monitoring context it can find the smuggled properties\n * of the MonitoringContext and get the config provider.\n */\n const mc = logger;\n mc.config = new CachedConfigProvider(logger, ...configs);\n mc.logger = logger;\n return mc;\n}\nfunction isConfigProviderBase(obj) {\n const maybeConfig = obj;\n return typeof maybeConfig?.getRawConfig === \"function\";\n}\n/**\n * Creates a child logger with a {@link MonitoringContext}.\n *\n * @see {@link loggerToMonitoringContext}\n * @internal\n */\nexport function createChildMonitoringContext(props) {\n return loggerToMonitoringContext(createChildLogger(props));\n}\n/**\n * Creates a proxy object that allows for reading configuration values from a IConfigProviderBase,\n * and default to the provided options if the configuration value is not present.\n *\n * @param config - the configuration provider to read values from.\n * @param namespace - the namespace to use when reading configuration values.\n * @param configReaders - a mapping of option keys to configuration value readers.\n * @param defaultOptions - the default options to use if the configuration value is not present.\n *\n * @internal\n * */\nexport function createConfigBasedOptionsProxy(config, namespace, configReaders, defaultOptions) {\n const realConfig = config instanceof CachedConfigProvider\n ? config\n : new CachedConfigProvider(undefined, config);\n const keys = new Set([\n ...Object.keys(defaultOptions ?? {}),\n ...Object.keys(configReaders),\n ]);\n return new Proxy(Object.freeze({}), {\n get: (_, prop) => {\n const reader = configReaders[prop];\n const value = reader?.(realConfig, `${namespace}.${prop}`);\n if (value !== undefined) {\n return value;\n }\n return defaultOptions?.[prop];\n },\n has: (_, prop) => keys.has(prop),\n // we don't want the keys of this object to be enumerable\n // as accessing them will trigger a config read, which\n // should only happen when the value is accessed via\n // a previously known key.\n ownKeys: () => {\n throw new TypeError(\"OptionsProxy keys are not enumerable\");\n },\n });\n}\n//# sourceMappingURL=config.js.map","/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\nimport { v4 as uuid } from \"uuid\";\nimport { hasErrorInstanceId, isFluidError } from \"./fluidErrorBase.js\";\nimport { convertToBasePropertyType } from \"./logger.js\";\n/**\n * Determines if the provided value is an object but neither null nor an array.\n */\nconst isRegularObject = (value) => {\n return value !== null && !Array.isArray(value) && typeof value === \"object\";\n};\n/**\n * Inspect the given error for common \"safe\" props and return them.\n *\n * @internal\n */\nexport function extractLogSafeErrorProperties(error, sanitizeStack) {\n const removeMessageFromStack = (stack, errorName) => {\n if (!sanitizeStack) {\n return stack;\n }\n const stackFrames = stack.split(\"\\n\");\n stackFrames.shift(); // Remove \"[ErrorName]: [ErrorMessage]\"\n if (errorName !== undefined) {\n stackFrames.unshift(errorName); // Add \"[ErrorName]\"\n }\n return stackFrames.join(\"\\n\");\n };\n const message = typeof error?.message === \"string\"\n ? error.message\n : String(error);\n const safeProps = {\n message,\n };\n if (isRegularObject(error)) {\n const { errorType, stack, name } = error;\n if (typeof errorType === \"string\") {\n safeProps.errorType = errorType;\n }\n if (typeof stack === \"string\") {\n const errorName = typeof name === \"string\" ? name : undefined;\n safeProps.stack = removeMessageFromStack(stack, errorName);\n }\n }\n return safeProps;\n}\n/**\n * Type-guard for {@link @fluidframework/core-interfaces#ILoggingError}.\n *\n * @internal\n */\nexport const isILoggingError = (x) => typeof x?.getTelemetryProperties === \"function\";\n/**\n * Copy props from source onto target, but do not overwrite an existing prop that matches\n */\nfunction copyProps(target, source) {\n for (const [key, value] of Object.entries(source)) {\n if (target[key] === undefined) {\n target[key] = value;\n }\n }\n}\n/**\n * Normalize the given error yielding a valid Fluid Error\n * @returns A valid Fluid Error with any provided annotations applied\n * @param error - The error to normalize\n * @param annotations - Annotations to apply to the normalized error\n *\n * @internal\n */\nexport function normalizeError(error, annotations = {}) {\n if (isFluidError(error)) {\n // We can simply add the telemetry props to the error and return it\n error.addTelemetryProperties(annotations.props ?? {});\n return error;\n }\n // We have to construct a new Fluid Error, copying safe properties over\n const { message, stack } = extractLogSafeErrorProperties(error, false /* sanitizeStack */);\n const fluidError = new NormalizedLoggingError({\n message,\n stack,\n });\n // We need to preserve these properties which are used in a non-typesafe way throughout driver code (see #8743)\n // Anywhere they are set should be on a valid Fluid Error that would have been returned above,\n // but we can't prove it with the types, so adding this defensive measure.\n if (typeof error === \"object\" && error !== null) {\n const maybeHasRetry = error;\n let retryProps;\n if (\"canRetry\" in error) {\n retryProps ??= {};\n retryProps.canRetry = maybeHasRetry.canRetry;\n }\n if (\"retryAfterSeconds\" in error) {\n retryProps ??= {};\n retryProps.retryAfterSeconds = maybeHasRetry.retryAfterSeconds;\n }\n if (retryProps !== undefined) {\n Object.assign(fluidError, retryProps);\n }\n }\n if (typeof error !== \"object\") {\n // This is only interesting for non-objects\n fluidError.addTelemetryProperties({ typeofError: typeof error });\n }\n const errorTelemetryProps = LoggingError.typeCheck(error)\n ? error.getTelemetryProperties()\n : {\n untrustedOrigin: 1, // This will let us filter errors that did not originate from our own codebase\n // FUTURE: Once 2.0 becomes LTS, switch to this more explicit property name\n // Consider using a string to distinguish cases like \"dependency\" v. \"callback\"\n // errorRunningExternalCode: 1,\n };\n fluidError.addTelemetryProperties({\n ...errorTelemetryProps,\n ...annotations.props,\n });\n return fluidError;\n}\nlet stackPopulatedOnCreation;\n/**\n * The purpose of this function is to provide ability to capture stack context quickly.\n * Accessing new Error().stack is slow, and the slowest part is accessing stack property itself.\n * There are scenarios where we generate error with stack, but error is handled in most cases and\n * stack property is not accessed.\n * For such cases it's better to not read stack property right away, but rather delay it until / if it's needed\n * Some browsers will populate stack right away, others require throwing Error, so we do auto-detection on the fly.\n * @param stackTraceLimit - stack trace limit for an error\n * @returns Error object that has stack populated.\n *\n * @internal\n */\nexport function generateErrorWithStack(stackTraceLimit) {\n const ErrorConfig = Error;\n const originalStackTraceLimit = ErrorConfig.stackTraceLimit;\n if (stackTraceLimit !== undefined) {\n ErrorConfig.stackTraceLimit = stackTraceLimit;\n }\n const err = new Error(\"<>\");\n if (stackPopulatedOnCreation === undefined) {\n stackPopulatedOnCreation = err.stack !== undefined;\n }\n if (stackPopulatedOnCreation) {\n ErrorConfig.stackTraceLimit = originalStackTraceLimit;\n return err;\n }\n try {\n throw err;\n }\n catch (error) {\n ErrorConfig.stackTraceLimit = originalStackTraceLimit;\n return error;\n }\n}\n/**\n * Generate a stack at this callsite as if an error were thrown from here.\n * @param stackTraceLimit - stack trace limit for an error\n * @returns the callstack (does not throw)\n *\n * @internal\n */\nexport function generateStack(stackTraceLimit) {\n return generateErrorWithStack(stackTraceLimit).stack;\n}\n/**\n * Create a new error using newErrorFn, wrapping and caused by the given unknown error.\n * Copies the inner error's stack, errorInstanceId and telemetry props over to the new error if present\n * @param innerError - An error from untrusted/unknown origins\n * @param newErrorFn - callback that will create a new error given the original error's message\n * @returns A new error object \"wrapping\" the given error\n *\n * @internal\n */\nexport function wrapError(innerError, newErrorFn) {\n const { message, stack } = extractLogSafeErrorProperties(innerError, false /* sanitizeStack */);\n const newError = newErrorFn(message);\n if (stack !== undefined) {\n overwriteStack(newError, stack);\n }\n // Mark external errors with untrustedOrigin flag\n if (isExternalError(innerError)) {\n newError.addTelemetryProperties({\n untrustedOrigin: 1,\n // FUTURE: Once 2.0 becomes LTS, switch to this more explicit property name\n // Consider using a string to distinguish cases like \"dependency\" v. \"callback\"\n // errorRunningExternalCode: 1,\n });\n }\n // Reuse errorInstanceId\n if (hasErrorInstanceId(innerError)) {\n newError.overwriteErrorInstanceId(innerError.errorInstanceId);\n // For \"back-compat\" in the logs\n newError.addTelemetryProperties({ innerErrorInstanceId: innerError.errorInstanceId });\n }\n // Lastly, copy over all other telemetry properties. Note these will not overwrite existing properties\n // This will include the untrustedOrigin/errorRunningExternalCode info if the inner error itself was created from an external error\n if (isILoggingError(innerError)) {\n newError.addTelemetryProperties(innerError.getTelemetryProperties());\n }\n return newError;\n}\n/**\n * The same as wrapError, but also logs the innerError, including the wrapping error's instance ID.\n *\n * @typeParam T - The kind of wrapper error to create.\n *\n * @internal\n */\nexport function wrapErrorAndLog(innerError, newErrorFn, logger) {\n const newError = wrapError(innerError, newErrorFn);\n // This will match innerError.errorInstanceId if present (see wrapError)\n const errorInstanceId = newError.errorInstanceId;\n // For \"back-compat\" in the logs\n const wrappedByErrorInstanceId = errorInstanceId;\n logger.sendTelemetryEvent({\n eventName: \"WrapError\",\n errorInstanceId,\n wrappedByErrorInstanceId,\n }, innerError);\n return newError;\n}\n/**\n * Attempts to overwrite the error's stack\n *\n * There have been reports of certain JS environments where overwriting stack will throw.\n * If that happens, this adds the given stack as the telemetry property \"stack2\"\n *\n * @internal\n */\nexport function overwriteStack(error, stack) {\n try {\n Object.assign(error, { stack });\n }\n catch {\n error.addTelemetryProperties({ stack2: stack });\n }\n}\n/**\n * True for any error object that is an (optionally normalized) external error\n * False for any error we created and raised within the FF codebase via LoggingError base class,\n * or wrapped in a well-known error type\n *\n * @internal\n */\nexport function isExternalError(error) {\n // LoggingErrors are an internal FF error type. However, an external error can be converted\n // into a LoggingError if it is normalized. In this case we must use the untrustedOrigin/errorRunningExternalCode flag to\n // determine whether the original error was in fact external.\n if (LoggingError.typeCheck(error)) {\n if (error.errorType === NORMALIZED_ERROR_TYPE) {\n const props = error.getTelemetryProperties();\n // NOTE: errorRunningExternalCode is not currently used - once this \"read\" code reaches LTS,\n // we can switch to writing this more explicit property\n return props.untrustedOrigin === 1 || Boolean(props.errorRunningExternalCode);\n }\n return false;\n }\n return true;\n}\n/**\n * Type guard to identify if a particular telemetry property appears to be a\n * {@link @fluidframework/core-interfaces#Tagged} telemetry property.\n *\n * @internal\n */\nexport function isTaggedTelemetryPropertyValue(x) {\n return typeof x?.tag === \"string\";\n}\n// TODO: Use `unknown` instead (API breaking change)\n/* eslint-disable @typescript-eslint/no-explicit-any */\n/**\n * Borrowed from\n * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Errors/Cyclic_object_value#examples}\n * Avoids runtime errors with circular references.\n * Not ideal, as will cut values that are not necessarily circular references.\n * Could be improved by implementing Node's util.inspect() for browser (minus all the coloring code)\n *\n * @internal\n */\nexport const getCircularReplacer = () => {\n const seen = new WeakSet();\n return (key, value) => {\n if (typeof value === \"object\" && value !== null) {\n if (seen.has(value)) {\n return \"\";\n }\n seen.add(value);\n }\n return value;\n };\n};\n/* eslint-enable @typescript-eslint/no-explicit-any */\n/**\n * Base class for \"trusted\" errors we create, whose properties can generally be logged to telemetry safely.\n * All properties set on the object, or passed in (via the constructor or addTelemetryProperties),\n * will be logged in accordance with their tag, if present.\n *\n * PLEASE take care to avoid setting sensitive data on this object without proper tagging!\n *\n * @internal\n */\nexport class LoggingError extends Error {\n get errorInstanceId() {\n return this._errorInstanceId;\n }\n overwriteErrorInstanceId(id) {\n this._errorInstanceId = id;\n }\n /**\n * Create a new LoggingError\n * @param message - Error message to use for Error base class\n * @param props - telemetry props to include on the error for when it's logged\n * @param omitPropsFromLogging - properties by name to omit from telemetry props\n */\n constructor(message, props, omitPropsFromLogging = new Set()) {\n super(message);\n this.omitPropsFromLogging = omitPropsFromLogging;\n this._errorInstanceId = uuid();\n // Don't log this list itself, or the private _errorInstanceId\n omitPropsFromLogging.add(\"omitPropsFromLogging\");\n omitPropsFromLogging.add(\"_errorInstanceId\");\n if (props) {\n this.addTelemetryProperties(props);\n }\n }\n /**\n * Determines if a given object is an instance of a LoggingError\n * @param object - any object\n * @returns true if the object is an instance of a LoggingError, false if not.\n */\n static typeCheck(object) {\n if (typeof object === \"object\" && object !== null) {\n return (typeof object.addTelemetryProperties === \"function\" &&\n typeof object.getTelemetryProperties === \"function\" &&\n typeof object.errorInstanceId === \"string\");\n }\n return false;\n }\n /**\n * Add additional properties to be logged\n */\n addTelemetryProperties(props) {\n copyProps(this, props);\n }\n /**\n * Get all properties fit to be logged to telemetry for this error\n */\n getTelemetryProperties() {\n // Only pick properties fit for telemetry out of all of this object's enumerable properties.\n const telemetryProps = {};\n for (const key of Object.keys(this)) {\n if (this.omitPropsFromLogging.has(key)) {\n continue;\n }\n const val = this[key];\n // Ensure only valid props get logged, since props of logging error could be in any shape\n telemetryProps[key] = convertToBasePropertyType(val);\n }\n // Ensure a few extra props always exist\n return {\n ...telemetryProps,\n stack: this.stack,\n message: this.message,\n errorInstanceId: this._errorInstanceId,\n };\n }\n}\n/**\n * The Error class used when normalizing an external error\n *\n * @internal\n */\nexport const NORMALIZED_ERROR_TYPE = \"genericError\";\n/**\n * Subclass of LoggingError returned by normalizeError\n *\n * @internal\n */\nclass NormalizedLoggingError extends LoggingError {\n constructor(errorProps) {\n super(errorProps.message);\n // errorType \"genericError\" is used as a default value throughout the code.\n // Note that this matches ContainerErrorTypes/DriverErrorTypes' genericError\n this.errorType = NORMALIZED_ERROR_TYPE;\n if (errorProps.stack !== undefined) {\n overwriteStack(this, errorProps.stack);\n }\n }\n}\n//# sourceMappingURL=errorLogging.js.map","/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\nconst hasTelemetryPropFunctions = (x) => typeof x?.getTelemetryProperties === \"function\" &&\n typeof x?.addTelemetryProperties === \"function\";\n/**\n * Type guard for error data containing the {@link IFluidErrorBase.errorInstanceId} property.\n *\n * @internal\n */\nexport const hasErrorInstanceId = (x) => typeof x?.errorInstanceId === \"string\";\n/**\n * Type guard for {@link IFluidErrorBase}.\n *\n * @internal\n */\nexport function isFluidError(error) {\n return (typeof error?.errorType === \"string\" &&\n typeof error?.message === \"string\" &&\n hasErrorInstanceId(error) &&\n hasTelemetryPropFunctions(error));\n}\n//# sourceMappingURL=fluidErrorBase.js.map","/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\nimport { performanceNow } from \"@fluid-internal/client-utils\";\nimport { LogLevel, } from \"@fluidframework/core-interfaces\";\nimport { CachedConfigProvider, loggerIsMonitoringContext, mixinMonitoringContext, } from \"./config.js\";\nimport { extractLogSafeErrorProperties, generateStack, isILoggingError, isTaggedTelemetryPropertyValue, } from \"./errorLogging.js\";\n/**\n * Broad classifications to be applied to individual properties as they're prepared to be logged to telemetry.\n *\n * @privateRemarks Please do not modify existing entries, to maintain backwards compatibility.\n *\n * @internal\n */\nexport var TelemetryDataTag;\n(function (TelemetryDataTag) {\n /**\n * Data containing terms or IDs from code packages that may have been dynamically loaded\n */\n TelemetryDataTag[\"CodeArtifact\"] = \"CodeArtifact\";\n /**\n * Personal data of a variety of classifications that pertains to the user\n */\n TelemetryDataTag[\"UserData\"] = \"UserData\";\n})(TelemetryDataTag || (TelemetryDataTag = {}));\n/**\n * Attempts to parse number from string.\n * If it fails, it will return the original string.\n *\n * @remarks\n * Used to make telemetry data typed (and support math operations, like comparison),\n * in places where we do expect numbers (like contentsize/duration property in http header).\n *\n * @internal\n */\n// eslint-disable-next-line @rushstack/no-new-null\nexport function numberFromString(str) {\n if (str === undefined || str === null) {\n return undefined;\n }\n const num = Number(str);\n return Number.isNaN(num) ? str : num;\n}\n// TODO: add docs\n// eslint-disable-next-line jsdoc/require-description\n/**\n * @internal\n */\nexport function formatTick(tick) {\n return Math.floor(tick);\n}\n/**\n * String used to concatenate the namespace of parent loggers and their child loggers.\n * @internal\n */\nexport const eventNamespaceSeparator = \":\";\n/**\n * TelemetryLogger class contains various helper telemetry methods,\n * encoding in one place schemas for various types of Fluid telemetry events.\n * Creates sub-logger that appends properties to all events\n */\nexport class TelemetryLogger {\n static sanitizePkgName(name) {\n return name.replace(\"@\", \"\").replace(\"/\", \"-\");\n }\n /**\n * Take an unknown error object and add the appropriate info from it to the event. Message and stack will be copied\n * over from the error object, along with other telemetry properties if it's an ILoggingError.\n * @param event - Event being logged\n * @param error - Error to extract info from\n * @param fetchStack - Whether to fetch the current callstack if error.stack is undefined\n */\n static prepareErrorObject(event, error, fetchStack) {\n const { message, errorType, stack } = extractLogSafeErrorProperties(error, true /* sanitizeStack */);\n // First, copy over error message, stack, and errorType directly (overwrite if present on event)\n event.stack = stack;\n event.error = message; // Note that the error message goes on the 'error' field\n event.errorType = errorType;\n if (isILoggingError(error)) {\n // Add any other telemetry properties from the LoggingError\n const telemetryProp = error.getTelemetryProperties();\n for (const key of Object.keys(telemetryProp)) {\n if (event[key] !== undefined) {\n // Don't overwrite existing properties on the event\n continue;\n }\n event[key] = telemetryProp[key];\n }\n }\n // Collect stack if we were not able to extract it from error\n if (event.stack === undefined && fetchStack) {\n event.stack = generateStack();\n }\n }\n constructor(namespace, properties) {\n this.namespace = namespace;\n this.properties = properties;\n }\n /**\n * Send a telemetry event with the logger\n *\n * @param event - the event to send\n * @param error - optional error object to log\n * @param logLevel - optional level of the log. It category of event is set as error,\n * then the logLevel will be upgraded to be an error.\n */\n sendTelemetryEvent(event, error, logLevel = LogLevel.default) {\n this.sendTelemetryEventCore({ ...event, category: event.category ?? \"generic\" }, error, event.category === \"error\" ? LogLevel.error : logLevel);\n }\n /**\n * Send a telemetry event with the logger\n *\n * @param event - the event to send\n * @param error - optional error object to log\n * @param logLevel - optional level of the log.\n */\n sendTelemetryEventCore(event, error, logLevel) {\n const newEvent = convertToBaseEvent(event);\n if (error !== undefined) {\n TelemetryLogger.prepareErrorObject(newEvent, error, false);\n }\n // Will include Nan & Infinity, but probably we do not care\n if (typeof newEvent.duration === \"number\") {\n newEvent.duration = formatTick(newEvent.duration);\n }\n this.send(newEvent, logLevel);\n }\n /**\n * Send an error telemetry event with the logger\n *\n * @param event - the event to send\n * @param error - optional error object to log\n */\n sendErrorEvent(event, error) {\n this.sendTelemetryEventCore({\n // ensure the error field has some value,\n // this can and will be overridden by event, or error\n error: event.eventName,\n ...event,\n category: \"error\",\n }, error, LogLevel.error);\n }\n /**\n * Send a performance telemetry event with the logger\n *\n * @param event - Event to send\n * @param error - optional error object to log\n * @param logLevel - optional level of the log. It category of event is set as error,\n * then the logLevel will be upgraded to be an error.\n */\n sendPerformanceEvent(event, error, logLevel = LogLevel.default) {\n const perfEvent = {\n ...event,\n category: event.category ?? \"performance\",\n };\n this.sendTelemetryEventCore(perfEvent, error, perfEvent.category === \"error\" ? LogLevel.error : logLevel);\n }\n prepareEvent(event) {\n const includeErrorProps = event.category === \"error\" || event.error !== undefined;\n const newEvent = {\n ...event,\n };\n if (this.namespace !== undefined) {\n newEvent.eventName = `${this.namespace}${TelemetryLogger.eventNamespaceSeparator}${newEvent.eventName}`;\n }\n return this.extendProperties(newEvent, includeErrorProps);\n }\n extendProperties(toExtend, includeErrorProps) {\n const eventLike = toExtend;\n if (this.properties) {\n const properties = [];\n properties.push(this.properties.all);\n if (includeErrorProps) {\n properties.push(this.properties.error);\n }\n for (const props of properties) {\n if (props !== undefined) {\n for (const [key, getterOrValue] of Object.entries(props)) {\n if (eventLike[key] !== undefined) {\n continue;\n }\n // If this throws, hopefully it is handled elsewhere\n const value = typeof getterOrValue === \"function\" ? getterOrValue() : getterOrValue;\n if (value !== undefined) {\n eventLike[key] = value;\n }\n }\n }\n }\n }\n return toExtend;\n }\n}\n/**\n * {@inheritDoc eventNamespaceSeparator}\n */\nTelemetryLogger.eventNamespaceSeparator = eventNamespaceSeparator;\n/**\n * @deprecated 0.56, remove TaggedLoggerAdapter once its usage is removed from\n * container-runtime. Issue: #8191\n * TaggedLoggerAdapter class can add tag handling to your logger.\n *\n * @internal\n */\nexport class TaggedLoggerAdapter {\n constructor(logger) {\n this.logger = logger;\n }\n /**\n * {@inheritDoc @fluidframework/core-interfaces#ITelemetryBaseLogger.send}\n */\n send(eventWithTagsMaybe) {\n const newEvent = {\n category: eventWithTagsMaybe.category,\n eventName: eventWithTagsMaybe.eventName,\n };\n for (const [key, taggableProp] of Object.entries(eventWithTagsMaybe)) {\n const { value, tag } = typeof taggableProp === \"object\"\n ? taggableProp\n : { value: taggableProp, tag: undefined };\n switch (tag) {\n case undefined: {\n // No tag means we can log plainly\n newEvent[key] = value;\n break;\n }\n case \"PackageData\": // For back-compat\n case TelemetryDataTag.CodeArtifact: {\n // For Microsoft applications, CodeArtifact is safe for now\n // (we don't load 3P code in 1P apps)\n newEvent[key] = value;\n break;\n }\n case TelemetryDataTag.UserData: {\n // Strip out anything tagged explicitly as UserData.\n // Alternate strategy would be to hash these props\n newEvent[key] = \"REDACTED (UserData)\";\n break;\n }\n default: {\n // If we encounter a tag we don't recognize\n // then we must assume we should scrub.\n newEvent[key] = \"REDACTED (unknown tag)\";\n break;\n }\n }\n }\n this.logger.send(newEvent);\n }\n}\n/**\n * Create a child logger based on the provided props object.\n *\n * @remarks\n * Passing in no props object (i.e. undefined) will return a logger that is effectively a no-op.\n *\n * @param props - logger is the base logger the child will log to after it's processing, namespace will be prefixed to all event names, properties are default properties that will be applied events.\n *\n * @legacy\n * @alpha\n */\nexport function createChildLogger(props) {\n return ChildLogger.create(props?.logger, props?.namespace, props?.properties);\n}\n/**\n * ChildLogger class contains various helper telemetry methods,\n * encoding in one place schemas for various types of Fluid telemetry events.\n * Creates sub-logger that appends properties to all events.\n */\nexport class ChildLogger extends TelemetryLogger {\n /**\n * Create child logger\n * @param baseLogger - Base logger to use to output events. If undefined, proper child logger\n * is created, but it does not send telemetry events anywhere.\n * @param namespace - Telemetry event name prefix to add to all events\n * @param properties - Base properties to add to all events\n */\n static create(baseLogger, namespace, properties) {\n // if we are creating a child of a child, rather than nest, which will increase\n // the callstack overhead, just generate a new logger that includes everything from the previous\n if (baseLogger instanceof ChildLogger) {\n const combinedProperties = {};\n for (const extendedProps of [baseLogger.properties, properties]) {\n if (extendedProps !== undefined) {\n if (extendedProps.all !== undefined) {\n combinedProperties.all = {\n ...combinedProperties.all,\n ...extendedProps.all,\n };\n }\n if (extendedProps.error !== undefined) {\n combinedProperties.error = {\n ...combinedProperties.error,\n ...extendedProps.error,\n };\n }\n }\n }\n const combinedNamespace = baseLogger.namespace === undefined\n ? namespace\n : namespace === undefined\n ? baseLogger.namespace\n : `${baseLogger.namespace}${TelemetryLogger.eventNamespaceSeparator}${namespace}`;\n const child = new ChildLogger(baseLogger.baseLogger, combinedNamespace, combinedProperties);\n if (!loggerIsMonitoringContext(child) && loggerIsMonitoringContext(baseLogger)) {\n mixinMonitoringContext(child, baseLogger.config);\n }\n return child;\n }\n return new ChildLogger(baseLogger ?? { send() { } }, namespace, properties);\n }\n constructor(baseLogger, namespace, properties) {\n super(namespace, properties);\n this.baseLogger = baseLogger;\n // propagate the monitoring context\n if (loggerIsMonitoringContext(baseLogger)) {\n mixinMonitoringContext(this, new CachedConfigProvider(this, baseLogger.config));\n }\n }\n get minLogLevel() {\n return this.baseLogger.minLogLevel;\n }\n shouldFilterOutEvent(event, logLevel) {\n const eventLogLevel = logLevel ?? LogLevel.default;\n const configLogLevel = this.baseLogger.minLogLevel ?? LogLevel.default;\n // Filter out in case event log level is below what is wanted in config.\n return eventLogLevel < configLogLevel;\n }\n /**\n * Send an event with the logger\n *\n * @param event - the event to send\n */\n send(event, logLevel) {\n if (this.shouldFilterOutEvent(event, logLevel)) {\n return;\n }\n this.baseLogger.send(this.prepareEvent(event), logLevel);\n }\n}\n/**\n * Create a logger which logs to multiple other loggers based on the provided props object.\n *\n * @internal\n */\nexport function createMultiSinkLogger(props) {\n return new MultiSinkLogger(props.namespace, props.properties, props.loggers?.filter((l) => l !== undefined), props.tryInheritProperties);\n}\n/**\n * Multi-sink logger\n * Takes multiple ITelemetryBaseLogger objects (sinks) and logs all events into each sink\n */\nexport class MultiSinkLogger extends TelemetryLogger {\n /**\n * Create multiple sink logger (i.e. logger that sends events to multiple sinks)\n * @param namespace - Telemetry event name prefix to add to all events\n * @param properties - Base properties to add to all events\n * @param loggers - The list of loggers to use as sinks\n * @param tryInheritProperties - Will attempted to copy those loggers properties to this loggers if they are of a known type e.g. one from this package\n */\n constructor(namespace, properties, loggers = [], tryInheritProperties) {\n let realProperties = properties === undefined ? undefined : { ...properties };\n if (tryInheritProperties === true) {\n const merge = (realProperties ??= {});\n loggers\n .filter((l) => l instanceof TelemetryLogger)\n .map((l) => l.properties ?? {})\n // eslint-disable-next-line unicorn/no-array-for-each\n .forEach((cv) => {\n // eslint-disable-next-line unicorn/no-array-for-each\n Object.keys(cv).forEach((k) => {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n merge[k] = { ...cv[k], ...merge?.[k] };\n });\n });\n }\n super(namespace, realProperties);\n this.loggers = loggers;\n this._minLogLevelOfAllLoggers = LogLevel.default;\n this.calculateMinLogLevel();\n }\n get minLogLevel() {\n return this._minLogLevelOfAllLoggers;\n }\n calculateMinLogLevel() {\n if (this.loggers.length > 0) {\n const logLevels = [];\n for (const logger of this.loggers) {\n logLevels.push(logger.minLogLevel ?? LogLevel.default);\n }\n this._minLogLevelOfAllLoggers = Math.min(...logLevels);\n }\n }\n /**\n * Add logger to send all events to\n * @param logger - Logger to add\n */\n addLogger(logger) {\n if (logger !== undefined && logger !== null) {\n this.loggers.push(logger);\n // Update in case the logLevel of added logger is less than the current.\n this.calculateMinLogLevel();\n }\n }\n /**\n * Send an event to the loggers\n *\n * @param event - the event to send to all the registered logger\n */\n send(event) {\n const newEvent = this.prepareEvent(event);\n for (const logger of this.loggers) {\n logger.send(newEvent);\n }\n }\n}\n/**\n * Helper class to log performance events.\n *\n * @internal\n */\nexport class PerformanceEvent {\n /**\n * Creates an instance of {@link PerformanceEvent} and starts measurements\n * @param logger - the logger to be used for publishing events\n * @param event - the logging event details which will be published with the performance measurements\n * @param markers - See {@link IPerformanceEventMarkers}\n * @param recordHeapSize - whether or not to also record memory performance\n * @param emitLogs - should this instance emit logs. If set to false, logs will not be emitted to the logger,\n * but measurements will still be performed and any specified markers will be generated.\n * @returns An instance of {@link PerformanceEvent}\n */\n static start(logger, event, markers, emitLogs = true) {\n return new PerformanceEvent(logger, event, markers, emitLogs);\n }\n /**\n * Measure a synchronous task\n * @param logger - the logger to be used for publishing events\n * @param event - the logging event details which will be published with the performance measurements\n * @param callback - the task to be executed and measured\n * @param markers - See {@link IPerformanceEventMarkers}\n * @param sampleThreshold - events with the same name and category will be sent to the logger\n * only when we hit this many executions of the task. If unspecified, all events will be sent.\n * @returns The results of the executed task\n *\n * @remarks Note that if the \"same\" event (category + eventName) would be emitted by different\n * tasks (`callback`), `sampleThreshold` is still applied only based on the event's category + eventName,\n * so executing either of the tasks will increase the internal counter and they\n * effectively \"share\" the sampling rate for the event.\n */\n static timedExec(logger, event, callback, markers, sampleThreshold = 1) {\n const perfEvent = PerformanceEvent.start(logger, event, markers, PerformanceEvent.shouldReport(event, sampleThreshold));\n try {\n const ret = callback(perfEvent);\n perfEvent.autoEnd();\n return ret;\n }\n catch (error) {\n perfEvent.cancel(undefined, error);\n throw error;\n }\n }\n /**\n * Measure an asynchronous task\n * @param logger - the logger to be used for publishing events\n * @param event - the logging event details which will be published with the performance measurements\n * @param callback - the task to be executed and measured\n * @param markers - See {@link IPerformanceEventMarkers}\n * @param recordHeapSize - whether or not to also record memory performance\n * @param sampleThreshold - events with the same name and category will be sent to the logger\n * only when we hit this many executions of the task. If unspecified, all events will be sent.\n * @returns The results of the executed task\n *\n * @remarks Note that if the \"same\" event (category + eventName) would be emitted by different\n * tasks (`callback`), `sampleThreshold` is still applied only based on the event's category + eventName,\n * so executing either of the tasks will increase the internal counter and they\n * effectively \"share\" the sampling rate for the event.\n */\n static async timedExecAsync(logger, event, callback, markers, sampleThreshold = 1) {\n const perfEvent = PerformanceEvent.start(logger, event, markers, PerformanceEvent.shouldReport(event, sampleThreshold));\n try {\n const ret = await callback(perfEvent);\n perfEvent.autoEnd();\n return ret;\n }\n catch (error) {\n perfEvent.cancel(undefined, error);\n throw error;\n }\n }\n get duration() {\n return performanceNow() - this.startTime;\n }\n constructor(logger, event, markers = { end: true, cancel: \"generic\" }, emitLogs = true) {\n this.logger = logger;\n this.markers = markers;\n this.emitLogs = emitLogs;\n this.startTime = performanceNow();\n this.event = { ...event };\n if (this.markers.start) {\n this.reportEvent(\"start\");\n }\n if (typeof window === \"object\" &&\n window?.performance?.mark !== undefined &&\n window?.performance?.mark !== null) {\n this.startMark = `${event.eventName}-start`;\n window.performance.mark(this.startMark);\n }\n }\n reportProgress(props, eventNameSuffix = \"update\") {\n this.reportEvent(eventNameSuffix, props);\n }\n autoEnd() {\n // Event might have been cancelled or ended in the callback\n if (this.event && this.markers.end) {\n this.reportEvent(\"end\");\n }\n this.performanceEndMark();\n // To prevent the event from being reported again later\n this.event = undefined;\n }\n end(props) {\n this.reportEvent(\"end\", props);\n this.performanceEndMark();\n // To prevent the event from being reported again later\n this.event = undefined;\n }\n performanceEndMark() {\n if (this.startMark !== undefined && this.event) {\n const endMark = `${this.event.eventName}-end`;\n window.performance.mark(endMark);\n window.performance.measure(`${this.event.eventName}`, this.startMark, endMark);\n this.startMark = undefined;\n }\n }\n cancel(props, error) {\n if (this.markers.cancel !== undefined) {\n this.reportEvent(\"cancel\", { category: this.markers.cancel, ...props }, error);\n }\n // To prevent the event from being reported again later\n this.event = undefined;\n }\n /**\n * Report the event, if it hasn't already been reported.\n */\n reportEvent(eventNameSuffix, props, error) {\n // If the caller invokes cancel or end directly inside the callback for timedExec[Async],\n // then it's possible to come back through reportEvent twice. Only the first time counts.\n if (!this.event) {\n return;\n }\n if (!this.emitLogs) {\n return;\n }\n const event = { ...this.event, ...props };\n event.eventName = `${event.eventName}_${eventNameSuffix}`;\n if (eventNameSuffix !== \"start\") {\n event.duration = this.duration;\n }\n this.logger.sendPerformanceEvent(event, error);\n }\n static shouldReport(event, sampleThreshold) {\n const eventKey = `.${event.category}.${event.eventName}`;\n const hitCount = PerformanceEvent.eventHits.get(eventKey) ?? 0;\n PerformanceEvent.eventHits.set(eventKey, hitCount >= sampleThreshold ? 1 : hitCount + 1);\n return hitCount % sampleThreshold === 0;\n }\n}\nPerformanceEvent.eventHits = new Map();\n/**\n * Takes in an event object, and converts all of its values to a basePropertyType.\n * In the case of an invalid property type, the value will be converted to an error string.\n * @param event - Event with fields you want to stringify.\n */\nfunction convertToBaseEvent({ category, eventName, ...props }) {\n const newEvent = { category, eventName };\n for (const key of Object.keys(props)) {\n newEvent[key] = convertToBasePropertyType(props[key]);\n }\n return newEvent;\n}\n/**\n * Takes in value, and does one of 4 things.\n * if value is of primitive type - returns the original value.\n * If the value is a flat array or object - returns a stringified version of the array/object.\n * If the value is an object of type Tagged - returns the object\n * with its values recursively converted to base property Type.\n * If none of these cases are reached - returns an error string\n * @param x - value passed in to convert to a base property type\n */\nexport function convertToBasePropertyType(x) {\n return isTaggedTelemetryPropertyValue(x)\n ? {\n value: convertToBasePropertyTypeUntagged(x.value),\n tag: x.tag,\n }\n : convertToBasePropertyTypeUntagged(x);\n}\nfunction convertToBasePropertyTypeUntagged(x) {\n switch (typeof x) {\n case \"string\":\n case \"number\":\n case \"boolean\":\n case \"undefined\": {\n return x;\n }\n case \"object\": {\n // We assume this is an array or flat object based on the input types\n return JSON.stringify(x);\n }\n default: {\n // should never reach this case based on the input types\n console.error(`convertToBasePropertyTypeUntagged: INVALID PROPERTY (typed as ${typeof x})`);\n return `INVALID PROPERTY (typed as ${typeof x})`;\n }\n }\n}\n/**\n * Tags all given `values` with the same `tag`.\n *\n * @param tag - The tag with which all `values` will be annotated.\n * @param values - The values to be tagged.\n *\n * @remarks\n * It supports properties of type {@link @fluidframework/core-interfaces#TelemetryBaseEventPropertyType},\n * as well as callbacks that return that type.\n *\n * @example Sample usage\n * ```typescript\n * {\n * \t// ...Other properties being added to a telemetry event\n * \t...tagData(\"someTag\", {foo: 1, bar: 2}),\n * \t// ...\n * }\n * ```\n * This will result in `foo` and `bar` added to the event with their values tagged.\n *\n * @internal\n */\nexport const tagData = (tag, values) => \n// eslint-disable-next-line @typescript-eslint/no-unsafe-return\nObject.entries(values)\n .filter((e) => e[1] !== undefined)\n // eslint-disable-next-line unicorn/no-array-reduce\n .reduce((pv, cv) => {\n const [key, value] = cv;\n // The ternary form is less legible in this case.\n // eslint-disable-next-line unicorn/prefer-ternary\n if (typeof value === \"function\") {\n pv[key] = () => {\n return { tag, value: value() };\n };\n }\n else {\n pv[key] = { tag, value };\n }\n return pv;\n}, {});\n/**\n * Tags all provided `values` as {@link TelemetryDataTag.CodeArtifact}.\n *\n * @param values - The values to be tagged.\n *\n * @remarks\n * It supports properties of type {@link @fluidframework/core-interfaces#TelemetryBaseEventPropertyType},\n * as well as callbacks that return that type.\n *\n * @example Sample usage\n * ```typescript\n * {\n * \t// ...Other properties being added to a telemetry event\n * \t...tagCodeArtifacts(\"someTag\", {foo: 1, bar: 2}),\n * \t// ...\n * }\n * ```\n * This will result in `foo` and `bar` added to the event with their values tagged as {@link TelemetryDataTag.CodeArtifact}.\n *\n * @see {@link tagData}\n *\n * @internal\n */\nexport const tagCodeArtifacts = (values) => tagData(TelemetryDataTag.CodeArtifact, values);\n//# sourceMappingURL=logger.js.map","/******************************************************************************\nCopyright (c) Microsoft Corporation.\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */\n/* global Reflect, Promise, SuppressedError, Symbol */\n\nvar extendStatics = function(d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n};\n\nexport function __extends(d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\n\nexport var __assign = function() {\n __assign = Object.assign || function __assign(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n }\n return __assign.apply(this, arguments);\n}\n\nexport function __rest(s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n}\n\nexport function __decorate(decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n}\n\nexport function __param(paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n}\n\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\n var _, done = false;\n for (var i = decorators.length - 1; i >= 0; i--) {\n var context = {};\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\n if (kind === \"accessor\") {\n if (result === void 0) continue;\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\n if (_ = accept(result.get)) descriptor.get = _;\n if (_ = accept(result.set)) descriptor.set = _;\n if (_ = accept(result.init)) initializers.unshift(_);\n }\n else if (_ = accept(result)) {\n if (kind === \"field\") initializers.unshift(_);\n else descriptor[key] = _;\n }\n }\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\n done = true;\n};\n\nexport function __runInitializers(thisArg, initializers, value) {\n var useValue = arguments.length > 2;\n for (var i = 0; i < initializers.length; i++) {\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\n }\n return useValue ? value : void 0;\n};\n\nexport function __propKey(x) {\n return typeof x === \"symbol\" ? x : \"\".concat(x);\n};\n\nexport function __setFunctionName(f, name, prefix) {\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\n};\n\nexport function __metadata(metadataKey, metadataValue) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\n}\n\nexport function __awaiter(thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n}\n\nexport function __generator(thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n}\n\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n});\n\nexport function __exportStar(m, o) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\n}\n\nexport function __values(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n}\n\nexport function __read(o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n}\n\n/** @deprecated */\nexport function __spread() {\n for (var ar = [], i = 0; i < arguments.length; i++)\n ar = ar.concat(__read(arguments[i]));\n return ar;\n}\n\n/** @deprecated */\nexport function __spreadArrays() {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n}\n\nexport function __spreadArray(to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n}\n\nexport function __await(v) {\n return this instanceof __await ? (this.v = v, this) : new __await(v);\n}\n\nexport function __asyncGenerator(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n function fulfill(value) { resume(\"next\", value); }\n function reject(value) { resume(\"throw\", value); }\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\n}\n\nexport function __asyncDelegator(o) {\n var i, p;\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\n}\n\nexport function __asyncValues(o) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator], i;\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\n}\n\nexport function __makeTemplateObject(cooked, raw) {\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\n return cooked;\n};\n\nvar __setModuleDefault = Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n};\n\nexport function __importStar(mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n}\n\nexport function __importDefault(mod) {\n return (mod && mod.__esModule) ? mod : { default: mod };\n}\n\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n}\n\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n}\n\nexport function __classPrivateFieldIn(state, receiver) {\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\n}\n\nexport function __addDisposableResource(env, value, async) {\n if (value !== null && value !== void 0) {\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\n var dispose, inner;\n if (async) {\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\n dispose = value[Symbol.asyncDispose];\n }\n if (dispose === void 0) {\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\n dispose = value[Symbol.dispose];\n if (async) inner = dispose;\n }\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\n env.stack.push({ value: value, dispose: dispose, async: async });\n }\n else if (async) {\n env.stack.push({ async: true });\n }\n return value;\n}\n\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\n var e = new Error(message);\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\n};\n\nexport function __disposeResources(env) {\n function fail(e) {\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\n env.hasError = true;\n }\n function next() {\n while (env.stack.length) {\n var rec = env.stack.pop();\n try {\n var result = rec.dispose && rec.dispose.call(rec.value);\n if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\n }\n catch (e) {\n fail(e);\n }\n }\n if (env.hasError) throw env.error;\n }\n return next();\n}\n\nexport default {\n __extends,\n __assign,\n __rest,\n __decorate,\n __param,\n __metadata,\n __awaiter,\n __generator,\n __createBinding,\n __exportStar,\n __values,\n __read,\n __spread,\n __spreadArrays,\n __spreadArray,\n __await,\n __asyncGenerator,\n __asyncDelegator,\n __asyncValues,\n __makeTemplateObject,\n __importStar,\n __importDefault,\n __classPrivateFieldGet,\n __classPrivateFieldSet,\n __classPrivateFieldIn,\n __addDisposableResource,\n __disposeResources,\n};\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.f = {};\n// This file contains only the entry chunk.\n// The chunk loading function for additional chunks\n__webpack_require__.e = (chunkId) => {\n\treturn Promise.all(Object.keys(__webpack_require__.f).reduce((promises, key) => {\n\t\t__webpack_require__.f[key](chunkId, promises);\n\t\treturn promises;\n\t}, []));\n};","// This function allow to reference async chunks\n__webpack_require__.u = (chunkId) => {\n\t// return url for filenames based on template\n\treturn \"\" + {\"160\":\"FluidDocumentServiceFactoryContainer\",\"482\":\"FluidFramework-HashFallback\",\"634\":\"MockComponent\",\"873\":\"officeFluidOneDsSink\",\"941\":\"AshaUtils\"}[chunkId] + \".js\";\n};","// This function allow to reference async chunks\n__webpack_require__.miniCssF = (chunkId) => {\n\t// return url for filenames based on template\n\treturn undefined;\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","var scriptUrl;\nif (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + \"\";\nvar document = __webpack_require__.g.document;\nif (!scriptUrl && document) {\n\tif (document.currentScript)\n\t\tscriptUrl = document.currentScript.src;\n\tif (!scriptUrl) {\n\t\tvar scripts = document.getElementsByTagName(\"script\");\n\t\tif(scripts.length) {\n\t\t\tvar i = scripts.length - 1;\n\t\t\twhile (i > -1 && (!scriptUrl || !/^http(s?):/.test(scriptUrl))) scriptUrl = scripts[i--].src;\n\t\t}\n\t}\n}\n// When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration\n// or pass an empty string (\"\") and set the __webpack_public_path__ variable from your code to use your own logic.\nif (!scriptUrl) throw new Error(\"Automatic publicPath is not supported in this browser\");\nscriptUrl = scriptUrl.replace(/#.*$/, \"\").replace(/\\?.*$/, \"\").replace(/\\/[^\\/]+$/, \"/\");\n__webpack_require__.p = scriptUrl;","// no baseURI\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t57: 0\n};\n\n__webpack_require__.f.j = (chunkId, promises) => {\n\t\t// JSONP chunk loading for javascript\n\t\tvar installedChunkData = __webpack_require__.o(installedChunks, chunkId) ? installedChunks[chunkId] : undefined;\n\t\tif(installedChunkData !== 0) { // 0 means \"already installed\".\n\n\t\t\t// a Promise means \"currently loading\".\n\t\t\tif(installedChunkData) {\n\t\t\t\tpromises.push(installedChunkData[2]);\n\t\t\t} else {\n\t\t\t\tif(true) { // all chunks have JS\n\t\t\t\t\t// setup Promise in chunk cache\n\t\t\t\t\tvar promise = new Promise((resolve, reject) => (installedChunkData = installedChunks[chunkId] = [resolve, reject]));\n\t\t\t\t\tpromises.push(installedChunkData[2] = promise);\n\n\t\t\t\t\t// start chunk loading\n\t\t\t\t\tvar url = __webpack_require__.p + __webpack_require__.u(chunkId);\n\t\t\t\t\t// create error before stack unwound to get useful stacktrace later\n\t\t\t\t\tvar error = new Error();\n\t\t\t\t\tvar loadingEnded = (event) => {\n\t\t\t\t\t\tif(__webpack_require__.o(installedChunks, chunkId)) {\n\t\t\t\t\t\t\tinstalledChunkData = installedChunks[chunkId];\n\t\t\t\t\t\t\tif(installedChunkData !== 0) installedChunks[chunkId] = undefined;\n\t\t\t\t\t\t\tif(installedChunkData) {\n\t\t\t\t\t\t\t\tvar errorType = event && (event.type === 'load' ? 'missing' : event.type);\n\t\t\t\t\t\t\t\tvar realSrc = event && event.target && event.target.src;\n\t\t\t\t\t\t\t\terror.message = 'Loading chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realSrc + ')';\n\t\t\t\t\t\t\t\terror.name = 'ChunkLoadError';\n\t\t\t\t\t\t\t\terror.type = errorType;\n\t\t\t\t\t\t\t\terror.request = realSrc;\n\t\t\t\t\t\t\t\tinstalledChunkData[1](error);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t\t__webpack_require__.l(url, loadingEnded, \"chunk-\" + chunkId, chunkId);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n};\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n// no on chunks loaded\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = (parentChunkLoadingFunction, data) => {\n\tvar [chunkIds, moreModules, runtime] = data;\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some((id) => (installedChunks[id] !== 0))) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\n}\n\nvar chunkLoadingGlobal = self[\"webpackChunkTypeScriptModule\"] = self[\"webpackChunkTypeScriptModule\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","// This list of locales is based on the supported list of locales from the our localization pipeline.\n// In order to add a new locale to this list we need to make sure it's also enabled in the localization pipeline.\n// https://office.visualstudio.com/OC/_git/office-bohemia?path=%2Fcommon%2Fconfig%2Fazure-pipelines%2FREADME.md&_a=preview&anchor=office-bohemia---localization\nexport const Locale = {\n afZa: 'af-za',\n amEt: 'am-et',\n arSa: 'ar-sa',\n asIn: 'as-in',\n azLatnAz: 'az-latn-az',\n bgBg: 'bg-bg',\n bnIn: 'bn-in',\n bsLatnBa: 'bs-latn-ba',\n caEs: 'ca-es',\n caEsValencia: 'ca-es-valencia',\n csCz: 'cs-cz',\n cyGb: 'cy-gb',\n daDk: 'da-dk',\n deDe: 'de-de',\n elGr: 'el-gr',\n enGb: 'en-gb',\n enUs: 'en-us',\n esEs: 'es-es',\n esMx: 'es-mx',\n etEe: 'et-ee',\n euEs: 'eu-es',\n faIr: 'fa-ir',\n fiFi: 'fi-fi',\n filPh: 'fil-ph',\n frCa: 'fr-ca',\n frFr: 'fr-fr',\n gaIe: 'ga-ie',\n gdGb: 'gd-gb',\n glEs: 'gl-es',\n guIn: 'gu-in',\n heIl: 'he-il',\n hiIn: 'hi-in',\n hrHr: 'hr-hr',\n huHu: 'hu-hu',\n hyAm: 'hy-am',\n idId: 'id-id',\n isIs: 'is-is',\n itIt: 'it-it',\n jaJp: 'ja-jp',\n kaGe: 'ka-ge',\n kkKz: 'kk-kz',\n kmKh: 'km-kh',\n knIn: 'kn-in',\n kokIn: 'kok-in',\n koKr: 'ko-kr',\n lbLu: 'lb-lu',\n loLa: 'lo-la',\n ltLt: 'lt-lt',\n lvLv: 'lv-lv',\n miNz: 'mi-nz',\n mkMk: 'mk-mk',\n mlIn: 'ml-in',\n mrIn: 'mr-in',\n msMy: 'ms-my',\n mtMt: 'mt-mt',\n nbNo: 'nb-no',\n neNp: 'ne-np',\n nlNl: 'nl-nl',\n nnNo: 'nn-no',\n orIn: 'or-in',\n paIn: 'pa-in',\n plPl: 'pl-pl',\n ptBr: 'pt-br',\n ptPt: 'pt-pt',\n quzPe: 'quz-pe',\n roRo: 'ro-ro',\n ruRu: 'ru-ru',\n skSk: 'sk-sk',\n slSi: 'sl-si',\n sqAl: 'sq-al',\n srCyrlBa: 'sr-cyrl-ba',\n srCyrlRs: 'sr-cyrl-rs',\n srLatnRs: 'sr-latn-rs',\n svSe: 'sv-se',\n taIn: 'ta-in',\n teIn: 'te-in',\n thTh: 'th-th',\n trTr: 'tr-tr',\n ttRu: 'tt-ru',\n ugCn: 'ug-cn',\n ukUa: 'uk-ua',\n urPk: 'ur-pk',\n viVn: 'vi-vn',\n zhCn: 'zh-cn',\n zhTw: 'zh-tw'\n};\n// Mapping from locales that we don't support to locales that we do support.\n// https://microsoft.sharepoint.com/sites/globalreadiness/SitePages/Language-fallback.aspx\nconst secondaryLocales = {\n af: Locale.afZa,\n am: Locale.amEt,\n ar: Locale.arSa,\n as: Locale.asIn,\n az: Locale.azLatnAz,\n bg: Locale.bgBg,\n bn: Locale.enGb,\n bs: Locale.bsLatnBa,\n 'bs-cyrl-ba': Locale.enGb,\n ca: Locale.caEs,\n cs: Locale.csCz,\n cy: Locale.cyGb,\n da: Locale.daDk,\n de: Locale.deDe,\n el: Locale.elGr,\n 'el-cy': Locale.enGb,\n en: Locale.enUs,\n es: Locale.esEs,\n et: Locale.etEe,\n eu: Locale.euEs,\n fa: Locale.faIr,\n fi: Locale.fiFi,\n fil: Locale.filPh,\n fr: Locale.frFr,\n ga: Locale.gaIe,\n gd: Locale.gdGb,\n gl: Locale.glEs,\n gu: Locale.guIn,\n he: Locale.heIl,\n hi: Locale.hiIn,\n hr: Locale.hrHr,\n hu: Locale.huHu,\n hy: Locale.hyAm,\n id: Locale.idId,\n is: Locale.isIs,\n it: Locale.itIt,\n iw: Locale.heIl,\n 'iw-il': Locale.heIl,\n ja: Locale.jaJp,\n ka: Locale.kaGe,\n kk: Locale.kkKz,\n km: Locale.kmKh,\n kn: Locale.knIn,\n ko: Locale.koKr,\n kok: Locale.kokIn,\n lb: Locale.lbLu,\n lo: Locale.loLa,\n lt: Locale.ltLt,\n lv: Locale.lvLv,\n mi: Locale.miNz,\n mk: Locale.mkMk,\n ml: Locale.mlIn,\n mr: Locale.mrIn,\n ms: Locale.msMy,\n mt: Locale.mtMt,\n nb: Locale.nbNo,\n ne: Locale.neNp,\n nl: Locale.nlNl,\n nn: Locale.nnNo,\n or: Locale.orIn,\n pa: Locale.paIn,\n pl: Locale.plPl,\n pt: Locale.ptBr,\n quz: Locale.quzPe,\n ro: Locale.roRo,\n ru: Locale.ruRu,\n sk: Locale.skSk,\n sl: Locale.slSi,\n sq: Locale.sqAl,\n sv: Locale.svSe,\n ta: Locale.taIn,\n te: Locale.teIn,\n th: Locale.thTh,\n tr: Locale.trTr,\n 'tr-cy': Locale.enGb,\n tt: Locale.ttRu,\n ug: Locale.ugCn,\n uk: Locale.ukUa,\n ur: Locale.urPk,\n uz: Locale.enUs,\n vi: Locale.viVn,\n zh: Locale.enUs,\n 'zh-hans-tw': Locale.zhTw\n};\n/**\n * Default locale used across the office-bohemia repo.\n */ export const defaultLocale = Locale.enUs;\nconst languageIdRegExp = /^([^-]+)-.+/;\n/**\n * Asserts a given string matches the known and supported locales\n * @param inputLocale locale identifier\n */ export function isLocale(inputLocale) {\n if (inputLocale === undefined || inputLocale === null) {\n return false;\n }\n const lowerCaseInputLocale = inputLocale.toLowerCase();\n return(// Exception added when eslint rule was added, this should be revisited when modifying this code\n Object.values(Locale).includes(lowerCaseInputLocale) || secondaryLocales[lowerCaseInputLocale] !== undefined);\n}\n/**\n * Resolve the locale from the list of allowed locales, falls back to the default locale on failure.\n */ export function resolveLocale(inputLocale) {\n if (inputLocale === undefined || inputLocale === null) {\n return defaultLocale;\n }\n const lowerCaseInputLocale = inputLocale.toLowerCase();\n if (Object.values(Locale).includes(lowerCaseInputLocale)) {\n // This is a locale that we support.\n return lowerCaseInputLocale;\n }\n const secondaryLowerCaseInputLocale = secondaryLocales[lowerCaseInputLocale];\n if (secondaryLowerCaseInputLocale !== undefined) {\n // We don't support the locale but we support a valid backup.\n return secondaryLowerCaseInputLocale;\n }\n const resolvedLanguageId = resolveLanguageId(lowerCaseInputLocale);\n if (resolvedLanguageId !== undefined) {\n const secondaryResolvedLanguageLocale = secondaryLocales[resolvedLanguageId];\n if (secondaryResolvedLanguageLocale !== undefined) {\n // We don't support the locale but we support a valid backup based on the language id.\n return secondaryResolvedLanguageLocale;\n }\n }\n return defaultLocale;\n}\n/**\n * Resolves the language id from a given locale string, whenever possible.\n * Example: resolveLanguageId('en-us') resolves to 'en'\n */ export function resolveLanguageId(localeString) {\n const possibleLanguageIdResults = languageIdRegExp.exec(localeString.trim().toLowerCase());\n if (possibleLanguageIdResults !== null && possibleLanguageIdResults.length > 1) {\n return possibleLanguageIdResults[1];\n }\n return undefined;\n}\n\n//# sourceMappingURL=Locale.js.map","export const MicrosoftTenantId = '72f988bf-86f1-41af-91ab-2d7cd011db47';\nexport const MsaTenantId = '9188040d-6c67-4c5b-b112-36a304b66dad';\n/**\n * These tenants have been onboarded in Private Preview and we want to ensure that they don't lose access when we roll out OCPS.\n */ export const ocpsTenantAllowList = new Set([\n MicrosoftTenantId,\n '0000',\n 'f34444e5-e35c-4ceb-8a8b-7a0042451ccc',\n '0a54704d-bba9-4e27-878e-fe460a591835',\n 'de21c301-a4ae-4292-aa09-6db710a590a6',\n '49b6f6cd-6628-4bd2-8753-4d8c8a68fa04',\n 'fabbafd6-0003-4695-ada4-929dea5a0d36',\n '5b73a072-2f1f-46ad-92ca-a9b3993e45aa',\n 'd4093791-9818-48dc-8880-35d134b8c79d',\n '0d746a1c-f9a6-47a3-9d3a-4f3f1a79c0f6',\n '13c6a44d-9b52-4b9e-aa34-0513ee7131f2',\n '1f855c63-5a0d-47be-8300-914123519d11',\n '21a4f3dd-ef15-47a5-bc51-1a31b80765be',\n '26ed3691-0678-440d-9bc4-134f94a1beb1',\n '35e07416-9027-4637-ae4d-72159981338a',\n '3cbebbae-5ae7-4090-9654-f2df09940424',\n '40ed3d74-3c8c-4399-866e-d1f7a95bb051',\n '45c54e3f-1b2a-4a84-a2f5-5d5e86845726',\n '4ad43d82-3f33-47ee-b8a0-273939d4570a',\n '55ccf089-0e94-4a28-85df-629d0b273be1',\n '6f6da031-e5cf-4e62-82cd-96636e80639e',\n '73561903-7c11-4927-809d-b9a31fda7d61',\n '78375574-4a4c-41a5-8b31-72e0374aa242',\n '9188040d-6c67-4c5b-b112-36a304b66dad',\n 'a0effc3b-4ee4-4a46-9dcc-89fd35b439f6',\n 'af33e969-0b64-4c2d-bad6-329f25f2d990',\n 'b00367e2-193a-4f48-94de-7245d45c0947',\n 'b48595ab-4114-4783-883d-41872f68adfb',\n 'b68a597d-37e2-4254-a203-5fd9602367ee',\n 'c00cdc1a-23ab-45df-8a48-1f8d96fa2fab',\n 'c51071fb-f559-4967-ac4f-63ee879ca4ec',\n 'e1a132a4-2f3d-4ef5-9b14-2d4e94833544',\n 'e58c8e81-abd8-48a8-929d-eb67611b83bd',\n 'e73ba7cf-4e1b-40f5-805e-c3aae41e1b90',\n 'fc3fd415-e428-4884-bf6f-62c2e70a6682',\n '8f474e12-1b0c-463d-a004-edbc2e2c72b0',\n '6583636b-d156-492e-86ce-b8fccb790df1',\n // SDFv2 + SPDF test tenant that is being used by Loop team for testing\n '91b036b7-fff3-4c61-8d5e-dba6d56268bd',\n '7a55eed5-98d0-4f09-bf4e-17768961e804'\n]);\n\n//# sourceMappingURL=KnownTenants.js.map","export class NativeInteropError extends Error {\r\n static readonly E_FAIL = 0x80004005;\r\n\r\n private readonly hresult: number;\r\n\r\n constructor(hresult: number, message?: string) {\r\n super(message);\r\n this.hresult = hresult;\r\n this.name = new.target.prototype.constructor.name;\r\n Object.setPrototypeOf(this, new.target.prototype);\r\n }\r\n\r\n get errorCode() {\r\n return this.hresult;\r\n }\r\n}\r\n\r\nexport class NotImplementedError extends NativeInteropError {\r\n static readonly E_NOTIMPL = 0x80004001;\r\n\r\n constructor(message?: string) {\r\n super(NotImplementedError.E_NOTIMPL, message);\r\n }\r\n}\r\n\r\nexport class InvalidArgumentsError extends NativeInteropError {\r\n static readonly E_INVALIDARG = 0x80070057;\r\n\r\n constructor(message?: string) {\r\n super(InvalidArgumentsError.E_INVALIDARG, message);\r\n }\r\n}\r\n","import { __assign } from \"tslib\";\r\nimport { Activity } from './Contracts';\r\nimport { logNotification } from './OTelNotifications';\r\nimport { cloneEvent } from './SimpleTelemetryLogger';\r\n// Currently we only send one activity at a time\r\nvar ACTIVITY_COUNT = 1;\r\n// Currently we do not aggregate activities in OTelJS\r\nvar ACTIVITY_AGGMODE = 0;\r\nvar getCurrentMicroseconds = function () {\r\n return Date.now() * 1000;\r\n};\r\nif (typeof window === 'object' && typeof window.performance === 'object' && 'now' in window.performance) {\r\n getCurrentMicroseconds = function () {\r\n return Math.floor(window.performance.now()) * 1000;\r\n };\r\n}\r\nexport var createActivity = function (activityProperties) {\r\n var _startTime = getCurrentMicroseconds();\r\n var _ended;\r\n var clonedEvent = cloneEvent(activityProperties.telemetryEvent);\r\n return __assign(__assign({ cv: activityProperties.parentCv.getNext() }, clonedEvent), { \r\n /**\r\n * Creates an activity parented to this one.\r\n * @param telemetryEvent - The underlying telemetry event for this activity\r\n */\r\n createChildActivity: function (telemetryEvent) {\r\n return createActivity({\r\n telemetryEvent: telemetryEvent,\r\n sendTelemetryEvent: activityProperties.sendTelemetryEvent,\r\n parentCv: this.cv\r\n });\r\n }, \r\n /**\r\n * Sets the result of the activity. Does not end it.\r\n * @param resultCode - The result code, e.g. 0 for success\r\n * @param resultType - Optional: The result type, e.g. \"HRESULT\"\r\n * @param resultTag - Optional: The result tag\r\n */\r\n setResult: function (code, type, tag) {\r\n this.result = { code: code, type: type, tag: tag };\r\n }, \r\n /**\r\n * Ends the activity; records the duration and sends a telemetry event.\r\n */\r\n endNow: function () {\r\n var _this = this;\r\n var _a, _b;\r\n if (_ended) {\r\n logNotification(0 /* LogLevel.Error */, 0 /* Category.Core */, function () { return \"'\".concat(_this.eventName, \"' already ended\"); });\r\n return;\r\n }\r\n if (this.success === undefined && this.result === undefined) {\r\n // The Activity dashboard shows these activities as 'unresolved'\r\n // but developers generally should avoid leaving activities in this state.\r\n logNotification(1 /* LogLevel.Warning */, 0 /* Category.Core */, function () { return 'Activity does not have success or result set'; });\r\n }\r\n var endTime = getCurrentMicroseconds();\r\n var duration = endTime - _startTime;\r\n _ended = true;\r\n // Fill the event contract\r\n var activity = {\r\n duration: duration,\r\n count: ACTIVITY_COUNT,\r\n aggMode: ACTIVITY_AGGMODE,\r\n cV: this.cv.value,\r\n success: this.success,\r\n result: this.result\r\n };\r\n var newDataFields = (_b = (_a = this.eventContract) === null || _a === void 0 ? void 0 : _a.dataFields) !== null && _b !== void 0 ? _b : [];\r\n newDataFields.push.apply(newDataFields, Activity.getFields(activity));\r\n this.eventContract = {\r\n name: Activity.contractName,\r\n dataFields: newDataFields\r\n };\r\n return activityProperties.sendTelemetryEvent(this);\r\n } });\r\n};\r\n//# sourceMappingURL=Activity.js.map","// The \"base CV\" has a hash without any child numbers\r\nvar baseCv;\r\n/**\r\n * Implementation of correlation vector\r\n */\r\nvar CV = /** @class */ (function () {\r\n function CV(value) {\r\n this.value = value;\r\n this.nextChild = 0;\r\n }\r\n /**\r\n * The index of the next child\r\n */\r\n CV.prototype.getNext = function () {\r\n return new CV(\"\".concat(this.value, \".\").concat(++this.nextChild));\r\n };\r\n return CV;\r\n}());\r\nexport { CV };\r\n/**\r\n * Gets a base correlation vector for this session\r\n * @returns A base correlation vector, with a value of a 22-character string\r\n */\r\nexport function getBaseCv() {\r\n if (!baseCv) {\r\n var characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';\r\n var hashLength = 22;\r\n var result = [];\r\n for (var i = 0; i < hashLength; i++) {\r\n // (security is not a concern here and secure crypto function is not available on all platform)\r\n // eslint-disable-next-line no-restricted-properties\r\n result.push(characters.charAt(Math.floor(Math.random() * characters.length)));\r\n }\r\n baseCv = new CV(result.join(''));\r\n }\r\n return baseCv;\r\n}\r\n//# sourceMappingURL=CorrelationVector.js.map","import { makeInt64DataField, makeStringDataField } from './DataFieldHelper';\r\nexport var Error = {\r\n /**\r\n * Gets data fields for the Error Contract\r\n * @param contract - The object containing data fields pertaining to the Error Contract\r\n */\r\n getFields: function (contract) {\r\n var instanceName = 'Error';\r\n var dataFields = [];\r\n dataFields.push(makeStringDataField(\"\".concat(instanceName, \".ErrorGroup\"), contract.errorGroup));\r\n dataFields.push(makeInt64DataField(\"\".concat(instanceName, \".Tag\"), contract.tag));\r\n if (contract.code !== undefined) {\r\n dataFields.push(makeInt64DataField(\"\".concat(instanceName, \".Code\"), contract.code));\r\n }\r\n if (contract.id !== undefined) {\r\n dataFields.push(makeInt64DataField(\"\".concat(instanceName, \".Id\"), contract.id));\r\n }\r\n if (contract.count !== undefined) {\r\n dataFields.push(makeInt64DataField(\"\".concat(instanceName, \".Count\"), contract.count));\r\n }\r\n return dataFields;\r\n }\r\n}; // Error\r\n//# sourceMappingURL=InternalContracts.js.map","import { __extends } from \"tslib\";\r\nimport { SimpleTelemetryLogger } from './SimpleTelemetryLogger';\r\nimport { createActivity } from './Activity';\r\nimport { Error } from './InternalContracts';\r\nimport { Activity } from './Contracts';\r\nimport { getBaseCv } from './CorrelationVector';\r\n/**\r\n * A TelemetryLogger that includes more advanced functions than the SimpleTelemetryLogger,\r\n * specifically activities and errors.\r\n */\r\nvar TelemetryLogger = /** @class */ (function (_super) {\r\n __extends(TelemetryLogger, _super);\r\n function TelemetryLogger(parent, persistentDataFields, config) {\r\n var _this = _super.call(this, parent, persistentDataFields, config) || this;\r\n _this.baseCv = getBaseCv();\r\n return _this;\r\n }\r\n /**\r\n * Creates a new activity. The caller is responsible for setting the result and calling endNow.\r\n * @param telemetryEvent - The underlying telemetry event for this activity\r\n */\r\n TelemetryLogger.prototype.createActivity = function (telemetryEvent) {\r\n return createActivity({\r\n sendTelemetryEvent: this.sendTelemetryEvent.bind(this),\r\n telemetryEvent: telemetryEvent,\r\n parentCv: this.baseCv\r\n });\r\n };\r\n /**\r\n * Advanced usage: Sends an activity. The caller is responsible for setting all of the activity parameters.\r\n * @param activityName - The name of the activity\r\n * @param activity - The activity contract\r\n * @param dataFields - Optional additional data fields\r\n * @param eventFlags - Event flags\r\n */\r\n TelemetryLogger.prototype.sendActivity = function (activityName, activity, dataFields, eventFlags) {\r\n return this.sendTelemetryEvent({\r\n eventName: activityName,\r\n eventContract: {\r\n name: Activity.contractName,\r\n dataFields: Activity.getFields(activity)\r\n },\r\n dataFields: dataFields,\r\n eventFlags: eventFlags\r\n });\r\n };\r\n /**\r\n * Sends an event with the Error data contract. A convenience wrapper around sendTelemetryEvent, with\r\n * an Error as a data field.\r\n * @param error - an ErrorEvent that represents the error\r\n */\r\n TelemetryLogger.prototype.sendError = function (error) {\r\n var dataFields = Error.getFields(error.error);\r\n if (error.dataFields != null) {\r\n dataFields.push.apply(dataFields, error.dataFields);\r\n }\r\n return this.sendTelemetryEvent({\r\n eventName: error.eventName,\r\n dataFields: dataFields,\r\n eventFlags: error.eventFlags\r\n });\r\n };\r\n /**\r\n * Creates a customer content activity, which should be ended by the caller by calling endNow().\r\n * @param telemetryEvent - the underlying telemetry event for the activity\r\n * @param customerContentType - the type of the customer content\r\n */\r\n TelemetryLogger.prototype.createCustomerContentActivity = function (customerContentEvent) {\r\n return createActivity({\r\n sendTelemetryEvent: this.sendCustomerContent.bind(this),\r\n telemetryEvent: customerContentEvent,\r\n parentCv: this.baseCv\r\n });\r\n };\r\n return TelemetryLogger;\r\n}(SimpleTelemetryLogger));\r\nexport { TelemetryLogger };\r\n//# sourceMappingURL=TelemetryLogger.js.map","/**\r\n * This file contains the same enums as DataModels.ts, but declared as objects\r\n * These objects should only be used by consumers who cannot use const enums for whatever reason\r\n * Typically, users may encounter issues if they use ts-jest and isolatedModules.\r\n * Avoiding these EnumObjects saves 1.5KB in package size\r\n */\r\n// eslint-disable-next-line @typescript-eslint/no-namespace\r\nexport var EnumObjects;\r\n(function (EnumObjects) {\r\n EnumObjects.DataClassification = {\r\n EssentialServiceMetadata: (1 << 0),\r\n AccountData: (1 << 1),\r\n SystemMetadata: (1 << 2),\r\n OrganizationIdentifiableInformation: (1 << 3),\r\n EndUserIdentifiableInformation: (1 << 4),\r\n CustomerContent: (1 << 5),\r\n AccessControl: (1 << 6),\r\n PublicNonPersonalData: (1 << 7),\r\n EndUserPseudonymousInformation: (1 << 8),\r\n PublicPersonalData: (1 << 9),\r\n SupportData: (1 << 10),\r\n DirectMeasurementData: (1 << 11),\r\n Everything: 0xffff\r\n };\r\n EnumObjects.DataFieldType = {\r\n // eslint-disable-next-line id-denylist\r\n String: 0,\r\n // eslint-disable-next-line id-denylist\r\n Boolean: 1,\r\n Int64: 2,\r\n Double: 3,\r\n Guid: 4\r\n };\r\n EnumObjects.SamplingPolicy = {\r\n NotSet: 0,\r\n Measure: 1,\r\n Diagnostics: 2,\r\n CriticalBusinessImpact: 191,\r\n CriticalCensus: 192,\r\n CriticalExperimentation: 193,\r\n CriticalUsage: 194\r\n };\r\n EnumObjects.PersistencePriority = {\r\n NotSet: 0,\r\n Normal: 1,\r\n High: 2\r\n };\r\n EnumObjects.CostPriority = {\r\n NotSet: 0,\r\n Normal: 1,\r\n High: 2\r\n };\r\n EnumObjects.DataCategories = {\r\n NotSet: 0x00,\r\n SoftwareSetup: 0x01,\r\n ProductServiceUsage: 0x02,\r\n ProductServicePerformance: 0x04,\r\n DeviceConfiguration: 0x08,\r\n InkingTypingSpeech: 0x10\r\n };\r\n EnumObjects.DiagnosticLevel = {\r\n ReservedDoNotUse: 0,\r\n Required: 10,\r\n BasicEvent: 10,\r\n Optional: 100,\r\n FullEvent: 100,\r\n RequiredServiceData: 110,\r\n NecessaryServiceDataEvent: 110,\r\n RequiredServiceDataForEssentialServices: 120,\r\n AlwaysOnNecessaryServiceDataEvent: 120\r\n };\r\n EnumObjects.DnmInterval = {\r\n Hourly: 1,\r\n Daily: 2\r\n };\r\n EnumObjects.AllowedPartA = {\r\n ReleaseAudienceGroup: 1,\r\n WacRing: 2,\r\n AppName: 3,\r\n AppPlatform: 4,\r\n AppVersion: 5\r\n };\r\n EnumObjects.CustomerContentType = {\r\n None: 0x0,\r\n MocaAddIn: 0x1\r\n };\r\n EnumObjects.LogLevel = {\r\n Error: 0,\r\n Warning: 1,\r\n Info: 2,\r\n Verbose: 3\r\n };\r\n EnumObjects.Category = {\r\n Core: 0,\r\n Sink: 1,\r\n Transport: 2\r\n };\r\n EnumObjects.PrimaryIdentitySpace = {\r\n UserObjectId: 'UserObjectId',\r\n MSACID: 'MSACID',\r\n /**\r\n * @deprecated - Use OrgIdPUID instead\r\n */\r\n OrgIdPuid: 'OrgIdPuid',\r\n OrgIdPUID: 'OrgIdPUID',\r\n OrgIdCID: 'OrgIdCID',\r\n /**\r\n * @deprecated - Use MSAPUID instead\r\n */\r\n MsaPuid: 'MsaPuid',\r\n MSAPUID: 'MSAPUID',\r\n WopiAuth: 'WopiAuth',\r\n ThirdParty: 'ThirdParty',\r\n Other: 'Other'\r\n };\r\n EnumObjects.AudienceGroup = {\r\n Automation: 'Automation',\r\n Dogfood: 'Dogfood',\r\n Microsoft: 'Microsoft',\r\n Insiders: 'Insiders',\r\n Production: 'Production'\r\n };\r\n})(EnumObjects || (EnumObjects = {}));\r\n//# sourceMappingURL=EnumObjects.js.map","import type { EventFlags } from '@microsoft/oteljs';\r\nimport { EnumObjects } from '@microsoft/oteljs';\r\n\r\nconst {\r\n DataCategories,\r\n DiagnosticLevel,\r\n} = EnumObjects;\r\n\r\nconst defaultEventFlags = {\r\n dataCategories: DataCategories.ProductServiceUsage,\r\n diagnosticLevel: DiagnosticLevel.Optional,\r\n};\r\nconst AuthEventFlags = {\r\n GetBizChatToken: defaultEventFlags,\r\n InitialBizChatTokenAcquired: defaultEventFlags,\r\n InitialTokenAcquired: defaultEventFlags,\r\n} as const satisfies Record;\r\n\r\n// Sort flags alphabetically\r\n\r\nconst ErrorEventFlags = {\r\n ApiBridgeError: defaultEventFlags,\r\n AuthError: defaultEventFlags,\r\n AppInitError: defaultEventFlags,\r\n BizChatAuthError: defaultEventFlags,\r\n CdnCodeLoaderPreCacheError: defaultEventFlags,\r\n ComponentDataWorkspaceListChangedEventError: defaultEventFlags,\r\n ComponentNavigationEventError: defaultEventFlags,\r\n DataActionError: defaultEventFlags,\r\n M365ChatSettingsProviderError: defaultEventFlags,\r\n FeatureGatesError: defaultEventFlags,\r\n NativeEventHandlerError: defaultEventFlags,\r\n NavigateToLinkError: defaultEventFlags,\r\n NavigateToSearchResultError: defaultEventFlags,\r\n NotifyClientError: defaultEventFlags,\r\n UnhandledConfigError: defaultEventFlags,\r\n WorkspaceManagerError: defaultEventFlags,\r\n} as const satisfies Record;\r\n\r\nconst LoopEventFlags = {\r\n GetLoopView: defaultEventFlags,\r\n LoadLoopComponent: defaultEventFlags,\r\n LoadLoopWorkspaceComponent: defaultEventFlags,\r\n LoadLoopWorkspaceEndToEnd: defaultEventFlags,\r\n PreCacheCodeLoader: defaultEventFlags,\r\n RenderLoopComponent: defaultEventFlags,\r\n} as const satisfies Record;\r\n\r\nconst M365ChatSettingsProviderEventFlags = {\r\n GetAllCachedEcsResponses: defaultEventFlags,\r\n M365ECSChatVersion: defaultEventFlags,\r\n PopulateUserEligibilityInformation: defaultEventFlags,\r\n UserEligibilityServiceAPICall: defaultEventFlags,\r\n} as const satisfies Record;\r\n\r\nconst NavigationEventFlags = {\r\n NavigateTo: defaultEventFlags,\r\n NavigateToLink: defaultEventFlags,\r\n NavigateToSearchResult: defaultEventFlags,\r\n} as const satisfies Record;\r\n\r\nconst WorkSpaceManagerEventFlags = {\r\n GetRecentPages: defaultEventFlags,\r\n GetWorkspaceForPage: defaultEventFlags,\r\n GetWorkspaces: defaultEventFlags,\r\n} as const satisfies Record;\r\n\r\nexport const eventFlags = {\r\n ...AuthEventFlags,\r\n ...ErrorEventFlags,\r\n ...LoopEventFlags,\r\n ...M365ChatSettingsProviderEventFlags,\r\n ...NavigationEventFlags,\r\n ...WorkSpaceManagerEventFlags,\r\n} as const satisfies Record;\r\n\r\nexport declare type EventName = keyof typeof eventFlags;\r\n","import type { EventName } from './Events';\r\n\r\nexport enum TelemetryEventType {\r\n Error = 'Error',\r\n Latency = 'Latency',\r\n Warning = 'Warning',\r\n Info = 'Info'\r\n}\r\n\r\nexport declare type TelemetryEventDataTypes = boolean | number | string;\r\nexport declare type TelemetryEventData = {\r\n [key: string]: TelemetryEventDataTypes;\r\n};\r\n\r\n/**\r\n * Interface to log events and errors to Telemetry.\r\n */\r\nexport interface ITelemetryLogger {\r\n logEvent: (\r\n eventName: EventName,\r\n data?: TelemetryEventData\r\n ) => void;\r\n\r\n logError: (\r\n eventName: EventName,\r\n error: Error | unknown,\r\n data?: TelemetryEventData\r\n ) => void;\r\n}\r\n","import { TelemetryLogger } from '../telemetry/TelemetryLogger';\r\n\r\nexport type FeatureName = keyof typeof featureGateNames;\r\nexport type ChangeGateName = keyof typeof changeGateNames;\r\nconst featureGateNames =\r\n {\r\n 'example': 'Microsoft.Office.OneNote.fa000000174.example',\r\n 'useL2NavRefresh': 'Microsoft.Office.OneNote.fa000000174.useL2NavRefresh',\r\n 'allowLoopAudienceOverride': 'Microsoft.Office.OneNote.fa000000174.AllowLoopAudienceOverride',\r\n // add more feature gates here in alphabetical order of key\r\n };\r\nconst changeGateNames = {\r\n 'useM365ChatSettingsProvider': 'Microsoft.Office.OneNote.fa000000174.UseM365ChatSettingsProvider',\r\n 'useOfficeTelemetrySinkBatching': 'Microsoft.Office.OneNote.fa000000174.UseOfficeTelemetrySinkBatching',\r\n // add more change gates here in alphabetical order of key\r\n};\r\n// Usage example:\r\n// import { featureGates } from '../utils/FeatureGates';\r\n// const isFeatureEnabled = featureGates.getBooleanFeatureGate('example', false);\r\nexport const featureGates = {\r\n getBooleanFeatureGate: (featureName: FeatureName, defaultValue: boolean) => {\r\n try {\r\n const featureGateName = featureGateNames[featureName];\r\n return OfficeRuntime.experimentation.getBooleanFeatureGate(featureGateName, defaultValue);\r\n } catch (e) {\r\n TelemetryLogger.Instance.logError('FeatureGatesError', e, { ErrorMethod: 'getBooleanFeatureGate' });\r\n console.error('Error getting feature gate', e);\r\n return defaultValue;\r\n }\r\n },\r\n getIntFeatureGate: (featureName: FeatureName, defaultValue: number) => {\r\n try {\r\n const featureGateName = featureGateNames[featureName];\r\n return OfficeRuntime.experimentation.getIntFeatureGate(featureGateName, defaultValue);\r\n } catch (e) {\r\n TelemetryLogger.Instance.logError('FeatureGatesError', e, { ErrorMethod: 'getIntFeatureGate' });\r\n console.error('Error getting feature gate', e);\r\n return defaultValue;\r\n }\r\n },\r\n getStringFeatureGate: (featureName: FeatureName, defaultValue: string) => {\r\n try {\r\n const featureGateName = featureGateNames[featureName];\r\n return OfficeRuntime.experimentation.getStringFeatureGate(featureGateName, defaultValue);\r\n } catch (e) {\r\n TelemetryLogger.Instance.logError('FeatureGatesError', e, { ErrorMethod: 'getStringFeatureGate' });\r\n console.error('Error getting feature gate', e);\r\n return defaultValue;\r\n }\r\n },\r\n\r\n};\r\n\r\nexport const changeGates = {\r\n getBooleanChangeGate: (changeGateName: ChangeGateName) => {\r\n try {\r\n return OfficeRuntime.experimentation.getBooleanFeatureGate(changeGateNames[changeGateName], true);\r\n } catch (e) {\r\n TelemetryLogger.Instance.logError('FeatureGatesError', e, { ErrorMethod: 'getBooleanChangeGate' });\r\n console.error('Error getting change gate', e);\r\n return true;\r\n }\r\n }\r\n};\r\n\r\n// eslint-disable-next-line @typescript-eslint/no-namespace\r\nexport declare namespace OfficeRuntime {\r\n // eslint-disable-next-line @typescript-eslint/no-namespace\r\n namespace experimentation {\r\n function getBooleanFeatureGate(flight: string, defaultValue?: boolean): boolean;\r\n function getIntFeatureGate(flight: string, defaultValue?: number): number;\r\n function getStringFeatureGate(flight: string, defaultValue?: string): string;\r\n }\r\n}\r\n","import type {\r\n EventType,\r\n FilledCustomerContentEvent,\r\n FilledTelemetryEvent,\r\n TelemetrySink,\r\n} from '@microsoft/oteljs';\r\nimport { changeGates } from '../utils/FeatureGates';\r\n\r\nexport class OfficeTelemetrySinkWrapper implements TelemetrySink {\r\n public static readonly PROCESSING_QUEUE_INTERVAL = 1000;\r\n public static readonly MAX_EVENTS_PER_INTERVAL = 5;\r\n\r\n private static _instance: OfficeTelemetrySinkWrapper;\r\n private _telemetryQueue: {\r\n FilledTelemetryEvent: FilledTelemetryEvent;\r\n timestamp?: number;\r\n }[] = [];\r\n private _processingQueue = false;\r\n private _startProcessingQueueTimer: NodeJS.Timeout | undefined;\r\n\r\n public static get Instance(): OfficeTelemetrySinkWrapper {\r\n if (!OfficeTelemetrySinkWrapper._instance) {\r\n OfficeTelemetrySinkWrapper._instance = new OfficeTelemetrySinkWrapper();\r\n }\r\n return OfficeTelemetrySinkWrapper._instance;\r\n }\r\n\r\n /**\r\n * Send a telemetry event to the telemetry sink\r\n * Add the event to the queue and process the queue in intervals of 1 second\r\n * @param telemetryEvent The telemetry event to send\r\n * @param timestamp The timestamp of the event\r\n */\r\n sendTelemetryEvent(\r\n telemetryEvent: FilledTelemetryEvent,\r\n timestamp?: number,\r\n ): void {\r\n if (!changeGates.getBooleanChangeGate('useOfficeTelemetrySinkBatching')) {\r\n Office.telemetrySink.sendTelemetryEvent(telemetryEvent, timestamp);\r\n return;\r\n }\r\n\r\n this._telemetryQueue.push({\r\n FilledTelemetryEvent: telemetryEvent,\r\n timestamp: timestamp,\r\n });\r\n\r\n if (this._processingQueue) {\r\n return;\r\n }\r\n\r\n if (!this._startProcessingQueueTimer) {\r\n this._startProcessingQueueTimer = setTimeout(() => {\r\n this._processingQueue = true;\r\n this._startProcessingQueueTimer = undefined;\r\n void this.processQueue();\r\n }, OfficeTelemetrySinkWrapper.PROCESSING_QUEUE_INTERVAL);\r\n }\r\n }\r\n\r\n sendCustomerContent?(customerContentEvent: FilledCustomerContentEvent): void {\r\n Office.telemetrySink.sendCustomerContent(customerContentEvent);\r\n }\r\n sendNonStandardEvent?(\r\n telemetryEvent: FilledTelemetryEvent,\r\n eventType: EventType,\r\n ): void {\r\n Office.telemetrySink.sendNonStandardEvent(telemetryEvent, eventType);\r\n }\r\n\r\n /**\r\n * Process the telemetry queue\r\n * Sends the events in the queue to the Office telemetry sink 5 events at a time\r\n * Waits for 1 second after sending 5 events\r\n * This is to avoid sending too many events in a short period of time\r\n */\r\n private async processQueue(): Promise {\r\n while (this._telemetryQueue.length > 0) {\r\n for (let count = 0; count < OfficeTelemetrySinkWrapper.MAX_EVENTS_PER_INTERVAL; count++) {\r\n const telemetryEvent = this._telemetryQueue.shift();\r\n if (telemetryEvent) {\r\n Office.telemetrySink.sendTelemetryEvent(\r\n telemetryEvent.FilledTelemetryEvent,\r\n telemetryEvent.timestamp,\r\n );\r\n }\r\n }\r\n if (this._telemetryQueue.length > 0) {\r\n // Wait before processing the next batch of events\r\n await new Promise(resolve =>\r\n setTimeout(\r\n resolve,\r\n OfficeTelemetrySinkWrapper.PROCESSING_QUEUE_INTERVAL,\r\n ),);\r\n }\r\n }\r\n this._processingQueue = false;\r\n }\r\n}\r\n","import type { DataField } from '@microsoft/oteljs';\r\nimport * as OTel from '@microsoft/oteljs';\r\nimport type { EventName } from './Events';\r\nimport { eventFlags } from './Events';\r\nimport type {\r\n ITelemetryLogger,\r\n TelemetryEventData,\r\n} from './ITelemetryLogger';\r\nimport { TelemetryEventType } from './ITelemetryLogger';\r\nimport { OfficeTelemetrySinkWrapper } from './OfficeTelemetrySinkWrapper';\r\n\r\nconst isDev = __IS_DEV__ !== undefined && __IS_DEV__ === true;\r\nexport class TelemetryLogger implements ITelemetryLogger {\r\n // this token is for the Office OneNote tenant\r\n // already used in /sdx/start/packages/onenotebackend/src/Telemetry/utils.ts & /sdx/meetingdetails/packages/onenotebackend/src/logging/constants.ts\r\n private static readonly AriaTenantToken = '3de38b41008a4da5a5381ef307f91597-636c040a-3c10-4912-9e28-de026a94600f-6848';\r\n private static readonly NexusTenantToken = 1718;\r\n private static readonly Namespace = 'Office.OneNote.SDX.Integrations.HostedWorkspaces';\r\n\r\n private readonly oTelLogger: OTel.TelemetryLogger;\r\n private readonly namespace: string;\r\n private static telemetryLogger: TelemetryLogger;\r\n\r\n constructor() {\r\n const ariaTenantToken = TelemetryLogger.AriaTenantToken;\r\n const nexusTenantToken = TelemetryLogger.NexusTenantToken;\r\n const namespace = TelemetryLogger.Namespace;\r\n\r\n this.oTelLogger = new OTel.TelemetryLogger();\r\n this.namespace = namespace;\r\n\r\n this.oTelLogger.setTenantToken(\r\n `${namespace}`,\r\n ariaTenantToken,\r\n nexusTenantToken\r\n );\r\n\r\n this.oTelLogger.addSink(OfficeTelemetrySinkWrapper.Instance);\r\n }\r\n\r\n public static get Instance(): TelemetryLogger {\r\n if (!TelemetryLogger.telemetryLogger) {\r\n TelemetryLogger.telemetryLogger = new TelemetryLogger();\r\n }\r\n\r\n return TelemetryLogger.telemetryLogger;\r\n }\r\n\r\n public logEvent(\r\n eventName: EventName,\r\n data?: TelemetryEventData\r\n ): void {\r\n // do not log on dev environment\r\n if (isDev) {\r\n return;\r\n }\r\n const flags = eventFlags[eventName];\r\n const telemetryEvent: OTel.TelemetryEvent = {\r\n eventName: `${this.namespace}.${eventName}`,\r\n eventFlags: flags,\r\n dataFields: TelemetryLogger.getDataFields(data),\r\n };\r\n\r\n this.oTelLogger.sendTelemetryEvent(telemetryEvent);\r\n }\r\n\r\n public logError(\r\n eventName: EventName,\r\n error: Error | unknown,\r\n data?: TelemetryEventData\r\n ): void {\r\n // do not log on dev environment\r\n if (isDev) {\r\n return;\r\n }\r\n const flags = eventFlags[eventName];\r\n const dataFields = [\r\n ...TelemetryLogger.getErrorDataFields(error),\r\n ...TelemetryLogger.getDataFields(data),\r\n ];\r\n\r\n const telemetryErrorEvent: OTel.ErrorEvent = {\r\n eventName: `${this.namespace}.${eventName}`,\r\n error: {\r\n errorGroup: TelemetryEventType.Error,\r\n tag: 0,\r\n },\r\n eventFlags: flags,\r\n dataFields: dataFields,\r\n };\r\n\r\n this.oTelLogger.sendError(telemetryErrorEvent);\r\n }\r\n\r\n private static getDataFields(data: TelemetryEventData | undefined): DataField[] {\r\n if (!data) {\r\n return [];\r\n }\r\n\r\n return Object.keys(data ?? {}).map(key => {\r\n const value = data[key];\r\n switch (typeof value) {\r\n case 'number':\r\n return OTel.makeDoubleDataField(key, value);\r\n case 'string':\r\n return OTel.makeStringDataField(key, value);\r\n case 'boolean':\r\n return OTel.makeBooleanDataField(key, value);\r\n default:\r\n return OTel.makeStringDataField(key, value);\r\n }\r\n });\r\n }\r\n\r\n private static getErrorDataFields(error: Error | unknown): DataField[] {\r\n if (typeof error !== 'object' || !error) {\r\n return [];\r\n }\r\n\r\n const dataFields: DataField[] = [];\r\n if (\r\n 'code' in error &&\r\n (typeof error.code === 'string' || typeof error.code === 'number')\r\n ) {\r\n dataFields.push(OTel.makeStringDataField('ErrorCode', `${error.code}`));\r\n }\r\n\r\n if ('message' in error && typeof error.message === 'string') {\r\n dataFields.push(OTel.makeStringDataField('ErrorMessage', error.message));\r\n }\r\n\r\n return dataFields;\r\n }\r\n}\r\n","export declare type PromiseResolvers = {\r\n promise: Promise;\r\n resolve: (value: T | PromiseLike) => void;\r\n reject: (error: unknown) => void;\r\n};\r\n\r\nexport class PromiseCompat {\r\n static withResolvers(): PromiseResolvers {\r\n const PromiseClass = Promise as PromiseConstructor & {\r\n withResolvers?: () => PromiseResolvers;\r\n };\r\n if (typeof PromiseClass.withResolvers === 'function') {\r\n return PromiseClass.withResolvers();\r\n } else {\r\n let resolve: PromiseResolvers['resolve'] = () => void 0;\r\n let reject: PromiseResolvers['reject'] = () => void 0;\r\n const promise = new Promise((res, rej) => {\r\n resolve = res;\r\n reject = rej;\r\n });\r\n return {\r\n promise,\r\n resolve,\r\n reject,\r\n };\r\n }\r\n }\r\n}\r\n","/*\r\n Private API contract:\r\n In SDX when we invoke a private API, we send the following object (serialized) to native:\r\n {\r\n __api: ,\r\n ...,\r\n }\r\n In the native side, this API request is handled by\r\n SmartSectionSDXPrivateApi::HandleMethod\r\n\r\n The above method handles the request and send back the response.\r\n If the method is handled successfully, the response should be like:\r\n {\r\n __error: 0,\r\n ...,\r\n }\r\n or, if there are any errors:\r\n {\r\n __error: ,\r\n }\r\n\r\n In the case when this method is an async method, the API response goes like:\r\n {\r\n __error: 0,\r\n __async: ,\r\n }\r\n where the field `__async` is an operation id.\r\n The native client will raise events sending back the async method result.\r\n In this class, `ApiBridge` we cache a GUID-promise map.\r\n Once such event is raised, we mark the corresponding promise as fulfilled.\r\n\r\n The async result event payload should be like:\r\n {\r\n __type: 'AsyncApiResult',\r\n __apiId: ,\r\n __error: <0 | HRESULT>,\r\n ...,\r\n }\r\n\r\n For a native event, to differentiate it from an async result event,\r\n the payload goes like:\r\n {\r\n __type: 'Event',\r\n __eventName: ,\r\n ...,\r\n }\r\n*/\r\n\r\nimport { TelemetryLogger } from '../telemetry/TelemetryLogger';\r\nimport { PromiseCompat } from '../utils/promise';\r\nimport type {\r\n PrivateApi,\r\n PrivateApiSignatures,\r\n} from './Api';\r\nimport {\r\n InvalidArgumentsError,\r\n NativeInteropError,\r\n NotImplementedError,\r\n} from './Error';\r\n\r\ndeclare type NullaryPrivateApi = keyof {\r\n [\r\n K in PrivateApi as PrivateApiSignatures[K]['args'] extends void\r\n ? K\r\n : never\r\n ]: unknown;\r\n};\r\n\r\ndeclare type NativeEventArgs =\r\n | {\r\n __type: 'AsyncApiResult';\r\n __apiId: string;\r\n __error: number;\r\n }\r\n | {\r\n __type: 'Event';\r\n __eventName: string;\r\n };\r\n\r\ndeclare type DeferredApi = {\r\n api: string;\r\n resolve: (result: T) => void;\r\n reject: (error: unknown) => void;\r\n};\r\n\r\ndeclare type NativeEventHandler = (event: string, args: unknown) => void;\r\n\r\nexport class ApiBridge {\r\n private readonly defers: Record = {};\r\n private readonly results: Record> = {};\r\n private readonly eventHandlers: NativeEventHandler[] = [];\r\n private initialized = false;\r\n private eventRevoker: OfficeFirstParty.PrivateEventRevoker | undefined;\r\n\r\n async initialize() {\r\n if (this.initialized) {\r\n return;\r\n }\r\n this.initialized = true;\r\n\r\n if (window.OfficeFirstParty && OfficeFirstParty.PrivateApi?.onPrivateEvent) {\r\n const onNativeEvent = this.onNativeEvent.bind(this);\r\n\r\n // the promise is rejected with RichApi.Error if the native client\r\n // does not provide an `ISdxPrivateApi` implementation.\r\n try {\r\n const revoker = await OfficeFirstParty.PrivateApi.onPrivateEvent(onNativeEvent);\r\n this.eventRevoker = revoker;\r\n } catch (error) {\r\n this.eventRevoker = undefined;\r\n if (__IS_DEV__) {\r\n throw error;\r\n }\r\n }\r\n }\r\n }\r\n\r\n cleanup() {\r\n if (this.eventRevoker) {\r\n this.eventRevoker();\r\n }\r\n this.eventRevoker = undefined;\r\n }\r\n\r\n registerEvent(handler: NativeEventHandler) {\r\n this.eventHandlers.push(handler);\r\n }\r\n\r\n unregisterEvent(handler: NativeEventHandler) {\r\n const index = this.eventHandlers.indexOf(handler);\r\n if (index >= 0) {\r\n this.eventHandlers.splice(index, 1);\r\n }\r\n }\r\n\r\n private onNativeEvent(eventData: string) {\r\n const event = JSON.parse(eventData) as NativeEventArgs;\r\n if (event.__type === 'AsyncApiResult') {\r\n const {\r\n __type,\r\n __apiId: apiId,\r\n __error: error,\r\n ...ret\r\n } = event;\r\n if (apiId in this.defers) {\r\n const deferred = this.defers[apiId];\r\n delete this.defers[apiId];\r\n if (error !== 0) {\r\n const exception = ApiBridge.createErrorObject(deferred.api, error);\r\n deferred.reject(exception);\r\n } else {\r\n deferred.resolve(ret);\r\n }\r\n } else {\r\n // Sometimes the AsyncApiResult event can come earlier than\r\n // the `execute` promise being resolved due to native thread scheduling.\r\n // Hence, here we cache the result and consume the value later.\r\n this.results[apiId] = event;\r\n }\r\n } else if (event.__type === 'Event') {\r\n const {\r\n __type,\r\n __eventName: eventName,\r\n ...args\r\n } = event;\r\n for (const handler of this.eventHandlers) {\r\n handler(eventName, args);\r\n }\r\n }\r\n }\r\n\r\n execute(\r\n api: TApi\r\n ): Promise;\r\n execute(\r\n api: TApi,\r\n args: PrivateApiSignatures[TApi]['args']\r\n ): Promise;\r\n execute(\r\n api: TApi,\r\n args?: PrivateApiSignatures[TApi]['args']\r\n ): Promise {\r\n if (!window.OfficeFirstParty || !OfficeFirstParty.PrivateApi?.execute) {\r\n return Promise.reject(new NativeInteropError(NativeInteropError.E_FAIL, 'PrivateApi is not available'));\r\n }\r\n\r\n const obj = Object.assign({\r\n __api: api,\r\n }, args);\r\n const message = JSON.stringify(obj);\r\n\r\n return OfficeFirstParty.PrivateApi.execute(message).then((result) => {\r\n const response = JSON.parse(result) as PrivateApiSignatures[TApi]['ret'] & {\r\n __error: number;\r\n __async: string | undefined;\r\n };\r\n const {\r\n __error: error,\r\n __async: asyncId,\r\n ...ret\r\n } = response;\r\n\r\n if (error !== 0) {\r\n const exception = ApiBridge.createErrorObject(api, error);\r\n TelemetryLogger.Instance.logError('ApiBridgeError', error, {\r\n ErrorMethod: api, ErrorDetails: exception.message, ErrorCode: exception.errorCode, ErrorName: exception.name,\r\n });\r\n throw exception;\r\n }\r\n\r\n if (typeof asyncId !== 'string') {\r\n return ret as unknown as PrivateApiSignatures[TApi]['ret'];\r\n } else if (!(asyncId in this.results)) {\r\n const {\r\n promise,\r\n resolve,\r\n reject,\r\n } = PromiseCompat.withResolvers();\r\n this.defers[asyncId] = {\r\n api,\r\n resolve,\r\n reject,\r\n };\r\n return promise as Promise;\r\n } else {\r\n const {\r\n __type,\r\n __apiId,\r\n __error: error,\r\n ...ret\r\n } = this.results[asyncId];\r\n delete this.results[asyncId];\r\n if (error !== 0) {\r\n const exception = ApiBridge.createErrorObject(api, error);\r\n throw exception;\r\n } else {\r\n return ret as PrivateApiSignatures[TApi]['ret'];\r\n }\r\n }\r\n });\r\n }\r\n\r\n private static createErrorObject(api: string, error: number): NativeInteropError {\r\n const convertedError = error >>> 0;\r\n switch (convertedError) {\r\n case NotImplementedError.E_NOTIMPL:\r\n return new NotImplementedError(`The private API '${api}' is not implemented`);\r\n case InvalidArgumentsError.E_INVALIDARG:\r\n return new InvalidArgumentsError(`Invalid arguments are passed to the private API '${api}'`);\r\n default:\r\n return new NativeInteropError(error, `Calling private API '${api}' gives error code: ${error} | ${convertedError} (converted error code)`);\r\n }\r\n }\r\n}\r\n","import type {\r\n InteropCreateNotebookNavigationDataModel,\r\n InteropLinkNavigationDataModel,\r\n InteropNotebookNavigationDataModel,\r\n InteropPageNavigationDataModel,\r\n InteropReferenceLinkNavigationDataModel,\r\n InteropSearchResultNavigationDataModel,\r\n InteropWorkspaceDataModel,\r\n InteropWorkspaceDataModelCollection\r\n} from '../data/Models';\r\nimport { ApiBridge } from './ApiBridge';\r\n\r\nexport const apiBridge = new ApiBridge();\r\n\r\nexport function clearWorkspaces() {\r\n console.log('ApiBridge: SendToNative: Clear Workspaces:');\r\n return apiBridge.execute('clearWorkspaces');\r\n}\r\n\r\nexport class NotifyClient {\r\n public static failedToNavigateToSearchResult(\r\n model: InteropSearchResultNavigationDataModel\r\n ) {\r\n console.log('ApiBridge: SendToNative: Navigate Search Result Failed:', model);\r\n return apiBridge.execute('notifyNavigateToSearchResultFailed', model);\r\n }\r\n\r\n public static failedToNavigateToLink(\r\n model: InteropLinkNavigationDataModel\r\n ) {\r\n console.log('ApiBridge: SendToNative: Navigate Link Failed:', model);\r\n return apiBridge.execute('notifyNavigateToLinkFailed', model);\r\n }\r\n\r\n public static navigateToLinkStatus(\r\n model: InteropLinkNavigationDataModel\r\n ) {\r\n console.log('ApiBridge: SendToNative: Navigate Link Status:', model);\r\n return apiBridge.execute('notifyNavigateToLinkStatus', model);\r\n }\r\n\r\n public static navigateToHomeEvent() {\r\n console.log('ApiBridge: SendToNative: Home Navigate');\r\n return apiBridge.execute('navigateToHome');\r\n }\r\n\r\n public static navigateToNotebookEvent(\r\n model: InteropNotebookNavigationDataModel\r\n ) {\r\n console.log('ApiBridge: SendToNative: Notebook Navigate:', model);\r\n return apiBridge.execute('navigateToNotebook', model);\r\n }\r\n\r\n public static navigateToCreateNotebookEvent(\r\n model: InteropCreateNotebookNavigationDataModel\r\n ) {\r\n console.log('ApiBridge: SendToNative: Notebook Create:', model);\r\n return apiBridge.execute('navigateToCreateNotebook', model);\r\n }\r\n\r\n public static navigateToPageEvent(\r\n model: InteropPageNavigationDataModel\r\n ) {\r\n console.log('ApiBridge: SendToNative: Page Navigate:', model);\r\n return apiBridge.execute('navigateToPage', model);\r\n }\r\n\r\n public static navigateToResourceLinkInClientEvent(\r\n model: InteropReferenceLinkNavigationDataModel\r\n ) {\r\n console.log('ApiBridge: SendToNative: Resource Link Navigate:', model);\r\n return apiBridge.execute('notifyNavigateToResourceLinkInClient', model);\r\n }\r\n\r\n public static navigateToSearchResultStatus(\r\n model: InteropSearchResultNavigationDataModel\r\n ) {\r\n console.log('ApiBridge: SendToNative: Navigate Search Result Status:', model);\r\n return apiBridge.execute('notifyNavigateToSearchResultStatus', model);\r\n }\r\n\r\n public static renderCompleteEvent() {\r\n console.log('ApiBridge: SendToNative: Render Complete');\r\n return apiBridge.execute('renderComplete');\r\n }\r\n}\r\n\r\nexport class DataAction {\r\n public static removeWorkspace(\r\n model: InteropWorkspaceDataModel\r\n ) {\r\n console.log('ApiBridge: SendToNative: Remove Workspace:', model);\r\n return apiBridge.execute('removeWorkspace', model);\r\n }\r\n\r\n public static renameWorkspace(\r\n model: InteropWorkspaceDataModel\r\n ) {\r\n console.log('ApiBridge: SendToNative: Rename Workspace:', model);\r\n return apiBridge.execute('renameWorkspace', model);\r\n }\r\n\r\n public static setWorkspaces(\r\n model: InteropWorkspaceDataModelCollection\r\n ) {\r\n console.log('ApiBridge: SendToNative: Setting Workspaces:', model);\r\n return apiBridge.execute('setWorkspaces', model);\r\n }\r\n\r\n public static updateWorkspace(\r\n model: InteropWorkspaceDataModel\r\n ) {\r\n console.log('ApiBridge: SendToNative: Update Workspace:', model);\r\n return apiBridge.execute('updateWorkspace', model);\r\n }\r\n\r\n public static failedToProcessWorkspaces()\r\n {\r\n console.log('ApiBridge: SendToNative: Process Workspaces Failed');\r\n return apiBridge.execute('notifyProcessWorkspacesFailed');\r\n }\r\n\r\n public static getActiveUserIdentity() {\r\n console.log('ApiBridge: SendToNative: Get Active User Identity');\r\n return apiBridge.execute('getActiveIdentity');\r\n }\r\n\r\n}\r\n","import { TelemetryLogger } from '../telemetry/TelemetryLogger';\r\n\r\nexport type CloudType =\r\n | 'UNKNOWN'\r\n | 'Public'\r\n | 'GCCM'\r\n | 'GCCH'\r\n | 'DoD'\r\n | 'UsSec'\r\n | 'UsNat'\r\n | 'Gallatin'\r\n | 'Delos'\r\n | 'Bleu';\r\n\r\nexport type SovereignCloudType = Exclude;\r\n\r\n/**\r\n * Mapping of known origins to their corresponding CloudType.\r\n * Add or update entries here to support new cloud environments.\r\n */\r\nconst ORIGIN_TO_CLOUD_TYPE: Record = {\r\n 'https://fa000000174.resources.office.net': 'Public',\r\n 'https://fa000000174.mro1cdnstorage.gcc.cdn.office.net': 'GCCM',\r\n 'https://fa000000174.mro1cdnstorage.gcch.cdn.office.net': 'GCCH',\r\n 'https://fa000000174.mro1cdnstorage.dod.cdn.office.net': 'DoD',\r\n 'https://fa000000174.mro1cdnstorage.1cdn.eaglex.ic.gov': 'UsNat',\r\n 'https://fa000000174.mro1cdnstorage.1cdn.microsoft.scloud': 'UsSec',\r\n 'https://fa000000174.mro1cdnstorage.cdn.partner.office365.cn': 'Gallatin',\r\n // Add more mappings as needed (e.g., Delos, Bleu)\r\n};\r\n\r\nexport let cachedCloudType: CloudType | undefined;\r\n\r\n/**\r\n * Returns the detected CloudType for the current window location.\r\n * Uses a cached value for efficiency.\r\n */\r\nexport function getCloudType(): CloudType {\r\n if (!cachedCloudType) {\r\n cachedCloudType = detectCloudType();\r\n }\r\n return cachedCloudType;\r\n}\r\n\r\nexport function isSovereignCloud(): boolean {\r\n const cloudType = getCloudType();\r\n return cloudType !== 'Public' && cloudType !== 'UNKNOWN';\r\n}\r\n\r\n/**\r\n * Determines the CloudType based on the window's origin.\r\n * Returns 'UNKNOWN' if the origin is not recognized.\r\n */\r\nfunction detectCloudType(): CloudType {\r\n try {\r\n const origin = new URL(window.location.href).origin.toLowerCase();\r\n const mapped = ORIGIN_TO_CLOUD_TYPE[origin];\r\n if (!mapped) {\r\n console.error('Failed to map cloud type for origin:', origin);\r\n throw new Error('Failed to map origin URL to cloud type');\r\n }\r\n console.log('Detected mapped cloud type:', mapped, origin);\r\n return mapped;\r\n } catch (error) {\r\n TelemetryLogger.Instance.logError('UnhandledConfigError', error, {\r\n ErrorMethod: 'detectCloudType',\r\n ConfigDataValue: '',\r\n ConfigDataExpectedType: 'OriginURL',\r\n });\r\n console.error('Error detecting cloud type from origin URL - defaulting to UNKNOWN cloud:', error);\r\n return 'UNKNOWN';\r\n }\r\n}\r\n\r\nexport const resetCloudCache = () => {\r\n cachedCloudType = undefined;\r\n};\r\n","const randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto);\nexport default { randomUUID };\n","let getRandomValues;\nconst rnds8 = new Uint8Array(16);\nexport default function rng() {\n if (!getRandomValues) {\n if (typeof crypto === 'undefined' || !crypto.getRandomValues) {\n throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n }\n getRandomValues = crypto.getRandomValues.bind(crypto);\n }\n return getRandomValues(rnds8);\n}\n","import validate from './validate.js';\nconst byteToHex = [];\nfor (let i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).slice(1));\n}\nexport function unsafeStringify(arr, offset = 0) {\n return (byteToHex[arr[offset + 0]] +\n byteToHex[arr[offset + 1]] +\n byteToHex[arr[offset + 2]] +\n byteToHex[arr[offset + 3]] +\n '-' +\n byteToHex[arr[offset + 4]] +\n byteToHex[arr[offset + 5]] +\n '-' +\n byteToHex[arr[offset + 6]] +\n byteToHex[arr[offset + 7]] +\n '-' +\n byteToHex[arr[offset + 8]] +\n byteToHex[arr[offset + 9]] +\n '-' +\n byteToHex[arr[offset + 10]] +\n byteToHex[arr[offset + 11]] +\n byteToHex[arr[offset + 12]] +\n byteToHex[arr[offset + 13]] +\n byteToHex[arr[offset + 14]] +\n byteToHex[arr[offset + 15]]).toLowerCase();\n}\nfunction stringify(arr, offset = 0) {\n const uuid = unsafeStringify(arr, offset);\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n return uuid;\n}\nexport default stringify;\n","import native from './native.js';\nimport rng from './rng.js';\nimport { unsafeStringify } from './stringify.js';\nfunction v4(options, buf, offset) {\n if (native.randomUUID && !buf && !options) {\n return native.randomUUID();\n }\n options = options || {};\n const rnds = options.random || (options.rng || rng)();\n rnds[6] = (rnds[6] & 0x0f) | 0x40;\n rnds[8] = (rnds[8] & 0x3f) | 0x80;\n if (buf) {\n offset = offset || 0;\n for (let i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n return buf;\n }\n return unsafeStringify(rnds);\n}\nexport default v4;\n","// check if error is an object and has a message property\r\nexport const hasMessageProperty = (\r\n error: unknown,\r\n): error is { message: string } => {\r\n return (\r\n typeof error === 'object' &&\r\n error !== null &&\r\n 'message' in error &&\r\n typeof (error as { message: unknown }).message === 'string'\r\n );\r\n};\r\n","// Resource map for Bleu cloud\r\nexport const Resources = Object.freeze({});\r\n","// Resource map for Delos cloud\r\nexport const Resources = Object.freeze({});\r\n","// Resource map for DoD cloud\r\nexport const Resources = Object.freeze({\r\n AEA: 'https://outlook-dod.office365.us/connectors',\r\n APIHUB: 'https://power-apis-usdod-001.azure-apihub.us',\r\n AUGLOOP: 'https://augloop.dod.online.office365.us/v2',\r\n BAP: 'https://api.bap.appsplatform.us',\r\n DESIGNERAPPSERVICE: 'https://designerapp.osi.apps.mil',\r\n GRAPH: 'https://dod-graph.microsoft.us',\r\n LOKI: 'https://dod.loki.office365.us',\r\n M365PROD: 'https://www.ohome.apps.mil',\r\n METAOS: 'https://titles.dod.mos.svc.usgovcloud.microsoft',\r\n MRUPLUSPLUS: 'https://api.osi.apps.mil',\r\n OCPS: 'https://clients.config.dod.office365.us',\r\n OUTLOOK: 'https://outlook-dod.office365.us',\r\n SAFELINKS: 'https://usg01.safelinks.protection.office365.us',\r\n SAFELINKSLEGACY: 'https://dataservice.protection.office365.us',\r\n SUBSTRATE: 'https://substrate-dod.office365.us',\r\n SUBSTRATESEARCH: 'https://substrate-dod.office365.us/search',\r\n SYDNEY: 'https://substrate-dod.office365.us/sydney',\r\n TEAMS: 'https://dod.teams.microsoft.us',\r\n TENANTFEEDBACK: 'https://substrate-dod.office365.us/tenantfeedback',\r\n});\r\n","// Resource map for GCCH cloud\r\nexport const Resources = Object.freeze({\r\n AEA: 'https://outlook.office365.us/connectors',\r\n APIHUB: 'https://power-apis-usgov001-sovereign.azure-apihub.us',\r\n AUGLOOP: 'https://augloop.gov.online.office365.us/v2',\r\n BAP: 'https://high.api.bap.microsoft.us',\r\n DESIGNERAPPSERVICE: 'https://designerapp.gcc.osi.office365.us',\r\n GRAPH: 'https://graph.microsoft.us',\r\n LOKI: 'https://gcchigh.loki.office365.us',\r\n M365PROD: 'https://www.office365.us',\r\n MRUPLUSPLUS: 'https://api.osi.office365.us',\r\n OCPS: 'https://clients.config.high.office365.us',\r\n OUTLOOK: 'https://outlook.office365.us',\r\n PPAPIPROD: 'https://api.gov.powerplatform.microsoft.us',\r\n SAFELINKS: 'https://usg02.safelinks.protection.office365.us',\r\n SAFELINKSLEGACY: 'https://dataservice.protection.office365.us',\r\n SUBSTRATE: 'https://substrate.office365.us',\r\n SUBSTRATESEARCH: 'https://substrate.office365.us/search',\r\n SYDNEY: 'https://substrate.office365.us/sydney',\r\n TEAMS: 'https://gov.teams.microsoft.us',\r\n TENANTFEEDBACK: 'https://substrate.office365.us/tenantfeedback',\r\n});\r\n","// Resource map for GCCM cloud\r\nexport const Resources = Object.freeze({\r\n APIHUB: 'https://power-apis-usgov001-public.azure-apihub.us',\r\n AUGLOOP: 'https://augloop-gcc.office.com/v2',\r\n BAP: 'https://gov.api.bap.microsoft.us',\r\n COPILOTSTUDIOPROD: '9315aedd-209b-43b3-b149-2abff6a95d59',\r\n DESIGNERAPPSERVICE: 'https://designerapp.gcc.osi.office365.us',\r\n LOKI: 'https://gcc.loki.delve.office.com',\r\n METAOS: 'https://titles.gccm.mos.microsoft.com',\r\n OCPS: 'https://clients.config.gcc.office.net',\r\n PPAPIPROD: 'https://api.gov.powerplatform.microsoft.us',\r\n SAFELINKS: 'https://gcc02.safelinks.protection.outlook.com',\r\n});\r\n","// Resource map for Gallatin cloud\r\nexport const Resources = Object.freeze({\r\n AEA: 'https://partner.outlook.cn/connectors',\r\n APIHUB: 'https://china.azure-apihub.cn',\r\n GRAPH: 'https://microsoftgraph.chinacloudapi.cn',\r\n LOKI: 'https://loki.office365.cn',\r\n MRUPLUSPLUS: 'https://api.partner.office365.cn',\r\n OUTLOOK: 'https://partner.outlook.cn',\r\n TEAMS: 'https://teams.microsoftonline.cn',\r\n SUBSTRATE: 'https://partner.outlook.cn', // Note: Substrate domain needs to be confirmed if/when we actually deploy to Gallatin\r\n SUBSTRATESEARCH: 'https://partner.outlook.cn/search', // Note: Substrate domain needs to be confirmed if/when we actually deploy to Gallatin\r\n SYDNEY: 'https://partner.outlook.cn/sydney', // Note: Substrate domain needs to be confirmed if/when we actually deploy to Gallatin\r\n TENANTFEEDBACK: 'https://partner.outlook.cn/tenantfeedback', // Note: Substrate domain needs to be confirmed if/when we actually deploy to Gallatin\r\n});\r\n","// Resource map for MSA account type\r\nexport const Resources = Object.freeze({\r\n AMS: 'https://ic3-consumers.teams.office.com',\r\n SYDNEY: 'https://substrate.office.com/sydney/v2',\r\n SUBSTRATESEARCH: 'https://substrate.office.com',\r\n});\r\n","// Resource map for public cloud\r\nexport const Resources = Object.freeze({\r\n AEA: 'https://outlook.office365.com/connectors',\r\n AMS: 'https://ic3.teams.office.com',\r\n APIHUB: 'https://apihub.azure.com',\r\n AUGLOOP: 'https://augloop.office.com/v2',\r\n BAP: 'https://api.bap.microsoft.com',\r\n BINGANSWERS: 'https://www.bing.com',\r\n DESIGNERAPPSERVICE: 'https://designerapp.officeapps.live.com',\r\n COPILOTSTUDIOPROD: '96ff4394-9197-43aa-b393-6a41652e21f8',\r\n COPILOTSTUDIOTEST: 'a522f059-bb65-47c0-8934-7db6e5286414',\r\n FLUIDPUSH: 'https://pushchannel.1drv.ms',\r\n GCS: 'https://gcs.office.com',\r\n GRAPH: 'https://graph.microsoft.com',\r\n IRIS: 'https://arc.msn.com/v4',\r\n LOKI: 'https://loki.delve.office.com',\r\n M365PROD: 'https://m365.cloud.microsoft',\r\n METAOS: 'https://titles.prod.mos.microsoft.com',\r\n MRUPLUSPLUS: 'https://api.office.net',\r\n OCPS: 'https://clients.config.office.net',\r\n ONENOTE: 'https://learningtools.onenote.com',\r\n OUTLOOK: 'https://outlook.office365.com',\r\n PACMAN: '083b36c3-2702-4850-972a-42894c3c6437',\r\n POWERBI: 'https://analysis.windows.net/powerbi/api',\r\n PPAPIPROD: 'https://api.powerplatform.com',\r\n PPAPITEST: 'https://api.test.powerplatform.com',\r\n PPAPIPREPROD: 'https://api.preprod.powerplatform.com',\r\n POWERAUTOMATE: 'https://service.flow.microsoft.com',\r\n SAFELINKS: 'https://safelinks.protection.office365.com',\r\n SAFELINKSLEGACY: 'https://dataservice.o365filtering.com',\r\n SHAREPOINT: 'https://microsoft.sharepoint.com',\r\n SKYPE: 'https://api.spaces.skype.com',\r\n SPAC: '00000003-0000-0ff1-ce00-000000000000',\r\n SUBSTRATE: 'https://substrate.office.com',\r\n SUBSTRATESEARCH: 'https://substrate.office.com/search',\r\n SYDNEY: 'https://substrate.office.com/sydney',\r\n TEAMS: 'https://teams.microsoft.com',\r\n TENANTFEEDBACK: 'https://substrate.office.com/tenantfeedback',\r\n TROUTER: 'a75e09c5-9ed5-4004-82d5-4a44c9fd7052',\r\n URLP: 'https://urlp-v2.asm.skype.com',\r\n YAMMER: 'https://www.yammer.com',\r\n});\r\n","// Resource map for USNat cloud\r\nexport const Resources = Object.freeze({\r\n AEA: 'https://outlook.exo.eaglex.ic.gov/connectors',\r\n AUGLOOP: 'https://svc.augloop.eaglex.ic.gov/v2',\r\n GRAPH: 'https://graph.eaglex.ic.gov',\r\n LOKI: 'https://loki.officenet.eaglex.ic.gov',\r\n OUTLOOK: 'https://outlook.exo.eaglex.ic.gov',\r\n SUBSTRATE: 'https://substrate.exo.eaglex.ic.gov',\r\n SUBSTRATESEARCH: 'https://substrate.exo.eaglex.ic.gov/search',\r\n SYDNEY: 'https://substrate.exo.eaglex.ic.gov/sydney',\r\n TENANTFEEDBACK: 'https://substrate.exo.eaglex.ic.gov/tenantfeedback',\r\n});\r\n","// Resource map for USSec cloud\r\nexport const Resources = Object.freeze({\r\n AEA: 'https://outlook.exo.microsoft.scloud/connectors',\r\n AUGLOOP: 'https://svc.augloop.microsoft.scloud/v2',\r\n GRAPH: 'https://graph.microsoft.scloud',\r\n LOKI: 'https://loki.officenet.microsoft.scloud',\r\n OUTLOOK: 'https://outlook.exo.microsoft.scloud',\r\n SUBSTRATE: 'https://substrate.exo.microsoft.scloud',\r\n SUBSTRATESEARCH: 'https://substrate.exo.microsoft.scloud/search',\r\n SYDNEY: 'https://substrate.exo.microsoft.scloud/sydney',\r\n TENANTFEEDBACK: 'https://substrate.exo.microsoft.scloud/tenantfeedback',\r\n});\r\n","import type { CloudType } from '../../utils/Cloud';\r\nimport { Resources as ResourcesBleu } from './BleuEndpoints';\r\nexport { Resources as ResourcesBleu } from './BleuEndpoints';\r\nimport { Resources as ResourcesDelos } from './DelosEndpoints';\r\nexport { Resources as ResourcesDelos } from './DelosEndpoints';\r\nimport { Resources as ResourcesDoD } from './DoDEndpoints';\r\nexport { Resources as ResourcesDoD } from './DoDEndpoints';\r\nimport { Resources as ResourcesGCCH } from './GCCHEndpoints';\r\nexport { Resources as ResourcesGCCH } from './GCCHEndpoints';\r\nimport { Resources as ResourcesGCCM } from './GCCMEndpoints';\r\nexport { Resources as ResourcesGCCM } from './GCCMEndpoints';\r\nimport { Resources as ResourcesGallatin } from './GallatinEndpoints';\r\nexport { Resources as ResourcesGallatin } from './GallatinEndpoints';\r\nimport { type Resources as ResourcesMSA } from './MSAEndpoints';\r\nexport { Resources as ResourcesMSA } from './MSAEndpoints';\r\nimport { Resources as ResourcesPublic } from './PublicEndpoints';\r\nexport { Resources as ResourcesPublic } from './PublicEndpoints';\r\nimport { Resources as ResourcesUsNat } from './USNatEndpoints';\r\nexport { Resources as ResourcesUsNat } from './USNatEndpoints';\r\nimport { Resources as ResourcesUsSec } from './USSecEndpoints';\r\nexport { Resources as ResourcesUsSec } from './USSecEndpoints';\r\n\r\n\r\nexport type TokenType =\r\n | keyof typeof ResourcesPublic\r\n | keyof typeof ResourcesMSA\r\n | keyof typeof ResourcesGCCM\r\n | keyof typeof ResourcesGCCH\r\n | keyof typeof ResourcesDoD\r\n | keyof typeof ResourcesUsSec\r\n | keyof typeof ResourcesUsNat\r\n | keyof typeof ResourcesBleu\r\n | keyof typeof ResourcesDelos\r\n | keyof typeof ResourcesGallatin\r\n | 'UNKNOWN'\r\n | 'SHAREPOINT';\r\n\r\n// Map cloudType to resource map\r\nexport const CLOUD_RESOURCES_MAP: Record = {\r\n Public: ResourcesPublic,\r\n UNKNOWN: ResourcesPublic,\r\n GCCM: ResourcesGCCM,\r\n GCCH: ResourcesGCCH,\r\n DoD: ResourcesDoD,\r\n UsSec: ResourcesUsSec,\r\n UsNat: ResourcesUsNat,\r\n Bleu: ResourcesBleu,\r\n Delos: ResourcesDelos,\r\n Gallatin: ResourcesGallatin,\r\n};\r\n","import type { TokenRequestOptions } from '@fluidx/loop-types';\r\nimport { TelemetryLogger } from '../telemetry/TelemetryLogger';\r\nimport type { CloudType } from '../utils/Cloud';\r\nimport type { TokenType } from './endpoints';\r\n\r\n// This enum maps to the AccountType enum in the Identity CoreAPI Library\r\n// identity/coreapi/public/IdentityProvider.h\r\nenum AccountType {\r\n Unknown = 0,\r\n LiveId = 1,\r\n OrgId = 2,\r\n ActiveDirectory = 3,\r\n ADAL = 4,\r\n SSPI = 5,\r\n}\r\n\r\n// This utility function only logs the duration of the token if it was the first time the token was generated.\r\nexport const isTokenLoggedMap = new Map();\r\nexport const logTokenForFirstTime = (tokenType: TokenType, durationMS: number, options?: TokenRequestOptions) => {\r\n if (!isTokenLoggedMap.get(tokenType)) {\r\n console.log(`Acquired initial token ${tokenType} in ${durationMS}ms`);\r\n TelemetryLogger.Instance.logEvent('InitialTokenAcquired', {\r\n TokenType: tokenType,\r\n Duration: durationMS,\r\n TokenHasClaims: options?.claims !== undefined,\r\n TokenForceRefresh: options?.forceRefresh ?? false\r\n });\r\n isTokenLoggedMap.set(tokenType, true);\r\n }\r\n};\r\n\r\nexport const isBizChatTokenLoggedMap = new Map();\r\nexport const logBizChatTokenForFirstTime = (tokenType: TokenType, durationMS: number) => {\r\n if (!isBizChatTokenLoggedMap.get(tokenType)) {\r\n console.log(`Acquired initial BizChat token ${tokenType} in ${durationMS}ms`);\r\n TelemetryLogger.Instance.logEvent('InitialBizChatTokenAcquired', { TokenType: tokenType, Duration: durationMS });\r\n isBizChatTokenLoggedMap.set(tokenType, true);\r\n }\r\n};\r\n\r\nexport const isOrgId = (accountType: number | undefined): boolean => {\r\n if (accountType === undefined) {\r\n return false;\r\n }\r\n return accountType === AccountType.OrgId || accountType === AccountType.ADAL;\r\n};\r\n\r\nexport const isMSA = (accountType: number | undefined): boolean => {\r\n if (accountType === undefined) {\r\n return false;\r\n }\r\n return accountType === AccountType.LiveId;\r\n};\r\n\r\n/**\r\n * Mapping of cloud types to Copilot Notebook SDX BizChat NAA redirect URLs.\r\n */\r\nexport const CLOUD_TYPE_TO_REDIRECT: Record = {\r\n 'Public': 'brk-multihub://fa000000174.resources.office.net',\r\n 'GCCM': 'brk-multihub://fa000000174.mro1cdnstorage.gcc.cdn.office.net',\r\n 'GCCH': 'brk-multihub://fa000000174.mro1cdnstorage.gcch.cdn.office.net',\r\n 'DoD': 'brk-multihub://fa000000174.mro1cdnstorage.dod.cdn.office.net',\r\n // UNKNOWN cloud should default to public\r\n 'UNKNOWN': 'brk-multihub://fa000000174.resources.office.net',\r\n // Below here must have the SDX origin in the cloud confirmed and then allowlisted for BizChat as an NAA redirect URL.\r\n 'UsNat': 'https://fa000000174.mro1cdnstorage.1cdn.eaglex.ic.gov',\r\n 'UsSec': 'https://fa000000174.mro1cdnstorage.1cdn.microsoft.scloud',\r\n 'Gallatin': 'https://fa000000174.mro1cdnstorage.cdn.partner.office365.cn',\r\n 'Delos': '',\r\n 'Bleu': ''\r\n};\r\n","\r\nimport { hasMessageProperty } from '../telemetry/ErrorUtils';\r\nimport { TelemetryLogger } from '../telemetry/TelemetryLogger';\r\nimport type { CloudType } from '../utils/Cloud';\r\nimport {\r\n CLOUD_RESOURCES_MAP, ResourcesMSA, ResourcesPublic, type TokenType,\r\n} from './endpoints';\r\nimport { isMSA } from './utils';\r\n\r\nexport type Identity = {\r\n id: string;\r\n name: string;\r\n tenantId: string;\r\n identityType: number;\r\n oid?: string;\r\n upn?: string;\r\n};\r\n\r\nexport type OfficeAuthContext = {\r\n userObjectId: string;\r\n tenantId: string;\r\n userPrincipalName: string;\r\n authorityType: string;\r\n authorityBaseUri: string;\r\n puid: string;\r\n loginHint: string;\r\n};\r\n\r\nexport type UserAccountType = 'MSA' | 'AAD';\r\nexport type TokenDefinition = {\r\n resource: string;\r\n tokenType: TokenType;\r\n};\r\n\r\nexport const getResourceForTokenType = (tokenType: TokenType, accountType: UserAccountType, cloudType: CloudType): string | undefined => {\r\n // Only allow MSA in public cloud\r\n if (accountType === 'MSA' && cloudType !== 'Public') {\r\n return undefined;\r\n }\r\n\r\n // MSA-specific resources\r\n if (accountType === 'MSA' && tokenType in ResourcesMSA) {\r\n return ResourcesMSA[tokenType as keyof typeof ResourcesMSA];\r\n }\r\n\r\n // Get the resource map for the cloud\r\n const resourceMap = CLOUD_RESOURCES_MAP[cloudType] || ResourcesPublic;\r\n if (tokenType in resourceMap) {\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n return (resourceMap as any)[tokenType];\r\n }\r\n\r\n // Fallback to public resources\r\n if (tokenType in ResourcesPublic) {\r\n return ResourcesPublic[tokenType as keyof typeof ResourcesPublic];\r\n }\r\n\r\n return undefined;\r\n};\r\n\r\nexport const getTokenDefinitionFromResourceStrings = (resourceStrings: string[], accountType: UserAccountType, cloudType: CloudType): TokenDefinition | undefined => {\r\n // Only allow MSA in public cloud\r\n if (accountType === 'MSA' && cloudType !== 'Public') {\r\n return undefined;\r\n }\r\n\r\n const normalizedResources = resourceStrings.map(resource => resource.toLowerCase());\r\n\r\n // MSA-specific resources\r\n if (accountType === 'MSA') {\r\n for (const [key, value] of Object.entries(ResourcesMSA)) {\r\n if (typeof value === 'string' && normalizedResources.includes(value.toLowerCase())) {\r\n // MSA account has an MSA-specific token definition\r\n return {\r\n resource: value,\r\n tokenType: key as TokenType\r\n };\r\n }\r\n }\r\n }\r\n\r\n // Get the resource map for the cloud\r\n const resourceMap = CLOUD_RESOURCES_MAP[cloudType] || ResourcesPublic;\r\n for (const [key, value] of Object.entries(resourceMap)) {\r\n if (typeof value === 'string' && normalizedResources.includes(value.toLowerCase())) {\r\n // Account type has a cloud-specific token definition\r\n return {\r\n resource: value,\r\n tokenType: key as TokenType\r\n };\r\n }\r\n }\r\n\r\n // Fallback to public resources\r\n for (const [key, value] of Object.entries(ResourcesPublic)) {\r\n if (typeof value === 'string' && normalizedResources.includes(value.toLowerCase())) {\r\n // Account type has a general public token definition\r\n return {\r\n resource: value,\r\n tokenType: key as TokenType\r\n };\r\n }\r\n }\r\n\r\n return undefined;\r\n};\r\n\r\nexport const getOfficeAuthContext = async (): Promise | undefined> => {\r\n const getPrimaryIdentityAuthContext = new Promise(\r\n (resolve: (authContext: Office.AsyncResult) => void, reject: (error: Error) => void) => {\r\n const timeout = setTimeout(() => {\r\n reject(new Error('getAuthContextAsync timed out'));\r\n }, 2000); // 2 seconds timeout\r\n Office.context.auth.getAuthContextAsync((authContext) => {\r\n clearTimeout(timeout);\r\n resolve(authContext);\r\n });\r\n }\r\n );\r\n try {\r\n const authContext = await getPrimaryIdentityAuthContext;\r\n if (authContext.status !== Office.AsyncResultStatus.Succeeded) {\r\n throw new Error(authContext.error?.message ?? 'Failed to get office auth context');\r\n }\r\n return authContext;\r\n } catch (error) {\r\n console.error('Failed to get office auth context' + (hasMessageProperty(error) ? `: ${error.message}` : ''));\r\n TelemetryLogger.Instance.logError(\r\n 'AuthError',\r\n hasMessageProperty(error) ? error.message : 'Failed to get office auth context',\r\n {\r\n ErrorMethod: 'getOfficeAuthContext',\r\n },\r\n );\r\n return undefined;\r\n }\r\n};\r\n\r\nexport const getUserAccountType = (identity?: Identity): UserAccountType => {\r\n if (isMSA(identity?.identityType)) {\r\n return 'MSA';\r\n }\r\n return 'AAD';\r\n};\r\n","import type {\r\n ProvideDisposable,\r\n} from '@fluidx/loop-types';\r\nimport type { BizChatTokenProvider } from '@fluidx/loop-workspace-types';\r\nimport { v4 as uuidv4 } from 'uuid';\r\nimport { TelemetryLogger } from '../telemetry/TelemetryLogger';\r\nimport { getCloudType } from '../utils/Cloud';\r\nimport {\r\n getResourceForTokenType,\r\n getTokenDefinitionFromResourceStrings,\r\n getUserAccountType,\r\n} from './HostAuthServiceUtils';\r\nimport type { Identity } from './HostAuthServiceUtils';\r\nimport { ResourcesPublic, type TokenType } from './endpoints';\r\nimport { CLOUD_TYPE_TO_REDIRECT, logBizChatTokenForFirstTime } from './utils';\r\n\r\nexport class BizChatAuthService implements BizChatTokenProvider, ProvideDisposable {\r\n private bizChatTokenPromiseCache = new Map>();\r\n private hasLoggedUnknownOboRequest = false;\r\n // Use the BizChat appid for NAA\r\n private appId = 'c0ab8ce9-e9a0-42e7-b064-33d422df41f1';\r\n // Prior to implementing Nested App Auth, we used a legacy auth solution where the redirect URI we provided to the LWC\r\n // was 'https://fa000000174.resources.office.net/f7024bdc-7caf-4ca8-807d-2908f09640d6/1.0.2503.17010/en-us_web/login.html'.\r\n // That legacy redirect was allowlisted on the BizChat app id. We now use brokered auth and have allowlisted a different\r\n // brokered auth redirect on the BizChat appid.\r\n // brokered auth URI registered on BizChat app for public cloud: brk-multihub://fa000000174.resources.office.net\r\n // Each cloud has its own redirect URI.\r\n private redirectUri = CLOUD_TYPE_TO_REDIRECT[getCloudType()];\r\n private identity: Identity | undefined;\r\n\r\n public setIdentity(identity: Identity) {\r\n this.identity = identity;\r\n }\r\n public augloop = () => this.getBizChatTokenForTokenType('AUGLOOP');\r\n public substrate = () => this.getBizChatTokenForTokenType('SUBSTRATESEARCH');\r\n public sydney = () => this.getBizChatTokenForTokenType('SYDNEY');\r\n public tenantFeedback = () => this.getBizChatTokenForTokenType('TENANTFEEDBACK');\r\n public loki = async () => {\r\n const tokenString = await this.getBizChatTokenForTokenType('LOKI');\r\n return Promise.resolve({\r\n accessToken: tokenString,\r\n expirationTime: 0,\r\n });\r\n };\r\n public feed = () => this.getBizChatTokenForTokenType('SUBSTRATE');\r\n public yammer = () => this.getBizChatTokenForTokenType('YAMMER');\r\n public spo = async (domain: string, _headers?: Headers) => {\r\n let resourceLowerCase = domain?.toLowerCase() ?? '';\r\n const isSharePointResource = resourceLowerCase.includes('.sharepoint');\r\n if (!isSharePointResource) {\r\n // Get the default sharepoint URL for the current cloud and user account type. Fall back to public SharePoint if not found.\r\n resourceLowerCase = getResourceForTokenType('SHAREPOINT', getUserAccountType(this.identity), getCloudType()) ?? ResourcesPublic.SHAREPOINT;\r\n }\r\n const tokenString = await this.getBizChatTokenForResource(resourceLowerCase, 'SHAREPOINT', [resourceLowerCase + '/.default']);\r\n return Promise.resolve({\r\n AuthToken: tokenString,\r\n AuthTokenTtl: undefined,\r\n });\r\n };\r\n public mos = () => this.getBizChatTokenForTokenType('METAOS');\r\n public oboToken = (resource: string): Promise => {\r\n // NOTE: BizChat requests the IRIS token via OBO as of initial GA.\r\n const resourceLowerCase = resource.toLowerCase();\r\n let resourceURL: URL | undefined;\r\n try {\r\n resourceURL = new URL(resourceLowerCase);\r\n }\r\n catch (_e) {\r\n console.warn('Unsupported BizChat obo token request: Maybe invalid request URL: ', resourceLowerCase);\r\n }\r\n\r\n const tokenDefinition = getTokenDefinitionFromResourceStrings([resourceLowerCase, resourceURL?.origin.toLowerCase() ?? ''], getUserAccountType(this.identity), getCloudType());\r\n const finalResourceUrl = tokenDefinition?.resource ?? resourceLowerCase;\r\n const tokenType = tokenDefinition?.tokenType ?? 'UNKNOWN';\r\n if (!this.hasLoggedUnknownOboRequest && tokenType === 'UNKNOWN') {\r\n this.hasLoggedUnknownOboRequest = true;\r\n TelemetryLogger.Instance.logEvent('GetBizChatToken', { TokenType: 'OboToken', Message: 'Unknown endpoint requested' });\r\n }\r\n\r\n const tokenString = this.getBizChatTokenForResource(finalResourceUrl, tokenType, [finalResourceUrl + '/.default']);\r\n return Promise.resolve(tokenString);\r\n };\r\n public aeaToken = () => this.getBizChatTokenForTokenType('AEA');\r\n public amsToken = () => this.getBizChatTokenForTokenType('AMS');\r\n public graph = () => this.getBizChatTokenForTokenType('GRAPH');\r\n public powerAutomate = () => this.getBizChatTokenForTokenType('POWERAUTOMATE');\r\n public powerPlatform = (clusterCategory: string) => {\r\n let category: TokenType;\r\n switch (clusterCategory) {\r\n case 'prod':\r\n category = 'PPAPIPROD';\r\n break;\r\n case 'preprod':\r\n category = 'PPAPIPREPROD';\r\n break;\r\n case 'test':\r\n category = 'PPAPITEST';\r\n break;\r\n default:\r\n return Promise.reject(new Error('Unknown clusterCategory'));\r\n }\r\n return this.getBizChatTokenForTokenType(category);\r\n };\r\n public apiHub = () => this.getBizChatTokenForTokenType('APIHUB');\r\n public apiSkype = () => this.getBizChatTokenForTokenType('SKYPE');\r\n public teams = () => this.getBizChatTokenForTokenType('TEAMS');\r\n public outlook = () => this.getBizChatTokenForTokenType('OUTLOOK');\r\n public designer = () => this.getBizChatTokenForTokenType('DESIGNERAPPSERVICE');\r\n public apiUrlp = () => this.getBizChatTokenForTokenType('URLP');\r\n public ocps = () => this.getBizChatTokenForTokenType('OCPS');\r\n public powerbi = () => this.getBizChatTokenForTokenType('POWERBI');\r\n public pushChannel = () => this.getBizChatTokenForTokenType('FLUIDPUSH');\r\n public mss = () => this.getBizChatTokenForTokenType('BINGANSWERS');\r\n public copilotStudio = (realm: string) => this.getBizChatTokenForTokenType(realm === 'prod' ? 'COPILOTSTUDIOPROD' : 'COPILOTSTUDIOTEST');\r\n public bap = () => this.getBizChatTokenForTokenType('BAP');\r\n public gcs = () => this.getBizChatTokenForTokenType('GCS');\r\n public mruPlusPlus = () => this.getBizChatTokenForTokenType('MRUPLUSPLUS');\r\n public trouter = () => this.getBizChatTokenForTokenType('TROUTER');\r\n public onenote = () => this.getBizChatTokenForTokenType('ONENOTE');\r\n public safeLinks = (isLegacy?: boolean) => this.getBizChatTokenForTokenType((isLegacy ?? false) ? 'SAFELINKSLEGACY' : 'SAFELINKS');\r\n public pacman = () => this.getBizChatTokenForTokenType('PACMAN');\r\n\r\n private async getBizChatTokenForTokenType(tokenType: TokenType, resource?: string): Promise {\r\n const tokenPromiseCache = this.bizChatTokenPromiseCache.get(tokenType);\r\n if (tokenPromiseCache) {\r\n console.log(`acquire BizChat token of type: ${tokenType} is already in progress`);\r\n return tokenPromiseCache;\r\n }\r\n const resourceUrl = getResourceForTokenType(tokenType, getUserAccountType(this.identity), getCloudType());\r\n if (!resourceUrl) {\r\n // log error\r\n const error = new Error('Unsupported token type');\r\n console.error(`Unsupported BizChat token type: ${tokenType}:`, resource);\r\n TelemetryLogger.Instance.logError('BizChatAuthError', error, { ErrorMethod: 'getBizChatTokenForResource', TokenType: tokenType });\r\n return Promise.reject(`Unsupported BizChat token type: ${tokenType}`);\r\n }\r\n return this.getBizChatTokenForResource(\r\n resourceUrl,\r\n tokenType,\r\n [resourceUrl + '/.default'],\r\n );\r\n }\r\n\r\n private async getBizChatTokenForResource(resource: string, tokenType: TokenType, scopes: string[]): Promise {\r\n const tokenPromiseCache = this.bizChatTokenPromiseCache.get(resource);\r\n if (tokenPromiseCache) {\r\n console.log(`acquire BizChat token of type: ${tokenType} is already in progress`);\r\n return tokenPromiseCache;\r\n }\r\n\r\n const correlationId = uuidv4();\r\n const startTime = Date.now();\r\n const loadPromise = OfficeFirstPartyAuth.NestedAppAuth.load(this.appId, this.redirectUri).catch((error: OfficeFirstPartyAuth.NestedAppAuth.AuthError) => {\r\n TelemetryLogger.Instance.logError('BizChatAuthError', error, {\r\n ErrorMethod: 'load', ErrorCode: error.code, ErrorAppId: this.appId, ErrorRedirectUri: this.redirectUri,\r\n });\r\n console.error('Nested App Auth load failed:', error.code);\r\n throw new Error(`Office FirstParty Nested App Auth load failed with error ${error.code}`);\r\n });\r\n await loadPromise;\r\n const tokenPromise = OfficeFirstPartyAuth.NestedAppAuth.getAccessToken({\r\n clientId: this.appId,\r\n scopes: scopes,\r\n popup: OfficeFirstPartyAuth.NestedAppAuth.PopupOptions.None,\r\n correlationId: correlationId,\r\n redirectUri: this.redirectUri,\r\n }).then((authResult) => {\r\n const duration = Date.now() - startTime;\r\n logBizChatTokenForFirstTime(tokenType, duration);\r\n return authResult.accessToken;\r\n }).catch((error) => {\r\n TelemetryLogger.Instance.logError('BizChatAuthError', error, {\r\n ErrorMethod: 'getAccessToken',\r\n TokenType: tokenType,\r\n });\r\n console.error(`acquire BizChat token of type: ${tokenType} failed for resource ${resource}:`, error);\r\n throw error;\r\n }).finally(() => {\r\n this.bizChatTokenPromiseCache.delete(resource);\r\n });\r\n\r\n this.bizChatTokenPromiseCache.set(resource, tokenPromise);\r\n return tokenPromise;\r\n }\r\n\r\n public get BizChatTokenProvider(): BizChatTokenProvider {\r\n return this;\r\n }\r\n\r\n public clearCache(): void {\r\n this.bizChatTokenPromiseCache.clear();\r\n }\r\n\r\n public get Disposable() {\r\n return this;\r\n }\r\n\r\n public dispose() {\r\n this.clearCache();\r\n }\r\n}\r\n","import type {\r\n Disposable,\r\n IdentityType,\r\n ProvideDisposable,\r\n TokenProvider,\r\n TokenRequestOptions,\r\n TokenResponse,\r\n UserContext,\r\n UserIdSpace,\r\n UserTenantGroup,\r\n} from '@fluidx/loop-types';\r\nimport { MsaTenantId } from '@fluidx/utilities';\r\nimport { DataAction } from '../interop';\r\nimport { TelemetryLogger } from '../telemetry/TelemetryLogger';\r\nimport { getCloudType } from '../utils/Cloud';\r\nimport { BizChatAuthService } from './BizChatAuthService';\r\nimport type {\r\n Identity,\r\n} from './HostAuthServiceUtils';\r\nimport {\r\n getOfficeAuthContext,\r\n getResourceForTokenType,\r\n getTokenDefinitionFromResourceStrings,\r\n getUserAccountType,\r\n} from './HostAuthServiceUtils';\r\nimport type { IJwtToken } from './IJwtToken';\r\nimport type { TokenType } from './endpoints';\r\nimport {\r\n isMSA,\r\n isOrgId,\r\n logTokenForFirstTime,\r\n} from './utils';\r\n\r\ntype AuthResult = Partial & Pick;\r\nexport class HostAuthService implements TokenProvider, ProvideDisposable, Disposable {\r\n // This is to prevent calling getAccessToken multiple times for the same token type.\r\n private tokenPromiseCache = new Map>();\r\n private identity: Identity | undefined = undefined;\r\n private isDisposed = false;\r\n private tokenFetchInProgress = false;\r\n public uiTokensFetchPromise: Promise | undefined;\r\n public bizChatAuthService: BizChatAuthService;\r\n\r\n public constructor() {\r\n this.bizChatAuthService = new BizChatAuthService();\r\n }\r\n\r\n public async initializePreAuthz() {\r\n // If we are already fetching tokens, don't start another fetch. This could happen during App Boot when the backend and frontend are both trying to fetch tokens.\r\n if (this.tokenFetchInProgress) {\r\n return;\r\n }\r\n this.tokenFetchInProgress = true;\r\n try {\r\n // Create user context\r\n if (!this.identity) {\r\n await this.populateIdentity();\r\n }\r\n\r\n console.log('Acquiring required auth tokens');\r\n\r\n const fetchTokens = async () => {\r\n // Prioritize fetching tokens needed for the UI\r\n const tokenPromises = [\r\n this.bizChatAuthService.sydney(),\r\n this.getPreAuthToken('SUBSTRATE'),\r\n ];\r\n // MSA users don't need OCPS token\r\n if (!isMSA(this.identity?.identityType)) {\r\n tokenPromises.push(this.getPreAuthToken('OCPS'));\r\n }\r\n await Promise.all(tokenPromises);\r\n };\r\n\r\n void fetchTokens()\r\n .catch((error) => {\r\n TelemetryLogger.Instance.logError('AuthError', error, { ErrorMethod: 'fetchTokens' });\r\n console.error('Failed to acquire pre-auth tokens:', error);\r\n })\r\n .finally(() => {\r\n this.tokenFetchInProgress = false;\r\n });\r\n } catch (error) {\r\n TelemetryLogger.Instance.logError('AuthError', error, { ErrorMethod: 'initializePreAuthz' });\r\n this.tokenFetchInProgress = false;\r\n throw error;\r\n }\r\n }\r\n\r\n public get Disposable() {\r\n return this;\r\n }\r\n\r\n public dispose() {\r\n this.isDisposed = true;\r\n }\r\n\r\n public get TokenProvider(): TokenProvider {\r\n return this;\r\n }\r\n\r\n public getIdentity(): Identity | undefined {\r\n if (this.isDisposed) {\r\n return undefined;\r\n }\r\n\r\n return this.identity;\r\n }\r\n\r\n public get identityType(): IdentityType | undefined {\r\n if (this.isDisposed || !this.identity) {\r\n return 'UnauthenticatedGuest';\r\n }\r\n\r\n if (isMSA(this.identity.identityType)) {\r\n return 'Consumer';\r\n }\r\n\r\n if (isOrgId(this.identity.identityType)) {\r\n return 'Enterprise';\r\n }\r\n\r\n return undefined;\r\n }\r\n\r\n public async getOfficeFirstPartyAuthResultByTokenType(\r\n type: TokenType\r\n ): Promise {\r\n if (this.isDisposed) {\r\n return Promise.reject('Provider has been disposed');\r\n }\r\n const resourceUrl = getResourceForTokenType(type, getUserAccountType(this.identity), getCloudType());\r\n if (!resourceUrl) {\r\n return Promise.reject(`Unsupported token type: ${type}`);\r\n }\r\n return this.getOfficeFirstPartyAuthResultByResource(resourceUrl, type);\r\n }\r\n\r\n public async getOfficeFirstPartyAuthResultByResource(\r\n resource: string,\r\n tokenType: TokenType,\r\n options?: TokenRequestOptions\r\n ): Promise {\r\n if (this.isDisposed) {\r\n return Promise.reject('Provider has been disposed');\r\n }\r\n\r\n const tokenPromiseCache = this.tokenPromiseCache.get(resource);\r\n if (tokenPromiseCache) {\r\n console.log(`acquire token for resource: ${resource} is already in progress`);\r\n return tokenPromiseCache;\r\n }\r\n\r\n const startTime = Date.now();\r\n const policy = isMSA(this.identity?.identityType) ? 'DELEGATED' : undefined;\r\n const scope = isMSA(this.identity?.identityType) ? resource + '/.default' : undefined;\r\n const getFirstPartyToken = async (): Promise => {\r\n await OfficeFirstPartyAuth.load();\r\n return OfficeFirstPartyAuth.getAccessToken(\r\n {\r\n resource,\r\n policy,\r\n scope,\r\n identityId: this.identity?.id,\r\n authChallenge: options?.claims,\r\n },\r\n {\r\n forceRefresh: options?.forceRefresh,\r\n }\r\n );\r\n };\r\n\r\n const authResultPromise = getFirstPartyToken().then((authResult) => {\r\n const duration = Date.now() - startTime;\r\n logTokenForFirstTime(tokenType, duration, options);\r\n return authResult;\r\n }).catch((error) => {\r\n TelemetryLogger.Instance.logError('AuthError', error, {\r\n ErrorMethod: 'getOfficeFirstPartyAuthResultByResource',\r\n TokenHasClaims: options?.claims !== undefined,\r\n TokenForceRefresh: options?.forceRefresh ?? false\r\n });\r\n console.error(`acquire token for resource: ${resource} failed:`, error);\r\n throw error;\r\n }).finally(() => {\r\n this.tokenPromiseCache.delete(resource);\r\n });\r\n\r\n this.tokenPromiseCache.set(resource, authResultPromise);\r\n return authResultPromise;\r\n }\r\n\r\n public getOfficeFirstPartyParsedToken(\r\n authResult: AuthResult\r\n ): IJwtToken {\r\n const token = authResult.accessToken;\r\n const base64Url = token.split('.')[1];\r\n const base64Content = base64Url.replace('-', '+').replace('_', '/');\r\n return JSON.parse(window.atob(base64Content));\r\n }\r\n\r\n public async getToken(scopes: string[], options: TokenRequestOptions): Promise {\r\n if (this.isDisposed) {\r\n return Promise.reject('Provider has been disposed');\r\n }\r\n let requestedResource = this.getResourceForScopes(scopes);\r\n let resourceLowerCase = requestedResource.toLowerCase();\r\n\r\n if (resourceLowerCase === '') {\r\n try {\r\n const urlValue = options.request?.url ?? '';\r\n const url = new URL(urlValue);\r\n requestedResource = url.origin;\r\n resourceLowerCase = url.origin.toLowerCase();\r\n }\r\n catch (_e) {\r\n const error = new Error('Unsupported token request: invalid request URL');\r\n // log error\r\n TelemetryLogger.Instance.logError('AuthError', error, { ErrorMethod: 'getToken' });\r\n throw new Error('Unsupported token request: invalid request URL');\r\n }\r\n }\r\n\r\n // check resource URL Origin as fallback\r\n let resourceURL: URL | undefined;\r\n try {\r\n resourceURL = new URL(resourceLowerCase);\r\n }\r\n catch (_e) {\r\n console.warn('Unsupported token request: Maybe invalid request URL: ', resourceLowerCase);\r\n }\r\n\r\n const tokenDefinition = getTokenDefinitionFromResourceStrings([resourceLowerCase, resourceURL?.origin.toLowerCase() ?? ''], getUserAccountType(this.identity), getCloudType());\r\n const resourceUrl = tokenDefinition?.resource ?? resourceLowerCase;\r\n let tokenType = tokenDefinition?.tokenType ?? 'UNKNOWN';\r\n\r\n if (tokenType === 'UNKNOWN') {\r\n console.warn('Unknown token resource:', resourceLowerCase, scopes, options);\r\n if(resourceLowerCase.includes('.sharepoint')) {\r\n tokenType = 'SHAREPOINT';\r\n }\r\n }\r\n\r\n return new Promise((resolve, reject) => {\r\n this.getOfficeFirstPartyAuthResultByResource(resourceUrl, tokenType, options).then((authResult) => {\r\n resolve({ token: authResult.accessToken });\r\n }).catch((error) => {\r\n console.error('Failed to acquire token for resource:', resourceLowerCase, error);\r\n TelemetryLogger.Instance.logError('AuthError', error, {\r\n ErrorMethod: 'getToken', TokenType: tokenType,\r\n });\r\n reject(error);\r\n });\r\n });\r\n }\r\n\r\n public getUserContext(): UserContext & Disposable & { signInState: string[] } {\r\n let identity = this.getIdentity();\r\n if (!identity) {\r\n identity = {\r\n id: '',\r\n name: '',\r\n tenantId: '',\r\n identityType: 0,\r\n };\r\n }\r\n const userIdSpace = this.getUserIdSpaceFromTenant(identity);\r\n return {\r\n get UserContext() {\r\n return this;\r\n },\r\n user: {\r\n id: identity.id,\r\n tenantId: identity.tenantId,\r\n userIdSpace: userIdSpace,\r\n oid: identity.oid,\r\n upn: identity.upn,\r\n },\r\n signInState: ['kmsi'],\r\n get Disposable() {\r\n return this;\r\n },\r\n dispose() {\r\n return;\r\n },\r\n };\r\n }\r\n\r\n private async getPreAuthToken(\r\n tokenType: TokenType,\r\n callback?: (token: IJwtToken) => Promise\r\n ): Promise {\r\n try {\r\n const startTime = Date.now();\r\n const token = await this.getOfficeFirstPartyAuthResultByTokenType(tokenType);\r\n const endTime = Date.now();\r\n console.log(`${tokenType} token acquired in ${endTime - startTime}ms`);\r\n if (callback) {\r\n const parsedToken = this.getOfficeFirstPartyParsedToken(token);\r\n await callback(parsedToken);\r\n }\r\n return token;\r\n }\r\n catch (error) {\r\n TelemetryLogger.Instance.logError('AuthError', error, { ErrorMethod: 'getPreAuthToken', TokenType: tokenType });\r\n console.error(`getPreAuthToken: Error fetching auth token for ${tokenType}:`, error);\r\n }\r\n return undefined;\r\n }\r\n\r\n private getResourceForScopes(scopes: string[]): string {\r\n let resource: string | undefined;\r\n scopes.forEach((scope) => {\r\n const separator = scope.lastIndexOf('/');\r\n const candidate = separator > 0 ? scope.substring(0, separator).toLowerCase() : '';\r\n if (resource === undefined) {\r\n resource = candidate;\r\n } else if (resource !== candidate) {\r\n // log error\r\n const error = new Error('All scopes must have the same resource');\r\n TelemetryLogger.Instance.logError('AuthError', error, { ErrorMethod: 'resourceForScopes' });\r\n throw error;\r\n }\r\n });\r\n\r\n return resource ?? '';\r\n }\r\n\r\n private getTenantGroupType(tenantId: string): UserTenantGroup {\r\n return tenantId === MsaTenantId ? 'Consumer' : 'Commercial';\r\n }\r\n\r\n private getUserIdSpaceFromTenant(user: Identity): UserIdSpace {\r\n return this.getTenantGroupType(user.tenantId) === 'Consumer' ? 'MSAPUID' : 'UserObjectId';\r\n }\r\n\r\n public async populateIdentity(): Promise {\r\n const identityPromise = DataAction.getActiveUserIdentity()\r\n .catch((error) => {\r\n TelemetryLogger.Instance.logError('AuthError', error, { ErrorMethod: 'populateIdentity' });\r\n console.error('Failed to get primary identity info:', error);\r\n return Promise.reject('Failed to get primary identity info from client');\r\n });\r\n\r\n const clientIdentity = await identityPromise;\r\n // If the user is signed in with an MSA account, we need to get the tenantId from the auth context\r\n if (isMSA(clientIdentity.accountType)) {\r\n const authContext = await getOfficeAuthContext();\r\n if (authContext) {\r\n clientIdentity.tenantId = authContext.value.tenantId;\r\n }\r\n }\r\n const identity = {\r\n id: clientIdentity.userId,\r\n name: clientIdentity.userName,\r\n tenantId: clientIdentity.tenantId,\r\n identityType: clientIdentity.accountType,\r\n upn: clientIdentity.email,\r\n };\r\n const identityChanged = identity.tenantId !== this.identity?.tenantId || identity.id !== this.identity?.id;\r\n\r\n if (identityChanged) {\r\n this.tokenPromiseCache.clear();\r\n this.bizChatAuthService.clearCache();\r\n this.identity = identity;\r\n // Must set BizChatAuthService identity after HostAuthService identity is set for MSA to work\r\n this.bizChatAuthService.setIdentity(identity);\r\n console.log('Identity changed:', this.identity);\r\n }\r\n }\r\n}\r\n","import { exponentialBackoff, allowlist } from '@fluidx/loop-sdk';\n/**\n * The current cache version that is being used to store `EcsResponse` objects in `LocalStorage`\n * Whenever we change the `EcsResponse` interface or we want to change what we store in cache,\n * we should bump this version to clean previous cached `EcsResponse`\n */ export const cacheVersion = 2;\n/**\n * Object representing the ECS request retry policy.\n */ export const ecsClientRetryPolicy = {\n maxRetries: 3,\n filter: allowlist([\n 429,\n 500,\n 503\n ]),\n backoffFn: exponentialBackoff(500 /* initialRetryIntervalMs */ )\n};\n/**\n * Regex pattern to validate guestAgents from ecsClientConfiguration\n */ export const guestAgentPattern = /.+\\S\\([^\\(\\)]+\\)$/;\n\n//# sourceMappingURL=EcsClientConstants.js.map","import { safeLocalStorage, queryParams } from '@fluidx/utilities';\nimport { cacheVersion } from '../EcsClientConstants';\n/**\n * Generates an ECS url based on a `EcsClientConfiguration`. This url is used to fetch settings from ECS.\n * @param ecsClientConfiguration The configuration of the `EcsClient`\n * @returns A string representing an ECS url.\n */ export function generateEcsFetchUrl(ecsClientConfiguration) {\n const queryParamsForUrl = new URLSearchParams();\n // parameter to scope the fetch to specific teams under the client in `ecsClientConfiguration.clientName`\n queryParamsForUrl.append('agents', ecsClientConfiguration.teamNames.join(','));\n // parameter to scope the fetch to specific teams under the other clients\n if (ecsClientConfiguration.guestAgents) {\n const guestAgents = {};\n for(let i = 0; i < ecsClientConfiguration.guestAgents.length; i += 1){\n const clientName = ecsClientConfiguration.guestAgents[i].substring(ecsClientConfiguration.guestAgents[i].indexOf('(') + 1, ecsClientConfiguration.guestAgents[i].indexOf(')'));\n const ecsTeamNameWithoutClient = ecsClientConfiguration.guestAgents[i].substring(0, ecsClientConfiguration.guestAgents[i].indexOf('('));\n guestAgents[clientName] = guestAgents[clientName] ? `${guestAgents[clientName]},${ecsTeamNameWithoutClient}` : ecsTeamNameWithoutClient;\n }\n Object.entries(guestAgents).forEach(([key, value])=>{\n queryParamsForUrl.append('guestAgents', `${value}(${key})`);\n });\n }\n Object.entries(ecsClientConfiguration.filters).forEach(([key, value])=>{\n if (value !== undefined) {\n queryParamsForUrl.append(key, value);\n }\n });\n const queryString = queryParamsForUrl.toString();\n const url = `${ecsClientConfiguration.host}/config/v1/${ecsClientConfiguration.clientName}/${ecsClientConfiguration.clientVersion}${queryString !== '' ? `?${queryString}` : ''}`;\n return url;\n}\n/**\n * Gets the setting override from the query params.\n * @param settingName - Name of the setting\n * @returns the setting and source when `settingName` is found, `undefined` otherwise.\n */ export function getSettingOverrideFromQueryParam(settingName) {\n const settingParamValue = queryParams.get(settingName);\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Exception added when eslint rule was added, this should be revisited when modifying this code\n if (settingParamValue !== null && settingParamValue !== undefined) {\n return safeSettingValueParse(settingParamValue);\n }\n return undefined;\n}\n/**\n * Gets the setting override from the LocalStorage.\n * @param settingName - Name of the setting\n * @returns the setting and source when `settingName` is found, `undefined` otherwise.\n */ export function getSettingOverrideFromLocalStorage(settingName) {\n const localStorageValue = safeLocalStorage()?.getItem(settingName);\n if (localStorageValue !== null && localStorageValue !== undefined) {\n return safeSettingValueParse(localStorageValue);\n }\n return undefined;\n}\n/**\n * Helper function used to validate that the expiration date and cache version are valid.\n * @param ecsResponse `EcsResponse` to validate\n * @returns `true` when the `EcsResponse` is valid, `false` otherwise\n */ export function ecsResponseIsStillValid(ecsResponse) {\n return (ecsResponse.cacheVersion || 0) === cacheVersion && ecsResponse.expires !== undefined && ecsResponse.expires.valueOf() > Date.now();\n}\nfunction safeSettingValueParse(settingValue) {\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- Exception added when eslint rule was added, this should be revisited when modifying this code\n if (settingValue !== null && settingValue !== undefined) {\n let value;\n try {\n value = JSON.parse(settingValue);\n } catch (error) {\n // catching error to return undefined because JSON.parse could easily throw if string is not formatted as JSON\n }\n // this check is to assign the correct value whenever the settingValue the is not in Json Format\n const valueToReturn = value !== undefined ? value : settingValue;\n // We also allow 'on' and 'off' to represent true and false\n if (valueToReturn === 'on' || valueToReturn === 'off') {\n return valueToReturn === 'on';\n }\n return valueToReturn;\n }\n return undefined;\n}\n\n//# sourceMappingURL=EcsClientUtilities.js.map","import { ActivityTracker, NamespaceLoggerAdapter, sendErrorEvent, sendTelemetryEvent } from '@fluidx/telemetry';\nimport { safeLocalStorage } from '@fluidx/utilities';\nimport { fetchWithRetry } from '@fluidx/loop-sdk';\nimport { generateEcsFetchUrl, getSettingOverrideFromLocalStorage, getSettingOverrideFromQueryParam, ecsResponseIsStillValid } from './utilities';\nimport { cacheVersion, ecsClientRetryPolicy, guestAgentPattern } from './EcsClientConstants';\n/**\n * Handles communication with Experimentation and Configuration Service.\n */ export class EcsClient {\n static{\n // eslint-disable-next-line @fluidx/ffx-rules/prefer-private-fields -- TODO: Exception added when rule was enabled. Please consider refactoring this to use ECMAScript # prefixed private properties for better minification\n this.previouslyLoggedSettingMetadata = new Set();\n }\n static{\n // eslint-disable-next-line @fluidx/ffx-rules/prefer-private-fields -- TODO: Exception added when rule was enabled. Please consider refactoring this to use ECMAScript # prefixed private properties for better minification\n this.settingMetadataToBeLogged = [];\n }\n static{\n /**\n * 10 seconds is the interval which will help us minimal data loss and is not too frequent.\n */ // eslint-disable-next-line @fluidx/ffx-rules/prefer-private-fields -- TODO: Exception added when rule was enabled. Please consider refactoring this to use ECMAScript # prefixed private properties for better minification\n this.settingsMetadataLoggingInterval = 10000;\n }\n /**\n * EcsClient constructor\n * @param ecsClientConfiguration Configuration used to connect with a specific ECS account.\n * @param logger Logger used for telemetry. We create a new `NamespaceLoggerAdapter` based on this.\n */ constructor(ecsClientConfiguration, logger){\n this.ecsClientConfiguration = ecsClientConfiguration;\n /**\n * The first time a setting is accessed, it's stored in this map for later consumption.\n * This ensures that a setting doesn't change for the life of the `EcsClient`, and it stores\n * the value and the source of a specific setting. The map is keyed off of the setting name and team name.\n *\n * Note that the setting name is itself a combination of a `teamName` (example: `'FluidExperiences'` )\n * and `settingName` (example: `'exampleSetting'` ). We need to use a combination of `teamName` and `settingName`\n * due to a single response possibly containing settings for multiple teams.\n */ // eslint-disable-next-line @fluidx/ffx-rules/prefer-private-fields -- TODO: Exception added when rule was enabled. Please consider refactoring this to use ECMAScript # prefixed private properties for better minification\n this.previouslyAccessedEcsSettings = new Map();\n /**\n * Flag to indicate whether settings have been fetched from ECS for this session.\n */ // eslint-disable-next-line @fluidx/ffx-rules/prefer-private-fields -- TODO: Exception added when rule was enabled. Please consider refactoring this to use ECMAScript # prefixed private properties for better minification\n this._settingsFetchedFromEcs = false;\n /**\n * Flag to indicate whether ECS response loaded event has been sent.\n * This is used to avoid sending telemetry multiple times for the same ECS response.\n */ // eslint-disable-next-line @fluidx/ffx-rules/prefer-private-fields -- TODO: Exception added when rule was enabled. Please consider refactoring this to use ECMAScript # prefixed private properties for better minification\n this._loadedEcsReponseEventSent = false;\n // Creating a new `NamespaceLoggerAdapter` based on the logger passed in the constructor.\n this.logger = logger && new NamespaceLoggerAdapter('EcsClient', logger);\n this.loadAndClearCache();\n if (this.ecsClientConfiguration.enableLogSettingsWithSource) {\n setInterval(()=>{\n this.logSettingsMetadata();\n }, EcsClient.settingsMetadataLoggingInterval);\n }\n }\n /**\n * Expose the flag for settings fetch status.\n * @returns Flag to indicate whether settings have been fetched from ECS for this session.\n */ get settingsFetchedFromEcs() {\n return this._settingsFetchedFromEcs;\n }\n /**\n * Fetch configurations from ECS and stores them in cache to be accessed in following loads.\n */ async fetch() {\n // We fetch if:\n // 1. The client instructs us to fetch regardless of cache/session status\n // 2. There is no cached EcsResponse\n // 3. The cached EcsResponse is expired\n // 4. The sessionId of cached EcsResponse is different than the current sessionId\n if (this.ecsClientConfiguration.alwaysFetchNewSettings || this.ecsResponseFromCache === undefined || !ecsResponseIsStillValid(this.ecsResponseFromCache) || this.ecsResponseFromCache.sessionId !== this.ecsClientConfiguration.sessionId) {\n // generating url to fetch based in `EcsClientConfiguration`\n const ecsFetchUrl = generateEcsFetchUrl(this.ecsClientConfiguration);\n if (!this.ecsResponsePromise) {\n this.ecsResponsePromise = this.fetchAndParse(ecsFetchUrl);\n this.ecsResponsePromise.then((ecsResponse)=>{\n // If ecsResponse is defined, we store it in cache so next time we load we can use it and avoid network calls.\n ecsResponse && this.cacheEcsResponse(ecsResponse);\n this._settingsFetchedFromEcs = true;\n }).catch(()=>{\n // this situation shouldn't happen because fetchAndParse is ensuring to not throw and logs errors in the ecsFetch Activity.\n });\n }\n return this.ecsResponsePromise;\n }\n return undefined;\n }\n /**\n * Computes the compound key for a given setting and team.\n *\n * @param settingName Name of the desired setting.\n * @param teamName Name of the ECS team to read the setting from.\n * @returns setting key\n */ // eslint-disable-next-line @fluidx/ffx-rules/prefer-private-fields -- TODO: Exception added when rule was enabled. Please consider refactoring this to use ECMAScript # prefixed private properties for better minification\n getSettingKey(settingName, teamName) {\n return `${settingName}_${teamName}`;\n }\n /**\n * Gets the value of a setting.\n *\n * @param settingName Name of the desired setting.\n * @param defaultValue Default value in case the setting is not found.\n * @param teamName Name of the ECS team to read the setting from.\n * @returns the correct setting value. Priority: Previously Accessed Value > Query Param Override > LocalStorage Override > Cached `EcsResponse` > `defaultValue`.\n */ getSetting(settingName, defaultValue, teamName) {\n this.maybeLogLoadedEcsResponseFromCache();\n return this.getSettingInternal(settingName, defaultValue, teamName);\n }\n /**\n * Logs the ECS response loaded event if it has not been logged yet.\n * Does nothing if the ECS response has already been sent.\n */ // eslint-disable-next-line @fluidx/ffx-rules/prefer-private-fields -- TODO: Exception added when rule was enabled. Please consider refactoring this to use ECMAScript # prefixed private properties for better minification\n maybeLogLoadedEcsResponseFromCache() {\n if (!this._loadedEcsReponseEventSent && this.ecsResponseFromCache) {\n this.logger && sendTelemetryEvent(this.logger, {\n eventName: 'loadedEcsResponseFromCache',\n settings: JSON.stringify(this.ecsResponseFromCache.ecsTeamsSettings),\n eTag: this.ecsResponseFromCache.eTag,\n configIds: JSON.stringify(this.ecsResponseFromCache.configIDs)\n });\n this._loadedEcsReponseEventSent = true;\n }\n }\n // eslint-disable-next-line @fluidx/ffx-rules/prefer-private-fields -- TODO: Exception added when rule was enabled. Please consider refactoring this to use ECMAScript # prefixed private properties for better minification\n logSettingsMetadata() {\n if (EcsClient.settingMetadataToBeLogged.length !== 0) {\n this.logger && sendTelemetryEvent(this.logger, {\n eventName: 'ECSSettingMetadatas',\n settings: JSON.stringify(EcsClient.settingMetadataToBeLogged)\n });\n EcsClient.settingMetadataToBeLogged = [];\n }\n }\n /**\n * See {@link getLiveSettingInternal} for more implementation details.\n *\n * @param settingName Name of the desired setting.\n * @param defaultValue Default value in case the setting is not found.\n * @param teamName Name of the ECS team to read the setting from.\n * @returns the correct setting value. Priority: Previously Accessed Value > Query Param Override > LocalStorage Override > Cached `EcsResponse` > `defaultValue`.\n */ async getLiveSetting(settingName, defaultValue, teamName) {\n this.maybeLogLoadedEcsResponseFromCache();\n return this.getLiveSettingInternal(settingName, defaultValue, teamName);\n }\n /**\n * Gets setting from all the different source available with priority.\n * Priority: Previously Accessed Value > Query Param Override > LocalStorage Override > Cached `EcsResponse` > `defaultValue`.\n * @returns the value and source of the specified setting\n */ // eslint-disable-next-line @fluidx/ffx-rules/prefer-private-fields -- TODO: Exception added when rule was enabled. Please consider refactoring this to use ECMAScript # prefixed private properties for better minification\n getSettingInternal(settingName, defaultValue, teamName) {\n let ecsSetting;\n const settingKey = this.getSettingKey(settingName, teamName);\n // Note we need to distinguish between undefined and other falsy values below\n /**\n * Getting the setting from the in-memory setting map.\n * We don't log telemetry here because it will be noise -- the initial location logged below will be indicative\n * of where the setting was read from for the user's entire session.\n */ if ((ecsSetting = this.previouslyAccessedEcsSettings.get(settingKey)) !== undefined) {\n return ecsSetting;\n }\n let settingSource = '';\n // If we don't find it in the current inMemory setting map, read from other sources\n if ((ecsSetting = getSettingOverrideFromQueryParam(settingName)) !== undefined) {\n settingSource = 'QueryParam';\n } else if ((ecsSetting = getSettingOverrideFromLocalStorage(settingName)) !== undefined) {\n settingSource = 'LocalStorage';\n } else if ((ecsSetting = this.getSettingFromCachedEcsResponse(settingName, teamName)) !== undefined) {\n settingSource = 'CachedEcsResponse';\n } else {\n settingSource = 'DefaultValue';\n ecsSetting = defaultValue;\n }\n // Storing the setting we retrieved in the memory so we always return the previously accessed value\n this.previouslyAccessedEcsSettings.set(settingKey, ecsSetting);\n if (this.ecsClientConfiguration.enableLogSettingsWithSource && !EcsClient.previouslyLoggedSettingMetadata.has(settingName)) {\n EcsClient.previouslyLoggedSettingMetadata.add(settingName);\n EcsClient.settingMetadataToBeLogged.push({\n settingName,\n settingValue: ecsSetting?.toString() ?? '',\n settingSource\n });\n }\n return ecsSetting;\n }\n /**\n * Gets the value of a setting from the most recent ECS fetch, ignoring all other storage locations except for the in-memory,\n * previously accessed settings cache. We use this value only if another piece of code has tried to access that setting during\n * the current session to avoid mismatched values during a session. In order of priority, this will check:\n * - In-memory cache (for previously access settings during this session)\n * - ECS settings fetch that happened this session\n * - Initiate a new ECS settings fetch if one hasn't happened for this session yet\n * - Fallback value provided if the setting isn't returned from any of the above.\n *\n * @param settingName Name of the desired setting.\n * @param defaultValue Default value in case the setting is not found.\n * @param teamName Name of the ECS team to read the setting from.\n */ // eslint-disable-next-line @fluidx/ffx-rules/prefer-private-fields -- TODO: Exception added when rule was enabled. Please consider refactoring this to use ECMAScript # prefixed private properties for better minification\n async getLiveSettingInternal(settingName, defaultValue, teamName) {\n let ecsSetting;\n const settingKey = this.getSettingKey(settingName, teamName);\n // Note: we need to distinguish between undefined and other falsy values below.\n /**\n * Getting the setting from the in-memory setting map. We return here if something else has already\n * tried to get this setting and skip the live fetch to make sure the value remains consistent for\n * the duration of the session.\n *\n * We don't log telemetry here because it will be noise -- the initial location logged will be indicative\n * of where the setting was read from for the user's entire session.\n */ if ((ecsSetting = this.previouslyAccessedEcsSettings.get(settingKey)) !== undefined) {\n return ecsSetting;\n }\n // Check to see if the setting was being overridden by the caller.\n if ((ecsSetting = getSettingOverrideFromQueryParam(settingName)) !== undefined) {} else if ((ecsSetting = getSettingOverrideFromLocalStorage(settingName)) !== undefined) {}\n // If the setting was being overridden by the caller, set it on the previously access settings, log, and return early to prevent fetching.\n if (ecsSetting !== undefined) {\n this.previouslyAccessedEcsSettings.set(settingKey, ecsSetting);\n return ecsSetting;\n }\n // Get the settings to use. If we've already fetched settings for this session, they'll be in the cache.\n // If we haven't fetched settings for this session, we fetch them now and wait for the response.\n const fetchResponse = this._settingsFetchedFromEcs ? this.getAllCachedEcsResponses()?.[this.ecsClientConfiguration.cacheKey] : await this.fetch();\n // Try to get the setting from the latest response. Fallback to default if the network call failed or\n // the setting wasn't found in the response.\n if ((ecsSetting = fetchResponse?.ecsTeamsSettings[teamName]?.[settingName]) !== undefined) {} else {\n // Fallback to default value, settingReadLocation already defaults to that.\n ecsSetting = defaultValue;\n }\n // Storing the setting we retrieved in the memory so we always return the previously accessed value\n this.previouslyAccessedEcsSettings.set(settingKey, ecsSetting);\n return ecsSetting;\n }\n /**\n * Gets setting from `EcsResponse` stored in cache.\n * @param settingName Name of the desired setting.\n * @param teamName Name of the ECS team to read the setting from.\n * @returns the value and source of the specified setting or\n * `undefined` if cache doesn't exist or setting is not found\n */ // eslint-disable-next-line @fluidx/ffx-rules/prefer-private-fields -- TODO: Exception added when rule was enabled. Please consider refactoring this to use ECMAScript # prefixed private properties for better minification\n getSettingFromCachedEcsResponse(settingName, teamName) {\n return this.ecsResponseFromCache?.ecsTeamsSettings[teamName]?.[settingName];\n }\n /**\n * Fetch response from the ECS service and return the response parsed as a `EcsResponse`.\n * @param ecsFetchUrl Url to used to fetch from ECS.\n * @returns A promise that, when resolved, returns the `EcsResponse` from ECS.\n */ // eslint-disable-next-line @fluidx/ffx-rules/prefer-private-fields -- TODO: Exception added when rule was enabled. Please consider refactoring this to use ECMAScript # prefixed private properties for better minification\n async fetchAndParse(ecsFetchUrl) {\n // Starting activity to measure the network call and be able to have a success rate for ECS calls.\n const ecsFetchTracker = ActivityTracker.start('EcsFetch', this.logger, {\n addUserTiming: true\n });\n let response;\n try {\n response = await fetchWithRetry(ecsFetchUrl, undefined, ecsClientRetryPolicy);\n } catch (error) {\n ecsFetchTracker.setResult(false, undefined, error);\n // Making sure fetchAndParse() doesn't throw\n return undefined;\n }\n if (response.result.status !== 200) {\n const ecsError = new Error(`Failed to Fetch from ECS. Response is not 200`);\n ecsFetchTracker.setResult(false, {\n status: response.result.status,\n statusText: response.result.statusText\n }, ecsError);\n return undefined;\n }\n const parsingPromise = this.parseResponseToEcsResponse(response);\n parsingPromise.then((ecsResponse)=>{\n // Getting the actual network call duration.\n let networkDurationMs;\n performance.getEntriesByName(ecsFetchUrl).map((entry)=>{\n if (entry.name.includes(this.ecsClientConfiguration.host)) {\n // Gets last call to `this.ecsClientConfiguration.host` added to performance entries.\n networkDurationMs = entry.duration;\n }\n });\n ecsFetchTracker.setResult(true, {\n eTag: ecsResponse.eTag,\n networkDurationMs,\n configIds: JSON.stringify(ecsResponse.configIDs)\n });\n }).catch((error)=>{\n ecsFetchTracker.setResult(false, undefined, error);\n });\n return parsingPromise;\n }\n /**\n * Parses a response to a `EcsResponse` that the `EcsClient` understands.\n * @param response response from ECS.\n * @returns an `EcsResponse` that represents the fetch from Ecs.\n */ // eslint-disable-next-line @fluidx/ffx-rules/prefer-private-fields -- TODO: Exception added when rule was enabled. Please consider refactoring this to use ECMAScript # prefixed private properties for better minification\n async parseResponseToEcsResponse(response) {\n const responseJson = await response.result.json();\n const ecsTeams = [\n ...this.ecsClientConfiguration.teamNames\n ];\n const ecsTeamsSettings = {};\n this.ecsClientConfiguration.guestAgents?.forEach((ecsTeam)=>{\n // removing trailing parentheses and clientName\n if (guestAgentPattern.test(ecsTeam)) {\n const ecsTeamNameWithoutClient = ecsTeam.substring(0, ecsTeam.indexOf('('));\n ecsTeams.push(ecsTeamNameWithoutClient);\n } else {\n this.logger && sendErrorEvent(this.logger, {\n eventName: 'ecsTeamFormat'\n }, new Error(`${ecsTeam} doesn't match the format ()`));\n }\n });\n for(let i = 0; i < ecsTeams.length; i += 1){\n if (responseJson[ecsTeams[i]]) {\n ecsTeamsSettings[ecsTeams[i]] = responseJson[ecsTeams[i]];\n }\n }\n const eTag = response.result.headers.get('ETag') || '';\n const configIDs = responseJson.ConfigIDs || {};\n let expires;\n // if override exist, use override to set the expires Date, if not, use response header.\n if (this.ecsClientConfiguration.cacheExpiresDurationOverrideInMin) {\n expires = new Date(Date.now() + this.ecsClientConfiguration.cacheExpiresDurationOverrideInMin * 60000 /* 60000 to turn min into ms */ );\n } else {\n const expiresHeader = response.result.headers.get('Expires');\n expires = expiresHeader ? new Date(expiresHeader) : undefined;\n }\n return {\n ecsTeamsSettings,\n eTag,\n configIDs,\n expires,\n cacheVersion,\n sessionId: this.ecsClientConfiguration.sessionId\n };\n }\n /**\n * Stores `EcsResponse` in `LocalStorage` cache.\n * @param ecsResponse `EcsResponse` retrieved from the ECS Service.\n */ // eslint-disable-next-line @fluidx/ffx-rules/prefer-private-fields -- TODO: Exception added when rule was enabled. Please consider refactoring this to use ECMAScript # prefixed private properties for better minification\n cacheEcsResponse(ecsResponse) {\n const localStorage = safeLocalStorage();\n if (!localStorage) {\n return;\n }\n try {\n // We took the decision to store multiple `EcsResponses`, so we can handle the case of different cacheKeys.\n const cachedEcsResponses = this.getAllCachedEcsResponses() || {};\n cachedEcsResponses[this.ecsClientConfiguration.cacheKey] = ecsResponse;\n localStorage.setItem(this.ecsClientConfiguration.responsesCacheKey, JSON.stringify(cachedEcsResponses));\n } catch (error) {\n this.logger && sendErrorEvent(this.logger, {\n eventName: 'cacheEcsResponse'\n }, error);\n }\n }\n /**\n * Gets all `EcsResponse` objects stored in `LocalStorage` cache.\n * It is possible to have more than one response stored in cache if the `cacheKey` is different.\n * e.g. We can have multiple accounts simultaneously loading fluid content and that could end up in multiple responses\n * being stored in cache.\n * @returns An object with all `EcsResponse` objects stored in cache. `undefined` if couldn't find any.\n */ // eslint-disable-next-line @fluidx/ffx-rules/prefer-private-fields -- TODO: Exception added when rule was enabled. Please consider refactoring this to use ECMAScript # prefixed private properties for better minification\n getAllCachedEcsResponses() {\n try {\n const localStorage = safeLocalStorage();\n const cachedEcsResponses = localStorage?.getItem(this.ecsClientConfiguration.responsesCacheKey);\n const parsedCurrentCachedResponses = cachedEcsResponses && JSON.parse(cachedEcsResponses);\n if (!parsedCurrentCachedResponses || Object.keys(parsedCurrentCachedResponses).length === 0) {\n return undefined;\n }\n // we need to parse the date due to JSON.parse returning a string instead of a date\n // doing it for all the responses because we use the expires property for cleaning.\n Object.entries(parsedCurrentCachedResponses).forEach(([_key, cachedEcsResponse])=>{\n if (typeof cachedEcsResponse.expires === 'string') {\n cachedEcsResponse.expires = new Date(cachedEcsResponse.expires);\n }\n });\n return parsedCurrentCachedResponses;\n } catch (error) {\n this.logger && sendErrorEvent(this.logger, {\n eventName: 'getAllCachedEcsResponses'\n }, error);\n }\n return undefined;\n }\n /**\n * Loads an `EcsResponse` to memory if there is one in the cache that matches `this.ecsClientConfiguration.cacheKey`\n * in `LocalStorage` and clears expired `EcsResponses` from LocalStorage\n */ // eslint-disable-next-line @fluidx/ffx-rules/prefer-private-fields -- TODO: Exception added when rule was enabled. Please consider refactoring this to use ECMAScript # prefixed private properties for better minification\n loadAndClearCache() {\n // Retrieving all the `EcsResponse` objects from `LocalStorage` cache\n const cachedEcsResponses = this.getAllCachedEcsResponses();\n if (cachedEcsResponses) {\n const cachedEcsResponse = cachedEcsResponses[this.ecsClientConfiguration.cacheKey];\n // Store an `EcsResponse` in memory if there is one for the current `this.ecsClientConfiguration.cacheKey`\n if (cachedEcsResponse) {\n this.ecsResponseFromCache = cachedEcsResponse;\n }\n // Clearing the cache after doing all the load,\n // this means that `this.ecsResponseFromCache` could be expired\n this.clearExpiredEcsResponsesFromCache(cachedEcsResponses);\n }\n }\n /**\n * Clears expired `EcsResponse` objects from cache to keep it as clean as possible.\n * We say an `EcsResponse` is expired whenever the expires date is before the current time\n * or the `cacheVersion` is older than the current one.\n * @param cachedEcsResponses `EcsResponse` objects retrieved from `LocalStorage` cache.\n */ // eslint-disable-next-line @fluidx/ffx-rules/prefer-private-fields -- TODO: Exception added when rule was enabled. Please consider refactoring this to use ECMAScript # prefixed private properties for better minification\n clearExpiredEcsResponsesFromCache(cachedEcsResponses) {\n try {\n const localStorage = safeLocalStorage();\n // return if `LocalStorage` is not defined\n if (!localStorage) {\n return;\n }\n // Creating a new object that is meant to replace the current cache.\n const notExpiredEcsResponses = {};\n // Iterate through responses and store the ones that are not expire.\n Object.entries(cachedEcsResponses).forEach(([key, cachedEcsResponse])=>{\n // We are also storing the `EcsResponse` for the current `EcsClient` ignoring expiration for the next reasons:\n // 1. If the current cached `EcsResponse` is expired, we are going to kick off a network request to update it.\n // 2. In the situation of creating multiple `EcsSettingsProvider` in a short time, if we don't do this,\n // the first one to clear the cache is going to delete the expired cache for the other\n // `EcsSettingsProvider` which are trying to read the same `EcsResponse`.\n // 3. If the network request that is meant to update the expired cache doesn't succeed,\n // we are going to end up deleting the cache for following loads.\n if (ecsResponseIsStillValid(cachedEcsResponse) || key === this.ecsClientConfiguration.cacheKey) {\n notExpiredEcsResponses[key] = cachedEcsResponse;\n }\n });\n // Write responses into `LocalStorage`\n localStorage.setItem(this.ecsClientConfiguration.responsesCacheKey, JSON.stringify(notExpiredEcsResponses));\n } catch (error) {\n this.logger && sendErrorEvent(this.logger, {\n eventName: 'clearExpiredEcsResponsesFromCache'\n }, error);\n }\n }\n}\n\n//# sourceMappingURL=EcsClient.js.map","import { getServiceEndpoint } from '@fluidx/service-endpoints';\nfunction getEcsEndpoint(audience) {\n return getServiceEndpoint('ecs', audience);\n}\n/**\n * Object used to change the setup of a `EcsClient`.\n */ const defaultResponsesCacheKey = 'FluidEcsClientResponses';\n/**\n * Gets the `EcsClientConfiguration` which contains information about how to connect to an ECS account\n * and information about the current request, like filters.\n * @param ecsSettingsProviderConfiguration Configuration for the EscSettingsProvider.\n * @returns An `EcsClientConfiguration` object used to setup an `EcsClient`\n */ export function getFluidEcsClientConfiguration(ecsSettingsProviderConfiguration) {\n const { ecsFilters, hostName, sessionId, responsesCacheKeyOverride, cacheExpiresDurationOverrideInMin, fetchFluidExperiencesSettings = true, fetchHostExperiencesSettings = true, fetchSegmentationSettings = true, alwaysFetchNewSettings, enableLogSettingsWithSource = false } = ecsSettingsProviderConfiguration;\n const { userContext } = ecsFilters;\n const audience = modifyAudience(ecsFilters.audience);\n const userId = userContext.user?.id;\n const tenantId = userContext.user?.tenantId;\n const filters = {\n audience,\n userId,\n tenantId,\n hostName\n };\n const cacheKey = `${userId}${hostName}${audience}`;\n const responsesCacheKey = responsesCacheKeyOverride || defaultResponsesCacheKey;\n const teamNames = [];\n fetchFluidExperiencesSettings && teamNames.push('FluidExperiences');\n fetchHostExperiencesSettings && teamNames.push('HostExperiences');\n fetchSegmentationSettings && teamNames.push('Segmentation');\n return {\n host: getEcsEndpoint(audience),\n clientName: 'Fluid',\n clientVersion: '0.0.0.1',\n teamNames,\n filters,\n cacheKey,\n responsesCacheKey,\n cacheExpiresDurationOverrideInMin,\n sessionId,\n alwaysFetchNewSettings,\n enableLogSettingsWithSource\n };\n}\nfunction modifyAudience(audience) {\n // 'Development' is a not a valid ECS/Control Tower audience. We don't have it configured in Control Torwer. Hence treat it as 'Staging';\n return audience === 'Development' ? 'Staging' : audience;\n}\n\n//# sourceMappingURL=EcsSettingsProviderUtilities.js.map","import { EcsClient } from './EcsClient';\nimport { getFluidEcsClientConfiguration } from './utilities';\n/**\n * Type guard that checks if we have an `EcsClientConfiguration` or an `EcsSettingsProviderConfiguration`.\n */ function isEcsClientConfiguration(configuration) {\n return 'teamNames' in configuration;\n}\n/**\n * A SettingsProvider class that uses ECS as a cloud service\n */ export class EcsSettingsProvider {\n get SettingsProvider() {\n return this;\n }\n /**\n * Returns whether real settings have been downloaded from ECS, using the client as a source of truth.\n */ get settingsFetchedFromEcs() {\n return this.ecsClient.settingsFetchedFromEcs;\n }\n constructor(ecsConfiguration, logger){\n this.ecsClient = isEcsClientConfiguration(ecsConfiguration) ? new EcsClient(ecsConfiguration, logger) : new EcsClient(getFluidEcsClientConfiguration(ecsConfiguration), logger);\n this.audience = isEcsClientConfiguration(ecsConfiguration) ? ecsConfiguration.filters.audience : ecsConfiguration.ecsFilters.audience;\n this.fetchSettings().catch(()=>{});\n }\n //#region Disposable implementation\n get Disposable() {\n return this;\n }\n /**\n * Clean-up/disposal of resources\n * Use this guide https://office.visualstudio.com/OC/_git/office-bohemia?path=/docs/partner-guide/containers/HowToDisposeResources.md\n * for reference of what resources to dispose\n */ dispose() {}\n //#endregion Disposable\n /**\n * Fetch settings from ECS. Allows callers to wait for real ECS settings before passing\n * to APIs that expects a SettingsProvider. This function should NOT be called during app\n * boot which can impact page load time negatively. It's better suited for background work.\n */ async fetchSettings() {\n await this.ecsClient.fetch();\n }\n /**\n * Reading the setting's value from ECS using the internal `EcsClient`.\n * @param settingName The name of the setting to read from ECS.\n * @param defaultValue The default value in case ECS is not serving the setting or the ECS fetch hasn't finished.\n * @param namespace Used to specify the ECS team's name of the setting we are trying to read.\n * @returns The setting's value to be used by the caller.\n */ getSetting(settingName, defaultValue, namespace) {\n return this.ecsClient.getSetting(settingName, defaultValue, namespace);\n }\n /**\n * Reading the setting's value from ECS using the internal `EcsClient`. This differs from `getSetting` in that it will\n * always get the setting from the most recent network fetch, only returning the value from the in-memory cache if\n * another piece of code has already tried to read that setting (avoids mismatching settings values over the duration\n * of a single session).\n * @param settingName The name of the setting to read from ECS.\n * @param defaultValue The default value in case ECS is not serving the setting or the ECS fetch failed.\n * @param namespace Used to specify the ECS team's name of the setting we are trying to read.\n * @returns The setting's value to be used by the caller.\n */ async getLiveSetting(settingName, defaultValue, namespace) {\n return this.ecsClient.getLiveSetting(settingName, defaultValue, namespace);\n }\n}\n\n//# sourceMappingURL=EcsSettingsProvider.js.map","import type { EventName } from './Events';\r\nimport type { TelemetryEventData, TelemetryEventDataTypes } from './ITelemetryLogger';\r\nimport { TelemetryLogger } from './TelemetryLogger';\r\n\r\nexport class TelemetryActivityTracker {\r\n private telemetryData: TelemetryEventData = {};\r\n private activityName: EventName;\r\n\r\n constructor(activityName: EventName)\r\n {\r\n this.activityName = activityName;\r\n }\r\n\r\n private finishWithFailure(error?: Error | unknown) {\r\n TelemetryLogger.Instance.logError(\r\n this.activityName,\r\n error,\r\n this.telemetryData\r\n );\r\n }\r\n\r\n private finishWithSuccess() {\r\n TelemetryLogger.Instance.logEvent(\r\n this.activityName,\r\n this.telemetryData\r\n );\r\n }\r\n\r\n public addData(key: string, value: TelemetryEventDataTypes) {\r\n this.telemetryData[key] = value;\r\n }\r\n\r\n public static async runActivity(\r\n activityName: EventName,\r\n activity: (tracker: TelemetryActivityTracker) => Promise\r\n ): Promise {\r\n const tracker = new TelemetryActivityTracker(activityName);\r\n\r\n try {\r\n const startTime = Date.now();\r\n const result = await activity(tracker);\r\n const endTime = Date.now();\r\n tracker.addData('Duration', endTime - startTime);\r\n tracker.finishWithSuccess();\r\n return result;\r\n } catch (error) {\r\n tracker.finishWithFailure(error);\r\n throw error;\r\n }\r\n }\r\n\r\n}\r\n","import type { Audience } from '@fluidx/loop-types';\r\nimport type { EcsTeamSettings } from '@fluidx/settings-provider/lib/interfaces/ecsClientInterfaces';\r\n\r\ntype BizChatDeploymentRings = 'SDFV2' | 'MSIT' | 'WW' | 'ITAR';\r\ntype BizChatEnvironments = 'SDF' | 'MSIT' | 'Prod' | 'GCCModerate' | 'GCCHigh' | 'DoD';\r\n\r\nexport const getDeploymentRingFromAudience = (audience: Audience): BizChatDeploymentRings => {\r\n switch (audience) {\r\n case 'Automation':\r\n case 'Development':\r\n case 'Dogfood':\r\n case 'Staging':\r\n case 'Local':\r\n case 'SyntheticTraffic':\r\n return 'SDFV2';\r\n case 'Preview':\r\n return 'MSIT';\r\n case 'GCC':\r\n return 'WW';\r\n case 'GCC-High':\r\n return 'ITAR';\r\n case 'DoD':\r\n return 'ITAR';\r\n default:\r\n return 'WW';\r\n }\r\n};\r\n\r\nexport const getEnvironmentFromAudience = (audience: Audience): BizChatEnvironments => {\r\n switch (audience) {\r\n case 'Automation':\r\n case 'Development':\r\n case 'Dogfood':\r\n case 'Staging':\r\n case 'Local':\r\n case 'SyntheticTraffic':\r\n return 'SDF';\r\n case 'Preview':\r\n return 'MSIT';\r\n case 'GCC':\r\n return 'GCCModerate';\r\n case 'GCC-High':\r\n return 'GCCHigh';\r\n case 'DoD':\r\n return 'DoD';\r\n default:\r\n return 'Prod';\r\n }\r\n};\r\n\r\n/**\r\n * Transforms EcsTeamSettings to a Record with string or boolean values\r\n * @param teamSettings The ECS team settings to transform\r\n * @returns A record with string or boolean values, or undefined if input is undefined\r\n */\r\nexport const transformEcsTeamSettings = (teamSettings: EcsTeamSettings | undefined): Record | undefined => {\r\n if (!teamSettings) {\r\n return undefined;\r\n }\r\n\r\n const transformed: Record = {};\r\n\r\n for (const [key, value] of Object.entries(teamSettings)) {\r\n if (typeof value === 'boolean') {\r\n transformed[key] = value;\r\n } else if (typeof value === 'string') {\r\n transformed[key] = value;\r\n } else if (typeof value === 'number') {\r\n transformed[key] = value.toString();\r\n } else if (value === null || value === undefined) {\r\n // skip null and undefined values\r\n continue;\r\n } else {\r\n // For any other type (objects, arrays, etc.), convert to string representation\r\n try {\r\n transformed[key] = JSON.stringify(value);\r\n } catch (error) {\r\n console.error(`Error transforming ECS team setting ${key} to string`, error);\r\n }\r\n }\r\n }\r\n\r\n return transformed;\r\n};\r\n","import type {\r\n Environment\r\n} from '@fluidx/loop-types';\r\nimport { getServiceEndpoint } from '@fluidx/service-endpoints';\r\nimport type { EcsResponse } from '@fluidx/settings-provider';\r\nimport { EcsSettingsProvider } from '@fluidx/settings-provider';\r\nimport type { HostAuthService } from '../auth/HostAuthService';\r\nimport { isMSA } from '../auth/utils';\r\nimport { TelemetryActivityTracker } from '../telemetry/TelemetryActivityTracker';\r\nimport { TelemetryLogger } from '../telemetry/TelemetryLogger';\r\nimport {\r\n getDeploymentRingFromAudience, getEnvironmentFromAudience, transformEcsTeamSettings\r\n} from './ecsUtils';\r\n\r\n/**\r\n * Represents all cached ECS responses keyed by cache key\r\n */\r\nexport interface CachedEcsResponses {\r\n [cacheKey: string]: EcsResponse;\r\n}\r\n\r\n/**\r\n * Represents the settings provider constants for M365 Chat\r\n */\r\nexport const M365CHAT_APP_VERSION_SETTING_NAME = 'appVersion';\r\nconst M365_CHAT_ECS_CLIENT_NAME = 'M365ChatClient';\r\nconst M365CHAT_ECS_FILTER_HOST_NAME = 'OneNote';\r\nconst M365CHAT_ECS_RESPONSES_CACHE_KEY = 'M365ChatEcsResponseCache';\r\nconst M365CHAT_ECS_CLIENT_VERSION = '1.0.0.0';\r\nexport const M365CHAT_APP_ECS_PROJECT_TEAM_NAME = 'M365ChatClient';\r\nconst M365CHAT_VERSIONING_ECS_PROJECT_TEAM_NAME = 'AppVersion';\r\nconst M365CHAT_ECS_PROJECT_TEAMS = [\r\n M365CHAT_APP_ECS_PROJECT_TEAM_NAME,\r\n M365CHAT_VERSIONING_ECS_PROJECT_TEAM_NAME\r\n];\r\nconst FETCHSETTINGS_TIMEOUT_MS = 2000;\r\n\r\ntype ECSClient = { ecsClient?: {\r\n ecsResponsePromise?: Promise;\r\n getAllCachedEcsResponses?: () => CachedEcsResponses;\r\n}; };\r\n\r\nexport class M365ChatSettingsProvider extends EcsSettingsProvider {\r\n private cacheKey: string;\r\n constructor(\r\n environment: Environment,\r\n authService: HostAuthService,\r\n locale: string,\r\n ) {\r\n const cacheKey = `${authService.getIdentity()?.id}${M365CHAT_ECS_FILTER_HOST_NAME}${environment.audience}`;\r\n super({\r\n host: getServiceEndpoint('ecs', environment.audience),\r\n clientName: M365_CHAT_ECS_CLIENT_NAME,\r\n clientVersion: M365CHAT_ECS_CLIENT_VERSION,\r\n teamNames: M365CHAT_ECS_PROJECT_TEAMS,\r\n cacheKey,\r\n responsesCacheKey: M365CHAT_ECS_RESPONSES_CACHE_KEY,\r\n alwaysFetchNewSettings: true,\r\n enableLogSettingsWithSource: true,\r\n filters: {\r\n audience: environment.audience,\r\n HostName: M365CHAT_ECS_FILTER_HOST_NAME,\r\n AccountType: isMSA(authService.getIdentity()?.identityType)\r\n ? 'MSA'\r\n : 'AAD',\r\n TenantId: authService.getIdentity()?.tenantId,\r\n UserID: authService.getIdentity()?.id,\r\n Locale: locale,\r\n Environment: getEnvironmentFromAudience(environment.audience),\r\n DeploymentRing: getDeploymentRingFromAudience(environment.audience),\r\n },\r\n });\r\n this.cacheKey = cacheKey;\r\n }\r\n /**\r\n * Exposes the getAllCachedEcsResponses method from the internal EcsClient\r\n * @returns All cached ECS responses or undefined if none exist\r\n */\r\n private async getAllCachedEcsResponses(): Promise {\r\n return TelemetryActivityTracker.runActivity('GetAllCachedEcsResponses', async () => {\r\n try {\r\n // Wait for the ECS settings to be fetched if they fetch has not been done yet\r\n if (!this.settingsFetchedFromEcs) {\r\n const ecsPromise = (this as unknown as ECSClient).ecsClient?.ecsResponsePromise;\r\n if (!ecsPromise) {\r\n console.error('ecsResponsePromise not initialized');\r\n throw new Error('ecsResponsePromise not initialized');\r\n }\r\n await Promise.race([\r\n ecsPromise,\r\n new Promise((_, reject) =>\r\n setTimeout(\r\n () => reject(new Error('Timeout while fetching ECS settings')),\r\n FETCHSETTINGS_TIMEOUT_MS,\r\n ),),\r\n ]);\r\n }\r\n // Access the private ecsClient property and call its getAllCachedEcsResponses method\r\n const allResponses =\r\n (this as unknown as ECSClient).ecsClient?.getAllCachedEcsResponses?.() as CachedEcsResponses;\r\n return allResponses;\r\n } catch (error) {\r\n console.error('Error while fetching ECS settings', error);\r\n TelemetryLogger.Instance.logError(\r\n 'M365ChatSettingsProviderError',\r\n error,\r\n { ErrorMethod: 'getAllCachedEcsResponses' },\r\n );\r\n return undefined;\r\n }\r\n });\r\n }\r\n\r\n public async getAllM365ChatFeatureSettings(): Promise | undefined> {\r\n const cachedResponses = await this.getAllCachedEcsResponses();\r\n console.log('Cached ECS responses', cachedResponses);\r\n const m365ChatClientFeatureSettings =\r\n cachedResponses?.[this.cacheKey]?.ecsTeamsSettings?.[M365CHAT_APP_ECS_PROJECT_TEAM_NAME];\r\n return transformEcsTeamSettings(m365ChatClientFeatureSettings);\r\n }\r\n}\r\n","import { NamespaceLoggerAdapter } from '../Utilities/NamespaceLoggerAdapter';\nimport { EventCategory } from '@fluidx/office-fluid-types';\n/** Whether the current browser environment includes support for FinalizationRegistry */ const isFinalizationRegistrySupported = typeof FinalizationRegistry === 'function';\nconst memoryLeakTrackerNamespace = 'MemoryLeakTracker';\n/**\n * This class is used to log telemetry about whether and when important objects associated with a parent elembent (container or loop dependency container)\n * (e.g. the container's iframe, or large injected dependencies) get garbage collected after this parent is closed,\n * which is useful for detecting memory leaks. New instances should be created for each element.\n */ export class MemoryLeakTracker {\n /**\n * Creates a new MemoryLeakTracker instance for tracking objects related to a particular container.\n * @param loggingDelay How long to wait (in milliseconds) after container are closed before sending memory leak telemetry.\n * @param hostLogger The logger instance that the host has passed to the container creation code.\n * @param subcategory The subcategory to use when logging telemetry\n * @param persistedProperties Additional properties that should be logged with every telemetry event that the tracker sends.\n */ constructor(loggingDelay, hostLogger, subcategory, persistedProperties){\n this.loggingDelay = loggingDelay;\n this.subcategory = subcategory;\n /** A map containing the timestamp (value) of when each tracked objectId (key) is garbage collected. */ // eslint-disable-next-line @fluidx/ffx-rules/prefer-private-fields -- TODO: Exception added when rule was enabled. Please consider refactoring this to use ECMAScript # prefixed private properties for better minification\n this.trackedObjectsGcTime = new Map();\n /** A set containing all tracked objectIds, including those that have not yet been garbage collected. */ // eslint-disable-next-line @fluidx/ffx-rules/prefer-private-fields -- TODO: Exception added when rule was enabled. Please consider refactoring this to use ECMAScript # prefixed private properties for better minification\n this.trackedObjects = new Set();\n if (!isFinalizationRegistrySupported) {\n this.isDisposed = true;\n return;\n }\n this.logger = new NamespaceLoggerAdapter(memoryLeakTrackerNamespace, hostLogger, persistedProperties);\n this.finalizationRegistry = new FinalizationRegistry((objectType)=>{\n this.trackedObjectsGcTime.set(objectType, globalThis.performance.now());\n // If we have garbage collected all of the objects we are tracking, don't wait to send the telemetry.\n if (this.trackedObjectsGcTime.size === this.trackedObjects.size) {\n this.closeAndSendTelemetry();\n }\n });\n }\n //#region Disposable implementation\n get Disposable() {\n return this;\n }\n /**\n * Clean-up/disposal of resources\n * Use this guide https://office.visualstudio.com/OC/_git/office-bohemia?path=/docs/partner-guide/containers/HowToDisposeResources.md\n * for reference of what resources to dispose\n */ dispose() {\n this.isDisposed = true;\n if (this.loggingTimeout) {\n clearTimeout(this.loggingTimeout);\n }\n this.logger?.Disposable.dispose();\n this.logger = undefined;\n }\n //#endregion Disposable\n /**\n * Registers an object that has the potential to leak (e.g. the container's iframe, or large injected dependencies)\n * so we can log telemetry about when/if it was released after the parent element was closed.\n */ trackObject(objectType, objectToTrack) {\n if (this.isDisposed) {\n return;\n }\n this.trackedObjects.add(objectType);\n this.finalizationRegistry?.register(objectToTrack, objectType);\n }\n /** This should be called when the parent element associated with this tracker is closed. */ markParentAsClosed() {\n if (this.isDisposed) {\n return;\n }\n this.parentClosedTime = globalThis.performance.now();\n this.loggingTimeout = setTimeout(()=>this.closeAndSendTelemetry(), this.loggingDelay);\n }\n /** Send telemetry about the objects we are tracking and whether they are still alive or when they were garbage collected, and dispose this instance. */ // eslint-disable-next-line @fluidx/ffx-rules/prefer-private-fields -- TODO: Exception added when rule was enabled. Please consider refactoring this to use ECMAScript # prefixed private properties for better minification\n closeAndSendTelemetry() {\n const gcTimes = {};\n for (const objectType of this.trackedObjects){\n const gcTime = this.trackedObjectsGcTime.get(objectType);\n gcTimes[objectType] = typeof gcTime === 'number' ? this.parentClosedTime ? gcTime - this.parentClosedTime : true : false;\n }\n const finalObjectGcTime = this.trackedObjects.size > 0 ? this.trackedObjectsGcTime.size > 0 ? this.parentClosedTime ? Math.max(...this.trackedObjectsGcTime.values()) - this.parentClosedTime : true : false : undefined;\n this.logger?.send({\n category: EventCategory.Generic,\n subCategory: this.subcategory,\n eventName: 'MemoryCleanup',\n gcTimes: JSON.stringify(gcTimes),\n finalObjectGcTime,\n loggingDelay: this.loggingDelay\n });\n this.Disposable.dispose();\n }\n}\n\n//# sourceMappingURL=MemoryLeakTracker.js.map","/* eslint-disable @typescript-eslint/no-restricted-types -- FluidObjectSymbolProvider is needed for compatibility with IFluidDependencySynthesizer */ import { LazyPromise } from '@fluidframework/core-utils/legacy';\nimport { IFluidDependencySynthesizer } from '@fluidframework/synthesize/legacy';\nfunction getKey(o) {\n return o ? Object.keys(o).sort().join(',') : '';\n}\n/**\n * Optimized implementation of DependencyContainer\n * Differences from DependencyContainer in \\@fluidframework/synthesize\n * - Adds memoization to .synthesize function so that we are not re-creating the returned objects\n * - Implementation has been heavily optimized to minimized the number of .synthesize calls to parents\n * We intend on merging the changes here into \\@fluidframework/synthesize once we done experimenting with them\n */ export class OptimizedDependencyContainer {\n constructor(...parents){\n // eslint-disable-next-line @fluidx/ffx-rules/prefer-private-fields -- TODO: Exception added when rule was enabled. Please consider refactoring this to use ECMAScript # prefixed private properties for better minification\n this.providers = new Map();\n // eslint-disable-next-line @fluidx/ffx-rules/prefer-private-fields -- TODO: Exception added when rule was enabled. Please consider refactoring this to use ECMAScript # prefixed private properties for better minification\n this.memo = new Map();\n // eslint-disable-next-line @fluidx/ffx-rules/prefer-private-fields -- TODO: Exception added when rule was enabled. Please consider refactoring this to use ECMAScript # prefixed private properties for better minification\n this.resolveLocalProvider = (t)=>{\n const provider = this.providers.get(t);\n if (!provider) {\n return undefined;\n }\n // The double nested gets are required for lazy loading the provider resolution\n if (typeof provider === 'function') {\n return {\n get: ()=>{\n if (typeof provider === 'function') {\n return Promise.resolve(this.IFluidDependencySynthesizer).then(async (fds)=>provider(fds)).then((p)=>p?.[t]);\n }\n return undefined;\n }\n };\n }\n return {\n get: ()=>{\n return new LazyPromise(async ()=>Promise.resolve(provider).then((p)=>{\n if (p) {\n return p[t];\n }\n return undefined;\n }));\n }\n };\n };\n this.parents = parents.filter((v)=>v !== undefined);\n }\n get IFluidDependencySynthesizer() {\n return this;\n }\n /**\n * Add a new provider\n * @param type - Name of the Type T being provided\n * @param provider - A provider that will resolve the T correctly when asked\n * @throws - If passing a type that's already registered\n */ register(type, provider) {\n if (this.providers.has(type)) {\n throw new Error(`Attempting to register a provider of type ${String(type)} that already exists`);\n }\n // Invalidate the cache when we register something new.\n this.clearMemo();\n this.providers.set(type, provider);\n }\n /**\n * Remove a provider\n * NOTE: Providers that have been unregistered from this dependency container could still have references to them stored in\n * memoization cache of other (child) dependency containers or stored by components\n * @param type - Name of the provider to remove\n */ unregister(type) {\n if (this.providers.has(type)) {\n this.providers.delete(type);\n this.clearMemo(); // clear memoization cache since something was deleted\n }\n }\n clearMemo() {\n this.memo.clear();\n }\n /**\n * {@inheritDoc (IFluidDependencySynthesizer:interface).synthesize}\n */ synthesize(optionalTypes, requiredTypes) {\n const key = `required:${getKey(requiredTypes)},optional:${getKey(optionalTypes)}`;\n if (this.memo.has(key)) {\n return this.memo.get(key);\n }\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const base = {};\n this.generateRequired(base, requiredTypes);\n this.generateOptional(base, optionalTypes);\n Object.defineProperty(base, IFluidDependencySynthesizer, {\n get: ()=>this\n });\n this.memo.set(key, base);\n return base;\n }\n /**\n * {@inheritDoc (IFluidDependencySynthesizer:interface).has}\n * @param type - type to check\n * @param excludeParents - If true, exclude checking parent registries\n */ has(type, excludeParents) {\n if (this.providers.has(type)) {\n return true;\n }\n if (excludeParents !== true) {\n return this.parents.some((p)=>p.has(type));\n }\n return false;\n }\n // eslint-disable-next-line @fluidx/ffx-rules/prefer-private-fields -- TODO: Exception added when rule was enabled. Please consider refactoring this to use ECMAScript # prefixed private properties for better minification\n generateRequired(base, types) {\n if (types === undefined) {\n return;\n }\n const remainingKeys = this.generate(base, types);\n if (remainingKeys.size !== 0) {\n const missingTypes = Array.from(remainingKeys).join(', ');\n throw new Error(`Object attempted to be created without registered required providers ${missingTypes}`);\n }\n }\n // eslint-disable-next-line @fluidx/ffx-rules/prefer-private-fields -- TODO: Exception added when rule was enabled. Please consider refactoring this to use ECMAScript # prefixed private properties for better minification\n generateOptional(base, types) {\n if (types === undefined) {\n return;\n }\n const remainingKeys = this.generate(base, types);\n // back-compat: in 0.56 we allow undefined in the types, but we didn't before\n // this will keep runtime back compat, eventually we should support undefined properties\n // rather than properties that return promises that resolve to undefined\n for (const key of remainingKeys){\n const provider = {\n get: async ()=>undefined\n };\n Object.defineProperty(base, key, provider);\n }\n }\n /**\n * Generates required types on base object\n * @param base - base object to add properties to\n * @param types - types to be generated\n * @returns Set of remaining keys that couldn't be generated\n */ /* eslint-disable-next-line @fluidx/ffx-rules/prefer-private-fields --\n FluidObjectSymbolProvider is needed for compatibility with IFluidDependencySynthesizer\n TODO: Exception added when rule was enabled. Please consider refactoring this to use ECMAScript # prefixed private properties for better minification */ generate(base, types) {\n const keys = new Set(Object.keys(types));\n for (const key of keys){\n const provider = this.resolveLocalProvider(key);\n if (provider) {\n keys.delete(key);\n Object.defineProperty(base, key, provider);\n }\n }\n for (const parent of this.parents){\n // Create an object with the remaining types we need from parents\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const remainingTypes = {};\n for (const remainingType of keys){\n remainingTypes[remainingType] = remainingType;\n }\n // Ask parent to synthesize those types\n const propsFromParent = parent.synthesize(remainingTypes, undefined);\n // Add the ones we got from this parent to base object and delete them from keys\n for (const key of keys){\n const descriptor = Object.getOwnPropertyDescriptor(propsFromParent, key);\n if (descriptor) {\n keys.delete(key);\n Object.defineProperty(base, key, descriptor);\n }\n }\n }\n return keys;\n }\n}\n\n//# sourceMappingURL=OptimizedDependencyContainer.js.map","/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n/**\n * @legacy\n * @alpha\n */\nexport const IFluidDependencySynthesizer = \"IFluidDependencySynthesizer\";\n//# sourceMappingURL=IFluidDependencySynthesizer.js.map","/* eslint-disable @typescript-eslint/no-restricted-types -- FluidObjectSymbolProvider is needed for compatibility with IFluidDependencySynthesizer */ import { LazyPromise } from '@fluidframework/core-utils/legacy';\nimport { MemoryLeakTracker } from '@fluidx/telemetry';\nimport { OptimizedDependencyContainer } from './OptimizedDependencyContainer';\n/**\n * Dependency Container Wrapper created to register container services\n * Implementation based on the DependencyContainer in fluid-framework\n * https://github.com/microsoft/FluidFramework/blob/main/packages/framework/synthesize/src/dependencyContainer.ts\n */ export class LoopDependencyContainer {\n constructor(parentDependencySynthesizer, dependencyContainerOptions){\n // eslint-disable-next-line @fluidx/ffx-rules/prefer-private-fields -- TODO: Exception added when rule was enabled. Please consider refactoring this to use ECMAScript # prefixed private properties for better minification\n this.synthDependencies = new Map();\n this.dependencySynthesizer = new OptimizedDependencyContainer(parentDependencySynthesizer);\n const providers = parentDependencySynthesizer?.synthesize({\n NamespaceLogger: 'NamespaceLogger'\n }, undefined);\n providers?.NamespaceLogger?.then((logger)=>{\n if (logger) {\n this.memoryLeakTracker = new MemoryLeakTracker(dependencyContainerOptions?.memoryLeakDetectionWaitTime ?? 300000, logger, 'LoopDependencyContainer');\n }\n }).catch(()=>{\n /* can't do anything since if this fails we don't have access to the logger*/ });\n }\n get IFluidDependencySynthesizer() {\n return this;\n }\n /**\n * Adds a new provider into the dependencySynthesizer and adds it to the dataConnector\n * to track it and connect to the producer/consumer environment\n * @param type Name of the Type T being provided\n * @param provider Service/Component that will resolve the T correctly when asked\n * @throws if passing a type that's already registered\n */ register(type, provider) {\n let providers;\n // to guarantee that the dependencies are part of the producer-consumer relationship, we need to fetch the DataConnector\n // even if the DataConnector is registered first, we are still synthesizing an empty value saving it in the memo for the OptimizedDepContainer\n // so now we are only synthesizing the value (and saving in the memo) when the DataConnector has already been registered\n if (this.dependencySynthesizer.has('DataConnector')) {\n // we synthesize the DataConnector before registering the service to respect the order of registration\n // given the LazyPromise with respect to the DataConnector\n providers = this.dependencySynthesizer.synthesize({\n DataConnector: 'DataConnector'\n }, undefined /* requiredTypes*/ );\n }\n this.dependencySynthesizer.register(type, new LazyPromise(async ()=>{\n const service = await Promise.resolve(provider);\n if (type !== 'DataConnector') {\n const dataConnector = await providers?.DataConnector;\n dataConnector?.addComponentTracking(service);\n }\n this.synthDependencies.set(type, service);\n this.memoryLeakTracker?.trackObject(type, service);\n return service;\n }));\n }\n /**\n * Adds a new provider into the dependencySynthesizer if it doesn't already exists\n * (does not override the provider), and adds it to the dataConnector to track it\n * and connect to the producer/consumer environment\n * @param type Name of the Type T being provided\n * @param provider Service/Component that will resolve the T correctly when asked\n * @throws if passing a type that's already registered\n */ registerIfNotAlreadyExists(type, provider) {\n if (!this.dependencySynthesizer.has(type)) {\n this.register(type, provider);\n }\n }\n /**\n * It takes optional and required types and returns an object that will fulfill the\n * defined types based off objects that has been previously registered.\n *\n * @param optionalTypes optional types to be in the Scope object\n * @param requiredTypes required types that need to be in the Scope object\n */ synthesize(optionalTypes, // eslint-disable-next-line @typescript-eslint/consistent-type-assertions\n requiredTypes = {}) {\n return this.dependencySynthesizer.synthesize(optionalTypes, requiredTypes);\n }\n /**\n * Checks if the type (service/component) has already been registered\n * @param type Name of the being provided\n * @returns if type has already being registered\n */ has(type) {\n return this.dependencySynthesizer.has(type);\n }\n /**\n * Remove a service/component\n * @param type name of the service/component to remove\n */ unregister(type) {\n return this.dependencySynthesizer.unregister(type);\n }\n /**\n * Disposes all dependencies that were registered in this layer\n */ dispose() {\n for (const [key, provider] of this.synthDependencies){\n provider.Disposable.dispose();\n this.unregister(key);\n }\n this.synthDependencies.clear();\n this.memoryLeakTracker?.markParentAsClosed();\n }\n}\n\n//# sourceMappingURL=LoopDependencyContainer.js.map","/* eslint-disable @fluidx/ffx-rules/no-hardcoded-endpoints -- These are all the endpoints of Loop App. */ /**\n * Site origins for Loop, intended to be used to determine the current app audience.\n * If you need to modify an existing origin, be sure to create a new version entry for it to avoid breaking\n * code with dependencies since this is exported from LADM.\n */ export const origins = {\n v1: {\n productionOrigin: 'https://loop.microsoft.com',\n previewOrigin: 'https://preview.loop.microsoft.com',\n dogfoodOrigin: 'https://df.loop.microsoft.com',\n stagingOrigin: 'https://dev.loop.microsoft.com',\n localOrigins: [\n 'https://local.loop.microsoft.com',\n 'https://local.loop.microsoft.com:8080',\n 'https://local.loop.microsoft.com:8081',\n 'http://localhost:8094',\n 'http://localhost'\n ]\n },\n v2: {\n gallatinOrigin: 'https://loop.microsoftonline.cn',\n dodOrigin: 'https://loop.apps.mil',\n gcchOrigin: 'https://loop.office365.us',\n publicOrigin: 'https://loop.cloud.microsoft',\n developerOrigin: 'https://loop.cloud-dev.microsoft'\n },\n // TODO ADO 9344535: Remove hoop domains from Loop origins validations\n hoopOrigins: {\n publicOrigin: 'https://hosted.loop.cloud.microsoft',\n developerOrigin: 'https://hosted.loop.cloud.dev.microsoft'\n }\n};\n/**\n * Determines whether given url origin is one of supported Loop web app origins\n * @param urlOrigin url origin to check\n * @returns true if given url origin is Loop web app origin; otherwise, false\n */ export const isLoopOrigin = (urlOrigin)=>{\n const urlOriginLowerCase = urlOrigin.toLowerCase();\n const allOrigins = Object.values(origins.v1).concat(Object.values(origins.v2)).concat(Object.values(origins.hoopOrigins));\n return allOrigins.some((o)=>{\n if (typeof o === 'string' && o === urlOriginLowerCase) {\n return true;\n }\n if (Array.isArray(o)) {\n return o.includes(urlOrigin);\n }\n return false;\n });\n};\n/**\n * Gets Loop web app url origin for given deployment ring\n * @param ring deployment ring\n * @param version hostname version\n * @returns Loop web app url origin\n */ export const getLoopAppOrigin = (ring, version = 'v2')=>{\n switch(ring){\n case 'Development':\n return origins.v1.localOrigins[0];\n case 'Staging':\n return version === 'v1' ? origins.v1.stagingOrigin : origins.v2.developerOrigin;\n case 'Dogfood':\n return version === 'v1' ? origins.v1.dogfoodOrigin : origins.v2.publicOrigin;\n case 'Preview':\n return version === 'v1' ? origins.v1.previewOrigin : origins.v2.publicOrigin;\n case 'Prod':\n case 'Gcc':\n return version === 'v1' ? origins.v1.productionOrigin : origins.v2.publicOrigin;\n case 'GccHigh':\n return origins.v2.gcchOrigin;\n case 'DoD':\n return origins.v2.dodOrigin;\n case 'Gallatin':\n return origins.v2.gallatinOrigin;\n default:\n throw new Error(`Loop web app does not support ${ring} ring`);\n }\n};\n\n//# sourceMappingURL=LoopOrigins.js.map","/** Name of the metadata param for routes */ export const metadataParamName = 'metadata';\nconst decodeBase64Url = (data)=>{\n return atob(data.replace(/_/g, '/').replace(/-/g, '+').padEnd(Math.ceil(data.length / 4) * 4, '='));\n};\n/**\n * Takes in encoded metadata as a string and returns the decoded metadata\n * @param metadata URL metadata\n * @returns parsed metadata\n * @throws if the metadata is not valid through any of the decoding steps\n */ export function decodeAppRouteMetadata(metadata) {\n return JSON.parse(decodeBase64Url(decodeURIComponent(metadata)));\n}\n/**\n * Takes in decoded metadata as an object and returns the encoded metadata string\n * @param metadata metadata object\n * @returns encoded metadata string\n * @throws if the metadata is not valid through any of the decoding steps\n */ export function encodeAppRouteMetadata(metadata) {\n return encodeURIComponent(btoa(JSON.stringify(metadata)));\n}\n/**\n * Utility that ensures the object passed in satisfies the requirements for the route metadata\n * @template Metadata The type of the metadata to check. Used to enforce the required keys.\n * @param required Helper object to help ensure the type guard stays in sync with the interface\n */ export function buildIsRouteUrlMetadata(required) {\n /**\n * @param item The object to check\n */ return (item)=>{\n if (typeof item !== 'object' || !item) {\n return false;\n }\n const record = item;\n for (const [prop, type] of Object.entries(required)){\n const value = record[prop];\n if (typeof value !== type || !value) {\n return false;\n }\n }\n return true;\n };\n}\n\n//# sourceMappingURL=AppRouteMetadata.js.map","import { buildIsRouteUrlMetadata, encodeAppRouteMetadata, metadataParamName } from './AppRouteMetadata';\nimport { ensureHydratableFluidUrl } from './EnsureHydratableFluidUrl';\nimport { decodePageContext } from './PageContext';\nimport { podIdToFluidUrl } from './PodId';\n/** The prefix that appears for the \"page\" route, where we show a fluid document the user can edit */ export const pageRoutePathPrefix = '/p';\n/**\n * The definition for the page route is '/p/:metadata'. Metadata can have the value 'create' when the user is creating a new page and we still don't have the final file URL.\n * In all other cases, metadata is expected to have the URL of the Fluid document that should be rendered.\n */ export const pageRouteDefinition = `${pageRoutePathPrefix}/:${metadataParamName}`;\n/** Utility used to differentiate AttachedFluidFile info from UnattachedFluidFileInfo */ export function isAttachedFluidFileInfo(item) {\n return 'u' in item;\n}\nexport const isPageRouteUrlMetadata = buildIsRouteUrlMetadata({\n p: 'object'\n});\n/**\n * Utility that ensures the object passed in satisfies the requirements for the workspace type page routes\n * such as workspace tasks page or status page route metadata\n */ export const isWorkspaceScopedPageRouteUrlMetadata = buildIsRouteUrlMetadata({\n w: 'object'\n});\n/** Utility that ensures the object passed in satisfies the requirements for the page route metadata in page file url format */ export const isPageRouteFileMetadata = buildIsRouteUrlMetadata({\n u: 'string'\n});\n/**\n * Encodes the page route metadata object into a URL that can be placed in the address bar\n * @param metadata page route metadata object\n * @returns app route path\n */ export function pageRouteMetadataToPageRoutePath(metadata) {\n return `${pageRoutePathPrefix}/${encodeAppRouteMetadata(metadata)}`;\n}\n/**\n * Converts page route metadata from PageRouteFileMetadata to PageRouteUrlMetadata\n * @param input page route metadata in PageRouteFileMetadata format\n * @returns page route metadata in PageRouteUrlMetadata format\n * @throws error if input does not pass validation\n */ export function convertToPageRouteUrlMetadata(input) {\n const hydratableFileUrl = ensureHydratableFluidUrl(input.u);\n if (!hydratableFileUrl) {\n throw new Error('Page file metadata does not include valid file link');\n }\n const pageOdspInfo = {\n u: hydratableFileUrl.url.href,\n r: Boolean(input.r)\n };\n let pageMetadata;\n if (hydratableFileUrl.locator.context) {\n const pageContext = decodePageContext(hydratableFileUrl.locator.context);\n const workspaceOdspInfo = {\n u: podIdToFluidUrl(pageContext.workspacePodId),\n r: false // Workspace ODSP info is currently never a share link\n };\n pageMetadata = {\n w: workspaceOdspInfo,\n p: pageOdspInfo,\n i: pageContext.pageId ? {\n i: pageContext.pageId\n } : undefined\n };\n } else {\n // We don't have page context information for single pages and components\n pageMetadata = {\n p: pageOdspInfo\n };\n }\n return pageMetadata;\n}\n\n//# sourceMappingURL=PageRoute.js.map","import { getLocatorFromOdspUrl, storeLocatorInOdspUrl } from '@fluidframework/odsp-driver/legacy';\nimport { getLocatorFromFileUrl } from './GetLocatorFromFileUrl';\n/** We want to store all the pages and workspaces for the workspace under a LoopAppData folder */ export const loopAppDataFolderName = 'LoopAppData';\n/** All pages and workspace files for personal Copilot workspace is created under a 'Copilot' folder */ export const PersonalCopilotWorkspaceFolderName = 'Copilot';\n/** All pages and workspace files for personal notebooks are created within a folder under the 'CopilotNotebooks' folder */ export const PersonalCopilotNotebookRootFolderName = 'CopilotNotebooks';\nexport const folderParamPath = 'fo';\n/** Generate the Pod ID for ODSP-based Pod */ export function toPodId(podIdInfo) {\n /**\n * Ignore 'Copilot' and 'LoopAppData' folder names for podId generation.\n * These are used for personal Copilot workspace and regular loop workspaces.\n * These kind of workspaces are already out there and generating new podId format could have downstream issues with cached data.\n */ if (podIdInfo.podFileFolderPath && podIdInfo.podFileFolderPath !== loopAppDataFolderName && podIdInfo.podFileFolderPath !== PersonalCopilotWorkspaceFolderName) {\n return btoa(`ODSP|${podIdInfo.siteDomain.toLowerCase()}|${podIdInfo.driveId}|${podIdInfo.itemId}|${podIdInfo.podFileFolderPath}`);\n }\n return btoa(`ODSP|${podIdInfo.siteDomain.toLowerCase()}|${podIdInfo.driveId}|${podIdInfo.itemId}`);\n}\n/** Get site domain, driveId and itemId from an ODSP Pod ID */ export function fromPodId(podId) {\n const decodedId = atob(podId);\n if (!decodedId.startsWith('ODSP')) {\n throw new Error(`Cannot parse id value when provided ID is not for ODSP pod`);\n }\n const params = decodedId.split('|');\n if (params.length > 4) {\n // return folder path if it was encoded. The folder path is optional and only encoded for Copilot Notebooks.\n return {\n siteDomain: params[1],\n driveId: params[2],\n itemId: params[3],\n podFileFolderPath: params[4]\n };\n }\n // workspaces that are not notebooks will not have a folder path encoded.\n // This is the case for all workspaces before Copilot Notebooks.\n return {\n siteDomain: params[1],\n driveId: params[2],\n itemId: params[3]\n };\n}\n/** Converts an MFS Pod ID to a Fluid URL */ export function podIdToFluidUrl(workspacePodId) {\n const workspaceLocator = fromPodId(workspacePodId);\n const siteUrl = `https://${workspaceLocator.siteDomain}`;\n const url = new URL(siteUrl);\n storeLocatorInOdspUrl(url, {\n siteUrl,\n driveId: workspaceLocator.driveId,\n itemId: workspaceLocator.itemId,\n dataStorePath: ''\n });\n // Encode the pod file folder path in the URL separately and add it to the URL\n if (workspaceLocator.podFileFolderPath) {\n url.searchParams.set(folderParamPath, btoa(workspaceLocator.podFileFolderPath));\n }\n return url.toString();\n}\n/** Converts a Fluid URL to an MFS Pod ID */ export function fluidUrlToPodId(fluidUrl) {\n const url = new URL(fluidUrl);\n const locator = getLocatorFromOdspUrl(url);\n if (!locator) {\n return undefined;\n }\n // Get the folder path from the URL, if it exists\n const encodedFolderPath = url.searchParams.get(folderParamPath);\n return toPodId({\n siteDomain: new URL(locator.siteUrl).host,\n driveId: locator.driveId,\n itemId: locator.itemId,\n podFileFolderPath: encodedFolderPath ? atob(encodedFolderPath) : undefined\n });\n}\n/** Converts a File URL to an MFS Pod ID */ export function fileUrlToPodId(fileUrl) {\n const locator = getLocatorFromFileUrl(new URL(fileUrl));\n if (!locator) {\n return undefined;\n }\n return toPodId({\n siteDomain: new URL(locator.siteUrl).host,\n driveId: locator.driveId,\n itemId: locator.itemId\n });\n}\n\n//# sourceMappingURL=PodId.js.map","import { encodeAppRouteMetadata, origins, pageRouteMetadataToPageRoutePath, podIdToFluidUrl } from '@fluidx/loop-app-urls';\nconst loopAppOrigin = origins.v2.publicOrigin;\n// This is the default Notebooks home URL if client doesn't provide a URL when loading LWC.\nexport const defaultNavigateUrl = new URL('/notebooks', loopAppOrigin);\nexport function createPageUrl(navigationParams) {\n const { docUrl, requiresRedeem, mfsPodId } = navigationParams;\n const pageOdspInfo = {\n u: docUrl,\n r: !!requiresRedeem\n };\n const workspaceOdspInfo = mfsPodId ? createFluidFileInfo(mfsPodId) : undefined;\n const pageMetadata = {\n w: workspaceOdspInfo,\n p: pageOdspInfo,\n ch: {\n // setting undefined for conversation Id will trigger showing the SxS chat+page view\n c: undefined\n }\n };\n const routePath = pageRouteMetadataToPageRoutePath(pageMetadata);\n return new URL(routePath, loopAppOrigin);\n}\nexport function createNotebookLandingUrl(navigationParams) {\n const workspaceOdspInfo = createFluidFileInfo(navigationParams.mfsPodId);\n const metadata = {\n w: workspaceOdspInfo\n };\n return new URL(`/w/home/${encodeAppRouteMetadata(metadata)}`, loopAppOrigin);\n}\nexport function createAllNotebooksUrl(_navigationParams) {\n return defaultNavigateUrl;\n}\nexport function createAllPagesUrl(_navigationParams) {\n return new URL('/pages', loopAppOrigin);\n}\nfunction createFluidFileInfo(mfsPodId) {\n return {\n u: podIdToFluidUrl(mfsPodId),\n /** Workspace ODSP info is currently never a share link */ r: false\n };\n}\n\n//# sourceMappingURL=createRouteUrls.js.map","import { defaultNavigateUrl } from '../routing/createRouteUrls';\n/**\n * The id that is used to identify the loader for this component.\n **/ export const LoopRegistrationId = '@fluidx/loop-workspace-component';\n/** The router input that can be passed to getLoopComponent* to cause it to load the loop-workspace-component */ export const loopComponentRouterInput = {\n type: 'Data',\n dataType: 'URL',\n data: {\n url: defaultNavigateUrl\n },\n registrationId: LoopRegistrationId\n};\n\n//# sourceMappingURL=constants.js.map","const instanceOfAny = (object, constructors) => constructors.some((c) => object instanceof c);\n\nlet idbProxyableTypes;\nlet cursorAdvanceMethods;\n// This is a function to prevent it throwing up in node environments.\nfunction getIdbProxyableTypes() {\n return (idbProxyableTypes ||\n (idbProxyableTypes = [\n IDBDatabase,\n IDBObjectStore,\n IDBIndex,\n IDBCursor,\n IDBTransaction,\n ]));\n}\n// This is a function to prevent it throwing up in node environments.\nfunction getCursorAdvanceMethods() {\n return (cursorAdvanceMethods ||\n (cursorAdvanceMethods = [\n IDBCursor.prototype.advance,\n IDBCursor.prototype.continue,\n IDBCursor.prototype.continuePrimaryKey,\n ]));\n}\nconst cursorRequestMap = new WeakMap();\nconst transactionDoneMap = new WeakMap();\nconst transactionStoreNamesMap = new WeakMap();\nconst transformCache = new WeakMap();\nconst reverseTransformCache = new WeakMap();\nfunction promisifyRequest(request) {\n const promise = new Promise((resolve, reject) => {\n const unlisten = () => {\n request.removeEventListener('success', success);\n request.removeEventListener('error', error);\n };\n const success = () => {\n resolve(wrap(request.result));\n unlisten();\n };\n const error = () => {\n reject(request.error);\n unlisten();\n };\n request.addEventListener('success', success);\n request.addEventListener('error', error);\n });\n promise\n .then((value) => {\n // Since cursoring reuses the IDBRequest (*sigh*), we cache it for later retrieval\n // (see wrapFunction).\n if (value instanceof IDBCursor) {\n cursorRequestMap.set(value, request);\n }\n // Catching to avoid \"Uncaught Promise exceptions\"\n })\n .catch(() => { });\n // This mapping exists in reverseTransformCache but doesn't doesn't exist in transformCache. This\n // is because we create many promises from a single IDBRequest.\n reverseTransformCache.set(promise, request);\n return promise;\n}\nfunction cacheDonePromiseForTransaction(tx) {\n // Early bail if we've already created a done promise for this transaction.\n if (transactionDoneMap.has(tx))\n return;\n const done = new Promise((resolve, reject) => {\n const unlisten = () => {\n tx.removeEventListener('complete', complete);\n tx.removeEventListener('error', error);\n tx.removeEventListener('abort', error);\n };\n const complete = () => {\n resolve();\n unlisten();\n };\n const error = () => {\n reject(tx.error || new DOMException('AbortError', 'AbortError'));\n unlisten();\n };\n tx.addEventListener('complete', complete);\n tx.addEventListener('error', error);\n tx.addEventListener('abort', error);\n });\n // Cache it for later retrieval.\n transactionDoneMap.set(tx, done);\n}\nlet idbProxyTraps = {\n get(target, prop, receiver) {\n if (target instanceof IDBTransaction) {\n // Special handling for transaction.done.\n if (prop === 'done')\n return transactionDoneMap.get(target);\n // Polyfill for objectStoreNames because of Edge.\n if (prop === 'objectStoreNames') {\n return target.objectStoreNames || transactionStoreNamesMap.get(target);\n }\n // Make tx.store return the only store in the transaction, or undefined if there are many.\n if (prop === 'store') {\n return receiver.objectStoreNames[1]\n ? undefined\n : receiver.objectStore(receiver.objectStoreNames[0]);\n }\n }\n // Else transform whatever we get back.\n return wrap(target[prop]);\n },\n set(target, prop, value) {\n target[prop] = value;\n return true;\n },\n has(target, prop) {\n if (target instanceof IDBTransaction &&\n (prop === 'done' || prop === 'store')) {\n return true;\n }\n return prop in target;\n },\n};\nfunction replaceTraps(callback) {\n idbProxyTraps = callback(idbProxyTraps);\n}\nfunction wrapFunction(func) {\n // Due to expected object equality (which is enforced by the caching in `wrap`), we\n // only create one new func per func.\n // Edge doesn't support objectStoreNames (booo), so we polyfill it here.\n if (func === IDBDatabase.prototype.transaction &&\n !('objectStoreNames' in IDBTransaction.prototype)) {\n return function (storeNames, ...args) {\n const tx = func.call(unwrap(this), storeNames, ...args);\n transactionStoreNamesMap.set(tx, storeNames.sort ? storeNames.sort() : [storeNames]);\n return wrap(tx);\n };\n }\n // Cursor methods are special, as the behaviour is a little more different to standard IDB. In\n // IDB, you advance the cursor and wait for a new 'success' on the IDBRequest that gave you the\n // cursor. It's kinda like a promise that can resolve with many values. That doesn't make sense\n // with real promises, so each advance methods returns a new promise for the cursor object, or\n // undefined if the end of the cursor has been reached.\n if (getCursorAdvanceMethods().includes(func)) {\n return function (...args) {\n // Calling the original function with the proxy as 'this' causes ILLEGAL INVOCATION, so we use\n // the original object.\n func.apply(unwrap(this), args);\n return wrap(cursorRequestMap.get(this));\n };\n }\n return function (...args) {\n // Calling the original function with the proxy as 'this' causes ILLEGAL INVOCATION, so we use\n // the original object.\n return wrap(func.apply(unwrap(this), args));\n };\n}\nfunction transformCachableValue(value) {\n if (typeof value === 'function')\n return wrapFunction(value);\n // This doesn't return, it just creates a 'done' promise for the transaction,\n // which is later returned for transaction.done (see idbObjectHandler).\n if (value instanceof IDBTransaction)\n cacheDonePromiseForTransaction(value);\n if (instanceOfAny(value, getIdbProxyableTypes()))\n return new Proxy(value, idbProxyTraps);\n // Return the same value back if we're not going to transform it.\n return value;\n}\nfunction wrap(value) {\n // We sometimes generate multiple promises from a single IDBRequest (eg when cursoring), because\n // IDB is weird and a single IDBRequest can yield many responses, so these can't be cached.\n if (value instanceof IDBRequest)\n return promisifyRequest(value);\n // If we've already transformed this value before, reuse the transformed value.\n // This is faster, but it also provides object equality.\n if (transformCache.has(value))\n return transformCache.get(value);\n const newValue = transformCachableValue(value);\n // Not all types are transformed.\n // These may be primitive types, so they can't be WeakMap keys.\n if (newValue !== value) {\n transformCache.set(value, newValue);\n reverseTransformCache.set(newValue, value);\n }\n return newValue;\n}\nconst unwrap = (value) => reverseTransformCache.get(value);\n\nexport { reverseTransformCache as a, instanceOfAny as i, replaceTraps as r, unwrap as u, wrap as w };\n","import { w as wrap, r as replaceTraps } from './wrap-idb-value.js';\nexport { u as unwrap, w as wrap } from './wrap-idb-value.js';\n\n/**\n * Open a database.\n *\n * @param name Name of the database.\n * @param version Schema version.\n * @param callbacks Additional callbacks.\n */\nfunction openDB(name, version, { blocked, upgrade, blocking, terminated } = {}) {\n const request = indexedDB.open(name, version);\n const openPromise = wrap(request);\n if (upgrade) {\n request.addEventListener('upgradeneeded', (event) => {\n upgrade(wrap(request.result), event.oldVersion, event.newVersion, wrap(request.transaction));\n });\n }\n if (blocked)\n request.addEventListener('blocked', () => blocked());\n openPromise\n .then((db) => {\n if (terminated)\n db.addEventListener('close', () => terminated());\n if (blocking)\n db.addEventListener('versionchange', () => blocking());\n })\n .catch(() => { });\n return openPromise;\n}\n/**\n * Delete a database.\n *\n * @param name Name of the database.\n */\nfunction deleteDB(name, { blocked } = {}) {\n const request = indexedDB.deleteDatabase(name);\n if (blocked)\n request.addEventListener('blocked', () => blocked());\n return wrap(request).then(() => undefined);\n}\n\nconst readMethods = ['get', 'getKey', 'getAll', 'getAllKeys', 'count'];\nconst writeMethods = ['put', 'add', 'delete', 'clear'];\nconst cachedMethods = new Map();\nfunction getMethod(target, prop) {\n if (!(target instanceof IDBDatabase &&\n !(prop in target) &&\n typeof prop === 'string')) {\n return;\n }\n if (cachedMethods.get(prop))\n return cachedMethods.get(prop);\n const targetFuncName = prop.replace(/FromIndex$/, '');\n const useIndex = prop !== targetFuncName;\n const isWrite = writeMethods.includes(targetFuncName);\n if (\n // Bail if the target doesn't exist on the target. Eg, getAll isn't in Edge.\n !(targetFuncName in (useIndex ? IDBIndex : IDBObjectStore).prototype) ||\n !(isWrite || readMethods.includes(targetFuncName))) {\n return;\n }\n const method = async function (storeName, ...args) {\n // isWrite ? 'readwrite' : undefined gzipps better, but fails in Edge :(\n const tx = this.transaction(storeName, isWrite ? 'readwrite' : 'readonly');\n let target = tx.store;\n if (useIndex)\n target = target.index(args.shift());\n // Must reject if op rejects.\n // If it's a write operation, must reject if tx.done rejects.\n // Must reject with op rejection first.\n // Must resolve with op value.\n // Must handle both promises (no unhandled rejections)\n return (await Promise.all([\n target[targetFuncName](...args),\n isWrite && tx.done,\n ]))[0];\n };\n cachedMethods.set(prop, method);\n return method;\n}\nreplaceTraps((oldTraps) => ({\n ...oldTraps,\n get: (target, prop, receiver) => getMethod(target, prop) || oldTraps.get(target, prop, receiver),\n has: (target, prop) => !!getMethod(target, prop) || oldTraps.has(target, prop),\n}));\n\nexport { deleteDB, openDB };\n","import { openDB } from 'idb';\nconst CodeLoaderCacheDBName = 'fluidCodeLoaderCache';\nexport const CodeLoaderObjectStoreName = 'codeLoaderStorage';\nexport function getCodeLoaderCache() {\n return openDB(CodeLoaderCacheDBName, 1 /** version */ , {\n async upgrade (db, _oldVersion) {\n const cacheObjectStore = db.createObjectStore(CodeLoaderObjectStoreName);\n cacheObjectStore.createIndex('lastUpdatedTime', 'lastUpdatedTime');\n },\n blocked: ()=>{\n throw new Error('Could not open code loader cache DB since it is blocked by an older client that has the DB open');\n }\n });\n}\n/**\n * Gets the cache key for a component in the code loader cache\n */ export function getCodeLoaderCacheKey(arg) {\n return `${arg.packageName}_${arg.ring}`;\n}\n\n//# sourceMappingURL=CodeLoaderCache.js.map","import { CodeLoaderObjectStoreName, getCodeLoaderCache, getCodeLoaderCacheKey } from './CodeLoaderCache';\nimport { sendErrorEvent } from '@fluidx/telemetry';\n/**\n * Gets component code details from the network, storing the response in the cache.\n * @returns codeDetailsPromise that resolves right when the code details are available from the network and a cacheUpdatePromise that resolves when the local cache is updated\n */ export function getCodeDetailsFromNetworkAndUpdateCache(windowContext, packageName, ring, getCodeDetailsFromNetwork, preCacheCode, getPackageFromCodeDetails, getMaxUnsupportedFromCodeDetails, locale, logger) {\n const codeDetailsPromise = getCodeDetailsFromNetwork(ring);\n const cacheUpdatePromise = codeDetailsPromise.then(async (latestCodeDetails)=>{\n const db = await getCodeLoaderCache();\n const packageKey = getCodeLoaderCacheKey({\n packageName,\n ring\n });\n const existingEntry = await db.get(CodeLoaderObjectStoreName, packageKey);\n // If the new code details don't match what we already have cached, preload the new version for improved performance on subsequent loads\n if (!existingEntry || existingEntry.codeDetailsPackage.version !== getPackageFromCodeDetails(latestCodeDetails).version) {\n preCacheCode(windowContext, latestCodeDetails, locale);\n }\n // Always update the last update time. This will keep us from prematurely expiring the cache when a particular build is in production for a long time\n await db.put(CodeLoaderObjectStoreName, {\n codeDetailsPackage: getPackageFromCodeDetails(latestCodeDetails),\n lastUpdatedTime: Date.now()\n }, packageKey);\n db.close();\n }).catch((error)=>{\n if (logger) {\n sendErrorEvent(logger, {\n eventName: 'CodeDetailsFromNetworkAndUpdateCacheFailed',\n message: `Failed to update cache and return code details for ${packageName}`\n }, error);\n }\n });\n return {\n codePackagePromise: codeDetailsPromise.then((details)=>{\n // Attach max unsupported version to package if available.\n const maxUnsupportedVersion = getMaxUnsupportedFromCodeDetails ? getMaxUnsupportedFromCodeDetails(details) : undefined;\n return {\n ...getPackageFromCodeDetails(details),\n maxUnsupportedVersion\n };\n }),\n cacheUpdatePromise\n };\n}\n\n//# sourceMappingURL=getCodeDetailsFromNetworkAndUpdateCache.js.map","function isAllowedCodeUrl(codeUrl, allowedCodeOrigins) {\n const url = new URL(codeUrl);\n // Unsupported if the allow list does not include the CDN origin\n return allowedCodeOrigins.includes(url.origin);\n}\nexport function areAllCodeUrlsAllowed(codeUrls, allowedCodeOrigins) {\n const isStringArray = (arr)=>arr.length > 0 && typeof allowedCodeOrigins[0] === 'string';\n if (isStringArray(allowedCodeOrigins)) {\n const unsupportedSource = codeUrls.find((containerSourceFile)=>{\n return !isAllowedCodeUrl(containerSourceFile, allowedCodeOrigins);\n });\n // If there are no unsupported sources, we should load\n return unsupportedSource === undefined;\n } else {\n return areAllCodeFromAllowedSource(codeUrls, allowedCodeOrigins);\n }\n}\n/**\n * Checks if all code URLs are from allowed sources.\n * @param codeUrls Code file URLs to check\n * @param allowedCodeSources Allowed sources for code\n * @returns true if all code URLs are from allowed sources, false otherwise\n */ export function areAllCodeFromAllowedSource(codeUrls, allowedCodeSources) {\n const allowedSources = getAllowedSourcesMap(allowedCodeSources);\n // If any of the core URLs are not allowed, we should not load\n return codeUrls.every((codeUrl)=>{\n const url = new URL(codeUrl);\n // 1CDN (possibly others) allow and evaluates encoded URLs differently than the browser does,\n // so if the pathname appears to be encoded we should reject it. By default, we\n // should not be giving ourselves URLs encoded in this format.\n if (url.pathname !== decodeURIComponent(url.pathname)) {\n return false;\n }\n const paths = allowedSources.get(url.origin);\n if (paths === 'ALL') {\n // All paths are allowed for this origin\n return true;\n } else if (paths === undefined) {\n // This origin is not on the allowed list\n return false;\n } else {\n // Check that the path is under an allowed path directory\n const pathToCheckParts = normalizePath(url.pathname);\n return paths.some((path)=>path.every((part, index)=>part === pathToCheckParts[index]));\n }\n });\n}\n/**\n * Converts the allowed code sources to a map of origin to paths.\n * @param allowedCodeSources Allowed sources for code\n * @returns A mapping of origin to paths, a value of 'ALL' instead of a path list means that we support all paths on that origin.\n */ function getAllowedSourcesMap(allowedCodeSources) {\n const allowedSources = new Map();\n for (const allowedSource of allowedCodeSources){\n for (const origin of allowedSource.origin){\n if (allowedSource.paths === undefined) {\n allowedSources.set(origin, 'ALL');\n } else {\n const existingPaths = allowedSources.get(origin);\n if (existingPaths === 'ALL') {\n // Don't modify if all paths are allowed\n } else if (existingPaths === undefined) {\n // First time seeing this origin, so add the paths\n allowedSources.set(origin, allowedSource.paths.map(normalizePath));\n } else {\n // Add the new paths to the existing paths\n allowedSources.set(origin, existingPaths.concat(allowedSource.paths.map(normalizePath)));\n }\n }\n }\n }\n return allowedSources;\n}\n/**\n * Normalizes the path to have a preceding and trailing `/`, we do not want something like `/path` to match `/path2`\n */ function normalizePath(path) {\n return path.split('/').filter((part)=>part !== '');\n}\n\n//# sourceMappingURL=isAllowedCodeUrl.js.map","import { CodeLoaderObjectStoreName, getCodeLoaderCache, getCodeLoaderCacheKey } from './CodeLoaderCache';\nimport { sendErrorEvent } from '@fluidx/telemetry';\nexport async function deleteContainerDetailsFromCache(packageName, ring, logger) {\n try {\n const db = await getCodeLoaderCache();\n await db.delete(CodeLoaderObjectStoreName, getCodeLoaderCacheKey({\n packageName,\n ring\n }));\n db.close();\n } catch (error) {\n if (logger) {\n sendErrorEvent(logger, {\n eventName: 'DeleteContainerDetailsFromCacheFailed',\n message: 'DeleteContainerDetailsFromCache failed to delete container details from cache'\n }, error);\n }\n }\n}\n\n//# sourceMappingURL=deleteContainerDetailsFromCache.js.map","// Cache the manifest for up to 4 weeks by default (configurable at startup)\nlet maxCacheAgeMs = 4 * 7 * 24 * 60 * 60 * 1000;\n/**\n * By default, the code details will be cached for 4 weeks.\n * If a different amount is desired, call this method before calling any other API from this package.\n */ export function setCodeDetailsPackageMaxCacheAge(durationMs) {\n maxCacheAgeMs = durationMs;\n}\n/** A getter for the max cache duration. Used only for tests */ export function getCodeDetailsPackageMaxCacheAge() {\n return maxCacheAgeMs;\n}\n\n//# sourceMappingURL=maxCacheAge.js.map","import { CodeLoaderObjectStoreName, getCodeLoaderCache, getCodeLoaderCacheKey } from './CodeLoaderCache';\nimport { areAllCodeUrlsAllowed } from '../isAllowedCodeUrl';\nimport { deleteContainerDetailsFromCache } from './deleteContainerDetailsFromCache';\nimport { getCodeDetailsPackageMaxCacheAge } from './maxCacheAge';\nimport { sendErrorEvent } from '@fluidx/telemetry';\n/** Gets any unexpired component code details package from the indexeddb cache for the given package name. */ export async function getCodeDetailsPackageFromCache(packageName, ring, allowedCodeOrigins, getBootResourcesFromPackage, logger) {\n try {\n const db = await getCodeLoaderCache();\n const result = await db.get(CodeLoaderObjectStoreName, getCodeLoaderCacheKey({\n packageName,\n ring\n }));\n db.close();\n if (result) {\n const cacheEntryAge = Date.now() - result.lastUpdatedTime;\n if (cacheEntryAge > getCodeDetailsPackageMaxCacheAge()) {\n return {\n metadata: {\n cacheStatus: 'expired',\n cacheAge: cacheEntryAge\n },\n codeDetailsPackage: undefined\n };\n }\n if (!areAllCodeUrlsAllowed(getBootResourcesFromPackage(result.codeDetailsPackage), allowedCodeOrigins)) {\n // If the code referenced in the cache is not in the allow list, let's not return it so that we can favor getting it from another source, like the network\n // Also, delete the cache entry so that it isn't used again in the future\n deleteContainerDetailsFromCache(packageName, ring, logger).catch(()=>{});\n return {\n metadata: {\n cacheStatus: 'unsafe'\n },\n codeDetailsPackage: undefined\n };\n }\n return {\n metadata: {\n cacheStatus: 'hit',\n cacheAge: cacheEntryAge\n },\n codeDetailsPackage: result.codeDetailsPackage\n };\n }\n } catch (error) {\n if (logger) {\n sendErrorEvent(logger, {\n eventName: 'GetCodeDetailsPackageFromCacheFailed',\n message: 'GetCodeDetailsPackageFromCacheFailed failed return response'\n }, error);\n }\n }\n return {\n metadata: {\n cacheStatus: 'miss'\n },\n codeDetailsPackage: undefined\n };\n}\n\n//# sourceMappingURL=getCodeDetailsPackageFromCache.js.map","/**\n * The type of the DocumentHiddenTrackerIds. Use this to ensure type safety for future changes\n */ const documentHiddenTrackers = new Map();\nlet visibilityChangeEventListenerAdded = false;\nlet trackerId = 0;\nfunction onVisibilityChange() {\n if (document.hidden) {\n const currentTime = Date.now();\n documentHiddenTrackers.forEach((value, key)=>{\n if (value === -1) {\n documentHiddenTrackers.set(key, currentTime);\n }\n });\n removeDocumentHiddenListener();\n }\n}\nfunction addDocumentHiddenListener() {\n visibilityChangeEventListenerAdded = true;\n document.addEventListener('visibilitychange', onVisibilityChange);\n}\nfunction removeDocumentHiddenListener() {\n visibilityChangeEventListenerAdded = false;\n document.removeEventListener('visibilitychange', onVisibilityChange);\n}\nfunction startTrackerForId(trackerId) {\n if (document.hidden) {\n documentHiddenTrackers.set(trackerId, 0);\n } else {\n visibilityChangeEventListenerAdded || addDocumentHiddenListener();\n documentHiddenTrackers.set(trackerId, -1);\n }\n}\n/**\n * Starts a document hidden tracker to measure if and when the document was ever hidden such as in a background tab.\n *\n * @returns a number that is used as a TrackerID in order to fetch the results of the tracker\n */ export function startDocumentHiddenTracker() {\n trackerId += 1;\n startTrackerForId(trackerId);\n return trackerId;\n}\n/**\n * Returns the status of a document hidden tracker for the specified trackerID.\n *\n * @param trackerId Id of the tracker, obtained from trackDocumentHidden.\n * @param unregister When set to true, it will unregister and delete the result from the tracker.\n *\n * @returns\n * -1: The document was never hidden from the start of the measurement.\n * 0: Document was hidden from the start of the measurement.\n * >0: The unix unix epoch time when the document was first hidden.\n */ export function getDocumentHiddenResult(trackerId, unregister) {\n const trackerValue = documentHiddenTrackers.get(trackerId);\n if (unregister) {\n unregisterDocumentHiddenTracker(trackerId);\n }\n return trackerValue;\n}\n/**\n * Removes a documentHidden tracker without fetching the value.\n *\n * @param trackerId Id of the tracker, obtained from trackDocumentHidden.\n */ export function unregisterDocumentHiddenTracker(trackerId) {\n documentHiddenTrackers.delete(trackerId);\n if (documentHiddenTrackers.size === 0 && visibilityChangeEventListenerAdded) {\n removeDocumentHiddenListener();\n }\n}\n\n//# sourceMappingURL=documentHiddenTracker.js.map","import { ActivityTracker } from '@fluidx/telemetry';\nimport { getDocumentHiddenResult, startDocumentHiddenTracker } from '@fluidx/utilities';\nimport { getCodeDetailsPackageFromCache } from './getCodeDetailsPackageFromCache';\n/** Gets container code details from the faster of the cache or network */ export async function getCodeDetailsPackageFromCacheOrNetwork(packageName, ring, allowedCodeOrigins, getCodeDetailsFromNetwork, getBootResourcesFromPackage, logger) {\n const documentEverHiddenTrackerId = startDocumentHiddenTracker();\n const tracker = ActivityTracker.start('GetCodeDetailsPackage', logger, {\n addUserTiming: true\n });\n // The cachePromise never rejects; it internally handles all failure scenarios.\n // If the cache does not provide a valid result, the returned metadata's status will indicate the issue ('expired', 'unsafe', or 'miss'),\n // and the details will be logged in cacheDetails.metadata.\n const cachePromise = getCodeDetailsPackageFromCache(packageName, ring, allowedCodeOrigins, getBootResourcesFromPackage, logger).then((cacheDetails)=>({\n method: 'cache',\n cacheDetails\n }));\n const networkPromise = getCodeDetailsFromNetwork(ring, allowedCodeOrigins).then((codeDetails)=>({\n method: 'network',\n codeDetails\n }));\n // Races cache vs network - returns fastest result (from either source) while the slower promise continues in background to update cache\n const raceWinner = await Promise.race([\n cachePromise,\n networkPromise\n ]);\n // Additional metadata to log in the ActivityTracker setResult call\n let additionalActivityProperties = {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion -- TODO: Product Backlog Item 7512199: Remove '!' non-null-assertion usage from office-bohemia packages\n documentEverHidden: getDocumentHiddenResult(documentEverHiddenTrackerId, true) > -1,\n deploymentRing: ring\n };\n if (raceWinner.method === 'cache') {\n const { cacheDetails } = raceWinner;\n additionalActivityProperties = {\n ...additionalActivityProperties,\n ...cacheDetails.metadata\n };\n if (cacheDetails.codeDetailsPackage) {\n tracker.setResult(true, {\n method: 'cache',\n ...additionalActivityProperties,\n packageVersion: cacheDetails.codeDetailsPackage.version\n });\n return cacheDetails.codeDetailsPackage;\n }\n }\n return networkPromise.then((response)=>{\n tracker.setResult(true, {\n method: 'network',\n ...additionalActivityProperties,\n packageVersion: response.codeDetails.version\n });\n return response.codeDetails;\n });\n}\n\n//# sourceMappingURL=getCodeDetailsPackageFromCacheOrNetwork.js.map","/**\n * Following method adds logic to retry loading failed scripts upto 3 times\n * @param windowToLoadScriptInto\n * @param scriptUrl The url from where to load the script\n * @param trustedTypesOptions If we have trusted types CSP enable, we need to pass in the policy to validate the script urls, or the browser might bock the page load\n * @param {'high' | 'low'} scriptFetchPriority Indicates the priority of the script fetch, with 'low' as the default value. *\n * @throws {Error} If an error occurs during the script loading process.\n */\nexport const loadScriptWithRetries = (windowToLoadScriptInto, scriptUrl, trustedTypesOptions, scriptFetchPriority = 'low') => {\n let retriesLeft = 3;\n return (function retryScriptLoad() {\n return loadScript(windowToLoadScriptInto, scriptUrl, trustedTypesOptions, scriptFetchPriority).catch(() => {\n // If we exhaust the number of retries, return the original script load method so the script load promise can be rejected and logged by the appropriate handler\n retriesLeft = retriesLeft - 1;\n if (retriesLeft === 0) {\n return loadScript(windowToLoadScriptInto, scriptUrl, trustedTypesOptions, scriptFetchPriority);\n }\n return retryScriptLoad();\n });\n })();\n};\nasync function loadScript(windowToLoadScriptInto, scriptUrl, trustedTypesOptions, scriptFetchPriority) {\n return new Promise((resolve, reject) => {\n const documentToAppendScriptTo = windowToLoadScriptInto.document;\n const script = documentToAppendScriptTo.createElement('script');\n script.setAttribute('fetchpriority', scriptFetchPriority);\n const validatedUrl = trustedTypesOptions?.trustedTypesPolicy?.createScriptURL(scriptUrl, {\n allowedScriptOrigins: trustedTypesOptions.allowedOrigins\n }) ?? scriptUrl;\n script.src = validatedUrl;\n // Dynamically added scripts are async by default. By setting async to false, we are enabling the scripts\n // to be downloaded in parallel, but executed in order. This ensures that a script is executed after all of\n // its dependencies have been loaded and executed.\n script.async = false;\n // Charset needs to be specified when being used by service worker\n script.charset = 'utf-8';\n // This enables us to get callstacks for unhandled exceptions in browsers\n script.crossOrigin = 'anonymous';\n script.onload = resolve;\n script.onerror = () => reject(new Error(`Failed to download the script at url: ${scriptUrl}, isUserDefinitelyOffline: ${!windowToLoadScriptInto\n .navigator.onLine}`));\n // TODO: Will this work when the same export module (i.e. main) is used for multiple packages?\n documentToAppendScriptTo.head.appendChild(script);\n });\n}\n//# sourceMappingURL=loadScriptWithRetries.js.map","/**\n * Returns the corresponding deployment ring for the requested environment value,\n * giving preference to the Ring mapped to the \"audience\" field, followed by the\n * \"ring\" field for Unmapped audiences. Otherwise defaulting to Prod.\n */ export function getRingForEnvironment(environment) {\n const ringFromAudience = getRingFromAudience(environment?.audience);\n if (ringFromAudience) {\n return ringFromAudience;\n }\n if (environment?.ring) {\n return environment.ring;\n }\n return 'Prod';\n}\n/**\n * Allows fetching a deployment ring from an audience. Exported for compatibility purposes with old code.\n */ export function getRingFromAudience(audience) {\n switch(audience){\n case 'Development':\n case 'Staging':\n return 'Staging';\n case 'Dogfood':\n return 'Dogfood';\n case 'Preview':\n case 'Microsoft':\n case 'Production':\n return 'Prod';\n case 'GCC':\n return 'Gcc';\n case 'GCC-High':\n return 'GccHigh';\n case 'DoD':\n return 'DoD';\n case 'USNat':\n return 'USNat';\n case 'USSec':\n return 'USSec';\n case 'Gallatin':\n return 'Gallatin';\n case 'Bleu':\n return 'Bleu';\n case 'Delos':\n return 'Delos';\n default:\n return undefined;\n }\n}\n/**\n * Not to be used on new code: Compatibility layer to allow fetching an Environment from the deprecated containerEnvironment options.\n */ export function getEnvironmentConfigFromRing(deploymentRing) {\n switch(deploymentRing){\n case 'Development':\n {\n return {\n audience: 'Development'\n };\n }\n case 'Staging':\n {\n return {\n audience: 'Staging'\n };\n }\n case 'Dogfood':\n {\n return {\n audience: 'Dogfood'\n };\n }\n case 'Gcc':\n {\n return {\n audience: 'GCC'\n };\n }\n case 'GccHigh':\n {\n return {\n audience: 'GCC-High'\n };\n }\n case 'DoD':\n {\n return {\n audience: 'DoD'\n };\n }\n case 'USNat':\n {\n return {\n audience: 'USNat'\n };\n }\n case 'USSec':\n {\n return {\n audience: 'USSec'\n };\n }\n case 'Prod':\n default:\n {\n return {\n audience: 'Production'\n };\n }\n }\n}\n/**\n * Fetch the ring if both environment and audience are provided.\n * If the environment is provided, get ring from the environment.\n * If the environment is not provided, try to get the ring from the audience.\n * Fall back to Prod if the ring cannot be fetched from the previous steps.\n */ export function getRingFromEnvironmentAndAudience(environment, audience) {\n return environment ? getRingForEnvironment(environment) : getRingFromAudience(audience) ?? 'Prod';\n}\n\n//# sourceMappingURL=Environment.js.map","/* eslint-disable @fluidx/ffx-rules/no-hardcoded-endpoints -- TODO: ADO 9121541: This will be moved to @fluidx/service-endpoints as well */ /**\n * The default list of CDNs that we trust as M365 container developers\n * If you add a new code origin to the list, make sure to update the getContainerTypeForLogging method with the appropriate container package name\n */ export const defaultPublicAllowedCodeOrigins = [\n 'https://cdn.dev.fluidpreview.office.net',\n 'https://cdn.fluidpreview.office.net',\n 'https://res-sdf.cdn.office.net',\n 'https://res.cdn.office.net',\n 'https://dev.loop.microsoft.com',\n 'https://df.loop.microsoft.com',\n 'https://preview.loop.microsoft.com',\n 'https://loop.microsoft.com',\n 'https://dev.ch5.fluidpreview.office.net',\n 'https://ch5.fluidpreview.office.net',\n 'https://dev.whiteboard.microsoft.com',\n 'https://app.int.whiteboard.microsoft.com',\n 'https://app.whiteboard.microsoft.com',\n 'https://whiteboard.cloud.microsoft',\n 'https://whiteboard.cloud.dev.microsoft',\n 'https://whiteboard.microsoft.com',\n 'https://whiteboard.office.com',\n 'https://loop.cloud.microsoft',\n 'https://loop.cloud-dev.microsoft',\n 'https://hosted.loop.cloud.dev.microsoft',\n 'https://hosted.loop.cloud.microsoft' // Loop MetaOS prod domain\n];\nexport const defaultGccHighAllowedCodeOrigins = [\n 'https://res-gcch.cdn.office.net',\n 'https://whiteboard.office365.us' // Whiteboard GCC-High\n];\nexport const defaultDodAllowedCodeOrigins = [\n 'https://res-dod.cdn.office.net',\n 'https://whiteboard.apps.mil' // Whiteboard DoD CDN\n];\nexport const defaultGallatinAllowedCodeOrigins = [\n 'https://res-cn.cdn.partner.office365.cn' // 1CDN Gallatin CDN\n];\nexport const defaultUSNatAllowedCodeOrigins = [\n 'https://whiteboard.eaglex.ic.gov' // Whiteboard USNat CDN\n];\nexport const defaultUSSecAllowedCodeOrigins = [\n 'https://whiteboard.microsoft.scloud' // Whiteboard USSec CDN\n];\n// TODO: Task 5876862: Cleanup defaultAllowedCodeOrigins in defaultAllowedCodeOrigins.ts after environment-specific code loader work (PBI 5794580) is in prod\nexport const defaultAllowedCodeOrigins = [\n ...defaultPublicAllowedCodeOrigins,\n ...defaultGccHighAllowedCodeOrigins,\n ...defaultDodAllowedCodeOrigins,\n ...defaultUSNatAllowedCodeOrigins,\n ...defaultUSSecAllowedCodeOrigins,\n ...defaultGallatinAllowedCodeOrigins\n];\nexport const defaultPublicAllowedCodeSources = [\n // Loop Public allowed code sources\n {\n origin: [\n 'https://cdn.dev.fluidpreview.office.net',\n 'https://cdn.fluidpreview.office.net',\n 'https://res-sdf.cdn.office.net',\n 'https://res.cdn.office.net',\n 'https://dev.loop.microsoft.com',\n 'https://df.loop.microsoft.com',\n 'https://preview.loop.microsoft.com',\n 'https://loop.microsoft.com',\n 'https://dev.ch5.fluidpreview.office.net',\n 'https://ch5.fluidpreview.office.net',\n 'https://loop.cloud.microsoft',\n 'https://loop.cloud-dev.microsoft',\n 'https://hosted.loop.cloud.dev.microsoft',\n 'https://hosted.loop.cloud.microsoft' // Loop MetaOS prod domain\n ],\n paths: [\n 'fluid/dev',\n 'fluid/df',\n 'fluid/stg',\n 'fluid/prod',\n 'fluid/gcc',\n 'fluid/gcch',\n 'fluid/dod',\n 'fluid/local-redirect-container'\n ]\n },\n // Whiteboard public allowed code sources\n {\n origin: [\n 'https://dev.whiteboard.microsoft.com',\n 'https://app.int.whiteboard.microsoft.com',\n 'https://app.whiteboard.microsoft.com',\n 'https://whiteboard.cloud.microsoft',\n 'https://whiteboard.cloud.dev.microsoft',\n 'https://whiteboard.microsoft.com',\n 'https://whiteboard.office.com' // Whiteboard Prod, alternate domain\n ],\n paths: undefined\n }\n];\nexport const defaultGccHighAllowedCodeSources = [\n // Loop GCC-High allowed code sources\n {\n origin: [\n 'https://res-gcch.cdn.office.net' // 1CDN GCC-High CDN\n ],\n paths: [\n 'fluid/gcch'\n ]\n },\n // Whiteboard GCC-High allowed code sources\n {\n origin: [\n 'https://whiteboard.office365.us' // Whiteboard GCC-High\n ],\n paths: undefined\n }\n];\nexport const defaultDodAllowedCodeSources = [\n // Loop DoD allowed code sources\n {\n origin: [\n 'https://res-dod.cdn.office.net' // 1CDN DoD CDN\n ],\n paths: [\n 'fluid/dod'\n ]\n },\n // Whiteboard DoD allowed code sources\n {\n origin: [\n 'https://whiteboard.apps.mil' // Whiteboard DoD CDN\n ],\n paths: undefined\n }\n];\nexport const defaultGallatinAllowedCodeSources = [\n // Loop Gallatin allowed code sources\n {\n origin: [\n 'https://res-cn.cdn.partner.office365.cn' // 1CDN Gallatin CDN\n ],\n paths: [\n 'fluid/gallatin'\n ]\n }\n];\nexport const defaultUSNatAllowedCodeSources = [\n // Whiteboard USNat allowed code sources\n {\n origin: [\n 'https://whiteboard.eaglex.ic.gov' // Whiteboard USNat CDN\n ],\n paths: undefined\n }\n];\nexport const defaultUSSecAllowedCodeSources = [\n // Whiteboard USSec allowed code sources\n {\n origin: [\n 'https://whiteboard.microsoft.scloud' // Whiteboard USSec CDN\n ],\n paths: undefined\n }\n];\nexport const defaultAllowedCodeSources = [\n ...defaultPublicAllowedCodeSources,\n ...defaultGccHighAllowedCodeSources,\n ...defaultDodAllowedCodeSources,\n ...defaultUSNatAllowedCodeSources,\n ...defaultUSSecAllowedCodeSources,\n ...defaultGallatinAllowedCodeSources\n];\n\n//# sourceMappingURL=defaultAllowedCodeOrigins.js.map","import { sendTelemetryEvent, sendErrorEvent } from '@fluidx/telemetry';\nimport { defaultAllowedCodeOrigins, defaultDodAllowedCodeOrigins, defaultGccHighAllowedCodeOrigins, defaultPublicAllowedCodeOrigins, defaultUSNatAllowedCodeOrigins, defaultUSSecAllowedCodeOrigins, defaultDodAllowedCodeSources, defaultGccHighAllowedCodeSources, defaultPublicAllowedCodeSources, defaultUSNatAllowedCodeSources, defaultUSSecAllowedCodeSources, defaultAllowedCodeSources, defaultGallatinAllowedCodeOrigins, defaultGallatinAllowedCodeSources } from './defaultAllowedCodeOrigins';\nexport const getEnvironmentSpecificAllowedCodeSource = (deploymentRing, settingsProvider)=>{\n if (settingsProvider?.getSetting('bohemiaCodeLoader.environmentSpecificCDNs', true) ?? true) {\n switch(deploymentRing){\n case 'GccHigh':\n return defaultGccHighAllowedCodeSources;\n case 'DoD':\n return defaultDodAllowedCodeSources;\n case 'USNat':\n return defaultUSNatAllowedCodeSources;\n case 'USSec':\n return defaultUSSecAllowedCodeSources;\n case 'Gallatin':\n return defaultGallatinAllowedCodeSources;\n default:\n return defaultPublicAllowedCodeSources;\n }\n } else {\n return defaultAllowedCodeSources;\n }\n};\nexport const getEnvironmentSpecificAllowedCodeOrigins = (deploymentRing, settingsProvider, logger)=>{\n if (settingsProvider?.getSetting('bohemiaCodeLoader.environmentSpecificCDNs', true) ?? true) {\n // filter default allowed code origins by environment\n let filteredDefaultAllowedCodeOrigins;\n switch(deploymentRing){\n case 'DoD':\n filteredDefaultAllowedCodeOrigins = defaultDodAllowedCodeOrigins;\n break;\n case 'GccHigh':\n filteredDefaultAllowedCodeOrigins = defaultGccHighAllowedCodeOrigins;\n break;\n case 'USNat':\n filteredDefaultAllowedCodeOrigins = defaultUSNatAllowedCodeOrigins;\n break;\n case 'USSec':\n filteredDefaultAllowedCodeOrigins = defaultUSSecAllowedCodeOrigins;\n break;\n case 'Gallatin':\n filteredDefaultAllowedCodeOrigins = defaultGallatinAllowedCodeOrigins;\n break;\n default:\n filteredDefaultAllowedCodeOrigins = defaultPublicAllowedCodeOrigins;\n }\n if (logger) {\n sendTelemetryEvent(logger, {\n eventName: 'DefaultAllowedCodeOrigins',\n environment: deploymentRing\n });\n if (filteredDefaultAllowedCodeOrigins.length === 0) {\n sendErrorEvent(logger, {\n eventName: 'DefaultAllowedCodeOriginsEmptyEnvironment'\n }, '{message: ${deploymentRing} environment does not have any default code origins}');\n }\n }\n return filteredDefaultAllowedCodeOrigins;\n } else {\n return defaultAllowedCodeOrigins;\n }\n};\n\n//# sourceMappingURL=getEnvironmentSpecificAllowedCodeOrigins.js.map","/**\n * List of endpoints for 1CDN\n */ export const CDNEndpoint = {\n Automation: 'https://res.cdn.office.net/fluid/prod',\n Development: 'https://res-sdf.cdn.office.net/fluid/stg',\n DoD: 'https://res-dod.cdn.office.net/fluid/dod',\n Dogfood: 'https://res.cdn.office.net/fluid/df',\n GCC: 'https://res.cdn.office.net/fluid/gcc',\n 'GCC-High': 'https://res-gcch.cdn.office.net/fluid/gcch',\n Local: 'https://res.cdn.office.net/fluid/prod',\n Microsoft: 'https://res.cdn.office.net/fluid/prod',\n Preview: 'https://res.cdn.office.net/fluid/prod',\n Production: 'https://res.cdn.office.net/fluid/prod',\n Staging: 'https://res-sdf.cdn.office.net/fluid/stg',\n SyntheticTraffic: 'https://res.cdn.office.net/fluid/prod',\n USNat: '',\n USSec: '',\n Bleu: '',\n Delos: '',\n Gallatin: 'https://res-cn.cdn.partner.office365.cn/fluid/gallatin'\n};\n/**\n * List of endpoints for SDP1CDN\n */ export const SDP1CDNEndpoint = {\n Automation: 'https://res-sdp.public.cdn.office.net/fluid/prod',\n Development: 'https://res-sdp.sdf.cdn.office.net/fluid/stg',\n DoD: 'https://res-sdp.dod.cdn.office.net/fluid/dod',\n Dogfood: 'https://res-sdp.public.cdn.office.net/fluid/df',\n GCC: 'https://res-sdp.gcc.cdn.office.net/fluid/gcc',\n 'GCC-High': 'https://res-sdp.gcch.cdn.office.net/fluid/gcch',\n Local: 'https://res-sdp.public.cdn.office.net/fluid/prod',\n Microsoft: 'https://res-sdp.public.cdn.office.net/fluid/prod',\n Preview: 'https://res-sdp.public.cdn.office.net/fluid/prod',\n Production: 'https://res-sdp.public.cdn.office.net/fluid/prod',\n Staging: 'https://res-sdp.sdf.cdn.office.net/fluid/stg',\n SyntheticTraffic: 'https://res-sdp.public.cdn.office.net/fluid/prod',\n USNat: '',\n USSec: '',\n Bleu: '',\n Delos: '',\n // TODO: (ADO 9580892) - Update service-endpoints URLs for Gallatin audience\n Gallatin: ''\n};\n\n//# sourceMappingURL=CDNEndpoints.js.map","import { CDNEndpoint, SDP1CDNEndpoint } from './CDNEndpoints';\n/**\n * This api returns 1cdn endpoint to be used for calls to 1cdn\n * @param audience The audience of the user\n * @returns the 1cdn endpoint or empty string if endpoint is not defined for that audience\n */ export function getCDNEndpoint(audience) {\n return CDNEndpoint[audience];\n}\n/**\n * This api returns sdp1cdn endpoint to be used for calls to sdp1cdn\n * @param audience The audience of the user\n * @returns the sdp1cdn endpoint or empty string if endpoint is not defined for that audience\n */ export function getSDP1CDNEndpoint(audience) {\n return SDP1CDNEndpoint[audience];\n}\n\n//# sourceMappingURL=getCDNEndpoint.js.map","import { allowlist, exponentialBackoff, fetchWithRetry } from '@fluidx/loop-sdk';\nimport { instrumentedFetchWithRetry } from '../fetch/instrumentedFetchWithRetry';\nconst retryPolicy = {\n maxRetries: 3,\n // Retry for common retriable errors and offline\n filter: allowlist([\n 429,\n 503,\n 709,\n 710\n ]),\n backoffFn: exponentialBackoff(500)\n};\n/**\n * Fetches file from given CDN location\n * @param fileUrl CDN url representing file location\n * @param logProps logging properties that specify how to instrument the operation\n * @returns fetch response\n */ export function downloadFileFromCdn(fileUrl, logProps) {\n return logProps ? instrumentedFetchWithRetry(fileUrl, {\n method: 'GET'\n }, logProps.eventName, logProps.logger, logProps.doNotLogOnSuccess, retryPolicy, logProps.timeoutMs ?? 0, logProps.getAdditionalProps) : fetchWithRetry(fileUrl, {\n method: 'GET'\n }, retryPolicy);\n}\n\n//# sourceMappingURL=downloadFileFromCdn.js.map","import { getCDNEndpoint } from '@fluidx/service-endpoints';\nimport { downloadFileFromCdn } from '@fluidx/utilities';\nimport { origins } from '@fluidx/loop-app-urls';\nconst MANIFEST_FILE_NAME = 'workspaceComponentManifest.json';\nexport const localOrigins = origins.v1.localOrigins;\nexport async function fetchManifestAndBaseUrl(audience, scriptVersionOverride) {\n let manifestResponse;\n let baseUrl;\n if (audience === 'Local') {\n // For local development, we use the local loop app origin running on the same machine.\n // The loop-app might be being served at a variety of possible ports.\n // We try all of them at the same time, and take the first one that succeeds.\n try {\n manifestResponse = await Promise.any(localOrigins.map((authority)=>fetchLocalManifest(authority)));\n } catch (e) {\n throw new Error(`Failed to fetch local ${MANIFEST_FILE_NAME} at any of the attempted ports. Did you remember to start the loop app locally?`);\n }\n baseUrl = new URL('./', manifestResponse.url).href;\n } else {\n // For all other audiences, we go directly to the CDN endpoint, saving DNS resolution time.\n const authority = getCDNEndpoint(audience);\n if (!authority) {\n throw new Error(`No CDN endpoint found for the audience: ${audience}.`);\n }\n baseUrl = getBaseUrl(authority, scriptVersionOverride);\n manifestResponse = (await downloadFileFromCdn(`${baseUrl}/${MANIFEST_FILE_NAME}`)).result;\n }\n if (!manifestResponse.ok) {\n throw new Error(`Failed to fetch manifest from ${baseUrl}.`);\n }\n const manifest = await manifestResponse.json();\n return {\n ...manifest,\n baseUrl\n };\n}\nasync function fetchLocalManifest(authority) {\n const response = await fetch(`${authority}/${MANIFEST_FILE_NAME}`);\n if (!response.ok) {\n throw new Error(`Failed to fetch local manifest from ${authority}.`);\n }\n return response;\n}\nfunction getBaseUrl(authority, scriptVersionOverride) {\n if (scriptVersionOverride) {\n return `${authority}/loop-app/versionless/deployment/${scriptVersionOverride}`;\n }\n return `${authority}/loop-app/versionless`;\n}\n\n//# sourceMappingURL=fetchManifestAndBaseUrl.js.map","export function getCodeDetailsPackageFromManifest(manifest) {\n return {\n bootResources: manifest.bootResources,\n globals: manifest.globals,\n importMap: manifest.importMap,\n version: manifest.version ?? // TODO: Task 9908371: Add version and maxUnsupportedVersion to loopWorkspaceComponentManifest.json and use them in the CdnCodeLoader.\n manifest.globals?.__app_environment_script_version__ ?? // Currently, we happen to encode the script version as a global variable meant to be injected into the loop app. We'll use this for backward compatibility.\n '',\n baseUrl: manifest.baseUrl\n };\n}\nexport function getMaxUnsupportedFromManifest(_manifest) {\n return ''; // TODO: Task 9908371: Add version and maxUnsupportedVersion to loopWorkspaceComponentManifest.json and use them in the CdnCodeLoader\n}\nexport function getBootResourcesFromPackage(pkg) {\n return pkg.bootResources;\n}\n\n//# sourceMappingURL=WorkspaceCodeDetailsPackage.js.map","import { sendErrorEvent } from '@fluidx/telemetry';\n/**\n * Accepts urls to .js or .css files and creates corresponding prefetch tags for them in the dom\n */ export function prefetchAssets(windowContext, urlsToPrefetch, logger) {\n const documentObject = windowContext.document;\n const fragment = documentObject.createDocumentFragment();\n urlsToPrefetch.forEach((asset)=>{\n const prefetchTag = documentObject.createElement('link');\n prefetchTag.rel = 'prefetch';\n prefetchTag.href = asset;\n if (asset.endsWith('.js')) {\n prefetchTag.as = 'script';\n prefetchTag.crossOrigin = 'anonymous';\n fragment.appendChild(prefetchTag);\n } else if (asset.endsWith('.css')) {\n prefetchTag.as = 'style';\n fragment.appendChild(prefetchTag);\n } else {\n if (logger) {\n sendErrorEvent(logger, {\n eventName: 'FluidXPrefetchAssetFailed',\n message: `Unsupported asset type for prefetching: ${asset}`\n });\n }\n }\n });\n documentObject.head.appendChild(fragment);\n}\n\n//# sourceMappingURL=prefetchAssets.js.map","import { prefetchAssets } from '@fluidx/codeloader-utilities';\nimport { resolveLocale } from '@fluidx/utilities';\nexport function prefetchAssetsFromManifest(windowContext, manifest, localeHint, logger) {\n const baseAssetsToPrefetch = manifest.preload?.manifest?.assets;\n if (baseAssetsToPrefetch) {\n const baseUrl = manifest.preload?.jsBaseUrl;\n const locale = resolveLocale(localeHint);\n const localizedAssetsToPrefetch = manifest.preload?.manifest?.localizedAssets?.[locale] ?? [];\n const assetsToPrefetch = [\n ...baseAssetsToPrefetch,\n ...localizedAssetsToPrefetch\n ].map((relativeUrl)=>{\n return new URL(relativeUrl, baseUrl).href;\n });\n prefetchAssets(windowContext, assetsToPrefetch, logger);\n }\n}\n\n//# sourceMappingURL=prefetchAssetsFromManifest.js.map","/**\n * Check the local storage for audience override value, if present. We can add\n * more overrides in the future if the need arises.\n * @param windowContext - The window context to check for local storage.\n * @returns An object containing the audience override value, or undefined if not present.\n */ export function loadOverridesFromStorage(windowContext) {\n const audienceOverride = loadAudience(windowContext);\n const scriptVersionOverride = loadScriptVersion(windowContext);\n return {\n audienceOverride,\n scriptVersionOverride\n };\n}\nfunction loadAudience(windowContext) {\n let audienceOverride;\n let lwcRing;\n try {\n lwcRing = windowContext.localStorage.getItem('lwcRing');\n } catch {\n // Accessing local storage might fail due to privacy settings or permission issues.\n return undefined;\n }\n switch(lwcRing?.toLowerCase()){\n case 'local':\n audienceOverride = 'Local';\n break;\n case 'stg':\n case 'staging':\n audienceOverride = 'Staging';\n break;\n case 'df':\n case 'dogfood':\n audienceOverride = 'Dogfood';\n break;\n case 'prod':\n case 'production':\n audienceOverride = 'Production';\n break;\n default:\n break;\n }\n return audienceOverride;\n}\nfunction loadScriptVersion(windowContext) {\n return windowContext.localStorage.getItem('lwcScriptVersion');\n}\n\n//# sourceMappingURL=loadOverridesFromStorage.js.map","import { getCodeDetailsFromNetworkAndUpdateCache, getCodeDetailsPackageFromCache, getCodeDetailsPackageFromCacheOrNetwork, getPerWindowLoopModuleCache, parseVersionNumber } from '@fluidx/codeloader-utilities';\nimport { loadScriptWithRetries } from '@fluidx/loop-sdk';\nimport { sendErrorEvent } from '@fluidx/telemetry';\nimport { getEnvironmentSpecificAllowedCodeOrigins, getRingFromAudience } from '@fluidx/utilities';\nimport { LoopRegistrationId } from './constants';\nimport { fetchManifestAndBaseUrl, localOrigins } from './fetchManifestAndBaseUrl';\nimport { getBootResourcesFromPackage, getCodeDetailsPackageFromManifest, getMaxUnsupportedFromManifest } from './WorkspaceCodeDetailsPackage';\nimport { prefetchAssetsFromManifest } from './prefetchAssetsFromManifest';\nimport { loadOverridesFromStorage } from './loadOverridesFromStorage';\nclass CdnCodeLoader {\n constructor(props){\n const { localeHint, audience, windowContext, dependencySynthesizer } = props;\n this.windowContext = windowContext;\n this.hostRequestedAudience = audience;\n const { audienceOverride, scriptVersionOverride } = loadOverridesFromStorage(windowContext);\n // We can only guarantee all script versions to be present in Staging,\n // so when we have a scriptVersionOverride, we need to set the audience to Staging.\n this.audienceToUse = scriptVersionOverride ? 'Staging' : audienceOverride ?? audience;\n this.scriptVersionOverride = scriptVersionOverride;\n this.localeHint = localeHint;\n this.providers = dependencySynthesizer?.synthesize({\n LoopTrustedTypesPolicy: 'LoopTrustedTypesPolicy',\n NamespaceLogger: 'NamespaceLogger'\n }, undefined) ?? {};\n }\n canLoad(details) {\n return details.packageName === LoopRegistrationId;\n }\n // eslint-disable-next-line @fluidx/ffx-rules/prefer-private-fields -- TODO: Exception added when rule was enabled. Please consider refactoring this to use ECMAScript # prefixed private properties for better minification\n getCodeDetailsFromNetworkAndUpdateCache(audience, logger) {\n return getCodeDetailsFromNetworkAndUpdateCache(this.windowContext, LoopRegistrationId, getRingFromAudience(audience), ()=>fetchManifestAndBaseUrl(audience, this.scriptVersionOverride), prefetchAssetsFromManifest, getCodeDetailsPackageFromManifest, getMaxUnsupportedFromManifest, this.localeHint, logger);\n }\n // eslint-disable-next-line @fluidx/ffx-rules/prefer-private-fields -- TODO: Exception added when rule was enabled. Please consider refactoring this to use ECMAScript # prefixed private properties for better minification\n loadStylesheet(url) {\n return new Promise((resolve, reject)=>{\n const documentToAppendScriptTo = this.windowContext.document;\n const linkTag = documentToAppendScriptTo.createElement('link');\n linkTag.rel = 'stylesheet';\n linkTag.type = 'text/css';\n linkTag.href = url;\n linkTag.onload = ()=>{\n resolve();\n };\n linkTag.onerror = ()=>reject(new Error(`Failed to download the style sheet at url: ${url}.`));\n documentToAppendScriptTo.head.appendChild(linkTag);\n return linkTag;\n });\n }\n // eslint-disable-next-line @fluidx/ffx-rules/prefer-private-fields -- TODO: Exception added when rule was enabled. Please consider refactoring this to use ECMAScript # prefixed private properties for better minification\n async loadImportMap(importMap) {\n const importMapsScript = this.windowContext.document.createElement('script');\n importMapsScript.type = 'importmap';\n importMapsScript.textContent = importMap;\n this.windowContext.document.head.appendChild(importMapsScript);\n }\n // eslint-disable-next-line @fluidx/ffx-rules/prefer-private-fields -- TODO: Exception added when rule was enabled. Please consider refactoring this to use ECMAScript # prefixed private properties for better minification\n async loadScript(scriptUrl, isModule) {\n const trustedTypesPolicy = await this.providers.LoopTrustedTypesPolicy;\n /** TODO: Task 9746173: Enhance loadScriptWithRetries to support es6 scripts with type=module */ if (isModule) {\n await new Promise((resolve, reject)=>{\n const entryScript = this.windowContext.document.createElement('script');\n const validatedUrl = trustedTypesPolicy?.createScriptURL(scriptUrl, {\n allowedScriptOrigins: [\n window.origin\n ]\n }) ?? scriptUrl;\n entryScript.src = validatedUrl;\n entryScript.async = false;\n entryScript.type = 'module';\n entryScript.onload = resolve;\n entryScript.onerror = ()=>reject(new Error(`Failed to download the script at url: ${scriptUrl}`));\n this.windowContext.document.head.appendChild(entryScript);\n });\n } else {\n await loadScriptWithRetries(this.windowContext, scriptUrl, {\n trustedTypesPolicy,\n allowedOrigins: [\n window.origin\n ]\n });\n }\n }\n async load(details) {\n if (!this.canLoad(details)) {\n throw new Error('Incompatible loop code details.');\n }\n // Check if we already have a cached promise for this window context.\n // In this, case it's important to avoid having two different versions of LWC, which can cause webpack runtime errors.\n // (As an added bonus, it's also faster).\n const moduleCache = getPerWindowLoopModuleCache(this.windowContext);\n // BEGIN NO-AWAIT ZONE: To avoid race conditions, it's important not to do any awaiting in between checking the module promise cache and setting it if it's empty.\n const cacheEntryPromise = moduleCache.get(LoopRegistrationId);\n if (cacheEntryPromise) {\n // Older versions of LWC (before 20250618005) had a bug where they couldn't be loaded twice from the same bundle.\n // We were saved from this bug by the fact that we would (stupidly) re-load the entrypoint bundle every time load() was called.\n // But now that we have a per-window cache of the loaded bundle, we are exposed to the problem.\n // In order to roll out the per-window cache safely, we check to see if the cached version has this bug, and revert to the old behavior if it does.\n // TODO: Task 10268683: Clean up LWC codeLoader cache version checks\n return cacheEntryPromise.then((cacheEntry)=>{\n const { version, audience } = cacheEntry;\n const versionNumber = parseVersionNumber(version);\n // 20250618005 is the first version of LWC that contains Pull Request 4137595: Remove ecsSettingsProvider bundle-scoped variable and use injection/context instead\n // If we have a cached version that is older than this, we need to load the bundle again to avoid the bug.\n if (versionNumber && versionNumber < 20250618005 && audience !== 'Local') {\n return this.#loadWithFallback(details).then((freshCacheEntry)=>this.#getModuleFromCacheEntry(freshCacheEntry));\n }\n return this.#getModuleFromCacheEntry(cacheEntry);\n });\n }\n const loadPromise = this.#loadWithFallback(details);\n moduleCache.set(LoopRegistrationId, loadPromise);\n // END NO-AWAIT ZONE\n try {\n const { moduleWithDetails } = await loadPromise;\n return moduleWithDetails;\n } catch (e) {\n // Remove the failed promise from cache so subsequent calls can retry.\n moduleCache.delete(LoopRegistrationId);\n throw e;\n }\n }\n async #getModuleFromCacheEntry(cacheEntry) {\n if (cacheEntry.audience !== this.audienceToUse && this.audienceToUse !== 'Local') {\n // Because we used the cache entry, there's a possibility that the audience the host requested doesn't match the audience of the cache entry.\n // This is a sign that the host is confused about which audience it is in different parts of the same app, which is a bug we want to know about.\n // We don't do any logging if audienceToUse is 'local' because we might have chosen to fall back to the hostRequestedAudience in case the developer forgot to start the local server.\n const logger = await this.providers.NamespaceLogger;\n if (logger) {\n sendErrorEvent(logger, {\n eventName: 'LwcCodeLoaderAudienceMismatch',\n audienceToUse: this.audienceToUse,\n cacheEntryAudience: cacheEntry.audience\n });\n }\n }\n return cacheEntry.moduleWithDetails;\n }\n async #loadWithFallback(details) {\n try {\n return await this.loadInternal(this.audienceToUse, details);\n } catch (error) {\n // We have the 'lwcRing' setting to allow us to override the audience for LWC, making it easy for local development.\n // In Harmony, if this setting is set to 'Local', and the load fails (e.g. dev forgets to run the local server),\n // it will cause OWH to log the error in our \"Production\" Kusto database, which is bad.\n // To avoid that, we fall back to loading from the original audience that the host requested.\n if (this.audienceToUse === 'Local' && this.audienceToUse !== this.hostRequestedAudience) {\n this.audienceToUse = this.hostRequestedAudience;\n return await this.loadInternal(this.hostRequestedAudience, details);\n } else {\n throw error;\n }\n }\n }\n // eslint-disable-next-line @fluidx/ffx-rules/prefer-private-fields -- TODO: Exception added when rule was enabled. Please consider refactoring this to use ECMAScript # prefixed private properties for better minification\n async loadInternal(audience, details) {\n // In automation we do not have webpack running to serve code.\n if (audience === 'Automation') {\n const module = await import(/* webpackChunkName: \"MockComponent\" */ './MockComponent');\n // The script itself will put the loopExport to the window object, but here we simulate that behavior.\n this.windowContext[LoopRegistrationId] = {\n loopExport: module.loopExport\n };\n // A version number is required, and in case of Automation we want to return the largest possible number to represent the latest code.\n return {\n audience,\n moduleWithDetails: {\n module,\n details\n },\n version: Number.MAX_SAFE_INTEGER.toString()\n };\n }\n const ring = getRingFromAudience(audience);\n const allowedCodeOrigins = getEnvironmentSpecificAllowedCodeOrigins(ring);\n const logger = await this.providers.NamespaceLogger;\n let workspaceCodeDetails;\n const allowedCodeOriginsAndLocalOrigins = audience === 'Local' ? [\n ...allowedCodeOrigins,\n ...localOrigins\n ] : allowedCodeOrigins;\n // If 'scriptVersionOverride' is requested, we need to load the exact build version, from either cache or network.\n // We cannot use the normal logic of \"use-whatever-version-from-cache-and-load-new-version-in-the-background\"\n if (this.scriptVersionOverride) {\n // First, check the cache if we already have this version.\n const cachedWorkspaceCodeDetails = (await getCodeDetailsPackageFromCache(LoopRegistrationId, ring, allowedCodeOriginsAndLocalOrigins, getBootResourcesFromPackage, logger)).codeDetailsPackage;\n // If we have the correct version in the cache, use it. Otherwise, load it from the network.\n if (cachedWorkspaceCodeDetails && cachedWorkspaceCodeDetails.version === this.scriptVersionOverride) {\n workspaceCodeDetails = cachedWorkspaceCodeDetails;\n } else {\n workspaceCodeDetails = await this.getCodeDetailsFromNetworkAndUpdateCache(audience, logger).codePackagePromise;\n }\n } else {\n workspaceCodeDetails = await getCodeDetailsPackageFromCacheOrNetwork(LoopRegistrationId, ring, allowedCodeOriginsAndLocalOrigins, // We don't need to block on the cache update promise here, we want to return the code details as soon as possible\n async ()=>this.getCodeDetailsFromNetworkAndUpdateCache(audience, logger).codePackagePromise, getBootResourcesFromPackage, logger);\n }\n const { baseUrl, ...manifest } = workspaceCodeDetails;\n // When the loop app is bundled with cloudpack, the manifest will include an import map\n // that allows the browser to interpret the es6 module imports in the boot script.\n if (manifest.importMap) {\n await this.loadImportMap(JSON.stringify(manifest.importMap));\n }\n if (!Array.isArray(manifest.bootResources) || manifest.bootResources.length === 0) {\n throw new Error('No boot resources found in manifest.');\n }\n if (typeof manifest.globals === 'object' && manifest.globals !== null) {\n // This is where we set global variables that Loop App reads from the \"buildTimeConstants\" module.\n Object.entries(manifest.globals).forEach(([key, value])=>{\n // eslint-disable-next-line @typescript-eslint/no-explicit-any -- Product Backlog Item 9746930: Refactor loop app to not depend on global deploy-time variables and remove support for this from CdnCodeLoader\n this.windowContext[key] = value;\n });\n // This is to support the Development audience from hosts of LWC. It is intended to be used for\n // local development of host apps (Harmony/OneNote)\n if (audience === 'Development') {\n this.windowContext['__audience_override__'] = audience;\n }\n }\n // Enables React DevTools inside LWC\n if ((audience === 'Local' || audience === 'Development') && this.windowContext !== window) {\n this.windowContext['__REACT_DEVTOOLS_GLOBAL_HOOK__'] = window['__REACT_DEVTOOLS_GLOBAL_HOOK__'];\n }\n await Promise.all(manifest.bootResources.map(async (bootResource)=>{\n const url = new URL(bootResource, baseUrl);\n if (url.pathname.endsWith('.css')) {\n await this.loadStylesheet(url.href);\n } else if (url.pathname.endsWith('.js')) {\n // If the manifest has an importMap, that means the script is compiled as an es6 module by cloudpack.\n await this.loadScript(url.href, !!manifest.importMap);\n } else {\n const logger = await this.providers.NamespaceLogger;\n logger?.send({\n eventName: 'UnsupportedFilesinManifest',\n category: 'error'\n });\n }\n }));\n // Attempt to get the module registered by the script when it is attached to the window.\n const loopModule = this.windowContext[LoopRegistrationId];\n if (!loopModule) {\n throw new Error('Could not fetch loop module from the window object.');\n }\n return {\n audience,\n moduleWithDetails: {\n module: loopModule,\n details\n },\n version: workspaceCodeDetails.version\n };\n }\n async preCache(packageName) {\n if (packageName !== LoopRegistrationId) {\n return;\n }\n const logger = await this.providers.NamespaceLogger;\n return await this.getCodeDetailsFromNetworkAndUpdateCache(this.audienceToUse, logger).cacheUpdatePromise;\n }\n}\nexport const CdnCodeLoaderFactory = {\n instantiateLoopCodeLoader: (props)=>Promise.resolve(new CdnCodeLoader(props))\n};\n\n//# sourceMappingURL=CdnCodeLoader.js.map","/**\n * Fetches the loop module cache for the given window context.\n * If it does not exist, it initializes a new cache.\n * @returns A map of registration IDs to promises of loop module cache entries.\n */ export function getPerWindowLoopModuleCache(windowContext) {\n const windowWithModuleCache = windowContext;\n if (!windowWithModuleCache.perWindowLoopModuleCache) {\n windowWithModuleCache.perWindowLoopModuleCache = new Map();\n }\n return windowWithModuleCache.perWindowLoopModuleCache;\n}\n\n//# sourceMappingURL=perWindowLoopModuleCache.js.map","/**\n * Safely parses a string that may contain a version number\n * @returns a number if parsing is possible, otherwise undefined\n */ export function parseVersionNumber(version) {\n const parsedVersion = parseFloat(version);\n if (!Number.isNaN(parsedVersion) && Number.isFinite(parsedVersion)) {\n return parsedVersion;\n }\n return undefined;\n}\n\n//# sourceMappingURL=parseVersionNumber.js.map","/**\n * This is a turn-key solution that hosts can use in order to be able to load loop components.\n *\n * This code loader works as a bundler / aggregator which puts together the code loaders factories from different loop component packages.\n *\n * Each loop component will provide their own code loaders, which know how to load only their code onto the page. Based on the given `codeDetails`,\n * this loader will create the provided code loaders for the specified loop component and will attempt to load the code using that code loader.\n *\n * The loaders will be created using a lazy approach which means they will be instantiated only if the loader was requested.\n *\n * Hosts will be responsible for putting together the list of code loaders and the mappings between the loop component and the associated code loaders.\n * Also, the host decides whether to wrap the constructors-like functions behind a `Promise`, or even a resolved Promise\n * or to delay as much as possible the instantiation using a `LazyPromise`. Depending on how the code is provided,\n * the webpack chunks might be downloaded together, or in different slices.\n *\n * This allows the host to fully customize the order and the way the code loaders are created.\n *\n * There is also a `bundle` that we will maintain and expose to partners, that can be used as it is and injected into this code loader.\n *\n * Example of usage:\n *\n * ```ts\n * import { CdnCodeLoaderFactory as testComponentFactory1 } from 'test-component-1-package';\n *\n * const config: LoopCodeLoaderBundlerConfig = {\n * codeLoaders: new Map([\n * [\n * // When trying to load this particular component, the cdn code loader will be created and will be used to attempt to load the given `codeDetails`.\n * 'test-component-registration-id-1', Promise.resolve(testComponentFactory1),\n * // For this particular component, the npm code loader is provided.\n * 'test-component-registration-id-2', import('test-component-2-package').then(m => m.NpmCodeLoaderFactory),\n * ]\n * ])\n * };\n * const loopCodeLoaderBundler = new LoopCodeLoaderBundler(config);\n * const loopModule = await loopCodeLoaderBundler.load({ packageName: 'test-component-registration-id-1' });\n * const component = await loopModule.module.loopExport.instantiateLoopComponent(loopComponentConfig, { ... });\n * ```\n */ export class LoopCodeLoaderBundler {\n constructor(config){\n this.config = config;\n this.codeLoadersCache = new Map();\n }\n canLoad(details) {\n return this.config.codeLoaders.has(details.packageName);\n }\n async load(details) {\n const registrationId = details.packageName;\n const cachedCodeLoader = this.codeLoadersCache.get(registrationId);\n if (cachedCodeLoader) {\n return cachedCodeLoader.load(details);\n }\n if (!this.canLoad(details)) {\n throw new Error('Codeloader does not know how to load from this source');\n }\n const loader = await this.createLoader({\n packageName: registrationId\n });\n return loader.load(details);\n }\n // eslint-disable-next-line @fluidx/ffx-rules/prefer-private-fields -- TODO: Exception added when rule was enabled. Please consider refactoring this to use ECMAScript # prefixed private properties for better minification\n async createLoader(details) {\n const registrationId = details.packageName;\n const { codeLoaders, ...loaderConfig } = this.config;\n const codeLoaderFactoryPromise = codeLoaders.get(registrationId);\n if (!codeLoaderFactoryPromise) {\n throw new Error(`Could not get code loader factory for registrationId: ${registrationId}`);\n }\n // Call .then() to work around Chromium memory leak bug (https://bugs.chromium.org/p/v8/issues/detail?id=13736)\n const loaderFactory = await codeLoaderFactoryPromise.then();\n const loader = await loaderFactory.instantiateLoopCodeLoader(loaderConfig);\n if (!loader.canLoad(details)) {\n throw new Error(`Could not create loader Codeloader`);\n }\n this.codeLoadersCache.set(registrationId, loader);\n return loader;\n }\n async preCache(packageName) {\n const cachedCodeLoader = this.codeLoadersCache.get(packageName);\n if (cachedCodeLoader) {\n await cachedCodeLoader.preCache?.(packageName);\n return;\n }\n const loader = await this.createLoader({\n packageName\n });\n await loader.preCache?.(packageName);\n }\n}\n\n//# sourceMappingURL=LoopCodeLoaderBundler.js.map","import { LoopCodeLoaderBundler } from './LoopCodeLoaderBundler';\nimport { LazyPromise } from '@fluidframework/core-utils/legacy';\n/** Helper class for making the {@link LoopCodeLoaderBundler} compatible with the {@link LoopCodeLoaderFactoryProvider} for use on the dependency synthesizer */ export class LoopCodeLoaderBundlerFactoryProvider {\n /**\n * Instantiates a new instance of the {@link LoopCodeLoaderBundlerFactoryProvider} class.\n * @param codeLoaders - Maps the `registrationId` of a loop component to its corresponding code loader factories.\n * @example\n * ```ts\n * // Note the static import. This will ensure this code loader chunk will be downloaded in the same slice.\n * import { CdnCodeLoaderFactory } from '@loopComponentPackage';\n *\n * const codeLoaders: CodeLoadersMappings = new Map([\n * [\n * 'loopRegistrationId1', Promise.resolve(CdnCodeLoaderFactory)\n * ],\n * [\n * 'loopRegistrationId2',\n * // This is a dynamic import which doesn't necessarily make the chunk be downloaded within the same slice.\n * // Although this promise will start to be executed right away.\n * import('@loopComponentPackage').then(m => m.NpmCodeLoaderFactory)\n * ],\n * [\n * 'loopRegistrationId3',\n * // The dynamic import will start only when the lazy promises is awaited.\n * new LazyPromise(() => import('@loopComponentPackage').then(m => m.NpmCodeLoaderFactory))\n * ]\n * ...\n * ]);\n *\n * const codeLoaderFactoryProvider = new LoopCodeLoaderBundlerFactory(codeLoaders);\n * ```\n */ constructor(codeLoaders){\n this.getLoopCodeLoaderFactory = async ()=>{\n if (!this.factory) {\n throw new Error('Loop Code Loader Bundle is already disposed');\n }\n return this.factory;\n };\n this.factory = new LazyPromise(async ()=>({\n instantiateLoopCodeLoader: async (props)=>new LoopCodeLoaderBundler({\n ...props,\n codeLoaders\n })\n }));\n }\n async dispose() {\n delete this.factory;\n }\n get Disposable() {\n return this;\n }\n get LoopCodeLoaderFactoryProvider() {\n return this;\n }\n}\n\n//# sourceMappingURL=LoopCodeLoaderBundlerFactoryProvider.js.map","import type { Disposable } from '@fluidx/loop-types';\r\nimport type { CopilotConfigurationContext } from '@fluidx/loop-workspace-types';\r\n\r\nexport const getOneNoteCopilotConfigurationContext = (m365ChatFeatureSettings?: Record): CopilotConfigurationContext & Disposable => ({\r\n get CopilotConfigurationContext(): CopilotConfigurationContext {\r\n return this;\r\n },\r\n get Disposable(): Disposable {\r\n return this;\r\n },\r\n dispose() { return; },\r\n scenarioName: 'OneNoteCopilotNotebook',\r\n sourceName: 'OneNoteCopilotNotebook',\r\n bizChatFeedbackClientName: 'NotebooksOneNoteWin32',\r\n m365ChatFeatureSettings,\r\n});\r\n","/** Get content direction from locale */ export function getContentDirection(locale, hostContentDirection, componentContentDirection) {\n if (componentContentDirection) {\n return componentContentDirection;\n }\n if (hostContentDirection) {\n return hostContentDirection;\n }\n return getLocaleDirection(locale);\n}\n/** Get UI direction from locale */ export function getUIDirection(locale) {\n return getLocaleDirection(locale);\n}\nexport function isTranslate(value) {\n return value === 'yes' || value === 'no' || value === undefined;\n}\nfunction getLocaleDirection(locale) {\n switch(locale){\n case 'ar-sa':\n case 'fa-ir':\n case 'he-il':\n case 'ug-cn':\n case 'ur-pk':\n return 'rtl';\n default:\n return 'ltr';\n }\n}\n\n//# sourceMappingURL=localeDirection.js.map","import type { Disposable, InternationalizationContext } from '@fluidx/loop-types';\r\nimport type { Locale, LocaleDirection } from '@fluidx/utilities';\r\nimport { getUIDirection } from '@fluidx/utilities';\r\n\r\nexport function getInternationalizationContext(\r\n locale: Locale\r\n): InternationalizationContext & Disposable {\r\n // Get localization properties\r\n const localeDirection: LocaleDirection = getUIDirection(locale);\r\n const internationalizationContext: InternationalizationContext & Disposable = {\r\n get InternationalizationContext() {\r\n return this;\r\n },\r\n uiLocale: locale,\r\n defaultContentDirection: localeDirection,\r\n get Disposable() {\r\n return this;\r\n },\r\n dispose() {\r\n return;\r\n },\r\n };\r\n\r\n return internationalizationContext;\r\n}\r\n","import type {\r\n Environment, SettingType, UserContext,\r\n} from '@fluidx/loop-types';\r\nimport { EcsSettingsProvider } from '@fluidx/settings-provider';\r\nimport { featureGates } from '../utils/FeatureGates';\r\n\r\nclass InjectedSettingsProvider extends EcsSettingsProvider {\r\n private injectedSettings = new Map();\r\n\r\n /**\r\n * Checks to see if the setting was overridden and returns that value.\r\n * Otherwise returns the ecs provided setting\r\n */\r\n override getSetting(settingName: string, defaultValue: T, namespace: string): T {\r\n if (this.injectedSettings.has(settingName)) {\r\n return this.injectedSettings.get(settingName) as T;\r\n }\r\n return super.getSetting(settingName, defaultValue, namespace);\r\n }\r\n\r\n /**\r\n * Sets the setting to be a specific value on the SettingsProvider\r\n * @param settingName SettingName to be overridden\r\n * @param value overridden value\r\n */\r\n setSetting(settingName: string, value: T) {\r\n this.injectedSettings.set(settingName, value);\r\n }\r\n}\r\n\r\nexport function createFrontendLoopSettingsProvider(environment: Environment, userContext: UserContext): EcsSettingsProvider {\r\n const settingsProvider = new InjectedSettingsProvider({\r\n ecsFilters: {\r\n audience: environment.audience,\r\n userContext: userContext,\r\n },\r\n hostName: 'Office',\r\n });\r\n\r\n settingsProvider.setSetting('loopApp.isNotebooksExperienceEnabled', true);\r\n settingsProvider.setSetting('loopApp.isOneNoteNavbarEnabled', true);\r\n settingsProvider.setSetting('loopApp.isResetOnNavigationEnabled', true);\r\n settingsProvider.setSetting('loopApp.isNotebooksPodcastEnabled', true);\r\n settingsProvider.setSetting('loopApp.shouldCheckBizPolicyForNotebookCreation', true);\r\n\r\n const useL2NavRefresh = featureGates.getBooleanFeatureGate('useL2NavRefresh', false /* defaultValue */);\r\n settingsProvider.setSetting('loopApp.isL2NavRefreshEnabled', useL2NavRefresh);\r\n\r\n console.log('Loop settings injected:', settingsProvider);\r\n return settingsProvider;\r\n}\r\n","import type { AppPlatform, Locale } from '@fluidx/utilities';\r\nimport { v4 as uuidv4 } from 'uuid';\r\n\r\nexport enum HostAppSettingName {\r\n HostAudienceGroup = 'HostAudienceGroup',\r\n LaunchDocUrl = 'LaunchDocUrl',\r\n LaunchDocUrlRequiresRedeem = 'LaunchDocUrlRequiresRedeem',\r\n LaunchPodId = 'LaunchPodId',\r\n LaunchSpoId = 'LaunchSpoId',\r\n LoopAudienceOverride = 'LoopAudienceOverride',\r\n IsUILessLoad = 'IsUILessLoad',\r\n}\r\n\r\nconst fallbackHostSessionId = uuidv4();\r\nconst fallbackCorrelationId = uuidv4();\r\n\r\nexport class HostAppSettings {\r\n public static forceRender = false;\r\n public static getSetting(name: HostAppSettingName, defaultValue: T): T {\r\n return Office.context.document.settings.get(name) as T ?? defaultValue;\r\n }\r\n public static getLocale(defaultValue: Locale): Locale {\r\n return Office.context.displayLanguage as Locale ?? defaultValue;\r\n }\r\n public static getPlatform(): AppPlatform {\r\n const hostPlatform = Office.context.platform;\r\n switch (hostPlatform) {\r\n case Office.PlatformType.PC:\r\n return 'Win32';\r\n case Office.PlatformType.OfficeOnline:\r\n return 'Web';\r\n case Office.PlatformType.Mac:\r\n return 'Mac';\r\n case Office.PlatformType.iOS:\r\n return 'iOS';\r\n case Office.PlatformType.Android:\r\n return 'Android';\r\n default:\r\n return 'Win32';\r\n }\r\n }\r\n public static getCorrelationId(): string {\r\n return Office.context.document.settings.get('HostCorrelationId') ?? fallbackCorrelationId;\r\n }\r\n public static getSessionId(): string {\r\n return (\r\n Office.context.document.settings.get('HostSessionId') ?? fallbackHostSessionId\r\n );\r\n }\r\n public static isUILessLoad(): boolean {\r\n console.log(`Force Render: ${HostAppSettings.forceRender}`);\r\n return HostAppSettings.forceRender ? false : HostAppSettings.getSetting(HostAppSettingName.IsUILessLoad, false);\r\n }\r\n\r\n /**\r\n * Clears settings that are no longer needed after rendering the UI\r\n */\r\n public static clearOnRenderSettings(): void {\r\n Office.context.document.settings.remove(HostAppSettingName.IsUILessLoad);\r\n Office.context.document.settings.remove(HostAppSettingName.LaunchDocUrl);\r\n Office.context.document.settings.remove(HostAppSettingName.LaunchDocUrlRequiresRedeem);\r\n Office.context.document.settings.remove(HostAppSettingName.LaunchPodId);\r\n Office.context.document.settings.remove(HostAppSettingName.LaunchSpoId);\r\n }\r\n}\r\n","import type { Disposable, ProvideTelemetryConfig } from '@fluidx/loop-types';\r\nimport { HostAppSettings } from '../utils/HostAppSettings';\r\n\r\nclass TelemetryConfigProvider implements ProvideTelemetryConfig, Disposable {\r\n Disposable = this;\r\n\r\n dispose(): void {\r\n return;\r\n }\r\n\r\n get TelemetryConfig() {\r\n return this;\r\n }\r\n\r\n get disallowServiceTelemetry() {\r\n return false;\r\n }\r\n\r\n get hostCorrelationId() {\r\n return HostAppSettings.getCorrelationId();\r\n }\r\n\r\n get hostSessionId() {\r\n return HostAppSettings.getSessionId();\r\n }\r\n}\r\n\r\nexport const createTelemetryConfigProvider = () => {\r\n return new TelemetryConfigProvider();\r\n};\r\n","import EventEmitter from 'events';\r\nimport type {\r\n ProvideDisposable, ThemeName, Theming,\r\n} from '@fluidx/loop-types';\r\nexport class ThemeProvider extends EventEmitter implements Theming, ProvideDisposable {\r\n themeName?: ThemeName;\r\n constructor() {\r\n super();\r\n this.setThemeName();\r\n void this.registerThemeChangeHandler();\r\n }\r\n\r\n public get Theming(): Theming {\r\n return this;\r\n }\r\n\r\n public get Disposable() {\r\n return this;\r\n }\r\n\r\n private setThemeName(data?: Office.OfficeThemeChangedEventArgs) {\r\n const isHighContrast = window.matchMedia('(forced-colors: active)').matches;\r\n console.log('Theme changed: isHighContrast', isHighContrast);\r\n // If high contrast mode is enabled, use the high-contrast theme\r\n if (isHighContrast) {\r\n this.themeName = 'high-contrast';\r\n return;\r\n }\r\n const officeTheme = data ? data.officeTheme : Office.context.officeTheme;\r\n // Otherwise, use the default or dark theme based on the Office context\r\n const isDarkMode = officeTheme.isDarkTheme;\r\n this.themeName = isDarkMode ? 'dark' : 'default';\r\n }\r\n\r\n private themeChangeHandler = (data: Office.OfficeThemeChangedEventArgs) => {\r\n console.log('Theme changed: ', data);\r\n this.setThemeName(data);\r\n this.emit('themeNameChanged');\r\n };\r\n\r\n private registerThemeChangeHandler = async () => {\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const officeContext = Office.context as any;\r\n if (officeContext?.themeManager) {\r\n await officeContext.themeManager.addHandlerAsync(Office.EventType.OfficeThemeChanged, this.themeChangeHandler);\r\n }\r\n };\r\n\r\n private unRegisterThemeChangeHandler = async () => {\r\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\r\n const officeContext = Office.context as any;\r\n if (officeContext?.themeManager) {\r\n await officeContext.themeManager.removeHandlerAsync(Office.EventType.OfficeThemeChanged, this.themeChangeHandler);\r\n }\r\n };\r\n\r\n dispose(): void {\r\n void this.unRegisterThemeChangeHandler();\r\n }\r\n}\r\n","import type {\r\n KeyboardEventInfo,\r\n LinkOptions,\r\n ProvideDisposable,\r\n UrlHandlerProvider,\r\n} from '@fluidx/loop-types';\r\nimport type { AppWorkspaceManager } from '../service/workspaceManager/AppWorkspaceManager';\r\n\r\nexport class OneNoteUrlHandlerProvider\r\nimplements UrlHandlerProvider, ProvideDisposable\r\n{\r\n constructor(private readonly appWorkspaceManager: AppWorkspaceManager) {}\r\n\r\n onClick(\r\n url: URL,\r\n _linkOptions?: LinkOptions,\r\n _event?: MouseEvent | PointerEvent | KeyboardEventInfo,\r\n ): Promise {\r\n console.log('OneNoteHandler clicked ' + url);\r\n return this.appWorkspaceManager\r\n .appNavigateToResourceLinkInClient({ linkUrl: url.toString() })\r\n .then(() => Promise.resolve(true))\r\n .catch((error) => {\r\n console.log('appNavigateToResourceLinkInClient threw an error: ', error);\r\n return Promise.resolve(false);\r\n });\r\n }\r\n UrlHandlerProvider: UrlHandlerProvider = this;\r\n public get Disposable() {\r\n return this;\r\n }\r\n dispose() {\r\n console.log('dispose');\r\n }\r\n}\r\n","import type { Disposable, LoopTelemetrySink } from '@fluidx/loop-types';\r\nimport { OfficeTelemetrySinkWrapper } from './OfficeTelemetrySinkWrapper';\r\n\r\n// @TODO: Ask Loop team for correct implementation\r\n\r\nexport class HostLoopTelemetrySink\r\n extends OfficeTelemetrySinkWrapper\r\n implements LoopTelemetrySink, Disposable\r\n{\r\n public get LoopTelemetrySink() {\r\n return this;\r\n }\r\n\r\n public get Disposable() {\r\n return this;\r\n }\r\n\r\n public dispose(): void {\r\n console.log('Disposing Telemetry Sink');\r\n }\r\n}\r\n","import type { ProvideNamespaceLogger } from '@fluidx/1p-loop-types';\r\nimport { LoopDependencyContainer } from '@fluidx/injected-dependencies';\r\nimport type {\r\n Environment,\r\n ProvideInternationalizationContext,\r\n ProvideLoopCodeLoaderFactory,\r\n ProvideLoopTelemetrySink,\r\n ProvideSettingsProvider,\r\n ProvideTelemetryConfig,\r\n ProvideTheming,\r\n ProvideTokenProvider,\r\n ProvideUrlHandlerProvider,\r\n ProvideUserContext,\r\n} from '@fluidx/loop-types';\r\nimport {\r\n CdnCodeLoaderFactory,\r\n LoopRegistrationId,\r\n} from '@fluidx/loop-workspace-component';\r\nimport type {\r\n ProvideBizChatTokenProvider,\r\n ProvideCopilotConfigurationContext,\r\n} from '@fluidx/loop-workspace-types';\r\nimport type { OfficeFluidLogger } from '@fluidx/telemetry';\r\nimport type { Locale } from '@fluidx/utilities';\r\nimport { LoopCodeLoaderBundlerFactoryProvider } from '@ms/office-web-host';\r\nimport type { HostAuthService } from '../auth/HostAuthService';\r\nimport {\r\n ThemeProvider,\r\n createFrontendLoopSettingsProvider,\r\n createTelemetryConfigProvider,\r\n getInternationalizationContext,\r\n getOneNoteCopilotConfigurationContext,\r\n} from '../providers';\r\nimport {\r\n M365CHAT_APP_VERSION_SETTING_NAME,\r\n type M365ChatSettingsProvider,\r\n} from '../providers/M365ChatSettingsProvider';\r\nimport { OneNoteUrlHandlerProvider } from '../providers/OneNoteUrlHandlerProvider';\r\nimport { HostLoopTelemetrySink } from '../telemetry/HostLoopTelemetrySink';\r\nimport { TelemetryLogger } from '../telemetry/TelemetryLogger';\r\nimport { changeGates } from '../utils/FeatureGates';\r\nimport type { AppWorkspaceManager } from './workspaceManager/AppWorkspaceManager';\r\ntype WorkspaceComponentProviderTypes =\r\n & ProvideBizChatTokenProvider\r\n & ProvideCopilotConfigurationContext\r\n & ProvideInternationalizationContext\r\n & ProvideLoopCodeLoaderFactory\r\n & ProvideLoopTelemetrySink\r\n & ProvideNamespaceLogger\r\n & ProvideSettingsProvider\r\n & ProvideTelemetryConfig\r\n & ProvideTheming\r\n & ProvideTokenProvider\r\n & ProvideUrlHandlerProvider\r\n & ProvideUserContext;\r\n\r\nexport class DependencySynthesizerService {\r\n private dependencySynthesizer: LoopDependencyContainer | undefined;\r\n\r\n public getDependencySynthesizer() {\r\n if (!this.dependencySynthesizer) {\r\n this.dependencySynthesizer =\r\n new LoopDependencyContainer();\r\n }\r\n return this.dependencySynthesizer;\r\n }\r\n\r\n public async registerProviders(\r\n appWorkspaceManager: AppWorkspaceManager,\r\n authService: HostAuthService,\r\n environment: Environment,\r\n fluidLogger: OfficeFluidLogger,\r\n locale: Locale,\r\n m365ChatSettingsProvider: M365ChatSettingsProvider,\r\n ) {\r\n const dependencySynthesizer = this.getDependencySynthesizer();\r\n dependencySynthesizer.register(\r\n 'InternationalizationContext',\r\n getInternationalizationContext(locale),\r\n );\r\n dependencySynthesizer.register(\r\n 'LoopCodeLoaderFactoryProvider',\r\n new LoopCodeLoaderBundlerFactoryProvider(\r\n new Map([[LoopRegistrationId, Promise.resolve(CdnCodeLoaderFactory)]]),\r\n ),\r\n );\r\n dependencySynthesizer.register(\r\n 'LoopTelemetrySink',\r\n new HostLoopTelemetrySink(),\r\n );\r\n dependencySynthesizer.register('NamespaceLogger', fluidLogger);\r\n dependencySynthesizer.register(\r\n 'SettingsProvider',\r\n createFrontendLoopSettingsProvider(\r\n environment,\r\n authService.getUserContext(),\r\n ),\r\n );\r\n dependencySynthesizer.register('Theming', new ThemeProvider());\r\n dependencySynthesizer.register('TokenProvider', authService);\r\n dependencySynthesizer.register('UserContext', authService.getUserContext());\r\n dependencySynthesizer.register('BizChatTokenProvider', authService.bizChatAuthService);\r\n dependencySynthesizer.register('TelemetryConfig', createTelemetryConfigProvider());\r\n dependencySynthesizer.register('UrlHandlerProvider', new OneNoteUrlHandlerProvider(appWorkspaceManager));\r\n let m365ChatFeatureSettings: Record | undefined;\r\n // Fetch M365 Chat settings\r\n if (changeGates.getBooleanChangeGate('useM365ChatSettingsProvider')) {\r\n m365ChatFeatureSettings = await m365ChatSettingsProvider.getAllM365ChatFeatureSettings();\r\n const chatVersion = m365ChatFeatureSettings?.[M365CHAT_APP_VERSION_SETTING_NAME] ?? 'Unknown';\r\n TelemetryLogger.Instance.logEvent('M365ECSChatVersion', {\r\n ChatVersion: chatVersion\r\n });\r\n console.log('ECS Chat Version', chatVersion);\r\n }\r\n\r\n dependencySynthesizer.register('CopilotConfigurationContext', getOneNoteCopilotConfigurationContext(m365ChatFeatureSettings));\r\n return dependencySynthesizer;\r\n }\r\n\r\n public unregisterProviders() {\r\n if (!this.dependencySynthesizer) {\r\n return;\r\n }\r\n this.dependencySynthesizer.unregister('CopilotConfigurationContext');\r\n this.dependencySynthesizer.unregister('InternationalizationContext');\r\n this.dependencySynthesizer.unregister('LoopCodeLoaderFactoryProvider');\r\n this.dependencySynthesizer.unregister('LoopTelemetrySink');\r\n this.dependencySynthesizer.unregister('NamespaceLogger');\r\n this.dependencySynthesizer.unregister('SettingsProvider');\r\n this.dependencySynthesizer.unregister('Theming');\r\n this.dependencySynthesizer.unregister('TokenProvider');\r\n this.dependencySynthesizer.unregister('UserContext');\r\n this.dependencySynthesizer.unregister('BizChatTokenProvider');\r\n this.dependencySynthesizer.unregister('TelemetryConfig');\r\n this.dependencySynthesizer.unregister('UrlHandlerProvider');\r\n\r\n this.dependencySynthesizer = undefined;\r\n }\r\n}\r\n","/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n/**\n * @legacy\n * @alpha\n */\nexport const OdcApiSiteOrigin = \"https://my.microsoftpersonalcontent.com\";\n/**\n * @legacy\n * @alpha\n */\nexport const OdcFileSiteOrigin = \"https://1drv.ms\";\n//# sourceMappingURL=constants.js.map","/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\nimport { fromBase64ToUtf8, fromUtf8ToBase64 } from \"@fluid-internal/client-utils\";\nimport { OdcApiSiteOrigin, OdcFileSiteOrigin } from \"./constants.js\";\nconst fluidSignature = \"1\";\nconst fluidSignatureParamName = \"fluid\";\nconst sitePathParamName = \"s\";\nconst driveIdParamName = \"d\";\nconst itemIdParamName = \"f\";\nconst dataStorePathParamName = \"c\";\nconst appNameParamName = \"a\";\nconst containerPackageNameParamName = \"p\";\nconst fileVersionParamName = \"v\";\nconst additionalContextParamName = \"x\";\n/**\n * Transforms given Fluid data store locator into string that can be embedded into url\n * @param locator - describes Fluid data store locator info to be encoded\n * @returns string representing encoded Fluid data store locator info\n * @legacy\n * @alpha\n */\nexport function encodeOdspFluidDataStoreLocator(locator) {\n const siteUrl = new URL(locator.siteUrl);\n const sitePath = encodeURIComponent(siteUrl.pathname);\n const driveId = encodeURIComponent(locator.driveId);\n const itemId = encodeURIComponent(locator.itemId);\n const dataStorePath = encodeURIComponent(locator.dataStorePath);\n let locatorSerialized = `${sitePathParamName}=${sitePath}&${driveIdParamName}=${driveId}&${itemIdParamName}=${itemId}&${dataStorePathParamName}=${dataStorePath}&${fluidSignatureParamName}=${fluidSignature}`;\n if (locator.appName) {\n locatorSerialized += `&${appNameParamName}=${encodeURIComponent(locator.appName)}`;\n }\n if (locator.containerPackageName) {\n locatorSerialized += `&${containerPackageNameParamName}=${encodeURIComponent(locator.containerPackageName)}`;\n }\n if (locator.fileVersion) {\n locatorSerialized += `&${fileVersionParamName}=${encodeURIComponent(locator.fileVersion)}`;\n }\n if (locator.context) {\n locatorSerialized += `&${additionalContextParamName}=${encodeURIComponent(locator.context)}`;\n }\n return fromUtf8ToBase64(locatorSerialized);\n}\n/**\n * Decodes given encoded value representing Fluid data store locator extracted from ODSP Fluid file link\n * @param encodedLocatorValue - encoded Fluid data store locator value which was produced by\n * {@link encodeOdspFluidDataStoreLocator} function\n * @param siteOriginUrl - site origin that will be appended to encoded relative path to form absolute file url\n * @param requireFluidSignature - flag representing if the Fluid signature is expected in the url, default true\n * @returns object representing Fluid data store location in ODSP terms\n */\nfunction decodeOdspFluidDataStoreLocator(encodedLocatorValue, siteOriginUrl, requireFluidSignature = true) {\n const locatorInfo = new URLSearchParams(fromBase64ToUtf8(encodedLocatorValue));\n const signatureValue = locatorInfo.get(fluidSignatureParamName);\n if (requireFluidSignature && signatureValue !== \"1\") {\n return undefined;\n }\n const sitePath = locatorInfo.get(sitePathParamName);\n const driveId = locatorInfo.get(driveIdParamName);\n const itemId = locatorInfo.get(itemIdParamName);\n const dataStorePath = locatorInfo.get(dataStorePathParamName);\n const appName = locatorInfo.get(appNameParamName) ?? undefined;\n const containerPackageName = locatorInfo.get(containerPackageNameParamName) ?? undefined;\n const fileVersion = locatorInfo.get(fileVersionParamName) ?? undefined;\n const context = locatorInfo.get(additionalContextParamName) ?? undefined;\n // \"\" is a valid value for dataStorePath so simply check for absence of the param;\n // file storage locator params must be present and non-empty\n if (!sitePath || !driveId || !itemId || dataStorePath === null) {\n return undefined;\n }\n let siteUrl;\n try {\n siteUrl = new URL(sitePath, siteOriginUrl);\n }\n catch {\n // Ignore failure to parse url as input might be malformed\n }\n if (!siteUrl) {\n return undefined;\n }\n return {\n siteUrl: siteUrl.href,\n driveId,\n itemId,\n dataStorePath,\n appName,\n containerPackageName,\n fileVersion,\n context,\n };\n}\n/**\n * This parameter is provided by host in the resolve request and it contains information about the file\n * like driveId, itemId, siteUrl, datastorePath, packageName etc.\n * @legacy\n * @alpha\n */\nexport const locatorQueryParamName = \"nav\";\n/**\n * Embeds Fluid data store locator data into given ODSP url\n * @param url - file url in ODSP format (can be either canonical or share link)\n * @param locator - object representing Fluid data store location in ODSP terms\n * @legacy\n * @alpha\n */\nexport function storeLocatorInOdspUrl(url, locator) {\n const encodedLocatorValue = encodeOdspFluidDataStoreLocator(locator);\n // IMPORTANT: Do not apply encodeURIComponent to encodedLocatorValue, param value is automatically encoded\n // when set via URLSearchParams class\n url.searchParams.set(locatorQueryParamName, encodedLocatorValue);\n}\n/**\n * Extract ODSP Fluid data store locator object from given ODSP url. This extracts things like\n * driveId, ItemId, siteUrl etc from a url where these are encoded in nav query param.\n * @param url - ODSP url representing Fluid file link\n * @param requireFluidSignature - flag representing if the Fluid signature is expected in the url, default true\n * @returns object representing Fluid data store location in ODSP terms\n * @legacy\n * @alpha\n */\nexport function getLocatorFromOdspUrl(url, requireFluidSignature = true) {\n // NOTE: No need to apply decodeURIComponent when accessing query params via URLSearchParams class.\n const encodedLocatorValue = url.searchParams.get(locatorQueryParamName);\n if (!encodedLocatorValue) {\n return undefined;\n }\n // IMPORTANT: ODC deviates from ODSP in that its file link origin is different from vroom api origin.\n // The following code passes vroom api origin as site origin instead of file origin.\n const siteOriginUrl = url.origin.toLowerCase() === OdcFileSiteOrigin ? OdcApiSiteOrigin : url.origin;\n return decodeOdspFluidDataStoreLocator(encodedLocatorValue, siteOriginUrl, requireFluidSignature);\n}\n//# sourceMappingURL=odspFluidFileLink.js.map","export const zeroId = '0';\r\nexport const zeroUrl = '0';\r\nexport const emptyId = '';\r\nexport const emptyDocUrl = '';\r\nexport const emptyTitle = '';\r\nexport const defaultRedeemStatus = false;\r\n","import type {\r\n ChatReference, LoopPageData, LoopWorkspaceData, NavigationCreateNotebookParams, NavigationNotebookParams, NavigationPageParams, PageReference\r\n} from '@fluidx/loop-workspace-types';\r\nimport { emptyId, emptyTitle } from '../../service/workspaceManager/constants';\r\n\r\nexport interface InteropIdentityInfo {\r\n userId: string;\r\n userName: string;\r\n email: string;\r\n tenantId: string;\r\n accountType: number;\r\n}\r\n\r\nexport interface InteropWorkspaceDataModel {\r\n title: string;\r\n podId: string;\r\n spoId: string;\r\n isFavorite: boolean;\r\n lastOpened: number;\r\n forceSetAsSelected: boolean;\r\n}\r\n\r\nexport interface InteropPageDataModel {\r\n title: string;\r\n docUrl: string;\r\n podId: string;\r\n spoId: string;\r\n}\r\n\r\nexport interface InteropChatReferenceDataModel {\r\n conversationId: string;\r\n}\r\n\r\nexport interface InteropPageReferenceDataModel {\r\n docUrl: string;\r\n}\r\n\r\nexport interface InteropPageNavigationDataModel {\r\n title: string;\r\n docUrl: string;\r\n podId: string;\r\n requiresRedeem: boolean;\r\n}\r\n\r\nexport interface InteropNotebookNavigationDataModel {\r\n podId: string;\r\n spoId: string;\r\n}\r\n\r\nexport interface InteropCreateNotebookNavigationDataModel {\r\n linkedChats: InteropChatReferenceDataModel[];\r\n linkedPages: InteropPageReferenceDataModel[];\r\n}\r\n\r\nexport interface InteropWorkspaceDataModelCollection {\r\n workspaces: InteropWorkspaceDataModel[];\r\n}\r\n\r\nexport interface InteropPageCollection {\r\n recentPages: InteropPageDataModel[];\r\n}\r\n\r\nexport interface InteropSearchResultNavigationDataModel {\r\n siteUrl: string;\r\n webFallbackUrl: string;\r\n navSuccess: boolean;\r\n}\r\n\r\nexport interface InteropLinkNavigationDataModel {\r\n originalUrl: string;\r\n navSuccess: boolean;\r\n}\r\n\r\nexport interface InteropReferenceLinkNavigationDataModel {\r\n originalUrl: string;\r\n}\r\n\r\nexport function TranslateWorkspaceData(data: LoopWorkspaceData, forceSetAsSelected: boolean): InteropWorkspaceDataModel {\r\n\r\n // The keys are case-sensitive; they need to match what is in the native client, otherwise we get a runtime error in the native client\r\n // when deserializing the JSON object.\r\n const lastOpened = data.lastOpened ?? '';\r\n const lastOpenedDate = Date.parse(lastOpened);\r\n return {\r\n title: data.title,\r\n podId: data.mfsPodId,\r\n spoId: data.spoId,\r\n isFavorite: data.isFavorite,\r\n lastOpened: Number.isNaN(lastOpenedDate) ? 0 : lastOpenedDate,\r\n forceSetAsSelected,\r\n };\r\n}\r\n\r\nexport function TranslatePageData(data: LoopPageData): InteropPageDataModel {\r\n\r\n // The keys are case-sensitive; they need to match what is in the native client, otherwise we get a runtime error in the native client\r\n // when deserializing the JSON object.\r\n return {\r\n title: data.title,\r\n podId: data.mfsPodId ?? emptyId,\r\n docUrl: data.docUrl,\r\n spoId: data.id,\r\n };\r\n}\r\n\r\nexport function TranslateChatReferenceData(data: ChatReference): InteropChatReferenceDataModel {\r\n\r\n // The keys are case-sensitive; they need to match what is in the native client, otherwise we get a runtime error in the native client\r\n // when deserializing the JSON object.\r\n return {\r\n conversationId: data.conversationId,\r\n };\r\n}\r\n\r\nexport function TranslatePageReferenceData(data: PageReference): InteropPageReferenceDataModel {\r\n\r\n // The keys are case-sensitive; they need to match what is in the native client, otherwise we get a runtime error in the native client\r\n // when deserializing the JSON object.\r\n return {\r\n docUrl: data.docUrl,\r\n };\r\n}\r\n\r\nexport function TranslateNotebookNavigationData(data: NavigationNotebookParams): InteropNotebookNavigationDataModel {\r\n\r\n // The keys are case-sensitive; they need to match what is in the native client, otherwise we get a runtime error in the native client\r\n // when deserializing the JSON object.\r\n return {\r\n podId: data.mfsPodId,\r\n spoId: data.spoId ?? emptyId,\r\n };\r\n}\r\n\r\nexport function TranslatePageNavigationData(data: NavigationPageParams, title?: string): InteropPageNavigationDataModel {\r\n\r\n // The keys are case-sensitive; they need to match what is in the native client, otherwise we get a runtime error in the native client\r\n // when deserializing the JSON object.\r\n return {\r\n title: title ?? emptyTitle,\r\n docUrl: data.docUrl,\r\n podId: data.mfsPodId ?? emptyId,\r\n requiresRedeem: data.requiresRedeem ?? false,\r\n };\r\n}\r\n\r\nexport function TranslateCreateNotebookNavigationData(data: NavigationCreateNotebookParams): InteropCreateNotebookNavigationDataModel {\r\n\r\n const notebookCreateEventModel: InteropCreateNotebookNavigationDataModel = {\r\n linkedChats: [],\r\n linkedPages: []\r\n };\r\n if (data.linkedChats !== undefined && Array.isArray(data.linkedChats)) {\r\n const processedChats = data.linkedChats.map((item) => {\r\n return TranslateChatReferenceData(item);\r\n });\r\n notebookCreateEventModel.linkedChats = processedChats;\r\n }\r\n if (data.linkedPages !== undefined && Array.isArray(data.linkedPages)) {\r\n const processedPages = data.linkedPages.map((item) => {\r\n return TranslatePageReferenceData(item);\r\n });\r\n notebookCreateEventModel.linkedPages = processedPages;\r\n }\r\n return notebookCreateEventModel;\r\n}\r\n","import { EventEmitter } from 'events';\r\nimport type { ExistingFileInfo } from '@fluidx/1p-loop-types';\r\nimport type {\r\n LoopWorkspaceData, NavigatedRouteParams, NavigationParams, WorkspaceAndPageManager, WorkspaceAndPageManagerEvents, WorkspaceNavigationHandler,\r\n} from '@fluidx/loop-workspace-types';\r\nimport type {\r\n InteropWorkspaceDataModelCollection,\r\n} from '../../data/Models';\r\nimport {\r\n TranslateCreateNotebookNavigationData, TranslateNotebookNavigationData, TranslatePageNavigationData, TranslateWorkspaceData,\r\n} from '../../data/Models';\r\nimport type { NativeInteropError } from '../../interop';\r\nimport { DataAction, NotifyClient } from '../../interop';\r\nimport { TelemetryLogger } from '../../telemetry/TelemetryLogger';\r\n\r\nexport const WorkspaceManagerEvents = {\r\n navigate: 'navigateTo',\r\n};\r\n\r\nexport class WorkspaceManager extends EventEmitter {\r\n public workspaceNavigationHandler: WorkspaceNavigationHandler | undefined;\r\n public workspaceAndPageManager: WorkspaceAndPageManager | undefined;\r\n private workspaceMap = new Map();\r\n private forceSelectNextAdd = false;\r\n\r\n public async Reset(): Promise {\r\n this.workspaceMap.clear();\r\n return Promise.resolve();\r\n }\r\n\r\n public async DeleteNotebook(podId: string | undefined, spoId: string | undefined) {\r\n\r\n console.log('Requesting workspace delete:', podId, spoId);\r\n console.log('Not yet implemented');\r\n }\r\n\r\n public async RenameNotebook(podId: string | undefined, spoId: string | undefined) {\r\n\r\n console.log('Requesting rename notebook:', podId, spoId);\r\n console.log('Not yet implemented');\r\n }\r\n\r\n public async ToggleFavoriteNotebook(podId: string | undefined, spoId: string | undefined) {\r\n\r\n console.log('Requesting toggle favorite notebook:', podId, spoId);\r\n console.log('Not yet implemented');\r\n }\r\n\r\n public async NavigateTo(params: NavigationParams) {\r\n // Notify subscribers of navigation event\r\n // This is important for the SDX to render the UI if it initially loaded in a UILess mode.\r\n this.emit(WorkspaceManagerEvents.navigate);\r\n\r\n console.log('Requesting component navigation:', params);\r\n const startTime = Date.now();\r\n await this.workspaceNavigationHandler?.navigateTo(params)\r\n .then(() => {\r\n const durationMS = Date.now() - startTime;\r\n TelemetryLogger.Instance.logEvent('NavigateTo', { NavRoute: params.route, Duration: durationMS });\r\n })\r\n .catch((error) => {\r\n const durationMS = Date.now() - startTime;\r\n console.error('navigateTo API failed:', error);\r\n TelemetryLogger.Instance.logError('WorkspaceManagerError', error, {\r\n ErrorMethod: 'NavigateTo', ErrorDetails: 'navigateTo API failed', Duration: durationMS\r\n });\r\n throw error;\r\n });\r\n }\r\n\r\n public async ProcessWorkspaces(): Promise {\r\n try {\r\n if (!this.workspaceAndPageManager)\r\n {\r\n throw new Error('Workspace Manager instance of component manager not set');\r\n }\r\n\r\n const startTime = Date.now();\r\n // getWorkspaces returns a list sorted by interaction time; more recently interacted are earlier in the list.\r\n // According to Loop, we only should call this once and then let the data events keep us up-to-date.\r\n const workspaces = await this.workspaceAndPageManager.getWorkspaces();\r\n const validWorkspaces: LoopWorkspaceData[] = [];\r\n this.workspaceMap.clear();\r\n workspaces.forEach((item) => {\r\n if (item.mfsPodId === undefined || item.spoId === undefined) {\r\n return;\r\n }\r\n\r\n validWorkspaces.push(item);\r\n this.workspaceMap.set(item.mfsPodId, item);\r\n });\r\n const durationMS = Date.now() - startTime;\r\n console.log(`GetWorkspaces returned ${validWorkspaces.length} viable workspaces out of ${workspaces.length} total workspaces in ${durationMS}ms.`);\r\n TelemetryLogger.Instance.logEvent('GetWorkspaces', {\r\n TotalWorkspaceCount: workspaces.length,\r\n ViableWorkspaceCount: validWorkspaces.length,\r\n Duration: durationMS,\r\n });\r\n const nativeInteropWorkspaces = validWorkspaces.map((item) => {\r\n return TranslateWorkspaceData(item, false);\r\n });\r\n\r\n const workspaceCollection: InteropWorkspaceDataModelCollection = {\r\n workspaces: nativeInteropWorkspaces,\r\n };\r\n\r\n void DataAction.setWorkspaces(workspaceCollection)\r\n .catch((error: NativeInteropError) => {\r\n console.error(error);\r\n TelemetryLogger.Instance.logError('DataActionError', error, {\r\n ErrorMethod: 'ProcessWorkspaces',\r\n ErrorDetails: 'Failed to notify client of data action event',\r\n ErrorEvent: 'setWorkspaces',\r\n });\r\n\r\n throw error;\r\n });\r\n }\r\n catch(error) {\r\n TelemetryLogger.Instance.logError('WorkspaceManagerError', error, { ErrorMethod: 'ProcessWorkspaces', ErrorDetails: 'Error processing workspaces' });\r\n console.error(error);\r\n\r\n // Try notifying the client we failed to process workspaces.\r\n void DataAction.failedToProcessWorkspaces()\r\n .catch((error: NativeInteropError) => {\r\n // We failed to notify the client of the error, so log that the notification failed.\r\n console.error(error);\r\n TelemetryLogger.Instance.logError('DataActionError', error, {\r\n ErrorMethod: 'failedToProcessWorkspaces',\r\n ErrorDetails: 'Failed to notify client of data action failure',\r\n });\r\n });\r\n\r\n return Promise.reject('Error processing workspaces');\r\n }\r\n }\r\n\r\n public async GetWorkspaceForPage(fileInfo: ExistingFileInfo) {\r\n const startTime = Date.now();\r\n try {\r\n if (!this.workspaceAndPageManager)\r\n {\r\n throw new Error('Workspace Manager instance of component manager not set');\r\n }\r\n\r\n const workspace = await this.workspaceAndPageManager.getWorkspaceForPage(fileInfo);\r\n const durationMS = Date.now() - startTime;\r\n console.log(`GetWorkspaceForPage returned in ${durationMS}ms:`, workspace);\r\n TelemetryLogger.Instance.logEvent('GetWorkspaceForPage', { FoundWorkspace: workspace !== undefined, Duration: durationMS });\r\n return workspace;\r\n }\r\n catch(error) {\r\n const durationMS = Date.now() - startTime;\r\n console.error(error);\r\n TelemetryLogger.Instance.logError('WorkspaceManagerError', error, {\r\n ErrorMethod: 'GetWorkspaceForPage', ErrorDetails: 'Error getting workspace for page', Duration: durationMS\r\n });\r\n return Promise.reject('Error getting workspace for page');\r\n }\r\n }\r\n\r\n public SetWorkspaceAndPageManager(manager: WorkspaceAndPageManager | undefined) {\r\n this.workspaceAndPageManager = manager;\r\n }\r\n\r\n public SetWorkspaceNavigationHandler(handler: WorkspaceNavigationHandler | undefined) {\r\n this.workspaceNavigationHandler = handler;\r\n }\r\n\r\n public async onWorkspaceListChangedEvent(event: WorkspaceAndPageManagerEvents['workspaceListChanged']) {\r\n console.log('Workspace List Changed event:', event);\r\n try {\r\n let workspace = event.workspace;\r\n console.log('Workspace List Changed event workspace:', workspace);\r\n if (workspace === undefined) {\r\n console.warn('Workspace List Changed event has undefined workspace; converting raw event');\r\n workspace = event as unknown as LoopWorkspaceData;\r\n console.log('Workspace List Changed event as workspace:', workspace);\r\n }\r\n\r\n if (workspace === undefined) {\r\n throw new Error(`Undefined workspace for workspaceListChanged event type: ${event.type}`);\r\n }\r\n\r\n const forceSetAsSelected = this.forceSelectNextAdd;\r\n switch (event.type) {\r\n case 'add':\r\n this.forceSelectNextAdd = false;\r\n if (workspace.mfsPodId === undefined) {\r\n throw new Error(`Malformed workspace podId for event type: ${event.type}`);\r\n }\r\n if (workspace.spoId === undefined) {\r\n throw new Error(`Malformed workspace spoId for event type: ${event.type}`);\r\n }\r\n this.workspaceMap.set(workspace.mfsPodId, workspace);\r\n void DataAction.updateWorkspace(TranslateWorkspaceData(workspace, forceSetAsSelected))\r\n .catch((error: NativeInteropError) => {\r\n console.error(error);\r\n TelemetryLogger.Instance.logError('DataActionError', error, {\r\n ErrorMethod: 'onWorkspaceListChangedEvent',\r\n ErrorDetails: 'Failed to notify client of data action event',\r\n ErrorEvent: event.type,\r\n });\r\n\r\n throw error;\r\n });\r\n break;\r\n\r\n case 'update':\r\n if (workspace.mfsPodId === undefined) {\r\n throw new Error(`Malformed workspace podId for event type: ${event.type}`);\r\n }\r\n if (workspace.spoId === undefined) {\r\n throw new Error(`Malformed workspace spoId for event type: ${event.type}`);\r\n }\r\n this.workspaceMap.set(workspace.mfsPodId, workspace);\r\n void DataAction.updateWorkspace(TranslateWorkspaceData(workspace, false))\r\n .catch((error: NativeInteropError) => {\r\n console.error(error);\r\n TelemetryLogger.Instance.logError('DataActionError', error, {\r\n ErrorMethod: 'onWorkspaceListChangedEvent',\r\n ErrorDetails: 'Failed to notify client of data action event',\r\n ErrorEvent: event.type,\r\n });\r\n\r\n throw error;\r\n });\r\n // We don't have a separate rename event yet, so just apply this update again as a rename.\r\n // On newer clients, we're separating applying rename out from update in preparation\r\n // for getting a dedicated rename event from Loop.\r\n void DataAction.renameWorkspace(TranslateWorkspaceData(workspace, false))\r\n .catch((error: NativeInteropError) => {\r\n console.error(error);\r\n TelemetryLogger.Instance.logError('DataActionError', error, {\r\n ErrorMethod: 'onWorkspaceListChangedEvent',\r\n ErrorDetails: 'Failed to notify client of data action event',\r\n ErrorEvent: 'rename',\r\n });\r\n\r\n throw error;\r\n });\r\n break;\r\n\r\n case 'remove':\r\n if (workspace.mfsPodId === undefined) {\r\n throw new Error(`Malformed workspace podId for event type: ${event.type}`);\r\n }\r\n this.workspaceMap.delete(workspace.mfsPodId);\r\n void DataAction.removeWorkspace(TranslateWorkspaceData(workspace, false))\r\n .catch((error: NativeInteropError) => {\r\n console.error(error);\r\n TelemetryLogger.Instance.logError('DataActionError', error, {\r\n ErrorMethod: 'onWorkspaceListChangedEvent',\r\n ErrorDetails: 'Failed to notify client of data action event',\r\n ErrorEvent: event.type,\r\n });\r\n\r\n throw error;\r\n });\r\n break;\r\n\r\n default:\r\n throw new Error(`Unhandled workspaceListChanged event type: ${event.type}`);\r\n }\r\n }\r\n catch(error) {\r\n TelemetryLogger.Instance.logError('ComponentDataWorkspaceListChangedEventError', error, { ErrorMethod: 'onWorkspaceListChangedEvent', ErrorDetails: `Error handling workspaceListChanged event type: ${event.type}` });\r\n console.error(error, event);\r\n return Promise.reject('Error handling workspaceListChanged event');\r\n }\r\n }\r\n\r\n public async onComponentNavigationEvent(data: NavigatedRouteParams) {\r\n console.log('Component navigation event:', data);\r\n if (this.forceSelectNextAdd) {\r\n console.log('Canceling next add notification for client UI selection due to navigation event');\r\n this.forceSelectNextAdd = false;\r\n }\r\n try {\r\n if (data.route === 'notebooks') {\r\n void NotifyClient.navigateToHomeEvent()\r\n .catch((error: NativeInteropError) => {\r\n console.error(error, data);\r\n TelemetryLogger.Instance.logError('NotifyClientError', error, {\r\n ErrorMethod: 'onComponentNavigationEvent',\r\n ErrorDetails: 'Failed to notify client of navigation event',\r\n NavigationRoute: data.route,\r\n });\r\n });\r\n }\r\n else if (data.route === 'notebook') {\r\n if ('createId' in data) {\r\n // CreateNotebookParams; this means the LWC navigated to a newly created unattached workspace.\r\n console.log('Marking next add notification for client UI selection');\r\n this.forceSelectNextAdd = true;\r\n return;\r\n }\r\n void NotifyClient.navigateToNotebookEvent(TranslateNotebookNavigationData(data))\r\n .catch((error: NativeInteropError) => {\r\n console.error(error, data);\r\n TelemetryLogger.Instance.logError('NotifyClientError', error, {\r\n ErrorMethod: 'onComponentNavigationEvent',\r\n ErrorDetails: 'Failed to notify client of navigation event',\r\n NavigationRoute: data.route,\r\n });\r\n });\r\n }\r\n else if (data.route === 'createNotebook') {\r\n void NotifyClient.navigateToCreateNotebookEvent(TranslateCreateNotebookNavigationData(data))\r\n .catch((error: NativeInteropError) => {\r\n console.error(error, data);\r\n TelemetryLogger.Instance.logError('NotifyClientError', error, {\r\n ErrorMethod: 'onComponentNavigationEvent',\r\n ErrorDetails: 'Failed to notify client of navigation event',\r\n NavigationRoute: data.route,\r\n });\r\n });\r\n }\r\n else if (data.route === 'page') {\r\n void NotifyClient.navigateToPageEvent(TranslatePageNavigationData(data))\r\n .catch((error: NativeInteropError) => {\r\n console.error(error, data);\r\n TelemetryLogger.Instance.logError('NotifyClientError', error, {\r\n ErrorMethod: 'onComponentNavigationEvent',\r\n ErrorDetails: 'Failed to notify client of navigation event',\r\n NavigationRoute: data.route,\r\n });\r\n });\r\n }\r\n else {\r\n throw new Error(`Unhandled component navigation event: ${data.route}`);\r\n }\r\n }\r\n catch(error) {\r\n TelemetryLogger.Instance.logError('ComponentNavigationEventError', error, { ErrorMethod: 'onComponentNavigationEvent', ErrorDetails: `Error handling navigation event for route: ${data.route}` });\r\n console.error(error, data);\r\n return Promise.reject('Error handling navigation event');\r\n }\r\n }\r\n}\r\n","import type { OdspFluidDataStoreLocator } from '@fluidframework/odsp-driver/legacy';\r\nimport {\r\n getLocatorFromOdspUrl,\r\n locatorQueryParamName,\r\n storeLocatorInOdspUrl,\r\n} from '@fluidframework/odsp-driver/legacy';\r\nimport type { ExistingFileInfo } from '@fluidx/1p-loop-types';\r\nimport type {\r\n NavigationParams,\r\n WorkspaceAndPageManager,\r\n WorkspaceNavigationHandler,\r\n} from '@fluidx/loop-workspace-types';\r\nimport type { HostAuthService } from '../../auth/HostAuthService';\r\nimport type { NativeInteropError } from '../../interop';\r\nimport {\r\n NotifyClient,\r\n} from '../../interop';\r\nimport type {\r\n NativeEvent_AppRequestDeleteNotebookArgs,\r\n NativeEvent_NavigateToCreateNotebookArgs,\r\n NativeEvent_NavigateToLinkArgs,\r\n NativeEvent_NavigateToNotebookArgs,\r\n NativeEvent_NavigateToNotebookPageArgs,\r\n NativeEvent_NavigateToSearchResultArgs,\r\n NativeEvent_RenameNotebookArgs,\r\n NativeEvent_ToggleFavoriteNotebookArgs,\r\n} from '../../interop/nativeEvents';\r\nimport { TelemetryLogger } from '../../telemetry/TelemetryLogger';\r\nimport type { DependencySynthesizerService } from '../DependencySynthesizerService';\r\nimport { WorkspaceManager, WorkspaceManagerEvents } from './WorkspaceManager';\r\nimport {\r\n emptyDocUrl,\r\n emptyId,\r\n zeroId,\r\n zeroUrl,\r\n} from './constants';\r\n\r\nexport class AppWorkspaceManager {\r\n private authService: HostAuthService;\r\n private dependencySynthesizerService: DependencySynthesizerService;\r\n private workspaceManager: WorkspaceManager;\r\n private onNavigationEvent: (() => void) | undefined;\r\n\r\n public constructor(authService: HostAuthService, dependencySynthesizerService: DependencySynthesizerService) {\r\n this.authService = authService;\r\n this.dependencySynthesizerService = dependencySynthesizerService;\r\n this.workspaceManager = new WorkspaceManager();\r\n this.workspaceManager.on(WorkspaceManagerEvents.navigate, () => {\r\n this.onNavigationEvent?.();\r\n });\r\n }\r\n\r\n public getWorkspaceManager() {\r\n return this.workspaceManager;\r\n }\r\n\r\n public setWorkspaceAndPageManager(manager: WorkspaceAndPageManager | undefined) {\r\n this.workspaceManager.SetWorkspaceAndPageManager(manager);\r\n }\r\n\r\n public setWorkspaceNavigationHandler(handler: WorkspaceNavigationHandler | undefined) {\r\n this.workspaceManager.SetWorkspaceNavigationHandler(handler);\r\n }\r\n\r\n public setOnNavigationEvent(onNavigationEvent: () => void) {\r\n this.onNavigationEvent = onNavigationEvent;\r\n }\r\n\r\n public async appInitialize() {\r\n // Trigger the pre-authz call to get the identity info and tokens in bg\r\n await this.authService.initializePreAuthz();\r\n }\r\n\r\n public async appLoadDataModels() {\r\n await this.workspaceManager.ProcessWorkspaces();\r\n }\r\n\r\n public async appOnIdentityChange() {\r\n await this.appInitialize();\r\n }\r\n\r\n public async appNavigateToHome() {\r\n const navParams: NavigationParams = {\r\n route: 'notebooks',\r\n };\r\n\r\n await this.workspaceManager.NavigateTo(navParams);\r\n }\r\n\r\n public async appNavigateToCreateNotebook(params: NativeEvent_NavigateToCreateNotebookArgs) {\r\n const navParams: NavigationParams = {\r\n route: 'createNotebook',\r\n linkedChats: [],\r\n linkedPages: []\r\n };\r\n\r\n if (params.chatConversationIds) {\r\n navParams.linkedChats = params.chatConversationIds.map((conversationId)=>({ conversationId }));\r\n }\r\n\r\n if (params.pageDocUrls) {\r\n navParams.linkedPages = params.pageDocUrls.map((docUrl)=>({ docUrl }));\r\n }\r\n\r\n await this.workspaceManager.NavigateTo(navParams);\r\n }\r\n\r\n public async appRequestDeleteNotebook(params: NativeEvent_AppRequestDeleteNotebookArgs) {\r\n const podId = params.podId;\r\n const spoId = params.spoId;\r\n\r\n await this.workspaceManager.DeleteNotebook(podId, spoId);\r\n }\r\n\r\n public async appNavigateToNotebook(params: NativeEvent_NavigateToNotebookArgs) {\r\n const podId = params.podId;\r\n const spoId = params.spoId;\r\n if (podId === emptyId || podId === zeroId) {\r\n await this.appNavigateToHome();\r\n return;\r\n }\r\n\r\n const navParams: NavigationParams = {\r\n route: 'notebook',\r\n mfsPodId: podId,\r\n spoId: (spoId !== emptyId && spoId !== zeroId) ? spoId : undefined,\r\n };\r\n\r\n await this.workspaceManager.NavigateTo(navParams);\r\n }\r\n\r\n public async appNavigateToPage(params: NativeEvent_NavigateToNotebookPageArgs) {\r\n const podId = params.podId ?? emptyId;\r\n if (podId === emptyId || podId === zeroId) {\r\n await this.appNavigateToHome();\r\n return;\r\n }\r\n\r\n const docUrl = params.docUrl;\r\n const requiresRedeem = params.requiresRedeem;\r\n if (docUrl === emptyDocUrl || docUrl === zeroUrl) {\r\n // If docUrl is empty, navigate to the notebook home\r\n await this.appNavigateToNotebook({ podId });\r\n return;\r\n }\r\n\r\n const navParams: NavigationParams = {\r\n route: 'page',\r\n mfsPodId: podId,\r\n requiresRedeem: requiresRedeem,\r\n docUrl: docUrl,\r\n };\r\n\r\n await this.workspaceManager.NavigateTo(navParams);\r\n return;\r\n }\r\n\r\n public async appNavigateToSearchResult(params: NativeEvent_NavigateToSearchResultArgs) {\r\n let driveId = '';\r\n let itemId = '';\r\n try {\r\n const {\r\n siteUrl,\r\n } = params;\r\n\r\n // Parse out the drive ID and file ID from the site URL.\r\n // Example: https://microsoft.sharepoint-df.com/_api/v2.1/drives//items/\r\n // Example: https://microsoft.sharepoint-df.com/_api/v2.1/drives/b!Qq_0GS9WJEulw4kblBGXC6PyS8MinwNCjdBKgtluh4imfjKO2SAzS4XTPlnKhwKD/items/01CZURHQKRHOH7FNMXFFBZNOXPUNI5ZN2P\r\n const regex = /\\/drives\\/(?[^/]+)\\/items\\/(?[^/]+)/;\r\n const reResult = regex.exec(siteUrl);\r\n if (reResult !== null) {\r\n driveId = reResult.groups?.Drive ?? '';\r\n itemId = reResult.groups?.Item ?? '';\r\n }\r\n\r\n if (driveId === '' || itemId === '') {\r\n throw new Error('Search result missing required ODSP locator parameters');\r\n }\r\n\r\n const fileInfo: ExistingFileInfo = {\r\n siteUrl,\r\n driveId,\r\n fileId: itemId,\r\n };\r\n\r\n TelemetryLogger.Instance.logEvent('NavigateToSearchResult', { HasDrive: driveId !== '', HasItem: itemId !== '' });\r\n\r\n // The navigation API requires a URL in a different format. Translate it using ODSP utilities.\r\n const odspLocator: OdspFluidDataStoreLocator = {\r\n siteUrl: siteUrl,\r\n driveId: driveId,\r\n itemId: itemId,\r\n dataStorePath: '/',\r\n };\r\n\r\n const odspUrl = new URL(siteUrl);\r\n storeLocatorInOdspUrl(odspUrl, odspLocator);\r\n\r\n await this.navigateToPageOdspLink(odspUrl, odspLocator, fileInfo);\r\n void NotifyClient.navigateToSearchResultStatus({ ...params, navSuccess: true })\r\n .catch((error: NativeInteropError) => {\r\n // NOTE: we can remove this catch once all clients have been updated to support\r\n // the notifyNavigateToSearchResultStatus private API.\r\n // We expect this error if we are running against a client that doesn't support\r\n // notifyNavigateToSearchResultStatus API. This isn't a fatal error condition.\r\n // Previous SDX version only supported navigation failure notifications and did not\r\n // notify client in the success case. Here, we have failed to notify the client of the\r\n // success case. Log the error but do not fail the operation.\r\n console.error(error, params);\r\n TelemetryLogger.Instance.logError('NotifyClientError', error, {\r\n ErrorMethod: 'navigateToSearchResultStatus',\r\n ErrorDetails: 'Failed to notify client of status',\r\n HasDrive: driveId !== '',\r\n HasItem: itemId !== '',\r\n NavigationSuccess: true,\r\n });\r\n });\r\n }\r\n catch (error) {\r\n // We did not successfully navigate to the target. Log the error.\r\n console.error(error, params);\r\n TelemetryLogger.Instance.logError('NavigateToSearchResultError', error, {\r\n ErrorMethod: 'appNavigateToSearchResult',\r\n ErrorDetails: 'Failed to navigate to search result',\r\n HasDrive: driveId !== '',\r\n HasItem: itemId !== '',\r\n });\r\n\r\n // Notify the client of the failure.\r\n void NotifyClient.navigateToSearchResultStatus({ ...params, navSuccess: false })\r\n .catch((error: NativeInteropError) => {\r\n // NOTE: we can remove this catch once all clients have been updated to support\r\n // the notifyNavigateToSearchResultStatus private API.\r\n // We expect this error if we are running against a client that doesn't support\r\n // notifyNavigateToSearchResultStatus API. This isn't a fatal error condition.\r\n // Previous SDX version only supported navigation failure notifications and did not\r\n // notify client in the success case. Here, we have failed to notify the client of the\r\n // failure case. Log the error.\r\n console.error(error, params);\r\n TelemetryLogger.Instance.logError('NotifyClientError', error, {\r\n ErrorMethod: 'navigateToSearchResultStatus',\r\n ErrorDetails: 'Failed to notify client of status',\r\n HasDrive: driveId !== '',\r\n HasItem: itemId !== '',\r\n NavigationSuccess: false,\r\n });\r\n\r\n // Try notifying the client using the old failure notification API.\r\n void NotifyClient.failedToNavigateToSearchResult({ ...params, navSuccess: false })\r\n .catch((error: NativeInteropError) => {\r\n // We're out of options for notifying the client. Log the error.\r\n console.error(error, params);\r\n TelemetryLogger.Instance.logError('NotifyClientError', error, {\r\n ErrorMethod: 'failedToNavigateToSearchResult',\r\n ErrorDetails: 'Failed to notify client of status',\r\n HasDrive: driveId !== '',\r\n HasItem: itemId !== '',\r\n NavigationSuccess: false,\r\n });\r\n });\r\n });\r\n\r\n // Fail the operation\r\n return Promise.reject('Failed to navigate to search result');\r\n }\r\n }\r\n\r\n public async appNavigateToLink(params: NativeEvent_NavigateToLinkArgs) {\r\n const { linkUrl } = params;\r\n let isValidUrlFormat = false;\r\n let hasOdspLocator = false;\r\n let linkType = '';\r\n try {\r\n const odspUrl = new URL(linkUrl);\r\n isValidUrlFormat = true;\r\n hasOdspLocator = odspUrl.searchParams.get(locatorQueryParamName) !== null;\r\n\r\n const regex = /(?\\/:fl:\\/[a-z]{1,2}\\/)/;\r\n const reResult = regex.exec(linkUrl);\r\n if (reResult !== null) {\r\n linkType = reResult.groups?.FluidHint ?? '';\r\n }\r\n\r\n TelemetryLogger.Instance.logEvent('NavigateToLink', {\r\n IsValidUrlFormat: isValidUrlFormat, LinkType: linkType, HasOdspLocator: hasOdspLocator\r\n });\r\n\r\n // Need to parse the link and construct the ExistingFileInfo from the sharing link\r\n // in order to call GetWorkspaceForPage.\r\n console.log('Attempting to extract ODSP file locator from link url:', odspUrl);\r\n const odspLocator = getLocatorFromOdspUrl(odspUrl, false);\r\n if (!odspLocator) {\r\n throw new Error('Failed to extract ODSP file locator from link url');\r\n }\r\n\r\n console.log('Extracted ODSP file locator:', odspLocator);\r\n const fileInfo: ExistingFileInfo = {\r\n siteUrl: linkUrl,\r\n driveId: odspLocator.driveId,\r\n fileId: odspLocator.itemId,\r\n };\r\n\r\n await this.navigateToPageOdspLink(odspUrl, odspLocator, fileInfo);\r\n void NotifyClient.navigateToLinkStatus({ originalUrl: linkUrl, navSuccess: true })\r\n .catch((error: NativeInteropError) => {\r\n // NOTE: we can remove this catch once all clients have been updated to support\r\n // the navigateToLinkStatus private API.\r\n // We expect this error if we are running against a client that doesn't support\r\n // navigateToLinkStatus API. This isn't a fatal error condition.\r\n // Previous SDX version only supported navigation failure notifications and did not\r\n // notify client in the success case. Here, we have failed to notify the client of the\r\n // success case. Log the error but do not fail the operation.\r\n console.error(error, params);\r\n TelemetryLogger.Instance.logError('NotifyClientError', error, {\r\n ErrorMethod: 'navigateToLinkStatus',\r\n ErrorDetails: 'Failed to notify client of status',\r\n IsValidUrlFormat: isValidUrlFormat,\r\n LinkType: linkType,\r\n HasOdspLocator: hasOdspLocator,\r\n NavigationSuccess: true,\r\n });\r\n });\r\n }\r\n catch (error) {\r\n // We did not successfully navigate to the target. Log the error.\r\n console.error(error, params);\r\n TelemetryLogger.Instance.logError('NavigateToLinkError', error, {\r\n ErrorMethod: 'appNavigateToLink',\r\n ErrorDetails: 'Failed to navigate to link',\r\n IsValidUrlFormat: isValidUrlFormat,\r\n LinkType: linkType,\r\n HasOdspLocator: hasOdspLocator,\r\n });\r\n\r\n // Notify the client of the failure.\r\n void NotifyClient.navigateToLinkStatus({ originalUrl: linkUrl, navSuccess: false })\r\n .catch((error: NativeInteropError) => {\r\n // NOTE: we can remove this catch once all clients have been updated to support\r\n // the navigateToLinkStatus private API.\r\n // We expect this error if we are running against a client that doesn't support\r\n // navigateToLinkStatus API. This isn't a fatal error condition.\r\n // Previous SDX version only supported navigation failure notifications and did not\r\n // notify client in the success case. Here, we have failed to notify the client of the\r\n // failure case.\r\n console.error(error, params);\r\n TelemetryLogger.Instance.logError('NotifyClientError', error, {\r\n ErrorMethod: 'navigateToLinkStatus',\r\n ErrorDetails: 'Failed to notify client of status',\r\n IsValidUrlFormat: isValidUrlFormat,\r\n LinkType: linkType,\r\n HasOdspLocator: hasOdspLocator,\r\n NavigationSuccess: false,\r\n });\r\n\r\n // Try notifying the client using the old failure notification API.\r\n void NotifyClient.failedToNavigateToLink({ originalUrl: linkUrl, navSuccess: false })\r\n .catch((error: NativeInteropError) => {\r\n // We're out of options for notifying the client. Log the error.\r\n console.error(error, params);\r\n TelemetryLogger.Instance.logError('NotifyClientError', error, {\r\n ErrorMethod: 'failedToNavigateToLink',\r\n ErrorDetails: 'Failed to notify client of status',\r\n IsValidUrlFormat: isValidUrlFormat,\r\n LinkType: linkType,\r\n HasOdspLocator: hasOdspLocator,\r\n NavigationSuccess: false,\r\n });\r\n });\r\n });\r\n\r\n // Fail the operation\r\n return Promise.reject('Failed to navigate to link');\r\n }\r\n }\r\n\r\n public async appNavigateToResourceLinkInClient(params: NativeEvent_NavigateToLinkArgs) {\r\n const { linkUrl } = params;\r\n if (linkUrl) {\r\n // Try navigating to resource link in client\r\n void NotifyClient.navigateToResourceLinkInClientEvent({ originalUrl: linkUrl })\r\n .catch((error: NativeInteropError) => {\r\n // Navigating to resource link in client failed\r\n console.error(error, params);\r\n TelemetryLogger.Instance.logError('NotifyClientError', error, {\r\n ErrorMethod: 'navigateToResourceLinkInClientEvent',\r\n ErrorDetails: 'Failed to navigate to resource in client',\r\n NavigationSuccess: false,\r\n });\r\n\r\n return Promise.reject('Failed to navigate to link in client');\r\n });\r\n }\r\n else\r\n {\r\n const error = new Error('linkUrl not provided');\r\n TelemetryLogger.Instance.logError('NotifyClientError', error, {\r\n ErrorMethod: 'navigateToResourceLinkInClientEvent',\r\n NavigationSuccess: false,\r\n });\r\n return Promise.reject('linkUrl not provided');\r\n }\r\n }\r\n public getDependencySynthesizerService(): DependencySynthesizerService {\r\n return this.dependencySynthesizerService;\r\n }\r\n\r\n private async navigateToPageOdspLink(odspUrl: URL, odspLocator: OdspFluidDataStoreLocator, fileInfo: ExistingFileInfo) {\r\n console.log('Calling GetWorkspaceForPage with:', fileInfo);\r\n const workspace = await this.workspaceManager.GetWorkspaceForPage(fileInfo);\r\n console.log('GetWorkspaceForPage returned:', workspace);\r\n if (!workspace)\r\n {\r\n throw new Error('GetWorkspaceForPage returned undefined');\r\n }\r\n\r\n storeLocatorInOdspUrl(odspUrl, odspLocator);\r\n await this.appNavigateToPage({\r\n docUrl: odspUrl.href,\r\n podId: workspace.mfsPodId,\r\n });\r\n }\r\n\r\n public async renameNotebook(params: NativeEvent_RenameNotebookArgs) {\r\n const podId = params.podId;\r\n const spoId = params.spoId;\r\n\r\n await this.workspaceManager.RenameNotebook(podId, spoId);\r\n }\r\n\r\n public async toggleFavoriteNotebook(params: NativeEvent_ToggleFavoriteNotebookArgs) {\r\n const podId = params.podId;\r\n const spoId = params.spoId;\r\n\r\n await this.workspaceManager.ToggleFavoriteNotebook(podId, spoId);\r\n }\r\n}\r\n","\r\nimport type { Audience, Environment } from '@fluidx/loop-types';\r\nimport { AudienceGroup as OfficeAudienceGroup } from '@microsoft/oteljs';\r\nimport { TelemetryLogger } from '../telemetry/TelemetryLogger';\r\nimport {\r\n type SovereignCloudType, getCloudType, isSovereignCloud,\r\n} from './Cloud';\r\nimport { featureGates } from './FeatureGates';\r\nimport { HostAppSettingName, HostAppSettings } from './HostAppSettings';\r\n\r\nlet cachedAudience: Audience | undefined;\r\n/**\r\n * Returns the detected Loop audience, using a cached value for efficiency.\r\n */\r\nexport function getAudience(): Audience {\r\n if (!cachedAudience) {\r\n cachedAudience = getAudienceInternal();\r\n console.log('Using Loop Audience:', cachedAudience);\r\n }\r\n return cachedAudience;\r\n}\r\n\r\n/**\r\n * Maps OfficeAudienceGroup to Loop Audience.\r\n */\r\nconst AUDIENCE_GROUP_TO_AUDIENCE: Record = {\r\n Automation: 'Development',\r\n Insiders: 'Preview',\r\n Dogfood: 'Dogfood',\r\n Microsoft: 'Microsoft',\r\n Production: 'Production',\r\n};\r\n\r\n/**\r\n * Maps cloud types for sovereign clouds to sovereign Loop audiences.\r\n */\r\nconst SOVEREIGN_CLOUD_TYPE_TO_AUDIENCE: Record = {\r\n GCCM: 'GCC',\r\n GCCH: 'GCC-High',\r\n DoD: 'DoD',\r\n UsSec: 'USSec',\r\n UsNat: 'USNat',\r\n Gallatin: 'Gallatin',\r\n Delos: 'Delos',\r\n Bleu: 'Bleu',\r\n};\r\n\r\nfunction getAudienceInternal(): Audience {\r\n if (featureGates.getBooleanFeatureGate('allowLoopAudienceOverride', false)) {\r\n const loopAudienceOverrideValue = HostAppSettings.getSetting(HostAppSettingName.LoopAudienceOverride, '');\r\n if (loopAudienceOverrideValue) {\r\n const settingAudience = getAudienceFromSetting(loopAudienceOverrideValue);\r\n console.log(`Mapped Loop audience: ${settingAudience} from setting override value: ${loopAudienceOverrideValue}`);\r\n return settingAudience;\r\n }\r\n }\r\n\r\n if (isSovereignCloud()) {\r\n const sovereignAudience = SOVEREIGN_CLOUD_TYPE_TO_AUDIENCE[getCloudType() as SovereignCloudType] || 'Production';\r\n console.log(`Mapped Loop audience: ${sovereignAudience} from sovereign cloud type: ${getCloudType()}`);\r\n return sovereignAudience;\r\n }\r\n\r\n const defaultAudienceGroup = 'Production';\r\n const audienceGroupValue = HostAppSettings.getSetting(HostAppSettingName.HostAudienceGroup, defaultAudienceGroup);\r\n const audienceGroup = getAudienceGroupFromSetting(audienceGroupValue);\r\n\r\n const mapped = AUDIENCE_GROUP_TO_AUDIENCE[audienceGroup];\r\n if (!mapped) {\r\n const error = new Error('Unhandled Office audience group to Loop audience mapping');\r\n TelemetryLogger.Instance.logError('UnhandledConfigError', error, {\r\n ErrorMethod: 'getAudienceInternal',\r\n ConfigDataValue: audienceGroup,\r\n ConfigDataExpectedType: 'OfficeAudienceGroup'\r\n });\r\n console.error(`Unhandled Office audience group value ${audienceGroup} for mapping to Loop audience - defaulting to Production:`);\r\n return 'Production';\r\n }\r\n console.log(`Mapped Loop audience: ${mapped} from Office audience group: ${audienceGroup}`);\r\n return mapped;\r\n}\r\n\r\nlet cachedEnvironment: Environment | undefined;\r\n/**\r\n * Returns the detected Loop environment, using a cached value for efficiency.\r\n */\r\nexport function getEnvironment(): Environment {\r\n if (!cachedEnvironment) {\r\n cachedEnvironment = getEnvironmentInternal();\r\n console.log('Using Loop Environment:', cachedEnvironment);\r\n }\r\n return cachedEnvironment;\r\n}\r\n\r\nfunction getEnvironmentInternal(): Environment {\r\n const audience = getAudience();\r\n if (audience === 'Local') {\r\n return { audience: 'Local', ring: 'Staging' };\r\n }\r\n // For all other audiences, provide a default ring if required by Environment type\r\n // If Environment type requires 'ring', you may need to map audience to ring here\r\n // For now, fallback to 'Production' ring if not Local\r\n return { audience } as Environment;\r\n}\r\n\r\n/**\r\n * Maps setting string values to Loop Audience.\r\n */\r\nconst AUDIENCE_SETTING_MAP: Record = {\r\n automation: 'Automation',\r\n bleu: 'Bleu',\r\n delos: 'Delos',\r\n development: 'Development',\r\n dod: 'DoD',\r\n dogfood: 'Dogfood',\r\n gallatin: 'Gallatin',\r\n gcc: 'GCC',\r\n 'gcc-high': 'GCC-High',\r\n local: 'Local',\r\n microsoft: 'Microsoft',\r\n preview: 'Preview',\r\n production: 'Production',\r\n staging: 'Staging',\r\n usnat: 'USNat',\r\n ussec: 'USSec',\r\n};\r\n\r\nfunction getAudienceFromSetting(value: string): Audience {\r\n const audienceValue = value.toLowerCase();\r\n const mapped = AUDIENCE_SETTING_MAP[audienceValue];\r\n if (!mapped) {\r\n const error = new Error('Unhandled Loop audience value');\r\n TelemetryLogger.Instance.logError('UnhandledConfigError', error, {\r\n ErrorMethod: 'getAudienceFromSetting',\r\n ConfigDataValue: audienceValue,\r\n ConfigDataExpectedType: 'LoopAudience'\r\n });\r\n console.error(`Unhandled Loop audience value ${audienceValue} - defaulting to Production:`);\r\n return 'Production';\r\n }\r\n return mapped;\r\n}\r\n\r\n/**\r\n * Maps setting string values to OfficeAudienceGroup..\r\n */\r\nconst AUDIENCE_GROUP_SETTING_MAP: Record = {\r\n automation: OfficeAudienceGroup.Automation,\r\n dogfood: OfficeAudienceGroup.Dogfood,\r\n insiders: OfficeAudienceGroup.Insiders,\r\n microsoft: OfficeAudienceGroup.Microsoft,\r\n production: OfficeAudienceGroup.Production,\r\n};\r\n\r\nfunction getAudienceGroupFromSetting(value: string): OfficeAudienceGroup {\r\n const groupValue = value.toLowerCase();\r\n const mapped = AUDIENCE_GROUP_SETTING_MAP[groupValue];\r\n if (!mapped) {\r\n const error = new Error('Unhandled Office audience group value');\r\n TelemetryLogger.Instance.logError('UnhandledConfigError', error, {\r\n ErrorMethod: 'getAudienceGroupFromSetting',\r\n ConfigDataValue: groupValue,\r\n ConfigDataExpectedType: 'OfficeAudienceGroup'\r\n });\r\n console.error(`Unhandled Office audience group value ${groupValue} - defaulting to Production:`);\r\n return OfficeAudienceGroup.Production;\r\n }\r\n return mapped;\r\n}\r\n\r\nexport const resetEnvironmentCache = () => {\r\n cachedAudience = undefined;\r\n cachedEnvironment = undefined;\r\n};\r\n","import { LoopRegistrationId } from '../codeLoader/constants';\nimport { createAllNotebooksUrl, createAllPagesUrl, createNotebookLandingUrl, createPageUrl } from './createRouteUrls';\nimport { createCreateNotebookLoopRouterInput } from './createCreateNotebookLoopRouterInput';\nimport { createCreatePageLoopRouterInput } from './createCreatePageLoopRouterInput';\nimport { createCreatePageTemplateLoopRouterInput } from './createCreatePageTemplateLoopRouterInput';\n/**\n * Creates a LoopComponentRouterInput object for the Loop Workspace Component based on the provided navigation parameters.\n * The returned object can be used to pass to the @see getLoopComponent() or @see getLoopComponentInSourcelessIframeV2().\n * @param navigationParams The navigation parameters to use for creating the navigation URL for Loop Workspace Component.\n * @returns The LoopComponentRouterInput object containing the URL for the requested route.\n */ export function createWorkspaceComponentRouterInput(navigationParams) {\n let url;\n switch(navigationParams.route){\n case 'notebook':\n url = createNotebookLandingUrl(navigationParams);\n break;\n case 'notebooks':\n url = createAllNotebooksUrl(navigationParams);\n break;\n case 'page':\n url = createPageUrl(navigationParams);\n break;\n case 'pages':\n url = createAllPagesUrl(navigationParams);\n break;\n case 'createPage':\n return createCreatePageLoopRouterInput(navigationParams);\n case 'createPageFromTemplate':\n return createCreatePageTemplateLoopRouterInput(navigationParams);\n case 'createNotebook':\n return createCreateNotebookLoopRouterInput(navigationParams);\n }\n return {\n type: 'Data',\n registrationId: LoopRegistrationId,\n dataType: 'URL',\n data: {\n url\n }\n };\n}\n\n//# sourceMappingURL=createWorkspaceComponentRouterInput.js.map","import { LoopRegistrationId } from '../codeLoader/constants';\nexport function createCreatePageLoopRouterInput(navigationParams) {\n const { body, pageTitle } = navigationParams;\n return {\n type: 'Data',\n registrationId: LoopRegistrationId,\n dataType: 'Json',\n data: {\n route: 'createPage',\n body,\n pageTitle\n }\n };\n}\n\n//# sourceMappingURL=createCreatePageLoopRouterInput.js.map","import { LoopRegistrationId } from '../codeLoader/constants';\nexport function createCreatePageTemplateLoopRouterInput(navigationParams) {\n const { templateId, contentDisplayFlag } = navigationParams;\n return {\n type: 'Data',\n registrationId: LoopRegistrationId,\n dataType: 'Json',\n data: {\n route: 'createPageFromTemplate',\n templateId,\n contentDisplayFlag\n }\n };\n}\n\n//# sourceMappingURL=createCreatePageTemplateLoopRouterInput.js.map","import { LoopRegistrationId } from '../codeLoader/constants';\nexport function createCreateNotebookLoopRouterInput(navigationParams) {\n const { linkedChats, linkedPages } = navigationParams;\n return {\n type: 'Data',\n registrationId: LoopRegistrationId,\n dataType: 'Json',\n data: {\n route: 'createNotebook',\n linkedChats,\n linkedPages\n }\n };\n}\n\n//# sourceMappingURL=createCreateNotebookLoopRouterInput.js.map","export const HostActivity = {\n /**\n * This activity represents the step where host apps might need to fetch some user's drive\n * related information during creation or load of a component.\n */ GetDriveInfo: 'GetDriveInfo',\n /**\n * In case of create flow, host apps await component url initialization. Previously this was used to track activity of attaching to connect new in-memory container to the storage.\n */ AttachContainer: 'AttachContainer',\n /**\n * In case of create flow, host apps await getAbsoluteUrl to get a rename-resistant file link.\n */ GetFileLink: 'GetFileLink',\n /**\n * Activity to measure creation of a sharing link for sharing the component with other user's.\n */ CreateShareLink: 'CreateShareLink',\n /**\n * Activity to measure the time taken to render the component.\n * This includes the time spent on retrieving the view of the loaded component and calling its corresponding render\n */ RenderComponent: 'RenderComponent',\n /**\n * Any \"post-render\" work that the hosts needs to do, before dismissing any Loading spinner/UX.\n * For best reporting accuracy, the post-render activity should be started\n * right after `await view.render(...)`, and completed as close as possible to when pixels\n * are actually painted on the screen. As of Feb 2024, the best recommended method\n * from the Edge team is to do so inside of a `requestAnimationFrame` at the end of the scenario.\n */ PostRender: 'PostRender'\n};\n/**\n * HostActivityNameOverrides is used for activities for which we prefer to have table names which are different from the activity name.\n */ export const HostActivityNameOverrides = {\n RenderComponent: 'RenderComponentByHost'\n};\n\n//# sourceMappingURL=HostActivity.js.map","import { ActivityTracker, NamespaceLoggerAdapter, sendTelemetryEvent } from '@fluidx/telemetry';\nimport { getDocumentHiddenResult, startDocumentHiddenTracker, unregisterDocumentHiddenTracker } from '@fluidx/utilities';\nimport { HostActivityNameOverrides } from './HostActivity';\nconst endToEndActivitySuffix = 'EndToEnd';\n/**\n * A cumulative tracker that helps FFX team to measure perf and possibly reliability of various events happening in the host app during create/load of fluid components.\n */ export class HostActivityTracker {\n constructor(activityType, logger, additionalSetup, additionalCleanup, /* eslint-disable-next-line @typescript-eslint/no-explicit-any\n-- TODO: Using 'any' type defeats the purpose of TypeScript. Consider replacing it with a concrete type, or 'unknown'. */ getExtraPropsToLog){\n this.activityType = activityType;\n this.additionalCleanup = additionalCleanup;\n this.getExtraPropsToLog = getExtraPropsToLog;\n additionalSetup?.();\n this.logger = new NamespaceLoggerAdapter('HostTracker', logger);\n this.activityTracker = ActivityTracker.start(activityType, this.logger, {\n addUserTiming: true,\n isAPerformanceMetric: true\n });\n // The below logs are added to help with telemetry loss investigation.\n // The goal is figure out if host activity trackers are being initiated.\n sendTelemetryEvent(this.logger, {\n eventName: activityType,\n subCategory: 'HostActivityTrackerCreated'\n });\n }\n /** Shared implementation */ /* eslint-disable-next-line no-restricted-syntax\n-- TODO: Suppression added when adding rule to forbid static methods. Consider using a free function instead, as static methods add considerable bundle bloat. */ static startScenario(logger, scenarioType, scenarioCallback, getAdditionalTrackerProps) {\n if (scenarioCallback) {\n const scenarioTracker = HostActivityTracker.startScenario(logger, scenarioType);\n return (async ()=>{\n try {\n const results = await scenarioCallback(scenarioTracker);\n scenarioTracker.setSuccess(getAdditionalTrackerProps?.());\n return results;\n } catch (error) {\n scenarioTracker.setFailure(error, getAdditionalTrackerProps?.());\n throw error;\n }\n })();\n }\n let documentHiddenTrackerId;\n return new HostActivityTracker(/** Complete name of the activity scenario */ scenarioType + endToEndActivitySuffix, logger, /** additionalSetup*/ ()=>{\n documentHiddenTrackerId = startDocumentHiddenTracker();\n // When starting the scenario, also do a best-effort to show the \"pre-scenario overhead\"\n // in the DevTools timeline. This \"PreScenarioOverhead\" is the time between\n // what the host reports as the hostScenarioStartTime, and the E2E tracker. This is especially helpful\n // for visually inspecting that the host is reporting the start time correctly.\n // For safety's sake, go ahead and wrap it in a try/catch just in case\n try {\n const hostScenarioStartTimeValue = logger.PersistedProperties?.getPersistedProperties?.()['hostScenarioStartTime'];\n if (hostScenarioStartTimeValue && typeof hostScenarioStartTimeValue === 'number') {\n // Adjust the start time so that it correctly fits on the perf timeline. We want to take\n // the local window's \"performance.now\" (a number relative to the start of the window's JS context,\n // and what the performance timeline operates in), and subtract out the time difference between\n // Date.now and the hostScenarioStartTime (both of which are in units of time since the Jan 1 1970 epoch).\n const adjustedStartTime = performance.now() - (Date.now() - hostScenarioStartTimeValue);\n if (adjustedStartTime >= 0) {\n performance.measure('PreScenarioOverhead', {\n start: adjustedStartTime\n });\n }\n }\n } catch {\n // It's a best-effort attempt to show it on the timeline; in case of an error --\n // though can't really see how an error would be possible -- just move on.\n }\n }, /** additionalCleanup*/ ()=>{\n if (documentHiddenTrackerId) {\n unregisterDocumentHiddenTracker(documentHiddenTrackerId);\n documentHiddenTrackerId = undefined;\n }\n }, /** getExtraPropsToLog*/ ()=>({\n documentHidden: documentHiddenTrackerId ? // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n getDocumentHiddenResult(documentHiddenTrackerId, true) > -1 : ''\n }));\n }\n /** Shared implementation */ /* eslint-disable-next-line no-restricted-syntax\n-- TODO: Suppression added when adding rule to forbid static methods. Consider using a free function instead, as static methods add considerable bundle bloat. */ static startActivity(logger, activityType, activityCallback, getAdditionalProps) {\n if (activityCallback) {\n const activityTracker = HostActivityTracker.startActivity(logger, activityType);\n return (async ()=>{\n try {\n const results = await activityCallback();\n activityTracker.setSuccess(getAdditionalProps?.());\n return results;\n } catch (error) {\n activityTracker.setFailure(error, getAdditionalProps?.());\n throw error;\n }\n })();\n }\n return new HostActivityTracker(HostActivityNameOverrides[activityType] || activityType, logger);\n }\n /**\n * If you have a HostActivityTracker and want to use the same logger for a different activity, use this method to get the same logger back\n * @returns `ITelemetryNamespaceLogger`\n */ getLogger() {\n return this.logger;\n }\n /**\n * Returns whether or not the scenario can end after render.\n * If the scenario requires more work after render, returns false.\n * @returns `boolean`\n */ scenarioEndsAfterRender() {\n return this.activityType === 'LoadEndToEnd' || this.activityType === 'PasteEndToEnd';\n }\n /**\n * Call this method to end the activity and send the success status\n * @param props additional props that hosts would like to pass in to our telemetry.\n */ setSuccess(props) {\n if (this.activityTracker) {\n this.activityTracker.setResult(true, /* additionalProps */ {\n ...props,\n ...this.getExtraPropsToLog?.()\n });\n this.dispose();\n }\n }\n /**\n * Call this method to end the activity and send the failure status\n * @param error Error object thrown\n * @param props Additional properties that will be logged.\n */ setFailure(error, props) {\n if (this.activityTracker) {\n this.activityTracker.setResult(false, /* additionalProps */ {\n ...props,\n ...this.getExtraPropsToLog?.(),\n errorType: error ? error.errorType : undefined\n }, error);\n this.dispose();\n }\n }\n /**\n * If activity did not get a chance to complete (succeed or fail),\n * call cancel so that we can still capture the cancellation of the event\n */ cancel() {\n this.dispose();\n }\n /**\n * Disposes the activity and frees up the resources in the current object\n */ // eslint-disable-next-line @fluidx/ffx-rules/prefer-private-fields -- TODO: Exception added when rule was enabled. Please consider refactoring this to use ECMAScript # prefixed private properties for better minification\n dispose() {\n this.additionalCleanup?.();\n // The below logs are added to help with telemetry loss investigation.\n // The goal is figure out if dispose for host activity trackers is being called.\n if (this.logger) {\n sendTelemetryEvent(this.logger, {\n eventName: this.activityType,\n subCategory: 'HostActivityTrackerDisposed'\n });\n }\n // If the activity hasn't already resolved/cancelled, this will cancel it (otherwise, it's a no-op).\n this.activityTracker?.dispose();\n this.activityTracker = undefined;\n this.logger = undefined;\n }\n}\n\n//# sourceMappingURL=HostActivityTracker.js.map","// Do not modify this file; it is autogenerated as part of build.\n// Original content from the checked-in version has been overwritten after build\n// The version stamped version is near consistent with the version value in package.json\n// Versions prefixed with an asterisk (*version) were stamped without a bump, and could be stale\nexport const npmVersionNumber = '16.29.1'\n","export const ActivityLoadComponentInIframe = 'LoadComponentInIframe';\nexport const ActivityLoadComponentInDiv = 'LoadComponentInDiv';\nexport const ActivityGetDriver = 'GetDriver';\nexport const ActivityLoadContainer = 'LoadContainer';\nexport const ActivityLoadComponentFromContainer = 'LoadComponentFromContainer';\nexport const ActivityRequestComponent = 'RequestComponent';\nexport const ActivityRenderComponent = 'RenderComponent';\n// activity tracked by the hosts for renderComponent flow\nexport const ActivityRenderComponentByHost = 'RenderComponentByHost';\nexport const ActivityIFrameBoot = 'IFrameBoot';\nexport const ActivityIFrameWaitOnResumeLoad = 'IFrameWaitOnResumeLoad';\nexport const ActivityIFrameInitialize = 'IFrameInitialize';\nexport const ActivityContainerAttach = 'ContainerAttach';\nexport const ActivityGetTemplateContent = 'GetTemplateContent';\nexport const ActivityRehydrateFromTemplateContent = 'RehydrateFromTemplateContent';\nexport const ActivityLoadCodeFromHint = 'LoadCodeFromHint';\nexport const ActivityFetchComponentManifest = 'FetchComponentManifest';\nexport const ActivityGetLoopComponentCore = 'GetLoopComponentCore';\n// cache container API activities\nexport const ActivityCacheComponent = 'CacheComponent';\nexport const ActivityGetCachedComponent = 'GetCachedComponent';\nexport const ActivityRemoveCachedComponent = 'RemoveCachedComponent';\nexport const OWHErrorEventUnhandledError = 'UnhandledError';\nexport const OWHErrorEventUnhandledRejection = 'UnhandledRejection';\nexport const OWHErrorEventPreloadError = 'PreloadError';\nexport const OWHErrorEventFailedToClearHostIndexPageCache = 'FailedToClearHostIndexPageCache';\nexport const OWHErrorEventContainerPostBootError = 'ContainerPostBootError';\nexport const OWHErrorEventContainerPackagePreCacheError = 'ContainerPackagePreCacheError';\nexport const OWHErrorEventGetTemplateContentError = 'GetTemplateContentError';\nexport const OWHErrorEventUndefinedTemplateContentError = 'UndefinedTemplateContentError';\nexport const OWHErrorEventComponentNotSerializableError = 'ComponentNotSerializableError';\nexport const OWHErrorEventComponentSerializationError = 'ComponentSerializationError';\nexport const OWHErrorEventComponentManifestFetchError = 'ComponentManifestFetchError';\nexport const OWHErrorEventLoadComponentCancelledByHost = 'LoadComponentCancelledByHost';\nexport const OWHErrorEventStampLoopDiagnosticOnIframeNonCriticalError = 'StampLoopDiagnosticOnIframeNonCriticalError';\nexport const OWHGenericEventNonBreakingUnhandledError = 'NonBreakingUnhandledError';\nexport const OWHGenericEventMaxUnhandledErrorCountReached = 'MaxUnhandledErrorCountReached';\nexport const OWHGenericEventMaxUnhandledNonBreakingErrorCountReached = 'MaxUnhandledNonBreakingErrorCountReached';\nexport const OWHGenericEventMaxUnhandledRejectionCountReached = 'MaxUnhandledRejectionCountReached';\n// Non-host / additional performance events\nexport const OWHGenericEventIframeDocumentLoad = 'iframeDocumentLoad';\nexport const OWHGenericEventIframeLoadAndInitialize = 'iframeLoadAndInitialize';\nexport const OWHGenericEventIframeContainerjs = 'IframeContainer.js';\nexport const OWHGenericEventIframeDisposed = 'IframeDisposed';\nexport const OWHGenericEventSourcelessIframeOverrideUsed = 'SourcelessIframeOverrideUsed';\nexport const OWHGenericEventCodeHintExists = 'CodeHintExists';\n// We're running an experiment to determine if we can directly replace 'unload' listeners\n// with 'pagehide' listeners. This is the table we'll use to track the experiment.\nexport const OWHGenericEventSubCategoryIframeUnloadEventFired = 'IframeUnloadEventFired';\nexport const OWHEventSubCategoriesGlobalError = 'GlobalError';\nexport const OWHEventSubCategoriesIframeDisposed = 'IframeDisposed';\nexport const OWHEventSubCategoriesIframePerformanceData = 'IframePerformanceData';\nexport const OWHEventSubCategoriesLocalStorageOverride = 'LocalStorageOverride';\nexport const OWHEventSubCategoriesResourceTiming = 'ResourceTiming';\n/**\n * Namespace to use when creating OfficeWebHost loggers\n */ export const OfficeWebHostNamespace = 'OfficeWebHost';\n/**\n * Namespace to use when creating a logger to pass to the Loop Experience (Fluid/Loop loader).\n */ export const LoopExperiencesNamespace = 'LoopExperiences';\n/**\n * Subcategory used for the MemoryLeakTracker to identify that it is coming from OfficeWebHost interactions\n */ export const MemLeakTrackerOWHSubcategory = 'OfficeWebHost';\n\n//# sourceMappingURL=Telemetry.js.map","import { NamespaceLoggerAdapter } from '@fluidx/telemetry';\nimport { startDocumentHiddenTracker } from '@fluidx/utilities';\nimport { npmVersionNumber } from '../npm.package.version';\nimport { OfficeWebHostNamespace } from '../Telemetry';\nexport function initializeTelemetryInDiv(config) {\n const fluidBootstrapperStartTime = Date.now();\n // Used to track if the document was hidden at any point from here until component render\n const documentHiddenTrackerId = startDocumentHiddenTracker();\n // Remove host provided logger from HostConfig passed downstream\n const { logger: hostLogger, ...newConfig } = config;\n const logger = hostLogger && new NamespaceLoggerAdapter(OfficeWebHostNamespace, hostLogger, {\n owhVersion: npmVersionNumber\n });\n const perfMetadata = {\n fluidBootstrapperStartTime\n };\n return {\n logger,\n newConfig,\n perfMetadata,\n documentHiddenTrackerId\n };\n}\n\n//# sourceMappingURL=initializeTelemetryInDiv.js.map","/**\n * Special registration ID which represents all Fluid urls.\n */ export const fluidRegistrationId = 'fluid';\n/**\n * Check if a registration id is a valid fluid registration.\n * @param registrationId The registration id to be checked\n */ export function isFluidRegistrationId(registrationId) {\n return registrationId === fluidRegistrationId || registrationId === 'fluid-odsp' || registrationId === 'fluid-odsp-extended' || registrationId === 'fluid-odsp-expansive';\n}\n\n//# sourceMappingURL=isFluidRegistrationId.js.map","/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\nimport { DriverErrorTypes, } from \"@fluidframework/driver-definitions/internal\";\nimport { createChildLogger } from \"@fluidframework/telemetry-utils/internal\";\n/**\n * Checks if the error is location redirection error.\n * @param error - error whose type is to be determined.\n * @returns `true` is the error is location redirection error, otherwise `false`.\n * @internal\n */\nexport function isLocationRedirectionError(error) {\n return (typeof error === \"object\" &&\n error !== null &&\n error.errorType ===\n DriverErrorTypes.locationRedirection);\n}\n/**\n * Handles location redirection while fulfilling the loader request.\n * @param api - Callback in which user can wrap the loader.resolve or loader.request call.\n * @param request - request to be resolved.\n * @param urlResolver - resolver used to resolve the url.\n * @param logger - logger to send events.\n * @returns Response from the API call.\n * @legacy\n * @alpha\n */\nexport async function resolveWithLocationRedirectionHandling(api, request, urlResolver, logger) {\n let req = request;\n const childLogger = createChildLogger({ logger, namespace: \"LocationRedirection\" });\n for (;;) {\n try {\n return await api(req);\n }\n catch (error) {\n if (!isLocationRedirectionError(error)) {\n throw error;\n }\n childLogger.sendTelemetryEvent({ eventName: \"LocationRedirectionError\" });\n const resolvedUrl = error.redirectUrl;\n // Generate the new request with new location details from the resolved url. For datastore/relative path,\n // we don't need to pass \"/\" as host could have asked for a specific data store. So driver need to\n // extract it from the resolved url.\n const absoluteUrl = await urlResolver.getAbsoluteUrl(resolvedUrl, \"\", undefined);\n req = { url: absoluteUrl, headers: req.headers };\n }\n }\n}\n//# sourceMappingURL=resolveWithLocationRedirection.js.map","/* eslint-disable-next-line jsdoc/require-jsdoc, no-restricted-syntax, erasable-syntax-only/enums --\n TODO: Suppression added when adding rule to recommend avoiding enums. Enums generate a lot of bundle size bloat, please consider moving to an alternate pattern.\n -- TODO: Missing documentation!\n TODO: Exception added when we started enforcing erasable syntax only, please do not add new violations of this rule */ export var OWHErrorType = /*#__PURE__*/ function(OWHErrorType) {\n /**\n * The IFrame failed to initialize\n */ OWHErrorType[\"IframeLoadFailed\"] = \"IframeLoadFailed\";\n /**\n * Loaded container version is no longer valid and needs upgrade\n *\n * TODO: Consider promoting ContainerUpgradeRequired to FF and expose it via ErrorType\n */ OWHErrorType[\"ContainerUpgradeRequired\"] = \"ContainerUpgradeRequired\";\n /**\n * The requested component is not found.\n */ OWHErrorType[\"ComponentNotFound\"] = \"ComponentNotFound\";\n return OWHErrorType;\n}({});\n/* eslint-disable-next-line jsdoc/require-jsdoc, no-restricted-syntax, erasable-syntax-only/enums --\n TODO: Suppression added when adding rule to recommend avoiding enums. Enums generate a lot of bundle size bloat, please consider moving to an alternate pattern.\n -- TODO: Missing documentation!\n TODO: Exception added when we started enforcing erasable syntax only, please do not add new violations of this rule */ export var ContainerLoadErrorType = /*#__PURE__*/ function(ContainerLoadErrorType) {\n /** Root component couldn't have been created or initialized */ ContainerLoadErrorType[\"RootComponentCreateFailed\"] = \"RootComponentCreateFailed\";\n /** Raas files are not supported and cannot be loaded */ ContainerLoadErrorType[\"RaasNotSupported\"] = \"RaasNotSupported\";\n return ContainerLoadErrorType;\n}({});\n// TODO: Missing documentation!\n// eslint-disable-next-line jsdoc/require-jsdoc\nexport class ErrorBase extends Error {\n /* eslint-disable-next-line jsdoc/require-jsdoc\n-- TODO: Missing documentation! */ constructor(message, name, // eslint-disable-next-line @typescript-eslint/no-explicit-any -- TODO: Using 'any' type defeats the purpose of TypeScript. Consider replacing it with a concrete type, or 'unknown'.\n internalError, errorStack){\n super(message), this.internalError = internalError;\n this.name = name;\n // Preserve the stack that was passed.\n if (errorStack) {\n try {\n // Not clear if all browsers allow overwriting stack\n this.stack = errorStack;\n } catch {}\n }\n }\n}\n/**\n * Error class used to communicate that the IFrame service failed to initialize.\n * (Ex: message protocols inside and outside were incompatible)\n */ export class IframeLoadFailedError extends ErrorBase {\n constructor(message, /* eslint-disable-next-line @typescript-eslint/no-explicit-any\n -- TODO: Using 'any' type defeats the purpose of TypeScript. Consider replacing it with a concrete type, or 'unknown'. */ internalError, errorCode){\n super(message, \"IframeLoadFailed\", internalError), this.errorCode = errorCode;\n }\n}\n/**\n * Error Code to distinguish reasons for load failure\n */ /* eslint-disable-next-line jsdoc/require-jsdoc, no-restricted-syntax, erasable-syntax-only/enums --\n TODO: Suppression added when adding rule to recommend avoiding enums. Enums generate a lot of bundle size bloat, please consider moving to an alternate pattern.\n -- TODO: Missing documentation!\n TODO: Exception added when we started enforcing erasable syntax only, please do not add new violations of this rule */ export var IframeLoadErrorCode = /*#__PURE__*/ function(IframeLoadErrorCode) {\n // TODO: Missing documentation!\n // eslint-disable-next-line jsdoc/require-jsdoc\n IframeLoadErrorCode[\"UndefinedInitializeIframeMethod\"] = \"UndefinedInitializeIframeMethod\";\n return IframeLoadErrorCode;\n}({});\n/**\n * Error class used to communicate that loaded container version is no longer and needs upgrade\n *\n * TODO: Consider promoting ContainerUpgradeRequired to FF and expose it via ErrorType\n */ export class ContainerUpgradeRequiredError extends ErrorBase {\n /* eslint-disable-next-line @typescript-eslint/no-explicit-any\n-- TODO: Using 'any' type defeats the purpose of TypeScript. Consider replacing it with a concrete type, or 'unknown'. */ constructor(message, internalError){\n super(message, \"ContainerUpgradeRequired\", internalError);\n }\n}\n/**\n * Error class used to communicate that the requested component cannot be found\n * or it has been marked as unreferenced by the Garbage Collection.\n */ export class ComponentNotFoundError extends ErrorBase {\n constructor(message, /* eslint-disable-next-line @typescript-eslint/no-explicit-any\n -- TODO: Using 'any' type defeats the purpose of TypeScript. Consider replacing it with a concrete type, or 'unknown'. */ internalError, code, errorStack){\n super(message, \"ComponentNotFound\", internalError, errorStack), this.code = code;\n }\n}\n/**\n * Error class used to communicate that the root component cannot be created.\n */ export class RootComponentCreateFailedError extends ErrorBase {\n constructor(message, /* eslint-disable-next-line @typescript-eslint/no-explicit-any\n -- TODO: Using 'any' type defeats the purpose of TypeScript. Consider replacing it with a concrete type, or 'unknown'. */ internalError, code, errorStack){\n super(message, \"RootComponentCreateFailed\", internalError, errorStack), this.code = code;\n }\n}\n\n//# sourceMappingURL=ErrorContracts.js.map","// Purpose of this file is to maintain a list of expected errors and mark them as expected in telemetry event to enable filtering in metrics.\nexport function isExpectedError(error) {\n const isObject = (e)=>typeof e === 'object' && e !== null;\n if (!isObject(error)) {\n return false;\n }\n const errorType = error['errorType'];\n const statusCode = error['statusCode'];\n // The following condition would be true when the user is trying to access a document that does not exist - has been deleted or moved.\n // Hence marking this as expected.\n if (errorType === 'fileNotFoundOrAccessDeniedError' && statusCode === 404) {\n return true;\n }\n return false;\n}\n\n//# sourceMappingURL=ExpectedErrors.js.map","/**\n * Simple utility for assisting in writing promises when using the promise constructor is a bit clunky.\n */ export class Deferred {\n constructor(){\n this[Symbol.toStringTag] = 'Deferred';\n // eslint-disable-next-line @fluidx/ffx-rules/prefer-private-fields -- TODO: Exception added when rule was enabled. Please consider refactoring this to use ECMAScript # prefixed private properties for better minification\n this.isPending = true;\n this.p = new Promise((resolve, reject)=>{\n this.res = resolve;\n this.rej = reject;\n });\n }\n then(onfulfilled, /* eslint-disable-next-line @typescript-eslint/no-explicit-any\n-- TODO: Using 'any' type defeats the purpose of TypeScript. Consider replacing it with a concrete type, or 'unknown'. */ onrejected) {\n return this.p.then(onfulfilled, onrejected);\n }\n catch(/* eslint-disable-next-line @typescript-eslint/no-explicit-any\n-- TODO: Using 'any' type defeats the purpose of TypeScript. Consider replacing it with a concrete type, or 'unknown'. */ onrejected) {\n return this.p.catch(onrejected);\n }\n resolve(value) {\n this.isPending = false;\n this.res(value);\n }\n /* eslint-disable-next-line @typescript-eslint/no-explicit-any\n-- TODO: Using 'any' type defeats the purpose of TypeScript. Consider replacing it with a concrete type, or 'unknown'. */ reject(reason) {\n this.isPending = false;\n this.rej(reason);\n }\n pending() {\n return this.isPending;\n }\n finally(onFinally) {\n return this.p.finally(onFinally);\n }\n}\n\n//# sourceMappingURL=Deferred.js.map","/**\n * A utility function that computes offset for an event with respect to an origin time.\n * For example, offsets with respect to fluidBootstrapperStartTime or hostScenarioStartTime.\n * @param eventTime The raw timestamp value which should be converted to a relative timestamp.\n * @param originTime The moment in time against which the offset should be computed. This corresponds to an offset of time zero.\n */ export const computeOffsetTime = (eventTime, originTime)=>{\n if (eventTime !== undefined && originTime !== undefined) {\n return eventTime - originTime;\n }\n return undefined;\n};\n\n//# sourceMappingURL=computeOffsetTime.js.map","/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n/**\n * The attachment state of some Fluid data (e.g. a container or data store), denoting whether it is uploaded to the\n * service. The transition from detached to attached state is a one-way transition.\n * @public\n */\nexport var AttachState;\n(function (AttachState) {\n /**\n * In detached state, the data is only present on the local client's machine. It has not yet been uploaded\n * to the service.\n */\n AttachState[\"Detached\"] = \"Detached\";\n /**\n * In attaching state, the data has started the upload to the service, but has not yet completed.\n */\n AttachState[\"Attaching\"] = \"Attaching\";\n /**\n * In attached state, the data has completed upload to the service. It can be accessed by other clients after\n * reaching attached state.\n */\n AttachState[\"Attached\"] = \"Attached\";\n})(AttachState || (AttachState = {}));\n/**\n * @legacy\n * @alpha\n */\nexport const IRuntimeFactory = \"IRuntimeFactory\";\n//# sourceMappingURL=runtime.js.map","export const OWHAshaPillarCreate = 'Create';\nexport const OWHAshaPillarInterruptions = 'Interruptions';\nexport const OWHAshaPillarOpen = 'Open';\nexport const OWHAshaPillarPostBoot = 'PostBoot';\nexport const OWHAshaVetoContainerConnectFailed = 'ContainerConnectFailed';\nexport const OWHAshaVetoFileCreateFailed = 'FileCreateFailed';\nexport const OWHAshaVetoFileOpenFailed = 'FileOpenFailed';\nexport const OWHAshaVetoPostBootContainerClosed = 'PostBootContainerClosed';\nexport const OWHAshaVetoUnhandledError = 'UnhandledError';\nexport const OWHAshaVetoUnhandledRejection = 'UnhandledRejection';\nexport const OWHAshaErrorTypeComponentLoadError = 'ComponentLoadError';\nexport const OWHAshaErrorTypeContainerAttachFailed = 'ContainerAttachFailed';\nexport const OWHAshaErrorTypeContainerConnectedTimeout = 'ContainerConnectedTimeout';\nexport const OWHAshaErrorTypeContainerLoadError = 'ContainerLoadError';\nexport const OWHAshaErrorTypeGetAbsoluteUrlFailed = 'GetAbsoluteUrlFailed';\nexport const OWHAshaErrorTypeIframeTimeoutFailure = 'IframeTimeoutFailure';\nexport const OWHAshaErrorTypeIncompatibleMessageVersions = 'IncompatibleMessageVersions';\nexport const OWHAshaErrorTypeUnhandledError = 'UnhandledError';\nexport const OWHAshaErrorTypeUnhandledRejection = 'UnhandledRejection';\n\n//# sourceMappingURL=OfficeWebHostAsha.js.map","import { DriverErrorTypes } from '@fluidframework/driver-definitions/legacy';\nimport { OdspErrorTypes } from '@fluidframework/odsp-driver-definitions/legacy';\nimport { NamespaceLoggerAdapter, sendErrorEvent } from '@fluidx/telemetry';\nimport { OWHAshaErrorTypeContainerConnectedTimeout } from './OfficeWebHostAsha';\nconst chunkLoadErrorRegex = 'Loading chunk\\\\s[a-zA-Z0-9_-]+\\\\sfailed';\n/**\n * Method that logs all the QoS Errors to a specific table\n * @param logger Logger instance to use for logging\n * @param eventName eventName to provide to the log statement\n * @param pillar The ASHA pillar a particular error corresponds to, like Open, Create etc\n * @param veto The ASHA veto a specific error corresponds to, like FileOpenFailed, FileCreateFailed etc\n * @param errorType A string that uniquely identifies the error. This is different from eventName since an eventName can encompass a\n * number of errorTypes, for example an eventName like LoadComponentInIframe can encompass errorTypes like IframeTimeoutFailure, FileNotFound etc\n * @param additionalProps Optional additional properties to log with the event\n * @param error The exact error the occurs\n */ export function logQoSError(logger, eventName, pillar, veto, errorType, additionalProps, error) {\n // Creates a table Office_Fluid_QoS_Error that incorporates all QoS Errors\n const loggerInstance = new NamespaceLoggerAdapter('QoS', logger);\n sendErrorEvent(loggerInstance, {\n eventName,\n pillar,\n veto,\n errorType,\n isAce: !isIceError(error),\n ...additionalProps\n }, error);\n}\n/**\n * Returns true if the error is an ICE error\n */ export function isIceError(error) {\n // If error is undefined, categorize as ACE\n if (!error) {\n return false;\n }\n const possibleTelemetryError = error;\n if (possibleTelemetryError.errorType && [\n DriverErrorTypes.offlineError,\n DriverErrorTypes.fileNotFoundOrAccessDeniedError,\n DriverErrorTypes.authorizationError,\n OdspErrorTypes.snapshotTooBig,\n OdspErrorTypes.invalidFileNameError,\n DriverErrorTypes.fileOverwrittenInStorage,\n OWHAshaErrorTypeContainerConnectedTimeout\n ].some((errorType)=>errorType === possibleTelemetryError.errorType)) {\n return true;\n }\n // If the error is a chunk load failure, treat as ICE since those generally mean offline scenario\n if (possibleTelemetryError.message && new RegExp(chunkLoadErrorRegex).test(possibleTelemetryError.message)) {\n return true;\n }\n return false;\n}\n\n//# sourceMappingURL=QoSErrorHelpers.js.map","import { AttachState } from '@fluidframework/container-definitions';\nimport { Deferred } from '@fluidx/utilities';\nimport { timeoutWithTerminator } from '@fluidx/loop-sdk';\nimport { sendErrorEvent, isExpectedError } from '@fluidx/telemetry';\nimport { OWHAshaErrorTypeContainerConnectedTimeout, OWHAshaPillarPostBoot, OWHAshaVetoContainerConnectFailed, OWHAshaVetoPostBootContainerClosed } from '../Reliability/OfficeWebHostAsha';\nimport { logQoSError } from '../Reliability/QoSErrorHelpers';\nimport { OWHErrorEventContainerPostBootError } from '../Telemetry';\n/**\n * Method that starts a terminator which resolves when either the timeout happens or container connected promise resolves\n */ const startContainerConnectedTimeoutTerminator = (container, logger, containerConnectedDeferredPromise)=>{\n // Timeout after which if we do not connect we log a QoS Error\n const containerConnectedTimeout = 60 * 1000;\n // Log a QoS Error if we do not connect within 60 seconds\n timeoutWithTerminator(containerConnectedTimeout, [\n containerConnectedDeferredPromise\n ]).then((timedOut)=>{\n // We do not want to log the container connected timeout\n // if the container closes before getting connected\n if (timedOut && !container.closed) {\n const errorType = OWHAshaErrorTypeContainerConnectedTimeout;\n logQoSError(logger, OWHErrorEventContainerPostBootError /*eventName*/ , OWHAshaPillarPostBoot /*pillar*/ , OWHAshaVetoContainerConnectFailed /*veto*/ , errorType /*errorType*/ , {} /*additionlProps*/ , {\n message: 'Timed out while connecting the container',\n errorType\n } /*error*/ );\n // Yes, we are logging a duplicate event below. This is to log this in ContainerSession_Error.\n // In the future, we would be moving away from QoS. TODO: https://office.visualstudio.com/OC/_workitems/edit/8423042\n sendErrorEvent(logger, {\n eventName: OWHErrorEventContainerPostBootError,\n errorType,\n // Since this state indicates that user may be looking at an out of date document and/or updates wouldn't be persisted.\n isUserImpacting: true\n }, {\n message: 'Timed out while connecting the container',\n errorType\n } /*error*/ );\n }\n }).catch(()=>{\n /* All terminator promises handle their errors */ });\n};\n/**\n * Method that adds information about the Container to the logger so it's added to every log event.\n * Currently, the only data that we are adding is the docId, but we might want to add more later.\n */ const addContainerInformationToLogger = (container, logger)=>{\n const containerInformation = {};\n // getting the DocId from the container\n const resolvedUrl = container.resolvedUrl;\n // we could use the isOdspResolvedUrl here, but making it more generic so we can accept other types of ResolvedUrl\n // the property needed here is Resolved.Id, so checking if we have it.\n if (resolvedUrl && 'id' in resolvedUrl) {\n containerInformation['docId'] = resolvedUrl.id;\n }\n logger.PersistedProperties?.addPersistedProperties(containerInformation);\n};\n/**\n * Attaches container closed and connected listeners\n */ export const attachContainerListeners = (container, logger)=>{\n const containerConnectedDeferredPromise = new Deferred();\n // If the container isn't attached, this is create new path; start the timeout tracker only once container attaches\n if (container.attachState !== AttachState.Attached) {\n container.once('attached', ()=>{\n // Adding information about the container to the logger.\n // This is the create new path and we should have access to the container.\n addContainerInformationToLogger(container, logger);\n startContainerConnectedTimeoutTerminator(container, logger, containerConnectedDeferredPromise);\n });\n } else {\n // Adding information about the container to the logger.\n addContainerInformationToLogger(container, logger);\n startContainerConnectedTimeoutTerminator(container, logger, containerConnectedDeferredPromise);\n }\n container.once('closed', (error)=>{\n // Log a QoS error only if container closes with an error\n if (error) {\n logQoSError(logger, OWHErrorEventContainerPostBootError /*eventName*/ , OWHAshaPillarPostBoot /*pillar*/ , OWHAshaVetoPostBootContainerClosed /*veto*/ , error.errorType /*errorType*/ , {} /*additionalProps*/ , error);\n // Yes, we are logging a duplicate event below. This is to log this in ContainerSession_Error.\n // In the future, we would be moving away from QoS. TODO: https://office.visualstudio.com/OC/_workitems/edit/8423042\n sendErrorEvent(logger, {\n eventName: OWHErrorEventContainerPostBootError,\n errorType: error.errorType || OWHErrorEventContainerPostBootError,\n // Since container closing with an error is considered an interrupting error, impacting user action.\n isUserImpacting: true,\n isExpected: isExpectedError(error),\n isDirty: container.isDirty\n }, error);\n }\n });\n container.once('connected', ()=>{\n // Resolve the container connected promise, once the container connects\n containerConnectedDeferredPromise.resolve();\n });\n};\n\n//# sourceMappingURL=attachContainerListeners.js.map","// Sample Input:\n// api://749d0000-0194-1005-2e05-08d61613bf2f/SomeScope.All\n// Capture Groups:\n// protocol: api://\n// domain: 749d0000-0194-1005-2e05-08d61613bf2f\n// remaining: /SomeScope.All\nconst domainMatcher = /([a-zA-Z\\d-]+:\\/\\/)([a-zA-Z\\d-\\.]+|(?:\\d{1,3}\\.){3}\\d{1,3})(\\/.*)?$/;\n/**\n * Redacts domain names and ip addresses from a URL-like string, api://some/text, https://other/text or otherwise.\n * Assumes a fully formed URL with protocol, such as api://url.com or api://url.com/scope.\n * Returns string unmodified in all other cases.\n *\n * @param url URL string to redact domain from. Non-URL text is fine and will be returned unmodified.\n * @returns Redacted domain or unmodified string, if no domain was detected\n */ export function redactDomain(url) {\n let redactedDomain = url;\n const matches = domainMatcher.exec(url);\n if (matches && matches.length > 2) {\n const protocol = matches[1];\n const remaining = matches[3] ? matches[3] : '';\n redactedDomain = `${protocol}(redacted)${remaining}`;\n }\n return redactedDomain;\n}\n/**\n * Helper for running redactDomain on string arrays.\n *\n * @param urls URLs to redact.\n * @returns Redacted URLs or unmodified input, as applicable.\n * @see redactDomain\n */ export function redactDomains(urls) {\n return urls.map((url)=>redactDomain(url));\n}\n/**\n * Redacts all domains from URLs in given string.\n *\n * @param text Text to redact domains from.\n * @returns Text with redacted domains.\n */ function redactAllDomainsFromText(text) {\n const globalDomainMatcher = /([a-zA-Z]+:\\/\\/)([a-zA-Z\\d\\-\\.]+)([^ ]*)/g;\n return text.replace(globalDomainMatcher, '$1(redacted)$3');\n}\n/**\n * Redacts all domains from URLs in given string except those associated with call stacks (URLs in parentheses).\n *\n * @param text Text to redact domains from.\n * @returns Text with redacted domains. Non-URL text and paranthesized call stack URL entries will be returned unmodified.\n */ export function redactDomainsFromText(text) {\n // We want to preserve URLs in call stacks for troubleshooting. Regex lookbehind is another option, but there are concerns\n // not only with its level of support, but also with the potential for recursive or infinite matches in certain cases.\n // Instead, we'll take a safer and more explicit multi-step approach where we remove URLs in parantheses, redact domains,\n // and then re-insert the stack URLs in parantheses.\n // Step 1: Extract items in parentheses\n const parenthesesRegex = /\\(([^)]+)\\)/g;\n let match;\n const matches = [];\n while((match = parenthesesRegex.exec(text)) !== null){\n matches.push({\n index: match.index,\n value: match[0]\n });\n }\n // Step 2: Replace content outside parentheses\n // Splitting the text into segments to avoid replacing within extracted parts\n let lastIndex = 0;\n let modifiedText = '';\n matches.forEach((match)=>{\n // Add the text segment before the current match, applying domain redaction\n modifiedText += redactAllDomainsFromText(text.substring(lastIndex, match.index));\n // Add the extracted match as is\n modifiedText += match.value;\n lastIndex = match.index + match.value.length;\n });\n // Add the remaining part of the text after the last match\n modifiedText += redactAllDomainsFromText(text.substring(lastIndex));\n return modifiedText;\n}\n/**\n * Redacts sharepoint domain substring of the format https://[example]-my.sharepoint.com\n * Returns string unmodified in all other cases.\n *\n * @param text String that may contain sharepoint domain information\n * @returns Sanitized error stack where the sharepoint domain and/or page url has been replaced with `redacted`\n * // TODO: Task 7173656: Redact any url except for .js file\n */ export function redactSharepointDomainAndLoopPageUrl(text) {\n // We do not want to redact other domain strings like https://office.com, etc since they can help with diagnostics - de-minifying call stacks\n // But this specific substring needs to be redacted since domain name is OII and should not be logged.\n const spDomainRegex = /(https:\\/\\/)(\\w)+(.sharepoint.com|-my.sharepoint.com|.sharepoint-df.com|.sharepoint-mil.us|-my.sharepoint-mil.us|.sharepoint.us|-my.sharepoint.us)/;\n const pageUrlRegex = /(https:\\/\\/)(dev.loop.microsoft.com|df.loop.microsoft.com|loop.microsoft.com|preview.loop.microsoft.com|loop.cloud.microsoft|loop.cloud-dev.microsoft)(\\/p\\/)([a-zA-Z0-9%]+)/;\n const redactedString = text.replace(spDomainRegex, '(redacted)');\n return redactedString.replace(pageUrlRegex, '(redacted)');\n}\n\n//# sourceMappingURL=redactDomains.js.map","import { getDocumentHiddenResult } from '@fluidx/utilities';\nimport { NamespaceLoggerAdapter, redactSharepointDomainAndLoopPageUrl } from '@fluidx/telemetry';\n/**\n * Adapter that enables us to customize how fluid runtime logs are sent to the host logger\n *\n * NOTE: Any code in here that depends on specific properties on the logged event represents\n * technical debt with risk of silent regression, since there's no contract around the shape of FF log events\n * See https://github.com/microsoft/FluidFramework/issues/6976 for background here.\n * (The only possible exception being event.category)\n */ export class FluidRuntimeLoggerAdapter {\n /**\n * Creates a new instance of a logger to pass to the fluid runtime\n * @param hostLogger - The logger passed in to office web host\n * @param perfMetadata - Extra properties to log for certain performance logs\n */ constructor(hostLogger, perfMetadata, documentHiddenTrackerId, persistedProperties){\n this.perfMetadata = perfMetadata;\n this.documentHiddenTrackerId = documentHiddenTrackerId;\n this.runtimeLogger = new NamespaceLoggerAdapter('FluidRuntime', hostLogger, persistedProperties);\n }\n get Disposable() {\n return this;\n }\n get NamespaceLogger() {\n return this;\n }\n sendWithNamespace(event, namespace) {\n this.runtimeLogger.sendWithNamespace(event, namespace);\n }\n send(event) {\n let dataToLog = event;\n // For specific perf logs, we want to add the extra persisted properties, as well as a startTime in epoch time\n if (event.category === 'performance') {\n const duration = event['duration'];\n const currentTime = Date.now();\n const startTime = typeof duration === 'number' ? currentTime - duration : undefined;\n dataToLog = {\n ...this.perfMetadata,\n startTime,\n // TODO: Product Backlog Item 7512199: Remove '!' non-null-assertion usage from office-bohemia packages\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n documentEverHidden: this.documentHiddenTrackerId && getDocumentHiddenResult(this.documentHiddenTrackerId) > -1,\n ...dataToLog\n };\n }\n // Certain Aria alerts to IcM should consider message age in their criteria (to reduce noise)\n // but Aria cannot calculate EventTime - messageTimestamp itself, so we approximate that here\n if (dataToLog.opMessageAgeMs === undefined && typeof dataToLog.messageTimestamp === 'number') {\n dataToLog = {\n opMessageAgeMs: Date.now() - dataToLog.messageTimestamp,\n ...dataToLog\n };\n }\n // Redact any domain information\n if (dataToLog.message) {\n dataToLog.message = redactSharepointDomainAndLoopPageUrl(dataToLog.message.toString());\n }\n if (dataToLog.stack) {\n dataToLog.stack = redactSharepointDomainAndLoopPageUrl(dataToLog.stack.toString());\n }\n if (dataToLog.error) {\n dataToLog.error = redactSharepointDomainAndLoopPageUrl(dataToLog.error.toString());\n }\n if (dataToLog.errorMessage) {\n dataToLog.errorMessage = redactSharepointDomainAndLoopPageUrl(dataToLog.errorMessage.toString());\n }\n if (dataToLog.responseMessage) {\n dataToLog.responseMessage = redactSharepointDomainAndLoopPageUrl(dataToLog.responseMessage.toString());\n }\n this.runtimeLogger.send(dataToLog);\n }\n dispose() {\n this.runtimeLogger.Disposable.dispose();\n }\n}\n\n//# sourceMappingURL=FluidRuntimeLoggerAdapter.js.map","import { AttachState } from '@fluidframework/container-definitions';\nimport { delay } from '@fluidx/loop-sdk';\nexport function resumeContainerInternal(container) {\n // Exception added when eslint rule was added, this should be revisited when modifying this code\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n if (!container.closed && (container.attachState === AttachState.Attached || container.attachState === undefined)) {\n container.connect();\n }\n}\n/**\n * Calls resume on the container. If the promise is not resolved before the given timeout,\n * then the container is resumed after the timeout elapsed.\n * @param container The container to be resumed.\n * @param promise The promise to be waited before resuming the container.\n * @param resumeContainerTimeoutMs The maximum timeout to wait before resuming the container.\n */ export function racePromiseForResumeContainer(container, promise, resumeContainerTimeoutMs) {\n if (resumeContainerTimeoutMs === undefined || resumeContainerTimeoutMs <= 0) {\n resumeContainerInternal(container);\n return;\n }\n // We open the container in the \"paused\" state to prevent op processing from interfering with initial render.\n // We need to resume op processing once we have the content displayed event. Since components are not required to\n // implement the content displayed event, we also resume op processing after 3 seconds to make sure we don't end\n // up in a state where we never process ops.\n Promise.race([\n delay(resumeContainerTimeoutMs),\n promise\n ]).then(()=>{\n // There may be other critical work queued up on the microtask queue, let's queue resume to happen after the microtask\n // queue is emptied by using set timeout to make sure this doesn't interfere with critical work. We are using a 50ms timer here\n // to give the browser a chance to render a few frames before processing deltas, but this could theoretically be 0 and still solve\n // the original performance issue.\n setTimeout(()=>{\n resumeContainerInternal(container);\n }, 50);\n }).catch(()=>{\n // Any possible error should be handled explicitly outside of this function.\n });\n}\n\n//# sourceMappingURL=resumeContainerInternal.js.map","/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n/**\n * The state of the Container's connection to the service.\n * @public\n */\nexport var ConnectionState;\n(function (ConnectionState) {\n /**\n * The container is not connected to the ordering service\n * Note - When in this state the container may be about to reconnect,\n * or may remain disconnected until explicitly told to connect.\n */\n ConnectionState[ConnectionState[\"Disconnected\"] = 0] = \"Disconnected\";\n /**\n * The container is disconnected but actively trying to establish a new connection\n * PLEASE NOTE that this numerical value falls out of the order you may expect for this state\n */\n ConnectionState[ConnectionState[\"EstablishingConnection\"] = 3] = \"EstablishingConnection\";\n /**\n * The container has an inbound connection only, and is catching up to the latest known state from the service.\n */\n ConnectionState[ConnectionState[\"CatchingUp\"] = 1] = \"CatchingUp\";\n /**\n * The container is fully connected and syncing\n */\n ConnectionState[ConnectionState[\"Connected\"] = 2] = \"Connected\";\n})(ConnectionState || (ConnectionState = {}));\n//# sourceMappingURL=connectionState.js.map","/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\nimport { EventEmitter } from \"./eventEmitter.cjs\";\n/**\n * Event Emitter helper class the supports emitting typed events.\n * @privateRemarks\n * This should become internal once the classes extending it become internal.\n * @legacy\n * @alpha\n */\nexport class TypedEventEmitter extends EventEmitter {\n constructor() {\n super();\n this.addListener = super.addListener.bind(this);\n this.on = super.on.bind(this);\n this.once = super.once.bind(this);\n this.prependListener = super.prependListener.bind(this);\n this.prependOnceListener = super.prependOnceListener.bind(this);\n this.removeListener = super.removeListener.bind(this);\n this.off = super.off.bind(this);\n }\n}\n//# sourceMappingURL=typedEventEmitter.js.map","/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n/**\n * Check if the package.json defines a Fluid package\n * @param pkg - the package json data to check if it is a Fluid package.\n * @legacy\n * @alpha\n */\nexport const isFluidPackage = (pkg) => typeof pkg === \"object\" &&\n typeof pkg?.name === \"string\" &&\n typeof pkg?.fluid === \"object\";\n/**\n * Determines if any object is an IFluidCodeDetails\n * @internal\n */\nexport const isFluidCodeDetails = (details) => {\n const maybeCodeDetails = details;\n return (typeof maybeCodeDetails === \"object\" &&\n (typeof maybeCodeDetails?.package === \"string\" ||\n isFluidPackage(maybeCodeDetails?.package)) &&\n (maybeCodeDetails?.config === undefined || typeof maybeCodeDetails?.config === \"object\"));\n};\n/**\n * @legacy\n * @alpha\n */\nexport const IFluidCodeDetailsComparer = \"IFluidCodeDetailsComparer\";\n//# sourceMappingURL=fluidPackage.js.map","/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n/**\n * This function can be used to assert at compile time that a given value has type never.\n * One common usage is in the default case of a switch block,\n * to ensure that all cases are explicitly handled.\n *\n * Example:\n * ```typescript\n * const bool: true | false = ...;\n * switch(bool) {\n * case true: {...}\n * case false: {...}\n * default: unreachableCase(bool);\n * }\n * ```\n * @internal\n */\nexport function unreachableCase(_, message = \"Unreachable Case\") {\n throw new Error(message);\n}\n//# sourceMappingURL=unreachable.js.map","/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n/**\n * Type tag used to distinguish different types of nodes in a {@link ISummaryTree}.\n * @public\n */\n// eslint-disable-next-line @typescript-eslint/no-namespace\nexport var SummaryType;\n(function (SummaryType) {\n /**\n * Represents a sub-tree in the summary.\n * @public\n */\n SummaryType.Tree = 1;\n /**\n * Represents a blob of data that is added to the summary.\n * Such as the user data that is added to the DDS or metadata added by runtime\n * such as data store / channel attributes.\n * @public\n */\n SummaryType.Blob = 2;\n /**\n * Path to a summary tree object from the last successful summary.\n * @public\n */\n SummaryType.Handle = 3;\n /**\n * Unique identifier to larger blobs uploaded outside of the summary.\n * Ex. DDS has large images or video that will be uploaded by the BlobManager and\n * receive an Id that can be used in the summary.\n * @public\n */\n SummaryType.Attachment = 4;\n})(SummaryType || (SummaryType = {}));\n//# sourceMappingURL=summary.js.map","/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n/**\n * @legacy\n * @alpha\n */\nexport var MessageType;\n(function (MessageType) {\n /**\n * Empty operation message. Used to send an updated reference sequence number.\n * Relay service is free to coalesce these messages or fully drop them, if\n * another message was used to update MSN to a number equal or higher than referenced\n * sequence number in Noop.\n */\n MessageType[\"NoOp\"] = \"noop\";\n /**\n * System message sent to indicate a new client has joined the collaboration.\n */\n MessageType[\"ClientJoin\"] = \"join\";\n /**\n * System message sent to indicate a client has left the collaboration.\n */\n MessageType[\"ClientLeave\"] = \"leave\";\n /**\n * Proposes a new consensus value.\n */\n MessageType[\"Propose\"] = \"propose\";\n /**\n * Message used to reject a pending proposal.\n */\n MessageType[\"Reject\"] = \"reject\";\n /**\n * Message sent by client accepting proposal\n */\n MessageType[\"Accept\"] = \"accept\";\n /**\n * Summary operation (message).\n */\n MessageType[\"Summarize\"] = \"summarize\";\n /**\n * Summary operation (message) written.\n */\n MessageType[\"SummaryAck\"] = \"summaryAck\";\n /**\n * Summary operation (message) write failure.\n */\n MessageType[\"SummaryNack\"] = \"summaryNack\";\n /**\n * Operation (message) produced by container runtime.\n */\n MessageType[\"Operation\"] = \"op\";\n /**\n * Message to indicate that no active clients are present.\n */\n MessageType[\"NoClient\"] = \"noClient\";\n /**\n * Message to indicate successful round trip.\n */\n MessageType[\"RoundTrip\"] = \"tripComplete\";\n /**\n * Service specific control messages that are never sequenced.\n */\n MessageType[\"Control\"] = \"control\";\n})(MessageType || (MessageType = {}));\n/**\n * @internal\n */\nexport var SignalType;\n(function (SignalType) {\n /**\n * System signal sent to indicate a new client has joined the collaboration.\n */\n SignalType[\"ClientJoin\"] = \"join\";\n /**\n * System signal sent to indicate a client has left the collaboration.\n */\n SignalType[\"ClientLeave\"] = \"leave\";\n})(SignalType || (SignalType = {}));\n/**\n * Type of the nack.\n * @legacy\n * @alpha\n */\nexport var NackErrorType;\n(function (NackErrorType) {\n /**\n * Retriable after {@link ISummaryNack.retryAfter} seconds.\n */\n NackErrorType[\"ThrottlingError\"] = \"ThrottlingError\";\n /**\n * Client's token is not valid for the intended message.\n */\n NackErrorType[\"InvalidScopeError\"] = \"InvalidScopeError\";\n /**\n * Clients message is invalid and should retry immediately with a valid message.\n */\n NackErrorType[\"BadRequestError\"] = \"BadRequestError\";\n /**\n * Service is having issues. Client should not retry.\n */\n NackErrorType[\"LimitExceededError\"] = \"LimitExceededError\";\n})(NackErrorType || (NackErrorType = {}));\n//# sourceMappingURL=protocol.js.map","/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\nimport { SummaryType } from \"@fluidframework/driver-definitions\";\n/**\n * Validates the current layout of an .app + .protocol summary tree\n * this is used internally for create new, and single commit summary\n * @internal\n */\nexport function isCombinedAppAndProtocolSummary(summary, ...optionalRootTrees) {\n if (summary?.tree === undefined ||\n summary.tree?.[\".app\"]?.type !== SummaryType.Tree ||\n summary.tree?.[\".protocol\"]?.type !== SummaryType.Tree) {\n return false;\n }\n const treeKeys = Object.keys(summary.tree).filter((t) => !optionalRootTrees.includes(t));\n if (treeKeys.length !== 2) {\n return false;\n }\n return true;\n}\n/**\n * Extract the attributes from the protocol summary.\n * @param protocolSummary - protocol summary from which the values are to be extracted.\n * @internal\n */\nexport function getDocAttributesFromProtocolSummary(protocolSummary) {\n const attributesBlob = protocolSummary.tree.attributes;\n return JSON.parse(attributesBlob.content);\n}\n/**\n * Extract quorum values from the protocol summary.\n * @param protocolSummary - protocol summary from which the values are to be extracted.\n * @internal\n */\nexport function getQuorumValuesFromProtocolSummary(protocolSummary) {\n const quorumValuesBlob = protocolSummary.tree.quorumValues;\n const quorumValues = JSON.parse(quorumValuesBlob.content);\n return quorumValues;\n}\n//# sourceMappingURL=summaryForCreateNew.js.map","/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n/**\n * Returns a promise that resolves after `timeMs`.\n * @param timeMs - Time in milliseconds to wait.\n * @internal\n */\nexport const delay = async (timeMs) => new Promise((resolve) => setTimeout(() => resolve(), timeMs));\n//# sourceMappingURL=delay.js.map","/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\nimport { performanceNow } from \"@fluid-internal/client-utils\";\nimport { delay } from \"@fluidframework/core-utils/internal\";\nimport { DriverErrorTypes } from \"@fluidframework/driver-definitions/internal\";\nimport { isFluidError } from \"@fluidframework/telemetry-utils/internal\";\nimport { NonRetryableError, canRetryOnError, getRetryDelayFromError } from \"./network.js\";\nimport { pkgVersion } from \"./packageVersion.js\";\n/**\n * @internal\n */\nexport async function runWithRetry(api, fetchCallName, logger, progress) {\n let result;\n let success = false;\n // We double this value in first try in when we calculate time to wait for in \"calculateMaxWaitTime\" function.\n let retryAfterMs = 500; // has to be positive!\n let numRetries = 0;\n const startTime = performanceNow();\n let lastError;\n do {\n try {\n result = await api(progress.cancel);\n success = true;\n }\n catch (err) {\n // If it is not retriable, then just throw the error.\n if (!canRetryOnError(err)) {\n logger.sendTelemetryEvent({\n eventName: `${fetchCallName}_cancel`,\n retry: numRetries,\n duration: performanceNow() - startTime,\n fetchCallName,\n }, err);\n throw err;\n }\n if (progress.cancel?.aborted === true) {\n logger.sendTelemetryEvent({\n eventName: `${fetchCallName}_runWithRetryAborted`,\n retry: numRetries,\n duration: performanceNow() - startTime,\n fetchCallName,\n reason: progress.cancel.reason,\n }, err);\n throw new NonRetryableError(\"runWithRetry was Aborted\", DriverErrorTypes.genericError, {\n driverVersion: pkgVersion,\n fetchCallName,\n reason: progress.cancel.reason,\n });\n }\n // logging the first failed retry instead of every attempt. We want to avoid filling telemetry\n // when we have tight loop of retrying in offline mode, but we also want to know what caused\n // the failure in the first place\n if (numRetries === 0) {\n logger.sendTelemetryEvent({\n eventName: `${fetchCallName}_firstFailed`,\n duration: performanceNow() - startTime,\n fetchCallName,\n }, err);\n }\n numRetries++;\n lastError = err;\n // Wait for the calculated time before retrying.\n retryAfterMs = calculateMaxWaitTime(retryAfterMs, err);\n if (progress.onRetry) {\n progress.onRetry(retryAfterMs, err);\n }\n await delay(retryAfterMs);\n }\n } while (!success);\n if (numRetries > 0) {\n logger.sendTelemetryEvent({\n eventName: `${fetchCallName}_lastError`,\n retry: numRetries,\n duration: performanceNow() - startTime,\n fetchCallName,\n }, lastError);\n }\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n return result;\n}\nconst MaxReconnectDelayInMsWhenEndpointIsReachable = 60000;\nconst MaxReconnectDelayInMsWhenEndpointIsNotReachable = 8000;\n/**\n * Calculates time to wait for after an error based on the error and wait time for previous iteration.\n * In case endpoint(service or socket) is not reachable, then we maybe offline or may have got some\n * transient error not related to endpoint, in that case we want to try at faster pace and hence the\n * max wait is lesser 8s as compared to when endpoint is reachable in which case it is 60s.\n * @param delayMs - wait time for previous iteration\n * @param error - error based on which we decide wait time.\n * @returns Wait time to wait for.\n * @internal\n */\nexport function calculateMaxWaitTime(delayMs, error) {\n const retryDelayFromError = getRetryDelayFromError(error);\n let newDelayMs = Math.max(retryDelayFromError ?? 0, delayMs * 2);\n newDelayMs = Math.min(newDelayMs, isFluidError(error) && error.getTelemetryProperties().endpointReached === true\n ? MaxReconnectDelayInMsWhenEndpointIsReachable\n : MaxReconnectDelayInMsWhenEndpointIsNotReachable);\n return newDelayMs;\n}\n//# sourceMappingURL=runWithRetry.js.map","/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n *\n * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY\n */\nexport const pkgName = \"@fluidframework/driver-utils\";\nexport const pkgVersion = \"2.43.0\";\n//# sourceMappingURL=packageVersion.js.map","/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n/**\n * Utility API to check if the type of snapshot contents is `ISnapshot`.\n * @internal\n * @param obj - obj whose type needs to be identified.\n */\nexport function isInstanceOfISnapshot(obj) {\n return obj !== undefined && \"snapshotFormatV\" in obj && obj.snapshotFormatV === 1;\n}\n/**\n * Utility API to return ISnapshotTree either from ISnapshot or ISnapshotTree itself.\n * @internal\n */\nexport function getSnapshotTree(tree) {\n return isInstanceOfISnapshot(tree) ? tree.snapshotTree : tree;\n}\n//# sourceMappingURL=storageUtils.js.map","/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\nimport { bufferToString } from \"@fluid-internal/client-utils\";\n/**\n * Read a blob from {@link @fluidframework/driver-definitions#IDocumentStorageService} and\n * {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/parse | JSON.parse}\n * it into object of type `T`.\n *\n * @param storage - The `DocumentStorageService` to read from.\n * @param id - The ID of the blob to read and parse.\n *\n * @typeParam T - Output type matching JSON format of inpyt blob data.\n *\n * @returns The object that we decoded and parsed via `JSON.parse`.\n * @internal\n */\nexport async function readAndParse(storage, id) {\n const blob = await storage.readBlob(id);\n const decoded = bufferToString(blob, \"utf8\");\n return JSON.parse(decoded);\n}\n//# sourceMappingURL=readAndParse.js.map","/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\nimport { FluidErrorTypes, } from \"@fluidframework/core-interfaces/internal\";\nimport { LoggingError, NORMALIZED_ERROR_TYPE, isExternalError, normalizeError, wrapError, } from \"./errorLogging.js\";\n/**\n * Throws a UsageError with the given message if the condition is not met.\n * Use this API when `false` indicates a precondition is not met on a public API (for any FF layer).\n *\n * @param condition - The condition that should be true, if the condition is false a UsageError will be thrown.\n * @param message - The message to include in the error when the condition does not hold.\n * @param props - Telemetry props to include on the error when the condition does not hold.\n * @internal\n */\nexport function validatePrecondition(condition, message, props) {\n if (!condition) {\n throw new UsageError(message, props);\n }\n}\n/**\n * Generic wrapper for an unrecognized/uncategorized error object\n *\n * @internal\n */\nexport class GenericError extends LoggingError {\n /**\n * Create a new GenericError\n * @param message - Error message\n * @param error - inner error object\n * @param props - Telemetry props to include when the error is logged\n */\n constructor(message, \n // TODO: Use `unknown` instead (API breaking change because error is not just an input parameter, but a public member of the class)\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any\n error, props) {\n // Don't try to log the inner error\n super(message, props, new Set([\"error\"]));\n this.error = error;\n this.errorType = FluidErrorTypes.genericError;\n }\n}\n/**\n * Error indicating an API is being used improperly resulting in an invalid operation.\n *\n * @internal\n */\nexport class UsageError extends LoggingError {\n constructor(message, props) {\n super(message, { ...props, usageError: true });\n this.errorType = FluidErrorTypes.usageError;\n }\n}\n/**\n * DataCorruptionError indicates that we encountered definitive evidence that the data at rest\n * backing this container is corrupted, and this container would never be expected to load properly again\n *\n * @internal\n */\nexport class DataCorruptionError extends LoggingError {\n constructor(message, props) {\n super(message, { ...props, dataProcessingError: 1 });\n this.errorType = FluidErrorTypes.dataCorruptionError;\n this.canRetry = false;\n }\n}\n/**\n * Indicates we hit a fatal error while processing incoming data from the Fluid Service.\n *\n * @remarks\n *\n * The error will often originate in the dataStore or DDS implementation that is responding to incoming changes.\n * This differs from {@link DataCorruptionError} in that this may be a transient error that will not repro in another\n * client or session.\n *\n * @internal\n */\nexport class DataProcessingError extends LoggingError {\n constructor(errorMessage, props) {\n super(errorMessage, props);\n /**\n * {@inheritDoc IFluidErrorBase.errorType}\n */\n this.errorType = FluidErrorTypes.dataProcessingError;\n this.canRetry = false;\n }\n /**\n * Create a new `DataProcessingError` detected and raised within the Fluid Framework.\n */\n static create(errorMessage, dataProcessingCodepath, sequencedMessage, props = {}, stackTraceLimit) {\n const ErrorConfig = Error;\n const originalStackTraceLimit = ErrorConfig.stackTraceLimit;\n try {\n if (stackTraceLimit !== undefined) {\n ErrorConfig.stackTraceLimit = stackTraceLimit;\n }\n const dataProcessingError = DataProcessingError.wrapIfUnrecognized(errorMessage, dataProcessingCodepath, sequencedMessage);\n dataProcessingError.addTelemetryProperties(props);\n return dataProcessingError;\n }\n finally {\n // Reset the stack trace limit to the original value\n if (stackTraceLimit !== undefined) {\n ErrorConfig.stackTraceLimit = originalStackTraceLimit;\n }\n }\n }\n /**\n * Wrap the given error in a `DataProcessingError`, unless the error is already of a known type\n * with the exception of a normalized {@link LoggingError}, which will still be wrapped.\n *\n * In either case, the error will have some relevant properties added for telemetry.\n *\n * @remarks\n *\n * We wrap conditionally since known error types represent well-understood failure modes, and ideally\n * one day we will move away from throwing these errors but rather we'll return them.\n * But an unrecognized error needs to be classified as `DataProcessingError`.\n *\n * @param originalError - The error to be converted.\n * @param dataProcessingCodepath - Which code-path failed while processing data.\n * @param messageLike - Message to include info about via telemetry props.\n *\n * @returns Either a new `DataProcessingError`, or (if wrapping is deemed unnecessary) the given error.\n */\n static wrapIfUnrecognized(originalError, dataProcessingCodepath, messageLike) {\n const props = {\n dataProcessingError: 1,\n dataProcessingCodepath,\n ...(messageLike === undefined\n ? undefined\n : extractSafePropertiesFromMessage(messageLike)),\n };\n const normalizedError = normalizeError(originalError, { props });\n // Note that other errors may have the NORMALIZED_ERROR_TYPE errorType,\n // but if so they are still suitable to be wrapped as DataProcessingError.\n if (isExternalError(normalizedError) ||\n normalizedError.errorType === NORMALIZED_ERROR_TYPE) {\n // Create a new DataProcessingError to wrap this external error\n const dataProcessingError = wrapError(normalizedError, (message) => new DataProcessingError(message));\n // Copy over the props above and any others added to this error since first being normalized\n dataProcessingError.addTelemetryProperties(normalizedError.getTelemetryProperties());\n return dataProcessingError;\n }\n return normalizedError;\n }\n}\n/**\n * Extracts specific properties from the provided message that we know are safe to log.\n *\n * @param messageLike - Message to include info about via telemetry props.\n *\n * @internal\n */\nexport const extractSafePropertiesFromMessage = (messageLike) => ({\n messageClientId: messageLike.clientId === null ? \"null\" : messageLike.clientId,\n messageSequenceNumber: messageLike.sequenceNumber,\n messageClientSequenceNumber: messageLike.clientSequenceNumber,\n messageReferenceSequenceNumber: messageLike.referenceSequenceNumber,\n messageMinimumSequenceNumber: messageLike.minimumSequenceNumber,\n messageTimestamp: messageLike.timestamp,\n});\n//# sourceMappingURL=error.js.map","/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n/**\n * Note: The contents of this file really don't belong in this package, as they are only intended for internal use.\n * They should be moved into the `core-utils` package in the future.\n */\n/**\n * @internal\n */\nexport const connectedEventName = \"connected\";\n/**\n * @internal\n */\nexport const disconnectedEventName = \"disconnected\";\n// eslint-disable-next-line jsdoc/require-description\n/**\n * @internal\n */\nexport function safeRaiseEvent(emitter, logger, event, ...args) {\n try {\n emitter.emit(event, ...args);\n }\n catch (error) {\n logger.sendErrorEvent({ eventName: \"RaiseEventError\", event }, error);\n }\n}\n/**\n * Raises events pertaining to the connection\n * @param logger - The logger to log telemetry\n * @param emitter - The event emitter instance\n * @param connected - A boolean tracking whether the connection was in a connected state or not\n * @param clientId - The connected/disconnected clientId\n * @param disconnectedReason - The reason for the connection to be disconnected (Used for telemetry purposes only)\n *\n * @internal\n */\nexport function raiseConnectedEvent(logger, emitter, connected, clientId, disconnectedReason) {\n try {\n if (connected) {\n emitter.emit(connectedEventName, clientId);\n }\n else {\n emitter.emit(disconnectedEventName, disconnectedReason);\n }\n }\n catch (error) {\n logger.sendErrorEvent({ eventName: \"RaiseConnectedEventError\" }, error);\n }\n}\n//# sourceMappingURL=events.js.map","/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\nimport { TypedEventEmitter } from \"@fluid-internal/client-utils\";\n/**\n * Event Emitter helper class\n *\n * @remarks\n * Any exceptions thrown by listeners will be caught and raised through \"error\" event.\n * Any exception thrown by \"error\" listeners will propagate to the caller.\n * @privateRemarks\n * This probably doesn't belong in this package, as it is not telemetry-specific, and is really only intended for internal fluid-framework use.\n * We should consider moving it to the `core-utils` package.\n * @legacy\n * @alpha\n */\nexport class EventEmitterWithErrorHandling extends TypedEventEmitter {\n constructor(\n // TODO: use `unknown` instead (breaking API change)\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n errorHandler) {\n super();\n this.errorHandler = errorHandler;\n }\n emit(event, ...args) {\n try {\n return super.emit(event, ...args);\n }\n catch (error) {\n this.errorHandler(event, error);\n return true;\n }\n }\n}\n//# sourceMappingURL=eventEmitterWithErrorHandling.js.map","export const VOID = -1;\nexport const PRIMITIVE = 0;\nexport const ARRAY = 1;\nexport const OBJECT = 2;\nexport const DATE = 3;\nexport const REGEXP = 4;\nexport const MAP = 5;\nexport const SET = 6;\nexport const ERROR = 7;\nexport const BIGINT = 8;\n// export const SYMBOL = 9;\n","import {\n VOID, PRIMITIVE,\n ARRAY, OBJECT,\n DATE, REGEXP, MAP, SET,\n ERROR, BIGINT\n} from './types.js';\n\nconst env = typeof self === 'object' ? self : globalThis;\n\nconst deserializer = ($, _) => {\n const as = (out, index) => {\n $.set(index, out);\n return out;\n };\n\n const unpair = index => {\n if ($.has(index))\n return $.get(index);\n\n const [type, value] = _[index];\n switch (type) {\n case PRIMITIVE:\n case VOID:\n return as(value, index);\n case ARRAY: {\n const arr = as([], index);\n for (const index of value)\n arr.push(unpair(index));\n return arr;\n }\n case OBJECT: {\n const object = as({}, index);\n for (const [key, index] of value)\n object[unpair(key)] = unpair(index);\n return object;\n }\n case DATE:\n return as(new Date(value), index);\n case REGEXP: {\n const {source, flags} = value;\n return as(new RegExp(source, flags), index);\n }\n case MAP: {\n const map = as(new Map, index);\n for (const [key, index] of value)\n map.set(unpair(key), unpair(index));\n return map;\n }\n case SET: {\n const set = as(new Set, index);\n for (const index of value)\n set.add(unpair(index));\n return set;\n }\n case ERROR: {\n const {name, message} = value;\n return as(new env[name](message), index);\n }\n case BIGINT:\n return as(BigInt(value), index);\n case 'BigInt':\n return as(Object(BigInt(value)), index);\n }\n return as(new env[type](value), index);\n };\n\n return unpair;\n};\n\n/**\n * @typedef {Array} Record a type representation\n */\n\n/**\n * Returns a deserialized value from a serialized array of Records.\n * @param {Record[]} serialized a previously serialized value.\n * @returns {any}\n */\nexport const deserialize = serialized => deserializer(new Map, serialized)(0);\n","import {\n VOID, PRIMITIVE,\n ARRAY, OBJECT,\n DATE, REGEXP, MAP, SET,\n ERROR, BIGINT\n} from './types.js';\n\nconst EMPTY = '';\n\nconst {toString} = {};\nconst {keys} = Object;\n\nconst typeOf = value => {\n const type = typeof value;\n if (type !== 'object' || !value)\n return [PRIMITIVE, type];\n\n const asString = toString.call(value).slice(8, -1);\n switch (asString) {\n case 'Array':\n return [ARRAY, EMPTY];\n case 'Object':\n return [OBJECT, EMPTY];\n case 'Date':\n return [DATE, EMPTY];\n case 'RegExp':\n return [REGEXP, EMPTY];\n case 'Map':\n return [MAP, EMPTY];\n case 'Set':\n return [SET, EMPTY];\n }\n\n if (asString.includes('Array'))\n return [ARRAY, asString];\n\n if (asString.includes('Error'))\n return [ERROR, asString];\n\n return [OBJECT, asString];\n};\n\nconst shouldSkip = ([TYPE, type]) => (\n TYPE === PRIMITIVE &&\n (type === 'function' || type === 'symbol')\n);\n\nconst serializer = (strict, json, $, _) => {\n\n const as = (out, value) => {\n const index = _.push(out) - 1;\n $.set(value, index);\n return index;\n };\n\n const pair = value => {\n if ($.has(value))\n return $.get(value);\n\n let [TYPE, type] = typeOf(value);\n switch (TYPE) {\n case PRIMITIVE: {\n let entry = value;\n switch (type) {\n case 'bigint':\n TYPE = BIGINT;\n entry = value.toString();\n break;\n case 'function':\n case 'symbol':\n if (strict)\n throw new TypeError('unable to serialize ' + type);\n entry = null;\n break;\n case 'undefined':\n return as([VOID], value);\n }\n return as([TYPE, entry], value);\n }\n case ARRAY: {\n if (type)\n return as([type, [...value]], value);\n \n const arr = [];\n const index = as([TYPE, arr], value);\n for (const entry of value)\n arr.push(pair(entry));\n return index;\n }\n case OBJECT: {\n if (type) {\n switch (type) {\n case 'BigInt':\n return as([type, value.toString()], value);\n case 'Boolean':\n case 'Number':\n case 'String':\n return as([type, value.valueOf()], value);\n }\n }\n\n if (json && ('toJSON' in value))\n return pair(value.toJSON());\n\n const entries = [];\n const index = as([TYPE, entries], value);\n for (const key of keys(value)) {\n if (strict || !shouldSkip(typeOf(value[key])))\n entries.push([pair(key), pair(value[key])]);\n }\n return index;\n }\n case DATE:\n return as([TYPE, value.toISOString()], value);\n case REGEXP: {\n const {source, flags} = value;\n return as([TYPE, {source, flags}], value);\n }\n case MAP: {\n const entries = [];\n const index = as([TYPE, entries], value);\n for (const [key, entry] of value) {\n if (strict || !(shouldSkip(typeOf(key)) || shouldSkip(typeOf(entry))))\n entries.push([pair(key), pair(entry)]);\n }\n return index;\n }\n case SET: {\n const entries = [];\n const index = as([TYPE, entries], value);\n for (const entry of value) {\n if (strict || !shouldSkip(typeOf(entry)))\n entries.push(pair(entry));\n }\n return index;\n }\n }\n\n const {message} = value;\n return as([TYPE, {name: type, message}], value);\n };\n\n return pair;\n};\n\n/**\n * @typedef {Array} Record a type representation\n */\n\n/**\n * Returns an array of serialized Records.\n * @param {any} value a serializable value.\n * @param {{json?: boolean, lossy?: boolean}?} options an object with a `lossy` or `json` property that,\n * if `true`, will not throw errors on incompatible types, and behave more\n * like JSON stringify would behave. Symbol and Function will be discarded.\n * @returns {Record[]}\n */\n export const serialize = (value, {json, lossy} = {}) => {\n const _ = [];\n return serializer(!(json || lossy), !!json, new Map, _)(value), _;\n};\n","import {deserialize} from './deserialize.js';\nimport {serialize} from './serialize.js';\n\n/**\n * @typedef {Array} Record a type representation\n */\n\n/**\n * Returns an array of serialized Records.\n * @param {any} any a serializable value.\n * @param {{transfer?: any[], json?: boolean, lossy?: boolean}?} options an object with\n * a transfer option (ignored when polyfilled) and/or non standard fields that\n * fallback to the polyfill if present.\n * @returns {Record[]}\n */\nexport default typeof structuredClone === \"function\" ?\n /* c8 ignore start */\n (any, options) => (\n options && ('json' in options || 'lossy' in options) ?\n deserialize(serialize(any, options)) : structuredClone(any)\n ) :\n (any, options) => deserialize(serialize(any, options));\n /* c8 ignore stop */\n\nexport {deserialize, serialize};\n","/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\nimport { Uint8ArrayToString, bufferToString, stringToBuffer, } from \"@fluid-internal/client-utils\";\nimport { assert, compareArrays, unreachableCase } from \"@fluidframework/core-utils/internal\";\nimport { SummaryType } from \"@fluidframework/driver-definitions\";\nimport { DriverErrorTypes, } from \"@fluidframework/driver-definitions/internal\";\nimport { isCombinedAppAndProtocolSummary, readAndParse, } from \"@fluidframework/driver-utils/internal\";\nimport { LoggingError, UsageError, } from \"@fluidframework/telemetry-utils/internal\";\nimport { v4 as uuid } from \"uuid\";\n/**\n * Utility api to parse the IResolvedUrl.url into specific parts like querystring, path to get\n * deep link info etc.\n * Warning - This function may not be compatible with any Url Resolver's resolved url. It works\n * with urls of type: protocol:///.../..?\n * @param url - This is the IResolvedUrl.url part of the resolved url.\n * @returns The IParsedUrl representing the input URL, or undefined if the format was not supported\n * @legacy\n * @alpha\n */\nexport function tryParseCompatibleResolvedUrl(url) {\n const parsed = new URL(url);\n if (typeof parsed.pathname !== \"string\") {\n throw new LoggingError(\"Failed to parse pathname\");\n }\n const query = parsed.search ?? \"\";\n const regex = /^\\/([^/]*\\/[^/]*)(\\/?.*)$/;\n const match = regex.exec(parsed.pathname);\n return match?.length === 3\n ? {\n id: match[1],\n path: match[2],\n query,\n // URLSearchParams returns null if the param is not provided.\n version: parsed.searchParams.get(\"version\") ?? undefined,\n }\n : undefined;\n}\n/**\n * Combine the app summary and protocol summary in 1 tree.\n * @param appSummary - Summary of the app.\n * @param protocolSummary - Summary of the protocol.\n * @internal\n */\nexport function combineAppAndProtocolSummary(appSummary, protocolSummary) {\n assert(!isCombinedAppAndProtocolSummary(appSummary), 0x5a8 /* app summary is already a combined tree! */);\n assert(!isCombinedAppAndProtocolSummary(protocolSummary), 0x5a9 /* protocol summary is already a combined tree! */);\n const createNewSummary = {\n type: SummaryType.Tree,\n tree: {\n \".protocol\": protocolSummary,\n \".app\": appSummary,\n },\n };\n return createNewSummary;\n}\n/**\n * Converts a summary to snapshot tree and separate its blob contents\n * to align detached container format with IPendingContainerState\n * @param summary - ISummaryTree\n */\nfunction convertSummaryToSnapshotAndBlobs(summary) {\n let blobContents = {};\n const treeNode = {\n blobs: {},\n trees: {},\n id: uuid(),\n unreferenced: summary.unreferenced,\n groupId: summary.groupId,\n };\n for (const [key, summaryObject] of Object.entries(summary.tree)) {\n switch (summaryObject.type) {\n case SummaryType.Tree: {\n const innerSnapshot = convertSummaryToSnapshotAndBlobs(summaryObject);\n treeNode.trees[key] = innerSnapshot.baseSnapshot;\n blobContents = { ...blobContents, ...innerSnapshot.snapshotBlobs };\n break;\n }\n case SummaryType.Attachment: {\n treeNode.blobs[key] = summaryObject.id;\n break;\n }\n case SummaryType.Blob: {\n const blobId = uuid();\n treeNode.blobs[key] = blobId;\n const contentString = summaryObject.content instanceof Uint8Array\n ? Uint8ArrayToString(summaryObject.content)\n : summaryObject.content;\n blobContents[blobId] = contentString;\n break;\n }\n case SummaryType.Handle: {\n throw new LoggingError(\"No handles should be there in summary in detached container!!\");\n }\n default: {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-explicit-any\n unreachableCase(summaryObject, `Unknown tree type ${summaryObject.type}`);\n }\n }\n }\n const pendingSnapshot = { baseSnapshot: treeNode, snapshotBlobs: blobContents };\n return pendingSnapshot;\n}\n/**\n * Converts a snapshot to snapshotInfo with its blob contents\n * to align detached container format with IPendingContainerState\n *\n * Note, this assumes the ISnapshot sequence number is defined. Otherwise an assert will be thrown\n * @param snapshot - ISnapshot\n */\nexport function convertSnapshotToSnapshotInfo(snapshot) {\n assert(snapshot.sequenceNumber !== undefined, 0x93a /* Snapshot sequence number is missing */);\n const snapshotBlobs = {};\n for (const [blobId, arrayBufferLike] of snapshot.blobContents.entries()) {\n snapshotBlobs[blobId] = bufferToString(arrayBufferLike, \"utf8\");\n }\n return {\n baseSnapshot: snapshot.snapshotTree,\n snapshotBlobs,\n snapshotSequenceNumber: snapshot.sequenceNumber,\n };\n}\n/**\n * Converts a snapshot to snapshotInfo with its blob contents\n * to align detached container format with IPendingContainerState\n *\n * Note, this assumes the ISnapshot sequence number is defined. Otherwise an assert will be thrown\n * @param snapshot - ISnapshot\n */\nexport function convertSnapshotInfoToSnapshot(snapshotInfo, snapshotSequenceNumber) {\n const blobContents = new Map();\n for (const [blobId, serializedContent] of Object.entries(snapshotInfo.snapshotBlobs)) {\n blobContents.set(blobId, stringToBuffer(serializedContent, \"utf8\"));\n }\n return {\n snapshotTree: snapshotInfo.baseSnapshot,\n blobContents,\n ops: [],\n sequenceNumber: snapshotSequenceNumber,\n latestSequenceNumber: undefined,\n snapshotFormatV: 1,\n };\n}\n/**\n * Converts summary parts into a SnapshotTree and its blob contents.\n * @param protocolSummaryTree - Protocol Summary Tree\n * @param appSummaryTree - App Summary Tree\n */\nfunction convertProtocolAndAppSummaryToSnapshotAndBlobs(protocolSummaryTree, appSummaryTree) {\n const combinedSummary = {\n type: SummaryType.Tree,\n tree: { ...appSummaryTree.tree },\n };\n combinedSummary.tree[\".protocol\"] = protocolSummaryTree;\n const snapshotTreeWithBlobContents = convertSummaryToSnapshotAndBlobs(combinedSummary);\n return snapshotTreeWithBlobContents;\n}\nexport const getSnapshotTreeAndBlobsFromSerializedContainer = (detachedContainerSnapshot) => {\n assert(isCombinedAppAndProtocolSummary(detachedContainerSnapshot), 0x8e6 /* Protocol and App summary trees should be present */);\n const protocolSummaryTree = detachedContainerSnapshot.tree[\".protocol\"];\n const appSummaryTree = detachedContainerSnapshot.tree[\".app\"];\n const snapshotTreeWithBlobContents = convertProtocolAndAppSummaryToSnapshotAndBlobs(protocolSummaryTree, appSummaryTree);\n return snapshotTreeWithBlobContents;\n};\nexport function getProtocolSnapshotTree(snapshot) {\n return \".protocol\" in snapshot.trees ? snapshot.trees[\".protocol\"] : snapshot;\n}\nexport const combineSnapshotTreeAndSnapshotBlobs = (baseSnapshot, snapshotBlobs) => {\n const blobsContents = {};\n // Process blobs in the current level\n for (const [, id] of Object.entries(baseSnapshot.blobs)) {\n if (snapshotBlobs[id] !== undefined) {\n blobsContents[id] = stringToBuffer(snapshotBlobs[id], \"utf8\");\n }\n }\n // Recursively process trees in the current level\n const trees = {};\n for (const [path, tree] of Object.entries(baseSnapshot.trees)) {\n trees[path] = combineSnapshotTreeAndSnapshotBlobs(tree, snapshotBlobs);\n }\n // Create a new snapshot tree with blob contents and processed trees\n const snapshotTreeWithBlobContents = {\n ...baseSnapshot,\n blobsContents,\n trees,\n };\n return snapshotTreeWithBlobContents;\n};\nexport function isDeltaStreamConnectionForbiddenError(error) {\n return (typeof error === \"object\" &&\n error !== null &&\n error?.errorType ===\n DriverErrorTypes.deltaStreamConnectionForbidden);\n}\n/**\n * Validates format in parsed string get from detached container\n * serialization using IPendingDetachedContainerState format.\n */\nfunction isPendingDetachedContainerState(detachedContainerState) {\n if (detachedContainerState?.attached === undefined ||\n detachedContainerState?.baseSnapshot === undefined ||\n detachedContainerState?.snapshotBlobs === undefined ||\n detachedContainerState?.hasAttachmentBlobs === undefined) {\n return false;\n }\n return true;\n}\n/**\n * Parses the given string into {@link IPendingDetachedContainerState} format,\n * with validation (if invalid, throws a UsageError).\n * This is the inverse of the JSON.stringify call in {@link Container.serialize}\n */\nexport function getDetachedContainerStateFromSerializedContainer(serializedContainer) {\n const hasBlobsSummaryTree = \".hasAttachmentBlobs\";\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n const parsedContainerState = JSON.parse(serializedContainer);\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n if (isPendingDetachedContainerState(parsedContainerState)) {\n return parsedContainerState;\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n }\n else if (isCombinedAppAndProtocolSummary(parsedContainerState)) {\n const { baseSnapshot, snapshotBlobs } = getSnapshotTreeAndBlobsFromSerializedContainer(parsedContainerState);\n const detachedContainerState = {\n attached: false,\n baseSnapshot,\n snapshotBlobs,\n hasAttachmentBlobs: parsedContainerState.tree[hasBlobsSummaryTree] !== undefined,\n };\n return detachedContainerState;\n }\n else {\n throw new UsageError(\"Cannot rehydrate detached container. Incorrect format\");\n }\n}\n/**\n * Blindly parses the given string into {@link IPendingContainerState} format.\n * This is the inverse of the JSON.stringify call in {@link SerializedStateManager.getPendingLocalState}\n */\nexport function getAttachedContainerStateFromSerializedContainer(serializedContainer) {\n return serializedContainer === undefined\n ? undefined\n : JSON.parse(serializedContainer);\n}\n/**\n * Ensures only a single instance of the provided async function is running.\n * If there are multiple calls they will all get the same promise to wait on.\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport const runSingle = (func) => {\n let running;\n // don't mark this function async, so we return the same promise,\n // rather than one that is wrapped due to async\n // eslint-disable-next-line @typescript-eslint/promise-function-async\n return (...args) => {\n if (running !== undefined) {\n if (!compareArrays(running.args, args)) {\n return Promise.reject(new UsageError(\"Subsequent calls cannot use different arguments.\"));\n }\n return running.result;\n }\n running = { args, result: func(...args).finally(() => (running = undefined)) };\n return running.result;\n };\n};\nexport async function getDocumentAttributes(storage, tree) {\n if (tree === undefined) {\n return {\n minimumSequenceNumber: 0,\n sequenceNumber: 0,\n };\n }\n // Backward compatibility: old docs would have \".attributes\" instead of \"attributes\"\n const attributesHash = \".protocol\" in tree.trees\n ? tree.trees[\".protocol\"].blobs.attributes\n : tree.blobs[\".attributes\"];\n const attributes = await readAndParse(storage, attributesHash);\n return attributes;\n}\n//# sourceMappingURL=utils.js.map","/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n/**\n * Compare two arrays. Returns true if their elements are equivalent and in the same order.\n *\n * @legacy\n * @alpha\n *\n * @param left - The first array to compare\n * @param right - The second array to compare\n * @param comparator - The function used to check if two `T`s are equivalent.\n * Defaults to `Object.is()` equality (a shallow compare where NaN = NaN and -0 ≠ 0)\n */\nexport const compareArrays = (left, right, comparator = (leftItem, rightItem) => Object.is(leftItem, rightItem)) => {\n // PERF: 'for-loop' and 'Array.every()' tied.\n // '===' and 'Object.is()' tied.\n // Trivial acceptance adds no measurable overhead.\n // 30% penalty vs. baseline for exported function [node 14 x64].\n return (left === right || // Trivial acceptance: 'left' and 'right' are the same instance\n (left.length === right.length && // Trivial rejection: 'left' and 'right' are different lengths\n left.every((leftItem, index) => comparator(leftItem, right[index], index))));\n};\n//# sourceMappingURL=compare.js.map","/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\nimport { TypedEventEmitter } from \"@fluid-internal/client-utils\";\nimport { assert } from \"@fluidframework/core-utils/internal\";\n/**\n * Audience represents all clients connected to the op stream.\n */\nexport class Audience extends TypedEventEmitter {\n constructor() {\n super();\n this.members = new Map();\n // We are expecting this class to have many listeners, so we suppress noisy \"MaxListenersExceededWarning\" logging.\n super.setMaxListeners(0);\n }\n getSelf() {\n return this._currentClientId === undefined\n ? undefined\n : {\n clientId: this._currentClientId,\n client: this.getMember(this._currentClientId),\n };\n }\n setCurrentClientId(clientId) {\n if (this._currentClientId !== clientId) {\n const oldId = this._currentClientId;\n this._currentClientId = clientId;\n // this.getMember(clientId) could resolve to undefined in these two cases:\n // 1) Feature gates controlling ConnectionStateHandler() behavior are off\n // 2) we are loading from stashed state and audience is empty, but we remember and set prior clientId\n this.emit(\"selfChanged\", oldId === undefined ? undefined : ({ clientId: oldId }), { clientId, client: this.getMember(clientId) });\n }\n }\n /**\n * Adds a new client to the audience\n */\n addMember(clientId, details) {\n // Given that signal delivery is unreliable process, we might observe same client being added twice\n // In such case we should see exactly same payload (IClient), and should not raise event twice!\n if (this.members.has(clientId)) {\n const client = this.members.get(clientId);\n assert(JSON.stringify(client) === JSON.stringify(details), 0x4b2 /* new client has different payload from existing one */);\n }\n else {\n this.members.set(clientId, details);\n this.emit(\"addMember\", clientId, details);\n }\n }\n /**\n * Removes a client from the audience. Only emits an event if a client is actually removed\n * @returns if a client was removed from the audience\n */\n removeMember(clientId) {\n const removedClient = this.members.get(clientId);\n if (removedClient === undefined) {\n return false;\n }\n else {\n this.members.delete(clientId);\n this.emit(\"removeMember\", clientId, removedClient);\n return true;\n }\n }\n /**\n * Retrieves all the members in the audience.\n *\n * @remarks When the container is disconnected, this will keep returning the audience as it was last seen before the\n * container disconnected.\n */\n getMembers() {\n return new Map(this.members);\n }\n /**\n * Retrieves a specific member of the audience.\n *\n * @remarks When the container is disconnected, this will keep returning members from the audience as it was last seen\n * before the container disconnected.\n */\n getMember(clientId) {\n return this.members.get(clientId);\n }\n}\n//# sourceMappingURL=audience.js.map","/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n/**\n * Defines scope access for a Container/Document.\n * @legacy\n * @alpha\n */\nexport var ScopeType;\n(function (ScopeType) {\n /**\n * Read access is supported on the Container/Document\n */\n ScopeType[\"DocRead\"] = \"doc:read\";\n /**\n * Write access is supported on the Container/Document\n */\n ScopeType[\"DocWrite\"] = \"doc:write\";\n /**\n * User can generate new summaries operations\n */\n ScopeType[\"SummaryWrite\"] = \"summary:write\";\n})(ScopeType || (ScopeType = {}));\n//# sourceMappingURL=scopes.js.map","/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\nimport { isFluidPackage, } from \"@fluidframework/container-definitions/internal\";\nexport var ReconnectMode;\n(function (ReconnectMode) {\n ReconnectMode[\"Never\"] = \"Never\";\n ReconnectMode[\"Disabled\"] = \"Disabled\";\n ReconnectMode[\"Enabled\"] = \"Enabled\";\n})(ReconnectMode || (ReconnectMode = {}));\n/**\n * Gets the name of the Fluid package.\n * @param codeDetails- - Data structure used to describe the code to load on the Fluid document\n */\nexport const getPackageName = (codeDetails) => {\n // TODO: use a real type\n // This is the normal path that any modern customer would hit\n const containerPackageName = isFluidPackage(codeDetails?.package)\n ? codeDetails?.package.name\n : codeDetails?.package;\n return { name: containerPackageName };\n};\n//# sourceMappingURL=contracts.js.map","/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\nimport { OnlineStatus, canRetryOnError, isOnline } from \"./network.js\";\n/**\n * @internal\n */\nexport function logNetworkFailure(logger, event, error) {\n const newEvent = { ...event };\n const errorOnlineProp = error?.online;\n newEvent.online =\n typeof errorOnlineProp === \"string\" ? errorOnlineProp : OnlineStatus[isOnline()];\n if (typeof navigator === \"object\" && navigator !== null) {\n const nav = navigator;\n const connection = nav.connection ?? nav.mozConnection ?? nav.webkitConnection;\n if (connection !== null && typeof connection === \"object\") {\n newEvent.connectionType = connection.type;\n }\n }\n // non-retryable errors are fatal and should be logged as errors\n newEvent.category = canRetryOnError(error) ? \"generic\" : \"error\";\n logger.sendTelemetryEvent(newEvent, error);\n}\n//# sourceMappingURL=networkUtils.js.map","/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\nimport { MessageType, } from \"@fluidframework/driver-definitions/internal\";\n/**\n * Tells if message was sent by container runtime\n * @privateRemarks ADO #1385: To be moved to container-definitions\n * @returns whether the message is a runtime message\n * @internal\n */\nexport function isRuntimeMessage(message) {\n return message.type === MessageType.Operation;\n}\n/**\n * @privateRemarks ADO #1385: To be moved to packages/protocol-base/src/protocol.ts\n * @internal\n */\nexport function canBeCoalescedByService(message) {\n // This assumes that in the future relay service may implement coalescing of accept messages,\n // same way it was doing coalescing of immediate noops in the past.\n return message.type === MessageType.NoOp || message.type === MessageType.Accept;\n}\n//# sourceMappingURL=messageRecognition.js.map","/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\nimport { TypedEventEmitter, performanceNow } from \"@fluid-internal/client-utils\";\nimport { assert } from \"@fluidframework/core-utils/internal\";\nimport Deque from \"double-ended-queue\";\nexport class DeltaQueue extends TypedEventEmitter {\n get disposed() {\n return this.isDisposed;\n }\n /**\n * Whether or not the queue is paused.\n */\n get paused() {\n return this.pauseCount !== 0;\n }\n get length() {\n return this.q.length;\n }\n get idle() {\n return this.processingPromise === undefined && this.q.length === 0;\n }\n async waitTillProcessingDone() {\n return this.processingPromise ?? { count: 0, duration: 0 };\n }\n /**\n * @param worker - A callback to process a delta.\n */\n constructor(worker) {\n super();\n this.worker = worker;\n this.isDisposed = false;\n this.q = new Deque();\n /**\n * Tracks the number of pause requests for the queue.\n * The DeltaQueue is created initially paused.\n */\n this.pauseCount = 1;\n }\n dispose() {\n throw new Error(\"Not implemented.\");\n this.isDisposed = true;\n }\n clear() {\n this.q.clear();\n }\n peek() {\n return this.q.peekFront();\n }\n toArray() {\n return this.q.toArray();\n }\n push(task) {\n try {\n this.q.push(task);\n this.emit(\"push\", task);\n this.ensureProcessing();\n }\n catch (error) {\n this.emit(\"error\", error);\n }\n }\n async pause() {\n this.pauseCount++;\n // If called from within the processing loop, we are in the middle of processing an op. Return a promise\n // that will resolve when processing has actually stopped.\n await this.waitTillProcessingDone();\n }\n resume() {\n assert(this.pauseCount > 0, 0x0f4 /* \"Nonzero pause-count on resume()\" */);\n this.pauseCount--;\n this.ensureProcessing();\n }\n /**\n * There are several actions that may need to kick off delta processing, so we want to guard against\n * accidental reentrancy. ensureProcessing can be called safely to start the processing loop if it is\n * not already started.\n */\n ensureProcessing() {\n if (this.anythingToProcess() && this.processingPromise === undefined) {\n // Use a resolved promise to start the processing on a separate stack.\n this.processingPromise = Promise.resolve()\n .then(() => {\n assert(this.processingPromise !== undefined, 0x37f /* reentrancy? */);\n const result = this.processDeltas();\n assert(this.processingPromise !== undefined, 0x380 /* reentrancy? */);\n // WARNING: Do not move next line to .finally() clause!\n // It runs async and creates a race condition where incoming ensureProcessing() call observes\n // from previous run while previous run is over (but finally clause was not scheduled yet)\n this.processingPromise = undefined;\n return result;\n })\n .catch((error) => {\n this.error = error;\n this.processingPromise = undefined;\n this.emit(\"error\", error);\n return { count: 0, duration: 0 };\n });\n assert(this.processingPromise !== undefined, 0x381 /* processDeltas() should run async */);\n }\n }\n anythingToProcess() {\n return this.q.length > 0 && !this.paused && this.error === undefined;\n }\n /**\n * Executes the delta processing loop until a stop condition is reached.\n */\n processDeltas() {\n const start = performanceNow();\n let count = 0;\n // For grouping to work we must process all local messages immediately and in the single turn.\n // So loop over them until no messages to process, we have become paused, or hit an error.\n while (this.anythingToProcess()) {\n // Get the next message in the queue\n const next = this.q.shift();\n count++;\n // Process the message.\n // We know next is defined since we did a length check just prior to shifting.\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n this.worker(next);\n this.emit(\"op\", next);\n }\n const duration = performanceNow() - start;\n if (this.q.length === 0) {\n this.emit(\"idle\", count, duration);\n }\n return { count, duration };\n }\n}\n//# sourceMappingURL=deltaQueue.js.map","/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\nimport { TypedEventEmitter } from \"@fluid-internal/client-utils\";\nimport { assert } from \"@fluidframework/core-utils/internal\";\nimport events_pkg from \"events_pkg\";\nconst { EventEmitter } = events_pkg;\n/**\n * Structure for tracking proposals that have been sequenced but not approved yet.\n */\nclass PendingProposal {\n constructor(sequenceNumber, key, value, local) {\n this.sequenceNumber = sequenceNumber;\n this.key = key;\n this.value = value;\n this.local = local;\n }\n}\n/**\n * The QuorumClients is used to track members joining and leaving the collaboration session.\n * @internal\n */\nexport class QuorumClients extends TypedEventEmitter {\n get disposed() {\n return this.isDisposed;\n }\n constructor(snapshot) {\n super();\n this.isDisposed = false;\n this.members = new Map(snapshot);\n this.snapshotCache = snapshot;\n }\n /**\n * Snapshots the current state of the QuorumClients\n * @returns a snapshot of the clients in the quorum\n */\n snapshot() {\n this.snapshotCache ??= [...this.members];\n return this.snapshotCache;\n }\n /**\n * Adds a new client to the quorum\n */\n addMember(clientId, details) {\n assert(!!clientId, 0x9a0 /* clientId has to be non-empty string */);\n assert(!this.members.has(clientId), 0x9a1 /* clientId not found */);\n this.members.set(clientId, details);\n this.emit(\"addMember\", clientId, details);\n // clear the cache\n this.snapshotCache = undefined;\n }\n /**\n * Removes a client from the quorum\n */\n removeMember(clientId) {\n assert(!!clientId, 0x9a2 /* clientId has to be non-empty string */);\n assert(this.members.has(clientId), 0x9a3 /* clientId not found */);\n this.members.delete(clientId);\n this.emit(\"removeMember\", clientId);\n // clear the cache\n this.snapshotCache = undefined;\n }\n /**\n * Retrieves all the members in the quorum\n */\n getMembers() {\n return new Map(this.members);\n }\n /**\n * Retrieves a specific member of the quorum\n */\n getMember(clientId) {\n return this.members.get(clientId);\n }\n dispose() {\n this.isDisposed = true;\n }\n}\n/**\n * The QuorumProposals holds a key/value store. Proposed values become finalized in the store once all connected\n * clients have seen the proposal.\n * @internal\n */\nexport class QuorumProposals extends TypedEventEmitter {\n get disposed() {\n return this.isDisposed;\n }\n constructor(snapshot, sendProposal) {\n super();\n this.sendProposal = sendProposal;\n this.isDisposed = false;\n // Event emitter for changes to the environment that affect pending proposal promises.\n this.stateEvents = new EventEmitter();\n this.proposals = new Map(snapshot.proposals.map(([, proposal]) => {\n return [\n proposal.sequenceNumber,\n new PendingProposal(proposal.sequenceNumber, proposal.key, proposal.value, false),\n ];\n }));\n this.values = new Map(snapshot.values);\n this.proposalsSnapshotCache = snapshot.proposals;\n this.valuesSnapshotCache = snapshot.values;\n }\n /**\n * Snapshots the current state of the QuorumProposals\n * @returns arrays of proposals and values\n */\n snapshot() {\n this.proposalsSnapshotCache ??= [...this.proposals].map(([sequenceNumber, proposal]) => [\n sequenceNumber,\n { sequenceNumber, key: proposal.key, value: proposal.value },\n [], // rejections, which has been removed\n ]);\n this.valuesSnapshotCache ??= [...this.values];\n return {\n proposals: this.proposalsSnapshotCache,\n values: this.valuesSnapshotCache,\n };\n }\n /**\n * Returns whether the quorum has achieved a consensus for the given key.\n */\n has(key) {\n return this.values.has(key);\n }\n /**\n * Returns the consensus value for the given key\n */\n get(key) {\n return this.values.get(key)?.value;\n }\n /**\n * Proposes a new value. Returns a promise that will either:\n * - Resolve when the proposal is accepted\n * - Reject if the proposal fails to send or if the QuorumProposals is disposed\n */\n async propose(key, value) {\n const clientSequenceNumber = this.sendProposal(key, value);\n if (clientSequenceNumber < 0) {\n this.emit(\"error\", { eventName: \"ProposalInDisconnectedState\", key });\n throw new Error(\"Can't propose in disconnected state\");\n }\n return new Promise((resolve, reject) => {\n // The sequence number that our proposal was assigned and went pending.\n // If undefined, then it's not sequenced yet.\n let thisProposalSequenceNumber;\n // A proposal goes through two phases before this promise resolves:\n // 1. Sequencing - waiting for the proposal to be ack'd by the server.\n // 2. Approval - waiting for the proposal to be approved by connected clients.\n const localProposalSequencedHandler = (sequencedCSN, sequenceNumber) => {\n if (sequencedCSN === clientSequenceNumber) {\n thisProposalSequenceNumber = sequenceNumber;\n this.stateEvents.off(\"localProposalSequenced\", localProposalSequencedHandler);\n this.stateEvents.off(\"disconnected\", disconnectedHandler);\n this.stateEvents.on(\"localProposalApproved\", localProposalApprovedHandler);\n }\n };\n const localProposalApprovedHandler = (sequenceNumber) => {\n // Proposals can be uniquely identified by the sequenceNumber they were assigned.\n if (sequenceNumber === thisProposalSequenceNumber) {\n resolve();\n removeListeners();\n }\n };\n // There are two error flows we consider: disconnect and disposal.\n // If we get disconnected before the proposal is sequenced, it has one of two possible futures:\n // 1. We reconnect and see the proposal was sequenced in the meantime.\n // -> The promise can still resolve, once it is approved.\n // 2. We reconnect and see the proposal was not sequenced in the meantime, so it will never sequence.\n // -> The promise rejects.\n const disconnectedHandler = () => {\n // If we haven't seen the ack by the time we disconnect, we hope to see it by the time we reconnect.\n if (thisProposalSequenceNumber === undefined) {\n this.stateEvents.once(\"connected\", () => {\n // If we don't see the ack by the time reconnection finishes, it failed to send.\n if (thisProposalSequenceNumber === undefined) {\n reject(new Error(\"Client disconnected without successfully sending proposal\"));\n removeListeners();\n }\n });\n }\n };\n // If the QuorumProposals is disposed of, we assume something catastrophic has happened\n // All outstanding proposals are considered rejected.\n const disposedHandler = () => {\n reject(new Error(\"QuorumProposals was disposed\"));\n removeListeners();\n };\n // Convenience function to clean up our listeners.\n const removeListeners = () => {\n this.stateEvents.off(\"localProposalSequenced\", localProposalSequencedHandler);\n this.stateEvents.off(\"localProposalApproved\", localProposalApprovedHandler);\n this.stateEvents.off(\"disconnected\", disconnectedHandler);\n this.stateEvents.off(\"disposed\", disposedHandler);\n };\n this.stateEvents.on(\"localProposalSequenced\", localProposalSequencedHandler);\n this.stateEvents.on(\"disconnected\", disconnectedHandler);\n this.stateEvents.on(\"disposed\", disposedHandler);\n });\n }\n /**\n * Begins tracking a new proposal\n */\n addProposal(key, value, sequenceNumber, local, clientSequenceNumber) {\n assert(!this.proposals.has(sequenceNumber), 0x9a4 /* sequenceNumber not found */);\n const proposal = new PendingProposal(sequenceNumber, key, value, local);\n this.proposals.set(sequenceNumber, proposal);\n // Legacy event, from rejection support. May still have some use for clients to learn that a proposal is\n // likely to be approved soon.\n this.emit(\"addProposal\", proposal);\n if (local) {\n this.stateEvents.emit(\"localProposalSequenced\", clientSequenceNumber, sequenceNumber);\n }\n // clear the proposal cache\n this.proposalsSnapshotCache = undefined;\n }\n /**\n * Updates the minimum sequence number. If the MSN advances past the sequence number for any proposal then it\n * becomes an approved value.\n */\n updateMinimumSequenceNumber(message) {\n const msn = message.minimumSequenceNumber;\n // Accept proposals proposals whose sequenceNumber is <= the minimumSequenceNumber\n // Return a sorted list of approved proposals. We sort so that we apply them in their sequence number order\n // TODO this can be optimized if necessary to avoid the linear search+sort\n const completed = [];\n for (const [sequenceNumber, proposal] of this.proposals) {\n if (sequenceNumber <= msn) {\n completed.push(proposal);\n }\n }\n completed.sort((a, b) => a.sequenceNumber - b.sequenceNumber);\n for (const proposal of completed) {\n const committedProposal = {\n approvalSequenceNumber: message.sequenceNumber,\n // No longer used. We still stamp a -1 for compat with older versions of the quorum.\n // Can be removed after 0.1035 and higher is ubiquitous.\n commitSequenceNumber: -1,\n key: proposal.key,\n sequenceNumber: proposal.sequenceNumber,\n value: proposal.value,\n };\n this.values.set(committedProposal.key, committedProposal);\n // clear the values cache\n this.valuesSnapshotCache = undefined;\n // check if there are multiple proposals with matching keys\n let proposalSettled = false;\n let proposalKeySeen = false;\n for (const [, p] of this.proposals) {\n if (p.key === committedProposal.key) {\n if (proposalKeySeen) {\n // set proposalSettled to false if matching proposal key is not unique\n proposalSettled = false;\n break;\n }\n else {\n // set proposalSettled to true if the proposal key match is unique thus far\n proposalSettled = true;\n }\n proposalKeySeen = true;\n }\n }\n this.emit(\"approveProposal\", committedProposal.sequenceNumber, committedProposal.key, committedProposal.value, committedProposal.approvalSequenceNumber);\n // emit approveProposalComplete when all pending proposals are processed\n if (proposalSettled) {\n this.emit(\"approveProposalComplete\", committedProposal.sequenceNumber, committedProposal.key, committedProposal.value, committedProposal.approvalSequenceNumber);\n }\n this.proposals.delete(proposal.sequenceNumber);\n // clear the proposals cache\n this.proposalsSnapshotCache = undefined;\n if (proposal.local) {\n this.stateEvents.emit(\"localProposalApproved\", proposal.sequenceNumber);\n }\n }\n }\n setConnectionState(connected) {\n if (connected) {\n this.stateEvents.emit(\"connected\");\n }\n else {\n this.stateEvents.emit(\"disconnected\");\n }\n }\n dispose() {\n this.isDisposed = true;\n this.stateEvents.emit(\"disposed\");\n }\n}\n/**\n * A quorum represents all clients currently within the collaboration window. As well as the values\n * they have agreed upon and any pending proposals.\n * @internal\n */\nexport class Quorum extends TypedEventEmitter {\n get disposed() {\n return this.isDisposed;\n }\n constructor(members, proposals, values, sendProposal) {\n super();\n this.isDisposed = false;\n this.quorumClients = new QuorumClients(members);\n this.quorumClients.on(\"addMember\", (clientId, details) => {\n this.emit(\"addMember\", clientId, details);\n });\n this.quorumClients.on(\"removeMember\", (clientId) => {\n this.emit(\"removeMember\", clientId);\n });\n this.quorumProposals = new QuorumProposals({ proposals, values }, sendProposal);\n this.quorumProposals.on(\"addProposal\", (proposal) => {\n this.emit(\"addProposal\", proposal);\n });\n this.quorumProposals.on(\"approveProposal\", (sequenceNumber, key, value, approvalSequenceNumber) => {\n this.emit(\"approveProposal\", sequenceNumber, key, value, approvalSequenceNumber);\n });\n }\n close() {\n this.removeAllListeners();\n }\n /**\n * Snapshots the entire quorum\n * @returns a quorum snapshot\n */\n snapshot() {\n const members = this.quorumClients.snapshot();\n const { proposals, values } = this.quorumProposals.snapshot();\n return {\n members,\n proposals,\n values,\n };\n }\n /**\n * Returns whether the quorum has achieved a consensus for the given key.\n */\n has(key) {\n return this.quorumProposals.has(key);\n }\n /**\n * Returns the consensus value for the given key\n */\n get(key) {\n return this.quorumProposals.get(key);\n }\n /**\n * Adds a new client to the quorum\n */\n addMember(clientId, details) {\n this.quorumClients.addMember(clientId, details);\n }\n /**\n * Removes a client from the quorum\n */\n removeMember(clientId) {\n this.quorumClients.removeMember(clientId);\n }\n /**\n * Retrieves all the members in the quorum\n */\n getMembers() {\n return this.quorumClients.getMembers();\n }\n /**\n * Retrieves a specific member of the quorum\n */\n getMember(clientId) {\n return this.quorumClients.getMember(clientId);\n }\n /**\n * Proposes a new value. Returns a promise that will resolve when the proposal is either accepted, or reject if\n * the proposal fails to send.\n */\n async propose(key, value) {\n return this.quorumProposals.propose(key, value);\n }\n /**\n * Begins tracking a new proposal\n */\n addProposal(key, value, sequenceNumber, local, clientSequenceNumber) {\n return this.quorumProposals.addProposal(key, value, sequenceNumber, local, clientSequenceNumber);\n }\n /**\n * Updates the minimum sequence number. If the MSN advances past the sequence number for any proposal then it\n * becomes an approved value.\n */\n updateMinimumSequenceNumber(message) {\n this.quorumProposals.updateMinimumSequenceNumber(message);\n }\n setConnectionState(connected, clientId) {\n this.quorumProposals.setConnectionState(connected);\n }\n dispose() {\n throw new Error(\"Not implemented.\");\n }\n}\n//# sourceMappingURL=quorum.js.map","/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\nimport { MessageType, } from \"@fluidframework/driver-definitions/internal\";\nimport { Quorum } from \"./quorum.js\";\n/**\n * Handles protocol specific ops.\n * @internal\n */\nexport class ProtocolOpHandler {\n get quorum() {\n return this._quorum;\n }\n constructor(minimumSequenceNumber, sequenceNumber, members, proposals, values, sendProposal) {\n this.minimumSequenceNumber = minimumSequenceNumber;\n this.sequenceNumber = sequenceNumber;\n this._quorum = new Quorum(members, proposals, values, sendProposal);\n }\n get attributes() {\n return {\n minimumSequenceNumber: this.minimumSequenceNumber,\n sequenceNumber: this.sequenceNumber,\n };\n }\n setConnectionState(connected, clientId) {\n this._quorum.setConnectionState(connected, clientId);\n }\n snapshot() {\n return this._quorum.snapshot();\n }\n close() {\n this._quorum.close();\n }\n processMessage(message, local) {\n // verify it's moving sequentially\n if (message.sequenceNumber !== this.sequenceNumber + 1) {\n throw new Error(`Protocol state is not moving sequentially. ` +\n `Current is ${this.sequenceNumber}. Next is ${message.sequenceNumber}`);\n }\n // Update tracked sequence numbers\n this.sequenceNumber = message.sequenceNumber;\n this.minimumSequenceNumber = message.minimumSequenceNumber;\n let immediateNoOp = false;\n switch (message.type) {\n case MessageType.ClientJoin: {\n const systemJoinMessage = message;\n const join = JSON.parse(systemJoinMessage.data);\n const member = {\n client: join.detail,\n sequenceNumber: systemJoinMessage.sequenceNumber,\n };\n this._quorum.addMember(join.clientId, member);\n break;\n }\n case MessageType.ClientLeave: {\n const systemLeaveMessage = message;\n const clientId = JSON.parse(systemLeaveMessage.data);\n this._quorum.removeMember(clientId);\n break;\n }\n case MessageType.Propose: {\n // DeltaManager is no longer parsing the contents, so we expect this to be a string here\n // (However, switching this to an assert caused some tests to fail, apparently due to the same\n // message object being processed multiple times - So we will retain the typeof check for now)\n if (typeof message.contents === \"string\") {\n message.contents = JSON.parse(message.contents);\n }\n const proposal = message.contents;\n this._quorum.addProposal(proposal.key, proposal.value, message.sequenceNumber, local, message.clientSequenceNumber);\n // On a quorum proposal, immediately send a response to expedite the approval.\n immediateNoOp = true;\n break;\n }\n default:\n }\n // Notify the quorum of the MSN from the message. We rely on it to handle duplicate values but may\n // want to move that logic to this class.\n this._quorum.updateMinimumSequenceNumber(message);\n return { immediateNoOp };\n }\n /**\n * Gets the scribe protocol state\n * @param scrubUserData - whether to remove all user data from the quorum members. CAUTION: this will corrupt the quorum if used in a summary.\n */\n getProtocolState(scrubUserData = false) {\n // return a new object every time\n // this ensures future state changes will not affect outside callers\n const snapshot = this._quorum.snapshot();\n if (scrubUserData) {\n // In place, remove any identifying client information\n snapshot.members = snapshot.members.map(([id, sequencedClient]) => [\n id,\n {\n ...sequencedClient,\n client: {\n ...sequencedClient.client,\n user: { id: \"\" },\n },\n },\n ]);\n }\n return {\n sequenceNumber: this.sequenceNumber,\n minimumSequenceNumber: this.minimumSequenceNumber,\n ...snapshot,\n };\n }\n}\n//# sourceMappingURL=protocol.js.map","/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\nimport { MessageType, } from \"@fluidframework/driver-definitions/internal\";\nimport { canBeCoalescedByService } from \"@fluidframework/driver-utils/internal\";\nimport { ProtocolOpHandler } from \"./protocol/index.js\";\n// ADO: #1986: Start using enum from protocol-base.\nexport var SignalType;\n(function (SignalType) {\n SignalType[\"ClientJoin\"] = \"join\";\n SignalType[\"ClientLeave\"] = \"leave\";\n SignalType[\"Clear\"] = \"clear\";\n})(SignalType || (SignalType = {}));\nexport class ProtocolHandler extends ProtocolOpHandler {\n constructor(attributes, quorumSnapshot, \n // TODO: use a real type (breaking change)\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n sendProposal, audience, shouldClientHaveLeft) {\n super(attributes.minimumSequenceNumber, attributes.sequenceNumber, quorumSnapshot.members, quorumSnapshot.proposals, quorumSnapshot.values, sendProposal);\n this.audience = audience;\n this.shouldClientHaveLeft = shouldClientHaveLeft;\n for (const [clientId, member] of this.quorum.getMembers()) {\n audience.addMember(clientId, member.client);\n }\n // Join / leave signals are ignored for \"write\" clients in favor of join / leave ops\n this.quorum.on(\"addMember\", (clientId, details) => audience.addMember(clientId, details.client));\n this.quorum.on(\"removeMember\", (clientId) => audience.removeMember(clientId));\n }\n processMessage(message, local) {\n // Check and report if we're getting messages from a clientId that we previously\n // flagged as shouldHaveLeft, or from a client that's not in the quorum but should be\n // eslint-disable-next-line unicorn/no-null\n if (message.clientId != null) {\n const client = this.quorum.getMember(message.clientId);\n if (client === undefined && message.type !== MessageType.ClientJoin) {\n // pre-0.58 error message: messageClientIdMissingFromQuorum\n throw new Error(\"Remote message's clientId is missing from the quorum\");\n }\n // Here checking canBeCoalescedByService is used as an approximation of \"is benign to process despite being unexpected\".\n // It's still not good to see these messages from unexpected clientIds, but since they don't harm the integrity of the\n // document we don't need to blow up aggressively.\n if (this.shouldClientHaveLeft(message.clientId) && !canBeCoalescedByService(message)) {\n // pre-0.58 error message: messageClientIdShouldHaveLeft\n throw new Error(\"Remote message's clientId already should have left\");\n }\n }\n return super.processMessage(message, local);\n }\n processSignal(message) {\n const innerContent = message.content;\n switch (innerContent.type) {\n case SignalType.Clear: {\n const members = this.audience.getMembers();\n for (const [clientId, client] of members) {\n if (client.mode === \"read\") {\n this.audience.removeMember(clientId);\n }\n }\n break;\n }\n case SignalType.ClientJoin: {\n const newClient = innerContent.content;\n // Ignore write clients - quorum will control such clients.\n if (newClient.client.mode === \"read\") {\n this.audience.addMember(newClient.clientId, newClient.client);\n }\n break;\n }\n case SignalType.ClientLeave: {\n const leftClientId = innerContent.content;\n // Ignore write clients - quorum will control such clients.\n if (this.audience.getMember(leftClientId)?.mode === \"read\") {\n this.audience.removeMember(leftClientId);\n }\n break;\n }\n default: {\n break;\n }\n }\n }\n}\n/**\n * Function to check whether the protocol handler should process the Signal.\n * The protocol handler should strictly handle only ClientJoin, ClientLeave\n * and Clear signal types.\n */\nexport function protocolHandlerShouldProcessSignal(message) {\n // Signal originates from server\n if (message.clientId === null) {\n const innerContent = message.content;\n return (innerContent.type === SignalType.Clear ||\n innerContent.type === SignalType.ClientJoin ||\n innerContent.type === SignalType.ClientLeave);\n }\n return false;\n}\n//# sourceMappingURL=protocol.js.map","/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\nimport { TypedEventEmitter, performanceNow } from \"@fluid-internal/client-utils\";\nimport { LogLevel, } from \"@fluidframework/core-interfaces\";\nimport { assert } from \"@fluidframework/core-utils/internal\";\nimport { DriverErrorTypes, MessageType, ScopeType, } from \"@fluidframework/driver-definitions/internal\";\nimport { calculateMaxWaitTime, canRetryOnError, createGenericNetworkError, createWriteError, getRetryDelayFromError, isRuntimeMessage, logNetworkFailure, } from \"@fluidframework/driver-utils/internal\";\nimport { GenericError, UsageError, formatTick, generateStack, isFluidError, normalizeError, } from \"@fluidframework/telemetry-utils/internal\";\nimport { ReconnectMode, } from \"./contracts.js\";\nimport { DeltaQueue } from \"./deltaQueue.js\";\nimport { SignalType } from \"./protocol.js\";\nimport { isDeltaStreamConnectionForbiddenError } from \"./utils.js\";\n// We double this value in first try in when we calculate time to wait for in \"calculateMaxWaitTime\" function.\nconst InitialReconnectDelayInMs = 500;\nconst DefaultChunkSize = 16 * 1024;\nconst fatalConnectErrorProp = { fatalConnectError: true };\nfunction getNackReconnectInfo(nackContent) {\n const message = `Nack (${nackContent.type}): ${nackContent.message}`;\n const canRetry = nackContent.code !== 403;\n const retryAfterMs = nackContent.retryAfter === undefined ? undefined : nackContent.retryAfter * 1000;\n return createGenericNetworkError(message, { canRetry, retryAfterMs }, { statusCode: nackContent.code, driverVersion: undefined });\n}\n/**\n * Implementation of IDocumentDeltaConnection that does not support submitting\n * or receiving ops. Used in storage-only mode.\n */\nconst clientNoDeltaStream = {\n mode: \"read\",\n details: { capabilities: { interactive: true } },\n permission: [],\n user: { id: \"storage-only client\" }, // we need some \"fake\" ID here.\n scopes: [],\n};\nconst clientIdNoDeltaStream = \"storage-only client\";\nclass NoDeltaStream extends TypedEventEmitter {\n /**\n * Connection which is not connected to socket.\n * @param storageOnlyReason - Reason on why the connection to delta stream is not allowed.\n * @param readonlyConnectionReason - reason/error if any which lead to using NoDeltaStream.\n */\n constructor(storageOnlyReason, readonlyConnectionReason) {\n super();\n this.storageOnlyReason = storageOnlyReason;\n this.readonlyConnectionReason = readonlyConnectionReason;\n this.clientId = clientIdNoDeltaStream;\n // eslint-disable-next-line @typescript-eslint/consistent-type-assertions\n this.claims = {\n scopes: [ScopeType.DocRead],\n };\n this.mode = \"read\";\n this.existing = true;\n this.maxMessageSize = 0;\n this.version = \"\";\n this.initialMessages = [];\n this.initialSignals = [];\n this.initialClients = [\n { client: clientNoDeltaStream, clientId: clientIdNoDeltaStream },\n ];\n this.serviceConfiguration = {\n maxMessageSize: 0,\n blockSize: 0,\n };\n this.checkpointSequenceNumber = undefined;\n this._disposed = false;\n }\n submit(messages) {\n this.emit(\"nack\", this.clientId, messages.map((operation) => {\n return {\n operation,\n content: { message: \"Cannot submit with storage-only connection\", code: 403 },\n };\n }));\n }\n submitSignal(message) {\n this.emit(\"nack\", this.clientId, {\n operation: message,\n content: { message: \"Cannot submit signal with storage-only connection\", code: 403 },\n });\n }\n get disposed() {\n return this._disposed;\n }\n dispose() {\n this._disposed = true;\n }\n}\nfunction isNoDeltaStreamConnection(connection) {\n return connection instanceof NoDeltaStream;\n}\nconst waitForOnline = async () => {\n // Only wait if we have a strong signal that we're offline - otherwise assume we're online.\n if (globalThis.navigator?.onLine === false && globalThis.addEventListener !== undefined) {\n return new Promise((resolve) => {\n const resolveAndRemoveListener = () => {\n resolve();\n globalThis.removeEventListener(\"online\", resolveAndRemoveListener);\n };\n globalThis.addEventListener(\"online\", resolveAndRemoveListener);\n });\n }\n};\n/**\n * Implementation of IConnectionManager, used by Container class\n * Implements constant connectivity to relay service, by reconnecting in case of lost connection or error.\n * Exposes various controls to influence this process, including manual reconnects, forced read-only mode, etc.\n */\nexport class ConnectionManager {\n get connectionVerboseProps() {\n return this._connectionVerboseProps;\n }\n /**\n * The current connection mode, initially read.\n */\n get connectionMode() {\n return this.connection?.mode ?? \"read\";\n }\n get connected() {\n return this.connection !== undefined;\n }\n get clientId() {\n return this.connection?.clientId;\n }\n /**\n * Details about connection. Returns undefined if there is no active connection.\n */\n get connectionDetails() {\n return this._connectionDetails;\n }\n /**\n * Automatic reconnecting enabled or disabled.\n * If set to Never, then reconnecting will never be allowed.\n */\n get reconnectMode() {\n return this._reconnectMode;\n }\n get maxMessageSize() {\n return this.connection?.serviceConfiguration?.maxMessageSize ?? DefaultChunkSize;\n }\n get version() {\n if (this.connection === undefined) {\n throw new Error(\"Cannot check version without a connection\");\n }\n return this.connection.version;\n }\n get serviceConfiguration() {\n return this.connection?.serviceConfiguration;\n }\n get scopes() {\n return this.connection?.claims.scopes;\n }\n get outbound() {\n return this._outbound;\n }\n /**\n * Returns set of props that can be logged in telemetry that provide some insights / statistics\n * about current or last connection (if there is no connection at the moment)\n */\n get connectionProps() {\n return this.connection === undefined\n ? {\n ...this._connectionProps,\n // Report how many ops this client sent in last disconnected session\n sentOps: this.clientSequenceNumber,\n }\n : this._connectionProps;\n }\n shouldJoinWrite() {\n // We don't have to wait for ack for topmost NoOps. So subtract those.\n const outstandingOps = this.clientSequenceNumberObserved < this.clientSequenceNumber - this.localOpsToIgnore;\n // Previous behavior was to force write mode here only when there are outstanding ops (besides\n // no-ops). The dirty signal from runtime should provide the same behavior, but also support\n // stashed ops that weren't submitted to container layer yet. For safety, we want to retain the\n // same behavior whenever dirty is false.\n const isDirty = this.containerDirty();\n if (outstandingOps !== isDirty) {\n this.logger.sendTelemetryEvent({\n eventName: \"DesiredConnectionModeMismatch\",\n details: JSON.stringify({ outstandingOps, isDirty }),\n });\n }\n return outstandingOps || isDirty;\n }\n /**\n * Tells if container is in read-only mode.\n * Data stores should listen for \"readonly\" notifications and disallow user\n * making changes to data stores.\n * Readonly state can be because of no storage write permission,\n * or due to host forcing readonly mode for container.\n * It is undefined if we have not yet established websocket connection\n * and do not know if user has write access to a file.\n */\n get readonly() {\n return this.readOnlyInfo.readonly;\n }\n get readOnlyInfo() {\n let storageOnly = false;\n let storageOnlyReason;\n if (isNoDeltaStreamConnection(this.connection)) {\n storageOnly = true;\n storageOnlyReason = this.connection.storageOnlyReason;\n }\n if (storageOnly || this._forceReadonly || this._readonlyPermissions === true) {\n return {\n readonly: true,\n forced: this._forceReadonly,\n permissions: this._readonlyPermissions,\n storageOnly,\n storageOnlyReason,\n };\n }\n return { readonly: this._readonlyPermissions };\n }\n static detailsFromConnection(connection, reason) {\n return {\n claims: connection.claims,\n clientId: connection.clientId,\n checkpointSequenceNumber: connection.checkpointSequenceNumber,\n get initialClients() {\n return connection.initialClients;\n },\n mode: connection.mode,\n serviceConfiguration: connection.serviceConfiguration,\n version: connection.version,\n reason,\n };\n }\n constructor(serviceProvider, containerDirty, client, reconnectAllowed, logger, props) {\n this.serviceProvider = serviceProvider;\n this.containerDirty = containerDirty;\n this.client = client;\n this.logger = logger;\n this.props = props;\n /**\n * tracks host requiring read-only mode.\n */\n this._forceReadonly = false;\n /**\n * True if there is pending (async) reconnection from \"read\" to \"write\"\n */\n this.pendingReconnect = false;\n this.clientSequenceNumber = 0;\n this.clientSequenceNumberObserved = 0;\n /**\n * Counts the number of non-runtime ops sent by the client which may not be acked.\n */\n this.localOpsToIgnore = 0;\n this.connectFirstConnection = true;\n this._connectionVerboseProps = {};\n this._connectionProps = {};\n this._disposed = false;\n this.opHandler = (documentId, messagesArg) => {\n const messages = Array.isArray(messagesArg) ? messagesArg : [messagesArg];\n this.props.incomingOpHandler(messages, \"opHandler\");\n };\n this.signalHandler = (signalsArg) => {\n const signals = Array.isArray(signalsArg) ? signalsArg : [signalsArg];\n this.props.signalHandler(signals);\n };\n // Always connect in write mode after getting nacked.\n this.nackHandler = (documentId, messages) => {\n const message = messages[0];\n if (this._readonlyPermissions === true) {\n this.props.closeHandler(createWriteError(\"writeOnReadOnlyDocument\", { driverVersion: undefined }));\n return;\n }\n const reconnectInfo = getNackReconnectInfo(message.content);\n // If the nack indicates we cannot retry, then close the container outright\n if (!reconnectInfo.canRetry) {\n this.props.closeHandler(reconnectInfo);\n return;\n }\n this.reconnectOnError(\"write\", reconnectInfo);\n };\n // Connection mode is always read on disconnect/error unless the system mode was write.\n this.disconnectHandlerInternal = (disconnectReason) => {\n // Note: we might get multiple disconnect calls on same socket, as early disconnect notification\n // (\"server_disconnect\", ODSP-specific) is mapped to \"disconnect\"\n this.reconnectOnError(this.defaultReconnectionMode, disconnectReason);\n };\n this.errorHandler = (error) => {\n this.reconnectOnError(this.defaultReconnectionMode, error);\n };\n this.clientDetails = this.client.details;\n this.defaultReconnectionMode = this.client.mode;\n this._reconnectMode = reconnectAllowed ? ReconnectMode.Enabled : ReconnectMode.Never;\n // Outbound message queue. The outbound queue is represented as a queue of an array of ops. Ops contained\n // within an array *must* fit within the maxMessageSize and are guaranteed to be ordered sequentially.\n this._outbound = new DeltaQueue((messages) => {\n if (this.connection === undefined) {\n throw new Error(\"Attempted to submit an outbound message without connection\");\n }\n this.connection.submit(messages);\n });\n this._outbound.on(\"error\", (error) => {\n this.props.closeHandler(normalizeError(error));\n });\n }\n dispose(error, switchToReadonly = true) {\n if (this._disposed) {\n return;\n }\n this._disposed = true;\n // Ensure that things like triggerConnect() will short circuit\n this._reconnectMode = ReconnectMode.Never;\n this._outbound.clear();\n const disconnectReason = {\n text: \"Closing DeltaManager\",\n error,\n };\n const oldReadonlyValue = this.readonly;\n // This raises \"disconnect\" event if we have active connection.\n this.disconnectFromDeltaStream(disconnectReason);\n if (switchToReadonly) {\n // Notify everyone we are in read-only state.\n // Useful for data stores in case we hit some critical error,\n // to switch to a mode where user edits are not accepted\n this.set_readonlyPermissions(true, oldReadonlyValue, disconnectReason);\n }\n }\n /**\n * Enables or disables automatic reconnecting.\n * Will throw an error if reconnectMode set to Never.\n */\n setAutoReconnect(mode, reason) {\n assert(mode !== ReconnectMode.Never && this._reconnectMode !== ReconnectMode.Never, 0x278 /* \"API is not supported for non-connecting or closed container\" */);\n this._reconnectMode = mode;\n if (mode !== ReconnectMode.Enabled) {\n // immediately disconnect - do not rely on service eventually dropping connection.\n this.disconnectFromDeltaStream(reason);\n }\n }\n /**\n * {@inheritDoc Container.forceReadonly}\n */\n forceReadonly(readonly) {\n if (readonly !== this._forceReadonly) {\n this.logger.sendTelemetryEvent({\n eventName: \"ForceReadOnly\",\n value: readonly,\n });\n }\n const oldValue = this.readonly;\n this._forceReadonly = readonly;\n if (oldValue !== this.readonly) {\n if (this._reconnectMode === ReconnectMode.Never) {\n throw new UsageError(\"API is not supported for non-connecting or closed container\");\n }\n let reconnect = false;\n if (this.readonly === true) {\n // If we switch to readonly while connected, we should disconnect first\n // See comment in the \"readonly\" event handler to deltaManager set up by\n // the ContainerRuntime constructor\n if (this.shouldJoinWrite()) {\n // If we have pending changes, then we will never send them - it smells like\n // host logic error.\n this.logger.sendErrorEvent({ eventName: \"ForceReadonlyPendingChanged\" });\n }\n reconnect = this.disconnectFromDeltaStream({ text: \"Force readonly\" });\n }\n this.props.readonlyChangeHandler(this.readonly);\n if (reconnect) {\n // reconnect if we disconnected from before.\n this.triggerConnect({ text: \"Force Readonly\" }, \"read\");\n }\n }\n }\n set_readonlyPermissions(newReadonlyValue, oldReadonlyValue, readonlyConnectionReason) {\n this._readonlyPermissions = newReadonlyValue;\n if (oldReadonlyValue !== this.readonly) {\n this.props.readonlyChangeHandler(this.readonly, readonlyConnectionReason);\n }\n }\n connect(reason, connectionMode) {\n this.connectCore(reason, connectionMode).catch((error) => {\n const normalizedError = normalizeError(error, { props: fatalConnectErrorProp });\n this.props.closeHandler(normalizedError);\n });\n }\n async connectCore(reason, connectionMode) {\n assert(!this._disposed, 0x26a /* \"not closed\" */);\n let requestedMode = connectionMode ?? this.defaultReconnectionMode;\n // if we have any non-acked ops from last connection, reconnect as \"write\".\n // without that we would connect in view-only mode, which will result in immediate\n // firing of \"connected\" event from Container and switch of current clientId (as tracked\n // by all DDSes). This will make it impossible to figure out if ops actually made it through,\n // so DDSes will immediately resubmit all pending ops, and some of them will be duplicates, corrupting document\n if (this.shouldJoinWrite()) {\n requestedMode = \"write\";\n }\n if (this.connection !== undefined || this.pendingConnection !== undefined) {\n // Connection attempt already completed successfully or is in progress\n // In general, there should be no issues if the modes do not match:\n // If at some point it was Ok to connect as \"read\" (i.e. there were no pending ops we had to track),\n // then it should be Ok to use \"read\" connection even if for some reason request came in to connect as \"write\"\n // (though that should never happen)\n // The opposite should be fine as well: we may have had idle \"write\" connection, and request to reconnect came in,\n // using default \"read\" mode.\n // That all said, let's understand better where such mismatches are coming from.\n const mode = this.connection?.mode ?? this.pendingConnection?.connectionMode;\n if (mode !== requestedMode) {\n this.logger.sendTelemetryEvent({\n eventName: \"ConnectionModeMismatch\",\n connected: this.connection !== undefined,\n mode,\n requestedMode,\n stack: generateStack(),\n });\n }\n return;\n }\n const docService = this.serviceProvider();\n assert(docService !== undefined, 0x2a7 /* \"Container is not attached\" */);\n this.props.establishConnectionHandler(reason);\n let connection;\n if (docService.policies?.storageOnly === true) {\n connection = new NoDeltaStream();\n this.setupNewSuccessfulConnection(connection, \"read\", reason);\n assert(this.pendingConnection === undefined, 0x2b3 /* \"logic error\" */);\n return;\n }\n let delayMs = InitialReconnectDelayInMs;\n let connectRepeatCount = 0;\n const connectStartTime = performanceNow();\n let lastError;\n const abortController = new AbortController();\n const abortSignal = abortController.signal;\n this.pendingConnection = {\n abort: () => {\n abortController.abort();\n },\n connectionMode: requestedMode,\n };\n // This loop will keep trying to connect until successful, with a delay between each iteration.\n while (connection === undefined) {\n if (this._disposed) {\n throw new Error(\"Attempting to connect a closed DeltaManager\");\n }\n if (abortSignal.aborted === true) {\n this.logger.sendTelemetryEvent({\n eventName: \"ConnectionAttemptCancelled\",\n attempts: connectRepeatCount,\n duration: formatTick(performanceNow() - connectStartTime),\n connectionEstablished: false,\n });\n return;\n }\n connectRepeatCount++;\n try {\n this.client.mode = requestedMode;\n connection = await docService.connectToDeltaStream({\n ...this.client,\n mode: requestedMode,\n });\n if (connection.disposed) {\n // Nobody observed this connection, so drop it on the floor and retry.\n this.logger.sendTelemetryEvent({ eventName: \"ReceivedClosedConnection\" });\n connection = undefined;\n }\n this.logger.sendTelemetryEvent({\n eventName: \"ConnectionReceived\",\n connected: connection !== undefined && connection.disposed === false,\n }, undefined, LogLevel.verbose);\n }\n catch (origError) {\n this.logger.sendTelemetryEvent({\n eventName: \"ConnectToDeltaStreamException\",\n connected: connection !== undefined && connection.disposed === false,\n }, undefined, LogLevel.verbose);\n if (isDeltaStreamConnectionForbiddenError(origError)) {\n connection = new NoDeltaStream(origError.storageOnlyReason, {\n text: origError.message,\n error: origError,\n });\n requestedMode = \"read\";\n break;\n }\n else if (isFluidError(origError) &&\n origError.errorType === DriverErrorTypes.outOfStorageError) {\n // If we get out of storage error from calling joinsession, then use the NoDeltaStream object so\n // that user can at least load the container.\n connection = new NoDeltaStream(undefined, {\n text: origError.message,\n error: origError,\n });\n requestedMode = \"read\";\n break;\n }\n // Socket.io error when we connect to wrong socket, or hit some multiplexing bug\n if (!canRetryOnError(origError)) {\n const error = normalizeError(origError, { props: fatalConnectErrorProp });\n this.props.closeHandler(error);\n throw error;\n }\n // Since the error is retryable this will not log to the error table\n logNetworkFailure(this.logger, {\n attempts: connectRepeatCount,\n delay: delayMs, // milliseconds\n eventName: \"DeltaConnectionFailureToConnect\",\n duration: formatTick(performanceNow() - connectStartTime),\n }, origError);\n lastError = origError;\n // We will not perform retries if the container disconnected and the ReconnectMode is set to Disabled or Never\n // so break out of the re-connecting while-loop after first attempt\n if (this.reconnectMode !== ReconnectMode.Enabled) {\n return;\n }\n const waitStartTime = performanceNow();\n const retryDelayFromError = getRetryDelayFromError(origError);\n // If the error told us to wait or browser signals us that we are offline, then calculate the time we\n // want to wait for before retrying. then we wait for that time. If the error didn't tell us to wait,\n // let's still wait a little bit before retrying. We can skip this delay if we're confident we're offline,\n // because we probably just need to wait to come back online. But we never have strong signal of being\n // offline, so we at least wait for sometime.\n if (retryDelayFromError !== undefined || globalThis.navigator?.onLine !== false) {\n delayMs = calculateMaxWaitTime(delayMs, origError);\n }\n // Raise event in case the delay was there from the error.\n if (retryDelayFromError !== undefined) {\n this.props.reconnectionDelayHandler(delayMs, origError);\n }\n await new Promise((resolve) => {\n setTimeout(resolve, delayMs);\n });\n // If we believe we're offline, we assume there's no point in trying until we at least think we're online.\n // NOTE: This isn't strictly true for drivers that don't require network (e.g. local driver). Really this logic\n // should probably live in the driver.\n await waitForOnline();\n this.logger.sendPerformanceEvent({\n eventName: \"WaitBetweenConnectionAttempts\",\n duration: performanceNow() - waitStartTime,\n details: JSON.stringify({\n retryDelayFromError,\n delayMs,\n }),\n });\n }\n }\n // If we retried more than once, log an event about how long it took (this will not log to error table)\n if (connectRepeatCount > 1) {\n logNetworkFailure(this.logger, {\n eventName: \"MultipleDeltaConnectionFailures\",\n attempts: connectRepeatCount,\n duration: formatTick(performanceNow() - connectStartTime),\n }, lastError);\n }\n // Check for abort signal after while loop as well or we've been disposed\n if (abortSignal.aborted === true || this._disposed) {\n connection.dispose();\n this.logger.sendTelemetryEvent({\n eventName: \"ConnectionAttemptCancelled\",\n attempts: connectRepeatCount,\n duration: formatTick(performanceNow() - connectStartTime),\n connectionEstablished: true,\n });\n return;\n }\n this.setupNewSuccessfulConnection(connection, requestedMode, reason);\n }\n /**\n * Start the connection. Any error should result in container being closed.\n * And report the error if it escapes for any reason.\n * @param args - The connection arguments\n */\n triggerConnect(reason, connectionMode) {\n // reconnect() includes async awaits, and that causes potential race conditions\n // where we might already have a connection. If it were to happen, it's possible that we will connect\n // with different mode to `connectionMode`. Glancing through the caller chains, it looks like code should be\n // fine (if needed, reconnect flow will get triggered again). Places where new mode matters should encode it\n // directly in connectCore - see this.shouldJoinWrite() test as an example.\n // assert(this.connection === undefined, 0x239 /* \"called only in disconnected state\" */);\n if (this.reconnectMode !== ReconnectMode.Enabled) {\n return;\n }\n this.connect(reason, connectionMode);\n }\n /**\n * Disconnect the current connection.\n * @param reason - Text description of disconnect reason to emit with disconnect event\n * @param error - Error causing the disconnect if any.\n * @returns A boolean that indicates if there was an existing connection (or pending connection) to disconnect\n */\n disconnectFromDeltaStream(reason) {\n this.pendingReconnect = false;\n if (this.connection === undefined) {\n if (this.pendingConnection !== undefined) {\n this.cancelConnection(reason);\n return true;\n }\n return false;\n }\n assert(this.pendingConnection === undefined, 0x27b /* \"reentrancy may result in incorrect behavior\" */);\n const connection = this.connection;\n // Avoid any re-entrancy - clear object reference\n this.connection = undefined;\n this._connectionDetails = undefined;\n // Remove listeners first so we don't try to retrigger this flow accidentally through reconnectOnError\n connection.off(\"op\", this.opHandler);\n connection.off(\"signal\", this.signalHandler);\n connection.off(\"nack\", this.nackHandler);\n connection.off(\"disconnect\", this.disconnectHandlerInternal);\n connection.off(\"error\", this.errorHandler);\n connection.off(\"pong\", this.props.pongHandler);\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this._outbound.pause();\n this._outbound.clear();\n connection.dispose();\n this.props.disconnectHandler(reason);\n this._connectionVerboseProps = {};\n return true;\n }\n /**\n * Cancel in-progress connection attempt.\n */\n cancelConnection(reason) {\n assert(this.pendingConnection !== undefined, 0x345 /* this.pendingConnection is undefined when trying to cancel */);\n this.pendingConnection.abort();\n this.pendingConnection = undefined;\n this.logger.sendTelemetryEvent({\n eventName: \"ConnectionCancelReceived\",\n reason: reason.text,\n });\n this.props.cancelConnectionHandler({\n text: `Cancel Pending Connection due to ${reason.text}`,\n error: reason.error,\n });\n }\n /**\n * Once we've successfully gotten a connection, we need to set up state, attach event listeners, and process\n * initial messages.\n * @param connection - The newly established connection\n */\n setupNewSuccessfulConnection(connection, requestedMode, reason) {\n // Old connection should have been cleaned up before establishing a new one\n assert(this.connection === undefined, 0x0e6 /* \"old connection exists on new connection setup\" */);\n assert(!connection.disposed, 0x28a /* \"can't be disposed - Callers need to ensure that!\" */);\n this.pendingConnection = undefined;\n const oldReadonlyValue = this.readonly;\n this.connection = connection;\n // Does information in scopes & mode matches?\n // If we asked for \"write\" and got \"read\", then file is read-only\n // But if we ask read, server can still give us write.\n const readonlyPermission = !connection.claims.scopes.includes(ScopeType.DocWrite);\n if (connection.mode !== requestedMode) {\n this.logger.sendTelemetryEvent({\n eventName: \"ConnectionModeMismatch\",\n requestedMode,\n mode: connection.mode,\n });\n }\n assert(!readonlyPermission || this.connectionMode === \"read\", 0x0e8 /* \"readonly perf with write connection\" */);\n this.set_readonlyPermissions(readonlyPermission, oldReadonlyValue, isNoDeltaStreamConnection(connection) ? connection.readonlyConnectionReason : undefined);\n if (this._disposed) {\n // Raise proper events, Log telemetry event and close connection.\n this.disconnectFromDeltaStream({ text: \"ConnectionManager already closed\" });\n return;\n }\n this._outbound.resume();\n connection.on(\"op\", this.opHandler);\n connection.on(\"signal\", this.signalHandler);\n connection.on(\"nack\", this.nackHandler);\n connection.on(\"disconnect\", this.disconnectHandlerInternal);\n connection.on(\"error\", this.errorHandler);\n connection.on(\"pong\", this.props.pongHandler);\n // Initial messages are always sorted. However, due to early op handler installed by drivers and appending those\n // ops to initialMessages, resulting set is no longer sorted, which would result in client hitting storage to\n // fill in gap. We will recover by cancelling this request once we process remaining ops, but it's a waste that\n // we could avoid\n const initialMessages = connection.initialMessages.sort((a, b) => a.sequenceNumber - b.sequenceNumber);\n // Some storages may provide checkpointSequenceNumber to identify how far client is behind.\n let checkpointSequenceNumber = connection.checkpointSequenceNumber;\n this._connectionVerboseProps = {\n clientId: connection.clientId,\n mode: connection.mode,\n };\n // reset connection props\n this._connectionProps = {};\n if (connection.relayServiceAgent !== undefined) {\n this._connectionVerboseProps.relayServiceAgent = connection.relayServiceAgent;\n this._connectionProps.relayServiceAgent = connection.relayServiceAgent;\n }\n this._connectionProps.socketDocumentId = connection.claims.documentId;\n this._connectionProps.connectionMode = connection.mode;\n let last = -1;\n if (initialMessages.length > 0) {\n this._connectionVerboseProps.connectionInitialOpsFrom =\n initialMessages[0].sequenceNumber;\n last = initialMessages[initialMessages.length - 1].sequenceNumber;\n this._connectionVerboseProps.connectionInitialOpsTo = last + 1;\n // Update knowledge of how far we are behind, before raising \"connect\" event\n // This is duplication of what incomingOpHandler() does, but we have to raise event before we get there,\n // so duplicating update logic here as well.\n if (checkpointSequenceNumber === undefined || checkpointSequenceNumber < last) {\n checkpointSequenceNumber = last;\n }\n }\n this.props.incomingOpHandler(initialMessages, this.connectFirstConnection ? \"InitialOps\" : \"ReconnectOps\");\n this._connectionDetails = ConnectionManager.detailsFromConnection(connection, reason);\n this._connectionDetails.checkpointSequenceNumber = checkpointSequenceNumber;\n this.props.connectHandler(this._connectionDetails);\n this.connectFirstConnection = false;\n // Synthesize clear & join signals out of initialClients state.\n // This allows us to have single way to process signals, and makes it simpler to initialize\n // protocol in Container.\n const clearSignal = {\n // API uses null\n // eslint-disable-next-line unicorn/no-null\n clientId: null, // system message\n content: JSON.stringify({\n type: SignalType.Clear,\n }),\n };\n // list of signals to process due to this new connection\n let signalsToProcess = [clearSignal];\n const clientJoinSignals = (connection.initialClients ?? []).map((priorClient) => ({\n // API uses null\n // eslint-disable-next-line unicorn/no-null\n clientId: null, // system signal\n content: JSON.stringify({\n type: SignalType.ClientJoin,\n content: priorClient, // ISignalClient\n }),\n }));\n if (clientJoinSignals.length > 0) {\n signalsToProcess = [...signalsToProcess, ...clientJoinSignals];\n }\n // Unfortunately, there is no defined order between initialSignals (including join & leave signals)\n // and connection.initialClients. In practice, connection.initialSignals quite often contains join signal\n // for \"self\" and connection.initialClients does not contain \"self\", so we have to process them after\n // \"clear\" signal above.\n if (connection.initialSignals !== undefined && connection.initialSignals.length > 0) {\n signalsToProcess = [...signalsToProcess, ...connection.initialSignals];\n }\n this.props.signalHandler(signalsToProcess);\n }\n /**\n * Disconnect the current connection and reconnect. Closes the container if it fails.\n * @param connection - The connection that wants to reconnect - no-op if it's different from this.connection\n * @param requestedMode - Read or write\n * @param error - Error reconnect information including whether or not to reconnect\n * @returns A promise that resolves when the connection is reestablished or we stop trying\n */\n reconnectOnError(requestedMode, error) {\n this.reconnect(requestedMode, { text: error.message, error }).catch(this.props.closeHandler);\n }\n /**\n * Disconnect the current connection and reconnect.\n * @param connection - The connection that wants to reconnect - no-op if it's different from this.connection\n * @param requestedMode - Read or write\n * @param error - Error reconnect information including whether or not to reconnect\n * @returns A promise that resolves when the connection is reestablished or we stop trying\n */\n async reconnect(requestedMode, reason) {\n // We quite often get protocol errors before / after observing nack/disconnect\n // we do not want to run through same sequence twice.\n // If we're already disconnected/disconnecting it's not appropriate to call this again.\n assert(this.connection !== undefined, 0x0eb /* \"Missing connection for reconnect\" */);\n this.disconnectFromDeltaStream(reason);\n // We will always trigger reconnect, even if canRetry is false.\n // Any truly fatal error state will result in container close upon attempted reconnect,\n // which is a preferable to closing abruptly when a live connection fails.\n if (reason.error?.canRetry === false) {\n this.logger.sendTelemetryEvent({\n eventName: \"reconnectingDespiteFatalError\",\n reconnectMode: this.reconnectMode,\n }, reason.error);\n }\n if (this.reconnectMode === ReconnectMode.Never) {\n // Do not raise container error if we are closing just because we lost connection.\n // Those errors (like IdleDisconnect) would show up in telemetry dashboards and\n // are very misleading, as first initial reaction - some logic is broken.\n this.props.closeHandler();\n }\n // If closed then we can't reconnect\n if (this._disposed || this.reconnectMode !== ReconnectMode.Enabled) {\n return;\n }\n // If the error tells us to wait before retrying, then do so.\n const delayMs = getRetryDelayFromError(reason.error);\n if (reason.error !== undefined && delayMs !== undefined) {\n this.props.reconnectionDelayHandler(delayMs, reason.error);\n await new Promise((resolve) => {\n setTimeout(resolve, delayMs);\n });\n }\n // If we believe we're offline, we assume there's no point in trying again until we at least think we're online.\n // NOTE: This isn't strictly true for drivers that don't require network (e.g. local driver). Really this logic\n // should probably live in the driver.\n await waitForOnline();\n this.triggerConnect({\n text: reason.error === undefined\n ? `Reconnecting due to: ${reason.text}`\n : \"Reconnecting due to Error\",\n error: reason.error,\n }, requestedMode);\n }\n prepareMessageToSend(message) {\n if (this.readonly === true) {\n assert(this.readOnlyInfo.readonly === true, 0x1f0 /* \"Unexpected mismatch in readonly\" */);\n const error = new GenericError(\"deltaManagerReadonlySubmit\", undefined /* error */, {\n readonly: this.readOnlyInfo.readonly,\n forcedReadonly: this.readOnlyInfo.forced,\n readonlyPermissions: this.readOnlyInfo.permissions,\n storageOnly: this.readOnlyInfo.storageOnly,\n storageOnlyReason: this.readOnlyInfo.storageOnlyReason,\n });\n this.props.closeHandler(error);\n return undefined;\n }\n // reset clientSequenceNumber if we are using new clientId.\n // we keep info about old connection as long as possible to be able to account for all non-acked ops\n // that we pick up on next connection.\n assert(!!this.connection, 0x0e4 /* \"Lost old connection!\" */);\n if (this.lastSubmittedClientId !== this.connection?.clientId) {\n this.lastSubmittedClientId = this.connection?.clientId;\n this.clientSequenceNumber = 0;\n this.clientSequenceNumberObserved = 0;\n }\n if (isRuntimeMessage(message)) {\n this.localOpsToIgnore = 0;\n }\n else {\n this.localOpsToIgnore++;\n }\n return {\n ...message,\n clientSequenceNumber: ++this.clientSequenceNumber,\n };\n }\n submitSignal(content, targetClientId) {\n if (this.connection === undefined) {\n this.logger.sendErrorEvent({ eventName: \"submitSignalDisconnected\" });\n }\n else {\n this.connection.submitSignal(content, targetClientId);\n }\n }\n sendMessages(messages) {\n assert(this.connected, 0x2b4 /* \"not connected on sending ops!\" */);\n // If connection is \"read\" or implicit \"read\" (got leave op for \"write\" connection),\n // then op can't make it through - we will get a nack if op is sent.\n // We can short-circuit this process.\n // Note that we also want nacks to be rare and be treated as catastrophic failures.\n // Be careful with reentrancy though - disconnected event should not be be raised in the\n // middle of the current workflow, but rather on clean stack!\n if (this.connectionMode === \"read\") {\n if (!this.pendingReconnect) {\n this.pendingReconnect = true;\n Promise.resolve()\n .then(async () => {\n if (this.pendingReconnect) {\n // still valid?\n await this.reconnect(\"write\", // connectionMode\n { text: \"Switch to write\" });\n }\n })\n .catch(() => { });\n }\n return;\n }\n assert(!this.pendingReconnect, 0x2b5 /* \"logic error\" */);\n this._outbound.push(messages);\n }\n beforeProcessingIncomingOp(message) {\n // if we have connection, and message is local, then we better treat is as local!\n assert(this.clientId !== message.clientId || this.lastSubmittedClientId === message.clientId, 0x0ee /* \"Not accounting local messages correctly\" */);\n if (this.lastSubmittedClientId !== undefined &&\n this.lastSubmittedClientId === message.clientId) {\n const clientSequenceNumber = message.clientSequenceNumber;\n assert(this.clientSequenceNumberObserved < clientSequenceNumber, 0x0ef /* \"client seq# not growing\" */);\n assert(clientSequenceNumber <= this.clientSequenceNumber, 0x0f0 /* \"Incoming local client seq# > generated by this client\" */);\n this.clientSequenceNumberObserved = clientSequenceNumber;\n }\n if (message.type === MessageType.ClientLeave) {\n const systemLeaveMessage = message;\n const clientId = JSON.parse(systemLeaveMessage.data);\n if (clientId === this.clientId) {\n // We have been kicked out from quorum\n this.logger.sendPerformanceEvent({ eventName: \"ReadConnectionTransition\" });\n // Please see #8483 for more details on why maintaining connection further as is would not work.\n // Short story - connection properties are immutable, and many processes (consensus DDSes, summarizer)\n // assume that connection stays \"write\" connection until disconnect, and act accordingly, which may\n // not work well with de-facto \"read\" connection we are in after receiving own leave op on timeout.\n // Clients need to be able to transition to \"read\" state after some time of inactivity!\n // Note - this may close container!\n this.reconnect(\"read\", // connectionMode\n { text: \"Switch to read\" }).catch((error) => {\n this.logger.sendErrorEvent({ eventName: \"SwitchToReadConnection\" }, error);\n });\n }\n }\n }\n}\n//# sourceMappingURL=connectionManager.js.map","/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\nimport { assert } from \"./assert.js\";\nimport { Deferred } from \"./promises.js\";\nconst maxSetTimeoutMs = 0x7fffffff; // setTimeout limit is MAX_INT32=(2^31-1).\n/**\n * Sets timeouts like the setTimeout function allowing timeouts to exceed the setTimeout's max timeout limit.\n * Timeouts may not be exactly accurate due to browser implementations and the OS.\n * https://stackoverflow.com/questions/21097421/what-is-the-reason-javascript-settimeout-is-so-inaccurate\n * @param timeoutFn - Executed when the timeout expires\n * @param timeoutMs - Duration of the timeout in milliseconds\n * @param setTimeoutIdFn - Executed to update the timeout if multiple timeouts are required when\n * timeoutMs greater than maxTimeout\n * @returns The initial timeout\n * @internal\n */\nexport function setLongTimeout(timeoutFn, timeoutMs, setTimeoutIdFn) {\n // The setTimeout max is 24.8 days before looping occurs.\n let timeoutId;\n if (timeoutMs > maxSetTimeoutMs) {\n const newTimeoutMs = timeoutMs - maxSetTimeoutMs;\n timeoutId = setTimeout(() => setLongTimeout(timeoutFn, newTimeoutMs, setTimeoutIdFn), maxSetTimeoutMs);\n }\n else {\n timeoutId = setTimeout(() => timeoutFn(), Math.max(timeoutMs, 0));\n }\n setTimeoutIdFn?.(timeoutId);\n return timeoutId;\n}\n/**\n * This class is a thin wrapper over setTimeout and clearTimeout which\n * makes it simpler to keep track of recurring timeouts with the same\n * or similar handlers and timeouts. This class supports long timeouts\n * or timeouts exceeding (2^31)-1 ms or approximately 24.8 days.\n * @internal\n */\nexport class Timer {\n /**\n * Returns true if the timer is running.\n */\n get hasTimer() {\n return !!this.runningState;\n }\n constructor(defaultTimeout, defaultHandler, exceptionHandler) {\n this.defaultTimeout = defaultTimeout;\n this.defaultHandler = defaultHandler;\n this.exceptionHandler = exceptionHandler;\n this.getCurrentTick = () => Date.now();\n }\n /**\n * Calls setTimeout and tracks the resulting timeout.\n * @param ms - overrides default timeout in ms\n * @param handler - overrides default handler\n */\n start(ms = this.defaultTimeout, handler = this.defaultHandler) {\n this.startCore(ms, handler, ms);\n }\n /**\n * Calls clearTimeout on the underlying timeout if running.\n */\n clear() {\n if (!this.runningState) {\n return;\n }\n clearTimeout(this.runningState.timeout);\n this.runningState = undefined;\n }\n /**\n * Restarts the timer with the new handler and duration.\n * If a new handler is passed, the original handler may\n * never execute.\n * This is a potentially more efficient way to clear and start\n * a new timer.\n * @param ms - overrides previous or default timeout in ms\n * @param handler - overrides previous or default handler\n */\n restart(ms, handler) {\n if (this.runningState) {\n const duration = ms ?? this.runningState.intendedDuration;\n const handlerToUse = handler ?? this.runningState.restart?.handler ?? this.runningState.handler;\n const remainingTime = this.calculateRemainingTime(this.runningState);\n if (duration < remainingTime) {\n // If remaining time exceeds restart duration, do a hard restart.\n // The existing timeout time is too long.\n this.start(duration, handlerToUse);\n }\n else if (duration === remainingTime) {\n // The existing timeout time is perfect, just update handler and data.\n this.runningState.handler = handlerToUse;\n this.runningState.restart = undefined;\n this.runningState.intendedDuration = duration;\n }\n else {\n // If restart duration exceeds remaining time, set restart info.\n // Existing timeout will start a new timeout for remaining time.\n this.runningState.restart = {\n startTick: this.getCurrentTick(),\n duration,\n handler: handlerToUse,\n };\n }\n }\n else {\n // If restart is called first, it behaves as a call to start\n this.start(ms, handler);\n }\n }\n startCore(duration, handler, intendedDuration) {\n this.clear();\n this.runningState = {\n startTick: this.getCurrentTick(),\n duration,\n intendedDuration,\n handler,\n timeout: setLongTimeout(() => this.handler(), duration, (timer) => {\n if (this.runningState !== undefined) {\n this.runningState.timeout = timer;\n }\n }),\n };\n }\n handler() {\n assert(!!this.runningState, 0x764 /* Running timer missing handler */);\n const restart = this.runningState.restart;\n if (restart === undefined) {\n // Run clear first, in case the handler decides to start again\n const handler = this.runningState.handler;\n this.clear();\n try {\n handler();\n }\n catch (error) {\n if (this.exceptionHandler) {\n this.exceptionHandler(error);\n }\n else {\n // This will be unhandled exception, but it's better to have unhandled exception than swallow it.\n // Applications might have telemetry to report unhandled exceptions, letting us know where we are missing\n // exception handlers.\n throw error;\n }\n }\n }\n else {\n // Restart with remaining time\n const remainingTime = this.calculateRemainingTime(restart);\n this.startCore(remainingTime, () => restart.handler(), restart.duration);\n }\n }\n calculateRemainingTime(runningTimeout) {\n const elapsedTime = this.getCurrentTick() - runningTimeout.startTick;\n return runningTimeout.duration - elapsedTime;\n }\n}\n/**\n * This class is a wrapper over setTimeout and clearTimeout which\n * makes it simpler to keep track of recurring timeouts with the\n * same handlers and timeouts, while also providing a promise that\n * resolves when it times out.\n * @internal\n */\nexport class PromiseTimer {\n /**\n * {@inheritDoc Timer.hasTimer}\n */\n get hasTimer() {\n return this.timer.hasTimer;\n }\n constructor(defaultTimeout, defaultHandler) {\n this.timer = new Timer(defaultTimeout, () => this.wrapHandler(defaultHandler));\n }\n /**\n * {@inheritDoc IPromiseTimer.start}\n */\n async start(ms, handler) {\n this.clear();\n this.deferred = new Deferred();\n this.timer.start(ms, handler ? () => this.wrapHandler(handler) : undefined);\n return this.deferred.promise;\n }\n clear() {\n this.timer.clear();\n if (this.deferred) {\n this.deferred.resolve({ timerResult: \"cancel\" });\n this.deferred = undefined;\n }\n }\n wrapHandler(handler) {\n handler();\n assert(!!this.deferred, 0x765 /* Handler executed without deferred */);\n this.deferred.resolve({ timerResult: \"timeout\" });\n this.deferred = undefined;\n }\n}\n//# sourceMappingURL=timer.js.map","/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\nimport { assert } from \"@fluidframework/core-utils/internal\";\n/**\n * Monitors a Container's DeltaManager, notifying listeners when all ops have been processed\n * that were known at the time the monitor was created.\n */\nexport class CatchUpMonitor {\n /**\n * Create the CatchUpMonitor, setting the target sequence number to wait for based on DeltaManager's current state.\n */\n constructor(deltaManager, listener) {\n this.deltaManager = deltaManager;\n this.listener = listener;\n this.caughtUp = false;\n this.opHandler = (message) => {\n if (!this.caughtUp && message.sequenceNumber >= this.targetSeqNumber) {\n this.caughtUp = true;\n this.listener();\n }\n };\n this._disposed = false;\n this.targetSeqNumber = this.deltaManager.lastKnownSeqNumber;\n assert(this.targetSeqNumber >= this.deltaManager.lastSequenceNumber, 0x37c /* Cannot wait for seqNumber below last processed sequence number */);\n this.deltaManager.on(\"op\", this.opHandler);\n // Simulate the last processed op to set caughtUp in case we already are\n this.opHandler({ sequenceNumber: this.deltaManager.lastSequenceNumber });\n }\n /**\n * {@inheritDoc @fluidframework/core-interfaces#IDisposable.disposed}\n */\n get disposed() {\n return this._disposed;\n }\n /**\n * {@inheritDoc @fluidframework/core-interfaces#IDisposable.dispose}\n */\n dispose() {\n if (this._disposed) {\n return;\n }\n this._disposed = true;\n this.deltaManager.off(\"op\", this.opHandler);\n }\n}\n//# sourceMappingURL=catchUpMonitor.js.map","/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\nimport { assert, Timer } from \"@fluidframework/core-utils/internal\";\nimport { PerformanceEvent, } from \"@fluidframework/telemetry-utils/internal\";\nimport { CatchUpMonitor } from \"./catchUpMonitor.js\";\nimport { ConnectionState } from \"./connectionState.js\";\n// Based on recent data, it looks like majority of cases where we get stuck are due to really slow or\n// timing out ops fetches. So attempt recovery infrequently. Also fetch uses 30 second timeout, so\n// if retrying fixes the problem, we should not see these events.\nconst JoinOpTimeoutMs = 45000;\n// Timeout waiting for \"self\" join signal, before giving up\nconst JoinSignalTimeoutMs = 10000;\nexport function createConnectionStateHandler(inputs, deltaManager, clientId) {\n const config = inputs.mc.config;\n return createConnectionStateHandlerCore(config.getBoolean(\"Fluid.Container.DisableCatchUpBeforeDeclaringConnected\") !== true, // connectedRaisedWhenCaughtUp\n config.getBoolean(\"Fluid.Container.DisableJoinSignalWait\") !== true, // readClientsWaitForJoinSignal\n inputs, deltaManager, clientId);\n}\nexport function createConnectionStateHandlerCore(connectedRaisedWhenCaughtUp, readClientsWaitForJoinSignal, inputs, deltaManager, clientId) {\n const factory = (handler) => new ConnectionStateHandler(handler, readClientsWaitForJoinSignal, clientId);\n return connectedRaisedWhenCaughtUp\n ? new ConnectionStateCatchup(inputs, factory, deltaManager)\n : factory(inputs);\n}\n/**\n * Class that can be used as a base class for building IConnectionStateHandler adapters / pipeline.\n * It implements both ends of communication interfaces and passes data back and forward\n */\nclass ConnectionStateHandlerPassThrough {\n constructor(inputs, pimplFactory) {\n this.inputs = inputs;\n this.pimpl = pimplFactory(this);\n }\n // #region IConnectionStateHandler\n get connectionState() {\n return this.pimpl.connectionState;\n }\n get pendingClientId() {\n return this.pimpl.pendingClientId;\n }\n get clientId() {\n return this.pimpl.clientId;\n }\n containerSaved() {\n return this.pimpl.containerSaved();\n }\n dispose() {\n return this.pimpl.dispose();\n }\n initProtocol(protocol) {\n return this.pimpl.initProtocol(protocol);\n }\n receivedDisconnectEvent(reason) {\n return this.pimpl.receivedDisconnectEvent(reason);\n }\n establishingConnection(reason) {\n return this.pimpl.establishingConnection(reason);\n }\n cancelEstablishingConnection(reason) {\n return this.pimpl.cancelEstablishingConnection(reason);\n }\n receivedConnectEvent(details) {\n return this.pimpl.receivedConnectEvent(details);\n }\n // #endregion\n // #region IConnectionStateHandlerInputs\n get logger() {\n return this.inputs.logger;\n }\n get mc() {\n return this.inputs.mc;\n }\n connectionStateChanged(value, oldState, reason) {\n return this.inputs.connectionStateChanged(value, oldState, reason);\n }\n shouldClientJoinWrite() {\n return this.inputs.shouldClientJoinWrite();\n }\n get maxClientLeaveWaitTime() {\n return this.inputs.maxClientLeaveWaitTime;\n }\n logConnectionIssue(eventName, category, details) {\n return this.inputs.logConnectionIssue(eventName, category, details);\n }\n clientShouldHaveLeft(clientId) {\n return this.inputs.clientShouldHaveLeft(clientId);\n }\n onCriticalError(error) {\n return this.inputs.onCriticalError(error);\n }\n}\n/**\n * Implementation of IConnectionStateHandler pass-through adapter that waits for specific sequence number\n * before raising connected event\n */\nexport class ConnectionStateCatchup extends ConnectionStateHandlerPassThrough {\n constructor(inputs, pimplFactory, deltaManager) {\n super(inputs, pimplFactory);\n this.deltaManager = deltaManager;\n this.transitionToConnectedState = () => {\n // Defensive measure, we should always be in Connecting state when this is called.\n const state = this.pimpl.connectionState;\n assert(state === ConnectionState.Connected, 0x3e5 /* invariant broken */);\n assert(this._connectionState === ConnectionState.CatchingUp, 0x3e6 /* invariant broken */);\n this._connectionState = ConnectionState.Connected;\n this.inputs.connectionStateChanged(ConnectionState.Connected, ConnectionState.CatchingUp, {\n text: \"caught up\",\n });\n };\n this._connectionState = this.pimpl.connectionState;\n }\n get connectionState() {\n return this._connectionState;\n }\n connectionStateChanged(value, oldState, reason) {\n switch (value) {\n case ConnectionState.Connected: {\n assert(this._connectionState === ConnectionState.CatchingUp, 0x3e1 /* connectivity transitions */);\n // Create catch-up monitor here (not earlier), as we might get more exact info by now about how far\n // client is behind through join signal. This is only true if base layer uses signals (i.e. audience,\n // not quorum, including for \"rea\" connections) to make decisions about moving to \"connected\" state.\n // In addition to that, in its current form, doing this in ConnectionState.CatchingUp is dangerous as\n // we might get callback right away, and it will screw up state transition (as code outside of switch\n // statement will overwrite current state).\n assert(this.catchUpMonitor === undefined, 0x3eb /* catchUpMonitor should be gone */);\n this.catchUpMonitor = new CatchUpMonitor(this.deltaManager, this.transitionToConnectedState);\n return;\n }\n case ConnectionState.Disconnected: {\n this.catchUpMonitor?.dispose();\n this.catchUpMonitor = undefined;\n break;\n }\n // ConnectionState.EstablishingConnection state would be set when we start establishing connection\n // during container.connect() or reconnect because of an error.\n case ConnectionState.EstablishingConnection: {\n assert(this._connectionState === ConnectionState.Disconnected, 0x6d2 /* connectivity transition to establishing connection */);\n break;\n }\n case ConnectionState.CatchingUp: {\n assert(this._connectionState === ConnectionState.EstablishingConnection, 0x3e3 /* connectivity transitions */);\n break;\n }\n default:\n }\n this._connectionState = value;\n this.inputs.connectionStateChanged(value, oldState, reason);\n }\n}\n/**\n * In the lifetime of a container, the connection will likely disconnect and reconnect periodically.\n * This class ensures that any ops sent by this container instance on previous connection are either\n * sequenced or blocked by the server before emitting the new \"connected\" event and allowing runtime to resubmit ops.\n *\n * Each connection is assigned a clientId by the service, and the connection is book-ended by a Join and a Leave op\n * generated by the service. Due to the distributed nature of the Relay Service, in the case of reconnect we cannot\n * make any assumptions about ordering of operations between the old and new connections - i.e. new Join op could\n * be sequenced before old Leave op (and some acks from pending ops that were in flight when we disconnected).\n *\n * The job of this class is to encapsulate the transition period during reconnect, which is identified by\n * ConnectionState.CatchingUp. Specifically, before moving to Connected state with the new clientId, it ensures that:\n *\n * a. We process the Leave op for the previous clientId. This allows us to properly handle any acks from in-flight ops\n * that got sequenced with the old clientId (we'll recognize them as local ops). After the Leave op, any other\n * pending ops can safely be submitted with the new clientId without fear of duplication in the sequenced op stream.\n *\n * b. We process the Join op for the new clientId (identified when the underlying connection was first established),\n * indicating the service is ready to sequence ops sent with the new clientId.\n *\n * c. We process all ops known at the time the underlying connection was established (so we are \"caught up\")\n *\n * For (a) we give up waiting after some time (same timeout as server uses), and go ahead and transition to Connected.\n *\n * For (b) we log telemetry if it takes too long, but still only transition to Connected when the Join op/signal is\n * processed.\n *\n * For (c) this is optional behavior, controlled by the parameters of receivedConnectEvent\n */\nexport class ConnectionStateHandler {\n get connectionState() {\n return this._connectionState;\n }\n get clientId() {\n return this._clientId;\n }\n get pendingClientId() {\n return this._pendingClientId;\n }\n constructor(handler, readClientsWaitForJoinSignal, clientIdFromPausedSession) {\n this.handler = handler;\n this.readClientsWaitForJoinSignal = readClientsWaitForJoinSignal;\n this._connectionState = ConnectionState.Disconnected;\n this._clientId = clientIdFromPausedSession;\n // eslint-disable-next-line unicorn/consistent-function-scoping\n const errorHandler = (error) => this.handler.onCriticalError(error);\n this.prevClientLeftTimer = new Timer(\n // Default is 5 min for which we are going to wait for its own \"leave\" message. This is same as\n // the max time on server after which leave op is sent.\n this.handler.maxClientLeaveWaitTime ?? 300000, () => {\n assert(this.connectionState !== ConnectionState.Connected, 0x2ac /* \"Connected when timeout waiting for leave from previous session fired!\" */);\n this.applyForConnectedState(\"timeout\");\n }, errorHandler);\n this.joinTimer = new Timer(0, // default value is not used - startjoinTimer() explicitly provides timeout\n () => {\n // I've observed timer firing within couple ms from disconnect event, looks like\n // queued timer callback is not cancelled if timer is cancelled while callback sits in the queue.\n if (this.connectionState !== ConnectionState.CatchingUp) {\n return;\n }\n const details = {\n protocolInitialized: this.protocol !== undefined,\n pendingClientId: this.pendingClientId,\n clientJoined: this.hasMember(this.pendingClientId),\n waitingForLeaveOp: this.waitingForLeaveOp,\n };\n this.handler.logConnectionIssue(this.connection?.mode === \"read\" ? \"NoJoinSignal\" : \"NoJoinOp\", // eventName\n \"error\", // category\n details);\n }, errorHandler);\n }\n startjoinTimer() {\n assert(!this.joinTimer.hasTimer, 0x234 /* \"has joinTimer\" */);\n assert(this.connection !== undefined, 0x4b3 /* have connection */);\n this.joinTimer.start(this.connection.mode === \"write\" ? JoinOpTimeoutMs : JoinSignalTimeoutMs);\n }\n stopjoinTimer() {\n assert(this.joinTimer.hasTimer, 0x235 /* \"no joinTimer\" */);\n this.joinTimer.clear();\n }\n get waitingForLeaveOp() {\n return this.prevClientLeftTimer.hasTimer;\n }\n dispose() {\n assert(!this.joinTimer.hasTimer, 0x2a5 /* \"join timer\" */);\n this.prevClientLeftTimer.clear();\n }\n containerSaved() {\n // If we were waiting for moving to Connected state, then only apply for state change. Since the container\n // is now saved and we don't have any ops to roundtrip, we can clear the timer and apply for connected state.\n if (this.waitingForLeaveOp) {\n this.prevClientLeftTimer.clear();\n this.applyForConnectedState(\"containerSaved\");\n }\n }\n receivedAddMemberEvent(clientId) {\n // This is the only one that requires the pending client ID\n if (clientId === this.pendingClientId) {\n if (this.joinTimer.hasTimer) {\n this.stopjoinTimer();\n }\n else if (this.shouldWaitForSelf()) {\n // timer has already fired, meaning it took too long to get join op/signal.\n // Record how long it actually took to recover.\n // This is generic event, as it by itself is not an error.\n // We also have a case where NoJoinOp happens during container boot (we do not report it as error in such case),\n // if this log statement happens after boot - we do not want to consider it error case.\n this.handler.logConnectionIssue(this.connection?.mode === \"read\" ? \"ReceivedJoinSignal\" : \"ReceivedJoinOp\", // eventName\n \"generic\");\n }\n // Start the event in case we are waiting for leave or timeout.\n if (this.waitingForLeaveOp) {\n this.waitEvent = PerformanceEvent.start(this.handler.logger, {\n eventName: \"WaitBeforeClientLeave\",\n details: JSON.stringify({\n waitOnClientId: this._clientId,\n hadOutstandingOps: this.handler.shouldClientJoinWrite(),\n }),\n });\n }\n this.applyForConnectedState(\"addMemberEvent\");\n }\n }\n applyForConnectedState(source) {\n assert(this.protocol !== undefined, 0x236 /* \"In all cases it should be already installed\" */);\n assert(!this.waitingForLeaveOp || this.hasMember(this.clientId), 0x2e2 /* \"Must only wait for leave message when clientId in quorum\" */);\n // Move to connected state only if:\n // 1. We have seen our own \"join\" op (i.e. for this.pendingClientId)\n // 2. There is no \"leave\" timer running, meaning this is our first connection or the previous client has left (via this.prevClientLeftTimer)\n if (this.pendingClientId !== this.clientId &&\n this.hasMember(this.pendingClientId) &&\n !this.waitingForLeaveOp) {\n this.waitEvent?.end({ source });\n this.setConnectionState(ConnectionState.Connected);\n }\n else {\n // Adding this event temporarily so that we can get help debugging if something goes wrong.\n // We may not see any ops due to being disconnected all that time - that's not an error!\n const error = source === \"timeout\" && this.connectionState !== ConnectionState.Disconnected;\n this.handler.logger.sendTelemetryEvent({\n eventName: \"connectedStateRejected\",\n category: error ? \"error\" : \"generic\",\n details: JSON.stringify({\n source,\n pendingClientId: this.pendingClientId,\n clientId: this.clientId,\n waitingForLeaveOp: this.waitingForLeaveOp,\n clientJoined: this.hasMember(this.pendingClientId),\n }),\n });\n }\n }\n receivedRemoveMemberEvent(clientId) {\n // If the client which has left was us, then finish the timer.\n if (this.clientId === clientId && this.waitingForLeaveOp) {\n this.prevClientLeftTimer.clear();\n this.applyForConnectedState(\"removeMemberEvent\");\n }\n }\n receivedDisconnectEvent(reason) {\n this.connection = undefined;\n this.setConnectionState(ConnectionState.Disconnected, reason);\n }\n cancelEstablishingConnection(reason) {\n assert(this._connectionState === ConnectionState.EstablishingConnection, 0x6d3 /* Connection state should be EstablishingConnection */);\n assert(this.connection === undefined, 0x6d4 /* No connection should be present */);\n const oldState = this._connectionState;\n this._connectionState = ConnectionState.Disconnected;\n this.handler.connectionStateChanged(ConnectionState.Disconnected, oldState, reason);\n }\n establishingConnection(reason) {\n const oldState = this._connectionState;\n this._connectionState = ConnectionState.EstablishingConnection;\n this.handler.connectionStateChanged(ConnectionState.EstablishingConnection, oldState, {\n text: `Establishing Connection due to ${reason.text}`,\n error: reason.error,\n });\n }\n /**\n * Tells if need to wait for \"self\" to show up in audience.\n * @returns - true if we should wait for \"self\" to appear in audience.\n * false is returned only for \"read\" connections, and only if this.readClientsWaitForJoinSignal is false.\n */\n shouldWaitForSelf() {\n assert(this.connection !== undefined, 0x4b4 /* all callers call here with active connection */);\n return this.connection.mode === \"write\" || this.readClientsWaitForJoinSignal;\n }\n /**\n * The \"connect\" event indicates the connection to the Relay Service is live.\n * However, some additional conditions must be met before we can fully transition to\n * \"Connected\" state. This function handles that interim period, known as \"Connecting\" state.\n * @param details - Connection details returned from the Relay Service\n * @param deltaManager - DeltaManager to be used for delaying Connected transition until caught up.\n * If it's undefined, then don't delay and transition to Connected as soon as Leave/Join op are accounted for\n */\n receivedConnectEvent(details) {\n this.connection = details;\n const oldState = this._connectionState;\n this._connectionState = ConnectionState.CatchingUp;\n // The following checks are wrong. They are only valid if user has write access to a file.\n // If user lost such access mid-session, user will not be able to get \"write\" connection.\n //\n // const writeConnection = details.mode === \"write\";\n // assert(!this.handler.shouldClientJoinWrite() || writeConnection,\n // 0x30a /* shouldClientJoinWrite should imply this is a writeConnection */);\n // assert(!this.waitingForLeaveOp || writeConnection,\n // 0x2a6 /* \"waitingForLeaveOp should imply writeConnection (we need to be ready to flush pending ops)\" */);\n // Stash the clientID to detect when transitioning from connecting (socket.io channel open) to connected\n // (have received the join message for the client ID)\n // This is especially important in the reconnect case. It's possible there could be outstanding\n // ops sent by this client, so we should keep the old client id until we see our own client's\n // join message. after we see the join message for our new connection with our new client id,\n // we know there can no longer be outstanding ops that we sent with the previous client id.\n this._pendingClientId = details.clientId;\n // IMPORTANT: Report telemetry after we set _pendingClientId, but before transitioning to Connected state\n this.handler.connectionStateChanged(ConnectionState.CatchingUp, oldState, details.reason);\n // Check if we need to wait for join op/signal, and if we need to wait for leave op from previous connection.\n // Pending clientId could have joined already (i.e. join op/signal already processed):\n // We are fetching ops from storage in parallel to connecting to Relay Service,\n // and given async processes, it's possible that we have already processed our own join message before\n // connection was fully established.\n if (!this.hasMember(this._pendingClientId) && this.shouldWaitForSelf()) {\n // We are waiting for our own join op / signal. When it is processed\n // we'll attempt to transition to Connected state via receivedAddMemberEvent() flow.\n this.startjoinTimer();\n }\n else if (!this.waitingForLeaveOp) {\n // We're not waiting for Join or Leave op (if read-only connection those don't even apply),\n // go ahead and declare the state to be Connected!\n // If we are waiting for Leave op still, do nothing for now, we will transition to Connected later.\n this.setConnectionState(ConnectionState.Connected);\n }\n // else - We are waiting for Leave op still, do nothing for now, we will transition to Connected later\n }\n setConnectionState(value, reason) {\n if (this.connectionState === value) {\n // Already in the desired state - exit early\n this.handler.logger.sendErrorEvent({ eventName: \"setConnectionStateSame\", value });\n return;\n }\n const oldState = this._connectionState;\n this._connectionState = value;\n // This is the only place in code that deals with quorum. The rest works with audience\n // The code below ensures that we do not send ops until we know that old \"write\" client's disconnect\n // produced (and sequenced) leave op\n const currentClientInQuorum = this._clientId !== undefined &&\n this.protocol?.quorum?.getMember(this._clientId) !== undefined;\n if (value === ConnectionState.Connected) {\n assert(oldState === ConnectionState.CatchingUp, 0x1d8 /* \"Should only transition from Connecting state\" */);\n // Mark our old client should have left in the quorum if it's still there\n if (currentClientInQuorum) {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n this.handler.clientShouldHaveLeft(this._clientId);\n }\n this._clientId = this.pendingClientId;\n }\n else if (value === ConnectionState.Disconnected) {\n if (this.joinTimer.hasTimer) {\n this.stopjoinTimer();\n }\n // Only wait for \"leave\" message if the connected client exists in the quorum and had some non-acked ops\n // Also check if the timer is not already running as\n // we could receive \"Disconnected\" event multiple times without getting connected and in that case we\n // don't want to reset the timer as we still want to wait on original client which started this timer.\n if (currentClientInQuorum &&\n this.handler.shouldClientJoinWrite() &&\n !this.waitingForLeaveOp // same as !this.prevClientLeftTimer.hasTimer\n ) {\n this.prevClientLeftTimer.restart();\n }\n else {\n // Adding this event temporarily so that we can get help debugging if something goes wrong.\n this.handler.logger.sendTelemetryEvent({\n eventName: \"noWaitOnDisconnected\",\n details: JSON.stringify({\n clientId: this._clientId,\n inQuorum: currentClientInQuorum,\n waitingForLeaveOp: this.waitingForLeaveOp,\n hadOutstandingOps: this.handler.shouldClientJoinWrite(),\n }),\n });\n }\n }\n // Report transition\n this.handler.connectionStateChanged(this._connectionState, oldState, reason);\n // Clear pending state immediately to prepare for reconnect\n // Do it after calling connectionStateChanged() above, such that our telemetry contains pendingClientId on disconnect events\n // and we can pair attempts to connect with disconnects (that's the only ID we have if connection did not move far enough before being disconnected)\n if (value === ConnectionState.Disconnected) {\n this._pendingClientId = undefined;\n }\n }\n get membership() {\n // We could always use audience here.\n // This is true because Audience is a superset of quorum, i.e. when we filter Audience to \"write\" clients,\n // it is exactly the same as quorum! Please see asserts in Audience callbacks setup by initProtocol() enforcing that.\n return this.readClientsWaitForJoinSignal ? this.protocol?.audience : this.protocol?.quorum;\n }\n initProtocol(protocol) {\n this.protocol = protocol;\n this.membership?.on(\"addMember\", (clientId, details) => {\n // This is very important constrain. We rely on it when testing presence of \"self\" in Audience.\n // We do not want to move to \"connected\" state for \"write\" connections when JoinSignal shows up\n // for \"self\" - we want to move to \"connected\" state only when \"join\" op is received.\n assert(details.mode === \"read\" ||\n protocol.quorum.getMember(clientId) !== undefined, 0x4b5 /* Audience is subset of quorum */);\n this.receivedAddMemberEvent(clientId);\n });\n this.membership?.on(\"removeMember\", (clientId) => {\n assert(protocol.quorum.getMember(clientId) === undefined, 0x4b6 /* Audience is subset of quorum */);\n this.receivedRemoveMemberEvent(clientId);\n });\n /* There is a tiny tiny race possible, where these events happen in this order:\n 1. A connection is established (no \"cached\" mode is used, so it happens in parallel / faster than other steps)\n 2. Some other client produces a summary\n 3. We get \"lucky\" and load from that summary as our initial snapshot\n 4. ConnectionStateHandler.initProtocol is called, \"self\" is already in the quorum.\n We could avoid this sequence (and delete test case for it) if we move connection lower in Container.load()\n */\n if (this.hasMember(this.pendingClientId)) {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n this.receivedAddMemberEvent(this.pendingClientId);\n }\n assert(!this.waitingForLeaveOp, 0x99d /* leave timer can't be set as we have not had access to quorum */);\n // This check is required for scenario of loading container from pending state, and ensuring there is no way\n // old clientId is still in the quorum (very unlikely, but you never know)\n // if we have a clientId from a previous container we need to wait for its leave message\n // This mimicks check in setConnectionState()\n // Note that we are not consulting this.handler.shouldClientJoinWrite() here\n // It could produce wrong results for stashed ops were never sent to Loader yet, and if this check\n // makes determination only on that (and not uses \"dirty\" events), then it can produce wrong result.\n // In most cases it does not matter, as this client already left quorum. But in really unfortunate case,\n // we might wait even if we could avoid such wait.\n if (this._clientId !== undefined &&\n protocol.quorum?.getMember(this._clientId) !== undefined) {\n this.prevClientLeftTimer.restart();\n }\n }\n hasMember(clientId) {\n return this.membership?.getMember(clientId ?? \"\") !== undefined;\n }\n}\n//# sourceMappingURL=connectionStateHandler.js.map","/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n/**\n * @internal\n */\nexport const ILayerCompatDetails = \"ILayerCompatDetails\";\n/**\n * This is the default compat details for a layer when it doesn't provide any compat details. This is used for\n * backwards compatibility to allow older layers to work before compatibility enforcement was introduced.\n * @internal\n */\nexport const defaultLayerCompatDetails = {\n supportedFeatures: new Set(),\n generation: 0, // 0 is reserved for layers before compatibility enforcement was introduced.\n pkgVersion: \"unknown\",\n};\n/**\n * Checks compatibility of a layer (layer1) with another layer (layer2).\n * @param compatSupportRequirementsLayer1 - The requirements from layer1 that layer2 needs to meet.\n * @param compatDetailsLayer2 - The compatibility details of the layer2. If this is undefined, then the\n * default compatibility details are used for backwards compatibility.\n * @returns The result of the compatibility check indicating whether layer2 is compatible with layer1.\n *\n * @internal\n */\nexport function checkLayerCompatibility(compatSupportRequirementsLayer1, compatDetailsLayer2) {\n const compatDetailsLayer2ToUse = compatDetailsLayer2 ?? defaultLayerCompatDetails;\n let isGenerationCompatible = true;\n const unsupportedFeatures = [];\n // If layer2's generation is less than the required minimum supported generation of layer1,\n // then it is not compatible.\n if (compatDetailsLayer2ToUse.generation <\n compatSupportRequirementsLayer1.minSupportedGeneration) {\n isGenerationCompatible = false;\n }\n // All features required by layer1 must be supported by layer2 to be compatible.\n for (const feature of compatSupportRequirementsLayer1.requiredFeatures) {\n if (!compatDetailsLayer2ToUse.supportedFeatures.has(feature)) {\n unsupportedFeatures.push(feature);\n }\n }\n return isGenerationCompatible && unsupportedFeatures.length === 0\n ? { isCompatible: true }\n : {\n isCompatible: false,\n isGenerationCompatible,\n unsupportedFeatures: unsupportedFeatures.length > 0 ? unsupportedFeatures : undefined,\n };\n}\n//# sourceMappingURL=layerCompat.js.map","/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n *\n * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY\n */\nexport const pkgName = \"@fluidframework/container-loader\";\nexport const pkgVersion = \"2.43.0\";\n//# sourceMappingURL=packageVersion.js.map","/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\nimport { checkLayerCompatibility, } from \"@fluid-internal/client-utils\";\nimport { UsageError } from \"@fluidframework/telemetry-utils/internal\";\nimport { pkgVersion } from \"./packageVersion.js\";\n/**\n * The core compatibility details of the Loader layer that is the same across all layer boundaries.\n * @internal\n */\nexport const loaderCoreCompatDetails = {\n /**\n * The package version of the Loader layer.\n */\n pkgVersion,\n /**\n * The current generation of the Loader layer.\n */\n generation: 1,\n};\n/**\n * Loader's compatibility details that is exposed to the Runtime layer.\n * @internal\n */\nexport const loaderCompatDetailsForRuntime = {\n ...loaderCoreCompatDetails,\n /**\n * The features supported by the Loader layer across the Loader / Runtime boundary.\n */\n supportedFeatures: new Set(),\n};\n/**\n * The requirements that the Runtime layer must meet to be compatible with this Loader.\n * @internal\n */\nexport const runtimeSupportRequirements = {\n /**\n * Minimum generation that Runtime must be at to be compatible with Loader. Note that 0 is used here for\n * Runtime layers before the introduction of the layer compatibility enforcement.\n */\n minSupportedGeneration: 0,\n /**\n * The features that the Runtime must support to be compatible with Loader.\n */\n requiredFeatures: [],\n};\n/**\n * The requirements that the Driver layer must meet to be compatible with this Loader.\n * @internal\n */\nexport const driverSupportRequirements = {\n /**\n * Minimum generation that Driver must be at to be compatible with Loader. Note that 0 is used here for\n * Driver layers before the introduction of the layer compatibility enforcement.\n */\n minSupportedGeneration: 0,\n /**\n * The features that the Driver must support to be compatible with Loader.\n */\n requiredFeatures: [],\n};\n/**\n * Validates that the Runtime layer is compatible with the Loader.\n * @internal\n */\nexport function validateRuntimeCompatibility(maybeRuntimeCompatDetails, disposeFn) {\n const layerCheckResult = checkLayerCompatibility(runtimeSupportRequirements, maybeRuntimeCompatDetails);\n if (!layerCheckResult.isCompatible) {\n const error = new UsageError(\"Loader is not compatible with Runtime\", {\n errorDetails: JSON.stringify({\n loaderVersion: loaderCompatDetailsForRuntime.pkgVersion,\n runtimeVersion: maybeRuntimeCompatDetails?.pkgVersion,\n loaderGeneration: loaderCompatDetailsForRuntime.generation,\n runtimeGeneration: maybeRuntimeCompatDetails?.generation,\n minSupportedGeneration: runtimeSupportRequirements.minSupportedGeneration,\n isGenerationCompatible: layerCheckResult.isGenerationCompatible,\n unsupportedFeatures: layerCheckResult.unsupportedFeatures,\n }),\n });\n disposeFn(error);\n throw error;\n }\n}\n/**\n * Validates that the Driver layer is compatible with the Loader.\n * @internal\n */\nexport function validateDriverCompatibility(maybeDriverCompatDetails, disposeFn) {\n const layerCheckResult = checkLayerCompatibility(driverSupportRequirements, maybeDriverCompatDetails);\n if (!layerCheckResult.isCompatible) {\n const error = new UsageError(\"Loader is not compatible with Driver\", {\n errorDetails: JSON.stringify({\n loaderVersion: loaderCoreCompatDetails.pkgVersion,\n driverVersion: maybeDriverCompatDetails?.pkgVersion,\n loaderGeneration: loaderCoreCompatDetails.generation,\n driverGeneration: maybeDriverCompatDetails?.generation,\n minSupportedGeneration: driverSupportRequirements.minSupportedGeneration,\n isGenerationCompatible: layerCheckResult.isGenerationCompatible,\n unsupportedFeatures: layerCheckResult.unsupportedFeatures,\n }),\n });\n disposeFn(error);\n throw error;\n }\n}\n//# sourceMappingURL=loaderLayerCompatState.js.map","/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\nimport { loaderCompatDetailsForRuntime } from \"./loaderLayerCompatState.js\";\n/**\n * {@inheritDoc @fluidframework/container-definitions#IContainerContext}\n */\nexport class ContainerContext {\n get clientId() {\n return this._getClientId();\n }\n /**\n * DISCLAIMER: this id is only for telemetry purposes. Not suitable for any other usages.\n */\n get id() {\n return this._getContainerDiagnosticId() ?? \"\";\n }\n /**\n * When true, ops are free to flow\n * When false, ops should be kept as pending or rejected\n */\n get connected() {\n return this._getConnected();\n }\n /**\n * The compatibility details of the Loader layer that is exposed to the Runtime layer\n * for validating Runtime-Loader compatibility.\n */\n get ILayerCompatDetails() {\n return loaderCompatDetailsForRuntime;\n }\n constructor(options, scope, baseSnapshot, _version, deltaManager, storage, quorum, audience, loader, submitFn, submitSummaryFn, \n /**\n * @returns clientSequenceNumber of last message in a batch\n */\n submitBatchFn, \n /**\n * `unknown` should be removed once `@alpha` tag is removed from IContainerContext\n * @see {@link https://dev.azure.com/fluidframework/internal/_workitems/edit/7462}\n * Any changes to submitSignalFn `content` should be checked internally by temporarily changing IContainerContext and removing all `unknown`s\n */\n submitSignalFn, disposeFn, closeFn, updateDirtyContainerState, getAbsoluteUrl, _getContainerDiagnosticId, _getClientId, _getAttachState, _getConnected, clientDetails, existing, taggedLogger, pendingLocalState, snapshotWithContents) {\n this.options = options;\n this.scope = scope;\n this.baseSnapshot = baseSnapshot;\n this._version = _version;\n this.deltaManager = deltaManager;\n this.storage = storage;\n this.quorum = quorum;\n this.audience = audience;\n this.loader = loader;\n this.submitFn = submitFn;\n this.submitSummaryFn = submitSummaryFn;\n this.submitBatchFn = submitBatchFn;\n this.submitSignalFn = submitSignalFn;\n this.disposeFn = disposeFn;\n this.closeFn = closeFn;\n this.updateDirtyContainerState = updateDirtyContainerState;\n this.getAbsoluteUrl = getAbsoluteUrl;\n this._getContainerDiagnosticId = _getContainerDiagnosticId;\n this._getClientId = _getClientId;\n this._getAttachState = _getAttachState;\n this._getConnected = _getConnected;\n this.clientDetails = clientDetails;\n this.existing = existing;\n this.taggedLogger = taggedLogger;\n this.pendingLocalState = pendingLocalState;\n this.snapshotWithContents = snapshotWithContents;\n /**\n * @deprecated - This has been replaced by ILayerCompatDetails.\n */\n this.supportedFeatures = new Map([\n /**\n * This version of the loader accepts `referenceSequenceNumber`, provided by the container runtime,\n * as a parameter to the `submitBatchFn` and `submitSummaryFn` functions.\n * This is then used to set the reference sequence numbers of the submitted ops in the DeltaManager.\n */\n [\"referenceSequenceNumbers\", true],\n ]);\n }\n getLoadedFromVersion() {\n return this._version;\n }\n get attachState() {\n return this._getAttachState();\n }\n}\n//# sourceMappingURL=containerContext.js.map","/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\nimport { DriverErrorTypes, } from \"@fluidframework/driver-definitions/internal\";\nimport { LoggingError } from \"@fluidframework/telemetry-utils/internal\";\n/**\n * Error indicating an API is being used improperly resulting in an invalid operation.\n * @internal\n */\nexport class UsageError extends LoggingError {\n constructor(message) {\n super(message, { usageError: true });\n this.errorType = DriverErrorTypes.usageError;\n this.canRetry = false;\n }\n}\n//# sourceMappingURL=error.js.map","/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n/**\n * A storage service wrapper whose sole job is to intercept calls to uploadSummaryWithContext and ensure they include\n * the protocol summary, using the provided callback to add it if necessary.\n */\nexport class ProtocolTreeStorageService {\n /**\n *\n * @param internalStorageService - Document storage service responsible to make api calls to the storage.\n * @param addProtocolSummaryIfMissing - Function to add protocol summary tree to the summary. Used in scenarios where single-commit summaries are used.\n * @param shouldSummarizeProtocolTree - Callback function to learn about the service preference on whether single-commit summaries are enabled.\n */\n constructor(internalStorageService, addProtocolSummaryIfMissing, shouldSummarizeProtocolTree) {\n this.internalStorageService = internalStorageService;\n this.addProtocolSummaryIfMissing = addProtocolSummaryIfMissing;\n this.shouldSummarizeProtocolTree = shouldSummarizeProtocolTree;\n this.getSnapshotTree = internalStorageService.getSnapshotTree.bind(internalStorageService);\n this.getSnapshot = internalStorageService.getSnapshot?.bind(internalStorageService);\n this.getVersions = internalStorageService.getVersions.bind(internalStorageService);\n this.createBlob = internalStorageService.createBlob.bind(internalStorageService);\n this.readBlob = internalStorageService.readBlob.bind(internalStorageService);\n this.downloadSummary = internalStorageService.downloadSummary.bind(internalStorageService);\n this.dispose = internalStorageService.dispose.bind(internalStorageService);\n }\n get policies() {\n return this.internalStorageService.policies;\n }\n get disposed() {\n return this.internalStorageService.disposed;\n }\n async uploadSummaryWithContext(summary, context) {\n return this.shouldSummarizeProtocolTree()\n ? this.internalStorageService.uploadSummaryWithContext(this.addProtocolSummaryIfMissing(summary), context)\n : this.internalStorageService.uploadSummaryWithContext(summary, context);\n }\n}\n//# sourceMappingURL=protocolTreeDocumentStorageService.js.map","/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\nimport { assert } from \"@fluidframework/core-utils/internal\";\nimport { runWithRetry } from \"@fluidframework/driver-utils/internal\";\nimport { GenericError, UsageError, } from \"@fluidframework/telemetry-utils/internal\";\nexport class RetriableDocumentStorageService {\n constructor(internalStorageServiceP, logger) {\n this.internalStorageServiceP = internalStorageServiceP;\n this.logger = logger;\n this._disposed = false;\n this.internalStorageServiceP\n .then((s) => (this.internalStorageService = s))\n .catch(() => { });\n }\n get policies() {\n if (this.internalStorageService) {\n return this.internalStorageService.policies;\n }\n throw new Error(\"storage service not yet instantiated\");\n }\n get disposed() {\n return this._disposed;\n }\n dispose() {\n this._disposed = true;\n }\n async getSnapshotTree(version, scenarioName) {\n return this.runWithRetry(async () => this.internalStorageServiceP.then(async (s) => s.getSnapshotTree(version, scenarioName)), \"storage_getSnapshotTree\");\n }\n async getSnapshot(snapshotFetchOptions) {\n return this.runWithRetry(async () => this.internalStorageServiceP.then(async (s) => {\n if (s.getSnapshot !== undefined) {\n return s.getSnapshot(snapshotFetchOptions);\n }\n throw new UsageError(\"getSnapshot api should exist on internal storage in RetriableDocStorageService class\");\n }), \"storage_getSnapshot\");\n }\n async readBlob(id) {\n return this.runWithRetry(async () => this.internalStorageServiceP.then(async (s) => s.readBlob(id)), \"storage_readBlob\");\n }\n async getVersions(\n // API used below returns null\n // eslint-disable-next-line @rushstack/no-new-null\n versionId, count, scenarioName, fetchSource) {\n return this.runWithRetry(async () => this.internalStorageServiceP.then(async (s) => s.getVersions(versionId, count, scenarioName, fetchSource)), \"storage_getVersions\");\n }\n async uploadSummaryWithContext(summary, context) {\n // Not using retry loop here. Couple reasons:\n // 1. If client lost connectivity, then retry loop will result in uploading stale summary\n // by stale summarizer after connectivity comes back. It will cause failures for this client and for\n // real (new) summarizer. This problem in particular should be solved in future by supplying abort handle\n // on all APIs and caller (ContainerRuntime.submitSummary) aborting call on loss of connectivity\n // 2. Similar, if we get 429 with retryAfter = 10 minutes, it's likely not the right call to retry summary\n // upload in 10 minutes - it's better to keep processing ops and retry later. Though caller needs to take\n // retryAfter into account!\n // But retry loop is required for creation flow (Container.attach)\n assert((context.referenceSequenceNumber === 0) === (context.ackHandle === undefined), 0x251 /* \"creation summary has to have seq=0 && handle === undefined\" */);\n if (context.referenceSequenceNumber !== 0) {\n return this.internalStorageServiceP.then(async (s) => s.uploadSummaryWithContext(summary, context));\n }\n // Creation flow with attachment blobs - need to do retries!\n return this.runWithRetry(async () => this.internalStorageServiceP.then(async (s) => s.uploadSummaryWithContext(summary, context)), \"storage_uploadSummaryWithContext\");\n }\n async downloadSummary(handle) {\n return this.runWithRetry(async () => this.internalStorageServiceP.then(async (s) => s.downloadSummary(handle)), \"storage_downloadSummary\");\n }\n async createBlob(file) {\n return this.runWithRetry(async () => this.internalStorageServiceP.then(async (s) => s.createBlob(file)), \"storage_createBlob\");\n }\n checkStorageDisposed(callName, error) {\n if (this._disposed) {\n this.logger.sendTelemetryEvent({\n eventName: `${callName}_abortedStorageDisposed`,\n fetchCallName: callName, // fetchCallName matches logs in runWithRetry.ts\n }, error);\n // pre-0.58 error message: storageServiceDisposedCannotRetry\n throw new GenericError(\"Storage Service is disposed. Cannot retry\", {\n canRetry: false,\n });\n }\n return;\n }\n async runWithRetry(api, callName) {\n return runWithRetry(api, callName, this.logger, {\n onRetry: (_delayInMs, error) => this.checkStorageDisposed(callName, error),\n });\n }\n}\n//# sourceMappingURL=retriableDocumentStorageService.js.map","/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\nimport { bufferToString, stringToBuffer } from \"@fluid-internal/client-utils\";\nimport { assert } from \"@fluidframework/core-utils/internal\";\nimport { isInstanceOfISnapshot, UsageError } from \"@fluidframework/driver-utils/internal\";\nimport { ProtocolTreeStorageService } from \"./protocolTreeDocumentStorageService.js\";\nimport { RetriableDocumentStorageService } from \"./retriableDocumentStorageService.js\";\nimport { convertSnapshotInfoToSnapshot } from \"./utils.js\";\n/**\n * This class wraps the actual storage and make sure no wrong apis are called according to\n * container attach state.\n */\nexport class ContainerStorageAdapter {\n /**\n * Whether the adapter will enforce sending combined summary trees.\n */\n get summarizeProtocolTree() {\n return this._summarizeProtocolTree === true;\n }\n /**\n * Any loading group id (virtualized) snapshot download from storage will be stored here.\n */\n get loadedGroupIdSnapshots() {\n return this._loadedGroupIdSnapshots;\n }\n /**\n * An adapter that ensures we're using detachedBlobStorage up until we connect to a real service, and then\n * after connecting to a real service augments it with retry and combined summary tree enforcement.\n * @param detachedBlobStorage - The detached blob storage to use up until we connect to a real service\n * @param logger - Telemetry logger\n * @param loadingGroupIdSnapshotsFromPendingState - in offline mode, any loading group snapshots we've downloaded from the service that were stored in the pending state\n * @param addProtocolSummaryIfMissing - a callback to permit the container to inspect the summary we're about to\n * upload, and fix it up with a protocol tree if needed\n * @param enableSummarizeProtocolTree - Enable uploading a protocol summary. Note: preference is given to service policy's \"summarizeProtocolTree\" before this value.\n */\n constructor(detachedBlobStorage, logger, \n /**\n * ArrayBufferLikes or utf8 encoded strings, containing blobs from a snapshot\n */\n blobContents = {}, loadingGroupIdSnapshotsFromPendingState, addProtocolSummaryIfMissing, enableSummarizeProtocolTree) {\n this.logger = logger;\n this.blobContents = blobContents;\n this.loadingGroupIdSnapshotsFromPendingState = loadingGroupIdSnapshotsFromPendingState;\n this.addProtocolSummaryIfMissing = addProtocolSummaryIfMissing;\n this.enableSummarizeProtocolTree = enableSummarizeProtocolTree;\n this._loadedGroupIdSnapshots = {};\n this.disposed = false;\n this._storageService = new BlobOnlyStorage(detachedBlobStorage, logger);\n }\n dispose(error) {\n this._storageService?.dispose?.(error);\n this.disposed = true;\n }\n connectToService(service) {\n if (!(this._storageService instanceof BlobOnlyStorage)) {\n return;\n }\n const storageServiceP = service.connectToStorage();\n const retriableStorage = (this._storageService = new RetriableDocumentStorageService(storageServiceP, this.logger));\n // A storage service wrapper which intercept calls to uploadSummaryWithContext and ensure they include\n // the protocol summary, provided single-commit summary is enabled.\n this._storageService = new ProtocolTreeStorageService(retriableStorage, (...props) => {\n this.logger.sendTelemetryEvent({ eventName: \"summarizeProtocolTreeEnabled\" });\n return this.addProtocolSummaryIfMissing(...props);\n }, \n // A callback to ensure we fetch the most updated value of service.policies.summarizeProtocolTree, which could be set\n // based on the response received from the service after connection is established.\n () => {\n // Determine whether or not container should upload the protocol summary along with the summary.\n // This is determined based on what value is set for serve policy's summariProtocolTree value or the enableSummarizeProtocolTree\n // retrievd from the loader options or monitoring context config.\n const shouldSummarizeProtocolTree = service.policies?.summarizeProtocolTree ?? this.enableSummarizeProtocolTree ?? false;\n if (this._summarizeProtocolTree !== shouldSummarizeProtocolTree) {\n this.logger.sendTelemetryEvent({\n eventName: \"isSummarizeProtocolTreeEnabled\",\n details: { value: shouldSummarizeProtocolTree },\n });\n }\n this._summarizeProtocolTree = shouldSummarizeProtocolTree;\n return this._summarizeProtocolTree;\n });\n }\n loadSnapshotFromSnapshotBlobs(snapshotBlobs) {\n for (const [id, value] of Object.entries(snapshotBlobs)) {\n this.blobContents[id] = value;\n }\n }\n clearPendingState() {\n this.loadingGroupIdSnapshotsFromPendingState = undefined;\n }\n get policies() {\n // back-compat 0.40 containerRuntime requests policies even in detached container if storage is present\n // and storage is always present in >=0.41.\n try {\n return this._storageService.policies;\n }\n catch {\n // No-op\n }\n return undefined;\n }\n async getSnapshotTree(version, scenarioName) {\n return this._storageService.getSnapshotTree(version, scenarioName);\n }\n async getSnapshot(snapshotFetchOptions) {\n let snapshot;\n if (this.loadingGroupIdSnapshotsFromPendingState !== undefined &&\n snapshotFetchOptions?.loadingGroupIds !== undefined) {\n const localSnapshot = this.loadingGroupIdSnapshotsFromPendingState[snapshotFetchOptions.loadingGroupIds[0]];\n assert(localSnapshot !== undefined, 0x970 /* Local snapshot must be present */);\n snapshot = convertSnapshotInfoToSnapshot(localSnapshot, localSnapshot.snapshotSequenceNumber);\n }\n else {\n if (this._storageService.getSnapshot === undefined) {\n throw new UsageError(\"getSnapshot api should exist in internal storage in ContainerStorageAdapter\");\n }\n snapshot = await this._storageService.getSnapshot(snapshotFetchOptions);\n }\n // Track the latest snapshot for each loading group id\n const loadingGroupIds = snapshotFetchOptions?.loadingGroupIds;\n assert(snapshot.sequenceNumber !== undefined, 0x971 /* Snapshot must have sequence number */);\n if (loadingGroupIds !== undefined) {\n for (const loadingGroupId of loadingGroupIds) {\n // Do we actually want to update the stored snapshot?\n // What if the incoming snapshot is way newer than the stored snapshot?\n // We only want to update the stored snapshot if the incoming snapshot is newer (stored sequence number < incoming sequence number)\n const storedSeqNum = this._loadedGroupIdSnapshots[loadingGroupId]?.sequenceNumber ?? -1;\n if (storedSeqNum < snapshot.sequenceNumber) {\n this._loadedGroupIdSnapshots[loadingGroupId] = snapshot;\n }\n }\n }\n return snapshot;\n }\n async readBlob(id) {\n const maybeBlob = this.blobContents[id];\n if (maybeBlob !== undefined) {\n if (typeof maybeBlob === \"string\") {\n const blob = stringToBuffer(maybeBlob, \"utf8\");\n return blob;\n }\n return maybeBlob;\n }\n return this._storageService.readBlob(id);\n }\n async getVersions(\n // API used below uses null\n // eslint-disable-next-line @rushstack/no-new-null\n versionId, count, scenarioName, fetchSource) {\n return this._storageService.getVersions(versionId, count, scenarioName, fetchSource);\n }\n async uploadSummaryWithContext(summary, context) {\n return this._storageService.uploadSummaryWithContext(summary, context);\n }\n async downloadSummary(handle) {\n return this._storageService.downloadSummary(handle);\n }\n async createBlob(file) {\n return this._storageService.createBlob(file);\n }\n}\n/**\n * Storage which only supports createBlob() and readBlob(). This is used with IDetachedBlobStorage to support\n * blobs in detached containers.\n */\nclass BlobOnlyStorage {\n constructor(detachedStorage, logger) {\n this.detachedStorage = detachedStorage;\n this.logger = logger;\n /* eslint-disable @typescript-eslint/unbound-method */\n // eslint-disable-next-line @rushstack/no-new-null\n this.getSnapshotTree = this.notCalled;\n this.getSnapshot = this.notCalled;\n this.getVersions = this.notCalled;\n this.write = this.notCalled;\n this.uploadSummaryWithContext = this.notCalled;\n this.downloadSummary = this.notCalled;\n }\n async createBlob(content) {\n return this.verifyStorage().createBlob(content);\n }\n async readBlob(blobId) {\n return this.verifyStorage().readBlob(blobId);\n }\n verifyStorage() {\n if (this.detachedStorage === undefined) {\n throw new UsageError(\"Real storage calls not allowed in Unattached container\");\n }\n return this.detachedStorage;\n }\n get policies() {\n return this.notCalled();\n }\n /* eslint-enable @typescript-eslint/unbound-method */\n notCalled() {\n this.verifyStorage();\n try {\n // some browsers may not populate stack unless exception is thrown\n throw new Error(\"BlobOnlyStorage not implemented method used\");\n }\n catch (error) {\n this.logger.sendTelemetryEvent({ eventName: \"BlobOnlyStorageWrongCall\" }, error);\n throw error;\n }\n }\n}\n// runtime will write a tree to the summary containing \"attachment\" type entries\n// which reference attachment blobs by ID, along with a blob containing the blob redirect table.\n// However, some drivers do not support the \"attachment\" type and will convert them to \"blob\" type\n// entries. We want to avoid saving these to reduce the size of stashed change blobs, but we\n// need to make sure the blob redirect table is saved.\nconst blobsTreeName = \".blobs\";\nconst redirectTableBlobName = \".redirectTable\";\n/**\n * Get blob contents of a snapshot tree from storage (or, ideally, cache)\n */\nexport async function getBlobContentsFromTree(snapshot, storage) {\n const blobs = {};\n if (isInstanceOfISnapshot(snapshot)) {\n const blobContents = snapshot.blobContents;\n for (const [id, content] of blobContents.entries()) {\n // ArrayBufferLike will not survive JSON.stringify()\n blobs[id] = bufferToString(content, \"utf8\");\n }\n }\n else {\n await getBlobContentsFromTreeCore(snapshot, blobs, storage);\n }\n return blobs;\n}\nasync function getBlobContentsFromTreeCore(tree, blobs, storage, root = true) {\n const treePs = [];\n for (const [key, subTree] of Object.entries(tree.trees)) {\n if (root && key === blobsTreeName) {\n treePs.push(getBlobManagerTreeFromTree(subTree, blobs, storage));\n }\n else {\n treePs.push(getBlobContentsFromTreeCore(subTree, blobs, storage, false));\n }\n }\n for (const id of Object.values(tree.blobs)) {\n const blob = await storage.readBlob(id);\n // ArrayBufferLike will not survive JSON.stringify()\n blobs[id] = bufferToString(blob, \"utf8\");\n }\n return Promise.all(treePs);\n}\n// save redirect table from .blobs tree but nothing else\nasync function getBlobManagerTreeFromTree(tree, blobs, storage) {\n const id = tree.blobs[redirectTableBlobName];\n assert(id !== undefined, 0x9ce /* id is undefined in getBlobManagerTreeFromTree */);\n const blob = await storage.readBlob(id);\n // ArrayBufferLike will not survive JSON.stringify()\n blobs[id] = bufferToString(blob, \"utf8\");\n}\n/**\n * Extract blob contents from a snapshot tree with blob contents\n */\nexport function getBlobContentsFromTreeWithBlobContents(snapshot) {\n const blobs = {};\n getBlobContentsFromTreeWithBlobContentsCore(snapshot, blobs);\n return blobs;\n}\nfunction getBlobContentsFromTreeWithBlobContentsCore(tree, blobs, root = true) {\n for (const [key, subTree] of Object.entries(tree.trees)) {\n if (root && key === blobsTreeName) {\n getBlobManagerTreeFromTreeWithBlobContents(subTree, blobs);\n }\n else {\n getBlobContentsFromTreeWithBlobContentsCore(subTree, blobs, false);\n }\n }\n for (const id of Object.values(tree.blobs)) {\n const blob = tree.blobsContents?.[id];\n assert(blob !== undefined, 0x2ec /* \"Blob must be present in blobsContents\" */);\n // ArrayBufferLike will not survive JSON.stringify()\n blobs[id] = bufferToString(blob, \"utf8\");\n }\n}\n// save redirect table from .blobs tree but nothing else\nfunction getBlobManagerTreeFromTreeWithBlobContents(tree, blobs) {\n const id = tree.blobs[redirectTableBlobName];\n assert(id !== undefined, 0x9cf /* id is undefined in getBlobManagerTreeFromTreeWithBlobContents */);\n const blob = tree.blobsContents?.[id];\n assert(blob !== undefined, 0x70f /* Blob must be present in blobsContents */);\n // ArrayBufferLike will not survive JSON.stringify()\n blobs[id] = bufferToString(blob, \"utf8\");\n}\n//# sourceMappingURL=containerStorageAdapter.js.map","/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\nimport { FluidErrorTypes } from \"@fluidframework/core-interfaces/internal\";\n/**\n * Different error types the ClientSession may report out to the Host.\n * @legacy\n * @alpha\n */\nexport const ContainerErrorTypes = {\n ...FluidErrorTypes,\n /**\n * Error indicating an client session has expired. Currently this only happens when GC is allowed on a document and\n * aids in safely deleting unused objects.\n */\n clientSessionExpiredError: \"clientSessionExpiredError\",\n};\n//# sourceMappingURL=error.js.map","/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\nimport { ContainerErrorTypes } from \"@fluidframework/container-definitions/internal\";\nimport { LoggingError, wrapErrorAndLog, } from \"@fluidframework/telemetry-utils/internal\";\n/**\n * Warning emitted when requests to storage are being throttled.\n */\nexport class ThrottlingWarning extends LoggingError {\n constructor(message, retryAfterSeconds, props) {\n super(message, props);\n this.retryAfterSeconds = retryAfterSeconds;\n /**\n * {@inheritDoc @fluidframework/telemetry-utils#IFluidErrorBase.errorType}\n */\n this.errorType = ContainerErrorTypes.throttlingError;\n }\n /**\n * Wrap the given error as a ThrottlingWarning\n * Only preserves the error message, and applies the given retry after to the new warning object\n */\n static wrap(error, retryAfterSeconds, logger) {\n const newErrorFn = (errMsg) => new ThrottlingWarning(errMsg, retryAfterSeconds);\n return wrapErrorAndLog(error, newErrorFn, logger);\n }\n}\n//# sourceMappingURL=error.js.map","/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\nimport { assert } from \"@fluidframework/core-utils/internal\";\nimport { DriverErrorTypes, MessageType, } from \"@fluidframework/driver-definitions/internal\";\nimport { NonRetryableError, isRuntimeMessage } from \"@fluidframework/driver-utils/internal\";\nimport { DataCorruptionError, DataProcessingError, UsageError, extractSafePropertiesFromMessage, isFluidError, normalizeError, safeRaiseEvent, EventEmitterWithErrorHandling, } from \"@fluidframework/telemetry-utils/internal\";\nimport { v4 as uuid } from \"uuid\";\nimport { DeltaQueue } from \"./deltaQueue.js\";\nimport { ThrottlingWarning } from \"./error.js\";\n/**\n * Determines if message was sent by client, not service\n */\nfunction isClientMessage(message) {\n if (isRuntimeMessage(message)) {\n return true;\n }\n switch (message.type) {\n case MessageType.Propose:\n case MessageType.Reject:\n case MessageType.NoOp:\n case MessageType.Accept:\n case MessageType.Summarize: {\n return true;\n }\n default: {\n return false;\n }\n }\n}\n/**\n * Like assert, but logs only if the condition is false, rather than throwing\n * @param condition - The condition to attest too\n * @param logger - The logger to log with\n * @param event - The string or event to log\n * @returns The outcome of the condition\n */\nfunction logIfFalse(condition, logger, event) {\n if (condition) {\n return true;\n }\n const newEvent = typeof event === \"string\"\n ? { eventName: event, category: \"error\" }\n : { category: \"error\", ...event };\n logger.send(newEvent);\n return false;\n}\n/**\n * Manages the flow of both inbound and outbound messages. This class ensures that shared objects receive delta\n * messages in order regardless of possible network conditions or timings causing out of order delivery.\n */\nexport class DeltaManager extends EventEmitterWithErrorHandling {\n get active() {\n return this._active();\n }\n get disposed() {\n return this._closed;\n }\n get IDeltaSender() {\n return this;\n }\n get inbound() {\n return this._inbound;\n }\n get inboundSignal() {\n return this._inboundSignal;\n }\n get initialSequenceNumber() {\n return this.initSequenceNumber;\n }\n get lastSequenceNumber() {\n return this.lastProcessedSequenceNumber;\n }\n get lastMessage() {\n return this.lastProcessedMessage;\n }\n get lastKnownSeqNumber() {\n return this.lastObservedSeqNumber;\n }\n get minimumSequenceNumber() {\n return this.minSequenceNumber;\n }\n /**\n * Tells if current connection has checkpoint information.\n * I.e. we know how far behind the client was at the time of establishing connection\n */\n get hasCheckpointSequenceNumber() {\n // Valid to be called only if we have active connection.\n assert(this.connectionManager.connected, 0x0df /* \"Missing active connection\" */);\n return this._checkpointSequenceNumber !== undefined;\n }\n // Forwarding connection manager properties / IDeltaManager implementation\n get maxMessageSize() {\n return this.connectionManager.maxMessageSize;\n }\n get version() {\n return this.connectionManager.version;\n }\n get serviceConfiguration() {\n return this.connectionManager.serviceConfiguration;\n }\n get outbound() {\n return this.connectionManager.outbound;\n }\n get readOnlyInfo() {\n return this.connectionManager.readOnlyInfo;\n }\n get clientDetails() {\n return this.connectionManager.clientDetails;\n }\n submit(type, contents, batch = false, metadata, compression, referenceSequenceNumber) {\n // Back-compat ADO:3455\n const backCompatRefSeqNum = referenceSequenceNumber ?? this.lastProcessedSequenceNumber;\n const messagePartial = {\n contents,\n metadata,\n referenceSequenceNumber: backCompatRefSeqNum,\n type,\n compression,\n };\n if (!batch) {\n this.flush();\n }\n const message = this.connectionManager.prepareMessageToSend(messagePartial);\n if (message === undefined) {\n return -1;\n }\n assert(isClientMessage(message), 0x419 /* client sends non-client message */);\n if (contents !== undefined) {\n this.opsSize += contents.length;\n }\n this.messageBuffer.push(message);\n if (message.type === MessageType.NoOp) {\n this.noOpCount++;\n }\n this.emit(\"submitOp\", message);\n if (!batch) {\n this.flush();\n }\n return message.clientSequenceNumber;\n }\n submitSignal(content, targetClientId) {\n return this.connectionManager.submitSignal(content, targetClientId);\n }\n flush() {\n const batch = this.messageBuffer;\n if (batch.length === 0) {\n return;\n }\n this.messageBuffer = [];\n // The prepareFlush event allows listeners to append metadata to the batch prior to submission.\n this.emit(\"prepareSend\", batch);\n if (batch.length === 1) {\n assert(batch[0].metadata?.batch === undefined, 0x3c9 /* no batch markup on single message */);\n }\n else {\n assert(batch[0].metadata?.batch === true, 0x3ca /* no start batch markup */);\n assert(batch[batch.length - 1].metadata?.batch === false, 0x3cb /* no end batch markup */);\n }\n this.connectionManager.sendMessages(batch);\n assert(this.messageBuffer.length === 0, 0x3cc /* reentrancy */);\n }\n get connectionProps() {\n return {\n sequenceNumber: this.lastSequenceNumber,\n opsSize: this.opsSize > 0 ? this.opsSize : undefined,\n deltaManagerState: this._disposed ? \"disposed\" : this._closed ? \"closed\" : \"open\",\n ...this.connectionManager.connectionProps,\n };\n }\n /**\n * Log error event with a bunch of internal to DeltaManager information about state of op processing\n * Used to diagnose connectivity issues related to op processing (i.e. cases where for some reason\n * we stop processing ops that results in no processing join op and thus moving to connected state)\n * @param event - Event to log.\n */\n logConnectionIssue(event) {\n assert(this.connectionManager.connected, 0x238 /* \"called only in connected state\" */);\n const pendingSorted = this.pending.sort((a, b) => a.sequenceNumber - b.sequenceNumber);\n this.logger.sendTelemetryEvent({\n ...event,\n // This directly tells us if fetching ops is in flight, and thus likely the reason of\n // stalled op processing\n fetchReason: this.fetchReason,\n // A bunch of useful sequence numbers to understand if we are holding some ops from processing\n lastQueuedSequenceNumber: this.lastQueuedSequenceNumber, // last sequential op\n lastProcessedSequenceNumber: this.lastProcessedSequenceNumber, // same as above, but after processing\n lastObserved: this.lastObservedSeqNumber, // last sequence we ever saw; may have gaps with above.\n // connection info\n ...this.connectionManager.connectionVerboseProps,\n pendingOps: this.pending.length, // Do we have any pending ops?\n pendingFirst: pendingSorted[0]?.sequenceNumber, // is the first pending op the one that we are missing?\n haveHandler: this.handler !== undefined, // do we have handler installed?\n inboundLength: this.inbound.length,\n inboundPaused: this.inbound.paused,\n });\n }\n constructor(serviceProvider, logger, _active, createConnectionManager) {\n super((name, error) => {\n this.logger.sendErrorEvent({\n eventName: \"DeltaManagerEventHandlerException\",\n name: typeof name === \"string\" ? name : undefined,\n }, error);\n this.close(normalizeError(error));\n });\n this.serviceProvider = serviceProvider;\n this.logger = logger;\n this._active = _active;\n this.pending = [];\n // A boolean used to assert that ops are not being sent while processing another op.\n this.currentlyProcessingOps = false;\n // The minimum sequence number and last sequence number received from the server\n this.minSequenceNumber = 0;\n // There are three numbers we track\n // * lastQueuedSequenceNumber is the last queued sequence number. If there are gaps in seq numbers, then this number\n // is not updated until we cover that gap, so it increases each time by 1.\n // * lastObservedSeqNumber is an estimation of last known sequence number for container in storage. It's initially\n // populated at web socket connection time (if storage provides that info) and is updated once ops shows up.\n // It's never less than lastQueuedSequenceNumber\n // * lastProcessedSequenceNumber - last processed sequence number\n this.lastQueuedSequenceNumber = 0;\n this.lastObservedSeqNumber = 0;\n this.lastProcessedSequenceNumber = 0;\n /**\n * Count the number of noops sent by the client which may not be acked\n */\n this.noOpCount = 0;\n /**\n * Track clientSequenceNumber of the last op\n */\n this.lastClientSequenceNumber = 0;\n /**\n * Track down the ops size.\n */\n this.opsSize = 0;\n // The sequence number we initially loaded from\n // In case of reading from a snapshot or pending state, its value will be equal to\n // the last message that got serialized.\n this.initSequenceNumber = 0;\n this._closed = false;\n this._disposed = false;\n this.throttlingIdSet = new Set();\n this.timeTillThrottling = 0;\n this.closeAbortController = new AbortController();\n this.deltaStorageDelayId = uuid();\n this.deltaStreamDelayId = uuid();\n this.messageBuffer = [];\n const props = {\n incomingOpHandler: (messages, reason) => {\n try {\n this.enqueueMessages(messages, reason);\n }\n catch (error) {\n this.logger.sendErrorEvent({ eventName: \"EnqueueMessages_Exception\" }, error);\n this.close(normalizeError(error));\n }\n },\n signalHandler: (signals) => {\n for (const signal of signals) {\n this._inboundSignal.push(signal);\n }\n },\n reconnectionDelayHandler: (delayMs, error) => this.emitDelayInfo(this.deltaStreamDelayId, delayMs, error),\n closeHandler: (error) => this.close(error),\n disconnectHandler: (reason) => this.disconnectHandler(reason),\n connectHandler: (connection) => this.connectHandler(connection),\n pongHandler: (latency) => this.emit(\"pong\", latency),\n readonlyChangeHandler: (readonly, readonlyConnectionReason) => {\n safeRaiseEvent(this, this.logger, \"readonly\", readonly, readonlyConnectionReason);\n },\n establishConnectionHandler: (reason) => this.establishingConnection(reason),\n cancelConnectionHandler: (reason) => this.cancelEstablishingConnection(reason),\n };\n this.connectionManager = createConnectionManager(props);\n this._inbound = new DeltaQueue((op) => {\n this.processInboundMessage(op);\n });\n this._inbound.on(\"error\", (error) => {\n this.close(DataProcessingError.wrapIfUnrecognized(error, \"deltaManagerInboundErrorHandler\", this.lastMessage));\n });\n // Inbound signal queue\n this._inboundSignal = new DeltaQueue((message) => {\n if (this.handler === undefined) {\n throw new Error(\"Attempted to process an inbound signal without a handler attached\");\n }\n this.handler.processSignal({\n ...message,\n content: JSON.parse(message.content),\n });\n });\n this._inboundSignal.on(\"error\", (error) => {\n this.close(normalizeError(error));\n });\n // Initially, all queues are created paused.\n // - outbound is flipped back and forth in setupNewSuccessfulConnection / disconnectFromDeltaStream\n // - inbound & inboundSignal are resumed in attachOpHandler() when we have handler setup\n }\n cancelEstablishingConnection(reason) {\n this.emit(\"cancelEstablishingConnection\", reason);\n }\n establishingConnection(reason) {\n this.emit(\"establishingConnection\", reason);\n }\n connectHandler(connection) {\n this.refreshDelayInfo(this.deltaStreamDelayId);\n const props = this.connectionManager.connectionVerboseProps;\n props.connectionLastQueuedSequenceNumber = this.lastQueuedSequenceNumber;\n props.connectionLastObservedSeqNumber = this.lastObservedSeqNumber;\n const checkpointSequenceNumber = connection.checkpointSequenceNumber;\n this._checkpointSequenceNumber = checkpointSequenceNumber;\n if (checkpointSequenceNumber !== undefined) {\n this.updateLatestKnownOpSeqNumber(checkpointSequenceNumber);\n }\n // We cancel all ops on lost of connectivity, and rely on DDSes to resubmit them.\n // Semantics are not well defined for batches (and they are broken right now on disconnects anyway),\n // but it's safe to assume (until better design is put into place) that batches should not exist\n // across multiple connections. Right now we assume runtime will not submit any ops in disconnected\n // state. As requirements change, so should these checks.\n assert(this.messageBuffer.length === 0, 0x0e9 /* \"messageBuffer is not empty on new connection\" */);\n this.opsSize = 0;\n this.noOpCount = 0;\n this.emit(\"connect\", connection, checkpointSequenceNumber === undefined\n ? undefined\n : this.lastObservedSeqNumber - this.lastSequenceNumber);\n // If we got some initial ops, then we know the gap and call above fetched ops to fill it.\n // Same is true for \"write\" mode even if we have no ops - we will get \"join\" own op very very soon.\n // However if we are connecting as view-only, then there is no good signal to realize if client is behind.\n // Thus we have to hit storage to see if any ops are there.\n if (checkpointSequenceNumber !== undefined) {\n // We know how far we are behind (roughly). If it's non-zero gap, fetch ops right away.\n if (checkpointSequenceNumber > this.lastQueuedSequenceNumber) {\n this.fetchMissingDeltas(\"AfterConnection\");\n }\n // we do not know the gap, and we will not learn about it if socket is quite - have to ask.\n }\n else if (connection.mode === \"read\") {\n this.fetchMissingDeltas(\"AfterReadConnection\");\n }\n }\n /**\n * Sets the sequence number from which inbound messages should be returned\n * @param snapshotSequenceNumber - The sequence number of the snapshot at which the document loaded from.\n * @param lastProcessedSequenceNumber - The last processed sequence number, for offline, it should be greater than the sequence number.\n * Setting lastProcessedSequenceNumber allows the DeltaManager to skip downloading and processing ops that have already been processed.\n */\n async attachOpHandler(minSequenceNumber, snapshotSequenceNumber, handler, prefetchType = \"none\", lastProcessedSequenceNumber = snapshotSequenceNumber) {\n this.initSequenceNumber = snapshotSequenceNumber;\n this.lastProcessedSequenceNumber = lastProcessedSequenceNumber;\n this.minSequenceNumber = minSequenceNumber;\n this.lastQueuedSequenceNumber = lastProcessedSequenceNumber;\n this.lastObservedSeqNumber = lastProcessedSequenceNumber;\n // We will use same check in other places to make sure all the seq number above are set properly.\n assert(this.handler === undefined, 0x0e2 /* \"DeltaManager already has attached op handler!\" */);\n this.handler = handler;\n // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions\n assert(!!this.handler, 0x0e3 /* \"Newly set op handler is null/undefined!\" */);\n // There should be no pending fetch!\n // This API is called right after attachOpHandler by Container.load().\n // We might have connection already and it might have called fetchMissingDeltas() from\n // setupNewSuccessfulConnection. But it should do nothing, because there is no way to fetch ops before\n // we know snapshot sequence number that is set in attachOpHandler. So all such calls should be noop.\n assert(this.fetchReason === undefined, 0x268 /* \"There can't be pending fetch that early in boot sequence!\" */);\n if (this._closed) {\n return;\n }\n this._inbound.resume();\n this._inboundSignal.resume();\n if (prefetchType !== \"none\") {\n const cacheOnly = prefetchType === \"cached\";\n await this.fetchMissingDeltasCore(`DocumentOpen_${prefetchType}`, cacheOnly);\n // Keep going with fetching ops from storage once we have all cached ops in.\n // But do not block load and make this request async / not blocking this api.\n // Ops processing will start once cached ops are in and and will stop when queue is empty\n // (which in most cases will happen when we are done processing cached ops)\n if (cacheOnly) {\n // fire and forget\n this.fetchMissingDeltas(\"PostDocumentOpen\");\n }\n }\n // Ensure there is no need to call this.processPendingOps() at the end of boot sequence\n assert(this.fetchReason !== undefined || this.pending.length === 0, 0x269 /* \"pending ops are not dropped\" */);\n }\n connect(args) {\n const fetchOpsFromStorage = args.fetchOpsFromStorage ?? true;\n logIfFalse(this.handler !== undefined || !fetchOpsFromStorage, this.logger, \"CantFetchWithoutBaseline\"); // can't fetch if no baseline\n // Note: There is race condition here.\n // We want to issue request to storage as soon as possible, to\n // reduce latency of becoming current, thus this code here.\n // But there is no ordering between fetching OPs and connection to delta stream\n // As result, we might be behind by the time we connect to delta stream\n // In case of r/w connection, that's not an issue, because we will hear our\n // own \"join\" message and realize any gap client has in ops.\n // But for view-only connection, we have no such signal, and with no traffic\n // on the wire, we might be always behind.\n // See comment at the end of \"connect\" handler\n if (fetchOpsFromStorage) {\n this.fetchMissingDeltas(args.reason.text);\n }\n this.connectionManager.connect(args.reason, args.mode);\n }\n async getDeltas(from, // inclusive\n to, // exclusive\n fetchReason, callback, cacheOnly) {\n const docService = this.serviceProvider();\n if (docService === undefined) {\n throw new Error(\"Delta manager is not attached\");\n }\n if (this.deltaStorage === undefined) {\n this.deltaStorage = await docService.connectToDeltaStorage();\n }\n let cancelFetch;\n if (to === undefined) {\n // Unbound requests are made to proactively fetch ops, but also get up to date in cases where socket\n // is silent (and connection is \"read\", thus we might not have any data on how far client is behind).\n // Once we have any op coming in from socket, we can cancel it as it's not needed any more.\n // That said, if we have socket connection, make sure we got ops up to checkpointSequenceNumber!\n cancelFetch = (op) => op.sequenceNumber >= this.lastObservedSeqNumber;\n }\n else {\n const lastExpectedOp = to - 1; // make it inclusive!\n // It is possible that due to asynchrony (including await above), required ops were already\n // received through delta stream. Validate that before moving forward.\n if (this.lastQueuedSequenceNumber >= lastExpectedOp) {\n this.logger.sendPerformanceEvent({\n reason: fetchReason,\n eventName: \"ExtraStorageCall\",\n early: true,\n from,\n to,\n ...this.connectionManager.connectionVerboseProps,\n });\n return;\n }\n // Be prepared for the case where webSocket would receive the ops that we are trying to fill through\n // storage. Ideally it should never happen (i.e. ops on socket are always ordered, and thus once we\n // detected gap, this gap can't be filled in later on through websocket).\n // And in practice that does look like the case. The place where this code gets hit is if we lost\n // connection and reconnected (likely to another box), and new socket's initial ops contains these ops.\n cancelFetch = (op) => op.sequenceNumber >= lastExpectedOp;\n }\n const controller = new AbortController();\n let opsFromFetch = false;\n const opListener = (op) => {\n assert(op.sequenceNumber === this.lastQueuedSequenceNumber, 0x23a /* \"seq#'s\" */);\n // Ops that are coming from this request should not cancel itself.\n // This is useless for known ranges (to is defined) as it means request is over either way.\n // And it will cancel unbound request too early, not allowing us to learn where the end of the file is.\n if (!opsFromFetch && cancelFetch(op)) {\n controller.abort(\"DeltaManager getDeltas fetch cancelled\");\n this._inbound.off(\"push\", opListener);\n }\n };\n try {\n this._inbound.on(\"push\", opListener);\n assert(this.closeAbortController.signal.onabort === null, 0x1e8 /* \"reentrancy\" */);\n this.closeAbortController.signal.addEventListener(\"abort\", () => controller.abort(this.closeAbortController.signal.reason));\n const stream = this.deltaStorage.fetchMessages(from, // inclusive\n to, // exclusive\n controller.signal, cacheOnly, fetchReason);\n // eslint-disable-next-line no-constant-condition\n while (true) {\n const result = await stream.read();\n if (result.done) {\n break;\n }\n try {\n opsFromFetch = true;\n callback(result.value);\n }\n finally {\n opsFromFetch = false;\n }\n }\n }\n finally {\n if (controller.signal.aborted) {\n this.logger.sendTelemetryEvent({\n eventName: \"DeltaManager_GetDeltasAborted\",\n fetchReason,\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n reason: controller.signal.reason,\n });\n }\n // eslint-disable-next-line unicorn/no-null, unicorn/prefer-add-event-listener\n this.closeAbortController.signal.onabort = null;\n this._inbound.off(\"push\", opListener);\n assert(!opsFromFetch, 0x289 /* \"logic error\" */);\n }\n }\n /**\n * Closes the connection and clears inbound & outbound queues.\n *\n * Differences from dispose:\n * - close will trigger readonly notification\n * - close emits \"closed\"\n * - close cannot be called after dispose\n */\n close(error) {\n if (this._closed) {\n return;\n }\n this._closed = true;\n this.connectionManager.dispose(error, true /* switchToReadonly */);\n this.clearQueues();\n this.emit(\"closed\", error);\n }\n /**\n * Disposes the connection and clears the inbound & outbound queues.\n *\n * Differences from close:\n * - dispose will emit \"disposed\"\n * - dispose will remove all listeners\n * - dispose can be called after closure\n */\n dispose(error) {\n if (this._disposed) {\n return;\n }\n if (error !== undefined && !isFluidError(error)) {\n throw new UsageError(\"Error must be a Fluid error\");\n }\n this._disposed = true;\n this._closed = true; // We consider \"disposed\" as a further state than \"closed\"\n this.connectionManager.dispose(error, false /* switchToReadonly */);\n this.clearQueues();\n // This needs to be the last thing we do (before removing listeners), as it causes\n // Container to dispose context and break ability of data stores / runtime to \"hear\" from delta manager.\n this.emit(\"disposed\", error);\n this.removeAllListeners();\n }\n clearQueues() {\n this.closeAbortController.abort(\"DeltaManager is closed\");\n this._inbound.clear();\n this._inboundSignal.clear();\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this._inbound.pause();\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this._inboundSignal.pause();\n // Drop pending messages - this will ensure catchUp() does not go into infinite loop\n this.pending = [];\n }\n refreshDelayInfo(id) {\n this.throttlingIdSet.delete(id);\n if (this.throttlingIdSet.size === 0) {\n this.timeTillThrottling = 0;\n }\n }\n disconnectHandler(reason) {\n this.messageBuffer.length = 0;\n this.emit(\"disconnect\", reason.text, reason.error);\n }\n /**\n * Emit info about a delay in service communication on account of throttling.\n * @param id - Id of the connection that is delayed\n * @param delayMs - Duration of the delay\n * @param error - error object indicating the throttling\n */\n emitDelayInfo(id, delayMs, error) {\n const timeNow = Date.now();\n this.throttlingIdSet.add(id);\n if (delayMs > 0 && timeNow + delayMs > this.timeTillThrottling) {\n this.timeTillThrottling = timeNow + delayMs;\n const throttlingWarning = ThrottlingWarning.wrap(error, delayMs / 1000 /* retryAfterSeconds */, this.logger);\n this.emit(\"throttled\", throttlingWarning);\n }\n }\n // returns parts of message (in string format) that should never change for a given message.\n // Used for message comparison. It attempts to avoid comparing fields that potentially may differ.\n // for example, it's not clear if serverMetadata or timestamp property is a property of message or server state.\n // We only extract the most obvious fields that are sufficient (with high probability) to detect sequence number\n // reuse.\n // Also payload goes to telemetry, so no content or anything else that shouldn't be logged for privacy reasons\n // Note: It's possible for a duplicate op to be broadcasted and have everything the same except the timestamp.\n comparableMessagePayload(m) {\n return `${m.clientId}-${m.type}-${m.minimumSequenceNumber}-${m.referenceSequenceNumber}-${m.timestamp}`;\n }\n enqueueMessages(messages, reason, allowGaps = false) {\n if (this.handler === undefined) {\n // We did not setup handler yet.\n // This happens when we connect to web socket faster than we get attributes for container\n // and thus faster than attachOpHandler() is called\n // this.lastProcessedSequenceNumber is still zero, so we can't rely on this.fetchMissingDeltas()\n // to do the right thing.\n this.pending = [...this.pending, ...messages];\n return;\n }\n // Pending ops should never just hang around for nothing.\n // This invariant will stay true through this function execution,\n // so there is no need to process pending ops here.\n // It's responsibility of\n // - attachOpHandler()\n // - fetchMissingDeltas() after it's done with querying storage\n assert(this.pending.length === 0 || this.fetchReason !== undefined, 0x1e9 /* \"Pending ops\" */);\n if (messages.length === 0) {\n return;\n }\n const from = messages[0].sequenceNumber;\n const last = messages[messages.length - 1].sequenceNumber;\n // Report stats about missing and duplicate ops\n // This helps better understand why we fetch ops from storage, and thus may delay\n // getting current / sending ops\n // It's possible that this batch is already too late - do not bother\n if (last > this.lastQueuedSequenceNumber) {\n let prev = from - 1;\n const initialGap = prev - this.lastQueuedSequenceNumber;\n let firstMissing;\n let duplicate = 0;\n let gap = 0;\n // Count all gaps and duplicates\n for (const message of messages) {\n if (message.sequenceNumber === prev) {\n duplicate++;\n }\n else if (message.sequenceNumber !== prev + 1) {\n gap++;\n if (firstMissing === undefined) {\n firstMissing = prev + 1;\n }\n }\n prev = message.sequenceNumber;\n }\n let eventName;\n // Report if we found some issues\n if (duplicate !== 0 ||\n (gap !== 0 && !allowGaps) ||\n (initialGap > 0 && this.fetchReason === undefined)) {\n eventName = \"enqueueMessages\";\n // Also report if we are fetching ops, and same range comes in, thus making this fetch obsolete.\n }\n else if (this.fetchReason !== undefined &&\n this.fetchReason !== reason &&\n from <= this.lastQueuedSequenceNumber + 1 &&\n last > this.lastQueuedSequenceNumber) {\n eventName = \"enqueueMessagesExtraFetch\";\n }\n // Report if there is something to report\n // Do not report when pending fetch is in progress, as such reporting will not\n // correctly take into account pending ops.\n if (eventName !== undefined) {\n this.logger.sendPerformanceEvent({\n eventName,\n reason,\n previousReason: this.prevEnqueueMessagesReason,\n from,\n to: last + 1, // exclusive, being consistent with the other telemetry / APIs\n length: messages.length,\n fetchReason: this.fetchReason,\n duplicate: duplicate > 0 ? duplicate : undefined,\n initialGap: initialGap === 0 ? undefined : initialGap,\n gap: gap > 0 ? gap : undefined,\n firstMissing,\n dmInitialSeqNumber: this.initialSequenceNumber,\n ...this.connectionManager.connectionVerboseProps,\n });\n }\n }\n this.updateLatestKnownOpSeqNumber(messages[messages.length - 1].sequenceNumber);\n const n = this.previouslyProcessedMessage?.sequenceNumber;\n assert(n === undefined || n === this.lastQueuedSequenceNumber, 0x0ec /* \"Unexpected value for previously processed message's sequence number\" */);\n for (const message of messages) {\n // Check that the messages are arriving in the expected order\n if (message.sequenceNumber <= this.lastQueuedSequenceNumber) {\n // Validate that we do not have data loss, i.e. sequencing is reset and started again\n // with numbers that this client already observed before.\n if (this.previouslyProcessedMessage?.sequenceNumber === message.sequenceNumber) {\n const message1 = this.comparableMessagePayload(this.previouslyProcessedMessage);\n const message2 = this.comparableMessagePayload(message);\n if (message1 !== message2) {\n const error = new NonRetryableError(\n // This looks like a data corruption but the culprit was that the file was overwritten\n // in storage. See PR #5882.\n // Likely to be an issue with Fluid Services. Content does not match previous client\n // knowledge about this file. If the file is overwritten for any reason, this error can be\n // hit. One example is that some clients could be submitting ops to two different service\n // instances such that the same sequence number is reused for two different ops.\n // pre-0.58 error message: twoMessagesWithSameSeqNumAndDifferentPayload\n \"Found two messages with the same sequenceNumber but different payloads. Likely to be a \" +\n \"service issue\", DriverErrorTypes.fileOverwrittenInStorage, {\n clientId: this.connectionManager.clientId,\n sequenceNumber: message.sequenceNumber,\n message1,\n message2,\n driverVersion: undefined,\n });\n this.close(error);\n }\n }\n }\n else if (message.sequenceNumber === this.lastQueuedSequenceNumber + 1) {\n this.lastQueuedSequenceNumber = message.sequenceNumber;\n this.previouslyProcessedMessage = message;\n this._inbound.push(message);\n }\n else {\n this.pending.push(message);\n this.fetchMissingDeltas(reason, message.sequenceNumber);\n }\n }\n // When / if we report a gap in ops in the future, we want telemetry to correctly reflect source\n // of prior ops. But if we have some out of order ops (this.pending), then reporting current reason\n // becomes not accurate, as the gap existed before current batch, so we should just report \"unknown\".\n this.prevEnqueueMessagesReason = this.pending.length > 0 ? \"unknown\" : reason;\n }\n processInboundMessage(message) {\n const startTime = Date.now();\n assert(!this.currentlyProcessingOps, 0x3af /* Already processing ops. */);\n this.currentlyProcessingOps = true;\n this.lastProcessedMessage = message;\n const isString = typeof message.clientId === \"string\";\n assert(message.clientId === null || isString, 0x41a /* undefined or string */);\n // All client messages are coming from some client, and should have clientId,\n // and non-client message should not have clientId. But, there are two exceptions:\n // 1. (Legacy) We can see message.type === \"attach\" or \"chunkedOp\" for legacy files before RTM\n // 2. Non-immediate noops (contents: null) can be sent by service without clientId\n if (!isString && isClientMessage(message) && message.type !== MessageType.NoOp) {\n throw new DataCorruptionError(\"Mismatch in clientId\", {\n ...extractSafePropertiesFromMessage(message),\n messageType: message.type,\n });\n }\n // Validate client sequence number has no gap. Decrement the noOpCount by gap\n // If the count ends up negative, that means we have a real gap and throw error\n if (this.connectionManager.clientId !== undefined &&\n this.connectionManager.clientId === message.clientId) {\n if (message.type === MessageType.NoOp) {\n this.noOpCount--;\n }\n const clientSeqNumGap = message.clientSequenceNumber - this.lastClientSequenceNumber - 1;\n this.noOpCount -= clientSeqNumGap;\n if (this.noOpCount < 0) {\n throw new Error(`gap in client sequence number: ${clientSeqNumGap}`);\n }\n this.lastClientSequenceNumber = message.clientSequenceNumber;\n }\n this.connectionManager.beforeProcessingIncomingOp(message);\n // Watch the minimum sequence number and be ready to update as needed\n if (this.minSequenceNumber > message.minimumSequenceNumber) {\n // This indicates that an invalid series of ops was received by this client.\n // In the unlikely case where these ops have been truly sequenced and persisted to storage,\n // this document is corrupted - It will fail here on boot every time.\n // The more likely scenario, based on the realities of production service operation, is that\n // something has changed out from under the file on the server, such that the service lost some ops\n // which this client already processed - the very ops that made this _next_ op to appear invalid.\n // In this case, only this client will fail (and lose this recent data), but others will be able to connect and continue.\n throw DataProcessingError.create(\n // error message through v0.57: msnMovesBackwards\n // error message through v2.1: \"Found a lower minimumSequenceNumber (msn) than previously recorded\",\n \"Invalid MinimumSequenceNumber from service - document may have been restored to previous state\", \"DeltaManager.processInboundMessage\", message, {\n clientId: this.connectionManager.clientId,\n });\n }\n // Client ops: MSN has to be lower than sequence #, as client can continue to send ops with same\n // reference sequence number as this op.\n // System ops (when no clients are connected) are the only ops where equation is possible.\n const diff = message.sequenceNumber - message.minimumSequenceNumber;\n if (diff < 0 || (diff === 0 && message.clientId !== null)) {\n throw new DataCorruptionError(\"MSN has to be lower than sequence #\", extractSafePropertiesFromMessage(message));\n }\n this.minSequenceNumber = message.minimumSequenceNumber;\n if (message.sequenceNumber !== this.lastProcessedSequenceNumber + 1) {\n // pre-0.58 error message: nonSequentialSequenceNumber\n throw new DataCorruptionError(\"Found a non-Sequential sequenceNumber\", {\n ...extractSafePropertiesFromMessage(message),\n clientId: this.connectionManager.clientId,\n });\n }\n this.lastProcessedSequenceNumber = message.sequenceNumber;\n // a bunch of code assumes that this is true\n assert(this.lastProcessedSequenceNumber <= this.lastObservedSeqNumber, 0x267 /* \"lastObservedSeqNumber should be updated first\" */);\n if (this.handler === undefined) {\n throw new Error(\"Attempted to process an inbound message without a handler attached\");\n }\n this.handler.process(message);\n this.currentlyProcessingOps = false;\n const endTime = Date.now();\n // Should be last, after changing this.lastProcessedSequenceNumber above, as many callers\n // test this.lastProcessedSequenceNumber instead of using op.sequenceNumber itself.\n this.emit(\"op\", message, endTime - startTime);\n }\n /**\n * Retrieves the missing deltas between the given sequence numbers\n */\n fetchMissingDeltas(reasonArg, to) {\n this.fetchMissingDeltasCore(reasonArg, false /* cacheOnly */, to).catch((error) => {\n this.logger.sendErrorEvent({ eventName: \"fetchMissingDeltasException\" }, error);\n });\n }\n /**\n * Retrieves the missing deltas between the given sequence numbers\n */\n async fetchMissingDeltasCore(reason, cacheOnly, to) {\n // Exit out early if we're already fetching deltas\n if (this.fetchReason !== undefined) {\n return;\n }\n if (this._closed) {\n this.logger.sendTelemetryEvent({\n eventName: \"fetchMissingDeltasClosedConnection\",\n reason,\n });\n return;\n }\n if (this.handler === undefined) {\n // We do not poses yet any information\n assert(this.lastQueuedSequenceNumber === 0, 0x26b /* \"initial state\" */);\n return;\n }\n try {\n let from = this.lastQueuedSequenceNumber + 1;\n const n = this.previouslyProcessedMessage?.sequenceNumber;\n if (n !== undefined) {\n // If we already processed at least one op, then we have this.previouslyProcessedMessage populated\n // and can use it to validate that we are operating on same file, i.e. it was not overwritten.\n // Knowing about this mechanism, we could ask for op we already observed to increase validation.\n // This is especially useful when coming out of offline mode or loading from\n // very old cached (by client / driver) snapshot.\n assert(n === this.lastQueuedSequenceNumber, 0x0f2 /* \"previouslyProcessedMessage\" */);\n assert(from > 1, 0x0f3 /* \"not positive\" */);\n from--;\n }\n const fetchReason = `${reason}_fetch`;\n this.fetchReason = fetchReason;\n await this.getDeltas(from, to, fetchReason, (messages) => {\n this.refreshDelayInfo(this.deltaStorageDelayId);\n this.enqueueMessages(messages, fetchReason);\n }, cacheOnly);\n }\n catch (error) {\n this.logger.sendErrorEvent({ eventName: \"GetDeltas_Exception\" }, error);\n this.close(normalizeError(error));\n }\n finally {\n this.refreshDelayInfo(this.deltaStorageDelayId);\n this.fetchReason = undefined;\n this.processPendingOps(reason);\n }\n }\n /**\n * Sorts pending ops and attempts to apply them\n */\n processPendingOps(reason) {\n if (this._closed) {\n return;\n }\n assert(this.handler !== undefined, 0x26c /* \"handler should be installed\" */);\n const pendingSorted = this.pending.sort((a, b) => a.sequenceNumber - b.sequenceNumber);\n this.pending = [];\n // Given that we do not track where these ops came from any more, it's not very\n // actionably to report gaps in this range.\n this.enqueueMessages(pendingSorted, `${reason}_pending`, true /* allowGaps */);\n // Re-entrancy is ignored by fetchMissingDeltas, execution will come here when it's over\n if (this.fetchReason === undefined) {\n // See issue #7312 for more details\n // We observe cases where client gets into situation where it is not aware of missing ops\n // (i.e. client being behind), and as such, does not attempt to fetch them.\n // In some cases client may not have enough signal (example - \"read\" connection that is silent -\n // there is no easy way for client to realize it's behind, see a bit of commentary / logic at the\n // end of setupNewSuccessfulConnection). In other cases it should be able to learn that info (\"write\"\n // connection, learn by receiving its own join op), but data suggest it does not happen.\n // In 50% of these cases we do know we are behind through checkpointSequenceNumber on connection object\n // and thus can leverage that to trigger recovery. But this is not going to solve all the problems\n // (the other 50%), and thus these errors below should be looked at even if code below results in\n // recovery.\n // eslint-disable-next-line unicorn/no-lonely-if -- Docs make more sense like this\n if (this.lastQueuedSequenceNumber < this.lastObservedSeqNumber) {\n this.fetchMissingDeltas(\"OpsBehind\");\n }\n }\n }\n updateLatestKnownOpSeqNumber(seq) {\n if (this.lastObservedSeqNumber < seq) {\n this.lastObservedSeqNumber = seq;\n }\n }\n}\n//# sourceMappingURL=deltaManager.js.map","/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\nimport { performanceNow } from \"@fluid-internal/client-utils\";\nimport { createMultiSinkLogger, eventNamespaceSeparator, formatTick, } from \"@fluidframework/telemetry-utils/internal\";\n// This import style is necessary to ensure the emitted JS code works in both CJS and ESM.\nimport debugPkg from \"debug\";\nconst { debug: registerDebug } = debugPkg;\n/**\n * Implementation of debug logger\n */\nexport class DebugLogger {\n /**\n * Mix in debug logger with another logger.\n * Returned logger will output events to both newly created debug logger, as well as base logger\n * @param namespace - Telemetry event name prefix to add to all events\n * @param properties - Base properties to add to all events\n * @param propertyGetters - Getters to add additional properties to all events\n * @param baseLogger - Base logger to output events (in addition to debug logger being created). Can be undefined.\n */\n static mixinDebugLogger(namespace, baseLogger, properties) {\n // Setup base logger upfront, such that host can disable it (if needed)\n const debug = registerDebug(namespace);\n // Create one for errors that is always enabled\n // It can be silenced by replacing console.error if the debug namespace is not enabled.\n const debugErr = registerDebug(namespace);\n debugErr.log = function (...args) {\n if (debug.enabled === true) {\n // if the namespace is enabled, just use the default logger\n registerDebug.log(...args);\n }\n else {\n // other wise, use the console logger (which could be replaced and silenced)\n console.error(...args);\n }\n };\n debugErr.enabled = true;\n return createMultiSinkLogger({\n namespace,\n loggers: [baseLogger, new DebugLogger(debug, debugErr)],\n properties,\n tryInheritProperties: true,\n });\n }\n constructor(debug, debugErr) {\n this.debug = debug;\n this.debugErr = debugErr;\n }\n /**\n * Send an event to debug loggers\n *\n * @param event - the event to send\n */\n send(event) {\n const newEvent = { ...event };\n const isError = newEvent.category === \"error\";\n let logger = isError ? this.debugErr : this.debug;\n // Use debug's coloring schema for base of the event\n const index = event.eventName.lastIndexOf(eventNamespaceSeparator);\n const name = event.eventName.slice(Math.max(0, index + 1));\n if (index > 0) {\n logger = logger.extend(event.eventName.slice(0, index));\n }\n newEvent.eventName = undefined;\n let tick = \"\";\n tick = `tick=${formatTick(performanceNow())}`;\n // Extract stack to put it last, but also to avoid escaping '\\n' in it by JSON.stringify below\n const stack = newEvent.stack ?? \"\";\n newEvent.stack = undefined;\n // Watch out for circular references - they can come from two sources\n // 1) error object - we do not control it and should remove it and retry\n // 2) properties supplied by telemetry caller - that's a bug that should be addressed!\n let payload;\n try {\n payload = JSON.stringify(newEvent);\n }\n catch {\n newEvent.error = undefined;\n payload = JSON.stringify(newEvent);\n }\n if (payload === \"{}\") {\n payload = \"\";\n }\n // Force errors out, to help with diagnostics\n if (isError) {\n logger.enabled = true;\n }\n // Print multi-line.\n // eslint-disable-next-line @typescript-eslint/no-base-to-string\n logger(`${name} ${payload} ${tick} ${stack}`);\n }\n}\n//# sourceMappingURL=debugLogger.js.map","/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\nimport { LoaderHeader, } from \"@fluidframework/container-definitions/internal\";\nimport { PerformanceEvent, createChildMonitoringContext, mixinMonitoringContext, sessionStorageConfigProvider, } from \"@fluidframework/telemetry-utils/internal\";\nimport { v4 as uuid } from \"uuid\";\nimport { Container } from \"./container.js\";\nimport { DebugLogger } from \"./debugLogger.js\";\nimport { pkgVersion } from \"./packageVersion.js\";\nimport { getAttachedContainerStateFromSerializedContainer, tryParseCompatibleResolvedUrl, } from \"./utils.js\";\nfunction ensureResolvedUrlDefined(resolved) {\n if (resolved === undefined) {\n throw new Error(`Object is not a IResolveUrl.`);\n }\n}\n/**\n * @internal\n */\nexport class RelativeLoader {\n constructor(container, loader) {\n this.container = container;\n this.loader = loader;\n }\n async resolve(request) {\n if (request.url.startsWith(\"/\")) {\n ensureResolvedUrlDefined(this.container.resolvedUrl);\n const container = await this.container.clone({\n resolvedUrl: { ...this.container.resolvedUrl },\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n version: request.headers?.[LoaderHeader.version] ?? undefined,\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n loadMode: request.headers?.[LoaderHeader.loadMode],\n }, {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n canReconnect: request.headers?.[LoaderHeader.reconnect],\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n clientDetailsOverride: request.headers?.[LoaderHeader.clientDetails],\n });\n return container;\n }\n if (this.loader === undefined) {\n throw new Error(\"Cannot resolve external containers\");\n }\n return this.loader.resolve(request);\n }\n}\n/**\n * Manages Fluid resource loading\n * @legacy\n * @alpha\n *\n * @remarks The Loader class is deprecated and will be removed in a future release. Use the free-form functions instead (See issue #24450 for more details).\n */\nexport class Loader {\n constructor(loaderProps) {\n const { urlResolver, documentServiceFactory, codeLoader, options, scope, logger, configProvider, protocolHandlerBuilder, } = loaderProps;\n const telemetryProps = {\n loaderId: uuid(),\n loaderVersion: pkgVersion,\n };\n const subMc = mixinMonitoringContext(DebugLogger.mixinDebugLogger(\"fluid:telemetry\", logger, {\n all: telemetryProps,\n }), sessionStorageConfigProvider.value, configProvider);\n this.services = {\n urlResolver,\n documentServiceFactory,\n codeLoader,\n options: options ?? {},\n scope: options?.provideScopeLoader === false ? { ...scope } : { ...scope, ILoader: this },\n protocolHandlerBuilder,\n subLogger: subMc.logger,\n };\n this.mc = createChildMonitoringContext({\n logger: this.services.subLogger,\n namespace: \"Loader\",\n });\n }\n async createDetachedContainer(codeDetails, createDetachedProps) {\n return Container.createDetached({\n ...createDetachedProps,\n ...this.services,\n }, codeDetails);\n }\n async rehydrateDetachedContainerFromSnapshot(snapshot, createDetachedProps) {\n return Container.rehydrateDetachedFromSnapshot({\n ...createDetachedProps,\n ...this.services,\n }, snapshot);\n }\n async resolve(request, pendingLocalState) {\n const eventName = pendingLocalState === undefined ? \"Resolve\" : \"ResolveWithPendingState\";\n return PerformanceEvent.timedExecAsync(this.mc.logger, { eventName }, async () => {\n return this.resolveCore(request, getAttachedContainerStateFromSerializedContainer(pendingLocalState));\n });\n }\n async resolveCore(request, pendingLocalState) {\n const resolvedAsFluid = await this.services.urlResolver.resolve(request);\n ensureResolvedUrlDefined(resolvedAsFluid);\n // Parse URL into data stores\n const parsed = tryParseCompatibleResolvedUrl(resolvedAsFluid.url);\n if (parsed === undefined) {\n throw new Error(`Invalid URL ${resolvedAsFluid.url}`);\n }\n if (pendingLocalState !== undefined) {\n const parsedPendingUrl = tryParseCompatibleResolvedUrl(pendingLocalState.url);\n if (parsedPendingUrl?.id !== parsed.id ||\n parsedPendingUrl?.path.replace(/\\/$/, \"\") !== parsed.path.replace(/\\/$/, \"\")) {\n const message = `URL ${resolvedAsFluid.url} does not match pending state URL ${pendingLocalState.url}`;\n throw new Error(message);\n }\n }\n request.headers ??= {};\n // If set in both query string and headers, use query string. Also write the value from the query string into the header either way.\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n request.headers[LoaderHeader.version] =\n parsed.version ?? request.headers[LoaderHeader.version];\n return this.loadContainer(request, resolvedAsFluid, pendingLocalState);\n }\n async loadContainer(request, resolvedUrl, pendingLocalState) {\n return Container.load({\n resolvedUrl,\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n version: request.headers?.[LoaderHeader.version] ?? undefined,\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n loadMode: request.headers?.[LoaderHeader.loadMode],\n pendingLocalState,\n }, {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n canReconnect: request.headers?.[LoaderHeader.reconnect],\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n clientDetailsOverride: request.headers?.[LoaderHeader.clientDetails],\n ...this.services,\n });\n }\n}\n//# sourceMappingURL=loader.js.map","/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\nimport { TypedEventEmitter } from \"@fluid-internal/client-utils\";\nimport { assert, Timer } from \"@fluidframework/core-utils/internal\";\nimport { isRuntimeMessage } from \"@fluidframework/driver-utils/internal\";\nconst defaultNoopTimeFrequency = 2000;\nconst defaultNoopCountFrequency = 50;\n// Here are key considerations when deciding conditions for when to send non-immediate noops:\n// 1. Sending them too often results in increase in file size and bandwidth, as well as catch up performance\n// 2. Sending too infrequently ensures that collab window is large, and as result Sequence DDS would have\n// large catchUp blobs - see Issue #6364\n// 3. Similarly, processes that rely on \"core\" snapshot (and can't parse trailing ops, including above), like search\n// parser in SPO, will result in non-accurate results due to presence of catch up blobs.\n// 4. Ordering service used 250ms timeout to coalesce non-immediate noops. It was changed to 2000 ms to allow more\n// aggressive noop sending from client side.\n// 5. Number of ops sent by all clients is proportional to number of \"write\" clients (every client sends noops),\n// but number of sequenced noops is a function of time (one op per 2 seconds at most).\n// We should consider impact to both outbound traffic (might be huge, depends on number of clients) and file size.\n// Please also see Issue #5629 for more discussions.\n//\n// With that, the current algorithm is as follows:\n// 1. Sent noop 2000 ms of receiving an op if no ops were sent by this client within this timeframe.\n// This will ensure that MSN moves forward with reasonable speed. If that results in too many sequenced noops,\n// server timeout of 2000ms should be reconsidered to be increased.\n// 2. If there are more than 50 ops received without sending any ops, send noop to keep collab window small.\n// Note that system ops (including noops themselves) are excluded, so it's 1 noop per 50 real ops.\nexport class NoopHeuristic extends TypedEventEmitter {\n constructor(NoopTimeFrequency = defaultNoopTimeFrequency, NoopCountFrequency = defaultNoopCountFrequency) {\n super();\n this.NoopCountFrequency = NoopCountFrequency;\n this.opsProcessedSinceOpSent = 0;\n if (NoopTimeFrequency !== Number.POSITIVE_INFINITY) {\n this.timer = new Timer(NoopTimeFrequency, () => {\n // We allow the timer to expire even if an op is sent or we disconnect.\n // This condition is to guard against trying to send a noop anyway in that case.\n if (this.opsProcessedSinceOpSent !== 0) {\n this.emit(\"wantsNoop\");\n }\n });\n }\n }\n /**\n * Schedules as ack to the server to update the reference sequence number\n */\n notifyMessageProcessed(message) {\n // We don't acknowledge no-ops to avoid acknowledgement cycles (i.e. ack the MSN\n // update, which updates the MSN, then ack the update, etc...).\n // Intent here is for runtime (and DDSes) not to keep too much tracking state / memory\n // due to runtime ops from other clients.\n if (!isRuntimeMessage(message)) {\n return;\n }\n this.opsProcessedSinceOpSent++;\n if (this.opsProcessedSinceOpSent === this.NoopCountFrequency) {\n // Wait to send a noop if we are still synchronously processing ops. This guards against two things:\n // 1. If we're processing many ops, we may pass the frequency threshold many times. We only need to send one noop at the very end in this case.\n // 2. We may send another (non-noop) op in response to processing those ops, e.g. an Accept op.\n queueMicrotask(() => {\n if (this.opsProcessedSinceOpSent >= this.NoopCountFrequency) {\n this.emit(\"wantsNoop\");\n assert(this.opsProcessedSinceOpSent === 0, 0x243 /* \"Expected a noop to be synchronously sent\" */);\n }\n return;\n });\n }\n if (this.timer !== undefined) {\n // Start the timer if we newly have ops that want a noop.\n // If the timer was already running (e.g. we surpassed the op count and sent a noop) this will reset it to its full duration.\n if (this.opsProcessedSinceOpSent === 1) {\n this.timer.restart();\n }\n assert(this.timer.hasTimer, 0x242 /* \"has timer\" */);\n }\n }\n notifyDisconnect() {\n // No need to noop for any ops processed prior to disconnect - we are already removed from MSN calculation.\n this.opsProcessedSinceOpSent = 0;\n }\n notifyMessageSent() {\n // Sending any message is as good as a noop for updating MSN.\n this.opsProcessedSinceOpSent = 0;\n }\n}\n//# sourceMappingURL=noopHeuristic.js.map","/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n/**\n * @legacy\n * @alpha\n */\nexport var LoaderCachingPolicy;\n(function (LoaderCachingPolicy) {\n /**\n * The loader should not implement any prefetching or caching policy.\n */\n LoaderCachingPolicy[LoaderCachingPolicy[\"NoCaching\"] = 0] = \"NoCaching\";\n /**\n * The loader should implement prefetching policy, i.e. it should prefetch resources from the latest snapshot.\n */\n LoaderCachingPolicy[LoaderCachingPolicy[\"Prefetch\"] = 1] = \"Prefetch\";\n})(LoaderCachingPolicy || (LoaderCachingPolicy = {}));\n/**\n * @legacy\n * @alpha\n */\nexport var FetchSource;\n(function (FetchSource) {\n FetchSource[\"default\"] = \"default\";\n FetchSource[\"noCache\"] = \"noCache\";\n})(FetchSource || (FetchSource = {}));\n//# sourceMappingURL=storage.js.map","/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\nimport { stringToBuffer } from \"@fluid-internal/client-utils\";\nimport { Timer, assert } from \"@fluidframework/core-utils/internal\";\nimport { FetchSource, } from \"@fluidframework/driver-definitions/internal\";\nimport { getSnapshotTree } from \"@fluidframework/driver-utils/internal\";\nimport { PerformanceEvent, UsageError, createChildMonitoringContext, } from \"@fluidframework/telemetry-utils/internal\";\nimport { getBlobContentsFromTree, } from \"./containerStorageAdapter.js\";\nimport { convertSnapshotToSnapshotInfo, getDocumentAttributes } from \"./utils.js\";\n/**\n * Helper class to manage the state of the container needed for proper serialization.\n *\n * It holds the pendingLocalState the container was rehydrated from (if any),\n * as well as the snapshot to be used for serialization.\n * It also keeps track of container dirty state and which local ops have been processed\n */\nexport class SerializedStateManager {\n /**\n * @param pendingLocalState - The pendingLocalState being rehydrated, if any (undefined when loading directly from storage)\n * @param subLogger - Container's logger to use as parent for our logger\n * @param storageAdapter - Storage adapter for fetching snapshots\n * @param _offlineLoadEnabled - Is serializing/rehydrating containers allowed?\n * @param containerEvent - Source of the \"saved\" event when the container has all its pending state uploaded\n * @param containerDirty - Is the container \"dirty\"? That's the opposite of \"saved\" - there is pending state that may not have been received yet by the service.\n */\n constructor(pendingLocalState, subLogger, storageAdapter, _offlineLoadEnabled, containerEvent, containerDirty, supportGetSnapshotApi, snapshotRefreshTimeoutMs) {\n this.pendingLocalState = pendingLocalState;\n this.storageAdapter = storageAdapter;\n this._offlineLoadEnabled = _offlineLoadEnabled;\n this.containerDirty = containerDirty;\n this.supportGetSnapshotApi = supportGetSnapshotApi;\n this.processedOps = [];\n this.lastSavedOpSequenceNumber = 0;\n this.snapshotRefreshTimeoutMs = 60 * 60 * 24 * 1000;\n this.mc = createChildMonitoringContext({\n logger: subLogger,\n namespace: \"serializedStateManager\",\n });\n this.snapshotRefreshTimeoutMs = snapshotRefreshTimeoutMs ?? this.snapshotRefreshTimeoutMs;\n this.refreshTimer = new Timer(this.snapshotRefreshTimeoutMs, () => this.tryRefreshSnapshot());\n // special case handle. Obtaining the last saved op seq num to avoid\n // refreshing the snapshot before we have processed it. It could cause\n // a subsequent stashing to have a newer snapshot than allowed.\n if (pendingLocalState && pendingLocalState.savedOps.length > 0) {\n const savedOpsSize = pendingLocalState.savedOps.length;\n this.lastSavedOpSequenceNumber =\n pendingLocalState.savedOps[savedOpsSize - 1].sequenceNumber;\n }\n containerEvent.on(\"saved\", () => this.updateSnapshotAndProcessedOpsMaybe());\n }\n get offlineLoadEnabled() {\n return this._offlineLoadEnabled;\n }\n /**\n * Promise that will resolve (or reject) once we've tried to download the latest snapshot(s) from storage\n * only intended to be used for testing purposes.\n * @returns The snapshot sequence number associated with the latest fetched snapshot\n */\n get refreshSnapshotP() {\n return this._refreshSnapshotP;\n }\n /**\n * Called whenever an incoming op is processed by the Container\n */\n addProcessedOp(message) {\n if (this.offlineLoadEnabled) {\n this.processedOps.push(message);\n this.updateSnapshotAndProcessedOpsMaybe();\n }\n }\n /**\n * This wraps the basic functionality of fetching the snapshot for this container during Container load.\n *\n * If we have pendingLocalState, we get the snapshot from there.\n * Otherwise, fetch it from storage (according to specifiedVersion if provided).\n *\n * @param specifiedVersion - If a version is specified and we don't have pendingLocalState, fetch this version from storage.\n * @param supportGetSnapshotApi - a boolean indicating whether to use the fetchISnapshot or fetchISnapshotTree.\n * @returns The snapshot to boot the container from\n */\n async fetchSnapshot(specifiedVersion) {\n if (this.pendingLocalState === undefined) {\n const { baseSnapshot, version } = await getSnapshot(this.mc, this.storageAdapter, this.supportGetSnapshotApi(), specifiedVersion);\n const baseSnapshotTree = getSnapshotTree(baseSnapshot);\n // non-interactive clients will not have any pending state we want to save\n if (this.offlineLoadEnabled) {\n const snapshotBlobs = await getBlobContentsFromTree(baseSnapshot, this.storageAdapter);\n const attributes = await getDocumentAttributes(this.storageAdapter, baseSnapshotTree);\n this.snapshot = {\n baseSnapshot: baseSnapshotTree,\n snapshotBlobs,\n snapshotSequenceNumber: attributes.sequenceNumber,\n };\n this.refreshTimer.start();\n }\n return { baseSnapshot, version };\n }\n else {\n const { baseSnapshot, snapshotBlobs } = this.pendingLocalState;\n const attributes = await getDocumentAttributes(this.storageAdapter, baseSnapshot);\n this.snapshot = {\n baseSnapshot,\n snapshotBlobs,\n snapshotSequenceNumber: attributes.sequenceNumber,\n };\n this.tryRefreshSnapshot();\n const blobContents = new Map();\n for (const [id, value] of Object.entries(snapshotBlobs)) {\n blobContents.set(id, stringToBuffer(value, \"utf8\"));\n }\n const iSnapshot = {\n sequenceNumber: this.snapshot.snapshotSequenceNumber,\n snapshotTree: baseSnapshot,\n blobContents,\n latestSequenceNumber: undefined,\n ops: [],\n snapshotFormatV: 1,\n };\n return { baseSnapshot: iSnapshot, version: undefined };\n }\n }\n tryRefreshSnapshot() {\n if (this.mc.config.getBoolean(\"Fluid.Container.enableOfflineSnapshotRefresh\") === true &&\n this._refreshSnapshotP === undefined &&\n this.latestSnapshot === undefined) {\n // Don't block on the refresh snapshot call - it is for the next time we serialize, not booting this incarnation\n this._refreshSnapshotP = this.refreshLatestSnapshot(this.supportGetSnapshotApi());\n this._refreshSnapshotP\n .catch((error) => {\n this.mc.logger.sendTelemetryEvent({\n eventName: \"RefreshLatestSnapshotFailed\",\n error,\n });\n })\n .finally(() => {\n this._refreshSnapshotP = undefined;\n });\n }\n }\n /**\n * Fetch the latest snapshot for the container, including delay-loaded groupIds if pendingLocalState was provided and contained any groupIds.\n * Note that this will update the StorageAdapter's cached snapshots for the groupIds (if present)\n *\n * @param supportGetSnapshotApi - a boolean indicating whether to use the fetchISnapshot or fetchISnapshotTree (must be true to fetch by groupIds)\n */\n async refreshLatestSnapshot(supportGetSnapshotApi) {\n this.latestSnapshot = await getLatestSnapshotInfo(this.mc, this.storageAdapter, supportGetSnapshotApi);\n // These are loading groupIds that the containerRuntime has requested over its lifetime.\n // We will fetch the latest snapshot for the groupIds, which will update storageAdapter.loadedGroupIdSnapshots's cache\n const downloadedGroupIds = Object.keys(this.storageAdapter.loadedGroupIdSnapshots);\n if (supportGetSnapshotApi && downloadedGroupIds.length > 0) {\n assert(this.storageAdapter.getSnapshot !== undefined, 0x972 /* getSnapshot should exist */);\n // (This is a separate network call from above because it requires work for storage to add a special base groupId)\n const snapshot = await this.storageAdapter.getSnapshot({\n versionId: undefined,\n scenarioName: \"getLatestSnapshotInfo\",\n cacheSnapshot: false,\n loadingGroupIds: downloadedGroupIds,\n fetchSource: FetchSource.noCache,\n });\n assert(snapshot !== undefined, 0x973 /* Snapshot should exist */);\n }\n return this.updateSnapshotAndProcessedOpsMaybe();\n }\n /**\n * Updates class snapshot and processedOps if we have a new snapshot and it's among processedOps range.\n */\n updateSnapshotAndProcessedOpsMaybe() {\n const snapshotSequenceNumber = this.latestSnapshot?.snapshotSequenceNumber;\n if (snapshotSequenceNumber === undefined ||\n this.processedOps.length === 0 ||\n this.processedOps[this.processedOps.length - 1].sequenceNumber <\n this.lastSavedOpSequenceNumber ||\n this.containerDirty()) {\n // can't refresh latest snapshot until we have processed the ops up to it.\n // Pending state would be behind the latest snapshot.\n return -1;\n }\n const firstProcessedOpSequenceNumber = this.processedOps[0].sequenceNumber;\n const lastProcessedOpSequenceNumber = this.processedOps[this.processedOps.length - 1].sequenceNumber;\n if (snapshotSequenceNumber < firstProcessedOpSequenceNumber) {\n // Snapshot seq number is older than our first processed op, which could mean we're fetching\n // the same snapshot that we already have or snapshot is too old, implicating an unexpected behavior.\n this.mc.logger.sendTelemetryEvent({\n eventName: \"OldSnapshotFetchWhileRefreshing\",\n snapshotSequenceNumber,\n firstProcessedOpSequenceNumber,\n lastProcessedOpSequenceNumber,\n stashedSnapshotSequenceNumber: this.snapshot?.snapshotSequenceNumber,\n });\n this.latestSnapshot = undefined;\n this.refreshTimer.restart();\n }\n else if (snapshotSequenceNumber <= lastProcessedOpSequenceNumber) {\n // Snapshot seq num is between the first and last processed op.\n // Remove the ops that are already part of the snapshot\n this.processedOps.splice(0, snapshotSequenceNumber - firstProcessedOpSequenceNumber + 1);\n this.snapshot = this.latestSnapshot;\n this.latestSnapshot = undefined;\n this.refreshTimer.restart();\n this.mc.logger.sendTelemetryEvent({\n eventName: \"SnapshotRefreshed\",\n snapshotSequenceNumber,\n firstProcessedOpSequenceNumber,\n newFirstProcessedOpSequenceNumber: this.processedOps.length === 0 ? undefined : this.processedOps[0].sequenceNumber,\n });\n }\n return snapshotSequenceNumber;\n }\n /**\n * When the Container attaches, we need to stash the initial snapshot (a form of the attach summary).\n * This method is only meant to be used by Container.attach() to set the initial\n * base snapshot when attaching.\n * @param snapshot - snapshot and blobs collected while attaching (a form of the attach summary)\n */\n setInitialSnapshot(snapshot) {\n if (this.offlineLoadEnabled) {\n assert(this.snapshot === undefined, 0x937 /* inital snapshot should only be defined once */);\n assert(snapshot !== undefined, 0x938 /* attachment snapshot should be defined */);\n const { baseSnapshot, snapshotBlobs } = snapshot;\n const attributesHash = \".protocol\" in baseSnapshot.trees\n ? baseSnapshot.trees[\".protocol\"].blobs.attributes\n : baseSnapshot.blobs[\".attributes\"];\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n const attributes = JSON.parse(snapshotBlobs[attributesHash]);\n assert(\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n attributes.sequenceNumber === 0, 0x939 /* trying to set a non attachment snapshot */);\n this.snapshot = {\n ...snapshot,\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n snapshotSequenceNumber: attributes.sequenceNumber,\n };\n this.refreshTimer.start();\n }\n }\n /**\n * Assembles and serializes the {@link IPendingContainerState} for the container,\n * to be stored and used to rehydrate the container at a later time.\n */\n async getPendingLocalState(props, clientId, runtime, resolvedUrl) {\n return PerformanceEvent.timedExecAsync(this.mc.logger, {\n eventName: \"getPendingLocalState\",\n details: {\n notifyImminentClosure: props.notifyImminentClosure,\n sessionExpiryTimerStarted: props.sessionExpiryTimerStarted,\n snapshotSequenceNumber: props.snapshotSequenceNumber,\n processedOpsSize: this.processedOps.length,\n },\n clientId,\n }, async () => {\n if (!this.offlineLoadEnabled) {\n throw new UsageError(\"Can't get pending local state unless offline load is enabled\");\n }\n assert(this.snapshot !== undefined, 0x8e5 /* no base data */);\n const pendingRuntimeState = await runtime.getPendingLocalState({\n ...props,\n snapshotSequenceNumber: this.snapshot.snapshotSequenceNumber,\n sessionExpiryTimerStarted: this.snapshot.snapshotFetchedTime,\n });\n // This conversion is required because ArrayBufferLike doesn't survive JSON.stringify\n const loadedGroupIdSnapshots = {};\n let hasGroupIdSnapshots = false;\n const groupIdSnapshots = Object.entries(this.storageAdapter.loadedGroupIdSnapshots);\n if (groupIdSnapshots.length > 0) {\n for (const [groupId, snapshot] of groupIdSnapshots) {\n hasGroupIdSnapshots = true;\n loadedGroupIdSnapshots[groupId] = convertSnapshotToSnapshotInfo(snapshot);\n }\n }\n const pendingState = {\n attached: true,\n pendingRuntimeState,\n baseSnapshot: this.snapshot.baseSnapshot,\n snapshotBlobs: this.snapshot.snapshotBlobs,\n loadedGroupIdSnapshots: hasGroupIdSnapshots ? loadedGroupIdSnapshots : undefined,\n savedOps: this.processedOps,\n url: resolvedUrl.url,\n clientId,\n };\n return JSON.stringify(pendingState);\n });\n }\n}\n/**\n * Retrieves the most recent snapshot and returns its info.\n *\n * @param mc - The monitoring context.\n * @param storageAdapter - The storage adapter providing methods to retrieve the snapshot.\n * @param supportGetSnapshotApi - a boolean indicating whether to use the fetchISnapshot or fetchISnapshotTree.\n * @returns a SnapshotInfo object containing the snapshot tree, snapshot blobs and its sequence number.\n */\nexport async function getLatestSnapshotInfo(mc, storageAdapter, supportGetSnapshotApi) {\n return PerformanceEvent.timedExecAsync(mc.logger, { eventName: \"GetLatestSnapshotInfo\" }, async () => {\n // get the latest non cached snapshot version\n const specifiedVersion = await storageAdapter.getVersions(\n // eslint-disable-next-line unicorn/no-null\n null, 1, \"getLatestSnapshotInfo\", FetchSource.noCache);\n const { baseSnapshot } = await getSnapshot(mc, storageAdapter, supportGetSnapshotApi, specifiedVersion[0]?.id);\n const baseSnapshotTree = getSnapshotTree(baseSnapshot);\n const snapshotFetchedTime = Date.now();\n const snapshotBlobs = await getBlobContentsFromTree(baseSnapshot, storageAdapter);\n const attributes = await getDocumentAttributes(storageAdapter, baseSnapshotTree);\n const snapshotSequenceNumber = attributes.sequenceNumber;\n return {\n baseSnapshot: baseSnapshotTree,\n snapshotBlobs,\n snapshotSequenceNumber,\n snapshotFetchedTime,\n };\n }).catch(() => undefined);\n}\n/**\n * Retrieves a snapshot from the storage adapter and transforms it into an ISnapshotTree object.\n *\n * @param mc - The monitoring context.\n * @param storageAdapter - The storage adapter providing methods to retrieve the snapshot.\n * @param supportGetSnapshotApi - a boolean indicating whether to use the fetchISnapshot or fetchISnapshotTree.\n * @param specifiedVersion - An optional version string specifying the version of the snapshot tree to fetch.\n * @returns - An ISnapshotTree and its version.\n */\nasync function getSnapshot(mc, storageAdapter, supportGetSnapshotApi, specifiedVersion) {\n const { snapshot, version } = supportGetSnapshotApi\n ? await fetchISnapshot(mc, storageAdapter, specifiedVersion)\n : await fetchISnapshotTree(mc, storageAdapter, specifiedVersion);\n assert(snapshot !== undefined, 0x8e4 /* Snapshot should exist */);\n return { baseSnapshot: snapshot, version };\n}\n/**\n * Fetches an ISnapshot from a storage adapter based on the specified version.\n *\n * @param mc - The monitoring context.\n * @param storageAdapter - The storage adapter providing a getSnapshot method to retrieve the ISnapshot and version.\n * @param specifiedVersion - An optional version string specifying the version of the snapshot tree to fetch.\n * @returns - The fetched snapshot tree and its version.\n */\nexport async function fetchISnapshot(mc, storageAdapter, specifiedVersion) {\n const snapshot = await storageAdapter.getSnapshot?.({ versionId: specifiedVersion });\n const version = snapshot?.snapshotTree.id === undefined\n ? undefined\n : {\n id: snapshot.snapshotTree.id,\n treeId: snapshot.snapshotTree.id,\n };\n if (snapshot === undefined && specifiedVersion !== undefined) {\n mc.logger.sendErrorEvent({\n eventName: \"getSnapshotTreeFailed\",\n id: specifiedVersion,\n });\n }\n else if (snapshot !== undefined && version?.id === undefined) {\n mc.logger.sendErrorEvent({\n eventName: \"getSnapshotFetchedTreeWithoutVersionId\",\n hasVersion: version !== undefined, // if hasVersion is true, this means that the contract with the service was broken.\n });\n }\n return { snapshot, version };\n}\n/**\n * Fetches an ISnapshotTree from a storage adapter based on the specified version.\n *\n * @param mc - The monitoring context.\n * @param storageAdapter - The storage adapter providing methods to retrieve the ISnapshotTree and version.\n * @param specifiedVersion - An optional version string specifying the version of the snapshot tree to fetch.\n * @returns - The fetched snapshot tree and its version.\n */\nexport async function fetchISnapshotTree(mc, storageAdapter, specifiedVersion) {\n // API uses null\n // eslint-disable-next-line unicorn/no-null\n const versions = await storageAdapter.getVersions(specifiedVersion ?? null, 1);\n const version = versions[0];\n if (version === undefined && specifiedVersion !== undefined) {\n // We should have a defined version to load from if specified version requested\n mc.logger.sendErrorEvent({\n eventName: \"NoVersionFoundWhenSpecified\",\n id: specifiedVersion,\n });\n }\n const snapshot = (await storageAdapter.getSnapshotTree(version)) ?? undefined;\n if (snapshot === undefined && version !== undefined) {\n mc.logger.sendErrorEvent({ eventName: \"getSnapshotTreeFailed\", id: version.id });\n }\n else if (snapshot !== undefined && version?.id === undefined) {\n mc.logger.sendErrorEvent({\n eventName: \"getSnapshotFetchedTreeWithoutVersionId\",\n hasVersion: version !== undefined, // if hasVersion is true, this means that the contract with the service was broken.\n });\n }\n return { snapshot, version };\n}\n//# sourceMappingURL=serializedStateManager.js.map","/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n/* eslint-disable unicorn/consistent-function-scoping */\nimport { TypedEventEmitter, performanceNow, } from \"@fluid-internal/client-utils\";\nimport { AttachState, } from \"@fluidframework/container-definitions\";\nimport { isFluidCodeDetails } from \"@fluidframework/container-definitions/internal\";\nimport { LogLevel, } from \"@fluidframework/core-interfaces\";\nimport { assert, isPromiseLike, unreachableCase } from \"@fluidframework/core-utils/internal\";\nimport { SummaryType, } from \"@fluidframework/driver-definitions\";\nimport { MessageType, } from \"@fluidframework/driver-definitions/internal\";\nimport { getSnapshotTree, OnlineStatus, isCombinedAppAndProtocolSummary, isInstanceOfISnapshot, isOnline, readAndParse, runWithRetry, } from \"@fluidframework/driver-utils/internal\";\nimport { EventEmitterWithErrorHandling, GenericError, PerformanceEvent, UsageError, connectedEventName, createChildLogger, createChildMonitoringContext, formatTick, normalizeError, raiseConnectedEvent, wrapError, loggerToMonitoringContext, } from \"@fluidframework/telemetry-utils/internal\";\nimport structuredClone from \"@ungap/structured-clone\";\nimport { v4 as uuid } from \"uuid\";\nimport { runRetriableAttachProcess, } from \"./attachment.js\";\nimport { Audience } from \"./audience.js\";\nimport { ConnectionManager } from \"./connectionManager.js\";\nimport { ConnectionState } from \"./connectionState.js\";\nimport { createConnectionStateHandler, } from \"./connectionStateHandler.js\";\nimport { ContainerContext } from \"./containerContext.js\";\nimport { ContainerStorageAdapter } from \"./containerStorageAdapter.js\";\nimport { ReconnectMode, getPackageName, } from \"./contracts.js\";\nimport { DeltaManager } from \"./deltaManager.js\";\nimport { RelativeLoader } from \"./loader.js\";\nimport { validateDriverCompatibility, validateRuntimeCompatibility, } from \"./loaderLayerCompatState.js\";\nimport { createMemoryDetachedBlobStorage, tryInitializeMemoryDetachedBlobStorage, } from \"./memoryBlobStorage.js\";\nimport { NoopHeuristic } from \"./noopHeuristic.js\";\nimport { pkgVersion } from \"./packageVersion.js\";\nimport { ProtocolHandler, protocolHandlerShouldProcessSignal, } from \"./protocol.js\";\nimport { initQuorumValuesFromCodeDetails } from \"./quorum.js\";\nimport { SerializedStateManager, } from \"./serializedStateManager.js\";\nimport { combineAppAndProtocolSummary, combineSnapshotTreeAndSnapshotBlobs, getDetachedContainerStateFromSerializedContainer, getDocumentAttributes, getProtocolSnapshotTree, getSnapshotTreeAndBlobsFromSerializedContainer, runSingle, } from \"./utils.js\";\nconst detachedContainerRefSeqNumber = 0;\nconst dirtyContainerEvent = \"dirty\";\nconst savedContainerEvent = \"saved\";\nconst packageNotFactoryError = \"Code package does not implement IRuntimeFactory\";\n/**\n * Waits until container connects to delta storage and gets up-to-date.\n *\n * Useful when resolving URIs and hitting 404, due to container being loaded from (stale) snapshot and not being\n * up to date. Host may chose to wait in such case and retry resolving URI.\n *\n * Warning: Will wait infinitely for connection to establish if there is no connection.\n * May result in deadlock if Container.disconnect() is called and never followed by a call to Container.connect().\n *\n * @returns `true`: container is up to date, it processed all the ops that were know at the time of first connection.\n *\n * `false`: storage does not provide indication of how far the client is. Container processed all the ops known to it,\n * but it maybe still behind.\n *\n * @throws an error beginning with `\"Container closed\"` if the container is closed before it catches up.\n * @legacy\n * @alpha\n */\nexport async function waitContainerToCatchUp(container) {\n // Make sure we stop waiting if container is closed.\n if (container.closed) {\n throw new UsageError(\"waitContainerToCatchUp: Container closed\");\n }\n return new Promise((resolve, reject) => {\n const deltaManager = container.deltaManager;\n const closedCallback = (err) => {\n container.off(\"closed\", closedCallback);\n const baseMessage = \"Container closed while waiting to catch up\";\n reject(err === undefined\n ? new GenericError(baseMessage)\n : wrapError(err, (innerMessage) => new GenericError(`${baseMessage}: ${innerMessage}`)));\n };\n container.on(\"closed\", closedCallback);\n // Depending on config, transition to \"connected\" state may include the guarantee\n // that all known ops have been processed. If so, we may introduce additional wait here.\n // Waiting for \"connected\" state in either case gets us at least to our own Join op\n // which is a reasonable approximation of \"caught up\"\n const waitForOps = () => {\n assert(container.connectionState === ConnectionState.CatchingUp ||\n container.connectionState === ConnectionState.Connected, 0x0cd /* \"Container disconnected while waiting for ops!\" */);\n const hasCheckpointSequenceNumber = deltaManager.hasCheckpointSequenceNumber;\n const connectionOpSeqNumber = deltaManager.lastKnownSeqNumber;\n assert(deltaManager.lastSequenceNumber <= connectionOpSeqNumber, 0x266 /* \"lastKnownSeqNumber should never be below last processed sequence number\" */);\n if (deltaManager.lastSequenceNumber === connectionOpSeqNumber) {\n container.off(\"closed\", closedCallback);\n resolve(hasCheckpointSequenceNumber);\n return;\n }\n const callbackOps = (message) => {\n if (connectionOpSeqNumber <= message.sequenceNumber) {\n container.off(\"closed\", closedCallback);\n resolve(hasCheckpointSequenceNumber);\n deltaManager.off(\"op\", callbackOps);\n }\n };\n deltaManager.on(\"op\", callbackOps);\n };\n // We can leverage DeltaManager's \"connect\" event here and test for ConnectionState.Disconnected\n // But that works only if service provides us checkPointSequenceNumber\n // Our internal testing is based on R11S that does not, but almost all tests connect as \"write\" and\n // use this function to catch up, so leveraging our own join op as a fence/barrier\n if (container.connectionState === ConnectionState.Connected) {\n waitForOps();\n return;\n }\n const callback = () => {\n container.off(connectedEventName, callback);\n waitForOps();\n };\n container.on(connectedEventName, callback);\n if (container.connectionState === ConnectionState.Disconnected) {\n container.connect();\n }\n });\n}\nconst getCodeProposal = (quorum) => quorum.get(\"code\") ?? quorum.get(\"code2\");\n/**\n * Helper function to report to telemetry cases where operation takes longer than expected (200ms)\n * @param logger - logger to use\n * @param eventName - event name\n * @param action - functor to call and measure\n */\nexport async function ReportIfTooLong(logger, eventName, action) {\n const event = PerformanceEvent.start(logger, { eventName });\n const props = await action();\n if (event.duration > 200) {\n event.end(props);\n }\n}\nconst summarizerClientType = \"summarizer\";\nexport class Container extends EventEmitterWithErrorHandling {\n /**\n * Load an existing container.\n */\n static async load(loadProps, createProps) {\n const { version, pendingLocalState, loadMode, resolvedUrl } = loadProps;\n const container = new Container(createProps, loadProps);\n return PerformanceEvent.timedExecAsync(container.mc.logger, { eventName: \"Load\", ...loadMode }, async (event) => new Promise((resolve, reject) => {\n const defaultMode = { opsBeforeReturn: \"cached\" };\n // if we have pendingLocalState, anything we cached is not useful and we shouldn't wait for connection\n // to return container, so ignore this value and use undefined for opsBeforeReturn\n const mode = pendingLocalState\n ? { ...(loadMode ?? defaultMode), opsBeforeReturn: undefined }\n : (loadMode ?? defaultMode);\n const onClosed = (err) => {\n // pre-0.58 error message: containerClosedWithoutErrorDuringLoad\n reject(err ?? new GenericError(\"Container closed without error during load\"));\n };\n container.on(\"closed\", onClosed);\n container\n .load(version, mode, resolvedUrl, pendingLocalState)\n .finally(() => {\n container.removeListener(\"closed\", onClosed);\n })\n .then((props) => {\n event.end({ ...props });\n resolve(container);\n }, (error) => {\n const err = normalizeError(error);\n // Depending where error happens, we can be attempting to connect to web socket\n // and continuously retrying (consider offline mode)\n // Host has no container to close, so it's prudent to do it here\n // Note: We could only dispose the container instead of just close but that would\n // the telemetry where users sometimes search for ContainerClose event to look\n // for load failures. So not removing this at this time.\n container.close(err);\n container.dispose(err);\n onClosed(err);\n });\n }), { start: true, end: true, cancel: \"generic\" });\n }\n /**\n * Create a new container in a detached state.\n */\n static async createDetached(createProps, codeDetails) {\n const container = new Container(createProps);\n return PerformanceEvent.timedExecAsync(container.mc.logger, { eventName: \"CreateDetached\" }, async (_event) => {\n await container.createDetached(codeDetails);\n return container;\n }, { start: true, end: true, cancel: \"generic\" });\n }\n /**\n * Create a new container in a detached state that is initialized with a\n * snapshot from a previous detached container.\n * @param createProps - Config options for this new container instance\n * @param snapshot - A stringified {@link IPendingDetachedContainerState}, e.g. generated via {@link serialize}\n */\n static async rehydrateDetachedFromSnapshot(createProps, snapshot) {\n const container = new Container(createProps);\n return PerformanceEvent.timedExecAsync(container.mc.logger, { eventName: \"RehydrateDetachedFromSnapshot\" }, async (_event) => {\n const detachedContainerState = getDetachedContainerStateFromSerializedContainer(snapshot);\n await container.rehydrateDetachedFromSnapshot(detachedContainerState);\n return container;\n }, { start: true, end: true, cancel: \"generic\" });\n }\n setLoaded() {\n // It's conceivable the container could be closed when this is called\n // Only transition states if currently loading\n if (this._lifecycleState === \"loading\") {\n this._lifecycleState = \"loaded\";\n // Connections transitions are delayed till we are loaded.\n // This is done by holding ops and signals until the end of load sequence\n // (calling this.handleDeltaConnectionArg() after setLoaded() call)\n // If this assert fires, it means our logic managing connection flow is wrong, and the logic below is also wrong.\n assert(this.connectionState !== ConnectionState.Connected, 0x969 /* not connected yet */);\n // Track membership changes and update connection state accordingly\n // We do this call here, instead of doing it in initializeProtocolState() due to pendingLocalState.\n // When we load from stashed state, we let connectionStateHandler know about clientId from previous container instance.\n // But we will play trailing ops from snapshot, including potentially playing join & leave ops for that same clientId!\n // In other words, if connectionStateHandler has access to Quorum early in load sequence, it will see events (in stashed ops mode)\n // in the order that is not possible in real life, that it may not expect.\n // Ideally, we should supply pendingLocalState?.clientId here as well, not in constructor, but it does not matter (at least today)\n this.connectionStateHandler.initProtocol(this.protocolHandler);\n // Propagate current connection state through the system.\n const readonly = this.readOnlyInfo.readonly ?? false;\n // This call does not look like needed any more, with delaying all connection-related events past loaded phase.\n // Yet, there could be some customer code that would break if we do not deliver it.\n // Will be removed in further PRs with proper changeset.\n this.setContextConnectedState(false /* connected */, readonly);\n // Deliver delayed calls to DeltaManager - we ignored \"connect\" events while loading.\n const cm = this._deltaManager.connectionManager;\n if (cm.connected) {\n const details = cm.connectionDetails;\n assert(details !== undefined, 0x96a /* should have details if connected */);\n this.connectionStateHandler.receivedConnectEvent(details);\n }\n }\n }\n get closed() {\n return (this._lifecycleState === \"closing\" || this._lifecycleState === \"closed\" || this.disposed);\n }\n get loaded() {\n return this._lifecycleState === \"loaded\";\n }\n get disposed() {\n return this._lifecycleState === \"disposing\" || this._lifecycleState === \"disposed\";\n }\n get runtime() {\n if (this._runtime === undefined) {\n throw new Error(\"Attempted to access runtime before it was defined\");\n }\n return this._runtime;\n }\n get protocolHandler() {\n if (this._protocolHandler === undefined) {\n throw new Error(\"Attempted to access protocolHandler before it was defined\");\n }\n return this._protocolHandler;\n }\n get connectionMode() {\n return this._deltaManager.connectionManager.connectionMode;\n }\n get resolvedUrl() {\n /**\n * All attached containers will have a document service,\n * this is required, as attached containers are attached to\n * a service. Detached containers will neither have a document\n * service or a resolved url as they only exist locally.\n * in order to create a document service a resolved url must\n * first be obtained, this is how the container is identified.\n * Because of this, the document service's resolved url\n * is always the same as the containers, as we had to\n * obtain the resolved url, and then create the service from it.\n */\n return this.service?.resolvedUrl;\n }\n get readOnlyInfo() {\n return this._deltaManager.readOnlyInfo;\n }\n get containerMetadata() {\n return this._containerMetadata;\n }\n /**\n * Sends signal to runtime (and data stores) to be read-only.\n * Hosts may have read only views, indicating to data stores that no edits are allowed.\n * This is independent from this._readonlyPermissions (permissions) and this.connectionMode\n * (server can return \"write\" mode even when asked for \"read\")\n * Leveraging same \"readonly\" event as runtime & data stores should behave the same in such case\n * as in read-only permissions.\n * But this.active can be used by some DDSes to figure out if ops can be sent\n * (for example, read-only view still participates in code proposals / upgrades decisions)\n *\n * Forcing Readonly does not prevent DDS from generating ops. It is up to user code to honour\n * the readonly flag. If ops are generated, they will accumulate locally and not be sent. If\n * there are pending in the outbound queue, it will stop sending until force readonly is\n * cleared.\n *\n * @param readonly - set or clear force readonly.\n */\n forceReadonly(readonly) {\n this._deltaManager.connectionManager.forceReadonly(readonly);\n }\n get deltaManager() {\n return this._deltaManager;\n }\n get connectionState() {\n return this.connectionStateHandler.connectionState;\n }\n get connected() {\n return this.connectionStateHandler.connectionState === ConnectionState.Connected;\n }\n /**\n * clientId of the latest connection. Changes only once client is connected, caught up and fully loaded.\n * Changes to clientId are delayed through container loading sequence and delived once container is fully loaded.\n * clientId does not reset on lost connection - old value persists until new connection is fully established.\n */\n get clientId() {\n return this.protocolHandler.audience.getSelf()?.clientId;\n }\n get isInteractiveClient() {\n return this.deltaManager.clientDetails.capabilities.interactive;\n }\n supportGetSnapshotApi() {\n const supportGetSnapshotApi = this.mc.config.getBoolean(\"Fluid.Container.UseLoadingGroupIdForSnapshotFetch2\") ===\n true && this.service?.policies?.supportGetSnapshotApi === true;\n return supportGetSnapshotApi;\n }\n /**\n * Get the code details that are currently specified for the container.\n * @returns The current code details if any are specified, undefined if none are specified.\n */\n getSpecifiedCodeDetails() {\n return this.getCodeDetailsFromQuorum();\n }\n /**\n * Get the code details that were used to load the container.\n * @returns The code details that were used to load the container if it is loaded, undefined if it is not yet\n * loaded.\n */\n getLoadedCodeDetails() {\n return this._loadedCodeDetails;\n }\n /**\n * Retrieves the audience associated with the document\n */\n get audience() {\n return this.protocolHandler.audience;\n }\n /**\n * Returns true if container is dirty.\n * Which means data loss if container is closed at that same moment\n * Most likely that happens when there is no network connection to Relay Service\n */\n get isDirty() {\n return this._dirtyContainer;\n }\n /**\n * {@inheritDoc @fluidframework/container-definitions#IContainer.entryPoint}\n */\n async getEntryPoint() {\n if (this._disposed) {\n throw new UsageError(\"The context is already disposed\");\n }\n if (this._runtime !== undefined) {\n return this._runtime.getEntryPoint?.();\n }\n return new Promise((resolve, reject) => {\n const runtimeInstantiatedHandler = () => {\n assert(this._runtime !== undefined, 0x5a3 /* runtimeInstantiated fired but runtime is still undefined */);\n resolve(this._runtime.getEntryPoint?.());\n this._lifecycleEvents.off(\"disposed\", disposedHandler);\n };\n const disposedHandler = () => {\n reject(new Error(\"ContainerContext was disposed\"));\n this._lifecycleEvents.off(\"runtimeInstantiated\", runtimeInstantiatedHandler);\n };\n this._lifecycleEvents.once(\"runtimeInstantiated\", runtimeInstantiatedHandler);\n this._lifecycleEvents.once(\"disposed\", disposedHandler);\n });\n }\n constructor(createProps, loadProps) {\n super((name, error) => {\n this.mc.logger.sendErrorEvent({\n eventName: \"ContainerEventHandlerException\",\n name: typeof name === \"string\" ? name : undefined,\n }, error);\n this.close(normalizeError(error));\n });\n /**\n * Lifecycle state of the container, used mainly to prevent re-entrancy and telemetry\n *\n * States are allowed to progress to further states:\n * \"loading\" - \"loaded\" - \"closing\" - \"disposing\" - \"closed\" - \"disposed\"\n *\n * For example, moving from \"closed\" to \"disposing\" is not allowed since it is an earlier state.\n *\n * loading: Container has been created, but is not yet in normal/loaded state\n * loaded: Container is in normal/loaded state\n * closing: Container has started closing process (for re-entrancy prevention)\n * disposing: Container has started disposing process (for re-entrancy prevention)\n * closed: Container has closed\n * disposed: Container has been disposed\n */\n this._lifecycleState = \"loading\";\n /**\n * During initialization we pause the inbound queues. We track this state to ensure we only call resume once\n */\n this.inboundQueuePausedFromInit = true;\n this.connectionCount = 0;\n this.connectionTransitionTimes = [];\n this._dirtyContainer = false;\n this.attachmentData = { state: AttachState.Detached };\n this.clientsWhoShouldHaveLeft = new Set();\n this._containerMetadata = {};\n this.setAutoReconnectTime = performanceNow();\n this._lifecycleEvents = new TypedEventEmitter();\n this.verifyClosedAfterCalls = 0;\n this._disposed = false;\n this.attach = runSingle(async (request, attachProps) => {\n await PerformanceEvent.timedExecAsync(this.mc.logger, { eventName: \"Attach\" }, async () => {\n if (this._lifecycleState !== \"loaded\" ||\n this.attachmentData.state === AttachState.Attached) {\n // pre-0.58 error message: containerNotValidForAttach\n throw new UsageError(`The Container is not in a valid state for attach [${this._lifecycleState}] and [${this.attachState}]`);\n }\n const normalizeErrorAndClose = (error) => {\n const newError = normalizeError(error);\n this.close(newError);\n // add resolved URL on error object so that host has the ability to find this document and delete it\n newError.addTelemetryProperties({\n resolvedUrl: this.service?.resolvedUrl?.url,\n });\n return newError;\n };\n const setAttachmentData = (attachmentData) => {\n const previousState = this.attachmentData.state;\n this.attachmentData = attachmentData;\n const state = this.attachmentData.state;\n if (state !== previousState && state !== AttachState.Detached) {\n try {\n this.runtime.setAttachState(state);\n this.emit(state.toLocaleLowerCase());\n }\n catch (error) {\n throw normalizeErrorAndClose(error);\n }\n }\n };\n const createAttachmentSummary = (redirectTable) => {\n try {\n assert(this._deltaManager.inbound.length === 0, 0x0d6 /* \"Inbound queue should be empty when attaching\" */);\n return combineAppAndProtocolSummary(this.runtime.createSummary(redirectTable), this.captureProtocolSummary());\n }\n catch (error) {\n throw normalizeErrorAndClose(error);\n }\n };\n const createOrGetStorageService = async (summary) => {\n // Actually go and create the resolved document\n if (this.service === undefined) {\n const createNewResolvedUrl = await this.urlResolver.resolve(request);\n assert(this.client.details.type !== summarizerClientType &&\n createNewResolvedUrl !== undefined, 0x2c4 /* \"client should not be summarizer before container is created\" */);\n this.service = await this.createDocumentService(createNewResolvedUrl, {\n mode: \"attach\",\n summary,\n });\n }\n this.storageAdapter.connectToService(this.service);\n return this.storageAdapter;\n };\n let attachP = runRetriableAttachProcess({\n initialAttachmentData: this.attachmentData,\n offlineLoadEnabled: this.serializedStateManager.offlineLoadEnabled,\n detachedBlobStorage: this.detachedBlobStorage,\n setAttachmentData,\n createAttachmentSummary,\n createOrGetStorageService,\n });\n // only enable the new behavior if the config is set\n if (this.mc.config.getBoolean(\"Fluid.Container.RetryOnAttachFailure\") !== true) {\n attachP = attachP.catch((error) => {\n throw normalizeErrorAndClose(error);\n });\n }\n // If offline load is enabled, attachP will return the attach summary (in Snapshot format) so we can initialize SerializedStateManager\n const snapshotWithBlobs = await attachP;\n this.serializedStateManager.setInitialSnapshot(snapshotWithBlobs);\n if (!this.closed) {\n this.detachedBlobStorage?.dispose?.();\n this.handleDeltaConnectionArg(attachProps?.deltaConnection, {\n fetchOpsFromStorage: false,\n reason: { text: \"createDetached\" },\n });\n }\n }, { start: true, end: true, cancel: \"generic\" });\n });\n this.getAbsoluteUrl = async (relativeUrl) => {\n if (this.resolvedUrl === undefined) {\n return undefined;\n }\n return this.urlResolver.getAbsoluteUrl(this.resolvedUrl, relativeUrl, getPackageName(this._loadedCodeDetails));\n };\n this.metadataUpdateHandler = (metadata) => {\n this._containerMetadata = { ...this._containerMetadata, ...metadata };\n this.emit(\"metadataUpdate\", metadata);\n };\n this.updateDirtyContainerState = (dirty) => {\n if (this._dirtyContainer === dirty) {\n return;\n }\n this._dirtyContainer = dirty;\n this.emit(dirty ? dirtyContainerEvent : savedContainerEvent);\n };\n const { canReconnect, clientDetailsOverride, urlResolver, documentServiceFactory, codeLoader, options, scope, subLogger, protocolHandlerBuilder, } = createProps;\n this.connectionTransitionTimes[ConnectionState.Disconnected] = performanceNow();\n const pendingLocalState = loadProps?.pendingLocalState;\n this._canReconnect = canReconnect ?? true;\n this.clientDetailsOverride = clientDetailsOverride;\n this.urlResolver = urlResolver;\n this.serviceFactory = documentServiceFactory;\n this.codeLoader = codeLoader;\n // Warning: this is only a shallow clone. Mutation of any individual loader option will mutate it for\n // all clients that were loaded from the same loader (including summarizer clients).\n // Tracking alternative ways to handle this in AB#4129.\n this.options = { ...options };\n this.scope = scope;\n this.protocolHandlerBuilder =\n protocolHandlerBuilder ??\n ((attributes, quorumSnapshot, sendProposal) => new ProtocolHandler(attributes, quorumSnapshot, sendProposal, new Audience(), (clientId) => this.clientsWhoShouldHaveLeft.has(clientId)));\n // Note that we capture the createProps here so we can replicate the creation call when we want to clone.\n this.clone = async (_loadProps, createParamOverrides) => {\n return Container.load(_loadProps, {\n ...createProps,\n ...createParamOverrides,\n });\n };\n this._containerId = uuid();\n this.client = Container.setupClient(this._containerId, options.client, this.clientDetailsOverride);\n // Create logger for data stores to use\n const type = this.client.details.type;\n const interactive = this.client.details.capabilities.interactive;\n const clientType = `${interactive ? \"interactive\" : \"noninteractive\"}${type !== undefined && type !== \"\" ? `/${type}` : \"\"}`;\n // Need to use the property getter for docId because for detached flow we don't have the docId initially.\n // We assign the id later so property getter is used.\n this.subLogger = createChildLogger({\n logger: subLogger,\n properties: {\n all: {\n clientType, // Differentiating summarizer container from main container\n containerId: this._containerId,\n docId: () => this.resolvedUrl?.id,\n containerAttachState: () => this.attachState,\n containerLifecycleState: () => this._lifecycleState,\n containerConnectionState: () => ConnectionState[this.connectionState],\n serializedContainer: pendingLocalState !== undefined,\n },\n // we need to be judicious with our logging here to avoid generating too much data\n // all data logged here should be broadly applicable, and not specific to a\n // specific error or class of errors\n error: {\n // load information to associate errors with the specific load point\n dmInitialSeqNumber: () => this._deltaManager?.initialSequenceNumber,\n dmLastProcessedSeqNumber: () => this._deltaManager?.lastSequenceNumber,\n dmLastKnownSeqNumber: () => this._deltaManager?.lastKnownSeqNumber,\n containerLoadedFromVersionId: () => this._loadedFromVersion?.id,\n containerLoadedFromVersionDate: () => this._loadedFromVersion?.date,\n // message information to associate errors with the specific execution state\n // dmLastMsqSeqNumber: if present, same as dmLastProcessedSeqNumber\n dmLastMsqSeqNumber: () => this.deltaManager?.lastMessage?.sequenceNumber,\n dmLastMsqSeqTimestamp: () => this.deltaManager?.lastMessage?.timestamp,\n dmLastMsqSeqClientId: () => this.deltaManager?.lastMessage?.clientId === null\n ? \"null\"\n : this.deltaManager?.lastMessage?.clientId,\n dmLastMsgClientSeq: () => this.deltaManager?.lastMessage?.clientSequenceNumber,\n connectionStateDuration: () => performanceNow() - this.connectionTransitionTimes[this.connectionState],\n },\n },\n });\n // Prefix all events in this file with container-loader\n this.mc = createChildMonitoringContext({ logger: this.subLogger, namespace: \"Container\" });\n this._deltaManager = this.createDeltaManager();\n this.connectionStateHandler = createConnectionStateHandler({\n logger: this.mc.logger,\n // WARNING: logger on this context should not including getters like containerConnectionState above (on this.subLogger),\n // as that will result in attempt to dereference this.connectionStateHandler from this call while it's still undefined.\n mc: loggerToMonitoringContext(subLogger),\n connectionStateChanged: (value, oldState, reason) => {\n this.logConnectionStateChangeTelemetry(value, oldState, reason);\n if (this.loaded) {\n this.propagateConnectionState(value === ConnectionState.Disconnected\n ? reason\n : undefined /* disconnectedReason */);\n }\n },\n shouldClientJoinWrite: () => this._deltaManager.connectionManager.shouldJoinWrite(),\n maxClientLeaveWaitTime: options.maxClientLeaveWaitTime,\n logConnectionIssue: (eventName, category, details) => {\n const mode = this.connectionMode;\n // We get here when socket does not receive any ops on \"write\" connection, including\n // its own join op.\n // Report issues only if we already loaded container - op processing is paused while container is loading,\n // so we always time-out processing of join op in cases where fetching snapshot takes a minute.\n // It's not a problem with op processing itself - such issues should be tracked as part of boot perf monitoring instead.\n this._deltaManager.logConnectionIssue({\n eventName,\n mode,\n category: this._lifecycleState === \"loading\" ? \"generic\" : category,\n duration: performanceNow() - this.connectionTransitionTimes[ConnectionState.CatchingUp],\n ...(details === undefined ? {} : { details: JSON.stringify(details) }),\n });\n // This assert is important for many reasons:\n // 1) Cosmetic / OCE burden: It's useless to raise NoJoinOp error events, if we are loading, as that's most\n // likely to happen if snapshot loading takes too long. During this time we are not processing ops so there is no\n // way to move to \"connected\" state, and thus \"NoJoin\" timer would fire (see\n // IConnectionStateHandler.logConnectionIssue() callback and related code in ConnectStateHandler class implementation).\n // But these events do not tell us anything about connectivity pipeline / op processing pipeline,\n // only that boot is slow, and we have events for that.\n // 2) Doing recovery below is useless in loading mode, for the reasons described above. At the same time we can't\n // not do it, as maybe we lost JoinSignal for \"self\", and when loading is done, we never move to connected\n // state. So we would have to do (in most cases) useless infinite reconnect loop while we are loading.\n assert(this.loaded, 0x96b /* connection issues can be raised only after container is loaded */);\n // If this is \"write\" connection, it took too long to receive join op. But in most cases that's due\n // to very slow op fetches and we will eventually get there.\n // For \"read\" connections, we get here due to join signal for \"self\" not arriving on time.\n // Attempt to recover by reconnecting.\n if (mode === \"read\" && category === \"error\") {\n const reason = { text: \"NoJoinSignal\" };\n this.disconnectInternal(reason);\n this.connectInternal({ reason, fetchOpsFromStorage: false });\n }\n },\n clientShouldHaveLeft: (clientId) => {\n this.clientsWhoShouldHaveLeft.add(clientId);\n },\n onCriticalError: (error) => {\n this.close(normalizeError(error));\n },\n }, this.deltaManager, pendingLocalState?.clientId);\n this.on(savedContainerEvent, () => {\n this.connectionStateHandler.containerSaved();\n });\n // We expose our storage publicly, so it's possible others may call uploadSummaryWithContext() with a\n // non-combined summary tree (in particular, ContainerRuntime.submitSummary). We'll intercept those calls\n // using this callback and fix them up.\n const addProtocolSummaryIfMissing = (summaryTree) => isCombinedAppAndProtocolSummary(summaryTree) === true\n ? summaryTree\n : combineAppAndProtocolSummary(summaryTree, this.captureProtocolSummary());\n // Feature gate to enable single-commit summaries. The expected enablement is through driver layer's policies,\n // but here we also specify config setting to use for testing purposes.\n const enableSummarizeProtocolTree = this.mc.config.getBoolean(\"Fluid.Container.summarizeProtocolTree2\");\n this.detachedBlobStorage =\n this.attachState === AttachState.Attached\n ? undefined\n : createMemoryDetachedBlobStorage();\n this.storageAdapter = new ContainerStorageAdapter(this.detachedBlobStorage, this.mc.logger, pendingLocalState?.snapshotBlobs, pendingLocalState?.loadedGroupIdSnapshots, addProtocolSummaryIfMissing, enableSummarizeProtocolTree);\n const offlineLoadEnabled = (this.isInteractiveClient &&\n this.mc.config.getBoolean(\"Fluid.Container.enableOfflineLoad\")) ??\n options.enableOfflineLoad === true;\n this.serializedStateManager = new SerializedStateManager(pendingLocalState, this.subLogger, this.storageAdapter, offlineLoadEnabled, this, () => this._deltaManager.connectionManager.shouldJoinWrite(), () => this.supportGetSnapshotApi(), this.mc.config.getNumber(\"Fluid.Container.snapshotRefreshTimeoutMs\"));\n const isDomAvailable = typeof document === \"object\" &&\n document !== null &&\n typeof document.addEventListener === \"function\" &&\n document.addEventListener !== null;\n // keep track of last time page was visible for telemetry (on interactive clients only)\n if (isDomAvailable && interactive) {\n this.lastVisible = document.hidden ? performanceNow() : undefined;\n this.visibilityEventHandler = () => {\n if (document.hidden) {\n this.lastVisible = performanceNow();\n }\n else {\n // settimeout so this will hopefully fire after disconnect event if being hidden caused it\n setTimeout(() => {\n this.lastVisible = undefined;\n }, 0);\n }\n };\n document.addEventListener(\"visibilitychange\", this.visibilityEventHandler);\n }\n }\n /**\n * Retrieves the quorum associated with the document\n */\n getQuorum() {\n return this.protocolHandler.quorum;\n }\n dispose(error) {\n this.verifyClosedAfter(() => this._deltaManager.dispose(error));\n }\n close(error) {\n // 1. Ensure that close sequence is exactly the same no matter if it's initiated by host or by DeltaManager\n // 2. We need to ensure that we deliver disconnect event to runtime properly. See connectionStateChanged\n // handler. We only deliver events if container fully loaded. Transitioning from \"loading\" ->\n // \"closing\" will lose that info (can also solve by tracking extra state).\n this.verifyClosedAfter(() => this._deltaManager.close(error));\n }\n verifyClosedAfter(callback) {\n this.verifyClosedAfterCalls++;\n try {\n callback();\n }\n finally {\n this.verifyClosedAfterCalls--;\n }\n // We only want to verify connectionState and lifecycleState after close/dispose has fully finished\n if (this.verifyClosedAfterCalls === 0) {\n assert(this.connectionState === ConnectionState.Disconnected, 0x0cf /* \"disconnect event was not raised!\" */);\n assert(this._lifecycleState === \"closed\" || this._lifecycleState === \"disposed\", 0x314 /* Container properly closed */);\n }\n }\n closeCore(error) {\n assert(!this.closed, 0x315 /* re-entrancy */);\n try {\n // Ensure that we raise all key events even if one of these throws\n try {\n // Raise event first, to ensure we capture _lifecycleState before transition.\n // This gives us a chance to know what errors happened on open vs. on fully loaded container.\n // Log generic events instead of error events if container is in loading state, as most errors are not really FF errors\n // which can pollute telemetry for real bugs\n this.mc.logger.sendTelemetryEvent({\n eventName: \"ContainerClose\",\n category: this._lifecycleState !== \"loading\" && error !== undefined ? \"error\" : \"generic\",\n }, error);\n this._lifecycleState = \"closing\";\n // Back-compat for Old driver\n if (this.service?.off !== undefined) {\n this.service?.off(\"metadataUpdate\", this.metadataUpdateHandler);\n }\n this._protocolHandler?.close();\n this.connectionStateHandler.dispose();\n }\n catch (newError) {\n this.mc.logger.sendErrorEvent({ eventName: \"ContainerCloseException\" }, newError);\n }\n this.emit(\"closed\", error);\n if (this.visibilityEventHandler !== undefined) {\n document.removeEventListener(\"visibilitychange\", this.visibilityEventHandler);\n }\n }\n finally {\n this._lifecycleState = \"closed\";\n // There is no user for summarizer, so we need to ensure dispose is called\n if (this.client.details.type === summarizerClientType) {\n this.dispose(error);\n }\n }\n }\n disposeCore(error) {\n assert(!this._disposed, 0x54c /* Container already disposed */);\n this._disposed = true;\n try {\n // Ensure that we raise all key events even if one of these throws\n try {\n // Raise event first, to ensure we capture _lifecycleState before transition.\n // This gives us a chance to know what errors happened on open vs. on fully loaded container.\n this.mc.logger.sendTelemetryEvent({\n eventName: \"ContainerDispose\",\n // Only log error if container isn't closed\n category: !this.closed && error !== undefined ? \"error\" : \"generic\",\n }, error);\n // ! Progressing from \"closed\" to \"disposing\" is not allowed\n if (this._lifecycleState !== \"closed\") {\n this._lifecycleState = \"disposing\";\n }\n this._protocolHandler?.close();\n this.connectionStateHandler.dispose();\n const maybeError = error === undefined ? undefined : new Error(error.message);\n this._runtime?.dispose(maybeError);\n this.storageAdapter.dispose();\n // Notify storage about critical errors. They may be due to disconnect between client & server knowledge\n // about file, like file being overwritten in storage, but client having stale local cache.\n // Driver need to ensure all caches are cleared on critical errors\n this.service?.dispose(error);\n }\n catch (error_) {\n this.mc.logger.sendErrorEvent({ eventName: \"ContainerDisposeException\" }, error_);\n }\n this.emit(\"disposed\", error);\n this.removeAllListeners();\n if (this.visibilityEventHandler !== undefined) {\n document.removeEventListener(\"visibilitychange\", this.visibilityEventHandler);\n }\n }\n finally {\n this._lifecycleState = \"disposed\";\n this._lifecycleEvents.emit(\"disposed\");\n }\n }\n async closeAndGetPendingLocalState(stopBlobAttachingSignal) {\n // runtime matches pending ops to successful ones by clientId and client seq num, so we need to close the\n // container at the same time we get pending state, otherwise this container could reconnect and resubmit with\n // a new clientId and a future container using stale pending state without the new clientId would resubmit them\n const pendingState = await this.getPendingLocalStateCore({\n notifyImminentClosure: true,\n stopBlobAttachingSignal,\n });\n this.close();\n return pendingState;\n }\n /**\n * Serialize current container state required to rehydrate to the same position without dataloss.\n * Note: The container must already be attached. For detached containers use {@link serialize}\n * @returns stringified {@link IPendingContainerState} for the container\n */\n async getPendingLocalState() {\n return this.getPendingLocalStateCore({ notifyImminentClosure: false });\n }\n async getPendingLocalStateCore(props) {\n if (this.closed || this._disposed) {\n throw new UsageError(\"Pending state cannot be retried if the container is closed or disposed\");\n }\n assert(this.attachmentData.state === AttachState.Attached, 0x0d1 /* \"Container should be attached before close\" */);\n assert(this.resolvedUrl !== undefined && this.resolvedUrl.type === \"fluid\", 0x0d2 /* \"resolved url should be valid Fluid url\" */);\n const pendingState = await this.serializedStateManager.getPendingLocalState(props, this.clientId, this.runtime, this.resolvedUrl);\n return pendingState;\n }\n get attachState() {\n return this.attachmentData.state;\n }\n /**\n * Serialize current container state required to rehydrate to the same position without dataloss.\n * Note: The container must be detached and not closed. For attached containers use\n * {@link getPendingLocalState} or {@link closeAndGetPendingLocalState}\n * @returns stringified {@link IPendingDetachedContainerState} for the container\n */\n serialize() {\n if (this.attachmentData.state === AttachState.Attached || this.closed) {\n throw new UsageError(\"Container must not be attached or closed.\");\n }\n const attachingData = this.attachmentData.state === AttachState.Attaching ? this.attachmentData : undefined;\n const combinedSummary = attachingData?.summary ??\n combineAppAndProtocolSummary(this.runtime.createSummary(), this.captureProtocolSummary());\n const { baseSnapshot, snapshotBlobs } = getSnapshotTreeAndBlobsFromSerializedContainer(combinedSummary);\n const pendingRuntimeState = attachingData === undefined ? undefined : this.runtime.getPendingLocalState();\n assert(!isPromiseLike(pendingRuntimeState), 0x8e3 /* should not be a promise */);\n const detachedContainerState = {\n attached: false,\n baseSnapshot,\n snapshotBlobs,\n pendingRuntimeState,\n hasAttachmentBlobs: this.detachedBlobStorage !== undefined && this.detachedBlobStorage.size > 0,\n attachmentBlobs: this.detachedBlobStorage?.serialize(),\n };\n return JSON.stringify(detachedContainerState);\n }\n setAutoReconnectInternal(mode, reason) {\n const currentMode = this._deltaManager.connectionManager.reconnectMode;\n if (currentMode === mode) {\n return;\n }\n const now = performanceNow();\n const duration = now - this.setAutoReconnectTime;\n this.setAutoReconnectTime = now;\n this.mc.logger.sendTelemetryEvent({\n eventName: mode === ReconnectMode.Enabled ? \"AutoReconnectEnabled\" : \"AutoReconnectDisabled\",\n connectionMode: this.connectionMode,\n connectionState: ConnectionState[this.connectionState],\n duration,\n });\n this._deltaManager.connectionManager.setAutoReconnect(mode, reason);\n }\n connect() {\n if (this.closed) {\n throw new UsageError(`The Container is closed and cannot be connected`);\n }\n else if (this.attachState !== AttachState.Attached) {\n throw new UsageError(`The Container is not attached and cannot be connected`);\n }\n else if (!this.connected) {\n // Note: no need to fetch ops as we do it preemptively as part of DeltaManager.attachOpHandler().\n // If there is gap, we will learn about it once connected, but the gap should be small (if any),\n // assuming that connect() is called quickly after initial container boot.\n this.connectInternal({\n reason: { text: \"DocumentConnect\" },\n fetchOpsFromStorage: false,\n });\n }\n }\n connectInternal(args) {\n assert(!this.closed, 0x2c5 /* \"Attempting to connect() a closed Container\" */);\n assert(this.attachState === AttachState.Attached, 0x2c6 /* \"Attempting to connect() a container that is not attached\" */);\n // Set Auto Reconnect Mode\n const mode = ReconnectMode.Enabled;\n this.setAutoReconnectInternal(mode, args.reason);\n // Resume processing ops and connect to delta stream\n this.resumeInternal(args);\n }\n disconnect() {\n if (this.closed) {\n throw new UsageError(`The Container is closed and cannot be disconnected`);\n }\n else {\n this.disconnectInternal({ text: \"DocumentDisconnect\" });\n }\n }\n disconnectInternal(reason) {\n assert(!this.closed, 0x2c7 /* \"Attempting to disconnect() a closed Container\" */);\n // Set Auto Reconnect Mode\n const mode = ReconnectMode.Disabled;\n this.setAutoReconnectInternal(mode, reason);\n }\n resumeInternal(args) {\n assert(!this.closed, 0x0d9 /* \"Attempting to connect() a closed DeltaManager\" */);\n // Resume processing ops\n if (this.inboundQueuePausedFromInit) {\n // This assert guards against possibility of ops/signals showing up too soon, while\n // container is not ready yet to receive them. We can hit it only if some internal code call into here,\n // as public API like Container.connect() can be only called when user got back container object, i.e.\n // it is already fully loaded.\n assert(this.loaded, 0x96c /* connect() can be called only in fully loaded state */);\n this.inboundQueuePausedFromInit = false;\n this._deltaManager.inbound.resume();\n this._deltaManager.inboundSignal.resume();\n }\n // Ensure connection to web socket\n this.connectToDeltaStream(args);\n }\n async proposeCodeDetails(codeDetails) {\n if (!isFluidCodeDetails(codeDetails)) {\n throw new Error(\"Provided codeDetails are not IFluidCodeDetails\");\n }\n if (this.codeLoader.IFluidCodeDetailsComparer) {\n const comparison = await this.codeLoader.IFluidCodeDetailsComparer.compare(codeDetails, this.getCodeDetailsFromQuorum());\n if (comparison !== undefined && comparison <= 0) {\n throw new Error(\"Proposed code details should be greater than the current\");\n }\n }\n return this.protocolHandler.quorum\n .propose(\"code\", codeDetails)\n .then(() => true)\n .catch(() => false);\n }\n async processCodeProposal() {\n const codeDetails = this.getCodeDetailsFromQuorum();\n await Promise.all([\n this._deltaManager.inbound.pause(),\n this._deltaManager.inboundSignal.pause(),\n ]);\n if ((await this.satisfies(codeDetails)) === true) {\n this._deltaManager.inbound.resume();\n this._deltaManager.inboundSignal.resume();\n return;\n }\n // pre-0.58 error message: existingContextDoesNotSatisfyIncomingProposal\n const error = new GenericError(\"Existing context does not satisfy incoming proposal\");\n this.close(error);\n }\n /**\n * Determines if the currently loaded module satisfies the incoming constraint code details\n */\n async satisfies(constraintCodeDetails) {\n // If we have no module, it can't satisfy anything.\n if (this._loadedModule === undefined) {\n return false;\n }\n const comparers = [];\n const maybeCompareCodeLoader = this.codeLoader;\n if (maybeCompareCodeLoader.IFluidCodeDetailsComparer !== undefined) {\n comparers.push(maybeCompareCodeLoader.IFluidCodeDetailsComparer);\n }\n const maybeCompareExport = this._loadedModule?.module.fluidExport;\n if (maybeCompareExport?.IFluidCodeDetailsComparer !== undefined) {\n comparers.push(maybeCompareExport.IFluidCodeDetailsComparer);\n }\n // If there are no comparers, then it's impossible to know if the currently loaded package satisfies\n // the incoming constraint, so we return false. Assuming it does not satisfy is safer, to force a reload\n // rather than potentially running with incompatible code.\n if (comparers.length === 0) {\n return false;\n }\n for (const comparer of comparers) {\n const satisfies = await comparer.satisfies(this._loadedModule?.details, constraintCodeDetails);\n if (satisfies === false) {\n return false;\n }\n }\n return true;\n }\n connectToDeltaStream(args) {\n // All agents need \"write\" access, including summarizer.\n if (!this._canReconnect || !this.client.details.capabilities.interactive) {\n args.mode = \"write\";\n }\n this._deltaManager.connect(args);\n }\n /**\n * Creates a document service during container attachment or loading.\n * @param resolvedUrl - The resolved URL of the container.\n * @param props - Properties indicating whether to load or attach the container. For attaching,\n * a summary tree can be provided.\n * @remarks This method validates that the driver is compatible with the Loader.\n */\n async createDocumentService(resolvedUrl, props) {\n let service;\n if (props.mode === \"load\") {\n service = await this.serviceFactory.createDocumentService(resolvedUrl, this.subLogger, this.client.details.type === summarizerClientType);\n if (service.on !== undefined) {\n // Back-compat for Old driver\n service.on(\"metadataUpdate\", this.metadataUpdateHandler);\n }\n }\n else {\n service = await runWithRetry(async () => this.serviceFactory.createContainer(props.summary, resolvedUrl, this.subLogger, false), \"containerAttach\", this.mc.logger, {\n cancel: this._deltaManager.closeAbortController.signal,\n });\n }\n // Validate that the Driver is compatible with this Loader.\n const maybeDriverCompatDetails = service;\n validateDriverCompatibility(maybeDriverCompatDetails.ILayerCompatDetails, (error) => this.dispose(error));\n return service;\n }\n /**\n * Load container.\n *\n * @param specifiedVersion - Version SHA to load snapshot. If not specified, will fetch the latest snapshot.\n */\n async load(specifiedVersion, loadMode, resolvedUrl, pendingLocalState) {\n const timings = { phase1: performanceNow() };\n this.service = await this.createDocumentService(resolvedUrl, { mode: \"load\" });\n // Except in cases where it has stashed ops or requested by feature gate, the container will connect in \"read\" mode\n const mode = this.mc.config.getBoolean(\"Fluid.Container.ForceWriteConnection\") === true ||\n (pendingLocalState?.savedOps.length ?? 0) > 0\n ? \"write\"\n : \"read\";\n const connectionArgs = {\n reason: { text: \"DocumentOpen\" },\n mode,\n fetchOpsFromStorage: false,\n };\n // Start websocket connection as soon as possible. Note that there is no op handler attached yet, but the\n // DeltaManager is resilient to this and will wait to start processing ops until after it is attached.\n if (loadMode.deltaConnection === undefined) {\n this.connectToDeltaStream(connectionArgs);\n }\n this.storageAdapter.connectToService(this.service);\n this.attachmentData = {\n state: AttachState.Attached,\n };\n timings.phase2 = performanceNow();\n // Fetch specified snapshot.\n const { baseSnapshot, version } = await this.serializedStateManager.fetchSnapshot(specifiedVersion);\n const baseSnapshotTree = getSnapshotTree(baseSnapshot);\n this._loadedFromVersion = version;\n const attributes = await getDocumentAttributes(this.storageAdapter, baseSnapshotTree);\n // If we saved ops, we will replay them and don't need DeltaManager to fetch them\n const lastProcessedSequenceNumber = pendingLocalState?.savedOps[pendingLocalState.savedOps.length - 1]?.sequenceNumber ??\n attributes.sequenceNumber;\n let opsBeforeReturnP;\n // Attach op handlers to finish initialization and be able to start processing ops\n // Kick off any ops fetching if required.\n switch (loadMode.opsBeforeReturn) {\n case undefined: {\n // Start prefetch, but not set opsBeforeReturnP - boot is not blocked by it!\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this.attachDeltaManagerOpHandler(attributes, loadMode.deltaConnection === \"none\" ? \"none\" : \"all\", lastProcessedSequenceNumber);\n break;\n }\n case \"cached\":\n case \"all\": {\n opsBeforeReturnP = this.attachDeltaManagerOpHandler(attributes, loadMode.opsBeforeReturn, lastProcessedSequenceNumber);\n break;\n }\n default: {\n unreachableCase(loadMode.opsBeforeReturn);\n }\n }\n // ...load in the existing quorum\n // Initialize the protocol handler\n await this.initializeProtocolStateFromSnapshot(attributes, this.storageAdapter, baseSnapshotTree);\n // If we are loading from pending state, we start with old clientId.\n // We switch to latest connection clientId only after setLoaded().\n assert(this.clientId === undefined, 0x96d /* there should be no clientId yet */);\n if (pendingLocalState?.clientId !== undefined) {\n this.protocolHandler.audience.setCurrentClientId(pendingLocalState?.clientId);\n }\n timings.phase3 = performanceNow();\n const codeDetails = this.getCodeDetailsFromQuorum();\n await this.instantiateRuntime(codeDetails, baseSnapshotTree, \n // give runtime a dummy value so it knows we're loading from a stash blob\n pendingLocalState ? (pendingLocalState?.pendingRuntimeState ?? {}) : undefined, isInstanceOfISnapshot(baseSnapshot) ? baseSnapshot : undefined);\n // replay saved ops\n if (pendingLocalState) {\n for (const message of pendingLocalState.savedOps) {\n this.processRemoteMessage({\n ...message,\n metadata: { ...message.metadata, savedOp: true },\n });\n // allow runtime to apply stashed ops at this op's sequence number\n await this.runtime.notifyOpReplay?.(message);\n }\n pendingLocalState.savedOps = [];\n this.storageAdapter.clearPendingState();\n }\n // We might have hit some failure that did not manifest itself in exception in this flow,\n // do not start op processing in such case - static version of Container.load() will handle it correctly.\n if (!this.closed) {\n if (opsBeforeReturnP !== undefined) {\n this._deltaManager.inbound.resume();\n await PerformanceEvent.timedExecAsync(this.mc.logger, { eventName: \"WaitOps\" }, async () => opsBeforeReturnP);\n await PerformanceEvent.timedExecAsync(this.mc.logger, { eventName: \"WaitOpProcessing\" }, async () => this._deltaManager.inbound.waitTillProcessingDone());\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n this._deltaManager.inbound.pause();\n }\n // Internal context is fully loaded at this point\n // Move to loaded before calling this.handleDeltaConnectionArg() - latter allows ops & signals in, which\n // may result in container moving to \"connected\" state. Such transitions are allowed only in loaded state.\n this.setLoaded();\n this.handleDeltaConnectionArg(loadMode.deltaConnection);\n }\n // Safety net: static version of Container.load() should have learned about it through \"closed\" handler.\n // But if that did not happen for some reason, fail load for sure.\n // Otherwise we can get into situations where container is closed and does not try to connect to ordering\n // service, but caller does not know that (callers do expect container to be not closed on successful path\n // and listen only on \"closed\" event)\n if (this.closed) {\n throw new Error(\"Container was closed while load()\");\n }\n timings.end = performanceNow();\n this.subLogger.sendTelemetryEvent({\n eventName: \"LoadStagesTimings\",\n details: JSON.stringify(timings),\n }, undefined, LogLevel.verbose);\n return {\n sequenceNumber: attributes.sequenceNumber,\n version: version?.id,\n dmLastProcessedSeqNumber: this._deltaManager.lastSequenceNumber,\n dmLastKnownSeqNumber: this._deltaManager.lastKnownSeqNumber,\n };\n }\n async createDetached(codeDetails) {\n const attributes = {\n sequenceNumber: detachedContainerRefSeqNumber,\n minimumSequenceNumber: 0,\n };\n await this.attachDeltaManagerOpHandler(attributes);\n // Need to just seed the source data in the code quorum. Quorum itself is empty\n const qValues = initQuorumValuesFromCodeDetails(codeDetails);\n this.initializeProtocolState(attributes, {\n members: [],\n proposals: [],\n values: qValues,\n });\n await this.instantiateRuntime(codeDetails, undefined);\n this.setLoaded();\n }\n async rehydrateDetachedFromSnapshot({ baseSnapshot, snapshotBlobs, hasAttachmentBlobs, attachmentBlobs, pendingRuntimeState, }) {\n if (hasAttachmentBlobs) {\n if (attachmentBlobs !== undefined) {\n assert(this.detachedBlobStorage !== undefined, 0xb8e /* detached blob storage should always exist when detached */);\n tryInitializeMemoryDetachedBlobStorage(this.detachedBlobStorage, attachmentBlobs);\n }\n assert(this.detachedBlobStorage !== undefined && this.detachedBlobStorage.size > 0, 0x250 /* \"serialized container with attachment blobs must be rehydrated with detached blob storage\" */);\n }\n const snapshotTreeWithBlobContents = combineSnapshotTreeAndSnapshotBlobs(baseSnapshot, snapshotBlobs);\n this.storageAdapter.loadSnapshotFromSnapshotBlobs(snapshotBlobs);\n const attributes = await getDocumentAttributes(this.storageAdapter, snapshotTreeWithBlobContents);\n await this.attachDeltaManagerOpHandler(attributes);\n // Initialize the protocol handler\n const baseTree = getProtocolSnapshotTree(snapshotTreeWithBlobContents);\n const qValues = await readAndParse(this.storageAdapter, baseTree.blobs.quorumValues);\n this.initializeProtocolState(attributes, {\n members: [],\n proposals: [],\n values: qValues,\n });\n const codeDetails = this.getCodeDetailsFromQuorum();\n await this.instantiateRuntime(codeDetails, snapshotTreeWithBlobContents, pendingRuntimeState);\n this.setLoaded();\n }\n async initializeProtocolStateFromSnapshot(attributes, storage, snapshot) {\n const quorumSnapshot = {\n members: [],\n proposals: [],\n values: [],\n };\n if (snapshot !== undefined) {\n const baseTree = getProtocolSnapshotTree(snapshot);\n [quorumSnapshot.members, quorumSnapshot.proposals, quorumSnapshot.values] =\n await Promise.all([\n readAndParse(storage, baseTree.blobs.quorumMembers),\n readAndParse(storage, baseTree.blobs.quorumProposals),\n readAndParse(storage, baseTree.blobs.quorumValues),\n ]);\n }\n this.initializeProtocolState(attributes, quorumSnapshot);\n }\n initializeProtocolState(attributes, quorumSnapshot) {\n const protocol = this.protocolHandlerBuilder(attributes, quorumSnapshot, (key, value) => \n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n this.submitMessage(MessageType.Propose, JSON.stringify({ key, value })));\n const protocolLogger = createChildLogger({\n logger: this.subLogger,\n namespace: \"ProtocolHandler\",\n });\n protocol.quorum.on(\"error\", (error) => {\n protocolLogger.sendErrorEvent(error);\n });\n protocol.quorum.on(\"addProposal\", (proposal) => {\n if (proposal.key === \"code\" || proposal.key === \"code2\") {\n this.emit(\"codeDetailsProposed\", proposal.value, proposal);\n }\n });\n protocol.quorum.on(\"approveProposal\", (sequenceNumber, key, value) => {\n if (key === \"code\" || key === \"code2\") {\n if (!isFluidCodeDetails(value)) {\n this.mc.logger.sendErrorEvent({\n eventName: \"CodeProposalNotIFluidCodeDetails\",\n });\n }\n this.processCodeProposal().catch((error) => {\n const normalizedError = normalizeError(error);\n this.close(normalizedError);\n throw error;\n });\n }\n });\n // we need to make sure this member get set in a synchronous context,\n // or other things can happen after the object that will be set is created, but not yet set\n // this was breaking this._initialClients handling\n //\n this._protocolHandler = protocol;\n }\n captureProtocolSummary() {\n const quorumSnapshot = this.protocolHandler.snapshot();\n const summary = {\n tree: {\n attributes: {\n content: JSON.stringify(this.protocolHandler.attributes),\n type: SummaryType.Blob,\n },\n quorumMembers: {\n content: JSON.stringify(quorumSnapshot.members),\n type: SummaryType.Blob,\n },\n quorumProposals: {\n content: JSON.stringify(quorumSnapshot.proposals),\n type: SummaryType.Blob,\n },\n quorumValues: {\n content: JSON.stringify(quorumSnapshot.values),\n type: SummaryType.Blob,\n },\n },\n type: SummaryType.Tree,\n };\n return summary;\n }\n getCodeDetailsFromQuorum() {\n const quorum = this.protocolHandler.quorum;\n const pkg = getCodeProposal(quorum);\n return pkg;\n }\n static setupClient(containerId, loaderOptionsClient, clientDetailsOverride) {\n const client = loaderOptionsClient === undefined\n ? {\n details: {\n capabilities: { interactive: true },\n },\n mode: \"read\", // default reconnection mode on lost connection / connection error\n permission: [],\n scopes: [],\n user: { id: \"\" },\n }\n : structuredClone(loaderOptionsClient);\n if (clientDetailsOverride !== undefined) {\n client.details = {\n ...client.details,\n ...clientDetailsOverride,\n capabilities: {\n ...client.details.capabilities,\n ...clientDetailsOverride?.capabilities,\n },\n };\n }\n client.details.environment = [\n client.details.environment,\n ` loaderVersion:${pkgVersion}`,\n ` containerId:${containerId}`,\n ].join(\";\");\n return client;\n }\n /**\n * Returns true if connection is active, i.e. it's \"write\" connection and\n * container runtime was notified about this connection (i.e. we are up-to-date and could send ops).\n * This happens after client received its own joinOp and thus is in the quorum.\n * If it's not true, runtime is not in position to send ops.\n */\n activeConnection() {\n return (this.connectionState === ConnectionState.Connected && this.connectionMode === \"write\");\n }\n createDeltaManager() {\n const serviceProvider = () => this.service;\n const deltaManager = new DeltaManager(serviceProvider, createChildLogger({ logger: this.subLogger, namespace: \"DeltaManager\" }), () => this.activeConnection(), (props) => new ConnectionManager(serviceProvider, () => this.isDirty, this.client, this._canReconnect, createChildLogger({ logger: this.subLogger, namespace: \"ConnectionManager\" }), props));\n // Disable inbound queues as Container is not ready to accept any ops until we are fully loaded!\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n deltaManager.inbound.pause();\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n deltaManager.inboundSignal.pause();\n deltaManager.on(\"connect\", (details, _opsBehind) => {\n assert(this.connectionMode === details.mode, 0x4b7 /* mismatch */);\n // Delay raising events until setLoaded()\n // Here are some of the reasons why this design is chosen:\n // 1. Various processes track speed of connection. But we are not processing ops or signal while container is loading,\n // and thus we can't move forward across connection modes. This results in telemetry errors (like NoJoinOp) that\n // have nothing to do with connection flow itself\n // 2. This also makes it hard to reason about recovery (like reconnection) in case we might have lost JoinSignal. Reconnecting\n // in loading phase is useless (get back to same state), but at the same time not doing it may result in broken connection\n // without recovery (after we loaded).\n // 3. We expose non-consistent view. ContainerRuntime may start loading in non-connected state, but end in connected, with\n // no events telling about it (until we loaded). Most of the code relies on a fact that state changes when events fire.\n // This will not delay any processes (as observed by the user). I.e. once container moves to loaded phase,\n // we immediately would transition across all phases, if we have proper signals / ops ready.\n if (this.loaded) {\n this.connectionStateHandler.receivedConnectEvent(details);\n }\n });\n deltaManager.on(\"establishingConnection\", (reason) => {\n this.connectionStateHandler.establishingConnection(reason);\n });\n deltaManager.on(\"cancelEstablishingConnection\", (reason) => {\n this.connectionStateHandler.cancelEstablishingConnection(reason);\n });\n deltaManager.on(\"disconnect\", (text, error) => {\n this.noopHeuristic?.notifyDisconnect();\n const reason = { text, error };\n // Symmetry with \"connect\" events\n if (this.loaded) {\n this.connectionStateHandler.receivedDisconnectEvent(reason);\n }\n else if (!this.closed) {\n // Raise cancellation to get state machine back to initial state\n this.connectionStateHandler.cancelEstablishingConnection(reason);\n }\n });\n deltaManager.on(\"throttled\", (warning) => {\n const warn = warning;\n // Some \"warning\" events come from outside the container and are logged\n // elsewhere (e.g. summarizing container). We shouldn't log these here.\n if (warn.logged !== true) {\n this.mc.logger.sendTelemetryEvent({ eventName: \"ContainerWarning\" }, warn);\n }\n this.emit(\"warning\", warn);\n });\n deltaManager.on(\"readonly\", (readonly) => {\n if (this.loaded) {\n this.setContextConnectedState(this.connectionState === ConnectionState.Connected, readonly);\n }\n this.emit(\"readonly\", readonly);\n });\n deltaManager.on(\"closed\", (error) => {\n this.closeCore(error);\n });\n deltaManager.on(\"disposed\", (error) => {\n this.disposeCore(error);\n });\n return deltaManager;\n }\n async attachDeltaManagerOpHandler(attributes, prefetchType, lastProcessedSequenceNumber) {\n return this._deltaManager.attachOpHandler(attributes.minimumSequenceNumber /* minimumSequenceNumber */, attributes.sequenceNumber /* snapshotSequenceNumber */, {\n process: (message) => this.processRemoteMessage(message),\n processSignal: (message) => {\n this.processSignal(message);\n },\n } /* handler to process incoming delta messages */, prefetchType, lastProcessedSequenceNumber);\n }\n logConnectionStateChangeTelemetry(value, oldState, reason) {\n // Log actual event\n const time = performanceNow();\n this.connectionTransitionTimes[value] = time;\n const duration = time - this.connectionTransitionTimes[oldState];\n let durationFromDisconnected;\n let autoReconnect;\n let checkpointSequenceNumber;\n let opsBehind;\n if (value === ConnectionState.Disconnected) {\n autoReconnect = this._deltaManager.connectionManager.reconnectMode;\n }\n else {\n if (value === ConnectionState.Connected) {\n durationFromDisconnected =\n time - this.connectionTransitionTimes[ConnectionState.Disconnected];\n durationFromDisconnected = formatTick(durationFromDisconnected);\n }\n else if (value === ConnectionState.CatchingUp) {\n // This info is of most interesting while Catching Up.\n checkpointSequenceNumber = this.deltaManager.lastKnownSeqNumber;\n // Need to check that we have already loaded and fetched the snapshot.\n if (this.deltaManager.hasCheckpointSequenceNumber && this.loaded) {\n opsBehind = checkpointSequenceNumber - this.deltaManager.lastSequenceNumber;\n }\n }\n }\n this.mc.logger.sendPerformanceEvent({\n eventName: `ConnectionStateChange_${ConnectionState[value]}`,\n from: ConnectionState[oldState],\n duration,\n durationFromDisconnected,\n reason: reason?.text,\n connectionCount: this.connectionCount,\n pendingClientId: this.connectionStateHandler.pendingClientId,\n clientId: this.connectionStateHandler.clientId,\n autoReconnect,\n opsBehind,\n online: OnlineStatus[isOnline()],\n lastVisible: this.lastVisible === undefined ? undefined : performanceNow() - this.lastVisible,\n checkpointSequenceNumber,\n quorumSize: this._protocolHandler?.quorum.getMembers().size,\n audienceSize: this._protocolHandler?.audience.getMembers().size,\n isDirty: this.isDirty,\n ...this._deltaManager.connectionProps,\n }, reason?.error);\n if (value === ConnectionState.Connected) {\n this.connectionCount++;\n }\n }\n propagateConnectionState(disconnectedReason) {\n const connected = this.connectionState === ConnectionState.Connected;\n if (connected) {\n const clientId = this.connectionStateHandler.clientId;\n assert(clientId !== undefined, 0x96e /* there has to be clientId */);\n this.protocolHandler.audience.setCurrentClientId(clientId);\n }\n // We communicate only transitions to Connected & Disconnected states, skipping all other states.\n // This can be changed in the future, for example we likely should add \"CatchingUp\" event on Container.\n if (this.connectionState !== ConnectionState.Connected &&\n this.connectionState !== ConnectionState.Disconnected) {\n return;\n }\n // Both protocol and context should not be undefined if we got so far.\n this.setContextConnectedState(connected, this.readOnlyInfo.readonly ?? false);\n this.protocolHandler.setConnectionState(connected, this.clientId);\n raiseConnectedEvent(this.mc.logger, this, connected, this.clientId, disconnectedReason?.text);\n }\n // back-compat: ADO #1385: Remove in the future, summary op should come through submitSummaryMessage()\n submitContainerMessage(type, contents, batch, metadata) {\n switch (type) {\n case MessageType.Operation: {\n return this.submitMessage(type, JSON.stringify(contents), batch, metadata);\n }\n case MessageType.Summarize: {\n return this.submitSummaryMessage(contents);\n }\n default: {\n const newError = new GenericError(\"invalidContainerSubmitOpType\", undefined /* error */, { messageType: type });\n this.close(newError);\n return -1;\n }\n }\n }\n /**\n * Gets the `clientSequenceNumber` of last message in a batch.\n */\n submitBatch(batch, referenceSequenceNumber) {\n let clientSequenceNumber = -1;\n for (const message of batch) {\n clientSequenceNumber = this.submitMessage(MessageType.Operation, message.contents, true, // batch\n message.metadata, message.compression, referenceSequenceNumber);\n }\n this._deltaManager.flush();\n return clientSequenceNumber;\n }\n submitSummaryMessage(summary, referenceSequenceNumber) {\n // github #6451: this is only needed for staging so the server\n // know when the protocol tree is included\n // this can be removed once all clients send\n // protocol tree by default\n if (summary.details === undefined) {\n summary.details = {};\n }\n summary.details.includesProtocolTree = this.storageAdapter.summarizeProtocolTree;\n return this.submitMessage(MessageType.Summarize, JSON.stringify(summary), false /* batch */, undefined /* metadata */, undefined /* compression */, referenceSequenceNumber);\n }\n submitMessage(type, contents, batch, metadata, compression, referenceSequenceNumber) {\n if (this.connectionState !== ConnectionState.Connected) {\n this.mc.logger.sendErrorEvent({ eventName: \"SubmitMessageWithNoConnection\", type });\n return -1;\n }\n this.noopHeuristic?.notifyMessageSent();\n return this._deltaManager.submit(type, contents, batch, metadata, compression, referenceSequenceNumber);\n }\n /**\n * Processes incoming delta messages\n * @param message - delta message received from the server\n */\n processRemoteMessage(message) {\n const local = this.clientId === message.clientId;\n // Allow the protocol handler to process the message\n const result = this.protocolHandler.processMessage(message, local);\n // Forward messages to the loaded runtime for processing\n this.runtime.process(message, local);\n this.serializedStateManager.addProcessedOp(message);\n // Inactive (not in quorum or not writers) clients don't take part in the minimum sequence number calculation.\n if (this.activeConnection()) {\n if (this.noopHeuristic === undefined) {\n const serviceConfiguration = this.deltaManager.serviceConfiguration;\n // Note that config from first connection will be used for this container's lifetime.\n // That means that if relay service changes settings, such changes will impact only newly booted\n // clients.\n // All existing will continue to use settings they got earlier.\n assert(serviceConfiguration !== undefined, 0x2e4 /* \"there should be service config for active connection\" */);\n this.noopHeuristic = new NoopHeuristic(serviceConfiguration.noopTimeFrequency, serviceConfiguration.noopCountFrequency);\n this.noopHeuristic.on(\"wantsNoop\", () => {\n // On disconnect we notify the heuristic which should prevent it from wanting a noop.\n // Hitting this assert would imply we lost activeConnection between notifying the heuristic of a processed message and\n // running the microtask that the heuristic queued in response.\n assert(this.activeConnection(), 0x241 /* \"Trying to send noop without active connection\" */);\n this.submitMessage(MessageType.NoOp);\n });\n }\n this.noopHeuristic.notifyMessageProcessed(message);\n // The contract with the protocolHandler is that returning \"immediateNoOp\" is equivalent to \"please immediately accept the proposal I just processed\".\n if (result.immediateNoOp === true) {\n this.submitMessage(MessageType.Accept);\n }\n }\n this.emit(\"op\", message);\n }\n // unknown should be removed once `@alpha` tag is removed from IContainerContext\n submitSignal(content, targetClientId) {\n this._deltaManager.submitSignal(JSON.stringify(content), targetClientId);\n }\n processSignal(message) {\n // No clientId indicates a system signal message.\n if (protocolHandlerShouldProcessSignal(message)) {\n this.protocolHandler.processSignal(message);\n }\n else {\n const local = this.clientId === message.clientId;\n this.runtime.processSignal(message, local);\n }\n }\n async instantiateRuntime(codeDetails, snapshotTree, pendingLocalState, snapshot) {\n assert(this._runtime?.disposed !== false, 0x0dd /* \"Existing runtime not disposed\" */);\n // The relative loader will proxy requests to '/' to the loader itself assuming no non-cache flags\n // are set. Global requests will still go directly to the loader\n const maybeLoader = this.scope;\n const loader = new RelativeLoader(this, maybeLoader.ILoader);\n const loadCodeResult = await PerformanceEvent.timedExecAsync(this.subLogger, { eventName: \"CodeLoad\" }, async () => this.codeLoader.load(codeDetails));\n this._loadedModule = {\n module: loadCodeResult.module,\n // An older interface ICodeLoader could return an IFluidModule which didn't have details.\n // If we're using one of those older ICodeLoaders, then we fix up the module with the specified details here.\n // TODO: Determine if this is still a realistic scenario or if this fixup could be removed.\n details: loadCodeResult.details ?? codeDetails,\n };\n const fluidExport = this._loadedModule.module.fluidExport;\n const runtimeFactory = fluidExport?.IRuntimeFactory;\n if (runtimeFactory === undefined) {\n throw new Error(packageNotFactoryError);\n }\n const existing = snapshotTree !== undefined;\n const context = new ContainerContext(this.options, this.scope, snapshotTree, this._loadedFromVersion, this._deltaManager, this.storageAdapter, this.protocolHandler.quorum, this.protocolHandler.audience, loader, (type, contents, batch, metadata) => this.submitContainerMessage(type, contents, batch, metadata), (summaryOp, referenceSequenceNumber) => this.submitSummaryMessage(summaryOp, referenceSequenceNumber), (batch, referenceSequenceNumber) => this.submitBatch(batch, referenceSequenceNumber), (content, targetClientId) => this.submitSignal(content, targetClientId), (error) => this.dispose(error), (error) => this.close(error), this.updateDirtyContainerState, this.getAbsoluteUrl, () => this.resolvedUrl?.id, () => this.clientId, () => this.attachState, () => this.connected, this._deltaManager.clientDetails, existing, this.subLogger, pendingLocalState, snapshot);\n const runtime = await PerformanceEvent.timedExecAsync(this.subLogger, { eventName: \"InstantiateRuntime\" }, async () => runtimeFactory.instantiateRuntime(context, existing));\n // Validate that the Runtime is compatible with this Loader.\n const maybeRuntimeCompatDetails = runtime;\n validateRuntimeCompatibility(maybeRuntimeCompatDetails.ILayerCompatDetails, (error) => this.dispose(error));\n this._runtime = runtime;\n this._lifecycleEvents.emit(\"runtimeInstantiated\");\n this._loadedCodeDetails = codeDetails;\n }\n /**\n * Set the connected state of the ContainerContext\n * This controls the \"connected\" state of the ContainerRuntime as well\n * @param connected - Is the container currently connected?\n * @param readonly - Is the container in readonly mode?\n */\n setContextConnectedState(connected, readonly) {\n if (this._runtime?.disposed === false && this.loaded) {\n this.runtime.setConnectionState(connected &&\n !readonly /* container can send ops if connected to service and not in readonly mode */, this.clientId);\n }\n }\n handleDeltaConnectionArg(deltaConnectionArg, connectionArgs) {\n // This ensures that we allow transitions to \"connected\" state only after container has been fully loaded\n // and we propagate such events to container runtime. All events prior to being loaded are ignored.\n // This means if we get here in non-loaded state, we might not deliver proper events to container runtime,\n // and runtime implementation may miss such events.\n assert(this.loaded, 0x96f /* has to be called after container transitions to loaded state */);\n switch (deltaConnectionArg) {\n case undefined: {\n if (connectionArgs) {\n // connect to delta stream now since we did not before\n this.connectToDeltaStream(connectionArgs);\n }\n }\n // intentional fallthrough\n case \"delayed\": {\n assert(this.inboundQueuePausedFromInit, 0x346 /* inboundQueuePausedFromInit should be true */);\n this.inboundQueuePausedFromInit = false;\n this._deltaManager.inbound.resume();\n this._deltaManager.inboundSignal.resume();\n break;\n }\n case \"none\": {\n break;\n }\n default: {\n unreachableCase(deltaConnectionArg);\n }\n }\n }\n}\n//# sourceMappingURL=container.js.map","/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\nimport { AttachState } from \"@fluidframework/container-definitions\";\nimport { assert } from \"@fluidframework/core-utils/internal\";\nimport { getSnapshotTreeAndBlobsFromSerializedContainer } from \"./utils.js\";\n/**\n * Executes the attach process state machine based on the provided data and services.\n * This method is retriable on failure. Based on the provided initialAttachmentData\n * this method will resume the attachment process and attempt to complete it.\n *\n * @param AttachProcessProps - The data and services necessary to run the attachment process\n * @returns - The attach summary (only if offline load is enabled), or undefined\n */\nexport const runRetriableAttachProcess = async ({ detachedBlobStorage, createOrGetStorageService, setAttachmentData, createAttachmentSummary, offlineLoadEnabled, initialAttachmentData, }) => {\n let currentData = initialAttachmentData;\n if (currentData.blobs === undefined) {\n // If attachment blobs were uploaded in detached state we will go through a different attach flow\n const outstandingAttachmentBlobs = detachedBlobStorage !== undefined && detachedBlobStorage.size > 0;\n // Determine the next phase of attaching which depends on if there are attachment blobs\n // if there are, we will stay detached, so an empty file can be created, and the blobs\n // uploaded, otherwise we will get the summary to create the file with and move to attaching\n currentData = outstandingAttachmentBlobs\n ? {\n state: AttachState.Detached,\n blobs: \"outstanding\",\n redirectTable: new Map(),\n }\n : {\n state: AttachState.Attaching,\n summary: createAttachmentSummary(),\n blobs: \"none\",\n };\n setAttachmentData(currentData);\n }\n // this has to run here, as it is what creates the file\n // and we need to file for all possible cases after this point\n const storage = await createOrGetStorageService(currentData.summary);\n if (currentData.blobs === \"outstanding\") {\n const { redirectTable } = currentData;\n // upload blobs to storage\n assert(!!detachedBlobStorage, 0x24e /* \"assertion for type narrowing\" */);\n // build a table mapping IDs assigned locally to IDs assigned by storage and pass it to runtime to\n // support blob handles that only know about the local IDs\n while (redirectTable.size < detachedBlobStorage.size) {\n const newIds = detachedBlobStorage.getBlobIds().filter((id) => !redirectTable.has(id));\n for (const id of newIds) {\n const blob = await detachedBlobStorage.readBlob(id);\n const response = await storage.createBlob(blob);\n redirectTable.set(id, response.id);\n }\n }\n setAttachmentData((currentData = {\n state: AttachState.Attaching,\n summary: createAttachmentSummary(redirectTable),\n blobs: \"done\",\n }));\n }\n assert(currentData.state === AttachState.Attaching, 0x8e2 /* must be attaching by this point */);\n if (currentData.blobs === \"done\") {\n // done means outstanding blobs were uploaded.\n // in that case an empty file was created, the blobs were uploaded\n // and now this finally uploads the summary\n await storage.uploadSummaryWithContext(currentData.summary, {\n referenceSequenceNumber: 0,\n ackHandle: undefined,\n proposalHandle: undefined,\n });\n }\n const snapshot = offlineLoadEnabled\n ? getSnapshotTreeAndBlobsFromSerializedContainer(currentData.summary)\n : undefined;\n setAttachmentData((currentData = {\n state: AttachState.Attached,\n }));\n return snapshot;\n};\n//# sourceMappingURL=attachment.js.map","/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\nimport { bufferToString, stringToBuffer } from \"@fluid-internal/client-utils\";\nimport { assert } from \"@fluidframework/core-utils/internal\";\nexport function tryInitializeMemoryDetachedBlobStorage(detachedStorage, attachmentBlobs) {\n assert(detachedStorage.size === 0, 0x99e /* Blob storage already initialized */);\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n const maybeAttachmentBlobs = JSON.parse(attachmentBlobs);\n assert(Array.isArray(maybeAttachmentBlobs), 0x99f /* Invalid attachmentBlobs */);\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n detachedStorage.initialize(maybeAttachmentBlobs);\n}\n/**\n * Creates a new instance of `MemoryDetachedBlobStorage`.\n * The returned storage allows for creating, reading, and managing blobs in memory.\n * It also provides methods for serialization and initialization with attachment blobs.\n * @returns A new `MemoryDetachedBlobStorage` instance.\n */\n// eslint-disable-next-line import/no-deprecated\nexport function createMemoryDetachedBlobStorage() {\n const blobs = [];\n const storage = {\n createBlob: async (file) => ({\n id: `${blobs.push(file) - 1}`,\n }),\n readBlob: async (id) => blobs[Number(id)] ?? Promise.reject(new Error(`Blob not found: ${id}`)),\n get size() {\n return blobs.length;\n },\n getBlobIds: () => blobs.map((_, i) => `${i}`),\n dispose: () => blobs.splice(0),\n serialize: () => blobs.length > 0\n ? JSON.stringify(blobs.map((b) => bufferToString(b, \"utf8\")))\n : undefined,\n initialize: (attachmentBlobs) => blobs.push(...attachmentBlobs.map((maybeBlob) => stringToBuffer(maybeBlob, \"utf8\"))),\n };\n return storage;\n}\n//# sourceMappingURL=memoryBlobStorage.js.map","/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n/**\n * Determines if an arbitrary value is an object\n * @param value - The value to check to see if it is an object\n * @returns True if the passed value is an object\n *\n * @internal\n */\nexport const isObject = (value) => typeof value === \"object\" && value !== null;\n/**\n * Determines if an arbitrary value is a promise\n * @param value - The value to check to see if it is a promise\n * @returns True if the passed value is a promise\n *\n * @internal\n */\nexport const isPromiseLike = (value) => isObject(value) && \"then\" in value && typeof value.then === \"function\";\n//# sourceMappingURL=typesGuards.js.map","/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\nexport function initQuorumValuesFromCodeDetails(source) {\n // Seed the base quorum to be an empty list with a code quorum set\n const committedCodeProposal = {\n key: \"code\",\n value: source,\n approvalSequenceNumber: 0,\n commitSequenceNumber: 0,\n sequenceNumber: 0,\n };\n return [[\"code\", committedCodeProposal]];\n}\n//# sourceMappingURL=quorum.js.map","import { ConnectionState } from '@fluidframework/container-loader';\nimport { waitContainerToCatchUp } from '@fluidframework/container-loader/legacy';\nimport { isOdspResolvedUrl } from '@fluidx/utilities';\nimport { EventEmitter } from 'events';\nimport { sendTelemetryEvent } from '@fluidx/telemetry';\nexport class ContainerProxy extends EventEmitter {\n constructor(container, documentUrl, documentServiceFactoryProviderPromise, // eslint-disable-next-line import/no-deprecated -- TODO: Task 8915737: Remove use of deprecated ComponentLifecycle\n component, logger){\n super(), this.container = container, this.documentUrl = documentUrl, this.documentServiceFactoryProviderPromise = documentServiceFactoryProviderPromise, this.component = component, this.logger = logger, // eslint-disable-next-line @fluidx/ffx-rules/prefer-private-fields -- TODO: Exception added when rule was enabled. Please consider refactoring this to use ECMAScript # prefixed private properties for better minification\n this.addMemberEventHandler = ()=>{\n this.emit('membersChanged', true);\n }, // eslint-disable-next-line @fluidx/ffx-rules/prefer-private-fields -- TODO: Exception added when rule was enabled. Please consider refactoring this to use ECMAScript # prefixed private properties for better minification\n this.removeMemberEventHandler = ()=>{\n this.emit('membersChanged', false);\n }, // eslint-disable-next-line @fluidx/ffx-rules/prefer-private-fields -- TODO: Exception added when rule was enabled. Please consider refactoring this to use ECMAScript # prefixed private properties for better minification\n this.connectedEventHandler = ()=>{\n this.emit('connected');\n }, /**\n * @param reason The reason for disconnection\n */ // eslint-disable-next-line @fluidx/ffx-rules/prefer-private-fields -- TODO: Exception added when rule was enabled. Please consider refactoring this to use ECMAScript # prefixed private properties for better minification\n this.disconnectedEventHandler = (reason)=>{\n this.emit('disconnected', reason);\n this.lastDisconnectReason = reason;\n }, // eslint-disable-next-line @fluidx/ffx-rules/prefer-private-fields -- TODO: Exception added when rule was enabled. Please consider refactoring this to use ECMAScript # prefixed private properties for better minification\n this.dirtyEventHandler = ()=>{\n this._isDirty = true;\n this.emit('dirty');\n this.lastEditedTimestamp = Date.now();\n }, // eslint-disable-next-line @fluidx/ffx-rules/prefer-private-fields -- TODO: Exception added when rule was enabled. Please consider refactoring this to use ECMAScript # prefixed private properties for better minification\n this.savedEventHandler = ()=>{\n this._isDirty = false;\n this.emit('saved');\n }, // eslint-disable-next-line @fluidx/ffx-rules/prefer-private-fields -- TODO: Exception added when rule was enabled. Please consider refactoring this to use ECMAScript # prefixed private properties for better minification\n this.readonlyEventHandler = ()=>{\n this.emit('readonlyChanged', this.getReadonly().isReadOnly);\n }, /* eslint-disable-next-line import/no-deprecated, @fluidx/ffx-rules/prefer-private-fields --\n TODO: Task 8915737: Remove use of deprecated ComponentLifecycle\n TODO: Exception added when rule was enabled. Please consider refactoring this to use ECMAScript # prefixed private properties for better minification */ this.closedEventHandler = (error)=>{\n this.emit('error', error);\n this.componentCriticalError = error;\n }, // eslint-disable-next-line @fluidx/ffx-rules/prefer-private-fields -- TODO: Exception added when rule was enabled. Please consider refactoring this to use ECMAScript # prefixed private properties for better minification\n this.disposedEventHandler = ()=>{\n this.removeContainerListeners();\n this.removeComponentListeners();\n this.removeAllListeners();\n this.dispose();\n this.emit('disposed');\n }, // eslint-disable-next-line @fluidx/ffx-rules/prefer-private-fields -- TODO: Exception added when rule was enabled. Please consider refactoring this to use ECMAScript # prefixed private properties for better minification\n this.waringEventHandler = (error)=>{\n this.emit('warning', error);\n };\n this.trackContainerEvents();\n this.trackComponentEvents();\n if (this.container.forceReadonly) {\n this.setReadonly = (isReadOnly, shouldPersist)=>{\n if (shouldPersist) {\n const componentLifecycleProvider = this.component.Lifecycle ?? this.component.ComponentLifecycle;\n componentLifecycleProvider?.setReadonly?.(isReadOnly, true);\n } else this.container.forceReadonly?.(isReadOnly);\n };\n }\n this._disposed = false;\n this._isDirty = this.component.Lifecycle?.isDirty !== undefined ? this.container.isDirty || this.component.Lifecycle.isDirty : this.container.isDirty;\n }\n emit(event, ...arg) {\n // override super class emit to make emit type safe\n return super.emit(event, ...arg);\n }\n // eslint-disable-next-line @fluidx/ffx-rules/prefer-private-fields -- TODO: Exception added when rule was enabled. Please consider refactoring this to use ECMAScript # prefixed private properties for better minification\n trackContainerEvents() {\n this.container.audience.on('addMember', this.addMemberEventHandler);\n this.container.audience.on('removeMember', this.removeMemberEventHandler);\n this.container.on('connected', this.connectedEventHandler);\n this.container.on('disconnected', this.disconnectedEventHandler);\n this.container.on('dirty', this.dirtyEventHandler);\n this.container.on('saved', this.savedEventHandler);\n this.container.on('readonly', this.readonlyEventHandler);\n this.container.on('closed', this.closedEventHandler);\n this.container.on('disposed', this.disposedEventHandler);\n this.container.on('warning', this.waringEventHandler);\n }\n // eslint-disable-next-line @fluidx/ffx-rules/prefer-private-fields -- TODO: Exception added when rule was enabled. Please consider refactoring this to use ECMAScript # prefixed private properties for better minification\n trackComponentEvents() {\n const componentLifecycleProvider = this.component.Lifecycle ?? this.component.ComponentLifecycle;\n componentLifecycleProvider?.on('dirty', this.dirtyEventHandler);\n componentLifecycleProvider?.on('readonlyChanged', this.readonlyEventHandler);\n }\n // eslint-disable-next-line @fluidx/ffx-rules/prefer-private-fields -- TODO: Exception added when rule was enabled. Please consider refactoring this to use ECMAScript # prefixed private properties for better minification\n removeContainerListeners() {\n this.container.audience.off('addMember', this.addMemberEventHandler);\n this.container.audience.off('removeMember', this.removeMemberEventHandler);\n this.container.off('connected', this.connectedEventHandler);\n this.container.off('disconnected', this.disconnectedEventHandler);\n this.container.off('dirty', this.dirtyEventHandler);\n this.container.off('saved', this.savedEventHandler);\n this.container.off('readonly', this.readonlyEventHandler);\n this.container.off('closed', this.closedEventHandler);\n this.container.off('disposed', this.disposedEventHandler);\n this.container.off('warning', this.waringEventHandler);\n }\n // eslint-disable-next-line @fluidx/ffx-rules/prefer-private-fields -- TODO: Exception added when rule was enabled. Please consider refactoring this to use ECMAScript # prefixed private properties for better minification\n removeComponentListeners() {\n const componentLifecycleProvider = this.component.Lifecycle ?? this.component.ComponentLifecycle;\n componentLifecycleProvider?.off('dirty', this.dirtyEventHandler);\n componentLifecycleProvider?.off('readonlyChanged', this.readonlyEventHandler);\n }\n //#region ComponentLifecycle\n // eslint-disable-next-line import/no-deprecated -- TODO: Task 8915737: Remove use of deprecated ComponentLifecycle\n get ComponentLifecycle() {\n return this;\n }\n get disposed() {\n return this.container.disposed || this._disposed;\n }\n get isDirty() {\n return this._isDirty;\n }\n get isReadOnly() {\n const componentLifecycleProvider = this.component.Lifecycle ?? this.component.ComponentLifecycle;\n return (this.container.readOnlyInfo.readonly || componentLifecycleProvider?.isReadOnly) ?? false;\n }\n getReadonly() {\n const componentLifecycleProvider = this.component.Lifecycle ?? this.component.ComponentLifecycle;\n return componentLifecycleProvider?.getReadonly?.() ?? {\n isReadOnly: this.isReadOnly\n };\n }\n get Lifecycle() {\n return this;\n }\n async waitForAllData() {\n await waitContainerToCatchUp(this.container);\n }\n updateLastCachedTimestamp() {\n this._isDirty = false;\n this.lastCachedTimestamp = Date.now();\n }\n //#endregion ComponentLifecycle\n //#region Disposable\n get Disposable() {\n return this;\n }\n dispose() {\n if (this._disposed) {\n return;\n }\n this._disposed = true;\n // check if this.component has dispose method and dispose components before disposing the container.\n this.component.Disposable?.dispose();\n this.logger && sendTelemetryEvent(this.logger, {\n eventName: 'ComponentDisposed',\n isDirty: this.isDirty,\n attachState: this.container.attachState,\n componentCriticalError: this.componentCriticalError?.errorType,\n componentCriticalErrorMessage: this.componentCriticalError?.message,\n connectionState: this.container.connectionState,\n lastDisconnectReason: this.lastDisconnectReason,\n lastCachedTimestamp: this.lastCachedTimestamp,\n lastEditedTimestamp: this.lastEditedTimestamp,\n isOnline: navigator.onLine\n });\n this.container.dispose();\n }\n //#endregion Disposable\n //#region ConnectionManager\n get ConnectionManager() {\n return this;\n }\n get isConnected() {\n return this.container.connectionState === ConnectionState.Connected;\n }\n connect() {\n this.container.connect();\n }\n disconnect() {\n this.container.disconnect();\n }\n //#endregion ConnectionManager\n //#region CollaboratorInfo\n get CollaboratorInfo() {\n return this;\n }\n get clientId() {\n return this.container.clientId;\n }\n getMembers() {\n const result = new Map();\n this.container.audience.getMembers().forEach((client, clientId)=>{\n const user = client.user;\n result.set(clientId, {\n id: user.id,\n name: user.name,\n email: user.email,\n joinTime: client.timestamp,\n isGuest: user.isGuest,\n mode: client.mode\n });\n });\n return result;\n }\n //#endregion CollaboratorInfo\n //#region FluidMetadataProvider\n get FluidMetadataProvider() {\n return this;\n }\n getCodeDetails() {\n return this.container.getLoadedCodeDetails();\n }\n getSnapshot() {\n return this.container.serialize();\n }\n //#endregion FluidMetadataProvider\n //#region LoopComponentUrl\n get LoopComponentUrl() {\n return this;\n }\n async initializeLoopComponentUrl(fileName) {\n if (!fileName) {\n throw new Error('File name is required to initialize component url.');\n }\n const documentServiceFactoryProvider = await this.documentServiceFactoryProviderPromise;\n if (!documentServiceFactoryProvider?.getCreateDocumentRequest) {\n throw new Error('FluidDocumentServiceFactoryProvider.getCreateDocumentRequest is required to initialize component url');\n }\n const request = await documentServiceFactoryProvider.getCreateDocumentRequest(fileName);\n await this.container.attach(request);\n }\n async getLoopComponentUrl() {\n // when we create a new component, documentUrl is undefined so we need to use getAbsoluteUrl() to get absolute path.\n const absoluteUrl = this.documentUrl ? this.documentUrl : await this.container.getAbsoluteUrl('/');\n // if container isn't attached when this is called, getAbsoluteUrl() will return undefined.\n if (!absoluteUrl) return undefined;\n return new URL(absoluteUrl);\n }\n //#endregion LoopComponentUrl\n //#region FluidShareLinkInfo\n get FluidShareLinkInfo() {\n return this;\n }\n getShareLink() {\n const resolvedUrl = this.container.resolvedUrl;\n if (resolvedUrl && isOdspResolvedUrl(resolvedUrl)) {\n return resolvedUrl.shareLinkInfo;\n }\n return undefined;\n }\n}\n\n//# sourceMappingURL=containerProxy.js.map","import { ContainerProxy } from './containerProxy';\n/**\n * Create a proxy object with a component and required provider types. Callers of this function\n * can access providers listed in the required provider types from the proxy object.\n * @param component A component\n * @param container A Fluid container or undefined when component is non-Fluid\n * @param requiredProviderTypes A list of required provider types that callers expect to get from the component\n * @param documentServiceFactoryProviderPromise A fluid document service factory provider\n * @returns A proxy object with required provider types\n */ export function createProviderProxy(component, container, requiredProviderTypes, documentServiceFactoryProviderPromise, documentUrl, logger) {\n const proxy = {};\n let containerProxy = undefined;\n const updatedProviderTypes = {\n // Supply default values for required provider types\n Disposable: 'Disposable',\n ...requiredProviderTypes\n };\n if (container) {\n containerProxy = new ContainerProxy(container, documentUrl, documentServiceFactoryProviderPromise, component, logger);\n }\n for (const key of Object.keys(updatedProviderTypes)){\n // If the component does not have a required provider, undefined will be assigned to the provider in proxy.\n // By default, writable is false in property descriptor so the property can't be overwritten.\n const value = containerProxy && key in containerProxy ? {\n value: containerProxy[key]\n } : {\n value: component[key]\n };\n Object.defineProperty(proxy, key, value);\n }\n return proxy;\n}\n\n//# sourceMappingURL=providerProxy.js.map","/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n/**\n * The Request Parser takes an IRequest provides parsing and sub request creation\n * @legacy\n * @alpha\n */\nexport class RequestParser {\n /**\n * Splits the path of the url and decodes each path part\n * @param url - the url to get path parts of\n */\n static getPathParts(url) {\n const queryStartIndex = url.indexOf(\"?\");\n return url\n .substring(0, queryStartIndex < 0 ? url.length : queryStartIndex)\n .split(\"/\")\n .reduce((pv, cv) => {\n if (cv !== undefined && cv.length > 0) {\n pv.push(decodeURIComponent(cv));\n }\n return pv;\n }, []);\n }\n static create(request) {\n // Perf optimizations.\n if (request instanceof RequestParser) {\n return request;\n }\n return new RequestParser(request);\n }\n constructor(request) {\n this.request = request;\n const queryStartIndex = this.request.url.indexOf(\"?\");\n this.query = queryStartIndex >= 0 ? this.request.url.substring(queryStartIndex) : \"\";\n if (request.headers !== undefined) {\n this.headers = request.headers;\n }\n }\n get url() {\n return this.request.url;\n }\n /**\n * Returns the decoded path parts of the request's url\n */\n get pathParts() {\n if (this.requestPathParts === undefined) {\n this.requestPathParts = RequestParser.getPathParts(this.url);\n }\n return this.requestPathParts;\n }\n /**\n * Returns true if it's a terminating path, i.e. no more elements after `elements` entries and empty query.\n * @param elements - number of elements in path\n */\n isLeaf(elements) {\n return this.query === \"\" && this.pathParts.length === elements;\n }\n /**\n * Creates a sub request starting at a specific path part of this request's url\n * The sub request url always has a leading slash, and always include query params if original url has any\n * e.g. original url is /a/b/?queryParams, createSubRequest(0) is /a/b/?queryParams\n * createSubRequest(1) is /b/?queryParams\n * createSubRequest(2) is /?queryParams\n * createSubRequest(n) where n is bigger than parts length, e.g. 2, or n is less than 0 will throw an exception\n *\n * note: query params are not counted towards path parts.\n *\n * @param startingPathIndex - The index of the first path part of the sub request\n */\n createSubRequest(startingPathIndex) {\n const pathLen = this.pathParts.length;\n if (startingPathIndex < 0 || startingPathIndex > pathLen) {\n throw new Error(\"incorrect sub-request\");\n }\n if (startingPathIndex === pathLen && this.url.includes(\"?\")) {\n return {\n url: `/${this.query}`,\n headers: this.headers,\n };\n }\n const path = `/${this.pathParts.slice(startingPathIndex).join(\"/\")}`;\n return {\n url: this.query === \"\" ? path : `${path}/${this.query}`,\n headers: this.headers,\n };\n }\n}\n//# sourceMappingURL=requestParser.js.map","import { ActivityTracker } from '@fluidx/telemetry';\nimport { ActivityRequestComponent } from '../Telemetry';\nimport { resumeContainerInternal } from './resumeContainerInternal';\nimport { ComponentNotFoundError } from '@fluidx/1p-loop-types';\nimport { createProviderProxy } from '../Utils/providerProxy';\nimport { RequestParser } from '@fluidframework/runtime-utils/legacy';\nimport { tryParseCompatibleResolvedUrl } from '@fluidframework/container-loader/legacy';\n/**\n * Converts a Fluid ODSP URL to a standard URL.\n * @param maybeFluidOdspUrl The URL to convert\n * @returns The converted URL as a standard URL in string format.\n */ function maybeFluidOdspUrlToStandardUrl(maybeFluidOdspUrl) {\n try {\n const parsedUrl = new URL(maybeFluidOdspUrl);\n // Older versions of the OdspUrlResolver return a URL with a custom protocol, this was changed in newer versions.\n // Since hosts bundle the OdspUrlResolver, we need to handle both cases for backwards compatibility in CDN delivered code.\n if (parsedUrl.protocol === 'fluid-odsp:') {\n // If the protocol is fluid-odsp, the url won't parse as expected. Change its protocol to enable http-style parsing.\n parsedUrl.protocol = 'https';\n return parsedUrl.href;\n }\n } catch {\n // If the input is not an actual url, creating a new URL will throw. We want to still return the original input as\n // that still shows it is not a fluid-odsp URL\n }\n // False alarm, was not a fluid-odsp URL.\n return maybeFluidOdspUrl;\n}\n/**\n * Requests a component from a given container.\n * @param container A Fluid Container\n * @param urlResolver A url resolver\n * @param componentRequest The url of the component to open\n * @param logger\n * @param startContainerInPausedState\n * @param dependencySynthesizer A dependency synthesizer that allows the host to register providers for the container and components to access\n * @param requiredProviderTypes a list of required provider types that callers expect to get from the component\n */ export async function requestComponent(container, urlResolver, componentRequest, logger, startContainerInPausedState, dependencySynthesizer, requiredProviderTypes) {\n const activityTracker = ActivityTracker.start(ActivityRequestComponent, logger, {\n addUserTiming: true\n });\n let response;\n if (startContainerInPausedState) {\n // TODO: task 7534758, set externalRequest to true once tombstone change is integrated\n const headersWithoutWait = {\n ...componentRequest?.headers,\n wait: false,\n externalRequest: false\n };\n // The 'externalRequest' flag is used by the GC to determine whether the requested component is marked as referenced or not.\n // In case the component was marked as unreferenced, the request will return with 404 status code;\n // If the flag is not provided, the request should return a 200, unless other error occurs.\n response = await request(container, urlResolver, headersWithoutWait, componentRequest);\n if (response.status === 404) {\n // The component was not in the loaded snapshot, it may be in the unsummarized op stream, let's try to resume the container and try again.\n resumeContainerInternal(container);\n // TODO: task 7534758, set externalRequest to true once tombstone change is integrated\n const headersWithWait = {\n ...componentRequest?.headers,\n externalRequest: false\n };\n response = await request(container, urlResolver, headersWithWait, componentRequest);\n }\n } else {\n // TODO: task 7534758, set externalRequest to true once tombstone change is integrated\n const headersWithWait = {\n ...componentRequest?.headers,\n externalRequest: false\n };\n response = await request(container, urlResolver, headersWithWait, componentRequest);\n }\n if (response.status !== 200 || response.mimeType !== 'fluid/component' && response.mimeType !== 'fluid/object' || !response.value) {\n // We log response.value here trusting that it won't have PII but in reality all of our fluid error logging is likely prone to issues until\n // https://github.com/microsoft/FluidFramework/issues/1920 is addressed\n const error = new ComponentNotFoundError(/* message */ `Component not found: status=${response.status}, value=${response.value}`, /* internalError */ undefined, /* code */ response.status, /* errorStack */ response.stack);\n const additionalProps = {\n externalRequest: false,\n mimeType: response.mimeType\n };\n activityTracker.setResult(false, additionalProps, error);\n throw error;\n }\n const component = response.value;\n activityTracker.setResult(true);\n if (requiredProviderTypes) {\n const providers = dependencySynthesizer?.synthesize({\n FluidDocumentServiceFactoryProvider: 'FluidDocumentServiceFactoryProvider'\n }, undefined);\n return createProviderProxy(component, container, requiredProviderTypes, providers?.FluidDocumentServiceFactoryProvider, componentRequest?.url, logger);\n }\n return component;\n}\nasync function request(container, urlResolver, headers, componentRequest) {\n // If we do not have a componentRequest, that means the requested component is detached and we will return back the root component\n let url = '/';\n if (componentRequest) {\n const resolvedUrl = await urlResolver.resolve({\n url: componentRequest.url\n });\n if (!resolvedUrl) {\n throw new Error(`Get undefined for resolvedUrl with ${componentRequest.url}`);\n }\n const parsedUrl = tryParseCompatibleResolvedUrl(maybeFluidOdspUrlToStandardUrl(resolvedUrl.url));\n if (parsedUrl !== undefined) {\n url = `${parsedUrl.path}${parsedUrl.query}`;\n }\n }\n const request = {\n url,\n headers\n };\n // On older containers, the `getEntryPoint` API may not exist and/or may return `undefined`,\n // despite of what the newer typescript typings may think. To this end, add a \"?.\" before invoking\n // `getEntryPoint`, and also check the return value of entryPoint for truthiness.\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- see explanation above about back-compat with older containers\n const entryPoint = await container.getEntryPoint?.();\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- see explanation above about back-compat with older containers\n if (entryPoint) {\n const defaultResponse = {\n status: 200,\n mimeType: 'fluid/object',\n value: entryPoint\n };\n if (request.url === '/' || request.url === '') {\n return defaultResponse;\n }\n const urlRouter = await entryPoint.UrlRouterFetcher?.getUrlRouter();\n // If urlRouter is undefined or request returns undefined, we want to render entry point at least.\n return await urlRouter?.request(RequestParser.create(request)) ?? defaultResponse;\n }\n // The code below is for backwards compatibility, since older containers -- especially from other teams --\n // will not have an entry point set up via `getEntryPoint`, and/or have that method return undefined.\n // Please do NOT copy this pattern to other places, it is brittle.\n // Note that FF 2.0.0-internal.8.0.0 removed `container.request` (and it was already removed in the types),\n // but `container.runtime.request` still exists (for now).\n // The code can probably be removed in mid-2024, with Whiteboard -- our one known partner with an older container --\n // propagating their changes that include `getEntryPoint` likely by spring 2024.\n // However, the longer we can keep this code around (and as long as `container.runtime.request`\n // actually resolves to something), the safer.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const legacyRequestMethod = container.runtime?.request;\n if (legacyRequestMethod && typeof legacyRequestMethod === 'function') {\n return legacyRequestMethod(request);\n }\n throw new Error('Could not invoke the request via the legacy back-compat path: `container.runtime.request` not found.');\n}\n\n//# sourceMappingURL=requestComponent.js.map","/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n/**\n * @legacy\n * @alpha\n */\nexport const IFluidHandleContext = \"IFluidHandleContext\";\n/**\n * @public\n * @privateRemarks\n * This really should be deprecated and alpha, but since its a merged export with the public interface,\n * it can't have its own docs or different tags.\n */\nexport const IFluidHandle = \"IFluidHandle\";\n/**\n * Symbol which must only be used on an {@link (IFluidHandle:interface)}, and is used to identify such objects.\n *\n * @remarks\n * To narrow arbitrary objects to handles do not simply check for this symbol:\n * instead use {@link @fluidframework/runtime-utils#isFluidHandle} which has improved compatibility\n * with older implementations of handles that may exist due to dynamic code loading of older packages.\n *\n * @privateRemarks\n * Normally `Symbol` would be used here instead of `Symbol.for` since just using Symbol (and avoiding the global symbol registry) removes the risk of collision, which is the main point of using a symbol for this in the first place.\n * In this case however, some users of this library do dynamic code loading, and can end up with multiple versions of packages, and mix data from one version with another.\n * Using the global symbol registry allows duplicate copies of this library to share a single symbol, though reintroduces the risk of collision, which is mitigated via the use of a UUIDv4 randomly generated when this code was authored:\n * @public\n */\nexport const fluidHandleSymbol = Symbol.for(\"FluidHandle-3978c7cf-4675-49ba-a20c-bf35efbf43da\");\n//# sourceMappingURL=handles.js.map","/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\nimport { IFluidHandle, fluidHandleSymbol } from \"@fluidframework/core-interfaces\";\n/**\n * Is the input object a @see ISerializedHandle?\n * @internal\n */\nexport const isSerializedHandle = (value) => value?.type === \"__fluid_handle__\";\n/**\n * @internal\n */\nexport const isFluidHandleInternalPayloadPending = (fluidHandleInternal) => \"payloadPending\" in fluidHandleInternal && fluidHandleInternal.payloadPending === true;\n/**\n * Check if the handle is an IFluidHandlePayloadPending.\n * @privateRemarks\n * This should be true for locally-created BlobHandles currently. When IFluidHandlePayloadPending is merged\n * to IFluidHandle, this type guard will no longer be necessary.\n * @legacy\n * @alpha\n */\nexport const isFluidHandlePayloadPending = (handle) => \"payloadState\" in handle &&\n (handle.payloadState === \"shared\" || handle.payloadState === \"pending\");\n/**\n * Check if the handle is an ILocalFluidHandle.\n * @legacy\n * @alpha\n */\nexport const isLocalFluidHandle = (handle) => isFluidHandlePayloadPending(handle) && \"payloadShareError\" in handle;\n/**\n * Encodes the given IFluidHandle into a JSON-serializable form,\n * @param handle - The IFluidHandle to serialize.\n * @returns The serialized handle.\n *\n * @internal\n */\nexport function encodeHandleForSerialization(handle) {\n return isFluidHandleInternalPayloadPending(handle)\n ? {\n type: \"__fluid_handle__\",\n url: handle.absolutePath,\n payloadPending: true,\n }\n : {\n type: \"__fluid_handle__\",\n url: handle.absolutePath,\n };\n}\n/**\n * Setting to opt into compatibility with handles from before {@link fluidHandleSymbol} existed (Fluid Framework client 2.0.0-rc.3.0.0 and earlier).\n *\n * Some code which uses this library might dynamically load multiple versions of it,\n * as well as old or duplicated versions of packages which produce or implement handles.\n * To correctly interoperate with this old packages and object produced by them, the old in-memory format for handles, without the symbol, are explicitly supported.\n *\n * This setting mostly exists as a way to easily find any code that only exists to provide this compatibility and clarify how to remove that compatibility.\n * At some point this might be removed or turned into an actual configuration option, but for now its really just documentation.\n */\nconst enableBackwardsCompatibility = true;\n/**\n * Check if a value is an {@link @fluidframework/core-interfaces#IFluidHandle}.\n * @remarks\n * Objects which have a field named `IFluidHandle` can in some cases produce a false positive.\n * @public\n */\nexport function isFluidHandle(value) {\n // `in` gives a type error on non-objects and null, so filter them out\n if (typeof value !== \"object\" || value === null) {\n return false;\n }\n if (fluidHandleSymbol in value) {\n return true;\n }\n // If enableBackwardsCompatibility, run check for FluidHandles predating use of fluidHandleSymbol.\n if (enableBackwardsCompatibility && IFluidHandle in value) {\n // Since this check can have false positives, make it a bit more robust by checking value[IFluidHandle][IFluidHandle]\n const inner = value[IFluidHandle];\n if (typeof inner !== \"object\" || inner === null) {\n return false;\n }\n return IFluidHandle in inner;\n }\n return false;\n}\n/**\n * Compare two {@link @fluidframework/core-interfaces#IFluidHandle|IFluidHandles}.\n * @remarks\n * Returns true iff both handles have the same internal `absolutePath`.\n * @public\n */\nexport function compareFluidHandles(a, b) {\n const aInternal = toFluidHandleInternal(a);\n const bInternal = toFluidHandleInternal(b);\n return aInternal.absolutePath === bInternal.absolutePath;\n}\n/**\n * Downcast an IFluidHandle to an IFluidHandleInternal.\n * @legacy\n * @alpha\n */\nexport function toFluidHandleInternal(handle) {\n if (!(fluidHandleSymbol in handle) || !(fluidHandleSymbol in handle[fluidHandleSymbol])) {\n if (enableBackwardsCompatibility && IFluidHandle in handle) {\n return handle[IFluidHandle];\n }\n throw new TypeError(\"Invalid IFluidHandle\");\n }\n // This casts the IFluidHandleErased from the symbol instead of `handle` to ensure that if someone\n // implements their own IFluidHandle in terms of an existing handle, it won't break anything.\n return handle[fluidHandleSymbol];\n}\n/**\n * Type erase IFluidHandleInternal for use with {@link @fluidframework/core-interfaces#fluidHandleSymbol}.\n * @legacy\n * @alpha\n */\nexport function toFluidHandleErased(handle) {\n return handle;\n}\n/**\n * Base class which can be uses to assist implementing IFluidHandleInternal.\n * @legacy\n * @alpha\n */\nexport class FluidHandleBase {\n /**\n * {@inheritDoc @fluidframework/core-interfaces#IProvideFluidHandle.IFluidHandle}\n */\n get IFluidHandle() {\n return this;\n }\n get [fluidHandleSymbol]() {\n return toFluidHandleErased(this);\n }\n}\n//# sourceMappingURL=handles.js.map","import { ActivityTracker } from '@fluidx/telemetry';\nimport { startDocumentHiddenTracker, getDocumentHiddenResult, unregisterDocumentHiddenTracker } from '@fluidx/utilities';\nimport { requestComponent } from './requestComponent';\nimport { ActivityLoadComponentFromContainer } from '../Telemetry';\nimport { racePromiseForResumeContainer } from './resumeContainerInternal';\nimport { createProviderProxy } from '../Utils/providerProxy';\nimport { toFluidHandleInternal } from '@fluidframework/runtime-utils/legacy';\n/**\n * Request component and render it if a div is provided.\n * @param container Container to use.\n * @param urlResolver Url resolver to use.\n * @param componentRequest Url of the component to be rendered.\n * @param logger Telemetry logger.\n * @param perfMetadata Additional properties for perf logging\n * @param documentEverHiddenTrackerID Used to track if the document was hidden at any point from the start of OWH\n * @param startContainerInPausedState Used to determine if container follows pause/resume logic\n * @param dependencySynthesizer A dependency synthesizer that allows the host to register providers for the container and components to access\n * @param requiredProviderTypes a list of required provider types that callers expect to get from the component\n */ export async function loadComponent(container, urlResolver, componentRequest, logger, perfMetadata, documentEverHiddenTrackerID, startContainerInPausedState, dependencySynthesizer, requiredProviderTypes) {\n const requestComponentActivityTracker = ActivityTracker.start(ActivityLoadComponentFromContainer, logger, {\n addUserTiming: true,\n isAPerformanceMetric: true\n });\n const requestComponentDocumentHiddenTracker = startDocumentHiddenTracker();\n function processRequestError(error) {\n unregisterDocumentHiddenTracker(requestComponentDocumentHiddenTracker);\n requestComponentActivityTracker.setResult(false, undefined /* additionalProps */ , error);\n }\n let component;\n try {\n component = await requestComponent(container, urlResolver, componentRequest, logger, startContainerInPausedState, dependencySynthesizer);\n } catch (error) {\n processRequestError(error);\n return Promise.reject(error);\n }\n const metadata = component.ComponentTelemetryMetadata;\n const componentType = metadata?.entityName;\n const componentUrl = component.IFluidLoadable?.handle === undefined ? undefined : toFluidHandleInternal(component.IFluidLoadable.handle).absolutePath;\n const requestComponentDocumentHidden = getDocumentHiddenResult(requestComponentDocumentHiddenTracker, true);\n const documentEverHidden = getDocumentHiddenResult(documentEverHiddenTrackerID);\n requestComponentActivityTracker.setResult(true, {\n ...perfMetadata,\n componentType,\n componentUrl,\n // TODO: Product Backlog Item 7512199: Remove '!' non-null-assertion usage from office-bohemia packages\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n documentEverHidden: documentEverHidden > -1,\n // TODO: Product Backlog Item 7512199: Remove '!' non-null-assertion usage from office-bohemia packages\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n documentHidden: requestComponentDocumentHidden > -1\n });\n if (startContainerInPausedState) {\n racePromiseForResumeContainer(container, undefined /* promise */ , 0);\n }\n if (requiredProviderTypes) {\n const providers = dependencySynthesizer?.synthesize({\n FluidDocumentServiceFactoryProvider: 'FluidDocumentServiceFactoryProvider'\n }, undefined);\n return createProviderProxy(component, container, requiredProviderTypes, providers?.FluidDocumentServiceFactoryProvider, componentRequest?.url, logger);\n }\n return component;\n}\n\n//# sourceMappingURL=loadComponent.js.map","/**\n * DO NOT MODIFY VALUES OF STRING CONSTANTS!\n * values are already used in code proposals in documents, and renaming will break loading of old documents\n */ export const OfficeFluidContainerPackageName = '@ms/office-fluid-container';\nexport const OneNoteMeetingPackageName = '@ms/onenote-meetings';\nexport const WhiteboardContainerPackageName = '@ms/whiteboard-container';\nexport const LoopPageContainerPackageName = '@fluidx/loop-page-container';\nexport const CopilotBoardContainerPackageName = '@fluidx/copilot-board-container';\n\n//# sourceMappingURL=Constants.js.map","import { getEnvironmentConfigFromRing } from '../deploymentManifest';\nimport { getCDNEndpoint, getSDP1CDNEndpoint } from '@fluidx/service-endpoints';\n/**\n * Gets the baseURL with ring path for the provided container environment. Defaults to production\n */ export function getCdnBaseUrl(environment) {\n const environmentConfig = getEnvironmentConfigFromRing(environment ?? 'Prod');\n return getCDNEndpoint(environmentConfig.audience);\n}\n/**\n * Gets the Phased 1CDN baseURL with ring path for the provided container environment. Defaults to production\n */ export function getSdpCdnBaseUrl(environment) {\n const environmentConfig = getEnvironmentConfigFromRing(environment ?? 'Prod');\n return getSDP1CDNEndpoint(environmentConfig.audience);\n}\n\n//# sourceMappingURL=getCdnBaseUrl.js.map","import { resolveLocale, downloadFileFromCdn } from '@fluidx/utilities';\nimport { createCodeDetailsProviderWithCache } from './createCodeDetailsProviderWithCache';\nimport { prefetchAssets } from '@fluidx/codeloader-utilities';\n/**\n * Preloads container resources to help improve performance of consumers of the office-fluid-container.\n */ export function preCacheOfficeContainerCode(windowContext, containerCodeLoadDetails, locale, logger) {\n const preloadManifest = containerCodeLoadDetails.preload.manifest;\n const assetsToPreFetch = [\n ...preloadManifest.assets\n ];\n if (preloadManifest.localizedAssets) {\n const resolvedLocale = resolveLocale(locale);\n const localizedAssets = preloadManifest.localizedAssets[resolvedLocale];\n // Exception added when eslint rule was added, this should be revisited when modifying this code\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n if (localizedAssets) {\n assetsToPreFetch.push(...localizedAssets);\n }\n }\n prefetchAssets(windowContext, assetsToPreFetch.map((asset)=>`${containerCodeLoadDetails.preload.jsBaseUrl}/${asset}`), logger);\n}\nexport async function getCodeLoadDetailsFromNetwork(codeDetailsUrl, logger) {\n const logProps = logger ? {\n logger,\n eventName: 'GetCodeLoadDetailsFromNetwork',\n doNotLogOnSuccess: true // Only log failures\n } : undefined;\n const response = await downloadFileFromCdn(codeDetailsUrl, logProps);\n if (response.result.ok) {\n return response.result.json();\n }\n throw new Error(`getCodeLoadDetailsFromNetwork: Failed to fetch: ${codeDetailsUrl}; StatusCode: ${response.result.status}`);\n}\nfunction isValidVersionNumber(version) {\n return !isNaN(version) && isFinite(version);\n}\nfunction parseUnsupportedVersions(unsupportedVersions) {\n try {\n return JSON.parse(unsupportedVersions);\n } catch (error) {\n return [];\n }\n}\nfunction isCurrentContainerVersionUnsupported(currentVersion, maxUnsupportedVersion, unsupportedVersions) {\n /* eslint-disable-next-line @typescript-eslint/no-explicit-any\n-- TODO: Using 'any' type defeats the purpose of TypeScript. Consider replacing it with a concrete type, or 'unknown'. */ const currentVersionAsNumber = parseFloat(currentVersion);\n if (!isValidVersionNumber(currentVersionAsNumber)) {\n return false;\n }\n /* eslint-disable-next-line @typescript-eslint/no-explicit-any\n-- TODO: Using 'any' type defeats the purpose of TypeScript. Consider replacing it with a concrete type, or 'unknown'. */ const maxUnsupportedVersionAsNumber = parseFloat(maxUnsupportedVersion);\n if (!isValidVersionNumber(maxUnsupportedVersionAsNumber)) {\n return false;\n }\n return currentVersionAsNumber <= maxUnsupportedVersionAsNumber || parseUnsupportedVersions(unsupportedVersions).includes(currentVersionAsNumber);\n}\nexport const getFFXCodeDetailsProvider = (windowContext, cacheName, codeLoadFetchLogic, logger, localeHint)=>createCodeDetailsProviderWithCache(windowContext, cacheName, {\n getLatestContainerCodeDetails: codeLoadFetchLogic,\n preCacheContainerCode: preCacheOfficeContainerCode,\n upgradeNeeded: async (containerEnvironment, currentVersion)=>{\n try {\n const containerDetails = await codeLoadFetchLogic(containerEnvironment);\n return isCurrentContainerVersionUnsupported(currentVersion, containerDetails.maxUnsupportedContainerScriptVersion, containerDetails.unsupportedContainerScriptVersions);\n } catch {\n return false;\n }\n }\n }, logger, localeHint);\n\n//# sourceMappingURL=FFXCodeDetailsHelpers.js.map","import { deleteContainerDetailsFromCache, getCodeDetailsFromNetworkAndUpdateCache, getCodeDetailsPackageFromCacheOrNetwork } from '@fluidx/codeloader-utilities';\n/**\n * Creates a code details provider that fetches code details from a slow source (like a network), storing the data in a cache for faster access.\n * Every time we get the container code, we favor the version in cache if it is isn't expired yet (see `maxCacheAgeMs`). Every call to getCodeDetails updates the value in the cache for that container.\n */ export function createCodeDetailsProviderWithCache(windowContext, packageName, codeDetailsProvider, logger, localeHint) {\n const { getLatestContainerCodeDetails, upgradeNeeded: baseUpgradeNeeded, preCacheContainerCode } = codeDetailsProvider;\n const curriedGetCodeDetailsFromNetworkAndUpdateCache = (containerEnvironment)=>getCodeDetailsFromNetworkAndUpdateCache(windowContext, packageName, containerEnvironment, getLatestContainerCodeDetails, preCacheContainerCode, (codeDetails)=>codeDetails.fluidCodeDetailsOverride.package, (codeDetails)=>// Attach max unsupported version to package if available.\n codeDetails.maxUnsupportedContainerScriptVersion, localeHint, logger);\n return {\n getCodeDetailsPackage: (containerEnvironment, allowedCodeOrigins)=>getCodeDetailsPackageFromCacheOrNetwork(packageName, containerEnvironment, allowedCodeOrigins, (containerEnvironment)=>// We don't need to block on the cache update promise here, we want to return the code details as soon as possible\n curriedGetCodeDetailsFromNetworkAndUpdateCache(containerEnvironment).codePackagePromise, (pkg)=>pkg.fluid.browser.umd.files, logger),\n upgradeNeeded: async (containerEnvironment, currentVersion)=>{\n // If there is no baseUpgradeNeeded function, we assume no upgrade is needed\n if (!baseUpgradeNeeded) {\n return false;\n }\n const shouldUpgrade = await baseUpgradeNeeded(containerEnvironment, currentVersion);\n if (shouldUpgrade) {\n // If we should upgrade, let's make sure that we clear out the current cached code details to make sure we get the latest on the next load.\n await deleteContainerDetailsFromCache(packageName, containerEnvironment, logger);\n // Let's opportunistically pre cache the latest code details to improve performance for the expected forced reload, but don't wait on the result\n curriedGetCodeDetailsFromNetworkAndUpdateCache(containerEnvironment);\n }\n return shouldUpgrade;\n },\n preCacheLatestContainerCode: async (containerEnvironment)=>await curriedGetCodeDetailsFromNetworkAndUpdateCache(containerEnvironment).cacheUpdatePromise\n };\n}\n\n//# sourceMappingURL=createCodeDetailsProviderWithCache.js.map","/**\n * List of endpoints for 1CDN for whiteboard\n */ export const WhiteboardCDNEndpoints = {\n Automation: 'https://whiteboard.office.com',\n Development: 'https://dev.whiteboard.microsoft.com',\n Dogfood: 'https://whiteboard.office.com',\n DoD: 'https://whiteboard.apps.mil',\n GCC: 'https://whiteboard.office.com',\n 'GCC-High': 'https://whiteboard.office365.us',\n Local: 'https://whiteboard.office.com',\n Microsoft: 'https://whiteboard.office.com',\n Preview: 'https://whiteboard.office.com',\n Production: 'https://whiteboard.office.com',\n Staging: 'https://app.int.whiteboard.microsoft.com',\n SyntheticTraffic: 'https://whiteboard.office.com',\n USNat: 'https://whiteboard.eaglex.ic.gov',\n USSec: 'https://whiteboard.microsoft.scloud',\n // TODO: (ADO 9580892) - Update service-endpoints URLs for Gallatin audience\n Gallatin: '',\n Bleu: '',\n Delos: ''\n};\n\n//# sourceMappingURL=WhiteboardCDNEndpoints.js.map","import { CopilotBoardContainerPackageName, LoopPageContainerPackageName, OfficeFluidContainerPackageName, WhiteboardContainerPackageName } from './Constants';\nimport { getCdnBaseUrl, getEnvironmentConfigFromRing, getSdpCdnBaseUrl } from '@fluidx/utilities';\nimport { getCodeLoadDetailsFromNetwork, getFFXCodeDetailsProvider } from './FFXCodeDetailsHelpers';\nimport { getWhiteboardCDNEndpoint } from '@fluidx/service-endpoints';\nexport async function getOfficeContainerCodeLoadDetailsFromNetwork(containerEnvironment, logger, sdpEnabled) {\n const url = sdpEnabled ? `${getSdpCdnBaseUrl(containerEnvironment)}/container/versionless/_1cdn_bucketedcontent/officeContainerCodeLoadDetails.json` : `${getCdnBaseUrl(containerEnvironment)}/container/versionless/officeContainerCodeLoadDetails.json`;\n return getCodeLoadDetailsFromNetwork(url, logger);\n}\nexport const getOfficeContainerCodeDetailsProvider = (windowContext, logger, localeHint, sdpEnabled)=>getFFXCodeDetailsProvider(windowContext, OfficeFluidContainerPackageName, (containerEnvironment)=>getOfficeContainerCodeLoadDetailsFromNetwork(containerEnvironment, logger, sdpEnabled), logger, localeHint);\nexport async function getLoopPageContainerCodeLoadDetailsFromNetwork(containerEnvironment, logger) {\n const url = `${getCdnBaseUrl(containerEnvironment)}/loop-page-container/versionless/loopPageContainerCodeLoadDetails.json`;\n return getCodeLoadDetailsFromNetwork(url, logger);\n}\nexport async function getCopilotBoardContainerCodeLoadDetailsFromNetwork(containerEnvironment, logger) {\n const url = `${getCdnBaseUrl(containerEnvironment)}/copilot-board-container/versionless/copilotBoardContainerCodeLoadDetails.json`;\n return getCodeLoadDetailsFromNetwork(url, logger);\n}\nexport const getLoopPageContainerCodeDetailsProvider = (windowContext, logger, localeHint)=>getFFXCodeDetailsProvider(windowContext, LoopPageContainerPackageName, (containerEnvironment)=>getLoopPageContainerCodeLoadDetailsFromNetwork(containerEnvironment, logger), logger, localeHint);\nexport const getCopilotBoardContainerCodeDetailsProvider = (windowContext, logger, localeHint)=>getFFXCodeDetailsProvider(windowContext, CopilotBoardContainerPackageName, (containerEnvironment)=>getCopilotBoardContainerCodeLoadDetailsFromNetwork(containerEnvironment, logger), logger, localeHint);\nexport const getWhiteboardContainerCodeDetailsProvider = (_windowContext, _logger, _localeHint)=>{\n return {\n getCodeDetailsPackage: (containerEnvironment)=>{\n const cdnOrigin = getCdnOrigin(containerEnvironment);\n const versionedFluidBrowserPackage = {\n name: WhiteboardContainerPackageName,\n version: '0.0.1',\n fluid: {\n browser: {\n umd: {\n files: [\n `${cdnOrigin}/root/index.fluid.js`\n ],\n library: 'microsoftWhiteboard'\n }\n }\n }\n };\n return Promise.resolve(versionedFluidBrowserPackage);\n }\n };\n};\nexport const getCdnOrigin = (containerEnvironment)=>{\n const environmentConfig = getEnvironmentConfigFromRing(containerEnvironment ?? 'Prod');\n return getWhiteboardCDNEndpoint(environmentConfig.audience);\n};\n\n//# sourceMappingURL=FFXCodeDetailsProviders.js.map","import { WhiteboardCDNEndpoints } from './WhiteboardCDNEndpoints';\n/**\n * This api returns 1cdn endpoint for Whiteboard to be used for calls to Whiteboard 1cdn\n * @param audience The audience of the user\n * @returns the 1cdn endpoint for Whiteboard\n */ export function getWhiteboardCDNEndpoint(audience) {\n return WhiteboardCDNEndpoints[audience];\n}\n\n//# sourceMappingURL=getWhiteboardCDNEndpoint.js.map","/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\nimport { isFluidPackage } from \"./fluidPackage.js\";\n/**\n * Determines if any object is an IFluidBrowserPackage\n * @param maybePkg - The object to check for compatibility with IFluidBrowserPackage\n * @legacy\n * @alpha\n */\nexport const isFluidBrowserPackage = (maybePkg) => isFluidPackage(maybePkg) &&\n typeof maybePkg?.fluid?.browser?.umd?.library === \"string\" &&\n Array.isArray(maybePkg?.fluid?.browser?.umd?.files);\n//# sourceMappingURL=browserPackage.js.map","import { LoopPageContainerPackageName, CopilotBoardContainerPackageName, OfficeFluidContainerPackageName, OneNoteMeetingPackageName, WhiteboardContainerPackageName } from './Constants';\n/**\n * Method that returns a Container Type based on the packageName passed\n */ export const getContainerTypeForLogging = (packageName)=>{\n switch(packageName){\n case OneNoteMeetingPackageName:\n case OfficeFluidContainerPackageName:\n case '@msstream/experiences-fluid-embed':\n case '@office-start/space-container':\n case WhiteboardContainerPackageName:\n case LoopPageContainerPackageName:\n case CopilotBoardContainerPackageName:\n return packageName;\n default:\n return '(redacted)';\n }\n};\n\n//# sourceMappingURL=getContainerTypeForLogging.js.map","export const GenericEventCodeLoaderAllowListOverwritten = 'CodeLoaderAllowListOverwritten';\nexport const GenericEventFluidCodeDetails = 'FluidCodeDetails';\nexport const GenericEventCodeLoaderFallbackToCDN = 'CodeLoaderFallbackToCDN';\nexport const ErrorEventNpmCodeLoaderFailed = 'NpmCodeLoaderOverrideFailed';\nexport const GenericEventSubCategoryFluidCodeDetails = 'FluidCodeDetails';\nexport const GenericEventSubCategoryLocalStorageOverride = 'LocalStorageOverride';\nexport const CodeDeliveryType = {\n Bundled: 'NPM',\n CDN: 'CDN'\n};\n\n//# sourceMappingURL=telemetry.js.map","/**\n * Following method adds logic to retry loading failed scripts upto 3 times\n * @param windowToLoadScriptInto - the window object to use for style sheet injection\n * @param resourceUrl The url from where to load the script\n */ export const loadStylesheetWithRetries = (windowToLoadScriptInto, resourceUrl)=>{\n let retriesLeft = 3;\n return function retryStyleLoad() {\n return loadStylesheet(windowToLoadScriptInto, resourceUrl).catch(()=>{\n // If we exhaust the number of retries, return the original script load method so the script load promise can be rejected and logged by the appropriate handler\n retriesLeft = retriesLeft - 1;\n if (retriesLeft === 0) {\n return loadStylesheet(windowToLoadScriptInto, resourceUrl);\n }\n return retryStyleLoad();\n });\n }();\n};\nfunction loadStylesheet(windowToUse, url) {\n return new Promise((resolve, reject)=>{\n const documentToAppendScriptTo = windowToUse.document;\n const linkTag = documentToAppendScriptTo.createElement('link');\n linkTag.rel = 'stylesheet';\n linkTag.type = 'text/css';\n linkTag.href = url;\n linkTag.onload = ()=>{\n resolve();\n };\n linkTag.onerror = ()=>reject(new Error(`Failed to download the style sheet at url: ${url}, isUserDefinitelyOffline: ${!windowToUse.navigator.onLine}`));\n documentToAppendScriptTo.head.appendChild(linkTag);\n return linkTag;\n });\n}\n\n//# sourceMappingURL=loadStyleSheetWithRetries.js.map","import { isFluidBrowserPackage } from '@fluidframework/container-definitions/legacy';\nimport { sendErrorEvent, sendTelemetryEvent, ActivityTracker } from '@fluidx/telemetry';\nimport { loadScriptWithRetries } from '@fluidx/loop-sdk';\nimport { getContainerTypeForLogging } from './getContainerTypeForLogging';\nimport { areAllCodeFromAllowedSource, areAllCodeUrlsAllowed, prefetchAssets } from '@fluidx/codeloader-utilities';\nimport { CodeDeliveryType, ErrorEventNpmCodeLoaderFailed, GenericEventCodeLoaderFallbackToCDN, GenericEventFluidCodeDetails, GenericEventSubCategoryFluidCodeDetails } from './telemetry';\nimport { loadStylesheetWithRetries } from './loadStyleSheetWithRetries';\nfunction assertVersionedFluidBrowserPackage(fluidPackage) {\n if (!isFluidBrowserPackage(fluidPackage) || fluidPackage.version === undefined) {\n throw new Error('Codeloader does not know how to load from this source');\n }\n}\n// API that should only be used to reset state between tests\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function DO_NOT_USE_clearFluidModuleCache() {\n perWindowFluidModuleCache = new WeakMap();\n}\n// The container types we support today only support having one code version loaded per JavaScript context.\n// This means that we need to make sure that any request for a given container package name always returns the same code\n// There is also the need to make sure that the summarizer gets the exact same version of the code as the interactive client.\nlet perWindowFluidModuleCache = new WeakMap();\nexport const getPackageNameFromCodeDetails = (fluidCodeDetails)=>{\n if (typeof fluidCodeDetails.package === 'string') {\n return fluidCodeDetails.package;\n }\n return fluidCodeDetails.package.name;\n};\nconst initialPkgVersion = '0.0.1';\nconst isValidVersionNumber = (version)=>!Number.isNaN(version) && Number.isFinite(version);\nconst isNumericVersionedPackage = (pkg)=>{\n if (!isFluidBrowserPackage(pkg)) {\n return false;\n }\n // This is back-compat case with original initial version.\n if (pkg.version === initialPkgVersion) {\n return true;\n }\n return isValidVersionNumber(Number(pkg.version));\n};\nconst tryGetNameVersionFromCodeDetails = (codeDetails)=>typeof codeDetails.package !== 'string' && isNumericVersionedPackage(codeDetails.package) ? {\n name: codeDetails.package.name,\n version: codeDetails.package.version === initialPkgVersion ? initialPkgVersion : Number(codeDetails.package.version)\n } : undefined;\nconst tryGetMaxUnsupportedVersion = (pkg)=>{\n const maxUnsupportedVersion = Number(pkg.maxUnsupportedVersion);\n return isValidVersionNumber(maxUnsupportedVersion) ? maxUnsupportedVersion : undefined;\n};\n/**\n * By default, an IRuntimeFactory is non-configurable and only exposes an instantiateRuntime method. However, the\n * OfficeContainer actually supports multiple scenarios - to access them, it needs to be configured at time of initial\n * instantiation. To support this, SimpleCodeLoader knows how to inspect the code details to find a requested config,\n * and how to inspect the loaded module to discover if it can apply the requested configuration.\n * ConfiguredRuntimeFactoryWrapper then wraps the IRuntimeFactory, such that the requested configuration is applied\n * immediately prior to instantiating the runtime.\n */ class ConfiguredRuntimeFactoryWrapper {\n get IRuntimeFactory() {\n return this;\n }\n constructor(wrappedFactory, config){\n this.wrappedFactory = wrappedFactory;\n this.config = config;\n }\n instantiateRuntime(context, existing) {\n this.wrappedFactory.configure(this.config);\n return this.wrappedFactory.instantiateRuntime(context, existing);\n }\n}\n/*\n * A code loader that fetches container code from a CDN based either on the code details in the code proposal or some external means.\n */ export class SimpleCodeLoader {\n get IFluidCodeDetailsComparer() {\n return this;\n }\n /** Returns undefined if it is not valid */ // eslint-disable-next-line @fluidx/ffx-rules/prefer-private-fields -- TODO: Exception added when rule was enabled. Please consider refactoring this to use ECMAScript # prefixed private properties for better minification\n tryFormActualCodeDetailsMapKey(codeDetails) {\n const nameVersion = tryGetNameVersionFromCodeDetails(codeDetails);\n if (nameVersion === undefined) {\n return undefined;\n }\n // Assuming pipe (|) should be invalid number character, then no key collisions\n return `${nameVersion.version}|${nameVersion.name}`;\n }\n getActualCodeDetails(codeDetails) {\n const mapKey = this.tryFormActualCodeDetailsMapKey(codeDetails);\n return mapKey === undefined ? undefined : this.actualCodeDetailsMap.get(mapKey);\n }\n constructor(config){\n this.config = config;\n // Keys are the concatenation of version numbers and names of original code details package\n // eslint-disable-next-line @fluidx/ffx-rules/prefer-private-fields -- TODO: Exception added when rule was enabled. Please consider refactoring this to use ECMAScript # prefixed private properties for better minification\n this.actualCodeDetailsMap = new Map();\n this.logger = config.logger;\n }\n async load(source) {\n const packageName = getPackageNameFromCodeDetails(source);\n const config = source.config;\n const tracker = ActivityTracker.start('SimpleCodeLoaderLoad', this.logger, {\n addUserTiming: true\n });\n try {\n const { windowContext, getBundledPackageFactoryOverride, disableCdnCodeLoadingFallback } = this.config;\n let perWindowCache = disableCdnCodeLoadingFallback ? undefined : perWindowFluidModuleCache.get(windowContext);\n const cachedModulePromise = perWindowCache?.get(packageName);\n if (cachedModulePromise !== undefined) {\n const cachedModule = await cachedModulePromise;\n // The cached module is not configured in any way (such that the same cached module may be shared across multiple\n // different configurations). We inspect whether it can take a configuration, and wrap it if so.\n const maybeConfigurableFactory = cachedModule.fluidExport.ConfigurableRuntimeFactory;\n const result = maybeConfigurableFactory !== undefined ? {\n module: {\n fluidExport: new ConfiguredRuntimeFactoryWrapper(maybeConfigurableFactory, config)\n },\n details: source\n } : {\n module: cachedModule,\n details: source\n };\n tracker.setResult(true, {\n source: 'InMemoryCache'\n });\n return result;\n }\n let fluidModulePromise = getBundledPackageFactoryOverride?.(packageName);\n const moduleSource = fluidModulePromise ? 'Bundled' : 'CDN';\n if (fluidModulePromise) {\n // If the fluid module promise isn't set by override, this event will be logged in `loadInternal` when loading from CDN.\n fluidModulePromise.then((fluidModule)=>{\n const fluidExport = fluidModule.fluidExport;\n const codeVersion = fluidExport.CodeVersionDetailsProvider?.codeVersionDetails?.version;\n logGenericFluidCodeDetailsEvent(this.logger, {\n packageName,\n deliveryType: CodeDeliveryType.Bundled,\n // Currently code version is based on our own CI/CD versioning, which is not applicable to all hosts that Bundle the container\n // in their own apps.\n codeVersion\n });\n }).catch(()=>{\n // TODO: We're in an odd state here, the fluid module promise is from a bundled override (container code is bundled with the host app), so...\n // we probably should design what to do here. If CDN Fallback is allowed, should we retry loading from CDN?\n // There is an error case below that removes the cached promise, but that does not remove the bad override from the host.\n this.logger && sendErrorEvent(this.logger, {\n eventName: ErrorEventNpmCodeLoaderFailed,\n packageName: getContainerTypeForLogging(packageName)\n });\n });\n } else {\n if (disableCdnCodeLoadingFallback) {\n throw new Error(`CDN code loading fallback set to false but no factory provided by host for container named ${getContainerTypeForLogging(packageName)}`);\n }\n this.logger && sendTelemetryEvent(this.logger, {\n eventName: GenericEventCodeLoaderFallbackToCDN,\n containerType: getContainerTypeForLogging(packageName)\n });\n fluidModulePromise = this.loadInternal(source, this.logger);\n }\n if (!disableCdnCodeLoadingFallback) {\n // Cache the module as-is for use across multiple configurations.\n if (!perWindowCache) {\n perWindowCache = new Map();\n perWindowFluidModuleCache.set(windowContext, perWindowCache);\n // If the window context is different than the current window (i.e., it's the window context\n // of an iframe that will be shorter-lived than the current context),\n // remove the cache entry of that window when it's unloaded.\n // The \"if\" check ensures that we don't add an event listeners that will never be removed:\n // eslint-disable-next-line no-restricted-globals -- checking for the actual global \"window\" object is intended here\n if (windowContext !== window) {\n // Use pagehide (with event.persisted=false) to determine when the page is being unloaded/discarded.\n windowContext.addEventListener('pagehide', (event)=>{\n if (!event.persisted) {\n perWindowFluidModuleCache.delete(windowContext);\n }\n });\n }\n }\n perWindowCache.set(packageName, fluidModulePromise);\n // In the event we fail to load the Fluid module, we delete the promise from the cache so that future attempts to load will retry\n fluidModulePromise.catch(()=>perWindowCache?.delete(packageName));\n }\n const fluidModule = await fluidModulePromise;\n const fluidExportProvider = fluidModule.fluidExport;\n // Wrap the factory if it can take a configuration.\n const maybeConfigurableFactory = fluidExportProvider.ConfigurableRuntimeFactory;\n const result = maybeConfigurableFactory !== undefined ? {\n module: {\n fluidExport: new ConfiguredRuntimeFactoryWrapper(maybeConfigurableFactory, config)\n },\n details: source\n } : {\n module: fluidModule,\n details: source\n };\n tracker.setResult(true, {\n source: moduleSource\n });\n return result;\n } catch (error) {\n tracker.setResult(false, undefined, error);\n throw error;\n }\n }\n // eslint-disable-next-line @fluidx/ffx-rules/prefer-private-fields -- TODO: Exception added when rule was enabled. Please consider refactoring this to use ECMAScript # prefixed private properties for better minification\n async loadInternal(source, logger) {\n const { windowContext, trustedTypesPolicy, getFluidCodeVersionDetails } = this.config;\n let allowedCodeOrigins;\n if ('allowedCodeOrigins' in this.config) {\n allowedCodeOrigins = this.config.allowedCodeOrigins;\n } else {\n allowedCodeOrigins = this.config.allowedCodeSources.flatMap((source)=>source.origin);\n }\n const fluidPackageToUse = await this.getEffectiveFluidCodeDetailsPackage(source);\n const requestedPackageName = getPackageNameFromCodeDetails(source);\n // Add a log that tells what the current type and version is of the experience being loaded\n logGenericFluidCodeDetailsEvent(logger, {\n // Package name should match the code details we loaded\n packageName: requestedPackageName,\n deliveryType: CodeDeliveryType.CDN,\n codeVersion: fluidPackageToUse.version\n });\n // Exception added when eslint rule was added, this should be revisited when modifying this code\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n if (fluidPackageToUse === undefined) {\n throw new Error(`Failed to get Fluid Package. Trying to load ContainerType: ${getContainerTypeForLogging(source.package.name)}`);\n }\n const containerSource = fluidPackageToUse.fluid.browser.umd;\n if (!this.shouldLoad(containerSource.files)) {\n throw new Error('Unsupported container files, check that CDN is on allow list');\n }\n const mapKey = this.tryFormActualCodeDetailsMapKey(source);\n if (mapKey !== undefined && typeof source.package !== 'string') {\n const actualCodeDetails = {\n ...source,\n package: {\n ...source.package,\n ...fluidPackageToUse\n }\n };\n this.actualCodeDetailsMap.set(mapKey, actualCodeDetails);\n }\n const trustedTypesOptions = trustedTypesPolicy && {\n trustedTypesPolicy: await trustedTypesPolicy,\n allowedOrigins: allowedCodeOrigins\n };\n await Promise.all(containerSource.files.map((file)=>{\n const lowerCaseName = file.toLowerCase();\n if (lowerCaseName.endsWith('.js')) {\n return loadScriptWithRetries(windowContext, file, trustedTypesOptions, /*scriptFetchPriority*/ 'high');\n } else if (lowerCaseName.endsWith('.css')) {\n return loadStylesheetWithRetries(windowContext, file);\n }\n throw new Error(`Codeloader does not know how to load: ${file}`);\n }));\n /* eslint-disable-next-line @typescript-eslint/no-explicit-any\n-- TODO: Using 'any' type defeats the purpose of TypeScript. Consider replacing it with a concrete type, or 'unknown'. */ const containerFactory = windowContext[containerSource.library];\n if (containerFactory === undefined) {\n throw new Error(`Entry point of loaded package not a Fluid module. Trying to load ContainerType: ${getContainerTypeForLogging(source.package.name)}`);\n }\n // Some containers expect to have code version details injected into them by the code loader, if that's the case we do that here\n const { CodeVersionDetailsProvider } = containerFactory.fluidExport;\n if (CodeVersionDetailsProvider) {\n const codeVersionDetails = getFluidCodeVersionDetails?.(fluidPackageToUse);\n if (codeVersionDetails) {\n CodeVersionDetailsProvider.setCodeVersionDetails(codeVersionDetails);\n }\n }\n return containerFactory;\n }\n /**\n * Preloads script files for a given container to have them available in the browser cache for faster loads later\n */ async preCache(packageName) {\n const { getFluidCodeDetailsPackageOverride, windowContext } = this.config;\n // TODO: Figure out precache story when loading host bundled container\n if (getFluidCodeDetailsPackageOverride) {\n const packageDetails = await getFluidCodeDetailsPackageOverride(packageName);\n if (packageDetails) {\n const containerSource = packageDetails.fluid.browser.umd;\n if (!this.shouldLoad(containerSource.files)) {\n throw new Error('Unsupported container files, check that CDN is on allow list');\n }\n prefetchAssets(windowContext, containerSource.files, this.logger);\n }\n }\n }\n /**\n * Gets the actual package information that should be used by this code loader after all overrides have been applies\n */ // eslint-disable-next-line @fluidx/ffx-rules/prefer-private-fields -- TODO: Exception added when rule was enabled. Please consider refactoring this to use ECMAScript # prefixed private properties for better minification\n async getEffectiveFluidCodeDetailsPackage(fluidCodeDetails) {\n const packageName = typeof fluidCodeDetails.package === 'string' ? fluidCodeDetails.package : fluidCodeDetails.package.name;\n const packageOverride = await this.config.getFluidCodeDetailsPackageOverride?.(packageName);\n const fluidPackageToUse = packageOverride || fluidCodeDetails.package;\n // If we don't have the full code details, the codeloader does not have information on how to load from the package\n if (typeof fluidPackageToUse === 'string') {\n throw new Error('Codeloader does not know how to load from this source');\n }\n assertVersionedFluidBrowserPackage(fluidPackageToUse);\n return fluidPackageToUse;\n }\n // eslint-disable-next-line @fluidx/ffx-rules/prefer-private-fields -- TODO: Exception added when rule was enabled. Please consider refactoring this to use ECMAScript # prefixed private properties for better minification\n shouldLoad(containerSourceFiles) {\n if ('allowedCodeOrigins' in this.config) {\n return areAllCodeUrlsAllowed(containerSourceFiles, this.config.allowedCodeOrigins);\n } else {\n return areAllCodeFromAllowedSource(containerSourceFiles, this.config.allowedCodeSources);\n }\n }\n async satisfies(candidate, constraint) {\n // Fetch actual code details, because the candidate version is the previous code details\n // in the quorum rather than the actual loaded version. This gets us stuck until we start\n // passing the actual loaded version.\n const actualCandidate = this.getActualCodeDetails(candidate);\n if (actualCandidate === undefined) {\n // Always return true if actual candidate isn't found to be safe.\n return true;\n }\n if (typeof constraint.package === 'string' || typeof actualCandidate.package === 'string') {\n // We are treating unknown as satisfies for now.\n return true;\n }\n const maxUnsupportedVersion = tryGetMaxUnsupportedVersion(constraint.package);\n if (maxUnsupportedVersion !== undefined) {\n const candidateVersion = tryGetNameVersionFromCodeDetails(actualCandidate)?.version;\n if (candidateVersion !== undefined) {\n // Note that we are only checking one direction. The constraint package will be the one\n // just accepted into the quorum, and the candidate will be the one that is already loaded.\n return candidateVersion === initialPkgVersion || candidateVersion > maxUnsupportedVersion;\n }\n }\n // Should we be correlating the package names as well? If not, we support renames\n // for free, but get no protection against invalid package names.\n // We are considering everything else as satisfactory by default.\n return true;\n }\n async compare(a, b) {\n // By returning undefined, it is basically saying we don't want to\n // answer the question of what the order is- so that would bypass that loader check.\n const aNameVersion = tryGetNameVersionFromCodeDetails(a);\n if (aNameVersion === undefined) {\n return undefined;\n }\n const bNameVersion = tryGetNameVersionFromCodeDetails(b);\n if (bNameVersion === undefined) {\n return undefined;\n }\n // Different package names cannot be compared.\n if (aNameVersion.name !== bNameVersion.name) {\n return undefined;\n }\n if (aNameVersion.version === bNameVersion.version) {\n return 0;\n }\n // Always treat initialPkgVersion as older.\n if (aNameVersion.version === initialPkgVersion) {\n return -1;\n }\n if (bNameVersion.version === initialPkgVersion) {\n return 1;\n }\n // The core loader in Fluid Framework will not propose code that is\n // is older than the current code based on this comparison.\n // For now we are relying on finite increasing numeric versions.\n return aNameVersion.version - bNameVersion.version;\n }\n}\n/**\n * Logs the Fluid Code Details event.\n * This event can be logged in different places depending on how the code is bundled in the application.\n * For most hosts, they will have the code delivered from CDN, but some hosts want to Bundle the code directly.\n */ function logGenericFluidCodeDetailsEvent(logger, { packageName, deliveryType, codeVersion }) {\n if (!logger) {\n return;\n }\n const eventData = {\n eventName: GenericEventFluidCodeDetails,\n subCategory: GenericEventSubCategoryFluidCodeDetails,\n containerType: getContainerTypeForLogging(packageName),\n deliveryType\n };\n if (codeVersion) {\n eventData['codeVersion'] = codeVersion;\n }\n sendTelemetryEvent(logger, eventData);\n}\n\n//# sourceMappingURL=SimpleCodeLoader.js.map","import { NamespaceLoggerAdapter, sendTelemetryEvent } from '@fluidx/telemetry';\nimport { safeLocalStorage, getEnvironmentSpecificAllowedCodeSource } from '@fluidx/utilities';\nimport { getCopilotBoardContainerCodeDetailsProvider, getLoopPageContainerCodeDetailsProvider, getOfficeContainerCodeDetailsProvider, getWhiteboardContainerCodeDetailsProvider } from './FFXCodeDetailsProviders';\nimport { CopilotBoardContainerPackageName, LoopPageContainerPackageName, OfficeFluidContainerPackageName, OneNoteMeetingPackageName, WhiteboardContainerPackageName } from './Constants';\nimport { SimpleCodeLoader } from './SimpleCodeLoader';\nimport { GenericEventCodeLoaderAllowListOverwritten, GenericEventSubCategoryLocalStorageOverride } from './telemetry';\nfunction getAllowListOverride(logger) {\n const allowListOverride = safeLocalStorage()?.AllowListOverride;\n if (allowListOverride) {\n // Log a generic event to correlate QoS telemetry with dev-flow scenarios\n // Task 4544147: Consider adding a helper method for the same\n logger && sendTelemetryEvent(logger, {\n eventName: GenericEventCodeLoaderAllowListOverwritten,\n subCategory: GenericEventSubCategoryLocalStorageOverride\n });\n return JSON.parse(allowListOverride);\n }\n return [];\n}\nexport class BohemiaCodeLoader {\n get IFluidCodeDetailsComparer() {\n return this.simpleCodeLoader;\n }\n getActualCodeDetails(codeDetails) {\n return this.simpleCodeLoader.getActualCodeDetails(codeDetails);\n }\n constructor(config){\n this.config = config;\n const additionalCodeOrigins = config.additionalAllowedCodeOrigins ?? [];\n const { windowContext, logger: configLogger, localeHint, sdpEnabled } = this.config;\n const logger = configLogger?.NamespaceLogger ? new NamespaceLoggerAdapter('OfficeWebHost', configLogger.NamespaceLogger) : configLogger;\n this.settingsProvider = config.settingsProvider;\n const officeContainerCodeDetailsProvider = getOfficeContainerCodeDetailsProvider(windowContext, logger, localeHint, sdpEnabled);\n const loopPageContainerCodeDetailsProvider = getLoopPageContainerCodeDetailsProvider(windowContext, logger, localeHint);\n const copilotBoardsContainerCodeDetailsProvider = getCopilotBoardContainerCodeDetailsProvider(windowContext, logger, localeHint);\n const whiteboardContainerCodeDetailsProvider = getWhiteboardContainerCodeDetailsProvider(windowContext, logger, localeHint);\n this.containerCodeDetailsProviderMap = new Map([\n [\n OfficeFluidContainerPackageName,\n officeContainerCodeDetailsProvider\n ],\n [\n OneNoteMeetingPackageName,\n officeContainerCodeDetailsProvider\n ],\n [\n LoopPageContainerPackageName,\n loopPageContainerCodeDetailsProvider\n ],\n [\n CopilotBoardContainerPackageName,\n copilotBoardsContainerCodeDetailsProvider\n ],\n [\n WhiteboardContainerPackageName,\n whiteboardContainerCodeDetailsProvider\n ]\n ]);\n config.additionalCodeDetailsProviders?.forEach(([packageName, codeProvider])=>this.containerCodeDetailsProviderMap.set(packageName, codeProvider));\n const allowedCodeOrigins = [\n ...getAllowListOverride(logger),\n ...additionalCodeOrigins\n ];\n const allowedCodeSources = [\n ...getEnvironmentSpecificAllowedCodeSource(this.config.containerEnvironment, this.settingsProvider),\n {\n origin: allowedCodeOrigins,\n paths: undefined\n }\n ];\n const simpleCodeLoaderBaseConfig = {\n windowContext: config.windowContext,\n trustedTypesPolicy: config.trustedTypesPolicy,\n logger,\n getBundledPackageFactoryOverride: (packageName)=>{\n const containerFactory = config.locallyBundledPackageFactories?.get(packageName);\n return containerFactory ? Promise.resolve(containerFactory) : undefined;\n },\n disableCdnCodeLoadingFallback: config.disableCdnCodeLoadingFallback,\n getFluidCodeDetailsPackageOverride: async (packageName)=>{\n // Check if any containerCodeDetailProviders have been specified for the given package\n const codeDetailsProvider = this.containerCodeDetailsProviderMap.get(packageName);\n if (codeDetailsProvider) {\n return codeDetailsProvider.getCodeDetailsPackage(config.containerEnvironment, allowedCodeSources);\n }\n return undefined;\n },\n getFluidCodeVersionDetails: (fluidPackage)=>{\n const { containerEnvironment } = config;\n const version = fluidPackage.version;\n const upgradeNeeded = this.containerCodeDetailsProviderMap.get(fluidPackage.name)?.upgradeNeeded;\n return {\n version,\n // CodeVersionDetails.containerEnvironment` is a string, which in the past was filled in from\n // a string-based union `ContainerEnvironment` that included a `Local` value. Since `DeploymentRing`\n // has no `Local` concept, we preserve the original behavior by making sure that\n // if `config.containerEnvironment` is undefined, we still use the string \"Local\",\n // which is reasonably-correct semantically (the container must either be loaded with local\n // dev bits, or be bundled locally by the host).\n containerEnvironment: containerEnvironment || 'Local',\n // If no upgradeNeeded function is provided, provide a function that always returns false\n needUpgrade: upgradeNeeded ? ()=>upgradeNeeded(containerEnvironment, version) : async ()=>false\n };\n }\n };\n this.simpleCodeLoader = new SimpleCodeLoader({\n ...simpleCodeLoaderBaseConfig,\n allowedCodeSources\n });\n }\n async preCache(packageName) {\n // preCache only works for CDN loading of containers, so running it for packages that are locally bundled is wasteful.\n // Exiting early so we don't precache the CDN version of the code since that code is not going to be used.\n // In the long term, we'd like to see support for hosts to specify prefetch logic for the locally bundled package factories.\n if (this.config.locallyBundledPackageFactories?.has(packageName)) {\n return;\n }\n const containerCodeDetailsProvider = this.containerCodeDetailsProviderMap.get(packageName);\n if (containerCodeDetailsProvider?.preCacheLatestContainerCode) {\n return containerCodeDetailsProvider.preCacheLatestContainerCode(this.config.containerEnvironment);\n }\n return this.simpleCodeLoader.preCache(packageName);\n }\n async load(source) {\n return this.simpleCodeLoader.load(source);\n }\n}\n\n//# sourceMappingURL=BohemiaCodeLoader.js.map","import { BohemiaCodeLoader } from '.';\n/**\n * An injectable form of the {@link BohemiaCodeLoader} to register in a LoopDependencyContainer.\n *\n * @example Registering the BohemiaCodeLoaderFactory\n * ```ts\n * const synthesizer = new LoopDependencyContainer();\n * synthesizer.register('FluidCodeLoaderFactory', new BohemiaCodeLoaderFactory({\n * containerEnvironment: 'Prod',\n * localeHint: 'en-us'\n * });\n * ```\n */ export class BohemiaCodeLoaderFactory {\n /**\n * Creates a new instance of {@link BohemiaCodeLoaderFactory}\n * @param bohemiaConfig The configuration for the {@link BohemiaCodeLoader} that will be created\n */ constructor(bohemiaConfig){\n this.bohemiaConfig = bohemiaConfig;\n /**\n * Instantiates a new instance of the {@link BohemiaCodeLoader}\n * @param config The configuration to use for code loading, contains window context and a dependency synthesizer.\n * @returns A new instance of {@link BohemiaCodeLoader}\n */ this.instantiateFluidCodeLoader = async (config)=>{\n const symbols = {\n LoopTrustedTypesPolicy: 'LoopTrustedTypesPolicy',\n NamespaceLogger: 'NamespaceLogger',\n SettingsProvider: 'SettingsProvider'\n };\n const providers = config.dependencySynthesizer.synthesize(symbols, undefined);\n const [trustedTypesPolicy, settingsProvider, logger] = await Promise.all([\n providers.LoopTrustedTypesPolicy,\n providers.SettingsProvider,\n providers.NamespaceLogger\n ]);\n const codeLoader = new BohemiaCodeLoader({\n ...this.bohemiaConfig,\n windowContext: config.windowContext,\n trustedTypesPolicy,\n settingsProvider,\n logger\n });\n return codeLoader;\n };\n }\n get FluidCodeLoaderFactory() {\n return this;\n }\n get Disposable() {\n return this;\n }\n /**\n * Clean-up/disposal of resources\n * Use this guide https://office.visualstudio.com/OC/_git/office-bohemia?path=/docs/partner-guide/containers/HowToDisposeResources.md\n * for reference of what resources to dispose\n */ dispose() {}\n}\n\n//# sourceMappingURL=BohemiaCodeLoaderFactory.js.map","import { getFluidExperiencesSetting } from '@fluidx/utilities';\nexport class SettingsProviderAdapter {\n constructor(settingsProvider){\n this.settingsProvider = settingsProvider;\n }\n getRawConfig(name) {\n const settingValue = getFluidExperiencesSetting(name, null, this.settingsProvider);\n // We need to cast the settingValue to ConfigType because `SettingType` contains null as a possible value and\n // `ConfigTypes` doesn't. In case the value is null, we return undefined, if not, we cast the value to ConfigTypes.\n return settingValue === null ? undefined : settingValue;\n }\n}\n\n//# sourceMappingURL=SettingsProviderAdapter.js.map","import { isFluidPackage } from '@fluidframework/container-definitions/legacy';\n/**\n * Simple utility for extracting the package name from fluid code details\n * TODO: This logic is used in multiple places and would be a great method to export from the fluidframework repo alongside isFluidPackage for reusability.\n */ export function getPackageName(codeDetails) {\n const containerPackageName = isFluidPackage(codeDetails.package) ? codeDetails.package.name : codeDetails.package;\n return containerPackageName;\n}\n\n//# sourceMappingURL=getPackageName.js.map","import { getContainerTypeForLogging } from '@ms/bohemia-codeloader';\n/**\n * Sanitize codeHintPackageName and add to logger as containerCodeDetailsName as persistent prop\n * @param codeHintPackageName\n * @param logger\n */ export function updateLoggerCodeDetailsName(codeHintPackageName, logger) {\n if (!logger) {\n return;\n }\n const sanitizedContainerCodeDetailsName = codeHintPackageName ? getContainerTypeForLogging(codeHintPackageName) : 'Unknown';\n const containerInformation = {};\n containerInformation['containerCodeDetailsName'] = sanitizedContainerCodeDetailsName;\n logger.PersistedProperties?.addPersistedProperties(containerInformation);\n}\n\n//# sourceMappingURL=logContainerCodeDetails.js.map","import { Loader } from '@fluidframework/container-loader/legacy';\nimport { LoaderHeader } from '@fluidframework/container-definitions/legacy';\nimport { defaultLocale, getRingFromEnvironmentAndAudience } from '@fluidx/utilities';\nimport { BohemiaCodeLoaderFactory, getContainerTypeForLogging } from '@ms/bohemia-codeloader';\nimport { SettingsProviderAdapter } from './SettingsProviderAdapter';\nimport { getFluidCodeDetailsOverride } from '../getContainerInfo';\nimport { ActivityLoadCodeFromHint, LoopExperiencesNamespace, OWHErrorEventContainerPackagePreCacheError, OWHGenericEventCodeHintExists } from '../Telemetry';\nimport { getPackageName } from '../getPackageName';\nimport { ActivityTracker, NamespaceLoggerAdapter, sendErrorEvent, sendTelemetryEvent } from '@fluidx/telemetry';\nimport { resumeContainerInternal } from './resumeContainerInternal';\nimport { LoopDependencyContainer } from '@fluidx/injected-dependencies';\nimport { updateLoggerCodeDetailsName } from './logContainerCodeDetails';\nconst FluidCodeLoaderFactoryKey = 'FluidCodeLoaderFactory';\nfunction hasPreCache(codeLoader) {\n // Note: need the `&& !!codeloader.preCache` in case the preCache property is set but is undefined\n return 'preCache' in codeLoader && !!codeLoader.preCache;\n}\n/** Helper function to get code details from container quorum */ function getCodeDetailsFromQuorum(container) {\n // Prefer to get the code details via the explicit API, as direct quorum access is planned to be removed.\n // Rule exception added as part of FFX bump, removing it would trigger build failures in some packages. Reconsider when updating this code.\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n if (container.getSpecifiedCodeDetails !== undefined) {\n return container.getSpecifiedCodeDetails();\n }\n /* eslint-disable-next-line @typescript-eslint/no-explicit-any\n-- TODO: Using 'any' type defeats the purpose of TypeScript. Consider replacing it with a concrete type, or 'unknown'. */ const quorum = container.getQuorum();\n return quorum.getMember('code') ?? quorum.getMember('code2');\n}\n/** Helper function to check if code proposal of actual loaded code is needed. */ function proposeCodeIfNewer(container, codeLoader) {\n (async ()=>{\n const quorumCodeDetails = getCodeDetailsFromQuorum(container);\n if (quorumCodeDetails) {\n const actualCodeDetails = codeLoader.getActualCodeDetails?.(quorumCodeDetails);\n if (actualCodeDetails && codeLoader.IFluidCodeDetailsComparer) {\n const diff = await codeLoader.IFluidCodeDetailsComparer.compare(quorumCodeDetails, actualCodeDetails);\n if (diff !== undefined && diff < 0) {\n // Propose actual code if newer\n await container.proposeCodeDetails(actualCodeDetails);\n }\n }\n }\n })().catch(()=>{\n // Do nothing for now.\n });\n}\nfunction checkCodeDetailsOverride() {\n const fluidCodeDetailsOverride = getFluidCodeDetailsOverride();\n if (fluidCodeDetailsOverride !== undefined) {\n return JSON.parse(fluidCodeDetailsOverride);\n }\n return undefined;\n}\n/**\n * Gets a code loader factory provider that either wraps the host's code loader\n * or creates a default one using BohemiaCodeLoader.\n * @param param0 Options needed for getting the correct {@link FluidCodeLoaderFactory}\n * @param param0.dependencySynthesizer The dependency container that has things like {@link ProvideSettingsProvider} and {@link ProvideInternationalizationContext}\n * @param param0.hostConfig Config that may contain a code loader factory\n * @returns A code loader factory provider\n */ async function determineCodeLoader({ hostConfig, dependencySynthesizer }) {\n const symbolProvider = {\n SettingsProvider: 'SettingsProvider',\n InternationalizationContext: 'InternationalizationContext'\n };\n const providers = dependencySynthesizer.synthesize(symbolProvider, undefined);\n const [settingsProvider, internationalizationContext] = await Promise.all([\n providers.SettingsProvider,\n providers.InternationalizationContext\n ]);\n const containerEnvironment = getRingFromEnvironmentAndAudience(hostConfig.environment, settingsProvider?.audience);\n const localeHint = internationalizationContext?.uiLocale || defaultLocale;\n return new BohemiaCodeLoaderFactory({\n containerEnvironment,\n localeHint\n });\n}\nexport async function createLoader(windowContext, props, hostConfig, driver, originalDependencySynthesizer, runtimeLogger, hostLogger, loadContainerActivityTracker) {\n const dependencySynthesizer = new LoopDependencyContainer(originalDependencySynthesizer);\n if (hostLogger && !dependencySynthesizer.has('NamespaceLogger')) {\n dependencySynthesizer.register('NamespaceLogger', new NamespaceLoggerAdapter(LoopExperiencesNamespace, hostLogger));\n }\n const providerSymbols = {\n SettingsProvider: 'SettingsProvider',\n FluidCodeLoaderFactory: FluidCodeLoaderFactoryKey\n };\n const providers = dependencySynthesizer.synthesize(providerSymbols, undefined);\n let [settingsProvider, codeLoaderFactory] = await Promise.all([\n providers.SettingsProvider,\n providers.FluidCodeLoaderFactory\n ]);\n if (!codeLoaderFactory) {\n const codeLoaderFactoryDisposable = await determineCodeLoader({\n hostConfig,\n dependencySynthesizer\n });\n dependencySynthesizer.registerIfNotAlreadyExists(FluidCodeLoaderFactoryKey, codeLoaderFactoryDisposable);\n codeLoaderFactory = codeLoaderFactoryDisposable;\n }\n // Currently logs from the fluid ecosystem flow through the logger given to\n // the loader (including execution logs from the container runtime, component\n // runtime, and data structures). At the moment, the vast majority of these\n // logs represent the file loading part of the process and thus should be\n // associated with the host starting a container so we'll go ahead and use the\n // logger passed into loadComponent to collect those.\n const codeLoader = await codeLoaderFactory.instantiateFluidCodeLoader({\n windowContext,\n dependencySynthesizer\n });\n let codeHintPackageName;\n if (props.type === 'Existing') {\n codeHintPackageName = props.containerCodeHint;\n }\n if (codeHintPackageName) {\n // Log so we know the frequency we are given a code hint from hosts on load\n hostLogger && sendTelemetryEvent(hostLogger, {\n eventName: OWHGenericEventCodeHintExists\n });\n // The URL may contain a container code hint, which we can use to start loading the\n // container code in parallel to loading the snapshot as a performance optimization.\n // If the host did not opt out by setting this flag to false (i.e. is undefined),\n // we will do this optimization.\n if (hostConfig.loadCodeFromHint === undefined || hostConfig.loadCodeFromHint) {\n const codeLoadTracker = ActivityTracker.start(ActivityLoadCodeFromHint, hostLogger, {\n addUserTiming: true\n });\n codeLoader.load({\n package: codeHintPackageName\n }).then(()=>{\n codeLoadTracker.setResult(true);\n }).catch((error)=>{\n codeLoadTracker.setResult(false, undefined /* additionalProps */ , error);\n });\n }\n if (hasPreCache(codeLoader)) {\n // preCache additional scripts needed by the code loader for the container type\n // Adding additional property to the activity in case we are precaching a container package\n loadContainerActivityTracker?.addAdditionalProps({\n precachedContainerPackageName: getContainerTypeForLogging(codeHintPackageName)\n });\n codeLoader.preCache(codeHintPackageName).catch((error)=>{\n hostLogger && sendErrorEvent(hostLogger, {\n eventName: OWHErrorEventContainerPackagePreCacheError\n }, error);\n });\n }\n }\n let configProvider;\n if (settingsProvider) {\n configProvider = new SettingsProviderAdapter(settingsProvider);\n }\n const urlResolver = await driver.urlResolver;\n const documentServiceFactory = await driver.documentServiceFactory;\n const loaderProps = {\n urlResolver,\n documentServiceFactory,\n options: hostConfig.loaderOptions,\n scope: {\n IFluidDependencySynthesizer: dependencySynthesizer\n },\n codeLoader,\n logger: runtimeLogger,\n configProvider\n };\n return new Loader(loaderProps);\n}\nexport async function loadContainer(loader, props, hostConfig, loadContainerActivityTracker, logger) {\n // Options are defined and described in https://github.com/microsoft/FluidFramework/blob/main/packages/common/container-definitions/src/loader.ts#L391\n const defaultHeaders = {\n [LoaderHeader.loadMode]: {\n opsBeforeReturn: 'cached',\n // deltaConnection 'none' or 'delayed' is required to start the container in read mode. We can remove this when we have another way of starting the container\n // in read mode (or that becomes the default). https://dev.azure.com/fluidframework/internal/_workitems/edit/2395\n deltaConnection: hostConfig.startContainerInPausedState ? 'none' : 'delayed'\n }\n };\n let containerPromise;\n let codeHintPackageName;\n const codeLoader = loader.services.codeLoader;\n switch(props.type){\n case 'Existing':\n {\n const originalRequest = props.containerRequest;\n // Add only the defaultHeaders that aren't specified on the request already\n const modifiedRequest = {\n url: originalRequest.url,\n headers: {\n ...defaultHeaders,\n ...originalRequest.headers\n }\n };\n codeHintPackageName = props.containerCodeHint;\n containerPromise = loader.resolve(modifiedRequest, hostConfig.pendingLocalState);\n break;\n }\n case 'DetachedFromCode':\n {\n const codeDetails = checkCodeDetailsOverride() || props.codeDetails;\n codeHintPackageName = getPackageName(codeDetails);\n containerPromise = loader.createDetachedContainer(codeDetails);\n break;\n }\n case 'DetachedFromSnapshot':\n {\n containerPromise = loader.rehydrateDetachedContainerFromSnapshot(props.snapshot);\n break;\n }\n default:\n throw new Error('loadContainerProps type is invalid');\n }\n // Since we already have the information for 'Existing' and 'DetachedFromCode', add containerCodeDetailsName to logger as persistent prop\n // This info is not easily available for 'DetachedFromSnapshot' and FF does not expose necessary methods to extract this. So, in this case, extracting this info after containerPromise resolves.\n updateLoggerCodeDetailsName(codeHintPackageName, logger);\n containerPromise.then(async (container)=>{\n if (hostConfig.closeBeforeDisposing === true) {\n /**\n * After OWH 14, we only call `dispose()` as the right way to dispose of these resources. But before that, we needed this to tack a `dispose()` call\n * to every 'closed' event to maintain the existing internal.5.x.y behavior.\n */ container.once('closed', (error)=>container.dispose(error));\n }\n // The only way to start the container in read mode today is is to use the deltaConnection header, so we do that\n // and then immediately resume on load. https://dev.azure.com/fluidframework/internal/_workitems/edit/2395\n if (!hostConfig.startContainerInPausedState) {\n resumeContainerInternal(container);\n }\n const containerCodeDetails = container.getSpecifiedCodeDetails();\n // Getting the package name if it's a single string or a IFluidPackage. Setting Unknown in case is not found.\n const containerCodeDetailsName = containerCodeDetails && getPackageName(containerCodeDetails);\n // Since we now have the information for 'DetachedFromSnapshot', override containerCodeDetailsName prop\n props.type === 'DetachedFromSnapshot' && updateLoggerCodeDetailsName(containerCodeDetailsName, logger);\n // Adding additional properties to the activity to see if precaching matches the loaded container type\n loadContainerActivityTracker?.addAdditionalProps({\n containerPackageMatchedCodeHint: codeHintPackageName === containerCodeDetailsName\n });\n // Wait for write connection mode to propose\n if (container.deltaManager.active) {\n proposeCodeIfNewer(container, codeLoader);\n } else {\n const connectedHandler = ()=>{\n if (container.deltaManager.active) {\n proposeCodeIfNewer(container, codeLoader);\n container.off('connected', connectedHandler);\n }\n };\n container.on('connected', connectedHandler);\n }\n }).catch(()=>{\n // We will log the errors in loadComponentInDivInternal.\n // This catch is only for removing the unhandled rejections.\n });\n return containerPromise;\n}\n\n//# sourceMappingURL=loadContainer.js.map","import { StreamCodeDetailsResolver } from './CreateHelpers/CodeDetailsResolvers';\nimport { fetchFromCDN } from './CreateHelpers/ContainerManifests';\nimport { getRingForEnvironment, isLocale, resolveLocale, safeLocalStorage, getCdnBaseUrl, getSdpCdnBaseUrl } from '@fluidx/utilities';\nimport { NamespaceLoggerAdapter } from '@fluidx/telemetry';\nimport { OfficeWebHostNamespace } from './Telemetry';\nimport { loadCreateEntriesFromGLManifest } from './loadCreateEntriesFromGLManifest';\n/**\n * @deprecated use `getLoopMeetingCodeDetails()` instead\n *\n * Top level API for retrieving specific container details created by hosts for a specific scenario\n */ export function getOneNoteMeetingsCodeDetails() {\n return {\n package: {\n name: '@ms/onenote-meetings',\n version: '0.0.1',\n fluid: {\n browser: {\n umd: {\n files: [],\n library: ''\n }\n }\n }\n },\n config: {\n blueprintId: 'oneNoteMeeting'\n }\n };\n}\n/**\n * Top level API for retrieving meeting container details for a meeting notes template\n */ export function getLoopMeetingCodeDetails() {\n return {\n ...getLoopPageContainerCodeDetails(),\n config: {\n blueprintId: 'meeting'\n }\n };\n}\n/**\n * API for getting the loop-page-container code details\n */ export function getLoopPageContainerCodeDetails() {\n return {\n package: {\n name: '@fluidx/loop-page-container',\n version: '0.0.1',\n fluid: {\n browser: {\n umd: {\n files: [],\n library: ''\n }\n }\n }\n }\n };\n}\n/**\n * API for getting the loop-page-container code details\n */ export function getCopilotBoardContainerCodeDetails() {\n return {\n package: {\n name: '@fluidx/copilot-board-container',\n version: '0.0.1',\n fluid: {\n browser: {\n umd: {\n files: [],\n library: ''\n }\n }\n }\n }\n };\n}\n/**\n * Allows external partners to use this codeloader to load specified container JS code\n * */ export function getFluidCodeDetailsOverride() {\n return safeLocalStorage()?.FluidCodeDetailsOverride;\n}\n/**\n * @deprecated This function is deprecated and will be removed in a future release.\n * Please use `getLoopPageContainerCodeDetails` instead.\n *\n * Note: The `loop-page-container` will soon be the default as we sunset `office-fluid-container`.\n *\n * This method is used only to construct initial code details from half passed configurations.\n */ export function getOfficeCodeDetails(config = {}) {\n return {\n package: {\n name: '@ms/office-fluid-container',\n version: '0.0.1',\n fluid: {\n browser: {\n umd: {\n files: [],\n library: 'codeLoader'\n }\n }\n }\n },\n config\n };\n}\n// Resolvers that return IFluidCodeDetails that the BohemiaCodeLoader knows how to load\nconst supportedResolvers = [\n StreamCodeDetailsResolver\n];\n/**\n * Helper method to run url parsing logic on a URL and return container creation information\n */ export async function tryResolveContainerInfo(url) {\n // The for loop may not run in a particular order for async calls, so no guaranteed ordering. URLs should not be resolved by multiple resolvers.\n let resolved;\n for (const resolver of supportedResolvers){\n try {\n resolved = await resolver.resolve(url);\n } catch {\n resolved = undefined;\n }\n if (resolved !== undefined) {\n return resolved;\n }\n }\n return undefined;\n}\nconst manifestLocaleIdentifier = '{locale}';\nconst supportedContainerManifestUrls = [\n {\n genericUrl: `/officeContainerManifest.json`,\n localizableUrl: `/officeContainerManifest.${manifestLocaleIdentifier}.json`\n }\n];\n/**\n * @deprecated This function is deprecated and will be removed in a future release.\n * Please use `loadCreateEntriesFromGLManifest` directly.\n *\n * Note: The `loop-page-container` (and therefore `GLManifest`) will soon be the default.\n * This function currently branches to the old and new manifest based on the `upgrade` flag,\n * but this behavior will be phased out.\n *\n * A function that returns all entry information from component manifests\n * @param locale defines which locales strings are used for each entry name. Default value is en/us\n * @param env defines which entries are available based on the ring environment. Default value is Prod\n * @param logger optional logger for telemetry\n * @param upgrade allows hosts to upgrade to loop-page-container. Passing a boolean rollout feature flag is recommended.\n * @returns Manifest entries that can be used to populate the host's component creation menu\n */ export async function getContainerManifestEntries(locale, env, logger, upgrade, cdnType) {\n // TODO: ADO 9207015 Cleanup Component Manifest references as we move to Generic Loader Manifest\n const owhNamespaceLogger = logger && new NamespaceLoggerAdapter(OfficeWebHostNamespace, logger);\n if (upgrade) {\n return loadCreateEntriesFromGLManifest(locale, env, owhNamespaceLogger);\n }\n const manifestEntries = await fetchManifestEntriesFromCDN(locale, env, owhNamespaceLogger, cdnType);\n return parseManifestEntries(manifestEntries);\n}\n/**\n * A function that fetches the manifest entries from the supported locations\n */ async function fetchManifestEntriesFromCDN(locale, env, logger, cdnType) {\n const resolvedLocale = isLocale(locale) ? resolveLocale(locale) : undefined;\n const ring = getRingForEnvironment(env);\n return Promise.all(supportedContainerManifestUrls.map(async (manifestUrls)=>{\n const baseUrl = cdnType === 'SDP' ? getSdpCdnBaseUrl(ring) + 'container/versionless/_1cdn_bucketedcontent/' : getCdnBaseUrl(ring) + '/container/versionless';\n const genericUrl = baseUrl + manifestUrls.genericUrl;\n const localizableUrl = baseUrl + manifestUrls.localizableUrl;\n // First, we try to resolve the localized version if we have a localized url available and we were given a locale.\n if (resolvedLocale !== undefined && localizableUrl) {\n const resolvedLocalizedManifest = await fetchFromCDN(localizableUrl.replace(manifestLocaleIdentifier, resolvedLocale), logger);\n // We only return if we are able to resolve something, otherwise we try to resolve the generic url instead.\n if (resolvedLocalizedManifest !== undefined) {\n return resolvedLocalizedManifest;\n }\n }\n return fetchFromCDN(genericUrl, logger);\n }));\n}\n/**\n * A function that parses already fetched data into a ContainerManifestEntry array.\n * Useful for enabling caching operations.\n */ function parseManifestEntries(manifests) {\n const entries = [];\n manifests.forEach((containerManifest)=>{\n if (containerManifest !== undefined) {\n const codeDetailsPackage = containerManifest.fluidCodeDetailsPackage;\n containerManifest.configurations.forEach((configuration)=>entries.push({\n codeDetails: {\n package: codeDetailsPackage,\n config: configuration.config\n },\n queryableData: configuration.queryableData,\n heroConfiguration: configuration.heroConfiguration\n }));\n }\n });\n return entries;\n}\n\n//# sourceMappingURL=getContainerInfo.js.map","export const ContainerLoadFailed = 'ContainerLoadFailed';\nexport const ComponentLoadFailedOnContainerBoot = 'ComponentLoadFailedOnContainerBoot';\n\n//# sourceMappingURL=OWHErrorTypes.js.map","import { OWHErrorEventLoadComponentCancelledByHost } from '../Telemetry';\nexport function disposeContainer(container, closeBeforeDisposing) {\n /**\n * Before OWH 14, we would call `close()` before calling `dispose()`. This preserved the semantics of making sure that hosts' 'closed' event would fire,\n * though it also added an inefficiency of doing extra work (setting everything to read-only) right before disposing the whole thing anyway.\n * With OWH 14, we are changing the behavior to call `dispose()` ONLY. However, on the off chance that this causes an issue (memory-leak, etc), we are\n * temporarily providing an 'opt-out' to get back to the OWH 13 behavior, of calling `close()` before `dispose()`\n */ if (closeBeforeDisposing) {\n container.close();\n }\n container.dispose();\n}\nexport class LoadComponentCancelledByHostError extends Error {\n constructor(){\n super('The container could not be loaded because its hosting window has already been unloaded.'), /**\n * LoadComponentCancelledByHostError needs to have errorType field for logging purposes. However we don't\n * want to make it extend LoggingError from @fluidframework/telemetry-utils as LoggingError is marked as\n * internal and we aren't supposed to use it here.\n */ this.name = OWHErrorEventLoadComponentCancelledByHost, this.errorType = OWHErrorEventLoadComponentCancelledByHost;\n }\n}\n\n//# sourceMappingURL=disposeContainer.js.map","function getAudienceValue(audience) {\n switch(audience){\n case 'Automation':\n return 0;\n case 'Local':\n return 1;\n case 'Staging':\n return 2;\n case 'Dogfood':\n return 3;\n case 'Preview':\n return 4;\n case 'Microsoft':\n return 5;\n case 'SyntheticTraffic':\n return 5;\n case 'Production':\n return 6;\n case 'GCC':\n return 7;\n case 'GCC-High':\n return 8;\n case 'DoD':\n return 8;\n default:\n return undefined;\n }\n}\n/**\n * Helper function to enable features up to a specific environment.\n * 'Automation' < 'Local' < 'Staging' < 'Dogfood' < 'Preview' < 'Microsoft' === 'SyntheticTraffic' < 'Production' < 'GCC' < 'GCC-High' === 'DoD'\n * @returns true if the Audience value represents an audience below the one stated, false otherwise. If audience is undefined, we assume production\n */ export function enableUpToAudience(enableUpTo, audience) {\n const enableUpToValue = getAudienceValue(enableUpTo);\n const audienceValue = getAudienceValue(audience ?? 'Production');\n return enableUpToValue !== undefined && audienceValue !== undefined && audienceValue <= enableUpToValue;\n}\n\n//# sourceMappingURL=enableUpToAudience.js.map","import { enableUpToAudience, getFluidExperiencesSetting } from '@fluidx/utilities';\n/**\n * Enabled by default.\n * @returns a boolean indicating if resolveWithLocationRedirectionHandling API should be used to handle locationRedirection\n */ export const isLocationRedirectionHandlingEnabled = (settingsProvider)=>{\n return getFluidExperiencesSetting('owh.handleLocationRedirection', true, settingsProvider);\n};\nexport const isNestedDependencyContainerForCreateEnabled = (settingsProvider)=>{\n const defaultValue = enableUpToAudience('Automation', settingsProvider?.audience);\n return getFluidExperiencesSetting('useNestedDependencyContainer', defaultValue, settingsProvider);\n};\n\n//# sourceMappingURL=featureSettings.js.map","import { resolveWithLocationRedirectionHandling } from '@fluidframework/container-loader/legacy';\nimport { ErrorBase } from '@fluidx/1p-loop-types';\nimport { ActivityTracker, sendTelemetryEvent, isExpectedError, sendErrorEvent } from '@fluidx/telemetry';\nimport { computeOffsetTime, logBrowserMetadata, getDocumentHiddenResult, defaultLocale, Deferred } from '@fluidx/utilities';\nimport { attachContainerListeners } from './attachContainerListeners';\nimport { FluidRuntimeLoggerAdapter } from './FluidRuntimeLoggerAdapter';\nimport { loadComponent } from './loadComponent';\nimport { loadContainer, createLoader } from '../LoadHelpers/loadContainer';\nimport { OWHAshaErrorTypeComponentLoadError, OWHAshaErrorTypeContainerLoadError, OWHAshaPillarOpen, OWHAshaVetoFileOpenFailed } from '../Reliability/OfficeWebHostAsha';\nimport { ContainerLoadFailed, ComponentLoadFailedOnContainerBoot } from '../Reliability/OWHErrorTypes';\nimport { logQoSError } from '../Reliability/QoSErrorHelpers';\nimport { ActivityGetDriver, ActivityLoadComponentInDiv, ActivityLoadContainer, ActivityRehydrateFromTemplateContent, OWHErrorEventComponentNotSerializableError, OWHErrorEventUndefinedTemplateContentError } from '../Telemetry';\nimport { disposeContainer, LoadComponentCancelledByHostError } from './disposeContainer';\nimport { getTemplateSerializedContent } from './getTemplateSerializedContent';\nimport { createProviderProxy } from '../Utils/providerProxy';\nimport { isLocationRedirectionHandlingEnabled } from '../Utils/featureSettings';\n// This function includes dependency synthesizer and host context manipulation, as well as determining if we have a driver\nexport function loadComponentInDivInternal({ windowContextForLoader, dependencySynthesizer, hostConfig, logger, perfMetadata, documentEverHiddenTrackerID, containerRequest, driver, preCheckInfo, requiredProviderTypes }) {\n ensureValidDriverConfiguration(driver, hostConfig, dependencySynthesizer);\n const loadContainerProps = {\n type: 'Existing',\n containerRequest,\n containerCodeHint: preCheckInfo?.codeDetailsHint\n };\n const { containerPromise, componentPromise } = driver ? loadComponentInDivLean(windowContextForLoader, loadContainerProps, driver, containerRequest, dependencySynthesizer, hostConfig, logger, perfMetadata, documentEverHiddenTrackerID, requiredProviderTypes, /* loadTemplateProps */ undefined) : loadComponentInDivLeanWithDriver(windowContextForLoader, loadContainerProps, containerRequest, dependencySynthesizer, hostConfig, logger, perfMetadata, documentEverHiddenTrackerID, requiredProviderTypes, /* loadTemplateProps */ undefined);\n return {\n container: containerPromise,\n component: componentPromise\n };\n}\nexport function createComponentFromCodeInDivInternal(windowContextForLoader, props, driver, config, logger, perfMetadata, documentEverHiddenTrackerId) {\n ensureValidDriverConfiguration(driver, config, props.dependencySynthesizer);\n const { componentPromise: component, containerPromise: container } = driver ? loadComponentInDivLean(windowContextForLoader, {\n type: 'DetachedFromCode',\n codeDetails: props.codeDetails\n }, driver, /* documentUrl */ undefined, props.dependencySynthesizer, config, logger, perfMetadata, documentEverHiddenTrackerId, props.requiredProviderTypes, props.loadTemplateProps) : loadComponentInDivLeanWithDriver(windowContextForLoader, {\n type: 'DetachedFromCode',\n codeDetails: props.codeDetails\n }, /* documentUrl */ undefined, props.dependencySynthesizer, config, logger, perfMetadata, documentEverHiddenTrackerId, props.requiredProviderTypes, props.loadTemplateProps);\n return {\n component,\n container\n };\n}\nexport function rehydrateComponentFromSnapshotInDivInternal(windowContextForLoader, props, driver, config, logger, perfMetadata, documentEverHiddenTrackerId) {\n ensureValidDriverConfiguration(driver, config, props.dependencySynthesizer);\n const { componentPromise: component, containerPromise: container } = driver ? loadComponentInDivLean(windowContextForLoader, {\n type: 'DetachedFromSnapshot',\n snapshot: props.snapshot\n }, driver, /* documentUrl */ undefined, props.dependencySynthesizer, config, logger, perfMetadata, documentEverHiddenTrackerId, props.requiredProviderTypes, /* loadTemplateProps */ undefined) : loadComponentInDivLeanWithDriver(windowContextForLoader, {\n type: 'DetachedFromSnapshot',\n snapshot: props.snapshot\n }, /* documentUrl */ undefined, props.dependencySynthesizer, config, logger, perfMetadata, documentEverHiddenTrackerId, props.requiredProviderTypes, /* loadTemplateProps */ undefined);\n return {\n component,\n container\n };\n}\n/**\n * @see loadComponentInDivLean\n * Similar to loadComponentInDivLean but includes driver instantiation .\n * Both things that *should* get deprecated soon in which case loadComponentInDivLean can be used directly\n */ export function loadComponentInDivLeanWithDriver(windowContext, loadContainerProps, containerRequest, dependencySynthesizer, hostConfig, logger, perfMetadata, documentEverHiddenTrackerID, requiredProviderTypes, loadTemplateProps) {\n const containerPromise = new Deferred();\n const componentPromise = new Deferred();\n getDriver().then(async (driver)=>{\n const result = loadComponentInDivLean(windowContext, loadContainerProps, driver, containerRequest, dependencySynthesizer, hostConfig, logger, perfMetadata, documentEverHiddenTrackerID, requiredProviderTypes, loadTemplateProps);\n containerPromise.resolve(result.containerPromise);\n componentPromise.resolve(result.componentPromise);\n }).catch((error)=>{\n containerPromise.reject(error);\n componentPromise.reject(error);\n });\n return {\n containerPromise,\n componentPromise\n };\n /** A local helper function for fetching the driver, based on either the driverImplementationOverride or dependencySynthesizer */ async function getDriver() {\n const getDriverActivityTracker = ActivityTracker.start(ActivityGetDriver, logger, {\n addUserTiming: true\n });\n const perfProps = {\n ...perfMetadata,\n // TODO: Product Backlog Item 7512199: Remove '!' non-null-assertion usage from office-bohemia packages\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n documentEverHidden: getDocumentHiddenResult(documentEverHiddenTrackerID) > -1\n };\n const { driverImplementationOverride } = hostConfig;\n if (driverImplementationOverride) {\n getDriverActivityTracker.setResult(true, {\n ...perfProps,\n driverType: 'Override'\n });\n return driverImplementationOverride;\n }\n // Load from synthesizer\n const driverSymbols = {\n DriverImplementation: 'DriverImplementation',\n FluidUrlResolverProvider: 'FluidUrlResolverProvider',\n FluidDocumentServiceFactoryProvider: 'FluidDocumentServiceFactoryProvider'\n };\n const { DriverImplementation: driverPromise, FluidDocumentServiceFactoryProvider: documentServiceFactoryPromise, FluidUrlResolverProvider: urlResolverPromise } = dependencySynthesizer.synthesize(driverSymbols, undefined);\n const [legacySynthesizedDriver, urlResolver, documentServiceFactory] = await Promise.all([\n driverPromise,\n urlResolverPromise?.then((urlResolverProvider)=>urlResolverProvider?.urlResolver),\n documentServiceFactoryPromise?.then((documentServiceFactoryProvider)=>documentServiceFactoryProvider?.documentServiceFactory)\n ]);\n // In early 2023, we added support for the driver to be passed as a single\n // entity on the dependency synthesizer. We determined that it's better to keep the pieces\n // separate, but we need to continue supporting this way until it is removed in a breaking OWH\n // version bump.\n if (legacySynthesizedDriver) {\n getDriverActivityTracker.setResult(true, {\n ...perfProps,\n driverType: 'SynthesizedLegacy'\n });\n return legacySynthesizedDriver;\n }\n if (urlResolver && documentServiceFactory) {\n getDriverActivityTracker.setResult(true, {\n ...perfProps,\n driverType: 'Synthesized'\n });\n return {\n documentServiceFactory,\n urlResolver\n };\n }\n // No driver found, error out.\n const error = new Error('Driver unavailable');\n getDriverActivityTracker.setResult(false, perfProps, error);\n throw error;\n }\n}\n/**\n * Loads a component into a div (if provided), given appropriate information and auth callbacks. Leaner version that doesn't include realize and linkProcessing code\n * Also includes registering the settings provider in OWH.\n * This should not be directly called from outside office-web-host\n * @param windowContextForLoader The Window object to pass to the CodeLoader (if instantiating one), to define the Window object to load the scripts onto.\n * @param loadContainerProps props passed to loadContainer.\n * @param driver Driver (DocumentServiceFactory and UrlResolver) to be used\n * @param containerRequest\n * @param dependencySynthesizer A dependency synthesizer that allows the host to register providers for the container and components to access.\n * @param hostConfig Optional config settings for the office-web-host.\n * @param logger Office web host logger\n * @param perfMetadata Additional properties for perf logging\n * @param documentEverHiddenTrackerID Used to track if the document was hidden at any point from the start of OWH\n * @param requiredProviderTypes a list of required provider types that callers expect to get from the component\n * @param loadTemplateProps\n */ export function loadComponentInDivLean(windowContextForLoader, loadContainerProps, driver, containerRequest, dependencySynthesizer, hostConfig, logger, perfMetadata, documentEverHiddenTrackerID, requiredProviderTypes, loadTemplateProps) {\n // Setup\n const fluidBootstrapperStartTime = perfMetadata.fluidBootstrapperStartTime;\n const additionalCreateNewLogProps = loadContainerProps.type !== 'Existing' && {\n createNew: loadContainerProps.type === 'DetachedFromCode' ? 'DetachedContainer' : loadContainerProps.type\n };\n let currentContainerRequest = containerRequest;\n const createNewActivityProps = // Exception added when eslint rule was added, this should be revisited when modifying this code\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n additionalCreateNewLogProps && {\n additionalPropsToLog: additionalCreateNewLogProps\n } || undefined;\n const symbolProvider = {\n InternationalizationContext: 'InternationalizationContext',\n SettingsProvider: 'SettingsProvider'\n };\n const providers = dependencySynthesizer.synthesize(symbolProvider, undefined);\n Promise.resolve(providers.InternationalizationContext).then((internationalizationContext)=>{\n logger && sendTelemetryEvent(logger, {\n eventName: 'HostLocaleContext',\n subCategory: 'HostLocaleContext',\n uiLanguage: internationalizationContext?.uiLocale || defaultLocale\n });\n }).catch(()=>{});\n const loadComponentInDivActivityTracker = ActivityTracker.start(ActivityLoadComponentInDiv, logger, {\n addUserTiming: true,\n // We want to know if load seems to fail because of create new\n ...createNewActivityProps\n });\n logger && logBrowserMetadata(logger);\n const runtimeLogger = logger && new FluidRuntimeLoggerAdapter(logger, perfMetadata, documentEverHiddenTrackerID);\n const containerLoadActivityTracker = ActivityTracker.start(ActivityLoadContainer, logger, {\n addUserTiming: true,\n additionalPropsToLog: {\n LoadContainerType: loadContainerProps.type\n },\n isAPerformanceMetric: true\n });\n const loaderPromise = createLoader(windowContextForLoader, loadContainerProps, hostConfig, driver, dependencySynthesizer, runtimeLogger, logger, containerLoadActivityTracker);\n const containerPromise = Promise.all([\n loaderPromise,\n providers.SettingsProvider\n ]).then(([loader, settingsProvider])=>{\n const handleLocationRedirection = isLocationRedirectionHandlingEnabled(settingsProvider);\n // containerRequest prop exists only if type === 'existing', hence this check\n if (handleLocationRedirection && loadContainerProps.type === 'Existing') {\n let loadContainerAPICounter = 0;\n return resolveWithLocationRedirectionHandling(async (request)=>{\n // Counter to count how many times this callback is called\n loadContainerAPICounter += 1;\n // When location redirection error is encountered, then this callback is called more than once\n // To avoid over logging, using the counter to figure it was called more than once and only then log\n if (loadContainerAPICounter > 1) {\n logger && sendTelemetryEvent(logger, {\n eventName: 'LocationRedirectionCallbackCalled',\n loadContainerAPICounter,\n loadContainerType: loadContainerProps.type\n });\n }\n loadContainerProps.containerRequest = request;\n // To update the request passed to load the container.\n currentContainerRequest = request;\n return loadContainer(loader, loadContainerProps, hostConfig, containerLoadActivityTracker, logger);\n }, loadContainerProps.containerRequest, loader.services.urlResolver, runtimeLogger);\n } else {\n logger && sendErrorEvent(logger, {\n eventName: 'LocationRedirectionHandlingError',\n errorType: 'LocationRedirectionHandlingDisabled',\n loadContainerType: loadContainerProps.type // Adding this extra prop to check if we are hitting this case\n }, new Error('Location redirection handling is disabled in the settings provider. And is not using resolveWithLocationRedirectionHandling'));\n return loadContainer(loader, loadContainerProps, hostConfig, containerLoadActivityTracker, logger);\n }\n }).then((container)=>{\n // In the case where the window got disposed before the container finished initializing, dispose the container and throw an error.\n // This ensures that we don't hand off a container that is about to be thrown away anyways.\n if (windowContextForLoader.closed) {\n disposeContainer(container, hostConfig.closeBeforeDisposing === true);\n throw new LoadComponentCancelledByHostError();\n }\n return container;\n });\n containerPromise.then((container)=>{\n // Attach container closed and connected listeners\n logger && attachContainerListeners(container, logger);\n const documentEverHiddenResult = getDocumentHiddenResult(documentEverHiddenTrackerID);\n const containerLoadActivityStartTime = containerLoadActivityTracker.startTimeSinceEpoch;\n containerLoadActivityTracker.setResult(true, {\n ...perfMetadata,\n offsetFromFluidBootstrapperStartTime: computeOffsetTime(containerLoadActivityStartTime, fluidBootstrapperStartTime),\n // TODO: Product Backlog Item 7512199: Remove '!' non-null-assertion usage from office-bohemia packages\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n documentEverHidden: documentEverHiddenResult > -1\n });\n }).catch((error)=>{\n containerLoadActivityTracker.setResult(false, {\n errorType: error.errorType\n } /*additionalProps*/ , error);\n loadComponentInDivActivityTracker.setResult(false, {\n errorType: error.errorType || ContainerLoadFailed,\n isUserImpacting: true\n } /*additionalProps*/ , error);\n if (logger) {\n logQoSError(logger, ActivityLoadComponentInDiv, OWHAshaPillarOpen /*pillar*/ , OWHAshaVetoFileOpenFailed /*veto*/ , error.errorType || OWHAshaErrorTypeComponentLoadError /*errorType*/ , {} /*additionalProps*/ , error);\n }\n });\n // Request and render component\n const componentPromise = containerPromise.then((container)=>{\n // Exception added when eslint rule was added, this should be revisited when modifying this code\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n if (!container) {\n loadComponentInDivActivityTracker.setResult(false);\n logger && logQoSError(logger, ActivityLoadComponentInDiv, OWHAshaPillarOpen /*pillar*/ , OWHAshaVetoFileOpenFailed /*veto*/ , OWHAshaErrorTypeContainerLoadError /*errorType*/ );\n throw new Error('Failed to Load Container');\n }\n const componentFromContainerPromise = loaderPromise.then((loader)=>loadComponent(container, loader.services.urlResolver, currentContainerRequest, logger, perfMetadata, documentEverHiddenTrackerID, hostConfig.startContainerInPausedState, dependencySynthesizer));\n let componentPromiseToReturn = componentFromContainerPromise;\n // Check if the created file needs to be created from an existing template.\n // If yes, we will use the existing content to populate the new component.\n if (loadTemplateProps?.fromExistingTemplateUrl) {\n const templateSerializedContentPromise = getTemplateSerializedContent(loadTemplateProps, loaderPromise, hostConfig, logger, perfMetadata, documentEverHiddenTrackerID);\n componentPromiseToReturn = componentFromContainerPromise.then((component)=>{\n const componentSerializable = component.ComponentSerializable;\n // Exception added when eslint rule was added, this should be revisited when modifying this code\n if (!componentSerializable) {\n // In order to capture the serialization errors in our monitors, explicitly setting an errorType here so that it get's logged with isAce flag as true.\n throw new ErrorBase(`Component doesn't implement ComponentSerializable`, OWHErrorEventComponentNotSerializableError);\n }\n let rehydrateFromTemplateContentActivityTracker;\n // TODO: Add waiting threshold to abandon fetching the serialized template: https://office.visualstudio.com/OC/_workitems/edit/5549179\n return templateSerializedContentPromise.then(async (serializedContent)=>{\n rehydrateFromTemplateContentActivityTracker = ActivityTracker.start(ActivityRehydrateFromTemplateContent, logger, {\n addUserTiming: true\n });\n if (serializedContent === undefined) {\n throw new Error(OWHErrorEventUndefinedTemplateContentError);\n } else {\n await componentSerializable.rehydrate(serializedContent);\n rehydrateFromTemplateContentActivityTracker.setResult(true);\n return component;\n }\n }).catch((error)=>{\n rehydrateFromTemplateContentActivityTracker?.setResult(false, undefined /* additionalProps */ , error);\n throw error;\n });\n });\n }\n componentPromiseToReturn = componentPromiseToReturn.then((component)=>{\n if (requiredProviderTypes) {\n const providers = dependencySynthesizer.synthesize({\n FluidDocumentServiceFactoryProvider: 'FluidDocumentServiceFactoryProvider'\n }, undefined);\n return createProviderProxy(component, container, requiredProviderTypes, providers.FluidDocumentServiceFactoryProvider, currentContainerRequest?.url, logger);\n }\n return component;\n });\n componentPromiseToReturn.then(()=>{\n loadComponentInDivActivityTracker.setResult(true);\n }).catch((error)=>{\n // check if error is FF related\n let FFError;\n if (!!error && 'errorType' in error && 'message' in error) {\n FFError = error;\n }\n // Dispose the container if we fail to load the component\n container.dispose(FFError);\n loadComponentInDivActivityTracker.setResult(false, {\n errorType: error.errorType || error.name !== 'Error' ? error.name : ComponentLoadFailedOnContainerBoot,\n // Since boot failures are considered as user impacting\n isUserImpacting: true,\n isExpected: isExpectedError(error)\n } /* additionalProps */ , error);\n if (logger) {\n logQoSError(logger, ActivityLoadComponentInDiv, OWHAshaPillarOpen /*pillar*/ , OWHAshaVetoFileOpenFailed /*veto*/ , error.errorType || error.name || OWHAshaErrorTypeComponentLoadError /*errorType*/ , {} /*additionalProps*/ , error);\n }\n });\n return componentPromiseToReturn;\n });\n return {\n containerPromise,\n componentPromise\n };\n}\n// Exported for unit tests\nexport const driverConfigurationError = new Error('Invalid configuration for driver. Please provide either a driver or а driverImplementationOverride.');\n/**\n * Checks if the dependency synthesizer has a driver, or the required pieces to \"create\" a driver.\n * @param dependencySynthesizer The dependency synthesizer to check\n * @returns true if the dependency synthesizer has a driver, false otherwise\n */ function synthesizerHasDriver(dependencySynthesizer) {\n const driverKey = 'DriverImplementation';\n const driverPieces = [\n 'FluidUrlResolverProvider',\n 'FluidDocumentServiceFactoryProvider'\n ];\n return dependencySynthesizer.has(driverKey) || driverPieces.every((key)=>dependencySynthesizer.has(key));\n}\nfunction ensureValidDriverConfiguration(driver, config, dependencySynthesizer) {\n const isValidDriverConfiguration = driver || config.driverImplementationOverride || synthesizerHasDriver(dependencySynthesizer);\n if (!isValidDriverConfiguration) {\n throw driverConfigurationError;\n }\n} // cspell:ignore asha bootstrapper fluidcodedetailsoverride Serializable\n\n//# sourceMappingURL=loadComponentInDivInternal.js.map","import { sendTelemetryEvent } from '@fluidx/telemetry';\nimport { isMobile } from '../deviceDetector';\nexport function logBrowserMetadata(logger) {\n // NetworkInformation Interface does not currently exist on libDom\n /* eslint-disable-next-line @typescript-eslint/no-explicit-any\n-- TODO: Using 'any' type defeats the purpose of TypeScript. Consider replacing it with a concrete type, or 'unknown'. */ const connection = navigator?.connection;\n sendTelemetryEvent(logger, {\n eventName: 'Metadata',\n subCategory: 'browserMetadata',\n // Logging DNT to see the percentage of browsers that have this enabled,\n // and if we should respect or not the user setting.\n doNotTrack: navigator.doNotTrack ? navigator.doNotTrack : 'false',\n // Tracks if the page was running on a background tab when this is logged since\n // browsers can throttle the processes when not running on the foreground\n documentHidden: document.hidden,\n // Provides information about the connection a device.\n // Can have values of 'slow-2g', '2g', '3g', or '4g'.\n networkType: connection?.effectiveType,\n // The estimated effective round-trip time of the current connection,\n // rounded to the nearest multiple of 25 milliseconds.\n networkRoundTripTime: connection?.rtt,\n // The number of physical cores the client device has\n cpuCoreCount: navigator.hardwareConcurrency,\n isMobile: isMobile(),\n timeStamp: Date.now()\n });\n}\n\n//# sourceMappingURL=logBrowserMetadata.js.map","import { waitContainerToCatchUp } from '@fluidframework/container-loader/legacy';\nimport { ActivityTracker } from '@fluidx/telemetry';\nimport { ErrorBase } from '@fluidx/1p-loop-types';\nimport { loadComponent } from './loadComponent';\nimport { loadContainer } from '../LoadHelpers/loadContainer';\nimport { ActivityGetTemplateContent, OWHErrorEventComponentNotSerializableError, OWHErrorEventComponentSerializationError, OWHErrorEventGetTemplateContentError } from '../Telemetry';\nexport async function getTemplateSerializedContent(loadTemplateProps, loaderPromise, hostConfig, logger, perfMetadata, documentEverHiddenTrackerID) {\n const getTemplateContentActivityTracker = ActivityTracker.start(ActivityGetTemplateContent, logger, {\n addUserTiming: true\n });\n return loaderPromise.then(async (loader)=>{\n getTemplateContentActivityTracker.markSubActivityStart('TemplateLoadContainer');\n const container = await loadContainer(loader, {\n type: 'Existing',\n containerRequest: {\n url: loadTemplateProps.fromExistingTemplateUrl,\n headers: loadTemplateProps.loadTemplateRequestHeaders\n }\n }, hostConfig, undefined, logger);\n getTemplateContentActivityTracker.markSubActivityEnd('TemplateLoadContainer');\n // Make sure to wait for pending ops from the existing container.\n await waitContainerToCatchUp(container);\n getTemplateContentActivityTracker.markSubActivityStart('TemplateLoadComponent');\n const templateComponentPromise = loadComponent(container, loader.services.urlResolver, /* componentRequest */ {\n url: loadTemplateProps.fromExistingTemplateUrl\n }, logger, perfMetadata, documentEverHiddenTrackerID, hostConfig.startContainerInPausedState);\n return templateComponentPromise.then(async (templateComponent)=>{\n getTemplateContentActivityTracker.markSubActivityEnd('TemplateLoadComponent');\n // Exception added when eslint rule was added, this should be revisited when modifying this code\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n if (!templateComponent?.ComponentSerializable) {\n throw new ErrorBase(`Component doesn't implement ComponentSerializable`, OWHErrorEventComponentNotSerializableError);\n }\n try {\n const serializedTemplate = await templateComponent.ComponentSerializable.serialize();\n getTemplateContentActivityTracker.setResult(true);\n return serializedTemplate;\n } catch (e) {\n // In order to capture the serialization errors in our monitors, explicitly setting an error name here so that it get's logged with isAce flag as true.\n throw new ErrorBase(`Component serialization failed`, OWHErrorEventComponentSerializationError, e);\n }\n }).finally(()=>{\n container.dispose();\n });\n }).catch((error)=>{\n getTemplateContentActivityTracker.setResult(false, undefined /* additionalProps */ , error /*error*/ );\n // GetTemplateContentError is a general error name which includes errors related to fetching of the template or getting serialized content from the template.\n error.name = error.name || OWHErrorEventGetTemplateContentError;\n throw error;\n });\n} // cSpell:ignore Serializable\n\n//# sourceMappingURL=getTemplateSerializedContent.js.map","/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n/**\n * @internal\n */\nexport var SharingLinkHeader;\n(function (SharingLinkHeader) {\n /**\n * Can be used in request made to resolver, to tell the resolver that the passed in URL is a sharing link\n * which can be redeemed at server to get permissions.\n */\n SharingLinkHeader[\"isSharingLinkToRedeem\"] = \"isSharingLinkToRedeem\";\n /**\n * When isSharingLinkToRedeem is true, this header can be used to tell the server that the redemption of the sharing link\n * is meant to be non-durable.\n */\n SharingLinkHeader[\"isRedemptionNonDurable\"] = \"isRedemptionNonDurable\";\n})(SharingLinkHeader || (SharingLinkHeader = {}));\n/**\n * @internal\n */\nexport var ClpCompliantAppHeader;\n(function (ClpCompliantAppHeader) {\n // Can be used in request made to resolver, to tell the resolver that the host app is CLP compliant.\n // Odsp will not return Classified, labeled, or protected documents if the host app cannot support them.\n ClpCompliantAppHeader[\"isClpCompliantApp\"] = \"X-CLP-Compliant-App\";\n})(ClpCompliantAppHeader || (ClpCompliantAppHeader = {}));\n//# sourceMappingURL=contractsPublic.js.map","/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n/*\n * Per https://github.com/microsoft/FluidFramework/issues/1556, isolating createOdspUrl() in its own file.\n */\n/**\n * Encodes ODC/SPO information into a URL format that can be handled by the Loader\n * @param l -The property bag of necessary properties to locate a Fluid data store and craft a url for it\n * @legacy\n * @alpha\n */\nexport function createOdspUrl(l) {\n let odspUrl = `${l.siteUrl}?driveId=${encodeURIComponent(l.driveId)}&itemId=${encodeURIComponent(l.itemId)}&path=${encodeURIComponent(l.dataStorePath)}`;\n if (l.containerPackageName) {\n odspUrl += `&containerPackageName=${encodeURIComponent(l.containerPackageName)}`;\n }\n if (l.fileVersion) {\n odspUrl += `&fileVersion=${encodeURIComponent(l.fileVersion)}`;\n }\n return odspUrl;\n}\n//# sourceMappingURL=createOdspUrl.js.map","/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\nimport * as base64js from \"base64-js\";\n// Note: See 'Isomorphic Code' section in the package README.md\nimport { IsoBuffer } from \"./bufferBrowser.js\";\nasync function digestBuffer(file, algorithm) {\n const hash = await crypto.subtle.digest(algorithm, file);\n return new Uint8Array(hash);\n}\nfunction encodeDigest(hashArray, encoding) {\n // eslint-disable-next-line default-case\n switch (encoding) {\n case \"hex\": {\n const hashHex = Array.prototype.map\n .call(hashArray, (byte) => {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call\n return byte.toString(16).padStart(2, \"0\");\n })\n .join(\"\");\n return hashHex;\n }\n case \"base64\": {\n return base64js.fromByteArray(hashArray);\n }\n }\n}\n/**\n * Hash a file. Consistent within a session, but should not be persisted and\n * is not consistent with git.\n * If called under an insecure context for a browser, this will fallback to\n * using the node implementation.\n *\n * @param file - The contents of the file in a buffer.\n * @param algorithm - The hash algorithm to use, artificially constrained by what is used internally.\n * @param hashEncoding - The encoding of the returned hash, also artificially constrained.\n * @returns The hash of the content of the buffer.\n *\n * @internal\n */\nexport async function hashFile(file, algorithm = \"SHA-1\", hashEncoding = \"hex\") {\n // Handle insecure contexts (e.g. running with local services)\n // by deferring to Node version, which uses a hash polyfill\n // When packed, this chunk will show as \"FluidFramework-HashFallback\" separately\n // from the main chunk and will be of non-trivial size. It will not be served\n // under normal circumstances.\n if (crypto.subtle === undefined) {\n return import(\n /* webpackChunkName: \"FluidFramework-HashFallback\" */\n \"./hashFileNode.js\").then(async (m) => m.hashFile(file, algorithm, hashEncoding));\n }\n // This is split up this way to facilitate testing (see the test for more info)\n const hashArray = await digestBuffer(file, algorithm);\n return encodeDigest(hashArray, hashEncoding);\n}\n/**\n * Create a github hash (Github hashes the string with blob and size)\n * Must be called under secure context for browsers\n *\n * @param file - The contents of the file in a buffer\n * @returns The sha1 hash of the content of the buffer with the `blob` prefix and size\n *\n * @internal\n */\nexport async function gitHashFile(file) {\n const size = file.byteLength;\n // eslint-disable-next-line unicorn/prefer-code-point\n const filePrefix = `blob ${size.toString()}${String.fromCharCode(0)}`;\n const hashBuffer = IsoBuffer.from(filePrefix + file.toString());\n // hashFile uses sha1; if that changes this will need to change too\n return hashFile(hashBuffer);\n}\n//# sourceMappingURL=hashFileBrowser.js.map","/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n// Centralized store for all ODC/SPO logic\n/**\n * Checks whether or not the given URL has an ODC origin\n * @param url - The URL to check\n * @internal\n */\nexport function hasOdcOrigin(url) {\n return (\n // Primary API endpoint and several test endpoints\n url.origin.endsWith(\"onedrive.com\") ||\n // *storage.live.com hostnames\n url.origin.endsWith(\"storage.live.com\") ||\n // live-int\n url.origin.endsWith(\"storage.live-int.com\") ||\n // Test endpoints\n url.origin.endsWith(\"onedrive-tst.com\"));\n}\n/**\n * Gets the correct API root for the given ODSP url, e.g. 'https://foo-my.sharepoint.com/_api/v2.1'\n * @param url - The URL\n * @internal\n */\nexport function getApiRoot(url) {\n let prefix = \"_api/\";\n if (hasOdcOrigin(url)) {\n prefix = \"\";\n }\n return `${url.origin}/${prefix}v2.1`;\n}\n/**\n * Whether or not the given URL is a valid SPO/ODB URL\n * @param url - The URL to check\n * @internal\n */\nexport function isSpoUrl(url) {\n // Format: foo.sharepoint.com/_api/v2.1./drives/bar/items/baz and foo.sharepoint-df.com/...\n const hostRegex = /\\.sharepoint(?:-df)?\\.com$/;\n const pathRegex = /^\\/_api\\/v2\\.1\\/drives\\/[^/]+\\/items\\/[^/]+/;\n return hostRegex.test(url.host.toLowerCase()) && pathRegex.test(url.pathname.toLowerCase());\n}\n/**\n * Whether or not the given URL is a valid ODC URL\n * @param url - The URL to check\n * @internal\n */\nexport function isOdcUrl(url) {\n if (!hasOdcOrigin(url)) {\n return false;\n }\n const path = url.pathname.toLowerCase();\n // Splitting the regexes so we don't have regex soup\n // Format: /v2.1/drive/items/ABC123!123 and /v2.1/drives/ABC123/items/ABC123!123\n const odcRegex = /^\\/v2\\.1\\/(?:drive|drives\\/[^/]+)\\/items\\/[\\dA-Za-z]+!\\d+/;\n // Format: /v2.1/drives('ABC123')/items('ABC123!123')\n const odcODataRegex = /^\\/v2\\.1\\/drives\\('[^/]+'\\)\\/items\\('[\\dA-Za-z]+!\\d+'\\)/;\n return odcRegex.test(path) || odcODataRegex.test(path);\n}\n/**\n * Breaks an ODSP URL into its parts, extracting the site, drive ID, and item ID.\n * Returns undefined for invalid/malformed URLs.\n * @param url - The (raw) URL to parse\n * @internal\n */\nexport async function getOdspUrlParts(url) {\n const pathname = url.pathname;\n // Joinsession like URL\n // Pick a regex based on the hostname\n // TODO This will only support ODC using api.onedrive.com, update to handle the future (share links etc)\n let joinSessionMatch;\n if (hasOdcOrigin(url)) {\n // Capture groups:\n // 0: match\n // 1: origin\n // 2: optional `drives` capture (the `/drives/` API format vs `/drive`)\n // 3: optional captured drive ID\n // 4: Item ID\n // 5: Drive ID portion of Item ID\n joinSessionMatch =\n /(.*)\\/v2\\.1\\/drive(s\\/([\\dA-Za-z]+))?\\/items\\/(([\\dA-Za-z]+)!\\d+)/.exec(pathname);\n if (joinSessionMatch === null) {\n // Try again but with the OData format ( `/drives('ABC123')/items('ABC123!456')` )\n joinSessionMatch =\n /(.*)\\/v2\\.1\\/drives\\('([\\dA-Za-z]+)'\\)\\/items\\('(([\\dA-Za-z]+)!\\d+)'\\)/.exec(pathname);\n if (joinSessionMatch === null) {\n return undefined;\n }\n }\n const driveId = joinSessionMatch[3] || joinSessionMatch[5];\n const itemId = joinSessionMatch[4];\n return { siteUrl: `${url.origin}${url.pathname}`, driveId, itemId };\n }\n else {\n joinSessionMatch = /(.*)\\/_api\\/v2\\.1\\/drives\\/([^/]*)\\/items\\/([^/]*)(.*)/.exec(pathname);\n if (joinSessionMatch === null) {\n return undefined;\n }\n const driveId = joinSessionMatch[2];\n const itemId = joinSessionMatch[3];\n return { siteUrl: `${url.origin}${url.pathname}`, driveId, itemId };\n }\n}\n/**\n * Inspect the ODSP siteUrl to guess if this document is in SPDF or MSIT, to aid livesite investigations\n * @param urlOnSite - The URL of the site or a resource on the site\n * @returns undefined if the URL doesn't match known SPDF/MSIT patterns, \"SPDF\" if it's SPDF, \"MSIT\" if it's MSIT\n */\nexport function checkForKnownServerFarmType(urlOnSite) {\n const domain = new URL(urlOnSite).hostname.toLowerCase();\n if (domain.endsWith(\".sharepoint-df.com\")) {\n return \"SPDF\";\n }\n else if (domain === \"microsoft.sharepoint.com\" ||\n domain === \"microsoft-my.sharepoint.com\") {\n return \"MSIT\";\n }\n return undefined;\n}\n//# sourceMappingURL=odspUrlHelper.js.map","/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\nimport { assert } from \"@fluidframework/core-utils/internal\";\nimport { DriverHeader, } from \"@fluidframework/driver-definitions/internal\";\nimport { NonRetryableError } from \"@fluidframework/driver-utils/internal\";\nimport { OdspErrorTypes, } from \"@fluidframework/odsp-driver-definitions/internal\";\nimport { ClpCompliantAppHeader } from \"./contractsPublic.js\";\nimport { createOdspUrl } from \"./createOdspUrl.js\";\nimport { getHashedDocumentId } from \"./odspPublicUtils.js\";\nimport { getApiRoot } from \"./odspUrlHelper.js\";\nimport { getOdspResolvedUrl } from \"./odspUtils.js\";\nimport { pkgVersion } from \"./packageVersion.js\";\nfunction getUrlBase(siteUrl, driveId, itemId, fileVersion) {\n const version = fileVersion ? `versions/${fileVersion}/` : \"\";\n return `${getApiRoot(new URL(siteUrl))}/drives/${driveId}/items/${itemId}/${version}`;\n}\nfunction getSnapshotUrl(siteUrl, driveId, itemId, fileVersion) {\n const urlBase = getUrlBase(siteUrl, driveId, itemId, fileVersion);\n return `${urlBase}opStream/snapshots`;\n}\nfunction getAttachmentPOSTUrl(siteUrl, driveId, itemId, fileVersion) {\n const urlBase = getUrlBase(siteUrl, driveId, itemId, fileVersion);\n return `${urlBase}opStream/attachment`;\n}\nfunction getAttachmentGETUrl(siteUrl, driveId, itemId, fileVersion) {\n const urlBase = getUrlBase(siteUrl, driveId, itemId, fileVersion);\n return `${urlBase}opStream/attachments`;\n}\nfunction getDeltaStorageUrl(siteUrl, driveId, itemId, fileVersion) {\n const urlBase = getUrlBase(siteUrl, driveId, itemId, fileVersion);\n return `${urlBase}opStream`;\n}\n/**\n * Utility that enables us to handle paths provided with a beginning slash.\n * For example if a value of '/id1/id2' is provided, id1/id2 is returned.\n */\nfunction removeBeginningSlash(str) {\n if (str.startsWith(\"/\")) {\n return str.slice(1);\n }\n return str;\n}\n// back-compat: GitHub #9653\nconst isFluidPackage = (pkg) => typeof pkg === \"object\" && typeof pkg?.name === \"string\" && typeof pkg?.fluid === \"object\";\n/**\n * Resolver to resolve urls like the ones created by createOdspUrl which is driver inner\n * url format. Ex: `${siteUrl}?driveId=${driveId}&itemId=${itemId}&path=${path}`\n * @legacy\n * @alpha\n */\nexport class OdspDriverUrlResolver {\n constructor() { }\n /**\n * {@inheritDoc @fluidframework/driver-definitions#IUrlResolver.resolve}\n */\n async resolve(request) {\n if (request.headers?.[DriverHeader.createNew]) {\n const [siteURL, queryString] = request.url.split(\"?\");\n const searchParams = new URLSearchParams(queryString);\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access\n const fileName = request.headers[DriverHeader.createNew].fileName;\n const driveID = searchParams.get(\"driveId\");\n const filePath = searchParams.get(\"path\");\n const packageName = searchParams.get(\"containerPackageName\");\n // eslint-disable-next-line @typescript-eslint/prefer-optional-chain -- false positive\n if (!(fileName && siteURL && driveID && filePath !== null && filePath !== undefined)) {\n throw new NonRetryableError(\"Proper new file params should be there\", OdspErrorTypes.genericError, { driverVersion: pkgVersion });\n }\n return {\n endpoints: {\n snapshotStorageUrl: \"\",\n attachmentGETStorageUrl: \"\",\n attachmentPOSTStorageUrl: \"\",\n deltaStorageUrl: \"\",\n },\n tokens: {},\n type: \"fluid\",\n odspResolvedUrl: true,\n id: \"odspCreateNew\",\n url: `https://${siteURL}?${queryString}&version=null`,\n siteUrl: siteURL,\n hashedDocumentId: \"\",\n driveId: driveID,\n itemId: \"\",\n fileName,\n summarizer: false,\n codeHint: {\n containerPackageName: packageName ?? undefined,\n },\n fileVersion: undefined,\n shareLinkInfo: undefined,\n isClpCompliantApp: request.headers?.[ClpCompliantAppHeader.isClpCompliantApp],\n };\n }\n const { siteUrl, driveId, itemId, path, containerPackageName, fileVersion } = decodeOdspUrl(request.url);\n const hashedDocumentId = await getHashedDocumentId(driveId, itemId);\n assert(!hashedDocumentId.includes(\"/\"), 0x0a8 /* \"Docid should not contain slashes!!\" */);\n const documentUrl = `https://placeholder/placeholder/${hashedDocumentId}/${removeBeginningSlash(path)}`;\n const summarizer = !!request.headers?.[DriverHeader.summarizingClient];\n return {\n type: \"fluid\",\n odspResolvedUrl: true,\n endpoints: {\n snapshotStorageUrl: getSnapshotUrl(siteUrl, driveId, itemId, fileVersion),\n attachmentPOSTStorageUrl: getAttachmentPOSTUrl(siteUrl, driveId, itemId, fileVersion),\n attachmentGETStorageUrl: getAttachmentGETUrl(siteUrl, driveId, itemId, fileVersion),\n deltaStorageUrl: getDeltaStorageUrl(siteUrl, driveId, itemId, fileVersion),\n },\n id: hashedDocumentId,\n tokens: {},\n url: documentUrl,\n hashedDocumentId,\n siteUrl,\n driveId,\n itemId,\n dataStorePath: path,\n fileName: \"\",\n summarizer,\n codeHint: {\n containerPackageName,\n },\n fileVersion,\n isClpCompliantApp: request.headers?.[ClpCompliantAppHeader.isClpCompliantApp],\n };\n }\n /**\n * Requests a driver + data store storage URL.\n * @param resolvedUrl - The driver resolved URL.\n * @param relativeUrl - The relative data store path URL.\n * For requesting a driver URL, this value should always be '/'. If an empty string is passed, then dataStorePath\n * will be extracted from the resolved url if present.\n * @param packageInfoSource - optional, represents container package information to be included in url.\n */\n async getAbsoluteUrl(resolvedUrl, relativeUrl, packageInfoSource) {\n const odspResolvedUrl = getOdspResolvedUrl(resolvedUrl);\n let dataStorePath = relativeUrl;\n if (relativeUrl === \"\" && odspResolvedUrl.dataStorePath !== undefined) {\n // If the user has passed an empty dataStorePath, then extract it from the resolved url.\n dataStorePath = odspResolvedUrl.dataStorePath;\n }\n if (dataStorePath.startsWith(\"/\")) {\n dataStorePath = dataStorePath.slice(1);\n }\n let containerPackageName;\n if (packageInfoSource && \"name\" in packageInfoSource) {\n containerPackageName = packageInfoSource.name;\n // packageInfoSource is cast to any as it is typed to IContainerPackageInfo instead of IFluidCodeDetails\n // TODO: use stronger type\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-explicit-any\n }\n else if (isFluidPackage(packageInfoSource?.package)) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-explicit-any\n containerPackageName = packageInfoSource?.package.name;\n }\n else {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-explicit-any\n containerPackageName = packageInfoSource?.package;\n }\n containerPackageName =\n containerPackageName ?? odspResolvedUrl.codeHint?.containerPackageName;\n return createOdspUrl({\n ...odspResolvedUrl,\n containerPackageName,\n dataStorePath,\n });\n }\n}\nexport function decodeOdspUrl(url) {\n const [siteUrl, queryString] = url.split(\"?\");\n const searchParams = new URLSearchParams(queryString);\n const driveId = searchParams.get(\"driveId\");\n const itemId = searchParams.get(\"itemId\");\n const path = searchParams.get(\"path\");\n const containerPackageName = searchParams.get(\"containerPackageName\");\n const fileVersion = searchParams.get(\"fileVersion\");\n if (driveId === null) {\n throw new Error(\"ODSP URL did not contain a drive id\");\n }\n if (itemId === null) {\n throw new Error(\"ODSP Url did not contain an item id\");\n }\n if (path === null) {\n throw new Error(\"ODSP Url did not contain a path\");\n }\n return {\n siteUrl,\n driveId: decodeURIComponent(driveId),\n itemId: decodeURIComponent(itemId),\n path: decodeURIComponent(path),\n containerPackageName: containerPackageName\n ? decodeURIComponent(containerPackageName)\n : undefined,\n fileVersion: fileVersion ? decodeURIComponent(fileVersion) : undefined,\n };\n}\n//# sourceMappingURL=odspDriverUrlResolver.js.map","/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\nimport { IsoBuffer, hashFile } from \"@fluid-internal/client-utils\";\n/**\n * Creates a unique and stable id for a document stored in ODSP which doesn't expose the driveId and itemId of\n * said document.\n *\n * @legacy\n * @alpha\n */\nexport async function getHashedDocumentId(driveId, itemId) {\n const buffer = IsoBuffer.from(`${driveId}_${itemId}`);\n return encodeURIComponent(await hashFile(buffer, \"SHA-256\", \"base64\"));\n}\n//# sourceMappingURL=odspPublicUtils.js.map","/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n/**\n * Handles garbage collection of expiring cache entries.\n * Not exported.\n */\nclass GarbageCollector {\n constructor(expiry, cleanup) {\n this.expiry = expiry;\n this.cleanup = cleanup;\n this.gcTimeouts = new Map();\n }\n /**\n * Schedule GC for the given key, as applicable\n */\n schedule(key) {\n if (this.expiry.policy !== \"indefinite\") {\n this.gcTimeouts.set(key, setTimeout(() => {\n this.cleanup(key);\n this.cancel(key);\n }, this.expiry.durationMs));\n }\n }\n /**\n * Cancel any pending GC for the given key\n */\n cancel(key) {\n const timeout = this.gcTimeouts.get(key);\n if (timeout !== undefined) {\n clearTimeout(timeout);\n this.gcTimeouts.delete(key);\n }\n }\n /**\n * Update any pending GC for the given key, as applicable\n */\n update(key) {\n // Cancel/reschedule new GC if the policy is sliding\n if (this.expiry.policy === \"sliding\") {\n this.cancel(key);\n this.schedule(key);\n }\n }\n}\n/**\n * A specialized cache for async work, allowing you to safely cache the promised result of some async work\n * without fear of running it multiple times or losing track of errors.\n * @legacy\n * @alpha\n */\nexport class PromiseCache {\n /**\n * Create the PromiseCache with the given options, with the following defaults:\n *\n * expiry: indefinite, removeOnError: true for all errors\n */\n constructor({ expiry = { policy: \"indefinite\" }, removeOnError = () => true, } = {}) {\n this.cache = new Map();\n this.removeOnError = removeOnError;\n this.gc = new GarbageCollector(expiry, (key) => this.remove(key));\n }\n /**\n * Check if there's anything cached at the given key\n */\n has(key) {\n return this.cache.has(key);\n }\n /**\n * Get the Promise for the given key, or undefined if it's not found.\n * Extend expiry if applicable.\n */\n get(key) {\n if (this.has(key)) {\n this.gc.update(key);\n }\n return this.cache.get(key);\n }\n /**\n * Remove the Promise for the given key, returning true if it was found and removed\n */\n remove(key) {\n this.gc.cancel(key);\n return this.cache.delete(key);\n }\n /**\n * Try to add the result of the given asyncFn, without overwriting an existing cache entry at that key.\n * Returns a Promise for the added or existing async work being done at that key.\n * @param key - key name where to store the async work\n * @param asyncFn - the async work to do and store, if not already in progress under the given key\n */\n async addOrGet(key, asyncFn) {\n // NOTE: Do not await the Promise returned by asyncFn!\n // Let the caller do so once we return or after a subsequent call to get\n let promise = this.get(key);\n if (promise === undefined) {\n // Wrap in an async lambda in case asyncFn disabled @typescript-eslint/promise-function-async\n const safeAsyncFn = async () => asyncFn();\n // Start the async work and put the Promise in the cache\n promise = safeAsyncFn();\n this.cache.set(key, promise);\n // If asyncFn throws, we may remove the Promise from the cache\n promise.catch((error) => {\n if (this.removeOnError(error)) {\n this.remove(key);\n }\n });\n this.gc.schedule(key);\n }\n return promise;\n }\n /**\n * Try to add the result of the given asyncFn, without overwriting an existing cache entry at that key.\n * Returns false if the cache already contained an entry at that key, and true otherwise.\n * @param key - key name where to store the async work\n * @param asyncFn - the async work to do and store, if not already in progress under the given key\n */\n add(key, asyncFn) {\n const alreadyPresent = this.has(key);\n // We are blindly adding the Promise to the cache here, which introduces a Promise in this scope.\n // Swallow Promise rejections here, since whoever gets this out of the cache to use it will await/catch.\n this.addOrGet(key, asyncFn).catch(() => { });\n return !alreadyPresent;\n }\n /**\n * Try to add the given value, without overwriting an existing cache entry at that key.\n * Returns a Promise for the added or existing async work being done at that key.\n * @param key - key name where to store the async work\n * @param value - value to store\n */\n async addValueOrGet(key, value) {\n return this.addOrGet(key, async () => value);\n }\n /**\n * Try to add the given value, without overwriting an existing cache entry at that key.\n * Returns false if the cache already contained an entry at that key, and true otherwise.\n * @param key - key name where to store the value\n * @param value - value to store\n */\n addValue(key, value) {\n return this.add(key, async () => value);\n }\n}\n//# sourceMappingURL=promiseCache.js.map","/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\nimport { assert } from \"@fluidframework/core-utils/internal\";\nexport function getHeadersWithAuth(\n// eslint-disable-next-line @rushstack/no-new-null\nauthHeader) {\n assert(!!authHeader, 0x936 /* authHeader should not be null or empty */);\n return {\n Authorization: authHeader,\n };\n}\n//# sourceMappingURL=getUrlAndHeadersWithAuth.js.map","/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n/**\n * A special key used to store the original function in a {@link Mockable | mockable} function.\n * @remarks Use {@link mockify | `mockify.key`} as a convenient way to access this key.\n */\nexport const mockifyMockKey = Symbol(\"`mockify` mock function key\");\n/**\n * Decorates a function to allow it to be mocked.\n * @param fn - The function that will become mockable.\n * @returns A function with a {@link mockifyMockKey | special property } that can be overwritten to mock the original function.\n * By default, this property is set to the original function.\n * If overwritten with a new function, the new function will be called instead of the original.\n * @example\n * ```typescript\n * const original = () => console.log(\"original\");\n * const mockable = mockify(original);\n * mockable(); // logs \"original\"\n * mockable[mockify.key] = () => console.log(\"mocked\");\n * mockable(); // logs \"mocked\"\n * mockable[mockify.key] = original;\n * mockable(); // logs \"original\"\n * ```\n *\n * This pattern is useful for mocking top-level exported functions in a module.\n * For example,\n * ```typescript\n * export function fn() { /* ... * / }\n * ```\n * becomes\n * ```typescript\n * import { mockify } from \"./mockify.js\";\n * export const fn = mockify(() => { /* ... * / });\n * ```\n * and can now be mocked by another module that imports it.\n * ```typescript\n * import * as sinon from \"sinon\";\n * import { mockify } from \"./mockify.js\";\n * import { fn } from \"./module.js\";\n * sinon.stub(fn, mockify.key).callsFake(() => {\n * // ... mock function implementation ...\n * });\n * // ...\n * sinon.restore();\n * ```\n */\nexport function mockify(fn) {\n const mockable = (...args) => {\n return mockable[mockifyMockKey](...args);\n };\n mockable[mockifyMockKey] = fn;\n return mockable;\n}\nmockify.key = mockifyMockKey;\n//# sourceMappingURL=mockify.js.map","/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\nimport { assert, Deferred } from \"@fluidframework/core-utils/internal\";\nimport { LocationRedirectionError, NonRetryableError, RateLimiter, ThrottlingError, } from \"@fluidframework/driver-utils/internal\";\nimport { OdspErrorTypes, maximumCacheDurationMs, snapshotKey, snapshotWithLoadingGroupIdKey, } from \"@fluidframework/odsp-driver-definitions/internal\";\nimport { PerformanceEvent, isFluidError, loggerToMonitoringContext, normalizeError, wrapError, } from \"@fluidframework/telemetry-utils/internal\";\nimport { v4 as uuid } from \"uuid\";\nimport { persistedCacheValueVersion } from \"./contracts.js\";\nimport { ClpCompliantAppHeader } from \"./contractsPublic.js\";\nimport { patchOdspResolvedUrl } from \"./odspLocationRedirection.js\";\nimport { fetchAndParseAsJSONHelper, fetchArray, fetchHelper, getOdspResolvedUrl, } from \"./odspUtils.js\";\nimport { pkgVersion as driverVersion } from \"./packageVersion.js\";\nexport const Odsp409Error = \"Odsp409Error\";\n/**\n * In ODSP, the concept of \"epoch\" refers to binary updates to files. For example, this might include using\n * version restore, or if the user downloads a Fluid file and then uploads it again. These result in the epoch\n * value being incremented.\n *\n * The implications of these binary updates is that the Fluid state is disrupted: the sequence number might\n * go backwards, the data might be inconsistent with the latest state of collaboration, etc. As a result, it's\n * not safe to continue collaboration across an epoch change. We need to detect these epoch changes and\n * error out from the collaboration.\n *\n * This class is a wrapper around fetch calls. It adds epoch to the request made so that the\n * server can match it with its epoch value in order to match the version.\n * It also validates the epoch value received in response of fetch calls. If the epoch does not match,\n * then it also clears all the cached entries for the given container.\n * @legacy\n * @alpha\n */\nexport class EpochTracker {\n constructor(cache, fileEntry, logger, clientIsSummarizer) {\n this.cache = cache;\n this.fileEntry = fileEntry;\n this.logger = logger;\n this.clientIsSummarizer = clientIsSummarizer;\n this.driverId = uuid();\n // This tracks the request number made by the driver instance.\n this.networkCallNumber = 1;\n // Limits the max number of concurrent requests to 24.\n this.rateLimiter = new RateLimiter(24);\n // Matches the TestOverride logic for the policy defined in odspDocumentStorageServiceBase.ts\n this.snapshotCacheExpiryTimeoutMs = loggerToMonitoringContext(logger).config.getBoolean(\"Fluid.Driver.Odsp.TestOverride.DisableSnapshotCache\")\n ? 0\n : maximumCacheDurationMs;\n }\n // public for UT purposes only!\n setEpoch(epoch, fromCache, fetchType) {\n assert(this._fluidEpoch === undefined, 0x1db /* \"epoch exists\" */);\n this._fluidEpoch = epoch;\n this.logger.sendTelemetryEvent({\n eventName: \"EpochLearnedFirstTime\",\n epoch,\n fetchType,\n fromCache,\n });\n }\n // TODO: return a stronger type\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n async get(entry) {\n try {\n // Return undefined so that the ops/snapshots are grabbed from the server instead of the cache\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n const value = await this.cache.get(this.fileEntryFromEntry(entry));\n // Version mismatch between what the runtime expects and what it recieved.\n // The cached value should not be used\n if (value === undefined || value.version !== persistedCacheValueVersion) {\n return undefined;\n }\n assert(value.fluidEpoch !== undefined, 0x1dc /* \"all entries have to have epoch\" */);\n if (this._fluidEpoch === undefined) {\n this.setEpoch(value.fluidEpoch, true, \"cache\");\n // Epoch mismatch, the cached value is considerably different from what the current state of\n // the runtime and should not be used\n }\n else if (this._fluidEpoch !== value.fluidEpoch) {\n return undefined;\n }\n // Expire the cached snapshot if it's older than snapshotCacheExpiryTimeoutMs and immediately\n // expire all old caches that do not have cacheEntryTime\n if (entry.type === snapshotKey || entry.type === snapshotWithLoadingGroupIdKey) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access\n const cacheTime = value.value?.cacheEntryTime;\n const currentTime = Date.now();\n if (cacheTime === undefined ||\n currentTime - cacheTime >= this.snapshotCacheExpiryTimeoutMs) {\n this.logger.sendTelemetryEvent({\n eventName: \"odspVersionsCacheExpired\",\n duration: currentTime - cacheTime,\n maxCacheAgeMs: this.snapshotCacheExpiryTimeoutMs,\n });\n await this.removeEntries();\n return undefined;\n }\n }\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n return value.value;\n }\n catch (error) {\n this.logger.sendErrorEvent({ eventName: \"cacheFetchError\", type: entry.type }, error);\n return undefined;\n }\n }\n // TODO: take a stronger type or `unknown`\n // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any\n async put(entry, value) {\n assert(this._fluidEpoch !== undefined, 0x1dd /* \"no epoch\" */);\n // For snapshots, the value should have the cacheEntryTime.\n // This will be used to expire snapshots older than snapshotCacheExpiryTimeoutMs.\n if (entry.type === snapshotKey || entry.type === snapshotWithLoadingGroupIdKey) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access\n value.cacheEntryTime = value.cacheEntryTime ?? Date.now();\n }\n const data = {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n value,\n version: persistedCacheValueVersion,\n fluidEpoch: this._fluidEpoch,\n };\n return this.cache.put(this.fileEntryFromEntry(entry), data).catch((error) => {\n this.logger.sendErrorEvent({ eventName: \"cachePutError\", type: entry.type }, error);\n throw error;\n });\n }\n async removeEntries() {\n try {\n return await this.cache.removeEntries(this.fileEntry);\n }\n catch (error) {\n this.logger.sendErrorEvent({ eventName: \"removeCacheEntries\" }, error);\n }\n }\n get fluidEpoch() {\n return this._fluidEpoch;\n }\n async validateEpoch(epoch, fetchType) {\n assert(epoch !== undefined, 0x584 /* response should contain epoch */);\n try {\n this.validateEpochFromResponse(epoch, fetchType);\n }\n catch (error) {\n await this.checkForEpochError(error, epoch, fetchType);\n throw error;\n }\n }\n /**\n * Api to fetch the response for given request and parse it as json.\n * @param url - url of the request\n * @param fetchOptions - fetch options for request containing body, headers etc.\n * @param fetchType - method for which fetch is called.\n * @param addInBody - Pass True if caller wants to add epoch in post body.\n * @param fetchReason - fetch reason to add to the request.\n */\n async fetchAndParseAsJSON(url, fetchOptions, fetchType, addInBody = false, fetchReason) {\n return this.fetchCore(url, fetchOptions, fetchAndParseAsJSONHelper, fetchType, addInBody, fetchReason);\n }\n /**\n * Api to fetch the response for given request and parse it as json.\n * @param url - url of the request\n * @param fetchOptions - fetch options for request containing body, headers etc.\n * @param fetchType - method for which fetch is called.\n * @param addInBody - Pass True if caller wants to add epoch in post body.\n * @param fetchReason - fetch reason to add to the request.\n */\n async fetch(url, fetchOptions, fetchType, addInBody = false, fetchReason) {\n return this.fetchCore(url, fetchOptions, fetchHelper, fetchType, addInBody, fetchReason);\n }\n async fetchCore(url, fetchOptions, fetcher, fetchType, addInBody = false, fetchReason) {\n const clientCorrelationId = this.formatClientCorrelationId(fetchReason);\n // Add epoch in fetch request.\n this.addEpochInRequest(fetchOptions, addInBody, clientCorrelationId);\n let epochFromResponse;\n return this.rateLimiter\n .schedule(async () => fetcher(url, fetchOptions))\n .then((response) => {\n epochFromResponse = response.headers.get(\"x-fluid-epoch\");\n this.validateEpochFromResponse(epochFromResponse, fetchType);\n response.propsToLog.XRequestStatsHeader = clientCorrelationId;\n return response;\n })\n .catch(async (error) => {\n // Get the server epoch from error in case we don't have it as if undefined we won't be able\n // to mark it as epoch error.\n if (epochFromResponse === undefined) {\n epochFromResponse = error.serverEpoch;\n }\n await this.checkForEpochError(error, epochFromResponse, fetchType);\n throw error;\n })\n .catch((error) => {\n // If the error is about location redirection, then we need to generate new resolved url with correct\n // location info.\n if (isFluidError(error) &&\n error.errorType === OdspErrorTypes.fileNotFoundOrAccessDeniedError) {\n const redirectLocation = error.redirectLocation;\n if (redirectLocation !== undefined) {\n const redirectUrl = patchOdspResolvedUrl(this.fileEntry.resolvedUrl, redirectLocation);\n const locationRedirectionError = new LocationRedirectionError(error.message, redirectUrl, { driverVersion, redirectLocation });\n locationRedirectionError.addTelemetryProperties(error.getTelemetryProperties());\n throw locationRedirectionError;\n }\n }\n throw error;\n })\n .catch((error) => {\n const fluidError = normalizeError(error, {\n props: { XRequestStatsHeader: clientCorrelationId },\n });\n throw fluidError;\n });\n }\n /**\n * Api to fetch the response as it is for given request.\n * @param url - url of the request\n * @param fetchOptions - fetch options for request containing body, headers etc.\n * @param fetchType - method for which fetch is called.\n * @param addInBody - Pass True if caller wants to add epoch in post body.\n * @param fetchReason - fetch reason to add to the request.\n */\n async fetchArray(url, fetchOptions, fetchType, addInBody = false, fetchReason) {\n return this.fetchCore(url, fetchOptions, fetchArray, fetchType, addInBody, fetchReason);\n }\n addEpochInRequest(fetchOptions, addInBody, clientCorrelationId) {\n const isClpCompliantApp = getOdspResolvedUrl(this.fileEntry.resolvedUrl).isClpCompliantApp;\n if (addInBody) {\n const headers = {};\n headers[\"X-RequestStats\"] = clientCorrelationId;\n if (this.fluidEpoch !== undefined) {\n headers[\"x-fluid-epoch\"] = this.fluidEpoch;\n }\n if (isClpCompliantApp) {\n headers[ClpCompliantAppHeader.isClpCompliantApp] = isClpCompliantApp.toString();\n }\n this.addParamInBody(fetchOptions, headers);\n }\n else {\n const addHeader = (key, val) => {\n fetchOptions.headers = {\n ...fetchOptions.headers,\n };\n assert(fetchOptions.headers !== undefined, 0x282 /* \"Headers should be present now\" */);\n fetchOptions.headers[key] = val;\n };\n addHeader(\"X-RequestStats\", clientCorrelationId);\n if (this.fluidEpoch !== undefined) {\n addHeader(\"x-fluid-epoch\", this.fluidEpoch);\n }\n if (isClpCompliantApp) {\n addHeader(ClpCompliantAppHeader.isClpCompliantApp, isClpCompliantApp.toString());\n }\n }\n }\n addParamInBody(fetchOptions, headers) {\n // We use multi part form request for post body where we want to use this.\n // So extract the form boundary to mark the end of form.\n const body = fetchOptions.body;\n assert(typeof body === \"string\", 0x21d /* \"body is not string\" */);\n const splitBody = body.split(\"\\r\\n\");\n const firstLine = splitBody.shift();\n assert(firstLine?.startsWith(\"--\") === true, 0x21e /* \"improper boundary format\" */);\n const formParams = [firstLine];\n for (const [key, value] of Object.entries(headers)) {\n formParams.push(`${key}: ${value}`);\n }\n for (const value of splitBody) {\n formParams.push(value);\n }\n fetchOptions.body = formParams.join(\"\\r\\n\");\n }\n formatClientCorrelationId(fetchReason) {\n const items = [\n `driverId=${this.driverId}`,\n `RequestNumber=${this.networkCallNumber++}`,\n `driverVersion=${driverVersion}`,\n `isSummarizer=${this.clientIsSummarizer}`,\n ];\n if (fetchReason !== undefined) {\n items.push(`fetchReason=${fetchReason}`);\n }\n return items.join(\", \");\n }\n validateEpochFromResponse(epochFromResponse, fetchType, fromCache = false) {\n const error = this.checkForEpochErrorCore(epochFromResponse);\n if (error !== undefined) {\n throw error;\n }\n if (epochFromResponse !== undefined && this._fluidEpoch === undefined) {\n this.setEpoch(epochFromResponse, fromCache, fetchType);\n }\n }\n async checkForEpochError(error, epochFromResponse, fetchType, fromCache = false) {\n if (isFluidError(error) && error.errorType === OdspErrorTypes.fileOverwrittenInStorage) {\n const epochError = this.checkForEpochErrorCore(epochFromResponse);\n if (epochError !== undefined) {\n epochError.addTelemetryProperties({\n fromCache,\n fetchType,\n });\n this.logger.sendErrorEvent({ eventName: \"fileOverwrittenInStorage\" }, epochError);\n // If the epoch mismatches, then clear all entries for such file entry from cache.\n await this.removeEntries();\n throw epochError;\n }\n // If it was categorized as epoch error but the epoch returned in response matches with the client epoch\n // then it was coherency 409, so rethrow it as throttling error so that it can retried. Default throttling\n // time is 1s.\n const newError = wrapError(error, (message) => {\n return new ThrottlingError(`Coherency 409: ${message}`, 1 /* retryAfterSeconds */, {\n [Odsp409Error]: true,\n driverVersion,\n });\n });\n throw newError;\n }\n }\n checkForEpochErrorCore(epochFromResponse) {\n // If epoch is undefined, then don't compare it because initially for createNew or TreesLatest\n // initializes this value. Sometimes response does not contain epoch as it is still in\n // implementation phase at server side. In that case also, don't compare it with our epoch value.\n if (this.fluidEpoch && epochFromResponse && this.fluidEpoch !== epochFromResponse) {\n // This is similar in nature to how fluidEpochMismatchError (409) is handled.\n // Difference - client detected mismatch, instead of server detecting it.\n return new NonRetryableError(\"Epoch mismatch\", OdspErrorTypes.fileOverwrittenInStorage, {\n driverVersion,\n serverEpoch: epochFromResponse,\n clientEpoch: this.fluidEpoch,\n });\n }\n }\n fileEntryFromEntry(entry) {\n return { ...entry, file: this.fileEntry };\n }\n}\nexport class EpochTrackerWithRedemption extends EpochTracker {\n constructor(cache, fileEntry, logger, clientIsSummarizer) {\n super(cache, fileEntry, logger, clientIsSummarizer);\n this.cache = cache;\n this.fileEntry = fileEntry;\n this.logger = logger;\n this.clientIsSummarizer = clientIsSummarizer;\n this.treesLatestDeferral = new Deferred();\n // Handles the rejected promise within treesLatestDeferral.\n this.treesLatestDeferral.promise.catch(() => { });\n }\n validateEpochFromResponse(epochFromResponse, fetchType, fromCache = false) {\n super.validateEpochFromResponse(epochFromResponse, fetchType, fromCache);\n // Any successful call means we have access to a file, i.e. any redemption that was required already happened.\n // That covers cases of \"treesLatest\" as well as \"getVersions\" or \"createFile\" - all the ways we can start\n // exploring a file.\n this.treesLatestDeferral.resolve();\n }\n // TODO: return a stronger type\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n async get(entry) {\n let result = super.get(entry);\n // equivalence of what happens in fetchAndParseAsJSON()\n if (entry.type === snapshotKey || entry.type === snapshotWithLoadingGroupIdKey) {\n result = result\n .then((value) => {\n // If there is nothing in cache, we need to wait for network call to complete (and do redemption)\n // Otherwise file was redeemed in prior session, so if joinSession failed, we should not retry\n if (value !== undefined) {\n this.treesLatestDeferral.resolve();\n }\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return\n return value;\n })\n .catch((error) => {\n this.treesLatestDeferral.reject(error);\n throw error;\n });\n }\n return result;\n }\n async fetchAndParseAsJSON(url, fetchOptions, fetchType, addInBody = false, fetchReason) {\n // Optimize the flow if we know that treesLatestDeferral was already completed by the timer we started\n // joinSession call. If we did - there is no reason to repeat the call as it will fail with same error.\n const completed = this.treesLatestDeferral.isCompleted;\n try {\n return await super.fetchAndParseAsJSON(url, fetchOptions, fetchType, addInBody, fetchReason);\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n }\n catch (error) {\n // Only handling here treesLatest. If createFile failed, we should never try to do joinSession.\n // Similar, if getVersions failed, we should not do any further storage calls.\n // So treesLatest is the only call that can have parallel joinSession request.\n if (fetchType === \"treesLatest\") {\n this.treesLatestDeferral.reject(error);\n }\n if (fetchType !== \"joinSession\" ||\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n error.statusCode < 401 ||\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n error.statusCode > 404 ||\n completed) {\n throw error;\n }\n }\n // It is joinSession failing with 401..404 error\n // Repeat after waiting for treeLatest succeeding (or fail if it failed).\n // No special handling after first call - if file has been deleted, then it's game over.\n // Ensure we have some safety here - we do not want to deadlock if we got logic somewhere wrong.\n // If we waited too long, we will log error event and proceed with call.\n // It may result in failure for user, but refreshing document would address it.\n // Thus we use rather long timeout (not to get these failures as much as possible), but not large enough\n // to unblock the process.\n await PerformanceEvent.timedExecAsync(this.logger, { eventName: \"JoinSessionSyncWait\" }, async (event) => {\n const timeoutRes = 51; // anything will work here\n let timer;\n const timeoutP = new Promise((resolve) => {\n timer = setTimeout(() => {\n resolve(timeoutRes);\n }, 15000);\n });\n const res = await Promise.race([\n timeoutP,\n // cancel timeout to unblock UTs (otherwise Node process does not exit for 15 sec)\n this.treesLatestDeferral.promise.finally(() => clearTimeout(timer)),\n ]);\n if (res === timeoutRes) {\n event.cancel();\n }\n }, { start: true, end: true, cancel: \"generic\" });\n return super.fetchAndParseAsJSON(url, fetchOptions, fetchType, addInBody);\n }\n}\nexport function createOdspCacheAndTracker(persistedCacheArg, nonpersistentCache, fileEntry, logger, clientIsSummarizer) {\n const epochTracker = new EpochTrackerWithRedemption(persistedCacheArg, fileEntry, logger, clientIsSummarizer);\n return {\n cache: {\n ...nonpersistentCache,\n persistedCache: epochTracker,\n },\n epochTracker,\n };\n}\n//# sourceMappingURL=epochTracker.js.map","/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\nimport { assert } from \"@fluidframework/core-utils/internal\";\nimport { NonRetryableError, runWithRetry } from \"@fluidframework/driver-utils/internal\";\nimport { OdspErrorTypes, } from \"@fluidframework/odsp-driver-definitions/internal\";\nimport { PerformanceEvent, isFluidError, } from \"@fluidframework/telemetry-utils/internal\";\nimport { getHeadersWithAuth } from \"./getUrlAndHeadersWithAuth.js\";\nimport { mockify } from \"./mockify.js\";\nimport { fetchHelper, getWithRetryForTokenRefresh, toInstrumentedOdspStorageTokenFetcher, } from \"./odspUtils.js\";\nimport { pkgVersion as driverVersion } from \"./packageVersion.js\";\nimport { runWithRetry as runWithRetryForCoherencyAndServiceReadOnlyErrors } from \"./retryUtils.js\";\n// Store cached responses for the lifetime of web session as file link remains the same for given file item\nconst fileLinkCache = new Map();\n/**\n * Returns file link for a file with given drive and item ids.\n * Scope needed: files.readwrite.all.\n * This function keeps retrying if it gets a retriable error or wait for some delay if it gets a\n * throttling error. In future, we are thinking of app allowing to pass some cancel token, with which\n * we would be able to stop retrying.\n * @param getToken - used to fetch access tokens needed to execute operation\n * @param odspUrlParts - object describing file storage identity\n * @param logger - used to log results of operation, including any error\n * @returns Promise which resolves to file link url when successful; otherwise, undefined.\n */\nexport const getFileLink = mockify(async (getToken, resolvedUrl, logger) => {\n const cacheKey = `${resolvedUrl.siteUrl}_${resolvedUrl.driveId}_${resolvedUrl.itemId}`;\n const maybeFileLinkCacheEntry = fileLinkCache.get(cacheKey);\n if (maybeFileLinkCacheEntry !== undefined) {\n return maybeFileLinkCacheEntry;\n }\n const fileLinkGenerator = async function () {\n let fileLinkCore;\n try {\n let retryCount = 0;\n fileLinkCore = await runWithRetry(async () => runWithRetryForCoherencyAndServiceReadOnlyErrors(async () => getFileLinkWithLocationRedirectionHandling(getToken, resolvedUrl, logger), \"getFileLinkCore\", logger), \"getShareLink\", logger, {\n // TODO: use a stronger type\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n onRetry(delayInMs, error) {\n retryCount++;\n if (retryCount === 5) {\n if (error !== undefined && typeof error === \"object\") {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n error.canRetry = false;\n throw error;\n }\n throw error;\n }\n },\n });\n }\n catch (error) {\n // Delete from the cache to permit retrying later.\n fileLinkCache.delete(cacheKey);\n throw error;\n }\n // We are guaranteed to run the getFileLinkCore at least once with successful result (which must be a string)\n assert(fileLinkCore !== undefined, 0x292 /* \"Unexpected undefined result from getFileLinkCore\" */);\n return fileLinkCore;\n };\n const fileLink = fileLinkGenerator();\n fileLinkCache.set(cacheKey, fileLink);\n return fileLink;\n});\n/**\n * Handles location redirection while fulfilling the getFileLink call. We don't want browser to handle\n * the redirection as the browser will retry with same auth token which will not work as we need app\n * to regenerate tokens for the new site domain. So when we will make the network calls below we will set\n * the redirect:manual header to manually handle these redirects.\n * Refer: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/308\n * @param getToken - token fetcher to fetch the token.\n * @param odspUrlParts - parts of odsp resolved url.\n * @param logger - logger to send events.\n * @returns Response from the API call.\n * @legacy\n * @alpha\n */\nasync function getFileLinkWithLocationRedirectionHandling(getToken, resolvedUrl, logger) {\n // We can have chains of location redirection one after the other, so have a for loop\n // so that we can keep handling the same type of error. Set max number of redirection to 5.\n let lastError;\n let locationRedirected = false;\n for (let count = 1; count <= 5; count++) {\n try {\n const fileItem = await getFileItemLite(getToken, resolvedUrl, logger);\n // Sometimes the siteUrl in the actual file is different from the siteUrl in the resolvedUrl due to location\n // redirection. This creates issues in the getSharingInformation call. So we need to update the siteUrl in the\n // resolvedUrl to the siteUrl in the fileItem which is the updated siteUrl.\n const oldSiteDomain = new URL(resolvedUrl.siteUrl).origin;\n const newSiteDomain = new URL(fileItem.sharepointIds.siteUrl).origin;\n if (oldSiteDomain !== newSiteDomain) {\n locationRedirected = true;\n logger.sendTelemetryEvent({\n eventName: \"LocationRedirectionErrorForGetOdspFileLink\",\n retryCount: count,\n });\n renameTenantInOdspResolvedUrl(resolvedUrl, newSiteDomain);\n }\n return await getFileLinkCore(getToken, resolvedUrl, logger, fileItem);\n }\n catch (error) {\n lastError = error;\n // If the getSharingLink call fails with the 401/403/404 error, then it could be due to that the file has moved\n // to another location. This could occur in case we have more than 1 tenant rename. In that case, we should retry\n // the getFileItemLite call to get the updated fileItem.\n if (isFluidError(error) &&\n locationRedirected &&\n (error.errorType === OdspErrorTypes.fileNotFoundOrAccessDeniedError ||\n error.errorType === OdspErrorTypes.authorizationError)) {\n continue;\n }\n throw error;\n }\n }\n throw lastError;\n}\nasync function getFileLinkCore(getToken, odspUrlParts, logger, fileItem) {\n // ODSP link requires extra call to return link that is resistant to file being renamed or moved to different folder\n return PerformanceEvent.timedExecAsync(logger, { eventName: \"odspFileLink\", requestName: \"getSharingInformation\" }, async (event) => {\n let attempts = 0;\n let additionalProps;\n const fileLink = await getWithRetryForTokenRefresh(async (options) => {\n attempts++;\n const getAuthHeader = toInstrumentedOdspStorageTokenFetcher(logger, odspUrlParts, getToken);\n // IMPORTANT: In past we were using GetFileByUrl() API to get to the list item that was corresponding\n // to the file. This was intentionally replaced with GetFileById() to solve the following issue:\n // GetFileByUrl() uses webDavUrl to locate list item. This API does not work for Consumer scenarios\n // where webDavUrl is constructed using legacy ODC format for backward compatibility reasons.\n // GetFileByUrl() does not understand that format and thus fails. GetFileById() relies on file item\n // unique guid (sharepointIds.listItemUniqueId) and it works uniformly across Consumer and Commercial.\n const url = `${odspUrlParts.siteUrl}/_api/web/GetFileById(@a1)/ListItemAllFields/GetSharingInformation?@a1=guid${encodeURIComponent(`'${fileItem.sharepointIds.listItemUniqueId}'`)}`;\n const method = \"POST\";\n const authHeader = await getAuthHeader({ ...options, request: { url, method } }, \"GetFileLinkCore\");\n const headers = getHeadersWithAuth(authHeader);\n const requestInit = {\n method,\n headers: {\n \"Content-Type\": \"application/json;odata=verbose\",\n \"Accept\": \"application/json;odata=verbose\",\n ...headers,\n },\n };\n const response = await fetchHelper(url, requestInit);\n additionalProps = response.propsToLog;\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n const sharingInfo = await response.content.json();\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-unsafe-member-access\n const directUrl = sharingInfo?.d?.directUrl;\n if (typeof directUrl !== \"string\") {\n // This will retry once in getWithRetryForTokenRefresh\n throw new NonRetryableError(\"Malformed GetSharingInformation response\", OdspErrorTypes.incorrectServerResponse, { driverVersion });\n }\n return directUrl;\n });\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n event.end({ ...additionalProps, attempts });\n return fileLink;\n });\n}\nconst isFileItemLite = (maybeFileItemLite) => typeof maybeFileItemLite.webUrl === \"string\" &&\n typeof maybeFileItemLite.webDavUrl === \"string\" &&\n // TODO: stronger check\n typeof maybeFileItemLite.sharepointIds === \"object\";\nasync function getFileItemLite(getToken, odspUrlParts, logger) {\n return PerformanceEvent.timedExecAsync(logger, { eventName: \"odspFileLink\", requestName: \"getFileItemLite\" }, async (event) => {\n let attempts = 0;\n let additionalProps;\n const fileItem = await getWithRetryForTokenRefresh(async (options) => {\n attempts++;\n const { siteUrl, driveId, itemId } = odspUrlParts;\n const getAuthHeader = toInstrumentedOdspStorageTokenFetcher(logger, odspUrlParts, getToken);\n const url = `${siteUrl}/_api/v2.0/drives/${driveId}/items/${itemId}?select=webUrl,webDavUrl,sharepointIds`;\n const method = \"GET\";\n const authHeader = await getAuthHeader({ ...options, request: { url, method } }, \"GetFileItemLite\");\n assert(authHeader !== null, 0x2bc /* \"Instrumented token fetcher with throwOnNullToken =true should never return null\" */);\n const headers = getHeadersWithAuth(authHeader);\n const requestInit = { method, headers };\n const response = await fetchHelper(url, requestInit);\n additionalProps = response.propsToLog;\n const responseJson = await response.content.json();\n if (!isFileItemLite(responseJson)) {\n // This will retry once in getWithRetryForTokenRefresh\n throw new NonRetryableError(\"Malformed getFileItemLite response\", OdspErrorTypes.incorrectServerResponse, { driverVersion });\n }\n return responseJson;\n });\n event.end({ ...additionalProps, attempts });\n return fileItem;\n });\n}\n/**\n * It takes a resolved url with old siteUrl and patches resolved url with updated site url domain.\n * @param odspResolvedUrl - Previous odsp resolved url with older site url.\n * @param newSiteDomain - New site domain after the tenant rename.\n */\nfunction renameTenantInOdspResolvedUrl(odspResolvedUrl, newSiteDomain) {\n const newSiteUrl = `${newSiteDomain}${new URL(odspResolvedUrl.siteUrl).pathname}`;\n odspResolvedUrl.siteUrl = newSiteUrl;\n if (odspResolvedUrl.endpoints.attachmentGETStorageUrl) {\n odspResolvedUrl.endpoints.attachmentGETStorageUrl = `${newSiteDomain}${new URL(odspResolvedUrl.endpoints.attachmentGETStorageUrl).pathname}`;\n }\n if (odspResolvedUrl.endpoints.attachmentPOSTStorageUrl) {\n odspResolvedUrl.endpoints.attachmentPOSTStorageUrl = `${newSiteDomain}${new URL(odspResolvedUrl.endpoints.attachmentPOSTStorageUrl).pathname}`;\n }\n if (odspResolvedUrl.endpoints.deltaStorageUrl) {\n odspResolvedUrl.endpoints.deltaStorageUrl = `${newSiteDomain}${new URL(odspResolvedUrl.endpoints.deltaStorageUrl).pathname}`;\n }\n if (odspResolvedUrl.endpoints.snapshotStorageUrl) {\n odspResolvedUrl.endpoints.snapshotStorageUrl = `${newSiteDomain}${new URL(odspResolvedUrl.endpoints.snapshotStorageUrl).pathname}`;\n }\n}\n//# sourceMappingURL=getFileLink.js.map","/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\nimport { performanceNow } from \"@fluid-internal/client-utils\";\nimport { delay } from \"@fluidframework/core-utils/internal\";\nimport { canRetryOnError, getRetryDelayFromError, } from \"@fluidframework/driver-utils/internal\";\nimport { OdspErrorTypes } from \"@fluidframework/odsp-driver-definitions/internal\";\nimport { Odsp409Error } from \"./epochTracker.js\";\n/**\n * This method retries only for retriable coherency and service read only errors.\n */\nexport async function runWithRetry(api, callName, logger, checkDisposed) {\n let retryAfter = 1000;\n const start = performanceNow();\n let lastError;\n for (let attempts = 1;; attempts++) {\n if (checkDisposed !== undefined) {\n checkDisposed();\n }\n try {\n const result = await api();\n if (attempts > 1) {\n logger.sendTelemetryEvent({\n eventName: \"MultipleRetries\",\n callName,\n attempts,\n duration: performanceNow() - start,\n }, lastError);\n }\n return result;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n }\n catch (error) {\n const canRetry = canRetryOnError(error);\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n const coherencyError = error?.[Odsp409Error] === true;\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n const serviceReadonlyError = error?.errorType === OdspErrorTypes.serviceReadOnly;\n // logging the first failed retry instead of every attempt. We want to avoid filling telemetry\n // when we have tight loop of retrying in offline mode, but we also want to know what caused\n // the failure in the first place\n if (attempts === 1) {\n logger.sendTelemetryEvent({\n eventName: `${callName}_firstFailed`,\n callName,\n attempts,\n duration: performanceNow() - start, // record total wait time.\n }, error);\n }\n // Retry for retriable 409 coherency errors or serviceReadOnly errors. These errors are always retriable\n // unless someone specifically set canRetry = false on the error like in fetchSnapshot() flow. So in\n // that case don't retry.\n if (!((coherencyError || serviceReadonlyError) && canRetry)) {\n throw error;\n }\n // SPO itself does number of retries internally before returning 409 to client.\n // That multiplied to 5 suggests need to reconsider current design, as client spends\n // too much time / bandwidth doing the same thing without any progress.\n if (attempts === 5) {\n logger.sendErrorEvent({\n eventName: coherencyError\n ? \"CoherencyErrorTooManyRetries\"\n : \"ServiceReadonlyErrorTooManyRetries\",\n callName,\n attempts,\n duration: performanceNow() - start, // record total wait time.\n }, error);\n // Fail hard.\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n error.canRetry = false;\n throw error;\n }\n retryAfter = getRetryDelayFromError(error) ?? retryAfter;\n await delay(Math.floor(retryAfter));\n retryAfter += (retryAfter / 4) * (1 + Math.random());\n lastError = error;\n }\n }\n}\n//# sourceMappingURL=retryUtils.js.map","/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\nimport { PromiseCache } from \"@fluidframework/core-utils/internal\";\nimport { SharingLinkHeader } from \"./contractsPublic.js\";\nimport { createOdspUrl } from \"./createOdspUrl.js\";\nimport { getFileLink } from \"./getFileLink.js\";\nimport { OdspDriverUrlResolver } from \"./odspDriverUrlResolver.js\";\nimport { getLocatorFromOdspUrl, locatorQueryParamName, storeLocatorInOdspUrl, } from \"./odspFluidFileLink.js\";\nimport { appendNavParam, createOdspLogger, getOdspResolvedUrl, getContainerPackageName, } from \"./odspUtils.js\";\n/**\n * Resolver to resolve urls like the ones created by createOdspUrl which is driver inner\n * url format and the ones which have things like driveId, siteId, itemId etc encoded in nav param.\n * This resolver also handles share links and try to generate one for the use by the app.\n * @legacy\n * @alpha\n */\nexport class OdspDriverUrlResolverForShareLink {\n /**\n * Creates url resolver instance\n * @param shareLinkFetcherProps - properties used when fetching share link.\n * Can be set as 'undefined' for cases where share link is not needed. Currently, only\n * getAbsoluteUrl() method requires share link.\n * @param logger - logger object that is used as telemetry sink\n * @param appName - application name hint that is encoded with url produced by getAbsoluteUrl() method.\n * This hint is used by link handling logic which determines which app to redirect to when user\n * navigates directly to the link.\n * @param getContext - callback function which is used to get context for given resolved url. If context\n * is returned then it will be embedded into url returned by getAbsoluteUrl() method.\n * @param containerPackageInfo - container package information which will be used to extract the container package name.\n */\n constructor(shareLinkFetcherProps, logger, appName, getContext, containerPackageInfo) {\n this.appName = appName;\n this.getContext = getContext;\n this.containerPackageInfo = containerPackageInfo;\n this.sharingLinkCache = new PromiseCache();\n this.logger = createOdspLogger(logger);\n if (shareLinkFetcherProps) {\n this.shareLinkFetcherProps = {\n ...shareLinkFetcherProps,\n tokenFetcher: shareLinkFetcherProps.tokenFetcher,\n };\n }\n }\n /**\n * Takes an already generated data store url (from requestUrl) and appends a path to the\n * existing data store information.\n */\n appendDataStorePath(requestUrl, pathToAppend) {\n const fluidInfo = getLocatorFromOdspUrl(requestUrl);\n if (!fluidInfo) {\n return undefined;\n }\n const parsingUrl = new URL(fluidInfo.dataStorePath, `${requestUrl.protocol}//${requestUrl.hostname}`);\n // Determine if the caller is passing a query parameter or path since processing will be different.\n if (pathToAppend.startsWith(\"/?\") || pathToAppend.startsWith(\"?\")) {\n const queryParams = new URLSearchParams(pathToAppend);\n for (const [key, value] of queryParams.entries()) {\n parsingUrl.searchParams.append(key, value);\n }\n fluidInfo.dataStorePath = `${parsingUrl.pathname}${parsingUrl.search}`;\n }\n else {\n fluidInfo.dataStorePath = `${parsingUrl.pathname}${parsingUrl.pathname.endsWith(\"/\") || pathToAppend.startsWith(\"/\") ? \"\" : \"/\"}${pathToAppend}/${parsingUrl.search}`;\n }\n storeLocatorInOdspUrl(requestUrl, fluidInfo);\n return requestUrl.href;\n }\n getKey(resolvedUrl) {\n return `${resolvedUrl.siteUrl},${resolvedUrl.driveId},${resolvedUrl.itemId}`;\n }\n /**\n * Resolves request URL into driver details\n */\n async resolve(request) {\n const requestToBeResolved = { headers: request.headers, url: request.url };\n const isSharingLinkToRedeem = requestToBeResolved.headers?.[SharingLinkHeader.isSharingLinkToRedeem];\n const isRedemptionNonDurable = requestToBeResolved.headers?.[SharingLinkHeader.isRedemptionNonDurable];\n try {\n const url = new URL(request.url);\n const odspFluidInfo = getLocatorFromOdspUrl(url);\n if (odspFluidInfo) {\n requestToBeResolved.url = createOdspUrl(odspFluidInfo);\n }\n }\n catch {\n // If the locator throws some error, then try to resolve the request as it is.\n }\n const odspResolvedUrl = await new OdspDriverUrlResolver().resolve(requestToBeResolved);\n odspResolvedUrl.context = await this.getContext?.(odspResolvedUrl, odspResolvedUrl.dataStorePath ?? \"\");\n odspResolvedUrl.appName = this.appName;\n odspResolvedUrl.codeHint = odspResolvedUrl.codeHint?.containerPackageName\n ? odspResolvedUrl.codeHint\n : { containerPackageName: getContainerPackageName(this.containerPackageInfo) };\n if (isSharingLinkToRedeem) {\n // We need to remove the nav param if set by host when setting the sharelink as otherwise the shareLinkId\n // when redeeming the share link during the redeem fallback for trees latest call becomes greater than\n // the eligible length.\n odspResolvedUrl.shareLinkInfo = Object.assign(odspResolvedUrl.shareLinkInfo ?? {}, {\n sharingLinkToRedeem: this.removeNavParam(request.url),\n isRedemptionNonDurable: isRedemptionNonDurable ?? false,\n });\n }\n if (odspResolvedUrl.itemId) {\n // Kick start the sharing link request if we don't have it already as a performance optimization.\n // For detached create new, we don't have an item id yet and therefore cannot generate a share link\n this.getShareLinkPromise(odspResolvedUrl).catch(() => { });\n }\n return odspResolvedUrl;\n }\n removeNavParam(link) {\n const url = new URL(link);\n const params = new URLSearchParams(url.search);\n params.delete(locatorQueryParamName);\n url.search = params.toString();\n return url.href;\n }\n async getShareLinkPromise(resolvedUrl) {\n if (this.shareLinkFetcherProps === undefined) {\n throw new Error(\"Failed to get share link because share link fetcher props are missing\");\n }\n if (!(resolvedUrl.siteUrl && resolvedUrl.driveId && resolvedUrl.itemId)) {\n throw new Error(\"Failed to get share link because necessary information is missing \" +\n \"(e.g. siteUrl, driveId or itemId)\");\n }\n const key = this.getKey(resolvedUrl);\n const cachedLinkPromise = this.sharingLinkCache.get(key);\n if (cachedLinkPromise) {\n return cachedLinkPromise;\n }\n const newLinkPromise = getFileLink(this.shareLinkFetcherProps.tokenFetcher, resolvedUrl, this.logger).catch((error) => {\n // This should imply that error is a non-retriable error.\n this.logger.sendErrorEvent({ eventName: \"FluidFileUrlError\" }, error);\n this.sharingLinkCache.remove(key);\n throw error;\n });\n this.sharingLinkCache.add(key, async () => newLinkPromise);\n return newLinkPromise;\n }\n /**\n * Requests a driver + data store storage URL. Note that this method requires share link to be fetched\n * and it will throw in case share link fetcher props were not specified when instance was created.\n * @param resolvedUrl - The driver resolved URL\n * @param dataStorePath - The relative data store path URL.\n * For requesting a driver URL, this value should always be '/'. If an empty string is passed, then dataStorePath\n * will be extracted from the resolved url if present.\n * @param packageInfoSource - optional, represents container package information to be included in url.\n */\n async getAbsoluteUrl(resolvedUrl, dataStorePath, packageInfoSource) {\n const odspResolvedUrl = getOdspResolvedUrl(resolvedUrl);\n const shareLink = await this.getShareLinkPromise(odspResolvedUrl);\n return this.appendLocatorParams(shareLink, resolvedUrl, dataStorePath, packageInfoSource);\n }\n /**\n * Appends the store locator properties to the provided base URL. This function is useful for scenarios where an application\n * has a base URL (for example a sharing link) of the Fluid file, but does not have the locator information that would be used by Fluid\n * to load the file later.\n * @param baseUrl - The input URL on which the locator params will be appended.\n * @param resolvedUrl - odsp-driver's resolvedURL object.\n * @param dataStorePath - The relative data store path URL.\n * For requesting a driver URL, this value should always be '/'. If an empty string is passed, then dataStorePath\n * will be extracted from the resolved url if present.\n * @returns The provided base URL appended with odsp-specific locator information\n */\n async appendLocatorParams(baseUrl, resolvedUrl, dataStorePath, packageInfoSource) {\n const odspResolvedUrl = getOdspResolvedUrl(resolvedUrl);\n // If the user has passed an empty dataStorePath, then extract it from the resolved url.\n const actualDataStorePath = dataStorePath || (odspResolvedUrl.dataStorePath ?? \"\");\n odspResolvedUrl.context = await this.getContext?.(odspResolvedUrl, actualDataStorePath);\n /**\n * containerPackageName can be provided by various ways, in the order of priority:\n * 1. packageInfoSource - passed by the call of appendLocatorParams\n * 2. odspResolvedUrl.codeHint?.containerPackageName - passed by the odsp-driver's resolvedURL object\n * 3. this.containerPackageInfo - passed by the constructor of OdspDrvierUrlResolverForShareLink\n * */\n const containerPackageName = getContainerPackageName(packageInfoSource) ??\n odspResolvedUrl.codeHint?.containerPackageName ??\n getContainerPackageName(this.containerPackageInfo);\n odspResolvedUrl.appName = this.appName;\n return appendNavParam(baseUrl, odspResolvedUrl, actualDataStorePath, containerPackageName);\n }\n /**\n * Crafts a supported document/driver URL\n */\n static createDocumentUrl(baseUrl, driverInfo) {\n const url = new URL(baseUrl);\n storeLocatorInOdspUrl(url, driverInfo);\n return url.href;\n }\n}\n//# sourceMappingURL=odspDriverUrlResolverForShareLink.js.map","import { checkUrl, OdspDriverUrlResolver, OdspDriverUrlResolverForShareLink } from '@fluidframework/odsp-driver/legacy';\n/**\n * This function is used to predetermine, using a light-weight check, whether the given input it's a fluid URL and\n * can be loaded using the generic loader APIs.\n *\n * The check is done by trying to match / resolve the given URL with a certain shape of an expected URL.\n * For example, for loading fluid components, we are expecting an ODSP share link.\n *\n * Note that even if the pre-check is successful, this doesn't guarantee that loading the component will be successful.\n * This is because even if the URL has the correct shape, there are a lot of errors that can happen during the load.\n * Some examples would be that the document has been deleted (404) or the user doesn't have permissions (403/401) etc.\n *\n * The result of the function can be treated right now as a boolean check. If the url is not matching the expected shape,\n * the functions returns `undefined`. Otherwise, it will return a defined object which contains the `DriverPreCheckInfo`.\n *\n * @param loopComponentRouterInput The generic input given by the host.\n * @param urlResolver Used for resolving the given url.\n */ export async function checkFluidUrl(loopComponentRouterInput, urlResolver) {\n if (loopComponentRouterInput.type !== 'Data' || loopComponentRouterInput.dataType !== 'URL') {\n return undefined;\n }\n const url = loopComponentRouterInput.data.url;\n const urlResolverSync = await urlResolver;\n // For odsp, the checkUrl call should be sufficient to obtain the preCheckInfo.\n // Note that if the urlResolver is a wrapped OdspResolver, this check will fail.\n // The long term solution would be to have the checkUrl or getPreCheckInfo on the IUrlResolver interface.\n if (!urlResolverSync || urlResolverSync instanceof OdspDriverUrlResolver || urlResolverSync instanceof OdspDriverUrlResolverForShareLink) {\n return checkUrl(url);\n }\n try {\n // Otherwise we can use the given resolver to check whether the url can be resolved.\n const request = await urlResolverSync.resolve({\n url: url.href\n });\n if (request?.type === 'fluid') {\n return {};\n }\n } catch {\n // We don't need to log this error.\n }\n return undefined;\n}\n\n//# sourceMappingURL=checkFluidUrl.js.map","/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\nimport { getLocatorFromOdspUrl } from \"./odspFluidFileLink.js\";\n/**\n * A check that returns DriverPreCheckInfo if the URL format is likely supported by this driver.\n * Note that returning information here is NOT a full guarantee that resolve will ultimately be successful.\n * Instead, this should be used as a lightweight check that can filter out easily detectable unsupported URLs\n * before the entire Fluid loading process needs to be kicked off.\n * @legacy\n * @alpha\n */\nexport function checkUrl(documentUrl) {\n const locator = getLocatorFromOdspUrl(documentUrl);\n if (!locator) {\n return undefined;\n }\n let siteOrigin;\n try {\n if (locator?.siteUrl) {\n siteOrigin = new URL(locator?.siteUrl).origin;\n }\n }\n catch {\n // Drop error\n }\n return {\n codeDetailsHint: locator?.containerPackageName,\n // Add the snapshot endpoint, which has the same domain as the site URL\n criticalBootDomains: siteOrigin ? [siteOrigin] : undefined,\n };\n}\n//# sourceMappingURL=checkUrl.js.map","import { NamespaceLoggerAdapter } from '@fluidx/telemetry';\nimport { LoopDependencyContainer } from '@fluidx/injected-dependencies';\n/**\n * Loads the loop component code using the provided `loopCodeLoader`.\n *\n * All will do the necessary preload work needed for perf.\n */ export class LoopLoader {\n constructor(props){\n this.props = props;\n if (props.logger) {\n this.logger = new NamespaceLoggerAdapter('LoopLoader', props.logger);\n }\n }\n async instantiateLoopComponent(loopComponentRouterInput) {\n const { loopCodeLoader, dependencySynthesizer: originalDependencySynthesizer } = this.props;\n const { registrationId } = loopComponentRouterInput;\n if (!registrationId) {\n throw new Error('registrationId is required.');\n }\n const loopModule = await loopCodeLoader.load({\n packageName: registrationId\n });\n const dependencySynthesizer = new LoopDependencyContainer(originalDependencySynthesizer);\n this.logger && dependencySynthesizer.register('NamespaceLogger', this.logger);\n const createComponentProps = loopComponentRouterInput.type === 'Data' ? {\n creationData: loopComponentRouterInput,\n manifestData: loopComponentRouterInput.manifestData,\n componentPersistentInputData: loopComponentRouterInput.componentPersistentInputData,\n storagePartitionKey: loopComponentRouterInput.storagePartitionKey\n } : loopComponentRouterInput.type === 'Creation' ? {\n creationData: {},\n manifestData: loopComponentRouterInput.manifestData,\n componentPersistentInputData: loopComponentRouterInput.componentPersistentInputData,\n storagePartitionKey: loopComponentRouterInput.storagePartitionKey\n } : loopComponentRouterInput;\n return loopModule.module.loopExport.instantiateLoopComponent(createComponentProps, dependencySynthesizer);\n }\n}\n\n//# sourceMappingURL=LoopLoader.js.map","import { createLoopLoader } from './createLoopLoader';\nimport { createProviderProxy } from '../Utils/providerProxy';\n/**\n * Loads a non-fluid loop component by using dedicated LoopCodeLoaders provided by the component developers.\n * This flow is known as the \"Generic loader v2\".\n */ export async function getLoopComponentFromLoopFactory(props) {\n const { loopComponentRouterInput, windowContextForLoader, dependencySynthesizer, config, logger, loopCodeLoaderFactory, requiredProviderTypes } = props;\n // Create a loop loader which is responsible for doing all the pre-work necessary before loading the component.\n // A few things that need to be done before:\n // - preload, prefetch\n // - synthesize dependency providers, etc.\n // The loop loader will use the provided loopCodeLoader for instantiating the corresponding loop component depending on the input\n // Note: This pattern is similar to the `Loader` from the fluidframework which will call `instantiateRuntimeFactory` on the provided codeLoader.\n const loopLoader = await createLoopLoader(config, windowContextForLoader, dependencySynthesizer, logger, loopCodeLoaderFactory);\n const component = await loopLoader.instantiateLoopComponent(loopComponentRouterInput);\n if (requiredProviderTypes) {\n const providers = dependencySynthesizer.synthesize({\n FluidDocumentServiceFactoryProvider: 'FluidDocumentServiceFactoryProvider'\n }, undefined);\n return createProviderProxy(component, undefined, requiredProviderTypes, providers.FluidDocumentServiceFactoryProvider, undefined, logger);\n }\n return component;\n}\n\n//# sourceMappingURL=getLoopComponentFromLoopFactory.js.map","import { defaultLocale } from '@fluidx/utilities';\nimport { LoopLoader } from '../LoopLoader';\nexport async function createLoopLoader(config, windowContext, dependencySynthesizer, logger, loopCodeLoaderFactory) {\n const { environment } = config;\n const symbolProvider = {\n InternationalizationContext: 'InternationalizationContext',\n SettingsProvider: 'SettingsProvider',\n TokenProvider: 'TokenProvider',\n LoopTrustedTypesPolicy: 'LoopTrustedTypesPolicy'\n };\n const providers = dependencySynthesizer.synthesize(symbolProvider, undefined);\n const [internationalizationContext, settingsProvider, tokenProvider, trustedTypesPolicy] = await Promise.all([\n providers.InternationalizationContext,\n providers.SettingsProvider,\n providers.TokenProvider,\n providers.LoopTrustedTypesPolicy\n ]);\n const locale = internationalizationContext?.uiLocale;\n const loopCodeLoaderProps = {\n audience: environment?.audience || 'Production',\n localeHint: locale || defaultLocale,\n settingsProvider,\n windowContext,\n trustedTypesPolicy,\n tokenProvider,\n dependencySynthesizer,\n ...{\n logger\n }\n };\n const loopCodeLoader = await loopCodeLoaderFactory.instantiateLoopCodeLoader(loopCodeLoaderProps);\n // TODO: Add preCache logic for the loopCodeLoader.\n // https://office.visualstudio.com/OC/_workitems/edit/6189261\n return new LoopLoader({\n loopCodeLoader,\n dependencySynthesizer,\n logger\n });\n}\n\n//# sourceMappingURL=createLoopLoader.js.map","import { checkFluidUrl } from '../checkFluidUrl';\nimport { loadComponentInDivInternal } from '.';\nimport { getLoopComponentFromLoopFactory } from './getLoopComponentFromLoopFactory';\nimport { isFluidRegistrationId } from '@fluidx/loop-component-manifest-loader';\nimport { updateLoggerCodeDetailsName } from './logContainerCodeDetails';\nexport async function getLoadedInfo(props) {\n const { windowContextForLoader, loopComponentRouterInput, dependencySynthesizer, config = {}, logger, perfMetadata, documentHiddenTrackerId, fluidRequestHeaders } = props;\n const { registrationId, manifestData } = loopComponentRouterInput;\n if (registrationId && !isFluidRegistrationId(registrationId)) {\n const symbols = {\n LoopCodeLoaderFactoryProvider: 'LoopCodeLoaderFactoryProvider'\n };\n const { LoopCodeLoaderFactoryProvider: factoryPromise } = dependencySynthesizer.synthesize(symbols, undefined);\n const codeLoaderFactoryProvider = await factoryPromise;\n const loopCodeLoaderFactory = await codeLoaderFactoryProvider?.getLoopCodeLoaderFactory();\n if (!loopCodeLoaderFactory) {\n throw new Error('loopCodeLoaderFactory is required for non-fluid components.');\n }\n const component = getLoopComponentFromLoopFactory({\n loopComponentRouterInput,\n windowContextForLoader,\n dependencySynthesizer,\n config,\n logger,\n loopCodeLoaderFactory\n });\n return {\n component,\n container: Promise.resolve(undefined)\n };\n } else if (loopComponentRouterInput.type === 'Data' && loopComponentRouterInput.dataType === 'URL') {\n let preCheckInfo;\n if (registrationId && isFluidRegistrationId(registrationId)) {\n // driver precheck info could be available from 'manifestData' when fluid url recognition is done by GL.\n preCheckInfo = !!manifestData && typeof manifestData === 'object' ? manifestData : undefined;\n }\n if (!preCheckInfo) {\n preCheckInfo = await checkFluidUrl(loopComponentRouterInput, findUrlResolver({\n dependencySynthesizer,\n config\n }));\n }\n if (!preCheckInfo) {\n throw new Error('Failed to create Fluid component from the provided url.');\n }\n updateLoggerCodeDetailsName(preCheckInfo.codeDetailsHint, logger);\n // This is a valid fluid link so we will need to load the component.\n const loadedInfoPromise = loadComponentInDivInternal({\n windowContextForLoader,\n dependencySynthesizer,\n hostConfig: config,\n logger,\n perfMetadata,\n documentEverHiddenTrackerID: documentHiddenTrackerId,\n containerRequest: {\n url: loopComponentRouterInput.data.url.href,\n headers: fluidRequestHeaders\n },\n driver: undefined,\n preCheckInfo\n });\n return loadedInfoPromise;\n }\n throw new Error('Failed to create component.');\n}\n/**\n * Helps find the url resolver by checking legacy and new locations.\n * @param options The options for getting the urlResolver\n * @param options.dependencySynthesizer The dependency synthesizer that might contain the url resolver\n * @param options.config The host config that may contain a driver override\n * @returns A promise to the URL Resolver, or undefined if it is missing.\n */ async function findUrlResolver(options) {\n const { dependencySynthesizer, config } = options;\n if (config?.driverImplementationOverride) {\n return config.driverImplementationOverride.urlResolver;\n }\n const symbols = {\n DriverImplementation: 'DriverImplementation',\n FluidUrlResolverProvider: 'FluidUrlResolverProvider'\n };\n const { DriverImplementation, FluidUrlResolverProvider } = dependencySynthesizer.synthesize(symbols, undefined);\n const [driver, urlResolverFromProvider] = await Promise.all([\n DriverImplementation,\n FluidUrlResolverProvider\n ]);\n return driver?.urlResolver ?? urlResolverFromProvider?.urlResolver;\n}\n\n//# sourceMappingURL=loadLoopComponentHelper.js.map","import { isFluidRegistrationId } from '@fluidx/loop-component-manifest-loader';\nimport { ActivityTracker, sendTelemetryEvent } from '@fluidx/telemetry';\nimport { getDocumentHiddenResult } from '@fluidx/utilities';\nimport { createComponentFromCodeInDivInternal, rehydrateComponentFromSnapshotInDivInternal } from '../LoadHelpers';\nimport { getLoadedInfo } from '../LoadHelpers/loadLoopComponentHelper';\nimport { updateLoggerCodeDetailsName } from '../LoadHelpers/logContainerCodeDetails';\nimport { ActivityGetLoopComponentCore } from '../Telemetry';\nimport { createProviderProxy } from '../Utils/providerProxy';\nimport { getPackageName } from '../getPackageName';\n/**\n * This function contains the actual implementation of the generic loader.\n * Based on the type of the `loopComponentRouterInput` it will route the call to the appropriate `ComponentIn*` functions.\n *\n * **Note** It is safe to call this function both on the inside and on the outside of the iframe,\n * since the logger is already set with the appropriate properties.\n *\n * **Note** Since this is an internal function, expectation from invokers is to initialize a namespace logger within their context.\n * This will help identify and track activities under a contextual namespace.\n */ export function getLoopComponentInternal(props) {\n const { windowContextForLoader, loopComponentRouterInput, dependencySynthesizer, config, logger, perfMetadata, documentHiddenTrackerId, requiredProviderTypes } = props;\n const hostConfig = {\n ...config\n };\n const driver = hostConfig.driverImplementationOverride;\n const activityTracker = ActivityTracker.start(ActivityGetLoopComponentCore, logger, {\n addUserTiming: true\n });\n if (loopComponentRouterInput.type === 'Fluid') {\n if (logger?.PersistedProperties) {\n const persistedProps = {\n isFluid: true\n };\n logger.PersistedProperties.addPersistedProperties(persistedProps);\n }\n // This code path is for \"create new fluid component from a menu\".\n // It does not have a loopRegistrationId, hence we are logging package name.\n const packageName = getPackageName(loopComponentRouterInput.codeDetails);\n updateLoggerCodeDetailsName(packageName, logger);\n try {\n // If pendingLocalState is provided by host, we will rehydrate the component from the snapshot.\n if (loopComponentRouterInput.pendingLocalState) {\n const loadedInfo = rehydrateComponentFromSnapshotInDivInternal(windowContextForLoader, {\n dependencySynthesizer,\n snapshot: loopComponentRouterInput.pendingLocalState,\n requiredProviderTypes\n }, driver, hostConfig, logger, perfMetadata, documentHiddenTrackerId);\n activityTracker.setResult(/*succeeded*/ true, {\n packageName\n });\n return loadedInfo;\n }\n const loadedInfo = createComponentFromCodeInDivInternal(windowContextForLoader, {\n dependencySynthesizer,\n codeDetails: loopComponentRouterInput.codeDetails,\n loadTemplateProps: loopComponentRouterInput.templateProps,\n requiredProviderTypes\n }, driver, hostConfig, logger, perfMetadata, documentHiddenTrackerId);\n activityTracker.setResult(/*succeeded*/ true, {\n packageName\n });\n return loadedInfo;\n } catch (error) {\n activityTracker.setResult(/*succeeded*/ false, {\n packageName\n }, error);\n throw error;\n }\n }\n const loadedInfoPromise = getLoadedInfo({\n ...props,\n loopComponentRouterInput\n });\n if (logger?.PersistedProperties) {\n const { registrationId } = loopComponentRouterInput;\n const isFluid = !registrationId || isFluidRegistrationId(registrationId);\n const documentEverHidden = getDocumentHiddenResult(documentHiddenTrackerId);\n const persistedProps = isFluid ? {\n isFluid: true,\n documentEverHidden\n } : {\n isFluid: false,\n loopRegistrationId: registrationId,\n documentEverHidden\n };\n logger.PersistedProperties.addPersistedProperties(persistedProps);\n }\n return {\n component: loadedInfoPromise.then(async (loadedInfo)=>{\n const [container, component] = await Promise.all([\n loadedInfo.container,\n loadedInfo.component\n ]);\n await initializeComponent(component, activityTracker);\n // add identityName as a persistedProp for logging\n const identityName = getComponentIdentityName(component);\n if (logger?.PersistedProperties && identityName) {\n logger.PersistedProperties.addPersistedProperties({\n identityName\n });\n }\n activityTracker.setResult(/*succeeded*/ true);\n logger && logComponentMetadata(component, 'owh-getLoopComponentInternal', logger);\n const documentUrl = container && loopComponentRouterInput.type === 'Data' && loopComponentRouterInput.dataType === 'URL' ? loopComponentRouterInput.data.url.href : undefined;\n if (requiredProviderTypes) {\n const providers = dependencySynthesizer.synthesize({\n FluidDocumentServiceFactoryProvider: 'FluidDocumentServiceFactoryProvider'\n }, undefined);\n return createProviderProxy(component, container, requiredProviderTypes, providers.FluidDocumentServiceFactoryProvider, documentUrl, logger);\n }\n return component;\n }).catch((error)=>{\n activityTracker.setResult(/*succeeded*/ false, undefined, error);\n throw error;\n }),\n container: loadedInfoPromise.then((loadedInfo)=>loadedInfo.container).catch((error)=>{\n activityTracker.setResult(/*succeeded*/ false, undefined, error);\n throw error;\n })\n };\n}\n/**\n * Initializes the component if it has an initializer.\n * @param component A provider that could implement ProvideComponentInitializer\n * @param activityTracker The activity tracker to use for tracking the initialization activity.\n */ async function initializeComponent(component, activityTracker) {\n if (component.ComponentInitializer) {\n activityTracker.markSubActivityStart('ComponentInitialize');\n await component.ComponentInitializer.initialize();\n activityTracker.markSubActivityEnd('ComponentInitialize');\n }\n}\nconst loadComponentMetadataSeenIdentityNames = new Set();\nfunction logComponentMetadata(componentTelemetryMetadataProvider, source, logger) {\n const identityName = getComponentIdentityName(componentTelemetryMetadataProvider);\n if (identityName && !loadComponentMetadataSeenIdentityNames.has(identityName)) {\n // We need to log once per identityName\n sendTelemetryEvent(logger, {\n eventName: 'LoadComponentMetadata',\n identityName,\n source\n });\n loadComponentMetadataSeenIdentityNames.add(identityName);\n }\n}\nfunction getComponentIdentityName(componentTelemetryMetadataProvider) {\n return componentTelemetryMetadataProvider.ComponentTelemetryMetadata?.entityName;\n}\n\n//# sourceMappingURL=getLoopComponentInternal.js.map","import { LazyPromise } from '@fluidframework/core-utils/legacy';\n// Only have a single instance of the cache to use for all instances of OdspFluidDocumentServiceFactory\nconst containerStorageLocationCache = new Map();\nexport function getOdspFluidDocumentServiceFactoryLazy(dependencies, odspResolvedUrl, logger) {\n return new LazyPromise(async ()=>{\n const [hostDocumentServiceFactory, settingsProvider, tokenProvider, userContext] = await Promise.all([\n dependencies.FluidDocumentServiceFactoryProvider,\n dependencies.SettingsProvider,\n dependencies.TokenProvider,\n dependencies.UserContext\n ]);\n return import(/* webpackChunkName: \"FluidDocumentServiceFactoryContainer\" */ './OdspFluidDocumentServiceFactory').then((m)=>{\n const fluidDocumentServiceFactoryImpl = new m.OdspFluidDocumentServiceFactory({\n hostDocumentServiceFactory,\n settingsProvider,\n tokenProvider,\n userContext\n }, odspResolvedUrl, containerStorageLocationCache, logger);\n return fluidDocumentServiceFactoryImpl;\n });\n });\n}\n\n//# sourceMappingURL=getOdspFluidDocumentServiceFactoryLazy.js.map","import { AttachState } from '@fluidframework/container-definitions';\n/**\n * Resolves the provided deferred promise with the container's resolved URL when the container is attached.\n */ export function resolveUrlPromiseOnContainerAttach(deferredUrlPromise, containerPromise) {\n containerPromise.then(async (container)=>{\n if (container) {\n if (container.attachState !== AttachState.Attached) {\n await new Promise((resolve)=>{\n container.once('attached', resolve);\n });\n }\n deferredUrlPromise.resolve(container.resolvedUrl);\n } else {\n deferredUrlPromise.resolve(undefined);\n }\n }).catch(()=>{\n deferredUrlPromise.resolve(undefined);\n });\n}\n\n//# sourceMappingURL=resolveUrlPromiseOnContainerAttach.js.map","import { getLoopComponentInternal } from './getLoopComponentInternal';\nimport { LoopDependencyContainer } from '@fluidx/injected-dependencies';\nimport { initializeTelemetryInDiv } from '../LoadHelpers';\nimport { getOdspFluidDocumentServiceFactoryLazy } from './getOdspFluidDocumentServiceFactoryLazy';\nimport { Deferred, isOdspResolvedUrl } from '@fluidx/utilities';\nimport { resolveUrlPromiseOnContainerAttach } from '../Utils/resolveUrlPromiseOnContainerAttach';\nimport { sendTelemetryEvent, tryLogEvent } from '@fluidx/telemetry';\nimport { providifyDocumentServiceFactory } from '../Utils/driverProvider';\nimport { isNestedDependencyContainerForCreateEnabled } from '../Utils/featureSettings';\nimport { EventCategory } from '@fluidx/office-fluid-types';\nexport function getDependencySynthesizerWithLoopLoader(hostDependencySynthesizer, options) {\n const loopComponentLoaderKey = 'LoopComponentLoader';\n if (hostDependencySynthesizer.has(loopComponentLoaderKey) && // eslint-disable-next-line no-restricted-globals -- we need to still register a new LoopComponentLoader if the window context is different from the caller's window object\n window === options.windowContextForLoader) {\n return hostDependencySynthesizer;\n }\n const dependencySynthesizer = new LoopDependencyContainer(hostDependencySynthesizer);\n dependencySynthesizer.register(loopComponentLoaderKey, getLoopComponentLoader(options.windowContextForLoader));\n return dependencySynthesizer;\n}\n/**\n * Returns a dependency synthesizer based on the provided dependency synthesizer that implements NestedLoopComponentHosting.getNestedDependencyContainer\n * with a nested dependency container registered with a default FluidDocumentServiceFactoryProvider.\n */ export function getDependencySynthesizerWithNestedDependencyContainer(hostDependencyContainer, urlPromise, logger) {\n const dependencySynthesizer = new LoopDependencyContainer(hostDependencyContainer);\n const nestedLoopComponentHostingKey = 'NestedLoopComponentHosting';\n dependencySynthesizer.register(nestedLoopComponentHostingKey, getNestedLoopComponentHostingToRegister(hostDependencyContainer, urlPromise, logger));\n return dependencySynthesizer;\n}\nasync function getNestedLoopComponentHostingToRegister(hostDependencyContainer, urlPromise, logger) {\n const nestedLoopComponentHostingKey = 'NestedLoopComponentHosting';\n const nestedLoopComponentLoaderKey = 'NestedLoopComponentLoader';\n const providers = hostDependencyContainer.synthesize({\n SettingsProvider: 'SettingsProvider',\n NestedLoopComponentHosting: nestedLoopComponentHostingKey,\n NestedLoopComponentLoader: nestedLoopComponentLoaderKey\n }, undefined);\n const nestedLoopComponentHosting = await providers.NestedLoopComponentHosting;\n const nestedLoopComponentLoader = await providers.NestedLoopComponentLoader;\n const hostGetNestedDependencyContainer = nestedLoopComponentHosting?.getNestedDependencyContainer?.bind(nestedLoopComponentHosting) ?? nestedLoopComponentLoader?.getNestedDependencyContainer?.bind(nestedLoopComponentLoader);\n const getNestedDependencyContainer = isNestedDependencyContainerForCreateEnabled(await providers.SettingsProvider) ? getNestedDependencyContainerImpl(urlPromise, hostGetNestedDependencyContainer, logger) : hostGetNestedDependencyContainer;\n return new NestedLoopComponentHostingImpl(getNestedDependencyContainer);\n}\n/**\n * Returns a function that returns a nested dependency container with a FluidDocumentServiceFactoryProvider registered.\n * If it exists, the parent's implementation of getNestedDependencyContainer is called to wrap the returned nested dependency container\n * to respect any dependencies they registered.\n */ function getNestedDependencyContainerImpl(urlPromise, parentGetNestedDependencyContainer, logger) {\n return (parentDependencyContainer)=>{\n if (!parentDependencyContainer.has('FluidDocumentServiceFactoryProvider')) {\n logger && sendTelemetryEvent(logger, {\n eventName: 'NoFluidDocumentServiceFactoryForNestedDependencyContainer'\n });\n return parentGetNestedDependencyContainer?.(parentDependencyContainer) ?? parentDependencyContainer;\n }\n const optionalTypes = {\n SettingsProvider: 'SettingsProvider',\n TokenProvider: 'TokenProvider',\n UserContext: 'UserContext'\n };\n const providers = parentDependencyContainer.synthesize(optionalTypes, {\n FluidDocumentServiceFactoryProvider: 'FluidDocumentServiceFactoryProvider'\n });\n const nestedDependencyContainer = new LoopDependencyContainer(parentDependencyContainer);\n const fluidDocumentServiceFactoryPromise = urlPromise.then((resolvedUrl)=>{\n if (resolvedUrl && isOdspResolvedUrl(resolvedUrl)) {\n return getOdspFluidDocumentServiceFactoryLazy({\n FluidDocumentServiceFactoryProvider: providers.FluidDocumentServiceFactoryProvider,\n SettingsProvider: providers.SettingsProvider,\n TokenProvider: providers.TokenProvider,\n UserContext: providers.UserContext\n }, resolvedUrl, logger);\n } else {\n const eventName = resolvedUrl ? 'ResolvedUrlNotOdsp' : 'ResolvedUrlUndefined';\n tryLogEvent(EventCategory.Generic, logger, {\n eventName\n });\n return providers.FluidDocumentServiceFactoryProvider.then((fluidDocumentServiceFactory)=>{\n return providifyDocumentServiceFactory({\n documentServiceFactory: fluidDocumentServiceFactory.documentServiceFactory,\n createDocumentRequest: fluidDocumentServiceFactory.getCreateDocumentRequest\n });\n });\n }\n });\n nestedDependencyContainer.register('FluidDocumentServiceFactoryProvider', fluidDocumentServiceFactoryPromise);\n return parentGetNestedDependencyContainer?.(nestedDependencyContainer) ?? nestedDependencyContainer;\n };\n}\nclass OfficeWebHostLoopComponentLoader {\n constructor(windowContextForLoader){\n this.windowContextForLoader = windowContextForLoader;\n }\n dispose() {}\n get LoopComponentLoader() {\n return this;\n }\n get Disposable() {\n return this;\n }\n async getLoopComponent({ loopComponentRouterInput, dependencySynthesizer, fluidRequestHeaders, requiredProviderTypes }) {\n const { logger, perfMetadata, documentHiddenTrackerId } = initializeTelemetryInDiv({\n logger: await dependencySynthesizer.synthesize({\n NamespaceLogger: 'NamespaceLogger'\n }, undefined /* requiredTypes */ ).NamespaceLogger\n });\n const urlPromise = new Deferred();\n const loadedInfo = getLoopComponentInternal({\n windowContextForLoader: this.windowContextForLoader,\n loopComponentRouterInput,\n dependencySynthesizer: getDependencySynthesizerWithNestedDependencyContainer(dependencySynthesizer, urlPromise, logger),\n logger,\n perfMetadata,\n documentHiddenTrackerId,\n fluidRequestHeaders,\n requiredProviderTypes\n });\n resolveUrlPromiseOnContainerAttach(urlPromise, loadedInfo.container);\n return Promise.all([\n loadedInfo.container,\n loadedInfo.component\n ]).then(([_, component])=>component);\n }\n}\nfunction getLoopComponentLoader(windowContextForLoader) {\n return new OfficeWebHostLoopComponentLoader(windowContextForLoader);\n}\nclass NestedLoopComponentHostingImpl {\n constructor(getNestedDependencyContainerImpl){\n this.getNestedDependencyContainerImpl = getNestedDependencyContainerImpl;\n }\n get NestedLoopComponentHosting() {\n return this;\n }\n getNestedDependencyContainer(parentDependencyContainer) {\n return this.getNestedDependencyContainerImpl ? this.getNestedDependencyContainerImpl(parentDependencyContainer) : parentDependencyContainer;\n }\n dispose() {}\n get Disposable() {\n return this;\n }\n}\n\n//# sourceMappingURL=injectedDependencies.js.map","/**\n * Wraps a {@link IDocumentServiceFactory} in a {@link FluidDocumentServiceFactoryProvider}\n * @param param0 The parameters for creating a {@link FluidDocumentServiceFactoryProvider}\n * @param param0.documentServiceFactory The document service factory to wrap in {@link FluidDocumentServiceFactoryProvider}\n * @param param0.createDocumentRequest The helper function for creating a document service request\n * @returns A {@link FluidDocumentServiceFactoryProvider}\n */ export function providifyDocumentServiceFactory({ documentServiceFactory, createDocumentRequest }) {\n return {\n get FluidDocumentServiceFactoryProvider () {\n return this;\n },\n documentServiceFactory,\n getCreateDocumentRequest: createDocumentRequest,\n get Disposable () {\n return this;\n },\n dispose: ()=>{}\n };\n}\n/**\n * Wraps a {@link IUrlResolver} in a {@link FluidUrlResolverProvider}\n * @param urlResolver The url resolver to wrap in {@link FluidUrlResolverProvider}\n * @returns A {@link FluidUrlResolverProvider}\n */ export function providifyUrlResolver(urlResolver) {\n return {\n get FluidUrlResolverProvider () {\n return this;\n },\n urlResolver,\n get Disposable () {\n return this;\n },\n dispose: ()=>{}\n };\n}\n\n//# sourceMappingURL=driverProvider.js.map","const maxAllowedCharactersPerField = 10000;\nconst maxAllowedFieldsPerEvent = 100;\nconst getCappedErrorProps = (errorProps)=>{\n let cappedFields = undefined;\n if (typeof errorProps.message === 'string') {\n if (errorProps.message.length > maxAllowedCharactersPerField) {\n cappedFields = 'message';\n errorProps.message = errorProps.message.substr(0, maxAllowedCharactersPerField);\n }\n }\n if (typeof errorProps.stack === 'string') {\n if (errorProps.stack.length > maxAllowedCharactersPerField) {\n cappedFields = cappedFields ? cappedFields.concat(', stack') : 'stack';\n errorProps.stack = errorProps.stack.substr(0, maxAllowedCharactersPerField);\n }\n }\n return cappedFields ? {\n ...errorProps,\n cappedFields\n } : errorProps;\n};\n/**\n * Basic implementation of the Logger interface.\n */ export class BaseLogger {\n get NamespaceLogger() {\n return this;\n }\n get PersistedProperties() {\n return this;\n }\n constructor(persistentProps, namespace){\n this.namespace = namespace;\n this.persistentProps = persistentProps || {};\n this.namespace = namespace;\n }\n send(event) {\n this.sendWithNamespace(event, this.namespace);\n }\n /**\n * Calls logEvent to log the Telemetry Event.\n * Note- Since updatedEvent is a spread of persistentProps and the event,\n * props in persistentProps with the same name as event will be overridden by the props in event.\n * @param event The event we want to log\n * @param namespace A namespace to scope this event\n */ sendWithNamespace(event, namespace) {\n // Namespace provided in the sendWithNamespace call has precedence\n // over the namespace specified while instantiating the logger.\n const loggerNamespace = namespace || this.namespace;\n // Update event to account for any persistentProps\n let { category, ...props } = {\n ...this.persistentProps,\n ...event\n };\n let sampleEvent = false;\n if (props.sampleEvent) {\n sampleEvent = Boolean(props.sampleEvent);\n delete props.sampleEvent;\n }\n // Logging exceedsMaxAllowedFields to give an indication that the event exceeds max allowed fields in an event.\n const exceedsMaxAllowedFields = Object.keys(props).length > maxAllowedFieldsPerEvent ? true : false;\n // If the category of the event is error, there is a possibility that the message and stack may be huge\n // Truncating the message and stack in case it exceeds max allowed characters in a field.\n if (category === 'error' || category === 'Error') {\n props = getCappedErrorProps(props);\n }\n this.logEvent({\n category,\n props: {\n ...props,\n exceedsMaxAllowedFields\n },\n sampleEvent,\n namespace: loggerNamespace\n });\n }\n addPersistedProperties(properties) {\n this.persistentProps = {\n ...this.persistentProps,\n ...properties\n };\n }\n getPersistedProperties() {\n return {\n ...this.persistentProps\n };\n }\n} // cspell:ignore otel\n\n//# sourceMappingURL=BaseLogger.js.map","import { EventCategory } from '@fluidx/office-fluid-types';\nclass ConsoleLogProcessor {\n logEvent(event) {\n switch(event.category){\n case EventCategory.Error:\n // TODO: console.log/warn/error should used for debugging only and never checked in\n // eslint-disable-next-line no-console\n console.error('%cPurple: %cSession_Id:%s %s', 'color: purple; font-style: italic', '', this.sessionId, JSON.stringify(event));\n break;\n default:\n // TODO: console.log/warn/error should used for debugging only and never checked in\n // eslint-disable-next-line no-console\n console.log('%cPurple: %cSession_Id:%s %s', 'color: purple; font-style: italic', '', this.sessionId, JSON.stringify(event));\n }\n }\n setSessionId(sessionId) {\n this.sessionId = sessionId;\n }\n setUserContext(_context) {}\n shutdown() {}\n loadFull() {\n return Promise.resolve();\n }\n loadAsha() {}\n constructor(){\n // eslint-disable-next-line @fluidx/ffx-rules/prefer-private-fields -- TODO: Exception added when rule was enabled. Please consider refactoring this to use ECMAScript # prefixed private properties for better minification\n this.sessionId = '';\n }\n}\nexport const consoleLogProcessor = new ConsoleLogProcessor();\n\n//# sourceMappingURL=ConsoleLogProcessor.js.map","/**\n * Fluid Health 2.0 Pillars\n */ export const Pillar = {\n /** I want to see my content and get working quickly (all the moments before I can put my cursor down) */ Open: 'Open',\n /** I want to focus on my work and not on getting the app to do what I need */ Interruptions: 'Interruptions',\n /** This pillar is used for tagging all Vetos that are not yet parented to a specific Pillar */ VetoMissingClassification: 'VetoMissingClassification'\n};\n/**\n * Fluid Health 2.0 Vetos\n */ export const Veto = {\n /** Report failures in load and render of new or existing components */ LoadFailed: 'LoadFailed',\n /** Globally report unhandled errors interrupting experience */ UnhandledError: 'UnhandledError',\n /** Globally report unhandled rejections interrupting experience */ UnhandledRejection: 'UnhandledRejection'\n};\n/**\n * Association of Fluid Vetos to Pillars\n */ export const VetosByPillar = [\n {\n pillar: Pillar.Open,\n vetos: [\n Veto.LoadFailed\n ]\n },\n {\n pillar: Pillar.Interruptions,\n vetos: [\n Veto.UnhandledError,\n Veto.UnhandledRejection\n ]\n }\n];\n/**\n * Select QoS Pillar by given Veto.\n * Reference https://office.visualstudio.com/OC/_wiki/wikis/OC.wiki/5607/QoS-2.0\n * @param veto QoS 2.0 Veto\n * @returns QoS 2.0 Pillar\n */ export function selectPillarByVeto(veto) {\n for (const entry of VetosByPillar){\n if (entry.vetos.includes(veto)) {\n return entry.pillar;\n }\n }\n return Pillar.VetoMissingClassification;\n}\n\n//# sourceMappingURL=VetosByPillar.js.map","/**\n * DO NOT USE THIS ARIA INFO OUTSIDE THE OFFICE FLUID LOGGER\n * PLEASE REACH OUT TO THE FFX TEAM TO DISCUSS YOUR SCENARIO IF YOU MUST USE THIS INFO\n */ export const OfficeFluidAriaInfo = {\n token: '6a8929bcfc6d44e9b13fee392ada9cf0-4dea6a88-32c5-404b-8af1-4a43b94ef559-7393',\n directNumericMeasurementToken: '970a2f2bd232416db9f00ce2dc4e0490-505d1603-e4f2-4da4-9ba3-13325ddc1915-7112',\n namespacePrefix: 'Office.Fluid'\n};\nexport const OfficeFluidTestAriaInfo = {\n token: '742fa5a288b045e5beab1a2b8e445a71-66618038-43f3-4a1f-a680-59d90da7d572-7251',\n directNumericMeasurementToken: '970a2f2bd232416db9f00ce2dc4e0490-505d1603-e4f2-4da4-9ba3-13325ddc1915-7112',\n namespacePrefix: 'Office.Fluid'\n};\n\n//# sourceMappingURL=OfficeFluidAriaInfo.js.map","/**\n * DO NOT USE THIS ARIA INFO OUTSIDE THE OFFICE FLUID WORKSPACES LOGGER\n * PLEASE REACH OUT TO THE FFX TEAM TO DISCUSS YOUR SCENARIO IF YOU MUST USE THIS INFO\n */ export const OfficeFluidWorkspacesAriaInfo = {\n token: '954f09bf2c8a4321823cdeae34562b5c-d0886c33-e264-4c84-8ae5-a767e01b42cb-7479',\n namespacePrefix: 'Office.Fluid.Workspaces'\n};\n\n//# sourceMappingURL=OfficeFluidWorkspacesAriaInfo.js.map","import { OfficeFluidAriaInfo, OfficeFluidTestAriaInfo } from './OfficeFluidAriaInfo';\nimport { OfficeFluidWorkspacesAriaInfo } from './OfficeFluidWorkspacesAriaInfo';\n/**\n * Method that returns the aria info for the tenant to route the telemetry to\n */ export function getAriaInfoByAudience(audience) {\n if (isTestTelemetryByStorageHooks() || isTestTelemetryByAudience(audience)) {\n return OfficeFluidTestAriaInfo;\n }\n return OfficeFluidAriaInfo;\n}\nexport function getFluidWorkspacesAriaInfo() {\n return OfficeFluidWorkspacesAriaInfo;\n}\nfunction isTestTelemetryByAudience(audience) {\n // Adding syntheticTraffic here to route to Office Fluid Test as this is affecting usage metrics and monitoring\n // TODO: Task 5107506: Remove synthetic traffic and automation from audience\n return audience === 'Local' || audience === 'Automation' || audience === 'SyntheticTraffic' || audience === 'Development';\n}\nfunction isTestTelemetryByStorageHooks() {\n // Known developer support for \"sideloading\" have been retroactively collected here to assist in mitigating their\n // impact in telemetry when the original feature does not fully account for disinformation that may be caused.\n let developerHookDetected = false;\n try {\n // FluidCodeDetailsOverride and AllowListOverride are used in pairs. So We can just check for the presence of FluidCodeDetailsOverride\n developerHookDetected = !!localStorage.getItem('FluidCodeDetailsOverride');\n } catch {\n // Any issue attempting to detect support for or availability of either localStorage property or any part of the Web Storage API indicates there is not a developer hook to detect here.\n }\n return developerHookDetected;\n}\n\n//# sourceMappingURL=LogProcessorHelpers.js.map","import { EventCategory, ActivityResultType, DNMDataType } from '@fluidx/office-fluid-types';\nimport { Activity, EnumObjects, Funnel, makeStringDataField, onNotification, SimpleTelemetryLogger, SuppressNexus, UserAction, makeBooleanDataField, makeDoubleDataField, makeInt64DataField } from '@microsoft/oteljs';\nimport { getOtelDataField } from '../Utilities/OtelDataFieldHelpers';\nimport { isQoSEvent, prepareQoSEvent } from '../Health';\nimport { getAriaInfoByAudience, getFluidWorkspacesAriaInfo } from './LogProcessorHelpers';\nexport class BaseOtelLogProcessor {\n constructor(audience, initialPersistentProps, options){\n this.initialPersistentProps = initialPersistentProps;\n // eslint-disable-next-line @fluidx/ffx-rules/prefer-private-fields -- TODO: Exception added when rule was enabled. Please consider refactoring this to use ECMAScript # prefixed private properties for better minification\n this.ashaLoadStarted = false;\n this.telemetryLogger = new SimpleTelemetryLogger(undefined, undefined, this.getTelemetryConfig(audience));\n // We are adding our own PartA field here, if we end up adding more, we might extract this to a method.\n this.telemetryLogger.partAFields.push(makeStringDataField('Loop.Audience', audience));\n if (options?.useFluidWorkspacesAriaInfo) {\n this.ariaInfo = getFluidWorkspacesAriaInfo();\n } else {\n this.ariaInfo = getAriaInfoByAudience(audience);\n }\n this.telemetryLogger.setTenantToken(this.ariaInfo.namespacePrefix, this.ariaInfo.token, SuppressNexus);\n // Listen to error notifications sent by Otel and log them to the console when audience is non-production\n if (this.isNonProductionAudience(audience)) {\n this.registerOtelErrorsListener();\n }\n }\n /**\n * Method that logs the telemetry event based on the event category\n * @param event Telemetry event with namespace, category and a property bag of other fields\n */ async logEvent(event) {\n let { namespace, category, props, sampleEvent } = event;\n if (category === EventCategory.UserAction) {\n this.logUserActionEventToOtel(event);\n } else if (category === EventCategory.Activity) {\n this.logActivityEventToOtel(event);\n } else if (category === EventCategory.DNM) {\n // directNumericMeasurementToken is not defined for OfficeFluidWorkspaces\n if (this.ariaInfo.directNumericMeasurementToken) {\n this.logDNMEventToOTel(event);\n }\n } else {\n if ([\n 'AshaPillarAdd',\n 'AshaPillarRemove',\n 'AshaError'\n ].includes(props.eventName)) {\n this.loadAsha();\n this.ashaUtils?.then(({ handleAshaEvent })=>handleAshaEvent(event)).catch(()=>{\n this.logDefaultEventToOtel({\n category: EventCategory.Error,\n namespace,\n props: {\n eventName: `${props.eventName}Failure`\n },\n sampleEvent\n });\n });\n return;\n }\n if (category === EventCategory.Error && isQoSEvent(props)) {\n // Prepare ASHA QoS error events\n // TODO: Task 5541083: Move ASHA QoS event preprocessing out of OtelLogProcessor\n props = prepareQoSEvent(props);\n }\n this.logDefaultEventToOtel({\n namespace,\n category,\n props,\n sampleEvent\n });\n }\n }\n shutdown() {\n // shut down ASHA instance if there is one\n this.ashaUtils?.then(({ shutdownAshaForFluid })=>shutdownAshaForFluid()).catch(()=>{\n this.logDefaultEventToOtel({\n category: EventCategory.Error,\n props: {\n eventName: 'AshaShutdownFailure'\n }\n });\n });\n }\n logDefaultEventToOtel(event) {\n this.logEventToOtelInternal(event, (telemetryEvent)=>{\n this.prepareDefaultOtelEvent(telemetryEvent, event);\n });\n }\n logActivityEventToOtel(event) {\n this.logEventToOtelInternal(event, (telemetryEvent)=>{\n // Sending props to make sure that fields that are needed for the activity are present\n /* eslint-disable-next-line @typescript-eslint/consistent-type-assertions\n-- TODO: This cast will mask bugs in product code. Replace cast with type declaration or add rationale for why it's exceptional and needed. */ this.prepareActivityOtelEvent(telemetryEvent, {\n ...event.props\n });\n });\n }\n logUserActionEventToOtel(event) {\n this.logEventToOtelInternal(event, (telemetryEvent)=>{\n // Sending props to make sure that fields that are needed for the userAction are present\n this.prepareUserActionOtelEvent(telemetryEvent, /* eslint-disable-next-line @typescript-eslint/consistent-type-assertions\n-- TODO: This cast will mask bugs in product code. Replace cast with type declaration or add rationale for why it's exceptional and needed. */ {\n ...event.props\n }, event.namespace);\n });\n }\n // eslint-disable-next-line @fluidx/ffx-rules/prefer-private-fields -- TODO: Exception added when rule was enabled. Please consider refactoring this to use ECMAScript # prefixed private properties for better minification\n logDNMEventToOTel(event) {\n const eventName = event.props.eventName;\n const dataName = event.props.dataName;\n const dataMeasurement = event.props.dataMeasurement;\n if (typeof eventName !== 'string' || typeof dataName !== 'string' || !(typeof dataMeasurement === 'number' || typeof dataMeasurement === 'boolean')) {\n return;\n }\n const dnmEvent = {\n eventName,\n dataName,\n dataMeasurement,\n dataType: event.props.dataType,\n interval: event.props.interval\n };\n this.logDirectNumericMeasurementEvent(dnmEvent);\n }\n // eslint-disable-next-line @fluidx/ffx-rules/prefer-private-fields -- TODO: Exception added when rule was enabled. Please consider refactoring this to use ECMAScript # prefixed private properties for better minification\n logDirectNumericMeasurementEvent(event) {\n const dataFields = [];\n switch(event.dataType){\n case DNMDataType.Bool:\n dataFields.push(makeBooleanDataField(event.dataName, event.dataMeasurement));\n break;\n case DNMDataType.Double:\n dataFields.push(makeDoubleDataField(event.dataName, event.dataMeasurement));\n break;\n case DNMDataType.Int64:\n dataFields.push(makeInt64DataField(event.dataName, event.dataMeasurement));\n break;\n default:\n break;\n }\n if (!event.eventName || event.eventName.length === 0) {\n return;\n }\n // The event will not be logged if parts are starting in lowercase characters\n const capitalizedEventName = event.eventName[0].toUpperCase() + event.eventName.slice(1);\n const dne = {\n telemetryProperties: {\n dnmToken: this.ariaInfo.directNumericMeasurementToken,\n dnmInterval: event.interval,\n dnmAllowedPartA: [\n 3,\n 4,\n 5,\n 1 //AllowedPartA.ReleaseAudienceGroup\n ]\n },\n eventName: 'Office.DNM.Loop.' + capitalizedEventName,\n eventFlags: {\n dataCategories: EnumObjects.DataCategories.ProductServicePerformance,\n diagnosticLevel: EnumObjects.DiagnosticLevel.RequiredServiceData\n },\n dataFields\n };\n this.telemetryLogger.sendDirectNumericEvent(dne);\n }\n /**\n * Returns the telemetry config to be passed to the SimpleTelemetryLogger. By default we use Otel's ability to push events to a queue, an optimization useful when host applications want to delay load OneDs sink\n */ // eslint-disable-next-line @fluidx/ffx-rules/prefer-private-fields -- TODO: Exception added when rule was enabled. Please consider refactoring this to use ECMAScript # prefixed private properties for better minification\n getTelemetryConfig(audience) {\n const defaultTelemetryConfig = {\n enableQueue: true\n };\n if (!this.isNonProductionAudience(audience)) {\n return {\n ...defaultTelemetryConfig,\n disableValidation: true\n };\n }\n return defaultTelemetryConfig;\n }\n /**\n * If the audience is Automation, Local or Staging we consider it non-production for the purpose of telemetry event validation.\n */ // eslint-disable-next-line @fluidx/ffx-rules/prefer-private-fields -- TODO: Exception added when rule was enabled. Please consider refactoring this to use ECMAScript # prefixed private properties for better minification\n isNonProductionAudience(audience) {\n if (audience === 'Automation' || audience === 'Local' || audience === 'Staging') {\n return true;\n }\n return false;\n }\n /**\n * Registers a listener on Otel Notifications to log to console when the notification is an error.\n */ // eslint-disable-next-line @fluidx/ffx-rules/prefer-private-fields -- TODO: Exception added when rule was enabled. Please consider refactoring this to use ECMAScript # prefixed private properties for better minification\n registerOtelErrorsListener() {\n onNotification().addListener((event)=>{\n if (event.category === 0 && event.level === 0) {\n // TODO: console.log/warn/error should used for debugging only and never checked in\n // eslint-disable-next-line no-console\n console.error(event.message());\n }\n });\n }\n // eslint-disable-next-line @fluidx/ffx-rules/prefer-private-fields -- TODO: Exception added when rule was enabled. Please consider refactoring this to use ECMAScript # prefixed private properties for better minification\n getDataFieldsFromProps(props) {\n const dataFields = [];\n Object.keys(props).forEach((key)=>{\n const dataField = getOtelDataField(props[key], key);\n if (!dataField) {\n return;\n }\n dataFields.push(dataField);\n });\n if (props.dataFields) {\n const alreadyPresentdataFields = props.dataFields;\n dataFields.push(...alreadyPresentdataFields); //TODO: Modify this to take into consideration props that are already dataFields\n }\n return dataFields;\n }\n // eslint-disable-next-line @fluidx/ffx-rules/prefer-private-fields -- TODO: Exception added when rule was enabled. Please consider refactoring this to use ECMAScript # prefixed private properties for better minification\n logEventToOtelInternal(event, prepareEvent) {\n const telemetryEvent = this.getBasicOtelEvent(event);\n prepareEvent(telemetryEvent);\n this.telemetryLogger.sendTelemetryEvent(telemetryEvent);\n }\n // eslint-disable-next-line @fluidx/ffx-rules/prefer-private-fields -- TODO: Exception added when rule was enabled. Please consider refactoring this to use ECMAScript # prefixed private properties for better minification\n getBasicOtelEvent(event) {\n // Otel APIs will fail if the last part of the eventName is not uppercase\n let eventType = event.category && `${event.category.charAt(0).toUpperCase()}${event.category.substring(1)}`;\n // subCategory is appended at the end of the Table name in case of Generic events\n // If a subCategory is specified for any event other than a generic event, it will simply be logged as a column in the table\n if (event.props.subCategory && event.category === EventCategory.Generic) {\n eventType = eventType + `.${event.props.subCategory.charAt(0).toUpperCase()}${event.props.subCategory.substring(1)}`;\n }\n let requiresSampling = false;\n if (event.sampleEvent) {\n requiresSampling = event.sampleEvent;\n }\n return {\n eventName: `${this.ariaInfo.namespacePrefix}${event.namespace ? '.' + event.namespace : ''}.${eventType}`,\n eventFlags: {\n diagnosticLevel: EnumObjects.DiagnosticLevel.RequiredServiceData,\n samplingPolicy: requiresSampling ? EnumObjects.SamplingPolicy.Measure : undefined\n }\n };\n }\n // eslint-disable-next-line @fluidx/ffx-rules/prefer-private-fields -- TODO: Exception added when rule was enabled. Please consider refactoring this to use ECMAScript # prefixed private properties for better minification\n prepareDefaultOtelEvent(telemetryEvent, event) {\n telemetryEvent.eventFlags.dataCategories = EnumObjects.DataCategories.ProductServicePerformance;\n telemetryEvent.dataFields = this.getDataFieldsFromProps({\n ...event.props\n });\n }\n // eslint-disable-next-line @fluidx/ffx-rules/prefer-private-fields -- TODO: Exception added when rule was enabled. Please consider refactoring this to use ECMAScript # prefixed private properties for better minification\n mapActivityResultTypeToCode(resultType) {\n switch(resultType){\n case ActivityResultType.Failure:\n return 0;\n case ActivityResultType.Success:\n return 1;\n case ActivityResultType.Cancelled:\n return 2;\n }\n }\n // eslint-disable-next-line @fluidx/ffx-rules/prefer-private-fields -- TODO: Exception added when rule was enabled. Please consider refactoring this to use ECMAScript # prefixed private properties for better minification\n prepareBaseActivityOtelEvent(telemetryEvent, props, fromUserAction) {\n if (!props.durationMs) {\n props.durationMs = 0;\n }\n // Otel's Activity contract expects duration in microSeconds (not milliseconds), and expects it to be a round value.\n const durationInMicroseconds = Math.floor(props.durationMs * 1000);\n const { durationMs, succeeded, resultType, ...propsWithoutActivityData } = props;\n telemetryEvent.eventContract = {\n name: Activity.contractName,\n dataFields: Activity.getFields({\n duration: durationInMicroseconds,\n count: 1,\n aggMode: 0,\n success: succeeded,\n result: !fromUserAction && resultType ? {\n code: this.mapActivityResultTypeToCode(resultType),\n type: resultType\n } : undefined\n })\n };\n // returning new Props to make sure that we don't lose the fields in props that are not used for the activity\n return propsWithoutActivityData;\n }\n // eslint-disable-next-line @fluidx/ffx-rules/prefer-private-fields -- TODO: Exception added when rule was enabled. Please consider refactoring this to use ECMAScript # prefixed private properties for better minification\n prepareActivityOtelEvent(telemetryEvent, props) {\n const eventName = props.eventName;\n // Each activity is bucketed into its own eventName. Otel APIs will fail if the eventName doesn't start with a capital letter\n telemetryEvent.eventName += `.${eventName.charAt(0).toUpperCase()}${eventName.substring(1)}`;\n telemetryEvent.eventFlags.dataCategories = EnumObjects.DataCategories.ProductServicePerformance;\n const unusedProps = this.prepareBaseActivityOtelEvent(telemetryEvent, props, false);\n // Exception added when eslint rule was added, this should be revisited when modifying this code\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n telemetryEvent.dataFields = this.getDataFieldsFromProps(unusedProps || {});\n }\n // eslint-disable-next-line @fluidx/ffx-rules/prefer-private-fields -- TODO: Exception added when rule was enabled. Please consider refactoring this to use ECMAScript # prefixed private properties for better minification\n prepareUserActionOtelEvent(telemetryEvent, props, namespace) {\n const userActionEventName = props.eventName;\n // Each user action is bucketed into its own eventName. Otel APIs will fail if the eventName doesn't start with a capital letter\n telemetryEvent.eventName += `.${userActionEventName.charAt(0).toUpperCase()}${userActionEventName.substring(1)}`;\n telemetryEvent.eventFlags.dataCategories = EnumObjects.DataCategories.ProductServiceUsage;\n /**\n * To create Seen/Tried/Successful user funnels, events need to contain special DataFields generated from the Funnel contract. These fields are of the form Funnel_Name and Funnel_State.\n * Funnel_Name is an optional name of the feature/operation and Funnel_State defines whether an event is considered Seen/Tried/Successful\n * An event is considered Seen, when the user is exposed to fluid functionality, for example seeing a Fluid component insertion icon in Teams chat\n * An event is considered Tried, when the user tries inserting a Fluid component or loads a component shared with them\n * An event is considered Successful, when the user edits the component, for example inserts an atmention\n * All user actions are considered Successful by default\n * More details https://microsoft.sharepoint-df.com/:x:/t/OXODIG-Team/EbnL-NDqI8lGiAY9bidsVIABiDUE1xlj8VBO5TNNjMmwNg?e=jkhObs\n */ const userFunnelDataFields = Funnel.getFields('Funnel', {\n name: namespace,\n state: 'Successful'\n });\n const userData = props;\n // Add in the user action contract-specific fields\n const userActionEventDataFields = UserAction.getFields({\n id: userData.actionId,\n name: userActionEventName,\n commandSurface: userData.commandSurface,\n parentName: userData.parentName,\n triggerMethod: userData.triggerMethod,\n timeOffsetMs: userData.timeOffsetMs\n });\n const propsWithoutActivityData = this.prepareBaseActivityOtelEvent(telemetryEvent, props, true);\n const { eventName, actionId, commandSurface, parentName, triggerMethod, timeOffsetMs, ...unusedProps } = propsWithoutActivityData;\n telemetryEvent.dataFields = [\n ...userFunnelDataFields,\n ...userActionEventDataFields,\n // Exception added when eslint rule was added, this should be revisited when modifying this code\n // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition\n ...this.getDataFieldsFromProps(unusedProps || {})\n ];\n }\n /**\n * Lazy load the Asha package and initialize Asha.\n * Invoking this for a second or higher time should be a no-op if load was successful.\n * This method should only be called right before attempting to log an Asha event\n */ // eslint-disable-next-line @fluidx/ffx-rules/prefer-private-fields -- TODO: Exception added when rule was enabled. Please consider refactoring this to use ECMAScript # prefixed private properties for better minification\n loadAsha() {\n if (this.ashaLoadStarted) {\n return;\n }\n this.ashaLoadStarted = true;\n this.ashaUtils = import(/* webpackChunkName: \"AshaUtils\" */ './AshaUtils');\n this.ashaUtils.then(({ initializeAshaForFluid })=>initializeAshaForFluid(this.ariaInfo.namespacePrefix, this.initialPersistentProps, (event)=>{\n /**\n * Delete eventContract containing `AshaPartAMetadata`.\n * We will rely on partAMetadata from the telemetry sink.\n * ```json\n * \"eventContract\": {\n * \"dataFields\": [],\n * \"name\": \"AshaPartAMetadata\",\n * }\n * ```\n */ delete event.eventContract;\n this.telemetryLogger.sendTelemetryEvent(event);\n })).catch(()=>{\n this.ashaLoadStarted = false;\n this.logDefaultEventToOtel({\n category: EventCategory.Error,\n props: {\n eventName: 'AshaLoadFailure'\n }\n });\n });\n }\n}\n\n//# sourceMappingURL=BaseOtelLogProcessor.js.map","import { selectPillarByVeto } from './VetosByPillar';\nexport function prepareQoSEvent(event) {\n // Fill in ASHA event with default values where necessary\n const qosEvent = {\n ...event,\n // Temporary: Since current OWH ASHA logs predefine a pillar,\n // preserve that specified pillar otherwise we should map veto to known pillars\n pillar: event.pillar ?? selectPillarByVeto(event.veto),\n isIntentional: event.isIntentional ?? false,\n isInternal: event.isInternal ?? true,\n alertOnPillar: event.alertOnPillar ?? true,\n isSessionEndingError: event.isSessionEndingError ?? false\n };\n return qosEvent;\n}\nexport function isQoSEvent(event) {\n return 'eventName' in event && 'veto' in event;\n}\n\n//# sourceMappingURL=prepareQosEvent.js.map","import { EventCategory } from '@fluidx/office-fluid-types';\nimport { BaseOtelLogProcessor } from '../BaseOtelLogProcessor';\n/**\n * Log processor which uses a `TelemetrySink` provided by the Host to log events.\n * This means that the data that the Host added to their own `TelemetrySink` is going to be\n * respected in logs generated using this processor.\n * E.G. All the Otel PartA fields from the Host `TelemetrySink`.\n */ export class HostLogProcessor extends BaseOtelLogProcessor {\n constructor(hostTelemetrySink, audience, initialPersistentProps, options){\n super(audience, initialPersistentProps, options), this.hostTelemetrySink = hostTelemetrySink, // eslint-disable-next-line @fluidx/ffx-rules/prefer-private-fields -- TODO: Exception added when rule was enabled. Please consider refactoring this to use ECMAScript # prefixed private properties for better minification\n this.loadFullCalled = false;\n }\n /**\n * This is a no-op operation because this LogProcessor uses the host `TelemetrySink`, which doesn't implement `setUserContext`.\n */ setUserContext(_userContext) {}\n /**\n * This method provides a way to replace the installed telemetry sink with a new one. This is useful for when\n * logging config changes during the app session and you don't want to completely tear down the logger, but\n * rather swap some telemetry sink config on the fly.\n *\n * This essentially replicates the `loadFull` method, but allows you to pass in the telemetry sink instead of\n * depending on the `hostTelemetrySink` property.\n */ replaceTelemetrySink(telemetrySink) {\n // Reset the hostTelemetrySink with the new one passed in as it's the current sink in use\n this.hostTelemetrySink = telemetrySink;\n // Remove the current sink and replace it with the new one. We need to flush the queue in case any events\n // were logged while the new sink was being added to the logger.\n this.telemetryLogger.telemetrySinks.pop();\n this.telemetryLogger.addSink(telemetrySink);\n this.telemetryLogger.flushQueue();\n }\n /**\n * Loads the telemetry sink, replays events in the queue on the sink so the events are sent for logging.\n * Invoking this for a second or higher time will be a no-op.\n */ async loadFull() {\n if (this.loadFullCalled) {\n return;\n }\n this.loadFullCalled = true;\n try {\n const telemetrySink = await this.hostTelemetrySink;\n this.telemetryLogger.addSink(telemetrySink);\n this.telemetryLogger.flushQueue();\n } catch (error) {\n this.logDefaultEventToOtel({\n category: EventCategory.Error,\n props: {\n eventName: 'FailedToLoadTelemetrySink',\n message: `${error}`\n }\n });\n }\n }\n} // cspell:ignore otel, oteljs\n\n//# sourceMappingURL=HostLogProcessor.js.map","/**\n * Helper class to wrap the TelemetrySink with the LoopTelemetrySink provider implementation\n * so it can be registered to the dependency synthesizer.\n */ export class LoopTelemetrySinkImpl {\n constructor(telemetrySink){\n this.telemetrySink = telemetrySink;\n }\n //#region Disposable implementation\n get Disposable() {\n return this;\n }\n /**\n * Clean-up/disposal of resources\n * Use this guide https://office.visualstudio.com/OC/_git/office-bohemia?path=/docs/partner-guide/containers/HowToDisposeResources.md\n * for reference of what resources to dispose\n */ dispose() {}\n //#endregion Disposable\n get LoopTelemetrySink() {\n return this;\n }\n sendTelemetryEvent(telemetryEvent, timestamp) {\n this.telemetrySink.sendTelemetryEvent(telemetryEvent, timestamp);\n }\n sendCustomerContent(customerContentEvent) {\n this.telemetrySink.sendCustomerContent?.(customerContentEvent);\n }\n sendNonStandardEvent(telemetryEvent, eventType) {\n this.telemetrySink.sendNonStandardEvent?.(telemetryEvent, eventType);\n }\n}\n\n//# sourceMappingURL=LoopTelemetrySinkImpl.js.map","import { EventCategory } from '@fluidx/office-fluid-types';\nimport { BaseOtelLogProcessor } from '../BaseOtelLogProcessor';\nimport { LoopTelemetrySinkImpl } from '../../Utilities/LoopTelemetrySinkImpl';\nimport { isAllowedToLogEUPI } from '../../Utilities/LoggerHelpers';\nexport class FluidLogProcessor extends BaseOtelLogProcessor {\n constructor(context, initialPersistentProps){\n // Since the host is not passing a sink here, if we are in prod, we should not log EUPI\n const allowedToLogEUPI = isAllowedToLogEUPI(context.audience);\n const persistedProps = allowedToLogEUPI ? initialPersistentProps : {\n ...initialPersistentProps,\n hostCorrelationId: ''\n }; // scrub the host correlation id property\n super(context.audience, persistedProps), this.context = context, // eslint-disable-next-line @fluidx/ffx-rules/prefer-private-fields -- TODO: Exception added when rule was enabled. Please consider refactoring this to use ECMAScript # prefixed private properties for better minification\n this.loadFullCalled = false, // eslint-disable-next-line @fluidx/ffx-rules/prefer-private-fields -- TODO: Exception added when rule was enabled. Please consider refactoring this to use ECMAScript # prefixed private properties for better minification\n this.allowedToLogEupi = false;\n this.loopTelemetrySinkPromise = new Promise((resolve)=>this.loopTelemetrySinkPromiseResolve = resolve);\n this.allowedToLogEupi = allowedToLogEUPI;\n this.scrubContextIfNecessary();\n }\n getLoopTelemetrySinkPromise() {\n // Call .then() to work around Chromium memory leak bug (https://bugs.chromium.org/p/v8/issues/detail?id=13736)\n return this.loopTelemetrySinkPromise.then();\n }\n /**\n * Method that logs the telemetry event based on the event category\n * @param event Telemetry event with namespace, category and a property bag of other fields\n */ async logEvent(event) {\n if (!this.allowedToLogEupi) {\n // scrub any additional hostCorrelationId the host might have passed through the NameSpaceLogger\n event.props = {\n ...event.props,\n hostCorrelationId: ''\n };\n }\n // If the logger hasn't been fully loaded but an error occurs, load OneDs Sink.\n // This starts flushing the events and ensures telemetry for any crashes gets sent to the pipeline.\n if (event.category === EventCategory.Error) {\n if (!this.loadFullCalled) {\n this.loadFull().catch(()=>{\n // We do not need to explicitly handle the catch here as loadFull handles it internally\n });\n }\n }\n // Calling BaseOtelLogProcessor LogEvent\n return super.logEvent(event);\n }\n /**\n * Clears the sessionId and user object off of the logger context if we are filtering out EUPI\n */ // eslint-disable-next-line @fluidx/ffx-rules/prefer-private-fields -- TODO: Exception added when rule was enabled. Please consider refactoring this to use ECMAScript # prefixed private properties for better minification\n scrubContextIfNecessary() {\n if (this.allowedToLogEupi) {\n return;\n }\n this.context.sessionId = '';\n this.context.user = undefined;\n }\n setUserContext(userContext) {\n // We update the OtelLogProcessor's context, to ensure full context is replayed if this method is called before loadFull was called\n // loadFull creates the telemetry sink and provides the context to it, so those fields can be added as Part A fields when the sink is created\n this.context = {\n ...this.context,\n ...userContext\n };\n this.scrubContextIfNecessary();\n this.telemetrySink?.setPartADataFields(this.context);\n }\n shutdown() {\n super.shutdown();\n // If OneDsSink has not been fully loaded, call loadFull on it first then call shutdown\n this.loadFull().then(()=>this.telemetrySink?.shutdown()).catch(()=>{\n // We do not need to explicitly handle the catch here as loadFull handles it internally\n });\n }\n /**\n * Loads the OneDS Sink, replays events in the queue on the sink so the events are sent for logging.\n * Invoking this for a second or higher time will be a no-op.\n */ async loadFull() {\n if (this.loadFullCalled) {\n return;\n }\n this.loadFullCalled = true;\n import(/* webpackChunkName: \"officeFluidOneDsSink\" */ './OfficeFluidOneDsSink').then((m)=>{\n this.telemetrySink = new m.OfficeFluidOneDsSink(this.context);\n const oneDsSink = this.telemetrySink.createOneDsSink();\n this.telemetryLogger.addSink(oneDsSink);\n this.telemetryLogger.flushQueue();\n this.loopTelemetrySinkPromiseResolve?.(new LoopTelemetrySinkImpl(oneDsSink));\n }).catch((error)=>{\n this.logDefaultEventToOtel({\n category: EventCategory.Error,\n props: {\n eventName: 'LoggerLoadFailure',\n message: error.message,\n stack: error.stack\n }\n });\n });\n }\n} // cspell:ignore otel, oteljs\n\n//# sourceMappingURL=FluidLogProcessor.js.map","import { BaseLogger } from '../BaseLogger';\nimport { consoleLogProcessor } from '../LogProcessor/ConsoleLogProcessor';\nimport { FluidLogProcessor, HostLogProcessor } from '../LogProcessor';\nimport { UnhandledErrorEvent, UnhandledRejectionEvent } from '../Utilities';\nimport { EventCategory } from '@fluidx/office-fluid-types';\nimport { LoopTelemetrySinkImpl } from '../Utilities/LoopTelemetrySinkImpl';\n/**\n * Implementation of the Logger interface that buffers events and delegates events to a LogProcessor once it is fully loaded.\n */ export class OfficeFluidLogger extends BaseLogger {\n get Disposable() {\n return this;\n }\n get PersistedProperties() {\n return this;\n }\n getTelemetrySinkPromise() {\n // Call .then() to work around Chromium memory leak bug (https://bugs.chromium.org/p/v8/issues/detail?id=13736)\n return this.telemetrySinkPromise.then();\n }\n /**\n * Constructor to initialize the Logger.\n */ constructor(config){\n const hostTelemetryContext = config.hostTelemetryContext;\n const persistentProps = {\n ...config.persistentProps,\n hostCorrelationId: hostTelemetryContext.hostCorrelationId,\n // HostScenarioName = __\n hostScenarioName: [\n hostTelemetryContext.hostScenarioLifecycle,\n hostTelemetryContext.hostScenarioName,\n hostTelemetryContext.hostScenarioEntryPoint\n ].filter((item)=>item) // Filter only to non-empty values\n .join('_'),\n hostName: hostTelemetryContext.hostName,\n hostScenarioStartTime: hostTelemetryContext.hostScenarioStartTime,\n // Adding loopAudience here so it gets logged as Data_loopAudience\n // We found a bug where the Json Processor in Native Clients ignore the Loop_Audience field,\n // so we need to bring back the Data_loopAudience field\n loopAudience: config.audience,\n // Adding the following to log these values as extra columns in Kusto\n // these values will not change any existing metrics and become relevant when App != Host (eg. LoopWorkspaceComponent)\n // Check https://eng.ms/docs/experiences-devices/opg/office-shared/loop-experiences/loop-experiences/loop-experiences-ffx-docs/docs/partner-guide/hosting/telemetry/telemetryproperties#:~:text=host%20using%20hostContext.-,HostContext,-This%20is%20Loop for more details.\n hostSessionId: hostTelemetryContext.hostSessionId,\n hostAppVersion: hostTelemetryContext.hostAppVersion,\n hostAppPlatform: hostTelemetryContext.hostAppPlatform\n };\n super(persistentProps, config.namespace), this.forceTelemetryToConsole = false, /**\n * Prevents new events from being added for transmission. It also batches all\n * events currently in the queue, and creates requests for them to be sent.\n * Make sure that this is called after logging events related to session end.\n */ this.dispose = ()=>{\n this.logProcessors.forEach((processor)=>processor.shutdown());\n }, /** An alias for the \"dispose\" method.\n * @see dispose\n */ this.shutdown = ()=>{\n this.Disposable.dispose();\n };\n const { delayLoadLogger, hostTelemetrySink } = config;\n this.audience = config.audience;\n this.logProcessors = [\n ...config.additionalLogProcessors || []\n ];\n try {\n this.forceTelemetryToConsole = localStorage.getItem('debugPurple') === '1';\n if (this.forceTelemetryToConsole) {\n consoleLogProcessor.setSessionId(config.hostTelemetryContext.hostSessionId);\n this.logProcessors.push(consoleLogProcessor);\n }\n } catch {\n // Storage might not be available in some scenarios due to tracking protection.\n // Tracking protection settings are immutable within an app session so it is okay to detect\n // that state only once during the logger's lifetime.\n }\n // If hostTelemetrySink is provided, use HostLogProcessor to load the host telemetry sink\n // Otherwise, FluidLogProcessor will load the default OfficeFluid OneDsSink\n if (hostTelemetrySink) {\n this.telemetrySinkPromise = Promise.resolve(hostTelemetrySink).then((telemetrySink)=>new LoopTelemetrySinkImpl(telemetrySink));\n this.logProcessors.push(new HostLogProcessor(hostTelemetrySink, this.audience, persistentProps, {\n useFluidWorkspacesAriaInfo: config.useFluidWorkspacesAriaInfo\n }));\n } else {\n // Log an error event when host hasn't passed a telemetry sink\n // In the future, we want to deprecate default telemetry sink\n this.sendWithNamespace({\n eventName: 'HostPassedTelemetrySinkNotPassed',\n sinkPassed: false,\n category: 'Error',\n sampleEvent: true\n }, 'HostPassedTelemetrySink' // namespace\n );\n const logProcessor = new FluidLogProcessor({\n appPlatform: hostTelemetryContext.hostAppPlatform,\n appName: hostTelemetryContext.hostAppName,\n appVersion: hostTelemetryContext.hostAppVersion,\n user: hostTelemetryContext.userContext?.user,\n sessionId: hostTelemetryContext.hostSessionId,\n audience: this.audience,\n uiLanguage: config.hostTelemetryContext.uiLanguage\n }, persistentProps);\n this.telemetrySinkPromise = logProcessor.getLoopTelemetrySinkPromise();\n this.logProcessors.push(logProcessor);\n }\n // The OtelLogProcessor has the logic to push events into a queue, so consumers of OtelJs APIs can delay load the one ds sink\n // If delayLoadLogger is not passed or set as false, load the telemetry sink right away\n if (!delayLoadLogger) {\n this.loadFull().catch(()=>{\n // We do not need to explicitly handle the catch here as loadFull handles it internally\n });\n }\n if (config.hostMetadata && !config.skipInitializationLogs) {\n const { hostMetadata } = config;\n const hostFlights = hostMetadata.hostFlights;\n const hostFlightsMetadata = hostMetadata.hostFlightsMetadata;\n this.sendWithNamespace({\n eventName: 'HostMetadata',\n hostRing: hostMetadata.hostRing,\n hostFlights: hostFlights && JSON.stringify(hostFlights),\n hostFlightsMetadata: hostFlightsMetadata && JSON.stringify(hostFlightsMetadata),\n category: 'Generic'\n }, 'HostMetadata' // namespace\n );\n }\n }\n /**\n * Calls the logProcessor's loadFull method, so the telemetry sink is loaded and events in the telemetryLogger's queue are sent to the pipeline.\n * The host application is responsible for calling this method if delayLoadLogger is set to true.\n * This is useful when hosts want to instantiate the logger but want to reduce the initial bits pulled down.\n * If delayLoadLogger is undefined or set to false, the OfficeFluidLogger calls the loadFull method from the constructor\n * Invoking this for a second or higher time will be a no-op.\n */ async loadFull() {\n // Adding this back because we need to continue to expose loadFull as it was public method, but this can call loadFull from the logProcessor\n try {\n await Promise.allSettled([\n this.logProcessors.map((processor)=>processor.loadFull())\n ]);\n } catch {\n // We do not need to explicitly handle the catch here as logProcessor.loadFull handles it internally\n }\n }\n /**\n * Sets special, well-known persistent fields for User Identity on the events logged through the logger.\n * These fields have to be logged in a certain way by the logProcessor.\n * For example, the OtelLogProcessor converts these fields such that it follows the Office Schema.\n */ setUserContext(context) {\n this.logProcessors.forEach((processor)=>processor.setUserContext(context));\n }\n logEvent(event) {\n this.logProcessors.forEach((processor)=>processor.logEvent(event));\n // Console log error events in local dev scenarios\n const isLocalDevScenario = this.audience === 'Local';\n if (isLocalDevScenario) {\n // Unhandled errors will already appear in console log.\n const isHandledEvent = event.props.eventName !== UnhandledErrorEvent && event.props.eventName !== UnhandledRejectionEvent;\n const isErrorEvent = event.category === EventCategory.Error || event.category === EventCategory.Activity && event.props.succeeded === false;\n // We don't want to log duplicates so don't do anything if forceTelemetryToConsole is set.\n if (isHandledEvent && isErrorEvent && !this.forceTelemetryToConsole) {\n // TODO: console.log/warn/error should used for debugging only and never checked in\n // eslint-disable-next-line no-console\n console.error('OfficeFluidLogger %s %s event:', event.props.eventName, event.category, event.props, event.props.stack);\n }\n }\n }\n addPersistedProperties(properties) {\n super.addPersistedProperties(properties);\n import(/* webpackChunkName: \"AshaUtils\" */ '../LogProcessor/AshaUtils').then(({ updateAshaAdditionalPartCEventDataFromTelemetryProperties })=>updateAshaAdditionalPartCEventDataFromTelemetryProperties(properties)).catch(()=>{\n this.send({\n category: 'Error',\n eventName: 'AshaUpdatePartCEventDataFailure'\n });\n });\n }\n} // cspell:ignore otel\n\n//# sourceMappingURL=OfficeFluidLogger.js.map","// Error and rejection event names in Fluid telemetry\nexport const UnhandledErrorEvent = 'UnhandledError';\nexport const UnhandledRejectionEvent = 'UnhandledRejection';\n\n//# sourceMappingURL=UnhandledEventsTypes.js.map","import type {\r\n Environment,\r\n HTMLView,\r\n ProvideDisposable,\r\n ProvideHTMLViewable,\r\n Provider,\r\n SymbolProvider,\r\n} from '@fluidx/loop-types';\r\nimport {\r\n CdnCodeLoaderFactory,\r\n LoopRegistrationId,\r\n createWorkspaceComponentRouterInput,\r\n} from '@fluidx/loop-workspace-component';\r\nimport type {\r\n NavigationParams,\r\n ProvideWorkspaceAndPageManager,\r\n ProvideWorkspaceNavigationHandler,\r\n} from '@fluidx/loop-workspace-types';\r\nimport type { OfficeFluidLogger } from '@fluidx/telemetry';\r\nimport type { Locale } from '@fluidx/utilities';\r\nimport type { AdditionalTrackerProps, GetLoopComponentProps } from '@ms/office-web-host';\r\nimport {\r\n HostActivity,\r\n HostActivityTracker,\r\n getLoopComponent,\r\n} from '@ms/office-web-host';\r\nimport type { HostAuthService } from '../auth/HostAuthService';\r\nimport { NotifyClient } from '../interop';\r\nimport type { M365ChatSettingsProvider } from '../providers/M365ChatSettingsProvider';\r\nimport type { DependencySynthesizerService } from '../service/DependencySynthesizerService';\r\nimport type { AppWorkspaceManager } from '../service/workspaceManager/AppWorkspaceManager';\r\nimport { createOfficeFluidTelemetryLogger } from '../telemetry/FluidTelemetryLogger';\r\nimport { TelemetryActivityTracker } from '../telemetry/TelemetryActivityTracker';\r\nimport { TelemetryLogger } from '../telemetry/TelemetryLogger';\r\n\r\nexport type ActionProviderTypes =\r\n & ProvideHTMLViewable\r\n & ProvideDisposable\r\n & ProvideWorkspaceAndPageManager\r\n & ProvideWorkspaceNavigationHandler;\r\nconst requiredProviderTypes: SymbolProvider = {\r\n HTMLViewable: 'HTMLViewable',\r\n Disposable: 'Disposable',\r\n WorkspaceAndPageManager: 'WorkspaceAndPageManager',\r\n WorkspaceNavigationHandler: 'WorkspaceNavigationHandler',\r\n};\r\n\r\nexport type LoadLoopWorkspaceComponentResult = {\r\n loopComponent: Provider;\r\n fluidLogger: OfficeFluidLogger;\r\n view: HTMLView | undefined;\r\n};\r\n\r\nexport const loadLoopWorkspaceComponent = async (\r\n appWorkspaceManager: AppWorkspaceManager,\r\n authService: HostAuthService,\r\n dependencySynthesizerService: DependencySynthesizerService,\r\n environment: Environment,\r\n locale: Locale,\r\n loadNavParams: NavigationParams,\r\n shouldRender: boolean,\r\n m365ChatSettingsProvider: M365ChatSettingsProvider,\r\n renderTarget?: HTMLElement,\r\n): Promise => {\r\n return TelemetryActivityTracker.runActivity(\r\n 'LoadLoopWorkspaceEndToEnd',\r\n async (activity) => {\r\n activity.addData('InViewPort', shouldRender);\r\n const preloadStartTime = Date.now();\r\n const fluidLogger = createOfficeFluidTelemetryLogger(\r\n authService.getUserContext(),\r\n );\r\n activity.addData('HostScenarioStartTime', preloadStartTime);\r\n const dependencySynthesizer = await dependencySynthesizerService.registerProviders(\r\n appWorkspaceManager,\r\n authService,\r\n environment,\r\n fluidLogger,\r\n locale,\r\n m365ChatSettingsProvider,\r\n );\r\n\r\n // Pre-caching LWC\r\n void preCacheCodeLoader(environment, locale);\r\n\r\n const loadProps: GetLoopComponentProps = {\r\n dependencySynthesizer,\r\n loopComponentRouterInput:\r\n createWorkspaceComponentRouterInput(loadNavParams),\r\n config: {\r\n environment: environment,\r\n logger: fluidLogger,\r\n },\r\n requiredProviderTypes,\r\n };\r\n const preloadEndTime = Date.now();\r\n activity.addData('PreloadDuration', preloadEndTime - preloadStartTime);\r\n // Load and render the component if render is enabled\r\n const scenarioTracker = HostActivityTracker.startScenario(\r\n fluidLogger,\r\n 'Load',\r\n );\r\n try {\r\n console.log('HostedWorkspaceUI loadAndRender: awaiting component');\r\n const component = await loadLoopComponent(loadProps);\r\n const view = (await getView(component, fluidLogger))?.HTMLView;\r\n\r\n if (shouldRender && renderTarget) {\r\n await renderView(view, renderTarget, fluidLogger, scenarioTracker);\r\n } else {\r\n scenarioTracker.setSuccess({ inViewport: false });\r\n }\r\n\r\n return {\r\n loopComponent: component,\r\n fluidLogger,\r\n view,\r\n };\r\n } catch (error) {\r\n scenarioTracker.setFailure(error, { inViewport: shouldRender });\r\n TelemetryLogger.Instance.logError('LoadLoopWorkspaceComponent', error, {\r\n ErrorMethod: 'loadLoopWorkspaceComponent',\r\n });\r\n console.error(\r\n 'HostedWorkspaceUI loadAndRender: error loading component',\r\n error,\r\n );\r\n throw error;\r\n }\r\n }\r\n );\r\n};\r\n\r\nexport const renderView = async (\r\n view: HTMLView | undefined,\r\n renderTarget: HTMLElement,\r\n fluidLogger: OfficeFluidLogger,\r\n loadScenarioTracker?: HostActivityTracker,\r\n): Promise => {\r\n const renderActivity = HostActivityTracker.startActivity(fluidLogger, HostActivity.RenderComponent);\r\n try {\r\n console.log('HostedWorkspaceUI loadAndRender: rendering view');\r\n await render(view, renderTarget);\r\n const postRenderActivity = HostActivityTracker.startActivity(fluidLogger, HostActivity.PostRender);\r\n // Set success after pixels are painted\r\n requestAnimationFrame(() => {\r\n loadScenarioTracker?.setSuccess({ inViewport: true });\r\n postRenderActivity.setSuccess();\r\n renderActivity.setSuccess();\r\n // Notify the host that the component has been rendered\r\n void NotifyClient.renderCompleteEvent();\r\n });\r\n console.log('HostedWorkspaceUI loadAndRender: view rendered');\r\n } catch (error) {\r\n renderActivity.setFailure(error);\r\n throw error;\r\n }\r\n};\r\n\r\nconst preCacheCodeLoader = async (environment: Environment, locale: Locale) => {\r\n return TelemetryActivityTracker.runActivity('PreCacheCodeLoader', async () => {\r\n try {\r\n const codeLoader = await CdnCodeLoaderFactory.instantiateLoopCodeLoader({\r\n windowContext: window,\r\n trustedTypesPolicy: undefined,\r\n audience: environment.audience,\r\n localeHint: locale,\r\n });\r\n\r\n await codeLoader.preCache?.(LoopRegistrationId);\r\n console.log('HostedWorkspaceUI loadAndRender: pre-caching complete');\r\n } catch (error) {\r\n TelemetryLogger.Instance.logError('CdnCodeLoaderPreCacheError', error, {\r\n ErrorMethod: 'LoadLoopWorkspaceComponent',\r\n });\r\n console.error(\r\n 'HostedWorkspaceUI loadAndRender: pre-caching failed',\r\n error,\r\n );\r\n }\r\n });\r\n};\r\n\r\nconst loadLoopComponent = async (\r\n loadProps: GetLoopComponentProps,\r\n) => {\r\n return TelemetryActivityTracker.runActivity('LoadLoopComponent', async () => {\r\n return await getLoopComponent(loadProps);\r\n });\r\n};\r\n\r\nconst getView = async (component: Provider, fluidLogger: OfficeFluidLogger) => {\r\n return TelemetryActivityTracker.runActivity('GetLoopView', async () => {\r\n return HostActivityTracker.startActivity(fluidLogger, 'GetView' as HostActivity, async () => {\r\n return component.HTMLViewable?.getView();\r\n });\r\n });\r\n};\r\n\r\nconst render = async (\r\n view: HTMLView | undefined,\r\n renderTarget: HTMLElement,\r\n) => {\r\n return TelemetryActivityTracker.runActivity(\r\n 'RenderLoopComponent',\r\n async () => {\r\n return await view?.render(renderTarget);\r\n },\r\n );\r\n};\r\n","import type { UserContext } from '@fluidx/loop-types';\r\nimport type { HostScenarioLifecycle } from '@fluidx/telemetry';\r\nimport { OfficeFluidLogger } from '@fluidx/telemetry';\r\nimport { getAudience } from '../utils/Environment';\r\nimport { HostAppSettings } from '../utils/HostAppSettings';\r\nimport { OfficeTelemetrySinkWrapper } from './OfficeTelemetrySinkWrapper';\r\n\r\nexport const createOfficeFluidTelemetryLogger = (\r\n userContext: UserContext,\r\n hostScenarioLifecycle?: HostScenarioLifecycle,\r\n hostScenarioEntryPoint?: string,\r\n hostScenarioName?: string,\r\n hostScenarioStartTime?: number\r\n) => {\r\n const hostCorrelationId = HostAppSettings.getCorrelationId();\r\n const hostSessionId = HostAppSettings.getSessionId();\r\n\r\n // Default values for host scenario\r\n const defaultHostScenarioLifecycle = 'Load';\r\n const defaultHostScenarioName = 'Notebook';\r\n const defaultHostScenarioEntryPoint = 'NotebooksModuleHome';\r\n const defaultHostScenarioStartTime = Date.now();\r\n\r\n console.log('Host Correlation Id: ', hostCorrelationId);\r\n console.log('Host Session Id: ', hostSessionId);\r\n\r\n return new OfficeFluidLogger({\r\n hostTelemetryContext: {\r\n hostName: 'OneNote',\r\n hostAppPlatform: HostAppSettings.getPlatform(),\r\n hostAppName: 'OneNote',\r\n hostCorrelationId,\r\n hostScenarioLifecycle:\r\n hostScenarioLifecycle ?? defaultHostScenarioLifecycle,\r\n hostScenarioName: hostScenarioName ?? defaultHostScenarioName,\r\n hostScenarioEntryPoint:\r\n hostScenarioEntryPoint ?? defaultHostScenarioEntryPoint,\r\n hostScenarioStartTime:\r\n hostScenarioStartTime ?? defaultHostScenarioStartTime,\r\n hostSessionId,\r\n hostAppVersion: Office.context.diagnostics.version,\r\n userContext\r\n },\r\n hostTelemetrySink: OfficeTelemetrySinkWrapper.Instance,\r\n audience: getAudience(),\r\n });\r\n};\r\n","import { initializeTelemetryInDiv } from './LoadHelpers';\nimport { getDependencySynthesizerWithLoopLoader, getLoopComponentInternal } from './getLoopComponentInternal';\nimport { getDependencySynthesizerWithNestedDependencyContainer } from './getLoopComponentInternal/injectedDependencies';\nimport { Deferred } from '@fluidx/utilities';\nimport { resolveUrlPromiseOnContainerAttach } from './Utils/resolveUrlPromiseOnContainerAttach';\n/**\n * Returns a loop component, given appropriate information and configuration. If a component implements ProvideComponentInitializer to\n * initialize model data, the returned promise will resolve when the initialize promise resolves.\n */ export function getLoopComponent({ loopComponentRouterInput, dependencySynthesizer: hostDependencySynthesizer, config, fluidRequestHeaders, requiredProviderTypes }) {\n const { logger, newConfig, perfMetadata, documentHiddenTrackerId } = initializeTelemetryInDiv(config || {});\n /* eslint-disable-next-line no-restricted-globals -- For a top-level API for loading Loops in a non-iframe flow, it's OK to use the current \"window\" object */ const windowContextForLoader = window;\n let dependencySynthesizer = getDependencySynthesizerWithLoopLoader(hostDependencySynthesizer, {\n windowContextForLoader\n });\n const urlPromise = new Deferred();\n dependencySynthesizer = getDependencySynthesizerWithNestedDependencyContainer(dependencySynthesizer, urlPromise, logger);\n const loopLoadedInfo = getLoopComponentInternal({\n windowContextForLoader,\n loopComponentRouterInput,\n dependencySynthesizer,\n config: newConfig,\n logger,\n perfMetadata,\n documentHiddenTrackerId,\n fluidRequestHeaders,\n requiredProviderTypes\n });\n resolveUrlPromiseOnContainerAttach(urlPromise, loopLoadedInfo.container);\n return Promise.all([\n loopLoadedInfo.container,\n loopLoadedInfo.component\n ]).then(([_, component])=>component);\n}\n\n//# sourceMappingURL=getLoopComponent.js.map","/**\n * Default implementation of insertion factory. Inserts styles only once per renderer and performs\n * insertion immediately after styles computation.\n *\n * @internal\n */\nconst insertionFactory = () => {\n const insertionCache = {};\n return function insertStyles(renderer, cssRules) {\n if (insertionCache[renderer.id] === undefined) {\n renderer.insertCSSRules(cssRules);\n insertionCache[renderer.id] = true;\n }\n };\n};\n\nexport { insertionFactory };\n//# sourceMappingURL=insertionFactory.esm.js.map\n","/* eslint-disable */\n// Inspired by https://github.com/garycourt/murmurhash-js\n// Ported from https://github.com/aappleby/smhasher/blob/61a0530f28277f2e850bfc39600ce61d02b518de/src/MurmurHash2.cpp#L37-L86\nfunction murmur2(str) {\n // 'm' and 'r' are mixing constants generated offline.\n // They're not really 'magic', they just happen to work well.\n // const m = 0x5bd1e995;\n // const r = 24;\n // Initialize the hash\n var h = 0; // Mix 4 bytes at a time into the hash\n\n var k,\n i = 0,\n len = str.length;\n\n for (; len >= 4; ++i, len -= 4) {\n k = str.charCodeAt(i) & 0xff | (str.charCodeAt(++i) & 0xff) << 8 | (str.charCodeAt(++i) & 0xff) << 16 | (str.charCodeAt(++i) & 0xff) << 24;\n k =\n /* Math.imul(k, m): */\n (k & 0xffff) * 0x5bd1e995 + ((k >>> 16) * 0xe995 << 16);\n k ^=\n /* k >>> r: */\n k >>> 24;\n h =\n /* Math.imul(k, m): */\n (k & 0xffff) * 0x5bd1e995 + ((k >>> 16) * 0xe995 << 16) ^\n /* Math.imul(h, m): */\n (h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);\n } // Handle the last few bytes of the input array\n\n\n switch (len) {\n case 3:\n h ^= (str.charCodeAt(i + 2) & 0xff) << 16;\n\n case 2:\n h ^= (str.charCodeAt(i + 1) & 0xff) << 8;\n\n case 1:\n h ^= str.charCodeAt(i) & 0xff;\n h =\n /* Math.imul(h, m): */\n (h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);\n } // Do a few final mixes of the hash to ensure the last few\n // bytes are well-incorporated.\n\n\n h ^= h >>> 13;\n h =\n /* Math.imul(h, m): */\n (h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);\n return ((h ^ h >>> 15) >>> 0).toString(36);\n}\n\nexport { murmur2 as default };\n","/**\n * Takes an array of [keyValue1, keyValue2] pairs and creates an object of {keyValue1: keyValue2, keyValue2: keyValue1}\n * @param {Array} array the array of pairs\n * @return {Object} the {key, value} pair object\n */\nfunction arrayToObject(array) {\n return array.reduce(function (obj, _ref) {\n var prop1 = _ref[0],\n prop2 = _ref[1];\n obj[prop1] = prop2;\n obj[prop2] = prop1;\n return obj;\n }, {});\n}\nfunction isBoolean(val) {\n return typeof val === 'boolean';\n}\nfunction isFunction(val) {\n return typeof val === 'function';\n}\nfunction isNumber(val) {\n return typeof val === 'number';\n}\nfunction isNullOrUndefined(val) {\n return val === null || typeof val === 'undefined';\n}\nfunction isObject(val) {\n return val && typeof val === 'object';\n}\nfunction isString(val) {\n return typeof val === 'string';\n}\nfunction includes(inclusive, inclusee) {\n return inclusive.indexOf(inclusee) !== -1;\n}\n\n/**\n * Flip the sign of a CSS value, possibly with a unit.\n *\n * We can't just negate the value with unary minus due to the units.\n *\n * @private\n * @param {String} value - the original value (for example 77%)\n * @return {String} the result (for example -77%)\n */\nfunction flipSign(value) {\n if (parseFloat(value) === 0) {\n // Don't mangle zeroes\n return value;\n }\n if (value[0] === '-') {\n return value.slice(1);\n }\n return \"-\" + value;\n}\nfunction flipTransformSign(match, prefix, offset, suffix) {\n return prefix + flipSign(offset) + suffix;\n}\n\n/**\n * Takes a percentage for background position and inverts it.\n * This was copied and modified from CSSJanus:\n * https://github.com/cssjanus/cssjanus/blob/4245f834365f6cfb0239191a151432fb85abab23/src/cssjanus.js#L152-L175\n * @param {String} value - the original value (for example 77%)\n * @return {String} the result (for example 23%)\n */\nfunction calculateNewBackgroundPosition(value) {\n var idx = value.indexOf('.');\n if (idx === -1) {\n value = 100 - parseFloat(value) + \"%\";\n } else {\n // Two off, one for the \"%\" at the end, one for the dot itself\n var len = value.length - idx - 2;\n value = 100 - parseFloat(value);\n value = value.toFixed(len) + \"%\";\n }\n return value;\n}\n\n/**\n * This takes a list of CSS values and converts it to an array\n * @param {String} value - something like `1px`, `1px 2em`, or `3pt rgb(150, 230, 550) 40px calc(100% - 5px)`\n * @return {Array} the split values (for example: `['3pt', 'rgb(150, 230, 550)', '40px', 'calc(100% - 5px)']`)\n */\nfunction getValuesAsList(value) {\n return value.replace(/ +/g, ' ') // remove all extraneous spaces\n .split(' ').map(function (i) {\n return i.trim();\n }) // get rid of extra space before/after each item\n .filter(Boolean) // get rid of empty strings\n // join items which are within parenthese\n // luckily `calc (100% - 5px)` is invalid syntax and it must be `calc(100% - 5px)`, otherwise this would be even more complex\n .reduce(function (_ref2, item) {\n var list = _ref2.list,\n state = _ref2.state;\n var openParansCount = (item.match(/\\(/g) || []).length;\n var closedParansCount = (item.match(/\\)/g) || []).length;\n if (state.parensDepth > 0) {\n list[list.length - 1] = list[list.length - 1] + \" \" + item;\n } else {\n list.push(item);\n }\n state.parensDepth += openParansCount - closedParansCount;\n return {\n list: list,\n state: state\n };\n }, {\n list: [],\n state: {\n parensDepth: 0\n }\n }).list;\n}\n\n/**\n * This is intended for properties that are `top right bottom left` and will switch them to `top left bottom right`\n * @param {String} value - `1px 2px 3px 4px` for example, but also handles cases where there are too few/too many and\n * simply returns the value in those cases (which is the correct behavior)\n * @return {String} the result - `1px 4px 3px 2px` for example.\n */\nfunction handleQuartetValues(value) {\n var splitValues = getValuesAsList(value);\n if (splitValues.length <= 3 || splitValues.length > 4) {\n return value;\n }\n var top = splitValues[0],\n right = splitValues[1],\n bottom = splitValues[2],\n left = splitValues[3];\n return [top, left, bottom, right].join(' ');\n}\n\n/**\n *\n * @param {String|Number|Object} value css property value to test\n * @returns If the css property value can(should?) have an RTL equivalent\n */\nfunction canConvertValue(value) {\n return !isBoolean(value) && !isNullOrUndefined(value);\n}\n\n/**\n * Splits a shadow style into its separate shadows using the comma delimiter, but creating an exception\n * for comma separated values in parentheses often used for rgba colours.\n * @param {String} value\n * @returns {Array} array of all box shadow values in the string\n */\nfunction splitShadow(value) {\n var shadows = [];\n var start = 0;\n var end = 0;\n var rgba = false;\n while (end < value.length) {\n if (!rgba && value[end] === ',') {\n shadows.push(value.substring(start, end).trim());\n end++;\n start = end;\n } else if (value[end] === \"(\") {\n rgba = true;\n end++;\n } else if (value[end] === ')') {\n rgba = false;\n end++;\n } else {\n end++;\n }\n }\n\n // push the last shadow value if there is one\n // istanbul ignore next\n if (start != end) {\n shadows.push(value.substring(start, end + 1));\n }\n return shadows;\n}\n\n// some values require a little fudging, that fudging goes here.\nvar propertyValueConverters = {\n padding: function padding(_ref) {\n var value = _ref.value;\n if (isNumber(value)) {\n return value;\n }\n return handleQuartetValues(value);\n },\n textShadow: function textShadow(_ref2) {\n var value = _ref2.value;\n var flippedShadows = splitShadow(value).map(function (shadow) {\n // intentionally leaving off the `g` flag here because we only want to change the first number (which is the offset-x)\n return shadow.replace(/(^|\\s)(-*)([.|\\d]+)/, function (match, whiteSpace, negative, number) {\n if (number === '0') {\n return match;\n }\n var doubleNegative = negative === '' ? '-' : '';\n return \"\" + whiteSpace + doubleNegative + number;\n });\n });\n return flippedShadows.join(',');\n },\n borderColor: function borderColor(_ref3) {\n var value = _ref3.value;\n return handleQuartetValues(value);\n },\n borderRadius: function borderRadius(_ref4) {\n var value = _ref4.value;\n if (isNumber(value)) {\n return value;\n }\n if (includes(value, '/')) {\n var _value$split = value.split('/'),\n radius1 = _value$split[0],\n radius2 = _value$split[1];\n var convertedRadius1 = propertyValueConverters.borderRadius({\n value: radius1.trim()\n });\n var convertedRadius2 = propertyValueConverters.borderRadius({\n value: radius2.trim()\n });\n return convertedRadius1 + \" / \" + convertedRadius2;\n }\n var splitValues = getValuesAsList(value);\n switch (splitValues.length) {\n case 2:\n {\n return splitValues.reverse().join(' ');\n }\n case 4:\n {\n var topLeft = splitValues[0],\n topRight = splitValues[1],\n bottomRight = splitValues[2],\n bottomLeft = splitValues[3];\n return [topRight, topLeft, bottomLeft, bottomRight].join(' ');\n }\n default:\n {\n return value;\n }\n }\n },\n background: function background(_ref5) {\n var value = _ref5.value,\n valuesToConvert = _ref5.valuesToConvert,\n isRtl = _ref5.isRtl,\n bgImgDirectionRegex = _ref5.bgImgDirectionRegex,\n bgPosDirectionRegex = _ref5.bgPosDirectionRegex;\n if (isNumber(value)) {\n return value;\n }\n\n // Yeah, this is in need of a refactor 🙃...\n // but this property is a tough cookie 🍪\n // get the backgroundPosition out of the string by removing everything that couldn't be the backgroundPosition value\n var backgroundPositionValue = value.replace(/(url\\(.*?\\))|(rgba?\\(.*?\\))|(hsl\\(.*?\\))|(#[a-fA-F0-9]+)|((^| )(\\D)+( |$))/g, '').trim();\n // replace that backgroundPosition value with the converted version\n value = value.replace(backgroundPositionValue, propertyValueConverters.backgroundPosition({\n value: backgroundPositionValue,\n valuesToConvert: valuesToConvert,\n isRtl: isRtl,\n bgPosDirectionRegex: bgPosDirectionRegex\n }));\n // do the backgroundImage value replacing on the whole value (because why not?)\n return propertyValueConverters.backgroundImage({\n value: value,\n valuesToConvert: valuesToConvert,\n bgImgDirectionRegex: bgImgDirectionRegex\n });\n },\n backgroundImage: function backgroundImage(_ref6) {\n var value = _ref6.value,\n valuesToConvert = _ref6.valuesToConvert,\n bgImgDirectionRegex = _ref6.bgImgDirectionRegex;\n if (!includes(value, 'url(') && !includes(value, 'linear-gradient(')) {\n return value;\n }\n return value.replace(bgImgDirectionRegex, function (match, g1, group2) {\n return match.replace(group2, valuesToConvert[group2]);\n });\n },\n backgroundPosition: function backgroundPosition(_ref7) {\n var value = _ref7.value,\n valuesToConvert = _ref7.valuesToConvert,\n isRtl = _ref7.isRtl,\n bgPosDirectionRegex = _ref7.bgPosDirectionRegex;\n return value\n // intentionally only grabbing the first instance of this because that represents `left`\n .replace(isRtl ? /^((-|\\d|\\.)+%)/ : null, function (match, group) {\n return calculateNewBackgroundPosition(group);\n }).replace(bgPosDirectionRegex, function (match) {\n return valuesToConvert[match];\n });\n },\n backgroundPositionX: function backgroundPositionX(_ref8) {\n var value = _ref8.value,\n valuesToConvert = _ref8.valuesToConvert,\n isRtl = _ref8.isRtl,\n bgPosDirectionRegex = _ref8.bgPosDirectionRegex;\n if (isNumber(value)) {\n return value;\n }\n return propertyValueConverters.backgroundPosition({\n value: value,\n valuesToConvert: valuesToConvert,\n isRtl: isRtl,\n bgPosDirectionRegex: bgPosDirectionRegex\n });\n },\n transition: function transition(_ref9) {\n var value = _ref9.value,\n propertiesToConvert = _ref9.propertiesToConvert;\n return value.split(/,\\s*/g).map(function (transition) {\n var values = transition.split(' ');\n\n // Property is always defined first\n values[0] = propertiesToConvert[values[0]] || values[0];\n return values.join(' ');\n }).join(', ');\n },\n transitionProperty: function transitionProperty(_ref10) {\n var value = _ref10.value,\n propertiesToConvert = _ref10.propertiesToConvert;\n return value.split(/,\\s*/g).map(function (prop) {\n return propertiesToConvert[prop] || prop;\n }).join(', ');\n },\n transform: function transform(_ref11) {\n var value = _ref11.value;\n // This was copied and modified from CSSJanus:\n // https://github.com/cssjanus/cssjanus/blob/4a40f001b1ba35567112d8b8e1d9d95eda4234c3/src/cssjanus.js#L152-L153\n var nonAsciiPattern = \"[^\\\\u0020-\\\\u007e]\";\n var escapePattern = \"(?:\" + '(?:(?:\\\\[0-9a-f]{1,6})(?:\\\\r\\\\n|\\\\s)?)' + \"|\\\\\\\\[^\\\\r\\\\n\\\\f0-9a-f])\";\n var signedQuantPattern = \"((?:-?\" + ('(?:[0-9]*\\\\.[0-9]+|[0-9]+)' + \"(?:\\\\s*\" + '(?:em|ex|px|cm|mm|in|pt|pc|deg|rad|grad|ms|s|hz|khz|%)' + \"|\" + (\"-?\" + (\"(?:[_a-z]|\" + nonAsciiPattern + \"|\" + escapePattern + \")\") + (\"(?:[_a-z0-9-]|\" + nonAsciiPattern + \"|\" + escapePattern + \")\") + \"*\") + \")?\") + \")|(?:inherit|auto))\";\n var translateXRegExp = new RegExp(\"(translateX\\\\s*\\\\(\\\\s*)\" + signedQuantPattern + \"(\\\\s*\\\\))\", 'gi');\n var translateRegExp = new RegExp(\"(translate\\\\s*\\\\(\\\\s*)\" + signedQuantPattern + \"((?:\\\\s*,\\\\s*\" + signedQuantPattern + \"){0,1}\\\\s*\\\\))\", 'gi');\n var translate3dRegExp = new RegExp(\"(translate3d\\\\s*\\\\(\\\\s*)\" + signedQuantPattern + \"((?:\\\\s*,\\\\s*\" + signedQuantPattern + \"){0,2}\\\\s*\\\\))\", 'gi');\n var rotateRegExp = new RegExp(\"(rotate[ZY]?\\\\s*\\\\(\\\\s*)\" + signedQuantPattern + \"(\\\\s*\\\\))\", 'gi');\n return value.replace(translateXRegExp, flipTransformSign).replace(translateRegExp, flipTransformSign).replace(translate3dRegExp, flipTransformSign).replace(rotateRegExp, flipTransformSign);\n }\n};\npropertyValueConverters.objectPosition = propertyValueConverters.backgroundPosition;\npropertyValueConverters.margin = propertyValueConverters.padding;\npropertyValueConverters.borderWidth = propertyValueConverters.padding;\npropertyValueConverters.boxShadow = propertyValueConverters.textShadow;\npropertyValueConverters.webkitBoxShadow = propertyValueConverters.boxShadow;\npropertyValueConverters.mozBoxShadow = propertyValueConverters.boxShadow;\npropertyValueConverters.WebkitBoxShadow = propertyValueConverters.boxShadow;\npropertyValueConverters.MozBoxShadow = propertyValueConverters.boxShadow;\npropertyValueConverters.borderStyle = propertyValueConverters.borderColor;\npropertyValueConverters.webkitTransform = propertyValueConverters.transform;\npropertyValueConverters.mozTransform = propertyValueConverters.transform;\npropertyValueConverters.WebkitTransform = propertyValueConverters.transform;\npropertyValueConverters.MozTransform = propertyValueConverters.transform;\npropertyValueConverters.transformOrigin = propertyValueConverters.backgroundPosition;\npropertyValueConverters.webkitTransformOrigin = propertyValueConverters.transformOrigin;\npropertyValueConverters.mozTransformOrigin = propertyValueConverters.transformOrigin;\npropertyValueConverters.WebkitTransformOrigin = propertyValueConverters.transformOrigin;\npropertyValueConverters.MozTransformOrigin = propertyValueConverters.transformOrigin;\npropertyValueConverters.webkitTransition = propertyValueConverters.transition;\npropertyValueConverters.mozTransition = propertyValueConverters.transition;\npropertyValueConverters.WebkitTransition = propertyValueConverters.transition;\npropertyValueConverters.MozTransition = propertyValueConverters.transition;\npropertyValueConverters.webkitTransitionProperty = propertyValueConverters.transitionProperty;\npropertyValueConverters.mozTransitionProperty = propertyValueConverters.transitionProperty;\npropertyValueConverters.WebkitTransitionProperty = propertyValueConverters.transitionProperty;\npropertyValueConverters.MozTransitionProperty = propertyValueConverters.transitionProperty;\n\n// kebab-case versions\n\npropertyValueConverters['text-shadow'] = propertyValueConverters.textShadow;\npropertyValueConverters['border-color'] = propertyValueConverters.borderColor;\npropertyValueConverters['border-radius'] = propertyValueConverters.borderRadius;\npropertyValueConverters['background-image'] = propertyValueConverters.backgroundImage;\npropertyValueConverters['background-position'] = propertyValueConverters.backgroundPosition;\npropertyValueConverters['background-position-x'] = propertyValueConverters.backgroundPositionX;\npropertyValueConverters['object-position'] = propertyValueConverters.objectPosition;\npropertyValueConverters['border-width'] = propertyValueConverters.padding;\npropertyValueConverters['box-shadow'] = propertyValueConverters.textShadow;\npropertyValueConverters['-webkit-box-shadow'] = propertyValueConverters.textShadow;\npropertyValueConverters['-moz-box-shadow'] = propertyValueConverters.textShadow;\npropertyValueConverters['border-style'] = propertyValueConverters.borderColor;\npropertyValueConverters['-webkit-transform'] = propertyValueConverters.transform;\npropertyValueConverters['-moz-transform'] = propertyValueConverters.transform;\npropertyValueConverters['transform-origin'] = propertyValueConverters.transformOrigin;\npropertyValueConverters['-webkit-transform-origin'] = propertyValueConverters.transformOrigin;\npropertyValueConverters['-moz-transform-origin'] = propertyValueConverters.transformOrigin;\npropertyValueConverters['-webkit-transition'] = propertyValueConverters.transition;\npropertyValueConverters['-moz-transition'] = propertyValueConverters.transition;\npropertyValueConverters['transition-property'] = propertyValueConverters.transitionProperty;\npropertyValueConverters['-webkit-transition-property'] = propertyValueConverters.transitionProperty;\npropertyValueConverters['-moz-transition-property'] = propertyValueConverters.transitionProperty;\n\n// this will be an object of properties that map to their corresponding rtl property (their doppelganger)\nvar propertiesToConvert = arrayToObject([['paddingLeft', 'paddingRight'], ['marginLeft', 'marginRight'], ['left', 'right'], ['borderLeft', 'borderRight'], ['borderLeftColor', 'borderRightColor'], ['borderLeftStyle', 'borderRightStyle'], ['borderLeftWidth', 'borderRightWidth'], ['borderTopLeftRadius', 'borderTopRightRadius'], ['borderBottomLeftRadius', 'borderBottomRightRadius'],\n// kebab-case versions\n['padding-left', 'padding-right'], ['margin-left', 'margin-right'], ['border-left', 'border-right'], ['border-left-color', 'border-right-color'], ['border-left-style', 'border-right-style'], ['border-left-width', 'border-right-width'], ['border-top-left-radius', 'border-top-right-radius'], ['border-bottom-left-radius', 'border-bottom-right-radius']]);\nvar propsToIgnore = ['content'];\n\n// this is the same as the propertiesToConvert except for values\nvar valuesToConvert = arrayToObject([['ltr', 'rtl'], ['left', 'right'], ['w-resize', 'e-resize'], ['sw-resize', 'se-resize'], ['nw-resize', 'ne-resize']]);\n\n// Sorry for the regex 😞, but basically thisis used to replace _every_ instance of\n// `ltr`, `rtl`, `right`, and `left` in `backgroundimage` with the corresponding opposite.\n// A situation we're accepting here:\n// url('/left/right/rtl/ltr.png') will be changed to url('/right/left/ltr/rtl.png')\n// Definite trade-offs here, but I think it's a good call.\nvar bgImgDirectionRegex = new RegExp('(^|\\\\W|_)((ltr)|(rtl)|(left)|(right))(\\\\W|_|$)', 'g');\nvar bgPosDirectionRegex = new RegExp('(left)|(right)');\n\n/**\n * converts properties and values in the CSS in JS object to their corresponding RTL values\n * @param {Object} object the CSS in JS object\n * @return {Object} the RTL converted object\n */\nfunction convert(object) {\n return Object.keys(object).reduce(function (newObj, originalKey) {\n var originalValue = object[originalKey];\n if (isString(originalValue)) {\n // you're welcome to later code 😺\n originalValue = originalValue.trim();\n }\n\n // Some properties should never be transformed\n if (includes(propsToIgnore, originalKey)) {\n newObj[originalKey] = originalValue;\n return newObj;\n }\n var _convertProperty = convertProperty(originalKey, originalValue),\n key = _convertProperty.key,\n value = _convertProperty.value;\n newObj[key] = value;\n return newObj;\n }, Array.isArray(object) ? [] : {});\n}\n\n/**\n * Converts a property and its value to the corresponding RTL key and value\n * @param {String} originalKey the original property key\n * @param {Number|String|Object} originalValue the original css property value\n * @return {Object} the new {key, value} pair\n */\nfunction convertProperty(originalKey, originalValue) {\n var isNoFlip = /\\/\\*\\s?@noflip\\s?\\*\\//.test(originalValue);\n var key = isNoFlip ? originalKey : getPropertyDoppelganger(originalKey);\n var value = isNoFlip ? originalValue : getValueDoppelganger(key, originalValue);\n return {\n key: key,\n value: value\n };\n}\n\n/**\n * This gets the RTL version of the given property if it has a corresponding RTL property\n * @param {String} property the name of the property\n * @return {String} the name of the RTL property\n */\nfunction getPropertyDoppelganger(property) {\n return propertiesToConvert[property] || property;\n}\n\n/**\n * This converts the given value to the RTL version of that value based on the key\n * @param {String} key this is the key (note: this should be the RTL version of the originalKey)\n * @param {String|Number|Object} originalValue the original css property value. If it's an object, then we'll convert that as well\n * @return {String|Number|Object} the converted value\n */\nfunction getValueDoppelganger(key, originalValue) {\n if (!canConvertValue(originalValue)) {\n return originalValue;\n }\n if (isObject(originalValue)) {\n return convert(originalValue); // recursion 🌀\n }\n\n var isNum = isNumber(originalValue);\n var isFunc = isFunction(originalValue);\n var importantlessValue = isNum || isFunc ? originalValue : originalValue.replace(/ !important.*?$/, '');\n var isImportant = !isNum && importantlessValue.length !== originalValue.length;\n var valueConverter = propertyValueConverters[key];\n var newValue;\n if (valueConverter) {\n newValue = valueConverter({\n value: importantlessValue,\n valuesToConvert: valuesToConvert,\n propertiesToConvert: propertiesToConvert,\n isRtl: true,\n bgImgDirectionRegex: bgImgDirectionRegex,\n bgPosDirectionRegex: bgPosDirectionRegex\n });\n } else {\n newValue = valuesToConvert[importantlessValue] || importantlessValue;\n }\n if (isImportant) {\n return newValue + \" !important\";\n }\n return newValue;\n}\n\nexport { propertiesToConvert as a, propsToIgnore as b, convert as c, convertProperty as d, getValueDoppelganger as e, arrayToObject as f, getPropertyDoppelganger as g, calculateNewBackgroundPosition as h, canConvertValue as i, flipTransformSign as j, flipSign as k, handleQuartetValues as l, includes as m, isBoolean as n, isFunction as o, propertyValueConverters as p, isNumber as q, isNullOrUndefined as r, isObject as s, isString as t, getValuesAsList as u, valuesToConvert as v, splitShadow as w };\n","// ----\n// Heads up!\n// These constants are global and will be shared between Griffel instances.\n// Any change in them should happen only in a MAJOR version. If it happens,\n// please change \"__NAMESPACE_PREFIX__\" to include a version.\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst __GLOBAL__ = typeof window === 'undefined' ? global : window;\nconst __NAMESPACE_PREFIX__ = '@griffel/';\nfunction getGlobalVar(name, defaultValue) {\n if (!__GLOBAL__[Symbol.for(__NAMESPACE_PREFIX__ + name)]) {\n __GLOBAL__[Symbol.for(__NAMESPACE_PREFIX__ + name)] = defaultValue;\n }\n return __GLOBAL__[Symbol.for(__NAMESPACE_PREFIX__ + name)];\n}\n/** @internal */\nconst DEBUG_RESET_CLASSES = /*#__PURE__*/getGlobalVar('DEBUG_RESET_CLASSES', {});\n/** @internal */\nconst DEFINITION_LOOKUP_TABLE = /*#__PURE__*/getGlobalVar('DEFINITION_LOOKUP_TABLE', {});\n// ----\n/** @internal */\nconst DATA_BUCKET_ATTR = 'data-make-styles-bucket';\n/** @internal */\nconst DATA_PRIORITY_ATTR = 'data-priority';\n/** @internal */\nconst HASH_PREFIX = 'f';\n/** @internal */\nconst RESET_HASH_PREFIX = 'r';\n/** @internal */\nconst SEQUENCE_HASH_LENGTH = 7;\n/** @internal */\nconst SEQUENCE_PREFIX = '___';\n/** @internal */\nconst DEBUG_SEQUENCE_SEPARATOR = '_';\n/** @internal */\nconst SEQUENCE_SIZE = process.env.NODE_ENV === 'production' ? SEQUENCE_PREFIX.length + SEQUENCE_HASH_LENGTH : SEQUENCE_PREFIX.length + SEQUENCE_HASH_LENGTH + DEBUG_SEQUENCE_SEPARATOR.length + SEQUENCE_HASH_LENGTH;\n// indexes for values in LookupItem tuple\n/** @internal */\nconst LOOKUP_DEFINITIONS_INDEX = 0;\n/** @internal */\nconst LOOKUP_DIR_INDEX = 1;\n// This collection is a map simply for faster access when checking if a CSS property is unsupported\n/** @internal */\nconst UNSUPPORTED_CSS_PROPERTIES = {\n all: 1,\n borderColor: 1,\n borderStyle: 1,\n borderWidth: 1,\n borderBlock: 1,\n borderBlockEnd: 1,\n borderBlockStart: 1,\n borderInline: 1,\n borderInlineEnd: 1,\n borderInlineStart: 1\n};\n/**\n * Removes a CSS property from the style object.\n *\n * @link https://griffel.js.org/react/api/make-styles\n *\n * Do not use the value directly, use `RESET` constant instead.\n */\nconst RESET = 'DO_NOT_USE_DIRECTLY: @griffel/reset-value';\n\nexport { DATA_BUCKET_ATTR, DATA_PRIORITY_ATTR, DEBUG_RESET_CLASSES, DEBUG_SEQUENCE_SEPARATOR, DEFINITION_LOOKUP_TABLE, HASH_PREFIX, LOOKUP_DEFINITIONS_INDEX, LOOKUP_DIR_INDEX, RESET, RESET_HASH_PREFIX, SEQUENCE_HASH_LENGTH, SEQUENCE_PREFIX, SEQUENCE_SIZE, UNSUPPORTED_CSS_PROPERTIES };\n//# sourceMappingURL=constants.esm.js.map\n","const uppercasePattern = /[A-Z]/g;\nconst msPattern = /^ms-/;\nconst cache = {};\nfunction toHyphenLower(match) {\n return '-' + match.toLowerCase();\n}\nfunction hyphenateProperty(name) {\n if (Object.prototype.hasOwnProperty.call(cache, name)) {\n return cache[name];\n }\n if (name.substr(0, 2) === '--') {\n return name;\n }\n const hName = name.replace(uppercasePattern, toHyphenLower);\n return cache[name] = msPattern.test(hName) ? '-' + hName : hName;\n}\n\nexport { hyphenateProperty };\n//# sourceMappingURL=hyphenateProperty.esm.js.map\n","function normalizeNestedProperty(nestedProperty) {\n if (nestedProperty.charAt(0) === '&') {\n return nestedProperty.slice(1);\n }\n return nestedProperty;\n}\n\nexport { normalizeNestedProperty };\n//# sourceMappingURL=normalizeNestedProperty.esm.js.map\n","export var MS = '-ms-'\nexport var MOZ = '-moz-'\nexport var WEBKIT = '-webkit-'\n\nexport var COMMENT = 'comm'\nexport var RULESET = 'rule'\nexport var DECLARATION = 'decl'\n\nexport var PAGE = '@page'\nexport var MEDIA = '@media'\nexport var IMPORT = '@import'\nexport var CHARSET = '@charset'\nexport var VIEWPORT = '@viewport'\nexport var SUPPORTS = '@supports'\nexport var DOCUMENT = '@document'\nexport var NAMESPACE = '@namespace'\nexport var KEYFRAMES = '@keyframes'\nexport var FONT_FACE = '@font-face'\nexport var COUNTER_STYLE = '@counter-style'\nexport var FONT_FEATURE_VALUES = '@font-feature-values'\nexport var LAYER = '@layer'\nexport var SCOPE = '@scope'\n","/**\n * @param {number}\n * @return {number}\n */\nexport var abs = Math.abs\n\n/**\n * @param {number}\n * @return {string}\n */\nexport var from = String.fromCharCode\n\n/**\n * @param {object}\n * @return {object}\n */\nexport var assign = Object.assign\n\n/**\n * @param {string} value\n * @param {number} length\n * @return {number}\n */\nexport function hash (value, length) {\n\treturn charat(value, 0) ^ 45 ? (((((((length << 2) ^ charat(value, 0)) << 2) ^ charat(value, 1)) << 2) ^ charat(value, 2)) << 2) ^ charat(value, 3) : 0\n}\n\n/**\n * @param {string} value\n * @return {string}\n */\nexport function trim (value) {\n\treturn value.trim()\n}\n\n/**\n * @param {string} value\n * @param {RegExp} pattern\n * @return {string?}\n */\nexport function match (value, pattern) {\n\treturn (value = pattern.exec(value)) ? value[0] : value\n}\n\n/**\n * @param {string} value\n * @param {(string|RegExp)} pattern\n * @param {string} replacement\n * @return {string}\n */\nexport function replace (value, pattern, replacement) {\n\treturn value.replace(pattern, replacement)\n}\n\n/**\n * @param {string} value\n * @param {string} search\n * @param {number} position\n * @return {number}\n */\nexport function indexof (value, search, position) {\n\treturn value.indexOf(search, position)\n}\n\n/**\n * @param {string} value\n * @param {number} index\n * @return {number}\n */\nexport function charat (value, index) {\n\treturn value.charCodeAt(index) | 0\n}\n\n/**\n * @param {string} value\n * @param {number} begin\n * @param {number} end\n * @return {string}\n */\nexport function substr (value, begin, end) {\n\treturn value.slice(begin, end)\n}\n\n/**\n * @param {string} value\n * @return {number}\n */\nexport function strlen (value) {\n\treturn value.length\n}\n\n/**\n * @param {any[]} value\n * @return {number}\n */\nexport function sizeof (value) {\n\treturn value.length\n}\n\n/**\n * @param {any} value\n * @param {any[]} array\n * @return {any}\n */\nexport function append (value, array) {\n\treturn array.push(value), value\n}\n\n/**\n * @param {string[]} array\n * @param {function} callback\n * @return {string}\n */\nexport function combine (array, callback) {\n\treturn array.map(callback).join('')\n}\n\n/**\n * @param {string[]} array\n * @param {RegExp} pattern\n * @return {string[]}\n */\nexport function filter (array, pattern) {\n\treturn array.filter(function (value) { return !match(value, pattern) })\n}\n","import {IMPORT, LAYER, COMMENT, RULESET, DECLARATION, KEYFRAMES} from './Enum.js'\nimport {strlen} from './Utility.js'\n\n/**\n * @param {object[]} children\n * @param {function} callback\n * @return {string}\n */\nexport function serialize (children, callback) {\n\tvar output = ''\n\n\tfor (var i = 0; i < children.length; i++)\n\t\toutput += callback(children[i], i, children, callback) || ''\n\n\treturn output\n}\n\n/**\n * @param {object} element\n * @param {number} index\n * @param {object[]} children\n * @param {function} callback\n * @return {string}\n */\nexport function stringify (element, index, children, callback) {\n\tswitch (element.type) {\n\t\tcase LAYER: if (element.children.length) break\n\t\tcase IMPORT: case DECLARATION: return element.return = element.return || element.value\n\t\tcase COMMENT: return ''\n\t\tcase KEYFRAMES: return element.return = element.value + '{' + serialize(element.children, callback) + '}'\n\t\tcase RULESET: if (!strlen(element.value = element.props.join(','))) return ''\n\t}\n\n\treturn strlen(children = serialize(element.children, callback)) ? element.return = element.value + '{' + children + '}' : ''\n}\n","import {from, trim, charat, strlen, substr, append, assign} from './Utility.js'\n\nexport var line = 1\nexport var column = 1\nexport var length = 0\nexport var position = 0\nexport var character = 0\nexport var characters = ''\n\n/**\n * @param {string} value\n * @param {object | null} root\n * @param {object | null} parent\n * @param {string} type\n * @param {string[] | string} props\n * @param {object[] | string} children\n * @param {object[]} siblings\n * @param {number} length\n */\nexport function node (value, root, parent, type, props, children, length, siblings) {\n\treturn {value: value, root: root, parent: parent, type: type, props: props, children: children, line: line, column: column, length: length, return: '', siblings: siblings}\n}\n\n/**\n * @param {object} root\n * @param {object} props\n * @return {object}\n */\nexport function copy (root, props) {\n\treturn assign(node('', null, null, '', null, null, 0, root.siblings), root, {length: -root.length}, props)\n}\n\n/**\n * @param {object} root\n */\nexport function lift (root) {\n\twhile (root.root)\n\t\troot = copy(root.root, {children: [root]})\n\n\tappend(root, root.siblings)\n}\n\n/**\n * @return {number}\n */\nexport function char () {\n\treturn character\n}\n\n/**\n * @return {number}\n */\nexport function prev () {\n\tcharacter = position > 0 ? charat(characters, --position) : 0\n\n\tif (column--, character === 10)\n\t\tcolumn = 1, line--\n\n\treturn character\n}\n\n/**\n * @return {number}\n */\nexport function next () {\n\tcharacter = position < length ? charat(characters, position++) : 0\n\n\tif (column++, character === 10)\n\t\tcolumn = 1, line++\n\n\treturn character\n}\n\n/**\n * @return {number}\n */\nexport function peek () {\n\treturn charat(characters, position)\n}\n\n/**\n * @return {number}\n */\nexport function caret () {\n\treturn position\n}\n\n/**\n * @param {number} begin\n * @param {number} end\n * @return {string}\n */\nexport function slice (begin, end) {\n\treturn substr(characters, begin, end)\n}\n\n/**\n * @param {number} type\n * @return {number}\n */\nexport function token (type) {\n\tswitch (type) {\n\t\t// \\0 \\t \\n \\r \\s whitespace token\n\t\tcase 0: case 9: case 10: case 13: case 32:\n\t\t\treturn 5\n\t\t// ! + , / > @ ~ isolate token\n\t\tcase 33: case 43: case 44: case 47: case 62: case 64: case 126:\n\t\t// ; { } breakpoint token\n\t\tcase 59: case 123: case 125:\n\t\t\treturn 4\n\t\t// : accompanied token\n\t\tcase 58:\n\t\t\treturn 3\n\t\t// \" ' ( [ opening delimit token\n\t\tcase 34: case 39: case 40: case 91:\n\t\t\treturn 2\n\t\t// ) ] closing delimit token\n\t\tcase 41: case 93:\n\t\t\treturn 1\n\t}\n\n\treturn 0\n}\n\n/**\n * @param {string} value\n * @return {any[]}\n */\nexport function alloc (value) {\n\treturn line = column = 1, length = strlen(characters = value), position = 0, []\n}\n\n/**\n * @param {any} value\n * @return {any}\n */\nexport function dealloc (value) {\n\treturn characters = '', value\n}\n\n/**\n * @param {number} type\n * @return {string}\n */\nexport function delimit (type) {\n\treturn trim(slice(position - 1, delimiter(type === 91 ? type + 2 : type === 40 ? type + 1 : type)))\n}\n\n/**\n * @param {string} value\n * @return {string[]}\n */\nexport function tokenize (value) {\n\treturn dealloc(tokenizer(alloc(value)))\n}\n\n/**\n * @param {number} type\n * @return {string}\n */\nexport function whitespace (type) {\n\twhile (character = peek())\n\t\tif (character < 33)\n\t\t\tnext()\n\t\telse\n\t\t\tbreak\n\n\treturn token(type) > 2 || token(character) > 3 ? '' : ' '\n}\n\n/**\n * @param {string[]} children\n * @return {string[]}\n */\nexport function tokenizer (children) {\n\twhile (next())\n\t\tswitch (token(character)) {\n\t\t\tcase 0: append(identifier(position - 1), children)\n\t\t\t\tbreak\n\t\t\tcase 2: append(delimit(character), children)\n\t\t\t\tbreak\n\t\t\tdefault: append(from(character), children)\n\t\t}\n\n\treturn children\n}\n\n/**\n * @param {number} index\n * @param {number} count\n * @return {string}\n */\nexport function escaping (index, count) {\n\twhile (--count && next())\n\t\t// not 0-9 A-F a-f\n\t\tif (character < 48 || character > 102 || (character > 57 && character < 65) || (character > 70 && character < 97))\n\t\t\tbreak\n\n\treturn slice(index, caret() + (count < 6 && peek() == 32 && next() == 32))\n}\n\n/**\n * @param {number} type\n * @return {number}\n */\nexport function delimiter (type) {\n\twhile (next())\n\t\tswitch (character) {\n\t\t\t// ] ) \" '\n\t\t\tcase type:\n\t\t\t\treturn position\n\t\t\t// \" '\n\t\t\tcase 34: case 39:\n\t\t\t\tif (type !== 34 && type !== 39)\n\t\t\t\t\tdelimiter(character)\n\t\t\t\tbreak\n\t\t\t// (\n\t\t\tcase 40:\n\t\t\t\tif (type === 41)\n\t\t\t\t\tdelimiter(type)\n\t\t\t\tbreak\n\t\t\t// \\\n\t\t\tcase 92:\n\t\t\t\tnext()\n\t\t\t\tbreak\n\t\t}\n\n\treturn position\n}\n\n/**\n * @param {number} type\n * @param {number} index\n * @return {number}\n */\nexport function commenter (type, index) {\n\twhile (next())\n\t\t// //\n\t\tif (type + character === 47 + 10)\n\t\t\tbreak\n\t\t// /*\n\t\telse if (type + character === 42 + 42 && peek() === 47)\n\t\t\tbreak\n\n\treturn '/*' + slice(index, position - 1) + '*' + from(type === 47 ? type : next())\n}\n\n/**\n * @param {number} index\n * @return {string}\n */\nexport function identifier (index) {\n\twhile (!token(peek()))\n\t\tnext()\n\n\treturn slice(index, position)\n}\n","import {COMMENT, RULESET, DECLARATION} from './Enum.js'\nimport {abs, charat, trim, from, sizeof, strlen, substr, append, replace, indexof} from './Utility.js'\nimport {node, char, prev, next, peek, caret, alloc, dealloc, delimit, whitespace, escaping, identifier, commenter} from './Tokenizer.js'\n\n/**\n * @param {string} value\n * @return {object[]}\n */\nexport function compile (value) {\n\treturn dealloc(parse('', null, null, null, [''], value = alloc(value), 0, [0], value))\n}\n\n/**\n * @param {string} value\n * @param {object} root\n * @param {object?} parent\n * @param {string[]} rule\n * @param {string[]} rules\n * @param {string[]} rulesets\n * @param {number[]} pseudo\n * @param {number[]} points\n * @param {string[]} declarations\n * @return {object}\n */\nexport function parse (value, root, parent, rule, rules, rulesets, pseudo, points, declarations) {\n\tvar index = 0\n\tvar offset = 0\n\tvar length = pseudo\n\tvar atrule = 0\n\tvar property = 0\n\tvar previous = 0\n\tvar variable = 1\n\tvar scanning = 1\n\tvar ampersand = 1\n\tvar character = 0\n\tvar type = ''\n\tvar props = rules\n\tvar children = rulesets\n\tvar reference = rule\n\tvar characters = type\n\n\twhile (scanning)\n\t\tswitch (previous = character, character = next()) {\n\t\t\t// (\n\t\t\tcase 40:\n\t\t\t\tif (previous != 108 && charat(characters, length - 1) == 58) {\n\t\t\t\t\tif (indexof(characters += replace(delimit(character), '&', '&\\f'), '&\\f', abs(index ? points[index - 1] : 0)) != -1)\n\t\t\t\t\t\tampersand = -1\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t// \" ' [\n\t\t\tcase 34: case 39: case 91:\n\t\t\t\tcharacters += delimit(character)\n\t\t\t\tbreak\n\t\t\t// \\t \\n \\r \\s\n\t\t\tcase 9: case 10: case 13: case 32:\n\t\t\t\tcharacters += whitespace(previous)\n\t\t\t\tbreak\n\t\t\t// \\\n\t\t\tcase 92:\n\t\t\t\tcharacters += escaping(caret() - 1, 7)\n\t\t\t\tcontinue\n\t\t\t// /\n\t\t\tcase 47:\n\t\t\t\tswitch (peek()) {\n\t\t\t\t\tcase 42: case 47:\n\t\t\t\t\t\tappend(comment(commenter(next(), caret()), root, parent, declarations), declarations)\n\t\t\t\t\t\tbreak\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tcharacters += '/'\n\t\t\t\t}\n\t\t\t\tbreak\n\t\t\t// {\n\t\t\tcase 123 * variable:\n\t\t\t\tpoints[index++] = strlen(characters) * ampersand\n\t\t\t// } ; \\0\n\t\t\tcase 125 * variable: case 59: case 0:\n\t\t\t\tswitch (character) {\n\t\t\t\t\t// \\0 }\n\t\t\t\t\tcase 0: case 125: scanning = 0\n\t\t\t\t\t// ;\n\t\t\t\t\tcase 59 + offset: if (ampersand == -1) characters = replace(characters, /\\f/g, '')\n\t\t\t\t\t\tif (property > 0 && (strlen(characters) - length))\n\t\t\t\t\t\t\tappend(property > 32 ? declaration(characters + ';', rule, parent, length - 1, declarations) : declaration(replace(characters, ' ', '') + ';', rule, parent, length - 2, declarations), declarations)\n\t\t\t\t\t\tbreak\n\t\t\t\t\t// @ ;\n\t\t\t\t\tcase 59: characters += ';'\n\t\t\t\t\t// { rule/at-rule\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tappend(reference = ruleset(characters, root, parent, index, offset, rules, points, type, props = [], children = [], length, rulesets), rulesets)\n\n\t\t\t\t\t\tif (character === 123)\n\t\t\t\t\t\t\tif (offset === 0)\n\t\t\t\t\t\t\t\tparse(characters, root, reference, reference, props, rulesets, length, points, children)\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\tswitch (atrule === 99 && charat(characters, 3) === 110 ? 100 : atrule) {\n\t\t\t\t\t\t\t\t\t// d l m s\n\t\t\t\t\t\t\t\t\tcase 100: case 108: case 109: case 115:\n\t\t\t\t\t\t\t\t\t\tparse(value, reference, reference, rule && append(ruleset(value, reference, reference, 0, 0, rules, points, type, rules, props = [], length, children), children), rules, children, length, points, rule ? props : children)\n\t\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t\t\tparse(characters, reference, reference, reference, [''], children, 0, points, children)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tindex = offset = property = 0, variable = ampersand = 1, type = characters = '', length = pseudo\n\t\t\t\tbreak\n\t\t\t// :\n\t\t\tcase 58:\n\t\t\t\tlength = 1 + strlen(characters), property = previous\n\t\t\tdefault:\n\t\t\t\tif (variable < 1)\n\t\t\t\t\tif (character == 123)\n\t\t\t\t\t\t--variable\n\t\t\t\t\telse if (character == 125 && variable++ == 0 && prev() == 125)\n\t\t\t\t\t\tcontinue\n\n\t\t\t\tswitch (characters += from(character), character * variable) {\n\t\t\t\t\t// &\n\t\t\t\t\tcase 38:\n\t\t\t\t\t\tampersand = offset > 0 ? 1 : (characters += '\\f', -1)\n\t\t\t\t\t\tbreak\n\t\t\t\t\t// ,\n\t\t\t\t\tcase 44:\n\t\t\t\t\t\tpoints[index++] = (strlen(characters) - 1) * ampersand, ampersand = 1\n\t\t\t\t\t\tbreak\n\t\t\t\t\t// @\n\t\t\t\t\tcase 64:\n\t\t\t\t\t\t// -\n\t\t\t\t\t\tif (peek() === 45)\n\t\t\t\t\t\t\tcharacters += delimit(next())\n\n\t\t\t\t\t\tatrule = peek(), offset = length = strlen(type = characters += identifier(caret())), character++\n\t\t\t\t\t\tbreak\n\t\t\t\t\t// -\n\t\t\t\t\tcase 45:\n\t\t\t\t\t\tif (previous === 45 && strlen(characters) == 2)\n\t\t\t\t\t\t\tvariable = 0\n\t\t\t\t}\n\t\t}\n\n\treturn rulesets\n}\n\n/**\n * @param {string} value\n * @param {object} root\n * @param {object?} parent\n * @param {number} index\n * @param {number} offset\n * @param {string[]} rules\n * @param {number[]} points\n * @param {string} type\n * @param {string[]} props\n * @param {string[]} children\n * @param {number} length\n * @param {object[]} siblings\n * @return {object}\n */\nexport function ruleset (value, root, parent, index, offset, rules, points, type, props, children, length, siblings) {\n\tvar post = offset - 1\n\tvar rule = offset === 0 ? rules : ['']\n\tvar size = sizeof(rule)\n\n\tfor (var i = 0, j = 0, k = 0; i < index; ++i)\n\t\tfor (var x = 0, y = substr(value, post + 1, post = abs(j = points[i])), z = value; x < size; ++x)\n\t\t\tif (z = trim(j > 0 ? rule[x] + ' ' + y : replace(y, /&\\f/g, rule[x])))\n\t\t\t\tprops[k++] = z\n\n\treturn node(value, root, parent, offset === 0 ? RULESET : type, props, children, length, siblings)\n}\n\n/**\n * @param {number} value\n * @param {object} root\n * @param {object?} parent\n * @param {object[]} siblings\n * @return {object}\n */\nexport function comment (value, root, parent, siblings) {\n\treturn node(value, root, parent, COMMENT, from(char()), substr(value, 2, -2), 0, siblings)\n}\n\n/**\n * @param {string} value\n * @param {object} root\n * @param {object?} parent\n * @param {number} length\n * @param {object[]} siblings\n * @return {object}\n */\nexport function declaration (value, root, parent, length, siblings) {\n\treturn node(value, root, parent, DECLARATION, substr(value, 0, length), substr(value, length + 1, -1), length, siblings)\n}\n","import {MS, MOZ, WEBKIT, RULESET, KEYFRAMES, DECLARATION} from './Enum.js'\nimport {match, charat, substr, strlen, sizeof, replace, combine, filter, assign} from './Utility.js'\nimport {copy, lift, tokenize} from './Tokenizer.js'\nimport {serialize} from './Serializer.js'\nimport {prefix} from './Prefixer.js'\n\n/**\n * @param {function[]} collection\n * @return {function}\n */\nexport function middleware (collection) {\n\tvar length = sizeof(collection)\n\n\treturn function (element, index, children, callback) {\n\t\tvar output = ''\n\n\t\tfor (var i = 0; i < length; i++)\n\t\t\toutput += collection[i](element, index, children, callback) || ''\n\n\t\treturn output\n\t}\n}\n\n/**\n * @param {function} callback\n * @return {function}\n */\nexport function rulesheet (callback) {\n\treturn function (element) {\n\t\tif (!element.root)\n\t\t\tif (element = element.return)\n\t\t\t\tcallback(element)\n\t}\n}\n\n/**\n * @param {object} element\n * @param {number} index\n * @param {object[]} children\n * @param {function} callback\n */\nexport function prefixer (element, index, children, callback) {\n\tif (element.length > -1)\n\t\tif (!element.return)\n\t\t\tswitch (element.type) {\n\t\t\t\tcase DECLARATION: element.return = prefix(element.value, element.length, children)\n\t\t\t\t\treturn\n\t\t\t\tcase KEYFRAMES:\n\t\t\t\t\treturn serialize([copy(element, {value: replace(element.value, '@', '@' + WEBKIT)})], callback)\n\t\t\t\tcase RULESET:\n\t\t\t\t\tif (element.length)\n\t\t\t\t\t\treturn combine(children = element.props, function (value) {\n\t\t\t\t\t\t\tswitch (match(value, callback = /(::plac\\w+|:read-\\w+)/)) {\n\t\t\t\t\t\t\t\t// :read-(only|write)\n\t\t\t\t\t\t\t\tcase ':read-only': case ':read-write':\n\t\t\t\t\t\t\t\t\tlift(copy(element, {props: [replace(value, /:(read-\\w+)/, ':' + MOZ + '$1')]}))\n\t\t\t\t\t\t\t\t\tlift(copy(element, {props: [value]}))\n\t\t\t\t\t\t\t\t\tassign(element, {props: filter(children, callback)})\n\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t\t// :placeholder\n\t\t\t\t\t\t\t\tcase '::placeholder':\n\t\t\t\t\t\t\t\t\tlift(copy(element, {props: [replace(value, /:(plac\\w+)/, ':' + WEBKIT + 'input-$1')]}))\n\t\t\t\t\t\t\t\t\tlift(copy(element, {props: [replace(value, /:(plac\\w+)/, ':' + MOZ + '$1')]}))\n\t\t\t\t\t\t\t\t\tlift(copy(element, {props: [replace(value, /:(plac\\w+)/, MS + 'input-$1')]}))\n\t\t\t\t\t\t\t\t\tlift(copy(element, {props: [value]}))\n\t\t\t\t\t\t\t\t\tassign(element, {props: filter(children, callback)})\n\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\treturn ''\n\t\t\t\t\t\t})\n\t\t\t}\n}\n\n/**\n * @param {object} element\n * @param {number} index\n * @param {object[]} children\n */\nexport function namespace (element) {\n\tswitch (element.type) {\n\t\tcase RULESET:\n\t\t\telement.props = element.props.map(function (value) {\n\t\t\t\treturn combine(tokenize(value), function (value, index, children) {\n\t\t\t\t\tswitch (charat(value, 0)) {\n\t\t\t\t\t\t// \\f\n\t\t\t\t\t\tcase 12:\n\t\t\t\t\t\t\treturn substr(value, 1, strlen(value))\n\t\t\t\t\t\t// \\0 ( + > ~\n\t\t\t\t\t\tcase 0: case 40: case 43: case 62: case 126:\n\t\t\t\t\t\t\treturn value\n\t\t\t\t\t\t// :\n\t\t\t\t\t\tcase 58:\n\t\t\t\t\t\t\tif (children[++index] === 'global')\n\t\t\t\t\t\t\t\tchildren[index] = '', children[++index] = '\\f' + substr(children[index], index = 1, -1)\n\t\t\t\t\t\t// \\s\n\t\t\t\t\t\tcase 32:\n\t\t\t\t\t\t\treturn index === 1 ? '' : value\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tswitch (index) {\n\t\t\t\t\t\t\t\tcase 0: element = value\n\t\t\t\t\t\t\t\t\treturn sizeof(children) > 1 ? '' : value\n\t\t\t\t\t\t\t\tcase index = sizeof(children) - 1: case 2:\n\t\t\t\t\t\t\t\t\treturn index === 2 ? value + element + element : value + element\n\t\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t\treturn value\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t})\n\t}\n}\n","import { RULESET, tokenize } from 'stylis';\n\nconst globalPlugin = element => {\n switch (element.type) {\n case RULESET:\n if (typeof element.props === 'string') {\n if (process.env.NODE_ENV !== 'production') {\n throw new Error(`\"element.props\" has type \"string\" (${JSON.stringify(element.props, null, 2)}), it's not expected. Please report a bug if it happens.`);\n }\n return;\n }\n element.props = element.props.map(value => {\n // Avoids calling tokenize() on every string\n if (value.indexOf(':global(') === -1) {\n return value;\n }\n return tokenize(value).reduce((acc, value, index, children) => {\n if (value === '') {\n return acc;\n }\n if (value === ':' && children[index + 1] === 'global') {\n const selector =\n // An inner part of \":global()\"\n children[index + 2].slice(1, -1) +\n // A separator between selectors i.e. \"body .class\"\n ' ';\n acc.unshift(selector);\n children[index + 1] = '';\n children[index + 2] = '';\n return acc;\n }\n acc.push(value);\n return acc;\n }, []).join('');\n });\n }\n};\n\nexport { globalPlugin };\n//# sourceMappingURL=globalPlugin.esm.js.map\n","import { RULESET, combine, match, serialize, copy, replace, WEBKIT, MOZ, DECLARATION, hash, strlen, charat, indexof } from 'stylis';\n\n/* eslint-disable no-fallthrough */\nfunction prefix(value, length, children) {\n switch (hash(value, length)) {\n // color-adjust\n case 5103:\n return WEBKIT + 'print-' + value + value;\n // backface-visibility, column, box-decoration-break\n case 3191:\n case 6645:\n case 3005:\n // mask, mask-image, mask-(mode|clip|size), mask-(repeat|origin), mask-position, mask-composite\n case 6391:\n case 5879:\n case 5623:\n case 6135:\n case 4599:\n case 4855:\n return WEBKIT + value + value;\n // backdrop-filter, background-clip: text\n case 4215:\n // Additional check on \"backdrop-(f)ilter\" to prevent conflict with \"background-clip\"\n // https://github.com/thysultan/stylis/issues/292\n if (charat(value, 9) === 102) {\n return WEBKIT + value + value;\n }\n // background-clip: text\n if (charat(value, length + 1) === 116) {\n return WEBKIT + value + value;\n }\n break;\n // tab-size\n case 4789:\n return MOZ + value + value;\n // appearance, user-select, hyphens\n case 5349:\n case 4246:\n case 6968:\n return WEBKIT + value + MOZ + value + value;\n // cursor\n // @ts-expect-error fall through is intentional here\n case 6187:\n if (!match(value, /grab/)) {\n return replace(replace(replace(value, /(zoom-|grab)/, WEBKIT + '$1'), /(image-set)/, WEBKIT + '$1'), value, '') + value;\n }\n // background, background-image\n case 5495:\n case 3959:\n // eslint-disable-next-line no-useless-concat\n return replace(value, /(image-set\\([^]*)/, WEBKIT + '$1' + '$`$1');\n // (margin|padding)-inline-(start|end)\n case 4095:\n case 3583:\n case 4068:\n case 2532:\n return replace(value, /(.+)-inline(.+)/, WEBKIT + '$1$2') + value;\n // (min|max)?(width|height|inline-size|block-size)\n case 8116:\n case 7059:\n case 5753:\n case 5535:\n case 5445:\n case 5701:\n case 4933:\n case 4677:\n case 5533:\n case 5789:\n case 5021:\n case 4765:\n // stretch fill-available\n if (strlen(value) - 1 - length > 6) switch (charat(value, length + 1)) {\n // (f)ill-available\n // @ts-expect-error fall through is intentional here\n case 102:\n if (charat(value, length + 3) === 108) {\n return replace(value, /(.+:)(.+)-([^]+)/,\n // eslint-disable-next-line no-useless-concat, eqeqeq\n '$1' + WEBKIT + '$2-$3' + '$1' + MOZ + (charat(value, length + 3) == 108 ? '$3' : '$2-$3')) + value;\n }\n // (s)tretch\n case 115:\n return ~indexof(value, 'stretch') ? prefix(replace(value, 'stretch', 'fill-available'), length) + value : value;\n }\n break;\n }\n return value;\n}\n/**\n * @param {object} element\n * @param {number} index\n * @param {object[]} children\n * @param {function} callback\n */\nfunction prefixerPlugin(element, index, children, callback) {\n if (element.length > -1) if (!element.return) switch (element.type) {\n case DECLARATION:\n element.return = prefix(element.value, element.length);\n return;\n case RULESET:\n if (element.length)\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n return combine(element.props, function (value) {\n switch (match(value, /(::plac\\w+|:read-\\w+)/)) {\n // :read-(only|write)\n case ':read-only':\n case ':read-write':\n return serialize(\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n [copy(element, {\n props: [replace(value, /:(read-\\w+)/, ':' + MOZ + '$1')]\n })], callback);\n // :placeholder\n case '::placeholder':\n return serialize([\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n copy(element, {\n props: [replace(value, /:(plac\\w+)/, ':' + WEBKIT + 'input-$1')]\n }),\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n copy(element, {\n props: [replace(value, /:(plac\\w+)/, ':' + MOZ + '$1')]\n })], callback);\n }\n return '';\n });\n }\n return undefined;\n}\n\nexport { prefix, prefixerPlugin };\n//# sourceMappingURL=prefixerPlugin.esm.js.map\n","import { isAtRuleElement } from './isAtRuleElement.esm.js';\n\nconst sortClassesInAtRulesPlugin = element => {\n if (isAtRuleElement(element) && Array.isArray(element.children)) {\n element.children.sort((a, b) => a.props[0] > b.props[0] ? 1 : -1);\n }\n};\n\nexport { sortClassesInAtRulesPlugin };\n//# sourceMappingURL=sortClassesInAtRulesPlugin.esm.js.map\n","import { LAYER, SUPPORTS, MEDIA } from 'stylis';\n\nfunction isAtRuleElement(element) {\n switch (element.type) {\n case '@container':\n case MEDIA:\n case SUPPORTS:\n case LAYER:\n return true;\n }\n return false;\n}\n\nexport { isAtRuleElement };\n//# sourceMappingURL=isAtRuleElement.esm.js.map\n","import { serialize, compile, middleware, stringify, rulesheet } from 'stylis';\nimport { globalPlugin } from './stylis/globalPlugin.esm.js';\nimport { prefixerPlugin } from './stylis/prefixerPlugin.esm.js';\nimport { sortClassesInAtRulesPlugin } from './stylis/sortClassesInAtRulesPlugin.esm.js';\n\n// eslint-disable-next-line @typescript-eslint/no-empty-function\nfunction noop() {}\nfunction compileCSSRules(cssRules, sortClassesInAtRules) {\n const rules = [];\n serialize(compile(cssRules), middleware([globalPlugin, sortClassesInAtRules ? sortClassesInAtRulesPlugin : noop, prefixerPlugin, stringify,\n // 💡 we are using `.insertRule()` API for DOM operations, which does not support\n // insertion of multiple CSS rules in a single call. `rulesheet` plugin extracts\n // individual rules to be used with this API\n rulesheet(rule => rules.push(rule))]));\n return rules;\n}\n\nexport { compileCSSRules };\n//# sourceMappingURL=compileCSSRules.esm.js.map\n","import { hyphenateProperty } from './utils/hyphenateProperty.esm.js';\nimport { normalizeNestedProperty } from './utils/normalizeNestedProperty.esm.js';\nimport { compileCSSRules } from './compileCSSRules.esm.js';\n\nconst PSEUDO_SELECTOR_REGEX = /,( *[^ &])/g;\n/**\n * Normalizes pseudo selectors to always contain &, requires to work properly with comma-separated selectors.\n *\n * @example\n * \":hover\" => \"&:hover\"\n * \" :hover\" => \"& :hover\"\n * \":hover,:focus\" => \"&:hover,&:focus\"\n * \" :hover, :focus\" => \"& :hover,& :focus\"\n */\nfunction normalizePseudoSelector(pseudoSelector) {\n return '&' + normalizeNestedProperty(\n // Regex there replaces a comma, spaces and an ampersand if it's present with comma and an ampersand.\n // This allows to normalize input, see examples in JSDoc.\n pseudoSelector.replace(PSEUDO_SELECTOR_REGEX, ',&$1'));\n}\nfunction createCSSRule(classNameSelector, cssDeclaration, pseudos) {\n let cssRule = cssDeclaration;\n if (pseudos.length > 0) {\n cssRule = pseudos.reduceRight((acc, selector) => {\n return `${normalizePseudoSelector(selector)} { ${acc} }`;\n }, cssDeclaration);\n }\n return `${classNameSelector}{${cssRule}}`;\n}\nfunction compileAtomicCSSRule(options, atRules) {\n const {\n className,\n selectors,\n property,\n rtlClassName,\n rtlProperty,\n rtlValue,\n value\n } = options;\n const {\n container,\n layer,\n media,\n supports\n } = atRules;\n const classNameSelector = `.${className}`;\n const cssDeclaration = Array.isArray(value) ? `${value.map(v => `${hyphenateProperty(property)}: ${v}`).join(';')};` : `${hyphenateProperty(property)}: ${value};`;\n let cssRule = createCSSRule(classNameSelector, cssDeclaration, selectors);\n if (rtlProperty && rtlClassName) {\n const rtlClassNameSelector = `.${rtlClassName}`;\n const rtlCSSDeclaration = Array.isArray(rtlValue) ? `${rtlValue.map(v => `${hyphenateProperty(rtlProperty)}: ${v}`).join(';')};` : `${hyphenateProperty(rtlProperty)}: ${rtlValue};`;\n cssRule += createCSSRule(rtlClassNameSelector, rtlCSSDeclaration, selectors);\n }\n if (media) {\n cssRule = `@media ${media} { ${cssRule} }`;\n }\n if (layer) {\n cssRule = `@layer ${layer} { ${cssRule} }`;\n }\n if (supports) {\n cssRule = `@supports ${supports} { ${cssRule} }`;\n }\n if (container) {\n cssRule = `@container ${container} { ${cssRule} }`;\n }\n return compileCSSRules(cssRule, true);\n}\n\nexport { compileAtomicCSSRule, normalizePseudoSelector };\n//# sourceMappingURL=compileAtomicCSSRule.esm.js.map\n","import { hyphenateProperty } from './hyphenateProperty.esm.js';\n\nfunction cssifyObject(style) {\n let css = '';\n // eslint-disable-next-line guard-for-in\n for (const property in style) {\n const value = style[property];\n if (typeof value === 'string' || typeof value === 'number') {\n css += hyphenateProperty(property) + ':' + value + ';';\n continue;\n }\n if (Array.isArray(value)) {\n for (const arrValue of value) {\n css += hyphenateProperty(property) + ':' + arrValue + ';';\n }\n }\n }\n return css;\n}\n\nexport { cssifyObject };\n//# sourceMappingURL=cssifyObject.esm.js.map\n","import { serialize, compile, middleware, stringify, rulesheet } from 'stylis';\nimport { prefixerPlugin } from './stylis/prefixerPlugin.esm.js';\nimport { cssifyObject } from './utils/cssifyObject.esm.js';\n\nfunction compileKeyframeRule(keyframeObject) {\n let css = '';\n // eslint-disable-next-line guard-for-in\n for (const percentage in keyframeObject) {\n css += `${percentage}{${cssifyObject(keyframeObject[percentage])}}`;\n }\n return css;\n}\n/**\n * Creates CSS rules for insertion from passed CSS.\n */\nfunction compileKeyframesCSS(keyframeName, keyframeCSS) {\n const cssRule = `@keyframes ${keyframeName} {${keyframeCSS}}`;\n const rules = [];\n serialize(compile(cssRule), middleware([stringify, prefixerPlugin,\n // 💡 we are using `.insertRule()` API for DOM operations, which does not support\n // insertion of multiple CSS rules in a single call. `rulesheet` plugin extracts\n // individual rules to be used with this API\n rulesheet(rule => rules.push(rule))]));\n return rules;\n}\n\nexport { compileKeyframeRule, compileKeyframesCSS };\n//# sourceMappingURL=compileKeyframeCSS.esm.js.map\n","const shorthands = {\n animation: [-1, ['animationDelay', 'animationDirection', 'animationDuration', 'animationFillMode', 'animationIterationCount', 'animationName', 'animationPlayState', 'animationTimeline', 'animationTimingFunction']],\n animationRange: [-1, ['animationRangeEnd', 'animationRangeStart']],\n background: [-2, ['backgroundAttachment', 'backgroundClip', 'backgroundColor', 'backgroundImage', 'backgroundOrigin', 'backgroundPosition', 'backgroundPositionX', 'backgroundPositionY', 'backgroundRepeat', 'backgroundSize']],\n backgroundPosition: [-1, ['backgroundPositionX', 'backgroundPositionY']],\n border: [-2, ['borderBottom', 'borderBottomColor', 'borderBottomStyle', 'borderBottomWidth', 'borderLeft', 'borderLeftColor', 'borderLeftStyle', 'borderLeftWidth', 'borderRight', 'borderRightColor', 'borderRightStyle', 'borderRightWidth', 'borderTop', 'borderTopColor', 'borderTopStyle', 'borderTopWidth']],\n borderBottom: [-1, ['borderBottomColor', 'borderBottomStyle', 'borderBottomWidth']],\n borderImage: [-1, ['borderImageOutset', 'borderImageRepeat', 'borderImageSlice', 'borderImageSource', 'borderImageWidth']],\n borderLeft: [-1, ['borderLeftColor', 'borderLeftStyle', 'borderLeftWidth']],\n borderRadius: [-1, ['borderBottomLeftRadius', 'borderBottomRightRadius', 'borderTopLeftRadius', 'borderTopRightRadius']],\n borderRight: [-1, ['borderRightColor', 'borderRightStyle', 'borderRightWidth']],\n borderTop: [-1, ['borderTopColor', 'borderTopStyle', 'borderTopWidth']],\n caret: [-1, ['caretColor', 'caretShape']],\n columnRule: [-1, ['columnRuleColor', 'columnRuleStyle', 'columnRuleWidth']],\n columns: [-1, ['columnCount', 'columnWidth']],\n containIntrinsicSize: [-1, ['containIntrinsicHeight', 'containIntrinsicWidth']],\n container: [-1, ['containerName', 'containerType']],\n flex: [-1, ['flexBasis', 'flexGrow', 'flexShrink']],\n flexFlow: [-1, ['flexDirection', 'flexWrap']],\n font: [-1, ['fontFamily', 'fontSize', 'fontStretch', 'fontStyle', 'fontVariant', 'fontWeight', 'lineHeight']],\n gap: [-1, ['columnGap', 'rowGap']],\n grid: [-1, ['columnGap', 'gridAutoColumns', 'gridAutoFlow', 'gridAutoRows', 'gridColumnGap', 'gridRowGap', 'gridTemplateAreas', 'gridTemplateColumns', 'gridTemplateRows', 'rowGap']],\n gridArea: [-1, ['gridColumnEnd', 'gridColumnStart', 'gridRowEnd', 'gridRowStart']],\n gridColumn: [-1, ['gridColumnEnd', 'gridColumnStart']],\n gridRow: [-1, ['gridRowEnd', 'gridRowStart']],\n gridTemplate: [-1, ['gridTemplateAreas', 'gridTemplateColumns', 'gridTemplateRows']],\n inset: [-1, ['bottom', 'left', 'right', 'top']],\n insetBlock: [-1, ['insetBlockEnd', 'insetBlockStart']],\n insetInline: [-1, ['insetInlineEnd', 'insetInlineStart']],\n listStyle: [-1, ['listStyleImage', 'listStylePosition', 'listStyleType']],\n margin: [-1, ['marginBottom', 'marginLeft', 'marginRight', 'marginTop']],\n marginBlock: [-1, ['marginBlockEnd', 'marginBlockStart']],\n marginInline: [-1, ['marginInlineEnd', 'marginInlineStart']],\n mask: [-1, ['maskClip', 'maskComposite', 'maskImage', 'maskMode', 'maskOrigin', 'maskPosition', 'maskRepeat', 'maskSize']],\n maskBorder: [-1, ['maskBorderMode', 'maskBorderOutset', 'maskBorderRepeat', 'maskBorderSlice', 'maskBorderSource', 'maskBorderWidth']],\n offset: [-1, ['offsetAnchor', 'offsetDistance', 'offsetPath', 'offsetPosition', 'offsetRotate']],\n outline: [-1, ['outlineColor', 'outlineStyle', 'outlineWidth']],\n overflow: [-1, ['overflowX', 'overflowY']],\n overscrollBehavior: [-1, ['overscrollBehaviorX', 'overscrollBehaviorY']],\n padding: [-1, ['paddingBottom', 'paddingLeft', 'paddingRight', 'paddingTop']],\n paddingBlock: [-1, ['paddingBlockEnd', 'paddingBlockStart']],\n paddingInline: [-1, ['paddingInlineEnd', 'paddingInlineStart']],\n placeContent: [-1, ['alignContent', 'justifyContent']],\n placeItems: [-1, ['alignItems', 'justifyItems']],\n placeSelf: [-1, ['alignSelf', 'justifySelf']],\n scrollMargin: [-1, ['scrollMarginBottom', 'scrollMarginLeft', 'scrollMarginRight', 'scrollMarginTop']],\n scrollMarginBlock: [-1, ['scrollMarginBlockEnd', 'scrollMarginBlockStart']],\n scrollMarginInline: [-1, ['scrollMarginInlineEnd', 'scrollMarginInlineStart']],\n scrollPadding: [-1, ['scrollPaddingBottom', 'scrollPaddingLeft', 'scrollPaddingRight', 'scrollPaddingTop']],\n scrollPaddingBlock: [-1, ['scrollPaddingBlockEnd', 'scrollPaddingBlockStart']],\n scrollPaddingInline: [-1, ['scrollPaddingInlineEnd', 'scrollPaddingInlineStart']],\n scrollTimeline: [-1, ['scrollTimelineAxis', 'scrollTimelineName']],\n textDecoration: [-1, ['textDecorationColor', 'textDecorationLine', 'textDecorationStyle', 'textDecorationThickness']],\n textEmphasis: [-1, ['textEmphasisColor', 'textEmphasisStyle']],\n transition: [-1, ['transitionBehavior', 'transitionDelay', 'transitionDuration', 'transitionProperty', 'transitionTimingFunction']],\n viewTimeline: [-1, ['viewTimelineAxis', 'viewTimelineName']]\n};\n\nexport { shorthands };\n//# sourceMappingURL=shorthands.esm.js.map\n","function generateCombinedQuery(currentMediaQuery, nestedMediaQuery) {\n if (currentMediaQuery.length === 0) {\n return nestedMediaQuery;\n }\n return `${currentMediaQuery} and ${nestedMediaQuery}`;\n}\n\nexport { generateCombinedQuery };\n//# sourceMappingURL=generateCombinedMediaQuery.esm.js.map\n","function isMediaQuerySelector(property) {\n return property.substr(0, 6) === '@media';\n}\n\nexport { isMediaQuerySelector };\n//# sourceMappingURL=isMediaQuerySelector.esm.js.map\n","function isLayerSelector(property) {\n return property.substr(0, 6) === '@layer';\n}\n\nexport { isLayerSelector };\n//# sourceMappingURL=isLayerSelector.esm.js.map\n","const regex = /^(:|\\[|>|&)/;\nfunction isNestedSelector(property) {\n return regex.test(property);\n}\n\nexport { isNestedSelector };\n//# sourceMappingURL=isNestedSelector.esm.js.map\n","function isSupportQuerySelector(property) {\n return property.substr(0, 9) === '@supports';\n}\n\nexport { isSupportQuerySelector };\n//# sourceMappingURL=isSupportQuerySelector.esm.js.map\n","function isContainerQuerySelector(property) {\n return property.substring(0, 10) === '@container';\n}\n\nexport { isContainerQuerySelector };\n//# sourceMappingURL=isContainerQuerySelector.esm.js.map\n","/**\n * Maps the long pseudo name to the short pseudo name. Pseudos that match here will be ordered, everything else will\n * make their way to default style bucket. We reduce the pseudo name to save bundlesize.\n * Thankfully there aren't any overlaps, see: https://developer.mozilla.org/en-US/docs/Web/CSS/Pseudo-classes.\n */\nconst pseudosMap = {\n // :focus-within\n 'us-w': 'w',\n // :focus-visible\n 'us-v': 'i',\n // :link\n nk: 'l',\n // :visited\n si: 'v',\n // :focus\n cu: 'f',\n // :hover\n ve: 'h',\n // :active\n ti: 'a'\n};\n/**\n * Gets the bucket depending on the pseudo.\n *\n * Input:\n *\n * ```\n * \":hover\"\n * \":focus:hover\"\n * ```\n *\n * Output:\n *\n * ```\n * \"h\"\n * \"f\"\n * ```\n *\n * @internal\n */\nfunction getStyleBucketName(selectors, atRules) {\n if (atRules.media) {\n return 'm';\n }\n // We are grouping all the at-rules like @supports etc. under `t` bucket.\n if (atRules.layer || atRules.supports) {\n return 't';\n }\n if (atRules.container) {\n return 'c';\n }\n if (selectors.length > 0) {\n const normalizedPseudo = selectors[0].trim();\n if (normalizedPseudo.charCodeAt(0) === 58 /* \":\" */) {\n // We send through a subset of the string instead of the full pseudo name.\n // For example:\n // - `\"focus-visible\"` name would instead of `\"us-v\"`.\n // - `\"focus\"` name would instead of `\"us\"`.\n // Return a mapped pseudo else default bucket.\n return pseudosMap[normalizedPseudo.slice(4, 8)] /* allows to avoid collisions between \"focus-visible\" & \"focus\" */ || pseudosMap[normalizedPseudo.slice(3, 5)] || 'd';\n }\n }\n // Return default bucket\n return 'd';\n}\n\nexport { getStyleBucketName };\n//# sourceMappingURL=getStyleBucketName.esm.js.map\n","import hashString from '@emotion/hash';\n\nfunction addAtRulePrefix(atRule, prefix) {\n return atRule ? prefix + atRule : atRule;\n}\nfunction atRulesToString(atRules) {\n return addAtRulePrefix(atRules.container, 'c') + addAtRulePrefix(atRules.media, 'm') + addAtRulePrefix(atRules.layer, 'l') + addAtRulePrefix(atRules.supports, 's');\n}\nfunction hashPropertyKey(selector, property, atRules) {\n // uniq key based on property & selector, used for merging later\n const computedKey = selector + atRulesToString(atRules) + property;\n // \"key\" can be really long as it includes selectors, we use hashes to reduce sizes of keys\n // \".foo :hover\" => \"abcd\"\n const hashedKey = hashString(computedKey);\n // As these hashes are used as object keys in build output we should avoid having numbers as a first character to\n // avoid having quotes:\n // {\n // \"1abc\": {}, // we don't want this\n // Aabc: {}, // no quotes\n // }\n const firstCharCode = hashedKey.charCodeAt(0);\n const startsWithNumber = firstCharCode >= 48 && firstCharCode <= 57;\n if (startsWithNumber) {\n return String.fromCharCode(firstCharCode + 17) + hashedKey.slice(1);\n }\n return hashedKey;\n}\n\nexport { atRulesToString, hashPropertyKey };\n//# sourceMappingURL=hashPropertyKey.esm.js.map\n","import hashString from '@emotion/hash';\nimport { HASH_PREFIX } from '../../constants.esm.js';\nimport { atRulesToString } from './hashPropertyKey.esm.js';\n\nfunction hashClassName({\n property,\n selector,\n salt,\n value\n}, atRules) {\n return HASH_PREFIX + hashString(salt + selector + atRulesToString(atRules) + property +\n // Trimming of value is required to generate consistent hashes\n value.trim());\n}\n\nexport { hashClassName };\n//# sourceMappingURL=hashClassName.esm.js.map\n","import { RESET } from '../../constants.esm.js';\n\nfunction isResetValue(value) {\n return value === RESET;\n}\n\nexport { isResetValue };\n//# sourceMappingURL=isResetValue.esm.js.map\n","/**\n * Trims selectors to generate consistent hashes.\n */\nfunction trimSelector(selector) {\n return selector.replace(/>\\s+/g, '>');\n}\n\nexport { trimSelector };\n//# sourceMappingURL=trimSelector.esm.js.map\n","function logError(...args) {\n if (process.env.NODE_ENV !== 'production' && typeof document !== 'undefined') {\n console.error(...args);\n }\n}\n\nexport { logError };\n//# sourceMappingURL=logError.esm.js.map\n","import hashString from '@emotion/hash';\nimport { convertProperty, convert } from 'rtl-css-js/core';\nimport { UNSUPPORTED_CSS_PROPERTIES, RESET, HASH_PREFIX } from '../constants.esm.js';\nimport { compileAtomicCSSRule } from './compileAtomicCSSRule.esm.js';\nimport { compileKeyframeRule, compileKeyframesCSS } from './compileKeyframeCSS.esm.js';\nimport { shorthands } from './shorthands.esm.js';\nimport { generateCombinedQuery } from './utils/generateCombinedMediaQuery.esm.js';\nimport { isMediaQuerySelector } from './utils/isMediaQuerySelector.esm.js';\nimport { isLayerSelector } from './utils/isLayerSelector.esm.js';\nimport { isNestedSelector } from './utils/isNestedSelector.esm.js';\nimport { isSupportQuerySelector } from './utils/isSupportQuerySelector.esm.js';\nimport { isContainerQuerySelector } from './utils/isContainerQuerySelector.esm.js';\nimport { normalizeNestedProperty } from './utils/normalizeNestedProperty.esm.js';\nimport { isObject } from './utils/isObject.esm.js';\nimport { getStyleBucketName } from './getStyleBucketName.esm.js';\nimport { hashClassName } from './utils/hashClassName.esm.js';\nimport { hashPropertyKey } from './utils/hashPropertyKey.esm.js';\nimport { isResetValue } from './utils/isResetValue.esm.js';\nimport { trimSelector } from './utils/trimSelector.esm.js';\nimport { warnAboutUnresolvedRule } from './warnings/warnAboutUnresolvedRule.esm.js';\nimport { warnAboutUnsupportedProperties } from './warnings/warnAboutUnsupportedProperties.esm.js';\n\nfunction getShorthandDefinition(property) {\n return shorthands[property];\n}\nfunction computePropertyPriority(shorthand) {\n var _a;\n return (_a = shorthand === null || shorthand === void 0 ? void 0 : shorthand[0]) !== null && _a !== void 0 ? _a : 0;\n}\nfunction pushToClassesMap(classesMap, propertyKey, ltrClassname, rtlClassname) {\n classesMap[propertyKey] = rtlClassname ? [ltrClassname, rtlClassname] : ltrClassname;\n}\nfunction createBucketEntry(cssRule, metadata) {\n if (metadata.length > 0) {\n return [cssRule, Object.fromEntries(metadata)];\n }\n return cssRule;\n}\nfunction pushToCSSRules(cssRulesByBucket, styleBucketName, ltrCSS, rtlCSS, media, priority) {\n var _a;\n const metadata = [];\n if (priority !== 0) {\n metadata.push(['p', priority]);\n }\n if (styleBucketName === 'm' && media) {\n metadata.push(['m', media]);\n }\n (_a = cssRulesByBucket[styleBucketName]) !== null && _a !== void 0 ? _a : cssRulesByBucket[styleBucketName] = [];\n if (ltrCSS) {\n cssRulesByBucket[styleBucketName].push(createBucketEntry(ltrCSS, metadata));\n }\n if (rtlCSS) {\n cssRulesByBucket[styleBucketName].push(createBucketEntry(rtlCSS, metadata));\n }\n}\n/**\n * Transforms input styles to classes maps & CSS rules.\n *\n * @internal\n */\nfunction resolveStyleRules(styles, classNameHashSalt = '', selectors = [], atRules = {\n container: '',\n layer: '',\n media: '',\n supports: ''\n}, cssClassesMap = {}, cssRulesByBucket = {}, rtlValue) {\n // eslint-disable-next-line guard-for-in\n for (const property in styles) {\n // eslint-disable-next-line no-prototype-builtins\n if (UNSUPPORTED_CSS_PROPERTIES.hasOwnProperty(property)) {\n warnAboutUnsupportedProperties(property, styles[property]);\n continue;\n }\n const value = styles[property];\n // eslint-disable-next-line eqeqeq\n if (value == null) {\n continue;\n }\n if (isResetValue(value)) {\n const selector = trimSelector(selectors.join(''));\n // uniq key based on a hash of property & selector, used for merging later\n const key = hashPropertyKey(selector, property, atRules);\n pushToClassesMap(cssClassesMap, key, 0, undefined);\n continue;\n }\n if (typeof value === 'string' || typeof value === 'number') {\n const selector = trimSelector(selectors.join(''));\n const shorthand = getShorthandDefinition(property);\n if (shorthand) {\n const shorthandProperties = shorthand[1];\n const shorthandResetStyles = Object.fromEntries(shorthandProperties.map(property => [property, RESET]));\n resolveStyleRules(shorthandResetStyles, classNameHashSalt, selectors, atRules, cssClassesMap, cssRulesByBucket);\n }\n // uniq key based on a hash of property & selector, used for merging later\n const key = hashPropertyKey(selector, property, atRules);\n const className = hashClassName({\n value: value.toString(),\n salt: classNameHashSalt,\n selector,\n property\n }, atRules);\n const rtlDefinition = rtlValue && {\n key: property,\n value: rtlValue\n } || convertProperty(property, value);\n const flippedInRtl = rtlDefinition.key !== property || rtlDefinition.value !== value;\n const rtlClassName = flippedInRtl ? hashClassName({\n value: rtlDefinition.value.toString(),\n property: rtlDefinition.key,\n salt: classNameHashSalt,\n selector\n }, atRules) : undefined;\n const rtlCompileOptions = flippedInRtl ? {\n rtlClassName,\n rtlProperty: rtlDefinition.key,\n rtlValue: rtlDefinition.value\n } : undefined;\n const styleBucketName = getStyleBucketName(selectors, atRules);\n const [ltrCSS, rtlCSS] = compileAtomicCSSRule(Object.assign({\n className,\n selectors,\n property,\n value\n }, rtlCompileOptions), atRules);\n pushToClassesMap(cssClassesMap, key, className, rtlClassName);\n pushToCSSRules(cssRulesByBucket, styleBucketName, ltrCSS, rtlCSS, atRules.media, computePropertyPriority(shorthand));\n } else if (property === 'animationName') {\n const animationNameValue = Array.isArray(value) ? value : [value];\n const animationNames = [];\n const rtlAnimationNames = [];\n for (const keyframeObject of animationNameValue) {\n const keyframeCSS = compileKeyframeRule(keyframeObject);\n const rtlKeyframeCSS = compileKeyframeRule(convert(keyframeObject));\n const animationName = HASH_PREFIX + hashString(keyframeCSS);\n let rtlAnimationName;\n const keyframeRules = compileKeyframesCSS(animationName, keyframeCSS);\n let rtlKeyframeRules = [];\n if (keyframeCSS === rtlKeyframeCSS) {\n // If CSS for LTR & RTL are same we will re-use animationName from LTR to avoid duplication of rules in output\n rtlAnimationName = animationName;\n } else {\n rtlAnimationName = HASH_PREFIX + hashString(rtlKeyframeCSS);\n rtlKeyframeRules = compileKeyframesCSS(rtlAnimationName, rtlKeyframeCSS);\n }\n for (let i = 0; i < keyframeRules.length; i++) {\n pushToCSSRules(cssRulesByBucket,\n // keyframes styles should be inserted into own bucket\n 'k', keyframeRules[i], rtlKeyframeRules[i], atRules.media,\n // keyframes always have default priority\n 0);\n }\n animationNames.push(animationName);\n rtlAnimationNames.push(rtlAnimationName);\n }\n resolveStyleRules({\n animationName: animationNames.join(', ')\n }, classNameHashSalt, selectors, atRules, cssClassesMap, cssRulesByBucket, rtlAnimationNames.join(', '));\n } else if (Array.isArray(value)) {\n // not animationName property but array in the value => fallback values\n if (value.length === 0) {\n if (process.env.NODE_ENV !== 'production') {\n console.warn(`makeStyles(): An empty array was passed as input to \"${property}\", the property will be omitted in the styles.`);\n }\n continue;\n }\n const selector = trimSelector(selectors.join(''));\n const shorthand = getShorthandDefinition(property);\n if (shorthand) {\n const shorthandProperties = shorthand[1];\n const shorthandResetStyles = Object.fromEntries(shorthandProperties.map(property => [property, RESET]));\n resolveStyleRules(shorthandResetStyles, classNameHashSalt, selectors, atRules, cssClassesMap, cssRulesByBucket);\n }\n const key = hashPropertyKey(selector, property, atRules);\n const className = hashClassName({\n value: value.map(v => (v !== null && v !== void 0 ? v : '').toString()).join(';'),\n salt: classNameHashSalt,\n selector,\n property\n }, atRules);\n const rtlDefinitions = value.map(v => convertProperty(property, v));\n const rtlPropertyConsistent = !rtlDefinitions.some(v => v.key !== rtlDefinitions[0].key);\n if (!rtlPropertyConsistent) {\n if (process.env.NODE_ENV !== 'production') {\n console.error('makeStyles(): mixing CSS fallback values which result in multiple CSS properties in RTL is not supported.');\n }\n continue;\n }\n const flippedInRtl = rtlDefinitions[0].key !== property || rtlDefinitions.some((v, i) => v.value !== value[i]);\n const rtlClassName = flippedInRtl ? hashClassName({\n value: rtlDefinitions.map(v => {\n var _a;\n return ((_a = v === null || v === void 0 ? void 0 : v.value) !== null && _a !== void 0 ? _a : '').toString();\n }).join(';'),\n salt: classNameHashSalt,\n property: rtlDefinitions[0].key,\n selector\n }, atRules) : undefined;\n const rtlCompileOptions = flippedInRtl ? {\n rtlClassName,\n rtlProperty: rtlDefinitions[0].key,\n rtlValue: rtlDefinitions.map(d => d.value)\n } : undefined;\n const styleBucketName = getStyleBucketName(selectors, atRules);\n const [ltrCSS, rtlCSS] = compileAtomicCSSRule(Object.assign({\n className,\n selectors,\n property,\n value: value\n }, rtlCompileOptions), atRules);\n pushToClassesMap(cssClassesMap, key, className, rtlClassName);\n pushToCSSRules(cssRulesByBucket, styleBucketName, ltrCSS, rtlCSS, atRules.media, computePropertyPriority(shorthand));\n } else if (isObject(value)) {\n if (isNestedSelector(property)) {\n resolveStyleRules(value, classNameHashSalt, selectors.concat(normalizeNestedProperty(property)), atRules, cssClassesMap, cssRulesByBucket);\n } else if (isMediaQuerySelector(property)) {\n const combinedMediaQuery = generateCombinedQuery(atRules.media, property.slice(6).trim());\n resolveStyleRules(value, classNameHashSalt, selectors, Object.assign({}, atRules, {\n media: combinedMediaQuery\n }), cssClassesMap, cssRulesByBucket);\n } else if (isLayerSelector(property)) {\n const combinedLayerQuery = (atRules.layer ? `${atRules.layer}.` : '') + property.slice(6).trim();\n resolveStyleRules(value, classNameHashSalt, selectors, Object.assign({}, atRules, {\n layer: combinedLayerQuery\n }), cssClassesMap, cssRulesByBucket);\n } else if (isSupportQuerySelector(property)) {\n const combinedSupportQuery = generateCombinedQuery(atRules.supports, property.slice(9).trim());\n resolveStyleRules(value, classNameHashSalt, selectors, Object.assign({}, atRules, {\n supports: combinedSupportQuery\n }), cssClassesMap, cssRulesByBucket);\n } else if (isContainerQuerySelector(property)) {\n // TODO implement nested container queries if needed\n // The only way to target multiple containers is to nest container queries\n // https://developer.mozilla.org/en-US/docs/Web/CSS/@container#nested_container_queries\n const containerQuery = property.slice(10).trim();\n resolveStyleRules(value, classNameHashSalt, selectors, Object.assign({}, atRules, {\n container: containerQuery\n }), cssClassesMap, cssRulesByBucket);\n } else {\n warnAboutUnresolvedRule(property, value);\n }\n }\n }\n return [cssClassesMap, cssRulesByBucket];\n}\n\nexport { resolveStyleRules };\n//# sourceMappingURL=resolveStyleRules.esm.js.map\n","import { logError } from './logError.esm.js';\n\nfunction warnAboutUnsupportedProperties(property, value) {\n const message = /*#__PURE__*/(() => [`@griffel/react: You are using unsupported shorthand CSS property \"${property}\". ` + `Please check your \"makeStyles\" calls, there *should not* be following:`, ' '.repeat(2) + `makeStyles({`, ' '.repeat(4) + `[slot]: { ${property}: \"${value}\" }`, ' '.repeat(2) + `})`, '', 'Learn why CSS shorthands are not supported: https://aka.ms/griffel-css-shorthands'].join('\\n'))();\n logError(message);\n}\n\nexport { warnAboutUnsupportedProperties };\n//# sourceMappingURL=warnAboutUnsupportedProperties.esm.js.map\n","// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction isObject(val) {\n return val != null && typeof val === 'object' && Array.isArray(val) === false;\n}\n\nexport { isObject };\n//# sourceMappingURL=isObject.esm.js.map\n","import { logError } from './logError.esm.js';\n\nfunction warnAboutUnresolvedRule(property, value) {\n const message = /*#__PURE__*/(() => {\n const ruleText = JSON.stringify(value, null, 2);\n const message = ['@griffel/react: A rule was not resolved to CSS properly. ' + 'Please check your `makeStyles` or `makeResetStyles` calls for following:', ' '.repeat(2) + 'makeStyles({', ' '.repeat(4) + `[slot]: {`, ' '.repeat(6) + `\"${property}\": ${ruleText.split('\\n').map((l, n) => ' '.repeat(n === 0 ? 0 : 6) + l).join('\\n')}`, ' '.repeat(4) + '}', ' '.repeat(2) + `})`, ''];\n if (property.indexOf('&') === -1) {\n message.push(`It looks that you're are using a nested selector, but it is missing an ampersand placeholder where the generated class name should be injected.`);\n message.push(`Try to update a property to include it i.e \"${property}\" => \"&${property}\".`);\n } else {\n message.push('');\n message.push(\"If it's not obvious what triggers a problem, please report an issue at https://github.com/microsoft/griffel/issues\");\n }\n return message.join('\\n');\n })();\n logError(message);\n}\n\nexport { warnAboutUnresolvedRule };\n//# sourceMappingURL=warnAboutUnresolvedRule.esm.js.map\n","import hashString from '@emotion/hash';\nimport { SEQUENCE_PREFIX, DEBUG_SEQUENCE_SEPARATOR, SEQUENCE_HASH_LENGTH } from '../../constants.esm.js';\n\nfunction padEndHash(value) {\n const hashLength = value.length;\n if (hashLength === SEQUENCE_HASH_LENGTH) {\n return value;\n }\n for (let i = hashLength; i < SEQUENCE_HASH_LENGTH; i++) {\n value += '0';\n }\n return value;\n}\nfunction hashSequence(classes, dir, sequenceIds = []) {\n if (process.env.NODE_ENV === 'production') {\n return SEQUENCE_PREFIX + padEndHash(hashString(classes + dir));\n }\n return SEQUENCE_PREFIX + padEndHash(hashString(classes + dir)) + DEBUG_SEQUENCE_SEPARATOR + padEndHash(hashString(sequenceIds.join('')));\n}\n\nexport { hashSequence };\n//# sourceMappingURL=hashSequence.esm.js.map\n","import { DEFINITION_LOOKUP_TABLE } from '../constants.esm.js';\nimport { hashSequence } from './utils/hashSequence.esm.js';\n\n/**\n * Reduces a classname map for slot to a classname string. Uses classnames according to text directions.\n *\n * @private\n */\nfunction reduceToClassName(classMap, dir) {\n // - `classString` is a string of classnames separated by a space, used to output classes\n // - `hashString` is a string of classnames separated by a space, used to generate a hash\n //\n // `hashString` is needed to handle `null` values in a class map as they don't produce any classes.\n let classString = '';\n let hashString = '';\n // eslint-disable-next-line guard-for-in\n for (const propertyHash in classMap) {\n const classNameMapping = classMap[propertyHash];\n if (classNameMapping === 0) {\n hashString += propertyHash + ' ';\n continue;\n }\n const hasRTLClassName = Array.isArray(classNameMapping);\n const className = dir === 'rtl' ? (hasRTLClassName ? classNameMapping[1] : classNameMapping) + ' ' : (hasRTLClassName ? classNameMapping[0] : classNameMapping) + ' ';\n classString += className;\n hashString += className;\n }\n return [classString.slice(0, -1), hashString.slice(0, -1)];\n}\n/**\n * Reduces classname maps for slots to classname strings. Registers them in a definition cache to be used by\n * `mergeClasses()`.\n *\n * @internal\n */\nfunction reduceToClassNameForSlots(classesMapBySlot, dir) {\n const classNamesForSlots = {};\n // eslint-disable-next-line guard-for-in\n for (const slotName in classesMapBySlot) {\n const [slotClasses, slotClassesHash] = reduceToClassName(classesMapBySlot[slotName], dir);\n // Handles a case when there are no classes in a set i.e. \"makeStyles({ root: {} })\"\n if (slotClassesHash === '') {\n classNamesForSlots[slotName] = '';\n continue;\n }\n const sequenceHash = hashSequence(slotClassesHash, dir);\n const resultSlotClasses = sequenceHash + (slotClasses === '' ? '' : ' ' + slotClasses);\n DEFINITION_LOOKUP_TABLE[sequenceHash] = [classesMapBySlot[slotName], dir];\n classNamesForSlots[slotName] = resultSlotClasses;\n }\n return classNamesForSlots;\n}\n\nexport { reduceToClassName, reduceToClassNameForSlots };\n//# sourceMappingURL=reduceToClassNameForSlots.esm.js.map\n","import './constants.esm.js';\nimport { debugData } from './devtools/store.esm.js';\nimport { isDevToolsEnabled } from './devtools/isDevToolsEnabled.esm.js';\nimport { getSourceURLfromError } from './devtools/getSourceURLfromError.esm.js';\nimport { insertionFactory } from './insertionFactory.esm.js';\nimport { resolveStyleRulesForSlots } from './resolveStyleRulesForSlots.esm.js';\nimport { reduceToClassNameForSlots } from './runtime/reduceToClassNameForSlots.esm.js';\n\nfunction makeStyles(stylesBySlots, factory = insertionFactory) {\n const insertStyles = factory();\n let classesMapBySlot = null;\n let cssRules = null;\n let ltrClassNamesForSlots = null;\n let rtlClassNamesForSlots = null;\n let sourceURL;\n if (process.env.NODE_ENV !== 'production' && isDevToolsEnabled) {\n sourceURL = getSourceURLfromError();\n }\n let classNameHashSalt;\n function computeClasses(options) {\n const {\n dir,\n renderer\n } = options;\n if (classesMapBySlot === null) {\n [classesMapBySlot, cssRules] = resolveStyleRulesForSlots(stylesBySlots, renderer.classNameHashSalt);\n if (process.env.NODE_ENV !== 'production') {\n if (renderer.classNameHashSalt) {\n if (classNameHashSalt !== renderer.classNameHashSalt) {\n console.error(['@griffel/core:', '\\n\\n', 'A provided renderer has different \"classNameHashSalt\".', 'This is not supported and WILL cause issues with classnames generation.', 'Ensure that all renderers created with \"createDOMRenderer()\" have the same \"classNameHashSalt\".'].join(' '));\n }\n classNameHashSalt = renderer.classNameHashSalt;\n }\n }\n }\n const isLTR = dir === 'ltr';\n if (isLTR) {\n if (ltrClassNamesForSlots === null) {\n ltrClassNamesForSlots = reduceToClassNameForSlots(classesMapBySlot, dir);\n }\n } else {\n if (rtlClassNamesForSlots === null) {\n rtlClassNamesForSlots = reduceToClassNameForSlots(classesMapBySlot, dir);\n }\n }\n insertStyles(renderer, cssRules);\n const classNamesForSlots = isLTR ? ltrClassNamesForSlots : rtlClassNamesForSlots;\n if (process.env.NODE_ENV !== 'production' && isDevToolsEnabled) {\n debugData.addSequenceDetails(classNamesForSlots, sourceURL);\n }\n return classNamesForSlots;\n }\n return computeClasses;\n}\n\nexport { makeStyles };\n//# sourceMappingURL=makeStyles.esm.js.map\n","import { resolveStyleRules } from './runtime/resolveStyleRules.esm.js';\n\n/**\n * Calls resolveStyleRules() for each slot, is also used by build time transform.\n *\n * @param stylesBySlots - An object with makeStyles rules where a key is a slot name\n * @param classNameHashSalt - A salt for classes hash\n *\n * @return - A tuple with an object classnames mapping where a key is a slot name and an array with CSS rules\n */\nfunction resolveStyleRulesForSlots(stylesBySlots, classNameHashSalt = '') {\n const classesMapBySlot = {};\n const cssRules = {};\n // eslint-disable-next-line guard-for-in\n for (const slotName in stylesBySlots) {\n const slotStyles = stylesBySlots[slotName];\n const [cssClassMap, cssRulesByBucket] = resolveStyleRules(slotStyles, classNameHashSalt);\n classesMapBySlot[slotName] = cssClassMap;\n Object.keys(cssRulesByBucket).forEach(styleBucketName => {\n cssRules[styleBucketName] = (cssRules[styleBucketName] || []).concat(cssRulesByBucket[styleBucketName]);\n });\n }\n return [classesMapBySlot, cssRules];\n}\n\nexport { resolveStyleRulesForSlots };\n//# sourceMappingURL=resolveStyleRulesForSlots.esm.js.map\n","import * as React from 'react';\n\nconst useInsertionEffect =\n// @ts-expect-error Hack to make sure that `useInsertionEffect` will not cause bundling issues in older React versions\n// eslint-disable-next-line no-useless-concat\nReact['useInsertion' + 'Effect'] ? React['useInsertion' + 'Effect'] : undefined;\n\nexport { useInsertionEffect };\n//# sourceMappingURL=useInsertionEffect.esm.js.map\n","import { canUseDOM } from './utils/canUseDOM.esm.js';\nimport { useInsertionEffect } from './useInsertionEffect.esm.js';\n\nconst insertionFactory = () => {\n const insertionCache = {};\n return function insert(renderer, cssRules) {\n // Even if `useInsertionEffect` is available, we can use it on a client only as it will not be executed in SSR\n if (useInsertionEffect && canUseDOM()) {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n useInsertionEffect(() => {\n renderer.insertCSSRules(cssRules);\n }, [renderer, cssRules]);\n return;\n }\n if (insertionCache[renderer.id] === undefined) {\n renderer.insertCSSRules(cssRules);\n insertionCache[renderer.id] = true;\n }\n };\n};\n\nexport { insertionFactory };\n//# sourceMappingURL=insertionFactory.esm.js.map\n","/**\n * Verifies if an application can use DOM.\n */\nfunction canUseDOM() {\n return typeof window !== 'undefined' && !!(window.document && window.document.createElement);\n}\n\nexport { canUseDOM };\n//# sourceMappingURL=canUseDOM.esm.js.map\n","import { DATA_PRIORITY_ATTR, DATA_BUCKET_ATTR } from '../constants.esm.js';\n\nfunction createIsomorphicStyleSheet(styleElement, bucketName, priority, elementAttributes) {\n // no CSSStyleSheet in SSR, just append rules here for server render\n const __cssRulesForSSR = [];\n elementAttributes[DATA_BUCKET_ATTR] = bucketName;\n elementAttributes[DATA_PRIORITY_ATTR] = String(priority);\n if (styleElement) {\n for (const attrName in elementAttributes) {\n styleElement.setAttribute(attrName, elementAttributes[attrName]);\n }\n }\n function insertRule(rule) {\n if (styleElement === null || styleElement === void 0 ? void 0 : styleElement.sheet) {\n return styleElement.sheet.insertRule(rule, styleElement.sheet.cssRules.length);\n }\n return __cssRulesForSSR.push(rule);\n }\n return {\n elementAttributes,\n insertRule,\n element: styleElement,\n bucketName,\n cssRules() {\n if (styleElement === null || styleElement === void 0 ? void 0 : styleElement.sheet) {\n return Array.from(styleElement.sheet.cssRules).map(cssRule => cssRule.cssText);\n }\n return __cssRulesForSSR;\n }\n };\n}\nfunction createIsomorphicStyleSheetFromElement(element) {\n const elementAttributes = Array.from(element.attributes).reduce((acc, attr) => {\n acc[attr.name] = attr.value;\n return acc;\n }, {});\n const stylesheet = createIsomorphicStyleSheet(element, elementAttributes[DATA_BUCKET_ATTR], Number(elementAttributes[DATA_PRIORITY_ATTR]), elementAttributes);\n return stylesheet;\n}\n\nexport { createIsomorphicStyleSheet, createIsomorphicStyleSheetFromElement };\n//# sourceMappingURL=createIsomorphicStyleSheet.esm.js.map\n","import { DATA_BUCKET_ATTR, DATA_PRIORITY_ATTR } from '../constants.esm.js';\nimport { createIsomorphicStyleSheet } from './createIsomorphicStyleSheet.esm.js';\n\n/**\n * Ordered style buckets using their short pseudo name.\n *\n * @internal\n */\nconst styleBucketOrdering = [\n// reset styles\n'r',\n// catch-all\n'd',\n// link\n'l',\n// visited\n'v',\n// focus-within\n'w',\n// focus\n'f',\n// focus-visible\n'i',\n// hover\n'h',\n// active\n'a',\n// at rules for reset styles\n's',\n// keyframes\n'k',\n// at-rules\n't',\n// @media rules\n'm',\n// @container rules\n'c'];\n// avoid repeatedly calling `indexOf` to determine order during new insertions\nconst styleBucketOrderingMap = /*#__PURE__*/styleBucketOrdering.reduce((acc, cur, j) => {\n acc[cur] = j;\n return acc;\n}, {});\nfunction getStyleSheetKey(bucketName, media, priority) {\n return (bucketName === 'm' ? bucketName + media : bucketName) + priority;\n}\nfunction getStyleSheetKeyFromElement(styleEl) {\n var _a;\n const bucketName = styleEl.getAttribute(DATA_BUCKET_ATTR);\n const priority = (_a = styleEl.getAttribute(DATA_PRIORITY_ATTR)) !== null && _a !== void 0 ? _a : '0';\n return getStyleSheetKey(bucketName, styleEl.media, priority);\n}\n/**\n * Lazily adds a `