UNPKG

@getontime/cli

Version:

Time keeping for live events

2 lines 3.16 kB
System.register(["./jsx-runtime-legacy-DMkDNnVj.js","./exports-legacy-BgX55wRH.js","./index-legacy-NWDCUII5.js"],function(e,t){var n,o,s,r,a,c,i,d,l,u,p,f;function h(e={}){const t=l.document,n=t?.head||t?.body;if(!n)return;const o=c(),s=i()?.getDsn();if(!s)return;const a={...e,user:{...o.getUser(),...e.user},eventId:e.eventId||r()},d=l.document.createElement("script");d.async=!0,d.crossOrigin="anonymous",d.src=u(s,a);const{onLoad:p,onClose:f}=a;if(p&&(d.onload=p),f){const e=t=>{if("__sentry_reportdialog_closed__"===t.data)try{f()}finally{l.removeEventListener("message",e)}};l.addEventListener("message",e)}n.appendChild(d)}function m(e,{componentStack:t},n){if(function(e){const t=e.match(/^([^.]+)/);return null!==t&&parseInt(t[0])>=17}(p.version)&&s(e)&&t){const n=new Error(e.message);n.name=`React ErrorBoundary ${e.name}`,n.stack=t,function(e,t){const n=new WeakSet;!function e(t,o){if(!n.has(t))return t.cause?(n.add(t),e(t.cause,o)):void(t.cause=o)}(e,t)}(e,n)}return d(e,n)}return{setters:[function(e){n=e.a,o=e.n},function(e){s=e.Jt,r=e.a,a=e.bt,c=e.gt,i=e.ht,d=e.n,e.un},function(e){l=e.c,u=e.l}],execute:function(){!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{};e.SENTRY_RELEASE={id:"f14ad0099eab1969fdd065b56af5fdd3cf530de6"};var t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="563400d1-45de-41ae-bd39-746776b2c1f5",e._sentryDebugIdIdentifier="sentry-dbid-563400d1-45de-41ae-bd39-746776b2c1f5")}catch(e){}}(),p=n(o()),f={componentStack:null,error:null,eventId:null},e("t",class extends p.Component{constructor(e){super(e),this.state=f,this._openFallbackReportDialog=!0;const t=i();t&&e.showDialog&&(this._openFallbackReportDialog=!1,this._cleanupHook=t.on("afterSendEvent",t=>{!t.type&&this._lastEventId&&t.event_id===this._lastEventId&&h({...e.dialogOptions,eventId:this._lastEventId})}))}componentDidCatch(e,t){const{componentStack:n}=t,{beforeCapture:o,onError:s,showDialog:r,dialogOptions:c}=this.props;a(a=>{o&&o(a,e,n);const i=m(e,t,{mechanism:{handled:null!=this.props.handled?this.props.handled:!!this.props.fallback,type:"auto.function.react.error_boundary"}});s&&s(e,n,i),r&&(this._lastEventId=i,this._openFallbackReportDialog&&h({...c,eventId:i})),this.setState({error:e,componentStack:n,eventId:i})})}componentDidMount(){const{onMount:e}=this.props;e&&e()}componentWillUnmount(){const{error:e,componentStack:t,eventId:n}=this.state,{onUnmount:o}=this.props;o&&(this.state===f?o(null,null,null):o(e,t,n)),this._cleanupHook&&(this._cleanupHook(),this._cleanupHook=void 0)}resetErrorBoundary(){const{onReset:e}=this.props,{error:t,componentStack:n,eventId:o}=this.state;e&&e(t,n,o),this.setState(f)}render(){const{fallback:e,children:t}=this.props,n=this.state;if(null===n.componentStack)return"function"==typeof t?t():t;const o="function"==typeof e?p.createElement(e,{error:n.error,componentStack:n.componentStack,resetError:()=>this.resetErrorBoundary(),eventId:n.eventId}):e;return p.isValidElement(o)?o:null}})}}}); //# sourceMappingURL=errorboundary-legacy-CiQMUIM4.js.map