@utk09/ui-observability 0.10.0 → 0.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +77 -1
- package/README.md +323 -113
- package/bin/uiobs.mjs +1 -1
- package/dist/{batch-BMdT9mKm.js → batch-BjQUwjA6.js} +5 -6
- package/dist/batch-BjQUwjA6.js.map +1 -0
- package/dist/{batch-BHXypM1j.cjs → batch-D5LlU4Q9.cjs} +2 -2
- package/dist/batch-D5LlU4Q9.cjs.map +1 -0
- package/dist/bus/bus.d.ts +48 -47
- package/dist/bus/links.d.ts +4 -4
- package/dist/bus/validation.d.ts +1 -1
- package/dist/bus-D_7pd7RN.cjs +2 -0
- package/dist/bus-D_7pd7RN.cjs.map +1 -0
- package/dist/{bus-DKfBaica.js → bus-ecxUNTja.js} +105 -109
- package/dist/bus-ecxUNTja.js.map +1 -0
- package/dist/capture/console.d.ts +10 -10
- package/dist/capture/errors.d.ts +6 -6
- package/dist/capture/interactions.d.ts +14 -14
- package/dist/capture/lifecycle.d.ts +3 -3
- package/dist/capture/long-frames.d.ts +6 -6
- package/dist/capture/network.d.ts +17 -17
- package/dist/capture/profiler-frames.d.ts +44 -0
- package/dist/capture/replay-buffer.d.ts +46 -0
- package/dist/capture/replay-upload.d.ts +74 -0
- package/dist/capture/replay.d.ts +114 -0
- package/dist/capture/reports.d.ts +2 -2
- package/dist/capture/resource-timing.d.ts +1 -1
- package/dist/capture/server-timing.d.ts +3 -3
- package/dist/capture/storm.d.ts +3 -3
- package/dist/capture/types.d.ts +45 -33
- package/dist/capture/unclean-exit.d.ts +8 -8
- package/dist/capture/user-timing.d.ts +3 -3
- package/dist/capture/web-socket.d.ts +11 -11
- package/dist/capture/web-vitals.d.ts +20 -7
- package/dist/compression-AJJCMBOa.js +11 -0
- package/dist/compression-AJJCMBOa.js.map +1 -0
- package/dist/compression-lD9abCcO.cjs +2 -0
- package/dist/compression-lD9abCcO.cjs.map +1 -0
- package/dist/console-CLz_PvFn.cjs +2 -0
- package/dist/console-CLz_PvFn.cjs.map +1 -0
- package/dist/{console-BX_0UCV7.js → console-cwgHKXvM.js} +14 -15
- package/dist/console-cwgHKXvM.js.map +1 -0
- package/dist/constants-Bwl_YtQi.js +349 -0
- package/dist/constants-Bwl_YtQi.js.map +1 -0
- package/dist/constants-DakMxVB2.cjs +2 -0
- package/dist/constants-DakMxVB2.cjs.map +1 -0
- package/dist/constants.d.ts +150 -103
- package/dist/context-storage-BjzeBSxH.cjs.map +1 -1
- package/dist/{context-storage-DxZf4Gfh.js → context-storage-BzkoHzkQ.js} +2 -3
- package/dist/context-storage-BzkoHzkQ.js.map +1 -0
- package/dist/core/breadcrumbs.d.ts +16 -15
- package/dist/core/config.d.ts +3 -3
- package/dist/core/context.d.ts +7 -7
- package/dist/core/debug-buffer.d.ts +10 -10
- package/dist/core/debug-bundle.d.ts +3 -3
- package/dist/core/deferred.d.ts +2 -2
- package/dist/core/diagnostics.d.ts +24 -21
- package/dist/core/drops.d.ts +7 -7
- package/dist/core/hold-buffer.d.ts +1 -1
- package/dist/core/journey.d.ts +22 -23
- package/dist/core/logger.d.ts +22 -21
- package/dist/core/measure.d.ts +7 -7
- package/dist/core/meter.d.ts +25 -21
- package/dist/core/pipeline.d.ts +42 -41
- package/dist/core/profile-buckets.d.ts +31 -0
- package/dist/core/profiler.d.ts +218 -0
- package/dist/core/record.d.ts +23 -23
- package/dist/core/remote-rules.d.ts +4 -4
- package/dist/core/remote-sampling.d.ts +21 -20
- package/dist/core/runtime.d.ts +206 -137
- package/dist/core/sampling.d.ts +18 -18
- package/dist/core/sender.d.ts +22 -20
- package/dist/core/spans.d.ts +5 -5
- package/dist/{deadline-5_PecIl5.js → deadline-C4ccAuk5.js} +4 -9
- package/dist/deadline-C4ccAuk5.js.map +1 -0
- package/dist/deadline-CUGbto-y.cjs +2 -0
- package/dist/deadline-CUGbto-y.cjs.map +1 -0
- package/dist/{debug-bundle-CZZ6SQQh.js → debug-bundle-BOdYmCeV.js} +12 -6
- package/dist/debug-bundle-BOdYmCeV.js.map +1 -0
- package/dist/debug-bundle-Ex4L_LSP.cjs +2 -0
- package/dist/debug-bundle-Ex4L_LSP.cjs.map +1 -0
- package/dist/doctor.cjs +1 -1
- package/dist/doctor.cjs.map +1 -1
- package/dist/doctor.d.ts +16 -6
- package/dist/doctor.js +148 -54
- package/dist/doctor.js.map +1 -1
- package/dist/{emergency-queue-Cs8-i2xw.js → emergency-queue-B9WZxanZ.js} +15 -17
- package/dist/emergency-queue-B9WZxanZ.js.map +1 -0
- package/dist/{emergency-queue-CQ-9acZf.cjs → emergency-queue-HBpL5r3V.cjs} +2 -2
- package/dist/emergency-queue-HBpL5r3V.cjs.map +1 -0
- package/dist/{error-like-Ywo5uRHo.js → error-like-B11pB4aL.js} +2 -3
- package/dist/error-like-B11pB4aL.js.map +1 -0
- package/dist/error-like-gGRx2s36.cjs.map +1 -1
- package/dist/{errors-oyxrpHjY.js → errors-D6bwgJtO.js} +5 -6
- package/dist/errors-D6bwgJtO.js.map +1 -0
- package/dist/{errors-CigX45pL.cjs → errors-DCOCRdSi.cjs} +2 -2
- package/dist/errors-DCOCRdSi.cjs.map +1 -0
- package/dist/{factory-BkjNzPYL.cjs → factory-DLFDjdLv.cjs} +2 -2
- package/dist/factory-DLFDjdLv.cjs.map +1 -0
- package/dist/{factory-Bgsky_e0.js → factory-e9Qo3K0z.js} +18 -22
- package/dist/factory-e9Qo3K0z.js.map +1 -0
- package/dist/fixed-window-CvESpFYV.cjs.map +1 -1
- package/dist/{fixed-window-CtaFHanJ.js → fixed-window-Dq3MLUUv.js} +2 -3
- package/dist/fixed-window-Dq3MLUUv.js.map +1 -0
- package/dist/global-scope-BN-Io_yv.cjs.map +1 -1
- package/dist/{global-scope-dp2jADRl.js → global-scope-D9I8s-oN.js} +2 -3
- package/dist/global-scope-D9I8s-oN.js.map +1 -0
- package/dist/{guards-CpvOpJL6.js → guards-Cidk71ME.js} +2 -3
- package/dist/guards-Cidk71ME.js.map +1 -0
- package/dist/guards-nJ70syPt.cjs.map +1 -1
- package/dist/{identity-BMlKGHUM.cjs → identity-BlvlgjrU.cjs} +2 -2
- package/dist/identity-BlvlgjrU.cjs.map +1 -0
- package/dist/{identity-DOaHdfhT.js → identity-BrQp_5J5.js} +20 -21
- package/dist/identity-BrQp_5J5.js.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +112 -79
- package/dist/index.js +797 -659
- package/dist/index.js.map +1 -1
- package/dist/{indexeddb-storage-CaXGJqDD.cjs → indexeddb-storage-CtLvZH1r.cjs} +2 -2
- package/dist/indexeddb-storage-CtLvZH1r.cjs.map +1 -0
- package/dist/{indexeddb-storage-D-lUW_5P.js → indexeddb-storage-DLXQzAGh.js} +5 -6
- package/dist/indexeddb-storage-DLXQzAGh.js.map +1 -0
- package/dist/{interactions-CqDNrtIR.js → interactions-B6z2I4tU.js} +10 -11
- package/dist/interactions-B6z2I4tU.js.map +1 -0
- package/dist/{interactions-8DgxtmgO.cjs → interactions-P6pz08Jn.cjs} +2 -2
- package/dist/interactions-P6pz08Jn.cjs.map +1 -0
- package/dist/{journey-DgIjhrIc.js → journey-35yCMNFo.js} +21 -21
- package/dist/journey-35yCMNFo.js.map +1 -0
- package/dist/journey-DAGh5h9k.cjs +2 -0
- package/dist/journey-DAGh5h9k.cjs.map +1 -0
- package/dist/keys-BHhw_0Wh.cjs.map +1 -1
- package/dist/{keys-D5r_GH9q.js → keys-BU9j5YqW.js} +2 -3
- package/dist/keys-BU9j5YqW.js.map +1 -0
- package/dist/{library-console-g_VU-wzP.cjs → library-console-BFWEuQsl.cjs} +2 -2
- package/dist/library-console-BFWEuQsl.cjs.map +1 -0
- package/dist/library-console-Dl_Ly6DQ.js +13 -0
- package/dist/library-console-Dl_Ly6DQ.js.map +1 -0
- package/dist/{library-request-FQaiWjCP.cjs → library-request-Da-CHKzT.cjs} +2 -2
- package/dist/library-request-Da-CHKzT.cjs.map +1 -0
- package/dist/{library-request-CyC-9IOk.js → library-request-nI6pvI6I.js} +4 -5
- package/dist/library-request-nI6pvI6I.js.map +1 -0
- package/dist/{lifecycle-C2z_d8OX.cjs → lifecycle-BGGOcN4N.cjs} +2 -2
- package/dist/lifecycle-BGGOcN4N.cjs.map +1 -0
- package/dist/{lifecycle-BLC4VU7c.js → lifecycle-CZ6RRXc6.js} +3 -4
- package/dist/lifecycle-CZ6RRXc6.js.map +1 -0
- package/dist/{log-record-DKvo-B-d.cjs → log-record-D7bA1RPb.cjs} +2 -2
- package/dist/log-record-D7bA1RPb.cjs.map +1 -0
- package/dist/{log-record-CndanC-p.js → log-record-DIA6McNr.js} +3 -4
- package/dist/log-record-DIA6McNr.js.map +1 -0
- package/dist/{long-frames-BQef9rXR.js → long-frames-430_85Da.js} +9 -8
- package/dist/long-frames-430_85Da.js.map +1 -0
- package/dist/long-frames-Dd8tsi2U.cjs +2 -0
- package/dist/long-frames-Dd8tsi2U.cjs.map +1 -0
- package/dist/models/batch.d.ts +14 -15
- package/dist/models/bus.d.ts +24 -24
- package/dist/models/config.d.ts +402 -216
- package/dist/models/drop.d.ts +13 -11
- package/dist/models/health.d.ts +13 -13
- package/dist/models/log-record.d.ts +13 -14
- package/dist/models/metric.d.ts +82 -17
- package/dist/models/plugin.d.ts +13 -13
- package/dist/models/replay.d.ts +60 -0
- package/dist/models/serializer.d.ts +2 -3
- package/dist/models/stats.d.ts +2 -2
- package/dist/models/storage.d.ts +12 -11
- package/dist/{network-CvkvYzRU.js → network-C7SkLf4v.js} +30 -32
- package/dist/network-C7SkLf4v.js.map +1 -0
- package/dist/{network-CqnQOqon.cjs → network-pEX3PAJv.cjs} +2 -2
- package/dist/network-pEX3PAJv.cjs.map +1 -0
- package/dist/openfin-Bxelt0yg.js +7 -0
- package/dist/openfin-Bxelt0yg.js.map +1 -0
- package/dist/openfin-DtH2f7zX.cjs.map +1 -1
- package/dist/otlp-2MCrC3kd.cjs +2 -0
- package/dist/otlp-2MCrC3kd.cjs.map +1 -0
- package/dist/{otlp-CYIL7MOE.js → otlp-COq033e3.js} +26 -35
- package/dist/otlp-COq033e3.js.map +1 -0
- package/dist/patch-BX8KrPCT.cjs.map +1 -1
- package/dist/{patch-CCWfuEY7.js → patch-UdPz1ea8.js} +2 -3
- package/dist/patch-UdPz1ea8.js.map +1 -0
- package/dist/{platform-KMWkoI-v.cjs → platform-12uR7kBQ.cjs} +2 -2
- package/dist/platform-12uR7kBQ.cjs.map +1 -0
- package/dist/{platform-wcAkkv9F.js → platform-CVewe4wQ.js} +9 -10
- package/dist/platform-CVewe4wQ.js.map +1 -0
- package/dist/profiler-BVWIOgnq.js +310 -0
- package/dist/profiler-BVWIOgnq.js.map +1 -0
- package/dist/profiler-eVCknCzS.cjs +2 -0
- package/dist/profiler-eVCknCzS.cjs.map +1 -0
- package/dist/profiler-frames-CLXlT_xL.js +86 -0
- package/dist/profiler-frames-CLXlT_xL.js.map +1 -0
- package/dist/profiler-frames-Dg2OebB2.cjs +2 -0
- package/dist/profiler-frames-Dg2OebB2.cjs.map +1 -0
- package/dist/{remote-rules-CH_7PphT.js → remote-rules-BJGDJGwA.js} +29 -30
- package/dist/remote-rules-BJGDJGwA.js.map +1 -0
- package/dist/{remote-rules-BL8km4xk.cjs → remote-rules-CJD3ToVk.cjs} +2 -2
- package/dist/remote-rules-CJD3ToVk.cjs.map +1 -0
- package/dist/replay-0zAJv9T3.js +338 -0
- package/dist/replay-0zAJv9T3.js.map +1 -0
- package/dist/replay-DomJpXqW.cjs +2 -0
- package/dist/replay-DomJpXqW.cjs.map +1 -0
- package/dist/{reports-Bh_-KpZ2.cjs → reports-BsbqmP8h.cjs} +2 -2
- package/dist/reports-BsbqmP8h.cjs.map +1 -0
- package/dist/{reports-BOKyY3_A.js → reports-BuXekPOS.js} +4 -5
- package/dist/reports-BuXekPOS.js.map +1 -0
- package/dist/{resource-timing-BROnEJ0E.js → resource-timing-CXGHwFRD.js} +6 -7
- package/dist/resource-timing-CXGHwFRD.js.map +1 -0
- package/dist/{resource-timing-CbgwNpog.cjs → resource-timing-DkycFGDa.cjs} +2 -2
- package/dist/resource-timing-DkycFGDa.cjs.map +1 -0
- package/dist/{sampling-ECGVYiDD.cjs → sampling-Dd0wllyq.cjs} +2 -2
- package/dist/sampling-Dd0wllyq.cjs.map +1 -0
- package/dist/{sampling-BLO_pcV4.js → sampling-UUDbi3K0.js} +11 -12
- package/dist/sampling-UUDbi3K0.js.map +1 -0
- package/dist/{sanitize-DS0G4_ea.js → sanitize-CNmsD9r3.js} +4 -5
- package/dist/sanitize-CNmsD9r3.js.map +1 -0
- package/dist/{sanitize-Bsn8HQWC.cjs → sanitize-ChLn97Ch.cjs} +2 -2
- package/dist/sanitize-ChLn97Ch.cjs.map +1 -0
- package/dist/{select-DWO0-w8_.cjs → select-CTk-K5mG.cjs} +3 -3
- package/dist/select-CTk-K5mG.cjs.map +1 -0
- package/dist/{select-wqt9Wxio.js → select-DPv_j6wq.js} +64 -67
- package/dist/select-DPv_j6wq.js.map +1 -0
- package/dist/{sender-BkAVt-Rq.js → sender-15zEsZpr.js} +98 -101
- package/dist/sender-15zEsZpr.js.map +1 -0
- package/dist/sender-Bfpv9tad.cjs +2 -0
- package/dist/sender-Bfpv9tad.cjs.map +1 -0
- package/dist/storage/context-storage.d.ts +34 -33
- package/dist/storage/emergency-queue.d.ts +9 -9
- package/dist/storage/eviction.d.ts +12 -12
- package/dist/storage/factory.d.ts +8 -7
- package/dist/storage/gap.d.ts +6 -6
- package/dist/storage/idb-driver.d.ts +31 -32
- package/dist/storage/indexeddb-storage.d.ts +26 -27
- package/dist/storage/keys.d.ts +7 -7
- package/dist/storage/local-storage.d.ts +38 -38
- package/dist/storage/memory-storage.d.ts +21 -22
- package/dist/storage/persistence.d.ts +1 -1
- package/dist/storage-BA9RqRO-.cjs.map +1 -1
- package/dist/{storage-w7Tslvlq.js → storage-DZwed89z.js} +2 -3
- package/dist/storage-DZwed89z.js.map +1 -0
- package/dist/{storm-DD4cUkoL.js → storm-BTSNTIWI.js} +4 -5
- package/dist/storm-BTSNTIWI.js.map +1 -0
- package/dist/{storm-DCEsqViG.cjs → storm-D0_qZOEg.cjs} +2 -2
- package/dist/storm-D0_qZOEg.cjs.map +1 -0
- package/dist/transport/compression.d.ts +2 -2
- package/dist/transport/errors.d.ts +7 -7
- package/dist/transport/exit-flush.d.ts +39 -39
- package/dist/transport/headers.d.ts +2 -2
- package/dist/transport/http-transport.d.ts +28 -27
- package/dist/transport/memory-transport.d.ts +6 -6
- package/dist/transport/retry-engine.d.ts +35 -34
- package/dist/transport/serializers/ecs.d.ts +1 -1
- package/dist/transport/serializers/otlp-metrics.d.ts +1 -1
- package/dist/transport/serializers/otlp-traces.d.ts +1 -1
- package/dist/transport/serializers/otlp.d.ts +16 -16
- package/dist/transport/serializers/select.d.ts +7 -7
- package/dist/transport/status-transport.d.ts +20 -20
- package/dist/transport/worker-protocol.d.ts +3 -3
- package/dist/{types-BR9t_w28.js → types-BAerHgCq.js} +2 -3
- package/dist/types-BAerHgCq.js.map +1 -0
- package/dist/types-C7WNpnG1.cjs.map +1 -1
- package/dist/{unclean-exit-CwdpbUDg.cjs → unclean-exit-ClGzrc2A.cjs} +2 -2
- package/dist/unclean-exit-ClGzrc2A.cjs.map +1 -0
- package/dist/{unclean-exit-BYZ5yaSI.js → unclean-exit-Cob_jyTv.js} +3 -4
- package/dist/unclean-exit-Cob_jyTv.js.map +1 -0
- package/dist/unref-CU9Nyz_9.cjs +2 -0
- package/dist/unref-CU9Nyz_9.cjs.map +1 -0
- package/dist/unref-DgHPQeWv.js +7 -0
- package/dist/unref-DgHPQeWv.js.map +1 -0
- package/dist/user-timing-CdYqx3PF.cjs +2 -0
- package/dist/user-timing-CdYqx3PF.cjs.map +1 -0
- package/dist/{user-timing-Di2ra5DB.js → user-timing-DgHubxCI.js} +7 -6
- package/dist/user-timing-DgHubxCI.js.map +1 -0
- package/dist/utils/console.d.ts +2 -2
- package/dist/utils/deadline.d.ts +4 -4
- package/dist/utils/error-like.d.ts +7 -7
- package/dist/utils/fixed-window.d.ts +9 -8
- package/dist/utils/global-scope.d.ts +8 -8
- package/dist/utils/guards.d.ts +2 -2
- package/dist/utils/identity.d.ts +17 -17
- package/dist/utils/library-console.d.ts +4 -4
- package/dist/utils/library-request.d.ts +10 -10
- package/dist/utils/lock.d.ts +10 -9
- package/dist/utils/openfin.d.ts +5 -5
- package/dist/utils/patch.d.ts +6 -6
- package/dist/utils/platform.d.ts +13 -11
- package/dist/utils/sanitize.d.ts +4 -4
- package/dist/utils/timer.d.ts +1 -1
- package/dist/utils/tracing.d.ts +38 -38
- package/dist/utils/unref.d.ts +3 -3
- package/dist/{web-socket-DwBNhgre.cjs → web-socket-BTuvYoJI.cjs} +2 -2
- package/dist/web-socket-BTuvYoJI.cjs.map +1 -0
- package/dist/{web-socket-B-5qqPy7.js → web-socket-DthJuSAg.js} +14 -15
- package/dist/web-socket-DthJuSAg.js.map +1 -0
- package/dist/web-vitals-Ch5BpDmo.cjs +2 -0
- package/dist/web-vitals-Ch5BpDmo.cjs.map +1 -0
- package/dist/web-vitals-CsGCWnUr.js +77 -0
- package/dist/web-vitals-CsGCWnUr.js.map +1 -0
- package/dist/{worker-protocol-0HMf4-kY.js → worker-protocol-B0_8rWy5.js} +6 -7
- package/dist/worker-protocol-B0_8rWy5.js.map +1 -0
- package/dist/{worker-protocol-DXekoADQ.cjs → worker-protocol-BjzFORfq.cjs} +2 -2
- package/dist/worker-protocol-BjzFORfq.cjs.map +1 -0
- package/dist/worker-server-4en-Lt-3.cjs +2 -0
- package/dist/worker-server-4en-Lt-3.cjs.map +1 -0
- package/dist/{worker-server-CKcmX5m5.js → worker-server-Cne9MX9I.js} +25 -26
- package/dist/{worker-server-CKcmX5m5.js.map → worker-server-Cne9MX9I.js.map} +1 -1
- package/dist/worker-transport-B-GF4Aqn.cjs +2 -0
- package/dist/worker-transport-B-GF4Aqn.cjs.map +1 -0
- package/dist/{worker-transport-2220ghFZ.js → worker-transport-C3SjJAEC.js} +64 -65
- package/dist/worker-transport-C3SjJAEC.js.map +1 -0
- package/package.json +33 -41
- package/dist/batch-BHXypM1j.cjs.map +0 -1
- package/dist/batch-BMdT9mKm.js.map +0 -1
- package/dist/bus-DKfBaica.js.map +0 -1
- package/dist/bus-Dea9rVhy.cjs +0 -2
- package/dist/bus-Dea9rVhy.cjs.map +0 -1
- package/dist/console-BX_0UCV7.js.map +0 -1
- package/dist/console-DZEcs7FL.cjs +0 -2
- package/dist/console-DZEcs7FL.cjs.map +0 -1
- package/dist/constants-CL0ZdI2f.cjs +0 -2
- package/dist/constants-CL0ZdI2f.cjs.map +0 -1
- package/dist/constants-CU60FG4w.js +0 -305
- package/dist/constants-CU60FG4w.js.map +0 -1
- package/dist/context-storage-DxZf4Gfh.js.map +0 -1
- package/dist/deadline-5_PecIl5.js.map +0 -1
- package/dist/deadline-XSnm95pg.cjs +0 -2
- package/dist/deadline-XSnm95pg.cjs.map +0 -1
- package/dist/debug-bundle-CZZ6SQQh.js.map +0 -1
- package/dist/debug-bundle-yRkrU1ny.cjs +0 -2
- package/dist/debug-bundle-yRkrU1ny.cjs.map +0 -1
- package/dist/emergency-queue-CQ-9acZf.cjs.map +0 -1
- package/dist/emergency-queue-Cs8-i2xw.js.map +0 -1
- package/dist/error-like-Ywo5uRHo.js.map +0 -1
- package/dist/errors-CigX45pL.cjs.map +0 -1
- package/dist/errors-oyxrpHjY.js.map +0 -1
- package/dist/factory-Bgsky_e0.js.map +0 -1
- package/dist/factory-BkjNzPYL.cjs.map +0 -1
- package/dist/fixed-window-CtaFHanJ.js.map +0 -1
- package/dist/global-scope-dp2jADRl.js.map +0 -1
- package/dist/guards-CpvOpJL6.js.map +0 -1
- package/dist/identity-BMlKGHUM.cjs.map +0 -1
- package/dist/identity-DOaHdfhT.js.map +0 -1
- package/dist/indexeddb-storage-CaXGJqDD.cjs.map +0 -1
- package/dist/indexeddb-storage-D-lUW_5P.js.map +0 -1
- package/dist/interactions-8DgxtmgO.cjs.map +0 -1
- package/dist/interactions-CqDNrtIR.js.map +0 -1
- package/dist/journey-5tcxEbnG.cjs +0 -2
- package/dist/journey-5tcxEbnG.cjs.map +0 -1
- package/dist/journey-DgIjhrIc.js.map +0 -1
- package/dist/keys-D5r_GH9q.js.map +0 -1
- package/dist/library-console-CabK2j2-.js +0 -14
- package/dist/library-console-CabK2j2-.js.map +0 -1
- package/dist/library-console-g_VU-wzP.cjs.map +0 -1
- package/dist/library-request-CyC-9IOk.js.map +0 -1
- package/dist/library-request-FQaiWjCP.cjs.map +0 -1
- package/dist/lifecycle-BLC4VU7c.js.map +0 -1
- package/dist/lifecycle-C2z_d8OX.cjs.map +0 -1
- package/dist/log-record-CndanC-p.js.map +0 -1
- package/dist/log-record-DKvo-B-d.cjs.map +0 -1
- package/dist/long-frames-BQef9rXR.js.map +0 -1
- package/dist/long-frames-CV5ZG2cx.cjs +0 -2
- package/dist/long-frames-CV5ZG2cx.cjs.map +0 -1
- package/dist/network-CqnQOqon.cjs.map +0 -1
- package/dist/network-CvkvYzRU.js.map +0 -1
- package/dist/openfin-BwEN0uj4.js +0 -8
- package/dist/openfin-BwEN0uj4.js.map +0 -1
- package/dist/otlp-CYIL7MOE.js.map +0 -1
- package/dist/otlp-RVbkNQRh.cjs +0 -2
- package/dist/otlp-RVbkNQRh.cjs.map +0 -1
- package/dist/patch-CCWfuEY7.js.map +0 -1
- package/dist/platform-KMWkoI-v.cjs.map +0 -1
- package/dist/platform-wcAkkv9F.js.map +0 -1
- package/dist/remote-rules-BL8km4xk.cjs.map +0 -1
- package/dist/remote-rules-CH_7PphT.js.map +0 -1
- package/dist/reports-BOKyY3_A.js.map +0 -1
- package/dist/reports-Bh_-KpZ2.cjs.map +0 -1
- package/dist/resource-timing-BROnEJ0E.js.map +0 -1
- package/dist/resource-timing-CbgwNpog.cjs.map +0 -1
- package/dist/sampling-BLO_pcV4.js.map +0 -1
- package/dist/sampling-ECGVYiDD.cjs.map +0 -1
- package/dist/sanitize-Bsn8HQWC.cjs.map +0 -1
- package/dist/sanitize-DS0G4_ea.js.map +0 -1
- package/dist/select-DWO0-w8_.cjs.map +0 -1
- package/dist/select-wqt9Wxio.js.map +0 -1
- package/dist/sender-BkAVt-Rq.js.map +0 -1
- package/dist/sender-D82PxlCY.cjs +0 -2
- package/dist/sender-D82PxlCY.cjs.map +0 -1
- package/dist/storage-w7Tslvlq.js.map +0 -1
- package/dist/storm-DCEsqViG.cjs.map +0 -1
- package/dist/storm-DD4cUkoL.js.map +0 -1
- package/dist/types-BR9t_w28.js.map +0 -1
- package/dist/unclean-exit-BYZ5yaSI.js.map +0 -1
- package/dist/unclean-exit-CwdpbUDg.cjs.map +0 -1
- package/dist/user-timing-C1kB3JEg.cjs +0 -2
- package/dist/user-timing-C1kB3JEg.cjs.map +0 -1
- package/dist/user-timing-Di2ra5DB.js.map +0 -1
- package/dist/web-socket-B-5qqPy7.js.map +0 -1
- package/dist/web-socket-DwBNhgre.cjs.map +0 -1
- package/dist/web-vitals-Bflr5jSA.js +0 -53
- package/dist/web-vitals-Bflr5jSA.js.map +0 -1
- package/dist/web-vitals-DFuoTQbZ.cjs +0 -2
- package/dist/web-vitals-DFuoTQbZ.cjs.map +0 -1
- package/dist/worker-protocol-0HMf4-kY.js.map +0 -1
- package/dist/worker-protocol-DXekoADQ.cjs.map +0 -1
- package/dist/worker-server-BQK5z2yl.cjs +0 -2
- package/dist/worker-server-BQK5z2yl.cjs.map +0 -1
- package/dist/worker-transport-2220ghFZ.js.map +0 -1
- package/dist/worker-transport-Dj2yCQN5.cjs +0 -2
- package/dist/worker-transport-Dj2yCQN5.cjs.map +0 -1
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import { B as e,
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { n as
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import { t as
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
|
|
1
|
+
import { B as e, Fn as t, Qt as n, Y as r, Zt as i, ct as a, dt as o, ft as s, g as c, l, lt as u, ot as d, st as f, tt as p, ut as m } from "./constants-Bwl_YtQi.js";
|
|
2
|
+
import { storageLimits as h } from "./storage-DZwed89z.js";
|
|
3
|
+
import { clearEmergencyContext as g, drainEmergencyQueue as _, n as v, saveToEmergencyQueue as y, t as b } from "./emergency-queue-B9WZxanZ.js";
|
|
4
|
+
import { createStorage as ee, storageName as x } from "./factory-e9Qo3K0z.js";
|
|
5
|
+
import { ContextStorage as S } from "./context-storage-BzkoHzkQ.js";
|
|
6
|
+
import { n as C, t as w } from "./deadline-C4ccAuk5.js";
|
|
7
|
+
import { i as T, r as E } from "./library-request-nI6pvI6I.js";
|
|
8
|
+
import { t as D } from "./openfin-Bxelt0yg.js";
|
|
9
|
+
import { t as O } from "./sanitize-CNmsD9r3.js";
|
|
10
|
+
import { n as te } from "./library-console-Dl_Ly6DQ.js";
|
|
11
|
+
import { c as k, n as A, r as j, s as M, t as N } from "./select-DPv_j6wq.js";
|
|
12
|
+
import { r as P } from "./platform-CVewe4wQ.js";
|
|
13
|
+
import { t as F } from "./unref-DgHPQeWv.js";
|
|
14
|
+
import { t as ne } from "./compression-AJJCMBOa.js";
|
|
15
|
+
import { a as re } from "./batch-BjQUwjA6.js";
|
|
16
|
+
import { r as ie } from "./log-record-DIA6McNr.js";
|
|
17
|
+
import { i as ae } from "./identity-BrQp_5J5.js";
|
|
18
|
+
import { t as oe } from "./sampling-UUDbi3K0.js";
|
|
19
|
+
import { n as I, t as L } from "./remote-rules-BJGDJGwA.js";
|
|
20
|
+
// src/storage/persistence.ts
|
|
20
21
|
async function R(e) {
|
|
21
22
|
let t = globalThis.navigator?.storage;
|
|
22
23
|
return typeof t?.persist == "function" ? await e.guardAsync("storage.unavailable", "The browser rejected the request for persistent storage.", () => t.persist()) === !0 ? "granted" : "denied" : "unsupported";
|
|
23
24
|
}
|
|
24
|
-
|
|
25
|
-
//#region src/transport/status-transport.ts
|
|
25
|
+
// src/transport/status-transport.ts
|
|
26
26
|
function z(e) {
|
|
27
27
|
let t = typeof e == "string" ? Date.parse(e) : NaN;
|
|
28
28
|
return Number.isNaN(t) ? void 0 : Math.round(t + 500 - Date.now());
|
|
@@ -38,13 +38,13 @@ var B = class {
|
|
|
38
38
|
this.cancellation.abort();
|
|
39
39
|
}
|
|
40
40
|
assertContext(e) {
|
|
41
|
-
if (this.cancellation.signal.aborted || this.config.securityContext.isolation && this.config.securityContext.id && e.routingContextId !== this.config.securityContext.id) throw this.diagnostics.count("security.context_mismatch"), new
|
|
41
|
+
if (this.cancellation.signal.aborted || this.config.securityContext.isolation && this.config.securityContext.id && e.routingContextId !== this.config.securityContext.id) throw this.diagnostics.count("security.context_mismatch"), new M("permanent", "The delivery context is inactive or does not match the batch.");
|
|
42
42
|
}
|
|
43
43
|
async untilCancelled(e) {
|
|
44
|
-
if (this.cancellation.signal.aborted) throw new
|
|
44
|
+
if (this.cancellation.signal.aborted) throw new M("permanent", "The delivery context retired.");
|
|
45
45
|
let t, n = new Promise((e, n) => {
|
|
46
46
|
t = () => {
|
|
47
|
-
n(new
|
|
47
|
+
n(new M("permanent", "The delivery context retired."));
|
|
48
48
|
}, this.cancellation.signal.addEventListener("abort", t, { once: !0 });
|
|
49
49
|
});
|
|
50
50
|
try {
|
|
@@ -63,13 +63,13 @@ var B = class {
|
|
|
63
63
|
this.config = e, this.diagnostics = t, this.onSampling = n, this.onLoss = r, this.onClock = i;
|
|
64
64
|
}
|
|
65
65
|
throttledForMs(e) {
|
|
66
|
-
return Math.max(0, this.throttledUntil[
|
|
66
|
+
return Math.max(0, this.throttledUntil[N(e, this.config)] - Date.now());
|
|
67
67
|
}
|
|
68
68
|
lastSendAt() {
|
|
69
69
|
return this.acceptedAt;
|
|
70
70
|
}
|
|
71
71
|
serialize(e) {
|
|
72
|
-
let t =
|
|
72
|
+
let t = j(this.config, e, this.diagnostics, "The serializer threw an error. The library dropped the batch.");
|
|
73
73
|
return t || this.onLoss("unserializable", e.records, [e.id]), t;
|
|
74
74
|
}
|
|
75
75
|
accept(e, t, n) {
|
|
@@ -83,22 +83,21 @@ var B = class {
|
|
|
83
83
|
let t = r.advice === void 0 ? "" : ` ${r.advice}`;
|
|
84
84
|
return this.diagnostics.report("transport.rejected_credentials", `The server returned ${i}.${t}`, {
|
|
85
85
|
status: e,
|
|
86
|
-
endpoint:
|
|
87
|
-
}), new
|
|
86
|
+
endpoint: A(n, this.config)
|
|
87
|
+
}), new M("permanent", `The server rejected the batch with ${i}.`, e);
|
|
88
88
|
}
|
|
89
|
-
if (e === 413) return new
|
|
89
|
+
if (e === 413) return new M("too_large", "The payload is too large.", e, void 0, r.maxBytes);
|
|
90
90
|
if (e === 429 || e === 503) {
|
|
91
91
|
let t = e === 429, i = r.retryAfterMs === void 0 ? void 0 : Math.min(r.retryAfterMs, this.config.delivery.retryMaxDelayMs);
|
|
92
|
-
return this.throttledUntil[n] = Date.now() + (i ?? this.config.delivery.retryBaseDelayMs), t && this.diagnostics.report("transport.throttled", "The server throttles the requests.", { retryAfterMs: i }), new
|
|
92
|
+
return this.throttledUntil[n] = Date.now() + (i ?? this.config.delivery.retryBaseDelayMs), t && this.diagnostics.report("transport.throttled", "The server throttles the requests.", { retryAfterMs: i }), new M("throttled", t ? "The server throttles the requests." : "The service is not available.", e, i);
|
|
93
93
|
}
|
|
94
|
-
return e === 408 || e >= 500 ? new
|
|
94
|
+
return e === 408 || e >= 500 ? new M("transient", `The server returned the error ${i}.`, e) : (this.diagnostics.report("transport.dropped_permanent", `The server rejected the batch with ${i}. The library dropped it.`, {
|
|
95
95
|
batchId: t,
|
|
96
96
|
status: e
|
|
97
|
-
}), new
|
|
97
|
+
}), new M("permanent", `The server rejected the batch with ${i}.`, e));
|
|
98
98
|
}
|
|
99
99
|
};
|
|
100
|
-
|
|
101
|
-
//#region src/transport/custom-transport.ts
|
|
100
|
+
// src/transport/custom-transport.ts
|
|
102
101
|
function V(e, t, n) {
|
|
103
102
|
return {
|
|
104
103
|
kind: n,
|
|
@@ -125,16 +124,16 @@ var W = class extends B {
|
|
|
125
124
|
if (!t || e.records.length === 0) return;
|
|
126
125
|
let n = this.serialize(e);
|
|
127
126
|
if (!n) return;
|
|
128
|
-
let r =
|
|
127
|
+
let r = N(e, this.config), i = V(e, n, r);
|
|
129
128
|
i.signal = this.cancellation.signal;
|
|
130
129
|
let a;
|
|
131
130
|
try {
|
|
132
|
-
a = await
|
|
131
|
+
a = await C(this.untilCancelled(T(() => E(() => te(() => t(i))))), this.config.delivery.requestTimeoutMs);
|
|
133
132
|
} catch (e) {
|
|
134
|
-
let t = e instanceof
|
|
135
|
-
throw new
|
|
133
|
+
let t = e instanceof w ? e : void 0, n = t ? "timeout" : "transient", r = t?.message ?? "The custom transport failed.";
|
|
134
|
+
throw new M(n, r, void 0, void 0, void 0, e);
|
|
136
135
|
}
|
|
137
|
-
if (this.assertContext(e), !H(a)) throw this.diagnostics.report("transport.http_error", "The custom transport returned no valid status. The library sends the batch again later.", { batchId: e.id }), new
|
|
136
|
+
if (this.assertContext(e), !H(a)) throw this.diagnostics.report("transport.http_error", "The custom transport returned no valid status. The library sends the batch again later.", { batchId: e.id }), new M("transient", "The custom transport returned no valid status.");
|
|
138
137
|
let { status: o } = a;
|
|
139
138
|
if (o >= 200 && o < 300) this.accept(r, a.sampling, a.date);
|
|
140
139
|
else throw this.reject(o, e.id, r, {
|
|
@@ -164,7 +163,7 @@ var W = class extends B {
|
|
|
164
163
|
install() {
|
|
165
164
|
if (this.installed || typeof addEventListener > "u") return;
|
|
166
165
|
this.installed = !0, typeof document < "u" && (document.addEventListener("visibilitychange", this.onVisibility), document.addEventListener("freeze", this.onFreeze)), addEventListener("pagehide", this.onPageHide);
|
|
167
|
-
let e =
|
|
166
|
+
let e = D()?.me;
|
|
168
167
|
this.deps.diagnostics.guard("openfin.unavailable", "The library could not subscribe to close-requested.", () => {
|
|
169
168
|
e?.on?.("close-requested", this.onOpenFinClose);
|
|
170
169
|
});
|
|
@@ -172,7 +171,7 @@ var W = class extends B {
|
|
|
172
171
|
uninstall() {
|
|
173
172
|
if (!this.installed) return;
|
|
174
173
|
this.installed = !1, typeof document < "u" && (document.removeEventListener("visibilitychange", this.onVisibility), document.removeEventListener("freeze", this.onFreeze)), removeEventListener("pagehide", this.onPageHide);
|
|
175
|
-
let e =
|
|
174
|
+
let e = D()?.me;
|
|
176
175
|
this.deps.diagnostics.guard("openfin.unavailable", "The library could not unsubscribe from close-requested.", () => {
|
|
177
176
|
e?.removeListener?.("close-requested", this.onOpenFinClose);
|
|
178
177
|
});
|
|
@@ -193,24 +192,24 @@ var W = class extends B {
|
|
|
193
192
|
if (r !== null) {
|
|
194
193
|
this.keepaliveBytes = 0;
|
|
195
194
|
for (let i of this.deps.drainForExit()) {
|
|
196
|
-
let a =
|
|
195
|
+
let a = N(i, t), o = a === "logs" ? r.href : A(a, t);
|
|
197
196
|
o ? this.flushBatch(i, e, new URL(o)) : n.count("record.dropped_no_destination");
|
|
198
197
|
}
|
|
199
198
|
}
|
|
200
199
|
}
|
|
201
|
-
flushBatch(t,
|
|
200
|
+
flushBatch(t, r, a) {
|
|
202
201
|
let { config: o } = this.deps;
|
|
203
202
|
if (t.records.length === 0) return;
|
|
204
|
-
let s = this.serialize(t,
|
|
203
|
+
let s = this.serialize(t, r);
|
|
205
204
|
if (!s) return;
|
|
206
|
-
if (
|
|
205
|
+
if (O(s.body) > 6e4) {
|
|
207
206
|
this.park(t);
|
|
208
207
|
return;
|
|
209
208
|
}
|
|
210
|
-
a.searchParams.set(
|
|
209
|
+
a.searchParams.set(i, t.id), a.searchParams.set(n, r);
|
|
211
210
|
let c = a.toString(), l = this.deps.exitHeaders();
|
|
212
211
|
if (l) {
|
|
213
|
-
this.keepaliveFetch(c, t, s.body,
|
|
212
|
+
this.keepaliveFetch(c, t, s.body, r, () => {
|
|
214
213
|
let e = new Headers(l);
|
|
215
214
|
return e.set(u, s.contentType), e.set(f, t.id), e;
|
|
216
215
|
});
|
|
@@ -221,7 +220,7 @@ var W = class extends B {
|
|
|
221
220
|
return;
|
|
222
221
|
}
|
|
223
222
|
let d = this.beacon(c, s.body);
|
|
224
|
-
d !== "sent" && (d === "refused" ? this.park(t) : this.keepaliveFetch(c, t, s.body,
|
|
223
|
+
d !== "sent" && (d === "refused" ? this.park(t) : this.keepaliveFetch(c, t, s.body, r, () => new Headers({ [u]: e })));
|
|
225
224
|
}
|
|
226
225
|
flushAlive() {
|
|
227
226
|
let { diagnostics: e } = this.deps, t = "The flush of the hidden document failed.";
|
|
@@ -236,16 +235,16 @@ var W = class extends B {
|
|
|
236
235
|
for (let i of this.deps.drainForExit()) {
|
|
237
236
|
let a = this.serialize(i, e);
|
|
238
237
|
if (!a) continue;
|
|
239
|
-
let o = V(i, a,
|
|
240
|
-
(t === void 0 || r.guard("transport.http_error", "The transportOnExit hook threw an error.", () =>
|
|
238
|
+
let o = V(i, a, N(i, n));
|
|
239
|
+
(t === void 0 || r.guard("transport.http_error", "The transportOnExit hook threw an error.", () => E(() => t(o))) !== !0) && this.park(i);
|
|
241
240
|
}
|
|
242
241
|
}
|
|
243
242
|
park(e) {
|
|
244
243
|
let { config: t, diagnostics: n, onLoss: r } = this.deps;
|
|
245
|
-
t.storage === "memory" || t.storage === "none" ? r?.("not_stored", e.records, [e.id]) :
|
|
244
|
+
t.storage === "memory" || t.storage === "none" ? r?.("not_stored", e.records, [e.id]) : y(e, n, r);
|
|
246
245
|
}
|
|
247
246
|
serialize(e, t) {
|
|
248
|
-
let n =
|
|
247
|
+
let n = j(this.deps.config, e, this.deps.diagnostics, `The ${t} exit flush could not serialize its batch.`);
|
|
249
248
|
return n || this.deps.onLoss?.("unserializable", e.records, [e.id]), n;
|
|
250
249
|
}
|
|
251
250
|
endpointUrl() {
|
|
@@ -261,7 +260,7 @@ var W = class extends B {
|
|
|
261
260
|
keepaliveFetch(e, t, n, r, i) {
|
|
262
261
|
let { config: a, diagnostics: o } = this.deps, s = () => {
|
|
263
262
|
this.park(t);
|
|
264
|
-
}, c =
|
|
263
|
+
}, c = O(n);
|
|
265
264
|
this.keepaliveBytes + c > 6e4 ? s() : (this.keepaliveBytes += c, o.guard("transport.http_error", "The keepalive fetch failed.", () => (fetch(e, {
|
|
266
265
|
method: "POST",
|
|
267
266
|
body: n,
|
|
@@ -296,12 +295,11 @@ async function q(e, t, n) {
|
|
|
296
295
|
function J(e) {
|
|
297
296
|
K.delete(e);
|
|
298
297
|
}
|
|
299
|
-
|
|
300
|
-
//#region src/transport/http-transport.ts
|
|
298
|
+
// src/transport/http-transport.ts
|
|
301
299
|
var Y = "In a cross-origin iframe, the session cookie is a third-party cookie. The browser often blocks it. Forward the records to the platform document. As an alternative, issue the cookie with the Partitioned attribute.", X = class extends B {
|
|
302
300
|
async send(e, t) {
|
|
303
301
|
this.assertContext(e);
|
|
304
|
-
let { config: n } = this, r =
|
|
302
|
+
let { config: n } = this, r = N(e, n), i = A(r, n);
|
|
305
303
|
i ? e.records.length !== 0 && await this.post(e, r, i, t) : this.diagnostics.count("record.dropped_no_destination");
|
|
306
304
|
}
|
|
307
305
|
lastHeaders() {
|
|
@@ -316,7 +314,7 @@ var Y = "In a cross-origin iframe, the session cookie is a third-party cookie. T
|
|
|
316
314
|
this.accept(t, e.get(s), e.get(m));
|
|
317
315
|
return;
|
|
318
316
|
}
|
|
319
|
-
let c = a.status, l =
|
|
317
|
+
let c = a.status, l = k(a.headers.get(o)), u = c === 413 ? await this.readMaxBytes(a) : void 0;
|
|
320
318
|
throw this.reject(c, e.id, t, {
|
|
321
319
|
retryAfterMs: l,
|
|
322
320
|
maxBytes: u,
|
|
@@ -336,18 +334,18 @@ var Y = "In a cross-origin iframe, the session cookie is a third-party cookie. T
|
|
|
336
334
|
}
|
|
337
335
|
async before(e, t, n) {
|
|
338
336
|
try {
|
|
339
|
-
return await
|
|
337
|
+
return await C(this.untilCancelled(e), Math.max(0, t - Date.now()));
|
|
340
338
|
} catch {
|
|
341
|
-
throw this.cancellation.signal.aborted ? new
|
|
339
|
+
throw this.cancellation.signal.aborted ? new M("permanent", "The delivery context retired.") : this.timeout(n);
|
|
342
340
|
}
|
|
343
341
|
}
|
|
344
342
|
timeout(e) {
|
|
345
343
|
let t = `The request took longer than ${String(this.config.delivery.requestTimeoutMs)} ms.`;
|
|
346
|
-
return this.diagnostics.report("transport.timeout", t, { endpoint: e }), new
|
|
344
|
+
return this.diagnostics.report("transport.timeout", t, { endpoint: e }), new M("timeout", t);
|
|
347
345
|
}
|
|
348
346
|
async encodeBody(e) {
|
|
349
347
|
let { config: t } = this;
|
|
350
|
-
return t.compression !== "gzip" ||
|
|
348
|
+
return t.compression !== "gzip" || O(e) < 1024 ? e : await this.diagnostics.guardAsync("transport.http_error", "The library could not compress the payload.", () => ne(e)) ?? e;
|
|
351
349
|
}
|
|
352
350
|
async dispatch(e, t, n, r, i) {
|
|
353
351
|
let { config: a } = this, o = new AbortController(), s = () => {
|
|
@@ -357,9 +355,9 @@ var Y = "In a cross-origin iframe, the session cookie is a third-party cookie. T
|
|
|
357
355
|
let c = setTimeout(() => {
|
|
358
356
|
o.abort();
|
|
359
357
|
}, Math.max(0, r - Date.now()));
|
|
360
|
-
|
|
358
|
+
F(c);
|
|
361
359
|
try {
|
|
362
|
-
return await
|
|
360
|
+
return await E(() => fetch(e, {
|
|
363
361
|
method: "POST",
|
|
364
362
|
headers: t,
|
|
365
363
|
body: n,
|
|
@@ -370,13 +368,13 @@ var Y = "In a cross-origin iframe, the session cookie is a third-party cookie. T
|
|
|
370
368
|
priority: i ? "auto" : a.delivery.priority
|
|
371
369
|
}));
|
|
372
370
|
} catch {
|
|
373
|
-
throw this.cancellation.signal.aborted ? new
|
|
371
|
+
throw this.cancellation.signal.aborted ? new M("permanent", "The delivery context retired.") : o.signal.aborted ? this.timeout(e) : new M(P() ? "transient" : "offline", "A network error occurred.");
|
|
374
372
|
} finally {
|
|
375
373
|
this.cancellation.signal.removeEventListener("abort", s), clearTimeout(c);
|
|
376
374
|
}
|
|
377
375
|
}
|
|
378
376
|
keepalive(e) {
|
|
379
|
-
let t = globalThis.document?.visibilityState === "hidden", n = typeof e == "string" ?
|
|
377
|
+
let t = globalThis.document?.visibilityState === "hidden", n = typeof e == "string" ? O(e) : e.byteLength;
|
|
380
378
|
return t && n <= 6e4;
|
|
381
379
|
}
|
|
382
380
|
async readMaxBytes(e) {
|
|
@@ -404,7 +402,7 @@ var Y = "In a cross-origin iframe, the session cookie is a third-party cookie. T
|
|
|
404
402
|
this.attempt = 0, this.schedule(0);
|
|
405
403
|
};
|
|
406
404
|
constructor(e, t, n, r, i, a = () => void 0) {
|
|
407
|
-
this.storage = e, this.transport = t, this.diagnostics = n, this.config = r, this.batchesPerDrain = i, this.onLoss = a, this.maxAttempts =
|
|
405
|
+
this.storage = e, this.transport = t, this.diagnostics = n, this.config = r, this.batchesPerDrain = i, this.onLoss = a, this.maxAttempts = h(r.retention).maxAttempts;
|
|
408
406
|
}
|
|
409
407
|
start() {
|
|
410
408
|
this.stopped = !1, typeof addEventListener < "u" && addEventListener("online", this.onOnline), this.schedule(this.config.delivery.retryIdleDelayMs);
|
|
@@ -434,10 +432,10 @@ var Y = "In a cross-origin iframe, the session cookie is a third-party cookie. T
|
|
|
434
432
|
let t = setTimeout(() => {
|
|
435
433
|
this.drain();
|
|
436
434
|
}, e);
|
|
437
|
-
this.timer = t,
|
|
435
|
+
this.timer = t, F(t);
|
|
438
436
|
}
|
|
439
437
|
bounded(e) {
|
|
440
|
-
return
|
|
438
|
+
return C(e, t);
|
|
441
439
|
}
|
|
442
440
|
clearTimer() {
|
|
443
441
|
this.timer !== null && (clearTimeout(this.timer), this.timer = null);
|
|
@@ -450,8 +448,8 @@ var Y = "In a cross-origin iframe, the session cookie is a third-party cookie. T
|
|
|
450
448
|
if (!this.draining) {
|
|
451
449
|
this.draining = !0;
|
|
452
450
|
try {
|
|
453
|
-
let e =
|
|
454
|
-
await
|
|
451
|
+
let e = b(r, this.config.persistence.namespace);
|
|
452
|
+
await v(e, this.diagnostics, () => this.drainLocked()) !== !0 && this.schedule(this.config.delivery.retryIdleDelayMs);
|
|
455
453
|
} finally {
|
|
456
454
|
this.draining = !1;
|
|
457
455
|
}
|
|
@@ -459,13 +457,13 @@ var Y = "In a cross-origin iframe, the session cookie is a third-party cookie. T
|
|
|
459
457
|
}
|
|
460
458
|
async drainLocked() {
|
|
461
459
|
try {
|
|
462
|
-
if (!
|
|
460
|
+
if (!P()) return this.schedule(this.config.delivery.retryIdleDelayMs), !0;
|
|
463
461
|
let e = await this.bounded(this.storage.take(this.batchesPerDrain ?? this.config.delivery.batchesPerDrain));
|
|
464
462
|
if (e.length === 0) return this.schedule(this.config.delivery.retryIdleDelayMs), !0;
|
|
465
463
|
let t = /* @__PURE__ */ new Set(), n = 0;
|
|
466
464
|
for (let r of e) {
|
|
467
465
|
if (this.stopped) return !0;
|
|
468
|
-
let e =
|
|
466
|
+
let e = N(r, this.config);
|
|
469
467
|
if (t.has(e)) continue;
|
|
470
468
|
let i = await this.deliver(r);
|
|
471
469
|
if (i === "stop") return !0;
|
|
@@ -485,7 +483,7 @@ var Y = "In a cross-origin iframe, the session cookie is a third-party cookie. T
|
|
|
485
483
|
return await this.transport.send(e), await this.bounded(this.storage.remove(e.id)), this.attempt = 0, "next";
|
|
486
484
|
} catch (t) {
|
|
487
485
|
if (this.stopped) return "stop";
|
|
488
|
-
let n = t instanceof
|
|
486
|
+
let n = t instanceof M ? t : void 0;
|
|
489
487
|
return n?.kind === "permanent" || n?.kind === "too_large" ? (await this.replaceStored(e, t), "next") : n?.kind === "offline" ? (this.schedule(this.config.delivery.retryIdleDelayMs), "stop") : n?.kind === "throttled" ? (this.attempt++, n.retryAfterMs ?? this.backoffMs()) : (await this.bounded(this.storage.bumpAttempts(e.id, e.attempts + 1)), this.attempt++, n?.retryAfterMs ?? this.backoffMs());
|
|
490
488
|
}
|
|
491
489
|
}
|
|
@@ -495,10 +493,10 @@ var Y = "In a cross-origin iframe, the session cookie is a third-party cookie. T
|
|
|
495
493
|
for (let e of n) await this.bounded(this.storage.save(e));
|
|
496
494
|
}
|
|
497
495
|
toStorable(e, t) {
|
|
498
|
-
let n = t instanceof
|
|
496
|
+
let n = t instanceof M ? t : void 0;
|
|
499
497
|
if (n?.kind === "permanent") return this.onLoss("rejected", e.records, [e.id]), [];
|
|
500
498
|
if (n?.kind !== "too_large") return [e];
|
|
501
|
-
let r =
|
|
499
|
+
let r = re(e, this.diagnostics);
|
|
502
500
|
return r ? (this.diagnostics.report("transport.batch_split", "The server refused the batch because it is too large.", {
|
|
503
501
|
from: e.records.length,
|
|
504
502
|
to: r[0].records.length,
|
|
@@ -544,7 +542,7 @@ var $ = class {
|
|
|
544
542
|
let e = setTimeout(() => {
|
|
545
543
|
this.timer = null, this.onFlush(this);
|
|
546
544
|
}, this.options.flushIntervalMs);
|
|
547
|
-
this.timer = e,
|
|
545
|
+
this.timer = e, F(e);
|
|
548
546
|
}
|
|
549
547
|
clearTimer() {
|
|
550
548
|
this.timer !== null && (clearTimeout(this.timer), this.timer = null);
|
|
@@ -562,7 +560,7 @@ var $ = class {
|
|
|
562
560
|
unconfirmed = /* @__PURE__ */ new Map();
|
|
563
561
|
queue = [];
|
|
564
562
|
open = /* @__PURE__ */ new Set();
|
|
565
|
-
ceiling = new
|
|
563
|
+
ceiling = new oe();
|
|
566
564
|
inFlight = 0;
|
|
567
565
|
pumpScheduled = !1;
|
|
568
566
|
stopped = !1;
|
|
@@ -585,7 +583,7 @@ var $ = class {
|
|
|
585
583
|
if (!this.policy) return !0;
|
|
586
584
|
let { maxPendingRecords: t, maxPendingBytes: n, overflow: r } = this.policy.buffering, i;
|
|
587
585
|
try {
|
|
588
|
-
i =
|
|
586
|
+
i = O(JSON.stringify(e));
|
|
589
587
|
} catch {
|
|
590
588
|
return this.onLoss("unserializable", [e]), !1;
|
|
591
589
|
}
|
|
@@ -620,7 +618,7 @@ var $ = class {
|
|
|
620
618
|
}
|
|
621
619
|
push(e) {
|
|
622
620
|
if (this.stopped) return;
|
|
623
|
-
e.observedTimeUnixNano =
|
|
621
|
+
e.observedTimeUnixNano = ie();
|
|
624
622
|
let t = { ...e };
|
|
625
623
|
this.admit(t) && this.route(t);
|
|
626
624
|
}
|
|
@@ -652,7 +650,7 @@ var $ = class {
|
|
|
652
650
|
}
|
|
653
651
|
toBatch(e) {
|
|
654
652
|
return e.length === 0 ? null : {
|
|
655
|
-
id:
|
|
653
|
+
id: ae(this.diagnostics),
|
|
656
654
|
records: e,
|
|
657
655
|
createdAt: Date.now(),
|
|
658
656
|
attempts: 0,
|
|
@@ -688,7 +686,7 @@ var $ = class {
|
|
|
688
686
|
}),
|
|
689
687
|
resolve: t
|
|
690
688
|
};
|
|
691
|
-
this.unconfirmed.set(e.id, e), this.open.add(n), this.queue.push(n),
|
|
689
|
+
this.unconfirmed.set(e.id, e), this.open.add(n), this.queue.push(n), this.pumpScheduled || (this.pumpScheduled = !0, queueMicrotask(() => {
|
|
692
690
|
this.pumpScheduled = !1, this.pump();
|
|
693
691
|
}));
|
|
694
692
|
}
|
|
@@ -745,7 +743,7 @@ var $ = class {
|
|
|
745
743
|
}
|
|
746
744
|
async store(e) {
|
|
747
745
|
await this.diagnostics.guardAsync("storage.degraded", "The library could not store an undelivered batch.", async () => {
|
|
748
|
-
await
|
|
746
|
+
await C(this.storage.save(e), t), this.retry.nudge();
|
|
749
747
|
});
|
|
750
748
|
}
|
|
751
749
|
}, ue = class e {
|
|
@@ -761,14 +759,14 @@ var $ = class {
|
|
|
761
759
|
this.storage = e, this.retry = t, this.pipeline = n, this.exitFlush = r, this.diagnostics = i, this.transport = a;
|
|
762
760
|
}
|
|
763
761
|
static async create(t) {
|
|
764
|
-
let { config: n, diagnostics: r } = t, i = t.storage ?? await
|
|
762
|
+
let { config: n, diagnostics: r } = t, i = t.storage ?? await ee(n.storage, x(n.persistence.namespace), h(n.retention), r, t.onGap, n.persistence.namespace);
|
|
765
763
|
t.onStorage?.(i), n.persistence.requestPersistent && (i.name === "indexeddb" || i.name === "localstorage") && (t.onPersistence?.("pending"), R(r).then(t.onPersistence));
|
|
766
|
-
let a = new
|
|
767
|
-
let i =
|
|
768
|
-
i &&
|
|
764
|
+
let a = new S(i, n.securityContext, n.persistence.namespace), o = (e) => {
|
|
765
|
+
let i = I(e, r);
|
|
766
|
+
i && L(t.remote, n, i);
|
|
769
767
|
}, s, c = (e) => {
|
|
770
768
|
s = e;
|
|
771
|
-
}, { onLoss: l } = t, u = !n.transport && n.transportWorker ? await r.guardAsync("transport.http_error", "The transport worker module did not load. The library uses HTTP.", async () => (await import("./worker-transport-
|
|
769
|
+
}, { onLoss: l } = t, u = !n.transport && n.transportWorker ? await r.guardAsync("transport.http_error", "The transport worker module did not load. The library uses HTTP.", async () => (await import("./worker-transport-C3SjJAEC.js")).createWorkerTransport(n, r, o, l, c)) : void 0, d = n.transport !== void 0 || u !== void 0 ? void 0 : new X(n, r, o, l, c), f = u?.transport ?? d ?? new W(n, r, o, l, c), p = new ce(a, f, r, n, void 0, l), { batching: m } = n, g = new le(f, a, p, r, {
|
|
772
770
|
logs: {
|
|
773
771
|
flushIntervalMs: m.logFlushIntervalMs,
|
|
774
772
|
batchSize: m.logBatchSize
|
|
@@ -781,22 +779,22 @@ var $ = class {
|
|
|
781
779
|
flushIntervalMs: m.logFlushIntervalMs,
|
|
782
780
|
batchSize: m.logBatchSize
|
|
783
781
|
}
|
|
784
|
-
}, () => n.securityContext.id || void 0, n, l, () => n.metadata.clockOffset ? s : void 0),
|
|
782
|
+
}, () => n.securityContext.id || void 0, n, l, () => n.metadata.clockOffset ? s : void 0), _ = new G({
|
|
785
783
|
config: n,
|
|
786
784
|
diagnostics: r,
|
|
787
|
-
drainForExit: () =>
|
|
788
|
-
flushAlive: () =>
|
|
785
|
+
drainForExit: () => g.drainForExit(),
|
|
786
|
+
flushAlive: () => g.flushPending(),
|
|
789
787
|
exitHeaders: () => u ? u.exitHeaders() : d?.lastHeaders(),
|
|
790
788
|
onLoss: l,
|
|
791
789
|
beforeExit: t.beforeExit
|
|
792
|
-
}),
|
|
790
|
+
}), v = !1;
|
|
793
791
|
try {
|
|
794
|
-
|
|
792
|
+
_.install(), p.start(), v = !0;
|
|
795
793
|
} finally {
|
|
796
|
-
|
|
794
|
+
v || (_.uninstall(), p.stop());
|
|
797
795
|
}
|
|
798
|
-
let
|
|
799
|
-
return
|
|
796
|
+
let y = new e(a, p, g, _, r, f);
|
|
797
|
+
return y.emergencyImport = y.importEmergency(), y;
|
|
800
798
|
}
|
|
801
799
|
push(e) {
|
|
802
800
|
this.pipeline.push(e);
|
|
@@ -805,7 +803,7 @@ var $ = class {
|
|
|
805
803
|
await this.pipeline.flushPending();
|
|
806
804
|
}
|
|
807
805
|
async clearPersisted(e, t) {
|
|
808
|
-
e === "namespace" ? await this.storage.clearNamespace() : await this.storage.clear(),
|
|
806
|
+
e === "namespace" ? await this.storage.clearNamespace() : await this.storage.clear(), g(t, this.diagnostics, this.storage.namespace, e === "namespace");
|
|
809
807
|
}
|
|
810
808
|
async queueDepth() {
|
|
811
809
|
return await this.diagnostics.guardAsync("storage.degraded", "The library could not count the batches in storage.", () => this.storage.count()) ?? 0;
|
|
@@ -821,7 +819,7 @@ var $ = class {
|
|
|
821
819
|
}
|
|
822
820
|
async retire(e, t, n) {
|
|
823
821
|
if (this.retired = !0, this.exitFlush.uninstall(), this.retry.stop(), e === "flush") try {
|
|
824
|
-
await
|
|
822
|
+
await C(Promise.all([this.flush(), this.retry.flush()]), t);
|
|
825
823
|
} catch (e) {
|
|
826
824
|
this.diagnostics.report("transport.timeout", "The flush of the old security context did not complete before its time limit.", void 0, e);
|
|
827
825
|
}
|
|
@@ -835,7 +833,7 @@ var $ = class {
|
|
|
835
833
|
persistenceNamespace: this.storage.namespace
|
|
836
834
|
});
|
|
837
835
|
let o = e === "discard" || e === "flush";
|
|
838
|
-
return await this.storage.retire(o), o &&
|
|
836
|
+
return await this.storage.retire(o), o && g(n, this.diagnostics, this.storage.namespace), {
|
|
839
837
|
buffered: i,
|
|
840
838
|
stored: a
|
|
841
839
|
};
|
|
@@ -850,11 +848,10 @@ var $ = class {
|
|
|
850
848
|
e.length > 0 && this.retry.nudge();
|
|
851
849
|
}
|
|
852
850
|
async importEmergency() {
|
|
853
|
-
let e = await this.diagnostics.guardAsync("storage.degraded", "The emergency import failed.", () =>
|
|
851
|
+
let e = await this.diagnostics.guardAsync("storage.degraded", "The emergency import failed.", () => _(this.storage, this.diagnostics, (e) => this.storage.accepts(e), this.storage.namespace));
|
|
854
852
|
!this.retired && e !== void 0 && e > 0 && this.retry.nudge();
|
|
855
853
|
}
|
|
856
854
|
};
|
|
857
|
-
//#endregion
|
|
858
855
|
export { ue as Sender, B as a, q as i, X as n, J as r, Y as t };
|
|
859
856
|
|
|
860
|
-
//# sourceMappingURL=sender-
|
|
857
|
+
//# sourceMappingURL=sender-15zEsZpr.js.map
|