country-flag-cli 0.0.8 → 0.0.9

Sign up to get free protection for your applications and to get access to all the features.
package/dist/cli.js CHANGED
@@ -1,34 +1,36 @@
1
1
  #!/usr/bin/env node
2
- var Sc=Object.create;var nn=Object.defineProperty;var Ec=Object.getOwnPropertyDescriptor;var Tc=Object.getOwnPropertyNames;var Oc=Object.getPrototypeOf,wc=Object.prototype.hasOwnProperty;var xc=t=>nn(t,"__esModule",{value:!0});var p=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var Cc=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Tc(e))!wc.call(t,i)&&(r||i!=="default")&&nn(t,i,{get:()=>e[i],enumerable:!(n=Ec(e,i))||n.enumerable});return t},Ss=(t,e)=>Cc(xc(nn(t!=null?Sc(Oc(t)):{},"default",!e&&t&&t.__esModule?{get:()=>t.default,enumerable:!0}:{value:t,enumerable:!0})),t);var Cs=p((Wt,xs)=>{var Ic=require("events").EventEmitter,sn=require("child_process").spawn,Gt=require("path"),Rc=Gt.dirname,Es=Gt.basename,Ts=require("fs");require("util").inherits(b,Ic);Wt=xs.exports=new b;Wt.Command=b;Wt.Option=Ke;function Ke(t,e){this.flags=t,this.required=t.indexOf("<")>=0,this.optional=t.indexOf("[")>=0,this.bool=t.indexOf("-no-")===-1,t=t.split(/[ ,|]+/),t.length>1&&!/^[[<]/.test(t[1])&&(this.short=t.shift()),this.long=t.shift(),this.description=e||""}Ke.prototype.name=function(){return this.long.replace("--","").replace("no-","")};Ke.prototype.attributeName=function(){return qc(this.name())};Ke.prototype.is=function(t){return this.short===t||this.long===t};function b(t){this.commands=[],this.options=[],this._execs={},this._allowUnknownOption=!1,this._args=[],this._name=t||""}b.prototype.command=function(t,e,r){typeof e=="object"&&e!==null&&(r=e,e=null),r=r||{};var n=t.split(/ +/),i=new b(n.shift());return e&&(i.description(e),this.executables=!0,this._execs[i._name]=!0,r.isDefault&&(this.defaultExecutable=i._name)),i._noHelp=!!r.noHelp,this.commands.push(i),i.parseExpectedArgs(n),i.parent=this,e?this:i};b.prototype.arguments=function(t){return this.parseExpectedArgs(t.split(/ +/))};b.prototype.addImplicitHelpCommand=function(){this.command("help [cmd]","display help for [cmd]")};b.prototype.parseExpectedArgs=function(t){if(!!t.length){var e=this;return t.forEach(function(r){var n={required:!1,name:"",variadic:!1};switch(r[0]){case"<":n.required=!0,n.name=r.slice(1,-1);break;case"[":n.name=r.slice(1,-1);break}n.name.length>3&&n.name.slice(-3)==="..."&&(n.variadic=!0,n.name=n.name.slice(0,-3)),n.name&&e._args.push(n)}),this}};b.prototype.action=function(t){var e=this,r=function(s,o){s=s||[],o=o||[];var a=e.parseOptions(o);Os(e,a.unknown),a.unknown.length>0&&e.unknownOption(a.unknown[0]),a.args.length&&(s=a.args.concat(s)),e._args.forEach(function(u,c){u.required&&s[c]==null?e.missingArgument(u.name):u.variadic&&(c!==e._args.length-1&&e.variadicArgNotLast(u.name),s[c]=s.splice(c))}),e._args.length?s[e._args.length]=e:s.push(e),t.apply(e,s)},n=this.parent||this,i=n===this?"*":this._name;return n.on("command:"+i,r),this._alias&&n.on("command:"+this._alias,r),this};b.prototype.option=function(t,e,r,n){var i=this,s=new Ke(t,e),o=s.name(),a=s.attributeName();if(typeof r!="function")if(r instanceof RegExp){var u=r;r=function(c,f){var l=u.exec(c);return l?l[0]:f}}else n=r,r=null;return(!s.bool||s.optional||s.required)&&(s.bool||(n=!0),n!==void 0&&(i[a]=n,s.defaultValue=n)),this.options.push(s),this.on("option:"+o,function(c){c!==null&&r&&(c=r(c,i[a]===void 0?n:i[a])),typeof i[a]=="boolean"||typeof i[a]=="undefined"?c==null?i[a]=s.bool?n||!0:!1:i[a]=c:c!==null&&(i[a]=c)}),this};b.prototype.allowUnknownOption=function(t){return this._allowUnknownOption=arguments.length===0||t,this};b.prototype.parse=function(t){this.executables&&this.addImplicitHelpCommand(),this.rawArgs=t,this._name=this._name||Es(t[1],".js"),this.executables&&t.length<3&&!this.defaultExecutable&&t.push("--help");var e=this.parseOptions(this.normalize(t.slice(2))),r=this.args=e.args,n=this.parseArgs(this.args,e.unknown),i=n.args[0],s=null;return i&&(s=this.commands.filter(function(o){return o.alias()===i})[0]),this._execs[i]===!0?this.executeSubCommand(t,r,e.unknown):s?(r[0]=s._name,this.executeSubCommand(t,r,e.unknown)):this.defaultExecutable?(r.unshift(this.defaultExecutable),this.executeSubCommand(t,r,e.unknown)):n};b.prototype.executeSubCommand=function(t,e,r){e=e.concat(r),e.length||this.help(),e[0]==="help"&&e.length===1&&this.help(),e[0]==="help"&&(e[0]=e[1],e[1]="--help");var n=t[1],i=Es(n,Gt.extname(n))+"-"+e[0],s,o=Ts.realpathSync(n);s=Rc(o);var a=Gt.join(s,i),u=!1;on(a+".js")?(i=a+".js",u=!0):on(a+".ts")?(i=a+".ts",u=!0):on(a)&&(i=a),e=e.slice(1);var c;process.platform!=="win32"?u?(e.unshift(i),e=(process.execArgv||[]).concat(e),c=sn(process.argv[0],e,{stdio:"inherit",customFds:[0,1,2]})):c=sn(i,e,{stdio:"inherit",customFds:[0,1,2]}):(e.unshift(i),c=sn(process.execPath,e,{stdio:"inherit"}));var f=["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"];f.forEach(function(l){process.on(l,function(){c.killed===!1&&c.exitCode===null&&c.kill(l)})}),c.on("close",process.exit.bind(process)),c.on("error",function(l){l.code==="ENOENT"?console.error("error: %s(1) does not exist, try --help",i):l.code==="EACCES"&&console.error("error: %s(1) not executable. try chmod or run with root",i),process.exit(1)}),this.runningCommand=c};b.prototype.normalize=function(t){for(var e=[],r,n,i,s=0,o=t.length;s<o;++s)if(r=t[s],s>0&&(n=this.optionFor(t[s-1])),r==="--"){e=e.concat(t.slice(s));break}else n&&n.required?e.push(r):r.length>1&&r[0]==="-"&&r[1]!=="-"?r.slice(1).split("").forEach(function(a){e.push("-"+a)}):/^--/.test(r)&&~(i=r.indexOf("="))?e.push(r.slice(0,i),r.slice(i+1)):e.push(r);return e};b.prototype.parseArgs=function(t,e){var r;return t.length?(r=t[0],this.listeners("command:"+r).length?this.emit("command:"+t.shift(),t,e):this.emit("command:*",t)):(Os(this,e),e.length>0&&this.unknownOption(e[0]),this.commands.length===0&&this._args.filter(function(n){return n.required}).length===0&&this.emit("command:*")),this};b.prototype.optionFor=function(t){for(var e=0,r=this.options.length;e<r;++e)if(this.options[e].is(t))return this.options[e]};b.prototype.parseOptions=function(t){for(var e=[],r=t.length,n,i,s,o=[],a=0;a<r;++a){if(s=t[a],n){e.push(s);continue}if(s==="--"){n=!0;continue}if(i=this.optionFor(s),i){if(i.required){if(s=t[++a],s==null)return this.optionMissingArgument(i);this.emit("option:"+i.name(),s)}else i.optional?(s=t[a+1],s==null||s[0]==="-"&&s!=="-"?s=null:++a,this.emit("option:"+i.name(),s)):this.emit("option:"+i.name());continue}if(s.length>1&&s[0]==="-"){o.push(s),a+1<t.length&&t[a+1][0]!=="-"&&o.push(t[++a]);continue}e.push(s)}return{args:e,unknown:o}};b.prototype.opts=function(){for(var t={},e=this.options.length,r=0;r<e;r++){var n=this.options[r].attributeName();t[n]=n===this._versionOptionName?this._version:this[n]}return t};b.prototype.missingArgument=function(t){console.error("error: missing required argument `%s'",t),process.exit(1)};b.prototype.optionMissingArgument=function(t,e){e?console.error("error: option `%s' argument missing, got `%s'",t.flags,e):console.error("error: option `%s' argument missing",t.flags),process.exit(1)};b.prototype.unknownOption=function(t){this._allowUnknownOption||(console.error("error: unknown option `%s'",t),process.exit(1))};b.prototype.variadicArgNotLast=function(t){console.error("error: variadic arguments must be last `%s'",t),process.exit(1)};b.prototype.version=function(t,e){if(arguments.length===0)return this._version;this._version=t,e=e||"-V, --version";var r=new Ke(e,"output the version number");return this._versionOptionName=r.long.substr(2)||"version",this.options.push(r),this.on("option:"+this._versionOptionName,function(){process.stdout.write(t+`
3
- `),process.exit(0)}),this};b.prototype.description=function(t,e){return arguments.length===0?this._description:(this._description=t,this._argsDescription=e,this)};b.prototype.alias=function(t){var e=this;if(this.commands.length!==0&&(e=this.commands[this.commands.length-1]),arguments.length===0)return e._alias;if(t===e._name)throw new Error("Command alias can't be the same as its name");return e._alias=t,this};b.prototype.usage=function(t){var e=this._args.map(function(n){return ws(n)}),r="[options]"+(this.commands.length?" [command]":"")+(this._args.length?" "+e.join(" "):"");return arguments.length===0?this._usage||r:(this._usage=t,this)};b.prototype.name=function(t){return arguments.length===0?this._name:(this._name=t,this)};b.prototype.prepareCommands=function(){return this.commands.filter(function(t){return!t._noHelp}).map(function(t){var e=t._args.map(function(r){return ws(r)}).join(" ");return[t._name+(t._alias?"|"+t._alias:"")+(t.options.length?" [options]":"")+(e?" "+e:""),t._description]})};b.prototype.largestCommandLength=function(){var t=this.prepareCommands();return t.reduce(function(e,r){return Math.max(e,r[0].length)},0)};b.prototype.largestOptionLength=function(){var t=[].slice.call(this.options);return t.push({flags:"-h, --help"}),t.reduce(function(e,r){return Math.max(e,r.flags.length)},0)};b.prototype.largestArgLength=function(){return this._args.reduce(function(t,e){return Math.max(t,e.name.length)},0)};b.prototype.padWidth=function(){var t=this.largestOptionLength();return this._argsDescription&&this._args.length&&this.largestArgLength()>t&&(t=this.largestArgLength()),this.commands&&this.commands.length&&this.largestCommandLength()>t&&(t=this.largestCommandLength()),t};b.prototype.optionHelp=function(){var t=this.padWidth();return this.options.map(function(e){return zt(e.flags,t)+" "+e.description+(e.bool&&e.defaultValue!==void 0?" (default: "+JSON.stringify(e.defaultValue)+")":"")}).concat([zt("-h, --help",t)+" output usage information"]).join(`
4
- `)};b.prototype.commandHelp=function(){if(!this.commands.length)return"";var t=this.prepareCommands(),e=this.padWidth();return["Commands:",t.map(function(r){var n=r[1]?" "+r[1]:"";return(n?zt(r[0],e):r[0])+n}).join(`
2
+ var Sc=Object.create;var nn=Object.defineProperty;var Ec=Object.getOwnPropertyDescriptor;var Tc=Object.getOwnPropertyNames;var Oc=Object.getPrototypeOf,wc=Object.prototype.hasOwnProperty;var xc=t=>nn(t,"__esModule",{value:!0});var p=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var Cc=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Tc(e))!wc.call(t,i)&&(r||i!=="default")&&nn(t,i,{get:()=>e[i],enumerable:!(n=Ec(e,i))||n.enumerable});return t},Ss=(t,e)=>Cc(xc(nn(t!=null?Sc(Oc(t)):{},"default",!e&&t&&t.__esModule?{get:()=>t.default,enumerable:!0}:{value:t,enumerable:!0})),t);var Cs=p((Yt,xs)=>{var Ic=require("events").EventEmitter,sn=require("child_process").spawn,zt=require("path"),Rc=zt.dirname,Es=zt.basename,Ts=require("fs");require("util").inherits(b,Ic);Yt=xs.exports=new b;Yt.Command=b;Yt.Option=Ke;function Ke(t,e){this.flags=t,this.required=t.indexOf("<")>=0,this.optional=t.indexOf("[")>=0,this.bool=t.indexOf("-no-")===-1,t=t.split(/[ ,|]+/),t.length>1&&!/^[[<]/.test(t[1])&&(this.short=t.shift()),this.long=t.shift(),this.description=e||""}Ke.prototype.name=function(){return this.long.replace("--","").replace("no-","")};Ke.prototype.attributeName=function(){return qc(this.name())};Ke.prototype.is=function(t){return this.short===t||this.long===t};function b(t){this.commands=[],this.options=[],this._execs={},this._allowUnknownOption=!1,this._args=[],this._name=t||""}b.prototype.command=function(t,e,r){typeof e=="object"&&e!==null&&(r=e,e=null),r=r||{};var n=t.split(/ +/),i=new b(n.shift());return e&&(i.description(e),this.executables=!0,this._execs[i._name]=!0,r.isDefault&&(this.defaultExecutable=i._name)),i._noHelp=!!r.noHelp,this.commands.push(i),i.parseExpectedArgs(n),i.parent=this,e?this:i};b.prototype.arguments=function(t){return this.parseExpectedArgs(t.split(/ +/))};b.prototype.addImplicitHelpCommand=function(){this.command("help [cmd]","display help for [cmd]")};b.prototype.parseExpectedArgs=function(t){if(!!t.length){var e=this;return t.forEach(function(r){var n={required:!1,name:"",variadic:!1};switch(r[0]){case"<":n.required=!0,n.name=r.slice(1,-1);break;case"[":n.name=r.slice(1,-1);break}n.name.length>3&&n.name.slice(-3)==="..."&&(n.variadic=!0,n.name=n.name.slice(0,-3)),n.name&&e._args.push(n)}),this}};b.prototype.action=function(t){var e=this,r=function(s,o){s=s||[],o=o||[];var a=e.parseOptions(o);Os(e,a.unknown),a.unknown.length>0&&e.unknownOption(a.unknown[0]),a.args.length&&(s=a.args.concat(s)),e._args.forEach(function(u,c){u.required&&s[c]==null?e.missingArgument(u.name):u.variadic&&(c!==e._args.length-1&&e.variadicArgNotLast(u.name),s[c]=s.splice(c))}),e._args.length?s[e._args.length]=e:s.push(e),t.apply(e,s)},n=this.parent||this,i=n===this?"*":this._name;return n.on("command:"+i,r),this._alias&&n.on("command:"+this._alias,r),this};b.prototype.option=function(t,e,r,n){var i=this,s=new Ke(t,e),o=s.name(),a=s.attributeName();if(typeof r!="function")if(r instanceof RegExp){var u=r;r=function(c,f){var l=u.exec(c);return l?l[0]:f}}else n=r,r=null;return(!s.bool||s.optional||s.required)&&(s.bool||(n=!0),n!==void 0&&(i[a]=n,s.defaultValue=n)),this.options.push(s),this.on("option:"+o,function(c){c!==null&&r&&(c=r(c,i[a]===void 0?n:i[a])),typeof i[a]=="boolean"||typeof i[a]=="undefined"?c==null?i[a]=s.bool?n||!0:!1:i[a]=c:c!==null&&(i[a]=c)}),this};b.prototype.allowUnknownOption=function(t){return this._allowUnknownOption=arguments.length===0||t,this};b.prototype.parse=function(t){this.executables&&this.addImplicitHelpCommand(),this.rawArgs=t,this._name=this._name||Es(t[1],".js"),this.executables&&t.length<3&&!this.defaultExecutable&&t.push("--help");var e=this.parseOptions(this.normalize(t.slice(2))),r=this.args=e.args,n=this.parseArgs(this.args,e.unknown),i=n.args[0],s=null;return i&&(s=this.commands.filter(function(o){return o.alias()===i})[0]),this._execs[i]===!0?this.executeSubCommand(t,r,e.unknown):s?(r[0]=s._name,this.executeSubCommand(t,r,e.unknown)):this.defaultExecutable?(r.unshift(this.defaultExecutable),this.executeSubCommand(t,r,e.unknown)):n};b.prototype.executeSubCommand=function(t,e,r){e=e.concat(r),e.length||this.help(),e[0]==="help"&&e.length===1&&this.help(),e[0]==="help"&&(e[0]=e[1],e[1]="--help");var n=t[1],i=Es(n,zt.extname(n))+"-"+e[0],s,o=Ts.realpathSync(n);s=Rc(o);var a=zt.join(s,i),u=!1;on(a+".js")?(i=a+".js",u=!0):on(a+".ts")?(i=a+".ts",u=!0):on(a)&&(i=a),e=e.slice(1);var c;process.platform!=="win32"?u?(e.unshift(i),e=(process.execArgv||[]).concat(e),c=sn(process.argv[0],e,{stdio:"inherit",customFds:[0,1,2]})):c=sn(i,e,{stdio:"inherit",customFds:[0,1,2]}):(e.unshift(i),c=sn(process.execPath,e,{stdio:"inherit"}));var f=["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"];f.forEach(function(l){process.on(l,function(){c.killed===!1&&c.exitCode===null&&c.kill(l)})}),c.on("close",process.exit.bind(process)),c.on("error",function(l){l.code==="ENOENT"?console.error("error: %s(1) does not exist, try --help",i):l.code==="EACCES"&&console.error("error: %s(1) not executable. try chmod or run with root",i),process.exit(1)}),this.runningCommand=c};b.prototype.normalize=function(t){for(var e=[],r,n,i,s=0,o=t.length;s<o;++s)if(r=t[s],s>0&&(n=this.optionFor(t[s-1])),r==="--"){e=e.concat(t.slice(s));break}else n&&n.required?e.push(r):r.length>1&&r[0]==="-"&&r[1]!=="-"?r.slice(1).split("").forEach(function(a){e.push("-"+a)}):/^--/.test(r)&&~(i=r.indexOf("="))?e.push(r.slice(0,i),r.slice(i+1)):e.push(r);return e};b.prototype.parseArgs=function(t,e){var r;return t.length?(r=t[0],this.listeners("command:"+r).length?this.emit("command:"+t.shift(),t,e):this.emit("command:*",t)):(Os(this,e),e.length>0&&this.unknownOption(e[0]),this.commands.length===0&&this._args.filter(function(n){return n.required}).length===0&&this.emit("command:*")),this};b.prototype.optionFor=function(t){for(var e=0,r=this.options.length;e<r;++e)if(this.options[e].is(t))return this.options[e]};b.prototype.parseOptions=function(t){for(var e=[],r=t.length,n,i,s,o=[],a=0;a<r;++a){if(s=t[a],n){e.push(s);continue}if(s==="--"){n=!0;continue}if(i=this.optionFor(s),i){if(i.required){if(s=t[++a],s==null)return this.optionMissingArgument(i);this.emit("option:"+i.name(),s)}else i.optional?(s=t[a+1],s==null||s[0]==="-"&&s!=="-"?s=null:++a,this.emit("option:"+i.name(),s)):this.emit("option:"+i.name());continue}if(s.length>1&&s[0]==="-"){o.push(s),a+1<t.length&&t[a+1][0]!=="-"&&o.push(t[++a]);continue}e.push(s)}return{args:e,unknown:o}};b.prototype.opts=function(){for(var t={},e=this.options.length,r=0;r<e;r++){var n=this.options[r].attributeName();t[n]=n===this._versionOptionName?this._version:this[n]}return t};b.prototype.missingArgument=function(t){console.error("error: missing required argument `%s'",t),process.exit(1)};b.prototype.optionMissingArgument=function(t,e){e?console.error("error: option `%s' argument missing, got `%s'",t.flags,e):console.error("error: option `%s' argument missing",t.flags),process.exit(1)};b.prototype.unknownOption=function(t){this._allowUnknownOption||(console.error("error: unknown option `%s'",t),process.exit(1))};b.prototype.variadicArgNotLast=function(t){console.error("error: variadic arguments must be last `%s'",t),process.exit(1)};b.prototype.version=function(t,e){if(arguments.length===0)return this._version;this._version=t,e=e||"-V, --version";var r=new Ke(e,"output the version number");return this._versionOptionName=r.long.substr(2)||"version",this.options.push(r),this.on("option:"+this._versionOptionName,function(){process.stdout.write(t+`
3
+ `),process.exit(0)}),this};b.prototype.description=function(t,e){return arguments.length===0?this._description:(this._description=t,this._argsDescription=e,this)};b.prototype.alias=function(t){var e=this;if(this.commands.length!==0&&(e=this.commands[this.commands.length-1]),arguments.length===0)return e._alias;if(t===e._name)throw new Error("Command alias can't be the same as its name");return e._alias=t,this};b.prototype.usage=function(t){var e=this._args.map(function(n){return ws(n)}),r="[options]"+(this.commands.length?" [command]":"")+(this._args.length?" "+e.join(" "):"");return arguments.length===0?this._usage||r:(this._usage=t,this)};b.prototype.name=function(t){return arguments.length===0?this._name:(this._name=t,this)};b.prototype.prepareCommands=function(){return this.commands.filter(function(t){return!t._noHelp}).map(function(t){var e=t._args.map(function(r){return ws(r)}).join(" ");return[t._name+(t._alias?"|"+t._alias:"")+(t.options.length?" [options]":"")+(e?" "+e:""),t._description]})};b.prototype.largestCommandLength=function(){var t=this.prepareCommands();return t.reduce(function(e,r){return Math.max(e,r[0].length)},0)};b.prototype.largestOptionLength=function(){var t=[].slice.call(this.options);return t.push({flags:"-h, --help"}),t.reduce(function(e,r){return Math.max(e,r.flags.length)},0)};b.prototype.largestArgLength=function(){return this._args.reduce(function(t,e){return Math.max(t,e.name.length)},0)};b.prototype.padWidth=function(){var t=this.largestOptionLength();return this._argsDescription&&this._args.length&&this.largestArgLength()>t&&(t=this.largestArgLength()),this.commands&&this.commands.length&&this.largestCommandLength()>t&&(t=this.largestCommandLength()),t};b.prototype.optionHelp=function(){var t=this.padWidth();return this.options.map(function(e){return Wt(e.flags,t)+" "+e.description+(e.bool&&e.defaultValue!==void 0?" (default: "+JSON.stringify(e.defaultValue)+")":"")}).concat([Wt("-h, --help",t)+" output usage information"]).join(`
4
+ `)};b.prototype.commandHelp=function(){if(!this.commands.length)return"";var t=this.prepareCommands(),e=this.padWidth();return["Commands:",t.map(function(r){var n=r[1]?" "+r[1]:"";return(n?Wt(r[0],e):r[0])+n}).join(`
5
5
  `).replace(/^/gm," "),""].join(`
6
- `)};b.prototype.helpInformation=function(){var t=[];if(this._description){t=[this._description,""];var e=this._argsDescription;if(e&&this._args.length){var r=this.padWidth();t.push("Arguments:"),t.push(""),this._args.forEach(function(u){t.push(" "+zt(u.name,r)+" "+e[u.name])}),t.push("")}}var n=this._name;this._alias&&(n=n+"|"+this._alias);var i=["Usage: "+n+" "+this.usage(),""],s=[],o=this.commandHelp();o&&(s=[o]);var a=["Options:",""+this.optionHelp().replace(/^/gm," "),""];return i.concat(t).concat(a).concat(s).join(`
7
- `)};b.prototype.outputHelp=function(t){t||(t=function(e){return e}),process.stdout.write(t(this.helpInformation())),this.emit("--help")};b.prototype.help=function(t){this.outputHelp(t),process.exit()};function qc(t){return t.split("-").reduce(function(e,r){return e+r[0].toUpperCase()+r.slice(1)})}function zt(t,e){var r=Math.max(0,e-t.length);return t+Array(r+1).join(" ")}function Os(t,e){e=e||[];for(var r=0;r<e.length;r++)(e[r]==="--help"||e[r]==="-h")&&(t.outputHelp(),process.exit(0))}function ws(t){var e=t.name+(t.variadic===!0?"...":"");return t.required?"<"+e+">":"["+e+"]"}function on(t){try{if(Ts.statSync(t).isFile())return!0}catch{return!1}}});var S=p((Zv,Vt)=>{var Rs,qs,ks,Ps,Ms,As,Ns,js,Fs,Yt,an,Ds,Hs,$e,Us,Ls,Bs,Gs,zs,Ws,Ys,Vs,Ks;(function(t){var e=typeof global=="object"?global:typeof self=="object"?self:typeof this=="object"?this:{};typeof define=="function"&&define.amd?define("tslib",["exports"],function(n){t(r(e,r(n)))}):typeof Vt=="object"&&typeof Vt.exports=="object"?t(r(e,r(Vt.exports))):t(r(e));function r(n,i){return n!==e&&(typeof Object.create=="function"?Object.defineProperty(n,"__esModule",{value:!0}):n.__esModule=!0),function(s,o){return n[s]=i?i(s,o):o}}})(function(t){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)n.hasOwnProperty(i)&&(r[i]=n[i])};Rs=function(r,n){e(r,n);function i(){this.constructor=r}r.prototype=n===null?Object.create(n):(i.prototype=n.prototype,new i)},qs=Object.assign||function(r){for(var n,i=1,s=arguments.length;i<s;i++){n=arguments[i];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[o]=n[o])}return r},ks=function(r,n){var i={};for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&n.indexOf(s)<0&&(i[s]=r[s]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,s=Object.getOwnPropertySymbols(r);o<s.length;o++)n.indexOf(s[o])<0&&Object.prototype.propertyIsEnumerable.call(r,s[o])&&(i[s[o]]=r[s[o]]);return i},Ps=function(r,n,i,s){var o=arguments.length,a=o<3?n:s===null?s=Object.getOwnPropertyDescriptor(n,i):s,u;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(r,n,i,s);else for(var c=r.length-1;c>=0;c--)(u=r[c])&&(a=(o<3?u(a):o>3?u(n,i,a):u(n,i))||a);return o>3&&a&&Object.defineProperty(n,i,a),a},Ms=function(r,n){return function(i,s){n(i,s,r)}},As=function(r,n){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(r,n)},Ns=function(r,n,i,s){function o(a){return a instanceof i?a:new i(function(u){u(a)})}return new(i||(i=Promise))(function(a,u){function c(d){try{l(s.next(d))}catch(h){u(h)}}function f(d){try{l(s.throw(d))}catch(h){u(h)}}function l(d){d.done?a(d.value):o(d.value).then(c,f)}l((s=s.apply(r,n||[])).next())})},js=function(r,n){var i={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},s,o,a,u;return u={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(u[Symbol.iterator]=function(){return this}),u;function c(l){return function(d){return f([l,d])}}function f(l){if(s)throw new TypeError("Generator is already executing.");for(;i;)try{if(s=1,o&&(a=l[0]&2?o.return:l[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,l[1])).done)return a;switch(o=0,a&&(l=[l[0]&2,a.value]),l[0]){case 0:case 1:a=l;break;case 4:return i.label++,{value:l[1],done:!1};case 5:i.label++,o=l[1],l=[0];continue;case 7:l=i.ops.pop(),i.trys.pop();continue;default:if(a=i.trys,!(a=a.length>0&&a[a.length-1])&&(l[0]===6||l[0]===2)){i=0;continue}if(l[0]===3&&(!a||l[1]>a[0]&&l[1]<a[3])){i.label=l[1];break}if(l[0]===6&&i.label<a[1]){i.label=a[1],a=l;break}if(a&&i.label<a[2]){i.label=a[2],i.ops.push(l);break}a[2]&&i.ops.pop(),i.trys.pop();continue}l=n.call(r,i)}catch(d){l=[6,d],o=0}finally{s=a=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},Ks=function(r,n,i,s){s===void 0&&(s=i),r[s]=n[i]},Fs=function(r,n){for(var i in r)i!=="default"&&!n.hasOwnProperty(i)&&(n[i]=r[i])},Yt=function(r){var n=typeof Symbol=="function"&&Symbol.iterator,i=n&&r[n],s=0;if(i)return i.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&s>=r.length&&(r=void 0),{value:r&&r[s++],done:!r}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")},an=function(r,n){var i=typeof Symbol=="function"&&r[Symbol.iterator];if(!i)return r;var s=i.call(r),o,a=[],u;try{for(;(n===void 0||n-- >0)&&!(o=s.next()).done;)a.push(o.value)}catch(c){u={error:c}}finally{try{o&&!o.done&&(i=s.return)&&i.call(s)}finally{if(u)throw u.error}}return a},Ds=function(){for(var r=[],n=0;n<arguments.length;n++)r=r.concat(an(arguments[n]));return r},Hs=function(){for(var r=0,n=0,i=arguments.length;n<i;n++)r+=arguments[n].length;for(var s=Array(r),o=0,n=0;n<i;n++)for(var a=arguments[n],u=0,c=a.length;u<c;u++,o++)s[o]=a[u];return s},$e=function(r){return this instanceof $e?(this.v=r,this):new $e(r)},Us=function(r,n,i){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var s=i.apply(r,n||[]),o,a=[];return o={},u("next"),u("throw"),u("return"),o[Symbol.asyncIterator]=function(){return this},o;function u(_){s[_]&&(o[_]=function(v){return new Promise(function(g,w){a.push([_,v,g,w])>1||c(_,v)})})}function c(_,v){try{f(s[_](v))}catch(g){h(a[0][3],g)}}function f(_){_.value instanceof $e?Promise.resolve(_.value.v).then(l,d):h(a[0][2],_)}function l(_){c("next",_)}function d(_){c("throw",_)}function h(_,v){_(v),a.shift(),a.length&&c(a[0][0],a[0][1])}},Ls=function(r){var n,i;return n={},s("next"),s("throw",function(o){throw o}),s("return"),n[Symbol.iterator]=function(){return this},n;function s(o,a){n[o]=r[o]?function(u){return(i=!i)?{value:$e(r[o](u)),done:o==="return"}:a?a(u):u}:a}},Bs=function(r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r[Symbol.asyncIterator],i;return n?n.call(r):(r=typeof Yt=="function"?Yt(r):r[Symbol.iterator](),i={},s("next"),s("throw"),s("return"),i[Symbol.asyncIterator]=function(){return this},i);function s(a){i[a]=r[a]&&function(u){return new Promise(function(c,f){u=r[a](u),o(c,f,u.done,u.value)})}}function o(a,u,c,f){Promise.resolve(f).then(function(l){a({value:l,done:c})},u)}},Gs=function(r,n){return Object.defineProperty?Object.defineProperty(r,"raw",{value:n}):r.raw=n,r},zs=function(r){if(r&&r.__esModule)return r;var n={};if(r!=null)for(var i in r)Object.hasOwnProperty.call(r,i)&&(n[i]=r[i]);return n.default=r,n},Ws=function(r){return r&&r.__esModule?r:{default:r}},Ys=function(r,n){if(!n.has(r))throw new TypeError("attempted to get private field on non-instance");return n.get(r)},Vs=function(r,n,i){if(!n.has(r))throw new TypeError("attempted to set private field on non-instance");return n.set(r,i),i},t("__extends",Rs),t("__assign",qs),t("__rest",ks),t("__decorate",Ps),t("__param",Ms),t("__metadata",As),t("__awaiter",Ns),t("__generator",js),t("__exportStar",Fs),t("__createBinding",Ks),t("__values",Yt),t("__read",an),t("__spread",Ds),t("__spreadArrays",Hs),t("__await",$e),t("__asyncGenerator",Us),t("__asyncDelegator",Ls),t("__asyncValues",Bs),t("__makeTemplateObject",Gs),t("__importStar",zs),t("__importDefault",Ws),t("__classPrivateFieldGet",Ys),t("__classPrivateFieldSet",Vs)})});var $s=p(Kt=>{Object.defineProperty(Kt,"__esModule",{value:!0});var kc;(function(t){t[t.None=0]="None",t[t.Error=1]="Error",t[t.Debug=2]="Debug",t[t.Verbose=3]="Verbose"})(kc=Kt.LogLevel||(Kt.LogLevel={}))});var Js=p(Je=>{Object.defineProperty(Je,"__esModule",{value:!0});var Pc;(function(t){t.Ok="ok",t.Exited="exited",t.Crashed="crashed",t.Abnormal="abnormal"})(Pc=Je.SessionStatus||(Je.SessionStatus={}));var Mc;(function(t){t.Ok="ok",t.Errored="errored",t.Crashed="crashed"})(Mc=Je.RequestSessionStatus||(Je.RequestSessionStatus={}))});var Zs=p(Xe=>{Object.defineProperty(Xe,"__esModule",{value:!0});var Xs;(function(t){t.Fatal="fatal",t.Error="error",t.Warning="warning",t.Log="log",t.Info="info",t.Debug="debug",t.Critical="critical"})(Xs=Xe.Severity||(Xe.Severity={}));(function(t){function e(r){switch(r){case"debug":return t.Debug;case"info":return t.Info;case"warn":case"warning":return t.Warning;case"error":return t.Error;case"fatal":return t.Fatal;case"critical":return t.Critical;case"log":default:return t.Log}}t.fromString=e})(Xs=Xe.Severity||(Xe.Severity={}))});var eo=p(Ze=>{Object.defineProperty(Ze,"__esModule",{value:!0});var Qs;(function(t){t.Unknown="unknown",t.Skipped="skipped",t.Success="success",t.RateLimit="rate_limit",t.Invalid="invalid",t.Failed="failed"})(Qs=Ze.Status||(Ze.Status={}));(function(t){function e(r){return r>=200&&r<300?t.Success:r===429?t.RateLimit:r>=400&&r<500?t.Invalid:r>=500?t.Failed:t.Unknown}t.fromHttpCode=e})(Qs=Ze.Status||(Ze.Status={}))});var to=p($t=>{Object.defineProperty($t,"__esModule",{value:!0});var Ac;(function(t){t.Explicit="explicitly_set",t.Sampler="client_sampler",t.Rate="client_rate",t.Inheritance="inheritance"})(Ac=$t.TransactionSamplingMethod||($t.TransactionSamplingMethod={}))});var ro=p(Jt=>{Object.defineProperty(Jt,"__esModule",{value:!0});var Nc;(function(t){t.BeforeSend="before_send",t.EventProcessor="event_processor",t.NetworkError="network_error",t.QueueOverflow="queue_overflow",t.RateLimitBackoff="ratelimit_backoff",t.SampleRate="sample_rate"})(Nc=Jt.Outcome||(Jt.Outcome={}))});var D=p(fe=>{Object.defineProperty(fe,"__esModule",{value:!0});var jc=$s();fe.LogLevel=jc.LogLevel;var no=Js();fe.SessionStatus=no.SessionStatus;fe.RequestSessionStatus=no.RequestSessionStatus;var Fc=Zs();fe.Severity=Fc.Severity;var Dc=eo();fe.Status=Dc.Status;var Hc=to();fe.TransactionSamplingMethod=Hc.TransactionSamplingMethod;var Uc=ro();fe.Outcome=Uc.Outcome});var io=p(un=>{Object.defineProperty(un,"__esModule",{value:!0});function Lc(t){t.then(null,function(e){console.error(e)})}un.forget=Lc});var Qt=p((vt,Zt)=>{Object.defineProperty(vt,"__esModule",{value:!0});function Bc(){return Object.prototype.toString.call(typeof process!="undefined"?process:0)==="[object process]"}vt.isNodeEnv=Bc;function Xt(t,e){return t.require(e)}vt.dynamicRequire=Xt;function Gc(t){var e;try{e=Xt(Zt,t)}catch{}try{var r=Xt(Zt,"process").cwd;e=Xt(Zt,r()+"/node_modules/"+t)}catch{}return e}vt.loadModule=Gc});var Se=p(cn=>{Object.defineProperty(cn,"__esModule",{value:!0});var zc=Qt(),Wc={};function Yc(){return zc.isNodeEnv()?global:typeof window!="undefined"?window:typeof self!="undefined"?self:Wc}cn.getGlobalObject=Yc});var Me=p(L=>{Object.defineProperty(L,"__esModule",{value:!0});function Vc(t){switch(Object.prototype.toString.call(t)){case"[object Error]":return!0;case"[object Exception]":return!0;case"[object DOMException]":return!0;default:return er(t,Error)}}L.isError=Vc;function Kc(t){return Object.prototype.toString.call(t)==="[object ErrorEvent]"}L.isErrorEvent=Kc;function $c(t){return Object.prototype.toString.call(t)==="[object DOMError]"}L.isDOMError=$c;function Jc(t){return Object.prototype.toString.call(t)==="[object DOMException]"}L.isDOMException=Jc;function Xc(t){return Object.prototype.toString.call(t)==="[object String]"}L.isString=Xc;function Zc(t){return t===null||typeof t!="object"&&typeof t!="function"}L.isPrimitive=Zc;function so(t){return Object.prototype.toString.call(t)==="[object Object]"}L.isPlainObject=so;function Qc(t){return typeof Event!="undefined"&&er(t,Event)}L.isEvent=Qc;function el(t){return typeof Element!="undefined"&&er(t,Element)}L.isElement=el;function tl(t){return Object.prototype.toString.call(t)==="[object RegExp]"}L.isRegExp=tl;function rl(t){return Boolean(t&&t.then&&typeof t.then=="function")}L.isThenable=rl;function nl(t){return so(t)&&"nativeEvent"in t&&"preventDefault"in t&&"stopPropagation"in t}L.isSyntheticEvent=nl;function er(t,e){try{return t instanceof e}catch{return!1}}L.isInstanceOf=er});var ln=p(tr=>{Object.defineProperty(tr,"__esModule",{value:!0});var il=Se(),sl=Me();function ol(t,e){try{for(var r=t,n=5,i=80,s=[],o=0,a=0,u=" > ",c=u.length,f=void 0;r&&o++<n&&(f=al(r,e),!(f==="html"||o>1&&a+s.length*c+f.length>=i));)s.push(f),a+=f.length,r=r.parentNode;return s.reverse().join(u)}catch{return"<unknown>"}}tr.htmlTreeAsString=ol;function al(t,e){var r,n,i=t,s=[],o,a,u,c,f;if(!i||!i.tagName)return"";s.push(i.tagName.toLowerCase());var l=((r=e)===null||r===void 0?void 0:r.length)?e.filter(function(h){return i.getAttribute(h)}).map(function(h){return[h,i.getAttribute(h)]}):null;if((n=l)===null||n===void 0?void 0:n.length)l.forEach(function(h){s.push("["+h[0]+'="'+h[1]+'"]')});else if(i.id&&s.push("#"+i.id),o=i.className,o&&sl.isString(o))for(a=o.split(/\s+/),f=0;f<a.length;f++)s.push("."+a[f]);var d=["type","name","title","alt"];for(f=0;f<d.length;f++)u=d[f],c=i.getAttribute(u),c&&s.push("["+u+'="'+c+'"]');return s.join("")}function ul(){var t=il.getGlobalObject();try{return t.document.location.href}catch{return""}}tr.getLocationHref=ul});var oo=p(fn=>{Object.defineProperty(fn,"__esModule",{value:!0});fn.setPrototypeOf=Object.setPrototypeOf||({__proto__:[]}instanceof Array?cl:ll);function cl(t,e){return t.__proto__=e,t}function ll(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(t,r)||(t[r]=e[r]);return t}});var rr=p(dn=>{Object.defineProperty(dn,"__esModule",{value:!0});var fl=S(),dl=oo(),pl=function(t){fl.__extends(e,t);function e(r){var n=this.constructor,i=t.call(this,r)||this;return i.message=r,i.name=n.prototype.constructor.name,dl.setPrototypeOf(i,n.prototype),i}return e}(Error);dn.SentryError=pl});var ao=p(pn=>{Object.defineProperty(pn,"__esModule",{value:!0});var hl=S(),gt=rr(),_l=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+))?@)([\w.-]+)(?::(\d+))?\/(.+)/,mt="Invalid Dsn",vl=function(){function t(e){typeof e=="string"?this._fromString(e):this._fromComponents(e),this._validate()}return t.prototype.toString=function(e){e===void 0&&(e=!1);var r=this,n=r.host,i=r.path,s=r.pass,o=r.port,a=r.projectId,u=r.protocol,c=r.publicKey;return u+"://"+c+(e&&s?":"+s:"")+("@"+n+(o?":"+o:"")+"/"+(i&&i+"/")+a)},t.prototype._fromString=function(e){var r=_l.exec(e);if(!r)throw new gt.SentryError(mt);var n=hl.__read(r.slice(1),6),i=n[0],s=n[1],o=n[2],a=o===void 0?"":o,u=n[3],c=n[4],f=c===void 0?"":c,l=n[5],d="",h=l,_=h.split("/");if(_.length>1&&(d=_.slice(0,-1).join("/"),h=_.pop()),h){var v=h.match(/^\d+/);v&&(h=v[0])}this._fromComponents({host:u,pass:a,path:d,projectId:h,port:f,protocol:i,publicKey:s})},t.prototype._fromComponents=function(e){"user"in e&&!("publicKey"in e)&&(e.publicKey=e.user),this.user=e.publicKey||"",this.protocol=e.protocol,this.publicKey=e.publicKey||"",this.pass=e.pass||"",this.host=e.host,this.port=e.port||"",this.path=e.path||"",this.projectId=e.projectId},t.prototype._validate=function(){var e=this;if(["protocol","publicKey","host","projectId"].forEach(function(r){if(!e[r])throw new gt.SentryError(mt+": "+r+" missing")}),!this.projectId.match(/^\d+$/))throw new gt.SentryError(mt+": Invalid projectId "+this.projectId);if(this.protocol!=="http"&&this.protocol!=="https")throw new gt.SentryError(mt+": Invalid protocol "+this.protocol);if(this.port&&isNaN(parseInt(this.port,10)))throw new gt.SentryError(mt+": Invalid port "+this.port)},t}();pn.Dsn=vl});var sr=p(ir=>{Object.defineProperty(ir,"__esModule",{value:!0});var uo=Se(),Ae=uo.getGlobalObject(),hn="Sentry Logger ";function nr(t){var e=uo.getGlobalObject(),r=["debug","info","warn","error","log","assert"];if(!("console"in e))return t();var n=e.console,i={};r.forEach(function(o){o in e.console&&n[o].__sentry_original__&&(i[o]=n[o],n[o]=n[o].__sentry_original__)});var s=t();return Object.keys(i).forEach(function(o){n[o]=i[o]}),s}ir.consoleSandbox=nr;var gl=function(){function t(){this._enabled=!1}return t.prototype.disable=function(){this._enabled=!1},t.prototype.enable=function(){this._enabled=!0},t.prototype.log=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];!this._enabled||nr(function(){Ae.console.log(hn+"[Log]: "+e.join(" "))})},t.prototype.warn=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];!this._enabled||nr(function(){Ae.console.warn(hn+"[Warn]: "+e.join(" "))})},t.prototype.error=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];!this._enabled||nr(function(){Ae.console.error(hn+"[Error]: "+e.join(" "))})},t}();Ae.__SENTRY__=Ae.__SENTRY__||{};var ml=Ae.__SENTRY__.logger||(Ae.__SENTRY__.logger=new gl);ir.logger=ml});var vn=p(_n=>{Object.defineProperty(_n,"__esModule",{value:!0});var yl=function(){function t(){this._hasWeakSet=typeof WeakSet=="function",this._inner=this._hasWeakSet?new WeakSet:[]}return t.prototype.memoize=function(e){if(this._hasWeakSet)return this._inner.has(e)?!0:(this._inner.add(e),!1);for(var r=0;r<this._inner.length;r++){var n=this._inner[r];if(n===e)return!0}return this._inner.push(e),!1},t.prototype.unmemoize=function(e){if(this._hasWeakSet)this._inner.delete(e);else for(var r=0;r<this._inner.length;r++)if(this._inner[r]===e){this._inner.splice(r,1);break}},t}();_n.Memo=yl});var or=p(mn=>{Object.defineProperty(mn,"__esModule",{value:!0});var gn="<anonymous>";function bl(t){try{return!t||typeof t!="function"?gn:t.name||gn}catch{return gn}}mn.getFunctionName=bl});var ar=p(Ne=>{Object.defineProperty(Ne,"__esModule",{value:!0});var co=Me();function Sl(t,e){return e===void 0&&(e=0),typeof t!="string"||e===0||t.length<=e?t:t.substr(0,e)+"..."}Ne.truncate=Sl;function El(t,e){var r=t,n=r.length;if(n<=150)return r;e>n&&(e=n);var i=Math.max(e-60,0);i<5&&(i=0);var s=Math.min(i+140,n);return s>n-5&&(s=n),s===n&&(i=Math.max(s-140,0)),r=r.slice(i,s),i>0&&(r="'{snip} "+r),s<n&&(r+=" {snip}"),r}Ne.snipLine=El;function Tl(t,e){if(!Array.isArray(t))return"";for(var r=[],n=0;n<t.length;n++){var i=t[n];try{r.push(String(i))}catch{r.push("[value cannot be serialized]")}}return r.join(e)}Ne.safeJoin=Tl;function Ol(t,e){return co.isString(t)?co.isRegExp(e)?e.test(t):typeof e=="string"?t.indexOf(e)!==-1:!1:!1}Ne.isMatchingPattern=Ol;function wl(t){return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}Ne.escapeStringForRegex=wl});var Sn=p(ae=>{Object.defineProperty(ae,"__esModule",{value:!0});var xl=S(),lo=ln(),oe=Me(),Cl=vn(),Il=or(),fo=ar();function Rl(t,e,r){if(e in t){var n=t[e],i=r(n);if(typeof i=="function")try{i.prototype=i.prototype||{},Object.defineProperties(i,{__sentry_original__:{enumerable:!1,value:n}})}catch{}t[e]=i}}ae.fill=Rl;function ql(t){return Object.keys(t).map(function(e){return encodeURIComponent(e)+"="+encodeURIComponent(t[e])}).join("&")}ae.urlEncode=ql;function po(t){if(oe.isError(t)){var e=t,r={message:e.message,name:e.name,stack:e.stack};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}if(oe.isEvent(t)){var i=t,s={};s.type=i.type;try{s.target=oe.isElement(i.target)?lo.htmlTreeAsString(i.target):Object.prototype.toString.call(i.target)}catch{s.target="<unknown>"}try{s.currentTarget=oe.isElement(i.currentTarget)?lo.htmlTreeAsString(i.currentTarget):Object.prototype.toString.call(i.currentTarget)}catch{s.currentTarget="<unknown>"}typeof CustomEvent!="undefined"&&oe.isInstanceOf(t,CustomEvent)&&(s.detail=i.detail);for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(s[o]=i[o]);return s}return t}function kl(t){return~-encodeURI(t).split(/%..|./).length}function Pl(t){return kl(JSON.stringify(t))}function ho(t,e,r){e===void 0&&(e=3),r===void 0&&(r=100*1024);var n=vo(t,e);return Pl(n)>r?ho(t,e-1,r):n}ae.normalizeToSize=ho;function Ml(t){var e=Object.prototype.toString.call(t);if(typeof t=="string")return t;if(e==="[object Object]")return"[Object]";if(e==="[object Array]")return"[Array]";var r=_o(t);return oe.isPrimitive(r)?r:e}function _o(t,e){return e==="domain"&&t&&typeof t=="object"&&t._events?"[Domain]":e==="domainEmitter"?"[DomainEmitter]":typeof global!="undefined"&&t===global?"[Global]":typeof window!="undefined"&&t===window?"[Window]":typeof document!="undefined"&&t===document?"[Document]":oe.isSyntheticEvent(t)?"[SyntheticEvent]":typeof t=="number"&&t!==t?"[NaN]":t===void 0?"[undefined]":typeof t=="function"?"[Function: "+Il.getFunctionName(t)+"]":typeof t=="symbol"?"["+String(t)+"]":typeof t=="bigint"?"[BigInt: "+String(t)+"]":t}function yn(t,e,r,n){if(r===void 0&&(r=1/0),n===void 0&&(n=new Cl.Memo),r===0)return Ml(e);if(e!=null&&typeof e.toJSON=="function")return e.toJSON();var i=_o(e,t);if(oe.isPrimitive(i))return i;var s=po(e),o=Array.isArray(e)?[]:{};if(n.memoize(e))return"[Circular ~]";for(var a in s)!Object.prototype.hasOwnProperty.call(s,a)||(o[a]=yn(a,s[a],r-1,n));return n.unmemoize(e),o}ae.walk=yn;function vo(t,e){try{return JSON.parse(JSON.stringify(t,function(r,n){return yn(r,n,e)}))}catch{return"**non-serializable**"}}ae.normalize=vo;function Al(t,e){e===void 0&&(e=40);var r=Object.keys(po(t));if(r.sort(),!r.length)return"[object has no keys]";if(r[0].length>=e)return fo.truncate(r[0],e);for(var n=r.length;n>0;n--){var i=r.slice(0,n).join(", ");if(!(i.length>e))return n===r.length?i:fo.truncate(i,e)}return""}ae.extractExceptionKeysForMessage=Al;function bn(t){var e,r;if(oe.isPlainObject(t)){var n=t,i={};try{for(var s=xl.__values(Object.keys(n)),o=s.next();!o.done;o=s.next()){var a=o.value;typeof n[a]!="undefined"&&(i[a]=bn(n[a]))}}catch(u){e={error:u}}finally{try{o&&!o.done&&(r=s.return)&&r.call(s)}finally{if(e)throw e.error}}return i}return Array.isArray(t)?t.map(bn):t}ae.dropUndefinedKeys=bn;function Nl(t){var e;switch(!0){case t==null:e=new String(t);break;case(typeof t=="symbol"||typeof t=="bigint"):e=Object(t);break;case oe.isPrimitive(t):e=new t.constructor(t);break;default:e=t;break}return e}ae.objectify=Nl});var On=p(te=>{Object.defineProperty(te,"__esModule",{value:!0});var ur=Se(),jl=sr();function Fl(){try{return new ErrorEvent(""),!0}catch{return!1}}te.supportsErrorEvent=Fl;function Dl(){try{return new DOMError(""),!0}catch{return!1}}te.supportsDOMError=Dl;function Hl(){try{return new DOMException(""),!0}catch{return!1}}te.supportsDOMException=Hl;function En(){if(!("fetch"in ur.getGlobalObject()))return!1;try{return new Headers,new Request(""),new Response,!0}catch{return!1}}te.supportsFetch=En;function Tn(t){return t&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(t.toString())}te.isNativeFetch=Tn;function Ul(){if(!En())return!1;var t=ur.getGlobalObject();if(Tn(t.fetch))return!0;var e=!1,r=t.document;if(r&&typeof r.createElement=="function")try{var n=r.createElement("iframe");n.hidden=!0,r.head.appendChild(n),n.contentWindow&&n.contentWindow.fetch&&(e=Tn(n.contentWindow.fetch)),r.head.removeChild(n)}catch(i){jl.logger.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",i)}return e}te.supportsNativeFetch=Ul;function Ll(){return"ReportingObserver"in ur.getGlobalObject()}te.supportsReportingObserver=Ll;function Bl(){if(!En())return!1;try{return new Request("_",{referrerPolicy:"origin"}),!0}catch{return!1}}te.supportsReferrerPolicy=Bl;function Gl(){var t=ur.getGlobalObject(),e=t.chrome,r=e&&e.app&&e.app.runtime,n="history"in t&&!!t.history.pushState&&!!t.history.replaceState;return!r&&n}te.supportsHistory=Gl});var So=p(Cn=>{Object.defineProperty(Cn,"__esModule",{value:!0});var Qe=S(),zl=Se(),cr=Me(),go=sr(),de=Sn(),Wl=or(),mo=On(),x=zl.getGlobalObject(),yt={},yo={};function Yl(t){if(!yo[t])switch(yo[t]=!0,t){case"console":Kl();break;case"dom":nf();break;case"xhr":Zl();break;case"fetch":$l();break;case"history":Ql();break;case"error":sf();break;case"unhandledrejection":of();break;default:go.logger.warn("unknown instrumentation type:",t)}}function Vl(t){!t||typeof t.type!="string"||typeof t.callback!="function"||(yt[t.type]=yt[t.type]||[],yt[t.type].push(t.callback),Yl(t.type))}Cn.addInstrumentationHandler=Vl;function re(t,e){var r,n;if(!(!t||!yt[t]))try{for(var i=Qe.__values(yt[t]||[]),s=i.next();!s.done;s=i.next()){var o=s.value;try{o(e)}catch(a){go.logger.error(`Error while triggering instrumentation handler.
6
+ `)};b.prototype.helpInformation=function(){var t=[];if(this._description){t=[this._description,""];var e=this._argsDescription;if(e&&this._args.length){var r=this.padWidth();t.push("Arguments:"),t.push(""),this._args.forEach(function(u){t.push(" "+Wt(u.name,r)+" "+e[u.name])}),t.push("")}}var n=this._name;this._alias&&(n=n+"|"+this._alias);var i=["Usage: "+n+" "+this.usage(),""],s=[],o=this.commandHelp();o&&(s=[o]);var a=["Options:",""+this.optionHelp().replace(/^/gm," "),""];return i.concat(t).concat(a).concat(s).join(`
7
+ `)};b.prototype.outputHelp=function(t){t||(t=function(e){return e}),process.stdout.write(t(this.helpInformation())),this.emit("--help")};b.prototype.help=function(t){this.outputHelp(t),process.exit()};function qc(t){return t.split("-").reduce(function(e,r){return e+r[0].toUpperCase()+r.slice(1)})}function Wt(t,e){var r=Math.max(0,e-t.length);return t+Array(r+1).join(" ")}function Os(t,e){e=e||[];for(var r=0;r<e.length;r++)(e[r]==="--help"||e[r]==="-h")&&(t.outputHelp(),process.exit(0))}function ws(t){var e=t.name+(t.variadic===!0?"...":"");return t.required?"<"+e+">":"["+e+"]"}function on(t){try{if(Ts.statSync(t).isFile())return!0}catch{return!1}}});var S=p((Zv,Kt)=>{var Rs,qs,ks,Ps,Ms,As,Ns,js,Fs,Vt,an,Ds,Hs,$e,Us,Ls,Bs,Gs,zs,Ws,Ys,Vs,Ks;(function(t){var e=typeof global=="object"?global:typeof self=="object"?self:typeof this=="object"?this:{};typeof define=="function"&&define.amd?define("tslib",["exports"],function(n){t(r(e,r(n)))}):typeof Kt=="object"&&typeof Kt.exports=="object"?t(r(e,r(Kt.exports))):t(r(e));function r(n,i){return n!==e&&(typeof Object.create=="function"?Object.defineProperty(n,"__esModule",{value:!0}):n.__esModule=!0),function(s,o){return n[s]=i?i(s,o):o}}})(function(t){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var i in n)n.hasOwnProperty(i)&&(r[i]=n[i])};Rs=function(r,n){e(r,n);function i(){this.constructor=r}r.prototype=n===null?Object.create(n):(i.prototype=n.prototype,new i)},qs=Object.assign||function(r){for(var n,i=1,s=arguments.length;i<s;i++){n=arguments[i];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(r[o]=n[o])}return r},ks=function(r,n){var i={};for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&n.indexOf(s)<0&&(i[s]=r[s]);if(r!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,s=Object.getOwnPropertySymbols(r);o<s.length;o++)n.indexOf(s[o])<0&&Object.prototype.propertyIsEnumerable.call(r,s[o])&&(i[s[o]]=r[s[o]]);return i},Ps=function(r,n,i,s){var o=arguments.length,a=o<3?n:s===null?s=Object.getOwnPropertyDescriptor(n,i):s,u;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(r,n,i,s);else for(var c=r.length-1;c>=0;c--)(u=r[c])&&(a=(o<3?u(a):o>3?u(n,i,a):u(n,i))||a);return o>3&&a&&Object.defineProperty(n,i,a),a},Ms=function(r,n){return function(i,s){n(i,s,r)}},As=function(r,n){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(r,n)},Ns=function(r,n,i,s){function o(a){return a instanceof i?a:new i(function(u){u(a)})}return new(i||(i=Promise))(function(a,u){function c(d){try{l(s.next(d))}catch(h){u(h)}}function f(d){try{l(s.throw(d))}catch(h){u(h)}}function l(d){d.done?a(d.value):o(d.value).then(c,f)}l((s=s.apply(r,n||[])).next())})},js=function(r,n){var i={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},s,o,a,u;return u={next:c(0),throw:c(1),return:c(2)},typeof Symbol=="function"&&(u[Symbol.iterator]=function(){return this}),u;function c(l){return function(d){return f([l,d])}}function f(l){if(s)throw new TypeError("Generator is already executing.");for(;i;)try{if(s=1,o&&(a=l[0]&2?o.return:l[0]?o.throw||((a=o.return)&&a.call(o),0):o.next)&&!(a=a.call(o,l[1])).done)return a;switch(o=0,a&&(l=[l[0]&2,a.value]),l[0]){case 0:case 1:a=l;break;case 4:return i.label++,{value:l[1],done:!1};case 5:i.label++,o=l[1],l=[0];continue;case 7:l=i.ops.pop(),i.trys.pop();continue;default:if(a=i.trys,!(a=a.length>0&&a[a.length-1])&&(l[0]===6||l[0]===2)){i=0;continue}if(l[0]===3&&(!a||l[1]>a[0]&&l[1]<a[3])){i.label=l[1];break}if(l[0]===6&&i.label<a[1]){i.label=a[1],a=l;break}if(a&&i.label<a[2]){i.label=a[2],i.ops.push(l);break}a[2]&&i.ops.pop(),i.trys.pop();continue}l=n.call(r,i)}catch(d){l=[6,d],o=0}finally{s=a=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:!0}}},Ks=function(r,n,i,s){s===void 0&&(s=i),r[s]=n[i]},Fs=function(r,n){for(var i in r)i!=="default"&&!n.hasOwnProperty(i)&&(n[i]=r[i])},Vt=function(r){var n=typeof Symbol=="function"&&Symbol.iterator,i=n&&r[n],s=0;if(i)return i.call(r);if(r&&typeof r.length=="number")return{next:function(){return r&&s>=r.length&&(r=void 0),{value:r&&r[s++],done:!r}}};throw new TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")},an=function(r,n){var i=typeof Symbol=="function"&&r[Symbol.iterator];if(!i)return r;var s=i.call(r),o,a=[],u;try{for(;(n===void 0||n-- >0)&&!(o=s.next()).done;)a.push(o.value)}catch(c){u={error:c}}finally{try{o&&!o.done&&(i=s.return)&&i.call(s)}finally{if(u)throw u.error}}return a},Ds=function(){for(var r=[],n=0;n<arguments.length;n++)r=r.concat(an(arguments[n]));return r},Hs=function(){for(var r=0,n=0,i=arguments.length;n<i;n++)r+=arguments[n].length;for(var s=Array(r),o=0,n=0;n<i;n++)for(var a=arguments[n],u=0,c=a.length;u<c;u++,o++)s[o]=a[u];return s},$e=function(r){return this instanceof $e?(this.v=r,this):new $e(r)},Us=function(r,n,i){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var s=i.apply(r,n||[]),o,a=[];return o={},u("next"),u("throw"),u("return"),o[Symbol.asyncIterator]=function(){return this},o;function u(_){s[_]&&(o[_]=function(v){return new Promise(function(g,w){a.push([_,v,g,w])>1||c(_,v)})})}function c(_,v){try{f(s[_](v))}catch(g){h(a[0][3],g)}}function f(_){_.value instanceof $e?Promise.resolve(_.value.v).then(l,d):h(a[0][2],_)}function l(_){c("next",_)}function d(_){c("throw",_)}function h(_,v){_(v),a.shift(),a.length&&c(a[0][0],a[0][1])}},Ls=function(r){var n,i;return n={},s("next"),s("throw",function(o){throw o}),s("return"),n[Symbol.iterator]=function(){return this},n;function s(o,a){n[o]=r[o]?function(u){return(i=!i)?{value:$e(r[o](u)),done:o==="return"}:a?a(u):u}:a}},Bs=function(r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=r[Symbol.asyncIterator],i;return n?n.call(r):(r=typeof Vt=="function"?Vt(r):r[Symbol.iterator](),i={},s("next"),s("throw"),s("return"),i[Symbol.asyncIterator]=function(){return this},i);function s(a){i[a]=r[a]&&function(u){return new Promise(function(c,f){u=r[a](u),o(c,f,u.done,u.value)})}}function o(a,u,c,f){Promise.resolve(f).then(function(l){a({value:l,done:c})},u)}},Gs=function(r,n){return Object.defineProperty?Object.defineProperty(r,"raw",{value:n}):r.raw=n,r},zs=function(r){if(r&&r.__esModule)return r;var n={};if(r!=null)for(var i in r)Object.hasOwnProperty.call(r,i)&&(n[i]=r[i]);return n.default=r,n},Ws=function(r){return r&&r.__esModule?r:{default:r}},Ys=function(r,n){if(!n.has(r))throw new TypeError("attempted to get private field on non-instance");return n.get(r)},Vs=function(r,n,i){if(!n.has(r))throw new TypeError("attempted to set private field on non-instance");return n.set(r,i),i},t("__extends",Rs),t("__assign",qs),t("__rest",ks),t("__decorate",Ps),t("__param",Ms),t("__metadata",As),t("__awaiter",Ns),t("__generator",js),t("__exportStar",Fs),t("__createBinding",Ks),t("__values",Vt),t("__read",an),t("__spread",Ds),t("__spreadArrays",Hs),t("__await",$e),t("__asyncGenerator",Us),t("__asyncDelegator",Ls),t("__asyncValues",Bs),t("__makeTemplateObject",Gs),t("__importStar",zs),t("__importDefault",Ws),t("__classPrivateFieldGet",Ys),t("__classPrivateFieldSet",Vs)})});var $s=p($t=>{Object.defineProperty($t,"__esModule",{value:!0});var kc;(function(t){t[t.None=0]="None",t[t.Error=1]="Error",t[t.Debug=2]="Debug",t[t.Verbose=3]="Verbose"})(kc=$t.LogLevel||($t.LogLevel={}))});var Js=p(Je=>{Object.defineProperty(Je,"__esModule",{value:!0});var Pc;(function(t){t.Ok="ok",t.Exited="exited",t.Crashed="crashed",t.Abnormal="abnormal"})(Pc=Je.SessionStatus||(Je.SessionStatus={}));var Mc;(function(t){t.Ok="ok",t.Errored="errored",t.Crashed="crashed"})(Mc=Je.RequestSessionStatus||(Je.RequestSessionStatus={}))});var Zs=p(Xe=>{Object.defineProperty(Xe,"__esModule",{value:!0});var Xs;(function(t){t.Fatal="fatal",t.Error="error",t.Warning="warning",t.Log="log",t.Info="info",t.Debug="debug",t.Critical="critical"})(Xs=Xe.Severity||(Xe.Severity={}));(function(t){function e(r){switch(r){case"debug":return t.Debug;case"info":return t.Info;case"warn":case"warning":return t.Warning;case"error":return t.Error;case"fatal":return t.Fatal;case"critical":return t.Critical;case"log":default:return t.Log}}t.fromString=e})(Xs=Xe.Severity||(Xe.Severity={}))});var eo=p(Ze=>{Object.defineProperty(Ze,"__esModule",{value:!0});var Qs;(function(t){t.Unknown="unknown",t.Skipped="skipped",t.Success="success",t.RateLimit="rate_limit",t.Invalid="invalid",t.Failed="failed"})(Qs=Ze.Status||(Ze.Status={}));(function(t){function e(r){return r>=200&&r<300?t.Success:r===429?t.RateLimit:r>=400&&r<500?t.Invalid:r>=500?t.Failed:t.Unknown}t.fromHttpCode=e})(Qs=Ze.Status||(Ze.Status={}))});var to=p(Jt=>{Object.defineProperty(Jt,"__esModule",{value:!0});var Ac;(function(t){t.Explicit="explicitly_set",t.Sampler="client_sampler",t.Rate="client_rate",t.Inheritance="inheritance"})(Ac=Jt.TransactionSamplingMethod||(Jt.TransactionSamplingMethod={}))});var ro=p(Xt=>{Object.defineProperty(Xt,"__esModule",{value:!0});var Nc;(function(t){t.BeforeSend="before_send",t.EventProcessor="event_processor",t.NetworkError="network_error",t.QueueOverflow="queue_overflow",t.RateLimitBackoff="ratelimit_backoff",t.SampleRate="sample_rate"})(Nc=Xt.Outcome||(Xt.Outcome={}))});var D=p(fe=>{Object.defineProperty(fe,"__esModule",{value:!0});var jc=$s();fe.LogLevel=jc.LogLevel;var no=Js();fe.SessionStatus=no.SessionStatus;fe.RequestSessionStatus=no.RequestSessionStatus;var Fc=Zs();fe.Severity=Fc.Severity;var Dc=eo();fe.Status=Dc.Status;var Hc=to();fe.TransactionSamplingMethod=Hc.TransactionSamplingMethod;var Uc=ro();fe.Outcome=Uc.Outcome});var io=p(un=>{Object.defineProperty(un,"__esModule",{value:!0});function Lc(t){t.then(null,function(e){console.error(e)})}un.forget=Lc});var er=p((gt,Qt)=>{Object.defineProperty(gt,"__esModule",{value:!0});function Bc(){return Object.prototype.toString.call(typeof process!="undefined"?process:0)==="[object process]"}gt.isNodeEnv=Bc;function Zt(t,e){return t.require(e)}gt.dynamicRequire=Zt;function Gc(t){var e;try{e=Zt(Qt,t)}catch{}try{var r=Zt(Qt,"process").cwd;e=Zt(Qt,r()+"/node_modules/"+t)}catch{}return e}gt.loadModule=Gc});var Se=p(cn=>{Object.defineProperty(cn,"__esModule",{value:!0});var zc=er(),Wc={};function Yc(){return zc.isNodeEnv()?global:typeof window!="undefined"?window:typeof self!="undefined"?self:Wc}cn.getGlobalObject=Yc});var Me=p(L=>{Object.defineProperty(L,"__esModule",{value:!0});function Vc(t){switch(Object.prototype.toString.call(t)){case"[object Error]":return!0;case"[object Exception]":return!0;case"[object DOMException]":return!0;default:return tr(t,Error)}}L.isError=Vc;function Kc(t){return Object.prototype.toString.call(t)==="[object ErrorEvent]"}L.isErrorEvent=Kc;function $c(t){return Object.prototype.toString.call(t)==="[object DOMError]"}L.isDOMError=$c;function Jc(t){return Object.prototype.toString.call(t)==="[object DOMException]"}L.isDOMException=Jc;function Xc(t){return Object.prototype.toString.call(t)==="[object String]"}L.isString=Xc;function Zc(t){return t===null||typeof t!="object"&&typeof t!="function"}L.isPrimitive=Zc;function so(t){return Object.prototype.toString.call(t)==="[object Object]"}L.isPlainObject=so;function Qc(t){return typeof Event!="undefined"&&tr(t,Event)}L.isEvent=Qc;function el(t){return typeof Element!="undefined"&&tr(t,Element)}L.isElement=el;function tl(t){return Object.prototype.toString.call(t)==="[object RegExp]"}L.isRegExp=tl;function rl(t){return Boolean(t&&t.then&&typeof t.then=="function")}L.isThenable=rl;function nl(t){return so(t)&&"nativeEvent"in t&&"preventDefault"in t&&"stopPropagation"in t}L.isSyntheticEvent=nl;function tr(t,e){try{return t instanceof e}catch{return!1}}L.isInstanceOf=tr});var ln=p(rr=>{Object.defineProperty(rr,"__esModule",{value:!0});var il=Se(),sl=Me();function ol(t,e){try{for(var r=t,n=5,i=80,s=[],o=0,a=0,u=" > ",c=u.length,f=void 0;r&&o++<n&&(f=al(r,e),!(f==="html"||o>1&&a+s.length*c+f.length>=i));)s.push(f),a+=f.length,r=r.parentNode;return s.reverse().join(u)}catch{return"<unknown>"}}rr.htmlTreeAsString=ol;function al(t,e){var r,n,i=t,s=[],o,a,u,c,f;if(!i||!i.tagName)return"";s.push(i.tagName.toLowerCase());var l=((r=e)===null||r===void 0?void 0:r.length)?e.filter(function(h){return i.getAttribute(h)}).map(function(h){return[h,i.getAttribute(h)]}):null;if((n=l)===null||n===void 0?void 0:n.length)l.forEach(function(h){s.push("["+h[0]+'="'+h[1]+'"]')});else if(i.id&&s.push("#"+i.id),o=i.className,o&&sl.isString(o))for(a=o.split(/\s+/),f=0;f<a.length;f++)s.push("."+a[f]);var d=["type","name","title","alt"];for(f=0;f<d.length;f++)u=d[f],c=i.getAttribute(u),c&&s.push("["+u+'="'+c+'"]');return s.join("")}function ul(){var t=il.getGlobalObject();try{return t.document.location.href}catch{return""}}rr.getLocationHref=ul});var oo=p(fn=>{Object.defineProperty(fn,"__esModule",{value:!0});fn.setPrototypeOf=Object.setPrototypeOf||({__proto__:[]}instanceof Array?cl:ll);function cl(t,e){return t.__proto__=e,t}function ll(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(t,r)||(t[r]=e[r]);return t}});var nr=p(dn=>{Object.defineProperty(dn,"__esModule",{value:!0});var fl=S(),dl=oo(),pl=function(t){fl.__extends(e,t);function e(r){var n=this.constructor,i=t.call(this,r)||this;return i.message=r,i.name=n.prototype.constructor.name,dl.setPrototypeOf(i,n.prototype),i}return e}(Error);dn.SentryError=pl});var ao=p(pn=>{Object.defineProperty(pn,"__esModule",{value:!0});var hl=S(),mt=nr(),_l=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+))?@)([\w.-]+)(?::(\d+))?\/(.+)/,yt="Invalid Dsn",vl=function(){function t(e){typeof e=="string"?this._fromString(e):this._fromComponents(e),this._validate()}return t.prototype.toString=function(e){e===void 0&&(e=!1);var r=this,n=r.host,i=r.path,s=r.pass,o=r.port,a=r.projectId,u=r.protocol,c=r.publicKey;return u+"://"+c+(e&&s?":"+s:"")+("@"+n+(o?":"+o:"")+"/"+(i&&i+"/")+a)},t.prototype._fromString=function(e){var r=_l.exec(e);if(!r)throw new mt.SentryError(yt);var n=hl.__read(r.slice(1),6),i=n[0],s=n[1],o=n[2],a=o===void 0?"":o,u=n[3],c=n[4],f=c===void 0?"":c,l=n[5],d="",h=l,_=h.split("/");if(_.length>1&&(d=_.slice(0,-1).join("/"),h=_.pop()),h){var v=h.match(/^\d+/);v&&(h=v[0])}this._fromComponents({host:u,pass:a,path:d,projectId:h,port:f,protocol:i,publicKey:s})},t.prototype._fromComponents=function(e){"user"in e&&!("publicKey"in e)&&(e.publicKey=e.user),this.user=e.publicKey||"",this.protocol=e.protocol,this.publicKey=e.publicKey||"",this.pass=e.pass||"",this.host=e.host,this.port=e.port||"",this.path=e.path||"",this.projectId=e.projectId},t.prototype._validate=function(){var e=this;if(["protocol","publicKey","host","projectId"].forEach(function(r){if(!e[r])throw new mt.SentryError(yt+": "+r+" missing")}),!this.projectId.match(/^\d+$/))throw new mt.SentryError(yt+": Invalid projectId "+this.projectId);if(this.protocol!=="http"&&this.protocol!=="https")throw new mt.SentryError(yt+": Invalid protocol "+this.protocol);if(this.port&&isNaN(parseInt(this.port,10)))throw new mt.SentryError(yt+": Invalid port "+this.port)},t}();pn.Dsn=vl});var or=p(sr=>{Object.defineProperty(sr,"__esModule",{value:!0});var uo=Se(),Ae=uo.getGlobalObject(),hn="Sentry Logger ";function ir(t){var e=uo.getGlobalObject(),r=["debug","info","warn","error","log","assert"];if(!("console"in e))return t();var n=e.console,i={};r.forEach(function(o){o in e.console&&n[o].__sentry_original__&&(i[o]=n[o],n[o]=n[o].__sentry_original__)});var s=t();return Object.keys(i).forEach(function(o){n[o]=i[o]}),s}sr.consoleSandbox=ir;var gl=function(){function t(){this._enabled=!1}return t.prototype.disable=function(){this._enabled=!1},t.prototype.enable=function(){this._enabled=!0},t.prototype.log=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];!this._enabled||ir(function(){Ae.console.log(hn+"[Log]: "+e.join(" "))})},t.prototype.warn=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];!this._enabled||ir(function(){Ae.console.warn(hn+"[Warn]: "+e.join(" "))})},t.prototype.error=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];!this._enabled||ir(function(){Ae.console.error(hn+"[Error]: "+e.join(" "))})},t}();Ae.__SENTRY__=Ae.__SENTRY__||{};var ml=Ae.__SENTRY__.logger||(Ae.__SENTRY__.logger=new gl);sr.logger=ml});var vn=p(_n=>{Object.defineProperty(_n,"__esModule",{value:!0});var yl=function(){function t(){this._hasWeakSet=typeof WeakSet=="function",this._inner=this._hasWeakSet?new WeakSet:[]}return t.prototype.memoize=function(e){if(this._hasWeakSet)return this._inner.has(e)?!0:(this._inner.add(e),!1);for(var r=0;r<this._inner.length;r++){var n=this._inner[r];if(n===e)return!0}return this._inner.push(e),!1},t.prototype.unmemoize=function(e){if(this._hasWeakSet)this._inner.delete(e);else for(var r=0;r<this._inner.length;r++)if(this._inner[r]===e){this._inner.splice(r,1);break}},t}();_n.Memo=yl});var ar=p(mn=>{Object.defineProperty(mn,"__esModule",{value:!0});var gn="<anonymous>";function bl(t){try{return!t||typeof t!="function"?gn:t.name||gn}catch{return gn}}mn.getFunctionName=bl});var ur=p(Ne=>{Object.defineProperty(Ne,"__esModule",{value:!0});var co=Me();function Sl(t,e){return e===void 0&&(e=0),typeof t!="string"||e===0||t.length<=e?t:t.substr(0,e)+"..."}Ne.truncate=Sl;function El(t,e){var r=t,n=r.length;if(n<=150)return r;e>n&&(e=n);var i=Math.max(e-60,0);i<5&&(i=0);var s=Math.min(i+140,n);return s>n-5&&(s=n),s===n&&(i=Math.max(s-140,0)),r=r.slice(i,s),i>0&&(r="'{snip} "+r),s<n&&(r+=" {snip}"),r}Ne.snipLine=El;function Tl(t,e){if(!Array.isArray(t))return"";for(var r=[],n=0;n<t.length;n++){var i=t[n];try{r.push(String(i))}catch{r.push("[value cannot be serialized]")}}return r.join(e)}Ne.safeJoin=Tl;function Ol(t,e){return co.isString(t)?co.isRegExp(e)?e.test(t):typeof e=="string"?t.indexOf(e)!==-1:!1:!1}Ne.isMatchingPattern=Ol;function wl(t){return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}Ne.escapeStringForRegex=wl});var Sn=p(ae=>{Object.defineProperty(ae,"__esModule",{value:!0});var xl=S(),lo=ln(),oe=Me(),Cl=vn(),Il=ar(),fo=ur();function Rl(t,e,r){if(e in t){var n=t[e],i=r(n);if(typeof i=="function")try{i.prototype=i.prototype||{},Object.defineProperties(i,{__sentry_original__:{enumerable:!1,value:n}})}catch{}t[e]=i}}ae.fill=Rl;function ql(t){return Object.keys(t).map(function(e){return encodeURIComponent(e)+"="+encodeURIComponent(t[e])}).join("&")}ae.urlEncode=ql;function po(t){if(oe.isError(t)){var e=t,r={message:e.message,name:e.name,stack:e.stack};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}if(oe.isEvent(t)){var i=t,s={};s.type=i.type;try{s.target=oe.isElement(i.target)?lo.htmlTreeAsString(i.target):Object.prototype.toString.call(i.target)}catch{s.target="<unknown>"}try{s.currentTarget=oe.isElement(i.currentTarget)?lo.htmlTreeAsString(i.currentTarget):Object.prototype.toString.call(i.currentTarget)}catch{s.currentTarget="<unknown>"}typeof CustomEvent!="undefined"&&oe.isInstanceOf(t,CustomEvent)&&(s.detail=i.detail);for(var o in i)Object.prototype.hasOwnProperty.call(i,o)&&(s[o]=i[o]);return s}return t}function kl(t){return~-encodeURI(t).split(/%..|./).length}function Pl(t){return kl(JSON.stringify(t))}function ho(t,e,r){e===void 0&&(e=3),r===void 0&&(r=100*1024);var n=vo(t,e);return Pl(n)>r?ho(t,e-1,r):n}ae.normalizeToSize=ho;function Ml(t){var e=Object.prototype.toString.call(t);if(typeof t=="string")return t;if(e==="[object Object]")return"[Object]";if(e==="[object Array]")return"[Array]";var r=_o(t);return oe.isPrimitive(r)?r:e}function _o(t,e){return e==="domain"&&t&&typeof t=="object"&&t._events?"[Domain]":e==="domainEmitter"?"[DomainEmitter]":typeof global!="undefined"&&t===global?"[Global]":typeof window!="undefined"&&t===window?"[Window]":typeof document!="undefined"&&t===document?"[Document]":oe.isSyntheticEvent(t)?"[SyntheticEvent]":typeof t=="number"&&t!==t?"[NaN]":t===void 0?"[undefined]":typeof t=="function"?"[Function: "+Il.getFunctionName(t)+"]":typeof t=="symbol"?"["+String(t)+"]":typeof t=="bigint"?"[BigInt: "+String(t)+"]":t}function yn(t,e,r,n){if(r===void 0&&(r=1/0),n===void 0&&(n=new Cl.Memo),r===0)return Ml(e);if(e!=null&&typeof e.toJSON=="function")return e.toJSON();var i=_o(e,t);if(oe.isPrimitive(i))return i;var s=po(e),o=Array.isArray(e)?[]:{};if(n.memoize(e))return"[Circular ~]";for(var a in s)!Object.prototype.hasOwnProperty.call(s,a)||(o[a]=yn(a,s[a],r-1,n));return n.unmemoize(e),o}ae.walk=yn;function vo(t,e){try{return JSON.parse(JSON.stringify(t,function(r,n){return yn(r,n,e)}))}catch{return"**non-serializable**"}}ae.normalize=vo;function Al(t,e){e===void 0&&(e=40);var r=Object.keys(po(t));if(r.sort(),!r.length)return"[object has no keys]";if(r[0].length>=e)return fo.truncate(r[0],e);for(var n=r.length;n>0;n--){var i=r.slice(0,n).join(", ");if(!(i.length>e))return n===r.length?i:fo.truncate(i,e)}return""}ae.extractExceptionKeysForMessage=Al;function bn(t){var e,r;if(oe.isPlainObject(t)){var n=t,i={};try{for(var s=xl.__values(Object.keys(n)),o=s.next();!o.done;o=s.next()){var a=o.value;typeof n[a]!="undefined"&&(i[a]=bn(n[a]))}}catch(u){e={error:u}}finally{try{o&&!o.done&&(r=s.return)&&r.call(s)}finally{if(e)throw e.error}}return i}return Array.isArray(t)?t.map(bn):t}ae.dropUndefinedKeys=bn;function Nl(t){var e;switch(!0){case t==null:e=new String(t);break;case(typeof t=="symbol"||typeof t=="bigint"):e=Object(t);break;case oe.isPrimitive(t):e=new t.constructor(t);break;default:e=t;break}return e}ae.objectify=Nl});var On=p(te=>{Object.defineProperty(te,"__esModule",{value:!0});var cr=Se(),jl=or();function Fl(){try{return new ErrorEvent(""),!0}catch{return!1}}te.supportsErrorEvent=Fl;function Dl(){try{return new DOMError(""),!0}catch{return!1}}te.supportsDOMError=Dl;function Hl(){try{return new DOMException(""),!0}catch{return!1}}te.supportsDOMException=Hl;function En(){if(!("fetch"in cr.getGlobalObject()))return!1;try{return new Headers,new Request(""),new Response,!0}catch{return!1}}te.supportsFetch=En;function Tn(t){return t&&/^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(t.toString())}te.isNativeFetch=Tn;function Ul(){if(!En())return!1;var t=cr.getGlobalObject();if(Tn(t.fetch))return!0;var e=!1,r=t.document;if(r&&typeof r.createElement=="function")try{var n=r.createElement("iframe");n.hidden=!0,r.head.appendChild(n),n.contentWindow&&n.contentWindow.fetch&&(e=Tn(n.contentWindow.fetch)),r.head.removeChild(n)}catch(i){jl.logger.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",i)}return e}te.supportsNativeFetch=Ul;function Ll(){return"ReportingObserver"in cr.getGlobalObject()}te.supportsReportingObserver=Ll;function Bl(){if(!En())return!1;try{return new Request("_",{referrerPolicy:"origin"}),!0}catch{return!1}}te.supportsReferrerPolicy=Bl;function Gl(){var t=cr.getGlobalObject(),e=t.chrome,r=e&&e.app&&e.app.runtime,n="history"in t&&!!t.history.pushState&&!!t.history.replaceState;return!r&&n}te.supportsHistory=Gl});var So=p(Cn=>{Object.defineProperty(Cn,"__esModule",{value:!0});var Qe=S(),zl=Se(),lr=Me(),go=or(),de=Sn(),Wl=ar(),mo=On(),x=zl.getGlobalObject(),bt={},yo={};function Yl(t){if(!yo[t])switch(yo[t]=!0,t){case"console":Kl();break;case"dom":nf();break;case"xhr":Zl();break;case"fetch":$l();break;case"history":Ql();break;case"error":sf();break;case"unhandledrejection":of();break;default:go.logger.warn("unknown instrumentation type:",t)}}function Vl(t){!t||typeof t.type!="string"||typeof t.callback!="function"||(bt[t.type]=bt[t.type]||[],bt[t.type].push(t.callback),Yl(t.type))}Cn.addInstrumentationHandler=Vl;function re(t,e){var r,n;if(!(!t||!bt[t]))try{for(var i=Qe.__values(bt[t]||[]),s=i.next();!s.done;s=i.next()){var o=s.value;try{o(e)}catch(a){go.logger.error(`Error while triggering instrumentation handler.
8
8
  Type: `+t+`
9
9
  Name: `+Wl.getFunctionName(o)+`
10
- Error: `+a)}}}catch(a){r={error:a}}finally{try{s&&!s.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}}function Kl(){"console"in x&&["debug","info","warn","error","log","assert"].forEach(function(t){t in x.console&&de.fill(x.console,t,function(e){return function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];re("console",{args:r,level:t}),e&&Function.prototype.apply.call(e,x.console,r)}})})}function $l(){!mo.supportsNativeFetch()||de.fill(x,"fetch",function(t){return function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var n={args:e,fetchData:{method:Jl(e),url:Xl(e)},startTimestamp:Date.now()};return re("fetch",Qe.__assign({},n)),t.apply(x,e).then(function(i){return re("fetch",Qe.__assign(Qe.__assign({},n),{endTimestamp:Date.now(),response:i})),i},function(i){throw re("fetch",Qe.__assign(Qe.__assign({},n),{endTimestamp:Date.now(),error:i})),i})}})}function Jl(t){return t===void 0&&(t=[]),"Request"in x&&cr.isInstanceOf(t[0],Request)&&t[0].method?String(t[0].method).toUpperCase():t[1]&&t[1].method?String(t[1].method).toUpperCase():"GET"}function Xl(t){return t===void 0&&(t=[]),typeof t[0]=="string"?t[0]:"Request"in x&&cr.isInstanceOf(t[0],Request)?t[0].url:String(t[0])}function Zl(){if("XMLHttpRequest"in x){var t=[],e=[],r=XMLHttpRequest.prototype;de.fill(r,"open",function(n){return function(){for(var i=[],s=0;s<arguments.length;s++)i[s]=arguments[s];var o=this,a=i[1];o.__sentry_xhr__={method:cr.isString(i[0])?i[0].toUpperCase():i[0],url:i[1]},cr.isString(a)&&o.__sentry_xhr__.method==="POST"&&a.match(/sentry_key/)&&(o.__sentry_own_request__=!0);var u=function(){if(o.readyState===4){try{o.__sentry_xhr__&&(o.__sentry_xhr__.status_code=o.status)}catch{}try{var c=t.indexOf(o);if(c!==-1){t.splice(c);var f=e.splice(c)[0];o.__sentry_xhr__&&f[0]!==void 0&&(o.__sentry_xhr__.body=f[0])}}catch{}re("xhr",{args:i,endTimestamp:Date.now(),startTimestamp:Date.now(),xhr:o})}};return"onreadystatechange"in o&&typeof o.onreadystatechange=="function"?de.fill(o,"onreadystatechange",function(c){return function(){for(var f=[],l=0;l<arguments.length;l++)f[l]=arguments[l];return u(),c.apply(o,f)}}):o.addEventListener("readystatechange",u),n.apply(o,i)}}),de.fill(r,"send",function(n){return function(){for(var i=[],s=0;s<arguments.length;s++)i[s]=arguments[s];return t.push(this),e.push(i),re("xhr",{args:i,startTimestamp:Date.now(),xhr:this}),n.apply(this,i)}})}}var lr;function Ql(){if(!mo.supportsHistory())return;var t=x.onpopstate;x.onpopstate=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var i=x.location.href,s=lr;if(lr=i,re("history",{from:s,to:i}),t)try{return t.apply(this,r)}catch{}};function e(r){return function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];var s=n.length>2?n[2]:void 0;if(s){var o=lr,a=String(s);lr=a,re("history",{from:o,to:a})}return r.apply(this,n)}}de.fill(x.history,"pushState",e),de.fill(x.history,"replaceState",e)}var ef=1e3,fr,dr;function tf(t,e){if(!t||t.type!==e.type)return!0;try{if(t.target!==e.target)return!0}catch{}return!1}function rf(t){if(t.type!=="keypress")return!1;try{var e=t.target;if(!e||!e.tagName)return!0;if(e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable)return!1}catch{}return!0}function bo(t,e){return e===void 0&&(e=!1),function(r){if(!(!r||dr===r)&&!rf(r)){var n=r.type==="keypress"?"input":r.type;fr===void 0?(t({event:r,name:n,global:e}),dr=r):tf(dr,r)&&(t({event:r,name:n,global:e}),dr=r),clearTimeout(fr),fr=x.setTimeout(function(){fr=void 0},ef)}}}function nf(){if("document"in x){var t=re.bind(null,"dom"),e=bo(t,!0);x.document.addEventListener("click",e,!1),x.document.addEventListener("keypress",e,!1),["EventTarget","Node"].forEach(function(r){var n=x[r]&&x[r].prototype;!n||!n.hasOwnProperty||!n.hasOwnProperty("addEventListener")||(de.fill(n,"addEventListener",function(i){return function(s,o,a){if(s==="click"||s=="keypress")try{var u=this,c=u.__sentry_instrumentation_handlers__=u.__sentry_instrumentation_handlers__||{},f=c[s]=c[s]||{refCount:0};if(!f.handler){var l=bo(t);f.handler=l,i.call(this,s,l,a)}f.refCount+=1}catch{}return i.call(this,s,o,a)}}),de.fill(n,"removeEventListener",function(i){return function(s,o,a){if(s==="click"||s=="keypress")try{var u=this,c=u.__sentry_instrumentation_handlers__||{},f=c[s];f&&(f.refCount-=1,f.refCount<=0&&(i.call(this,s,f.handler,a),f.handler=void 0,delete c[s]),Object.keys(c).length===0&&delete u.__sentry_instrumentation_handlers__)}catch{}return i.call(this,s,o,a)}}))})}}var wn=null;function sf(){wn=x.onerror,x.onerror=function(t,e,r,n,i){return re("error",{column:n,error:i,line:r,msg:t,url:e}),wn?wn.apply(this,arguments):!1}}var xn=null;function of(){xn=x.onunhandledrejection,x.onunhandledrejection=function(t){return re("unhandledrejection",t),xn?xn.apply(this,arguments):!0}}});var To=p(X=>{Object.defineProperty(X,"__esModule",{value:!0});var bt=S(),af=Se(),In=ar();function uf(){var t=af.getGlobalObject(),e=t.crypto||t.msCrypto;if(e!==void 0&&e.getRandomValues){var r=new Uint16Array(8);e.getRandomValues(r),r[3]=r[3]&4095|16384,r[4]=r[4]&16383|32768;var n=function(i){for(var s=i.toString(16);s.length<4;)s="0"+s;return s};return n(r[0])+n(r[1])+n(r[2])+n(r[3])+n(r[4])+n(r[5])+n(r[6])+n(r[7])}return"xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx".replace(/[xy]/g,function(i){var s=Math.random()*16|0,o=i==="x"?s:s&3|8;return o.toString(16)})}X.uuid4=uf;function cf(t){if(!t)return{};var e=t.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!e)return{};var r=e[6]||"",n=e[8]||"";return{host:e[4],path:e[5],protocol:e[2],relative:e[5]+r+n}}X.parseUrl=cf;function lf(t){if(t.message)return t.message;if(t.exception&&t.exception.values&&t.exception.values[0]){var e=t.exception.values[0];return e.type&&e.value?e.type+": "+e.value:e.type||e.value||t.event_id||"<unknown>"}return t.event_id||"<unknown>"}X.getEventDescription=lf;function ff(t,e,r){t.exception=t.exception||{},t.exception.values=t.exception.values||[],t.exception.values[0]=t.exception.values[0]||{},t.exception.values[0].value=t.exception.values[0].value||e||"",t.exception.values[0].type=t.exception.values[0].type||r||"Error"}X.addExceptionTypeValue=ff;function df(t,e){var r;if(!(!t.exception||!t.exception.values)){var n=t.exception.values[0],i={type:"generic",handled:!0},s=n.mechanism;if(n.mechanism=bt.__assign(bt.__assign(bt.__assign({},i),s),e),e&&"data"in e){var o=bt.__assign(bt.__assign({},(r=s)===null||r===void 0?void 0:r.data),e.data);n.mechanism.data=o}}}X.addExceptionMechanism=df;var pf=/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/;function hf(t){var e=t.match(pf)||[],r=parseInt(e[1],10),n=parseInt(e[2],10),i=parseInt(e[3],10);return{buildmetadata:e[5],major:isNaN(r)?void 0:r,minor:isNaN(n)?void 0:n,patch:isNaN(i)?void 0:i,prerelease:e[4]}}X.parseSemver=hf;var Eo=60*1e3;function _f(t,e){if(!e)return Eo;var r=parseInt(""+e,10);if(!isNaN(r))return r*1e3;var n=Date.parse(""+e);return isNaN(n)?Eo:n-t}X.parseRetryAfterHeader=_f;function vf(t,e,r){r===void 0&&(r=5);var n=e.lineno||0,i=t.length,s=Math.max(Math.min(i,n-1),0);e.pre_context=t.slice(Math.max(0,s-r),s).map(function(o){return In.snipLine(o,0)}),e.context_line=In.snipLine(t[Math.min(i-1,s)],e.colno||0),e.post_context=t.slice(Math.min(s+1,i),s+1+r).map(function(o){return In.snipLine(o,0)})}X.addContextToFrame=vf;function gf(t){return t.split(/[\?#]/,1)[0]}X.stripUrlQueryAndFragment=gf;function mf(t){var e;if((e=t)===null||e===void 0?void 0:e.__sentry_captured__)return!0;try{Object.defineProperty(t,"__sentry_captured__",{value:!0})}catch{}return!1}X.checkOrSetAlreadyCaught=mf});var Ro=p(pe=>{Object.defineProperty(pe,"__esModule",{value:!0});function Oo(t,e){for(var r=0,n=t.length-1;n>=0;n--){var i=t[n];i==="."?t.splice(n,1):i===".."?(t.splice(n,1),r++):r&&(t.splice(n,1),r--)}if(e)for(;r--;r)t.unshift("..");return t}var yf=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^/]+?|)(\.[^./]*|))(?:[/]*)$/;function wo(t){var e=yf.exec(t);return e?e.slice(1):[]}function Rn(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var r="",n=!1,i=t.length-1;i>=-1&&!n;i--){var s=i>=0?t[i]:"/";!s||(r=s+"/"+r,n=s.charAt(0)==="/")}return r=Oo(r.split("/").filter(function(o){return!!o}),!n).join("/"),(n?"/":"")+r||"."}pe.resolve=Rn;function xo(t){for(var e=0;e<t.length&&t[e]==="";e++);for(var r=t.length-1;r>=0&&t[r]==="";r--);return e>r?[]:t.slice(e,r-e+1)}function bf(t,e){t=Rn(t).substr(1),e=Rn(e).substr(1);for(var r=xo(t.split("/")),n=xo(e.split("/")),i=Math.min(r.length,n.length),s=i,o=0;o<i;o++)if(r[o]!==n[o]){s=o;break}for(var a=[],o=s;o<r.length;o++)a.push("..");return a=a.concat(n.slice(s)),a.join("/")}pe.relative=bf;function Co(t){var e=Io(t),r=t.substr(-1)==="/",n=Oo(t.split("/").filter(function(i){return!!i}),!e).join("/");return!n&&!e&&(n="."),n&&r&&(n+="/"),(e?"/":"")+n}pe.normalizePath=Co;function Io(t){return t.charAt(0)==="/"}pe.isAbsolute=Io;function Sf(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return Co(t.join("/"))}pe.join=Sf;function Ef(t){var e=wo(t),r=e[0],n=e[1];return!r&&!n?".":(n&&(n=n.substr(0,n.length-1)),r+n)}pe.dirname=Ef;function Tf(t,e){var r=wo(t)[2];return e&&r.substr(e.length*-1)===e&&(r=r.substr(0,r.length-e.length)),r}pe.basename=Tf});var kn=p(qn=>{Object.defineProperty(qn,"__esModule",{value:!0});var Of=Me(),wf=function(){function t(e){var r=this;this._state="PENDING",this._handlers=[],this._resolve=function(n){r._setResult("RESOLVED",n)},this._reject=function(n){r._setResult("REJECTED",n)},this._setResult=function(n,i){if(r._state==="PENDING"){if(Of.isThenable(i)){i.then(r._resolve,r._reject);return}r._state=n,r._value=i,r._executeHandlers()}},this._attachHandler=function(n){r._handlers=r._handlers.concat(n),r._executeHandlers()},this._executeHandlers=function(){if(r._state!=="PENDING"){var n=r._handlers.slice();r._handlers=[],n.forEach(function(i){i.done||(r._state==="RESOLVED"&&i.onfulfilled&&i.onfulfilled(r._value),r._state==="REJECTED"&&i.onrejected&&i.onrejected(r._value),i.done=!0)})}};try{e(this._resolve,this._reject)}catch(n){this._reject(n)}}return t.resolve=function(e){return new t(function(r){r(e)})},t.reject=function(e){return new t(function(r,n){n(e)})},t.all=function(e){return new t(function(r,n){if(!Array.isArray(e)){n(new TypeError("Promise.all requires an array as input."));return}if(e.length===0){r([]);return}var i=e.length,s=[];e.forEach(function(o,a){t.resolve(o).then(function(u){s[a]=u,i-=1,i===0&&r(s)}).then(null,n)})})},t.prototype.then=function(e,r){var n=this;return new t(function(i,s){n._attachHandler({done:!1,onfulfilled:function(o){if(!e){i(o);return}try{i(e(o));return}catch(a){s(a);return}},onrejected:function(o){if(!r){s(o);return}try{i(r(o));return}catch(a){s(a);return}}})})},t.prototype.catch=function(e){return this.then(function(r){return r},e)},t.prototype.finally=function(e){var r=this;return new t(function(n,i){var s,o;return r.then(function(a){o=!1,s=a,e&&e()},function(a){o=!0,s=a,e&&e()}).then(function(){if(o){i(s);return}n(s)})})},t.prototype.toString=function(){return"[object SyncPromise]"},t}();qn.SyncPromise=wf});var qo=p(Mn=>{Object.defineProperty(Mn,"__esModule",{value:!0});var xf=rr(),Pn=kn(),Cf=function(){function t(e){this._limit=e,this._buffer=[]}return t.prototype.isReady=function(){return this._limit===void 0||this.length()<this._limit},t.prototype.add=function(e){var r=this;if(!this.isReady())return Pn.SyncPromise.reject(new xf.SentryError("Not adding Promise due to buffer limit reached."));var n=e();return this._buffer.indexOf(n)===-1&&this._buffer.push(n),n.then(function(){return r.remove(n)}).then(null,function(){return r.remove(n).then(null,function(){})}),n},t.prototype.remove=function(e){var r=this._buffer.splice(this._buffer.indexOf(e),1)[0];return r},t.prototype.length=function(){return this._buffer.length},t.prototype.drain=function(e){var r=this;return new Pn.SyncPromise(function(n){var i=setTimeout(function(){e&&e>0&&n(!1)},e);Pn.SyncPromise.all(r._buffer).then(function(){clearTimeout(i),n(!0)}).then(null,function(){n(!0)})})},t}();Mn.PromiseBuffer=Cf});var No=p((Z,Ao)=>{Object.defineProperty(Z,"__esModule",{value:!0});var ko=Se(),Po=Qt(),An={nowSeconds:function(){return Date.now()/1e3}};function If(){var t=ko.getGlobalObject().performance;if(!(!t||!t.now)){var e=Date.now()-t.now();return{now:function(){return t.now()},timeOrigin:e}}}function Rf(){try{var t=Po.dynamicRequire(Ao,"perf_hooks");return t.performance}catch{return}}var pr=Po.isNodeEnv()?Rf():If(),Mo=pr===void 0?An:{nowSeconds:function(){return(pr.timeOrigin+pr.now())/1e3}};Z.dateTimestampInSeconds=An.nowSeconds.bind(An);Z.timestampInSeconds=Mo.nowSeconds.bind(Mo);Z.timestampWithMs=Z.timestampInSeconds;Z.usingPerformanceAPI=pr!==void 0;Z.browserPerformanceTimeOrigin=function(){var t=ko.getGlobalObject().performance;if(!t||!t.now){Z._browserPerformanceTimeOriginMode="none";return}var e=3600*1e3,r=t.now(),n=Date.now(),i=t.timeOrigin?Math.abs(t.timeOrigin+r-n):e,s=i<e,o=t.timing&&t.timing.navigationStart,a=typeof o=="number",u=a?Math.abs(o+r-n):e,c=u<e;return s||c?i<=u?(Z._browserPerformanceTimeOriginMode="timeOrigin",t.timeOrigin):(Z._browserPerformanceTimeOriginMode="navigationStart",o):(Z._browserPerformanceTimeOriginMode="dateNow",n)}()});var m=p(R=>{Object.defineProperty(R,"__esModule",{value:!0});var k=S();k.__exportStar(io(),R);k.__exportStar(ln(),R);k.__exportStar(ao(),R);k.__exportStar(rr(),R);k.__exportStar(Se(),R);k.__exportStar(So(),R);k.__exportStar(Me(),R);k.__exportStar(sr(),R);k.__exportStar(vn(),R);k.__exportStar(To(),R);k.__exportStar(Qt(),R);k.__exportStar(Sn(),R);k.__exportStar(Ro(),R);k.__exportStar(qo(),R);k.__exportStar(or(),R);k.__exportStar(ar(),R);k.__exportStar(On(),R);k.__exportStar(kn(),R);k.__exportStar(No(),R)});var Nn=p(hr=>{Object.defineProperty(hr,"__esModule",{value:!0});var y=S(),St=m(),jo=100,qf=function(){function t(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._user={},this._tags={},this._extra={},this._contexts={}}return t.clone=function(e){var r=new t;return e&&(r._breadcrumbs=y.__spread(e._breadcrumbs),r._tags=y.__assign({},e._tags),r._extra=y.__assign({},e._extra),r._contexts=y.__assign({},e._contexts),r._user=e._user,r._level=e._level,r._span=e._span,r._session=e._session,r._transactionName=e._transactionName,r._fingerprint=e._fingerprint,r._eventProcessors=y.__spread(e._eventProcessors),r._requestSession=e._requestSession),r},t.prototype.addScopeListener=function(e){this._scopeListeners.push(e)},t.prototype.addEventProcessor=function(e){return this._eventProcessors.push(e),this},t.prototype.setUser=function(e){return this._user=e||{},this._session&&this._session.update({user:e}),this._notifyScopeListeners(),this},t.prototype.getUser=function(){return this._user},t.prototype.getRequestSession=function(){return this._requestSession},t.prototype.setRequestSession=function(e){return this._requestSession=e,this},t.prototype.setTags=function(e){return this._tags=y.__assign(y.__assign({},this._tags),e),this._notifyScopeListeners(),this},t.prototype.setTag=function(e,r){var n;return this._tags=y.__assign(y.__assign({},this._tags),(n={},n[e]=r,n)),this._notifyScopeListeners(),this},t.prototype.setExtras=function(e){return this._extra=y.__assign(y.__assign({},this._extra),e),this._notifyScopeListeners(),this},t.prototype.setExtra=function(e,r){var n;return this._extra=y.__assign(y.__assign({},this._extra),(n={},n[e]=r,n)),this._notifyScopeListeners(),this},t.prototype.setFingerprint=function(e){return this._fingerprint=e,this._notifyScopeListeners(),this},t.prototype.setLevel=function(e){return this._level=e,this._notifyScopeListeners(),this},t.prototype.setTransactionName=function(e){return this._transactionName=e,this._notifyScopeListeners(),this},t.prototype.setTransaction=function(e){return this.setTransactionName(e)},t.prototype.setContext=function(e,r){var n;return r===null?delete this._contexts[e]:this._contexts=y.__assign(y.__assign({},this._contexts),(n={},n[e]=r,n)),this._notifyScopeListeners(),this},t.prototype.setSpan=function(e){return this._span=e,this._notifyScopeListeners(),this},t.prototype.getSpan=function(){return this._span},t.prototype.getTransaction=function(){var e,r,n,i,s=this.getSpan();if((e=s)===null||e===void 0?void 0:e.transaction)return(r=s)===null||r===void 0?void 0:r.transaction;if((i=(n=s)===null||n===void 0?void 0:n.spanRecorder)===null||i===void 0?void 0:i.spans[0])return s.spanRecorder.spans[0]},t.prototype.setSession=function(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this},t.prototype.getSession=function(){return this._session},t.prototype.update=function(e){if(!e)return this;if(typeof e=="function"){var r=e(this);return r instanceof t?r:this}return e instanceof t?(this._tags=y.__assign(y.__assign({},this._tags),e._tags),this._extra=y.__assign(y.__assign({},this._extra),e._extra),this._contexts=y.__assign(y.__assign({},this._contexts),e._contexts),e._user&&Object.keys(e._user).length&&(this._user=e._user),e._level&&(this._level=e._level),e._fingerprint&&(this._fingerprint=e._fingerprint),e._requestSession&&(this._requestSession=e._requestSession)):St.isPlainObject(e)&&(e=e,this._tags=y.__assign(y.__assign({},this._tags),e.tags),this._extra=y.__assign(y.__assign({},this._extra),e.extra),this._contexts=y.__assign(y.__assign({},this._contexts),e.contexts),e.user&&(this._user=e.user),e.level&&(this._level=e.level),e.fingerprint&&(this._fingerprint=e.fingerprint),e.requestSession&&(this._requestSession=e.requestSession)),this},t.prototype.clear=function(){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},t.prototype.addBreadcrumb=function(e,r){var n=typeof r=="number"?Math.min(r,jo):jo;if(n<=0)return this;var i=y.__assign({timestamp:St.dateTimestampInSeconds()},e);return this._breadcrumbs=y.__spread(this._breadcrumbs,[i]).slice(-n),this._notifyScopeListeners(),this},t.prototype.clearBreadcrumbs=function(){return this._breadcrumbs=[],this._notifyScopeListeners(),this},t.prototype.applyToEvent=function(e,r){var n;if(this._extra&&Object.keys(this._extra).length&&(e.extra=y.__assign(y.__assign({},this._extra),e.extra)),this._tags&&Object.keys(this._tags).length&&(e.tags=y.__assign(y.__assign({},this._tags),e.tags)),this._user&&Object.keys(this._user).length&&(e.user=y.__assign(y.__assign({},this._user),e.user)),this._contexts&&Object.keys(this._contexts).length&&(e.contexts=y.__assign(y.__assign({},this._contexts),e.contexts)),this._level&&(e.level=this._level),this._transactionName&&(e.transaction=this._transactionName),this._span){e.contexts=y.__assign({trace:this._span.getTraceContext()},e.contexts);var i=(n=this._span.transaction)===null||n===void 0?void 0:n.name;i&&(e.tags=y.__assign({transaction:i},e.tags))}return this._applyFingerprint(e),e.breadcrumbs=y.__spread(e.breadcrumbs||[],this._breadcrumbs),e.breadcrumbs=e.breadcrumbs.length>0?e.breadcrumbs:void 0,this._notifyEventProcessors(y.__spread(Fo(),this._eventProcessors),e,r)},t.prototype._notifyEventProcessors=function(e,r,n,i){var s=this;return i===void 0&&(i=0),new St.SyncPromise(function(o,a){var u=e[i];if(r===null||typeof u!="function")o(r);else{var c=u(y.__assign({},r),n);St.isThenable(c)?c.then(function(f){return s._notifyEventProcessors(e,f,n,i+1).then(o)}).then(null,a):s._notifyEventProcessors(e,c,n,i+1).then(o).then(null,a)}})},t.prototype._notifyScopeListeners=function(){var e=this;this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(function(r){r(e)}),this._notifyingListeners=!1)},t.prototype._applyFingerprint=function(e){e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],this._fingerprint&&(e.fingerprint=e.fingerprint.concat(this._fingerprint)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint},t}();hr.Scope=qf;function Fo(){var t=St.getGlobalObject();return t.__SENTRY__=t.__SENTRY__||{},t.__SENTRY__.globalEventProcessors=t.__SENTRY__.globalEventProcessors||[],t.__SENTRY__.globalEventProcessors}function kf(t){Fo().push(t)}hr.addGlobalEventProcessor=kf});var Dn=p(Fn=>{Object.defineProperty(Fn,"__esModule",{value:!0});var jn=D(),et=m(),Pf=function(){function t(e){this.errors=0,this.sid=et.uuid4(),this.duration=0,this.status=jn.SessionStatus.Ok,this.init=!0,this.ignoreDuration=!1;var r=et.timestampInSeconds();this.timestamp=r,this.started=r,e&&this.update(e)}return t.prototype.update=function(e){if(e===void 0&&(e={}),e.user&&(!this.ipAddress&&e.user.ip_address&&(this.ipAddress=e.user.ip_address),!this.did&&!e.did&&(this.did=e.user.id||e.user.email||e.user.username)),this.timestamp=e.timestamp||et.timestampInSeconds(),e.ignoreDuration&&(this.ignoreDuration=e.ignoreDuration),e.sid&&(this.sid=e.sid.length===32?e.sid:et.uuid4()),e.init!==void 0&&(this.init=e.init),!this.did&&e.did&&(this.did=""+e.did),typeof e.started=="number"&&(this.started=e.started),this.ignoreDuration)this.duration=void 0;else if(typeof e.duration=="number")this.duration=e.duration;else{var r=this.timestamp-this.started;this.duration=r>=0?r:0}e.release&&(this.release=e.release),e.environment&&(this.environment=e.environment),!this.ipAddress&&e.ipAddress&&(this.ipAddress=e.ipAddress),!this.userAgent&&e.userAgent&&(this.userAgent=e.userAgent),typeof e.errors=="number"&&(this.errors=e.errors),e.status&&(this.status=e.status)},t.prototype.close=function(e){e?this.update({status:e}):this.status===jn.SessionStatus.Ok?this.update({status:jn.SessionStatus.Exited}):this.update()},t.prototype.toJSON=function(){return et.dropUndefinedKeys({sid:""+this.sid,init:this.init,started:new Date(this.started*1e3).toISOString(),timestamp:new Date(this.timestamp*1e3).toISOString(),status:this.status,errors:this.errors,did:typeof this.did=="number"||typeof this.did=="string"?""+this.did:void 0,duration:this.duration,attrs:et.dropUndefinedKeys({release:this.release,environment:this.environment,ip_address:this.ipAddress,user_agent:this.userAgent})})},t}();Fn.Session=Pf});var Ln=p(W=>{Object.defineProperty(W,"__esModule",{value:!0});var ne=S(),Do=D(),ie=m(),Hn=Nn(),Mf=Dn();W.API_VERSION=4;var Af=100,_r=function(){function t(e,r,n){r===void 0&&(r=new Hn.Scope),n===void 0&&(n=W.API_VERSION),this._version=n,this._stack=[{}],this.getStackTop().scope=r,e&&this.bindClient(e)}return t.prototype.isOlderThan=function(e){return this._version<e},t.prototype.bindClient=function(e){var r=this.getStackTop();r.client=e,e&&e.setupIntegrations&&e.setupIntegrations()},t.prototype.pushScope=function(){var e=Hn.Scope.clone(this.getScope());return this.getStack().push({client:this.getClient(),scope:e}),e},t.prototype.popScope=function(){return this.getStack().length<=1?!1:!!this.getStack().pop()},t.prototype.withScope=function(e){var r=this.pushScope();try{e(r)}finally{this.popScope()}},t.prototype.getClient=function(){return this.getStackTop().client},t.prototype.getScope=function(){return this.getStackTop().scope},t.prototype.getStack=function(){return this._stack},t.prototype.getStackTop=function(){return this._stack[this._stack.length-1]},t.prototype.captureException=function(e,r){var n=this._lastEventId=ie.uuid4(),i=r;if(!r){var s=void 0;try{throw new Error("Sentry syntheticException")}catch(o){s=o}i={originalException:e,syntheticException:s}}return this._invokeClient("captureException",e,ne.__assign(ne.__assign({},i),{event_id:n})),n},t.prototype.captureMessage=function(e,r,n){var i=this._lastEventId=ie.uuid4(),s=n;if(!n){var o=void 0;try{throw new Error(e)}catch(a){o=a}s={originalException:e,syntheticException:o}}return this._invokeClient("captureMessage",e,r,ne.__assign(ne.__assign({},s),{event_id:i})),i},t.prototype.captureEvent=function(e,r){var n=ie.uuid4();return e.type!=="transaction"&&(this._lastEventId=n),this._invokeClient("captureEvent",e,ne.__assign(ne.__assign({},r),{event_id:n})),n},t.prototype.lastEventId=function(){return this._lastEventId},t.prototype.addBreadcrumb=function(e,r){var n=this.getStackTop(),i=n.scope,s=n.client;if(!(!i||!s)){var o=s.getOptions&&s.getOptions()||{},a=o.beforeBreadcrumb,u=a===void 0?null:a,c=o.maxBreadcrumbs,f=c===void 0?Af:c;if(!(f<=0)){var l=ie.dateTimestampInSeconds(),d=ne.__assign({timestamp:l},e),h=u?ie.consoleSandbox(function(){return u(d,r)}):d;h!==null&&i.addBreadcrumb(h,f)}}},t.prototype.setUser=function(e){var r=this.getScope();r&&r.setUser(e)},t.prototype.setTags=function(e){var r=this.getScope();r&&r.setTags(e)},t.prototype.setExtras=function(e){var r=this.getScope();r&&r.setExtras(e)},t.prototype.setTag=function(e,r){var n=this.getScope();n&&n.setTag(e,r)},t.prototype.setExtra=function(e,r){var n=this.getScope();n&&n.setExtra(e,r)},t.prototype.setContext=function(e,r){var n=this.getScope();n&&n.setContext(e,r)},t.prototype.configureScope=function(e){var r=this.getStackTop(),n=r.scope,i=r.client;n&&i&&e(n)},t.prototype.run=function(e){var r=Un(this);try{e(this)}finally{Un(r)}},t.prototype.getIntegration=function(e){var r=this.getClient();if(!r)return null;try{return r.getIntegration(e)}catch{return ie.logger.warn("Cannot retrieve integration "+e.id+" from the current Hub"),null}},t.prototype.startSpan=function(e){return this._callExtensionMethod("startSpan",e)},t.prototype.startTransaction=function(e,r){return this._callExtensionMethod("startTransaction",e,r)},t.prototype.traceHeaders=function(){return this._callExtensionMethod("traceHeaders")},t.prototype.captureSession=function(e){if(e===void 0&&(e=!1),e)return this.endSession();this._sendSessionUpdate()},t.prototype.endSession=function(){var e,r,n,i,s;(n=(r=(e=this.getStackTop())===null||e===void 0?void 0:e.scope)===null||r===void 0?void 0:r.getSession())===null||n===void 0||n.close(),this._sendSessionUpdate(),(s=(i=this.getStackTop())===null||i===void 0?void 0:i.scope)===null||s===void 0||s.setSession()},t.prototype.startSession=function(e){var r=this.getStackTop(),n=r.scope,i=r.client,s=i&&i.getOptions()||{},o=s.release,a=s.environment,u=ie.getGlobalObject(),c=(u.navigator||{}).userAgent,f=new Mf.Session(ne.__assign(ne.__assign(ne.__assign({release:o,environment:a},n&&{user:n.getUser()}),c&&{userAgent:c}),e));if(n){var l=n.getSession&&n.getSession();l&&l.status===Do.SessionStatus.Ok&&l.update({status:Do.SessionStatus.Exited}),this.endSession(),n.setSession(f)}return f},t.prototype._sendSessionUpdate=function(){var e=this.getStackTop(),r=e.scope,n=e.client;if(!!r){var i=r.getSession&&r.getSession();i&&n&&n.captureSession&&n.captureSession(i)}},t.prototype._invokeClient=function(e){for(var r,n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];var s=this.getStackTop(),o=s.scope,a=s.client;a&&a[e]&&(r=a)[e].apply(r,ne.__spread(n,[o]))},t.prototype._callExtensionMethod=function(e){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];var i=tt(),s=i.__SENTRY__;if(s&&s.extensions&&typeof s.extensions[e]=="function")return s.extensions[e].apply(this,r);ie.logger.warn("Extension method "+e+" couldn't be found, doing nothing.")},t}();W.Hub=_r;function tt(){var t=ie.getGlobalObject();return t.__SENTRY__=t.__SENTRY__||{extensions:{},hub:void 0},t}W.getMainCarrier=tt;function Un(t){var e=tt(),r=he(e);return vr(e,t),r}W.makeMain=Un;function Nf(){var t=tt();return(!Ho(t)||he(t).isOlderThan(W.API_VERSION))&&vr(t,new _r),ie.isNodeEnv()?Ff(t):he(t)}W.getCurrentHub=Nf;function jf(){ie.logger.warn("Function `getActiveDomain` is deprecated and will be removed in a future version.");var t=tt().__SENTRY__;return t&&t.extensions&&t.extensions.domain&&t.extensions.domain.active}W.getActiveDomain=jf;function Ff(t){var e,r,n;try{var i=(n=(r=(e=tt().__SENTRY__)===null||e===void 0?void 0:e.extensions)===null||r===void 0?void 0:r.domain)===null||n===void 0?void 0:n.active;if(!i)return he(t);if(!Ho(i)||he(i).isOlderThan(W.API_VERSION)){var s=he(t).getStackTop();vr(i,new _r(s.client,Hn.Scope.clone(s.scope)))}return he(i)}catch{return he(t)}}function Ho(t){return!!(t&&t.__SENTRY__&&t.__SENTRY__.hub)}function he(t){return t&&t.__SENTRY__&&t.__SENTRY__.hub||(t.__SENTRY__=t.__SENTRY__||{},t.__SENTRY__.hub=new _r),t.__SENTRY__.hub}W.getHubFromCarrier=he;function vr(t,e){return t?(t.__SENTRY__=t.__SENTRY__||{},t.__SENTRY__.hub=e,!0):!1}W.setHubOnCarrier=vr});var Uo=p(zn=>{Object.defineProperty(zn,"__esModule",{value:!0});var Bn=D(),Gn=m(),Df=Ln(),Hf=function(){function t(e,r){var n=this;this.flushTimeout=60,this._pendingAggregates={},this._isEnabled=!0,this._transport=e,this._intervalId=setInterval(function(){return n.flush()},this.flushTimeout*1e3),this._sessionAttrs=r}return t.prototype.sendSessionAggregates=function(e){if(!this._transport.sendSession){Gn.logger.warn("Dropping session because custom transport doesn't implement sendSession");return}this._transport.sendSession(e).then(null,function(r){Gn.logger.error("Error while sending session: "+r)})},t.prototype.flush=function(){var e=this.getSessionAggregates();e.aggregates.length!==0&&(this._pendingAggregates={},this.sendSessionAggregates(e))},t.prototype.getSessionAggregates=function(){var e=this,r=Object.keys(this._pendingAggregates).map(function(i){return e._pendingAggregates[parseInt(i)]}),n={attrs:this._sessionAttrs,aggregates:r};return Gn.dropUndefinedKeys(n)},t.prototype.close=function(){clearInterval(this._intervalId),this._isEnabled=!1,this.flush()},t.prototype.incrementSessionStatusCount=function(){var e,r;if(!!this._isEnabled){var n=Df.getCurrentHub().getScope(),i=(e=n)===null||e===void 0?void 0:e.getRequestSession();i&&i.status&&(this._incrementSessionStatusCount(i.status,new Date),(r=n)===null||r===void 0||r.setRequestSession(void 0))}},t.prototype._incrementSessionStatusCount=function(e,r){var n=new Date(r).setSeconds(0,0);this._pendingAggregates[n]=this._pendingAggregates[n]||{};var i=this._pendingAggregates[n];switch(i.started||(i.started=new Date(n).toISOString()),e){case Bn.RequestSessionStatus.Errored:return i.errored=(i.errored||0)+1,i.errored;case Bn.RequestSessionStatus.Ok:return i.exited=(i.exited||0)+1,i.exited;case Bn.RequestSessionStatus.Crashed:return i.crashed=(i.crashed||0)+1,i.crashed}},t}();zn.SessionFlusher=Hf});var V=p(Y=>{Object.defineProperty(Y,"__esModule",{value:!0});var Lo=Nn();Y.addGlobalEventProcessor=Lo.addGlobalEventProcessor;Y.Scope=Lo.Scope;var Uf=Dn();Y.Session=Uf.Session;var Lf=Uo();Y.SessionFlusher=Lf.SessionFlusher;var je=Ln();Y.getActiveDomain=je.getActiveDomain;Y.getCurrentHub=je.getCurrentHub;Y.getHubFromCarrier=je.getHubFromCarrier;Y.getMainCarrier=je.getMainCarrier;Y.Hub=je.Hub;Y.makeMain=je.makeMain;Y.setHubOnCarrier=je.setHubOnCarrier});var Bo=p(H=>{Object.defineProperty(H,"__esModule",{value:!0});var gr=S(),Bf=V();function z(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];var n=Bf.getCurrentHub();if(n&&n[t])return n[t].apply(n,gr.__spread(e));throw new Error("No hub defined or "+t+" was not found on the hub, please open a bug report.")}function Gf(t,e){var r;try{throw new Error("Sentry syntheticException")}catch(n){r=n}return z("captureException",t,{captureContext:e,originalException:t,syntheticException:r})}H.captureException=Gf;function zf(t,e){var r;try{throw new Error(t)}catch(s){r=s}var n=typeof e=="string"?e:void 0,i=typeof e!="string"?{captureContext:e}:void 0;return z("captureMessage",t,n,gr.__assign({originalException:t,syntheticException:r},i))}H.captureMessage=zf;function Wf(t){return z("captureEvent",t)}H.captureEvent=Wf;function Yf(t){z("configureScope",t)}H.configureScope=Yf;function Vf(t){z("addBreadcrumb",t)}H.addBreadcrumb=Vf;function Kf(t,e){z("setContext",t,e)}H.setContext=Kf;function $f(t){z("setExtras",t)}H.setExtras=$f;function Jf(t){z("setTags",t)}H.setTags=Jf;function Xf(t,e){z("setExtra",t,e)}H.setExtra=Xf;function Zf(t,e){z("setTag",t,e)}H.setTag=Zf;function Qf(t){z("setUser",t)}H.setUser=Qf;function ed(t){z("withScope",t)}H.withScope=ed;function td(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];z.apply(void 0,gr.__spread(["_invokeClient",t],e))}H._callOnClient=td;function rd(t,e){return z("startTransaction",gr.__assign({},t),e)}H.startTransaction=rd});var Wo=p(Wn=>{Object.defineProperty(Wn,"__esModule",{value:!0});var Go=m(),zo="7",nd=function(){function t(e,r,n){r===void 0&&(r={}),this.dsn=e,this._dsnObject=new Go.Dsn(e),this.metadata=r,this._tunnel=n}return t.prototype.getDsn=function(){return this._dsnObject},t.prototype.forceEnvelope=function(){return!!this._tunnel},t.prototype.getBaseApiEndpoint=function(){var e=this.getDsn(),r=e.protocol?e.protocol+":":"",n=e.port?":"+e.port:"";return r+"//"+e.host+n+(e.path?"/"+e.path:"")+"/api/"},t.prototype.getStoreEndpoint=function(){return this._getIngestEndpoint("store")},t.prototype.getStoreEndpointWithUrlEncodedAuth=function(){return this.getStoreEndpoint()+"?"+this._encodedAuth()},t.prototype.getEnvelopeEndpointWithUrlEncodedAuth=function(){return this.forceEnvelope()?this._tunnel:this._getEnvelopeEndpoint()+"?"+this._encodedAuth()},t.prototype.getStoreEndpointPath=function(){var e=this.getDsn();return(e.path?"/"+e.path:"")+"/api/"+e.projectId+"/store/"},t.prototype.getRequestHeaders=function(e,r){var n=this.getDsn(),i=["Sentry sentry_version="+zo];return i.push("sentry_client="+e+"/"+r),i.push("sentry_key="+n.publicKey),n.pass&&i.push("sentry_secret="+n.pass),{"Content-Type":"application/json","X-Sentry-Auth":i.join(", ")}},t.prototype.getReportDialogEndpoint=function(e){e===void 0&&(e={});var r=this.getDsn(),n=this.getBaseApiEndpoint()+"embed/error-page/",i=[];i.push("dsn="+r.toString());for(var s in e)if(s!=="dsn")if(s==="user"){if(!e.user)continue;e.user.name&&i.push("name="+encodeURIComponent(e.user.name)),e.user.email&&i.push("email="+encodeURIComponent(e.user.email))}else i.push(encodeURIComponent(s)+"="+encodeURIComponent(e[s]));return i.length?n+"?"+i.join("&"):n},t.prototype._getEnvelopeEndpoint=function(){return this._getIngestEndpoint("envelope")},t.prototype._getIngestEndpoint=function(e){if(this._tunnel)return this._tunnel;var r=this.getBaseApiEndpoint(),n=this.getDsn();return""+r+n.projectId+"/"+e+"/"},t.prototype._encodedAuth=function(){var e=this.getDsn(),r={sentry_key:e.publicKey,sentry_version:zo};return Go.urlEncode(r)},t}();Wn.API=nd});var Jo=p(Ee=>{Object.defineProperty(Ee,"__esModule",{value:!0});var mr=S(),Yo=V(),id=m();Ee.installedIntegrations=[];function Vo(t){return t.reduce(function(e,r){return e.every(function(n){return r.name!==n.name})&&e.push(r),e},[])}function Ko(t){var e=t.defaultIntegrations&&mr.__spread(t.defaultIntegrations)||[],r=t.integrations,n=mr.__spread(Vo(e));Array.isArray(r)?n=mr.__spread(n.filter(function(o){return r.every(function(a){return a.name!==o.name})}),Vo(r)):typeof r=="function"&&(n=r(n),n=Array.isArray(n)?n:[n]);var i=n.map(function(o){return o.name}),s="Debug";return i.indexOf(s)!==-1&&n.push.apply(n,mr.__spread(n.splice(i.indexOf(s),1))),n}Ee.getIntegrationsToSetup=Ko;function $o(t){Ee.installedIntegrations.indexOf(t.name)===-1&&(t.setupOnce(Yo.addGlobalEventProcessor,Yo.getCurrentHub),Ee.installedIntegrations.push(t.name),id.logger.log("Integration installed: "+t.name))}Ee.setupIntegration=$o;function sd(t){var e={};return Ko(t).forEach(function(r){e[r.name]=r,$o(r)}),Object.defineProperty(e,"initialized",{value:!0}),e}Ee.setupIntegrations=sd});var Zo=p(Yn=>{Object.defineProperty(Yn,"__esModule",{value:!0});var K=S(),od=V(),Et=D(),T=m(),ad=Jo(),Xo="Not capturing exception because it's already been captured.",ud=function(){function t(e,r){this._integrations={},this._numProcessing=0,this._backend=new e(r),this._options=r,r.dsn&&(this._dsn=new T.Dsn(r.dsn))}return t.prototype.captureException=function(e,r,n){var i=this;if(T.checkOrSetAlreadyCaught(e)){T.logger.log(Xo);return}var s=r&&r.event_id;return this._process(this._getBackend().eventFromException(e,r).then(function(o){return i._captureEvent(o,r,n)}).then(function(o){s=o})),s},t.prototype.captureMessage=function(e,r,n,i){var s=this,o=n&&n.event_id,a=T.isPrimitive(e)?this._getBackend().eventFromMessage(String(e),r,n):this._getBackend().eventFromException(e,n);return this._process(a.then(function(u){return s._captureEvent(u,n,i)}).then(function(u){o=u})),o},t.prototype.captureEvent=function(e,r,n){var i;if(((i=r)===null||i===void 0?void 0:i.originalException)&&T.checkOrSetAlreadyCaught(r.originalException)){T.logger.log(Xo);return}var s=r&&r.event_id;return this._process(this._captureEvent(e,r,n).then(function(o){s=o})),s},t.prototype.captureSession=function(e){if(!this._isEnabled()){T.logger.warn("SDK not enabled, will not capture session.");return}typeof e.release!="string"?T.logger.warn("Discarded session because of missing or non-string release"):(this._sendSession(e),e.update({init:!1}))},t.prototype.getDsn=function(){return this._dsn},t.prototype.getOptions=function(){return this._options},t.prototype.getTransport=function(){return this._getBackend().getTransport()},t.prototype.flush=function(e){var r=this;return this._isClientDoneProcessing(e).then(function(n){return r.getTransport().close(e).then(function(i){return n&&i})})},t.prototype.close=function(e){var r=this;return this.flush(e).then(function(n){return r.getOptions().enabled=!1,n})},t.prototype.setupIntegrations=function(){this._isEnabled()&&!this._integrations.initialized&&(this._integrations=ad.setupIntegrations(this._options))},t.prototype.getIntegration=function(e){try{return this._integrations[e.id]||null}catch{return T.logger.warn("Cannot retrieve integration "+e.id+" from the current Client"),null}},t.prototype._updateSessionFromEvent=function(e,r){var n,i,s=!1,o=!1,a=r.exception&&r.exception.values;if(a){o=!0;try{for(var u=K.__values(a),c=u.next();!c.done;c=u.next()){var f=c.value,l=f.mechanism;if(l&&l.handled===!1){s=!0;break}}}catch(_){n={error:_}}finally{try{c&&!c.done&&(i=u.return)&&i.call(u)}finally{if(n)throw n.error}}}var d=e.status===Et.SessionStatus.Ok,h=d&&e.errors===0||d&&s;h&&(e.update(K.__assign(K.__assign({},s&&{status:Et.SessionStatus.Crashed}),{errors:e.errors||Number(o||s)})),this.captureSession(e))},t.prototype._sendSession=function(e){this._getBackend().sendSession(e)},t.prototype._isClientDoneProcessing=function(e){var r=this;return new T.SyncPromise(function(n){var i=0,s=1,o=setInterval(function(){r._numProcessing==0?(clearInterval(o),n(!0)):(i+=s,e&&i>=e&&(clearInterval(o),n(!1)))},s)})},t.prototype._getBackend=function(){return this._backend},t.prototype._isEnabled=function(){return this.getOptions().enabled!==!1&&this._dsn!==void 0},t.prototype._prepareEvent=function(e,r,n){var i=this,s=this.getOptions().normalizeDepth,o=s===void 0?3:s,a=K.__assign(K.__assign({},e),{event_id:e.event_id||(n&&n.event_id?n.event_id:T.uuid4()),timestamp:e.timestamp||T.dateTimestampInSeconds()});this._applyClientOptions(a),this._applyIntegrationsMetadata(a);var u=r;n&&n.captureContext&&(u=od.Scope.clone(u).update(n.captureContext));var c=T.SyncPromise.resolve(a);return u&&(c=u.applyToEvent(a,n)),c.then(function(f){return typeof o=="number"&&o>0?i._normalizeEvent(f,o):f})},t.prototype._normalizeEvent=function(e,r){if(!e)return null;var n=K.__assign(K.__assign(K.__assign(K.__assign(K.__assign({},e),e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(function(o){return K.__assign(K.__assign({},o),o.data&&{data:T.normalize(o.data,r)})})}),e.user&&{user:T.normalize(e.user,r)}),e.contexts&&{contexts:T.normalize(e.contexts,r)}),e.extra&&{extra:T.normalize(e.extra,r)});e.contexts&&e.contexts.trace&&(n.contexts.trace=e.contexts.trace);var i=this.getOptions()._experiments,s=i===void 0?{}:i;return s.ensureNoCircularStructures?T.normalize(n):n},t.prototype._applyClientOptions=function(e){var r=this.getOptions(),n=r.environment,i=r.release,s=r.dist,o=r.maxValueLength,a=o===void 0?250:o;"environment"in e||(e.environment="environment"in r?n:"production"),e.release===void 0&&i!==void 0&&(e.release=i),e.dist===void 0&&s!==void 0&&(e.dist=s),e.message&&(e.message=T.truncate(e.message,a));var u=e.exception&&e.exception.values&&e.exception.values[0];u&&u.value&&(u.value=T.truncate(u.value,a));var c=e.request;c&&c.url&&(c.url=T.truncate(c.url,a))},t.prototype._applyIntegrationsMetadata=function(e){var r=Object.keys(this._integrations);r.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=K.__spread(e.sdk.integrations||[],r))},t.prototype._sendEvent=function(e){this._getBackend().sendEvent(e)},t.prototype._captureEvent=function(e,r,n){return this._processEvent(e,r,n).then(function(i){return i.event_id},function(i){T.logger.error(i)})},t.prototype._processEvent=function(e,r,n){var i=this,s,o,a=this.getOptions(),u=a.beforeSend,c=a.sampleRate,f=this.getTransport();if(!this._isEnabled())return T.SyncPromise.reject(new T.SentryError("SDK not enabled, will not capture event."));var l=e.type==="transaction";return!l&&typeof c=="number"&&Math.random()>c?((o=(s=f).recordLostEvent)===null||o===void 0||o.call(s,Et.Outcome.SampleRate,"event"),T.SyncPromise.reject(new T.SentryError("Discarding event because it's not included in the random sample (sampling rate = "+c+")"))):this._prepareEvent(e,n,r).then(function(d){var h,_;if(d===null)throw(_=(h=f).recordLostEvent)===null||_===void 0||_.call(h,Et.Outcome.EventProcessor,e.type||"event"),new T.SentryError("An event processor returned null, will not send event.");var v=r&&r.data&&r.data.__sentry__===!0;if(v||l||!u)return d;var g=u(d,r);return i._ensureBeforeSendRv(g)}).then(function(d){var h,_;if(d===null)throw(_=(h=f).recordLostEvent)===null||_===void 0||_.call(h,Et.Outcome.BeforeSend,e.type||"event"),new T.SentryError("`beforeSend` returned `null`, will not send event.");var v=n&&n.getSession&&n.getSession();return!l&&v&&i._updateSessionFromEvent(v,d),i._sendEvent(d),d}).then(null,function(d){throw d instanceof T.SentryError?d:(i.captureException(d,{data:{__sentry__:!0},originalException:d}),new T.SentryError(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
11
- Reason: `+d))})},t.prototype._process=function(e){var r=this;this._numProcessing+=1,e.then(function(n){return r._numProcessing-=1,n},function(n){return r._numProcessing-=1,n})},t.prototype._ensureBeforeSendRv=function(e){var r="`beforeSend` method has to return `null` or a valid event.";if(T.isThenable(e))return e.then(function(n){if(!(T.isPlainObject(n)||n===null))throw new T.SentryError(r);return n},function(n){throw new T.SentryError("beforeSend rejected with "+n)});if(!(T.isPlainObject(e)||e===null))throw new T.SentryError(r);return e},t}();Yn.BaseClient=ud});var Kn=p(Vn=>{Object.defineProperty(Vn,"__esModule",{value:!0});var cd=D(),Qo=m(),ld=function(){function t(){}return t.prototype.sendEvent=function(e){return Qo.SyncPromise.resolve({reason:"NoopTransport: Event has been skipped because no Dsn is configured.",status:cd.Status.Skipped})},t.prototype.close=function(e){return Qo.SyncPromise.resolve(!0)},t}();Vn.NoopTransport=ld});var ea=p($n=>{Object.defineProperty($n,"__esModule",{value:!0});var rt=m(),fd=Kn(),dd=function(){function t(e){this._options=e,this._options.dsn||rt.logger.warn("No DSN provided, backend will not do anything."),this._transport=this._setupTransport()}return t.prototype.eventFromException=function(e,r){throw new rt.SentryError("Backend has to implement `eventFromException` method")},t.prototype.eventFromMessage=function(e,r,n){throw new rt.SentryError("Backend has to implement `eventFromMessage` method")},t.prototype.sendEvent=function(e){this._transport.sendEvent(e).then(null,function(r){rt.logger.error("Error while sending event: "+r)})},t.prototype.sendSession=function(e){if(!this._transport.sendSession){rt.logger.warn("Dropping session because custom transport doesn't implement sendSession");return}this._transport.sendSession(e).then(null,function(r){rt.logger.error("Error while sending session: "+r)})},t.prototype.getTransport=function(){return this._transport},t.prototype._setupTransport=function(){return new fd.NoopTransport},t}();$n.BaseBackend=dd});var ra=p(yr=>{Object.defineProperty(yr,"__esModule",{value:!0});var Fe=S();function ta(t){if(!(!t.metadata||!t.metadata.sdk)){var e=t.metadata.sdk,r=e.name,n=e.version;return{name:r,version:n}}}function pd(t,e){return e&&(t.sdk=t.sdk||{},t.sdk.name=t.sdk.name||e.name,t.sdk.version=t.sdk.version||e.version,t.sdk.integrations=Fe.__spread(t.sdk.integrations||[],e.integrations||[]),t.sdk.packages=Fe.__spread(t.sdk.packages||[],e.packages||[])),t}function hd(t,e){var r=ta(e),n=JSON.stringify(Fe.__assign(Fe.__assign({sent_at:new Date().toISOString()},r&&{sdk:r}),e.forceEnvelope()&&{dsn:e.getDsn().toString()})),i="aggregates"in t?"sessions":"session",s=JSON.stringify({type:i});return{body:n+`
10
+ Error: `+a)}}}catch(a){r={error:a}}finally{try{s&&!s.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}}function Kl(){"console"in x&&["debug","info","warn","error","log","assert"].forEach(function(t){t in x.console&&de.fill(x.console,t,function(e){return function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];re("console",{args:r,level:t}),e&&Function.prototype.apply.call(e,x.console,r)}})})}function $l(){!mo.supportsNativeFetch()||de.fill(x,"fetch",function(t){return function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var n={args:e,fetchData:{method:Jl(e),url:Xl(e)},startTimestamp:Date.now()};return re("fetch",Qe.__assign({},n)),t.apply(x,e).then(function(i){return re("fetch",Qe.__assign(Qe.__assign({},n),{endTimestamp:Date.now(),response:i})),i},function(i){throw re("fetch",Qe.__assign(Qe.__assign({},n),{endTimestamp:Date.now(),error:i})),i})}})}function Jl(t){return t===void 0&&(t=[]),"Request"in x&&lr.isInstanceOf(t[0],Request)&&t[0].method?String(t[0].method).toUpperCase():t[1]&&t[1].method?String(t[1].method).toUpperCase():"GET"}function Xl(t){return t===void 0&&(t=[]),typeof t[0]=="string"?t[0]:"Request"in x&&lr.isInstanceOf(t[0],Request)?t[0].url:String(t[0])}function Zl(){if("XMLHttpRequest"in x){var t=[],e=[],r=XMLHttpRequest.prototype;de.fill(r,"open",function(n){return function(){for(var i=[],s=0;s<arguments.length;s++)i[s]=arguments[s];var o=this,a=i[1];o.__sentry_xhr__={method:lr.isString(i[0])?i[0].toUpperCase():i[0],url:i[1]},lr.isString(a)&&o.__sentry_xhr__.method==="POST"&&a.match(/sentry_key/)&&(o.__sentry_own_request__=!0);var u=function(){if(o.readyState===4){try{o.__sentry_xhr__&&(o.__sentry_xhr__.status_code=o.status)}catch{}try{var c=t.indexOf(o);if(c!==-1){t.splice(c);var f=e.splice(c)[0];o.__sentry_xhr__&&f[0]!==void 0&&(o.__sentry_xhr__.body=f[0])}}catch{}re("xhr",{args:i,endTimestamp:Date.now(),startTimestamp:Date.now(),xhr:o})}};return"onreadystatechange"in o&&typeof o.onreadystatechange=="function"?de.fill(o,"onreadystatechange",function(c){return function(){for(var f=[],l=0;l<arguments.length;l++)f[l]=arguments[l];return u(),c.apply(o,f)}}):o.addEventListener("readystatechange",u),n.apply(o,i)}}),de.fill(r,"send",function(n){return function(){for(var i=[],s=0;s<arguments.length;s++)i[s]=arguments[s];return t.push(this),e.push(i),re("xhr",{args:i,startTimestamp:Date.now(),xhr:this}),n.apply(this,i)}})}}var fr;function Ql(){if(!mo.supportsHistory())return;var t=x.onpopstate;x.onpopstate=function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];var i=x.location.href,s=fr;if(fr=i,re("history",{from:s,to:i}),t)try{return t.apply(this,r)}catch{}};function e(r){return function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];var s=n.length>2?n[2]:void 0;if(s){var o=fr,a=String(s);fr=a,re("history",{from:o,to:a})}return r.apply(this,n)}}de.fill(x.history,"pushState",e),de.fill(x.history,"replaceState",e)}var ef=1e3,dr,pr;function tf(t,e){if(!t||t.type!==e.type)return!0;try{if(t.target!==e.target)return!0}catch{}return!1}function rf(t){if(t.type!=="keypress")return!1;try{var e=t.target;if(!e||!e.tagName)return!0;if(e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable)return!1}catch{}return!0}function bo(t,e){return e===void 0&&(e=!1),function(r){if(!(!r||pr===r)&&!rf(r)){var n=r.type==="keypress"?"input":r.type;dr===void 0?(t({event:r,name:n,global:e}),pr=r):tf(pr,r)&&(t({event:r,name:n,global:e}),pr=r),clearTimeout(dr),dr=x.setTimeout(function(){dr=void 0},ef)}}}function nf(){if("document"in x){var t=re.bind(null,"dom"),e=bo(t,!0);x.document.addEventListener("click",e,!1),x.document.addEventListener("keypress",e,!1),["EventTarget","Node"].forEach(function(r){var n=x[r]&&x[r].prototype;!n||!n.hasOwnProperty||!n.hasOwnProperty("addEventListener")||(de.fill(n,"addEventListener",function(i){return function(s,o,a){if(s==="click"||s=="keypress")try{var u=this,c=u.__sentry_instrumentation_handlers__=u.__sentry_instrumentation_handlers__||{},f=c[s]=c[s]||{refCount:0};if(!f.handler){var l=bo(t);f.handler=l,i.call(this,s,l,a)}f.refCount+=1}catch{}return i.call(this,s,o,a)}}),de.fill(n,"removeEventListener",function(i){return function(s,o,a){if(s==="click"||s=="keypress")try{var u=this,c=u.__sentry_instrumentation_handlers__||{},f=c[s];f&&(f.refCount-=1,f.refCount<=0&&(i.call(this,s,f.handler,a),f.handler=void 0,delete c[s]),Object.keys(c).length===0&&delete u.__sentry_instrumentation_handlers__)}catch{}return i.call(this,s,o,a)}}))})}}var wn=null;function sf(){wn=x.onerror,x.onerror=function(t,e,r,n,i){return re("error",{column:n,error:i,line:r,msg:t,url:e}),wn?wn.apply(this,arguments):!1}}var xn=null;function of(){xn=x.onunhandledrejection,x.onunhandledrejection=function(t){return re("unhandledrejection",t),xn?xn.apply(this,arguments):!0}}});var To=p(X=>{Object.defineProperty(X,"__esModule",{value:!0});var St=S(),af=Se(),In=ur();function uf(){var t=af.getGlobalObject(),e=t.crypto||t.msCrypto;if(e!==void 0&&e.getRandomValues){var r=new Uint16Array(8);e.getRandomValues(r),r[3]=r[3]&4095|16384,r[4]=r[4]&16383|32768;var n=function(i){for(var s=i.toString(16);s.length<4;)s="0"+s;return s};return n(r[0])+n(r[1])+n(r[2])+n(r[3])+n(r[4])+n(r[5])+n(r[6])+n(r[7])}return"xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx".replace(/[xy]/g,function(i){var s=Math.random()*16|0,o=i==="x"?s:s&3|8;return o.toString(16)})}X.uuid4=uf;function cf(t){if(!t)return{};var e=t.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!e)return{};var r=e[6]||"",n=e[8]||"";return{host:e[4],path:e[5],protocol:e[2],relative:e[5]+r+n}}X.parseUrl=cf;function lf(t){if(t.message)return t.message;if(t.exception&&t.exception.values&&t.exception.values[0]){var e=t.exception.values[0];return e.type&&e.value?e.type+": "+e.value:e.type||e.value||t.event_id||"<unknown>"}return t.event_id||"<unknown>"}X.getEventDescription=lf;function ff(t,e,r){t.exception=t.exception||{},t.exception.values=t.exception.values||[],t.exception.values[0]=t.exception.values[0]||{},t.exception.values[0].value=t.exception.values[0].value||e||"",t.exception.values[0].type=t.exception.values[0].type||r||"Error"}X.addExceptionTypeValue=ff;function df(t,e){var r;if(!(!t.exception||!t.exception.values)){var n=t.exception.values[0],i={type:"generic",handled:!0},s=n.mechanism;if(n.mechanism=St.__assign(St.__assign(St.__assign({},i),s),e),e&&"data"in e){var o=St.__assign(St.__assign({},(r=s)===null||r===void 0?void 0:r.data),e.data);n.mechanism.data=o}}}X.addExceptionMechanism=df;var pf=/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/;function hf(t){var e=t.match(pf)||[],r=parseInt(e[1],10),n=parseInt(e[2],10),i=parseInt(e[3],10);return{buildmetadata:e[5],major:isNaN(r)?void 0:r,minor:isNaN(n)?void 0:n,patch:isNaN(i)?void 0:i,prerelease:e[4]}}X.parseSemver=hf;var Eo=60*1e3;function _f(t,e){if(!e)return Eo;var r=parseInt(""+e,10);if(!isNaN(r))return r*1e3;var n=Date.parse(""+e);return isNaN(n)?Eo:n-t}X.parseRetryAfterHeader=_f;function vf(t,e,r){r===void 0&&(r=5);var n=e.lineno||0,i=t.length,s=Math.max(Math.min(i,n-1),0);e.pre_context=t.slice(Math.max(0,s-r),s).map(function(o){return In.snipLine(o,0)}),e.context_line=In.snipLine(t[Math.min(i-1,s)],e.colno||0),e.post_context=t.slice(Math.min(s+1,i),s+1+r).map(function(o){return In.snipLine(o,0)})}X.addContextToFrame=vf;function gf(t){return t.split(/[\?#]/,1)[0]}X.stripUrlQueryAndFragment=gf;function mf(t){var e;if((e=t)===null||e===void 0?void 0:e.__sentry_captured__)return!0;try{Object.defineProperty(t,"__sentry_captured__",{value:!0})}catch{}return!1}X.checkOrSetAlreadyCaught=mf});var Ro=p(pe=>{Object.defineProperty(pe,"__esModule",{value:!0});function Oo(t,e){for(var r=0,n=t.length-1;n>=0;n--){var i=t[n];i==="."?t.splice(n,1):i===".."?(t.splice(n,1),r++):r&&(t.splice(n,1),r--)}if(e)for(;r--;r)t.unshift("..");return t}var yf=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^/]+?|)(\.[^./]*|))(?:[/]*)$/;function wo(t){var e=yf.exec(t);return e?e.slice(1):[]}function Rn(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var r="",n=!1,i=t.length-1;i>=-1&&!n;i--){var s=i>=0?t[i]:"/";!s||(r=s+"/"+r,n=s.charAt(0)==="/")}return r=Oo(r.split("/").filter(function(o){return!!o}),!n).join("/"),(n?"/":"")+r||"."}pe.resolve=Rn;function xo(t){for(var e=0;e<t.length&&t[e]==="";e++);for(var r=t.length-1;r>=0&&t[r]==="";r--);return e>r?[]:t.slice(e,r-e+1)}function bf(t,e){t=Rn(t).substr(1),e=Rn(e).substr(1);for(var r=xo(t.split("/")),n=xo(e.split("/")),i=Math.min(r.length,n.length),s=i,o=0;o<i;o++)if(r[o]!==n[o]){s=o;break}for(var a=[],o=s;o<r.length;o++)a.push("..");return a=a.concat(n.slice(s)),a.join("/")}pe.relative=bf;function Co(t){var e=Io(t),r=t.substr(-1)==="/",n=Oo(t.split("/").filter(function(i){return!!i}),!e).join("/");return!n&&!e&&(n="."),n&&r&&(n+="/"),(e?"/":"")+n}pe.normalizePath=Co;function Io(t){return t.charAt(0)==="/"}pe.isAbsolute=Io;function Sf(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return Co(t.join("/"))}pe.join=Sf;function Ef(t){var e=wo(t),r=e[0],n=e[1];return!r&&!n?".":(n&&(n=n.substr(0,n.length-1)),r+n)}pe.dirname=Ef;function Tf(t,e){var r=wo(t)[2];return e&&r.substr(e.length*-1)===e&&(r=r.substr(0,r.length-e.length)),r}pe.basename=Tf});var kn=p(qn=>{Object.defineProperty(qn,"__esModule",{value:!0});var Of=Me(),wf=function(){function t(e){var r=this;this._state="PENDING",this._handlers=[],this._resolve=function(n){r._setResult("RESOLVED",n)},this._reject=function(n){r._setResult("REJECTED",n)},this._setResult=function(n,i){if(r._state==="PENDING"){if(Of.isThenable(i)){i.then(r._resolve,r._reject);return}r._state=n,r._value=i,r._executeHandlers()}},this._attachHandler=function(n){r._handlers=r._handlers.concat(n),r._executeHandlers()},this._executeHandlers=function(){if(r._state!=="PENDING"){var n=r._handlers.slice();r._handlers=[],n.forEach(function(i){i.done||(r._state==="RESOLVED"&&i.onfulfilled&&i.onfulfilled(r._value),r._state==="REJECTED"&&i.onrejected&&i.onrejected(r._value),i.done=!0)})}};try{e(this._resolve,this._reject)}catch(n){this._reject(n)}}return t.resolve=function(e){return new t(function(r){r(e)})},t.reject=function(e){return new t(function(r,n){n(e)})},t.all=function(e){return new t(function(r,n){if(!Array.isArray(e)){n(new TypeError("Promise.all requires an array as input."));return}if(e.length===0){r([]);return}var i=e.length,s=[];e.forEach(function(o,a){t.resolve(o).then(function(u){s[a]=u,i-=1,i===0&&r(s)}).then(null,n)})})},t.prototype.then=function(e,r){var n=this;return new t(function(i,s){n._attachHandler({done:!1,onfulfilled:function(o){if(!e){i(o);return}try{i(e(o));return}catch(a){s(a);return}},onrejected:function(o){if(!r){s(o);return}try{i(r(o));return}catch(a){s(a);return}}})})},t.prototype.catch=function(e){return this.then(function(r){return r},e)},t.prototype.finally=function(e){var r=this;return new t(function(n,i){var s,o;return r.then(function(a){o=!1,s=a,e&&e()},function(a){o=!0,s=a,e&&e()}).then(function(){if(o){i(s);return}n(s)})})},t.prototype.toString=function(){return"[object SyncPromise]"},t}();qn.SyncPromise=wf});var qo=p(Mn=>{Object.defineProperty(Mn,"__esModule",{value:!0});var xf=nr(),Pn=kn(),Cf=function(){function t(e){this._limit=e,this._buffer=[]}return t.prototype.isReady=function(){return this._limit===void 0||this.length()<this._limit},t.prototype.add=function(e){var r=this;if(!this.isReady())return Pn.SyncPromise.reject(new xf.SentryError("Not adding Promise due to buffer limit reached."));var n=e();return this._buffer.indexOf(n)===-1&&this._buffer.push(n),n.then(function(){return r.remove(n)}).then(null,function(){return r.remove(n).then(null,function(){})}),n},t.prototype.remove=function(e){var r=this._buffer.splice(this._buffer.indexOf(e),1)[0];return r},t.prototype.length=function(){return this._buffer.length},t.prototype.drain=function(e){var r=this;return new Pn.SyncPromise(function(n){var i=setTimeout(function(){e&&e>0&&n(!1)},e);Pn.SyncPromise.all(r._buffer).then(function(){clearTimeout(i),n(!0)}).then(null,function(){n(!0)})})},t}();Mn.PromiseBuffer=Cf});var No=p((Z,Ao)=>{Object.defineProperty(Z,"__esModule",{value:!0});var ko=Se(),Po=er(),An={nowSeconds:function(){return Date.now()/1e3}};function If(){var t=ko.getGlobalObject().performance;if(!(!t||!t.now)){var e=Date.now()-t.now();return{now:function(){return t.now()},timeOrigin:e}}}function Rf(){try{var t=Po.dynamicRequire(Ao,"perf_hooks");return t.performance}catch{return}}var hr=Po.isNodeEnv()?Rf():If(),Mo=hr===void 0?An:{nowSeconds:function(){return(hr.timeOrigin+hr.now())/1e3}};Z.dateTimestampInSeconds=An.nowSeconds.bind(An);Z.timestampInSeconds=Mo.nowSeconds.bind(Mo);Z.timestampWithMs=Z.timestampInSeconds;Z.usingPerformanceAPI=hr!==void 0;Z.browserPerformanceTimeOrigin=function(){var t=ko.getGlobalObject().performance;if(!t||!t.now){Z._browserPerformanceTimeOriginMode="none";return}var e=3600*1e3,r=t.now(),n=Date.now(),i=t.timeOrigin?Math.abs(t.timeOrigin+r-n):e,s=i<e,o=t.timing&&t.timing.navigationStart,a=typeof o=="number",u=a?Math.abs(o+r-n):e,c=u<e;return s||c?i<=u?(Z._browserPerformanceTimeOriginMode="timeOrigin",t.timeOrigin):(Z._browserPerformanceTimeOriginMode="navigationStart",o):(Z._browserPerformanceTimeOriginMode="dateNow",n)}()});var m=p(R=>{Object.defineProperty(R,"__esModule",{value:!0});var k=S();k.__exportStar(io(),R);k.__exportStar(ln(),R);k.__exportStar(ao(),R);k.__exportStar(nr(),R);k.__exportStar(Se(),R);k.__exportStar(So(),R);k.__exportStar(Me(),R);k.__exportStar(or(),R);k.__exportStar(vn(),R);k.__exportStar(To(),R);k.__exportStar(er(),R);k.__exportStar(Sn(),R);k.__exportStar(Ro(),R);k.__exportStar(qo(),R);k.__exportStar(ar(),R);k.__exportStar(ur(),R);k.__exportStar(On(),R);k.__exportStar(kn(),R);k.__exportStar(No(),R)});var Nn=p(_r=>{Object.defineProperty(_r,"__esModule",{value:!0});var y=S(),Et=m(),jo=100,qf=function(){function t(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._user={},this._tags={},this._extra={},this._contexts={}}return t.clone=function(e){var r=new t;return e&&(r._breadcrumbs=y.__spread(e._breadcrumbs),r._tags=y.__assign({},e._tags),r._extra=y.__assign({},e._extra),r._contexts=y.__assign({},e._contexts),r._user=e._user,r._level=e._level,r._span=e._span,r._session=e._session,r._transactionName=e._transactionName,r._fingerprint=e._fingerprint,r._eventProcessors=y.__spread(e._eventProcessors),r._requestSession=e._requestSession),r},t.prototype.addScopeListener=function(e){this._scopeListeners.push(e)},t.prototype.addEventProcessor=function(e){return this._eventProcessors.push(e),this},t.prototype.setUser=function(e){return this._user=e||{},this._session&&this._session.update({user:e}),this._notifyScopeListeners(),this},t.prototype.getUser=function(){return this._user},t.prototype.getRequestSession=function(){return this._requestSession},t.prototype.setRequestSession=function(e){return this._requestSession=e,this},t.prototype.setTags=function(e){return this._tags=y.__assign(y.__assign({},this._tags),e),this._notifyScopeListeners(),this},t.prototype.setTag=function(e,r){var n;return this._tags=y.__assign(y.__assign({},this._tags),(n={},n[e]=r,n)),this._notifyScopeListeners(),this},t.prototype.setExtras=function(e){return this._extra=y.__assign(y.__assign({},this._extra),e),this._notifyScopeListeners(),this},t.prototype.setExtra=function(e,r){var n;return this._extra=y.__assign(y.__assign({},this._extra),(n={},n[e]=r,n)),this._notifyScopeListeners(),this},t.prototype.setFingerprint=function(e){return this._fingerprint=e,this._notifyScopeListeners(),this},t.prototype.setLevel=function(e){return this._level=e,this._notifyScopeListeners(),this},t.prototype.setTransactionName=function(e){return this._transactionName=e,this._notifyScopeListeners(),this},t.prototype.setTransaction=function(e){return this.setTransactionName(e)},t.prototype.setContext=function(e,r){var n;return r===null?delete this._contexts[e]:this._contexts=y.__assign(y.__assign({},this._contexts),(n={},n[e]=r,n)),this._notifyScopeListeners(),this},t.prototype.setSpan=function(e){return this._span=e,this._notifyScopeListeners(),this},t.prototype.getSpan=function(){return this._span},t.prototype.getTransaction=function(){var e,r,n,i,s=this.getSpan();if((e=s)===null||e===void 0?void 0:e.transaction)return(r=s)===null||r===void 0?void 0:r.transaction;if((i=(n=s)===null||n===void 0?void 0:n.spanRecorder)===null||i===void 0?void 0:i.spans[0])return s.spanRecorder.spans[0]},t.prototype.setSession=function(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this},t.prototype.getSession=function(){return this._session},t.prototype.update=function(e){if(!e)return this;if(typeof e=="function"){var r=e(this);return r instanceof t?r:this}return e instanceof t?(this._tags=y.__assign(y.__assign({},this._tags),e._tags),this._extra=y.__assign(y.__assign({},this._extra),e._extra),this._contexts=y.__assign(y.__assign({},this._contexts),e._contexts),e._user&&Object.keys(e._user).length&&(this._user=e._user),e._level&&(this._level=e._level),e._fingerprint&&(this._fingerprint=e._fingerprint),e._requestSession&&(this._requestSession=e._requestSession)):Et.isPlainObject(e)&&(e=e,this._tags=y.__assign(y.__assign({},this._tags),e.tags),this._extra=y.__assign(y.__assign({},this._extra),e.extra),this._contexts=y.__assign(y.__assign({},this._contexts),e.contexts),e.user&&(this._user=e.user),e.level&&(this._level=e.level),e.fingerprint&&(this._fingerprint=e.fingerprint),e.requestSession&&(this._requestSession=e.requestSession)),this},t.prototype.clear=function(){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},t.prototype.addBreadcrumb=function(e,r){var n=typeof r=="number"?Math.min(r,jo):jo;if(n<=0)return this;var i=y.__assign({timestamp:Et.dateTimestampInSeconds()},e);return this._breadcrumbs=y.__spread(this._breadcrumbs,[i]).slice(-n),this._notifyScopeListeners(),this},t.prototype.clearBreadcrumbs=function(){return this._breadcrumbs=[],this._notifyScopeListeners(),this},t.prototype.applyToEvent=function(e,r){var n;if(this._extra&&Object.keys(this._extra).length&&(e.extra=y.__assign(y.__assign({},this._extra),e.extra)),this._tags&&Object.keys(this._tags).length&&(e.tags=y.__assign(y.__assign({},this._tags),e.tags)),this._user&&Object.keys(this._user).length&&(e.user=y.__assign(y.__assign({},this._user),e.user)),this._contexts&&Object.keys(this._contexts).length&&(e.contexts=y.__assign(y.__assign({},this._contexts),e.contexts)),this._level&&(e.level=this._level),this._transactionName&&(e.transaction=this._transactionName),this._span){e.contexts=y.__assign({trace:this._span.getTraceContext()},e.contexts);var i=(n=this._span.transaction)===null||n===void 0?void 0:n.name;i&&(e.tags=y.__assign({transaction:i},e.tags))}return this._applyFingerprint(e),e.breadcrumbs=y.__spread(e.breadcrumbs||[],this._breadcrumbs),e.breadcrumbs=e.breadcrumbs.length>0?e.breadcrumbs:void 0,this._notifyEventProcessors(y.__spread(Fo(),this._eventProcessors),e,r)},t.prototype._notifyEventProcessors=function(e,r,n,i){var s=this;return i===void 0&&(i=0),new Et.SyncPromise(function(o,a){var u=e[i];if(r===null||typeof u!="function")o(r);else{var c=u(y.__assign({},r),n);Et.isThenable(c)?c.then(function(f){return s._notifyEventProcessors(e,f,n,i+1).then(o)}).then(null,a):s._notifyEventProcessors(e,c,n,i+1).then(o).then(null,a)}})},t.prototype._notifyScopeListeners=function(){var e=this;this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach(function(r){r(e)}),this._notifyingListeners=!1)},t.prototype._applyFingerprint=function(e){e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],this._fingerprint&&(e.fingerprint=e.fingerprint.concat(this._fingerprint)),e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint},t}();_r.Scope=qf;function Fo(){var t=Et.getGlobalObject();return t.__SENTRY__=t.__SENTRY__||{},t.__SENTRY__.globalEventProcessors=t.__SENTRY__.globalEventProcessors||[],t.__SENTRY__.globalEventProcessors}function kf(t){Fo().push(t)}_r.addGlobalEventProcessor=kf});var Dn=p(Fn=>{Object.defineProperty(Fn,"__esModule",{value:!0});var jn=D(),et=m(),Pf=function(){function t(e){this.errors=0,this.sid=et.uuid4(),this.duration=0,this.status=jn.SessionStatus.Ok,this.init=!0,this.ignoreDuration=!1;var r=et.timestampInSeconds();this.timestamp=r,this.started=r,e&&this.update(e)}return t.prototype.update=function(e){if(e===void 0&&(e={}),e.user&&(!this.ipAddress&&e.user.ip_address&&(this.ipAddress=e.user.ip_address),!this.did&&!e.did&&(this.did=e.user.id||e.user.email||e.user.username)),this.timestamp=e.timestamp||et.timestampInSeconds(),e.ignoreDuration&&(this.ignoreDuration=e.ignoreDuration),e.sid&&(this.sid=e.sid.length===32?e.sid:et.uuid4()),e.init!==void 0&&(this.init=e.init),!this.did&&e.did&&(this.did=""+e.did),typeof e.started=="number"&&(this.started=e.started),this.ignoreDuration)this.duration=void 0;else if(typeof e.duration=="number")this.duration=e.duration;else{var r=this.timestamp-this.started;this.duration=r>=0?r:0}e.release&&(this.release=e.release),e.environment&&(this.environment=e.environment),!this.ipAddress&&e.ipAddress&&(this.ipAddress=e.ipAddress),!this.userAgent&&e.userAgent&&(this.userAgent=e.userAgent),typeof e.errors=="number"&&(this.errors=e.errors),e.status&&(this.status=e.status)},t.prototype.close=function(e){e?this.update({status:e}):this.status===jn.SessionStatus.Ok?this.update({status:jn.SessionStatus.Exited}):this.update()},t.prototype.toJSON=function(){return et.dropUndefinedKeys({sid:""+this.sid,init:this.init,started:new Date(this.started*1e3).toISOString(),timestamp:new Date(this.timestamp*1e3).toISOString(),status:this.status,errors:this.errors,did:typeof this.did=="number"||typeof this.did=="string"?""+this.did:void 0,duration:this.duration,attrs:et.dropUndefinedKeys({release:this.release,environment:this.environment,ip_address:this.ipAddress,user_agent:this.userAgent})})},t}();Fn.Session=Pf});var Ln=p(W=>{Object.defineProperty(W,"__esModule",{value:!0});var ne=S(),Do=D(),ie=m(),Hn=Nn(),Mf=Dn();W.API_VERSION=4;var Af=100,vr=function(){function t(e,r,n){r===void 0&&(r=new Hn.Scope),n===void 0&&(n=W.API_VERSION),this._version=n,this._stack=[{}],this.getStackTop().scope=r,e&&this.bindClient(e)}return t.prototype.isOlderThan=function(e){return this._version<e},t.prototype.bindClient=function(e){var r=this.getStackTop();r.client=e,e&&e.setupIntegrations&&e.setupIntegrations()},t.prototype.pushScope=function(){var e=Hn.Scope.clone(this.getScope());return this.getStack().push({client:this.getClient(),scope:e}),e},t.prototype.popScope=function(){return this.getStack().length<=1?!1:!!this.getStack().pop()},t.prototype.withScope=function(e){var r=this.pushScope();try{e(r)}finally{this.popScope()}},t.prototype.getClient=function(){return this.getStackTop().client},t.prototype.getScope=function(){return this.getStackTop().scope},t.prototype.getStack=function(){return this._stack},t.prototype.getStackTop=function(){return this._stack[this._stack.length-1]},t.prototype.captureException=function(e,r){var n=this._lastEventId=ie.uuid4(),i=r;if(!r){var s=void 0;try{throw new Error("Sentry syntheticException")}catch(o){s=o}i={originalException:e,syntheticException:s}}return this._invokeClient("captureException",e,ne.__assign(ne.__assign({},i),{event_id:n})),n},t.prototype.captureMessage=function(e,r,n){var i=this._lastEventId=ie.uuid4(),s=n;if(!n){var o=void 0;try{throw new Error(e)}catch(a){o=a}s={originalException:e,syntheticException:o}}return this._invokeClient("captureMessage",e,r,ne.__assign(ne.__assign({},s),{event_id:i})),i},t.prototype.captureEvent=function(e,r){var n=ie.uuid4();return e.type!=="transaction"&&(this._lastEventId=n),this._invokeClient("captureEvent",e,ne.__assign(ne.__assign({},r),{event_id:n})),n},t.prototype.lastEventId=function(){return this._lastEventId},t.prototype.addBreadcrumb=function(e,r){var n=this.getStackTop(),i=n.scope,s=n.client;if(!(!i||!s)){var o=s.getOptions&&s.getOptions()||{},a=o.beforeBreadcrumb,u=a===void 0?null:a,c=o.maxBreadcrumbs,f=c===void 0?Af:c;if(!(f<=0)){var l=ie.dateTimestampInSeconds(),d=ne.__assign({timestamp:l},e),h=u?ie.consoleSandbox(function(){return u(d,r)}):d;h!==null&&i.addBreadcrumb(h,f)}}},t.prototype.setUser=function(e){var r=this.getScope();r&&r.setUser(e)},t.prototype.setTags=function(e){var r=this.getScope();r&&r.setTags(e)},t.prototype.setExtras=function(e){var r=this.getScope();r&&r.setExtras(e)},t.prototype.setTag=function(e,r){var n=this.getScope();n&&n.setTag(e,r)},t.prototype.setExtra=function(e,r){var n=this.getScope();n&&n.setExtra(e,r)},t.prototype.setContext=function(e,r){var n=this.getScope();n&&n.setContext(e,r)},t.prototype.configureScope=function(e){var r=this.getStackTop(),n=r.scope,i=r.client;n&&i&&e(n)},t.prototype.run=function(e){var r=Un(this);try{e(this)}finally{Un(r)}},t.prototype.getIntegration=function(e){var r=this.getClient();if(!r)return null;try{return r.getIntegration(e)}catch{return ie.logger.warn("Cannot retrieve integration "+e.id+" from the current Hub"),null}},t.prototype.startSpan=function(e){return this._callExtensionMethod("startSpan",e)},t.prototype.startTransaction=function(e,r){return this._callExtensionMethod("startTransaction",e,r)},t.prototype.traceHeaders=function(){return this._callExtensionMethod("traceHeaders")},t.prototype.captureSession=function(e){if(e===void 0&&(e=!1),e)return this.endSession();this._sendSessionUpdate()},t.prototype.endSession=function(){var e,r,n,i,s;(n=(r=(e=this.getStackTop())===null||e===void 0?void 0:e.scope)===null||r===void 0?void 0:r.getSession())===null||n===void 0||n.close(),this._sendSessionUpdate(),(s=(i=this.getStackTop())===null||i===void 0?void 0:i.scope)===null||s===void 0||s.setSession()},t.prototype.startSession=function(e){var r=this.getStackTop(),n=r.scope,i=r.client,s=i&&i.getOptions()||{},o=s.release,a=s.environment,u=ie.getGlobalObject(),c=(u.navigator||{}).userAgent,f=new Mf.Session(ne.__assign(ne.__assign(ne.__assign({release:o,environment:a},n&&{user:n.getUser()}),c&&{userAgent:c}),e));if(n){var l=n.getSession&&n.getSession();l&&l.status===Do.SessionStatus.Ok&&l.update({status:Do.SessionStatus.Exited}),this.endSession(),n.setSession(f)}return f},t.prototype._sendSessionUpdate=function(){var e=this.getStackTop(),r=e.scope,n=e.client;if(!!r){var i=r.getSession&&r.getSession();i&&n&&n.captureSession&&n.captureSession(i)}},t.prototype._invokeClient=function(e){for(var r,n=[],i=1;i<arguments.length;i++)n[i-1]=arguments[i];var s=this.getStackTop(),o=s.scope,a=s.client;a&&a[e]&&(r=a)[e].apply(r,ne.__spread(n,[o]))},t.prototype._callExtensionMethod=function(e){for(var r=[],n=1;n<arguments.length;n++)r[n-1]=arguments[n];var i=tt(),s=i.__SENTRY__;if(s&&s.extensions&&typeof s.extensions[e]=="function")return s.extensions[e].apply(this,r);ie.logger.warn("Extension method "+e+" couldn't be found, doing nothing.")},t}();W.Hub=vr;function tt(){var t=ie.getGlobalObject();return t.__SENTRY__=t.__SENTRY__||{extensions:{},hub:void 0},t}W.getMainCarrier=tt;function Un(t){var e=tt(),r=he(e);return gr(e,t),r}W.makeMain=Un;function Nf(){var t=tt();return(!Ho(t)||he(t).isOlderThan(W.API_VERSION))&&gr(t,new vr),ie.isNodeEnv()?Ff(t):he(t)}W.getCurrentHub=Nf;function jf(){ie.logger.warn("Function `getActiveDomain` is deprecated and will be removed in a future version.");var t=tt().__SENTRY__;return t&&t.extensions&&t.extensions.domain&&t.extensions.domain.active}W.getActiveDomain=jf;function Ff(t){var e,r,n;try{var i=(n=(r=(e=tt().__SENTRY__)===null||e===void 0?void 0:e.extensions)===null||r===void 0?void 0:r.domain)===null||n===void 0?void 0:n.active;if(!i)return he(t);if(!Ho(i)||he(i).isOlderThan(W.API_VERSION)){var s=he(t).getStackTop();gr(i,new vr(s.client,Hn.Scope.clone(s.scope)))}return he(i)}catch{return he(t)}}function Ho(t){return!!(t&&t.__SENTRY__&&t.__SENTRY__.hub)}function he(t){return t&&t.__SENTRY__&&t.__SENTRY__.hub||(t.__SENTRY__=t.__SENTRY__||{},t.__SENTRY__.hub=new vr),t.__SENTRY__.hub}W.getHubFromCarrier=he;function gr(t,e){return t?(t.__SENTRY__=t.__SENTRY__||{},t.__SENTRY__.hub=e,!0):!1}W.setHubOnCarrier=gr});var Uo=p(zn=>{Object.defineProperty(zn,"__esModule",{value:!0});var Bn=D(),Gn=m(),Df=Ln(),Hf=function(){function t(e,r){var n=this;this.flushTimeout=60,this._pendingAggregates={},this._isEnabled=!0,this._transport=e,this._intervalId=setInterval(function(){return n.flush()},this.flushTimeout*1e3),this._sessionAttrs=r}return t.prototype.sendSessionAggregates=function(e){if(!this._transport.sendSession){Gn.logger.warn("Dropping session because custom transport doesn't implement sendSession");return}this._transport.sendSession(e).then(null,function(r){Gn.logger.error("Error while sending session: "+r)})},t.prototype.flush=function(){var e=this.getSessionAggregates();e.aggregates.length!==0&&(this._pendingAggregates={},this.sendSessionAggregates(e))},t.prototype.getSessionAggregates=function(){var e=this,r=Object.keys(this._pendingAggregates).map(function(i){return e._pendingAggregates[parseInt(i)]}),n={attrs:this._sessionAttrs,aggregates:r};return Gn.dropUndefinedKeys(n)},t.prototype.close=function(){clearInterval(this._intervalId),this._isEnabled=!1,this.flush()},t.prototype.incrementSessionStatusCount=function(){var e,r;if(!!this._isEnabled){var n=Df.getCurrentHub().getScope(),i=(e=n)===null||e===void 0?void 0:e.getRequestSession();i&&i.status&&(this._incrementSessionStatusCount(i.status,new Date),(r=n)===null||r===void 0||r.setRequestSession(void 0))}},t.prototype._incrementSessionStatusCount=function(e,r){var n=new Date(r).setSeconds(0,0);this._pendingAggregates[n]=this._pendingAggregates[n]||{};var i=this._pendingAggregates[n];switch(i.started||(i.started=new Date(n).toISOString()),e){case Bn.RequestSessionStatus.Errored:return i.errored=(i.errored||0)+1,i.errored;case Bn.RequestSessionStatus.Ok:return i.exited=(i.exited||0)+1,i.exited;case Bn.RequestSessionStatus.Crashed:return i.crashed=(i.crashed||0)+1,i.crashed}},t}();zn.SessionFlusher=Hf});var V=p(Y=>{Object.defineProperty(Y,"__esModule",{value:!0});var Lo=Nn();Y.addGlobalEventProcessor=Lo.addGlobalEventProcessor;Y.Scope=Lo.Scope;var Uf=Dn();Y.Session=Uf.Session;var Lf=Uo();Y.SessionFlusher=Lf.SessionFlusher;var je=Ln();Y.getActiveDomain=je.getActiveDomain;Y.getCurrentHub=je.getCurrentHub;Y.getHubFromCarrier=je.getHubFromCarrier;Y.getMainCarrier=je.getMainCarrier;Y.Hub=je.Hub;Y.makeMain=je.makeMain;Y.setHubOnCarrier=je.setHubOnCarrier});var Bo=p(H=>{Object.defineProperty(H,"__esModule",{value:!0});var mr=S(),Bf=V();function z(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];var n=Bf.getCurrentHub();if(n&&n[t])return n[t].apply(n,mr.__spread(e));throw new Error("No hub defined or "+t+" was not found on the hub, please open a bug report.")}function Gf(t,e){var r;try{throw new Error("Sentry syntheticException")}catch(n){r=n}return z("captureException",t,{captureContext:e,originalException:t,syntheticException:r})}H.captureException=Gf;function zf(t,e){var r;try{throw new Error(t)}catch(s){r=s}var n=typeof e=="string"?e:void 0,i=typeof e!="string"?{captureContext:e}:void 0;return z("captureMessage",t,n,mr.__assign({originalException:t,syntheticException:r},i))}H.captureMessage=zf;function Wf(t){return z("captureEvent",t)}H.captureEvent=Wf;function Yf(t){z("configureScope",t)}H.configureScope=Yf;function Vf(t){z("addBreadcrumb",t)}H.addBreadcrumb=Vf;function Kf(t,e){z("setContext",t,e)}H.setContext=Kf;function $f(t){z("setExtras",t)}H.setExtras=$f;function Jf(t){z("setTags",t)}H.setTags=Jf;function Xf(t,e){z("setExtra",t,e)}H.setExtra=Xf;function Zf(t,e){z("setTag",t,e)}H.setTag=Zf;function Qf(t){z("setUser",t)}H.setUser=Qf;function ed(t){z("withScope",t)}H.withScope=ed;function td(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];z.apply(void 0,mr.__spread(["_invokeClient",t],e))}H._callOnClient=td;function rd(t,e){return z("startTransaction",mr.__assign({},t),e)}H.startTransaction=rd});var Wo=p(Wn=>{Object.defineProperty(Wn,"__esModule",{value:!0});var Go=m(),zo="7",nd=function(){function t(e,r,n){r===void 0&&(r={}),this.dsn=e,this._dsnObject=new Go.Dsn(e),this.metadata=r,this._tunnel=n}return t.prototype.getDsn=function(){return this._dsnObject},t.prototype.forceEnvelope=function(){return!!this._tunnel},t.prototype.getBaseApiEndpoint=function(){var e=this.getDsn(),r=e.protocol?e.protocol+":":"",n=e.port?":"+e.port:"";return r+"//"+e.host+n+(e.path?"/"+e.path:"")+"/api/"},t.prototype.getStoreEndpoint=function(){return this._getIngestEndpoint("store")},t.prototype.getStoreEndpointWithUrlEncodedAuth=function(){return this.getStoreEndpoint()+"?"+this._encodedAuth()},t.prototype.getEnvelopeEndpointWithUrlEncodedAuth=function(){return this.forceEnvelope()?this._tunnel:this._getEnvelopeEndpoint()+"?"+this._encodedAuth()},t.prototype.getStoreEndpointPath=function(){var e=this.getDsn();return(e.path?"/"+e.path:"")+"/api/"+e.projectId+"/store/"},t.prototype.getRequestHeaders=function(e,r){var n=this.getDsn(),i=["Sentry sentry_version="+zo];return i.push("sentry_client="+e+"/"+r),i.push("sentry_key="+n.publicKey),n.pass&&i.push("sentry_secret="+n.pass),{"Content-Type":"application/json","X-Sentry-Auth":i.join(", ")}},t.prototype.getReportDialogEndpoint=function(e){e===void 0&&(e={});var r=this.getDsn(),n=this.getBaseApiEndpoint()+"embed/error-page/",i=[];i.push("dsn="+r.toString());for(var s in e)if(s!=="dsn")if(s==="user"){if(!e.user)continue;e.user.name&&i.push("name="+encodeURIComponent(e.user.name)),e.user.email&&i.push("email="+encodeURIComponent(e.user.email))}else i.push(encodeURIComponent(s)+"="+encodeURIComponent(e[s]));return i.length?n+"?"+i.join("&"):n},t.prototype._getEnvelopeEndpoint=function(){return this._getIngestEndpoint("envelope")},t.prototype._getIngestEndpoint=function(e){if(this._tunnel)return this._tunnel;var r=this.getBaseApiEndpoint(),n=this.getDsn();return""+r+n.projectId+"/"+e+"/"},t.prototype._encodedAuth=function(){var e=this.getDsn(),r={sentry_key:e.publicKey,sentry_version:zo};return Go.urlEncode(r)},t}();Wn.API=nd});var Jo=p(Ee=>{Object.defineProperty(Ee,"__esModule",{value:!0});var yr=S(),Yo=V(),id=m();Ee.installedIntegrations=[];function Vo(t){return t.reduce(function(e,r){return e.every(function(n){return r.name!==n.name})&&e.push(r),e},[])}function Ko(t){var e=t.defaultIntegrations&&yr.__spread(t.defaultIntegrations)||[],r=t.integrations,n=yr.__spread(Vo(e));Array.isArray(r)?n=yr.__spread(n.filter(function(o){return r.every(function(a){return a.name!==o.name})}),Vo(r)):typeof r=="function"&&(n=r(n),n=Array.isArray(n)?n:[n]);var i=n.map(function(o){return o.name}),s="Debug";return i.indexOf(s)!==-1&&n.push.apply(n,yr.__spread(n.splice(i.indexOf(s),1))),n}Ee.getIntegrationsToSetup=Ko;function $o(t){Ee.installedIntegrations.indexOf(t.name)===-1&&(t.setupOnce(Yo.addGlobalEventProcessor,Yo.getCurrentHub),Ee.installedIntegrations.push(t.name),id.logger.log("Integration installed: "+t.name))}Ee.setupIntegration=$o;function sd(t){var e={};return Ko(t).forEach(function(r){e[r.name]=r,$o(r)}),Object.defineProperty(e,"initialized",{value:!0}),e}Ee.setupIntegrations=sd});var Zo=p(Yn=>{Object.defineProperty(Yn,"__esModule",{value:!0});var K=S(),od=V(),Tt=D(),T=m(),ad=Jo(),Xo="Not capturing exception because it's already been captured.",ud=function(){function t(e,r){this._integrations={},this._numProcessing=0,this._backend=new e(r),this._options=r,r.dsn&&(this._dsn=new T.Dsn(r.dsn))}return t.prototype.captureException=function(e,r,n){var i=this;if(T.checkOrSetAlreadyCaught(e)){T.logger.log(Xo);return}var s=r&&r.event_id;return this._process(this._getBackend().eventFromException(e,r).then(function(o){return i._captureEvent(o,r,n)}).then(function(o){s=o})),s},t.prototype.captureMessage=function(e,r,n,i){var s=this,o=n&&n.event_id,a=T.isPrimitive(e)?this._getBackend().eventFromMessage(String(e),r,n):this._getBackend().eventFromException(e,n);return this._process(a.then(function(u){return s._captureEvent(u,n,i)}).then(function(u){o=u})),o},t.prototype.captureEvent=function(e,r,n){var i;if(((i=r)===null||i===void 0?void 0:i.originalException)&&T.checkOrSetAlreadyCaught(r.originalException)){T.logger.log(Xo);return}var s=r&&r.event_id;return this._process(this._captureEvent(e,r,n).then(function(o){s=o})),s},t.prototype.captureSession=function(e){if(!this._isEnabled()){T.logger.warn("SDK not enabled, will not capture session.");return}typeof e.release!="string"?T.logger.warn("Discarded session because of missing or non-string release"):(this._sendSession(e),e.update({init:!1}))},t.prototype.getDsn=function(){return this._dsn},t.prototype.getOptions=function(){return this._options},t.prototype.getTransport=function(){return this._getBackend().getTransport()},t.prototype.flush=function(e){var r=this;return this._isClientDoneProcessing(e).then(function(n){return r.getTransport().close(e).then(function(i){return n&&i})})},t.prototype.close=function(e){var r=this;return this.flush(e).then(function(n){return r.getOptions().enabled=!1,n})},t.prototype.setupIntegrations=function(){this._isEnabled()&&!this._integrations.initialized&&(this._integrations=ad.setupIntegrations(this._options))},t.prototype.getIntegration=function(e){try{return this._integrations[e.id]||null}catch{return T.logger.warn("Cannot retrieve integration "+e.id+" from the current Client"),null}},t.prototype._updateSessionFromEvent=function(e,r){var n,i,s=!1,o=!1,a=r.exception&&r.exception.values;if(a){o=!0;try{for(var u=K.__values(a),c=u.next();!c.done;c=u.next()){var f=c.value,l=f.mechanism;if(l&&l.handled===!1){s=!0;break}}}catch(_){n={error:_}}finally{try{c&&!c.done&&(i=u.return)&&i.call(u)}finally{if(n)throw n.error}}}var d=e.status===Tt.SessionStatus.Ok,h=d&&e.errors===0||d&&s;h&&(e.update(K.__assign(K.__assign({},s&&{status:Tt.SessionStatus.Crashed}),{errors:e.errors||Number(o||s)})),this.captureSession(e))},t.prototype._sendSession=function(e){this._getBackend().sendSession(e)},t.prototype._isClientDoneProcessing=function(e){var r=this;return new T.SyncPromise(function(n){var i=0,s=1,o=setInterval(function(){r._numProcessing==0?(clearInterval(o),n(!0)):(i+=s,e&&i>=e&&(clearInterval(o),n(!1)))},s)})},t.prototype._getBackend=function(){return this._backend},t.prototype._isEnabled=function(){return this.getOptions().enabled!==!1&&this._dsn!==void 0},t.prototype._prepareEvent=function(e,r,n){var i=this,s=this.getOptions().normalizeDepth,o=s===void 0?3:s,a=K.__assign(K.__assign({},e),{event_id:e.event_id||(n&&n.event_id?n.event_id:T.uuid4()),timestamp:e.timestamp||T.dateTimestampInSeconds()});this._applyClientOptions(a),this._applyIntegrationsMetadata(a);var u=r;n&&n.captureContext&&(u=od.Scope.clone(u).update(n.captureContext));var c=T.SyncPromise.resolve(a);return u&&(c=u.applyToEvent(a,n)),c.then(function(f){return typeof o=="number"&&o>0?i._normalizeEvent(f,o):f})},t.prototype._normalizeEvent=function(e,r){if(!e)return null;var n=K.__assign(K.__assign(K.__assign(K.__assign(K.__assign({},e),e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map(function(o){return K.__assign(K.__assign({},o),o.data&&{data:T.normalize(o.data,r)})})}),e.user&&{user:T.normalize(e.user,r)}),e.contexts&&{contexts:T.normalize(e.contexts,r)}),e.extra&&{extra:T.normalize(e.extra,r)});e.contexts&&e.contexts.trace&&(n.contexts.trace=e.contexts.trace);var i=this.getOptions()._experiments,s=i===void 0?{}:i;return s.ensureNoCircularStructures?T.normalize(n):n},t.prototype._applyClientOptions=function(e){var r=this.getOptions(),n=r.environment,i=r.release,s=r.dist,o=r.maxValueLength,a=o===void 0?250:o;"environment"in e||(e.environment="environment"in r?n:"production"),e.release===void 0&&i!==void 0&&(e.release=i),e.dist===void 0&&s!==void 0&&(e.dist=s),e.message&&(e.message=T.truncate(e.message,a));var u=e.exception&&e.exception.values&&e.exception.values[0];u&&u.value&&(u.value=T.truncate(u.value,a));var c=e.request;c&&c.url&&(c.url=T.truncate(c.url,a))},t.prototype._applyIntegrationsMetadata=function(e){var r=Object.keys(this._integrations);r.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=K.__spread(e.sdk.integrations||[],r))},t.prototype._sendEvent=function(e){this._getBackend().sendEvent(e)},t.prototype._captureEvent=function(e,r,n){return this._processEvent(e,r,n).then(function(i){return i.event_id},function(i){T.logger.error(i)})},t.prototype._processEvent=function(e,r,n){var i=this,s,o,a=this.getOptions(),u=a.beforeSend,c=a.sampleRate,f=this.getTransport();if(!this._isEnabled())return T.SyncPromise.reject(new T.SentryError("SDK not enabled, will not capture event."));var l=e.type==="transaction";return!l&&typeof c=="number"&&Math.random()>c?((o=(s=f).recordLostEvent)===null||o===void 0||o.call(s,Tt.Outcome.SampleRate,"event"),T.SyncPromise.reject(new T.SentryError("Discarding event because it's not included in the random sample (sampling rate = "+c+")"))):this._prepareEvent(e,n,r).then(function(d){var h,_;if(d===null)throw(_=(h=f).recordLostEvent)===null||_===void 0||_.call(h,Tt.Outcome.EventProcessor,e.type||"event"),new T.SentryError("An event processor returned null, will not send event.");var v=r&&r.data&&r.data.__sentry__===!0;if(v||l||!u)return d;var g=u(d,r);return i._ensureBeforeSendRv(g)}).then(function(d){var h,_;if(d===null)throw(_=(h=f).recordLostEvent)===null||_===void 0||_.call(h,Tt.Outcome.BeforeSend,e.type||"event"),new T.SentryError("`beforeSend` returned `null`, will not send event.");var v=n&&n.getSession&&n.getSession();return!l&&v&&i._updateSessionFromEvent(v,d),i._sendEvent(d),d}).then(null,function(d){throw d instanceof T.SentryError?d:(i.captureException(d,{data:{__sentry__:!0},originalException:d}),new T.SentryError(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
11
+ Reason: `+d))})},t.prototype._process=function(e){var r=this;this._numProcessing+=1,e.then(function(n){return r._numProcessing-=1,n},function(n){return r._numProcessing-=1,n})},t.prototype._ensureBeforeSendRv=function(e){var r="`beforeSend` method has to return `null` or a valid event.";if(T.isThenable(e))return e.then(function(n){if(!(T.isPlainObject(n)||n===null))throw new T.SentryError(r);return n},function(n){throw new T.SentryError("beforeSend rejected with "+n)});if(!(T.isPlainObject(e)||e===null))throw new T.SentryError(r);return e},t}();Yn.BaseClient=ud});var Kn=p(Vn=>{Object.defineProperty(Vn,"__esModule",{value:!0});var cd=D(),Qo=m(),ld=function(){function t(){}return t.prototype.sendEvent=function(e){return Qo.SyncPromise.resolve({reason:"NoopTransport: Event has been skipped because no Dsn is configured.",status:cd.Status.Skipped})},t.prototype.close=function(e){return Qo.SyncPromise.resolve(!0)},t}();Vn.NoopTransport=ld});var ea=p($n=>{Object.defineProperty($n,"__esModule",{value:!0});var rt=m(),fd=Kn(),dd=function(){function t(e){this._options=e,this._options.dsn||rt.logger.warn("No DSN provided, backend will not do anything."),this._transport=this._setupTransport()}return t.prototype.eventFromException=function(e,r){throw new rt.SentryError("Backend has to implement `eventFromException` method")},t.prototype.eventFromMessage=function(e,r,n){throw new rt.SentryError("Backend has to implement `eventFromMessage` method")},t.prototype.sendEvent=function(e){this._transport.sendEvent(e).then(null,function(r){rt.logger.error("Error while sending event: "+r)})},t.prototype.sendSession=function(e){if(!this._transport.sendSession){rt.logger.warn("Dropping session because custom transport doesn't implement sendSession");return}this._transport.sendSession(e).then(null,function(r){rt.logger.error("Error while sending session: "+r)})},t.prototype.getTransport=function(){return this._transport},t.prototype._setupTransport=function(){return new fd.NoopTransport},t}();$n.BaseBackend=dd});var ra=p(br=>{Object.defineProperty(br,"__esModule",{value:!0});var Fe=S();function ta(t){if(!(!t.metadata||!t.metadata.sdk)){var e=t.metadata.sdk,r=e.name,n=e.version;return{name:r,version:n}}}function pd(t,e){return e&&(t.sdk=t.sdk||{},t.sdk.name=t.sdk.name||e.name,t.sdk.version=t.sdk.version||e.version,t.sdk.integrations=Fe.__spread(t.sdk.integrations||[],e.integrations||[]),t.sdk.packages=Fe.__spread(t.sdk.packages||[],e.packages||[])),t}function hd(t,e){var r=ta(e),n=JSON.stringify(Fe.__assign(Fe.__assign({sent_at:new Date().toISOString()},r&&{sdk:r}),e.forceEnvelope()&&{dsn:e.getDsn().toString()})),i="aggregates"in t?"sessions":"session",s=JSON.stringify({type:i});return{body:n+`
12
12
  `+s+`
13
- `+JSON.stringify(t),type:i,url:e.getEnvelopeEndpointWithUrlEncodedAuth()}}yr.sessionToSentryRequest=hd;function _d(t,e){var r=ta(e),n=t.type||"event",i=n==="transaction"||e.forceEnvelope(),s=t.debug_meta||{},o=s.transactionSampling,a=Fe.__rest(s,["transactionSampling"]),u=o||{},c=u.method,f=u.rate;Object.keys(a).length===0?delete t.debug_meta:t.debug_meta=a;var l={body:JSON.stringify(r?pd(t,e.metadata.sdk):t),type:n,url:i?e.getEnvelopeEndpointWithUrlEncodedAuth():e.getStoreEndpointWithUrlEncodedAuth()};if(i){var d=JSON.stringify(Fe.__assign(Fe.__assign({event_id:t.event_id,sent_at:new Date().toISOString()},r&&{sdk:r}),e.forceEnvelope()&&{dsn:e.getDsn().toString()})),h=JSON.stringify({type:n,sample_rates:[{id:c,rate:f}]}),_=d+`
13
+ `+JSON.stringify(t),type:i,url:e.getEnvelopeEndpointWithUrlEncodedAuth()}}br.sessionToSentryRequest=hd;function _d(t,e){var r=ta(e),n=t.type||"event",i=n==="transaction"||e.forceEnvelope(),s=t.debug_meta||{},o=s.transactionSampling,a=Fe.__rest(s,["transactionSampling"]),u=o||{},c=u.method,f=u.rate;Object.keys(a).length===0?delete t.debug_meta:t.debug_meta=a;var l={body:JSON.stringify(r?pd(t,e.metadata.sdk):t),type:n,url:i?e.getEnvelopeEndpointWithUrlEncodedAuth():e.getStoreEndpointWithUrlEncodedAuth()};if(i){var d=JSON.stringify(Fe.__assign(Fe.__assign({event_id:t.event_id,sent_at:new Date().toISOString()},r&&{sdk:r}),e.forceEnvelope()&&{dsn:e.getDsn().toString()})),h=JSON.stringify({type:n,sample_rates:[{id:c,rate:f}]}),_=d+`
14
14
  `+h+`
15
- `+l.body;l.body=_}return l}yr.eventToSentryRequest=_d});var na=p(Jn=>{Object.defineProperty(Jn,"__esModule",{value:!0});var vd=V(),gd=m();function md(t,e){var r;e.debug===!0&&gd.logger.enable();var n=vd.getCurrentHub();(r=n.getScope())===null||r===void 0||r.update(e.initialScope);var i=new t(e);n.bindClient(i)}Jn.initAndBind=md});var ia=p(Xn=>{Object.defineProperty(Xn,"__esModule",{value:!0});Xn.SDK_VERSION="6.16.1"});var oa=p(Zn=>{Object.defineProperty(Zn,"__esModule",{value:!0});var sa,yd=function(){function t(){this.name=t.id}return t.prototype.setupOnce=function(){sa=Function.prototype.toString,Function.prototype.toString=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var n=this.__sentry_original__||this;return sa.apply(n,e)}},t.id="FunctionToString",t}();Zn.FunctionToString=yd});var ua=p(ei=>{Object.defineProperty(ei,"__esModule",{value:!0});var Qn=S(),aa=V(),B=m(),bd=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/],Sd=function(){function t(e){e===void 0&&(e={}),this._options=e,this.name=t.id}return t.prototype.setupOnce=function(){aa.addGlobalEventProcessor(function(e){var r=aa.getCurrentHub();if(!r)return e;var n=r.getIntegration(t);if(n){var i=r.getClient(),s=i?i.getOptions():{},o=typeof n._mergeOptions=="function"?n._mergeOptions(s):{};return typeof n._shouldDropEvent!="function"?e:n._shouldDropEvent(e,o)?null:e}return e})},t.prototype._shouldDropEvent=function(e,r){return this._isSentryError(e,r)?(B.logger.warn(`Event dropped due to being internal Sentry Error.
15
+ `+l.body;l.body=_}return l}br.eventToSentryRequest=_d});var na=p(Jn=>{Object.defineProperty(Jn,"__esModule",{value:!0});var vd=V(),gd=m();function md(t,e){var r;e.debug===!0&&gd.logger.enable();var n=vd.getCurrentHub();(r=n.getScope())===null||r===void 0||r.update(e.initialScope);var i=new t(e);n.bindClient(i)}Jn.initAndBind=md});var ia=p(Xn=>{Object.defineProperty(Xn,"__esModule",{value:!0});Xn.SDK_VERSION="6.16.1"});var oa=p(Zn=>{Object.defineProperty(Zn,"__esModule",{value:!0});var sa,yd=function(){function t(){this.name=t.id}return t.prototype.setupOnce=function(){sa=Function.prototype.toString,Function.prototype.toString=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var n=this.__sentry_original__||this;return sa.apply(n,e)}},t.id="FunctionToString",t}();Zn.FunctionToString=yd});var ua=p(ei=>{Object.defineProperty(ei,"__esModule",{value:!0});var Qn=S(),aa=V(),B=m(),bd=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/],Sd=function(){function t(e){e===void 0&&(e={}),this._options=e,this.name=t.id}return t.prototype.setupOnce=function(){aa.addGlobalEventProcessor(function(e){var r=aa.getCurrentHub();if(!r)return e;var n=r.getIntegration(t);if(n){var i=r.getClient(),s=i?i.getOptions():{},o=typeof n._mergeOptions=="function"?n._mergeOptions(s):{};return typeof n._shouldDropEvent!="function"?e:n._shouldDropEvent(e,o)?null:e}return e})},t.prototype._shouldDropEvent=function(e,r){return this._isSentryError(e,r)?(B.logger.warn(`Event dropped due to being internal Sentry Error.
16
16
  Event: `+B.getEventDescription(e)),!0):this._isIgnoredError(e,r)?(B.logger.warn("Event dropped due to being matched by `ignoreErrors` option.\nEvent: "+B.getEventDescription(e)),!0):this._isDeniedUrl(e,r)?(B.logger.warn("Event dropped due to being matched by `denyUrls` option.\nEvent: "+B.getEventDescription(e)+`.
17
17
  Url: `+this._getEventFilterUrl(e)),!0):this._isAllowedUrl(e,r)?!1:(B.logger.warn("Event dropped due to not being matched by `allowUrls` option.\nEvent: "+B.getEventDescription(e)+`.
18
- Url: `+this._getEventFilterUrl(e)),!0)},t.prototype._isSentryError=function(e,r){if(!r.ignoreInternal)return!1;try{return e&&e.exception&&e.exception.values&&e.exception.values[0]&&e.exception.values[0].type==="SentryError"||!1}catch{return!1}},t.prototype._isIgnoredError=function(e,r){return!r.ignoreErrors||!r.ignoreErrors.length?!1:this._getPossibleEventMessages(e).some(function(n){return r.ignoreErrors.some(function(i){return B.isMatchingPattern(n,i)})})},t.prototype._isDeniedUrl=function(e,r){if(!r.denyUrls||!r.denyUrls.length)return!1;var n=this._getEventFilterUrl(e);return n?r.denyUrls.some(function(i){return B.isMatchingPattern(n,i)}):!1},t.prototype._isAllowedUrl=function(e,r){if(!r.allowUrls||!r.allowUrls.length)return!0;var n=this._getEventFilterUrl(e);return n?r.allowUrls.some(function(i){return B.isMatchingPattern(n,i)}):!0},t.prototype._mergeOptions=function(e){return e===void 0&&(e={}),{allowUrls:Qn.__spread(this._options.whitelistUrls||[],this._options.allowUrls||[],e.whitelistUrls||[],e.allowUrls||[]),denyUrls:Qn.__spread(this._options.blacklistUrls||[],this._options.denyUrls||[],e.blacklistUrls||[],e.denyUrls||[]),ignoreErrors:Qn.__spread(this._options.ignoreErrors||[],e.ignoreErrors||[],bd),ignoreInternal:typeof this._options.ignoreInternal!="undefined"?this._options.ignoreInternal:!0}},t.prototype._getPossibleEventMessages=function(e){if(e.message)return[e.message];if(e.exception)try{var r=e.exception.values&&e.exception.values[0]||{},n=r.type,i=n===void 0?"":n,s=r.value,o=s===void 0?"":s;return[""+o,i+": "+o]}catch{return B.logger.error("Cannot extract message for event "+B.getEventDescription(e)),[]}return[]},t.prototype._getLastValidUrl=function(e){e===void 0&&(e=[]);for(var r,n,i=e.length-1;i>=0;i--){var s=e[i];if(((r=s)===null||r===void 0?void 0:r.filename)!=="<anonymous>"&&((n=s)===null||n===void 0?void 0:n.filename)!=="[native code]")return s.filename||null}return null},t.prototype._getEventFilterUrl=function(e){try{if(e.stacktrace){var r=e.stacktrace.frames;return this._getLastValidUrl(r)}if(e.exception){var n=e.exception.values&&e.exception.values[0].stacktrace&&e.exception.values[0].stacktrace.frames;return this._getLastValidUrl(n)}return null}catch{return B.logger.error("Cannot extract url for event "+B.getEventDescription(e)),null}},t.id="InboundFilters",t}();ei.InboundFilters=Sd});var ca=p(br=>{Object.defineProperty(br,"__esModule",{value:!0});var Ed=oa();br.FunctionToString=Ed.FunctionToString;var Td=ua();br.InboundFilters=Td.InboundFilters});var N=p(O=>{Object.defineProperty(O,"__esModule",{value:!0});var $=Bo();O.addBreadcrumb=$.addBreadcrumb;O.captureException=$.captureException;O.captureEvent=$.captureEvent;O.captureMessage=$.captureMessage;O.configureScope=$.configureScope;O.startTransaction=$.startTransaction;O.setContext=$.setContext;O.setExtra=$.setExtra;O.setExtras=$.setExtras;O.setTag=$.setTag;O.setTags=$.setTags;O.setUser=$.setUser;O.withScope=$.withScope;var nt=V();O.addGlobalEventProcessor=nt.addGlobalEventProcessor;O.getCurrentHub=nt.getCurrentHub;O.getHubFromCarrier=nt.getHubFromCarrier;O.Hub=nt.Hub;O.makeMain=nt.makeMain;O.Scope=nt.Scope;var Od=Wo();O.API=Od.API;var wd=Zo();O.BaseClient=wd.BaseClient;var xd=ea();O.BaseBackend=xd.BaseBackend;var la=ra();O.eventToSentryRequest=la.eventToSentryRequest;O.sessionToSentryRequest=la.sessionToSentryRequest;var Cd=na();O.initAndBind=Cd.initAndBind;var Id=Kn();O.NoopTransport=Id.NoopTransport;var Rd=ia();O.SDK_VERSION=Rd.SDK_VERSION;var qd=ca();O.Integrations=qd});var fa=p(Sr=>{(function(t,e){let r=typeof Sr=="object"?Sr:typeof t=="object"?t:{};e(r),typeof define=="function"&&define.amd&&define("lru",r)})(Sr,function(t){let e=Symbol("newer"),r=Symbol("older");function n(u,c){typeof u!="number"&&(c=u,u=0),this.size=0,this.limit=u,this.oldest=this.newest=void 0,this._keymap=new Map,c&&(this.assign(c),u<1&&(this.limit=this.size))}t.LRUMap=n;function i(u,c){this.key=u,this.value=c,this[e]=void 0,this[r]=void 0}n.prototype._markEntryAsUsed=function(u){u!==this.newest&&(u[e]&&(u===this.oldest&&(this.oldest=u[e]),u[e][r]=u[r]),u[r]&&(u[r][e]=u[e]),u[e]=void 0,u[r]=this.newest,this.newest&&(this.newest[e]=u),this.newest=u)},n.prototype.assign=function(u){let c,f=this.limit||Number.MAX_VALUE;this._keymap.clear();let l=u[Symbol.iterator]();for(let d=l.next();!d.done;d=l.next()){let h=new i(d.value[0],d.value[1]);if(this._keymap.set(h.key,h),c?(c[e]=h,h[r]=c):this.oldest=h,c=h,f--==0)throw new Error("overflow")}this.newest=c,this.size=this._keymap.size},n.prototype.get=function(u){var c=this._keymap.get(u);if(!!c)return this._markEntryAsUsed(c),c.value},n.prototype.set=function(u,c){var f=this._keymap.get(u);return f?(f.value=c,this._markEntryAsUsed(f),this):(this._keymap.set(u,f=new i(u,c)),this.newest?(this.newest[e]=f,f[r]=this.newest):this.oldest=f,this.newest=f,++this.size,this.size>this.limit&&this.shift(),this)},n.prototype.shift=function(){var u=this.oldest;if(u)return this.oldest[e]?(this.oldest=this.oldest[e],this.oldest[r]=void 0):(this.oldest=void 0,this.newest=void 0),u[e]=u[r]=void 0,this._keymap.delete(u.key),--this.size,[u.key,u.value]},n.prototype.find=function(u){let c=this._keymap.get(u);return c?c.value:void 0},n.prototype.has=function(u){return this._keymap.has(u)},n.prototype.delete=function(u){var c=this._keymap.get(u);if(!!c)return this._keymap.delete(c.key),c[e]&&c[r]?(c[r][e]=c[e],c[e][r]=c[r]):c[e]?(c[e][r]=void 0,this.oldest=c[e]):c[r]?(c[r][e]=void 0,this.newest=c[r]):this.oldest=this.newest=void 0,this.size--,c.value},n.prototype.clear=function(){this.oldest=this.newest=void 0,this.size=0,this._keymap.clear()};function s(u){this.entry=u}s.prototype[Symbol.iterator]=function(){return this},s.prototype.next=function(){let u=this.entry;return u?(this.entry=u[e],{done:!1,value:[u.key,u.value]}):{done:!0,value:void 0}};function o(u){this.entry=u}o.prototype[Symbol.iterator]=function(){return this},o.prototype.next=function(){let u=this.entry;return u?(this.entry=u[e],{done:!1,value:u.key}):{done:!0,value:void 0}};function a(u){this.entry=u}a.prototype[Symbol.iterator]=function(){return this},a.prototype.next=function(){let u=this.entry;return u?(this.entry=u[e],{done:!1,value:u.value}):{done:!0,value:void 0}},n.prototype.keys=function(){return new o(this.oldest)},n.prototype.values=function(){return new a(this.oldest)},n.prototype.entries=function(){return this},n.prototype[Symbol.iterator]=function(){return new s(this.oldest)},n.prototype.forEach=function(u,c){typeof c!="object"&&(c=this);let f=this.oldest;for(;f;)u.call(c,f.value,f.key,this),f=f[e]},n.prototype.toJSON=function(){for(var u=new Array(this.size),c=0,f=this.oldest;f;)u[c++]={key:f.key,value:f.value},f=f[e];return u},n.prototype.toString=function(){for(var u="",c=this.oldest;c;)u+=String(c.key)+":"+c.value,c=c[e],c&&(u+=" < ");return u}})});var da=p(ti=>{Object.defineProperty(ti,"__esModule",{value:!0});function kd(t){if(!t.stack)return[];var e=t.stack.split(`
18
+ Url: `+this._getEventFilterUrl(e)),!0)},t.prototype._isSentryError=function(e,r){if(!r.ignoreInternal)return!1;try{return e&&e.exception&&e.exception.values&&e.exception.values[0]&&e.exception.values[0].type==="SentryError"||!1}catch{return!1}},t.prototype._isIgnoredError=function(e,r){return!r.ignoreErrors||!r.ignoreErrors.length?!1:this._getPossibleEventMessages(e).some(function(n){return r.ignoreErrors.some(function(i){return B.isMatchingPattern(n,i)})})},t.prototype._isDeniedUrl=function(e,r){if(!r.denyUrls||!r.denyUrls.length)return!1;var n=this._getEventFilterUrl(e);return n?r.denyUrls.some(function(i){return B.isMatchingPattern(n,i)}):!1},t.prototype._isAllowedUrl=function(e,r){if(!r.allowUrls||!r.allowUrls.length)return!0;var n=this._getEventFilterUrl(e);return n?r.allowUrls.some(function(i){return B.isMatchingPattern(n,i)}):!0},t.prototype._mergeOptions=function(e){return e===void 0&&(e={}),{allowUrls:Qn.__spread(this._options.whitelistUrls||[],this._options.allowUrls||[],e.whitelistUrls||[],e.allowUrls||[]),denyUrls:Qn.__spread(this._options.blacklistUrls||[],this._options.denyUrls||[],e.blacklistUrls||[],e.denyUrls||[]),ignoreErrors:Qn.__spread(this._options.ignoreErrors||[],e.ignoreErrors||[],bd),ignoreInternal:typeof this._options.ignoreInternal!="undefined"?this._options.ignoreInternal:!0}},t.prototype._getPossibleEventMessages=function(e){if(e.message)return[e.message];if(e.exception)try{var r=e.exception.values&&e.exception.values[0]||{},n=r.type,i=n===void 0?"":n,s=r.value,o=s===void 0?"":s;return[""+o,i+": "+o]}catch{return B.logger.error("Cannot extract message for event "+B.getEventDescription(e)),[]}return[]},t.prototype._getLastValidUrl=function(e){e===void 0&&(e=[]);for(var r,n,i=e.length-1;i>=0;i--){var s=e[i];if(((r=s)===null||r===void 0?void 0:r.filename)!=="<anonymous>"&&((n=s)===null||n===void 0?void 0:n.filename)!=="[native code]")return s.filename||null}return null},t.prototype._getEventFilterUrl=function(e){try{if(e.stacktrace){var r=e.stacktrace.frames;return this._getLastValidUrl(r)}if(e.exception){var n=e.exception.values&&e.exception.values[0].stacktrace&&e.exception.values[0].stacktrace.frames;return this._getLastValidUrl(n)}return null}catch{return B.logger.error("Cannot extract url for event "+B.getEventDescription(e)),null}},t.id="InboundFilters",t}();ei.InboundFilters=Sd});var ca=p(Sr=>{Object.defineProperty(Sr,"__esModule",{value:!0});var Ed=oa();Sr.FunctionToString=Ed.FunctionToString;var Td=ua();Sr.InboundFilters=Td.InboundFilters});var N=p(O=>{Object.defineProperty(O,"__esModule",{value:!0});var $=Bo();O.addBreadcrumb=$.addBreadcrumb;O.captureException=$.captureException;O.captureEvent=$.captureEvent;O.captureMessage=$.captureMessage;O.configureScope=$.configureScope;O.startTransaction=$.startTransaction;O.setContext=$.setContext;O.setExtra=$.setExtra;O.setExtras=$.setExtras;O.setTag=$.setTag;O.setTags=$.setTags;O.setUser=$.setUser;O.withScope=$.withScope;var nt=V();O.addGlobalEventProcessor=nt.addGlobalEventProcessor;O.getCurrentHub=nt.getCurrentHub;O.getHubFromCarrier=nt.getHubFromCarrier;O.Hub=nt.Hub;O.makeMain=nt.makeMain;O.Scope=nt.Scope;var Od=Wo();O.API=Od.API;var wd=Zo();O.BaseClient=wd.BaseClient;var xd=ea();O.BaseBackend=xd.BaseBackend;var la=ra();O.eventToSentryRequest=la.eventToSentryRequest;O.sessionToSentryRequest=la.sessionToSentryRequest;var Cd=na();O.initAndBind=Cd.initAndBind;var Id=Kn();O.NoopTransport=Id.NoopTransport;var Rd=ia();O.SDK_VERSION=Rd.SDK_VERSION;var qd=ca();O.Integrations=qd});var fa=p(Er=>{(function(t,e){let r=typeof Er=="object"?Er:typeof t=="object"?t:{};e(r),typeof define=="function"&&define.amd&&define("lru",r)})(Er,function(t){let e=Symbol("newer"),r=Symbol("older");function n(u,c){typeof u!="number"&&(c=u,u=0),this.size=0,this.limit=u,this.oldest=this.newest=void 0,this._keymap=new Map,c&&(this.assign(c),u<1&&(this.limit=this.size))}t.LRUMap=n;function i(u,c){this.key=u,this.value=c,this[e]=void 0,this[r]=void 0}n.prototype._markEntryAsUsed=function(u){u!==this.newest&&(u[e]&&(u===this.oldest&&(this.oldest=u[e]),u[e][r]=u[r]),u[r]&&(u[r][e]=u[e]),u[e]=void 0,u[r]=this.newest,this.newest&&(this.newest[e]=u),this.newest=u)},n.prototype.assign=function(u){let c,f=this.limit||Number.MAX_VALUE;this._keymap.clear();let l=u[Symbol.iterator]();for(let d=l.next();!d.done;d=l.next()){let h=new i(d.value[0],d.value[1]);if(this._keymap.set(h.key,h),c?(c[e]=h,h[r]=c):this.oldest=h,c=h,f--==0)throw new Error("overflow")}this.newest=c,this.size=this._keymap.size},n.prototype.get=function(u){var c=this._keymap.get(u);if(!!c)return this._markEntryAsUsed(c),c.value},n.prototype.set=function(u,c){var f=this._keymap.get(u);return f?(f.value=c,this._markEntryAsUsed(f),this):(this._keymap.set(u,f=new i(u,c)),this.newest?(this.newest[e]=f,f[r]=this.newest):this.oldest=f,this.newest=f,++this.size,this.size>this.limit&&this.shift(),this)},n.prototype.shift=function(){var u=this.oldest;if(u)return this.oldest[e]?(this.oldest=this.oldest[e],this.oldest[r]=void 0):(this.oldest=void 0,this.newest=void 0),u[e]=u[r]=void 0,this._keymap.delete(u.key),--this.size,[u.key,u.value]},n.prototype.find=function(u){let c=this._keymap.get(u);return c?c.value:void 0},n.prototype.has=function(u){return this._keymap.has(u)},n.prototype.delete=function(u){var c=this._keymap.get(u);if(!!c)return this._keymap.delete(c.key),c[e]&&c[r]?(c[r][e]=c[e],c[e][r]=c[r]):c[e]?(c[e][r]=void 0,this.oldest=c[e]):c[r]?(c[r][e]=void 0,this.newest=c[r]):this.oldest=this.newest=void 0,this.size--,c.value},n.prototype.clear=function(){this.oldest=this.newest=void 0,this.size=0,this._keymap.clear()};function s(u){this.entry=u}s.prototype[Symbol.iterator]=function(){return this},s.prototype.next=function(){let u=this.entry;return u?(this.entry=u[e],{done:!1,value:[u.key,u.value]}):{done:!0,value:void 0}};function o(u){this.entry=u}o.prototype[Symbol.iterator]=function(){return this},o.prototype.next=function(){let u=this.entry;return u?(this.entry=u[e],{done:!1,value:u.key}):{done:!0,value:void 0}};function a(u){this.entry=u}a.prototype[Symbol.iterator]=function(){return this},a.prototype.next=function(){let u=this.entry;return u?(this.entry=u[e],{done:!1,value:u.value}):{done:!0,value:void 0}},n.prototype.keys=function(){return new o(this.oldest)},n.prototype.values=function(){return new a(this.oldest)},n.prototype.entries=function(){return this},n.prototype[Symbol.iterator]=function(){return new s(this.oldest)},n.prototype.forEach=function(u,c){typeof c!="object"&&(c=this);let f=this.oldest;for(;f;)u.call(c,f.value,f.key,this),f=f[e]},n.prototype.toJSON=function(){for(var u=new Array(this.size),c=0,f=this.oldest;f;)u[c++]={key:f.key,value:f.value},f=f[e];return u},n.prototype.toString=function(){for(var u="",c=this.oldest;c;)u+=String(c.key)+":"+c.value,c=c[e],c&&(u+=" < ");return u}})});var da=p(ti=>{Object.defineProperty(ti,"__esModule",{value:!0});function kd(t){if(!t.stack)return[];var e=t.stack.split(`
19
19
  `).slice(1);return e.map(function(r){if(r.match(/^\s*[-]{4,}$/))return{columnNumber:null,fileName:r,functionName:null,lineNumber:null,methodName:null,native:null,typeName:null};var n=r.match(/at (?:(.+?)\s+\()?(?:(.+?):(\d+)(?::(\d+))?|([^)]+))\)?/);if(!!n){var i=null,s=null,o=null,a=null,u=null,c=n[5]==="native";if(n[1]){o=n[1];var f=o.lastIndexOf(".");if(o[f-1]==="."&&f--,f>0){i=o.substr(0,f),s=o.substr(f+1);var l=i.indexOf(".Module");l>0&&(o=o.substr(l+1),i=i.substr(0,l))}a=null}s&&(a=i,u=s),s==="<anonymous>"&&(u=null,o=null);var d={columnNumber:parseInt(n[4],10)||null,fileName:n[2]||null,functionName:o,lineNumber:parseInt(n[3],10)||null,methodName:u,native:c,typeName:a};return d}}).filter(function(r){return!!r})}ti.parse=kd});var ni=p(Te=>{Object.defineProperty(Te,"__esModule",{value:!0});var se=m(),Pd=require("fs"),Md=fa(),Ad=da(),Nd=7,ri=new Md.LRUMap(100);function jd(){ri.clear()}Te.resetFileContentCache=jd;function Fd(t){try{return t.functionName||t.typeName+"."+(t.methodName||"<anonymous>")}catch{return"<anonymous>"}}var Dd=(require.main&&require.main.filename&&se.dirname(require.main.filename)||global.process.cwd())+"/";function Hd(t,e){e||(e=Dd);var r=se.basename(t,".js");t=se.dirname(t);var n=t.lastIndexOf("/node_modules/");if(n>-1)return t.substr(n+14).replace(/\//g,".")+":"+r;if(n=(t+"/").lastIndexOf(e,0),n===0){var i=t.substr(e.length).replace(/\//g,".");return i&&(i+=":"),i+=r,i}return r}function Ud(t){return t.length===0?se.SyncPromise.resolve({}):new se.SyncPromise(function(e){for(var r={},n=0,i=function(o){var a=t[o],u=ri.get(a);if(u!==void 0)return u!==null&&(r[a]=u),n++,n===t.length&&e(r),"continue";Pd.readFile(a,function(c,f){var l=c?null:f.toString();r[a]=l,ri.set(a,l),n++,n===t.length&&e(r)})},s=0;s<t.length;s++)i(s)})}function pa(t){var e=Ad.parse(t);return e||[]}Te.extractStackFromError=pa;function ha(t,e){var r=[],n=e&&e.frameContextLines!==void 0?e.frameContextLines:Nd,i=t.map(function(s){var o,a={colno:s.columnNumber,filename:((o=s.fileName)===null||o===void 0?void 0:o.startsWith("file://"))?s.fileName.substr(7):s.fileName||"",function:Fd(s),lineno:s.lineNumber},u=s.native||a.filename&&!a.filename.startsWith("/")&&!a.filename.startsWith(".")&&a.filename.indexOf(":\\")!==1;return a.in_app=!u&&a.filename!==void 0&&a.filename.indexOf("node_modules/")===-1,a.filename&&(a.module=Hd(a.filename),!u&&n>0&&r.indexOf(a.filename)===-1&&r.push(a.filename)),a});if(n<=0)return se.SyncPromise.resolve(i);try{return Ld(r,i,n)}catch{return se.SyncPromise.resolve(i)}}Te.parseStack=ha;function Ld(t,e,r){return new se.SyncPromise(function(n){return Ud(t).then(function(i){var s=e.map(function(o){if(o.filename&&i[o.filename])try{var a=i[o.filename].split(`
20
- `);se.addContextToFrame(a,o,r)}catch{}return o});n(s)})})}function _a(t,e){var r=t.name||t.constructor.name,n=pa(t);return new se.SyncPromise(function(i){return ha(n,e).then(function(s){var o={stacktrace:{frames:va(s)},type:r,value:t.message};i(o)})})}Te.getExceptionFromError=_a;function Bd(t,e){return new se.SyncPromise(function(r){return _a(t,e).then(function(n){r({exception:{values:[n]}})})})}Te.parseError=Bd;function va(t){if(!t||!t.length)return[];var e=t,r=e[0].function||"";return(r.indexOf("captureMessage")!==-1||r.indexOf("captureException")!==-1)&&(e=e.slice(1)),e.reverse()}Te.prepareFramesForEvent=va});var si=p(ii=>{Object.defineProperty(ii,"__esModule",{value:!0});ii.SDK_NAME="sentry.javascript.node"});var Er=p(ai=>{Object.defineProperty(ai,"__esModule",{value:!0});var _e=S(),ga=N(),ma=D(),De=m(),Gd=require("fs"),zd=require("url"),Wd=si(),oi={event:"error",transaction:"transaction",session:"session",attachment:"attachment"},Yd=function(){function t(e){this.options=e,this._buffer=new De.PromiseBuffer(30),this._rateLimits={},this.urlParser=function(r){return new zd.URL(r)},this._api=new ga.API(e.dsn,e._metadata,e.tunnel)}return t.prototype.sendEvent=function(e){throw new De.SentryError("Transport Class has to implement `sendEvent` method.")},t.prototype.close=function(e){return this._buffer.drain(e)},t.prototype._getProxy=function(e){var r,n,i=process.env,s=i.no_proxy,o=i.http_proxy,a=i.https_proxy,u=this.options,c=u.httpProxy,f=u.httpsProxy,l=e==="http"?c||o:f||c||a||o;if(!s)return l;var d=this._api.getDsn(),h=d.host,_=d.port;try{for(var v=_e.__values(s.split(",")),g=v.next();!g.done;g=v.next()){var w=g.value;if(h.endsWith(w)||(h+":"+_).endsWith(w))return}}catch(C){r={error:C}}finally{try{g&&!g.done&&(n=v.return)&&n.call(v)}finally{if(r)throw r.error}}return l},t.prototype._getRequestOptions=function(e){var r=_e.__assign(_e.__assign({},this._api.getRequestHeaders(Wd.SDK_NAME,ga.SDK_VERSION)),this.options.headers),n=e.hostname,i=e.pathname,s=e.port,o=e.protocol,a=""+i;return _e.__assign({agent:this.client,headers:r,hostname:n,method:"POST",path:a,port:s,protocol:o},this.options.caCerts&&{ca:Gd.readFileSync(this.options.caCerts)})},t.prototype._disabledUntil=function(e){var r=oi[e];return this._rateLimits[r]||this._rateLimits.all},t.prototype._isRateLimited=function(e){return this._disabledUntil(e)>new Date(Date.now())},t.prototype._handleRateLimit=function(e){var r,n,i,s,o=Date.now(),a=e["x-sentry-rate-limits"],u=e["retry-after"];if(a){try{for(var c=_e.__values(a.trim().split(",")),f=c.next();!f.done;f=c.next()){var l=f.value,d=l.split(":",2),h=parseInt(d[0],10),_=(isNaN(h)?60:h)*1e3;try{for(var v=(i=void 0,_e.__values(d[1]&&d[1].split(";")||["all"])),g=v.next();!g.done;g=v.next()){var w=g.value,C=_e.__spread(Object.keys(oi).map(function(I){return oi[I]}),["all"]);C.includes(w)&&(this._rateLimits[w]=new Date(o+_))}}catch(I){i={error:I}}finally{try{g&&!g.done&&(s=v.return)&&s.call(v)}finally{if(i)throw i.error}}}}catch(I){r={error:I}}finally{try{f&&!f.done&&(n=c.return)&&n.call(c)}finally{if(r)throw r.error}}return!0}else if(u)return this._rateLimits.all=new Date(o+De.parseRetryAfterHeader(o,u)),!0;return!1},t.prototype._send=function(e,r){return _e.__awaiter(this,void 0,void 0,function(){var n=this;return _e.__generator(this,function(i){if(!this.module)throw new De.SentryError("No module available");return r&&this._isRateLimited(e.type)?[2,Promise.reject({payload:r,type:e.type,reason:"Transport for "+e.type+" requests locked till "+this._disabledUntil(e.type)+" due to too many requests.",status:429})]:[2,this._buffer.add(function(){return new Promise(function(s,o){if(!n.module)throw new De.SentryError("No module available");var a=n._getRequestOptions(n.urlParser(e.url)),u=n.module.request(a,function(c){var f=c.statusCode||500,l=ma.Status.fromHttpCode(f);c.setEncoding("utf8");var d=c.headers?c.headers["retry-after"]:"";d=Array.isArray(d)?d[0]:d;var h=c.headers?c.headers["x-sentry-rate-limits"]:"";h=Array.isArray(h)?h[0]:h;var _={"x-sentry-rate-limits":h,"retry-after":d},v=n._handleRateLimit(_);if(v&&De.logger.warn("Too many "+e.type+" requests, backing off until: "+n._disabledUntil(e.type)),l===ma.Status.Success)s({status:l});else{var g="HTTP Error ("+f+")";c.headers&&c.headers["x-sentry-error"]&&(g+=": "+c.headers["x-sentry-error"]),o(new De.SentryError(g))}c.on("data",function(){}),c.on("end",function(){})});u.on("error",o),u.end(e.body)})})]})})},t}();ai.BaseTransport=Yd});var ba=p((Kg,ya)=>{var it=1e3,st=it*60,ot=st*60,He=ot*24,Vd=He*7,Kd=He*365.25;ya.exports=function(t,e){e=e||{};var r=typeof t;if(r==="string"&&t.length>0)return $d(t);if(r==="number"&&isFinite(t))return e.long?Xd(t):Jd(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function $d(t){if(t=String(t),!(t.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(!!e){var r=parseFloat(e[1]),n=(e[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*Kd;case"weeks":case"week":case"w":return r*Vd;case"days":case"day":case"d":return r*He;case"hours":case"hour":case"hrs":case"hr":case"h":return r*ot;case"minutes":case"minute":case"mins":case"min":case"m":return r*st;case"seconds":case"second":case"secs":case"sec":case"s":return r*it;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function Jd(t){var e=Math.abs(t);return e>=He?Math.round(t/He)+"d":e>=ot?Math.round(t/ot)+"h":e>=st?Math.round(t/st)+"m":e>=it?Math.round(t/it)+"s":t+"ms"}function Xd(t){var e=Math.abs(t);return e>=He?Tr(t,e,He,"day"):e>=ot?Tr(t,e,ot,"hour"):e>=st?Tr(t,e,st,"minute"):e>=it?Tr(t,e,it,"second"):t+" ms"}function Tr(t,e,r,n){var i=e>=r*1.5;return Math.round(t/r)+" "+n+(i?"s":"")}});var ui=p(($g,Sa)=>{function Zd(t){r.debug=r,r.default=r,r.coerce=u,r.disable=s,r.enable=i,r.enabled=o,r.humanize=ba(),r.destroy=c,Object.keys(t).forEach(f=>{r[f]=t[f]}),r.names=[],r.skips=[],r.formatters={};function e(f){let l=0;for(let d=0;d<f.length;d++)l=(l<<5)-l+f.charCodeAt(d),l|=0;return r.colors[Math.abs(l)%r.colors.length]}r.selectColor=e;function r(f){let l,d=null,h,_;function v(...g){if(!v.enabled)return;let w=v,C=Number(new Date),I=C-(l||C);w.diff=I,w.prev=l,w.curr=C,l=C,g[0]=r.coerce(g[0]),typeof g[0]!="string"&&g.unshift("%O");let be=0;g[0]=g[0].replace(/%([a-zA-Z%])/g,(rn,yc)=>{if(rn==="%%")return"%";be++;let bs=r.formatters[yc];if(typeof bs=="function"){let bc=g[be];rn=bs.call(w,bc),g.splice(be,1),be--}return rn}),r.formatArgs.call(w,g),(w.log||r.log).apply(w,g)}return v.namespace=f,v.useColors=r.useColors(),v.color=r.selectColor(f),v.extend=n,v.destroy=r.destroy,Object.defineProperty(v,"enabled",{enumerable:!0,configurable:!1,get:()=>d!==null?d:(h!==r.namespaces&&(h=r.namespaces,_=r.enabled(f)),_),set:g=>{d=g}}),typeof r.init=="function"&&r.init(v),v}function n(f,l){let d=r(this.namespace+(typeof l=="undefined"?":":l)+f);return d.log=this.log,d}function i(f){r.save(f),r.namespaces=f,r.names=[],r.skips=[];let l,d=(typeof f=="string"?f:"").split(/[\s,]+/),h=d.length;for(l=0;l<h;l++)!d[l]||(f=d[l].replace(/\*/g,".*?"),f[0]==="-"?r.skips.push(new RegExp("^"+f.substr(1)+"$")):r.names.push(new RegExp("^"+f+"$")))}function s(){let f=[...r.names.map(a),...r.skips.map(a).map(l=>"-"+l)].join(",");return r.enable(""),f}function o(f){if(f[f.length-1]==="*")return!0;let l,d;for(l=0,d=r.skips.length;l<d;l++)if(r.skips[l].test(f))return!1;for(l=0,d=r.names.length;l<d;l++)if(r.names[l].test(f))return!0;return!1}function a(f){return f.toString().substring(2,f.toString().length-2).replace(/\.\*\?$/,"*")}function u(f){return f instanceof Error?f.stack||f.message:f}function c(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return r.enable(r.load()),r}Sa.exports=Zd});var Ea=p((J,Or)=>{J.formatArgs=ep;J.save=tp;J.load=rp;J.useColors=Qd;J.storage=np();J.destroy=(()=>{let t=!1;return()=>{t||(t=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();J.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function Qd(){return typeof window!="undefined"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document!="undefined"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window!="undefined"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function ep(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+Or.exports.humanize(this.diff),!this.useColors)return;let e="color: "+this.color;t.splice(1,0,e,"color: inherit");let r=0,n=0;t[0].replace(/%[a-zA-Z%]/g,i=>{i!=="%%"&&(r++,i==="%c"&&(n=r))}),t.splice(n,0,e)}J.log=console.debug||console.log||(()=>{});function tp(t){try{t?J.storage.setItem("debug",t):J.storage.removeItem("debug")}catch{}}function rp(){let t;try{t=J.storage.getItem("debug")}catch{}return!t&&typeof process!="undefined"&&"env"in process&&(t=process.env.DEBUG),t}function np(){try{return localStorage}catch{}}Or.exports=ui()(J);var{formatters:ip}=Or.exports;ip.j=function(t){try{return JSON.stringify(t)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var Oa=p((Jg,Ta)=>{"use strict";Ta.exports=(t,e=process.argv)=>{let r=t.startsWith("-")?"":t.length===1?"-":"--",n=e.indexOf(r+t),i=e.indexOf("--");return n!==-1&&(i===-1||n<i)}});var Ca=p((Xg,xa)=>{"use strict";var sp=require("os"),wa=require("tty"),Q=Oa(),{env:M}=process,Oe;Q("no-color")||Q("no-colors")||Q("color=false")||Q("color=never")?Oe=0:(Q("color")||Q("colors")||Q("color=true")||Q("color=always"))&&(Oe=1);"FORCE_COLOR"in M&&(M.FORCE_COLOR==="true"?Oe=1:M.FORCE_COLOR==="false"?Oe=0:Oe=M.FORCE_COLOR.length===0?1:Math.min(parseInt(M.FORCE_COLOR,10),3));function ci(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}function li(t,e){if(Oe===0)return 0;if(Q("color=16m")||Q("color=full")||Q("color=truecolor"))return 3;if(Q("color=256"))return 2;if(t&&!e&&Oe===void 0)return 0;let r=Oe||0;if(M.TERM==="dumb")return r;if(process.platform==="win32"){let n=sp.release().split(".");return Number(n[0])>=10&&Number(n[2])>=10586?Number(n[2])>=14931?3:2:1}if("CI"in M)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(n=>n in M)||M.CI_NAME==="codeship"?1:r;if("TEAMCITY_VERSION"in M)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(M.TEAMCITY_VERSION)?1:0;if(M.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in M){let n=parseInt((M.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(M.TERM_PROGRAM){case"iTerm.app":return n>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(M.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(M.TERM)||"COLORTERM"in M?1:r}function op(t){let e=li(t,t&&t.isTTY);return ci(e)}xa.exports={supportsColor:op,stdout:ci(li(!0,wa.isatty(1))),stderr:ci(li(!0,wa.isatty(2)))}});var Ra=p((j,xr)=>{var ap=require("tty"),wr=require("util");j.init=hp;j.log=fp;j.formatArgs=cp;j.save=dp;j.load=pp;j.useColors=up;j.destroy=wr.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");j.colors=[6,2,3,4,5,1];try{let t=Ca();t&&(t.stderr||t).level>=2&&(j.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}j.inspectOpts=Object.keys(process.env).filter(t=>/^debug_/i.test(t)).reduce((t,e)=>{let r=e.substring(6).toLowerCase().replace(/_([a-z])/g,(i,s)=>s.toUpperCase()),n=process.env[e];return/^(yes|on|true|enabled)$/i.test(n)?n=!0:/^(no|off|false|disabled)$/i.test(n)?n=!1:n==="null"?n=null:n=Number(n),t[r]=n,t},{});function up(){return"colors"in j.inspectOpts?Boolean(j.inspectOpts.colors):ap.isatty(process.stderr.fd)}function cp(t){let{namespace:e,useColors:r}=this;if(r){let n=this.color,i="\x1B[3"+(n<8?n:"8;5;"+n),s=` ${i};1m${e} \x1B[0m`;t[0]=s+t[0].split(`
20
+ `);se.addContextToFrame(a,o,r)}catch{}return o});n(s)})})}function _a(t,e){var r=t.name||t.constructor.name,n=pa(t);return new se.SyncPromise(function(i){return ha(n,e).then(function(s){var o={stacktrace:{frames:va(s)},type:r,value:t.message};i(o)})})}Te.getExceptionFromError=_a;function Bd(t,e){return new se.SyncPromise(function(r){return _a(t,e).then(function(n){r({exception:{values:[n]}})})})}Te.parseError=Bd;function va(t){if(!t||!t.length)return[];var e=t,r=e[0].function||"";return(r.indexOf("captureMessage")!==-1||r.indexOf("captureException")!==-1)&&(e=e.slice(1)),e.reverse()}Te.prepareFramesForEvent=va});var si=p(ii=>{Object.defineProperty(ii,"__esModule",{value:!0});ii.SDK_NAME="sentry.javascript.node"});var Tr=p(ai=>{Object.defineProperty(ai,"__esModule",{value:!0});var _e=S(),ga=N(),ma=D(),De=m(),Gd=require("fs"),zd=require("url"),Wd=si(),oi={event:"error",transaction:"transaction",session:"session",attachment:"attachment"},Yd=function(){function t(e){this.options=e,this._buffer=new De.PromiseBuffer(30),this._rateLimits={},this.urlParser=function(r){return new zd.URL(r)},this._api=new ga.API(e.dsn,e._metadata,e.tunnel)}return t.prototype.sendEvent=function(e){throw new De.SentryError("Transport Class has to implement `sendEvent` method.")},t.prototype.close=function(e){return this._buffer.drain(e)},t.prototype._getProxy=function(e){var r,n,i=process.env,s=i.no_proxy,o=i.http_proxy,a=i.https_proxy,u=this.options,c=u.httpProxy,f=u.httpsProxy,l=e==="http"?c||o:f||c||a||o;if(!s)return l;var d=this._api.getDsn(),h=d.host,_=d.port;try{for(var v=_e.__values(s.split(",")),g=v.next();!g.done;g=v.next()){var w=g.value;if(h.endsWith(w)||(h+":"+_).endsWith(w))return}}catch(C){r={error:C}}finally{try{g&&!g.done&&(n=v.return)&&n.call(v)}finally{if(r)throw r.error}}return l},t.prototype._getRequestOptions=function(e){var r=_e.__assign(_e.__assign({},this._api.getRequestHeaders(Wd.SDK_NAME,ga.SDK_VERSION)),this.options.headers),n=e.hostname,i=e.pathname,s=e.port,o=e.protocol,a=""+i;return _e.__assign({agent:this.client,headers:r,hostname:n,method:"POST",path:a,port:s,protocol:o},this.options.caCerts&&{ca:Gd.readFileSync(this.options.caCerts)})},t.prototype._disabledUntil=function(e){var r=oi[e];return this._rateLimits[r]||this._rateLimits.all},t.prototype._isRateLimited=function(e){return this._disabledUntil(e)>new Date(Date.now())},t.prototype._handleRateLimit=function(e){var r,n,i,s,o=Date.now(),a=e["x-sentry-rate-limits"],u=e["retry-after"];if(a){try{for(var c=_e.__values(a.trim().split(",")),f=c.next();!f.done;f=c.next()){var l=f.value,d=l.split(":",2),h=parseInt(d[0],10),_=(isNaN(h)?60:h)*1e3;try{for(var v=(i=void 0,_e.__values(d[1]&&d[1].split(";")||["all"])),g=v.next();!g.done;g=v.next()){var w=g.value,C=_e.__spread(Object.keys(oi).map(function(I){return oi[I]}),["all"]);C.includes(w)&&(this._rateLimits[w]=new Date(o+_))}}catch(I){i={error:I}}finally{try{g&&!g.done&&(s=v.return)&&s.call(v)}finally{if(i)throw i.error}}}}catch(I){r={error:I}}finally{try{f&&!f.done&&(n=c.return)&&n.call(c)}finally{if(r)throw r.error}}return!0}else if(u)return this._rateLimits.all=new Date(o+De.parseRetryAfterHeader(o,u)),!0;return!1},t.prototype._send=function(e,r){return _e.__awaiter(this,void 0,void 0,function(){var n=this;return _e.__generator(this,function(i){if(!this.module)throw new De.SentryError("No module available");return r&&this._isRateLimited(e.type)?[2,Promise.reject({payload:r,type:e.type,reason:"Transport for "+e.type+" requests locked till "+this._disabledUntil(e.type)+" due to too many requests.",status:429})]:[2,this._buffer.add(function(){return new Promise(function(s,o){if(!n.module)throw new De.SentryError("No module available");var a=n._getRequestOptions(n.urlParser(e.url)),u=n.module.request(a,function(c){var f=c.statusCode||500,l=ma.Status.fromHttpCode(f);c.setEncoding("utf8");var d=c.headers?c.headers["retry-after"]:"";d=Array.isArray(d)?d[0]:d;var h=c.headers?c.headers["x-sentry-rate-limits"]:"";h=Array.isArray(h)?h[0]:h;var _={"x-sentry-rate-limits":h,"retry-after":d},v=n._handleRateLimit(_);if(v&&De.logger.warn("Too many "+e.type+" requests, backing off until: "+n._disabledUntil(e.type)),l===ma.Status.Success)s({status:l});else{var g="HTTP Error ("+f+")";c.headers&&c.headers["x-sentry-error"]&&(g+=": "+c.headers["x-sentry-error"]),o(new De.SentryError(g))}c.on("data",function(){}),c.on("end",function(){})});u.on("error",o),u.end(e.body)})})]})})},t}();ai.BaseTransport=Yd});var ba=p((Kg,ya)=>{var it=1e3,st=it*60,ot=st*60,He=ot*24,Vd=He*7,Kd=He*365.25;ya.exports=function(t,e){e=e||{};var r=typeof t;if(r==="string"&&t.length>0)return $d(t);if(r==="number"&&isFinite(t))return e.long?Xd(t):Jd(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function $d(t){if(t=String(t),!(t.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(!!e){var r=parseFloat(e[1]),n=(e[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*Kd;case"weeks":case"week":case"w":return r*Vd;case"days":case"day":case"d":return r*He;case"hours":case"hour":case"hrs":case"hr":case"h":return r*ot;case"minutes":case"minute":case"mins":case"min":case"m":return r*st;case"seconds":case"second":case"secs":case"sec":case"s":return r*it;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function Jd(t){var e=Math.abs(t);return e>=He?Math.round(t/He)+"d":e>=ot?Math.round(t/ot)+"h":e>=st?Math.round(t/st)+"m":e>=it?Math.round(t/it)+"s":t+"ms"}function Xd(t){var e=Math.abs(t);return e>=He?Or(t,e,He,"day"):e>=ot?Or(t,e,ot,"hour"):e>=st?Or(t,e,st,"minute"):e>=it?Or(t,e,it,"second"):t+" ms"}function Or(t,e,r,n){var i=e>=r*1.5;return Math.round(t/r)+" "+n+(i?"s":"")}});var ui=p(($g,Sa)=>{function Zd(t){r.debug=r,r.default=r,r.coerce=u,r.disable=s,r.enable=i,r.enabled=o,r.humanize=ba(),r.destroy=c,Object.keys(t).forEach(f=>{r[f]=t[f]}),r.names=[],r.skips=[],r.formatters={};function e(f){let l=0;for(let d=0;d<f.length;d++)l=(l<<5)-l+f.charCodeAt(d),l|=0;return r.colors[Math.abs(l)%r.colors.length]}r.selectColor=e;function r(f){let l,d=null,h,_;function v(...g){if(!v.enabled)return;let w=v,C=Number(new Date),I=C-(l||C);w.diff=I,w.prev=l,w.curr=C,l=C,g[0]=r.coerce(g[0]),typeof g[0]!="string"&&g.unshift("%O");let be=0;g[0]=g[0].replace(/%([a-zA-Z%])/g,(rn,yc)=>{if(rn==="%%")return"%";be++;let bs=r.formatters[yc];if(typeof bs=="function"){let bc=g[be];rn=bs.call(w,bc),g.splice(be,1),be--}return rn}),r.formatArgs.call(w,g),(w.log||r.log).apply(w,g)}return v.namespace=f,v.useColors=r.useColors(),v.color=r.selectColor(f),v.extend=n,v.destroy=r.destroy,Object.defineProperty(v,"enabled",{enumerable:!0,configurable:!1,get:()=>d!==null?d:(h!==r.namespaces&&(h=r.namespaces,_=r.enabled(f)),_),set:g=>{d=g}}),typeof r.init=="function"&&r.init(v),v}function n(f,l){let d=r(this.namespace+(typeof l=="undefined"?":":l)+f);return d.log=this.log,d}function i(f){r.save(f),r.namespaces=f,r.names=[],r.skips=[];let l,d=(typeof f=="string"?f:"").split(/[\s,]+/),h=d.length;for(l=0;l<h;l++)!d[l]||(f=d[l].replace(/\*/g,".*?"),f[0]==="-"?r.skips.push(new RegExp("^"+f.substr(1)+"$")):r.names.push(new RegExp("^"+f+"$")))}function s(){let f=[...r.names.map(a),...r.skips.map(a).map(l=>"-"+l)].join(",");return r.enable(""),f}function o(f){if(f[f.length-1]==="*")return!0;let l,d;for(l=0,d=r.skips.length;l<d;l++)if(r.skips[l].test(f))return!1;for(l=0,d=r.names.length;l<d;l++)if(r.names[l].test(f))return!0;return!1}function a(f){return f.toString().substring(2,f.toString().length-2).replace(/\.\*\?$/,"*")}function u(f){return f instanceof Error?f.stack||f.message:f}function c(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return r.enable(r.load()),r}Sa.exports=Zd});var Ea=p((J,wr)=>{J.formatArgs=ep;J.save=tp;J.load=rp;J.useColors=Qd;J.storage=np();J.destroy=(()=>{let t=!1;return()=>{t||(t=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})();J.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"];function Qd(){return typeof window!="undefined"&&window.process&&(window.process.type==="renderer"||window.process.__nwjs)?!0:typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)?!1:typeof document!="undefined"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window!="undefined"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function ep(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+wr.exports.humanize(this.diff),!this.useColors)return;let e="color: "+this.color;t.splice(1,0,e,"color: inherit");let r=0,n=0;t[0].replace(/%[a-zA-Z%]/g,i=>{i!=="%%"&&(r++,i==="%c"&&(n=r))}),t.splice(n,0,e)}J.log=console.debug||console.log||(()=>{});function tp(t){try{t?J.storage.setItem("debug",t):J.storage.removeItem("debug")}catch{}}function rp(){let t;try{t=J.storage.getItem("debug")}catch{}return!t&&typeof process!="undefined"&&"env"in process&&(t=process.env.DEBUG),t}function np(){try{return localStorage}catch{}}wr.exports=ui()(J);var{formatters:ip}=wr.exports;ip.j=function(t){try{return JSON.stringify(t)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}});var Oa=p((Jg,Ta)=>{"use strict";Ta.exports=(t,e=process.argv)=>{let r=t.startsWith("-")?"":t.length===1?"-":"--",n=e.indexOf(r+t),i=e.indexOf("--");return n!==-1&&(i===-1||n<i)}});var Ca=p((Xg,xa)=>{"use strict";var sp=require("os"),wa=require("tty"),Q=Oa(),{env:M}=process,Oe;Q("no-color")||Q("no-colors")||Q("color=false")||Q("color=never")?Oe=0:(Q("color")||Q("colors")||Q("color=true")||Q("color=always"))&&(Oe=1);"FORCE_COLOR"in M&&(M.FORCE_COLOR==="true"?Oe=1:M.FORCE_COLOR==="false"?Oe=0:Oe=M.FORCE_COLOR.length===0?1:Math.min(parseInt(M.FORCE_COLOR,10),3));function ci(t){return t===0?!1:{level:t,hasBasic:!0,has256:t>=2,has16m:t>=3}}function li(t,e){if(Oe===0)return 0;if(Q("color=16m")||Q("color=full")||Q("color=truecolor"))return 3;if(Q("color=256"))return 2;if(t&&!e&&Oe===void 0)return 0;let r=Oe||0;if(M.TERM==="dumb")return r;if(process.platform==="win32"){let n=sp.release().split(".");return Number(n[0])>=10&&Number(n[2])>=10586?Number(n[2])>=14931?3:2:1}if("CI"in M)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(n=>n in M)||M.CI_NAME==="codeship"?1:r;if("TEAMCITY_VERSION"in M)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(M.TEAMCITY_VERSION)?1:0;if(M.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in M){let n=parseInt((M.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(M.TERM_PROGRAM){case"iTerm.app":return n>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(M.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(M.TERM)||"COLORTERM"in M?1:r}function op(t){let e=li(t,t&&t.isTTY);return ci(e)}xa.exports={supportsColor:op,stdout:ci(li(!0,wa.isatty(1))),stderr:ci(li(!0,wa.isatty(2)))}});var Ra=p((j,Cr)=>{var ap=require("tty"),xr=require("util");j.init=hp;j.log=fp;j.formatArgs=cp;j.save=dp;j.load=pp;j.useColors=up;j.destroy=xr.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");j.colors=[6,2,3,4,5,1];try{let t=Ca();t&&(t.stderr||t).level>=2&&(j.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch{}j.inspectOpts=Object.keys(process.env).filter(t=>/^debug_/i.test(t)).reduce((t,e)=>{let r=e.substring(6).toLowerCase().replace(/_([a-z])/g,(i,s)=>s.toUpperCase()),n=process.env[e];return/^(yes|on|true|enabled)$/i.test(n)?n=!0:/^(no|off|false|disabled)$/i.test(n)?n=!1:n==="null"?n=null:n=Number(n),t[r]=n,t},{});function up(){return"colors"in j.inspectOpts?Boolean(j.inspectOpts.colors):ap.isatty(process.stderr.fd)}function cp(t){let{namespace:e,useColors:r}=this;if(r){let n=this.color,i="\x1B[3"+(n<8?n:"8;5;"+n),s=` ${i};1m${e} \x1B[0m`;t[0]=s+t[0].split(`
21
21
  `).join(`
22
- `+s),t.push(i+"m+"+xr.exports.humanize(this.diff)+"\x1B[0m")}else t[0]=lp()+e+" "+t[0]}function lp(){return j.inspectOpts.hideDate?"":new Date().toISOString()+" "}function fp(...t){return process.stderr.write(wr.format(...t)+`
23
- `)}function dp(t){t?process.env.DEBUG=t:delete process.env.DEBUG}function pp(){return process.env.DEBUG}function hp(t){t.inspectOpts={};let e=Object.keys(j.inspectOpts);for(let r=0;r<e.length;r++)t.inspectOpts[e[r]]=j.inspectOpts[e[r]]}xr.exports=ui()(j);var{formatters:Ia}=xr.exports;Ia.o=function(t){return this.inspectOpts.colors=this.useColors,wr.inspect(t,this.inspectOpts).split(`
24
- `).map(e=>e.trim()).join(" ")};Ia.O=function(t){return this.inspectOpts.colors=this.useColors,wr.inspect(t,this.inspectOpts)}});var Cr=p((Zg,fi)=>{typeof process=="undefined"||process.type==="renderer"||process.browser===!0||process.__nwjs?fi.exports=Ea():fi.exports=Ra()});var qa=p(di=>{"use strict";Object.defineProperty(di,"__esModule",{value:!0});function _p(t){return function(e,r){return new Promise((n,i)=>{t.call(this,e,r,(s,o)=>{s?i(s):n(o)})})}}di.default=_p});var Ma=p((hi,Pa)=>{"use strict";var ka=hi&&hi.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},vp=require("events"),gp=ka(Cr()),mp=ka(qa()),Tt=gp.default("agent-base");function yp(t){return Boolean(t)&&typeof t.addRequest=="function"}function pi(){let{stack:t}=new Error;return typeof t!="string"?!1:t.split(`
25
- `).some(e=>e.indexOf("(https.js:")!==-1||e.indexOf("node:https:")!==-1)}function Ir(t,e){return new Ir.Agent(t,e)}(function(t){class e extends vp.EventEmitter{constructor(n,i){super();let s=i;typeof n=="function"?this.callback=n:n&&(s=n),this.timeout=null,s&&typeof s.timeout=="number"&&(this.timeout=s.timeout),this.maxFreeSockets=1,this.maxSockets=1,this.maxTotalSockets=1/0,this.sockets={},this.freeSockets={},this.requests={},this.options={}}get defaultPort(){return typeof this.explicitDefaultPort=="number"?this.explicitDefaultPort:pi()?443:80}set defaultPort(n){this.explicitDefaultPort=n}get protocol(){return typeof this.explicitProtocol=="string"?this.explicitProtocol:pi()?"https:":"http:"}set protocol(n){this.explicitProtocol=n}callback(n,i,s){throw new Error('"agent-base" has no default implementation, you must subclass and override `callback()`')}addRequest(n,i){let s=Object.assign({},i);typeof s.secureEndpoint!="boolean"&&(s.secureEndpoint=pi()),s.host==null&&(s.host="localhost"),s.port==null&&(s.port=s.secureEndpoint?443:80),s.protocol==null&&(s.protocol=s.secureEndpoint?"https:":"http:"),s.host&&s.path&&delete s.path,delete s.agent,delete s.hostname,delete s._defaultAgent,delete s.defaultPort,delete s.createConnection,n._last=!0,n.shouldKeepAlive=!1;let o=!1,a=null,u=s.timeout||this.timeout,c=h=>{n._hadError||(n.emit("error",h),n._hadError=!0)},f=()=>{a=null,o=!0;let h=new Error(`A "socket" was not created for HTTP request before ${u}ms`);h.code="ETIMEOUT",c(h)},l=h=>{o||(a!==null&&(clearTimeout(a),a=null),c(h))},d=h=>{if(o)return;if(a!=null&&(clearTimeout(a),a=null),yp(h)){Tt("Callback returned another Agent instance %o",h.constructor.name),h.addRequest(n,s);return}if(h){h.once("free",()=>{this.freeSocket(h,s)}),n.onSocket(h);return}let _=new Error(`no Duplex stream was returned to agent-base for \`${n.method} ${n.path}\``);c(_)};if(typeof this.callback!="function"){c(new Error("`callback` is not defined"));return}this.promisifiedCallback||(this.callback.length>=3?(Tt("Converting legacy callback function to promise"),this.promisifiedCallback=mp.default(this.callback)):this.promisifiedCallback=this.callback),typeof u=="number"&&u>0&&(a=setTimeout(f,u)),"port"in s&&typeof s.port!="number"&&(s.port=Number(s.port));try{Tt("Resolving socket for %o request: %o",s.protocol,`${n.method} ${n.path}`),Promise.resolve(this.promisifiedCallback(n,s)).then(d,l)}catch(h){Promise.reject(h).catch(l)}}freeSocket(n,i){Tt("Freeing socket %o %o",n.constructor.name,i),n.destroy()}destroy(){Tt("Destroying agent %o",this.constructor.name)}}t.Agent=e,t.prototype=t.Agent.prototype})(Ir||(Ir={}));Pa.exports=Ir});var Aa=p(wt=>{"use strict";var bp=wt&&wt.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(wt,"__esModule",{value:!0});var Sp=bp(Cr()),Ot=Sp.default("https-proxy-agent:parse-proxy-response");function Ep(t){return new Promise((e,r)=>{let n=0,i=[];function s(){let l=t.read();l?f(l):t.once("readable",s)}function o(){t.removeListener("end",u),t.removeListener("error",c),t.removeListener("close",a),t.removeListener("readable",s)}function a(l){Ot("onclose had error %o",l)}function u(){Ot("onend")}function c(l){o(),Ot("onerror %o",l),r(l)}function f(l){i.push(l),n+=l.length;let d=Buffer.concat(i,n);if(d.indexOf(`\r
22
+ `+s),t.push(i+"m+"+Cr.exports.humanize(this.diff)+"\x1B[0m")}else t[0]=lp()+e+" "+t[0]}function lp(){return j.inspectOpts.hideDate?"":new Date().toISOString()+" "}function fp(...t){return process.stderr.write(xr.format(...t)+`
23
+ `)}function dp(t){t?process.env.DEBUG=t:delete process.env.DEBUG}function pp(){return process.env.DEBUG}function hp(t){t.inspectOpts={};let e=Object.keys(j.inspectOpts);for(let r=0;r<e.length;r++)t.inspectOpts[e[r]]=j.inspectOpts[e[r]]}Cr.exports=ui()(j);var{formatters:Ia}=Cr.exports;Ia.o=function(t){return this.inspectOpts.colors=this.useColors,xr.inspect(t,this.inspectOpts).split(`
24
+ `).map(e=>e.trim()).join(" ")};Ia.O=function(t){return this.inspectOpts.colors=this.useColors,xr.inspect(t,this.inspectOpts)}});var Ir=p((Zg,fi)=>{typeof process=="undefined"||process.type==="renderer"||process.browser===!0||process.__nwjs?fi.exports=Ea():fi.exports=Ra()});var qa=p(di=>{"use strict";Object.defineProperty(di,"__esModule",{value:!0});function _p(t){return function(e,r){return new Promise((n,i)=>{t.call(this,e,r,(s,o)=>{s?i(s):n(o)})})}}di.default=_p});var Ma=p((hi,Pa)=>{"use strict";var ka=hi&&hi.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},vp=require("events"),gp=ka(Ir()),mp=ka(qa()),Ot=gp.default("agent-base");function yp(t){return Boolean(t)&&typeof t.addRequest=="function"}function pi(){let{stack:t}=new Error;return typeof t!="string"?!1:t.split(`
25
+ `).some(e=>e.indexOf("(https.js:")!==-1||e.indexOf("node:https:")!==-1)}function Rr(t,e){return new Rr.Agent(t,e)}(function(t){class e extends vp.EventEmitter{constructor(n,i){super();let s=i;typeof n=="function"?this.callback=n:n&&(s=n),this.timeout=null,s&&typeof s.timeout=="number"&&(this.timeout=s.timeout),this.maxFreeSockets=1,this.maxSockets=1,this.maxTotalSockets=1/0,this.sockets={},this.freeSockets={},this.requests={},this.options={}}get defaultPort(){return typeof this.explicitDefaultPort=="number"?this.explicitDefaultPort:pi()?443:80}set defaultPort(n){this.explicitDefaultPort=n}get protocol(){return typeof this.explicitProtocol=="string"?this.explicitProtocol:pi()?"https:":"http:"}set protocol(n){this.explicitProtocol=n}callback(n,i,s){throw new Error('"agent-base" has no default implementation, you must subclass and override `callback()`')}addRequest(n,i){let s=Object.assign({},i);typeof s.secureEndpoint!="boolean"&&(s.secureEndpoint=pi()),s.host==null&&(s.host="localhost"),s.port==null&&(s.port=s.secureEndpoint?443:80),s.protocol==null&&(s.protocol=s.secureEndpoint?"https:":"http:"),s.host&&s.path&&delete s.path,delete s.agent,delete s.hostname,delete s._defaultAgent,delete s.defaultPort,delete s.createConnection,n._last=!0,n.shouldKeepAlive=!1;let o=!1,a=null,u=s.timeout||this.timeout,c=h=>{n._hadError||(n.emit("error",h),n._hadError=!0)},f=()=>{a=null,o=!0;let h=new Error(`A "socket" was not created for HTTP request before ${u}ms`);h.code="ETIMEOUT",c(h)},l=h=>{o||(a!==null&&(clearTimeout(a),a=null),c(h))},d=h=>{if(o)return;if(a!=null&&(clearTimeout(a),a=null),yp(h)){Ot("Callback returned another Agent instance %o",h.constructor.name),h.addRequest(n,s);return}if(h){h.once("free",()=>{this.freeSocket(h,s)}),n.onSocket(h);return}let _=new Error(`no Duplex stream was returned to agent-base for \`${n.method} ${n.path}\``);c(_)};if(typeof this.callback!="function"){c(new Error("`callback` is not defined"));return}this.promisifiedCallback||(this.callback.length>=3?(Ot("Converting legacy callback function to promise"),this.promisifiedCallback=mp.default(this.callback)):this.promisifiedCallback=this.callback),typeof u=="number"&&u>0&&(a=setTimeout(f,u)),"port"in s&&typeof s.port!="number"&&(s.port=Number(s.port));try{Ot("Resolving socket for %o request: %o",s.protocol,`${n.method} ${n.path}`),Promise.resolve(this.promisifiedCallback(n,s)).then(d,l)}catch(h){Promise.reject(h).catch(l)}}freeSocket(n,i){Ot("Freeing socket %o %o",n.constructor.name,i),n.destroy()}destroy(){Ot("Destroying agent %o",this.constructor.name)}}t.Agent=e,t.prototype=t.Agent.prototype})(Rr||(Rr={}));Pa.exports=Rr});var Aa=p(xt=>{"use strict";var bp=xt&&xt.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(xt,"__esModule",{value:!0});var Sp=bp(Ir()),wt=Sp.default("https-proxy-agent:parse-proxy-response");function Ep(t){return new Promise((e,r)=>{let n=0,i=[];function s(){let l=t.read();l?f(l):t.once("readable",s)}function o(){t.removeListener("end",u),t.removeListener("error",c),t.removeListener("close",a),t.removeListener("readable",s)}function a(l){wt("onclose had error %o",l)}function u(){wt("onend")}function c(l){o(),wt("onerror %o",l),r(l)}function f(l){i.push(l),n+=l.length;let d=Buffer.concat(i,n);if(d.indexOf(`\r
26
26
  \r
27
- `)===-1){Ot("have not received end of HTTP headers yet..."),s();return}let _=d.toString("ascii",0,d.indexOf(`\r
28
- `)),v=+_.split(" ")[1];Ot("got proxy server response: %o",_),e({statusCode:v,buffered:d})}t.on("error",c),t.on("close",a),t.on("end",u),s()})}wt.default=Ep});var Da=p(Ue=>{"use strict";var Tp=Ue&&Ue.__awaiter||function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(f){try{c(n.next(f))}catch(l){o(l)}}function u(f){try{c(n.throw(f))}catch(l){o(l)}}function c(f){f.done?s(f.value):i(f.value).then(a,u)}c((n=n.apply(t,e||[])).next())})},at=Ue&&Ue.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Ue,"__esModule",{value:!0});var Na=at(require("net")),ja=at(require("tls")),Op=at(require("url")),wp=at(require("assert")),xp=at(Cr()),Cp=Ma(),Ip=at(Aa()),xt=xp.default("https-proxy-agent:agent"),Fa=class extends Cp.Agent{constructor(e){let r;if(typeof e=="string"?r=Op.default.parse(e):r=e,!r)throw new Error("an HTTP(S) proxy server `host` and `port` must be specified!");xt("creating new HttpsProxyAgent instance: %o",r);super(r);let n=Object.assign({},r);this.secureProxy=r.secureProxy||kp(n.protocol),n.host=n.hostname||n.host,typeof n.port=="string"&&(n.port=parseInt(n.port,10)),!n.port&&n.host&&(n.port=this.secureProxy?443:80),this.secureProxy&&!("ALPNProtocols"in n)&&(n.ALPNProtocols=["http 1.1"]),n.host&&n.path&&(delete n.path,delete n.pathname),this.proxy=n}callback(e,r){return Tp(this,void 0,void 0,function*(){let{proxy:n,secureProxy:i}=this,s;i?(xt("Creating `tls.Socket`: %o",n),s=ja.default.connect(n)):(xt("Creating `net.Socket`: %o",n),s=Na.default.connect(n));let o=Object.assign({},n.headers),u=`CONNECT ${`${r.host}:${r.port}`} HTTP/1.1\r
27
+ `)===-1){wt("have not received end of HTTP headers yet..."),s();return}let _=d.toString("ascii",0,d.indexOf(`\r
28
+ `)),v=+_.split(" ")[1];wt("got proxy server response: %o",_),e({statusCode:v,buffered:d})}t.on("error",c),t.on("close",a),t.on("end",u),s()})}xt.default=Ep});var Da=p(Ue=>{"use strict";var Tp=Ue&&Ue.__awaiter||function(t,e,r,n){function i(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(f){try{c(n.next(f))}catch(l){o(l)}}function u(f){try{c(n.throw(f))}catch(l){o(l)}}function c(f){f.done?s(f.value):i(f.value).then(a,u)}c((n=n.apply(t,e||[])).next())})},at=Ue&&Ue.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(Ue,"__esModule",{value:!0});var Na=at(require("net")),ja=at(require("tls")),Op=at(require("url")),wp=at(require("assert")),xp=at(Ir()),Cp=Ma(),Ip=at(Aa()),Ct=xp.default("https-proxy-agent:agent"),Fa=class extends Cp.Agent{constructor(e){let r;if(typeof e=="string"?r=Op.default.parse(e):r=e,!r)throw new Error("an HTTP(S) proxy server `host` and `port` must be specified!");Ct("creating new HttpsProxyAgent instance: %o",r);super(r);let n=Object.assign({},r);this.secureProxy=r.secureProxy||kp(n.protocol),n.host=n.hostname||n.host,typeof n.port=="string"&&(n.port=parseInt(n.port,10)),!n.port&&n.host&&(n.port=this.secureProxy?443:80),this.secureProxy&&!("ALPNProtocols"in n)&&(n.ALPNProtocols=["http 1.1"]),n.host&&n.path&&(delete n.path,delete n.pathname),this.proxy=n}callback(e,r){return Tp(this,void 0,void 0,function*(){let{proxy:n,secureProxy:i}=this,s;i?(Ct("Creating `tls.Socket`: %o",n),s=ja.default.connect(n)):(Ct("Creating `net.Socket`: %o",n),s=Na.default.connect(n));let o=Object.assign({},n.headers),u=`CONNECT ${`${r.host}:${r.port}`} HTTP/1.1\r
29
29
  `;n.auth&&(o["Proxy-Authorization"]=`Basic ${Buffer.from(n.auth).toString("base64")}`);let{host:c,port:f,secureEndpoint:l}=r;qp(f,l)||(c+=`:${f}`),o.Host=c,o.Connection="close";for(let g of Object.keys(o))u+=`${g}: ${o[g]}\r
30
30
  `;let d=Ip.default(s);s.write(`${u}\r
31
- `);let{statusCode:h,buffered:_}=yield d;if(h===200){if(e.once("socket",Rp),r.secureEndpoint){let g=r.servername||r.host;if(!g)throw new Error('Could not determine "servername"');return xt("Upgrading socket connection to TLS"),ja.default.connect(Object.assign(Object.assign({},Pp(r,"host","hostname","path","port")),{socket:s,servername:g}))}return s}s.destroy();let v=new Na.default.Socket;return v.readable=!0,e.once("socket",g=>{xt("replaying proxy buffer for failed request"),wp.default(g.listenerCount("data")>0),g.push(_),g.push(null)}),v})}};Ue.default=Fa;function Rp(t){t.resume()}function qp(t,e){return Boolean(!e&&t===80||e&&t===443)}function kp(t){return typeof t=="string"?/^https:?$/i.test(t):!1}function Pp(t,...e){let r={},n;for(n in t)e.includes(n)||(r[n]=t[n]);return r}});var mi=p((gi,Ha)=>{"use strict";var Mp=gi&&gi.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},_i=Mp(Da());function vi(t){return new _i.default(t)}(function(t){t.HttpsProxyAgent=_i.default,t.prototype=_i.default.prototype})(vi||(vi={}));Ha.exports=vi});var Ba=p(yi=>{Object.defineProperty(yi,"__esModule",{value:!0});var Ap=S(),Ua=N(),La=require("http"),Np=Er(),jp=function(t){Ap.__extends(e,t);function e(r){var n=t.call(this,r)||this;n.options=r;var i=n._getProxy("http");return n.module=La,n.client=i?new(mi())(i):new La.Agent({keepAlive:!1,maxSockets:30,timeout:2e3}),n}return e.prototype.sendEvent=function(r){return this._send(Ua.eventToSentryRequest(r,this._api),r)},e.prototype.sendSession=function(r){return this._send(Ua.sessionToSentryRequest(r,this._api),r)},e}(Np.BaseTransport);yi.HTTPTransport=jp});var Wa=p(bi=>{Object.defineProperty(bi,"__esModule",{value:!0});var Fp=S(),Ga=N(),za=require("https"),Dp=Er(),Hp=function(t){Fp.__extends(e,t);function e(r){var n=t.call(this,r)||this;n.options=r;var i=n._getProxy("https");return n.module=za,n.client=i?new(mi())(i):new za.Agent({keepAlive:!1,maxSockets:30,timeout:2e3}),n}return e.prototype.sendEvent=function(r){return this._send(Ga.eventToSentryRequest(r,this._api),r)},e.prototype.sendSession=function(r){return this._send(Ga.sessionToSentryRequest(r,this._api),r)},e}(Dp.BaseTransport);bi.HTTPSTransport=Hp});var Si=p(Ct=>{Object.defineProperty(Ct,"__esModule",{value:!0});var Up=Er();Ct.BaseTransport=Up.BaseTransport;var Lp=Ba();Ct.HTTPTransport=Lp.HTTPTransport;var Bp=Wa();Ct.HTTPSTransport=Bp.HTTPSTransport});var Ti=p(Ei=>{Object.defineProperty(Ei,"__esModule",{value:!0});var we=S(),Ya=N(),Gp=D(),ve=m(),Rr=ni(),Va=Si(),zp=function(t){we.__extends(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.eventFromException=function(r,n){var i=this,s=r,o=n&&n.data&&n.data.mechanism,a=o||{handled:!0,type:"generic"};if(!ve.isError(r)){if(ve.isPlainObject(r)){var u="Non-Error exception captured with keys: "+ve.extractExceptionKeysForMessage(r);Ya.getCurrentHub().configureScope(function(c){c.setExtra("__serialized__",ve.normalizeToSize(r))}),s=n&&n.syntheticException||new Error(u),s.message=u}else s=n&&n.syntheticException||new Error(r),s.message=r;a.synthetic=!0}return new ve.SyncPromise(function(c,f){return Rr.parseError(s,i._options).then(function(l){ve.addExceptionTypeValue(l,void 0,void 0),ve.addExceptionMechanism(l,a),c(we.__assign(we.__assign({},l),{event_id:n&&n.event_id}))}).then(null,f)})},e.prototype.eventFromMessage=function(r,n,i){var s=this;n===void 0&&(n=Gp.Severity.Info);var o={event_id:i&&i.event_id,level:n,message:r};return new ve.SyncPromise(function(a){if(s._options.attachStacktrace&&i&&i.syntheticException){var u=i.syntheticException?Rr.extractStackFromError(i.syntheticException):[];Rr.parseStack(u,s._options).then(function(c){o.stacktrace={frames:Rr.prepareFramesForEvent(c)},a(o)}).then(null,function(){a(o)})}else a(o)})},e.prototype._setupTransport=function(){if(!this._options.dsn)return t.prototype._setupTransport.call(this);var r=new ve.Dsn(this._options.dsn),n=we.__assign(we.__assign(we.__assign(we.__assign(we.__assign({},this._options.transportOptions),this._options.httpProxy&&{httpProxy:this._options.httpProxy}),this._options.httpsProxy&&{httpsProxy:this._options.httpsProxy}),this._options.caCerts&&{caCerts:this._options.caCerts}),{dsn:this._options.dsn,tunnel:this._options.tunnel,_metadata:this._options._metadata});return this._options.transport?new this._options.transport(n):r.protocol==="http"?new Va.HTTPTransport(n):new Va.HTTPSTransport(n)},e}(Ya.BaseBackend);Ei.NodeBackend=zp});var xi=p(wi=>{Object.defineProperty(wi,"__esModule",{value:!0});var Wp=S(),Oi=N(),Yp=V(),qr=D(),Ka=m(),Vp=Ti(),Kp=function(t){Wp.__extends(e,t);function e(r){var n=this;return r._metadata=r._metadata||{},r._metadata.sdk=r._metadata.sdk||{name:"sentry.javascript.node",packages:[{name:"npm:@sentry/node",version:Oi.SDK_VERSION}],version:Oi.SDK_VERSION},n=t.call(this,Vp.NodeBackend,r)||this,n}return e.prototype.captureException=function(r,n,i){if(this._options.autoSessionTracking&&this._sessionFlusher&&i){var s=i.getRequestSession();s&&s.status===qr.RequestSessionStatus.Ok&&(s.status=qr.RequestSessionStatus.Errored)}return t.prototype.captureException.call(this,r,n,i)},e.prototype.captureEvent=function(r,n,i){if(this._options.autoSessionTracking&&this._sessionFlusher&&i){var s=r.type||"exception",o=s==="exception"&&r.exception&&r.exception.values&&r.exception.values.length>0;if(o){var a=i.getRequestSession();a&&a.status===qr.RequestSessionStatus.Ok&&(a.status=qr.RequestSessionStatus.Errored)}}return t.prototype.captureEvent.call(this,r,n,i)},e.prototype.close=function(r){var n;return(n=this._sessionFlusher)===null||n===void 0||n.close(),t.prototype.close.call(this,r)},e.prototype.initSessionFlusher=function(){var r=this._options,n=r.release,i=r.environment;n?this._sessionFlusher=new Yp.SessionFlusher(this.getTransport(),{release:n,environment:i}):Ka.logger.warn("Cannot initialise an instance of SessionFlusher if no release is provided!")},e.prototype._prepareEvent=function(r,n,i){return r.platform=r.platform||"node",this.getOptions().serverName&&(r.server_name=this.getOptions().serverName),t.prototype._prepareEvent.call(this,r,n,i)},e.prototype._captureRequestSession=function(){this._sessionFlusher?this._sessionFlusher.incrementSessionStatusCount():Ka.logger.warn("Discarded request mode session because autoSessionTracking option was disabled")},e}(Oi.BaseClient);wi.NodeClient=Kp});var Za=p(Ci=>{Object.defineProperty(Ci,"__esModule",{value:!0});var $a=S(),Ja=N(),It=D(),$p=m(),Jp=require("util"),Xa=function(){function t(){this.name=t.id}return t.prototype.setupOnce=function(){var e,r;try{for(var n=$a.__values(["debug","info","warn","error","log"]),i=n.next();!i.done;i=n.next()){var s=i.value;$p.fill(console,s,Xp(s))}}catch(o){e={error:o}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(e)throw e.error}}},t.id="Console",t}();Ci.Console=Xa;function Xp(t){return function(r){var n;switch(t){case"debug":n=It.Severity.Debug;break;case"error":n=It.Severity.Error;break;case"info":n=It.Severity.Info;break;case"warn":n=It.Severity.Warning;break;default:n=It.Severity.Log}return function(){Ja.getCurrentHub().getIntegration(Xa)&&Ja.getCurrentHub().addBreadcrumb({category:"console",level:n,message:Jp.format.apply(void 0,arguments)},{input:$a.__spread(arguments),level:t}),r.apply(this,arguments)}}}});var ru=p(Le=>{Object.defineProperty(Le,"__esModule",{value:!0});var Ii=S(),Zp=N(),Qp=m(),Qa=require("url"),eu=Qp.parseSemver(process.versions.node);function eh(t){var e,r=(e=Zp.getCurrentHub().getClient())===null||e===void 0?void 0:e.getDsn();return r?t.includes(r.host):!1}Le.isSentryRequest=eh;function tu(t){var e=t.protocol||"",r=t.hostname||t.host||"",n=!t.port||t.port===80||t.port===443?"":":"+t.port,i=t.path?t.path:"/";return e+"//"+r+n+i}Le.extractUrl=tu;function th(t,e,r){var n,i,s;if(!t)return t;var o=Ii.__read(t.split(" "),2),a=o[0],u=o[1];return e.host&&!e.protocol&&(e.protocol=(i=(n=r)===null||n===void 0?void 0:n.agent)===null||i===void 0?void 0:i.protocol,u=tu(e)),((s=u)===null||s===void 0?void 0:s.startsWith("///"))&&(u=u.slice(2)),a+" "+u}Le.cleanSpanDescription=th;function Ri(t){var e={protocol:t.protocol,hostname:typeof t.hostname=="string"&&t.hostname.startsWith("[")?t.hostname.slice(1,-1):t.hostname,hash:t.hash,search:t.search,pathname:t.pathname,path:""+(t.pathname||"")+(t.search||""),href:t.href};return t.port!==""&&(e.port=Number(t.port)),(t.username||t.password)&&(e.auth=t.username+":"+t.password),e}Le.urlToOptions=Ri;function rh(t,e){var r,n,i,s,o,a,u,c,f,l;return typeof e[e.length-1]=="function"&&(f=e.pop()),typeof e[0]=="string"?l=Ri(new Qa.URL(e[0])):e[0]instanceof Qa.URL?l=Ri(e[0]):l=e[0],e.length===2&&(l=Ii.__assign(Ii.__assign({},l),e[1])),l.protocol===void 0&&(eu.major&&eu.major>8?l.protocol=((n=(r=t)===null||r===void 0?void 0:r.globalAgent)===null||n===void 0?void 0:n.protocol)||((i=l.agent)===null||i===void 0?void 0:i.protocol)||((s=l._defaultAgent)===null||s===void 0?void 0:s.protocol):l.protocol=((o=l.agent)===null||o===void 0?void 0:o.protocol)||((a=l._defaultAgent)===null||a===void 0?void 0:a.protocol)||((c=(u=t)===null||u===void 0?void 0:u.globalAgent)===null||c===void 0?void 0:c.protocol)),f?[l,f]:[l]}Le.normalizeRequestArgs=rh});var au=p(ki=>{Object.defineProperty(ki,"__esModule",{value:!0});var nu=S(),qi=N(),ut=m(),Rt=ru(),iu=ut.parseSemver(process.versions.node),su=function(){function t(e){e===void 0&&(e={}),this.name=t.id,this._breadcrumbs=typeof e.breadcrumbs=="undefined"?!0:e.breadcrumbs,this._tracing=typeof e.tracing=="undefined"?!1:e.tracing}return t.prototype.setupOnce=function(){if(!(!this._breadcrumbs&&!this._tracing)){var e=nh(this._breadcrumbs,this._tracing),r=require("http");if(ut.fill(r,"get",e),ut.fill(r,"request",e),iu.major&&iu.major>8){var n=require("https");ut.fill(n,"get",e),ut.fill(n,"request",e)}}},t.id="Http",t}();ki.Http=su;function nh(t,e){return function(n){return function(){for(var s=[],o=0;o<arguments.length;o++)s[o]=arguments[o];var a=this,u=Rt.normalizeRequestArgs(this,s),c=u[0],f=Rt.extractUrl(c);if(Rt.isSentryRequest(f))return n.apply(a,u);var l,d,h=qi.getCurrentHub().getScope();if(h&&e&&(d=h.getSpan(),d)){l=d.startChild({description:(c.method||"GET")+" "+f,op:"http.client"});var _=l.toTraceparent();ut.logger.log("[Tracing] Adding sentry-trace header "+_+" to outgoing request to "+f+": "),c.headers=nu.__assign(nu.__assign({},c.headers),{"sentry-trace":_})}return n.apply(a,u).once("response",function(v){var g=this;t&&ou("response",f,g,v),e&&l&&(v.statusCode&&l.setHttpStatus(v.statusCode),l.description=Rt.cleanSpanDescription(l.description,c,g),l.finish())}).once("error",function(){var v=this;t&&ou("error",f,v),e&&l&&(l.setHttpStatus(500),l.description=Rt.cleanSpanDescription(l.description,c,v),l.finish())})}}}function ou(t,e,r,n){!qi.getCurrentHub().getIntegration(su)||qi.getCurrentHub().addBreadcrumb({category:"http",data:{method:r.method,status_code:n&&n.statusCode,url:e},type:"http"},{event:t,request:r,response:n})}});var Ai=p(Mi=>{Object.defineProperty(Mi,"__esModule",{value:!0});var ih=N(),Pi=m(),sh=2e3;function oh(t){console.error(t&&t.stack?t.stack:t);var e=ih.getCurrentHub().getClient();if(e===void 0){Pi.logger.warn("No NodeClient was defined, we are exiting the process now."),global.process.exit(1);return}var r=e.getOptions(),n=r&&r.shutdownTimeout&&r.shutdownTimeout>0&&r.shutdownTimeout||sh;Pi.forget(e.close(n).then(function(i){i||Pi.logger.warn("We reached the timeout for emptying the request buffer, still exiting now!"),global.process.exit(1)}))}Mi.logAndExitProcess=oh});var lu=p(Ni=>{Object.defineProperty(Ni,"__esModule",{value:!0});var uu=N(),ah=D(),uh=m(),cu=Ai(),ch=function(){function t(e){e===void 0&&(e={}),this._options=e,this.name=t.id,this.handler=this._makeErrorHandler()}return t.prototype.setupOnce=function(){global.process.on("uncaughtException",this.handler.bind(this))},t.prototype._makeErrorHandler=function(){var e=this,r=2e3,n=!1,i=!1,s=!1,o;return function(a){var u=cu.logAndExitProcess,c=uu.getCurrentHub().getClient();if(e._options.onFatalError?u=e._options.onFatalError:c&&c.getOptions().onFatalError&&(u=c.getOptions().onFatalError),n)s?(uh.logger.warn("uncaught exception after calling fatal error shutdown callback - this is bad! forcing shutdown"),cu.logAndExitProcess(a)):i||(i=!0,setTimeout(function(){s||(s=!0,u(o,a))},r));else{var f=uu.getCurrentHub();o=a,n=!0,f.getIntegration(t)?f.withScope(function(l){l.setLevel(ah.Severity.Fatal),f.captureException(a,{originalException:a,data:{mechanism:{handled:!1,type:"onuncaughtexception"}}}),s||(s=!0,u(a))}):s||(s=!0,u(a))}}},t.id="OnUncaughtException",t}();Ni.OnUncaughtException=ch});var du=p(ji=>{Object.defineProperty(ji,"__esModule",{value:!0});var lh=N(),fu=m(),fh=Ai(),dh=function(){function t(e){e===void 0&&(e={mode:"warn"}),this._options=e,this.name=t.id}return t.prototype.setupOnce=function(){global.process.on("unhandledRejection",this.sendUnhandledPromise.bind(this))},t.prototype.sendUnhandledPromise=function(e,r){var n=lh.getCurrentHub();if(!n.getIntegration(t)){this._handleRejection(e);return}var i=r.domain&&r.domain.sentryContext||{};n.withScope(function(s){s.setExtra("unhandledPromiseRejection",!0),i.user&&s.setUser(i.user),i.tags&&s.setTags(i.tags),i.extra&&s.setExtras(i.extra),n.captureException(e,{originalException:r,data:{mechanism:{handled:!1,type:"onunhandledrejection"}}})}),this._handleRejection(e)},t.prototype._handleRejection=function(e){var r="This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason:";this._options.mode==="warn"?fu.consoleSandbox(function(){console.warn(r),console.error(e&&e.stack?e.stack:e)}):this._options.mode==="strict"&&(fu.consoleSandbox(function(){console.warn(r)}),fh.logAndExitProcess(e))},t.id="OnUnhandledRejection",t}();ji.OnUnhandledRejection=dh});var _u=p(Fi=>{Object.defineProperty(Fi,"__esModule",{value:!0});var pu=S(),hu=N(),ct=m(),ph=ni(),hh="cause",_h=5,vh=function(){function t(e){e===void 0&&(e={}),this.name=t.id,this._key=e.key||hh,this._limit=e.limit||_h}return t.prototype.setupOnce=function(){hu.addGlobalEventProcessor(function(e,r){var n=hu.getCurrentHub().getIntegration(t);if(n){var i=n._handler&&n._handler.bind(n);return typeof i=="function"?i(e,r):e}return e})},t.prototype._handler=function(e,r){var n=this;return!e.exception||!e.exception.values||!r||!ct.isInstanceOf(r.originalException,Error)?ct.SyncPromise.resolve(e):new ct.SyncPromise(function(i){n._walkErrorTree(r.originalException,n._key).then(function(s){e&&e.exception&&e.exception.values&&(e.exception.values=pu.__spread(s,e.exception.values)),i(e)}).then(null,function(){i(e)})})},t.prototype._walkErrorTree=function(e,r,n){var i=this;return n===void 0&&(n=[]),!ct.isInstanceOf(e[r],Error)||n.length+1>=this._limit?ct.SyncPromise.resolve(n):new ct.SyncPromise(function(s,o){ph.getExceptionFromError(e[r]).then(function(a){i._walkErrorTree(e[r],r,pu.__spread([a],n)).then(s).then(null,function(){o()})}).then(null,function(){o()})})},t.id="LinkedErrors",t}();Fi.LinkedErrors=vh});var yu=p(Hi=>{Object.defineProperty(Hi,"__esModule",{value:!0});var vu=S(),gu=require("fs"),mu=require("path"),Di;function gh(){try{return require.cache?Object.keys(require.cache):[]}catch{return[]}}function mh(){var t=require.main&&require.main.paths||[],e=gh(),r={},n={};return e.forEach(function(i){var s=i,o=function(){var a=s;if(s=mu.dirname(a),!(!s||a===s||n[a])){if(t.indexOf(s)<0)return o();var u=mu.join(a,"package.json");if(n[a]=!0,!gu.existsSync(u))return o();try{var c=JSON.parse(gu.readFileSync(u,"utf8"));r[c.name]=c.version}catch{}}};o()}),r}var yh=function(){function t(){this.name=t.id}return t.prototype.setupOnce=function(e,r){var n=this;e(function(i){return r().getIntegration(t)?vu.__assign(vu.__assign({},i),{modules:n._getModules()}):i})},t.prototype._getModules=function(){return Di||(Di=mh()),Di},t.id="Modules",t}();Hi.Modules=yh});var Ui=p(xe=>{Object.defineProperty(xe,"__esModule",{value:!0});var bh=Za();xe.Console=bh.Console;var Sh=au();xe.Http=Sh.Http;var Eh=lu();xe.OnUncaughtException=Eh.OnUncaughtException;var Th=du();xe.OnUnhandledRejection=Th.OnUnhandledRejection;var Oh=_u();xe.LinkedErrors=Oh.LinkedErrors;var wh=yu();xe.Modules=wh.Modules});var Bi=p(ue=>{Object.defineProperty(ue,"__esModule",{value:!0});var qt=S(),Ce=N(),bu=V(),Su=D(),Li=m(),xh=require("domain"),Ch=xi(),kt=Ui();ue.defaultIntegrations=[new Ce.Integrations.InboundFilters,new Ce.Integrations.FunctionToString,new kt.Console,new kt.Http,new kt.OnUncaughtException,new kt.OnUnhandledRejection,new kt.LinkedErrors];function Ih(t){t===void 0&&(t={});var e,r=bu.getMainCarrier(),n=((e=r.__SENTRY__)===null||e===void 0?void 0:e.integrations)||[];if(t.defaultIntegrations=t.defaultIntegrations===!1?[]:qt.__spread(Array.isArray(t.defaultIntegrations)?t.defaultIntegrations:ue.defaultIntegrations,n),t.dsn===void 0&&process.env.SENTRY_DSN&&(t.dsn=process.env.SENTRY_DSN),t.tracesSampleRate===void 0&&process.env.SENTRY_TRACES_SAMPLE_RATE){var i=parseFloat(process.env.SENTRY_TRACES_SAMPLE_RATE);isFinite(i)&&(t.tracesSampleRate=i)}if(t.release===void 0){var s=Eu();s!==void 0?t.release=s:t.autoSessionTracking=!1}t.environment===void 0&&process.env.SENTRY_ENVIRONMENT&&(t.environment=process.env.SENTRY_ENVIRONMENT),t.autoSessionTracking===void 0&&t.dsn!==void 0&&(t.autoSessionTracking=!0),xh.active&&bu.setHubOnCarrier(r,Ce.getCurrentHub()),Ce.initAndBind(Ch.NodeClient,t),t.autoSessionTracking&&Mh()}ue.init=Ih;function Rh(){return Ce.getCurrentHub().lastEventId()}ue.lastEventId=Rh;function qh(t){return qt.__awaiter(this,void 0,void 0,function(){var e;return qt.__generator(this,function(r){return e=Ce.getCurrentHub().getClient(),e?[2,e.flush(t)]:(Li.logger.warn("Cannot flush events. No client defined."),[2,Promise.resolve(!1)])})})}ue.flush=qh;function kh(t){return qt.__awaiter(this,void 0,void 0,function(){var e;return qt.__generator(this,function(r){return e=Ce.getCurrentHub().getClient(),e?[2,e.close(t)]:(Li.logger.warn("Cannot flush events and disable SDK. No client defined."),[2,Promise.resolve(!1)])})})}ue.close=kh;function Ph(t){if(t===void 0)return!1;var e=t&&t.getOptions();return e&&e.autoSessionTracking!==void 0?e.autoSessionTracking:!1}ue.isAutoSessionTrackingEnabled=Ph;function Eu(t){if(process.env.SENTRY_RELEASE)return process.env.SENTRY_RELEASE;var e=Li.getGlobalObject();return e.SENTRY_RELEASE&&e.SENTRY_RELEASE.id?e.SENTRY_RELEASE.id:process.env.GITHUB_SHA||process.env.COMMIT_REF||process.env.VERCEL_GIT_COMMIT_SHA||process.env.VERCEL_GITHUB_COMMIT_SHA||process.env.VERCEL_GITLAB_COMMIT_SHA||process.env.VERCEL_BITBUCKET_COMMIT_SHA||process.env.ZEIT_GITHUB_COMMIT_SHA||process.env.ZEIT_GITLAB_COMMIT_SHA||process.env.ZEIT_BITBUCKET_COMMIT_SHA||t}ue.getSentryRelease=Eu;function Mh(){var t=Ce.getCurrentHub();t.startSession(),process.on("beforeExit",function(){var e,r=(e=t.getScope())===null||e===void 0?void 0:e.getSession(),n=[Su.SessionStatus.Exited,Su.SessionStatus.Crashed];r&&!n.includes(r.status)&&t.endSession()})}});var Ou=p(zi=>{Object.defineProperty(zi,"__esModule",{value:!0});var Tu=S(),kr=require("fs"),Gi=require("path");function Ah(t){var e=Gi.resolve(t);if(!kr.existsSync(e))throw new Error("Cannot read contents of "+e+". Directory does not exist.");if(!kr.statSync(e).isDirectory())throw new Error("Cannot read contents of "+e+", because it is not a directory.");var r=function(n){return kr.readdirSync(n).reduce(function(i,s){var o=Gi.join(n,s);return kr.statSync(o).isDirectory()?Tu.__spread(i,r(o)):Tu.__spread(i,[o])},[])};return r(e).map(function(n){return Gi.relative(e,n)})}zi.deepReadDirSync=Ah});var Ie=p(lt=>{Object.defineProperty(lt,"__esModule",{value:!0});var wu;(function(t){t.Ok="ok",t.DeadlineExceeded="deadline_exceeded",t.Unauthenticated="unauthenticated",t.PermissionDenied="permission_denied",t.NotFound="not_found",t.ResourceExhausted="resource_exhausted",t.InvalidArgument="invalid_argument",t.Unimplemented="unimplemented",t.Unavailable="unavailable",t.InternalError="internal_error",t.UnknownError="unknown_error",t.Cancelled="cancelled",t.AlreadyExists="already_exists",t.FailedPrecondition="failed_precondition",t.Aborted="aborted",t.OutOfRange="out_of_range",t.DataLoss="data_loss"})(wu=lt.SpanStatus||(lt.SpanStatus={}));(function(t){function e(r){if(r<400&&r>=100)return t.Ok;if(r>=400&&r<500)switch(r){case 401:return t.Unauthenticated;case 403:return t.PermissionDenied;case 404:return t.NotFound;case 409:return t.AlreadyExists;case 413:return t.FailedPrecondition;case 429:return t.ResourceExhausted;default:return t.InvalidArgument}if(r>=500&&r<600)switch(r){case 501:return t.Unimplemented;case 503:return t.Unavailable;case 504:return t.DeadlineExceeded;default:return t.InternalError}return t.UnknownError}t.fromHttpCode=e})(wu=lt.SpanStatus||(lt.SpanStatus={}))});var Re=p(ce=>{Object.defineProperty(ce,"__esModule",{value:!0});var xu=V();ce.TRACEPARENT_REGEXP=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function Nh(t){t===void 0&&(t=(e=xu.getCurrentHub().getClient())===null||e===void 0?void 0:e.getOptions());var e;return!!t&&("tracesSampleRate"in t||"tracesSampler"in t)}ce.hasTracingEnabled=Nh;function jh(t){var e=t.match(ce.TRACEPARENT_REGEXP);if(e){var r=void 0;return e[3]==="1"?r=!0:e[3]==="0"&&(r=!1),{traceId:e[1],parentSampled:r,parentSpanId:e[2]}}}ce.extractTraceparentData=jh;function Fh(t){t===void 0&&(t=xu.getCurrentHub());var e,r;return(r=(e=t)===null||e===void 0?void 0:e.getScope())===null||r===void 0?void 0:r.getTransaction()}ce.getActiveTransaction=Fh;function Dh(t){return t/1e3}ce.msToSec=Dh;function Hh(t){return t*1e3}ce.secToMs=Hh;var Uh=m();ce.stripUrlQueryAndFragment=Uh.stripUrlQueryAndFragment});var Ru=p(Yi=>{Object.defineProperty(Yi,"__esModule",{value:!0});var Wi=m(),Cu=Ie(),Lh=Re();function Bh(){Wi.addInstrumentationHandler({callback:Iu,type:"error"}),Wi.addInstrumentationHandler({callback:Iu,type:"unhandledrejection"})}Yi.registerErrorInstrumentation=Bh;function Iu(){var t=Lh.getActiveTransaction();t&&(Wi.logger.log("[Tracing] Transaction: "+Cu.SpanStatus.InternalError+" -> Global error occured"),t.setStatus(Cu.SpanStatus.InternalError))}});var Vi=p(Pr=>{Object.defineProperty(Pr,"__esModule",{value:!0});Pr.FINISH_REASON_TAG="finishReason";Pr.IDLE_TRANSACTION_FINISH_REASONS=["heartbeatFailed","idleTimeout","documentHidden"]});var Ar=p(Mr=>{Object.defineProperty(Mr,"__esModule",{value:!0});var ft=S(),Be=m(),Ki=Ie(),Gh=function(){function t(e){e===void 0&&(e=1e3),this.spans=[],this._maxlen=e}return t.prototype.add=function(e){this.spans.length>this._maxlen?e.spanRecorder=void 0:this.spans.push(e)},t}();Mr.SpanRecorder=Gh;var zh=function(){function t(e){if(this.traceId=Be.uuid4(),this.spanId=Be.uuid4().substring(16),this.startTimestamp=Be.timestampWithMs(),this.tags={},this.data={},!e)return this;e.traceId&&(this.traceId=e.traceId),e.spanId&&(this.spanId=e.spanId),e.parentSpanId&&(this.parentSpanId=e.parentSpanId),"sampled"in e&&(this.sampled=e.sampled),e.op&&(this.op=e.op),e.description&&(this.description=e.description),e.data&&(this.data=e.data),e.tags&&(this.tags=e.tags),e.status&&(this.status=e.status),e.startTimestamp&&(this.startTimestamp=e.startTimestamp),e.endTimestamp&&(this.endTimestamp=e.endTimestamp)}return t.prototype.child=function(e){return this.startChild(e)},t.prototype.startChild=function(e){var r=new t(ft.__assign(ft.__assign({},e),{parentSpanId:this.spanId,sampled:this.sampled,traceId:this.traceId}));return r.spanRecorder=this.spanRecorder,r.spanRecorder&&r.spanRecorder.add(r),r.transaction=this.transaction,r},t.prototype.setTag=function(e,r){var n;return this.tags=ft.__assign(ft.__assign({},this.tags),(n={},n[e]=r,n)),this},t.prototype.setData=function(e,r){var n;return this.data=ft.__assign(ft.__assign({},this.data),(n={},n[e]=r,n)),this},t.prototype.setStatus=function(e){return this.status=e,this},t.prototype.setHttpStatus=function(e){this.setTag("http.status_code",String(e));var r=Ki.SpanStatus.fromHttpCode(e);return r!==Ki.SpanStatus.UnknownError&&this.setStatus(r),this},t.prototype.isSuccess=function(){return this.status===Ki.SpanStatus.Ok},t.prototype.finish=function(e){this.endTimestamp=typeof e=="number"?e:Be.timestampWithMs()},t.prototype.toTraceparent=function(){var e="";return this.sampled!==void 0&&(e=this.sampled?"-1":"-0"),this.traceId+"-"+this.spanId+e},t.prototype.toContext=function(){return Be.dropUndefinedKeys({data:this.data,description:this.description,endTimestamp:this.endTimestamp,op:this.op,parentSpanId:this.parentSpanId,sampled:this.sampled,spanId:this.spanId,startTimestamp:this.startTimestamp,status:this.status,tags:this.tags,traceId:this.traceId})},t.prototype.updateWithContext=function(e){var r,n,i,s,o;return this.data=(r=e.data,r??{}),this.description=e.description,this.endTimestamp=e.endTimestamp,this.op=e.op,this.parentSpanId=e.parentSpanId,this.sampled=e.sampled,this.spanId=(n=e.spanId,n??this.spanId),this.startTimestamp=(i=e.startTimestamp,i??this.startTimestamp),this.status=e.status,this.tags=(s=e.tags,s??{}),this.traceId=(o=e.traceId,o??this.traceId),this},t.prototype.getTraceContext=function(){return Be.dropUndefinedKeys({data:Object.keys(this.data).length>0?this.data:void 0,description:this.description,op:this.op,parent_span_id:this.parentSpanId,span_id:this.spanId,status:this.status,tags:Object.keys(this.tags).length>0?this.tags:void 0,trace_id:this.traceId})},t.prototype.toJSON=function(){return Be.dropUndefinedKeys({data:Object.keys(this.data).length>0?this.data:void 0,description:this.description,op:this.op,parent_span_id:this.parentSpanId,span_id:this.spanId,start_timestamp:this.startTimestamp,status:this.status,tags:Object.keys(this.tags).length>0?this.tags:void 0,timestamp:this.endTimestamp,trace_id:this.traceId})},t}();Mr.Span=zh});var Nr=p($i=>{Object.defineProperty($i,"__esModule",{value:!0});var dt=S(),qu=V(),Wh=D(),pt=m(),ku=Ar(),Yh=function(t){dt.__extends(e,t);function e(r,n){var i=t.call(this,r)||this;return i._measurements={},i._hub=qu.getCurrentHub(),pt.isInstanceOf(n,qu.Hub)&&(i._hub=n),i.name=r.name||"",i.metadata=r.metadata||{},i._trimEnd=r.trimEnd,i.transaction=i,i}return e.prototype.setName=function(r){this.name=r},e.prototype.initSpanRecorder=function(r){r===void 0&&(r=1e3),this.spanRecorder||(this.spanRecorder=new ku.SpanRecorder(r)),this.spanRecorder.add(this)},e.prototype.setMeasurements=function(r){this._measurements=dt.__assign({},r)},e.prototype.setMetadata=function(r){this.metadata=dt.__assign(dt.__assign({},this.metadata),r)},e.prototype.finish=function(r){var n=this,i,s,o,a,u;if(this.endTimestamp===void 0){if(this.name||(pt.logger.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this.name="<unlabeled transaction>"),t.prototype.finish.call(this,r),this.sampled!==!0){pt.logger.log("[Tracing] Discarding transaction because its trace was not chosen to be sampled."),(u=(o=(i=this._hub.getClient())===null||i===void 0?void 0:(s=i).getTransport)===null||o===void 0?void 0:(a=o.call(s)).recordLostEvent)===null||u===void 0||u.call(a,Wh.Outcome.SampleRate,"transaction");return}var c=this.spanRecorder?this.spanRecorder.spans.filter(function(d){return d!==n&&d.endTimestamp}):[];this._trimEnd&&c.length>0&&(this.endTimestamp=c.reduce(function(d,h){return d.endTimestamp&&h.endTimestamp?d.endTimestamp>h.endTimestamp?d:h:d}).endTimestamp);var f={contexts:{trace:this.getTraceContext()},spans:c,start_timestamp:this.startTimestamp,tags:this.tags,timestamp:this.endTimestamp,transaction:this.name,type:"transaction",debug_meta:this.metadata},l=Object.keys(this._measurements).length>0;return l&&(pt.logger.log("[Measurements] Adding measurements to transaction",JSON.stringify(this._measurements,void 0,2)),f.measurements=this._measurements),pt.logger.log("[Tracing] Finishing "+this.op+" transaction: "+this.name+"."),this._hub.captureEvent(f)}},e.prototype.toContext=function(){var r=t.prototype.toContext.call(this);return pt.dropUndefinedKeys(dt.__assign(dt.__assign({},r),{name:this.name,trimEnd:this._trimEnd}))},e.prototype.updateWithContext=function(r){var n;return t.prototype.updateWithContext.call(this,r),this.name=(n=r.name,n??""),this._trimEnd=r.trimEnd,this},e}(ku.Span);$i.Transaction=Yh});var Fr=p(qe=>{Object.defineProperty(qe,"__esModule",{value:!0});var Ji=S(),U=m(),jr=Vi(),Vh=Ar(),Pu=Ie(),Kh=Nr();qe.DEFAULT_IDLE_TIMEOUT=1e3;qe.HEARTBEAT_INTERVAL=5e3;var Mu=function(t){Ji.__extends(e,t);function e(r,n,i,s){i===void 0&&(i="");var o=t.call(this,s)||this;return o._pushActivity=r,o._popActivity=n,o.transactionSpanId=i,o}return e.prototype.add=function(r){var n=this;r.spanId!==this.transactionSpanId&&(r.finish=function(i){r.endTimestamp=typeof i=="number"?i:U.timestampWithMs(),n._popActivity(r.spanId)},r.endTimestamp===void 0&&this._pushActivity(r.spanId)),t.prototype.add.call(this,r)},e}(Vh.SpanRecorder);qe.IdleTransactionSpanRecorder=Mu;var $h=function(t){Ji.__extends(e,t);function e(r,n,i,s){i===void 0&&(i=qe.DEFAULT_IDLE_TIMEOUT),s===void 0&&(s=!1);var o=t.call(this,r,n)||this;return o._idleHub=n,o._idleTimeout=i,o._onScope=s,o.activities={},o._heartbeatCounter=0,o._finished=!1,o._beforeFinishCallbacks=[],n&&s&&(Au(n),U.logger.log("Setting idle transaction on scope. Span ID: "+o.spanId),n.configureScope(function(a){return a.setSpan(o)})),o._initTimeout=setTimeout(function(){o._finished||o.finish()},o._idleTimeout),o}return e.prototype.finish=function(r){var n,i,s=this;if(r===void 0&&(r=U.timestampWithMs()),this._finished=!0,this.activities={},this.spanRecorder){U.logger.log("[Tracing] finishing IdleTransaction",new Date(r*1e3).toISOString(),this.op);try{for(var o=Ji.__values(this._beforeFinishCallbacks),a=o.next();!a.done;a=o.next()){var u=a.value;u(this,r)}}catch(c){n={error:c}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(n)throw n.error}}this.spanRecorder.spans=this.spanRecorder.spans.filter(function(c){if(c.spanId===s.spanId)return!0;c.endTimestamp||(c.endTimestamp=r,c.setStatus(Pu.SpanStatus.Cancelled),U.logger.log("[Tracing] cancelling span since transaction ended early",JSON.stringify(c,void 0,2)));var f=c.startTimestamp<r;return f||U.logger.log("[Tracing] discarding Span since it happened after Transaction was finished",JSON.stringify(c,void 0,2)),f}),U.logger.log("[Tracing] flushing IdleTransaction")}else U.logger.log("[Tracing] No active IdleTransaction");return this._onScope&&Au(this._idleHub),t.prototype.finish.call(this,r)},e.prototype.registerBeforeFinishCallback=function(r){this._beforeFinishCallbacks.push(r)},e.prototype.initSpanRecorder=function(r){var n=this;if(!this.spanRecorder){var i=function(o){n._finished||n._pushActivity(o)},s=function(o){n._finished||n._popActivity(o)};this.spanRecorder=new Mu(i,s,this.spanId,r),U.logger.log("Starting heartbeat"),this._pingHeartbeat()}this.spanRecorder.add(this)},e.prototype._pushActivity=function(r){this._initTimeout&&(clearTimeout(this._initTimeout),this._initTimeout=void 0),U.logger.log("[Tracing] pushActivity: "+r),this.activities[r]=!0,U.logger.log("[Tracing] new activities count",Object.keys(this.activities).length)},e.prototype._popActivity=function(r){var n=this;if(this.activities[r]&&(U.logger.log("[Tracing] popActivity "+r),delete this.activities[r],U.logger.log("[Tracing] new activities count",Object.keys(this.activities).length)),Object.keys(this.activities).length===0){var i=this._idleTimeout,s=U.timestampWithMs()+i/1e3;setTimeout(function(){n._finished||(n.setTag(jr.FINISH_REASON_TAG,jr.IDLE_TRANSACTION_FINISH_REASONS[1]),n.finish(s))},i)}},e.prototype._beat=function(){if(!this._finished){var r=Object.keys(this.activities).join("");r===this._prevHeartbeatString?this._heartbeatCounter+=1:this._heartbeatCounter=1,this._prevHeartbeatString=r,this._heartbeatCounter>=3?(U.logger.log("[Tracing] Transaction finished because of no change for 3 heart beats"),this.setStatus(Pu.SpanStatus.DeadlineExceeded),this.setTag(jr.FINISH_REASON_TAG,jr.IDLE_TRANSACTION_FINISH_REASONS[0]),this.finish()):this._pingHeartbeat()}},e.prototype._pingHeartbeat=function(){var r=this;U.logger.log("pinging Heartbeat -> current counter: "+this._heartbeatCounter),setTimeout(function(){r._beat()},qe.HEARTBEAT_INTERVAL)},e}(Kh.Transaction);qe.IdleTransaction=$h;function Au(t){if(t){var e=t.getScope();if(e){var r=e.getTransaction();r&&e.setSpan(void 0)}}}});var Hr=p((Pt,Mt)=>{Object.defineProperty(Pt,"__esModule",{value:!0});var Xi=S(),Nu=V(),Dr=D(),ee=m(),Jh=Ru(),Xh=Fr(),Zh=Nr(),Qh=Re();function e_(){var t=this.getScope();if(t){var e=t.getSpan();if(e)return{"sentry-trace":e.toTraceparent()}}return{}}function ju(t,e,r){if(!Qh.hasTracingEnabled(e))return t.sampled=!1,t;if(t.sampled!==void 0)return t.setMetadata({transactionSampling:{method:Dr.TransactionSamplingMethod.Explicit}}),t;var n;return typeof e.tracesSampler=="function"?(n=e.tracesSampler(r),t.setMetadata({transactionSampling:{method:Dr.TransactionSamplingMethod.Sampler,rate:Number(n)}})):r.parentSampled!==void 0?(n=r.parentSampled,t.setMetadata({transactionSampling:{method:Dr.TransactionSamplingMethod.Inheritance}})):(n=e.tracesSampleRate,t.setMetadata({transactionSampling:{method:Dr.TransactionSamplingMethod.Rate,rate:Number(n)}})),t_(n)?n?(t.sampled=Math.random()<n,t.sampled?(ee.logger.log("[Tracing] starting "+t.op+" transaction - "+t.name),t):(ee.logger.log("[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = "+Number(n)+")"),t)):(ee.logger.log("[Tracing] Discarding transaction because "+(typeof e.tracesSampler=="function"?"tracesSampler returned 0 or false":"a negative sampling decision was inherited or tracesSampleRate is set to 0")),t.sampled=!1,t):(ee.logger.warn("[Tracing] Discarding transaction because of invalid sample rate."),t.sampled=!1,t)}function t_(t){return isNaN(t)||!(typeof t=="number"||typeof t=="boolean")?(ee.logger.warn("[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got "+JSON.stringify(t)+" of type "+JSON.stringify(typeof t)+"."),!1):t<0||t>1?(ee.logger.warn("[Tracing] Given sample rate is invalid. Sample rate must be between 0 and 1. Got "+t+"."),!1):!0}function r_(t,e){var r,n,i=((r=this.getClient())===null||r===void 0?void 0:r.getOptions())||{},s=new Zh.Transaction(t,this);return s=ju(s,i,Xi.__assign({parentSampled:t.parentSampled,transactionContext:t},e)),s.sampled&&s.initSpanRecorder((n=i._experiments)===null||n===void 0?void 0:n.maxSpans),s}function n_(t,e,r,n,i){var s,o,a=((s=t.getClient())===null||s===void 0?void 0:s.getOptions())||{},u=new Xh.IdleTransaction(e,t,r,n);return u=ju(u,a,Xi.__assign({parentSampled:e.parentSampled,transactionContext:e},i)),u.sampled&&u.initSpanRecorder((o=a._experiments)===null||o===void 0?void 0:o.maxSpans),u}Pt.startIdleTransaction=n_;function Fu(){var t=Nu.getMainCarrier();!t.__SENTRY__||(t.__SENTRY__.extensions=t.__SENTRY__.extensions||{},t.__SENTRY__.extensions.startTransaction||(t.__SENTRY__.extensions.startTransaction=r_),t.__SENTRY__.extensions.traceHeaders||(t.__SENTRY__.extensions.traceHeaders=e_))}Pt._addTracingExtensions=Fu;function i_(){var t=Nu.getMainCarrier();if(!!t.__SENTRY__){var e={mongodb:function(){var n=ee.dynamicRequire(Mt,"./integrations/node/mongo");return new n.Mongo},mongoose:function(){var n=ee.dynamicRequire(Mt,"./integrations/node/mongo");return new n.Mongo({mongoose:!0})},mysql:function(){var n=ee.dynamicRequire(Mt,"./integrations/node/mysql");return new n.Mysql},pg:function(){var n=ee.dynamicRequire(Mt,"./integrations/node/postgres");return new n.Postgres}},r=Object.keys(e).filter(function(n){return!!ee.loadModule(n)}).map(function(n){try{return e[n]()}catch{return}}).filter(function(n){return n});r.length>0&&(t.__SENTRY__.integrations=Xi.__spread(t.__SENTRY__.integrations||[],r))}}function s_(){Fu(),ee.isNodeEnv()&&i_(),Jh.registerErrorInstrumentation()}Pt.addExtensionMethods=s_});var Hu=p(Qi=>{Object.defineProperty(Qi,"__esModule",{value:!0});var Zi=S(),o_=m(),a_=function(){function t(e){e===void 0&&(e={}),this.name=t.id,this._router=e.router||e.app,this._methods=(Array.isArray(e.methods)?e.methods:[]).concat("use")}return t.prototype.setupOnce=function(){if(!this._router){o_.logger.error("ExpressIntegration is missing an Express instance");return}l_(this._router,this._methods)},t.id="Express",t}();Qi.Express=a_;function Du(t,e){var r=t.length;switch(r){case 2:return function(n,i){var s=i.__sentry_transaction;if(s){var o=s.startChild({description:t.name,op:"express.middleware."+e});i.once("finish",function(){o.finish()})}return t.call(this,n,i)};case 3:return function(n,i,s){var o,a=i.__sentry_transaction,u=(o=a)===null||o===void 0?void 0:o.startChild({description:t.name,op:"express.middleware."+e});t.call(this,n,i,function(){for(var c=[],f=0;f<arguments.length;f++)c[f]=arguments[f];var l;(l=u)===null||l===void 0||l.finish(),s.call.apply(s,Zi.__spread([this],c))})};case 4:return function(n,i,s,o){var a,u=s.__sentry_transaction,c=(a=u)===null||a===void 0?void 0:a.startChild({description:t.name,op:"express.middleware."+e});t.call(this,n,i,s,function(){for(var f=[],l=0;l<arguments.length;l++)f[l]=arguments[l];var d;(d=c)===null||d===void 0||d.finish(),o.call.apply(o,Zi.__spread([this],f))})};default:throw new Error("Express middleware takes 2-4 arguments. Got: "+r)}}function u_(t,e){return t.map(function(r){return typeof r=="function"?Du(r,e):Array.isArray(r)?r.map(function(n){return typeof n=="function"?Du(n,e):n}):r})}function c_(t,e){var r=t[e];return t[e]=function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];return r.call.apply(r,Zi.__spread([this],u_(n,e)))},t}function l_(t,e){e===void 0&&(e=[]),e.forEach(function(r){return c_(t,r)})}});var Uu=p(es=>{Object.defineProperty(es,"__esModule",{value:!0});var At=m(),f_=function(){function t(e){e===void 0&&(e={}),this.name=t.id,this._usePgNative=!!e.usePgNative}return t.prototype.setupOnce=function(e,r){var n,i=At.loadModule("pg");if(!i){At.logger.error("Postgres Integration was unable to require `pg` package.");return}if(this._usePgNative&&!((n=i.native)===null||n===void 0?void 0:n.Client)){At.logger.error("Postgres Integration was unable to access 'pg-native' bindings.");return}var s=(this._usePgNative?i.native:i).Client;At.fill(s.prototype,"query",function(o){return function(a,u,c){var f,l,d,h=r().getScope(),_=(f=h)===null||f===void 0?void 0:f.getSpan(),v=(l=_)===null||l===void 0?void 0:l.startChild({description:typeof a=="string"?a:a.text,op:"db"});if(typeof c=="function")return o.call(this,a,u,function(w,C){var I;(I=v)===null||I===void 0||I.finish(),c(w,C)});if(typeof u=="function")return o.call(this,a,function(w,C){var I;(I=v)===null||I===void 0||I.finish(),u(w,C)});var g=typeof u!="undefined"?o.call(this,a,u):o.call(this,a);return At.isThenable(g)?g.then(function(w){var C;return(C=v)===null||C===void 0||C.finish(),w}):((d=v)===null||d===void 0||d.finish(),g)}})},t.id="Postgres",t}();es.Postgres=f_});var Lu=p(rs=>{Object.defineProperty(rs,"__esModule",{value:!0});var ts=m(),d_=function(){function t(){this.name=t.id}return t.prototype.setupOnce=function(e,r){var n=ts.loadModule("mysql/lib/Connection.js");if(!n){ts.logger.error("Mysql Integration was unable to require `mysql` package.");return}ts.fill(n,"createQuery",function(i){return function(s,o,a){var u,c,f=r().getScope(),l=(u=f)===null||u===void 0?void 0:u.getSpan(),d=(c=l)===null||c===void 0?void 0:c.startChild({description:typeof s=="string"?s:s.sql,op:"db"});return typeof a=="function"?i.call(this,s,o,function(h,_,v){var g;(g=d)===null||g===void 0||g.finish(),a(h,_,v)}):typeof o=="function"?i.call(this,s,function(h,_,v){var g;(g=d)===null||g===void 0||g.finish(),o(h,_,v)}):i.call(this,s,o,a)}})},t.id="Mysql",t}();rs.Mysql=d_});var Bu=p(is=>{Object.defineProperty(is,"__esModule",{value:!0});var ns=S(),Ur=m(),p_=["aggregate","bulkWrite","countDocuments","createIndex","createIndexes","deleteMany","deleteOne","distinct","drop","dropIndex","dropIndexes","estimatedDocumentCount","find","findOne","findOneAndDelete","findOneAndReplace","findOneAndUpdate","indexes","indexExists","indexInformation","initializeOrderedBulkOp","insertMany","insertOne","isCapped","mapReduce","options","parallelCollectionScan","rename","replaceOne","stats","updateMany","updateOne"],h_={bulkWrite:["operations"],countDocuments:["query"],createIndex:["fieldOrSpec"],createIndexes:["indexSpecs"],deleteMany:["filter"],deleteOne:["filter"],distinct:["key","query"],dropIndex:["indexName"],find:["query"],findOne:["query"],findOneAndDelete:["filter"],findOneAndReplace:["filter","replacement"],findOneAndUpdate:["filter","update"],indexExists:["indexes"],insertMany:["docs"],insertOne:["doc"],mapReduce:["map","reduce"],rename:["newName"],replaceOne:["filter","doc"],updateMany:["filter","update"],updateOne:["filter","update"]},__=function(){function t(e){e===void 0&&(e={}),this.name=t.id,this._operations=Array.isArray(e.operations)?e.operations:p_,this._describeOperations="describeOperations"in e?e.describeOperations:!0,this._useMongoose=!!e.useMongoose}return t.prototype.setupOnce=function(e,r){var n=this._useMongoose?"mongoose":"mongodb",i=Ur.loadModule(n);if(!i){Ur.logger.error("Mongo Integration was unable to require `"+n+"` package.");return}this._instrumentOperations(i.Collection,this._operations,r)},t.prototype._instrumentOperations=function(e,r,n){var i=this;r.forEach(function(s){return i._patchOperation(e,s,n)})},t.prototype._patchOperation=function(e,r,n){if(r in e.prototype){var i=this._getSpanContextFromOperationArguments.bind(this);Ur.fill(e.prototype,r,function(s){return function(){for(var o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];var u,c,f,l,d=o[o.length-1],h=n().getScope(),_=(u=h)===null||u===void 0?void 0:u.getSpan();if(typeof d!="function"||r==="mapReduce"&&o.length===2){var v=(c=_)===null||c===void 0?void 0:c.startChild(i(this,r,o)),g=s.call.apply(s,ns.__spread([this],o));return Ur.isThenable(g)?g.then(function(C){var I;return(I=v)===null||I===void 0||I.finish(),C}):((f=v)===null||f===void 0||f.finish(),g)}var w=(l=_)===null||l===void 0?void 0:l.startChild(i(this,r,o.slice(0,-1)));return s.call.apply(s,ns.__spread([this],o.slice(0,-1),[function(C,I){var be;(be=w)===null||be===void 0||be.finish(),d(C,I)}]))}})}},t.prototype._getSpanContextFromOperationArguments=function(e,r,n){var i={collectionName:e.collectionName,dbName:e.dbName,namespace:e.namespace},s={op:"db",description:r,data:i},o=h_[r],a=Array.isArray(this._describeOperations)?this._describeOperations.includes(r):this._describeOperations;if(!o||!a)return s;try{if(r==="mapReduce"){var u=ns.__read(n,2),c=u[0],f=u[1];i[o[0]]=typeof c=="string"?c:c.name||"<anonymous>",i[o[1]]=typeof f=="string"?f:f.name||"<anonymous>"}else for(var l=0;l<o.length;l++)i[o[l]]=JSON.stringify(n[l])}catch{}return s},t.id="Mongo",t}();is.Mongo=__});var Wu=p(os=>{Object.defineProperty(os,"__esModule",{value:!0});var ss=m(),Gu=Vi(),zu=Ie(),v_=Re(),Lr=ss.getGlobalObject();function g_(){Lr&&Lr.document?Lr.document.addEventListener("visibilitychange",function(){var t=v_.getActiveTransaction();Lr.document.hidden&&t&&(ss.logger.log("[Tracing] Transaction: "+zu.SpanStatus.Cancelled+" -> since tab moved to the background, op: "+t.op),t.status||t.setStatus(zu.SpanStatus.Cancelled),t.setTag("visibilitychange","document.hidden"),t.setTag(Gu.FINISH_REASON_TAG,Gu.IDLE_TRANSACTION_FINISH_REASONS[2]),t.finish())}):ss.logger.warn("[Tracing] Could not set up background tab detection due to lack of global document")}os.registerBackgroundTabDetection=g_});var Br=p(as=>{Object.defineProperty(as,"__esModule",{value:!0});as.bindReporter=function(t,e,r){var n;return function(i){e.value>=0&&(i||r)&&(e.delta=e.value-(n||0),(e.delta||n===void 0)&&(n=e.value,t(e)))}}});var Yu=p(us=>{Object.defineProperty(us,"__esModule",{value:!0});us.generateUniqueID=function(){return"v2-"+Date.now()+"-"+(Math.floor(Math.random()*(9e12-1))+1e12)}});var Gr=p(cs=>{Object.defineProperty(cs,"__esModule",{value:!0});var m_=Yu();cs.initMetric=function(t,e){return{name:t,value:e??-1,delta:0,entries:[],id:m_.generateUniqueID()}}});var zr=p(ls=>{Object.defineProperty(ls,"__esModule",{value:!0});ls.observe=function(t,e){try{if(PerformanceObserver.supportedEntryTypes.includes(t)){if(t==="first-input"&&!("PerformanceEventTiming"in self))return;var r=new PerformanceObserver(function(n){return n.getEntries().map(e)});return r.observe({type:t,buffered:!0}),r}}catch{}}});var Nt=p(fs=>{Object.defineProperty(fs,"__esModule",{value:!0});var y_=m();fs.onHidden=function(t,e){var r=function(n){(n.type==="pagehide"||y_.getGlobalObject().document.visibilityState==="hidden")&&(t(n),e&&(removeEventListener("visibilitychange",r,!0),removeEventListener("pagehide",r,!0)))};addEventListener("visibilitychange",r,!0),addEventListener("pagehide",r,!0)}});var Vu=p(ds=>{Object.defineProperty(ds,"__esModule",{value:!0});var b_=Br(),S_=Gr(),E_=zr(),T_=Nt();ds.getCLS=function(t,e){var r=S_.initMetric("CLS",0),n,i=0,s=[],o=function(u){if(u&&!u.hadRecentInput){var c=s[0],f=s[s.length-1];i&&s.length!==0&&u.startTime-f.startTime<1e3&&u.startTime-c.startTime<5e3?(i+=u.value,s.push(u)):(i=u.value,s=[u]),i>r.value&&(r.value=i,r.entries=s,n&&n())}},a=E_.observe("layout-shift",o);a&&(n=b_.bindReporter(t,r,e),T_.onHidden(function(){a.takeRecords().map(o),n(!0)}))}});var Yr=p(ps=>{Object.defineProperty(ps,"__esModule",{value:!0});var O_=m(),w_=Nt(),Wr=-1,x_=function(){return O_.getGlobalObject().document.visibilityState==="hidden"?0:1/0},C_=function(){w_.onHidden(function(t){var e=t.timeStamp;Wr=e},!0)};ps.getVisibilityWatcher=function(){return Wr<0&&(Wr=x_(),C_()),{get firstHiddenTime(){return Wr}}}});var Ku=p(hs=>{Object.defineProperty(hs,"__esModule",{value:!0});var I_=Br(),R_=Yr(),q_=Gr(),k_=zr(),P_=Nt();hs.getFID=function(t,e){var r=R_.getVisibilityWatcher(),n=q_.initMetric("FID"),i,s=function(a){i&&a.startTime<r.firstHiddenTime&&(n.value=a.processingStart-a.startTime,n.entries.push(a),i(!0))},o=k_.observe("first-input",s);o&&(i=I_.bindReporter(t,n,e),P_.onHidden(function(){o.takeRecords().map(s),o.disconnect()},!0))}});var Ju=p(_s=>{Object.defineProperty(_s,"__esModule",{value:!0});var M_=Br(),A_=Yr(),N_=Gr(),j_=zr(),F_=Nt(),$u={};_s.getLCP=function(t,e){var r=A_.getVisibilityWatcher(),n=N_.initMetric("LCP"),i,s=function(u){var c=u.startTime;c<r.firstHiddenTime&&(n.value=c,n.entries.push(u)),i&&i()},o=j_.observe("largest-contentful-paint",s);if(o){i=M_.bindReporter(t,n,e);var a=function(){$u[n.id]||(o.takeRecords().map(s),o.disconnect(),$u[n.id]=!0,i(!0))};["keydown","click"].forEach(function(u){addEventListener(u,a,{once:!0,capture:!0})}),F_.onHidden(a,!0)}}});var Qu=p(jt=>{Object.defineProperty(jt,"__esModule",{value:!0});var Xu=S(),P=m(),A=Re(),D_=Vu(),H_=Ku(),U_=Ju(),L_=Yr(),G=P.getGlobalObject(),B_=function(){function t(e){e===void 0&&(e=!1);var r,n;this._reportAllChanges=e,this._measurements={},this._performanceCursor=0,!P.isNodeEnv()&&((r=G)===null||r===void 0?void 0:r.performance)&&((n=G)===null||n===void 0?void 0:n.document)&&(G.performance.mark&&G.performance.mark("sentry-tracing-init"),this._trackCLS(),this._trackLCP(),this._trackFID())}return t.prototype.addPerformanceEntries=function(e){var r=this;if(!(!G||!G.performance||!G.performance.getEntries||!P.browserPerformanceTimeOrigin)){P.logger.log("[Tracing] Adding & adjusting spans using Performance API");var n=A.msToSec(P.browserPerformanceTimeOrigin),i;if(G.document&&G.document.scripts){for(var s=0;s<G.document.scripts.length;s++)if(G.document.scripts[s].dataset.entry==="true"){i=G.document.scripts[s].src;break}}var o,a,u,c;if(G.performance.getEntries().slice(this._performanceCursor).forEach(function(l){var d=A.msToSec(l.startTime),h=A.msToSec(l.duration);if(!(e.op==="navigation"&&n+d<e.startTimestamp))switch(l.entryType){case"navigation":{G_(e,l,n),u=n+A.msToSec(l.responseStart),c=n+A.msToSec(l.requestStart);break}case"mark":case"paint":case"measure":{var _=z_(e,l,d,h,n);a===void 0&&l.name==="sentry-tracing-init"&&(a=_);var v=L_.getVisibilityWatcher(),g=l.startTime<v.firstHiddenTime;l.name==="first-paint"&&g&&(P.logger.log("[Measurements] Adding FP"),r._measurements.fp={value:l.startTime},r._measurements["mark.fp"]={value:_}),l.name==="first-contentful-paint"&&g&&(P.logger.log("[Measurements] Adding FCP"),r._measurements.fcp={value:l.startTime},r._measurements["mark.fcp"]={value:_});break}case"resource":{var w=l.name.replace(G.location.origin,""),C=Zu(e,l,w,d,h,n);o===void 0&&(i||"").indexOf(w)>-1&&(o=C);break}default:}}),o!==void 0&&a!==void 0&&Pe(e,{description:"evaluation",endTimestamp:a,op:"script",startTimestamp:o}),this._performanceCursor=Math.max(performance.getEntries().length-1,0),this._trackNavigator(e),e.op==="pageload"){var f=A.msToSec(P.browserPerformanceTimeOrigin);typeof u=="number"&&(P.logger.log("[Measurements] Adding TTFB"),this._measurements.ttfb={value:(u-e.startTimestamp)*1e3},typeof c=="number"&&c<=u&&(this._measurements["ttfb.requestTime"]={value:(u-c)*1e3})),["fcp","fp","lcp"].forEach(function(l){if(!(!r._measurements[l]||f>=e.startTimestamp)){var d=r._measurements[l].value,h=f+A.msToSec(d),_=Math.abs((h-e.startTimestamp)*1e3),v=_-d;P.logger.log("[Measurements] Normalized "+l+" from "+d+" to "+_+" ("+v+")"),r._measurements[l].value=_}}),this._measurements["mark.fid"]&&this._measurements.fid&&Pe(e,{description:"first input delay",endTimestamp:this._measurements["mark.fid"].value+A.msToSec(this._measurements.fid.value),op:"web.vitals",startTimestamp:this._measurements["mark.fid"].value}),"fcp"in this._measurements||delete this._measurements.cls,e.setMeasurements(this._measurements),this._tagMetricInfo(e),e.setTag("sentry_reportAllChanges",this._reportAllChanges)}}},t.prototype._tagMetricInfo=function(e){this._lcpEntry&&(P.logger.log("[Measurements] Adding LCP Data"),this._lcpEntry.element&&e.setTag("lcp.element",P.htmlTreeAsString(this._lcpEntry.element)),this._lcpEntry.id&&e.setTag("lcp.id",this._lcpEntry.id),this._lcpEntry.url&&e.setTag("lcp.url",this._lcpEntry.url.trim().slice(0,200)),e.setTag("lcp.size",this._lcpEntry.size)),this._clsEntry&&this._clsEntry.sources&&(P.logger.log("[Measurements] Adding CLS Data"),this._clsEntry.sources.forEach(function(r,n){return e.setTag("cls.source."+(n+1),P.htmlTreeAsString(r.node))}))},t.prototype._trackCLS=function(){var e=this;D_.getCLS(function(r){var n=r.entries.pop();!n||(P.logger.log("[Measurements] Adding CLS"),e._measurements.cls={value:r.value},e._clsEntry=n)})},t.prototype._trackNavigator=function(e){var r=G.navigator;if(!!r){var n=r.connection;n&&(n.effectiveType&&e.setTag("effectiveConnectionType",n.effectiveType),n.type&&e.setTag("connectionType",n.type),Vr(n.rtt)&&(this._measurements["connection.rtt"]={value:n.rtt}),Vr(n.downlink)&&(this._measurements["connection.downlink"]={value:n.downlink})),Vr(r.deviceMemory)&&e.setTag("deviceMemory",String(r.deviceMemory)),Vr(r.hardwareConcurrency)&&e.setTag("hardwareConcurrency",String(r.hardwareConcurrency))}},t.prototype._trackLCP=function(){var e=this;U_.getLCP(function(r){var n=r.entries.pop();if(!!n){var i=A.msToSec(P.browserPerformanceTimeOrigin),s=A.msToSec(n.startTime);P.logger.log("[Measurements] Adding LCP"),e._measurements.lcp={value:r.value},e._measurements["mark.lcp"]={value:i+s},e._lcpEntry=n}},this._reportAllChanges)},t.prototype._trackFID=function(){var e=this;H_.getFID(function(r){var n=r.entries.pop();if(!!n){var i=A.msToSec(P.browserPerformanceTimeOrigin),s=A.msToSec(n.startTime);P.logger.log("[Measurements] Adding FID"),e._measurements.fid={value:r.value},e._measurements["mark.fid"]={value:i+s}}})},t}();jt.MetricsInstrumentation=B_;function G_(t,e,r){ke({transaction:t,entry:e,event:"unloadEvent",timeOrigin:r}),ke({transaction:t,entry:e,event:"redirect",timeOrigin:r}),ke({transaction:t,entry:e,event:"domContentLoadedEvent",timeOrigin:r}),ke({transaction:t,entry:e,event:"loadEvent",timeOrigin:r}),ke({transaction:t,entry:e,event:"connect",timeOrigin:r}),ke({transaction:t,entry:e,event:"secureConnection",timeOrigin:r,eventEnd:"connectEnd",description:"TLS/SSL"}),ke({transaction:t,entry:e,event:"fetch",timeOrigin:r,eventEnd:"domainLookupStart",description:"cache"}),ke({transaction:t,entry:e,event:"domainLookup",timeOrigin:r,description:"DNS"}),W_(t,e,r)}function z_(t,e,r,n,i){var s=i+r,o=s+n;return Pe(t,{description:e.name,endTimestamp:o,op:e.entryType,startTimestamp:s}),s}function Zu(t,e,r,n,i,s){if(!(e.initiatorType==="xmlhttprequest"||e.initiatorType==="fetch")){var o={};"transferSize"in e&&(o["Transfer Size"]=e.transferSize),"encodedBodySize"in e&&(o["Encoded Body Size"]=e.encodedBodySize),"decodedBodySize"in e&&(o["Decoded Body Size"]=e.decodedBodySize);var a=s+n,u=a+i;return Pe(t,{description:r,endTimestamp:u,op:e.initiatorType?"resource."+e.initiatorType:"resource",startTimestamp:a,data:o}),u}}jt.addResourceSpans=Zu;function ke(t){var e=t.transaction,r=t.entry,n=t.event,i=t.timeOrigin,s=t.eventEnd,o=t.description,a=s?r[s]:r[n+"End"],u=r[n+"Start"];!u||!a||Pe(e,{op:"browser",description:o??n,startTimestamp:i+A.msToSec(u),endTimestamp:i+A.msToSec(a)})}function W_(t,e,r){Pe(t,{op:"browser",description:"request",startTimestamp:r+A.msToSec(e.requestStart),endTimestamp:r+A.msToSec(e.responseEnd)}),Pe(t,{op:"browser",description:"response",startTimestamp:r+A.msToSec(e.responseStart),endTimestamp:r+A.msToSec(e.responseEnd)})}function Pe(t,e){var r=e.startTimestamp,n=Xu.__rest(e,["startTimestamp"]);return r&&t.startTimestamp>r&&(t.startTimestamp=r),t.startChild(Xu.__assign({startTimestamp:r},n))}jt._startChild=Pe;function Vr(t){return typeof t=="number"&&isFinite(t)}});var vs=p(me=>{Object.defineProperty(me,"__esModule",{value:!0});var ge=S(),Ft=m(),Y_=Ie(),Kr=Re();me.DEFAULT_TRACING_ORIGINS=["localhost",/^\//];me.defaultRequestInstrumentationOptions={traceFetch:!0,traceXHR:!0,tracingOrigins:me.DEFAULT_TRACING_ORIGINS};function V_(t){var e=ge.__assign(ge.__assign({},me.defaultRequestInstrumentationOptions),t),r=e.traceFetch,n=e.traceXHR,i=e.tracingOrigins,s=e.shouldCreateSpanForRequest,o={},a=function(f){if(o[f])return o[f];var l=i;return o[f]=l.some(function(d){return Ft.isMatchingPattern(f,d)})&&!Ft.isMatchingPattern(f,"sentry_key"),o[f]},u=a;typeof s=="function"&&(u=function(f){return a(f)&&s(f)});var c={};r&&Ft.addInstrumentationHandler({callback:function(f){ec(f,u,c)},type:"fetch"}),n&&Ft.addInstrumentationHandler({callback:function(f){tc(f,u,c)},type:"xhr"})}me.instrumentOutgoingRequests=V_;function ec(t,e,r){if(!(!Kr.hasTracingEnabled()||!(t.fetchData&&e(t.fetchData.url)))){if(t.endTimestamp&&t.fetchData.__span){var n=r[t.fetchData.__span];n&&(t.response?n.setHttpStatus(t.response.status):t.error&&n.setStatus(Y_.SpanStatus.InternalError),n.finish(),delete r[t.fetchData.__span]);return}var i=Kr.getActiveTransaction();if(i){var n=i.startChild({data:ge.__assign(ge.__assign({},t.fetchData),{type:"fetch"}),description:t.fetchData.method+" "+t.fetchData.url,op:"http.client"});t.fetchData.__span=n.spanId,r[n.spanId]=n;var s=t.args[0]=t.args[0],o=t.args[1]=t.args[1]||{},a=o.headers;Ft.isInstanceOf(s,Request)&&(a=s.headers),a?typeof a.append=="function"?a.append("sentry-trace",n.toTraceparent()):Array.isArray(a)?a=ge.__spread(a,[["sentry-trace",n.toTraceparent()]]):a=ge.__assign(ge.__assign({},a),{"sentry-trace":n.toTraceparent()}):a={"sentry-trace":n.toTraceparent()},o.headers=a}}}me.fetchCallback=ec;function tc(t,e,r){var n,i;if(!(!Kr.hasTracingEnabled()||((n=t.xhr)===null||n===void 0?void 0:n.__sentry_own_request__)||!(((i=t.xhr)===null||i===void 0?void 0:i.__sentry_xhr__)&&e(t.xhr.__sentry_xhr__.url)))){var s=t.xhr.__sentry_xhr__;if(t.endTimestamp&&t.xhr.__sentry_xhr_span_id__){var o=r[t.xhr.__sentry_xhr_span_id__];o&&(o.setHttpStatus(s.status_code),o.finish(),delete r[t.xhr.__sentry_xhr_span_id__]);return}var a=Kr.getActiveTransaction();if(a){var o=a.startChild({data:ge.__assign(ge.__assign({},s.data),{type:"xhr",method:s.method,url:s.url}),description:s.method+" "+s.url,op:"http.client"});if(t.xhr.__sentry_xhr_span_id__=o.spanId,r[t.xhr.__sentry_xhr_span_id__]=o,t.xhr.setRequestHeader)try{t.xhr.setRequestHeader("sentry-trace",o.toTraceparent())}catch{}}}}me.xhrCallback=tc});var rc=p(gs=>{Object.defineProperty(gs,"__esModule",{value:!0});var $r=m(),Dt=$r.getGlobalObject();function K_(t,e,r){if(e===void 0&&(e=!0),r===void 0&&(r=!0),!Dt||!Dt.location){$r.logger.warn("Could not initialize routing instrumentation due to invalid location");return}var n=Dt.location.href,i;e&&(i=t({name:Dt.location.pathname,op:"pageload"})),r&&$r.addInstrumentationHandler({callback:function(s){var o=s.to,a=s.from;if(a===void 0&&n&&n.indexOf(o)!==-1){n=void 0;return}a!==o&&(n=void 0,i&&($r.logger.log("[Tracing] Finishing current transaction with op: "+i.op),i.finish()),i=t({name:Dt.location.pathname,op:"navigation"}))},type:"history"})}gs.instrumentRoutingWithDefaults=K_});var oc=p(ze=>{Object.defineProperty(ze,"__esModule",{value:!0});var ye=S(),Ge=m(),$_=Hr(),J_=Fr(),X_=Ie(),nc=Re(),Z_=Wu(),Q_=Qu(),Jr=vs(),ev=rc();ze.DEFAULT_MAX_TRANSACTION_DURATION_SECONDS=600;var tv=ye.__assign({idleTimeout:J_.DEFAULT_IDLE_TIMEOUT,markBackgroundTransactions:!0,maxTransactionDuration:ze.DEFAULT_MAX_TRANSACTION_DURATION_SECONDS,routingInstrumentation:ev.instrumentRoutingWithDefaults,startTransactionOnLocationChange:!0,startTransactionOnPageLoad:!0},Jr.defaultRequestInstrumentationOptions),rv=function(){function t(e){this.name=t.id,this._emitOptionsWarning=!1,this._configuredIdleTimeout=void 0;var r=Jr.defaultRequestInstrumentationOptions.tracingOrigins;e&&(this._configuredIdleTimeout=e.idleTimeout,e.tracingOrigins&&Array.isArray(e.tracingOrigins)&&e.tracingOrigins.length!==0?r=e.tracingOrigins:this._emitOptionsWarning=!0),this.options=ye.__assign(ye.__assign(ye.__assign({},tv),e),{tracingOrigins:r});var n=this.options._metricOptions;this._metrics=new Q_.MetricsInstrumentation(n&&n._reportAllChanges)}return t.prototype.setupOnce=function(e,r){var n=this;this._getCurrentHub=r,this._emitOptionsWarning&&(Ge.logger.warn("[Tracing] You need to define `tracingOrigins` in the options. Set an array of urls or patterns to trace."),Ge.logger.warn("[Tracing] We added a reasonable default for you: "+Jr.defaultRequestInstrumentationOptions.tracingOrigins));var i=this.options,s=i.routingInstrumentation,o=i.startTransactionOnLocationChange,a=i.startTransactionOnPageLoad,u=i.markBackgroundTransactions,c=i.traceFetch,f=i.traceXHR,l=i.tracingOrigins,d=i.shouldCreateSpanForRequest;s(function(h){return n._createRouteTransaction(h)},a,o),u&&Z_.registerBackgroundTabDetection(),Jr.instrumentOutgoingRequests({traceFetch:c,traceXHR:f,tracingOrigins:l,shouldCreateSpanForRequest:d})},t.prototype._createRouteTransaction=function(e){var r=this;if(!this._getCurrentHub){Ge.logger.warn("[Tracing] Did not create "+e.op+" transaction because _getCurrentHub is invalid.");return}var n=this.options,i=n.beforeNavigate,s=n.idleTimeout,o=n.maxTransactionDuration,a=e.op==="pageload"?ic():void 0,u=ye.__assign(ye.__assign(ye.__assign({},e),a),{trimEnd:!0}),c=typeof i=="function"?i(u):u,f=c===void 0?ye.__assign(ye.__assign({},u),{sampled:!1}):c;f.sampled===!1&&Ge.logger.log("[Tracing] Will not send "+f.op+" transaction because of beforeNavigate."),Ge.logger.log("[Tracing] Starting "+f.op+" transaction on scope");var l=this._getCurrentHub(),d=Ge.getGlobalObject().location,h=$_.startIdleTransaction(l,f,s,!0,{location:d});return h.registerBeforeFinishCallback(function(_,v){r._metrics.addPerformanceEntries(_),nv(nc.secToMs(o),_,v)}),h.setTag("idleTimeout",this._configuredIdleTimeout),h},t.id="BrowserTracing",t}();ze.BrowserTracing=rv;function ic(){var t=sc("sentry-trace");if(t)return nc.extractTraceparentData(t)}ze.getHeaderContext=ic;function sc(t){var e=Ge.getGlobalObject().document.querySelector("meta[name="+t+"]");return e?e.getAttribute("content"):null}ze.getMetaContent=sc;function nv(t,e,r){var n=r-e.startTimestamp,i=r&&(n>t||n<0);i&&(e.setStatus(X_.SpanStatus.DeadlineExceeded),e.setTag("maxTransactionDurationExceeded","true"))}});var Xr=p(Ht=>{Object.defineProperty(Ht,"__esModule",{value:!0});var iv=oc();Ht.BrowserTracing=iv.BrowserTracing;var ac=vs();Ht.instrumentOutgoingRequests=ac.instrumentOutgoingRequests;Ht.defaultRequestInstrumentationOptions=ac.defaultRequestInstrumentationOptions});var uc=p(We=>{Object.defineProperty(We,"__esModule",{value:!0});var sv=Hu();We.Express=sv.Express;var ov=Uu();We.Postgres=ov.Postgres;var av=Lu();We.Mysql=av.Mysql;var uv=Bu();We.Mongo=uv.Mongo;var cv=Xr();We.BrowserTracing=cv.BrowserTracing});var fc=p(F=>{Object.defineProperty(F,"__esModule",{value:!0});var cc=Hr();F.addExtensionMethods=cc.addExtensionMethods;var lv=uc();F.Integrations=lv;var fv=Xr();F.BrowserTracing=fv.BrowserTracing;var dv=Ar();F.Span=dv.Span;var pv=Nr();F.Transaction=pv.Transaction;var lc=Xr();F.registerRequestInstrumentation=lc.instrumentOutgoingRequests;F.defaultRequestInstrumentationOptions=lc.defaultRequestInstrumentationOptions;var hv=Ie();F.SpanStatus=hv.SpanStatus;var _v=Fr();F.IdleTransaction=_v.IdleTransaction;var vv=Hr();F.startIdleTransaction=vv.startIdleTransaction;cc.addExtensionMethods();var Ut=Re();F.extractTraceparentData=Ut.extractTraceparentData;F.getActiveTransaction=Ut.getActiveTransaction;F.hasTracingEnabled=Ut.hasTracingEnabled;F.stripUrlQueryAndFragment=Ut.stripUrlQueryAndFragment;F.TRACEPARENT_REGEXP=Ut.TRACEPARENT_REGEXP});var dc=p(ms=>{"use strict";ms.parse=bv;ms.serialize=Sv;var gv=decodeURIComponent,mv=encodeURIComponent,yv=/; */,Zr=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function bv(t,e){if(typeof t!="string")throw new TypeError("argument str must be a string");for(var r={},n=e||{},i=t.split(yv),s=n.decode||gv,o=0;o<i.length;o++){var a=i[o],u=a.indexOf("=");if(!(u<0)){var c=a.substr(0,u).trim(),f=a.substr(++u,a.length).trim();f[0]=='"'&&(f=f.slice(1,-1)),r[c]==null&&(r[c]=Ev(f,s))}}return r}function Sv(t,e,r){var n=r||{},i=n.encode||mv;if(typeof i!="function")throw new TypeError("option encode is invalid");if(!Zr.test(t))throw new TypeError("argument name is invalid");var s=i(e);if(s&&!Zr.test(s))throw new TypeError("argument val is invalid");var o=t+"="+s;if(n.maxAge!=null){var a=n.maxAge-0;if(isNaN(a)||!isFinite(a))throw new TypeError("option maxAge is invalid");o+="; Max-Age="+Math.floor(a)}if(n.domain){if(!Zr.test(n.domain))throw new TypeError("option domain is invalid");o+="; Domain="+n.domain}if(n.path){if(!Zr.test(n.path))throw new TypeError("option path is invalid");o+="; Path="+n.path}if(n.expires){if(typeof n.expires.toUTCString!="function")throw new TypeError("option expires is invalid");o+="; Expires="+n.expires.toUTCString()}if(n.httpOnly&&(o+="; HttpOnly"),n.secure&&(o+="; Secure"),n.sameSite){var u=typeof n.sameSite=="string"?n.sameSite.toLowerCase():n.sameSite;switch(u){case!0:o+="; SameSite=Strict";break;case"lax":o+="; SameSite=Lax";break;case"strict":o+="; SameSite=Strict";break;case"none":o+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return o}function Ev(t,e){try{return e(t)}catch{return t}}});var _c=p(Ve=>{Object.defineProperty(Ve,"__esModule",{value:!0});var le=S(),Ye=N(),Tv=fc(),pc=D(),ht=m(),Ov=dc(),wv=require("domain"),xv=require("os"),Cv=require("url"),Lt=Bi();function Iv(){return function(e,r,n){var i;e.headers&&ht.isString(e.headers["sentry-trace"])&&(i=Tv.extractTraceparentData(e.headers["sentry-trace"]));var s=Ye.startTransaction(le.__assign({name:Qr(e,{path:!0,method:!0}),op:"http.server"},i),{request:en(e)});Ye.getCurrentHub().configureScope(function(o){o.setSpan(s)}),r.__sentry_transaction=s,r.once("finish",function(){setImmediate(function(){Rv(s,e),s.setHttpStatus(r.statusCode),s.finish()})}),n()}}Ve.tracingHandler=Iv;function Rv(t,e){!t||(t.name=Qr(e,{path:!0,method:!0}),t.setData("url",e.originalUrl),t.setData("baseUrl",e.baseUrl),t.setData("query",e.query))}function Qr(t,e){e===void 0&&(e={});var r,n=(r=t.method)===null||r===void 0?void 0:r.toUpperCase(),i="";t.route?i=""+(t.baseUrl||"")+t.route.path:(t.originalUrl||t.url)&&(i=ht.stripUrlQueryAndFragment(t.originalUrl||t.url||""));var s="";return e.method&&n&&(s+=n),e.method&&e.path&&(s+=" "),e.path&&i&&(s+=i),s}function qv(t,e){var r;switch(e){case"path":return Qr(t,{path:!0});case"handler":return((r=t.route)===null||r===void 0?void 0:r.stack[0].name)||"<anonymous>";case"methodPath":default:return Qr(t,{path:!0,method:!0})}}var kv=["id","username","email"];function Pv(t,e){var r={},n=Array.isArray(e)?e:kv;return n.forEach(function(i){t&&i in t&&(r[i]=t[i])}),r}var Mv=["cookies","data","headers","method","query_string","url"];function en(t,e){e===void 0&&(e=Mv);var r={},n=t.headers||t.header||{},i=t.method,s=t.hostname||t.host||n.host||"<no host>",o=t.protocol==="https"||t.secure||(t.socket||{}).encrypted?"https":"http",a=t.originalUrl||t.url||"",u=o+"://"+s+a;return e.forEach(function(c){switch(c){case"headers":r.headers=n;break;case"method":r.method=i;break;case"url":r.url=u;break;case"cookies":r.cookies=t.cookies||Ov.parse(n.cookie||"");break;case"query_string":r.query_string=t.query||Cv.parse(a||"",!1).query;break;case"data":if(i==="GET"||i==="HEAD")break;t.body!==void 0&&(r.data=ht.isString(t.body)?t.body:JSON.stringify(ht.normalize(t.body)));break;default:({}).hasOwnProperty.call(t,c)&&(r[c]=t[c])}}),r}Ve.extractRequestData=en;function hc(t,e,r){if(r=le.__assign({ip:!1,request:!0,serverName:!0,transaction:!0,user:!0,version:!0},r),r.version&&(t.contexts=le.__assign(le.__assign({},t.contexts),{runtime:{name:"node",version:global.process.version}})),r.request){var n=Array.isArray(r.request)?en(e,r.request):en(e);t.request=le.__assign(le.__assign({},t.request),n)}if(r.serverName&&!t.server_name&&(t.server_name=global.process.env.SENTRY_NAME||xv.hostname()),r.user){var i=e.user&&ht.isPlainObject(e.user)?Pv(e.user,r.user):{};Object.keys(i)&&(t.user=le.__assign(le.__assign({},t.user),i))}if(r.ip){var s=e.ip||e.connection&&e.connection.remoteAddress;s&&(t.user=le.__assign(le.__assign({},t.user),{ip_address:s}))}return r.transaction&&!t.transaction&&(t.transaction=qv(e,r.transaction)),t}Ve.parseRequest=hc;function Av(t){var e=Ye.getCurrentHub(),r=e.getClient();if(r&&Lt.isAutoSessionTrackingEnabled(r)){r.initSessionFlusher();var n=e.getScope();n&&n.getSession()&&n.setSession()}return function(s,o,a){if(t&&t.flushTimeout&&t.flushTimeout>0){var u=o.end;o.end=function(f,l,d){var h=this;Lt.flush(t.flushTimeout).then(function(){u.call(h,f,l,d)}).then(null,function(_){ht.logger.error(_)})}}var c=wv.create();c.add(s),c.add(o),c.on("error",a),c.run(function(){var f=Ye.getCurrentHub();f.configureScope(function(l){l.addEventProcessor(function(_){return hc(_,s,t)});var d=f.getClient();if(Lt.isAutoSessionTrackingEnabled(d)){var h=f.getScope();h&&h.setRequestSession({status:pc.RequestSessionStatus.Ok})}}),o.once("finish",function(){var l=f.getClient();Lt.isAutoSessionTrackingEnabled(l)&&setImmediate(function(){l&&l._captureRequestSession&&l._captureRequestSession()})}),a()})}}Ve.requestHandler=Av;function Nv(t){var e=t.status||t.statusCode||t.status_code||t.output&&t.output.statusCode;return e?parseInt(e,10):500}function jv(t){var e=Nv(t);return e>=500}function Fv(t){return function(r,n,i,s){var o=t&&t.shouldHandleError||jv;if(o(r)){Ye.withScope(function(a){var u=i.__sentry_transaction;u&&a.getSpan()===void 0&&a.setSpan(u);var c=Ye.getCurrentHub().getClient();if(c&&Lt.isAutoSessionTrackingEnabled(c)){var f=c._sessionFlusher!==void 0;if(f){var l=a.getRequestSession();l&&l.status!==void 0&&(l.status=pc.RequestSessionStatus.Crashed)}}var d=Ye.captureException(r);i.sentry=d,s(r)});return}s(r)}}Ve.errorHandler=Fv});var mc=p(E=>{Object.defineProperty(E,"__esModule",{value:!0});var vc=S(),gc=D();E.Severity=gc.Severity;E.Status=gc.Status;var q=N();E.addGlobalEventProcessor=q.addGlobalEventProcessor;E.addBreadcrumb=q.addBreadcrumb;E.captureException=q.captureException;E.captureEvent=q.captureEvent;E.captureMessage=q.captureMessage;E.configureScope=q.configureScope;E.getHubFromCarrier=q.getHubFromCarrier;E.getCurrentHub=q.getCurrentHub;E.Hub=q.Hub;E.makeMain=q.makeMain;E.Scope=q.Scope;E.startTransaction=q.startTransaction;E.SDK_VERSION=q.SDK_VERSION;E.setContext=q.setContext;E.setExtra=q.setExtra;E.setExtras=q.setExtras;E.setTag=q.setTag;E.setTags=q.setTags;E.setUser=q.setUser;E.withScope=q.withScope;var Dv=Ti();E.NodeBackend=Dv.NodeBackend;var Hv=xi();E.NodeClient=Hv.NodeClient;var _t=Bi();E.defaultIntegrations=_t.defaultIntegrations;E.init=_t.init;E.lastEventId=_t.lastEventId;E.flush=_t.flush;E.close=_t.close;E.getSentryRelease=_t.getSentryRelease;var Uv=Ou();E.deepReadDirSync=Uv.deepReadDirSync;var Lv=si();E.SDK_NAME=Lv.SDK_NAME;var Bv=N(),Gv=V(),zv=require("domain"),Wv=_c();E.Handlers=Wv;var Yv=Ui(),Vv=Si();E.Transports=Vv;var Kv=vc.__assign(vc.__assign({},Bv.Integrations),Yv);E.Integrations=Kv;var Bt=Gv.getMainCarrier();Bt.__SENTRY__&&(Bt.__SENTRY__.extensions=Bt.__SENTRY__.extensions||{},Bt.__SENTRY__.extensions.domain=Bt.__SENTRY__.extensions.domain||zv)});var ys=Ss(Cs());function Is(t){if(t.length==2)return t.toUpperCase().replace(/./g,e=>String.fromCodePoint(127397+e.charCodeAt(0)))}var tn=Ss(mc());tn.init({dsn:"https://aec0873e750c49b082fe3594def15af1@o1116132.ingest.sentry.io/6149280",tracesSampleRate:1});ys.default.version("0.1.0").name("country-flag-cli").command("get <flag>").action(t=>{let e=Is(t);e===void 0&&tn.captureMessage(`${t} produced ${e}`),console.log(e)});ys.default.parse(process.argv);
31
+ `);let{statusCode:h,buffered:_}=yield d;if(h===200){if(e.once("socket",Rp),r.secureEndpoint){let g=r.servername||r.host;if(!g)throw new Error('Could not determine "servername"');return Ct("Upgrading socket connection to TLS"),ja.default.connect(Object.assign(Object.assign({},Pp(r,"host","hostname","path","port")),{socket:s,servername:g}))}return s}s.destroy();let v=new Na.default.Socket;return v.readable=!0,e.once("socket",g=>{Ct("replaying proxy buffer for failed request"),wp.default(g.listenerCount("data")>0),g.push(_),g.push(null)}),v})}};Ue.default=Fa;function Rp(t){t.resume()}function qp(t,e){return Boolean(!e&&t===80||e&&t===443)}function kp(t){return typeof t=="string"?/^https:?$/i.test(t):!1}function Pp(t,...e){let r={},n;for(n in t)e.includes(n)||(r[n]=t[n]);return r}});var mi=p((gi,Ha)=>{"use strict";var Mp=gi&&gi.__importDefault||function(t){return t&&t.__esModule?t:{default:t}},_i=Mp(Da());function vi(t){return new _i.default(t)}(function(t){t.HttpsProxyAgent=_i.default,t.prototype=_i.default.prototype})(vi||(vi={}));Ha.exports=vi});var Ba=p(yi=>{Object.defineProperty(yi,"__esModule",{value:!0});var Ap=S(),Ua=N(),La=require("http"),Np=Tr(),jp=function(t){Ap.__extends(e,t);function e(r){var n=t.call(this,r)||this;n.options=r;var i=n._getProxy("http");return n.module=La,n.client=i?new(mi())(i):new La.Agent({keepAlive:!1,maxSockets:30,timeout:2e3}),n}return e.prototype.sendEvent=function(r){return this._send(Ua.eventToSentryRequest(r,this._api),r)},e.prototype.sendSession=function(r){return this._send(Ua.sessionToSentryRequest(r,this._api),r)},e}(Np.BaseTransport);yi.HTTPTransport=jp});var Wa=p(bi=>{Object.defineProperty(bi,"__esModule",{value:!0});var Fp=S(),Ga=N(),za=require("https"),Dp=Tr(),Hp=function(t){Fp.__extends(e,t);function e(r){var n=t.call(this,r)||this;n.options=r;var i=n._getProxy("https");return n.module=za,n.client=i?new(mi())(i):new za.Agent({keepAlive:!1,maxSockets:30,timeout:2e3}),n}return e.prototype.sendEvent=function(r){return this._send(Ga.eventToSentryRequest(r,this._api),r)},e.prototype.sendSession=function(r){return this._send(Ga.sessionToSentryRequest(r,this._api),r)},e}(Dp.BaseTransport);bi.HTTPSTransport=Hp});var Si=p(It=>{Object.defineProperty(It,"__esModule",{value:!0});var Up=Tr();It.BaseTransport=Up.BaseTransport;var Lp=Ba();It.HTTPTransport=Lp.HTTPTransport;var Bp=Wa();It.HTTPSTransport=Bp.HTTPSTransport});var Ti=p(Ei=>{Object.defineProperty(Ei,"__esModule",{value:!0});var we=S(),Ya=N(),Gp=D(),ve=m(),qr=ni(),Va=Si(),zp=function(t){we.__extends(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e.prototype.eventFromException=function(r,n){var i=this,s=r,o=n&&n.data&&n.data.mechanism,a=o||{handled:!0,type:"generic"};if(!ve.isError(r)){if(ve.isPlainObject(r)){var u="Non-Error exception captured with keys: "+ve.extractExceptionKeysForMessage(r);Ya.getCurrentHub().configureScope(function(c){c.setExtra("__serialized__",ve.normalizeToSize(r))}),s=n&&n.syntheticException||new Error(u),s.message=u}else s=n&&n.syntheticException||new Error(r),s.message=r;a.synthetic=!0}return new ve.SyncPromise(function(c,f){return qr.parseError(s,i._options).then(function(l){ve.addExceptionTypeValue(l,void 0,void 0),ve.addExceptionMechanism(l,a),c(we.__assign(we.__assign({},l),{event_id:n&&n.event_id}))}).then(null,f)})},e.prototype.eventFromMessage=function(r,n,i){var s=this;n===void 0&&(n=Gp.Severity.Info);var o={event_id:i&&i.event_id,level:n,message:r};return new ve.SyncPromise(function(a){if(s._options.attachStacktrace&&i&&i.syntheticException){var u=i.syntheticException?qr.extractStackFromError(i.syntheticException):[];qr.parseStack(u,s._options).then(function(c){o.stacktrace={frames:qr.prepareFramesForEvent(c)},a(o)}).then(null,function(){a(o)})}else a(o)})},e.prototype._setupTransport=function(){if(!this._options.dsn)return t.prototype._setupTransport.call(this);var r=new ve.Dsn(this._options.dsn),n=we.__assign(we.__assign(we.__assign(we.__assign(we.__assign({},this._options.transportOptions),this._options.httpProxy&&{httpProxy:this._options.httpProxy}),this._options.httpsProxy&&{httpsProxy:this._options.httpsProxy}),this._options.caCerts&&{caCerts:this._options.caCerts}),{dsn:this._options.dsn,tunnel:this._options.tunnel,_metadata:this._options._metadata});return this._options.transport?new this._options.transport(n):r.protocol==="http"?new Va.HTTPTransport(n):new Va.HTTPSTransport(n)},e}(Ya.BaseBackend);Ei.NodeBackend=zp});var xi=p(wi=>{Object.defineProperty(wi,"__esModule",{value:!0});var Wp=S(),Oi=N(),Yp=V(),kr=D(),Ka=m(),Vp=Ti(),Kp=function(t){Wp.__extends(e,t);function e(r){var n=this;return r._metadata=r._metadata||{},r._metadata.sdk=r._metadata.sdk||{name:"sentry.javascript.node",packages:[{name:"npm:@sentry/node",version:Oi.SDK_VERSION}],version:Oi.SDK_VERSION},n=t.call(this,Vp.NodeBackend,r)||this,n}return e.prototype.captureException=function(r,n,i){if(this._options.autoSessionTracking&&this._sessionFlusher&&i){var s=i.getRequestSession();s&&s.status===kr.RequestSessionStatus.Ok&&(s.status=kr.RequestSessionStatus.Errored)}return t.prototype.captureException.call(this,r,n,i)},e.prototype.captureEvent=function(r,n,i){if(this._options.autoSessionTracking&&this._sessionFlusher&&i){var s=r.type||"exception",o=s==="exception"&&r.exception&&r.exception.values&&r.exception.values.length>0;if(o){var a=i.getRequestSession();a&&a.status===kr.RequestSessionStatus.Ok&&(a.status=kr.RequestSessionStatus.Errored)}}return t.prototype.captureEvent.call(this,r,n,i)},e.prototype.close=function(r){var n;return(n=this._sessionFlusher)===null||n===void 0||n.close(),t.prototype.close.call(this,r)},e.prototype.initSessionFlusher=function(){var r=this._options,n=r.release,i=r.environment;n?this._sessionFlusher=new Yp.SessionFlusher(this.getTransport(),{release:n,environment:i}):Ka.logger.warn("Cannot initialise an instance of SessionFlusher if no release is provided!")},e.prototype._prepareEvent=function(r,n,i){return r.platform=r.platform||"node",this.getOptions().serverName&&(r.server_name=this.getOptions().serverName),t.prototype._prepareEvent.call(this,r,n,i)},e.prototype._captureRequestSession=function(){this._sessionFlusher?this._sessionFlusher.incrementSessionStatusCount():Ka.logger.warn("Discarded request mode session because autoSessionTracking option was disabled")},e}(Oi.BaseClient);wi.NodeClient=Kp});var Za=p(Ci=>{Object.defineProperty(Ci,"__esModule",{value:!0});var $a=S(),Ja=N(),Rt=D(),$p=m(),Jp=require("util"),Xa=function(){function t(){this.name=t.id}return t.prototype.setupOnce=function(){var e,r;try{for(var n=$a.__values(["debug","info","warn","error","log"]),i=n.next();!i.done;i=n.next()){var s=i.value;$p.fill(console,s,Xp(s))}}catch(o){e={error:o}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(e)throw e.error}}},t.id="Console",t}();Ci.Console=Xa;function Xp(t){return function(r){var n;switch(t){case"debug":n=Rt.Severity.Debug;break;case"error":n=Rt.Severity.Error;break;case"info":n=Rt.Severity.Info;break;case"warn":n=Rt.Severity.Warning;break;default:n=Rt.Severity.Log}return function(){Ja.getCurrentHub().getIntegration(Xa)&&Ja.getCurrentHub().addBreadcrumb({category:"console",level:n,message:Jp.format.apply(void 0,arguments)},{input:$a.__spread(arguments),level:t}),r.apply(this,arguments)}}}});var ru=p(Le=>{Object.defineProperty(Le,"__esModule",{value:!0});var Ii=S(),Zp=N(),Qp=m(),Qa=require("url"),eu=Qp.parseSemver(process.versions.node);function eh(t){var e,r=(e=Zp.getCurrentHub().getClient())===null||e===void 0?void 0:e.getDsn();return r?t.includes(r.host):!1}Le.isSentryRequest=eh;function tu(t){var e=t.protocol||"",r=t.hostname||t.host||"",n=!t.port||t.port===80||t.port===443?"":":"+t.port,i=t.path?t.path:"/";return e+"//"+r+n+i}Le.extractUrl=tu;function th(t,e,r){var n,i,s;if(!t)return t;var o=Ii.__read(t.split(" "),2),a=o[0],u=o[1];return e.host&&!e.protocol&&(e.protocol=(i=(n=r)===null||n===void 0?void 0:n.agent)===null||i===void 0?void 0:i.protocol,u=tu(e)),((s=u)===null||s===void 0?void 0:s.startsWith("///"))&&(u=u.slice(2)),a+" "+u}Le.cleanSpanDescription=th;function Ri(t){var e={protocol:t.protocol,hostname:typeof t.hostname=="string"&&t.hostname.startsWith("[")?t.hostname.slice(1,-1):t.hostname,hash:t.hash,search:t.search,pathname:t.pathname,path:""+(t.pathname||"")+(t.search||""),href:t.href};return t.port!==""&&(e.port=Number(t.port)),(t.username||t.password)&&(e.auth=t.username+":"+t.password),e}Le.urlToOptions=Ri;function rh(t,e){var r,n,i,s,o,a,u,c,f,l;return typeof e[e.length-1]=="function"&&(f=e.pop()),typeof e[0]=="string"?l=Ri(new Qa.URL(e[0])):e[0]instanceof Qa.URL?l=Ri(e[0]):l=e[0],e.length===2&&(l=Ii.__assign(Ii.__assign({},l),e[1])),l.protocol===void 0&&(eu.major&&eu.major>8?l.protocol=((n=(r=t)===null||r===void 0?void 0:r.globalAgent)===null||n===void 0?void 0:n.protocol)||((i=l.agent)===null||i===void 0?void 0:i.protocol)||((s=l._defaultAgent)===null||s===void 0?void 0:s.protocol):l.protocol=((o=l.agent)===null||o===void 0?void 0:o.protocol)||((a=l._defaultAgent)===null||a===void 0?void 0:a.protocol)||((c=(u=t)===null||u===void 0?void 0:u.globalAgent)===null||c===void 0?void 0:c.protocol)),f?[l,f]:[l]}Le.normalizeRequestArgs=rh});var au=p(ki=>{Object.defineProperty(ki,"__esModule",{value:!0});var nu=S(),qi=N(),ut=m(),qt=ru(),iu=ut.parseSemver(process.versions.node),su=function(){function t(e){e===void 0&&(e={}),this.name=t.id,this._breadcrumbs=typeof e.breadcrumbs=="undefined"?!0:e.breadcrumbs,this._tracing=typeof e.tracing=="undefined"?!1:e.tracing}return t.prototype.setupOnce=function(){if(!(!this._breadcrumbs&&!this._tracing)){var e=nh(this._breadcrumbs,this._tracing),r=require("http");if(ut.fill(r,"get",e),ut.fill(r,"request",e),iu.major&&iu.major>8){var n=require("https");ut.fill(n,"get",e),ut.fill(n,"request",e)}}},t.id="Http",t}();ki.Http=su;function nh(t,e){return function(n){return function(){for(var s=[],o=0;o<arguments.length;o++)s[o]=arguments[o];var a=this,u=qt.normalizeRequestArgs(this,s),c=u[0],f=qt.extractUrl(c);if(qt.isSentryRequest(f))return n.apply(a,u);var l,d,h=qi.getCurrentHub().getScope();if(h&&e&&(d=h.getSpan(),d)){l=d.startChild({description:(c.method||"GET")+" "+f,op:"http.client"});var _=l.toTraceparent();ut.logger.log("[Tracing] Adding sentry-trace header "+_+" to outgoing request to "+f+": "),c.headers=nu.__assign(nu.__assign({},c.headers),{"sentry-trace":_})}return n.apply(a,u).once("response",function(v){var g=this;t&&ou("response",f,g,v),e&&l&&(v.statusCode&&l.setHttpStatus(v.statusCode),l.description=qt.cleanSpanDescription(l.description,c,g),l.finish())}).once("error",function(){var v=this;t&&ou("error",f,v),e&&l&&(l.setHttpStatus(500),l.description=qt.cleanSpanDescription(l.description,c,v),l.finish())})}}}function ou(t,e,r,n){!qi.getCurrentHub().getIntegration(su)||qi.getCurrentHub().addBreadcrumb({category:"http",data:{method:r.method,status_code:n&&n.statusCode,url:e},type:"http"},{event:t,request:r,response:n})}});var Ai=p(Mi=>{Object.defineProperty(Mi,"__esModule",{value:!0});var ih=N(),Pi=m(),sh=2e3;function oh(t){console.error(t&&t.stack?t.stack:t);var e=ih.getCurrentHub().getClient();if(e===void 0){Pi.logger.warn("No NodeClient was defined, we are exiting the process now."),global.process.exit(1);return}var r=e.getOptions(),n=r&&r.shutdownTimeout&&r.shutdownTimeout>0&&r.shutdownTimeout||sh;Pi.forget(e.close(n).then(function(i){i||Pi.logger.warn("We reached the timeout for emptying the request buffer, still exiting now!"),global.process.exit(1)}))}Mi.logAndExitProcess=oh});var lu=p(Ni=>{Object.defineProperty(Ni,"__esModule",{value:!0});var uu=N(),ah=D(),uh=m(),cu=Ai(),ch=function(){function t(e){e===void 0&&(e={}),this._options=e,this.name=t.id,this.handler=this._makeErrorHandler()}return t.prototype.setupOnce=function(){global.process.on("uncaughtException",this.handler.bind(this))},t.prototype._makeErrorHandler=function(){var e=this,r=2e3,n=!1,i=!1,s=!1,o;return function(a){var u=cu.logAndExitProcess,c=uu.getCurrentHub().getClient();if(e._options.onFatalError?u=e._options.onFatalError:c&&c.getOptions().onFatalError&&(u=c.getOptions().onFatalError),n)s?(uh.logger.warn("uncaught exception after calling fatal error shutdown callback - this is bad! forcing shutdown"),cu.logAndExitProcess(a)):i||(i=!0,setTimeout(function(){s||(s=!0,u(o,a))},r));else{var f=uu.getCurrentHub();o=a,n=!0,f.getIntegration(t)?f.withScope(function(l){l.setLevel(ah.Severity.Fatal),f.captureException(a,{originalException:a,data:{mechanism:{handled:!1,type:"onuncaughtexception"}}}),s||(s=!0,u(a))}):s||(s=!0,u(a))}}},t.id="OnUncaughtException",t}();Ni.OnUncaughtException=ch});var du=p(ji=>{Object.defineProperty(ji,"__esModule",{value:!0});var lh=N(),fu=m(),fh=Ai(),dh=function(){function t(e){e===void 0&&(e={mode:"warn"}),this._options=e,this.name=t.id}return t.prototype.setupOnce=function(){global.process.on("unhandledRejection",this.sendUnhandledPromise.bind(this))},t.prototype.sendUnhandledPromise=function(e,r){var n=lh.getCurrentHub();if(!n.getIntegration(t)){this._handleRejection(e);return}var i=r.domain&&r.domain.sentryContext||{};n.withScope(function(s){s.setExtra("unhandledPromiseRejection",!0),i.user&&s.setUser(i.user),i.tags&&s.setTags(i.tags),i.extra&&s.setExtras(i.extra),n.captureException(e,{originalException:r,data:{mechanism:{handled:!1,type:"onunhandledrejection"}}})}),this._handleRejection(e)},t.prototype._handleRejection=function(e){var r="This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason:";this._options.mode==="warn"?fu.consoleSandbox(function(){console.warn(r),console.error(e&&e.stack?e.stack:e)}):this._options.mode==="strict"&&(fu.consoleSandbox(function(){console.warn(r)}),fh.logAndExitProcess(e))},t.id="OnUnhandledRejection",t}();ji.OnUnhandledRejection=dh});var _u=p(Fi=>{Object.defineProperty(Fi,"__esModule",{value:!0});var pu=S(),hu=N(),ct=m(),ph=ni(),hh="cause",_h=5,vh=function(){function t(e){e===void 0&&(e={}),this.name=t.id,this._key=e.key||hh,this._limit=e.limit||_h}return t.prototype.setupOnce=function(){hu.addGlobalEventProcessor(function(e,r){var n=hu.getCurrentHub().getIntegration(t);if(n){var i=n._handler&&n._handler.bind(n);return typeof i=="function"?i(e,r):e}return e})},t.prototype._handler=function(e,r){var n=this;return!e.exception||!e.exception.values||!r||!ct.isInstanceOf(r.originalException,Error)?ct.SyncPromise.resolve(e):new ct.SyncPromise(function(i){n._walkErrorTree(r.originalException,n._key).then(function(s){e&&e.exception&&e.exception.values&&(e.exception.values=pu.__spread(s,e.exception.values)),i(e)}).then(null,function(){i(e)})})},t.prototype._walkErrorTree=function(e,r,n){var i=this;return n===void 0&&(n=[]),!ct.isInstanceOf(e[r],Error)||n.length+1>=this._limit?ct.SyncPromise.resolve(n):new ct.SyncPromise(function(s,o){ph.getExceptionFromError(e[r]).then(function(a){i._walkErrorTree(e[r],r,pu.__spread([a],n)).then(s).then(null,function(){o()})}).then(null,function(){o()})})},t.id="LinkedErrors",t}();Fi.LinkedErrors=vh});var yu=p(Hi=>{Object.defineProperty(Hi,"__esModule",{value:!0});var vu=S(),gu=require("fs"),mu=require("path"),Di;function gh(){try{return require.cache?Object.keys(require.cache):[]}catch{return[]}}function mh(){var t=require.main&&require.main.paths||[],e=gh(),r={},n={};return e.forEach(function(i){var s=i,o=function(){var a=s;if(s=mu.dirname(a),!(!s||a===s||n[a])){if(t.indexOf(s)<0)return o();var u=mu.join(a,"package.json");if(n[a]=!0,!gu.existsSync(u))return o();try{var c=JSON.parse(gu.readFileSync(u,"utf8"));r[c.name]=c.version}catch{}}};o()}),r}var yh=function(){function t(){this.name=t.id}return t.prototype.setupOnce=function(e,r){var n=this;e(function(i){return r().getIntegration(t)?vu.__assign(vu.__assign({},i),{modules:n._getModules()}):i})},t.prototype._getModules=function(){return Di||(Di=mh()),Di},t.id="Modules",t}();Hi.Modules=yh});var Ui=p(xe=>{Object.defineProperty(xe,"__esModule",{value:!0});var bh=Za();xe.Console=bh.Console;var Sh=au();xe.Http=Sh.Http;var Eh=lu();xe.OnUncaughtException=Eh.OnUncaughtException;var Th=du();xe.OnUnhandledRejection=Th.OnUnhandledRejection;var Oh=_u();xe.LinkedErrors=Oh.LinkedErrors;var wh=yu();xe.Modules=wh.Modules});var Bi=p(ue=>{Object.defineProperty(ue,"__esModule",{value:!0});var kt=S(),Ce=N(),bu=V(),Su=D(),Li=m(),xh=require("domain"),Ch=xi(),Pt=Ui();ue.defaultIntegrations=[new Ce.Integrations.InboundFilters,new Ce.Integrations.FunctionToString,new Pt.Console,new Pt.Http,new Pt.OnUncaughtException,new Pt.OnUnhandledRejection,new Pt.LinkedErrors];function Ih(t){t===void 0&&(t={});var e,r=bu.getMainCarrier(),n=((e=r.__SENTRY__)===null||e===void 0?void 0:e.integrations)||[];if(t.defaultIntegrations=t.defaultIntegrations===!1?[]:kt.__spread(Array.isArray(t.defaultIntegrations)?t.defaultIntegrations:ue.defaultIntegrations,n),t.dsn===void 0&&process.env.SENTRY_DSN&&(t.dsn=process.env.SENTRY_DSN),t.tracesSampleRate===void 0&&process.env.SENTRY_TRACES_SAMPLE_RATE){var i=parseFloat(process.env.SENTRY_TRACES_SAMPLE_RATE);isFinite(i)&&(t.tracesSampleRate=i)}if(t.release===void 0){var s=Eu();s!==void 0?t.release=s:t.autoSessionTracking=!1}t.environment===void 0&&process.env.SENTRY_ENVIRONMENT&&(t.environment=process.env.SENTRY_ENVIRONMENT),t.autoSessionTracking===void 0&&t.dsn!==void 0&&(t.autoSessionTracking=!0),xh.active&&bu.setHubOnCarrier(r,Ce.getCurrentHub()),Ce.initAndBind(Ch.NodeClient,t),t.autoSessionTracking&&Mh()}ue.init=Ih;function Rh(){return Ce.getCurrentHub().lastEventId()}ue.lastEventId=Rh;function qh(t){return kt.__awaiter(this,void 0,void 0,function(){var e;return kt.__generator(this,function(r){return e=Ce.getCurrentHub().getClient(),e?[2,e.flush(t)]:(Li.logger.warn("Cannot flush events. No client defined."),[2,Promise.resolve(!1)])})})}ue.flush=qh;function kh(t){return kt.__awaiter(this,void 0,void 0,function(){var e;return kt.__generator(this,function(r){return e=Ce.getCurrentHub().getClient(),e?[2,e.close(t)]:(Li.logger.warn("Cannot flush events and disable SDK. No client defined."),[2,Promise.resolve(!1)])})})}ue.close=kh;function Ph(t){if(t===void 0)return!1;var e=t&&t.getOptions();return e&&e.autoSessionTracking!==void 0?e.autoSessionTracking:!1}ue.isAutoSessionTrackingEnabled=Ph;function Eu(t){if(process.env.SENTRY_RELEASE)return process.env.SENTRY_RELEASE;var e=Li.getGlobalObject();return e.SENTRY_RELEASE&&e.SENTRY_RELEASE.id?e.SENTRY_RELEASE.id:process.env.GITHUB_SHA||process.env.COMMIT_REF||process.env.VERCEL_GIT_COMMIT_SHA||process.env.VERCEL_GITHUB_COMMIT_SHA||process.env.VERCEL_GITLAB_COMMIT_SHA||process.env.VERCEL_BITBUCKET_COMMIT_SHA||process.env.ZEIT_GITHUB_COMMIT_SHA||process.env.ZEIT_GITLAB_COMMIT_SHA||process.env.ZEIT_BITBUCKET_COMMIT_SHA||t}ue.getSentryRelease=Eu;function Mh(){var t=Ce.getCurrentHub();t.startSession(),process.on("beforeExit",function(){var e,r=(e=t.getScope())===null||e===void 0?void 0:e.getSession(),n=[Su.SessionStatus.Exited,Su.SessionStatus.Crashed];r&&!n.includes(r.status)&&t.endSession()})}});var Ou=p(zi=>{Object.defineProperty(zi,"__esModule",{value:!0});var Tu=S(),Pr=require("fs"),Gi=require("path");function Ah(t){var e=Gi.resolve(t);if(!Pr.existsSync(e))throw new Error("Cannot read contents of "+e+". Directory does not exist.");if(!Pr.statSync(e).isDirectory())throw new Error("Cannot read contents of "+e+", because it is not a directory.");var r=function(n){return Pr.readdirSync(n).reduce(function(i,s){var o=Gi.join(n,s);return Pr.statSync(o).isDirectory()?Tu.__spread(i,r(o)):Tu.__spread(i,[o])},[])};return r(e).map(function(n){return Gi.relative(e,n)})}zi.deepReadDirSync=Ah});var Ie=p(lt=>{Object.defineProperty(lt,"__esModule",{value:!0});var wu;(function(t){t.Ok="ok",t.DeadlineExceeded="deadline_exceeded",t.Unauthenticated="unauthenticated",t.PermissionDenied="permission_denied",t.NotFound="not_found",t.ResourceExhausted="resource_exhausted",t.InvalidArgument="invalid_argument",t.Unimplemented="unimplemented",t.Unavailable="unavailable",t.InternalError="internal_error",t.UnknownError="unknown_error",t.Cancelled="cancelled",t.AlreadyExists="already_exists",t.FailedPrecondition="failed_precondition",t.Aborted="aborted",t.OutOfRange="out_of_range",t.DataLoss="data_loss"})(wu=lt.SpanStatus||(lt.SpanStatus={}));(function(t){function e(r){if(r<400&&r>=100)return t.Ok;if(r>=400&&r<500)switch(r){case 401:return t.Unauthenticated;case 403:return t.PermissionDenied;case 404:return t.NotFound;case 409:return t.AlreadyExists;case 413:return t.FailedPrecondition;case 429:return t.ResourceExhausted;default:return t.InvalidArgument}if(r>=500&&r<600)switch(r){case 501:return t.Unimplemented;case 503:return t.Unavailable;case 504:return t.DeadlineExceeded;default:return t.InternalError}return t.UnknownError}t.fromHttpCode=e})(wu=lt.SpanStatus||(lt.SpanStatus={}))});var Re=p(ce=>{Object.defineProperty(ce,"__esModule",{value:!0});var xu=V();ce.TRACEPARENT_REGEXP=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function Nh(t){t===void 0&&(t=(e=xu.getCurrentHub().getClient())===null||e===void 0?void 0:e.getOptions());var e;return!!t&&("tracesSampleRate"in t||"tracesSampler"in t)}ce.hasTracingEnabled=Nh;function jh(t){var e=t.match(ce.TRACEPARENT_REGEXP);if(e){var r=void 0;return e[3]==="1"?r=!0:e[3]==="0"&&(r=!1),{traceId:e[1],parentSampled:r,parentSpanId:e[2]}}}ce.extractTraceparentData=jh;function Fh(t){t===void 0&&(t=xu.getCurrentHub());var e,r;return(r=(e=t)===null||e===void 0?void 0:e.getScope())===null||r===void 0?void 0:r.getTransaction()}ce.getActiveTransaction=Fh;function Dh(t){return t/1e3}ce.msToSec=Dh;function Hh(t){return t*1e3}ce.secToMs=Hh;var Uh=m();ce.stripUrlQueryAndFragment=Uh.stripUrlQueryAndFragment});var Ru=p(Yi=>{Object.defineProperty(Yi,"__esModule",{value:!0});var Wi=m(),Cu=Ie(),Lh=Re();function Bh(){Wi.addInstrumentationHandler({callback:Iu,type:"error"}),Wi.addInstrumentationHandler({callback:Iu,type:"unhandledrejection"})}Yi.registerErrorInstrumentation=Bh;function Iu(){var t=Lh.getActiveTransaction();t&&(Wi.logger.log("[Tracing] Transaction: "+Cu.SpanStatus.InternalError+" -> Global error occured"),t.setStatus(Cu.SpanStatus.InternalError))}});var Vi=p(Mr=>{Object.defineProperty(Mr,"__esModule",{value:!0});Mr.FINISH_REASON_TAG="finishReason";Mr.IDLE_TRANSACTION_FINISH_REASONS=["heartbeatFailed","idleTimeout","documentHidden"]});var Nr=p(Ar=>{Object.defineProperty(Ar,"__esModule",{value:!0});var ft=S(),Be=m(),Ki=Ie(),Gh=function(){function t(e){e===void 0&&(e=1e3),this.spans=[],this._maxlen=e}return t.prototype.add=function(e){this.spans.length>this._maxlen?e.spanRecorder=void 0:this.spans.push(e)},t}();Ar.SpanRecorder=Gh;var zh=function(){function t(e){if(this.traceId=Be.uuid4(),this.spanId=Be.uuid4().substring(16),this.startTimestamp=Be.timestampWithMs(),this.tags={},this.data={},!e)return this;e.traceId&&(this.traceId=e.traceId),e.spanId&&(this.spanId=e.spanId),e.parentSpanId&&(this.parentSpanId=e.parentSpanId),"sampled"in e&&(this.sampled=e.sampled),e.op&&(this.op=e.op),e.description&&(this.description=e.description),e.data&&(this.data=e.data),e.tags&&(this.tags=e.tags),e.status&&(this.status=e.status),e.startTimestamp&&(this.startTimestamp=e.startTimestamp),e.endTimestamp&&(this.endTimestamp=e.endTimestamp)}return t.prototype.child=function(e){return this.startChild(e)},t.prototype.startChild=function(e){var r=new t(ft.__assign(ft.__assign({},e),{parentSpanId:this.spanId,sampled:this.sampled,traceId:this.traceId}));return r.spanRecorder=this.spanRecorder,r.spanRecorder&&r.spanRecorder.add(r),r.transaction=this.transaction,r},t.prototype.setTag=function(e,r){var n;return this.tags=ft.__assign(ft.__assign({},this.tags),(n={},n[e]=r,n)),this},t.prototype.setData=function(e,r){var n;return this.data=ft.__assign(ft.__assign({},this.data),(n={},n[e]=r,n)),this},t.prototype.setStatus=function(e){return this.status=e,this},t.prototype.setHttpStatus=function(e){this.setTag("http.status_code",String(e));var r=Ki.SpanStatus.fromHttpCode(e);return r!==Ki.SpanStatus.UnknownError&&this.setStatus(r),this},t.prototype.isSuccess=function(){return this.status===Ki.SpanStatus.Ok},t.prototype.finish=function(e){this.endTimestamp=typeof e=="number"?e:Be.timestampWithMs()},t.prototype.toTraceparent=function(){var e="";return this.sampled!==void 0&&(e=this.sampled?"-1":"-0"),this.traceId+"-"+this.spanId+e},t.prototype.toContext=function(){return Be.dropUndefinedKeys({data:this.data,description:this.description,endTimestamp:this.endTimestamp,op:this.op,parentSpanId:this.parentSpanId,sampled:this.sampled,spanId:this.spanId,startTimestamp:this.startTimestamp,status:this.status,tags:this.tags,traceId:this.traceId})},t.prototype.updateWithContext=function(e){var r,n,i,s,o;return this.data=(r=e.data,r??{}),this.description=e.description,this.endTimestamp=e.endTimestamp,this.op=e.op,this.parentSpanId=e.parentSpanId,this.sampled=e.sampled,this.spanId=(n=e.spanId,n??this.spanId),this.startTimestamp=(i=e.startTimestamp,i??this.startTimestamp),this.status=e.status,this.tags=(s=e.tags,s??{}),this.traceId=(o=e.traceId,o??this.traceId),this},t.prototype.getTraceContext=function(){return Be.dropUndefinedKeys({data:Object.keys(this.data).length>0?this.data:void 0,description:this.description,op:this.op,parent_span_id:this.parentSpanId,span_id:this.spanId,status:this.status,tags:Object.keys(this.tags).length>0?this.tags:void 0,trace_id:this.traceId})},t.prototype.toJSON=function(){return Be.dropUndefinedKeys({data:Object.keys(this.data).length>0?this.data:void 0,description:this.description,op:this.op,parent_span_id:this.parentSpanId,span_id:this.spanId,start_timestamp:this.startTimestamp,status:this.status,tags:Object.keys(this.tags).length>0?this.tags:void 0,timestamp:this.endTimestamp,trace_id:this.traceId})},t}();Ar.Span=zh});var jr=p($i=>{Object.defineProperty($i,"__esModule",{value:!0});var dt=S(),qu=V(),Wh=D(),pt=m(),ku=Nr(),Yh=function(t){dt.__extends(e,t);function e(r,n){var i=t.call(this,r)||this;return i._measurements={},i._hub=qu.getCurrentHub(),pt.isInstanceOf(n,qu.Hub)&&(i._hub=n),i.name=r.name||"",i.metadata=r.metadata||{},i._trimEnd=r.trimEnd,i.transaction=i,i}return e.prototype.setName=function(r){this.name=r},e.prototype.initSpanRecorder=function(r){r===void 0&&(r=1e3),this.spanRecorder||(this.spanRecorder=new ku.SpanRecorder(r)),this.spanRecorder.add(this)},e.prototype.setMeasurements=function(r){this._measurements=dt.__assign({},r)},e.prototype.setMetadata=function(r){this.metadata=dt.__assign(dt.__assign({},this.metadata),r)},e.prototype.finish=function(r){var n=this,i,s,o,a,u;if(this.endTimestamp===void 0){if(this.name||(pt.logger.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this.name="<unlabeled transaction>"),t.prototype.finish.call(this,r),this.sampled!==!0){pt.logger.log("[Tracing] Discarding transaction because its trace was not chosen to be sampled."),(u=(o=(i=this._hub.getClient())===null||i===void 0?void 0:(s=i).getTransport)===null||o===void 0?void 0:(a=o.call(s)).recordLostEvent)===null||u===void 0||u.call(a,Wh.Outcome.SampleRate,"transaction");return}var c=this.spanRecorder?this.spanRecorder.spans.filter(function(d){return d!==n&&d.endTimestamp}):[];this._trimEnd&&c.length>0&&(this.endTimestamp=c.reduce(function(d,h){return d.endTimestamp&&h.endTimestamp?d.endTimestamp>h.endTimestamp?d:h:d}).endTimestamp);var f={contexts:{trace:this.getTraceContext()},spans:c,start_timestamp:this.startTimestamp,tags:this.tags,timestamp:this.endTimestamp,transaction:this.name,type:"transaction",debug_meta:this.metadata},l=Object.keys(this._measurements).length>0;return l&&(pt.logger.log("[Measurements] Adding measurements to transaction",JSON.stringify(this._measurements,void 0,2)),f.measurements=this._measurements),pt.logger.log("[Tracing] Finishing "+this.op+" transaction: "+this.name+"."),this._hub.captureEvent(f)}},e.prototype.toContext=function(){var r=t.prototype.toContext.call(this);return pt.dropUndefinedKeys(dt.__assign(dt.__assign({},r),{name:this.name,trimEnd:this._trimEnd}))},e.prototype.updateWithContext=function(r){var n;return t.prototype.updateWithContext.call(this,r),this.name=(n=r.name,n??""),this._trimEnd=r.trimEnd,this},e}(ku.Span);$i.Transaction=Yh});var Dr=p(qe=>{Object.defineProperty(qe,"__esModule",{value:!0});var Ji=S(),U=m(),Fr=Vi(),Vh=Nr(),Pu=Ie(),Kh=jr();qe.DEFAULT_IDLE_TIMEOUT=1e3;qe.HEARTBEAT_INTERVAL=5e3;var Mu=function(t){Ji.__extends(e,t);function e(r,n,i,s){i===void 0&&(i="");var o=t.call(this,s)||this;return o._pushActivity=r,o._popActivity=n,o.transactionSpanId=i,o}return e.prototype.add=function(r){var n=this;r.spanId!==this.transactionSpanId&&(r.finish=function(i){r.endTimestamp=typeof i=="number"?i:U.timestampWithMs(),n._popActivity(r.spanId)},r.endTimestamp===void 0&&this._pushActivity(r.spanId)),t.prototype.add.call(this,r)},e}(Vh.SpanRecorder);qe.IdleTransactionSpanRecorder=Mu;var $h=function(t){Ji.__extends(e,t);function e(r,n,i,s){i===void 0&&(i=qe.DEFAULT_IDLE_TIMEOUT),s===void 0&&(s=!1);var o=t.call(this,r,n)||this;return o._idleHub=n,o._idleTimeout=i,o._onScope=s,o.activities={},o._heartbeatCounter=0,o._finished=!1,o._beforeFinishCallbacks=[],n&&s&&(Au(n),U.logger.log("Setting idle transaction on scope. Span ID: "+o.spanId),n.configureScope(function(a){return a.setSpan(o)})),o._initTimeout=setTimeout(function(){o._finished||o.finish()},o._idleTimeout),o}return e.prototype.finish=function(r){var n,i,s=this;if(r===void 0&&(r=U.timestampWithMs()),this._finished=!0,this.activities={},this.spanRecorder){U.logger.log("[Tracing] finishing IdleTransaction",new Date(r*1e3).toISOString(),this.op);try{for(var o=Ji.__values(this._beforeFinishCallbacks),a=o.next();!a.done;a=o.next()){var u=a.value;u(this,r)}}catch(c){n={error:c}}finally{try{a&&!a.done&&(i=o.return)&&i.call(o)}finally{if(n)throw n.error}}this.spanRecorder.spans=this.spanRecorder.spans.filter(function(c){if(c.spanId===s.spanId)return!0;c.endTimestamp||(c.endTimestamp=r,c.setStatus(Pu.SpanStatus.Cancelled),U.logger.log("[Tracing] cancelling span since transaction ended early",JSON.stringify(c,void 0,2)));var f=c.startTimestamp<r;return f||U.logger.log("[Tracing] discarding Span since it happened after Transaction was finished",JSON.stringify(c,void 0,2)),f}),U.logger.log("[Tracing] flushing IdleTransaction")}else U.logger.log("[Tracing] No active IdleTransaction");return this._onScope&&Au(this._idleHub),t.prototype.finish.call(this,r)},e.prototype.registerBeforeFinishCallback=function(r){this._beforeFinishCallbacks.push(r)},e.prototype.initSpanRecorder=function(r){var n=this;if(!this.spanRecorder){var i=function(o){n._finished||n._pushActivity(o)},s=function(o){n._finished||n._popActivity(o)};this.spanRecorder=new Mu(i,s,this.spanId,r),U.logger.log("Starting heartbeat"),this._pingHeartbeat()}this.spanRecorder.add(this)},e.prototype._pushActivity=function(r){this._initTimeout&&(clearTimeout(this._initTimeout),this._initTimeout=void 0),U.logger.log("[Tracing] pushActivity: "+r),this.activities[r]=!0,U.logger.log("[Tracing] new activities count",Object.keys(this.activities).length)},e.prototype._popActivity=function(r){var n=this;if(this.activities[r]&&(U.logger.log("[Tracing] popActivity "+r),delete this.activities[r],U.logger.log("[Tracing] new activities count",Object.keys(this.activities).length)),Object.keys(this.activities).length===0){var i=this._idleTimeout,s=U.timestampWithMs()+i/1e3;setTimeout(function(){n._finished||(n.setTag(Fr.FINISH_REASON_TAG,Fr.IDLE_TRANSACTION_FINISH_REASONS[1]),n.finish(s))},i)}},e.prototype._beat=function(){if(!this._finished){var r=Object.keys(this.activities).join("");r===this._prevHeartbeatString?this._heartbeatCounter+=1:this._heartbeatCounter=1,this._prevHeartbeatString=r,this._heartbeatCounter>=3?(U.logger.log("[Tracing] Transaction finished because of no change for 3 heart beats"),this.setStatus(Pu.SpanStatus.DeadlineExceeded),this.setTag(Fr.FINISH_REASON_TAG,Fr.IDLE_TRANSACTION_FINISH_REASONS[0]),this.finish()):this._pingHeartbeat()}},e.prototype._pingHeartbeat=function(){var r=this;U.logger.log("pinging Heartbeat -> current counter: "+this._heartbeatCounter),setTimeout(function(){r._beat()},qe.HEARTBEAT_INTERVAL)},e}(Kh.Transaction);qe.IdleTransaction=$h;function Au(t){if(t){var e=t.getScope();if(e){var r=e.getTransaction();r&&e.setSpan(void 0)}}}});var Ur=p((Mt,At)=>{Object.defineProperty(Mt,"__esModule",{value:!0});var Xi=S(),Nu=V(),Hr=D(),ee=m(),Jh=Ru(),Xh=Dr(),Zh=jr(),Qh=Re();function e_(){var t=this.getScope();if(t){var e=t.getSpan();if(e)return{"sentry-trace":e.toTraceparent()}}return{}}function ju(t,e,r){if(!Qh.hasTracingEnabled(e))return t.sampled=!1,t;if(t.sampled!==void 0)return t.setMetadata({transactionSampling:{method:Hr.TransactionSamplingMethod.Explicit}}),t;var n;return typeof e.tracesSampler=="function"?(n=e.tracesSampler(r),t.setMetadata({transactionSampling:{method:Hr.TransactionSamplingMethod.Sampler,rate:Number(n)}})):r.parentSampled!==void 0?(n=r.parentSampled,t.setMetadata({transactionSampling:{method:Hr.TransactionSamplingMethod.Inheritance}})):(n=e.tracesSampleRate,t.setMetadata({transactionSampling:{method:Hr.TransactionSamplingMethod.Rate,rate:Number(n)}})),t_(n)?n?(t.sampled=Math.random()<n,t.sampled?(ee.logger.log("[Tracing] starting "+t.op+" transaction - "+t.name),t):(ee.logger.log("[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = "+Number(n)+")"),t)):(ee.logger.log("[Tracing] Discarding transaction because "+(typeof e.tracesSampler=="function"?"tracesSampler returned 0 or false":"a negative sampling decision was inherited or tracesSampleRate is set to 0")),t.sampled=!1,t):(ee.logger.warn("[Tracing] Discarding transaction because of invalid sample rate."),t.sampled=!1,t)}function t_(t){return isNaN(t)||!(typeof t=="number"||typeof t=="boolean")?(ee.logger.warn("[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got "+JSON.stringify(t)+" of type "+JSON.stringify(typeof t)+"."),!1):t<0||t>1?(ee.logger.warn("[Tracing] Given sample rate is invalid. Sample rate must be between 0 and 1. Got "+t+"."),!1):!0}function r_(t,e){var r,n,i=((r=this.getClient())===null||r===void 0?void 0:r.getOptions())||{},s=new Zh.Transaction(t,this);return s=ju(s,i,Xi.__assign({parentSampled:t.parentSampled,transactionContext:t},e)),s.sampled&&s.initSpanRecorder((n=i._experiments)===null||n===void 0?void 0:n.maxSpans),s}function n_(t,e,r,n,i){var s,o,a=((s=t.getClient())===null||s===void 0?void 0:s.getOptions())||{},u=new Xh.IdleTransaction(e,t,r,n);return u=ju(u,a,Xi.__assign({parentSampled:e.parentSampled,transactionContext:e},i)),u.sampled&&u.initSpanRecorder((o=a._experiments)===null||o===void 0?void 0:o.maxSpans),u}Mt.startIdleTransaction=n_;function Fu(){var t=Nu.getMainCarrier();!t.__SENTRY__||(t.__SENTRY__.extensions=t.__SENTRY__.extensions||{},t.__SENTRY__.extensions.startTransaction||(t.__SENTRY__.extensions.startTransaction=r_),t.__SENTRY__.extensions.traceHeaders||(t.__SENTRY__.extensions.traceHeaders=e_))}Mt._addTracingExtensions=Fu;function i_(){var t=Nu.getMainCarrier();if(!!t.__SENTRY__){var e={mongodb:function(){var n=ee.dynamicRequire(At,"./integrations/node/mongo");return new n.Mongo},mongoose:function(){var n=ee.dynamicRequire(At,"./integrations/node/mongo");return new n.Mongo({mongoose:!0})},mysql:function(){var n=ee.dynamicRequire(At,"./integrations/node/mysql");return new n.Mysql},pg:function(){var n=ee.dynamicRequire(At,"./integrations/node/postgres");return new n.Postgres}},r=Object.keys(e).filter(function(n){return!!ee.loadModule(n)}).map(function(n){try{return e[n]()}catch{return}}).filter(function(n){return n});r.length>0&&(t.__SENTRY__.integrations=Xi.__spread(t.__SENTRY__.integrations||[],r))}}function s_(){Fu(),ee.isNodeEnv()&&i_(),Jh.registerErrorInstrumentation()}Mt.addExtensionMethods=s_});var Hu=p(Qi=>{Object.defineProperty(Qi,"__esModule",{value:!0});var Zi=S(),o_=m(),a_=function(){function t(e){e===void 0&&(e={}),this.name=t.id,this._router=e.router||e.app,this._methods=(Array.isArray(e.methods)?e.methods:[]).concat("use")}return t.prototype.setupOnce=function(){if(!this._router){o_.logger.error("ExpressIntegration is missing an Express instance");return}l_(this._router,this._methods)},t.id="Express",t}();Qi.Express=a_;function Du(t,e){var r=t.length;switch(r){case 2:return function(n,i){var s=i.__sentry_transaction;if(s){var o=s.startChild({description:t.name,op:"express.middleware."+e});i.once("finish",function(){o.finish()})}return t.call(this,n,i)};case 3:return function(n,i,s){var o,a=i.__sentry_transaction,u=(o=a)===null||o===void 0?void 0:o.startChild({description:t.name,op:"express.middleware."+e});t.call(this,n,i,function(){for(var c=[],f=0;f<arguments.length;f++)c[f]=arguments[f];var l;(l=u)===null||l===void 0||l.finish(),s.call.apply(s,Zi.__spread([this],c))})};case 4:return function(n,i,s,o){var a,u=s.__sentry_transaction,c=(a=u)===null||a===void 0?void 0:a.startChild({description:t.name,op:"express.middleware."+e});t.call(this,n,i,s,function(){for(var f=[],l=0;l<arguments.length;l++)f[l]=arguments[l];var d;(d=c)===null||d===void 0||d.finish(),o.call.apply(o,Zi.__spread([this],f))})};default:throw new Error("Express middleware takes 2-4 arguments. Got: "+r)}}function u_(t,e){return t.map(function(r){return typeof r=="function"?Du(r,e):Array.isArray(r)?r.map(function(n){return typeof n=="function"?Du(n,e):n}):r})}function c_(t,e){var r=t[e];return t[e]=function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];return r.call.apply(r,Zi.__spread([this],u_(n,e)))},t}function l_(t,e){e===void 0&&(e=[]),e.forEach(function(r){return c_(t,r)})}});var Uu=p(es=>{Object.defineProperty(es,"__esModule",{value:!0});var Nt=m(),f_=function(){function t(e){e===void 0&&(e={}),this.name=t.id,this._usePgNative=!!e.usePgNative}return t.prototype.setupOnce=function(e,r){var n,i=Nt.loadModule("pg");if(!i){Nt.logger.error("Postgres Integration was unable to require `pg` package.");return}if(this._usePgNative&&!((n=i.native)===null||n===void 0?void 0:n.Client)){Nt.logger.error("Postgres Integration was unable to access 'pg-native' bindings.");return}var s=(this._usePgNative?i.native:i).Client;Nt.fill(s.prototype,"query",function(o){return function(a,u,c){var f,l,d,h=r().getScope(),_=(f=h)===null||f===void 0?void 0:f.getSpan(),v=(l=_)===null||l===void 0?void 0:l.startChild({description:typeof a=="string"?a:a.text,op:"db"});if(typeof c=="function")return o.call(this,a,u,function(w,C){var I;(I=v)===null||I===void 0||I.finish(),c(w,C)});if(typeof u=="function")return o.call(this,a,function(w,C){var I;(I=v)===null||I===void 0||I.finish(),u(w,C)});var g=typeof u!="undefined"?o.call(this,a,u):o.call(this,a);return Nt.isThenable(g)?g.then(function(w){var C;return(C=v)===null||C===void 0||C.finish(),w}):((d=v)===null||d===void 0||d.finish(),g)}})},t.id="Postgres",t}();es.Postgres=f_});var Lu=p(rs=>{Object.defineProperty(rs,"__esModule",{value:!0});var ts=m(),d_=function(){function t(){this.name=t.id}return t.prototype.setupOnce=function(e,r){var n=ts.loadModule("mysql/lib/Connection.js");if(!n){ts.logger.error("Mysql Integration was unable to require `mysql` package.");return}ts.fill(n,"createQuery",function(i){return function(s,o,a){var u,c,f=r().getScope(),l=(u=f)===null||u===void 0?void 0:u.getSpan(),d=(c=l)===null||c===void 0?void 0:c.startChild({description:typeof s=="string"?s:s.sql,op:"db"});return typeof a=="function"?i.call(this,s,o,function(h,_,v){var g;(g=d)===null||g===void 0||g.finish(),a(h,_,v)}):typeof o=="function"?i.call(this,s,function(h,_,v){var g;(g=d)===null||g===void 0||g.finish(),o(h,_,v)}):i.call(this,s,o,a)}})},t.id="Mysql",t}();rs.Mysql=d_});var Bu=p(is=>{Object.defineProperty(is,"__esModule",{value:!0});var ns=S(),Lr=m(),p_=["aggregate","bulkWrite","countDocuments","createIndex","createIndexes","deleteMany","deleteOne","distinct","drop","dropIndex","dropIndexes","estimatedDocumentCount","find","findOne","findOneAndDelete","findOneAndReplace","findOneAndUpdate","indexes","indexExists","indexInformation","initializeOrderedBulkOp","insertMany","insertOne","isCapped","mapReduce","options","parallelCollectionScan","rename","replaceOne","stats","updateMany","updateOne"],h_={bulkWrite:["operations"],countDocuments:["query"],createIndex:["fieldOrSpec"],createIndexes:["indexSpecs"],deleteMany:["filter"],deleteOne:["filter"],distinct:["key","query"],dropIndex:["indexName"],find:["query"],findOne:["query"],findOneAndDelete:["filter"],findOneAndReplace:["filter","replacement"],findOneAndUpdate:["filter","update"],indexExists:["indexes"],insertMany:["docs"],insertOne:["doc"],mapReduce:["map","reduce"],rename:["newName"],replaceOne:["filter","doc"],updateMany:["filter","update"],updateOne:["filter","update"]},__=function(){function t(e){e===void 0&&(e={}),this.name=t.id,this._operations=Array.isArray(e.operations)?e.operations:p_,this._describeOperations="describeOperations"in e?e.describeOperations:!0,this._useMongoose=!!e.useMongoose}return t.prototype.setupOnce=function(e,r){var n=this._useMongoose?"mongoose":"mongodb",i=Lr.loadModule(n);if(!i){Lr.logger.error("Mongo Integration was unable to require `"+n+"` package.");return}this._instrumentOperations(i.Collection,this._operations,r)},t.prototype._instrumentOperations=function(e,r,n){var i=this;r.forEach(function(s){return i._patchOperation(e,s,n)})},t.prototype._patchOperation=function(e,r,n){if(r in e.prototype){var i=this._getSpanContextFromOperationArguments.bind(this);Lr.fill(e.prototype,r,function(s){return function(){for(var o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];var u,c,f,l,d=o[o.length-1],h=n().getScope(),_=(u=h)===null||u===void 0?void 0:u.getSpan();if(typeof d!="function"||r==="mapReduce"&&o.length===2){var v=(c=_)===null||c===void 0?void 0:c.startChild(i(this,r,o)),g=s.call.apply(s,ns.__spread([this],o));return Lr.isThenable(g)?g.then(function(C){var I;return(I=v)===null||I===void 0||I.finish(),C}):((f=v)===null||f===void 0||f.finish(),g)}var w=(l=_)===null||l===void 0?void 0:l.startChild(i(this,r,o.slice(0,-1)));return s.call.apply(s,ns.__spread([this],o.slice(0,-1),[function(C,I){var be;(be=w)===null||be===void 0||be.finish(),d(C,I)}]))}})}},t.prototype._getSpanContextFromOperationArguments=function(e,r,n){var i={collectionName:e.collectionName,dbName:e.dbName,namespace:e.namespace},s={op:"db",description:r,data:i},o=h_[r],a=Array.isArray(this._describeOperations)?this._describeOperations.includes(r):this._describeOperations;if(!o||!a)return s;try{if(r==="mapReduce"){var u=ns.__read(n,2),c=u[0],f=u[1];i[o[0]]=typeof c=="string"?c:c.name||"<anonymous>",i[o[1]]=typeof f=="string"?f:f.name||"<anonymous>"}else for(var l=0;l<o.length;l++)i[o[l]]=JSON.stringify(n[l])}catch{}return s},t.id="Mongo",t}();is.Mongo=__});var Wu=p(os=>{Object.defineProperty(os,"__esModule",{value:!0});var ss=m(),Gu=Vi(),zu=Ie(),v_=Re(),Br=ss.getGlobalObject();function g_(){Br&&Br.document?Br.document.addEventListener("visibilitychange",function(){var t=v_.getActiveTransaction();Br.document.hidden&&t&&(ss.logger.log("[Tracing] Transaction: "+zu.SpanStatus.Cancelled+" -> since tab moved to the background, op: "+t.op),t.status||t.setStatus(zu.SpanStatus.Cancelled),t.setTag("visibilitychange","document.hidden"),t.setTag(Gu.FINISH_REASON_TAG,Gu.IDLE_TRANSACTION_FINISH_REASONS[2]),t.finish())}):ss.logger.warn("[Tracing] Could not set up background tab detection due to lack of global document")}os.registerBackgroundTabDetection=g_});var Gr=p(as=>{Object.defineProperty(as,"__esModule",{value:!0});as.bindReporter=function(t,e,r){var n;return function(i){e.value>=0&&(i||r)&&(e.delta=e.value-(n||0),(e.delta||n===void 0)&&(n=e.value,t(e)))}}});var Yu=p(us=>{Object.defineProperty(us,"__esModule",{value:!0});us.generateUniqueID=function(){return"v2-"+Date.now()+"-"+(Math.floor(Math.random()*(9e12-1))+1e12)}});var zr=p(cs=>{Object.defineProperty(cs,"__esModule",{value:!0});var m_=Yu();cs.initMetric=function(t,e){return{name:t,value:e??-1,delta:0,entries:[],id:m_.generateUniqueID()}}});var Wr=p(ls=>{Object.defineProperty(ls,"__esModule",{value:!0});ls.observe=function(t,e){try{if(PerformanceObserver.supportedEntryTypes.includes(t)){if(t==="first-input"&&!("PerformanceEventTiming"in self))return;var r=new PerformanceObserver(function(n){return n.getEntries().map(e)});return r.observe({type:t,buffered:!0}),r}}catch{}}});var jt=p(fs=>{Object.defineProperty(fs,"__esModule",{value:!0});var y_=m();fs.onHidden=function(t,e){var r=function(n){(n.type==="pagehide"||y_.getGlobalObject().document.visibilityState==="hidden")&&(t(n),e&&(removeEventListener("visibilitychange",r,!0),removeEventListener("pagehide",r,!0)))};addEventListener("visibilitychange",r,!0),addEventListener("pagehide",r,!0)}});var Vu=p(ds=>{Object.defineProperty(ds,"__esModule",{value:!0});var b_=Gr(),S_=zr(),E_=Wr(),T_=jt();ds.getCLS=function(t,e){var r=S_.initMetric("CLS",0),n,i=0,s=[],o=function(u){if(u&&!u.hadRecentInput){var c=s[0],f=s[s.length-1];i&&s.length!==0&&u.startTime-f.startTime<1e3&&u.startTime-c.startTime<5e3?(i+=u.value,s.push(u)):(i=u.value,s=[u]),i>r.value&&(r.value=i,r.entries=s,n&&n())}},a=E_.observe("layout-shift",o);a&&(n=b_.bindReporter(t,r,e),T_.onHidden(function(){a.takeRecords().map(o),n(!0)}))}});var Vr=p(ps=>{Object.defineProperty(ps,"__esModule",{value:!0});var O_=m(),w_=jt(),Yr=-1,x_=function(){return O_.getGlobalObject().document.visibilityState==="hidden"?0:1/0},C_=function(){w_.onHidden(function(t){var e=t.timeStamp;Yr=e},!0)};ps.getVisibilityWatcher=function(){return Yr<0&&(Yr=x_(),C_()),{get firstHiddenTime(){return Yr}}}});var Ku=p(hs=>{Object.defineProperty(hs,"__esModule",{value:!0});var I_=Gr(),R_=Vr(),q_=zr(),k_=Wr(),P_=jt();hs.getFID=function(t,e){var r=R_.getVisibilityWatcher(),n=q_.initMetric("FID"),i,s=function(a){i&&a.startTime<r.firstHiddenTime&&(n.value=a.processingStart-a.startTime,n.entries.push(a),i(!0))},o=k_.observe("first-input",s);o&&(i=I_.bindReporter(t,n,e),P_.onHidden(function(){o.takeRecords().map(s),o.disconnect()},!0))}});var Ju=p(_s=>{Object.defineProperty(_s,"__esModule",{value:!0});var M_=Gr(),A_=Vr(),N_=zr(),j_=Wr(),F_=jt(),$u={};_s.getLCP=function(t,e){var r=A_.getVisibilityWatcher(),n=N_.initMetric("LCP"),i,s=function(u){var c=u.startTime;c<r.firstHiddenTime&&(n.value=c,n.entries.push(u)),i&&i()},o=j_.observe("largest-contentful-paint",s);if(o){i=M_.bindReporter(t,n,e);var a=function(){$u[n.id]||(o.takeRecords().map(s),o.disconnect(),$u[n.id]=!0,i(!0))};["keydown","click"].forEach(function(u){addEventListener(u,a,{once:!0,capture:!0})}),F_.onHidden(a,!0)}}});var Qu=p(Ft=>{Object.defineProperty(Ft,"__esModule",{value:!0});var Xu=S(),P=m(),A=Re(),D_=Vu(),H_=Ku(),U_=Ju(),L_=Vr(),G=P.getGlobalObject(),B_=function(){function t(e){e===void 0&&(e=!1);var r,n;this._reportAllChanges=e,this._measurements={},this._performanceCursor=0,!P.isNodeEnv()&&((r=G)===null||r===void 0?void 0:r.performance)&&((n=G)===null||n===void 0?void 0:n.document)&&(G.performance.mark&&G.performance.mark("sentry-tracing-init"),this._trackCLS(),this._trackLCP(),this._trackFID())}return t.prototype.addPerformanceEntries=function(e){var r=this;if(!(!G||!G.performance||!G.performance.getEntries||!P.browserPerformanceTimeOrigin)){P.logger.log("[Tracing] Adding & adjusting spans using Performance API");var n=A.msToSec(P.browserPerformanceTimeOrigin),i;if(G.document&&G.document.scripts){for(var s=0;s<G.document.scripts.length;s++)if(G.document.scripts[s].dataset.entry==="true"){i=G.document.scripts[s].src;break}}var o,a,u,c;if(G.performance.getEntries().slice(this._performanceCursor).forEach(function(l){var d=A.msToSec(l.startTime),h=A.msToSec(l.duration);if(!(e.op==="navigation"&&n+d<e.startTimestamp))switch(l.entryType){case"navigation":{G_(e,l,n),u=n+A.msToSec(l.responseStart),c=n+A.msToSec(l.requestStart);break}case"mark":case"paint":case"measure":{var _=z_(e,l,d,h,n);a===void 0&&l.name==="sentry-tracing-init"&&(a=_);var v=L_.getVisibilityWatcher(),g=l.startTime<v.firstHiddenTime;l.name==="first-paint"&&g&&(P.logger.log("[Measurements] Adding FP"),r._measurements.fp={value:l.startTime},r._measurements["mark.fp"]={value:_}),l.name==="first-contentful-paint"&&g&&(P.logger.log("[Measurements] Adding FCP"),r._measurements.fcp={value:l.startTime},r._measurements["mark.fcp"]={value:_});break}case"resource":{var w=l.name.replace(G.location.origin,""),C=Zu(e,l,w,d,h,n);o===void 0&&(i||"").indexOf(w)>-1&&(o=C);break}default:}}),o!==void 0&&a!==void 0&&Pe(e,{description:"evaluation",endTimestamp:a,op:"script",startTimestamp:o}),this._performanceCursor=Math.max(performance.getEntries().length-1,0),this._trackNavigator(e),e.op==="pageload"){var f=A.msToSec(P.browserPerformanceTimeOrigin);typeof u=="number"&&(P.logger.log("[Measurements] Adding TTFB"),this._measurements.ttfb={value:(u-e.startTimestamp)*1e3},typeof c=="number"&&c<=u&&(this._measurements["ttfb.requestTime"]={value:(u-c)*1e3})),["fcp","fp","lcp"].forEach(function(l){if(!(!r._measurements[l]||f>=e.startTimestamp)){var d=r._measurements[l].value,h=f+A.msToSec(d),_=Math.abs((h-e.startTimestamp)*1e3),v=_-d;P.logger.log("[Measurements] Normalized "+l+" from "+d+" to "+_+" ("+v+")"),r._measurements[l].value=_}}),this._measurements["mark.fid"]&&this._measurements.fid&&Pe(e,{description:"first input delay",endTimestamp:this._measurements["mark.fid"].value+A.msToSec(this._measurements.fid.value),op:"web.vitals",startTimestamp:this._measurements["mark.fid"].value}),"fcp"in this._measurements||delete this._measurements.cls,e.setMeasurements(this._measurements),this._tagMetricInfo(e),e.setTag("sentry_reportAllChanges",this._reportAllChanges)}}},t.prototype._tagMetricInfo=function(e){this._lcpEntry&&(P.logger.log("[Measurements] Adding LCP Data"),this._lcpEntry.element&&e.setTag("lcp.element",P.htmlTreeAsString(this._lcpEntry.element)),this._lcpEntry.id&&e.setTag("lcp.id",this._lcpEntry.id),this._lcpEntry.url&&e.setTag("lcp.url",this._lcpEntry.url.trim().slice(0,200)),e.setTag("lcp.size",this._lcpEntry.size)),this._clsEntry&&this._clsEntry.sources&&(P.logger.log("[Measurements] Adding CLS Data"),this._clsEntry.sources.forEach(function(r,n){return e.setTag("cls.source."+(n+1),P.htmlTreeAsString(r.node))}))},t.prototype._trackCLS=function(){var e=this;D_.getCLS(function(r){var n=r.entries.pop();!n||(P.logger.log("[Measurements] Adding CLS"),e._measurements.cls={value:r.value},e._clsEntry=n)})},t.prototype._trackNavigator=function(e){var r=G.navigator;if(!!r){var n=r.connection;n&&(n.effectiveType&&e.setTag("effectiveConnectionType",n.effectiveType),n.type&&e.setTag("connectionType",n.type),Kr(n.rtt)&&(this._measurements["connection.rtt"]={value:n.rtt}),Kr(n.downlink)&&(this._measurements["connection.downlink"]={value:n.downlink})),Kr(r.deviceMemory)&&e.setTag("deviceMemory",String(r.deviceMemory)),Kr(r.hardwareConcurrency)&&e.setTag("hardwareConcurrency",String(r.hardwareConcurrency))}},t.prototype._trackLCP=function(){var e=this;U_.getLCP(function(r){var n=r.entries.pop();if(!!n){var i=A.msToSec(P.browserPerformanceTimeOrigin),s=A.msToSec(n.startTime);P.logger.log("[Measurements] Adding LCP"),e._measurements.lcp={value:r.value},e._measurements["mark.lcp"]={value:i+s},e._lcpEntry=n}},this._reportAllChanges)},t.prototype._trackFID=function(){var e=this;H_.getFID(function(r){var n=r.entries.pop();if(!!n){var i=A.msToSec(P.browserPerformanceTimeOrigin),s=A.msToSec(n.startTime);P.logger.log("[Measurements] Adding FID"),e._measurements.fid={value:r.value},e._measurements["mark.fid"]={value:i+s}}})},t}();Ft.MetricsInstrumentation=B_;function G_(t,e,r){ke({transaction:t,entry:e,event:"unloadEvent",timeOrigin:r}),ke({transaction:t,entry:e,event:"redirect",timeOrigin:r}),ke({transaction:t,entry:e,event:"domContentLoadedEvent",timeOrigin:r}),ke({transaction:t,entry:e,event:"loadEvent",timeOrigin:r}),ke({transaction:t,entry:e,event:"connect",timeOrigin:r}),ke({transaction:t,entry:e,event:"secureConnection",timeOrigin:r,eventEnd:"connectEnd",description:"TLS/SSL"}),ke({transaction:t,entry:e,event:"fetch",timeOrigin:r,eventEnd:"domainLookupStart",description:"cache"}),ke({transaction:t,entry:e,event:"domainLookup",timeOrigin:r,description:"DNS"}),W_(t,e,r)}function z_(t,e,r,n,i){var s=i+r,o=s+n;return Pe(t,{description:e.name,endTimestamp:o,op:e.entryType,startTimestamp:s}),s}function Zu(t,e,r,n,i,s){if(!(e.initiatorType==="xmlhttprequest"||e.initiatorType==="fetch")){var o={};"transferSize"in e&&(o["Transfer Size"]=e.transferSize),"encodedBodySize"in e&&(o["Encoded Body Size"]=e.encodedBodySize),"decodedBodySize"in e&&(o["Decoded Body Size"]=e.decodedBodySize);var a=s+n,u=a+i;return Pe(t,{description:r,endTimestamp:u,op:e.initiatorType?"resource."+e.initiatorType:"resource",startTimestamp:a,data:o}),u}}Ft.addResourceSpans=Zu;function ke(t){var e=t.transaction,r=t.entry,n=t.event,i=t.timeOrigin,s=t.eventEnd,o=t.description,a=s?r[s]:r[n+"End"],u=r[n+"Start"];!u||!a||Pe(e,{op:"browser",description:o??n,startTimestamp:i+A.msToSec(u),endTimestamp:i+A.msToSec(a)})}function W_(t,e,r){Pe(t,{op:"browser",description:"request",startTimestamp:r+A.msToSec(e.requestStart),endTimestamp:r+A.msToSec(e.responseEnd)}),Pe(t,{op:"browser",description:"response",startTimestamp:r+A.msToSec(e.responseStart),endTimestamp:r+A.msToSec(e.responseEnd)})}function Pe(t,e){var r=e.startTimestamp,n=Xu.__rest(e,["startTimestamp"]);return r&&t.startTimestamp>r&&(t.startTimestamp=r),t.startChild(Xu.__assign({startTimestamp:r},n))}Ft._startChild=Pe;function Kr(t){return typeof t=="number"&&isFinite(t)}});var vs=p(me=>{Object.defineProperty(me,"__esModule",{value:!0});var ge=S(),Dt=m(),Y_=Ie(),$r=Re();me.DEFAULT_TRACING_ORIGINS=["localhost",/^\//];me.defaultRequestInstrumentationOptions={traceFetch:!0,traceXHR:!0,tracingOrigins:me.DEFAULT_TRACING_ORIGINS};function V_(t){var e=ge.__assign(ge.__assign({},me.defaultRequestInstrumentationOptions),t),r=e.traceFetch,n=e.traceXHR,i=e.tracingOrigins,s=e.shouldCreateSpanForRequest,o={},a=function(f){if(o[f])return o[f];var l=i;return o[f]=l.some(function(d){return Dt.isMatchingPattern(f,d)})&&!Dt.isMatchingPattern(f,"sentry_key"),o[f]},u=a;typeof s=="function"&&(u=function(f){return a(f)&&s(f)});var c={};r&&Dt.addInstrumentationHandler({callback:function(f){ec(f,u,c)},type:"fetch"}),n&&Dt.addInstrumentationHandler({callback:function(f){tc(f,u,c)},type:"xhr"})}me.instrumentOutgoingRequests=V_;function ec(t,e,r){if(!(!$r.hasTracingEnabled()||!(t.fetchData&&e(t.fetchData.url)))){if(t.endTimestamp&&t.fetchData.__span){var n=r[t.fetchData.__span];n&&(t.response?n.setHttpStatus(t.response.status):t.error&&n.setStatus(Y_.SpanStatus.InternalError),n.finish(),delete r[t.fetchData.__span]);return}var i=$r.getActiveTransaction();if(i){var n=i.startChild({data:ge.__assign(ge.__assign({},t.fetchData),{type:"fetch"}),description:t.fetchData.method+" "+t.fetchData.url,op:"http.client"});t.fetchData.__span=n.spanId,r[n.spanId]=n;var s=t.args[0]=t.args[0],o=t.args[1]=t.args[1]||{},a=o.headers;Dt.isInstanceOf(s,Request)&&(a=s.headers),a?typeof a.append=="function"?a.append("sentry-trace",n.toTraceparent()):Array.isArray(a)?a=ge.__spread(a,[["sentry-trace",n.toTraceparent()]]):a=ge.__assign(ge.__assign({},a),{"sentry-trace":n.toTraceparent()}):a={"sentry-trace":n.toTraceparent()},o.headers=a}}}me.fetchCallback=ec;function tc(t,e,r){var n,i;if(!(!$r.hasTracingEnabled()||((n=t.xhr)===null||n===void 0?void 0:n.__sentry_own_request__)||!(((i=t.xhr)===null||i===void 0?void 0:i.__sentry_xhr__)&&e(t.xhr.__sentry_xhr__.url)))){var s=t.xhr.__sentry_xhr__;if(t.endTimestamp&&t.xhr.__sentry_xhr_span_id__){var o=r[t.xhr.__sentry_xhr_span_id__];o&&(o.setHttpStatus(s.status_code),o.finish(),delete r[t.xhr.__sentry_xhr_span_id__]);return}var a=$r.getActiveTransaction();if(a){var o=a.startChild({data:ge.__assign(ge.__assign({},s.data),{type:"xhr",method:s.method,url:s.url}),description:s.method+" "+s.url,op:"http.client"});if(t.xhr.__sentry_xhr_span_id__=o.spanId,r[t.xhr.__sentry_xhr_span_id__]=o,t.xhr.setRequestHeader)try{t.xhr.setRequestHeader("sentry-trace",o.toTraceparent())}catch{}}}}me.xhrCallback=tc});var rc=p(gs=>{Object.defineProperty(gs,"__esModule",{value:!0});var Jr=m(),Ht=Jr.getGlobalObject();function K_(t,e,r){if(e===void 0&&(e=!0),r===void 0&&(r=!0),!Ht||!Ht.location){Jr.logger.warn("Could not initialize routing instrumentation due to invalid location");return}var n=Ht.location.href,i;e&&(i=t({name:Ht.location.pathname,op:"pageload"})),r&&Jr.addInstrumentationHandler({callback:function(s){var o=s.to,a=s.from;if(a===void 0&&n&&n.indexOf(o)!==-1){n=void 0;return}a!==o&&(n=void 0,i&&(Jr.logger.log("[Tracing] Finishing current transaction with op: "+i.op),i.finish()),i=t({name:Ht.location.pathname,op:"navigation"}))},type:"history"})}gs.instrumentRoutingWithDefaults=K_});var oc=p(ze=>{Object.defineProperty(ze,"__esModule",{value:!0});var ye=S(),Ge=m(),$_=Ur(),J_=Dr(),X_=Ie(),nc=Re(),Z_=Wu(),Q_=Qu(),Xr=vs(),ev=rc();ze.DEFAULT_MAX_TRANSACTION_DURATION_SECONDS=600;var tv=ye.__assign({idleTimeout:J_.DEFAULT_IDLE_TIMEOUT,markBackgroundTransactions:!0,maxTransactionDuration:ze.DEFAULT_MAX_TRANSACTION_DURATION_SECONDS,routingInstrumentation:ev.instrumentRoutingWithDefaults,startTransactionOnLocationChange:!0,startTransactionOnPageLoad:!0},Xr.defaultRequestInstrumentationOptions),rv=function(){function t(e){this.name=t.id,this._emitOptionsWarning=!1,this._configuredIdleTimeout=void 0;var r=Xr.defaultRequestInstrumentationOptions.tracingOrigins;e&&(this._configuredIdleTimeout=e.idleTimeout,e.tracingOrigins&&Array.isArray(e.tracingOrigins)&&e.tracingOrigins.length!==0?r=e.tracingOrigins:this._emitOptionsWarning=!0),this.options=ye.__assign(ye.__assign(ye.__assign({},tv),e),{tracingOrigins:r});var n=this.options._metricOptions;this._metrics=new Q_.MetricsInstrumentation(n&&n._reportAllChanges)}return t.prototype.setupOnce=function(e,r){var n=this;this._getCurrentHub=r,this._emitOptionsWarning&&(Ge.logger.warn("[Tracing] You need to define `tracingOrigins` in the options. Set an array of urls or patterns to trace."),Ge.logger.warn("[Tracing] We added a reasonable default for you: "+Xr.defaultRequestInstrumentationOptions.tracingOrigins));var i=this.options,s=i.routingInstrumentation,o=i.startTransactionOnLocationChange,a=i.startTransactionOnPageLoad,u=i.markBackgroundTransactions,c=i.traceFetch,f=i.traceXHR,l=i.tracingOrigins,d=i.shouldCreateSpanForRequest;s(function(h){return n._createRouteTransaction(h)},a,o),u&&Z_.registerBackgroundTabDetection(),Xr.instrumentOutgoingRequests({traceFetch:c,traceXHR:f,tracingOrigins:l,shouldCreateSpanForRequest:d})},t.prototype._createRouteTransaction=function(e){var r=this;if(!this._getCurrentHub){Ge.logger.warn("[Tracing] Did not create "+e.op+" transaction because _getCurrentHub is invalid.");return}var n=this.options,i=n.beforeNavigate,s=n.idleTimeout,o=n.maxTransactionDuration,a=e.op==="pageload"?ic():void 0,u=ye.__assign(ye.__assign(ye.__assign({},e),a),{trimEnd:!0}),c=typeof i=="function"?i(u):u,f=c===void 0?ye.__assign(ye.__assign({},u),{sampled:!1}):c;f.sampled===!1&&Ge.logger.log("[Tracing] Will not send "+f.op+" transaction because of beforeNavigate."),Ge.logger.log("[Tracing] Starting "+f.op+" transaction on scope");var l=this._getCurrentHub(),d=Ge.getGlobalObject().location,h=$_.startIdleTransaction(l,f,s,!0,{location:d});return h.registerBeforeFinishCallback(function(_,v){r._metrics.addPerformanceEntries(_),nv(nc.secToMs(o),_,v)}),h.setTag("idleTimeout",this._configuredIdleTimeout),h},t.id="BrowserTracing",t}();ze.BrowserTracing=rv;function ic(){var t=sc("sentry-trace");if(t)return nc.extractTraceparentData(t)}ze.getHeaderContext=ic;function sc(t){var e=Ge.getGlobalObject().document.querySelector("meta[name="+t+"]");return e?e.getAttribute("content"):null}ze.getMetaContent=sc;function nv(t,e,r){var n=r-e.startTimestamp,i=r&&(n>t||n<0);i&&(e.setStatus(X_.SpanStatus.DeadlineExceeded),e.setTag("maxTransactionDurationExceeded","true"))}});var Zr=p(Ut=>{Object.defineProperty(Ut,"__esModule",{value:!0});var iv=oc();Ut.BrowserTracing=iv.BrowserTracing;var ac=vs();Ut.instrumentOutgoingRequests=ac.instrumentOutgoingRequests;Ut.defaultRequestInstrumentationOptions=ac.defaultRequestInstrumentationOptions});var uc=p(We=>{Object.defineProperty(We,"__esModule",{value:!0});var sv=Hu();We.Express=sv.Express;var ov=Uu();We.Postgres=ov.Postgres;var av=Lu();We.Mysql=av.Mysql;var uv=Bu();We.Mongo=uv.Mongo;var cv=Zr();We.BrowserTracing=cv.BrowserTracing});var fc=p(F=>{Object.defineProperty(F,"__esModule",{value:!0});var cc=Ur();F.addExtensionMethods=cc.addExtensionMethods;var lv=uc();F.Integrations=lv;var fv=Zr();F.BrowserTracing=fv.BrowserTracing;var dv=Nr();F.Span=dv.Span;var pv=jr();F.Transaction=pv.Transaction;var lc=Zr();F.registerRequestInstrumentation=lc.instrumentOutgoingRequests;F.defaultRequestInstrumentationOptions=lc.defaultRequestInstrumentationOptions;var hv=Ie();F.SpanStatus=hv.SpanStatus;var _v=Dr();F.IdleTransaction=_v.IdleTransaction;var vv=Ur();F.startIdleTransaction=vv.startIdleTransaction;cc.addExtensionMethods();var Lt=Re();F.extractTraceparentData=Lt.extractTraceparentData;F.getActiveTransaction=Lt.getActiveTransaction;F.hasTracingEnabled=Lt.hasTracingEnabled;F.stripUrlQueryAndFragment=Lt.stripUrlQueryAndFragment;F.TRACEPARENT_REGEXP=Lt.TRACEPARENT_REGEXP});var dc=p(ms=>{"use strict";ms.parse=bv;ms.serialize=Sv;var gv=decodeURIComponent,mv=encodeURIComponent,yv=/; */,Qr=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function bv(t,e){if(typeof t!="string")throw new TypeError("argument str must be a string");for(var r={},n=e||{},i=t.split(yv),s=n.decode||gv,o=0;o<i.length;o++){var a=i[o],u=a.indexOf("=");if(!(u<0)){var c=a.substr(0,u).trim(),f=a.substr(++u,a.length).trim();f[0]=='"'&&(f=f.slice(1,-1)),r[c]==null&&(r[c]=Ev(f,s))}}return r}function Sv(t,e,r){var n=r||{},i=n.encode||mv;if(typeof i!="function")throw new TypeError("option encode is invalid");if(!Qr.test(t))throw new TypeError("argument name is invalid");var s=i(e);if(s&&!Qr.test(s))throw new TypeError("argument val is invalid");var o=t+"="+s;if(n.maxAge!=null){var a=n.maxAge-0;if(isNaN(a)||!isFinite(a))throw new TypeError("option maxAge is invalid");o+="; Max-Age="+Math.floor(a)}if(n.domain){if(!Qr.test(n.domain))throw new TypeError("option domain is invalid");o+="; Domain="+n.domain}if(n.path){if(!Qr.test(n.path))throw new TypeError("option path is invalid");o+="; Path="+n.path}if(n.expires){if(typeof n.expires.toUTCString!="function")throw new TypeError("option expires is invalid");o+="; Expires="+n.expires.toUTCString()}if(n.httpOnly&&(o+="; HttpOnly"),n.secure&&(o+="; Secure"),n.sameSite){var u=typeof n.sameSite=="string"?n.sameSite.toLowerCase():n.sameSite;switch(u){case!0:o+="; SameSite=Strict";break;case"lax":o+="; SameSite=Lax";break;case"strict":o+="; SameSite=Strict";break;case"none":o+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}}return o}function Ev(t,e){try{return e(t)}catch{return t}}});var _c=p(Ve=>{Object.defineProperty(Ve,"__esModule",{value:!0});var le=S(),Ye=N(),Tv=fc(),pc=D(),ht=m(),Ov=dc(),wv=require("domain"),xv=require("os"),Cv=require("url"),Bt=Bi();function Iv(){return function(e,r,n){var i;e.headers&&ht.isString(e.headers["sentry-trace"])&&(i=Tv.extractTraceparentData(e.headers["sentry-trace"]));var s=Ye.startTransaction(le.__assign({name:en(e,{path:!0,method:!0}),op:"http.server"},i),{request:tn(e)});Ye.getCurrentHub().configureScope(function(o){o.setSpan(s)}),r.__sentry_transaction=s,r.once("finish",function(){setImmediate(function(){Rv(s,e),s.setHttpStatus(r.statusCode),s.finish()})}),n()}}Ve.tracingHandler=Iv;function Rv(t,e){!t||(t.name=en(e,{path:!0,method:!0}),t.setData("url",e.originalUrl),t.setData("baseUrl",e.baseUrl),t.setData("query",e.query))}function en(t,e){e===void 0&&(e={});var r,n=(r=t.method)===null||r===void 0?void 0:r.toUpperCase(),i="";t.route?i=""+(t.baseUrl||"")+t.route.path:(t.originalUrl||t.url)&&(i=ht.stripUrlQueryAndFragment(t.originalUrl||t.url||""));var s="";return e.method&&n&&(s+=n),e.method&&e.path&&(s+=" "),e.path&&i&&(s+=i),s}function qv(t,e){var r;switch(e){case"path":return en(t,{path:!0});case"handler":return((r=t.route)===null||r===void 0?void 0:r.stack[0].name)||"<anonymous>";case"methodPath":default:return en(t,{path:!0,method:!0})}}var kv=["id","username","email"];function Pv(t,e){var r={},n=Array.isArray(e)?e:kv;return n.forEach(function(i){t&&i in t&&(r[i]=t[i])}),r}var Mv=["cookies","data","headers","method","query_string","url"];function tn(t,e){e===void 0&&(e=Mv);var r={},n=t.headers||t.header||{},i=t.method,s=t.hostname||t.host||n.host||"<no host>",o=t.protocol==="https"||t.secure||(t.socket||{}).encrypted?"https":"http",a=t.originalUrl||t.url||"",u=o+"://"+s+a;return e.forEach(function(c){switch(c){case"headers":r.headers=n;break;case"method":r.method=i;break;case"url":r.url=u;break;case"cookies":r.cookies=t.cookies||Ov.parse(n.cookie||"");break;case"query_string":r.query_string=t.query||Cv.parse(a||"",!1).query;break;case"data":if(i==="GET"||i==="HEAD")break;t.body!==void 0&&(r.data=ht.isString(t.body)?t.body:JSON.stringify(ht.normalize(t.body)));break;default:({}).hasOwnProperty.call(t,c)&&(r[c]=t[c])}}),r}Ve.extractRequestData=tn;function hc(t,e,r){if(r=le.__assign({ip:!1,request:!0,serverName:!0,transaction:!0,user:!0,version:!0},r),r.version&&(t.contexts=le.__assign(le.__assign({},t.contexts),{runtime:{name:"node",version:global.process.version}})),r.request){var n=Array.isArray(r.request)?tn(e,r.request):tn(e);t.request=le.__assign(le.__assign({},t.request),n)}if(r.serverName&&!t.server_name&&(t.server_name=global.process.env.SENTRY_NAME||xv.hostname()),r.user){var i=e.user&&ht.isPlainObject(e.user)?Pv(e.user,r.user):{};Object.keys(i)&&(t.user=le.__assign(le.__assign({},t.user),i))}if(r.ip){var s=e.ip||e.connection&&e.connection.remoteAddress;s&&(t.user=le.__assign(le.__assign({},t.user),{ip_address:s}))}return r.transaction&&!t.transaction&&(t.transaction=qv(e,r.transaction)),t}Ve.parseRequest=hc;function Av(t){var e=Ye.getCurrentHub(),r=e.getClient();if(r&&Bt.isAutoSessionTrackingEnabled(r)){r.initSessionFlusher();var n=e.getScope();n&&n.getSession()&&n.setSession()}return function(s,o,a){if(t&&t.flushTimeout&&t.flushTimeout>0){var u=o.end;o.end=function(f,l,d){var h=this;Bt.flush(t.flushTimeout).then(function(){u.call(h,f,l,d)}).then(null,function(_){ht.logger.error(_)})}}var c=wv.create();c.add(s),c.add(o),c.on("error",a),c.run(function(){var f=Ye.getCurrentHub();f.configureScope(function(l){l.addEventProcessor(function(_){return hc(_,s,t)});var d=f.getClient();if(Bt.isAutoSessionTrackingEnabled(d)){var h=f.getScope();h&&h.setRequestSession({status:pc.RequestSessionStatus.Ok})}}),o.once("finish",function(){var l=f.getClient();Bt.isAutoSessionTrackingEnabled(l)&&setImmediate(function(){l&&l._captureRequestSession&&l._captureRequestSession()})}),a()})}}Ve.requestHandler=Av;function Nv(t){var e=t.status||t.statusCode||t.status_code||t.output&&t.output.statusCode;return e?parseInt(e,10):500}function jv(t){var e=Nv(t);return e>=500}function Fv(t){return function(r,n,i,s){var o=t&&t.shouldHandleError||jv;if(o(r)){Ye.withScope(function(a){var u=i.__sentry_transaction;u&&a.getSpan()===void 0&&a.setSpan(u);var c=Ye.getCurrentHub().getClient();if(c&&Bt.isAutoSessionTrackingEnabled(c)){var f=c._sessionFlusher!==void 0;if(f){var l=a.getRequestSession();l&&l.status!==void 0&&(l.status=pc.RequestSessionStatus.Crashed)}}var d=Ye.captureException(r);i.sentry=d,s(r)});return}s(r)}}Ve.errorHandler=Fv});var mc=p(E=>{Object.defineProperty(E,"__esModule",{value:!0});var vc=S(),gc=D();E.Severity=gc.Severity;E.Status=gc.Status;var q=N();E.addGlobalEventProcessor=q.addGlobalEventProcessor;E.addBreadcrumb=q.addBreadcrumb;E.captureException=q.captureException;E.captureEvent=q.captureEvent;E.captureMessage=q.captureMessage;E.configureScope=q.configureScope;E.getHubFromCarrier=q.getHubFromCarrier;E.getCurrentHub=q.getCurrentHub;E.Hub=q.Hub;E.makeMain=q.makeMain;E.Scope=q.Scope;E.startTransaction=q.startTransaction;E.SDK_VERSION=q.SDK_VERSION;E.setContext=q.setContext;E.setExtra=q.setExtra;E.setExtras=q.setExtras;E.setTag=q.setTag;E.setTags=q.setTags;E.setUser=q.setUser;E.withScope=q.withScope;var Dv=Ti();E.NodeBackend=Dv.NodeBackend;var Hv=xi();E.NodeClient=Hv.NodeClient;var _t=Bi();E.defaultIntegrations=_t.defaultIntegrations;E.init=_t.init;E.lastEventId=_t.lastEventId;E.flush=_t.flush;E.close=_t.close;E.getSentryRelease=_t.getSentryRelease;var Uv=Ou();E.deepReadDirSync=Uv.deepReadDirSync;var Lv=si();E.SDK_NAME=Lv.SDK_NAME;var Bv=N(),Gv=V(),zv=require("domain"),Wv=_c();E.Handlers=Wv;var Yv=Ui(),Vv=Si();E.Transports=Vv;var Kv=vc.__assign(vc.__assign({},Bv.Integrations),Yv);E.Integrations=Kv;var Gt=Gv.getMainCarrier();Gt.__SENTRY__&&(Gt.__SENTRY__.extensions=Gt.__SENTRY__.extensions||{},Gt.__SENTRY__.extensions.domain=Gt.__SENTRY__.extensions.domain||zv)});var ys=Ss(Cs());function Is(t){if(t.length==2)return t.toUpperCase().replace(/./g,e=>String.fromCodePoint(127397+e.charCodeAt(0)))}var vt=Ss(mc());vt.init({dsn:"https://aec0873e750c49b082fe3594def15af1@o1116132.ingest.sentry.io/6149280",tracesSampleRate:1});ys.default.version("0.1.0").name("country-flag-cli").command("get <flag>").action(t=>{let e=vt.startTransaction({op:"get flag from 2 alpha code",name:"GET flag from 2 alpha code"});try{let r=Is(t);if(r===void 0)throw new Error(`Flag: ${t}
32
+ Result: ${r}
33
+ `);console.log(r)}catch(r){vt.captureException(r)}finally{e.finish()}});ys.default.parse(process.argv);
32
34
  /*!
33
35
  * cookie
34
36
  * Copyright(c) 2012-2014 Roman Shtylman