@wix/cli-app 1.1.22 → 1.1.24
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/build/{CreateVersionCommand-GFKZ4QO4.js → CreateVersionCommand-AIHKPL4U.js} +2 -2
- package/build/DevCommand-JBYDBIHJ.js +10 -0
- package/build/DevCommand-JBYDBIHJ.js.map +1 -0
- package/build/{GenerateCommand-G54DEIA6.js → GenerateCommand-LVKRUIPR.js} +2 -2
- package/build/PreviewCommand-AJAW4S7U.js +4 -0
- package/build/{ServeCommand-FMBULAKF.js → ServeCommand-JVBQYJCP.js} +2 -2
- package/build/{build-MRYN3JUP.js → build-EE6LGUY4.js} +2 -2
- package/build/{chunk-25SKF6FV.js → chunk-2EMNPHS4.js} +2 -2
- package/build/{chunk-25SKF6FV.js.map → chunk-2EMNPHS4.js.map} +1 -1
- package/build/chunk-5DKSEIPQ.js +4 -0
- package/build/chunk-5DKSEIPQ.js.map +1 -0
- package/build/chunk-5DONBW64.js +4 -0
- package/build/{chunk-U7U3RJXS.js → chunk-5Y6INJLR.js} +2 -2
- package/build/{chunk-U7U3RJXS.js.map → chunk-5Y6INJLR.js.map} +1 -1
- package/build/{chunk-FF2EQB5V.js → chunk-BXV4CRED.js} +2 -2
- package/build/{chunk-LWP5GALA.js → chunk-CVDYHY4Z.js} +2 -2
- package/build/{chunk-5TKU7FRO.js → chunk-DHSOX7Q3.js} +2 -2
- package/build/{chunk-SXC7QEHP.js → chunk-DSZA37YO.js} +2 -2
- package/build/{chunk-AYAI5JUA.js → chunk-DWN6ZOOC.js} +3 -3
- package/build/chunk-DWN6ZOOC.js.map +1 -0
- package/build/{chunk-MG53FTJX.js → chunk-ENEPC5FX.js} +34 -34
- package/build/chunk-ENEPC5FX.js.map +1 -0
- package/build/{chunk-CRZ4CUP7.js → chunk-IMEXFRQF.js} +2 -2
- package/build/{chunk-ADKWZ4EI.js → chunk-KIPWMZ5B.js} +2 -2
- package/build/chunk-KTOYAW3Z.js +4 -0
- package/build/{chunk-4B7ROXUZ.js.map → chunk-KTOYAW3Z.js.map} +1 -1
- package/build/{chunk-ZW7WK7M6.js → chunk-NNRXODGG.js} +2 -2
- package/build/{chunk-LZXJDSN6.js → chunk-PWK5QRCL.js} +2 -2
- package/build/{chunk-7FABCBRF.js → chunk-R6AW3SG2.js} +2 -2
- package/build/{chunk-LQZY2KM3.js → chunk-SOO7TNTX.js} +2 -2
- package/build/{chunk-LQZY2KM3.js.map → chunk-SOO7TNTX.js.map} +1 -1
- package/build/{chunk-EJFNJ7PW.js → chunk-TKTLLIGH.js} +10 -10
- package/build/{chunk-EJFNJ7PW.js.map → chunk-TKTLLIGH.js.map} +1 -1
- package/build/{chunk-G22H7Q33.js → chunk-U3GMUQMZ.js} +3 -3
- package/build/{chunk-G22H7Q33.js.map → chunk-U3GMUQMZ.js.map} +1 -1
- package/build/{chunk-EZFGMZDY.js → chunk-VA2XSYDC.js} +2 -2
- package/build/devtools-LGJXFI3T.js +10 -0
- package/build/devtools-LGJXFI3T.js.map +1 -0
- package/build/{esm-IHGGGJ6T.js → esm-Z5T56VLV.js} +2 -2
- package/build/{esm-IHGGGJ6T.js.map → esm-Z5T56VLV.js.map} +1 -1
- package/build/index.js +2 -2
- package/build/{preview-CLVQJW7O.js → preview-MJR23HYD.js} +2 -2
- package/build/render-command-GNXNFDOC.js +4 -0
- package/build/{render-command-PULKFUBS.js.map → render-command-GNXNFDOC.js.map} +1 -1
- package/package.json +4 -4
- package/build/DevCommand-3X6YOCR6.js +0 -10
- package/build/DevCommand-3X6YOCR6.js.map +0 -1
- package/build/PreviewCommand-MS3G34SU.js +0 -4
- package/build/chunk-2TSKEJBV.js +0 -4
- package/build/chunk-4B7ROXUZ.js +0 -4
- package/build/chunk-6XYAO7TZ.js +0 -4
- package/build/chunk-6XYAO7TZ.js.map +0 -1
- package/build/chunk-AYAI5JUA.js.map +0 -1
- package/build/chunk-MG53FTJX.js.map +0 -1
- package/build/devtools-FITZMLEV.js +0 -10
- package/build/devtools-FITZMLEV.js.map +0 -1
- package/build/render-command-PULKFUBS.js +0 -4
- /package/build/{CreateVersionCommand-GFKZ4QO4.js.map → CreateVersionCommand-AIHKPL4U.js.map} +0 -0
- /package/build/{GenerateCommand-G54DEIA6.js.map → GenerateCommand-LVKRUIPR.js.map} +0 -0
- /package/build/{PreviewCommand-MS3G34SU.js.map → PreviewCommand-AJAW4S7U.js.map} +0 -0
- /package/build/{ServeCommand-FMBULAKF.js.map → ServeCommand-JVBQYJCP.js.map} +0 -0
- /package/build/{build-MRYN3JUP.js.map → build-EE6LGUY4.js.map} +0 -0
- /package/build/{chunk-2TSKEJBV.js.map → chunk-5DONBW64.js.map} +0 -0
- /package/build/{chunk-FF2EQB5V.js.map → chunk-BXV4CRED.js.map} +0 -0
- /package/build/{chunk-LWP5GALA.js.map → chunk-CVDYHY4Z.js.map} +0 -0
- /package/build/{chunk-5TKU7FRO.js.map → chunk-DHSOX7Q3.js.map} +0 -0
- /package/build/{chunk-SXC7QEHP.js.map → chunk-DSZA37YO.js.map} +0 -0
- /package/build/{chunk-CRZ4CUP7.js.map → chunk-IMEXFRQF.js.map} +0 -0
- /package/build/{chunk-ADKWZ4EI.js.map → chunk-KIPWMZ5B.js.map} +0 -0
- /package/build/{chunk-ZW7WK7M6.js.map → chunk-NNRXODGG.js.map} +0 -0
- /package/build/{chunk-LZXJDSN6.js.map → chunk-PWK5QRCL.js.map} +0 -0
- /package/build/{chunk-7FABCBRF.js.map → chunk-R6AW3SG2.js.map} +0 -0
- /package/build/{chunk-EZFGMZDY.js.map → chunk-VA2XSYDC.js.map} +0 -0
- /package/build/{preview-CLVQJW7O.js.map → preview-MJR23HYD.js.map} +0 -0
|
@@ -6,7 +6,7 @@ Type: ${e}
|
|
|
6
6
|
Name: ${Ae(r)}
|
|
7
7
|
Error:`,o)}}function gr(e){let t="console";Oe(t,e),Me(t,Em)}function Em(){"console"in C&&Zt.forEach(function(e){e in C.console&&Q(C.console,e,function(t){return wn[e]=t,function(...n){me("console",{args:n,level:e});let o=wn[e];o&&o.apply(C.console,n)}})})}f();f();function B(){let e=C,t=e.crypto||e.msCrypto,n=()=>Math.random()*16;try{if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,"");t&&t.getRandomValues&&(n=()=>{let r=new Uint8Array(1);return t.getRandomValues(r),r[0]})}catch{}return("10000000100040008000"+1e11).replace(/[018]/g,r=>(r^(n()&15)>>r/4).toString(16))}function lu(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}function Qe(e){let{message:t,event_id:n}=e;if(t)return t;let r=lu(e);return r?r.type&&r.value?`${r.type}: ${r.value}`:r.type||r.value||n||"<unknown>":n||"<unknown>"}function Cn(e,t,n){let r=e.exception=e.exception||{},o=r.values=r.values||[],i=o[0]=o[0]||{};i.value||(i.value=t||""),i.type||(i.type=n||"Error")}function Ue(e,t){let n=lu(e);if(!n)return;let r={type:"generic",handled:!0},o=n.mechanism;if(n.mechanism={...r,...o,...t},t&&"data"in t){let i={...o&&o.data,...t.data};n.mechanism.data=i}}function Es(e,t,n=5){if(t.lineno===void 0)return;let r=e.length,o=Math.max(Math.min(r-1,t.lineno-1),0);t.pre_context=e.slice(Math.max(0,o-n),o).map(i=>ur(i,0)),t.context_line=ur(e[Math.min(r-1,o)],t.colno||0),t.post_context=e.slice(Math.min(o+1,r),o+1+n).map(i=>ur(i,0))}function wo(e){if(e&&e.__sentry_captured__)return!0;try{ke(e,"__sentry_captured__",!0)}catch{}return!1}function _r(e){return Array.isArray(e)?e:[e]}var Rn=C,bm=1e3,du,bs,Ts;function yr(e){let t="dom";Oe(t,e),Me(t,Tm)}function Tm(){if(!Rn.document)return;let e=me.bind(null,"dom"),t=fu(e,!0);Rn.document.addEventListener("click",t,!1),Rn.document.addEventListener("keypress",t,!1),["EventTarget","Node"].forEach(n=>{let r=Rn[n]&&Rn[n].prototype;!r||!r.hasOwnProperty||!r.hasOwnProperty("addEventListener")||(Q(r,"addEventListener",function(o){return function(i,s,a){if(i==="click"||i=="keypress")try{let c=this,u=c.__sentry_instrumentation_handlers__=c.__sentry_instrumentation_handlers__||{},l=u[i]=u[i]||{refCount:0};if(!l.handler){let d=fu(e);l.handler=d,o.call(this,i,d,a)}l.refCount++}catch{}return o.call(this,i,s,a)}}),Q(r,"removeEventListener",function(o){return function(i,s,a){if(i==="click"||i=="keypress")try{let c=this,u=c.__sentry_instrumentation_handlers__||{},l=u[i];l&&(l.refCount--,l.refCount<=0&&(o.call(this,i,l.handler,a),l.handler=void 0,delete u[i]),Object.keys(u).length===0&&delete c.__sentry_instrumentation_handlers__)}catch{}return o.call(this,i,s,a)}}))})}function Im(e){if(e.type!==bs)return!1;try{if(!e.target||e.target._sentryId!==Ts)return!1}catch{}return!0}function vm(e,t){return e!=="keypress"?!1:!t||!t.tagName?!0:!(t.tagName==="INPUT"||t.tagName==="TEXTAREA"||t.isContentEditable)}function fu(e,t=!1){return n=>{if(!n||n._sentryCaptured)return;let r=xm(n);if(vm(n.type,r))return;ke(n,"_sentryCaptured",!0),r&&!r._sentryId&&ke(r,"_sentryId",B());let o=n.type==="keypress"?"input":n.type;Im(n)||(e({event:n,name:o,global:t}),bs=n.type,Ts=r?r._sentryId:void 0),clearTimeout(du),du=Rn.setTimeout(()=>{Ts=void 0,bs=void 0},bm)}}function xm(e){try{return e.target}catch{return null}}f();f();var Co=Xt();function Ro(){if(!("fetch"in Co))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch{return!1}}function Sr(e){return e&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}function Er(){if(typeof EdgeRuntime=="string")return!0;if(!Ro())return!1;if(Sr(Co.fetch))return!0;let e=!1,t=Co.document;if(t&&typeof t.createElement=="function")try{let n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n),n.contentWindow&&n.contentWindow.fetch&&(e=Sr(n.contentWindow.fetch)),t.head.removeChild(n)}catch(n){je&&h.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return e}function Is(){return"ReportingObserver"in Co}function bt(e){let t="fetch";Oe(t,e),Me(t,wm)}function wm(){Er()&&Q(C,"fetch",function(e){return function(...t){let{method:n,url:r}=Cm(t),o={args:t,fetchData:{method:n,url:r},startTimestamp:Date.now()};return me("fetch",{...o}),e.apply(C,t).then(i=>{let s={...o,endTimestamp:Date.now(),response:i};return me("fetch",s),i},i=>{let s={...o,endTimestamp:Date.now(),error:i};throw me("fetch",s),i})}})}function vs(e,t){return!!e&&typeof e=="object"&&!!e[t]}function pu(e){return typeof e=="string"?e:e?vs(e,"url")?e.url:e.toString?e.toString():"":""}function Cm(e){if(e.length===0)return{method:"GET",url:""};if(e.length===2){let[n,r]=e;return{url:pu(n),method:vs(r,"method")?String(r.method).toUpperCase():"GET"}}let t=e[0];return{url:pu(t),method:vs(t,"method")?String(t.method).toUpperCase():"GET"}}f();var ko=null;function br(e){let t="error";Oe(t,e),Me(t,Rm)}function Rm(){ko=C.onerror,C.onerror=function(e,t,n,r,o){return me("error",{column:r,error:o,line:n,msg:e,url:t}),ko&&!ko.__SENTRY_LOADER__?ko.apply(this,arguments):!1},C.onerror.__SENTRY_INSTRUMENTED__=!0}f();var Ao=null;function Tr(e){let t="unhandledrejection";Oe(t,e),Me(t,km)}function km(){Ao=C.onunhandledrejection,C.onunhandledrejection=function(e){return me("unhandledrejection",e),Ao&&!Ao.__SENTRY_LOADER__?Ao.apply(this,arguments):!0},C.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}f();f();var Oo=Xt();function mu(){let e=Oo.chrome,t=e&&e.app&&e.app.runtime,n="history"in Oo&&!!Oo.history.pushState&&!!Oo.history.replaceState;return!t&&n}var Ir=C,Mo;function et(e){let t="history";Oe(t,e),Me(t,Am)}function Am(){if(!mu())return;let e=Ir.onpopstate;Ir.onpopstate=function(...n){let r=Ir.location.href,o=Mo;if(Mo=r,me("history",{from:o,to:r}),e)try{return e.apply(this,n)}catch{}};function t(n){return function(...r){let o=r.length>2?r[2]:void 0;if(o){let i=Mo,s=String(o);Mo=s,me("history",{from:i,to:s})}return n.apply(this,r)}}Q(Ir.history,"pushState",t),Q(Ir.history,"replaceState",t)}f();var Om=C,Ne="__sentry_xhr_v3__";function Tt(e){let t="xhr";Oe(t,e),Me(t,Mm)}function Mm(){if(!Om.XMLHttpRequest)return;let e=XMLHttpRequest.prototype;Q(e,"open",function(t){return function(...n){let r=Date.now(),o=Se(n[0])?n[0].toUpperCase():void 0,i=Nm(n[1]);if(!o||!i)return t.apply(this,n);this[Ne]={method:o,url:i,request_headers:{}},o==="POST"&&i.match(/sentry_key/)&&(this.__sentry_own_request__=!0);let s=()=>{let a=this[Ne];if(a&&this.readyState===4){try{a.status_code=this.status}catch{}let c={args:[o,i],endTimestamp:Date.now(),startTimestamp:r,xhr:this};me("xhr",c)}};return"onreadystatechange"in this&&typeof this.onreadystatechange=="function"?Q(this,"onreadystatechange",function(a){return function(...c){return s(),a.apply(this,c)}}):this.addEventListener("readystatechange",s),Q(this,"setRequestHeader",function(a){return function(...c){let[u,l]=c,d=this[Ne];return d&&Se(u)&&Se(l)&&(d.request_headers[u.toLowerCase()]=l),a.apply(this,c)}}),t.apply(this,n)}}),Q(e,"send",function(t){return function(...n){let r=this[Ne];if(!r)return t.apply(this,n);n[0]!==void 0&&(r.body=n[0]);let o={args:[r.method,r.url],startTimestamp:Date.now(),xhr:this};return me("xhr",o),t.apply(this,n)}})}function Nm(e){if(Se(e))return e;try{return e.toString()}catch{}}f();f();f();function xs(){return typeof __SENTRY_BROWSER_BUNDLE__<"u"&&!!__SENTRY_BROWSER_BUNDLE__}function ws(){return"npm"}function hu(){return!xs()&&Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]"}function kn(){return typeof window<"u"&&(!hu()||Dm())}function Dm(){return C.process!==void 0&&C.process.type==="renderer"}f();function gu(){let e=typeof WeakSet=="function",t=e?new WeakSet:[];function n(o){if(e)return t.has(o)?!0:(t.add(o),!1);for(let i=0;i<t.length;i++)if(t[i]===o)return!0;return t.push(o),!1}function r(o){if(e)t.delete(o);else for(let i=0;i<t.length;i++)if(t[i]===o){t.splice(i,1);break}}return[n,r]}f();function be(e,t=100,n=1/0){try{return No("",e,t,n)}catch(r){return{ERROR:`**non-serializable** (${r})`}}}function Do(e,t=3,n=100*1024){let r=be(e,t);return Bm(r)>n?Do(e,t-1,n):r}function No(e,t,n=1/0,r=1/0,o=gu()){let[i,s]=o;if(t==null||["number","boolean","string"].includes(typeof t)&&!ar(t))return t;let a=Lm(e,t);if(!a.startsWith("[object "))return a;if(t.__sentry_skip_normalization__)return t;let c=typeof t.__sentry_override_normalization_depth__=="number"?t.__sentry_override_normalization_depth__:n;if(c===0)return a.replace("object ","");if(i(t))return"[Circular ~]";let u=t;if(u&&typeof u.toJSON=="function")try{let m=u.toJSON();return No("",m,c-1,r,o)}catch{}let l=Array.isArray(t)?[]:{},d=0,p=Io(t);for(let m in p){if(!Object.prototype.hasOwnProperty.call(p,m))continue;if(d>=r){l[m]="[MaxProperties ~]";break}let g=p[m];l[m]=No(m,g,c-1,r,o),d++}return s(t),l}function Lm(e,t){try{if(e==="domain"&&t&&typeof t=="object"&&t._events)return"[Domain]";if(e==="domainEmitter")return"[DomainEmitter]";if(typeof global<"u"&&t===global)return"[Global]";if(typeof window<"u"&&t===window)return"[Window]";if(typeof document<"u"&&t===document)return"[Document]";if(cr(t))return"[VueViewModel]";if(ps(t))return"[SyntheticEvent]";if(typeof t=="number"&&t!==t)return"[NaN]";if(typeof t=="function")return`[Function: ${Ae(t)}]`;if(typeof t=="symbol")return`[${String(t)}]`;if(typeof t=="bigint")return`[BigInt: ${String(t)}]`;let n=Pm(t);return/^HTML(\w*)Element$/.test(n)?`[HTMLElement: ${n}]`:`[object ${n}]`}catch(n){return`**non-serializable** (${n})`}}function Pm(e){let t=Object.getPrototypeOf(e);return t?t.constructor.name:"null prototype"}function Fm(e){return~-encodeURI(e).split(/%..|./).length}function Bm(e){return Fm(JSON.stringify(e))}f();function Hm(e,t){let n=0;for(let r=e.length-1;r>=0;r--){let o=e[r];o==="."?e.splice(r,1):o===".."?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n--;n)e.unshift("..");return e}var Um=/^(\S+:\\|\/?)([\s\S]*?)((?:\.{1,2}|[^/\\]+?|)(\.[^./\\]*|))(?:[/\\]*)$/;function $m(e){let t=e.length>1024?`<truncated>${e.slice(-1024)}`:e,n=Um.exec(t);return n?n.slice(1):[]}function Cs(...e){let t="",n=!1;for(let r=e.length-1;r>=-1&&!n;r--){let o=r>=0?e[r]:"/";o&&(t=`${o}/${t}`,n=o.charAt(0)==="/")}return t=Hm(t.split("/").filter(r=>!!r),!n).join("/"),(n?"/":"")+t||"."}function _u(e){let t=0;for(;t<e.length&&e[t]==="";t++);let n=e.length-1;for(;n>=0&&e[n]==="";n--);return t>n?[]:e.slice(t,n-t+1)}function Rs(e,t){e=Cs(e).slice(1),t=Cs(t).slice(1);let n=_u(e.split("/")),r=_u(t.split("/")),o=Math.min(n.length,r.length),i=o;for(let a=0;a<o;a++)if(n[a]!==r[a]){i=a;break}let s=[];for(let a=i;a<n.length;a++)s.push("..");return s=s.concat(r.slice(i)),s.join("/")}function ks(e,t){let n=$m(e)[2];return t&&n.slice(t.length*-1)===t&&(n=n.slice(0,n.length-t.length)),n}f();f();var It;(function(e){e[e.PENDING=0]="PENDING";let n=1;e[e.RESOLVED=n]="RESOLVED";let r=2;e[e.REJECTED=r]="REJECTED"})(It||(It={}));function tt(e){return new $e(t=>{t(e)})}function en(e){return new $e((t,n)=>{n(e)})}var $e=class e{constructor(t){e.prototype.__init.call(this),e.prototype.__init2.call(this),e.prototype.__init3.call(this),e.prototype.__init4.call(this),this._state=It.PENDING,this._handlers=[];try{t(this._resolve,this._reject)}catch(n){this._reject(n)}}then(t,n){return new e((r,o)=>{this._handlers.push([!1,i=>{if(!t)r(i);else try{r(t(i))}catch(s){o(s)}},i=>{if(!n)o(i);else try{r(n(i))}catch(s){o(s)}}]),this._executeHandlers()})}catch(t){return this.then(n=>n,t)}finally(t){return new e((n,r)=>{let o,i;return this.then(s=>{i=!1,o=s,t&&t()},s=>{i=!0,o=s,t&&t()}).then(()=>{if(i){r(o);return}n(o)})})}__init(){this._resolve=t=>{this._setResult(It.RESOLVED,t)}}__init2(){this._reject=t=>{this._setResult(It.REJECTED,t)}}__init3(){this._setResult=(t,n)=>{if(this._state===It.PENDING){if(ze(n)){n.then(this._resolve,this._reject);return}this._state=t,this._value=n,this._executeHandlers()}}}__init4(){this._executeHandlers=()=>{if(this._state===It.PENDING)return;let t=this._handlers.slice();this._handlers=[],t.forEach(n=>{n[0]||(this._state===It.RESOLVED&&n[1](this._value),this._state===It.REJECTED&&n[2](this._value),n[0]=!0)})}}};function As(e){let t=[];function n(){return e===void 0||t.length<e}function r(s){return t.splice(t.indexOf(s),1)[0]}function o(s){if(!n())return en(new Ee("Not adding Promise because buffer limit was reached."));let a=s();return t.indexOf(a)===-1&&t.push(a),a.then(()=>r(a)).then(null,()=>r(a).then(null,()=>{})),a}function i(s){return new $e((a,c)=>{let u=t.length;if(!u)return a(!0);let l=setTimeout(()=>{s&&s>0&&a(!1)},s);t.forEach(d=>{tt(d).then(()=>{--u||(clearTimeout(l),a(!0))},c)})})}return{$:t,add:o,drain:i}}f();function qe(e){if(!e)return{};let t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};let n=t[6]||"",r=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],search:n,hash:r,relative:t[5]+n+r}}function Os(e){return e.split(/[\?#]/,1)[0]}f();var yu=["fatal","error","warning","log","info","debug"];function vr(e){return e==="warn"?"warning":yu.includes(e)?e:"log"}f();var Su=1e3;function ft(){return Date.now()/Su}function Gm(){let{performance:e}=C;if(!e||!e.now)return ft;let t=Date.now()-e.now(),n=e.timeOrigin==null?t:e.timeOrigin;return()=>(n+e.now())/Su}var Ie=Gm();var xr,re=(()=>{let{performance:e}=C;if(!e||!e.now){xr="none";return}let t=3600*1e3,n=e.now(),r=Date.now(),o=e.timeOrigin?Math.abs(e.timeOrigin+n-r):t,i=o<t,s=e.timing&&e.timing.navigationStart,c=typeof s=="number"?Math.abs(s+n-r):t,u=c<t;return i||u?o<=c?(xr="timeOrigin",e.timeOrigin):(xr="navigationStart",s):(xr="dateNow",r)})();f();f();var An="baggage",Ms="sentry-",bu=/^sentry-/,Tu=8192;function Lo(e){if(!Se(e)&&!Array.isArray(e))return;let t={};if(Array.isArray(e))t=e.reduce((r,o)=>{let i=Eu(o);for(let s of Object.keys(i))r[s]=i[s];return r},{});else{if(!e)return;t=Eu(e)}let n=Object.entries(t).reduce((r,[o,i])=>{if(o.match(bu)){let s=o.slice(Ms.length);r[s]=i}return r},{});if(Object.keys(n).length>0)return n}function wr(e){if(!e)return;let t=Object.entries(e).reduce((n,[r,o])=>(o&&(n[`${Ms}${r}`]=o),n),{});return Wm(t)}function Eu(e){return e.split(",").map(t=>t.split("=").map(n=>decodeURIComponent(n.trim()))).reduce((t,[n,r])=>(t[n]=r,t),{})}function Wm(e){if(Object.keys(e).length!==0)return Object.entries(e).reduce((t,[n,r],o)=>{let i=`${encodeURIComponent(n)}=${encodeURIComponent(r)}`,s=o===0?i:`${t},${i}`;return s.length>Tu?(je&&h.warn(`Not adding key: ${n} with val: ${r} to baggage header due to exceeding baggage size limits.`),t):s},"")}var Iu=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function Cr(e){if(!e)return;let t=e.match(Iu);if(!t)return;let n;return t[3]==="1"?n=!0:t[3]==="0"&&(n=!1),{traceId:t[1],parentSampled:n,parentSpanId:t[2]}}function Ns(e,t){let n=Cr(e),r=Lo(t),{traceId:o,parentSpanId:i,parentSampled:s}=n||{};return n?{traceparentData:n,dynamicSamplingContext:r||{},propagationContext:{traceId:o||B(),parentSpanId:i||B().substring(16),spanId:B().substring(16),sampled:s,dsc:r||{}}}:{traceparentData:n,dynamicSamplingContext:void 0,propagationContext:{traceId:o||B(),spanId:B().substring(16)}}}function Rr(e,t){let n=Cr(e),r=Lo(t),{traceId:o,parentSpanId:i,parentSampled:s}=n||{};return n?{traceId:o||B(),parentSpanId:i||B().substring(16),spanId:B().substring(16),sampled:s,dsc:r||{}}:{traceId:o||B(),spanId:B().substring(16)}}function tn(e=B(),t=B().substring(16),n){let r="";return n!==void 0&&(r=n?"-1":"-0"),`${e}-${t}${r}`}f();function he(e,t=[]){return[e,t]}function Ls(e,t){let[n,r]=e;return[n,[...r,t]]}function nt(e,t){let n=e[1];for(let r of n){let o=r[0].type;if(t(r,o))return!0}return!1}function Ps(e,t){return nt(e,(n,r)=>t.includes(r))}function Ds(e,t){return(t||new TextEncoder).encode(e)}function kr(e,t){let[n,r]=e,o=JSON.stringify(n);function i(s){typeof o=="string"?o=typeof s=="string"?o+s:[Ds(o,t),s]:o.push(typeof s=="string"?Ds(s,t):s)}for(let s of r){let[a,c]=s;if(i(`
|
|
8
8
|
${JSON.stringify(a)}
|
|
9
|
-
`),typeof c=="string"||c instanceof Uint8Array)i(c);else{let u;try{u=JSON.stringify(c)}catch{u=JSON.stringify(be(c))}i(u)}}return typeof o=="string"?o:zm(o)}function zm(e){let t=e.reduce((o,i)=>o+i.length,0),n=new Uint8Array(t),r=0;for(let o of e)n.set(o,r),r+=o.length;return n}function Fs(e,t,n){let r=typeof e=="string"?t.encode(e):e;function o(c){let u=r.subarray(0,c);return r=r.subarray(c+1),u}function i(){let c=r.indexOf(10);return c<0&&(c=r.length),JSON.parse(n.decode(o(c)))}let s=i(),a=[];for(;r.length;){let c=i(),u=typeof c.length=="number"?c.length:void 0;a.push([c,u?o(u):i()])}return[s,a]}function Bs(e,t){let n=typeof e.data=="string"?Ds(e.data,t):e.data;return[J({type:"attachment",length:n.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),n]}var jm={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",feedback:"feedback",span:"span",statsd:"metric_bucket"};function Po(e){return jm[e]}function On(e){if(!e||!e.sdk)return;let{name:t,version:n}=e.sdk;return{name:t,version:n}}function Ar(e,t,n,r){let o=e.sdkProcessingMetadata&&e.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date().toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:Te(r)},...o&&{trace:J({...o})}}}f();function Hs(e,t,n){let r=[{type:"client_report"},{timestamp:n||ft(),discarded_events:e}];return he(t?{dsn:t}:{},[r])}f();function Fo(e,t=Date.now()){let n=parseInt(`${e}`,10);if(!isNaN(n))return n*1e3;let r=Date.parse(`${e}`);return isNaN(r)?6e4:r-t}function vu(e,t){return e[t]||e.all||0}function Or(e,t,n=Date.now()){return vu(e,t)>n}function Mr(e,{statusCode:t,headers:n},r=Date.now()){let o={...e},i=n&&n["x-sentry-rate-limits"],s=n&&n["retry-after"];if(i)for(let a of i.trim().split(",")){let[c,u,,,l]=a.split(":",5),d=parseInt(c,10),p=(isNaN(d)?60:d)*1e3;if(!u)o.all=r+p;else for(let m of u.split(";"))m==="metric_bucket"?(!l||l.split(";").includes("custom"))&&(o[m]=r+p):o[m]=r+p}else s?o.all=r+Fo(s,r):t===429&&(o.all=r+60*1e3);return o}f();function xu(e,t){return e(t.stack||"",1)}function Us(e,t){let n={type:t.name||t.constructor.name,value:t.message},r=xu(e,t);return r.length&&(n.stacktrace={frames:r}),n}f();function $s(e,t){return e??t()}f();function nn(e){let t,n=e[0],r=1;for(;r<e.length;){let o=e[r],i=e[r+1];if(r+=2,(o==="optionalAccess"||o==="optionalCall")&&n==null)return;o==="access"||o==="optionalAccess"?(t=n,n=i(n)):(o==="call"||o==="optionalCall")&&(n=i((...s)=>n.call(t,...s)),t=void 0)}return n}f();var I=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;f();f();var rt="production";f();f();function Nr(){return dr("globalEventProcessors",()=>[])}function Bo(e){Nr().push(e)}function rn(e,t,n,r=0){return new $e((o,i)=>{let s=e[r];if(t===null||typeof s!="function")o(t);else{let a=s({...t},n);I&&s.id&&a===null&&h.log(`Event processor "${s.id}" dropped event`),ze(a)?a.then(c=>rn(e,c,n,r+1).then(o)).then(null,i):rn(e,a,n,r+1).then(o).then(null,i)}})}f();function Ho(e){let t=Ie(),n={sid:B(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>qm(n)};return e&&ot(n,e),n}function ot(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),!e.did&&!t.did&&(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||Ie(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=t.sid.length===32?t.sid:B()),t.init!==void 0&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),typeof t.started=="number"&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if(typeof t.duration=="number")e.duration=t.duration;else{let n=e.timestamp-e.started;e.duration=n>=0?n:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),typeof t.errors=="number"&&(e.errors=t.errors),t.status&&(e.status=t.status)}function Uo(e,t){let n={};t?n={status:t}:e.status==="ok"&&(n={status:"exited"}),ot(e,n)}function qm(e){return J({sid:`${e.sid}`,init:e.init,started:new Date(e.started*1e3).toISOString(),timestamp:new Date(e.timestamp*1e3).toISOString(),status:e.status,errors:e.errors,did:typeof e.did=="number"||typeof e.did=="string"?`${e.did}`:void 0,duration:e.duration,abnormal_mechanism:e.abnormal_mechanism,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}})}f();f();f();f();f();var Cu=0,Gs=1;function on(e){let{spanId:t,traceId:n}=e.spanContext(),{data:r,op:o,parent_span_id:i,status:s,tags:a,origin:c}=P(e);return J({data:r,op:o,parent_span_id:i,span_id:t,status:s,tags:a,trace_id:n,origin:c})}function vt(e){let{traceId:t,spanId:n}=e.spanContext(),r=Mn(e);return tn(t,n,r)}function Ot(e){return typeof e=="number"?wu(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?wu(e.getTime()):Ie()}function wu(e){return e>9999999999?e/1e3:e}function P(e){return Ym(e)?e.getSpanJSON():typeof e.toJSON=="function"?e.toJSON():{}}function Ym(e){return typeof e.getSpanJSON=="function"}function Mn(e){let{traceFlags:t}=e.spanContext();return!!(t&Gs)}function sn(e,t,n,r,o,i){let{normalizeDepth:s=3,normalizeMaxBreadth:a=1e3}=e,c={...t,event_id:t.event_id||n.event_id||B(),timestamp:t.timestamp||ft()},u=n.integrations||e.integrations.map(T=>T.name);Vm(c,e),Xm(c,u),t.type===void 0&&Km(c,e.stackParser);let l=Qm(r,n.captureContext);n.mechanism&&Ue(c,n.mechanism);let d=o&&o.getEventProcessors?o.getEventProcessors():[],p=zs().getScopeData();if(i){let T=i.getScopeData();Ws(p,T)}if(l){let T=l.getScopeData();Ws(p,T)}let m=[...n.attachments||[],...p.attachments];m.length&&(n.attachments=m),$o(c,p);let g=[...d,...Nr(),...p.eventProcessors];return rn(g,c,n).then(T=>(T&&Jm(T),typeof s=="number"&&s>0?Zm(T,s,a):T))}function Vm(e,t){let{environment:n,release:r,dist:o,maxValueLength:i=250}=t;"environment"in e||(e.environment="environment"in t?n:rt),e.release===void 0&&r!==void 0&&(e.release=r),e.dist===void 0&&o!==void 0&&(e.dist=o),e.message&&(e.message=lt(e.message,i));let s=e.exception&&e.exception.values&&e.exception.values[0];s&&s.value&&(s.value=lt(s.value,i));let a=e.request;a&&a.url&&(a.url=lt(a.url,i))}var Ru=new WeakMap;function Km(e,t){let n=C._sentryDebugIds;if(!n)return;let r,o=Ru.get(t);o?r=o:(r=new Map,Ru.set(t,r));let i=Object.keys(n).reduce((s,a)=>{let c,u=r.get(a);u?c=u:(c=t(a),r.set(a,c));for(let l=c.length-1;l>=0;l--){let d=c[l];if(d.filename){s[d.filename]=n[a];break}}return s},{});try{e.exception.values.forEach(s=>{s.stacktrace.frames.forEach(a=>{a.filename&&(a.debug_id=i[a.filename])})})}catch{}}function Jm(e){let t={};try{e.exception.values.forEach(r=>{r.stacktrace.frames.forEach(o=>{o.debug_id&&(o.abs_path?t[o.abs_path]=o.debug_id:o.filename&&(t[o.filename]=o.debug_id),delete o.debug_id)})})}catch{}if(Object.keys(t).length===0)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];let n=e.debug_meta.images;Object.keys(t).forEach(r=>{n.push({type:"sourcemap",code_file:r,debug_id:t[r]})})}function Xm(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function Zm(e,t,n){if(!e)return null;let r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(o=>({...o,...o.data&&{data:be(o.data,t,n)}}))},...e.user&&{user:be(e.user,t,n)},...e.contexts&&{contexts:be(e.contexts,t,n)},...e.extra&&{extra:be(e.extra,t,n)}};return e.contexts&&e.contexts.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=be(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map(o=>{let i=P(o).data;return i&&(o.data=be(i,t,n)),o})),r}function Qm(e,t){if(!t)return e;let n=e?e.clone():new it;return n.update(t),n}function ku(e){if(e)return eh(e)?{captureContext:e}:nh(e)?{captureContext:e}:e}function eh(e){return e instanceof it||typeof e=="function"}var th=["user","level","extra","contexts","tags","fingerprint","requestSession","propagationContext"];function nh(e){return Object.keys(e).some(t=>th.includes(t))}function xt(e,t){return W().captureException(e,ku(t))}function an(e,t){let n=typeof t=="string"?t:void 0,r=typeof t!="string"?{captureContext:t}:void 0;return W().captureMessage(e,n,r)}function Mt(e,t){return W().captureEvent(e,t)}function Au(e){W().configureScope(e)}function Ye(e,t){W().addBreadcrumb(e,t)}function Go(e,t){W().setContext(e,t)}function Ou(e){W().setExtras(e)}function Mu(e,t){W().setExtra(e,t)}function Nu(e){W().setTags(e)}function Du(e,t){W().setTag(e,t)}function Lu(e){W().setUser(e)}function De(...e){let t=W();if(e.length===2){let[n,r]=e;return n?t.withScope(()=>(t.getStackTop().scope=n,r(n))):t.withScope(r)}return t.withScope(e[0])}function Pu(e){return cn(()=>e(ge()))}function Fu(e,t){return De(n=>(n.setSpan(e),t(n)))}function Bu(e,t){return W().startTransaction({...e},t)}async function Hu(e){let t=x();return t?t.flush(e):(I&&h.warn("Cannot flush events. No client defined."),Promise.resolve(!1))}async function Uu(e){let t=x();return t?t.close(e):(I&&h.warn("Cannot flush events and disable SDK. No client defined."),Promise.resolve(!1))}function $u(){return W().lastEventId()}function x(){return W().getClient()}function Gu(){return!!x()}function q(){return W().getScope()}function Dr(e){let t=x(),n=ge(),r=q(),{release:o,environment:i=rt}=t&&t.getOptions()||{},{userAgent:s}=C.navigator||{},a=Ho({release:o,environment:i,user:r.getUser()||n.getUser(),...s&&{userAgent:s},...e}),c=n.getSession();return c&&c.status==="ok"&&ot(c,{status:"exited"}),Wo(),n.setSession(a),r.setSession(a),a}function Wo(){let e=ge(),t=q(),n=t.getSession()||e.getSession();n&&Uo(n),Wu(),e.setSession(),t.setSession()}function Wu(){let e=ge(),t=q(),n=x(),r=t.getSession()||e.getSession();r&&n&&n.captureSession&&n.captureSession(r)}function Lr(e=!1){if(e){Wo();return}Wu()}f();function un(e){return e.transaction}function Nt(e,t,n){let r=t.getOptions(),{publicKey:o}=t.getDsn()||{},{segment:i}=n&&n.getUser()||{},s=J({environment:r.environment||rt,release:r.release,user_segment:i,public_key:o,trace_id:e});return t.emit&&t.emit("createDsc",s),s}function Ve(e){let t=x();if(!t)return{};let n=Nt(P(e).trace_id||"",t,q()),r=un(e);if(!r)return n;let o=r&&r._frozenDynamicSamplingContext;if(o)return o;let{sampleRate:i,source:s}=r.metadata;i!=null&&(n.sample_rate=`${i}`);let a=P(r);return s&&s!=="url"&&(n.transaction=a.description),n.sampled=String(Mn(r)),t.emit&&t.emit("createDsc",n),n}function $o(e,t){let{fingerprint:n,span:r,breadcrumbs:o,sdkProcessingMetadata:i}=t;rh(e,t),r&&sh(e,r),ah(e,n),oh(e,o),ih(e,i)}function Ws(e,t){let{extra:n,tags:r,user:o,contexts:i,level:s,sdkProcessingMetadata:a,breadcrumbs:c,fingerprint:u,eventProcessors:l,attachments:d,propagationContext:p,transactionName:m,span:g}=t;Pr(e,"extra",n),Pr(e,"tags",r),Pr(e,"user",o),Pr(e,"contexts",i),Pr(e,"sdkProcessingMetadata",a),s&&(e.level=s),m&&(e.transactionName=m),g&&(e.span=g),c.length&&(e.breadcrumbs=[...e.breadcrumbs,...c]),u.length&&(e.fingerprint=[...e.fingerprint,...u]),l.length&&(e.eventProcessors=[...e.eventProcessors,...l]),d.length&&(e.attachments=[...e.attachments,...d]),e.propagationContext={...e.propagationContext,...p}}function Pr(e,t,n){if(n&&Object.keys(n).length){e[t]={...e[t]};for(let r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[t][r]=n[r])}}function rh(e,t){let{extra:n,tags:r,user:o,contexts:i,level:s,transactionName:a}=t,c=J(n);c&&Object.keys(c).length&&(e.extra={...c,...e.extra});let u=J(r);u&&Object.keys(u).length&&(e.tags={...u,...e.tags});let l=J(o);l&&Object.keys(l).length&&(e.user={...l,...e.user});let d=J(i);d&&Object.keys(d).length&&(e.contexts={...d,...e.contexts}),s&&(e.level=s),a&&(e.transaction=a)}function oh(e,t){let n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}function ih(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function sh(e,t){e.contexts={trace:on(t),...e.contexts};let n=un(t);if(n){e.sdkProcessingMetadata={dynamicSamplingContext:Ve(t),...e.sdkProcessingMetadata};let r=P(n).description;r&&(e.tags={transaction:r,...e.tags})}}function ah(e,t){e.fingerprint=e.fingerprint?_r(e.fingerprint):[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}var ch=100,js,it=class e{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext=zu()}static clone(t){return t?t.clone():new e}clone(){let t=new e;return t._breadcrumbs=[...this._breadcrumbs],t._tags={...this._tags},t._extra={...this._extra},t._contexts={...this._contexts},t._user=this._user,t._level=this._level,t._span=this._span,t._session=this._session,t._transactionName=this._transactionName,t._fingerprint=this._fingerprint,t._eventProcessors=[...this._eventProcessors],t._requestSession=this._requestSession,t._attachments=[...this._attachments],t._sdkProcessingMetadata={...this._sdkProcessingMetadata},t._propagationContext={...this._propagationContext},t._client=this._client,t}setClient(t){this._client=t}getClient(){return this._client}addScopeListener(t){this._scopeListeners.push(t)}addEventProcessor(t){return this._eventProcessors.push(t),this}setUser(t){return this._user=t||{email:void 0,id:void 0,ip_address:void 0,segment:void 0,username:void 0},this._session&&ot(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,n){return this._tags={...this._tags,[t]:n},this._notifyScopeListeners(),this}setExtras(t){return this._extra={...this._extra,...t},this._notifyScopeListeners(),this}setExtra(t,n){return this._extra={...this._extra,[t]:n},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,n){return n===null?delete this._contexts[t]:this._contexts[t]=n,this._notifyScopeListeners(),this}setSpan(t){return this._span=t,this._notifyScopeListeners(),this}getSpan(){return this._span}getTransaction(){let t=this._span;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;let n=typeof t=="function"?t(this):t;if(n instanceof e){let r=n.getScopeData();this._tags={...this._tags,...r.tags},this._extra={...this._extra,...r.extra},this._contexts={...this._contexts,...r.contexts},r.user&&Object.keys(r.user).length&&(this._user=r.user),r.level&&(this._level=r.level),r.fingerprint.length&&(this._fingerprint=r.fingerprint),n.getRequestSession()&&(this._requestSession=n.getRequestSession()),r.propagationContext&&(this._propagationContext=r.propagationContext)}else if(Fe(n)){let r=t;this._tags={...this._tags,...r.tags},this._extra={...this._extra,...r.extra},this._contexts={...this._contexts,...r.contexts},r.user&&(this._user=r.user),r.level&&(this._level=r.level),r.fingerprint&&(this._fingerprint=r.fingerprint),r.requestSession&&(this._requestSession=r.requestSession),r.propagationContext&&(this._propagationContext=r.propagationContext)}return 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._propagationContext=zu(),this}addBreadcrumb(t,n){let r=typeof n=="number"?n:ch;if(r<=0)return this;let o={timestamp:ft(),...t},i=this._breadcrumbs;return i.push(o),this._breadcrumbs=i.length>r?i.slice(-r):i,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.getScopeData().attachments}clearAttachments(){return this._attachments=[],this}getScopeData(){let{_breadcrumbs:t,_attachments:n,_contexts:r,_tags:o,_extra:i,_user:s,_level:a,_fingerprint:c,_eventProcessors:u,_propagationContext:l,_sdkProcessingMetadata:d,_transactionName:p,_span:m}=this;return{breadcrumbs:t,attachments:n,contexts:r,tags:o,extra:i,user:s,level:a,fingerprint:c||[],eventProcessors:u,propagationContext:l,sdkProcessingMetadata:d,transactionName:p,span:m}}applyToEvent(t,n={},r=[]){$o(t,this.getScopeData());let o=[...r,...Nr(),...this._eventProcessors];return rn(o,t,n)}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata={...this._sdkProcessingMetadata,...t},this}setPropagationContext(t){return this._propagationContext=t,this}getPropagationContext(){return this._propagationContext}captureException(t,n){let r=n&&n.event_id?n.event_id:B();if(!this._client)return h.warn("No client configured on scope - will not capture exception!"),r;let o=new Error("Sentry syntheticException");return this._client.captureException(t,{originalException:t,syntheticException:o,...n,event_id:r},this),r}captureMessage(t,n,r){let o=r&&r.event_id?r.event_id:B();if(!this._client)return h.warn("No client configured on scope - will not capture message!"),o;let i=new Error(t);return this._client.captureMessage(t,n,{originalException:t,syntheticException:i,...r,event_id:o},this),o}captureEvent(t,n){let r=n&&n.event_id?n.event_id:B();return this._client?(this._client.captureEvent(t,{...n,event_id:r},this),r):(h.warn("No client configured on scope - will not capture event!"),r)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(t=>{t(this)}),this._notifyingListeners=!1)}};function zs(){return js||(js=new it),js}function zu(){return{traceId:B(),spanId:B().substring(16)}}f();var ln="7.117.0";var ju=parseFloat(ln),uh=100,Nn=class{constructor(t,n,r,o=ju){this._version=o;let i;n?i=n:(i=new it,i.setClient(t));let s;r?s=r:(s=new it,s.setClient(t)),this._stack=[{scope:i}],t&&this.bindClient(t),this._isolationScope=s}isOlderThan(t){return this._version<t}bindClient(t){let n=this.getStackTop();n.client=t,n.scope.setClient(t),t&&t.setupIntegrations&&t.setupIntegrations()}pushScope(){let t=this.getScope().clone();return this.getStack().push({client:this.getClient(),scope:t}),t}popScope(){return this.getStack().length<=1?!1:!!this.getStack().pop()}withScope(t){let n=this.pushScope(),r;try{r=t(n)}catch(o){throw this.popScope(),o}return ze(r)?r.then(o=>(this.popScope(),o),o=>{throw this.popScope(),o}):(this.popScope(),r)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStack(){return this._stack}getStackTop(){return this._stack[this._stack.length-1]}captureException(t,n){let r=this._lastEventId=n&&n.event_id?n.event_id:B(),o=new Error("Sentry syntheticException");return this.getScope().captureException(t,{originalException:t,syntheticException:o,...n,event_id:r}),r}captureMessage(t,n,r){let o=this._lastEventId=r&&r.event_id?r.event_id:B(),i=new Error(t);return this.getScope().captureMessage(t,n,{originalException:t,syntheticException:i,...r,event_id:o}),o}captureEvent(t,n){let r=n&&n.event_id?n.event_id:B();return t.type||(this._lastEventId=r),this.getScope().captureEvent(t,{...n,event_id:r}),r}lastEventId(){return this._lastEventId}addBreadcrumb(t,n){let{scope:r,client:o}=this.getStackTop();if(!o)return;let{beforeBreadcrumb:i=null,maxBreadcrumbs:s=uh}=o.getOptions&&o.getOptions()||{};if(s<=0)return;let c={timestamp:ft(),...t},u=i?Re(()=>i(c,n)):c;u!==null&&(o.emit&&o.emit("beforeAddBreadcrumb",u,n),r.addBreadcrumb(u,s))}setUser(t){this.getScope().setUser(t),this.getIsolationScope().setUser(t)}setTags(t){this.getScope().setTags(t),this.getIsolationScope().setTags(t)}setExtras(t){this.getScope().setExtras(t),this.getIsolationScope().setExtras(t)}setTag(t,n){this.getScope().setTag(t,n),this.getIsolationScope().setTag(t,n)}setExtra(t,n){this.getScope().setExtra(t,n),this.getIsolationScope().setExtra(t,n)}setContext(t,n){this.getScope().setContext(t,n),this.getIsolationScope().setContext(t,n)}configureScope(t){let{scope:n,client:r}=this.getStackTop();r&&t(n)}run(t){let n=zo(this);try{t(this)}finally{zo(n)}}getIntegration(t){let n=this.getClient();if(!n)return null;try{return n.getIntegration(t)}catch{return I&&h.warn(`Cannot retrieve integration ${t.id} from the current Hub`),null}}startTransaction(t,n){let r=this._callExtensionMethod("startTransaction",t,n);return I&&!r&&(this.getClient()?h.warn(`Tracing extension 'startTransaction' has not been added. Call 'addTracingExtensions' before calling 'init':
|
|
9
|
+
`),typeof c=="string"||c instanceof Uint8Array)i(c);else{let u;try{u=JSON.stringify(c)}catch{u=JSON.stringify(be(c))}i(u)}}return typeof o=="string"?o:zm(o)}function zm(e){let t=e.reduce((o,i)=>o+i.length,0),n=new Uint8Array(t),r=0;for(let o of e)n.set(o,r),r+=o.length;return n}function Fs(e,t,n){let r=typeof e=="string"?t.encode(e):e;function o(c){let u=r.subarray(0,c);return r=r.subarray(c+1),u}function i(){let c=r.indexOf(10);return c<0&&(c=r.length),JSON.parse(n.decode(o(c)))}let s=i(),a=[];for(;r.length;){let c=i(),u=typeof c.length=="number"?c.length:void 0;a.push([c,u?o(u):i()])}return[s,a]}function Bs(e,t){let n=typeof e.data=="string"?Ds(e.data,t):e.data;return[J({type:"attachment",length:n.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),n]}var jm={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",feedback:"feedback",span:"span",statsd:"metric_bucket"};function Po(e){return jm[e]}function On(e){if(!e||!e.sdk)return;let{name:t,version:n}=e.sdk;return{name:t,version:n}}function Ar(e,t,n,r){let o=e.sdkProcessingMetadata&&e.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:e.event_id,sent_at:new Date().toISOString(),...t&&{sdk:t},...!!n&&r&&{dsn:Te(r)},...o&&{trace:J({...o})}}}f();function Hs(e,t,n){let r=[{type:"client_report"},{timestamp:n||ft(),discarded_events:e}];return he(t?{dsn:t}:{},[r])}f();function Fo(e,t=Date.now()){let n=parseInt(`${e}`,10);if(!isNaN(n))return n*1e3;let r=Date.parse(`${e}`);return isNaN(r)?6e4:r-t}function vu(e,t){return e[t]||e.all||0}function Or(e,t,n=Date.now()){return vu(e,t)>n}function Mr(e,{statusCode:t,headers:n},r=Date.now()){let o={...e},i=n&&n["x-sentry-rate-limits"],s=n&&n["retry-after"];if(i)for(let a of i.trim().split(",")){let[c,u,,,l]=a.split(":",5),d=parseInt(c,10),p=(isNaN(d)?60:d)*1e3;if(!u)o.all=r+p;else for(let m of u.split(";"))m==="metric_bucket"?(!l||l.split(";").includes("custom"))&&(o[m]=r+p):o[m]=r+p}else s?o.all=r+Fo(s,r):t===429&&(o.all=r+60*1e3);return o}f();function xu(e,t){return e(t.stack||"",1)}function Us(e,t){let n={type:t.name||t.constructor.name,value:t.message},r=xu(e,t);return r.length&&(n.stacktrace={frames:r}),n}f();function $s(e,t){return e??t()}f();function nn(e){let t,n=e[0],r=1;for(;r<e.length;){let o=e[r],i=e[r+1];if(r+=2,(o==="optionalAccess"||o==="optionalCall")&&n==null)return;o==="access"||o==="optionalAccess"?(t=n,n=i(n)):(o==="call"||o==="optionalCall")&&(n=i((...s)=>n.call(t,...s)),t=void 0)}return n}f();var I=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;f();f();var rt="production";f();f();function Nr(){return dr("globalEventProcessors",()=>[])}function Bo(e){Nr().push(e)}function rn(e,t,n,r=0){return new $e((o,i)=>{let s=e[r];if(t===null||typeof s!="function")o(t);else{let a=s({...t},n);I&&s.id&&a===null&&h.log(`Event processor "${s.id}" dropped event`),ze(a)?a.then(c=>rn(e,c,n,r+1).then(o)).then(null,i):rn(e,a,n,r+1).then(o).then(null,i)}})}f();function Ho(e){let t=Ie(),n={sid:B(),init:!0,timestamp:t,started:t,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>qm(n)};return e&&ot(n,e),n}function ot(e,t={}){if(t.user&&(!e.ipAddress&&t.user.ip_address&&(e.ipAddress=t.user.ip_address),!e.did&&!t.did&&(e.did=t.user.id||t.user.email||t.user.username)),e.timestamp=t.timestamp||Ie(),t.abnormal_mechanism&&(e.abnormal_mechanism=t.abnormal_mechanism),t.ignoreDuration&&(e.ignoreDuration=t.ignoreDuration),t.sid&&(e.sid=t.sid.length===32?t.sid:B()),t.init!==void 0&&(e.init=t.init),!e.did&&t.did&&(e.did=`${t.did}`),typeof t.started=="number"&&(e.started=t.started),e.ignoreDuration)e.duration=void 0;else if(typeof t.duration=="number")e.duration=t.duration;else{let n=e.timestamp-e.started;e.duration=n>=0?n:0}t.release&&(e.release=t.release),t.environment&&(e.environment=t.environment),!e.ipAddress&&t.ipAddress&&(e.ipAddress=t.ipAddress),!e.userAgent&&t.userAgent&&(e.userAgent=t.userAgent),typeof t.errors=="number"&&(e.errors=t.errors),t.status&&(e.status=t.status)}function Uo(e,t){let n={};t?n={status:t}:e.status==="ok"&&(n={status:"exited"}),ot(e,n)}function qm(e){return J({sid:`${e.sid}`,init:e.init,started:new Date(e.started*1e3).toISOString(),timestamp:new Date(e.timestamp*1e3).toISOString(),status:e.status,errors:e.errors,did:typeof e.did=="number"||typeof e.did=="string"?`${e.did}`:void 0,duration:e.duration,abnormal_mechanism:e.abnormal_mechanism,attrs:{release:e.release,environment:e.environment,ip_address:e.ipAddress,user_agent:e.userAgent}})}f();f();f();f();f();var Cu=0,Gs=1;function on(e){let{spanId:t,traceId:n}=e.spanContext(),{data:r,op:o,parent_span_id:i,status:s,tags:a,origin:c}=P(e);return J({data:r,op:o,parent_span_id:i,span_id:t,status:s,tags:a,trace_id:n,origin:c})}function vt(e){let{traceId:t,spanId:n}=e.spanContext(),r=Mn(e);return tn(t,n,r)}function Ot(e){return typeof e=="number"?wu(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?wu(e.getTime()):Ie()}function wu(e){return e>9999999999?e/1e3:e}function P(e){return Ym(e)?e.getSpanJSON():typeof e.toJSON=="function"?e.toJSON():{}}function Ym(e){return typeof e.getSpanJSON=="function"}function Mn(e){let{traceFlags:t}=e.spanContext();return!!(t&Gs)}function sn(e,t,n,r,o,i){let{normalizeDepth:s=3,normalizeMaxBreadth:a=1e3}=e,c={...t,event_id:t.event_id||n.event_id||B(),timestamp:t.timestamp||ft()},u=n.integrations||e.integrations.map(T=>T.name);Vm(c,e),Xm(c,u),t.type===void 0&&Km(c,e.stackParser);let l=Qm(r,n.captureContext);n.mechanism&&Ue(c,n.mechanism);let d=o&&o.getEventProcessors?o.getEventProcessors():[],p=zs().getScopeData();if(i){let T=i.getScopeData();Ws(p,T)}if(l){let T=l.getScopeData();Ws(p,T)}let m=[...n.attachments||[],...p.attachments];m.length&&(n.attachments=m),$o(c,p);let g=[...d,...Nr(),...p.eventProcessors];return rn(g,c,n).then(T=>(T&&Jm(T),typeof s=="number"&&s>0?Zm(T,s,a):T))}function Vm(e,t){let{environment:n,release:r,dist:o,maxValueLength:i=250}=t;"environment"in e||(e.environment="environment"in t?n:rt),e.release===void 0&&r!==void 0&&(e.release=r),e.dist===void 0&&o!==void 0&&(e.dist=o),e.message&&(e.message=lt(e.message,i));let s=e.exception&&e.exception.values&&e.exception.values[0];s&&s.value&&(s.value=lt(s.value,i));let a=e.request;a&&a.url&&(a.url=lt(a.url,i))}var Ru=new WeakMap;function Km(e,t){let n=C._sentryDebugIds;if(!n)return;let r,o=Ru.get(t);o?r=o:(r=new Map,Ru.set(t,r));let i=Object.keys(n).reduce((s,a)=>{let c,u=r.get(a);u?c=u:(c=t(a),r.set(a,c));for(let l=c.length-1;l>=0;l--){let d=c[l];if(d.filename){s[d.filename]=n[a];break}}return s},{});try{e.exception.values.forEach(s=>{s.stacktrace.frames.forEach(a=>{a.filename&&(a.debug_id=i[a.filename])})})}catch{}}function Jm(e){let t={};try{e.exception.values.forEach(r=>{r.stacktrace.frames.forEach(o=>{o.debug_id&&(o.abs_path?t[o.abs_path]=o.debug_id:o.filename&&(t[o.filename]=o.debug_id),delete o.debug_id)})})}catch{}if(Object.keys(t).length===0)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];let n=e.debug_meta.images;Object.keys(t).forEach(r=>{n.push({type:"sourcemap",code_file:r,debug_id:t[r]})})}function Xm(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}function Zm(e,t,n){if(!e)return null;let r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(o=>({...o,...o.data&&{data:be(o.data,t,n)}}))},...e.user&&{user:be(e.user,t,n)},...e.contexts&&{contexts:be(e.contexts,t,n)},...e.extra&&{extra:be(e.extra,t,n)}};return e.contexts&&e.contexts.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=be(e.contexts.trace.data,t,n))),e.spans&&(r.spans=e.spans.map(o=>{let i=P(o).data;return i&&(o.data=be(i,t,n)),o})),r}function Qm(e,t){if(!t)return e;let n=e?e.clone():new it;return n.update(t),n}function ku(e){if(e)return eh(e)?{captureContext:e}:nh(e)?{captureContext:e}:e}function eh(e){return e instanceof it||typeof e=="function"}var th=["user","level","extra","contexts","tags","fingerprint","requestSession","propagationContext"];function nh(e){return Object.keys(e).some(t=>th.includes(t))}function xt(e,t){return W().captureException(e,ku(t))}function an(e,t){let n=typeof t=="string"?t:void 0,r=typeof t!="string"?{captureContext:t}:void 0;return W().captureMessage(e,n,r)}function Mt(e,t){return W().captureEvent(e,t)}function Au(e){W().configureScope(e)}function Ye(e,t){W().addBreadcrumb(e,t)}function Go(e,t){W().setContext(e,t)}function Ou(e){W().setExtras(e)}function Mu(e,t){W().setExtra(e,t)}function Nu(e){W().setTags(e)}function Du(e,t){W().setTag(e,t)}function Lu(e){W().setUser(e)}function De(...e){let t=W();if(e.length===2){let[n,r]=e;return n?t.withScope(()=>(t.getStackTop().scope=n,r(n))):t.withScope(r)}return t.withScope(e[0])}function Pu(e){return cn(()=>e(ge()))}function Fu(e,t){return De(n=>(n.setSpan(e),t(n)))}function Bu(e,t){return W().startTransaction({...e},t)}async function Hu(e){let t=x();return t?t.flush(e):(I&&h.warn("Cannot flush events. No client defined."),Promise.resolve(!1))}async function Uu(e){let t=x();return t?t.close(e):(I&&h.warn("Cannot flush events and disable SDK. No client defined."),Promise.resolve(!1))}function $u(){return W().lastEventId()}function x(){return W().getClient()}function Gu(){return!!x()}function q(){return W().getScope()}function Dr(e){let t=x(),n=ge(),r=q(),{release:o,environment:i=rt}=t&&t.getOptions()||{},{userAgent:s}=C.navigator||{},a=Ho({release:o,environment:i,user:r.getUser()||n.getUser(),...s&&{userAgent:s},...e}),c=n.getSession();return c&&c.status==="ok"&&ot(c,{status:"exited"}),Wo(),n.setSession(a),r.setSession(a),a}function Wo(){let e=ge(),t=q(),n=t.getSession()||e.getSession();n&&Uo(n),Wu(),e.setSession(),t.setSession()}function Wu(){let e=ge(),t=q(),n=x(),r=t.getSession()||e.getSession();r&&n&&n.captureSession&&n.captureSession(r)}function Lr(e=!1){if(e){Wo();return}Wu()}f();function un(e){return e.transaction}function Nt(e,t,n){let r=t.getOptions(),{publicKey:o}=t.getDsn()||{},{segment:i}=n&&n.getUser()||{},s=J({environment:r.environment||rt,release:r.release,user_segment:i,public_key:o,trace_id:e});return t.emit&&t.emit("createDsc",s),s}function Ve(e){let t=x();if(!t)return{};let n=Nt(P(e).trace_id||"",t,q()),r=un(e);if(!r)return n;let o=r&&r._frozenDynamicSamplingContext;if(o)return o;let{sampleRate:i,source:s}=r.metadata;i!=null&&(n.sample_rate=`${i}`);let a=P(r);return s&&s!=="url"&&(n.transaction=a.description),n.sampled=String(Mn(r)),t.emit&&t.emit("createDsc",n),n}function $o(e,t){let{fingerprint:n,span:r,breadcrumbs:o,sdkProcessingMetadata:i}=t;rh(e,t),r&&sh(e,r),ah(e,n),oh(e,o),ih(e,i)}function Ws(e,t){let{extra:n,tags:r,user:o,contexts:i,level:s,sdkProcessingMetadata:a,breadcrumbs:c,fingerprint:u,eventProcessors:l,attachments:d,propagationContext:p,transactionName:m,span:g}=t;Pr(e,"extra",n),Pr(e,"tags",r),Pr(e,"user",o),Pr(e,"contexts",i),Pr(e,"sdkProcessingMetadata",a),s&&(e.level=s),m&&(e.transactionName=m),g&&(e.span=g),c.length&&(e.breadcrumbs=[...e.breadcrumbs,...c]),u.length&&(e.fingerprint=[...e.fingerprint,...u]),l.length&&(e.eventProcessors=[...e.eventProcessors,...l]),d.length&&(e.attachments=[...e.attachments,...d]),e.propagationContext={...e.propagationContext,...p}}function Pr(e,t,n){if(n&&Object.keys(n).length){e[t]={...e[t]};for(let r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[t][r]=n[r])}}function rh(e,t){let{extra:n,tags:r,user:o,contexts:i,level:s,transactionName:a}=t,c=J(n);c&&Object.keys(c).length&&(e.extra={...c,...e.extra});let u=J(r);u&&Object.keys(u).length&&(e.tags={...u,...e.tags});let l=J(o);l&&Object.keys(l).length&&(e.user={...l,...e.user});let d=J(i);d&&Object.keys(d).length&&(e.contexts={...d,...e.contexts}),s&&(e.level=s),a&&(e.transaction=a)}function oh(e,t){let n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}function ih(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}function sh(e,t){e.contexts={trace:on(t),...e.contexts};let n=un(t);if(n){e.sdkProcessingMetadata={dynamicSamplingContext:Ve(t),...e.sdkProcessingMetadata};let r=P(n).description;r&&(e.tags={transaction:r,...e.tags})}}function ah(e,t){e.fingerprint=e.fingerprint?_r(e.fingerprint):[],t&&(e.fingerprint=e.fingerprint.concat(t)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}var ch=100,js,it=class e{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext=zu()}static clone(t){return t?t.clone():new e}clone(){let t=new e;return t._breadcrumbs=[...this._breadcrumbs],t._tags={...this._tags},t._extra={...this._extra},t._contexts={...this._contexts},t._user=this._user,t._level=this._level,t._span=this._span,t._session=this._session,t._transactionName=this._transactionName,t._fingerprint=this._fingerprint,t._eventProcessors=[...this._eventProcessors],t._requestSession=this._requestSession,t._attachments=[...this._attachments],t._sdkProcessingMetadata={...this._sdkProcessingMetadata},t._propagationContext={...this._propagationContext},t._client=this._client,t}setClient(t){this._client=t}getClient(){return this._client}addScopeListener(t){this._scopeListeners.push(t)}addEventProcessor(t){return this._eventProcessors.push(t),this}setUser(t){return this._user=t||{email:void 0,id:void 0,ip_address:void 0,segment:void 0,username:void 0},this._session&&ot(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,n){return this._tags={...this._tags,[t]:n},this._notifyScopeListeners(),this}setExtras(t){return this._extra={...this._extra,...t},this._notifyScopeListeners(),this}setExtra(t,n){return this._extra={...this._extra,[t]:n},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,n){return n===null?delete this._contexts[t]:this._contexts[t]=n,this._notifyScopeListeners(),this}setSpan(t){return this._span=t,this._notifyScopeListeners(),this}getSpan(){return this._span}getTransaction(){let t=this._span;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;let n=typeof t=="function"?t(this):t;if(n instanceof e){let r=n.getScopeData();this._tags={...this._tags,...r.tags},this._extra={...this._extra,...r.extra},this._contexts={...this._contexts,...r.contexts},r.user&&Object.keys(r.user).length&&(this._user=r.user),r.level&&(this._level=r.level),r.fingerprint.length&&(this._fingerprint=r.fingerprint),n.getRequestSession()&&(this._requestSession=n.getRequestSession()),r.propagationContext&&(this._propagationContext=r.propagationContext)}else if(Fe(n)){let r=t;this._tags={...this._tags,...r.tags},this._extra={...this._extra,...r.extra},this._contexts={...this._contexts,...r.contexts},r.user&&(this._user=r.user),r.level&&(this._level=r.level),r.fingerprint&&(this._fingerprint=r.fingerprint),r.requestSession&&(this._requestSession=r.requestSession),r.propagationContext&&(this._propagationContext=r.propagationContext)}return 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._propagationContext=zu(),this}addBreadcrumb(t,n){let r=typeof n=="number"?n:ch;if(r<=0)return this;let o={timestamp:ft(),...t},i=this._breadcrumbs;return i.push(o),this._breadcrumbs=i.length>r?i.slice(-r):i,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.getScopeData().attachments}clearAttachments(){return this._attachments=[],this}getScopeData(){let{_breadcrumbs:t,_attachments:n,_contexts:r,_tags:o,_extra:i,_user:s,_level:a,_fingerprint:c,_eventProcessors:u,_propagationContext:l,_sdkProcessingMetadata:d,_transactionName:p,_span:m}=this;return{breadcrumbs:t,attachments:n,contexts:r,tags:o,extra:i,user:s,level:a,fingerprint:c||[],eventProcessors:u,propagationContext:l,sdkProcessingMetadata:d,transactionName:p,span:m}}applyToEvent(t,n={},r=[]){$o(t,this.getScopeData());let o=[...r,...Nr(),...this._eventProcessors];return rn(o,t,n)}setSDKProcessingMetadata(t){return this._sdkProcessingMetadata={...this._sdkProcessingMetadata,...t},this}setPropagationContext(t){return this._propagationContext=t,this}getPropagationContext(){return this._propagationContext}captureException(t,n){let r=n&&n.event_id?n.event_id:B();if(!this._client)return h.warn("No client configured on scope - will not capture exception!"),r;let o=new Error("Sentry syntheticException");return this._client.captureException(t,{originalException:t,syntheticException:o,...n,event_id:r},this),r}captureMessage(t,n,r){let o=r&&r.event_id?r.event_id:B();if(!this._client)return h.warn("No client configured on scope - will not capture message!"),o;let i=new Error(t);return this._client.captureMessage(t,n,{originalException:t,syntheticException:i,...r,event_id:o},this),o}captureEvent(t,n){let r=n&&n.event_id?n.event_id:B();return this._client?(this._client.captureEvent(t,{...n,event_id:r},this),r):(h.warn("No client configured on scope - will not capture event!"),r)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(t=>{t(this)}),this._notifyingListeners=!1)}};function zs(){return js||(js=new it),js}function zu(){return{traceId:B(),spanId:B().substring(16)}}f();var ln="7.118.0";var ju=parseFloat(ln),uh=100,Nn=class{constructor(t,n,r,o=ju){this._version=o;let i;n?i=n:(i=new it,i.setClient(t));let s;r?s=r:(s=new it,s.setClient(t)),this._stack=[{scope:i}],t&&this.bindClient(t),this._isolationScope=s}isOlderThan(t){return this._version<t}bindClient(t){let n=this.getStackTop();n.client=t,n.scope.setClient(t),t&&t.setupIntegrations&&t.setupIntegrations()}pushScope(){let t=this.getScope().clone();return this.getStack().push({client:this.getClient(),scope:t}),t}popScope(){return this.getStack().length<=1?!1:!!this.getStack().pop()}withScope(t){let n=this.pushScope(),r;try{r=t(n)}catch(o){throw this.popScope(),o}return ze(r)?r.then(o=>(this.popScope(),o),o=>{throw this.popScope(),o}):(this.popScope(),r)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStack(){return this._stack}getStackTop(){return this._stack[this._stack.length-1]}captureException(t,n){let r=this._lastEventId=n&&n.event_id?n.event_id:B(),o=new Error("Sentry syntheticException");return this.getScope().captureException(t,{originalException:t,syntheticException:o,...n,event_id:r}),r}captureMessage(t,n,r){let o=this._lastEventId=r&&r.event_id?r.event_id:B(),i=new Error(t);return this.getScope().captureMessage(t,n,{originalException:t,syntheticException:i,...r,event_id:o}),o}captureEvent(t,n){let r=n&&n.event_id?n.event_id:B();return t.type||(this._lastEventId=r),this.getScope().captureEvent(t,{...n,event_id:r}),r}lastEventId(){return this._lastEventId}addBreadcrumb(t,n){let{scope:r,client:o}=this.getStackTop();if(!o)return;let{beforeBreadcrumb:i=null,maxBreadcrumbs:s=uh}=o.getOptions&&o.getOptions()||{};if(s<=0)return;let c={timestamp:ft(),...t},u=i?Re(()=>i(c,n)):c;u!==null&&(o.emit&&o.emit("beforeAddBreadcrumb",u,n),r.addBreadcrumb(u,s))}setUser(t){this.getScope().setUser(t),this.getIsolationScope().setUser(t)}setTags(t){this.getScope().setTags(t),this.getIsolationScope().setTags(t)}setExtras(t){this.getScope().setExtras(t),this.getIsolationScope().setExtras(t)}setTag(t,n){this.getScope().setTag(t,n),this.getIsolationScope().setTag(t,n)}setExtra(t,n){this.getScope().setExtra(t,n),this.getIsolationScope().setExtra(t,n)}setContext(t,n){this.getScope().setContext(t,n),this.getIsolationScope().setContext(t,n)}configureScope(t){let{scope:n,client:r}=this.getStackTop();r&&t(n)}run(t){let n=zo(this);try{t(this)}finally{zo(n)}}getIntegration(t){let n=this.getClient();if(!n)return null;try{return n.getIntegration(t)}catch{return I&&h.warn(`Cannot retrieve integration ${t.id} from the current Hub`),null}}startTransaction(t,n){let r=this._callExtensionMethod("startTransaction",t,n);return I&&!r&&(this.getClient()?h.warn(`Tracing extension 'startTransaction' has not been added. Call 'addTracingExtensions' before calling 'init':
|
|
10
10
|
Sentry.addTracingExtensions();
|
|
11
11
|
Sentry.init({...});
|
|
12
12
|
`):h.warn("Tracing extension 'startTransaction' is missing. You should 'init' the SDK before calling 'startTransaction'")),r}traceHeaders(){return this._callExtensionMethod("traceHeaders")}captureSession(t=!1){if(t)return this.endSession();this._sendSessionUpdate()}endSession(){let n=this.getStackTop().scope,r=n.getSession();r&&Uo(r),this._sendSessionUpdate(),n.setSession()}startSession(t){let{scope:n,client:r}=this.getStackTop(),{release:o,environment:i=rt}=r&&r.getOptions()||{},{userAgent:s}=C.navigator||{},a=Ho({release:o,environment:i,user:n.getUser(),...s&&{userAgent:s},...t}),c=n.getSession&&n.getSession();return c&&c.status==="ok"&&ot(c,{status:"exited"}),this.endSession(),n.setSession(a),a}shouldSendDefaultPii(){let t=this.getClient(),n=t&&t.getOptions();return!!(n&&n.sendDefaultPii)}_sendSessionUpdate(){let{scope:t,client:n}=this.getStackTop(),r=t.getSession();r&&n&&n.captureSession&&n.captureSession(r)}_callExtensionMethod(t,...n){let o=Dt().__SENTRY__;if(o&&o.extensions&&typeof o.extensions[t]=="function")return o.extensions[t].apply(this,n);I&&h.warn(`Extension method ${t} couldn't be found, doing nothing.`)}};function Dt(){return C.__SENTRY__=C.__SENTRY__||{extensions:{},hub:void 0},C}function zo(e){let t=Dt(),n=Fr(t);return qs(t,e),n}function W(){let e=Dt();if(e.__SENTRY__&&e.__SENTRY__.acs){let t=e.__SENTRY__.acs.getCurrentHub();if(t)return t}return lh(e)}function ge(){return W().getIsolationScope()}function lh(e=Dt()){return(!dh(e)||Fr(e).isOlderThan(ju))&&qs(e,new Nn),Fr(e)}function cn(e,t={}){let n=Dt();return n.__SENTRY__&&n.__SENTRY__.acs?n.__SENTRY__.acs.runWithAsyncContext(e,t):e()}function dh(e){return!!(e&&e.__SENTRY__&&e.__SENTRY__.hub)}function Fr(e){return dr("hub",()=>new Nn,e)}function qs(e,t){if(!e)return!1;let n=e.__SENTRY__=e.__SENTRY__||{};return n.hub=t,!0}f();f();function ye(e){return(e||W()).getScope().getTransaction()}var qu=Cr;var Yu=!1;function Vu(){Yu||(Yu=!0,br(Ys),Tr(Ys))}function Ys(){let e=ye();if(e){let t="internal_error";I&&h.log(`[Tracing] Transaction: ${t} -> Global error occured`),e.setStatus(t)}}Ys.tag="sentry_tracingErrorCallback";f();f();f();f();var Vs;(function(e){let t="ok";e.Ok=t;let n="deadline_exceeded";e.DeadlineExceeded=n;let r="unauthenticated";e.Unauthenticated=r;let o="permission_denied";e.PermissionDenied=o;let i="not_found";e.NotFound=i;let s="resource_exhausted";e.ResourceExhausted=s;let a="invalid_argument";e.InvalidArgument=a;let c="unimplemented";e.Unimplemented=c;let u="unavailable";e.Unavailable=u;let l="internal_error";e.InternalError=l;let d="unknown_error";e.UnknownError=d;let p="cancelled";e.Cancelled=p;let m="already_exists";e.AlreadyExists=m;let g="failed_precondition";e.FailedPrecondition=g;let E="aborted";e.Aborted=E;let T="out_of_range";e.OutOfRange=T;let S="data_loss";e.DataLoss=S})(Vs||(Vs={}));function jo(e){if(e<400&&e>=100)return"ok";if(e>=400&&e<500)switch(e){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(e>=500&&e<600)switch(e){case 501:return"unimplemented";case 503:return"unavailable";case 504:return"deadline_exceeded";default:return"internal_error"}return"unknown_error"}var Ku=jo;function Lt(e,t){e.setTag("http.status_code",String(t)),e.setData("http.response.status_code",t);let n=jo(t);n!=="unknown_error"&&e.setStatus(n)}f();f();function qo(e,t,n=()=>{}){let r;try{r=e()}catch(o){throw t(o),n(),o}return fh(r,t,n)}function fh(e,t,n){return ze(e)?e.then(r=>(n(),r),r=>{throw t(r),n(),r}):(n(),e)}f();function Ke(e){if(typeof __SENTRY_TRACING__=="boolean"&&!__SENTRY_TRACING__)return!1;let t=x(),n=e||t&&t.getOptions();return!!n&&(n.enableTracing||"tracesSampleRate"in n||"tracesSampler"in n)}function Ju(e,t,n=()=>{},r=()=>{}){let o=W(),i=q(),s=i.getSpan(),a=Vo(e),c=Yo(o,{parentSpan:s,spanContext:a,forceTransaction:!1,scope:i});return i.setSpan(c),qo(()=>t(c),u=>{c&&c.setStatus("internal_error"),n(u,c)},()=>{c&&c.end(),i.setSpan(s),r()})}function Xu(e,t){let n=Vo(e);return cn(()=>De(e.scope,r=>{let o=W(),i=r.getSpan(),a=e.onlyIfParent&&!i?void 0:Yo(o,{parentSpan:i,spanContext:n,forceTransaction:e.forceTransaction,scope:r});return qo(()=>t(a),()=>{if(a){let{status:c}=P(a);(!c||c==="ok")&&a.setStatus("internal_error")}},()=>a&&a.end())}))}function Zu(e,t){let n=Vo(e);return cn(()=>De(e.scope,r=>{let o=W(),i=r.getSpan(),a=e.onlyIfParent&&!i?void 0:Yo(o,{parentSpan:i,spanContext:n,forceTransaction:e.forceTransaction,scope:r});function c(){a&&a.end()}return qo(()=>t(a,c),()=>{if(a&&a.isRecording()){let{status:u}=P(a);(!u||u==="ok")&&a.setStatus("internal_error")}})}))}function Dn(e){if(!Ke())return;let t=Vo(e),n=W(),r=e.scope?e.scope.getSpan():Pt();if(e.onlyIfParent&&!r)return;let s=(e.scope||q()).clone();return Yo(n,{parentSpan:r,spanContext:t,forceTransaction:e.forceTransaction,scope:s})}function Pt(){return q().getSpan()}var Qu=({sentryTrace:e,baggage:t},n)=>{let r=q(),{traceparentData:o,dynamicSamplingContext:i,propagationContext:s}=Ns(e,t);r.setPropagationContext(s),I&&o&&h.log(`[Tracing] Continuing trace ${o.traceId}.`);let a={...o,metadata:J({dynamicSamplingContext:i})};return n?cn(()=>n(a)):a};function Yo(e,{parentSpan:t,spanContext:n,forceTransaction:r,scope:o}){if(!Ke())return;let i=ge(),s;if(t&&!r)s=t.startChild(n);else if(t){let a=Ve(t),{traceId:c,spanId:u}=t.spanContext(),l=Mn(t);s=e.startTransaction({traceId:c,parentSpanId:u,parentSampled:l,...n,metadata:{dynamicSamplingContext:a,...n.metadata}})}else{let{traceId:a,dsc:c,parentSpanId:u,sampled:l}={...i.getPropagationContext(),...o.getPropagationContext()};s=e.startTransaction({traceId:a,parentSpanId:u,parentSampled:l,...n,metadata:{dynamicSamplingContext:c,...n.metadata}})}return o.setSpan(s),ph(s,o,i),s}function Vo(e){if(e.startTime){let t={...e};return t.startTimestamp=Ot(e.startTime),delete t.startTime,t}return e}var el="_sentryScope",tl="_sentryIsolationScope";function ph(e,t,n){e&&(ke(e,tl,n),ke(e,el,t))}function nl(e){return{scope:e[el],isolationScope:e[tl]}}var Br;function rl(e){return Br?Br.get(e):void 0}function Ko(e){let t=rl(e);if(!t)return;let n={};for(let[,[r,o]]of t)n[r]||(n[r]=[]),n[r].push(J(o));return n}function ol(e,t,n,r,o,i){let s=Pt();if(s){let a=rl(s)||new Map,c=`${e}:${t}@${r}`,u=a.get(i);if(u){let[,l]=u;a.set(i,[c,{min:Math.min(l.min,n),max:Math.max(l.max,n),count:l.count+=1,sum:l.sum+=n,tags:l.tags}])}else a.set(i,[c,{min:n,max:n,count:1,sum:n,tags:o}]);Br||(Br=new WeakMap),Br.set(s,a)}}f();var _e="sentry.source",pt="sentry.sample_rate",dn="sentry.op",st="sentry.origin",Ks="profile_id";var Ln=class{constructor(t=1e3){this._maxlen=t,this.spans=[]}add(t){this.spans.length>this._maxlen?t.spanRecorder=void 0:this.spans.push(t)}},fn=class e{constructor(t={}){this._traceId=t.traceId||B(),this._spanId=t.spanId||B().substring(16),this._startTime=t.startTimestamp||Ie(),this.tags=t.tags?{...t.tags}:{},this.data=t.data?{...t.data}:{},this.instrumenter=t.instrumenter||"sentry",this._attributes={},this.setAttributes({[st]:t.origin||"manual",[dn]:t.op,...t.attributes}),this._name=t.name||t.description,t.parentSpanId&&(this._parentSpanId=t.parentSpanId),"sampled"in t&&(this._sampled=t.sampled),t.status&&(this._status=t.status),t.endTimestamp&&(this._endTime=t.endTimestamp),t.exclusiveTime!==void 0&&(this._exclusiveTime=t.exclusiveTime),this._measurements=t.measurements?{...t.measurements}:{}}get name(){return this._name||""}set name(t){this.updateName(t)}get description(){return this._name}set description(t){this._name=t}get traceId(){return this._traceId}set traceId(t){this._traceId=t}get spanId(){return this._spanId}set spanId(t){this._spanId=t}set parentSpanId(t){this._parentSpanId=t}get parentSpanId(){return this._parentSpanId}get sampled(){return this._sampled}set sampled(t){this._sampled=t}get attributes(){return this._attributes}set attributes(t){this._attributes=t}get startTimestamp(){return this._startTime}set startTimestamp(t){this._startTime=t}get endTimestamp(){return this._endTime}set endTimestamp(t){this._endTime=t}get status(){return this._status}set status(t){this._status=t}get op(){return this._attributes[dn]}set op(t){this.setAttribute(dn,t)}get origin(){return this._attributes[st]}set origin(t){this.setAttribute(st,t)}spanContext(){let{_spanId:t,_traceId:n,_sampled:r}=this;return{spanId:t,traceId:n,traceFlags:r?Gs:Cu}}startChild(t){let n=new e({...t,parentSpanId:this._spanId,sampled:this._sampled,traceId:this._traceId});n.spanRecorder=this.spanRecorder,n.spanRecorder&&n.spanRecorder.add(n);let r=un(this);if(n.transaction=r,I&&r){let o=t&&t.op||"< unknown op >",i=P(n).description||"< unknown name >",s=r.spanContext().spanId,a=`[Tracing] Starting '${o}' span on transaction '${i}' (${s}).`;h.log(a),this._logMessage=a}return n}setTag(t,n){return this.tags={...this.tags,[t]:n},this}setData(t,n){return this.data={...this.data,[t]:n},this}setAttribute(t,n){n===void 0?delete this._attributes[t]:this._attributes[t]=n}setAttributes(t){Object.keys(t).forEach(n=>this.setAttribute(n,t[n]))}setStatus(t){return this._status=t,this}setHttpStatus(t){return Lt(this,t),this}setName(t){this.updateName(t)}updateName(t){return this._name=t,this}isSuccess(){return this._status==="ok"}finish(t){return this.end(t)}end(t){if(this._endTime)return;let n=un(this);if(I&&n&&n.spanContext().spanId!==this._spanId){let r=this._logMessage;r&&h.log(r.replace("Starting","Finishing"))}this._endTime=Ot(t)}toTraceparent(){return vt(this)}toContext(){return J({data:this._getData(),description:this._name,endTimestamp:this._endTime,op:this.op,parentSpanId:this._parentSpanId,sampled:this._sampled,spanId:this._spanId,startTimestamp:this._startTime,status:this._status,tags:this.tags,traceId:this._traceId})}updateWithContext(t){return this.data=t.data||{},this._name=t.name||t.description,this._endTime=t.endTimestamp,this.op=t.op,this._parentSpanId=t.parentSpanId,this._sampled=t.sampled,this._spanId=t.spanId||this._spanId,this._startTime=t.startTimestamp||this._startTime,this._status=t.status,this.tags=t.tags||{},this._traceId=t.traceId||this._traceId,this}getTraceContext(){return on(this)}getSpanJSON(){return J({data:this._getData(),description:this._name,op:this._attributes[dn],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:this._status,tags:Object.keys(this.tags).length>0?this.tags:void 0,timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[st],_metrics_summary:Ko(this),profile_id:this._attributes[Ks],exclusive_time:this._exclusiveTime,measurements:Object.keys(this._measurements).length>0?this._measurements:void 0})}isRecording(){return!this._endTime&&!!this._sampled}toJSON(){return this.getSpanJSON()}_getData(){let{data:t,_attributes:n}=this,r=Object.keys(t).length>0,o=Object.keys(n).length>0;if(!(!r&&!o))return r&&o?{...t,...n}:r?t:n}};f();var Pn=class extends fn{constructor(t,n){super(t),this._contexts={},this._hub=n||W(),this._name=t.name||"",this._metadata={...t.metadata},this._trimEnd=t.trimEnd,this.transaction=this;let r=this._metadata.dynamicSamplingContext;r&&(this._frozenDynamicSamplingContext={...r})}get name(){return this._name}set name(t){this.setName(t)}get metadata(){return{source:"custom",spanMetadata:{},...this._metadata,...this._attributes[_e]&&{source:this._attributes[_e]},...this._attributes[pt]&&{sampleRate:this._attributes[pt]}}}set metadata(t){this._metadata=t}setName(t,n="custom"){this._name=t,this.setAttribute(_e,n)}updateName(t){return this._name=t,this}initSpanRecorder(t=1e3){this.spanRecorder||(this.spanRecorder=new Ln(t)),this.spanRecorder.add(this)}setContext(t,n){n===null?delete this._contexts[t]:this._contexts[t]=n}setMeasurement(t,n,r=""){this._measurements[t]={value:n,unit:r}}setMetadata(t){this._metadata={...this._metadata,...t}}end(t){let n=Ot(t),r=this._finishTransaction(n);if(r)return this._hub.captureEvent(r)}toContext(){let t=super.toContext();return J({...t,name:this._name,trimEnd:this._trimEnd})}updateWithContext(t){return super.updateWithContext(t),this._name=t.name||"",this._trimEnd=t.trimEnd,this}getDynamicSamplingContext(){return Ve(this)}setHub(t){this._hub=t}getProfileId(){if(this._contexts!==void 0&&this._contexts.profile!==void 0)return this._contexts.profile.profile_id}_finishTransaction(t){if(this._endTime!==void 0)return;this._name||(I&&h.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this._name="<unlabeled transaction>"),super.end(t);let n=this._hub.getClient();if(n&&n.emit&&n.emit("finishTransaction",this),this._sampled!==!0){I&&h.log("[Tracing] Discarding transaction because its trace was not chosen to be sampled."),n&&n.recordDroppedEvent("sample_rate","transaction");return}let r=this.spanRecorder?this.spanRecorder.spans.filter(l=>l!==this&&P(l).timestamp):[];if(this._trimEnd&&r.length>0){let l=r.map(d=>P(d).timestamp).filter(Boolean);this._endTime=l.reduce((d,p)=>d>p?d:p)}let{scope:o,isolationScope:i}=nl(this),{metadata:s}=this,{source:a}=s,c={contexts:{...this._contexts,trace:on(this)},spans:r,start_timestamp:this._startTime,tags:this.tags,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:{...s,capturedSpanScope:o,capturedSpanIsolationScope:i,...J({dynamicSamplingContext:Ve(this)})},_metrics_summary:Ko(this),...a&&{transaction_info:{source:a}}};return Object.keys(this._measurements).length>0&&(I&&h.log("[Measurements] Adding measurements to transaction",JSON.stringify(this._measurements,void 0,2)),c.measurements=this._measurements),I&&h.log(`[Tracing] Finishing ${this.op} transaction: ${this._name}.`),c}};var Ft={idleTimeout:1e3,finalTimeout:3e4,heartbeatInterval:5e3},mh="finishReason",Fn=["heartbeatFailed","idleTimeout","documentHidden","finalTimeout","externalFinish","cancelled"],Js=class extends Ln{constructor(t,n,r,o){super(o),this._pushActivity=t,this._popActivity=n,this.transactionSpanId=r}add(t){if(t.spanContext().spanId!==this.transactionSpanId){let n=t.end;t.end=(...r)=>(this._popActivity(t.spanContext().spanId),n.apply(t,r)),P(t).timestamp===void 0&&this._pushActivity(t.spanContext().spanId)}super.add(t)}},Hr=class extends Pn{constructor(t,n,r=Ft.idleTimeout,o=Ft.finalTimeout,i=Ft.heartbeatInterval,s=!1,a=!1){super(t,n),this._idleHub=n,this._idleTimeout=r,this._finalTimeout=o,this._heartbeatInterval=i,this._onScope=s,this.activities={},this._heartbeatCounter=0,this._finished=!1,this._idleTimeoutCanceledPermanently=!1,this._beforeFinishCallbacks=[],this._finishReason=Fn[4],this._autoFinishAllowed=!a,s&&(I&&h.log(`Setting idle transaction on scope. Span ID: ${this.spanContext().spanId}`),n.getScope().setSpan(this)),a||this._restartIdleTimeout(),setTimeout(()=>{this._finished||(this.setStatus("deadline_exceeded"),this._finishReason=Fn[3],this.end())},this._finalTimeout)}end(t){let n=Ot(t);if(this._finished=!0,this.activities={},this.op==="ui.action.click"&&this.setAttribute(mh,this._finishReason),this.spanRecorder){I&&h.log("[Tracing] finishing IdleTransaction",new Date(n*1e3).toISOString(),this.op);for(let r of this._beforeFinishCallbacks)r(this,n);this.spanRecorder.spans=this.spanRecorder.spans.filter(r=>{if(r.spanContext().spanId===this.spanContext().spanId)return!0;P(r).timestamp||(r.setStatus("cancelled"),r.end(n),I&&h.log("[Tracing] cancelling span since transaction ended early",JSON.stringify(r,void 0,2)));let{start_timestamp:o,timestamp:i}=P(r),s=o&&o<n,a=(this._finalTimeout+this._idleTimeout)/1e3,c=i&&o&&i-o<a;if(I){let u=JSON.stringify(r,void 0,2);s?c||h.log("[Tracing] discarding Span since it finished after Transaction final timeout",u):h.log("[Tracing] discarding Span since it happened after Transaction was finished",u)}return s&&c}),I&&h.log("[Tracing] flushing IdleTransaction")}else I&&h.log("[Tracing] No active IdleTransaction");if(this._onScope){let r=this._idleHub.getScope();r.getTransaction()===this&&r.setSpan(void 0)}return super.end(t)}registerBeforeFinishCallback(t){this._beforeFinishCallbacks.push(t)}initSpanRecorder(t){if(!this.spanRecorder){let n=o=>{this._finished||this._pushActivity(o)},r=o=>{this._finished||this._popActivity(o)};this.spanRecorder=new Js(n,r,this.spanContext().spanId,t),I&&h.log("Starting heartbeat"),this._pingHeartbeat()}this.spanRecorder.add(this)}cancelIdleTimeout(t,{restartOnChildSpanChange:n}={restartOnChildSpanChange:!0}){this._idleTimeoutCanceledPermanently=n===!1,this._idleTimeoutID&&(clearTimeout(this._idleTimeoutID),this._idleTimeoutID=void 0,Object.keys(this.activities).length===0&&this._idleTimeoutCanceledPermanently&&(this._finishReason=Fn[5],this.end(t)))}setFinishReason(t){this._finishReason=t}sendAutoFinishSignal(){this._autoFinishAllowed||(I&&h.log("[Tracing] Received finish signal for idle transaction."),this._restartIdleTimeout(),this._autoFinishAllowed=!0)}_restartIdleTimeout(t){this.cancelIdleTimeout(),this._idleTimeoutID=setTimeout(()=>{!this._finished&&Object.keys(this.activities).length===0&&(this._finishReason=Fn[1],this.end(t))},this._idleTimeout)}_pushActivity(t){this.cancelIdleTimeout(void 0,{restartOnChildSpanChange:!this._idleTimeoutCanceledPermanently}),I&&h.log(`[Tracing] pushActivity: ${t}`),this.activities[t]=!0,I&&h.log("[Tracing] new activities count",Object.keys(this.activities).length)}_popActivity(t){if(this.activities[t]&&(I&&h.log(`[Tracing] popActivity ${t}`),delete this.activities[t],I&&h.log("[Tracing] new activities count",Object.keys(this.activities).length)),Object.keys(this.activities).length===0){let n=Ie();this._idleTimeoutCanceledPermanently?this._autoFinishAllowed&&(this._finishReason=Fn[5],this.end(n)):this._restartIdleTimeout(n+this._idleTimeout/1e3)}}_beat(){if(this._finished)return;let t=Object.keys(this.activities).join("");t===this._prevHeartbeatString?this._heartbeatCounter++:this._heartbeatCounter=1,this._prevHeartbeatString=t,this._heartbeatCounter>=3?this._autoFinishAllowed&&(I&&h.log("[Tracing] Transaction finished because of no change for 3 heart beats"),this.setStatus("deadline_exceeded"),this._finishReason=Fn[0],this.end()):this._pingHeartbeat()}_pingHeartbeat(){I&&h.log(`pinging Heartbeat -> current counter: ${this._heartbeatCounter}`),setTimeout(()=>{this._beat()},this._heartbeatInterval)}};f();function Xs(e,t,n){if(!Ke(t))return e.sampled=!1,e;if(e.sampled!==void 0)return e.setAttribute(pt,Number(e.sampled)),e;let r;return typeof t.tracesSampler=="function"?(r=t.tracesSampler(n),e.setAttribute(pt,Number(r))):n.parentSampled!==void 0?r=n.parentSampled:typeof t.tracesSampleRate<"u"?(r=t.tracesSampleRate,e.setAttribute(pt,Number(r))):(r=1,e.setAttribute(pt,r)),Jo(r)?r?(e.sampled=Math.random()<r,e.sampled?(I&&h.log(`[Tracing] starting ${e.op} transaction - ${P(e).description}`),e):(I&&h.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(r)})`),e)):(I&&h.log(`[Tracing] Discarding transaction because ${typeof t.tracesSampler=="function"?"tracesSampler returned 0 or false":"a negative sampling decision was inherited or tracesSampleRate is set to 0"}`),e.sampled=!1,e):(I&&h.warn("[Tracing] Discarding transaction because of invalid sample rate."),e.sampled=!1,e)}function Jo(e){return ar(e)||!(typeof e=="number"||typeof e=="boolean")?(I&&h.warn(`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(e)} of type ${JSON.stringify(typeof e)}.`),!1):e<0||e>1?(I&&h.warn(`[Tracing] Given sample rate is invalid. Sample rate must be between 0 and 1. Got ${e}.`),!1):!0}function hh(){let t=this.getScope().getSpan();return t?{"sentry-trace":vt(t)}:{}}function gh(e,t){let n=this.getClient(),r=n&&n.getOptions()||{},o=r.instrumenter||"sentry",i=e.instrumenter||"sentry";o!==i&&(I&&h.error(`A transaction was started with instrumenter=\`${i}\`, but the SDK is configured with the \`${o}\` instrumenter.
|
|
@@ -362,4 +362,4 @@ ${t==="system"?`
|
|
|
362
362
|
`),o.append(i),n.append(o),{get el(){return n}}}function sT({formTitle:e,showBranding:t,showName:n,showEmail:r,isNameRequired:o,isEmailRequired:i,colorScheme:s,defaultName:a,defaultEmail:c,onClosed:u,onCancel:l,onSubmit:d,...p}){let m=null;function g(){E(),u&&u()}function E(){m&&(m.open=!1)}function T(){m&&(m.open=!0)}function S(){return m&&m.open===!0||!1}let{el:b,showError:v,hideError:O}=rT({showEmail:r,showName:n,isEmailRequired:i,isNameRequired:o,defaultName:a,defaultEmail:c,onSubmit:d,onCancel:l,...p});return m=oe("dialog",{className:"dialog",open:!0,onClick:g},oe("div",{className:"dialog__content",onClick:L=>{L.stopPropagation()}},oe("h2",{className:"dialog__header"},e,t&&oe("a",{className:"brand-link",target:"_blank",href:"https://sentry.io/welcome/",title:"Powered by Sentry",rel:"noopener noreferrer"},iT({colorScheme:s}).el)),b)),{get el(){return m},showError:v,hideError:O,open:T,close:E,checkIsOpen:S}}var es=16,Sp=17,aT="http://www.w3.org/2000/svg";function cT(){let e=c=>yn.document.createElementNS(aT,c),t=Ge(e("svg"),{class:"success-icon",width:`${es}`,height:`${Sp}`,viewBox:`0 0 ${es} ${Sp}`,fill:"none"}),n=Ge(e("g"),{clipPath:"url(#clip0_57_156)"}),r=Ge(e("path"),{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M3.55544 15.1518C4.87103 16.0308 6.41775 16.5 8 16.5C10.1217 16.5 12.1566 15.6571 13.6569 14.1569C15.1571 12.6566 16 10.6217 16 8.5C16 6.91775 15.5308 5.37103 14.6518 4.05544C13.7727 2.73985 12.5233 1.71447 11.0615 1.10897C9.59966 0.503466 7.99113 0.34504 6.43928 0.653721C4.88743 0.962403 3.46197 1.72433 2.34315 2.84315C1.22433 3.96197 0.462403 5.38743 0.153721 6.93928C-0.15496 8.49113 0.00346625 10.0997 0.608967 11.5615C1.21447 13.0233 2.23985 14.2727 3.55544 15.1518ZM4.40546 3.1204C5.46945 2.40946 6.72036 2.03 8 2.03C9.71595 2.03 11.3616 2.71166 12.575 3.92502C13.7883 5.13838 14.47 6.78405 14.47 8.5C14.47 9.77965 14.0905 11.0306 13.3796 12.0945C12.6687 13.1585 11.6582 13.9878 10.476 14.4775C9.29373 14.9672 7.99283 15.0953 6.73777 14.8457C5.48271 14.596 4.32987 13.9798 3.42502 13.075C2.52018 12.1701 1.90397 11.0173 1.65432 9.76224C1.40468 8.50718 1.5328 7.20628 2.0225 6.02404C2.5122 4.8418 3.34148 3.83133 4.40546 3.1204Z"}),o=Ge(e("path"),{d:"M6.68775 12.4297C6.78586 12.4745 6.89218 12.4984 7 12.5C7.11275 12.4955 7.22315 12.4664 7.32337 12.4145C7.4236 12.3627 7.51121 12.2894 7.58 12.2L12 5.63999C12.0848 5.47724 12.1071 5.28902 12.0625 5.11098C12.0178 4.93294 11.9095 4.77744 11.7579 4.67392C11.6064 4.57041 11.4221 4.52608 11.24 4.54931C11.0579 4.57254 10.8907 4.66173 10.77 4.79999L6.88 10.57L5.13 8.56999C5.06508 8.49566 4.98613 8.43488 4.89768 8.39111C4.80922 8.34735 4.713 8.32148 4.61453 8.31498C4.51605 8.30847 4.41727 8.32147 4.32382 8.35322C4.23038 8.38497 4.14413 8.43484 4.07 8.49999C3.92511 8.63217 3.83692 8.81523 3.82387 9.01092C3.81083 9.2066 3.87393 9.39976 4 9.54999L6.43 12.24C6.50187 12.3204 6.58964 12.385 6.68775 12.4297Z"});t.appendChild(n).append(o,r);let i=e("defs"),s=Ge(e("clipPath"),{id:"clip0_57_156"}),a=Ge(e("rect"),{width:`${es}`,height:`${es}`,fill:"white",transform:"translate(0 0.5)"});return s.appendChild(a),i.appendChild(s),t.appendChild(i).appendChild(s).appendChild(a),{get el(){return t}}}function uT({message:e,onRemove:t}){function n(){r&&(r.remove(),t&&t())}let r=oe("div",{className:"success-message",onClick:n},cT().el,e);return{el:r,remove:n}}function Ep({shadow:e,options:{shouldCreateActor:t=!0,...n},attachTo:r}){let o,i,s=!1;function a(){if(e)try{let S=uT({message:n.successMessageText,onRemove:()=>{b&&clearTimeout(b),l()}});if(!S.el)throw new Error("Unable to show success message");e.appendChild(S.el);let b=setTimeout(()=>{S&&S.remove()},5e3)}catch(S){h.error(S)}}async function c(S){if(!i)return;let b=[];if(n.isNameRequired&&!S.name&&b.push(n.nameLabel),n.isEmailRequired&&!S.email&&b.push(n.emailLabel),S.message||b.push(n.messageLabel),b.length>0){i.showError(`Please enter in the following required fields: ${b.join(", ")}`);return}if(!await Zb(i,S)){n.onSubmitError&&n.onSubmitError();return}E(),a(),n.onSubmitSuccess&&n.onSubmitSuccess()}function u(){let S=x(),b=S&&S.getIntegrationByName&&S.getIntegrationByName("Replay");b&&b.flush().catch(v=>{_n&&h.error(v)})}function l(){o&&o.show()}function d(){o&&o.hide()}function p(){o&&o.el&&o.el.remove()}function m(){try{if(i){i.open(),s=!0,n.onFormOpen&&n.onFormOpen(),u();return}let S=n.useSentryUser,b=q(),v=b&&b.getUser();if(i=sT({colorScheme:n.colorScheme,showBranding:n.showBranding,showName:n.showName||n.isNameRequired,showEmail:n.showEmail||n.isEmailRequired,isNameRequired:n.isNameRequired,isEmailRequired:n.isEmailRequired,formTitle:n.formTitle,cancelButtonLabel:n.cancelButtonLabel,submitButtonLabel:n.submitButtonLabel,emailLabel:n.emailLabel,emailPlaceholder:n.emailPlaceholder,messageLabel:n.messageLabel,messagePlaceholder:n.messagePlaceholder,nameLabel:n.nameLabel,namePlaceholder:n.namePlaceholder,isRequiredLabel:n.isRequiredLabel,defaultName:S&&v&&v[S.name]||"",defaultEmail:S&&v&&v[S.email]||"",onClosed:()=>{l(),s=!1,n.onFormClose&&n.onFormClose()},onCancel:()=>{g(),l()},onSubmit:c}),!i.el)throw new Error("Unable to open Feedback dialog");e.appendChild(i.el),d(),n.onFormOpen&&n.onFormOpen(),u()}catch(S){h.error(S)}}function g(){i&&(i.close(),s=!1,n.onFormClose&&n.onFormClose())}function E(){if(i){g();let S=i.el;S&&S.remove(),i=void 0}}function T(){s||m(),d()}return r?r.addEventListener("click",T):t&&(o=tT({buttonLabel:n.buttonLabel,onClick:T}),o.el&&e.appendChild(o.el)),{get actor(){return o},get dialog(){return i},showActor:l,hideActor:d,removeActor:p,openDialog:m,closeDialog:g,removeDialog:E}}var ts=yn.document,lT=e=>new mo(e),mo=class e{static __initStatic(){this.id="Feedback"}constructor({autoInject:t=!0,id:n="sentry-feedback",isEmailRequired:r=!1,isNameRequired:o=!1,showBranding:i=!0,showEmail:s=!0,showName:a=!0,useSentryUser:c={email:"email",name:"username"},themeDark:u,themeLight:l,colorScheme:d="system",buttonLabel:p=Db,cancelButtonLabel:m=Lb,submitButtonLabel:g=Pb,formTitle:E=Fb,emailPlaceholder:T=Bb,emailLabel:S=Hb,messagePlaceholder:b=Ub,messageLabel:v=$b,namePlaceholder:O=Gb,nameLabel:L=Wb,isRequiredLabel:M=zb,successMessageText:w=jb,onFormClose:U,onFormOpen:ne,onSubmitError:k,onSubmitSuccess:N}={}){this.name=e.id,this._host=null,this._shadow=null,this._widget=null,this._widgets=new Set,this._hasInsertedActorStyles=!1,this.options={autoInject:t,showBranding:i,id:n,isEmailRequired:r,isNameRequired:o,showEmail:s,showName:a,useSentryUser:c,colorScheme:d,themeDark:{...gp.dark,...u},themeLight:{...gp.light,...l},buttonLabel:p,cancelButtonLabel:m,submitButtonLabel:g,formTitle:E,emailLabel:S,emailPlaceholder:T,messageLabel:v,messagePlaceholder:b,nameLabel:L,namePlaceholder:O,isRequiredLabel:M,successMessageText:w,onFormClose:U,onFormOpen:ne,onSubmitError:k,onSubmitSuccess:N}}setupOnce(){if(kn())try{this._cleanupWidgetIfExists();let{autoInject:t}=this.options;if(!t)return;this._createWidget(this.options)}catch(t){_n&&h.error(t)}}openDialog(){this._widget||this._createWidget({...this.options,shouldCreateActor:!1}),this._widget&&this._widget.openDialog()}closeDialog(){this._widget&&this._widget.closeDialog()}attachTo(t,n){try{let r=_p(this.options,n||{});return this._ensureShadowHost(r,({shadow:o})=>{let i=typeof t=="string"?ts.querySelector(t):typeof t.addEventListener=="function"?t:null;if(!i)return _n&&h.error("[Feedback] Unable to attach to target element"),null;let s=Ep({shadow:o,options:r,attachTo:i});return this._widgets.add(s),this._widget||(this._widget=s),s})}catch(r){return _n&&h.error(r),null}}createWidget(t){try{return this._createWidget(_p(this.options,t||{}))}catch(n){return _n&&h.error(n),null}}removeWidget(t){if(!t)return!1;try{if(this._widgets.has(t))return t.removeActor(),t.removeDialog(),this._widgets.delete(t),this._widget===t&&(this._widget=null),!0}catch(n){_n&&h.error(n)}return!1}getWidget(){return this._widget}remove(){this._host&&this._host.remove(),this._initialize()}_initialize(){this._host=null,this._shadow=null,this._widget=null,this._widgets=new Set,this._hasInsertedActorStyles=!1}_cleanupWidgetIfExists(){this._host&&this.remove();let t=ts.querySelector(`#${this.options.id}`);t&&t.remove()}_createWidget(t){return this._ensureShadowHost(t,({shadow:n})=>{let r=Ep({shadow:n,options:t});return!this._hasInsertedActorStyles&&r.actor&&(n.appendChild(Vb(ts)),this._hasInsertedActorStyles=!0),this._widgets.add(r),this._widget||(this._widget=r),r})}_ensureShadowHost(t,n){let r=!1;if(!this._shadow||!this._host){let{id:i,colorScheme:s,themeLight:a,themeDark:c}=t,{shadow:u,host:l}=Xb({id:i,colorScheme:s,themeLight:a,themeDark:c});this._shadow=u,this._host=l,r=!0}this._host.dataset.sentryFeedbackColorscheme=t.colorScheme;let o=n({shadow:this._shadow,host:this._host});return r&&ts.body.appendChild(this._host),o}};mo.__initStatic();f();f();var xp="CaptureConsole",dT=(e={})=>{let t=e.levels||Zt;return{name:xp,setupOnce(){},setup(n){"console"in C&&gr(({args:r,level:o})=>{x()!==n||!t.includes(o)||pT(r,o)})}}},Pc=dT,fT=D(xp,Pc);function pT(e,t){let n={level:vr(t),extra:{arguments:e}};De(r=>{if(r.addEventProcessor(s=>(s.logger="console",Ue(s,{handled:!1,type:"console"}),s)),t==="assert"&&e[0]===!1){let s=`Assertion failed: ${Jt(e.slice(1)," ")||"console.assert"}`;r.setExtra("arguments",e.slice(1)),an(s,n);return}let o=e.find(s=>s instanceof Error);if(t==="error"&&o){xt(o,n);return}let i=Jt(e," ");an(i,n)})}f();var wp="Debug",mT=(e={})=>{let t={debugger:!1,stringify:!1,...e};return{name:wp,setupOnce(){},setup(n){n.on&&n.on("beforeSendEvent",(r,o)=>{if(t.debugger)debugger;Re(()=>{t.stringify?(console.log(JSON.stringify(r,null,2)),o&&Object.keys(o).length&&console.log(JSON.stringify(o,null,2))):(console.log(r),o&&Object.keys(o).length&&console.log(o))})})}}},Fc=mT,hT=D(wp,Fc);f();f();var kt=typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__;var kp="Dedupe",gT=()=>{let e;return{name:kp,setupOnce(){},processEvent(t){if(t.type)return t;try{if(yT(t,e))return kt&&h.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{}return e=t}}},Bc=gT,_T=D(kp,Bc);function yT(e,t){return t?!!(ST(e,t)||ET(e,t)):!1}function ST(e,t){let n=e.message,r=t.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!Op(e,t)||!Ap(e,t))}function ET(e,t){let n=Cp(t),r=Cp(e);return!(!n||!r||n.type!==r.type||n.value!==r.value||!Op(e,t)||!Ap(e,t))}function Ap(e,t){let n=Rp(e),r=Rp(t);if(!n&&!r)return!0;if(n&&!r||!n&&r||(n=n,r=r,r.length!==n.length))return!1;for(let o=0;o<r.length;o++){let i=r[o],s=n[o];if(i.filename!==s.filename||i.lineno!==s.lineno||i.colno!==s.colno||i.function!==s.function)return!1}return!0}function Op(e,t){let n=e.fingerprint,r=t.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;n=n,r=r;try{return n.join("")===r.join("")}catch{return!1}}function Cp(e){return e.exception&&e.exception.values&&e.exception.values[0]}function Rp(e){let t=e.exception;if(t)try{return t.values[0].stacktrace.frames}catch{return}}f();var Mp="ExtraErrorData",bT=(e={})=>{let t=e.depth||3,n=e.captureErrorCause||!1;return{name:Mp,setupOnce(){},processEvent(r,o){return IT(r,o,t,n)}}},Hc=bT,TT=D(Mp,Hc);function IT(e,t={},n,r){if(!t.originalException||!ut(t.originalException))return e;let o=t.originalException.name||t.originalException.constructor.name,i=vT(t.originalException,r);if(i){let s={...e.contexts},a=be(i,n);return Fe(a)&&(ke(a,"__sentry_skip_normalization__",!0),s[o]=a),{...e,contexts:s}}return e}function vT(e,t){try{let n=["name","message","stack","line","column","fileName","lineNumber","columnNumber","toJSON"],r={};for(let o of Object.keys(e)){if(n.indexOf(o)!==-1)continue;let i=e[o];r[o]=ut(i)?i.toString():i}if(t&&e.cause!==void 0&&(r.cause=ut(e.cause)?e.cause.toString():e.cause),typeof e.toJSON=="function"){let o=e.toJSON();for(let i of Object.keys(o)){let s=o[i];r[i]=ut(s)?s.toString():s}}return r}catch(n){kt&&h.error("Unable to extract extra data from the Error object:",n)}return null}f();var xT=C,Dp="ReportingObserver",Np=new WeakMap,wT=(e={})=>{let t=e.types||["crash","deprecation","intervention"];function n(r){if(Np.has(x()))for(let o of r)De(i=>{i.setExtra("url",o.url);let s=`ReportingObserver [${o.type}]`,a="No details available";if(o.body){let c={};for(let u in o.body)c[u]=o.body[u];if(i.setExtra("body",c),o.type==="crash"){let u=o.body;a=[u.crashId||"",u.reason||""].join(" ").trim()||a}else a=o.body.message||a}an(`${s}: ${a}`)})}return{name:Dp,setupOnce(){if(!Is())return;new xT.ReportingObserver(n,{buffered:!0,types:t}).observe()},setup(r){Np.set(r,!0)}}},Uc=wT,CT=D(Dp,Uc);f();var Lp="RewriteFrames",RT=(e={})=>{let t=e.root,n=e.prefix||"app:///",r=e.iteratee||(s=>{if(!s.filename)return s;let a=/^[a-zA-Z]:\\/.test(s.filename)||s.filename.includes("\\")&&!s.filename.includes("/"),c=/^\//.test(s.filename);if(a||c){let u=a?s.filename.replace(/^[a-zA-Z]:/,"").replace(/\\/g,"/"):s.filename,l=t?Rs(t,u):ks(u);s.filename=`${n}${l}`}return s});function o(s){try{return{...s,exception:{...s.exception,values:s.exception.values.map(a=>({...a,...a.stacktrace&&{stacktrace:i(a.stacktrace)}}))}}}catch{return s}}function i(s){return{...s,frames:s&&s.frames&&s.frames.map(a=>r(a))}}return{name:Lp,setupOnce(){},processEvent(s){let a=s;return s.exception&&Array.isArray(s.exception.values)&&(a=o(a)),a}}},$c=RT,kT=D(Lp,$c);f();var Pp="SessionTiming",AT=()=>{let e=Date.now();return{name:Pp,setupOnce(){},processEvent(t){let n=Date.now();return{...t,extra:{...t.extra,"session:start":e,"session:duration":n-e,"session:end":n}}}}},Gc=AT,OT=D(Pp,Gc);f();var Fp="HttpClient",MT=(e={})=>{let t={failedRequestStatusCodes:[[500,599]],failedRequestTargets:[/.*/],...e};return{name:Fp,setupOnce(){},setup(n){$T(n,t),GT(n,t)}}},Wc=MT,NT=D(Fp,Wc);function DT(e,t,n,r){if(Hp(e,n.status,n.url)){let o=WT(t,r),i,s,a,c;$p()&&([{headers:i,cookies:a},{headers:s,cookies:c}]=[{cookieHeader:"Cookie",obj:o},{cookieHeader:"Set-Cookie",obj:n}].map(({cookieHeader:l,obj:d})=>{let p=FT(d.headers),m;try{let g=p[l]||p[l.toLowerCase()]||void 0;g&&(m=Bp(g))}catch{kt&&h.log(`Could not extract cookies from header ${l}`)}return{headers:p,cookies:m}}));let u=Up({url:o.url,method:o.method,status:n.status,requestHeaders:i,responseHeaders:s,requestCookies:a,responseCookies:c});Mt(u)}}function LT(e,t,n,r){if(Hp(e,t.status,t.responseURL)){let o,i,s;if($p()){try{let c=t.getResponseHeader("Set-Cookie")||t.getResponseHeader("set-cookie")||void 0;c&&(i=Bp(c))}catch{kt&&h.log("Could not extract cookies from response headers")}try{s=BT(t)}catch{kt&&h.log("Could not extract headers from response")}o=r}let a=Up({url:t.responseURL,method:n,status:t.status,requestHeaders:o,responseHeaders:s,responseCookies:i});Mt(a)}}function PT(e){if(e){let t=e["Content-Length"]||e["content-length"];if(t)return parseInt(t,10)}}function Bp(e){return e.split("; ").reduce((t,n)=>{let[r,o]=n.split("=");return t[r]=o,t},{})}function FT(e){let t={};return e.forEach((n,r)=>{t[r]=n}),t}function BT(e){let t=e.getAllResponseHeaders();return t?t.split(`\r
|
|
363
363
|
`).reduce((n,r)=>{let[o,i]=r.split(": ");return n[o]=i,n},{}):{}}function HT(e,t){return e.some(n=>typeof n=="string"?t.includes(n):n.test(t))}function UT(e,t){return e.some(n=>typeof n=="number"?n===t:t>=n[0]&&t<=n[1])}function $T(e,t){Er()&&bt(n=>{if(x()!==e)return;let{response:r,args:o}=n,[i,s]=o;r&&DT(t,i,r,s)})}function GT(e,t){"XMLHttpRequest"in C&&Tt(n=>{if(x()!==e)return;let r=n.xhr,o=r[Ne];if(!o)return;let{method:i,request_headers:s}=o;try{LT(t,r,i,s)}catch(a){kt&&h.warn("Error while extracting response event form XHR response",a)}})}function Hp(e,t,n){return UT(e.failedRequestStatusCodes,t)&&HT(e.failedRequestTargets,n)&&!Wr(n,x())}function Up(e){let t=`HTTP Client Error with status code: ${e.status}`,n={message:t,exception:{values:[{type:"Error",value:t}]},request:{url:e.url,method:e.method,headers:e.requestHeaders,cookies:e.requestCookies},contexts:{response:{status_code:e.status,headers:e.responseHeaders,cookies:e.responseCookies,body_size:PT(e.responseHeaders)}}};return Ue(n,{type:"http.client",handled:!1}),n}function WT(e,t){return!t&&e instanceof Request||e instanceof Request&&e.bodyUsed?e:new Request(e,t)}function $p(){let e=x();return e?!!e.getOptions().sendDefaultPii:!1}f();var zc=C,zT=7,Gp="ContextLines",jT=(e={})=>{let t=e.frameContextLines!=null?e.frameContextLines:zT;return{name:Gp,setupOnce(){},processEvent(n){return YT(n,t)}}},jc=jT,qT=D(Gp,jc);function YT(e,t){let n=zc.document,r=zc.location&&Os(zc.location.href);if(!n||!r)return e;let o=e.exception&&e.exception.values;if(!o||!o.length)return e;let i=n.documentElement.innerHTML;if(!i)return e;let s=["<!DOCTYPE html>","<html>",...i.split(`
|
|
364
364
|
`),"</html>"];return o.forEach(a=>{let c=a.stacktrace;c&&c.frames&&(c.frames=c.frames.map(u=>VT(u,s,r,t)))}),e}function VT(e,t,n,r){return e.filename!==n||!e.lineno||!t.length||Es(t,e,r),e}f();function ho(e){return new Promise((t,n)=>{e.oncomplete=e.onsuccess=()=>t(e.result),e.onabort=e.onerror=()=>n(e.error)})}function KT(e,t){let n=indexedDB.open(e);n.onupgradeneeded=()=>n.result.createObjectStore(t);let r=ho(n);return o=>r.then(i=>o(i.transaction(t,"readwrite").objectStore(t)))}function Wp(e){return ho(e.getAllKeys())}function JT(e,t,n){return e(r=>Wp(r).then(o=>{if(!(o.length>=n))return r.put(t,Math.max(...o,0)+1),ho(r.transaction)}))}function XT(e){return e(t=>Wp(t).then(n=>{if(n.length!==0)return ho(t.get(n[0])).then(r=>(t.delete(n[0]),ho(t.transaction).then(()=>r)))}))}function ZT(e){let t;function n(){return t==null&&(t=KT(e.dbName||"sentry-offline",e.storeName||"queue")),t}return{insert:async r=>{try{let o=await kr(r,e.textEncoder);await JT(n(),o,e.maxQueueSize||30)}catch{}},pop:async()=>{try{let r=await XT(n());if(r)return Fs(r,e.textEncoder||new TextEncoder,e.textDecoder||new TextDecoder)}catch{}}}}function QT(e){return t=>e({...t,createStore:ZT})}function eI(e){return QT(la(e))}f();f();var zp=1e6,ns=String(0),tI="main",Yp="",Vp="",Kp="",qc=A.navigator&&A.navigator.userAgent||"",Jp="",nI=A.navigator&&A.navigator.language||A.navigator&&A.navigator.languages&&A.navigator.languages[0]||"";function rI(e){return typeof e=="object"&&e!==null&&"getHighEntropyValues"in e}var jp=A.navigator&&A.navigator.userAgentData;rI(jp)&&jp.getHighEntropyValues(["architecture","model","platform","platformVersion","fullVersionList"]).then(e=>{if(Yp=e.platform||"",Kp=e.architecture||"",Jp=e.model||"",Vp=e.platformVersion||"",e.fullVersionList&&e.fullVersionList.length>0){let t=e.fullVersionList[e.fullVersionList.length-1];qc=`${t.brand} ${t.version}`}}).catch(e=>{});function oI(e){return!("thread_metadata"in e)}function iI(e){return oI(e)?cI(e):e}function sI(e){let t=e&&e.contexts&&e.contexts.trace&&e.contexts.trace.trace_id;return typeof t=="string"&&t.length!==32&&F&&h.log(`[Profiling] Invalid traceId: ${t} on profiled event`),typeof t!="string"?"":t}function aI(e,t,n,r){if(r.type!=="transaction")throw new TypeError("Profiling events may only be attached to transactions, this should never occur.");if(n==null)throw new TypeError(`Cannot construct profiling event envelope without a valid profile. Got ${n} instead.`);let o=sI(r),i=iI(n),s=t||(typeof r.start_timestamp=="number"?r.start_timestamp*1e3:Date.now()),a=typeof r.timestamp=="number"?r.timestamp*1e3:Date.now();return{event_id:e,timestamp:new Date(s).toISOString(),platform:"javascript",version:"1",release:r.release||"",environment:r.environment||rt,runtime:{name:"javascript",version:A.navigator.userAgent},os:{name:Yp,version:Vp,build_number:qc},device:{locale:nI,model:Jp,manufacturer:qc,architecture:Kp,is_emulator:!1},debug_meta:{images:uI(n.resources)},profile:i,transactions:[{name:r.transaction||"",id:r.event_id||B(),trace_id:o,active_thread_id:ns,relative_start_ns:"0",relative_end_ns:((a-s)*1e6).toFixed(0)}]}}function rs(e){return e.op==="pageload"}function cI(e){let t,n=0,r={samples:[],stacks:[],frames:[],thread_metadata:{[ns]:{name:tI}}};if(!e.samples.length)return r;let o=e.samples[0].timestamp,i=typeof performance.timeOrigin=="number"?performance.timeOrigin:re||0,s=i-(re||i);for(let a=0;a<e.samples.length;a++){let c=e.samples[a];if(c.stackId===void 0){t===void 0&&(t=n,r.stacks[t]=[],n++),r.samples[a]={elapsed_since_start_ns:((c.timestamp+s-o)*zp).toFixed(0),stack_id:t,thread_id:ns};continue}let u=e.stacks[c.stackId],l=[];for(;u;){l.push(u.frameId);let p=e.frames[u.frameId];r.frames[u.frameId]===void 0&&(r.frames[u.frameId]={function:p.name,abs_path:typeof p.resourceId=="number"?e.resources[p.resourceId]:void 0,lineno:p.line,colno:p.column}),u=u.parentId===void 0?void 0:e.stacks[u.parentId]}let d={elapsed_since_start_ns:((c.timestamp+s-o)*zp).toFixed(0),stack_id:n,thread_id:ns};r.stacks[n]=l,r.samples[a]=d,n++}return r}function Xp(e,t){if(!t.length)return e;for(let n of t)e[1].push([{type:"profile"},n]);return e}function Zp(e){let t=[];return nt(e,(n,r)=>{if(r==="transaction")for(let o=1;o<n.length;o++){let i=n[o];i&&i.contexts&&i.contexts.profile&&i.contexts.profile.profile_id&&t.push(n[o])}}),t}var qp=new WeakMap;function uI(e){let t=C._sentryDebugIds;if(!t)return[];let n=x(),r=n&&n.getOptions(),o=r&&r.stackParser;if(!o)return[];let i,s=qp.get(o);s?i=s:(i=new Map,qp.set(o,i));let a=Object.keys(t).reduce((u,l)=>{let d,p=i.get(l);p?d=p:(d=o(l),i.set(l,d));for(let m=d.length-1;m>=0;m--){let g=d[m],E=g&&g.filename;if(g&&E){u[E]=t[l];break}}return u},{}),c=[];for(let u of e)u&&a[u]&&c.push({type:"sourcemap",code_file:u,debug_id:a[u]});return c}function lI(e){return typeof e!="number"&&typeof e!="boolean"||typeof e=="number"&&isNaN(e)?(F&&h.warn(`[Profiling] Invalid sample rate. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(e)} of type ${JSON.stringify(typeof e)}.`),!1):e===!0||e===!1?!0:e<0||e>1?(F&&h.warn(`[Profiling] Invalid sample rate. Sample rate must be between 0 and 1. Got ${e}.`),!1):!0}function dI(e){return e.samples.length<2?(F&&h.log("[Profiling] Discarding profile because it contains less than 2 samples"),!1):e.frames.length?!0:(F&&h.log("[Profiling] Discarding profile because it contains no frames"),!1)}var Qp=!1,Yc=3e4;function fI(e){return typeof e=="function"}function em(){let e=A.Profiler;if(!fI(e)){F&&h.log("[Profiling] Profiling is not supported by this browser, Profiler interface missing on window object.");return}let t=10,n=Math.floor(Yc/t);try{return new e({sampleInterval:t,maxBufferSize:n})}catch{F&&(h.log("[Profiling] Failed to initialize the Profiling constructor, this is likely due to a missing 'Document-Policy': 'js-profiling' header."),h.log("[Profiling] Disabling profiling for current user session.")),Qp=!0}}function go(e){if(Qp)return F&&h.log("[Profiling] Profiling has been disabled for the duration of the current user session."),!1;if(!e.isRecording())return F&&h.log("[Profiling] Discarding profile because transaction was not sampled."),!1;let t=x(),n=t&&t.getOptions();if(!n)return F&&h.log("[Profiling] Profiling disabled, no options found."),!1;let r=n.profilesSampleRate;return lI(r)?r?(r===!0?!0:Math.random()<r)?!0:(F&&h.log(`[Profiling] Discarding profile because it's not included in the random sample (sampling rate = ${Number(r)})`),!1):(F&&h.log("[Profiling] Discarding profile because a negative sampling decision was inherited or profileSampleRate is set to 0"),!1):(F&&h.warn("[Profiling] Discarding profile because of invalid sample rate."),!1)}function tm(e,t,n,r){return dI(n)?aI(e,t,n,r):null}var Sn=new Map;function nm(){return Sn.size}function rm(e){let t=Sn.get(e);return t&&Sn.delete(e),t}function om(e,t){if(Sn.set(e,t),Sn.size>30){let n=Sn.keys().next().value;Sn.delete(n)}}function pI(e){return e?go(e)?os(e):e:(F&&h.log("[Profiling] Transaction is undefined, skipping profiling"),e)}function os(e){let t;rs(e)&&(t=Ie()*1e3);let n=em();if(!n)return e;F&&h.log(`[Profiling] started profiling transaction: ${P(e).description}`);let r=B();async function o(){return!e||!n?null:n.stop().then(c=>(i&&(A.clearTimeout(i),i=void 0),F&&h.log(`[Profiling] stopped profiling of transaction: ${P(e).description}`),c?(om(r,c),null):(F&&h.log(`[Profiling] profiler returned null profile for: ${P(e).description}`,"this may indicate an overlapping transaction or a call to stopProfiling with a profile title that was never started"),null))).catch(c=>(F&&h.log("[Profiling] error while stopping profiler:",c),null))}let i=A.setTimeout(()=>{F&&h.log("[Profiling] max profile duration elapsed, stopping profiling for:",P(e).description),o()},Yc),s=e.end.bind(e);function a(){return e?(o().then(()=>{e.setContext("profile",{profile_id:r,start_timestamp:t}),s()},()=>{s()}),e):s()}return e.end=a,e}f();var im="BrowserProfiling",mI=()=>({name:im,setupOnce(){},setup(e){let n=q().getTransaction();if(n&&rs(n)&&go(n)&&os(n),typeof e.on!="function"){h.warn("[Profiling] Client does not support hooks, profiling will be disabled");return}e.on("startTransaction",r=>{go(r)&&os(r)}),e.on("beforeEnvelope",r=>{if(!nm())return;let o=Zp(r);if(!o.length)return;let i=[];for(let s of o){let a=s&&s.contexts,c=a&&a.profile&&a.profile.profile_id,u=a&&a.profile&&a.profile.start_timestamp;if(typeof c!="string"){F&&h.log("[Profiling] cannot find profile for a transaction without a profile context");continue}if(!c){F&&h.log("[Profiling] cannot find profile for a transaction without a profile context");continue}a&&a.profile&&delete a.profile;let l=rm(c);if(!l){F&&h.log(`[Profiling] Could not retrieve profile for transaction: ${c}`);continue}let d=tm(c,u,l,s);d&&i.push(d)}Xp(r,i)})}}),sm=mI,hI=D(im,sm);var am={};A.Sentry&&A.Sentry.Integrations&&(am=A.Sentry.Integrations);var DP={...am,...$l,...ja};export{Ba as Breadcrumbs,Jr as BrowserClient,hI as BrowserProfilingIntegration,yi as BrowserTracing,Ua as Dedupe,mo as Feedback,oi as FunctionToString,$a as GlobalHandlers,Ga as HttpContext,Nn as Hub,ri as InboundFilters,DP as Integrations,Wa as LinkedErrors,Ol as ModuleMetadata,uo as Replay,Nb as ReplayCanvas,ln as SDK_VERSION,dn as SEMANTIC_ATTRIBUTE_SENTRY_OP,st as SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,pt as SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE,_e as SEMANTIC_ATTRIBUTE_SENTRY_SOURCE,it as Scope,za as TryCatch,A as WINDOW,Ye as addBreadcrumb,Zo as addEventProcessor,Bo as addGlobalEventProcessor,cl as addIntegration,Bn as addTracingExtensions,Ti as breadcrumbsIntegration,wi as browserApiErrorsIntegration,sm as browserProfilingIntegration,bd as browserTracingIntegration,Pc as captureConsoleIntegration,Mt as captureEvent,xt as captureException,an as captureMessage,Lr as captureSession,cy as captureUserFeedback,vd as chromeStackLineParser,Uu as close,Au as configureScope,jc as contextLinesIntegration,Qu as continueTrace,Un as createTransport,Da as createUserFeedbackEnvelope,Fc as debugIntegration,Bc as dedupeIntegration,Wd as defaultIntegrations,Ht as defaultRequestInstrumentationOptions,Cd as defaultStackLineParsers,Fa as defaultStackParser,Wo as endSession,Ma as eventFromException,Na as eventFromMessage,Si as exceptionFromError,Hc as extraErrorDataIntegration,qu as extractTraceparentData,lT as feedbackIntegration,Hu as flush,oy as forceLoad,jr as functionToStringIntegration,xd as geckoStackLineParser,Pt as getActiveSpan,ye as getActiveTransaction,x as getClient,W as getCurrentHub,q as getCurrentScope,zd as getDefaultIntegrations,Fr as getHubFromCarrier,Eb as getReplay,jo as getSpanStatusFromHttpCode,Ii as globalHandlersIntegration,Wc as httpClientIntegration,vi as httpContextIntegration,zr as inboundFiltersIntegration,ny as init,zn as instrumentOutgoingRequests,Gu as isInitialized,$u as lastEventId,xi as linkedErrorsIntegration,eI as makeBrowserOfflineTransport,La as makeFetchTransport,zo as makeMain,Il as makeMultiplexedTransport,Pa as makeXHRTransport,Ul as metrics,pa as moduleMetadataIntegration,iy as onLoad,pI as onProfilingStartRouteTransaction,x_ as opera10StackLineParser,R_ as opera11StackLineParser,xl as parameterize,pp as replayCanvasIntegration,yb as replayIntegration,Uc as reportingObserverIntegration,$c as rewriteFramesIntegration,Ip as sendFeedback,Gc as sessionTimingIntegration,Go as setContext,ca as setCurrentClient,Mu as setExtra,Ou as setExtras,Lt as setHttpStatus,Xo as setMeasurement,Du as setTag,Nu as setTags,Lu as setUser,ry as showReportDialog,Ku as spanStatusfromHttpCode,wa as startBrowserTracingNavigationSpan,xa as startBrowserTracingPageLoadSpan,Dn as startInactiveSpan,Dr as startSession,Xu as startSpan,Zu as startSpanManual,Bu as startTransaction,Ju as trace,wd as winjsStackLineParser,Fu as withActiveSpan,Pu as withIsolationScope,De as withScope,sy as wrap};
|
|
365
|
-
//# sourceMappingURL=esm-
|
|
365
|
+
//# sourceMappingURL=esm-Z5T56VLV.js.map
|