andoncloud-widget-preview 1.2.2 → 1.2.5
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/dist/index.js +1 -171
- package/dist/index.js.map +1 -1
- package/dist/types.d.ts +1 -0
- package/dist/version.d.ts +1 -1
- package/package.json +6 -6
package/dist/index.js
CHANGED
|
@@ -1,172 +1,2 @@
|
|
|
1
|
-
var i18n=require("i18next"),React=require("react"),require$$1=require("react-router-dom"),require$$2=require("@mui/material/CssBaseline"),require$$3=require("@mui/material/GlobalStyles"),require$$4=require("@mui/material/styles"),require$$5=require("mobx-react-lite"),require$$6=require("prop-types"),require$$7=require("mobx"),require$$8=require("@mui/icons-material/HelpOutline"),require$$9=require("@mui/material"),require$$10=require("../node_modules/andoncloud-sdk/dist/assets/loader.svg"),d=require("@mui/material/Dialog"),p=require("@mui/material/DialogContent"),h=require("@mui/lab"),f=require("@mui/material/Box"),_=require("@mui/material/Card"),require$$11=require("@mui/material/CardContent"),require$$12=require("@mui/material/Container"),require$$13=require("@mui/icons-material/AccessTime"),v=require("@mui/icons-material/Menu"),require$$14=require("@mui/material/AppBar"),require$$15=require("@mui/material/Button"),require$$16=require("@mui/material/IconButton"),require$$17=require("@mui/material/Menu"),k=require("@mui/material/MenuItem"),require$$18=require("@mui/material/Toolbar"),require$$19=require("@mui/material/Typography"),require$$20=require("../node_modules/andoncloud-sdk/dist/assets/logo.svg"),require$$21=require("react-is");require("react-grid-layout/css/styles.css");var RGL=require("react-grid-layout"),andoncloudDashboardToolkit=require("andoncloud-dashboard-toolkit");function _interopDefaultLegacy(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var i18n__default=/*#__PURE__*/_interopDefaultLegacy(i18n),React__default=/*#__PURE__*/_interopDefaultLegacy(React),require$$1__default=/*#__PURE__*/_interopDefaultLegacy(require$$1),require$$2__default=/*#__PURE__*/_interopDefaultLegacy(require$$2),require$$3__default=/*#__PURE__*/_interopDefaultLegacy(require$$3),require$$4__default=/*#__PURE__*/_interopDefaultLegacy(require$$4),require$$5__default=/*#__PURE__*/_interopDefaultLegacy(require$$5),require$$6__default=/*#__PURE__*/_interopDefaultLegacy(require$$6),require$$7__default=/*#__PURE__*/_interopDefaultLegacy(require$$7),require$$8__default=/*#__PURE__*/_interopDefaultLegacy(require$$8),require$$9__default=/*#__PURE__*/_interopDefaultLegacy(require$$9),require$$10__default=/*#__PURE__*/_interopDefaultLegacy(require$$10),d__default=/*#__PURE__*/_interopDefaultLegacy(d),p__default=/*#__PURE__*/_interopDefaultLegacy(p),h__default=/*#__PURE__*/_interopDefaultLegacy(h),f__default=/*#__PURE__*/_interopDefaultLegacy(f),___default=/*#__PURE__*/_interopDefaultLegacy(_),require$$11__default=/*#__PURE__*/_interopDefaultLegacy(require$$11),require$$12__default=/*#__PURE__*/_interopDefaultLegacy(require$$12),require$$13__default=/*#__PURE__*/_interopDefaultLegacy(require$$13),v__default=/*#__PURE__*/_interopDefaultLegacy(v),require$$14__default=/*#__PURE__*/_interopDefaultLegacy(require$$14),require$$15__default=/*#__PURE__*/_interopDefaultLegacy(require$$15),require$$16__default=/*#__PURE__*/_interopDefaultLegacy(require$$16),require$$17__default=/*#__PURE__*/_interopDefaultLegacy(require$$17),k__default=/*#__PURE__*/_interopDefaultLegacy(k),require$$18__default=/*#__PURE__*/_interopDefaultLegacy(require$$18),require$$19__default=/*#__PURE__*/_interopDefaultLegacy(require$$19),require$$20__default=/*#__PURE__*/_interopDefaultLegacy(require$$20),require$$21__default=/*#__PURE__*/_interopDefaultLegacy(require$$21),RGL__default=/*#__PURE__*/_interopDefaultLegacy(RGL);function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}function _toPrimitive(t,e){if("object"!==_typeof(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,e||"default");if("object"!==_typeof(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}function _toPropertyKey(t){var e=_toPrimitive(t,"string");return"symbol"===_typeof(e)?e:String(e)}function _defineProperty(t,e,n){return(e=_toPropertyKey(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var matchHtmlEntity=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,htmlEntities={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},unescapeHtmlEntity=function(t){return htmlEntities[t]},unescape$1=function(t){return t.replace(matchHtmlEntity,unescapeHtmlEntity)};function ownKeys(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,r)}return n}function _objectSpread(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ownKeys(Object(n),!0).forEach(function(e){_defineProperty(t,e,n[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ownKeys(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}var defaultOptions={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:unescape$1};function setDefaults(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};defaultOptions=_objectSpread(_objectSpread({},defaultOptions),t)}var initReactI18next={type:"3rdParty",init:function(t){setDefaults(t.options.react)}},en={},pl={},resources={en:{translation:en},pl:{translation:pl}};i18n__default.default.use(initReactI18next).init({resources:resources,lng:"pl",interpolation:{escapeValue:!1}});var commonjsGlobal="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function createCommonjsModule(t){var e={exports:{}};return t(e,e.exports),e.exports}var andoncloudSdk=createCommonjsModule(function(t,e){var n=React__default.default,r=require$$1__default.default,i=require$$2__default.default,s=require$$3__default.default,a=require$$4__default.default,o=require$$5__default.default,c=require$$6__default.default,l=require$$7__default.default,u=require$$8__default.default,d=require$$9__default.default,p=require$$10__default.default,h=require$$11__default.default,f=require$$12__default.default,_=require$$13__default.default,m=require$$14__default.default,g=require$$15__default.default,y=require$$16__default.default,v=require$$17__default.default,b=require$$18__default.default,E=require$$19__default.default,S=require$$20__default.default,w=require$$21__default.default;function k(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}function T(t){if(t&&t.__esModule)return t;var e=Object.create(null);return t&&Object.keys(t).forEach(function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:function(){return t[n]}})}}),e.default=t,e}var C=/*#__PURE__*/T(n),x=/*#__PURE__*/k(n),R=/*#__PURE__*/k(i),D=/*#__PURE__*/k(s),N=/*#__PURE__*/k(u),I=/*#__PURE__*/k(p),A=/*#__PURE__*/k(d__default.default),O=/*#__PURE__*/k(p__default.default),U=/*#__PURE__*/k(f__default.default),B=/*#__PURE__*/k(___default.default),H=/*#__PURE__*/k(h),M=/*#__PURE__*/k(f),P=/*#__PURE__*/k(_),L=/*#__PURE__*/k(v__default.default),$=/*#__PURE__*/k(m),z=/*#__PURE__*/k(g),G=/*#__PURE__*/k(y),Y=/*#__PURE__*/k(v),F=/*#__PURE__*/k(k__default.default),j=/*#__PURE__*/k(b),q=/*#__PURE__*/k(E),V=/*#__PURE__*/k(S),Z=/*#__PURE__*/k(w);let W,X,K,J={data:""},Q=t=>"object"==typeof window?((t?t.querySelector("#_goober"):window._goober)||Object.assign((t||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:t||J,tt=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,et=/\/\*[^]*?\*\/| +/g,nt=/\n+/g,rt=(t,e)=>{let n="",r="",i="";for(let s in t){let a=t[s];"@"==s[0]?"i"==s[1]?n=s+" "+a+";":r+="f"==s[1]?rt(a,s):s+"{"+rt(a,"k"==s[1]?"":e)+"}":"object"==typeof a?r+=rt(a,e?e.replace(/([^,])+/g,t=>s.replace(/(^:.*)|([^,])+/g,e=>/&/.test(e)?e.replace(/&/g,t):t?t+" "+e:e)):s):null!=a&&(s=/^--/.test(s)?s:s.replace(/[A-Z]/g,"-$&").toLowerCase(),i+=rt.p?rt.p(s,a):s+":"+a+";")}return n+(e&&i?e+"{"+i+"}":i)+r},it={},st=t=>{if("object"==typeof t){let e="";for(let n in t)e+=n+st(t[n]);return e}return t},at=(t,e,n,r,i)=>{let s=st(t),a=it[s]||(it[s]=(t=>{let e=0,n=11;for(;e<t.length;)n=101*n+t.charCodeAt(e++)>>>0;return"go"+n})(s));if(!it[a]){let e=s!==t?t:(t=>{let e,n,r=[{}];for(;e=tt.exec(t.replace(et,""));)e[4]?r.shift():e[3]?(n=e[3].replace(nt," ").trim(),r.unshift(r[0][n]=r[0][n]||{})):r[0][e[1]]=e[2].replace(nt," ").trim();return r[0]})(t);it[a]=rt(i?{["@keyframes "+a]:e}:e,n?"":"."+a)}let o=n&&it.g?it.g:null;return n&&(it.g=it[a]),((t,e,n,r)=>{r?e.data=e.data.replace(r,t):-1===e.data.indexOf(t)&&(e.data=n?t+e.data:e.data+t)})(it[a],e,r,o),a},ot=(t,e,n)=>t.reduce((t,r,i)=>{let s=e[i];if(s&&s.call){let t=s(n),e=t&&t.props&&t.props.className||/^go/.test(t)&&t;s=e?"."+e:t&&"object"==typeof t?t.props?"":rt(t,""):!1===t?"":t}return t+r+(null==s?"":s)},"");function ct(t){let e=this||{},n=t.call?t(e.p):t;return at(n.unshift?n.raw?ot(n,[].slice.call(arguments,1),e.p):n.reduce((t,n)=>Object.assign(t,n&&n.call?n(e.p):n),{}):n,Q(e.target),e.g,e.o,e.k)}ct.bind({g:1});let lt=ct.bind({k:1});function ut(t,e){let n=this||{};return function(){let r=arguments;function i(s,a){let o=Object.assign({},s),c=o.className||i.className;n.p=Object.assign({theme:X&&X()},o),n.o=/ *go\d+/.test(c),o.className=ct.apply(n,r)+(c?" "+c:""),e&&(o.ref=a);let l=t;return t[0]&&(l=o.as||t,delete o.as),K&&l[0]&&K(o),W(l,o)}return e?e(i):i}}var dt=(t,e)=>(t=>"function"==typeof t)(t)?t(e):t,pt=(()=>{let t=0;return()=>(++t).toString()})(),ht=(()=>{let t;return()=>{if(void 0===t&&typeof window<"u"){let e=matchMedia("(prefers-reduced-motion: reduce)");t=!e||e.matches}return t}})(),ft=new Map,_t=t=>{if(ft.has(t))return;let e=setTimeout(()=>{ft.delete(t),vt({type:4,toastId:t})},1e3);ft.set(t,e)},mt=(t,e)=>{switch(e.type){case 0:return{...t,toasts:[e.toast,...t.toasts].slice(0,20)};case 1:return e.toast.id&&(t=>{let e=ft.get(t);e&&clearTimeout(e)})(e.toast.id),{...t,toasts:t.toasts.map(t=>t.id===e.toast.id?{...t,...e.toast}:t)};case 2:let{toast:n}=e;return t.toasts.find(t=>t.id===n.id)?mt(t,{type:1,toast:n}):mt(t,{type:0,toast:n});case 3:let{toastId:r}=e;return r?_t(r):t.toasts.forEach(t=>{_t(t.id)}),{...t,toasts:t.toasts.map(t=>t.id===r||void 0===r?{...t,visible:!1}:t)};case 4:return void 0===e.toastId?{...t,toasts:[]}:{...t,toasts:t.toasts.filter(t=>t.id!==e.toastId)};case 5:return{...t,pausedAt:e.time};case 6:let i=e.time-(t.pausedAt||0);return{...t,pausedAt:void 0,toasts:t.toasts.map(t=>({...t,pauseDuration:t.pauseDuration+i}))}}},gt=[],yt={toasts:[],pausedAt:void 0},vt=t=>{yt=mt(yt,t),gt.forEach(t=>{t(yt)})},bt={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},Et=t=>(e,n)=>{let r=((t,e="blank",n)=>({createdAt:Date.now(),visible:!0,type:e,ariaProps:{role:"status","aria-live":"polite"},message:t,pauseDuration:0,...n,id:(null==n?void 0:n.id)||pt()}))(e,t,n);return vt({type:2,toast:r}),r.id},St=(t,e)=>Et("blank")(t,e);St.error=Et("error"),St.success=Et("success"),St.loading=Et("loading"),St.custom=Et("custom"),St.dismiss=t=>{vt({type:3,toastId:t})},St.remove=t=>vt({type:4,toastId:t}),St.promise=(t,e,n)=>{let r=St.loading(e.loading,{...n,...null==n?void 0:n.loading});return t.then(t=>(St.success(dt(e.success,t),{id:r,...n,...null==n?void 0:n.success}),t)).catch(t=>{St.error(dt(e.error,t),{id:r,...n,...null==n?void 0:n.error})}),t};var wt,kt=(t,e)=>{vt({type:1,toast:{id:t,height:e}})},Tt=()=>{vt({type:5,time:Date.now()})},Ct=lt`
|
|
2
|
-
from {
|
|
3
|
-
transform: scale(0) rotate(45deg);
|
|
4
|
-
opacity: 0;
|
|
5
|
-
}
|
|
6
|
-
to {
|
|
7
|
-
transform: scale(1) rotate(45deg);
|
|
8
|
-
opacity: 1;
|
|
9
|
-
}`,xt=lt`
|
|
10
|
-
from {
|
|
11
|
-
transform: scale(0);
|
|
12
|
-
opacity: 0;
|
|
13
|
-
}
|
|
14
|
-
to {
|
|
15
|
-
transform: scale(1);
|
|
16
|
-
opacity: 1;
|
|
17
|
-
}`,Rt=lt`
|
|
18
|
-
from {
|
|
19
|
-
transform: scale(0) rotate(90deg);
|
|
20
|
-
opacity: 0;
|
|
21
|
-
}
|
|
22
|
-
to {
|
|
23
|
-
transform: scale(1) rotate(90deg);
|
|
24
|
-
opacity: 1;
|
|
25
|
-
}`,Dt=ut("div")`
|
|
26
|
-
width: 20px;
|
|
27
|
-
opacity: 0;
|
|
28
|
-
height: 20px;
|
|
29
|
-
border-radius: 10px;
|
|
30
|
-
background: ${t=>t.primary||"#ff4b4b"};
|
|
31
|
-
position: relative;
|
|
32
|
-
transform: rotate(45deg);
|
|
33
|
-
|
|
34
|
-
animation: ${Ct} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
|
|
35
|
-
forwards;
|
|
36
|
-
animation-delay: 100ms;
|
|
37
|
-
|
|
38
|
-
&:after,
|
|
39
|
-
&:before {
|
|
40
|
-
content: '';
|
|
41
|
-
animation: ${xt} 0.15s ease-out forwards;
|
|
42
|
-
animation-delay: 150ms;
|
|
43
|
-
position: absolute;
|
|
44
|
-
border-radius: 3px;
|
|
45
|
-
opacity: 0;
|
|
46
|
-
background: ${t=>t.secondary||"#fff"};
|
|
47
|
-
bottom: 9px;
|
|
48
|
-
left: 4px;
|
|
49
|
-
height: 2px;
|
|
50
|
-
width: 12px;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
&:before {
|
|
54
|
-
animation: ${Rt} 0.15s ease-out forwards;
|
|
55
|
-
animation-delay: 180ms;
|
|
56
|
-
transform: rotate(90deg);
|
|
57
|
-
}
|
|
58
|
-
`,Nt=lt`
|
|
59
|
-
from {
|
|
60
|
-
transform: rotate(0deg);
|
|
61
|
-
}
|
|
62
|
-
to {
|
|
63
|
-
transform: rotate(360deg);
|
|
64
|
-
}
|
|
65
|
-
`,It=ut("div")`
|
|
66
|
-
width: 12px;
|
|
67
|
-
height: 12px;
|
|
68
|
-
box-sizing: border-box;
|
|
69
|
-
border: 2px solid;
|
|
70
|
-
border-radius: 100%;
|
|
71
|
-
border-color: ${t=>t.secondary||"#e0e0e0"};
|
|
72
|
-
border-right-color: ${t=>t.primary||"#616161"};
|
|
73
|
-
animation: ${Nt} 1s linear infinite;
|
|
74
|
-
`,At=lt`
|
|
75
|
-
from {
|
|
76
|
-
transform: scale(0) rotate(45deg);
|
|
77
|
-
opacity: 0;
|
|
78
|
-
}
|
|
79
|
-
to {
|
|
80
|
-
transform: scale(1) rotate(45deg);
|
|
81
|
-
opacity: 1;
|
|
82
|
-
}`,Ot=lt`
|
|
83
|
-
0% {
|
|
84
|
-
height: 0;
|
|
85
|
-
width: 0;
|
|
86
|
-
opacity: 0;
|
|
87
|
-
}
|
|
88
|
-
40% {
|
|
89
|
-
height: 0;
|
|
90
|
-
width: 6px;
|
|
91
|
-
opacity: 1;
|
|
92
|
-
}
|
|
93
|
-
100% {
|
|
94
|
-
opacity: 1;
|
|
95
|
-
height: 10px;
|
|
96
|
-
}`,Ut=ut("div")`
|
|
97
|
-
width: 20px;
|
|
98
|
-
opacity: 0;
|
|
99
|
-
height: 20px;
|
|
100
|
-
border-radius: 10px;
|
|
101
|
-
background: ${t=>t.primary||"#61d345"};
|
|
102
|
-
position: relative;
|
|
103
|
-
transform: rotate(45deg);
|
|
104
|
-
|
|
105
|
-
animation: ${At} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
|
|
106
|
-
forwards;
|
|
107
|
-
animation-delay: 100ms;
|
|
108
|
-
&:after {
|
|
109
|
-
content: '';
|
|
110
|
-
box-sizing: border-box;
|
|
111
|
-
animation: ${Ot} 0.2s ease-out forwards;
|
|
112
|
-
opacity: 0;
|
|
113
|
-
animation-delay: 200ms;
|
|
114
|
-
position: absolute;
|
|
115
|
-
border-right: 2px solid;
|
|
116
|
-
border-bottom: 2px solid;
|
|
117
|
-
border-color: ${t=>t.secondary||"#fff"};
|
|
118
|
-
bottom: 6px;
|
|
119
|
-
left: 6px;
|
|
120
|
-
height: 10px;
|
|
121
|
-
width: 6px;
|
|
122
|
-
}
|
|
123
|
-
`,Bt=ut("div")`
|
|
124
|
-
position: absolute;
|
|
125
|
-
`,Ht=ut("div")`
|
|
126
|
-
position: relative;
|
|
127
|
-
display: flex;
|
|
128
|
-
justify-content: center;
|
|
129
|
-
align-items: center;
|
|
130
|
-
min-width: 20px;
|
|
131
|
-
min-height: 20px;
|
|
132
|
-
`,Mt=lt`
|
|
133
|
-
from {
|
|
134
|
-
transform: scale(0.6);
|
|
135
|
-
opacity: 0.4;
|
|
136
|
-
}
|
|
137
|
-
to {
|
|
138
|
-
transform: scale(1);
|
|
139
|
-
opacity: 1;
|
|
140
|
-
}`,Pt=ut("div")`
|
|
141
|
-
position: relative;
|
|
142
|
-
transform: scale(0.6);
|
|
143
|
-
opacity: 0.4;
|
|
144
|
-
min-width: 20px;
|
|
145
|
-
animation: ${Mt} 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275)
|
|
146
|
-
forwards;
|
|
147
|
-
`,Lt=({toast:t})=>{let{icon:e,type:n,iconTheme:r}=t;return void 0!==e?"string"==typeof e?C.createElement(Pt,null,e):e:"blank"===n?null:C.createElement(Ht,null,C.createElement(It,{...r}),"loading"!==n&&C.createElement(Bt,null,C.createElement("error"===n?Dt:Ut,{...r})))},$t=t=>`\n0% {transform: translate3d(0,${-200*t}%,0) scale(.6); opacity:.5;}\n100% {transform: translate3d(0,0,0) scale(1); opacity:1;}\n`,zt=t=>`\n0% {transform: translate3d(0,0,-1px) scale(1); opacity:1;}\n100% {transform: translate3d(0,${-150*t}%,-1px) scale(.6); opacity:0;}\n`,Gt=ut("div")`
|
|
148
|
-
display: flex;
|
|
149
|
-
align-items: center;
|
|
150
|
-
background: #fff;
|
|
151
|
-
color: #363636;
|
|
152
|
-
line-height: 1.3;
|
|
153
|
-
will-change: transform;
|
|
154
|
-
box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1), 0 3px 3px rgba(0, 0, 0, 0.05);
|
|
155
|
-
max-width: 350px;
|
|
156
|
-
pointer-events: auto;
|
|
157
|
-
padding: 8px 10px;
|
|
158
|
-
border-radius: 8px;
|
|
159
|
-
`,Yt=ut("div")`
|
|
160
|
-
display: flex;
|
|
161
|
-
justify-content: center;
|
|
162
|
-
margin: 4px 10px;
|
|
163
|
-
color: inherit;
|
|
164
|
-
flex: 1 1 auto;
|
|
165
|
-
white-space: pre-line;
|
|
166
|
-
`,Ft=C.memo(({toast:t,position:e,style:n,children:r})=>{let i=t.height?((t,e)=>{let n=t.includes("top")?1:-1,[r,i]=ht()?["0%{opacity:0;} 100%{opacity:1;}","0%{opacity:1;} 100%{opacity:0;}"]:[$t(n),zt(n)];return{animation:e?`${lt(r)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards`:`${lt(i)} 0.4s forwards cubic-bezier(.06,.71,.55,1)`}})(t.position||e||"top-center",t.visible):{opacity:0},s=C.createElement(Lt,{toast:t}),a=C.createElement(Yt,{...t.ariaProps},dt(t.message,t));return C.createElement(Gt,{className:t.className,style:{...i,...n,...t.style}},"function"==typeof r?r({icon:s,message:a}):C.createElement(C.Fragment,null,s,a))});wt=C.createElement,rt.p=void 0,W=wt,X=void 0,K=void 0;var jt=({id:t,className:e,style:n,onHeightUpdate:r,children:i})=>{let s=C.useCallback(e=>{if(e){let n=()=>{let n=e.getBoundingClientRect().height;r(t,n)};n(),new MutationObserver(n).observe(e,{subtree:!0,childList:!0,characterData:!0})}},[t,r]);return C.createElement("div",{ref:s,className:e,style:n},i)},qt=ct`
|
|
167
|
-
z-index: 9999;
|
|
168
|
-
> * {
|
|
169
|
-
pointer-events: auto;
|
|
170
|
-
}
|
|
171
|
-
`,Vt=({reverseOrder:t,position:e="top-center",toastOptions:r,gutter:i,children:s,containerStyle:a,containerClassName:o})=>{let{toasts:c,handlers:l}=(t=>{let{toasts:e,pausedAt:r}=((t={})=>{let[e,r]=n.useState(yt);n.useEffect(()=>(gt.push(r),()=>{let t=gt.indexOf(r);t>-1&>.splice(t,1)}),[e]);let i=e.toasts.map(e=>{var n,r;return{...t,...t[e.type],...e,duration:e.duration||(null==(n=t[e.type])?void 0:n.duration)||(null==t?void 0:t.duration)||bt[e.type],style:{...t.style,...null==(r=t[e.type])?void 0:r.style,...e.style}}});return{...e,toasts:i}})(t);n.useEffect(()=>{if(r)return;let t=Date.now(),n=e.map(e=>{if(e.duration===1/0)return;let n=(e.duration||0)+e.pauseDuration-(t-e.createdAt);if(!(n<0))return setTimeout(()=>St.dismiss(e.id),n);e.visible&&St.dismiss(e.id)});return()=>{n.forEach(t=>t&&clearTimeout(t))}},[e,r]);let i=n.useCallback(()=>{r&&vt({type:6,time:Date.now()})},[r]),s=n.useCallback((t,n)=>{let{reverseOrder:r=!1,gutter:i=8,defaultPosition:s}=n||{},a=e.filter(e=>(e.position||s)===(t.position||s)&&e.height),o=a.findIndex(e=>e.id===t.id),c=a.filter((t,e)=>e<o&&t.visible).length;return a.filter(t=>t.visible).slice(...r?[c+1]:[0,c]).reduce((t,e)=>t+(e.height||0)+i,0)},[e]);return{toasts:e,handlers:{updateHeight:kt,startPause:Tt,endPause:i,calculateOffset:s}}})(r);return C.createElement("div",{style:{position:"fixed",zIndex:9999,top:16,left:16,right:16,bottom:16,pointerEvents:"none",...a},className:o,onMouseEnter:l.startPause,onMouseLeave:l.endPause},c.map(n=>{let r=n.position||e,a=((t,e)=>{let n=t.includes("top"),r=n?{top:0}:{bottom:0},i=t.includes("center")?{justifyContent:"center"}:t.includes("right")?{justifyContent:"flex-end"}:{};return{left:0,right:0,display:"flex",position:"absolute",transition:ht()?void 0:"all 230ms cubic-bezier(.21,1.02,.73,1)",transform:`translateY(${e*(n?1:-1)}px)`,...r,...i}})(r,l.calculateOffset(n,{reverseOrder:t,gutter:i,defaultPosition:e}));return C.createElement(jt,{id:n.id,key:n.id,onHeightUpdate:l.updateHeight,className:n.visible?qt:"",style:a},"custom"===n.type?dt(n.message,n):s?s(n):C.createElement(Ft,{toast:n,position:r}))}))},Zt=St;const Wt=Object.prototype.toString;function Xt(t){switch(Wt.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return oe(t,Error)}}function Kt(t,e){return Wt.call(t)===`[object ${e}]`}function Jt(t){return Kt(t,"ErrorEvent")}function Qt(t){return Kt(t,"DOMError")}function te(t){return Kt(t,"String")}function ee(t){return null===t||"object"!=typeof t&&"function"!=typeof t}function ne(t){return Kt(t,"Object")}function re(t){return"undefined"!=typeof Event&&oe(t,Event)}function ie(t){return Kt(t,"RegExp")}function se(t){return Boolean(t&&t.then&&"function"==typeof t.then)}function ae(t){return"number"==typeof t&&t!=t}function oe(t,e){try{return t instanceof e}catch(t){return!1}}function ce(t){return t&&t.Math==Math?t:void 0}const le="object"==typeof globalThis&&ce(globalThis)||"object"==typeof window&&ce(window)||"object"==typeof self&&ce(self)||"object"==typeof commonjsGlobal&&ce(commonjsGlobal)||function(){return this}()||{};function ue(){return le}function de(t,e,n){const r=n||le,i=r.__SENTRY__=r.__SENTRY__||{};return i[t]||(i[t]=e())}const pe=ue(),he=80;function fe(t,e={}){try{let n=t;const r=5,i=[];let s=0,a=0;const o=" > ",c=o.length;let l;const u=Array.isArray(e)?e:e.keyAttrs,d=!Array.isArray(e)&&e.maxStringLength||he;for(;n&&s++<r&&(l=_e(n,u),!("html"===l||s>1&&a+i.length*c+l.length>=d));)i.push(l),a+=l.length,n=n.parentNode;return i.reverse().join(o)}catch(t){return"<unknown>"}}function _e(t,e){const n=t,r=[];let i,s,a,o,c;if(!n||!n.tagName)return"";r.push(n.tagName.toLowerCase());const l=e&&e.length?e.filter(t=>n.getAttribute(t)).map(t=>[t,n.getAttribute(t)]):null;if(l&&l.length)l.forEach(t=>{r.push(`[${t[0]}="${t[1]}"]`)});else if(n.id&&r.push(`#${n.id}`),i=n.className,i&&te(i))for(s=i.split(/\s+/),c=0;c<s.length;c++)r.push(`.${s[c]}`);const u=["aria-label","type","name","title","alt"];for(c=0;c<u.length;c++)a=u[c],o=n.getAttribute(a),o&&r.push(`[${a}="${o}"]`);return r.join("")}class me extends Error{constructor(t,e="warn"){super(t),this.message=t,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=e}}const ge=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function ye(t,e=!1){const{host:n,path:r,pass:i,port:s,projectId:a,protocol:o,publicKey:c}=t;return`${o}://${c}${e&&i?`:${i}`:""}@${n}${s?`:${s}`:""}/${r?`${r}/`:r}${a}`}function ve(t){return{protocol:t.protocol,publicKey:t.publicKey||"",pass:t.pass||"",host:t.host,port:t.port||"",path:t.path||"",projectId:t.projectId}}function be(t){const e="string"==typeof t?function(t){const e=ge.exec(t);if(!e)throw new me(`Invalid Sentry Dsn: ${t}`);const[n,r,i="",s,a="",o]=e.slice(1);let c="",l=o;const u=l.split("/");if(u.length>1&&(c=u.slice(0,-1).join("/"),l=u.pop()),l){const t=l.match(/^\d+/);t&&(l=t[0])}return ve({host:s,pass:i,path:c,projectId:l,port:a,protocol:n,publicKey:r})}(t):ve(t);return function(t){if("undefined"!=typeof __SENTRY_DEBUG__&&!__SENTRY_DEBUG__)return;const{port:e,projectId:n,protocol:r}=t;if(["protocol","publicKey","host","projectId"].forEach(e=>{if(!t[e])throw new me(`Invalid Sentry Dsn: ${e} missing`)}),!n.match(/^\d+$/))throw new me(`Invalid Sentry Dsn: Invalid projectId ${n}`);if(!function(t){return"http"===t||"https"===t}(r))throw new me(`Invalid Sentry Dsn: Invalid protocol ${r}`);if(e&&isNaN(parseInt(e,10)))throw new me(`Invalid Sentry Dsn: Invalid port ${e}`)}(e),e}const Ee=["debug","info","warn","error","log","assert","trace"];function Se(t){if(!("console"in le))return t();const e=le.console,n={};Ee.forEach(t=>{const r=e[t]&&e[t].__sentry_original__;t in e&&r&&(n[t]=e[t],e[t]=r)});try{return t()}finally{Object.keys(n).forEach(t=>{e[t]=n[t]})}}function we(){let t=!1;const e={enable:()=>{t=!0},disable:()=>{t=!1}};return"undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__?Ee.forEach(n=>{e[n]=(...e)=>{t&&Se(()=>{le.console[n](`Sentry Logger [${n}]:`,...e)})}}):Ee.forEach(t=>{e[t]=()=>{}}),e}let ke;function Te(t,e=0){return"string"!=typeof t||0===e||t.length<=e?t:`${t.slice(0,e)}...`}function Ce(t,e){if(!Array.isArray(t))return"";const n=[];for(let e=0;e<t.length;e++){const r=t[e];try{n.push(String(r))}catch(t){n.push("[value cannot be serialized]")}}return n.join(e)}function xe(t,e=[],n=!1){return e.some(e=>function(t,e,n=!1){return!!te(t)&&(ie(e)?e.test(t):!!te(e)&&(n?t===e:t.includes(e)))}(t,e,n))}function Re(t,e,n){if(!(e in t))return;const r=t[e],i=n(r);if("function"==typeof i)try{Ne(i,r)}catch(t){}t[e]=i}function De(t,e,n){Object.defineProperty(t,e,{value:n,writable:!0,configurable:!0})}function Ne(t,e){t.prototype=e.prototype=e.prototype||{},De(t,"__sentry_original__",e)}function Ie(t){return t.__sentry_original__}function Ae(t){if(Xt(t))return{message:t.message,name:t.name,stack:t.stack,...Ue(t)};if(re(t)){const e={type:t.type,target:Oe(t.target),currentTarget:Oe(t.currentTarget),...Ue(t)};return"undefined"!=typeof CustomEvent&&oe(t,CustomEvent)&&(e.detail=t.detail),e}return t}function Oe(t){try{return"undefined"!=typeof Element&&oe(t,Element)?fe(t):Object.prototype.toString.call(t)}catch(t){return"<unknown>"}}function Ue(t){if("object"==typeof t&&null!==t){const e={};for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}return{}}function Be(t,e=40){const n=Object.keys(Ae(t));if(n.sort(),!n.length)return"[object has no keys]";if(n[0].length>=e)return Te(n[0],e);for(let t=n.length;t>0;t--){const r=n.slice(0,t).join(", ");if(!(r.length>e))return t===n.length?r:Te(r,e)}return""}function He(t){return Me(t,new Map)}function Me(t,e){if(ne(t)){const n=e.get(t);if(void 0!==n)return n;const r={};e.set(t,r);for(const n of Object.keys(t))void 0!==t[n]&&(r[n]=Me(t[n],e));return r}if(Array.isArray(t)){const n=e.get(t);if(void 0!==n)return n;const r=[];return e.set(t,r),t.forEach(t=>{r.push(Me(t,e))}),r}return t}ke="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__?de("logger",we):we();const Pe=/\(error: (.*)\)/;function Le(...t){const e=t.sort((t,e)=>t[0]-e[0]).map(t=>t[1]);return(t,n=0)=>{const r=[],i=t.split("\n");for(let t=n;t<i.length;t++){const n=i[t];if(n.length>1024)continue;const s=Pe.test(n)?n.replace(Pe,"$1"):n;if(!s.match(/\S*Error: /)){for(const t of e){const e=t(s);if(e){r.push(e);break}}if(r.length>=50)break}}return function(t){if(!t.length)return[];const e=t.slice(0,50),n=e[e.length-1].function;n&&/sentryWrapped/.test(n)&&e.pop(),e.reverse();const r=e[e.length-1].function;return r&&/captureMessage|captureException/.test(r)&&e.pop(),e.map(t=>({...t,filename:t.filename||e[e.length-1].filename,function:t.function||"?"}))}(r)}}const $e="<anonymous>";function ze(t){try{return t&&"function"==typeof t&&t.name||$e}catch(t){return $e}}const Ge=ue();function Ye(){if(!("fetch"in Ge))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch(t){return!1}}function Fe(t){return t&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(t.toString())}const je=ue(),qe=ue(),Ve="__sentry_xhr_v2__",Ze={},We={};function Xe(t,e){Ze[t]=Ze[t]||[],Ze[t].push(e),function(t){if(!We[t])switch(We[t]=!0,t){case"console":"console"in qe&&Ee.forEach(function(t){t in qe.console&&Re(qe.console,t,function(e){return function(...n){Ke("console",{args:n,level:t}),e&&e.apply(qe.console,n)}})});break;case"dom":!function(){if(!("document"in qe))return;const t=Ke.bind(null,"dom"),e=sn(t,!0);qe.document.addEventListener("click",e,!1),qe.document.addEventListener("keypress",e,!1),["EventTarget","Node"].forEach(e=>{const n=qe[e]&&qe[e].prototype;n&&n.hasOwnProperty&&n.hasOwnProperty("addEventListener")&&(Re(n,"addEventListener",function(e){return function(n,r,i){if("click"===n||"keypress"==n)try{const r=this,s=r.__sentry_instrumentation_handlers__=r.__sentry_instrumentation_handlers__||{},a=s[n]=s[n]||{refCount:0};if(!a.handler){const r=sn(t);a.handler=r,e.call(this,n,r,i)}a.refCount++}catch(t){}return e.call(this,n,r,i)}}),Re(n,"removeEventListener",function(t){return function(e,n,r){if("click"===e||"keypress"==e)try{const n=this,i=n.__sentry_instrumentation_handlers__||{},s=i[e];s&&(s.refCount--,s.refCount<=0&&(t.call(this,e,s.handler,r),s.handler=void 0,delete i[e]),0===Object.keys(i).length&&delete n.__sentry_instrumentation_handlers__)}catch(t){}return t.call(this,e,n,r)}}))})}();break;case"xhr":!function(){if(!("XMLHttpRequest"in qe))return;const t=XMLHttpRequest.prototype;Re(t,"open",function(t){return function(...e){const n=e[1],r=this[Ve]={method:te(e[0])?e[0].toUpperCase():e[0],url:e[1],request_headers:{}};te(n)&&"POST"===r.method&&n.match(/sentry_key/)&&(this.__sentry_own_request__=!0);const i=()=>{const t=this[Ve];if(t&&4===this.readyState){try{t.status_code=this.status}catch(t){}Ke("xhr",{args:e,endTimestamp:Date.now(),startTimestamp:Date.now(),xhr:this})}};return"onreadystatechange"in this&&"function"==typeof this.onreadystatechange?Re(this,"onreadystatechange",function(t){return function(...e){return i(),t.apply(this,e)}}):this.addEventListener("readystatechange",i),Re(this,"setRequestHeader",function(t){return function(...e){const[n,r]=e,i=this[Ve];return i&&(i.request_headers[n.toLowerCase()]=r),t.apply(this,e)}}),t.apply(this,e)}}),Re(t,"send",function(t){return function(...e){const n=this[Ve];return n&&void 0!==e[0]&&(n.body=e[0]),Ke("xhr",{args:e,startTimestamp:Date.now(),xhr:this}),t.apply(this,e)}})}();break;case"fetch":(function(){if(!Ye())return!1;if(Fe(Ge.fetch))return!0;let t=!1;const e=Ge.document;if(e&&"function"==typeof e.createElement)try{const n=e.createElement("iframe");n.hidden=!0,e.head.appendChild(n),n.contentWindow&&n.contentWindow.fetch&&(t=Fe(n.contentWindow.fetch)),e.head.removeChild(n)}catch(t){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",t)}return t})()&&Re(qe,"fetch",function(t){return function(...e){const{method:n,url:r}=function(t){if(0===t.length)return{method:"GET",url:""};if(2===t.length){const[e,n]=t;return{url:Qe(e),method:Je(n,"method")?String(n.method).toUpperCase():"GET"}}const e=t[0];return{url:Qe(e),method:Je(e,"method")?String(e.method).toUpperCase():"GET"}}(e),i={args:e,fetchData:{method:n,url:r},startTimestamp:Date.now()};return Ke("fetch",{...i}),t.apply(qe,e).then(t=>(Ke("fetch",{...i,endTimestamp:Date.now(),response:t}),t),t=>{throw Ke("fetch",{...i,endTimestamp:Date.now(),error:t}),t})}});break;case"history":!function(){if(!function(){const t=je.chrome;return!(t&&t.app&&t.app.runtime||!("history"in je)||!je.history.pushState||!je.history.replaceState)}())return;const t=qe.onpopstate;function e(t){return function(...e){const n=e.length>2?e[2]:void 0;if(n){const t=tn,e=String(n);tn=e,Ke("history",{from:t,to:e})}return t.apply(this,e)}}qe.onpopstate=function(...e){const n=qe.location.href,r=tn;if(tn=n,Ke("history",{from:r,to:n}),t)try{return t.apply(this,e)}catch(t){}},Re(qe.history,"pushState",e),Re(qe.history,"replaceState",e)}();break;case"error":an=qe.onerror,qe.onerror=function(t,e,n,r,i){return Ke("error",{column:r,error:i,line:n,msg:t,url:e}),!(!an||an.__SENTRY_LOADER__)&&an.apply(this,arguments)},qe.onerror.__SENTRY_INSTRUMENTED__=!0;break;case"unhandledrejection":on=qe.onunhandledrejection,qe.onunhandledrejection=function(t){return Ke("unhandledrejection",t),!(on&&!on.__SENTRY_LOADER__)||on.apply(this,arguments)},qe.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0;break;default:("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.warn("unknown instrumentation type:",t)}}(t)}function Ke(t,e){if(t&&Ze[t])for(const n of Ze[t]||[])try{n(e)}catch(e){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.error(`Error while triggering instrumentation handler.\nType: ${t}\nName: ${ze(n)}\nError:`,e)}}function Je(t,e){return!!t&&"object"==typeof t&&!!t[e]}function Qe(t){return"string"==typeof t?t:t?Je(t,"url")?t.url:t.toString?t.toString():"":""}let tn;const en=1e3;let nn,rn;function sn(t,e=!1){return n=>{if(!n||rn===n)return;if(function(t){if("keypress"!==t.type)return!1;try{const e=t.target;if(!e||!e.tagName)return!0;if("INPUT"===e.tagName||"TEXTAREA"===e.tagName||e.isContentEditable)return!1}catch(t){}return!0}(n))return;const r="keypress"===n.type?"input":n.type;(void 0===nn||function(t,e){if(!t)return!0;if(t.type!==e.type)return!0;try{if(t.target!==e.target)return!0}catch(t){}return!1}(rn,n))&&(t({event:n,name:r,global:e}),rn=n),clearTimeout(nn),nn=qe.setTimeout(()=>{nn=void 0},en)}}let an=null,on=null;function cn(){const t=le.crypto||le.msCrypto;if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,"");const e=t&&t.getRandomValues?()=>t.getRandomValues(new Uint8Array(1))[0]:()=>16*Math.random();return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,t=>(t^(15&e())>>t/4).toString(16))}function ln(t){return t.exception&&t.exception.values?t.exception.values[0]:void 0}function un(t){const{message:e,event_id:n}=t;if(e)return e;const r=ln(t);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function dn(t,e,n){const r=t.exception=t.exception||{},i=r.values=r.values||[],s=i[0]=i[0]||{};s.value||(s.value=e||""),s.type||(s.type=n||"Error")}function pn(t,e){const n=ln(t);if(!n)return;const r=n.mechanism;if(n.mechanism={type:"generic",handled:!0,...r,...e},e&&"data"in e){const t={...r&&r.data,...e.data};n.mechanism.data=t}}function hn(t){if(t&&t.__sentry_captured__)return!0;try{De(t,"__sentry_captured__",!0)}catch(t){}return!1}function fn(t){return Array.isArray(t)?t:[t]}function _n(){return!("undefined"!=typeof __SENTRY_BROWSER_BUNDLE__&&__SENTRY_BROWSER_BUNDLE__)&&"[object process]"===Object.prototype.toString.call("undefined"!=typeof process?process:0)}function mn(t,e){return t.require(e)}function gn(e){let n;try{n=mn(t,e)}catch(e){}try{const{cwd:r}=mn(t,"process");n=mn(t,`${r()}/node_modules/${e}`)}catch(e){}return n}function yn(t,e=Infinity,n=Infinity){try{return bn("",t,e,n)}catch(t){return{ERROR:`**non-serializable** (${t})`}}}function vn(t,e=3,n=102400){const r=yn(t,e);return i=JSON.stringify(r),~-encodeURI(i).split(/%..|./).length>n?vn(t,e-1,n):r;var i}function bn(t,e,n=Infinity,r=Infinity,i=function(){const t="function"==typeof WeakSet,e=t?new WeakSet:[];return[function(n){if(t)return!!e.has(n)||(e.add(n),!1);for(let t=0;t<e.length;t++)if(e[t]===n)return!0;return e.push(n),!1},function(n){if(t)e.delete(n);else for(let t=0;t<e.length;t++)if(e[t]===n){e.splice(t,1);break}}]}()){const[s,a]=i;if(null===e||["number","boolean","string"].includes(typeof e)&&!ae(e))return e;const o=function(t,e){try{if("domain"===t&&e&&"object"==typeof e&&e._events)return"[Domain]";if("domainEmitter"===t)return"[DomainEmitter]";if(void 0!==commonjsGlobal&&e===commonjsGlobal)return"[Global]";if("undefined"!=typeof window&&e===window)return"[Window]";if("undefined"!=typeof document&&e===document)return"[Document]";if(ne(n=e)&&"nativeEvent"in n&&"preventDefault"in n&&"stopPropagation"in n)return"[SyntheticEvent]";if("number"==typeof e&&e!=e)return"[NaN]";if(void 0===e)return"[undefined]";if("function"==typeof e)return`[Function: ${ze(e)}]`;if("symbol"==typeof e)return`[${String(e)}]`;if("bigint"==typeof e)return`[BigInt: ${String(e)}]`;const r=function(t){const e=Object.getPrototypeOf(t);return e?e.constructor.name:"null prototype"}(e);return/^HTML(\w*)Element$/.test(r)?`[HTMLElement: ${r}]`:`[object ${r}]`}catch(t){return`**non-serializable** (${t})`}var n}(t,e);if(!o.startsWith("[object "))return o;if(e.__sentry_skip_normalization__)return e;let c=n;if("number"==typeof e.__sentry_override_normalization_depth__&&(c=e.__sentry_override_normalization_depth__),0===c)return o.replace("object ","");if(s(e))return"[Circular ~]";const l=e;if(l&&"function"==typeof l.toJSON)try{return bn("",l.toJSON(),c-1,r,i)}catch(t){}const u=Array.isArray(e)?[]:{};let d=0;const p=Ae(e);for(const t in p)if(Object.prototype.hasOwnProperty.call(p,t)){if(d>=r){u[t]="[MaxProperties ~]";break}u[t]=bn(t,p[t],c-1,r,i),d++}return a(e),u}var En;function Sn(t){return new kn(e=>{e(t)})}function wn(t){return new kn((e,n)=>{n(t)})}!function(t){t[t.PENDING=0]="PENDING",t[t.RESOLVED=1]="RESOLVED",t[t.REJECTED=2]="REJECTED"}(En||(En={}));class kn{__init(){this._state=En.PENDING}__init2(){this._handlers=[]}constructor(t){kn.prototype.__init.call(this),kn.prototype.__init2.call(this),kn.prototype.__init3.call(this),kn.prototype.__init4.call(this),kn.prototype.__init5.call(this),kn.prototype.__init6.call(this);try{t(this._resolve,this._reject)}catch(t){this._reject(t)}}then(t,e){return new kn((n,r)=>{this._handlers.push([!1,e=>{if(t)try{n(t(e))}catch(t){r(t)}else n(e)},t=>{if(e)try{n(e(t))}catch(t){r(t)}else r(t)}]),this._executeHandlers()})}catch(t){return this.then(t=>t,t)}finally(t){return new kn((e,n)=>{let r,i;return this.then(e=>{i=!1,r=e,t&&t()},e=>{i=!0,r=e,t&&t()}).then(()=>{i?n(r):e(r)})})}__init3(){this._resolve=t=>{this._setResult(En.RESOLVED,t)}}__init4(){this._reject=t=>{this._setResult(En.REJECTED,t)}}__init5(){this._setResult=(t,e)=>{this._state===En.PENDING&&(se(e)?e.then(this._resolve,this._reject):(this._state=t,this._value=e,this._executeHandlers()))}}__init6(){this._executeHandlers=()=>{if(this._state===En.PENDING)return;const t=this._handlers.slice();this._handlers=[],t.forEach(t=>{t[0]||(this._state===En.RESOLVED&&t[1](this._value),this._state===En.REJECTED&&t[2](this._value),t[0]=!0)})}}}function Tn(t){if(!t)return{};const e=t.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!e)return{};const n=e[6]||"",r=e[8]||"";return{host:e[4],path:e[5],protocol:e[2],search:n,hash:r,relative:e[5]+n+r}}function Cn(t){return t.split(/\\?\//).filter(t=>t.length>0&&","!==t).length}const xn=["fatal","error","warning","log","info","debug"],Rn=ue(),Dn={nowSeconds:()=>Date.now()/1e3},Nn=_n()?function(){try{return mn(t,"perf_hooks").performance}catch(t){return}}():function(){const{performance:t}=Rn;if(t&&t.now)return{now:()=>t.now(),timeOrigin:Date.now()-t.now()}}(),In=void 0===Nn?Dn:{nowSeconds:()=>(Nn.timeOrigin+Nn.now())/1e3},An=Dn.nowSeconds.bind(Dn),On=In.nowSeconds.bind(In),Un=(()=>{const{performance:t}=Rn;if(!t||!t.now)return;const e=36e5,n=t.now(),r=Date.now(),i=t.timeOrigin?Math.abs(t.timeOrigin+n-r):e,s=i<e,a=t.timing&&t.timing.navigationStart,o="number"==typeof a?Math.abs(a+n-r):e;return s||o<e?i<=o?t.timeOrigin:a:r})(),Bn=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function Hn(t,e=[]){return[t,e]}function Mn(t,e){const[n,r]=t;return[n,[...r,e]]}function Pn(t,e){const n=t[1];for(const t of n)if(e(t,t[0].type))return!0;return!1}function Ln(t,e){return(e||new TextEncoder).encode(t)}function $n(t,e){const[n,r]=t;let i=JSON.stringify(n);function s(t){"string"==typeof i?i="string"==typeof t?i+t:[Ln(i,e),t]:i.push("string"==typeof t?Ln(t,e):t)}for(const t of r){const[n,r]=t;if(s(`\n${JSON.stringify(n)}\n`),"string"==typeof r||r instanceof Uint8Array)s(r);else{let t;try{t=JSON.stringify(r)}catch(e){t=JSON.stringify(yn(r))}s(t)}}return"string"==typeof i?i:function(t){const e=t.reduce((t,e)=>t+e.length,0),n=new Uint8Array(e);let r=0;for(const e of t)n.set(e,r),r+=e.length;return n}(i)}function zn(t,e){const n="string"==typeof t.data?Ln(t.data,e):t.data;return[He({type:"attachment",length:n.length,filename:t.filename,content_type:t.contentType,attachment_type:t.attachmentType}),n]}const Gn={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor"};function Yn(t){return Gn[t]}function Fn(t){if(!t||!t.sdk)return;const{name:e,version:n}=t.sdk;return{name:e,version:n}}function jn(t,e,n,r){const i=t.sdkProcessingMetadata&&t.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:t.event_id,sent_at:(new Date).toISOString(),...e&&{sdk:e},...!!n&&{dsn:ye(r)},...i&&{trace:He({...i})}}}const qn=6e4,Vn="baggage",Zn=/^sentry-/;function Wn(t){return function(t){if(0!==Object.keys(t).length)return Object.entries(t).reduce((t,[e,n],r)=>{const i=`${encodeURIComponent(e)}=${encodeURIComponent(n)}`,s=0===r?i:`${t},${i}`;return s.length>8192?(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.warn(`Not adding key: ${e} with val: ${n} to baggage header due to exceeding baggage size limits.`),t):s},"")}(Object.entries(t).reduce((t,[e,n])=>(n&&(t[`sentry-${e}`]=n),t),{}))}function Xn(t){return t.split(",").map(t=>t.split("=").map(t=>decodeURIComponent(t.trim()))).reduce((t,[e,n])=>(t[e]=n,t),{})}const Kn="production";function Jn(t,e={}){if(e.user&&(!t.ipAddress&&e.user.ip_address&&(t.ipAddress=e.user.ip_address),t.did||e.did||(t.did=e.user.id||e.user.email||e.user.username)),t.timestamp=e.timestamp||On(),e.ignoreDuration&&(t.ignoreDuration=e.ignoreDuration),e.sid&&(t.sid=32===e.sid.length?e.sid:cn()),void 0!==e.init&&(t.init=e.init),!t.did&&e.did&&(t.did=`${e.did}`),"number"==typeof e.started&&(t.started=e.started),t.ignoreDuration)t.duration=void 0;else if("number"==typeof e.duration)t.duration=e.duration;else{const e=t.timestamp-t.started;t.duration=e>=0?e:0}e.release&&(t.release=e.release),e.environment&&(t.environment=e.environment),!t.ipAddress&&e.ipAddress&&(t.ipAddress=e.ipAddress),!t.userAgent&&e.userAgent&&(t.userAgent=e.userAgent),"number"==typeof e.errors&&(t.errors=e.errors),e.status&&(t.status=e.status)}class Qn{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={}}static clone(t){const e=new Qn;return t&&(e._breadcrumbs=[...t._breadcrumbs],e._tags={...t._tags},e._extra={...t._extra},e._contexts={...t._contexts},e._user=t._user,e._level=t._level,e._span=t._span,e._session=t._session,e._transactionName=t._transactionName,e._fingerprint=t._fingerprint,e._eventProcessors=[...t._eventProcessors],e._requestSession=t._requestSession,e._attachments=[...t._attachments],e._sdkProcessingMetadata={...t._sdkProcessingMetadata}),e}addScopeListener(t){this._scopeListeners.push(t)}addEventProcessor(t){return this._eventProcessors.push(t),this}setUser(t){return this._user=t||{},this._session&&Jn(this._session,{user:t}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(t){return this._requestSession=t,this}setTags(t){return this._tags={...this._tags,...t},this._notifyScopeListeners(),this}setTag(t,e){return this._tags={...this._tags,[t]:e},this._notifyScopeListeners(),this}setExtras(t){return this._extra={...this._extra,...t},this._notifyScopeListeners(),this}setExtra(t,e){return this._extra={...this._extra,[t]:e},this._notifyScopeListeners(),this}setFingerprint(t){return this._fingerprint=t,this._notifyScopeListeners(),this}setLevel(t){return this._level=t,this._notifyScopeListeners(),this}setTransactionName(t){return this._transactionName=t,this._notifyScopeListeners(),this}setContext(t,e){return null===e?delete this._contexts[t]:this._contexts[t]=e,this._notifyScopeListeners(),this}setSpan(t){return this._span=t,this._notifyScopeListeners(),this}getSpan(){return this._span}getTransaction(){const t=this.getSpan();return t&&t.transaction}setSession(t){return t?this._session=t:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(t){if(!t)return this;if("function"==typeof t){const e=t(this);return e instanceof Qn?e:this}return t instanceof Qn?(this._tags={...this._tags,...t._tags},this._extra={...this._extra,...t._extra},this._contexts={...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)):ne(t)&&(this._tags={...this._tags,...t.tags},this._extra={...this._extra,...t.extra},this._contexts={...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)),this}clear(){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}addBreadcrumb(t,e){const n="number"==typeof e?e:100;if(n<=0)return this;const r={timestamp:An(),...t};return this._breadcrumbs=[...this._breadcrumbs,r].slice(-n),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(t){return this._attachments.push(t),this}getAttachments(){return this._attachments}clearAttachments(){return this._attachments=[],this}applyToEvent(t,e={}){if(this._extra&&Object.keys(this._extra).length&&(t.extra={...this._extra,...t.extra}),this._tags&&Object.keys(this._tags).length&&(t.tags={...this._tags,...t.tags}),this._user&&Object.keys(this._user).length&&(t.user={...this._user,...t.user}),this._contexts&&Object.keys(this._contexts).length&&(t.contexts={...this._contexts,...t.contexts}),this._level&&(t.level=this._level),this._transactionName&&(t.transaction=this._transactionName),this._span){t.contexts={trace:this._span.getTraceContext(),...t.contexts};const e=this._span.transaction;if(e){t.sdkProcessingMetadata={dynamicSamplingContext:e.getDynamicSamplingContext(),...t.sdkProcessingMetadata};const n=e.name;n&&(t.tags={transaction:n,...t.tags})}}return this._applyFingerprint(t),t.breadcrumbs=[...t.breadcrumbs||[],...this._breadcrumbs],t.breadcrumbs=t.breadcrumbs.length>0?t.breadcrumbs:void 0,t.sdkProcessingMetadata={...t.sdkProcessingMetadata,...this._sdkProcessingMetadata},this._notifyEventProcessors([...tr(),...this._eventProcessors],t,e)}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata={...this._sdkProcessingMetadata,...t},this}_notifyEventProcessors(t,e,n,r=0){return new kn((i,s)=>{const a=t[r];if(null===e||"function"!=typeof a)i(e);else{const o=a({...e},n);("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&a.id&&null===o&&ke.log(`Event processor "${a.id}" dropped event`),se(o)?o.then(e=>this._notifyEventProcessors(t,e,n,r+1).then(i)).then(null,s):this._notifyEventProcessors(t,o,n,r+1).then(i).then(null,s)}})}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(t=>{t(this)}),this._notifyingListeners=!1)}_applyFingerprint(t){t.fingerprint=t.fingerprint?fn(t.fingerprint):[],this._fingerprint&&(t.fingerprint=t.fingerprint.concat(this._fingerprint)),t.fingerprint&&!t.fingerprint.length&&delete t.fingerprint}}function tr(){return de("globalEventProcessors",()=>[])}function er(t){tr().push(t)}const nr=4,rr=100;class ir{constructor(t,e=new Qn,n=nr){this._version=n,this._stack=[{scope:e}],t&&this.bindClient(t)}isOlderThan(t){return this._version<t}bindClient(t){this.getStackTop().client=t,t&&t.setupIntegrations&&t.setupIntegrations()}pushScope(){const t=Qn.clone(this.getScope());return this.getStack().push({client:this.getClient(),scope:t}),t}popScope(){return!(this.getStack().length<=1||!this.getStack().pop())}withScope(t){const e=this.pushScope();try{t(e)}finally{this.popScope()}}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getStack(){return this._stack}getStackTop(){return this._stack[this._stack.length-1]}captureException(t,e){const n=this._lastEventId=e&&e.event_id?e.event_id:cn(),r=new Error("Sentry syntheticException");return this._withClient((i,s)=>{i.captureException(t,{originalException:t,syntheticException:r,...e,event_id:n},s)}),n}captureMessage(t,e,n){const r=this._lastEventId=n&&n.event_id?n.event_id:cn(),i=new Error(t);return this._withClient((s,a)=>{s.captureMessage(t,e,{originalException:t,syntheticException:i,...n,event_id:r},a)}),r}captureEvent(t,e){const n=e&&e.event_id?e.event_id:cn();return t.type||(this._lastEventId=n),this._withClient((r,i)=>{r.captureEvent(t,{...e,event_id:n},i)}),n}lastEventId(){return this._lastEventId}addBreadcrumb(t,e){const{scope:n,client:r}=this.getStackTop();if(!r)return;const{beforeBreadcrumb:i=null,maxBreadcrumbs:s=rr}=r.getOptions&&r.getOptions()||{};if(s<=0)return;const a={timestamp:An(),...t},o=i?Se(()=>i(a,e)):a;null!==o&&(r.emit&&r.emit("beforeAddBreadcrumb",o,e),n.addBreadcrumb(o,s))}setUser(t){this.getScope().setUser(t)}setTags(t){this.getScope().setTags(t)}setExtras(t){this.getScope().setExtras(t)}setTag(t,e){this.getScope().setTag(t,e)}setExtra(t,e){this.getScope().setExtra(t,e)}setContext(t,e){this.getScope().setContext(t,e)}configureScope(t){const{scope:e,client:n}=this.getStackTop();n&&t(e)}run(t){const e=ar(this);try{t(this)}finally{ar(e)}}getIntegration(t){const e=this.getClient();if(!e)return null;try{return e.getIntegration(t)}catch(e){return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.warn(`Cannot retrieve integration ${t.id} from the current Hub`),null}}startTransaction(t,e){const n=this._callExtensionMethod("startTransaction",t,e);return"undefined"!=typeof __SENTRY_DEBUG__&&!__SENTRY_DEBUG__||n||console.warn("Tracing extension 'startTransaction' has not been added. Call 'addTracingExtensions' before calling 'init':\nSentry.addTracingExtensions();\nSentry.init({...});\n"),n}traceHeaders(){return this._callExtensionMethod("traceHeaders")}captureSession(t=!1){if(t)return this.endSession();this._sendSessionUpdate()}endSession(){const t=this.getStackTop().scope,e=t.getSession();e&&function(t,e){let n={};"ok"===t.status&&(n={status:"exited"}),Jn(t,n)}(e),this._sendSessionUpdate(),t.setSession()}startSession(t){const{scope:e,client:n}=this.getStackTop(),{release:r,environment:i=Kn}=n&&n.getOptions()||{},{userAgent:s}=le.navigator||{},a=function(t){const e=On(),n={sid:cn(),init:!0,timestamp:e,started:e,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>function(t){return He({sid:`${t.sid}`,init:t.init,started:new Date(1e3*t.started).toISOString(),timestamp:new Date(1e3*t.timestamp).toISOString(),status:t.status,errors:t.errors,did:"number"==typeof t.did||"string"==typeof t.did?`${t.did}`:void 0,duration:t.duration,attrs:{release:t.release,environment:t.environment,ip_address:t.ipAddress,user_agent:t.userAgent}})}(n)};return t&&Jn(n,t),n}({release:r,environment:i,user:e.getUser(),...s&&{userAgent:s},...t}),o=e.getSession&&e.getSession();return o&&"ok"===o.status&&Jn(o,{status:"exited"}),this.endSession(),e.setSession(a),a}shouldSendDefaultPii(){const t=this.getClient(),e=t&&t.getOptions();return Boolean(e&&e.sendDefaultPii)}_sendSessionUpdate(){const{scope:t,client:e}=this.getStackTop(),n=t.getSession();n&&e&&e.captureSession&&e.captureSession(n)}_withClient(t){const{scope:e,client:n}=this.getStackTop();n&&t(n,e)}_callExtensionMethod(t,...e){const n=sr().__SENTRY__;if(n&&n.extensions&&"function"==typeof n.extensions[t])return n.extensions[t].apply(this,e);("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.warn(`Extension method ${t} couldn't be found, doing nothing.`)}}function sr(){return le.__SENTRY__=le.__SENTRY__||{extensions:{},hub:void 0},le}function ar(t){const e=sr(),n=cr(e);return lr(e,t),n}function or(){const t=sr();if(t.__SENTRY__&&t.__SENTRY__.acs){const e=t.__SENTRY__.acs.getCurrentHub();if(e)return e}return function(t=sr()){var e;return(e=t)&&e.__SENTRY__&&e.__SENTRY__.hub&&!cr(t).isOlderThan(nr)||lr(t,new ir),cr(t)}(t)}function cr(t){return de("hub",()=>new ir,t)}function lr(t,e){return!!t&&((t.__SENTRY__=t.__SENTRY__||{}).hub=e,!0)}function ur(t){if("boolean"==typeof __SENTRY_TRACING__&&!__SENTRY_TRACING__)return!1;const e=or().getClient(),n=t||e&&e.getOptions();return!!n&&(n.enableTracing||"tracesSampleRate"in n||"tracesSampler"in n)}function dr(t){return(t||or()).getScope().getTransaction()}let pr=!1;function hr(){const t=dr();if(t){const e="internal_error";("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.log(`[Tracing] Transaction: ${e} -> Global error occured`),t.setStatus(e)}}hr.tag="sentry_tracingErrorCallback";class fr{__init(){this.spans=[]}constructor(t=1e3){fr.prototype.__init.call(this),this._maxlen=t}add(t){this.spans.length>this._maxlen?t.spanRecorder=void 0:this.spans.push(t)}}class _r{__init2(){this.traceId=cn()}__init3(){this.spanId=cn().substring(16)}__init4(){this.startTimestamp=On()}__init5(){this.tags={}}__init6(){this.data={}}__init7(){this.instrumenter="sentry"}constructor(t){if(_r.prototype.__init2.call(this),_r.prototype.__init3.call(this),_r.prototype.__init4.call(this),_r.prototype.__init5.call(this),_r.prototype.__init6.call(this),_r.prototype.__init7.call(this),!t)return this;t.traceId&&(this.traceId=t.traceId),t.spanId&&(this.spanId=t.spanId),t.parentSpanId&&(this.parentSpanId=t.parentSpanId),"sampled"in t&&(this.sampled=t.sampled),t.op&&(this.op=t.op),t.description&&(this.description=t.description),t.data&&(this.data=t.data),t.tags&&(this.tags=t.tags),t.status&&(this.status=t.status),t.startTimestamp&&(this.startTimestamp=t.startTimestamp),t.endTimestamp&&(this.endTimestamp=t.endTimestamp),t.instrumenter&&(this.instrumenter=t.instrumenter)}startChild(t){const e=new _r({...t,parentSpanId:this.spanId,sampled:this.sampled,traceId:this.traceId});if(e.spanRecorder=this.spanRecorder,e.spanRecorder&&e.spanRecorder.add(e),e.transaction=this.transaction,("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&e.transaction){const n=`[Tracing] Starting '${t&&t.op||"< unknown op >"}' span on transaction '${e.transaction.name||"< unknown name >"}' (${e.transaction.spanId}).`;e.transaction.metadata.spanMetadata[e.spanId]={logMessage:n},ke.log(n)}return e}setTag(t,e){return this.tags={...this.tags,[t]:e},this}setData(t,e){return this.data={...this.data,[t]:e},this}setStatus(t){return this.status=t,this}setHttpStatus(t){this.setTag("http.status_code",String(t));const e=function(t){if(t<400&&t>=100)return"ok";if(t>=400&&t<500)switch(t){case 401:return"unauthenticated";case 403:return"permission_denied";case 404:return"not_found";case 409:return"already_exists";case 413:return"failed_precondition";case 429:return"resource_exhausted";default:return"invalid_argument"}if(t>=500&&t<600)switch(t){case 501:return"unimplemented";case 503:return"unavailable";case 504:return"deadline_exceeded";default:return"internal_error"}return"unknown_error"}(t);return"unknown_error"!==e&&this.setStatus(e),this}isSuccess(){return"ok"===this.status}finish(t){if(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&this.transaction&&this.transaction.spanId!==this.spanId){const{logMessage:t}=this.transaction.metadata.spanMetadata[this.spanId];t&&ke.log(t.replace("Starting","Finishing"))}this.endTimestamp="number"==typeof t?t:On()}toTraceparent(){let t="";return void 0!==this.sampled&&(t=this.sampled?"-1":"-0"),`${this.traceId}-${this.spanId}${t}`}toContext(){return He({data:this.data,description:this.description,endTimestamp:this.endTimestamp,op:this.op,parentSpanId:this.parentSpanId,sampled:this.sampled,spanId:this.spanId,startTimestamp:this.startTimestamp,status:this.status,tags:this.tags,traceId:this.traceId})}updateWithContext(t){return this.data=t.data||{},this.description=t.description,this.endTimestamp=t.endTimestamp,this.op=t.op,this.parentSpanId=t.parentSpanId,this.sampled=t.sampled,this.spanId=t.spanId||this.spanId,this.startTimestamp=t.startTimestamp||this.startTimestamp,this.status=t.status,this.tags=t.tags||{},this.traceId=t.traceId||this.traceId,this}getTraceContext(){return He({data:Object.keys(this.data).length>0?this.data:void 0,description:this.description,op:this.op,parent_span_id:this.parentSpanId,span_id:this.spanId,status:this.status,tags:Object.keys(this.tags).length>0?this.tags:void 0,trace_id:this.traceId})}toJSON(){return He({data:Object.keys(this.data).length>0?this.data:void 0,description:this.description,op:this.op,parent_span_id:this.parentSpanId,span_id:this.spanId,start_timestamp:this.startTimestamp,status:this.status,tags:Object.keys(this.tags).length>0?this.tags:void 0,timestamp:this.endTimestamp,trace_id:this.traceId})}}class mr extends _r{__init(){this._measurements={}}__init2(){this._contexts={}}__init3(){this._frozenDynamicSamplingContext=void 0}constructor(t,e){super(t),mr.prototype.__init.call(this),mr.prototype.__init2.call(this),mr.prototype.__init3.call(this),this._hub=e||or(),this._name=t.name||"",this.metadata={source:"custom",...t.metadata,spanMetadata:{}},this._trimEnd=t.trimEnd,this.transaction=this;const n=this.metadata.dynamicSamplingContext;n&&(this._frozenDynamicSamplingContext={...n})}get name(){return this._name}set name(t){this.setName(t)}setName(t,e="custom"){this._name=t,this.metadata.source=e}initSpanRecorder(t=1e3){this.spanRecorder||(this.spanRecorder=new fr(t)),this.spanRecorder.add(this)}setContext(t,e){null===e?delete this._contexts[t]:this._contexts[t]=e}setMeasurement(t,e,n=""){this._measurements[t]={value:e,unit:n}}setMetadata(t){this.metadata={...this.metadata,...t}}finish(t){if(void 0!==this.endTimestamp)return;this.name||(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this.name="<unlabeled transaction>"),super.finish(t);const e=this._hub.getClient();if(e&&e.emit&&e.emit("finishTransaction",this),!0!==this.sampled)return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.log("[Tracing] Discarding transaction because its trace was not chosen to be sampled."),void(e&&e.recordDroppedEvent("sample_rate","transaction"));const n=this.spanRecorder?this.spanRecorder.spans.filter(t=>t!==this&&t.endTimestamp):[];this._trimEnd&&n.length>0&&(this.endTimestamp=n.reduce((t,e)=>t.endTimestamp&&e.endTimestamp?t.endTimestamp>e.endTimestamp?t:e:t).endTimestamp);const r=this.metadata,i={contexts:{...this._contexts,trace:this.getTraceContext()},spans:n,start_timestamp:this.startTimestamp,tags:this.tags,timestamp:this.endTimestamp,transaction:this.name,type:"transaction",sdkProcessingMetadata:{...r,dynamicSamplingContext:this.getDynamicSamplingContext()},...r.source&&{transaction_info:{source:r.source}}};return Object.keys(this._measurements).length>0&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.log("[Measurements] Adding measurements to transaction",JSON.stringify(this._measurements,void 0,2)),i.measurements=this._measurements),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.log(`[Tracing] Finishing ${this.op} transaction: ${this.name}.`),this._hub.captureEvent(i)}toContext(){return He({...super.toContext(),name:this.name,trimEnd:this._trimEnd})}updateWithContext(t){return super.updateWithContext(t),this.name=t.name||"",this._trimEnd=t.trimEnd,this}getDynamicSamplingContext(){if(this._frozenDynamicSamplingContext)return this._frozenDynamicSamplingContext;const t=this._hub||or(),e=t&&t.getClient();if(!e)return{};const{environment:n,release:r}=e.getOptions()||{},{publicKey:i}=e.getDsn()||{},s=this.metadata.sampleRate,a=void 0!==s?s.toString():void 0,{segment:o}=t.getScope().getUser()||{},c=this.metadata.source,l=He({environment:n||Kn,release:r,transaction:c&&"url"!==c?this.name:void 0,user_segment:o,public_key:i,trace_id:this.traceId,sample_rate:a});return e.emit&&e.emit("createDsc",l),l}setHub(t){this._hub=t}}const gr={idleTimeout:1e3,finalTimeout:3e4,heartbeatInterval:5e3},yr=["heartbeatFailed","idleTimeout","documentHidden","finalTimeout","externalFinish","cancelled"];class vr extends fr{constructor(t,e,n,r){super(r),this._pushActivity=t,this._popActivity=e,this.transactionSpanId=n}add(t){t.spanId!==this.transactionSpanId&&(t.finish=e=>{t.endTimestamp="number"==typeof e?e:On(),this._popActivity(t.spanId)},void 0===t.endTimestamp&&this._pushActivity(t.spanId)),super.add(t)}}class br extends mr{__init(){this.activities={}}__init2(){this._heartbeatCounter=0}__init3(){this._finished=!1}__init4(){this._idleTimeoutCanceledPermanently=!1}__init5(){this._beforeFinishCallbacks=[]}__init6(){this._finishReason=yr[4]}constructor(t,e,n=gr.idleTimeout,r=gr.finalTimeout,i=gr.heartbeatInterval,s=!1){super(t,e),this._idleHub=e,this._idleTimeout=n,this._finalTimeout=r,this._heartbeatInterval=i,this._onScope=s,br.prototype.__init.call(this),br.prototype.__init2.call(this),br.prototype.__init3.call(this),br.prototype.__init4.call(this),br.prototype.__init5.call(this),br.prototype.__init6.call(this),s&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.log(`Setting idle transaction on scope. Span ID: ${this.spanId}`),e.configureScope(t=>t.setSpan(this))),this._restartIdleTimeout(),setTimeout(()=>{this._finished||(this.setStatus("deadline_exceeded"),this._finishReason=yr[3],this.finish())},this._finalTimeout)}finish(t=On()){if(this._finished=!0,this.activities={},"ui.action.click"===this.op&&this.setTag("finishReason",this._finishReason),this.spanRecorder){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.log("[Tracing] finishing IdleTransaction",new Date(1e3*t).toISOString(),this.op);for(const e of this._beforeFinishCallbacks)e(this,t);this.spanRecorder.spans=this.spanRecorder.spans.filter(e=>{if(e.spanId===this.spanId)return!0;e.endTimestamp||(e.endTimestamp=t,e.setStatus("cancelled"),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.log("[Tracing] cancelling span since transaction ended early",JSON.stringify(e,void 0,2)));const n=e.startTimestamp<t;return n||("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.log("[Tracing] discarding Span since it happened after Transaction was finished",JSON.stringify(e,void 0,2)),n}),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.log("[Tracing] flushing IdleTransaction")}else("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.log("[Tracing] No active IdleTransaction");if(this._onScope){const t=this._idleHub.getScope();t.getTransaction()===this&&t.setSpan(void 0)}return super.finish(t)}registerBeforeFinishCallback(t){this._beforeFinishCallbacks.push(t)}initSpanRecorder(t){this.spanRecorder||(this.spanRecorder=new vr(t=>{this._finished||this._pushActivity(t)},t=>{this._finished||this._popActivity(t)},this.spanId,t),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.log("Starting heartbeat"),this._pingHeartbeat()),this.spanRecorder.add(this)}cancelIdleTimeout(t,{restartOnChildSpanChange:e}={restartOnChildSpanChange:!0}){this._idleTimeoutCanceledPermanently=!1===e,this._idleTimeoutID&&(clearTimeout(this._idleTimeoutID),this._idleTimeoutID=void 0,0===Object.keys(this.activities).length&&this._idleTimeoutCanceledPermanently&&(this._finishReason=yr[5],this.finish(t)))}setFinishReason(t){this._finishReason=t}_restartIdleTimeout(t){this.cancelIdleTimeout(),this._idleTimeoutID=setTimeout(()=>{this._finished||0!==Object.keys(this.activities).length||(this._finishReason=yr[1],this.finish(t))},this._idleTimeout)}_pushActivity(t){this.cancelIdleTimeout(void 0,{restartOnChildSpanChange:!this._idleTimeoutCanceledPermanently}),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.log(`[Tracing] pushActivity: ${t}`),this.activities[t]=!0,("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.log("[Tracing] new activities count",Object.keys(this.activities).length)}_popActivity(t){if(this.activities[t]&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.log(`[Tracing] popActivity ${t}`),delete this.activities[t],("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.log("[Tracing] new activities count",Object.keys(this.activities).length)),0===Object.keys(this.activities).length){const t=On();this._idleTimeoutCanceledPermanently?(this._finishReason=yr[5],this.finish(t)):this._restartIdleTimeout(t+this._idleTimeout/1e3)}}_beat(){if(this._finished)return;const t=Object.keys(this.activities).join("");t===this._prevHeartbeatString?this._heartbeatCounter++:this._heartbeatCounter=1,this._prevHeartbeatString=t,this._heartbeatCounter>=3?(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.log("[Tracing] Transaction finished because of no change for 3 heart beats"),this.setStatus("deadline_exceeded"),this._finishReason=yr[0],this.finish()):this._pingHeartbeat()}_pingHeartbeat(){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.log(`pinging Heartbeat -> current counter: ${this._heartbeatCounter}`),setTimeout(()=>{this._beat()},this._heartbeatInterval)}}function Er(){const t=this.getScope().getSpan();return t?{"sentry-trace":t.toTraceparent()}:{}}function Sr(t,e,n){if(!ur(e))return t.sampled=!1,t;if(void 0!==t.sampled)return t.setMetadata({sampleRate:Number(t.sampled)}),t;let r;return"function"==typeof e.tracesSampler?(r=e.tracesSampler(n),t.setMetadata({sampleRate:Number(r)})):void 0!==n.parentSampled?r=n.parentSampled:void 0!==e.tracesSampleRate?(r=e.tracesSampleRate,t.setMetadata({sampleRate:Number(r)})):(r=1,t.setMetadata({sampleRate:r})),(ae(i=r)||"number"!=typeof i&&"boolean"!=typeof i?(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.warn(`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(i)} of type ${JSON.stringify(typeof i)}.`),0):!(i<0||i>1)||(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.warn(`[Tracing] Given sample rate is invalid. Sample rate must be between 0 and 1. Got ${i}.`),0))?r?(t.sampled=Math.random()<r,t.sampled?(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.log(`[Tracing] starting ${t.op} transaction - ${t.name}`),t):(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(r)})`),t)):(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.log("[Tracing] Discarding transaction because "+("function"==typeof e.tracesSampler?"tracesSampler returned 0 or false":"a negative sampling decision was inherited or tracesSampleRate is set to 0")),t.sampled=!1,t):(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.warn("[Tracing] Discarding transaction because of invalid sample rate."),t.sampled=!1,t);var i}function wr(t,e){const n=this.getClient(),r=n&&n.getOptions()||{},i=r.instrumenter||"sentry",s=t.instrumenter||"sentry";i!==s&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.error(`A transaction was started with instrumenter=\`${s}\`, but the SDK is configured with the \`${i}\` instrumenter.\nThe transaction will not be sampled. Please use the ${i} instrumentation to start transactions.`),t.sampled=!1);let a=new mr(t,this);return a=Sr(a,r,{parentSampled:t.parentSampled,transactionContext:t,...e}),a.sampled&&a.initSpanRecorder(r._experiments&&r._experiments.maxSpans),n&&n.emit&&n.emit("startTransaction",a),a}function kr(t,e,n,r,i,s,a){const o=t.getClient(),c=o&&o.getOptions()||{};let l=new br(e,t,n,r,a,i);return l=Sr(l,c,{parentSampled:e.parentSampled,transactionContext:e,...s}),l.sampled&&l.initSpanRecorder(c._experiments&&c._experiments.maxSpans),o&&o.emit&&o.emit("startTransaction",l),l}function Tr(){const t=sr();t.__SENTRY__&&(t.__SENTRY__.extensions=t.__SENTRY__.extensions||{},t.__SENTRY__.extensions.startTransaction||(t.__SENTRY__.extensions.startTransaction=wr),t.__SENTRY__.extensions.traceHeaders||(t.__SENTRY__.extensions.traceHeaders=Er),pr||(pr=!0,Xe("error",hr),Xe("unhandledrejection",hr)))}function Cr(t,e){return or().captureException(t,{captureContext:e})}function xr(t){or().withScope(t)}function Rr(t){return`${t.protocol?`${t.protocol}:`:""}//${t.host}${t.port?`:${t.port}`:""}${t.path?`/${t.path}`:""}/api/`}const Dr=[];function Nr(t){const e=t.defaultIntegrations||[],n=t.integrations;let r;e.forEach(t=>{t.isDefaultInstance=!0}),r=Array.isArray(n)?[...e,...n]:"function"==typeof n?fn(n(e)):e;const i=function(t){const e={};return t.forEach(t=>{const{name:n}=t,r=e[n];r&&!r.isDefaultInstance&&t.isDefaultInstance||(e[n]=t)}),Object.keys(e).map(t=>e[t])}(r),s=function(t,e){for(let e=0;e<t.length;e++)if(1==("Debug"===t[e].name))return e;return-1}(i);if(-1!==s){const[t]=i.splice(s,1);i.push(t)}return i}function Ir(t,e){e[t.name]=t,-1===Dr.indexOf(t.name)&&(t.setupOnce(er,or),Dr.push(t.name),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.log(`Integration installed: ${t.name}`))}function Ar(t,e,n,r){const{normalizeDepth:i=3,normalizeMaxBreadth:s=1e3}=t,a={...e,event_id:e.event_id||n.event_id||cn(),timestamp:e.timestamp||An()},o=n.integrations||t.integrations.map(t=>t.name);!function(t,e){const{environment:n,release:r,dist:i,maxValueLength:s=250}=e;"environment"in t||(t.environment="environment"in e?n:Kn),void 0===t.release&&void 0!==r&&(t.release=r),void 0===t.dist&&void 0!==i&&(t.dist=i),t.message&&(t.message=Te(t.message,s));const a=t.exception&&t.exception.values&&t.exception.values[0];a&&a.value&&(a.value=Te(a.value,s));const o=t.request;o&&o.url&&(o.url=Te(o.url,s))}(a,t),function(t,e){e.length>0&&(t.sdk=t.sdk||{},t.sdk.integrations=[...t.sdk.integrations||[],...e])}(a,o),void 0===e.type&&function(t,e){const n=le._sentryDebugIds;if(!n)return;let r;const i=Or.get(e);i?r=i:(r=new Map,Or.set(e,r));const s=Object.keys(n).reduce((t,i)=>{let s;const a=r.get(i);a?s=a:(s=e(i),r.set(i,s));for(let e=s.length-1;e>=0;e--){const r=s[e];if(r.filename){t[r.filename]=n[i];break}}return t},{}),a=new Set;try{t.exception.values.forEach(t=>{t.stacktrace.frames.forEach(t=>{t.filename&&a.add(t.filename)})})}catch(t){}t.debug_meta=t.debug_meta||{},t.debug_meta.images=t.debug_meta.images||[];const o=t.debug_meta.images;a.forEach(t=>{s[t]&&o.push({type:"sourcemap",code_file:t,debug_id:s[t]})})}(a,t.stackParser);let c=r;n.captureContext&&(c=Qn.clone(c).update(n.captureContext));let l=Sn(a);if(c){if(c.getAttachments){const t=[...n.attachments||[],...c.getAttachments()];t.length&&(n.attachments=t)}l=c.applyToEvent(a,n)}return l.then(t=>"number"==typeof i&&i>0?function(t,e,n){if(!t)return null;const r={...t,...t.breadcrumbs&&{breadcrumbs:t.breadcrumbs.map(t=>({...t,...t.data&&{data:yn(t.data,e,n)}}))},...t.user&&{user:yn(t.user,e,n)},...t.contexts&&{contexts:yn(t.contexts,e,n)},...t.extra&&{extra:yn(t.extra,e,n)}};return t.contexts&&t.contexts.trace&&r.contexts&&(r.contexts.trace=t.contexts.trace,t.contexts.trace.data&&(r.contexts.trace.data=yn(t.contexts.trace.data,e,n))),t.spans&&(r.spans=t.spans.map(t=>(t.data&&(t.data=yn(t.data,e,n)),t))),r}(t,i,s):t)}const Or=new WeakMap,Ur="Not capturing exception because it's already been captured.";class Br{__init(){this._integrations={}}__init2(){this._integrationsInitialized=!1}__init3(){this._numProcessing=0}__init4(){this._outcomes={}}__init5(){this._hooks={}}constructor(t){if(Br.prototype.__init.call(this),Br.prototype.__init2.call(this),Br.prototype.__init3.call(this),Br.prototype.__init4.call(this),Br.prototype.__init5.call(this),this._options=t,t.dsn){this._dsn=be(t.dsn);const e=function(t,e={}){const n="string"!=typeof e&&e._metadata?e._metadata.sdk:void 0;return("string"==typeof e?e:e.tunnel)||`${function(t){return`${Rr(t)}${t.projectId}/envelope/`}(t)}?${function(t,e){return n={sentry_key:t.publicKey,sentry_version:"7",...e&&{sentry_client:`${e.name}/${e.version}`}},Object.keys(n).map(t=>`${encodeURIComponent(t)}=${encodeURIComponent(n[t])}`).join("&");var n}(t,n)}`}(this._dsn,t);this._transport=t.transport({recordDroppedEvent:this.recordDroppedEvent.bind(this),...t.transportOptions,url:e})}else("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.warn("No DSN provided, client will not do anything.")}captureException(t,e,n){if(hn(t))return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.log(Ur));let r=e&&e.event_id;return this._process(this.eventFromException(t,e).then(t=>this._captureEvent(t,e,n)).then(t=>{r=t})),r}captureMessage(t,e,n,r){let i=n&&n.event_id;const s=ee(t)?this.eventFromMessage(String(t),e,n):this.eventFromException(t,n);return this._process(s.then(t=>this._captureEvent(t,n,r)).then(t=>{i=t})),i}captureEvent(t,e,n){if(e&&e.originalException&&hn(e.originalException))return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.log(Ur));let r=e&&e.event_id;return this._process(this._captureEvent(t,e,n).then(t=>{r=t})),r}captureSession(t){this._isEnabled()?"string"!=typeof t.release?("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.warn("Discarded session because of missing or non-string release"):(this.sendSession(t),Jn(t,{init:!1})):("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.warn("SDK not enabled, will not capture session.")}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(t){const e=this._transport;return e?this._isClientDoneProcessing(t).then(n=>e.flush(t).then(t=>n&&t)):Sn(!0)}close(t){return this.flush(t).then(t=>(this.getOptions().enabled=!1,t))}setupIntegrations(){this._isEnabled()&&!this._integrationsInitialized&&(this._integrations=function(t){const e={};return t.forEach(t=>{t&&Ir(t,e)}),e}(this._options.integrations),this._integrationsInitialized=!0)}getIntegrationById(t){return this._integrations[t]}getIntegration(t){try{return this._integrations[t.id]||null}catch(e){return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.warn(`Cannot retrieve integration ${t.id} from the current Client`),null}}addIntegration(t){Ir(t,this._integrations)}sendEvent(t,e={}){if(this._dsn){let n=function(t,e,n,r){const i=Fn(n),s=t.type&&"replay_event"!==t.type?t.type:"event";!function(t,e){e&&(t.sdk=t.sdk||{},t.sdk.name=t.sdk.name||e.name,t.sdk.version=t.sdk.version||e.version,t.sdk.integrations=[...t.sdk.integrations||[],...e.integrations||[]],t.sdk.packages=[...t.sdk.packages||[],...e.packages||[]])}(t,n&&n.sdk);const a=jn(t,i,r,e);return delete t.sdkProcessingMetadata,Hn(a,[[{type:s},t]])}(t,this._dsn,this._options._metadata,this._options.tunnel);for(const t of e.attachments||[])n=Mn(n,zn(t,this._options.transportOptions&&this._options.transportOptions.textEncoder));const r=this._sendEnvelope(n);r&&r.then(e=>this.emit("afterSendEvent",t,e),null)}}sendSession(t){if(this._dsn){const e=function(t,e,n,r){const i=Fn(n);return Hn({sent_at:(new Date).toISOString(),...i&&{sdk:i},...!!r&&{dsn:ye(e)}},["aggregates"in t?[{type:"sessions"},t]:[{type:"session"},t]])}(t,this._dsn,this._options._metadata,this._options.tunnel);this._sendEnvelope(e)}}recordDroppedEvent(t,e,n){if(this._options.sendClientReports){const n=`${t}:${e}`;("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.log(`Adding outcome: "${n}"`),this._outcomes[n]=this._outcomes[n]+1||1}}on(t,e){this._hooks[t]||(this._hooks[t]=[]),this._hooks[t].push(e)}emit(t,...e){this._hooks[t]&&this._hooks[t].forEach(t=>t(...e))}_updateSessionFromEvent(t,e){let n=!1,r=!1;const i=e.exception&&e.exception.values;if(i){r=!0;for(const t of i){const e=t.mechanism;if(e&&!1===e.handled){n=!0;break}}}const s="ok"===t.status;(s&&0===t.errors||s&&n)&&(Jn(t,{...n&&{status:"crashed"},errors:t.errors||Number(r||n)}),this.captureSession(t))}_isClientDoneProcessing(t){return new kn(e=>{let n=0;const r=setInterval(()=>{0==this._numProcessing?(clearInterval(r),e(!0)):(n+=1,t&&n>=t&&(clearInterval(r),e(!1)))},1)})}_isEnabled(){return!1!==this.getOptions().enabled&&void 0!==this._dsn}_prepareEvent(t,e,n){const r=this.getOptions(),i=Object.keys(this._integrations);return!e.integrations&&i.length>0&&(e.integrations=i),Ar(r,t,e,n)}_captureEvent(t,e={},n){return this._processEvent(t,e,n).then(t=>t.event_id,t=>{if("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__){const e=t;"log"===e.logLevel?ke.log(e.message):ke.warn(e)}})}_processEvent(t,e,n){const r=this.getOptions(),{sampleRate:i}=r;if(!this._isEnabled())return wn(new me("SDK not enabled, will not capture event.","log"));const s=Mr(t),a=Hr(t),o=t.type||"error",c=`before send for type \`${o}\``;if(a&&"number"==typeof i&&Math.random()>i)return this.recordDroppedEvent("sample_rate","error",t),wn(new me(`Discarding event because it's not included in the random sample (sampling rate = ${i})`,"log"));const l="replay_event"===o?"replay":o;return this._prepareEvent(t,e,n).then(n=>{if(null===n)throw this.recordDroppedEvent("event_processor",l,t),new me("An event processor returned `null`, will not send event.","log");if(e.data&&!0===e.data.__sentry__)return n;const i=function(t,e,n){const{beforeSend:r,beforeSendTransaction:i}=t;return Hr(e)&&r?r(e,n):Mr(e)&&i?i(e,n):e}(r,n,e);return function(t,e){const n=`${e} must return \`null\` or a valid event.`;if(se(t))return t.then(t=>{if(!ne(t)&&null!==t)throw new me(n);return t},t=>{throw new me(`${e} rejected with ${t}`)});if(!ne(t)&&null!==t)throw new me(n);return t}(i,c)}).then(r=>{if(null===r)throw this.recordDroppedEvent("before_send",l,t),new me(`${c} returned \`null\`, will not send event.`,"log");const i=n&&n.getSession();!s&&i&&this._updateSessionFromEvent(i,r);const a=r.transaction_info;if(s&&a&&r.transaction!==t.transaction){const t="custom";r.transaction_info={...a,source:t}}return this.sendEvent(r,e),r}).then(null,t=>{if(t instanceof me)throw t;throw this.captureException(t,{data:{__sentry__:!0},originalException:t}),new me(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: ${t}`)})}_process(t){this._numProcessing++,t.then(t=>(this._numProcessing--,t),t=>(this._numProcessing--,t))}_sendEnvelope(t){if(this._transport&&this._dsn)return this.emit("beforeEnvelope",t),this._transport.send(t).then(null,t=>{("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.error("Error while sending event:",t)});("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.error("Transport disabled")}_clearOutcomes(){const t=this._outcomes;return this._outcomes={},Object.keys(t).map(e=>{const[n,r]=e.split(":");return{reason:n,category:r,quantity:t[e]}})}}function Hr(t){return void 0===t.type}function Mr(t){return"transaction"===t.type}const Pr=30;function Lr(t,e,n=function(t){const e=[];function n(t){return e.splice(e.indexOf(t),1)[0]}return{$:e,add:function(r){if(!(void 0===t||e.length<t))return wn(new me("Not adding Promise because buffer limit was reached."));const i=r();return-1===e.indexOf(i)&&e.push(i),i.then(()=>n(i)).then(null,()=>n(i).then(null,()=>{})),i},drain:function(t){return new kn((n,r)=>{let i=e.length;if(!i)return n(!0);const s=setTimeout(()=>{t&&t>0&&n(!1)},t);e.forEach(t=>{Sn(t).then(()=>{--i||(clearTimeout(s),n(!0))},r)})})}}}(t.bufferSize||Pr)){let r={};function i(i){const s=[];if(Pn(i,(e,n)=>{const i=Yn(n);if(function(t,e,n=Date.now()){return function(t,e){return t[e]||t.all||0}(t,e)>n}(r,i)){const r=$r(e,n);t.recordDroppedEvent("ratelimit_backoff",i,r)}else s.push(e)}),0===s.length)return Sn();const a=Hn(i[0],s),o=e=>{Pn(a,(n,r)=>{const i=$r(n,r);t.recordDroppedEvent(e,Yn(r),i)})};return n.add(()=>e({body:$n(a,t.textEncoder)}).then(t=>(void 0!==t.statusCode&&(t.statusCode<200||t.statusCode>=300)&&("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.warn(`Sentry responded with status code ${t.statusCode} to sent event.`),r=function(t,{statusCode:e,headers:n},r=Date.now()){const i={...t},s=n&&n["x-sentry-rate-limits"],a=n&&n["retry-after"];if(s)for(const t of s.trim().split(",")){const[e,n]=t.split(":",2),s=parseInt(e,10),a=1e3*(isNaN(s)?60:s);if(n)for(const t of n.split(";"))i[t]=r+a;else i.all=r+a}else a?i.all=r+function(t,e=Date.now()){const n=parseInt(`${t}`,10);if(!isNaN(n))return 1e3*n;const r=Date.parse(`${t}`);return isNaN(r)?qn:r-e}(a,r):429===e&&(i.all=r+6e4);return i}(r,t),t),t=>{throw o("network_error"),t})).then(t=>t,t=>{if(t instanceof me)return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.error("Skipped sending event because buffer is full."),o("queue_overflow"),Sn();throw t})}return i.__sentry__baseTransport__=!0,{send:i,flush:t=>n.drain(t)}}function $r(t,e){if("event"===e||"transaction"===e)return Array.isArray(t)?t[1]:void 0}const zr="7.49.0";let Gr;class Yr{constructor(){Yr.prototype.__init.call(this)}static __initStatic(){this.id="FunctionToString"}__init(){this.name=Yr.id}setupOnce(){Gr=Function.prototype.toString,Function.prototype.toString=function(...t){const e=Ie(this)||this;return Gr.apply(e,t)}}}Yr.__initStatic();const Fr=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/];class jr{static __initStatic(){this.id="InboundFilters"}__init(){this.name=jr.id}constructor(t={}){this._options=t,jr.prototype.__init.call(this)}setupOnce(t,e){const n=t=>{const n=e();if(n){const e=n.getIntegration(jr);if(e){const r=n.getClient(),i=r?r.getOptions():{},s=function(t={},e={}){return{allowUrls:[...t.allowUrls||[],...e.allowUrls||[]],denyUrls:[...t.denyUrls||[],...e.denyUrls||[]],ignoreErrors:[...t.ignoreErrors||[],...e.ignoreErrors||[],...Fr],ignoreTransactions:[...t.ignoreTransactions||[],...e.ignoreTransactions||[]],ignoreInternal:void 0===t.ignoreInternal||t.ignoreInternal}}(e._options,i);return function(t,e){return e.ignoreInternal&&function(t){try{return"SentryError"===t.exception.values[0].type}catch(t){}return!1}(t)?(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.warn(`Event dropped due to being internal Sentry Error.\nEvent: ${un(t)}`),!0):function(t,e){return!(t.type||!e||!e.length)&&function(t){if(t.message)return[t.message];if(t.exception)try{const{type:e="",value:n=""}=t.exception.values&&t.exception.values[0]||{};return[`${n}`,`${e}: ${n}`]}catch(e){return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.error(`Cannot extract message for event ${un(t)}`),[]}return[]}(t).some(t=>xe(t,e))}(t,e.ignoreErrors)?(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.warn(`Event dropped due to being matched by \`ignoreErrors\` option.\nEvent: ${un(t)}`),!0):function(t,e){if("transaction"!==t.type||!e||!e.length)return!1;const n=t.transaction;return!!n&&xe(n,e)}(t,e.ignoreTransactions)?(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.\nEvent: ${un(t)}`),!0):function(t,e){if(!e||!e.length)return!1;const n=qr(t);return!!n&&xe(n,e)}(t,e.denyUrls)?(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.warn(`Event dropped due to being matched by \`denyUrls\` option.\nEvent: ${un(t)}.\nUrl: ${qr(t)}`),!0):!function(t,e){if(!e||!e.length)return!0;const n=qr(t);return!n||xe(n,e)}(t,e.allowUrls)&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.warn(`Event dropped due to not being matched by \`allowUrls\` option.\nEvent: ${un(t)}.\nUrl: ${qr(t)}`),!0)}(t,s)?null:t}}return t};n.id=this.name,t(n)}}function qr(t){try{let e;try{e=t.exception.values[0].stacktrace.frames}catch(t){}return e?function(t=[]){for(let e=t.length-1;e>=0;e--){const n=t[e];if(n&&"<anonymous>"!==n.filename&&"[native code]"!==n.filename)return n.filename||null}return null}(e):null}catch(e){return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.error(`Cannot extract url for event ${un(t)}`),null}}jr.__initStatic();const Vr=le;let Zr=0;function Wr(){return Zr>0}function Xr(t,e={},n){if("function"!=typeof t)return t;try{const e=t.__sentry_wrapped__;if(e)return e;if(Ie(t))return t}catch(e){return t}const r=function(){const r=Array.prototype.slice.call(arguments);try{n&&"function"==typeof n&&n.apply(this,arguments);const i=r.map(t=>Xr(t,e));return t.apply(this,i)}catch(t){throw Zr++,setTimeout(()=>{Zr--}),xr(n=>{n.addEventProcessor(t=>(e.mechanism&&(dn(t,void 0,void 0),pn(t,e.mechanism)),t.extra={...t.extra,arguments:r},t)),Cr(t)}),t}};try{for(const e in t)Object.prototype.hasOwnProperty.call(t,e)&&(r[e]=t[e])}catch(t){}Ne(r,t),De(t,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get:()=>t.name})}catch(t){}return r}function Kr(t,e){const n=Qr(t,e),r={type:e&&e.name,value:ei(e)};return n.length&&(r.stacktrace={frames:n}),void 0===r.type&&""===r.value&&(r.value="Unrecoverable error caught"),r}function Jr(t,e){return{exception:{values:[Kr(t,e)]}}}function Qr(t,e){const n=e.stacktrace||e.stack||"",r=function(t){if(t){if("number"==typeof t.framesToPop)return t.framesToPop;if(ti.test(t.message))return 1}return 0}(e);try{return t(n,r)}catch(t){}return[]}const ti=/Minified React error #\d+;/i;function ei(t){const e=t&&t.message;return e?e.error&&"string"==typeof e.error.message?e.error.message:e:"No error message"}function ni(t,e,n,r,i){let s;if(Jt(e)&&e.error)return Jr(t,e.error);if(Qt(e)||Kt(e,"DOMException")){const i=e;if("stack"in e)s=Jr(t,e);else{const e=i.name||(Qt(i)?"DOMError":"DOMException"),a=i.message?`${e}: ${i.message}`:e;s=ri(t,a,n,r),dn(s,a)}return"code"in i&&(s.tags={...s.tags,"DOMException.code":`${i.code}`}),s}return Xt(e)?Jr(t,e):ne(e)||re(e)?(s=function(t,e,n,r){const i=or().getClient(),s=i&&i.getOptions().normalizeDepth,a={exception:{values:[{type:re(e)?e.constructor.name:r?"UnhandledRejection":"Error",value:`Non-Error ${r?"promise rejection":"exception"} captured with keys: ${Be(e)}`}]},extra:{__serialized__:vn(e,s)}};if(n){const e=Qr(t,n);e.length&&(a.exception.values[0].stacktrace={frames:e})}return a}(t,e,n,i),pn(s,{synthetic:!0}),s):(s=ri(t,e,n,r),dn(s,`${e}`,void 0),pn(s,{synthetic:!0}),s)}function ri(t,e,n,r){const i={message:e};if(r&&n){const r=Qr(t,n);r.length&&(i.exception={values:[{value:e,stacktrace:{frames:r}}]})}return i}const ii="Breadcrumbs";class si{static __initStatic(){this.id=ii}__init(){this.name=si.id}constructor(t){si.prototype.__init.call(this),this.options={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...t}}setupOnce(){var t;this.options.console&&Xe("console",ai),this.options.dom&&Xe("dom",(t=this.options.dom,function(e){let n,r="object"==typeof t?t.serializeAttribute:void 0,i="object"==typeof t&&"number"==typeof t.maxStringLength?t.maxStringLength:void 0;i&&i>1024&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.warn(`\`dom.maxStringLength\` cannot exceed 1024, but a value of ${i} was configured. Sentry will use 1024 instead.`),i=1024),"string"==typeof r&&(r=[r]);try{const t=e.event;n=function(t){return t&&!!t.target}(t)?fe(t.target,{keyAttrs:r,maxStringLength:i}):fe(t,{keyAttrs:r,maxStringLength:i})}catch(t){n="<unknown>"}0!==n.length&&or().addBreadcrumb({category:`ui.${e.name}`,message:n},{event:e.event,name:e.name,global:e.global})})),this.options.xhr&&Xe("xhr",oi),this.options.fetch&&Xe("fetch",ci),this.options.history&&Xe("history",li)}addSentryBreadcrumb(t){this.options.sentry&&or().addBreadcrumb({category:"sentry."+("transaction"===t.type?"transaction":"event"),event_id:t.event_id,level:t.level,message:un(t)},{event:t})}}function ai(t){for(let e=0;e<t.args.length;e++)if("ref=Ref<"===t.args[e]){t.args[e+1]="viewRef";break}const e={category:"console",data:{arguments:t.args,logger:"console"},level:(n=t.level,"warn"===n?"warning":xn.includes(n)?n:"log"),message:Ce(t.args," ")};var n;if("assert"===t.level){if(!1!==t.args[0])return;e.message=`Assertion failed: ${Ce(t.args.slice(1)," ")||"console.assert"}`,e.data.arguments=t.args.slice(1)}or().addBreadcrumb(e,{input:t.args,level:t.level})}function oi(t){const{startTimestamp:e,endTimestamp:n}=t,r=t.xhr[Ve];if(!e||!n||!r)return;const{method:i,url:s,status_code:a,body:o}=r,c={method:i,url:s,status_code:a},l={xhr:t.xhr,input:o,startTimestamp:e,endTimestamp:n};or().addBreadcrumb({category:"xhr",data:c,type:"http"},l)}function ci(t){const{startTimestamp:e,endTimestamp:n}=t;if(n&&(!t.fetchData.url.match(/sentry_key/)||"POST"!==t.fetchData.method))if(t.error){const r=t.fetchData,i={data:t.error,input:t.args,startTimestamp:e,endTimestamp:n};or().addBreadcrumb({category:"fetch",data:r,level:"error",type:"http"},i)}else{const r={...t.fetchData,status_code:t.response&&t.response.status},i={input:t.args,response:t.response,startTimestamp:e,endTimestamp:n};or().addBreadcrumb({category:"fetch",data:r,type:"http"},i)}}function li(t){let e=t.from,n=t.to;const r=Tn(Vr.location.href);let i=Tn(e);const s=Tn(n);i.path||(i=r),r.protocol===s.protocol&&r.host===s.host&&(n=s.relative),r.protocol===i.protocol&&r.host===i.host&&(e=i.relative),or().addBreadcrumb({category:"navigation",data:{from:e,to:n}})}si.__initStatic();class ui extends Br{constructor(t){const e=Vr.SENTRY_SDK_SOURCE||"npm";t._metadata=t._metadata||{},t._metadata.sdk=t._metadata.sdk||{name:"sentry.javascript.browser",packages:[{name:`${e}:@sentry/browser`,version:zr}],version:zr},super(t),t.sendClientReports&&Vr.document&&Vr.document.addEventListener("visibilitychange",()=>{"hidden"===Vr.document.visibilityState&&this._flushOutcomes()})}eventFromException(t,e){return function(t,e,n,r){const i=ni(t,e,n&&n.syntheticException||void 0,r);return pn(i),i.level="error",n&&n.event_id&&(i.event_id=n.event_id),Sn(i)}(this._options.stackParser,t,e,this._options.attachStacktrace)}eventFromMessage(t,e="info",n){return function(t,e,n="info",r,i){const s=ri(t,e,r&&r.syntheticException||void 0,i);return s.level=n,r&&r.event_id&&(s.event_id=r.event_id),Sn(s)}(this._options.stackParser,t,e,n,this._options.attachStacktrace)}sendEvent(t,e){const n=this.getIntegrationById(ii);n&&n.addSentryBreadcrumb&&n.addSentryBreadcrumb(t),super.sendEvent(t,e)}captureUserFeedback(t){if(!this._isEnabled())return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.warn("SDK not enabled, will not capture user feedback."));const e=function(t,{metadata:e,tunnel:n,dsn:r}){const i={event_id:t.event_id,sent_at:(new Date).toISOString(),...e&&e.sdk&&{sdk:{name:e.sdk.name,version:e.sdk.version}},...!!n&&!!r&&{dsn:ye(r)}},s=function(t){return[{type:"user_report"},t]}(t);return Hn(i,[s])}(t,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this._sendEnvelope(e)}_prepareEvent(t,e,n){return t.platform=t.platform||"javascript",super._prepareEvent(t,e,n)}_flushOutcomes(){const t=this._clearOutcomes();if(0===t.length)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.log("No outcomes to send"));if(!this._dsn)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.log("No dsn provided, will not send outcomes"));("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.log("Sending outcomes:",t);const e=(n=t,Hn((r=this._options.tunnel&&ye(this._dsn))?{dsn:r}:{},[[{type:"client_report"},{timestamp:An(),discarded_events:n}]]));var n,r;this._sendEnvelope(e)}}let di;function pi(t,e=function(){if(di)return di;if(Fe(Vr.fetch))return di=Vr.fetch.bind(Vr);const t=Vr.document;let e=Vr.fetch;if(t&&"function"==typeof t.createElement)try{const n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n);const r=n.contentWindow;r&&r.fetch&&(e=r.fetch),t.head.removeChild(n)}catch(t){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",t)}return di=e.bind(Vr)}()){let n=0,r=0;return Lr(t,function(i){const s=i.body.length;n+=s,r++;const a={body:i.body,method:"POST",referrerPolicy:"origin",headers:t.headers,keepalive:n<=6e4&&r<15,...t.fetchOptions};try{return e(t.url,a).then(t=>(n-=s,r--,{statusCode:t.status,headers:{"x-sentry-rate-limits":t.headers.get("X-Sentry-Rate-Limits"),"retry-after":t.headers.get("Retry-After")}}))}catch(t){return di=void 0,n-=s,r--,wn(t)}})}function hi(t){return Lr(t,function(e){return new kn((n,r)=>{const i=new XMLHttpRequest;i.onerror=r,i.onreadystatechange=()=>{4===i.readyState&&n({statusCode:i.status,headers:{"x-sentry-rate-limits":i.getResponseHeader("X-Sentry-Rate-Limits"),"retry-after":i.getResponseHeader("Retry-After")}})},i.open("POST",t.url);for(const e in t.headers)Object.prototype.hasOwnProperty.call(t.headers,e)&&i.setRequestHeader(e,t.headers[e]);i.send(e.body)})})}const fi="?";function _i(t,e,n,r){const i={filename:t,function:e,in_app:!0};return void 0!==n&&(i.lineno=n),void 0!==r&&(i.colno=r),i}const mi=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,gi=/\((\S*)(?::(\d+))(?::(\d+))\)/,yi=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,vi=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,bi=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,Ei=Le([30,t=>{const e=mi.exec(t);if(e){if(e[2]&&0===e[2].indexOf("eval")){const t=gi.exec(e[2]);t&&(e[2]=t[1],e[3]=t[2],e[4]=t[3])}const[t,n]=Si(e[1]||fi,e[2]);return _i(n,t,e[3]?+e[3]:void 0,e[4]?+e[4]:void 0)}}],[50,t=>{const e=yi.exec(t);if(e){if(e[3]&&e[3].indexOf(" > eval")>-1){const t=vi.exec(e[3]);t&&(e[1]=e[1]||"eval",e[3]=t[1],e[4]=t[2],e[5]="")}let t=e[3],n=e[1]||fi;return[n,t]=Si(n,t),_i(t,n,e[4]?+e[4]:void 0,e[5]?+e[5]:void 0)}}],[40,t=>{const e=bi.exec(t);return e?_i(e[2],e[1]||fi,+e[3],e[4]?+e[4]:void 0):void 0}]),Si=(t,e)=>{const n=-1!==t.indexOf("safari-extension"),r=-1!==t.indexOf("safari-web-extension");return n||r?[-1!==t.indexOf("@")?t.split("@")[0]:fi,n?`safari-extension:${e}`:`safari-web-extension:${e}`]:[t,e]};class wi{static __initStatic(){this.id="GlobalHandlers"}__init(){this.name=wi.id}__init2(){this._installFunc={onerror:ki,onunhandledrejection:Ti}}constructor(t){wi.prototype.__init.call(this),wi.prototype.__init2.call(this),this._options={onerror:!0,onunhandledrejection:!0,...t}}setupOnce(){Error.stackTraceLimit=50;const t=this._options;for(const e in t){const n=this._installFunc[e];n&&t[e]&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.log(`Global Handler attached: ${e}`),n(),this._installFunc[e]=void 0)}}}function ki(){Xe("error",t=>{const[e,n,r]=Ri();if(!e.getIntegration(wi))return;const{msg:i,url:s,line:a,column:o,error:c}=t;if(Wr()||c&&c.__sentry_own_request__)return;const l=void 0===c&&te(i)?function(t,e,n,r){let i=Jt(t)?t.message:t,s="Error";const a=i.match(/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i);return a&&(s=a[1],i=a[2]),Ci({exception:{values:[{type:s,value:i}]}},e,n,r)}(i,s,a,o):Ci(ni(n,c||i,void 0,r,!1),s,a,o);l.level="error",xi(e,c,l,"onerror")})}function Ti(){Xe("unhandledrejection",t=>{const[e,n,r]=Ri();if(!e.getIntegration(wi))return;let i=t;try{"reason"in t?i=t.reason:"detail"in t&&"reason"in t.detail&&(i=t.detail.reason)}catch(t){}if(Wr()||i&&i.__sentry_own_request__)return!0;const s=ee(i)?{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(i)}`}]}}:ni(n,i,void 0,r,!0);s.level="error",xi(e,i,s,"onunhandledrejection")})}function Ci(t,e,n,r){const i=t.exception=t.exception||{},s=i.values=i.values||[],a=s[0]=s[0]||{},o=a.stacktrace=a.stacktrace||{},c=o.frames=o.frames||[],l=isNaN(parseInt(r,10))?void 0:r,u=isNaN(parseInt(n,10))?void 0:n,d=te(e)&&e.length>0?e:function(){try{return pe.document.location.href}catch(t){return""}}();return 0===c.length&&c.push({colno:l,filename:d,function:"?",in_app:!0,lineno:u}),t}function xi(t,e,n,r){pn(n,{handled:!1,type:r}),t.captureEvent(n,{originalException:e})}function Ri(){const t=or(),e=t.getClient(),n=e&&e.getOptions()||{stackParser:()=>[],attachStacktrace:!1};return[t,n.stackParser,n.attachStacktrace]}wi.__initStatic();const Di=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"];class Ni{static __initStatic(){this.id="TryCatch"}__init(){this.name=Ni.id}constructor(t){Ni.prototype.__init.call(this),this._options={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...t}}setupOnce(){this._options.setTimeout&&Re(Vr,"setTimeout",Ii),this._options.setInterval&&Re(Vr,"setInterval",Ii),this._options.requestAnimationFrame&&Re(Vr,"requestAnimationFrame",Ai),this._options.XMLHttpRequest&&"XMLHttpRequest"in Vr&&Re(XMLHttpRequest.prototype,"send",Oi);const t=this._options.eventTarget;t&&(Array.isArray(t)?t:Di).forEach(Ui)}}function Ii(t){return function(...e){return e[0]=Xr(e[0],{mechanism:{data:{function:ze(t)},handled:!0,type:"instrument"}}),t.apply(this,e)}}function Ai(t){return function(e){return t.apply(this,[Xr(e,{mechanism:{data:{function:"requestAnimationFrame",handler:ze(t)},handled:!0,type:"instrument"}})])}}function Oi(t){return function(...e){const n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(t=>{t in n&&"function"==typeof n[t]&&Re(n,t,function(e){const n={mechanism:{data:{function:t,handler:ze(e)},handled:!0,type:"instrument"}},r=Ie(e);return r&&(n.mechanism.data.handler=ze(r)),Xr(e,n)})}),t.apply(this,e)}}function Ui(t){const e=Vr[t]&&Vr[t].prototype;e&&e.hasOwnProperty&&e.hasOwnProperty("addEventListener")&&(Re(e,"addEventListener",function(e){return function(n,r,i){try{"function"==typeof r.handleEvent&&(r.handleEvent=Xr(r.handleEvent,{mechanism:{data:{function:"handleEvent",handler:ze(r),target:t},handled:!0,type:"instrument"}}))}catch(t){}return e.apply(this,[n,Xr(r,{mechanism:{data:{function:"addEventListener",handler:ze(r),target:t},handled:!0,type:"instrument"}}),i])}}),Re(e,"removeEventListener",function(t){return function(e,n,r){const i=n;try{const n=i&&i.__sentry_wrapped__;n&&t.call(this,e,n,r)}catch(t){}return t.call(this,e,i,r)}}))}Ni.__initStatic();class Bi{static __initStatic(){this.id="LinkedErrors"}__init(){this.name=Bi.id}constructor(t={}){Bi.prototype.__init.call(this),this._key=t.key||"cause",this._limit=t.limit||5}setupOnce(){const t=or().getClient();t&&er((e,n)=>{const r=or().getIntegration(Bi);return r?function(t,e,n,r,i){if(!(r.exception&&r.exception.values&&i&&oe(i.originalException,Error)))return r;const s=Hi(t,n,i.originalException,e);return r.exception.values=[...s,...r.exception.values],r}(t.getOptions().stackParser,r._key,r._limit,e,n):e})}}function Hi(t,e,n,r,i=[]){if(!oe(n[r],Error)||i.length+1>=e)return i;const s=Kr(t,n[r]);return Hi(t,e,n[r],r,[s,...i])}Bi.__initStatic();class Mi{constructor(){Mi.prototype.__init.call(this)}static __initStatic(){this.id="HttpContext"}__init(){this.name=Mi.id}setupOnce(){er(t=>{if(or().getIntegration(Mi)){if(!Vr.navigator&&!Vr.location&&!Vr.document)return t;const e=t.request&&t.request.url||Vr.location&&Vr.location.href,{referrer:n}=Vr.document||{},{userAgent:r}=Vr.navigator||{},i={...t.request&&t.request.headers,...n&&{Referer:n},...r&&{"User-Agent":r}},s={...t.request,...e&&{url:e},headers:i};return{...t,request:s}}return t})}}Mi.__initStatic();class Pi{constructor(){Pi.prototype.__init.call(this)}static __initStatic(){this.id="Dedupe"}__init(){this.name=Pi.id}setupOnce(t,e){const n=t=>{if(t.type)return t;const n=e().getIntegration(Pi);if(n){try{if(function(t,e){return!(!e||!function(t,e){const n=t.message,r=e.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!$i(t,e)||!Li(t,e))}(t,e)&&!function(t,e){const n=zi(e),r=zi(t);return!!(n&&r&&n.type===r.type&&n.value===r.value&&$i(t,e)&&Li(t,e))}(t,e))}(t,n._previousEvent))return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.warn("Event dropped due to being a duplicate of previously captured event."),null}catch(e){return n._previousEvent=t}return n._previousEvent=t}return t};n.id=this.name,t(n)}}function Li(t,e){let n=Gi(t),r=Gi(e);if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;if(r.length!==n.length)return!1;for(let t=0;t<r.length;t++){const e=r[t],i=n[t];if(e.filename!==i.filename||e.lineno!==i.lineno||e.colno!==i.colno||e.function!==i.function)return!1}return!0}function $i(t,e){let n=t.fingerprint,r=e.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;try{return!(n.join("")!==r.join(""))}catch(t){return!1}}function zi(t){return t.exception&&t.exception.values&&t.exception.values[0]}function Gi(t){const e=t.exception;if(e)try{return e.values[0].stacktrace.frames}catch(t){return}}Pi.__initStatic();const Yi=[new jr,new Yr,new Ni,new si,new wi,new Bi,new Pi,new Mi];function Fi(t={},e=or()){if(!Vr.document)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.error("Global document not defined in showReportDialog call"));const{client:n,scope:r}=e.getStackTop(),i=t.dsn||n&&n.getDsn();if(!i)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.error("DSN not configured for showReportDialog call"));r&&(t.user={...r.getUser(),...t.user}),t.eventId||(t.eventId=e.lastEventId());const s=Vr.document.createElement("script");s.async=!0,s.src=function(t,e){const n=be(t),r=`${Rr(n)}embed/error-page/`;let i=`dsn=${ye(n)}`;for(const t in e)if("dsn"!==t)if("user"===t){const t=e.user;if(!t)continue;t.name&&(i+=`&name=${encodeURIComponent(t.name)}`),t.email&&(i+=`&email=${encodeURIComponent(t.email)}`)}else i+=`&${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`;return`${r}?${i}`}(i,t),t.onLoad&&(s.onload=t.onLoad);const a=Vr.document.head||Vr.document.body;a?a.appendChild(s):("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.error("Not injecting report dialog. No injection point found in HTML")}function ji(t){t.startSession({ignoreDuration:!0}),t.captureSession()}const qi=le,Vi="sentryReplaySession",Zi="Unable to send Replay",Wi=15e4;var Xi;function Ki(t){const e=null==t?void 0:t.host;return Boolean(e&&e.shadowRoot&&e.shadowRoot===t)}function Ji({maskInputOptions:t,tagName:e,type:n}){"option"===e.toLowerCase()&&(e="select");const r="string"==typeof n?n.toLowerCase():void 0;return t[e.toLowerCase()]||r&&t[r]||"password"===r||"input"===e&&!n&&t.text}function Qi({input:t,maskInputSelector:e,unmaskInputSelector:n,maskInputOptions:r,tagName:i,type:s,value:a,maskInputFn:o}){let c=a||"";return n&&t.matches(n)||(t.hasAttribute("rr_is_password")&&(s="password"),(Ji({maskInputOptions:r,tagName:i,type:s})||e&&t.matches(e))&&(c=o?o(c):"*".repeat(c.length))),c}!function(t){t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment"}(Xi||(Xi={}));const ts="__rrweb_original__";let es=1;const ns=new RegExp("[^a-z0-9-_:]"),rs=-2;function is(t){return t?t.replace(/[\S]/g,"*"):""}function ss(t){try{const e=t.rules||t.cssRules;return e?Array.from(e).map(as).join(""):null}catch(t){return null}}function as(t){let e=t.cssText;if(function(t){return"styleSheet"in t}(t))try{e=ss(t.styleSheet)||e}catch(t){}return e}let os,cs;const ls=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,us=/^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/|#).*/,ds=/^(data:)([^,]*),(.*)/i;function ps(t,e){return(t||"").replace(ls,(t,n,r,i,s,a)=>{const o=r||s||a,c=n||i||"";if(!o)return t;if(!us.test(o))return`url(${c}${o}${c})`;if(ds.test(o))return`url(${c}${o}${c})`;if("/"===o[0])return`url(${c}${function(t){let e="";return e=t.indexOf("//")>-1?t.split("/").slice(0,3).join("/"):t.split("/")[0],e=e.split("?")[0],e}(e)+o}${c})`;const l=e.split("/"),u=o.split("/");l.pop();for(const t of u)"."!==t&&(".."===t?l.pop():l.push(t));return`url(${c}${l.join("/")}${c})`})}const hs=/^[^ \t\n\r\u000c]+/,fs=/^[, \t\n\r\u000c]+/;function _s(t,e){if(!e||""===e.trim())return e;const n=t.createElement("a");return n.href=e,n.href}function ms(){const t=document.createElement("a");return t.href="",t.href}function gs(t,e,n,r,i,s,a,o){if(!i)return i;const c=r.toLowerCase(),l=n.toLowerCase();return"src"===c||"href"===c||"xlink:href"===c&&"#"!==i[0]?_s(t,i):"background"!==c||"table"!==l&&"td"!==l&&"th"!==l?"srcset"===c?function(t,e){if(""===e.trim())return e;let n=0;function r(t){let r,i=t.exec(e.substring(n));return i?(r=i[0],n+=r.length,r):""}let i=[];for(;r(fs),!(n>=e.length);){let s=r(hs);if(","===s.slice(-1))s=_s(t,s.substring(0,s.length-1)),i.push(s);else{let r="";s=_s(t,s);let a=!1;for(;;){let t=e.charAt(n);if(""===t){i.push((s+r).trim());break}if(a)")"===t&&(a=!1);else{if(","===t){n+=1,i.push((s+r).trim());break}"("===t&&(a=!0)}r+=t,n+=1}}}return i.join(", ")}(t,i):"style"===c?ps(i,ms()):"object"===l&&"data"===c?_s(t,i):s&&function(t,e,n,r){return(!r||!t.matches(r))&&(["placeholder","title","aria-label"].indexOf(e)>-1||"input"===n&&"value"===e&&t.hasAttribute("type")&&["submit","button"].indexOf(t.getAttribute("type").toLowerCase())>-1)}(e,c,l,a)?o?o(i):is(i):i:_s(t,i)}function ys(t,e,n,r,i){if(!t)return!1;if(t.nodeType!==t.ELEMENT_NODE)return ys(t.parentNode,e,n,r,i);if(r&&(t.matches(r)||t.closest(r)))return!1;if(i)return!0;if("string"==typeof e){if(t.classList.contains(e))return!0}else for(let n=0;n<t.classList.length;n++)if(e.test(t.classList[n]))return!0;return!(!n||!t.matches(n))||ys(t.parentNode,e,n,r,i)}function vs(t){return null==t?"":t.toLowerCase()}function bs(t,e){const{doc:n,map:r,blockClass:i,blockSelector:s,unblockSelector:a,maskTextClass:o,maskTextSelector:c,unmaskTextSelector:l,skipChild:u=!1,inlineStylesheet:d=!0,maskInputSelector:p,unmaskInputSelector:h,maskAllText:f,maskInputOptions:_={},maskTextFn:m,maskInputFn:g,slimDOMOptions:y,dataURLOptions:v={},inlineImages:b=!1,recordCanvas:E=!1,onSerialize:S,onIframeLoad:w,iframeLoadTimeout:k=5e3,keepIframeSrcFn:T=(()=>!1)}=e;let{preserveWhiteSpace:C=!0}=e;const x=function(t,e){var n;const{doc:r,blockClass:i,blockSelector:s,unblockSelector:a,maskTextClass:o,maskTextSelector:c,unmaskTextSelector:l,inlineStylesheet:u,maskInputSelector:d,unmaskInputSelector:p,maskAllText:h,maskInputOptions:f={},maskTextFn:_,maskInputFn:m,dataURLOptions:g={},inlineImages:y,recordCanvas:v,keepIframeSrcFn:b}=e;let E;if(r.__sn){const t=r.__sn.id;E=1===t?void 0:t}switch(t.nodeType){case t.DOCUMENT_NODE:return"CSS1Compat"!==t.compatMode?{type:Xi.Document,childNodes:[],compatMode:t.compatMode,rootId:E}:{type:Xi.Document,childNodes:[],rootId:E};case t.DOCUMENT_TYPE_NODE:return{type:Xi.DocumentType,name:t.name,publicId:t.publicId,systemId:t.systemId,rootId:E};case t.ELEMENT_NODE:const k=function(t,e,n,r){if(r&&t.matches(r))return!1;if("string"==typeof e){if(t.classList.contains(e))return!0}else for(let n=0;n<t.classList.length;n++)if(e.test(t.classList[n]))return!0;return!!n&&t.matches(n)}(t,i,s,a),T=function(t){if(t instanceof HTMLFormElement)return"form";const e=t.tagName.toLowerCase().trim();return ns.test(e)?"div":e}(t);let C={};for(const{name:e,value:n}of Array.from(t.attributes))Es(T,e)||(C[e]=gs(r,t,T,e,n,h,l,_));if("link"===T&&u){const e=Array.from(r.styleSheets).find(e=>e.href===t.href);let n=null;e&&(n=ss(e)),n&&(delete C.rel,delete C.href,C._cssText=ps(n,e.href))}if("style"===T&&t.sheet&&!(t.innerText||t.textContent||"").trim().length){const e=ss(t.sheet);e&&(C._cssText=ps(e,ms()))}if("input"===T||"textarea"===T||"select"===T||"option"===T){const e=t,n=function(t,e,n){return"input"!==t||"radio"!==n.type&&"checkbox"!==n.type?e.value:e.getAttribute("value")||""}(T,e,C),r=t.checked;"submit"!==C.type&&"button"!==C.type&&n&&(C.value=Qi({input:e,type:C.type,tagName:T,value:n,maskInputSelector:d,unmaskInputSelector:p,maskInputOptions:f,maskInputFn:m})),r&&(C.checked=r)}if("option"===T&&(t.selected&&!f.select?C.selected=!0:delete C.selected),"canvas"===T&&v)if("2d"===t.__context)(function(t){const e=t.getContext("2d");if(!e)return!0;for(let n=0;n<t.width;n+=50)for(let r=0;r<t.height;r+=50){const i=e.getImageData;if(new Uint32Array((ts in i?i[ts]:i).call(e,n,r,Math.min(50,t.width-n),Math.min(50,t.height-r)).data.buffer).some(t=>0!==t))return!1}return!0})(t)||(C.rr_dataURL=t.toDataURL(g.type,g.quality));else if(!("__context"in t)){const e=t.toDataURL(g.type,g.quality),n=document.createElement("canvas");n.width=t.width,n.height=t.height,e!==n.toDataURL(g.type,g.quality)&&(C.rr_dataURL=e)}if("img"===T&&y){os||(os=r.createElement("canvas"),cs=os.getContext("2d"));const e=t,n=e.crossOrigin;e.crossOrigin="anonymous";const i=()=>{try{os.width=e.naturalWidth,os.height=e.naturalHeight,cs.drawImage(e,0,0),C.rr_dataURL=os.toDataURL(g.type,g.quality)}catch(t){console.warn(`Cannot inline img src=${e.currentSrc}! Error: ${t}`)}n?C.crossOrigin=n:delete C.crossOrigin};e.complete&&0!==e.naturalWidth?i():e.onload=i}if("audio"!==T&&"video"!==T||(C.rr_mediaState=t.paused?"paused":"played",C.rr_mediaCurrentTime=t.currentTime),t.scrollLeft&&(C.rr_scrollLeft=t.scrollLeft),t.scrollTop&&(C.rr_scrollTop=t.scrollTop),k){const{width:e,height:n}=t.getBoundingClientRect();C={class:C.class,rr_width:`${e}px`,rr_height:`${n}px`}}return"iframe"!==T||b(C.src)||(t.contentDocument||(C.rr_src=C.src),delete C.src),{type:Xi.Element,tagName:T,attributes:C,childNodes:[],isSVG:(w=t,Boolean("svg"===w.tagName||w.ownerSVGElement)||void 0),needBlock:k,rootId:E};case t.TEXT_NODE:const x=t.parentNode&&t.parentNode.tagName;let R=t.textContent;const D="STYLE"===x||void 0,N="SCRIPT"===x||void 0;if(D&&R){try{t.nextSibling||t.previousSibling||(null===(n=t.parentNode.sheet)||void 0===n?void 0:n.cssRules)&&(R=(S=t.parentNode.sheet).cssRules?Array.from(S.cssRules).map(t=>t.cssText||"").join(""):"")}catch(e){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${e}`,t)}R=ps(R,ms())}return N&&(R="SCRIPT_PLACEHOLDER"),"TEXTAREA"===x&&R?R="":"OPTION"===x&&R?R=Qi({input:t.parentNode,type:null,tagName:x,value:R,maskInputSelector:d,unmaskInputSelector:p,maskInputOptions:f,maskInputFn:m}):!D&&!N&&ys(t,o,c,l,h)&&R&&(R=_?_(R):is(R)),{type:Xi.Text,textContent:R||"",isStyle:D,rootId:E};case t.CDATA_SECTION_NODE:return{type:Xi.CDATA,textContent:"",rootId:E};case t.COMMENT_NODE:return{type:Xi.Comment,textContent:t.textContent||"",rootId:E};default:return!1}var S,w}(t,{doc:n,blockClass:i,blockSelector:s,unblockSelector:a,maskTextClass:o,maskTextSelector:c,unmaskTextSelector:l,inlineStylesheet:d,maskInputSelector:p,unmaskInputSelector:h,maskAllText:f,maskInputOptions:_,maskTextFn:m,maskInputFn:g,dataURLOptions:v,inlineImages:b,recordCanvas:E,keepIframeSrcFn:T});if(!x)return console.warn(t,"not serialized"),null;let R;R="__sn"in t?t.__sn.id:!function(t,e){if(e.comment&&t.type===Xi.Comment)return!0;if(t.type===Xi.Element){if(e.script&&("script"===t.tagName||"link"===t.tagName&&("preload"===t.attributes.rel||"modulepreload"===t.attributes.rel)&&"script"===t.attributes.as||"link"===t.tagName&&"prefetch"===t.attributes.rel&&"string"==typeof t.attributes.href&&t.attributes.href.endsWith(".js")))return!0;if(e.headFavicon&&("link"===t.tagName&&"shortcut icon"===t.attributes.rel||"meta"===t.tagName&&(vs(t.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===vs(t.attributes.name)||"icon"===vs(t.attributes.rel)||"apple-touch-icon"===vs(t.attributes.rel)||"shortcut icon"===vs(t.attributes.rel))))return!0;if("meta"===t.tagName){if(e.headMetaDescKeywords&&vs(t.attributes.name).match(/^description|keywords$/))return!0;if(e.headMetaSocial&&(vs(t.attributes.property).match(/^(og|twitter|fb):/)||vs(t.attributes.name).match(/^(og|twitter):/)||"pinterest"===vs(t.attributes.name)))return!0;if(e.headMetaRobots&&("robots"===vs(t.attributes.name)||"googlebot"===vs(t.attributes.name)||"bingbot"===vs(t.attributes.name)))return!0;if(e.headMetaHttpEquiv&&void 0!==t.attributes["http-equiv"])return!0;if(e.headMetaAuthorship&&("author"===vs(t.attributes.name)||"generator"===vs(t.attributes.name)||"framework"===vs(t.attributes.name)||"publisher"===vs(t.attributes.name)||"progid"===vs(t.attributes.name)||vs(t.attributes.property).match(/^article:/)||vs(t.attributes.property).match(/^product:/)))return!0;if(e.headMetaVerification&&("google-site-verification"===vs(t.attributes.name)||"yandex-verification"===vs(t.attributes.name)||"csrf-token"===vs(t.attributes.name)||"p:domain_verify"===vs(t.attributes.name)||"verify-v1"===vs(t.attributes.name)||"verification"===vs(t.attributes.name)||"shopify-checkout-api-token"===vs(t.attributes.name)))return!0}}return!1}(x,y)&&(C||x.type!==Xi.Text||x.isStyle||x.textContent.replace(/^\s+|\s+$/gm,"").length)?es++:rs;const D=Object.assign(x,{id:R});if(t.__sn=D,R===rs)return null;r[R]=t,S&&S(t);let N=!u;if(D.type===Xi.Element&&(N=N&&!D.needBlock,delete D.needBlock,t.shadowRoot&&(D.isShadowHost=!0)),(D.type===Xi.Document||D.type===Xi.Element)&&N){y.headWhitespace&&x.type===Xi.Element&&"head"===x.tagName&&(C=!1);const e={doc:n,map:r,blockClass:i,blockSelector:s,unblockSelector:a,maskTextClass:o,maskTextSelector:c,unmaskTextSelector:l,skipChild:u,inlineStylesheet:d,maskInputSelector:p,unmaskInputSelector:h,maskAllText:f,maskInputOptions:_,maskTextFn:m,maskInputFn:g,slimDOMOptions:y,dataURLOptions:v,inlineImages:b,recordCanvas:E,preserveWhiteSpace:C,onSerialize:S,onIframeLoad:w,iframeLoadTimeout:k,keepIframeSrcFn:T};for(const n of Array.from(t.childNodes)){const t=bs(n,e);t&&D.childNodes.push(t)}if(function(t){return t.nodeType===t.ELEMENT_NODE}(t)&&t.shadowRoot)for(const n of Array.from(t.shadowRoot.childNodes)){const t=bs(n,e);t&&(t.isShadow=!0,D.childNodes.push(t))}}return t.parentNode&&Ki(t.parentNode)&&(D.isShadow=!0),D.type===Xi.Element&&"iframe"===D.tagName&&function(t,e,n){const r=t.contentWindow;if(!r)return;let i,s=!1;try{i=r.document.readyState}catch(t){return}if("complete"!==i){const r=setTimeout(()=>{s||(e(),s=!0)},n);return void t.addEventListener("load",()=>{clearTimeout(r),s=!0,e()})}const a="about:blank";r.location.href===a&&t.src!==a&&""!==t.src?t.addEventListener("load",e):setTimeout(e,0)}(t,()=>{const e=t.contentDocument;if(e&&w){const n=bs(e,{doc:e,map:r,blockClass:i,blockSelector:s,unblockSelector:a,maskTextClass:o,maskTextSelector:c,unmaskTextSelector:l,skipChild:!1,inlineStylesheet:d,maskInputSelector:p,unmaskInputSelector:h,maskAllText:f,maskInputOptions:_,maskTextFn:m,maskInputFn:g,slimDOMOptions:y,dataURLOptions:v,inlineImages:b,recordCanvas:E,preserveWhiteSpace:C,onSerialize:S,onIframeLoad:w,iframeLoadTimeout:k,keepIframeSrcFn:T});n&&w(t,n)}},k),D}function Es(t,e,n){return("video"===t||"audio"===t)&&"autoplay"===e}var Ss,ws,ks,Ts,Cs,xs;function Rs(t,e,n=document){const r={capture:!0,passive:!0};return n.addEventListener(t,e,r),()=>n.removeEventListener(t,e,r)}!function(t){t[t.DomContentLoaded=0]="DomContentLoaded",t[t.Load=1]="Load",t[t.FullSnapshot=2]="FullSnapshot",t[t.IncrementalSnapshot=3]="IncrementalSnapshot",t[t.Meta=4]="Meta",t[t.Custom=5]="Custom",t[t.Plugin=6]="Plugin"}(Ss||(Ss={})),function(t){t[t.Mutation=0]="Mutation",t[t.MouseMove=1]="MouseMove",t[t.MouseInteraction=2]="MouseInteraction",t[t.Scroll=3]="Scroll",t[t.ViewportResize=4]="ViewportResize",t[t.Input=5]="Input",t[t.TouchMove=6]="TouchMove",t[t.MediaInteraction=7]="MediaInteraction",t[t.StyleSheetRule=8]="StyleSheetRule",t[t.CanvasMutation=9]="CanvasMutation",t[t.Font=10]="Font",t[t.Log=11]="Log",t[t.Drag=12]="Drag",t[t.StyleDeclaration=13]="StyleDeclaration"}(ws||(ws={})),function(t){t[t.MouseUp=0]="MouseUp",t[t.MouseDown=1]="MouseDown",t[t.Click=2]="Click",t[t.ContextMenu=3]="ContextMenu",t[t.DblClick=4]="DblClick",t[t.Focus=5]="Focus",t[t.Blur=6]="Blur",t[t.TouchStart=7]="TouchStart",t[t.TouchMove_Departed=8]="TouchMove_Departed",t[t.TouchEnd=9]="TouchEnd",t[t.TouchCancel=10]="TouchCancel"}(ks||(ks={})),function(t){t[t["2D"]=0]="2D",t[t.WebGL=1]="WebGL",t[t.WebGL2=2]="WebGL2"}(Ts||(Ts={})),function(t){t[t.Play=0]="Play",t[t.Pause=1]="Pause",t[t.Seeked=2]="Seeked",t[t.VolumeChange=3]="VolumeChange"}(Cs||(Cs={})),function(t){t.Start="start",t.Pause="pause",t.Resume="resume",t.Resize="resize",t.Finish="finish",t.FullsnapshotRebuilded="fullsnapshot-rebuilded",t.LoadStylesheetStart="load-stylesheet-start",t.LoadStylesheetEnd="load-stylesheet-end",t.SkipStart="skip-start",t.SkipEnd="skip-end",t.MouseInteraction="mouse-interaction",t.EventCast="event-cast",t.CustomEvent="custom-event",t.Flush="flush",t.StateChange="state-change",t.PlayBack="play-back"}(xs||(xs={}));const Ds="Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.";let Ns={map:{},getId:()=>(console.error(Ds),-1),getNode:()=>(console.error(Ds),null),removeNodeFromMap(){console.error(Ds)},has:()=>(console.error(Ds),!1),reset(){console.error(Ds)}};function Is(t,e,n={}){let r=null,i=0;return function(s){let a=Date.now();i||!1!==n.leading||(i=a);let o=e-(a-i),c=this,l=arguments;o<=0||o>e?(r&&(clearTimeout(r),r=null),i=a,t.apply(c,l)):r||!1===n.trailing||(r=setTimeout(()=>{i=!1===n.leading?0:Date.now(),r=null,t.apply(c,l)},o))}}function As(t,e,n,r,i=window){const s=i.Object.getOwnPropertyDescriptor(t,e);return i.Object.defineProperty(t,e,r?n:{set(t){setTimeout(()=>{n.set.call(this,t)},0),s&&s.set&&s.set.call(this,t)}}),()=>As(t,e,s||{},!0)}function Os(t,e,n){try{if(!(e in t))return()=>{};const r=t[e],i=n(r);return"function"==typeof i&&(i.prototype=i.prototype||{},Object.defineProperties(i,{__rrweb_original__:{enumerable:!1,value:r}})),t[e]=i,()=>{t[e]=r}}catch(t){return()=>{}}}function Us(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Bs(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Hs(t,e,n,r){if(!t)return!1;if(t.nodeType===t.ELEMENT_NODE){let i=!1;const s=r&&t.matches(r);return"string"==typeof e?i=void 0!==t.closest?!s&&null!==t.closest("."+e):!s&&t.classList.contains(e):!s&&t.classList.forEach(t=>{e.test(t)&&(i=!0)}),!i&&n&&(i=t.matches(n)),!s&&i||Hs(t.parentNode,e,n,r)}return Hs(t.parentNode,e,n,r)}function Ms(t){return"__sn"in t&&t.__sn.id===rs}function Ps(t,e){if(Ki(t))return!1;const n=e.getId(t);return!e.has(n)||(!t.parentNode||t.parentNode.nodeType!==t.DOCUMENT_NODE)&&(!t.parentNode||Ps(t.parentNode,e))}function Ls(t){return Boolean(t.changedTouches)}function $s(t){return"__sn"in t&&t.__sn.type===Xi.Element&&"iframe"===t.__sn.tagName}function zs(t){return Boolean(null==t?void 0:t.shadowRoot)}function Gs(t){return"__ln"in t}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(Ns=new Proxy(Ns,{get:(t,e,n)=>("map"===e&&console.error(Ds),Reflect.get(t,e,n))}));class Ys{constructor(){this.length=0,this.head=null}get(t){if(t>=this.length)throw new Error("Position outside of list range");let e=this.head;for(let n=0;n<t;n++)e=(null==e?void 0:e.next)||null;return e}addNode(t){const e={value:t,previous:null,next:null};if(t.__ln=e,t.previousSibling&&Gs(t.previousSibling)){const n=t.previousSibling.__ln.next;e.next=n,e.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=e,n&&(n.previous=e)}else if(t.nextSibling&&Gs(t.nextSibling)&&t.nextSibling.__ln.previous){const n=t.nextSibling.__ln.previous;e.previous=n,e.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=e,n&&(n.next=e)}else this.head&&(this.head.previous=e),e.next=this.head,this.head=e;this.length++}removeNode(t){const e=t.__ln;this.head&&(e.previous?(e.previous.next=e.next,e.next&&(e.next.previous=e.previous)):(this.head=e.next,this.head&&(this.head.previous=null)),t.__ln&&delete t.__ln,this.length--)}}const Fs=(t,e)=>`${t}@${e}`;function js(t){return"__sn"in t}class qs{constructor(){this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=t=>{t.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;const t=[],e=new Ys,n=t=>{let e=t,n=rs;for(;n===rs;)e=e&&e.nextSibling,n=e&&this.mirror.getId(e);return n},r=r=>{var i,s,a,o,c;const l=r.getRootNode?null===(i=r.getRootNode())||void 0===i?void 0:i.host:null;let u=l;for(;null===(a=null===(s=null==u?void 0:u.getRootNode)||void 0===s?void 0:s.call(u))||void 0===a?void 0:a.host;)u=(null===(c=null===(o=null==u?void 0:u.getRootNode)||void 0===o?void 0:o.call(u))||void 0===c?void 0:c.host)||null;const d=!(this.doc.contains(r)||u&&this.doc.contains(u));if(!r.parentNode||d)return;const p=Ki(r.parentNode)?this.mirror.getId(l):this.mirror.getId(r.parentNode),h=n(r);if(-1===p||-1===h)return e.addNode(r);let f=bs(r,{doc:this.doc,map:this.mirror.map,blockClass:this.blockClass,blockSelector:this.blockSelector,unblockSelector:this.unblockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,unmaskTextSelector:this.unmaskTextSelector,maskInputSelector:this.maskInputSelector,unmaskInputSelector:this.unmaskInputSelector,skipChild:!0,inlineStylesheet:this.inlineStylesheet,maskAllText:this.maskAllText,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:t=>{$s(t)&&this.iframeManager.addIframe(t),zs(r)&&this.shadowDomManager.addShadowRoot(r.shadowRoot,document)},onIframeLoad:(t,e)=>{this.iframeManager.attachIframe(t,e),this.shadowDomManager.observeAttachShadow(t)}});f&&t.push({parentId:p,nextId:h,node:f})};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const t of this.movedSet)Zs(this.removes,t,this.mirror)&&!this.movedSet.has(t.parentNode)||r(t);for(const t of this.addedSet)Ws(this.droppedSet,t)||Zs(this.removes,t,this.mirror)?Ws(this.movedSet,t)?r(t):this.droppedSet.add(t):r(t);let i=null;for(;e.length;){let t=null;if(i){const e=this.mirror.getId(i.value.parentNode),r=n(i.value);-1!==e&&-1!==r&&(t=i)}if(!t)for(let r=e.length-1;r>=0;r--){const i=e.get(r);if(i){const e=this.mirror.getId(i.value.parentNode),r=n(i.value);if(-1!==e&&-1!==r){t=i;break}}}if(!t){for(;e.head;)e.removeNode(e.head.value);break}i=t.previous,e.removeNode(t.value),r(t.value)}const s={texts:this.texts.map(t=>({id:this.mirror.getId(t.node),value:t.value})).filter(t=>this.mirror.has(t.id)),attributes:this.attributes.map(t=>({id:this.mirror.getId(t.node),attributes:t.attributes})).filter(t=>this.mirror.has(t.id)),removes:this.removes,adds:t};(s.texts.length||s.attributes.length||s.removes.length||s.adds.length)&&(this.texts=[],this.attributes=[],this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(s))},this.processMutation=t=>{if(!Ms(t.target))switch(t.type){case"characterData":{const e=t.target.textContent;Hs(t.target,this.blockClass,this.blockSelector,this.unblockSelector)||e===t.oldValue||this.texts.push({value:ys(t.target,this.maskTextClass,this.maskTextSelector,this.unmaskTextSelector,this.maskAllText)&&e?this.maskTextFn?this.maskTextFn(e):e.replace(/[\S]/g,"*"):e,node:t.target});break}case"attributes":{const e=t.target;let n=e.getAttribute(t.attributeName);if("value"===t.attributeName&&(n=Qi({input:e,maskInputSelector:this.maskInputSelector,unmaskInputSelector:this.unmaskInputSelector,maskInputOptions:this.maskInputOptions,tagName:e.tagName,type:e.getAttribute("type"),value:n,maskInputFn:this.maskInputFn})),Hs(t.target,this.blockClass,this.blockSelector,this.unblockSelector)||n===t.oldValue)return;let r=this.attributes.find(e=>e.node===t.target);if(r||(r={node:t.target,attributes:{}},this.attributes.push(r)),"type"===t.attributeName&&"INPUT"===t.target.tagName&&"password"===(t.oldValue||"").toLowerCase()&&t.target.setAttribute("rr_is_password","true"),"style"===t.attributeName){const n=this.doc.createElement("span");t.oldValue&&n.setAttribute("style",t.oldValue),null==r.attributes.style&&(r.attributes.style={});try{const t=r.attributes.style;for(const r of Array.from(e.style)){const i=e.style.getPropertyValue(r),s=e.style.getPropertyPriority(r);i===n.style.getPropertyValue(r)&&s===n.style.getPropertyPriority(r)||(t[r]=""===s?i:[i,s])}for(const r of Array.from(n.style))""===e.style.getPropertyValue(r)&&(t[r]=!1)}catch(t){console.warn("[rrweb] Error when parsing update to style attribute:",t)}}else{const e=t.target;r.attributes[t.attributeName]=gs(this.doc,e,e.tagName,t.attributeName,n,this.maskAllText,this.unmaskTextSelector,this.maskTextFn)}break}case"childList":t.addedNodes.forEach(e=>this.genAdds(e,t.target)),t.removedNodes.forEach(e=>{const n=this.mirror.getId(e),r=Ki(t.target)?this.mirror.getId(t.target.host):this.mirror.getId(t.target);Hs(t.target,this.blockClass,this.blockSelector,this.unblockSelector)||Ms(e)||(this.addedSet.has(e)?(Vs(this.addedSet,e),this.droppedSet.add(e)):this.addedSet.has(t.target)&&-1===n||Ps(t.target,this.mirror)||(this.movedSet.has(e)&&this.movedMap[Fs(n,r)]?Vs(this.movedSet,e):this.removes.push({parentId:r,id:n,isShadow:!!Ki(t.target)||void 0})),this.mapRemoves.push(e))})}},this.genAdds=(t,e)=>{if(!e||!Hs(e,this.blockClass,this.blockSelector,this.unblockSelector)){if(js(t)){if(Ms(t))return;this.movedSet.add(t);let n=null;e&&js(e)&&(n=e.__sn.id),n&&(this.movedMap[Fs(t.__sn.id,n)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);Hs(t,this.blockClass,this.blockSelector,this.unblockSelector)||t.childNodes.forEach(t=>this.genAdds(t))}}}init(t){["mutationCb","blockClass","blockSelector","unblockSelector","maskTextClass","maskTextSelector","unmaskTextSelector","maskInputSelector","unmaskInputSelector","inlineStylesheet","maskAllText","maskInputOptions","maskTextFn","maskInputFn","recordCanvas","inlineImages","slimDOMOptions","doc","mirror","iframeManager","shadowDomManager","canvasManager"].forEach(e=>{this[e]=t[e]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function Vs(t,e){t.delete(e),e.childNodes.forEach(e=>Vs(t,e))}function Zs(t,e,n){const{parentNode:r}=e;if(!r)return!1;const i=n.getId(r);return!!t.some(t=>t.id===i)||Zs(t,r,n)}function Ws(t,e){const{parentNode:n}=e;return!!n&&(!!t.has(n)||Ws(t,n))}const Xs=t=>(...e)=>{try{return t(...e)}catch(t){try{t.__rrweb__=!0}catch(t){}throw t}},Ks=[];function Js(t){try{if("composedPath"in t){const e=t.composedPath();if(e.length)return e[0]}else if("path"in t&&t.path.length)return t.path[0]}catch(t){}return t&&t.target}function Qs(t,e){var n,r;const i=new qs;Ks.push(i),i.init(t);let s=window.MutationObserver||window.__rrMutationObserver;const a=null===(r=null===(n=null===window||void 0===window?void 0:window.Zone)||void 0===n?void 0:n.__symbol__)||void 0===r?void 0:r.call(n,"MutationObserver");a&&window[a]&&(s=window[a]);const o=new s(Xs(e=>{t.onMutation&&!1===t.onMutation(e)||i.processMutations(e)}));return o.observe(e,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),o}function ta({scrollCb:t,doc:e,mirror:n,blockClass:r,blockSelector:i,unblockSelector:s,sampling:a}){const o=Is(a=>{const o=Js(a);if(!o||Hs(o,r,i,s))return;const c=n.getId(o);if(o===e){const n=e.scrollingElement||e.documentElement;Xs(t)({id:c,x:n.scrollLeft,y:n.scrollTop})}else Xs(t)({id:c,x:o.scrollLeft,y:o.scrollTop})},a.scroll||100);return Rs("scroll",Xs(o),e)}function ea(t,e){const n=Object.assign({},t);return e||delete n.userTriggered,n}const na=["INPUT","TEXTAREA","SELECT"],ra=new WeakMap;function ia(t){return function(t,e){if(aa("CSSGroupingRule")&&t.parentRule instanceof CSSGroupingRule||aa("CSSMediaRule")&&t.parentRule instanceof CSSMediaRule||aa("CSSSupportsRule")&&t.parentRule instanceof CSSSupportsRule||aa("CSSConditionRule")&&t.parentRule instanceof CSSConditionRule){const n=Array.from(t.parentRule.cssRules).indexOf(t);e.unshift(n)}else{const n=Array.from(t.parentStyleSheet.cssRules).indexOf(t);e.unshift(n)}return e}(t,[])}function sa(t,e={}){const n=t.doc.defaultView;if(!n)return()=>{};!function(t,e){const{mutationCb:n,mousemoveCb:r,mouseInteractionCb:i,scrollCb:s,viewportResizeCb:a,inputCb:o,mediaInteractionCb:c,styleSheetRuleCb:l,styleDeclarationCb:u,canvasMutationCb:d,fontCb:p}=t;t.mutationCb=(...t)=>{e.mutation&&e.mutation(...t),n(...t)},t.mousemoveCb=(...t)=>{e.mousemove&&e.mousemove(...t),r(...t)},t.mouseInteractionCb=(...t)=>{e.mouseInteraction&&e.mouseInteraction(...t),i(...t)},t.scrollCb=(...t)=>{e.scroll&&e.scroll(...t),s(...t)},t.viewportResizeCb=(...t)=>{e.viewportResize&&e.viewportResize(...t),a(...t)},t.inputCb=(...t)=>{e.input&&e.input(...t),o(...t)},t.mediaInteractionCb=(...t)=>{e.mediaInteaction&&e.mediaInteaction(...t),c(...t)},t.styleSheetRuleCb=(...t)=>{e.styleSheetRule&&e.styleSheetRule(...t),l(...t)},t.styleDeclarationCb=(...t)=>{e.styleDeclaration&&e.styleDeclaration(...t),u(...t)},t.canvasMutationCb=(...t)=>{e.canvasMutation&&e.canvasMutation(...t),d(...t)},t.fontCb=(...t)=>{e.font&&e.font(...t),p(...t)}}(t,e);const r=Qs(t,t.doc),i=function({mousemoveCb:t,sampling:e,doc:n,mirror:r}){if(!1===e.mousemove)return()=>{};const i="number"==typeof e.mousemove?e.mousemove:50;let s,a=[];const o=Is(e=>{const n=Date.now()-s;Xs(t)(a.map(t=>(t.timeOffset-=n,t)),e),a=[],s=null},"number"==typeof e.mousemoveCallback?e.mousemoveCallback:500),c=Is(t=>{const e=Js(t),{clientX:n,clientY:i}=Ls(t)?t.changedTouches[0]:t;s||(s=Date.now()),a.push({x:n,y:i,id:r.getId(e),timeOffset:Date.now()-s}),o("undefined"!=typeof DragEvent&&t instanceof DragEvent?ws.Drag:t instanceof MouseEvent?ws.MouseMove:ws.TouchMove)},i,{trailing:!1}),l=[Rs("mousemove",Xs(c),n),Rs("touchmove",Xs(c),n),Rs("drag",Xs(c),n)];return Xs(()=>{l.forEach(t=>t())})}(t),s=function({mouseInteractionCb:t,doc:e,mirror:n,blockClass:r,blockSelector:i,unblockSelector:s,sampling:a}){if(!1===a.mouseInteraction)return()=>{};const o=!0===a.mouseInteraction||void 0===a.mouseInteraction?{}:a.mouseInteraction,c=[];return Object.keys(ks).filter(t=>Number.isNaN(Number(t))&&!t.endsWith("_Departed")&&!1!==o[t]).forEach(a=>{const o=a.toLowerCase(),l=Xs((e=>a=>{const o=Js(a);if(Hs(o,r,i,s))return;const c=Ls(a)?a.changedTouches[0]:a;if(!c)return;const l=n.getId(o),{clientX:u,clientY:d}=c;Xs(t)({type:ks[e],id:l,x:u,y:d})})(a));c.push(Rs(o,l,e))}),Xs(()=>{c.forEach(t=>t())})}(t),a=ta(t),o=function({viewportResizeCb:t}){let e=-1,n=-1;const r=Is(()=>{const r=Us(),i=Bs();e===r&&n===i||(Xs(t)({width:Number(i),height:Number(r)}),e=r,n=i)},200);return Rs("resize",Xs(r),window)}(t),c=function({inputCb:t,doc:e,mirror:n,blockClass:r,blockSelector:i,unblockSelector:s,ignoreClass:a,ignoreSelector:o,maskInputSelector:c,unmaskInputSelector:l,maskInputOptions:u,maskInputFn:d,sampling:p,userTriggeredOnInput:h}){function f(t){let n=Js(t);const p=n&&n.tagName,f=t.isTrusted;if("OPTION"===p&&(n=n.parentElement),!n||!p||na.indexOf(p)<0||Hs(n,r,i,s))return;let m=n.type;if(n.classList.contains(a)||o&&n.matches(o))return;let g=n.value,y=!1;n.hasAttribute("rr_is_password")&&(m="password"),"radio"===m||"checkbox"===m?y=n.checked:function({tagName:t,type:e,maskInputOptions:n,maskInputSelector:r}){return r||Ji({maskInputOptions:n,tagName:t,type:e})}({maskInputOptions:u,maskInputSelector:c,tagName:p,type:m})&&(g=Qi({input:n,maskInputOptions:u,maskInputSelector:c,unmaskInputSelector:l,tagName:p,type:m,value:g,maskInputFn:d})),_(n,Xs(ea)({text:g,isChecked:y,userTriggered:f},h));const v=n.name;"radio"===m&&v&&y&&e.querySelectorAll(`input[type="radio"][name="${v}"]`).forEach(t=>{t!==n&&_(t,Xs(ea)({text:t.value,isChecked:!y,userTriggered:!1},h))})}function _(e,r){const i=ra.get(e);if(!i||i.text!==r.text||i.isChecked!==r.isChecked){ra.set(e,r);const i=n.getId(e);t(Object.assign(Object.assign({},r),{id:i}))}}const m=("last"===p.input?["change"]:["input","change"]).map(t=>Rs(t,Xs(f),e)),g=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value"),y=[[HTMLInputElement.prototype,"value"],[HTMLInputElement.prototype,"checked"],[HTMLSelectElement.prototype,"value"],[HTMLTextAreaElement.prototype,"value"],[HTMLSelectElement.prototype,"selectedIndex"],[HTMLOptionElement.prototype,"selected"]];return g&&g.set&&m.push(...y.map(t=>As(t[0],t[1],{set(){Xs(f)({target:this})}}))),Xs(()=>{m.forEach(t=>t())})}(t),l=function({mediaInteractionCb:t,blockClass:e,blockSelector:n,unblockSelector:r,mirror:i,sampling:s}){const a=a=>Is(Xs(s=>{const o=Js(s);if(!o||Hs(o,e,n,r))return;const{currentTime:c,volume:l,muted:u}=o;t({type:a,id:i.getId(o),currentTime:c,volume:l,muted:u})}),s.media||500),o=[Rs("play",a(0)),Rs("pause",a(1)),Rs("seeked",a(2)),Rs("volumechange",a(3))];return Xs(()=>{o.forEach(t=>t())})}(t),u=function({styleSheetRuleCb:t,mirror:e},{win:n}){if(!n.CSSStyleSheet||!n.CSSStyleSheet.prototype)return()=>{};const r=n.CSSStyleSheet.prototype.insertRule;n.CSSStyleSheet.prototype.insertRule=new Proxy(r,{apply:Xs((n,r,i)=>{const[s,a]=i,o=e.getId(r.ownerNode);return-1!==o&&t({id:o,adds:[{rule:s,index:a}]}),n.apply(r,i)})});const i=n.CSSStyleSheet.prototype.deleteRule;n.CSSStyleSheet.prototype.deleteRule=new Proxy(i,{apply:Xs((n,r,i)=>{const[s]=i,a=e.getId(r.ownerNode);return-1!==a&&t({id:a,removes:[{index:s}]}),n.apply(r,i)})});const s={};oa("CSSGroupingRule")?s.CSSGroupingRule=n.CSSGroupingRule:(oa("CSSMediaRule")&&(s.CSSMediaRule=n.CSSMediaRule),oa("CSSConditionRule")&&(s.CSSConditionRule=n.CSSConditionRule),oa("CSSSupportsRule")&&(s.CSSSupportsRule=n.CSSSupportsRule));const a={};return Object.entries(s).forEach(([n,r])=>{a[n]={insertRule:r.prototype.insertRule,deleteRule:r.prototype.deleteRule},r.prototype.insertRule=new Proxy(a[n].insertRule,{apply:Xs((n,r,i)=>{const[s,a]=i,o=e.getId(r.parentStyleSheet.ownerNode);return-1!==o&&t({id:o,adds:[{rule:s,index:[...ia(r),a||0]}]}),n.apply(r,i)})}),r.prototype.deleteRule=new Proxy(a[n].deleteRule,{apply:Xs((n,r,i)=>{const[s]=i,a=e.getId(r.parentStyleSheet.ownerNode);return-1!==a&&t({id:a,removes:[{index:[...ia(r),s]}]}),n.apply(r,i)})})}),Xs(()=>{n.CSSStyleSheet.prototype.insertRule=r,n.CSSStyleSheet.prototype.deleteRule=i,Object.entries(s).forEach(([t,e])=>{e.prototype.insertRule=a[t].insertRule,e.prototype.deleteRule=a[t].deleteRule})})}(t,{win:n}),d=function({styleDeclarationCb:t,mirror:e},{win:n}){const r=n.CSSStyleDeclaration.prototype.setProperty;n.CSSStyleDeclaration.prototype.setProperty=new Proxy(r,{apply:Xs((n,r,i)=>{var s,a;const[o,c,l]=i,u=e.getId(null===(a=null===(s=r.parentRule)||void 0===s?void 0:s.parentStyleSheet)||void 0===a?void 0:a.ownerNode);return-1!==u&&t({id:u,set:{property:o,value:c,priority:l},index:ia(r.parentRule)}),n.apply(r,i)})});const i=n.CSSStyleDeclaration.prototype.removeProperty;return n.CSSStyleDeclaration.prototype.removeProperty=new Proxy(i,{apply:Xs((n,r,i)=>{var s,a;const[o]=i,c=e.getId(null===(a=null===(s=r.parentRule)||void 0===s?void 0:s.parentStyleSheet)||void 0===a?void 0:a.ownerNode);return-1!==c&&t({id:c,remove:{property:o},index:ia(r.parentRule)}),n.apply(r,i)})}),Xs(()=>{n.CSSStyleDeclaration.prototype.setProperty=r,n.CSSStyleDeclaration.prototype.removeProperty=i})}(t,{win:n}),p=t.collectFonts?function({fontCb:t,doc:e}){const n=e.defaultView;if(!n)return()=>{};const r=[],i=new WeakMap,s=n.FontFace;n.FontFace=function(t,e,n){const r=new s(t,e,n);return i.set(r,{family:t,buffer:"string"!=typeof e,descriptors:n,fontSource:"string"==typeof e?e:JSON.stringify(Array.from(new Uint8Array(e)))}),r};const a=Os(e.fonts,"add",function(e){return function(n){return setTimeout(()=>{const e=i.get(n);e&&(t(e),i.delete(n))},0),e.apply(this,[n])}});return r.push(()=>{n.FontFace=s}),r.push(a),Xs(()=>{r.forEach(t=>t())})}(t):()=>{},h=[];for(const e of t.plugins)h.push(e.observer(e.callback,n,e.options));return Xs(()=>{Ks.forEach(t=>t.reset()),r.disconnect(),i(),s(),a(),o(),c(),l();try{u(),d()}catch(t){}p(),h.forEach(t=>t())})}function aa(t){return void 0!==window[t]}function oa(t){return Boolean(void 0!==window[t]&&window[t].prototype&&"insertRule"in window[t].prototype&&"deleteRule"in window[t].prototype)}class ca{constructor(t){this.iframes=new WeakMap,this.mutationCb=t.mutationCb}addIframe(t){this.iframes.set(t,!0)}addLoadListener(t){this.loadListener=t}attachIframe(t,e){var n;this.mutationCb({adds:[{parentId:t.__sn.id,nextId:null,node:e}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),null===(n=this.loadListener)||void 0===n||n.call(this,t)}}class la{constructor(t){this.restorePatches=[],this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror;const e=this;this.restorePatches.push(Os(HTMLElement.prototype,"attachShadow",function(t){return function(){const n=t.apply(this,arguments);return this.shadowRoot&&e.addShadowRoot(this.shadowRoot,this.ownerDocument),n}}))}addShadowRoot(t,e){Qs(Object.assign(Object.assign({},this.bypassOptions),{doc:e,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),t),ta(Object.assign(Object.assign({},this.bypassOptions),{scrollCb:this.scrollCb,doc:t,mirror:this.mirror}))}observeAttachShadow(t){if(t.contentWindow){const e=this;this.restorePatches.push(Os(t.contentWindow.HTMLElement.prototype,"attachShadow",function(n){return function(){const r=n.apply(this,arguments);return this.shadowRoot&&e.addShadowRoot(this.shadowRoot,t.contentDocument),r}}))}}reset(){this.restorePatches.forEach(t=>t())}}for(var ua="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",da="undefined"==typeof Uint8Array?[]:new Uint8Array(256),pa=0;pa<64;pa++)da[ua.charCodeAt(pa)]=pa;const ha=new Map,fa=(t,e,n)=>{if(!t||!ga(t,e)&&"object"!=typeof t)return;const r=function(t,e){let n=ha.get(t);return n||(n=new Map,ha.set(t,n)),n.has(e)||n.set(e,[]),n.get(e)}(n,t.constructor.name);let i=r.indexOf(t);return-1===i&&(i=r.length,r.push(t)),i};function _a(t,e,n){if(t instanceof Array)return t.map(t=>_a(t,e,n));if(null===t)return t;if(t instanceof Float32Array||t instanceof Float64Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Uint8Array||t instanceof Uint16Array||t instanceof Int16Array||t instanceof Int8Array||t instanceof Uint8ClampedArray)return{rr_type:t.constructor.name,args:[Object.values(t)]};if(t instanceof ArrayBuffer){const e=t.constructor.name,n=function(t){var e,n=new Uint8Array(t),r=n.length,i="";for(e=0;e<r;e+=3)i+=ua[n[e]>>2],i+=ua[(3&n[e])<<4|n[e+1]>>4],i+=ua[(15&n[e+1])<<2|n[e+2]>>6],i+=ua[63&n[e+2]];return r%3==2?i=i.substring(0,i.length-1)+"=":r%3==1&&(i=i.substring(0,i.length-2)+"=="),i}(t);return{rr_type:e,base64:n}}if(t instanceof DataView)return{rr_type:t.constructor.name,args:[_a(t.buffer,e,n),t.byteOffset,t.byteLength]};if(t instanceof HTMLImageElement){const e=t.constructor.name,{src:n}=t;return{rr_type:e,src:n}}return t instanceof ImageData?{rr_type:t.constructor.name,args:[_a(t.data,e,n),t.width,t.height]}:ga(t,e)||"object"==typeof t?{rr_type:t.constructor.name,index:fa(t,e,n)}:t}const ma=(t,e,n)=>[...t].map(t=>_a(t,e,n)),ga=(t,e)=>{const n=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(t=>"function"==typeof e[t]);return Boolean(n.find(n=>t instanceof e[n]))};function ya(t,e,n,r,i,s,a,o){const c=[],l=Object.getOwnPropertyNames(t);for(const u of l)try{if("function"!=typeof t[u])continue;const l=Os(t,u,function(c){return function(...l){const d=c.apply(this,l);if(fa(d,o,t),!Hs(this.canvas,r,s,i)){a.getId(this.canvas);const r=ma([...l],o,t);n(this.canvas,{type:e,property:u,args:r})}return d}});c.push(l)}catch(r){const i=As(t,u,{set(t){n(this.canvas,{type:e,property:u,args:[t],setter:!0})}});c.push(i)}return c}class va{reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}constructor(t){this.pendingCanvasMutations=new Map,this.rafStamps={latestId:0,invokeId:null},this.frozen=!1,this.locked=!1,this.processMutation=function(t,e){!(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId)&&this.rafStamps.invokeId||(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(t)||this.pendingCanvasMutations.set(t,[]),this.pendingCanvasMutations.get(t).push(e)},this.mutationCb=t.mutationCb,this.mirror=t.mirror,!0===t.recordCanvas&&this.initCanvasMutationObserver(t.win,t.blockClass,t.blockSelector,t.unblockSelector)}initCanvasMutationObserver(t,e,n,r){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const i=function(t,e,n,r){const i=[];try{const s=Os(t.HTMLCanvasElement.prototype,"getContext",function(t){return function(i,...s){return Hs(this,e,n,r)||"__context"in this||(this.__context=i),t.apply(this,[i,...s])}});i.push(s)}catch(t){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{i.forEach(t=>t())}}(t,e,r,n),s=function(t,e,n,r,i,s){const a=[],o=Object.getOwnPropertyNames(e.CanvasRenderingContext2D.prototype);for(const s of o)try{if("function"!=typeof e.CanvasRenderingContext2D.prototype[s])continue;const o=Os(e.CanvasRenderingContext2D.prototype,s,function(e){return function(...a){return Hs(this.canvas,n,i,r)||setTimeout(()=>{const e=[...a];if("drawImage"===s&&e[0]&&e[0]instanceof HTMLCanvasElement){const t=e[0],n=t.getContext("2d");let r=null==n?void 0:n.getImageData(0,0,t.width,t.height);e[0]=JSON.stringify(null==r?void 0:r.data)}t(this.canvas,{type:Ts["2D"],property:s,args:e})},0),e.apply(this,a)}});a.push(o)}catch(n){const r=As(e.CanvasRenderingContext2D.prototype,s,{set(e){t(this.canvas,{type:Ts["2D"],property:s,args:[e],setter:!0})}});a.push(r)}return()=>{a.forEach(t=>t())}}(this.processMutation.bind(this),t,e,r,n),a=function(t,e,n,r,i,s){const a=[];return a.push(...ya(e.WebGLRenderingContext.prototype,Ts.WebGL,t,n,r,i,s,e)),void 0!==e.WebGL2RenderingContext&&a.push(...ya(e.WebGL2RenderingContext.prototype,Ts.WebGL2,t,n,r,i,s,e)),()=>{a.forEach(t=>t())}}(this.processMutation.bind(this),t,e,r,n,this.mirror);this.resetObservers=()=>{i(),s(),a()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const t=e=>{this.rafStamps.latestId=e,requestAnimationFrame(t)};requestAnimationFrame(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((t,e)=>{const n=this.mirror.getId(e);this.flushPendingCanvasMutationFor(e,n)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(t,e){if(this.frozen||this.locked)return;const n=this.pendingCanvasMutations.get(t);if(!n||-1===e)return;const r=n.map(t=>{const e=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(t);i<r.length;i++)e.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(t,r[i])&&(n[r[i]]=t[r[i]])}return n}(t,["type"]);return e}),{type:i}=n[0];this.mutationCb({id:e,type:i,commands:r}),this.pendingCanvasMutations.delete(t)}}function ba(t){return Object.assign(Object.assign({},t),{timestamp:Date.now()})}let Ea,Sa;const wa={map:{},getId:t=>t&&t.__sn?t.__sn.id:-1,getNode(t){return this.map[t]||null},removeNodeFromMap(t){delete this.map[t.__sn&&t.__sn.id],t.childNodes&&t.childNodes.forEach(t=>this.removeNodeFromMap(t))},has(t){return this.map.hasOwnProperty(t)},reset(){this.map={}}};function ka(t={}){const{emit:e,checkoutEveryNms:n,checkoutEveryNth:r,blockClass:i="rr-block",blockSelector:s=null,unblockSelector:a=null,ignoreClass:o="rr-ignore",ignoreSelector:c=null,maskTextClass:l="rr-mask",maskTextSelector:u=null,maskInputSelector:d=null,unmaskTextSelector:p=null,unmaskInputSelector:h=null,inlineStylesheet:f=!0,maskAllText:_=!1,maskAllInputs:m,maskInputOptions:g,slimDOMOptions:y,maskInputFn:v,maskTextFn:b,hooks:E,packFn:S,sampling:w={},mousemoveWait:k,recordCanvas:T=!1,userTriggeredOnInput:C=!1,collectFonts:x=!1,inlineImages:R=!1,plugins:D,keepIframeSrcFn:N=(()=>!1),onMutation:I}=t;if(!e)throw new Error("emit function is required");void 0!==k&&void 0===w.mousemove&&(w.mousemove=k);const A=!0===m?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,radio:!0,checkbox:!0}:void 0!==g?g:{},O=!0===y||"all"===y?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===y,headMetaDescKeywords:"all"===y}:y||{};let U;!function(t=window){"NodeList"in t&&!t.NodeList.prototype.forEach&&(t.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in t&&!t.DOMTokenList.prototype.forEach&&(t.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=function(t){if(!(0 in arguments))throw new TypeError("1 argument is required");do{if(this===t)return!0}while(t=t&&t.parentNode);return!1})}();let B=0;Ea=(t,i)=>{var s;if(!(null===(s=Ks[0])||void 0===s?void 0:s.isFrozen())||t.type===Ss.FullSnapshot||t.type===Ss.IncrementalSnapshot&&t.data.source===ws.Mutation||Ks.forEach(t=>t.unfreeze()),e((t=>{for(const e of D||[])e.eventProcessor&&(t=e.eventProcessor(t));return S&&(t=S(t)),t})(t),i),t.type===Ss.FullSnapshot)U=t,B=0;else if(t.type===Ss.IncrementalSnapshot){if(t.data.source===ws.Mutation&&t.data.isAttachIframe)return;B++,(r&&B>=r||n&&t.timestamp-U.timestamp>n)&&Sa(!0)}};const H=t=>{Ea(ba({type:Ss.IncrementalSnapshot,data:Object.assign({source:ws.Mutation},t)}))},M=t=>Ea(ba({type:Ss.IncrementalSnapshot,data:Object.assign({source:ws.Scroll},t)})),P=t=>Ea(ba({type:Ss.IncrementalSnapshot,data:Object.assign({source:ws.CanvasMutation},t)})),L=new ca({mutationCb:H}),$=new va({recordCanvas:T,mutationCb:P,win:window,blockClass:i,blockSelector:s,unblockSelector:a,mirror:wa}),z=new la({mutationCb:H,scrollCb:M,bypassOptions:{onMutation:I,blockClass:i,blockSelector:s,unblockSelector:a,maskTextClass:l,maskTextSelector:u,unmaskTextSelector:p,maskInputSelector:d,unmaskInputSelector:h,inlineStylesheet:f,maskAllText:_,maskInputOptions:A,maskTextFn:b,maskInputFn:v,recordCanvas:T,inlineImages:R,sampling:w,slimDOMOptions:O,iframeManager:L,canvasManager:$},mirror:wa});Sa=(t=!1)=>{var e,n,r,o;Ea(ba({type:Ss.Meta,data:{href:window.location.href,width:Bs(),height:Us()}}),t),Ks.forEach(t=>t.lock());const[c,m]=function(t,e){const{blockClass:n="rr-block",blockSelector:r=null,unblockSelector:i=null,maskTextClass:s="rr-mask",maskTextSelector:a=null,unmaskTextSelector:o=null,inlineStylesheet:c=!0,inlineImages:l=!1,recordCanvas:u=!1,maskInputSelector:d=null,unmaskInputSelector:p=null,maskAllText:h=!1,maskAllInputs:f=!1,maskTextFn:_,maskInputFn:m,slimDOM:g=!1,dataURLOptions:y,preserveWhiteSpace:v,onSerialize:b,onIframeLoad:E,iframeLoadTimeout:S,keepIframeSrcFn:w=(()=>!1)}=e||{},k={};return[bs(t,{doc:t,map:k,blockClass:n,blockSelector:r,unblockSelector:i,maskTextClass:s,maskTextSelector:a,unmaskTextSelector:o,skipChild:!1,inlineStylesheet:c,maskInputSelector:d,unmaskInputSelector:p,maskAllText:h,maskInputOptions:!0===f?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0}:!1===f?{}:f,maskTextFn:_,maskInputFn:m,slimDOMOptions:!0===g||"all"===g?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===g,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===g?{}:g,dataURLOptions:y,inlineImages:l,recordCanvas:u,preserveWhiteSpace:v,onSerialize:b,onIframeLoad:E,iframeLoadTimeout:S,keepIframeSrcFn:w}),k]}(document,{blockClass:i,blockSelector:s,unblockSelector:a,maskTextClass:l,maskTextSelector:u,unmaskTextSelector:p,maskInputSelector:d,unmaskInputSelector:h,inlineStylesheet:f,maskAllText:_,maskAllInputs:A,maskTextFn:b,slimDOM:O,recordCanvas:T,inlineImages:R,onSerialize:t=>{$s(t)&&L.addIframe(t),zs(t)&&z.addShadowRoot(t.shadowRoot,document)},onIframeLoad:(t,e)=>{L.attachIframe(t,e),z.observeAttachShadow(t)},keepIframeSrcFn:N});if(!c)return console.warn("Failed to snapshot the document");wa.map=m,Ea(ba({type:Ss.FullSnapshot,data:{node:c,initialOffset:{left:void 0!==window.pageXOffset?window.pageXOffset:(null===document||void 0===document?void 0:document.documentElement.scrollLeft)||(null===(n=null===(e=null===document||void 0===document?void 0:document.body)||void 0===e?void 0:e.parentElement)||void 0===n?void 0:n.scrollLeft)||(null===document||void 0===document?void 0:document.body.scrollLeft)||0,top:void 0!==window.pageYOffset?window.pageYOffset:(null===document||void 0===document?void 0:document.documentElement.scrollTop)||(null===(o=null===(r=null===document||void 0===document?void 0:document.body)||void 0===r?void 0:r.parentElement)||void 0===o?void 0:o.scrollTop)||(null===document||void 0===document?void 0:document.body.scrollTop)||0}}})),Ks.forEach(t=>t.unlock())};try{const t=[];t.push(Rs("DOMContentLoaded",()=>{Ea(ba({type:Ss.DomContentLoaded,data:{}}))}));const e=t=>{var e;return Xs(sa)({onMutation:I,mutationCb:H,mousemoveCb:(t,e)=>Ea(ba({type:Ss.IncrementalSnapshot,data:{source:e,positions:t}})),mouseInteractionCb:t=>Ea(ba({type:Ss.IncrementalSnapshot,data:Object.assign({source:ws.MouseInteraction},t)})),scrollCb:M,viewportResizeCb:t=>Ea(ba({type:Ss.IncrementalSnapshot,data:Object.assign({source:ws.ViewportResize},t)})),inputCb:t=>Ea(ba({type:Ss.IncrementalSnapshot,data:Object.assign({source:ws.Input},t)})),mediaInteractionCb:t=>Ea(ba({type:Ss.IncrementalSnapshot,data:Object.assign({source:ws.MediaInteraction},t)})),styleSheetRuleCb:t=>Ea(ba({type:Ss.IncrementalSnapshot,data:Object.assign({source:ws.StyleSheetRule},t)})),styleDeclarationCb:t=>Ea(ba({type:Ss.IncrementalSnapshot,data:Object.assign({source:ws.StyleDeclaration},t)})),canvasMutationCb:P,fontCb:t=>Ea(ba({type:Ss.IncrementalSnapshot,data:Object.assign({source:ws.Font},t)})),blockClass:i,ignoreClass:o,ignoreSelector:c,maskTextClass:l,maskTextSelector:u,unmaskTextSelector:p,maskInputSelector:d,unmaskInputSelector:h,maskInputOptions:A,inlineStylesheet:f,sampling:w,recordCanvas:T,inlineImages:R,userTriggeredOnInput:C,collectFonts:x,doc:t,maskAllText:_,maskInputFn:v,maskTextFn:b,blockSelector:s,unblockSelector:a,slimDOMOptions:O,mirror:wa,iframeManager:L,shadowDomManager:z,canvasManager:$,plugins:(null===(e=null==D?void 0:D.filter(t=>t.observer))||void 0===e?void 0:e.map(t=>({observer:t.observer,options:t.options,callback:e=>Ea(ba({type:Ss.Plugin,data:{plugin:t.name,payload:e}}))})))||[]},E)};L.addLoadListener(n=>{try{t.push(e(n.contentDocument))}catch(t){console.warn(t)}});const n=()=>{Sa(),t.push(e(document))};return"interactive"===document.readyState||"complete"===document.readyState?n():t.push(Rs("load",()=>{Ea(ba({type:Ss.Load,data:{}})),n()},window)),()=>{t.forEach(t=>t())}}catch(t){console.warn(t)}}ka.addCustomEvent=(t,e)=>{if(!Ea)throw new Error("please add custom event after start recording");Ea(ba({type:Ss.Custom,data:{tag:t,payload:e}}))},ka.freezePage=()=>{Ks.forEach(t=>t.freeze())},ka.takeFullSnapshot=t=>{if(!Sa)throw new Error("please take full snapshot after start recording");Sa(t)},ka.mirror=wa;const Ta=["name","type","startTime","transferSize","duration"];function Ca(t){return function(e){return Ta.every(n=>t[n]===e[n])}}class xa{constructor(){this.events=[]}get hasEvents(){return this.events.length>0}destroy(){this.events=[]}async addEvent(t,e){e?this.events=[t]:this.events.push(t)}finish(){return new Promise(t=>{const e=this.events;this.events=[],t(JSON.stringify(e))})}}class Ra{constructor(t){this._worker=t,this._id=0}ensureReady(){return this._ensureReadyPromise||(this._ensureReadyPromise=new Promise((t,e)=>{this._worker.addEventListener("message",({data:n})=>{n.success?t():e()},{once:!0}),this._worker.addEventListener("error",t=>{e(t)},{once:!0})})),this._ensureReadyPromise}destroy(){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.log("[Replay] Destroying compression worker"),this._worker.terminate()}postMessage(t,e){const n=this._getAndIncrementId();return new Promise((r,i)=>{const s=({data:e})=>{const a=e;if(a.method===t&&a.id===n){if(this._worker.removeEventListener("message",s),!a.success)return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.error("[Replay]",a.response),void i(new Error("Error in compression worker"));r(a.response)}};this._worker.addEventListener("message",s),this._worker.postMessage({id:n,method:t,arg:e})})}_getAndIncrementId(){return this._id++}}class Da{constructor(t){this._worker=new Ra(t),this.hasEvents=!1}ensureReady(){return this._worker.ensureReady()}destroy(){this._worker.destroy()}async addEvent(t,e){return this.hasEvents=!0,e&&await this._clear(),this._sendEventToWorker(t)}finish(){return this._finishRequest()}_sendEventToWorker(t){return this._worker.postMessage("addEvent",JSON.stringify(t))}async _finishRequest(){const t=await this._worker.postMessage("finish");return this.hasEvents=!1,t}_clear(){return this._worker.postMessage("clear")}}class Na{constructor(t){this._fallback=new xa,this._compression=new Da(t),this._used=this._fallback,this._ensureWorkerIsLoadedPromise=this._ensureWorkerIsLoaded()}get hasEvents(){return this._used.hasEvents}destroy(){this._fallback.destroy(),this._compression.destroy()}addEvent(t,e){return this._used.addEvent(t,e)}async finish(){return await this.ensureWorkerIsLoaded(),this._used.finish()}ensureWorkerIsLoaded(){return this._ensureWorkerIsLoadedPromise}async _ensureWorkerIsLoaded(){try{await this._compression.ensureReady()}catch(t){return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.log("[Replay] Failed to load the compression worker, falling back to simple buffer"))}await this._switchToCompressionWorker()}async _switchToCompressionWorker(){const{events:t}=this._fallback,e=[];for(const n of t)e.push(this._compression.addEvent(n));this._used=this._compression;try{await Promise.all(e)}catch(t){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.warn("[Replay] Failed to add events when switching buffers.",t)}}}function Ia(t,e,n=+new Date){return null===t||void 0===e||e<0||0!==e&&t+e<=n}function Aa(t,e,n=+new Date){return Ia(t.started,e.maxSessionLife,n)||Ia(t.lastActivity,e.sessionIdle,n)}function Oa(t){if("sessionStorage"in qi)try{qi.sessionStorage.setItem(Vi,JSON.stringify(t))}catch(t){}}function Ua(t){return void 0!==t&&Math.random()<t}function Ba(t){const e=Date.now();return{id:t.id||cn(),started:t.started||e,lastActivity:t.lastActivity||e,segmentId:t.segmentId||0,sampled:t.sampled}}function Ha({sessionSampleRate:t,errorSampleRate:e,stickySession:n=!1}){const r=function(t,e){return Ua(t)?"session":!!Ua(e)&&"error"}(t,e),i=Ba({sampled:r});return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.log(`[Replay] Creating new session: ${i.id}`),n&&Oa(i),i}async function Ma(t,e,n){if(!t.eventBuffer)return null;if(t.isPaused())return null;const r=e.timestamp>9999999999?e.timestamp:1e3*e.timestamp;if(r+t.timeouts.sessionIdle<Date.now())return null;const i=t.getContext().earliestEvent;t.session&&0===t.session.segmentId&&(!i||r<i)&&(t.getContext().earliestEvent=r);try{return await t.eventBuffer.addEvent(e,n)}catch(e){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.error(e),t.stop("addEvent");const n=or().getClient();n&&n.recordDroppedEvent("internal_sdk_error","replay")}}function Pa(t){return!t.type}function La(t){return"transaction"===t.type}function $a(t){const e=function(){const t=or().getClient();if(!t)return!1;const e=t.getTransport();return e&&e.send.__sentry__baseTransport__||!1}();return(n,r)=>{if(!Pa(n)&&!La(n))return;const i=r&&r.statusCode;e&&(!i||i<200||i>=300)||(La(n)&&n.contexts&&n.contexts.trace&&n.contexts.trace.trace_id?t.getContext().traceIds.add(n.contexts.trace.trace_id):Pa(n)&&(n.event_id&&t.getContext().errorIds.add(n.event_id),"error"===t.recordingMode&&n.exception&&n.message!==Zi&&setTimeout(async()=>{await t.flushImmediate(),t.stopRecording()&&(t.recordingMode="session",t.startRecording())})))}}var za;function Ga(t){return{timestamp:Date.now()/1e3,type:"default",...t}}function Ya(t,e){"sentry.transaction"!==e.category&&(["ui.click","ui.input"].includes(e.category)?t.triggerUserActivity():t.checkAndHandleExpiredSession(),t.addUpdate(()=>(Ma(t,{type:Ss.Custom,timestamp:1e3*(e.timestamp||0),data:{tag:"breadcrumb",payload:yn(e,10,1e3)}}),"console"===e.category)))}!function(t){t[t.Document=0]="Document",t[t.DocumentType=1]="DocumentType",t[t.Element=2]="Element",t[t.Text=3]="Text",t[t.CDATA=4]="CDATA",t[t.Comment=5]="Comment"}(za||(za={}));const Fa=new Set(["id","class","aria-label","role","name","alt","title","data-test-id","data-testid"]);function ja(t){const e={};for(const n in t)if(Fa.has(n)){let r=n;"data-testid"!==n&&"data-test-id"!==n||(r="testId"),e[r]=t[n]}return e}function qa(t,e){return e.map(({type:e,start:n,end:r,name:i,data:s})=>Ma(t,{type:Ss.Custom,timestamp:n,data:{tag:"performanceSpan",payload:{op:e,description:i,startTimestamp:n,endTimestamp:r,data:s}}}))}function Va(t,e){t.isEnabled()&&null!==e&&(function(t,e){return("undefined"!=typeof __SENTRY_DEBUG__&&!__SENTRY_DEBUG__||!t.getOptions()._experiments.traceInternals)&&function(t){const e=or().getClient(),n=e&&e.getDsn();return!!n&&t.includes(n.host)}(e)}(t,e.name)||t.addUpdate(()=>(qa(t,[e]),!0)))}const Za=10,Wa=11,Xa=12,Ka=13,Ja=14,Qa=15,to=20,eo=21,no=22,ro=23,io=["true","false","null"];function so(t,e,n){const r=t[t.length-1],i=e[n];if(!/\s/.test(i))if('"'!==i||ao(e,n))switch(i){case"{":!function(t,e){e&&e!==Ka?(e===eo&&t.push(Za),e===to&&t.push(Za)):t.push(Za)}(t,r);break;case"[":!function(t,e){e?e===Ka?(t.push(to),t.push(eo)):(e===eo&&(t.push(to),t.push(eo)),e===to&&(t.push(to),t.push(eo))):(t.push(to),t.push(eo))}(t,r);break;case":":!function(t,e){e===Wa&&(t.pop(),t.push(Ka))}(t,r);break;case",":!function(t,e){if(e!==Ka)return e===Qa?(t.pop(),void t.pop()):void(e!==eo&&e===ro&&t.pop());t.pop()}(t,r);break;case"}":!function(t,e){e===Za&&t.pop(),e===Ka&&(t.pop(),t.pop()),e===Qa&&(t.pop(),t.pop(),t.pop()),t[t.length-1]===Ka&&t.push(Qa),t[t.length-1]===eo&&t.push(ro)}(t,r);break;case"]":!function(t,e){e===to&&t.pop(),e===eo&&(t.pop(),t.pop()),e===ro&&(t.pop(),t.pop(),t.pop()),t[t.length-1]===Ka&&t.push(Qa),t[t.length-1]===eo&&t.push(ro)}(t,r)}else!function(t,e){e===Ja?(t.pop(),t.push(Qa)):e===no?(t.pop(),t.push(ro)):e!==Ka?e!==eo?e!==Za?e===Xa&&(t.pop(),t.push(Wa)):t.push(Xa):t.push(no):t.push(Ja)}(t,r)}function ao(t,e){return"\\"===t[e-1]&&!ao(t,e-1)}function oo(t,e){if(t)try{if("string"==typeof t)return e.encode(t).length;if(t instanceof URLSearchParams)return e.encode(t.toString()).length;if(t instanceof FormData){const n=fo(t);return e.encode(n).length}if(t instanceof Blob)return t.size;if(t instanceof ArrayBuffer)return t.byteLength}catch(t){}}function co(t){if(!t)return;const e=parseInt(t,10);return isNaN(e)?void 0:e}function lo(t){return"string"==typeof t?t:t instanceof URLSearchParams?t.toString():t instanceof FormData?fo(t):void 0}function uo(t,e){if(!e)return null;const{startTimestamp:n,endTimestamp:r,url:i,method:s,statusCode:a,request:o,response:c}=e;return{type:t,start:n/1e3,end:r/1e3,name:i,data:He({method:s,statusCode:a,request:o,response:c})}}function po(t,e,n){if(!e&&0===Object.keys(t).length)return;if(!e)return{headers:t};if(!n)return{headers:t,size:e};const r={headers:t,size:e},{body:i,warnings:s}=function(t){if(!t||"string"!=typeof t)return{body:t,warnings:[]};const e=t.length>Wi;if(function(t){const e=t[0],n=t[t.length-1];return"["===e&&"]"===n||"{"===e&&"}"===n}(t))try{const r=e?function(t,e){if(!e.length)return t;let n=t;const r=e.length-1;n=function(t,e){switch(e){case Za:return`${t}"~~":"~~"`;case Wa:return`${t}:"~~"`;case Xa:return`${t}~~":"~~"`;case Ka:return function(t){const e=t.lastIndexOf(":"),n=t.slice(e+1);return io.includes(n.trim())?`${t},"~~":"~~"`:`${t.slice(0,e+1)}"~~"`}(t);case Ja:return`${t}~~"`;case Qa:return`${t},"~~":"~~"`;case to:return`${t}"~~"`;case eo:return function(t){const e=function(t){for(let e=t.length-1;e>=0;e--){const n=t[e];if(","===n||"["===n)return e}return-1}(t);if(e>-1){const n=t.slice(e+1);return io.includes(n.trim())?`${t},"~~"`:`${t.slice(0,e+1)}"~~"`}return t}(t);case no:return`${t}~~"`;case ro:return`${t},"~~"`}return t}(n,e[r]);for(let t=r;t>=0;t--)switch(e[t]){case Za:n=`${n}}`;break;case to:n=`${n}]`}return n}(n=t.slice(0,Wi),function(t){const e=[];for(let n=0;n<t.length;n++)so(e,t,n);return e}(n)):t;return{body:JSON.parse(r),warnings:e?["JSON_TRUNCATED"]:[]}}catch(e){return{body:t,warnings:["INVALID_JSON"]}}var n;return{body:e?`${t.slice(0,Wi)}…`:t,warnings:e?["TEXT_TRUNCATED"]:[]}}(n);return r.body=i,s.length>0&&(r._meta={warnings:s}),r}function ho(t,e){return Object.keys(t).reduce((n,r)=>{const i=r.toLowerCase();return e.includes(i)&&t[r]&&(n[i]=t[r]),n},{})}function fo(t){return new URLSearchParams(t).toString()}function _o(t=[]){if(2===t.length&&"object"==typeof t[1])return t[1].body}function mo(t,e){const n={};return e.forEach(e=>{t.get(e)&&(n[e]=t.get(e))}),n}function go(t,e){if(!t)return{};const n=t.headers;return n?n instanceof Headers?mo(n,e):Array.isArray(n)?{}:ho(n,e):{}}let yo=null;function vo(t){return!(!t||!t.on)}function bo(t){const{jsHeapSizeLimit:e,totalJSHeapSize:n,usedJSHeapSize:r}=t,i=Date.now()/1e3;return{type:"memory",name:"memory",start:i,end:i,data:{memory:{jsHeapSizeLimit:e,totalJSHeapSize:n,usedJSHeapSize:r}}}}const Eo={resource:function(t){const{entryType:e,initiatorType:n,name:r,responseEnd:i,startTime:s,decodedBodySize:a,encodedBodySize:o,responseStatus:c,transferSize:l}=t;return["fetch","xmlhttprequest"].includes(n)?null:{type:`${e}.${n}`,start:wo(s),end:wo(i),name:r,data:{size:l,statusCode:c,decodedBodySize:a,encodedBodySize:o}}},paint:function(t){const{duration:e,entryType:n,name:r,startTime:i}=t,s=wo(i);return{type:n,name:r,start:s,end:s+e,data:void 0}},navigation:function(t){const{entryType:e,name:n,decodedBodySize:r,duration:i,domComplete:s,encodedBodySize:a,domContentLoadedEventStart:o,domContentLoadedEventEnd:c,domInteractive:l,loadEventStart:u,loadEventEnd:d,redirectCount:p,startTime:h,transferSize:f,type:_}=t;return 0===i?null:{type:`${e}.${_}`,start:wo(h),end:wo(s),name:n,data:{size:f,decodedBodySize:r,encodedBodySize:a,duration:i,domInteractive:l,domContentLoadedEventStart:o,domContentLoadedEventEnd:c,loadEventStart:u,loadEventEnd:d,domComplete:s,redirectCount:p}}},"largest-contentful-paint":function(t){const{entryType:e,startTime:n,size:r}=t;let i=0;if(qi.performance){const t=qi.performance.getEntriesByType("navigation")[0];i=t&&t.activationStart||0}const s=Math.max(n-i,0),a=wo(i)+s/1e3;return{type:e,name:e,start:a,end:a,data:{value:s,size:r,nodeId:ka.mirror.getId(t.element)}}}};function So(t){return void 0===Eo[t.entryType]?null:Eo[t.entryType](t)}function wo(t){return((Un||qi.performance.timeOrigin)+t)/1e3}function ko(t){let e=!1;return(n,r)=>{if(!t.checkAndHandleExpiredSession())return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.warn("[Replay] Received replay event after session expired."));const i=r||!e;e=!0,t.addUpdate(()=>{if("error"===t.recordingMode&&i&&t.setInitialState(),Ma(t,n,i),!i)return!1;if(t.session&&t.session.previousSessionId)return!0;if("error"===t.recordingMode&&t.session){const{earliestEvent:e}=t.getContext();e&&(t.session.started=e,t.getOptions().stickySession&&Oa(t.session))}return"session"===t.recordingMode&&t.flushImmediate(),!0})}}class To extends Error{constructor(t){super(`Transport returned status code ${t}`)}}async function Co(t,e={count:0,interval:5e3}){const{recordingData:n,options:r}=t;var i;if(n.length)try{return await async function({recordingData:t,replayId:e,segmentId:n,eventContext:r,timestamp:i,session:s,options:a}){const o=function({recordingData:t,headers:e}){let n;const r=`${JSON.stringify(e)}\n`;if("string"==typeof t)n=`${r}${t}`;else{const e=(new TextEncoder).encode(r);n=new Uint8Array(e.length+t.length),n.set(e),n.set(t,e.length)}return n}({recordingData:t,headers:{segment_id:n}}),{urls:c,errorIds:l,traceIds:u,initialTimestamp:d}=r,p=or(),h=p.getClient(),f=p.getScope(),_=h&&h.getTransport(),m=h&&h.getDsn();if(!(h&&f&&_&&m&&s.sampled))return;const g={type:"replay_event",replay_start_timestamp:d/1e3,timestamp:i/1e3,error_ids:l,trace_ids:u,urls:c,replay_id:e,segment_id:n,replay_type:s.sampled},y=await async function({client:t,scope:e,replayId:n,event:r}){const i="object"!=typeof t._integrations||null===t._integrations||Array.isArray(t._integrations)?void 0:Object.keys(t._integrations),s=await Ar(t.getOptions(),r,{event_id:n,integrations:i},e);if(!s)return null;s.platform=s.platform||"javascript";const a=t.getSdkMetadata&&t.getSdkMetadata(),{name:o,version:c}=a&&a.sdk||{};return s.sdk={...s.sdk,name:o||"sentry.javascript.unknown",version:c||"0.0.0"},s}({scope:f,client:h,replayId:e,event:g});if(!y)return h.recordDroppedEvent("event_processor","replay",g),void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.log("An event processor returned `null`, will not send event."));y.contexts={...y.contexts,replay:{...y.contexts&&y.contexts.replay,session_sample_rate:a.sessionSampleRate,error_sample_rate:a.errorSampleRate}};const v=function(t,e,n,r){return Hn(jn(t,Fn(t),r,n),[[{type:"replay_event"},t],[{type:"replay_recording",length:"string"==typeof e?(new TextEncoder).encode(e).length:e.length},e]])}(y,o,m,h.getOptions().tunnel);let b;try{b=await _.send(v)}catch(t){const e=new Error(Zi);try{e.cause=t}catch(t){}throw e}if(!b)return b;if("number"==typeof b.statusCode&&(b.statusCode<200||b.statusCode>=300))throw new To(b.statusCode);return b}(t),!0}catch(n){if(n instanceof To)throw n;if(i={_retryCount:e.count},or().setContext("Replays",i),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&r._experiments&&r._experiments.captureExceptions&&Cr(n),e.count>=3){const e=new Error(`${Zi} - max retries exceeded`);try{e.cause=n}catch(t){}throw e}return e.interval*=++e.count,await new Promise((n,r)=>{setTimeout(async()=>{try{await Co(t,e),n(!0)}catch(t){r(t)}},e.interval)})}}class xo{__init(){this.eventBuffer=null}__init2(){this.performanceEvents=[]}__init3(){this.recordingMode="session"}__init4(){this.timeouts={sessionIdle:3e5,maxSessionLife:36e5}}__init5(){this._performanceObserver=null}__init6(){this._flushLock=null}__init7(){this._lastActivity=Date.now()}__init8(){this._isEnabled=!1}__init9(){this._isPaused=!1}__init10(){this._hasInitializedCoreListeners=!1}__init11(){this._stopRecording=null}__init12(){this._context={errorIds:new Set,traceIds:new Set,urls:[],earliestEvent:null,initialTimestamp:Date.now(),initialUrl:""}}constructor({options:t,recordingOptions:e}){xo.prototype.__init.call(this),xo.prototype.__init2.call(this),xo.prototype.__init3.call(this),xo.prototype.__init4.call(this),xo.prototype.__init5.call(this),xo.prototype.__init6.call(this),xo.prototype.__init7.call(this),xo.prototype.__init8.call(this),xo.prototype.__init9.call(this),xo.prototype.__init10.call(this),xo.prototype.__init11.call(this),xo.prototype.__init12.call(this),xo.prototype.__init13.call(this),xo.prototype.__init14.call(this),xo.prototype.__init15.call(this),xo.prototype.__init16.call(this),xo.prototype.__init17.call(this),this._recordingOptions=e,this._options=t,this._debouncedFlush=function(t,e,n){let r,i,s;const a=n&&n.maxWait?Math.max(n.maxWait,e):0;function o(){return c(),r=t(),r}function c(){void 0!==i&&clearTimeout(i),void 0!==s&&clearTimeout(s),i=s=void 0}function l(){return i&&clearTimeout(i),i=setTimeout(o,e),a&&void 0===s&&(s=setTimeout(o,a)),r}return l.cancel=c,l.flush=function(){return void 0!==i||void 0!==s?o():r},l}(()=>this._flush(),this._options.flushMinDelay,{maxWait:this._options.flushMaxDelay}),this._experimentalOptions=function(t){const e=t._experiments.captureRequestHeaders||[],n=t._experiments.captureResponseHeaders||[],r=["content-length","content-type","accept"];return{network:{captureBodies:t._experiments.captureNetworkBodies||!1,requestHeaders:[...r,...e.map(t=>t.toLowerCase())],responseHeaders:[...r,...n.map(t=>t.toLowerCase())]}}}(t)}getContext(){return this._context}isEnabled(){return this._isEnabled}isPaused(){return this._isPaused}getOptions(){return this._options}getExperimentalOptions(){return this._experimentalOptions}start(){this.setInitialState(),this._loadAndCheckSession()&&(this.session?this.session.sampled&&("error"===this.session.sampled&&(this.recordingMode="error"),this._updateSessionActivity(),this.eventBuffer=function({useCompression:t}){if(t&&window.Worker)try{const t=function(){const t=new Blob(['/*! pako 2.1.0 https://github.com/nodeca/pako @license (MIT AND Zlib) */\nfunction t(t){let e=t.length;for(;--e>=0;)t[e]=0}const e=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),a=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),i=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),n=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),s=new Array(576);t(s);const r=new Array(60);t(r);const o=new Array(512);t(o);const l=new Array(256);t(l);const h=new Array(29);t(h);const d=new Array(30);function _(t,e,a,i,n){this.static_tree=t,this.extra_bits=e,this.extra_base=a,this.elems=i,this.max_length=n,this.has_stree=t&&t.length}let f,c,u;function w(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}t(d);const m=t=>t<256?o[t]:o[256+(t>>>7)],b=(t,e)=>{t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255},g=(t,e,a)=>{t.bi_valid>16-a?(t.bi_buf|=e<<t.bi_valid&65535,b(t,t.bi_buf),t.bi_buf=e>>16-t.bi_valid,t.bi_valid+=a-16):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=a)},p=(t,e,a)=>{g(t,a[2*e],a[2*e+1])},k=(t,e)=>{let a=0;do{a|=1&t,t>>>=1,a<<=1}while(--e>0);return a>>>1},v=(t,e,a)=>{const i=new Array(16);let n,s,r=0;for(n=1;n<=15;n++)r=r+a[n-1]<<1,i[n]=r;for(s=0;s<=e;s++){let e=t[2*s+1];0!==e&&(t[2*s]=k(i[e]++,e))}},y=t=>{let e;for(e=0;e<286;e++)t.dyn_ltree[2*e]=0;for(e=0;e<30;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.sym_next=t.matches=0},x=t=>{t.bi_valid>8?b(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0},z=(t,e,a,i)=>{const n=2*e,s=2*a;return t[n]<t[s]||t[n]===t[s]&&i[e]<=i[a]},A=(t,e,a)=>{const i=t.heap[a];let n=a<<1;for(;n<=t.heap_len&&(n<t.heap_len&&z(e,t.heap[n+1],t.heap[n],t.depth)&&n++,!z(e,i,t.heap[n],t.depth));)t.heap[a]=t.heap[n],a=n,n<<=1;t.heap[a]=i},E=(t,i,n)=>{let s,r,o,_,f=0;if(0!==t.sym_next)do{s=255&t.pending_buf[t.sym_buf+f++],s+=(255&t.pending_buf[t.sym_buf+f++])<<8,r=t.pending_buf[t.sym_buf+f++],0===s?p(t,r,i):(o=l[r],p(t,o+256+1,i),_=e[o],0!==_&&(r-=h[o],g(t,r,_)),s--,o=m(s),p(t,o,n),_=a[o],0!==_&&(s-=d[o],g(t,s,_)))}while(f<t.sym_next);p(t,256,i)},R=(t,e)=>{const a=e.dyn_tree,i=e.stat_desc.static_tree,n=e.stat_desc.has_stree,s=e.stat_desc.elems;let r,o,l,h=-1;for(t.heap_len=0,t.heap_max=573,r=0;r<s;r++)0!==a[2*r]?(t.heap[++t.heap_len]=h=r,t.depth[r]=0):a[2*r+1]=0;for(;t.heap_len<2;)l=t.heap[++t.heap_len]=h<2?++h:0,a[2*l]=1,t.depth[l]=0,t.opt_len--,n&&(t.static_len-=i[2*l+1]);for(e.max_code=h,r=t.heap_len>>1;r>=1;r--)A(t,a,r);l=s;do{r=t.heap[1],t.heap[1]=t.heap[t.heap_len--],A(t,a,1),o=t.heap[1],t.heap[--t.heap_max]=r,t.heap[--t.heap_max]=o,a[2*l]=a[2*r]+a[2*o],t.depth[l]=(t.depth[r]>=t.depth[o]?t.depth[r]:t.depth[o])+1,a[2*r+1]=a[2*o+1]=l,t.heap[1]=l++,A(t,a,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],((t,e)=>{const a=e.dyn_tree,i=e.max_code,n=e.stat_desc.static_tree,s=e.stat_desc.has_stree,r=e.stat_desc.extra_bits,o=e.stat_desc.extra_base,l=e.stat_desc.max_length;let h,d,_,f,c,u,w=0;for(f=0;f<=15;f++)t.bl_count[f]=0;for(a[2*t.heap[t.heap_max]+1]=0,h=t.heap_max+1;h<573;h++)d=t.heap[h],f=a[2*a[2*d+1]+1]+1,f>l&&(f=l,w++),a[2*d+1]=f,d>i||(t.bl_count[f]++,c=0,d>=o&&(c=r[d-o]),u=a[2*d],t.opt_len+=u*(f+c),s&&(t.static_len+=u*(n[2*d+1]+c)));if(0!==w){do{for(f=l-1;0===t.bl_count[f];)f--;t.bl_count[f]--,t.bl_count[f+1]+=2,t.bl_count[l]--,w-=2}while(w>0);for(f=l;0!==f;f--)for(d=t.bl_count[f];0!==d;)_=t.heap[--h],_>i||(a[2*_+1]!==f&&(t.opt_len+=(f-a[2*_+1])*a[2*_],a[2*_+1]=f),d--)}})(t,e),v(a,h,t.bl_count)},Z=(t,e,a)=>{let i,n,s=-1,r=e[1],o=0,l=7,h=4;for(0===r&&(l=138,h=3),e[2*(a+1)+1]=65535,i=0;i<=a;i++)n=r,r=e[2*(i+1)+1],++o<l&&n===r||(o<h?t.bl_tree[2*n]+=o:0!==n?(n!==s&&t.bl_tree[2*n]++,t.bl_tree[32]++):o<=10?t.bl_tree[34]++:t.bl_tree[36]++,o=0,s=n,0===r?(l=138,h=3):n===r?(l=6,h=3):(l=7,h=4))},U=(t,e,a)=>{let i,n,s=-1,r=e[1],o=0,l=7,h=4;for(0===r&&(l=138,h=3),i=0;i<=a;i++)if(n=r,r=e[2*(i+1)+1],!(++o<l&&n===r)){if(o<h)do{p(t,n,t.bl_tree)}while(0!=--o);else 0!==n?(n!==s&&(p(t,n,t.bl_tree),o--),p(t,16,t.bl_tree),g(t,o-3,2)):o<=10?(p(t,17,t.bl_tree),g(t,o-3,3)):(p(t,18,t.bl_tree),g(t,o-11,7));o=0,s=n,0===r?(l=138,h=3):n===r?(l=6,h=3):(l=7,h=4)}};let S=!1;const D=(t,e,a,i)=>{g(t,0+(i?1:0),3),x(t),b(t,a),b(t,~a),a&&t.pending_buf.set(t.window.subarray(e,e+a),t.pending),t.pending+=a};var T=(t,e,a,i)=>{let o,l,h=0;t.level>0?(2===t.strm.data_type&&(t.strm.data_type=(t=>{let e,a=4093624447;for(e=0;e<=31;e++,a>>>=1)if(1&a&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e<256;e++)if(0!==t.dyn_ltree[2*e])return 1;return 0})(t)),R(t,t.l_desc),R(t,t.d_desc),h=(t=>{let e;for(Z(t,t.dyn_ltree,t.l_desc.max_code),Z(t,t.dyn_dtree,t.d_desc.max_code),R(t,t.bl_desc),e=18;e>=3&&0===t.bl_tree[2*n[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e})(t),o=t.opt_len+3+7>>>3,l=t.static_len+3+7>>>3,l<=o&&(o=l)):o=l=a+5,a+4<=o&&-1!==e?D(t,e,a,i):4===t.strategy||l===o?(g(t,2+(i?1:0),3),E(t,s,r)):(g(t,4+(i?1:0),3),((t,e,a,i)=>{let s;for(g(t,e-257,5),g(t,a-1,5),g(t,i-4,4),s=0;s<i;s++)g(t,t.bl_tree[2*n[s]+1],3);U(t,t.dyn_ltree,e-1),U(t,t.dyn_dtree,a-1)})(t,t.l_desc.max_code+1,t.d_desc.max_code+1,h+1),E(t,t.dyn_ltree,t.dyn_dtree)),y(t),i&&x(t)},O={_tr_init:t=>{S||((()=>{let t,n,w,m,b;const g=new Array(16);for(w=0,m=0;m<28;m++)for(h[m]=w,t=0;t<1<<e[m];t++)l[w++]=m;for(l[w-1]=m,b=0,m=0;m<16;m++)for(d[m]=b,t=0;t<1<<a[m];t++)o[b++]=m;for(b>>=7;m<30;m++)for(d[m]=b<<7,t=0;t<1<<a[m]-7;t++)o[256+b++]=m;for(n=0;n<=15;n++)g[n]=0;for(t=0;t<=143;)s[2*t+1]=8,t++,g[8]++;for(;t<=255;)s[2*t+1]=9,t++,g[9]++;for(;t<=279;)s[2*t+1]=7,t++,g[7]++;for(;t<=287;)s[2*t+1]=8,t++,g[8]++;for(v(s,287,g),t=0;t<30;t++)r[2*t+1]=5,r[2*t]=k(t,5);f=new _(s,e,257,286,15),c=new _(r,a,0,30,15),u=new _(new Array(0),i,0,19,7)})(),S=!0),t.l_desc=new w(t.dyn_ltree,f),t.d_desc=new w(t.dyn_dtree,c),t.bl_desc=new w(t.bl_tree,u),t.bi_buf=0,t.bi_valid=0,y(t)},_tr_stored_block:D,_tr_flush_block:T,_tr_tally:(t,e,a)=>(t.pending_buf[t.sym_buf+t.sym_next++]=e,t.pending_buf[t.sym_buf+t.sym_next++]=e>>8,t.pending_buf[t.sym_buf+t.sym_next++]=a,0===e?t.dyn_ltree[2*a]++:(t.matches++,e--,t.dyn_ltree[2*(l[a]+256+1)]++,t.dyn_dtree[2*m(e)]++),t.sym_next===t.sym_end),_tr_align:t=>{g(t,2,3),p(t,256,s),(t=>{16===t.bi_valid?(b(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)})(t)}};var F=(t,e,a,i)=>{let n=65535&t|0,s=t>>>16&65535|0,r=0;for(;0!==a;){r=a>2e3?2e3:a,a-=r;do{n=n+e[i++]|0,s=s+n|0}while(--r);n%=65521,s%=65521}return n|s<<16|0};const L=new Uint32Array((()=>{let t,e=[];for(var a=0;a<256;a++){t=a;for(var i=0;i<8;i++)t=1&t?3988292384^t>>>1:t>>>1;e[a]=t}return e})());var N=(t,e,a,i)=>{const n=L,s=i+a;t^=-1;for(let a=i;a<s;a++)t=t>>>8^n[255&(t^e[a])];return-1^t},I={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},B={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};const{_tr_init:C,_tr_stored_block:H,_tr_flush_block:M,_tr_tally:j,_tr_align:K}=O,{Z_NO_FLUSH:P,Z_PARTIAL_FLUSH:Y,Z_FULL_FLUSH:G,Z_FINISH:X,Z_BLOCK:W,Z_OK:q,Z_STREAM_END:J,Z_STREAM_ERROR:Q,Z_DATA_ERROR:V,Z_BUF_ERROR:$,Z_DEFAULT_COMPRESSION:tt,Z_FILTERED:et,Z_HUFFMAN_ONLY:at,Z_RLE:it,Z_FIXED:nt,Z_DEFAULT_STRATEGY:st,Z_UNKNOWN:rt,Z_DEFLATED:ot}=B,lt=(t,e)=>(t.msg=I[e],e),ht=t=>2*t-(t>4?9:0),dt=t=>{let e=t.length;for(;--e>=0;)t[e]=0},_t=t=>{let e,a,i,n=t.w_size;e=t.hash_size,i=e;do{a=t.head[--i],t.head[i]=a>=n?a-n:0}while(--e);e=n,i=e;do{a=t.prev[--i],t.prev[i]=a>=n?a-n:0}while(--e)};let ft=(t,e,a)=>(e<<t.hash_shift^a)&t.hash_mask;const ct=t=>{const e=t.state;let a=e.pending;a>t.avail_out&&(a=t.avail_out),0!==a&&(t.output.set(e.pending_buf.subarray(e.pending_out,e.pending_out+a),t.next_out),t.next_out+=a,e.pending_out+=a,t.total_out+=a,t.avail_out-=a,e.pending-=a,0===e.pending&&(e.pending_out=0))},ut=(t,e)=>{M(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,ct(t.strm)},wt=(t,e)=>{t.pending_buf[t.pending++]=e},mt=(t,e)=>{t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e},bt=(t,e,a,i)=>{let n=t.avail_in;return n>i&&(n=i),0===n?0:(t.avail_in-=n,e.set(t.input.subarray(t.next_in,t.next_in+n),a),1===t.state.wrap?t.adler=F(t.adler,e,n,a):2===t.state.wrap&&(t.adler=N(t.adler,e,n,a)),t.next_in+=n,t.total_in+=n,n)},gt=(t,e)=>{let a,i,n=t.max_chain_length,s=t.strstart,r=t.prev_length,o=t.nice_match;const l=t.strstart>t.w_size-262?t.strstart-(t.w_size-262):0,h=t.window,d=t.w_mask,_=t.prev,f=t.strstart+258;let c=h[s+r-1],u=h[s+r];t.prev_length>=t.good_match&&(n>>=2),o>t.lookahead&&(o=t.lookahead);do{if(a=e,h[a+r]===u&&h[a+r-1]===c&&h[a]===h[s]&&h[++a]===h[s+1]){s+=2,a++;do{}while(h[++s]===h[++a]&&h[++s]===h[++a]&&h[++s]===h[++a]&&h[++s]===h[++a]&&h[++s]===h[++a]&&h[++s]===h[++a]&&h[++s]===h[++a]&&h[++s]===h[++a]&&s<f);if(i=258-(f-s),s=f-258,i>r){if(t.match_start=e,r=i,i>=o)break;c=h[s+r-1],u=h[s+r]}}}while((e=_[e&d])>l&&0!=--n);return r<=t.lookahead?r:t.lookahead},pt=t=>{const e=t.w_size;let a,i,n;do{if(i=t.window_size-t.lookahead-t.strstart,t.strstart>=e+(e-262)&&(t.window.set(t.window.subarray(e,e+e-i),0),t.match_start-=e,t.strstart-=e,t.block_start-=e,t.insert>t.strstart&&(t.insert=t.strstart),_t(t),i+=e),0===t.strm.avail_in)break;if(a=bt(t.strm,t.window,t.strstart+t.lookahead,i),t.lookahead+=a,t.lookahead+t.insert>=3)for(n=t.strstart-t.insert,t.ins_h=t.window[n],t.ins_h=ft(t,t.ins_h,t.window[n+1]);t.insert&&(t.ins_h=ft(t,t.ins_h,t.window[n+3-1]),t.prev[n&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=n,n++,t.insert--,!(t.lookahead+t.insert<3)););}while(t.lookahead<262&&0!==t.strm.avail_in)},kt=(t,e)=>{let a,i,n,s=t.pending_buf_size-5>t.w_size?t.w_size:t.pending_buf_size-5,r=0,o=t.strm.avail_in;do{if(a=65535,n=t.bi_valid+42>>3,t.strm.avail_out<n)break;if(n=t.strm.avail_out-n,i=t.strstart-t.block_start,a>i+t.strm.avail_in&&(a=i+t.strm.avail_in),a>n&&(a=n),a<s&&(0===a&&e!==X||e===P||a!==i+t.strm.avail_in))break;r=e===X&&a===i+t.strm.avail_in?1:0,H(t,0,0,r),t.pending_buf[t.pending-4]=a,t.pending_buf[t.pending-3]=a>>8,t.pending_buf[t.pending-2]=~a,t.pending_buf[t.pending-1]=~a>>8,ct(t.strm),i&&(i>a&&(i=a),t.strm.output.set(t.window.subarray(t.block_start,t.block_start+i),t.strm.next_out),t.strm.next_out+=i,t.strm.avail_out-=i,t.strm.total_out+=i,t.block_start+=i,a-=i),a&&(bt(t.strm,t.strm.output,t.strm.next_out,a),t.strm.next_out+=a,t.strm.avail_out-=a,t.strm.total_out+=a)}while(0===r);return o-=t.strm.avail_in,o&&(o>=t.w_size?(t.matches=2,t.window.set(t.strm.input.subarray(t.strm.next_in-t.w_size,t.strm.next_in),0),t.strstart=t.w_size,t.insert=t.strstart):(t.window_size-t.strstart<=o&&(t.strstart-=t.w_size,t.window.set(t.window.subarray(t.w_size,t.w_size+t.strstart),0),t.matches<2&&t.matches++,t.insert>t.strstart&&(t.insert=t.strstart)),t.window.set(t.strm.input.subarray(t.strm.next_in-o,t.strm.next_in),t.strstart),t.strstart+=o,t.insert+=o>t.w_size-t.insert?t.w_size-t.insert:o),t.block_start=t.strstart),t.high_water<t.strstart&&(t.high_water=t.strstart),r?4:e!==P&&e!==X&&0===t.strm.avail_in&&t.strstart===t.block_start?2:(n=t.window_size-t.strstart,t.strm.avail_in>n&&t.block_start>=t.w_size&&(t.block_start-=t.w_size,t.strstart-=t.w_size,t.window.set(t.window.subarray(t.w_size,t.w_size+t.strstart),0),t.matches<2&&t.matches++,n+=t.w_size,t.insert>t.strstart&&(t.insert=t.strstart)),n>t.strm.avail_in&&(n=t.strm.avail_in),n&&(bt(t.strm,t.window,t.strstart,n),t.strstart+=n,t.insert+=n>t.w_size-t.insert?t.w_size-t.insert:n),t.high_water<t.strstart&&(t.high_water=t.strstart),n=t.bi_valid+42>>3,n=t.pending_buf_size-n>65535?65535:t.pending_buf_size-n,s=n>t.w_size?t.w_size:n,i=t.strstart-t.block_start,(i>=s||(i||e===X)&&e!==P&&0===t.strm.avail_in&&i<=n)&&(a=i>n?n:i,r=e===X&&0===t.strm.avail_in&&a===i?1:0,H(t,t.block_start,a,r),t.block_start+=a,ct(t.strm)),r?3:1)},vt=(t,e)=>{let a,i;for(;;){if(t.lookahead<262){if(pt(t),t.lookahead<262&&e===P)return 1;if(0===t.lookahead)break}if(a=0,t.lookahead>=3&&(t.ins_h=ft(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==a&&t.strstart-a<=t.w_size-262&&(t.match_length=gt(t,a)),t.match_length>=3)if(i=j(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){t.match_length--;do{t.strstart++,t.ins_h=ft(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart}while(0!=--t.match_length);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=ft(t,t.ins_h,t.window[t.strstart+1]);else i=j(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(i&&(ut(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,e===X?(ut(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(ut(t,!1),0===t.strm.avail_out)?1:2},yt=(t,e)=>{let a,i,n;for(;;){if(t.lookahead<262){if(pt(t),t.lookahead<262&&e===P)return 1;if(0===t.lookahead)break}if(a=0,t.lookahead>=3&&(t.ins_h=ft(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=2,0!==a&&t.prev_length<t.max_lazy_match&&t.strstart-a<=t.w_size-262&&(t.match_length=gt(t,a),t.match_length<=5&&(t.strategy===et||3===t.match_length&&t.strstart-t.match_start>4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){n=t.strstart+t.lookahead-3,i=j(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=n&&(t.ins_h=ft(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart)}while(0!=--t.prev_length);if(t.match_available=0,t.match_length=2,t.strstart++,i&&(ut(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if(i=j(t,0,t.window[t.strstart-1]),i&&ut(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return 1}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(i=j(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,e===X?(ut(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(ut(t,!1),0===t.strm.avail_out)?1:2};function xt(t,e,a,i,n){this.good_length=t,this.max_lazy=e,this.nice_length=a,this.max_chain=i,this.func=n}const zt=[new xt(0,0,0,0,kt),new xt(4,4,8,4,vt),new xt(4,5,16,8,vt),new xt(4,6,32,32,vt),new xt(4,4,16,16,yt),new xt(8,16,32,32,yt),new xt(8,16,128,128,yt),new xt(8,32,128,256,yt),new xt(32,128,258,1024,yt),new xt(32,258,258,4096,yt)];function At(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=ot,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),dt(this.dyn_ltree),dt(this.dyn_dtree),dt(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),dt(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),dt(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}const Et=t=>{if(!t)return 1;const e=t.state;return!e||e.strm!==t||42!==e.status&&57!==e.status&&69!==e.status&&73!==e.status&&91!==e.status&&103!==e.status&&113!==e.status&&666!==e.status?1:0},Rt=t=>{if(Et(t))return lt(t,Q);t.total_in=t.total_out=0,t.data_type=rt;const e=t.state;return e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=2===e.wrap?57:e.wrap?42:113,t.adler=2===e.wrap?0:1,e.last_flush=-2,C(e),q},Zt=t=>{const e=Rt(t);var a;return e===q&&((a=t.state).window_size=2*a.w_size,dt(a.head),a.max_lazy_match=zt[a.level].max_lazy,a.good_match=zt[a.level].good_length,a.nice_match=zt[a.level].nice_length,a.max_chain_length=zt[a.level].max_chain,a.strstart=0,a.block_start=0,a.lookahead=0,a.insert=0,a.match_length=a.prev_length=2,a.match_available=0,a.ins_h=0),e},Ut=(t,e,a,i,n,s)=>{if(!t)return Q;let r=1;if(e===tt&&(e=6),i<0?(r=0,i=-i):i>15&&(r=2,i-=16),n<1||n>9||a!==ot||i<8||i>15||e<0||e>9||s<0||s>nt||8===i&&1!==r)return lt(t,Q);8===i&&(i=9);const o=new At;return t.state=o,o.strm=t,o.status=42,o.wrap=r,o.gzhead=null,o.w_bits=i,o.w_size=1<<o.w_bits,o.w_mask=o.w_size-1,o.hash_bits=n+7,o.hash_size=1<<o.hash_bits,o.hash_mask=o.hash_size-1,o.hash_shift=~~((o.hash_bits+3-1)/3),o.window=new Uint8Array(2*o.w_size),o.head=new Uint16Array(o.hash_size),o.prev=new Uint16Array(o.w_size),o.lit_bufsize=1<<n+6,o.pending_buf_size=4*o.lit_bufsize,o.pending_buf=new Uint8Array(o.pending_buf_size),o.sym_buf=o.lit_bufsize,o.sym_end=3*(o.lit_bufsize-1),o.level=e,o.strategy=s,o.method=a,Zt(t)};var St={deflateInit:(t,e)=>Ut(t,e,ot,15,8,st),deflateInit2:Ut,deflateReset:Zt,deflateResetKeep:Rt,deflateSetHeader:(t,e)=>Et(t)||2!==t.state.wrap?Q:(t.state.gzhead=e,q),deflate:(t,e)=>{if(Et(t)||e>W||e<0)return t?lt(t,Q):Q;const a=t.state;if(!t.output||0!==t.avail_in&&!t.input||666===a.status&&e!==X)return lt(t,0===t.avail_out?$:Q);const i=a.last_flush;if(a.last_flush=e,0!==a.pending){if(ct(t),0===t.avail_out)return a.last_flush=-1,q}else if(0===t.avail_in&&ht(e)<=ht(i)&&e!==X)return lt(t,$);if(666===a.status&&0!==t.avail_in)return lt(t,$);if(42===a.status&&0===a.wrap&&(a.status=113),42===a.status){let e=ot+(a.w_bits-8<<4)<<8,i=-1;if(i=a.strategy>=at||a.level<2?0:a.level<6?1:6===a.level?2:3,e|=i<<6,0!==a.strstart&&(e|=32),e+=31-e%31,mt(a,e),0!==a.strstart&&(mt(a,t.adler>>>16),mt(a,65535&t.adler)),t.adler=1,a.status=113,ct(t),0!==a.pending)return a.last_flush=-1,q}if(57===a.status)if(t.adler=0,wt(a,31),wt(a,139),wt(a,8),a.gzhead)wt(a,(a.gzhead.text?1:0)+(a.gzhead.hcrc?2:0)+(a.gzhead.extra?4:0)+(a.gzhead.name?8:0)+(a.gzhead.comment?16:0)),wt(a,255&a.gzhead.time),wt(a,a.gzhead.time>>8&255),wt(a,a.gzhead.time>>16&255),wt(a,a.gzhead.time>>24&255),wt(a,9===a.level?2:a.strategy>=at||a.level<2?4:0),wt(a,255&a.gzhead.os),a.gzhead.extra&&a.gzhead.extra.length&&(wt(a,255&a.gzhead.extra.length),wt(a,a.gzhead.extra.length>>8&255)),a.gzhead.hcrc&&(t.adler=N(t.adler,a.pending_buf,a.pending,0)),a.gzindex=0,a.status=69;else if(wt(a,0),wt(a,0),wt(a,0),wt(a,0),wt(a,0),wt(a,9===a.level?2:a.strategy>=at||a.level<2?4:0),wt(a,3),a.status=113,ct(t),0!==a.pending)return a.last_flush=-1,q;if(69===a.status){if(a.gzhead.extra){let e=a.pending,i=(65535&a.gzhead.extra.length)-a.gzindex;for(;a.pending+i>a.pending_buf_size;){let n=a.pending_buf_size-a.pending;if(a.pending_buf.set(a.gzhead.extra.subarray(a.gzindex,a.gzindex+n),a.pending),a.pending=a.pending_buf_size,a.gzhead.hcrc&&a.pending>e&&(t.adler=N(t.adler,a.pending_buf,a.pending-e,e)),a.gzindex+=n,ct(t),0!==a.pending)return a.last_flush=-1,q;e=0,i-=n}let n=new Uint8Array(a.gzhead.extra);a.pending_buf.set(n.subarray(a.gzindex,a.gzindex+i),a.pending),a.pending+=i,a.gzhead.hcrc&&a.pending>e&&(t.adler=N(t.adler,a.pending_buf,a.pending-e,e)),a.gzindex=0}a.status=73}if(73===a.status){if(a.gzhead.name){let e,i=a.pending;do{if(a.pending===a.pending_buf_size){if(a.gzhead.hcrc&&a.pending>i&&(t.adler=N(t.adler,a.pending_buf,a.pending-i,i)),ct(t),0!==a.pending)return a.last_flush=-1,q;i=0}e=a.gzindex<a.gzhead.name.length?255&a.gzhead.name.charCodeAt(a.gzindex++):0,wt(a,e)}while(0!==e);a.gzhead.hcrc&&a.pending>i&&(t.adler=N(t.adler,a.pending_buf,a.pending-i,i)),a.gzindex=0}a.status=91}if(91===a.status){if(a.gzhead.comment){let e,i=a.pending;do{if(a.pending===a.pending_buf_size){if(a.gzhead.hcrc&&a.pending>i&&(t.adler=N(t.adler,a.pending_buf,a.pending-i,i)),ct(t),0!==a.pending)return a.last_flush=-1,q;i=0}e=a.gzindex<a.gzhead.comment.length?255&a.gzhead.comment.charCodeAt(a.gzindex++):0,wt(a,e)}while(0!==e);a.gzhead.hcrc&&a.pending>i&&(t.adler=N(t.adler,a.pending_buf,a.pending-i,i))}a.status=103}if(103===a.status){if(a.gzhead.hcrc){if(a.pending+2>a.pending_buf_size&&(ct(t),0!==a.pending))return a.last_flush=-1,q;wt(a,255&t.adler),wt(a,t.adler>>8&255),t.adler=0}if(a.status=113,ct(t),0!==a.pending)return a.last_flush=-1,q}if(0!==t.avail_in||0!==a.lookahead||e!==P&&666!==a.status){let i=0===a.level?kt(a,e):a.strategy===at?((t,e)=>{let a;for(;;){if(0===t.lookahead&&(pt(t),0===t.lookahead)){if(e===P)return 1;break}if(t.match_length=0,a=j(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,a&&(ut(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===X?(ut(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(ut(t,!1),0===t.strm.avail_out)?1:2})(a,e):a.strategy===it?((t,e)=>{let a,i,n,s;const r=t.window;for(;;){if(t.lookahead<=258){if(pt(t),t.lookahead<=258&&e===P)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&t.strstart>0&&(n=t.strstart-1,i=r[n],i===r[++n]&&i===r[++n]&&i===r[++n])){s=t.strstart+258;do{}while(i===r[++n]&&i===r[++n]&&i===r[++n]&&i===r[++n]&&i===r[++n]&&i===r[++n]&&i===r[++n]&&i===r[++n]&&n<s);t.match_length=258-(s-n),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(a=j(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(a=j(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),a&&(ut(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===X?(ut(t,!0),0===t.strm.avail_out?3:4):t.sym_next&&(ut(t,!1),0===t.strm.avail_out)?1:2})(a,e):zt[a.level].func(a,e);if(3!==i&&4!==i||(a.status=666),1===i||3===i)return 0===t.avail_out&&(a.last_flush=-1),q;if(2===i&&(e===Y?K(a):e!==W&&(H(a,0,0,!1),e===G&&(dt(a.head),0===a.lookahead&&(a.strstart=0,a.block_start=0,a.insert=0))),ct(t),0===t.avail_out))return a.last_flush=-1,q}return e!==X?q:a.wrap<=0?J:(2===a.wrap?(wt(a,255&t.adler),wt(a,t.adler>>8&255),wt(a,t.adler>>16&255),wt(a,t.adler>>24&255),wt(a,255&t.total_in),wt(a,t.total_in>>8&255),wt(a,t.total_in>>16&255),wt(a,t.total_in>>24&255)):(mt(a,t.adler>>>16),mt(a,65535&t.adler)),ct(t),a.wrap>0&&(a.wrap=-a.wrap),0!==a.pending?q:J)},deflateEnd:t=>{if(Et(t))return Q;const e=t.state.status;return t.state=null,113===e?lt(t,V):q},deflateSetDictionary:(t,e)=>{let a=e.length;if(Et(t))return Q;const i=t.state,n=i.wrap;if(2===n||1===n&&42!==i.status||i.lookahead)return Q;if(1===n&&(t.adler=F(t.adler,e,a,0)),i.wrap=0,a>=i.w_size){0===n&&(dt(i.head),i.strstart=0,i.block_start=0,i.insert=0);let t=new Uint8Array(i.w_size);t.set(e.subarray(a-i.w_size,a),0),e=t,a=i.w_size}const s=t.avail_in,r=t.next_in,o=t.input;for(t.avail_in=a,t.next_in=0,t.input=e,pt(i);i.lookahead>=3;){let t=i.strstart,e=i.lookahead-2;do{i.ins_h=ft(i,i.ins_h,i.window[t+3-1]),i.prev[t&i.w_mask]=i.head[i.ins_h],i.head[i.ins_h]=t,t++}while(--e);i.strstart=t,i.lookahead=2,pt(i)}return i.strstart+=i.lookahead,i.block_start=i.strstart,i.insert=i.lookahead,i.lookahead=0,i.match_length=i.prev_length=2,i.match_available=0,t.next_in=r,t.input=o,t.avail_in=s,i.wrap=n,q},deflateInfo:"pako deflate (from Nodeca project)"};const Dt=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var Tt=function(t){const e=Array.prototype.slice.call(arguments,1);for(;e.length;){const a=e.shift();if(a){if("object"!=typeof a)throw new TypeError(a+"must be non-object");for(const e in a)Dt(a,e)&&(t[e]=a[e])}}return t},Ot=t=>{let e=0;for(let a=0,i=t.length;a<i;a++)e+=t[a].length;const a=new Uint8Array(e);for(let e=0,i=0,n=t.length;e<n;e++){let n=t[e];a.set(n,i),i+=n.length}return a};let Ft=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(t){Ft=!1}const Lt=new Uint8Array(256);for(let t=0;t<256;t++)Lt[t]=t>=252?6:t>=248?5:t>=240?4:t>=224?3:t>=192?2:1;Lt[254]=Lt[254]=1;var Nt=t=>{if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(t);let e,a,i,n,s,r=t.length,o=0;for(n=0;n<r;n++)a=t.charCodeAt(n),55296==(64512&a)&&n+1<r&&(i=t.charCodeAt(n+1),56320==(64512&i)&&(a=65536+(a-55296<<10)+(i-56320),n++)),o+=a<128?1:a<2048?2:a<65536?3:4;for(e=new Uint8Array(o),s=0,n=0;s<o;n++)a=t.charCodeAt(n),55296==(64512&a)&&n+1<r&&(i=t.charCodeAt(n+1),56320==(64512&i)&&(a=65536+(a-55296<<10)+(i-56320),n++)),a<128?e[s++]=a:a<2048?(e[s++]=192|a>>>6,e[s++]=128|63&a):a<65536?(e[s++]=224|a>>>12,e[s++]=128|a>>>6&63,e[s++]=128|63&a):(e[s++]=240|a>>>18,e[s++]=128|a>>>12&63,e[s++]=128|a>>>6&63,e[s++]=128|63&a);return e},It=(t,e)=>{const a=e||t.length;if("function"==typeof TextDecoder&&TextDecoder.prototype.decode)return(new TextDecoder).decode(t.subarray(0,e));let i,n;const s=new Array(2*a);for(n=0,i=0;i<a;){let e=t[i++];if(e<128){s[n++]=e;continue}let r=Lt[e];if(r>4)s[n++]=65533,i+=r-1;else{for(e&=2===r?31:3===r?15:7;r>1&&i<a;)e=e<<6|63&t[i++],r--;r>1?s[n++]=65533:e<65536?s[n++]=e:(e-=65536,s[n++]=55296|e>>10&1023,s[n++]=56320|1023&e)}}return((t,e)=>{if(e<65534&&t.subarray&&Ft)return String.fromCharCode.apply(null,t.length===e?t:t.subarray(0,e));let a="";for(let i=0;i<e;i++)a+=String.fromCharCode(t[i]);return a})(s,n)},Bt=(t,e)=>{(e=e||t.length)>t.length&&(e=t.length);let a=e-1;for(;a>=0&&128==(192&t[a]);)a--;return a<0||0===a?e:a+Lt[t[a]]>e?a:e};var Ct=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0};const Ht=Object.prototype.toString,{Z_NO_FLUSH:Mt,Z_SYNC_FLUSH:jt,Z_FULL_FLUSH:Kt,Z_FINISH:Pt,Z_OK:Yt,Z_STREAM_END:Gt,Z_DEFAULT_COMPRESSION:Xt,Z_DEFAULT_STRATEGY:Wt,Z_DEFLATED:qt}=B;function Jt(t){this.options=Tt({level:Xt,method:qt,chunkSize:16384,windowBits:15,memLevel:8,strategy:Wt},t||{});let e=this.options;e.raw&&e.windowBits>0?e.windowBits=-e.windowBits:e.gzip&&e.windowBits>0&&e.windowBits<16&&(e.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Ct,this.strm.avail_out=0;let a=St.deflateInit2(this.strm,e.level,e.method,e.windowBits,e.memLevel,e.strategy);if(a!==Yt)throw new Error(I[a]);if(e.header&&St.deflateSetHeader(this.strm,e.header),e.dictionary){let t;if(t="string"==typeof e.dictionary?Nt(e.dictionary):"[object ArrayBuffer]"===Ht.call(e.dictionary)?new Uint8Array(e.dictionary):e.dictionary,a=St.deflateSetDictionary(this.strm,t),a!==Yt)throw new Error(I[a]);this._dict_set=!0}}function Qt(t,e){const a=new Jt(e);if(a.push(t,!0),a.err)throw a.msg||I[a.err];return a.result}Jt.prototype.push=function(t,e){const a=this.strm,i=this.options.chunkSize;let n,s;if(this.ended)return!1;for(s=e===~~e?e:!0===e?Pt:Mt,"string"==typeof t?a.input=Nt(t):"[object ArrayBuffer]"===Ht.call(t)?a.input=new Uint8Array(t):a.input=t,a.next_in=0,a.avail_in=a.input.length;;)if(0===a.avail_out&&(a.output=new Uint8Array(i),a.next_out=0,a.avail_out=i),(s===jt||s===Kt)&&a.avail_out<=6)this.onData(a.output.subarray(0,a.next_out)),a.avail_out=0;else{if(n=St.deflate(a,s),n===Gt)return a.next_out>0&&this.onData(a.output.subarray(0,a.next_out)),n=St.deflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===Yt;if(0!==a.avail_out){if(s>0&&a.next_out>0)this.onData(a.output.subarray(0,a.next_out)),a.avail_out=0;else if(0===a.avail_in)break}else this.onData(a.output)}return!0},Jt.prototype.onData=function(t){this.chunks.push(t)},Jt.prototype.onEnd=function(t){t===Yt&&(this.result=Ot(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};var Vt={Deflate:Jt,deflate:Qt,deflateRaw:function(t,e){return(e=e||{}).raw=!0,Qt(t,e)},gzip:function(t,e){return(e=e||{}).gzip=!0,Qt(t,e)},constants:B};var $t=function(t,e){let a,i,n,s,r,o,l,h,d,_,f,c,u,w,m,b,g,p,k,v,y,x,z,A;const E=t.state;a=t.next_in,z=t.input,i=a+(t.avail_in-5),n=t.next_out,A=t.output,s=n-(e-t.avail_out),r=n+(t.avail_out-257),o=E.dmax,l=E.wsize,h=E.whave,d=E.wnext,_=E.window,f=E.hold,c=E.bits,u=E.lencode,w=E.distcode,m=(1<<E.lenbits)-1,b=(1<<E.distbits)-1;t:do{c<15&&(f+=z[a++]<<c,c+=8,f+=z[a++]<<c,c+=8),g=u[f&m];e:for(;;){if(p=g>>>24,f>>>=p,c-=p,p=g>>>16&255,0===p)A[n++]=65535&g;else{if(!(16&p)){if(0==(64&p)){g=u[(65535&g)+(f&(1<<p)-1)];continue e}if(32&p){E.mode=16191;break t}t.msg="invalid literal/length code",E.mode=16209;break t}k=65535&g,p&=15,p&&(c<p&&(f+=z[a++]<<c,c+=8),k+=f&(1<<p)-1,f>>>=p,c-=p),c<15&&(f+=z[a++]<<c,c+=8,f+=z[a++]<<c,c+=8),g=w[f&b];a:for(;;){if(p=g>>>24,f>>>=p,c-=p,p=g>>>16&255,!(16&p)){if(0==(64&p)){g=w[(65535&g)+(f&(1<<p)-1)];continue a}t.msg="invalid distance code",E.mode=16209;break t}if(v=65535&g,p&=15,c<p&&(f+=z[a++]<<c,c+=8,c<p&&(f+=z[a++]<<c,c+=8)),v+=f&(1<<p)-1,v>o){t.msg="invalid distance too far back",E.mode=16209;break t}if(f>>>=p,c-=p,p=n-s,v>p){if(p=v-p,p>h&&E.sane){t.msg="invalid distance too far back",E.mode=16209;break t}if(y=0,x=_,0===d){if(y+=l-p,p<k){k-=p;do{A[n++]=_[y++]}while(--p);y=n-v,x=A}}else if(d<p){if(y+=l+d-p,p-=d,p<k){k-=p;do{A[n++]=_[y++]}while(--p);if(y=0,d<k){p=d,k-=p;do{A[n++]=_[y++]}while(--p);y=n-v,x=A}}}else if(y+=d-p,p<k){k-=p;do{A[n++]=_[y++]}while(--p);y=n-v,x=A}for(;k>2;)A[n++]=x[y++],A[n++]=x[y++],A[n++]=x[y++],k-=3;k&&(A[n++]=x[y++],k>1&&(A[n++]=x[y++]))}else{y=n-v;do{A[n++]=A[y++],A[n++]=A[y++],A[n++]=A[y++],k-=3}while(k>2);k&&(A[n++]=A[y++],k>1&&(A[n++]=A[y++]))}break}}break}}while(a<i&&n<r);k=c>>3,a-=k,c-=k<<3,f&=(1<<c)-1,t.next_in=a,t.next_out=n,t.avail_in=a<i?i-a+5:5-(a-i),t.avail_out=n<r?r-n+257:257-(n-r),E.hold=f,E.bits=c};const te=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),ee=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),ae=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),ie=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]);var ne=(t,e,a,i,n,s,r,o)=>{const l=o.bits;let h,d,_,f,c,u,w=0,m=0,b=0,g=0,p=0,k=0,v=0,y=0,x=0,z=0,A=null;const E=new Uint16Array(16),R=new Uint16Array(16);let Z,U,S,D=null;for(w=0;w<=15;w++)E[w]=0;for(m=0;m<i;m++)E[e[a+m]]++;for(p=l,g=15;g>=1&&0===E[g];g--);if(p>g&&(p=g),0===g)return n[s++]=20971520,n[s++]=20971520,o.bits=1,0;for(b=1;b<g&&0===E[b];b++);for(p<b&&(p=b),y=1,w=1;w<=15;w++)if(y<<=1,y-=E[w],y<0)return-1;if(y>0&&(0===t||1!==g))return-1;for(R[1]=0,w=1;w<15;w++)R[w+1]=R[w]+E[w];for(m=0;m<i;m++)0!==e[a+m]&&(r[R[e[a+m]]++]=m);if(0===t?(A=D=r,u=20):1===t?(A=te,D=ee,u=257):(A=ae,D=ie,u=0),z=0,m=0,w=b,c=s,k=p,v=0,_=-1,x=1<<p,f=x-1,1===t&&x>852||2===t&&x>592)return 1;for(;;){Z=w-v,r[m]+1<u?(U=0,S=r[m]):r[m]>=u?(U=D[r[m]-u],S=A[r[m]-u]):(U=96,S=0),h=1<<w-v,d=1<<k,b=d;do{d-=h,n[c+(z>>v)+d]=Z<<24|U<<16|S|0}while(0!==d);for(h=1<<w-1;z&h;)h>>=1;if(0!==h?(z&=h-1,z+=h):z=0,m++,0==--E[w]){if(w===g)break;w=e[a+r[m]]}if(w>p&&(z&f)!==_){for(0===v&&(v=p),c+=b,k=w-v,y=1<<k;k+v<g&&(y-=E[k+v],!(y<=0));)k++,y<<=1;if(x+=1<<k,1===t&&x>852||2===t&&x>592)return 1;_=z&f,n[_]=p<<24|k<<16|c-s|0}}return 0!==z&&(n[c+z]=w-v<<24|64<<16|0),o.bits=p,0};const{Z_FINISH:se,Z_BLOCK:re,Z_TREES:oe,Z_OK:le,Z_STREAM_END:he,Z_NEED_DICT:de,Z_STREAM_ERROR:_e,Z_DATA_ERROR:fe,Z_MEM_ERROR:ce,Z_BUF_ERROR:ue,Z_DEFLATED:we}=B,me=16209,be=t=>(t>>>24&255)+(t>>>8&65280)+((65280&t)<<8)+((255&t)<<24);function ge(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}const pe=t=>{if(!t)return 1;const e=t.state;return!e||e.strm!==t||e.mode<16180||e.mode>16211?1:0},ke=t=>{if(pe(t))return _e;const e=t.state;return t.total_in=t.total_out=e.total=0,t.msg="",e.wrap&&(t.adler=1&e.wrap),e.mode=16180,e.last=0,e.havedict=0,e.flags=-1,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new Int32Array(852),e.distcode=e.distdyn=new Int32Array(592),e.sane=1,e.back=-1,le},ve=t=>{if(pe(t))return _e;const e=t.state;return e.wsize=0,e.whave=0,e.wnext=0,ke(t)},ye=(t,e)=>{let a;if(pe(t))return _e;const i=t.state;return e<0?(a=0,e=-e):(a=5+(e>>4),e<48&&(e&=15)),e&&(e<8||e>15)?_e:(null!==i.window&&i.wbits!==e&&(i.window=null),i.wrap=a,i.wbits=e,ve(t))},xe=(t,e)=>{if(!t)return _e;const a=new ge;t.state=a,a.strm=t,a.window=null,a.mode=16180;const i=ye(t,e);return i!==le&&(t.state=null),i};let ze,Ae,Ee=!0;const Re=t=>{if(Ee){ze=new Int32Array(512),Ae=new Int32Array(32);let e=0;for(;e<144;)t.lens[e++]=8;for(;e<256;)t.lens[e++]=9;for(;e<280;)t.lens[e++]=7;for(;e<288;)t.lens[e++]=8;for(ne(1,t.lens,0,288,ze,0,t.work,{bits:9}),e=0;e<32;)t.lens[e++]=5;ne(2,t.lens,0,32,Ae,0,t.work,{bits:5}),Ee=!1}t.lencode=ze,t.lenbits=9,t.distcode=Ae,t.distbits=5},Ze=(t,e,a,i)=>{let n;const s=t.state;return null===s.window&&(s.wsize=1<<s.wbits,s.wnext=0,s.whave=0,s.window=new Uint8Array(s.wsize)),i>=s.wsize?(s.window.set(e.subarray(a-s.wsize,a),0),s.wnext=0,s.whave=s.wsize):(n=s.wsize-s.wnext,n>i&&(n=i),s.window.set(e.subarray(a-i,a-i+n),s.wnext),(i-=n)?(s.window.set(e.subarray(a-i,a),0),s.wnext=i,s.whave=s.wsize):(s.wnext+=n,s.wnext===s.wsize&&(s.wnext=0),s.whave<s.wsize&&(s.whave+=n))),0};var Ue={inflateReset:ve,inflateReset2:ye,inflateResetKeep:ke,inflateInit:t=>xe(t,15),inflateInit2:xe,inflate:(t,e)=>{let a,i,n,s,r,o,l,h,d,_,f,c,u,w,m,b,g,p,k,v,y,x,z=0;const A=new Uint8Array(4);let E,R;const Z=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(pe(t)||!t.output||!t.input&&0!==t.avail_in)return _e;a=t.state,16191===a.mode&&(a.mode=16192),r=t.next_out,n=t.output,l=t.avail_out,s=t.next_in,i=t.input,o=t.avail_in,h=a.hold,d=a.bits,_=o,f=l,x=le;t:for(;;)switch(a.mode){case 16180:if(0===a.wrap){a.mode=16192;break}for(;d<16;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}if(2&a.wrap&&35615===h){0===a.wbits&&(a.wbits=15),a.check=0,A[0]=255&h,A[1]=h>>>8&255,a.check=N(a.check,A,2,0),h=0,d=0,a.mode=16181;break}if(a.head&&(a.head.done=!1),!(1&a.wrap)||(((255&h)<<8)+(h>>8))%31){t.msg="incorrect header check",a.mode=me;break}if((15&h)!==we){t.msg="unknown compression method",a.mode=me;break}if(h>>>=4,d-=4,y=8+(15&h),0===a.wbits&&(a.wbits=y),y>15||y>a.wbits){t.msg="invalid window size",a.mode=me;break}a.dmax=1<<a.wbits,a.flags=0,t.adler=a.check=1,a.mode=512&h?16189:16191,h=0,d=0;break;case 16181:for(;d<16;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}if(a.flags=h,(255&a.flags)!==we){t.msg="unknown compression method",a.mode=me;break}if(57344&a.flags){t.msg="unknown header flags set",a.mode=me;break}a.head&&(a.head.text=h>>8&1),512&a.flags&&4&a.wrap&&(A[0]=255&h,A[1]=h>>>8&255,a.check=N(a.check,A,2,0)),h=0,d=0,a.mode=16182;case 16182:for(;d<32;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}a.head&&(a.head.time=h),512&a.flags&&4&a.wrap&&(A[0]=255&h,A[1]=h>>>8&255,A[2]=h>>>16&255,A[3]=h>>>24&255,a.check=N(a.check,A,4,0)),h=0,d=0,a.mode=16183;case 16183:for(;d<16;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}a.head&&(a.head.xflags=255&h,a.head.os=h>>8),512&a.flags&&4&a.wrap&&(A[0]=255&h,A[1]=h>>>8&255,a.check=N(a.check,A,2,0)),h=0,d=0,a.mode=16184;case 16184:if(1024&a.flags){for(;d<16;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}a.length=h,a.head&&(a.head.extra_len=h),512&a.flags&&4&a.wrap&&(A[0]=255&h,A[1]=h>>>8&255,a.check=N(a.check,A,2,0)),h=0,d=0}else a.head&&(a.head.extra=null);a.mode=16185;case 16185:if(1024&a.flags&&(c=a.length,c>o&&(c=o),c&&(a.head&&(y=a.head.extra_len-a.length,a.head.extra||(a.head.extra=new Uint8Array(a.head.extra_len)),a.head.extra.set(i.subarray(s,s+c),y)),512&a.flags&&4&a.wrap&&(a.check=N(a.check,i,c,s)),o-=c,s+=c,a.length-=c),a.length))break t;a.length=0,a.mode=16186;case 16186:if(2048&a.flags){if(0===o)break t;c=0;do{y=i[s+c++],a.head&&y&&a.length<65536&&(a.head.name+=String.fromCharCode(y))}while(y&&c<o);if(512&a.flags&&4&a.wrap&&(a.check=N(a.check,i,c,s)),o-=c,s+=c,y)break t}else a.head&&(a.head.name=null);a.length=0,a.mode=16187;case 16187:if(4096&a.flags){if(0===o)break t;c=0;do{y=i[s+c++],a.head&&y&&a.length<65536&&(a.head.comment+=String.fromCharCode(y))}while(y&&c<o);if(512&a.flags&&4&a.wrap&&(a.check=N(a.check,i,c,s)),o-=c,s+=c,y)break t}else a.head&&(a.head.comment=null);a.mode=16188;case 16188:if(512&a.flags){for(;d<16;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}if(4&a.wrap&&h!==(65535&a.check)){t.msg="header crc mismatch",a.mode=me;break}h=0,d=0}a.head&&(a.head.hcrc=a.flags>>9&1,a.head.done=!0),t.adler=a.check=0,a.mode=16191;break;case 16189:for(;d<32;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}t.adler=a.check=be(h),h=0,d=0,a.mode=16190;case 16190:if(0===a.havedict)return t.next_out=r,t.avail_out=l,t.next_in=s,t.avail_in=o,a.hold=h,a.bits=d,de;t.adler=a.check=1,a.mode=16191;case 16191:if(e===re||e===oe)break t;case 16192:if(a.last){h>>>=7&d,d-=7&d,a.mode=16206;break}for(;d<3;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}switch(a.last=1&h,h>>>=1,d-=1,3&h){case 0:a.mode=16193;break;case 1:if(Re(a),a.mode=16199,e===oe){h>>>=2,d-=2;break t}break;case 2:a.mode=16196;break;case 3:t.msg="invalid block type",a.mode=me}h>>>=2,d-=2;break;case 16193:for(h>>>=7&d,d-=7&d;d<32;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}if((65535&h)!=(h>>>16^65535)){t.msg="invalid stored block lengths",a.mode=me;break}if(a.length=65535&h,h=0,d=0,a.mode=16194,e===oe)break t;case 16194:a.mode=16195;case 16195:if(c=a.length,c){if(c>o&&(c=o),c>l&&(c=l),0===c)break t;n.set(i.subarray(s,s+c),r),o-=c,s+=c,l-=c,r+=c,a.length-=c;break}a.mode=16191;break;case 16196:for(;d<14;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}if(a.nlen=257+(31&h),h>>>=5,d-=5,a.ndist=1+(31&h),h>>>=5,d-=5,a.ncode=4+(15&h),h>>>=4,d-=4,a.nlen>286||a.ndist>30){t.msg="too many length or distance symbols",a.mode=me;break}a.have=0,a.mode=16197;case 16197:for(;a.have<a.ncode;){for(;d<3;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}a.lens[Z[a.have++]]=7&h,h>>>=3,d-=3}for(;a.have<19;)a.lens[Z[a.have++]]=0;if(a.lencode=a.lendyn,a.lenbits=7,E={bits:a.lenbits},x=ne(0,a.lens,0,19,a.lencode,0,a.work,E),a.lenbits=E.bits,x){t.msg="invalid code lengths set",a.mode=me;break}a.have=0,a.mode=16198;case 16198:for(;a.have<a.nlen+a.ndist;){for(;z=a.lencode[h&(1<<a.lenbits)-1],m=z>>>24,b=z>>>16&255,g=65535&z,!(m<=d);){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}if(g<16)h>>>=m,d-=m,a.lens[a.have++]=g;else{if(16===g){for(R=m+2;d<R;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}if(h>>>=m,d-=m,0===a.have){t.msg="invalid bit length repeat",a.mode=me;break}y=a.lens[a.have-1],c=3+(3&h),h>>>=2,d-=2}else if(17===g){for(R=m+3;d<R;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}h>>>=m,d-=m,y=0,c=3+(7&h),h>>>=3,d-=3}else{for(R=m+7;d<R;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}h>>>=m,d-=m,y=0,c=11+(127&h),h>>>=7,d-=7}if(a.have+c>a.nlen+a.ndist){t.msg="invalid bit length repeat",a.mode=me;break}for(;c--;)a.lens[a.have++]=y}}if(a.mode===me)break;if(0===a.lens[256]){t.msg="invalid code -- missing end-of-block",a.mode=me;break}if(a.lenbits=9,E={bits:a.lenbits},x=ne(1,a.lens,0,a.nlen,a.lencode,0,a.work,E),a.lenbits=E.bits,x){t.msg="invalid literal/lengths set",a.mode=me;break}if(a.distbits=6,a.distcode=a.distdyn,E={bits:a.distbits},x=ne(2,a.lens,a.nlen,a.ndist,a.distcode,0,a.work,E),a.distbits=E.bits,x){t.msg="invalid distances set",a.mode=me;break}if(a.mode=16199,e===oe)break t;case 16199:a.mode=16200;case 16200:if(o>=6&&l>=258){t.next_out=r,t.avail_out=l,t.next_in=s,t.avail_in=o,a.hold=h,a.bits=d,$t(t,f),r=t.next_out,n=t.output,l=t.avail_out,s=t.next_in,i=t.input,o=t.avail_in,h=a.hold,d=a.bits,16191===a.mode&&(a.back=-1);break}for(a.back=0;z=a.lencode[h&(1<<a.lenbits)-1],m=z>>>24,b=z>>>16&255,g=65535&z,!(m<=d);){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}if(b&&0==(240&b)){for(p=m,k=b,v=g;z=a.lencode[v+((h&(1<<p+k)-1)>>p)],m=z>>>24,b=z>>>16&255,g=65535&z,!(p+m<=d);){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}h>>>=p,d-=p,a.back+=p}if(h>>>=m,d-=m,a.back+=m,a.length=g,0===b){a.mode=16205;break}if(32&b){a.back=-1,a.mode=16191;break}if(64&b){t.msg="invalid literal/length code",a.mode=me;break}a.extra=15&b,a.mode=16201;case 16201:if(a.extra){for(R=a.extra;d<R;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}a.length+=h&(1<<a.extra)-1,h>>>=a.extra,d-=a.extra,a.back+=a.extra}a.was=a.length,a.mode=16202;case 16202:for(;z=a.distcode[h&(1<<a.distbits)-1],m=z>>>24,b=z>>>16&255,g=65535&z,!(m<=d);){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}if(0==(240&b)){for(p=m,k=b,v=g;z=a.distcode[v+((h&(1<<p+k)-1)>>p)],m=z>>>24,b=z>>>16&255,g=65535&z,!(p+m<=d);){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}h>>>=p,d-=p,a.back+=p}if(h>>>=m,d-=m,a.back+=m,64&b){t.msg="invalid distance code",a.mode=me;break}a.offset=g,a.extra=15&b,a.mode=16203;case 16203:if(a.extra){for(R=a.extra;d<R;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}a.offset+=h&(1<<a.extra)-1,h>>>=a.extra,d-=a.extra,a.back+=a.extra}if(a.offset>a.dmax){t.msg="invalid distance too far back",a.mode=me;break}a.mode=16204;case 16204:if(0===l)break t;if(c=f-l,a.offset>c){if(c=a.offset-c,c>a.whave&&a.sane){t.msg="invalid distance too far back",a.mode=me;break}c>a.wnext?(c-=a.wnext,u=a.wsize-c):u=a.wnext-c,c>a.length&&(c=a.length),w=a.window}else w=n,u=r-a.offset,c=a.length;c>l&&(c=l),l-=c,a.length-=c;do{n[r++]=w[u++]}while(--c);0===a.length&&(a.mode=16200);break;case 16205:if(0===l)break t;n[r++]=a.length,l--,a.mode=16200;break;case 16206:if(a.wrap){for(;d<32;){if(0===o)break t;o--,h|=i[s++]<<d,d+=8}if(f-=l,t.total_out+=f,a.total+=f,4&a.wrap&&f&&(t.adler=a.check=a.flags?N(a.check,n,f,r-f):F(a.check,n,f,r-f)),f=l,4&a.wrap&&(a.flags?h:be(h))!==a.check){t.msg="incorrect data check",a.mode=me;break}h=0,d=0}a.mode=16207;case 16207:if(a.wrap&&a.flags){for(;d<32;){if(0===o)break t;o--,h+=i[s++]<<d,d+=8}if(4&a.wrap&&h!==(4294967295&a.total)){t.msg="incorrect length check",a.mode=me;break}h=0,d=0}a.mode=16208;case 16208:x=he;break t;case me:x=fe;break t;case 16210:return ce;default:return _e}return t.next_out=r,t.avail_out=l,t.next_in=s,t.avail_in=o,a.hold=h,a.bits=d,(a.wsize||f!==t.avail_out&&a.mode<me&&(a.mode<16206||e!==se))&&Ze(t,t.output,t.next_out,f-t.avail_out),_-=t.avail_in,f-=t.avail_out,t.total_in+=_,t.total_out+=f,a.total+=f,4&a.wrap&&f&&(t.adler=a.check=a.flags?N(a.check,n,f,t.next_out-f):F(a.check,n,f,t.next_out-f)),t.data_type=a.bits+(a.last?64:0)+(16191===a.mode?128:0)+(16199===a.mode||16194===a.mode?256:0),(0===_&&0===f||e===se)&&x===le&&(x=ue),x},inflateEnd:t=>{if(pe(t))return _e;let e=t.state;return e.window&&(e.window=null),t.state=null,le},inflateGetHeader:(t,e)=>{if(pe(t))return _e;const a=t.state;return 0==(2&a.wrap)?_e:(a.head=e,e.done=!1,le)},inflateSetDictionary:(t,e)=>{const a=e.length;let i,n,s;return pe(t)?_e:(i=t.state,0!==i.wrap&&16190!==i.mode?_e:16190===i.mode&&(n=1,n=F(n,e,a,0),n!==i.check)?fe:(s=Ze(t,e,a,a),s?(i.mode=16210,ce):(i.havedict=1,le)))},inflateInfo:"pako inflate (from Nodeca project)"};var Se=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1};const De=Object.prototype.toString,{Z_NO_FLUSH:Te,Z_FINISH:Oe,Z_OK:Fe,Z_STREAM_END:Le,Z_NEED_DICT:Ne,Z_STREAM_ERROR:Ie,Z_DATA_ERROR:Be,Z_MEM_ERROR:Ce}=B;function He(t){this.options=Tt({chunkSize:65536,windowBits:15,to:""},t||{});const e=this.options;e.raw&&e.windowBits>=0&&e.windowBits<16&&(e.windowBits=-e.windowBits,0===e.windowBits&&(e.windowBits=-15)),!(e.windowBits>=0&&e.windowBits<16)||t&&t.windowBits||(e.windowBits+=32),e.windowBits>15&&e.windowBits<48&&0==(15&e.windowBits)&&(e.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Ct,this.strm.avail_out=0;let a=Ue.inflateInit2(this.strm,e.windowBits);if(a!==Fe)throw new Error(I[a]);if(this.header=new Se,Ue.inflateGetHeader(this.strm,this.header),e.dictionary&&("string"==typeof e.dictionary?e.dictionary=Nt(e.dictionary):"[object ArrayBuffer]"===De.call(e.dictionary)&&(e.dictionary=new Uint8Array(e.dictionary)),e.raw&&(a=Ue.inflateSetDictionary(this.strm,e.dictionary),a!==Fe)))throw new Error(I[a])}He.prototype.push=function(t,e){const a=this.strm,i=this.options.chunkSize,n=this.options.dictionary;let s,r,o;if(this.ended)return!1;for(r=e===~~e?e:!0===e?Oe:Te,"[object ArrayBuffer]"===De.call(t)?a.input=new Uint8Array(t):a.input=t,a.next_in=0,a.avail_in=a.input.length;;){for(0===a.avail_out&&(a.output=new Uint8Array(i),a.next_out=0,a.avail_out=i),s=Ue.inflate(a,r),s===Ne&&n&&(s=Ue.inflateSetDictionary(a,n),s===Fe?s=Ue.inflate(a,r):s===Be&&(s=Ne));a.avail_in>0&&s===Le&&a.state.wrap>0&&0!==t[a.next_in];)Ue.inflateReset(a),s=Ue.inflate(a,r);switch(s){case Ie:case Be:case Ne:case Ce:return this.onEnd(s),this.ended=!0,!1}if(o=a.avail_out,a.next_out&&(0===a.avail_out||s===Le))if("string"===this.options.to){let t=Bt(a.output,a.next_out),e=a.next_out-t,n=It(a.output,t);a.next_out=e,a.avail_out=i-e,e&&a.output.set(a.output.subarray(t,t+e),0),this.onData(n)}else this.onData(a.output.length===a.next_out?a.output:a.output.subarray(0,a.next_out));if(s!==Fe||0!==o){if(s===Le)return s=Ue.inflateEnd(this.strm),this.onEnd(s),this.ended=!0,!0;if(0===a.avail_in)break}}return!0},He.prototype.onData=function(t){this.chunks.push(t)},He.prototype.onEnd=function(t){t===Fe&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=Ot(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg};const{Deflate:Me,deflate:je,deflateRaw:Ke,gzip:Pe}=Vt;var Ye=Me,Ge=je,Xe=B;const We=new class{constructor(){this._init()}clear(){this._init()}addEvent(t){if(!t)throw new Error("Adding invalid event");const e=this._hasEvents?",":"";this.deflate.push(e+t,Xe.Z_SYNC_FLUSH),this._hasEvents=!0}finish(){if(this.deflate.push("]",Xe.Z_FINISH),this.deflate.err)throw this.deflate.err;const t=this.deflate.result;return this._init(),t}_init(){this._hasEvents=!1,this.deflate=new Ye,this.deflate.push("[",Xe.Z_NO_FLUSH)}},qe={clear:()=>{We.clear()},addEvent:t=>We.addEvent(t),finish:()=>We.finish(),compress:t=>function(t){return Ge(t)}(t)};addEventListener("message",(function(t){const e=t.data.method,a=t.data.id,i=t.data.arg;if(e in qe&&"function"==typeof qe[e])try{const t=qe[e](i);postMessage({id:a,method:e,success:!0,response:t})}catch(t){postMessage({id:a,method:e,success:!1,response:t.message}),console.error(t)}})),postMessage({id:void 0,method:"init",success:!0,response:void 0});']);return URL.createObjectURL(t)}();("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.log("[Replay] Using compression worker");const e=new Worker(t);return new Na(e)}catch(t){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.log("[Replay] Failed to create compression worker")}return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.log("[Replay] Using simple buffer"),new xa}({useCompression:this._options.useCompression}),this._addListeners(),this._isEnabled=!0,this.startRecording()):this._handleException(new Error("No session found")))}startRecording(){try{this._stopRecording=ka({...this._recordingOptions,..."error"===this.recordingMode&&{checkoutEveryNms:6e4},emit:ko(this),onMutation:this._onMutationHandler})}catch(t){this._handleException(t)}}stopRecording(){try{return!!this._stopRecording&&(this._stopRecording(),this._stopRecording=void 0,!0)}catch(t){return this._handleException(t),!1}}stop(t){if(this._isEnabled)try{if("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__){const e="[Replay] Stopping Replay"+(t?` triggered by ${t}`:"");(this.getOptions()._experiments.traceInternals?console.warn:ke.log)(e)}this._isEnabled=!1,this._removeListeners(),this.stopRecording(),this.eventBuffer&&this.eventBuffer.destroy(),this.eventBuffer=null,this._debouncedFlush.cancel()}catch(t){this._handleException(t)}}pause(){this._isPaused=!0,this.stopRecording()}resume(){this._loadAndCheckSession()&&(this._isPaused=!1,this.startRecording())}addUpdate(t){const e=t();"error"!==this.recordingMode&&!0!==e&&this._debouncedFlush()}triggerUserActivity(){if(this._updateUserActivity(),this._stopRecording)this.checkAndHandleExpiredSession(),this._updateSessionActivity();else{if(!this._loadAndCheckSession())return;this.resume()}}flushImmediate(){return this._debouncedFlush(),this._debouncedFlush.flush()}getSessionId(){return this.session&&this.session.id}checkAndHandleExpiredSession(){const t=this.getSessionId();if(this._lastActivity&&Ia(this._lastActivity,this.timeouts.sessionIdle)&&this.session&&"session"===this.session.sampled)this.pause();else if(this._loadAndCheckSession())return t===this.getSessionId()||(this._triggerFullSnapshot(),!1)}setInitialState(){const t=`${qi.location.origin}${qi.location.pathname}${qi.location.hash}${qi.location.search}`;this.performanceEvents=[],this._clearContext(),this._context.initialUrl=t,this._context.initialTimestamp=Date.now(),this._context.urls.push(t)}_handleException(t){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.error("[Replay]",t),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&this._options._experiments&&this._options._experiments.captureExceptions&&Cr(t)}_loadAndCheckSession(){const{type:t,session:e}=function({timeouts:t,currentSession:e,stickySession:n,sessionSampleRate:r,errorSampleRate:i}){const s=e||n&&function(){if(!("sessionStorage"in qi))return null;try{const t=qi.sessionStorage.getItem(Vi);return t?Ba(JSON.parse(t)):null}catch(t){return null}}();if(s){if(!Aa(s,t))return{type:"saved",session:s};if("error"===s.sampled)return{type:"new",session:Ba({sampled:!1})};("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.log("[Replay] Session has expired")}return{type:"new",session:Ha({stickySession:n,sessionSampleRate:r,errorSampleRate:i})}}({timeouts:this.timeouts,stickySession:Boolean(this._options.stickySession),currentSession:this.session,sessionSampleRate:this._options.sessionSampleRate,errorSampleRate:this._options.errorSampleRate});"new"===t&&this.setInitialState();const n=this.getSessionId();return e.id!==n&&(e.previousSessionId=n),this.session=e,!!this.session.sampled||(this.stop("session unsampled"),!1)}_addListeners(){try{qi.document.addEventListener("visibilitychange",this._handleVisibilityChange),qi.addEventListener("blur",this._handleWindowBlur),qi.addEventListener("focus",this._handleWindowFocus),this._hasInitializedCoreListeners||(function(t){const e=or().getScope(),n=or().getClient();e&&e.addScopeListener((t=>e=>{if(!t.isEnabled())return;const n=function(t){const e=t.getLastBreadcrumb&&t.getLastBreadcrumb();return yo!==e&&e?(yo=e,e.category&&(["fetch","xhr","sentry.event","sentry.transaction"].includes(e.category)||e.category.startsWith("ui."))?null:Ga(e)):null}(e);n&&Ya(t,n)})(t)),Xe("dom",(t=>e=>{if(!t.isEnabled())return;const n=function(t){let e,n;try{n=function(t){return function(t){return!!t.target}(t.event)?t.event.target:t.event}(t),e=fe(n)}catch(t){e="<unknown>"}const r=n&&"__sn"in n&&n.__sn.type===za.Element?n.__sn:null;return Ga({category:`ui.${t.name}`,message:e,data:r?{nodeId:r.id,node:{id:r.id,tagName:r.tagName,textContent:n?Array.from(n.childNodes).map(t=>"__sn"in t&&t.__sn.type===za.Text&&t.__sn.textContent).filter(Boolean).map(t=>t.trim()).join(""):"",attributes:ja(r.attributes)}}:{}})}(e);n&&Ya(t,n)})(t)),Xe("history",function(t){return e=>{if(!t.isEnabled())return;const n=function(t){const{from:e,to:n}=t,r=Date.now()/1e3;return{type:"navigation.push",start:r,end:r,name:n,data:{previous:e}}}(e);null!==n&&(t.getContext().urls.push(n.name),t.triggerUserActivity(),t.addUpdate(()=>(qa(t,[n]),!1)))}}(t)),function(t){const e=or().getClient();try{const n={replay:t,textEncoder:new TextEncoder,...t.getExperimentalOptions().network};e&&e.on?e.on("beforeAddBreadcrumb",(t,e)=>function(t,e,n){if(e.data)try{(function(t){return"xhr"===t.category})(e)&&function(t){return t&&t.xhr}(n)&&(function(t,e,n){const{xhr:r,input:i}=e,s=oo(i,n.textEncoder),a=r.getResponseHeader("content-length")?co(r.getResponseHeader("content-length")):oo(r.response,n.textEncoder);void 0!==s&&(t.data.request_body_size=s),void 0!==a&&(t.data.response_body_size=a)}(e,n,t),async function(t,e,n){try{const r=function(t,e,n){const{startTimestamp:r,endTimestamp:i,input:s,xhr:a}=e,{url:o,method:c,status_code:l,request_body_size:u,response_body_size:d}=t.data,p=a[Ve],h=p?ho(p.request_headers,n.requestHeaders):{},f=ho(function(t){const e=t.getAllResponseHeaders();return e?e.split("\r\n").reduce((t,e)=>{const[n,r]=e.split(": ");return t[n.toLowerCase()]=r,t},{}):{}}(a),n.responseHeaders);return o?{startTimestamp:r,endTimestamp:i,url:o,method:c,statusCode:l||0,request:po(h,u,n.captureBodies?lo(s):void 0),response:po(f,d,n.captureBodies?e.xhr.responseText:void 0)}:null}(t,e,n),i=uo("resource.xhr",r);Va(n.replay,i)}catch(t){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.error("[Replay] Failed to capture fetch breadcrumb",t)}}(e,n,t)),function(t){return"fetch"===t.category}(e)&&function(t){return t&&t.response}(n)&&(function(t,e,n){const{input:r,response:i}=e,s=oo(_o(r),n.textEncoder),a=i?co(i.headers.get("content-length")):void 0;void 0!==s&&(t.data.request_body_size=s),void 0!==a&&(t.data.response_body_size=a)}(e,n,t),async function(t,e,n){try{const r=await async function(t,e,n){const{startTimestamp:r,endTimestamp:i}=e,{url:s,method:a,status_code:o,request_body_size:c,response_body_size:l}=t.data,u=function({captureBodies:t,requestHeaders:e},n,r){var i,s;return po((s=e,1===(i=n).length&&"string"!=typeof i[0]?go(i[0],s):2===i.length?go(i[1],s):{}),r,t?lo(_o(n)):void 0)}(n,e.input,c),d=await async function({captureBodies:t,textEncoder:e,responseHeaders:n},r,i){const s=mo(r.headers,n);if(!t&&void 0!==i)return po(s,i,void 0);try{const n=r.clone(),a=await async function(t){try{return await t.text()}catch(t){return}}(n);return po(s,a&&a.length&&void 0===i?oo(a,e):i,t?a:void 0)}catch(t){return po(s,i,void 0)}}(n,e.response,l);return{startTimestamp:r,endTimestamp:i,url:s,method:a,statusCode:o||0,request:u,response:d}}(t,e,n),i=uo("resource.fetch",r);Va(n.replay,i)}catch(t){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.error("[Replay] Failed to capture fetch breadcrumb",t)}}(e,n,t))}catch(t){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.warn("Error when enriching network breadcrumb")}}(n,t,e)):(Xe("fetch",function(t){return e=>{if(!t.isEnabled())return;const n=function(t){const{startTimestamp:e,endTimestamp:n,fetchData:r,response:i}=t;if(!n)return null;const{method:s,url:a}=r;return{type:"resource.fetch",start:e/1e3,end:n/1e3,name:a,data:{method:s,statusCode:i&&i.status}}}(e);Va(t,n)}}(t)),Xe("xhr",function(t){return e=>{if(!t.isEnabled())return;const n=function(t){const{startTimestamp:e,endTimestamp:n,xhr:r}=t,i=r[Ve];if(!e||!n||!i)return null;const{method:s,url:a,status_code:o}=i;return void 0===a?null:{type:"resource.xhr",name:a,start:e/1e3,end:n/1e3,data:{method:s,statusCode:o}}}(e);Va(t,n)}}(t)))}catch(t){}}(t),er(function(t,e=!1){const n=e?$a(t):void 0;return(e,r)=>{if(function(t){return"replay_event"===t.type}(e))return delete e.breadcrumbs,e;if(!Pa(e)&&!La(e))return e;if(function(t,e){return!(t.type||!t.exception||!t.exception.values||!t.exception.values.length)&&(!(!e.originalException||!e.originalException.__rrweb__)||t.exception.values.some(t=>!!(t.stacktrace&&t.stacktrace.frames&&t.stacktrace.frames.length)&&t.stacktrace.frames.some(t=>t.filename&&t.filename.includes("/rrweb/src/"))))}(e,r)&&!t.getOptions()._experiments.captureExceptions)return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.log("[Replay] Ignoring error from rrweb internals",e),null;if((Pa(e)||La(e)&&"session"===t.recordingMode)&&(e.tags={...e.tags,replayId:t.getSessionId()}),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&t.getOptions()._experiments.traceInternals&&Pa(e)){const t=function(t){return{type:"Unknown",value:"n/a",...t.exception&&t.exception.values&&t.exception.values[0]}}(e);!function(t){const{category:e,level:n,message:r,...i}=t;var s;s={category:e||"console",level:n||"debug",message:`[debug]: ${r}`,...i},or().addBreadcrumb(s)}({message:`Tagging event (${e.event_id}) - ${e.message} - ${t.type}: ${t.value}`})}return n&&n(e,{statusCode:200}),e}}(t,!vo(n))),vo(n)&&(n.on("afterSendEvent",$a(t)),n.on("createDsc",e=>{const n=t.getSessionId();n&&(e.replay_id=n)}))}(this),this._hasInitializedCoreListeners=!0)}catch(t){this._handleException(t)}"PerformanceObserver"in qi&&(this._performanceObserver=function(t){const e=new PerformanceObserver(e=>{const n=function(t,e){const[n,r,i]=t.reduce((t,e)=>("navigation"===e.entryType?t[0].push(e):"largest-contentful-paint"===e.entryType?t[1].push(e):t[2].push(e),t),[[],[],[]]),s=[],a=[];let o=r.length?r[r.length-1]:void 0;return e.forEach(t=>{if("largest-contentful-paint"!==t.entryType)if("navigation"!==t.entryType)s.push(t);else{const e=t;t.duration>0&&!n.find(Ca(e))&&!a.find(Ca(e))&&a.push(e)}else(!o||o.startTime<t.startTime)&&(o=t)}),[...o?[o]:[],...n,...i,...s,...a].sort((t,e)=>t.startTime-e.startTime)}(t.performanceEvents,e.getEntries());t.performanceEvents=n});return["element","event","first-input","largest-contentful-paint","layout-shift","longtask","navigation","paint","resource"].forEach(t=>{try{e.observe({type:t,buffered:!0})}catch(t){}}),e}(this))}_removeListeners(){try{qi.document.removeEventListener("visibilitychange",this._handleVisibilityChange),qi.removeEventListener("blur",this._handleWindowBlur),qi.removeEventListener("focus",this._handleWindowFocus),this._performanceObserver&&(this._performanceObserver.disconnect(),this._performanceObserver=null)}catch(t){this._handleException(t)}}__init13(){this._handleVisibilityChange=()=>{"visible"===qi.document.visibilityState?this._doChangeToForegroundTasks():this._doChangeToBackgroundTasks()}}__init14(){this._handleWindowBlur=()=>{const t=Ga({category:"ui.blur"});this._doChangeToBackgroundTasks(t)}}__init15(){this._handleWindowFocus=()=>{const t=Ga({category:"ui.focus"});this._doChangeToForegroundTasks(t)}}_doChangeToBackgroundTasks(t){if(!this.session)return;const e=Aa(this.session,this.timeouts);t&&!e&&this._createCustomBreadcrumb(t),this._conditionalFlush()}_doChangeToForegroundTasks(t){this.session&&(this.checkAndHandleExpiredSession()?t&&this._createCustomBreadcrumb(t):("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.log("[Replay] Document has become active, but session has expired"))}_triggerFullSnapshot(t=!0){try{("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.log("[Replay] Taking full rrweb snapshot"),ka.takeFullSnapshot(t)}catch(t){this._handleException(t)}}_updateUserActivity(t=Date.now()){this._lastActivity=t}_updateSessionActivity(t=Date.now()){this.session&&(this.session.lastActivity=t,this._maybeSaveSession())}_createCustomBreadcrumb(t){this.addUpdate(()=>{Ma(this,{type:Ss.Custom,timestamp:t.timestamp||0,data:{tag:"breadcrumb",payload:t}})})}_addPerformanceEntries(){const t=[...this.performanceEvents];return this.performanceEvents=[],Promise.all(qa(this,function(t){return t.map(So).filter(Boolean)}(t)))}_conditionalFlush(){"error"!==this.recordingMode&&this.flushImmediate()}_clearContext(){this._context.errorIds.clear(),this._context.traceIds.clear(),this._context.urls=[],this._context.earliestEvent=null}_popEventContext(){this._context.earliestEvent&&this._context.earliestEvent<this._context.initialTimestamp&&(this._context.initialTimestamp=this._context.earliestEvent);const t={initialTimestamp:this._context.initialTimestamp,initialUrl:this._context.initialUrl,errorIds:Array.from(this._context.errorIds).filter(Boolean),traceIds:Array.from(this._context.traceIds).filter(Boolean),urls:this._context.urls};return this._clearContext(),t}async _runFlush(){if(this.session&&this.eventBuffer){if(await this._addPerformanceEntries(),this.eventBuffer&&this.eventBuffer.hasEvents&&(await async function(t){try{return Promise.all(qa(t,[bo(qi.performance.memory)]))}catch(t){return[]}}(this),this.eventBuffer))try{const t=await this.eventBuffer.finish(),e=this.session.id,n=this._popEventContext(),r=this.session.segmentId++;this._maybeSaveSession(),await Co({replayId:e,recordingData:t,segmentId:r,eventContext:n,session:this.session,options:this.getOptions(),timestamp:Date.now()})}catch(t){this._handleException(t),this.stop("sendReplay");const e=or().getClient();e&&e.recordDroppedEvent("send_error","replay")}}else("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.error("[Replay] No session or eventBuffer found to flush.")}__init16(){this._flush=async()=>{if(this._isEnabled)if(this.checkAndHandleExpiredSession())if(this.session){if(this._debouncedFlush.cancel(),!this._flushLock)return this._flushLock=this._runFlush(),await this._flushLock,void(this._flushLock=null);try{await this._flushLock}catch(t){("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.error(t)}finally{this._debouncedFlush()}}else("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.error("[Replay] No session found to flush.");else("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.error("[Replay] Attempting to finish replay event after session expired.")}}_maybeSaveSession(){this.session&&this._options.stickySession&&Oa(this.session)}__init17(){this._onMutationHandler=t=>{const e=t.length,n=this._options._experiments.mutationLimit||0,r=n&&e>n;if(e>(this._options._experiments.mutationBreadcrumbLimit||1e3)||r){const t=Ga({category:"replay.mutations",data:{count:e}});this._createCustomBreadcrumb(t)}return!r||(this._triggerFullSnapshot(!1),!1)}}}function Ro(t,e,n,r){const i=[...t,..."string"==typeof r?r.split(","):[],...e];return void 0!==n&&("string"==typeof n&&i.push(`.${n}`),console.warn("[Replay] You are using a deprecated configuration item for privacy. Read the documentation on how to use the new privacy configuration.")),i.join(",")}function Do({mask:t,unmask:e,block:n,unblock:r,ignore:i,blockClass:s,blockSelector:a,maskTextClass:o,maskTextSelector:c,ignoreClass:l}){const u=Ro(t,[".sentry-mask","[data-sentry-mask]"],o,c),d=Ro(e,[".sentry-unmask","[data-sentry-unmask]"]),p={maskTextSelector:u,unmaskTextSelector:d,maskInputSelector:u,unmaskInputSelector:d,blockSelector:Ro(n,[".sentry-block","[data-sentry-block]",'base[href="/"]'],s,a),unblockSelector:Ro(r,[".sentry-unblock","[data-sentry-unblock]"]),ignoreSelector:Ro(i,[".sentry-ignore","[data-sentry-ignore]",'input[type="file"]'],l)};return s instanceof RegExp&&(p.blockClass=s),o instanceof RegExp&&(p.maskTextClass=o),p}function No(){return"undefined"!=typeof window&&(!_n()||"undefined"!=typeof process&&"renderer"===process.type)}const Io='img,image,svg,video,object,picture,embed,map,audio,link[rel="icon"],link[rel="apple-touch-icon"]';let Ao=!1;class Oo{static __initStatic(){this.id="Replay"}__init(){this.name=Oo.id}constructor({flushMinDelay:t=5e3,flushMaxDelay:e=5500,stickySession:n=!0,useCompression:r=!0,_experiments:i={},sessionSampleRate:s,errorSampleRate:a,maskAllText:o=!0,maskAllInputs:c=!0,blockAllMedia:l=!0,mask:u=[],unmask:d=[],block:p=[],unblock:h=[],ignore:f=[],maskFn:_,blockClass:m,blockSelector:g,maskInputOptions:y,maskTextClass:v,maskTextSelector:b,ignoreClass:E}={}){if(Oo.prototype.__init.call(this),this._recordingOptions={maskAllInputs:c,maskAllText:o,maskInputOptions:{...y||{},password:!0},maskTextFn:_,maskInputFn:_,...Do({mask:u,unmask:d,block:p,unblock:h,ignore:f,blockClass:m,blockSelector:g,maskTextClass:v,maskTextSelector:b,ignoreClass:E}),slimDOMOptions:"all",inlineStylesheet:!0,inlineImages:!1,collectFonts:!0},this._initialOptions={flushMinDelay:t,flushMaxDelay:e,stickySession:n,sessionSampleRate:s,errorSampleRate:a,useCompression:r,blockAllMedia:l,_experiments:i},"number"==typeof s&&(console.warn(`[Replay] You are passing \`sessionSampleRate\` to the Replay integration.\nThis option is deprecated and will be removed soon.\nInstead, configure \`replaysSessionSampleRate\` directly in the SDK init options, e.g.:\nSentry.init({ replaysSessionSampleRate: ${s} })`),this._initialOptions.sessionSampleRate=s),"number"==typeof a&&(console.warn(`[Replay] You are passing \`errorSampleRate\` to the Replay integration.\nThis option is deprecated and will be removed soon.\nInstead, configure \`replaysOnErrorSampleRate\` directly in the SDK init options, e.g.:\nSentry.init({ replaysOnErrorSampleRate: ${a} })`),this._initialOptions.errorSampleRate=a),this._initialOptions.blockAllMedia&&(this._recordingOptions.blockSelector=this._recordingOptions.blockSelector?`${this._recordingOptions.blockSelector},${Io}`:Io),this._isInitialized&&No())throw new Error("Multiple Sentry Session Replay instances are not supported");this._isInitialized=!0}get _isInitialized(){return Ao}set _isInitialized(t){Ao=t}setupOnce(){No()&&(this._setup(),setTimeout(()=>this.start()))}start(){this._replay&&this._replay.start()}stop(){this._replay&&this._replay.stop()}flush(){if(this._replay&&this._replay.isEnabled())return this._replay.flushImmediate()}getReplayId(){if(this._replay&&this._replay.isEnabled())return this._replay.getSessionId()}_setup(){const t=function(t){const e=or().getClient(),n=e&&e.getOptions(),r={sessionSampleRate:0,errorSampleRate:0,...He(t)};return n?(null==t.sessionSampleRate&&null==t.errorSampleRate&&null==n.replaysSessionSampleRate&&null==n.replaysOnErrorSampleRate&&console.warn("Replay is disabled because neither `replaysSessionSampleRate` nor `replaysOnErrorSampleRate` are set."),"number"==typeof n.replaysSessionSampleRate&&(r.sessionSampleRate=n.replaysSessionSampleRate),"number"==typeof n.replaysOnErrorSampleRate&&(r.errorSampleRate=n.replaysOnErrorSampleRate),r):(console.warn("SDK client is not available."),r)}(this._initialOptions);this._replay=new xo({options:t,recordingOptions:this._recordingOptions})}}function Uo(t){let e,n=t[0],r=1;for(;r<t.length;){const i=t[r],s=t[r+1];if(r+=2,("optionalAccess"===i||"optionalCall"===i)&&null==n)return;"access"===i||"optionalAccess"===i?(e=n,n=s(n)):"call"!==i&&"optionalCall"!==i||(n=s((...t)=>n.call(e,...t)),e=void 0)}return n}function Bo(t){const e=Uo([t,"call",t=>t(),"access",t=>t.getClient,"call",t=>t(),"optionalAccess",t=>t.getOptions,"call",t=>t()]);return"sentry"!==(Uo([e,"optionalAccess",t=>t.instrumenter])||"sentry")}Oo.__initStatic();class Ho{static __initStatic(){this.id="Express"}__init(){this.name=Ho.id}constructor(t={}){Ho.prototype.__init.call(this),this._router=t.router||t.app,this._methods=(Array.isArray(t.methods)?t.methods:[]).concat("use")}setupOnce(t,e){this._router?Bo(e)?("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.log("Express Integration is skipped because of instrumenter configuration."):(function(t,e=[]){e.forEach(e=>function(t,e){const n=t[e];return t[e]=function(...t){return n.call(this,...function(t,e){return t.map(t=>"function"==typeof t?Mo(t,e):Array.isArray(t)?t.map(t=>"function"==typeof t?Mo(t,e):t):t)}(t,e))},t}(t,e))}(this._router,this._methods),function(t){const e="settings"in t;e&&void 0===t._router&&t.lazyrouter&&t.lazyrouter();const n=e?t._router:t;if(!n)return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.debug("Cannot instrument router for URL Parameterization (did not find a valid router)."),void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.debug("Routing instrumentation is currently only supported in Express 4."));const r=Object.getPrototypeOf(n),i=r.process_params;r.process_params=function(t,e,n,r,s){n._reconstructedRoute||(n._reconstructedRoute="");const{layerRoutePath:a,isRegex:o,isArray:c,numExtraSegments:l}=function(t){const e=Uo([t,"access",t=>t.route,"optionalAccess",t=>t.path]),n=ie(e),r=Array.isArray(e);if(!e)return{isRegex:n,isArray:r,numExtraSegments:0};const i=r?Math.max(e.reduce((t,e)=>t+Cn(e.toString()),0)-Cn(t.path||""),0):0,s=function(t,e){return t?e.map(t=>t.toString()).join(","):e&&e.toString()}(r,e);return{layerRoutePath:s,isRegex:n,isArray:r,numExtraSegments:i}}(t);(a||o||c)&&(n._hasParameters=!0);const u=(a||t.path||"").split("/").filter(t=>t.length>0&&(o||c||!t.includes("*"))).join("/");if(u&&u.length>0&&(n._reconstructedRoute+=`/${u}${o?"/":""}`),Cn(n.originalUrl||"")+l===Cn(n._reconstructedRoute)){n._hasParameters||n._reconstructedRoute!==n.originalUrl&&(n._reconstructedRoute=n.originalUrl);const t=r.__sentry_transaction;t&&"custom"!==t.metadata.source&&t.setName(...function(t,e={}){const n=t.method&&t.method.toUpperCase();let r="",i="url";e.customRoute||t.route?(r=e.customRoute||`${t.baseUrl||""}${t.route&&t.route.path}`,i="route"):(t.originalUrl||t.url)&&(r=(t.originalUrl||t.url||"").split(/[\?#]/,1)[0]);let s="";return e.method&&n&&(s+=n),e.method&&e.path&&(s+=" "),e.path&&r&&(s+=r),[s,i]}(n,{path:!0,method:!0,customRoute:n._reconstructedRoute||"/"}))}return i.call(this,t,e,n,r,s)}}(this._router)):("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.error("ExpressIntegration is missing an Express instance")}}function Mo(t,e){const n=t.length;switch(n){case 2:return function(n,r){const i=r.__sentry_transaction;if(i){const n=i.startChild({description:t.name,op:`middleware.express.${e}`});r.once("finish",()=>{n.finish()})}return t.call(this,n,r)};case 3:return function(n,r,i){const s=Uo([r.__sentry_transaction,"optionalAccess",t=>t.startChild,"call",n=>n({description:t.name,op:`middleware.express.${e}`})]);t.call(this,n,r,function(...t){Uo([s,"optionalAccess",t=>t.finish,"call",t=>t()]),i.call(this,...t)})};case 4:return function(n,r,i,s){const a=Uo([i.__sentry_transaction,"optionalAccess",t=>t.startChild,"call",n=>n({description:t.name,op:`middleware.express.${e}`})]);t.call(this,n,r,i,function(...t){Uo([a,"optionalAccess",t=>t.finish,"call",t=>t()]),s.call(this,...t)})};default:throw new Error(`Express middleware takes 2-4 arguments. Got: ${n}`)}}Ho.__initStatic();class Po{static __initStatic(){this.id="Postgres"}__init(){this.name=Po.id}constructor(t={}){Po.prototype.__init.call(this),this._usePgNative=!!t.usePgNative}loadDependency(){return this._module=this._module||gn("pg")}setupOnce(t,e){if(Bo(e))return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.log("Postgres Integration is skipped because of instrumenter configuration."));const n=this.loadDependency();if(!n)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.error("Postgres Integration was unable to require `pg` package."));if(this._usePgNative&&!Uo([n,"access",t=>t.native,"optionalAccess",t=>t.Client]))return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.error("Postgres Integration was unable to access 'pg-native' bindings."));const{Client:r}=this._usePgNative?n.native:n;Re(r.prototype,"query",function(t){return function(n,r,i){const s=Uo([e().getScope(),"optionalAccess",t=>t.getSpan,"call",t=>t()]),a=Uo([s,"optionalAccess",t=>t.startChild,"call",t=>t({description:"string"==typeof n?n:n.text,op:"db"})]);if("function"==typeof i)return t.call(this,n,r,function(t,e){Uo([a,"optionalAccess",t=>t.finish,"call",t=>t()]),i(t,e)});if("function"==typeof r)return t.call(this,n,function(t,e){Uo([a,"optionalAccess",t=>t.finish,"call",t=>t()]),r(t,e)});const o=void 0!==r?t.call(this,n,r):t.call(this,n);return se(o)?o.then(t=>(Uo([a,"optionalAccess",t=>t.finish,"call",t=>t()]),t)):(Uo([a,"optionalAccess",t=>t.finish,"call",t=>t()]),o)}})}}Po.__initStatic();class Lo{constructor(){Lo.prototype.__init.call(this)}static __initStatic(){this.id="Mysql"}__init(){this.name=Lo.id}loadDependency(){return this._module=this._module||gn("mysql/lib/Connection.js")}setupOnce(t,e){if(Bo(e))return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.log("Mysql Integration is skipped because of instrumenter configuration."));const n=this.loadDependency();n?Re(n,"createQuery",function(t){return function(n,r,i){const s=Uo([e().getScope(),"optionalAccess",t=>t.getSpan,"call",t=>t()]),a=Uo([s,"optionalAccess",t=>t.startChild,"call",t=>t({description:"string"==typeof n?n:n.sql,op:"db"})]);return"function"==typeof i?t.call(this,n,r,function(t,e,n){Uo([a,"optionalAccess",t=>t.finish,"call",t=>t()]),i(t,e,n)}):"function"==typeof r?t.call(this,n,function(t,e,n){Uo([a,"optionalAccess",t=>t.finish,"call",t=>t()]),r(t,e,n)}):t.call(this,n,r,i)}}):("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.error("Mysql Integration was unable to require `mysql` package.")}}Lo.__initStatic();const $o=["aggregate","bulkWrite","countDocuments","createIndex","createIndexes","deleteMany","deleteOne","distinct","drop","dropIndex","dropIndexes","estimatedDocumentCount","find","findOne","findOneAndDelete","findOneAndReplace","findOneAndUpdate","indexes","indexExists","indexInformation","initializeOrderedBulkOp","insertMany","insertOne","isCapped","mapReduce","options","parallelCollectionScan","rename","replaceOne","stats","updateMany","updateOne"],zo={bulkWrite:["operations"],countDocuments:["query"],createIndex:["fieldOrSpec"],createIndexes:["indexSpecs"],deleteMany:["filter"],deleteOne:["filter"],distinct:["key","query"],dropIndex:["indexName"],find:["query"],findOne:["query"],findOneAndDelete:["filter"],findOneAndReplace:["filter","replacement"],findOneAndUpdate:["filter","update"],indexExists:["indexes"],insertMany:["docs"],insertOne:["doc"],mapReduce:["map","reduce"],rename:["newName"],replaceOne:["filter","doc"],updateMany:["filter","update"],updateOne:["filter","update"]};class Go{static __initStatic(){this.id="Mongo"}__init(){this.name=Go.id}constructor(t={}){Go.prototype.__init.call(this),this._operations=Array.isArray(t.operations)?t.operations:$o,this._describeOperations=!("describeOperations"in t)||t.describeOperations,this._useMongoose=!!t.useMongoose}loadDependency(){return this._module=this._module||gn(this._useMongoose?"mongoose":"mongodb")}setupOnce(t,e){if(Bo(e))return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.log("Mongo Integration is skipped because of instrumenter configuration."));const n=this.loadDependency();n?this._instrumentOperations(n.Collection,this._operations,e):("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.error(`Mongo Integration was unable to require \`${this._useMongoose?"mongoose":"mongodb"}\` package.`)}_instrumentOperations(t,e,n){e.forEach(e=>this._patchOperation(t,e,n))}_patchOperation(t,e,n){if(!(e in t.prototype))return;const r=this._getSpanContextFromOperationArguments.bind(this);Re(t.prototype,e,function(t){return function(...i){const s=i[i.length-1],a=Uo([n().getScope(),"optionalAccess",t=>t.getSpan,"call",t=>t()]);if("function"!=typeof s||"mapReduce"===e&&2===i.length){const n=Uo([a,"optionalAccess",t=>t.startChild,"call",t=>t(r(this,e,i))]),s=t.call(this,...i);if(se(s))return s.then(t=>(Uo([n,"optionalAccess",t=>t.finish,"call",t=>t()]),t));if((o=s)&&"object"==typeof o&&o.once&&"function"==typeof o.once){const t=s;try{t.once("close",()=>{Uo([n,"optionalAccess",t=>t.finish,"call",t=>t()])})}catch(t){Uo([n,"optionalAccess",t=>t.finish,"call",t=>t()])}return t}return Uo([n,"optionalAccess",t=>t.finish,"call",t=>t()]),s}var o;const c=Uo([a,"optionalAccess",t=>t.startChild,"call",t=>t(r(this,e,i.slice(0,-1)))]);return t.call(this,...i.slice(0,-1),function(t,e){Uo([c,"optionalAccess",t=>t.finish,"call",t=>t()]),s(t,e)})}})}_getSpanContextFromOperationArguments(t,e,n){const r={collectionName:t.collectionName,dbName:t.dbName,namespace:t.namespace},i={op:"db",description:e,data:r},s=zo[e],a=Array.isArray(this._describeOperations)?this._describeOperations.includes(e):this._describeOperations;if(!s||!a)return i;try{if("mapReduce"===e){const[t,e]=n;r[s[0]]="string"==typeof t?t:t.name||"<anonymous>",r[s[1]]="string"==typeof e?e:e.name||"<anonymous>"}else for(let t=0;t<s.length;t++)r[s[t]]=JSON.stringify(n[t])}catch(t){}return i}}Go.__initStatic();class Yo{static __initStatic(){this.id="Prisma"}__init(){this.name=Yo.id}constructor(t={}){var e;Yo.prototype.__init.call(this),(e=t.client)&&e.$use?this._client=t.client:("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.warn(`Unsupported Prisma client provided to PrismaIntegration. Provided client: ${JSON.stringify(t.client)}`)}setupOnce(t,e){this._client?Bo(e)?("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.log("Prisma Integration is skipped because of instrumenter configuration."):this._client.$use((t,e)=>{const n=t.action,r=t.model;return function(t,e,n=(()=>{})){const r={...t};void 0!==r.name&&void 0===r.description&&(r.description=r.name);const i=or(),s=i.getScope(),a=s.getSpan(),o=a?a.startChild(r):i.startTransaction(r);function c(){o&&o.finish(),i.getScope().setSpan(a)}let l;s.setSpan(o);try{l=e(o)}catch(t){throw o&&o.setStatus("internal_error"),n(t),c(),t}return se(l)?Promise.resolve(l).then(()=>{c()},t=>{o&&o.setStatus("internal_error"),n(t),c()}):c(),l}({name:r?`${r} ${n}`:n,op:"db.sql.prisma"},()=>e(t))}):("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.error("PrismaIntegration is missing a Prisma Client Instance")}}Yo.__initStatic();class Fo{constructor(){Fo.prototype.__init.call(this)}static __initStatic(){this.id="GraphQL"}__init(){this.name=Fo.id}loadDependency(){return this._module=this._module||gn("graphql/execution/execute.js")}setupOnce(t,e){if(Bo(e))return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.log("GraphQL Integration is skipped because of instrumenter configuration."));const n=this.loadDependency();n?Re(n,"execute",function(t){return function(...n){const r=e().getScope(),i=Uo([r,"optionalAccess",t=>t.getSpan,"call",t=>t()]),s=Uo([i,"optionalAccess",t=>t.startChild,"call",t=>t({description:"execute",op:"graphql.execute"})]);Uo([r,"optionalAccess",t=>t.setSpan,"call",t=>t(s)]);const a=t.call(this,...n);return se(a)?a.then(t=>(Uo([s,"optionalAccess",t=>t.finish,"call",t=>t()]),Uo([r,"optionalAccess",t=>t.setSpan,"call",t=>t(i)]),t)):(Uo([s,"optionalAccess",t=>t.finish,"call",t=>t()]),Uo([r,"optionalAccess",t=>t.setSpan,"call",t=>t(i)]),a)}}):("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.error("GraphQL Integration was unable to require graphql/execution package.")}}Fo.__initStatic();class jo{static __initStatic(){this.id="Apollo"}__init(){this.name=jo.id}constructor(t={useNestjs:!1}){jo.prototype.__init.call(this),this._useNest=!!t.useNestjs}loadDependency(){return this._module=this._useNest?this._module||gn("@nestjs/graphql"):this._module||gn("apollo-server-core"),this._module}setupOnce(t,e){if(Bo(e))("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.log("Apollo Integration is skipped because of instrumenter configuration.");else if(this._useNest){const t=this.loadDependency();if(!t)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.error("Apollo-NestJS Integration was unable to require @nestjs/graphql package."));Re(t.GraphQLFactory.prototype,"mergeWithSchema",function(t){return function(...n){return Re(this.resolversExplorerService,"explore",function(t){return function(){return qo(fn(t.call(this)),e)}}),t.call(this,...n)}})}else{const t=this.loadDependency();if(!t)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.error("Apollo Integration was unable to require apollo-server-core package."));Re(t.ApolloServerBase.prototype,"constructSchema",function(t){return function(){if(!this.config.resolvers)return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&(this.config.schema?(ke.warn("Apollo integration is not able to trace `ApolloServer` instances constructed via `schema` property.If you are using NestJS with Apollo, please use `Sentry.Integrations.Apollo({ useNestjs: true })` instead."),ke.warn()):this.config.modules&&ke.warn("Apollo integration is not able to trace `ApolloServer` instances constructed via `modules` property."),ke.error("Skipping tracing as no resolvers found on the `ApolloServer` instance.")),t.call(this);const n=fn(this.config.resolvers);return this.config.resolvers=qo(n,e),t.call(this)}})}}}function qo(t,e){return t.map(t=>(Object.keys(t).forEach(n=>{Object.keys(t[n]).forEach(r=>{"function"==typeof t[n][r]&&function(t,e,n,r){Re(t[e],n,function(t){return function(...i){const s=Uo([r().getScope(),"optionalAccess",t=>t.getSpan,"call",t=>t()]),a=Uo([s,"optionalAccess",t=>t.startChild,"call",t=>t({description:`${e}.${n}`,op:"graphql.resolve"})]),o=t.call(this,...i);return se(o)?o.then(t=>(Uo([a,"optionalAccess",t=>t.finish,"call",t=>t()]),t)):(Uo([a,"optionalAccess",t=>t.finish,"call",t=>t()]),o)}})}(t,n,r,e)})}),t))}jo.__initStatic();const Vo=le,Zo=(t,e,n)=>{let r,i;return s=>{e.value>=0&&(s||n)&&(i=e.value-(r||0),(i||void 0===r)&&(r=e.value,e.delta=i,t(e)))}},Wo=()=>Vo.__WEB_VITALS_POLYFILL__?Vo.performance&&(performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]||(()=>{const t=Vo.performance.timing,e=Vo.performance.navigation.type,n={entryType:"navigation",startTime:0,type:2==e?"back_forward":1===e?"reload":"navigate"};for(const e in t)"navigationStart"!==e&&"toJSON"!==e&&(n[e]=Math.max(t[e]-t.navigationStart,0));return n})()):Vo.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0],Xo=()=>{const t=Wo();return t&&t.activationStart||0},Ko=(t,e)=>{const n=Wo();let r="navigate";return n&&(r=Vo.document.prerendering||Xo()>0?"prerender":n.type.replace(/_/g,"-")),{name:t,value:void 0===e?-1:e,rating:"good",delta:0,entries:[],id:`v3-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:r}},Jo=(t,e,n)=>{try{if(PerformanceObserver.supportedEntryTypes.includes(t)){const r=new PerformanceObserver(t=>{e(t.getEntries())});return r.observe(Object.assign({type:t,buffered:!0},n||{})),r}}catch(t){}},Qo=(t,e)=>{const n=r=>{"pagehide"!==r.type&&"hidden"!==Vo.document.visibilityState||(t(r),e&&(removeEventListener("visibilitychange",n,!0),removeEventListener("pagehide",n,!0)))};addEventListener("visibilitychange",n,!0),addEventListener("pagehide",n,!0)};let tc=-1;const ec=()=>(tc<0&&(tc="hidden"!==Vo.document.visibilityState||Vo.document.prerendering?Infinity:0,Qo(({timeStamp:t})=>{tc=t},!0)),{get firstHiddenTime(){return tc}}),nc={};function rc(t){return"number"==typeof t&&isFinite(t)}function ic(t,{startTimestamp:e,...n}){return e&&t.startTimestamp>e&&(t.startTimestamp=e),t.startChild({startTimestamp:e,...n})}function sc(t){return t/1e3}function ac(){return Vo&&Vo.addEventListener&&Vo.performance}let oc,cc,lc=0,uc={};function dc(t,e,n,r,i,s){const a=s?e[s]:e[`${n}End`],o=e[`${n}Start`];o&&a&&ic(t,{op:"browser",description:i||n,startTimestamp:r+sc(o),endTimestamp:r+sc(a)})}const pc=["localhost",/^\//],hc={traceFetch:!0,traceXHR:!0,tracingOrigins:pc,tracePropagationTargets:pc},fc={...gr,markBackgroundTransactions:!0,routingInstrumentation:function(t,e=!0,n=!0){if(!Vo||!Vo.location)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.warn("Could not initialize routing instrumentation due to invalid location"));let r,i=Vo.location.href;e&&(r=t({name:Vo.location.pathname,startTimestamp:Un?Un/1e3:void 0,op:"pageload",metadata:{source:"url"}})),n&&Xe("history",({to:e,from:n})=>{void 0===n&&i&&-1!==i.indexOf(e)?i=void 0:n!==e&&(i=void 0,r&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.log(`[Tracing] Finishing current transaction with op: ${r.op}`),r.finish()),r=t({name:Vo.location.pathname,op:"navigation",metadata:{source:"url"}}))})},startTransactionOnLocationChange:!0,startTransactionOnPageLoad:!0,enableLongTask:!0,_experiments:{},...hc};class _c{__init(){this.name="BrowserTracing"}constructor(t){_c.prototype.__init.call(this),Tr(),this.options={...fc,...t},void 0!==this.options._experiments.enableLongTask&&(this.options.enableLongTask=this.options._experiments.enableLongTask),t&&!t.tracePropagationTargets&&t.tracingOrigins&&(this.options.tracePropagationTargets=t.tracingOrigins),this._collectWebVitals=function(){const t=ac();if(t&&Un){t.mark&&Vo.performance.mark("sentry-tracing-init"),(t=>{const e=ec(),n=Ko("FID");let r;const i=t=>{t.startTime<e.firstHiddenTime&&(n.value=t.processingStart-t.startTime,n.entries.push(t),r(!0))},s=t=>{t.forEach(i)},a=Jo("first-input",s);r=Zo(t=>{const e=t.entries.pop();if(!e)return;const n=sc(Un),r=sc(e.startTime);("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.log("[Measurements] Adding FID"),uc.fid={value:t.value,unit:"millisecond"},uc["mark.fid"]={value:n+r,unit:"second"}},n),a&&Qo(()=>{s(a.takeRecords()),a.disconnect()},!0)})();const e=(t=>{const e=Ko("CLS",0);let n,r=0,i=[];const s=t=>{t.forEach(t=>{t.hadRecentInput||(r&&0!==i.length&&t.startTime-i[i.length-1].startTime<1e3&&t.startTime-i[0].startTime<5e3?(r+=t.value,i.push(t)):(r=t.value,i=[t]),r>e.value&&(e.value=r,e.entries=i,n&&n()))})},a=Jo("layout-shift",s);if(a){n=Zo(t=>{const e=t.entries.pop();e&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.log("[Measurements] Adding CLS"),uc.cls={value:t.value,unit:""},cc=e)},e);const t=()=>{s(a.takeRecords()),n(!0)};return Qo(t),t}})(),n=(t=>{const e=ec(),n=Ko("LCP");let r;const i=t=>{const i=t[t.length-1];if(i){const t=Math.max(i.startTime-Xo(),0);t<e.firstHiddenTime&&(n.value=t,n.entries=[i],r())}},s=Jo("largest-contentful-paint",i);if(s){r=Zo(t=>{const e=t.entries.pop();e&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.log("[Measurements] Adding LCP"),uc.lcp={value:t.value,unit:"millisecond"},oc=e)},n);const t=()=>{nc[n.id]||(i(s.takeRecords()),s.disconnect(),nc[n.id]=!0,r(!0))};return["keydown","click"].forEach(e=>{addEventListener(e,t,{once:!0,capture:!0})}),Qo(t,!0),t}})();return()=>{e&&e(),n&&n()}}return()=>{}}(),this.options.enableLongTask&&Jo("longtask",t=>{for(const e of t){const t=dr();if(!t)return;const n=sc(Un+e.startTime),r=sc(e.duration);t.startChild({description:"Main UI thread blocked",op:"ui.long-task",startTimestamp:n,endTimestamp:n+r})}}),this.options._experiments.enableInteractions&&Jo("event",t=>{for(const e of t){const t=dr();if(!t)return;if("click"===e.name){const n=sc(Un+e.startTime),r=sc(e.duration);t.startChild({description:fe(e.target),op:`ui.interaction.${e.name}`,startTimestamp:n,endTimestamp:n+r})}}},{durationThreshold:0})}setupOnce(t,e){this._getCurrentHub=e;const{routingInstrumentation:n,startTransactionOnLocationChange:r,startTransactionOnPageLoad:i,markBackgroundTransactions:s,traceFetch:a,traceXHR:o,tracePropagationTargets:c,shouldCreateSpanForRequest:l,_experiments:u}=this.options;n(t=>{const n=this._createRouteTransaction(t);return this.options._experiments.onStartRouteTransaction&&this.options._experiments.onStartRouteTransaction(n,t,e),n},i,r),s&&(Vo&&Vo.document?Vo.document.addEventListener("visibilitychange",()=>{const t=dr();if(Vo.document.hidden&&t){const e="cancelled";("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.log(`[Tracing] Transaction: ${e} -> since tab moved to the background, op: ${t.op}`),t.status||t.setStatus(e),t.setTag("visibilitychange","document.hidden"),t.finish()}}):("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.warn("[Tracing] Could not set up background tab detection due to lack of global document")),u.enableInteractions&&this._registerInteractionListener(),function(t){const{traceFetch:e,traceXHR:n,tracePropagationTargets:r,tracingOrigins:i,shouldCreateSpanForRequest:s}={traceFetch:hc.traceFetch,traceXHR:hc.traceXHR,...t},a="function"==typeof s?s:t=>!0,o=t=>function(t,e){return xe(t,e||pc)}(t,r||i),c={};e&&Xe("fetch",t=>{!function(t,e,n,r){if(!ur()||!t.fetchData||!e(t.fetchData.url))return;if(t.endTimestamp){const e=t.fetchData.__span;if(!e)return;const n=r[e];return void(n&&(t.response?n.setHttpStatus(t.response.status):t.error&&n.setStatus("internal_error"),n.finish(),delete r[e]))}const i=or().getScope(),s=i&&i.getSpan(),a=s&&s.transaction;if(s&&a){const e=s.startChild({data:{...t.fetchData,type:"fetch"},description:`${t.fetchData.method} ${t.fetchData.url}`,op:"http.client"});t.fetchData.__span=e.spanId,r[e.spanId]=e;const i=t.args[0];t.args[1]=t.args[1]||{};const o=t.args[1];n(t.fetchData.url)&&(o.headers=function(t,e,n,r){const i=Wn(e),s=n.toTraceparent(),a="undefined"!=typeof Request&&oe(t,Request)?t.headers:r.headers;if(a){if("undefined"!=typeof Headers&&oe(a,Headers)){const t=new Headers(a);return t.append("sentry-trace",s),i&&t.append(Vn,i),t}if(Array.isArray(a)){const t=[...a,["sentry-trace",s]];return i&&t.push([Vn,i]),t}{const t="baggage"in a?a.baggage:void 0,e=[];return Array.isArray(t)?e.push(...t):t&&e.push(t),i&&e.push(i),{...a,"sentry-trace":s,baggage:e.length>0?e.join(","):void 0}}}return{"sentry-trace":s,baggage:i}}(i,a.getDynamicSamplingContext(),e,o))}}(t,a,o,c)}),n&&Xe("xhr",t=>{!function(t,e,n,r){const i=t.xhr,s=i&&i[Ve];if(!ur()||i&&i.__sentry_own_request__||!(i&&s&&e(s.url)))return;if(t.endTimestamp){const t=i.__sentry_xhr_span_id__;if(!t)return;const e=r[t];return void(e&&(e.setHttpStatus(s.status_code),e.finish(),delete r[t]))}const a=or().getScope(),o=a&&a.getSpan(),c=o&&o.transaction;if(o&&c){const e=o.startChild({data:{...s.data,type:"xhr",method:s.method,url:s.url},description:`${s.method} ${s.url}`,op:"http.client"});if(i.__sentry_xhr_span_id__=e.spanId,r[i.__sentry_xhr_span_id__]=e,i.setRequestHeader&&n(s.url))try{i.setRequestHeader("sentry-trace",e.toTraceparent());const t=Wn(c.getDynamicSamplingContext());t&&i.setRequestHeader(Vn,t)}catch(t){}}}(t,a,o,c)})}({traceFetch:a,traceXHR:o,tracePropagationTargets:c,shouldCreateSpanForRequest:l})}_createRouteTransaction(t){if(!this._getCurrentHub)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.warn(`[Tracing] Did not create ${t.op} transaction because _getCurrentHub is invalid.`));const{beforeNavigate:e,idleTimeout:n,finalTimeout:r,heartbeatInterval:i}=this.options,s="pageload"===t.op,a=s?mc("sentry-trace"):null,o=s?mc("baggage"):null,c=a?function(t){const e=t.match(Bn);if(!t||!e)return;let n;return"1"===e[3]?n=!0:"0"===e[3]&&(n=!1),{traceId:e[1],parentSampled:n,parentSpanId:e[2]}}(a):void 0,l=o?function(t){if(!te(t)&&!Array.isArray(t))return;let e={};if(Array.isArray(t))e=t.reduce((t,e)=>({...t,...Xn(e)}),{});else{if(!t)return;e=Xn(t)}const n=Object.entries(e).reduce((t,[e,n])=>(e.match(Zn)&&(t[e.slice(7)]=n),t),{});return Object.keys(n).length>0?n:void 0}(o):void 0,u={...t,...c,metadata:{...t.metadata,dynamicSamplingContext:c&&!l?{}:l},trimEnd:!0},d="function"==typeof e?e(u):u,p=void 0===d?{...u,sampled:!1}:d;p.metadata=p.name!==u.name?{...p.metadata,source:"custom"}:p.metadata,this._latestRouteName=p.name,this._latestRouteSource=p.metadata&&p.metadata.source,!1===p.sampled&&("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.log(`[Tracing] Will not send ${p.op} transaction because of beforeNavigate.`),("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.log(`[Tracing] Starting ${p.op} transaction on scope`);const h=this._getCurrentHub(),{location:f}=Vo,_=kr(h,p,n,r,!0,{location:f},i);return _.registerBeforeFinishCallback(t=>{this._collectWebVitals(),function(t){const e=ac();if(!e||!Vo.performance.getEntries||!Un)return;("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.log("[Tracing] Adding & adjusting spans using Performance API");const n=sc(Un),r=e.getEntries();let i,s;if(r.slice(lc).forEach(e=>{const r=sc(e.startTime),a=sc(e.duration);if(!("navigation"===t.op&&n+r<t.startTimestamp))switch(e.entryType){case"navigation":!function(t,e,n){["unloadEvent","redirect","domContentLoadedEvent","loadEvent","connect"].forEach(r=>{dc(t,e,r,n)}),dc(t,e,"secureConnection",n,"TLS/SSL","connectEnd"),dc(t,e,"fetch",n,"cache","domainLookupStart"),dc(t,e,"domainLookup",n,"DNS"),function(t,e,n){ic(t,{op:"browser",description:"request",startTimestamp:n+sc(e.requestStart),endTimestamp:n+sc(e.responseEnd)}),ic(t,{op:"browser",description:"response",startTimestamp:n+sc(e.responseStart),endTimestamp:n+sc(e.responseEnd)})}(t,e,n)}(t,e,n),i=n+sc(e.responseStart),s=n+sc(e.requestStart);break;case"mark":case"paint":case"measure":{!function(t,e,n,r,i){const s=i+n;ic(t,{description:e.name,endTimestamp:s+r,op:e.entryType,startTimestamp:s})}(t,e,r,a,n);const i=ec(),s=e.startTime<i.firstHiddenTime;"first-paint"===e.name&&s&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.log("[Measurements] Adding FP"),uc.fp={value:e.startTime,unit:"millisecond"}),"first-contentful-paint"===e.name&&s&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.log("[Measurements] Adding FCP"),uc.fcp={value:e.startTime,unit:"millisecond"});break}case"resource":{const i=e.name.replace(Vo.location.origin,"");!function(t,e,n,r,i,s){if("xmlhttprequest"===e.initiatorType||"fetch"===e.initiatorType)return;const a={};"transferSize"in e&&(a["Transfer Size"]=e.transferSize),"encodedBodySize"in e&&(a["Encoded Body Size"]=e.encodedBodySize),"decodedBodySize"in e&&(a["Decoded Body Size"]=e.decodedBodySize),"renderBlockingStatus"in e&&(a["resource.render_blocking_status"]=e.renderBlockingStatus);const o=s+r;ic(t,{description:n,endTimestamp:o+i,op:e.initiatorType?`resource.${e.initiatorType}`:"resource.other",startTimestamp:o,data:a})}(t,e,i,r,a,n);break}}}),lc=Math.max(r.length-1,0),function(t){const e=Vo.navigator;if(!e)return;const n=e.connection;n&&(n.effectiveType&&t.setTag("effectiveConnectionType",n.effectiveType),n.type&&t.setTag("connectionType",n.type),rc(n.rtt)&&(uc["connection.rtt"]={value:n.rtt,unit:"millisecond"})),rc(e.deviceMemory)&&t.setTag("deviceMemory",`${e.deviceMemory} GB`),rc(e.hardwareConcurrency)&&t.setTag("hardwareConcurrency",String(e.hardwareConcurrency))}(t),"pageload"===t.op){"number"==typeof i&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.log("[Measurements] Adding TTFB"),uc.ttfb={value:1e3*(i-t.startTimestamp),unit:"millisecond"},"number"==typeof s&&s<=i&&(uc["ttfb.requestTime"]={value:1e3*(i-s),unit:"millisecond"})),["fcp","fp","lcp"].forEach(e=>{if(!uc[e]||n>=t.startTimestamp)return;const r=uc[e].value,i=n+sc(r),s=Math.abs(1e3*(i-t.startTimestamp));("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.log(`[Measurements] Normalized ${e} from ${r} to ${s} (${s-r})`),uc[e].value=s});const e=uc["mark.fid"];e&&uc.fid&&(ic(t,{description:"first input delay",endTimestamp:e.value+sc(uc.fid.value),op:"ui.action",startTimestamp:e.value}),delete uc["mark.fid"]),"fcp"in uc||delete uc.cls,Object.keys(uc).forEach(e=>{t.setMeasurement(e,uc[e].value,uc[e].unit)}),function(t){oc&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.log("[Measurements] Adding LCP Data"),oc.element&&t.setTag("lcp.element",fe(oc.element)),oc.id&&t.setTag("lcp.id",oc.id),oc.url&&t.setTag("lcp.url",oc.url.trim().slice(0,200)),t.setTag("lcp.size",oc.size)),cc&&cc.sources&&(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.log("[Measurements] Adding CLS Data"),cc.sources.forEach((e,n)=>t.setTag(`cls.source.${n+1}`,fe(e.node))))}(t)}oc=void 0,cc=void 0,uc={}}(t)}),_}_registerInteractionListener(){let t;const e=()=>{const{idleTimeout:e,finalTimeout:n,heartbeatInterval:r}=this.options,i="ui.action.click",s=dr();if(s&&s.op&&["navigation","pageload"].includes(s.op))return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.warn(`[Tracing] Did not create ${i} transaction because a pageload or navigation transaction is in progress.`));if(t&&(t.setFinishReason("interactionInterrupted"),t.finish(),t=void 0),!this._getCurrentHub)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.warn(`[Tracing] Did not create ${i} transaction because _getCurrentHub is invalid.`));if(!this._latestRouteName)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.warn(`[Tracing] Did not create ${i} transaction because _latestRouteName is missing.`));const a=this._getCurrentHub(),{location:o}=Vo;t=kr(a,{name:this._latestRouteName,op:i,trimEnd:!0,metadata:{source:this._latestRouteSource||"url"}},e,n,!0,{location:o},r)};["click"].forEach(t=>{addEventListener(t,e,{once:!1,capture:!0})})}}function mc(t){const e=pe.document&&pe.document.querySelector?pe.document.querySelector(`meta[name=${t}]`):null;return e?e.getAttribute("content"):null}var gc={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},yc={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},vc={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},bc={};function Ec(t){return Z.default.isMemo(t)?vc:bc[t.$$typeof]||gc}bc[Z.default.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},bc[Z.default.Memo]=vc;var Sc=Object.defineProperty,wc=Object.getOwnPropertyNames,kc=Object.getOwnPropertySymbols,Tc=Object.getOwnPropertyDescriptor,Cc=Object.getPrototypeOf,xc=Object.prototype,Rc=function t(e,n,r){if("string"!=typeof n){if(xc){var i=Cc(n);i&&i!==xc&&t(e,i,r)}var s=wc(n);kc&&(s=s.concat(kc(n)));for(var a=Ec(e),o=Ec(n),c=0;c<s.length;++c){var l=s[c];if(!(yc[l]||r&&r[l]||o&&o[l]||a&&a[l])){var u=Tc(n,l);try{Sc(e,l,u)}catch(t){}}}}return e};const Dc="/home/runner/work/sentry-javascript/sentry-javascript/packages/react/src/profiler.tsx";class Nc extends C.Component{__init(){this._mountSpan=void 0}__init2(){this._updateSpan=void 0}static __initStatic(){this.defaultProps={disabled:!1,includeRender:!0,includeUpdates:!0}}constructor(t){super(t),Nc.prototype.__init.call(this),Nc.prototype.__init2.call(this);const{name:e,disabled:n=!1}=this.props;if(n)return;const r=function(t=or()){if(t){const e=t.getScope();if(e)return e.getTransaction()}}();r&&(this._mountSpan=r.startChild({description:`<${e}>`,op:"ui.react.mount"}))}componentDidMount(){this._mountSpan&&this._mountSpan.finish()}shouldComponentUpdate({updateProps:t,includeUpdates:e=!0}){if(e&&this._mountSpan&&t!==this.props.updateProps){const e=Object.keys(t).filter(e=>t[e]!==this.props.updateProps[e]);if(e.length>0){const t=On();this._updateSpan=this._mountSpan.startChild({data:{changedProps:e},description:`<${this.props.name}>`,op:"ui.react.update",startTimestamp:t})}}return!0}componentDidUpdate(){this._updateSpan&&(this._updateSpan.finish(),this._updateSpan=void 0)}componentWillUnmount(){const{name:t,includeRender:e=!0}=this.props;this._mountSpan&&e&&this._mountSpan.startChild({description:`<${t}>`,endTimestamp:On(),op:"ui.react.render",startTimestamp:this._mountSpan.endTimestamp})}render(){return this.props.children}}Nc.__initStatic();const Ic={componentStack:null,error:null,eventId:null};class Ac extends C.Component{__init(){this.state=Ic}__init2(){this._openFallbackReportDialog=!0}constructor(t){super(t),Ac.prototype.__init.call(this),Ac.prototype.__init2.call(this),Ac.prototype.__init3.call(this);const e=or().getClient();e&&e.on&&t.showDialog&&(this._openFallbackReportDialog=!1,e.on("afterSendEvent",e=>{e.type||e.event_id!==this._lastEventId||Fi({...t.dialogOptions,eventId:this._lastEventId})}))}componentDidCatch(t,{componentStack:e}){const{beforeCapture:n,onError:r,showDialog:i,dialogOptions:s}=this.props;xr(a=>{if(function(t){const e=C.version.match(/^([^.]+)/);return null!==e&&parseInt(e[0])>=17}()&&Xt(t)){const n=new Error(t.message);n.name=`React ErrorBoundary ${n.name}`,n.stack=e,function(t,e){const n=new WeakMap;!function t(e,r){if(!n.has(e))return e.cause?(n.set(e,!0),t(e.cause,r)):void(e.cause=r)}(t,e)}(t,n)}n&&n(a,t,e);const o=Cr(t,{contexts:{react:{componentStack:e}}});r&&r(t,e,o),i&&(this._lastEventId=o,this._openFallbackReportDialog&&Fi({...s,eventId:o})),this.setState({error:t,componentStack:e,eventId:o})})}componentDidMount(){const{onMount:t}=this.props;t&&t()}componentWillUnmount(){const{error:t,componentStack:e,eventId:n}=this.state,{onUnmount:r}=this.props;r&&r(t,e,n)}__init3(){this.resetErrorBoundary=()=>{const{onReset:t}=this.props,{error:e,componentStack:n,eventId:r}=this.state;t&&t(e,n,r),this.setState(Ic)}}render(){const{fallback:t,children:e}=this.props,n=this.state;if(n.error){let e;return e="function"==typeof t?t({error:n.error,componentStack:n.componentStack,resetError:this.resetErrorBoundary,eventId:n.eventId}):t,C.isValidElement(e)?e:(t&&("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.warn("fallback did not produce a valid ReactElement"),null)}return"function"==typeof e?e():e}}let Oc,Uc,Bc,Hc,Mc,Pc,Lc,$c;const zc={"routing.instrumentation":"react-router-v6"};function Gc(t,e,n){if(!t||0===t.length)return[e.pathname,"url"];let r="";if(n)for(let t=0;t<n.length;t++){const i=n[t],s=i.route;if(s){if(s.index)return[i.pathname,"route"];const t=s.path;if(t){const n="/"===t[0]||"/"===r[r.length-1]?t:`/${t}`;if(r+=n,i.pathname===e.pathname)return Cn(r)!==Cn(i.pathname)&&"/*"!==r.slice(-2)?[n,"route"]:[r,"route"]}}}return[e.pathname,"url"]}function Yc(){return Yc=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},Yc.apply(this,arguments)}const Fc={BrowserTracing:_c,Apollo:jo,Express:Ho,GraphQL:Fo,Mongo:Go,Mysql:Lo,Postgres:Po,Prisma:Yo};("undefined"==typeof __SENTRY_TRACING__||__SENTRY_TRACING__)&&(Tr(),_n()&&function(){const e=sr();if(!e.__SENTRY__)return;const n={mongodb:()=>new(mn(t,"./node/integrations/mongo").Mongo),mongoose:()=>new(mn(t,"./node/integrations/mongo").Mongo)({mongoose:!0}),mysql:()=>new(mn(t,"./node/integrations/mysql").Mysql),pg:()=>new(mn(t,"./node/integrations/postgres").Postgres)},r=Object.keys(n).filter(t=>!!gn(t)).map(t=>{try{return n[t]()}catch(t){return}}).filter(t=>t);r.length>0&&(e.__SENTRY__.integrations=[...e.__SENTRY__.integrations||[],...r])}());var jc={forbiddenErrorMessage:"You are not authorized to perform this operation",somethingWentWrongMessage:"Oops... something went wrong",changeLanguageText:"Change language to Polish",headerLoginButton:"Sign in",headerLogoutButton:"Sign out",loginCardTitle:"Sign in",loginFormText:"Fill both fields in order to log in to the system",loginCardCancelButton:"Cancel",loginCardSubmitButton:"Sign in",loginCardUsernameHint:"Username",loginCardPasswordHint:"Password",networkErrorHeader:"Connection issue detected",networkErrorButtonText:"Reload the page",newVersionAvailable:"New version available, the application will refresh in 5 seconds..."},qc={forbiddenErrorMessage:"Nie masz uprawnień do wykonania tej operacji",somethingWentWrongMessage:"Ups... coś poszło nie tak",changeLanguageText:"Zmiana języka na Angielski",headerLoginButton:"Zaloguj się",headerLogoutButton:"Wyloguj",loginCardTitle:"Logowanie",loginFormText:"Wypełnij oba pola w celu zalogowania do systemu",loginCardCancelButton:"Anuluj",loginCardSubmitButton:"Zaloguj",loginCardUsernameHint:"Użytkownik",loginCardPasswordHint:"Hasło",networkErrorHeader:"Błąd połączenia",networkErrorButtonText:"Odśwież stronę",newVersionAvailable:"Dostępna jest nowa wersja, za 5 sekund nastąpi odświeżenie aplikacji..."},Vc=navigator.language.slice(0,2),Zc="pl";["en","pl"].includes(Vc)&&(Zc=Vc);var Wc=new(/*#__PURE__*/function(){function t(){this.locale=Zc,this.translations=qc,l.makeObservable(this,{locale:l.observable,translations:l.observable,setLocale:l.action})}return t.prototype.setLocale=function(t){this.locale=t,this.translations="en"===t?jc:qc},t}());function Xc(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)t[r]=n[r]}return t}var Kc,Jc=function t(e,n){function r(t,r,i){if("undefined"!=typeof document){"number"==typeof(i=Xc({},n,i)).expires&&(i.expires=new Date(Date.now()+864e5*i.expires)),i.expires&&(i.expires=i.expires.toUTCString()),t=encodeURIComponent(t).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var s="";for(var a in i)i[a]&&(s+="; "+a,!0!==i[a]&&(s+="="+i[a].split(";")[0]));return document.cookie=t+"="+e.write(r,t)+s}}return Object.create({set:r,get:function(t){if("undefined"!=typeof document&&(!arguments.length||t)){for(var n=document.cookie?document.cookie.split("; "):[],r={},i=0;i<n.length;i++){var s=n[i].split("="),a=s.slice(1).join("=");try{var o=decodeURIComponent(s[0]);if(r[o]=e.read(a,o),t===o)break}catch(t){}}return t?r[t]:r}},remove:function(t,e){r(t,"",Xc({},e,{expires:-1}))},withAttributes:function(e){return t(this.converter,Xc({},this.attributes,e))},withConverter:function(e){return t(Xc({},this.converter,e),this.attributes)}},{attributes:{value:Object.freeze(n)},converter:{value:Object.freeze(e)}})}({read:function(t){return'"'===t[0]&&(t=t.slice(1,-1)),t.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(t){return encodeURIComponent(t).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"}),Qc=/*#__PURE__*/function(){function t(){}return t.recognizeRootDomain=function(){if(!this.rootDomain){var t=window.location.hostname;if(0===window.location.port.length){var e,n,r=t.split(".");e=r[0],n=r.slice(1),this.subdomain=e,this.rootDomain=n.join(".")}else this.rootDomain=t}return this.rootDomain},t.get=function(t){var e=this.recognizeRootDomain();return Jc.get(t,{domain:e})},t.set=function(t,e){var n=this.recognizeRootDomain();return Jc.set(t,e,{domain:n})},t.remove=function(t){var e=this.recognizeRootDomain();return Jc.remove(t,{domain:e})},t}(),tl=function(t,e){void 0===e&&(e={});try{var n=function(){var n=sl.requestHeaders();return null!==n&&(e.headers=Object.assign({},n,e.headers)),Promise.resolve(fetch(t,e).catch(function(t){Cr(t),sl.setNetworkError({title:Wc.translations.somethingWentWrongMessage,details:t.message})})).then(function(t){var e=function(){if(t){var e=function(){if(401!==t.status)return Promise.resolve(t.clone().text()).then(function(e){switch(t.status){case 403:Zt.error(Wc.translations.forbiddenErrorMessage);break;case 500:Zt.error(/*#__PURE__*/x.default.createElement(x.default.Fragment,null,/*#__PURE__*/x.default.createElement(d.Typography,{mr:e?2:0},Wc.translations.somethingWentWrongMessage),e&&/*#__PURE__*/x.default.createElement(d.Tooltip,{title:e,arrow:!0},/*#__PURE__*/x.default.createElement(N.default,null))))}});sl.removeSession(),sl.removeCurrentUser(),sl.setNotAuthorizedLoginStatus()}();if(e&&e.then)return e.then(function(){})}}();return e&&e.then?e.then(function(){return t}):t})},r=function(){if(sl.isLoggedIn()&&!e.refresh){var t=sl.session,n=t.createdAt,r=t.expiresIn,i=function(){if(n+r<Math.round(+new Date/1e3)){var t=sl.refreshTokenPromise?Promise.resolve(sl.refreshTokenPromise).then(function(){}):Promise.resolve(sl.refresh()).then(function(){});if(t&&t.then)return t.then(function(){})}}();if(i&&i.then)return i.then(function(){})}}();return Promise.resolve(r&&r.then?r.then(n):n())}catch(t){return Promise.reject(t)}},el=new(/*#__PURE__*/function(){function t(){this.currentUser=null,l.makeObservable(this,{setCurrentUser:l.action,removeCurrentUser:l.action,currentUser:l.observable.deep,getCurrentUserJS:l.computed})}var e,n,r=t.prototype;return r.setCurrentUser=function(t){this.currentUser=t},r.removeCurrentUser=function(){this.currentUser=null},e=t,(n=[{key:"getCurrentUserJS",get:function(){return l.toJS(this.currentUser)}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,"symbol"==typeof(i=function(t,e){if("object"!=typeof t||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key))?i:String(i),r)}var i}(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}()),nl=function(){this.user={},this.accessToken=null,this.refreshToken=null,this.tokenType=null,this.createdAt=null,this.expiresIn=null},rl=/*#__PURE__*/function(){function t(){}var e=t.prototype;return e.setAuthConfig=function(t){var e=t.clientId,n=t.redirectUri;this.baseUrl=t.baseUrl,this.clientId=e,this.redirectUri=n},e.authorize=function(t){try{var e,n=this,r=new FormData,i=t.scope,s=t.refresh,a=t.code,o=t.username,c=t.password;return r.append("client_id",n.clientId),i&&r.append("scope",i),s?(r.append("grant_type","refresh_token"),r.append("refresh_token",s),r.append("redirect_uri",n.redirectUri)):a?(r.append("grant_type","authorization_code"),r.append("code",a),r.append("redirect_uri",n.redirectUri)):(r.append("grant_type","password"),r.append("username",o),r.append("password",c)),Promise.resolve(tl(n.baseUrl+"/v2/oauth2/token",{method:"POST",body:r,refresh:!!s}).then(function(t){try{var r,i;return Promise.resolve(function(){if(t){var a=function(t){if(r)return t;function a(){e.accessToken=i.access_token,e.refreshToken=i.refresh_token,e.tokenType=i.token_type,e.createdAt=i.created_at,e.expiresIn=i.expires_in}e=new nl;var o=function(){if(!s)return Promise.resolve(n.getUserData(i)).then(function(t){e.user=t})}();return o&&o.then?o.then(a):a()},o=function(e,n){try{var s=Promise.resolve(t.json()).then(function(e){i=e,t.ok&&200===t.status||(Zt.error(i.error_description),r=1)})}catch(t){return n()}return s&&s.then?s.then(void 0,n):s}(0,function(){Zt.error(Wc.translations.somethingWentWrongMessage),r=1});return o&&o.then?o.then(a):a(o)}}())}catch(t){return Promise.reject(t)}}).catch(function(t){Zt.error(t.message)})).then(function(){return e})}catch(t){return Promise.reject(t)}},e.getUserData=function(t){try{var e={method:"GET"};return t&&(e.headers={Authorization:t.token_type+" "+t.access_token}),Promise.resolve(tl(this.baseUrl+"/v2/me",e)).then(function(t){var e,n=function(){if(null!=t&&t.ok)return Promise.resolve(t.json()).then(function(t){var n=t.user;return e=1,{id:n.id,companyId:n.company_id,roleId:n.role_id,username:n.username,email:n.email,name:n.name}})}();return n&&n.then?n.then(function(t){return e?t:null}):e?n:null})}catch(t){return Promise.reject(t)}},e.signOut=function(){try{var t=new FormData;return t.append("client_id",this.clientId),Promise.resolve(tl(this.baseUrl+"/v2/oauth2/revoke",{method:"POST",body:t})).then(function(){})}catch(t){return Promise.reject(t)}},t}(),il=/*#__PURE__*/function(){function t(){this.loading=!1,this.loginStatus={status:"unknown"},this.refreshTokenPromise=null,this.api=new rl,this.networkError=null,l.makeObservable(this,{loading:l.observable,setLoading:l.action,loginStatus:l.observable.deep,setConnectedLoginStatus:l.action,setNotAuthorizedLoginStatus:l.action})}var e=t.prototype;return e.setLoading=function(t){this.loading=t},e.setConnectedLoginStatus=function(){this.loginStatus={status:"connected",authResponse:{user:this.session.user,accessToken:this.session.accessToken,refreshToken:this.session.refreshToken,tokenType:this.session.tokenType,createdAt:this.session.createdAt,expiresIn:this.session.expiresIn}}},e.setNotAuthorizedLoginStatus=function(){this.loginStatus={status:"not_authorized"}},e.setAuthConfig=function(t){this.api.setAuthConfig(t)},e.setNetworkError=function(t){this.networkError=t},e.isLoggedIn=function(){return Boolean(this.session)},e.requestHeaders=function(){var t={"Accept-Language":Wc.locale};if(this.isLoggedIn()){var e=this.session;return Yc({},t,{Authorization:e.tokenType+" "+e.accessToken})}return t},e.authorize=function(t,e){void 0===e&&(e=!0);try{var n=this;return n.setLoading(!0),Promise.resolve(n.api.authorize(t)).then(function(t){return n.setLoading(!1),t?(e&&(n.session=t,n.storeSession(),n.setCurrentUser(t.user),n.setConnectedLoginStatus()),t):null})}catch(t){return Promise.reject(t)}},e.refresh=function(){try{var t=this;return t.session&&(t.refreshTokenPromise=t.api.authorize({refresh:t.session.refreshToken}),t.refreshTokenPromise.then(function(e){e?(t.session=Yc({},t.session,e,{user:t.session.user}),t.storeSession(),t.setConnectedLoginStatus(),t.refreshTokenPromise=null):(t.removeSession(),t.removeCurrentUser(),t.setNotAuthorizedLoginStatus(),t.refreshTokenPromise=null)})),Promise.resolve(t.refreshTokenPromise)}catch(t){return Promise.reject(t)}},e.recover=function(){try{var t=this;return t.session?Promise.resolve():Promise.resolve(t.restoreSession()).then(function(){var e=function(){if(t.session)return Promise.resolve(t.api.getUserData()).then(function(e){t.setCurrentUser(e),t.setConnectedLoginStatus()});t.setNotAuthorizedLoginStatus()}();if(e&&e.then)return e.then(function(){})})}catch(t){return Promise.reject(t)}},e.logout=function(){try{var t=this,e=function(){if(t.session)return Promise.resolve(t.api.signOut()).then(function(){t.removeSession(),t.removeCurrentUser(),t.setNotAuthorizedLoginStatus()})}();return Promise.resolve(e&&e.then?e.then(function(){}):void 0)}catch(t){return Promise.reject(t)}},e.storeSession=function(){try{var t=this,e={};e["access-token"]=t.session.accessToken,e["refresh-token"]=t.session.refreshToken,e["token-type"]=t.session.tokenType,e["created-at"]=t.session.createdAt,e["expires-in"]=t.session.expiresIn;var n=JSON.stringify(e);return Qc.set("authHeaders",n),Promise.resolve()}catch(t){return Promise.reject(t)}},e.restoreSession=function(){try{var t=this,e=Qc.get("authHeaders");if(!e||"null"===e)return Promise.resolve();var n=JSON.parse(e),r=new nl;return r.accessToken=n["access-token"],r.refreshToken=n["refresh-token"],r.tokenType=n["token-type"],r.createdAt=n["created-at"],r.expiresIn=n["expires-in"],t.session=r,Promise.resolve(t.api.getUserData()).then(function(e){e&&(t.session.user=e)})}catch(t){return Promise.reject(t)}},e.removeSession=function(){Qc.remove("authHeaders"),this.session=null},e.setCurrentUser=function(t){el.setCurrentUser(t)},e.removeCurrentUser=function(){el.removeCurrentUser()},t}(),sl=new il,al=function(){var t=n.useState(sl.loginStatus),e=t[0],r=t[1];return n.useEffect(function(){return l.reaction(function(){return l.toJS(sl.loginStatus)},function(){r(sl.loginStatus)})},[]),e},ol=x.default.createContext({showModal:null,hideModal:null,isOpenedModal:!1}),cl=function(t){var e=t.children,r=n.useState({}),i=r[0],s=r[1],a=n.useCallback(function(t,e){s(function(e){var n;return Yc({},e,((n={})[t]=Yc({},e[t],{isOpen:!1}),n))}),e&&e()},[s]),o=n.useCallback(function(t,e,n){s(function(r){var i;return Yc({},r,((i={})[t]={isOpen:!0,component:e,data:n},i))})},[s]),c=n.useMemo(function(){return{showModal:o,hideModal:a,isOpenedModal:Object.values(i).some(function(t){return t.isOpen})}},[a,o,i]);return x.default.createElement(ol.Provider,{value:c},e,Object.keys(i).map(function(t){var e=i[t],n=e.isOpen;return n&&/*#__PURE__*/x.default.createElement(e.component,Yc({onClose:function(){return a(t)},key:t,isOpen:n},e.data))}))},ll=(Kc=0,function(){return""+ ++Kc});function ul(t,e,r){var i=n.useMemo(ll,[]),s=n.useContext(ol);return[n.useCallback(function(n){return s.showModal(i,t,n instanceof Event?e:Yc({},e,n))},[e,s.showModal]),n.useCallback(function(){return s.hideModal(i,r)},[s.hideModal,r,i])]}ul.ModalContext=ol,ul.ModalProvider=cl;var dl={root:{height:"100vh",paddingTop:"70px",mixBlendMode:"color",background:"#1E1E1E"},overlay:{position:"absolute",top:0,left:0,width:"100%",height:"100%",zIndex:-1,background:"repeating-linear-gradient(-45deg, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.1) 12px, transparent 12px, transparent 24px);"}},pl=function(t){return x.default.createElement(d.Container,{maxWidth:!1,disableGutters:!0,sx:dl.root},/*#__PURE__*/x.default.createElement(d.Card,{style:{background:"linear-gradient(180deg, #393939 0%, #4A4A4A 100%)",maxWidth:"650px",margin:"200px auto",borderRadius:"20px"}},/*#__PURE__*/x.default.createElement(d.CardContent,{style:{minHeight:"unset"}},/*#__PURE__*/x.default.createElement(d.Box,{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",m:"125px 80px"},/*#__PURE__*/x.default.createElement(d.Typography,{variant:"h4",sx:{display:"flex",alignItems:"center",marginBottom:"40px",color:"rgba(255, 255, 255, 0.6)"}},Wc.translations.somethingWentWrongMessage,/*#__PURE__*/x.default.createElement(d.Tooltip,{title:t.error.toString(),arrow:!0},/*#__PURE__*/x.default.createElement(N.default,{sx:{marginLeft:"1em",fontSize:"inherit"}}))),/*#__PURE__*/x.default.createElement(d.Button,{onClick:function(){return window.location.reload()}},Wc.translations.networkErrorButtonText)))),/*#__PURE__*/x.default.createElement(d.Box,{sx:dl.overlay}))};pl.propTypes={error:c.PropTypes.any,componentStack:c.PropTypes.any},pl.defaultProps={};var hl=n.createContext(),fl=function(t){return x.default.createElement(hl.Provider,{value:t.config},t.children)},_l=function(){return n.useContext(hl)},ml=new(/*#__PURE__*/function(){function t(){this.appReady=!1,this.sentryReady=!1,l.makeAutoObservable(this)}var e=t.prototype;return e.setAppReady=function(){this.appReady=!0},e.setSentryReady=function(){this.sentryReady=!0},t}()),gl=a.createTheme({components:{MuiCssBaseline:{styleOverrides:'\n body {\n font-family: "Inter", "system-ui";\n }\n @supports (font-variation-settings: normal) {\n body { font-family: "Inter var", "system-ui"; }\n }\n '}},palette:{background:"#1E1E1E",primary:{light:"#156bd1",main:"#155ed1",dark:"#1551d1",contrastText:"rgba(255,255,255,0.85)"},secondary:{light:"#656565",main:"#595959",dark:"#4d4d4d",contrastText:"rgba(255,255,255,0.85)"}},typography:{fontFamily:"'Inter', system-ui",fontWeightLight:"400",fontWeightRegular:"500",fontWeightMedium:"600",button:{textTransform:"none"}}}),yl=a.createTheme(gl,{components:{MuiBackdrop:{styleOverrides:{root:{marginTop:70}}},MuiButton:{defaultProps:{variant:"contained",disableElevation:!0},styleOverrides:{root:{fontWeight:"normal",borderRadius:6}}},MuiLoadingButton:{defaultProps:{variant:"contained",disableElevation:!0},styleOverrides:{root:{fontWeight:"normal",borderRadius:6}}},MuiCardHeader:{styleOverrides:{root:{color:"rgba(255,255,255,0.85)",background:"linear-gradient(180deg, #4A4A4A 0%, #3F3F3F 100%)"},subheader:{marginTop:"0.5em",color:"rgba(255,255,255,0.5)"}}},MuiPaper:{styleOverrides:{rounded:{borderRadius:"20px"}}},MuiCard:{styleOverrides:{root:{borderRadius:"4px",boxShadow:"0px 4px 8px rgba(0, 0, 0, 0.25)"}}},MuiCardContent:{styleOverrides:{root:{background:"rgba(45, 45, 45, 1)","&:last-child":{paddingBottom:16}}}},MuiDialogTitle:{styleOverrides:{root:{textAlign:"center",color:"white",background:"linear-gradient(#4a4a4a 0%, #3e3e3e 100%)"}}},MuiDialogContent:{styleOverrides:{root:{minWidth:550,padding:"16px 24px",background:"linear-gradient(180deg, #393939 0%, #4A4A4A 100%)"}}},MuiDialogContentText:{styleOverrides:{root:{textAlign:"center",color:"white"}}},MuiMenu:{styleOverrides:{paper:{background:"#2d2d2d"}}},MuiMenuItem:{styleOverrides:{root:{color:"white"}}},MuiFormControl:{styleOverrides:{root:{alignItems:"center"}}},MuiOutlinedInput:{styleOverrides:{root:{color:"white","&:hover .MuiOutlinedInput-notchedOutline":{borderColor:"rgba(255,255,255,0.35)"}},notchedOutline:{borderColor:"rgba(255,255,255,0.25)"},input:{padding:"13px 16px",background:"transparent",color:"white",borderColor:"white"}}}}}),vl=function(t){return x.default.createElement(d.Box,{display:"flex",alignItems:"center",justifyContent:"center",width:"100%",height:"100vh"},/*#__PURE__*/x.default.createElement("img",{"data-testid":t["data-testid"],alt:"loader",width:t.width,src:I.default}))},bl=function(t){var e=t.error;return x.default.createElement(d.Container,{maxWidth:!1,disableGutters:!0,sx:dl.root},/*#__PURE__*/x.default.createElement(d.Card,{style:{background:"linear-gradient(180deg, #393939 0%, #4A4A4A 100%)",maxWidth:"600px",margin:"200px auto",borderRadius:"20px"}},/*#__PURE__*/x.default.createElement(d.CardContent,{style:{minHeight:"unset"}},/*#__PURE__*/x.default.createElement(d.Box,{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",m:"125px 80px"},/*#__PURE__*/x.default.createElement("h1",{style:{textAlign:"center",color:"rgba(255, 255, 255, 0.6)"}},Wc.translations.networkErrorHeader),/*#__PURE__*/x.default.createElement("p",{style:{display:"inline-flex",textAlign:"center",color:"rgba(255, 255, 255, 0.6)"}},/*#__PURE__*/x.default.createElement(d.Typography,{mr:2},e.title),/*#__PURE__*/x.default.createElement(d.Tooltip,{title:e.details,arrow:!0},/*#__PURE__*/x.default.createElement(N.default,null))),/*#__PURE__*/x.default.createElement(d.Button,{onClick:function(){return window.location.reload()}},Wc.translations.networkErrorButtonText)))),/*#__PURE__*/x.default.createElement(d.Box,{sx:dl.overlay}))},El=function(){var t=new URLSearchParams(r.useLocation().search),e=t.get("next");return n.useEffect(function(){var e=t.get("code");e&&sl.authorize({code:e})},[t]),sl.isLoggedIn()?/*#__PURE__*/x.default.createElement(r.Navigate,{to:e}):null},Sl=function(t){var e={exports:{}};return function(t,e){var n;t.exports=(n={attachTo:function(t,e){if(void 0!==t.scannerDetectionData)throw new Error("onScan.js is already initialized for DOM element "+t);return e=this._mergeOptions({onScan:function(t,e){},onScanError:function(t){},onKeyProcess:function(t,e){},onKeyDetect:function(t,e){},onPaste:function(t,e){},keyCodeMapper:function(t){return n.decodeKeyEvent(t)},onScanButtonLongPress:function(){},scanButtonKeyCode:!1,scanButtonLongPressTime:500,timeBeforeScanTest:100,avgTimeByChar:30,minLength:6,suffixKeyCodes:[9,13],prefixKeyCodes:[],ignoreIfFocusOn:!1,stopPropagation:!1,preventDefault:!1,captureEvents:!1,reactToKeydown:!0,reactToPaste:!1,singleScanQty:1},e),t.scannerDetectionData={options:e,vars:{firstCharTime:0,lastCharTime:0,accumulatedString:"",testTimer:!1,longPressTimeStart:0,longPressed:!1}},!0===e.reactToPaste&&t.addEventListener("paste",this._handlePaste,e.captureEvents),!1!==e.scanButtonKeyCode&&t.addEventListener("keyup",this._handleKeyUp,e.captureEvents),!0!==e.reactToKeydown&&!1===e.scanButtonKeyCode||t.addEventListener("keydown",this._handleKeyDown,e.captureEvents),this},detachFrom:function(t){t.scannerDetectionData.options.reactToPaste&&t.removeEventListener("paste",this._handlePaste),!1!==t.scannerDetectionData.options.scanButtonKeyCode&&t.removeEventListener("keyup",this._handleKeyUp),t.removeEventListener("keydown",this._handleKeyDown),t.scannerDetectionData=void 0},getOptions:function(t){return t.scannerDetectionData.options},setOptions:function(t,e){switch(t.scannerDetectionData.options.reactToPaste){case!0:!1===e.reactToPaste&&t.removeEventListener("paste",this._handlePaste);break;case!1:!0===e.reactToPaste&&t.addEventListener("paste",this._handlePaste)}return!1===t.scannerDetectionData.options.scanButtonKeyCode?!1!==e.scanButtonKeyCode&&t.addEventListener("keyup",this._handleKeyUp):!1===e.scanButtonKeyCode&&t.removeEventListener("keyup",this._handleKeyUp),t.scannerDetectionData.options=this._mergeOptions(t.scannerDetectionData.options,e),this._reinitialize(t),this},decodeKeyEvent:function(t){var e=this._getNormalizedKeyNum(t);switch(!0){case e>=48&&e<=90:case e>=106&&e<=111:if(void 0!==t.key&&""!==t.key)return t.key;var n=String.fromCharCode(e);switch(t.shiftKey){case!1:n=n.toLowerCase();break;case!0:n=n.toUpperCase()}return n;case e>=96&&e<=105:return e-96+0}return""},simulate:function(t,e){return this._reinitialize(t),Array.isArray(e)?e.forEach(function(t){var e={};"object"!=typeof t&&"function"!=typeof t||null===t?e.keyCode=parseInt(t):e=t;var n=new KeyboardEvent("keydown",e);document.dispatchEvent(n)}):this._validateScanCode(t,e),this},_reinitialize:function(t){var e=t.scannerDetectionData.vars;e.firstCharTime=0,e.lastCharTime=0,e.accumulatedString=""},_isFocusOnIgnoredElement:function(t){var e=t.scannerDetectionData.options.ignoreIfFocusOn;if(!e)return!1;var n=document.activeElement;if(Array.isArray(e)){for(var r=0;r<e.length;r++)if(!0===n.matches(e[r]))return!0}else if(n.matches(e))return!0;return!1},_validateScanCode:function(t,e){var r,i=t.scannerDetectionData,s=i.options,a=i.options.singleScanQty,o=i.vars.firstCharTime,c=i.vars.lastCharTime,l={};switch(!0){case e.length<s.minLength:l={message:"Receieved code is shorter then minimal length"};break;case c-o>e.length*s.avgTimeByChar:l={message:"Receieved code was not entered in time"};break;default:return s.onScan.call(t,e,a),r=new CustomEvent("scan",{detail:{scanCode:e,qty:a}}),t.dispatchEvent(r),n._reinitialize(t),!0}return l.scanCode=e,l.scanDuration=c-o,l.avgTimeByChar=s.avgTimeByChar,l.minLength=s.minLength,s.onScanError.call(t,l),r=new CustomEvent("scanError",{detail:l}),t.dispatchEvent(r),n._reinitialize(t),!1},_mergeOptions:function(t,e){var n,r={};for(n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n]);for(n in e)Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r},_getNormalizedKeyNum:function(t){return t.which||t.keyCode},_handleKeyDown:function(t){var e=n._getNormalizedKeyNum(t),r=this.scannerDetectionData.options,i=this.scannerDetectionData.vars,s=!1;if(!1!==r.onKeyDetect.call(this,e,t)&&!n._isFocusOnIgnoredElement(this))if(!1===r.scanButtonKeyCode||e!=r.scanButtonKeyCode){switch(!0){case i.firstCharTime&&-1!==r.suffixKeyCodes.indexOf(e):t.preventDefault(),t.stopImmediatePropagation(),s=!0;break;case!i.firstCharTime&&-1!==r.prefixKeyCodes.indexOf(e):t.preventDefault(),t.stopImmediatePropagation(),s=!1;break;default:var a=r.keyCodeMapper.call(this,t);if(null===a)return;i.accumulatedString+=a,r.preventDefault&&t.preventDefault(),r.stopPropagation&&t.stopImmediatePropagation(),s=!1}i.firstCharTime||(i.firstCharTime=Date.now()),i.lastCharTime=Date.now(),i.testTimer&&clearTimeout(i.testTimer),s?(n._validateScanCode(this,i.accumulatedString),i.testTimer=!1):i.testTimer=setTimeout(n._validateScanCode,r.timeBeforeScanTest,this,i.accumulatedString),r.onKeyProcess.call(this,a,t)}else i.longPressed||(i.longPressTimer=setTimeout(r.onScanButtonLongPress,r.scanButtonLongPressTime,this),i.longPressed=!0)},_handlePaste:function(t){var e=this.scannerDetectionData.options,r=this.scannerDetectionData.vars,i=(event.clipboardData||window.clipboardData).getData("text");n._isFocusOnIgnoredElement(this)||(t.preventDefault(),e.stopPropagation&&t.stopImmediatePropagation(),e.onPaste.call(this,i,event),r.firstCharTime=0,r.lastCharTime=0,n._validateScanCode(this,i))},_handleKeyUp:function(t){n._isFocusOnIgnoredElement(this)||n._getNormalizedKeyNum(t)==this.scannerDetectionData.options.scanButtonKeyCode&&(clearTimeout(this.scannerDetectionData.vars.longPressTimer),this.scannerDetectionData.vars.longPressed=!1)},isScanInProgressFor:function(t){return t.scannerDetectionData.vars.firstCharTime>0},isAttachedTo:function(t){return void 0!==t.scannerDetectionData}},n)}(e),e.exports}(),wl=function(t){var e=t.scope,i=t.redirectPath,s=t.onSuccess,a=t.onFailure,o=t.onCancel,c=t.storeSession,l=t.title,u=t["data-testid"],p=n.useState(""),h=p[0],f=p[1],_=n.useState(""),m=_[0],g=_[1],y=r.useNavigate(),v=function(t){try{return Promise.resolve(sl.authorize(Yc({scope:e},t),c)).then(function(t){t?(s&&"function"==typeof s&&s(t),g(""),y(i)):a&&"function"==typeof a&&a()})}catch(t){return Promise.reject(t)}};n.useEffect(function(){return Sl.attachTo(document,{suffixKeyCodes:[13],onScan:function(t){f(""),g(""),v({username:"code",password:t})}}),function(){Sl.detachFrom(document)}},[]);var b=function(t){try{return t.preventDefault(),v({username:h,password:m}),Promise.resolve()}catch(t){return Promise.reject(t)}};return x.default.createElement("form",{onSubmit:b,"data-testid":u||"ac-sdk-login-form"},/*#__PURE__*/x.default.createElement(d.Box,{m:"0 80px"},/*#__PURE__*/x.default.createElement(d.Box,{display:"flex",alignItems:"center",justifyContent:"center",m:"100px 0"},/*#__PURE__*/x.default.createElement(Rl,null)),/*#__PURE__*/x.default.createElement(d.Box,{m:"0 0 30px 0",color:"rgba(255, 255, 255, 0.6)"},/*#__PURE__*/x.default.createElement(d.Typography,{align:"center",color:"inherit"},l)),/*#__PURE__*/x.default.createElement(d.Box,{m:"0",display:"grid",sx:{gridGap:"18px"},gridTemplateColumns:"1fr"},/*#__PURE__*/x.default.createElement(d.FormControl,{fullWidth:!0},/*#__PURE__*/x.default.createElement(d.TextField,{autoFocus:!0,fullWidth:!0,variant:"outlined",placeholder:Wc.translations.loginCardUsernameHint,onChange:function(t){f(t.target.value)},value:h,id:"login-input",inputProps:{"data-testid":"ac-sdk-login-form-username-input"}})),/*#__PURE__*/x.default.createElement(d.FormControl,{fullWidth:!0},/*#__PURE__*/x.default.createElement(d.TextField,{fullWidth:!0,variant:"outlined",placeholder:Wc.translations.loginCardPasswordHint,onChange:function(t){g(t.target.value)},value:m,type:"password",id:"password-input",inputProps:{"data-testid":"ac-sdk-login-form-password-input"}})),/*#__PURE__*/x.default.createElement(h__default.default.LoadingButton,{id:"login-button",type:"submit",size:"large",color:"primary",onClick:b,loading:sl.loading,"data-testid":"ac-sdk-login-form-submit-button"},Wc.translations.loginCardSubmitButton),/*#__PURE__*/x.default.createElement(d.Button,{id:"cancel-button",type:"button",size:"large",color:"secondary",onClick:function(t){o&&"function"==typeof o?o():y("/")},"data-testid":"ac-sdk-login-form-cancel-button"},Wc.translations.loginCardCancelButton)),/*#__PURE__*/x.default.createElement(d.Box,{m:"30px 0 40px 0",color:"rgba(255, 255, 255, 0.6)"},/*#__PURE__*/x.default.createElement(d.Typography,{align:"center",color:"inherit"},"or scan")),/*#__PURE__*/x.default.createElement(d.Box,{display:"grid",gridTemplateColumns:"1fr 1fr 1fr",alignItems:"center",justifyItems:"center",marginBottom:"30px"},/*#__PURE__*/x.default.createElement(d.Box,{style:{filter:"brightness(0.5)"}},/*#__PURE__*/x.default.createElement(Tl,null)),/*#__PURE__*/x.default.createElement(Cl,null),/*#__PURE__*/x.default.createElement(d.Box,{style:{filter:"brightness(0.5)"}},/*#__PURE__*/x.default.createElement(xl,null)))))};wl.propTypes={scope:c.PropTypes.string,redirectPath:c.PropTypes.string,onSuccess:c.PropTypes.func,onFailure:c.PropTypes.func,onCancel:c.PropTypes.func,storeSession:c.PropTypes.bool},wl.defaultProps={redirectPath:"/",storeSession:!0};var kl=o.observer(wl),Tl=function(){return x.default.createElement("svg",{width:"51",height:"53",viewBox:"0 0 51 53",fill:"none",xmlns:"http://www.w3.org/2000/svg"},/*#__PURE__*/x.default.createElement("path",{d:"M8.66868 45.6365C8.66868 42.8453 6.99822 41.1535 4.7397 41.1535C2.47266 41.1535 0.806463 42.8453 0.806463 45.6365C0.806463 48.4234 2.47266 50.1194 4.7397 50.1194C5.3022 50.1194 5.82635 50.0172 6.2951 49.8169L7.04084 50.7842H8.38743L7.21129 49.2501C8.1147 48.4873 8.66868 47.243 8.66868 45.6365ZM4.29652 47.1706L5.53658 48.7984C5.28942 48.8794 5.02095 48.9177 4.7397 48.9177C3.23544 48.9177 2.1147 47.7629 2.1147 45.6365C2.1147 43.5101 3.23544 42.3552 4.7397 42.3552C6.2397 42.3552 7.3647 43.5101 7.3647 45.6365C7.3647 46.8297 7.01101 47.7203 6.43146 48.2657L5.59197 47.1706H4.29652ZM10.3104 50.0001H11.6271V46.6976H13.4169C13.4467 46.6976 13.4723 46.6976 13.5021 46.6976L15.2749 50.0001H16.7749L14.8402 46.4675C15.9098 46.0711 16.4425 45.1805 16.4425 44.0086C16.4425 42.4021 15.4453 41.2728 13.4212 41.2728H10.3104V50.0001ZM11.6271 45.564V42.4021H13.2805C14.5803 42.4021 15.1172 43.02 15.1172 44.0086C15.1172 44.993 14.5803 45.564 13.2976 45.564H11.6271ZM28.4691 44.1109C28.1708 42.2444 26.7092 41.1535 24.864 41.1535C22.6055 41.1535 20.9393 42.8453 20.9393 45.6365C20.9393 48.4277 22.5969 50.1194 24.864 50.1194C26.7816 50.1194 28.1836 48.9177 28.4691 47.1919L27.1396 47.1876C26.9137 48.3041 25.9762 48.9177 24.8725 48.9177C23.3768 48.9177 22.2475 47.7714 22.2475 45.6365C22.2475 43.5186 23.3725 42.3552 24.8768 42.3552C25.989 42.3552 26.9222 42.9817 27.1396 44.1109H28.4691ZM32.6996 50.1322C34.5447 50.1322 35.7507 48.7814 35.7507 46.7572C35.7507 44.7203 34.5447 43.3694 32.6996 43.3694C30.8544 43.3694 29.6484 44.7203 29.6484 46.7572C29.6484 48.7814 30.8544 50.1322 32.6996 50.1322ZM32.7038 49.0626C31.4979 49.0626 30.9354 48.0101 30.9354 46.753C30.9354 45.5001 31.4979 44.4348 32.7038 44.4348C33.9013 44.4348 34.4638 45.5001 34.4638 46.753C34.4638 48.0101 33.9013 49.0626 32.7038 49.0626ZM39.6232 50.128C40.8164 50.128 41.2852 49.3993 41.5153 48.9817H41.6218V50.0001H42.8661V41.2728H41.592V44.5157H41.5153C41.2852 44.1109 40.8505 43.3694 39.6317 43.3694C38.0508 43.3694 36.8874 44.618 36.8874 46.7402C36.8874 48.8581 38.0337 50.128 39.6232 50.128ZM39.9045 49.0413C38.7667 49.0413 38.1744 48.0399 38.1744 46.7274C38.1744 45.4277 38.7539 44.4518 39.9045 44.4518C41.0167 44.4518 41.6133 45.3595 41.6133 46.7274C41.6133 48.1038 41.0039 49.0413 39.9045 49.0413ZM47.5057 50.1322C48.9332 50.1322 49.9432 49.4291 50.233 48.3638L49.027 48.1464C48.7969 48.7643 48.2429 49.0797 47.5185 49.0797C46.4276 49.0797 45.6946 48.3723 45.6605 47.1109H50.3139V46.6592C50.3139 44.2942 48.8991 43.3694 47.4162 43.3694C45.5923 43.3694 44.3906 44.7586 44.3906 46.77C44.3906 48.8027 45.5753 50.1322 47.5057 50.1322ZM45.6648 46.1564C45.7159 45.2274 46.3892 44.422 47.4247 44.422C48.4134 44.422 49.0611 45.155 49.0653 46.1564H45.6648Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/x.default.createElement("g",{clipPath:"url(#clip0_2183_35009)"},/*#__PURE__*/x.default.createElement("path",{d:"M22.3002 3.27948H14.25V11.3318H22.3002V3.27948ZM20.6609 9.66275H15.9186V4.91923H20.6609V9.66275Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/x.default.createElement("path",{d:"M19.1081 6.47128H17.4688V8.11102H19.1081V6.47128Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/x.default.createElement("path",{d:"M14.2773 24.7206H22.3275V16.7122H14.2773V24.7206ZM15.9166 18.3373H20.6589V23.0809H15.9166V18.3373Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/x.default.createElement("path",{d:"M35.7147 17.5176H34.0754V23.081H32.4653V21.8366H30.826V23.0591H28.8281V24.6988H35.7147V17.5176Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/x.default.createElement("path",{d:"M19.1081 19.8893H17.4688V21.529H19.1081V19.8893Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/x.default.createElement("path",{d:"M35.7142 3.27948H27.6641V11.3318H35.7142V3.27948ZM34.0749 9.66275H29.318V4.91923H34.0603L34.0749 9.66275Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/x.default.createElement("path",{d:"M32.5221 6.47128H30.8828V8.11102H32.5221V6.47128Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/x.default.createElement("path",{d:"M22.3014 13.184H17.5664V14.8237H22.3014V13.184Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/x.default.createElement("path",{d:"M15.9167 13.184H14.2773V14.8237H15.9167V13.184Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/x.default.createElement("path",{d:"M30.041 13.184H23.9375V14.8237H30.041V13.184Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/x.default.createElement("path",{d:"M35.7121 15.8778V13.1766H31.6797V14.8237H34.0728V15.8778H35.7121Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/x.default.createElement("path",{d:"M25.819 6.56622H24.1797V11.3024H25.819V6.56622Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/x.default.createElement("path",{d:"M25.819 3.27948H24.1797V4.91922H25.819V3.27948Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/x.default.createElement("path",{d:"M25.82 21.4338H27.0348V19.7941H25.82V16.7122H24.1953V24.7645H27.1958V23.0809H25.8346L25.82 21.4338Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/x.default.createElement("path",{d:"M29.1874 19.5598H30.8267V18.3373H32.1587V16.7122H27.8555V18.352H29.1874V19.5598Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/x.default.createElement("path",{d:"M33.2539 6.42268e-05V1.6398H37.3668V5.73182H39.0061V-0.00726318L33.2539 6.42268e-05Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/x.default.createElement("path",{d:"M12.6408 1.63985H16.7391V0.00012207H11.0234V5.73188H12.6627L12.6408 1.63985Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/x.default.createElement("path",{d:"M37.3678 26.3603H33.2695V28.0001H39.0071V22.261H37.3678V26.3603Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/x.default.createElement("path",{d:"M12.6408 22.261H11.0234V28.0001H16.761V26.3603H12.6627L12.6408 22.261Z",fill:"white",fillOpacity:"0.35"})),/*#__PURE__*/x.default.createElement("defs",null,/*#__PURE__*/x.default.createElement("clipPath",{id:"clip0_2183_35009"},/*#__PURE__*/x.default.createElement("rect",{width:"28",height:"28",fill:"white",transform:"translate(11 0.00012207)"}))))},Cl=function(){return x.default.createElement("svg",{width:"52",height:"49",viewBox:"0 0 52 49",fill:"none",xmlns:"http://www.w3.org/2000/svg"},/*#__PURE__*/x.default.createElement("path",{d:"M1.42951 46.0001H4.77468C6.80309 46.0001 7.71928 44.9902 7.71928 43.6521C7.71928 42.3013 6.77326 41.5385 5.9082 41.4916V41.4064C6.70934 41.2018 7.37837 40.6564 7.37837 39.5655C7.37837 38.2743 6.48349 37.2728 4.62553 37.2728H1.42951V46.0001ZM2.74627 44.8709V42.0754H4.69371C5.75053 42.0754 6.41104 42.7572 6.41104 43.5882C6.41104 44.3211 5.91246 44.8709 4.64684 44.8709H2.74627ZM2.74627 41.0484V38.3936H4.54457C5.5886 38.3936 6.08718 38.9433 6.08718 39.6677C6.08718 40.5115 5.39684 41.0484 4.51048 41.0484H2.74627ZM11.0836 46.145C12.166 46.145 12.7754 45.5953 13.0183 45.1052H13.0694V46.0001H14.3137V41.6535C14.3137 39.7487 12.8137 39.3694 11.774 39.3694C10.5893 39.3694 9.4984 39.8467 9.07227 41.0399L10.2697 41.3126C10.4572 40.8481 10.9345 40.4007 11.791 40.4007C12.6135 40.4007 13.0353 40.8311 13.0353 41.5726V41.6024C13.0353 42.0669 12.5581 42.0584 11.3819 42.1947C10.1419 42.3396 8.87198 42.6635 8.87198 44.1507C8.87198 45.4376 9.83931 46.145 11.0836 46.145ZM11.3606 45.1223C10.6404 45.1223 10.1206 44.7984 10.1206 44.1677C10.1206 43.4859 10.7257 43.243 11.4629 43.145C11.8762 43.0896 12.8564 42.9788 13.0396 42.7956V43.6393C13.0396 44.4149 12.4217 45.1223 11.3606 45.1223ZM16.0108 46.0001H17.285V42.003C17.285 41.1464 17.9455 40.5285 18.8489 40.5285C19.1131 40.5285 19.4114 40.5754 19.5137 40.6052V39.3865C19.3858 39.3694 19.1344 39.3567 18.9725 39.3567C18.2054 39.3567 17.5492 39.7913 17.3105 40.4944H17.2424V39.4547H16.0108V46.0001ZM26.5492 46.1322C28.0961 46.1322 29.0975 45.2032 29.2381 43.9291H27.998C27.8361 44.6365 27.2864 45.0541 26.5577 45.0541C25.4796 45.0541 24.785 44.155 24.785 42.7274C24.785 41.3254 25.4924 40.4433 26.5577 40.4433C27.3674 40.4433 27.8617 40.9547 27.998 41.5683H29.2381C29.1017 40.2473 28.0236 39.3694 26.5364 39.3694C24.6912 39.3694 23.498 40.7586 23.498 42.7572C23.498 44.7302 24.6486 46.1322 26.5492 46.1322ZM33.3578 46.1322C35.2029 46.1322 36.4089 44.7814 36.4089 42.7572C36.4089 40.7203 35.2029 39.3694 33.3578 39.3694C31.5126 39.3694 30.3066 40.7203 30.3066 42.7572C30.3066 44.7814 31.5126 46.1322 33.3578 46.1322ZM33.362 45.0626C32.1561 45.0626 31.5936 44.0101 31.5936 42.753C31.5936 41.5001 32.1561 40.4348 33.362 40.4348C34.5595 40.4348 35.122 41.5001 35.122 42.753C35.122 44.0101 34.5595 45.0626 33.362 45.0626ZM40.2814 46.128C41.4746 46.128 41.9434 45.3993 42.1735 44.9817H42.28V46.0001H43.5243V37.2728H42.2502V40.5157H42.1735C41.9434 40.1109 41.5087 39.3694 40.29 39.3694C38.709 39.3694 37.5456 40.618 37.5456 42.7402C37.5456 44.8581 38.6919 46.128 40.2814 46.128ZM40.5627 45.0413C39.4249 45.0413 38.8326 44.0399 38.8326 42.7274C38.8326 41.4277 39.4121 40.4518 40.5627 40.4518C41.6749 40.4518 42.2715 41.3595 42.2715 42.7274C42.2715 44.1038 41.6621 45.0413 40.5627 45.0413ZM48.1639 46.1322C49.5914 46.1322 50.6014 45.4291 50.8912 44.3638L49.6852 44.1464C49.4551 44.7643 48.9011 45.0797 48.1767 45.0797C47.0858 45.0797 46.3528 44.3723 46.3187 43.1109H50.9721V42.6592C50.9721 40.2942 49.5574 39.3694 48.0744 39.3694C46.2505 39.3694 45.0488 40.7586 45.0488 42.77C45.0488 44.8027 46.2335 46.1322 48.1639 46.1322ZM46.323 42.1564C46.3741 41.2274 47.0474 40.422 48.0829 40.422C49.0716 40.422 49.7193 41.155 49.7235 42.1564H46.323Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/x.default.createElement("g",{clipPath:"url(#clip0_2183_35008)"},/*#__PURE__*/x.default.createElement("path",{d:"M47 9.00012H7V10.0001H47V9.00012Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/x.default.createElement("path",{d:"M43 0.00012207H42V7.00012H43V0.00012207Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/x.default.createElement("path",{d:"M43 12.0001H42V19.0001H43V12.0001Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/x.default.createElement("path",{d:"M41 12.0001H39V19.0001H41V12.0001Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/x.default.createElement("path",{d:"M41 0.00012207H39V7.00012H41V0.00012207Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/x.default.createElement("path",{d:"M38 0.00012207H35V7.00012H38V0.00012207Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/x.default.createElement("path",{d:"M38 12.0001H35V19.0001H38V12.0001Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/x.default.createElement("path",{d:"M33 12.0001H31V19.0001H33V12.0001Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/x.default.createElement("path",{d:"M33 0.00012207H31V7.00012H33V0.00012207Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/x.default.createElement("path",{d:"M30 0.00012207H28V7.00012H30V0.00012207Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/x.default.createElement("path",{d:"M30 12.0001H28V19.0001H30V12.0001Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/x.default.createElement("path",{d:"M27 0.00012207H26V7.00012H27V0.00012207Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/x.default.createElement("path",{d:"M27 12.0001H26V19.0001H27V12.0001Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/x.default.createElement("path",{d:"M25 0.00012207H24V7.00012H25V0.00012207Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/x.default.createElement("path",{d:"M25 12.0001H24V19.0001H25V12.0001Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/x.default.createElement("path",{d:"M23 0.00012207H20V7.00012H23V0.00012207Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/x.default.createElement("path",{d:"M23 12.0001H20V19.0001H23V12.0001Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/x.default.createElement("path",{d:"M18 0.00012207H16V7.00012H18V0.00012207Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/x.default.createElement("path",{d:"M18 12.0001H16V19.0001H18V12.0001Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/x.default.createElement("path",{d:"M15 12.0001H14V19.0001H15V12.0001Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/x.default.createElement("path",{d:"M15 0.00012207H14V7.00012H15V0.00012207Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/x.default.createElement("path",{d:"M13 0.00012207H10V7.00012H13V0.00012207Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/x.default.createElement("path",{d:"M13 12.0001H10V19.0001H13V12.0001Z",fill:"white",fillOpacity:"0.35"})),/*#__PURE__*/x.default.createElement("defs",null,/*#__PURE__*/x.default.createElement("clipPath",{id:"clip0_2183_35008"},/*#__PURE__*/x.default.createElement("rect",{width:"40",height:"20",fill:"white",transform:"translate(7 0.00012207)"}))))},xl=function(){return x.default.createElement("svg",{width:"58",height:"49",viewBox:"0 0 58 49",fill:"none",xmlns:"http://www.w3.org/2000/svg"},/*#__PURE__*/x.default.createElement("path",{d:"M1.27131 46.0001H2.58807V42.6976H4.37784C4.40767 42.6976 4.43324 42.6976 4.46307 42.6976L6.2358 46.0001H7.7358L5.80114 42.4675C6.87074 42.0711 7.40341 41.1805 7.40341 40.0086C7.40341 38.4021 6.40625 37.2728 4.3821 37.2728H1.27131V46.0001ZM2.58807 41.564V38.4021H4.24148C5.54119 38.4021 6.07812 39.02 6.07812 40.0086C6.07812 40.993 5.54119 41.564 4.25852 41.564H2.58807ZM10.3224 37.2728H9.00568V46.0001H10.3224V37.2728ZM12.2401 46.0001H13.5568V42.1947H17.2642V41.0655H13.5568V38.4064H17.652V37.2728H12.2401V46.0001ZM22.0966 46.0001C24.7557 46.0001 26.294 44.351 26.294 41.6237C26.294 38.9092 24.7557 37.2728 22.1861 37.2728H19.2713V46.0001H22.0966ZM20.5881 44.8496V38.4234H22.1051C24.0142 38.4234 24.9986 39.5655 24.9986 41.6237C24.9986 43.6905 24.0142 44.8496 22.0241 44.8496H20.5881ZM38.3558 40.1109C38.0575 38.2444 36.5959 37.1535 34.7507 37.1535C32.4922 37.1535 30.826 38.8453 30.826 41.6365C30.826 44.4277 32.4837 46.1194 34.7507 46.1194C36.6683 46.1194 38.0703 44.9177 38.3558 43.1919L37.0263 43.1876C36.8004 44.3041 35.8629 44.9177 34.7592 44.9177C33.2635 44.9177 32.1342 43.7714 32.1342 41.6365C32.1342 39.5186 33.2592 38.3552 34.7635 38.3552C35.8757 38.3552 36.8089 38.9817 37.0263 40.1109H38.3558ZM41.734 46.145C42.8164 46.145 43.4258 45.5953 43.6687 45.1052H43.7198V46.0001H44.9641V41.6535C44.9641 39.7487 43.4641 39.3694 42.4244 39.3694C41.2397 39.3694 40.1488 39.8467 39.7227 41.0399L40.9201 41.3126C41.1076 40.8481 41.5849 40.4007 42.4414 40.4007C43.2638 40.4007 43.6857 40.8311 43.6857 41.5726V41.6024C43.6857 42.0669 43.2085 42.0584 42.0323 42.1947C40.7923 42.3396 39.5224 42.6635 39.5224 44.1507C39.5224 45.4376 40.4897 46.145 41.734 46.145ZM42.011 45.1223C41.2908 45.1223 40.771 44.7984 40.771 44.1677C40.771 43.4859 41.3761 43.243 42.1133 43.145C42.5266 43.0896 43.5067 42.9788 43.69 42.7956V43.6393C43.69 44.4149 43.0721 45.1223 42.011 45.1223ZM46.6612 46.0001H47.9354V42.003C47.9354 41.1464 48.5959 40.5285 49.4993 40.5285C49.7635 40.5285 50.0618 40.5754 50.1641 40.6052V39.3865C50.0362 39.3694 49.7848 39.3567 49.6229 39.3567C48.8558 39.3567 48.1996 39.7913 47.9609 40.4944H47.8928V39.4547H46.6612V46.0001ZM53.4826 46.128C54.6758 46.128 55.1445 45.3993 55.3746 44.9817H55.4812V46.0001H56.7255V37.2728H55.4513V40.5157H55.3746C55.1445 40.1109 54.7099 39.3694 53.4911 39.3694C51.9102 39.3694 50.7468 40.618 50.7468 42.7402C50.7468 44.8581 51.8931 46.128 53.4826 46.128ZM53.7638 45.0413C52.6261 45.0413 52.0337 44.0399 52.0337 42.7274C52.0337 41.4277 52.6133 40.4518 53.7638 40.4518C54.8761 40.4518 55.4727 41.3595 55.4727 42.7274C55.4727 44.1038 54.8633 45.0413 53.7638 45.0413Z",fill:"white",fillOpacity:"0.35"}),/*#__PURE__*/x.default.createElement("g",{clipPath:"url(#clip0_2183_35036)"},/*#__PURE__*/x.default.createElement("path",{d:"M19.5998 19.9927H38.3927C40.7673 19.9927 41.9924 18.8037 41.9924 16.5215V3.47133C41.9924 1.1892 40.7673 0.00012207 38.3927 0.00012207H19.5998C17.2251 0.00012207 16 1.17443 16 3.47133V16.5215C16 18.8037 17.2251 19.9927 19.5998 19.9927ZM19.7283 17.8953C19.5129 17.9222 19.294 17.9003 19.0886 17.8313C18.8832 17.7623 18.6969 17.648 18.544 17.4973C18.3911 17.3466 18.2759 17.1635 18.2072 16.9623C18.1385 16.761 18.1181 16.547 18.1478 16.3369V3.64857C18.1197 3.43872 18.1411 3.22539 18.2104 3.02486C18.2796 2.82432 18.3949 2.6419 18.5474 2.49154C18.6999 2.34118 18.8856 2.22684 19.0903 2.15729C19.295 2.08774 19.5132 2.06481 19.7283 2.09024H38.2641C38.4792 2.06481 38.6975 2.08774 38.9022 2.15729C39.1068 2.22684 39.2925 2.34118 39.445 2.49154C39.5975 2.6419 39.7128 2.82432 39.7821 3.02486C39.8513 3.22539 39.8728 3.43872 39.8447 3.64857V16.3369C39.8728 16.5468 39.8513 16.7601 39.7821 16.9606C39.7128 17.1612 39.5975 17.3436 39.445 17.494C39.2925 17.6443 39.1068 17.7586 38.9022 17.8282C38.6975 17.8977 38.4792 17.9207 38.2641 17.8953H19.7283ZM24.5759 9.93366C24.9027 9.92527 25.2245 9.85291 25.5221 9.72085C25.8197 9.58879 26.0872 9.39974 26.3086 9.16488C26.5301 8.93003 26.701 8.65415 26.8112 8.3536C26.9215 8.05305 26.9689 7.73395 26.9505 7.41519C26.9123 6.96482 26.7407 6.53505 26.4565 6.1784C26.1723 5.82175 25.7879 5.55367 25.3502 5.40689C24.9125 5.26012 24.4405 5.24101 23.9919 5.3519C23.5433 5.46279 23.1375 5.69889 22.8241 6.03133C22.5106 6.36378 22.3031 6.77819 22.2269 7.22393C22.1506 7.66967 22.2089 8.12746 22.3947 8.54135C22.5805 8.95524 22.8858 9.3073 23.2731 9.55456C23.6605 9.80182 24.1132 9.93355 24.5759 9.93366ZM31.6091 6.54371H37.3112C37.4038 6.54577 37.4958 6.52936 37.5817 6.49548C37.6676 6.46159 37.7455 6.41095 37.8106 6.34665C37.8757 6.28235 37.9268 6.20575 37.9605 6.12153C37.9943 6.03731 38.0101 5.94725 38.007 5.85686C38.008 5.76802 37.9907 5.67989 37.9559 5.5978C37.9211 5.51571 37.8697 5.44134 37.8047 5.37922C37.7396 5.31709 37.6624 5.2685 37.5776 5.23634C37.4927 5.20419 37.4021 5.18914 37.3112 5.19214H31.6469C31.556 5.18914 31.4654 5.20419 31.3806 5.23634C31.2958 5.2685 31.2185 5.31709 31.1535 5.37922C31.0885 5.44134 31.037 5.51571 31.0022 5.5978C30.9674 5.67989 30.9501 5.76802 30.9511 5.85686C30.948 5.94725 30.9638 6.03731 30.9976 6.12153C31.0313 6.20575 31.0824 6.28235 31.1475 6.34665C31.2126 6.41095 31.2905 6.46159 31.3764 6.49548C31.4623 6.52936 31.5543 6.54577 31.6469 6.54371H31.6091ZM31.6091 10.6796H37.3112C37.4957 10.6796 37.6727 10.608 37.8032 10.4806C37.9337 10.3532 38.007 10.1803 38.007 10.0001C38.007 9.81992 37.9337 9.64709 37.8032 9.51967C37.6727 9.39224 37.4957 9.32065 37.3112 9.32065H31.6469C31.4624 9.32065 31.2854 9.39224 31.1549 9.51967C31.0245 9.64709 30.9511 9.81992 30.9511 10.0001C30.9511 10.1803 31.0245 10.3532 31.1549 10.4806C31.2854 10.608 31.4624 10.6796 31.6469 10.6796H31.6091ZM20.4392 14.8081H28.7126C28.796 14.8129 28.8794 14.7998 28.9571 14.7699C29.0347 14.74 29.1048 14.6939 29.1624 14.6349C29.22 14.5758 29.2637 14.5052 29.2905 14.428C29.3173 14.3508 29.3265 14.2688 29.3176 14.1877C29.3176 13.1907 27.8051 10.6501 24.5759 10.6501C21.3467 10.6501 19.8494 13.1907 19.8494 14.1877C19.8394 14.2678 19.8473 14.3489 19.8728 14.4256C19.8983 14.5023 19.9406 14.5726 19.9967 14.6317C20.0529 14.6908 20.1216 14.7372 20.198 14.7677C20.2745 14.7981 20.3567 14.8119 20.4392 14.8081ZM31.6091 14.8081H37.3112C37.4021 14.8111 37.4927 14.7961 37.5776 14.7639C37.6624 14.7318 37.7396 14.6832 37.8047 14.621C37.8697 14.5589 37.9211 14.4846 37.9559 14.4025C37.9907 14.3204 38.008 14.2322 38.007 14.1434C38.009 14.0529 37.9925 13.963 37.9584 13.8789C37.9243 13.7947 37.8734 13.718 37.8086 13.6534C37.7438 13.5887 37.6664 13.5373 37.581 13.5023C37.4956 13.4672 37.4039 13.4492 37.3112 13.4492H31.6469C31.5542 13.4492 31.4625 13.4672 31.3771 13.5023C31.2917 13.5373 31.2143 13.5887 31.1495 13.6534C31.0847 13.718 31.0338 13.7947 30.9997 13.8789C30.9656 13.963 30.9491 14.0529 30.9511 14.1434C30.9501 14.2322 30.9674 14.3204 31.0022 14.4025C31.037 14.4846 31.0885 14.5589 31.1535 14.621C31.2185 14.6832 31.2958 14.7318 31.3806 14.7639C31.4654 14.7961 31.556 14.8111 31.6469 14.8081H31.6091Z",fill:"white",fillOpacity:"0.35"})),/*#__PURE__*/x.default.createElement("defs",null,/*#__PURE__*/x.default.createElement("clipPath",{id:"clip0_2183_35036"},/*#__PURE__*/x.default.createElement("rect",{width:"26",height:"20",fill:"white",transform:"translate(16 0.00012207)"}))))},Rl=function(){return x.default.createElement("svg",{width:"98",height:"50",viewBox:"0 0 98 50",fill:"none",xmlns:"http://www.w3.org/2000/svg"},/*#__PURE__*/x.default.createElement("g",{opacity:"0.25"},/*#__PURE__*/x.default.createElement("path",{d:"M66.8428 0.85791C66.2106 2.00303 65.7681 3.21177 65.3888 4.48413C64.883 4.54775 64.4405 4.61136 63.998 4.67498C63.5555 4.80222 63.0497 4.92945 62.6072 5.05669C61.8486 4.0388 61.0267 3.08453 60.0784 2.19388C59.4463 2.51197 58.8141 2.83006 58.1819 3.27539C58.3716 4.54774 58.6876 5.8201 59.1302 7.09246C58.7509 7.41055 58.4348 7.72864 58.1187 8.11034C57.8026 8.49205 57.4865 8.81014 57.2336 9.25547C56.0325 8.87376 54.7681 8.55567 53.5038 8.42843C53.1245 9.06461 52.8716 9.76441 52.6187 10.4006C53.5038 11.3549 54.5153 12.1819 55.59 12.8817C55.3371 13.8359 55.2107 14.7902 55.2739 15.7445C54.0727 16.1262 52.8716 16.6351 51.7969 17.2713C51.8601 17.9711 51.9865 18.7345 52.2394 19.4343C53.5038 19.6888 54.8313 19.7524 56.0957 19.6888C56.2854 20.1341 56.475 20.5794 56.7279 20.9611C56.9808 21.4065 57.2336 21.7882 57.4865 22.1699C56.7279 23.1878 56.0957 24.3329 55.5267 25.478C56.0325 25.987 56.5382 26.4959 57.1072 26.9412C58.2451 26.3687 59.383 25.6689 60.3945 24.8418C60.7738 25.0963 61.2164 25.3508 61.6589 25.5416C62.1014 25.7325 62.544 25.9233 62.9865 26.0506C62.9865 27.3229 63.1129 28.5953 63.3658 29.8676C64.0612 29.9949 64.8198 30.1221 65.5152 30.1221C66.1474 28.977 66.5899 27.7683 66.9692 26.4959C67.475 26.4323 67.9175 26.3687 68.36 26.305C68.8026 26.1778 69.3083 26.0506 69.7508 25.9233C70.5094 26.9412 71.3313 27.8955 72.2796 28.7861C72.9117 28.4681 73.5439 28.15 74.1761 27.7046C73.9864 26.4323 73.6704 25.1599 73.2278 23.8876C73.6071 23.5695 73.9232 23.2514 74.2393 22.8697C74.5554 22.488 74.8715 22.1699 75.1244 21.7246C76.3255 22.1063 77.5899 22.4244 78.8543 22.5516C79.2336 21.9154 79.4864 21.2156 79.7393 20.5794C78.8542 19.6252 77.8428 18.7981 76.7681 18.0983C77.0209 17.1441 77.1474 16.1898 77.0841 15.2355C78.2853 14.8538 79.4864 14.3449 80.5611 13.7087C80.4979 13.0089 80.3715 12.2455 80.1186 11.5457C78.8543 11.2912 77.5267 11.2276 76.2623 11.2912C76.0727 10.8459 75.883 10.4006 75.6301 10.0189C75.3773 9.57355 75.1244 9.19185 74.8715 8.81014C75.6301 7.79225 76.2623 6.64713 76.8313 5.50201C76.3255 4.99307 75.8198 4.48413 75.2508 4.0388C74.1129 4.61136 72.975 5.31116 71.9635 6.13819C71.5842 5.88372 71.1416 5.62925 70.6991 5.4384C70.2566 5.24754 69.8141 5.05669 69.3715 4.92945C69.3715 3.6571 69.2451 2.38474 68.9922 1.11238C68.2336 0.985147 67.5382 0.85791 66.8428 0.85791ZM68.929 9.25547C72.3428 10.8459 73.7968 14.8538 72.2796 18.2256C71.3945 20.1977 69.6244 21.5973 67.5382 22.0427C66.1474 22.2971 64.6934 22.1699 63.429 21.5973C60.0152 20.0069 58.5612 15.999 60.0784 12.6272C60.9635 10.6551 62.7336 9.25546 64.8198 8.81014C66.2106 8.49205 67.6646 8.6829 68.929 9.25547Z",fill:"white"}),/*#__PURE__*/x.default.createElement("path",{d:"M6.03298 22.8689L5.02149 29.2307H0.722656L5.4008 1.55695H11.0904L15.7054 29.2307H11.3433L10.395 22.8689H6.03298ZM8.1824 7.85511L6.66517 18.7974H9.76286L8.1824 7.85511Z",fill:"white"}),/*#__PURE__*/x.default.createElement("path",{d:"M23.861 1.49487L29.361 20.0713V1.49487H33.5334V29.1686H29.1081L23.4185 11.4193V29.1686H19.2461V1.49487H23.861Z",fill:"white"}),/*#__PURE__*/x.default.createElement("path",{d:"M50.2261 22.5524C50.2261 24.3337 49.5307 25.9878 48.3295 27.1965C47.1284 28.4688 45.4847 29.1686 43.7146 29.1686H37.2031V1.49487H43.7146C45.4847 1.49487 47.1284 2.19467 48.3295 3.46703C49.5939 4.67577 50.2261 6.39345 50.2261 8.11113V22.5524ZM41.3123 25.0971H43.7778C44.41 25.0971 45.0422 24.8426 45.4215 24.3973C45.864 23.952 46.1169 23.3158 46.1169 22.6796V8.17475C46.1169 7.53857 45.864 6.90239 45.4215 6.45707C44.979 6.01174 44.41 5.75727 43.7778 5.75727H41.3123V25.0971Z",fill:"white"}),/*#__PURE__*/x.default.createElement("path",{d:"M4.83183 49.0815C2.55598 49.0815 0.722656 47.2366 0.722656 45.01C0.722656 45.01 0.722656 45.01 0.722656 44.9464V35.5309C0.722656 33.2407 2.49276 31.3958 4.76862 31.3322C7.04447 31.2685 8.8778 33.1135 8.94101 35.4037C8.94101 35.4673 8.94101 35.4673 8.94101 35.5309V37.5031H6.28585V35.4673C6.28585 34.6403 5.59045 33.9405 4.76862 33.9405C4.38931 33.9405 4.01 34.0677 3.69391 34.3858C3.44104 34.6403 3.25138 35.022 3.25138 35.4673V44.9464C3.25138 45.7734 3.88356 46.4096 4.7054 46.4096C5.08471 46.4096 5.46402 46.2824 5.78011 45.9643C6.0962 45.7098 6.22263 45.3281 6.22263 44.8828V42.5289H8.94101V44.9464C8.94101 47.2366 7.10769 49.0815 4.83183 49.0815Z",fill:"white"}),/*#__PURE__*/x.default.createElement("path",{d:"M30.1227 48.8867H23.1055V31.6463H25.6974V46.342H30.1859L30.1227 48.8867Z",fill:"white"}),/*#__PURE__*/x.default.createElement("path",{d:"M48.0115 31.4559C50.2874 31.4559 52.1207 33.3009 52.1207 35.5911V45.0065C52.1207 47.2968 50.2874 49.1417 48.0115 49.1417C46.9368 49.1417 45.8621 48.6964 45.1035 47.933C44.3449 47.1696 43.9023 46.088 43.9023 45.0065V35.5911C43.9023 33.3009 45.7357 31.4559 48.0115 31.4559ZM49.4023 35.5275C49.4023 34.7004 48.7701 34.0643 47.9483 34.0643C47.569 34.0643 47.1897 34.1915 46.8736 34.5096C46.5575 34.7641 46.4311 35.1458 46.4311 35.5911V45.0065C46.4311 45.3883 46.5575 45.77 46.8736 46.0244C47.1265 46.2789 47.5058 46.4698 47.9483 46.4698C48.7701 46.4698 49.4023 45.8336 49.4023 45.0065V35.5275Z",fill:"white"}),/*#__PURE__*/x.default.createElement("path",{d:"M70.4451 49.0776C68.2325 49.0776 66.3992 47.2963 66.3359 45.0061V31.6463H68.8647V45.0061C68.8647 45.3878 68.9911 45.7695 69.3072 46.0876C69.5601 46.342 69.9394 46.5329 70.3819 46.5329C71.2037 46.5329 71.8359 45.8967 71.8359 45.0697V31.7099H74.5543V45.0697C74.5543 46.1512 74.1118 47.2327 73.3531 47.9961C72.5945 48.6959 71.583 49.1412 70.4451 49.0776Z",fill:"white"}),/*#__PURE__*/x.default.createElement("path",{d:"M97.0021 44.7516C97.0021 45.8331 96.5595 46.9146 95.8009 47.678C95.0423 48.4414 94.0308 48.8867 92.9561 48.8867H88.9102V31.6463H92.9561C94.0308 31.6463 95.1055 32.0916 95.8009 32.855C96.5595 33.6185 97.0021 34.7 97.0021 35.7815V44.7516ZM91.5021 46.342H93.0826C93.4619 46.342 93.8412 46.2148 94.094 45.8967C94.3469 45.6422 94.5366 45.2605 94.5366 44.8152V35.7815C94.5366 35.3998 94.4101 35.018 94.094 34.7C93.8412 34.4455 93.4619 34.2546 93.0826 34.2546H91.5021V46.342Z",fill:"white"}),/*#__PURE__*/x.default.createElement("path",{d:"M87.2555 1.49487L92.7555 20.0713V1.49487H96.9279V29.1686H92.5027L86.813 11.4193V29.1686H82.6406V1.49487H87.2555Z",fill:"white"})))},Dl=function(t){var e=t.subtitle,n=t.onCancel;return x.default.createElement(A.default,{open:t.open,onClose:n,disableEscapeKeyDown:!0,"data-testid":t["data-testid"]||"ac-sdk-login-modal"},/*#__PURE__*/x.default.createElement(O.default,null,/*#__PURE__*/x.default.createElement(kl,{title:void 0!==e?e:Wc.translations.loginCardSubtitle,scope:t.scope,redirectPath:t.redirectPath,onSuccess:t.onSuccess,onFailure:t.onFailure,onCancel:n,storeSession:t.storeSession})))};Dl.propTypes={title:c.PropTypes.string,subtitle:c.PropTypes.string,scope:c.PropTypes.string,redirectPath:c.PropTypes.string,onSuccess:c.PropTypes.func,onFailure:c.PropTypes.func,onCancel:c.PropTypes.func,storeSession:c.PropTypes.bool},Dl.defaultProps={redirectPath:"/",storeSession:!1};var Nl=o.observer(Dl),Il=function(t){var e=t.isOpen,r=t.title,i=t.subtitle,s=t.scope,a=t.redirectPath,o=t.onSuccess,c=t.onFailure,l=t.onCancel,u=t.storeSession,d=void 0===u||u,p=n.useState(e),h=p[0],f=p[1];return n.useEffect(function(){f(e)},[e]),/*#__PURE__*/x.default.createElement(Nl,{open:h,title:r,subtitle:i,scope:s,redirectPath:a,onSuccess:function(t){o&&"function"==typeof o&&o(t),f(!1)},onFailure:c,onCancel:function(){l&&"function"==typeof l&&l(),f(!1)},storeSession:d})},Al=function(t,e){void 0===e&&(e={});var n=_l(),r=n.loginUrl,i=n.clientId,s=n.grantType,a=n.redirectUri,o=n.redirectPath,c=ul(Il,Yc({scope:t},e))[0],l=encodeURIComponent(a+"?next="+(e.redirectPath||o));return"password"===s?function(){c({key:(new Date).getTime()})}:function(){window.location.assign(r+"?response_type=code&client_id="+i+"&redirect_uri="+l+"&scope="+t)}},Ol=function(t){var e=t.position,i=t.scrolled,s=t.showAcLogo,a=t.leadingText,o=t.title,c=t.titleStyles,l=t.navProps,u=t.userProps,d=t.menuProps,p=t.styles,h=t["data-testid"],f=_l().baseUrl,_=Yc({items:[]},l).items,m=Yc({show:!0,showCompanyLogo:!1},u),g=m.show,y=m.showCompanyLogo,v=Yc({items:[],buttonColor:"white",dropdownStyles:{},styles:{}},d),b=v.items,E=v.buttonColor,S=v.dropdownStyles,w=v.styles,k=n.useState(new Date),T=k[0],C=k[1],R=n.useState(null),D=R[0],N=R[1],I=function(t){var e=t.titleStyles,n=t.menuStyles,r=t.menuDropdownStyles;return{root:Yc({padding:"10px 0",color:"rgba(255,255,255,0.85)",background:"transparent"},t.styles),title:Yc({flexGrow:1},e),nav:{marginRight:"10px"},user:{},userInfo:{marginLeft:"0.5em",color:"rgba(255,255,255,0.5)"},button:{height:"50px",marginRight:"10px",fontSize:"16px",fontWeight:600,backgroundColor:"rgba(79, 79, 79, 1)",boxShadow:"0px 2px 5px rgba(0, 0, 0, 0.28)",borderRadius:"4px","&:hover":{backgroundColor:"rgba(79, 79, 79, 1)",filter:"brightness(1.1)"}},loginButton:{padding:"6px 18px"},logoutButton:{paddingRight:"18px"},menu:Yc({marginTop:"70px",backgroundColor:"rgba(0,0,0,0.5)"},n,{"& .MuiPaper-root":Yc({minWidth:"20%",backgroundColor:"#2d2d2d",color:"white"},r)})}}({styles:p,titleStyles:c,menuStyles:w,menuDropdownStyles:S}),A=r.useNavigate();n.useEffect(function(){var t=setInterval(function(){C(new Date)},1e3);return function(){return clearInterval(t)}});var O,B,H=function(){N(null)},M=function(t){t.url?A(t.url):t.action&&"function"==typeof t.action&&t.action(),H()};return x.default.createElement($.default,{position:e,elevation:0,sx:Yc({},I.root,"static"===e?{marginTop:"-70px"}:{},i?{background:"#1E1E1E"}:{}),"data-testid":h||"ac-sdk-header"},/*#__PURE__*/x.default.createElement(j.default,{variant:"dense"},s&&/*#__PURE__*/x.default.createElement(r.Link,{to:"/"},/*#__PURE__*/x.default.createElement("img",{src:V.default,alt:"AndonCloud",style:{display:"block",marginLeft:"-4px"}})),a&&/*#__PURE__*/x.default.createElement(q.default,{variant:"subtitle1"},a),/*#__PURE__*/x.default.createElement(q.default,{variant:"subtitle1",align:"center",style:{flexGrow:1},sx:I.title},o),_&&/*#__PURE__*/x.default.createElement(U.default,{display:"flex",sx:I.nav},_.map(function(t){return x.default.createElement(z.default,{key:t.label,onClick:function(){return M(t)},endIcon:t.icon,sx:I.button},t.label)})),g&&/*#__PURE__*/x.default.createElement(U.default,{display:"flex",sx:I.user},el.getCurrentUserJS?/*#__PURE__*/x.default.createElement(z.default,{id:"logout-button",onClick:function(){try{return Promise.resolve(sl.logout()).then(function(){A("/")})}catch(t){return Promise.reject(t)}},sx:Yc({},I.button,I.logoutButton),"data-testid":"ac-sdk-header-logout-button"},Wc.translations.headerLogoutButton,y&&(B=function(){var t="",e=el.getCurrentUserJS;return null===e?t:f+"/"+(t=e.company.logo_url)}(),/*#__PURE__*/x.default.createElement("img",{src:B,alt:""})),/*#__PURE__*/x.default.createElement(U.default,{display:"inline-block",sx:I.userInfo},(O=el.currentUser)&&"("+O.name+")")):/*#__PURE__*/x.default.createElement(z.default,{id:"login-button",onClick:function(){return A("/login")},sx:Yc({},I.button,I.loginButton),"data-testid":"ac-sdk-header-login-button"},Wc.translations.headerLoginButton)),/*#__PURE__*/x.default.createElement(P.default,null),/*#__PURE__*/x.default.createElement(q.default,{variant:"body1",align:"center",style:{width:"5rem",padding:"0 5px"}},T.toLocaleTimeString()),b&&/*#__PURE__*/x.default.createElement(U.default,null,/*#__PURE__*/x.default.createElement(G.default,{onClick:function(t){N(t.currentTarget)}},/*#__PURE__*/x.default.createElement(L.default,{style:E?{color:E}:{}})),/*#__PURE__*/x.default.createElement(Y.default,{id:"menu-appbar",marginThreshold:0,anchorEl:D,anchorOrigin:{vertical:"top",horizontal:"right"},keepMounted:!0,transformOrigin:{vertical:"top",horizontal:"right"},open:Boolean(D),onClose:H,sx:I.menu},b.map(function(t){return x.default.createElement(F.default,{key:t.label,onClick:function(){return M(t)}},t.label)})))))};Ol.propTypes={position:c.PropTypes.string,scrolled:c.PropTypes.bool,showAcLogo:c.PropTypes.bool,leadingText:c.PropTypes.string,title:c.PropTypes.string,titleStyles:c.PropTypes.any,navProps:c.PropTypes.shape({items:c.PropTypes.any}),userProps:c.PropTypes.shape({show:c.PropTypes.bool,showCompanyLogo:c.PropTypes.bool}),menuProps:c.PropTypes.shape({items:c.PropTypes.any,buttonColor:c.PropTypes.string,dropdownStyles:c.PropTypes.any,styles:c.PropTypes.any}),styles:c.PropTypes.any},Ol.defaultProps={navProps:{},userProps:{},menuProps:{},styles:{}};var Ul=o.observer(Ol),Bl=function(t){var e=t.children,r=t.headerProps,i=t.styles,s=t["data-testid"],a=n.useState(),o=a[1],c=d.useScrollTrigger({disableHysteresis:!0,target:a[0],threshold:0});return x.default.createElement(M.default,{ref:function(t){t&&o(t)},maxWidth:!1,disableGutters:!0,sx:Yc({},dl.root,i),"data-testid":s||"ac-sdk-container"},/*#__PURE__*/x.default.createElement(Ul,Yc({scrolled:c,showAcLogo:!0},r)),e,/*#__PURE__*/x.default.createElement(d.Box,{sx:dl.overlay}))};Bl.propTypes={children:c.PropTypes.any,headerProps:c.PropTypes.shape({position:c.PropTypes.string,showAcLogo:c.PropTypes.bool,leadingText:c.PropTypes.string.isRequired,title:c.PropTypes.string,navProps:c.PropTypes.shape({items:c.PropTypes.any}),userProps:c.PropTypes.shape({show:c.PropTypes.bool,showCompanyLogo:c.PropTypes.bool}),menuProps:c.PropTypes.shape({items:c.PropTypes.any,buttonColor:c.PropTypes.string,dropdownStyles:c.PropTypes.any,styles:c.PropTypes.any}),styles:c.PropTypes.any}),styles:c.PropTypes.any},Bl.defaultProps={headerProps:{}};var Hl=function(t){return x.default.createElement(Bl,{headerProps:{position:"static",leadingText:"AndonCloud Software",userProps:{show:!1},menuProps:{items:[{label:Wc.translations.changeLanguageText,action:function(){Wc.setLocale("pl"===Wc.locale?"en":"pl")}}],buttonColor:"white"}}},/*#__PURE__*/x.default.createElement(U.default,{display:"flex",height:"100%",alignItems:"center",justifyContent:"center"},/*#__PURE__*/x.default.createElement(B.default,{sx:{borderRadius:"20px"}},/*#__PURE__*/x.default.createElement(H.default,null,/*#__PURE__*/x.default.createElement(kl,{title:Wc.translations.loginFormText,redirectPath:t.redirectPath})))))};Hl.propTypes={redirectPath:c.PropTypes.string},Hl.defaultProps={redirectPath:"/"};var Ml=o.observer(Hl),Pl=function(){var t=_l(),e=t.grantType,n=t.redirectPath,i=Al("read write"),s=r.useNavigate();return"password"===e?/*#__PURE__*/x.default.createElement(Ml,{redirectPath:n}):(s("/"),i(),null)},Ll=function(t){if(!(Uc&&Bc&&Hc&&Mc&&Pc&&Lc))return("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.warn(`reactRouterV6Instrumentation was unable to wrap Routes because of one or more missing parameters.\n useEffect: ${Uc}. useLocation: ${Bc}. useNavigationType: ${Hc}.\n createRoutesFromChildren: ${Mc}. matchRoutes: ${Pc}. customStartTransaction: ${Lc}.`),t;let e=!0;const n=n=>{const r=Bc(),i=Hc();return Uc(()=>{const t=Mc(n.children);e?(function(t,e,n){const r=Array.isArray(n)?n:Pc(e,t);Oc&&r&&Oc.setName(...Gc(e,t,r))}(r,t),e=!1):function(t,e,n,r){const i=Array.isArray(r)?r:Pc(e,t);if($c&&("PUSH"===n||"POP"===n)&&i){Oc&&Oc.finish();const[n,r]=Gc(e,t,i);Oc=Lc({name:n,op:"navigation",tags:zc,metadata:{source:r}})}}(r,t,i)},[r,i]),C.createElement(t,{...n,__self:this,__source:{fileName:"/home/runner/work/sentry-javascript/sentry-javascript/packages/react/src/reactrouterv6.tsx",lineNumber:197}})};return Rc(n,t),n}(r.Routes),$l=function(t){return x.default.createElement(r.BrowserRouter,null,/*#__PURE__*/x.default.createElement(Ll,null,t.children,/*#__PURE__*/x.default.createElement(r.Route,{exact:!0,path:"/login",element:/*#__PURE__*/x.default.createElement(Pl,null)}),/*#__PURE__*/x.default.createElement(r.Route,{path:"/oauth2/redirect",element:/*#__PURE__*/x.default.createElement(El,null)})))},zl=o.observer(function(t){var e=t.children,i=t.baseUrl,s=t.authProps,o=t.sentryProps,c=t.muiTheme,l=al().status,u=Yc({enabled:!0,redirectPath:"/"},s),d=u.enabled;return sl.setAuthConfig({baseUrl:i,clientId:u.clientId,redirectUri:u.redirectUri}),n.useEffect(function(){var t,e,i,s,a,c;!ml.sentryReady&&o&&((t=Yc({tracesSampleRate:1,replaysSessionSampleRate:.1,replaysOnErrorSampleRate:1,integrations:[new Fc.BrowserTracing({routingInstrumentation:(e=n.useEffect,i=r.useLocation,s=r.useNavigationType,a=r.createRoutesFromChildren,c=r.matchRoutes,(t,n=!0,r=!0)=>{const o=Vr&&Vr.location&&Vr.location.pathname;n&&o&&(Oc=t({name:o,op:"pageload",tags:zc,metadata:{source:"url"}})),Uc=e,Bc=i,Hc=s,Pc=c,Mc=a,Lc=t,$c=r})}),new Oo]},o))._metadata=t._metadata||{},t._metadata.sdk=t._metadata.sdk||{name:"sentry.javascript.react",packages:[{name:"npm:@sentry/react",version:zr}],version:zr},function(t={}){void 0===t.defaultIntegrations&&(t.defaultIntegrations=Yi),void 0===t.release&&("string"==typeof __SENTRY_RELEASE__&&(t.release=__SENTRY_RELEASE__),Vr.SENTRY_RELEASE&&Vr.SENTRY_RELEASE.id&&(t.release=Vr.SENTRY_RELEASE.id)),void 0===t.autoSessionTracking&&(t.autoSessionTracking=!0),void 0===t.sendClientReports&&(t.sendClientReports=!0);const e={...t,stackParser:(n=t.stackParser||Ei,Array.isArray(n)?Le(...n):n),integrations:Nr(t),transport:t.transport||(Ye()?pi:hi)};var n;!function(t,e){!0===e.debug&&("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__?ke.enable():console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle."));const n=or();n.getScope().update(e.initialScope);const r=new t(e);n.bindClient(r)}(ui,e),t.autoSessionTracking&&function(){if(void 0===Vr.document)return void(("undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__)&&ke.warn("Session tracking in non-browser environment with @sentry/browser is not supported."));const t=or();t.captureSession&&(ji(t),Xe("history",({from:t,to:e})=>{void 0!==t&&t!==e&&ji(or())}))}()}(t),ml.setSentryReady())},[ml,ml.sentryReady,o]),n.useEffect(function(){d?function(){try{var t=function(){if(d)return Promise.resolve(sl.recover()).then(function(){})}();return Promise.resolve(t&&t.then?t.then(function(){}):void 0)}catch(t){return Promise.reject(t)}}():ml.setAppReady()},[ml,d]),n.useEffect(function(){d&&"unknown"!==l&&ml.setAppReady()},[ml,d,l]),/*#__PURE__*/x.default.createElement(a.ThemeProvider,{theme:a.createTheme(c)},/*#__PURE__*/x.default.createElement(R.default,null),/*#__PURE__*/x.default.createElement(D.default,{styles:{"::-webkit-scrollbar":{width:"6px"},"::-webkit-scrollbar-track":{backgroundColor:"transparent"},"::-webkit-scrollbar-thumb":{borderRadius:"3px",backgroundColor:"rgba(255, 255, 255, 0.25)"}}}),/*#__PURE__*/x.default.createElement(Ac,{fallback:function(t){return x.default.createElement(pl,t)}},/*#__PURE__*/x.default.createElement(Vt,null),/*#__PURE__*/x.default.createElement(fl,{config:Yc({baseUrl:i},s)},sl.networkError?/*#__PURE__*/x.default.createElement(bl,{error:sl.networkError}):ml.appReady?/*#__PURE__*/x.default.createElement($l,null,/*#__PURE__*/x.default.createElement(r.Route,{path:"*",element:/*#__PURE__*/x.default.createElement(cl,null,e)})):/*#__PURE__*/x.default.createElement(vl,{"data-testid":"ac-sdk-app-loading",width:"500px"}))))});zl.propTypes={children:c.PropTypes.any.isRequired,baseUrl:c.PropTypes.string.isRequired,authProps:c.PropTypes.shape({enabled:c.PropTypes.bool,loginUrl:c.PropTypes.string,redirectUri:c.PropTypes.string,redirectPath:c.PropTypes.string,clientId:c.PropTypes.string.isRequired,grantType:c.PropTypes.string}),sentryProps:c.PropTypes.any,muiTheme:c.PropTypes.any},zl.defaultProps={authProps:{},sentryProps:{},muiTheme:yl};var Gl=function(t,e){const n=t.displayName||t.name||"unknown",r=e=>C.createElement(Nc,{name:n,updateProps:e,__self:this,__source:{fileName:Dc,lineNumber:146}},C.createElement(t,{...e,__self:this,__source:{fileName:Dc,lineNumber:147}}));return r.displayName=`profiler(${n})`,Rc(r,t),r}(zl),Yl=Boolean("localhost"===window.location.hostname||"[::1]"===window.location.hostname||window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/));function Fl(t,e,n,r){navigator.serviceWorker.register(t).then(function(t){var i=null;r&&setInterval(function(){fetch("/manifest.json").then(function(e){try{return Promise.resolve(e.json()).then(function(e){var r=e.version;n!==r&&(i=r,t.update())})}catch(t){return Promise.reject(t)}}).catch(function(){})},3e4),t.onupdatefound=function(){var n=t.installing;null!=n&&(n.onstatechange=function(){"installed"===n.state&&(navigator.serviceWorker.controller?(console.log("New content is available and will be used when all tabs for this page are closed. See https://cra.link/PWA."),e&&e.onUpdate&&(r?e.onUpdate(t,i):e.onUpdate(t))):(console.log("Content is cached for offline use."),e&&e.onSuccess&&e.onSuccess(t)))})}}).catch(function(t){console.error("Error during service worker registration:",t)})}e.App=Gl,e.Container=Bl,e.captureException=Cr,e.fetch=tl,e.getLocale=function(){return Wc.locale},e.logout=function(){return sl.logout()},e.notify=Zt,e.registerServiceWorker=function(t){var e=t.version;!function(t){var e=t.publicUrl,n=t.mode,r=t.autoUpdate,i=t.version,s=t.registrationConfig;if(globalThis.version=i,"production"===n&&"serviceWorker"in navigator){if(new URL(e,window.location.href).origin!==window.location.origin)return;window.addEventListener("load",function(){var t=e+"/service-worker.js";Yl?(function(t,e){fetch(t,{headers:{"Service-Worker":"script"}}).then(function(n){var r=n.headers.get("content-type");404===n.status||null!=r&&-1===r.indexOf("javascript")?navigator.serviceWorker.ready.then(function(t){t.unregister().then(function(){window.location.reload()})}):Fl(t,e)}).catch(function(){console.log("No internet connection found. App is running in offline mode.")})}(t,s),navigator.serviceWorker.ready.then(function(){console.log("This web app is being served cache-first by a service worker. To learn more, visit https://cra.link/PWA")})):Fl(t,s,i,r)})}}(Yc({},t,{registrationConfig:Yc({},(null==t?void 0:t.registrationConfig)||{},{onUpdate:function(n,r){var i,s;n&&n.waiting&&n.waiting.postMessage({type:"SKIP_WAITING"}),r&&e!==r&&(Zt(Wc.translations.newVersionAvailable,{duration:5e3,position:"bottom-left",style:{color:"rgba(255,255,255,0.85)",background:"#3F3F3F",border:"1px solid #FFE72F"}}),setTimeout(function(){window.location.reload()},5e3)),null!=(i=t.registrationConfig)&&i.onUpdate&&(null==(s=t.registrationConfig)||s.onUpdate(n))}})}))},e.setLocale=function(t){return Wc.setLocale(t)},e.useLogin=Al,e.useLoginStatus=al}),md5=createCommonjsModule(function(module){(function(){var ERROR="input is invalid type",WINDOW="object"==typeof window,root=WINDOW?window:{};root.JS_MD5_NO_WINDOW&&(WINDOW=!1);var WEB_WORKER=!WINDOW&&"object"==typeof self,NODE_JS=!root.JS_MD5_NO_NODE_JS&&"object"==typeof process&&process.versions&&process.versions.node;NODE_JS?root=commonjsGlobal:WEB_WORKER&&(root=self);var COMMON_JS=!root.JS_MD5_NO_COMMON_JS&&module.exports,ARRAY_BUFFER=!root.JS_MD5_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,HEX_CHARS="0123456789abcdef".split(""),EXTRA=[128,32768,8388608,-2147483648],SHIFT=[0,8,16,24],OUTPUT_TYPES=["hex","array","digest","buffer","arrayBuffer","base64"],BASE64_ENCODE_CHAR="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),blocks=[],buffer8;if(ARRAY_BUFFER){var buffer=new ArrayBuffer(68);buffer8=new Uint8Array(buffer),blocks=new Uint32Array(buffer)}!root.JS_MD5_NO_NODE_JS&&Array.isArray||(Array.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)}),!ARRAY_BUFFER||!root.JS_MD5_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(t){return"object"==typeof t&&t.buffer&&t.buffer.constructor===ArrayBuffer});var createOutputMethod=function(t){return function(e){return new Md5(!0).update(e)[t]()}},createMethod=function(){var t=createOutputMethod("hex");NODE_JS&&(t=nodeWrap(t)),t.create=function(){return new Md5},t.update=function(e){return t.create().update(e)};for(var e=0;e<OUTPUT_TYPES.length;++e){var n=OUTPUT_TYPES[e];t[n]=createOutputMethod(n)}return t},nodeWrap=function(method){var crypto=eval("require('crypto')"),Buffer=eval("require('buffer').Buffer"),nodeMethod=function(t){if("string"==typeof t)return crypto.createHash("md5").update(t,"utf8").digest("hex");if(null==t)throw ERROR;return t.constructor===ArrayBuffer&&(t=new Uint8Array(t)),Array.isArray(t)||ArrayBuffer.isView(t)||t.constructor===Buffer?crypto.createHash("md5").update(new Buffer(t)).digest("hex"):method(t)};return nodeMethod};function Md5(t){if(t)blocks[0]=blocks[16]=blocks[1]=blocks[2]=blocks[3]=blocks[4]=blocks[5]=blocks[6]=blocks[7]=blocks[8]=blocks[9]=blocks[10]=blocks[11]=blocks[12]=blocks[13]=blocks[14]=blocks[15]=0,this.blocks=blocks,this.buffer8=buffer8;else if(ARRAY_BUFFER){var e=new ArrayBuffer(68);this.buffer8=new Uint8Array(e),this.blocks=new Uint32Array(e)}else this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.h0=this.h1=this.h2=this.h3=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0}Md5.prototype.update=function(t){if(!this.finalized){var e,n=typeof t;if("string"!==n){if("object"!==n)throw ERROR;if(null===t)throw ERROR;if(ARRAY_BUFFER&&t.constructor===ArrayBuffer)t=new Uint8Array(t);else if(!(Array.isArray(t)||ARRAY_BUFFER&&ArrayBuffer.isView(t)))throw ERROR;e=!0}for(var r,i,s=0,a=t.length,o=this.blocks,c=this.buffer8;s<a;){if(this.hashed&&(this.hashed=!1,o[0]=o[16],o[16]=o[1]=o[2]=o[3]=o[4]=o[5]=o[6]=o[7]=o[8]=o[9]=o[10]=o[11]=o[12]=o[13]=o[14]=o[15]=0),e)if(ARRAY_BUFFER)for(i=this.start;s<a&&i<64;++s)c[i++]=t[s];else for(i=this.start;s<a&&i<64;++s)o[i>>2]|=t[s]<<SHIFT[3&i++];else if(ARRAY_BUFFER)for(i=this.start;s<a&&i<64;++s)(r=t.charCodeAt(s))<128?c[i++]=r:r<2048?(c[i++]=192|r>>6,c[i++]=128|63&r):r<55296||r>=57344?(c[i++]=224|r>>12,c[i++]=128|r>>6&63,c[i++]=128|63&r):(r=65536+((1023&r)<<10|1023&t.charCodeAt(++s)),c[i++]=240|r>>18,c[i++]=128|r>>12&63,c[i++]=128|r>>6&63,c[i++]=128|63&r);else for(i=this.start;s<a&&i<64;++s)(r=t.charCodeAt(s))<128?o[i>>2]|=r<<SHIFT[3&i++]:r<2048?(o[i>>2]|=(192|r>>6)<<SHIFT[3&i++],o[i>>2]|=(128|63&r)<<SHIFT[3&i++]):r<55296||r>=57344?(o[i>>2]|=(224|r>>12)<<SHIFT[3&i++],o[i>>2]|=(128|r>>6&63)<<SHIFT[3&i++],o[i>>2]|=(128|63&r)<<SHIFT[3&i++]):(r=65536+((1023&r)<<10|1023&t.charCodeAt(++s)),o[i>>2]|=(240|r>>18)<<SHIFT[3&i++],o[i>>2]|=(128|r>>12&63)<<SHIFT[3&i++],o[i>>2]|=(128|r>>6&63)<<SHIFT[3&i++],o[i>>2]|=(128|63&r)<<SHIFT[3&i++]);this.lastByteIndex=i,this.bytes+=i-this.start,i>=64?(this.start=i-64,this.hash(),this.hashed=!0):this.start=i}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this}},Md5.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var t=this.blocks,e=this.lastByteIndex;t[e>>2]|=EXTRA[3&e],e>=56&&(this.hashed||this.hash(),t[0]=t[16],t[16]=t[1]=t[2]=t[3]=t[4]=t[5]=t[6]=t[7]=t[8]=t[9]=t[10]=t[11]=t[12]=t[13]=t[14]=t[15]=0),t[14]=this.bytes<<3,t[15]=this.hBytes<<3|this.bytes>>>29,this.hash()}},Md5.prototype.hash=function(){var t,e,n,r,i,s,a=this.blocks;this.first?e=((e=((t=((t=a[0]-680876937)<<7|t>>>25)-271733879<<0)^(n=((n=(-271733879^(r=((r=(-1732584194^2004318071&t)+a[1]-117830708)<<12|r>>>20)+t<<0)&(-271733879^t))+a[2]-1126478375)<<17|n>>>15)+r<<0)&(r^t))+a[3]-1316259209)<<22|e>>>10)+n<<0:(t=this.h0,e=this.h1,e=((e+=((t=((t+=((r=this.h3)^e&((n=this.h2)^r))+a[0]-680876936)<<7|t>>>25)+e<<0)^(n=((n+=(e^(r=((r+=(n^t&(e^n))+a[1]-389564586)<<12|r>>>20)+t<<0)&(t^e))+a[2]+606105819)<<17|n>>>15)+r<<0)&(r^t))+a[3]-1044525330)<<22|e>>>10)+n<<0),e=((e+=((t=((t+=(r^e&(n^r))+a[4]-176418897)<<7|t>>>25)+e<<0)^(n=((n+=(e^(r=((r+=(n^t&(e^n))+a[5]+1200080426)<<12|r>>>20)+t<<0)&(t^e))+a[6]-1473231341)<<17|n>>>15)+r<<0)&(r^t))+a[7]-45705983)<<22|e>>>10)+n<<0,e=((e+=((t=((t+=(r^e&(n^r))+a[8]+1770035416)<<7|t>>>25)+e<<0)^(n=((n+=(e^(r=((r+=(n^t&(e^n))+a[9]-1958414417)<<12|r>>>20)+t<<0)&(t^e))+a[10]-42063)<<17|n>>>15)+r<<0)&(r^t))+a[11]-1990404162)<<22|e>>>10)+n<<0,e=((e+=((t=((t+=(r^e&(n^r))+a[12]+1804603682)<<7|t>>>25)+e<<0)^(n=((n+=(e^(r=((r+=(n^t&(e^n))+a[13]-40341101)<<12|r>>>20)+t<<0)&(t^e))+a[14]-1502002290)<<17|n>>>15)+r<<0)&(r^t))+a[15]+1236535329)<<22|e>>>10)+n<<0,e=((e+=((r=((r+=(e^n&((t=((t+=(n^r&(e^n))+a[1]-165796510)<<5|t>>>27)+e<<0)^e))+a[6]-1069501632)<<9|r>>>23)+t<<0)^t&((n=((n+=(t^e&(r^t))+a[11]+643717713)<<14|n>>>18)+r<<0)^r))+a[0]-373897302)<<20|e>>>12)+n<<0,e=((e+=((r=((r+=(e^n&((t=((t+=(n^r&(e^n))+a[5]-701558691)<<5|t>>>27)+e<<0)^e))+a[10]+38016083)<<9|r>>>23)+t<<0)^t&((n=((n+=(t^e&(r^t))+a[15]-660478335)<<14|n>>>18)+r<<0)^r))+a[4]-405537848)<<20|e>>>12)+n<<0,e=((e+=((r=((r+=(e^n&((t=((t+=(n^r&(e^n))+a[9]+568446438)<<5|t>>>27)+e<<0)^e))+a[14]-1019803690)<<9|r>>>23)+t<<0)^t&((n=((n+=(t^e&(r^t))+a[3]-187363961)<<14|n>>>18)+r<<0)^r))+a[8]+1163531501)<<20|e>>>12)+n<<0,e=((e+=((r=((r+=(e^n&((t=((t+=(n^r&(e^n))+a[13]-1444681467)<<5|t>>>27)+e<<0)^e))+a[2]-51403784)<<9|r>>>23)+t<<0)^t&((n=((n+=(t^e&(r^t))+a[7]+1735328473)<<14|n>>>18)+r<<0)^r))+a[12]-1926607734)<<20|e>>>12)+n<<0,e=((e+=((s=(r=((r+=((i=e^n)^(t=((t+=(i^r)+a[5]-378558)<<4|t>>>28)+e<<0))+a[8]-2022574463)<<11|r>>>21)+t<<0)^t)^(n=((n+=(s^e)+a[11]+1839030562)<<16|n>>>16)+r<<0))+a[14]-35309556)<<23|e>>>9)+n<<0,e=((e+=((s=(r=((r+=((i=e^n)^(t=((t+=(i^r)+a[1]-1530992060)<<4|t>>>28)+e<<0))+a[4]+1272893353)<<11|r>>>21)+t<<0)^t)^(n=((n+=(s^e)+a[7]-155497632)<<16|n>>>16)+r<<0))+a[10]-1094730640)<<23|e>>>9)+n<<0,e=((e+=((s=(r=((r+=((i=e^n)^(t=((t+=(i^r)+a[13]+681279174)<<4|t>>>28)+e<<0))+a[0]-358537222)<<11|r>>>21)+t<<0)^t)^(n=((n+=(s^e)+a[3]-722521979)<<16|n>>>16)+r<<0))+a[6]+76029189)<<23|e>>>9)+n<<0,e=((e+=((s=(r=((r+=((i=e^n)^(t=((t+=(i^r)+a[9]-640364487)<<4|t>>>28)+e<<0))+a[12]-421815835)<<11|r>>>21)+t<<0)^t)^(n=((n+=(s^e)+a[15]+530742520)<<16|n>>>16)+r<<0))+a[2]-995338651)<<23|e>>>9)+n<<0,e=((e+=((r=((r+=(e^((t=((t+=(n^(e|~r))+a[0]-198630844)<<6|t>>>26)+e<<0)|~n))+a[7]+1126891415)<<10|r>>>22)+t<<0)^((n=((n+=(t^(r|~e))+a[14]-1416354905)<<15|n>>>17)+r<<0)|~t))+a[5]-57434055)<<21|e>>>11)+n<<0,e=((e+=((r=((r+=(e^((t=((t+=(n^(e|~r))+a[12]+1700485571)<<6|t>>>26)+e<<0)|~n))+a[3]-1894986606)<<10|r>>>22)+t<<0)^((n=((n+=(t^(r|~e))+a[10]-1051523)<<15|n>>>17)+r<<0)|~t))+a[1]-2054922799)<<21|e>>>11)+n<<0,e=((e+=((r=((r+=(e^((t=((t+=(n^(e|~r))+a[8]+1873313359)<<6|t>>>26)+e<<0)|~n))+a[15]-30611744)<<10|r>>>22)+t<<0)^((n=((n+=(t^(r|~e))+a[6]-1560198380)<<15|n>>>17)+r<<0)|~t))+a[13]+1309151649)<<21|e>>>11)+n<<0,e=((e+=((r=((r+=(e^((t=((t+=(n^(e|~r))+a[4]-145523070)<<6|t>>>26)+e<<0)|~n))+a[11]-1120210379)<<10|r>>>22)+t<<0)^((n=((n+=(t^(r|~e))+a[2]+718787259)<<15|n>>>17)+r<<0)|~t))+a[9]-343485551)<<21|e>>>11)+n<<0,this.first?(this.h0=t+1732584193<<0,this.h1=e-271733879<<0,this.h2=n-1732584194<<0,this.h3=r+271733878<<0,this.first=!1):(this.h0=this.h0+t<<0,this.h1=this.h1+e<<0,this.h2=this.h2+n<<0,this.h3=this.h3+r<<0)},Md5.prototype.hex=function(){this.finalize();var t=this.h0,e=this.h1,n=this.h2,r=this.h3;return HEX_CHARS[t>>4&15]+HEX_CHARS[15&t]+HEX_CHARS[t>>12&15]+HEX_CHARS[t>>8&15]+HEX_CHARS[t>>20&15]+HEX_CHARS[t>>16&15]+HEX_CHARS[t>>28&15]+HEX_CHARS[t>>24&15]+HEX_CHARS[e>>4&15]+HEX_CHARS[15&e]+HEX_CHARS[e>>12&15]+HEX_CHARS[e>>8&15]+HEX_CHARS[e>>20&15]+HEX_CHARS[e>>16&15]+HEX_CHARS[e>>28&15]+HEX_CHARS[e>>24&15]+HEX_CHARS[n>>4&15]+HEX_CHARS[15&n]+HEX_CHARS[n>>12&15]+HEX_CHARS[n>>8&15]+HEX_CHARS[n>>20&15]+HEX_CHARS[n>>16&15]+HEX_CHARS[n>>28&15]+HEX_CHARS[n>>24&15]+HEX_CHARS[r>>4&15]+HEX_CHARS[15&r]+HEX_CHARS[r>>12&15]+HEX_CHARS[r>>8&15]+HEX_CHARS[r>>20&15]+HEX_CHARS[r>>16&15]+HEX_CHARS[r>>28&15]+HEX_CHARS[r>>24&15]},Md5.prototype.toString=Md5.prototype.hex,Md5.prototype.digest=function(){this.finalize();var t=this.h0,e=this.h1,n=this.h2,r=this.h3;return[255&t,t>>8&255,t>>16&255,t>>24&255,255&e,e>>8&255,e>>16&255,e>>24&255,255&n,n>>8&255,n>>16&255,n>>24&255,255&r,r>>8&255,r>>16&255,r>>24&255]},Md5.prototype.array=Md5.prototype.digest,Md5.prototype.arrayBuffer=function(){this.finalize();var t=new ArrayBuffer(16),e=new Uint32Array(t);return e[0]=this.h0,e[1]=this.h1,e[2]=this.h2,e[3]=this.h3,t},Md5.prototype.buffer=Md5.prototype.arrayBuffer,Md5.prototype.base64=function(){for(var t,e,n,r="",i=this.array(),s=0;s<15;)t=i[s++],e=i[s++],n=i[s++],r+=BASE64_ENCODE_CHAR[t>>>2]+BASE64_ENCODE_CHAR[63&(t<<4|e>>>4)]+BASE64_ENCODE_CHAR[63&(e<<2|n>>>6)]+BASE64_ENCODE_CHAR[63&n];return r+(BASE64_ENCODE_CHAR[(t=i[s])>>>2]+BASE64_ENCODE_CHAR[t<<4&63]+"==")};var exports=createMethod();COMMON_JS?module.exports=exports:root.md5=exports})()}),sha1=createCommonjsModule(function(module){(function(){var root="object"==typeof window?window:{},NODE_JS=!root.JS_SHA1_NO_NODE_JS&&"object"==typeof process&&process.versions&&process.versions.node;NODE_JS&&(root=commonjsGlobal);var COMMON_JS=!root.JS_SHA1_NO_COMMON_JS&&module.exports,HEX_CHARS="0123456789abcdef".split(""),EXTRA=[-2147483648,8388608,32768,128],SHIFT=[24,16,8,0],OUTPUT_TYPES=["hex","array","digest","arrayBuffer"],blocks=[],createOutputMethod=function(t){return function(e){return new Sha1(!0).update(e)[t]()}},createMethod=function(){var t=createOutputMethod("hex");NODE_JS&&(t=nodeWrap(t)),t.create=function(){return new Sha1},t.update=function(e){return t.create().update(e)};for(var e=0;e<OUTPUT_TYPES.length;++e){var n=OUTPUT_TYPES[e];t[n]=createOutputMethod(n)}return t},nodeWrap=function(method){var crypto=eval("require('crypto')"),Buffer=eval("require('buffer').Buffer"),nodeMethod=function(t){if("string"==typeof t)return crypto.createHash("sha1").update(t,"utf8").digest("hex");if(t.constructor===ArrayBuffer)t=new Uint8Array(t);else if(void 0===t.length)return method(t);return crypto.createHash("sha1").update(new Buffer(t)).digest("hex")};return nodeMethod};function Sha1(t){t?(blocks[0]=blocks[16]=blocks[1]=blocks[2]=blocks[3]=blocks[4]=blocks[5]=blocks[6]=blocks[7]=blocks[8]=blocks[9]=blocks[10]=blocks[11]=blocks[12]=blocks[13]=blocks[14]=blocks[15]=0,this.blocks=blocks):this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.h0=1732584193,this.h1=4023233417,this.h2=2562383102,this.h3=271733878,this.h4=3285377520,this.block=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0}Sha1.prototype.update=function(t){if(!this.finalized){var e="string"!=typeof t;e&&t.constructor===root.ArrayBuffer&&(t=new Uint8Array(t));for(var n,r,i=0,s=t.length||0,a=this.blocks;i<s;){if(this.hashed&&(this.hashed=!1,a[0]=this.block,a[16]=a[1]=a[2]=a[3]=a[4]=a[5]=a[6]=a[7]=a[8]=a[9]=a[10]=a[11]=a[12]=a[13]=a[14]=a[15]=0),e)for(r=this.start;i<s&&r<64;++i)a[r>>2]|=t[i]<<SHIFT[3&r++];else for(r=this.start;i<s&&r<64;++i)(n=t.charCodeAt(i))<128?a[r>>2]|=n<<SHIFT[3&r++]:n<2048?(a[r>>2]|=(192|n>>6)<<SHIFT[3&r++],a[r>>2]|=(128|63&n)<<SHIFT[3&r++]):n<55296||n>=57344?(a[r>>2]|=(224|n>>12)<<SHIFT[3&r++],a[r>>2]|=(128|n>>6&63)<<SHIFT[3&r++],a[r>>2]|=(128|63&n)<<SHIFT[3&r++]):(n=65536+((1023&n)<<10|1023&t.charCodeAt(++i)),a[r>>2]|=(240|n>>18)<<SHIFT[3&r++],a[r>>2]|=(128|n>>12&63)<<SHIFT[3&r++],a[r>>2]|=(128|n>>6&63)<<SHIFT[3&r++],a[r>>2]|=(128|63&n)<<SHIFT[3&r++]);this.lastByteIndex=r,this.bytes+=r-this.start,r>=64?(this.block=a[16],this.start=r-64,this.hash(),this.hashed=!0):this.start=r}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this}},Sha1.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var t=this.blocks,e=this.lastByteIndex;t[16]=this.block,t[e>>2]|=EXTRA[3&e],this.block=t[16],e>=56&&(this.hashed||this.hash(),t[0]=this.block,t[16]=t[1]=t[2]=t[3]=t[4]=t[5]=t[6]=t[7]=t[8]=t[9]=t[10]=t[11]=t[12]=t[13]=t[14]=t[15]=0),t[14]=this.hBytes<<3|this.bytes>>>29,t[15]=this.bytes<<3,this.hash()}},Sha1.prototype.hash=function(){var t,e,n=this.h0,r=this.h1,i=this.h2,s=this.h3,a=this.h4,o=this.blocks;for(t=16;t<80;++t)o[t]=(e=o[t-3]^o[t-8]^o[t-14]^o[t-16])<<1|e>>>31;for(t=0;t<20;t+=5)n=(e=(r=(e=(i=(e=(s=(e=(a=(e=n<<5|n>>>27)+(r&i|~r&s)+a+1518500249+o[t]<<0)<<5|a>>>27)+(n&(r=r<<30|r>>>2)|~n&i)+s+1518500249+o[t+1]<<0)<<5|s>>>27)+(a&(n=n<<30|n>>>2)|~a&r)+i+1518500249+o[t+2]<<0)<<5|i>>>27)+(s&(a=a<<30|a>>>2)|~s&n)+r+1518500249+o[t+3]<<0)<<5|r>>>27)+(i&(s=s<<30|s>>>2)|~i&a)+n+1518500249+o[t+4]<<0,i=i<<30|i>>>2;for(;t<40;t+=5)n=(e=(r=(e=(i=(e=(s=(e=(a=(e=n<<5|n>>>27)+(r^i^s)+a+1859775393+o[t]<<0)<<5|a>>>27)+(n^(r=r<<30|r>>>2)^i)+s+1859775393+o[t+1]<<0)<<5|s>>>27)+(a^(n=n<<30|n>>>2)^r)+i+1859775393+o[t+2]<<0)<<5|i>>>27)+(s^(a=a<<30|a>>>2)^n)+r+1859775393+o[t+3]<<0)<<5|r>>>27)+(i^(s=s<<30|s>>>2)^a)+n+1859775393+o[t+4]<<0,i=i<<30|i>>>2;for(;t<60;t+=5)n=(e=(r=(e=(i=(e=(s=(e=(a=(e=n<<5|n>>>27)+(r&i|r&s|i&s)+a-1894007588+o[t]<<0)<<5|a>>>27)+(n&(r=r<<30|r>>>2)|n&i|r&i)+s-1894007588+o[t+1]<<0)<<5|s>>>27)+(a&(n=n<<30|n>>>2)|a&r|n&r)+i-1894007588+o[t+2]<<0)<<5|i>>>27)+(s&(a=a<<30|a>>>2)|s&n|a&n)+r-1894007588+o[t+3]<<0)<<5|r>>>27)+(i&(s=s<<30|s>>>2)|i&a|s&a)+n-1894007588+o[t+4]<<0,i=i<<30|i>>>2;for(;t<80;t+=5)n=(e=(r=(e=(i=(e=(s=(e=(a=(e=n<<5|n>>>27)+(r^i^s)+a-899497514+o[t]<<0)<<5|a>>>27)+(n^(r=r<<30|r>>>2)^i)+s-899497514+o[t+1]<<0)<<5|s>>>27)+(a^(n=n<<30|n>>>2)^r)+i-899497514+o[t+2]<<0)<<5|i>>>27)+(s^(a=a<<30|a>>>2)^n)+r-899497514+o[t+3]<<0)<<5|r>>>27)+(i^(s=s<<30|s>>>2)^a)+n-899497514+o[t+4]<<0,i=i<<30|i>>>2;this.h0=this.h0+n<<0,this.h1=this.h1+r<<0,this.h2=this.h2+i<<0,this.h3=this.h3+s<<0,this.h4=this.h4+a<<0},Sha1.prototype.hex=function(){this.finalize();var t=this.h0,e=this.h1,n=this.h2,r=this.h3,i=this.h4;return HEX_CHARS[t>>28&15]+HEX_CHARS[t>>24&15]+HEX_CHARS[t>>20&15]+HEX_CHARS[t>>16&15]+HEX_CHARS[t>>12&15]+HEX_CHARS[t>>8&15]+HEX_CHARS[t>>4&15]+HEX_CHARS[15&t]+HEX_CHARS[e>>28&15]+HEX_CHARS[e>>24&15]+HEX_CHARS[e>>20&15]+HEX_CHARS[e>>16&15]+HEX_CHARS[e>>12&15]+HEX_CHARS[e>>8&15]+HEX_CHARS[e>>4&15]+HEX_CHARS[15&e]+HEX_CHARS[n>>28&15]+HEX_CHARS[n>>24&15]+HEX_CHARS[n>>20&15]+HEX_CHARS[n>>16&15]+HEX_CHARS[n>>12&15]+HEX_CHARS[n>>8&15]+HEX_CHARS[n>>4&15]+HEX_CHARS[15&n]+HEX_CHARS[r>>28&15]+HEX_CHARS[r>>24&15]+HEX_CHARS[r>>20&15]+HEX_CHARS[r>>16&15]+HEX_CHARS[r>>12&15]+HEX_CHARS[r>>8&15]+HEX_CHARS[r>>4&15]+HEX_CHARS[15&r]+HEX_CHARS[i>>28&15]+HEX_CHARS[i>>24&15]+HEX_CHARS[i>>20&15]+HEX_CHARS[i>>16&15]+HEX_CHARS[i>>12&15]+HEX_CHARS[i>>8&15]+HEX_CHARS[i>>4&15]+HEX_CHARS[15&i]},Sha1.prototype.toString=Sha1.prototype.hex,Sha1.prototype.digest=function(){this.finalize();var t=this.h0,e=this.h1,n=this.h2,r=this.h3,i=this.h4;return[t>>24&255,t>>16&255,t>>8&255,255&t,e>>24&255,e>>16&255,e>>8&255,255&e,n>>24&255,n>>16&255,n>>8&255,255&n,r>>24&255,r>>16&255,r>>8&255,255&r,i>>24&255,i>>16&255,i>>8&255,255&i]},Sha1.prototype.array=Sha1.prototype.digest,Sha1.prototype.arrayBuffer=function(){this.finalize();var t=new ArrayBuffer(20),e=new DataView(t);return e.setUint32(0,this.h0),e.setUint32(4,this.h1),e.setUint32(8,this.h2),e.setUint32(12,this.h3),e.setUint32(16,this.h4),t};var exports=createMethod();COMMON_JS?module.exports=exports:root.sha1=exports})()}),HEX_DIGITS="0123456789abcdef".split(""),UUID_LENGTH=36,UUID_REGEXP=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-5][0-9a-f]{3}-[089ab][0-9a-f]{3}-[0-9a-f]{12}$/i,HEX_TO_BYTE_MAP=function(){for(var t={},e=0;e<256;e++){var n=e.toString(16);t[1===n.length?"0"+n:n]=e}return t}(),uint8ToHex=function(t){var e=t>>4;return HEX_DIGITS[e]+HEX_DIGITS[t-(e<<4)]},uint8ArrayToHex=function(t){for(var e="",n=0;n<t.length;n++)e+=uint8ToHex(t[n]);return e},stringToCharBuffer=function(t){for(var e=unescape(encodeURIComponent(t)),n=new Uint8Array(e.length),r=0;r<e.length;r++)n[r]=e[r].charCodeAt(0);return n},md5Hash=function(t){return new Uint8Array(md5.arrayBuffer(t))},sha1Hash=function(t){return new Uint8Array(sha1.arrayBuffer(t))},concatBuffers=function(t,e){var n=new Uint8Array(t.length+e.length);return n.set(new Uint8Array(t),0),n.set(new Uint8Array(e),t.byteLength),n},validateUuid=function(t){return"string"==typeof t&&t.length===UUID_LENGTH&&UUID_REGEXP.test(t)},parseUuid=function(t){if(!validateUuid(t))throw TypeError("Invalid UUID");for(var e=new Uint8Array(16),n=0,r=0;n<t.length;)if("-"!==t[n]){var i=(t[n]+t[n+1]).toLowerCase();e[r]=HEX_TO_BYTE_MAP[i],r++,n+=2}else n++;return e},hashToUuid=function(t,e){return uint8ArrayToHex(t.slice(0,4))+"-"+uint8ArrayToHex(t.slice(4,6))+"-"+uint8ToHex(15&t[6]|parseInt(10*e,16))+uint8ToHex(t[7])+"-"+uint8ToHex(63&t[8]|128)+uint8ToHex(t[9])+"-"+uint8ArrayToHex(t.slice(10,16))},lib={uint8ToHex:uint8ToHex,uint8ArrayToHex:uint8ArrayToHex,stringToCharBuffer:stringToCharBuffer,md5Hash:md5Hash,sha1Hash:sha1Hash,concatBuffers:concatBuffers,validateUuid:validateUuid,parseUuid:parseUuid,hashToUuid:hashToUuid},EMPTY_UINT8_ARRAY=new Uint8Array(0);function generateUuid(t,e,n){if("string"!=typeof t)throw TypeError("Value must be string");if("number"==typeof e)return generateUuid(t,void 0,e);if(null==n)return generateUuid(t,e,5);if(3!==n&&5!==n)throw TypeError("Version of UUID can be only 3 or 5");var r=lib.stringToCharBuffer(t),i="string"==typeof e?lib.parseUuid(e):EMPTY_UINT8_ARRAY,s=lib.concatBuffers(i,r),a=3===n?lib.md5Hash(s):lib.sha1Hash(s);return lib.hashToUuid(a,n)}var src=generateUuid,ReactGridLayout=RGL.WidthProvider(RGL__default.default),Dashboard=function(t){var e=t.apiUrl,n=t.lang,r=t.widgetName,i=t.widgetDisplayName,s=t.widgetWidth,a=t.widgetHeight,o=t.Widget,c=t.editMode,l=andoncloudSdk.useLoginStatus().authResponse,u=React.useState(!1),d=u[0],p=u[1],h=src(r);return React__default.default.createElement(ReactGridLayout,{className:"layout",layout:[{i:h,x:0,y:0,w:s||3,h:a||4}],draggableHandle:".draggable-handle"},(null==l?void 0:l.accessToken)&&React__default.default.createElement(andoncloudDashboardToolkit.WidgetCard,{key:h,Widget:o,title:i(n),id:h,url:e,token:l.accessToken,lang:n,openSettingsModal:d,onSettingsModalOpened:function(){return p(!0)},onSettingsModalClosed:function(){return p(!1)},editMode:c}))},routes=function(t,e){return[{path:"/",element:t?React__default.default.createElement(Dashboard,{apiUrl:e.apiUrl,lang:e.lang,widgetName:e.widgetName,widgetDisplayName:e.widgetDisplayName,widgetWidth:e.widgetWidth,widgetHeight:e.widgetHeight,Widget:e.Widget,editMode:e.editMode}):React__default.default.createElement(require$$1.Navigate,{to:"/login"})}]},Routing=function(t){var e=andoncloudSdk.useLoginStatus();return require$$1.useRoutes(routes("connected"===e.status,t))},WidgetPreview=function(t){var e=t.baseUrl,n=t.apiUrl,r=t.widgetName,i=t.widgetDisplayName,s=t.widgetWidth,a=t.widgetHeight,o=t.Widget,c=React.useState("pl"),l=c[0],u=c[1],d=React.useState(!0),p=d[0],h=d[1],f=[{label:p?"pl"===l?"Wyłącz tryb edycji":"Turn off edit mode":"pl"===l?"Włącz tryb edycji":"Turn on edit mode",action:function(){return h(function(t){return!t})}},{label:"pl"===l?"Change language to English":"Zmień język na Polski",action:function(){var t="pl"===l?"en":"pl";u(t),andoncloudSdk.setLocale(t)}}],_={position:"static",leadingText:i(l),menuProps:{items:f,buttonColor:"white"}};return React__default.default.createElement(andoncloudSdk.App,{baseUrl:e,authProps:{redirectPath:"/",clientId:"sample-app-client-id",grantType:"password"}},React__default.default.createElement(andoncloudSdk.Container,{headerProps:_},React__default.default.createElement(Routing,{apiUrl:n,lang:l,widgetName:r,widgetDisplayName:i,widgetWidth:s,widgetHeight:a,Widget:o,editMode:p})))};exports.WidgetPreview=WidgetPreview;
|
|
1
|
+
var i18n=require("i18next"),React=require("react"),andoncloudSdk=require("andoncloud-sdk"),reactRouterDom=require("react-router-dom");require("react-grid-layout/css/styles.css");var RGL=require("react-grid-layout"),andoncloudDashboardToolkit=require("andoncloud-dashboard-toolkit");function _interopDefaultLegacy(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var i18n__default=/*#__PURE__*/_interopDefaultLegacy(i18n),React__default=/*#__PURE__*/_interopDefaultLegacy(React),RGL__default=/*#__PURE__*/_interopDefaultLegacy(RGL);function _typeof(t){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_typeof(t)}function _toPrimitive(t,e){if("object"!==_typeof(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,e||"default");if("object"!==_typeof(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}function _toPropertyKey(t){var e=_toPrimitive(t,"string");return"symbol"===_typeof(e)?e:String(e)}function _defineProperty(t,e,r){return(e=_toPropertyKey(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var matchHtmlEntity=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,htmlEntities={"&":"&","&":"&","<":"<","<":"<",">":">",">":">","'":"'","'":"'",""":'"',""":'"'," ":" "," ":" ","©":"©","©":"©","®":"®","®":"®","…":"…","…":"…","/":"/","/":"/"},unescapeHtmlEntity=function(t){return htmlEntities[t]},unescape$1=function(t){return t.replace(matchHtmlEntity,unescapeHtmlEntity)};function ownKeys(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r.push.apply(r,i)}return r}function _objectSpread(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ownKeys(Object(r),!0).forEach(function(e){_defineProperty(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ownKeys(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}var defaultOptions={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:unescape$1};function setDefaults(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};defaultOptions=_objectSpread(_objectSpread({},defaultOptions),t)}var initReactI18next={type:"3rdParty",init:function(t){setDefaults(t.options.react)}},en={},pl={},resources={en:{translation:en},pl:{translation:pl}};i18n__default.default.use(initReactI18next).init({resources:resources,lng:"pl",interpolation:{escapeValue:!1}});var commonjsGlobal="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function createCommonjsModule(t){var e={exports:{}};return t(e,e.exports),e.exports}var md5=createCommonjsModule(function(module){(function(){var ERROR="input is invalid type",WINDOW="object"==typeof window,root=WINDOW?window:{};root.JS_MD5_NO_WINDOW&&(WINDOW=!1);var WEB_WORKER=!WINDOW&&"object"==typeof self,NODE_JS=!root.JS_MD5_NO_NODE_JS&&"object"==typeof process&&process.versions&&process.versions.node;NODE_JS?root=commonjsGlobal:WEB_WORKER&&(root=self);var COMMON_JS=!root.JS_MD5_NO_COMMON_JS&&module.exports,ARRAY_BUFFER=!root.JS_MD5_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,HEX_CHARS="0123456789abcdef".split(""),EXTRA=[128,32768,8388608,-2147483648],SHIFT=[0,8,16,24],OUTPUT_TYPES=["hex","array","digest","buffer","arrayBuffer","base64"],BASE64_ENCODE_CHAR="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split(""),blocks=[],buffer8;if(ARRAY_BUFFER){var buffer=new ArrayBuffer(68);buffer8=new Uint8Array(buffer),blocks=new Uint32Array(buffer)}!root.JS_MD5_NO_NODE_JS&&Array.isArray||(Array.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)}),!ARRAY_BUFFER||!root.JS_MD5_NO_ARRAY_BUFFER_IS_VIEW&&ArrayBuffer.isView||(ArrayBuffer.isView=function(t){return"object"==typeof t&&t.buffer&&t.buffer.constructor===ArrayBuffer});var createOutputMethod=function(t){return function(e){return new Md5(!0).update(e)[t]()}},createMethod=function(){var t=createOutputMethod("hex");NODE_JS&&(t=nodeWrap(t)),t.create=function(){return new Md5},t.update=function(e){return t.create().update(e)};for(var e=0;e<OUTPUT_TYPES.length;++e){var r=OUTPUT_TYPES[e];t[r]=createOutputMethod(r)}return t},nodeWrap=function(method){var crypto=eval("require('crypto')"),Buffer=eval("require('buffer').Buffer"),nodeMethod=function(t){if("string"==typeof t)return crypto.createHash("md5").update(t,"utf8").digest("hex");if(null==t)throw ERROR;return t.constructor===ArrayBuffer&&(t=new Uint8Array(t)),Array.isArray(t)||ArrayBuffer.isView(t)||t.constructor===Buffer?crypto.createHash("md5").update(new Buffer(t)).digest("hex"):method(t)};return nodeMethod};function Md5(t){if(t)blocks[0]=blocks[16]=blocks[1]=blocks[2]=blocks[3]=blocks[4]=blocks[5]=blocks[6]=blocks[7]=blocks[8]=blocks[9]=blocks[10]=blocks[11]=blocks[12]=blocks[13]=blocks[14]=blocks[15]=0,this.blocks=blocks,this.buffer8=buffer8;else if(ARRAY_BUFFER){var e=new ArrayBuffer(68);this.buffer8=new Uint8Array(e),this.blocks=new Uint32Array(e)}else this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0];this.h0=this.h1=this.h2=this.h3=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0}Md5.prototype.update=function(t){if(!this.finalized){var e,r=typeof t;if("string"!==r){if("object"!==r)throw ERROR;if(null===t)throw ERROR;if(ARRAY_BUFFER&&t.constructor===ArrayBuffer)t=new Uint8Array(t);else if(!(Array.isArray(t)||ARRAY_BUFFER&&ArrayBuffer.isView(t)))throw ERROR;e=!0}for(var i,o,n=0,s=t.length,a=this.blocks,h=this.buffer8;n<s;){if(this.hashed&&(this.hashed=!1,a[0]=a[16],a[16]=a[1]=a[2]=a[3]=a[4]=a[5]=a[6]=a[7]=a[8]=a[9]=a[10]=a[11]=a[12]=a[13]=a[14]=a[15]=0),e)if(ARRAY_BUFFER)for(o=this.start;n<s&&o<64;++n)h[o++]=t[n];else for(o=this.start;n<s&&o<64;++n)a[o>>2]|=t[n]<<SHIFT[3&o++];else if(ARRAY_BUFFER)for(o=this.start;n<s&&o<64;++n)(i=t.charCodeAt(n))<128?h[o++]=i:i<2048?(h[o++]=192|i>>6,h[o++]=128|63&i):i<55296||i>=57344?(h[o++]=224|i>>12,h[o++]=128|i>>6&63,h[o++]=128|63&i):(i=65536+((1023&i)<<10|1023&t.charCodeAt(++n)),h[o++]=240|i>>18,h[o++]=128|i>>12&63,h[o++]=128|i>>6&63,h[o++]=128|63&i);else for(o=this.start;n<s&&o<64;++n)(i=t.charCodeAt(n))<128?a[o>>2]|=i<<SHIFT[3&o++]:i<2048?(a[o>>2]|=(192|i>>6)<<SHIFT[3&o++],a[o>>2]|=(128|63&i)<<SHIFT[3&o++]):i<55296||i>=57344?(a[o>>2]|=(224|i>>12)<<SHIFT[3&o++],a[o>>2]|=(128|i>>6&63)<<SHIFT[3&o++],a[o>>2]|=(128|63&i)<<SHIFT[3&o++]):(i=65536+((1023&i)<<10|1023&t.charCodeAt(++n)),a[o>>2]|=(240|i>>18)<<SHIFT[3&o++],a[o>>2]|=(128|i>>12&63)<<SHIFT[3&o++],a[o>>2]|=(128|i>>6&63)<<SHIFT[3&o++],a[o>>2]|=(128|63&i)<<SHIFT[3&o++]);this.lastByteIndex=o,this.bytes+=o-this.start,o>=64?(this.start=o-64,this.hash(),this.hashed=!0):this.start=o}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this}},Md5.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var t=this.blocks,e=this.lastByteIndex;t[e>>2]|=EXTRA[3&e],e>=56&&(this.hashed||this.hash(),t[0]=t[16],t[16]=t[1]=t[2]=t[3]=t[4]=t[5]=t[6]=t[7]=t[8]=t[9]=t[10]=t[11]=t[12]=t[13]=t[14]=t[15]=0),t[14]=this.bytes<<3,t[15]=this.hBytes<<3|this.bytes>>>29,this.hash()}},Md5.prototype.hash=function(){var t,e,r,i,o,n,s=this.blocks;this.first?e=((e=((t=((t=s[0]-680876937)<<7|t>>>25)-271733879<<0)^(r=((r=(-271733879^(i=((i=(-1732584194^2004318071&t)+s[1]-117830708)<<12|i>>>20)+t<<0)&(-271733879^t))+s[2]-1126478375)<<17|r>>>15)+i<<0)&(i^t))+s[3]-1316259209)<<22|e>>>10)+r<<0:(t=this.h0,e=this.h1,e=((e+=((t=((t+=((i=this.h3)^e&((r=this.h2)^i))+s[0]-680876936)<<7|t>>>25)+e<<0)^(r=((r+=(e^(i=((i+=(r^t&(e^r))+s[1]-389564586)<<12|i>>>20)+t<<0)&(t^e))+s[2]+606105819)<<17|r>>>15)+i<<0)&(i^t))+s[3]-1044525330)<<22|e>>>10)+r<<0),e=((e+=((t=((t+=(i^e&(r^i))+s[4]-176418897)<<7|t>>>25)+e<<0)^(r=((r+=(e^(i=((i+=(r^t&(e^r))+s[5]+1200080426)<<12|i>>>20)+t<<0)&(t^e))+s[6]-1473231341)<<17|r>>>15)+i<<0)&(i^t))+s[7]-45705983)<<22|e>>>10)+r<<0,e=((e+=((t=((t+=(i^e&(r^i))+s[8]+1770035416)<<7|t>>>25)+e<<0)^(r=((r+=(e^(i=((i+=(r^t&(e^r))+s[9]-1958414417)<<12|i>>>20)+t<<0)&(t^e))+s[10]-42063)<<17|r>>>15)+i<<0)&(i^t))+s[11]-1990404162)<<22|e>>>10)+r<<0,e=((e+=((t=((t+=(i^e&(r^i))+s[12]+1804603682)<<7|t>>>25)+e<<0)^(r=((r+=(e^(i=((i+=(r^t&(e^r))+s[13]-40341101)<<12|i>>>20)+t<<0)&(t^e))+s[14]-1502002290)<<17|r>>>15)+i<<0)&(i^t))+s[15]+1236535329)<<22|e>>>10)+r<<0,e=((e+=((i=((i+=(e^r&((t=((t+=(r^i&(e^r))+s[1]-165796510)<<5|t>>>27)+e<<0)^e))+s[6]-1069501632)<<9|i>>>23)+t<<0)^t&((r=((r+=(t^e&(i^t))+s[11]+643717713)<<14|r>>>18)+i<<0)^i))+s[0]-373897302)<<20|e>>>12)+r<<0,e=((e+=((i=((i+=(e^r&((t=((t+=(r^i&(e^r))+s[5]-701558691)<<5|t>>>27)+e<<0)^e))+s[10]+38016083)<<9|i>>>23)+t<<0)^t&((r=((r+=(t^e&(i^t))+s[15]-660478335)<<14|r>>>18)+i<<0)^i))+s[4]-405537848)<<20|e>>>12)+r<<0,e=((e+=((i=((i+=(e^r&((t=((t+=(r^i&(e^r))+s[9]+568446438)<<5|t>>>27)+e<<0)^e))+s[14]-1019803690)<<9|i>>>23)+t<<0)^t&((r=((r+=(t^e&(i^t))+s[3]-187363961)<<14|r>>>18)+i<<0)^i))+s[8]+1163531501)<<20|e>>>12)+r<<0,e=((e+=((i=((i+=(e^r&((t=((t+=(r^i&(e^r))+s[13]-1444681467)<<5|t>>>27)+e<<0)^e))+s[2]-51403784)<<9|i>>>23)+t<<0)^t&((r=((r+=(t^e&(i^t))+s[7]+1735328473)<<14|r>>>18)+i<<0)^i))+s[12]-1926607734)<<20|e>>>12)+r<<0,e=((e+=((n=(i=((i+=((o=e^r)^(t=((t+=(o^i)+s[5]-378558)<<4|t>>>28)+e<<0))+s[8]-2022574463)<<11|i>>>21)+t<<0)^t)^(r=((r+=(n^e)+s[11]+1839030562)<<16|r>>>16)+i<<0))+s[14]-35309556)<<23|e>>>9)+r<<0,e=((e+=((n=(i=((i+=((o=e^r)^(t=((t+=(o^i)+s[1]-1530992060)<<4|t>>>28)+e<<0))+s[4]+1272893353)<<11|i>>>21)+t<<0)^t)^(r=((r+=(n^e)+s[7]-155497632)<<16|r>>>16)+i<<0))+s[10]-1094730640)<<23|e>>>9)+r<<0,e=((e+=((n=(i=((i+=((o=e^r)^(t=((t+=(o^i)+s[13]+681279174)<<4|t>>>28)+e<<0))+s[0]-358537222)<<11|i>>>21)+t<<0)^t)^(r=((r+=(n^e)+s[3]-722521979)<<16|r>>>16)+i<<0))+s[6]+76029189)<<23|e>>>9)+r<<0,e=((e+=((n=(i=((i+=((o=e^r)^(t=((t+=(o^i)+s[9]-640364487)<<4|t>>>28)+e<<0))+s[12]-421815835)<<11|i>>>21)+t<<0)^t)^(r=((r+=(n^e)+s[15]+530742520)<<16|r>>>16)+i<<0))+s[2]-995338651)<<23|e>>>9)+r<<0,e=((e+=((i=((i+=(e^((t=((t+=(r^(e|~i))+s[0]-198630844)<<6|t>>>26)+e<<0)|~r))+s[7]+1126891415)<<10|i>>>22)+t<<0)^((r=((r+=(t^(i|~e))+s[14]-1416354905)<<15|r>>>17)+i<<0)|~t))+s[5]-57434055)<<21|e>>>11)+r<<0,e=((e+=((i=((i+=(e^((t=((t+=(r^(e|~i))+s[12]+1700485571)<<6|t>>>26)+e<<0)|~r))+s[3]-1894986606)<<10|i>>>22)+t<<0)^((r=((r+=(t^(i|~e))+s[10]-1051523)<<15|r>>>17)+i<<0)|~t))+s[1]-2054922799)<<21|e>>>11)+r<<0,e=((e+=((i=((i+=(e^((t=((t+=(r^(e|~i))+s[8]+1873313359)<<6|t>>>26)+e<<0)|~r))+s[15]-30611744)<<10|i>>>22)+t<<0)^((r=((r+=(t^(i|~e))+s[6]-1560198380)<<15|r>>>17)+i<<0)|~t))+s[13]+1309151649)<<21|e>>>11)+r<<0,e=((e+=((i=((i+=(e^((t=((t+=(r^(e|~i))+s[4]-145523070)<<6|t>>>26)+e<<0)|~r))+s[11]-1120210379)<<10|i>>>22)+t<<0)^((r=((r+=(t^(i|~e))+s[2]+718787259)<<15|r>>>17)+i<<0)|~t))+s[9]-343485551)<<21|e>>>11)+r<<0,this.first?(this.h0=t+1732584193<<0,this.h1=e-271733879<<0,this.h2=r-1732584194<<0,this.h3=i+271733878<<0,this.first=!1):(this.h0=this.h0+t<<0,this.h1=this.h1+e<<0,this.h2=this.h2+r<<0,this.h3=this.h3+i<<0)},Md5.prototype.hex=function(){this.finalize();var t=this.h0,e=this.h1,r=this.h2,i=this.h3;return HEX_CHARS[t>>4&15]+HEX_CHARS[15&t]+HEX_CHARS[t>>12&15]+HEX_CHARS[t>>8&15]+HEX_CHARS[t>>20&15]+HEX_CHARS[t>>16&15]+HEX_CHARS[t>>28&15]+HEX_CHARS[t>>24&15]+HEX_CHARS[e>>4&15]+HEX_CHARS[15&e]+HEX_CHARS[e>>12&15]+HEX_CHARS[e>>8&15]+HEX_CHARS[e>>20&15]+HEX_CHARS[e>>16&15]+HEX_CHARS[e>>28&15]+HEX_CHARS[e>>24&15]+HEX_CHARS[r>>4&15]+HEX_CHARS[15&r]+HEX_CHARS[r>>12&15]+HEX_CHARS[r>>8&15]+HEX_CHARS[r>>20&15]+HEX_CHARS[r>>16&15]+HEX_CHARS[r>>28&15]+HEX_CHARS[r>>24&15]+HEX_CHARS[i>>4&15]+HEX_CHARS[15&i]+HEX_CHARS[i>>12&15]+HEX_CHARS[i>>8&15]+HEX_CHARS[i>>20&15]+HEX_CHARS[i>>16&15]+HEX_CHARS[i>>28&15]+HEX_CHARS[i>>24&15]},Md5.prototype.toString=Md5.prototype.hex,Md5.prototype.digest=function(){this.finalize();var t=this.h0,e=this.h1,r=this.h2,i=this.h3;return[255&t,t>>8&255,t>>16&255,t>>24&255,255&e,e>>8&255,e>>16&255,e>>24&255,255&r,r>>8&255,r>>16&255,r>>24&255,255&i,i>>8&255,i>>16&255,i>>24&255]},Md5.prototype.array=Md5.prototype.digest,Md5.prototype.arrayBuffer=function(){this.finalize();var t=new ArrayBuffer(16),e=new Uint32Array(t);return e[0]=this.h0,e[1]=this.h1,e[2]=this.h2,e[3]=this.h3,t},Md5.prototype.buffer=Md5.prototype.arrayBuffer,Md5.prototype.base64=function(){for(var t,e,r,i="",o=this.array(),n=0;n<15;)t=o[n++],e=o[n++],r=o[n++],i+=BASE64_ENCODE_CHAR[t>>>2]+BASE64_ENCODE_CHAR[63&(t<<4|e>>>4)]+BASE64_ENCODE_CHAR[63&(e<<2|r>>>6)]+BASE64_ENCODE_CHAR[63&r];return i+(BASE64_ENCODE_CHAR[(t=o[n])>>>2]+BASE64_ENCODE_CHAR[t<<4&63]+"==")};var exports=createMethod();COMMON_JS?module.exports=exports:root.md5=exports})()}),sha1=createCommonjsModule(function(module){(function(){var root="object"==typeof window?window:{},NODE_JS=!root.JS_SHA1_NO_NODE_JS&&"object"==typeof process&&process.versions&&process.versions.node;NODE_JS&&(root=commonjsGlobal);var COMMON_JS=!root.JS_SHA1_NO_COMMON_JS&&module.exports,HEX_CHARS="0123456789abcdef".split(""),EXTRA=[-2147483648,8388608,32768,128],SHIFT=[24,16,8,0],OUTPUT_TYPES=["hex","array","digest","arrayBuffer"],blocks=[],createOutputMethod=function(t){return function(e){return new Sha1(!0).update(e)[t]()}},createMethod=function(){var t=createOutputMethod("hex");NODE_JS&&(t=nodeWrap(t)),t.create=function(){return new Sha1},t.update=function(e){return t.create().update(e)};for(var e=0;e<OUTPUT_TYPES.length;++e){var r=OUTPUT_TYPES[e];t[r]=createOutputMethod(r)}return t},nodeWrap=function(method){var crypto=eval("require('crypto')"),Buffer=eval("require('buffer').Buffer"),nodeMethod=function(t){if("string"==typeof t)return crypto.createHash("sha1").update(t,"utf8").digest("hex");if(t.constructor===ArrayBuffer)t=new Uint8Array(t);else if(void 0===t.length)return method(t);return crypto.createHash("sha1").update(new Buffer(t)).digest("hex")};return nodeMethod};function Sha1(t){t?(blocks[0]=blocks[16]=blocks[1]=blocks[2]=blocks[3]=blocks[4]=blocks[5]=blocks[6]=blocks[7]=blocks[8]=blocks[9]=blocks[10]=blocks[11]=blocks[12]=blocks[13]=blocks[14]=blocks[15]=0,this.blocks=blocks):this.blocks=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],this.h0=1732584193,this.h1=4023233417,this.h2=2562383102,this.h3=271733878,this.h4=3285377520,this.block=this.start=this.bytes=this.hBytes=0,this.finalized=this.hashed=!1,this.first=!0}Sha1.prototype.update=function(t){if(!this.finalized){var e="string"!=typeof t;e&&t.constructor===root.ArrayBuffer&&(t=new Uint8Array(t));for(var r,i,o=0,n=t.length||0,s=this.blocks;o<n;){if(this.hashed&&(this.hashed=!1,s[0]=this.block,s[16]=s[1]=s[2]=s[3]=s[4]=s[5]=s[6]=s[7]=s[8]=s[9]=s[10]=s[11]=s[12]=s[13]=s[14]=s[15]=0),e)for(i=this.start;o<n&&i<64;++o)s[i>>2]|=t[o]<<SHIFT[3&i++];else for(i=this.start;o<n&&i<64;++o)(r=t.charCodeAt(o))<128?s[i>>2]|=r<<SHIFT[3&i++]:r<2048?(s[i>>2]|=(192|r>>6)<<SHIFT[3&i++],s[i>>2]|=(128|63&r)<<SHIFT[3&i++]):r<55296||r>=57344?(s[i>>2]|=(224|r>>12)<<SHIFT[3&i++],s[i>>2]|=(128|r>>6&63)<<SHIFT[3&i++],s[i>>2]|=(128|63&r)<<SHIFT[3&i++]):(r=65536+((1023&r)<<10|1023&t.charCodeAt(++o)),s[i>>2]|=(240|r>>18)<<SHIFT[3&i++],s[i>>2]|=(128|r>>12&63)<<SHIFT[3&i++],s[i>>2]|=(128|r>>6&63)<<SHIFT[3&i++],s[i>>2]|=(128|63&r)<<SHIFT[3&i++]);this.lastByteIndex=i,this.bytes+=i-this.start,i>=64?(this.block=s[16],this.start=i-64,this.hash(),this.hashed=!0):this.start=i}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this}},Sha1.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var t=this.blocks,e=this.lastByteIndex;t[16]=this.block,t[e>>2]|=EXTRA[3&e],this.block=t[16],e>=56&&(this.hashed||this.hash(),t[0]=this.block,t[16]=t[1]=t[2]=t[3]=t[4]=t[5]=t[6]=t[7]=t[8]=t[9]=t[10]=t[11]=t[12]=t[13]=t[14]=t[15]=0),t[14]=this.hBytes<<3|this.bytes>>>29,t[15]=this.bytes<<3,this.hash()}},Sha1.prototype.hash=function(){var t,e,r=this.h0,i=this.h1,o=this.h2,n=this.h3,s=this.h4,a=this.blocks;for(t=16;t<80;++t)a[t]=(e=a[t-3]^a[t-8]^a[t-14]^a[t-16])<<1|e>>>31;for(t=0;t<20;t+=5)r=(e=(i=(e=(o=(e=(n=(e=(s=(e=r<<5|r>>>27)+(i&o|~i&n)+s+1518500249+a[t]<<0)<<5|s>>>27)+(r&(i=i<<30|i>>>2)|~r&o)+n+1518500249+a[t+1]<<0)<<5|n>>>27)+(s&(r=r<<30|r>>>2)|~s&i)+o+1518500249+a[t+2]<<0)<<5|o>>>27)+(n&(s=s<<30|s>>>2)|~n&r)+i+1518500249+a[t+3]<<0)<<5|i>>>27)+(o&(n=n<<30|n>>>2)|~o&s)+r+1518500249+a[t+4]<<0,o=o<<30|o>>>2;for(;t<40;t+=5)r=(e=(i=(e=(o=(e=(n=(e=(s=(e=r<<5|r>>>27)+(i^o^n)+s+1859775393+a[t]<<0)<<5|s>>>27)+(r^(i=i<<30|i>>>2)^o)+n+1859775393+a[t+1]<<0)<<5|n>>>27)+(s^(r=r<<30|r>>>2)^i)+o+1859775393+a[t+2]<<0)<<5|o>>>27)+(n^(s=s<<30|s>>>2)^r)+i+1859775393+a[t+3]<<0)<<5|i>>>27)+(o^(n=n<<30|n>>>2)^s)+r+1859775393+a[t+4]<<0,o=o<<30|o>>>2;for(;t<60;t+=5)r=(e=(i=(e=(o=(e=(n=(e=(s=(e=r<<5|r>>>27)+(i&o|i&n|o&n)+s-1894007588+a[t]<<0)<<5|s>>>27)+(r&(i=i<<30|i>>>2)|r&o|i&o)+n-1894007588+a[t+1]<<0)<<5|n>>>27)+(s&(r=r<<30|r>>>2)|s&i|r&i)+o-1894007588+a[t+2]<<0)<<5|o>>>27)+(n&(s=s<<30|s>>>2)|n&r|s&r)+i-1894007588+a[t+3]<<0)<<5|i>>>27)+(o&(n=n<<30|n>>>2)|o&s|n&s)+r-1894007588+a[t+4]<<0,o=o<<30|o>>>2;for(;t<80;t+=5)r=(e=(i=(e=(o=(e=(n=(e=(s=(e=r<<5|r>>>27)+(i^o^n)+s-899497514+a[t]<<0)<<5|s>>>27)+(r^(i=i<<30|i>>>2)^o)+n-899497514+a[t+1]<<0)<<5|n>>>27)+(s^(r=r<<30|r>>>2)^i)+o-899497514+a[t+2]<<0)<<5|o>>>27)+(n^(s=s<<30|s>>>2)^r)+i-899497514+a[t+3]<<0)<<5|i>>>27)+(o^(n=n<<30|n>>>2)^s)+r-899497514+a[t+4]<<0,o=o<<30|o>>>2;this.h0=this.h0+r<<0,this.h1=this.h1+i<<0,this.h2=this.h2+o<<0,this.h3=this.h3+n<<0,this.h4=this.h4+s<<0},Sha1.prototype.hex=function(){this.finalize();var t=this.h0,e=this.h1,r=this.h2,i=this.h3,o=this.h4;return HEX_CHARS[t>>28&15]+HEX_CHARS[t>>24&15]+HEX_CHARS[t>>20&15]+HEX_CHARS[t>>16&15]+HEX_CHARS[t>>12&15]+HEX_CHARS[t>>8&15]+HEX_CHARS[t>>4&15]+HEX_CHARS[15&t]+HEX_CHARS[e>>28&15]+HEX_CHARS[e>>24&15]+HEX_CHARS[e>>20&15]+HEX_CHARS[e>>16&15]+HEX_CHARS[e>>12&15]+HEX_CHARS[e>>8&15]+HEX_CHARS[e>>4&15]+HEX_CHARS[15&e]+HEX_CHARS[r>>28&15]+HEX_CHARS[r>>24&15]+HEX_CHARS[r>>20&15]+HEX_CHARS[r>>16&15]+HEX_CHARS[r>>12&15]+HEX_CHARS[r>>8&15]+HEX_CHARS[r>>4&15]+HEX_CHARS[15&r]+HEX_CHARS[i>>28&15]+HEX_CHARS[i>>24&15]+HEX_CHARS[i>>20&15]+HEX_CHARS[i>>16&15]+HEX_CHARS[i>>12&15]+HEX_CHARS[i>>8&15]+HEX_CHARS[i>>4&15]+HEX_CHARS[15&i]+HEX_CHARS[o>>28&15]+HEX_CHARS[o>>24&15]+HEX_CHARS[o>>20&15]+HEX_CHARS[o>>16&15]+HEX_CHARS[o>>12&15]+HEX_CHARS[o>>8&15]+HEX_CHARS[o>>4&15]+HEX_CHARS[15&o]},Sha1.prototype.toString=Sha1.prototype.hex,Sha1.prototype.digest=function(){this.finalize();var t=this.h0,e=this.h1,r=this.h2,i=this.h3,o=this.h4;return[t>>24&255,t>>16&255,t>>8&255,255&t,e>>24&255,e>>16&255,e>>8&255,255&e,r>>24&255,r>>16&255,r>>8&255,255&r,i>>24&255,i>>16&255,i>>8&255,255&i,o>>24&255,o>>16&255,o>>8&255,255&o]},Sha1.prototype.array=Sha1.prototype.digest,Sha1.prototype.arrayBuffer=function(){this.finalize();var t=new ArrayBuffer(20),e=new DataView(t);return e.setUint32(0,this.h0),e.setUint32(4,this.h1),e.setUint32(8,this.h2),e.setUint32(12,this.h3),e.setUint32(16,this.h4),t};var exports=createMethod();COMMON_JS?module.exports=exports:root.sha1=exports})()}),HEX_DIGITS="0123456789abcdef".split(""),UUID_LENGTH=36,UUID_REGEXP=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-5][0-9a-f]{3}-[089ab][0-9a-f]{3}-[0-9a-f]{12}$/i,HEX_TO_BYTE_MAP=function(){for(var t={},e=0;e<256;e++){var r=e.toString(16);t[1===r.length?"0"+r:r]=e}return t}(),uint8ToHex=function(t){var e=t>>4;return HEX_DIGITS[e]+HEX_DIGITS[t-(e<<4)]},uint8ArrayToHex=function(t){for(var e="",r=0;r<t.length;r++)e+=uint8ToHex(t[r]);return e},stringToCharBuffer=function(t){for(var e=unescape(encodeURIComponent(t)),r=new Uint8Array(e.length),i=0;i<e.length;i++)r[i]=e[i].charCodeAt(0);return r},md5Hash=function(t){return new Uint8Array(md5.arrayBuffer(t))},sha1Hash=function(t){return new Uint8Array(sha1.arrayBuffer(t))},concatBuffers=function(t,e){var r=new Uint8Array(t.length+e.length);return r.set(new Uint8Array(t),0),r.set(new Uint8Array(e),t.byteLength),r},validateUuid=function(t){return"string"==typeof t&&t.length===UUID_LENGTH&&UUID_REGEXP.test(t)},parseUuid=function(t){if(!validateUuid(t))throw TypeError("Invalid UUID");for(var e=new Uint8Array(16),r=0,i=0;r<t.length;)if("-"!==t[r]){var o=(t[r]+t[r+1]).toLowerCase();e[i]=HEX_TO_BYTE_MAP[o],i++,r+=2}else r++;return e},hashToUuid=function(t,e){return uint8ArrayToHex(t.slice(0,4))+"-"+uint8ArrayToHex(t.slice(4,6))+"-"+uint8ToHex(15&t[6]|parseInt(10*e,16))+uint8ToHex(t[7])+"-"+uint8ToHex(63&t[8]|128)+uint8ToHex(t[9])+"-"+uint8ArrayToHex(t.slice(10,16))},lib={uint8ToHex:uint8ToHex,uint8ArrayToHex:uint8ArrayToHex,stringToCharBuffer:stringToCharBuffer,md5Hash:md5Hash,sha1Hash:sha1Hash,concatBuffers:concatBuffers,validateUuid:validateUuid,parseUuid:parseUuid,hashToUuid:hashToUuid},EMPTY_UINT8_ARRAY=new Uint8Array(0);function generateUuid(t,e,r){if("string"!=typeof t)throw TypeError("Value must be string");if("number"==typeof e)return generateUuid(t,void 0,e);if(null==r)return generateUuid(t,e,5);if(3!==r&&5!==r)throw TypeError("Version of UUID can be only 3 or 5");var i=lib.stringToCharBuffer(t),o="string"==typeof e?lib.parseUuid(e):EMPTY_UINT8_ARRAY,n=lib.concatBuffers(o,i),s=3===r?lib.md5Hash(n):lib.sha1Hash(n);return lib.hashToUuid(s,r)}var src=generateUuid,ReactGridLayout=RGL.WidthProvider(RGL__default.default),Dashboard=function(t){var e=t.apiUrl,r=t.fetch,i=t.lang,o=t.widgetName,n=t.widgetDisplayName,s=t.widgetWidth,a=t.widgetHeight,h=t.Widget,u=t.editMode,f=andoncloudSdk.useLoginStatus().status,c=React.useState(!1),l=c[0],d=c[1],p=src(o);return React__default.default.createElement(ReactGridLayout,{className:"layout",layout:[{i:p,x:0,y:0,w:s||3,h:a||4}],draggableHandle:".draggable-handle"},"connected"===f&&React__default.default.createElement(andoncloudDashboardToolkit.WidgetCard,{key:p,Widget:h,title:n(i),id:p,url:e,fetch:r,lang:i,openSettingsModal:l,onSettingsModalOpened:function(){return d(!0)},onSettingsModalClosed:function(){return d(!1)},editMode:u}))},routes=function(t,e){return[{path:"/",element:t?React__default.default.createElement(Dashboard,{apiUrl:e.apiUrl,fetch:e.fetch,lang:e.lang,widgetName:e.widgetName,widgetDisplayName:e.widgetDisplayName,widgetWidth:e.widgetWidth,widgetHeight:e.widgetHeight,Widget:e.Widget,editMode:e.editMode}):React__default.default.createElement(reactRouterDom.Navigate,{to:"/login"})}]},Routing=function(t){var e=andoncloudSdk.useLoginStatus();return reactRouterDom.useRoutes(routes("connected"===e.status,t))},WidgetPreview=function(t){var e=t.baseUrl,r=t.apiUrl,i=t.fetch,o=t.widgetName,n=t.widgetDisplayName,s=t.widgetWidth,a=t.widgetHeight,h=t.Widget,u=React.useState("pl"),f=u[0],c=u[1],l=React.useState(!0),d=l[0],p=l[1],H=[{label:d?"pl"===f?"Wyłącz tryb edycji":"Turn off edit mode":"pl"===f?"Włącz tryb edycji":"Turn on edit mode",action:function(){return p(function(t){return!t})}},{label:"pl"===f?"Change language to English":"Zmień język na Polski",action:function(){var t="pl"===f?"en":"pl";c(t),andoncloudSdk.setLocale(t)}}],y={position:"static",leadingText:n(f),menuProps:{items:H,buttonColor:"white"}};return React__default.default.createElement(andoncloudSdk.App,{baseUrl:e,authProps:{redirectPath:"/",clientId:"sample-app-client-id",grantType:"password"}},React__default.default.createElement(andoncloudSdk.Container,{headerProps:y},React__default.default.createElement(Routing,{apiUrl:r,fetch:i,lang:f,widgetName:o,widgetDisplayName:n,widgetWidth:s,widgetHeight:a,Widget:h,editMode:d})))};exports.WidgetPreview=WidgetPreview;
|
|
172
2
|
//# sourceMappingURL=index.js.map
|