@riab/vendor-due-diligence 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +33 -0
- package/dist/vendor-due-diligence.js +4191 -0
- package/package.json +26 -0
|
@@ -0,0 +1,4191 @@
|
|
|
1
|
+
(function(){"use strict";try{if(typeof document!="undefined"){var l=document.createElement("style");l.appendChild(document.createTextNode(':root,:host,.sl-theme-light{color-scheme:light;--sl-color-gray-50: hsl(0 0% 97.5%);--sl-color-gray-100: hsl(240 4.8% 95.9%);--sl-color-gray-200: hsl(240 5.9% 90%);--sl-color-gray-300: hsl(240 4.9% 83.9%);--sl-color-gray-400: hsl(240 5% 64.9%);--sl-color-gray-500: hsl(240 3.8% 46.1%);--sl-color-gray-600: hsl(240 5.2% 33.9%);--sl-color-gray-700: hsl(240 5.3% 26.1%);--sl-color-gray-800: hsl(240 3.7% 15.9%);--sl-color-gray-900: hsl(240 5.9% 10%);--sl-color-gray-950: hsl(240 7.3% 8%);--sl-color-red-50: hsl(0 85.7% 97.3%);--sl-color-red-100: hsl(0 93.3% 94.1%);--sl-color-red-200: hsl(0 96.3% 89.4%);--sl-color-red-300: hsl(0 93.5% 81.8%);--sl-color-red-400: hsl(0 90.6% 70.8%);--sl-color-red-500: hsl(0 84.2% 60.2%);--sl-color-red-600: hsl(0 72.2% 50.6%);--sl-color-red-700: hsl(0 73.7% 41.8%);--sl-color-red-800: hsl(0 70% 35.3%);--sl-color-red-900: hsl(0 62.8% 30.6%);--sl-color-red-950: hsl(0 60% 19.6%);--sl-color-orange-50: hsl(33.3 100% 96.5%);--sl-color-orange-100: hsl(34.3 100% 91.8%);--sl-color-orange-200: hsl(32.1 97.7% 83.1%);--sl-color-orange-300: hsl(30.7 97.2% 72.4%);--sl-color-orange-400: hsl(27 96% 61%);--sl-color-orange-500: hsl(24.6 95% 53.1%);--sl-color-orange-600: hsl(20.5 90.2% 48.2%);--sl-color-orange-700: hsl(17.5 88.3% 40.4%);--sl-color-orange-800: hsl(15 79.1% 33.7%);--sl-color-orange-900: hsl(15.3 74.6% 27.8%);--sl-color-orange-950: hsl(15.2 69.1% 19%);--sl-color-amber-50: hsl(48 100% 96.1%);--sl-color-amber-100: hsl(48 96.5% 88.8%);--sl-color-amber-200: hsl(48 96.6% 76.7%);--sl-color-amber-300: hsl(45.9 96.7% 64.5%);--sl-color-amber-400: hsl(43.3 96.4% 56.3%);--sl-color-amber-500: hsl(37.7 92.1% 50.2%);--sl-color-amber-600: hsl(32.1 94.6% 43.7%);--sl-color-amber-700: hsl(26 90.5% 37.1%);--sl-color-amber-800: hsl(22.7 82.5% 31.4%);--sl-color-amber-900: hsl(21.7 77.8% 26.5%);--sl-color-amber-950: hsl(22.9 74.1% 16.7%);--sl-color-yellow-50: hsl(54.5 91.7% 95.3%);--sl-color-yellow-100: hsl(54.9 96.7% 88%);--sl-color-yellow-200: hsl(52.8 98.3% 76.9%);--sl-color-yellow-300: hsl(50.4 97.8% 63.5%);--sl-color-yellow-400: hsl(47.9 95.8% 53.1%);--sl-color-yellow-500: hsl(45.4 93.4% 47.5%);--sl-color-yellow-600: hsl(40.6 96.1% 40.4%);--sl-color-yellow-700: hsl(35.5 91.7% 32.9%);--sl-color-yellow-800: hsl(31.8 81% 28.8%);--sl-color-yellow-900: hsl(28.4 72.5% 25.7%);--sl-color-yellow-950: hsl(33.1 69% 13.9%);--sl-color-lime-50: hsl(78.3 92% 95.1%);--sl-color-lime-100: hsl(79.6 89.1% 89.2%);--sl-color-lime-200: hsl(80.9 88.5% 79.6%);--sl-color-lime-300: hsl(82 84.5% 67.1%);--sl-color-lime-400: hsl(82.7 78% 55.5%);--sl-color-lime-500: hsl(83.7 80.5% 44.3%);--sl-color-lime-600: hsl(84.8 85.2% 34.5%);--sl-color-lime-700: hsl(85.9 78.4% 27.3%);--sl-color-lime-800: hsl(86.3 69% 22.7%);--sl-color-lime-900: hsl(87.6 61.2% 20.2%);--sl-color-lime-950: hsl(86.5 60.6% 13.9%);--sl-color-green-50: hsl(138.5 76.5% 96.7%);--sl-color-green-100: hsl(140.6 84.2% 92.5%);--sl-color-green-200: hsl(141 78.9% 85.1%);--sl-color-green-300: hsl(141.7 76.6% 73.1%);--sl-color-green-400: hsl(141.9 69.2% 58%);--sl-color-green-500: hsl(142.1 70.6% 45.3%);--sl-color-green-600: hsl(142.1 76.2% 36.3%);--sl-color-green-700: hsl(142.4 71.8% 29.2%);--sl-color-green-800: hsl(142.8 64.2% 24.1%);--sl-color-green-900: hsl(143.8 61.2% 20.2%);--sl-color-green-950: hsl(144.3 60.7% 12%);--sl-color-emerald-50: hsl(151.8 81% 95.9%);--sl-color-emerald-100: hsl(149.3 80.4% 90%);--sl-color-emerald-200: hsl(152.4 76% 80.4%);--sl-color-emerald-300: hsl(156.2 71.6% 66.9%);--sl-color-emerald-400: hsl(158.1 64.4% 51.6%);--sl-color-emerald-500: hsl(160.1 84.1% 39.4%);--sl-color-emerald-600: hsl(161.4 93.5% 30.4%);--sl-color-emerald-700: hsl(162.9 93.5% 24.3%);--sl-color-emerald-800: hsl(163.1 88.1% 19.8%);--sl-color-emerald-900: hsl(164.2 85.7% 16.5%);--sl-color-emerald-950: hsl(164.3 87.5% 9.4%);--sl-color-teal-50: hsl(166.2 76.5% 96.7%);--sl-color-teal-100: hsl(167.2 85.5% 89.2%);--sl-color-teal-200: hsl(168.4 83.8% 78.2%);--sl-color-teal-300: hsl(170.6 76.9% 64.3%);--sl-color-teal-400: hsl(172.5 66% 50.4%);--sl-color-teal-500: hsl(173.4 80.4% 40%);--sl-color-teal-600: hsl(174.7 83.9% 31.6%);--sl-color-teal-700: hsl(175.3 77.4% 26.1%);--sl-color-teal-800: hsl(176.1 69.4% 21.8%);--sl-color-teal-900: hsl(175.9 60.8% 19%);--sl-color-teal-950: hsl(176.5 58.6% 11.4%);--sl-color-cyan-50: hsl(183.2 100% 96.3%);--sl-color-cyan-100: hsl(185.1 95.9% 90.4%);--sl-color-cyan-200: hsl(186.2 93.5% 81.8%);--sl-color-cyan-300: hsl(187 92.4% 69%);--sl-color-cyan-400: hsl(187.9 85.7% 53.3%);--sl-color-cyan-500: hsl(188.7 94.5% 42.7%);--sl-color-cyan-600: hsl(191.6 91.4% 36.5%);--sl-color-cyan-700: hsl(192.9 82.3% 31%);--sl-color-cyan-800: hsl(194.4 69.6% 27.1%);--sl-color-cyan-900: hsl(196.4 63.6% 23.7%);--sl-color-cyan-950: hsl(196.8 61% 16.1%);--sl-color-sky-50: hsl(204 100% 97.1%);--sl-color-sky-100: hsl(204 93.8% 93.7%);--sl-color-sky-200: hsl(200.6 94.4% 86.1%);--sl-color-sky-300: hsl(199.4 95.5% 73.9%);--sl-color-sky-400: hsl(198.4 93.2% 59.6%);--sl-color-sky-500: hsl(198.6 88.7% 48.4%);--sl-color-sky-600: hsl(200.4 98% 39.4%);--sl-color-sky-700: hsl(201.3 96.3% 32.2%);--sl-color-sky-800: hsl(201 90% 27.5%);--sl-color-sky-900: hsl(202 80.3% 23.9%);--sl-color-sky-950: hsl(202.3 73.8% 16.5%);--sl-color-blue-50: hsl(213.8 100% 96.9%);--sl-color-blue-100: hsl(214.3 94.6% 92.7%);--sl-color-blue-200: hsl(213.3 96.9% 87.3%);--sl-color-blue-300: hsl(211.7 96.4% 78.4%);--sl-color-blue-400: hsl(213.1 93.9% 67.8%);--sl-color-blue-500: hsl(217.2 91.2% 59.8%);--sl-color-blue-600: hsl(221.2 83.2% 53.3%);--sl-color-blue-700: hsl(224.3 76.3% 48%);--sl-color-blue-800: hsl(225.9 70.7% 40.2%);--sl-color-blue-900: hsl(224.4 64.3% 32.9%);--sl-color-blue-950: hsl(226.2 55.3% 18.4%);--sl-color-indigo-50: hsl(225.9 100% 96.7%);--sl-color-indigo-100: hsl(226.5 100% 93.9%);--sl-color-indigo-200: hsl(228 96.5% 88.8%);--sl-color-indigo-300: hsl(229.7 93.5% 81.8%);--sl-color-indigo-400: hsl(234.5 89.5% 73.9%);--sl-color-indigo-500: hsl(238.7 83.5% 66.7%);--sl-color-indigo-600: hsl(243.4 75.4% 58.6%);--sl-color-indigo-700: hsl(244.5 57.9% 50.6%);--sl-color-indigo-800: hsl(243.7 54.5% 41.4%);--sl-color-indigo-900: hsl(242.2 47.4% 34.3%);--sl-color-indigo-950: hsl(243.5 43.6% 22.9%);--sl-color-violet-50: hsl(250 100% 97.6%);--sl-color-violet-100: hsl(251.4 91.3% 95.5%);--sl-color-violet-200: hsl(250.5 95.2% 91.8%);--sl-color-violet-300: hsl(252.5 94.7% 85.1%);--sl-color-violet-400: hsl(255.1 91.7% 76.3%);--sl-color-violet-500: hsl(258.3 89.5% 66.3%);--sl-color-violet-600: hsl(262.1 83.3% 57.8%);--sl-color-violet-700: hsl(263.4 70% 50.4%);--sl-color-violet-800: hsl(263.4 69.3% 42.2%);--sl-color-violet-900: hsl(263.5 67.4% 34.9%);--sl-color-violet-950: hsl(265.1 61.5% 21.4%);--sl-color-purple-50: hsl(270 100% 98%);--sl-color-purple-100: hsl(268.7 100% 95.5%);--sl-color-purple-200: hsl(268.6 100% 91.8%);--sl-color-purple-300: hsl(269.2 97.4% 85.1%);--sl-color-purple-400: hsl(270 95.2% 75.3%);--sl-color-purple-500: hsl(270.7 91% 65.1%);--sl-color-purple-600: hsl(271.5 81.3% 55.9%);--sl-color-purple-700: hsl(272.1 71.7% 47.1%);--sl-color-purple-800: hsl(272.9 67.2% 39.4%);--sl-color-purple-900: hsl(273.6 65.6% 32%);--sl-color-purple-950: hsl(276 59.5% 16.5%);--sl-color-fuchsia-50: hsl(289.1 100% 97.8%);--sl-color-fuchsia-100: hsl(287 100% 95.5%);--sl-color-fuchsia-200: hsl(288.3 95.8% 90.6%);--sl-color-fuchsia-300: hsl(291.1 93.1% 82.9%);--sl-color-fuchsia-400: hsl(292 91.4% 72.5%);--sl-color-fuchsia-500: hsl(292.2 84.1% 60.6%);--sl-color-fuchsia-600: hsl(293.4 69.5% 48.8%);--sl-color-fuchsia-700: hsl(294.7 72.4% 39.8%);--sl-color-fuchsia-800: hsl(295.4 70.2% 32.9%);--sl-color-fuchsia-900: hsl(296.7 63.6% 28%);--sl-color-fuchsia-950: hsl(297.1 56.8% 14.5%);--sl-color-pink-50: hsl(327.3 73.3% 97.1%);--sl-color-pink-100: hsl(325.7 77.8% 94.7%);--sl-color-pink-200: hsl(325.9 84.6% 89.8%);--sl-color-pink-300: hsl(327.4 87.1% 81.8%);--sl-color-pink-400: hsl(328.6 85.5% 70.2%);--sl-color-pink-500: hsl(330.4 81.2% 60.4%);--sl-color-pink-600: hsl(333.3 71.4% 50.6%);--sl-color-pink-700: hsl(335.1 77.6% 42%);--sl-color-pink-800: hsl(335.8 74.4% 35.3%);--sl-color-pink-900: hsl(335.9 69% 30.4%);--sl-color-pink-950: hsl(336.2 65.4% 15.9%);--sl-color-rose-50: hsl(355.7 100% 97.3%);--sl-color-rose-100: hsl(355.6 100% 94.7%);--sl-color-rose-200: hsl(352.7 96.1% 90%);--sl-color-rose-300: hsl(352.6 95.7% 81.8%);--sl-color-rose-400: hsl(351.3 94.5% 71.4%);--sl-color-rose-500: hsl(349.7 89.2% 60.2%);--sl-color-rose-600: hsl(346.8 77.2% 49.8%);--sl-color-rose-700: hsl(345.3 82.7% 40.8%);--sl-color-rose-800: hsl(343.4 79.7% 34.7%);--sl-color-rose-900: hsl(341.5 75.5% 30.4%);--sl-color-rose-950: hsl(341.3 70.1% 17.1%);--sl-color-primary-50: var(--sl-color-sky-50);--sl-color-primary-100: var(--sl-color-sky-100);--sl-color-primary-200: var(--sl-color-sky-200);--sl-color-primary-300: var(--sl-color-sky-300);--sl-color-primary-400: var(--sl-color-sky-400);--sl-color-primary-500: var(--sl-color-sky-500);--sl-color-primary-600: var(--sl-color-sky-600);--sl-color-primary-700: var(--sl-color-sky-700);--sl-color-primary-800: var(--sl-color-sky-800);--sl-color-primary-900: var(--sl-color-sky-900);--sl-color-primary-950: var(--sl-color-sky-950);--sl-color-success-50: var(--sl-color-green-50);--sl-color-success-100: var(--sl-color-green-100);--sl-color-success-200: var(--sl-color-green-200);--sl-color-success-300: var(--sl-color-green-300);--sl-color-success-400: var(--sl-color-green-400);--sl-color-success-500: var(--sl-color-green-500);--sl-color-success-600: var(--sl-color-green-600);--sl-color-success-700: var(--sl-color-green-700);--sl-color-success-800: var(--sl-color-green-800);--sl-color-success-900: var(--sl-color-green-900);--sl-color-success-950: var(--sl-color-green-950);--sl-color-warning-50: var(--sl-color-amber-50);--sl-color-warning-100: var(--sl-color-amber-100);--sl-color-warning-200: var(--sl-color-amber-200);--sl-color-warning-300: var(--sl-color-amber-300);--sl-color-warning-400: var(--sl-color-amber-400);--sl-color-warning-500: var(--sl-color-amber-500);--sl-color-warning-600: var(--sl-color-amber-600);--sl-color-warning-700: var(--sl-color-amber-700);--sl-color-warning-800: var(--sl-color-amber-800);--sl-color-warning-900: var(--sl-color-amber-900);--sl-color-warning-950: var(--sl-color-amber-950);--sl-color-danger-50: var(--sl-color-red-50);--sl-color-danger-100: var(--sl-color-red-100);--sl-color-danger-200: var(--sl-color-red-200);--sl-color-danger-300: var(--sl-color-red-300);--sl-color-danger-400: var(--sl-color-red-400);--sl-color-danger-500: var(--sl-color-red-500);--sl-color-danger-600: var(--sl-color-red-600);--sl-color-danger-700: var(--sl-color-red-700);--sl-color-danger-800: var(--sl-color-red-800);--sl-color-danger-900: var(--sl-color-red-900);--sl-color-danger-950: var(--sl-color-red-950);--sl-color-neutral-50: var(--sl-color-gray-50);--sl-color-neutral-100: var(--sl-color-gray-100);--sl-color-neutral-200: var(--sl-color-gray-200);--sl-color-neutral-300: var(--sl-color-gray-300);--sl-color-neutral-400: var(--sl-color-gray-400);--sl-color-neutral-500: var(--sl-color-gray-500);--sl-color-neutral-600: var(--sl-color-gray-600);--sl-color-neutral-700: var(--sl-color-gray-700);--sl-color-neutral-800: var(--sl-color-gray-800);--sl-color-neutral-900: var(--sl-color-gray-900);--sl-color-neutral-950: var(--sl-color-gray-950);--sl-color-neutral-0: hsl(0, 0%, 100%);--sl-color-neutral-1000: hsl(0, 0%, 0%);--sl-border-radius-small: .1875rem;--sl-border-radius-medium: .25rem;--sl-border-radius-large: .5rem;--sl-border-radius-x-large: 1rem;--sl-border-radius-circle: 50%;--sl-border-radius-pill: 9999px;--sl-shadow-x-small: 0 1px 2px hsl(240 3.8% 46.1% / 6%);--sl-shadow-small: 0 1px 2px hsl(240 3.8% 46.1% / 12%);--sl-shadow-medium: 0 2px 4px hsl(240 3.8% 46.1% / 12%);--sl-shadow-large: 0 2px 8px hsl(240 3.8% 46.1% / 12%);--sl-shadow-x-large: 0 4px 16px hsl(240 3.8% 46.1% / 12%);--sl-spacing-3x-small: .125rem;--sl-spacing-2x-small: .25rem;--sl-spacing-x-small: .5rem;--sl-spacing-small: .75rem;--sl-spacing-medium: 1rem;--sl-spacing-large: 1.25rem;--sl-spacing-x-large: 1.75rem;--sl-spacing-2x-large: 2.25rem;--sl-spacing-3x-large: 3rem;--sl-spacing-4x-large: 4.5rem;--sl-transition-x-slow: 1s;--sl-transition-slow: .5s;--sl-transition-medium: .25s;--sl-transition-fast: .15s;--sl-transition-x-fast: 50ms;--sl-font-mono: SFMono-Regular, Consolas, "Liberation Mono", Menlo, monospace;--sl-font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";--sl-font-serif: Georgia, "Times New Roman", serif;--sl-font-size-2x-small: .625rem;--sl-font-size-x-small: .75rem;--sl-font-size-small: .875rem;--sl-font-size-medium: 1rem;--sl-font-size-large: 1.25rem;--sl-font-size-x-large: 1.5rem;--sl-font-size-2x-large: 2.25rem;--sl-font-size-3x-large: 3rem;--sl-font-size-4x-large: 4.5rem;--sl-font-weight-light: 300;--sl-font-weight-normal: 400;--sl-font-weight-semibold: 500;--sl-font-weight-bold: 700;--sl-letter-spacing-denser: -.03em;--sl-letter-spacing-dense: -.015em;--sl-letter-spacing-normal: normal;--sl-letter-spacing-loose: .075em;--sl-letter-spacing-looser: .15em;--sl-line-height-denser: 1;--sl-line-height-dense: 1.4;--sl-line-height-normal: 1.8;--sl-line-height-loose: 2.2;--sl-line-height-looser: 2.6;--sl-focus-ring-color: var(--sl-color-primary-600);--sl-focus-ring-style: solid;--sl-focus-ring-width: 3px;--sl-focus-ring: var(--sl-focus-ring-style) var(--sl-focus-ring-width) var(--sl-focus-ring-color);--sl-focus-ring-offset: 1px;--sl-button-font-size-small: var(--sl-font-size-x-small);--sl-button-font-size-medium: var(--sl-font-size-small);--sl-button-font-size-large: var(--sl-font-size-medium);--sl-input-height-small: 1.875rem;--sl-input-height-medium: 2.5rem;--sl-input-height-large: 3.125rem;--sl-input-background-color: var(--sl-color-neutral-0);--sl-input-background-color-hover: var(--sl-input-background-color);--sl-input-background-color-focus: var(--sl-input-background-color);--sl-input-background-color-disabled: var(--sl-color-neutral-100);--sl-input-border-color: var(--sl-color-neutral-300);--sl-input-border-color-hover: var(--sl-color-neutral-400);--sl-input-border-color-focus: var(--sl-color-primary-500);--sl-input-border-color-disabled: var(--sl-color-neutral-300);--sl-input-border-width: 1px;--sl-input-required-content: "*";--sl-input-required-content-offset: -2px;--sl-input-required-content-color: var(--sl-input-label-color);--sl-input-border-radius-small: var(--sl-border-radius-medium);--sl-input-border-radius-medium: var(--sl-border-radius-medium);--sl-input-border-radius-large: var(--sl-border-radius-medium);--sl-input-font-family: var(--sl-font-sans);--sl-input-font-weight: var(--sl-font-weight-normal);--sl-input-font-size-small: var(--sl-font-size-small);--sl-input-font-size-medium: var(--sl-font-size-medium);--sl-input-font-size-large: var(--sl-font-size-large);--sl-input-letter-spacing: var(--sl-letter-spacing-normal);--sl-input-color: var(--sl-color-neutral-700);--sl-input-color-hover: var(--sl-color-neutral-700);--sl-input-color-focus: var(--sl-color-neutral-700);--sl-input-color-disabled: var(--sl-color-neutral-900);--sl-input-icon-color: var(--sl-color-neutral-500);--sl-input-icon-color-hover: var(--sl-color-neutral-600);--sl-input-icon-color-focus: var(--sl-color-neutral-600);--sl-input-placeholder-color: var(--sl-color-neutral-500);--sl-input-placeholder-color-disabled: var(--sl-color-neutral-600);--sl-input-spacing-small: var(--sl-spacing-small);--sl-input-spacing-medium: var(--sl-spacing-medium);--sl-input-spacing-large: var(--sl-spacing-large);--sl-input-focus-ring-color: hsl(198.6 88.7% 48.4% / 40%);--sl-input-focus-ring-offset: 0;--sl-input-filled-background-color: var(--sl-color-neutral-100);--sl-input-filled-background-color-hover: var(--sl-color-neutral-100);--sl-input-filled-background-color-focus: var(--sl-color-neutral-100);--sl-input-filled-background-color-disabled: var(--sl-color-neutral-100);--sl-input-filled-color: var(--sl-color-neutral-800);--sl-input-filled-color-hover: var(--sl-color-neutral-800);--sl-input-filled-color-focus: var(--sl-color-neutral-700);--sl-input-filled-color-disabled: var(--sl-color-neutral-800);--sl-input-label-font-size-small: var(--sl-font-size-small);--sl-input-label-font-size-medium: var(--sl-font-size-medium);--sl-input-label-font-size-large: var(--sl-font-size-large);--sl-input-label-color: inherit;--sl-input-help-text-font-size-small: var(--sl-font-size-x-small);--sl-input-help-text-font-size-medium: var(--sl-font-size-small);--sl-input-help-text-font-size-large: var(--sl-font-size-medium);--sl-input-help-text-color: var(--sl-color-neutral-500);--sl-toggle-size-small: .875rem;--sl-toggle-size-medium: 1.125rem;--sl-toggle-size-large: 1.375rem;--sl-overlay-background-color: hsl(240 3.8% 46.1% / 33%);--sl-panel-background-color: var(--sl-color-neutral-0);--sl-panel-border-color: var(--sl-color-neutral-200);--sl-panel-border-width: 1px;--sl-tooltip-border-radius: var(--sl-border-radius-medium);--sl-tooltip-background-color: var(--sl-color-neutral-800);--sl-tooltip-color: var(--sl-color-neutral-0);--sl-tooltip-font-family: var(--sl-font-sans);--sl-tooltip-font-weight: var(--sl-font-weight-normal);--sl-tooltip-font-size: var(--sl-font-size-small);--sl-tooltip-line-height: var(--sl-line-height-dense);--sl-tooltip-padding: var(--sl-spacing-2x-small) var(--sl-spacing-x-small);--sl-tooltip-arrow-size: 6px;--sl-z-index-drawer: 700;--sl-z-index-dialog: 800;--sl-z-index-dropdown: 900;--sl-z-index-toast: 950;--sl-z-index-tooltip: 1000}.sl-scroll-lock{padding-right:var(--sl-scroll-lock-size)!important;overflow:hidden!important}.sl-toast-stack{position:fixed;top:0;inset-inline-end:0;z-index:var(--sl-z-index-toast);width:28rem;max-width:100%;max-height:100%;overflow:auto}.sl-toast-stack sl-alert{margin:var(--sl-spacing-medium)}.sl-toast-stack sl-alert::part(base){box-shadow:var(--sl-shadow-large)}')),document.head.appendChild(l)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})();
|
|
2
|
+
var Ln = Object.defineProperty, Un = Object.defineProperties;
|
|
3
|
+
var jn = Object.getOwnPropertyDescriptors;
|
|
4
|
+
var pe = Object.getOwnPropertySymbols, Hn = Object.getPrototypeOf, Fn = Object.prototype.hasOwnProperty, Bn = Object.prototype.propertyIsEnumerable, qn = Reflect.get;
|
|
5
|
+
var _e = (e, t, n) => t in e ? Ln(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, d = (e, t) => {
|
|
6
|
+
for (var n in t || (t = {}))
|
|
7
|
+
Fn.call(t, n) && _e(e, n, t[n]);
|
|
8
|
+
if (pe)
|
|
9
|
+
for (var n of pe(t))
|
|
10
|
+
Bn.call(t, n) && _e(e, n, t[n]);
|
|
11
|
+
return e;
|
|
12
|
+
}, _ = (e, t) => Un(e, jn(t));
|
|
13
|
+
var ge = (e, t, n) => qn(Hn(e), n, t);
|
|
14
|
+
var E = (e, t, n) => new Promise((r, s) => {
|
|
15
|
+
var i = (c) => {
|
|
16
|
+
try {
|
|
17
|
+
a(n.next(c));
|
|
18
|
+
} catch (u) {
|
|
19
|
+
s(u);
|
|
20
|
+
}
|
|
21
|
+
}, o = (c) => {
|
|
22
|
+
try {
|
|
23
|
+
a(n.throw(c));
|
|
24
|
+
} catch (u) {
|
|
25
|
+
s(u);
|
|
26
|
+
}
|
|
27
|
+
}, a = (c) => c.done ? r(c.value) : Promise.resolve(c.value).then(i, o);
|
|
28
|
+
a((n = n.apply(e, t)).next());
|
|
29
|
+
});
|
|
30
|
+
/**
|
|
31
|
+
* @license
|
|
32
|
+
* Copyright 2019 Google LLC
|
|
33
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
34
|
+
*/
|
|
35
|
+
const ht = window, re = ht.ShadowRoot && (ht.ShadyCSS === void 0 || ht.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, se = Symbol(), me = /* @__PURE__ */ new WeakMap();
|
|
36
|
+
let rn = class {
|
|
37
|
+
constructor(t, n, r) {
|
|
38
|
+
if (this._$cssResult$ = !0, r !== se)
|
|
39
|
+
throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
40
|
+
this.cssText = t, this.t = n;
|
|
41
|
+
}
|
|
42
|
+
get styleSheet() {
|
|
43
|
+
let t = this.o;
|
|
44
|
+
const n = this.t;
|
|
45
|
+
if (re && t === void 0) {
|
|
46
|
+
const r = n !== void 0 && n.length === 1;
|
|
47
|
+
r && (t = me.get(n)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), r && me.set(n, t));
|
|
48
|
+
}
|
|
49
|
+
return t;
|
|
50
|
+
}
|
|
51
|
+
toString() {
|
|
52
|
+
return this.cssText;
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
const zn = (e) => new rn(typeof e == "string" ? e : e + "", void 0, se), Wn = (e, ...t) => {
|
|
56
|
+
const n = e.length === 1 ? e[0] : t.reduce((r, s, i) => r + ((o) => {
|
|
57
|
+
if (o._$cssResult$ === !0)
|
|
58
|
+
return o.cssText;
|
|
59
|
+
if (typeof o == "number")
|
|
60
|
+
return o;
|
|
61
|
+
throw Error("Value passed to 'css' function must be a 'css' function result: " + o + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
|
|
62
|
+
})(s) + e[i + 1], e[0]);
|
|
63
|
+
return new rn(n, e, se);
|
|
64
|
+
}, Gn = (e, t) => {
|
|
65
|
+
re ? e.adoptedStyleSheets = t.map((n) => n instanceof CSSStyleSheet ? n : n.styleSheet) : t.forEach((n) => {
|
|
66
|
+
const r = document.createElement("style"), s = ht.litNonce;
|
|
67
|
+
s !== void 0 && r.setAttribute("nonce", s), r.textContent = n.cssText, e.appendChild(r);
|
|
68
|
+
});
|
|
69
|
+
}, ye = re ? (e) => e : (e) => e instanceof CSSStyleSheet ? ((t) => {
|
|
70
|
+
let n = "";
|
|
71
|
+
for (const r of t.cssRules)
|
|
72
|
+
n += r.cssText;
|
|
73
|
+
return zn(n);
|
|
74
|
+
})(e) : e;
|
|
75
|
+
/**
|
|
76
|
+
* @license
|
|
77
|
+
* Copyright 2017 Google LLC
|
|
78
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
79
|
+
*/
|
|
80
|
+
var Rt;
|
|
81
|
+
const ft = window, Ee = ft.trustedTypes, Vn = Ee ? Ee.emptyScript : "", ve = ft.reactiveElementPolyfillSupport, Ht = { toAttribute(e, t) {
|
|
82
|
+
switch (t) {
|
|
83
|
+
case Boolean:
|
|
84
|
+
e = e ? Vn : null;
|
|
85
|
+
break;
|
|
86
|
+
case Object:
|
|
87
|
+
case Array:
|
|
88
|
+
e = e == null ? e : JSON.stringify(e);
|
|
89
|
+
}
|
|
90
|
+
return e;
|
|
91
|
+
}, fromAttribute(e, t) {
|
|
92
|
+
let n = e;
|
|
93
|
+
switch (t) {
|
|
94
|
+
case Boolean:
|
|
95
|
+
n = e !== null;
|
|
96
|
+
break;
|
|
97
|
+
case Number:
|
|
98
|
+
n = e === null ? null : Number(e);
|
|
99
|
+
break;
|
|
100
|
+
case Object:
|
|
101
|
+
case Array:
|
|
102
|
+
try {
|
|
103
|
+
n = JSON.parse(e);
|
|
104
|
+
} catch (r) {
|
|
105
|
+
n = null;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
return n;
|
|
109
|
+
} }, sn = (e, t) => t !== e && (t == t || e == e), Pt = { attribute: !0, type: String, converter: Ht, reflect: !1, hasChanged: sn }, Ft = "finalized";
|
|
110
|
+
let U = class extends HTMLElement {
|
|
111
|
+
constructor() {
|
|
112
|
+
super(), this._$Ei = /* @__PURE__ */ new Map(), this.isUpdatePending = !1, this.hasUpdated = !1, this._$El = null, this._$Eu();
|
|
113
|
+
}
|
|
114
|
+
static addInitializer(t) {
|
|
115
|
+
var n;
|
|
116
|
+
this.finalize(), ((n = this.h) !== null && n !== void 0 ? n : this.h = []).push(t);
|
|
117
|
+
}
|
|
118
|
+
static get observedAttributes() {
|
|
119
|
+
this.finalize();
|
|
120
|
+
const t = [];
|
|
121
|
+
return this.elementProperties.forEach((n, r) => {
|
|
122
|
+
const s = this._$Ep(r, n);
|
|
123
|
+
s !== void 0 && (this._$Ev.set(s, r), t.push(s));
|
|
124
|
+
}), t;
|
|
125
|
+
}
|
|
126
|
+
static createProperty(t, n = Pt) {
|
|
127
|
+
if (n.state && (n.attribute = !1), this.finalize(), this.elementProperties.set(t, n), !n.noAccessor && !this.prototype.hasOwnProperty(t)) {
|
|
128
|
+
const r = typeof t == "symbol" ? Symbol() : "__" + t, s = this.getPropertyDescriptor(t, r, n);
|
|
129
|
+
s !== void 0 && Object.defineProperty(this.prototype, t, s);
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
static getPropertyDescriptor(t, n, r) {
|
|
133
|
+
return { get() {
|
|
134
|
+
return this[n];
|
|
135
|
+
}, set(s) {
|
|
136
|
+
const i = this[t];
|
|
137
|
+
this[n] = s, this.requestUpdate(t, i, r);
|
|
138
|
+
}, configurable: !0, enumerable: !0 };
|
|
139
|
+
}
|
|
140
|
+
static getPropertyOptions(t) {
|
|
141
|
+
return this.elementProperties.get(t) || Pt;
|
|
142
|
+
}
|
|
143
|
+
static finalize() {
|
|
144
|
+
if (this.hasOwnProperty(Ft))
|
|
145
|
+
return !1;
|
|
146
|
+
this[Ft] = !0;
|
|
147
|
+
const t = Object.getPrototypeOf(this);
|
|
148
|
+
if (t.finalize(), t.h !== void 0 && (this.h = [...t.h]), this.elementProperties = new Map(t.elementProperties), this._$Ev = /* @__PURE__ */ new Map(), this.hasOwnProperty("properties")) {
|
|
149
|
+
const n = this.properties, r = [...Object.getOwnPropertyNames(n), ...Object.getOwnPropertySymbols(n)];
|
|
150
|
+
for (const s of r)
|
|
151
|
+
this.createProperty(s, n[s]);
|
|
152
|
+
}
|
|
153
|
+
return this.elementStyles = this.finalizeStyles(this.styles), !0;
|
|
154
|
+
}
|
|
155
|
+
static finalizeStyles(t) {
|
|
156
|
+
const n = [];
|
|
157
|
+
if (Array.isArray(t)) {
|
|
158
|
+
const r = new Set(t.flat(1 / 0).reverse());
|
|
159
|
+
for (const s of r)
|
|
160
|
+
n.unshift(ye(s));
|
|
161
|
+
} else
|
|
162
|
+
t !== void 0 && n.push(ye(t));
|
|
163
|
+
return n;
|
|
164
|
+
}
|
|
165
|
+
static _$Ep(t, n) {
|
|
166
|
+
const r = n.attribute;
|
|
167
|
+
return r === !1 ? void 0 : typeof r == "string" ? r : typeof t == "string" ? t.toLowerCase() : void 0;
|
|
168
|
+
}
|
|
169
|
+
_$Eu() {
|
|
170
|
+
var t;
|
|
171
|
+
this._$E_ = new Promise((n) => this.enableUpdating = n), this._$AL = /* @__PURE__ */ new Map(), this._$Eg(), this.requestUpdate(), (t = this.constructor.h) === null || t === void 0 || t.forEach((n) => n(this));
|
|
172
|
+
}
|
|
173
|
+
addController(t) {
|
|
174
|
+
var n, r;
|
|
175
|
+
((n = this._$ES) !== null && n !== void 0 ? n : this._$ES = []).push(t), this.renderRoot !== void 0 && this.isConnected && ((r = t.hostConnected) === null || r === void 0 || r.call(t));
|
|
176
|
+
}
|
|
177
|
+
removeController(t) {
|
|
178
|
+
var n;
|
|
179
|
+
(n = this._$ES) === null || n === void 0 || n.splice(this._$ES.indexOf(t) >>> 0, 1);
|
|
180
|
+
}
|
|
181
|
+
_$Eg() {
|
|
182
|
+
this.constructor.elementProperties.forEach((t, n) => {
|
|
183
|
+
this.hasOwnProperty(n) && (this._$Ei.set(n, this[n]), delete this[n]);
|
|
184
|
+
});
|
|
185
|
+
}
|
|
186
|
+
createRenderRoot() {
|
|
187
|
+
var t;
|
|
188
|
+
const n = (t = this.shadowRoot) !== null && t !== void 0 ? t : this.attachShadow(this.constructor.shadowRootOptions);
|
|
189
|
+
return Gn(n, this.constructor.elementStyles), n;
|
|
190
|
+
}
|
|
191
|
+
connectedCallback() {
|
|
192
|
+
var t;
|
|
193
|
+
this.renderRoot === void 0 && (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), (t = this._$ES) === null || t === void 0 || t.forEach((n) => {
|
|
194
|
+
var r;
|
|
195
|
+
return (r = n.hostConnected) === null || r === void 0 ? void 0 : r.call(n);
|
|
196
|
+
});
|
|
197
|
+
}
|
|
198
|
+
enableUpdating(t) {
|
|
199
|
+
}
|
|
200
|
+
disconnectedCallback() {
|
|
201
|
+
var t;
|
|
202
|
+
(t = this._$ES) === null || t === void 0 || t.forEach((n) => {
|
|
203
|
+
var r;
|
|
204
|
+
return (r = n.hostDisconnected) === null || r === void 0 ? void 0 : r.call(n);
|
|
205
|
+
});
|
|
206
|
+
}
|
|
207
|
+
attributeChangedCallback(t, n, r) {
|
|
208
|
+
this._$AK(t, r);
|
|
209
|
+
}
|
|
210
|
+
_$EO(t, n, r = Pt) {
|
|
211
|
+
var s;
|
|
212
|
+
const i = this.constructor._$Ep(t, r);
|
|
213
|
+
if (i !== void 0 && r.reflect === !0) {
|
|
214
|
+
const o = (((s = r.converter) === null || s === void 0 ? void 0 : s.toAttribute) !== void 0 ? r.converter : Ht).toAttribute(n, r.type);
|
|
215
|
+
this._$El = t, o == null ? this.removeAttribute(i) : this.setAttribute(i, o), this._$El = null;
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
_$AK(t, n) {
|
|
219
|
+
var r;
|
|
220
|
+
const s = this.constructor, i = s._$Ev.get(t);
|
|
221
|
+
if (i !== void 0 && this._$El !== i) {
|
|
222
|
+
const o = s.getPropertyOptions(i), a = typeof o.converter == "function" ? { fromAttribute: o.converter } : ((r = o.converter) === null || r === void 0 ? void 0 : r.fromAttribute) !== void 0 ? o.converter : Ht;
|
|
223
|
+
this._$El = i, this[i] = a.fromAttribute(n, o.type), this._$El = null;
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
requestUpdate(t, n, r) {
|
|
227
|
+
let s = !0;
|
|
228
|
+
t !== void 0 && (((r = r || this.constructor.getPropertyOptions(t)).hasChanged || sn)(this[t], n) ? (this._$AL.has(t) || this._$AL.set(t, n), r.reflect === !0 && this._$El !== t && (this._$EC === void 0 && (this._$EC = /* @__PURE__ */ new Map()), this._$EC.set(t, r))) : s = !1), !this.isUpdatePending && s && (this._$E_ = this._$Ej());
|
|
229
|
+
}
|
|
230
|
+
_$Ej() {
|
|
231
|
+
return E(this, null, function* () {
|
|
232
|
+
this.isUpdatePending = !0;
|
|
233
|
+
try {
|
|
234
|
+
yield this._$E_;
|
|
235
|
+
} catch (n) {
|
|
236
|
+
Promise.reject(n);
|
|
237
|
+
}
|
|
238
|
+
const t = this.scheduleUpdate();
|
|
239
|
+
return t != null && (yield t), !this.isUpdatePending;
|
|
240
|
+
});
|
|
241
|
+
}
|
|
242
|
+
scheduleUpdate() {
|
|
243
|
+
return this.performUpdate();
|
|
244
|
+
}
|
|
245
|
+
performUpdate() {
|
|
246
|
+
var t;
|
|
247
|
+
if (!this.isUpdatePending)
|
|
248
|
+
return;
|
|
249
|
+
this._$Ei && (this._$Ei.forEach((s, i) => this[i] = s), this._$Ei = void 0);
|
|
250
|
+
let n = !1;
|
|
251
|
+
const r = this._$AL;
|
|
252
|
+
try {
|
|
253
|
+
n = this.shouldUpdate(r), n ? (this.willUpdate(r), (t = this._$ES) === null || t === void 0 || t.forEach((s) => {
|
|
254
|
+
var i;
|
|
255
|
+
return (i = s.hostUpdate) === null || i === void 0 ? void 0 : i.call(s);
|
|
256
|
+
}), this.update(r)) : this._$Ek();
|
|
257
|
+
} catch (s) {
|
|
258
|
+
throw n = !1, this._$Ek(), s;
|
|
259
|
+
}
|
|
260
|
+
n && this._$AE(r);
|
|
261
|
+
}
|
|
262
|
+
willUpdate(t) {
|
|
263
|
+
}
|
|
264
|
+
_$AE(t) {
|
|
265
|
+
var n;
|
|
266
|
+
(n = this._$ES) === null || n === void 0 || n.forEach((r) => {
|
|
267
|
+
var s;
|
|
268
|
+
return (s = r.hostUpdated) === null || s === void 0 ? void 0 : s.call(r);
|
|
269
|
+
}), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
|
|
270
|
+
}
|
|
271
|
+
_$Ek() {
|
|
272
|
+
this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = !1;
|
|
273
|
+
}
|
|
274
|
+
get updateComplete() {
|
|
275
|
+
return this.getUpdateComplete();
|
|
276
|
+
}
|
|
277
|
+
getUpdateComplete() {
|
|
278
|
+
return this._$E_;
|
|
279
|
+
}
|
|
280
|
+
shouldUpdate(t) {
|
|
281
|
+
return !0;
|
|
282
|
+
}
|
|
283
|
+
update(t) {
|
|
284
|
+
this._$EC !== void 0 && (this._$EC.forEach((n, r) => this._$EO(r, this[r], n)), this._$EC = void 0), this._$Ek();
|
|
285
|
+
}
|
|
286
|
+
updated(t) {
|
|
287
|
+
}
|
|
288
|
+
firstUpdated(t) {
|
|
289
|
+
}
|
|
290
|
+
};
|
|
291
|
+
U[Ft] = !0, U.elementProperties = /* @__PURE__ */ new Map(), U.elementStyles = [], U.shadowRootOptions = { mode: "open" }, ve == null || ve({ ReactiveElement: U }), ((Rt = ft.reactiveElementVersions) !== null && Rt !== void 0 ? Rt : ft.reactiveElementVersions = []).push("1.6.3");
|
|
292
|
+
/**
|
|
293
|
+
* @license
|
|
294
|
+
* Copyright 2017 Google LLC
|
|
295
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
296
|
+
*/
|
|
297
|
+
var It;
|
|
298
|
+
const pt = window, H = pt.trustedTypes, be = H ? H.createPolicy("lit-html", { createHTML: (e) => e }) : void 0, Bt = "$lit$", R = `lit$${(Math.random() + "").slice(9)}$`, on = "?" + R, Yn = `<${on}>`, D = document, Z = () => D.createComment(""), Q = (e) => e === null || typeof e != "object" && typeof e != "function", an = Array.isArray, Kn = (e) => an(e) || typeof (e == null ? void 0 : e[Symbol.iterator]) == "function", Ct = `[
|
|
299
|
+
\f\r]`, V = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Se = /-->/g, $e = />/g, P = RegExp(`>|${Ct}(?:([^\\s"'>=/]+)(${Ct}*=${Ct}*(?:[^
|
|
300
|
+
\f\r"'\`<>=]|("|')|))|$)`, "g"), we = /'/g, Ae = /"/g, cn = /^(?:script|style|textarea|title)$/i, Jn = (e) => (t, ...n) => ({ _$litType$: e, strings: t, values: n }), Xn = Jn(1), F = Symbol.for("lit-noChange"), g = Symbol.for("lit-nothing"), ke = /* @__PURE__ */ new WeakMap(), C = D.createTreeWalker(D, 129, null, !1);
|
|
301
|
+
function un(e, t) {
|
|
302
|
+
if (!Array.isArray(e) || !e.hasOwnProperty("raw"))
|
|
303
|
+
throw Error("invalid template strings array");
|
|
304
|
+
return be !== void 0 ? be.createHTML(t) : t;
|
|
305
|
+
}
|
|
306
|
+
const Zn = (e, t) => {
|
|
307
|
+
const n = e.length - 1, r = [];
|
|
308
|
+
let s, i = t === 2 ? "<svg>" : "", o = V;
|
|
309
|
+
for (let a = 0; a < n; a++) {
|
|
310
|
+
const c = e[a];
|
|
311
|
+
let u, h, l = -1, f = 0;
|
|
312
|
+
for (; f < c.length && (o.lastIndex = f, h = o.exec(c), h !== null); )
|
|
313
|
+
f = o.lastIndex, o === V ? h[1] === "!--" ? o = Se : h[1] !== void 0 ? o = $e : h[2] !== void 0 ? (cn.test(h[2]) && (s = RegExp("</" + h[2], "g")), o = P) : h[3] !== void 0 && (o = P) : o === P ? h[0] === ">" ? (o = s != null ? s : V, l = -1) : h[1] === void 0 ? l = -2 : (l = o.lastIndex - h[2].length, u = h[1], o = h[3] === void 0 ? P : h[3] === '"' ? Ae : we) : o === Ae || o === we ? o = P : o === Se || o === $e ? o = V : (o = P, s = void 0);
|
|
314
|
+
const p = o === P && e[a + 1].startsWith("/>") ? " " : "";
|
|
315
|
+
i += o === V ? c + Yn : l >= 0 ? (r.push(u), c.slice(0, l) + Bt + c.slice(l) + R + p) : c + R + (l === -2 ? (r.push(void 0), a) : p);
|
|
316
|
+
}
|
|
317
|
+
return [un(e, i + (e[n] || "<?>") + (t === 2 ? "</svg>" : "")), r];
|
|
318
|
+
};
|
|
319
|
+
class tt {
|
|
320
|
+
constructor({ strings: t, _$litType$: n }, r) {
|
|
321
|
+
let s;
|
|
322
|
+
this.parts = [];
|
|
323
|
+
let i = 0, o = 0;
|
|
324
|
+
const a = t.length - 1, c = this.parts, [u, h] = Zn(t, n);
|
|
325
|
+
if (this.el = tt.createElement(u, r), C.currentNode = this.el.content, n === 2) {
|
|
326
|
+
const l = this.el.content, f = l.firstChild;
|
|
327
|
+
f.remove(), l.append(...f.childNodes);
|
|
328
|
+
}
|
|
329
|
+
for (; (s = C.nextNode()) !== null && c.length < a; ) {
|
|
330
|
+
if (s.nodeType === 1) {
|
|
331
|
+
if (s.hasAttributes()) {
|
|
332
|
+
const l = [];
|
|
333
|
+
for (const f of s.getAttributeNames())
|
|
334
|
+
if (f.endsWith(Bt) || f.startsWith(R)) {
|
|
335
|
+
const p = h[o++];
|
|
336
|
+
if (l.push(f), p !== void 0) {
|
|
337
|
+
const k = s.getAttribute(p.toLowerCase() + Bt).split(R), ot = /([.?@])?(.*)/.exec(p);
|
|
338
|
+
c.push({ type: 1, index: i, name: ot[2], strings: k, ctor: ot[1] === "." ? tr : ot[1] === "?" ? nr : ot[1] === "@" ? rr : Et });
|
|
339
|
+
} else
|
|
340
|
+
c.push({ type: 6, index: i });
|
|
341
|
+
}
|
|
342
|
+
for (const f of l)
|
|
343
|
+
s.removeAttribute(f);
|
|
344
|
+
}
|
|
345
|
+
if (cn.test(s.tagName)) {
|
|
346
|
+
const l = s.textContent.split(R), f = l.length - 1;
|
|
347
|
+
if (f > 0) {
|
|
348
|
+
s.textContent = H ? H.emptyScript : "";
|
|
349
|
+
for (let p = 0; p < f; p++)
|
|
350
|
+
s.append(l[p], Z()), C.nextNode(), c.push({ type: 2, index: ++i });
|
|
351
|
+
s.append(l[f], Z());
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
} else if (s.nodeType === 8)
|
|
355
|
+
if (s.data === on)
|
|
356
|
+
c.push({ type: 2, index: i });
|
|
357
|
+
else {
|
|
358
|
+
let l = -1;
|
|
359
|
+
for (; (l = s.data.indexOf(R, l + 1)) !== -1; )
|
|
360
|
+
c.push({ type: 7, index: i }), l += R.length - 1;
|
|
361
|
+
}
|
|
362
|
+
i++;
|
|
363
|
+
}
|
|
364
|
+
}
|
|
365
|
+
static createElement(t, n) {
|
|
366
|
+
const r = D.createElement("template");
|
|
367
|
+
return r.innerHTML = t, r;
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
function B(e, t, n = e, r) {
|
|
371
|
+
var s, i, o, a;
|
|
372
|
+
if (t === F)
|
|
373
|
+
return t;
|
|
374
|
+
let c = r !== void 0 ? (s = n._$Co) === null || s === void 0 ? void 0 : s[r] : n._$Cl;
|
|
375
|
+
const u = Q(t) ? void 0 : t._$litDirective$;
|
|
376
|
+
return (c == null ? void 0 : c.constructor) !== u && ((i = c == null ? void 0 : c._$AO) === null || i === void 0 || i.call(c, !1), u === void 0 ? c = void 0 : (c = new u(e), c._$AT(e, n, r)), r !== void 0 ? ((o = (a = n)._$Co) !== null && o !== void 0 ? o : a._$Co = [])[r] = c : n._$Cl = c), c !== void 0 && (t = B(e, c._$AS(e, t.values), c, r)), t;
|
|
377
|
+
}
|
|
378
|
+
class Qn {
|
|
379
|
+
constructor(t, n) {
|
|
380
|
+
this._$AV = [], this._$AN = void 0, this._$AD = t, this._$AM = n;
|
|
381
|
+
}
|
|
382
|
+
get parentNode() {
|
|
383
|
+
return this._$AM.parentNode;
|
|
384
|
+
}
|
|
385
|
+
get _$AU() {
|
|
386
|
+
return this._$AM._$AU;
|
|
387
|
+
}
|
|
388
|
+
u(t) {
|
|
389
|
+
var n;
|
|
390
|
+
const { el: { content: r }, parts: s } = this._$AD, i = ((n = t == null ? void 0 : t.creationScope) !== null && n !== void 0 ? n : D).importNode(r, !0);
|
|
391
|
+
C.currentNode = i;
|
|
392
|
+
let o = C.nextNode(), a = 0, c = 0, u = s[0];
|
|
393
|
+
for (; u !== void 0; ) {
|
|
394
|
+
if (a === u.index) {
|
|
395
|
+
let h;
|
|
396
|
+
u.type === 2 ? h = new nt(o, o.nextSibling, this, t) : u.type === 1 ? h = new u.ctor(o, u.name, u.strings, this, t) : u.type === 6 && (h = new sr(o, this, t)), this._$AV.push(h), u = s[++c];
|
|
397
|
+
}
|
|
398
|
+
a !== (u == null ? void 0 : u.index) && (o = C.nextNode(), a++);
|
|
399
|
+
}
|
|
400
|
+
return C.currentNode = D, i;
|
|
401
|
+
}
|
|
402
|
+
v(t) {
|
|
403
|
+
let n = 0;
|
|
404
|
+
for (const r of this._$AV)
|
|
405
|
+
r !== void 0 && (r.strings !== void 0 ? (r._$AI(t, r, n), n += r.strings.length - 2) : r._$AI(t[n])), n++;
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
class nt {
|
|
409
|
+
constructor(t, n, r, s) {
|
|
410
|
+
var i;
|
|
411
|
+
this.type = 2, this._$AH = g, this._$AN = void 0, this._$AA = t, this._$AB = n, this._$AM = r, this.options = s, this._$Cp = (i = s == null ? void 0 : s.isConnected) === null || i === void 0 || i;
|
|
412
|
+
}
|
|
413
|
+
get _$AU() {
|
|
414
|
+
var t, n;
|
|
415
|
+
return (n = (t = this._$AM) === null || t === void 0 ? void 0 : t._$AU) !== null && n !== void 0 ? n : this._$Cp;
|
|
416
|
+
}
|
|
417
|
+
get parentNode() {
|
|
418
|
+
let t = this._$AA.parentNode;
|
|
419
|
+
const n = this._$AM;
|
|
420
|
+
return n !== void 0 && (t == null ? void 0 : t.nodeType) === 11 && (t = n.parentNode), t;
|
|
421
|
+
}
|
|
422
|
+
get startNode() {
|
|
423
|
+
return this._$AA;
|
|
424
|
+
}
|
|
425
|
+
get endNode() {
|
|
426
|
+
return this._$AB;
|
|
427
|
+
}
|
|
428
|
+
_$AI(t, n = this) {
|
|
429
|
+
t = B(this, t, n), Q(t) ? t === g || t == null || t === "" ? (this._$AH !== g && this._$AR(), this._$AH = g) : t !== this._$AH && t !== F && this._(t) : t._$litType$ !== void 0 ? this.g(t) : t.nodeType !== void 0 ? this.$(t) : Kn(t) ? this.T(t) : this._(t);
|
|
430
|
+
}
|
|
431
|
+
k(t) {
|
|
432
|
+
return this._$AA.parentNode.insertBefore(t, this._$AB);
|
|
433
|
+
}
|
|
434
|
+
$(t) {
|
|
435
|
+
this._$AH !== t && (this._$AR(), this._$AH = this.k(t));
|
|
436
|
+
}
|
|
437
|
+
_(t) {
|
|
438
|
+
this._$AH !== g && Q(this._$AH) ? this._$AA.nextSibling.data = t : this.$(D.createTextNode(t)), this._$AH = t;
|
|
439
|
+
}
|
|
440
|
+
g(t) {
|
|
441
|
+
var n;
|
|
442
|
+
const { values: r, _$litType$: s } = t, i = typeof s == "number" ? this._$AC(t) : (s.el === void 0 && (s.el = tt.createElement(un(s.h, s.h[0]), this.options)), s);
|
|
443
|
+
if (((n = this._$AH) === null || n === void 0 ? void 0 : n._$AD) === i)
|
|
444
|
+
this._$AH.v(r);
|
|
445
|
+
else {
|
|
446
|
+
const o = new Qn(i, this), a = o.u(this.options);
|
|
447
|
+
o.v(r), this.$(a), this._$AH = o;
|
|
448
|
+
}
|
|
449
|
+
}
|
|
450
|
+
_$AC(t) {
|
|
451
|
+
let n = ke.get(t.strings);
|
|
452
|
+
return n === void 0 && ke.set(t.strings, n = new tt(t)), n;
|
|
453
|
+
}
|
|
454
|
+
T(t) {
|
|
455
|
+
an(this._$AH) || (this._$AH = [], this._$AR());
|
|
456
|
+
const n = this._$AH;
|
|
457
|
+
let r, s = 0;
|
|
458
|
+
for (const i of t)
|
|
459
|
+
s === n.length ? n.push(r = new nt(this.k(Z()), this.k(Z()), this, this.options)) : r = n[s], r._$AI(i), s++;
|
|
460
|
+
s < n.length && (this._$AR(r && r._$AB.nextSibling, s), n.length = s);
|
|
461
|
+
}
|
|
462
|
+
_$AR(t = this._$AA.nextSibling, n) {
|
|
463
|
+
var r;
|
|
464
|
+
for ((r = this._$AP) === null || r === void 0 || r.call(this, !1, !0, n); t && t !== this._$AB; ) {
|
|
465
|
+
const s = t.nextSibling;
|
|
466
|
+
t.remove(), t = s;
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
setConnected(t) {
|
|
470
|
+
var n;
|
|
471
|
+
this._$AM === void 0 && (this._$Cp = t, (n = this._$AP) === null || n === void 0 || n.call(this, t));
|
|
472
|
+
}
|
|
473
|
+
}
|
|
474
|
+
class Et {
|
|
475
|
+
constructor(t, n, r, s, i) {
|
|
476
|
+
this.type = 1, this._$AH = g, this._$AN = void 0, this.element = t, this.name = n, this._$AM = s, this.options = i, r.length > 2 || r[0] !== "" || r[1] !== "" ? (this._$AH = Array(r.length - 1).fill(new String()), this.strings = r) : this._$AH = g;
|
|
477
|
+
}
|
|
478
|
+
get tagName() {
|
|
479
|
+
return this.element.tagName;
|
|
480
|
+
}
|
|
481
|
+
get _$AU() {
|
|
482
|
+
return this._$AM._$AU;
|
|
483
|
+
}
|
|
484
|
+
_$AI(t, n = this, r, s) {
|
|
485
|
+
const i = this.strings;
|
|
486
|
+
let o = !1;
|
|
487
|
+
if (i === void 0)
|
|
488
|
+
t = B(this, t, n, 0), o = !Q(t) || t !== this._$AH && t !== F, o && (this._$AH = t);
|
|
489
|
+
else {
|
|
490
|
+
const a = t;
|
|
491
|
+
let c, u;
|
|
492
|
+
for (t = i[0], c = 0; c < i.length - 1; c++)
|
|
493
|
+
u = B(this, a[r + c], n, c), u === F && (u = this._$AH[c]), o || (o = !Q(u) || u !== this._$AH[c]), u === g ? t = g : t !== g && (t += (u != null ? u : "") + i[c + 1]), this._$AH[c] = u;
|
|
494
|
+
}
|
|
495
|
+
o && !s && this.j(t);
|
|
496
|
+
}
|
|
497
|
+
j(t) {
|
|
498
|
+
t === g ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, t != null ? t : "");
|
|
499
|
+
}
|
|
500
|
+
}
|
|
501
|
+
class tr extends Et {
|
|
502
|
+
constructor() {
|
|
503
|
+
super(...arguments), this.type = 3;
|
|
504
|
+
}
|
|
505
|
+
j(t) {
|
|
506
|
+
this.element[this.name] = t === g ? void 0 : t;
|
|
507
|
+
}
|
|
508
|
+
}
|
|
509
|
+
const er = H ? H.emptyScript : "";
|
|
510
|
+
class nr extends Et {
|
|
511
|
+
constructor() {
|
|
512
|
+
super(...arguments), this.type = 4;
|
|
513
|
+
}
|
|
514
|
+
j(t) {
|
|
515
|
+
t && t !== g ? this.element.setAttribute(this.name, er) : this.element.removeAttribute(this.name);
|
|
516
|
+
}
|
|
517
|
+
}
|
|
518
|
+
class rr extends Et {
|
|
519
|
+
constructor(t, n, r, s, i) {
|
|
520
|
+
super(t, n, r, s, i), this.type = 5;
|
|
521
|
+
}
|
|
522
|
+
_$AI(t, n = this) {
|
|
523
|
+
var r;
|
|
524
|
+
if ((t = (r = B(this, t, n, 0)) !== null && r !== void 0 ? r : g) === F)
|
|
525
|
+
return;
|
|
526
|
+
const s = this._$AH, i = t === g && s !== g || t.capture !== s.capture || t.once !== s.once || t.passive !== s.passive, o = t !== g && (s === g || i);
|
|
527
|
+
i && this.element.removeEventListener(this.name, this, s), o && this.element.addEventListener(this.name, this, t), this._$AH = t;
|
|
528
|
+
}
|
|
529
|
+
handleEvent(t) {
|
|
530
|
+
var n, r;
|
|
531
|
+
typeof this._$AH == "function" ? this._$AH.call((r = (n = this.options) === null || n === void 0 ? void 0 : n.host) !== null && r !== void 0 ? r : this.element, t) : this._$AH.handleEvent(t);
|
|
532
|
+
}
|
|
533
|
+
}
|
|
534
|
+
class sr {
|
|
535
|
+
constructor(t, n, r) {
|
|
536
|
+
this.element = t, this.type = 6, this._$AN = void 0, this._$AM = n, this.options = r;
|
|
537
|
+
}
|
|
538
|
+
get _$AU() {
|
|
539
|
+
return this._$AM._$AU;
|
|
540
|
+
}
|
|
541
|
+
_$AI(t) {
|
|
542
|
+
B(this, t);
|
|
543
|
+
}
|
|
544
|
+
}
|
|
545
|
+
const xe = pt.litHtmlPolyfillSupport;
|
|
546
|
+
xe == null || xe(tt, nt), ((It = pt.litHtmlVersions) !== null && It !== void 0 ? It : pt.litHtmlVersions = []).push("2.8.0");
|
|
547
|
+
const ir = (e, t, n) => {
|
|
548
|
+
var r, s;
|
|
549
|
+
const i = (r = n == null ? void 0 : n.renderBefore) !== null && r !== void 0 ? r : t;
|
|
550
|
+
let o = i._$litPart$;
|
|
551
|
+
if (o === void 0) {
|
|
552
|
+
const a = (s = n == null ? void 0 : n.renderBefore) !== null && s !== void 0 ? s : null;
|
|
553
|
+
i._$litPart$ = o = new nt(t.insertBefore(Z(), a), a, void 0, n != null ? n : {});
|
|
554
|
+
}
|
|
555
|
+
return o._$AI(e), o;
|
|
556
|
+
};
|
|
557
|
+
/**
|
|
558
|
+
* @license
|
|
559
|
+
* Copyright 2017 Google LLC
|
|
560
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
561
|
+
*/
|
|
562
|
+
var Nt, Dt;
|
|
563
|
+
let J = class extends U {
|
|
564
|
+
constructor() {
|
|
565
|
+
super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
|
|
566
|
+
}
|
|
567
|
+
createRenderRoot() {
|
|
568
|
+
var t, n;
|
|
569
|
+
const r = super.createRenderRoot();
|
|
570
|
+
return (t = (n = this.renderOptions).renderBefore) !== null && t !== void 0 || (n.renderBefore = r.firstChild), r;
|
|
571
|
+
}
|
|
572
|
+
update(t) {
|
|
573
|
+
const n = this.render();
|
|
574
|
+
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(t), this._$Do = ir(n, this.renderRoot, this.renderOptions);
|
|
575
|
+
}
|
|
576
|
+
connectedCallback() {
|
|
577
|
+
var t;
|
|
578
|
+
super.connectedCallback(), (t = this._$Do) === null || t === void 0 || t.setConnected(!0);
|
|
579
|
+
}
|
|
580
|
+
disconnectedCallback() {
|
|
581
|
+
var t;
|
|
582
|
+
super.disconnectedCallback(), (t = this._$Do) === null || t === void 0 || t.setConnected(!1);
|
|
583
|
+
}
|
|
584
|
+
render() {
|
|
585
|
+
return F;
|
|
586
|
+
}
|
|
587
|
+
};
|
|
588
|
+
J.finalized = !0, J._$litElement$ = !0, (Nt = globalThis.litElementHydrateSupport) === null || Nt === void 0 || Nt.call(globalThis, { LitElement: J });
|
|
589
|
+
const Oe = globalThis.litElementPolyfillSupport;
|
|
590
|
+
Oe == null || Oe({ LitElement: J });
|
|
591
|
+
((Dt = globalThis.litElementVersions) !== null && Dt !== void 0 ? Dt : globalThis.litElementVersions = []).push("3.3.3");
|
|
592
|
+
/**
|
|
593
|
+
* @license
|
|
594
|
+
* Copyright 2017 Google LLC
|
|
595
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
596
|
+
*/
|
|
597
|
+
const or = (e) => (t) => typeof t == "function" ? ((n, r) => (customElements.define(n, r), r))(e, t) : ((n, r) => {
|
|
598
|
+
const { kind: s, elements: i } = r;
|
|
599
|
+
return { kind: s, elements: i, finisher(o) {
|
|
600
|
+
customElements.define(n, o);
|
|
601
|
+
} };
|
|
602
|
+
})(e, t);
|
|
603
|
+
/**
|
|
604
|
+
* @license
|
|
605
|
+
* Copyright 2017 Google LLC
|
|
606
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
607
|
+
*/
|
|
608
|
+
const ar = (e, t) => t.kind === "method" && t.descriptor && !("value" in t.descriptor) ? _(d({}, t), { finisher(n) {
|
|
609
|
+
n.createProperty(t.key, e);
|
|
610
|
+
} }) : { kind: "field", key: Symbol(), placement: "own", descriptor: {}, originalKey: t.key, initializer() {
|
|
611
|
+
typeof t.initializer == "function" && (this[t.key] = t.initializer.call(this));
|
|
612
|
+
}, finisher(n) {
|
|
613
|
+
n.createProperty(t.key, e);
|
|
614
|
+
} }, cr = (e, t, n) => {
|
|
615
|
+
t.constructor.createProperty(n, e);
|
|
616
|
+
};
|
|
617
|
+
function ie(e) {
|
|
618
|
+
return (t, n) => n !== void 0 ? cr(e, t, n) : ar(e, t);
|
|
619
|
+
}
|
|
620
|
+
/**
|
|
621
|
+
* @license
|
|
622
|
+
* Copyright 2017 Google LLC
|
|
623
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
624
|
+
*/
|
|
625
|
+
const ur = ({ finisher: e, descriptor: t }) => (n, r) => {
|
|
626
|
+
var s;
|
|
627
|
+
if (r === void 0) {
|
|
628
|
+
const i = (s = n.originalKey) !== null && s !== void 0 ? s : n.key, o = t != null ? { kind: "method", placement: "prototype", key: i, descriptor: t(n.key) } : _(d({}, n), { key: i });
|
|
629
|
+
return e != null && (o.finisher = function(a) {
|
|
630
|
+
e(a, i);
|
|
631
|
+
}), o;
|
|
632
|
+
}
|
|
633
|
+
{
|
|
634
|
+
const i = n.constructor;
|
|
635
|
+
t !== void 0 && Object.defineProperty(n, r, t(r)), e == null || e(i, r);
|
|
636
|
+
}
|
|
637
|
+
};
|
|
638
|
+
/**
|
|
639
|
+
* @license
|
|
640
|
+
* Copyright 2021 Google LLC
|
|
641
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
642
|
+
*/
|
|
643
|
+
let lr = class extends Event {
|
|
644
|
+
constructor(t, n, r) {
|
|
645
|
+
super("context-request", { bubbles: !0, composed: !0 }), this.context = t, this.callback = n, this.subscribe = r != null && r;
|
|
646
|
+
}
|
|
647
|
+
};
|
|
648
|
+
/**
|
|
649
|
+
* @license
|
|
650
|
+
* Copyright 2021 Google LLC
|
|
651
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
652
|
+
*/
|
|
653
|
+
/**
|
|
654
|
+
* @license
|
|
655
|
+
* Copyright 2021 Google LLC
|
|
656
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
657
|
+
*/
|
|
658
|
+
class dr {
|
|
659
|
+
constructor(t) {
|
|
660
|
+
this.subscriptions = /* @__PURE__ */ new Map(), this.updateObservers = () => {
|
|
661
|
+
for (const [n, { disposer: r }] of this.subscriptions)
|
|
662
|
+
n(this.o, r);
|
|
663
|
+
}, t !== void 0 && (this.value = t);
|
|
664
|
+
}
|
|
665
|
+
get value() {
|
|
666
|
+
return this.o;
|
|
667
|
+
}
|
|
668
|
+
set value(t) {
|
|
669
|
+
this.setValue(t);
|
|
670
|
+
}
|
|
671
|
+
setValue(t, n = !1) {
|
|
672
|
+
const r = n || !Object.is(t, this.o);
|
|
673
|
+
this.o = t, r && this.updateObservers();
|
|
674
|
+
}
|
|
675
|
+
addCallback(t, n, r) {
|
|
676
|
+
if (!r)
|
|
677
|
+
return void t(this.value);
|
|
678
|
+
this.subscriptions.has(t) || this.subscriptions.set(t, { disposer: () => {
|
|
679
|
+
this.subscriptions.delete(t);
|
|
680
|
+
}, consumerHost: n });
|
|
681
|
+
const { disposer: s } = this.subscriptions.get(t);
|
|
682
|
+
t(this.value, s);
|
|
683
|
+
}
|
|
684
|
+
clearCallbacks() {
|
|
685
|
+
this.subscriptions.clear();
|
|
686
|
+
}
|
|
687
|
+
}
|
|
688
|
+
/**
|
|
689
|
+
* @license
|
|
690
|
+
* Copyright 2021 Google LLC
|
|
691
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
692
|
+
*/
|
|
693
|
+
class hr extends Event {
|
|
694
|
+
constructor(t) {
|
|
695
|
+
super("context-provider", { bubbles: !0, composed: !0 }), this.context = t;
|
|
696
|
+
}
|
|
697
|
+
}
|
|
698
|
+
class fr extends dr {
|
|
699
|
+
constructor(t, n, r) {
|
|
700
|
+
super(n.context !== void 0 ? n.initialValue : r), this.onContextRequest = (s) => {
|
|
701
|
+
const i = s.composedPath()[0];
|
|
702
|
+
s.context === this.context && i !== this.host && (s.stopPropagation(), this.addCallback(s.callback, i, s.subscribe));
|
|
703
|
+
}, this.onProviderRequest = (s) => {
|
|
704
|
+
const i = s.composedPath()[0];
|
|
705
|
+
if (s.context === this.context && i !== this.host) {
|
|
706
|
+
for (const [o, { consumerHost: a }] of this.subscriptions)
|
|
707
|
+
a.dispatchEvent(new lr(this.context, o, !0));
|
|
708
|
+
s.stopPropagation();
|
|
709
|
+
}
|
|
710
|
+
}, this.host = t, n.context !== void 0 ? this.context = n.context : this.context = n, this.attachListeners(), this.host.addController(this);
|
|
711
|
+
}
|
|
712
|
+
attachListeners() {
|
|
713
|
+
this.host.addEventListener("context-request", this.onContextRequest), this.host.addEventListener("context-provider", this.onProviderRequest);
|
|
714
|
+
}
|
|
715
|
+
hostConnected() {
|
|
716
|
+
this.host.dispatchEvent(new hr(this.context));
|
|
717
|
+
}
|
|
718
|
+
}
|
|
719
|
+
/**
|
|
720
|
+
* @license
|
|
721
|
+
* Copyright 2017 Google LLC
|
|
722
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
723
|
+
*/
|
|
724
|
+
function pr({ context: e }) {
|
|
725
|
+
return ur({ finisher: (t, n) => {
|
|
726
|
+
const r = /* @__PURE__ */ new WeakMap();
|
|
727
|
+
t.addInitializer((a) => {
|
|
728
|
+
r.set(a, new fr(a, { context: e }));
|
|
729
|
+
});
|
|
730
|
+
const s = Object.getOwnPropertyDescriptor(t.prototype, n), i = s == null ? void 0 : s.set, o = _(d({}, s), { set: function(a) {
|
|
731
|
+
var c;
|
|
732
|
+
(c = r.get(this)) === null || c === void 0 || c.setValue(a), i && i.call(this, a);
|
|
733
|
+
} });
|
|
734
|
+
Object.defineProperty(t.prototype, n, o);
|
|
735
|
+
} });
|
|
736
|
+
}
|
|
737
|
+
const ln = Object.prototype.toString;
|
|
738
|
+
function dn(e) {
|
|
739
|
+
switch (ln.call(e)) {
|
|
740
|
+
case "[object Error]":
|
|
741
|
+
case "[object Exception]":
|
|
742
|
+
case "[object DOMException]":
|
|
743
|
+
return !0;
|
|
744
|
+
default:
|
|
745
|
+
return M(e, Error);
|
|
746
|
+
}
|
|
747
|
+
}
|
|
748
|
+
function rt(e, t) {
|
|
749
|
+
return ln.call(e) === `[object ${t}]`;
|
|
750
|
+
}
|
|
751
|
+
function oe(e) {
|
|
752
|
+
return rt(e, "ErrorEvent");
|
|
753
|
+
}
|
|
754
|
+
function Te(e) {
|
|
755
|
+
return rt(e, "DOMError");
|
|
756
|
+
}
|
|
757
|
+
function _r(e) {
|
|
758
|
+
return rt(e, "DOMException");
|
|
759
|
+
}
|
|
760
|
+
function et(e) {
|
|
761
|
+
return rt(e, "String");
|
|
762
|
+
}
|
|
763
|
+
function hn(e) {
|
|
764
|
+
return e === null || typeof e != "object" && typeof e != "function";
|
|
765
|
+
}
|
|
766
|
+
function q(e) {
|
|
767
|
+
return rt(e, "Object");
|
|
768
|
+
}
|
|
769
|
+
function vt(e) {
|
|
770
|
+
return typeof Event != "undefined" && M(e, Event);
|
|
771
|
+
}
|
|
772
|
+
function gr(e) {
|
|
773
|
+
return typeof Element != "undefined" && M(e, Element);
|
|
774
|
+
}
|
|
775
|
+
function ae(e) {
|
|
776
|
+
return !!(e && e.then && typeof e.then == "function");
|
|
777
|
+
}
|
|
778
|
+
function mr(e) {
|
|
779
|
+
return q(e) && "nativeEvent" in e && "preventDefault" in e && "stopPropagation" in e;
|
|
780
|
+
}
|
|
781
|
+
function yr(e) {
|
|
782
|
+
return typeof e == "number" && e !== e;
|
|
783
|
+
}
|
|
784
|
+
function M(e, t) {
|
|
785
|
+
try {
|
|
786
|
+
return e instanceof t;
|
|
787
|
+
} catch (n) {
|
|
788
|
+
return !1;
|
|
789
|
+
}
|
|
790
|
+
}
|
|
791
|
+
function fn(e) {
|
|
792
|
+
return !!(typeof e == "object" && e !== null && (e.__isVue || e._isVue));
|
|
793
|
+
}
|
|
794
|
+
function j(e, t = 0) {
|
|
795
|
+
return typeof e != "string" || t === 0 || e.length <= t ? e : `${e.slice(0, t)}...`;
|
|
796
|
+
}
|
|
797
|
+
function Re(e, t) {
|
|
798
|
+
if (!Array.isArray(e))
|
|
799
|
+
return "";
|
|
800
|
+
const n = [];
|
|
801
|
+
for (let r = 0; r < e.length; r++) {
|
|
802
|
+
const s = e[r];
|
|
803
|
+
try {
|
|
804
|
+
fn(s) ? n.push("[VueViewModel]") : n.push(String(s));
|
|
805
|
+
} catch (i) {
|
|
806
|
+
n.push("[value cannot be serialized]");
|
|
807
|
+
}
|
|
808
|
+
}
|
|
809
|
+
return n.join(t);
|
|
810
|
+
}
|
|
811
|
+
function Er(e, t, n = 250, r, s, i, o) {
|
|
812
|
+
if (!i.exception || !i.exception.values || !o || !M(o.originalException, Error))
|
|
813
|
+
return;
|
|
814
|
+
const a = i.exception.values.length > 0 ? i.exception.values[i.exception.values.length - 1] : void 0;
|
|
815
|
+
a && (i.exception.values = vr(
|
|
816
|
+
qt(
|
|
817
|
+
e,
|
|
818
|
+
t,
|
|
819
|
+
s,
|
|
820
|
+
o.originalException,
|
|
821
|
+
r,
|
|
822
|
+
i.exception.values,
|
|
823
|
+
a,
|
|
824
|
+
0
|
|
825
|
+
),
|
|
826
|
+
n
|
|
827
|
+
));
|
|
828
|
+
}
|
|
829
|
+
function qt(e, t, n, r, s, i, o, a) {
|
|
830
|
+
if (i.length >= n + 1)
|
|
831
|
+
return i;
|
|
832
|
+
let c = [...i];
|
|
833
|
+
if (M(r[s], Error)) {
|
|
834
|
+
Pe(o, a);
|
|
835
|
+
const u = e(t, r[s]), h = c.length;
|
|
836
|
+
Ie(u, s, h, a), c = qt(
|
|
837
|
+
e,
|
|
838
|
+
t,
|
|
839
|
+
n,
|
|
840
|
+
r[s],
|
|
841
|
+
s,
|
|
842
|
+
[u, ...c],
|
|
843
|
+
u,
|
|
844
|
+
h
|
|
845
|
+
);
|
|
846
|
+
}
|
|
847
|
+
return Array.isArray(r.errors) && r.errors.forEach((u, h) => {
|
|
848
|
+
if (M(u, Error)) {
|
|
849
|
+
Pe(o, a);
|
|
850
|
+
const l = e(t, u), f = c.length;
|
|
851
|
+
Ie(l, `errors[${h}]`, f, a), c = qt(
|
|
852
|
+
e,
|
|
853
|
+
t,
|
|
854
|
+
n,
|
|
855
|
+
u,
|
|
856
|
+
s,
|
|
857
|
+
[l, ...c],
|
|
858
|
+
l,
|
|
859
|
+
f
|
|
860
|
+
);
|
|
861
|
+
}
|
|
862
|
+
}), c;
|
|
863
|
+
}
|
|
864
|
+
function Pe(e, t) {
|
|
865
|
+
e.mechanism = e.mechanism || { type: "generic", handled: !0 }, e.mechanism = _(d({}, e.mechanism), {
|
|
866
|
+
is_exception_group: !0,
|
|
867
|
+
exception_id: t
|
|
868
|
+
});
|
|
869
|
+
}
|
|
870
|
+
function Ie(e, t, n, r) {
|
|
871
|
+
e.mechanism = e.mechanism || { type: "generic", handled: !0 }, e.mechanism = _(d({}, e.mechanism), {
|
|
872
|
+
type: "chained",
|
|
873
|
+
source: t,
|
|
874
|
+
exception_id: n,
|
|
875
|
+
parent_id: r
|
|
876
|
+
});
|
|
877
|
+
}
|
|
878
|
+
function vr(e, t) {
|
|
879
|
+
return e.map((n) => (n.value && (n.value = j(n.value, t)), n));
|
|
880
|
+
}
|
|
881
|
+
function at(e) {
|
|
882
|
+
return e && e.Math == Math ? e : void 0;
|
|
883
|
+
}
|
|
884
|
+
const y = typeof globalThis == "object" && at(globalThis) || // eslint-disable-next-line no-restricted-globals
|
|
885
|
+
typeof window == "object" && at(window) || typeof self == "object" && at(self) || typeof global == "object" && at(global) || function() {
|
|
886
|
+
return this;
|
|
887
|
+
}() || {};
|
|
888
|
+
function st() {
|
|
889
|
+
return y;
|
|
890
|
+
}
|
|
891
|
+
function pn(e, t, n) {
|
|
892
|
+
const r = n || y, s = r.__SENTRY__ = r.__SENTRY__ || {};
|
|
893
|
+
return s[e] || (s[e] = t());
|
|
894
|
+
}
|
|
895
|
+
const br = st(), Sr = 80;
|
|
896
|
+
function zt(e, t = {}) {
|
|
897
|
+
if (!e)
|
|
898
|
+
return "<unknown>";
|
|
899
|
+
try {
|
|
900
|
+
let n = e;
|
|
901
|
+
const r = 5, s = [];
|
|
902
|
+
let i = 0, o = 0;
|
|
903
|
+
const a = " > ", c = a.length;
|
|
904
|
+
let u;
|
|
905
|
+
const h = Array.isArray(t) ? t : t.keyAttrs, l = !Array.isArray(t) && t.maxStringLength || Sr;
|
|
906
|
+
for (; n && i++ < r && (u = $r(n, h), !(u === "html" || i > 1 && o + s.length * c + u.length >= l)); )
|
|
907
|
+
s.push(u), o += u.length, n = n.parentNode;
|
|
908
|
+
return s.reverse().join(a);
|
|
909
|
+
} catch (n) {
|
|
910
|
+
return "<unknown>";
|
|
911
|
+
}
|
|
912
|
+
}
|
|
913
|
+
function $r(e, t) {
|
|
914
|
+
const n = e, r = [];
|
|
915
|
+
let s, i, o, a, c;
|
|
916
|
+
if (!n || !n.tagName)
|
|
917
|
+
return "";
|
|
918
|
+
r.push(n.tagName.toLowerCase());
|
|
919
|
+
const u = t && t.length ? t.filter((l) => n.getAttribute(l)).map((l) => [l, n.getAttribute(l)]) : null;
|
|
920
|
+
if (u && u.length)
|
|
921
|
+
u.forEach((l) => {
|
|
922
|
+
r.push(`[${l[0]}="${l[1]}"]`);
|
|
923
|
+
});
|
|
924
|
+
else if (n.id && r.push(`#${n.id}`), s = n.className, s && et(s))
|
|
925
|
+
for (i = s.split(/\s+/), c = 0; c < i.length; c++)
|
|
926
|
+
r.push(`.${i[c]}`);
|
|
927
|
+
const h = ["aria-label", "type", "name", "title", "alt"];
|
|
928
|
+
for (c = 0; c < h.length; c++)
|
|
929
|
+
o = h[c], a = n.getAttribute(o), a && r.push(`[${o}="${a}"]`);
|
|
930
|
+
return r.join("");
|
|
931
|
+
}
|
|
932
|
+
function wr() {
|
|
933
|
+
try {
|
|
934
|
+
return br.document.location.href;
|
|
935
|
+
} catch (e) {
|
|
936
|
+
return "";
|
|
937
|
+
}
|
|
938
|
+
}
|
|
939
|
+
const Ar = ["debug", "info", "warn", "error", "log", "assert", "trace"], _t = {};
|
|
940
|
+
function kr(e) {
|
|
941
|
+
if (!("console" in y))
|
|
942
|
+
return e();
|
|
943
|
+
const t = y.console, n = {}, r = Object.keys(_t);
|
|
944
|
+
r.forEach((s) => {
|
|
945
|
+
const i = _t[s];
|
|
946
|
+
n[s] = t[s], t[s] = i;
|
|
947
|
+
});
|
|
948
|
+
try {
|
|
949
|
+
return e();
|
|
950
|
+
} finally {
|
|
951
|
+
r.forEach((s) => {
|
|
952
|
+
t[s] = n[s];
|
|
953
|
+
});
|
|
954
|
+
}
|
|
955
|
+
}
|
|
956
|
+
const xr = /^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;
|
|
957
|
+
function bt(e, t = !1) {
|
|
958
|
+
const { host: n, path: r, pass: s, port: i, projectId: o, protocol: a, publicKey: c } = e;
|
|
959
|
+
return `${a}://${c}${t && s ? `:${s}` : ""}@${n}${i ? `:${i}` : ""}/${r && `${r}/`}${o}`;
|
|
960
|
+
}
|
|
961
|
+
function Or(e) {
|
|
962
|
+
const t = xr.exec(e);
|
|
963
|
+
if (!t) {
|
|
964
|
+
console.error(`Invalid Sentry Dsn: ${e}`);
|
|
965
|
+
return;
|
|
966
|
+
}
|
|
967
|
+
const [n, r, s = "", i, o = "", a] = t.slice(1);
|
|
968
|
+
let c = "", u = a;
|
|
969
|
+
const h = u.split("/");
|
|
970
|
+
if (h.length > 1 && (c = h.slice(0, -1).join("/"), u = h.pop()), u) {
|
|
971
|
+
const l = u.match(/^\d+/);
|
|
972
|
+
l && (u = l[0]);
|
|
973
|
+
}
|
|
974
|
+
return _n({ host: i, pass: s, path: c, projectId: u, port: o, protocol: n, publicKey: r });
|
|
975
|
+
}
|
|
976
|
+
function _n(e) {
|
|
977
|
+
return {
|
|
978
|
+
protocol: e.protocol,
|
|
979
|
+
publicKey: e.publicKey || "",
|
|
980
|
+
pass: e.pass || "",
|
|
981
|
+
host: e.host,
|
|
982
|
+
port: e.port || "",
|
|
983
|
+
path: e.path || "",
|
|
984
|
+
projectId: e.projectId
|
|
985
|
+
};
|
|
986
|
+
}
|
|
987
|
+
function Tr(e) {
|
|
988
|
+
return !0;
|
|
989
|
+
}
|
|
990
|
+
function Rr(e) {
|
|
991
|
+
const t = typeof e == "string" ? Or(e) : _n(e);
|
|
992
|
+
if (!(!t || !Tr()))
|
|
993
|
+
return t;
|
|
994
|
+
}
|
|
995
|
+
class w extends Error {
|
|
996
|
+
/** Display name of this error instance. */
|
|
997
|
+
constructor(t, n = "warn") {
|
|
998
|
+
super(t), this.message = t, this.name = new.target.prototype.constructor.name, Object.setPrototypeOf(this, new.target.prototype), this.logLevel = n;
|
|
999
|
+
}
|
|
1000
|
+
}
|
|
1001
|
+
function A(e, t, n) {
|
|
1002
|
+
if (!(t in e))
|
|
1003
|
+
return;
|
|
1004
|
+
const r = e[t], s = n(r);
|
|
1005
|
+
typeof s == "function" && Pr(s, r), e[t] = s;
|
|
1006
|
+
}
|
|
1007
|
+
function gt(e, t, n) {
|
|
1008
|
+
try {
|
|
1009
|
+
Object.defineProperty(e, t, {
|
|
1010
|
+
// enumerable: false, // the default, so we can save on bundle size by not explicitly setting it
|
|
1011
|
+
value: n,
|
|
1012
|
+
writable: !0,
|
|
1013
|
+
configurable: !0
|
|
1014
|
+
});
|
|
1015
|
+
} catch (r) {
|
|
1016
|
+
}
|
|
1017
|
+
}
|
|
1018
|
+
function Pr(e, t) {
|
|
1019
|
+
try {
|
|
1020
|
+
const n = t.prototype || {};
|
|
1021
|
+
e.prototype = t.prototype = n, gt(e, "__sentry_original__", t);
|
|
1022
|
+
} catch (n) {
|
|
1023
|
+
}
|
|
1024
|
+
}
|
|
1025
|
+
function Ir(e) {
|
|
1026
|
+
return Object.keys(e).map((t) => `${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`).join("&");
|
|
1027
|
+
}
|
|
1028
|
+
function gn(e) {
|
|
1029
|
+
if (dn(e))
|
|
1030
|
+
return d({
|
|
1031
|
+
message: e.message,
|
|
1032
|
+
name: e.name,
|
|
1033
|
+
stack: e.stack
|
|
1034
|
+
}, Ne(e));
|
|
1035
|
+
if (vt(e)) {
|
|
1036
|
+
const t = d({
|
|
1037
|
+
type: e.type,
|
|
1038
|
+
target: Ce(e.target),
|
|
1039
|
+
currentTarget: Ce(e.currentTarget)
|
|
1040
|
+
}, Ne(e));
|
|
1041
|
+
return typeof CustomEvent != "undefined" && M(e, CustomEvent) && (t.detail = e.detail), t;
|
|
1042
|
+
} else
|
|
1043
|
+
return e;
|
|
1044
|
+
}
|
|
1045
|
+
function Ce(e) {
|
|
1046
|
+
try {
|
|
1047
|
+
return gr(e) ? zt(e) : Object.prototype.toString.call(e);
|
|
1048
|
+
} catch (t) {
|
|
1049
|
+
return "<unknown>";
|
|
1050
|
+
}
|
|
1051
|
+
}
|
|
1052
|
+
function Ne(e) {
|
|
1053
|
+
if (typeof e == "object" && e !== null) {
|
|
1054
|
+
const t = {};
|
|
1055
|
+
for (const n in e)
|
|
1056
|
+
Object.prototype.hasOwnProperty.call(e, n) && (t[n] = e[n]);
|
|
1057
|
+
return t;
|
|
1058
|
+
} else
|
|
1059
|
+
return {};
|
|
1060
|
+
}
|
|
1061
|
+
function Cr(e, t = 40) {
|
|
1062
|
+
const n = Object.keys(gn(e));
|
|
1063
|
+
if (n.sort(), !n.length)
|
|
1064
|
+
return "[object has no keys]";
|
|
1065
|
+
if (n[0].length >= t)
|
|
1066
|
+
return j(n[0], t);
|
|
1067
|
+
for (let r = n.length; r > 0; r--) {
|
|
1068
|
+
const s = n.slice(0, r).join(", ");
|
|
1069
|
+
if (!(s.length > t))
|
|
1070
|
+
return r === n.length ? s : j(s, t);
|
|
1071
|
+
}
|
|
1072
|
+
return "";
|
|
1073
|
+
}
|
|
1074
|
+
function St(e) {
|
|
1075
|
+
return Wt(e, /* @__PURE__ */ new Map());
|
|
1076
|
+
}
|
|
1077
|
+
function Wt(e, t) {
|
|
1078
|
+
if (q(e)) {
|
|
1079
|
+
const n = t.get(e);
|
|
1080
|
+
if (n !== void 0)
|
|
1081
|
+
return n;
|
|
1082
|
+
const r = {};
|
|
1083
|
+
t.set(e, r);
|
|
1084
|
+
for (const s of Object.keys(e))
|
|
1085
|
+
typeof e[s] != "undefined" && (r[s] = Wt(e[s], t));
|
|
1086
|
+
return r;
|
|
1087
|
+
}
|
|
1088
|
+
if (Array.isArray(e)) {
|
|
1089
|
+
const n = t.get(e);
|
|
1090
|
+
if (n !== void 0)
|
|
1091
|
+
return n;
|
|
1092
|
+
const r = [];
|
|
1093
|
+
return t.set(e, r), e.forEach((s) => {
|
|
1094
|
+
r.push(Wt(s, t));
|
|
1095
|
+
}), r;
|
|
1096
|
+
}
|
|
1097
|
+
return e;
|
|
1098
|
+
}
|
|
1099
|
+
function O() {
|
|
1100
|
+
const e = y, t = e.crypto || e.msCrypto;
|
|
1101
|
+
let n = () => Math.random() * 16;
|
|
1102
|
+
try {
|
|
1103
|
+
if (t && t.randomUUID)
|
|
1104
|
+
return t.randomUUID().replace(/-/g, "");
|
|
1105
|
+
t && t.getRandomValues && (n = () => t.getRandomValues(new Uint8Array(1))[0]);
|
|
1106
|
+
} catch (r) {
|
|
1107
|
+
}
|
|
1108
|
+
return ([1e7] + 1e3 + 4e3 + 8e3 + 1e11).replace(
|
|
1109
|
+
/[018]/g,
|
|
1110
|
+
(r) => (
|
|
1111
|
+
// eslint-disable-next-line no-bitwise
|
|
1112
|
+
(r ^ (n() & 15) >> r / 4).toString(16)
|
|
1113
|
+
)
|
|
1114
|
+
);
|
|
1115
|
+
}
|
|
1116
|
+
function mn(e) {
|
|
1117
|
+
return e.exception && e.exception.values ? e.exception.values[0] : void 0;
|
|
1118
|
+
}
|
|
1119
|
+
function Nr(e) {
|
|
1120
|
+
const { message: t, event_id: n } = e;
|
|
1121
|
+
if (t)
|
|
1122
|
+
return t;
|
|
1123
|
+
const r = mn(e);
|
|
1124
|
+
return r ? r.type && r.value ? `${r.type}: ${r.value}` : r.type || r.value || n || "<unknown>" : n || "<unknown>";
|
|
1125
|
+
}
|
|
1126
|
+
function De(e, t, n) {
|
|
1127
|
+
const r = e.exception = e.exception || {}, s = r.values = r.values || [], i = s[0] = s[0] || {};
|
|
1128
|
+
i.value || (i.value = t || ""), i.type || (i.type = n || "Error");
|
|
1129
|
+
}
|
|
1130
|
+
function mt(e, t) {
|
|
1131
|
+
const n = mn(e);
|
|
1132
|
+
if (!n)
|
|
1133
|
+
return;
|
|
1134
|
+
const r = { type: "generic", handled: !0 }, s = n.mechanism;
|
|
1135
|
+
if (n.mechanism = d(d(d({}, r), s), t), t && "data" in t) {
|
|
1136
|
+
const i = d(d({}, s && s.data), t.data);
|
|
1137
|
+
n.mechanism.data = i;
|
|
1138
|
+
}
|
|
1139
|
+
}
|
|
1140
|
+
function Me(e) {
|
|
1141
|
+
if (e && e.__sentry_captured__)
|
|
1142
|
+
return !0;
|
|
1143
|
+
try {
|
|
1144
|
+
gt(e, "__sentry_captured__", !0);
|
|
1145
|
+
} catch (t) {
|
|
1146
|
+
}
|
|
1147
|
+
return !1;
|
|
1148
|
+
}
|
|
1149
|
+
function Dr(e) {
|
|
1150
|
+
return Array.isArray(e) ? e : [e];
|
|
1151
|
+
}
|
|
1152
|
+
const yn = 50, Le = /\(error: (.*)\)/, Ue = /captureMessage|captureException/;
|
|
1153
|
+
function Mr(...e) {
|
|
1154
|
+
const t = e.sort((n, r) => n[0] - r[0]).map((n) => n[1]);
|
|
1155
|
+
return (n, r = 0) => {
|
|
1156
|
+
const s = [], i = n.split(`
|
|
1157
|
+
`);
|
|
1158
|
+
for (let o = r; o < i.length; o++) {
|
|
1159
|
+
const a = i[o];
|
|
1160
|
+
if (a.length > 1024)
|
|
1161
|
+
continue;
|
|
1162
|
+
const c = Le.test(a) ? a.replace(Le, "$1") : a;
|
|
1163
|
+
if (!c.match(/\S*Error: /)) {
|
|
1164
|
+
for (const u of t) {
|
|
1165
|
+
const h = u(c);
|
|
1166
|
+
if (h) {
|
|
1167
|
+
s.push(h);
|
|
1168
|
+
break;
|
|
1169
|
+
}
|
|
1170
|
+
}
|
|
1171
|
+
if (s.length >= yn)
|
|
1172
|
+
break;
|
|
1173
|
+
}
|
|
1174
|
+
}
|
|
1175
|
+
return Lr(s);
|
|
1176
|
+
};
|
|
1177
|
+
}
|
|
1178
|
+
function Lr(e) {
|
|
1179
|
+
if (!e.length)
|
|
1180
|
+
return [];
|
|
1181
|
+
const t = Array.from(e);
|
|
1182
|
+
return /sentryWrapped/.test(t[t.length - 1].function || "") && t.pop(), t.reverse(), Ue.test(t[t.length - 1].function || "") && (t.pop(), Ue.test(t[t.length - 1].function || "") && t.pop()), t.slice(0, yn).map((n) => _(d({}, n), {
|
|
1183
|
+
filename: n.filename || t[t.length - 1].filename,
|
|
1184
|
+
function: n.function || "?"
|
|
1185
|
+
}));
|
|
1186
|
+
}
|
|
1187
|
+
const Mt = "<anonymous>";
|
|
1188
|
+
function Ur(e) {
|
|
1189
|
+
try {
|
|
1190
|
+
return !e || typeof e != "function" ? Mt : e.name || Mt;
|
|
1191
|
+
} catch (t) {
|
|
1192
|
+
return Mt;
|
|
1193
|
+
}
|
|
1194
|
+
}
|
|
1195
|
+
const Gt = st();
|
|
1196
|
+
function jr() {
|
|
1197
|
+
if (!("fetch" in Gt))
|
|
1198
|
+
return !1;
|
|
1199
|
+
try {
|
|
1200
|
+
return new Headers(), new Request("http://www.example.com"), new Response(), !0;
|
|
1201
|
+
} catch (e) {
|
|
1202
|
+
return !1;
|
|
1203
|
+
}
|
|
1204
|
+
}
|
|
1205
|
+
function Vt(e) {
|
|
1206
|
+
return e && /^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString());
|
|
1207
|
+
}
|
|
1208
|
+
function Hr() {
|
|
1209
|
+
if (!jr())
|
|
1210
|
+
return !1;
|
|
1211
|
+
if (Vt(Gt.fetch))
|
|
1212
|
+
return !0;
|
|
1213
|
+
let e = !1;
|
|
1214
|
+
const t = Gt.document;
|
|
1215
|
+
if (t && typeof t.createElement == "function")
|
|
1216
|
+
try {
|
|
1217
|
+
const n = t.createElement("iframe");
|
|
1218
|
+
n.hidden = !0, t.head.appendChild(n), n.contentWindow && n.contentWindow.fetch && (e = Vt(n.contentWindow.fetch)), t.head.removeChild(n);
|
|
1219
|
+
} catch (n) {
|
|
1220
|
+
}
|
|
1221
|
+
return e;
|
|
1222
|
+
}
|
|
1223
|
+
const ct = st();
|
|
1224
|
+
function Fr() {
|
|
1225
|
+
const e = ct.chrome, t = e && e.app && e.app.runtime, n = "history" in ct && !!ct.history.pushState && !!ct.history.replaceState;
|
|
1226
|
+
return !t && n;
|
|
1227
|
+
}
|
|
1228
|
+
const m = st(), Y = "__sentry_xhr_v2__", X = {}, je = {};
|
|
1229
|
+
function Br(e) {
|
|
1230
|
+
if (!je[e])
|
|
1231
|
+
switch (je[e] = !0, e) {
|
|
1232
|
+
case "console":
|
|
1233
|
+
qr();
|
|
1234
|
+
break;
|
|
1235
|
+
case "dom":
|
|
1236
|
+
Zr();
|
|
1237
|
+
break;
|
|
1238
|
+
case "xhr":
|
|
1239
|
+
Gr();
|
|
1240
|
+
break;
|
|
1241
|
+
case "fetch":
|
|
1242
|
+
zr();
|
|
1243
|
+
break;
|
|
1244
|
+
case "history":
|
|
1245
|
+
Vr();
|
|
1246
|
+
break;
|
|
1247
|
+
case "error":
|
|
1248
|
+
Qr();
|
|
1249
|
+
break;
|
|
1250
|
+
case "unhandledrejection":
|
|
1251
|
+
ts();
|
|
1252
|
+
break;
|
|
1253
|
+
default:
|
|
1254
|
+
return;
|
|
1255
|
+
}
|
|
1256
|
+
}
|
|
1257
|
+
function I(e, t) {
|
|
1258
|
+
X[e] = X[e] || [], X[e].push(t), Br(e);
|
|
1259
|
+
}
|
|
1260
|
+
function $(e, t) {
|
|
1261
|
+
if (!(!e || !X[e]))
|
|
1262
|
+
for (const n of X[e] || [])
|
|
1263
|
+
try {
|
|
1264
|
+
n(t);
|
|
1265
|
+
} catch (r) {
|
|
1266
|
+
}
|
|
1267
|
+
}
|
|
1268
|
+
function qr() {
|
|
1269
|
+
"console" in y && Ar.forEach(function(e) {
|
|
1270
|
+
e in y.console && A(y.console, e, function(t) {
|
|
1271
|
+
return _t[e] = t, function(...n) {
|
|
1272
|
+
$("console", { args: n, level: e });
|
|
1273
|
+
const r = _t[e];
|
|
1274
|
+
r && r.apply(y.console, n);
|
|
1275
|
+
};
|
|
1276
|
+
});
|
|
1277
|
+
});
|
|
1278
|
+
}
|
|
1279
|
+
function zr() {
|
|
1280
|
+
Hr() && A(y, "fetch", function(e) {
|
|
1281
|
+
return function(...t) {
|
|
1282
|
+
const { method: n, url: r } = Wr(t), s = {
|
|
1283
|
+
args: t,
|
|
1284
|
+
fetchData: {
|
|
1285
|
+
method: n,
|
|
1286
|
+
url: r
|
|
1287
|
+
},
|
|
1288
|
+
startTimestamp: Date.now()
|
|
1289
|
+
};
|
|
1290
|
+
return $("fetch", d({}, s)), e.apply(y, t).then(
|
|
1291
|
+
(i) => ($("fetch", _(d({}, s), {
|
|
1292
|
+
endTimestamp: Date.now(),
|
|
1293
|
+
response: i
|
|
1294
|
+
})), i),
|
|
1295
|
+
(i) => {
|
|
1296
|
+
throw $("fetch", _(d({}, s), {
|
|
1297
|
+
endTimestamp: Date.now(),
|
|
1298
|
+
error: i
|
|
1299
|
+
})), i;
|
|
1300
|
+
}
|
|
1301
|
+
);
|
|
1302
|
+
};
|
|
1303
|
+
});
|
|
1304
|
+
}
|
|
1305
|
+
function Yt(e, t) {
|
|
1306
|
+
return !!e && typeof e == "object" && !!e[t];
|
|
1307
|
+
}
|
|
1308
|
+
function He(e) {
|
|
1309
|
+
return typeof e == "string" ? e : e ? Yt(e, "url") ? e.url : e.toString ? e.toString() : "" : "";
|
|
1310
|
+
}
|
|
1311
|
+
function Wr(e) {
|
|
1312
|
+
if (e.length === 0)
|
|
1313
|
+
return { method: "GET", url: "" };
|
|
1314
|
+
if (e.length === 2) {
|
|
1315
|
+
const [n, r] = e;
|
|
1316
|
+
return {
|
|
1317
|
+
url: He(n),
|
|
1318
|
+
method: Yt(r, "method") ? String(r.method).toUpperCase() : "GET"
|
|
1319
|
+
};
|
|
1320
|
+
}
|
|
1321
|
+
const t = e[0];
|
|
1322
|
+
return {
|
|
1323
|
+
url: He(t),
|
|
1324
|
+
method: Yt(t, "method") ? String(t.method).toUpperCase() : "GET"
|
|
1325
|
+
};
|
|
1326
|
+
}
|
|
1327
|
+
function Gr() {
|
|
1328
|
+
if (!m.XMLHttpRequest)
|
|
1329
|
+
return;
|
|
1330
|
+
const e = XMLHttpRequest.prototype;
|
|
1331
|
+
A(e, "open", function(t) {
|
|
1332
|
+
return function(...n) {
|
|
1333
|
+
const r = Date.now(), s = n[1], i = this[Y] = {
|
|
1334
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
1335
|
+
method: et(n[0]) ? n[0].toUpperCase() : n[0],
|
|
1336
|
+
url: n[1],
|
|
1337
|
+
request_headers: {}
|
|
1338
|
+
};
|
|
1339
|
+
et(s) && i.method === "POST" && s.match(/sentry_key/) && (this.__sentry_own_request__ = !0);
|
|
1340
|
+
const o = () => {
|
|
1341
|
+
const a = this[Y];
|
|
1342
|
+
if (a && this.readyState === 4) {
|
|
1343
|
+
try {
|
|
1344
|
+
a.status_code = this.status;
|
|
1345
|
+
} catch (c) {
|
|
1346
|
+
}
|
|
1347
|
+
$("xhr", {
|
|
1348
|
+
args: n,
|
|
1349
|
+
endTimestamp: Date.now(),
|
|
1350
|
+
startTimestamp: r,
|
|
1351
|
+
xhr: this
|
|
1352
|
+
});
|
|
1353
|
+
}
|
|
1354
|
+
};
|
|
1355
|
+
return "onreadystatechange" in this && typeof this.onreadystatechange == "function" ? A(this, "onreadystatechange", function(a) {
|
|
1356
|
+
return function(...c) {
|
|
1357
|
+
return o(), a.apply(this, c);
|
|
1358
|
+
};
|
|
1359
|
+
}) : this.addEventListener("readystatechange", o), A(this, "setRequestHeader", function(a) {
|
|
1360
|
+
return function(...c) {
|
|
1361
|
+
const [u, h] = c, l = this[Y];
|
|
1362
|
+
return l && (l.request_headers[u.toLowerCase()] = h), a.apply(this, c);
|
|
1363
|
+
};
|
|
1364
|
+
}), t.apply(this, n);
|
|
1365
|
+
};
|
|
1366
|
+
}), A(e, "send", function(t) {
|
|
1367
|
+
return function(...n) {
|
|
1368
|
+
const r = this[Y];
|
|
1369
|
+
return r && n[0] !== void 0 && (r.body = n[0]), $("xhr", {
|
|
1370
|
+
args: n,
|
|
1371
|
+
startTimestamp: Date.now(),
|
|
1372
|
+
xhr: this
|
|
1373
|
+
}), t.apply(this, n);
|
|
1374
|
+
};
|
|
1375
|
+
});
|
|
1376
|
+
}
|
|
1377
|
+
let ut;
|
|
1378
|
+
function Vr() {
|
|
1379
|
+
if (!Fr())
|
|
1380
|
+
return;
|
|
1381
|
+
const e = m.onpopstate;
|
|
1382
|
+
m.onpopstate = function(...n) {
|
|
1383
|
+
const r = m.location.href, s = ut;
|
|
1384
|
+
if (ut = r, $("history", {
|
|
1385
|
+
from: s,
|
|
1386
|
+
to: r
|
|
1387
|
+
}), e)
|
|
1388
|
+
try {
|
|
1389
|
+
return e.apply(this, n);
|
|
1390
|
+
} catch (i) {
|
|
1391
|
+
}
|
|
1392
|
+
};
|
|
1393
|
+
function t(n) {
|
|
1394
|
+
return function(...r) {
|
|
1395
|
+
const s = r.length > 2 ? r[2] : void 0;
|
|
1396
|
+
if (s) {
|
|
1397
|
+
const i = ut, o = String(s);
|
|
1398
|
+
ut = o, $("history", {
|
|
1399
|
+
from: i,
|
|
1400
|
+
to: o
|
|
1401
|
+
});
|
|
1402
|
+
}
|
|
1403
|
+
return n.apply(this, r);
|
|
1404
|
+
};
|
|
1405
|
+
}
|
|
1406
|
+
A(m.history, "pushState", t), A(m.history, "replaceState", t);
|
|
1407
|
+
}
|
|
1408
|
+
const Yr = 1e3;
|
|
1409
|
+
let Fe, Kt, Jt;
|
|
1410
|
+
function Kr(e) {
|
|
1411
|
+
if (e.type !== Kt)
|
|
1412
|
+
return !1;
|
|
1413
|
+
try {
|
|
1414
|
+
if (!e.target || e.target._sentryId !== Jt)
|
|
1415
|
+
return !1;
|
|
1416
|
+
} catch (t) {
|
|
1417
|
+
}
|
|
1418
|
+
return !0;
|
|
1419
|
+
}
|
|
1420
|
+
function Jr(e, t) {
|
|
1421
|
+
return e !== "keypress" ? !1 : !t || !t.tagName ? !0 : !(t.tagName === "INPUT" || t.tagName === "TEXTAREA" || t.isContentEditable);
|
|
1422
|
+
}
|
|
1423
|
+
function Xr(e) {
|
|
1424
|
+
try {
|
|
1425
|
+
return e.target;
|
|
1426
|
+
} catch (t) {
|
|
1427
|
+
return null;
|
|
1428
|
+
}
|
|
1429
|
+
}
|
|
1430
|
+
function Be(e, t = !1) {
|
|
1431
|
+
return (n) => {
|
|
1432
|
+
if (!n || n._sentryCaptured)
|
|
1433
|
+
return;
|
|
1434
|
+
const r = Xr(n);
|
|
1435
|
+
if (Jr(n.type, r))
|
|
1436
|
+
return;
|
|
1437
|
+
gt(n, "_sentryCaptured", !0), r && !r._sentryId && gt(r, "_sentryId", O());
|
|
1438
|
+
const s = n.type === "keypress" ? "input" : n.type;
|
|
1439
|
+
Kr(n) || (e({
|
|
1440
|
+
event: n,
|
|
1441
|
+
name: s,
|
|
1442
|
+
global: t
|
|
1443
|
+
}), Kt = n.type, Jt = r ? r._sentryId : void 0), clearTimeout(Fe), Fe = m.setTimeout(() => {
|
|
1444
|
+
Jt = void 0, Kt = void 0;
|
|
1445
|
+
}, Yr);
|
|
1446
|
+
};
|
|
1447
|
+
}
|
|
1448
|
+
function Zr() {
|
|
1449
|
+
if (!m.document)
|
|
1450
|
+
return;
|
|
1451
|
+
const e = $.bind(null, "dom"), t = Be(e, !0);
|
|
1452
|
+
m.document.addEventListener("click", t, !1), m.document.addEventListener("keypress", t, !1), ["EventTarget", "Node"].forEach((n) => {
|
|
1453
|
+
const r = m[n] && m[n].prototype;
|
|
1454
|
+
!r || !r.hasOwnProperty || !r.hasOwnProperty("addEventListener") || (A(r, "addEventListener", function(s) {
|
|
1455
|
+
return function(i, o, a) {
|
|
1456
|
+
if (i === "click" || i == "keypress")
|
|
1457
|
+
try {
|
|
1458
|
+
const c = this, u = c.__sentry_instrumentation_handlers__ = c.__sentry_instrumentation_handlers__ || {}, h = u[i] = u[i] || { refCount: 0 };
|
|
1459
|
+
if (!h.handler) {
|
|
1460
|
+
const l = Be(e);
|
|
1461
|
+
h.handler = l, s.call(this, i, l, a);
|
|
1462
|
+
}
|
|
1463
|
+
h.refCount++;
|
|
1464
|
+
} catch (c) {
|
|
1465
|
+
}
|
|
1466
|
+
return s.call(this, i, o, a);
|
|
1467
|
+
};
|
|
1468
|
+
}), A(
|
|
1469
|
+
r,
|
|
1470
|
+
"removeEventListener",
|
|
1471
|
+
function(s) {
|
|
1472
|
+
return function(i, o, a) {
|
|
1473
|
+
if (i === "click" || i == "keypress")
|
|
1474
|
+
try {
|
|
1475
|
+
const c = this, u = c.__sentry_instrumentation_handlers__ || {}, h = u[i];
|
|
1476
|
+
h && (h.refCount--, h.refCount <= 0 && (s.call(this, i, h.handler, a), h.handler = void 0, delete u[i]), Object.keys(u).length === 0 && delete c.__sentry_instrumentation_handlers__);
|
|
1477
|
+
} catch (c) {
|
|
1478
|
+
}
|
|
1479
|
+
return s.call(this, i, o, a);
|
|
1480
|
+
};
|
|
1481
|
+
}
|
|
1482
|
+
));
|
|
1483
|
+
});
|
|
1484
|
+
}
|
|
1485
|
+
let lt = null;
|
|
1486
|
+
function Qr() {
|
|
1487
|
+
lt = m.onerror, m.onerror = function(e, t, n, r, s) {
|
|
1488
|
+
return $("error", {
|
|
1489
|
+
column: r,
|
|
1490
|
+
error: s,
|
|
1491
|
+
line: n,
|
|
1492
|
+
msg: e,
|
|
1493
|
+
url: t
|
|
1494
|
+
}), lt && !lt.__SENTRY_LOADER__ ? lt.apply(this, arguments) : !1;
|
|
1495
|
+
}, m.onerror.__SENTRY_INSTRUMENTED__ = !0;
|
|
1496
|
+
}
|
|
1497
|
+
let dt = null;
|
|
1498
|
+
function ts() {
|
|
1499
|
+
dt = m.onunhandledrejection, m.onunhandledrejection = function(e) {
|
|
1500
|
+
return $("unhandledrejection", e), dt && !dt.__SENTRY_LOADER__ ? dt.apply(this, arguments) : !0;
|
|
1501
|
+
}, m.onunhandledrejection.__SENTRY_INSTRUMENTED__ = !0;
|
|
1502
|
+
}
|
|
1503
|
+
function es() {
|
|
1504
|
+
return typeof __SENTRY_BROWSER_BUNDLE__ != "undefined" && !!__SENTRY_BROWSER_BUNDLE__;
|
|
1505
|
+
}
|
|
1506
|
+
function ns() {
|
|
1507
|
+
return "npm";
|
|
1508
|
+
}
|
|
1509
|
+
function rs() {
|
|
1510
|
+
return !es() && Object.prototype.toString.call(typeof process != "undefined" ? process : 0) === "[object process]";
|
|
1511
|
+
}
|
|
1512
|
+
function ss(e, t) {
|
|
1513
|
+
return e.require(t);
|
|
1514
|
+
}
|
|
1515
|
+
function is() {
|
|
1516
|
+
const e = typeof WeakSet == "function", t = e ? /* @__PURE__ */ new WeakSet() : [];
|
|
1517
|
+
function n(s) {
|
|
1518
|
+
if (e)
|
|
1519
|
+
return t.has(s) ? !0 : (t.add(s), !1);
|
|
1520
|
+
for (let i = 0; i < t.length; i++)
|
|
1521
|
+
if (t[i] === s)
|
|
1522
|
+
return !0;
|
|
1523
|
+
return t.push(s), !1;
|
|
1524
|
+
}
|
|
1525
|
+
function r(s) {
|
|
1526
|
+
if (e)
|
|
1527
|
+
t.delete(s);
|
|
1528
|
+
else
|
|
1529
|
+
for (let i = 0; i < t.length; i++)
|
|
1530
|
+
if (t[i] === s) {
|
|
1531
|
+
t.splice(i, 1);
|
|
1532
|
+
break;
|
|
1533
|
+
}
|
|
1534
|
+
}
|
|
1535
|
+
return [n, r];
|
|
1536
|
+
}
|
|
1537
|
+
function T(e, t = 100, n = 1 / 0) {
|
|
1538
|
+
try {
|
|
1539
|
+
return Xt("", e, t, n);
|
|
1540
|
+
} catch (r) {
|
|
1541
|
+
return { ERROR: `**non-serializable** (${r})` };
|
|
1542
|
+
}
|
|
1543
|
+
}
|
|
1544
|
+
function En(e, t = 3, n = 100 * 1024) {
|
|
1545
|
+
const r = T(e, t);
|
|
1546
|
+
return us(r) > n ? En(e, t - 1, n) : r;
|
|
1547
|
+
}
|
|
1548
|
+
function Xt(e, t, n = 1 / 0, r = 1 / 0, s = is()) {
|
|
1549
|
+
const [i, o] = s;
|
|
1550
|
+
if (t == null || // this matches null and undefined -> eqeq not eqeqeq
|
|
1551
|
+
["number", "boolean", "string"].includes(typeof t) && !yr(t))
|
|
1552
|
+
return t;
|
|
1553
|
+
const a = os(e, t);
|
|
1554
|
+
if (!a.startsWith("[object "))
|
|
1555
|
+
return a;
|
|
1556
|
+
if (t.__sentry_skip_normalization__)
|
|
1557
|
+
return t;
|
|
1558
|
+
const c = typeof t.__sentry_override_normalization_depth__ == "number" ? t.__sentry_override_normalization_depth__ : n;
|
|
1559
|
+
if (c === 0)
|
|
1560
|
+
return a.replace("object ", "");
|
|
1561
|
+
if (i(t))
|
|
1562
|
+
return "[Circular ~]";
|
|
1563
|
+
const u = t;
|
|
1564
|
+
if (u && typeof u.toJSON == "function")
|
|
1565
|
+
try {
|
|
1566
|
+
const p = u.toJSON();
|
|
1567
|
+
return Xt("", p, c - 1, r, s);
|
|
1568
|
+
} catch (p) {
|
|
1569
|
+
}
|
|
1570
|
+
const h = Array.isArray(t) ? [] : {};
|
|
1571
|
+
let l = 0;
|
|
1572
|
+
const f = gn(t);
|
|
1573
|
+
for (const p in f) {
|
|
1574
|
+
if (!Object.prototype.hasOwnProperty.call(f, p))
|
|
1575
|
+
continue;
|
|
1576
|
+
if (l >= r) {
|
|
1577
|
+
h[p] = "[MaxProperties ~]";
|
|
1578
|
+
break;
|
|
1579
|
+
}
|
|
1580
|
+
const k = f[p];
|
|
1581
|
+
h[p] = Xt(p, k, c - 1, r, s), l++;
|
|
1582
|
+
}
|
|
1583
|
+
return o(t), h;
|
|
1584
|
+
}
|
|
1585
|
+
function os(e, t) {
|
|
1586
|
+
try {
|
|
1587
|
+
if (e === "domain" && t && typeof t == "object" && t._events)
|
|
1588
|
+
return "[Domain]";
|
|
1589
|
+
if (e === "domainEmitter")
|
|
1590
|
+
return "[DomainEmitter]";
|
|
1591
|
+
if (typeof global != "undefined" && t === global)
|
|
1592
|
+
return "[Global]";
|
|
1593
|
+
if (typeof window != "undefined" && t === window)
|
|
1594
|
+
return "[Window]";
|
|
1595
|
+
if (typeof document != "undefined" && t === document)
|
|
1596
|
+
return "[Document]";
|
|
1597
|
+
if (fn(t))
|
|
1598
|
+
return "[VueViewModel]";
|
|
1599
|
+
if (mr(t))
|
|
1600
|
+
return "[SyntheticEvent]";
|
|
1601
|
+
if (typeof t == "number" && t !== t)
|
|
1602
|
+
return "[NaN]";
|
|
1603
|
+
if (typeof t == "function")
|
|
1604
|
+
return `[Function: ${Ur(t)}]`;
|
|
1605
|
+
if (typeof t == "symbol")
|
|
1606
|
+
return `[${String(t)}]`;
|
|
1607
|
+
if (typeof t == "bigint")
|
|
1608
|
+
return `[BigInt: ${String(t)}]`;
|
|
1609
|
+
const n = as(t);
|
|
1610
|
+
return /^HTML(\w*)Element$/.test(n) ? `[HTMLElement: ${n}]` : `[object ${n}]`;
|
|
1611
|
+
} catch (n) {
|
|
1612
|
+
return `**non-serializable** (${n})`;
|
|
1613
|
+
}
|
|
1614
|
+
}
|
|
1615
|
+
function as(e) {
|
|
1616
|
+
const t = Object.getPrototypeOf(e);
|
|
1617
|
+
return t ? t.constructor.name : "null prototype";
|
|
1618
|
+
}
|
|
1619
|
+
function cs(e) {
|
|
1620
|
+
return ~-encodeURI(e).split(/%..|./).length;
|
|
1621
|
+
}
|
|
1622
|
+
function us(e) {
|
|
1623
|
+
return cs(JSON.stringify(e));
|
|
1624
|
+
}
|
|
1625
|
+
var x;
|
|
1626
|
+
(function(e) {
|
|
1627
|
+
e[e.PENDING = 0] = "PENDING";
|
|
1628
|
+
const n = 1;
|
|
1629
|
+
e[e.RESOLVED = n] = "RESOLVED";
|
|
1630
|
+
const r = 2;
|
|
1631
|
+
e[e.REJECTED = r] = "REJECTED";
|
|
1632
|
+
})(x || (x = {}));
|
|
1633
|
+
function L(e) {
|
|
1634
|
+
return new b((t) => {
|
|
1635
|
+
t(e);
|
|
1636
|
+
});
|
|
1637
|
+
}
|
|
1638
|
+
function ce(e) {
|
|
1639
|
+
return new b((t, n) => {
|
|
1640
|
+
n(e);
|
|
1641
|
+
});
|
|
1642
|
+
}
|
|
1643
|
+
class b {
|
|
1644
|
+
constructor(t) {
|
|
1645
|
+
b.prototype.__init.call(this), b.prototype.__init2.call(this), b.prototype.__init3.call(this), b.prototype.__init4.call(this), this._state = x.PENDING, this._handlers = [];
|
|
1646
|
+
try {
|
|
1647
|
+
t(this._resolve, this._reject);
|
|
1648
|
+
} catch (n) {
|
|
1649
|
+
this._reject(n);
|
|
1650
|
+
}
|
|
1651
|
+
}
|
|
1652
|
+
/** JSDoc */
|
|
1653
|
+
then(t, n) {
|
|
1654
|
+
return new b((r, s) => {
|
|
1655
|
+
this._handlers.push([
|
|
1656
|
+
!1,
|
|
1657
|
+
(i) => {
|
|
1658
|
+
if (!t)
|
|
1659
|
+
r(i);
|
|
1660
|
+
else
|
|
1661
|
+
try {
|
|
1662
|
+
r(t(i));
|
|
1663
|
+
} catch (o) {
|
|
1664
|
+
s(o);
|
|
1665
|
+
}
|
|
1666
|
+
},
|
|
1667
|
+
(i) => {
|
|
1668
|
+
if (!n)
|
|
1669
|
+
s(i);
|
|
1670
|
+
else
|
|
1671
|
+
try {
|
|
1672
|
+
r(n(i));
|
|
1673
|
+
} catch (o) {
|
|
1674
|
+
s(o);
|
|
1675
|
+
}
|
|
1676
|
+
}
|
|
1677
|
+
]), this._executeHandlers();
|
|
1678
|
+
});
|
|
1679
|
+
}
|
|
1680
|
+
/** JSDoc */
|
|
1681
|
+
catch(t) {
|
|
1682
|
+
return this.then((n) => n, t);
|
|
1683
|
+
}
|
|
1684
|
+
/** JSDoc */
|
|
1685
|
+
finally(t) {
|
|
1686
|
+
return new b((n, r) => {
|
|
1687
|
+
let s, i;
|
|
1688
|
+
return this.then(
|
|
1689
|
+
(o) => {
|
|
1690
|
+
i = !1, s = o, t && t();
|
|
1691
|
+
},
|
|
1692
|
+
(o) => {
|
|
1693
|
+
i = !0, s = o, t && t();
|
|
1694
|
+
}
|
|
1695
|
+
).then(() => {
|
|
1696
|
+
if (i) {
|
|
1697
|
+
r(s);
|
|
1698
|
+
return;
|
|
1699
|
+
}
|
|
1700
|
+
n(s);
|
|
1701
|
+
});
|
|
1702
|
+
});
|
|
1703
|
+
}
|
|
1704
|
+
/** JSDoc */
|
|
1705
|
+
__init() {
|
|
1706
|
+
this._resolve = (t) => {
|
|
1707
|
+
this._setResult(x.RESOLVED, t);
|
|
1708
|
+
};
|
|
1709
|
+
}
|
|
1710
|
+
/** JSDoc */
|
|
1711
|
+
__init2() {
|
|
1712
|
+
this._reject = (t) => {
|
|
1713
|
+
this._setResult(x.REJECTED, t);
|
|
1714
|
+
};
|
|
1715
|
+
}
|
|
1716
|
+
/** JSDoc */
|
|
1717
|
+
__init3() {
|
|
1718
|
+
this._setResult = (t, n) => {
|
|
1719
|
+
if (this._state === x.PENDING) {
|
|
1720
|
+
if (ae(n)) {
|
|
1721
|
+
n.then(this._resolve, this._reject);
|
|
1722
|
+
return;
|
|
1723
|
+
}
|
|
1724
|
+
this._state = t, this._value = n, this._executeHandlers();
|
|
1725
|
+
}
|
|
1726
|
+
};
|
|
1727
|
+
}
|
|
1728
|
+
/** JSDoc */
|
|
1729
|
+
__init4() {
|
|
1730
|
+
this._executeHandlers = () => {
|
|
1731
|
+
if (this._state === x.PENDING)
|
|
1732
|
+
return;
|
|
1733
|
+
const t = this._handlers.slice();
|
|
1734
|
+
this._handlers = [], t.forEach((n) => {
|
|
1735
|
+
n[0] || (this._state === x.RESOLVED && n[1](this._value), this._state === x.REJECTED && n[2](this._value), n[0] = !0);
|
|
1736
|
+
});
|
|
1737
|
+
};
|
|
1738
|
+
}
|
|
1739
|
+
}
|
|
1740
|
+
function ls(e) {
|
|
1741
|
+
const t = [];
|
|
1742
|
+
function n() {
|
|
1743
|
+
return e === void 0 || t.length < e;
|
|
1744
|
+
}
|
|
1745
|
+
function r(o) {
|
|
1746
|
+
return t.splice(t.indexOf(o), 1)[0];
|
|
1747
|
+
}
|
|
1748
|
+
function s(o) {
|
|
1749
|
+
if (!n())
|
|
1750
|
+
return ce(new w("Not adding Promise because buffer limit was reached."));
|
|
1751
|
+
const a = o();
|
|
1752
|
+
return t.indexOf(a) === -1 && t.push(a), a.then(() => r(a)).then(
|
|
1753
|
+
null,
|
|
1754
|
+
() => r(a).then(null, () => {
|
|
1755
|
+
})
|
|
1756
|
+
), a;
|
|
1757
|
+
}
|
|
1758
|
+
function i(o) {
|
|
1759
|
+
return new b((a, c) => {
|
|
1760
|
+
let u = t.length;
|
|
1761
|
+
if (!u)
|
|
1762
|
+
return a(!0);
|
|
1763
|
+
const h = setTimeout(() => {
|
|
1764
|
+
o && o > 0 && a(!1);
|
|
1765
|
+
}, o);
|
|
1766
|
+
t.forEach((l) => {
|
|
1767
|
+
L(l).then(() => {
|
|
1768
|
+
--u || (clearTimeout(h), a(!0));
|
|
1769
|
+
}, c);
|
|
1770
|
+
});
|
|
1771
|
+
});
|
|
1772
|
+
}
|
|
1773
|
+
return {
|
|
1774
|
+
$: t,
|
|
1775
|
+
add: s,
|
|
1776
|
+
drain: i
|
|
1777
|
+
};
|
|
1778
|
+
}
|
|
1779
|
+
function Lt(e) {
|
|
1780
|
+
if (!e)
|
|
1781
|
+
return {};
|
|
1782
|
+
const t = e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);
|
|
1783
|
+
if (!t)
|
|
1784
|
+
return {};
|
|
1785
|
+
const n = t[6] || "", r = t[8] || "";
|
|
1786
|
+
return {
|
|
1787
|
+
host: t[4],
|
|
1788
|
+
path: t[5],
|
|
1789
|
+
protocol: t[2],
|
|
1790
|
+
search: n,
|
|
1791
|
+
hash: r,
|
|
1792
|
+
relative: t[5] + n + r
|
|
1793
|
+
// everything minus origin
|
|
1794
|
+
};
|
|
1795
|
+
}
|
|
1796
|
+
const ds = ["fatal", "error", "warning", "log", "info", "debug"];
|
|
1797
|
+
function hs(e) {
|
|
1798
|
+
return e === "warn" ? "warning" : ds.includes(e) ? e : "log";
|
|
1799
|
+
}
|
|
1800
|
+
const vn = st(), Zt = {
|
|
1801
|
+
nowSeconds: () => Date.now() / 1e3
|
|
1802
|
+
};
|
|
1803
|
+
function fs() {
|
|
1804
|
+
const { performance: e } = vn;
|
|
1805
|
+
if (!e || !e.now)
|
|
1806
|
+
return;
|
|
1807
|
+
const t = Date.now() - e.now();
|
|
1808
|
+
return {
|
|
1809
|
+
now: () => e.now(),
|
|
1810
|
+
timeOrigin: t
|
|
1811
|
+
};
|
|
1812
|
+
}
|
|
1813
|
+
function ps() {
|
|
1814
|
+
try {
|
|
1815
|
+
return ss(module, "perf_hooks").performance;
|
|
1816
|
+
} catch (e) {
|
|
1817
|
+
return;
|
|
1818
|
+
}
|
|
1819
|
+
}
|
|
1820
|
+
const Ut = rs() ? ps() : fs(), qe = Ut === void 0 ? Zt : {
|
|
1821
|
+
nowSeconds: () => (Ut.timeOrigin + Ut.now()) / 1e3
|
|
1822
|
+
}, $t = Zt.nowSeconds.bind(Zt), bn = qe.nowSeconds.bind(qe);
|
|
1823
|
+
(() => {
|
|
1824
|
+
const { performance: e } = vn;
|
|
1825
|
+
if (!e || !e.now)
|
|
1826
|
+
return;
|
|
1827
|
+
const t = 3600 * 1e3, n = e.now(), r = Date.now(), s = e.timeOrigin ? Math.abs(e.timeOrigin + n - r) : t, i = s < t, o = e.timing && e.timing.navigationStart, c = typeof o == "number" ? Math.abs(o + n - r) : t, u = c < t;
|
|
1828
|
+
return i || u ? s <= c ? e.timeOrigin : o : r;
|
|
1829
|
+
})();
|
|
1830
|
+
function it(e, t = []) {
|
|
1831
|
+
return [e, t];
|
|
1832
|
+
}
|
|
1833
|
+
function _s(e, t) {
|
|
1834
|
+
const [n, r] = e;
|
|
1835
|
+
return [n, [...r, t]];
|
|
1836
|
+
}
|
|
1837
|
+
function ze(e, t) {
|
|
1838
|
+
const n = e[1];
|
|
1839
|
+
for (const r of n) {
|
|
1840
|
+
const s = r[0].type;
|
|
1841
|
+
if (t(r, s))
|
|
1842
|
+
return !0;
|
|
1843
|
+
}
|
|
1844
|
+
return !1;
|
|
1845
|
+
}
|
|
1846
|
+
function Qt(e, t) {
|
|
1847
|
+
return (t || new TextEncoder()).encode(e);
|
|
1848
|
+
}
|
|
1849
|
+
function gs(e, t) {
|
|
1850
|
+
const [n, r] = e;
|
|
1851
|
+
let s = JSON.stringify(n);
|
|
1852
|
+
function i(o) {
|
|
1853
|
+
typeof s == "string" ? s = typeof o == "string" ? s + o : [Qt(s, t), o] : s.push(typeof o == "string" ? Qt(o, t) : o);
|
|
1854
|
+
}
|
|
1855
|
+
for (const o of r) {
|
|
1856
|
+
const [a, c] = o;
|
|
1857
|
+
if (i(`
|
|
1858
|
+
${JSON.stringify(a)}
|
|
1859
|
+
`), typeof c == "string" || c instanceof Uint8Array)
|
|
1860
|
+
i(c);
|
|
1861
|
+
else {
|
|
1862
|
+
let u;
|
|
1863
|
+
try {
|
|
1864
|
+
u = JSON.stringify(c);
|
|
1865
|
+
} catch (h) {
|
|
1866
|
+
u = JSON.stringify(T(c));
|
|
1867
|
+
}
|
|
1868
|
+
i(u);
|
|
1869
|
+
}
|
|
1870
|
+
}
|
|
1871
|
+
return typeof s == "string" ? s : ms(s);
|
|
1872
|
+
}
|
|
1873
|
+
function ms(e) {
|
|
1874
|
+
const t = e.reduce((s, i) => s + i.length, 0), n = new Uint8Array(t);
|
|
1875
|
+
let r = 0;
|
|
1876
|
+
for (const s of e)
|
|
1877
|
+
n.set(s, r), r += s.length;
|
|
1878
|
+
return n;
|
|
1879
|
+
}
|
|
1880
|
+
function ys(e, t) {
|
|
1881
|
+
const n = typeof e.data == "string" ? Qt(e.data, t) : e.data;
|
|
1882
|
+
return [
|
|
1883
|
+
St({
|
|
1884
|
+
type: "attachment",
|
|
1885
|
+
length: n.length,
|
|
1886
|
+
filename: e.filename,
|
|
1887
|
+
content_type: e.contentType,
|
|
1888
|
+
attachment_type: e.attachmentType
|
|
1889
|
+
}),
|
|
1890
|
+
n
|
|
1891
|
+
];
|
|
1892
|
+
}
|
|
1893
|
+
const Es = {
|
|
1894
|
+
session: "session",
|
|
1895
|
+
sessions: "session",
|
|
1896
|
+
attachment: "attachment",
|
|
1897
|
+
transaction: "transaction",
|
|
1898
|
+
event: "error",
|
|
1899
|
+
client_report: "internal",
|
|
1900
|
+
user_report: "default",
|
|
1901
|
+
profile: "profile",
|
|
1902
|
+
replay_event: "replay",
|
|
1903
|
+
replay_recording: "replay",
|
|
1904
|
+
check_in: "monitor",
|
|
1905
|
+
// TODO: This is a temporary workaround until we have a proper data category for metrics
|
|
1906
|
+
statsd: "unknown"
|
|
1907
|
+
};
|
|
1908
|
+
function We(e) {
|
|
1909
|
+
return Es[e];
|
|
1910
|
+
}
|
|
1911
|
+
function Sn(e) {
|
|
1912
|
+
if (!e || !e.sdk)
|
|
1913
|
+
return;
|
|
1914
|
+
const { name: t, version: n } = e.sdk;
|
|
1915
|
+
return { name: t, version: n };
|
|
1916
|
+
}
|
|
1917
|
+
function vs(e, t, n, r) {
|
|
1918
|
+
const s = e.sdkProcessingMetadata && e.sdkProcessingMetadata.dynamicSamplingContext;
|
|
1919
|
+
return d(d(d({
|
|
1920
|
+
event_id: e.event_id,
|
|
1921
|
+
sent_at: (/* @__PURE__ */ new Date()).toISOString()
|
|
1922
|
+
}, t && { sdk: t }), !!n && r && { dsn: bt(r) }), s && {
|
|
1923
|
+
trace: St(d({}, s))
|
|
1924
|
+
});
|
|
1925
|
+
}
|
|
1926
|
+
function bs(e, t, n) {
|
|
1927
|
+
const r = [
|
|
1928
|
+
{ type: "client_report" },
|
|
1929
|
+
{
|
|
1930
|
+
timestamp: n || $t(),
|
|
1931
|
+
discarded_events: e
|
|
1932
|
+
}
|
|
1933
|
+
];
|
|
1934
|
+
return it(t ? { dsn: t } : {}, [r]);
|
|
1935
|
+
}
|
|
1936
|
+
const Ss = 60 * 1e3;
|
|
1937
|
+
function $s(e, t = Date.now()) {
|
|
1938
|
+
const n = parseInt(`${e}`, 10);
|
|
1939
|
+
if (!isNaN(n))
|
|
1940
|
+
return n * 1e3;
|
|
1941
|
+
const r = Date.parse(`${e}`);
|
|
1942
|
+
return isNaN(r) ? Ss : r - t;
|
|
1943
|
+
}
|
|
1944
|
+
function ws(e, t) {
|
|
1945
|
+
return e[t] || e.all || 0;
|
|
1946
|
+
}
|
|
1947
|
+
function As(e, t, n = Date.now()) {
|
|
1948
|
+
return ws(e, t) > n;
|
|
1949
|
+
}
|
|
1950
|
+
function ks(e, { statusCode: t, headers: n }, r = Date.now()) {
|
|
1951
|
+
const s = d({}, e), i = n && n["x-sentry-rate-limits"], o = n && n["retry-after"];
|
|
1952
|
+
if (i)
|
|
1953
|
+
for (const a of i.trim().split(",")) {
|
|
1954
|
+
const [c, u] = a.split(":", 2), h = parseInt(c, 10), l = (isNaN(h) ? 60 : h) * 1e3;
|
|
1955
|
+
if (!u)
|
|
1956
|
+
s.all = r + l;
|
|
1957
|
+
else
|
|
1958
|
+
for (const f of u.split(";"))
|
|
1959
|
+
s[f] = r + l;
|
|
1960
|
+
}
|
|
1961
|
+
else
|
|
1962
|
+
o ? s.all = r + $s(o, r) : t === 429 && (s.all = r + 60 * 1e3);
|
|
1963
|
+
return s;
|
|
1964
|
+
}
|
|
1965
|
+
const ue = "production";
|
|
1966
|
+
function le() {
|
|
1967
|
+
return pn("globalEventProcessors", () => []);
|
|
1968
|
+
}
|
|
1969
|
+
function xs(e) {
|
|
1970
|
+
le().push(e);
|
|
1971
|
+
}
|
|
1972
|
+
function yt(e, t, n, r = 0) {
|
|
1973
|
+
return new b((s, i) => {
|
|
1974
|
+
const o = e[r];
|
|
1975
|
+
if (t === null || typeof o != "function")
|
|
1976
|
+
s(t);
|
|
1977
|
+
else {
|
|
1978
|
+
const a = o(d({}, t), n);
|
|
1979
|
+
ae(a) ? a.then((c) => yt(e, c, n, r + 1).then(s)).then(null, i) : yt(e, a, n, r + 1).then(s).then(null, i);
|
|
1980
|
+
}
|
|
1981
|
+
});
|
|
1982
|
+
}
|
|
1983
|
+
function Os(e) {
|
|
1984
|
+
const t = bn(), n = {
|
|
1985
|
+
sid: O(),
|
|
1986
|
+
init: !0,
|
|
1987
|
+
timestamp: t,
|
|
1988
|
+
started: t,
|
|
1989
|
+
duration: 0,
|
|
1990
|
+
status: "ok",
|
|
1991
|
+
errors: 0,
|
|
1992
|
+
ignoreDuration: !1,
|
|
1993
|
+
toJSON: () => Rs(n)
|
|
1994
|
+
};
|
|
1995
|
+
return e && z(n, e), n;
|
|
1996
|
+
}
|
|
1997
|
+
function z(e, t = {}) {
|
|
1998
|
+
if (t.user && (!e.ipAddress && t.user.ip_address && (e.ipAddress = t.user.ip_address), !e.did && !t.did && (e.did = t.user.id || t.user.email || t.user.username)), e.timestamp = t.timestamp || bn(), t.abnormal_mechanism && (e.abnormal_mechanism = t.abnormal_mechanism), t.ignoreDuration && (e.ignoreDuration = t.ignoreDuration), t.sid && (e.sid = t.sid.length === 32 ? t.sid : O()), t.init !== void 0 && (e.init = t.init), !e.did && t.did && (e.did = `${t.did}`), typeof t.started == "number" && (e.started = t.started), e.ignoreDuration)
|
|
1999
|
+
e.duration = void 0;
|
|
2000
|
+
else if (typeof t.duration == "number")
|
|
2001
|
+
e.duration = t.duration;
|
|
2002
|
+
else {
|
|
2003
|
+
const n = e.timestamp - e.started;
|
|
2004
|
+
e.duration = n >= 0 ? n : 0;
|
|
2005
|
+
}
|
|
2006
|
+
t.release && (e.release = t.release), t.environment && (e.environment = t.environment), !e.ipAddress && t.ipAddress && (e.ipAddress = t.ipAddress), !e.userAgent && t.userAgent && (e.userAgent = t.userAgent), typeof t.errors == "number" && (e.errors = t.errors), t.status && (e.status = t.status);
|
|
2007
|
+
}
|
|
2008
|
+
function Ts(e, t) {
|
|
2009
|
+
let n = {};
|
|
2010
|
+
t ? n = { status: t } : e.status === "ok" && (n = { status: "exited" }), z(e, n);
|
|
2011
|
+
}
|
|
2012
|
+
function Rs(e) {
|
|
2013
|
+
return St({
|
|
2014
|
+
sid: `${e.sid}`,
|
|
2015
|
+
init: e.init,
|
|
2016
|
+
// Make sure that sec is converted to ms for date constructor
|
|
2017
|
+
started: new Date(e.started * 1e3).toISOString(),
|
|
2018
|
+
timestamp: new Date(e.timestamp * 1e3).toISOString(),
|
|
2019
|
+
status: e.status,
|
|
2020
|
+
errors: e.errors,
|
|
2021
|
+
did: typeof e.did == "number" || typeof e.did == "string" ? `${e.did}` : void 0,
|
|
2022
|
+
duration: e.duration,
|
|
2023
|
+
abnormal_mechanism: e.abnormal_mechanism,
|
|
2024
|
+
attrs: {
|
|
2025
|
+
release: e.release,
|
|
2026
|
+
environment: e.environment,
|
|
2027
|
+
ip_address: e.ipAddress,
|
|
2028
|
+
user_agent: e.userAgent
|
|
2029
|
+
}
|
|
2030
|
+
});
|
|
2031
|
+
}
|
|
2032
|
+
const Ps = 100;
|
|
2033
|
+
class N {
|
|
2034
|
+
/** Flag if notifying is happening. */
|
|
2035
|
+
/** Callback for client to receive scope changes. */
|
|
2036
|
+
/** Callback list that will be called after {@link applyToEvent}. */
|
|
2037
|
+
/** Array of breadcrumbs. */
|
|
2038
|
+
/** User */
|
|
2039
|
+
/** Tags */
|
|
2040
|
+
/** Extra */
|
|
2041
|
+
/** Contexts */
|
|
2042
|
+
/** Attachments */
|
|
2043
|
+
/** Propagation Context for distributed tracing */
|
|
2044
|
+
/**
|
|
2045
|
+
* A place to stash data which is needed at some point in the SDK's event processing pipeline but which shouldn't get
|
|
2046
|
+
* sent to Sentry
|
|
2047
|
+
*/
|
|
2048
|
+
/** Fingerprint */
|
|
2049
|
+
/** Severity */
|
|
2050
|
+
// eslint-disable-next-line deprecation/deprecation
|
|
2051
|
+
/** Transaction Name */
|
|
2052
|
+
/** Span */
|
|
2053
|
+
/** Session */
|
|
2054
|
+
/** Request Mode Session Status */
|
|
2055
|
+
// NOTE: Any field which gets added here should get added not only to the constructor but also to the `clone` method.
|
|
2056
|
+
constructor() {
|
|
2057
|
+
this._notifyingListeners = !1, this._scopeListeners = [], this._eventProcessors = [], this._breadcrumbs = [], this._attachments = [], this._user = {}, this._tags = {}, this._extra = {}, this._contexts = {}, this._sdkProcessingMetadata = {}, this._propagationContext = Ge();
|
|
2058
|
+
}
|
|
2059
|
+
/**
|
|
2060
|
+
* Inherit values from the parent scope.
|
|
2061
|
+
* @param scope to clone.
|
|
2062
|
+
*/
|
|
2063
|
+
static clone(t) {
|
|
2064
|
+
const n = new N();
|
|
2065
|
+
return t && (n._breadcrumbs = [...t._breadcrumbs], n._tags = d({}, t._tags), n._extra = d({}, t._extra), n._contexts = d({}, t._contexts), n._user = t._user, n._level = t._level, n._span = t._span, n._session = t._session, n._transactionName = t._transactionName, n._fingerprint = t._fingerprint, n._eventProcessors = [...t._eventProcessors], n._requestSession = t._requestSession, n._attachments = [...t._attachments], n._sdkProcessingMetadata = d({}, t._sdkProcessingMetadata), n._propagationContext = d({}, t._propagationContext)), n;
|
|
2066
|
+
}
|
|
2067
|
+
/**
|
|
2068
|
+
* Add internal on change listener. Used for sub SDKs that need to store the scope.
|
|
2069
|
+
* @hidden
|
|
2070
|
+
*/
|
|
2071
|
+
addScopeListener(t) {
|
|
2072
|
+
this._scopeListeners.push(t);
|
|
2073
|
+
}
|
|
2074
|
+
/**
|
|
2075
|
+
* @inheritDoc
|
|
2076
|
+
*/
|
|
2077
|
+
addEventProcessor(t) {
|
|
2078
|
+
return this._eventProcessors.push(t), this;
|
|
2079
|
+
}
|
|
2080
|
+
/**
|
|
2081
|
+
* @inheritDoc
|
|
2082
|
+
*/
|
|
2083
|
+
setUser(t) {
|
|
2084
|
+
return this._user = t || {}, this._session && z(this._session, { user: t }), this._notifyScopeListeners(), this;
|
|
2085
|
+
}
|
|
2086
|
+
/**
|
|
2087
|
+
* @inheritDoc
|
|
2088
|
+
*/
|
|
2089
|
+
getUser() {
|
|
2090
|
+
return this._user;
|
|
2091
|
+
}
|
|
2092
|
+
/**
|
|
2093
|
+
* @inheritDoc
|
|
2094
|
+
*/
|
|
2095
|
+
getRequestSession() {
|
|
2096
|
+
return this._requestSession;
|
|
2097
|
+
}
|
|
2098
|
+
/**
|
|
2099
|
+
* @inheritDoc
|
|
2100
|
+
*/
|
|
2101
|
+
setRequestSession(t) {
|
|
2102
|
+
return this._requestSession = t, this;
|
|
2103
|
+
}
|
|
2104
|
+
/**
|
|
2105
|
+
* @inheritDoc
|
|
2106
|
+
*/
|
|
2107
|
+
setTags(t) {
|
|
2108
|
+
return this._tags = d(d({}, this._tags), t), this._notifyScopeListeners(), this;
|
|
2109
|
+
}
|
|
2110
|
+
/**
|
|
2111
|
+
* @inheritDoc
|
|
2112
|
+
*/
|
|
2113
|
+
setTag(t, n) {
|
|
2114
|
+
return this._tags = _(d({}, this._tags), { [t]: n }), this._notifyScopeListeners(), this;
|
|
2115
|
+
}
|
|
2116
|
+
/**
|
|
2117
|
+
* @inheritDoc
|
|
2118
|
+
*/
|
|
2119
|
+
setExtras(t) {
|
|
2120
|
+
return this._extra = d(d({}, this._extra), t), this._notifyScopeListeners(), this;
|
|
2121
|
+
}
|
|
2122
|
+
/**
|
|
2123
|
+
* @inheritDoc
|
|
2124
|
+
*/
|
|
2125
|
+
setExtra(t, n) {
|
|
2126
|
+
return this._extra = _(d({}, this._extra), { [t]: n }), this._notifyScopeListeners(), this;
|
|
2127
|
+
}
|
|
2128
|
+
/**
|
|
2129
|
+
* @inheritDoc
|
|
2130
|
+
*/
|
|
2131
|
+
setFingerprint(t) {
|
|
2132
|
+
return this._fingerprint = t, this._notifyScopeListeners(), this;
|
|
2133
|
+
}
|
|
2134
|
+
/**
|
|
2135
|
+
* @inheritDoc
|
|
2136
|
+
*/
|
|
2137
|
+
setLevel(t) {
|
|
2138
|
+
return this._level = t, this._notifyScopeListeners(), this;
|
|
2139
|
+
}
|
|
2140
|
+
/**
|
|
2141
|
+
* @inheritDoc
|
|
2142
|
+
*/
|
|
2143
|
+
setTransactionName(t) {
|
|
2144
|
+
return this._transactionName = t, this._notifyScopeListeners(), this;
|
|
2145
|
+
}
|
|
2146
|
+
/**
|
|
2147
|
+
* @inheritDoc
|
|
2148
|
+
*/
|
|
2149
|
+
setContext(t, n) {
|
|
2150
|
+
return n === null ? delete this._contexts[t] : this._contexts[t] = n, this._notifyScopeListeners(), this;
|
|
2151
|
+
}
|
|
2152
|
+
/**
|
|
2153
|
+
* @inheritDoc
|
|
2154
|
+
*/
|
|
2155
|
+
setSpan(t) {
|
|
2156
|
+
return this._span = t, this._notifyScopeListeners(), this;
|
|
2157
|
+
}
|
|
2158
|
+
/**
|
|
2159
|
+
* @inheritDoc
|
|
2160
|
+
*/
|
|
2161
|
+
getSpan() {
|
|
2162
|
+
return this._span;
|
|
2163
|
+
}
|
|
2164
|
+
/**
|
|
2165
|
+
* @inheritDoc
|
|
2166
|
+
*/
|
|
2167
|
+
getTransaction() {
|
|
2168
|
+
const t = this.getSpan();
|
|
2169
|
+
return t && t.transaction;
|
|
2170
|
+
}
|
|
2171
|
+
/**
|
|
2172
|
+
* @inheritDoc
|
|
2173
|
+
*/
|
|
2174
|
+
setSession(t) {
|
|
2175
|
+
return t ? this._session = t : delete this._session, this._notifyScopeListeners(), this;
|
|
2176
|
+
}
|
|
2177
|
+
/**
|
|
2178
|
+
* @inheritDoc
|
|
2179
|
+
*/
|
|
2180
|
+
getSession() {
|
|
2181
|
+
return this._session;
|
|
2182
|
+
}
|
|
2183
|
+
/**
|
|
2184
|
+
* @inheritDoc
|
|
2185
|
+
*/
|
|
2186
|
+
update(t) {
|
|
2187
|
+
if (!t)
|
|
2188
|
+
return this;
|
|
2189
|
+
if (typeof t == "function") {
|
|
2190
|
+
const n = t(this);
|
|
2191
|
+
return n instanceof N ? n : this;
|
|
2192
|
+
}
|
|
2193
|
+
return t instanceof N ? (this._tags = d(d({}, this._tags), t._tags), this._extra = d(d({}, this._extra), t._extra), this._contexts = d(d({}, this._contexts), t._contexts), t._user && Object.keys(t._user).length && (this._user = t._user), t._level && (this._level = t._level), t._fingerprint && (this._fingerprint = t._fingerprint), t._requestSession && (this._requestSession = t._requestSession), t._propagationContext && (this._propagationContext = t._propagationContext)) : q(t) && (t = t, this._tags = d(d({}, this._tags), t.tags), this._extra = d(d({}, this._extra), t.extra), this._contexts = d(d({}, this._contexts), t.contexts), t.user && (this._user = t.user), t.level && (this._level = t.level), t.fingerprint && (this._fingerprint = t.fingerprint), t.requestSession && (this._requestSession = t.requestSession), t.propagationContext && (this._propagationContext = t.propagationContext)), this;
|
|
2194
|
+
}
|
|
2195
|
+
/**
|
|
2196
|
+
* @inheritDoc
|
|
2197
|
+
*/
|
|
2198
|
+
clear() {
|
|
2199
|
+
return this._breadcrumbs = [], this._tags = {}, this._extra = {}, this._user = {}, this._contexts = {}, this._level = void 0, this._transactionName = void 0, this._fingerprint = void 0, this._requestSession = void 0, this._span = void 0, this._session = void 0, this._notifyScopeListeners(), this._attachments = [], this._propagationContext = Ge(), this;
|
|
2200
|
+
}
|
|
2201
|
+
/**
|
|
2202
|
+
* @inheritDoc
|
|
2203
|
+
*/
|
|
2204
|
+
addBreadcrumb(t, n) {
|
|
2205
|
+
const r = typeof n == "number" ? n : Ps;
|
|
2206
|
+
if (r <= 0)
|
|
2207
|
+
return this;
|
|
2208
|
+
const s = d({
|
|
2209
|
+
timestamp: $t()
|
|
2210
|
+
}, t), i = this._breadcrumbs;
|
|
2211
|
+
return i.push(s), this._breadcrumbs = i.length > r ? i.slice(-r) : i, this._notifyScopeListeners(), this;
|
|
2212
|
+
}
|
|
2213
|
+
/**
|
|
2214
|
+
* @inheritDoc
|
|
2215
|
+
*/
|
|
2216
|
+
getLastBreadcrumb() {
|
|
2217
|
+
return this._breadcrumbs[this._breadcrumbs.length - 1];
|
|
2218
|
+
}
|
|
2219
|
+
/**
|
|
2220
|
+
* @inheritDoc
|
|
2221
|
+
*/
|
|
2222
|
+
clearBreadcrumbs() {
|
|
2223
|
+
return this._breadcrumbs = [], this._notifyScopeListeners(), this;
|
|
2224
|
+
}
|
|
2225
|
+
/**
|
|
2226
|
+
* @inheritDoc
|
|
2227
|
+
*/
|
|
2228
|
+
addAttachment(t) {
|
|
2229
|
+
return this._attachments.push(t), this;
|
|
2230
|
+
}
|
|
2231
|
+
/**
|
|
2232
|
+
* @inheritDoc
|
|
2233
|
+
*/
|
|
2234
|
+
getAttachments() {
|
|
2235
|
+
return this._attachments;
|
|
2236
|
+
}
|
|
2237
|
+
/**
|
|
2238
|
+
* @inheritDoc
|
|
2239
|
+
*/
|
|
2240
|
+
clearAttachments() {
|
|
2241
|
+
return this._attachments = [], this;
|
|
2242
|
+
}
|
|
2243
|
+
/**
|
|
2244
|
+
* Applies data from the scope to the event and runs all event processors on it.
|
|
2245
|
+
*
|
|
2246
|
+
* @param event Event
|
|
2247
|
+
* @param hint Object containing additional information about the original exception, for use by the event processors.
|
|
2248
|
+
* @hidden
|
|
2249
|
+
*/
|
|
2250
|
+
applyToEvent(t, n = {}, r) {
|
|
2251
|
+
if (this._extra && Object.keys(this._extra).length && (t.extra = d(d({}, this._extra), t.extra)), this._tags && Object.keys(this._tags).length && (t.tags = d(d({}, this._tags), t.tags)), this._user && Object.keys(this._user).length && (t.user = d(d({}, this._user), t.user)), this._contexts && Object.keys(this._contexts).length && (t.contexts = d(d({}, this._contexts), t.contexts)), this._level && (t.level = this._level), this._transactionName && (t.transaction = this._transactionName), this._span) {
|
|
2252
|
+
t.contexts = d({ trace: this._span.getTraceContext() }, t.contexts);
|
|
2253
|
+
const o = this._span.transaction;
|
|
2254
|
+
if (o) {
|
|
2255
|
+
t.sdkProcessingMetadata = d({
|
|
2256
|
+
dynamicSamplingContext: o.getDynamicSamplingContext()
|
|
2257
|
+
}, t.sdkProcessingMetadata);
|
|
2258
|
+
const a = o.name;
|
|
2259
|
+
a && (t.tags = d({ transaction: a }, t.tags));
|
|
2260
|
+
}
|
|
2261
|
+
}
|
|
2262
|
+
this._applyFingerprint(t);
|
|
2263
|
+
const s = this._getBreadcrumbs(), i = [...t.breadcrumbs || [], ...s];
|
|
2264
|
+
return t.breadcrumbs = i.length > 0 ? i : void 0, t.sdkProcessingMetadata = _(d(d({}, t.sdkProcessingMetadata), this._sdkProcessingMetadata), {
|
|
2265
|
+
propagationContext: this._propagationContext
|
|
2266
|
+
}), yt(
|
|
2267
|
+
[...r || [], ...le(), ...this._eventProcessors],
|
|
2268
|
+
t,
|
|
2269
|
+
n
|
|
2270
|
+
);
|
|
2271
|
+
}
|
|
2272
|
+
/**
|
|
2273
|
+
* Add data which will be accessible during event processing but won't get sent to Sentry
|
|
2274
|
+
*/
|
|
2275
|
+
setSDKProcessingMetadata(t) {
|
|
2276
|
+
return this._sdkProcessingMetadata = d(d({}, this._sdkProcessingMetadata), t), this;
|
|
2277
|
+
}
|
|
2278
|
+
/**
|
|
2279
|
+
* @inheritDoc
|
|
2280
|
+
*/
|
|
2281
|
+
setPropagationContext(t) {
|
|
2282
|
+
return this._propagationContext = t, this;
|
|
2283
|
+
}
|
|
2284
|
+
/**
|
|
2285
|
+
* @inheritDoc
|
|
2286
|
+
*/
|
|
2287
|
+
getPropagationContext() {
|
|
2288
|
+
return this._propagationContext;
|
|
2289
|
+
}
|
|
2290
|
+
/**
|
|
2291
|
+
* Get the breadcrumbs for this scope.
|
|
2292
|
+
*/
|
|
2293
|
+
_getBreadcrumbs() {
|
|
2294
|
+
return this._breadcrumbs;
|
|
2295
|
+
}
|
|
2296
|
+
/**
|
|
2297
|
+
* This will be called on every set call.
|
|
2298
|
+
*/
|
|
2299
|
+
_notifyScopeListeners() {
|
|
2300
|
+
this._notifyingListeners || (this._notifyingListeners = !0, this._scopeListeners.forEach((t) => {
|
|
2301
|
+
t(this);
|
|
2302
|
+
}), this._notifyingListeners = !1);
|
|
2303
|
+
}
|
|
2304
|
+
/**
|
|
2305
|
+
* Applies fingerprint from the scope to the event if there's one,
|
|
2306
|
+
* uses message if there's one instead or get rid of empty fingerprint
|
|
2307
|
+
*/
|
|
2308
|
+
_applyFingerprint(t) {
|
|
2309
|
+
t.fingerprint = t.fingerprint ? Dr(t.fingerprint) : [], this._fingerprint && (t.fingerprint = t.fingerprint.concat(this._fingerprint)), t.fingerprint && !t.fingerprint.length && delete t.fingerprint;
|
|
2310
|
+
}
|
|
2311
|
+
}
|
|
2312
|
+
function Ge() {
|
|
2313
|
+
return {
|
|
2314
|
+
traceId: O(),
|
|
2315
|
+
spanId: O().substring(16)
|
|
2316
|
+
};
|
|
2317
|
+
}
|
|
2318
|
+
const $n = 4, Is = 100;
|
|
2319
|
+
class wn {
|
|
2320
|
+
/** Is a {@link Layer}[] containing the client and scope */
|
|
2321
|
+
/** Contains the last event id of a captured event. */
|
|
2322
|
+
/**
|
|
2323
|
+
* Creates a new instance of the hub, will push one {@link Layer} into the
|
|
2324
|
+
* internal stack on creation.
|
|
2325
|
+
*
|
|
2326
|
+
* @param client bound to the hub.
|
|
2327
|
+
* @param scope bound to the hub.
|
|
2328
|
+
* @param version number, higher number means higher priority.
|
|
2329
|
+
*/
|
|
2330
|
+
constructor(t, n = new N(), r = $n) {
|
|
2331
|
+
this._version = r, this._stack = [{ scope: n }], t && this.bindClient(t);
|
|
2332
|
+
}
|
|
2333
|
+
/**
|
|
2334
|
+
* @inheritDoc
|
|
2335
|
+
*/
|
|
2336
|
+
isOlderThan(t) {
|
|
2337
|
+
return this._version < t;
|
|
2338
|
+
}
|
|
2339
|
+
/**
|
|
2340
|
+
* @inheritDoc
|
|
2341
|
+
*/
|
|
2342
|
+
bindClient(t) {
|
|
2343
|
+
const n = this.getStackTop();
|
|
2344
|
+
n.client = t, t && t.setupIntegrations && t.setupIntegrations();
|
|
2345
|
+
}
|
|
2346
|
+
/**
|
|
2347
|
+
* @inheritDoc
|
|
2348
|
+
*/
|
|
2349
|
+
pushScope() {
|
|
2350
|
+
const t = N.clone(this.getScope());
|
|
2351
|
+
return this.getStack().push({
|
|
2352
|
+
client: this.getClient(),
|
|
2353
|
+
scope: t
|
|
2354
|
+
}), t;
|
|
2355
|
+
}
|
|
2356
|
+
/**
|
|
2357
|
+
* @inheritDoc
|
|
2358
|
+
*/
|
|
2359
|
+
popScope() {
|
|
2360
|
+
return this.getStack().length <= 1 ? !1 : !!this.getStack().pop();
|
|
2361
|
+
}
|
|
2362
|
+
/**
|
|
2363
|
+
* @inheritDoc
|
|
2364
|
+
*/
|
|
2365
|
+
withScope(t) {
|
|
2366
|
+
const n = this.pushScope();
|
|
2367
|
+
try {
|
|
2368
|
+
t(n);
|
|
2369
|
+
} finally {
|
|
2370
|
+
this.popScope();
|
|
2371
|
+
}
|
|
2372
|
+
}
|
|
2373
|
+
/**
|
|
2374
|
+
* @inheritDoc
|
|
2375
|
+
*/
|
|
2376
|
+
getClient() {
|
|
2377
|
+
return this.getStackTop().client;
|
|
2378
|
+
}
|
|
2379
|
+
/** Returns the scope of the top stack. */
|
|
2380
|
+
getScope() {
|
|
2381
|
+
return this.getStackTop().scope;
|
|
2382
|
+
}
|
|
2383
|
+
/** Returns the scope stack for domains or the process. */
|
|
2384
|
+
getStack() {
|
|
2385
|
+
return this._stack;
|
|
2386
|
+
}
|
|
2387
|
+
/** Returns the topmost scope layer in the order domain > local > process. */
|
|
2388
|
+
getStackTop() {
|
|
2389
|
+
return this._stack[this._stack.length - 1];
|
|
2390
|
+
}
|
|
2391
|
+
/**
|
|
2392
|
+
* @inheritDoc
|
|
2393
|
+
*/
|
|
2394
|
+
captureException(t, n) {
|
|
2395
|
+
const r = this._lastEventId = n && n.event_id ? n.event_id : O(), s = new Error("Sentry syntheticException");
|
|
2396
|
+
return this._withClient((i, o) => {
|
|
2397
|
+
i.captureException(
|
|
2398
|
+
t,
|
|
2399
|
+
_(d({
|
|
2400
|
+
originalException: t,
|
|
2401
|
+
syntheticException: s
|
|
2402
|
+
}, n), {
|
|
2403
|
+
event_id: r
|
|
2404
|
+
}),
|
|
2405
|
+
o
|
|
2406
|
+
);
|
|
2407
|
+
}), r;
|
|
2408
|
+
}
|
|
2409
|
+
/**
|
|
2410
|
+
* @inheritDoc
|
|
2411
|
+
*/
|
|
2412
|
+
captureMessage(t, n, r) {
|
|
2413
|
+
const s = this._lastEventId = r && r.event_id ? r.event_id : O(), i = new Error(t);
|
|
2414
|
+
return this._withClient((o, a) => {
|
|
2415
|
+
o.captureMessage(
|
|
2416
|
+
t,
|
|
2417
|
+
n,
|
|
2418
|
+
_(d({
|
|
2419
|
+
originalException: t,
|
|
2420
|
+
syntheticException: i
|
|
2421
|
+
}, r), {
|
|
2422
|
+
event_id: s
|
|
2423
|
+
}),
|
|
2424
|
+
a
|
|
2425
|
+
);
|
|
2426
|
+
}), s;
|
|
2427
|
+
}
|
|
2428
|
+
/**
|
|
2429
|
+
* @inheritDoc
|
|
2430
|
+
*/
|
|
2431
|
+
captureEvent(t, n) {
|
|
2432
|
+
const r = n && n.event_id ? n.event_id : O();
|
|
2433
|
+
return t.type || (this._lastEventId = r), this._withClient((s, i) => {
|
|
2434
|
+
s.captureEvent(t, _(d({}, n), { event_id: r }), i);
|
|
2435
|
+
}), r;
|
|
2436
|
+
}
|
|
2437
|
+
/**
|
|
2438
|
+
* @inheritDoc
|
|
2439
|
+
*/
|
|
2440
|
+
lastEventId() {
|
|
2441
|
+
return this._lastEventId;
|
|
2442
|
+
}
|
|
2443
|
+
/**
|
|
2444
|
+
* @inheritDoc
|
|
2445
|
+
*/
|
|
2446
|
+
addBreadcrumb(t, n) {
|
|
2447
|
+
const { scope: r, client: s } = this.getStackTop();
|
|
2448
|
+
if (!s)
|
|
2449
|
+
return;
|
|
2450
|
+
const { beforeBreadcrumb: i = null, maxBreadcrumbs: o = Is } = s.getOptions && s.getOptions() || {};
|
|
2451
|
+
if (o <= 0)
|
|
2452
|
+
return;
|
|
2453
|
+
const a = $t(), c = d({ timestamp: a }, t), u = i ? kr(() => i(c, n)) : c;
|
|
2454
|
+
u !== null && (s.emit && s.emit("beforeAddBreadcrumb", u, n), r.addBreadcrumb(u, o));
|
|
2455
|
+
}
|
|
2456
|
+
/**
|
|
2457
|
+
* @inheritDoc
|
|
2458
|
+
*/
|
|
2459
|
+
setUser(t) {
|
|
2460
|
+
this.getScope().setUser(t);
|
|
2461
|
+
}
|
|
2462
|
+
/**
|
|
2463
|
+
* @inheritDoc
|
|
2464
|
+
*/
|
|
2465
|
+
setTags(t) {
|
|
2466
|
+
this.getScope().setTags(t);
|
|
2467
|
+
}
|
|
2468
|
+
/**
|
|
2469
|
+
* @inheritDoc
|
|
2470
|
+
*/
|
|
2471
|
+
setExtras(t) {
|
|
2472
|
+
this.getScope().setExtras(t);
|
|
2473
|
+
}
|
|
2474
|
+
/**
|
|
2475
|
+
* @inheritDoc
|
|
2476
|
+
*/
|
|
2477
|
+
setTag(t, n) {
|
|
2478
|
+
this.getScope().setTag(t, n);
|
|
2479
|
+
}
|
|
2480
|
+
/**
|
|
2481
|
+
* @inheritDoc
|
|
2482
|
+
*/
|
|
2483
|
+
setExtra(t, n) {
|
|
2484
|
+
this.getScope().setExtra(t, n);
|
|
2485
|
+
}
|
|
2486
|
+
/**
|
|
2487
|
+
* @inheritDoc
|
|
2488
|
+
*/
|
|
2489
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2490
|
+
setContext(t, n) {
|
|
2491
|
+
this.getScope().setContext(t, n);
|
|
2492
|
+
}
|
|
2493
|
+
/**
|
|
2494
|
+
* @inheritDoc
|
|
2495
|
+
*/
|
|
2496
|
+
configureScope(t) {
|
|
2497
|
+
const { scope: n, client: r } = this.getStackTop();
|
|
2498
|
+
r && t(n);
|
|
2499
|
+
}
|
|
2500
|
+
/**
|
|
2501
|
+
* @inheritDoc
|
|
2502
|
+
*/
|
|
2503
|
+
run(t) {
|
|
2504
|
+
const n = Ve(this);
|
|
2505
|
+
try {
|
|
2506
|
+
t(this);
|
|
2507
|
+
} finally {
|
|
2508
|
+
Ve(n);
|
|
2509
|
+
}
|
|
2510
|
+
}
|
|
2511
|
+
/**
|
|
2512
|
+
* @inheritDoc
|
|
2513
|
+
*/
|
|
2514
|
+
getIntegration(t) {
|
|
2515
|
+
const n = this.getClient();
|
|
2516
|
+
if (!n)
|
|
2517
|
+
return null;
|
|
2518
|
+
try {
|
|
2519
|
+
return n.getIntegration(t);
|
|
2520
|
+
} catch (r) {
|
|
2521
|
+
return null;
|
|
2522
|
+
}
|
|
2523
|
+
}
|
|
2524
|
+
/**
|
|
2525
|
+
* @inheritDoc
|
|
2526
|
+
*/
|
|
2527
|
+
startTransaction(t, n) {
|
|
2528
|
+
return this._callExtensionMethod("startTransaction", t, n);
|
|
2529
|
+
}
|
|
2530
|
+
/**
|
|
2531
|
+
* @inheritDoc
|
|
2532
|
+
*/
|
|
2533
|
+
traceHeaders() {
|
|
2534
|
+
return this._callExtensionMethod("traceHeaders");
|
|
2535
|
+
}
|
|
2536
|
+
/**
|
|
2537
|
+
* @inheritDoc
|
|
2538
|
+
*/
|
|
2539
|
+
captureSession(t = !1) {
|
|
2540
|
+
if (t)
|
|
2541
|
+
return this.endSession();
|
|
2542
|
+
this._sendSessionUpdate();
|
|
2543
|
+
}
|
|
2544
|
+
/**
|
|
2545
|
+
* @inheritDoc
|
|
2546
|
+
*/
|
|
2547
|
+
endSession() {
|
|
2548
|
+
const n = this.getStackTop().scope, r = n.getSession();
|
|
2549
|
+
r && Ts(r), this._sendSessionUpdate(), n.setSession();
|
|
2550
|
+
}
|
|
2551
|
+
/**
|
|
2552
|
+
* @inheritDoc
|
|
2553
|
+
*/
|
|
2554
|
+
startSession(t) {
|
|
2555
|
+
const { scope: n, client: r } = this.getStackTop(), { release: s, environment: i = ue } = r && r.getOptions() || {}, { userAgent: o } = y.navigator || {}, a = Os(d(d({
|
|
2556
|
+
release: s,
|
|
2557
|
+
environment: i,
|
|
2558
|
+
user: n.getUser()
|
|
2559
|
+
}, o && { userAgent: o }), t)), c = n.getSession && n.getSession();
|
|
2560
|
+
return c && c.status === "ok" && z(c, { status: "exited" }), this.endSession(), n.setSession(a), a;
|
|
2561
|
+
}
|
|
2562
|
+
/**
|
|
2563
|
+
* Returns if default PII should be sent to Sentry and propagated in ourgoing requests
|
|
2564
|
+
* when Tracing is used.
|
|
2565
|
+
*/
|
|
2566
|
+
shouldSendDefaultPii() {
|
|
2567
|
+
const t = this.getClient(), n = t && t.getOptions();
|
|
2568
|
+
return !!(n && n.sendDefaultPii);
|
|
2569
|
+
}
|
|
2570
|
+
/**
|
|
2571
|
+
* Sends the current Session on the scope
|
|
2572
|
+
*/
|
|
2573
|
+
_sendSessionUpdate() {
|
|
2574
|
+
const { scope: t, client: n } = this.getStackTop(), r = t.getSession();
|
|
2575
|
+
r && n && n.captureSession && n.captureSession(r);
|
|
2576
|
+
}
|
|
2577
|
+
/**
|
|
2578
|
+
* Internal helper function to call a method on the top client if it exists.
|
|
2579
|
+
*
|
|
2580
|
+
* @param method The method to call on the client.
|
|
2581
|
+
* @param args Arguments to pass to the client function.
|
|
2582
|
+
*/
|
|
2583
|
+
_withClient(t) {
|
|
2584
|
+
const { scope: n, client: r } = this.getStackTop();
|
|
2585
|
+
r && t(r, n);
|
|
2586
|
+
}
|
|
2587
|
+
/**
|
|
2588
|
+
* Calls global extension method and binding current instance to the function call
|
|
2589
|
+
*/
|
|
2590
|
+
// @ts-expect-error Function lacks ending return statement and return type does not include 'undefined'. ts(2366)
|
|
2591
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
2592
|
+
_callExtensionMethod(t, ...n) {
|
|
2593
|
+
const s = wt().__SENTRY__;
|
|
2594
|
+
if (s && s.extensions && typeof s.extensions[t] == "function")
|
|
2595
|
+
return s.extensions[t].apply(this, n);
|
|
2596
|
+
}
|
|
2597
|
+
}
|
|
2598
|
+
function wt() {
|
|
2599
|
+
return y.__SENTRY__ = y.__SENTRY__ || {
|
|
2600
|
+
extensions: {},
|
|
2601
|
+
hub: void 0
|
|
2602
|
+
}, y;
|
|
2603
|
+
}
|
|
2604
|
+
function Ve(e) {
|
|
2605
|
+
const t = wt(), n = te(t);
|
|
2606
|
+
return An(t, e), n;
|
|
2607
|
+
}
|
|
2608
|
+
function v() {
|
|
2609
|
+
const e = wt();
|
|
2610
|
+
if (e.__SENTRY__ && e.__SENTRY__.acs) {
|
|
2611
|
+
const t = e.__SENTRY__.acs.getCurrentHub();
|
|
2612
|
+
if (t)
|
|
2613
|
+
return t;
|
|
2614
|
+
}
|
|
2615
|
+
return Cs(e);
|
|
2616
|
+
}
|
|
2617
|
+
function Cs(e = wt()) {
|
|
2618
|
+
return (!Ns(e) || te(e).isOlderThan($n)) && An(e, new wn()), te(e);
|
|
2619
|
+
}
|
|
2620
|
+
function Ns(e) {
|
|
2621
|
+
return !!(e && e.__SENTRY__ && e.__SENTRY__.hub);
|
|
2622
|
+
}
|
|
2623
|
+
function te(e) {
|
|
2624
|
+
return pn("hub", () => new wn(), e);
|
|
2625
|
+
}
|
|
2626
|
+
function An(e, t) {
|
|
2627
|
+
if (!e)
|
|
2628
|
+
return !1;
|
|
2629
|
+
const n = e.__SENTRY__ = e.__SENTRY__ || {};
|
|
2630
|
+
return n.hub = t, !0;
|
|
2631
|
+
}
|
|
2632
|
+
function Ds(e, t, n) {
|
|
2633
|
+
const r = t.getOptions(), { publicKey: s } = t.getDsn() || {}, { segment: i } = n && n.getUser() || {}, o = St({
|
|
2634
|
+
environment: r.environment || ue,
|
|
2635
|
+
release: r.release,
|
|
2636
|
+
user_segment: i,
|
|
2637
|
+
public_key: s,
|
|
2638
|
+
trace_id: e
|
|
2639
|
+
});
|
|
2640
|
+
return t.emit && t.emit("createDsc", o), o;
|
|
2641
|
+
}
|
|
2642
|
+
function Ye(e, t) {
|
|
2643
|
+
return v().captureException(e, { captureContext: t });
|
|
2644
|
+
}
|
|
2645
|
+
function Ke(e, t) {
|
|
2646
|
+
v().setTag(e, t);
|
|
2647
|
+
}
|
|
2648
|
+
function ee(e) {
|
|
2649
|
+
v().setUser(e);
|
|
2650
|
+
}
|
|
2651
|
+
const Ms = "7";
|
|
2652
|
+
function Ls(e) {
|
|
2653
|
+
const t = e.protocol ? `${e.protocol}:` : "", n = e.port ? `:${e.port}` : "";
|
|
2654
|
+
return `${t}//${e.host}${n}${e.path ? `/${e.path}` : ""}/api/`;
|
|
2655
|
+
}
|
|
2656
|
+
function Us(e) {
|
|
2657
|
+
return `${Ls(e)}${e.projectId}/envelope/`;
|
|
2658
|
+
}
|
|
2659
|
+
function js(e, t) {
|
|
2660
|
+
return Ir(d({
|
|
2661
|
+
// We send only the minimum set of required information. See
|
|
2662
|
+
// https://github.com/getsentry/sentry-javascript/issues/2572.
|
|
2663
|
+
sentry_key: e.publicKey,
|
|
2664
|
+
sentry_version: Ms
|
|
2665
|
+
}, t && { sentry_client: `${t.name}/${t.version}` }));
|
|
2666
|
+
}
|
|
2667
|
+
function Hs(e, t = {}) {
|
|
2668
|
+
const n = typeof t == "string" ? t : t.tunnel, r = typeof t == "string" || !t._metadata ? void 0 : t._metadata.sdk;
|
|
2669
|
+
return n || `${Us(e)}?${js(e, r)}`;
|
|
2670
|
+
}
|
|
2671
|
+
function Fs(e, t) {
|
|
2672
|
+
return t && (e.sdk = e.sdk || {}, e.sdk.name = e.sdk.name || t.name, e.sdk.version = e.sdk.version || t.version, e.sdk.integrations = [...e.sdk.integrations || [], ...t.integrations || []], e.sdk.packages = [...e.sdk.packages || [], ...t.packages || []]), e;
|
|
2673
|
+
}
|
|
2674
|
+
function Bs(e, t, n, r) {
|
|
2675
|
+
const s = Sn(n), i = d(d({
|
|
2676
|
+
sent_at: (/* @__PURE__ */ new Date()).toISOString()
|
|
2677
|
+
}, s && { sdk: s }), !!r && t && { dsn: bt(t) }), o = "aggregates" in e ? [{ type: "sessions" }, e] : [{ type: "session" }, e.toJSON()];
|
|
2678
|
+
return it(i, [o]);
|
|
2679
|
+
}
|
|
2680
|
+
function qs(e, t, n, r) {
|
|
2681
|
+
const s = Sn(n), i = e.type && e.type !== "replay_event" ? e.type : "event";
|
|
2682
|
+
Fs(e, n && n.sdk);
|
|
2683
|
+
const o = vs(e, s, r, t);
|
|
2684
|
+
return delete e.sdkProcessingMetadata, it(o, [[{ type: i }, e]]);
|
|
2685
|
+
}
|
|
2686
|
+
const Je = [];
|
|
2687
|
+
function zs(e, t) {
|
|
2688
|
+
const n = {};
|
|
2689
|
+
return t.forEach((r) => {
|
|
2690
|
+
r && kn(e, r, n);
|
|
2691
|
+
}), n;
|
|
2692
|
+
}
|
|
2693
|
+
function kn(e, t, n) {
|
|
2694
|
+
if (n[t.name] = t, Je.indexOf(t.name) === -1 && (t.setupOnce(xs, v), Je.push(t.name)), e.on && typeof t.preprocessEvent == "function") {
|
|
2695
|
+
const r = t.preprocessEvent.bind(t);
|
|
2696
|
+
e.on("preprocessEvent", (s, i) => r(s, i, e));
|
|
2697
|
+
}
|
|
2698
|
+
if (e.addEventProcessor && typeof t.processEvent == "function") {
|
|
2699
|
+
const r = t.processEvent.bind(t), s = Object.assign((i, o) => r(i, o, e), {
|
|
2700
|
+
id: t.name
|
|
2701
|
+
});
|
|
2702
|
+
e.addEventProcessor(s);
|
|
2703
|
+
}
|
|
2704
|
+
}
|
|
2705
|
+
function Ws(e, t, n, r, s) {
|
|
2706
|
+
const { normalizeDepth: i = 3, normalizeMaxBreadth: o = 1e3 } = e, a = _(d({}, t), {
|
|
2707
|
+
event_id: t.event_id || n.event_id || O(),
|
|
2708
|
+
timestamp: t.timestamp || $t()
|
|
2709
|
+
}), c = n.integrations || e.integrations.map((f) => f.name);
|
|
2710
|
+
Gs(a, e), Ks(a, c), t.type === void 0 && Vs(a, e.stackParser);
|
|
2711
|
+
let u = r;
|
|
2712
|
+
n.captureContext && (u = N.clone(u).update(n.captureContext));
|
|
2713
|
+
let h = L(a);
|
|
2714
|
+
const l = s && s.getEventProcessors ? s.getEventProcessors() : [];
|
|
2715
|
+
if (u) {
|
|
2716
|
+
if (u.getAttachments) {
|
|
2717
|
+
const f = [...n.attachments || [], ...u.getAttachments()];
|
|
2718
|
+
f.length && (n.attachments = f);
|
|
2719
|
+
}
|
|
2720
|
+
h = u.applyToEvent(a, n, l);
|
|
2721
|
+
} else
|
|
2722
|
+
h = yt([...l, ...le()], a, n);
|
|
2723
|
+
return h.then((f) => (f && Ys(f), typeof i == "number" && i > 0 ? Js(f, i, o) : f));
|
|
2724
|
+
}
|
|
2725
|
+
function Gs(e, t) {
|
|
2726
|
+
const { environment: n, release: r, dist: s, maxValueLength: i = 250 } = t;
|
|
2727
|
+
"environment" in e || (e.environment = "environment" in t ? n : ue), e.release === void 0 && r !== void 0 && (e.release = r), e.dist === void 0 && s !== void 0 && (e.dist = s), e.message && (e.message = j(e.message, i));
|
|
2728
|
+
const o = e.exception && e.exception.values && e.exception.values[0];
|
|
2729
|
+
o && o.value && (o.value = j(o.value, i));
|
|
2730
|
+
const a = e.request;
|
|
2731
|
+
a && a.url && (a.url = j(a.url, i));
|
|
2732
|
+
}
|
|
2733
|
+
const Xe = /* @__PURE__ */ new WeakMap();
|
|
2734
|
+
function Vs(e, t) {
|
|
2735
|
+
const n = y._sentryDebugIds;
|
|
2736
|
+
if (!n)
|
|
2737
|
+
return;
|
|
2738
|
+
let r;
|
|
2739
|
+
const s = Xe.get(t);
|
|
2740
|
+
s ? r = s : (r = /* @__PURE__ */ new Map(), Xe.set(t, r));
|
|
2741
|
+
const i = Object.keys(n).reduce((o, a) => {
|
|
2742
|
+
let c;
|
|
2743
|
+
const u = r.get(a);
|
|
2744
|
+
u ? c = u : (c = t(a), r.set(a, c));
|
|
2745
|
+
for (let h = c.length - 1; h >= 0; h--) {
|
|
2746
|
+
const l = c[h];
|
|
2747
|
+
if (l.filename) {
|
|
2748
|
+
o[l.filename] = n[a];
|
|
2749
|
+
break;
|
|
2750
|
+
}
|
|
2751
|
+
}
|
|
2752
|
+
return o;
|
|
2753
|
+
}, {});
|
|
2754
|
+
try {
|
|
2755
|
+
e.exception.values.forEach((o) => {
|
|
2756
|
+
o.stacktrace.frames.forEach((a) => {
|
|
2757
|
+
a.filename && (a.debug_id = i[a.filename]);
|
|
2758
|
+
});
|
|
2759
|
+
});
|
|
2760
|
+
} catch (o) {
|
|
2761
|
+
}
|
|
2762
|
+
}
|
|
2763
|
+
function Ys(e) {
|
|
2764
|
+
const t = {};
|
|
2765
|
+
try {
|
|
2766
|
+
e.exception.values.forEach((r) => {
|
|
2767
|
+
r.stacktrace.frames.forEach((s) => {
|
|
2768
|
+
s.debug_id && (s.abs_path ? t[s.abs_path] = s.debug_id : s.filename && (t[s.filename] = s.debug_id), delete s.debug_id);
|
|
2769
|
+
});
|
|
2770
|
+
});
|
|
2771
|
+
} catch (r) {
|
|
2772
|
+
}
|
|
2773
|
+
if (Object.keys(t).length === 0)
|
|
2774
|
+
return;
|
|
2775
|
+
e.debug_meta = e.debug_meta || {}, e.debug_meta.images = e.debug_meta.images || [];
|
|
2776
|
+
const n = e.debug_meta.images;
|
|
2777
|
+
Object.keys(t).forEach((r) => {
|
|
2778
|
+
n.push({
|
|
2779
|
+
type: "sourcemap",
|
|
2780
|
+
code_file: r,
|
|
2781
|
+
debug_id: t[r]
|
|
2782
|
+
});
|
|
2783
|
+
});
|
|
2784
|
+
}
|
|
2785
|
+
function Ks(e, t) {
|
|
2786
|
+
t.length > 0 && (e.sdk = e.sdk || {}, e.sdk.integrations = [...e.sdk.integrations || [], ...t]);
|
|
2787
|
+
}
|
|
2788
|
+
function Js(e, t, n) {
|
|
2789
|
+
if (!e)
|
|
2790
|
+
return null;
|
|
2791
|
+
const r = d(d(d(d(d({}, e), e.breadcrumbs && {
|
|
2792
|
+
breadcrumbs: e.breadcrumbs.map((s) => d(d({}, s), s.data && {
|
|
2793
|
+
data: T(s.data, t, n)
|
|
2794
|
+
}))
|
|
2795
|
+
}), e.user && {
|
|
2796
|
+
user: T(e.user, t, n)
|
|
2797
|
+
}), e.contexts && {
|
|
2798
|
+
contexts: T(e.contexts, t, n)
|
|
2799
|
+
}), e.extra && {
|
|
2800
|
+
extra: T(e.extra, t, n)
|
|
2801
|
+
});
|
|
2802
|
+
return e.contexts && e.contexts.trace && r.contexts && (r.contexts.trace = e.contexts.trace, e.contexts.trace.data && (r.contexts.trace.data = T(e.contexts.trace.data, t, n))), e.spans && (r.spans = e.spans.map((s) => (s.data && (s.data = T(s.data, t, n)), s))), r;
|
|
2803
|
+
}
|
|
2804
|
+
class Xs {
|
|
2805
|
+
/** Options passed to the SDK. */
|
|
2806
|
+
/** The client Dsn, if specified in options. Without this Dsn, the SDK will be disabled. */
|
|
2807
|
+
/** Array of set up integrations. */
|
|
2808
|
+
/** Indicates whether this client's integrations have been set up. */
|
|
2809
|
+
/** Number of calls being processed */
|
|
2810
|
+
/** Holds flushable */
|
|
2811
|
+
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
2812
|
+
/**
|
|
2813
|
+
* Initializes this client instance.
|
|
2814
|
+
*
|
|
2815
|
+
* @param options Options for the client.
|
|
2816
|
+
*/
|
|
2817
|
+
constructor(t) {
|
|
2818
|
+
if (this._options = t, this._integrations = {}, this._integrationsInitialized = !1, this._numProcessing = 0, this._outcomes = {}, this._hooks = {}, this._eventProcessors = [], t.dsn && (this._dsn = Rr(t.dsn)), this._dsn) {
|
|
2819
|
+
const n = Hs(this._dsn, t);
|
|
2820
|
+
this._transport = t.transport(_(d({
|
|
2821
|
+
recordDroppedEvent: this.recordDroppedEvent.bind(this)
|
|
2822
|
+
}, t.transportOptions), {
|
|
2823
|
+
url: n
|
|
2824
|
+
}));
|
|
2825
|
+
}
|
|
2826
|
+
}
|
|
2827
|
+
/**
|
|
2828
|
+
* @inheritDoc
|
|
2829
|
+
*/
|
|
2830
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
|
|
2831
|
+
captureException(t, n, r) {
|
|
2832
|
+
if (Me(t))
|
|
2833
|
+
return;
|
|
2834
|
+
let s = n && n.event_id;
|
|
2835
|
+
return this._process(
|
|
2836
|
+
this.eventFromException(t, n).then((i) => this._captureEvent(i, n, r)).then((i) => {
|
|
2837
|
+
s = i;
|
|
2838
|
+
})
|
|
2839
|
+
), s;
|
|
2840
|
+
}
|
|
2841
|
+
/**
|
|
2842
|
+
* @inheritDoc
|
|
2843
|
+
*/
|
|
2844
|
+
captureMessage(t, n, r, s) {
|
|
2845
|
+
let i = r && r.event_id;
|
|
2846
|
+
const o = hn(t) ? this.eventFromMessage(String(t), n, r) : this.eventFromException(t, r);
|
|
2847
|
+
return this._process(
|
|
2848
|
+
o.then((a) => this._captureEvent(a, r, s)).then((a) => {
|
|
2849
|
+
i = a;
|
|
2850
|
+
})
|
|
2851
|
+
), i;
|
|
2852
|
+
}
|
|
2853
|
+
/**
|
|
2854
|
+
* @inheritDoc
|
|
2855
|
+
*/
|
|
2856
|
+
captureEvent(t, n, r) {
|
|
2857
|
+
if (n && n.originalException && Me(n.originalException))
|
|
2858
|
+
return;
|
|
2859
|
+
let s = n && n.event_id;
|
|
2860
|
+
return this._process(
|
|
2861
|
+
this._captureEvent(t, n, r).then((i) => {
|
|
2862
|
+
s = i;
|
|
2863
|
+
})
|
|
2864
|
+
), s;
|
|
2865
|
+
}
|
|
2866
|
+
/**
|
|
2867
|
+
* @inheritDoc
|
|
2868
|
+
*/
|
|
2869
|
+
captureSession(t) {
|
|
2870
|
+
typeof t.release != "string" || (this.sendSession(t), z(t, { init: !1 }));
|
|
2871
|
+
}
|
|
2872
|
+
/**
|
|
2873
|
+
* @inheritDoc
|
|
2874
|
+
*/
|
|
2875
|
+
getDsn() {
|
|
2876
|
+
return this._dsn;
|
|
2877
|
+
}
|
|
2878
|
+
/**
|
|
2879
|
+
* @inheritDoc
|
|
2880
|
+
*/
|
|
2881
|
+
getOptions() {
|
|
2882
|
+
return this._options;
|
|
2883
|
+
}
|
|
2884
|
+
/**
|
|
2885
|
+
* @see SdkMetadata in @sentry/types
|
|
2886
|
+
*
|
|
2887
|
+
* @return The metadata of the SDK
|
|
2888
|
+
*/
|
|
2889
|
+
getSdkMetadata() {
|
|
2890
|
+
return this._options._metadata;
|
|
2891
|
+
}
|
|
2892
|
+
/**
|
|
2893
|
+
* @inheritDoc
|
|
2894
|
+
*/
|
|
2895
|
+
getTransport() {
|
|
2896
|
+
return this._transport;
|
|
2897
|
+
}
|
|
2898
|
+
/**
|
|
2899
|
+
* @inheritDoc
|
|
2900
|
+
*/
|
|
2901
|
+
flush(t) {
|
|
2902
|
+
const n = this._transport;
|
|
2903
|
+
return n ? this._isClientDoneProcessing(t).then((r) => n.flush(t).then((s) => r && s)) : L(!0);
|
|
2904
|
+
}
|
|
2905
|
+
/**
|
|
2906
|
+
* @inheritDoc
|
|
2907
|
+
*/
|
|
2908
|
+
close(t) {
|
|
2909
|
+
return this.flush(t).then((n) => (this.getOptions().enabled = !1, n));
|
|
2910
|
+
}
|
|
2911
|
+
/** Get all installed event processors. */
|
|
2912
|
+
getEventProcessors() {
|
|
2913
|
+
return this._eventProcessors;
|
|
2914
|
+
}
|
|
2915
|
+
/** @inheritDoc */
|
|
2916
|
+
addEventProcessor(t) {
|
|
2917
|
+
this._eventProcessors.push(t);
|
|
2918
|
+
}
|
|
2919
|
+
/**
|
|
2920
|
+
* Sets up the integrations
|
|
2921
|
+
*/
|
|
2922
|
+
setupIntegrations(t) {
|
|
2923
|
+
(t && !this._integrationsInitialized || this._isEnabled() && !this._integrationsInitialized) && (this._integrations = zs(this, this._options.integrations), this._integrationsInitialized = !0);
|
|
2924
|
+
}
|
|
2925
|
+
/**
|
|
2926
|
+
* Gets an installed integration by its `id`.
|
|
2927
|
+
*
|
|
2928
|
+
* @returns The installed integration or `undefined` if no integration with that `id` was installed.
|
|
2929
|
+
*/
|
|
2930
|
+
getIntegrationById(t) {
|
|
2931
|
+
return this._integrations[t];
|
|
2932
|
+
}
|
|
2933
|
+
/**
|
|
2934
|
+
* @inheritDoc
|
|
2935
|
+
*/
|
|
2936
|
+
getIntegration(t) {
|
|
2937
|
+
try {
|
|
2938
|
+
return this._integrations[t.id] || null;
|
|
2939
|
+
} catch (n) {
|
|
2940
|
+
return null;
|
|
2941
|
+
}
|
|
2942
|
+
}
|
|
2943
|
+
/**
|
|
2944
|
+
* @inheritDoc
|
|
2945
|
+
*/
|
|
2946
|
+
addIntegration(t) {
|
|
2947
|
+
kn(this, t, this._integrations);
|
|
2948
|
+
}
|
|
2949
|
+
/**
|
|
2950
|
+
* @inheritDoc
|
|
2951
|
+
*/
|
|
2952
|
+
sendEvent(t, n = {}) {
|
|
2953
|
+
this.emit("beforeSendEvent", t, n);
|
|
2954
|
+
let r = qs(t, this._dsn, this._options._metadata, this._options.tunnel);
|
|
2955
|
+
for (const i of n.attachments || [])
|
|
2956
|
+
r = _s(
|
|
2957
|
+
r,
|
|
2958
|
+
ys(
|
|
2959
|
+
i,
|
|
2960
|
+
this._options.transportOptions && this._options.transportOptions.textEncoder
|
|
2961
|
+
)
|
|
2962
|
+
);
|
|
2963
|
+
const s = this._sendEnvelope(r);
|
|
2964
|
+
s && s.then((i) => this.emit("afterSendEvent", t, i), null);
|
|
2965
|
+
}
|
|
2966
|
+
/**
|
|
2967
|
+
* @inheritDoc
|
|
2968
|
+
*/
|
|
2969
|
+
sendSession(t) {
|
|
2970
|
+
const n = Bs(t, this._dsn, this._options._metadata, this._options.tunnel);
|
|
2971
|
+
this._sendEnvelope(n);
|
|
2972
|
+
}
|
|
2973
|
+
/**
|
|
2974
|
+
* @inheritDoc
|
|
2975
|
+
*/
|
|
2976
|
+
recordDroppedEvent(t, n, r) {
|
|
2977
|
+
if (this._options.sendClientReports) {
|
|
2978
|
+
const s = `${t}:${n}`;
|
|
2979
|
+
this._outcomes[s] = this._outcomes[s] + 1 || 1;
|
|
2980
|
+
}
|
|
2981
|
+
}
|
|
2982
|
+
// Keep on() & emit() signatures in sync with types' client.ts interface
|
|
2983
|
+
/* eslint-disable @typescript-eslint/unified-signatures */
|
|
2984
|
+
/** @inheritdoc */
|
|
2985
|
+
/** @inheritdoc */
|
|
2986
|
+
on(t, n) {
|
|
2987
|
+
this._hooks[t] || (this._hooks[t] = []), this._hooks[t].push(n);
|
|
2988
|
+
}
|
|
2989
|
+
/** @inheritdoc */
|
|
2990
|
+
/** @inheritdoc */
|
|
2991
|
+
emit(t, ...n) {
|
|
2992
|
+
this._hooks[t] && this._hooks[t].forEach((r) => r(...n));
|
|
2993
|
+
}
|
|
2994
|
+
/* eslint-enable @typescript-eslint/unified-signatures */
|
|
2995
|
+
/** Updates existing session based on the provided event */
|
|
2996
|
+
_updateSessionFromEvent(t, n) {
|
|
2997
|
+
let r = !1, s = !1;
|
|
2998
|
+
const i = n.exception && n.exception.values;
|
|
2999
|
+
if (i) {
|
|
3000
|
+
s = !0;
|
|
3001
|
+
for (const c of i) {
|
|
3002
|
+
const u = c.mechanism;
|
|
3003
|
+
if (u && u.handled === !1) {
|
|
3004
|
+
r = !0;
|
|
3005
|
+
break;
|
|
3006
|
+
}
|
|
3007
|
+
}
|
|
3008
|
+
}
|
|
3009
|
+
const o = t.status === "ok";
|
|
3010
|
+
(o && t.errors === 0 || o && r) && (z(t, _(d({}, r && { status: "crashed" }), {
|
|
3011
|
+
errors: t.errors || Number(s || r)
|
|
3012
|
+
})), this.captureSession(t));
|
|
3013
|
+
}
|
|
3014
|
+
/**
|
|
3015
|
+
* Determine if the client is finished processing. Returns a promise because it will wait `timeout` ms before saying
|
|
3016
|
+
* "no" (resolving to `false`) in order to give the client a chance to potentially finish first.
|
|
3017
|
+
*
|
|
3018
|
+
* @param timeout The time, in ms, after which to resolve to `false` if the client is still busy. Passing `0` (or not
|
|
3019
|
+
* passing anything) will make the promise wait as long as it takes for processing to finish before resolving to
|
|
3020
|
+
* `true`.
|
|
3021
|
+
* @returns A promise which will resolve to `true` if processing is already done or finishes before the timeout, and
|
|
3022
|
+
* `false` otherwise
|
|
3023
|
+
*/
|
|
3024
|
+
_isClientDoneProcessing(t) {
|
|
3025
|
+
return new b((n) => {
|
|
3026
|
+
let r = 0;
|
|
3027
|
+
const s = 1, i = setInterval(() => {
|
|
3028
|
+
this._numProcessing == 0 ? (clearInterval(i), n(!0)) : (r += s, t && r >= t && (clearInterval(i), n(!1)));
|
|
3029
|
+
}, s);
|
|
3030
|
+
});
|
|
3031
|
+
}
|
|
3032
|
+
/** Determines whether this SDK is enabled and a transport is present. */
|
|
3033
|
+
_isEnabled() {
|
|
3034
|
+
return this.getOptions().enabled !== !1 && this._transport !== void 0;
|
|
3035
|
+
}
|
|
3036
|
+
/**
|
|
3037
|
+
* Adds common information to events.
|
|
3038
|
+
*
|
|
3039
|
+
* The information includes release and environment from `options`,
|
|
3040
|
+
* breadcrumbs and context (extra, tags and user) from the scope.
|
|
3041
|
+
*
|
|
3042
|
+
* Information that is already present in the event is never overwritten. For
|
|
3043
|
+
* nested objects, such as the context, keys are merged.
|
|
3044
|
+
*
|
|
3045
|
+
* @param event The original event.
|
|
3046
|
+
* @param hint May contain additional information about the original exception.
|
|
3047
|
+
* @param scope A scope containing event metadata.
|
|
3048
|
+
* @returns A new event with more information.
|
|
3049
|
+
*/
|
|
3050
|
+
_prepareEvent(t, n, r) {
|
|
3051
|
+
const s = this.getOptions(), i = Object.keys(this._integrations);
|
|
3052
|
+
return !n.integrations && i.length > 0 && (n.integrations = i), this.emit("preprocessEvent", t, n), Ws(s, t, n, r, this).then((o) => {
|
|
3053
|
+
if (o === null)
|
|
3054
|
+
return o;
|
|
3055
|
+
const { propagationContext: a } = o.sdkProcessingMetadata || {};
|
|
3056
|
+
if (!(o.contexts && o.contexts.trace) && a) {
|
|
3057
|
+
const { traceId: u, spanId: h, parentSpanId: l, dsc: f } = a;
|
|
3058
|
+
o.contexts = d({
|
|
3059
|
+
trace: {
|
|
3060
|
+
trace_id: u,
|
|
3061
|
+
span_id: h,
|
|
3062
|
+
parent_span_id: l
|
|
3063
|
+
}
|
|
3064
|
+
}, o.contexts);
|
|
3065
|
+
const p = f || Ds(u, this, r);
|
|
3066
|
+
o.sdkProcessingMetadata = d({
|
|
3067
|
+
dynamicSamplingContext: p
|
|
3068
|
+
}, o.sdkProcessingMetadata);
|
|
3069
|
+
}
|
|
3070
|
+
return o;
|
|
3071
|
+
});
|
|
3072
|
+
}
|
|
3073
|
+
/**
|
|
3074
|
+
* Processes the event and logs an error in case of rejection
|
|
3075
|
+
* @param event
|
|
3076
|
+
* @param hint
|
|
3077
|
+
* @param scope
|
|
3078
|
+
*/
|
|
3079
|
+
_captureEvent(t, n = {}, r) {
|
|
3080
|
+
return this._processEvent(t, n, r).then(
|
|
3081
|
+
(s) => s.event_id,
|
|
3082
|
+
(s) => {
|
|
3083
|
+
}
|
|
3084
|
+
);
|
|
3085
|
+
}
|
|
3086
|
+
/**
|
|
3087
|
+
* Processes an event (either error or message) and sends it to Sentry.
|
|
3088
|
+
*
|
|
3089
|
+
* This also adds breadcrumbs and context information to the event. However,
|
|
3090
|
+
* platform specific meta data (such as the User's IP address) must be added
|
|
3091
|
+
* by the SDK implementor.
|
|
3092
|
+
*
|
|
3093
|
+
*
|
|
3094
|
+
* @param event The event to send to Sentry.
|
|
3095
|
+
* @param hint May contain additional information about the original exception.
|
|
3096
|
+
* @param scope A scope containing event metadata.
|
|
3097
|
+
* @returns A SyncPromise that resolves with the event or rejects in case event was/will not be send.
|
|
3098
|
+
*/
|
|
3099
|
+
_processEvent(t, n, r) {
|
|
3100
|
+
const s = this.getOptions(), { sampleRate: i } = s, o = On(t), a = xn(t), c = t.type || "error", u = `before send for type \`${c}\``;
|
|
3101
|
+
if (a && typeof i == "number" && Math.random() > i)
|
|
3102
|
+
return this.recordDroppedEvent("sample_rate", "error", t), ce(
|
|
3103
|
+
new w(
|
|
3104
|
+
`Discarding event because it's not included in the random sample (sampling rate = ${i})`,
|
|
3105
|
+
"log"
|
|
3106
|
+
)
|
|
3107
|
+
);
|
|
3108
|
+
const h = c === "replay_event" ? "replay" : c;
|
|
3109
|
+
return this._prepareEvent(t, n, r).then((l) => {
|
|
3110
|
+
if (l === null)
|
|
3111
|
+
throw this.recordDroppedEvent("event_processor", h, t), new w("An event processor returned `null`, will not send event.", "log");
|
|
3112
|
+
if (n.data && n.data.__sentry__ === !0)
|
|
3113
|
+
return l;
|
|
3114
|
+
const p = Qs(s, l, n);
|
|
3115
|
+
return Zs(p, u);
|
|
3116
|
+
}).then((l) => {
|
|
3117
|
+
if (l === null)
|
|
3118
|
+
throw this.recordDroppedEvent("before_send", h, t), new w(`${u} returned \`null\`, will not send event.`, "log");
|
|
3119
|
+
const f = r && r.getSession();
|
|
3120
|
+
!o && f && this._updateSessionFromEvent(f, l);
|
|
3121
|
+
const p = l.transaction_info;
|
|
3122
|
+
if (o && p && l.transaction !== t.transaction) {
|
|
3123
|
+
const k = "custom";
|
|
3124
|
+
l.transaction_info = _(d({}, p), {
|
|
3125
|
+
source: k
|
|
3126
|
+
});
|
|
3127
|
+
}
|
|
3128
|
+
return this.sendEvent(l, n), l;
|
|
3129
|
+
}).then(null, (l) => {
|
|
3130
|
+
throw l instanceof w ? l : (this.captureException(l, {
|
|
3131
|
+
data: {
|
|
3132
|
+
__sentry__: !0
|
|
3133
|
+
},
|
|
3134
|
+
originalException: l
|
|
3135
|
+
}), new w(
|
|
3136
|
+
`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
|
|
3137
|
+
Reason: ${l}`
|
|
3138
|
+
));
|
|
3139
|
+
});
|
|
3140
|
+
}
|
|
3141
|
+
/**
|
|
3142
|
+
* Occupies the client with processing and event
|
|
3143
|
+
*/
|
|
3144
|
+
_process(t) {
|
|
3145
|
+
this._numProcessing++, t.then(
|
|
3146
|
+
(n) => (this._numProcessing--, n),
|
|
3147
|
+
(n) => (this._numProcessing--, n)
|
|
3148
|
+
);
|
|
3149
|
+
}
|
|
3150
|
+
/**
|
|
3151
|
+
* @inheritdoc
|
|
3152
|
+
*/
|
|
3153
|
+
_sendEnvelope(t) {
|
|
3154
|
+
if (this.emit("beforeEnvelope", t), this._isEnabled() && this._transport)
|
|
3155
|
+
return this._transport.send(t).then(null, (n) => {
|
|
3156
|
+
});
|
|
3157
|
+
}
|
|
3158
|
+
/**
|
|
3159
|
+
* Clears outcomes on this client and returns them.
|
|
3160
|
+
*/
|
|
3161
|
+
_clearOutcomes() {
|
|
3162
|
+
const t = this._outcomes;
|
|
3163
|
+
return this._outcomes = {}, Object.keys(t).map((n) => {
|
|
3164
|
+
const [r, s] = n.split(":");
|
|
3165
|
+
return {
|
|
3166
|
+
reason: r,
|
|
3167
|
+
category: s,
|
|
3168
|
+
quantity: t[n]
|
|
3169
|
+
};
|
|
3170
|
+
});
|
|
3171
|
+
}
|
|
3172
|
+
/**
|
|
3173
|
+
* @inheritDoc
|
|
3174
|
+
*/
|
|
3175
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
|
|
3176
|
+
}
|
|
3177
|
+
function Zs(e, t) {
|
|
3178
|
+
const n = `${t} must return \`null\` or a valid event.`;
|
|
3179
|
+
if (ae(e))
|
|
3180
|
+
return e.then(
|
|
3181
|
+
(r) => {
|
|
3182
|
+
if (!q(r) && r !== null)
|
|
3183
|
+
throw new w(n);
|
|
3184
|
+
return r;
|
|
3185
|
+
},
|
|
3186
|
+
(r) => {
|
|
3187
|
+
throw new w(`${t} rejected with ${r}`);
|
|
3188
|
+
}
|
|
3189
|
+
);
|
|
3190
|
+
if (!q(e) && e !== null)
|
|
3191
|
+
throw new w(n);
|
|
3192
|
+
return e;
|
|
3193
|
+
}
|
|
3194
|
+
function Qs(e, t, n) {
|
|
3195
|
+
const { beforeSend: r, beforeSendTransaction: s } = e;
|
|
3196
|
+
return xn(t) && r ? r(t, n) : On(t) && s ? s(t, n) : t;
|
|
3197
|
+
}
|
|
3198
|
+
function xn(e) {
|
|
3199
|
+
return e.type === void 0;
|
|
3200
|
+
}
|
|
3201
|
+
function On(e) {
|
|
3202
|
+
return e.type === "transaction";
|
|
3203
|
+
}
|
|
3204
|
+
const ti = 30;
|
|
3205
|
+
function ei(e, t, n = ls(
|
|
3206
|
+
e.bufferSize || ti
|
|
3207
|
+
)) {
|
|
3208
|
+
let r = {};
|
|
3209
|
+
const s = (o) => n.drain(o);
|
|
3210
|
+
function i(o) {
|
|
3211
|
+
const a = [];
|
|
3212
|
+
if (ze(o, (l, f) => {
|
|
3213
|
+
const p = We(f);
|
|
3214
|
+
if (As(r, p)) {
|
|
3215
|
+
const k = Ze(l, f);
|
|
3216
|
+
e.recordDroppedEvent("ratelimit_backoff", p, k);
|
|
3217
|
+
} else
|
|
3218
|
+
a.push(l);
|
|
3219
|
+
}), a.length === 0)
|
|
3220
|
+
return L();
|
|
3221
|
+
const c = it(o[0], a), u = (l) => {
|
|
3222
|
+
ze(c, (f, p) => {
|
|
3223
|
+
const k = Ze(f, p);
|
|
3224
|
+
e.recordDroppedEvent(l, We(p), k);
|
|
3225
|
+
});
|
|
3226
|
+
}, h = () => t({ body: gs(c, e.textEncoder) }).then(
|
|
3227
|
+
(l) => (r = ks(r, l), l),
|
|
3228
|
+
(l) => {
|
|
3229
|
+
throw u("network_error"), l;
|
|
3230
|
+
}
|
|
3231
|
+
);
|
|
3232
|
+
return n.add(h).then(
|
|
3233
|
+
(l) => l,
|
|
3234
|
+
(l) => {
|
|
3235
|
+
if (l instanceof w)
|
|
3236
|
+
return u("queue_overflow"), L();
|
|
3237
|
+
throw l;
|
|
3238
|
+
}
|
|
3239
|
+
);
|
|
3240
|
+
}
|
|
3241
|
+
return i.__sentry__baseTransport__ = !0, {
|
|
3242
|
+
send: i,
|
|
3243
|
+
flush: s
|
|
3244
|
+
};
|
|
3245
|
+
}
|
|
3246
|
+
function Ze(e, t) {
|
|
3247
|
+
if (!(t !== "event" && t !== "transaction"))
|
|
3248
|
+
return Array.isArray(e) ? e[1] : void 0;
|
|
3249
|
+
}
|
|
3250
|
+
const Qe = "7.77.0", S = y;
|
|
3251
|
+
function Tn(e, t) {
|
|
3252
|
+
const n = de(e, t), r = {
|
|
3253
|
+
type: t && t.name,
|
|
3254
|
+
value: ii(t)
|
|
3255
|
+
};
|
|
3256
|
+
return n.length && (r.stacktrace = { frames: n }), r.type === void 0 && r.value === "" && (r.value = "Unrecoverable error caught"), r;
|
|
3257
|
+
}
|
|
3258
|
+
function ni(e, t, n, r) {
|
|
3259
|
+
const i = v().getClient(), o = i && i.getOptions().normalizeDepth, a = {
|
|
3260
|
+
exception: {
|
|
3261
|
+
values: [
|
|
3262
|
+
{
|
|
3263
|
+
type: vt(t) ? t.constructor.name : r ? "UnhandledRejection" : "Error",
|
|
3264
|
+
value: ci(t, { isUnhandledRejection: r })
|
|
3265
|
+
}
|
|
3266
|
+
]
|
|
3267
|
+
},
|
|
3268
|
+
extra: {
|
|
3269
|
+
__serialized__: En(t, o)
|
|
3270
|
+
}
|
|
3271
|
+
};
|
|
3272
|
+
if (n) {
|
|
3273
|
+
const c = de(e, n);
|
|
3274
|
+
c.length && (a.exception.values[0].stacktrace = { frames: c });
|
|
3275
|
+
}
|
|
3276
|
+
return a;
|
|
3277
|
+
}
|
|
3278
|
+
function jt(e, t) {
|
|
3279
|
+
return {
|
|
3280
|
+
exception: {
|
|
3281
|
+
values: [Tn(e, t)]
|
|
3282
|
+
}
|
|
3283
|
+
};
|
|
3284
|
+
}
|
|
3285
|
+
function de(e, t) {
|
|
3286
|
+
const n = t.stacktrace || t.stack || "", r = si(t);
|
|
3287
|
+
try {
|
|
3288
|
+
return e(n, r);
|
|
3289
|
+
} catch (s) {
|
|
3290
|
+
}
|
|
3291
|
+
return [];
|
|
3292
|
+
}
|
|
3293
|
+
const ri = /Minified React error #\d+;/i;
|
|
3294
|
+
function si(e) {
|
|
3295
|
+
if (e) {
|
|
3296
|
+
if (typeof e.framesToPop == "number")
|
|
3297
|
+
return e.framesToPop;
|
|
3298
|
+
if (ri.test(e.message))
|
|
3299
|
+
return 1;
|
|
3300
|
+
}
|
|
3301
|
+
return 0;
|
|
3302
|
+
}
|
|
3303
|
+
function ii(e) {
|
|
3304
|
+
const t = e && e.message;
|
|
3305
|
+
return t ? t.error && typeof t.error.message == "string" ? t.error.message : t : "No error message";
|
|
3306
|
+
}
|
|
3307
|
+
function oi(e, t, n, r) {
|
|
3308
|
+
const s = n && n.syntheticException || void 0, i = he(e, t, s, r);
|
|
3309
|
+
return mt(i), i.level = "error", n && n.event_id && (i.event_id = n.event_id), L(i);
|
|
3310
|
+
}
|
|
3311
|
+
function ai(e, t, n = "info", r, s) {
|
|
3312
|
+
const i = r && r.syntheticException || void 0, o = ne(e, t, i, s);
|
|
3313
|
+
return o.level = n, r && r.event_id && (o.event_id = r.event_id), L(o);
|
|
3314
|
+
}
|
|
3315
|
+
function he(e, t, n, r, s) {
|
|
3316
|
+
let i;
|
|
3317
|
+
if (oe(t) && t.error)
|
|
3318
|
+
return jt(e, t.error);
|
|
3319
|
+
if (Te(t) || _r(t)) {
|
|
3320
|
+
const o = t;
|
|
3321
|
+
if ("stack" in t)
|
|
3322
|
+
i = jt(e, t);
|
|
3323
|
+
else {
|
|
3324
|
+
const a = o.name || (Te(o) ? "DOMError" : "DOMException"), c = o.message ? `${a}: ${o.message}` : a;
|
|
3325
|
+
i = ne(e, c, n, r), De(i, c);
|
|
3326
|
+
}
|
|
3327
|
+
return "code" in o && (i.tags = _(d({}, i.tags), { "DOMException.code": `${o.code}` })), i;
|
|
3328
|
+
}
|
|
3329
|
+
return dn(t) ? jt(e, t) : q(t) || vt(t) ? (i = ni(e, t, n, s), mt(i, {
|
|
3330
|
+
synthetic: !0
|
|
3331
|
+
}), i) : (i = ne(e, t, n, r), De(i, `${t}`, void 0), mt(i, {
|
|
3332
|
+
synthetic: !0
|
|
3333
|
+
}), i);
|
|
3334
|
+
}
|
|
3335
|
+
function ne(e, t, n, r) {
|
|
3336
|
+
const s = {
|
|
3337
|
+
message: t
|
|
3338
|
+
};
|
|
3339
|
+
if (r && n) {
|
|
3340
|
+
const i = de(e, n);
|
|
3341
|
+
i.length && (s.exception = {
|
|
3342
|
+
values: [{ value: t, stacktrace: { frames: i } }]
|
|
3343
|
+
});
|
|
3344
|
+
}
|
|
3345
|
+
return s;
|
|
3346
|
+
}
|
|
3347
|
+
function ci(e, { isUnhandledRejection: t }) {
|
|
3348
|
+
const n = Cr(e), r = t ? "promise rejection" : "exception";
|
|
3349
|
+
return oe(e) ? `Event \`ErrorEvent\` captured as ${r} with message \`${e.message}\`` : vt(e) ? `Event \`${ui(e)}\` (type=${e.type}) captured as ${r}` : `Object captured as ${r} with keys: ${n}`;
|
|
3350
|
+
}
|
|
3351
|
+
function ui(e) {
|
|
3352
|
+
try {
|
|
3353
|
+
const t = Object.getPrototypeOf(e);
|
|
3354
|
+
return t ? t.constructor.name : void 0;
|
|
3355
|
+
} catch (t) {
|
|
3356
|
+
}
|
|
3357
|
+
}
|
|
3358
|
+
function li(e, {
|
|
3359
|
+
metadata: t,
|
|
3360
|
+
tunnel: n,
|
|
3361
|
+
dsn: r
|
|
3362
|
+
}) {
|
|
3363
|
+
const s = d(d({
|
|
3364
|
+
event_id: e.event_id,
|
|
3365
|
+
sent_at: (/* @__PURE__ */ new Date()).toISOString()
|
|
3366
|
+
}, t && t.sdk && {
|
|
3367
|
+
sdk: {
|
|
3368
|
+
name: t.sdk.name,
|
|
3369
|
+
version: t.sdk.version
|
|
3370
|
+
}
|
|
3371
|
+
}), !!n && !!r && { dsn: bt(r) }), i = di(e);
|
|
3372
|
+
return it(s, [i]);
|
|
3373
|
+
}
|
|
3374
|
+
function di(e) {
|
|
3375
|
+
return [{
|
|
3376
|
+
type: "user_report"
|
|
3377
|
+
}, e];
|
|
3378
|
+
}
|
|
3379
|
+
class hi extends Xs {
|
|
3380
|
+
/**
|
|
3381
|
+
* Creates a new Browser SDK instance.
|
|
3382
|
+
*
|
|
3383
|
+
* @param options Configuration options for this SDK.
|
|
3384
|
+
*/
|
|
3385
|
+
constructor(t) {
|
|
3386
|
+
const n = S.SENTRY_SDK_SOURCE || ns();
|
|
3387
|
+
t._metadata = t._metadata || {}, t._metadata.sdk = t._metadata.sdk || {
|
|
3388
|
+
name: "sentry.javascript.browser",
|
|
3389
|
+
packages: [
|
|
3390
|
+
{
|
|
3391
|
+
name: `${n}:@sentry/browser`,
|
|
3392
|
+
version: Qe
|
|
3393
|
+
}
|
|
3394
|
+
],
|
|
3395
|
+
version: Qe
|
|
3396
|
+
}, super(t), t.sendClientReports && S.document && S.document.addEventListener("visibilitychange", () => {
|
|
3397
|
+
S.document.visibilityState === "hidden" && this._flushOutcomes();
|
|
3398
|
+
});
|
|
3399
|
+
}
|
|
3400
|
+
/**
|
|
3401
|
+
* @inheritDoc
|
|
3402
|
+
*/
|
|
3403
|
+
eventFromException(t, n) {
|
|
3404
|
+
return oi(this._options.stackParser, t, n, this._options.attachStacktrace);
|
|
3405
|
+
}
|
|
3406
|
+
/**
|
|
3407
|
+
* @inheritDoc
|
|
3408
|
+
*/
|
|
3409
|
+
eventFromMessage(t, n = "info", r) {
|
|
3410
|
+
return ai(this._options.stackParser, t, n, r, this._options.attachStacktrace);
|
|
3411
|
+
}
|
|
3412
|
+
/**
|
|
3413
|
+
* Sends user feedback to Sentry.
|
|
3414
|
+
*/
|
|
3415
|
+
captureUserFeedback(t) {
|
|
3416
|
+
if (!this._isEnabled())
|
|
3417
|
+
return;
|
|
3418
|
+
const n = li(t, {
|
|
3419
|
+
metadata: this.getSdkMetadata(),
|
|
3420
|
+
dsn: this.getDsn(),
|
|
3421
|
+
tunnel: this.getOptions().tunnel
|
|
3422
|
+
});
|
|
3423
|
+
this._sendEnvelope(n);
|
|
3424
|
+
}
|
|
3425
|
+
/**
|
|
3426
|
+
* @inheritDoc
|
|
3427
|
+
*/
|
|
3428
|
+
_prepareEvent(t, n, r) {
|
|
3429
|
+
return t.platform = t.platform || "javascript", super._prepareEvent(t, n, r);
|
|
3430
|
+
}
|
|
3431
|
+
/**
|
|
3432
|
+
* Sends client reports as an envelope.
|
|
3433
|
+
*/
|
|
3434
|
+
_flushOutcomes() {
|
|
3435
|
+
const t = this._clearOutcomes();
|
|
3436
|
+
if (t.length === 0 || !this._dsn)
|
|
3437
|
+
return;
|
|
3438
|
+
const n = bs(t, this._options.tunnel && bt(this._dsn));
|
|
3439
|
+
this._sendEnvelope(n);
|
|
3440
|
+
}
|
|
3441
|
+
}
|
|
3442
|
+
let K;
|
|
3443
|
+
function fi() {
|
|
3444
|
+
if (K)
|
|
3445
|
+
return K;
|
|
3446
|
+
if (Vt(S.fetch))
|
|
3447
|
+
return K = S.fetch.bind(S);
|
|
3448
|
+
const e = S.document;
|
|
3449
|
+
let t = S.fetch;
|
|
3450
|
+
if (e && typeof e.createElement == "function")
|
|
3451
|
+
try {
|
|
3452
|
+
const n = e.createElement("iframe");
|
|
3453
|
+
n.hidden = !0, e.head.appendChild(n);
|
|
3454
|
+
const r = n.contentWindow;
|
|
3455
|
+
r && r.fetch && (t = r.fetch), e.head.removeChild(n);
|
|
3456
|
+
} catch (n) {
|
|
3457
|
+
}
|
|
3458
|
+
return K = t.bind(S);
|
|
3459
|
+
}
|
|
3460
|
+
function pi() {
|
|
3461
|
+
K = void 0;
|
|
3462
|
+
}
|
|
3463
|
+
function _i(e, t = fi()) {
|
|
3464
|
+
let n = 0, r = 0;
|
|
3465
|
+
function s(i) {
|
|
3466
|
+
const o = i.body.length;
|
|
3467
|
+
n += o, r++;
|
|
3468
|
+
const a = d({
|
|
3469
|
+
body: i.body,
|
|
3470
|
+
method: "POST",
|
|
3471
|
+
referrerPolicy: "origin",
|
|
3472
|
+
headers: e.headers,
|
|
3473
|
+
// Outgoing requests are usually cancelled when navigating to a different page, causing a "TypeError: Failed to
|
|
3474
|
+
// fetch" error and sending a "network_error" client-outcome - in Chrome, the request status shows "(cancelled)".
|
|
3475
|
+
// The `keepalive` flag keeps outgoing requests alive, even when switching pages. We want this since we're
|
|
3476
|
+
// frequently sending events right before the user is switching pages (eg. whenfinishing navigation transactions).
|
|
3477
|
+
// Gotchas:
|
|
3478
|
+
// - `keepalive` isn't supported by Firefox
|
|
3479
|
+
// - As per spec (https://fetch.spec.whatwg.org/#http-network-or-cache-fetch):
|
|
3480
|
+
// If the sum of contentLength and inflightKeepaliveBytes is greater than 64 kibibytes, then return a network error.
|
|
3481
|
+
// We will therefore only activate the flag when we're below that limit.
|
|
3482
|
+
// There is also a limit of requests that can be open at the same time, so we also limit this to 15
|
|
3483
|
+
// See https://github.com/getsentry/sentry-javascript/pull/7553 for details
|
|
3484
|
+
keepalive: n <= 6e4 && r < 15
|
|
3485
|
+
}, e.fetchOptions);
|
|
3486
|
+
try {
|
|
3487
|
+
return t(e.url, a).then((c) => (n -= o, r--, {
|
|
3488
|
+
statusCode: c.status,
|
|
3489
|
+
headers: {
|
|
3490
|
+
"x-sentry-rate-limits": c.headers.get("X-Sentry-Rate-Limits"),
|
|
3491
|
+
"retry-after": c.headers.get("Retry-After")
|
|
3492
|
+
}
|
|
3493
|
+
}));
|
|
3494
|
+
} catch (c) {
|
|
3495
|
+
return pi(), n -= o, r--, ce(c);
|
|
3496
|
+
}
|
|
3497
|
+
}
|
|
3498
|
+
return ei(e, s);
|
|
3499
|
+
}
|
|
3500
|
+
const At = "?", gi = 30, mi = 40, yi = 50;
|
|
3501
|
+
function fe(e, t, n, r) {
|
|
3502
|
+
const s = {
|
|
3503
|
+
filename: e,
|
|
3504
|
+
function: t,
|
|
3505
|
+
in_app: !0
|
|
3506
|
+
// All browser frames are considered in_app
|
|
3507
|
+
};
|
|
3508
|
+
return n !== void 0 && (s.lineno = n), r !== void 0 && (s.colno = r), s;
|
|
3509
|
+
}
|
|
3510
|
+
const Ei = /^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i, vi = /\((\S*)(?::(\d+))(?::(\d+))\)/, bi = (e) => {
|
|
3511
|
+
const t = Ei.exec(e);
|
|
3512
|
+
if (t) {
|
|
3513
|
+
if (t[2] && t[2].indexOf("eval") === 0) {
|
|
3514
|
+
const i = vi.exec(t[2]);
|
|
3515
|
+
i && (t[2] = i[1], t[3] = i[2], t[4] = i[3]);
|
|
3516
|
+
}
|
|
3517
|
+
const [r, s] = Rn(t[1] || At, t[2]);
|
|
3518
|
+
return fe(s, r, t[3] ? +t[3] : void 0, t[4] ? +t[4] : void 0);
|
|
3519
|
+
}
|
|
3520
|
+
}, Si = [gi, bi], $i = /^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i, wi = /(\S+) line (\d+)(?: > eval line \d+)* > eval/i, Ai = (e) => {
|
|
3521
|
+
const t = $i.exec(e);
|
|
3522
|
+
if (t) {
|
|
3523
|
+
if (t[3] && t[3].indexOf(" > eval") > -1) {
|
|
3524
|
+
const i = wi.exec(t[3]);
|
|
3525
|
+
i && (t[1] = t[1] || "eval", t[3] = i[1], t[4] = i[2], t[5] = "");
|
|
3526
|
+
}
|
|
3527
|
+
let r = t[3], s = t[1] || At;
|
|
3528
|
+
return [s, r] = Rn(s, r), fe(r, s, t[4] ? +t[4] : void 0, t[5] ? +t[5] : void 0);
|
|
3529
|
+
}
|
|
3530
|
+
}, ki = [yi, Ai], xi = /^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i, Oi = (e) => {
|
|
3531
|
+
const t = xi.exec(e);
|
|
3532
|
+
return t ? fe(t[2], t[1] || At, +t[3], t[4] ? +t[4] : void 0) : void 0;
|
|
3533
|
+
}, Ti = [mi, Oi], Ri = [Si, ki, Ti], Pi = Mr(...Ri), Rn = (e, t) => {
|
|
3534
|
+
const n = e.indexOf("safari-extension") !== -1, r = e.indexOf("safari-web-extension") !== -1;
|
|
3535
|
+
return n || r ? [
|
|
3536
|
+
e.indexOf("@") !== -1 ? e.split("@")[0] : At,
|
|
3537
|
+
n ? `safari-extension:${t}` : `safari-web-extension:${t}`
|
|
3538
|
+
] : [e, t];
|
|
3539
|
+
};
|
|
3540
|
+
class G {
|
|
3541
|
+
/**
|
|
3542
|
+
* @inheritDoc
|
|
3543
|
+
*/
|
|
3544
|
+
static __initStatic() {
|
|
3545
|
+
this.id = "GlobalHandlers";
|
|
3546
|
+
}
|
|
3547
|
+
/**
|
|
3548
|
+
* @inheritDoc
|
|
3549
|
+
*/
|
|
3550
|
+
/** JSDoc */
|
|
3551
|
+
/**
|
|
3552
|
+
* Stores references functions to installing handlers. Will set to undefined
|
|
3553
|
+
* after they have been run so that they are not used twice.
|
|
3554
|
+
*/
|
|
3555
|
+
/** JSDoc */
|
|
3556
|
+
constructor(t) {
|
|
3557
|
+
this.name = G.id, this._options = d({
|
|
3558
|
+
onerror: !0,
|
|
3559
|
+
onunhandledrejection: !0
|
|
3560
|
+
}, t), this._installFunc = {
|
|
3561
|
+
onerror: Ii,
|
|
3562
|
+
onunhandledrejection: Ci
|
|
3563
|
+
};
|
|
3564
|
+
}
|
|
3565
|
+
/**
|
|
3566
|
+
* @inheritDoc
|
|
3567
|
+
*/
|
|
3568
|
+
setupOnce() {
|
|
3569
|
+
Error.stackTraceLimit = 50;
|
|
3570
|
+
const t = this._options;
|
|
3571
|
+
for (const n in t) {
|
|
3572
|
+
const r = this._installFunc[n];
|
|
3573
|
+
r && t[n] && (r(), this._installFunc[n] = void 0);
|
|
3574
|
+
}
|
|
3575
|
+
}
|
|
3576
|
+
}
|
|
3577
|
+
G.__initStatic();
|
|
3578
|
+
function Ii() {
|
|
3579
|
+
I(
|
|
3580
|
+
"error",
|
|
3581
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3582
|
+
(e) => {
|
|
3583
|
+
const [t, n, r] = Cn();
|
|
3584
|
+
if (!t.getIntegration(G))
|
|
3585
|
+
return;
|
|
3586
|
+
const { msg: s, url: i, line: o, column: a, error: c } = e;
|
|
3587
|
+
if (c && c.__sentry_own_request__)
|
|
3588
|
+
return;
|
|
3589
|
+
const u = c === void 0 && et(s) ? Di(s, i, o, a) : Pn(
|
|
3590
|
+
he(n, c || s, void 0, r, !1),
|
|
3591
|
+
i,
|
|
3592
|
+
o,
|
|
3593
|
+
a
|
|
3594
|
+
);
|
|
3595
|
+
u.level = "error", In(t, c, u, "onerror");
|
|
3596
|
+
}
|
|
3597
|
+
);
|
|
3598
|
+
}
|
|
3599
|
+
function Ci() {
|
|
3600
|
+
I(
|
|
3601
|
+
"unhandledrejection",
|
|
3602
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
3603
|
+
(e) => {
|
|
3604
|
+
const [t, n, r] = Cn();
|
|
3605
|
+
if (!t.getIntegration(G))
|
|
3606
|
+
return;
|
|
3607
|
+
let s = e;
|
|
3608
|
+
try {
|
|
3609
|
+
"reason" in e ? s = e.reason : "detail" in e && "reason" in e.detail && (s = e.detail.reason);
|
|
3610
|
+
} catch (o) {
|
|
3611
|
+
}
|
|
3612
|
+
if (s && s.__sentry_own_request__)
|
|
3613
|
+
return !0;
|
|
3614
|
+
const i = hn(s) ? Ni(s) : he(n, s, void 0, r, !0);
|
|
3615
|
+
i.level = "error", In(t, s, i, "onunhandledrejection");
|
|
3616
|
+
}
|
|
3617
|
+
);
|
|
3618
|
+
}
|
|
3619
|
+
function Ni(e) {
|
|
3620
|
+
return {
|
|
3621
|
+
exception: {
|
|
3622
|
+
values: [
|
|
3623
|
+
{
|
|
3624
|
+
type: "UnhandledRejection",
|
|
3625
|
+
// String() is needed because the Primitive type includes symbols (which can't be automatically stringified)
|
|
3626
|
+
value: `Non-Error promise rejection captured with value: ${String(e)}`
|
|
3627
|
+
}
|
|
3628
|
+
]
|
|
3629
|
+
}
|
|
3630
|
+
};
|
|
3631
|
+
}
|
|
3632
|
+
function Di(e, t, n, r) {
|
|
3633
|
+
const s = /^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;
|
|
3634
|
+
let i = oe(e) ? e.message : e, o = "Error";
|
|
3635
|
+
const a = i.match(s);
|
|
3636
|
+
return a && (o = a[1], i = a[2]), Pn({
|
|
3637
|
+
exception: {
|
|
3638
|
+
values: [
|
|
3639
|
+
{
|
|
3640
|
+
type: o,
|
|
3641
|
+
value: i
|
|
3642
|
+
}
|
|
3643
|
+
]
|
|
3644
|
+
}
|
|
3645
|
+
}, t, n, r);
|
|
3646
|
+
}
|
|
3647
|
+
function Pn(e, t, n, r) {
|
|
3648
|
+
const s = e.exception = e.exception || {}, i = s.values = s.values || [], o = i[0] = i[0] || {}, a = o.stacktrace = o.stacktrace || {}, c = a.frames = a.frames || [], u = isNaN(parseInt(r, 10)) ? void 0 : r, h = isNaN(parseInt(n, 10)) ? void 0 : n, l = et(t) && t.length > 0 ? t : wr();
|
|
3649
|
+
return c.length === 0 && c.push({
|
|
3650
|
+
colno: u,
|
|
3651
|
+
filename: l,
|
|
3652
|
+
function: "?",
|
|
3653
|
+
in_app: !0,
|
|
3654
|
+
lineno: h
|
|
3655
|
+
}), e;
|
|
3656
|
+
}
|
|
3657
|
+
function In(e, t, n, r) {
|
|
3658
|
+
mt(n, {
|
|
3659
|
+
handled: !1,
|
|
3660
|
+
type: r
|
|
3661
|
+
}), e.captureEvent(n, {
|
|
3662
|
+
originalException: t
|
|
3663
|
+
});
|
|
3664
|
+
}
|
|
3665
|
+
function Cn() {
|
|
3666
|
+
const e = v(), t = e.getClient(), n = t && t.getOptions() || {
|
|
3667
|
+
stackParser: () => [],
|
|
3668
|
+
attachStacktrace: !1
|
|
3669
|
+
};
|
|
3670
|
+
return [e, n.stackParser, n.attachStacktrace];
|
|
3671
|
+
}
|
|
3672
|
+
const tn = 1024;
|
|
3673
|
+
class kt {
|
|
3674
|
+
/**
|
|
3675
|
+
* @inheritDoc
|
|
3676
|
+
*/
|
|
3677
|
+
static __initStatic() {
|
|
3678
|
+
this.id = "Breadcrumbs";
|
|
3679
|
+
}
|
|
3680
|
+
/**
|
|
3681
|
+
* @inheritDoc
|
|
3682
|
+
*/
|
|
3683
|
+
/**
|
|
3684
|
+
* Options of the breadcrumbs integration.
|
|
3685
|
+
*/
|
|
3686
|
+
// This field is public, because we use it in the browser client to check if the `sentry` option is enabled.
|
|
3687
|
+
/**
|
|
3688
|
+
* @inheritDoc
|
|
3689
|
+
*/
|
|
3690
|
+
constructor(t) {
|
|
3691
|
+
this.name = kt.id, this.options = d({
|
|
3692
|
+
console: !0,
|
|
3693
|
+
dom: !0,
|
|
3694
|
+
fetch: !0,
|
|
3695
|
+
history: !0,
|
|
3696
|
+
sentry: !0,
|
|
3697
|
+
xhr: !0
|
|
3698
|
+
}, t);
|
|
3699
|
+
}
|
|
3700
|
+
/**
|
|
3701
|
+
* Instrument browser built-ins w/ breadcrumb capturing
|
|
3702
|
+
* - Console API
|
|
3703
|
+
* - DOM API (click/typing)
|
|
3704
|
+
* - XMLHttpRequest API
|
|
3705
|
+
* - Fetch API
|
|
3706
|
+
* - History API
|
|
3707
|
+
*/
|
|
3708
|
+
setupOnce() {
|
|
3709
|
+
if (this.options.console && I("console", Ui), this.options.dom && I("dom", Li(this.options.dom)), this.options.xhr && I("xhr", ji), this.options.fetch && I("fetch", Hi), this.options.history && I("history", Fi), this.options.sentry) {
|
|
3710
|
+
const t = v().getClient();
|
|
3711
|
+
t && t.on && t.on("beforeSendEvent", Mi);
|
|
3712
|
+
}
|
|
3713
|
+
}
|
|
3714
|
+
}
|
|
3715
|
+
kt.__initStatic();
|
|
3716
|
+
function Mi(e) {
|
|
3717
|
+
v().addBreadcrumb(
|
|
3718
|
+
{
|
|
3719
|
+
category: `sentry.${e.type === "transaction" ? "transaction" : "event"}`,
|
|
3720
|
+
event_id: e.event_id,
|
|
3721
|
+
level: e.level,
|
|
3722
|
+
message: Nr(e)
|
|
3723
|
+
},
|
|
3724
|
+
{
|
|
3725
|
+
event: e
|
|
3726
|
+
}
|
|
3727
|
+
);
|
|
3728
|
+
}
|
|
3729
|
+
function Li(e) {
|
|
3730
|
+
function t(n) {
|
|
3731
|
+
let r, s = typeof e == "object" ? e.serializeAttribute : void 0, i = typeof e == "object" && typeof e.maxStringLength == "number" ? e.maxStringLength : void 0;
|
|
3732
|
+
i && i > tn && (i = tn), typeof s == "string" && (s = [s]);
|
|
3733
|
+
try {
|
|
3734
|
+
const o = n.event;
|
|
3735
|
+
r = Bi(o) ? zt(o.target, { keyAttrs: s, maxStringLength: i }) : zt(o, { keyAttrs: s, maxStringLength: i });
|
|
3736
|
+
} catch (o) {
|
|
3737
|
+
r = "<unknown>";
|
|
3738
|
+
}
|
|
3739
|
+
r.length !== 0 && v().addBreadcrumb(
|
|
3740
|
+
{
|
|
3741
|
+
category: `ui.${n.name}`,
|
|
3742
|
+
message: r
|
|
3743
|
+
},
|
|
3744
|
+
{
|
|
3745
|
+
event: n.event,
|
|
3746
|
+
name: n.name,
|
|
3747
|
+
global: n.global
|
|
3748
|
+
}
|
|
3749
|
+
);
|
|
3750
|
+
}
|
|
3751
|
+
return t;
|
|
3752
|
+
}
|
|
3753
|
+
function Ui(e) {
|
|
3754
|
+
const t = {
|
|
3755
|
+
category: "console",
|
|
3756
|
+
data: {
|
|
3757
|
+
arguments: e.args,
|
|
3758
|
+
logger: "console"
|
|
3759
|
+
},
|
|
3760
|
+
level: hs(e.level),
|
|
3761
|
+
message: Re(e.args, " ")
|
|
3762
|
+
};
|
|
3763
|
+
if (e.level === "assert")
|
|
3764
|
+
if (e.args[0] === !1)
|
|
3765
|
+
t.message = `Assertion failed: ${Re(e.args.slice(1), " ") || "console.assert"}`, t.data.arguments = e.args.slice(1);
|
|
3766
|
+
else
|
|
3767
|
+
return;
|
|
3768
|
+
v().addBreadcrumb(t, {
|
|
3769
|
+
input: e.args,
|
|
3770
|
+
level: e.level
|
|
3771
|
+
});
|
|
3772
|
+
}
|
|
3773
|
+
function ji(e) {
|
|
3774
|
+
const { startTimestamp: t, endTimestamp: n } = e, r = e.xhr[Y];
|
|
3775
|
+
if (!t || !n || !r)
|
|
3776
|
+
return;
|
|
3777
|
+
const { method: s, url: i, status_code: o, body: a } = r, c = {
|
|
3778
|
+
method: s,
|
|
3779
|
+
url: i,
|
|
3780
|
+
status_code: o
|
|
3781
|
+
}, u = {
|
|
3782
|
+
xhr: e.xhr,
|
|
3783
|
+
input: a,
|
|
3784
|
+
startTimestamp: t,
|
|
3785
|
+
endTimestamp: n
|
|
3786
|
+
};
|
|
3787
|
+
v().addBreadcrumb(
|
|
3788
|
+
{
|
|
3789
|
+
category: "xhr",
|
|
3790
|
+
data: c,
|
|
3791
|
+
type: "http"
|
|
3792
|
+
},
|
|
3793
|
+
u
|
|
3794
|
+
);
|
|
3795
|
+
}
|
|
3796
|
+
function Hi(e) {
|
|
3797
|
+
const { startTimestamp: t, endTimestamp: n } = e;
|
|
3798
|
+
if (n && !(e.fetchData.url.match(/sentry_key/) && e.fetchData.method === "POST"))
|
|
3799
|
+
if (e.error) {
|
|
3800
|
+
const r = e.fetchData, s = {
|
|
3801
|
+
data: e.error,
|
|
3802
|
+
input: e.args,
|
|
3803
|
+
startTimestamp: t,
|
|
3804
|
+
endTimestamp: n
|
|
3805
|
+
};
|
|
3806
|
+
v().addBreadcrumb(
|
|
3807
|
+
{
|
|
3808
|
+
category: "fetch",
|
|
3809
|
+
data: r,
|
|
3810
|
+
level: "error",
|
|
3811
|
+
type: "http"
|
|
3812
|
+
},
|
|
3813
|
+
s
|
|
3814
|
+
);
|
|
3815
|
+
} else {
|
|
3816
|
+
const r = _(d({}, e.fetchData), {
|
|
3817
|
+
status_code: e.response && e.response.status
|
|
3818
|
+
}), s = {
|
|
3819
|
+
input: e.args,
|
|
3820
|
+
response: e.response,
|
|
3821
|
+
startTimestamp: t,
|
|
3822
|
+
endTimestamp: n
|
|
3823
|
+
};
|
|
3824
|
+
v().addBreadcrumb(
|
|
3825
|
+
{
|
|
3826
|
+
category: "fetch",
|
|
3827
|
+
data: r,
|
|
3828
|
+
type: "http"
|
|
3829
|
+
},
|
|
3830
|
+
s
|
|
3831
|
+
);
|
|
3832
|
+
}
|
|
3833
|
+
}
|
|
3834
|
+
function Fi(e) {
|
|
3835
|
+
let t = e.from, n = e.to;
|
|
3836
|
+
const r = Lt(S.location.href);
|
|
3837
|
+
let s = Lt(t);
|
|
3838
|
+
const i = Lt(n);
|
|
3839
|
+
s.path || (s = r), r.protocol === i.protocol && r.host === i.host && (n = i.relative), r.protocol === s.protocol && r.host === s.host && (t = s.relative), v().addBreadcrumb({
|
|
3840
|
+
category: "navigation",
|
|
3841
|
+
data: {
|
|
3842
|
+
from: t,
|
|
3843
|
+
to: n
|
|
3844
|
+
}
|
|
3845
|
+
});
|
|
3846
|
+
}
|
|
3847
|
+
function Bi(e) {
|
|
3848
|
+
return !!e && !!e.target;
|
|
3849
|
+
}
|
|
3850
|
+
const qi = "cause", zi = 5;
|
|
3851
|
+
class xt {
|
|
3852
|
+
/**
|
|
3853
|
+
* @inheritDoc
|
|
3854
|
+
*/
|
|
3855
|
+
static __initStatic() {
|
|
3856
|
+
this.id = "LinkedErrors";
|
|
3857
|
+
}
|
|
3858
|
+
/**
|
|
3859
|
+
* @inheritDoc
|
|
3860
|
+
*/
|
|
3861
|
+
/**
|
|
3862
|
+
* @inheritDoc
|
|
3863
|
+
*/
|
|
3864
|
+
/**
|
|
3865
|
+
* @inheritDoc
|
|
3866
|
+
*/
|
|
3867
|
+
/**
|
|
3868
|
+
* @inheritDoc
|
|
3869
|
+
*/
|
|
3870
|
+
constructor(t = {}) {
|
|
3871
|
+
this.name = xt.id, this._key = t.key || qi, this._limit = t.limit || zi;
|
|
3872
|
+
}
|
|
3873
|
+
/** @inheritdoc */
|
|
3874
|
+
setupOnce() {
|
|
3875
|
+
}
|
|
3876
|
+
/**
|
|
3877
|
+
* @inheritDoc
|
|
3878
|
+
*/
|
|
3879
|
+
preprocessEvent(t, n, r) {
|
|
3880
|
+
const s = r.getOptions();
|
|
3881
|
+
Er(
|
|
3882
|
+
Tn,
|
|
3883
|
+
s.stackParser,
|
|
3884
|
+
s.maxValueLength,
|
|
3885
|
+
this._key,
|
|
3886
|
+
this._limit,
|
|
3887
|
+
t,
|
|
3888
|
+
n
|
|
3889
|
+
);
|
|
3890
|
+
}
|
|
3891
|
+
}
|
|
3892
|
+
xt.__initStatic();
|
|
3893
|
+
class Ot {
|
|
3894
|
+
/**
|
|
3895
|
+
* @inheritDoc
|
|
3896
|
+
*/
|
|
3897
|
+
static __initStatic() {
|
|
3898
|
+
this.id = "Dedupe";
|
|
3899
|
+
}
|
|
3900
|
+
/**
|
|
3901
|
+
* @inheritDoc
|
|
3902
|
+
*/
|
|
3903
|
+
/**
|
|
3904
|
+
* @inheritDoc
|
|
3905
|
+
*/
|
|
3906
|
+
constructor() {
|
|
3907
|
+
this.name = Ot.id;
|
|
3908
|
+
}
|
|
3909
|
+
/** @inheritDoc */
|
|
3910
|
+
setupOnce(t, n) {
|
|
3911
|
+
}
|
|
3912
|
+
/**
|
|
3913
|
+
* @inheritDoc
|
|
3914
|
+
*/
|
|
3915
|
+
processEvent(t) {
|
|
3916
|
+
if (t.type)
|
|
3917
|
+
return t;
|
|
3918
|
+
try {
|
|
3919
|
+
if (Wi(t, this._previousEvent))
|
|
3920
|
+
return null;
|
|
3921
|
+
} catch (n) {
|
|
3922
|
+
}
|
|
3923
|
+
return this._previousEvent = t;
|
|
3924
|
+
}
|
|
3925
|
+
}
|
|
3926
|
+
Ot.__initStatic();
|
|
3927
|
+
function Wi(e, t) {
|
|
3928
|
+
return t ? !!(Gi(e, t) || Vi(e, t)) : !1;
|
|
3929
|
+
}
|
|
3930
|
+
function Gi(e, t) {
|
|
3931
|
+
const n = e.message, r = t.message;
|
|
3932
|
+
return !(!n && !r || n && !r || !n && r || n !== r || !Dn(e, t) || !Nn(e, t));
|
|
3933
|
+
}
|
|
3934
|
+
function Vi(e, t) {
|
|
3935
|
+
const n = en(t), r = en(e);
|
|
3936
|
+
return !(!n || !r || n.type !== r.type || n.value !== r.value || !Dn(e, t) || !Nn(e, t));
|
|
3937
|
+
}
|
|
3938
|
+
function Nn(e, t) {
|
|
3939
|
+
let n = nn(e), r = nn(t);
|
|
3940
|
+
if (!n && !r)
|
|
3941
|
+
return !0;
|
|
3942
|
+
if (n && !r || !n && r || (n = n, r = r, r.length !== n.length))
|
|
3943
|
+
return !1;
|
|
3944
|
+
for (let s = 0; s < r.length; s++) {
|
|
3945
|
+
const i = r[s], o = n[s];
|
|
3946
|
+
if (i.filename !== o.filename || i.lineno !== o.lineno || i.colno !== o.colno || i.function !== o.function)
|
|
3947
|
+
return !1;
|
|
3948
|
+
}
|
|
3949
|
+
return !0;
|
|
3950
|
+
}
|
|
3951
|
+
function Dn(e, t) {
|
|
3952
|
+
let n = e.fingerprint, r = t.fingerprint;
|
|
3953
|
+
if (!n && !r)
|
|
3954
|
+
return !0;
|
|
3955
|
+
if (n && !r || !n && r)
|
|
3956
|
+
return !1;
|
|
3957
|
+
n = n, r = r;
|
|
3958
|
+
try {
|
|
3959
|
+
return n.join("") === r.join("");
|
|
3960
|
+
} catch (s) {
|
|
3961
|
+
return !1;
|
|
3962
|
+
}
|
|
3963
|
+
}
|
|
3964
|
+
function en(e) {
|
|
3965
|
+
return e.exception && e.exception.values && e.exception.values[0];
|
|
3966
|
+
}
|
|
3967
|
+
function nn(e) {
|
|
3968
|
+
const t = e.exception;
|
|
3969
|
+
if (t)
|
|
3970
|
+
try {
|
|
3971
|
+
return t.values[0].stacktrace.frames;
|
|
3972
|
+
} catch (n) {
|
|
3973
|
+
return;
|
|
3974
|
+
}
|
|
3975
|
+
}
|
|
3976
|
+
class Mn extends Error {
|
|
3977
|
+
constructor(t) {
|
|
3978
|
+
super(t), this.name = "APIError";
|
|
3979
|
+
}
|
|
3980
|
+
}
|
|
3981
|
+
const Yi = (e, t) => {
|
|
3982
|
+
if (["uat", "production"].includes(e)) {
|
|
3983
|
+
const n = new hi({
|
|
3984
|
+
// all options you normally pass to Sentry.init
|
|
3985
|
+
dsn: "https://26ed528c0727a1a2adb22c381ca4111a@o414861.ingest.sentry.io/4506220268355584",
|
|
3986
|
+
release: "0.3.0",
|
|
3987
|
+
environment: e,
|
|
3988
|
+
// Set tracesSampleRate to 1.0 to capture 100%
|
|
3989
|
+
// of transactions for performance monitoring.
|
|
3990
|
+
// We recommend adjusting this value in production
|
|
3991
|
+
tracesSampleRate: 0,
|
|
3992
|
+
// ...
|
|
3993
|
+
transport: _i,
|
|
3994
|
+
stackParser: Pi,
|
|
3995
|
+
// Only the integrations listed here will be used
|
|
3996
|
+
integrations: [
|
|
3997
|
+
new kt(),
|
|
3998
|
+
new G(),
|
|
3999
|
+
new xt(),
|
|
4000
|
+
new Ot()
|
|
4001
|
+
],
|
|
4002
|
+
beforeSend: (r, s) => {
|
|
4003
|
+
const i = s.originalException;
|
|
4004
|
+
return i instanceof Mn && (r.fingerprint = ["{{ default }}", String(i.message)]), r;
|
|
4005
|
+
}
|
|
4006
|
+
});
|
|
4007
|
+
v().bindClient(n), ee({ user: t });
|
|
4008
|
+
}
|
|
4009
|
+
}, Ki = {
|
|
4010
|
+
local: "http://localhost/mrc_api/public/api",
|
|
4011
|
+
uat: "https://api-uat.myriacompliance.com/api",
|
|
4012
|
+
production: "https://api.myriacompliance.com/api"
|
|
4013
|
+
}, Ji = window.location.pathname.split("/");
|
|
4014
|
+
window.location.host === "localhost" ? `${window.location.origin}${Ji[1].trim()}` : window.location.origin;
|
|
4015
|
+
class Xi {
|
|
4016
|
+
constructor(t, n) {
|
|
4017
|
+
if (this.BASE_URL = Ki[t], this.user = n, this.headers = {
|
|
4018
|
+
"Content-Type": "application/json",
|
|
4019
|
+
"Encrypted-User": n
|
|
4020
|
+
}, !this.BASE_URL || !n)
|
|
4021
|
+
throw new Error(
|
|
4022
|
+
"API not initialized due to one/more of these missing fields: environment, user."
|
|
4023
|
+
);
|
|
4024
|
+
}
|
|
4025
|
+
getCategories(t) {
|
|
4026
|
+
return E(this, null, function* () {
|
|
4027
|
+
return this.executeRequest(`/annual_review_tool/categories/${t}`, "GET");
|
|
4028
|
+
});
|
|
4029
|
+
}
|
|
4030
|
+
getCategoryById(t, n, r) {
|
|
4031
|
+
return E(this, null, function* () {
|
|
4032
|
+
return this.executeRequest(
|
|
4033
|
+
`/annual_review_tool/category/${t}/${n}/${r}`,
|
|
4034
|
+
"GET"
|
|
4035
|
+
);
|
|
4036
|
+
});
|
|
4037
|
+
}
|
|
4038
|
+
updateCategoryStatus(t, n) {
|
|
4039
|
+
return E(this, null, function* () {
|
|
4040
|
+
return this.executeRequest(
|
|
4041
|
+
`/annual_review_tool/update_category_status/${t}`,
|
|
4042
|
+
"PUT",
|
|
4043
|
+
{ status: n }
|
|
4044
|
+
);
|
|
4045
|
+
});
|
|
4046
|
+
}
|
|
4047
|
+
saveUserInput(t) {
|
|
4048
|
+
return E(this, null, function* () {
|
|
4049
|
+
return this.executeRequest(
|
|
4050
|
+
"/annual_review_tool/customer_part/customer_part_summary",
|
|
4051
|
+
"POST",
|
|
4052
|
+
t
|
|
4053
|
+
);
|
|
4054
|
+
});
|
|
4055
|
+
}
|
|
4056
|
+
getChecklistItems(t, n) {
|
|
4057
|
+
return E(this, null, function* () {
|
|
4058
|
+
return this.executeRequest(
|
|
4059
|
+
`/annual_review_tool/checklist_questions/${t}/${n}`,
|
|
4060
|
+
"GET"
|
|
4061
|
+
);
|
|
4062
|
+
});
|
|
4063
|
+
}
|
|
4064
|
+
getChecklistResources(t, n) {
|
|
4065
|
+
return E(this, null, function* () {
|
|
4066
|
+
return this.executeRequest(
|
|
4067
|
+
`/annual_review_tool/checklist_resources/${t}/${n}`,
|
|
4068
|
+
"GET"
|
|
4069
|
+
);
|
|
4070
|
+
});
|
|
4071
|
+
}
|
|
4072
|
+
checkAnnualReviewReport(t) {
|
|
4073
|
+
return E(this, null, function* () {
|
|
4074
|
+
return this.executeRequest(
|
|
4075
|
+
`/annual_review_tool/annual_review_report/${t}`,
|
|
4076
|
+
"GET"
|
|
4077
|
+
);
|
|
4078
|
+
});
|
|
4079
|
+
}
|
|
4080
|
+
generateAnnualReviewReport(t, n) {
|
|
4081
|
+
return E(this, null, function* () {
|
|
4082
|
+
return this.executeRequest(
|
|
4083
|
+
`/annual_review_tool/generate_annual_review_report/${t}`,
|
|
4084
|
+
"POST",
|
|
4085
|
+
n
|
|
4086
|
+
);
|
|
4087
|
+
});
|
|
4088
|
+
}
|
|
4089
|
+
fetchPrintViewData(t, n) {
|
|
4090
|
+
return E(this, null, function* () {
|
|
4091
|
+
return this.executeRequest(
|
|
4092
|
+
`/annual_review_tool/checklist_print/${t}/${n}`,
|
|
4093
|
+
"GET"
|
|
4094
|
+
);
|
|
4095
|
+
});
|
|
4096
|
+
}
|
|
4097
|
+
deleteCustomItem(t, n) {
|
|
4098
|
+
return E(this, null, function* () {
|
|
4099
|
+
return this.executeRequest(
|
|
4100
|
+
`/risk_assessment/delete_custom_item/${t}/${n}`,
|
|
4101
|
+
"PUT"
|
|
4102
|
+
);
|
|
4103
|
+
});
|
|
4104
|
+
}
|
|
4105
|
+
downloadFile(t) {
|
|
4106
|
+
return E(this, null, function* () {
|
|
4107
|
+
const n = `/get_file?download_file=${t}`, r = {
|
|
4108
|
+
headers: this.headers,
|
|
4109
|
+
method: "GET"
|
|
4110
|
+
};
|
|
4111
|
+
try {
|
|
4112
|
+
const s = yield fetch(
|
|
4113
|
+
`${this.BASE_URL}/get_file?download_file=${t}`,
|
|
4114
|
+
r
|
|
4115
|
+
);
|
|
4116
|
+
if (!s.ok)
|
|
4117
|
+
throw new Error(
|
|
4118
|
+
`API Request to ${s.url} failed with status: ${s.status}`
|
|
4119
|
+
);
|
|
4120
|
+
return s.blob();
|
|
4121
|
+
} catch (s) {
|
|
4122
|
+
return ee({ id: this.user }), Ke("endpoint", n), Ye(s), null;
|
|
4123
|
+
}
|
|
4124
|
+
});
|
|
4125
|
+
}
|
|
4126
|
+
executeRequest(i, o) {
|
|
4127
|
+
return E(this, arguments, function* (t, n, r = {}, s = {}) {
|
|
4128
|
+
const a = {
|
|
4129
|
+
headers: d(d({}, this.headers), s),
|
|
4130
|
+
method: n
|
|
4131
|
+
};
|
|
4132
|
+
(n === "PUT" || n === "POST") && (a.body = JSON.stringify(r));
|
|
4133
|
+
try {
|
|
4134
|
+
const c = yield fetch(`${this.BASE_URL}${t}`, a);
|
|
4135
|
+
if (!c.ok)
|
|
4136
|
+
throw new Mn(
|
|
4137
|
+
`API Request to ${c.url} failed with status: ${c.status}`
|
|
4138
|
+
);
|
|
4139
|
+
return c.json();
|
|
4140
|
+
} catch (c) {
|
|
4141
|
+
return ee({ id: this.user }), Ke("endpoint", t), Ye(c), null;
|
|
4142
|
+
}
|
|
4143
|
+
});
|
|
4144
|
+
}
|
|
4145
|
+
}
|
|
4146
|
+
const Zi = Xi, Qi = "api";
|
|
4147
|
+
var to = Object.defineProperty, eo = Object.getOwnPropertyDescriptor, Tt = (e, t, n, r) => {
|
|
4148
|
+
for (var s = r > 1 ? void 0 : r ? eo(t, n) : t, i = e.length - 1, o; i >= 0; i--)
|
|
4149
|
+
(o = e[i]) && (s = (r ? o(t, n, s) : o(s)) || s);
|
|
4150
|
+
return r && s && to(t, n, s), s;
|
|
4151
|
+
};
|
|
4152
|
+
let W = class e extends J {
|
|
4153
|
+
constructor() {
|
|
4154
|
+
super(), this.environment = "", this.user = "";
|
|
4155
|
+
}
|
|
4156
|
+
connectedCallback() {
|
|
4157
|
+
return E(this, null, function* () {
|
|
4158
|
+
ge(e.prototype, this, "connectedCallback").call(this);
|
|
4159
|
+
try {
|
|
4160
|
+
this.api = new Zi(this.environment, this.user), Yi(this.environment, this.user);
|
|
4161
|
+
} catch (t) {
|
|
4162
|
+
console.log("error", t), this.error = !0;
|
|
4163
|
+
}
|
|
4164
|
+
});
|
|
4165
|
+
}
|
|
4166
|
+
disconnectedCallback() {
|
|
4167
|
+
super.disconnectedCallback();
|
|
4168
|
+
}
|
|
4169
|
+
render() {
|
|
4170
|
+
return Xn`<div><h1>Vendor Due Diligence Page</h1></div>`;
|
|
4171
|
+
}
|
|
4172
|
+
};
|
|
4173
|
+
W.styles = [
|
|
4174
|
+
Wn`:host{max-width:1200px;margin:0 auto;display:block;font-family:Poppins,sans-serif}`
|
|
4175
|
+
];
|
|
4176
|
+
Tt([
|
|
4177
|
+
ie()
|
|
4178
|
+
], W.prototype, "environment", 2);
|
|
4179
|
+
Tt([
|
|
4180
|
+
ie()
|
|
4181
|
+
], W.prototype, "user", 2);
|
|
4182
|
+
Tt([
|
|
4183
|
+
pr({ context: Qi }),
|
|
4184
|
+
ie()
|
|
4185
|
+
], W.prototype, "api", 2);
|
|
4186
|
+
W = Tt([
|
|
4187
|
+
or("vendor-due-diligence-page")
|
|
4188
|
+
], W);
|
|
4189
|
+
export {
|
|
4190
|
+
W as VendorDueDiligencePage
|
|
4191
|
+
};
|