Skip to content

Instantly share code, notes, and snippets.

@armenzg
Created July 4, 2023 20:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save armenzg/9525051423b3f506e2b25f208c33155b to your computer and use it in GitHub Desktop.
Save armenzg/9525051423b3f506e2b25f208c33155b to your computer and use it in GitHub Desktop.
Only transform context line
Url: ${et(t)}`),!0)}function ro(t,e){return t.type||!e||!e.length?!1:ao(t).some(n=>pe(n,e))}function oo(t,e){if(t.type!=="transaction"||!e||!e.length)return!1;let n=t.transaction;return n?pe(n,e):!1}function io(t,e){if(!e||!e.length)return!1;let n=et(t);return n?pe(n,e):!1}function so(t,e){if(!e||!e.length)return!0;let n=et(t);return n?pe(n,e):!0}function ao(t){if(t.message)return[t.message];if(t.exception){let{values:e}=t.exception;try{let{type:n="",value:r=""}=e&&e[e.length-1]||{};return[`${r}`,`${n}: ${r}`]}catch{return(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&d.error(`Cannot extract message for event ${U(t)}`),[]}}return[]}function co(t){try{return t.exception.values[0].type==="SentryError"}catch{}return!1}function uo(t=[]){for(let e=t.length-1;e>=0;e--){let n=t[e];if(n&&n.filename!=="<anonymous>"&&n.filename!=="[native code]")return n.filename||null}return null}function et(t){try{let e;try{e=t.exception.values[0].stacktrace.frames}catch{}return e?uo(e):null}catch{return(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&d.error(`Cannot extract url for event ${U(t)}`),null}}var p=y,Ft=0;function Gt(){return Ft>0}function To(){Ft++,setTimeout(()=>{Ft--})}function ee(t,e={},n){if(typeof t!="function")return t;try{let o=t.__sentry_wrapped__;if(o)return o;if(ie(t))return t}catch{return t}let r=function(){let o=Array.prototype.slice.call(arguments);try{n&&typeof n=="function"&&n.apply(this,arguments);let i=o.map(s=>ee(s,e));return t.apply(this,i)}catch(i){throw To(),Qe(s=>{s.addEventProcessor(a=>(e.mechanism&&(he(a,void 0,void 0),W(a,e.mechanism)),a.extra={...a.extra,arguments:o},a)),Ze(i)}),i}};try{for(let o in t)Object.prototype.hasOwnProperty.call(t,o)&&(r[o]=t[o])}catch{}Ae(r,t),_e(t,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return t.name}})}catch{}return r}function Yt(t,e){let n=$t(t,e),r={type:e&&e.name,value:No(e)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function xo(t,e,n,r){let i=_().getClient(),s=i&&i.getOptions().normalizeDepth,a={exception:{values:[{type:ne(e)?e.constructor.name:r?"UnhandledRejection":"Error",value:Do(e,{isUnhandledRejection:r})}]},extra:{__serialized__:We(e,s)}};if(n){let c=$t(t,n);c.length&&(a.exception.values[0].stacktrace={frames:c})}return a}function Mt(t,e){return{exception:{values:[Yt(t,e)]}}}function $t(t,e){let n=e.stacktrace||e.stack||"",r=vo(e);try{return t(n,r)}catch{}return[]}var Ro=/Minified React error #\d+;/i;function vo(t){if(t){if(typeof t.framesToPop=="number")return t.framesToPop;if(Ro.test(t.message))return 1}return 0}function No(t){let e=t&&t.message;return e?e.error&&typeof e.error.message=="string"?e.error.message:e:"No error message"}function Gn(t,e,n,r){let o=n&&n.syntheticException||void 0,i=tt(t,e,o,r);return W(i),i.level="error",n&&n.event_id&&(i.event_id=n.event_id),T(i)}function Mn(t,e,n="info",r,o){let i=r&&r.syntheticException||void 0,s=Ct(t,e,i,o);return s.level=n,r&&r.event_id&&(s.event_id=r.event_id),T(s)}function tt(t,e,n,r,o){let i;if(ue(e)&&e.error)return Mt(t,e.error);if(ke(e)||it(e)){let s=e;if("stack"in e)i=Mt(t,e);else{let a=s.name||(ke(s)?"DOMError":"DOMException"),c=s.message?`${a}: ${s.message}`:a;i=Ct(t,c,n,r),he(i,c)}return"code"in s&&(i.tags={...i.tags,"DOMException.code":`${s.code}`}),i}return ye(e)?Mt(t,e):O(e)||ne(e)?(i=xo(t,e,n,o),W(i,{synthetic:!0}),i):(i=Ct(t,e,n,r),he(i,`${e}`,void 0),W(i,{synthetic:!0}),i)}function Ct(t,e,n,r){let o={message:e};if(r&&n){let i=$t(t,n);i.length&&(o.exception={values:[{value:e,stacktrace:{frames:i}}]})}return o}function Do(t,{isUnhandledRejection:e}){let n=pt(t),r=e?"promise rejection":"exception";return ue(t)?`Event \`ErrorEvent\` captured as ${r} with message \`${t.message}\``:ne(t)?`Event \`${ko(t)}\` (type=${t.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function ko(t){try{let e=Object.getPrototypeOf(t);return e?e.constructor.name:void 0}catch{}}var nt=1024,jt="Breadcrumbs",$=class{static __initStatic(){this.id=jt}__init(){this.name=$.id}constructor(e){$.prototype.__init.call(this),this.options={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e}}setupOnce(){this.options.console&&D("console",Io),this.options.dom&&D("dom",Oo(this.options.dom)),this.options.xhr&&D("xhr",wo),this.options.fetch&&D("fetch",Uo),this.options.history&&D("history",Ao)}addSentryBreadcrumb(e){this.options.sentry&&_().addBreadcrumb({category:`sentry.${e.type==="transaction"?"transaction":"event"}`,event_id:e.event_id,level:e.level,message:U(e)},{event:e})}};$.__initStatic();function Oo(t){function e(n){let r,o=typeof t=="object"?t.serializeAttribute:void 0,i=typeof t=="object"&&typeof t.maxStringLength=="number"?t.maxStringLength:void 0;i&&i>nt&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&d.warn(`\`dom.maxStringLength\` cannot exceed ${nt}, but a value of ${i} was configured. Sentry will use ${nt} instead.`),i=nt),typeof o=="string"&&(o=[o]);try{let s=n.event;r=Po(s)?de(s.target,{keyAttrs:o,maxStringLength:i}):de(s,{keyAttrs:o,maxStringLength:i})}catch{r="<unknown>"}r.length!==0&&_().addBreadcrumb({category:`ui.${n.name}`,message:r},{event:n.event,name:n.name,global:n.global})}return e}function Io(t){for(let n=0;n<t.args.length;n++)if(t.args[n]==="ref=Ref<"){t.args[n+1]="viewRef";break}let e={category:"console",data:{arguments:t.args,logger:"console"},level:Tt(t.level),message:Ue(t.args," ")};if(t.level==="assert")if(t.args[0]===!1)e.message=`Assertion failed: ${Ue(t.args.slice(1)," ")||"console.assert"}`,e.data.arguments=t.args.slice(1);else return;_().addBreadcrumb(e,{input:t.args,level:t.level})}function wo(t){let{startTimestamp:e,endTimestamp:n}=t,r=t.xhr[se];if(!e||!n||!r)return;let{method:o,url:i,status_code:s,body:a}=r,c={method:o,url:i,status_code:s},u={xhr:t.xhr,input:a,startTimestamp:e,endTimestamp:n};_().addBreadcrumb({category:"xhr",data:c,type:"http"},u)}function Uo(t){let{startTimestamp:e,endTimestamp:n}=t;if(n&&!(t.fetchData.url.match(/sentry_key/)&&t.fetchData.method==="POST"))if(t.error){let r=t.fetchData,o={data:t.error,input:t.args,startTimestamp:e,endTimestamp:n};_().addBreadcrumb({category:"fetch",data:r,level:"error",type:"http"},o)}else{let r={...t.fetchData,status_code:t.response&&t.response.status},o={input:t.args,response:t.response,startTimestamp:e,endTimestamp:n};_().addBreadcrumb({category:"fetch",data:r,type:"http"},o)}}function Ao(t){let e=t.from,n=t.to,r=xe(p.location.href),o=xe(e),i=xe(n);o.path||(o=r),r.protocol===i.protocol&&r.host===i.host&&(n=i.relative),r.protocol===o.protocol&&r.host===o.host&&(e=o.relative),_().addBreadcrumb({category:"navigation",data:{from:e,to:n}})}function Po(t){return!!t&&!!t.target}function Cn(t,{metadata:e,tunnel:n,dsn:r}){let o={event_id:t.event_id,sent_at:new Date().toISOString(),...e&&e.sdk&&{sdk:{name:e.sdk.name,version:e.sdk.version}},...!!n&&!!r&&{dsn:G(r)}},i=Bo(t);return C(o,[i])}function Bo(t){return[{type:"user_report"},t]}var rt=class extends P{constructor(e){let n=p.SENTRY_SDK_SOURCE||St();e._metadata=e._metadata||{},e._metadata.sdk=e._metadata.sdk||{name:"sentry.javascript.browser",packages:[{name:`${n}:@sentry/browser`,version:Q}],version:Q},super(e),e.sendClientReports&&p.document&&p.document.addEventListener("visibilitychange",()=>{p.document.visibilityState==="hidden"&&this._flushOutcomes()})}eventFromException(e,n){return Gn(this._options.stackParser,e,n,this._options.attachStacktrace)}eventFromMessage(e,n="info",r){return Mn(this._options.stackParser,e,n,r,this._options.attachStacktrace)}sendEvent(e,n){let r=this.getIntegrationById(jt);r&&r.addSentryBreadcrumb&&r.addSentryBreadcrumb(e),super.sendEvent(e,n)}captureUserFeedback(e){if(!this._isEnabled()){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&d.warn("SDK not enabled, will not capture user feedback.");return}let n=Cn(e,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this._sendEnvelope(n)}_prepareEvent(e,n,r){return e.platform=e.platform||"javascript",super._prepareEvent(e,n,r)}_flushOutcomes(){let e=this._clearOutcomes();if(e.length===0){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&d.log("No outcomes to send");return}if(!this._dsn){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&d.log("No dsn provided, will not send outcomes");return}(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&d.log("Sending outcomes:",e);let n=It(e,this._options.tunnel&&G(this._dsn));this._sendEnvelope(n)}};var De;function Yn(){if(De)return De;if(Se(p.fetch))return De=p.fetch.bind(p);let t=p.document,e=p.fetch;if(t&&typeof t.createElement=="function")try{let n=t.createElement("iframe");n.hidden=!0,t.head.appendChild(n);let r=n.contentWindow;r&&r.fetch&&(e=r.fetch),t.head.removeChild(n)}catch(n){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&d.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return De=e.bind(p)}function $n(){De=void 0}function jn(t,e=Yn()){let n=0,r=0;function o(i){let s=i.body.length;n+=s,r++;let a={body:i.body,method:"POST",referrerPolicy:"origin",headers:t.headers,keepalive:n<=6e4&&r<15,...t.fetchOptions};try{return e(t.url,a).then(c=>(n-=s,r--,{statusCode:c.status,headers:{"x-sentry-rate-limits":c.headers.get("X-Sentry-Rate-Limits"),"retry-after":c.headers.get("Retry-After")}}))}catch(c){return $n(),n-=s,r--,J(c)}}return Ee(t,o)}var Lo=4;function Hn(t){function e(n){return new h((r,o)=>{let i=new XMLHttpRequest;i.onerror=o,i.onreadystatechange=()=>{i.readyState===Lo&&r({statusCode:i.status,headers:{"x-sentry-rate-limits":i.getResponseHeader("X-Sentry-Rate-Limits"),"retry-after":i.getResponseHeader("Retry-After")}})},i.open("POST",t.url);for(let s in t.headers)Object.prototype.hasOwnProperty.call(t.headers,s)&&i.setRequestHeader(s,t.headers[s]);i.send(n.body)})}return Ee(t,e)}var ot="?";var Fo=30,Go=40,Mo=50;function Ht(t,e,n,r){let o={filename:t,function:e,in_app:!0};return n!==void 0&&(o.lineno=n),r!==void 0&&(o.colno=r),o}var Co=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Yo=/\((\S*)(?::(\d+))(?::(\d+))\)/,$o=t=>{let e=Co.exec(t);if(e){if(e[2]&&e[2].indexOf("eval")===0){let i=Yo.exec(e[2]);i&&(e[2]=i[1],e[3]=i[2],e[4]=i[3])}let[r,o]=qn(e[1]||ot,e[2]);return Ht(o,r,e[3]?+e[3]:void 0,e[4]?+e[4]:void 0)}},jo=[Fo,$o],Ho=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Wo=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,qo=t=>{let e=Ho.exec(t);if(e){if(e[3]&&e[3].indexOf(" > eval")>-1){let i=Wo.exec(e[3]);i&&(e[1]=e[1]||"eval",e[3]=i[1],e[4]=i[2],e[5]="")}let r=e[3],o=e[1]||ot;return[o,r]=qn(o,r),Ht(r,o,e[4]?+e[4]:void 0,e[5]?+e[5]:void 0)}},zo=[Mo,qo],Ko=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,Vo=t=>{let e=Ko.exec(t);return e?Ht(e[2],e[1]||ot,+e[3],e[4]?+e[4]:void 0):void 0},Xo=[Go,Vo];var Jo=[jo,zo,Xo],Wn=Be(...Jo),qn=(t,e)=>{let n=t.indexOf("safari-extension")!==-1,r=t.indexOf("safari-web-extension")!==-1;return n||r?[t.indexOf("@")!==-1?t.split("@")[0]:ot,n?`safari-extension:${e}`:`safari-web-extension:${e}`]:[t,e]};var R=class{static __initStatic(){this.id="GlobalHandlers"}__init(){this.name=R.id}__init2(){this._installFunc={onerror:Zo,onunhandledrejection:Qo}}constructor(e){R.prototype.__init.call(this),R.prototype.__init2.call(this),this._options={onerror:!0,onunhandledrejection:!0,...e}}setupOnce(){Error.stackTraceLimit=50;let e=this._options;for(let n in e){let r=this._installFunc[n];r&&e[n]&&(ni(n),r(),this._installFunc[n]=void 0)}}};R.__initStatic();function Zo(){D("error",t=>{let[e,n,r]=Vn();if(!e.getIntegration(R))return;let{msg:o,url:i,line:s,column:a,error:c}=t;if(Gt()||c&&c.__sentry_own_request__)return;let u=c===void 0&&v(o)?ti(o,i,s,a):zn(tt(n,c||o,void 0,r,!1),i,s,a);u.level="error",Kn(e,c,u,"onerror")})}function Qo(){D("unhandledrejection",t=>{let[e,n,r]=Vn();if(!e.getIntegration(R))return;let o=t;try{"reason"in t?o=t.reason:"detail"in t&&"reason"in t.detail&&(o=t.detail.reason)}catch{}if(Gt()||o&&o.__sentry_own_request__)return!0;let i=fe(o)?ei(o):tt(n,o,void 0,r,!0);i.level="error",Kn(e,o,i,"onunhandledrejection")})}function ei(t){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(t)}`}]}}}function ti(t,e,n,r){let o=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i,i=ue(t)?t.message:t,s="Error",a=i.match(o);return a&&(s=a[1],i=a[2]),zn({exception:{values:[{type:s,value:i}]}},e,n,r)}function zn(t,e,n,r){let o=t.exception=t.exception||{},i=o.values=o.values||[],s=i[0]=i[0]||{},a=s.stacktrace=s.stacktrace||{},c=a.frames=a.frames||[],u=isNaN(parseInt(r,10))?void 0:r,l=isNaN(parseInt(n,10))?void 0:n,f=v(e)&&e.length>0?e:ft();return c.length===0&&c.push({colno:u,filename:f,function:"?",in_app:!0,lineno:l}),t}function ni(t){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&d.log(`Global Handler attached: ${t}`)}function Kn(t,e,n,r){W(n,{handled:!1,type:r}),t.captureEvent(n,{originalException:e})}function Vn(){let t=_(),e=t.getClient(),n=e&&e.getOptions()||{stackParser:()=>[],attachStacktrace:!1};return[t,n.stackParser,n.attachStacktrace]}var ri=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],j=class{static __initStatic(){this.id="TryCatch"}__init(){this.name=j.id}constructor(e){j.prototype.__init.call(this),this._options={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...e}}setupOnce(){this._options.setTimeout&&g(p,"setTimeout",Xn),this._options.setInterval&&g(p,"setInterval",Xn),this._options.requestAnimationFrame&&g(p,"requestAnimationFrame",oi),this._options.XMLHttpRequest&&"XMLHttpRequest"in p&&g(XMLHttpRequest.prototype,"send",ii);let e=this._options.eventTarget;e&&(Array.isArray(e)?e:ri).forEach(si)}};j.__initStatic();function Xn(t){return function(...e){let n=e[0];return e[0]=ee(n,{mechanism:{data:{function:N(t)},handled:!0,type:"instrument"}}),t.apply(this,e)}}function oi(t){return function(e){return t.apply(this,[ee(e,{mechanism:{data:{function:"requestAnimationFrame",handler:N(t)},handled:!0,type:"instrument"}})])}}function ii(t){return function(...e){let n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(o=>{o in n&&typeof n[o]=="function"&&g(n,o,function(i){let s={mechanism:{data:{function:o,handler:N(i)},handled:!0,type:"instrument"}},a=ie(i);return a&&(s.mechanism.data.handler=N(a)),ee(i,s)})}),t.apply(this,e)}}function si(t){let e=p,n=e[t]&&e[t].prototype;!n||!n.hasOwnProperty||!n.hasOwnProperty("addEventListener")||(g(n,"addEventListener",function(r){return function(o,i,s){try{typeof i.handleEvent=="function"&&(i.handleEvent=ee(i.handleEvent,{mechanism:{data:{function:"handleEvent",handler:N(i),target:t},handled:!0,type:"instrument"}}))}catch{}return r.apply(this,[o,ee(i,{mechanism:{data:{function:"addEventListener",handler:N(i),target:t},handled:!0,type:"instrument"}}),s])}}),g(n,"removeEventListener",function(r){return function(o,i,s){let a=i;try{let c=a&&a.__sentry_wrapped__;c&&r.call(this,o,c,s)}catch{}return r.call(this,o,a,s)}}))}var ai="cause",ci=5,B=class{static __initStatic(){this.id="LinkedErrors"}__init(){this.name=B.id}constructor(e={}){B.prototype.__init.call(this),this._key=e.key||ai,this._limit=e.limit||ci}setupOnce(){let e=_().getClient();e&&Z((n,r)=>{let o=_().getIntegration(B);return o?ui(e.getOptions().stackParser,o._key,o._limit,n,r):n})}};B.__initStatic();function ui(t,e,n,r,o){if(!r.exception||!r.exception.values||!o||!H(o.originalException,Error))return r;let i=Jn(t,n,o.originalException,e);return r.exception.values=[...i,...r.exception.values],r}function Jn(t,e,n,r,o=[]){if(!H(n[r],Error)||o.length+1>=e)return o;let i=Yt(t,n[r]);return Jn(t,e,n[r],r,[i,...o])}var L=class{constructor(){L.prototype.__init.call(this)}static __initStatic(){this.id="HttpContext"}__init(){this.name=L.id}setupOnce(){Z(e=>{if(_().getIntegration(L)){if(!p.navigator&&!p.location&&!p.document)return e;let n=e.request&&e.request.url||p.location&&p.location.href,{referrer:r}=p.document||{},{userAgent:o}=p.navigator||{},i={...e.request&&e.request.headers,...r&&{Referer:r},...o&&{"User-Agent":o}},s={...e.request,...n&&{url:n},headers:i};return{...e,request:s}}return e})}};L.__initStatic();var F=class{constructor(){F.prototype.__init.call(this)}static __initStatic(){this.id="Dedupe"}__init(){this.name=F.id}setupOnce(e,n){let r=o=>{if(o.type)return o;let i=n().getIntegration(F);if(i){try{if(fi(o,i._previousEvent))return(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&d.warn("Event dropped due to being a duplicate of previously captured event."),null}catch{return i._previousEvent=o}return i._previousEvent=o}return o};r.id=this.name,e(r)}};F.__initStatic();function fi(t,e){return e?!!(di(t,e)||li(t,e)):!1}function di(t,e){let n=t.message,r=e.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!tr(t,e)||!er(t,e))}function li(t,e){let n=Zn(e),r=Zn(t);return!(!n||!r||n.type!==r.type||n.value!==r.value||!tr(t,e)||!er(t,e))}function er(t,e){let n=Qn(t),r=Qn(e);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 tr(t,e){let n=t.fingerprint,r=e.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 Zn(t){return t.exception&&t.exception.values&&t.exception.values[0]}function Qn(t){let e=t.exception;if(e)try{return e.values[0].stacktrace.frames}catch{return}}var rr=[new ae.InboundFilters,new ae.FunctionToString,new j,new $,new R,new B,new F,new L];function Wt(t={}){t.defaultIntegrations===void 0&&(t.defaultIntegrations=rr),t.release===void 0&&(typeof __SENTRY_RELEASE__=="string"&&(t.release=__SENTRY_RELEASE__),p.SENTRY_RELEASE&&p.SENTRY_RELEASE.id&&(t.release=p.SENTRY_RELEASE.id)),t.autoSessionTracking===void 0&&(t.autoSessionTracking=!0),t.sendClientReports===void 0&&(t.sendClientReports=!0);let e={...t,stackParser:mt(t.stackParser||Wn),integrations:Pt(t),transport:t.transport||(Le()?jn:Hn)};Lt(rt,e),t.autoSessionTracking&&pi()}function nr(t){t.startSession({ignoreDuration:!0}),t.captureSession()}function pi(){if(typeof p.document>"u"){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&d.warn("Session tracking in non-browser environment with @sentry/browser is not supported.");return}let t=_();t.captureSession&&(nr(t),D("history",({from:e,to:n})=>{e===void 0||e===n||nr(_())}))}var qt={};Kt(qt,{Breadcrumbs:()=>$,Dedupe:()=>F,GlobalHandlers:()=>R,HttpContext:()=>L,LinkedErrors:()=>B,TryCatch:()=>j});var or={};p.Sentry&&p.Sentry.Integrations&&(or=p.Sentry.Integrations);var Wu={...or,...ae,...qt};function zt(t){t._metadata=t._metadata||{},t._metadata.sdk=t._metadata.sdk||{name:"sentry.javascript.react",packages:[{name:"npm:@sentry/react",version:Q}],version:Q},Wt(t)}var k=Vt(Xt()),mi=()=>[{title:"New Remix App"},{name:"description",content:"Welcome to Remix!"}];zt({dsn:"https://49f2fcf8e6844e8380e259f3765a0515@o510822.ingest.sentry.io/4505472698810368"});function ir(){return(0,k.jsxs)("div",{style:{fontFamily:"system-ui, sans-serif",lineHeight:"1.8"},children:[(0,k.jsx)("h1",{children:"Welcome to Remix"}),(0,k.jsxs)("ul",{children:[(0,k.jsx)("li",{children:(0,k.jsx)("a",{target:"_blank",href:"https://remix.run/tutorials/blog",rel:"noreferrer",children:"15m Quickstart Blog Tutorial"})}),(0,k.jsx)("li",{children:(0,k.jsx)("a",{target:"_blank",href:"https://remix.run/tutorials/jokes",rel:"noreferrer",children:"Deep Dive Jokes App Tutorial"})}),(0,k.jsx)("li",{children:(0,k.jsx)("a",{target:"_blank",href:"https://remix.run/docs",rel:"noreferrer",children:"Remix Docs 2"})}),(0,k.jsx)("button",{onClick:()=>methodDoesNotExist(),children:"Break the world"})]})]})}export{ir as default,mi as meta};
// Substituted (" for newline + ("
Url: ${et(t)}`),!0)}function ro(t,e){return t.type||!e||!e.length?!1:ao(t).some(n=>pe(n,e))}function oo(t,e){if(t.type!=="transaction"||!e||!e.length)return!1;let n=t.transaction;return n?pe(n,e):!1}function io(t,e){if(!e||!e.length)return!1;let n=et(t);return n?pe(n,e):!1}function so(t,e){if(!e||!e.length)return!0;let n=et(t);return n?pe(n,e):!0}function ao(t){if(t.message)return[t.message];if(t.exception){let{values:e}=t.exception;try{let{type:n="",value:r=""}=e&&e[e.length-1]||{};return[`${r}`,`${n}: ${r}`]}catch{return(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&d.error(`Cannot extract message for event ${U(t)}`),[]}}return[]}function co(t){try{return t.exception.values[0].type==="SentryError"}catch{}return!1}function uo(t=[]){for(let e=t.length-1;e>=0;e--){let n=t[e];if(n&&n.filename!=="<anonymous>"&&n.filename!=="[native code]")return n.filename||null}return null}function et(t){try{let e;try{e=t.exception.values[0].stacktrace.frames}catch{}return e?uo(e):null}catch{return(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&d.error(`Cannot extract url for event ${U(t)}`),null}}var p=y,Ft=0;function Gt(){return Ft>0}function To(){Ft++,setTimeout(()=>{Ft--})}function ee(t,e={},n){if(typeof t!="function")return t;try{let o=t.__sentry_wrapped__;if(o)return o;if(ie(t))return t}catch{return t}let r=function(){let o=Array.prototype.slice.call(arguments);try{n&&typeof n=="function"&&n.apply(this,arguments);let i=o.map(s=>ee(s,e));return t.apply(this,i)}catch(i){throw To(),Qe(s=>{s.addEventProcessor(a=>(e.mechanism&&(he(a,void 0,void 0),W(a,e.mechanism)),a.extra={...a.extra,arguments:o},a)),Ze(i)}),i}};try{for(let o in t)Object.prototype.hasOwnProperty.call(t,o)&&(r[o]=t[o])}catch{}Ae(r,t),_e(t,"__sentry_wrapped__",r);try{Object.getOwnPropertyDescriptor(r,"name").configurable&&Object.defineProperty(r,"name",{get(){return t.name}})}catch{}return r}function Yt(t,e){let n=$t(t,e),r={type:e&&e.name,value:No(e)};return n.length&&(r.stacktrace={frames:n}),r.type===void 0&&r.value===""&&(r.value="Unrecoverable error caught"),r}function xo(t,e,n,r){let i=_().getClient(),s=i&&i.getOptions().normalizeDepth,a={exception:{values:[{type:ne(e)?e.constructor.name:r?"UnhandledRejection":"Error",value:Do(e,{isUnhandledRejection:r})}]},extra:{__serialized__:We(e,s)}};if(n){let c=$t(t,n);c.length&&(a.exception.values[0].stacktrace={frames:c})}return a}function Mt(t,e){return{exception:{values:[Yt(t,e)]}}}function $t(t,e){let n=e.stacktrace||e.stack||"",r=vo(e);try{return t(n,r)}catch{}return[]}var Ro=/Minified React error #\d+;/i;function vo(t){if(t){if(typeof t.framesToPop=="number")return t.framesToPop;if(Ro.test(t.message))return 1}return 0}function No(t){let e=t&&t.message;return e?e.error&&typeof e.error.message=="string"?e.error.message:e:"No error message"}function Gn(t,e,n,r){let o=n&&n.syntheticException||void 0,i=tt(t,e,o,r);return W(i),i.level="error",n&&n.event_id&&(i.event_id=n.event_id),T(i)}function Mn(t,e,n="info",r,o){let i=r&&r.syntheticException||void 0,s=Ct(t,e,i,o);return s.level=n,r&&r.event_id&&(s.event_id=r.event_id),T(s)}function tt(t,e,n,r,o){let i;if(ue(e)&&e.error)return Mt(t,e.error);if(ke(e)||it(e)){let s=e;if
("stack"in e)i=Mt(t,e);else{let a=s.name||(ke(s)?"DOMError":"DOMException"),c=s.message?`${a}: ${s.message}`:a;i=Ct(t,c,n,r),he(i,c)}return"code"in s&&(i.tags={...i.tags,"DOMException.code":`${s.code}`}),i}return ye(e)?Mt(t,e):O(e)||ne(e)?(i=xo(t,e,n,o),W(i,{synthetic:!0}),i):(i=Ct(t,e,n,r),he(i,`${e}`,void 0),W(i,{synthetic:!0}),i)}function Ct(t,e,n,r){let o={message:e};if(r&&n){let i=$t(t,n);i.length&&(o.exception={values:[{value:e,stacktrace:{frames:i}}]})}return o}function Do(t,{isUnhandledRejection:e}){let n=pt(t),r=e?"promise rejection":"exception";return ue(t)?`Event \`ErrorEvent\` captured as ${r} with message \`${t.message}\``:ne(t)?`Event \`${ko(t)}\` (type=${t.type}) captured as ${r}`:`Object captured as ${r} with keys: ${n}`}function ko(t){try{let e=Object.getPrototypeOf(t);return e?e.constructor.name:void 0}catch{}}var nt=1024,jt="Breadcrumbs",$=class{static __initStatic(){this.id=jt}__init(){this.name=$.id}constructor(e){$.prototype.__init.call(this),this.options={console:!0,dom:!0,fetch:!0,history:!0,sentry:!0,xhr:!0,...e}}setupOnce(){this.options.console&&D
("console",Io),this.options.dom&&D
("dom",Oo(this.options.dom)),this.options.xhr&&D
("xhr",wo),this.options.fetch&&D
("fetch",Uo),this.options.history&&D
("history",Ao)}addSentryBreadcrumb(e){this.options.sentry&&_().addBreadcrumb({category:`sentry.${e.type==="transaction"?"transaction":"event"}`,event_id:e.event_id,level:e.level,message:U(e)},{event:e})}};$.__initStatic();function Oo(t){function e(n){let r,o=typeof t=="object"?t.serializeAttribute:void 0,i=typeof t=="object"&&typeof t.maxStringLength=="number"?t.maxStringLength:void 0;i&&i>nt&&((typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&d.warn(`\`dom.maxStringLength\` cannot exceed ${nt}, but a value of ${i} was configured. Sentry will use ${nt} instead.`),i=nt),typeof o=="string"&&(o=[o]);try{let s=n.event;r=Po(s)?de(s.target,{keyAttrs:o,maxStringLength:i}):de(s,{keyAttrs:o,maxStringLength:i})}catch{r="<unknown>"}r.length!==0&&_().addBreadcrumb({category:`ui.${n.name}`,message:r},{event:n.event,name:n.name,global:n.global})}return e}function Io(t){for(let n=0;n<t.args.length;n++)if(t.args[n]==="ref=Ref<"){t.args[n+1]="viewRef";break}let e={category:"console",data:{arguments:t.args,logger:"console"},level:Tt(t.level),message:Ue(t.args," ")};if(t.level==="assert")if(t.args[0]===!1)e.message=`Assertion failed: ${Ue(t.args.slice(1)," ")||"console.assert"}`,e.data.arguments=t.args.slice(1);else return;_().addBreadcrumb(e,{input:t.args,level:t.level})}function wo(t){let{startTimestamp:e,endTimestamp:n}=t,r=t.xhr[se];if(!e||!n||!r)return;let{method:o,url:i,status_code:s,body:a}=r,c={method:o,url:i,status_code:s},u={xhr:t.xhr,input:a,startTimestamp:e,endTimestamp:n};_().addBreadcrumb({category:"xhr",data:c,type:"http"},u)}function Uo(t){let{startTimestamp:e,endTimestamp:n}=t;if(n&&!(t.fetchData.url.match(/sentry_key/)&&t.fetchData.method==="POST"))if(t.error){let r=t.fetchData,o={data:t.error,input:t.args,startTimestamp:e,endTimestamp:n};_().addBreadcrumb({category:"fetch",data:r,level:"error",type:"http"},o)}else{let r={...t.fetchData,status_code:t.response&&t.response.status},o={input:t.args,response:t.response,startTimestamp:e,endTimestamp:n};_().addBreadcrumb({category:"fetch",data:r,type:"http"},o)}}function Ao(t){let e=t.from,n=t.to,r=xe(p.location.href),o=xe(e),i=xe(n);o.path||(o=r),r.protocol===i.protocol&&r.host===i.host&&(n=i.relative),r.protocol===o.protocol&&r.host===o.host&&(e=o.relative),_().addBreadcrumb({category:"navigation",data:{from:e,to:n}})}function Po(t){return!!t&&!!t.target}function Cn(t,{metadata:e,tunnel:n,dsn:r}){let o={event_id:t.event_id,sent_at:new Date().toISOString(),...e&&e.sdk&&{sdk:{name:e.sdk.name,version:e.sdk.version}},...!!n&&!!r&&{dsn:G(r)}},i=Bo(t);return C(o,[i])}function Bo(t){return[{type:"user_report"},t]}var rt=class extends P{constructor(e){let n=p.SENTRY_SDK_SOURCE||St();e._metadata=e._metadata||{},e._metadata.sdk=e._metadata.sdk||{name:"sentry.javascript.browser",packages:[{name:`${n}:@sentry/browser`,version:Q}],version:Q},super(e),e.sendClientReports&&p.document&&p.document.addEventListener
("visibilitychange",()=>{p.document.visibilityState==="hidden"&&this._flushOutcomes()})}eventFromException(e,n){return Gn(this._options.stackParser,e,n,this._options.attachStacktrace)}eventFromMessage(e,n="info",r){return Mn(this._options.stackParser,e,n,r,this._options.attachStacktrace)}sendEvent(e,n){let r=this.getIntegrationById(jt);r&&r.addSentryBreadcrumb&&r.addSentryBreadcrumb(e),super.sendEvent(e,n)}captureUserFeedback(e){if(!this._isEnabled()){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&d.warn
("SDK not enabled, will not capture user feedback.");return}let n=Cn(e,{metadata:this.getSdkMetadata(),dsn:this.getDsn(),tunnel:this.getOptions().tunnel});this._sendEnvelope(n)}_prepareEvent(e,n,r){return e.platform=e.platform||"javascript",super._prepareEvent(e,n,r)}_flushOutcomes(){let e=this._clearOutcomes();if(e.length===0){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&d.log
("No outcomes to send");return}if(!this._dsn){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&d.log
("No dsn provided, will not send outcomes");return}(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&d.log
("Sending outcomes:",e);let n=It(e,this._options.tunnel&&G(this._dsn));this._sendEnvelope(n)}};var De;function Yn(){if(De)return De;if(Se(p.fetch))return De=p.fetch.bind(p);let t=p.document,e=p.fetch;if(t&&typeof t.createElement=="function")try{let n=t.createElement
("iframe");n.hidden=!0,t.head.appendChild(n);let r=n.contentWindow;r&&r.fetch&&(e=r.fetch),t.head.removeChild(n)}catch(n){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&d.warn
("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return De=e.bind(p)}function $n(){De=void 0}function jn(t,e=Yn()){let n=0,r=0;function o(i){let s=i.body.length;n+=s,r++;let a={body:i.body,method:"POST",referrerPolicy:"origin",headers:t.headers,keepalive:n<=6e4&&r<15,...t.fetchOptions};try{return e(t.url,a).then(c=>(n-=s,r--,{statusCode:c.status,headers:{"x-sentry-rate-limits":c.headers.get
("X-Sentry-Rate-Limits"),"retry-after":c.headers.get
("Retry-After")}}))}catch(c){return $n(),n-=s,r--,J(c)}}return Ee(t,o)}var Lo=4;function Hn(t){function e(n){return new h((r,o)=>{let i=new XMLHttpRequest;i.onerror=o,i.onreadystatechange=()=>{i.readyState===Lo&&r({statusCode:i.status,headers:{"x-sentry-rate-limits":i.getResponseHeader
("X-Sentry-Rate-Limits"),"retry-after":i.getResponseHeader
("Retry-After")}})},i.open
("POST",t.url);for(let s in t.headers)Object.prototype.hasOwnProperty.call(t.headers,s)&&i.setRequestHeader(s,t.headers[s]);i.send(n.body)})}return Ee(t,e)}var ot="?";var Fo=30,Go=40,Mo=50;function Ht(t,e,n,r){let o={filename:t,function:e,in_app:!0};return n!==void 0&&(o.lineno=n),r!==void 0&&(o.colno=r),o}var Co=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,Yo=/\((\S*)(?::(\d+))(?::(\d+))\)/,$o=t=>{let e=Co.exec(t);if(e){if(e[2]&&e[2].indexOf
("eval")===0){let i=Yo.exec(e[2]);i&&(e[2]=i[1],e[3]=i[2],e[4]=i[3])}let[r,o]=qn(e[1]||ot,e[2]);return Ht(o,r,e[3]?+e[3]:void 0,e[4]?+e[4]:void 0)}},jo=[Fo,$o],Ho=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,Wo=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,qo=t=>{let e=Ho.exec(t);if(e){if(e[3]&&e[3].indexOf
(" > eval")>-1){let i=Wo.exec(e[3]);i&&(e[1]=e[1]||"eval",e[3]=i[1],e[4]=i[2],e[5]="")}let r=e[3],o=e[1]||ot;return[o,r]=qn(o,r),Ht(r,o,e[4]?+e[4]:void 0,e[5]?+e[5]:void 0)}},zo=[Mo,qo],Ko=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i,Vo=t=>{let e=Ko.exec(t);return e?Ht(e[2],e[1]||ot,+e[3],e[4]?+e[4]:void 0):void 0},Xo=[Go,Vo];var Jo=[jo,zo,Xo],Wn=Be(...Jo),qn=(t,e)=>{let n=t.indexOf
("safari-extension")!==-1,r=t.indexOf
("safari-web-extension")!==-1;return n||r?[t.indexOf
("@")!==-1?t.split
("@")[0]:ot,n?`safari-extension:${e}`:`safari-web-extension:${e}`]:[t,e]};var R=class{static __initStatic(){this.id="GlobalHandlers"}__init(){this.name=R.id}__init2(){this._installFunc={onerror:Zo,onunhandledrejection:Qo}}constructor(e){R.prototype.__init.call(this),R.prototype.__init2.call(this),this._options={onerror:!0,onunhandledrejection:!0,...e}}setupOnce(){Error.stackTraceLimit=50;let e=this._options;for(let n in e){let r=this._installFunc[n];r&&e[n]&&(ni(n),r(),this._installFunc[n]=void 0)}}};R.__initStatic();function Zo(){D
("error",t=>{let[e,n,r]=Vn();if(!e.getIntegration(R))return;let{msg:o,url:i,line:s,column:a,error:c}=t;if(Gt()||c&&c.__sentry_own_request__)return;let u=c===void 0&&v(o)?ti(o,i,s,a):zn(tt(n,c||o,void 0,r,!1),i,s,a);u.level="error",Kn(e,c,u,"onerror")})}function Qo(){D
("unhandledrejection",t=>{let[e,n,r]=Vn();if(!e.getIntegration(R))return;let o=t;try{"reason"in t?o=t.reason:"detail"in t&&"reason"in t.detail&&(o=t.detail.reason)}catch{}if(Gt()||o&&o.__sentry_own_request__)return!0;let i=fe(o)?ei(o):tt(n,o,void 0,r,!0);i.level="error",Kn(e,o,i,"onunhandledrejection")})}function ei(t){return{exception:{values:[{type:"UnhandledRejection",value:`Non-Error promise rejection captured with value: ${String(t)}`}]}}}function ti(t,e,n,r){let o=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i,i=ue(t)?t.message:t,s="Error",a=i.match(o);return a&&(s=a[1],i=a[2]),zn({exception:{values:[{type:s,value:i}]}},e,n,r)}function zn(t,e,n,r){let o=t.exception=t.exception||{},i=o.values=o.values||[],s=i[0]=i[0]||{},a=s.stacktrace=s.stacktrace||{},c=a.frames=a.frames||[],u=isNaN(parseInt(r,10))?void 0:r,l=isNaN(parseInt(n,10))?void 0:n,f=v(e)&&e.length>0?e:ft();return c.length===0&&c.push({colno:u,filename:f,function:"?",in_app:!0,lineno:l}),t}function ni(t){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&d.log(`Global Handler attached: ${t}`)}function Kn(t,e,n,r){W(n,{handled:!1,type:r}),t.captureEvent(n,{originalException:e})}function Vn(){let t=_(),e=t.getClient(),n=e&&e.getOptions()||{stackParser:()=>[],attachStacktrace:!1};return[t,n.stackParser,n.attachStacktrace]}var ri=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],j=class{static __initStatic(){this.id="TryCatch"}__init(){this.name=j.id}constructor(e){j.prototype.__init.call(this),this._options={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...e}}setupOnce(){this._options.setTimeout&&g(p,"setTimeout",Xn),this._options.setInterval&&g(p,"setInterval",Xn),this._options.requestAnimationFrame&&g(p,"requestAnimationFrame",oi),this._options.XMLHttpRequest&&"XMLHttpRequest"in p&&g(XMLHttpRequest.prototype,"send",ii);let e=this._options.eventTarget;e&&(Array.isArray(e)?e:ri).forEach(si)}};j.__initStatic();function Xn(t){return function(...e){let n=e[0];return e[0]=ee(n,{mechanism:{data:{function:N(t)},handled:!0,type:"instrument"}}),t.apply(this,e)}}function oi(t){return function(e){return t.apply(this,[ee(e,{mechanism:{data:{function:"requestAnimationFrame",handler:N(t)},handled:!0,type:"instrument"}})])}}function ii(t){return function(...e){let n=this;return["onload","onerror","onprogress","onreadystatechange"].forEach(o=>{o in n&&typeof n[o]=="function"&&g(n,o,function(i){let s={mechanism:{data:{function:o,handler:N(i)},handled:!0,type:"instrument"}},a=ie(i);return a&&(s.mechanism.data.handler=N(a)),ee(i,s)})}),t.apply(this,e)}}function si(t){let e=p,n=e[t]&&e[t].prototype;!n||!n.hasOwnProperty||!n.hasOwnProperty
("addEventListener")||(g(n,"addEventListener",function(r){return function(o,i,s){try{typeof i.handleEvent=="function"&&(i.handleEvent=ee(i.handleEvent,{mechanism:{data:{function:"handleEvent",handler:N(i),target:t},handled:!0,type:"instrument"}}))}catch{}return r.apply(this,[o,ee(i,{mechanism:{data:{function:"addEventListener",handler:N(i),target:t},handled:!0,type:"instrument"}}),s])}}),g(n,"removeEventListener",function(r){return function(o,i,s){let a=i;try{let c=a&&a.__sentry_wrapped__;c&&r.call(this,o,c,s)}catch{}return r.call(this,o,a,s)}}))}var ai="cause",ci=5,B=class{static __initStatic(){this.id="LinkedErrors"}__init(){this.name=B.id}constructor(e={}){B.prototype.__init.call(this),this._key=e.key||ai,this._limit=e.limit||ci}setupOnce(){let e=_().getClient();e&&Z((n,r)=>{let o=_().getIntegration(B);return o?ui(e.getOptions().stackParser,o._key,o._limit,n,r):n})}};B.__initStatic();function ui(t,e,n,r,o){if(!r.exception||!r.exception.values||!o||!H(o.originalException,Error))return r;let i=Jn(t,n,o.originalException,e);return r.exception.values=[...i,...r.exception.values],r}function Jn(t,e,n,r,o=[]){if(!H(n[r],Error)||o.length+1>=e)return o;let i=Yt(t,n[r]);return Jn(t,e,n[r],r,[i,...o])}var L=class{constructor(){L.prototype.__init.call(this)}static __initStatic(){this.id="HttpContext"}__init(){this.name=L.id}setupOnce(){Z(e=>{if(_().getIntegration(L)){if(!p.navigator&&!p.location&&!p.document)return e;let n=e.request&&e.request.url||p.location&&p.location.href,{referrer:r}=p.document||{},{userAgent:o}=p.navigator||{},i={...e.request&&e.request.headers,...r&&{Referer:r},...o&&{"User-Agent":o}},s={...e.request,...n&&{url:n},headers:i};return{...e,request:s}}return e})}};L.__initStatic();var F=class{constructor(){F.prototype.__init.call(this)}static __initStatic(){this.id="Dedupe"}__init(){this.name=F.id}setupOnce(e,n){let r=o=>{if(o.type)return o;let i=n().getIntegration(F);if(i){try{if(fi(o,i._previousEvent))return(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&d.warn
("Event dropped due to being a duplicate of previously captured event."),null}catch{return i._previousEvent=o}return i._previousEvent=o}return o};r.id=this.name,e(r)}};F.__initStatic();function fi(t,e){return e?!!(di(t,e)||li(t,e)):!1}function di(t,e){let n=t.message,r=e.message;return!(!n&&!r||n&&!r||!n&&r||n!==r||!tr(t,e)||!er(t,e))}function li(t,e){let n=Zn(e),r=Zn(t);return!(!n||!r||n.type!==r.type||n.value!==r.value||!tr(t,e)||!er(t,e))}function er(t,e){let n=Qn(t),r=Qn(e);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 tr(t,e){let n=t.fingerprint,r=e.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 Zn(t){return t.exception&&t.exception.values&&t.exception.values[0]}function Qn(t){let e=t.exception;if(e)try{return e.values[0].stacktrace.frames}catch{return}}var rr=[new ae.InboundFilters,new ae.FunctionToString,new j,new $,new R,new B,new F,new L];function Wt(t={}){t.defaultIntegrations===void 0&&(t.defaultIntegrations=rr),t.release===void 0&&(typeof __SENTRY_RELEASE__=="string"&&(t.release=__SENTRY_RELEASE__),p.SENTRY_RELEASE&&p.SENTRY_RELEASE.id&&(t.release=p.SENTRY_RELEASE.id)),t.autoSessionTracking===void 0&&(t.autoSessionTracking=!0),t.sendClientReports===void 0&&(t.sendClientReports=!0);let e={...t,stackParser:mt(t.stackParser||Wn),integrations:Pt(t),transport:t.transport||(Le()?jn:Hn)};Lt(rt,e),t.autoSessionTracking&&pi()}function nr(t){t.startSession({ignoreDuration:!0}),t.captureSession()}function pi(){if(typeof p.document>"u"){(typeof __SENTRY_DEBUG__>"u"||__SENTRY_DEBUG__)&&d.warn
("Session tracking in non-browser environment with @sentry/browser is not supported.");return}let t=_();t.captureSession&&(nr(t),D
("history",({from:e,to:n})=>{e===void 0||e===n||nr(_())}))}var qt={};Kt(qt,{Breadcrumbs:()=>$,Dedupe:()=>F,GlobalHandlers:()=>R,HttpContext:()=>L,LinkedErrors:()=>B,TryCatch:()=>j});var or={};p.Sentry&&p.Sentry.Integrations&&(or=p.Sentry.Integrations);var Wu={...or,...ae,...qt};function zt(t){t._metadata=t._metadata||{},t._metadata.sdk=t._metadata.sdk||{name:"sentry.javascript.react",packages:[{name:"npm:@sentry/react",version:Q}],version:Q},Wt(t)}var k=Vt(Xt()),mi=()=>[{title:"New Remix App"},{name:"description",content:"Welcome to Remix!"}];zt({dsn:"https://49f2fcf8e6844e8380e259f3765a0515@o510822.ingest.sentry.io/4505472698810368"});function ir(){return(0,k.jsxs)
("div",{style:{fontFamily:"system-ui, sans-serif",lineHeight:"1.8"},children:[(0,k.jsx)
("h1",{children:"Welcome to Remix"}),(0,k.jsxs)
("ul",{children:[(0,k.jsx)
("li",{children:(0,k.jsx)
("a",{target:"_blank",href:"https://remix.run/tutorials/blog",rel:"noreferrer",children:"15m Quickstart Blog Tutorial"})}),(0,k.jsx)
("li",{children:(0,k.jsx)
("a",{target:"_blank",href:"https://remix.run/tutorials/jokes",rel:"noreferrer",children:"Deep Dive Jokes App Tutorial"})}),(0,k.jsx)
("li",{children:(0,k.jsx)
("a",{target:"_blank",href:"https://remix.run/docs",rel:"noreferrer",children:"Remix Docs 2"})}),(0,k.jsx)
("button",{onClick:()=>methodDoesNotExist(),children:"Break the world"})]})]})}export{ir as default,mi as meta};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment