(self.webpackChunkgfn_mall=self.webpackChunkgfn_mall||[]).push([[502],{50961:function(vt,I,f){"use strict";var r=this&&this.__createBinding||(Object.create?function(q,J,W,ee){void 0===ee&&(ee=W);var X=Object.getOwnPropertyDescriptor(J,W);(!X||("get"in X?!J.__esModule:X.writable||X.configurable))&&(X={enumerable:!0,get:function(){return J[W]}}),Object.defineProperty(q,ee,X)}:function(q,J,W,ee){void 0===ee&&(ee=W),q[ee]=J[W]}),s=this&&this.__exportStar||function(q,J){for(var W in q)"default"!==W&&!Object.prototype.hasOwnProperty.call(J,W)&&r(J,q,W)};Object.defineProperty(I,"__esModule",{value:!0}),I.ClientModeSelection=I.LogLevel=I.VsyncType=I.SelectKind=I.NetworkType=I.Profile=void 0;const v=f(20701);var q;s(f(20701),I),(q=I.Profile||(I.Profile={}))[q.CUSTOM=0]="CUSTOM",q[q.BALANCED=1]="BALANCED",q[q.COMPETITIVE=2]="COMPETITIVE",q[q.DATA_SAVER=3]="DATA_SAVER",function(q){q[q.OTHER=0]="OTHER",q[q.ETHERNET=1]="ETHERNET",q[q.WIFI2_4=2]="WIFI2_4",q[q.WIFI5_0=3]="WIFI5_0"}(I.NetworkType||(I.NetworkType={})),function(q){q[q.STREAM=0]="STREAM",q[q.DISPLAY=1]="DISPLAY"}(I.SelectKind||(I.SelectKind={})),function(q){q[q.OFF=0]="OFF",q[q.ON=1]="ON",q[q.ADAPTIVE=2]="ADAPTIVE"}(I.VsyncType||(I.VsyncType={})),function(q){q.DEBUG="d",q.INFO="i",q.WARNING="w"}(I.LogLevel||(I.LogLevel={}));const b=1;function i(q,J,W){return{width:q,height:J,fps:W}}function h(q,J,W){return W.map(ee=>i(q,J,ee))}function A(q){return q.width*q.height}function B(q,J){const W={...J};if(!q.scaleFactor)return W;const ae=Math.min(q.width/J.width,q.height/J.height);return W.scaleFactor=Math.max(100,Math.round(q.scaleFactor/ae)),W}function re(q){return void 0!==q&&!!q.width&&!!q.height&&!!q.fps}function z(q,J){var W;return!!J.features.hdr&&!(null===(W=q.desiredFeatures)||void 0===W||!W.hdr)}function U(q){var J,W;if(null!==(J=q.features.vsyncTypes)&&void 0!==J&&J.length)return q.features.vsyncTypes;switch(null!==(W=q.features.vsync)&&void 0!==W?W:0){case 0:return[1];case 1:return[0,1];case 2:return[0,1,2];default:return[b]}}function Z(q,J,W,ee){var X,ae;const de=function H(q,J){var W,ee,X;const ae=U(J);return null!==(X=function O(q){switch(q){case 0:return[0,2,1];case 1:return[1,2,0];case 2:return[2,1,0];default:return[b]}}(null!==(ee=null===(W=q.desiredFeatures)||void 0===W?void 0:W.vsync)&&void 0!==ee?ee:b).find(Pe=>ae.includes(Pe)))&&void 0!==X?X:b}(q,J),Pe=function F(q,J){var W,ee;const X=J.features.audioChannelCount||2,ae=null!==(ee=null===(W=q.desiredFeatures)||void 0===W?void 0:W.audioChannelCount)&&void 0!==ee?ee:X;return Math.min(X,ae)}(q,J),ye=function k(q,J){var W,ee;const X=J.features.sdrBitDepth||J.features.bitDepth||8,ae=null!==(ee=null===(W=q.desiredFeatures)||void 0===W?void 0:W.bitDepth)&&void 0!==ee?ee:X;return Math.min(X,ae)}(q,J),Le=function $(q,J,W){var ee;return!!J.features.cloudGsync&&W.fps>=(J.features.minimumFpsForCloudGsync||0)&&!(null===(ee=q.desiredFeatures)||void 0===ee||!ee.cloudGsync)}(q,J,W),Xe=function ne(q,J,W){var ee,X,ae;const de=!(null!==(X=null===(ee=q.desiredFeatures)||void 0===ee?void 0:ee.hdr10PlusGaming)&&void 0!==X&&!X);return W&&!(null===(ae=J.features.hdr10PlusGamingData)||void 0===ae||!ae.version)&&de}(q,J,ee),ie=function te(q,J,W,ee){var X;return(ee||W.fps>=(J.features.minimumFpsForReflexWithoutVrr||240))&&!!J.features.reflex&&!(null===(X=q.desiredFeatures)||void 0===X||!X.reflex)}(q,J,W,Le);return{vsync:de,vvsync:!!J.features.vvsync&&!(null===(X=q.desiredFeatures)||void 0===X||!X.vvsync),hdr:ee,reflex:ie,audioChannelCount:Pe,bitDepth:ye,cloudGsync:Le,l4s:!!J.features.l4s&&!(null===(ae=q.desiredFeatures)||void 0===ae||!ae.l4s),hdr10PlusGaming:Xe}}function se(q){return q.map(fe).join(", ")}function fe(q){return`${q.width}x${q.height}@${q.fps}`}function Se(q){switch(q){case v.ClientStreamingQualityMode.BALANCED:return 1;case v.ClientStreamingQualityMode.COMPETITIVE:return 2;case v.ClientStreamingQualityMode.DATA_SAVER:return 3;default:return}}function pe(q){return i(q.widthInPixels,q.heightInPixels,q.framesPerSecond)}function we(q){switch(q){case"STEREO":default:return 2;case"UP_TO_5_1_SURROUND_PCM":return 6;case"UP_TO_7_1_SURROUND_PCM":return 8}}I.ClientModeSelection=class c{constructor(J){if(this.config={},J.length){const{params:W}=JSON.parse(J);if(W)for(const ee of W.filter(X=>"clientModeSelection"===X.name))this.config=Object.assign(this.config,ee.value)}}selectModeWithProfile(J,W,ee,X){if(ee=this.fillDefaults(ee),0===X){const de=z(ee,W);return{selectedVideoMode:B(W.displayMode,J),selectedEncodeMode:this.selectEncodeMode(W,J),selectedFeatures:Z(ee,W,J,de)}}let ae;return ae=2!==X?[{field:"aspect",dir:"asc"},{field:ee.preferFpsOverResolution?"fps":"pixel-count",dir:"asc"},{field:ee.preferFpsOverResolution?"pixel-count":"fps",dir:"asc"}]:[{field:"fps-abs",dir:"desc"},{field:"aspect",dir:"asc"},{field:"pixel-count",dir:"asc"}],this.selectModeWithPriorityImpl(J,W,ee,ae,X)}selectModeWithPriority(J,W,ee,X){return ee=this.fillDefaults(ee),this.selectModeWithPriorityImpl(J,W,ee,X)}filterModes(J,W,ee){const X=[];for(const ae of J)for(const de of W)if(null==ee||ee){if(A(ae)<=A(de)&&ae.fps<=de.fps){X.push(ae);break}}else if(ae.width<=de.width&&ae.height<=de.height&&ae.fps<=de.fps){X.push(ae);break}return X}sortModes(J,W,ee,X){var ae;const de=A(W),Pe=W.width/W.height,ye=null!==(ae=null!=X?X:this.config.aspectRatioDiffThreshold)&&void 0!==ae?ae:.05;return J.map(Xe=>Xe).sort((Xe,ie)=>{for(const K of ee)switch(K.field){case"aspect":{const ce=Math.abs(Xe.width/Xe.height-Pe)-Math.abs(ie.width/ie.height-Pe);if(Math.abs(ce)>ye)return"asc"===K.dir?ce:-ce;break}case"fps-abs":{const ce=Xe.fps-ie.fps;if(0!==ce)return"asc"===K.dir?ce:-ce;break}case"fps":{const ce=Math.abs(Xe.fps-W.fps)-Math.abs(ie.fps-W.fps);if(0!==ce)return"asc"===K.dir?ce:-ce;break}case"pixel-count-abs":{const ce=A(Xe)-A(ie);if(0!==ce)return"asc"===K.dir?ce:-ce;break}case"pixel-count":{const ce=Math.abs(A(Xe)-de)-Math.abs(A(ie)-de);if(0!==ce)return"asc"===K.dir?ce:-ce;break}}return 0})}parseSubscription(J,W){var ee,X,ae;const de=J.resolutions.filter(Le=>Le.isEntitled).map(pe),Pe={bitDepth:8,audioChannelCount:2};for(const Le of J.features)switch(Le.key){case v.SubscriptionFeatureMetadataKey.HDR_ENABLED:Pe.hdr="true"===Le.textValue;break;case v.SubscriptionFeatureMetadataKey.SUPPORTED_AUDIO_FORMATS:Pe.audioChannelCount=we(Le.textValue);break;case v.SubscriptionFeatureMetadataKey.ENABLED_REFLEX:Pe.reflex="true"===Le.textValue;break;case v.SubscriptionFeatureMetadataKey.BIT_DEPTH:break;case v.SubscriptionFeatureMetadataKey.CLOUD_GSYNC:Pe.cloudGsync="true"===Le.textValue;break;case v.SubscriptionFeatureMetadataKey.ENABLED_L4S:Pe.l4s="true"===Le.textValue}const ye=new Map;for(const Le of W){const Xe=Se(Le.clientStreamingQualityMode);if(void 0===Xe)continue;let ie=pe(Le.resolution);(3===Xe||2===Xe)&&(null===(ee=this.config.fixDataSaverCompetitive1280)||void 0===ee||ee)&&1280===ie.width&&720===ie.height&&(this.log("i","Overriding competitive and data saver desired resolutions to 1280x800"),ie=i(1280,800,ie.fps));const K={...Pe};for(const ce of Le.features)switch(ce.key){case v.StreamingQualityModeFeatureMetadataKey.PROFILE_HDR:K.hdr="true"===ce.textValue;break;case v.StreamingQualityModeFeatureMetadataKey.PROFILE_REFLEX:K.reflex="true"===ce.textValue;break;case v.StreamingQualityModeFeatureMetadataKey.PROFILE_VSYNC:K.vsync=parseInt(null!==(X=ce.textValue)&&void 0!==X?X:"0",10);break;case v.StreamingQualityModeFeatureMetadataKey.PROFILE_CLOUD_GSYNC:K.cloudGsync="true"===ce.textValue;break;case v.StreamingQualityModeFeatureMetadataKey.PROFILE_L4S:K.l4s="true"===ce.textValue;break;case v.StreamingQualityModeFeatureMetadataKey.PROFILE_BIT_DEPTH:K.bitDepth=parseInt(null!==(ae=ce.textValue)&&void 0!==ae?ae:"8",10)}ye.set(Xe,{options:{supportedModes:de,desiredFeatures:K},desired:ie}),1===Xe&&ye.set(0,{options:{supportedModes:de,desiredFeatures:{...K}},desired:{...ie}})}return ye.has(0)||ye.set(0,{options:{supportedModes:de,desiredFeatures:Pe}}),ye}getDefaultModes(){return[h(3840,2160,[120,60,30]),h(3456,2160,[120,60,30]),h(3840,1600,[120,60,30]),h(3440,1440,[120,60,30]),h(3840,1080,[120,60,30]),h(2560,1600,[120,60,30]),h(2560,1440,[120,60,30]),h(2560,1080,[120,60,30]),h(1920,1200,[240,120,60,30]),h(1920,1080,[240,120,60,30]),h(1600,1200,[120,60,30]),h(1680,1050,[120,60,30]),h(1600,900,[120,60,30]),h(1280,1024,[120,60,30]),h(1440,900,[120,60,30]),h(1680,720,[120,60,30]),h(1366,768,[120,60,30]),h(1280,800,[120,60,30]),h(1112,834,[120,60,30]),h(1280,720,[120,60,30]),h(1376,640,[120,60,30]),h(1024,768,[120,60,30])].flat(1)}deserializeDeviceCapabilities(J){return JSON.parse(J)}serializeSelectResult(J){const{selectedVideoMode:W,selectedFeatures:ee}=J,X=[{widthInPixels:W.width,heightInPixels:W.height,framesPerSecond:W.fps,sdrHdrMode:ee.hdr?1:0}],de={bitDepth:ee.bitDepth<=8?0:1,cloudGsync:ee.cloudGsync,reflex:ee.reflex,enabledL4S:ee.l4s};let Pe;Pe=ee.audioChannelCount>=8?3:ee.audioChannelCount>=6?2:1;const ye={...J,clientRequestMonitorSettings:X,requestedStreamingFeatures:de,requestedAudioFormat:Pe};return JSON.stringify(ye)}isModeSupported(J,W){return J.maxSupportedModes?this.getUseMaxSupportedModesPixelCount()?J.maxSupportedModes.some(ee=>A(ee)>=A(W)&&ee.fps>=W.fps):J.maxSupportedModes.some(ee=>ee.width>=W.width&&ee.height>=W.height&&ee.fps>=W.fps):(this.log("w","isModeSupported: Max supported modes weren't provided, assuming mode isn't supported"),!1)}isResolutionSupported(J,W,ee){return this.isModeSupported(J,i(W,ee,1))}isFpsSupported(J,W){return this.isModeSupported(J,i(1,1,W))}getSupportedVsyncTypes(J){return U(J)}setLogCallback(J){this.logCallback=J}setTelemetryCallback(J){this.telemetryCallback=J}selectModeWithPriorityImpl(J,W,ee,X,ae){var de,Pe,ye,Le,Xe,ie;let K=ee.networkMaxMode;if(1===ae&&(null===(de=this.config.overrideBalanced240fps)||void 0===de||de)){const Oe=A(i(3440,1440,0));A(J)>=Oe&&J.fps>=120&&(J=i(J.width,J.height,240),this.log("i","Overrode desired fps to 240"),K&&120===K.fps&&(K=i(K.width,K.height,240),this.log("i","Overrode network max fps to 240")))}2!==ae&&(null===(Pe=this.config.useNetworkType)||void 0===Pe||Pe)&&(2===ee.networkType||3===ee.networkType)&&(J=i(J.width,J.height,Math.min(J.fps,60)),this.log("d","Limited mode to 60fps because of WIFI"));const ce=z(ee,W);let ge;if(null!==(ye=ee.supportedModes)&&void 0!==ye&&ye.length){this.log("d",`Selecting mode based on supported modes: ${se(ee.supportedModes)}`);let Oe=this.getTargetMode(W,ee);2===ae&&(Oe=function j(q,J,W,ee){let X=function P(q,J){const W=A(q),ee=A(J);return Math.sqrt(ee/W)}(q,J);return W&&(X=Math.max(W,X)),ee&&(X=Math.min(ee,X)),i(q.width*X,q.height*X,J.fps)}(Oe,J));let Ie=this.sortModes(ee.supportedModes,Oe,X,ee.aspectRatioDiffThreshold);const ht=(_t,Ae,lt)=>{const Ze=Ie;Ie=this.filterModes(Ze,Ae,lt);const yt=Ze.length-Ie.length;yt>0&&this.log("d",`Filtered out ${yt} modes because of ${_t} (${se(Ae)})`)},Fe=null===(Le=W.maxSupportedModes)||void 0===Le?void 0:Le.filter(_t=>void 0===_t.hdr||_t.hdr===ce);if(null!=Fe&&Fe.length&&ht("device max supported modes",Fe,this.getUseMaxSupportedModesPixelCount()),ht("desired mode",[J]),1===ae&&1!==ee.selectKind&&K&&(!(null!==(Xe=this.config.useNetworkMaxMode)&&void 0!==Xe)||Xe)&&ht("network max mode",[K]),(!ee.preferLargerResolutionIfCloser||re(W.maxAutoMode))&&ht("device target resolution",[i(Oe.width,Oe.height,1/0)]),ht("device target fps",[i(1/0,1/0,Oe.fps+(null!==(ie=ee.largerFpsThreshold)&&void 0!==ie?ie:1))]),Ie.length)ge=Ie[0];else{this.log("i","No modes fit the filtering criteria, falling back to the nearest supported mode");const _t=X.map(Ae=>{switch(Ae.field){case"aspect":return Ae;case"pixel-count":return{field:"pixel-count-abs",dir:"asc"};case"fps":return{field:"fps-abs",dir:"asc"};case"pixel-count-abs":case"fps-abs":return{field:Ae.field,dir:"asc"}}});Ie=this.sortModes(ee.supportedModes,Oe,_t),ge=Ie[0]}this.log("i",`Selected mode: ${fe(ge)}`)}else ge=J,this.log("i",`No supported modes provided, selected mode: ${fe(ge)}`);return ee.usePhysicalResolution&&(ge=B(W.displayMode,ge)),{selectedVideoMode:ge,selectedEncodeMode:this.selectEncodeMode(W,ge),selectedFeatures:Z(ee,W,ge,ce)}}selectEncodeMode(J,W){var ee;if(null===(ee=J.maxEncodeModes)||void 0===ee||!ee.length)return i(0,0,0);const X=[i(3440,1440,120),i(0,0,240)];for(const Pe of X)if(A(W)>=A(Pe)&&W.fps>=Pe.fps)return this.log("i",`Disabling encode because selected video mode is larger than ${fe(Pe)}`),i(0,0,0);const de=J.maxEncodeModes.map(Pe=>{const Xe=Math.max(W.width/Pe.width,W.height/Pe.height,1);return{width:Math.round(W.width/Xe),height:Math.round(W.height/Xe),fps:Math.min(W.fps,Pe.fps),scale:Xe}}).sort((Pe,ye)=>{const Le=ye.fps-Pe.fps;return 0!==Le?Le:Pe.scale-ye.scale})[0];return i(de.width,de.height,de.fps)}fillDefaults(J){var W,ee,X;return{preferFpsOverResolution:null!==(W=this.config.preferFpsOverResolution)&&void 0!==W&&W,preferLargerResolutionIfCloser:null===(ee=this.config.preferLargerResolutionIfCloser)||void 0===ee||ee,largerFpsThreshold:this.config.largerFpsThreshold,usePhysicalResolution:null!==(X=this.config.usePhysicalResolution)&&void 0!==X&&X,selectKind:0,...J}}getTargetMode(J,W){return re(J.maxAutoMode)?J.maxAutoMode:W.usePhysicalResolution?J.displayMode:function V(q){const J={...q};return q.scaleFactor&&100!==q.scaleFactor&&(J.width/=q.scaleFactor/100,J.height/=q.scaleFactor/100,J.scaleFactor=void 0),J}(J.displayMode)}getUseMaxSupportedModesPixelCount(){var J;return null===(J=this.config.useMaxSupportedModesPixelCount)||void 0===J||J}log(J,W){var ee;null===(ee=this.logCallback)||void 0===ee||ee.call(this,{level:J,tag:"mode-selection",message:W})}}},20701:(vt,I)=>{"use strict";var v;Object.defineProperty(I,"__esModule",{value:!0}),I.SubscriptionFeatureMetadataKey=I.StreamingQualityModeFeatureMetadataKey=I.ClientStreamingQualityMode=void 0,(v=I.ClientStreamingQualityMode||(I.ClientStreamingQualityMode={})).UNKNOWN="UNKNOWN",v.BALANCED="BALANCED",v.DATA_SAVER="DATA_SAVER",v.COMPETITIVE="COMPETITIVE",function(v){v.UNKNOWN="UNKNOWN",v.PROFILE_VSYNC="PROFILE_VSYNC",v.PROFILE_ADJUST_FOR_NETWORK="PROFILE_ADJUST_FOR_NETWORK",v.PROFILE_HDR="PROFILE_HDR",v.PROFILE_REFLEX="PROFILE_REFLEX",v.PROFILE_CLOUD_GSYNC="PROFILE_CLOUD_GSYNC",v.PROFILE_L4S="PROFILE_L4S",v.PROFILE_BIT_DEPTH="PROFILE_BIT_DEPTH"}(I.StreamingQualityModeFeatureMetadataKey||(I.StreamingQualityModeFeatureMetadataKey={})),function(v){v.UNKNOWN="UNKNOWN",v.RTX_ENABLED="RTX_ENABLED",v.HDR_ENABLED="HDR_ENABLED",v.SUPPORTED_AUDIO_FORMATS="SUPPORTED_AUDIO_FORMATS",v.IN_GAME_SETTINGS_PERSISTENCE_ENABLED="IN_GAME_SETTINGS_PERSISTENCE_ENABLED",v.ENABLED_FPS="ENABLED_FPS",v.ENABLED_DEBUG_TOOLS="ENABLED_DEBUG_TOOLS",v.ENABLED_REFLEX="ENABLED_REFLEX",v.BIT_DEPTH="BIT_DEPTH",v.CLOUD_GSYNC="CLOUD_GSYNC",v.ENABLED_L4S="ENABLED_L4S"}(I.SubscriptionFeatureMetadataKey||(I.SubscriptionFeatureMetadataKey={}))},62879:vt=>{(()=>{var I={306: /*!***********************************************!*\ !*** ../networktest-core/dist/networktest.js ***! \***********************************************/()=>{var v={V:"NetworkTest_Http_Event",U:"NetworkTest_Exception_Event"};function _(ie,K,ce,ge,Oe,Ie,ht,Fe,et){return{name:v.U,W:"technical",networkSessionId:ie,message:K,stacktrace:ce,filename:ge,lineno:Oe,colno:Ie,handled:ht?"TRUE":"FALSE",category:et,zoneAddress:Fe}}function g(ie,K,ce){return{name:v.V,W:"functional",url:ie,verb:K,statusCode:"0",requestStatusCode:"",networkSessionId:ce,requestId:"",serverId:"",callDuration:0}}var E={u:{},O:{type:"UNKNOWN"},T:!1,X:!1,B:!0,F:!1};function T(ie,K,ce,ge,Oe){ge=`${ge}${function y(...ie){return ie.length?`##${JSON.stringify(ie)}`:""}(...Oe)}`,K={timeStamp:M(),logLevel:K,logtag:ce,logstr:ge},ie.commit(K)}function M(){var ie=new Date;const K=(ge,Oe,Ie)=>{if(0<(Oe-=ge.length)){let ht="";for(let Fe=0;Fe{},this.j=(ie,K,...ce)=>T(this,"DEBUG",ie,K,ce),this.o=(ie,K,...ce)=>T(this,"INFO",ie,K,ce),this.s=(ie,K,...ce)=>T(this,"WARN",ie,K,ce),this.l=(ie,K,...ce)=>T(this,"ERROR",ie,K,ce),this.m=(ie,...K)=>function x(ie,...K){return ie.replace(/{(\d+)}/g,function(ce,ge){return typeof K[ge]<"u"?K[ge]:ce})}(ie,...K)}get d(){return E.F?console.debug.bind(console,"%s DEBUG [%s] %s@@",M()):E.B?this.j:this.i}get w(){return E.F?console.warn.bind(console,"%s WARN [%s] %s@@",M()):E.B?this.s:this.i}get g(){return E.F?console.info.bind(console,"%s INFO [%s] %s@@",M()):E.B?this.o:this.i}get e(){return E.F?console.error.bind(console,"%s ERROR [%s] %s@@",M()):this.l}get format(){return this.m}commit(ie){this.h&&this.h.emit("Log",ie)}};function c(ie){return!!/^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/.test(ie)}function i(ie){var K=1;for(let ce=1;ce{const Ae=Ze=>{ht=void 0,_t(Ze)},lt=()=>{if(Ie)Ae({aborted:!0,I:Oe-ge-1});else{var Ze=new XMLHttpRequest;Ze.onreadystatechange=()=>{if(Ie){var kn={aborted:!0,I:Oe-ge-1};ht=void 0,_t(kn)}else 4==Ze.readyState&&(ge--,0==Ze.status?0{var kn,Wt;Ze.open(null!==(kn=K.method)&&void 0!==kn?kn:"GET",ie,!0),K.timeout&&(Ze.timeout=K.timeout),void 0!==K.headers&&Object.keys(K.headers).forEach(rn=>{Ze.setRequestHeader(rn,K.headers[rn])}),navigator.onLine?(ht=()=>Ze.abort(),Ze.send(null!==(Wt=K.body)&&void 0!==Wt?Wt:"")):Ae({code:2002,description:"No network",I:Oe-ge-1})},un=(kn,Wt)=>{Wt&&(K.headers=K.headers||{},K.headers.Authorization=kn+Wt),yt()};if(ce)switch(ce.type){case 0:void 0!==ce.authTokenCallback&&ce.authTokenCallback?ce.authTokenCallback().then(kn=>{un("Basic ",kn)},()=>{ht=void 0,_t({code:2003,description:"Auth token not updated",I:Oe-ge-1})}):yt();break;case 1:un("GFNJWT ",ce.token);break;case 2:un("GFNPartnerJWT ",ce.token);break;default:Ae({code:2004,description:"Invalid Auth type provided"})}else yt()}};lt()});return Object.assign(et,{abort:()=>{Ie=!0,null==ht||ht()}})}let j,z;function re(){if(!j){let ie="Unknown",K="Unknown";try{if(navigator.platform.includes("Win")){ie="Windows";let ce=navigator.userAgent;switch(ce.substring(ce.indexOf("(")+1,ce.indexOf(";"))){case"Win16":K="3.11";break;case"Windows 95":case"Win95":case"Windows_95":K="95";break;case"Windows 98":case"Win98":K="98";break;case"Windows NT 5.0":case"Windows 2000":K="2000";break;case"Windows NT 5.1":case"Windows XP":K="XP";break;case"Windows NT 5.2":K="Server 2003";break;case"Windows NT 6.0":K="Vista";break;case"Windows NT 6.1":K="7";break;case"Windows NT 6.2":case"WOW64":K="8";break;case"Windows 10.0":case"Windows NT 10.0":K="10";break;case"Windows NT 4.0":case"WinNT4.0":case"WinNT":case"Windows NT":K="NT 4.0";break;case"Windows ME":K="ME"}}else if(navigator.platform.includes("Mac")){ie="MacOSX";let ce=navigator.userAgent,ge=ce.substring(0,ce.indexOf(")"));K=ge.substring(ge.lastIndexOf(" ")+1)}else if(navigator.userAgent.includes("CrOS")){ie="ChromeOS";let ce=navigator.userAgent,ge=ce.substring(0,ce.indexOf(")"));K=ge.substring(ge.lastIndexOf(" ")+1)}else navigator.platform.includes("Linux")&&(ie="Linux")}catch(ce){b.e("utils","Exception in getting useragent: ",ce)}j={name:ie,version:K}}return j}function H(){if(!z)e:{let ie="Unknown",K="Unknown";try{if(A()){ie="Chrome";const ce=navigator.userAgent.match(/Chrome\/([^ ]*)/);ce&&(K=ce[1])}else if(P()){ie="Safari";const ce=navigator.userAgent.match(/Version\/([^ ]*).*?Safari\/([^ ]*)/);if(ce){K=ce[1],z={name:ie,version:K,webkit:ce[2]};break e}}}catch(ce){b.e("utils","Exception in getting browser: ",ce)}z={name:ie,version:K}}return z}function U(){const ie=re(),K=H();return"GFN-PC/1.0 (WebRTC) NetworkTest/0.0.51 "+ie.name+"/"+ie.version+" "+K.name+"/"+K.version+" (master-8926289)"}function O(ie,K){for(let ce=0;ceOe)break;if(geie&&(K=1e3+ie),K}function k(ie,K,ce,ge,Oe,Ie,ht,Fe){ie.g.emit("NetworkTestAnalytics",_(ie.sessionId,K,ce,ge,Oe,Ie,ht,ie.zone,null!=Fe?Fe:""))}var $=class{constructor(ie,K,ce){this.sessionId=ie,this.g=K,this.zone=ce}};function te(ie,K){if(!A())return ie;let ce=ie.split("\r\n"),ge=-1;for(let Oe=0;Oe{ie.D=void 0,ce.statusCode=String(et),Oe=performance.now(),ce.callDuration=Math.round(Oe-ge),ie.m.emit("NetworkTestAnalytics",ce)},ht=(et,Rt,_t)=>{Ie(et),b.e("ntrtcclient","Sign in request failed. status:"+et+" errorCode "+Rt),pe(ie,{code:Rt,description:"Netsession sign in request failed with error",errorDetail:null!=_t?_t:"SIGNIN_FAILED"})};let Fe=1e4;E.u.signInTimeout&&0{200===et.status?(Ie(et.status),b.d("ntrtcclient","Sign in response: ["+et.data+"]"),ie.id=parseInt(et.data.split("\n")[0].split(",")[1]),b.d("ntrtcclient","server provided client id: "+ie.id),function we(ie){ie.s=window.setTimeout(()=>{if(ie.s=0,!ie.H){let K=4e3,ce="SIGNALING_TIMEOUT";ie.P?ie.R?ie.S&&(K=4010,ce="FIN_FAILED"):(K=4008,ce="PEERCONNECTION_FAILED"):(K=4007,ce="PEERCONNECTION_FAILED"),pe(ie,{code:K,description:"Fail with timeout to run network test",errorDetail:ce}),b.e("ntrtcclient","iceCandidateFlag "+ie.i)}},3e4)}(ie),q(ie)):ht(et.status,F(et.status))}).catch(et=>{var Rt;(null==et||!et.aborted)&&(et.code?(b.e("ntrtcclient","Sigin request failed with "+et.code),ht(0,et.code)):(ht(0,2005),null!=et&&et.stack&&(b.e("ntrtcclient","exception while performing streamer sign in request: "+et),null===(Rt=ie.j)||void 0===Rt||k(Rt,"exception while performing streamer sign in request",et.stack,"ntrtcclient.ts",0,0,!0))))})}function fe(ie){if(ie.H=!0,ie.h&&(ie.D&&(ie.D.abort(),ie.D=void 0),ie.J&&(ie.J.abort(),ie.J=null),ie.g&&ie.g.close(),0!==ie.s&&(window.clearTimeout(ie.s),ie.s=0),0!=ie.id)){let K=ie.v+"/sign_out?peer_id="+ie.id,ce=g(K,"GET",ie.h.sessionId);ce.serverId=ie.h.zone;let Oe,ge=performance.now();B(K,{headers:ie.A}).then(Ie=>{void 0!==Ie.status&&(ce.statusCode=String(Ie.status)),Oe=performance.now(),ce.callDuration=Math.round(Oe-ge),ie.m.emit("NetworkTestAnalytics",ce),200==Ie.status?b.g("ntrtcclient","Successfully signed out from streaming server"):b.e("ntrtcclient","Error during signout from streaming server: "+Ie.status)}).catch(()=>{Oe=performance.now(),ce.callDuration=Math.round(Oe-ge),ie.m.emit("NetworkTestAnalytics",ce),b.e("ntrtcclient","Network error while sending the singout request")})}}function Se(ie,K){Object.keys(ie.A).forEach(ce=>{K.setRequestHeader(ce,ie.A[ce])})}function pe(ie,K){ie.H||(window.clearInterval(ie.N),ie.H=!0,0!==ie.s&&(window.clearTimeout(ie.s),ie.s=0),ie.m.emit("NetworkTestCompleted",{sessionId:ie.h.sessionId,error:K,zone:ie.h.zone}),b.e("ntrtcclient","Stopping Stream with error "+K.code))}function q(ie){let K=g("","GET",ie.h.sessionId);K.serverId=ie.h.zone;let ce=performance.now(),ge=!1,Oe=!1;const Ie=new XMLHttpRequest;ie.J=Ie,Ie.onloadend=()=>{if(!ge){if(200==Ie.status){b.d("ntrtcclient","hanging get request succeeded response:\n"+Ie.responseText);var Fe=Ie.getResponseHeader("Pragma");b.d("ntrtcclient","peer Id header"+Fe),null!=Fe&&Fe.length?(Fe=parseInt(Fe))!=ie.id&&(b.d("ntrtcclient","* message from remote peer:"+Fe),function J(ie,K,ce){var ge;b.d("ntrtcclient","* handlePeerMessage from remote peer "+K),b.d("ntrtcclient","*[Message] <\n"+ce+"\n>");const Oe=Ie=>{b.e("ntrtcclient","handlePeerMessage: failed with errorCode "+Ie.code),Ie.errorDetail="PEERCONNECTION_FAILED",pe(ie,Ie)};try{let Ie=JSON.parse(ce);if(void 0!==Ie.type&&"offer"===Ie.type)(function X(ie,K){var ce;b.d("ntrtcclient","attempting peer connection to: "+K);try{let ge={iceServers:[{urls:"stun:stun.gamestream.nvidia.com:19302"}]};b.d("ntrtcclient","* configuration:"+JSON.stringify(ge)),b.d("ntrtcclient","* options :"+JSON.stringify({optional:[{DtlsSrtpKeyAgreement:!0},{ha:!0},{fa:!0}]})),ie.g=new RTCPeerConnection(ge);const Oe=()=>{ie.i|=16,!(4&ie.i)&&pe(ie,{code:4004,errorDetail:"PEERCONNECTION_FAILED"})};ie.g.onconnectionstatechange=()=>{if(ie.g)switch(b.d("ntrtcclient","pc state: "+ie.g.connectionState),ie.g.connectionState){case"disconnected":case"failed":Oe()}else b.e("ntrtcclient","pc is null")},ie.g.oniceconnectionstatechange=()=>{if(ie.g)switch(b.d("ntrtcclient","peer iceConnectionState state: "+ie.g.iceConnectionState),ie.g.iceConnectionState){case"new":ie.i|=1;break;case"checking":ie.i|=2;break;case"connected":ie.i|=4;break;case"completed":ie.i|=8;break;case"failed":Oe();break;case"disconnected":ie.i|=32;break;case"closed":ie.i|=64,32&ie.i&&pe(ie,{code:4005,errorDetail:"PEERCONNECTION_FAILED"})}else b.e("ntrtcclient","pc is null")},ie.g.ondatachannel=Ie=>{b.d("ntrtcclient","Server created a DataChannel: "+Ie.channel.label),"control_channel"==Ie.channel.label&&(Ie.channel.onopen=()=>{b.g("ntrtcclient","ntrtcclient","Control channel opened"),ie.L=Ie.channel;let ht=5e3;E.u.finTimeout&&0{var et,Rt,Fe={fin:{sessionId:ie.h.sessionId,packetsLost:ie.o,packetsReceived:ie.C}};try{"open"===(null===(et=ie.L)||void 0===et?void 0:et.readyState)?ie.L.send(JSON.stringify(Fe)):(b.w("ntrtcclient","Couldn't send control channel message"),pe(ie,{code:4009,errorDetail:"FIN_FAILED"}))}catch(_t){b.e("ntrtcclient","sendControlMessage exception: "+_t),ie.j&&k(ie.j,"sendControlMessage exception",null!==(Rt=_t.stack)&&void 0!==Rt?Rt:"","ntrtcclient.ts",0,0,!0),pe(ie,{code:2005,errorDetail:"FIN_FAILED"})}ie.S=!0},ht),ie.N=window.setInterval(()=>function W(ie){ie.g.getReceivers().forEach(function(K){K.getStats().then(function(ce){ce.forEach(function(ge){"inbound-rtp"===ge.type&&"video"===ge.kind&&"inbound-rtp"===ge.type&&"video"===ge.kind&&(ie.o=ge.packetsLost,ie.C=ge.packetsReceived,b.g("ntrtcclient","PLCalc: "+100*ie.o/(ie.C+ie.o)+",L:"+ie.o+", R:"+ie.C))})})})}(ie),500)},Ie.channel.onerror=()=>{ie.H||(b.e("ntrtcclient","ntrtcclient","Control channel error"),pe(ie,{code:4006,errorDetail:"FIN_FAILED"}))},Ie.channel.onclose=()=>{b.g("ntrtcclient","ntrtcclient","Control channel closed")},Ie.channel.onmessage=ht=>{var Fe;try{let et=JSON.parse(ht.data);b.d("ntrtcclient","Received message on control channel: "+JSON.stringify(et)),et.finAck?(ht=et).finAck&&(ie.l.downlinkBandwidth=Math.round(1.15*ht.finAck.downlinkBandwidth*100)/100,52428800{console.trace("* event: icecandidate ----\x3e "),ie.g&&ie.g.canTrickleIceCandidates&&ie.g.onicecandidate&&ie.g.onicecandidate(Ie)}),ie.g.onicecandidate=Ie=>{b.g("ntrtcclient","* pc.onicecandidate event="+Ie),Ie.candidate?(b.g("ntrtcclient","# pc.onicecandidate "+Ie.candidate.candidate),ee(ie,K,JSON.stringify({sdpMLineIndex:Ie.candidate.sdpMLineIndex,sdpMid:Ie.candidate.sdpMid,candidate:Ie.candidate.candidate})),ie.P=!0):b.d("ntrtcclient","# End of candidates.")},ie.g.ga=()=>{b.g("ntrtcclient","streaming session connecting")},ie.g.onopen=()=>{b.g("ntrtcclient","streaming session connected")},ie.g.ontrack=Ie=>{b.g("ntrtcclient","Received remote stream:"+Ie.streams[0].id)}}catch(ge){b.e("ntrtcclient","Exception in creating peer connection: "+ge),ie.j&&k(ie.j,"Exception in creating peer connection",null!==(ce=ge.stack)&&void 0!==ce?ce:"","ntrtcclient.ts",0,0,!0)}})(ie,K),ie.g.setRemoteDescription(new RTCSessionDescription(Ie)).then(()=>{b.d("ntrtcclient","onRemoteSdpSuccess");let ht={mandatory:{OfferToReceiveAudio:!0,OfferToReceiveVideo:!0,audio:!0,video:{width:{min:""},height:{min:""},frameRate:{min:""}}}};ht.mandatory.video.width.min=ie.K.networkTestProfile[0].width.toString(),ht.mandatory.video.height.min=ie.K.networkTestProfile[0].height.toString(),ht.mandatory.video.frameRate.min=ie.K.networkTestProfile[0].frameRate.toString(),b.d("ntrtcclient","* mediaConstraints >>> "+JSON.stringify(ht)),ie.g.createAnswer(ht).then(Fe=>{b.d("ntrtcclient","* respond to remote peer with an ANSWER");let et="50000";b.d("ntrtcclient","* setLocalDescription >>> : \n"+Fe.sdp),void 0!==Fe.sdp&&(Fe.sdp=function ne(ie,K){let ce=ie.split("\r\n"),ge=-1;for(let Oe=0;Oe>> MODIFIED SDP : \n"+Fe.sdp)),ie.g.setLocalDescription(Fe).then(()=>{b.d("ntrtcclient","setLocalDescription succeeded"),void 0===Fe.sdp||A()||(Fe.sdp=te(Fe.sdp,et));let Rt=JSON.stringify(Fe);ee(ie,K,Rt)}).catch(Rt=>{b.e("ntrtcclient","setLocalDescription failed. Error: "+Rt),Oe({code:4001})})}).catch(Fe=>{b.d("ntrtcclient","Create answer error:",Fe)})}).catch(ht=>{b.e("ntrtcclient","onRemoteSdpError: ",ht),Oe({code:4002})});else if(Ie.candidate){b.d("ntrtcclient","Adding ICE candidate ");let ht=function ae(ie,K){if(b.d("ntrtcclient","checking for ice candidate update"),""!=ie.M){for((K=K.split(" "))[0]="candidate:"+i(10),K[3]=K[3].slice(0,4)+i(6),K[4]=ie.M,ie=6;ie{b.d("ntrtcclient","add ice candidate succeeded"),ie.R=!0}).catch(et=>{b.e("ntrtcclient","add ice candidate failed "+et)}),b.d("ntrtcclient","add ice candidate --")}}catch(Ie){"BYE"===ce?Oe({code:4003}):(b.e("ntrtcclient","Invalid handlePeerMessage Response: "+Ie),ie.j&&k(ie.j,"Invalid handlePeerMessage Response",null!==(ge=Ie.stack)&&void 0!==ge?ge:"","ntrtcclient.ts",0,0,!0))}}(ie,Fe,Ie.responseText)):b.e("ntrtcclient","hanging get response doesnt have peer id")}else Oe||504===Ie.status||(b.e("ntrtcclient",0===Ie.status?"hanging get request failed without a response":"hanging get request failed. status: "+Ie.status),K.statusCode=String(Ie.status),K.callDuration=Math.round(performance.now()-ce),ie.m.emit("NetworkTestAnalytics",K));window.setTimeout(()=>q(ie),Oe||200===Ie.status||504===Ie.status?0:2e3)}},Ie.onabort=()=>{ge=!0},Ie.ontimeout=()=>{Oe=!0};let ht=ie.v+"/wait?peer_id="+ie.id;K.url=ht,b.d("ntrtcclient","performing hanging get: "+ht),Ie.open("GET",ht),Ie.timeout=1e4,Se(ie,Ie),Ie.send()}function ee(ie,K,ce){var ge;b.d("ntrtcclient","* sendDataToPeer - remote peer "+K+" data to send <\n"+ce+"\n>");let Oe=g("","POST",ie.h.sessionId);Oe.serverId=ie.h.zone;let ht,Ie=performance.now();try{let Fe=ie.v+"/message?peer_id="+ie.id+"&to="+K;Oe.url=Fe;let et=new XMLHttpRequest;et.onreadystatechange=()=>{4==et.readyState&&(Oe.statusCode=String(et.status),ht=performance.now(),Oe.callDuration=Math.round(ht-Ie),ie.m.emit("NetworkTestAnalytics",Oe),200==et.status?b.g("ntrtcclient","successfully sent message to peer: "+K):b.e("ntrtcclient","failed to send message to peer: "+K))},et.open("POST",Fe,!0),et.setRequestHeader("Content-Type","text/plain"),Se(ie,et),et.send(ce)}catch(Fe){b.e("ntrtcclient","send to peer error: "+Fe),ie.j&&k(ie.j,"send to peer error",null!==(ge=Fe.stack)&&void 0!==ge?ge:"","ntrtcclient.ts",0,0,!0)}}var de=class{constructor(ie){this.S=this.P=this.R=!1,this.m=ie,this.name="peer-"+i(10),b.d("ntrtcclient","Generated stream client name is: "+this.name),this.id=0,this.h=null,this.D=void 0,this.J=null,this.v="",this.L=this.g=null,this.H=!1,this.i=0,this.A={},this.j=null,this.l={downlinkBandwidth:0,packetLoss:0,latency:0,networkTestThreshold:{latencyLimit:0,latencyRecommended:0,packetLossLimit:0,packetLossRecommended:0,bandwidthLimit:0,bandwidthRecommended:0}},this.s=0,this.M="",this.N=0,this.o=-1,this.C=0}start(ie,K){this.j=new $(ie.sessionId,this.m,ie.serverId),this.h=ie,this.K=K,U(),b.g("ntrtcclient","NetworkTestRtcClient: serialized session : "+JSON.stringify(ie)),"https"==ie.protocol&&(this.A["nv-sessionid"]=ie.sessionId,this.A["nv-serverId"]=ie.serverId),0==K.serverAddress.indexOf("prod.")&&(K.serverAddress=ie.zone+K.serverAddress.substr(4),b.d("ntrtcclient","serverAddress adjusted to Zone value: "+K.serverAddress)),this.v=ie.protocol+"://"+K.serverAddress+":"+ie.port,"PassThruSessionId"==ie.sessionId&&(this.v=ie.protocol+"://"+ie.address+":"+ie.port),this.M=ie.address,se(this)}abort(){this.m.emit("NetworkTestCompleted",{sessionId:this.h.sessionId,error:{code:2007,description:"Network test Aborted",errorDetail:"USER_CANCELLED"},zone:this.h.zone})}},Pe=class{constructor(ie){this.protocol="https://",this.j=ie,this.g=V,this.g.timeout=8e3,this.g.G=3,U(),this.g.headers["Content-Type"]="application/json",this.g.headers["x-nv-client-identity"]=U(),this.g.headers["nv-client-identity"]=U(),this.g.headers["x-nv-client-version"]="1.0",this.zone=""}i(ie){let K={netTestRequestData:{clientPlatformName:ie.platformId,netTestProfile:{widthInPixels:ie.networkTestProfile[0].width,heightInPixels:ie.networkTestProfile[0].height,framesPerSecond:ie.networkTestProfile[0].frameRate}}};this.zone=ie.serverAddress;let ce={method:"POST",headers:this.g.headers,body:JSON.stringify(K),G:this.g.G,timeout:this.g.timeout};b.d("ntsessionrequest"," The serialized POST request object : "+ce.body);let ge=this.protocol+ie.serverAddress+"/v2/nettestsession";return new Promise((Oe,Ie)=>{let et,ht=g(ge,"POST",""),Fe=performance.now();const Rt=()=>{et=performance.now(),ht.callDuration=Math.round(et-Fe),this.j.emit("NetworkTestAnalytics",ht)},_t=Ae=>{var lt;return Rt(),{error:{code:Ae,description:2007==Ae?"Netsession aborted":"Netsession post request failed with error",errorDetail:2007==Ae?"USER_CANCELLED":"POST_FAILED"},sessionId:null!==(lt=this.sessionId)&&void 0!==lt?lt:"undefined",zone:this.zone}};this.h=B(ge,ce,ie.authInfo),this.h.then(Ae=>{if(b.d("ntsessionrequest","post session request completed with status code: "+Ae.status+"data: "+Ae.data),et=performance.now(),void 0===Ae.status)return b.e("ntsessionrequest","Failed to get status from response"),ht.statusCode="1701",Ie(_t(2e3));if(ht.statusCode=String(Ae.status),void 0!==Ae.data){var lt=JSON.parse(Ae.data);lt.requestStatus&&(ht.requestId=lt.requestStatus.requestId,ht.serverId=lt.requestStatus.serverId,ht.requestStatusCode=String(lt.requestStatus.statusCode),this.zone=lt.requestStatus.serverId,b.d("ntsessionrequest","now we have Zone info from nettestsession as:"+this.zone))}let Ze;if(void 0!==lt.netTestSession){if(this.sessionId=ht.networkSessionId=lt.netTestSession.sessionId,b.d("ntsessionrequest","Network test session Id: "+this.sessionId),!(0{let lt;Ae instanceof SyntaxError?(b.e("ntsessionrequest","Session Response: "+Ae+": "+JSON.stringify(Ae)),lt=2e3):Ae.code?(b.e("ntsessionrequest","session request failed with "+Ae.code),lt=Ae.code):Ae.aborted?(lt=2007,b.e("ntsessionrequest","Session Fail with UserCancelled:"+JSON.stringify(Ae))):(lt=2001,b.e("ntsessionrequest","Session Fail with network error"+Ae+":"+JSON.stringify(Ae))),Ie(_t(lt))})})}},ye=class extends Pe{i(ie){return b.d("ntsessionrequest","Passthrough network test session"),new Promise(K=>{window.setTimeout(()=>{let ce={sessionId:"PassThruSessionId",address:ie.serverAddress,port:49100,networkTestThreshold:{bandwidthLimit:25,bandwidthRecommended:50,latencyLimit:80,latencyRecommended:40,packetLossRecommended:1,packetLossLimit:3,percentile99thFrameJitterRecommended:40,percentile99thFrameJitterLimit:80},protocol:"http",serverId:""};b.d("ntsessionrequest","Passthru: returning a fake session: "+ce.sessionId),K(ce)},1)})}},Le=class{constructor(){this.i=new Map}addListener(ie,K){let ce=this.i.get(ie);void 0!==ce?ce.push(K):this.i.set(ie,[K])}removeListener(ie,K){if((ie=this.i.get(ie))&&ie.length){let ce=0;for(;ceie.networkTestProfile.length)return b.e("networktestapp","Invalid network test profile"),!1;if(Object.keys(ie).forEach(K=>{this.g[K]=ie[K]||this.g[K]}),c(this.g.serverAddress))b.d("networktestapp","creating passthru server"),this.j=new ye(this);else{if(this.g.serverAddress.startsWith("mock://"))b.d("networktestapp","Creating Mock server"),this.g.serverAddress=this.g.serverAddress.replace("mock://","");else if(!ie.authInfo||!ie.authInfo.authTokenCallback&&!ie.authInfo.token)return b.e("networktestapp","Auth Info is not provided"),!1;this.j=new Pe(this)}return this.zone=this.g.serverAddress,b.d("networktestapp","Initiating networkSession request"),this.j.i(this.g).then(K=>{var ce;this.sessionId=K.sessionId,this.zone=null!==(ce=K.zone)&&void 0!==ce?ce:this.zone,b.d("networktestapp","Received session: "+this.sessionId),this.l.sessionId=this.sessionId,this.h=new de(this),this.h.start(K,this.g)}).catch(K=>{var ce,ge,Oe,Ie;K.sessionId&&(this.sessionId=K.sessionId),K.zone=this.zone,K.error&&K.error.code?(b.e("networktestapp","session request failed. error: "+K.error.code),this.emit("NetworkTestCompleted",K)):(this.emit("NetworkTestCompleted",{sessionId:this.sessionId,error:{code:2005,description:"Quitting due to exception",errorDetail:"UNKNOWN"}}),b.e("networktestapp","Exception happened in session call: "+K),k(this.l,"Exception happened in session call",null!==(ce=K.stack)&&void 0!==ce?ce:"No Stack",null!==(ge=K.filename)&&void 0!==ge?ge:"",null!==(Oe=K.lineno)&&void 0!==Oe?Oe:0,null!==(Ie=K.colno)&&void 0!==Ie?Ie:0,!0))}),!0}stopNetworkTest(){b.d("networktestapp","stopNetworkTest called.");var ie=!1;return this.h?(this.h.abort(),ie=!0):this.j&&((ie=this.j).h&&(ie.h.abort(),ie.h=void 0),ie=!0),ie}},window.NetworkTest.ConfigureNetworkTestSettings=function(ie){var K,ce,ge;if(console.log(ie),E.O.type="OTHER",ie.gxtOverrideData){const Oe=JSON.parse(ie.gxtOverrideData);if(E.O={type:"GXT",version:null===(K=Oe.ea)||void 0===K?void 0:K.ia},Oe.Y)for(const Ie of Oe.Y)"rtcNetworkTest"==Ie.name&&(E.u=Ie.value)}else ie.remoteConfigData&&(E.O={type:"RCONFIG",version:ie.remoteConfigData.version},ie.remoteConfigData.rtcnetworktest&&(E.u=JSON.parse(ie.remoteConfigData.rtcnetworktest)));if(ie.overrideData){const Oe=new URLSearchParams(ie.overrideData.toLowerCase());"lean"===Oe.get("mode")?(E.X=!0,E.B=!1,E.T=!0):"dev"===Oe.get("mode")&&(E.T=!0),E.B=null!==(ce=(ie=Ie=>{if(Ie=Oe.get(Ie))switch(Ie){case"enable":case"on":case"1":case"true":return!0;case"disable":case"off":case"0":case"false":return!1}})("log"))&&void 0!==ce?ce:E.B,E.F=E.B&&(null!==(ge=ie("console"))&&void 0!==ge?ge:E.F)}},window.NetworkTest.NetworkTestSettings=E,window.NetworkTest.IsValidIPv4=c,window.NetworkTest.GetRandNumericString=i,window.NetworkTest.IsChromium=h,window.NetworkTest.IsChrome=A,window.NetworkTest.IsSafari=P,window.NetworkTest.performHttpRequest=B,window.NetworkTest.getPlatform=re,window.NetworkTest.getBrowser=H,window.NetworkTest.getAppUserAgent=U,window.NetworkTest.IsTouchDevice=function(){return window.matchMedia("(pointer:coarse)").matches},window.NetworkTest.getNewGuid=function(){let ie=new Uint8Array(36);window.crypto.getRandomValues(ie);let K="";for(let ce=0;36>ce;ce++){let ge=ie[ce]%16;8==ce||13==ce||18==ce||23==ce?K+="-":14==ce?K+="4":(19==ce&&(ge=3&ge|8),K+=ge.toString(16))}return K},window.NetworkTest.isChromeVersionAtLeast=function(ie,K,ce,ge,Oe){if("Chrome"!=ie.name)return!1;K=[K,null!=ce?ce:0,null!=ge?ge:0,null!=Oe?Oe:0];try{return O(ie.version.split(".").map(ht=>Number.parseInt(ht)),K)}catch{b.w("utils","Failed to parse Chrome version")}return!0},window.NetworkTest.isSafariVersionAtLeast=function(ie,K,ce,ge){if("Safari"!=ie.name)return!1;K=[K,null!=ce?ce:0,null!=ge?ge:0];try{return O(ie.version.split(".").map(Ie=>Number.parseInt(Ie)),K)}catch{b.w("utils","Failed to parse Safari application version")}return!0},window.NetworkTest.isSafariWebKitVersionAtLeast=function(ie,K,ce,ge){if("Safari"!=ie.name||!ie.webkit)return!1;K=[K,null!=ce?ce:0,null!=ge?ge:0];try{return O(ie.webkit.split(".").map(Ie=>Number.parseInt(Ie)),K)}catch{b.w("utils","Failed to parse Safari WebKit version")}return!0},window.NetworkTest.getHttpNtErrorCode=F,window.NetworkTest.CLIENT_IDENTIFICATION="GFN-PC",window.NetworkTest.CLIENT_VERSION="1.0",window.NetworkTest.DEFAULT_PORT=49100,window.NetworkTest.UNDEFINED_SESSION_ID="undefined",window.NetworkTest.DefaultHttpRequestOptions=V,window.NetworkTest.CHANGELIST="master-8926289"},134: /*!******************************************************************!*\ !*** ./node_modules/rtcpeerconnection-shim/rtcpeerconnection.js ***! \******************************************************************/(v,_,g)=>{"use strict";var E=g( /*! sdp */ 985);function x(h,A,P,V,B){var j=E.writeRtpDescription(h.kind,A);if(j+=E.writeIceParameters(h.iceGatherer.getLocalParameters()),j+=E.writeDtlsParameters(h.dtlsTransport.getLocalParameters(),"offer"===P?"actpass":B||"active"),j+="a=mid:"+h.mid+"\r\n",j+=h.rtpSender&&h.rtpReceiver?"a=sendrecv\r\n":h.rtpSender?"a=sendonly\r\n":h.rtpReceiver?"a=recvonly\r\n":"a=inactive\r\n",h.rtpSender){var re=h.rtpSender._initialTrackId||h.rtpSender.track.id;h.rtpSender._initialTrackId=re;var z="msid:"+(V?V.id:"-")+" "+re+"\r\n";j+="a="+z,j+="a=ssrc:"+h.sendEncodingParameters[0].ssrc+" "+z,h.sendEncodingParameters[0].rtx&&(j+="a=ssrc:"+h.sendEncodingParameters[0].rtx.ssrc+" "+z,j+="a=ssrc-group:FID "+h.sendEncodingParameters[0].ssrc+" "+h.sendEncodingParameters[0].rtx.ssrc+"\r\n")}return j+="a=ssrc:"+h.sendEncodingParameters[0].ssrc+" cname:"+E.localCName+"\r\n",h.rtpSender&&h.sendEncodingParameters[0].rtx&&(j+="a=ssrc:"+h.sendEncodingParameters[0].rtx.ssrc+" cname:"+E.localCName+"\r\n"),j}function y(h,A){var P={codecs:[],headerExtensions:[],fecMechanisms:[]},V=function(j,re){j=parseInt(j,10);for(var z=0;z=14393&&-1===re.indexOf("?transport=udp"):(P=!0,!0)}),delete V.url,V.urls=j?B[0]:B,!!B.length}})}(H.iceServers||[],A),this._iceGatherers=[],H.iceCandidatePoolSize)for(var F=H.iceCandidatePoolSize;F>0;F--)this._iceGatherers.push(new h.RTCIceGatherer({iceServers:H.iceServers,gatherPolicy:H.iceTransportPolicy}));else H.iceCandidatePoolSize=0;this._config=H,this.transceivers=[],this._sdpSessionId=E.generateSessionId(),this._sdpSessionVersion=0,this._dtlsRole=void 0,this._isClosed=!1};Object.defineProperty(j.prototype,"localDescription",{configurable:!0,get:function(){return this._localDescription}}),Object.defineProperty(j.prototype,"remoteDescription",{configurable:!0,get:function(){return this._remoteDescription}}),j.prototype.onicecandidate=null,j.prototype.onaddstream=null,j.prototype.ontrack=null,j.prototype.onremovestream=null,j.prototype.onsignalingstatechange=null,j.prototype.oniceconnectionstatechange=null,j.prototype.onconnectionstatechange=null,j.prototype.onicegatheringstatechange=null,j.prototype.onnegotiationneeded=null,j.prototype.ondatachannel=null,j.prototype._dispatchEvent=function(H,U){this._isClosed||(this.dispatchEvent(U),"function"==typeof this["on"+H]&&this["on"+H](U))},j.prototype._emitGatheringStateChange=function(){var H=new Event("icegatheringstatechange");this._dispatchEvent("icegatheringstatechange",H)},j.prototype.getConfiguration=function(){return this._config},j.prototype.getLocalStreams=function(){return this.localStreams},j.prototype.getRemoteStreams=function(){return this.remoteStreams},j.prototype._createTransceiver=function(H,U){var F={track:null,iceGatherer:null,iceTransport:null,dtlsTransport:null,localCapabilities:null,remoteCapabilities:null,rtpSender:null,rtpReceiver:null,kind:H,mid:null,sendEncodingParameters:null,recvEncodingParameters:null,stream:null,associatedRemoteMediaStreams:[],wantReceive:!0};if(this.usingBundle&&this.transceivers.length>0)F.iceTransport=this.transceivers[0].iceTransport,F.dtlsTransport=this.transceivers[0].dtlsTransport;else{var k=this._createIceAndDtlsTransports();F.iceTransport=k.iceTransport,F.dtlsTransport=k.dtlsTransport}return U||this.transceivers.push(F),F},j.prototype.addTrack=function(H,U){if(this._isClosed)throw i("InvalidStateError","Attempted to call addTrack on a closed peerconnection.");if(this.transceivers.find(function($){return $.track===H}))throw i("InvalidAccessError","Track already exists.");for(var F,k=0;k=15025)H.getTracks().forEach(function(F){U.addTrack(F,H)});else{var O=H.clone();H.getTracks().forEach(function(F,k){var $=O.getTracks()[k];F.addEventListener("enabled",function(ne){$.enabled=ne.enabled})}),O.getTracks().forEach(function(F){U.addTrack(F,O)})}},j.prototype.removeTrack=function(H){if(this._isClosed)throw i("InvalidStateError","Attempted to call removeTrack on a closed peerconnection.");if(!(H instanceof h.RTCRtpSender))throw new TypeError("Argument 1 of RTCPeerConnection.removeTrack does not implement interface RTCRtpSender.");var U=this.transceivers.find(function(k){return k.rtpSender===H});if(!U)throw i("InvalidAccessError","Sender was not created by this connection.");var O=U.stream;U.rtpSender.stop(),U.rtpSender=null,U.track=null,U.stream=null,-1===this.transceivers.map(function(k){return k.stream}).indexOf(O)&&this.localStreams.indexOf(O)>-1&&this.localStreams.splice(this.localStreams.indexOf(O),1),this._maybeFireNegotiationNeeded()},j.prototype.removeStream=function(H){var U=this;H.getTracks().forEach(function(O){var F=U.getSenders().find(function(k){return k.track===O});F&&U.removeTrack(F)})},j.prototype.getSenders=function(){return this.transceivers.filter(function(H){return!!H.rtpSender}).map(function(H){return H.rtpSender})},j.prototype.getReceivers=function(){return this.transceivers.filter(function(H){return!!H.rtpReceiver}).map(function(H){return H.rtpReceiver})},j.prototype._createIceGatherer=function(H,U){var O=this;if(U&&H>0)return this.transceivers[0].iceGatherer;if(this._iceGatherers.length)return this._iceGatherers.shift();var F=new h.RTCIceGatherer({iceServers:this._config.iceServers,gatherPolicy:this._config.iceTransportPolicy});return Object.defineProperty(F,"state",{value:"new",writable:!0}),this.transceivers[H].bufferedCandidateEvents=[],this.transceivers[H].bufferCandidates=function(k){var $=!k.candidate||0===Object.keys(k.candidate).length;F.state=$?"completed":"gathering",null!==O.transceivers[H].bufferedCandidateEvents&&O.transceivers[H].bufferedCandidateEvents.push(k)},F.addEventListener("localcandidate",this.transceivers[H].bufferCandidates),F},j.prototype._gather=function(H,U){var O=this,F=this.transceivers[U].iceGatherer;if(!F.onlocalcandidate){var k=this.transceivers[U].bufferedCandidateEvents;this.transceivers[U].bufferedCandidateEvents=null,F.removeEventListener("localcandidate",this.transceivers[U].bufferCandidates),F.onlocalcandidate=function($){if(!(O.usingBundle&&U>0)){var ne=new Event("icecandidate");ne.candidate={sdpMid:H,sdpMLineIndex:U};var te=$.candidate,Z=!te||0===Object.keys(te).length;if(Z)("new"===F.state||"gathering"===F.state)&&(F.state="completed");else{"new"===F.state&&(F.state="gathering"),te.component=1,te.ufrag=F.getLocalParameters().usernameFragment;var se=E.writeCandidate(te);ne.candidate=Object.assign(ne.candidate,E.parseCandidate(se)),ne.candidate.candidate=se,ne.candidate.toJSON=function(){return{candidate:ne.candidate.candidate,sdpMid:ne.candidate.sdpMid,sdpMLineIndex:ne.candidate.sdpMLineIndex,usernameFragment:ne.candidate.usernameFragment}}}var fe=E.getMediaSections(O._localDescription.sdp);fe[ne.candidate.sdpMLineIndex]+=Z?"a=end-of-candidates\r\n":"a="+ne.candidate.candidate+"\r\n",O._localDescription.sdp=E.getDescription(O._localDescription.sdp)+fe.join("");var Se=O.transceivers.every(function(pe){return pe.iceGatherer&&"completed"===pe.iceGatherer.state});"gathering"!==O.iceGatheringState&&(O.iceGatheringState="gathering",O._emitGatheringStateChange()),Z||O._dispatchEvent("icecandidate",ne),Se&&(O._dispatchEvent("icecandidate",new Event("icecandidate")),O.iceGatheringState="complete",O._emitGatheringStateChange())}},h.setTimeout(function(){k.forEach(function($){F.onlocalcandidate($)})},0)}},j.prototype._createIceAndDtlsTransports=function(){var H=this,U=new h.RTCIceTransport(null);U.onicestatechange=function(){H._updateIceConnectionState(),H._updateConnectionState()};var O=new h.RTCDtlsTransport(U);return O.ondtlsstatechange=function(){H._updateConnectionState()},O.onerror=function(){Object.defineProperty(O,"state",{value:"failed",writable:!0}),H._updateConnectionState()},{iceTransport:U,dtlsTransport:O}},j.prototype._disposeIceAndDtlsTransports=function(H){var U=this.transceivers[H].iceGatherer;U&&(delete U.onlocalcandidate,delete this.transceivers[H].iceGatherer);var O=this.transceivers[H].iceTransport;O&&(delete O.onicestatechange,delete this.transceivers[H].iceTransport);var F=this.transceivers[H].dtlsTransport;F&&(delete F.ondtlsstatechange,delete F.onerror,delete this.transceivers[H].dtlsTransport)},j.prototype._transceive=function(H,U,O){var F=y(H.localCapabilities,H.remoteCapabilities);U&&H.rtpSender&&(F.encodings=H.sendEncodingParameters,F.rtcp={cname:E.localCName,compound:H.rtcpParameters.compound},H.recvEncodingParameters.length&&(F.rtcp.ssrc=H.recvEncodingParameters[0].ssrc),H.rtpSender.send(F)),O&&H.rtpReceiver&&F.codecs.length>0&&("video"===H.kind&&H.recvEncodingParameters&&A<15019&&H.recvEncodingParameters.forEach(function(k){delete k.rtx}),F.encodings=H.recvEncodingParameters.length?H.recvEncodingParameters:[{}],F.rtcp={compound:H.rtcpParameters.compound},H.rtcpParameters.cname&&(F.rtcp.cname=H.rtcpParameters.cname),H.sendEncodingParameters.length&&(F.rtcp.ssrc=H.sendEncodingParameters[0].ssrc),H.rtpReceiver.receive(F))},j.prototype.setLocalDescription=function(H){var O,F,U=this;if(-1===["offer","answer"].indexOf(H.type))return Promise.reject(i("TypeError",'Unsupported type "'+H.type+'"'));if(!b("setLocalDescription",H.type,U.signalingState)||U._isClosed)return Promise.reject(i("InvalidStateError","Can not set local "+H.type+" in state "+U.signalingState));if("offer"===H.type)O=E.splitSections(H.sdp),F=O.shift(),O.forEach(function($,ne){var te=E.parseRtpParameters($);U.transceivers[ne].localCapabilities=te}),U.transceivers.forEach(function($,ne){U._gather($.mid,ne)});else if("answer"===H.type){O=E.splitSections(U._remoteDescription.sdp),F=O.shift();var k=E.matchPrefix(F,"a=ice-lite").length>0;O.forEach(function($,ne){var te=U.transceivers[ne],Z=te.iceGatherer,se=te.iceTransport,fe=te.dtlsTransport,Se=te.localCapabilities,pe=te.remoteCapabilities;if(!(E.isRejected($)&&0===E.matchPrefix($,"a=bundle-only").length||te.rejected)){var q=E.getIceParameters($,F),J=E.getDtlsParameters($,F);k&&(J.role="server"),(!U.usingBundle||0===ne)&&(U._gather(te.mid,ne),"new"===se.state&&se.start(Z,q,k?"controlling":"controlled"),"new"===fe.state&&fe.start(J));var W=y(Se,pe);U._transceive(te,W.codecs.length>0,!1)}})}return U._localDescription={type:H.type,sdp:H.sdp},U._updateSignalingState("offer"===H.type?"have-local-offer":"stable"),Promise.resolve()},j.prototype.setRemoteDescription=function(H){var U=this;if(-1===["offer","answer"].indexOf(H.type))return Promise.reject(i("TypeError",'Unsupported type "'+H.type+'"'));if(!b("setRemoteDescription",H.type,U.signalingState)||U._isClosed)return Promise.reject(i("InvalidStateError","Can not set remote "+H.type+" in state "+U.signalingState));var O={};U.remoteStreams.forEach(function(se){O[se.id]=se});var F=[],k=E.splitSections(H.sdp),$=k.shift(),ne=E.matchPrefix($,"a=ice-lite").length>0,te=E.matchPrefix($,"a=group:BUNDLE ").length>0;U.usingBundle=te;var Z=E.matchPrefix($,"a=ice-options:")[0];return U.canTrickleIceCandidates=!!Z&&Z.substr(14).split(" ").indexOf("trickle")>=0,k.forEach(function(se,fe){var Se=E.splitLines(se),pe=E.getKind(se),we=E.isRejected(se)&&0===E.matchPrefix(se,"a=bundle-only").length,q=Se[0].substr(2).split(" ")[2],J=E.getDirection(se,$),W=E.parseMsid(se),ee=E.getMid(se)||E.generateIdentifier();if(we||"application"===pe&&("DTLS/SCTP"===q||"UDP/DTLS/SCTP"===q))U.transceivers[fe]={mid:ee,kind:pe,protocol:q,rejected:!0};else{!we&&U.transceivers[fe]&&U.transceivers[fe].rejected&&(U.transceivers[fe]=U._createTransceiver(pe,!0));var X,ae,de,Pe,ye,Le,Xe,ie,K,ge,Oe,ce=E.parseRtpParameters(se);we||(ge=E.getIceParameters(se,$),(Oe=E.getDtlsParameters(se,$)).role="client"),Xe=E.parseRtpEncodingParameters(se);var Ie=E.parseRtcpParameters(se),ht=E.matchPrefix(se,"a=end-of-candidates",$).length>0,Fe=E.matchPrefix(se,"a=candidate:").map(function(lt){return E.parseCandidate(lt)}).filter(function(lt){return 1===lt.component});if(("offer"===H.type||"answer"===H.type)&&!we&&te&&fe>0&&U.transceivers[fe]&&(U._disposeIceAndDtlsTransports(fe),U.transceivers[fe].iceGatherer=U.transceivers[0].iceGatherer,U.transceivers[fe].iceTransport=U.transceivers[0].iceTransport,U.transceivers[fe].dtlsTransport=U.transceivers[0].dtlsTransport,U.transceivers[fe].rtpSender&&U.transceivers[fe].rtpSender.setTransport(U.transceivers[0].dtlsTransport),U.transceivers[fe].rtpReceiver&&U.transceivers[fe].rtpReceiver.setTransport(U.transceivers[0].dtlsTransport)),"offer"!==H.type||we)"answer"!==H.type||we||(ae=(X=U.transceivers[fe]).iceGatherer,de=X.iceTransport,Pe=X.dtlsTransport,ye=X.rtpReceiver,Le=X.sendEncodingParameters,ie=X.localCapabilities,U.transceivers[fe].recvEncodingParameters=Xe,U.transceivers[fe].remoteCapabilities=ce,U.transceivers[fe].rtcpParameters=Ie,Fe.length&&"new"===de.state&&(!ne&&!ht||te&&0!==fe?Fe.forEach(function(lt){c(X.iceTransport,lt)}):de.setRemoteCandidates(Fe)),(!te||0===fe)&&("new"===de.state&&de.start(ae,ge,"controlling"),"new"===Pe.state&&Pe.start(Oe)),!y(X.localCapabilities,X.remoteCapabilities).codecs.filter(function(lt){return"rtx"===lt.name.toLowerCase()}).length&&X.sendEncodingParameters[0].rtx&&delete X.sendEncodingParameters[0].rtx,U._transceive(X,"sendrecv"===J||"recvonly"===J,"sendrecv"===J||"sendonly"===J),!ye||"sendrecv"!==J&&"sendonly"!==J?delete X.rtpReceiver:(K=ye.track,W?(O[W.stream]||(O[W.stream]=new h.MediaStream),P(K,O[W.stream]),F.push([K,ye,O[W.stream]])):(O.default||(O.default=new h.MediaStream),P(K,O.default),F.push([K,ye,O.default]))));else{(X=U.transceivers[fe]||U._createTransceiver(pe)).mid=ee,X.iceGatherer||(X.iceGatherer=U._createIceGatherer(fe,te)),Fe.length&&"new"===X.iceTransport.state&&(!ht||te&&0!==fe?Fe.forEach(function(lt){c(X.iceTransport,lt)}):X.iceTransport.setRemoteCandidates(Fe)),ie=h.RTCRtpReceiver.getCapabilities(pe),A<15019&&(ie.codecs=ie.codecs.filter(function(lt){return"rtx"!==lt.name})),Le=X.sendEncodingParameters||[{ssrc:1001*(2*fe+2)}];var Rt,et=!1;"sendrecv"===J||"sendonly"===J?(et=!X.rtpReceiver,ye=X.rtpReceiver||new h.RTCRtpReceiver(X.dtlsTransport,pe),et&&(K=ye.track,W&&"-"===W.stream||(W?(O[W.stream]||(O[W.stream]=new h.MediaStream,Object.defineProperty(O[W.stream],"id",{get:function(){return W.stream}})),Object.defineProperty(K,"id",{get:function(){return W.track}}),Rt=O[W.stream]):(O.default||(O.default=new h.MediaStream),Rt=O.default)),Rt&&(P(K,Rt),X.associatedRemoteMediaStreams.push(Rt)),F.push([K,ye,Rt]))):X.rtpReceiver&&X.rtpReceiver.track&&(X.associatedRemoteMediaStreams.forEach(function(lt){var Ze=lt.getTracks().find(function(yt){return yt.id===X.rtpReceiver.track.id});Ze&&function V(H,U){U.removeTrack(H),U.dispatchEvent(new h.MediaStreamTrackEvent("removetrack",{track:H}))}(Ze,lt)}),X.associatedRemoteMediaStreams=[]),X.localCapabilities=ie,X.remoteCapabilities=ce,X.rtpReceiver=ye,X.rtcpParameters=Ie,X.sendEncodingParameters=Le,X.recvEncodingParameters=Xe,U._transceive(U.transceivers[fe],!1,et)}}}),void 0===U._dtlsRole&&(U._dtlsRole="offer"===H.type?"active":"passive"),U._remoteDescription={type:H.type,sdp:H.sdp},U._updateSignalingState("offer"===H.type?"have-remote-offer":"stable"),Object.keys(O).forEach(function(se){var fe=O[se];if(fe.getTracks().length){if(-1===U.remoteStreams.indexOf(fe)){U.remoteStreams.push(fe);var Se=new Event("addstream");Se.stream=fe,h.setTimeout(function(){U._dispatchEvent("addstream",Se)})}F.forEach(function(pe){fe.id===pe[2].id&&B(U,pe[0],pe[1],[fe])})}}),F.forEach(function(se){se[2]||B(U,se[0],se[1],[])}),h.setTimeout(function(){U&&U.transceivers&&U.transceivers.forEach(function(se){se.iceTransport&&"new"===se.iceTransport.state&&se.iceTransport.getRemoteCandidates().length>0&&(console.warn("Timeout for addRemoteCandidate. Consider sending an end-of-candidates notification"),se.iceTransport.addRemoteCandidate({}))})},4e3),Promise.resolve()},j.prototype.close=function(){this.transceivers.forEach(function(H){H.iceTransport&&H.iceTransport.stop(),H.dtlsTransport&&H.dtlsTransport.stop(),H.rtpSender&&H.rtpSender.stop(),H.rtpReceiver&&H.rtpReceiver.stop()}),this._isClosed=!0,this._updateSignalingState("closed")},j.prototype._updateSignalingState=function(H){this.signalingState=H;var U=new Event("signalingstatechange");this._dispatchEvent("signalingstatechange",U)},j.prototype._maybeFireNegotiationNeeded=function(){var H=this;"stable"!==this.signalingState||!0===this.needNegotiation||(this.needNegotiation=!0,h.setTimeout(function(){if(H.needNegotiation){H.needNegotiation=!1;var U=new Event("negotiationneeded");H._dispatchEvent("negotiationneeded",U)}},0))},j.prototype._updateIceConnectionState=function(){var H,U={new:0,closed:0,checking:0,connected:0,completed:0,disconnected:0,failed:0};if(this.transceivers.forEach(function(F){F.iceTransport&&!F.rejected&&U[F.iceTransport.state]++}),H="new",U.failed>0?H="failed":U.checking>0?H="checking":U.disconnected>0?H="disconnected":U.new>0?H="new":U.connected>0?H="connected":U.completed>0&&(H="completed"),H!==this.iceConnectionState){this.iceConnectionState=H;var O=new Event("iceconnectionstatechange");this._dispatchEvent("iceconnectionstatechange",O)}},j.prototype._updateConnectionState=function(){var H,U={new:0,closed:0,connecting:0,connected:0,completed:0,disconnected:0,failed:0};if(this.transceivers.forEach(function(F){F.iceTransport&&F.dtlsTransport&&!F.rejected&&(U[F.iceTransport.state]++,U[F.dtlsTransport.state]++)}),U.connected+=U.completed,H="new",U.failed>0?H="failed":U.connecting>0?H="connecting":U.disconnected>0?H="disconnected":U.new>0?H="new":U.connected>0&&(H="connected"),H!==this.connectionState){this.connectionState=H;var O=new Event("connectionstatechange");this._dispatchEvent("connectionstatechange",O)}},j.prototype.createOffer=function(){var H=this;if(H._isClosed)return Promise.reject(i("InvalidStateError","Can not call createOffer after close"));var U=H.transceivers.filter(function(ne){return"audio"===ne.kind}).length,O=H.transceivers.filter(function(ne){return"video"===ne.kind}).length,F=arguments[0];if(F){if(F.mandatory||F.optional)throw new TypeError("Legacy mandatory/optional constraints not supported.");void 0!==F.offerToReceiveAudio&&(U=!0===F.offerToReceiveAudio?1:!1===F.offerToReceiveAudio?0:F.offerToReceiveAudio),void 0!==F.offerToReceiveVideo&&(O=!0===F.offerToReceiveVideo?1:!1===F.offerToReceiveVideo?0:F.offerToReceiveVideo)}for(H.transceivers.forEach(function(ne){"audio"===ne.kind?--U<0&&(ne.wantReceive=!1):"video"===ne.kind&&--O<0&&(ne.wantReceive=!1)});U>0||O>0;)U>0&&(H._createTransceiver("audio"),U--),O>0&&(H._createTransceiver("video"),O--);var k=E.writeSessionBoilerplate(H._sdpSessionId,H._sdpSessionVersion++);H.transceivers.forEach(function(ne,te){var Z=ne.track,se=ne.kind,fe=ne.mid||E.generateIdentifier();ne.mid=fe,ne.iceGatherer||(ne.iceGatherer=H._createIceGatherer(te,H.usingBundle));var Se=h.RTCRtpSender.getCapabilities(se);A<15019&&(Se.codecs=Se.codecs.filter(function(we){return"rtx"!==we.name})),Se.codecs.forEach(function(we){"H264"===we.name&&void 0===we.parameters["level-asymmetry-allowed"]&&(we.parameters["level-asymmetry-allowed"]="1"),ne.remoteCapabilities&&ne.remoteCapabilities.codecs&&ne.remoteCapabilities.codecs.forEach(function(q){we.name.toLowerCase()===q.name.toLowerCase()&&we.clockRate===q.clockRate&&(we.preferredPayloadType=q.payloadType)})}),Se.headerExtensions.forEach(function(we){(ne.remoteCapabilities&&ne.remoteCapabilities.headerExtensions||[]).forEach(function(J){we.uri===J.uri&&(we.id=J.id)})});var pe=ne.sendEncodingParameters||[{ssrc:1001*(2*te+1)}];Z&&A>=15019&&"video"===se&&!pe[0].rtx&&(pe[0].rtx={ssrc:pe[0].ssrc+1}),ne.wantReceive&&(ne.rtpReceiver=new h.RTCRtpReceiver(ne.dtlsTransport,se)),ne.localCapabilities=Se,ne.sendEncodingParameters=pe}),"max-compat"!==H._config.bundlePolicy&&(k+="a=group:BUNDLE "+H.transceivers.map(function(ne){return ne.mid}).join(" ")+"\r\n"),k+="a=ice-options:trickle\r\n",H.transceivers.forEach(function(ne,te){k+=x(ne,ne.localCapabilities,"offer",ne.stream,H._dtlsRole),k+="a=rtcp-rsize\r\n",ne.iceGatherer&&"new"!==H.iceGatheringState&&(0===te||!H.usingBundle)&&(ne.iceGatherer.getLocalCandidates().forEach(function(Z){Z.component=1,k+="a="+E.writeCandidate(Z)+"\r\n"}),"completed"===ne.iceGatherer.state&&(k+="a=end-of-candidates\r\n"))});var $=new h.RTCSessionDescription({type:"offer",sdp:k});return Promise.resolve($)},j.prototype.createAnswer=function(){var H=this;if(H._isClosed)return Promise.reject(i("InvalidStateError","Can not call createAnswer after close"));if("have-remote-offer"!==H.signalingState&&"have-local-pranswer"!==H.signalingState)return Promise.reject(i("InvalidStateError","Can not call createAnswer in signalingState "+H.signalingState));var U=E.writeSessionBoilerplate(H._sdpSessionId,H._sdpSessionVersion++);H.usingBundle&&(U+="a=group:BUNDLE "+H.transceivers.map(function(k){return k.mid}).join(" ")+"\r\n"),U+="a=ice-options:trickle\r\n";var O=E.getMediaSections(H._remoteDescription.sdp).length;H.transceivers.forEach(function(k,$){if(!($+1>O)){if(k.rejected)return"application"===k.kind?U+="DTLS/SCTP"===k.protocol?"m=application 0 DTLS/SCTP 5000\r\n":"m=application 0 "+k.protocol+" webrtc-datachannel\r\n":"audio"===k.kind?U+="m=audio 0 UDP/TLS/RTP/SAVPF 0\r\na=rtpmap:0 PCMU/8000\r\n":"video"===k.kind&&(U+="m=video 0 UDP/TLS/RTP/SAVPF 120\r\na=rtpmap:120 VP8/90000\r\n"),void(U+="c=IN IP4 0.0.0.0\r\na=inactive\r\na=mid:"+k.mid+"\r\n");var ne;k.stream&&("audio"===k.kind?ne=k.stream.getAudioTracks()[0]:"video"===k.kind&&(ne=k.stream.getVideoTracks()[0]),ne&&A>=15019&&"video"===k.kind&&!k.sendEncodingParameters[0].rtx&&(k.sendEncodingParameters[0].rtx={ssrc:k.sendEncodingParameters[0].ssrc+1}));var te=y(k.localCapabilities,k.remoteCapabilities);!te.codecs.filter(function(se){return"rtx"===se.name.toLowerCase()}).length&&k.sendEncodingParameters[0].rtx&&delete k.sendEncodingParameters[0].rtx,U+=x(k,te,"answer",k.stream,H._dtlsRole),k.rtcpParameters&&k.rtcpParameters.reducedSize&&(U+="a=rtcp-rsize\r\n")}});var F=new h.RTCSessionDescription({type:"answer",sdp:U});return Promise.resolve(F)},j.prototype.addIceCandidate=function(H){var O,U=this;return H&&void 0===H.sdpMLineIndex&&!H.sdpMid?Promise.reject(new TypeError("sdpMLineIndex or sdpMid required")):new Promise(function(F,k){if(!U._remoteDescription)return k(i("InvalidStateError","Can not add ICE candidate without a remote description"));if(H&&""!==H.candidate){var ne=H.sdpMLineIndex;if(H.sdpMid)for(var te=0;te0?E.parseCandidate(H.candidate):{};if("tcp"===se.protocol&&(0===se.port||9===se.port)||se.component&&1!==se.component)return F();if((0===ne||ne>0&&Z.iceTransport!==U.transceivers[0].iceTransport)&&!c(Z.iceTransport,se))return k(i("OperationError","Can not add ICE candidate"));var fe=H.candidate.trim();0===fe.indexOf("a=")&&(fe=fe.substr(2)),(O=E.getMediaSections(U._remoteDescription.sdp))[ne]+="a="+(se.type?fe:"end-of-candidates")+"\r\n",U._remoteDescription.sdp=E.getDescription(U._remoteDescription.sdp)+O.join("")}else for(var $=0;${"use strict";var _={generateIdentifier:function(){return Math.random().toString(36).substr(2,10)}};_.localCName=_.generateIdentifier(),_.splitLines=function(g){return g.trim().split("\n").map(function(E){return E.trim()})},_.splitSections=function(g){return g.split("\nm=").map(function(T,x){return(x>0?"m="+T:T).trim()+"\r\n"})},_.getDescription=function(g){var E=_.splitSections(g);return E&&E[0]},_.getMediaSections=function(g){var E=_.splitSections(g);return E.shift(),E},_.matchPrefix=function(g,E){return _.splitLines(g).filter(function(T){return 0===T.indexOf(E)})},_.parseCandidate=function(g){for(var E,T={foundation:(E=0===g.indexOf("a=candidate:")?g.substring(12).split(" "):g.substring(10).split(" "))[0],component:parseInt(E[1],10),protocol:E[2].toLowerCase(),priority:parseInt(E[3],10),ip:E[4],address:E[4],port:parseInt(E[5],10),type:E[7]},x=8;x0?E[0].split("/")[1]:"sendrecv",uri:E[1]}},_.writeExtmap=function(g){return"a=extmap:"+(g.id||g.preferredId)+(g.direction&&"sendrecv"!==g.direction?"/"+g.direction:"")+" "+g.uri+"\r\n"},_.parseFmtp=function(g){for(var T,E={},x=g.substr(g.indexOf(" ")+1).split(";"),M=0;M-1?(T.attribute=g.substr(E+1,x-E-1),T.value=g.substr(x+1)):T.attribute=g.substr(E+1),T},_.parseSsrcGroup=function(g){var E=g.substr(13).split(" ");return{semantics:E.shift(),ssrcs:E.map(function(T){return parseInt(T,10)})}},_.getMid=function(g){var E=_.matchPrefix(g,"a=mid:")[0];if(E)return E.substr(6)},_.parseFingerprint=function(g){var E=g.substr(14).split(" ");return{algorithm:E[0].toLowerCase(),value:E[1]}},_.getDtlsParameters=function(g,E){return{role:"auto",fingerprints:_.matchPrefix(g+E,"a=fingerprint:").map(_.parseFingerprint)}},_.writeDtlsParameters=function(g,E){var T="a=setup:"+E+"\r\n";return g.fingerprints.forEach(function(x){T+="a=fingerprint:"+x.algorithm+" "+x.value+"\r\n"}),T},_.parseCryptoLine=function(g){var E=g.substr(9).split(" ");return{tag:parseInt(E[0],10),cryptoSuite:E[1],keyParams:E[2],sessionParams:E.slice(3)}},_.writeCryptoLine=function(g){return"a=crypto:"+g.tag+" "+g.cryptoSuite+" "+("object"==typeof g.keyParams?_.writeCryptoKeyParams(g.keyParams):g.keyParams)+(g.sessionParams?" "+g.sessionParams.join(" "):"")+"\r\n"},_.parseCryptoKeyParams=function(g){if(0!==g.indexOf("inline:"))return null;var E=g.substr(7).split("|");return{keyMethod:"inline",keySalt:E[0],lifeTime:E[1],mkiValue:E[2]?E[2].split(":")[0]:void 0,mkiLength:E[2]?E[2].split(":")[1]:void 0}},_.writeCryptoKeyParams=function(g){return g.keyMethod+":"+g.keySalt+(g.lifeTime?"|"+g.lifeTime:"")+(g.mkiValue&&g.mkiLength?"|"+g.mkiValue+":"+g.mkiLength:"")},_.getCryptoParameters=function(g,E){return _.matchPrefix(g+E,"a=crypto:").map(_.parseCryptoLine)},_.getIceParameters=function(g,E){var T=_.matchPrefix(g+E,"a=ice-ufrag:")[0],x=_.matchPrefix(g+E,"a=ice-pwd:")[0];return T&&x?{usernameFragment:T.substr(12),password:x.substr(10)}:null},_.writeIceParameters=function(g){return"a=ice-ufrag:"+g.usernameFragment+"\r\na=ice-pwd:"+g.password+"\r\n"},_.parseRtpParameters=function(g){for(var E={codecs:[],headerExtensions:[],fecMechanisms:[],rtcp:[]},x=_.splitLines(g)[0].split(" "),M=3;M0?"9":"0",T+=" UDP/TLS/RTP/SAVPF ",T+=E.codecs.map(function(M){return void 0!==M.preferredPayloadType?M.preferredPayloadType:M.payloadType}).join(" ")+"\r\n",T+="c=IN IP4 0.0.0.0\r\n",T+="a=rtcp:9 IN IP4 0.0.0.0\r\n",E.codecs.forEach(function(M){T+=_.writeRtpMap(M),T+=_.writeFmtp(M),T+=_.writeRtcpFb(M)});var x=0;return E.codecs.forEach(function(M){M.maxptime>x&&(x=M.maxptime)}),x>0&&(T+="a=maxptime:"+x+"\r\n"),T+="a=rtcp-mux\r\n",E.headerExtensions&&E.headerExtensions.forEach(function(M){T+=_.writeExtmap(M)}),T},_.parseRtpEncodingParameters=function(g){var c,E=[],T=_.parseRtpParameters(g),x=-1!==T.fecMechanisms.indexOf("RED"),M=-1!==T.fecMechanisms.indexOf("ULPFEC"),y=_.matchPrefix(g,"a=ssrc:").map(function(A){return _.parseSsrcMedia(A)}).filter(function(A){return"cname"===A.attribute}),b=y.length>0&&y[0].ssrc,i=_.matchPrefix(g,"a=ssrc-group:FID").map(function(A){return A.substr(17).split(" ").map(function(V){return parseInt(V,10)})});i.length>0&&i[0].length>1&&i[0][0]===b&&(c=i[0][1]),T.codecs.forEach(function(A){if("RTX"===A.name.toUpperCase()&&A.parameters.apt){var P={ssrc:b,codecPayloadType:parseInt(A.parameters.apt,10)};b&&c&&(P.rtx={ssrc:c}),E.push(P),x&&((P=JSON.parse(JSON.stringify(P))).fec={ssrc:b,mechanism:M?"red+ulpfec":"red"},E.push(P))}}),0===E.length&&b&&E.push({ssrc:b});var h=_.matchPrefix(g,"b=");return h.length&&(h=0===h[0].indexOf("b=TIAS:")?parseInt(h[0].substr(7),10):0===h[0].indexOf("b=AS:")?1e3*parseInt(h[0].substr(5),10)*.95-16e3:void 0,E.forEach(function(A){A.maxBitrate=h})),E},_.parseRtcpParameters=function(g){var E={},T=_.matchPrefix(g,"a=ssrc:").map(function(y){return _.parseSsrcMedia(y)}).filter(function(y){return"cname"===y.attribute})[0];T&&(E.cname=T.value,E.ssrc=T.ssrc);var x=_.matchPrefix(g,"a=rtcp-rsize");E.reducedSize=x.length>0,E.compound=0===x.length;var M=_.matchPrefix(g,"a=rtcp-mux");return E.mux=M.length>0,E},_.parseMsid=function(g){var E,T=_.matchPrefix(g,"a=msid:");if(1===T.length)return{stream:(E=T[0].substr(7).split(" "))[0],track:E[1]};var x=_.matchPrefix(g,"a=ssrc:").map(function(M){return _.parseSsrcMedia(M)}).filter(function(M){return"msid"===M.attribute});return x.length>0?{stream:(E=x[0].value.split(" "))[0],track:E[1]}:void 0},_.parseSctpDescription=function(g){var x,E=_.parseMLine(g),T=_.matchPrefix(g,"a=max-message-size:");T.length>0&&(x=parseInt(T[0].substr(19),10)),isNaN(x)&&(x=65536);var M=_.matchPrefix(g,"a=sctp-port:");if(M.length>0)return{port:parseInt(M[0].substr(12),10),protocol:E.fmt,maxMessageSize:x};if(_.matchPrefix(g,"a=sctpmap:").length>0){var b=_.matchPrefix(g,"a=sctpmap:")[0].substr(10).split(" ");return{port:parseInt(b[0],10),protocol:b[1],maxMessageSize:x}}},_.writeSctpDescription=function(g,E){var T=[];return T="DTLS/SCTP"!==g.protocol?["m="+g.kind+" 9 "+g.protocol+" "+E.protocol+"\r\n","c=IN IP4 0.0.0.0\r\n","a=sctp-port:"+E.port+"\r\n"]:["m="+g.kind+" 9 "+g.protocol+" "+E.port+"\r\n","c=IN IP4 0.0.0.0\r\n","a=sctpmap:"+E.port+" "+E.protocol+" 65535\r\n"],void 0!==E.maxMessageSize&&T.push("a=max-message-size:"+E.maxMessageSize+"\r\n"),T.join("")},_.generateSessionId=function(){return Math.random().toString().substr(2,21)},_.writeSessionBoilerplate=function(g,E,T){var M=void 0!==E?E:2;return"v=0\r\no="+(T||"thisisadapterortc")+" "+(g||_.generateSessionId())+" "+M+" IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\n"},_.writeMediaSection=function(g,E,T,x){var M=_.writeRtpDescription(g.kind,E);if(M+=_.writeIceParameters(g.iceGatherer.getLocalParameters()),M+=_.writeDtlsParameters(g.dtlsTransport.getLocalParameters(),"offer"===T?"actpass":"active"),M+="a=mid:"+g.mid+"\r\n",M+=g.direction?"a="+g.direction+"\r\n":g.rtpSender&&g.rtpReceiver?"a=sendrecv\r\n":g.rtpSender?"a=sendonly\r\n":g.rtpReceiver?"a=recvonly\r\n":"a=inactive\r\n",g.rtpSender){var y="msid:"+x.id+" "+g.rtpSender.track.id+"\r\n";M+="a="+y,M+="a=ssrc:"+g.sendEncodingParameters[0].ssrc+" "+y,g.sendEncodingParameters[0].rtx&&(M+="a=ssrc:"+g.sendEncodingParameters[0].rtx.ssrc+" "+y,M+="a=ssrc-group:FID "+g.sendEncodingParameters[0].ssrc+" "+g.sendEncodingParameters[0].rtx.ssrc+"\r\n")}return M+="a=ssrc:"+g.sendEncodingParameters[0].ssrc+" cname:"+_.localCName+"\r\n",g.rtpSender&&g.sendEncodingParameters[0].rtx&&(M+="a=ssrc:"+g.sendEncodingParameters[0].rtx.ssrc+" cname:"+_.localCName+"\r\n"),M},_.getDirection=function(g,E){for(var T=_.splitLines(g),x=0;x{var _=v&&v.__esModule?()=>v.default:()=>v;return r.d(_,{a:_}),_},r.d=(v,_)=>{for(var g in _)r.o(_,g)&&!r.o(v,g)&&Object.defineProperty(v,g,{enumerable:!0,get:_[g]})},r.o=(v,_)=>Object.prototype.hasOwnProperty.call(v,_),r.r=v=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(v,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(v,"__esModule",{value:!0})};var s={};(()=>{"use strict";r.r(s),r.d(s,{BooleanType:()=>Ut,CHANGELIST:()=>Bi,CLIENT_IDENTIFICATION:()=>Xt,CLIENT_VERSION:()=>Ln,ConfigureNetworkTestSettings:()=>bt,DEFAULT_PORT:()=>Jn,DefaultHttpRequestOptions:()=>ki,EventName:()=>Pn,GdprLevel:()=>Yt,GetRandNumericString:()=>Ve,IsChrome:()=>Ct,IsChromium:()=>Je,IsSafari:()=>cn,IsTouchDevice:()=>ke,IsValidIPv4:()=>tt,NetworkTestApp:()=>Vt,NetworkTestSettings:()=>De,UNDEFINED_SESSION_ID:()=>Ci,getAppUserAgent:()=>Qt,getBrowser:()=>an,getHttpNtErrorCode:()=>Dt,getNetworkTestExceptionTelemetryEvent:()=>Ye,getNetworkTestHttpTelemetryEvent:()=>Nt,getNewGuid:()=>mt,getPlatform:()=>ln,isChromeVersionAtLeast:()=>ot,isSafariVersionAtLeast:()=>bn,isSafariWebKitVersionAtLeast:()=>Rn,performHttpRequest:()=>Hn});var v={};r.r(v),r.d(v,{fixNegotiationNeeded:()=>fe,shimAddTrackRemoveTrack:()=>Z,shimAddTrackRemoveTrackWithNative:()=>te,shimGetDisplayMedia:()=>U,shimGetSendersWithDtmf:()=>k,shimGetStats:()=>$,shimGetUserMedia:()=>H,shimMediaStream:()=>O,shimOnTrack:()=>F,shimPeerConnection:()=>se,shimSenderReceiverGetStats:()=>ne});var _={};r.r(_),r.d(_,{shimGetDisplayMedia:()=>J,shimGetUserMedia:()=>q,shimPeerConnection:()=>W,shimReplaceTrack:()=>ee});var g={};r.r(g),r.d(g,{shimAddTransceiver:()=>K,shimCreateAnswer:()=>Oe,shimCreateOffer:()=>ge,shimGetDisplayMedia:()=>ae,shimGetParameters:()=>ce,shimGetUserMedia:()=>X,shimOnTrack:()=>de,shimPeerConnection:()=>Pe,shimRTCDataChannel:()=>ie,shimReceiverGetStats:()=>Le,shimRemoveStream:()=>Xe,shimSenderGetStats:()=>ye});var E={};r.r(E),r.d(E,{shimAudioContext:()=>Ze,shimCallbacksAPI:()=>Fe,shimConstraints:()=>Rt,shimCreateOfferLegacy:()=>lt,shimGetUserMedia:()=>et,shimLocalStreamsAPI:()=>Ie,shimRTCIceServerUrls:()=>_t,shimRemoteStreamsAPI:()=>ht,shimTrackEventTransceiver:()=>Ae});var T={};r.r(T),r.d(T,{removeAllowExtmapMixed:()=>dn,shimConnectionState:()=>zt,shimMaxMessageSize:()=>Wt,shimRTCIceCandidate:()=>kn,shimSendThrowTypeError:()=>rn});let x=!0,M=!0;function y(st,En,In){const it=st.match(En);return it&&it.length>=In&&parseInt(it[In],10)}function b(st,En,In){if(!st.RTCPeerConnection)return;const it=st.RTCPeerConnection.prototype,Lt=it.addEventListener;it.addEventListener=function(gn,Tn){if(gn!==En)return Lt.apply(this,arguments);const ft=Pt=>{const on=In(Pt);on&&(Tn.handleEvent?Tn.handleEvent(on):Tn(on))};return this._eventMap=this._eventMap||{},this._eventMap[En]||(this._eventMap[En]=new Map),this._eventMap[En].set(Tn,ft),Lt.apply(this,[gn,ft])};const $t=it.removeEventListener;it.removeEventListener=function(gn,Tn){if(gn!==En||!this._eventMap||!this._eventMap[En])return $t.apply(this,arguments);if(!this._eventMap[En].has(Tn))return $t.apply(this,arguments);const ft=this._eventMap[En].get(Tn);return this._eventMap[En].delete(Tn),0===this._eventMap[En].size&&delete this._eventMap[En],0===Object.keys(this._eventMap).length&&delete this._eventMap,$t.apply(this,[gn,ft])},Object.defineProperty(it,"on"+En,{get(){return this["_on"+En]},set(gn){this["_on"+En]&&(this.removeEventListener(En,this["_on"+En]),delete this["_on"+En]),gn&&this.addEventListener(En,this["_on"+En]=gn)},enumerable:!0,configurable:!0})}function c(st){return"boolean"!=typeof st?new Error("Argument type: "+typeof st+". Please use a boolean."):(x=st,st?"adapter.js logging disabled":"adapter.js logging enabled")}function i(st){return"boolean"!=typeof st?new Error("Argument type: "+typeof st+". Please use a boolean."):(M=!st,"adapter.js deprecation warnings "+(st?"disabled":"enabled"))}function h(){if("object"==typeof window){if(x)return;typeof console<"u"&&"function"==typeof console.log&&console.log.apply(console,arguments)}}function A(st,En){M&&console.warn(st+" is deprecated, please use "+En+" instead.")}function P(st){const{navigator:En}=st,In={browser:null,version:null};if(typeof st>"u"||!st.navigator)return In.browser="Not a browser.",In;if(En.mozGetUserMedia)In.browser="firefox",In.version=y(En.userAgent,/Firefox\/(\d+)\./,1);else if(En.webkitGetUserMedia||!1===st.isSecureContext&&st.webkitRTCPeerConnection&&!st.RTCIceGatherer)In.browser="chrome",In.version=y(En.userAgent,/Chrom(e|ium)\/(\d+)\./,2);else if(En.mediaDevices&&En.userAgent.match(/Edge\/(\d+).(\d+)$/))In.browser="edge",In.version=y(En.userAgent,/Edge\/(\d+).(\d+)$/,2);else{if(!st.RTCPeerConnection||!En.userAgent.match(/AppleWebKit\/(\d+)\./))return In.browser="Not a supported browser.",In;In.browser="safari",In.version=y(En.userAgent,/AppleWebKit\/(\d+)\./,1),In.supportsUnifiedPlan=st.RTCRtpTransceiver&&"currentDirection"in st.RTCRtpTransceiver.prototype}return In}function V(st){return"[object Object]"===Object.prototype.toString.call(st)}function B(st){return V(st)?Object.keys(st).reduce(function(En,In){const it=V(st[In]),Lt=it?B(st[In]):st[In],$t=it&&!Object.keys(Lt).length;return void 0===Lt||$t?En:Object.assign(En,{[In]:Lt})},{}):st}function j(st,En,In){!En||In.has(En.id)||(In.set(En.id,En),Object.keys(En).forEach(it=>{it.endsWith("Id")?j(st,st.get(En[it]),In):it.endsWith("Ids")&&En[it].forEach(Lt=>{j(st,st.get(Lt),In)})}))}function re(st,En,In){const it=In?"outbound-rtp":"inbound-rtp",Lt=new Map;if(null===En)return Lt;const $t=[];return st.forEach(gn=>{"track"===gn.type&&gn.trackIdentifier===En.id&&$t.push(gn)}),$t.forEach(gn=>{st.forEach(Tn=>{Tn.type===it&&Tn.trackId===gn.id&&j(st,Tn,Lt)})}),Lt}const z=h;function H(st){const En=st&&st.navigator;if(!En.mediaDevices)return;const In=P(st),it=function(Tn){if("object"!=typeof Tn||Tn.mandatory||Tn.optional)return Tn;const ft={};return Object.keys(Tn).forEach(Pt=>{if("require"===Pt||"advanced"===Pt||"mediaSource"===Pt)return;const on="object"==typeof Tn[Pt]?Tn[Pt]:{ideal:Tn[Pt]};void 0!==on.exact&&"number"==typeof on.exact&&(on.min=on.max=on.exact);const Zt=function(Sn,$n){return Sn?Sn+$n.charAt(0).toUpperCase()+$n.slice(1):"deviceId"===$n?"sourceId":$n};if(void 0!==on.ideal){ft.optional=ft.optional||[];let Sn={};"number"==typeof on.ideal?(Sn[Zt("min",Pt)]=on.ideal,ft.optional.push(Sn),Sn={},Sn[Zt("max",Pt)]=on.ideal,ft.optional.push(Sn)):(Sn[Zt("",Pt)]=on.ideal,ft.optional.push(Sn))}void 0!==on.exact&&"number"!=typeof on.exact?(ft.mandatory=ft.mandatory||{},ft.mandatory[Zt("",Pt)]=on.exact):["min","max"].forEach(Sn=>{void 0!==on[Sn]&&(ft.mandatory=ft.mandatory||{},ft.mandatory[Zt(Sn,Pt)]=on[Sn])})}),Tn.advanced&&(ft.optional=(ft.optional||[]).concat(Tn.advanced)),ft},Lt=function(Tn,ft){if(In.version>=61)return ft(Tn);if((Tn=JSON.parse(JSON.stringify(Tn)))&&"object"==typeof Tn.audio){const Pt=function(on,Zt,Sn){Zt in on&&!(Sn in on)&&(on[Sn]=on[Zt],delete on[Zt])};Pt((Tn=JSON.parse(JSON.stringify(Tn))).audio,"autoGainControl","googAutoGainControl"),Pt(Tn.audio,"noiseSuppression","googNoiseSuppression"),Tn.audio=it(Tn.audio)}if(Tn&&"object"==typeof Tn.video){let Pt=Tn.video.facingMode;Pt=Pt&&("object"==typeof Pt?Pt:{ideal:Pt});const on=In.version<66;if(Pt&&("user"===Pt.exact||"environment"===Pt.exact||"user"===Pt.ideal||"environment"===Pt.ideal)&&(!En.mediaDevices.getSupportedConstraints||!En.mediaDevices.getSupportedConstraints().facingMode||on)){let Zt;if(delete Tn.video.facingMode,"environment"===Pt.exact||"environment"===Pt.ideal?Zt=["back","rear"]:("user"===Pt.exact||"user"===Pt.ideal)&&(Zt=["front"]),Zt)return En.mediaDevices.enumerateDevices().then(Sn=>{let $n=(Sn=Sn.filter(Zn=>"videoinput"===Zn.kind)).find(Zn=>Zt.some(ii=>Zn.label.toLowerCase().includes(ii)));return!$n&&Sn.length&&Zt.includes("back")&&($n=Sn[Sn.length-1]),$n&&(Tn.video.deviceId=Pt.exact?{exact:$n.deviceId}:{ideal:$n.deviceId}),Tn.video=it(Tn.video),z("chrome: "+JSON.stringify(Tn)),ft(Tn)})}Tn.video=it(Tn.video)}return z("chrome: "+JSON.stringify(Tn)),ft(Tn)},$t=function(Tn){return In.version>=64?Tn:{name:{PermissionDeniedError:"NotAllowedError",PermissionDismissedError:"NotAllowedError",InvalidStateError:"NotAllowedError",DevicesNotFoundError:"NotFoundError",ConstraintNotSatisfiedError:"OverconstrainedError",TrackStartError:"NotReadableError",MediaDeviceFailedDueToShutdown:"NotAllowedError",MediaDeviceKillSwitchOn:"NotAllowedError",TabCaptureError:"AbortError",ScreenCaptureError:"AbortError",DeviceCaptureError:"AbortError"}[Tn.name]||Tn.name,message:Tn.message,constraint:Tn.constraint||Tn.constraintName,toString(){return this.name+(this.message&&": ")+this.message}}};if(En.getUserMedia=function(Tn,ft,Pt){Lt(Tn,on=>{En.webkitGetUserMedia(on,ft,Zt=>{Pt&&Pt($t(Zt))})})}.bind(En),En.mediaDevices.getUserMedia){const Tn=En.mediaDevices.getUserMedia.bind(En.mediaDevices);En.mediaDevices.getUserMedia=function(ft){return Lt(ft,Pt=>Tn(Pt).then(on=>{if(Pt.audio&&!on.getAudioTracks().length||Pt.video&&!on.getVideoTracks().length)throw on.getTracks().forEach(Zt=>{Zt.stop()}),new DOMException("","NotFoundError");return on},on=>Promise.reject($t(on))))}}}function U(st,En){if((!st.navigator.mediaDevices||!("getDisplayMedia"in st.navigator.mediaDevices))&&st.navigator.mediaDevices){if("function"!=typeof En)return void console.error("shimGetDisplayMedia: getSourceId argument is not a function");st.navigator.mediaDevices.getDisplayMedia=function(it){return En(it).then(Lt=>{const $t=it.video&&it.video.width,gn=it.video&&it.video.height;return it.video={mandatory:{chromeMediaSource:"desktop",chromeMediaSourceId:Lt,maxFrameRate:it.video&&it.video.frameRate||3}},$t&&(it.video.mandatory.maxWidth=$t),gn&&(it.video.mandatory.maxHeight=gn),st.navigator.mediaDevices.getUserMedia(it)})}}}function O(st){st.MediaStream=st.MediaStream||st.webkitMediaStream}function F(st){if("object"==typeof st&&st.RTCPeerConnection&&!("ontrack"in st.RTCPeerConnection.prototype)){Object.defineProperty(st.RTCPeerConnection.prototype,"ontrack",{get(){return this._ontrack},set(In){this._ontrack&&this.removeEventListener("track",this._ontrack),this.addEventListener("track",this._ontrack=In)},enumerable:!0,configurable:!0});const En=st.RTCPeerConnection.prototype.setRemoteDescription;st.RTCPeerConnection.prototype.setRemoteDescription=function(){return this._ontrackpoly||(this._ontrackpoly=it=>{it.stream.addEventListener("addtrack",Lt=>{let $t;$t=st.RTCPeerConnection.prototype.getReceivers?this.getReceivers().find(Tn=>Tn.track&&Tn.track.id===Lt.track.id):{track:Lt.track};const gn=new Event("track");gn.track=Lt.track,gn.receiver=$t,gn.transceiver={receiver:$t},gn.streams=[it.stream],this.dispatchEvent(gn)}),it.stream.getTracks().forEach(Lt=>{let $t;$t=st.RTCPeerConnection.prototype.getReceivers?this.getReceivers().find(Tn=>Tn.track&&Tn.track.id===Lt.id):{track:Lt};const gn=new Event("track");gn.track=Lt,gn.receiver=$t,gn.transceiver={receiver:$t},gn.streams=[it.stream],this.dispatchEvent(gn)})},this.addEventListener("addstream",this._ontrackpoly)),En.apply(this,arguments)}}else b(st,"track",En=>(En.transceiver||Object.defineProperty(En,"transceiver",{value:{receiver:En.receiver}}),En))}function k(st){if("object"==typeof st&&st.RTCPeerConnection&&!("getSenders"in st.RTCPeerConnection.prototype)&&"createDTMFSender"in st.RTCPeerConnection.prototype){const En=function(Lt,$t){return{track:$t,get dtmf(){return void 0===this._dtmf&&(this._dtmf="audio"===$t.kind?Lt.createDTMFSender($t):null),this._dtmf},_pc:Lt}};if(!st.RTCPeerConnection.prototype.getSenders){st.RTCPeerConnection.prototype.getSenders=function(){return this._senders=this._senders||[],this._senders.slice()};const Lt=st.RTCPeerConnection.prototype.addTrack;st.RTCPeerConnection.prototype.addTrack=function(Tn,ft){let Pt=Lt.apply(this,arguments);return Pt||(Pt=En(this,Tn),this._senders.push(Pt)),Pt};const $t=st.RTCPeerConnection.prototype.removeTrack;st.RTCPeerConnection.prototype.removeTrack=function(Tn){$t.apply(this,arguments);const ft=this._senders.indexOf(Tn);-1!==ft&&this._senders.splice(ft,1)}}const In=st.RTCPeerConnection.prototype.addStream;st.RTCPeerConnection.prototype.addStream=function($t){this._senders=this._senders||[],In.apply(this,[$t]),$t.getTracks().forEach(gn=>{this._senders.push(En(this,gn))})};const it=st.RTCPeerConnection.prototype.removeStream;st.RTCPeerConnection.prototype.removeStream=function($t){this._senders=this._senders||[],it.apply(this,[$t]),$t.getTracks().forEach(gn=>{const Tn=this._senders.find(ft=>ft.track===gn);Tn&&this._senders.splice(this._senders.indexOf(Tn),1)})}}else if("object"==typeof st&&st.RTCPeerConnection&&"getSenders"in st.RTCPeerConnection.prototype&&"createDTMFSender"in st.RTCPeerConnection.prototype&&st.RTCRtpSender&&!("dtmf"in st.RTCRtpSender.prototype)){const En=st.RTCPeerConnection.prototype.getSenders;st.RTCPeerConnection.prototype.getSenders=function(){const it=En.apply(this,[]);return it.forEach(Lt=>Lt._pc=this),it},Object.defineProperty(st.RTCRtpSender.prototype,"dtmf",{get(){return void 0===this._dtmf&&(this._dtmf="audio"===this.track.kind?this._pc.createDTMFSender(this.track):null),this._dtmf}})}}function $(st){if(!st.RTCPeerConnection)return;const En=st.RTCPeerConnection.prototype.getStats;st.RTCPeerConnection.prototype.getStats=function(){const[it,Lt,$t]=arguments;if(arguments.length>0&&"function"==typeof it)return En.apply(this,arguments);if(0===En.length&&(0===arguments.length||"function"!=typeof it))return En.apply(this,[]);const gn=function(ft){const Pt={};return ft.result().forEach(Zt=>{const Sn={id:Zt.id,timestamp:Zt.timestamp,type:{localcandidate:"local-candidate",remotecandidate:"remote-candidate"}[Zt.type]||Zt.type};Zt.names().forEach($n=>{Sn[$n]=Zt.stat($n)}),Pt[Sn.id]=Sn}),Pt},Tn=function(ft){return new Map(Object.keys(ft).map(Pt=>[Pt,ft[Pt]]))};return arguments.length>=2?En.apply(this,[function(Pt){Lt(Tn(gn(Pt)))},it]):new Promise((ft,Pt)=>{En.apply(this,[function(on){ft(Tn(gn(on)))},Pt])}).then(Lt,$t)}}function ne(st){if(!("object"==typeof st&&st.RTCPeerConnection&&st.RTCRtpSender&&st.RTCRtpReceiver))return;if(!("getStats"in st.RTCRtpSender.prototype)){const In=st.RTCPeerConnection.prototype.getSenders;In&&(st.RTCPeerConnection.prototype.getSenders=function(){const $t=In.apply(this,[]);return $t.forEach(gn=>gn._pc=this),$t});const it=st.RTCPeerConnection.prototype.addTrack;it&&(st.RTCPeerConnection.prototype.addTrack=function(){const $t=it.apply(this,arguments);return $t._pc=this,$t}),st.RTCRtpSender.prototype.getStats=function(){const $t=this;return this._pc.getStats().then(gn=>re(gn,$t.track,!0))}}if(!("getStats"in st.RTCRtpReceiver.prototype)){const In=st.RTCPeerConnection.prototype.getReceivers;In&&(st.RTCPeerConnection.prototype.getReceivers=function(){const Lt=In.apply(this,[]);return Lt.forEach($t=>$t._pc=this),Lt}),b(st,"track",it=>(it.receiver._pc=it.srcElement,it)),st.RTCRtpReceiver.prototype.getStats=function(){const Lt=this;return this._pc.getStats().then($t=>re($t,Lt.track,!1))}}if(!("getStats"in st.RTCRtpSender.prototype)||!("getStats"in st.RTCRtpReceiver.prototype))return;const En=st.RTCPeerConnection.prototype.getStats;st.RTCPeerConnection.prototype.getStats=function(){if(arguments.length>0&&arguments[0]instanceof st.MediaStreamTrack){const it=arguments[0];let Lt,$t,gn;return this.getSenders().forEach(Tn=>{Tn.track===it&&(Lt?gn=!0:Lt=Tn)}),this.getReceivers().forEach(Tn=>(Tn.track===it&&($t?gn=!0:$t=Tn),Tn.track===it)),gn||Lt&&$t?Promise.reject(new DOMException("There are more than one sender or receiver for the track.","InvalidAccessError")):Lt?Lt.getStats():$t?$t.getStats():Promise.reject(new DOMException("There is no sender or receiver for the track.","InvalidAccessError"))}return En.apply(this,arguments)}}function te(st){st.RTCPeerConnection.prototype.getLocalStreams=function(){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},Object.keys(this._shimmedLocalStreams).map(gn=>this._shimmedLocalStreams[gn][0])};const En=st.RTCPeerConnection.prototype.addTrack;st.RTCPeerConnection.prototype.addTrack=function(gn,Tn){if(!Tn)return En.apply(this,arguments);this._shimmedLocalStreams=this._shimmedLocalStreams||{};const ft=En.apply(this,arguments);return this._shimmedLocalStreams[Tn.id]?-1===this._shimmedLocalStreams[Tn.id].indexOf(ft)&&this._shimmedLocalStreams[Tn.id].push(ft):this._shimmedLocalStreams[Tn.id]=[Tn,ft],ft};const In=st.RTCPeerConnection.prototype.addStream;st.RTCPeerConnection.prototype.addStream=function(gn){this._shimmedLocalStreams=this._shimmedLocalStreams||{},gn.getTracks().forEach(Pt=>{if(this.getSenders().find(Zt=>Zt.track===Pt))throw new DOMException("Track already exists.","InvalidAccessError")});const Tn=this.getSenders();In.apply(this,arguments);const ft=this.getSenders().filter(Pt=>-1===Tn.indexOf(Pt));this._shimmedLocalStreams[gn.id]=[gn].concat(ft)};const it=st.RTCPeerConnection.prototype.removeStream;st.RTCPeerConnection.prototype.removeStream=function(gn){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},delete this._shimmedLocalStreams[gn.id],it.apply(this,arguments)};const Lt=st.RTCPeerConnection.prototype.removeTrack;st.RTCPeerConnection.prototype.removeTrack=function(gn){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},gn&&Object.keys(this._shimmedLocalStreams).forEach(Tn=>{const ft=this._shimmedLocalStreams[Tn].indexOf(gn);-1!==ft&&this._shimmedLocalStreams[Tn].splice(ft,1),1===this._shimmedLocalStreams[Tn].length&&delete this._shimmedLocalStreams[Tn]}),Lt.apply(this,arguments)}}function Z(st){if(!st.RTCPeerConnection)return;const En=P(st);if(st.RTCPeerConnection.prototype.addTrack&&En.version>=65)return te(st);const In=st.RTCPeerConnection.prototype.getLocalStreams;st.RTCPeerConnection.prototype.getLocalStreams=function(){const on=In.apply(this);return this._reverseStreams=this._reverseStreams||{},on.map(Zt=>this._reverseStreams[Zt.id])};const it=st.RTCPeerConnection.prototype.addStream;st.RTCPeerConnection.prototype.addStream=function(on){if(this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{},on.getTracks().forEach(Zt=>{if(this.getSenders().find($n=>$n.track===Zt))throw new DOMException("Track already exists.","InvalidAccessError")}),!this._reverseStreams[on.id]){const Zt=new st.MediaStream(on.getTracks());this._streams[on.id]=Zt,this._reverseStreams[Zt.id]=on,on=Zt}it.apply(this,[on])};const Lt=st.RTCPeerConnection.prototype.removeStream;function $t(Pt,on){let Zt=on.sdp;return Object.keys(Pt._reverseStreams||[]).forEach(Sn=>{const $n=Pt._reverseStreams[Sn];Zt=Zt.replace(new RegExp(Pt._streams[$n.id].id,"g"),$n.id)}),new RTCSessionDescription({type:on.type,sdp:Zt})}st.RTCPeerConnection.prototype.removeStream=function(on){this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{},Lt.apply(this,[this._streams[on.id]||on]),delete this._reverseStreams[this._streams[on.id]?this._streams[on.id].id:on.id],delete this._streams[on.id]},st.RTCPeerConnection.prototype.addTrack=function(on,Zt){if("closed"===this.signalingState)throw new DOMException("The RTCPeerConnection's signalingState is 'closed'.","InvalidStateError");const Sn=[].slice.call(arguments,1);if(1!==Sn.length||!Sn[0].getTracks().find(ii=>ii===on))throw new DOMException("The adapter.js addTrack polyfill only supports a single stream which is associated with the specified track.","NotSupportedError");if(this.getSenders().find(ii=>ii.track===on))throw new DOMException("Track already exists.","InvalidAccessError");this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{};const Zn=this._streams[Zt.id];if(Zn)Zn.addTrack(on),Promise.resolve().then(()=>{this.dispatchEvent(new Event("negotiationneeded"))});else{const ii=new st.MediaStream([on]);this._streams[Zt.id]=ii,this._reverseStreams[ii.id]=Zt,this.addStream(ii)}return this.getSenders().find(ii=>ii.track===on)},["createOffer","createAnswer"].forEach(function(Pt){const on=st.RTCPeerConnection.prototype[Pt],Zt={[Pt](){const Sn=arguments;return arguments.length&&"function"==typeof arguments[0]?on.apply(this,[Zn=>{const ii=$t(this,Zn);Sn[0].apply(null,[ii])},Zn=>{Sn[1]&&Sn[1].apply(null,Zn)},arguments[2]]):on.apply(this,arguments).then(Zn=>$t(this,Zn))}};st.RTCPeerConnection.prototype[Pt]=Zt[Pt]});const Tn=st.RTCPeerConnection.prototype.setLocalDescription;st.RTCPeerConnection.prototype.setLocalDescription=function(){return arguments.length&&arguments[0].type?(arguments[0]=function gn(Pt,on){let Zt=on.sdp;return Object.keys(Pt._reverseStreams||[]).forEach(Sn=>{const $n=Pt._reverseStreams[Sn],Zn=Pt._streams[$n.id];Zt=Zt.replace(new RegExp($n.id,"g"),Zn.id)}),new RTCSessionDescription({type:on.type,sdp:Zt})}(this,arguments[0]),Tn.apply(this,arguments)):Tn.apply(this,arguments)};const ft=Object.getOwnPropertyDescriptor(st.RTCPeerConnection.prototype,"localDescription");Object.defineProperty(st.RTCPeerConnection.prototype,"localDescription",{get(){const Pt=ft.get.apply(this);return""===Pt.type?Pt:$t(this,Pt)}}),st.RTCPeerConnection.prototype.removeTrack=function(on){if("closed"===this.signalingState)throw new DOMException("The RTCPeerConnection's signalingState is 'closed'.","InvalidStateError");if(!on._pc)throw new DOMException("Argument 1 of RTCPeerConnection.removeTrack does not implement interface RTCRtpSender.","TypeError");if(on._pc!==this)throw new DOMException("Sender was not created by this connection.","InvalidAccessError");let Sn;this._streams=this._streams||{},Object.keys(this._streams).forEach($n=>{this._streams[$n].getTracks().find(ii=>on.track===ii)&&(Sn=this._streams[$n])}),Sn&&(1===Sn.getTracks().length?this.removeStream(this._reverseStreams[Sn.id]):Sn.removeTrack(on.track),this.dispatchEvent(new Event("negotiationneeded")))}}function se(st){const En=P(st);if(!st.RTCPeerConnection&&st.webkitRTCPeerConnection&&(st.RTCPeerConnection=st.webkitRTCPeerConnection),!st.RTCPeerConnection)return;const In=0===st.RTCPeerConnection.prototype.addIceCandidate.length;En.version<53&&["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach(function(Lt){const $t=st.RTCPeerConnection.prototype[Lt],gn={[Lt](){return arguments[0]=new("addIceCandidate"===Lt?st.RTCIceCandidate:st.RTCSessionDescription)(arguments[0]),$t.apply(this,arguments)}};st.RTCPeerConnection.prototype[Lt]=gn[Lt]});const it=st.RTCPeerConnection.prototype.addIceCandidate;st.RTCPeerConnection.prototype.addIceCandidate=function(){return In||arguments[0]?En.version<78&&arguments[0]&&""===arguments[0].candidate?Promise.resolve():it.apply(this,arguments):(arguments[1]&&arguments[1].apply(null),Promise.resolve())}}function fe(st){const En=P(st);b(st,"negotiationneeded",In=>{const it=In.target;if(!(En.version<72||it.getConfiguration&&"plan-b"===it.getConfiguration().sdpSemantics)||"stable"===it.signalingState)return In})}var pe=r(134),we=r.n(pe);function q(st){const En=st&&st.navigator,it=En.mediaDevices.getUserMedia.bind(En.mediaDevices);En.mediaDevices.getUserMedia=function(Lt){return it(Lt).catch($t=>Promise.reject(function(Lt){return{name:{PermissionDeniedError:"NotAllowedError"}[Lt.name]||Lt.name,message:Lt.message,constraint:Lt.constraint,toString(){return this.name}}}($t)))}}function J(st){"getDisplayMedia"in st.navigator&&st.navigator.mediaDevices&&(st.navigator.mediaDevices&&"getDisplayMedia"in st.navigator.mediaDevices||(st.navigator.mediaDevices.getDisplayMedia=st.navigator.getDisplayMedia.bind(st.navigator)))}function W(st){const En=P(st);if(st.RTCIceGatherer&&(st.RTCIceCandidate||(st.RTCIceCandidate=function(Lt){return Lt}),st.RTCSessionDescription||(st.RTCSessionDescription=function(Lt){return Lt}),En.version<15025)){const it=Object.getOwnPropertyDescriptor(st.MediaStreamTrack.prototype,"enabled");Object.defineProperty(st.MediaStreamTrack.prototype,"enabled",{set(Lt){it.set.call(this,Lt);const $t=new Event("enabled");$t.enabled=Lt,this.dispatchEvent($t)}})}st.RTCRtpSender&&!("dtmf"in st.RTCRtpSender.prototype)&&Object.defineProperty(st.RTCRtpSender.prototype,"dtmf",{get(){return void 0===this._dtmf&&("audio"===this.track.kind?this._dtmf=new st.RTCDtmfSender(this):"video"===this.track.kind&&(this._dtmf=null)),this._dtmf}}),st.RTCDtmfSender&&!st.RTCDTMFSender&&(st.RTCDTMFSender=st.RTCDtmfSender);const In=we()(st,En.version);st.RTCPeerConnection=function(Lt){return Lt&&Lt.iceServers&&(Lt.iceServers=function Se(st,En){let In=!1;return(st=JSON.parse(JSON.stringify(st))).filter(it=>{if(it&&(it.urls||it.url)){var Lt=it.urls||it.url;it.url&&!it.urls&&A("RTCIceServer.url","RTCIceServer.urls");const $t="string"==typeof Lt;return $t&&(Lt=[Lt]),Lt=Lt.filter(gn=>{if(0===gn.indexOf("stun:"))return!1;const Tn=gn.startsWith("turn")&&!gn.startsWith("turn:[")&&gn.includes("transport=udp");return Tn&&!In?(In=!0,!0):Tn&&!In}),delete it.url,it.urls=$t?Lt[0]:Lt,!!Lt.length}})}(Lt.iceServers),h("ICE servers after filtering:",Lt.iceServers)),new In(Lt)},st.RTCPeerConnection.prototype=In.prototype}function ee(st){st.RTCRtpSender&&!("replaceTrack"in st.RTCRtpSender.prototype)&&(st.RTCRtpSender.prototype.replaceTrack=st.RTCRtpSender.prototype.setTrack)}function X(st){const En=P(st),In=st&&st.navigator,it=st&&st.MediaStreamTrack;if(In.getUserMedia=function(Lt,$t,gn){A("navigator.getUserMedia","navigator.mediaDevices.getUserMedia"),In.mediaDevices.getUserMedia(Lt).then($t,gn)},!(En.version>55&&"autoGainControl"in In.mediaDevices.getSupportedConstraints())){const Lt=function(gn,Tn,ft){Tn in gn&&!(ft in gn)&&(gn[ft]=gn[Tn],delete gn[Tn])},$t=In.mediaDevices.getUserMedia.bind(In.mediaDevices);if(In.mediaDevices.getUserMedia=function(gn){return"object"==typeof gn&&"object"==typeof gn.audio&&(gn=JSON.parse(JSON.stringify(gn)),Lt(gn.audio,"autoGainControl","mozAutoGainControl"),Lt(gn.audio,"noiseSuppression","mozNoiseSuppression")),$t(gn)},it&&it.prototype.getSettings){const gn=it.prototype.getSettings;it.prototype.getSettings=function(){const Tn=gn.apply(this,arguments);return Lt(Tn,"mozAutoGainControl","autoGainControl"),Lt(Tn,"mozNoiseSuppression","noiseSuppression"),Tn}}if(it&&it.prototype.applyConstraints){const gn=it.prototype.applyConstraints;it.prototype.applyConstraints=function(Tn){return"audio"===this.kind&&"object"==typeof Tn&&(Tn=JSON.parse(JSON.stringify(Tn)),Lt(Tn,"autoGainControl","mozAutoGainControl"),Lt(Tn,"noiseSuppression","mozNoiseSuppression")),gn.apply(this,[Tn])}}}}function ae(st,En){st.navigator.mediaDevices&&"getDisplayMedia"in st.navigator.mediaDevices||st.navigator.mediaDevices&&(st.navigator.mediaDevices.getDisplayMedia=function(it){if(!it||!it.video){const Lt=new DOMException("getDisplayMedia without video constraints is undefined");return Lt.name="NotFoundError",Lt.code=8,Promise.reject(Lt)}return!0===it.video?it.video={mediaSource:En}:it.video.mediaSource=En,st.navigator.mediaDevices.getUserMedia(it)})}function de(st){"object"==typeof st&&st.RTCTrackEvent&&"receiver"in st.RTCTrackEvent.prototype&&!("transceiver"in st.RTCTrackEvent.prototype)&&Object.defineProperty(st.RTCTrackEvent.prototype,"transceiver",{get(){return{receiver:this.receiver}}})}function Pe(st){const En=P(st);if("object"!=typeof st||!st.RTCPeerConnection&&!st.mozRTCPeerConnection)return;if(!st.RTCPeerConnection&&st.mozRTCPeerConnection&&(st.RTCPeerConnection=st.mozRTCPeerConnection),En.version<53&&["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach(function(Lt){const $t=st.RTCPeerConnection.prototype[Lt],gn={[Lt](){return arguments[0]=new("addIceCandidate"===Lt?st.RTCIceCandidate:st.RTCSessionDescription)(arguments[0]),$t.apply(this,arguments)}};st.RTCPeerConnection.prototype[Lt]=gn[Lt]}),En.version<68){const Lt=st.RTCPeerConnection.prototype.addIceCandidate;st.RTCPeerConnection.prototype.addIceCandidate=function(){return arguments[0]?arguments[0]&&""===arguments[0].candidate?Promise.resolve():Lt.apply(this,arguments):(arguments[1]&&arguments[1].apply(null),Promise.resolve())}}const In={inboundrtp:"inbound-rtp",outboundrtp:"outbound-rtp",candidatepair:"candidate-pair",localcandidate:"local-candidate",remotecandidate:"remote-candidate"},it=st.RTCPeerConnection.prototype.getStats;st.RTCPeerConnection.prototype.getStats=function(){const[$t,gn,Tn]=arguments;return it.apply(this,[$t||null]).then(ft=>{if(En.version<53&&!gn)try{ft.forEach(Pt=>{Pt.type=In[Pt.type]||Pt.type})}catch(Pt){if("TypeError"!==Pt.name)throw Pt;ft.forEach((on,Zt)=>{ft.set(Zt,Object.assign({},on,{type:In[on.type]||on.type}))})}return ft}).then(gn,Tn)}}function ye(st){if("object"!=typeof st||!st.RTCPeerConnection||!st.RTCRtpSender||st.RTCRtpSender&&"getStats"in st.RTCRtpSender.prototype)return;const En=st.RTCPeerConnection.prototype.getSenders;En&&(st.RTCPeerConnection.prototype.getSenders=function(){const Lt=En.apply(this,[]);return Lt.forEach($t=>$t._pc=this),Lt});const In=st.RTCPeerConnection.prototype.addTrack;In&&(st.RTCPeerConnection.prototype.addTrack=function(){const Lt=In.apply(this,arguments);return Lt._pc=this,Lt}),st.RTCRtpSender.prototype.getStats=function(){return this.track?this._pc.getStats(this.track):Promise.resolve(new Map)}}function Le(st){if("object"!=typeof st||!st.RTCPeerConnection||!st.RTCRtpSender||st.RTCRtpSender&&"getStats"in st.RTCRtpReceiver.prototype)return;const En=st.RTCPeerConnection.prototype.getReceivers;En&&(st.RTCPeerConnection.prototype.getReceivers=function(){const it=En.apply(this,[]);return it.forEach(Lt=>Lt._pc=this),it}),b(st,"track",In=>(In.receiver._pc=In.srcElement,In)),st.RTCRtpReceiver.prototype.getStats=function(){return this._pc.getStats(this.track)}}function Xe(st){!st.RTCPeerConnection||"removeStream"in st.RTCPeerConnection.prototype||(st.RTCPeerConnection.prototype.removeStream=function(In){A("removeStream","removeTrack"),this.getSenders().forEach(it=>{it.track&&In.getTracks().includes(it.track)&&this.removeTrack(it)})})}function ie(st){st.DataChannel&&!st.RTCDataChannel&&(st.RTCDataChannel=st.DataChannel)}function K(st){if("object"!=typeof st||!st.RTCPeerConnection)return;const En=st.RTCPeerConnection.prototype.addTransceiver;En&&(st.RTCPeerConnection.prototype.addTransceiver=function(){this.setParametersPromises=[];const it=arguments[1],Lt=it&&"sendEncodings"in it;Lt&&it.sendEncodings.forEach(gn=>{if("rid"in gn&&!/^[a-z0-9]{0,16}$/i.test(gn.rid))throw new TypeError("Invalid RID value provided.");if("scaleResolutionDownBy"in gn&&!(parseFloat(gn.scaleResolutionDownBy)>=1))throw new RangeError("scale_resolution_down_by must be >= 1.0");if("maxFramerate"in gn&&!(parseFloat(gn.maxFramerate)>=0))throw new RangeError("max_framerate must be >= 0.0")});const $t=En.apply(this,arguments);if(Lt){const{sender:gn}=$t,Tn=gn.getParameters();"encodings"in Tn||(Tn.encodings=it.sendEncodings,gn.sendEncodings=it.sendEncodings,this.setParametersPromises.push(gn.setParameters(Tn).then(()=>{delete gn.sendEncodings}).catch(()=>{delete gn.sendEncodings})))}return $t})}function ce(st){if("object"!=typeof st||!st.RTCRtpSender)return;const En=st.RTCRtpSender.prototype.getParameters;En&&(st.RTCRtpSender.prototype.getParameters=function(){var it=En.apply(this,arguments);return"sendEncodings"in this?Object.assign({},{encodings:this.sendEncodings},it):it})}function ge(st){if("object"!=typeof st||!st.RTCPeerConnection)return;const En=st.RTCPeerConnection.prototype.createOffer;st.RTCPeerConnection.prototype.createOffer=function(){return this.setParametersPromises&&this.setParametersPromises.length?Promise.all(this.setParametersPromises).then(()=>En.apply(this,arguments)).finally(()=>{this.setParametersPromises=[]}):En.apply(this,arguments)}}function Oe(st){if("object"!=typeof st||!st.RTCPeerConnection)return;const En=st.RTCPeerConnection.prototype.createAnswer;st.RTCPeerConnection.prototype.createAnswer=function(){return this.setParametersPromises&&this.setParametersPromises.length?Promise.all(this.setParametersPromises).then(()=>En.apply(this,arguments)).finally(()=>{this.setParametersPromises=[]}):En.apply(this,arguments)}}function Ie(st){if("object"==typeof st&&st.RTCPeerConnection){if("getLocalStreams"in st.RTCPeerConnection.prototype||(st.RTCPeerConnection.prototype.getLocalStreams=function(){return this._localStreams||(this._localStreams=[]),this._localStreams}),!("addStream"in st.RTCPeerConnection.prototype)){const En=st.RTCPeerConnection.prototype.addTrack;st.RTCPeerConnection.prototype.addStream=function(it){this._localStreams||(this._localStreams=[]),this._localStreams.includes(it)||this._localStreams.push(it),it.getAudioTracks().forEach(Lt=>En.call(this,Lt,it)),it.getVideoTracks().forEach(Lt=>En.call(this,Lt,it))},st.RTCPeerConnection.prototype.addTrack=function(it,...Lt){return Lt&&Lt.forEach($t=>{this._localStreams?this._localStreams.includes($t)||this._localStreams.push($t):this._localStreams=[$t]}),En.apply(this,arguments)}}"removeStream"in st.RTCPeerConnection.prototype||(st.RTCPeerConnection.prototype.removeStream=function(In){this._localStreams||(this._localStreams=[]);const it=this._localStreams.indexOf(In);if(-1===it)return;this._localStreams.splice(it,1);const Lt=In.getTracks();this.getSenders().forEach($t=>{Lt.includes($t.track)&&this.removeTrack($t)})})}}function ht(st){if("object"==typeof st&&st.RTCPeerConnection&&("getRemoteStreams"in st.RTCPeerConnection.prototype||(st.RTCPeerConnection.prototype.getRemoteStreams=function(){return this._remoteStreams?this._remoteStreams:[]}),!("onaddstream"in st.RTCPeerConnection.prototype))){Object.defineProperty(st.RTCPeerConnection.prototype,"onaddstream",{get(){return this._onaddstream},set(In){this._onaddstream&&(this.removeEventListener("addstream",this._onaddstream),this.removeEventListener("track",this._onaddstreampoly)),this.addEventListener("addstream",this._onaddstream=In),this.addEventListener("track",this._onaddstreampoly=it=>{it.streams.forEach(Lt=>{if(this._remoteStreams||(this._remoteStreams=[]),this._remoteStreams.includes(Lt))return;this._remoteStreams.push(Lt);const $t=new Event("addstream");$t.stream=Lt,this.dispatchEvent($t)})})}});const En=st.RTCPeerConnection.prototype.setRemoteDescription;st.RTCPeerConnection.prototype.setRemoteDescription=function(){const it=this;return this._onaddstreampoly||this.addEventListener("track",this._onaddstreampoly=function(Lt){Lt.streams.forEach($t=>{if(it._remoteStreams||(it._remoteStreams=[]),it._remoteStreams.indexOf($t)>=0)return;it._remoteStreams.push($t);const gn=new Event("addstream");gn.stream=$t,it.dispatchEvent(gn)})}),En.apply(it,arguments)}}}function Fe(st){if("object"!=typeof st||!st.RTCPeerConnection)return;const En=st.RTCPeerConnection.prototype,In=En.createOffer,it=En.createAnswer,Lt=En.setLocalDescription,$t=En.setRemoteDescription,gn=En.addIceCandidate;En.createOffer=function(Pt,on){const Sn=In.apply(this,[arguments.length>=2?arguments[2]:arguments[0]]);return on?(Sn.then(Pt,on),Promise.resolve()):Sn},En.createAnswer=function(Pt,on){const Sn=it.apply(this,[arguments.length>=2?arguments[2]:arguments[0]]);return on?(Sn.then(Pt,on),Promise.resolve()):Sn};let Tn=function(ft,Pt,on){const Zt=Lt.apply(this,[ft]);return on?(Zt.then(Pt,on),Promise.resolve()):Zt};En.setLocalDescription=Tn,Tn=function(ft,Pt,on){const Zt=$t.apply(this,[ft]);return on?(Zt.then(Pt,on),Promise.resolve()):Zt},En.setRemoteDescription=Tn,Tn=function(ft,Pt,on){const Zt=gn.apply(this,[ft]);return on?(Zt.then(Pt,on),Promise.resolve()):Zt},En.addIceCandidate=Tn}function et(st){const En=st&&st.navigator;if(En.mediaDevices&&En.mediaDevices.getUserMedia){const In=En.mediaDevices,it=In.getUserMedia.bind(In);En.mediaDevices.getUserMedia=Lt=>it(Rt(Lt))}!En.getUserMedia&&En.mediaDevices&&En.mediaDevices.getUserMedia&&(En.getUserMedia=function(it,Lt,$t){En.mediaDevices.getUserMedia(it).then(Lt,$t)}.bind(En))}function Rt(st){return st&&void 0!==st.video?Object.assign({},st,{video:B(st.video)}):st}function _t(st){if(!st.RTCPeerConnection)return;const En=st.RTCPeerConnection;st.RTCPeerConnection=function(it,Lt){if(it&&it.iceServers){const $t=[];for(let gn=0;gnEn.generateCertificate})}function Ae(st){"object"==typeof st&&st.RTCTrackEvent&&"receiver"in st.RTCTrackEvent.prototype&&!("transceiver"in st.RTCTrackEvent.prototype)&&Object.defineProperty(st.RTCTrackEvent.prototype,"transceiver",{get(){return{receiver:this.receiver}}})}function lt(st){const En=st.RTCPeerConnection.prototype.createOffer;st.RTCPeerConnection.prototype.createOffer=function(it){if(it){typeof it.offerToReceiveAudio<"u"&&(it.offerToReceiveAudio=!!it.offerToReceiveAudio);const Lt=this.getTransceivers().find(gn=>"audio"===gn.receiver.track.kind);!1===it.offerToReceiveAudio&&Lt?"sendrecv"===Lt.direction?Lt.setDirection?Lt.setDirection("sendonly"):Lt.direction="sendonly":"recvonly"===Lt.direction&&(Lt.setDirection?Lt.setDirection("inactive"):Lt.direction="inactive"):!0===it.offerToReceiveAudio&&!Lt&&this.addTransceiver("audio"),typeof it.offerToReceiveVideo<"u"&&(it.offerToReceiveVideo=!!it.offerToReceiveVideo);const $t=this.getTransceivers().find(gn=>"video"===gn.receiver.track.kind);!1===it.offerToReceiveVideo&&$t?"sendrecv"===$t.direction?$t.setDirection?$t.setDirection("sendonly"):$t.direction="sendonly":"recvonly"===$t.direction&&($t.setDirection?$t.setDirection("inactive"):$t.direction="inactive"):!0===it.offerToReceiveVideo&&!$t&&this.addTransceiver("video")}return En.apply(this,arguments)}}function Ze(st){"object"!=typeof st||st.AudioContext||(st.AudioContext=st.webkitAudioContext)}var yt=r(985),un=r.n(yt);function kn(st){if(!st.RTCIceCandidate||st.RTCIceCandidate&&"foundation"in st.RTCIceCandidate.prototype)return;const En=st.RTCIceCandidate;st.RTCIceCandidate=function(it){if("object"==typeof it&&it.candidate&&0===it.candidate.indexOf("a=")&&((it=JSON.parse(JSON.stringify(it))).candidate=it.candidate.substr(2)),it.candidate&&it.candidate.length){const Lt=new En(it),$t=un().parseCandidate(it.candidate),gn=Object.assign(Lt,$t);return gn.toJSON=function(){return{candidate:gn.candidate,sdpMid:gn.sdpMid,sdpMLineIndex:gn.sdpMLineIndex,usernameFragment:gn.usernameFragment}},gn}return new En(it)},st.RTCIceCandidate.prototype=En.prototype,b(st,"icecandidate",In=>(In.candidate&&Object.defineProperty(In,"candidate",{value:new st.RTCIceCandidate(In.candidate),writable:"false"}),In))}function Wt(st){if(!st.RTCPeerConnection)return;const En=P(st);"sctp"in st.RTCPeerConnection.prototype||Object.defineProperty(st.RTCPeerConnection.prototype,"sctp",{get(){return typeof this._sctp>"u"?null:this._sctp}});const gn=st.RTCPeerConnection.prototype.setRemoteDescription;st.RTCPeerConnection.prototype.setRemoteDescription=function(){if(this._sctp=null,"chrome"===En.browser&&En.version>=76){const{sdpSemantics:ft}=this.getConfiguration();"plan-b"===ft&&Object.defineProperty(this,"sctp",{get(){return typeof this._sctp>"u"?null:this._sctp},enumerable:!0,configurable:!0})}if(function(Tn){if(!Tn||!Tn.sdp)return!1;const ft=un().splitSections(Tn.sdp);return ft.shift(),ft.some(Pt=>{const on=un().parseMLine(Pt);return on&&"application"===on.kind&&-1!==on.protocol.indexOf("SCTP")})}(arguments[0])){const ft=function(Tn){const ft=Tn.sdp.match(/mozilla...THIS_IS_SDPARTA-(\d+)/);if(null===ft||ft.length<2)return-1;const Pt=parseInt(ft[1],10);return Pt!=Pt?-1:Pt}(arguments[0]),Pt=function(Tn){let ft=65536;return"firefox"===En.browser&&(ft=En.version<57?-1===Tn?16384:2147483637:En.version<60?57===En.version?65535:65536:2147483637),ft}(ft),on=function(Tn,ft){let Pt=65536;"firefox"===En.browser&&57===En.version&&(Pt=65535);const on=un().matchPrefix(Tn.sdp,"a=max-message-size:");return on.length>0?Pt=parseInt(on[0].substr(19),10):"firefox"===En.browser&&-1!==ft&&(Pt=2147483637),Pt}(arguments[0],ft);let Zt;Zt=0===Pt&&0===on?Number.POSITIVE_INFINITY:0===Pt||0===on?Math.max(Pt,on):Math.min(Pt,on);const Sn={};Object.defineProperty(Sn,"maxMessageSize",{get:()=>Zt}),this._sctp=Sn}return gn.apply(this,arguments)}}function rn(st){if(!st.RTCPeerConnection||!("createDataChannel"in st.RTCPeerConnection.prototype))return;function En(it,Lt){const $t=it.send;it.send=function(){const Tn=arguments[0];if("open"===it.readyState&&Lt.sctp&&(Tn.length||Tn.size||Tn.byteLength)>Lt.sctp.maxMessageSize)throw new TypeError("Message too large (can send a maximum of "+Lt.sctp.maxMessageSize+" bytes)");return $t.apply(it,arguments)}}const In=st.RTCPeerConnection.prototype.createDataChannel;st.RTCPeerConnection.prototype.createDataChannel=function(){const Lt=In.apply(this,arguments);return En(Lt,this),Lt},b(st,"datachannel",it=>(En(it.channel,it.target),it))}function zt(st){if(!st.RTCPeerConnection||"connectionState"in st.RTCPeerConnection.prototype)return;const En=st.RTCPeerConnection.prototype;Object.defineProperty(En,"connectionState",{get(){return{completed:"connected",checking:"connecting"}[this.iceConnectionState]||this.iceConnectionState},enumerable:!0,configurable:!0}),Object.defineProperty(En,"onconnectionstatechange",{get(){return this._onconnectionstatechange||null},set(In){this._onconnectionstatechange&&(this.removeEventListener("connectionstatechange",this._onconnectionstatechange),delete this._onconnectionstatechange),In&&this.addEventListener("connectionstatechange",this._onconnectionstatechange=In)},enumerable:!0,configurable:!0}),["setLocalDescription","setRemoteDescription"].forEach(In=>{const it=En[In];En[In]=function(){return this._connectionstatechangepoly||(this._connectionstatechangepoly=Lt=>{const $t=Lt.target;if($t._lastConnectionState!==$t.connectionState){$t._lastConnectionState=$t.connectionState;const gn=new Event("connectionstatechange",Lt);$t.dispatchEvent(gn)}return Lt},this.addEventListener("iceconnectionstatechange",this._connectionstatechangepoly)),it.apply(this,arguments)}})}function dn(st){if(!st.RTCPeerConnection)return;const En=P(st);if("chrome"===En.browser&&En.version>=71||"safari"===En.browser&&En.version>=605)return;const In=st.RTCPeerConnection.prototype.setRemoteDescription;st.RTCPeerConnection.prototype.setRemoteDescription=function(Lt){return Lt&&Lt.sdp&&-1!==Lt.sdp.indexOf("\na=extmap-allow-mixed")&&(Lt.sdp=Lt.sdp.split("\n").filter($t=>"a=extmap-allow-mixed"!==$t.trim()).join("\n")),In.apply(this,arguments)}}!function vn({window:st}={},En={shimChrome:!0,shimFirefox:!0,shimEdge:!0,shimSafari:!0}){const In=h,it=P(st),Lt={browserDetails:it,commonShim:T,extractVersion:y,disableLog:c,disableWarnings:i};switch(it.browser){case"chrome":if(!v||!se||!En.shimChrome)return In("Chrome shim is not included in this adapter release."),Lt;if(null===it.version)return In("Chrome shim can not determine version, not shimming."),Lt;In("adapter.js shimming chrome."),Lt.browserShim=v,H(st),O(st),se(st),F(st),Z(st),k(st),$(st),ne(st),fe(st),kn(st),zt(st),Wt(st),rn(st),dn(st);break;case"firefox":if(!g||!Pe||!En.shimFirefox)return In("Firefox shim is not included in this adapter release."),Lt;In("adapter.js shimming firefox."),Lt.browserShim=g,X(st),Pe(st),de(st),Xe(st),ye(st),Le(st),ie(st),K(st),ce(st),ge(st),Oe(st),kn(st),zt(st),Wt(st),rn(st);break;case"edge":if(!_||!W||!En.shimEdge)return In("MS edge shim is not included in this adapter release."),Lt;In("adapter.js shimming edge."),Lt.browserShim=_,q(st),J(st),W(st),ee(st),Wt(st),rn(st);break;case"safari":if(!E||!En.shimSafari)return In("Safari shim is not included in this adapter release."),Lt;In("adapter.js shimming safari."),Lt.browserShim=E,_t(st),lt(st),Fe(st),Ie(st),ht(st),Ae(st),et(st),Ze(st),kn(st),Wt(st),rn(st),dn(st);break;default:In("Unsupported browser!")}}({window}),r(306);var Ye=NetworkTest.getNetworkTestExceptionTelemetryEvent,Nt=NetworkTest.getNetworkTestHttpTelemetryEvent,Yt=NetworkTest.GdprLevel,Ut=NetworkTest.BooleanType,Pn=NetworkTest.EventName,Vt=NetworkTest.NetworkTestApp,bt=NetworkTest.ConfigureNetworkTestSettings,De=NetworkTest.NetworkTestSettings,tt=NetworkTest.IsValidIPv4,Ve=NetworkTest.GetRandNumericString,Je=NetworkTest.IsChromium,Ct=NetworkTest.IsChrome,cn=NetworkTest.IsSafari,Hn=NetworkTest.performHttpRequest,ln=NetworkTest.getPlatform,an=NetworkTest.getBrowser,Qt=NetworkTest.getAppUserAgent,ke=NetworkTest.IsTouchDevice,mt=NetworkTest.getNewGuid,ot=NetworkTest.isChromeVersionAtLeast,bn=NetworkTest.isSafariVersionAtLeast,Rn=NetworkTest.isSafariWebKitVersionAtLeast,Dt=NetworkTest.getHttpNtErrorCode,Xt=NetworkTest.CLIENT_IDENTIFICATION,Ln=NetworkTest.CLIENT_VERSION,Jn=NetworkTest.DEFAULT_PORT,Ci=NetworkTest.UNDEFINED_SESSION_ID,ki=NetworkTest.DefaultHttpRequestOptions,Bi=NetworkTest.CHANGELIST})(),vt.exports=s})()},56123:(vt,I,f)=>{"use strict";var r=f(8536).default;Object.defineProperty(I,Symbol.toStringTag,{value:"Module"});const s=f(352),v=f(55561);let _=!0,g=!0;function E(m,a,u){const S=m.match(a);return S&&S.length>=u&&parseInt(S[u],10)}function T(m,a,u){if(!m.RTCPeerConnection)return;const S=m.RTCPeerConnection.prototype,D=S.addEventListener;S.addEventListener=function(Y,oe){if(Y!==a)return D.apply(this,arguments);const _e=Ce=>{const Ue=u(Ce);Ue&&(oe.handleEvent?oe.handleEvent(Ue):oe(Ue))};return this._eventMap=this._eventMap||{},this._eventMap[a]||(this._eventMap[a]=new Map),this._eventMap[a].set(oe,_e),D.apply(this,[Y,_e])};const L=S.removeEventListener;S.removeEventListener=function(Y,oe){if(Y!==a||!this._eventMap||!this._eventMap[a])return L.apply(this,arguments);if(!this._eventMap[a].has(oe))return L.apply(this,arguments);const _e=this._eventMap[a].get(oe);return this._eventMap[a].delete(oe),0===this._eventMap[a].size&&delete this._eventMap[a],0===Object.keys(this._eventMap).length&&delete this._eventMap,L.apply(this,[Y,_e])},Object.defineProperty(S,"on"+a,{get(){return this["_on"+a]},set(Y){this["_on"+a]&&(this.removeEventListener(a,this["_on"+a]),delete this["_on"+a]),Y&&this.addEventListener(a,this["_on"+a]=Y)},enumerable:!0,configurable:!0})}function x(m){return"boolean"!=typeof m?new Error("Argument type: "+typeof m+". Please use a boolean."):(_=m,m?"adapter.js logging disabled":"adapter.js logging enabled")}function M(m){return"boolean"!=typeof m?new Error("Argument type: "+typeof m+". Please use a boolean."):(g=!m,"adapter.js deprecation warnings "+(m?"disabled":"enabled"))}function y(){if("object"==typeof window){if(_)return;typeof console<"u"&&"function"==typeof console.log&&console.log.apply(console,arguments)}}function b(m,a){g&&console.warn(m+" is deprecated, please use "+a+" instead.")}function c(m){const{navigator:a}=m,u={browser:null,version:null};if(void 0===m||!m.navigator)return u.browser="Not a browser.",u;if(a.mozGetUserMedia)u.browser="firefox",u.version=E(a.userAgent,/Firefox\/(\d+)\./,1);else if(a.webkitGetUserMedia||!1===m.isSecureContext&&m.webkitRTCPeerConnection&&!m.RTCIceGatherer)u.browser="chrome",u.version=E(a.userAgent,/Chrom(e|ium)\/(\d+)\./,2);else if(a.mediaDevices&&a.userAgent.match(/Edge\/(\d+).(\d+)$/))u.browser="edge",u.version=E(a.userAgent,/Edge\/(\d+).(\d+)$/,2);else{if(!m.RTCPeerConnection||!a.userAgent.match(/AppleWebKit\/(\d+)\./))return u.browser="Not a supported browser.",u;u.browser="safari",u.version=E(a.userAgent,/AppleWebKit\/(\d+)\./,1),u.supportsUnifiedPlan=m.RTCRtpTransceiver&&"currentDirection"in m.RTCRtpTransceiver.prototype}return u}function i(m){return"[object Object]"===Object.prototype.toString.call(m)}function h(m){return i(m)?Object.keys(m).reduce(function(a,u){const S=i(m[u]),D=S?h(m[u]):m[u],L=S&&!Object.keys(D).length;return void 0===D||L?a:Object.assign(a,{[u]:D})},{}):m}function A(m,a,u){a&&!u.has(a.id)&&(u.set(a.id,a),Object.keys(a).forEach(S=>{S.endsWith("Id")?A(m,m.get(a[S]),u):S.endsWith("Ids")&&a[S].forEach(D=>{A(m,m.get(D),u)})}))}function P(m,a,u){const S=u?"outbound-rtp":"inbound-rtp",D=new Map;if(null===a)return D;const L=[];return m.forEach(Y=>{"track"===Y.type&&Y.trackIdentifier===a.id&&L.push(Y)}),L.forEach(Y=>{m.forEach(oe=>{oe.type===S&&oe.trackId===Y.id&&A(m,oe,D)})}),D}const V=y;function B(m){const a=m&&m.navigator;if(!a.mediaDevices)return;const u=c(m),S=function(Y){if("object"!=typeof Y||Y.mandatory||Y.optional)return Y;const oe={};return Object.keys(Y).forEach(_e=>{if("require"===_e||"advanced"===_e||"mediaSource"===_e)return;const Ce="object"==typeof Y[_e]?Y[_e]:{ideal:Y[_e]};void 0!==Ce.exact&&"number"==typeof Ce.exact&&(Ce.min=Ce.max=Ce.exact);const Ue=function($e,Be){return $e?$e+Be.charAt(0).toUpperCase()+Be.slice(1):"deviceId"===Be?"sourceId":Be};if(void 0!==Ce.ideal){oe.optional=oe.optional||[];let $e={};"number"==typeof Ce.ideal?($e[Ue("min",_e)]=Ce.ideal,oe.optional.push($e),$e={},$e[Ue("max",_e)]=Ce.ideal,oe.optional.push($e)):($e[Ue("",_e)]=Ce.ideal,oe.optional.push($e))}void 0!==Ce.exact&&"number"!=typeof Ce.exact?(oe.mandatory=oe.mandatory||{},oe.mandatory[Ue("",_e)]=Ce.exact):["min","max"].forEach($e=>{void 0!==Ce[$e]&&(oe.mandatory=oe.mandatory||{},oe.mandatory[Ue($e,_e)]=Ce[$e])})}),Y.advanced&&(oe.optional=(oe.optional||[]).concat(Y.advanced)),oe},D=function(Y,oe){if(u.version>=61)return oe(Y);if((Y=JSON.parse(JSON.stringify(Y)))&&"object"==typeof Y.audio){const _e=function(Ce,Ue,$e){Ue in Ce&&!($e in Ce)&&(Ce[$e]=Ce[Ue],delete Ce[Ue])};_e((Y=JSON.parse(JSON.stringify(Y))).audio,"autoGainControl","googAutoGainControl"),_e(Y.audio,"noiseSuppression","googNoiseSuppression"),Y.audio=S(Y.audio)}if(Y&&"object"==typeof Y.video){let _e=Y.video.facingMode;_e=_e&&("object"==typeof _e?_e:{ideal:_e});const Ce=u.version<66;if(_e&&("user"===_e.exact||"environment"===_e.exact||"user"===_e.ideal||"environment"===_e.ideal)&&(!a.mediaDevices.getSupportedConstraints||!a.mediaDevices.getSupportedConstraints().facingMode||Ce)){let Ue;if(delete Y.video.facingMode,"environment"===_e.exact||"environment"===_e.ideal?Ue=["back","rear"]:"user"!==_e.exact&&"user"!==_e.ideal||(Ue=["front"]),Ue)return a.mediaDevices.enumerateDevices().then($e=>{let Be=($e=$e.filter(at=>"videoinput"===at.kind)).find(at=>Ue.some(At=>at.label.toLowerCase().includes(At)));return!Be&&$e.length&&Ue.includes("back")&&(Be=$e[$e.length-1]),Be&&(Y.video.deviceId=_e.exact?{exact:Be.deviceId}:{ideal:Be.deviceId}),Y.video=S(Y.video),V("chrome: "+JSON.stringify(Y)),oe(Y)})}Y.video=S(Y.video)}return V("chrome: "+JSON.stringify(Y)),oe(Y)},L=function(Y){return u.version>=64?Y:{name:{PermissionDeniedError:"NotAllowedError",PermissionDismissedError:"NotAllowedError",InvalidStateError:"NotAllowedError",DevicesNotFoundError:"NotFoundError",ConstraintNotSatisfiedError:"OverconstrainedError",TrackStartError:"NotReadableError",MediaDeviceFailedDueToShutdown:"NotAllowedError",MediaDeviceKillSwitchOn:"NotAllowedError",TabCaptureError:"AbortError",ScreenCaptureError:"AbortError",DeviceCaptureError:"AbortError"}[Y.name]||Y.name,message:Y.message,constraint:Y.constraint||Y.constraintName,toString(){return this.name+(this.message&&": ")+this.message}}};if(a.getUserMedia=function(Y,oe,_e){D(Y,Ce=>{a.webkitGetUserMedia(Ce,oe,Ue=>{_e&&_e(L(Ue))})})}.bind(a),a.mediaDevices.getUserMedia){const Y=a.mediaDevices.getUserMedia.bind(a.mediaDevices);a.mediaDevices.getUserMedia=function(oe){return D(oe,_e=>Y(_e).then(Ce=>{if(_e.audio&&!Ce.getAudioTracks().length||_e.video&&!Ce.getVideoTracks().length)throw Ce.getTracks().forEach(Ue=>{Ue.stop()}),new DOMException("","NotFoundError");return Ce},Ce=>Promise.reject(L(Ce))))}}}function j(m){m.MediaStream=m.MediaStream||m.webkitMediaStream}function re(m){if("object"==typeof m&&m.RTCPeerConnection&&!("ontrack"in m.RTCPeerConnection.prototype)){Object.defineProperty(m.RTCPeerConnection.prototype,"ontrack",{get(){return this._ontrack},set(u){this._ontrack&&this.removeEventListener("track",this._ontrack),this.addEventListener("track",this._ontrack=u)},enumerable:!0,configurable:!0});const a=m.RTCPeerConnection.prototype.setRemoteDescription;m.RTCPeerConnection.prototype.setRemoteDescription=function(){return this._ontrackpoly||(this._ontrackpoly=u=>{u.stream.addEventListener("addtrack",S=>{let D;D=m.RTCPeerConnection.prototype.getReceivers?this.getReceivers().find(Y=>Y.track&&Y.track.id===S.track.id):{track:S.track};const L=new Event("track");L.track=S.track,L.receiver=D,L.transceiver={receiver:D},L.streams=[u.stream],this.dispatchEvent(L)}),u.stream.getTracks().forEach(S=>{let D;D=m.RTCPeerConnection.prototype.getReceivers?this.getReceivers().find(Y=>Y.track&&Y.track.id===S.id):{track:S};const L=new Event("track");L.track=S,L.receiver=D,L.transceiver={receiver:D},L.streams=[u.stream],this.dispatchEvent(L)})},this.addEventListener("addstream",this._ontrackpoly)),a.apply(this,arguments)}}else T(m,"track",a=>(a.transceiver||Object.defineProperty(a,"transceiver",{value:{receiver:a.receiver}}),a))}function z(m){if("object"==typeof m&&m.RTCPeerConnection&&!("getSenders"in m.RTCPeerConnection.prototype)&&"createDTMFSender"in m.RTCPeerConnection.prototype){const a=function(D,L){return{track:L,get dtmf(){return void 0===this._dtmf&&(this._dtmf="audio"===L.kind?D.createDTMFSender(L):null),this._dtmf},_pc:D}};if(!m.RTCPeerConnection.prototype.getSenders){m.RTCPeerConnection.prototype.getSenders=function(){return this._senders=this._senders||[],this._senders.slice()};const D=m.RTCPeerConnection.prototype.addTrack;m.RTCPeerConnection.prototype.addTrack=function(Y,oe){let _e=D.apply(this,arguments);return _e||(_e=a(this,Y),this._senders.push(_e)),_e};const L=m.RTCPeerConnection.prototype.removeTrack;m.RTCPeerConnection.prototype.removeTrack=function(Y){L.apply(this,arguments);const oe=this._senders.indexOf(Y);-1!==oe&&this._senders.splice(oe,1)}}const u=m.RTCPeerConnection.prototype.addStream;m.RTCPeerConnection.prototype.addStream=function(D){this._senders=this._senders||[],u.apply(this,[D]),D.getTracks().forEach(L=>{this._senders.push(a(this,L))})};const S=m.RTCPeerConnection.prototype.removeStream;m.RTCPeerConnection.prototype.removeStream=function(D){this._senders=this._senders||[],S.apply(this,[D]),D.getTracks().forEach(L=>{const Y=this._senders.find(oe=>oe.track===L);Y&&this._senders.splice(this._senders.indexOf(Y),1)})}}else if("object"==typeof m&&m.RTCPeerConnection&&"getSenders"in m.RTCPeerConnection.prototype&&"createDTMFSender"in m.RTCPeerConnection.prototype&&m.RTCRtpSender&&!("dtmf"in m.RTCRtpSender.prototype)){const a=m.RTCPeerConnection.prototype.getSenders;m.RTCPeerConnection.prototype.getSenders=function(){const u=a.apply(this,[]);return u.forEach(S=>S._pc=this),u},Object.defineProperty(m.RTCRtpSender.prototype,"dtmf",{get(){return void 0===this._dtmf&&(this._dtmf="audio"===this.track.kind?this._pc.createDTMFSender(this.track):null),this._dtmf}})}}function H(m){if(!m.RTCPeerConnection)return;const a=m.RTCPeerConnection.prototype.getStats;m.RTCPeerConnection.prototype.getStats=function(){const[u,S,D]=arguments;if(arguments.length>0&&"function"==typeof u)return a.apply(this,arguments);if(0===a.length&&(0===arguments.length||"function"!=typeof u))return a.apply(this,[]);const L=function(oe){const _e={};return oe.result().forEach(Ce=>{const Ue={id:Ce.id,timestamp:Ce.timestamp,type:{localcandidate:"local-candidate",remotecandidate:"remote-candidate"}[Ce.type]||Ce.type};Ce.names().forEach($e=>{Ue[$e]=Ce.stat($e)}),_e[Ue.id]=Ue}),_e},Y=function(oe){return new Map(Object.keys(oe).map(_e=>[_e,oe[_e]]))};return arguments.length>=2?a.apply(this,[function(_e){S(Y(L(_e)))},u]):new Promise((oe,_e)=>{a.apply(this,[function(Ce){oe(Y(L(Ce)))},_e])}).then(S,D)}}function U(m){if(!("object"==typeof m&&m.RTCPeerConnection&&m.RTCRtpSender&&m.RTCRtpReceiver))return;if(!("getStats"in m.RTCRtpSender.prototype)){const u=m.RTCPeerConnection.prototype.getSenders;u&&(m.RTCPeerConnection.prototype.getSenders=function(){const D=u.apply(this,[]);return D.forEach(L=>L._pc=this),D});const S=m.RTCPeerConnection.prototype.addTrack;S&&(m.RTCPeerConnection.prototype.addTrack=function(){const D=S.apply(this,arguments);return D._pc=this,D}),m.RTCRtpSender.prototype.getStats=function(){const D=this;return this._pc.getStats().then(L=>P(L,D.track,!0))}}if(!("getStats"in m.RTCRtpReceiver.prototype)){const u=m.RTCPeerConnection.prototype.getReceivers;u&&(m.RTCPeerConnection.prototype.getReceivers=function(){const S=u.apply(this,[]);return S.forEach(D=>D._pc=this),S}),T(m,"track",S=>(S.receiver._pc=S.srcElement,S)),m.RTCRtpReceiver.prototype.getStats=function(){const S=this;return this._pc.getStats().then(D=>P(D,S.track,!1))}}if(!("getStats"in m.RTCRtpSender.prototype)||!("getStats"in m.RTCRtpReceiver.prototype))return;const a=m.RTCPeerConnection.prototype.getStats;m.RTCPeerConnection.prototype.getStats=function(){if(arguments.length>0&&arguments[0]instanceof m.MediaStreamTrack){const u=arguments[0];let S,D,L;return this.getSenders().forEach(Y=>{Y.track===u&&(S?L=!0:S=Y)}),this.getReceivers().forEach(Y=>(Y.track===u&&(D?L=!0:D=Y),Y.track===u)),L||S&&D?Promise.reject(new DOMException("There are more than one sender or receiver for the track.","InvalidAccessError")):S?S.getStats():D?D.getStats():Promise.reject(new DOMException("There is no sender or receiver for the track.","InvalidAccessError"))}return a.apply(this,arguments)}}function O(m){m.RTCPeerConnection.prototype.getLocalStreams=function(){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},Object.keys(this._shimmedLocalStreams).map(L=>this._shimmedLocalStreams[L][0])};const a=m.RTCPeerConnection.prototype.addTrack;m.RTCPeerConnection.prototype.addTrack=function(L,Y){if(!Y)return a.apply(this,arguments);this._shimmedLocalStreams=this._shimmedLocalStreams||{};const oe=a.apply(this,arguments);return this._shimmedLocalStreams[Y.id]?-1===this._shimmedLocalStreams[Y.id].indexOf(oe)&&this._shimmedLocalStreams[Y.id].push(oe):this._shimmedLocalStreams[Y.id]=[Y,oe],oe};const u=m.RTCPeerConnection.prototype.addStream;m.RTCPeerConnection.prototype.addStream=function(L){this._shimmedLocalStreams=this._shimmedLocalStreams||{},L.getTracks().forEach(_e=>{if(this.getSenders().find(Ce=>Ce.track===_e))throw new DOMException("Track already exists.","InvalidAccessError")});const Y=this.getSenders();u.apply(this,arguments);const oe=this.getSenders().filter(_e=>-1===Y.indexOf(_e));this._shimmedLocalStreams[L.id]=[L].concat(oe)};const S=m.RTCPeerConnection.prototype.removeStream;m.RTCPeerConnection.prototype.removeStream=function(L){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},delete this._shimmedLocalStreams[L.id],S.apply(this,arguments)};const D=m.RTCPeerConnection.prototype.removeTrack;m.RTCPeerConnection.prototype.removeTrack=function(L){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},L&&Object.keys(this._shimmedLocalStreams).forEach(Y=>{const oe=this._shimmedLocalStreams[Y].indexOf(L);-1!==oe&&this._shimmedLocalStreams[Y].splice(oe,1),1===this._shimmedLocalStreams[Y].length&&delete this._shimmedLocalStreams[Y]}),D.apply(this,arguments)}}function F(m){if(!m.RTCPeerConnection)return;const a=c(m);if(m.RTCPeerConnection.prototype.addTrack&&a.version>=65)return O(m);const u=m.RTCPeerConnection.prototype.getLocalStreams;m.RTCPeerConnection.prototype.getLocalStreams=function(){const _e=u.apply(this);return this._reverseStreams=this._reverseStreams||{},_e.map(Ce=>this._reverseStreams[Ce.id])};const S=m.RTCPeerConnection.prototype.addStream;m.RTCPeerConnection.prototype.addStream=function(_e){if(this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{},_e.getTracks().forEach(Ce=>{if(this.getSenders().find(Ue=>Ue.track===Ce))throw new DOMException("Track already exists.","InvalidAccessError")}),!this._reverseStreams[_e.id]){const Ce=new m.MediaStream(_e.getTracks());this._streams[_e.id]=Ce,this._reverseStreams[Ce.id]=_e,_e=Ce}S.apply(this,[_e])};const D=m.RTCPeerConnection.prototype.removeStream;function L(_e,Ce){let Ue=Ce.sdp;return Object.keys(_e._reverseStreams||[]).forEach($e=>{const Be=_e._reverseStreams[$e];Ue=Ue.replace(new RegExp(_e._streams[Be.id].id,"g"),Be.id)}),new RTCSessionDescription({type:Ce.type,sdp:Ue})}m.RTCPeerConnection.prototype.removeStream=function(_e){this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{},D.apply(this,[this._streams[_e.id]||_e]),delete this._reverseStreams[this._streams[_e.id]?this._streams[_e.id].id:_e.id],delete this._streams[_e.id]},m.RTCPeerConnection.prototype.addTrack=function(_e,Ce){if("closed"===this.signalingState)throw new DOMException("The RTCPeerConnection's signalingState is 'closed'.","InvalidStateError");const Ue=[].slice.call(arguments,1);if(1!==Ue.length||!Ue[0].getTracks().find(Be=>Be===_e))throw new DOMException("The adapter.js addTrack polyfill only supports a single stream which is associated with the specified track.","NotSupportedError");if(this.getSenders().find(Be=>Be.track===_e))throw new DOMException("Track already exists.","InvalidAccessError");this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{};const $e=this._streams[Ce.id];if($e)$e.addTrack(_e),Promise.resolve().then(()=>{this.dispatchEvent(new Event("negotiationneeded"))});else{const Be=new m.MediaStream([_e]);this._streams[Ce.id]=Be,this._reverseStreams[Be.id]=Ce,this.addStream(Be)}return this.getSenders().find(Be=>Be.track===_e)},["createOffer","createAnswer"].forEach(function(_e){const Ce=m.RTCPeerConnection.prototype[_e],Ue={[_e](){const $e=arguments;return arguments.length&&"function"==typeof arguments[0]?Ce.apply(this,[Be=>{const at=L(this,Be);$e[0].apply(null,[at])},Be=>{$e[1]&&$e[1].apply(null,Be)},arguments[2]]):Ce.apply(this,arguments).then(Be=>L(this,Be))}};m.RTCPeerConnection.prototype[_e]=Ue[_e]});const Y=m.RTCPeerConnection.prototype.setLocalDescription;m.RTCPeerConnection.prototype.setLocalDescription=function(){return arguments.length&&arguments[0].type?(arguments[0]=function(_e,Ce){let Ue=Ce.sdp;return Object.keys(_e._reverseStreams||[]).forEach($e=>{const Be=_e._reverseStreams[$e],at=_e._streams[Be.id];Ue=Ue.replace(new RegExp(Be.id,"g"),at.id)}),new RTCSessionDescription({type:Ce.type,sdp:Ue})}(this,arguments[0]),Y.apply(this,arguments)):Y.apply(this,arguments)};const oe=Object.getOwnPropertyDescriptor(m.RTCPeerConnection.prototype,"localDescription");Object.defineProperty(m.RTCPeerConnection.prototype,"localDescription",{get(){const _e=oe.get.apply(this);return""===_e.type?_e:L(this,_e)}}),m.RTCPeerConnection.prototype.removeTrack=function(_e){if("closed"===this.signalingState)throw new DOMException("The RTCPeerConnection's signalingState is 'closed'.","InvalidStateError");if(!_e._pc)throw new DOMException("Argument 1 of RTCPeerConnection.removeTrack does not implement interface RTCRtpSender.","TypeError");if(_e._pc!==this)throw new DOMException("Sender was not created by this connection.","InvalidAccessError");let Ce;this._streams=this._streams||{},Object.keys(this._streams).forEach(Ue=>{this._streams[Ue].getTracks().find($e=>_e.track===$e)&&(Ce=this._streams[Ue])}),Ce&&(1===Ce.getTracks().length?this.removeStream(this._reverseStreams[Ce.id]):Ce.removeTrack(_e.track),this.dispatchEvent(new Event("negotiationneeded")))}}function k(m){const a=c(m);if(!m.RTCPeerConnection&&m.webkitRTCPeerConnection&&(m.RTCPeerConnection=m.webkitRTCPeerConnection),!m.RTCPeerConnection)return;const u=0===m.RTCPeerConnection.prototype.addIceCandidate.length;a.version<53&&["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach(function(D){const L=m.RTCPeerConnection.prototype[D],Y={[D](){return arguments[0]=new("addIceCandidate"===D?m.RTCIceCandidate:m.RTCSessionDescription)(arguments[0]),L.apply(this,arguments)}};m.RTCPeerConnection.prototype[D]=Y[D]});const S=m.RTCPeerConnection.prototype.addIceCandidate;m.RTCPeerConnection.prototype.addIceCandidate=function(){return u||arguments[0]?a.version<78&&arguments[0]&&""===arguments[0].candidate?Promise.resolve():S.apply(this,arguments):(arguments[1]&&arguments[1].apply(null),Promise.resolve())}}function $(m){const a=c(m);T(m,"negotiationneeded",u=>{const S=u.target;if(!(a.version<72||S.getConfiguration&&"plan-b"===S.getConfiguration().sdpSemantics)||"stable"===S.signalingState)return u})}const ne=Object.freeze(Object.defineProperty({__proto__:null,fixNegotiationNeeded:$,shimAddTrackRemoveTrack:F,shimAddTrackRemoveTrackWithNative:O,shimGetDisplayMedia:function(m,a){m.navigator.mediaDevices&&"getDisplayMedia"in m.navigator.mediaDevices||m.navigator.mediaDevices&&("function"==typeof a?m.navigator.mediaDevices.getDisplayMedia=function(u){return a(u).then(S=>{const D=u.video&&u.video.width,L=u.video&&u.video.height;return u.video={mandatory:{chromeMediaSource:"desktop",chromeMediaSourceId:S,maxFrameRate:u.video&&u.video.frameRate||3}},D&&(u.video.mandatory.maxWidth=D),L&&(u.video.mandatory.maxHeight=L),m.navigator.mediaDevices.getUserMedia(u)})}:console.error("shimGetDisplayMedia: getSourceId argument is not a function"))},shimGetSendersWithDtmf:z,shimGetStats:H,shimGetUserMedia:B,shimMediaStream:j,shimOnTrack:re,shimPeerConnection:k,shimSenderReceiverGetStats:U},Symbol.toStringTag,{value:"Module"}));function te(m){return m&&m.__esModule&&Object.prototype.hasOwnProperty.call(m,"default")?m.default:m}var Z,se,fe,Se={exports:{}};function pe(){return Z||(Z=1,m=Se,(a={generateIdentifier:function(){return Math.random().toString(36).substr(2,10)}}).localCName=a.generateIdentifier(),a.splitLines=function(u){return u.trim().split("\n").map(function(S){return S.trim()})},a.splitSections=function(u){return u.split("\nm=").map(function(S,D){return(D>0?"m="+S:S).trim()+"\r\n"})},a.getDescription=function(u){var S=a.splitSections(u);return S&&S[0]},a.getMediaSections=function(u){var S=a.splitSections(u);return S.shift(),S},a.matchPrefix=function(u,S){return a.splitLines(u).filter(function(D){return 0===D.indexOf(S)})},a.parseCandidate=function(u){for(var S,D={foundation:(S=0===u.indexOf("a=candidate:")?u.substring(12).split(" "):u.substring(10).split(" "))[0],component:parseInt(S[1],10),protocol:S[2].toLowerCase(),priority:parseInt(S[3],10),ip:S[4],address:S[4],port:parseInt(S[5],10),type:S[7]},L=8;L0?S[0].split("/")[1]:"sendrecv",uri:S[1]}},a.writeExtmap=function(u){return"a=extmap:"+(u.id||u.preferredId)+(u.direction&&"sendrecv"!==u.direction?"/"+u.direction:"")+" "+u.uri+"\r\n"},a.parseFmtp=function(u){for(var S,D={},L=u.substr(u.indexOf(" ")+1).split(";"),Y=0;Y-1?(D.attribute=u.substr(S+1,L-S-1),D.value=u.substr(L+1)):D.attribute=u.substr(S+1),D},a.parseSsrcGroup=function(u){var S=u.substr(13).split(" ");return{semantics:S.shift(),ssrcs:S.map(function(D){return parseInt(D,10)})}},a.getMid=function(u){var S=a.matchPrefix(u,"a=mid:")[0];if(S)return S.substr(6)},a.parseFingerprint=function(u){var S=u.substr(14).split(" ");return{algorithm:S[0].toLowerCase(),value:S[1]}},a.getDtlsParameters=function(u,S){return{role:"auto",fingerprints:a.matchPrefix(u+S,"a=fingerprint:").map(a.parseFingerprint)}},a.writeDtlsParameters=function(u,S){var D="a=setup:"+S+"\r\n";return u.fingerprints.forEach(function(L){D+="a=fingerprint:"+L.algorithm+" "+L.value+"\r\n"}),D},a.parseCryptoLine=function(u){var S=u.substr(9).split(" ");return{tag:parseInt(S[0],10),cryptoSuite:S[1],keyParams:S[2],sessionParams:S.slice(3)}},a.writeCryptoLine=function(u){return"a=crypto:"+u.tag+" "+u.cryptoSuite+" "+("object"==typeof u.keyParams?a.writeCryptoKeyParams(u.keyParams):u.keyParams)+(u.sessionParams?" "+u.sessionParams.join(" "):"")+"\r\n"},a.parseCryptoKeyParams=function(u){if(0!==u.indexOf("inline:"))return null;var S=u.substr(7).split("|");return{keyMethod:"inline",keySalt:S[0],lifeTime:S[1],mkiValue:S[2]?S[2].split(":")[0]:void 0,mkiLength:S[2]?S[2].split(":")[1]:void 0}},a.writeCryptoKeyParams=function(u){return u.keyMethod+":"+u.keySalt+(u.lifeTime?"|"+u.lifeTime:"")+(u.mkiValue&&u.mkiLength?"|"+u.mkiValue+":"+u.mkiLength:"")},a.getCryptoParameters=function(u,S){return a.matchPrefix(u+S,"a=crypto:").map(a.parseCryptoLine)},a.getIceParameters=function(u,S){var D=a.matchPrefix(u+S,"a=ice-ufrag:")[0],L=a.matchPrefix(u+S,"a=ice-pwd:")[0];return D&&L?{usernameFragment:D.substr(12),password:L.substr(10)}:null},a.writeIceParameters=function(u){return"a=ice-ufrag:"+u.usernameFragment+"\r\na=ice-pwd:"+u.password+"\r\n"},a.parseRtpParameters=function(u){for(var S={codecs:[],headerExtensions:[],fecMechanisms:[],rtcp:[]},D=a.splitLines(u)[0].split(" "),L=3;L0?"9":"0",D+=" UDP/TLS/RTP/SAVPF ",D+=S.codecs.map(function(Y){return void 0!==Y.preferredPayloadType?Y.preferredPayloadType:Y.payloadType}).join(" ")+"\r\n",D+="c=IN IP4 0.0.0.0\r\n",D+="a=rtcp:9 IN IP4 0.0.0.0\r\n",S.codecs.forEach(function(Y){D+=a.writeRtpMap(Y),D+=a.writeFmtp(Y),D+=a.writeRtcpFb(Y)});var L=0;return S.codecs.forEach(function(Y){Y.maxptime>L&&(L=Y.maxptime)}),L>0&&(D+="a=maxptime:"+L+"\r\n"),D+="a=rtcp-mux\r\n",S.headerExtensions&&S.headerExtensions.forEach(function(Y){D+=a.writeExtmap(Y)}),D},a.parseRtpEncodingParameters=function(u){var S,D=[],L=a.parseRtpParameters(u),Y=-1!==L.fecMechanisms.indexOf("RED"),oe=-1!==L.fecMechanisms.indexOf("ULPFEC"),_e=a.matchPrefix(u,"a=ssrc:").map(function(Be){return a.parseSsrcMedia(Be)}).filter(function(Be){return"cname"===Be.attribute}),Ce=_e.length>0&&_e[0].ssrc,Ue=a.matchPrefix(u,"a=ssrc-group:FID").map(function(Be){return Be.substr(17).split(" ").map(function(at){return parseInt(at,10)})});Ue.length>0&&Ue[0].length>1&&Ue[0][0]===Ce&&(S=Ue[0][1]),L.codecs.forEach(function(Be){if("RTX"===Be.name.toUpperCase()&&Be.parameters.apt){var at={ssrc:Ce,codecPayloadType:parseInt(Be.parameters.apt,10)};Ce&&S&&(at.rtx={ssrc:S}),D.push(at),Y&&((at=JSON.parse(JSON.stringify(at))).fec={ssrc:Ce,mechanism:oe?"red+ulpfec":"red"},D.push(at))}}),0===D.length&&Ce&&D.push({ssrc:Ce});var $e=a.matchPrefix(u,"b=");return $e.length&&($e=0===$e[0].indexOf("b=TIAS:")?parseInt($e[0].substr(7),10):0===$e[0].indexOf("b=AS:")?1e3*parseInt($e[0].substr(5),10)*.95-16e3:void 0,D.forEach(function(Be){Be.maxBitrate=$e})),D},a.parseRtcpParameters=function(u){var S={},D=a.matchPrefix(u,"a=ssrc:").map(function(oe){return a.parseSsrcMedia(oe)}).filter(function(oe){return"cname"===oe.attribute})[0];D&&(S.cname=D.value,S.ssrc=D.ssrc);var L=a.matchPrefix(u,"a=rtcp-rsize");S.reducedSize=L.length>0,S.compound=0===L.length;var Y=a.matchPrefix(u,"a=rtcp-mux");return S.mux=Y.length>0,S},a.parseMsid=function(u){var S,D=a.matchPrefix(u,"a=msid:");if(1===D.length)return{stream:(S=D[0].substr(7).split(" "))[0],track:S[1]};var L=a.matchPrefix(u,"a=ssrc:").map(function(Y){return a.parseSsrcMedia(Y)}).filter(function(Y){return"msid"===Y.attribute});return L.length>0?{stream:(S=L[0].value.split(" "))[0],track:S[1]}:void 0},a.parseSctpDescription=function(u){var S,D=a.parseMLine(u),L=a.matchPrefix(u,"a=max-message-size:");L.length>0&&(S=parseInt(L[0].substr(19),10)),isNaN(S)&&(S=65536);var Y=a.matchPrefix(u,"a=sctp-port:");if(Y.length>0)return{port:parseInt(Y[0].substr(12),10),protocol:D.fmt,maxMessageSize:S};if(a.matchPrefix(u,"a=sctpmap:").length>0){var oe=a.matchPrefix(u,"a=sctpmap:")[0].substr(10).split(" ");return{port:parseInt(oe[0],10),protocol:oe[1],maxMessageSize:S}}},a.writeSctpDescription=function(u,S){var D=[];return D="DTLS/SCTP"!==u.protocol?["m="+u.kind+" 9 "+u.protocol+" "+S.protocol+"\r\n","c=IN IP4 0.0.0.0\r\n","a=sctp-port:"+S.port+"\r\n"]:["m="+u.kind+" 9 "+u.protocol+" "+S.port+"\r\n","c=IN IP4 0.0.0.0\r\n","a=sctpmap:"+S.port+" "+S.protocol+" 65535\r\n"],void 0!==S.maxMessageSize&&D.push("a=max-message-size:"+S.maxMessageSize+"\r\n"),D.join("")},a.generateSessionId=function(){return Math.random().toString().substr(2,21)},a.writeSessionBoilerplate=function(u,S,D){var L=void 0!==S?S:2;return"v=0\r\no="+(D||"thisisadapterortc")+" "+(u||a.generateSessionId())+" "+L+" IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\n"},a.writeMediaSection=function(u,S,D,L){var Y=a.writeRtpDescription(u.kind,S);if(Y+=a.writeIceParameters(u.iceGatherer.getLocalParameters()),Y+=a.writeDtlsParameters(u.dtlsTransport.getLocalParameters(),"offer"===D?"actpass":"active"),Y+="a=mid:"+u.mid+"\r\n",Y+=u.direction?"a="+u.direction+"\r\n":u.rtpSender&&u.rtpReceiver?"a=sendrecv\r\n":u.rtpSender?"a=sendonly\r\n":u.rtpReceiver?"a=recvonly\r\n":"a=inactive\r\n",u.rtpSender){var oe="msid:"+L.id+" "+u.rtpSender.track.id+"\r\n";Y+="a="+oe,Y+="a=ssrc:"+u.sendEncodingParameters[0].ssrc+" "+oe,u.sendEncodingParameters[0].rtx&&(Y+="a=ssrc:"+u.sendEncodingParameters[0].rtx.ssrc+" "+oe,Y+="a=ssrc-group:FID "+u.sendEncodingParameters[0].ssrc+" "+u.sendEncodingParameters[0].rtx.ssrc+"\r\n")}return Y+="a=ssrc:"+u.sendEncodingParameters[0].ssrc+" cname:"+a.localCName+"\r\n",u.rtpSender&&u.sendEncodingParameters[0].rtx&&(Y+="a=ssrc:"+u.sendEncodingParameters[0].rtx.ssrc+" cname:"+a.localCName+"\r\n"),Y},a.getDirection=function(u,S){for(var D=a.splitLines(u),L=0;L=14393&&-1===Mn.indexOf("?transport=udp"):(An=!0,!0)}),delete tn.url,tn.urls=Bn?Dn[0]:Dn,!!Dn.length}})),this._iceGatherers=[],Be.iceCandidatePoolSize)for(var dt=Be.iceCandidatePoolSize;dt>0;dt--)this._iceGatherers.push(new Y.RTCIceGatherer({iceServers:Be.iceServers,gatherPolicy:Be.iceTransportPolicy}));else Be.iceCandidatePoolSize=0;this._config=Be,this.transceivers=[],this._sdpSessionId=m.generateSessionId(),this._sdpSessionVersion=0,this._dtlsRole=void 0,this._isClosed=!1};Object.defineProperty(Ue.prototype,"localDescription",{configurable:!0,get:function(){return this._localDescription}}),Object.defineProperty(Ue.prototype,"remoteDescription",{configurable:!0,get:function(){return this._remoteDescription}}),Ue.prototype.onicecandidate=null,Ue.prototype.onaddstream=null,Ue.prototype.ontrack=null,Ue.prototype.onremovestream=null,Ue.prototype.onsignalingstatechange=null,Ue.prototype.oniceconnectionstatechange=null,Ue.prototype.onconnectionstatechange=null,Ue.prototype.onicegatheringstatechange=null,Ue.prototype.onnegotiationneeded=null,Ue.prototype.ondatachannel=null,Ue.prototype._dispatchEvent=function(Be,at){this._isClosed||(this.dispatchEvent(at),"function"==typeof this["on"+Be]&&this["on"+Be](at))},Ue.prototype._emitGatheringStateChange=function(){var Be=new Event("icegatheringstatechange");this._dispatchEvent("icegatheringstatechange",Be)},Ue.prototype.getConfiguration=function(){return this._config},Ue.prototype.getLocalStreams=function(){return this.localStreams},Ue.prototype.getRemoteStreams=function(){return this.remoteStreams},Ue.prototype._createTransceiver=function(Be,at){var dt={track:null,iceGatherer:null,iceTransport:null,dtlsTransport:null,localCapabilities:null,remoteCapabilities:null,rtpSender:null,rtpReceiver:null,kind:Be,mid:null,sendEncodingParameters:null,recvEncodingParameters:null,stream:null,associatedRemoteMediaStreams:[],wantReceive:!0};if(this.usingBundle&&this.transceivers.length>0)dt.iceTransport=this.transceivers[0].iceTransport,dt.dtlsTransport=this.transceivers[0].dtlsTransport;else{var kt=this._createIceAndDtlsTransports();dt.iceTransport=kt.iceTransport,dt.dtlsTransport=kt.dtlsTransport}return at||this.transceivers.push(dt),dt},Ue.prototype.addTrack=function(Be,at){if(this._isClosed)throw L("InvalidStateError","Attempted to call addTrack on a closed peerconnection.");var At;if(this.transceivers.find(function(kt){return kt.track===Be}))throw L("InvalidAccessError","Track already exists.");for(var dt=0;dt=15025)Be.getTracks().forEach(function(dt){at.addTrack(dt,Be)});else{var At=Be.clone();Be.getTracks().forEach(function(dt,kt){var _n=At.getTracks()[kt];dt.addEventListener("enabled",function(An){_n.enabled=An.enabled})}),At.getTracks().forEach(function(dt){at.addTrack(dt,At)})}},Ue.prototype.removeTrack=function(Be){if(this._isClosed)throw L("InvalidStateError","Attempted to call removeTrack on a closed peerconnection.");if(!(Be instanceof Y.RTCRtpSender))throw new TypeError("Argument 1 of RTCPeerConnection.removeTrack does not implement interface RTCRtpSender.");var at=this.transceivers.find(function(dt){return dt.rtpSender===Be});if(!at)throw L("InvalidAccessError","Sender was not created by this connection.");var At=at.stream;at.rtpSender.stop(),at.rtpSender=null,at.track=null,at.stream=null,-1===this.transceivers.map(function(dt){return dt.stream}).indexOf(At)&&this.localStreams.indexOf(At)>-1&&this.localStreams.splice(this.localStreams.indexOf(At),1),this._maybeFireNegotiationNeeded()},Ue.prototype.removeStream=function(Be){var at=this;Be.getTracks().forEach(function(At){var dt=at.getSenders().find(function(kt){return kt.track===At});dt&&at.removeTrack(dt)})},Ue.prototype.getSenders=function(){return this.transceivers.filter(function(Be){return!!Be.rtpSender}).map(function(Be){return Be.rtpSender})},Ue.prototype.getReceivers=function(){return this.transceivers.filter(function(Be){return!!Be.rtpReceiver}).map(function(Be){return Be.rtpReceiver})},Ue.prototype._createIceGatherer=function(Be,at){var At=this;if(at&&Be>0)return this.transceivers[0].iceGatherer;if(this._iceGatherers.length)return this._iceGatherers.shift();var dt=new Y.RTCIceGatherer({iceServers:this._config.iceServers,gatherPolicy:this._config.iceTransportPolicy});return Object.defineProperty(dt,"state",{value:"new",writable:!0}),this.transceivers[Be].bufferedCandidateEvents=[],this.transceivers[Be].bufferCandidates=function(kt){var _n=!kt.candidate||0===Object.keys(kt.candidate).length;dt.state=_n?"completed":"gathering",null!==At.transceivers[Be].bufferedCandidateEvents&&At.transceivers[Be].bufferedCandidateEvents.push(kt)},dt.addEventListener("localcandidate",this.transceivers[Be].bufferCandidates),dt},Ue.prototype._gather=function(Be,at){var At=this,dt=this.transceivers[at].iceGatherer;if(!dt.onlocalcandidate){var kt=this.transceivers[at].bufferedCandidateEvents;this.transceivers[at].bufferedCandidateEvents=null,dt.removeEventListener("localcandidate",this.transceivers[at].bufferCandidates),dt.onlocalcandidate=function(_n){if(!(At.usingBundle&&at>0)){var An=new Event("icecandidate");An.candidate={sdpMid:Be,sdpMLineIndex:at};var tn=_n.candidate,Dn=!tn||0===Object.keys(tn).length;if(Dn)"new"!==dt.state&&"gathering"!==dt.state||(dt.state="completed");else{"new"===dt.state&&(dt.state="gathering"),tn.component=1,tn.ufrag=dt.getLocalParameters().usernameFragment;var Bn=m.writeCandidate(tn);An.candidate=Object.assign(An.candidate,m.parseCandidate(Bn)),An.candidate.candidate=Bn,An.candidate.toJSON=function(){return{candidate:An.candidate.candidate,sdpMid:An.candidate.sdpMid,sdpMLineIndex:An.candidate.sdpMLineIndex,usernameFragment:An.candidate.usernameFragment}}}var Mn=m.getMediaSections(At._localDescription.sdp);Mn[An.candidate.sdpMLineIndex]+=Dn?"a=end-of-candidates\r\n":"a="+An.candidate.candidate+"\r\n",At._localDescription.sdp=m.getDescription(At._localDescription.sdp)+Mn.join("");var ci=At.transceivers.every(function(li){return li.iceGatherer&&"completed"===li.iceGatherer.state});"gathering"!==At.iceGatheringState&&(At.iceGatheringState="gathering",At._emitGatheringStateChange()),Dn||At._dispatchEvent("icecandidate",An),ci&&(At._dispatchEvent("icecandidate",new Event("icecandidate")),At.iceGatheringState="complete",At._emitGatheringStateChange())}},Y.setTimeout(function(){kt.forEach(function(_n){dt.onlocalcandidate(_n)})},0)}},Ue.prototype._createIceAndDtlsTransports=function(){var Be=this,at=new Y.RTCIceTransport(null);at.onicestatechange=function(){Be._updateIceConnectionState(),Be._updateConnectionState()};var At=new Y.RTCDtlsTransport(at);return At.ondtlsstatechange=function(){Be._updateConnectionState()},At.onerror=function(){Object.defineProperty(At,"state",{value:"failed",writable:!0}),Be._updateConnectionState()},{iceTransport:at,dtlsTransport:At}},Ue.prototype._disposeIceAndDtlsTransports=function(Be){var at=this.transceivers[Be].iceGatherer;at&&(delete at.onlocalcandidate,delete this.transceivers[Be].iceGatherer);var At=this.transceivers[Be].iceTransport;At&&(delete At.onicestatechange,delete this.transceivers[Be].iceTransport);var dt=this.transceivers[Be].dtlsTransport;dt&&(delete dt.ondtlsstatechange,delete dt.onerror,delete this.transceivers[Be].dtlsTransport)},Ue.prototype._transceive=function(Be,at,At){var dt=u(Be.localCapabilities,Be.remoteCapabilities);at&&Be.rtpSender&&(dt.encodings=Be.sendEncodingParameters,dt.rtcp={cname:m.localCName,compound:Be.rtcpParameters.compound},Be.recvEncodingParameters.length&&(dt.rtcp.ssrc=Be.recvEncodingParameters[0].ssrc),Be.rtpSender.send(dt)),At&&Be.rtpReceiver&&dt.codecs.length>0&&("video"===Be.kind&&Be.recvEncodingParameters&&oe<15019&&Be.recvEncodingParameters.forEach(function(kt){delete kt.rtx}),dt.encodings=Be.recvEncodingParameters.length?Be.recvEncodingParameters:[{}],dt.rtcp={compound:Be.rtcpParameters.compound},Be.rtcpParameters.cname&&(dt.rtcp.cname=Be.rtcpParameters.cname),Be.sendEncodingParameters.length&&(dt.rtcp.ssrc=Be.sendEncodingParameters[0].ssrc),Be.rtpReceiver.receive(dt))},Ue.prototype.setLocalDescription=function(Be){var at,At,dt=this;if(-1===["offer","answer"].indexOf(Be.type))return Promise.reject(L("TypeError",'Unsupported type "'+Be.type+'"'));if(!S("setLocalDescription",Be.type,dt.signalingState)||dt._isClosed)return Promise.reject(L("InvalidStateError","Can not set local "+Be.type+" in state "+dt.signalingState));if("offer"===Be.type)at=m.splitSections(Be.sdp),At=at.shift(),at.forEach(function(_n,An){var tn=m.parseRtpParameters(_n);dt.transceivers[An].localCapabilities=tn}),dt.transceivers.forEach(function(_n,An){dt._gather(_n.mid,An)});else if("answer"===Be.type){at=m.splitSections(dt._remoteDescription.sdp),At=at.shift();var kt=m.matchPrefix(At,"a=ice-lite").length>0;at.forEach(function(_n,An){var tn=dt.transceivers[An],Dn=tn.iceGatherer,Bn=tn.iceTransport,Mn=tn.dtlsTransport,ci=tn.localCapabilities,li=tn.remoteCapabilities;if(!(m.isRejected(_n)&&0===m.matchPrefix(_n,"a=bundle-only").length||tn.rejected)){var mi=m.getIceParameters(_n,At),Vi=m.getDtlsParameters(_n,At);kt&&(Vi.role="server"),dt.usingBundle&&0!==An||(dt._gather(tn.mid,An),"new"===Bn.state&&Bn.start(Dn,mi,kt?"controlling":"controlled"),"new"===Mn.state&&Mn.start(Vi));var Xi=u(ci,li);dt._transceive(tn,Xi.codecs.length>0,!1)}})}return dt._localDescription={type:Be.type,sdp:Be.sdp},dt._updateSignalingState("offer"===Be.type?"have-local-offer":"stable"),Promise.resolve()},Ue.prototype.setRemoteDescription=function(Be){var at=this;if(-1===["offer","answer"].indexOf(Be.type))return Promise.reject(L("TypeError",'Unsupported type "'+Be.type+'"'));if(!S("setRemoteDescription",Be.type,at.signalingState)||at._isClosed)return Promise.reject(L("InvalidStateError","Can not set remote "+Be.type+" in state "+at.signalingState));var At={};at.remoteStreams.forEach(function(Bn){At[Bn.id]=Bn});var dt=[],kt=m.splitSections(Be.sdp),_n=kt.shift(),An=m.matchPrefix(_n,"a=ice-lite").length>0,tn=m.matchPrefix(_n,"a=group:BUNDLE ").length>0;at.usingBundle=tn;var Dn=m.matchPrefix(_n,"a=ice-options:")[0];return at.canTrickleIceCandidates=!!Dn&&Dn.substr(14).split(" ").indexOf("trickle")>=0,kt.forEach(function(Bn,Mn){var ci=m.splitLines(Bn),li=m.getKind(Bn),mi=m.isRejected(Bn)&&0===m.matchPrefix(Bn,"a=bundle-only").length,Vi=ci[0].substr(2).split(" ")[2],Xi=m.getDirection(Bn,_n),Ii=m.parseMsid(Bn),rr=m.getMid(Bn)||m.generateIdentifier();if(mi||"application"===li&&("DTLS/SCTP"===Vi||"UDP/DTLS/SCTP"===Vi))at.transceivers[Mn]={mid:rr,kind:li,protocol:Vi,rejected:!0};else{var Li,Or,eo,ao,Tr,Xn,Wi,Lo,$r;!mi&&at.transceivers[Mn]&&at.transceivers[Mn].rejected&&(at.transceivers[Mn]=at._createTransceiver(li,!0));var Hr,fa,la=m.parseRtpParameters(Bn);mi||(Hr=m.getIceParameters(Bn,_n),(fa=m.getDtlsParameters(Bn,_n)).role="client"),Wi=m.parseRtpEncodingParameters(Bn);var Io=m.parseRtcpParameters(Bn),Ps=m.matchPrefix(Bn,"a=end-of-candidates",_n).length>0,Cs=m.matchPrefix(Bn,"a=candidate:").map(function(Qi){return m.parseCandidate(Qi)}).filter(function(Qi){return 1===Qi.component});if(("offer"===Be.type||"answer"===Be.type)&&!mi&&tn&&Mn>0&&at.transceivers[Mn]&&(at._disposeIceAndDtlsTransports(Mn),at.transceivers[Mn].iceGatherer=at.transceivers[0].iceGatherer,at.transceivers[Mn].iceTransport=at.transceivers[0].iceTransport,at.transceivers[Mn].dtlsTransport=at.transceivers[0].dtlsTransport,at.transceivers[Mn].rtpSender&&at.transceivers[Mn].rtpSender.setTransport(at.transceivers[0].dtlsTransport),at.transceivers[Mn].rtpReceiver&&at.transceivers[Mn].rtpReceiver.setTransport(at.transceivers[0].dtlsTransport)),"offer"!==Be.type||mi)"answer"!==Be.type||mi||(Or=(Li=at.transceivers[Mn]).iceGatherer,eo=Li.iceTransport,ao=Li.dtlsTransport,Tr=Li.rtpReceiver,Xn=Li.sendEncodingParameters,Lo=Li.localCapabilities,at.transceivers[Mn].recvEncodingParameters=Wi,at.transceivers[Mn].remoteCapabilities=la,at.transceivers[Mn].rtcpParameters=Io,Cs.length&&"new"===eo.state&&(!An&&!Ps||tn&&0!==Mn?Cs.forEach(function(Qi){D(Li.iceTransport,Qi)}):eo.setRemoteCandidates(Cs)),tn&&0!==Mn||("new"===eo.state&&eo.start(Or,Hr,"controlling"),"new"===ao.state&&ao.start(fa)),!u(Li.localCapabilities,Li.remoteCapabilities).codecs.filter(function(Qi){return"rtx"===Qi.name.toLowerCase()}).length&&Li.sendEncodingParameters[0].rtx&&delete Li.sendEncodingParameters[0].rtx,at._transceive(Li,"sendrecv"===Xi||"recvonly"===Xi,"sendrecv"===Xi||"sendonly"===Xi),!Tr||"sendrecv"!==Xi&&"sendonly"!==Xi?delete Li.rtpReceiver:($r=Tr.track,Ii?(At[Ii.stream]||(At[Ii.stream]=new Y.MediaStream),_e($r,At[Ii.stream]),dt.push([$r,Tr,At[Ii.stream]])):(At.default||(At.default=new Y.MediaStream),_e($r,At.default),dt.push([$r,Tr,At.default]))));else{(Li=at.transceivers[Mn]||at._createTransceiver(li)).mid=rr,Li.iceGatherer||(Li.iceGatherer=at._createIceGatherer(Mn,tn)),Cs.length&&"new"===Li.iceTransport.state&&(!Ps||tn&&0!==Mn?Cs.forEach(function(Qi){D(Li.iceTransport,Qi)}):Li.iceTransport.setRemoteCandidates(Cs)),Lo=Y.RTCRtpReceiver.getCapabilities(li),oe<15019&&(Lo.codecs=Lo.codecs.filter(function(Qi){return"rtx"!==Qi.name})),Xn=Li.sendEncodingParameters||[{ssrc:1001*(2*Mn+2)}];var wa,Za=!1;"sendrecv"===Xi||"sendonly"===Xi?(Za=!Li.rtpReceiver,Tr=Li.rtpReceiver||new Y.RTCRtpReceiver(Li.dtlsTransport,li),Za&&($r=Tr.track,Ii&&"-"===Ii.stream||(Ii?(At[Ii.stream]||(At[Ii.stream]=new Y.MediaStream,Object.defineProperty(At[Ii.stream],"id",{get:function(){return Ii.stream}})),Object.defineProperty($r,"id",{get:function(){return Ii.track}}),wa=At[Ii.stream]):(At.default||(At.default=new Y.MediaStream),wa=At.default)),wa&&(_e($r,wa),Li.associatedRemoteMediaStreams.push(wa)),dt.push([$r,Tr,wa]))):Li.rtpReceiver&&Li.rtpReceiver.track&&(Li.associatedRemoteMediaStreams.forEach(function(Qi){var Vs,Ma,Qo=Qi.getTracks().find(function(Vs){return Vs.id===Li.rtpReceiver.track.id});Qo&&((Ma=Qi).removeTrack(Vs=Qo),Ma.dispatchEvent(new Y.MediaStreamTrackEvent("removetrack",{track:Vs})))}),Li.associatedRemoteMediaStreams=[]),Li.localCapabilities=Lo,Li.remoteCapabilities=la,Li.rtpReceiver=Tr,Li.rtcpParameters=Io,Li.sendEncodingParameters=Xn,Li.recvEncodingParameters=Wi,at._transceive(at.transceivers[Mn],!1,Za)}}}),void 0===at._dtlsRole&&(at._dtlsRole="offer"===Be.type?"active":"passive"),at._remoteDescription={type:Be.type,sdp:Be.sdp},at._updateSignalingState("offer"===Be.type?"have-remote-offer":"stable"),Object.keys(At).forEach(function(Bn){var Mn=At[Bn];if(Mn.getTracks().length){if(-1===at.remoteStreams.indexOf(Mn)){at.remoteStreams.push(Mn);var ci=new Event("addstream");ci.stream=Mn,Y.setTimeout(function(){at._dispatchEvent("addstream",ci)})}dt.forEach(function(li){Mn.id===li[2].id&&Ce(at,li[0],li[1],[Mn])})}}),dt.forEach(function(Bn){Bn[2]||Ce(at,Bn[0],Bn[1],[])}),Y.setTimeout(function(){at&&at.transceivers&&at.transceivers.forEach(function(Bn){Bn.iceTransport&&"new"===Bn.iceTransport.state&&Bn.iceTransport.getRemoteCandidates().length>0&&(console.warn("Timeout for addRemoteCandidate. Consider sending an end-of-candidates notification"),Bn.iceTransport.addRemoteCandidate({}))})},4e3),Promise.resolve()},Ue.prototype.close=function(){this.transceivers.forEach(function(Be){Be.iceTransport&&Be.iceTransport.stop(),Be.dtlsTransport&&Be.dtlsTransport.stop(),Be.rtpSender&&Be.rtpSender.stop(),Be.rtpReceiver&&Be.rtpReceiver.stop()}),this._isClosed=!0,this._updateSignalingState("closed")},Ue.prototype._updateSignalingState=function(Be){this.signalingState=Be;var at=new Event("signalingstatechange");this._dispatchEvent("signalingstatechange",at)},Ue.prototype._maybeFireNegotiationNeeded=function(){var Be=this;"stable"===this.signalingState&&!0!==this.needNegotiation&&(this.needNegotiation=!0,Y.setTimeout(function(){if(Be.needNegotiation){Be.needNegotiation=!1;var at=new Event("negotiationneeded");Be._dispatchEvent("negotiationneeded",at)}},0))},Ue.prototype._updateIceConnectionState=function(){var Be,at={new:0,closed:0,checking:0,connected:0,completed:0,disconnected:0,failed:0};if(this.transceivers.forEach(function(dt){dt.iceTransport&&!dt.rejected&&at[dt.iceTransport.state]++}),Be="new",at.failed>0?Be="failed":at.checking>0?Be="checking":at.disconnected>0?Be="disconnected":at.new>0?Be="new":at.connected>0?Be="connected":at.completed>0&&(Be="completed"),Be!==this.iceConnectionState){this.iceConnectionState=Be;var At=new Event("iceconnectionstatechange");this._dispatchEvent("iceconnectionstatechange",At)}},Ue.prototype._updateConnectionState=function(){var Be,at={new:0,closed:0,connecting:0,connected:0,completed:0,disconnected:0,failed:0};if(this.transceivers.forEach(function(dt){dt.iceTransport&&dt.dtlsTransport&&!dt.rejected&&(at[dt.iceTransport.state]++,at[dt.dtlsTransport.state]++)}),at.connected+=at.completed,Be="new",at.failed>0?Be="failed":at.connecting>0?Be="connecting":at.disconnected>0?Be="disconnected":at.new>0?Be="new":at.connected>0&&(Be="connected"),Be!==this.connectionState){this.connectionState=Be;var At=new Event("connectionstatechange");this._dispatchEvent("connectionstatechange",At)}},Ue.prototype.createOffer=function(){var Be=this;if(Be._isClosed)return Promise.reject(L("InvalidStateError","Can not call createOffer after close"));var at=Be.transceivers.filter(function(An){return"audio"===An.kind}).length,At=Be.transceivers.filter(function(An){return"video"===An.kind}).length,dt=arguments[0];if(dt){if(dt.mandatory||dt.optional)throw new TypeError("Legacy mandatory/optional constraints not supported.");void 0!==dt.offerToReceiveAudio&&(at=!0===dt.offerToReceiveAudio?1:!1===dt.offerToReceiveAudio?0:dt.offerToReceiveAudio),void 0!==dt.offerToReceiveVideo&&(At=!0===dt.offerToReceiveVideo?1:!1===dt.offerToReceiveVideo?0:dt.offerToReceiveVideo)}for(Be.transceivers.forEach(function(An){"audio"===An.kind?--at<0&&(An.wantReceive=!1):"video"===An.kind&&--At<0&&(An.wantReceive=!1)});at>0||At>0;)at>0&&(Be._createTransceiver("audio"),at--),At>0&&(Be._createTransceiver("video"),At--);var kt=m.writeSessionBoilerplate(Be._sdpSessionId,Be._sdpSessionVersion++);Be.transceivers.forEach(function(An,tn){var Dn=An.track,Bn=An.kind,Mn=An.mid||m.generateIdentifier();An.mid=Mn,An.iceGatherer||(An.iceGatherer=Be._createIceGatherer(tn,Be.usingBundle));var ci=Y.RTCRtpSender.getCapabilities(Bn);oe<15019&&(ci.codecs=ci.codecs.filter(function(mi){return"rtx"!==mi.name})),ci.codecs.forEach(function(mi){"H264"===mi.name&&void 0===mi.parameters["level-asymmetry-allowed"]&&(mi.parameters["level-asymmetry-allowed"]="1"),An.remoteCapabilities&&An.remoteCapabilities.codecs&&An.remoteCapabilities.codecs.forEach(function(Vi){mi.name.toLowerCase()===Vi.name.toLowerCase()&&mi.clockRate===Vi.clockRate&&(mi.preferredPayloadType=Vi.payloadType)})}),ci.headerExtensions.forEach(function(mi){(An.remoteCapabilities&&An.remoteCapabilities.headerExtensions||[]).forEach(function(Vi){mi.uri===Vi.uri&&(mi.id=Vi.id)})});var li=An.sendEncodingParameters||[{ssrc:1001*(2*tn+1)}];Dn&&oe>=15019&&"video"===Bn&&!li[0].rtx&&(li[0].rtx={ssrc:li[0].ssrc+1}),An.wantReceive&&(An.rtpReceiver=new Y.RTCRtpReceiver(An.dtlsTransport,Bn)),An.localCapabilities=ci,An.sendEncodingParameters=li}),"max-compat"!==Be._config.bundlePolicy&&(kt+="a=group:BUNDLE "+Be.transceivers.map(function(An){return An.mid}).join(" ")+"\r\n"),kt+="a=ice-options:trickle\r\n",Be.transceivers.forEach(function(An,tn){kt+=a(An,An.localCapabilities,"offer",An.stream,Be._dtlsRole),kt+="a=rtcp-rsize\r\n",!An.iceGatherer||"new"===Be.iceGatheringState||0!==tn&&Be.usingBundle||(An.iceGatherer.getLocalCandidates().forEach(function(Dn){Dn.component=1,kt+="a="+m.writeCandidate(Dn)+"\r\n"}),"completed"===An.iceGatherer.state&&(kt+="a=end-of-candidates\r\n"))});var _n=new Y.RTCSessionDescription({type:"offer",sdp:kt});return Promise.resolve(_n)},Ue.prototype.createAnswer=function(){var Be=this;if(Be._isClosed)return Promise.reject(L("InvalidStateError","Can not call createAnswer after close"));if("have-remote-offer"!==Be.signalingState&&"have-local-pranswer"!==Be.signalingState)return Promise.reject(L("InvalidStateError","Can not call createAnswer in signalingState "+Be.signalingState));var at=m.writeSessionBoilerplate(Be._sdpSessionId,Be._sdpSessionVersion++);Be.usingBundle&&(at+="a=group:BUNDLE "+Be.transceivers.map(function(kt){return kt.mid}).join(" ")+"\r\n"),at+="a=ice-options:trickle\r\n";var At=m.getMediaSections(Be._remoteDescription.sdp).length;Be.transceivers.forEach(function(kt,_n){if(!(_n+1>At)){if(kt.rejected)return"application"===kt.kind?at+="DTLS/SCTP"===kt.protocol?"m=application 0 DTLS/SCTP 5000\r\n":"m=application 0 "+kt.protocol+" webrtc-datachannel\r\n":"audio"===kt.kind?at+="m=audio 0 UDP/TLS/RTP/SAVPF 0\r\na=rtpmap:0 PCMU/8000\r\n":"video"===kt.kind&&(at+="m=video 0 UDP/TLS/RTP/SAVPF 120\r\na=rtpmap:120 VP8/90000\r\n"),void(at+="c=IN IP4 0.0.0.0\r\na=inactive\r\na=mid:"+kt.mid+"\r\n");var An;kt.stream&&("audio"===kt.kind?An=kt.stream.getAudioTracks()[0]:"video"===kt.kind&&(An=kt.stream.getVideoTracks()[0]),An&&oe>=15019&&"video"===kt.kind&&!kt.sendEncodingParameters[0].rtx&&(kt.sendEncodingParameters[0].rtx={ssrc:kt.sendEncodingParameters[0].ssrc+1}));var tn=u(kt.localCapabilities,kt.remoteCapabilities);!tn.codecs.filter(function(Dn){return"rtx"===Dn.name.toLowerCase()}).length&&kt.sendEncodingParameters[0].rtx&&delete kt.sendEncodingParameters[0].rtx,at+=a(kt,tn,"answer",kt.stream,Be._dtlsRole),kt.rtcpParameters&&kt.rtcpParameters.reducedSize&&(at+="a=rtcp-rsize\r\n")}});var dt=new Y.RTCSessionDescription({type:"answer",sdp:at});return Promise.resolve(dt)},Ue.prototype.addIceCandidate=function(Be){var at,At=this;return Be&&void 0===Be.sdpMLineIndex&&!Be.sdpMid?Promise.reject(new TypeError("sdpMLineIndex or sdpMid required")):new Promise(function(dt,kt){if(!At._remoteDescription)return kt(L("InvalidStateError","Can not add ICE candidate without a remote description"));if(Be&&""!==Be.candidate){var _n=Be.sdpMLineIndex;if(Be.sdpMid)for(var An=0;An0?m.parseCandidate(Be.candidate):{};if("tcp"===Dn.protocol&&(0===Dn.port||9===Dn.port)||Dn.component&&1!==Dn.component)return dt();if((0===_n||_n>0&&tn.iceTransport!==At.transceivers[0].iceTransport)&&!D(tn.iceTransport,Dn))return kt(L("OperationError","Can not add ICE candidate"));var Bn=Be.candidate.trim();0===Bn.indexOf("a=")&&(Bn=Bn.substr(2)),(at=m.getMediaSections(At._remoteDescription.sdp))[_n]+="a="+(Dn.type?Bn:"end-of-candidates")+"\r\n",At._remoteDescription.sdp=m.getDescription(At._remoteDescription.sdp)+at.join("")}else for(var Mn=0;Mn{return Promise.reject({name:{PermissionDeniedError:"NotAllowedError"}[(L=D).name]||L.name,message:L.message,constraint:L.constraint,toString(){return this.name}});var L})}}function W(m){"getDisplayMedia"in m.navigator&&m.navigator.mediaDevices&&(m.navigator.mediaDevices&&"getDisplayMedia"in m.navigator.mediaDevices||(m.navigator.mediaDevices.getDisplayMedia=m.navigator.getDisplayMedia.bind(m.navigator)))}function ee(m){const a=c(m);if(m.RTCIceGatherer&&(m.RTCIceCandidate||(m.RTCIceCandidate=function(S){return S}),m.RTCSessionDescription||(m.RTCSessionDescription=function(S){return S}),a.version<15025)){const S=Object.getOwnPropertyDescriptor(m.MediaStreamTrack.prototype,"enabled");Object.defineProperty(m.MediaStreamTrack.prototype,"enabled",{set(D){S.set.call(this,D);const L=new Event("enabled");L.enabled=D,this.dispatchEvent(L)}})}m.RTCRtpSender&&!("dtmf"in m.RTCRtpSender.prototype)&&Object.defineProperty(m.RTCRtpSender.prototype,"dtmf",{get(){return void 0===this._dtmf&&("audio"===this.track.kind?this._dtmf=new m.RTCDtmfSender(this):"video"===this.track.kind&&(this._dtmf=null)),this._dtmf}}),m.RTCDtmfSender&&!m.RTCDTMFSender&&(m.RTCDTMFSender=m.RTCDtmfSender);const u=q(m,a.version);m.RTCPeerConnection=function(S){return S&&S.iceServers&&(S.iceServers=function(D){let L=!1;return(D=JSON.parse(JSON.stringify(D))).filter(Y=>{if(Y&&(Y.urls||Y.url)){var oe=Y.urls||Y.url;Y.url&&!Y.urls&&b("RTCIceServer.url","RTCIceServer.urls");const _e="string"==typeof oe;return _e&&(oe=[oe]),oe=oe.filter(Ce=>{if(0===Ce.indexOf("stun:"))return!1;const Ue=Ce.startsWith("turn")&&!Ce.startsWith("turn:[")&&Ce.includes("transport=udp");return Ue&&!L?(L=!0,!0):Ue&&!L}),delete Y.url,Y.urls=_e?oe[0]:oe,!!oe.length}})}(S.iceServers),y("ICE servers after filtering:",S.iceServers)),new u(S)},m.RTCPeerConnection.prototype=u.prototype}function X(m){m.RTCRtpSender&&!("replaceTrack"in m.RTCRtpSender.prototype)&&(m.RTCRtpSender.prototype.replaceTrack=m.RTCRtpSender.prototype.setTrack)}const ae=Object.freeze(Object.defineProperty({__proto__:null,shimGetDisplayMedia:W,shimGetUserMedia:J,shimPeerConnection:ee,shimReplaceTrack:X},Symbol.toStringTag,{value:"Module"}));function de(m){const a=c(m),u=m&&m.navigator,S=m&&m.MediaStreamTrack;if(u.getUserMedia=function(D,L,Y){b("navigator.getUserMedia","navigator.mediaDevices.getUserMedia"),u.mediaDevices.getUserMedia(D).then(L,Y)},!(a.version>55&&"autoGainControl"in u.mediaDevices.getSupportedConstraints())){const D=function(Y,oe,_e){oe in Y&&!(_e in Y)&&(Y[_e]=Y[oe],delete Y[oe])},L=u.mediaDevices.getUserMedia.bind(u.mediaDevices);if(u.mediaDevices.getUserMedia=function(Y){return"object"==typeof Y&&"object"==typeof Y.audio&&(Y=JSON.parse(JSON.stringify(Y)),D(Y.audio,"autoGainControl","mozAutoGainControl"),D(Y.audio,"noiseSuppression","mozNoiseSuppression")),L(Y)},S&&S.prototype.getSettings){const Y=S.prototype.getSettings;S.prototype.getSettings=function(){const oe=Y.apply(this,arguments);return D(oe,"mozAutoGainControl","autoGainControl"),D(oe,"mozNoiseSuppression","noiseSuppression"),oe}}if(S&&S.prototype.applyConstraints){const Y=S.prototype.applyConstraints;S.prototype.applyConstraints=function(oe){return"audio"===this.kind&&"object"==typeof oe&&(oe=JSON.parse(JSON.stringify(oe)),D(oe,"autoGainControl","mozAutoGainControl"),D(oe,"noiseSuppression","mozNoiseSuppression")),Y.apply(this,[oe])}}}}function Pe(m){"object"==typeof m&&m.RTCTrackEvent&&"receiver"in m.RTCTrackEvent.prototype&&!("transceiver"in m.RTCTrackEvent.prototype)&&Object.defineProperty(m.RTCTrackEvent.prototype,"transceiver",{get(){return{receiver:this.receiver}}})}function ye(m){const a=c(m);if("object"!=typeof m||!m.RTCPeerConnection&&!m.mozRTCPeerConnection)return;if(!m.RTCPeerConnection&&m.mozRTCPeerConnection&&(m.RTCPeerConnection=m.mozRTCPeerConnection),a.version<53&&["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach(function(D){const L=m.RTCPeerConnection.prototype[D],Y={[D](){return arguments[0]=new("addIceCandidate"===D?m.RTCIceCandidate:m.RTCSessionDescription)(arguments[0]),L.apply(this,arguments)}};m.RTCPeerConnection.prototype[D]=Y[D]}),a.version<68){const D=m.RTCPeerConnection.prototype.addIceCandidate;m.RTCPeerConnection.prototype.addIceCandidate=function(){return arguments[0]?arguments[0]&&""===arguments[0].candidate?Promise.resolve():D.apply(this,arguments):(arguments[1]&&arguments[1].apply(null),Promise.resolve())}}const u={inboundrtp:"inbound-rtp",outboundrtp:"outbound-rtp",candidatepair:"candidate-pair",localcandidate:"local-candidate",remotecandidate:"remote-candidate"},S=m.RTCPeerConnection.prototype.getStats;m.RTCPeerConnection.prototype.getStats=function(){const[D,L,Y]=arguments;return S.apply(this,[D||null]).then(oe=>{if(a.version<53&&!L)try{oe.forEach(_e=>{_e.type=u[_e.type]||_e.type})}catch(_e){if("TypeError"!==_e.name)throw _e;oe.forEach((Ce,Ue)=>{oe.set(Ue,Object.assign({},Ce,{type:u[Ce.type]||Ce.type}))})}return oe}).then(L,Y)}}function Le(m){if("object"!=typeof m||!m.RTCPeerConnection||!m.RTCRtpSender||m.RTCRtpSender&&"getStats"in m.RTCRtpSender.prototype)return;const a=m.RTCPeerConnection.prototype.getSenders;a&&(m.RTCPeerConnection.prototype.getSenders=function(){const S=a.apply(this,[]);return S.forEach(D=>D._pc=this),S});const u=m.RTCPeerConnection.prototype.addTrack;u&&(m.RTCPeerConnection.prototype.addTrack=function(){const S=u.apply(this,arguments);return S._pc=this,S}),m.RTCRtpSender.prototype.getStats=function(){return this.track?this._pc.getStats(this.track):Promise.resolve(new Map)}}function Xe(m){if("object"!=typeof m||!m.RTCPeerConnection||!m.RTCRtpSender||m.RTCRtpSender&&"getStats"in m.RTCRtpReceiver.prototype)return;const a=m.RTCPeerConnection.prototype.getReceivers;a&&(m.RTCPeerConnection.prototype.getReceivers=function(){const u=a.apply(this,[]);return u.forEach(S=>S._pc=this),u}),T(m,"track",u=>(u.receiver._pc=u.srcElement,u)),m.RTCRtpReceiver.prototype.getStats=function(){return this._pc.getStats(this.track)}}function ie(m){m.RTCPeerConnection&&!("removeStream"in m.RTCPeerConnection.prototype)&&(m.RTCPeerConnection.prototype.removeStream=function(a){b("removeStream","removeTrack"),this.getSenders().forEach(u=>{u.track&&a.getTracks().includes(u.track)&&this.removeTrack(u)})})}function K(m){m.DataChannel&&!m.RTCDataChannel&&(m.RTCDataChannel=m.DataChannel)}function ce(m){if("object"!=typeof m||!m.RTCPeerConnection)return;const a=m.RTCPeerConnection.prototype.addTransceiver;a&&(m.RTCPeerConnection.prototype.addTransceiver=function(){this.setParametersPromises=[];const u=arguments[1],S=u&&"sendEncodings"in u;S&&u.sendEncodings.forEach(L=>{if("rid"in L&&!/^[a-z0-9]{0,16}$/i.test(L.rid))throw new TypeError("Invalid RID value provided.");if("scaleResolutionDownBy"in L&&!(parseFloat(L.scaleResolutionDownBy)>=1))throw new RangeError("scale_resolution_down_by must be >= 1.0");if("maxFramerate"in L&&!(parseFloat(L.maxFramerate)>=0))throw new RangeError("max_framerate must be >= 0.0")});const D=a.apply(this,arguments);if(S){const{sender:L}=D,Y=L.getParameters();"encodings"in Y||(Y.encodings=u.sendEncodings,L.sendEncodings=u.sendEncodings,this.setParametersPromises.push(L.setParameters(Y).then(()=>{delete L.sendEncodings}).catch(()=>{delete L.sendEncodings})))}return D})}function ge(m){if("object"!=typeof m||!m.RTCRtpSender)return;const a=m.RTCRtpSender.prototype.getParameters;a&&(m.RTCRtpSender.prototype.getParameters=function(){var u=a.apply(this,arguments);return"sendEncodings"in this?Object.assign({},{encodings:this.sendEncodings},u):u})}function Oe(m){if("object"!=typeof m||!m.RTCPeerConnection)return;const a=m.RTCPeerConnection.prototype.createOffer;m.RTCPeerConnection.prototype.createOffer=function(){return this.setParametersPromises&&this.setParametersPromises.length?Promise.all(this.setParametersPromises).then(()=>a.apply(this,arguments)).finally(()=>{this.setParametersPromises=[]}):a.apply(this,arguments)}}function Ie(m){if("object"!=typeof m||!m.RTCPeerConnection)return;const a=m.RTCPeerConnection.prototype.createAnswer;m.RTCPeerConnection.prototype.createAnswer=function(){return this.setParametersPromises&&this.setParametersPromises.length?Promise.all(this.setParametersPromises).then(()=>a.apply(this,arguments)).finally(()=>{this.setParametersPromises=[]}):a.apply(this,arguments)}}const ht=Object.freeze(Object.defineProperty({__proto__:null,shimAddTransceiver:ce,shimCreateAnswer:Ie,shimCreateOffer:Oe,shimGetDisplayMedia:function(m,a){m.navigator.mediaDevices&&"getDisplayMedia"in m.navigator.mediaDevices||m.navigator.mediaDevices&&(m.navigator.mediaDevices.getDisplayMedia=function(u){if(!u||!u.video){const S=new DOMException("getDisplayMedia without video constraints is undefined");return S.name="NotFoundError",S.code=8,Promise.reject(S)}return!0===u.video?u.video={mediaSource:a}:u.video.mediaSource=a,m.navigator.mediaDevices.getUserMedia(u)})},shimGetParameters:ge,shimGetUserMedia:de,shimOnTrack:Pe,shimPeerConnection:ye,shimRTCDataChannel:K,shimReceiverGetStats:Xe,shimRemoveStream:ie,shimSenderGetStats:Le},Symbol.toStringTag,{value:"Module"}));function Fe(m){if("object"==typeof m&&m.RTCPeerConnection){if("getLocalStreams"in m.RTCPeerConnection.prototype||(m.RTCPeerConnection.prototype.getLocalStreams=function(){return this._localStreams||(this._localStreams=[]),this._localStreams}),!("addStream"in m.RTCPeerConnection.prototype)){const a=m.RTCPeerConnection.prototype.addTrack;m.RTCPeerConnection.prototype.addStream=function(u){this._localStreams||(this._localStreams=[]),this._localStreams.includes(u)||this._localStreams.push(u),u.getAudioTracks().forEach(S=>a.call(this,S,u)),u.getVideoTracks().forEach(S=>a.call(this,S,u))},m.RTCPeerConnection.prototype.addTrack=function(u,...S){return S&&S.forEach(D=>{this._localStreams?this._localStreams.includes(D)||this._localStreams.push(D):this._localStreams=[D]}),a.apply(this,arguments)}}"removeStream"in m.RTCPeerConnection.prototype||(m.RTCPeerConnection.prototype.removeStream=function(a){this._localStreams||(this._localStreams=[]);const u=this._localStreams.indexOf(a);if(-1===u)return;this._localStreams.splice(u,1);const S=a.getTracks();this.getSenders().forEach(D=>{S.includes(D.track)&&this.removeTrack(D)})})}}function et(m){if("object"==typeof m&&m.RTCPeerConnection&&("getRemoteStreams"in m.RTCPeerConnection.prototype||(m.RTCPeerConnection.prototype.getRemoteStreams=function(){return this._remoteStreams?this._remoteStreams:[]}),!("onaddstream"in m.RTCPeerConnection.prototype))){Object.defineProperty(m.RTCPeerConnection.prototype,"onaddstream",{get(){return this._onaddstream},set(u){this._onaddstream&&(this.removeEventListener("addstream",this._onaddstream),this.removeEventListener("track",this._onaddstreampoly)),this.addEventListener("addstream",this._onaddstream=u),this.addEventListener("track",this._onaddstreampoly=S=>{S.streams.forEach(D=>{if(this._remoteStreams||(this._remoteStreams=[]),this._remoteStreams.includes(D))return;this._remoteStreams.push(D);const L=new Event("addstream");L.stream=D,this.dispatchEvent(L)})})}});const a=m.RTCPeerConnection.prototype.setRemoteDescription;m.RTCPeerConnection.prototype.setRemoteDescription=function(){const u=this;return this._onaddstreampoly||this.addEventListener("track",this._onaddstreampoly=function(S){S.streams.forEach(D=>{if(u._remoteStreams||(u._remoteStreams=[]),u._remoteStreams.indexOf(D)>=0)return;u._remoteStreams.push(D);const L=new Event("addstream");L.stream=D,u.dispatchEvent(L)})}),a.apply(u,arguments)}}}function Rt(m){if("object"!=typeof m||!m.RTCPeerConnection)return;const a=m.RTCPeerConnection.prototype,u=a.createOffer,S=a.createAnswer,D=a.setLocalDescription,L=a.setRemoteDescription,Y=a.addIceCandidate;a.createOffer=function(_e,Ce){const $e=u.apply(this,[arguments.length>=2?arguments[2]:arguments[0]]);return Ce?($e.then(_e,Ce),Promise.resolve()):$e},a.createAnswer=function(_e,Ce){const $e=S.apply(this,[arguments.length>=2?arguments[2]:arguments[0]]);return Ce?($e.then(_e,Ce),Promise.resolve()):$e};let oe=function(_e,Ce,Ue){const $e=D.apply(this,[_e]);return Ue?($e.then(Ce,Ue),Promise.resolve()):$e};a.setLocalDescription=oe,oe=function(_e,Ce,Ue){const $e=L.apply(this,[_e]);return Ue?($e.then(Ce,Ue),Promise.resolve()):$e},a.setRemoteDescription=oe,oe=function(_e,Ce,Ue){const $e=Y.apply(this,[_e]);return Ue?($e.then(Ce,Ue),Promise.resolve()):$e},a.addIceCandidate=oe}function _t(m){const a=m&&m.navigator;if(a.mediaDevices&&a.mediaDevices.getUserMedia){const u=a.mediaDevices,S=u.getUserMedia.bind(u);a.mediaDevices.getUserMedia=D=>S(Ae(D))}!a.getUserMedia&&a.mediaDevices&&a.mediaDevices.getUserMedia&&(a.getUserMedia=function(u,S,D){a.mediaDevices.getUserMedia(u).then(S,D)}.bind(a))}function Ae(m){return m&&void 0!==m.video?Object.assign({},m,{video:h(m.video)}):m}function lt(m){if(!m.RTCPeerConnection)return;const a=m.RTCPeerConnection;m.RTCPeerConnection=function(u,S){if(u&&u.iceServers){const D=[];for(let L=0;La.generateCertificate})}function Ze(m){"object"==typeof m&&m.RTCTrackEvent&&"receiver"in m.RTCTrackEvent.prototype&&!("transceiver"in m.RTCTrackEvent.prototype)&&Object.defineProperty(m.RTCTrackEvent.prototype,"transceiver",{get(){return{receiver:this.receiver}}})}function yt(m){const a=m.RTCPeerConnection.prototype.createOffer;m.RTCPeerConnection.prototype.createOffer=function(u){if(u){void 0!==u.offerToReceiveAudio&&(u.offerToReceiveAudio=!!u.offerToReceiveAudio);const S=this.getTransceivers().find(L=>"audio"===L.receiver.track.kind);!1===u.offerToReceiveAudio&&S?"sendrecv"===S.direction?S.setDirection?S.setDirection("sendonly"):S.direction="sendonly":"recvonly"===S.direction&&(S.setDirection?S.setDirection("inactive"):S.direction="inactive"):!0!==u.offerToReceiveAudio||S||this.addTransceiver("audio"),void 0!==u.offerToReceiveVideo&&(u.offerToReceiveVideo=!!u.offerToReceiveVideo);const D=this.getTransceivers().find(L=>"video"===L.receiver.track.kind);!1===u.offerToReceiveVideo&&D?"sendrecv"===D.direction?D.setDirection?D.setDirection("sendonly"):D.direction="sendonly":"recvonly"===D.direction&&(D.setDirection?D.setDirection("inactive"):D.direction="inactive"):!0!==u.offerToReceiveVideo||D||this.addTransceiver("video")}return a.apply(this,arguments)}}function un(m){"object"!=typeof m||m.AudioContext||(m.AudioContext=m.webkitAudioContext)}const kn=Object.freeze(Object.defineProperty({__proto__:null,shimAudioContext:un,shimCallbacksAPI:Rt,shimConstraints:Ae,shimCreateOfferLegacy:yt,shimGetUserMedia:_t,shimLocalStreamsAPI:Fe,shimRTCIceServerUrls:lt,shimRemoteStreamsAPI:et,shimTrackEventTransceiver:Ze},Symbol.toStringTag,{value:"Module"})),Wt=te(pe());function rn(m){if(!m.RTCIceCandidate||m.RTCIceCandidate&&"foundation"in m.RTCIceCandidate.prototype)return;const a=m.RTCIceCandidate;m.RTCIceCandidate=function(u){if("object"==typeof u&&u.candidate&&0===u.candidate.indexOf("a=")&&((u=JSON.parse(JSON.stringify(u))).candidate=u.candidate.substr(2)),u.candidate&&u.candidate.length){const S=new a(u),D=Wt.parseCandidate(u.candidate),L=Object.assign(S,D);return L.toJSON=function(){return{candidate:L.candidate,sdpMid:L.sdpMid,sdpMLineIndex:L.sdpMLineIndex,usernameFragment:L.usernameFragment}},L}return new a(u)},m.RTCIceCandidate.prototype=a.prototype,T(m,"icecandidate",u=>(u.candidate&&Object.defineProperty(u,"candidate",{value:new m.RTCIceCandidate(u.candidate),writable:"false"}),u))}function zt(m){if(!m.RTCPeerConnection)return;const a=c(m);"sctp"in m.RTCPeerConnection.prototype||Object.defineProperty(m.RTCPeerConnection.prototype,"sctp",{get(){return void 0===this._sctp?null:this._sctp}});const u=m.RTCPeerConnection.prototype.setRemoteDescription;m.RTCPeerConnection.prototype.setRemoteDescription=function(){if(this._sctp=null,"chrome"===a.browser&&a.version>=76){const{sdpSemantics:S}=this.getConfiguration();"plan-b"===S&&Object.defineProperty(this,"sctp",{get(){return void 0===this._sctp?null:this._sctp},enumerable:!0,configurable:!0})}if(function(S){if(!S||!S.sdp)return!1;const D=Wt.splitSections(S.sdp);return D.shift(),D.some(L=>{const Y=Wt.parseMLine(L);return Y&&"application"===Y.kind&&-1!==Y.protocol.indexOf("SCTP")})}(arguments[0])){const S=function(_e){const Ce=_e.sdp.match(/mozilla...THIS_IS_SDPARTA-(\d+)/);if(null===Ce||Ce.length<2)return-1;const Ue=parseInt(Ce[1],10);return Ue!=Ue?-1:Ue}(arguments[0]),D=function(_e){let Ce=65536;return"firefox"===a.browser&&(Ce=a.version<57?-1===_e?16384:2147483637:a.version<60?57===a.version?65535:65536:2147483637),Ce}(S),L=function(_e,Ce){let Ue=65536;"firefox"===a.browser&&57===a.version&&(Ue=65535);const $e=Wt.matchPrefix(_e.sdp,"a=max-message-size:");return $e.length>0?Ue=parseInt($e[0].substr(19),10):"firefox"===a.browser&&-1!==Ce&&(Ue=2147483637),Ue}(arguments[0],S);let Y;Y=0===D&&0===L?Number.POSITIVE_INFINITY:0===D||0===L?Math.max(D,L):Math.min(D,L);const oe={};Object.defineProperty(oe,"maxMessageSize",{get:()=>Y}),this._sctp=oe}return u.apply(this,arguments)}}function dn(m){if(!m.RTCPeerConnection||!("createDataChannel"in m.RTCPeerConnection.prototype))return;function a(S,D){const L=S.send;S.send=function(){const Y=arguments[0];if("open"===S.readyState&&D.sctp&&(Y.length||Y.size||Y.byteLength)>D.sctp.maxMessageSize)throw new TypeError("Message too large (can send a maximum of "+D.sctp.maxMessageSize+" bytes)");return L.apply(S,arguments)}}const u=m.RTCPeerConnection.prototype.createDataChannel;m.RTCPeerConnection.prototype.createDataChannel=function(){const S=u.apply(this,arguments);return a(S,this),S},T(m,"datachannel",S=>(a(S.channel,S.target),S))}function vn(m){if(!m.RTCPeerConnection||"connectionState"in m.RTCPeerConnection.prototype)return;const a=m.RTCPeerConnection.prototype;Object.defineProperty(a,"connectionState",{get(){return{completed:"connected",checking:"connecting"}[this.iceConnectionState]||this.iceConnectionState},enumerable:!0,configurable:!0}),Object.defineProperty(a,"onconnectionstatechange",{get(){return this._onconnectionstatechange||null},set(u){this._onconnectionstatechange&&(this.removeEventListener("connectionstatechange",this._onconnectionstatechange),delete this._onconnectionstatechange),u&&this.addEventListener("connectionstatechange",this._onconnectionstatechange=u)},enumerable:!0,configurable:!0}),["setLocalDescription","setRemoteDescription"].forEach(u=>{const S=a[u];a[u]=function(){return this._connectionstatechangepoly||(this._connectionstatechangepoly=D=>{const L=D.target;if(L._lastConnectionState!==L.connectionState){L._lastConnectionState=L.connectionState;const Y=new Event("connectionstatechange",D);L.dispatchEvent(Y)}return D},this.addEventListener("iceconnectionstatechange",this._connectionstatechangepoly)),S.apply(this,arguments)}})}function xe(m){if(!m.RTCPeerConnection)return;const a=c(m);if("chrome"===a.browser&&a.version>=71||"safari"===a.browser&&a.version>=605)return;const u=m.RTCPeerConnection.prototype.setRemoteDescription;m.RTCPeerConnection.prototype.setRemoteDescription=function(S){return S&&S.sdp&&-1!==S.sdp.indexOf("\na=extmap-allow-mixed")&&(S.sdp=S.sdp.split("\n").filter(D=>"a=extmap-allow-mixed"!==D.trim()).join("\n")),u.apply(this,arguments)}}const Tt=Object.freeze(Object.defineProperty({__proto__:null,removeAllowExtmapMixed:xe,shimConnectionState:vn,shimMaxMessageSize:zt,shimRTCIceCandidate:rn,shimSendThrowTypeError:dn},Symbol.toStringTag,{value:"Module"}));!function({window:m}={},a={shimChrome:!0,shimFirefox:!0,shimEdge:!0,shimSafari:!0}){const u=y,S=c(m),D={browserDetails:S,commonShim:Tt,extractVersion:E,disableLog:x,disableWarnings:M};switch(S.browser){case"chrome":if(!ne||!k||!a.shimChrome)return u("Chrome shim is not included in this adapter release."),D;if(null===S.version)return u("Chrome shim can not determine version, not shimming."),D;u("adapter.js shimming chrome."),D.browserShim=ne,B(m),j(m),k(m),re(m),F(m),z(m),H(m),U(m),$(m),rn(m),vn(m),zt(m),dn(m),xe(m);break;case"firefox":if(!ht||!ye||!a.shimFirefox)return u("Firefox shim is not included in this adapter release."),D;u("adapter.js shimming firefox."),D.browserShim=ht,de(m),ye(m),Pe(m),ie(m),Le(m),Xe(m),K(m),ce(m),ge(m),Oe(m),Ie(m),rn(m),vn(m),zt(m),dn(m);break;case"edge":if(!ae||!ee||!a.shimEdge)return u("MS edge shim is not included in this adapter release."),D;u("adapter.js shimming edge."),D.browserShim=ae,J(m),W(m),ee(m),X(m),zt(m),dn(m);break;case"safari":if(!kn||!a.shimSafari)return u("Safari shim is not included in this adapter release."),D;u("adapter.js shimming safari."),D.browserShim=kn,lt(m),yt(m),Rt(m),Fe(m),et(m),Ze(m),_t(m),un(m),rn(m),zt(m),dn(m),xe(m);break;default:u("Unsupported browser!")}}({window});const Et={ALL:"all",h:"relay"},Ye="Local";function Nt(m){return m.os===s.PlatformOS.XBOX}function Yt(m){return m.browser===s.PlatformBrowser.EDGE}function Ut(m){return Nt(m)&&Yt(m)}function Pn(m){return m.os===s.PlatformOS.IPADOS}function Vt(m){return m.os===s.PlatformOS.IOS||Pn(m)||bt(m)}function bt(m){return"VISIONPRO"===(m.model||m.deviceModel)}function De(m){var a,u;return null!==(u=null===(a=m.model||m.deviceModel)||void 0===a?void 0:a.toUpperCase().startsWith("QUEST"))&&void 0!==u&&u}function tt(m){return!!/^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/.test(m)}function Ve(m){return"0x"+("00000000"+(a=m,m=a>>>0).toString(16).toUpperCase()).slice(-8);var a}function Je(){return!!window.chrome}function Ct(m){return m.browser===s.PlatformBrowser.SAFARI}function cn(m){return m.browser===s.PlatformBrowser.OPERAGX}function Hn(m){return m?m.os===s.PlatformOS.IOS:/iPhone|iPod/.test(navigator.userAgent)}function ln(m){return m.os===s.PlatformOS.WEBOS}function an(m){return m.os===s.PlatformOS.CHROME_OS}function Qt(m){return m.os===s.PlatformOS.WINDOWS}function ke(m){return m.os===s.PlatformOS.MAC}function mt(m){return m.os===s.PlatformOS.TIZEN}function ot(m){return m.os===s.PlatformOS.LINUX}function bn(m){return m.os===s.PlatformOS.ANDROID}function Rn(){var m,a;return null===(a=null===(m=window.matchMedia)||void 0===m?void 0:m.call(window,"(pointer:coarse)"))||void 0===a?void 0:a.matches}function Dt(){var m,a;return!!window.TouchEvent&&(null===(a=null===(m=window.matchMedia)||void 0===m?void 0:m.call(window,"(any-pointer:coarse)"))||void 0===a?void 0:a.matches)}function Xt(m){return m.os===s.PlatformOS.TIZEN||m.os===s.PlatformOS.WEBOS}function Ln(){let m=new Uint8Array(36);window.crypto.getRandomValues(m);let a="";for(let u=0;u<36;u++){let S=m[u]%16;8==u||13==u||18==u||23==u?a+="-":14==u?a+="4":(19==u&&(S=3&S|8),a+=S.toString(16))}return s.Log.i("{d988e7f}","{534eaf4}",a),a}function Jn(m,a){for(let u=0;uD)return!0;if(S0)return!1;return!0}function Ci(m){return m.browser==s.PlatformBrowser.CHROME}function ki(m,a,u,S,D){if(m.browser!=s.PlatformBrowser.CHROME)return!1;const L=[a,null!=u?u:0,null!=S?S:0,null!=D?D:0];try{return Jn(m.browserBestVer.split(".").map(Y=>Number.parseInt(Y)),L)}catch{s.Log.w("{d988e7f}","{bcd8f94}")}return!0}function Bi(m,a,u,S){var D;if(!Vt(m))return!1;try{return st(null!==(D=m.osVersion)&&void 0!==D?D:m.osVer,a,u,S)}catch{s.Log.w("{d988e7f}","{cf4149f}")}return!a}function st(m,a,u,S){const D=m.replace(/[^0-9.]/,"").split(".").map(Y=>Number.parseInt(Y)),L=[u,null!=S?S:0];return 1===D.length&&D.push(0),a?D.every((Y,oe)=>Y===L[oe]):Jn(D,L)}function En(m,a,u){return Bi(m,!0,a,u)}function In(m,a,u){return Bi(m,!1,a,u)}function it(m,a,u){return{code:m,description:a,error:null!==u?u:void 0}}function Lt(m){switch(m){case s.NetworkType.ETHERNET:return"ETHERNET";case s.NetworkType.WIFI:return"WIFI";case s.NetworkType.WIFI_2_4:return"WIFI_2_4";case s.NetworkType.WIFI_5_0:return"WIFI_5_0";case s.NetworkType.MOBILE:return"MOBILE";case s.NetworkType.MOBILE_2G:return"MOBILE_2G";case s.NetworkType.MOBILE_3G:return"MOBILE_3G";case s.NetworkType.MOBILE_4G:return"MOBILE_4G";case s.NetworkType.MOBILE_5G:return"MOBILE_5G";case s.NetworkType.OTHER:case s.NetworkType.BLUETOOTH:case s.NetworkType.WIMAX:return"OTHER";default:return"UNKNOWN"}}function $t(m){return m.replace(/(partnerCustomData" *: *")((\\"|[^"])*)(?=")/g,"$1***")}function gn(m){const a=Object.values(Et);return m.iceTransportPolicy&&!a.includes(m.iceTransportPolicy)&&(s.Log.w("{d988e7f}","{5776afe}",JSON.stringify(null!=m?m:"undefined",null,2)),m.iceTransportPolicy=void 0),m}let Tn={o:!0,l:!1};function ft(m){if(m)switch(m){case"enable":case"on":case"1":case"true":return!0;case"disable":case"off":case"0":case"false":return!1}}class Pt{constructor(a){this.u=new Map,this.v=a}addListener(a,u){const S=this.u.get(a);if(void 0!==S)S.add(u);else{const D=new Set;D.add(u),this.u.set(a,D)}}removeListener(a,u){let S=this.u.get(a);null==S||S.delete(u)}removeAllListenersOfEvent(a){this.u.delete(a)}removeAllListeners(){this.u.clear()}hasListener(a){const u=this.u.get(a);return void 0!==u&&u.size>0}emit(a,...u){try{let S=this.u.get(a);if(S)for(const D of S)this.v?D(...u):window.setTimeout(D,0,...u)}catch(S){console.log("Exception in emit: "+S)}}}function on(m,a,u,S){let D=[];(function(oe,_e){let Ce=[];do{Ce.push(oe),oe=Object.getPrototypeOf(oe)}while(""!=oe.name);Ce.reverse();for(let Ue of Ce)_e.push(Ue.toString().replace(/(extends )[^ {]*\.([^ ]*[ {])/,"$1$2"))})(m,D),D.push(`${a.toString()}`),S?(D.push(`${S.toString()}`),D.push(`onconnect = (event) => { ${S.name}(${m.name}, event, ${a.name}); };`)):D.push(`onmessage = (event) => { ${a.name}(${m.name}, event); };`),D.push(`${u.toString()}`),D.push(`onerror = (event) => { ${u.name}(event); };`);const Y=new Blob(D,{type:"text/javascript"});return URL.createObjectURL(Y)}function Zt(m,a,u){if(!m.prototype.m)throw new Error("Invalid Worker class provided");const S=on(m,Re,Qe),D=new Worker(S);return URL.revokeObjectURL(S),jt(D,a,u),D}function Sn(m,a,u){const S=window;if(void 0===S.SharedWorker)throw new Error("SharedWorker not supported");if(!m.prototype.m)throw new Error("Invalid Worker class provided");const D=on(m,Re,Qe,ct),L=new S.SharedWorker(D);return URL.revokeObjectURL(D),jt(L,a,u),L}Tn.o||s.Logger.setLogLevel(s.LogLevel.ERROR),Tn.l&&s.Logger.setLogMechanism(s.LogMechanism.Console);const $n=new Map;function Zn(m){return"port"in m?m.port:m}function ii(m){m&&gi(Zn(m))}function gi(m){if($n.has(m))return;m.postMessage.bind(m)({S:2,data:null});const u=window.setTimeout(()=>{const S=$n.get(m);S&&(clearTimeout(S),$n.delete(m)),m instanceof Worker?m.terminate():m instanceof MessagePort&&m.close()},150);$n.set(m,u)}function jt(m,a,u){const S=Zn(m),D=S.postMessage.bind(S);let L=!1;const Y=oe=>{L||(L=!0,s.Log.e("{10ca8e2}","{03baf25}",oe,typeof oe),gi(S),u(oe))};S.onmessage=oe=>{const _e=oe.data;let Ue=_e.data;switch(_e.S){case 1:D({S:3,data:null});break;case 4:a(Ue),gi(S);break;case 5:Y(Ue)}},"onmessageerror"in S&&(S.onmessageerror=Y),m.onerror=Y,D({S:0,data:null})}function ct(m,a,u){const S=globalThis;S.port=a.ports[0],S.port.onmessage=u.bind(self,m)}function Re(m,a){var u,S;const D=globalThis;D.I=null!==(u=D.I)&&void 0!==u?u:{};const L=a.data;let Y=L.S,oe=L.data,_e="port"in D?D.port:self;switch(Y){case 0:const Ce=new m;D.I[m.name]=Ce,_e.postMessage({S:1,data:null});break;case 2:null===(S=null==self?void 0:self.close)||void 0===S||S.call(self);break;case 3:Promise.resolve(D.I[m.name].m()).then($e=>{_e.postMessage({S:4,data:$e})});break;default:throw new Error(`Unknown message: ${Y}:${oe}`)}}function Qe(m){const a=globalThis;("port"in a?a.port:self).postMessage({S:5,data:m})}const gt="0";class Kt{constructor(){}C(){return this.T(this.M())}M(){return self.OffscreenCanvas?new OffscreenCanvas(1,1):document.createElement("canvas")}T(a){const u=a.getContext("webgl"),S=u&&u.getExtension("WEBGL_debug_renderer_info");return S?{P:u&&u.getParameter(S.UNMASKED_VENDOR_WEBGL),D:u&&u.getParameter(S.UNMASKED_RENDERER_WEBGL),R:!0}:{P:"",D:"",R:!1}}m(){return this.C()}}class hn{constructor(){}m(){const a=navigator.userAgentData;return a?a.getHighEntropyValues(["platform","architecture","uaFullVersion","platformVersion","model","bitness","fullVersionList"]).then(u=>(u||(u={}),u.brands||(u.brands=a.brands),u.mobile||(u.mobile=a.mobile),u)):Promise.resolve(void 0)}}class Fn{constructor(){}m(){let a={N:!1,O:"",P:""};if(navigator.userAgent){const u=navigator.userAgent.toUpperCase(),S=["BRAVIA","TIZEN","PHILIPSTV","GOOGLETV","CRKEY","CHROMECAST","SHIELDTV"],D=["SONY","SAMSUNG","PHILIPS","GOOGLE","GOOGLE","GOOGLE","NVIDIA"];if(new RegExp(["BRAVIA","SMARTTV","SMART-TV","PHILIPSTV","GOOGLETV","CRKEY","CHROMECAST","SHIELD Android TV"].join("|"),"i").test(u)){a.N=!0;const L=u.match(S.join("|"));if(L)for(let Y=0;Y{this.ws?m(this.Rs):this.Us().then(()=>{this.ws=!0,m(this.Rs)})})}Ls(){const m=window.speechSynthesis;if(m){const a=m.getVoices;let u=(null==a?void 0:a.call(m))||[];return new Promise((S,D)=>{if(!a||u.length)this.Gs(u),S();else{let L=0;const Y=()=>{u=a.call(m);const oe=performance.now();if(0==u.length&&(0==L||oe-L<600))return this.Is&&clearTimeout(this.Is),void(this.Is=window.setTimeout(Y,150));this.Is&&(clearTimeout(this.Is),this.Is=0),this.Gs(u),S()};void 0!==m.onvoiceschanged&&(m.onvoiceschanged=Y),this.Hs(()=>{u=a.call(m),u.length?Y():(this.Is=window.setTimeout(Y,150),L=performance.now())})}})}return new Promise(a=>{a()})}Gs(m){if(!this.Ss){for(const a of m){const u=a.voiceURI||"";u.startsWith("Chrome OS")?this.F=!0:u.startsWith("Google")?this.U=!0:u.includes("moz-tts")?(u.includes("android")&&(this.G=!0,this.It=!0),this.L=!0):"English United States"==u&&(this.H=!0),u.includes("Microsoft")?(this.V=!0,u.includes("Online")?this._=!0:this.$=!0):u.includes("com.apple")?(this.W=!0,u.includes("Ellen")&&(this.K=!0)):"Zuzana"==u&&(this.W=!0)}this.j=this.W||this.V||this.U||this.F||this.L||this.H,this.Ss=!0}}Us(){var m=this;return r(function*(){yield Promise.all([m.Vs(),m.Ws(),m._s(),m.Ls(),m.qs(),m.$s(),m.zs(),m.Ks(),m.Qs(),m.Xs(),m.Ys(),m.js(),m.Js()]).then(()=>{m.Zs(),m.te()})})()}$s(){var m,a,u,S,D,L,Y,oe,_e,Ce,Ue;const $e=window,Be=$e.hasOwnProperty,at=$e.navigator,At=$e.Intl,dt=$e.CSS,kt=null==dt?void 0:dt.supports,_n=$e.Promise;Be.call($e,"MSMediaKeys")?this.Z=!0:Be.call($e,"_firefoxTV_cachedScrollPosition")?this.ot=!0:void 0!==$e.__edgeActiveElement||$e.__edgeTrackingPreventionStatistics?this.tt=!0:$e.safari?this.it=!0:$e.opr?this.rt=!0:$e.oprt?this.dt=!0:at.brave?this.ut=!0:void 0!==$e.OperaTouch||$e.ethereum?(this.lt=!0,this.It=!0):$e.OperaGXDownloads||$e.OperaGXGames?(this.ct=!0,this.It=!0):$e.yandex?this.At=!0:$e.QuickAccess?this.vt=!0:$e.chrome?this.st=!0:$e.netscape?this.nt=!0:$e.__firefox__?this.ht=!0:$e.__gCrWeb?this.et=!0:$e.ReactNativeWebView&&(this.ft=!0),void 0!==$e.contacts||void 0!==$e.ContactsManager?this.It=!0:Be.call($e,"onwebOSAccessibilityAlertDone")||$e.webOSSystem||Be.call($e,"onwebosaccessibilityalertdone")?this.Ct=!0:$e.tizen||$e.TizenTVApiInfo||$e.addEdgeEffectONSCROLLTizenUIF||$e.tizentvwasm?this.Tt=!0:$e.HardkeyEvent&&(this.Et=!0),!(null===(m=at.mediaCapabilities)||void 0===m)&&m.decodingInfo&&(this.wi=!0),$e.BigInt&&(this.mi=!0,$e.BigInt64Array&&(this.gi=!0)),$e.PerformanceNavigationTiming&&(this.Si=!0),$e.WebAssembly&&$e.WebAssembly.Exception&&(this.bi=!0),$e.BroadcastChannel&&(this.ki=!0),$e.GPUBuffer&&(this.yi=!0),$e.SharedWorker&&(this.xi=!0),$e.MediaRecorder&&(this.Ii=!0),$e.CSSCounterStyleRule&&(this.Oi=!0);const An=null===(a=$e.ArrayBuffer)||void 0===a?void 0:a.prototype;if(null!=An&&An.hasOwnProperty("transfer")&&(this.Bi=!0),Be.call($e,"ondevicelight")&&(this.Ci=!0),!(null===(u=$e.AbortSignal)||void 0===u)&&u.abort&&(this.Ti=!0),Be.call($e,"onbeforeinput")&&(this.Ei=!0),At){At.DisplayNames&&(this.Mi=!0);const li=new At.Collator("zh",{se:"pinyin"});this.Pi="pinyin"==(null===(S=li.resolvedOptions())||void 0===S?void 0:S.se)}$e.Credential&&(this.Ri=!0),!(null===(D=$e.browser)||void 0===D)&&D.runtime&&(this.Ni=!0),$e.LargestContentfulPaint&&(this.Fi=!0),null!=dt&&dt.registerProperty&&(this.Ui=!0);const tn=null===(L=$e.HTMLElement)||void 0===L?void 0:L.prototype;null!=tn&&tn.hasOwnProperty("autofocus")&&(this.Li=!0),at.contacts&&(this.Gi=!0),$e.TrustedHTML&&(this.Hi=!0),$e.WakeLock&&(this.Vi=!0),null!=_n&&_n.any&&(this.Wi=!0),$e.FileSystemHandle&&(this._i=!0),!(null===(Y=$e.Atomics)||void 0===Y)&&Y.waitAsync&&(this.$i=!0),null!=kt&&kt.call(dt,"aspect-ratio: auto")&&(this.zi=!0),$e.ReadableStreamBYOBReader&&(this.Ki=!0),null!=kt&&kt.call(dt,"overflow: clip")&&(this.Qi=!0),null!=kt&&kt.call(dt,"content-visibility: auto")&&(this.Yi=!0),$e.CSSStartingStyleRule&&(this.ji=!0),null!=_n&&_n.withResolvers&&(this.Ji=!0);const Dn=null===(oe=$e.CanvasRenderingContext2D)||void 0===oe?void 0:oe.prototype;null!=Dn&&Dn.hasOwnProperty("reset")&&(this.Zi=!0);const Bn=null===(_e=$e.Set)||void 0===_e?void 0:_e.prototype;null!=Bn&&Bn.hasOwnProperty("difference")&&(this.ss=!0),null!=kt&&kt.call(dt,"selector(:user-valid)")&&(this.es=!0);const Mn=null===(Ce=$e.InputEvent)||void 0===Ce?void 0:Ce.prototype;null!=Mn&&Mn.hasOwnProperty("isComposing")&&(this.ns=!0),$e.VRDisplay&&(this.hs=!0);const ci=null===(Ue=$e.HTMLVideoElement)||void 0===Ue?void 0:Ue.prototype;this.Xi=null==ci?void 0:ci.hasOwnProperty("webkitSupportsPresentationMode")}Ks(){return new Promise((m,a)=>{const u="Plat",S=$e=>{if(this.ys)return;const Be=$e.platform;"MacIntel"===Be?this.gt=!0:"iPhone"===Be?this.wt=!0:"Win32"===Be?this.St=!0:"iPad"===Be?this.bt=!0:"FreeBSD amd64"===Be?this.yt=!0:"Windows"===Be&&(this.St=!0,this.ee=!0),Be.startsWith("Linux")&&(this.kt=!0),this.ys=!0};let D=!1;const L=$e=>{if(this.Ms)clearTimeout(this.Ms),this.Ms=0;else if(D)return s.Log.w("{3c72abb}","{b02109c}"),void this.ne(u,this.Ds-performance.now());S($e),m()};let Y=!1,oe=!1;const _e=$e=>{"string"==typeof $e?this.he(u,$e):"data"in $e?this.oe(u,$e):this.re(u,$e),oe=!0,s.Log.e("{3c72abb}","{6350135}",$e)};let Ce,Ue=0;try{Y=!0,Ce=Zt(Yn,L,_e),Ue=150}catch($e){oe=!0,this.ae(u,$e),s.Log.w("{3c72abb}","{79668e5}",$e)}this.Hs(()=>{this.ys||(this.Ms=window.setTimeout(()=>{this.Ms=0,this.Ds=performance.now(),oe?s.Log.w("{3c72abb}","{d9e1e01}"):Y?(s.Log.w("{3c72abb}","{a8d68cb}"),this.de(u)):(s.Log.i("{3c72abb}","{53e2225}"),this.ce(u));const $e=(new Yn).m();L($e),D=!0},Ue))})})}Qs(){const m=window;m.ApplePaySession&&m.ApplePaySession.canMakePayments&&(this.Di=!0)}Vs(){return new Promise((m,a)=>{const u="GL",S=$e=>{if(this.bs)return;const Be=$e.D;if(Be.startsWith("ANGLE")){let At=Be.split(",");(null==At?void 0:At.length)>1&&(this.gpuDetail=At[1].trim())}else this.gpuDetail=Be;const at=Be.toLowerCase();if(Be.includes("SraKmd")){this.Qt=!0,Be.includes("SraKmd_arden")&&(this.Xt=!0);const At=/D3D11-(\d{2,}\.\d{1,}\.\d{5,}\.\d{4,})/.exec(Be);At&&At.length>1&&(this.osVersion=At[1])}else Be.includes("AMD")&&at.includes("vangogh")&&(this.Yt=!0);this.us=$e.R,this.bs=!0};let D=!1;const L=$e=>{if(this.Cs)clearTimeout(this.Cs),this.Cs=0;else if(D)return s.Log.w("{3c72abb}","{c1bb269}"),void this.ne(u,this.Ps-performance.now());S($e),m()};let Y=!1,oe=!1;const _e=$e=>{"string"==typeof $e?this.he(u,$e):"data"in $e?this.oe(u,$e):this.re(u,$e),oe=!0,s.Log.e("{3c72abb}","{9e45306}",$e)};let Ce,Ue=0;try{self.OffscreenCanvas&&(Y=!0,Ce=Zt(Kt,L,_e),Ue=150)}catch($e){oe=!0,this.ae(u,$e),s.Log.w("{3c72abb}","{caf8cd7}",$e)}this.Hs(()=>{this.bs||(this.Cs=window.setTimeout(()=>{this.Cs=0,this.Ps=performance.now(),oe?s.Log.w("{3c72abb}","{fbe663c}"):Y?(s.Log.w("{3c72abb}","{2577061}"),this.de(u)):(s.Log.i("{3c72abb}","{95c252e}"),this.ce(u));const $e=(new Kt).m();L($e),D=!0},Ue))})})}le(m){var a,u,S;this.As=!0,m.mobile&&(this.qt=!0);const D=m.brands||[],L=m.fullVersionList;let Y=0;for(let oe=0;oe2&&(this._t=!0)}Js(){return new Promise((m,a)=>{const u=Ue=>{Ue.N&&(this.fi=Ue.N,this.ve=Ue.P,this.fe=Ue.O)},S=Ue=>{this.Es&&(clearTimeout(this.Es),this.Es=0),u(Ue),m()};let D=!1,L=!1;const Y="TV",oe=Ue=>{"string"==typeof Ue?this.he(Y,Ue):"data"in Ue?this.oe(Y,Ue):this.re(Y,Ue),L=!0,s.Log.e("{3c72abb}","{f49e1b4}",Ue)};let _e,Ce=0;try{self.SharedWorker&&(D=!0,_e=Sn(Fn,S,oe),Ce=150)}catch(Ue){L=!0,s.Log.w("{3c72abb}","{2066dd6}",Ue),this.ae(Y,Ue)}this.Es=window.setTimeout(()=>{ii(_e),L?s.Log.w("{3c72abb}","{cdb3848}"):D?(s.Log.w("{3c72abb}","{f01188c}"),this.de(Y)):(s.Log.i("{3c72abb}","{db9e3f4}"),this.ce(Y)),(new Fn).m().then(Ue=>{S(Ue)})},Ce)})}Ys(){navigator.maxTouchPoints&&navigator.maxTouchPoints>0&&(this.Kt=!0)}js(){const m=window;this.rs=m.matchMedia("(hover: hover)").matches,this.ds=m.matchMedia("(hover: none)").matches,this.cs=m.matchMedia("(pointer: coarse)").matches,this.ls=m.matchMedia("(pointer: fine)").matches}Xs(){const m=navigator.plugins;for(const a of m){const u=a.name;"Native Client"===u?this.Mt=!0:u.startsWith("Microsoft Edge PDF")?(this.Rt=!0,this.J=!0):u.startsWith("Chrome PDF")?this.Pt=!0:u.startsWith("Chromium PDF")?this.Dt=!0:u.startsWith("PPAPI SAMSUNGHEALTH")&&(this.Nt=!0,this.Tt=!0)}}pe(){return r(function*(){if(!window.createImageBitmap)return!1;const m=yield fetch("data:image/avif;base64,AAAAGGZ0eXBhdmlmAAAAAGF2aWZtaWYxAAADm21ldGEAAAAAAAAAIWhkbHIAAAAAAAAAAHBpY3QAAAAAAAAAAAAAAAAAAAAADnBpdG0AAAAAAAEAAAAiaWxvYwAAAABEQAABAAEAAAAAA7sAAQAAAAAAAAAjAAAAI2lpbmYAAAAAAAEAAAAVaW5mZQIAAAAAAQAAYXYwMQAAAAMbaXBycAAAAvxpcGNvAAACrGNvbHJwcm9mAAACoGxjbXMEMAAAbW50clJHQiBYWVogB+UACAAJAAsAEAAFYWNzcE1TRlQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPbWAAEAAAAA0y1sY21zAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAANZGVzYwAAASAAAABAY3BydAAAAWAAAAA2d3RwdAAAAZgAAAAUY2hhZAAAAawAAAAsclhZWgAAAdgAAAAUYlhZWgAAAewAAAAUZ1hZWgAAAgAAAAAUclRSQwAAAhQAAAAgZ1RSQwAAAhQAAAAgYlRSQwAAAhQAAAAgY2hybQAAAjQAAAAkZG1uZAAAAlgAAAAkZG1kZAAAAnwAAAAkbWx1YwAAAAAAAAABAAAADGVuVVMAAAAkAAAAHABHAEkATQBQACAAYgB1AGkAbAB0AC0AaQBuACAAcwBSAEcAQm1sdWMAAAAAAAAAAQAAAAxlblVTAAAAGgAAABwAUAB1AGIAbABpAGMAIABEAG8AbQBhAGkAbgAAWFlaIAAAAAAAAPbWAAEAAAAA0y1zZjMyAAAAAAABDEIAAAXe///zJQAAB5MAAP2Q///7of///aIAAAPcAADAblhZWiAAAAAAAABvoAAAOPUAAAOQWFlaIAAAAAAAACSfAAAPhAAAtsRYWVogAAAAAAAAYpcAALeHAAAY2XBhcmEAAAAAAAMAAAACZmYAAPKnAAANWQAAE9AAAApbY2hybQAAAAAAAwAAAACj1wAAVHwAAEzNAACZmgAAJmcAAA9cbWx1YwAAAAAAAAABAAAADGVuVVMAAAAIAAAAHABHAEkATQBQbWx1YwAAAAAAAAABAAAADGVuVVMAAAAIAAAAHABzAFIARwBCAAAADGF2MUOBDQwAAAAAFGlzcGUAAAAAAAAAEAAAABAAAAAoY2xhcAAAAAEAAAABAAAAAQAAAAH////xAAAAAv////EAAAACAAAAF2lwbWEAAAAAAAAAAQABBIGCA4QAAAArbWRhdBIACgkfzP/IIEBA0oAyFGW+OwPr0bIHHHHBATZPtaQ3RWTA").then(a=>a.blob());return createImageBitmap(m).then(()=>!0,()=>!1)})()}_s(){var m=this;return r(function*(){const a=window;m.pi=!!a.chrome&&(yield m.pe())})()}Ws(){return new Promise((m,a)=>{if(!navigator.userAgentData)return void m();const u=Ue=>{var $e,Be;if(this.ks)return;const at=Ue.model,At=Ue.platform,dt=Ue.platformVersion,kt=Ue.uaFullVersion,_n=Ue.bitness;this.$t=Ue.mobile,this.zt=navigator.userAgentData.mobile,""==at&&""==At&&""==dt&&""==kt?this.lt&&this.It||this.Tt||null==_n||this.It&&!this.st||(this.vs=!0):""==_n&&("Android"==At||(this.vs=!0)),at&&("Xbox"===at?this.jt=!0:at.startsWith("AFT")?(this.Jt=!0,this.ui=!0):at.includes("BRAVIA")?(this.ui=!0,this.Zt=!0):"Chromecast"===at?(this.ui=!0,this.ti=!0,this.deviceName="CHROMECAST"):"SHIELD Android TV"===at?(this.ui=!0,this.ii=!0,this.deviceName="SHIELDTV"):at.startsWith("MiTV")?(this.ui=!0,this.si=!0,this.deviceName="MITV"):at.startsWith("TVision")?(this.ui=!0,this.ei=!0,this.deviceName="TVISION"):at.startsWith("Quest")&&(this.Ai=!0,this.ni=!0,this.me=at,this.deviceName="QUEST")),"Windows"===At?this.hi=!0:"macOS"===At?this.oi=!0:"Chrome OS"===At||"ChromeOS"===At?this.ri=!0:"Chromium OS"===At?this.ai=!0:"Android"===At?this.di=!0:"Linux"===At&&(""==dt?(this.di=!0,this.li=!0):this.ci=!0);const An=Dn=>{if(Dn&&"string"==typeof Dn)return Dn.replace(/[-._,:;|#@]/g,".")},tn=Dn=>{if(!Dn||!this.ue||+this.ue<95)return Dn;switch(Dn.split(".").map(Bn=>Number.parseInt(Bn))[0]){case 0:return"8-";case 1:return"10.0.10240";case 2:return"10.0.10586";case 3:return"10.0.14393";case 4:return"10.0.15063";case 5:return"10.0.16299";case 6:return"10.0.17134";case 7:return"10.0.17763";case 8:return"10.0.18362+";case 9:return"10.0.9";case 10:return"10.0.19041+";case 11:return"10.0.11";case 12:return"10.0.12";case 13:return"11.0.0";case 14:return"11.0.22000.0";case 15:return"11.0.22621.0";default:return"11.0.22621.0+"}};Ue.brands&&Ue.brands.length>0&&this.le(Ue),this.browserFullVer=null!==($e=An(this.browserFullVer))&&void 0!==$e?$e:An(kt),this.ge=dt,this.osVersion=null!==(Be=this.osVersion)&&void 0!==Be?Be:(Dn=>this.hi&&!this.jt?tn(Dn):Dn)(An(dt)),this.ks=!0},S=Ue=>{Ue&&(this.Ts&&(clearTimeout(this.Ts),this.Ts=0),u(Ue),m())};let D=!1,L=!1;const Y="HE",oe=Ue=>{"string"==typeof Ue?this.he(Y,Ue):"data"in Ue?this.oe(Y,Ue):this.re(Y,Ue),L=!0,s.Log.e("{3c72abb}","{217e106}",Ue)};let _e,Ce=0;try{self.SharedWorker&&(D=!0,_e=Sn(hn,S,oe),Ce=300)}catch(Ue){L=!0,s.Log.w("{3c72abb}","{a583546}",Ue),this.ae(Y,Ue)}this.Ts=window.setTimeout(()=>{ii(_e),L?s.Log.w("{3c72abb}","{dbf4b42}"):D?(s.Log.w("{3c72abb}","{0bf7a38}"),this.de(Y),this.gs=!0):(s.Log.i("{3c72abb}","{7a82b59}"),this.ce(Y)),(new hn).m().then(Ue=>{S(Ue)})},Ce)})}qs(){return new Promise(m=>{const a=navigator.userAgent;if(a){const u=a.match(this.xs);u&&(this.we=null==u?void 0:u[1],this.Se=null==u?void 0:u[2])}m()})}zs(){var m,a,u,S;const D=window.RequestCrowNativeApi;if(D){let L=0;const Y=new Promise((Be,at)=>{L=window.setTimeout(()=>{at("timeout")},100)}),oe=window.zoneless,_e=null!==(a=null===(m=null==oe?void 0:oe.windowAddEventListener)||void 0===m?void 0:m.bind(window))&&void 0!==a?a:window.addEventListener.bind(window),Ce=null!==(S=null===(u=null==oe?void 0:oe.windowRemoveEventListener)||void 0===u?void 0:u.bind(window))&&void 0!==S?S:window.removeEventListener.bind(window);let Ue;const $e=new Promise(Be=>{Ue=at=>{Be(at.detail)},_e("CrowNativeApiEvent",Ue),D(JSON.stringify({be:"RequestBrowserVersion"}))}).then(Be=>{var at;const At=null===(at=Be.browserVersion)||void 0===at?void 0:at.match(this.xs);At&&(this.browserFullVer=null==At?void 0:At[1],this.browserVersion=null==At?void 0:At[2])});return Promise.race([$e,Y]).catch(()=>{s.Log.d("{3c72abb}","{841bf6f}")}).finally(()=>{window.clearTimeout(L),Ce("CrowNativeApiEvent",Ue)})}return Promise.resolve()}ke(m,a){if(m==a)return!1;let u=/^(\d+)[.]?(.*)/,S=u.exec(m),D=u.exec(a);return null==S?null==D:null!=D&&S[1]==D[1]&&(""==S[2]||S[2].length=600?s.PlatformType.TABLET:s.PlatformType.PHONE}}Oe(){this.Ie=s.PlatformOS.WINDOWS,this.Ve()||(this.Ce=s.PlatformBrowser.UNKNOWN,this.Te=5,s.Log.d("{3c72abb}","{44ce1e0}"))}Be(){this.Ee="APPLE";const m=()=>{this.Ie=this.Xi?s.PlatformOS.IPADOS:s.PlatformOS.VISIONOS};this.fs&&this.oi?(this.Ie=s.PlatformOS.MAC,this.Ve()||(this.Ce=s.PlatformBrowser.UNKNOWN,this.Te=5,s.Log.d("{3c72abb}","{b80b712}"))):this.gt?this.Kt?(m(),this._e()):(this.Ie=s.PlatformOS.MAC,this.Ve()||(this.Ce=s.PlatformBrowser.UNKNOWN,this.Te=5,s.Log.d("{3c72abb}","{0f3296f}")),this.Ce==s.PlatformBrowser.SAFARI&&this.qe()):this.wt?(this.Ie=s.PlatformOS.IOS,this._e()):this.bt?(m(),this._e()):(this.ee=!0,this.Te=5,this.Kt?(this.Ie=s.PlatformOS.IOS,this._e(),s.Log.d("{3c72abb}","{cf1c572}")):(this.Ie=s.PlatformOS.MAC,this.Ce=s.PlatformBrowser.UNKNOWN,s.Log.d("{3c72abb}","{1eb1815}")))}Re(){return this.Yt?s.PlatformOS.STEAMOS:s.PlatformOS.LINUX}$e(){this.osVersion=this.mi?this.Mi?this.gi?this.Oi?this.Bi?"17.4+":"17+":this.xi?"16+":this.yi?this.K?"15.6+":"15.5+":this.ki?"15.4+":this.bi?"15.2+":this.Si?"15.1+":"15+":"14.5+":this.Ii?"14.3+":"14+":this.wi?"13+":"12-"}_e(){this.$e();const m=this.osVersion,a=!this.Ri&&!(m.startsWith("12")||m.startsWith("13"));this.ht?this.Ce=s.PlatformBrowser.FIREFOX:this.dt?this.Ce=s.PlatformBrowser.OPERA:this.ut?this.Ce=s.PlatformBrowser.BRAVE:this.At?this.Ce=s.PlatformBrowser.YANDEX:this.tt?this.Ce=s.PlatformBrowser.EDGE:this.et?this.Ce=s.PlatformBrowser.CHROME:this.Di&&!a?this.Ce=s.PlatformBrowser.SAFARI:this.ft?this.Ce=s.PlatformBrowser.REACT:a?(this.Ce=s.PlatformBrowser.UNKNOWN,this.Te=7,s.Log.d("{3c72abb}","{5a39f60}")):(this.Ce=s.PlatformBrowser.UNKNOWN,this.Te=5,s.Log.d("{3c72abb}","{147d6b4}"))}Ne(){this.Ce=s.PlatformBrowser.FIREFOX,this.browserVersion=this.Pi?this.Mi?this.Ei?this.Ti?this.Ci?"88":"89+":"87":"86":"85":"84-"}De(){this.Ce=s.PlatformBrowser.CHROME,this.browserVersion||this.Fi&&(this.browserVersion=this.Ui?this.Li?this.Gi?this.Mi?this.Hi?this.Vi?this.Wi?this._i?this.$i?this.zi?this.Ki?this.Qi?"90+":"89":"88":"87":"86":"85":"84":"83":"81":"80":"79":"78":"77")}qe(){this.browserVersion=this.Yi?"18+":this.ji?"17.5+":this.Ji?"17.4":this.Zi?"17.2+":this.ss?"17+":this.es?"16.5+":this.ns?"16.4":"16.3-"}Ve(){var m;if(this.Qt)this.Ie=s.PlatformOS.XBOX,this.Ee="MICROSOFT",this.Ce=s.PlatformBrowser.EDGE,this.Xt?this.me="XBOXSERIES":this.Qt&&(this.me="XBOXONE");else if(this.fs)this.jt?(this.Ie=s.PlatformOS.XBOX,this.Ee="MICROSOFT",this.Ce=s.PlatformBrowser.EDGE):this.Ot?this.Ce=s.PlatformBrowser.EDGE:this.Ft?this.Ce=s.PlatformBrowser.OPERAGX:this.Bt?this.Ce=s.PlatformBrowser.OPERA:this.Ut?this.Ce=s.PlatformBrowser.YANDEX:this.Lt?this.Ce=s.PlatformBrowser.BRAVE:this.xt?this.De():(this.Ht||this.Vt&&!this._t)&&(this.Ce=s.PlatformBrowser.CHROMIUM);else if(this.nt)this.Ne();else if(this.rt)this.Ce=s.PlatformBrowser.OPERA;else if(this.ut)this.Ce=s.PlatformBrowser.BRAVE;else if(this.At)this.Ce=s.PlatformBrowser.YANDEX;else if(this.st)this.pi?this.fs&&this.Vt?(this.Ce=s.PlatformBrowser.CHROMIUM,this.Te=9):this.j?this.Ce=s.PlatformBrowser.CHROMIUM:(this.Ce=s.PlatformBrowser.CHROMIUM,this.Te=7):(this.Ce=s.PlatformBrowser.EDGE,this.Ie=null!==(m=this.Ie)&&void 0!==m?m:s.PlatformOS.UNKNOWN,this.Te=7);else if(this.it||this.Di)this.Ce=s.PlatformBrowser.SAFARI;else{if(!this.Z)return!1;this.Qt?(this.Ie=s.PlatformOS.XBOX,this.Ee="MICROSOFT",this.Ce=s.PlatformBrowser.EDGE_LEGACY):this.Ce=s.PlatformBrowser.EDGE_LEGACY}return!0}Hs(m){window.setTimeout(m,0)}ze(m){var a;null===(a=this.telemetry)||void 0===a||a.Ke("TelemetryHandlerChanged"),this.telemetry=m;for(const u of this.Ns){const S=u.name,D=u.data;switch(u.type){case"ErrorEvent":this.re(S,D);break;case"MessageEvent":this.oe(S,D);break;case"WorkerUnused":this.ce(S);break;case"WorkerTimeout":this.de(S);break;case"WorkerCreateFailure":this.ae(S,D);break;case"ErrorString":this.he(S,D);break;case"WorkerOverlongDelay":this.ne(S,D)}}this.Ns=[]}re(m,a){this.telemetry?this.telemetry.Ke("WorkerProblem",m,`${a.message} in ${a.filename}@${a.lineno}:${a.colno}`,JSON.stringify(a.error)):this.Ns.push({type:"ErrorEvent",name:m,data:a})}he(m,a){this.telemetry?this.telemetry.Ke("WebWorkerProblem",m,a):this.Ns.push({type:"ErrorString",name:m,data:a})}oe(m,a){this.telemetry?this.telemetry.Ke("WorkerMessageProblem",JSON.stringify(a)):this.Ns.push({type:"MessageEvent",name:m,data:a})}ce(m){this.telemetry?this.telemetry.Ke("WorkerUnused",m):this.Ns.push({type:"WorkerUnused",name:m})}de(m){this.telemetry?this.telemetry.Ke("WorkerTimeout",m):this.Ns.push({type:"WorkerTimeout",name:m})}ae(m,a){var u;this.telemetry?this.telemetry.Ke("WorkerCreateFailure",m,null!==(u=null==a?void 0:a.stack)&&void 0!==u?u:"",JSON.stringify(a)):this.Ns.push({type:"WorkerCreateFailure",name:m,data:a})}ne(m,a){this.telemetry?this.telemetry.Ke("WorkerOverlongDelay",m,a.toString()):this.Ns.push({type:"WorkerOverlongDelay",name:m,data:a})}};function Si(){return performance.mark("platformBegin"),qn.Os()}function di(m){qn.ze(m)}var ji,xi,m;I.DeviceOS=void 0,I.DeviceType=void 0,I.DeviceVendor=void 0,I.DeviceModel=void 0,(xi=I.DeviceOS||(I.DeviceOS={})).WINDOWS="WINDOWS",xi.MACOS="MACOS",xi.SHIELD="SHIELD",xi.ANDROID="ANDROID",xi.IOS="IOS",xi.IPADOS="IPADOS",xi.CHROMEOS="CHROMEOS",xi.LINUX="LINUX",xi.TIZEN="TIZEN",xi.WEBOS="WEBOS",xi.TVOS="TVOS",xi.XBOX="XBOX",xi.STEAMOS="STEAMOS",xi.CCOS="CCOS",xi.VISIONOS="VISIONOS",(m=I.DeviceType||(I.DeviceType={})).DESKTOP="DESKTOP",m.LAPTOP="LAPTOP",m.TV="TV",m.PHONE="PHONE",m.TABLET="TABLET",m.CONSOLE="CONSOLE",m.HMD="HMD",function(m){m.APPLE="APPLE",m.LG="LG",m.SAMSUNG="SAMSUNG",m.TIZEN_LICENSED="TIZENLICENSED",m.MICROSOFT="MICROSOFT",m.AMAZON="AMAZON",m.HKMC="HKMC",m.SONY="SONY",m.PHILIPS="PHILIPS",m.GOOGLE="GOOGLE",m.NVIDIA="NVIDIA",m.XIAOMI="XIAOMI",m.TVISION="TVISION",m.UNKNOWN=""}(I.DeviceVendor||(I.DeviceVendor={})),function(m){m.STEAMDECK="STEAMDECK",m.XBOX_ONE="XBOXONE",m.XBOX_SERIES="XBOXSERIES",m.VISION_PRO="VISIONPRO",m.QUEST="QUEST"}(I.DeviceModel||(I.DeviceModel={}));class bi extends Pt{constructor(a,u){super(u),this.Qe=[],this.Xe=a}Ye(a){const u={logModule:"R",timeStamp:a.timestamp,logLevel:a.level,logtag:a.tag,logstr:a.message};this.hasListener(this.Xe)?this.emit(this.Xe,u):this.Qe.push(u)}addListener(a,u){if(super.addListener(a,u),a==this.Xe&&this.Qe.length>0){for(const S of this.Qe)this.emit(this.Xe,S);this.Qe=[]}}}class St extends Array{constructor(){super(),this.push=this.je}Je(a,u){this.Ze=u}clear(){this.splice(0,this.length)}je(...a){let u=Array.prototype.push.apply(this,a);return this.Ze&&this.Ze(),u}}!function(m){m.UNKNOWN="UNKNOWN",m.RCONFIG="RCONFIG",m.GXT="GXT",m.LOCAL="LOCAL",m.OTHER="OTHER"}(ji||(ji={}));const Gt={GridServer_GameLaunch_Request:{name:"GridServer_GameLaunch_Request",gdprLevel:s.GdprLevel.FUNCTIONAL},GS_Feature:{name:"GS_Feature",gdprLevel:s.GdprLevel.FUNCTIONAL},GS_SystemAPICallResult:{name:"GS_SystemAPICallResult",gdprLevel:s.GdprLevel.FUNCTIONAL},GS_DebugInfo:{name:"GS_DebugInfo",gdprLevel:s.GdprLevel.TECHNICAL},GS_ExceptionInfo:{name:"GS_ExceptionInfo",gdprLevel:s.GdprLevel.TECHNICAL},GS_ClientMetricEvent:{name:"GS_ClientMetricEvent",gdprLevel:s.GdprLevel.FUNCTIONAL},GS_ConnectivityCheck:{name:"GS_ConnectivityCheck",gdprLevel:s.GdprLevel.FUNCTIONAL},GS_Sleep_Event:{name:"GS_Sleep_Event",gdprLevel:s.GdprLevel.TECHNICAL},GS_WsCallResult:{name:"GS_WsCallResult",gdprLevel:s.GdprLevel.FUNCTIONAL},GS_HttpCallResult:{name:"GS_HttpCallResult",gdprLevel:s.GdprLevel.FUNCTIONAL},GS_PropertyChange_Event:{name:"GS_PropertyChange_Event",gdprLevel:s.GdprLevel.FUNCTIONAL},GS_CodecError_Event:{name:"GS_CodecError_Event",gdprLevel:s.GdprLevel.FUNCTIONAL}};class mn{constructor(a){this.name="",this.gdprLevel=s.GdprLevel.BEHAVIORAL,this.priority=!1,this.parameters=a,this.ts=(new Date).toISOString()}}class Wn extends mn{constructor(a){super(a),this.name=Gt.GS_Feature.name,this.gdprLevel=Gt.GS_Feature.gdprLevel}}class oi extends mn{constructor(a){super(a),this.name=Gt.GS_DebugInfo.name,this.gdprLevel=Gt.GS_DebugInfo.gdprLevel}}class wi extends mn{constructor(a){super(a),this.name=Gt.GS_ExceptionInfo.name,this.gdprLevel=Gt.GS_ExceptionInfo.gdprLevel}}class $i extends mn{constructor(a){super(a),this.name=Gt.GS_ClientMetricEvent.name,this.gdprLevel=Gt.GS_ClientMetricEvent.gdprLevel}}class Ri extends mn{constructor(a){super(a),this.name=Gt.GS_Sleep_Event.name,this.gdprLevel=Gt.GS_Sleep_Event.gdprLevel}}class Er extends mn{constructor(a){super(a),this.name=Gt.GS_WsCallResult.name,this.gdprLevel=Gt.GS_WsCallResult.gdprLevel}}class Wr extends mn{constructor(a){super(a),this.name=Gt.GS_HttpCallResult.name,this.gdprLevel=Gt.GS_HttpCallResult.gdprLevel}}class Pr{constructor(a,u,S){this.tn=0,this.sn=0,this.en=0,this.nn=0,this.hn=0,this.rn="",this.an=0,this.dn=!1,this.cn=4,this.listener=a,this.frequency=null!=u?u:1e4,this.ln=null!=S?S:1e4,this.un=this.An()}vn(){this.fn(!1),this.tn=(new Date).getTime(),this.sn=0,this.en=0,this.nn=0,this.un=this.An(),this.rn="",this.dn=!1,s.Log.d("{0f7a7d0}","{456f7b1}"),this.hn=window.setInterval(()=>this.pn(),this.frequency)}fn(a){s.Log.d("{0f7a7d0}","{1d02c0d}"),this.mn();const u=()=>{this.hn&&(window.clearInterval(this.hn),this.hn=0)};a?this.an=window.setTimeout(()=>u(),this.un):u()}gn(){if(!this.hn)return;const a=(new Date).getTime();this.nn=a,this.wn(a),this.Sn("e"),this.dn=this.bn(),this.kn()}yn(a){this.un=null!=a?a:this.An()}pn(){const a=(new Date).getTime();this.wn(a),this.Sn("p"),this.dn||(this.dn=this.bn()),this.tn=a}Sn(a){this.rn.endsWith(a)||(this.rn.length>=this.cn&&(this.rn=this.rn.substring(1)),this.rn+=a)}bn(){let a=!1,u=!1,S=!1;for(let D=0;Dthis.ln&&(this.en=a,this.sn=u,this.Sn("s"),this.kn())}Mn(a){return Math.max(0,a-this.tn-this.frequency)}An(){return 2*this.frequency+500}In(){return Math.min(Math.abs(this.nn-this.en),Math.abs(this.nn-this.en+this.sn))S.abort(),a.timeout);const D=yield fetch(a.url,{method:"OPTIONS",signal:S.signal}),L=D.status,Y=D.status>=200&&D.status<300||403==D.status?"online":"offline_wrong_status",oe=performance.now(),_e=Math.round(oe-u);return s.Log.i("{0ce6b17}","{b7012d7}",Y,_e),ps(Y,L)}catch(S){return ps("AbortError"===S.name?"timeout":"offline",void 0,S)}})()}}const Uo="30.0",po="GFN-PC";let pr={Rn:{},Nn:{type:"UNKNOWN",version:""},o:!0,l:!1,xn:!0,On:!1};function Ko(m){var a,u,S,D;if(s.Log.i("{11b33a0}","{e65e133}",JSON.stringify(m)),function(L){var Y,oe;if(L.overrideData){const _e=L.overrideData.toLowerCase(),Ce=new URLSearchParams(_e);"lean"===Ce.get("mode")&&(Tn.o=!1);const Ue=$e=>ft(Ce.get($e));Tn.o=null!==(Y=Ue("log"))&&void 0!==Y?Y:Tn.o,Tn.l=Tn.o&&(null!==(oe=Ue("console"))&&void 0!==oe?oe:Tn.l)}}(m),m.gxtOverrideData){const L=JSON.parse(m.gxtOverrideData);if(L.params)for(const Y of L.params)"pmCommunication"===Y.name&&(pr.Rn.pmCommunication=Y.value,pr.Nn={type:"GXT",version:Y.version})}if(m.overrideData){const L=m.overrideData.toLowerCase(),Y=new URLSearchParams(L),oe=_e=>ft(Y.get(_e));pr.o=null!==(a=oe("log"))&&void 0!==a?a:pr.o,pr.l=pr.o&&(null!==(u=oe("console"))&&void 0!==u?u:pr.l),pr.xn=null!==(S=oe("websocketsignaling"))&&void 0!==S?S:pr.xn,pr.On=null!==(D=oe("webrtcstreamer"))&&void 0!==D?D:pr.On}}class ms extends mn{constructor(a){super(a),this.name="GridServer_GameLaunch_Request",this.gdprLevel=s.GdprLevel.FUNCTIONAL}}const xs={Bn:"GFN_GridServer",clientId:"93289439828086895",eventSchemaVer:"2.1"};class gs{constructor(){this.networkType="UNKNOWN",this.cmsId="",this.sessionId="",this.subSessionId="",this.Fn=new Map,this.Un=0,this.provider=s.TelemetryModule.createTelemetryProvider(xs)}Je(a){this.Ln=a}Gn(a,u,S){return{url:a,verb:u,statusCode:"0",requestStatusCode:"",sessionId:null!=S?S:"",subSessionId:this.subSessionId,requestId:"",serverId:"",callDuration:0,response:"None"}}Hn(a,u,S){var D,L,Y;const oe=s.TelemetryModule.getTelemetryEventIds();return{requestedZoneAddress:a,zoneName:"",networkSessionId:null!==(D=oe.networkSessionId)&&void 0!==D?D:"",sessionId:null!=S?S:"",subSessionId:"",resumeType:u?"MANUAL":"NONE",overrideConfigType:pr.Nn.type,overrideConfigVersion:pr.Nn.version,result:"",codec:"UNKNOWN",ipVersion:"UNKNOWN",launchDuration:0,networkType:this.networkType,streamingProfileGuid:null!==(L=oe.streamingProfileGuid)&&void 0!==L?L:"",systemInfoGuid:null!==(Y=oe.systemInfoGuid)&&void 0!==Y?Y:"",cmsId:this.cmsId}}Vn(a){const u=new Wr({callDuration:a.callDuration,verb:a.verb,sessionId:a.sessionId,subSessionId:a.subSessionId,serverId:a.serverId,url:a.url,overrideConfigType:pr.Nn.type,overrideConfigVersion:pr.Nn.version,requestStatusCode:a.requestStatusCode,requestId:a.requestId,networkType:this.networkType,statusCode:a.statusCode,cmsId:this.cmsId,moduleName:"GRID_SERVER",response:a.response});this.processEvent(u)}Wn(a){var u,S,D;a.launchDuration=Math.round(a.launchDuration);const L=new ms(a);L.parameters.sessionId||(L.parameters.sessionId=this.sessionId),L.parameters.subSessionId||(L.parameters.subSessionId=this.subSessionId);const Y=s.TelemetryModule.getTelemetryEventIds();L.parameters.networkSessionId=null!==(u=Y.networkSessionId)&&void 0!==u?u:"",L.parameters.systemInfoGuid=null!==(S=Y.systemInfoGuid)&&void 0!==S?S:"",L.parameters.streamingProfileGuid=null!==(D=Y.streamingProfileGuid)&&void 0!==D?D:"",this.processEvent(L)}_n(a,u,S,D,L){const Y=new oi({key1:null!=a?a:"",key2:null!=u?u:"",key3:null!=S?S:"",key4:null!=D?D:"",key5:null!=L?L:"",moduleName:"GRID_SERVER",networkType:this.networkType,overrideConfigType:pr.Nn.type,overrideConfigVersion:pr.Nn.version,cmsId:this.cmsId,sessionId:this.sessionId,subSessionId:this.subSessionId});this.processEvent(Y)}qn(a,u,S,D,L,Y,oe){var _e;if(!this.$n(u))return;!oe&&a&&(oe=a.name+": "+a.message);const Ce=new wi({filename:S,lineno:D,stacktrace:null!==(_e=null==a?void 0:a.stack)&&void 0!==_e?_e:"",colno:L,handled:Y?"TRUE":"FALSE",category:null!=oe?oe:"",message:u,moduleName:"GRID_SERVER",sessionId:this.sessionId,subSessionId:this.subSessionId});this.processEvent(Ce)}zn(a,u,S,D){const L=new Ri({eventSequence:S,sleepTime:a,error:D,timeToSleep:u,moduleName:"GRID_SERVER",cmsId:this.cmsId,sessionId:this.sessionId,subSessionId:this.subSessionId});this.processEvent(L)}Kn(a){this.sessionId=a}Qn(a){this.subSessionId=a,this.Fn.clear(),this.Un=0}Xn(a){this.cmsId=a}setNetworkType(a){this.networkType=Lt(a)}Yn(){this.sessionId="",this.subSessionId="",this.cmsId=""}processEvent(a){this.Ln?this.Ln({name:a.name,parameters:a.parameters,gdprLevel:a.gdprLevel,ts:a.ts,clientConfig:xs}):this.provider.processEvent(a)}$n(a){var u;if(this.Un>=50)return!1;const S=null!==(u=this.Fn.get(a))&&void 0!==u?u:0;return!(S>=10||(this.Un++,this.Fn.set(a,S+1),0))}}function os(m){switch(m){case 15867905:case 15867906:case 15867907:return!0;default:return!1}}function Vo(m){switch(m){case"ready_for_connection":case"streaming":case"paused":return!0;default:return!1}}const vs="sessioncontrolimpl";function vr(m){let a=3237093632;if(void 0!==m.statusCode){let u=m.statusCode;1==u?a=15859712:u>0&&u<255&&(a=3237093632+u)}if(m.unifiedErrorCode)switch(s.Log.i("{1daeef1}","{d2c9cc8}",Ve(m.unifiedErrorCode)),a){case 3237093632:case 3237093636:case 3237093381:a=m.unifiedErrorCode}return a}function Ar(m){switch(m){case 1:return"initializing";case 2:return"ready_for_connection";case 3:return"streaming";case 4:case 5:return"paused";case 6:return"resuming";case 7:return"finished";default:return"unknown"}}function wr(m){switch(m){case 3237085186:return"invalid operation";case 15859712:return"success";case 3237093379:case 3237093381:return"Invalid server response";case 3237093384:return"Exception";case 15867907:case 15867905:case 15867906:return"cancelled";case 15868417:return"no network";case 3237089282:return"network error";default:return"server error"}}var lr;!function(m){m[m.CREATE_SESSION=0]="CREATE_SESSION",m[m.RESUME_SESSION=1]="RESUME_SESSION",m[m.DELETE_SESSION=2]="DELETE_SESSION",m[m.GET_SESSIONINFO=3]="GET_SESSIONINFO",m[m.AD_UPDATE=4]="AD_UPDATE",m[m.GET_ACTIVE_SESSIONS=5]="GET_ACTIVE_SESSIONS"}(lr||(lr={}));const Fi="browser",Eo="/v2/session";class Ds{constructor(){var a,u,S,D,L,Y,oe,_e,Ce,Ue,$e,Be,at,At,dt,kt,_n,An,tn,Dn,Bn,Mn;this.jn=new Map,this.Jn={method:"GET",headers:Object.create(null),body:""},this.Zn={type:s.AuthType.JWT_GFN},this.th=new Map,this.protocol="https://",this.ih=new St,this.sh=new Map,this.serverAddress="",this.eh=!1,this.deviceId="",this.clientPlatformName="";let ci=0;ci+=null!==(u=null===(a=pr.Rn.pmCommunication)||void 0===a?void 0:a.httpConnectionTimeout)&&void 0!==u?u:0,ci+=null!==(D=null===(S=pr.Rn.pmCommunication)||void 0===S?void 0:S.httpDataReceiveTimeout)&&void 0!==D?D:0,this.Jn.timeout=ci?1e3*ci:13e3,this.Jn.retryCount=null!==(Y=null===(L=pr.Rn.pmCommunication)||void 0===L?void 0:L.httpRetryCount)&&void 0!==Y?Y:3,this.Jn.backOffDelay=null!==(_e=null===(oe=pr.Rn.pmCommunication)||void 0===oe?void 0:oe.httpBackOffDelay)&&void 0!==_e?_e:500,this.nh={hh:null!==(Ue=null===(Ce=pr.Rn.pmCommunication)||void 0===Ce?void 0:Ce.pollingIntervalMin)&&void 0!==Ue?Ue:1e3,oh:null!==(Be=null===($e=pr.Rn.pmCommunication)||void 0===$e?void 0:$e.pollingIntervalMax)&&void 0!==Be?Be:1e4,step:null!==(At=null===(at=pr.Rn.pmCommunication)||void 0===at?void 0:at.pollingIntervalStep)&&void 0!==At?At:1e3,rh:null!==(kt=null===(dt=pr.Rn.pmCommunication)||void 0===dt?void 0:dt.pollingQueueSizePerStep)&&void 0!==kt?kt:50,adsPollingIntervalMinMS:null!==(An=null===(_n=pr.Rn.pmCommunication)||void 0===_n?void 0:_n.adsPollingIntervalMinMS)&&void 0!==An?An:3e3,adsThrottleIntervalMS:null!==(Dn=null===(tn=pr.Rn.pmCommunication)||void 0===tn?void 0:tn.adsThrottleIntervalMS)&&void 0!==Dn?Dn:2e3,adsWaitTimeoutS:null!==(Mn=null===(Bn=pr.Rn.pmCommunication)||void 0===Bn?void 0:Bn.adsWaitTimeoutS)&&void 0!==Mn?Mn:600},this.ah=new gs,this.dh=new Pr({Cn:li=>{var mi;this.ah.zn(Math.round(li.duration/1e3),Math.round((li.Tn-li.En)/1e3),li.rn,Ve(null!==(mi=this.uh)&&void 0!==mi?mi:0)),this.eh=!0,this.dh.fn(!1)}})}init(a){var u,S;return function(D,L){const oe=s.translatePlatformInfoForClientHeader({os:L.deviceOs,osVersion:L.deviceOsVer,platformType:L.deviceType,model:L.deviceModel,make:L.deviceMake,browser:L.browserType});if(D["content-type"]="application/json",D["nv-client-type"]=L.clientType,D["x-device-id"]=L.deviceId,D["nv-browser-type"]=oe.browser,D["nv-client-streamer"]=L.clientStreamer,oe.os===s.ClientHeaderOSType.UNKNOWN?L.deviceOs&&(D["nv-device-os"]=L.deviceOs):D["nv-device-os"]=oe.os,void 0!==oe.deviceType&&(D["nv-device-type"]=oe.deviceType),void 0!==L.deviceMake&&(D["nv-device-make"]=L.deviceMake),void 0!==L.deviceModel&&(D["nv-device-model"]=L.deviceModel),void 0!==L.clientAppVersion&&(D["nv-client-version"]=L.clientAppVersion),void 0!==L.clientId&&(D["nv-client-id"]=L.clientId),L.clientHeaders)for(const[_e,Ce]of L.clientHeaders)"x-nv-client-identity"!==_e.toLowerCase()&&(D[_e.toLowerCase()]=Ce)}(this.Jn.headers,a),this.th.set("component","sessioncontrol"),this.th.set("component.version","2.0"),this.th.set("client.name",po),this.th.set("client.version",Uo),this.th.set("client.os",null!==(u=a.deviceOs)&&void 0!==u?u:""),this.th.set("client.os.version",null!==(S=a.deviceOsVer)&&void 0!==S?S:""),this.setDefaultServerAddress(a.serverAddress),this.clientPlatformName=a.clientPlatformName,this.deviceId=a.deviceId,this.Rs||this.clientPlatformName!==Fi||Si().then(D=>{this.Rs=D}),this.Ah=a.authenticationProvider,!0}setAuthInfo(a){this.Zn=a}setNetworkType(a){this.ah.setNetworkType(a)}setDefaultServerAddress(a){this.serverAddress!=a&&(this.serverAddress=a,(this.serverAddress.startsWith("mockpm://")||"mockpm.com"===this.serverAddress.toLocaleLowerCase())&&(this.serverAddress=this.serverAddress.replace("mockpm://",""),this.protocol="http://"))}startSession(a,u,S){var D=this;return r(function*(){return yield s.TracingManager.getInstance().createSpan("StartSession",()=>(D.fh(),D.ph(a,u,S)))})()}resumeSession(a,u,S,D){var L=this;return r(function*(){return yield s.TracingManager.getInstance().createSpan("ResumeSession",()=>(L.fh(),L.ph(u,S,D,a)))})()}deleteSession(a,u){var S=this;return r(function*(){return yield s.TracingManager.getInstance().createSpan("DeleteSession",()=>{if(S.fh(),!S.mh()){s.Log.e("{1daeef1}","{4fed44a}");const L=3237085186;return S.gh(L),Promise.resolve(L)}const D=S.wh(a);return S.Sh(lr.DELETE_SESSION,D,"",u,a).then(L=>(15859712==L.result?(S.jn.delete(a),s.Log.d("{1daeef1}","{6206c13}",a)):s.Log.e("{1daeef1}","{4de47e3}",a,Ve(L.result)),S.gh(L.result),L.result)).catch(L=>{S.bh(L,"deleteSession");const Y=3237093384;return S.gh(Y),Y})})})()}getActiveSessions(a){var u=this;return r(function*(){return yield s.TracingManager.getInstance().createSpan("GetSessionList",()=>{if(u.fh(),!u.mh()){s.Log.e("{1daeef1}","{dc27839}");const D=3237085186;return u.gh(D),Promise.resolve({code:D})}return u.Sh(lr.GET_ACTIVE_SESSIONS,u.protocol+u.serverAddress+Eo,"",a).then(D=>{const L={code:D.result,activeSessions:D.activeSessions,zoneName:D.serverId};return u.gh(L.code),15859712!==L.code?s.Log.e("{1daeef1}","{9d2bb75}",Ve(L.code)):s.Log.d("{1daeef1}","{081857f}"),L}).catch(D=>{u.bh(D,"getActiveSessions");const L={code:3237093384};return u.gh(L.code),L})})})()}getSessionInfo(a,u){var S=this;return r(function*(){return yield s.TracingManager.getInstance().createSpan("GetSession",()=>{if(!S.mh()){s.Log.e("{1daeef1}","{603fbab}");const L=3237085186;return S.gh(L),Promise.resolve({code:L})}const D=S.wh(a);return S.Sh(lr.GET_SESSIONINFO,D,"",u,a).then(L=>{const Y={code:L.result,session:L.session,zoneName:L.serverId};return 15859712!==Y.code?s.Log.e("{1daeef1}","{021d0f4}",Ve(Y.code)):s.Log.d("{1daeef1}","{fa53c7c}"),Y}).catch(L=>{S.bh(L,"getSessionInfo");const Y={code:3237093384};return S.gh(Y.code),Y})})})()}kh(){return!!this.yh}fh(){const a=v.trace.getActiveSpan();if(a)for(const[u,S]of this.th)a.setAttribute(u,S)}gh(a,u){const S=v.trace.getActiveSpan();S&&(os(a)?(S.setAttribute("error",!1),S.setAttribute("error.description",wr(a))):15859712==a?S.setAttribute("error",!1):(S.setAttribute("error",!0),S.setAttribute("error.description",null!=u?u:wr(a))))}Ih(a){var u;const S=v.trace.getActiveSpan();null==S||S.setAttribute("session.status",null!==(u=a.status)&&void 0!==u?u:"")}Ch(a){var u,S,D;const L=v.trace.getActiveSpan();if(!L)return;const Y=new Map([["host.dc",null!==(u=a.serverId)&&void 0!==u?u:""],["request.id",null!==(S=a.requestId)&&void 0!==S?S:""],["request.status",null!==(D=a.statusDescription)&&void 0!==D?D:""]]);for(const[oe,_e]of Y)L.setAttribute(oe,_e)}Th(a){var u;let S={sessionId:a.sessionId,subSessionId:"",appId:0,appLaunchMode:0,state:Ar(a.status),zoneAddress:"",zoneName:"",deviceId:"",gpuType:"",monitorSettings:[],connectionInfo:[],finalizedStreamingFeatures:a.finalizedStreamingFeatures};if(S.appId=a.sessionRequestData?a.sessionRequestData.appId:0,a.connectionInfo){const D=a.connectionInfo;if(this.clientPlatformName===Fi){let L=!1;for(const Y of D)if(2===Y.usage){if(!Y.ip){s.Log.e("{1daeef1}","{93ef357}",JSON.stringify(Y));continue}L=!0,S.connectionInfo.push(Y);const oe={ip:"",port:49100,appLevelProtocol:5,protocol:1,usage:14};let _e=Y.ip.split(".");oe.ip=_e[0]+"-"+_e[1]+"-"+_e[2]+"-"+_e[3];let Ce=a.sessionControlInfo.ip.indexOf(".");oe.ip+=a.sessionControlInfo.ip.substring(Ce),s.Log.d("{1daeef1}","{cf7d7ea}",oe.ip),S.connectionInfo.push(oe);break}L||(S.connectionInfo=D)}else S.connectionInfo=D}switch(a.monitorSettings&&(S.monitorSettings=a.monitorSettings),a.gpuType&&(S.gpuType=a.gpuType),null===(u=a.sessionRequestData)||void 0===u?void 0:u.appLaunchMode){case 3:S.appLaunchMode=2;break;case 2:S.appLaunchMode=1}if(a.sessionControlInfo){const D=a.sessionControlInfo.ip,L=a.sessionControlInfo.port;if(D&&L){if(this.jn.has(S.sessionId)){const Y=this.jn.get(S.sessionId);(null==Y?void 0:Y.server)===D&&(null==Y?void 0:Y.port)===L||s.Log.i("{1daeef1}","{f09f5be}",S.sessionId,null==Y?void 0:Y.server,null==Y?void 0:Y.port,D,L)}this.jn.set(S.sessionId,{server:D,port:L})}D&&(S.zoneAddress=D,S.zoneName=D.split(".")[0].toUpperCase())}return S}Eh(a){return a.map(u=>this.Th(u))}Mh(a,u,S,D,L,Y){const oe=()=>{this.fh();let at=this.wh(a),At={action:6,adUpdates:Array.from(this.ih)};s.Log.d("{1daeef1}","{dbca4b1}",JSON.stringify(At)),this.ih.clear(),this.Sh(lr.AD_UPDATE,at,JSON.stringify(At),u,a).then(dt=>{S(dt)}).catch(dt=>D(dt))};let _e=this.ih.length-1,Ce=0;for(;_e>=1;)3===this.ih[_e].adAction&&2===this.ih[_e-1].adAction?(this.ih.splice(_e-1,2),Ce++,_e-=2):3===this.ih[_e-1].adAction?_e--:_e-=2;Ce&&s.Log.d("{1daeef1}","{98a2816}",Ce);let Ue=!1,$e=1e3*this.nh.adsWaitTimeoutS;const Be=this.ih.length;if(Be&&(4===this.ih[Be-1].adAction&&this.sh.size>1||2===this.ih[Be-1].adAction?$e=this.nh.adsThrottleIntervalMS:Ue=!0),Ue)s.TracingManager.getInstance().createSpan("AdUpdateRequest",oe);else{const at=new Promise((dt,kt)=>{this.ih.Je("push",dt)}),At=new s.CancellableWait($e,u.signal);Promise.race([At.getPromise(),at]).then(dt=>{this.ih.Je("push",void 0),At.cancel(),this.ih.length?this.ih.length==Be?s.TracingManager.getInstance().createSpan("AdUpdateRequest",oe):this.Mh(a,u,S,D,L,Y):(s.Log.w("{1daeef1}","{5e1dfd0}"),Y())}).catch(dt=>{this.ih.Je("push",void 0),At.isAborted()?(s.Log.i("{1daeef1}","{d7114d7}"),L()):D(dt)})}}updateAdState(a){if(!this.kh())return s.Log.e("{1daeef1}","{20d9281}"),3237085186;const u=this.sh.get(a.adId);if(!u)return s.Log.e("{1daeef1}","{74daa9c}",a.adId),3237093386;const S=function(D){switch(D){case 1:return 2;case 2:return 3;case 3:return 4;case 4:return 5;case 5:return 6;default:return 0}}(a.adAction);if(!function(D,L){switch(L){case 2:return 1==D||0==D;case 3:case 5:return 2==D||4==D;case 4:return 3==D;case 6:return 5!=D;default:return!1}}(u.Ph,S))return s.Log.e("{1daeef1}","{09d8184}",a.adAction,a.adId,u.Ph),3237093386;if(this.ih.length){const D=this.ih[this.ih.length-1].adId;if(D!==a.adId){const L=this.ih[this.ih.length-1].adAction;if(4!=L&&5!=L)return s.Log.e("{1daeef1}","{c161587}",D),3237093386}}return a.clientTimestamp||(a.clientTimestamp=Math.round(Date.now()/1e3)),this.ih.push(a),u.Ph=S,this.sh.set(a.adId,u),15859712}wh(a){let u=this.protocol;if(a&&this.jn.has(a)){let S=this.jn.get(a);void 0!==S&&(u+=S.server,0!=S.port&&(u+=":"+S.port))}else u+=this.serverAddress;return u+=Eo+"/"+a,u}Dh(a,u){var S,D,L;let Y="";if(u)Y=this.wh(u);else{const oe=null!==(S=a.serverAddress)&&void 0!==S?S:this.serverAddress;Y=this.protocol+oe+Eo}return Y+="?keyboardLayout="+(null!==(D=a.keyboardLayout)&&void 0!==D?D:"en_US"),Y+="&languageCode="+(null!==(L=a.clientLocale)&&void 0!==L?L:"en_US"),Y}Rh(a,u,S){var D,L,Y,oe,_e,Ce,Ue,$e;let Be=1;switch(a.appLaunchMode){case 2:s.Log.d("{1daeef1}","{6d5cf87}"),Be=3;break;case 1:Be=2;break;default:Be=1}const at=null!==(L=null===(D=a.monitorSettings[0])||void 0===D?void 0:D.sdrHdrMode)&&void 0!==L?L:s.SdrHdrMode.SDR;let At,dt={audioMode:2,remoteControllersBitmap:null!==(Y=a.remoteControllersBitmap)&&void 0!==Y?Y:0,sdrHdrMode:at,networkTestSessionId:null,availableSupportedControllers:[],clientVersion:Uo,deviceHashId:this.deviceId,internalTitle:null,clientPlatformName:this.clientPlatformName,metaData:[{key:"SubSessionId",value:S},{key:"wssignaling",value:pr.xn?"1":"0"}],surroundAudioInfo:0,clientTimezoneOffset:null!==(oe=a.clientTimeZoneOffset)&&void 0!==oe?oe:60*(new Date).getTimezoneOffset()*1e3*-1,clientIdentification:po,parentSessionId:null,appId:a.appId,streamerVersion:1,clientRequestMonitorSettings:a.monitorSettings,appLaunchMode:Be,sdkVersion:"1.0",enhancedStreamMode:1,useOps:!0,clientDisplayHdrCapabilities:null,accountLinked:null!==(_e=a.accountLinked)&&void 0!==_e&&_e,partnerCustomData:null!==(Ce=a.partnerCustomData)&&void 0!==Ce?Ce:"",enablePersistingInGameSettings:null!==(Ue=a.enablePersistingInGameSettings)&&void 0!==Ue&&Ue,secureRTSPSupported:!1,userAge:null!==($e=a.userAge)&&void 0!==$e?$e:0,requestedStreamingFeatures:a.streamingFeatures};pr.On||this.clientPlatformName===Fi?dt.metaData.push({key:"GSStreamerType",value:"WebRTC"}):dt.secureRTSPSupported=!0;for(const kt in a.metaData)dt.metaData.push({key:kt,value:a.metaData[kt]});return At=u?JSON.stringify({action:2,data:"RESUME",sessionRequestData:dt,metaData:[]}):JSON.stringify({sessionRequestData:dt}),s.Log.i("{1daeef1}","{c6c3ed4}",u?"PUT":"POST",$t(At)),At}Sh(a,u,S,D,L,Y){var oe=this;return r(function*(){var _e;const Ce=dt=>!os(dt)&&(15859712!==dt||a!==lr.GET_SESSIONINFO);let Ue={method:(()=>{switch(a){case lr.CREATE_SESSION:return"POST";case lr.DELETE_SESSION:return"DELETE";case lr.RESUME_SESSION:case lr.AD_UPDATE:return"PUT";default:return"GET"}})(),headers:{},body:S,retryCount:oe.Jn.retryCount,timeout:oe.Jn.timeout};Object.keys(oe.Jn.headers).forEach(dt=>{Ue.headers[dt]=oe.Jn.headers[dt]}),a!==lr.DELETE_SESSION&&a!==lr.AD_UPDATE||(Ue.keepalive=!0,oe.Rs&&Ci(oe.Rs)&&!ki(oe.Rs,81)&&(Ue.keepalive=!1));const $e=new s.CancellableWait(12e4,null==D?void 0:D.signal);try{const dt=oe.getAuthHeader(Y),kt=yield Promise.race([dt,$e.getPromise()]);if(!("string"==typeof kt&&kt.length>0)){let _n=3237093377;return $e.isTimedOut()?(_n=3237093387,s.Log.e("{1daeef1}","{86436d3}")):s.Log.e("{1daeef1}","{cfb6326}"),{result:_n}}Ue.headers.authorization=kt}catch{let kt=3237093377;return $e.isAborted()?kt=15867907:s.Log.e("{1daeef1}","{cfb6326}"),{result:kt}}finally{$e.cancel()}const Be=performance.now();let at=oe.ah.Gn(u,null!==(_e=Ue.method)&&void 0!==_e?_e:"",L);at.statusCode="0";let At="";return s.performHttpRequest(u,Ue,void 0,D).then(dt=>{At=dt.data;const kt=performance.now();if(at.statusCode=dt.status.toString(),at.callDuration=Math.round(kt-Be),!dt.data)throw s.Log.e("{1daeef1}","{ea40865}"),new SyntaxError("The response from server does not contain any data");let _n;try{_n=JSON.parse(dt.data)}catch(Dn){throw at.response=dt.data,Dn}if(!_n.requestStatus)throw s.Log.e("{1daeef1}","{862f264}",ss(dt.data)),new SyntaxError("RequestStatus missing in response");const An=_n.requestStatus.serverId.toUpperCase();at.requestId=_n.requestStatus.requestId,at.serverId=An,at.requestStatusCode=_n.requestStatus.statusDescription;const tn={result:vr(_n.requestStatus),Nh:_n,serverId:An};if(oe.Ch(_n.requestStatus),a===lr.GET_ACTIVE_SESSIONS){const Dn=_n.sessions;Dn&&(tn.activeSessions=oe.Eh(Dn))}else if(a!==lr.DELETE_SESSION){const Dn=_n.session;Dn&&(tn.session=oe.Th(Dn),oe.Ih(Dn),at.sessionId=tn.session.sessionId);const Bn=_n.otherUserSessions;Bn&&(tn.activeSessions=oe.Eh(Bn),tn.activeSessions.length&&s.Log.d("{1daeef1}","{ba4be1c}",tn.activeSessions.length))}return at&&Ce(tn.result)&&(oe.ah.Vn(at),at=void 0),function(Dn){switch(Dn){case 3237093646:case 3237093648:case 3237093669:return!0;default:return!1}}(tn.result)&&!Y&&oe.Ah?oe.Sh(a,u,S,D,L,tn.result):tn}).catch(dt=>{let kt={result:3237089282};const _n=performance.now();return dt.code?kt.result=function(An){let tn=3237093384;return An===s.HttpErrorCode.NoNetwork?tn=15868417:An===s.HttpErrorCode.NetworkError?tn=3237089282:An===s.HttpErrorCode.ResponseParseFailure?tn=3237093379:3237089283===An?tn=3237089283:An==s.HttpErrorCode.UserAborted&&(tn=15867907),tn}(dt.code):function(An){let tn=!1;return(An instanceof SyntaxError||An instanceof TypeError&&An.message&&An.message.includes("Cannot read property"))&&(tn=!0,s.Log.e("{1daeef1}","{d8979bb}",An.name,An.message)),tn}(dt)?(kt.result=3237093379,s.Log.e("{1daeef1}","{04bcd6f}",ss(At))):(kt.result=3237093384,s.Log.e("{1daeef1}","{94d55bb}",dt,dt.stack),oe.ah.qn(dt,"performSessionRequest",vs+".ts",0,0,!0)),at&&Ce(kt.result)&&(at.callDuration=Math.round(_n-Be),oe.ah.Vn(at)),s.Log.e("{1daeef1}","{9c647aa}",Ue.method,u),s.Log.e("{1daeef1}","{200d7ba}",kt.result,wr(kt.result)),kt})})()}xh(a,u,S){var D,L,Y,oe,_e,Ce;let Ue="Configuring",$e=0;if(a.seatSetupInfo)switch(a.seatSetupInfo.seatSetupStep){case 0:Ue="Connecting";break;case 1:Ue="InQueue",$e=a.seatSetupInfo.queuePosition{const _e=!!D,Ce=()=>{var At;const dt={code:3237085186,subSessionId:L};this.gh(dt.code);const kt=this.ah.Hn(null!==(At=a.serverAddress)&&void 0!==At?At:"",_e,D);kt.result=Ve(dt.code),kt.subSessionId=L,this.ah.Wn(kt),Y(dt)};if(!this.mh())return s.Log.e("{1daeef1}","{3781843}"),void Ce();if(this.kh())return s.Log.e("{1daeef1}","{3753849}"),void Ce();this.ah.Xn(a.appId),this.ah.Qn(L);const Ue=this.Dh(a,D),$e=new URL(Ue).hostname,Be=this.ah.Hn($e,_e);this.yh={resolve:Y,reject:oe,sessionId:D,subSessionId:L,Fh:S,Uh:Number.MAX_VALUE,Lh:!1,Gh:u,Hh:Be,startTime:performance.now()};const at=this.Rh(a,_e,L);this.Sh(_e?lr.RESUME_SESSION:lr.CREATE_SESSION,Ue,at,u).then(At=>{!_e&&15859712===At.result&&At.session&&s.Log.i("{1daeef1}","{7c01bce}",At.session.sessionId),this.Vh(At)}).catch(At=>{this.Wh(At)})}).catch(Y=>(this.sh.clear(),this.ih.clear(),this.yh=void 0,this.bh(Y,"startOrResumeSession"),this.gh(3237093384),{code:3237093384,subSessionId:L}))}_h(){var a,u;if(!this.yh)return;const D=this.wh(null!==(a=this.yh.sessionId)&&void 0!==a?a:"");this.Sh(lr.GET_SESSIONINFO,D,"",this.yh.Gh,null!==(u=this.yh.sessionId)&&void 0!==u?u:"").then(L=>{this.Vh(L)}).catch(L=>{this.Wh(L)})}Wh(a){s.Log.e("{1daeef1}","{e3be7ea}",a.message),this.ah.qn(a,"processSessionSetupException",vs+".ts",0,0,!0),this.qh(3237093384)}qh(a,u,S){var D=this;return r(function*(){var L,Y,oe;if(D.uh=a,D.yh)try{D.dh.gn(),D.eh?(a=function(Ue){let $e=Ue;switch(Ue){case 3237093701:case 3237093654:$e=15867909}return $e!==Ue&&s.Log.i("{fda9cda}","{49e2182}",Ve(Ue),Ve($e)),$e}(a),D.dh.fn(!1)):D.dh.fn(!0),3237089282===a&&((yield new Ws(D.serverAddress).run()).Pn||(a=function(Ue){let $e=Ue;return 3237089282===Ue&&($e=15868417),$e!==Ue&&s.Log.i("{fda9cda}","{b84d4c8}",Ve(Ue),Ve($e)),$e}(a)));const _e={code:a,subSessionId:null!==(L=D.yh.subSessionId)&&void 0!==L?L:"",session:D.yh.$h,zoneName:u,activeSessions:S},Ce=D.yh.Hh;Ce.result=Ve(a),Ce.zoneName=null!=u?u:"",Ce.sessionId=null!==(Y=D.yh.sessionId)&&void 0!==Y?Y:"",Ce.launchDuration+=performance.now()-D.yh.startTime,D.ah.Wn(D.yh.Hh),D.gh(a),s.Log.d("{1daeef1}","{c4902fa}",Ve(a),null!==(oe=D.yh.sessionId)&&void 0!==oe?oe:""),D.yh.resolve(_e),D.yh=void 0,D.sh.clear(),D.ih.clear()}catch(_e){D.yh&&(D.yh.reject(_e),D.yh=void 0)}})()}Vh(a){var u,S,D;if(!this.yh)return;const L=()=>{this.qh(Y.Lh?15867906:15867905)},Y=this.yh;if(a.session&&(a.session.subSessionId=this.yh.subSessionId,this.yh.$h=a.session,this.yh.sessionId=a.session.sessionId,Y.Lh=1==a.Nh.session.seatSetupInfo.seatSetupStep),15859712===a.result&&a.session){const oe=a.session;if("ready_for_connection"===oe.state||"streaming"===oe.state)"streaming"==oe.state&&this.ah._n("InvalidSessionStateTransition","Streaming"),s.Log.i("{1daeef1}","{30d6f44}",null!==(u=this.yh.sessionId)&&void 0!==u?u:""),this.qh(15859712,a.serverId);else if("initializing"==oe.state||"resuming"==oe.state){const _e=this.xh(a.Nh.session,this.yh.Uh,this.yh.subSessionId);this.yh.Fh(_e),Y.Lh&&(this.yh.Uh=_e.queuePosition),_e.ads.length?(this.dh.yn(1e3*_e.ads[0].adLengthInSeconds),this.Mh(null!==(S=Y.sessionId)&&void 0!==S?S:"",Y.Gh,this.Vh.bind(this),this.Wh.bind(this),L,this._h.bind(this))):(this.dh.yn(),new s.CancellableWait(this.Bh(a.Nh.session),null===(D=this.yh.Gh)||void 0===D?void 0:D.signal).getPromise().then(this._h.bind(this)).catch(L))}else s.Log.e("{1daeef1}","{ce47cd1}",ss(JSON.stringify(a.Nh))),this.qh(3237093378,a.serverId)}else 15867907===a.result?L():this.qh(a.result,a.serverId,a.activeSessions)}bh(a,u){s.Log.e("{1daeef1}","{32f1296}",u,a.message),s.Log.e("{1daeef1}","{94d55bb}",a,a.stack),this.ah.qn(a,u,vs+".ts",0,0,!0)}}function ss(m){return $t(m).replace(/("clientIp" *: *")(\b\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\b)(?=")/g,"$1***")}I.AudioFormat=void 0,I.Protocol=void 0,I.AppLevelProtocol=void 0,I.Usage=void 0,I.AdState=void 0,I.SESSIONMODIFY_ACTION=void 0,I.AdAction=void 0,I.ClientType=void 0,I.SessionState=void 0,I.SessionProgressState=void 0,I.AppLaunchMode=void 0,I.ScErrorCode=void 0,function(m){m[m.UNKNOWN=0]="UNKNOWN",m[m.STEREO=1]="STEREO",m[m.UP_TO_5_1_SURROUND_PCM=2]="UP_TO_5_1_SURROUND_PCM",m[m.UP_TO_7_1_SURROUND_PCM=3]="UP_TO_7_1_SURROUND_PCM"}(I.AudioFormat||(I.AudioFormat={})),function(m){m[m.UNKNOWN=0]="UNKNOWN",m[m.TCP=1]="TCP",m[m.UDP=2]="UDP"}(I.Protocol||(I.Protocol={})),function(m){m[m.UNKNOWN=0]="UNKNOWN",m[m.RTSP=1]="RTSP",m[m.HTTP=2]="HTTP",m[m.RTSPRU=3]="RTSPRU",m[m.SOCKET=4]="SOCKET",m[m.HTTPS=5]="HTTPS",m[m.RTSPS=6]="RTSPS"}(I.AppLevelProtocol||(I.AppLevelProtocol={})),function(m){m[m.UNKNOWN=0]="UNKNOWN",m[m.CONTROL=1]="CONTROL",m[m.VIDEO=2]="VIDEO",m[m.AUDIO=3]="AUDIO",m[m.INPUT=4]="INPUT",m[m.CUSTOM=5]="CUSTOM",m[m.USB=6]="USB",m[m.RTSP=7]="RTSP",m[m.GAMESTREAM_CONTROL=8]="GAMESTREAM_CONTROL",m[m.GAMESTREAM_SECURE_CONTROL=9]="GAMESTREAM_SECURE_CONTROL",m[m.SESSION_CONTROL=10]="SESSION_CONTROL",m[m.NETWORK_TEST_CONTROL=11]="NETWORK_TEST_CONTROL",m[m.RTSPRU=12]="RTSPRU",m[m.AUDIO_INPUT=13]="AUDIO_INPUT",m[m.SIGNALING=14]="SIGNALING",m[m.MEDIA=15]="MEDIA",m[m.RTSPS=16]="RTSPS",m[m.BUNDLE=17]="BUNDLE"}(I.Usage||(I.Usage={})),function(m){m[m.UNKNOWN=0]="UNKNOWN",m[m.NOT_STARTED=1]="NOT_STARTED",m[m.STARTED=2]="STARTED",m[m.PAUSED=3]="PAUSED",m[m.RESUMED=4]="RESUMED",m[m.FINISHED=5]="FINISHED",m[m.CANCELED=6]="CANCELED"}(I.AdState||(I.AdState={})),function(m){m[m.UNKNOWN=0]="UNKNOWN",m[m.PAUSE=1]="PAUSE",m[m.RESUME=2]="RESUME",m[m.SESSION_RATING=3]="SESSION_RATING",m[m.JOIN=4]="JOIN",m[m.FORWARD=5]="FORWARD",m[m.AD_UPDATE=6]="AD_UPDATE",m[m.TRANSFER=7]="TRANSFER"}(I.SESSIONMODIFY_ACTION||(I.SESSIONMODIFY_ACTION={})),function(m){m[m.UNKNOWN=0]="UNKNOWN",m[m.START=1]="START",m[m.PAUSE=2]="PAUSE",m[m.RESUME=3]="RESUME",m[m.FINISH=4]="FINISH",m[m.CANCEL=5]="CANCEL"}(I.AdAction||(I.AdAction={})),function(m){m.BROWSER="BROWSER",m.GFNSDK="GFNSDK",m.NATIVE="NATIVE"}(I.ClientType||(I.ClientType={})),function(m){m.INITIALIZING="initializing",m.READY_FOR_CONNECTION="ready_for_connection",m.STREAMING="streaming",m.PAUSED="paused",m.RESUMING="resuming",m.FINISHED="finished",m.UNKNOWN="unknown"}(I.SessionState||(I.SessionState={})),function(m){m.CONNECTING="Connecting",m.IN_QUEUE="InQueue",m.CONFIGURING="Configuring",m.PREVIOUS_SESSION_CLEANUP="PreviousSessionCleanup",m.STARTING_STREAMER="StartingStreamer"}(I.SessionProgressState||(I.SessionProgressState={})),function(m){m[m.Default=0]="Default",m[m.GamepadFriendly=1]="GamepadFriendly",m[m.TouchFriendly=2]="TouchFriendly"}(I.AppLaunchMode||(I.AppLaunchMode={})),function(m){m[m.Success=15859712]="Success",m[m.InvalidOperation=3237085186]="InvalidOperation",m[m.NetworkError=3237089282]="NetworkError",m[m.GetActiveSessionServerError=3237089283]="GetActiveSessionServerError",m[m.AuthTokenNotUpdated=3237093377]="AuthTokenNotUpdated",m[m.SessionFinishedState=3237093378]="SessionFinishedState",m[m.ResponseParseFailure=3237093379]="ResponseParseFailure",m[m.InvalidServerResponse=3237093381]="InvalidServerResponse",m[m.PutOrPostInProgress=3237093382]="PutOrPostInProgress",m[m.GridServerNotInitialized=3237093383]="GridServerNotInitialized",m[m.DOMExceptionInSessionControl=3237093384]="DOMExceptionInSessionControl",m[m.InvalidAdStateTransition=3237093386]="InvalidAdStateTransition",m[m.AuthTokenUpdateTimeout=3237093387]="AuthTokenUpdateTimeout",m[m.SessionServerErrorBegin=3237093632]="SessionServerErrorBegin",m[m.RequestForbidden=3237093634]="RequestForbidden",m[m.ServerInternalTimeout=3237093635]="ServerInternalTimeout",m[m.ServerInternalError=3237093636]="ServerInternalError",m[m.ServerInvalidRequest=3237093637]="ServerInvalidRequest",m[m.ServerInvalidRequestVersion=3237093638]="ServerInvalidRequestVersion",m[m.SessionListLimitExceeded=3237093639]="SessionListLimitExceeded",m[m.InvalidRequestDataMalformed=3237093640]="InvalidRequestDataMalformed",m[m.InvalidRequestDataMissing=3237093641]="InvalidRequestDataMissing",m[m.RequestLimitExceeded=3237093642]="RequestLimitExceeded",m[m.SessionLimitExceeded=3237093643]="SessionLimitExceeded",m[m.InvalidRequestVersionOutOfDate=3237093644]="InvalidRequestVersionOutOfDate",m[m.SessionEntitledTimeExceeded=3237093645]="SessionEntitledTimeExceeded",m[m.AuthFailure=3237093646]="AuthFailure",m[m.InvalidAuthenticationMalformed=3237093647]="InvalidAuthenticationMalformed",m[m.InvalidAuthenticationExpired=3237093648]="InvalidAuthenticationExpired",m[m.InvalidAuthenticationNotFound=3237093649]="InvalidAuthenticationNotFound",m[m.EntitlementFailure=3237093650]="EntitlementFailure",m[m.InvalidAppIdNotAvailable=3237093651]="InvalidAppIdNotAvailable",m[m.InvalidAppIdNotFound=3237093652]="InvalidAppIdNotFound",m[m.InvalidSessionIdMalformed=3237093653]="InvalidSessionIdMalformed",m[m.InvalidSessionIdNotFound=3237093654]="InvalidSessionIdNotFound",m[m.EulaUnAccepted=3237093655]="EulaUnAccepted",m[m.MaintenanceStatus=3237093656]="MaintenanceStatus",m[m.ServiceUnAvailable=3237093657]="ServiceUnAvailable",m[m.SteamGuardRequired=3237093658]="SteamGuardRequired",m[m.SteamLoginRequired=3237093659]="SteamLoginRequired",m[m.SteamGuardInvalid=3237093660]="SteamGuardInvalid",m[m.SteamProfilePrivate=3237093661]="SteamProfilePrivate",m[m.InvalidCountryCode=3237093662]="InvalidCountryCode",m[m.InvalidLanguageCode=3237093663]="InvalidLanguageCode",m[m.MissingCountryCode=3237093664]="MissingCountryCode",m[m.MissingLanguageCode=3237093665]="MissingLanguageCode",m[m.SessionNotPaused=3237093666]="SessionNotPaused",m[m.EmailNotVerified=3237093667]="EmailNotVerified",m[m.InvalidAuthenticationUnsupportedProtocol=3237093668]="InvalidAuthenticationUnsupportedProtocol",m[m.InvalidAuthenticationUnknownToken=3237093669]="InvalidAuthenticationUnknownToken",m[m.InvalidAuthenticationCredentials=3237093670]="InvalidAuthenticationCredentials",m[m.SessionNotPlaying=3237093671]="SessionNotPlaying",m[m.InvalidServiceResponse=3237093672]="InvalidServiceResponse",m[m.AppPatching=3237093673]="AppPatching",m[m.GameNotFound=3237093674]="GameNotFound",m[m.NotEnoughCredits=3237093675]="NotEnoughCredits",m[m.InvitationOnlyRegistration=3237093676]="InvitationOnlyRegistration",m[m.RegionNotSupportedForRegistration=3237093677]="RegionNotSupportedForRegistration",m[m.SessionTerminatedByAnotherClient=3237093678]="SessionTerminatedByAnotherClient",m[m.DeviceIdAlreadyUsed=3237093679]="DeviceIdAlreadyUsed",m[m.ServiceNotExist=3237093680]="ServiceNotExist",m[m.SessionExpired=3237093681]="SessionExpired",m[m.SessionLimitPerDeviceReached=3237093682]="SessionLimitPerDeviceReached",m[m.ForwardingZoneOutOfCapacity=3237093683]="ForwardingZoneOutOfCapacity",m[m.RegionNotSupportedIndefinitely=3237093684]="RegionNotSupportedIndefinitely",m[m.RegionBanned=3237093685]="RegionBanned",m[m.RegionOnHoldForFree=3237093686]="RegionOnHoldForFree",m[m.RegionOnHoldForPaid=3237093687]="RegionOnHoldForPaid",m[m.AppMaintenanceStatus=3237093688]="AppMaintenanceStatus",m[m.ResourcePoolNotConfigured=3237093689]="ResourcePoolNotConfigured",m[m.InsufficientVmCapacity=3237093690]="InsufficientVmCapacity",m[m.InsufficientRouteCapacity=3237093691]="InsufficientRouteCapacity",m[m.InsufficientScratchSpaceCapacity=3237093692]="InsufficientScratchSpaceCapacity",m[m.RequiredSeatInstanceTypeNotSupported=3237093693]="RequiredSeatInstanceTypeNotSupported",m[m.ServerSessionQueueLengthExceeded=3237093694]="ServerSessionQueueLengthExceeded",m[m.RegionNotSupportedForStreaming=3237093695]="RegionNotSupportedForStreaming",m[m.SessionForwardRequestAllocationTimeExpired=3237093696]="SessionForwardRequestAllocationTimeExpired",m[m.SessionForwardGameBinariesNotAvailable=3237093697]="SessionForwardGameBinariesNotAvailable",m[m.GameBinariesNotAvailableInRegion=3237093698]="GameBinariesNotAvailableInRegion",m[m.UekRetrievalFailed=3237093699]="UekRetrievalFailed",m[m.EntitlementFailureForResource=3237093700]="EntitlementFailureForResource",m[m.SessionInQueueAbandoned=3237093701]="SessionInQueueAbandoned",m[m.MemberTerminated=3237093702]="MemberTerminated",m[m.SessionRemovedFromQueueMaintenance=3237093703]="SessionRemovedFromQueueMaintenance",m[m.ZoneMaintenanceStatus=3237093704]="ZoneMaintenanceStatus",m[m.GuestModeCampaignDisabled=3237093705]="GuestModeCampaignDisabled",m[m.RegionNotSupportedAnonymousAccess=3237093706]="RegionNotSupportedAnonymousAccess",m[m.InstanceTypeNotSupportedInSingleRegion=3237093707]="InstanceTypeNotSupportedInSingleRegion",m[m.InvalidZoneForQueuedSession=3237093710]="InvalidZoneForQueuedSession",m[m.SessionWaitingAdsTimeExpired=3237093711]="SessionWaitingAdsTimeExpired",m[m.UserCancelledWatchingAds=3237093712]="UserCancelledWatchingAds",m[m.StreamingNotAllowedInLimitedMode=3237093713]="StreamingNotAllowedInLimitedMode",m[m.ForwardRequestJPMFailed=3237093714]="ForwardRequestJPMFailed",m[m.MaxSessionNumberLimitExceeded=3237093715]="MaxSessionNumberLimitExceeded",m[m.GuestModePartnerCapacityDisabled=3237093716]="GuestModePartnerCapacityDisabled",m[m.SessionRejectedNoCapacity=3237093717]="SessionRejectedNoCapacity",m[m.SessionInsufficientPlayabilityLevel=3237093718]="SessionInsufficientPlayabilityLevel",m[m.SessionServerErrorEnd=3237093887]="SessionServerErrorEnd",m[m.SessionSetupCancelled=15867905]="SessionSetupCancelled",m[m.SessionSetupCancelledDuringQueuing=15867906]="SessionSetupCancelledDuringQueuing",m[m.RequestCancelled=15867907]="RequestCancelled",m[m.SystemSleepDuringSessionSetup=15867909]="SystemSleepDuringSessionSetup",m[m.NoInternetDuringSessionSetup=15868417]="NoInternetDuringSessionSetup"}(I.ScErrorCode||(I.ScErrorCode={}));const Ro="gridserver";function as(m){const a={ip:"",port:0,protocol:""};for(const S of m.connectionInfo)if(14===S.usage){a.ip=S.ip,a.port=S.port,a.protocol=5===S.appLevelProtocol?"https":"http",a.resourcePath=S.resourcePath;break}const u={signalConnectionInfo:a,mediaConnectionInfo:m.connectionInfo,streamInfo:[],clientLocale:"",...m};for(const S of m.monitorSettings)u.streamInfo.push({width:S.widthInPixels,height:S.heightInPixels,fps:S.framesPerSecond,sdrHdrMode:S.sdrHdrMode});return u}function io(m){let a=[];if(m)for(const u of m)a.push({sessionId:u.sessionId,appId:u.appId,state:u.state,appLaunchMode:u.appLaunchMode});return a}I.ClientStreamer=void 0,I.GS_EVENTS=void 0,function(m){m.CLASSIC="NVIDIA-CLASSIC",m.WEBRTC="WEBRTC"}(I.ClientStreamer||(I.ClientStreamer={})),function(m){m.ACTIVE_SESSIONS_RESULT="ActiveSessionsResult",m.PROGRESS_UPDATE="ProgressUpdate",m.SESSION_UPDATE="SessionUpdate",m.TELEMETRY_EVENT="TelemetryEvent",m.LOG_EVENT="Log"}(I.GS_EVENTS||(I.GS_EVENTS={}));class Jo extends Ds{constructor(a,u){super(),this.subSessionId="",this.zh=new Map,this.Kh=!1,this.Qh=new Map,this.Xh=S=>{this.Yh.emit("TelemetryEvent",S)},this.jh=S=>{this.Jh(S)},this.Rs=a,this.Yh=new bi("Log",u),s.Logger.isCallbackRegistered()||(this.Kh=!0,s.Logger.register(this.Yh.Ye.bind(this.Yh))),this.ah.Je(this.Xh)}initialize(a){var u;s.Log.i("{6bae601}","{6802390}",Ye);const S={deviceId:null!==(u=a.deviceHashId)&&void 0!==u?u:"",...a,clientStreamer:a.clientStreamer.toString()};super.init(S),this.ah.Yn(),s.Log.d("{6bae601}","{5af3344}")}uninitialize(){this.cancelSessionSetup(),this.Kh&&s.Logger.unregister(),this.Yh.removeAllListeners()}addListener(a,u){this.Yh.addListener(a,u)}removeListener(a,u){this.Yh.removeListener(a,u)}updateTelemetryEventIds(a){s.TelemetryModule.setTelemetryEventIds(a)}getAllActiveSessions(){s.TracingManager.getInstance().createSpan("GetSessionList",()=>(this.fh(),this.Zh()))}Zh(){var a=this;return r(function*(){if(s.Log.d("{6bae601}","{1aef200}"),!a.serverAddress)return a.Yh.emit("ActiveSessionsResult",{sessionList:[],error:{code:3237093383,description:"GridServer not initialized"}}),void a.gh(3237093383);let u=a.protocol+a.serverAddress+"/v2/session";yield a.Sh(lr.GET_ACTIVE_SESSIONS,u,"").then(S=>{let D={sessionList:io(S.activeSessions)};if(15859712!=S.result){let L={code:S.result,description:wr(S.result)};D.error=L,s.Log.e("{6bae601}","{9d2bb75}",Ve(L.code))}else s.Log.d("{6bae601}","{081857f}");a.gh(S.result),a.Yh.emit("ActiveSessionsResult",D)}).catch(S=>{s.Log.e("{6bae601}","{63f9b57}",S.message),s.Log.e("{6bae601}","{94d55bb}",S,S.stack),a.ah.qn(S,"getAllActiveSessions",Ro+".ts",0,0,!0);let D={sessionList:[],error:{code:3237093384,description:wr(3237093384)}};a.gh(3237093384),a.Yh.emit("ActiveSessionsResult",D)}),s.Log.d("{6bae601}","{a9e5439}")})()}io(a,u=""){s.Log.d("{6bae601}","{1e04fe6}",u,a),this.subSessionId=a,this.ah.Kn(u),this.ah.Qn(a);const S=this.zh.get(a);void 0===S||""===S?this.zh.set(a,u):s.Log.w("{6bae601}","{7dd264b}",u)}getSessionId(){var a;return null!==(a=this.zh.get(this.subSessionId))&&void 0!==a?a:""}getSubSessionId(){return this.subSessionId}putOrPostSession(a,u,S){return s.TracingManager.getInstance().createSpan(S?"PutSession":"PostSession",()=>(this.fh(),this.so(a,u,S)))}so(a,u,S){var D;const L=!!S;if(this.io(Ln(),S),!this.serverAddress)return this.eo({code:3237093383,description:"GridServer not initialized"});if(this.no)return this.eo({code:3237093382,description:"Previous PutOrPost call is still in progress"});this.ah.Xn(a.appId),this.zoneName=void 0,this.zoneAddress=void 0,this.gpuType=void 0;const Y=this.ah.Hn(this.serverAddress,L,S);Y.networkSessionId=null!==(D=a.networkSessionId)&&void 0!==D?D:"";const oe=function($e){var Be;const at={monitorSettings:[],...$e};if(0===at.monitorSettings.length)for(const At of null!==(Be=$e.streamParams)&&void 0!==Be?Be:[])at.monitorSettings.push({heightInPixels:At.height,framesPerSecond:At.fps,widthInPixels:At.width});return at}(a);let _e=this.Dh(oe,S),Ce=this.Rh(oe,L,this.subSessionId),Ue=performance.now();return new Promise(($e,Be)=>{const at=new AbortController;this.no=at,this.Sh(L?lr.RESUME_SESSION:lr.CREATE_SESSION,_e,Ce,at,S).then(At=>{var dt,kt,_n,An,tn;let Dn;if(Y.launchDuration=Math.round(performance.now()-Ue),!(null===(dt=At.session)||void 0===dt)&&dt.sessionId&&(Y.sessionId=null===(kt=At.session)||void 0===kt?void 0:kt.sessionId,S=null===(_n=At.session)||void 0===_n?void 0:_n.sessionId),this.zoneName=At.serverId||this.zoneName,At.session&&(Dn=as(At.session),Dn.subSessionId=this.subSessionId,this.ho(Dn)),Y.zoneName=null!==(An=this.zoneName)&&void 0!==An?An:"",at.signal.aborted&&!os(At.result)&&(At.result=15867905,s.Log.d("{6bae601}","{3ec0e11}")),15859712==At.result)s.Log.d("{6bae601}","{30536f4}",S),this.io(this.getSubSessionId(),S),"ready_for_connection"==(null===(tn=At.session)||void 0===tn?void 0:tn.state)?(Y.result=Ve(15859712),this.ah.Wn(Y)):this.Qh.set(Y.sessionId,Y),this.gh(At.result),$e(Dn);else{15867907===At.result&&(At.result=15867905);const Bn={code:At.result,sessionId:S,description:wr(At.result),sessionList:io(At.activeSessions)};s.Log.e("{6bae601}","{17f93f3}",Ve(Bn.code)),Y.result=Ve(Bn.code),this.ah.Wn(Y),this.gh(Bn.code),Be(Bn)}}).catch(At=>{let dt={code:3237093384,sessionId:S,description:wr(3237093384)};s.Log.e("{6bae601}","{4318505}",At.message),s.Log.e("{6bae601}","{94d55bb}",At,At.stack),this.ah.qn(At,"putOrPostSession",Ro+".ts",0,0,!0),Y.result=Ve(dt.code),this.ah.Wn(Y),this.gh(dt.code),Be(dt)})}).finally(()=>{this.no=void 0})}getSession(a,u){return s.TracingManager.getInstance().createSpan("GetSession",()=>(this.fh(),this.oo(a,u)))}oo(a,u){if(!this.serverAddress)return this.eo({code:3237093383,description:"GridServer not initialized"});if(u)return new Promise((S,D)=>{const L=this.wh(a),Y=new URL(L).hostname;let oe=this.Qh.get(a);oe?this.Qh.delete(a):(s.Log.e("{6bae601}","{bb9b2e3}",a),oe=this.ah.Hn(Y,!1,a));const _e=new AbortController;this.ro=_e,this.yh={resolve:S,reject:D,sessionId:a,subSessionId:this.subSessionId,Fh:this.jh,Uh:Number.MAX_VALUE,Lh:!1,Gh:_e,startTime:performance.now(),Hh:oe},this._h()}).then(S=>{let D;if(S.session&&(D=as(S.session),this.ho(D)),15859712===S.code&&D)return D;throw{code:S.code,description:wr(S.code)}}).finally(()=>{this.sh.clear(),this.ih.clear(),this.yh=void 0});{const S=this.wh(a);return this.Sh(lr.GET_SESSIONINFO,S,"",void 0,a).then(D=>{if(this.gh(D.result),15859712===D.result&&D.session)return as(D.session);throw{code:D.result,description:wr(D.result)}})}}sendDeleteRequest(a){return s.TracingManager.getInstance().createSpan("DeleteSession",()=>(this.fh(),this.ao(a)))}ao(a){if(!this.serverAddress)return this.eo({code:3237093383,description:"Gridserver not initialized"});let u=this.wh(a);return new Promise((S,D)=>{s.Log.d("{6bae601}","{bbad3ce}",a),this.Sh(lr.DELETE_SESSION,u,"",void 0,a).then(L=>{if(15859712==L.result)s.Log.d("{6bae601}","{6206c13}",a),S();else{let Y={code:L.result,description:wr(L.result),sessionId:a};s.Log.e("{6bae601}","{4de47e3}",a,Ve(L.result)),D(Y)}this.gh(L.result)}).catch(L=>{const Y={code:3237093384,description:wr(3237093384)};s.Log.e("{6bae601}","{c4f620c}",L.message),s.Log.e("{6bae601}","{94d55bb}",L,L.stack),this.ah.qn(L,"sendDeleteRequestImpl",Ro+".ts",0,0,!0),D(Y)})})}cancelSessionSetup(){var a,u;s.Log.i("{6bae601}","{c73e640}"),null===(a=this.no)||void 0===a||a.abort(),null===(u=this.ro)||void 0===u||u.abort(),this.no=void 0,this.ro=void 0}getZoneName(){var a;return null!==(a=this.zoneName)&&void 0!==a?a:""}getZoneAddress(){var a;return null!==(a=this.zoneAddress)&&void 0!==a?a:""}getGpuType(){var a;return null!==(a=this.gpuType)&&void 0!==a?a:""}eo(a){return this.gh(a.code,a.description),Promise.reject(a)}ho(a){this.zoneAddress=a.zoneAddress||this.zoneAddress,this.zoneName=a.zoneName||this.zoneName,this.gpuType=a.gpuType||this.gpuType}kh(){return!!this.ro}Jh(a){this.Yh.emit("SessionUpdate",a),this.Yh.emit("ProgressUpdate",{sessionId:a.sessionId,subSessionId:a.subSessionId,queuePosition:a.queuePosition,eta:a.eta,state:a.progressState})}}class to extends Jo{constructor(){super()}getAllActiveSessions(){window.setTimeout(()=>{s.Log.d("{6bae601}","{b575263}"),this.Yh.emit("ActiveSessionsResult",{sessionList:[]})},1)}putOrPostSession(a,u,S){var D;return s.Log.d("{6bae601}","{71c010f}"),this.io(Ln(),null!==(D=a.sessionId)&&void 0!==D?D:"PassThruSessionId"),new Promise((L,Y)=>{window.setTimeout(()=>{var oe;let _e={sessionId:this.getSessionId(),subSessionId:this.getSubSessionId(),appId:parseInt(a.appId),state:"ready_for_connection",signalConnectionInfo:{ip:"",port:49100,protocol:"http"},mediaConnectionInfo:[],streamInfo:[],appLaunchMode:a.appLaunchMode?a.appLaunchMode:0,zoneName:this.getZoneName(),zoneAddress:this.getZoneAddress(),gpuType:this.getGpuType(),clientLocale:"",finalizedStreamingFeatures:null!==(oe=a.streamingFeatures)&&void 0!==oe?oe:{}};if(this.serverAddress&&(_e.signalConnectionInfo.ip=this.serverAddress),a.connectionInfo){_e.mediaConnectionInfo=a.connectionInfo;for(const Ce of _e.mediaConnectionInfo)14===Ce.usage&&(_e.signalConnectionInfo.ip=Ce.ip,_e.signalConnectionInfo.port=Ce.port,_e.signalConnectionInfo.protocol=5===Ce.appLevelProtocol?"https":"http",_e.signalConnectionInfo.resourcePath=Ce.resourcePath,s.Log.d("{6bae601}","{c6b8e0f}",Ce.ip,Ce.port))}if(_e.signalConnectionInfo.ip||s.Log.e("{6bae601}","{a43f57e}"),a.monitorSettings)for(const Ce of a.monitorSettings)_e.streamInfo.push({width:Ce.widthInPixels,height:Ce.heightInPixels,fps:Ce.framesPerSecond,sdrHdrMode:Ce.sdrHdrMode});else for(const Ce of a.streamParams)_e.streamInfo.push({width:Ce.width,height:Ce.height,fps:Ce.fps});s.Log.d("{6bae601}","{07dc276}",_e.sessionId),L(_e)},1)})}getSession(a,u){return new Promise((S,D)=>{D({code:-1,description:"PassthruPollingNotSupported"})})}sendDeleteRequest(a){return new Promise((u,S)=>{u()})}updateAdState(a){return-1}}const Zo={Bn:"Ragnarok",clientId:"62677554106929725",eventSchemaVer:"3.2"},ko={Streamer_Start:{name:"Streamer_Start",gdprLevel:s.GdprLevel.FUNCTIONAL},Streamer_Exit:{name:"Streamer_Exit",gdprLevel:s.GdprLevel.FUNCTIONAL},Streamer_InputDevice:{name:"Streamer_InputDevice",gdprLevel:s.GdprLevel.FUNCTIONAL},Streamer_HotPlugEvent:{name:"Streamer_HotPlugEvent",gdprLevel:s.GdprLevel.FUNCTIONAL},Streamer_DecoderCaps:{name:"Streamer_DecoderCaps",gdprLevel:s.GdprLevel.FUNCTIONAL},Streamer_DisplayCaps:{name:"Streamer_DisplayCaps",gdprLevel:s.GdprLevel.FUNCTIONAL},Streamer_EncoderCaps:{name:"Streamer_EncoderCaps",gdprLevel:s.GdprLevel.FUNCTIONAL}};class Mo extends mn{constructor(a){super(a),this.name=ko.Streamer_Start.name,this.gdprLevel=ko.Streamer_Start.gdprLevel}}class $o extends mn{constructor(a){super(a),this.name=ko.Streamer_Exit.name,this.gdprLevel=ko.Streamer_Exit.gdprLevel,this.priority=!0}}class xo extends mn{constructor(a){super(a),this.name=ko.Streamer_InputDevice.name,this.gdprLevel=ko.Streamer_InputDevice.gdprLevel}}I.HidType=void 0,I.InputType=void 0,I.VideoCodecType=void 0,I.MicState=void 0,I.DynamicStreamingMode=void 0,I.TrackType=void 0,I.StreamStopReason=void 0,I.StreamWarningType=void 0,I.CursorType=void 0,I.StreamingState=void 0,I.EVENTS=void 0,I.HotkeyModifier=void 0,function(m){m[m.NONE=0]="NONE",m[m.DS4=1]="DS4",m[m.DS5=2]="DS5"}(I.HidType||(I.HidType={})),function(m){m[m.None=0]="None",m[m.Mouse=1]="Mouse",m[m.Keyboard=2]="Keyboard",m[m.Gamepad=4]="Gamepad",m[m.Touch=8]="Touch",m[m.All=15]="All"}(I.InputType||(I.InputType={})),function(m){m.H264="H264",m.H265="H265",m.AV1="AV1",m.UNKNOWN="UNKNOWN"}(I.VideoCodecType||(I.VideoCodecType={})),function(m){m[m.UNINITIALIZED=0]="UNINITIALIZED",m[m.PERMISSION_PENDING=1]="PERMISSION_PENDING",m[m.PERMISSION_DENIED=2]="PERMISSION_DENIED",m[m.STARTED=3]="STARTED",m[m.NO_SUITABLE_DEVICE=4]="NO_SUITABLE_DEVICE",m[m.STOPPED=5]="STOPPED",m[m.UNSUPPORTED=6]="UNSUPPORTED",m[m.ERROR=7]="ERROR"}(I.MicState||(I.MicState={})),function(m){m[m.NONE=0]="NONE",m[m.DRC=1]="DRC",m[m.DFC=2]="DFC",m[m.ALL=3]="ALL"}(I.DynamicStreamingMode||(I.DynamicStreamingMode={})),function(m){m.VIDEO="video",m.AUDIO="audio"}(I.TrackType||(I.TrackType={})),function(m){m[m.CLIENT_DISCONNECTED=0]="CLIENT_DISCONNECTED",m[m.SERVER_DISCONNECTED=1]="SERVER_DISCONNECTED",m[m.NETWORK_ERROR=2]="NETWORK_ERROR",m[m.ERROR=3]="ERROR"}(I.StreamStopReason||(I.StreamStopReason={})),function(m){m[m.Unknown=0]="Unknown",m[m.ApproachingEntitlementTimeout=1]="ApproachingEntitlementTimeout",m[m.ApproachingIdleTimeout=2]="ApproachingIdleTimeout",m[m.ApproachingSessionMaxTimeLimit=3]="ApproachingSessionMaxTimeLimit",m[m.ClearUserIdleTimeOut=4]="ClearUserIdleTimeOut"}(I.StreamWarningType||(I.StreamWarningType={})),function(m){m[m.SOFTWARE=0]="SOFTWARE",m[m.HARDWARE=1]="HARDWARE",m[m.FREE=2]="FREE"}(I.CursorType||(I.CursorType={})),function(m){m[m.NONE=0]="NONE",m[m.STARTING_STREAM=1]="STARTING_STREAM",m[m.STREAMING=2]="STREAMING",m[m.STOPPING_STREAM=3]="STOPPING_STREAM",m[m.STOPPED=4]="STOPPED"}(I.StreamingState||(I.StreamingState={})),function(m){m.SESSION_START_RESULT="SessionStartResult",m.SESSION_STOP_RESULT="SessionStopResult",m.ACTIVE_SESSIONS_RESULT="ActiveSessionsResult",m.PROGRESS_UPDATE="ProgressUpdate",m.SESSION_UPDATE="SessionUpdate",m.STREAM_STOPPED="StreamStopped",m.STREAMING_EVENT="StreamingEvent",m.GETSESSIONRESULT="GetSessionResult",m.GET_SESSION_RESULT="GetSessionResult",m.LOG_EVENT="Log",m.STREAMING_QUALITY="StreamingQuality",m.MIC_CAPTURE="MicCapture",m.CUSTOM_MESSAGE="CustomMessage",m.TEXT_COMPOSITION="TextComposition",m.STREAM_STATS_UPDATE="StreamStatsUpdate",m.TELEMETRY_EVENT="TelemetryEvent",m.STREAM_QUALITY_REPORT="StreamQualityReport"}(I.EVENTS||(I.EVENTS={})),function(m){m[m.None=0]="None",m[m.Ctrl=1]="Ctrl",m[m.Alt=2]="Alt",m[m.Meta=4]="Meta",m[m.Shift=8]="Shift",m[m.Default=128]="Default"}(I.HotkeyModifier||(I.HotkeyModifier={}));const Gr={allowUnconfined:!1,preventNavigation:!1};I.StreamingProfilePreset=void 0,I.STREAMING_STATE=void 0,function(m){m[m.BALANCED=0]="BALANCED",m[m.DATASAVER=1]="DATASAVER",m[m.COMPETITIVE=2]="COMPETITIVE"}(I.StreamingProfilePreset||(I.StreamingProfilePreset={})),function(m){m.RECONNECTING="reconnecting",m.RECONNECTED="reconnected"}(I.STREAMING_STATE||(I.STREAMING_STATE={}));class Yo{constructor(){this.do=1}co(){return this.do++}}function _s(m){if(!((15868672^m)>>8))return 256;let a=32769;switch(m){case 15859712:case 15867908:case 15868418:a=0;break;case 3237093894:case 3237093899:a=32776;break;case 3237093898:a=32772;break;case 3237093900:a=32773;break;case 3237093901:a=32770;break;case 15867910:a=1;break;default:s.Log.d("{c00be32}","{233ad08}",Ve(m))}return a}function qo(m){let a=15868672;switch(m){case 256:a=15868704;break;case 257:a=15868705;break;case 258:a=15868706;break;case 259:a=15868707;break;case 260:a=15868708;break;case 261:a=15868709;break;case 262:a=15868710;break;case 263:a=15868711;break;case 264:a=15868712;break;case 265:a=15868713;break;case 266:a=15868714;break;case 267:a=15868715;break;case 268:a=15868716;break;case 269:a=15868719;break;case 270:a=15868688;break;case 512:a=15868736;break;case 513:a=15868737;break;case 514:a=15868738;break;case 515:a=15868739;break;case 516:a=15868740;break;case 517:a=15868741;break;case 518:a=15868742;break;case 519:a=15868743;break;case 520:a=15868744;break;case 521:a=15868745;break;case 33025:a=3237094145;break;case 33026:a=3237094146;break;case 33027:a=3237094147;break;case 33028:a=3237094148;break;case 33029:a=3237094149;break;case 33030:a=3237094150;break;case 33031:a=3237094151;break;case 33032:a=3237094152;break;case 33034:a=3237094153;break;case 33035:a=3237094154;break;case 33040:a=3237094155;break;case 33041:a=3237094156;break;case 33042:a=3237094157;break;case 37634:a=15868718;break;case 32768:a=3237094158;break;case 768:a=15868717;break;case 0:a=15868752;break;default:s.Log.d("{c00be32}","{1be40ed}",Ve(m))}return a}const zr="streamkit-latency-indicator";class Ir{constructor(){this.lo=null,this.uo=""}static getInstance(){return Ir.Ao||(Ir.Ao=new Ir),Ir.Ao}initialize(a,u){this.Rs=u,this.vo=this.fo(a),this.vo.style.display="block",this.lo=this.vo.getContext("webgl"),this.po()}po(){"white"===this.uo?this.mo():this.wo()}fo(a){let u=zr,S=document.getElementById(u);if(S&&S instanceof HTMLCanvasElement&&S.parentElement===a.parentElement)return S;{if(S)do{u=zr+Math.round(1e4*Math.random()),S=document.getElementById(u)}while(S);let D=document.createElement("canvas");return D.id=u,D.style.position="fixed",Vt(this.Rs)?(D.style.bottom="env(safe-area-inset-bottom, 0)",D.style.right="max(24px, env(safe-area-inset-right, 0))"):(D.style.bottom="0",D.style.right="0"),D.style.width="40px",D.style.height="40px",D.style.zIndex="300",D.style.pointerEvents="none",a.insertAdjacentElement("afterend",D),D}}wo(){this.lo&&(this.lo.clearColor(1,1,1,1),this.lo.clear(this.lo.COLOR_BUFFER_BIT),this.uo="white")}mo(){this.lo&&(this.lo.clearColor(1,0,0,1),this.lo.clear(this.lo.COLOR_BUFFER_BIT),this.uo="red")}}let Mt={So:{},clientConfigOverride:"",Nn:{type:"UNKNOWN",version:""},bo:!1,o:!0,l:!1,ko:!0,yo:!0,Io:!0,maxBitrate:0,Co:0,To:0,Eo:!1,Mo:!0,Po:!1,Do:!0,Ro:!1,No:!1,xo:!1,Oo:!1,Bo:!0,Fo:!1,Uo:!0,Lo:!0,Go:!0,Ho:!0,Vo:!0,fps:0,Wo:!0,enableComputePressure:!0,_o:!1,qo:"",iceTransportPolicy:""},Xo=[];function jo(m){if(m){const a=Number.parseInt(m);if(!Number.isNaN(a))return a}}function Kr(m){var a,u,S,D,L,Y,oe,_e,Ce,Ue,$e,Be,at,At,dt,kt,_n,An,tn,Dn,Bn,Mn,ci,li,mi,Vi,Xi,Ii,rr,Li,Or,eo,ao,Tr,Xn,Wi,Lo,$r,Hr,fa,la,Io,Ps,Cs,wa,Za,Qi,Qo,Vs,Ma,ca,xa,Cc,Xs,wc,Nl,ul,El,Sl,fs,Da;if(s.Log.i("{a112b01}","{02b2a8b}",JSON.stringify(m)),m.clientConfigOverride&&(Mt.clientConfigOverride=m.clientConfigOverride),m.gxtOverrideData){const qa=JSON.parse(m.gxtOverrideData);if(qa.params)for(const Fo of qa.params)"ragnarok"===Fo.name&&(Mt.So=Fo.value,Mt.Nn={type:"GXT",version:Fo.version})}else m.remoteConfigData&&m.remoteConfigData.ragnarok&&(Mt.So=JSON.parse(m.remoteConfigData.ragnarok),Mt.Nn={type:"RCONFIG",version:null!==(a=m.remoteConfigData.version)&&void 0!==a?a:""});if(m.isInternalUser&&(Mt.isInternalUser=m.isInternalUser),m.overrideData){const qa=new URLSearchParams(m.overrideData);let Fo=new URLSearchParams;for(const[ur,zo]of qa.entries())Fo.append(ur.toLowerCase(),zo);"lean"===(null===(u=Fo.get("mode"))||void 0===u?void 0:u.toLowerCase())?(Mt.bo=!0,Mt.o=!1,Mt.ko=!1,Mt.yo=!1,Mt.Io=!1,Mt.$o=!1,Mt.stutterIndicator=!0,Mt.isInternalUser=!0):"dev"===(null===(S=Fo.get("mode"))||void 0===S?void 0:S.toLowerCase())&&(Mt.stutterIndicator=!0,Mt.isInternalUser=!0);const ar=ur=>function(zo){if(zo)switch(zo.toLowerCase()){case"enable":case"on":case"1":case"true":return!0;case"disable":case"off":case"0":case"false":return!1}}(Fo.get(ur)),Gl=ur=>jo(Fo.get(ur)),zl=ur=>function(zo){if(zo){const Va=Number.parseFloat(zo);if(!Number.isNaN(Va))return Va}}(Fo.get(ur)),Mc=ur=>function(zo){if(zo)return zo.split(",")}(Fo.get(ur)),Oa=(ur,zo)=>{const Va=Fo.get(ur);return null===Va?zo:Va||void 0};Mt.o=null!==(D=ar("log"))&&void 0!==D?D:Mt.o,Mt.l=Mt.o&&(null!==(L=ar("console"))&&void 0!==L?L:Mt.l),Mt.ko=null!==(Y=ar("gamepad"))&&void 0!==Y?Y:Mt.ko,Mt.yo=null!==(oe=ar("webrtcstats"))&&void 0!==oe?oe:Mt.yo,Mt.Io=null!==(_e=ar("statsupload"))&&void 0!==_e?_e:Mt.Io,Mt.$o=null!==(Ce=ar("mic"))&&void 0!==Ce?Ce:Mt.$o,Mt.zo=null!==(Ue=ar("mousefilter"))&&void 0!==Ue?Ue:Mt.zo,Mt.unadjustedMovement=null!==($e=ar("unadjustedmovement"))&&void 0!==$e?$e:Mt.unadjustedMovement,Mt.maxBitrate=null!==(Be=Gl("bitrate"))&&void 0!==Be?Be:Mt.maxBitrate,Mt.maxBitrate>0&&Mt.maxBitrate<=100&&(Mt.maxBitrate*=1e3),Mt.Oo=null!==(at=ar("gamepadtest"))&&void 0!==at?at:Mt.Oo;const Al=Fo.get("resolution");if(Al){const ur=Al.toLowerCase().split("x");if(2==ur.length){const zo=parseInt(ur[0]),Va=parseInt(ur[1]);zo&&Va?(Mt.Co=zo,Mt.To=Va):s.Log.e("{a112b01}","{c87835d}",Al)}else s.Log.e("{a112b01}","{c87835d}",Al)}Mt.fps=null!==(At=Gl("fps"))&&void 0!==At?At:Mt.fps,Mt.Eo=null!==(dt=ar("gamepadraf"))&&void 0!==dt?dt:Mt.Eo,Mt.gamepadPollInterval=null!==(kt=Gl("gamepadpoll"))&&void 0!==kt?kt:Mt.gamepadPollInterval,Mt.Mo=null!==(_n=ar("advancedgestures"))&&void 0!==_n?_n:Mt.Mo,Mt.Po=null!==(An=ar("forcetouchdevice"))&&void 0!==An?An:Mt.Po;let bo=ar("touch");void 0!==bo&&(Mt.appLaunchMode=bo?2:0,Mt.Po=bo),Mt.Ro=null!==(tn=ar("storetouch"))&&void 0!==tn?tn:Mt.Ro,Mt.No=null!==(Dn=ar("storetouchgesture"))&&void 0!==Dn?Dn:Mt.No,Mt.Do=null!==(Bn=ar("touchwarp"))&&void 0!==Bn?Bn:Mt.Do,Mt.xo=null!==(Mn=ar("latency"))&&void 0!==Mn?Mn:Mt.xo,Mt.deviceOs=Oa("deviceos",Mt.deviceOs),Mt.deviceType=Oa("devicetype",Mt.deviceType),Mt.clientStreamer=Oa("clientstreamer",Mt.clientStreamer),Mt.clientType=Oa("clienttype",Mt.clientType),Mt.clientPlatformName=Oa("clientplatformname",Mt.clientPlatformName),Mt.clientId=Oa("clientid",Mt.clientId);const el=Fo.get("applaunchmode");if(null!==el&&(Mt.appLaunchMode=jo(el)),Mt.Bo=null!==(ci=ar("rsdmm"))&&void 0!==ci?ci:Mt.Bo,Mt.Fo=null!==(li=ar("rsdmmtoggle"))&&void 0!==li?li:Mt.Fo,null===(mi=ar("ioswars"))||void 0===mi||mi||(Mt.Lo=!1,Mt.Go=!1,Mt.Uo=!1,Mt.Ho=!1,Mt.Vo=!1),Mt.Lo=null!==(Vi=ar("audioreset"))&&void 0!==Vi?Vi:Mt.Lo,Mt.Uo=null!==(Xi=ar("sourcereset"))&&void 0!==Xi?Xi:Mt.Uo,Mt.Go=null!==(Ii=ar("autoplaychange"))&&void 0!==Ii?Ii:Mt.Go,Mt.bitsPerPixel=null!==(rr=zl("bitsperpixel"))&&void 0!==rr?rr:Mt.bitsPerPixel,Mt.bitsPerPixel1440p=null!==(Li=zl("bitsperpixel1440p"))&&void 0!==Li?Li:Mt.bitsPerPixel1440p,Mt.Ko=null!==(Or=ar("1440p"))&&void 0!==Or?Or:Mt.Ko,Mt.stutterIndicator=null!==(eo=ar("stutter"))&&void 0!==eo?eo:Mt.stutterIndicator,Fo.has("meta")){Mt.Qo={};for(const ur of Fo.getAll("meta")){const zo=ur.split("~");2===zo.length&&(Mt.Qo[zo[0]]=zo[1])}}Mt.allowHaptics=null!==(ao=ar("haptics"))&&void 0!==ao?ao:Mt.allowHaptics,Mt.enableAv1Support=null!==(Tr=ar("av1"))&&void 0!==Tr?Tr:Mt.enableAv1Support,Mt.enableH265Support=null!==(Xn=ar("h265"))&&void 0!==Xn?Xn:Mt.enableH265Support,Mt.codecList=null!==(Wi=Mc("codeclist"))&&void 0!==Wi?Wi:Mt.codecList,Mt.isInternalUser=null!==(Lo=ar("internaluser"))&&void 0!==Lo?Lo:Mt.isInternalUser,Mt.hdr=null!==($r=ar("hdr"))&&void 0!==$r?$r:Mt.hdr,Mt.hdr10gParams=null!==(Hr=Fo.get("hdr10gparams"))&&void 0!==Hr?Hr:Mt.hdr10gParams,Mt.Xo=null!==(fa=ar("sdr10"))&&void 0!==fa?fa:Mt.Xo,Mt.Wo=null!==(la=ar("hotkeys"))&&void 0!==la?la:Mt.Wo,Mt.Yo=null!==(Io=ar("forcehotkeys"))&&void 0!==Io?Io:Mt.Yo,Mt.synthesizeGamepadHid=null!==(Ps=ar("synthesizegamepadhid"))&&void 0!==Ps?Ps:Mt.synthesizeGamepadHid,Mt.jo=null!==(Cs=ar("synthesizedds4disabled"))&&void 0!==Cs?Cs:Mt.jo,Mt.Jo=null!==(wa=ar("synthesizedds5disabled"))&&void 0!==wa?wa:Mt.Jo,Mt.Zo=null!==(Za=ar("synthesizedds4fromds5disabled"))&&void 0!==Za?Za:Mt.Zo,Mt.tr=null!==(Qi=ar("synthesizedds5fromds4disabled"))&&void 0!==Qi?Qi:Mt.tr,Mt.ir=null!==(Qo=ar("synthesizedds4fromgenericenabled"))&&void 0!==Qo?Qo:Mt.ir,Mt.sr=null!==(Vs=ar("synthesizedds5fromgenericenabled"))&&void 0!==Vs?Vs:Mt.sr,Mt.er=null!==(Ma=ar("synthesizedds4allgamesenabled"))&&void 0!==Ma?Ma:Mt.er,Mt.nr=null!==(ca=ar("synthesizedds5allgamesenabled"))&&void 0!==ca?ca:Mt.nr,Mt.hr=null!==(xa=ar("forceserverds4"))&&void 0!==xa?xa:Mt.hr,Mt.rr=null!==(Cc=ar("forceserverds5"))&&void 0!==Cc?Cc:Mt.rr,Mt.cursor=null!==(Xs=Fo.get("cursor"))&&void 0!==Xs?Xs:Mt.cursor,Mt.pointerLockEscape=null!==(wc=ar("pointerlockescape"))&&void 0!==wc?wc:Mt.pointerLockEscape,Mt.enableComputePressure=null!==(Nl=ar("computepressure"))&&void 0!==Nl?Nl:Mt.enableComputePressure,Mt.ar=null!==(ul=ar("disableworkerws"))&&void 0!==ul?ul:Mt.ar,Mt.So.useTelemetryV2=null!==(El=ar("usetelemetryv2"))&&void 0!==El?El:Mt.So.useTelemetryV2,Mt._o=null!==(Sl=ar("rirecorder"))&&void 0!==Sl?Sl:Mt._o,Mt.qo=null!==(fs=Fo.get("turn"))&&void 0!==fs?fs:Mt.qo,Mt.iceTransportPolicy=null!==(Da=Fo.get("icetransportpolicy"))&&void 0!==Da?Da:Mt.iceTransportPolicy}Ko(m);for(const qa of Xo)qa()}function Ho(){const m=Gi();if(m){const a=m.destination.maxChannelCount;return m.close(),s.Log.i("{d988e7f}","{fa78e0a}",a),a}return s.Log.w("{d988e7f}","{d018fac}"),2}function lo(m){return m[0]0){[S,D]=lo([S,D]),Y&&S>=1366&&0===m&&(S=1600,D=1200);const _e=S/D,Ce=S*D;{const $e=a.filter(Be=>Be.frameRate<120);$e.length&&(a=$e)}return a.sort(($e,Be)=>{const at=$e.resolution,At=Be.resolution,dt=Math.abs(at.width/at.height-_e)-Math.abs(At.width/At.height-_e);if(Math.abs(dt)>.05)return dt;const _n=(1===m?1:-1)*($e.frameRate-Be.frameRate),An=at.width*at.height,tn=At.width*At.height,Dn=An-tn;return An<=Ce?tn<=Ce?$e.frameRate!==Be.frameRate?_n:(0===m?-1:1)*Dn:-1:tn<=Ce?1:Dn||_n}),a[0]}{let _e={resolution:{width:1280,height:720},frameRate:60};if(L){let[Ce,Ue]=lo([S,D]);Ce/Ue>2&&(_e.resolution={width:1376,height:640})}else if(Y)if(0!=m)_e.resolution={width:1024,height:768};else{let[Ce,Ue]=lo([S,D]);_e.resolution=Ce<=1024?{width:1024,height:768}:Ce<1366?{width:1112,height:834}:{width:1600,height:1200}}else{const Ce=[[1920,1200],[1920,1080],[1280,1024],[1600,1200]];oe&&Ce.unshift([3840,2160]);let Ue=[S,D];Ue=function($e,Be){if(0==Be.length)return $e;class at{constructor(tn,Dn){this.w=tn,this.dr=Dn,this.a=tn/Dn}clip(tn){return Math.abs(tn.a-this.a)<.05?tn:tn.a>this.a?new at(Math.floor(tn.w*(this.a/tn.a)),tn.dr):new at(tn.w,Math.floor(tn.dr*(tn.a/this.a)))}cr(){return[this.w,this.dr]}}const At=Be.map(An=>new at(An[0],An[1])),dt=new at($e[0],$e[1]);let kt=At[0];for(let An=1;Ankt.w?kt.cr():_n.cr()}(Ue,0==m?Ce:[[1280,800],[1280,720],[1280,1024],[1024,768]]),_e.resolution={width:Ue[0],height:Ue[1]}}return _e}}function es(m){var a;let u=0;return Hn(m)&&(u|=1),((S=m)?S.os===s.PlatformOS.IPADOS:/^(?!.*chrome).*safari/i.test(navigator.userAgent)&&!Hn()&&Rn())&&(u|=2),!(null===(a=window.webapis)||void 0===a)&&a.productinfo&&window.webapis.productinfo.isUdPanelSupported()&&(u|=4),window.lge_webrtc_hevc_support&&(u|=8),u;var S}function So(){return getComputedStyle(document.documentElement)?(getComputedStyle(document.documentElement).getPropertyValue("--sat")||(document.documentElement.style.setProperty("--sat","env(safe-area-inset-top)"),document.documentElement.style.setProperty("--sar","env(safe-area-inset-right)"),document.documentElement.style.setProperty("--sab","env(safe-area-inset-bottom)"),document.documentElement.style.setProperty("--sal","env(safe-area-inset-left)")),{top:parseInt(getComputedStyle(document.documentElement).getPropertyValue("--sat")),left:parseInt(getComputedStyle(document.documentElement).getPropertyValue("--sal")),bottom:parseInt(getComputedStyle(document.documentElement).getPropertyValue("--sab")),right:parseInt(getComputedStyle(document.documentElement).getPropertyValue("--sar"))}):{top:0,left:0,bottom:0,right:0}}function Ji(m,a,u){return mu?u:m}function vo(m){let a=So();a.top=Math.max(a.top,21),a.bottom=Ji(a.bottom,0,10);let u={x:m.clientX,y:m.clientY},S=.5;if(a.top>0&&m.clientY-m.radiusY0&&m.clientY+m.radiusY>window.innerHeight-a.bottom){let D=(m.clientY+Math.min(m.radiusY,10)-(window.innerHeight-a.bottom))/m.radiusY;D=Ji(D,0,1),S+=D*D*.5}return u.y=Ji(u.y-m.radiusY+2*S*m.radiusY,0,window.innerHeight),u}function Gs(m,a){let u=m;if(!a.Pn)if(Mt.So.offlineErrorsStreaming&&Mt.So.offlineErrorsStreaming.includes(Ve(m)))u=15868418;else if(Mt.So.offlineErrorsSessionSetup&&Mt.So.offlineErrorsSessionSetup.includes(Ve(m)))u=15868417;else switch(m){case 3237093906:case 3237093899:u=15868418;break;case 3237089282:u=15868417}return u!==m&&s.Log.i("{d988e7f}","{b84d4c8}",Ve(m),Ve(u)),u}function ks(m,a){let u=m;if(Mt.So.sleepErrorsStreaming&&Mt.So.sleepErrorsStreaming.includes(Ve(m)))u=15867908;else if(Mt.So.sleepErrorsSessionSetup&&Mt.So.sleepErrorsSessionSetup.includes(Ve(m)))u=15867909;else switch(m){case 3237093906:(Vt(a)||Ct(a))&&(u=15867908);break;case 3237094159:u=15867908;break;case 3237093701:case 3237093654:u=15867909}return u!==m&&s.Log.i("{d988e7f}","{49e2182}",Ve(m),Ve(u)),u}function ts(m,a){let u=!1;switch(m){case 3237093896:case 3237093897:case 3237093898:case 3237093906:case 3237093899:case 3237093901:case 15868418:case 3237094159:u=!0;break;case 15867908:Vt(a)&&(u=!0)}return u}function Wo(m,a){if(a)return!0;switch(m){case 15868706:case 15868714:case 15868742:case 15868744:case 15867910:return!0;default:return!1}}function Do(m,a){const u=m*a;return u>=2764800&&u<4953600}function Ao(m,a){return m*a>=4953600}function Ns(m){switch(m){case"H264":return"H264";case"H265":return"HEVC";case"AV1":return"AV1";default:return"UNKNOWN"}}function Ls(m){var a;const u=an(m)||Qt(m)||ke(m)||ot(m)||Vt(m);return null!==(a=Mt.So.enableCpm)&&void 0!==a?a:u}function rt(m){const a=Mt.So.disableUnadjustedMovementForAppIds;return a&&-1!==a.indexOf(m)?(s.Log.i("{d988e7f}","{265cfdc}",m),!1):Mt.unadjustedMovement}function je(m){return void 0!==m?m?"TRUE":"FALSE":"UNDEFINED"}function Ht(m){return m?"MANUAL":"NONE"}function nt(m){return`${m.width.toFixed()}x${m.height.toFixed()}`}function qt(){return{width:screen.width,height:screen.height}}function hi(m,a,u){try{const S=document.createElement("a");S.style.display="none";const D=new Blob(m,{type:u}),L=URL.createObjectURL(D);return S.href=L,S.download=a,document.body.appendChild(S),S.click(),URL.revokeObjectURL(L),document.body.removeChild(S),!0}catch(S){return s.Log.e("{d988e7f}","{8d57ba9}",S),!1}}function Gi(m){const a=window.AudioContext||window.webkitAudioContext||void 0;if(a){let u;return u=m?new a({sampleRate:m}):new a,u}s.Log.w("{d988e7f}","{b74c037}")}function yn(){var m;return!(null===(m=globalThis.PointerEvent)||void 0===m||!m.prototype)}function me(m,a,u){return G.apply(this,arguments)}function G(){return G=r(function*(m,a,u){var S;const D=new RTCPeerConnection;try{yield D.setRemoteDescription({type:"offer",sdp:a}).catch(_e=>{throw new Error("Audio munging setRemoteDescription failed. "+_e)});const L=yield D.createAnswer();yield D.setLocalDescription({type:"answer",sdp:null===(S=L.sdp)||void 0===S?void 0:S.replace("opus/48000/2","multiopus/48000/"+m).replace("useinbandfec=1",u)}).catch(_e=>{throw new Error("Audio munging setLocalDescription failed. "+_e)});const Y=D.getReceivers()[0];if(!Y.getParameters)return s.Log.w("{d988e7f}","{4be0bf6}"),2;const{codecs:oe}=Y.getParameters();if(1!==oe.length||"audio/multiopus"!==oe[0].mimeType||oe[0].channels!==m)throw new Error("Audio munging failed "+oe[0]);return s.Log.i("{d988e7f}","{8919816}",m,oe[0]),m}catch(L){return s.Log.e("{d988e7f}","{4984c00}",m,L),2}finally{D.close()}}),G.apply(this,arguments)}function le(m){if(!m)return 8;switch(null==m?void 0:m.bitDepth){case s.BitDepth.BIT_DEPTH_10:return 10;case s.BitDepth.BIT_DEPTH_8:return 8;default:return s.Log.w("{d988e7f}","{6f291f9}",m.bitDepth),8}}function Ne(m){switch(m){case 1e3:return 3237101567;case 1001:return 3237101566;case 1002:return 3237101565;case 1003:return 3237101564;case 1005:return 3237101562;case 1006:return 3237093890;case 1007:return 3237101560;case 1008:return 3237101559;case 1009:return 3237101558;case 1010:return 3237101557;case 1011:return 3237101556;case 1012:return 3237101555;case 1013:return 3237101554;case 1014:return 3237101553;case 1015:return 3237101552;case 3e3:return 3237101551;case 3003:return 3237101550;case 3008:return 3237101549}return m>=4100&&m<=4999?m-4e3+3237097472:3237093890}function ut(m,a){return new Ws(m,Mt.So.connectivityCheckTimeout,!(!((3237093888^a)>>8)||3237089282===a)).run()}function Bt(m){return m.getTransceivers().filter(a=>{var u;return"video"===(null===(u=a.receiver.track)||void 0===u?void 0:u.kind)&&("recvonly"===a.direction||"sendrecv"===a.direction)})}function sn(m,a=!1){let u=a?vo(m):{x:m.clientX,y:m.clientY};return{identifier:m.identifier,clientX:u.x,clientY:u.y,deltaX:0,deltaY:0}}class wn{constructor(a,u,S,D,L){this.target=a,this.videoAddEventListener=u,this.videoRemoveEventListener=S,this.lr=D,this.ur=L,this.Ar=10,this.vr=[],this.pr=0,this.mr=0,this.gr=0,this.wr=Y=>{let oe=!1;const _e=Y.changedTouches,Ce=this.ur.Sr(Y.timeStamp);for(let Ue=0;Ue<_e.length;Ue++){const $e=_e[Ue];$e.target===this.target&&(oe=!0,Ir.getInstance().po(),0===this.vr.length?(this.gr=1,this.pr=window.setTimeout(()=>{this.pr=0,1===this.mr&&(this.gr=2,Mt.Mo&&this.lr.br(this.target,Ce,sn($e)))},500)):1!==this.gr&&(2===this.gr||4===this.gr?Mt.Mo&&this.lr.kr(this.target,Ce):6===this.gr&&Mt.Mo&&this.lr.yr(this.target,Ce),this.gr=0),this.vr.push(sn($e)),this.vr.length>this.mr&&(this.mr=this.vr.length))}this.lr.Ir()&&oe&&Y.preventDefault()},this.Cr=Y=>{let oe=!1;for(let $e of this.vr)$e.deltaX=0,$e.deltaY=0;const _e=Y.changedTouches,Ce=this.ur.Sr(Y.timeStamp);let Ue=[];for(let $e=0;$e<_e.length;$e++){const Be=_e[$e],at=this.vr.findIndex(At=>At.identifier==Be.identifier);if(-1!=at){oe=!0;const At=this.vr[at],dt=Be.clientX-At.clientX,kt=Be.clientY-At.clientY;let _n=!1;if(0!==this.pr?(Math.abs(dt)>this.Ar||Math.abs(kt)>this.Ar)&&(window.clearTimeout(this.pr),this.pr=0,_n=!0):_n=!0,_n){const An={identifier:Be.identifier,clientX:Be.clientX,clientY:Be.clientY,deltaX:dt,deltaY:kt};Ue.push(at),this.vr[at]=An}}}Ue.length>0&&0===this.pr&&0!==this.gr&&(1===this.vr.length?(1===this.gr?this.gr=3:2===this.gr&&(this.gr=4),Mt.Mo&&this.lr.Tr(this.target,Ce,this.vr[0])):2===this.vr.length?5===this.gr?Mt.Mo&&this.lr.scroll(this.target,Ce,this.vr):6===this.gr?Mt.Mo&&this.lr.Er(this.target,Ce,this.vr):1===this.gr&&(this.vr[0].deltaY*this.vr[1].deltaY>0&&(Math.sign(this.vr[0].deltaX)===Math.sign(this.vr[1].deltaX)||Math.abs(this.vr[0].deltaX){this.Pr(Y,!1)},this.Dr=Y=>{this.Pr(Y,!0)}}static isSupported(){return Mt.Po||Dt()}Pr(a,u){let S=!1;const D=a.changedTouches,L=this.ur.Sr(a.timeStamp);for(let Y=0;YCe.identifier==oe.identifier);-1!=_e&&(S=!0,Ir.getInstance().po(),this.vr.splice(_e,1),0===this.vr.length?(0!==this.pr?(window.clearTimeout(this.pr),this.pr=0,u&&this.lr.Rr(this.target,L,sn(oe,!0),this.mr)):2!==this.gr&&4!==this.gr||Mt.Mo&&this.lr.kr(this.target,L),this.mr=0,this.gr=0):5===this.gr?this.gr=0:6===this.gr&&(Mt.Mo&&this.lr.yr(this.target,L),this.gr=0))}this.lr.Ir()&&S&&a.preventDefault()}start(){const a={passive:!Mt.Mo};this.videoAddEventListener("touchstart",this.wr,a),this.videoAddEventListener("touchmove",this.Cr,a),this.videoAddEventListener("touchcancel",this.Mr,a),this.videoAddEventListener("touchend",this.Dr,a)}stop(){if(this.videoRemoveEventListener("touchstart",this.wr),this.videoRemoveEventListener("touchmove",this.Cr),this.videoRemoveEventListener("touchcancel",this.Mr),this.videoRemoveEventListener("touchend",this.Dr),this.vr=[],0!==this.pr&&(window.clearTimeout(this.pr),this.pr=0),this.mr=0,Mt.Mo)switch(this.gr){case 6:this.lr.yr(this.target,performance.now());break;case 2:case 4:this.lr.kr(this.target,performance.now())}this.gr=0}}const jn=65535;class ei{constructor(a,u,S){this.clientX=0,this.clientY=0,this.radiusX=0,this.radiusY=0,this.Nr=!1,this.identifier=a.identifier,this.Or=u,this.Br=S,this.Fr(a),Mt.Do&&navigator.standalone?this.Ur():this.Nr=!1}update(a){this.Fr(a),this.Nr&&this.Ur()}Fr(a){this.clientX=a.pageX-this.Br.Lr,this.clientY=a.pageY-this.Br.vertical,this.radiusX=a.radiusX,this.radiusY=a.radiusY}Ur(){const a=vo(this);this.Nr=Math.abs(a.y-this.clientY)>.01,this.clientX=a.x,this.clientY=a.y}}class Ai{constructor(a,u,S,D,L){this.Or=u,this.id=a.identifier,this.touchType=S,this.Gr=a.pageX,this.Hr=a.pageY,this.Vr=a.radiusX,this.Wr=a.radiusY,this._r=D,this.captureTs=L}}class Mi{constructor(a,u,S,D,L,Y,oe){this.target=a,this.videoAddEventListener=u,this.videoRemoveEventListener=S,this.qr=D,this.lr=L,this.ur=oe,this.$r=0,this.zr=0,this.Br={Lr:1,vertical:1},this.Kr=new Map,this.Qr=new Set,this.Xr=0,this.Yr=[],this.jr=0,this.Jr=!0,this.wr=_e=>{const Ce=performance.now(),Ue=this.ur.Sr(_e.timeStamp);let $e=!1;this.lr.Zr(!1);const Be=_e.changedTouches;let at=[];for(let At=0;At{const Ce=performance.now(),Ue=this.ur.Sr(_e.timeStamp);let $e=!1;const Be=_e.changedTouches;let at=[];for(let At=0;At{this.ha(_e,8)},this.Dr=_e=>{this.ha(_e,2)},this.ea=this.oa.bind(this),this.na=this.ra.bind(this),this.aa=Ct(Y)}static isSupported(){return Mt.Po||Dt()}Ro(a,u,S,D,L){if(!Mt.Ro)return;let Y=new Ai(a,u.Or,S,D,L.timeStamp);this.Yr.push(Y)}oa(){const a=this.Yr.length;if(!a)return;let u=this.Yr[a-1]._r-3e4,S=-1;for(let D=0;D40)return void s.Log.e("{ec05004}","{2faaf33}",a.length-L);const oe=null===(D=this.Kr.get(Y.identifier))||void 0===D?void 0:D.Or;if(void 0===oe){s.Log.e("{ec05004}","{960ee4f}",Y.identifier);continue}let _e=this.$r*Y.clientX,Ce=this.zr*Y.clientY;const Ue=this.$r*Y.radiusX,$e=this.zr*Y.radiusY;if(_e<0-Ue||_e>jn+Ue||Ce<0-$e||Ce>jn+$e)switch(u){case 2:case 8:break;default:continue}if(_e=Math.min(Math.max(_e,0),jn),Ce=Math.min(Math.max(Ce,0),jn),!this.qr.ca(L,oe,u,_e,Ce,Y.radiusX,Y.radiusY,S)){this.Xr+=a.length-L;break}L++}0!=L&&(L>a.length?s.Log.w("{ec05004}","{4e60a66}",L,a.length):this.qr.la(L)||s.Log.e("{ec05004}","{56a8404}"))}ha(a,u){const S=performance.now(),D=this.ur.Sr(a.timeStamp);let L=!1,Y=[];const oe=a.changedTouches;let _e=[];for(let Ce=0;Ce",{vkCode:190,shift:!0}],[";",{vkCode:186,shift:!1}],[":",{vkCode:186,shift:!0}],["/",{vkCode:191,shift:!1}],["?",{vkCode:191,shift:!0}],["`",{vkCode:192,shift:!1}],["~",{vkCode:192,shift:!0}],["[",{vkCode:219,shift:!1}],["{",{vkCode:219,shift:!0}],["\\",{vkCode:220,shift:!1}],["|",{vkCode:220,shift:!0}],["]",{vkCode:221,shift:!1}],["}",{vkCode:221,shift:!0}],["'",{vkCode:222,shift:!1}],['"',{vkCode:222,shift:!0}],[" ",{vkCode:32,shift:!1}],["A",{vkCode:65,shift:!0}],["B",{vkCode:66,shift:!0}],["C",{vkCode:67,shift:!0}],["D",{vkCode:68,shift:!0}],["E",{vkCode:69,shift:!0}],["F",{vkCode:70,shift:!0}],["G",{vkCode:71,shift:!0}],["H",{vkCode:72,shift:!0}],["I",{vkCode:73,shift:!0}],["J",{vkCode:74,shift:!0}],["K",{vkCode:75,shift:!0}],["L",{vkCode:76,shift:!0}],["M",{vkCode:77,shift:!0}],["N",{vkCode:78,shift:!0}],["O",{vkCode:79,shift:!0}],["P",{vkCode:80,shift:!0}],["Q",{vkCode:81,shift:!0}],["R",{vkCode:82,shift:!0}],["S",{vkCode:83,shift:!0}],["T",{vkCode:84,shift:!0}],["U",{vkCode:85,shift:!0}],["V",{vkCode:86,shift:!0}],["W",{vkCode:87,shift:!0}],["X",{vkCode:88,shift:!0}],["Y",{vkCode:89,shift:!0}],["Z",{vkCode:90,shift:!0}],["a",{vkCode:65,shift:!1}],["b",{vkCode:66,shift:!1}],["c",{vkCode:67,shift:!1}],["d",{vkCode:68,shift:!1}],["e",{vkCode:69,shift:!1}],["f",{vkCode:70,shift:!1}],["g",{vkCode:71,shift:!1}],["h",{vkCode:72,shift:!1}],["i",{vkCode:73,shift:!1}],["j",{vkCode:74,shift:!1}],["k",{vkCode:75,shift:!1}],["l",{vkCode:76,shift:!1}],["m",{vkCode:77,shift:!1}],["n",{vkCode:78,shift:!1}],["o",{vkCode:79,shift:!1}],["p",{vkCode:80,shift:!1}],["q",{vkCode:81,shift:!1}],["r",{vkCode:82,shift:!1}],["s",{vkCode:83,shift:!1}],["t",{vkCode:84,shift:!1}],["u",{vkCode:85,shift:!1}],["v",{vkCode:86,shift:!1}],["w",{vkCode:87,shift:!1}],["x",{vkCode:88,shift:!1}],["y",{vkCode:89,shift:!1}],["z",{vkCode:90,shift:!1}]]);function Di(m,a,u,S,D=1){const L=4294967295&Math.floor(m*D),Y=Math.floor(m/4294967296*D);S?(a.setUint32(u,L,!0),a.setUint32(u+4,Y,!0)):(a.setUint32(u,Y,!1),a.setUint32(u+4,L,!1))}class Rr{constructor(a){this.fa=0,this.pa=a}ma(){return this.pa.getUint8(this.fa)}getUint8(){const a=this.ma();return this.fa++,a}ga(a=!1){return this.pa.getUint16(this.fa,a=null!=a&&a)}getUint16(a=!1){const u=this.ga(a);return this.fa+=2,u}wa(a=!1){return this.pa.getInt16(this.fa,a=null!=a&&a)}getInt16(a=!1){const u=this.wa(a);return this.fa+=2,u}Sa(a=!1){return this.pa.getUint32(this.fa,a=null!=a&&a)}getUint32(a=!1){const u=this.Sa(a);return this.fa+=4,u}ba(a=!1){return function(u,S,D){let L=0,Y=0;return D?(L=u.getUint32(S,!0),Y=u.getUint32(S+4,!0)):(Y=u.getUint32(S,!1),L=u.getUint32(S+4,!1)),4294967296*Y+L}(this.pa,this.fa,a)}ka(a=!1){const u=this.ba(a);return this.fa+=8,u}reset(){this.fa=0}get ya(){return this.fa}done(){return this.fa===this.pa.byteLength}left(){return this.pa.byteLength-this.fa}Ia(a){a>=0&&a<=this.pa.byteLength&&(this.fa=a)}Ca(a){this.Ia(this.fa+a)}Ta(a){if(a>this.left())return;const u=new Rr(new DataView(this.pa.buffer,this.pa.byteOffset+this.fa,a));return this.Ca(a),u}}class Zr{constructor(a){this.Ea=0,this.pa=a,this.Ea=0}get offset(){return this.Ea}reset(){this.Ea=0}Ma(a){this.Ea+=a}Pa(){return this.pa.byteLength-this.Ea}Da(a){this.pa.setUint8(this.Ea,a),this.Ea+=1}Ra(a,u){this.pa.setUint16(this.Ea,a,u),this.Ea+=2}Na(a,u){this.pa.setUint32(this.Ea,a,u),this.Ea+=4}xa(a){this.pa.setInt8(this.Ea,a),this.Ea+=1}Oa(a,u){this.pa.setInt16(this.Ea,a,u),this.Ea+=2}Ba(a,u){this.pa.setInt32(this.Ea,a,u),this.Ea+=4}Fa(a,u){this.pa.setFloat32(this.Ea,a,u),this.Ea+=4}Ua(a,u){this.pa.setFloat64(this.Ea,a,u),this.Ea+=8}La(a,u,S=1){Di(a,this.pa,this.Ea,u,S),this.Ea+=8}}function co(m,a,u){var S,D;let L;if(m.length>a.length+22)L=m;else{let Ue="";const $e=null!==(D=null===(S=document.currentScript)||void 0===S?void 0:S.src)&&void 0!==D?D:u;if($e){const Be=$e.lastIndexOf("/");-1!==Be&&(Ue+=$e.substring(0,Be+1))}Ue+=a,L="importScripts('"+Ue+"');"}const oe=new Blob([L],{type:"text/javascript"}),_e=URL.createObjectURL(oe),Ce=new Worker(_e);return URL.revokeObjectURL(_e),Ce}function Hi(m){return Math.floor(1e3*m)}function mr(m){return m>=6&&m<=9}var kr;const Fr=1314280009,Vr=null===(kr=document.currentScript)||void 0===kr?void 0:kr.src;function Oo(m,a){switch(m){case 3:case 4:return 14;case 8:case 9:case 10:case 5:case 7:return 26;case 12:return 24;case 18:return 2;case 17:return function(u){let S=1;return mr(u.id)&&(S+=9),S}(a);default:return 0}}class ns{constructor(a){this.ur=a,this.Ga=0,this.buffer=new ArrayBuffer(8388608),this.Ha=new Zr(new DataView(this.buffer)),this.initialized=!1,this.Va=[],this.ur=a}initialize(a){this.Wa(),this.params=a,this.Ga=this.ur._a(),this.initialized=!0,s.Log.d("{5eeca93}","{46ee72b}")}qa(a){return a>this.Ga?a-this.Ga:0}Wa(){this.Ha.Na(Fr),this.Ha.Da(1),this.Ha.Da(0),this.Ha.Oa(0)}$a(a){this.Ha.La(a.recordedTs,!1,1e3),this.Ha.Na(a.packetId),this.Ha.Na(a.size)}za(a){this.Ha.Ra(a.keycode),this.Ha.Ra(a.flags),this.Ha.Ra(a.scancode),this.Ha.La(a.captureTs,!1,1e3)}Ka(a){this.Ha.Ra(a.flags),this.Ha.Ra(a.xpos),this.Ha.Ra(a.ypos),this.Ha.Ra(a.data1),this.Ha.Ra(a.data2),this.Ha.Na(a.windowHandle),this.Ha.Ra(a.vwheel),this.Ha.Ra(a.hwheel),this.Ha.La(a.captureTs,!1,1e3)}Qa(a){this.Ha.Ra(a.index),this.Ha.Ra(a.bitmap),this.Ha.Ra(a.buttons),this.Ha.Ra(a.trigger);for(let u=0;u<4;u++)this.Ha.Oa(a.axes[u]);this.Ha.La(a.captureTs,!1,1e3)}Xa(a){this.Ha.Da(a.id),this.Ha.Da(a.control)}Ya(a){for(let u=0;u<4;u++)this.Ha.Da(a.axes[u]);this.Ha.Da(a.ds4Btns[0]),this.Ha.Da(a.ds4Btns[1]),this.Ha.Da(a.ds4Btns[2]),this.Ha.Da(a.triggers[0]),this.Ha.Da(a.triggers[1])}ja(a){this.Ha.Da(a.id),mr(a.id)&&this.Ya(a.data)}Ja(a){const u={keycode:0,flags:0,scancode:0,captureTs:0};return u.keycode=a.getUint16(),u.flags=a.getUint16(),u.scancode=a.getUint16(),u.captureTs=this.qa(a.ka()/1e3),u}Za(a){const u={flags:0,xpos:0,ypos:0,data1:0,data2:0,windowHandle:0,vwheel:0,hwheel:0,captureTs:0};return u.data1=a.getUint8(),u.flags=a.getUint8(),u.windowHandle=a.getUint32(),u.captureTs=this.qa(a.ka()/1e3),u}td(a){const u={flags:0,xpos:0,ypos:0,data1:0,data2:0,windowHandle:0,vwheel:0,hwheel:0,captureTs:0};return u.hwheel=a.getUint16(),u.vwheel=a.getUint16(),u.flags=a.getUint16(),u.windowHandle=a.getUint32(),u.captureTs=this.qa(a.ka()/1e3),u}sd(a,u){const S={flags:0,xpos:0,ypos:0,data1:0,data2:0,windowHandle:0,vwheel:0,hwheel:0,captureTs:0};return S.xpos=a.getUint16(),S.ypos=a.getUint16(),S.flags=a.getUint16(),u&&(S.data1=a.getUint16(),S.data2=a.getUint16()),S.windowHandle=a.getUint32(),S.captureTs=this.qa(a.ka()/1e3),S}ed(a){const u={index:0,bitmap:0,buttons:0,trigger:0,axes:[0,0,0,0],captureTs:0};a.getUint16(!0),u.index=a.getUint16(!0),u.bitmap=a.getUint16(!0),a.getUint16(!0),u.buttons=a.getUint16(!0),u.trigger=a.getUint16(!0);for(let S=0;S<4;S++)u.axes[S]=a.getInt16(!0);return a.getUint16(!0),a.getUint16(!0),a.getUint16(!0),u.captureTs=this.qa(a.ka(!0)/1e3),u}nd(a){return{id:a.getUint8(),control:a.getUint8()}}hd(a){let u;const S=a.getUint8();return mr(S)&&(u={id:S,data:this.od(a)}),u}od(a){const u={ds4Btns:[0,0,0],triggers:[0,0],axes:[0,0,0,0]};a.getUint8(),a.getUint8(),a.getUint8();for(let S=0;S<4;S++)u.axes[S]=a.getUint8();return u.ds4Btns[0]=a.getUint8(),u.ds4Btns[1]=a.getUint8(),u.ds4Btns[2]=a.getUint8(),u.triggers[0]=a.getUint8(),u.triggers[1]=a.getUint8(),u}rd(a,u){let S;const D=a.getUint32(!0);switch(D){case 3:case 4:S=this.Ja(a);break;case 8:case 9:S=this.Za(a);break;case 10:S=this.td(a);break;case 5:case 7:S=this.sd(a,5==D);break;case 12:S=this.ed(a);break;case 13:a.getUint16();break;case 18:S=this.nd(a);break;case 17:S=this.hd(a)}if(void 0!==S)return{header:{recordedTs:u,size:Oo(D,S),packetId:D},data:S};s.Log.d("{5eeca93}","{e255bfc}",D)}ad(a){const u=new Rr(a),S=this.qa(this.ur._a());for(;!u.done();){const D=u.getUint8();switch(D){case 36:u.ka();break;case 33:case 34:const L=33==D?u.getUint16():u.left(),Y=u.Ta(L);if(void 0===Y)return void s.Log.e("{5eeca93}","{8400b62}",L,u.left());const oe=this.rd(Y,S);if(void 0===oe)break;this.dd(oe);break;default:return void s.Log.e("{5eeca93}","{0028fe1}",D)}}}dd(a){switch(this.$a(a.header),a.header.packetId){case 4:case 3:this.za(a.data);break;case 8:case 9:case 7:case 5:case 10:this.Ka(a.data);break;case 12:this.Qa(a.data);break;case 18:this.Xa(a.data);break;case 17:this.ja(a.data)}this.Va.push(a)}ld(a){this.initialized&&this.ad(a)}ud(a){for(const u of a)u.header.recordedTs=Hi(u.header.recordedTs),u.data.captureTs&&(u.data.captureTs=Hi(u.data.captureTs))}Ad(){var a,u,S;try{const D=null!==(u=null===(a=this.params)||void 0===a?void 0:a.fileName)&&void 0!==u?u:"inputrecordfile";hi([this.buffer.slice(0,this.Ha.offset)],`${D}.dat`,"application/octet-stream"),null!==(S=this.params)&&void 0!==S&&S.vd&&(this.ud(this.Va),hi([JSON.stringify(this.Va)],`${D}-events.json`,"application/json"))}catch(D){s.Log.e("{5eeca93}","{45fa32c}",D)}}}class Go{constructor(a,u){this.ur=u,this.fd=!0,this.pd=a,this.ur=u}md(a){const u=a.data;u.input?this.pd.gd(u.input):u.result?s.Log.d("{5eeca93}","{6ab9f7d}",u.result):u.log&&s.Log.d("{59381ac}","{0b0c6f9}",u.log)}wd(a){}stop(){var a;null===(a=this.Sd)||void 0===a||a.terminate()}start(){var a;if(!this.playbackBuffer)return;const u={start:{playbackBuffer:this.playbackBuffer,loop:this.fd,absStreamBeginTs:performance.timeOrigin+this.ur.bd()}};s.Log.d("{5eeca93}","{8a97b19}"),null===(a=this.Sd)||void 0===a||a.postMessage(u)}kd(a){const u=a.getUint32(0),S=a.getInt8(4),D=a.getInt8(5);return u==Fr&&1==S&&0==D}initialize(a){if(a.buffer.byteLength<8)return s.Log.e("{5eeca93}","{fbe135e}"),!1;const u=new DataView(a.buffer,0,8);if(!this.kd(u))return s.Log.e("{5eeca93}","{9946103}"),!1;try{this.Sd=co('class t{constructor(t){this.i=0,this.h=t}o(){return this.h.getUint8(this.i)}getUint8(){const t=this.o();return this.i++,t}u(t=!1){return t=null!=t&&t,this.h.getUint16(this.i,t)}getUint16(t=!1){const e=this.u(t);return this.i+=2,e}l(t=!1){return t=null!=t&&t,this.h.getInt16(this.i,t)}getInt16(t=!1){const e=this.l(t);return this.i+=2,e}m(t=!1){return t=null!=t&&t,this.h.getUint32(this.i,t)}getUint32(t=!1){const e=this.m(t);return this.i+=4,e}T(t=!1){return function(t,e,s){let i=0,r=0;return s?(i=t.getUint32(e,!0),r=t.getUint32(e+4,!0)):(r=t.getUint32(e,!1),i=t.getUint32(e+4,!1)),4294967296*r+i}(this.h,this.i,t)}D(t=!1){const e=this.T(t);return this.i+=8,e}reset(){this.i=0}get U(){return this.i}done(){return this.i===this.h.byteLength}left(){return this.h.byteLength-this.i}I(t){t>=0&&t<=this.h.byteLength&&(this.i=t)}v(t){this.I(this.i+t)}B(e){if(e>this.left())return;const s=new t(new DataView(this.h.buffer,this.h.byteOffset+this.i,e));return this.v(e),s}}const e=self;function s(t){const s={log:t};e.postMessage(s)}let i=new class{constructor(){this.absStreamBeginTs=0,this.H=0}S(t){return this.H+t}M(t){return t>0?this.S(t):0}P(){return performance.timeOrigin+performance.now()-this.absStreamBeginTs}C(t){return{recordedTs:t.D()/1e3,packetId:t.getUint32(),size:t.getUint32()}}G(t){return{keycode:t.getUint16(),flags:t.getUint16(),scancode:t.getUint16(),captureTs:this.M(t.D()/1e3)}}K(t){return{flags:t.getUint16(),xpos:t.getUint16(),ypos:t.getUint16(),data1:t.getUint16(),data2:t.getUint16(),windowHandle:t.getUint32(),vwheel:t.getUint16(),hwheel:t.getUint16(),captureTs:this.M(t.D()/1e3)}}L(t){const e=t.getUint16(),s=t.getUint16(),i=t.getUint16(),r=t.getUint16(),n=[0,0,0,0];for(let e=0;e<4;e++)n[e]=t.getInt16();return{index:e,bitmap:s,buttons:i,trigger:r,axes:n,captureTs:this.M(t.D()/1e3)}}R(t){return{id:t.getUint8(),control:t.getUint8()}}V(t){const e=[0,0,0,0];for(let s=0;s<4;s++)e[s]=t.getUint8();const s=[0,0,0];s[0]=t.getUint8(),s[1]=t.getUint8(),s[2]=t.getUint8();const i=[0,0];return i[0]=t.getUint8(),i[1]=t.getUint8(),{ds4Btns:s,axes:e,triggers:i}}j(t){let e;const s=t.getUint8();return function(t){return t>=6&&t<=9}(s)&&(e={id:s,data:this.V(t)}),e}A(t,e){let s;switch(t){case 3:case 4:s=this.G(e);break;case 8:case 9:case 10:case 5:case 7:s=this.K(e);break;case 12:s=this.L(e);break;case 18:s=this.R(e);break;case 17:s=this.j(e)}return s}F(t){if(t.length>0){const s={input:t};e.postMessage(s)}}async J(t,e){const s=e-this.P();s>0&&await new Promise((t=>setTimeout(t,s))),this.F(t)}async N(e,i=!1){do{this.H=this.P();const i=new t(e);let r=[],n=0;for(;!i.done();){const t=i.B(16);if(void 0===t)return s("{76ef155}16{0da0ef8}"+i.left()),!1;const e=this.C(t),a=i.B(e.size);if(void 0===a)return s("{fbf3a80}"+e.size+"{0da0ef8}"+i.left()),!1;const h=this.A(e.packetId,a);if(!h){s("{20d711f}"+e.packetId);continue}const c=this.S(e.recordedTs);n>0&&c>n&&(await this.J(r,n),r=[]),r.push({header:e,data:h}),n=c}await this.J(r,n)}while(i);return!0}async O(t){if(t.start){const s=t.start;this.absStreamBeginTs=s.absStreamBeginTs;const i={result:await this.N(s.playbackBuffer,s.loop)};e.postMessage(i)}}};e.onmessage=async t=>{i.O(t.data)};',"inputplaybackworker.js",Vr),this.Sd.onmessage=this.md.bind(this),this.Sd.onerror=this.wd.bind(this)}catch(S){return s.Log.e("{5eeca93}","{cb06694}",S.message),!1}return this.playbackBuffer=new DataView(a.buffer,8,a.buffer.byteLength-8),this.fd=a.loop,!0}}const Sa=9+4*(Math.max(38,72)+3),Os=65535;class Po extends DataView{constructor(a,u,S,D){super(a,u,S),this.shift=0,this.setUint8=(L,Y)=>super.setUint8(L+this.shift,Y),this.setUint16=(L,Y,oe)=>super.setUint16(L+this.shift,Y,oe),this.setUint32=(L,Y,oe)=>super.setUint32(L+this.shift,Y,oe),this.setInt8=(L,Y)=>super.setInt8(L+this.shift,Y),this.setInt16=(L,Y,oe)=>super.setInt16(L+this.shift,Y,oe),this.setInt32=(L,Y,oe)=>super.setInt32(L+this.shift,Y,oe),this.setFloat32=(L,Y,oe)=>super.setFloat32(L+this.shift,Y,oe),this.setFloat64=(L,Y,oe)=>super.setFloat64(L+this.shift,Y,oe),this.shift=null!=D?D:0}}class Un{constructor(a,u){this.yd=new DataView(new ArrayBuffer(a)),this.Id=new Zr(this.yd),this.Cd=u,this.Td()}get writer(){return this.Id}get channel(){return this.Cd}get Ed(){return this.Id.offset-9}Td(){this.Id.reset(),this.Id.Ma(9)}Pa(){return this.Id.Pa()}data(){return new DataView(this.yd.buffer,9,this.Ed)}Md(a){if(a>this.Pa())return;const u=new Po(this.yd.buffer,this.Id.offset,a);return this.Id.Ma(a),u}}function ni(m){switch(m){case 3:case 4:case 8:case 9:return 18;case 10:return 22;case 5:case 7:return ti(5==m);case 12:return 38;case 18:return 10;case 17:return 72;default:return 0}}class On{constructor(a,u,S,D,L,Y,oe,_e,Ce,Ue){if(this.Pd=0,this.Dd=0,this.buffer=new ArrayBuffer(1150),this.Rd=new DataView(this.buffer),this.Nd=new Un(Sa,"input_channel_v1"),this.xd=new ArrayBuffer(658),this.Od=new DataView(this.xd),this.Bd=new ArrayBuffer(100),this.Fd=0,this.Ud=this.Ld,this.Gd=this.Hd,this.Vd=[],this.Wd=new Map,this._d=0,this.qd=[],this.$d=!1,this.zd=($e,Be)=>Math.round(Os*($e/Be)),this.ur=_e,this.Kd=a,this.Qd=u,this.Xd=L,this.Yd=D,this.jd=Y,this.jd.onmessage=$e=>this.onMessage($e),this.Jd=Ce,this.telemetry=oe,this.Zd=S,this.tc=this.sc.bind(this),this.Od.setUint8(9,34),this.Od.setUint32(10,24,!0),this.Jd&&(this.Wd=new Map,this.ec=new Un(Sa+16,"input_channel_partially_reliable"),Ue)){this._d=Ue.nc;for(let Be=0;Be<64;Be++){const at=BigInt(1)<2&&(this.Qd.uc=!0,this.Ud=this.Ac,this.Gd=this.vc),s.Log.i("{57a6a4d}","{68c4654}",this.Dd)}else this.tc(u,0)}lc(a,u){let S=a.getUint16(u,!0);if(267===S)this.sc(a,u+2);else{let D=255&S;switch(D){case 32:case 33:case 34:case 35:case 36:case 255:this.fc(D,a,1);break;default:s.Log.w("{57a6a4d}","{aea35b8}",S)}}}fc(a,u,S){34===a?this.mc(u,S):s.Log.d("{57a6a4d}","{ba4ff6a}",a)}mc(a,u){let S=a.getUint32(u+0,!0);switch(S){case 267:this.sc(a,u+4);break;case 17:this.gc(a,u+4);break;default:s.Log.w("{57a6a4d}","{25be6a3}",S)}}gc(a,u){let S=a.getUint8(u+0);if(mr(S)){let D=S-6,L=a.getUint8(u+3),Y=a.getUint8(u+4);if(5!==L||1&~Y)s.Log.w("{57a6a4d}","{d8b7bec}",L,Y,S);else{const oe=a.getUint8(u+7)<<8,_e=a.getUint8(u+8)<<8;for(const Ce of this.Vd)Ce.wc(D,oe,_e)}}else s.Log.w("{57a6a4d}","{6135ec1}",S)}sc(a,u){const S=a.getUint16(u+0,!0);if(1==S){const D=a.getUint16(u+2,!0);if(D<6)return void s.Log.e("{57a6a4d}","{1527181}",D);D>6&&s.Log.w("{57a6a4d}","{78db114}",D);const L=a.getUint16(u+4,!0),Y=a.getUint16(u+6,!0),oe=a.getUint16(u+8,!0);for(const _e of this.Vd)_e.Sc(L,Y,oe)}else s.Log.w("{57a6a4d}","{c7cf6da}",S)}bc(a,u,S,D,L){return a.setUint32(u,S,!0),a.setUint8(u+4,D),a.setUint8(u+5,0),a.setUint32(u+6,0),Di(L,a,u+10,!1,1e3),u+18}kc(a,u){const S=this.Gd(18);this.bc(S,0,8,gr(a),u);try{this.dc(S)}catch(D){s.Log.e("{57a6a4d}","{b258856}",D),this.telemetry.cc(D,"send mousedown exception","{57a6a4d}.ts",0,0,!0)}}yc(a,u){const S=this.Gd(18);this.bc(S,0,9,gr(a),u);try{this.dc(S)}catch(D){s.Log.e("{57a6a4d}","{c1ae1fc}",D),this.telemetry.cc(D,"send mouseup exception","{57a6a4d}.ts",0,0,!0)}}Ic(a,u,S,D){return a.setUint32(u,10,!0),a.setUint16(u+4,0,!1),a.setUint16(u+6,S,!1),a.setUint16(u+8,0,!1),a.setUint32(u+10,0),Di(D,a,u+14,!1,1e3),u+22}Cc(a,u){const S=this.Gd(22);var D;this.Ic(S,0,-(D=a),u);try{this.dc(S)}catch(D){s.Log.e("{57a6a4d}","{3d81a57}",D),this.telemetry.cc(D,"send mousewheel exception","{57a6a4d}.ts",0,0,!0)}}Tc(a,u,S,D=0){const L=this.Gd(ti(a));this.Ec(L,0,a,u,S,D);try{this.Mc()&&this.dc(L)}catch(Y){s.Log.e("{57a6a4d}","{dba1265}",Y),this.telemetry.cc(Y,"send CursorPos exception","{57a6a4d}.ts",0,0,!0)}}Pc(a,u,S,D,L){return a.setUint8(u+0,32),a.setUint16(u+1,S,!1),Di(L,a,u+3,!1,1e3),Di(D,a,u+11,!1,1e3),u+19}Dc(a,u,S,D){const L=this.Qd.Rc[S],Y=u;u+=19;for(let _e=0;_e2&&u&&(a.byteOffset<9?s.Log.w("{57a6a4d}","{0fc6121}"):((a=new DataView(a.buffer,a.byteOffset-9,9+a.byteLength)).setUint8(0,35),Di(this.ur._a(),a,1,!1,1e3)));try{let _e=performance.now();switch(S){case"input_channel_partially_reliable":null===(L=this.Jd)||void 0===L||L.send(a);break;case"input_channel_v1":this.jd.send(a);break;default:throw new Error(`Invalid input channel ${S}`)}let Ce=performance.now();this.Xd.Vc(Ce-_e);const Ue=window.performance.now();this.Zd.Wc+=1;const $e=Ue-Y;$e>5&&(this.Zd._c+=1),$e>10&&(this.Zd.qc+=1),oe=!0}catch(_e){_e.stack&&!_e.stack.includes("Could not send data")&&(s.Log.e("{57a6a4d}","{7a6bf7c}",_e),this.Mc()&&this.telemetry.cc(_e,"sendinput exception","{57a6a4d}.ts",0,0,!0))}return oe}$c(){let a=1,u=0;for(;u0){a+=19;for(let D=0;D0?(a+=9,u=this.Qd.Rc[S].Nc):0===u&&(a+=9),a+=3+ti(this.Qd.Rc[S].xc),u--;return a}Gc(){return this.Qd.zc>0}Qc(a){this.Fd=window.setTimeout(()=>{this.Fd=0,this.Xc()},a)}Xc(){this.dc()}Ld(a){0!==this.Fd&&(window.clearTimeout(this.Fd),this.Fd=0);const u=performance.now();this.Pd=u;const S=a?2+a.byteLength:0,D=this.$c()+S;let L;D>this.buffer.byteLength?(L=new DataView(new ArrayBuffer(D)),this.Zd.Yc++):L=new DataView(this.buffer,0,D),L.setUint8(0,255);let Y=1,oe=0;for(;oe0?(Y=this.Dc(L,Y,oe,u),oe+=Ce.Nc):(Y=this.Ec(L,Y,Ce.xc,Ce.x,Ce.y,Ce.Oc),oe++),L.setUint16(_e,Y-_e-2)}if(this.Qd.clear(),a){L.setUint16(Y,a.byteLength),Y+=2;for(let _e=0;_ethis.buffer.byteLength){if(L=new DataView(new ArrayBuffer(D),D-S,S),this.Zd.Yc++,a){const _e=L.byteLength-a.byteLength;for(let Ce=0;Ce0?(oe=Ce.Nc,L.setUint8(Y,36),Di(Ce.Bc,L,Y+1,!1,1e3),Y+=9):0===oe&&(L.setUint8(Y,36),Di(0,L,Y+1,!1,1e3),Y+=9),L.setUint8(Y,33),L.setUint16(Y+1,ti(Ce.xc)),Y=this.Ec(L,Y+3,Ce.xc,Ce.x,Ce.y,Ce.Oc),oe--}return this.Qd.clear(),L}Hd(a){return new Po(this.Bd,0,a)}vc(a){const u=this.buffer.byteLength-(a+=1);let S=new Po(this.buffer,u,a,1);return this.Rd.setUint8(u,34),S}jc(a){var u;const S=null!==(u=this.Wd.get(a))&&void 0!==u?u:1;return this.Wd.set(a,(S+1)%65536),S}Jc(a,u){if(0===a.Ed)return;u=null!=u?u:a.channel;const S=a.data();this.dc(S,!0,u),a.Td()}Zc(a,u,S=!1,D){const L=u+(S?1:3)+(void 0===D?0:4);if(!(L>a.Pa()&&(this.Jc(a),L>a.Pa()))){if(void 0!==D){const Y=this.jc(D);a.writer.Da(38),a.writer.Da(D),a.writer.Ra(Y)}return S?a.writer.Da(34):(a.writer.Da(33),a.writer.Ra(u)),a.Md(u)}}sendTextInput(a){let u=0,S=new DataView(a,0,a.byteLength),D=new ArrayBuffer(1021);for(;u0&&s.Log.w("{57a6a4d}","{5e5b9e5}",this.jd.bufferedAmount),this.Jd&&this.Jd.bufferedAmount>0&&s.Log.w("{57a6a4d}","{3a88bc1}",this.Jd.bufferedAmount),this.$d&&(null===(a=this.oc)||void 0===a||a.Ad())}get tl(){return this.Dd}get il(){return this.Pd}sl(a){let u=new Uint8Array(a);return Array.prototype.map.call(u,function(S){return("0"+(255&S).toString(16)).slice(-2)}).join("")}el(a){let u="";for(let S=0;S>8],function(Be){const at=At=>127.5*(At+1);return[at(Be[0]),at(Be[1]),at(Be[2]),at(Be[3])]}(L),$e)}ca(a,u,S,D,L,Y,oe,_e){if(a>=40)return!1;const Ce=18+16*a;return this.Od.setUint8(Ce+0,u),this.Od.setUint8(Ce+1,S),this.Od.setUint16(Ce+2,D,!1),this.Od.setUint16(Ce+4,L,!1),this.Od.setUint8(Ce+6,Y),this.Od.setUint8(Ce+7,oe),Di(_e,this.Od,Ce+8,!1,1e3),!0}la(a){let u=8+16*a;this.Od.setUint16(14,u,!1),this.Od.setUint16(16,a,!1);let S=10;this.Dd>=3&&(u++,S--);const D=new DataView(this.Od.buffer,S,u);return this.Xc(),this.dc(D)}Il(a){this.Vd.push(a)}Cl(a){const u=this.Vd.indexOf(a);u>-1&&this.Vd.splice(u,1)}rl(a){if(!this.Jd)return!1;const u=1<0){const Ce=this.Ml[this.El-1];if(Ce.xc===a&&Ce.Bc===Y)return void(a?(Ce.x=u,Ce.y=S):(Ce.x+=u,Ce.y+=S))}const _e=this.uc?L:0;if(this.El==this.Ml.length)this.Ml.push({xc:a,x:u,y:S,Oc:D,Nc:_e,Bc:Y}),this.El++;else{const Ce=this.Ml[this.El++];Ce.xc=a,Ce.x=u,Ce.y=S,Ce.Oc=D,Ce.Nc=_e,Ce.Bc=Y}}}function Pi(m){const a=u=>Math.round(32767.5*(u+1))-32768;return[a(m[0]),a(-m[1]),a(m[2]),a(-m[3])]}function gr(m){return m+1}I.VirtualButton=void 0,function(m){m[m.A=4096]="A",m[m.B=8192]="B",m[m.X=16384]="X",m[m.Y=32768]="Y",m[m.LB=256]="LB",m[m.RB=512]="RB",m[m.LT=255]="LT",m[m.RT=65280]="RT",m[m.BACK=32]="BACK",m[m.START=16]="START",m[m.STICK_LEFT=64]="STICK_LEFT",m[m.STICK_RIGHT=128]="STICK_RIGHT",m[m.DPAD_UP=1]="DPAD_UP",m[m.DPAD_DOWN=2]="DPAD_DOWN",m[m.DPAD_LEFT=4]="DPAD_LEFT",m[m.DPAD_RIGHT=8]="DPAD_RIGHT"}(I.VirtualButton||(I.VirtualButton={}));class _r{constructor(a){this.Rl=a}enable(){this.Rl.Nl=!0}disable(){this.Rl.Nl=!1}updateInput(a,u,S){this.Rl.Nl&&(Ir.getInstance().po(),this.Rl.xl=a,this.Rl.Ol=u,this.Rl.Bl=S,this.Rl.Fl=!0)}}class No{constructor(a){this.buttons=a.Ul(a.device),this.axes=a.Ll(a.device),this.triggers=a.Gl(a.device),this.timestamp=performance.now()}Hl(a,u){for(let S=0;S.01)return!0;return!1}Vl(a){return this.buttons==a.buttons&&this.triggers==a.triggers&&!this.Hl(this.axes,a.axes)}}const bs={startDelay:0,duration:0,weakMagnitude:0,strongMagnitude:0};class tr{constructor(a,u){var S,D;this.Wl=new Set,this.telemetry=new Set,this._l=!1,this.ql=0,this.$l=0,this.zl=0,this.gamepadPollInterval=100,this.Kl=4,this.Ql=[],this.Xl=[],this.Yl=[],this.hapticsSupported=!1,this.jl=!1,this.Jl=!1,this.allowHaptics=!0,this.Zl=!1,this.tu=new Set,this.iu=!1,this.su=!1,this.eu=!1,this.nu=!1,this.hu=!1,this.ou=!1,this.ru=!1,this.au=!1,this.du=!1,this.maxSchedulingDelay=0,this.cu=[],this.lu=!1,this.uu=!1,this.Au=!1,this.vu=!0,this.fu=!1,this.pu=!1,this.mu=new Map,this.gu=new Map,this.windowAddEventListener=u&&u.windowAddEventListener?u.windowAddEventListener.bind(window):window.addEventListener.bind(window),this.windowRemoveEventListener=u&&u.windowRemoveEventListener?u.windowRemoveEventListener.bind(window):window.removeEventListener.bind(window),window.GamepadEvent&&(this._l=!0),this.wu(),this.Su=this.bu.bind(this),this.ku=this.yu.bind(this),this.Iu=this.Cu.bind(this),this.Tu=[],this.Eu=[],this.Mu=[];const L=a.os,Y=null!==(D=null!==(S=a.osVersion)&&void 0!==S?S:a.osVer)&&void 0!==D?D:"",oe=(L==s.PlatformOS.IOS||L==s.PlatformOS.IPADOS)&&a.browser==s.PlatformBrowser.SAFARI;this.su=oe&&Y.startsWith("13"),this.eu=oe&&Y.startsWith("14"),this.iu=oe&&"12-"==Y,this.nu=L==s.PlatformOS.CHROME_OS,this.hu=L==s.PlatformOS.WEBOS,this.ou=L==s.PlatformOS.TIZEN,this.ru=L==s.PlatformOS.ANDROID,this.au=bt(a),this.Rl={Pu:0,Nl:!1,Du:!1,xl:0,Ol:0,Bl:[],Fl:!1},this.Ru=new _r(this.Rl),this.Nu(),this.xu=!Mt.jo,this.Ou=!1,this.Bu(void 0),s.Log.d("{515a922}","{b0c674b}")}Nu(){this.Kl=this.Fu(),this.allowHaptics=this.Uu(),this.lu=this.Lu()}Fu(){var a,u;return null!==(u=null!==(a=Mt.gamepadPollInterval)&&void 0!==a?a:Mt.So.gamepadPollInterval)&&void 0!==u?u:4}Uu(){var a,u;return null===(u=null!==(a=Mt.allowHaptics)&&void 0!==a?a:Mt.So.allowHaptics)||void 0===u||u}Lu(){var a,u;return null===(u=null!==(a=Mt.synthesizeGamepadHid)&&void 0!==a?a:Mt.So.synthesizeGamepadHid)||void 0===u||u}Gu(a){this.Nu();const S=2&a;this.vu=Mt.hr||!!(4&a),this.fu=Mt.rr||0!=S,this.Hu(!0)}Vu(){this.Nu(),this.pu=!0,this.Hu(!0)}Wu(){return!this.Rl.Du&&(s.Log.i("{515a922}","{132d93a}",this.Rl.Pu),this.Rl.Du=!0,this._u={qu:"Nvidia Virtual Gamepad",state:0,buttons:0,triggers:0,axes:[]},this.$u(this.Rl.Pu,!1),!0)}zu(){if(this._u){for(const a of this.telemetry)a.Ku(this._u.qu,"0","0",0,!1,0,!0,this._u.state,this.Qu(this._u));this._u=void 0}}Xu(){if(this.Rl.Du){s.Log.i("{515a922}","{98ac7c2}",this.Rl.Pu),this.Rl.Du=!1,this.zu();const a=this.Rl.Pu;for(const u of this.Tu)if(u&&1==u.Yu&&u.ju===a)return!1;return this.Ju(a)}return!1}Zu(a){return a<4?1<=18)||D||L)return 1;const Y=a.id.includes("Product: 09cc")||a.id.includes("Product: 05c4")||a.id.includes("Product: 0ba0")||a.id.includes("Wireless Controller")&&a.id.includes("09cc"),oe=a.id.includes("Product: 0ce6")||a.id.includes("Product: 0df2");return S&&(oe||(Y||D)&&!Mt.tr||L)?3:u&&(Y||(oe||L)&&!Mt.Zo||D)?2:1}return 1}pA(a){const u=this.fA(a);return{device:a,mA:!0,Yu:u,Ul:this.gA,Gl:this.wA,Ll:this.SA,vA:this.AA(a,"Standard Gamepad"),ju:this.iA(u)}}bA(a){const u=this.fA(a);return{device:a,mA:!0,Yu:u,Ul:this.gA,Gl:this.wA,Ll:this.SA,vA:this.AA(a,"Standard Gamepad"),kA:!0,ju:this.iA(u)}}yA(a){const u=this.fA(a);return{device:a,mA:!0,Yu:u,Ul:this.gA,Gl:this.IA,Ll:this.SA,vA:this.AA(a,"Nvidia Shield Gamepad"),ju:this.iA(u)}}CA(a){const u=this.fA(a);return{device:a,mA:!0,Yu:u,Ul:this.TA,Gl:this.wA,Ll:this.EA,vA:this.AA(a,"Standard Gamepad"),ju:this.iA(u)}}MA(a){const u=this.fA(a);return{device:a,mA:!1,Yu:u,Ul:this.PA.bind(this),Gl:this.DA.bind(this,3,4),Ll:this.RA,vA:this.AA(a,"Dual Sense Gamepad"),ju:this.iA(u)}}NA(a){const u=this.fA(a);return{device:a,mA:!1,Yu:u,Ul:this.xA.bind(this),Gl:this.DA.bind(this,3,4),Ll:this.RA,vA:this.AA(a,"Xbox Series Gamepad"),ju:this.iA(u)}}OA(a){const u=this.fA(a);return{device:a,mA:!1,Yu:u,Ul:this.BA.bind(this),Gl:this.DA.bind(this,2,5),Ll:this.FA,vA:this.AA(a,"Xbox Series Wired Gamepad"),ju:this.iA(u)}}UA(a){return this.eu?this.pA(a):this.su?this.CA(a):this.iu?null:!this.LA(a)||this.hu||this.ou?this.GA(a)?this.bA(a):this.HA(a)?this.pA(a):this.VA(a)?this.MA(a):this.WA(a)?this.NA(a):this._A(a)?this.OA(a):(s.Log.e("{515a922}","{be4bfd9}",a),null):this.yA(a)}hl(a,u){const S=(D,L)=>{D.hl(L)};if(a)S(a,null!=u?u:this.ql);else for(const D of this.Wl)S(D,null!=u?u:this.ql)}bu(a){this.qA(a.gamepad,a.gamepad.index)&&this.hl()}yu(a){this.$A(a.gamepad.index,!0)&&this.hl()}zA(){0!=this.zl&&(clearInterval(this.zl),this.zl=0),this.zl=this.Zl&&!Mt.Eo?window.setInterval(this.Iu,this.gamepadPollInterval):0}KA(a){let u=["-1","-1"];const S=/Vendor:[ ]+([\w\d]+).+Product:[ ]+([\w\d]+)/.exec(a);return S&&S.length>=3&&(u=[S[1],S[2]]),u}QA(a){if(this.$l&&(this.hl(a,0),this.tu.size<=1)){let u=!0;for(let S of this.Tu)S&&(S.vA.state=this.uA(S.vA.state,!0),this.$A(S.device.index,!0,u),u=!1);this.zu(),this.ql=0,this.$l=0,this.Rl.Du=!1,this.wu(),this.zA(),this.Tu=[],this.du=!1}}dA(a){return!!("standard"==a.mapping||this.eu||this.su||this.VA(a)||this.WA(a)||this._A(a))}HA(a){return"standard"==a.mapping}GA(a){return a.id.includes("Vendor: 045e")&&(a.id.includes("Product: 0b13")||a.id.includes("Product: 0b20")||a.id.includes("Product: 0b05")||a.id.includes("Product: 02e0")||a.id.includes("Product: 02fd"))}LA(a){return"standard"==a.mapping&&a.id.includes("Vendor: 0955")}VA(a){return!this.ru&&"standard"!=a.mapping&&a.id.includes("Vendor: 054c")&&a.id.includes("Product: 0ce6")}WA(a){return"standard"!=a.mapping&&a.id.includes("Vendor: 045e")&&a.id.includes("Product: 0b13")}_A(a){return this.nu&&"standard"!=a.mapping&&a.id.includes("Vendor: 045e")&&a.id.includes("Product: 0b12")}XA(a){return a.id.includes("Xbox")||a.id.includes("xinput")}qA(a,u){if(this.dA(a)){const S=this.UA(a);if(S){this.hapticsSupported=this.hapticsSupported||this.YA(S.device),this.jA();const D=this.ql,L=this.Tu[u],Y=this.$l,oe=this.XA(a);this.Tu[u]=S,void 0===this.Mu[u]&&(this.Mu[u]=0),L&&this.JA(a,u)?this.Tu[u].ju=L.ju:(0==this.$l&&(this.gamepadPollInterval=this.Kl,this.zA()),this.$l++,2===S.Yu?(this.ZA(S),this.gu.set(S.ju,u)):(this.$u(u,oe),this.mu.set(S.ju,u)));const _e=D!==this.ql,Ce=L?"Changing":"Adding";return _e?s.Log.i("{515a922}","{96051ae}",Ce,u,oe,S.device.id):Y!=this.$l&&s.Log.i("{515a922}","{98be0dd}",Ce,u,S.device.id),_e}for(const D of this.Wl)D.cl(a);return this.$A(u)}for(const S of this.Wl)S.cl(a);return this.$A(u)}tv(a,u){this.Tu[u].device=a,this.hapticsSupported=this.hapticsSupported||this.YA(a),this.jA()}sv(a){let u=!1;for(const S of this.Tu)if(S){a===S.device.index&&(u=!0);break}return u}$A(a,u=!1,S=void 0){let D=this.Tu[a];if(D){s.Log.i("{515a922}","{1b26b8a}",a,D.device.id);const L=D.Yu,Y=this.Eu[a];if(Y){const oe=performance.now()-Y.timestamp;if(oe>=3e3&&Y.axes.some(_e=>Math.abs(_e)>.5)){s.Log.w("{515a922}","{fde5612}",oe,Y.axes.join());for(const _e of this.telemetry)_e.Ke("GamepadStuck",D.device.id,oe.toString(),Y.axes.join())}}if(u){const[oe,_e]=this.KA(D.device.id);for(const Ce of this.telemetry)Ce.Ku(D.vA.qu,oe,_e,D.device.index,!!D.device.hapticActuators&&D.device.hapticActuators.length>0,0,null!=S?S:this.sv(D.device.index),D.vA.state,this.Qu(D.vA))}return delete this.Tu[a],delete this.Mu[a],delete this.Eu[a],this.hapticsSupported=this.ev(),this.jA(),this.$l--,0==this.$l&&(this.wu(),this.zA()),2===L?(this.nv(D),this.gu.delete(D.ju),!1):(this.mu.delete(D.ju),this.Ju(D.ju))}return!1}wu(){this.gamepadPollInterval=100}JA(a,u){var S,D;return null!=a.id&&a.id==(null===(D=null===(S=this.Tu[u])||void 0===S?void 0:S.device)||void 0===D?void 0:D.id)}ZA(a){var u;switch(a.Yu){case 3:s.Log.e("{515a922}","{ea001a4}",a.device.id);break;case 2:for(const S of this.Wl)null===(u=S.wl)||void 0===u||u.call(S,a.ju);break;default:s.Log.e("{515a922}","{36eeed4}",a.device.id)}}nv(a){var u;switch(a.Yu){case 3:s.Log.e("{515a922}","{2b2d286}",a.device.id);break;case 2:for(const S of this.Wl)null===(u=S.Sl)||void 0===u||u.call(S,a.ju);break;default:s.Log.e("{515a922}","{fafe5f9}",a.device.id)}}Hu(a=!1){let u=!1;this.Rl.Nl&&!this.Rl.Du?u=this.Wu():!this.Rl.Nl&&this.Rl.Du&&(u=this.Xu());let S=navigator.getGamepads();for(var D=0;D=2&&(2===D[0]||2===D[1])?"1":"0")+"_RS:"+(4!==D.length||2!==D[2]&&2!==D[3]?"0":"1")}wA(a){var u,S;let D=a.buttons,L=Math.round(255*(null===(u=D[6])||void 0===u?void 0:u.value));return(255&Math.round(255*(null===(S=D[7])||void 0===S?void 0:S.value)))<<8|255&L}IA(a){var u,S;let D=a.buttons,L=Math.round(255*(null===(u=D[7])||void 0===u?void 0:u.value));return(255&Math.round(255*(null===(S=D[6])||void 0===S?void 0:S.value)))<<8|255&L}DA(a,u,S){let D=Math.round(127.5*(S.axes[a]+1));return(255&Math.round(127.5*(S.axes[u]+1)))<<8|255&D}SA(a){return a.axes}EA(a){return[a.axes[0],-a.axes[1],a.axes[2],-a.axes[3]]}RA(a){return[a.axes[0],a.axes[1],a.axes[2],a.axes[5]]}FA(a){return[a.axes[0],a.axes[1],a.axes[3],a.axes[4]]}TA(a){var u,S,D,L,Y,oe;let _e=a.buttons,Ce=a.axes;return(null!==(u=_e[0])&&void 0!==u&&u.value?4096:0)|(null!==(S=_e[1])&&void 0!==S&&S.value?8192:0)|(null!==(D=_e[2])&&void 0!==D&&D.value?16384:0)|(null!==(L=_e[3])&&void 0!==L&&L.value?32768:0)|(null!==(Y=_e[4])&&void 0!==Y&&Y.value?256:0)|(null!==(oe=_e[5])&&void 0!==oe&&oe.value?512:0)|(Ce[5]>0?1:0)|(Ce[5]<0?2:0)|(Ce[4]<0?4:0)|(Ce[4]>0?8:0)}hv(a){switch(Number.parseFloat((null!=a?a:0).toFixed(5))){case.71429:return 4;case-.42857:return 8;case-1:return 1;case.14286:return 2;case 1.28571:return 0;case 1:return 5;case-.71429:return 9;case.42857:return 6;case-.14286:return 10;default:return 0}}ov(a,u){return(u<0?1:0)|(u>0?2:0)|(a<0?4:0)|(a>0?8:0)}PA(a){var u,S,D,L,Y,oe,_e,Ce,Ue,$e;let Be=a.buttons;const at=this.nu?this.ov(a.axes[6],a.axes[7]):this.hv(a.axes[9]);return(null!==(u=Be[1])&&void 0!==u&&u.value?4096:0)|(null!==(S=Be[2])&&void 0!==S&&S.value?8192:0)|(null!==(D=Be[0])&&void 0!==D&&D.value?16384:0)|(null!==(L=Be[3])&&void 0!==L&&L.value?32768:0)|(null!==(Y=Be[4])&&void 0!==Y&&Y.value?256:0)|(null!==(oe=Be[5])&&void 0!==oe&&oe.value?512:0)|(null!==(_e=Be[8])&&void 0!==_e&&_e.value?32:0)|(null!==(Ce=Be[9])&&void 0!==Ce&&Ce.value?16:0)|(null!==(Ue=Be[10])&&void 0!==Ue&&Ue.value?64:0)|(null!==($e=Be[11])&&void 0!==$e&&$e.value?128:0)|at}xA(a){var u,S,D,L,Y,oe,_e,Ce,Ue,$e;let Be=a.buttons;const at=this.hv(a.axes[9]);return(null!==(u=Be[0])&&void 0!==u&&u.value?4096:0)|(null!==(S=Be[1])&&void 0!==S&&S.value?8192:0)|(null!==(D=Be[3])&&void 0!==D&&D.value?16384:0)|(null!==(L=Be[4])&&void 0!==L&&L.value?32768:0)|(null!==(Y=Be[6])&&void 0!==Y&&Y.value?256:0)|(null!==(oe=Be[7])&&void 0!==oe&&oe.value?512:0)|(null!==(_e=Be[10])&&void 0!==_e&&_e.value?32:0)|(null!==(Ce=Be[11])&&void 0!==Ce&&Ce.value?16:0)|(null!==(Ue=Be[13])&&void 0!==Ue&&Ue.value?64:0)|(null!==($e=Be[14])&&void 0!==$e&&$e.value?128:0)|at}BA(a){var u,S,D,L,Y,oe,_e,Ce,Ue,$e;let Be=a.buttons;const at=this.ov(a.axes[6],a.axes[7]);return(null!==(u=Be[0])&&void 0!==u&&u.value?4096:0)|(null!==(S=Be[1])&&void 0!==S&&S.value?8192:0)|(null!==(D=Be[2])&&void 0!==D&&D.value?16384:0)|(null!==(L=Be[3])&&void 0!==L&&L.value?32768:0)|(null!==(Y=Be[4])&&void 0!==Y&&Y.value?256:0)|(null!==(oe=Be[5])&&void 0!==oe&&oe.value?512:0)|(null!==(_e=Be[6])&&void 0!==_e&&_e.value?32:0)|(null!==(Ce=Be[7])&&void 0!==Ce&&Ce.value?16:0)|(null!==(Ue=Be[9])&&void 0!==Ue&&Ue.value?64:0)|(null!==($e=Be[10])&&void 0!==$e&&$e.value?128:0)|at}rv(){Mt.ko&&Mt.Eo&&this.Cu()}al(){for(const a of this.Wl)a.al(this.Rl.xl,this.Rl.Ol,this.Rl.Pu,this.Rl.Bl,this.ql)}av(){return this.maxSchedulingDelay}dv(){this.maxSchedulingDelay=0}cv(){const a=performance.now();this.lv&&(this.maxSchedulingDelay=Math.max(this.maxSchedulingDelay,a-this.lv-this.gamepadPollInterval)),this.lv=a}Cu(){var a;this.cv(),this.Hu();let u=0;for(let S of this.Tu){if(!S)continue;const D=S.device.timestamp;let L=S.device;if(!this.dA(L))continue;if(S.device.timestamp<=this.Mu[L.index]){this.eA&&performance.now()-S.device.timestamp>=5e3&&this.eA();continue}this.Mu[L.index]=S.device.timestamp;const Y=this.Eu[L.index],oe=new No(S);if(Y&&Y.Vl(oe))continue;this.Eu[L.index]=oe;let _e=S.Gl(L),Ce=S.Ul(L),Ue=S.Ll(L);const $e=(Be,at,At)=>{var dt;const kt=(at|Be)===Ce,_n=va(_e,At,255)&&va(_e,At,65280),An=!((null!==(dt=null==Y?void 0:Y.buttons)&&void 0!==dt?dt:0)&Be||!(Ce&Be));return kt&&_n&&An};for(let Be of this.cu)$e(Be.uv,Be.Av,Be.vv)&&Be.Ln();switch(S.Yu){case 1:for(const Be of this.Wl)Be.ol(L.index,S.ju,Ce,_e,Ue,D,this.ql,L.id);break;case 2:for(const Be of this.Wl)null===(a=Be.kl)||void 0===a||a.call(Be,L.index,S.ju,Ce,_e,Ue,S.device.timestamp,this.ql,L.id)}u++,this.fv(S.vA,Ce,_e,Ue)}if(u){Ir.getInstance().po();for(const S of this.Wl)S.dl()}this.Rl.Du&&this.Rl.Fl&&(this.al(),this.Rl.Fl=!1,this._u&&this.fv(this._u,this.Rl.xl,this.Rl.Ol,this.Rl.Bl))}pv(a){for(let u=0;u500)&&(this.Yl[a]=Ue,(()=>{var at,At;null===(At=null===(at=oe.vibrationActuator)||void 0===at?void 0:at.playEffect)||void 0===At||At.call(at,"dual-rumble",{startDelay:0,duration:1e3,weakMagnitude:this.Xl[a],strongMagnitude:this.Ql[a]})})())}else this.Yl[a]=performance.now(),this.Ql[a]=0,this.Xl[a]=0,null===(L=null===(D=oe.vibrationActuator)||void 0===D?void 0:D.playEffect)||void 0===L||L.call(D,"dual-rumble",bs)}}kv(){return this.Nu(),this.Hu(),this.ql}Bu(a){var u,S;this.Nu();let D=null!=a?a:0;return Mt.er&&(D|=1),Mt.nr&&(D|=2),this.lu&&D?(this.uu=null!==(u=Mt.er)&&void 0!==u?u:!!(1&D),this.Au=null!==(S=Mt.nr)&&void 0!==S?S:!!(2&D),void this.Hu(!0)):(this.uu=!1,void(this.Au=!1))}static getInstance(a,u){return tr.yv||(tr.yv=new tr(a,u)),tr.yv}}function zs(m,a){return(m&a)>=.9*a}function va(m,a,u){return!!(u&a)===zs(m,u)}tr.yv=void 0;class no{constructor(a,u){this.Iv=0,this.Cv=8,this.Tv=0,this.Ev=0,this.Mv=0,this.Pv=0,this.Dv=!1,this.Rv=!1,this.scale=12,this.Nv="mousemove",this.xv="mousedown",this.Ov="mouseup",this.Bv=2,this.Fv=3,this.Rs=u,this.Uv=a,this.Lv=this.Gv.bind(this),Ut(this.Rs)&&(this.Bv=0,this.Fv=1)}ol(a,u,S,D,L,Y,oe,_e){this.Hv(S,D,L)}kl(a,u,S,D,L,Y,oe,_e){this.Hv(S,D,L)}Hv(a,u,S){const D=(Be=>{const at=dt=>-.1=1||this.Mv<=-1)&&(a=Math.trunc(this.Mv),this.Mv-=a),(this.Pv>=1||this.Pv<=-1)&&(u=Math.trunc(this.Pv),this.Pv-=u),0!=a||0!=u){const S={movementX:a,movementY:u,isPrimary:!0};let D;D="pointerrawupdate"==this.Nv||"pointermove"==this.Nv?new PointerEvent(this.Nv,S):new MouseEvent("mousemove",S),this.Uv.dispatchEvent(D)}}Wv(){return(this.Dv?1:0)|(this.Rv?2:0)}Vv(a,u){let S={button:a,buttons:this.Wv()};const D=new MouseEvent(u?this.xv:this.Ov,S);this.Uv.dispatchEvent(D)}start(){this.Iv&&this.stop(),this.Iv=window.setInterval(this.Lv,this.Cv)}stop(){this.Iv&&(clearInterval(this.Iv),this.Iv=0)}_v(a){this.Nv=a}qv(a,u){this.xv=a,this.Ov=u}reset(){this.Dv&&this.Vv(0,!1),this.Rv&&this.Vv(2,!1),this.Tv=this.Ev=0,this.Mv=this.Pv=0,this.Dv=this.Rv=!1}hl(a){}dl(){}al(a,u,S,D,L){}cl(a){}ll(a){}}class ls{constructor(){this.x=0,this.y=0}$v(){return this.x}zv(){return this.y}update(a,u,S){return this.x=a,this.y=u,!0}}class To{constructor(){this.Kv=0,this.Qv=0,this.Xv=0,this.Yv=0,this.jv=0,this.Jv=0,this.Zv=0,this.tf=0,this.if=0,this.sf=!1}$v(){return this.Kv}zv(){return this.Qv}update(a,u,S){if(0===a&&0===u)return this.sf?(this.tf=0,this.if=0):this.sf=!0,!1;if(this.sf=!1,0===this.tf&&0===this.if){if(S.81*L*Y){const $e=Math.sqrt(L)/Math.sqrt(Y);let Be=Math.abs($e-Math.trunc($e));Be>.5&&(Be=1-Be),Be<.1&&(oe=!1)}const _e=a-this.Kv,Ce=u-this.Qv,Ue=_e*_e+Ce*Ce;if(oe){const $e=1+.1*Math.max(1,Math.min(16,S-this.Xv)),Be=2*$e*Math.abs(this.Yv),at=2*$e*Math.abs(this.jv),At=Math.max(8100,Be*Be+at*at);if(oe=Ue{this.Df=0,this.Of()&&!this.Bf()&&(this.pf=!0,this.Ff())},D.onmessage=Tr=>this.Uf(Tr),this.Yd={Aa:S.clientWidth||window.screen.width,va:S.clientHeight||window.screen.height,Lf:1,Gf:0,Hf:0,videoWidth:0,videoHeight:0,Vf:0,offsetX:0,offsetY:0,Wf:1};const Or=window.zoneless;if(this.documentAddEventListener=null!==(At=null===(at=null==Or?void 0:Or.documentAddEventListener)||void 0===at?void 0:at.bind(document))&&void 0!==At?At:document.addEventListener.bind(document),this.documentRemoveEventListener=null!==(kt=null===(dt=null==Or?void 0:Or.documentRemoveEventListener)||void 0===dt?void 0:dt.bind(document))&&void 0!==kt?kt:document.removeEventListener.bind(document),this.videoAddEventListener=null!==(Dn=null!==(An=null===(_n=null==Or?void 0:Or.videoAddEventListener)||void 0===_n?void 0:_n.bind(S))&&void 0!==An?An:null===(tn=null==Or?void 0:Or.documentAddEventListener)||void 0===tn?void 0:tn.bind(document))&&void 0!==Dn?Dn:S.addEventListener.bind(S),this.videoRemoveEventListener=null!==(li=null!==(Mn=null===(Bn=null==Or?void 0:Or.videoRemoveEventListener)||void 0===Bn?void 0:Bn.bind(S))&&void 0!==Mn?Mn:null===(ci=null==Or?void 0:Or.documentRemoveEventListener)||void 0===ci?void 0:ci.bind(document))&&void 0!==li?li:S.removeEventListener.bind(S),this._f=this.qf.bind(this),this.$f=this.zf.bind(this),this.Kf=this.Qf.bind(this),this.Xf=this.Yf.bind(this),this.jf=this.Jf.bind(this),this.Zf=this.tp.bind(this),this.sp=this.ep.bind(this),this.np=this.hp.bind(this),this.op=this.ap.bind(this),this.cp=this.lp.bind(this),this.up=this.Ap.bind(this),this.vp=this.fp.bind(this),this.pp=this.mp.bind(this),this.gp=!!L.windowedStreaming,this.cursorType=null!==(Vi=null!==(mi=function(){switch(Mt.cursor){case"hw":return 1;case"sw":return 0;case"free":return 2;default:return}}())&&void 0!==mi?mi:L.cursorType)&&void 0!==Vi?Vi:this.gp?2:0,s.Log.i("{70cc40b}","{3277c0e}",this.cursorType),this.wp={Sp:!1,bp:0===this.cursorType&&!L.allowUnconfined,kp:0,yp:0,Ip:0,Cp:0,style:"",cursor:this.Af[0]},this.Tp={Ep:1,Mp:!1,Pp:!1,Dp:!1},this.Rp=["image-set","-webkit-image-set"].find(Tr=>CSS.supports("cursor",`${Tr}(url(image.bmp) 2x) 0 0, auto`)),0===this.cursorType?(this.Np=this.xp(this.af),this.Np.style.visibility="hidden",this.Np.style.display="none"):this.Np=document.createElement("canvas"),this.Op(),this.Bp(),this.gf="onpointerrawupdate"in this.af,this.wf=yn(),this.Sf=this.wf&&"getCoalescedEvents"in PointerEvent.prototype&&!(Y.browser===s.PlatformBrowser.FIREFOX),s.Log.i("{70cc40b}","{f30b8ee}",this.Sf?"supported":"not supported"),this.gf){const Tr=function(){const Wi=Mt.So.mouseCoalesceInterval;if(void 0!==Wi)return new Map([[0,0],[4,1],[8,2],[16,3]]).get(Wi)}();void 0!==Tr?this.Fp(Tr):an(Y)?this.Fp(3):this.Fp(1),s.Log.i("{70cc40b}","{20be0c0}",this.Cf,void 0!==Tr?" (overridden)":"")}this.bf=null!==(Xi=L.unadjustedMovement)&&void 0!==Xi?Xi:this.Up();const eo=an(Y)&&ki(this.Rs,84,0,4147,94)&&!ki(this.Rs,88,0,4324,139),ao=Qt(this.Rs)||!eo||!ki(this.Rs,84,0,4147,94);this.zo=(null!==(Ii=Mt.zo)&&void 0!==Ii?Ii:ao)?new To:new ls,["pointerlockchange","mozpointerlockchange"].forEach(Tr=>this.documentAddEventListener(Tr,this.cp)),["pointerlockerror","mozpointerlockerror"].forEach(Tr=>this.documentAddEventListener(Tr,this.up)),this.lf.Lp(0,this.vp),this.lf.Lp(2,this.pp),this.Gp=!(!ln(this.Rs)&&!mt(this.Rs)&&(!Ci(Y)||ki(Y,99,0,4844,44)||ke(Y))&&(!cn(Y)||!ke(Y))),1===this.cursorType&&this.Hp(1),this.Vp=1===this.cursorType&&(null===(Li=null!==(rr=Mt.pointerLockEscape)&&void 0!==rr?rr:Mt.So.pointerLockEscape)||void 0===Li||Li),this.Wp=1===this.cursorType&&Ct(Y),s.Log.d("{70cc40b}","{ec7c4c5}")}uninitialize(){["pointerlockerror","mozpointerlockerror"].forEach(a=>this.documentRemoveEventListener(a,this.up)),["pointerlockchange","mozpointerlockchange"].forEach(a=>this.documentRemoveEventListener(a,this.cp)),this.lf._p(0,this.vp),this.lf._p(2,this.pp),this.qp(),this.Np.remove()}$p(a){this.Tp.Mp&&(this.Tp.Mp=!1,this.zp(this.wp.Sp,this.wp.kp,this.wp.yp))}rv(){0===this.If&&this.pd.Xc()}zf(a){ka(a)||(a.preventDefault(),this.qf(a),2===this.cursorType&&this.af.setPointerCapture(a.pointerId))}qf(a){this.Xd.Kp(),this.lf.Qp(!0),this.pf=!0;const u=this.ur.Sr(a.timeStamp);!this.Of()||this.Bf()?(this.Wp&&this.wp.Sp&&(this.qp(),this.Df=window.setTimeout(this.xf,500)),Ir.getInstance().po(),this.kc(a.button,u)):(this.Ff(),this.wp.Sp&&(this.Xp(a.offsetX,a.offsetY),this.Yp(),this.pd.Tc(!0,this.wp.kp,this.wp.yp,u)))}qp(){this.Df&&(window.clearTimeout(this.Df),this.Df=0)}Yf(a){ka(a)||(a.preventDefault(),this.Qf(a))}Qf(a){Ir.getInstance().po(),this.yc(a.button,this.ur.Sr(a.timeStamp))}Jf(a){this.gp&&a.target!==this.af||(this.pd.Cc(a.deltaY,this.ur.Sr(a.timeStamp)),a.preventDefault())}ap(a){if(!ka(a)){if(a.preventDefault(),-1!==a.button){let u;switch(a.button){case 1:u=2;break;case 2:u=1;break;default:u=a.button}const S=this.ur.Sr(a.timeStamp);a.buttons&1<{if(!this.zo.update(_e.movementX,_e.movementY,_e.timeStamp))return;let Ce=this.zo.$v(),Ue=this.zo.zv();if(L)this.wp.bp?this.Zp(Ce,Ue):this.Xp(_e.offsetX,_e.offsetY),this.Tp.Mp=!0,Ce=this.wp.kp,Ue=this.wp.yp;else if(this.Gp){let Be=this.Tp.Ep;Ce+=this.wp.Ip,Ue+=this.wp.Cp,this.wp.Ip=Ce%Be,this.wp.Cp=Ue%Be,Ce/=Be,Ue/=Be}const $e=D%S!=0;this.Qd.Dl(L,Ce,Ue,this.ur.Sr(_e.timeStamp),0,u,$e),D++};if(a instanceof PointerEvent&&this.Sf){const _e=a.getCoalescedEvents();if(0==_e.length)oe(a);else{const Ce=this.Qd.Rc.length,Ue=_e.length>2*Ce?1:Math.max(Ce-this.Qd.zc-4,1);_e.length>Ue&&(S=Math.ceil(_e.length/Ue),this.Zd.tm+=_e.length);for(let $e of _e)oe($e)}}else oe(a);this.pd.tl>1&&0===Y&&this.Qd.zc>Y&&this.Qd.Pl(Y,this.Qd.zc-Y)}tp(a){this.jp(a)}ep(a){const u=this.pd.Gc();if(this.jp(a),!u&&this.pd.Gc()){const S=performance.now()-this.pd.il;S>=this.Cf?this.pd.Xc():this.pd.Qc(this.Cf-S)}}Xp(a,u){this.im(a-this.Yd.Gf,u-this.Yd.Hf)}Zp(a,u){const S=this.Gp?this.Tp.Ep:1;this.im(this.wp.kp+a/S,this.wp.yp+u/S)}sm(a,u){this.im(a*this.Yd.Aa/Os,u*this.Yd.va/Os)}im(a,u){this.wp.kp=Math.min(Math.max(a,0),this.Yd.Aa),this.wp.yp=Math.min(Math.max(u,0),this.Yd.va),this.Yp()}xp(a){let u=document.createElement("canvas");return u.style.touchAction="none",u.style.pointerEvents="none",u.style.willChange="transform",a.insertAdjacentElement("afterend",u),u}Op(){var a,u;if(0!==this.cursorType)return;const S=this.af.getBoundingClientRect(),D=null!==(u=null===(a=this.af.parentElement)||void 0===a?void 0:a.getBoundingClientRect())&&void 0!==u?u:new DOMRect(0,0,0,0),L=S.left-D.left+this.Yd.Wf*this.Yd.Gf,Y=S.top-D.top+this.Yd.Wf*this.Yd.Hf;this.Np.style.position="absolute",this.Np.style.left=L+"px",this.Np.style.top=Y+"px",this.Np.style.zIndex="200"}ua(a){if(this.Yd.Aa&&this.Yd.va){const S=a.va/this.Yd.va;this.wp.kp*=a.Aa/this.Yd.Aa,this.wp.yp*=S}this.Yd=a,this.Op(),this.Bp()}Bp(){const a=this.Np.getContext("2d");if(a){this.Tp.nm=a;const u=window.devicePixelRatio;if(this.Tp.Ep!=u){s.Log.i("{70cc40b}","{b786ba9}",u),this.Tp.Ep=u,this.Tp.Pp=!0;for(const S of this.uf.values())S.style=void 0;this.Yp()}}}hm(a){return a>=1.499&&a<1.999?2:Math.max(1,Math.floor(a+.001))}zp(a,u,S){if(0===this.cursorType)if(this.Mf&&a){const D=this.hm(this.Tp.Ep/this.wp.cursor.scale);this.Tp.Pp&&(this.Tp.Pp=!1,this.om(D)),this.rm(u,S,D),this.am()}else this.dm()}lm(a){const u=()=>{if(this.wp.um=void 0,this.wp.cursor=a,this.Tp.Pp=!0,0===this.cursorType)this.Yp();else{if(!a.style){const S=this.Tp.Ep;let D=1,L=1;this.Am()&&(D=this.hm(S/a.scale),L=D/S),this.om(D),a.style=this.vm(this.Np.toDataURL("image/bmp"),a.hf*L,a.rf*L)}this.wp.style=a.style,this.fm()}};if(0!==this.cursorType&&a.style)u();else if(Xa(a))if(a.image)0!==a.image.width||0!==a.image.height?u():this.wp.um=a.image;else{const S=new Image;a.image=S,!S.decode&&S.decoding&&(S.decoding="sync"),S.src=this.pm(a.nf,a.ef),S.decode?(this.wp.um=S,S.decode().then(()=>{this.wp.um===S&&u()}).catch(D=>{this.wp.um===S&&(this.wp.um=void 0,this.lm(this.Af[1]))})):u()}else this.wp.cursor=a,this.dm()}om(a){const u=this.wp.cursor;if(!u.image)return void s.Log.e("{70cc40b}","{bc9bdcd}");const S=this.Tp.Ep,D=this.Tp.nm,L=u.image.width*a,Y=u.image.height*a,oe=Math.ceil(L),_e=Math.ceil(Y);oe!==this.Np.width||_e!==this.Np.height?(this.Np.style.width=L/S+"px",this.Np.style.height=Y/S+"px",this.Np.width=oe,this.Np.height=_e,D.scale(1,1),D.imageSmoothingEnabled=!1):D.clearRect(0,0,this.Np.width,this.Np.height),D.drawImage(u.image,0,0,L,Y)}rm(a,u,S){const D=this.wp.cursor,L=this.Tp.Ep,Y=S/L;let oe=(a*this.Yd.Wf-D.hf*Y)*L,_e=(u*this.Yd.Wf-D.rf*Y)*L;this.Tf||(oe=Math.round(oe),_e=Math.round(_e)),oe/=L,_e/=L,this.Np.style.transform="translate("+oe+"px, "+_e+"px)"}am(){this.Tp.Dp||(this.Tp.Dp=!0,this.Np.style.visibility="visible")}dm(){this.Tp.Dp&&(this.Tp.Dp=!1,this.Np.style.visibility="hidden")}Uf(a){let u=new Uint8Array(a.data);switch(u[0]){case 0:case 1:let S=u[1],D=u[2],L=u[3],Y=u[4],oe=5,_e=()=>{const dt=u[oe]+(u[oe+1]<<8);return oe+=2,dt},Ce="";if(0!=Y){let dt=u.subarray(oe,oe+Y);oe+=Y,Ce=new TextDecoder("utf-8").decode(dt)}const Ue=_e();let $e,Be,at,At="";if(0!=Ue){let dt=u.subarray(oe,oe+Ue);oe+=Ue,At=new TextDecoder("utf-8").decode(dt)}oe+4<=u.byteLength&&($e=_e(),Be=_e()),oe+2<=u.byteLength&&(at=_e()/100),0==u[0]?this.Hp(S,$e,Be):this.gm(S,D,L,Ce,At,$e,Be,at);break;case 10:this.df.allowUnconfined&&this.wm(1==u[1])}}Hp(a,u,S){a>=this.Af.length?s.Log.e("{70cc40b}","{de8eabe}",a):this.Sm(this.Af[a],u,S)}gm(a,u,S,D,L,Y,oe,_e){let Ce;if(L.length>0)Ce={nf:L,hf:u,rf:S,ef:D,scale:_e||1},this.uf.set(a,Ce);else if(Ce=this.uf.get(a),void 0===Ce)return void s.Log.e("{70cc40b}","{0196577}",a);this.Sm(Ce,Y,oe)}Sm(a,u,S){const D=Xa(a);!this.wp.Sp&&D&&void 0!==u&&void 0!==S&&this.sm(u,S),this.bm(D),this.Ff(),this.lm(a),this.fm()}vm(a,u,S){const L=this.Rp;return L?`${L}(url(${a}) ${this.Tp.Ep}x) ${u} ${S}, auto`:`url(${a}) ${u} ${S}, auto`}Am(){return void 0!==this.Rp}pm(a,u){return`data:${u};base64,${a}`}fm(){this.af.style.cursor=!this.km()||this.Of()&&!this.Bf()||2==this.cursorType?"default":0===this.cursorType?"none":this.wp.style}Yp(){this.Tp.Mp=!0}bm(a){this.wp.Sp=a,a||(this.wp.Ip=0,this.wp.Cp=0)}wm(a){this.wp.bp=a,this.Ff()}mp(a){this.pf=a,this.Ff(),this.fm()}lp(a){if(document.pointerLockElement instanceof HTMLElement)return this.Rf=null,this.Nf=void 0,this.vf=2,void this.Kd.ym();const u=2===this.vf;this.vf=0,this.Im();const S=()=>{s.Log.i("{70cc40b}","{d4b3de3}"),this.pf=!1,this.fm()},D=this.Kd.Cm();if(!this.Vp||!u||D)return u&&S(),void this.Kd.Tm(!1);this.Pf=window.setTimeout(()=>{S(),this.Em(!0)},50)}Em(a){0!==this.Pf&&(this.Im(),this.Kd.Tm(a))}Im(){0!==this.Pf&&(window.clearTimeout(this.Pf),this.Pf=0)}Ap(a){this.yf||(this.vf=0,this.bf?(this.bf=!1,s.Log.e("{70cc40b}","{7599808}"),this.Ff()):(s.Log.e("{70cc40b}","{d633cd1}"),this.Mm()))}Mm(){this.fm()}Of(){var a,u;return!De(this.Rs)&&this.km()&&2!=this.cursorType&&this.lf.Jp()&&(!this.wp.Sp||this.wp.bp)&&(null===(u=null===(a=this.Xd.Pm())||void 0===a?void 0:a.pf())||void 0===u||u)}Bf(){return 1===this.vf||2===this.vf}Ff(){const a=this.Of(),u=this.Bf(),S=this.bf&&!this.wp.Sp;if(!this.pf||!a||u&&S===this.kf)1==this.vf||!a&&u&&(document.exitPointerLock?(this.vf=3,document.exitPointerLock()):this.vf=0);else{const L=this.af;if(L.requestPointerLock&&this.ff<3){if(1===this.vf){if(S===this.Rf)return;if(this.Nf)return void this.Nf.then(()=>{this.Ff()});s.Log.e("{70cc40b}",this.yf?"{d70c0a5}":"{da98287}")}this.vf=1,this.Rf=S;const oe=L.requestPointerLock({unadjustedMovement:S});this.Nf=oe,oe&&(this.yf=!0,oe.then(()=>{this.vf=2,this.Rf=null,this.Nf=void 0,this.kf=S,this.ff=0}).catch(_e=>{this.vf=0,"NotSupportedError"===_e.name&&S?(s.Log.i("{70cc40b}","{08fd91e}"),this.bf=!1,this.Ff()):("UnknownError"==_e.name?(this.ff++,s.Log.w("{70cc40b}","{9f2ba9f}",this.ff)):s.Log.e("{70cc40b}","{4cdd98f}",_e.name,_e.message),this.Mm())}))}else this.vf=2}}aA(){this.Zl||(this.Zl=!0,Vt(this.Rs)||this.Dm(),this.documentAddEventListener("wheel",this.jf,this.Ef),this.Rm(),0===this.cursorType&&(this.Np.style.display="block"),this.Ff(),this.fm())}oA(){this.Zl&&(this.Nm(),this.Zl=!1,Vt(this.Rs)||this.xm(),this.documentRemoveEventListener("wheel",this.jf,this.Ef),this.Om(),0===this.cursorType&&(this.Np.style.display="none"),this.Ff(),this.fm(),this.Im())}km(){return this.Zl}Fp(a){if(this.gf&&this.If!==a)switch(this.Zl&&this.Om(),this.If=a,this.Zl&&this.Rm(),a){case 1:this.Cf=4;break;case 2:this.Cf=8;break;case 3:this.Cf=16;break;default:this.Cf=0}}Rm(){2==this.cursorType?(this.cf._v(this.Bm()),this.videoAddEventListener(this.Bm(),this.Fm())):0!==this.If?(this.cf._v("pointerrawupdate"),this.videoAddEventListener("pointerrawupdate",this.sp)):(this.cf._v(this.Bm()),this.videoAddEventListener(this.Bm(),this.Zf))}Om(){2==this.cursorType?this.videoRemoveEventListener(this.Bm(),this.Fm()):0!==this.If?this.videoRemoveEventListener("pointerrawupdate",this.sp):this.videoRemoveEventListener(this.Bm(),this.Zf)}static Um(a){a.preventDefault()}Dm(){2==this.cursorType&&this.wf?(this.cf.qv("pointerdown","pointerup"),this.videoAddEventListener("pointerdown",this.$f),this.videoAddEventListener("pointerup",this.Xf)):(this.cf.qv("mousedown","mouseup"),this.videoAddEventListener("mousedown",this._f),this.videoAddEventListener("mouseup",this.Kf)),Nt(this.Rs)||this.videoAddEventListener("contextmenu",$s.Um)}xm(){2==this.cursorType&&this.wf?(this.videoRemoveEventListener("pointerdown",this.$f),this.videoRemoveEventListener("pointerup",this.Xf)):(this.videoRemoveEventListener("mousedown",this._f),this.videoRemoveEventListener("mouseup",this.Kf)),Nt(this.Rs)||this.videoRemoveEventListener("contextmenu",$s.Um)}fp(a){a?(this.lf.Lm()&&(this.pf=!0,this.Ff()),this.Bp()):(this.Ff(),this.Em(!1))}Nm(){if(this.mf.size>0){s.Log.i("{70cc40b}","{041c67f}",this.mf.size);for(const a of this.mf)this.yc(a,0)}}Bm(){return this.wf?"pointermove":"mousemove"}Fm(){return this.wf?this.op:this.np}kc(a,u){this.mf.has(a)||(this.mf.add(a),this.pd.kc(a,u))}yc(a,u){this.mf.has(a)&&(this.mf.delete(a),this.pd.yc(a,u))}Zr(a){this.Mf!=a&&(this.Yp(),this.Mf=a)}Gm(a){this.Tf=a,this.Yp()}Hm(){return this.wp}Vm(){this.bf=!this.bf,this.Xd.Wm("UnadjustedMovement: "+(this.bf?"ON":"OFF")),s.Log.i("{70cc40b}","{796c5cb}",this.bf?"ON":"OFF")}_m(){let a="UNSUPPORTED";if(this.gf)switch(this.Fp((this.If+1)%4),this.If){case 1:a="4ms";break;case 2:a="8ms";break;case 3:a="16ms";break;default:a="OFF"}this.Xd.Wm("Non-vsync mouse events: "+a),s.Log.i("{70cc40b}","{bac28ff}",a)}Up(){return!(Ci(this.Rs)&&(Qt(this.Rs)&&(this.gp||!ki(this.Rs,84,0,4147,78))||(an(this.Rs)||ke(this.Rs))&&!ki(this.Rs,86,0,4240,198)))}qm(){return`${this.wp.Sp?"local":"alt"} ${this.Bf()?"locked":"unlocked"}`}}function ka(m){return!m.isPrimary||"touch"===m.pointerType||"pen"===m.pointerType}function Xa(m){return"none"!==m.style}const Aa=[{$m:8,zm:128,Km:ea(),Qm:27,Xm:[]},{$m:46,zm:128,Km:ea(),Qm:27,Xm:[]}];class Fs{constructor(a,u,S,D,L,Y,oe,_e,Ce,Ue,$e,Be,at,At,dt,kt,_n,An,tn){var Dn,Bn,Mn,ci,li,mi,Vi,Xi,Ii,rr,Li,Or,eo,ao,Tr,Xn,Wi,Lo;this.Xd=a,this.Ym=u,this.telemetry=L,this.Yh=Y,this.jm=Ce,this.Jm=Ue,this.Rs=$e,this.Kd=Be,this.Zm=at,this.lf=At,this.ur=kt,this.tg=!1,this.ig=0,this.sg=new Set,this.eg=0,this.ng=!1,this.hg=!1,this.og=!1,this.rg=!0,this.ag=!1,this.dg=0,this.cg=new cs,this.Oo=!1,this.lg=0,this.ug=!1,this.Ag=!0,this.vg=!1,this.fg=0,this.pg=0,this.mg=0,this.gg="off",this.wg="off",this.Sg=new Map,this.bg=new Map,this.kg=!1,this.yg=0,this.Ig=!1,this.Cg=Cs=>{s.Log.d("{8bacfa5}","{9c2578a}"),this.Tg()},this.Eg=()=>{this.kg=!0},this.Mg=()=>{this.kg=!1},this.Yd={Aa:this.Ym.clientWidth||window.screen.width,va:this.Ym.clientHeight||window.screen.height,Lf:1,Gf:0,Hf:0,videoWidth:0,videoHeight:0,Vf:0,offsetX:0,offsetY:0,Wf:1};const $r=window.zoneless;this.windowAddEventListener=null!==(Bn=null===(Dn=null==$r?void 0:$r.windowAddEventListener)||void 0===Dn?void 0:Dn.bind(window))&&void 0!==Bn?Bn:window.addEventListener.bind(window),this.windowRemoveEventListener=null!==(ci=null===(Mn=null==$r?void 0:$r.windowRemoveEventListener)||void 0===Mn?void 0:Mn.bind(window))&&void 0!==ci?ci:window.removeEventListener.bind(window),this.documentAddEventListener=null!==(mi=null===(li=null==$r?void 0:$r.documentAddEventListener)||void 0===li?void 0:li.bind(document))&&void 0!==mi?mi:document.addEventListener.bind(document),this.documentRemoveEventListener=null!==(Xi=null===(Vi=null==$r?void 0:$r.documentRemoveEventListener)||void 0===Vi?void 0:Vi.bind(document))&&void 0!==Xi?Xi:document.removeEventListener.bind(document),this.videoAddEventListener=null!==(rr=null===(Ii=null==$r?void 0:$r.videoAddEventListener)||void 0===Ii?void 0:Ii.bind(this.Ym))&&void 0!==rr?rr:this.Ym.addEventListener.bind(this.Ym),this.videoRemoveEventListener=null!==(Or=null===(Li=null==$r?void 0:$r.videoRemoveEventListener)||void 0===Li?void 0:Li.bind(this.Ym))&&void 0!==Or?Or:this.Ym.removeEventListener.bind(this.Ym),this.Pg=this.Dg.bind(this),this.Rg=this.Ng.bind(this),this.xg=this.Og.bind(this),this.vp=this.fp.bind(this),this.Bg=this.Fg.bind(this),this.Ug=this.Lg.bind(this),this.Gg=this.Hg.bind(this),this.Vg=this.Wg.bind(this),this._g=this.qg.bind(this),this.$g=this.zg.bind(this),this.preventNavigation=!!oe.preventNavigation;const Hr=Ut(this.Rs);this.Kg={uv:Hr?64:128,Av:0,vv:255,Ln:this.Qg.bind(this)};const fa=new yi(36);this.pd=new On(this,fa,dt,this.Yd,this.Xd,S,this.telemetry,this.ur,An,_n),this.cf=new no(this.Ym,this.Rs),this.Xg=new $s(this,a,this.Ym,D,oe,$e,this.cf,dt,fa,this.pd,this.lf,this.ur),_e?Mi.isSupported()?(this.Yg=this.jg(),s.Log.i("{8bacfa5}","{60f3637}")):s.Log.w("{8bacfa5}","{32104d3}"):s.Log.i("{8bacfa5}","{6be89bf}"),wn.isSupported()&&!Xt(this.Rs)&&(this.Jg=this.Zg()),this.tw=Qt(this.Rs),this.nu=an(this.Rs),this.iw=ke(this.Rs),this.sw=bn(this.Rs),this.au=bt(this.Rs);const la=Ct(this.Rs),Io=!!oe.windowedStreaming;s.Log.i("{8bacfa5}","{fa2e72c}",Io?"on":"off"),this.tw?(s.Log.d("{8bacfa5}","{da5ae1d}"),this.ew=[20,144,145]):this.nu||ot(this.Rs)?(s.Log.d("{8bacfa5}","{b7becf9}"),this.ew=[]):(s.Log.d("{8bacfa5}","{098ce9c}"),this.ew=[20]),this.lf.Lp(2,this.xg),window.ResizeObserver?(this.nw=new ResizeObserver(Cs=>{this.Fg()}),this.nw.observe(this.Ym)):this.windowAddEventListener("resize",this.Bg),(Vt($e)||mt($e))&&window.IntersectionObserver&&(this.hw=new IntersectionObserver(Cs=>{this.Fg()},{threshold:[1]}),this.hw.observe(this.Ym)),this.videoAddEventListener("resize",this.Bg),this.windowAddEventListener("orientationchange",this.Cg);const Ps=window.visualViewport;Ps&&(this.Yd.Vf=Ps.height,Ps.addEventListener("resize",this.Ug)),this.pd.Il(this.Jm),this.Jm.cA(this.telemetry),Mt.Fo&&this.Jm.mv(this.Kg),this.Og(this.lf.Lm()),this.ow(!0),Mt.xo&&Ir.getInstance().initialize(this.Ym,this.Rs),(Xt(this.Rs)||this.sw||Vt(this.Rs))&&(this.textInputElement=tn,this.sw&&(this.gg=null!==(ao=null===(eo=this.textInputElement)||void 0===eo?void 0:eo.getAttribute("autocapitalize"))&&void 0!==ao?ao:"off",this.wg=null!==(Xn=null===(Tr=this.textInputElement)||void 0===Tr?void 0:Tr.getAttribute("autocorrect"))&&void 0!==Xn?Xn:"off",null===(Wi=this.textInputElement)||void 0===Wi||Wi.setAttribute("autocapitalize","off"),null===(Lo=this.textInputElement)||void 0===Lo||Lo.setAttribute("autocorrect","off"))),(Mt.Yo||Mt.Wo&&(la||Io))&&(this.rw(oe.streamingHotkeys),this.aw()),s.Log.d("{8bacfa5}","{cc9c05b}")}uninitialize(){var a,u,S,D,L,Y;Mt.Fo&&this.Jm.gv(this.Kg),this.dw(!1);const oe=this.Ym.paused,_e=void 0!==oe?oe?"paused":"playing":"unknown",Ce=this.Ym.currentTime;(oe||(null!=Ce?Ce:1)<1)&&this.telemetry.Ke("VideoPaused",_e,null==Ce?void 0:Ce.toFixed(2)),s.Log.i("{8bacfa5}","{fdc8bf7}",_e,Ce),null===(a=this.hw)||void 0===a||a.disconnect(),null===(u=this.nw)||void 0===u||u.disconnect(),this.Jm.QA(this.pd),this.pd.Cl(this.Jm),this.toggleRsdmm(!1),this.Jm.lA(this.telemetry),this.toggleUserInput(!1),this.pd.stop(),this.windowRemoveEventListener("resize",this.Bg),this.windowRemoveEventListener("orientationchange",this.Cg),this.videoRemoveEventListener("resize",this.Bg),null===(S=window.visualViewport)||void 0===S||S.removeEventListener("resize",this.Ug),this.lf._p(2,this.xg),this.Oo&&(this.Jm.nA(this.jm),this.jm.cw(this.Ym)),this.Xg.uninitialize(),null===(D=this.lw)||void 0===D||D.stop(),this.ow(!1),this.uw(),null===(L=this.textInputElement)||void 0===L||L.setAttribute("autocapitalize",this.gg),null===(Y=this.textInputElement)||void 0===Y||Y.setAttribute("autocorrect",this.wg),s.Log.d("{8bacfa5}","{b6b2756}")}Zg(){return new wn(this.Ym,this.videoAddEventListener,this.videoRemoveEventListener,this,this.ur)}jg(){return new Mi(this.Ym,this.videoAddEventListener,this.videoRemoveEventListener,this.pd,this,this.Rs,this.ur)}ow(a){a?this.lf.Lp(0,this.vp):this.lf._p(0,this.vp)}Aw(a){if(this.nu&&20===a.keyCode||Vt(this.Rs)&&20!==a.keyCode)return;let u=0;u|=16,!this.fw()&&a.getModifierState("CapsLock")&&(u|=1),this.tw&&(u|=32,u|=64,a.getModifierState("NumLock")&&(u|=2),a.getModifierState("ScrollLock")&&(u|=4)),u!=this.ig&&(this.ig=u,this.pd.ac(u))}$p(a){this.Xg.$p(a)}rv(){this.Xg.rv(),this.Jm.rv()}al(){this.pd.Mc()&&this.Jm.al()}Fg(a){this.ua(this.Ym)}Lg(a){this.Yd.Vf=window.visualViewport.height,this.pw(this.Yd.offsetX,this.Yd.offsetY,this.Yd.Wf)}Hg(a){s.Log.d("{8bacfa5}","{b6fbd34}"),history.pushState(null,document.title,location.href)}mw(a){var u;if(this.rg){if(this.sw){let S=null!==(u=a.code)&&void 0!==u&&u.length?er.get(a.code):er.get(a.key);return null!=S?S:0}{let S=a.code?er.get(a.code):cr.get(a.key);return null!=S?S:0}}return a.keyCode}gw(a){return"CapsLock"==a.code&&("Alphanumeric"==a.key||"Katakana"==a.key||"Hiragana"==a.key)||"KanaMode"==a.code&&("Hiragana"==(u=a.key)||"Katakana"==u||"Romaji"==u||"KanaMode"==u);var u}ww(a){return"Lang1"==a.code||"HangulMode"==a.key}fw(){return this.Ag&&this.iw&&this.vg}Sw(a){return!!this.fw()&&"CapsLock"==a.code}Dg(a){var u,S;let D=this.kg;this.ug=!1;const L=this.ur.Sr(a.timeStamp);if(!this.lf.Jp())return;this.bw(a)&&a.preventDefault();let Y=this.Sw(a);Y&&(D=D||Y),this.Aw(a);const oe=this.gw(a);D=D||oe;const _e=this.ww(a);if(D=D||_e,this.ew.includes(a.keyCode)&&!oe&&!Y)return;const Ce=Y?160:this.mw(a);if(0===Ce)return this.tg=!0,void this.Yh.emit("TextComposition",{compositionText:a.key,imeRecommendation:!0});if(this.tg&&(this.tg=!1,this.Yh.emit("TextComposition",{compositionText:""})),this.sg.has(Ce))return;this.sg.add(Ce);let Ue=!1;const $e=this.Xd.Pm();let Be;if(187==Ce)Ue=!this.Xd.kw();else if(a.ctrlKey&&a.altKey)if(!Mt.isInternalUser&&!Mt.stutterIndicator||119!=Ce&&219!=Ce)if(Mt.isInternalUser)switch(Ce){case 48:this.Xg._m();break;case 49:this.Xd.yw();break;case 56:this.Xd.Iw();break;case 68:this.Xd.Cw();break;case 71:this.cw();break;case 76:null==$e||$e.Tw(),this.Xg.Ff();break;case 83:this.Zm.Ew();break;case 115:this.Xd.Mw();break;case 116:this.Xd.Pw();break;case 117:this.Xd.toggleOnScreenStats(a.shiftKey);break;case 118:case 192:this.Xd.Dw();break;case 120:this.Xg.Vm();break;case 189:this.rg=!this.rg,this.Xd.Wm("Position dependent keys: "+(this.rg?"ON":"OFF")),s.Log.i("{8bacfa5}","{61d2ab5}",this.rg?"ON":"OFF");break;case 77:this.Xd.Rw();break;case 81:a.shiftKey&&this.Xd.Nw();break;default:Ue=!0}else Ue=!0;else this.Xd.toggleStutterIndicator();else if(Be=this.xw(a,Ce)){let at=this.Ow(a);for(const At of Be.Km){const dt=at&~ta(At);at!=dt&&(at=dt,this.pd.Uc(4,At,at,L)),this.sg.delete(At)}for(const At of Be.Xm)at|=ta(At),this.pd.Uc(3,At,at,L);this.pd.Uc(3,Be.Qm,at,L),this.pd.Uc(4,Be.Qm,at,L);for(const At of Be.Xm)at&=~ta(At),this.pd.Uc(4,At,at,L);this.sg.delete(Ce)}else null!=$e&&$e.isVisible()?13==Ce?($e.toggle(),this.Xg.Ff()):82==Ce?($e.reset(),this.Xg.Ff()):65==Ce?$e.Bw():83==Ce?$e.Fw():67==Ce?$e.Uw():77==Ce?$e.Lw():Ue=!0:Ue=!0;if(Ue&&(Ir.getInstance().po(),this.pd.Uc(3,Ce,this.Ow(a),L)),"Hankaku"!=a.key&&"Zenkaku"!=a.key||192==Ce&&(D=!0),this.iw&&a.metaKey&&!Be&&(D=!0),this.sw&&("Backspace"==a.code&&(D=!0),""==a.code&&"Enter"==a.key)){const at=new CompositionEvent("compositionend",{data:null===(u=this.textInputElement)||void 0===u?void 0:u.value});null===(S=this.textInputElement)||void 0===S||S.dispatchEvent(at)}D&&(this.pd.Uc(4,Ce,this.Ow(a),L),this.sg.delete(Ce))}aw(){var a,u,S,D,L,Y,oe;for(const _e of this.bg.values())s.Log.i("{8bacfa5}","{e7c6e9b}",null===(a=_e.$m)||void 0===a?void 0:a.toString(16),null===(u=_e.zm)||void 0===u?void 0:u.toString(16),null===(S=_e.Qm)||void 0===S?void 0:S.toString(16),null===(D=_e.Xm)||void 0===D?void 0:D.map(Ce=>Ce.toString(16)));for(const _e of this.Sg.values())s.Log.i("{8bacfa5}","{b5e3a31}",_e.Gw,null===(L=_e.zm)||void 0===L?void 0:L.toString(16),null===(Y=_e.Qm)||void 0===Y?void 0:Y.toString(16),null===(oe=_e.Xm)||void 0===oe?void 0:oe.map(Ce=>Ce.toString(16)))}rw(a){if(a)for(const u of a){const S=u.remote.code;if(!S)continue;const D=er.get(S);if(!D)continue;const L=ll(u.remote.modifiers),Y=u.local.key,oe=u.local.code;if(oe){const _e=er.get(oe);if(!_e)continue;this.bg.set(_e,{$m:_e,zm:u.local.modifiers,Km:ea(),Qm:D,Xm:L})}else Y&&this.Sg.set(Y,{Gw:Y,zm:u.local.modifiers,Km:ea(),Qm:D,Xm:L})}else for(const u of Aa)u.Gw?this.Sg.set(u.Gw,u):u.$m&&this.bg.set(u.$m,u)}xw(a,u){if(!(a.ctrlKey||a.shiftKey||a.metaKey||a.altKey))return;let S=this.bg.get(u);if(S||(S=this.Sg.get(a.key)),S){let D=S.zm;128==D&&(D=this.iw?4:1);const L=a.ctrlKey,Y=a.altKey,oe=a.metaKey,_e=a.shiftKey;if((1&D?L:!L)&&(2&D?Y:!Y)&&(4&D?oe:!oe)&&(8&D?_e:!_e))return S}}Ng(a){let u=!1;const S=this.ur.Sr(a.timeStamp);if(this.sw&&""==a.code&&"Unidentified"==a.key&&!this.ug)return this.pd.Uc(3,8,0,S),void this.pd.Uc(4,8,0,S);let D=this.Sw(a);if(D&&(u=u||D),this.Aw(a),this.ew.includes(a.keyCode)&&!D)return;const L=D?160:this.mw(a);u&&(this.pd.Uc(3,L,this.Ow(a),S),this.sg.add(L)),this.sg.has(L)&&(this.sg.delete(L),Ir.getInstance().po(),this.pd.Uc(4,L,this.Ow(a),S))}ua(a){var u;if(a.videoWidth<=0||a.videoHeight<=0)return;let S,D,L=1,Y=0,oe=0;a.clientWidth/a.clientHeight>a.videoWidth/a.videoHeight?(L=a.clientHeight/a.videoHeight,S=a.videoWidth*L,D=a.videoHeight*L,oe=(a.clientWidth-S)/2):(L=a.clientWidth/a.videoWidth,S=a.videoWidth*L,D=a.videoHeight*L,Y=(a.clientHeight-D)/2);let Ce=1,Ue=1;this.Yd.Aa&&this.Yd.va&&(Ce=S/this.Yd.Aa,Ue=D/this.Yd.va),this.Yd.Aa=S,this.Yd.va=D,this.Yd.Lf=L,this.Yd.Hf=Y,this.Yd.Gf=oe,this.Yd.videoWidth=a.videoWidth,this.Yd.videoHeight=a.videoHeight,this.pw(this.Yd.offsetX*Ce,this.Yd.offsetY*Ue,this.Yd.Wf),this.Xg.ua(this.Yd),null===(u=this.Yg)||void 0===u||u.ua(this.Yd,this.Hw(),this.Yd.Wf),this.Zm.ua(this.Yd.Hf,this.Yd.Gf),this.Tg()}Og(a){if(s.Log.d("{8bacfa5}","{77df54c}",a?"fullscreen":"not fullscreen"),this.Fg({}),a){if(window.isSecureContext){const u=window.navigator.keyboard;u&&u.lock&&u.lock(["Escape","F11","BrowserBack","BrowserForward","BrowserRefresh","BrowserHome","BrowserFavorites","BrowserSearch","BrowserStop","Sleep","Power","WakeUp","KeyT","KeyZ","Slash","Digit1","Digit2","Digit3","Digit4","Digit5","Digit6","Digit7","Digit8","Digit9","KeyM","KeyD","KeyN","KeyS","KeyK","KeyL","Space","PrintScreen","LaunchApp1","LaunchApp2","LaunchMail","Comma","Semicolon","ArrowLeft","ArrowRight","BracketLeft","BracketRight","KeyW","KeyQ","KeyR","KeyY","KeyO","KeyP","KeyF","KeyG"])}this.Ym.onclick=null,this.Ym.removeAttribute("controls")}else if(this.Vw(),window.isSecureContext){const u=window.navigator.keyboard;u&&u.unlock&&u.unlock()}}Ww(){this.og||(this.og=!0,history.pushState(null,document.title,location.href),this.windowAddEventListener("popstate",this.Gg))}_w(){this.og&&(this.windowRemoveEventListener("popstate",this.Gg),history.back(),this.og=!1)}qw(){return this.Yg&&!this.ng}aA(a){var u,S,D,L,Y,oe,_e;const Ce=!this.km(),Ue=(this.eg^a)&a;return!!Ue&&(this.eg|=Ue,4&Ue&&(this.$w()?(this.Jm.rA(this.cf),this.cf.start()):(this.cf.stop(),this.cf.reset(),this.Jm.rA(this.pd))),1&Ue&&this.Xg.aA(),2&Ue&&(this.documentAddEventListener("keydown",this.Pg),this.documentAddEventListener("keyup",this.Rg),null===(u=this.textInputElement)||void 0===u||u.addEventListener("input",this._g),null===(S=this.textInputElement)||void 0===S||S.addEventListener("compositionstart",this.$g),null===(D=this.textInputElement)||void 0===D||D.addEventListener("compositionupdate",this.$g),null===(L=this.textInputElement)||void 0===L||L.addEventListener("compositionend",this.$g),this.lg=0,this.au&&(null===(Y=this.textInputElement)||void 0===Y||Y.addEventListener("focus",this.Eg),null===(oe=this.textInputElement)||void 0===oe||oe.addEventListener("blur",this.Mg))),8&Ue&&(this.qw()?this.Yg.start():null===(_e=this.Jg)||void 0===_e||_e.start()),Ce&&this.preventNavigation&&this.Ww(),!0)}oA(a){var u,S,D,L,Y,oe,_e,Ce;const Ue=this.eg&a;if(!Ue)return!1;this.eg^=Ue;const $e=!this.km();return 4&Ue&&(this.$w()?(this.Jm.nA(this.cf),this.cf.stop(),this.cf.reset()):this.Jm.nA(this.pd)),1&Ue&&this.Xg.oA(),2&Ue&&(this.zw(),this.documentRemoveEventListener("keydown",this.Pg),this.documentRemoveEventListener("keyup",this.Rg),null===(u=this.textInputElement)||void 0===u||u.removeEventListener("input",this._g),null===(S=this.textInputElement)||void 0===S||S.removeEventListener("compositionstart",this.$g),null===(D=this.textInputElement)||void 0===D||D.removeEventListener("compositionupdate",this.$g),null===(L=this.textInputElement)||void 0===L||L.removeEventListener("compositionend",this.$g),this.au&&(null===(Y=this.textInputElement)||void 0===Y||Y.removeEventListener("focus",this.Eg),null===(oe=this.textInputElement)||void 0===oe||oe.removeEventListener("blur",this.Mg))),8&Ue&&(null===(_e=this.Jg)||void 0===_e||_e.stop(),null===(Ce=this.Yg)||void 0===Ce||Ce.stop(),0!==this.dg&&this.Kw(),this.cg.clear()),$e&&this.preventNavigation&&this._w(),!0}toggleUserInput(a,u){if(this.Ig)return;s.Log.d("{8bacfa5}","{2424824}",a,u);const S=null!=u?u:15;this.Ig=!0,a?this.aA(S):this.oA(S),this.Ig=!1}km(){return 0!==this.eg}Qg(){const a=performance.now();a?'.includes(a.key)?u=1:"1234567890`-=[]\\;',./".includes(a.key)&&(u=0)),void 0===u&&a.shiftKey&&!a.code.startsWith("Shift")&&(u=1),null!=u?u:0}Ow(a){let u=0;return a.ctrlKey&&!a.code.startsWith("Control")&&(u|=2),a.altKey&&!a.code.startsWith("Alt")&&(u|=4),a.metaKey&&!a.code.startsWith("Meta")&&(u|=8),u|=this.Qw(a),u}Xw(){void 0!==this.Yw&&(this.toggleUserInput(!1,15&~this.Yw),this.Yw=void 0),this.dw(!1),this.Yh.emit("StreamingEvent",{streamingWarnings:{code:4}}),this.pd.Lc(),this.Kd.jw()}Jw(){return[this.Xg.Bm(),"pointerdown","touchstart"]}Wg(){this.hg&&this.Xw()}dw(a){this.hg=a,a&&15!==this.eg&&(this.Yw=this.eg,this.toggleUserInput(!0)),a?this.Jw().forEach(u=>this.documentAddEventListener(u,this.Vg)):this.Jw().forEach(u=>this.documentRemoveEventListener(u,this.Vg))}zw(){if(this.sg.size>0){s.Log.i("{8bacfa5}","{7998ee8}",this.sg.size);for(const a of this.sg)this.pd.Uc(4,a,0);this.sg.clear()}}Vw(){this.zw(),this.Xg.Nm()}getVirtualGamepadHandler(){return this.Jm.getVirtualGamepadHandler()}sendTextInput(a){this.pd.sendTextInput(a)}Zw(a){const u=(new TextEncoder).encode(a);this.sendTextInput(u.buffer),this.textInputElement.value=""}tS(a){for(let u=a.length-1;u>=0;u--)if(void 0===zi.get(a.charAt(u)))return!1;return!0}iS(a){let u=!1;16&this.ig&&(u=!!(1&this.ig));for(let S=0;S=65&&L<=90&&u&&(Y=~Y),Y&&this.pd.Uc(3,160,0,performance.now()),this.pd.Uc(3,L,Y,performance.now()),this.pd.Uc(4,L,Y,performance.now()),Y&&this.pd.Uc(4,160,0,performance.now())}this.textInputElement.value=""}zg(a){switch(a.type){case"compositionstart":this.lg=1;break;case"compositionupdate":!Vt(this.Rs)&&this.tS(a.data)||this.Yh.emit("TextComposition",{compositionText:a.data,imeRecommendation:!0});break;case"compositionend":const u=this.sw?a.data.trim():a.data;if(u.length){const S=Vt(this.Rs)||!this.tS(a.data);this.sw&&!S?this.iS(u):this.Zw(u),S&&this.Yh.emit("TextComposition",{compositionText:""})}this.lg=0}}qg(){this.ug=!0;let a=this.textInputElement.value;if(1==this.lg&&(this.sw&&a.length>1&&(a=a.charAt(a.length-1)),this.lg=2),this.sw&&this.tS(a))return this.iS(a),void(this.lg=0);2!=this.lg&&this.Zw(a)}setVirtualKeyboardState(a){s.Log.i("{8bacfa5}","{60b2d45}",a),this.ng!==a&&(this.ng=a,this.Jg&&this.Yg&&(this.ng?(this.Yg.stop(),this.Jg.start()):(this.Jg.stop(),1!==this.Yd.Wf&&this.pw(0,0,1),this.Yg.start())))}sS(){return this.ng}setKeyboardLayout(a){this.vg="zh-TW"==a}eS(){return{Lr:this.Yd.Aa*(this.Yd.Wf-1)/2,vertical:this.Yd.va*(this.Yd.Wf-1)/2}}nS(a,u,S){this.cg.hS();const D=a.getBoundingClientRect(),L=(u.clientX-D.left)/this.Yd.Wf,Y=(u.clientY-D.top)/this.Yd.Wf;this.Zr(!0),this.Xg.Xp(L,Y);const{kp:oe,yp:_e}=this.Xg.Hm();this.pd.Tc(!0,oe,_e,S)}pw(a,u,S){this.Yd.Wf=S;let D=this.eS();D.Lr-=this.Yd.Gf,D.vertical-=this.Yd.Hf;let L=Math.max(0,this.Yd.va-this.Yd.Vf+2*this.Yd.Hf),Y=Math.max(D.vertical+L,0),oe=Math.max(D.vertical,0);D.Lr=Math.max(D.Lr,0),a=Math.min(Math.max(a,-1*D.Lr),D.Lr),u=Math.min(Math.max(u,-1*Y),oe),this.Ym.style.transform=`translate3d(${a}px,${u}px,0px) scale3d(${S},${S},1)`,this.Yd.offsetX=a,this.Yd.offsetY=u,this.Xg.ua(this.Yd)}oS(a,u,S){const D=window.visualViewport;D&&(this.Yd.Vf=D.height),this.pw(a,u,S)}Ir(){return this.hg?(this.Xw(),!1):this.lf.Jp()}bw(a){var u;if(null!==(u=this.Xd.Pm())&&void 0!==u&&u.isVisible())return!1;if(this.nu)switch(a.code){case"Tab":return!a.altKey;case"ZoomToggle":case"SelectTask":case"BrightnessDown":case"BrightnessUp":case"AudioVolumeMute":case"AudioVolumeDown":case"AudioVolumeUp":return!1}return!0}Kw(){window.clearTimeout(this.dg),this.dg=0,this.fg=0,this.pg=0}Rr(a,u,S,D){switch(this.cg.hS(),D){case 1:this.nS(a,S,u),this.cg.delay(()=>{this.rS(0,u)});break;case 2:this.fg++,Mt.isInternalUser&&0===this.dg&&(this.dg=window.setTimeout(()=>{2===this.fg?this.Xd.toggleOnScreenStats():3===this.fg&&this.Xd.toggleOnScreenStats(!0),this.Kw()},300)),this.rS(2,u);break;case 3:this.pg++,Mt.isInternalUser&&0===this.dg&&(this.dg=window.setTimeout(()=>{2===this.pg?this.Xd.Rw():3===this.pg&&this.Zm.Ew(),this.Kw()},300)),this.rS(1,u);break;case 4:this.rS(3,u);break;case 5:this.rS(4,u)}}rS(a,u){this.kc(a,u),this.cg.delay(()=>{this.yc(a,u)})}br(a,u,S){1===this.Yd.Wf&&(this.nS(a,S,u),this.cg.delay(()=>{this.kc(0,u)}))}kr(a,u){1===this.Yd.Wf&&(this.cg.hS(),this.yc(0,u))}Tr(a,u,S){1!==this.Yd.Wf||this.ng||void 0!==this.Yg?this.pw(this.Yd.offsetX+S.deltaX,this.Yd.offsetY+S.deltaY,this.Yd.Wf):this.nS(a,S,u)}scroll(a,u,S){S.length>0&&this.pd.Cc(Math.sign(S[0].deltaY),u)}Er(a,u,S){if(2===S.length){this.Xg.Gm(!0);const D=S[0],L=S[1],Y=Math.hypot(D.clientX-L.clientX,D.clientY-L.clientY),oe=Math.hypot(D.clientX-D.deltaX-(L.clientX-L.deltaX),D.clientY-D.deltaY-(L.clientY-L.deltaY)),_e=this.Ym.getBoundingClientRect(),Ce=this.eS();let Ue=this.Yd.Wf*(Y/oe);Ue=Math.min(Math.max(Ue,1),3);let $e=(D.clientX+L.clientX)/2-_e.left;$e+=this.Yd.offsetX-Ce.Lr-(_e.width-$e)/this.Yd.Wf,$e=(Ue/this.Yd.Wf-1)*$e*-1,$e+=this.Yd.offsetX+(D.deltaX+L.deltaX)/2;let Be=(D.clientY+L.clientY)/2-_e.top;Be+=this.Yd.offsetY-Ce.vertical-(_e.height-Be)/this.Yd.Wf,Be=(Ue/this.Yd.Wf-1)*Be*-1,Be+=this.Yd.offsetY+(D.deltaY+L.deltaY)/2,this.pw($e,Be,Ue)}}yr(a,u){this.Xg.Gm(!1),this.Yd.Wf<1.1&&this.pw(this.Yd.offsetX,this.Yd.offsetY,1)}Hw(){const a=this.Ym.getBoundingClientRect();return{Lr:a.left+window.pageXOffset+this.Yd.Gf*this.Yd.Wf,vertical:a.top+window.pageYOffset+this.Yd.Hf*this.Yd.Wf}}sendKeyEvent(a){if(this.pd.Mc())if(this.mw(a))"keydown"===a.type?this.Dg(a):"keyup"===a.type&&this.Ng(a);else if("keydown"===a.type&&1===a.key.length){const u=(new TextEncoder).encode(a.key);this.sendTextInput(u.buffer)}}Tg(){this.uw(),this.mg=window.setTimeout(()=>{this.Zm.send()},350)}uw(){0!==this.mg&&(window.clearTimeout(this.mg),this.mg=0)}kc(a,u){this.Xg.kc(a,u)}yc(a,u){this.Xg.yc(a,u)}Hc(){return!this.hg||(this.Xw(),!1)}aS(){return this.Xg.qm()}Zr(a){this.Xg.Zr(a)}cw(){Mt.isInternalUser&&(this.Oo=!this.Oo,this.jm.cw(this.Ym),this.Oo?this.Jm.rA(this.jm):this.Jm.nA(this.jm))}startInputPlayback(a){var u;this.lw||(this.lw=new Go(this.pd,this.ur)),null!==(u=this.lw)&&void 0!==u&&u.initialize(a)&&this.lw.start()}}class cs{constructor(){this.hn=0,this.dS=!1}hS(){this.dS=!0,this.cS(),this.lS(),this.dS=!1}clear(){this.Ln=void 0,this.cS()}delay(a){this.dS?a():(this.hS(),this.Ln=a,this.hn=window.setTimeout(()=>{this.hn=0,this.lS()},cs.uS))}lS(){const a=this.Ln;a&&(this.Ln=void 0,a())}cS(){0!==this.hn&&(window.clearTimeout(this.hn),this.hn=0)}}function ea(m){let a=[];return a.push(162),a.push(163),a.push(164),a.push(165),a.push(91),a.push(92),a.push(160),a.push(161),a}function ll(m){let a=[];return 1&m&&a.push(162),2&m&&a.push(164),4&m&&a.push(91),8&m&&a.push(160),a}function ta(m){switch(m){case 162:case 163:return 2;case 164:case 165:return 4;case 91:case 92:return 8;case 160:case 161:return 1}return 0}cs.uS=30;class ys{constructor(a=0,u=0){this.maxBitrate=a/1e3,this.AS=u/1e3,this.vS=250,this.fS=10,this.pS=16,this.qualityScore=100,this.latencyScore=100,this.bandwidthScore=100,this.networkLossScore=100,this.mS=100,this.gS=25}wS(a){if(a.currentRoundTripTime>this.vS)this.latencyScore=0;else{const S=100*(this.vS-1e3*a.currentRoundTripTime)/(this.vS-this.fS);if(void 0===S||isNaN(S))return;this.latencyScore=this.SS(this.latencyScore,S,this.pS),this.latencyScore=Math.min(this.latencyScore,this.mS)}}bS(a){let u=0;a=this.gS&&(S=(a-this.AS)/(this.maxBitrate-this.AS)*100),S>100&&(S=100),void 0===S||isNaN(S)||S<0||(this.bandwidthScore=this.SS(this.bandwidthScore,S,this.pS),this.bandwidthScore=Math.min(this.bandwidthScore,this.mS))}yS(a,u){if(void 0===a.packetsReceived||void 0===a.packetsLost||void 0===u.packetsReceived||void 0===u.packetsLost||void 0===u.pliCount||void 0===a.pliCount)return;const Y=a.packetsLost-u.packetsLost;let oe=100-Y/(a.packetsReceived-u.packetsReceived+Y)*100;(isNaN(oe)||void 0===oe)&&(oe=0);const Ce=a.pliCount-u.pliCount;Ce>0&&Y&&(oe=0);for(let Ue=0;Uethis.VS(a.state)).catch(a=>0):Promise.resolve(0)}_S(){!1!==Mt.$o&&(this.HS||3==this.currentState||2==this.currentState||6==this.currentState||7==this.currentState?this.qS(this.currentState):this.WS().then(a=>{0!==a&&this.qS(a)}))}static isMicSupported(){return Es.$S}qS(a,u=!0){this.currentState=a,3===this.currentState&&(this.US=!0),this.Yh&&u&&this.Yh.emit("MicCapture",{state:this.currentState})}getUserMedia(a){var u=this;return r(function*(){return u.HS=!0,navigator.mediaDevices.getUserMedia({audio:a}).then(S=>{if(s.Log.d("{223689a}","{b204737}"),u.qS(5,!1),u.HS=!1,u.GS=S,Vt(u.Rs)&&(S.getTracks()[0].onended=()=>{u.MS=performance.now(),s.Log.i("{223689a}","{6b60d82}"),u.zS()}),u.GS.oninactive=()=>{s.Log.d("{223689a}","{eee54f1}"),u.CS.clear(),u.GS=null},u.paused)s.Log.d("{223689a}","{21e76e1}"),u.GS=null,u.qS(7);else{var D=u.LS.getSenders()[0];D?D.replaceTrack(S.getTracks()[0]).then(()=>{var L;s.Log.i("{223689a}","{6c92139}");const Y=null!==(L=u.KS)&&void 0!==L?L:u.af;if(Vt(u.Rs)&&!In(u.Rs,15,4)&&Y&&!Y.muted){let oe;Y.srcObject&&(oe=Y.play(),s.Log.i("{223689a}","{23a6493}",Y.tagName)),oe?oe.then(()=>{s.Log.d("{223689a}","{5593cbe}"),u.QS()}).catch(_e=>{u.QS();try{u.telemetry.Ke("WAR: Play Error",null==_e?void 0:_e.name,null==_e?void 0:_e.message),s.Log.e("{223689a}","{69aae72}",null==_e?void 0:_e.name,null==_e?void 0:_e.message)}catch{}}):s.Log.e("{223689a}","{b6a6508}")}u.qS(3),u.RS=!1,In(u.Rs,15,4)&&(u.PS=!1,u.XS(!1))}).catch(L=>{s.Log.e("{223689a}","{5c42246}",L),u.GS=null,u.qS(7)}):(s.Log.e("{223689a}","{f7f0250}"),u.GS=null)}}).catch(S=>{var D,L;Vt(u.Rs)&&!In(u.Rs,15,4)&&u.QS(),u.HS=!1,S instanceof DOMException&&"NotAllowedError"===S.name?(s.Log.e("{223689a}","{3f9bd66}"),u.qS(2),u.DS&&!u.PS&&u.YS("permissionDenied")):S instanceof DOMException&&"NotFoundError"===S.name?(s.Log.e("{223689a}","{7f04869}"),u.qS(4)):S instanceof DOMException&&"NotReadableError"===S.name?(u.CS.add(null!==(D=a.deviceId)&&void 0!==D?D:"default"),s.Log.e("{223689a}","{af7e08c}",null!==(L=a.deviceId)&&void 0!==L?L:"default",S.name,S.message),navigator.mediaDevices.enumerateDevices().then(Y=>{for(const oe of Y)if("audioinput"===oe.kind&&"default"!==oe.deviceId&&!u.CS.has(oe.deviceId)){s.Log.d("{223689a}","{655d8b0}",oe.deviceId,oe.label),a.deviceId=oe.deviceId,u.getUserMedia(a);break}}).catch(Y=>{s.Log.e("{223689a}","{930e826}",Y.name,Y.message)}),u.qS(7)):(s.Log.e("{223689a}","{c361fc5}",S.name,S.message),u.qS(7))})})()}jS(a){var u=this;return r(function*(){var S,D;if(!u.initialized)return;if(!Es.$S)return s.Log.e("{223689a}","{999b07b}"),void u.qS(6);if(u.$o=!0,null!=u.GS||u.HS)return;s.Log.d("{223689a}","{981c872}",null!==(S=null==a?void 0:a.deviceId)&&void 0!==S?S:"default"),u.JS=a,u.paused=!1,u.qS(1,!1);let L={sampleRate:48e3,deviceId:null===(D=u.JS)||void 0===D?void 0:D.deviceId};an(u.Rs)&&(L.googAutoGainControl2=!1),navigator.mediaDevices.ondevicechange=Y=>{s.Log.i("{223689a}","{50d0169}",!!u.GS,u.HS),null!=u.GS||u.HS||(s.Log.d("{223689a}","{c849290}"),u.jS(u.JS))},yield u.getUserMedia(L),u.ZS||u.tb()})()}ib(){let a=Gi(48e3);if(a){let u=a.createMediaStreamDestination().stream.getAudioTracks()[0];return a.close(),u.enabled=!0,new MediaStream([u])}throw new Error("Mic stream is not supported")}initialize(a,u,S,D){if(!1!==Mt.$o){if(this.LS=a,this.Yh=u,this.af=S,this.KS=D,Es.$S){let L=this.ib();if(null==L)return void s.Log.w("{223689a}","{360f38b}");this.LS.addTrack(L.getAudioTracks()[0],L),this.$o&&this.jS(this.JS)}else s.Log.w("{223689a}","{5813c2b}");this.initialized=!0}}zS(){if(!this.initialized)return;if(!Es.$S)return void this.qS(6);this.$o=!1,this.paused=!0,this.JS=void 0;const a=this.currentState;if(navigator.mediaDevices.ondevicechange=()=>{},this.LS){s.Log.d("{223689a}","{6faf5bb}");let S=this.ib();var u=this.LS.getSenders()[0];u?u.replaceTrack(S.getTracks()[0]).then(()=>{s.Log.d("{223689a}","{797fa55}"),this.qS(5,!1),3===a&&(this.RS=!0)}).catch(D=>{s.Log.e("{223689a}","{79f26cc}",D),this.qS(7,!1)}).finally(()=>{let D=this.GS;this.GS=null,D&&D.getTracks().forEach(L=>{L.stop()}),this.qS(this.currentState),Vt(this.Rs)&&!In(this.Rs,15,4)&&this.QS()}):(s.Log.e("{223689a}","{f7f0250}"),this.GS=null)}else s.Log.e("{223689a}","{9e75fa2}"),this.qS(0)}sb(){if(!1!==Mt.$o){if(null!=this.GS){let a=this.GS;this.CS.clear(),this.GS=null,navigator.mediaDevices&&(navigator.mediaDevices.ondevicechange=()=>{}),a.getTracks().forEach(u=>{u.stop()})}this.$o=!1,this.qS(5),this.telemetry.eb("AudioInputType",this.US?"started":"not started",0,this.NS.xS,this.NS.OS,this.NS.BS),In(this.Rs,15,4)&&this.telemetry.eb("LowAudioVolume","",0,this.FS.get("permissionDenied"),this.FS.get("visibilityChange"),this.FS.get("deviceChange")),this.LS=null,this.Yh=null,this.af=void 0,this.KS=void 0,this.initialized=!1,this.NS={xS:0,OS:0,BS:0};for(const[a,u]of this.FS)this.FS.set(a,0);this.PS=!1,this.RS=!1,this.XS(!1),this.US=!1}}QS(){var a,u,S;if(!Mt.Lo||!this.ES)return;const D=null!==(u=null===(a=this.KS)||void 0===a?void 0:a.srcObject)&&void 0!==u?u:null===(S=this.af)||void 0===S?void 0:S.srcObject;if(!D)return;s.Log.i("{223689a}","{ad4b8c2}");const L=D.getAudioTracks()[0];L.enabled=!1,setTimeout(()=>{L.enabled=!0},0)}getMicState(){return this.currentState}nb(){return this.MS}XS(a){this.DS=a}ob(){return this.PS}rb(){return this.RS}tb(){return navigator.mediaDevices.enumerateDevices().then(a=>{let u=0;s.Log.d("{223689a}","{fa1ec18}",JSON.stringify(a));for(const S of a)"audioinput"==S.kind&&u++;switch(u){case 0:this.ZS="No Audio Input",this.NS.xS++;break;case 1:this.ZS="Built-in Microphone",this.NS.OS++;break;default:this.ZS="Headset Microphone",this.NS.BS++}s.Log.d("{223689a}","{0d14ab6}",this.ZS)}).catch(a=>{s.Log.e("{223689a}","{21131d5}")})}ab(){return"Built-in Microphone"===this.ZS}YS(a){var u;this.PS=!0,this.FS.set(a,(null!==(u=this.FS.get(a))&&void 0!==u?u:0)+1),s.Log.d("{223689a}","{30f8637}",a)}cb(a){this.tb().then(()=>{0!==a&&In(this.Rs,15,4)&&!this.ob()&&this.ab()&&(this.$o||this.rb())&&this.YS("deviceChange")})}}function na(m,a){switch(m){case 0:return function(u){var S;const D=window.RTCPeerConnection;if(!D)return!1;if(Vt(u))return In(u,14,3);let L=!0;switch(Je()&&Ci(u)&&(ki(u,77)||(L=!1)),u.browser){case s.PlatformBrowser.CHROME:ki(u,77)||(L=!1);break;case s.PlatformBrowser.EDGE_LEGACY:L=!1;break;case s.PlatformBrowser.SAFARI:const Y=null==D?void 0:D.prototype;Y&&null!==(S=Y.hasOwnProperty)&&void 0!==S&&S.call(Y,"canTrickleIceCandidates")&&function(oe){if(oe.browser!=s.PlatformBrowser.SAFARI)return!1;try{return st(oe.browserVer,!1,16,4)}catch{s.Log.w("{d988e7f}","{07fd1dd}")}return!0}(u)||(L=!1)}return L}(a);case 1:return Es.isMicSupported();default:return!1}}function Ee(m){return!(ln(m)||mt(m)||Vt(m))}function qe(m,a,u){var S,D,L,Y;const oe=Do(m,a),_e=Ao(m,a),Ce=30===u?1.25*u:Math.min(u,60);let Ue=0,$e=m*a*Ce;if(oe||_e){Ue=null!==(D=null!==(S=Mt.bitsPerPixel1440p)&&void 0!==S?S:Mt.So.bitsPerPixel1440p)&&void 0!==D?D:.325;let Be=2073600*Ce,at=3686400*Ce;at=Be+(at-Be)/3,$e=_e?at+($e-at)/12:Be+($e-Be)/3}else Ue=null!==(Y=null!==(L=Mt.bitsPerPixel)&&void 0!==L?L:Mt.So.bitsPerPixel)&&void 0!==Y?Y:.3;return $e=$e*Ue/1200,u>=120&&!_e&&($e=Math.min(5e4,Math.round(1.15*$e))),[Math.round($e),5e4]}function nn(m,a){const u=1e3*a;let S=3600*(120===m?.916*u+293098:.678*u+910569)/1e9/8;return 30===m&&(S*=.625),S*=.95,S=Math.round(S),S}function He(m,a){return Ft.apply(this,arguments)}function Ft(){return Ft=r(function*(m,a){return Ki.ub(m)}),Ft.apply(this,arguments)}I.BrowserFeature=void 0,Es.$S=!(!navigator.mediaDevices||!window.AudioContext&&!window.webkitAudioContext),function(m){m[m.Streaming=0]="Streaming",m[m.MicCapture=1]="MicCapture"}(I.BrowserFeature||(I.BrowserFeature={}));const pn=He;function Qn(m){var a,u,S,D,L,Y,oe,_e;const{Rs:Ce,pb:Ue,mb:$e,gb:Be}=m,at=Pn(Ce),At=De(Ce),dt=(rr=$e,Li=Be,!!mt(Ce)&&!navigator.userAgent.includes("SamsungBrowser")&&!(!Li||Li.panelWidth<3840||Li.panelHeight<2160)&&rr.includes("H265")||function(Ii,rr){return!!ln(Ii)&&!!navigator.userAgent.includes("PWA")&&rr.includes("H265")}(Ce,m.mb)||bt(Ce)),kt=dt,_n=null!==(a=Mt.hdr)&&void 0!==a?a:Mt.So.forceHdrSupport,An=null!=_n?_n:!!(null!==(u=Mt.So.enableHdrSupport)&&void 0!==u?u:mt(Ce)||ln(Ce))&&function(Ii,rr){return!(!mt(Ii)&&!ln(Ii))&&Zi(Ii,rr)}(Ce,$e),tn=null!==(D=null!==(S=Mt.Xo)&&void 0!==S?S:Mt.So.forceSdr10Support)&&void 0!==D?D:!(null!==(L=Mt.So.enableSdr10Support)&&void 0!==L&&!L)&&Zi(Ce,$e),[Dn,Bn]=lo([m.wb,m.Sb]),Mn={width:Math.round(Dn*Ue),height:Math.round(Bn*Ue),fps:60,scaleFactor:Math.round(100*Ue)};var rr,Li;let ci;dt?ci={width:3840,height:2160,fps:Mn.fps}:at&&Dn>=1366?ci={width:1600,height:1200,fps:Mn.fps}:At?ci={width:2560,height:1440,fps:Mn.fps}:Xr(Ce,Be)?ci={width:1920,height:1080,fps:Mn.fps}:Co(Ce,Be)&&(ci={width:1280,height:720,fps:Mn.fps});let li=[{width:2560,height:1600,fps:120},{width:3840,height:1080,fps:120}];kt?li.push({width:3840,height:2160,fps:60}):Xr(Ce,Be)?li=[{width:1920,height:1080,fps:Mn.fps}]:Co(Ce,Be)&&(li=[{width:1280,height:720,fps:Mn.fps}]);let mi,Vi=!1;if(An){const Ii=null===(Y=window.matchMedia)||void 0===Y?void 0:Y.call(window,"(dynamic-range: high)").matches,rr=null===(oe=window.matchMedia)||void 0===oe?void 0:oe.call(window,"(video-dynamic-range: high)").matches,Li=null===(_e=window.matchMedia)||void 0===_e?void 0:_e.call(window,"(color-gamut: p3)").matches;s.Log.i("{5083445}","{f9f1c3b}",Ii,rr,Li),Vi=ln(Ce)?Ii||rr:(Ii||rr)&&Li,mi=function(Or){var eo,ao;const Tr=null!==(eo=Mt.hdr10gParams)&&void 0!==eo?eo:Mt.So.hdr10gParams;if(Tr){const Xn=Tr.split(",").map(Wi=>parseInt(Wi,10));if(s.Log.i("{5083445}","{4c54116}",Xn.join(", ")),Xn.length>=3&&!Xn.some(Wi=>isNaN(Wi))){const[Wi,Lo,$r]=Xn;return{version:Wi,peakLuminanceIndex:Lo,peakFullFrameLuminanceIndex:$r}}}if(mt(Or))try{const Xn=window.webapis.hdr10pluscloud;if(!Xn)return void s.Log.i("{5083445}","{e293b13}");if(null===(ao=null==Xn?void 0:Xn.isHdr10plusGamingSupported())||void 0===ao||!ao)return void s.Log.i("{5083445}","{c91f105}");const Wi=1,Lo=null==Xn?void 0:Xn.getPeakLuminanceIndex(),$r=null==Xn?void 0:Xn.getFullFramePeakLuminanceIndex();return s.Log.i("{5083445}","{a5dcb3f}",Wi,Lo,$r),void 0===Wi||void 0===Lo||void 0===$r?void 0:{version:Wi,peakLuminanceIndex:Lo,peakFullFrameLuminanceIndex:$r}}catch(Xn){return void s.Log.w("{5083445}","{b510204}",Xn)}}(Ce),!Vi&&mi&&(s.Log.w("{5083445}","{e13aa38}"),Vi=!0)}_n&&(Vi=!0);const Xi=Ho();return fi={displayMode:Mn,maxAutoMode:ci,maxSupportedModes:li,features:{vsync:0,vvsync:!1,hdr:Vi,reflex:!1,audioChannelCount:Xi,bitDepth:An?10:8,sdrBitDepth:tn?10:8,hdr10PlusGamingData:mi}},fi}let fi;function or(){return fi}function Zi(m,a){return mt(m)||ln(m)||Vt(m)?a.includes("H265"):a.includes("AV1")}function xr(m){let a=0;return null!=m&&m.supported&&(a|=1),null!=m&&m.smooth&&(a|=2),null!=m&&m.powerEfficient&&(a|=4),a}I.VsyncType=void 0,function(m){m[m.OFF=0]="OFF",m[m.ON=1]="ON",m[m.ADAPTIVE=2]="ADAPTIVE"}(I.VsyncType||(I.VsyncType={}));const Ki=new class{constructor(){var m=this;this.bb=[],this.kb=!1,this.yb=()=>{if(!this.Ib)return;const a=window.screen.width,u=window.screen.height,S=window.devicePixelRatio;if(a===this.Ib.wb&&u===this.Ib.Sb&&S===this.Ib.pb)return;this.Ib.wb=a,this.Ib.Sb=u,this.Ib.pb=S;const D=Qn(this.Ib);this.Cb(D)},this.Tb=r(function*(){if(!m.Ib)return;m.Ib.mb=yield nr(m.Ib.Rs);const a=Qn(m.Ib);m.Cb(a)})}lb(){this.kb||(this.kb=!0,this.Eb(),this.Mb(),this.Pb())}ub(m){var a=this;return r(function*(){a.Ib={Rs:m,mb:yield nr(m),wb:window.screen.width,Sb:window.screen.height,pb:window.devicePixelRatio,gb:yield Ui(m)};const u=Qn(a.Ib);return a.Cb(u),u})()}Ab(m){this.bb.push(m),this.bb.length>0&&this.Db()}fb(m){this.bb=this.bb.filter(a=>a!==m),0===this.bb.length&&this.Rb()}Cb(m){for(const a of this.bb)a(m)}Db(){var m;const a=window.screen;null===(m=a.addEventListener)||void 0===m||m.call(a,"change",this.yb),window.addEventListener("focus",this.yb),window.addEventListener("resize",this.yb),Xo.push(this.Tb)}Rb(){var m,a;a=this.Tb,Xo=Xo.filter(S=>S!==a),window.removeEventListener("resize",this.yb),window.removeEventListener("focus",this.yb);const u=window.screen;null===(m=u.removeEventListener)||void 0===m||m.call(u,"change",this.yb)}Mb(){return this.Nb=this.xb("av1").then(m=>(this.Ob=m,this.Ob)),this.Nb}Bb(){return this.Ob?Promise.resolve(this.Ob):this.Nb?this.Nb:this.Mb()}Fb(){return this.Ob}Pb(){return this.Ub=this.xb("h265").then(m=>(this.Lb=m,this.Lb)),this.Ub}Gb(){return this.Lb?Promise.resolve(this.Lb):this.Ub?this.Ub:this.Pb()}Hb(){return this.Lb}xb(m,a=1920,u=1080,S=60){const D=navigator.mediaCapabilities;if(!D)return Promise.resolve(void 0);const L={type:"webrtc",video:{contentType:"video/"+m,width:a,height:u,framerate:S,bitrate:1e3*qe(a,u,S)[0]}};return D.decodingInfo(L).catch(Y=>{s.Log.w("{5083445}","{f5c2155}",m,Y)})}Eb(){var m=this;return r(function*(){const a=yield m.Vb(!0);return m.Wb(a)})()}_b(){var m=this;return r(function*(){const a=yield m.Vb(!1);return m.Wb(a)})()}Vb(m){return m&&(this.refreshRate=void 0),this.refreshRate?Promise.resolve(this.refreshRate):this.qb?this.qb:this.$b()}Wb(m){return m>=117}$b(){return this.qb=this.zb(2e3,4e3).then(m=>(this.refreshRate=m,this.refreshRate),()=>{var m;return null!==(m=this.refreshRate)&&void 0!==m?m:0}),this.qb}zb(m,a){return new Promise((u,S)=>{let D=!1;const L=window.setTimeout(()=>{D=!0},a),Y=At=>{s.Log.w("{5083445}","{0b0c6f9}",At),window.clearTimeout(L),S()};m>a&&Y("Specified timeout less than the scan interval");const oe=[];let _e,Ce=window.innerWidth,Ue=window.innerHeight,$e=window.screenX,Be=window.screenY;const at=()=>{window.requestAnimationFrame(()=>{if(D)Y("Timed out during the refreshRate loop");else if(window.innerWidth==Ce&&window.innerHeight==Ue&&$e==window.screenX&&Be==window.screenY||(Ce=window.innerWidth,Ue=window.innerHeight,$e=window.screenX,Be=window.screenY,0)){const dt=performance.now();oe.length&&oe[0]<=dt-m?(_e=Math.floor(oe.length/(m/1e3)),s.Log.d("{5083445}","{8c3d290}",_e,oe[oe.length-1]-oe[0]),At=_e,window.clearTimeout(L),u(At)):(oe.push(dt),at())}else s.Log.w("{5083445}","{824b461}"),oe.length=0,at();var At})};at()})}},Nr={None:0,Kb:1,Qb:2,Xb:4,All:7};function jr(m){var a;if(RTCRtpReceiver.getCapabilities){const u=null===(a=RTCRtpReceiver.getCapabilities("video"))||void 0===a?void 0:a.codecs;if(u)return!!u.filter(S=>S.mimeType==="video/"+m).length}return!0}function yr(m,a){return a&&(Ao(a.width,a.height)&&!(m&Nr.Xb)||Do(a.width,a.height)&&!(m&Nr.Qb)||120===a.fps&&!(m&Nr.Kb))}function nr(m,a){return vi.apply(this,arguments)}function vi(){return vi=r(function*(m,a){var u;let S=[];const D=null!==(u=Mt.codecList)&&void 0!==u?u:Mt.So.codecList;if(D)for(const L of D)S.push(L);else{const L=(oe=r(function*(_e,Ce){var Ue,$e,Be;const at=null!==($e=null!==(Ue=Mt.enableAv1Support)&&void 0!==Ue?Ue:Mt.So.enableAv1Support)&&void 0!==$e?$e:an(kt=_e)?Ci(kt):!!Qt(kt)&&(Ci(kt)||Yt(kt)||cn(kt)),At=null!==(Be=Mt.So.enableAv1ByResolutionAndFps)&&void 0!==Be?Be:Nr.All;var kt;if(!at||yr(At,Ce))return!1;if(ln(_e)&&null!=window.lge_webrtc_av1_support)return window.lge_webrtc_av1_support;if(!jr("AV1"))return!1;const dt=yield Ki.Bb();return!(null==dt||!dt.powerEfficient)}),function(_e,Ce){return oe.apply(this,arguments)})(m,a),Y=function(){var oe=r(function*(_e){var Ce,Ue,$e;const Be=null!==(Ue=null!==(Ce=Mt.enableH265Support)&&void 0!==Ce?Ce:Mt.So.enableH265Support)&&void 0!==Ue?Ue:mt(dt=_e)||ln(dt)||bt(dt),at=null!==($e=Mt.So.enableH265ByResolutionAndFps)&&void 0!==$e?$e:Nr.All;var dt;if(!Be||yr(at,void 0))return!1;if(ln(_e))return function(dt){if(!ln(dt))return!1;const kt=window.lge_webrtc_hevc_support;return s.Log.i("{5083445}","{afaf4f3}",kt,typeof kt),"string"==typeof kt?"true"===kt:!!kt}(_e);if(mt(_e))return function(dt){var kt,_n,An;if(!mt(dt))return!1;const tn=null===(An=null===(_n=null===(kt=window.webapis)||void 0===kt?void 0:kt.productinfo)||void 0===_n?void 0:_n.getSmartTVServerVersion)||void 0===An?void 0:An.call(_n),Dn=function(ci){if(!ci)return;const li=ci.match(/T-INFOLINK(\d+)-(\d+)/);return li?{Yb:parseInt(li[1],10),version:parseInt(li[2],10)}:void 0}(tn);if(!Dn)return s.Log.e("{5083445}","{e227976}",tn),!1;const{Yb:Bn,version:Mn}=Dn;return s.Log.i("{5083445}","{fc40a4b}",Bn,Mn),2021===Bn||Bn>=2023||2022===Bn&&Mn>=1008}(_e);if(!jr("H265"))return!1;const At=yield Ki.Gb();return!(null==At||!At.powerEfficient)});return function(_e){return oe.apply(this,arguments)}}()(m);(yield L)&&S.push("AV1"),(yield Y)&&S.push("H265"),S.push("H264")}var oe;return S}),vi.apply(this,arguments)}function Ui(m){const a={panelWidth:3840,panelHeight:2160};return new Promise((u,S)=>{var D,L,Y;mt(m)?null!==(D=window.tizen)&&void 0!==D&&D.systeminfo?window.tizen.systeminfo.getPropertyValue("PANEL",oe=>u(oe)):(s.Log.w("{5083445}","{c258be7}"),null!==(Y=null===(L=window.webapis)||void 0===L?void 0:L.productinfo)&&void 0!==Y&&Y.isUdPanelSupported()?u(a):(s.Log.w("{5083445}","{ef1d74b}"),u(void 0))):u(void 0)}).catch(u=>{var S,D;return s.Log.w("{5083445}","{82c980c}",u),null!==(D=null===(S=window.webapis)||void 0===S?void 0:S.productinfo)&&void 0!==D&&D.isUdPanelSupported()?a:void s.Log.w("{5083445}","{ef1d74b}")})}function Xr(m,a){return!!mt(m)&&!!a&&1920===a.panelWidth&&1080===a.panelHeight}function Co(m,a){return!!mt(m)&&!!a&&a.panelWidth<1920&&a.panelHeight<1080}function ro(m,a,u,S,D){var L;a=Math.max(4e3,a);const oe=Math.max(4e3,Math.round(a/4));return{jb:m.width,Jb:m.height,Zb:m.fps,dynamicStreamingMode:D,tk:a,ik:oe,sk:oe,ek:u,nk:4e3,hk:Na(null!==(L=m.sdrHdrMode)&&void 0!==L?L:s.SdrHdrMode.SDR),bitDepth:le(S),ak:"UNKNOWN"}}function mo(m){return m.split(/\r?\n/)}function Ss(m,a,u,S){const D=/^([^[.]+)(?:\[(\d+)\])?\.([^:]+): *(.+)$/;let L=!0;for(const Y of mo(m)){const oe=D.exec(Y);if(oe){const _e=oe[1],Ce=void 0!==oe[2]?Number.parseInt(oe[2]):void 0,$e=oe[4],Be=_e+"."+oe[3],at=Sr(_e),At=ha(a,at,Ce),dt=ha(u,at,Ce);if(!At||!dt){s.Log.w("{eb7c2d0}","{a649ad8}",S,at,Ce),L=!1;continue}if(!dt.has(Be)){s.Log.w("{eb7c2d0}","{cc4fdef}",S,Be,$e),L=!1;continue}s.Log.d("{eb7c2d0}","{2beb68f}",S,Be,$e),At.set(Be,$e)}}return L}function Sr(m){switch(m){case"video":case"vqos":case"qscore":case"bwe":case"clientPerfBr":case"packetPacing":return"video";case"audio":case"aqos":case"audioBitrate":return"audio";case"ri":return"application";case"mic":return"mic";default:return}}function go(m,a,u){var S;const D=a.ak;m.set("vqos.fec.rateDropWindow","10"),m.set("vqos.fec.minRequiredFecPackets","2"),m.set("vqos.drc.minRequiredBitrateCheckEnabled","1"),m.set("video.dx9EnableNv12","1"),m.set("video.dx9EnableHdr","1"),m.set("vqos.qpg.enable","1"),m.set("vqos.resControl.qp.qpg.featureSetting","7"),m.set("bwe.useOwdCongestionControl","1"),m.set("video.enableRtpNack","1"),m.set("vqos.bw.txRxLag.minFeedbackTxDeltaMs","200"),m.set("vqos.fec.repairMinPercent","5"),m.set("vqos.fec.repairPercent","5"),m.set("vqos.fec.repairMaxPercent","35"),m.set("vqos.drc.bitrateIirFilterFactor","18"),m.set("video.packetSize","1140"),m.set("packetPacing.minNumPacketsPerGroup","15"),m.set("vqos.bllFec.enable","0"),function(kt){var _n;const An=Qt(kt)||ke(kt);return null!==(_n=Mt.So.enableOOFQosEnhancements)&&void 0!==_n?_n:An}(u)&&(m.set("vqos.adjustStreamingFpsDuringOutOfFocus","1"),m.set("vqos.resControl.cpmRtc.ignoreOutOfFocusWindowState","1"),m.set("vqos.resControl.perfHistory.rtcIgnoreOutOfFocusWindowState","1"));const L=a.Zb>=120,Y=120===a.Zb,oe=240===a.Zb,_e=Do(a.jb,a.Jb),Ce=Ao(a.jb,a.Jb),Ue=_e||Ce,$e=a.jb*a.Jb>=2764800,Be=Ls(u);if(Be&&m.set("vqos.resControl.cpmRtc.featureMask","3"),L&&(m.set("bwe.iirFilterFactor","8"),m.set("video.encoderFeatureSetting","47"),m.set("video.encoderPreset","6"),m.set("vqos.resControl.cpmRtc.badNwSkipFramesCount"," 600"),m.set("vqos.resControl.cpmRtc.decodeTimeThresholdMs","9"),Y?(m.set("video.fbcDynamicFpsGrabTimeoutMs","6"),m.set("vqos.resControl.cpmRtc.serverResolutionUpdateCoolDownCount","6000")):oe&&(m.set("video.fbcDynamicFpsGrabTimeoutMs","18"),m.set("vqos.resControl.cpmRtc.serverResolutionUpdateCoolDownCount","12000"),m.set("video.enableNextCaptureMode","1"),m.set("vqos.maxStreamFpsEstimate","240"),m.set("video.videoSplitEncodeStripsPerFrame","3"),m.set("video.updateSplitEncodeStateDynamically","1"))),(Ue||a.tk>=42e3)&&(m.set("packetPacing.numGroups",Y?"3":"5"),m.set("packetPacing.maxDelayUs","1000"),m.set("packetPacing.minNumPacketsFrame","10"),m.set("video.rtpNackQueueLength","1024"),m.set("video.rtpNackQueueMaxPackets","512"),m.set("video.rtpNackMaxPacketCount","25"),m.set("vqos.drc.qpMaxResThresholdAdj","4"),m.set("vqos.grc.qpMaxResThresholdAdj","4"),m.set("vqos.drc.iirFilterFactor","100"),Ue&&(m.set("vqos.resControl.qp.qpg.featureSetting","4"),m.set("video.videoSplitEncodeStripsPerFrame","3"),m.set("video.updateSplitEncodeStateDynamically","1")),Ce&&(m.set("video.encoderPreset","6"),m.set("vqos.drc.add1440pResLevelFor4kDrcTable","1"),m.set("vqos.drc.minAdaptiveQpThreshold","40"),m.set("vqos.grc.minAdaptiveQpThreshold","40"),m.set("vqos.drc.upperQpThreshold","40"),m.set("vqos.grc.upperQpThreshold","40"),m.set("vqos.drc.qpMaxResThresholdAdj","5"),m.set("vqos.grc.qpMaxResThresholdAdj","5"),m.set("vqos.drc.iirFilterFactor","100"),m.set("vqos.fec.repairMinPercent","0"))),"AV1"===D&&function(kt,_n,An){var tn,Dn,Bn,Mn,ci,li,mi,Vi,Xi,Ii,rr,Li,Or,eo,ao;kt.set("vqos.qpg.maxMinQpPercent","40"),kt.set("vqos.drc.minQpHeadroom","20"),kt.set("vqos.drc.lowerQpThreshold","100"),kt.set("vqos.drc.upperQpThreshold","200"),kt.set("vqos.drc.minAdaptiveQpThreshold","180");let Tr=Number(null!==(tn=kt.get("vqos.drc.qpMaxResThresholdAdj"))&&void 0!==tn?tn:"0");kt.set("vqos.drc.qpMaxResThresholdAdj",(5*Tr).toString()),kt.set("vqos.drc.qpCodecThresholdAdj","0"),kt.set("vqos.dfc.minQpHeadroom",null!==(Dn=kt.get("vqos.drc.minQpHeadroom"))&&void 0!==Dn?Dn:"0"),kt.set("vqos.dfc.qpLowerLimit",null!==(Bn=kt.get("vqos.drc.lowerQpThreshold"))&&void 0!==Bn?Bn:"0"),kt.set("vqos.dfc.qpMaxUpperLimit",null!==(Mn=kt.get("vqos.drc.upperQpThreshold"))&&void 0!==Mn?Mn:"0"),kt.set("vqos.dfc.qpMinUpperLimit",null!==(ci=kt.get("vqos.drc.minAdaptiveQpThreshold"))&&void 0!==ci?ci:"0"),kt.set("vqos.dfc.qpMaxResThresholdAdj",null!==(li=kt.get("vqos.drc.qpMaxResThresholdAdj"))&&void 0!==li?li:"0"),kt.set("vqos.dfc.qpCodecThresholdAdj",null!==(mi=kt.get("vqos.drc.qpCodecThresholdAdj"))&&void 0!==mi?mi:"0"),_n&&(kt.set("vqos.drc.minAdaptiveQpThreshold",null!==(Vi=kt.get("vqos.drc.upperQpThreshold"))&&void 0!==Vi?Vi:"0"),kt.set("vqos.dfc.qpMinUpperLimit",null!==(Xi=kt.get("vqos.dfc.qpMaxUpperLimit"))&&void 0!==Xi?Xi:"0")),kt.set("vqos.grc.minQpHeadroom",null!==(Ii=kt.get("vqos.drc.minQpHeadroom"))&&void 0!==Ii?Ii:"0"),kt.set("vqos.grc.lowerQpThreshold",null!==(rr=kt.get("vqos.drc.lowerQpThreshold"))&&void 0!==rr?rr:"0"),kt.set("vqos.grc.upperQpThreshold",null!==(Li=kt.get("vqos.drc.upperQpThreshold"))&&void 0!==Li?Li:"0"),kt.set("vqos.grc.minAdaptiveQpThreshold",null!==(Or=kt.get("vqos.drc.minAdaptiveQpThreshold"))&&void 0!==Or?Or:"0"),kt.set("vqos.grc.qpMaxResThresholdAdj",null!==(eo=kt.get("vqos.drc.qpMaxResThresholdAdj"))&&void 0!==eo?eo:"0"),kt.set("vqos.grc.qpCodecThresholdAdj",null!==(ao=kt.get("vqos.drc.qpCodecThresholdAdj"))&&void 0!==ao?ao:"0"),An&&(kt.set("video.videoSplitEncodeStripsPerFrame","63"),kt.set("video.enableAv1RcPrecisionFactor","1")),kt.set("video.minQp","25")}(m,Ce,$e),m.set("video.clientViewportWd",a.jb.toString()),m.set("video.clientViewportHt",a.Jb.toString()),m.set("video.maxFPS",a.Zb.toString()),m.set("video.initialBitrateKbps",a.ik.toString()),m.set("video.initialPeakBitrateKbps",a.sk.toString()),m.set("vqos.bw.maximumBitrateKbps",a.tk.toString()),m.set("vqos.bw.minimumBitrateKbps",a.nk.toString()),m.set("video.maxNumReferenceFrames","4"),m.set("video.mapRtpTimestampsToFrames",a.ek?"1":"0"),Hn()&&(m.set("vqos.drc.stepDownMinHeight","480"),!In(u,14,5))){const kt=a.jb/a.Jb*100;m.set("vqos.drc.stepDownResolutionAlignment","16"),m.set("vqos.drc.stepDownTargetAspectRatioX100",kt.toFixed(0))}!function(kt,_n,An,tn){if((_n||2===tn)&&(1!==tn&&(kt.set("vqos.drc.enable","0"),kt.set("vqos.dfc.enable","1")),kt.set("vqos.dfc.decodeFpsAdjPercent","85"),kt.set("vqos.dfc.targetDownCooldownMs","250"),kt.set("vqos.dfc.dfcAlgoVersion","1"),kt.set("vqos.dfc.minTargetFps","60"),An&&kt.set("vqos.cpm.flags","1"),kt.set("vqos.resControl.dfc.useClientFpsPerf","0")),void 0!==tn)switch(tn){case 3:is(kt,!0,_n);break;case 2:is(kt,!0,!0);break;case 1:is(kt,!0,!1);break;case 0:is(kt,!1,_n)}}(m,L,Be,a.dynamicStreamingMode);let at=mt(u)?2:3,At=0,dt=8;if("H265"===D||"AV1"===D){const kt=or();null!==(S=null==kt?void 0:kt.features.hdr)&&void 0!==S&&S&&1===a.hk?(at=4,At=a.hk,dt=Math.max(10,Math.min((null==kt?void 0:kt.features.bitDepth)||10,a.bitDepth))):dt=Math.max(8,Math.min((null==kt?void 0:kt.features.sdrBitDepth)||8,a.bitDepth))}10===dt&&"H265"===D&&m.set("video.minQp","14"),m.set("video.encoderCscMode",at.toString()),m.set("video.dynamicRangeMode",At.toString()),m.set("video.bitDepth",dt.toString())}function is(m,a,u){m.set(u?"vqos.dfc.adjustResAndFps":"vqos.drc.enable",a?"1":"0")}function sr(m,a){var u,S,D,L;m.set("ri.partialReliableThresholdMs",null!==(u=a.attributes.get("ri.partialReliableThresholdMs"))&&void 0!==u?u:"0"),m.set("ri.hidDeviceMask",null!==(S=a.attributes.get("ri.hidDeviceMask"))&&void 0!==S?S:"0"),m.set("ri.enablePartiallyReliableTransferGamepad",null!==(D=a.attributes.get("ri.enablePartiallyReliableTransferGamepad"))&&void 0!==D?D:"0xff"),m.set("ri.enablePartiallyReliableTransferHid",null!==(L=a.attributes.get("ri.enablePartiallyReliableTransferHid"))&&void 0!==L?L:"0xffffffffffffffff")}function ha(m,a,u){var S;return void 0===a?m.dk:null===(S=m.media.filter(D=>D.ck===a)[null!=u?u:0])||void 0===S?void 0:S.attributes}function Dl(m,a){let u=`v=0\no=${m.origin}\ns=-\nt=${m.time}\n`;const S=(D,L)=>{for(const[Y,oe]of D)oe!==L.get(Y)&&(u+=`a=${Y}:${oe}\n`)};S(m.dk,a.dk);for(const D of m.media){u+=`m=${D.ck} 0 RTP/AVP\n`,u+=`a=msid:${D.lk}\n`;const L=a.media.find(Y=>Y.lk===D.lk);S(D.attributes,L.attributes)}return u}function Na(m){switch(m){case s.SdrHdrMode.SDR:return 0;case s.SdrHdrMode.HDR:return 1;case s.SdrHdrMode.EDR:return s.Log.w("{eb7c2d0}","{30c875c}"),0;default:return s.Log.w("{eb7c2d0}","{7cd5754}",m),0}}class ho{constructor(){this.uk=0,this.Ak=0,this.vk=0,this.fk=0}update(a,u){if(0==this.uk&&0==this.vk)return this.uk=a,void(this.vk=u);this.fk=u,this.Ak=a}pk(){const a=this.fk-this.vk;return 0!=a?(this.Ak-this.uk)/a:0}reset(){this.uk=this.Ak,this.vk=this.fk}}class La{constructor(a,u,S){this.Rs=u,this.mk=S,this.fps=0,this.gk=0,this.wk=4,this.Sk=0,this.bk=0,this.kk=0,this.yk=0,this.Ik=0,this.Ck=0,this.rtd=0,this.Tk=0,this.streamingResolution={width:0,height:0},this.Ek=0,this.Mk=0,this.Pk={count:0,max:0,value:0},this.Dk={count:0,max:0,value:0},this.Rk=new ho,this.Nk=0,this.xk=0,this.Ok=0,this.codec="UNKNOWN",this.hdr=!1,this.Bk=!1,this.Fk=!1,this.bitDepth=8,this.Uk=!1,this.Lk="",this.markers=0,this.Gk={qualityScore:0,bandwidthScore:0,networkLossScore:0,latencyScore:0};const D=this.Hk();a.insertAdjacentElement("afterend",D),this.Vk=D,this.Wk={_k:!1,qk:!1,km:!1,ng:!1,$k:0,$w:!1,keyboardLayout:"",appLaunchMode:0,inputMode:""},this.saScores={gpuPerfScore:-1,serverPerfScore:-1,visualScore:-1,decoderScore:-1,downlinkLag:-1,downlinkCongestion:-1,uplink:-1,overall:-1}}zk(a,u){var S,D,L,Y;const oe=null!==(S=a.bytesReceived)&&void 0!==S?S:0,_e=null!==(D=u.bytesReceived)&&void 0!==D?D:0,Ce=null!==(L=a.timestamp)&&void 0!==L?L:0,Ue=null!==(Y=u.timestamp)&&void 0!==Y?Y:0;Ce!=Ue&&(this.gk=(oe-_e)/(125*(Ce-Ue)))}Kk(a){return a&&this.gk<=a&&(this.wk=this.gk/a*100),this.Sk=a,this.wk}Qk(a){if(a.frameWidth&&a.frameHeight&&(this.streamingResolution={width:a.frameWidth,height:a.frameHeight}),a.framesDecoded){const u=this.bk,S=a.timestamp;u!==S&&(this.fps=Math.floor((a.framesDecoded-this.kk)/(S-u)*1e3)),this.kk=a.framesDecoded,a.totalDecodeTime&&(this.Rk.update(a.totalDecodeTime,a.framesDecoded),this.Nk=1e3*a.totalDecodeTime/a.framesDecoded)}a.framesReceived&&(this.yk=a.framesReceived,a.totalInterFrameDelay)&&(this.Ek=1e3*a.totalInterFrameDelay/(a.framesReceived-1)),a.framesDropped&&(this.Ik=a.framesDropped),a.packetsLost&&(this.Tk=a.packetsLost),a.pliCount&&(this.xk=a.pliCount),this.bk=a.timestamp}Xk(a){this.Gk=a}Yk(a){this.rtd=a}jk(a){this.Ck=a}Jk(a){this.avgGameFps=a}Zk(a){this.saScores=a}ty(){return{fps:this.fps,Nk:this.Nk,avgDecodeTime:1e3*this.Rk.pk(),iy:this.Sk,wk:this.wk,width:this.streamingResolution.width,height:this.streamingResolution.height}}sy(){return this.kk}ey(a){const u=(1e3*this.Rk.pk()).toFixed(2);s.Log.i("{4155ac9}","{9a6628a}",a,this.kk,u,this.Ik,this.Ck.toFixed(2),this.xk,this.rtd,this.gk.toFixed(2),this.wk.toFixed(2))}ny(){var a;const u={avgGameFps:null!==(a=this.avgGameFps)&&void 0!==a?a:0,fps:this.fps,rtd:this.rtd,avgDecodeTime:1e3*this.Rk.pk(),frameLoss:this.xk-this.Ok,packetLoss:this.Tk,totalBandwidth:this.Sk,currentBitrateMbps:this.gk,utilizedBandwidth:this.wk,streamingResolution:this.streamingResolution,codec:this.codec,bitDepth:this.bitDepth,sdrHdrMode:this.hdr?s.SdrHdrMode.HDR:s.SdrHdrMode.SDR,hdr10PlusGaming:this.hdr&&this.Fk&&this.Bk};return this.Ok=this.xk,u}hy(a){this.oy(a),this.Pk={value:0,count:0,max:0},this.Dk={value:0,count:0,max:0},this.Rk.reset()}oy(a){this.Vk.innerText=this.ly(a)}uy(a){this.Vk.style.display=a?"block":"none"}Hk(){const a=document.createElement("div");return a.style.display="none",a.style.position="fixed",Vt(this.Rs)?(a.style.top="env(safe-area-inset-top, 0)",a.style.left="max(24px, env(safe-area-inset-left, 0))"):(a.style.top="0",a.style.left="0"),a.style.padding="0.5em",a.style.backgroundColor="rgba(0,0,0,0.5)",a.style.zIndex="300",a.style.fontSize="12px",a.style.fontFamily="monospace",a.style.color="white",a.style.whiteSpace="pre",a.style.lineHeight="100%",a.style.pointerEvents="none",a}Ay(a){this.Pk.value+=a,this.Pk.count+=1,this.Pk.max=Math.max(a,this.Pk.max)}vy(a){this.Dk.value+=a,this.Dk.count+=1,this.Dk.max=Math.max(a,this.Dk.max)}py(a){this.Mk=Math.max(a,this.Mk)}my(a){this.Wk=a}gy(a){this.codec=a}wy(){return this.codec}Sy(a){const u=a!==this.hdr;return this.hdr=a,u}by(){return this.hdr}ky(a,u){return(this.Bk!==a||this.Fk!==u)&&(s.Log.i("{4155ac9}","{417fbf6}",ds(a),ds(u)),this.Bk=a,this.Fk=u,!0)}yy(a){this.bitDepth=a}Iy(){return this.bitDepth}Cy(){this.markers++}Ty(a){this.Uk=a}Ey(a){this.Lk=a}ly(a){const u=`Seat: ${this.mk.zoneName} (${this.mk.My}) / ${this.mk.gpuType}\n`;let S=`Game: CMS ${this.mk.appId}`;void 0!==this.avgGameFps&&(S+=` / fps ${this.avgGameFps.toFixed()}`),S+="\n";let D=u+S+`Stream: Current ${nt(this.streamingResolution)}@${this.fps} / Default: ${this.mk.streamInfo.width}x${this.mk.streamInfo.height}@${this.mk.streamInfo.fps} / Codec ${this.codec}${this.Py()} ${this.bitDepth} bpc\nNetwork: RTD ${this.rtd}ms / FL ${this.xk} / PL ${this.Tk} / J ${this.Ck.toFixed(2)}ms / Bitrate ${this.gk.toFixed(2)}Mbps / BWU ${this.wk.toFixed(2)}%\nQOS: frame ${this.kk} / FT ${this.Ek.toFixed(2)} / D ${(1e3*this.Rk.pk()).toFixed(2)} / Q ${Math.floor(this.Gk.qualityScore)} / Marker ${this.markers}\nClient: ${this.Rs.os} ${this.mk.clientAppVersion} ${this.mk.clientLocale} Resolution ${nt({width:window.innerWidth*window.devicePixelRatio,height:window.innerHeight*window.devicePixelRatio})}\nInput ${this.Wk.inputMode}\nSA: dec ${this.saScores.decoderScore.toFixed(2)} / lag ${this.saScores.downlinkLag.toFixed(2)} / cong ${this.saScores.downlinkCongestion.toFixed(2)} / up ${this.saScores.uplink.toFixed(2)} / gpu ${this.saScores.gpuPerfScore.toFixed(2)} / srv ${this.saScores.serverPerfScore.toFixed(2)} / vis ${this.saScores.visualScore.toFixed(2)} / ovr ${this.saScores.overall.toFixed(2)}\n`;const L=`DC ${Fa(this.Pk)}ms (${Bs(this.Pk)}ms) / Blocked ${this.Mk}\n`,Y=`Stats ${Fa(this.Dk)}ms (${Bs(this.Dk)}ms) / FR ${this.yk} / FDR ${this.Ik}\n`,oe=`Latency ${this.Gk.latencyScore.toFixed(1)} / Network ${this.Gk.networkLossScore.toFixed(1)} / Bandwidth ${this.Gk.bandwidthScore.toFixed(1)}\n`,_e=`VP ${ds(this.Wk._k)} / AP ${ds(this.Wk.qk)} / UI ${ds(this.Wk.km)} / VKB ${ds(this.Wk.ng)} / MS ${this.Wk.$k} / RSDMM ${+this.Wk.$w}\n`,Ce=`KBL ${this.Wk.keyboardLayout} / ALM ${+this.Wk.appLaunchMode} / SWD ${ds(this.Uk)} / ${this.Lk}`;return a&&(D+=L+Y+oe+_e+Ce),D}Py(){return this.hdr?this.Fk?` HDR10+G (${this.Bk?"C":"_"}${this.Fk?"S":"_"})`:" HDR":""}uninitialize(){this.Vk.remove()}}function Fa(m){let a=0;return m.count>0&&(a=m.value/m.count),a.toFixed(2)}function Bs(m){return m.max.toFixed(2)}function ds(m){return m?"y":"n"}class gl{constructor(a,u,S,D=120){this.ur=a,this.Dy=u,this.index=S,this.Ry=D,this.Ny=0,this.xy=0,this.Oy=0,this.By=0,this.Fy=0,this.framesDecoded=0,this.pliCount=0,this.Uy=0,this.framesDropped=0,this.Ly=0,this.Gy=new Array,this.Hy=-1}Vy(a){return void 0!==a?a-this.ur.bd():0}qa(){return this.ur._a()}Wy(a){const u=new ArrayBuffer(88),S=new DataView(u);S.setFloat64(0,It(a.audioLevel),!0),Di(It(a.concealedSamples),S,8,!0),Di(It(a.concealmentEvents),S,16,!0),Di(It(a.insertedSamplesForDeceleration),S,24,!0),S.setFloat64(32,It(a.jitterBufferDelay),!0),Di(It(a.jitterBufferEmittedCount),S,40,!0),Di(It(a.removedSamplesForAcceleration),S,48,!0),Di(It(a.silentConcealedSamples),S,56,!0),S.setFloat64(64,It(a.totalSamplesReceived),!0),S.setFloat64(72,It(a.totalSamplesDuration),!0),S.setFloat64(80,this.qa(),!0),this.Dy._y([u],4)}sendVideoTrack(a){const u=It(a.framesDropped);u>=this.Ly&&(this.framesDropped=u-this.Ly,this.Ly=u);const S=new ArrayBuffer(44),D=new DataView(S);D.setUint32(0,It(a.framesDecoded),!0),D.setUint32(4,u,!0),D.setUint32(8,It(a.frameHeight),!0),D.setUint32(12,It(a.frameWidth),!0),D.setUint32(16,It(a.framesReceived),!0),D.setFloat64(20,It(a.jitterBufferDelay),!0),Di(It(a.jitterBufferEmittedCount),D,28,!0),D.setFloat64(36,this.qa(),!0),this.Dy._y([S],3)}qy(a){"audio"===a.kind?(this.$y(a),this.Wy(a)):(this.zy(a),this.sendVideoTrack(a),this.Ky(a))}$y(a){const u=new ArrayBuffer(48),S=new DataView(u);Di(It(a.packetsReceived),S,0,!0),Di(It(a.bytesReceived),S,8,!0),Di(It(a.packetsLost),S,16,!0),S.setFloat64(24,It(a.lastPacketReceivedTimestamp),!0),S.setFloat64(32,It(a.jitter),!0),S.setFloat64(40,this.qa(),!0),this.Dy._y([u],2)}Qy(){return this.Ny}Xy(){return Math.round(this.xy)}Yy(){return this.framesDecoded}jy(){return this.pliCount}Jy(){return this.framesDropped}Zy(a,u,S,D){a>=this.Oy&&(this.Ny=a-this.Oy,this.Oy=a),D>=this.Uy&&(this.pliCount=D-this.Uy,this.Uy=D),this.framesDecoded=u-this.By,this.framesDecoded>0&&S>this.Fy&&(this.xy=1e3*(S-this.Fy)/this.framesDecoded,this.By=u,this.Fy=S)}zy(a){const u=It(a.packetsLost),S=It(a.framesDecoded),D=It(a.totalDecodeTime),L=It(a.pliCount);this.Zy(u,S,D,L);const Y=new ArrayBuffer(80),oe=new DataView(Y);oe.setUint32(0,S,!0),oe.setUint32(4,It(a.keyFramesDecoded),!0),oe.setUint32(8,It(a.nackCount),!0),oe.setInt32(12,u,!0),oe.setInt32(16,L,!0),Di(It(a.bytesReceived),oe,20,!0),Di(It(a.packetsReceived),oe,28,!0),oe.setFloat64(36,D,!0),oe.setFloat64(44,It(a.totalInterFrameDelay),!0),oe.setFloat64(52,It(a.totalSquaredInterFrameDelay),!0),oe.setFloat64(60,It(a.totalAssemblyTime),!0),oe.setUint32(68,It(a.framesAssembledFromMultiplePackets),!0),oe.setFloat64(72,this.qa(),!0),this.Dy._y([Y],1)}Ky(a){if(a.perFrameEntries){const u=JSON.parse(a.perFrameEntries),S=[];let D=this.Hy;for(let L=0;Lthis.Hy){const Y=new ArrayBuffer(20),oe=new DataView(Y);oe.setUint32(0,u[L].frameNumber,!0),oe.setFloat64(4,u[L].decodeTime,!0),oe.setFloat64(12,u[L].assemblyTime,!0),S.push(Y)}D=Math.max(D,u[L].frameNumber)}this.Hy=D,S.length>0&&this.Dy._y(S,6)}}tI(a){const u=a.timingFrameInfo.split(",",15);if(u.length<15)return;const S=new ArrayBuffer(70),D=new DataView(S);D.setUint32(0,It(a.targetDelayMs),!0),D.setUint32(4,It(a.minPlayoutDelayMs),!0),D.setUint32(8,It(a.currentDelayMs),!0),D.setFloat64(12,this.qa(),!0),D.setFloat64(20,It(parseFloat(u[3])),!0),D.setFloat64(28,It(parseFloat(u[4])),!0),D.setFloat64(36,It(parseFloat(u[8])),!0),D.setFloat64(44,It(parseFloat(u[9])),!0),D.setFloat64(52,It(parseFloat(u[10])),!0),D.setFloat64(60,It(parseFloat(u[11])),!0),D.setUint8(68,It(parseFloat(u[13]))),D.setUint8(69,It(parseFloat(u[14]))),this.Dy._y([S],0)}iI(a){var u,S,D;const L=null!==(u=a.receiveTime)&&void 0!==u?u:0,Y=a.presentationTime-L,oe=1e3*(null!==(S=a.processingDuration)&&void 0!==S?S:0),_e=this.Vy(a.presentationTime),Ce=new ArrayBuffer(16),Ue=new DataView(Ce);Ue.setFloat64(0,_e,!0),Ue.setUint16(8,Math.min(100*Y,65535),!0),Ue.setUint16(10,Math.min(100*oe,65535),!0),Ue.setUint32(12,null!==(D=a.rtpTimestamp)&&void 0!==D?D:0,!0),this.Gy.push(Ce),this.Gy.length==this.Ry&&this.sI()}sI(){this.Gy.length>0&&(this.Dy._y(this.Gy,5),this.Gy=[])}}function It(m){return m||0}class Ys{constructor(a){this.active=!1,this.eI=.06,this.nI=new DOMRect(0,0,0,0),this.hI=[],this.oI=[],this.af=a,this._f=this.onmousedown.bind(this)}setActive(a){this.active!==a&&(this.active=a,a?(s.Log.i("{0c7ed7c}","{b56e30d}"),this.af.dispatchEvent(new Event("focus",{bubbles:!0})),this.af.addEventListener("pointerdown",this._f),this.af.addEventListener("mousedown",this._f)):(s.Log.i("{0c7ed7c}","{00425c2}"),this.af.removeEventListener("pointerdown",this._f),this.af.removeEventListener("mousedown",this._f),this.hI=[],this.oI=[]))}isActive(){return this.active}rI(a){a<=0||a>=1?s.Log.e("{0c7ed7c}","{1cbd879}",a.toFixed(2)):this.eI=a}aI(){return this.eI}dI(a){a.width<=0||a.height<=0?s.Log.e("{0c7ed7c}","{3e0eb8f}",a.width,a.height):this.nI=a}cI(){return this.nI}lI(a){this.uI=a}AI(a,u){this.hI.push({presentedFrames:u.presentedFrames,vI:a,presentationTime:u.presentationTime,receiveTime:u.receiveTime,processingDuration:u.processingDuration});const S=this.fI(this.nI);Ys.pI(this.af,S.x,S.y,S.width,S.height).then(D=>this.mI(D,u.presentedFrames))}onmousedown(a){if(this.hI.length){if(!(this.oI.length&&a.timeStamp-this.oI[this.oI.length-1].gI<100))for(this.oI.push({gI:a.timeStamp,wI:performance.now()});this.oI.length>32;)this.oI.shift()}else s.Log.w("{0c7ed7c}","{fe08a50}")}static pI(a,u,S,D,L){return new Promise((Y,oe)=>{window.setTimeout(()=>{const _e=Ys.SI(a,u,S,D,L);-1===_e&&oe(-1),Y(_e)},0)})}static SI(a,u,S,D,L){if(D<=0||L<=0)return-1;const Y=new OffscreenCanvas(D,L).getContext("2d");if(!Y)return s.Log.e("{0c7ed7c}","{b72639c}"),-1;let oe;try{Y.drawImage(a,u,S,D,L,0,0,D,L),oe=Y.getImageData(0,0,D,L).data}catch(Ue){return s.Log.e("{0c7ed7c}","{b16b792}",Ue),-1}let _e=0,Ce=0;for(let Ue=0;Ue32;)this.hI.shift();if(1==this.hI.length)return;const L=this.hI[this.hI.length-2];if(!(L.presentedFramesthis.eI){let Y,oe=0;const _e={presentedFrames:u,vI:D.vI,presentationTime:D.presentationTime,receiveTime:D.receiveTime,processingDuration:D.processingDuration,gI:0,wI:0};for(;this.oI.length&&this.oI[0].gI<(null!==(S=D.receiveTime)&&void 0!==S?S:D.presentationTime);)oe++,Y=this.oI.shift();if(!Y)return;oe>1&&s.Log.d("{0c7ed7c}","{a4b8c55}",u,oe),_e.gI=Y.gI,_e.wI=Y.wI,this.uI&&this.uI(_e)}}kI(){const a=this.fI(this.nI);return!(a.x<0||a.y<0||a.x+a.width>this.af.videoWidth||a.y+a.height>this.af.videoHeight)}fI(a){const u=this.af.videoWidth,S=this.af.videoHeight;return new DOMRect(a.x*u,a.y*S,a.width*u,a.height*S)}yI(){const a={isPrimary:!0,pointerId:1,button:0};this.af.dispatchEvent(new PointerEvent("pointerdown",a)),this.af.dispatchEvent(new MouseEvent("mousedown")),window.setTimeout(()=>{this.af.dispatchEvent(new PointerEvent("pointerup",a)),this.af.dispatchEvent(new MouseEvent("mouseup"))},100)}}const ia="Show hotkeys";class Yi{constructor(a,u){this.lf=u,this.visible=!1,this.II=[],this.CI=!1,this.TI=0,this.EI=0,this.MI={x:0,y:0},this.DI=0,this.af=a,this.controller=new Ys(a),this.pp=this.onfullscreenchange.bind(this),this.RI=this.onmousedown.bind(this),this.NI=this.onmousemove.bind(this),this.xI=this.OI(),this.BI=this.FI(),this.UI=this.LI(),this.GI=this.HI(),this.VI=this.createNotification(),a.insertAdjacentElement("afterend",this.xI),this.xI.insertAdjacentElement("afterend",this.BI),this.BI.insertAdjacentElement("afterend",this.UI),this.xI.insertAdjacentElement("beforebegin",this.GI),this.GI.insertAdjacentElement("beforebegin",this.VI),this.controller.lI(this.uI.bind(this)),this.WI(!1),this._I(!1),this.qI(!0)}stop(){this.xI.remove(),this.BI.remove(),this.UI.remove(),this.GI.remove(),this.VI.remove(),this.$I(!1),this.II=[]}reset(){this.setActive(!1),this.zI(this.KI,.06),this.zI(this.QI,20),this.zI(this.XI,1e3),this.WI(!1),this._I(!1),this.qI(!0),this.YI(!1),this.jI.value="",this.JI.value="",this.II=[]}Tw(){this.$I(!this.isVisible())}$I(a){if(a!==this.visible){s.Log.i("{50c79eb}","{5595c14}",a),this.visible=a;for(const L of[this.xI,this.BI,this.GI])L===this.GI&&a?this.YI(this.ZI.value!==ia):L.style.display=a?"block":"none";const u=yn(),S=u?"pointerdown":"mousedown",D=u?"pointermove":"mousemove";if(a){this.tC(),this.iC(this.BI,this.sC),this.KI.oninput=Y=>{const oe=parseFloat(Y.target.value);this.controller.rI(oe),this.eC.innerHTML=this.nC(oe)},this.hC.oninput=Y=>{this.WI(Y.target.checked)},this.QI.oninput=Y=>{this.oC.innerHTML=Y.target.value},this.XI.oninput=Y=>{this.rC.innerHTML=this.aC(Y.target.value)},this.dC.oninput=Y=>{this._I(Y.target.checked)};const L=(Y,oe)=>{const _e=parseInt(Y.target.value);oe.value=Math.max(Math.min(_e,100),0).toFixed(0),this.cC()};this.jI.oninput=Y=>L(Y,this.jI),this.JI.oninput=Y=>L(Y,this.JI),this.lC.onclick=Y=>this.setActive("Start"===this.lC.value),this.ZI.onclick=Y=>this.YI(this.ZI.value===ia),this.BI.onmouseup=this.tC.bind(this),this.BI.onmousedown=Y=>{this.isActive()&&this.controller.yI()},this.lf.Lp(2,this.pp),this.af.addEventListener(S,this.RI),this.af.addEventListener(D,this.NI)}else this.setActive(!1),this.KI.oninput=null,this.hC.oninput=null,this.QI.oninput=null,this.XI.oninput=null,this.dC.oninput=null,this.jI.oninput=null,this.JI.oninput=null,this.lC.onclick=null,this.ZI.onclick=null,this.BI.onmouseup=null,this.BI.onmousedown=null,this.sC.onmousedown=null,this.lf._p(2,this.pp),this.af.removeEventListener(S,this.RI),this.af.removeEventListener(D,this.NI)}}isVisible(){return this.visible}toggle(){this.setActive(!this.isActive())}setActive(a){if(!a||this.controller.kI())if(a&&this.CI)s.Log.e("{50c79eb}","{89742e9}");else if(this.controller.setActive(a),this.qI(),a){if(this.lC.value="Stop",this.uC()){s.Log.i("{50c79eb}","{5974b2c}"),this.CI=!0,this.EI=parseInt(this.QI.value);const u=parseInt(this.XI.value);this.TI=window.setInterval(()=>this.AC(),u)}}else this.lC.value="Start",this.CI&&(this.TI?(s.Log.i("{50c79eb}","{d340c50}"),this.vC()):s.Log.w("{50c79eb}","{6d8948b}")),this.fC(),this.pC();else this.mC()}isActive(){return this.controller.isActive()}pf(){return!this.isVisible()||this.isActive()}Bw(){this.WI(!this.uC())}gC(a){var u;const S=null!==(u=a.processingDuration)&&void 0!==u?u:0;return{wC:a.wI-a.gI,SC:a.receiveTime?a.receiveTime-a.wI:0,bC:a.receiveTime&&a.processingDuration?a.presentationTime-a.processingDuration-a.receiveTime:0,decode:S,kC:a.vI-a.presentationTime,total:a.vI-a.gI}}uC(){return this.hC.checked}Fw(){if(!this.II.length)return void s.Log.w("{50c79eb}","{2884507}");const a=`LDAT_${(new Date).toISOString()}.csv`,u=[["Sample #","Total","Render","Decode","Begin","Server + Rtd + Receive","Input Callback"].join(",")];for(let S=0;S{const Y=document.createElement("input");return Y.type="number",Y.min="0",Y.max="100",Y.step="1",Y.placeholder="Int",Y.style.width="40px",Y};return this.jI=L(),this.JI=L(),a.appendChild(u),a.appendChild(S),a.appendChild(this.jI),a.appendChild(this.MC("%")),a.appendChild(D),a.appendChild(this.JI),a.appendChild(this.MC("%")),a}FI(){const a=this.IC(),u=this.CC("Loupe");return this.sC=document.createElement("div"),this.sC.style.cursor="move",this.sC.style.width="100%",this.sC.style.height="100%",this.sC.innerHTML="Click here to drag the loupe to the area of the screen where flashes will occur. Then, press start.",a.appendChild(u),a.appendChild(this.sC),a}yC(a,u){const S=this.af.getBoundingClientRect(),D=this.BI.getBoundingClientRect(),{paddingTop:L,paddingRight:Y,paddingBottom:oe,paddingLeft:_e}=this.OC(this.af),Be=S.left+_e+(S.width-_e-Y)*a-D.width*a;this.BI.style.top=(S.top+L+(S.height-L-oe)*u-D.height*u).toString()+"px",this.BI.style.left=Be.toString()+"px",this.tC()}cC(){const a=u=>parseInt(u||"50")/100;this.yC(a(this.jI.value),a(this.JI.value))}qI(a=!1){a&&(this.BI.style.bottom="5px",this.BI.style.left="300px",this.BI.style.top="",this.BI.style.right="",this.BI.style.width="150px",this.BI.style.height="150px"),this.isActive()?(this.sC.style.display="none",this.BI.style.border="2px rgb(76, 175, 80) solid",this.BI.style.backgroundColor="transparent"):(this.sC.style.display="block",this.BI.style.border="none",this.BI.style.backgroundColor="rgb(105, 105, 105, 0.7)")}_I(a){this.dC.checked=a}onmousedown(a){if(this.dC.checked&&this.isActive()&&!a.BC){const S=(oe,_e)=>{switch(oe){case 0:this.af.dispatchEvent(new PointerEvent("pointerup",_e)),this.af.dispatchEvent(new MouseEvent("mouseup",_e));break;case 1:const Ce=new PointerEvent("pointerdown",_e),Ue=new MouseEvent("mousedown",_e);Ce.BC=!0,Ue.BC=!0,this.af.dispatchEvent(Ce),this.af.dispatchEvent(Ue);break;case 2:this.af.dispatchEvent(new PointerEvent("pointerrawupdate",_e)),this.af.dispatchEvent(new PointerEvent("pointermove",_e)),this.af.dispatchEvent(new MouseEvent("mousemove",_e))}},D={button:2,isPrimary:!0,pointerId:1},L={clientX:(Math.max(a.clientX,0)||this.MI.x)+64,clientY:Math.max(a.clientY,0)||this.MI.y,movementX:64,isPrimary:!0};S(1,D);const Y=300;window.setTimeout(()=>{S(2,L),window.setTimeout(()=>{L.clientX-=64,L.movementX=-64,S(2,L),window.setTimeout(()=>S(0,D),Y)},Y)},Y)}}onmousemove(a){this.MI={x:a.clientX,y:a.clientY}}LI(){const a=this.IC();return a.style.position="relative",a.style.backgroundColor="gray",a.style.textAlign="center",a.innerHTML="Warning: Must place loupe over video element to activate the LDAT. Please reposition the loupe and then click start.",a}HI(){const a=this.IC(),u=this.CC("LDAT Hot Keys"),S=document.createElement("ul");a.style.bottom="195px",a.style.left="0px",a.style.margin="5px",S.style.listStyle="none",S.style.paddingLeft="2px",S.style.margin="5px";for(const D of["Enter - Start/Stop","R - Reset","A - Turn On/Off Auto-Fire Mode","S - Save Log File","C - Center Loupe on Screen"]){const L=document.createElement("li");L.innerHTML=D,S.append(L)}return a.appendChild(u),a.appendChild(S),a}YI(a){a?(this.ZI.value="Hide hotkeys",this.GI.style.display="block"):(this.ZI.value=ia,this.GI.style.display="none")}createNotification(){const a=this.IC();return a.style.bottom="325px",a.style.left="0px",a.style.margin="5px",a}tC(){const a=this.af.getBoundingClientRect(),u=this.BI.getBoundingClientRect();if(this.af.style.paddingTop||this.af.style.paddingRight||this.af.style.paddingBottom||this.af.style.paddingLeft){const{paddingTop:S,paddingRight:D,paddingBottom:L,paddingLeft:Y}=this.OC(this.af);a.x+=Y,a.y+=S,a.width-=Y+D,a.height-=S+L}u.x=(u.x-a.x)/a.width,u.y=(u.y-a.y)/a.height,u.width/=a.width,u.height/=a.height,this.controller.dI(u)}mC(){this.UI.style.display="block",window.setTimeout(()=>this.UI.style.display="none",5e3)}onfullscreenchange(a){this.tC()}fC(){0!==this.DI&&(window.clearTimeout(this.DI),this.DI=0)}pC(){this.VI.innerHTML="",this.VI.style.display="none"}uI(a){this.fC(),this.II.push(a);const u=this.gC(a),S=u.total.toFixed(),D=`Flash occurred at frame ${a.presentedFrames}. Latency: ${S} ms.`;s.Log.i("{50c79eb}","{78905f8}",a.presentedFrames,S),u.wC.toFixed(),u.SC.toFixed(),u.bC.toFixed(),u.decode.toFixed(),u.kC.toFixed(),s.Log.d("{50c79eb}","{d3d4a0c}",S,u.wC.toFixed(),u.SC.toFixed(),u.bC.toFixed(),u.decode.toFixed(),u.kC.toFixed()),this.VI.innerHTML=D,this.VI.style.display="block",this.DI=window.setTimeout(()=>{this.pC(),this.DI=0},5e3)}AC(){this.EI-- >0?this.controller.yI():(s.Log.i("{50c79eb}","{d37e51d}"),this.vC(),this.setActive(!1))}vC(){window.clearInterval(this.TI),this.TI=0,this.CI=!1}iC(a,u){let S=0,D=0,L=0,Y=0;const oe=document.onmouseup,_e=document.onmousemove;u.onmousedown=Ce=>{Ce.preventDefault(),S=Ce.clientX,D=Ce.clientY,document.onmouseup=()=>{document.onmouseup=oe,document.onmousemove=_e},document.onmousemove=Ue=>{Ue.preventDefault(),L=S-Ue.clientX,Y=D-Ue.clientY,S=Ue.clientX,D=Ue.clientY,a.style.top=a.offsetTop-Y+"px",a.style.left=a.offsetLeft-L+"px"}}}nC(a){return(100*a).toFixed()+"%"}aC(a){return a+" ms"}zI(a,u){a.value=u.toString(),a.dispatchEvent(new Event("input"))}OC(a){const u=S=>{if(!S)return 0;const D=S.length;return"%"===S.substring(D-1)?parseInt(S.substring(0,D-1)):"px"===S.substring(D-2)?parseInt(S.substring(0,D-2)):(s.Log.w("{50c79eb}","{3351f27}",S),0)};return{paddingTop:u(a.style.paddingTop),paddingRight:u(a.style.paddingRight),paddingBottom:u(a.style.paddingBottom),paddingLeft:u(a.style.paddingLeft)}}}class Dr{constructor(a){this.Rs=a,this.extraData=new Map,this.FC=65535,this.UC=new Array,this.LC=1,this.saScores={gpuPerfScore:-1,serverPerfScore:-1,visualScore:-1,decoderScore:-1,downlinkLag:-1,downlinkCongestion:-1,uplink:-1,overall:-1}}Zk(a,u,S){this.saScores=a,this.extraData.set("WiFiScanScore",100*u),this.extraData.set("ThrottlingScore",100*S)}GC(a){let u=0;Qt(this.Rs)?u=1:ke(this.Rs)?u=2:ot(this.Rs)&&(u=3),this.extraData.set("Platform",u);const S=this.HC(a);S&&this.extraData.set("AvgTotalCPUUsage",S),this.extraData.set("DecodeType",this.LC);let D={saScores:this.saScores,extraData:this.extraData};s.Log.i("{240ae89}","{d1eda5e}",D.saScores.overall,D.saScores.gpuPerfScore,D.saScores.serverPerfScore,D.saScores.visualScore,D.saScores.decoderScore,D.saScores.downlinkLag,D.saScores.downlinkCongestion,D.saScores.uplink);for(const L of D.extraData.entries())s.Log.i("{240ae89}","{4d3c418}",L[0],L[1]);return D}Yk(a){a&&(this.FC=Math.min(this.FC,a),this.extraData.set("Rtd",this.FC))}VC(a){this.extraData.set("Power",a)}WC(a){this.extraData.set("Display",a)}_C(a,u){this.extraData.set("MaxStreamingWidth",a),this.extraData.set("MaxStreamingHeight",u)}qC(a){this.extraData.set("MaxStreamingFps",a)}HC(a){if(0===this.UC.length||0===a)return 0;let u=0,S=0,D=0;for(const{frameNumber:L,cpuUsage:Y}of this.UC)u+=D*(L-S-1),u+=Y,S=L,D=Y;return a>S&&(u+=D*(a-S)),u/a}$C(a,u){0==a&&(a=1),this.UC.push({frameNumber:a,cpuUsage:u})}zC(a){this.LC=a}}class vl extends Map{constructor(){super([["TCP",0],["MDNS",0],["IPV6",0],["IPV4",0],["UNKNOWN",0]])}}const ra=["transport","inbound-rtp","candidate-pair","local-candidate"];class Ol{constructor(a,u,S,D,L,Y,oe,_e,Ce,Ue,$e,Be){this.Yh=a,this.Kd=u,this.LS=D,this.telemetry=Y,this.Rs=oe,this.mk=_e,this.lf=Ce,this.Zd=Ue,this.ur=$e,this.Dy=Be,this.KC=!0,this.QC=0,this.XC=0,this.YC=[],this.jC="",this.JC=new Map,this.ZC=!1,this.tT=new Map,this.iT=new Map,this.sT=0,this.eT=0,this.nT=0,this.hT=0,this.oT=[],this.rT={width:0,height:0},this.aT={width:0,height:0},this.dT=!1,this.cT=!1,this.lT=!1,this.uT=0,this.AT=0,this.vT=0,this.fT=!1,this.pT=(at,At,dt)=>{var kt,_n,An;const tn=this.YC[at];0===at&&tn.mT.iI(dt),!(null===(kt=this.gT)||void 0===kt)&&kt.isActive()&&0===at&&this.gT.AI(At,dt),tn.ek&&dt.rtpTimestamp&&dt.receiveTime&&(tn.wT={ST:dt.rtpTimestamp,bT:dt.receiveTime-this.ur.bd()}),this.isEnabled()&&tn.pT&&(null===(An=null===(_n=tn.af)||void 0===_n?void 0:_n.requestVideoFrameCallback)||void 0===An||An.call(_n,tn.pT))},this.kT={yT:0,droppedVideoFrames:[],totalVideoFrames:[]},S.length!==L.length&&s.Log.w("{5cea617}","{c443e77}");for(let at=0;at{let S=!1;for(let D of u.values())if("track"===D.type&&(S=!0),this.qT(D.type)){this.iT.has(D.kind)&&(this.iT.set(D.kind,!0),"video"!==D.kind&&this.ck||(this.ck=D.kind));const L=this.tT.get(D.type);L?L.includes(D.id)?s.Log.e("{5cea617}","{76f5968}",D.id):L.push(D.id):this.tT.set(D.type,[D.id])}this.lT=!S,s.Log.i("{5cea617}","{1317761}",this.lT?"yes":"no"),this.ZC=!0,this.$T(u),this.zT(u,a),this.KT(u,a)}).catch(u=>this.QT(u,"init")).finally(()=>this.XT())}UT(){this.YT=this.LS.createDataChannel("stats_channel",{ordered:!1,reliable:!1,maxRetransmits:0}),this.YT.binaryType="arraybuffer",this.Kd.jT(this.YT,{open:()=>{this.uT=1},close:()=>{this.JT(),this.uT=2}}),this.YT.onmessage=a=>{var u=new DataView(a.data);let S=u.getUint8(0);const D=this.YC[0];if(S>=2){const L=u.getFloat64(1,!0)/1e6,Y=1e3*u.getFloat64(9,!0),oe=u.getFloat64(17,!0);if(D.DT.jk(Y),D.DT.Yk(oe),D.OT.Yk(oe),S>=3){const Ce=u.getFloat64(25,!0);if(D.DT.Jk(Ce),S>=4){let Ue=u.getFloat32(33,!0),$e=u.getFloat32(37,!0),Be=u.getFloat32(41,!0),at=u.getFloat32(45,!0),At=u.getFloat32(49,!0),dt=u.getFloat32(53,!0),kt=u.getFloat32(57,!0),_n=u.getFloat32(61,!0),An=u.getFloat32(65,!0),tn=u.getFloat32(69,!0),Dn={gpuPerfScore:$e,serverPerfScore:Be,visualScore:at,decoderScore:At,downlinkLag:dt,downlinkCongestion:kt,uplink:_n,overall:Ue};D.DT.Zk(Dn),D.OT.Zk(Dn,An,tn)}}const _e=D.DT.Kk(L);D.NT.kS(L,_e),D.NT.bS(oe)}else s.Log.e("{5cea617}","{4f9f4b7}",S)}}HT(){var a,u,S,D;this.QC=window.setInterval(()=>{this.ZT()},null!==(a=Mt.So.getStatsInterval)&&void 0!==a?a:96),Je()&&(this.XC=window.setInterval(()=>{this.tE()},null!==(u=Mt.So.getDeprecatedStatsInterval)&&void 0!==u?u:201));for(const L of this.YC)L.pT&&(null===(D=null===(S=L.af)||void 0===S?void 0:S.requestVideoFrameCallback)||void 0===D||D.call(S,L.pT))}$p(a){if(this.Dy.iE(a),!Mt.bo){const u=window.performance.now();for(let S=0;S1&&(this.Zd.hE[S]+=oe),this.Dy.oE(_e,oe)}}this.kT.yT=u}}rv(){Mt.bo||this.rE()}rE(){const a=window.performance.now();a>this.Zd.aE+1e4?(0!==this.Zd.aE&&s.Log.i("{5cea617}","{5fa9066}",this.Zd.dE,this.Zd.Wc,this.Zd._c,this.Zd.qc,this.kT.totalVideoFrames.map((u,S)=>u-this.Zd.cE[S]),this.Zd.nE,this.Zd.hE,this.Zd.tm,this.Zd.Yc),this.Zd.aE=a,this.Zd.cE=this.kT.totalVideoFrames,this.Zd.dE=1,this.Zd.Wc=0,this.Zd._c=0,this.Zd.qc=0,this.Zd.nE.fill(0),this.Zd.hE.fill(0),this.Zd.tm=0,this.Zd.Yc=0):this.Zd.dE+=1}JT(){this.QC&&(clearInterval(this.QC),this.QC=0),this.XC&&(clearInterval(this.XC),this.XC=0);for(const a of this.YC)a.mT.sI()}reset(){var a;this.JT();for(const u of this.YC)u.NT.reset(),u.DT.uninitialize(),u.DT=new La(null!==(a=u.af)&&void 0!==a?a:document.body,this.Rs,this.mk);this.JC.clear()}isEnabled(){return 0!=this.QC}lE(){this.isEnabled()&&(this.JT(),this.uE(!1))}AE(){this.isEnabled()||this.HT()}stop(){var a;if(!this.KC)return;this.KC=!1;let u=!1;for(const L of this.YC)L.DT.uninitialize(),!u&&L.xT&&(this.telemetry.eb("InboundVideoStats",L.xT.Lk,L.xT.IT.ET,L.xT.IT.CT,L.xT.MT,L.xT.IT.TT),u=!0);const S=this.LS.getConfiguration(),D=(S.iceServers||[]).map(L=>(Array.isArray(L.urls)?L.urls:[L.urls]).filter(Y=>Y.startsWith("turn:")||Y.startsWith("turns:")).map(Y=>L.username?`${Y},${L.username}`:Y)).reduce((L,Y)=>L.concat(Y),[]).join(" | ")||void 0;if(D){const L=this.vE(this.JC);this.telemetry.Ke("TURN Server Details",`${(null==L?void 0:L.url)||""}`,`${(null==L?void 0:L.protocol)||""}`,`${D}`,`${S.iceTransportPolicy||"default"}`)}this.lE(),null===(a=this.gT)||void 0===a||a.stop()}qT(a){return ra.includes(a)}fE(){this.ZC=!1}pE(a,u){for(const S of a.values())u.includes(S.type)&&this.JC.set(S.id,S)}$T(a){this.pE(a,ra)}mE(a){this.$T(a)}gE(){return"video"===this.ck||!this.iT.get("video")}wE(a){return a>=this.eT&&this.gE()}KT(a,u){const S=performance.now();if(this.wE(u)){if(this.SE(),this.bE(a),this.kE()){const L=2===this.sT;for(const Y of this.YC)Y.DT.hy(L)}this.eT=u+1e3}if(this.yE(),this.Kd.IE(),this.CE(u)&&(this.AT=u+5e3),this.ck){const L="video"===this.ck?"audio":"video";this.iT.get(L)&&(this.ck=L)}const D=performance.now()-S;for(const[L,Y]of this.YC.entries()){const oe=D+Y.BT;0===L&&this.Dy.TE(oe),Y.DT.vy(oe),Y.BT=0}}getSelectedCandidatePair(a){for(const[u,S]of a)if("transport"===S.type&&S.selectedCandidatePairId){const Y=a.get(S.selectedCandidatePairId);if(Y)return Y;break}for(const[u,S]of a)if("candidate-pair"===S.type&&S.selected)return S}vE(a){let u,S;const D=this.getSelectedCandidatePair(a);if(D)for(const[L,Y]of a)if((L===D.localCandidateId||L===D.remoteCandidateId)&&("relay"===Y.candidateType||Y.relayProtocol)){if(u=Y.url,S=Y.relayProtocol,void 0===u||void 0===S)continue;return s.Log.i("{5cea617}","{5f36af2}",u,S),{url:u,protocol:S}}s.Log.i("{5cea617}","{265646b}")}zT(a,u,S){var D;const L=performance.now();if(void 0===S&&1===this.YC.length&&(S=0),void 0===S)return;this.wE(u)&&(this.EE(a,S),this.ME(S)),this.PE(a,S);const Y=this.YC[S],oe=Y.wT;u>=(null!==(D=Y.PT)&&void 0!==D?D:0)&&oe&&(this.DE(oe,S),Y.wT=void 0,Y.PT=u+1e3);const _e=Y.DT;if(this.gE()){Ls(this.Rs)&&this.RE(S);const Ce=Y.NT.IS();_e.Xk(Ce),0===S&&(this.Yh.emit("StreamingQuality",Ce),this.GT&&this.Yh.emit("StreamingStats",_e.ty()),this.Dy.NE(Ce))}this.CE(u)&&_e.ey(S),Y.BT=performance.now()-L}CE(a){return a>=this.AT}PE(a,u){if(0===u)for(const[S,D]of this.tT.entries())for(const L of D){const Y=a.get(L);Y&&"inbound-rtp"===S&&this.YC[u].mT.qy(this.xE(a,Y))}}Ay(a){for(const u of this.YC)u.DT.Ay(a)}OE(a){for(const u of this.YC)u.DT.py(a)}Sy(a,u){this.YC[u].DT.Sy(a)&&(s.Log.i("{5cea617}","{3cc6c54}",a?"on":"off"),this.ME(u))}ky(a,u,S){this.YC[S].DT.ky(a,u)&&this.ME(S)}ZT(){if(!this.dT)if(this.dT=!0,0===this.uT)this.LS.getStats().then(a=>this.mE(a)).catch(a=>this.QT(a,"early")).finally(()=>this.XT());else if(1===this.uT)if(this.ZC){let a=[];const u=performance.now();switch(this.ck){case"audio":case"video":a=this.LS.getTransceivers().filter(D=>{var L,Y;return(null===(L=D.receiver.track)||void 0===L?void 0:L.kind)===this.ck&&(null===(Y=D.receiver.track)||void 0===Y?void 0:Y.enabled)}).map((D,L)=>D.receiver.getStats().then(Y=>(this.zT(Y,u,L),Y)));break;default:a.push(this.LS.getStats().then(D=>(this.zT(D,u,0),D)))}if(0===a.length)return void(this.dT=!1);Promise.all(a).then(S=>S[0]).then(S=>this.KT(S,u)).catch(S=>this.QT(S,"standard")).finally(()=>this.XT())}else this._T();else this.dT=!1}kE(){return 0!==this.sT}toggleOnScreenStats(a,u){this.uE(null!=u?u:!this.kE(),a)}Rw(a){const u=this.YC[a].DT;this.Dy.BE(),u.Cy(),u.oy(2===this.sT)}uE(a,u=!1){for(const S of this.YC)S.DT.uy(a),a&&S.DT.hy(u);a?(this.eT=performance.now(),this.sT=u?2:1):this.sT=0}EE(a,u){"video"===this.ck?this.FE(a,u):this.iT.get("video")||this.UE(a),this.YC[u].DT.my(this.Kd.LE())}UE(a){var u;const S=this.tT.get("inbound-rtp");if(!S)return;let D=S.map(Y=>a.get(Y)).find(Y=>"audio"===(null==Y?void 0:Y.kind)||"audio"===(null==Y?void 0:Y.ck));if(!D)return;D=this.xE(a,D);const L=this.YC[0];L.DT.Qk(D),L.packetsReceived=null!==(u=D.packetsReceived)&&void 0!==u?u:0,this.pE(a,["inbound-rtp"])}FE(a,u){var S,D;const L=this.tT.get("inbound-rtp");if(!L)return;const Y=this.YC[u],oe=Y.xT,_e=Y.DT;if(!oe)return;let Ce=L.map(At=>a.get(At)).find(At=>"video"===(null==At?void 0:At.kind)||"video"===(null==At?void 0:At.ck));if(!Ce)return void oe.IT.CT++;Ce=this.xE(a,Ce);const Ue=Ce.decoderImplementation;let $e=!1;if(null!=Ue&&Ue.indexOf&&(Ue!==oe.Lk&&"unknown"!==Ue&&(oe.Lk=Ue,_e.Ey(Ue)),$e=-1!==Ue.indexOf("fallback")),($e||"FFmpeg"===Ue||this.fT||!1===this.WT)&&-1===oe.MT){oe.MT=null!==(S=Ce.framesDecoded)&&void 0!==S?S:this.Yy(u),this.Dy.GE("SoftwareDecodeFallback");const At="Fallback to software decode at frame "+String(oe.MT);s.Log.i("{5cea617}","{953d211}",String(oe.MT)),_e.Ty(!0),this.Kd.HE(At);const dt=Y.OT;$e?dt.zC(3):(this.fT||"FFmpeg"===Ue||!1===this.WT)&&dt.zC(2)}const Be=this.JC.get(Ce.id);if(!Be)return void oe.IT.TT++;oe.IT.ET++;const at=Ce.codecId;if(at){const At=a.get(at).mimeType.toUpperCase();let dt="UNKNOWN";At.includes("H265")?dt="H265":At.includes("AV1")?dt="AV1":At.includes("H264")?dt="H264":s.Log.d("{5cea617}","{4b31535}",At),_e.gy(dt)}Y.NT.yS(Ce,Be),_e.Qk(Ce),Y.packetsReceived=null!==(D=Ce.packetsReceived)&&void 0!==D?D:0,this.pE(a,["inbound-rtp"])}xE(a,u){if(!this.lT){const S=a.get(u.trackId);S&&(u=Object.assign(S,u))}return u}bE(a){var u;const S=this.tT.get("candidate-pair");if(null==S||!S.length)return;const D=S.map(oe=>a.get(oe));if(!D.length)return;let L=this.getSelectedCandidatePair(a);L||(L=D[0]),this.oT.length>=6&&this.oT.splice(0,1),this.oT.push(L);const Y=null===(u=this.JC)||void 0===u?void 0:u.get(L.id);if(Y)for(const oe of this.YC)oe.DT.zk(L,Y);this.pE(a,["candidate-pair","transport"])}tE(){if(this.cT)return;this.cT=!0;const a=()=>{s.Log.i("{5cea617}","{cf8b53f}"),this.cT=!1,clearInterval(this.XC),this.XC=0};this.LS.getStats(u=>{for(let S of u.result())if("ssrc"==S.type)for(let D of S.names()){"video"===S.stat("mediaType")&&(this.FT.ts=this.ur._a(),this.FT.timingFrameInfo=S.stat("googTimingFrameInfo"),this.FT.targetDelayMs=+S.stat("googTargetDelayMs"),this.FT.minPlayoutDelayMs=+S.stat("googMinPlayoutDelayMs"),this.FT.currentDelayMs=+S.stat("googCurrentDelayMs"));break}this.YC[0].mT.tI(this.FT),this.cT=!1},a).catch(a)}RE(a){if(0!==a)return;const u=new ArrayBuffer(12),S=new DataView(u),D=this.YC[a].mT;S.setUint8(0,1),S.setUint8(1,1),S.setUint16(2,D.Qy(),!0),S.setUint16(4,D.Xy(),!0),S.setUint16(6,D.Yy(),!0),S.setUint16(8,D.jy(),!0),S.setUint16(10,D.Jy(),!0),this.VE(u,"clientperf")}DE(a,u){if(0!==u)return;const S=new ArrayBuffer(15),D=new DataView(S);D.setUint8(0,2),D.setUint8(1,1),D.setUint8(2,1),D.setUint32(3,a.ST,!0),D.setFloat64(7,a.bT,!0),this.VE(S,"rtpmapping")}VE(a,u){try{"open"===this.YT.readyState&&this.YT.send(a)}catch(S){s.Log.e("{5cea617}","{78e74c5}",S),this.QT(S,u)}}QT(a,u){this.telemetry.cc(a,`Exception in ${u} getStats`,"{5cea617}.ts",0,0,!0,"getStats")}XT(){this.dT=!1}yE(){const a=performance.memory;if(!a)return;const u=a.usedJSHeapSize,S=a.totalJSHeapSize,D=u-this.nT,L=S-this.hT;this.nT=u,this.hT=S,D>=0&&L>=0||this.Dy.WE(D,L)}_E(){return this.YC.reduce((a,u)=>a+u.DT.sy(),0)}Yy(a){return this.YC[a].DT.sy()}wy(a){return this.YC[a].DT.wy()}qE(){return this.jC}Iy(a){return this.YC[a].DT.Iy()}by(a){return this.YC[a].DT.by()}$E(){return this.YC.reduce((a,u)=>a+u.packetsReceived,0)}zE(){const a=D=>isNaN(D)?-1:D;if(this.oT.length<2)return;const u=this.oT[0],S=this.oT[this.oT.length-1];return{KE:a(S.requestsSent-u.requestsSent+S.consentRequestsSent-u.consentRequestsSent),QE:a(S.responsesReceived-u.responsesReceived),XE:a(S.packetsReceived-u.packetsReceived)}}YE(){let a=0,u=0,S=0,D=0,L=0,Y=0;for(const oe of this.JC.values())"candidate-pair"===oe.type&&(a+=oe.requestsSent+oe.consentRequestsSent,u+=oe.responsesReceived,S+=oe.requestsReceived,D+=oe.responsesSent,oe.nominated&&L++,"succeeded"===oe.state&&Y++);return s.Log.i("{5cea617}","{47c0ce7}",a,u),a>0&&0===u?3237093926:L?Y?void 0:3237093928:3237093927}jE(){const a=this.tT.get("local-candidate");return null==a?void 0:a.map(u=>{var S;return null===(S=this.JC)||void 0===S?void 0:S.get(u)})}JE(){let a=new vl;const u=this.jE();if(!u)return a;for(const S of u){const D=_o(S);a.set(D,a.get(D)+1)}return a}ZE(){let a=new Set;const u=this.jE();if(!u)return a;for(const S of u)if("IPV4"===_o(S)){const D=Pl(S);"UNKNOWN"!==D&&a.add(D)}return a}SE(){var a=this;return r(function*(){const u={width:screen.width*window.devicePixelRatio,height:screen.height*window.devicePixelRatio},S=qt(),D=a.lf.tM(),L=(oe,_e)=>oe.width===_e.width&&oe.height===_e.height;if(L(u,a.aT)&&L(S,a.rT)&&D===a.vT)return;a.aT=u,a.rT=S;const Y=yield Ki.Vb();a.vT=D;for(let oe=0;oe{const a=m.data,u=this.mM.get(a.instanceId);u?u.md(a):s.Log.w("{1f5ec29}","{3a7e49f}",a.instanceId)},this.wd=m=>{this.mM.size?this.mM.forEach(a=>a.wd(m)):this.wM.push(m)},s.Log.i("{1f5ec29}","{139da36}");try{this.sM=co('const t={size:70,version:1,name:"DEPR"},s={size:80,version:3,name:"RTPV"},i={size:48,version:1,name:"RTPA"},h={size:88,version:1,name:"TRAA"},e={size:44,version:1,name:"TRAV"},n={size:16,version:2,name:"VFMD"},r={size:20,version:1,name:"PFDA"},o={size:0,version:1,name:""};class a{constructor(t){this.i=t,this.h=new Map,this.o=0,this.l()}size(){let t=0;for(let[s,i]of this.h)for(let s of i)t+=s.byteLength;return t+=9*this.h.size,t}u(t){let s=this.h.get(t.type);s||(s=new Array,this.h.set(t.type,s));for(const i of t.stats)s.push(i)}write(t,s){let i=s;for(let[s,h]of this.h)i+=this.v(t,i,s,h.length),i+=this.S(t,h,i),1===s&&this.o++;return i}l(){this.o&&(this.i("{890d3ae}"+this.o),this.o=0),this.h.clear()}v(t,s,i,h){let e=this.M(i),n=e.name,r=new DataView(t.buffer);for(let t=0;t<4;t++)r.setUint8(s+t,n.charCodeAt(t));return r.setUint8(s+4,e.version),r.setUint16(s+5,h,!0),r.setUint16(s+7,e.size,!0),9}M(a){switch(a){case 0:return t;case 1:return s;case 2:return i;case 3:return e;case 4:return h;case 5:return n;case 6:return r;default:return o}}S(t,s,i){let h=0;for(let e of s){let s=new Uint8Array(e);t.set(s,i+h),h+=e.byteLength}return h}}class c{constructor(t,s){this.sessionId=t,this.A=!1,this.m=[],this.I=[],this.T=0,this.maxReceivedAckId=0,this.url="",this.C=0,this.i=s.info,this.D=s.exception}initialize(t,s,i,h=!1){this.url=t,this.maxReceivedAckId=s,this.P=i,this.R(h),this.i("{fcf6f89}"+this.C)}uninitialize(t){var s;this.maxReceivedAckId=0,this.m=[],this.I=[],this.P=void 0,this.B(),null===(s=this.W)||void 0===s||s.close(t),this.H(),this.i("{986b258}"+t+"{754f60b}"+this.C)}H(){this.W&&(this.W.onclose=null,this.W.onerror=null,this.W.onmessage=null,this.W.onopen=null,this.W=void 0)}N(){var t;this.i("{6c3505a}"+(null===(t=this.W)||void 0===t?void 0:t.readyState)+"{754f60b}"+this.C),this.W||this.R(!0),this.O()}B(){0!==this.T&&(self.clearTimeout(this.T),this.T=0)}O(){this.B(),this.T=self.setTimeout((()=>this.N()),3e3)}V(t){for(let s=this.m.length-1;s>=0;s--)this.m[s].ackid<=t&&this.m.splice(s,1)}F(t){void 0!==t.ackid&&this.m.push(t)}J(t){void 0!==t.ackid&&this.F(t),this.W&&(t.stats?this.W.send(t.stats):this.W.send(JSON.stringify(t)))}send(t){this.P&&(this.W||this.R(!0),this.W&&this.W.readyState===WebSocket.OPEN?this.J(t):this.I.push(t))}U(){if(this.W){let t={ack:this.maxReceivedAckId},s=JSON.stringify(t);this.i("{903be10}"+s),this.W.send(s)}}R(t=!1){const s=this.C+1;try{let i;this.sessionId&&(i="x-nv-sessionid."+this.sessionId);let h=this.url;t&&(h+="&reconnect=1");let e=new WebSocket(h,i);e.onopen=t=>{var i;if(this.i("{48fa30b}"+s),e===this.W){null===(i=this.P)||void 0===i||i.G();for(const t of this.m)t.stats?e.send(t.stats):e.send(JSON.stringify(t));for(const t of this.I)this.J(t);this.I=[]}},e.onclose=t=>{var i;this.i("{6406bff}"+s),e===this.W&&(null===(i=this.P)||void 0===i||i.K({error:this.A,code:t.code,reason:t.reason,wasClean:t.wasClean}),this.H(),this.A=!1)},e.onerror=t=>{this.i("{7605058}"+s),e===this.W&&(this.A=!0)},e.onmessage=t=>{if(this.P)try{let s=JSON.parse(t.data);if(this.T||this.i("{523f5b9}"),this.O(),s.hb)return;void 0!==s.ack&&this.V(s.ack),void 0!==s.ackid?(this.maxReceivedAckId{w(t,this.instanceId)},this.it=t=>{const s={wsMessage:t,instanceId:this.instanceId};l.postMessage(s)},this.ht=t=>{const s={wsClose:t,instanceId:this.instanceId};l.postMessage(s)},this.et=()=>{const t={wsOpen:!0,instanceId:this.instanceId};l.postMessage(t)},this.nt=()=>{const t={wsOpening:!0,instanceId:this.instanceId};l.postMessage(t)},this.rt=t=>{u(t,this.instanceId)},this.ot=new a(this.rt);const i={initialized:!0,instanceId:t};l.postMessage(i)}ct(){this.j=[],this.X=[],this.ot.l(),this.Z=[],this.$=[],this.inputChannelStats=[],this.garbageCollectionStats=[],this._=[]}lt(t,s,i,h,e,n){for(let h=0;h<4;h++)t.setUint8(s+h,i.charCodeAt(h));t.setUint8(s+4,h),t.setUint16(s+5,e,!0),t.setUint16(s+7,n,!0)}ft(t,s){for(let i=0;ithis.St()),5e3),l.postMessage(s),this.rt("{5209d98}")}else t.stopStats?(self.clearInterval(this.Y),this.St(),this.ct(),this.rt("{b58b6ad}")):t.webrtcStats?(t.ackid&&(this.tt=t.ackid),t.webrtcStats.stats&&this.ot.u(t.webrtcStats)):t.sq?this.Z.push(t.sq):t.startWebSocket?(this.url=t.startWebSocket.signInURL,this.R(t.startWebSocket.maxReceivedAckId,t.startWebSocket.reconnect)):t.stopWebSocket?(null===(s=this.At)||void 0===s||s.uninitialize(),this.At=void 0):t.send?null===(i=this.At)||void 0===i||i.send(t.send):t.duration?this.$.push(t.duration):t.inputChannelStats?this.inputChannelStats.push(t.inputChannelStats):t.garbageCollectionStats?this.garbageCollectionStats.push(t.garbageCollectionStats):t.qosMarker&&this._.push(t.qosMarker)}}function d(t){return t<0?Math.max(t,-2147483648):Math.min(t,4294967295)}function u(t,s){const i={log:t,instanceId:s};l.postMessage(i)}function w(t,s=0){const i={exception:t,instanceId:s};l.postMessage(i)}const v=new Map;l.onmessage=function(t){try{const s=t.data,i=s.instanceId;if(s.initMessage)v.set(i,new f(i,s.initMessage.sessionId));else if(s.uninitialize){v.delete(i);const t={uninitialized:!0,instanceId:i};l.postMessage(t)}else{const t=v.get(i);t?t.zt(s):u("{d710be2}"+i,i)}}catch(t){w("Worker onmessage exception: "+t)}};',"ragnarokworker.js"),this.sM.onmessage=this.md.bind(this),this.sM.onerror=this.wd.bind(this),s.Log.i("{1f5ec29}","{62dee75}")}catch(m){s.Log.e("{1f5ec29}","{50fa2e5}",m.message),this.gM.push({name:"RagnarokWorkerProblem",error:JSON.stringify(m)})}}bM(m,a,u,S){if(this.gM.length>0){for(const Y of this.gM)a.Ke(Y.name,Y.error);this.gM=[]}if(this.wM.length>0){for(const Y of this.wM)us(a,Y);this.wM=[]}const D=this.SM++;s.Log.i("{1f5ec29}","{c194458}",D,m);const L=new As(D,m,a,u,S,this.sM);return this.mM.set(D,L),L}kM(m){m.uninitialize(),this.mM.delete(m.oM())}};class Ts{constructor(a,u){this.sessionId=a,this.yM=!1,this.IM=[],this.CM=[],this.TM=0,this.maxReceivedAckId=0,this.url="",this.EM=0,this.MM=u.info,this.PM=u.exception}initialize(a,u,S,D=!1){this.url=a,this.maxReceivedAckId=u,this.DM=S,this.RM(D),this.MM("{fcf6f89}"+this.EM)}uninitialize(a){var u;this.maxReceivedAckId=0,this.IM=[],this.CM=[],this.DM=void 0,this.NM(),null===(u=this.xM)||void 0===u||u.close(a),this.OM(),this.MM("{986b258}"+a+"{754f60b}"+this.EM)}OM(){this.xM&&(this.xM.onclose=null,this.xM.onerror=null,this.xM.onmessage=null,this.xM.onopen=null,this.xM=void 0)}BM(){var a;this.MM("{6c3505a}"+(null===(a=this.xM)||void 0===a?void 0:a.readyState)+"{754f60b}"+this.EM),this.xM||this.RM(!0),this.FM()}NM(){0!==this.TM&&(self.clearTimeout(this.TM),this.TM=0)}FM(){this.NM(),this.TM=self.setTimeout(()=>this.BM(),3e3)}UM(a){for(let u=this.IM.length-1;u>=0;u--)this.IM[u].ackid<=a&&this.IM.splice(u,1)}LM(a){void 0!==a.ackid&&this.IM.push(a)}GM(a){void 0!==a.ackid&&this.LM(a),this.xM&&this.xM.send(a.stats?a.stats:JSON.stringify(a))}send(a){this.DM&&(this.xM||this.RM(!0),this.xM&&this.xM.readyState===WebSocket.OPEN?this.GM(a):this.CM.push(a))}HM(){if(this.xM){let u=JSON.stringify({ack:this.maxReceivedAckId});this.MM("{903be10}"+u),this.xM.send(u)}}RM(a=!1){const u=this.EM+1;try{let S;this.sessionId&&(S="x-nv-sessionid."+this.sessionId);let D=this.url;a&&(D+="&reconnect=1");let L=new WebSocket(D,S);L.onopen=Y=>{var oe;if(this.MM("{48fa30b}"+u),L===this.xM){null===(oe=this.DM)||void 0===oe||oe.lM();for(const _e of this.IM)L.send(_e.stats?_e.stats:JSON.stringify(_e));for(const _e of this.CM)this.GM(_e);this.CM=[]}},L.onclose=Y=>{var oe;this.MM("{6406bff}"+u),L===this.xM&&(null===(oe=this.DM)||void 0===oe||oe.aM({error:this.yM,code:Y.code,reason:Y.reason,wasClean:Y.wasClean}),this.OM(),this.yM=!1)},L.onerror=Y=>{this.MM("{7605058}"+u),L===this.xM&&(this.yM=!0)},L.onmessage=Y=>{if(this.DM)try{let oe=JSON.parse(Y.data);if(this.TM||this.MM("{523f5b9}"),this.FM(),oe.hb)return;void 0!==oe.ack&&this.UM(oe.ack),void 0!==oe.ackid?(this.maxReceivedAckId{s.Log.i("{d7392d2}","{b96b3ec}",u.qM)},flush:()=>{},transform:(Y,oe)=>{if(!u.$M){const _e=new Uint8Array(Y.data);u.size+_e.byteLength<=u.data.byteLength?(function(Ce,Ue,$e){const Be=$e.byteLength;for(let at=0;atUe.toFixed?Number(Ue.toFixed(2)):Ue);if(s.Log.d("{48f82fd}","{054b8b0}",JSON.stringify(D),Y),null!==(a=Mt.So.sendInsetValueUpdateEvents)&&void 0!==a&&a&&this.XM++<2){const Ce=(Be,at=1)=>{for(const At of Object.keys(Be)){const dt=Math.round(Be[At]*at);Be[At]=isNaN(dt)?-1:dt}return Be},Ue=Ce(Object.assign({},D)),$e=Ce(Object.assign({},L),1e3);null===(u=this.telemetry)||void 0===u||u.eb("InsetValueUpdate","Original",Ue.top,Ue.left,Ue.bottom,Ue.right),null===(S=this.telemetry)||void 0===S||S.eb("InsetValueUpdate","Normalized",$e.top,$e.left,$e.bottom,$e.right)}this.KM=Object.assign({},L);for(const Ce of Object.keys(L))L[Ce]=isNaN(L[Ce])?0:L[Ce];const _e={messageType:"SAFE_ZONE",messageRecipient:"NvGridSvc:NGS",data:JSON.stringify({safeZoneData:{type:"InsetValueUpdate",rect:L}})};this.sender.sendCustomMessage(_e),Mt.isInternalUser&&this.ZM()}Ew(){this.YM&&(this.QM=!this.QM,this.YM.style.display=this.QM?"block":"none")}JM(a){let{width:u,height:S}=qt();if(Vt(this.Rs)&&(a.top=Math.max(a.top,20),!(()=>{let oe;switch(void 0!==window.orientation?oe=window.orientation:screen.orientation&&(oe=screen.orientation.angle),oe){case 90:case-90:case 270:return!1;default:return!0}})())){const oe=u;u=S,S=oe}const D=(oe=>{let _e=oe.offsetTop,Ce=oe.offsetLeft,Ue=oe.offsetParent;for(;Ue;)_e+=Ue.offsetTop,Ce+=Ue.offsetLeft,Ue=Ue.offsetParent;let $e=oe.clientHeight,Be=oe.clientWidth;return bn(this.Rs)&&(window.innerHeight>window.innerWidth&&oe.clientHeightoe.clientWidth)&&(s.Log.w("{48f82fd}","{c9d343e}"),$e=oe.clientWidth,Be=oe.clientHeight),{top:_e,left:Ce,bottom:Math.max(window.innerHeight-_e-$e,0),right:Math.max(window.innerWidth-Ce-Be,0)}})(this.af),L=Math.max(S-window.innerHeight,0)/2,Y=Math.max(u-window.innerWidth,0)/2;return{top:Math.max(a.top-L-D.top-this.Hf,0)/(this.af.clientHeight-2*this.Hf),left:Math.max(a.left-Y-D.left-this.Gf,0)/(this.af.clientWidth-2*this.Gf),bottom:Math.max(a.bottom-L-D.bottom-this.Hf,0)/(this.af.clientHeight-2*this.Hf),right:Math.max(a.right-Y-D.right-this.Gf,0)/(this.af.clientWidth-2*this.Gf)}}jM(){const a=document.createElement("div");return a.style.display="none",a.style.position="absolute",a.style.color="white",a.style.backgroundColor="rgb(105, 105, 105, 0.7)",a.style.padding="2px",a.style.bottom="0px",a.style.left="0px",a.style.margin="5px",a}ZM(){this.YM&&(this.YM.innerText="Safe Zone: \nTop: "+(100*Math.max(this.KM.top,0)).toFixed()+"%\nRight: "+(100*Math.max(this.KM.right,0)).toFixed()+"%\nBottom: "+(100*Math.max(this.KM.bottom,0)).toFixed()+"%\nLeft: "+(100*Math.max(this.KM.left,0)).toFixed()+"%")}}class Yc{constructor(a){var u,S,D,L;this.tP=new Map,this.fullscreen=!1,this.iP=!1,this.sP=!1,this.eP=void 0,this.tP.set(0,[]),this.tP.set(2,[]),this.tP.set(1,[]),this.tP.set(3,[]),this.tP.set(4,[]),this.tP.set(5,[]),this.tP.set(6,[]),this.nP=function(Ce){var Ue;switch(null!==(Ue=Ce.platformType)&&void 0!==Ue?Ue:Ce.deviceType){case s.PlatformType.PHONE:case s.PlatformType.TABLET:return!0;default:return!1}}(a),this.hP=Hn(a),this.oP=Pn(a),this.rP=ke(a),this.au=bt(a),this.aP=De(a),this.dP=this.cP=document.hasFocus(),this.vT=0;const Y=window.zoneless,oe=null!==(S=null===(u=null==Y?void 0:Y.windowAddEventListener)||void 0===u?void 0:u.bind(window))&&void 0!==S?S:window.addEventListener.bind(window),_e=null!==(L=null===(D=null==Y?void 0:Y.documentAddEventListener)||void 0===D?void 0:D.bind(document))&&void 0!==L?L:document.addEventListener.bind(document);this.lP=this.uP.bind(this),this.AP=this.vP.bind(this),this.fP=this.mp.bind(this),this.pP=this.mP.bind(this),this.gP=this.wP.bind(this),this.SP=this.bP.bind(this),this.kP=this.yP.bind(this),this.IP=this.CP.bind(this),oe("focus",this.lP),oe("blur",this.AP),["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","msfullscreenchange"].forEach(Ce=>_e(Ce,this.fP)),_e("mouseenter",this.pP),_e("mouseleave",this.gP),this.TP()&&navigator.getBattery().then(Ce=>{this.EP(!Ce.charging),this.MP(this.PP(Ce)),Ce.addEventListener("chargingchange",this.SP),Ce.addEventListener("levelchange",this.kP)}),this.DP()&&(this.CP(),window.screen.addEventListener("change",this.IP)),this.RP()?(this.NP=new PressureObserver(Ce=>{if(Ce.length>0){const Ue=this.xP(Ce);if(this.eP!=Ue){this.eP=Ue;for(const $e of this.tP.get(5))$e()}}}),this.NP.observe("cpu")):s.Log.i("{0c4eeb2}","{c70b747}"),this.mp()}uninitialize(){var a,u,S,D,L,Y,oe;const _e=window.zoneless,Ce=null!==(u=null===(a=null==_e?void 0:_e.windowRemoveEventListener)||void 0===a?void 0:a.bind(window))&&void 0!==u?u:window.removeEventListener.bind(window),Ue=null!==(D=null===(S=null==_e?void 0:_e.documentRemoveEventListener)||void 0===S?void 0:S.bind(document))&&void 0!==D?D:document.removeEventListener.bind(document);Ce("focus",this.lP),Ce("blur",this.AP),["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","msfullscreenchange"].forEach(Be=>Ue(Be,this.fP)),Ue("mouseenter",this.pP),Ue("mouseleave",this.gP),this.TP()&&navigator.getBattery().then(Be=>{Be.removeEventListener("chargingchange",this.SP),Be.removeEventListener("levelchange",this.kP)}),this.DP()&&window.screen.removeEventListener("change",this.IP);const $e=null===(L=this.NP)||void 0===L?void 0:L.takeRecords();null==$e||$e.map(Be=>s.Log.i("{0c4eeb2}","{4f27ba0}",JSON.stringify(Be))),null===(Y=this.NP)||void 0===Y||Y.unobserve("cpu"),null===(oe=this.NP)||void 0===oe||oe.disconnect();for(const Be of this.tP.values())Be.splice(0)}xP(a){let u="nominal";for(const S of a)this.OP(S.state)>this.OP(u)&&(u=S.state);return u}OP(a){switch(a){case"nominal":default:return 0;case"fair":return 1;case"serious":return 2;case"critical":return 3}}Jp(){return this.dP}Qp(a){if((this.nP||this.au)&&this.BP(a),this.dP!==a){this.dP=a;for(const u of this.tP.get(0))u(a)}}Lm(){return this.fullscreen}FP(a){if(this.fullscreen!==a){this.fullscreen=a;for(const u of this.tP.get(2))u(a)}}UP(){return this.cP}BP(a){if(this.cP!==a){this.cP=a;for(const u of this.tP.get(1))u(a)}}LP(){return this.iP}MP(a){if(this.iP!==a){this.iP=a;for(const u of this.tP.get(4))u(a)}}GP(){return this.sP}EP(a){if(this.sP!==a){this.sP=a;for(const u of this.tP.get(3))u(a)}}tM(){return this.vT}HP(){switch(this.eP){case"nominal":return 60;case"fair":return 75;case"serious":return 90;case"critical":return 100}return-1}Lp(a,u){this.tP.get(a).push(u)}_p(a,u){const S=this.tP.get(a),D=S.indexOf(u);-1!==D&&S.splice(D,1)}TP(){return navigator.getBattery}DP(){return!this.aP&&void 0!==window.screen.isExtended}RP(){var a,u;return Mt.enableComputePressure&&(null===(a=Mt.So.enableComputePressure)||void 0===a||a)&&(null===(u=globalThis.PressureObserver)||void 0===u?void 0:u.prototype)&&PressureObserver.knownSources instanceof Array&&PressureObserver.knownSources.includes("cpu")}uP(){this.Qp(!0)}vP(){this.Qp(!1)}mp(){const a=window.document,u=!!(document.fullscreen||1==a.webkitIsFullScreen||a.mozFullScreen||a.msFullscreenElement);this.FP(u)}mP(){this.BP(!0)}wP(){this.BP(!1)}bP(){navigator.getBattery().then(a=>{this.EP(!a.charging)})}yP(){navigator.getBattery().then(a=>{this.MP(this.PP(a))})}PP(a){return this.rP?a.level<=.22:this.hP||this.au?a.level<=.2:this.oP?a.level<=.1:a.level<=.33}CP(){let a=0;if(a=window.screen.isExtended?3:0,s.Log.i("{0c4eeb2}","{ee99c72}",a),this.vT!==a){this.vT=a;for(const u of this.tP.get(6))u(a)}}}class Us{static VP(a){return a.trim().split("\n").map(u=>u.trim())}static WP(a){return a.split("\nm=").map((u,S)=>(S>0?"m="+u:u).trim()+"\r\n")}static _P(a){const u=Us.WP(a);return u&&u[0]}static qP(a){const u=Us.WP(a);return u.shift(),u}static $P(a,u){return Us.VP(a).filter(S=>0===S.indexOf(u))}static zP(a){const u=a.substr(14).split(" ");return{algorithm:u[0].toLowerCase(),value:u[1].toUpperCase()}}static KP(a,u){return{role:"auto",QP:Us.$P(a+u,"a=fingerprint:").map(Us.zP)}}static XP(a,u){const S=Us.$P(a+u,"a=ice-ufrag:")[0],D=Us.$P(a+u,"a=ice-pwd:")[0];return{usernameFragment:S.substr(12),password:D.substr(10)}}}class ba{constructor(a){this.index=a,this.hdr=!1,this.Bk=!0,this.Fk=!1}YP(a){this.jP=a}JP(a){var u;const S=null===(u=or())||void 0===u?void 0:u.features.hdr10PlusGamingData;var D,L;null!=S&&S.version?a.isSupported?(a.isOn?(L=a).version===(D=S).version&&L.peakLuminanceIndex===D.peakLuminanceIndex&&L.peakFullFrameLuminanceIndex===D.peakFullFrameLuminanceIndex?(this.Fk=!0,s.Log.i("{a5dd7ef}","{09b4301}")):(this.Fk=!1,s.Log.i("{a5dd7ef}","{6aed760}")):(this.Fk=!1,s.Log.i("{a5dd7ef}","{a358edc}")),this.ZP()):s.Log.i("{a5dd7ef}","{15eb580}"):s.Log.i("{a5dd7ef}","{0eae5fd}",JSON.stringify(a))}tD(a){var u;this.hdr=a,null===(u=this.jP)||void 0===u||u.Sy(a,this.index),this.ZP()}iD(a){this.Bk=a,this.ZP()}ZP(){var a,u,S;if(null===(a=this.jP)||void 0===a||a.ky(this.Bk,this.Fk,this.index),null===(u=window.webapis)||void 0===u||!u.hdr10pluscloud)return;let D,L;if(this.hdr?this.Bk&&this.Fk?(D=2,L="HDR10+G"):(D=1,L="HDR"):(D=0,L="SDR"),D!==(null!==(S=window.webapis.hdr10pluscloud.isHdr10plusGamingModeEnabled())&&void 0!==S?S:0)){const Y=window.webapis.hdr10pluscloud.enableHdr10plusGamingMode(D);s.Log.i("{a5dd7ef}","{fc86642}",L,Y)}}}const ic="app_video_stream",ve="app_audio_stream",Me="app_media_stream",We="stream_id",Te="second_stream_id",ze="sendrecv";class Ot{constructor(a,u,S,D,L,Y,oe,_e,Ce,Ue,$e,Be,at,At,dt,kt,_n,An,tn,Dn){var Bn,Mn,ci;let li;this.sD=u,this.eD=S,this.jm=L,this.Jm=Y,this.telemetry=oe,this.Rs=_e,this.session=Ce,this.ur=Ue,this.isResume=$e,this.nD=Be,this.KS=At,this.textInputElement=dt,this.clientAppVersion=kt,this.My=_n,this.signalingUrlQueryParameters=tn,this.enableMicUpstream=Dn,this.name="",this.id=0,this.VM={video:[],_M:0,hD:{oD:0,rD:0,nc:0,hc:BigInt("0")}},this.aD=-1,this.dD=!1,this.cD=!1,this.lD=0,this.uD=0,this.AD=0,this.vD=!1,this.fD=0,this.pD=0,this.mD=!1,this.gD=!1,this.wD=!1,this.SD=!0,this.perfIndicator=!1,this.stutterIndicator=!1,this.bD=0,this.kD=[],this.yD=[],this.ID="",this.CD=0,this.iM=new Yo,this.TD=0,this.ED=0,this.MD=0,this.PD=0,this.DD=Date.now(),this.RD=0,this.ND=0,this.xD=0,this.OD=!1,this.keyboardLayout="",this.maxReceivedAckId=0,this.videoStreamProgress=0,this.BD=[],this.FD="",this.UD=this.LD.bind(this),this.GD=this.HD.bind(this),this.VD=this.WD.bind(this),this.IP=this.CP.bind(this),this._D=0,this.qD=new vl,this.$D=this.zD.bind(this),this.KD=new Set,this.QD=[],this.XD=Ii=>{Ii.getEntriesByType("longtask").forEach(rr=>{let Li=Math.round(rr.duration);this.Dy.fM(Li,rr.startTime),this.OE(Li),s.Log.i("{93c7910}","{7071359}",Li)})},this.Yh=a,s.Log.d("{93c7910}","{e1ca54d}",JSON.stringify(Ce)),Ce.finalizedStreamingFeatures||s.Log.w("{93c7910}","{6f17ef5}"),Mt.maxBitrate&&(s.Log.d("{93c7910}","{55e5b30}",Mt.maxBitrate),li=Mt.maxBitrate);for(let Ii=0;Ii{const ao=qe(rr.width,rr.height,rr.fps)[0];return s.Log.d("{93c7910}","{aff4184}",ao),ao})(),eo=!(null!==(Mn=null===(Bn=this.sD[Ii])||void 0===Bn?void 0:Bn.requestVideoFrameCallback)&&void 0!==Mn&&!Mn);this.VM.video.push(ro(rr,Or,eo,Ce.finalizedStreamingFeatures,at[Ii].dynamicStreamingMode)),this.QD.push(new ba(Ii))}if(this.YD=nr(this.Rs,this.session.streamInfo[0]),this.jD=r(function*(){let Ii=2;const rr="v=0\no=- 0 3 IN IP4 127.0.0.1\ns=-\nt=0 0\na=fingerprint:sha-256 A7:24:72:CA:6E:02:55:39:BA:66:DF:6E:CC:4C:D8:B0:1A:BF:1A:56:65:7D:F4:03:AD:7E:77:43:2A:29:EC:93\nm=audio 9 UDP/TLS/RTP/SAVPF 100 101\nc=IN IP4 0.0.0.0\na=rtcp-mux\na=sendonly\na=mid:audio\na=setup:actpass\na=ice-ufrag:ETEn\na=ice-pwd:OtSK0WpNtpUjkY4+86js7Z/l\r\n",Li="\r\na=rtpmap:101 opus/48000/2\na=fmtp:101 minptime=10;useinbandfec=1\n";let Or="minptime=10;useinbandfec=1;channel_mapping=0,4,1,2,3,5;num_streams=4;coupled_streams=2",eo=rr+"a=rtpmap:100 multiopus/48000/6\r\na=fmtp:100 "+Or+Li;const ao=me(6,eo,Or);Or="minptime=10;useinbandfec=1;channel_mapping=0,6,1,2,3,4,5,7;num_streams=5;coupled_streams=3",eo=rr+"a=rtpmap:100 multiopus/48000/8\r\na=fmtp:100 "+Or+Li;const Tr=me(8,eo,Or);return yield Promise.all([ao,Tr]).then(Xn=>{Ii=Math.max(Number(Xn[0]),Number(Xn[1]))}),s.Log.i("{d988e7f}","{dc7ee29}",Ii),Ii})(),this.df={unadjustedMovement:rt(Ce.appId),...D},this.Kd=a,this.appLaunchMode=Ce.appLaunchMode,An)for(const Ii of An)if(Ii.track instanceof MediaStreamTrack&&"video"===Ii.track.kind){this.sendVideoTrack=Ii.track;break}let mi=this.session.signalConnectionInfo.protocol;mi=mi.replace("http","ws"),this.JD=mi+"://"+this.session.signalConnectionInfo.ip+":"+this.session.signalConnectionInfo.port;const Vi=this.session.signalConnectionInfo.resourcePath;Vi&&(this.JD+=("/"===Vi.charAt(0)?"":"/")+Vi,"/"===this.JD.charAt(this.JD.length-1)&&(this.JD=this.JD.slice(0,-1))),this.Dy=Il.bM(this.session.sessionId,this.telemetry,this.iM,this.ur),this.ur.ZD(),this.sD.length&&(this.Zm=new nc(this,this.sD[0],this.Rs,this.telemetry)),this.lf=new Yc(_e);const Xi=document.createElement("div");Xi.style.position="absolute",Xi.style.zIndex="300",Xi.style.left="0",Xi.style.top="0",Xi.style.width="100%",Xi.style.display="none",Xi.style.fontSize="3em",Xi.style.color="white",Xi.style.backgroundColor="gray",Xi.style.textAlign="center",(null!==(ci=this.sD[0])&&void 0!==ci?ci:document.body).insertAdjacentElement("afterend",Xi),this.tR=Xi,this.iR={uv:32768,Av:256,vv:255,Ln:this.Rw.bind(this)},this.sR={uv:16384,Av:512,vv:65280,Ln:this.yw.bind(this)},this.eR={uv:16384,Av:512,vv:255,Ln:this.nR.bind(this)},this.hR={uv:8192,Av:256,vv:255,Ln:this.toggleOnScreenStats.bind(this)},this.oR={uv:4096,Av:256,vv:255,Ln:this.toggleStutterIndicator.bind(this)},this.Zd={aE:0,cE:[0],dE:0,Wc:0,_c:0,qc:0,nE:[0],hE:[0],tm:0,Yc:0},this.rR=this.$p.bind(this),function(Ii){const rr="MediaCapabilities2";if(!navigator.mediaCapabilities)return void Ii.eb(rr,"API unsupported",-1,-1,-1,-1);const Li=performance.now();Ki.xb("h264").then(function(){var Or=r(function*(eo){if(eo){const ao=Ki.xb("h265; level-id=153;profile-id=1;tier-flag=1"),Tr=Ki.xb("h265; level-id=153;profile-id=2;tier-flag=1"),Xn=Ki.Bb(),Wi=Ki.Gb(),Lo=xr(yield ao),$r=xr(yield Tr),Hr=xr(yield Xn),fa=xr(yield Wi),la=xr(eo);Ii.eb(rr,`AV1: ${Hr}`,la,fa,Lo,$r);const Io=yield Ki.Vb(),Ps=yield Ki._b();s.Log.d("{5083445}","{1efbc27}",Io,Ps),Ii.eb("DisplayCaps","Is120FpsSupported: "+Ps,Io,0,0,0)}else Ii.eb(rr,"webrtc or h264 unsupported",performance.now()-Li,-1,-1,-1)});return function(eo){return Or.apply(this,arguments)}}())}(this.telemetry)}start(){this.aR(),this.ur.ZD(),this.dR(),Mt.isInternalUser&&(this.Jm.mv(this.iR),this.Jm.mv(this.sR),this.Jm.mv(this.eR),this.Jm.mv(this.hR),this.Jm.mv(this.oR))}cR(){this.name="peer-"+function(){let a=1;for(let S=1;S<10;S++)a*=10;let u=""+Math.floor(Math.random()*a);return u=u.padEnd(10,"0"),u}(),s.Log.d("{93c7910}","{f2b789d}",this.name),this.ID=this.JD+"/sign_in?peer_id="+this.name+"&version=2",this.signalingUrlQueryParameters&&(this.ID+="&"+this.signalingUrlQueryParameters),s.Log.d("{93c7910}","{05b8afd}",this.ID)}stop(a){var u,S,D,L,Y,oe;this.telemetry.eb("StreamTimersAndReconnects",Ve(a),0,this.RD,this.ND,this.xD);const _e=Ce=>{s.Log.i("{93c7910}","{a848987}",Ce),this.telemetry.eb("PeerAPIDurationsAndMic",Ve(a),this.MD,this.TD,this.ED,Ce)};this.eD.WS().then(Ce=>{_e(Ce)}),this.lR({code:a,description:"Session stopped before stream connected"}),this.uD&&(clearTimeout(this.uD),this.uD=0),this.tR.remove(),this.dD=!0;try{this.uR({exitMessage:{code:_s(a)}})}catch(Ce){s.Log.e("{93c7910}","{d337883}",Ce)}this.AR(),this.jd&&this.jd.close(),null===(u=this.Jd)||void 0===u||u.close(),this.vR(),null===(S=this.pc)||void 0===S||S.removeEventListener("icecandidate",this.$D),this.pc&&this.pc.close(),this.fR(),0!==this.AD&&(window.clearTimeout(this.AD),this.AD=0),0!==this.pD&&(window.clearTimeout(this.pD),this.pD=0),this.Dy.stopProfiling(),null===(D=this.pR)||void 0===D||D.uninitialize(),this.Dy.stopWebSocket(),this.dR(),Il.kM(this.Dy),this.FD&&this.SD&&(s.Log.e("{93c7910}","{283a180}"),this.telemetry.Ke("Audio track muted")),this.fD>0&&this.telemetry.eb("WebSocketClose","",0,this.fD,0,0),null===(L=this.nD)||void 0===L||L.uninitialize(),null===(Y=this.Zm)||void 0===Y||Y.uninitialize(),this.lf._p(0,this.UD),this.lf._p(1,this.UD),this.lf._p(2,this.UD),this.lf._p(4,this.GD),this.lf._p(3,this.GD),this.lf._p(5,this.VD),this.lf._p(6,this.IP),this.lf.uninitialize(),this.Jm.gv(this.iR),this.Jm.gv(this.sR),this.Jm.gv(this.eR),this.Jm.gv(this.hR);for(const Ce of this.sD)Ce.srcObject=null;this.KS&&(this.KS.srcObject=null),null===(oe=this.perf)||void 0===oe||oe.disconnect()}dM(a){var u;if(s.Log.i("{93c7910}","{39024c3}",Oi(JSON.stringify(a))),a.ackid&&this.maxReceivedAckId{var S,D,L,Y,oe;const _e=null!==(S=a.code)&&void 0!==S?S:1005;s.Log.i("{93c7910}","{0a06f78}",_e,null!==(D=a.error)&&void 0!==D&&D),this.telemetry.SR(this.ID,_e,null!==(Y=null===(L=this.session)||void 0===L?void 0:L.signalConnectionInfo.ip)&&void 0!==Y?Y:"",null!==(oe=a.reason)&&void 0!==oe?oe:"",this.CD,a.wasClean),window.clearTimeout(this.pD),this.pD=0,this.lR({code:Ne(_e),description:a.reason})};0!==this.pD&&(a.error||a.code&&a.code>=1002&&a.code<=1015?(this.CD++,this.CD<=3?(this.cR(),this.bR()):u()):u()),a.wasClean||this.fD++}cM(){s.Log.i("{93c7910}","{6423101}")}lM(){0!==this.pD&&(window.clearTimeout(this.pD),this.pD=0,this.RD=Date.now()-this.PD),this.cD||0!==this.AD||this.kR()}yR(a){s.Log.i("{8ba4138}","{0b0c6f9}",a)}IR(a){this.telemetry.cc(void 0,a,"{8ba4138}.ts",0,0,!0),s.Log.e("{8ba4138}","{0b0c6f9}",a)}bR(){this.pR=new Ts(this.session.sessionId,{info:this.yR.bind(this),exception:this.IR.bind(this)}),this.pR.initialize(this.ID,this.maxReceivedAckId,this)}aR(){this.cR();let a=1e4;Mt.So.signInTimeout&&0!==Mt.So.signInTimeout&&(a=Mt.So.signInTimeout,s.Log.i("{93c7910}","{4f2f101}",a)),this.pD=window.setTimeout(()=>this.signInTimeout(),a),this.PD=Date.now(),this.bR()}kR(){this.AD=window.setTimeout(()=>this.CR(),3e4),this.DD=Date.now()}CR(){var a;this.AD=0,s.Log.i("{93c7910}","{d22df91}"),this.wR(null!==(a=this.gR())&&void 0!==a?a:3237093895)}gR(){var a;const u=this.TR();let S;switch(this.videoStreamProgress){case 0:case 2:break;case 3:S=3237093922;break;case 5:S=3237093923;break;case 7:S=3237093924;break;default:S=3237093925}const D=null===(a=this.jP)||void 0===a?void 0:a.YE();return this.id?this.mD?15859712!==u?S=u:this.wD?this.gD?D?S=D:4&this.lD&&("connecting"===zn(this.jd)?S=3237093919:"connecting"===zn(this.ER)?S=3237093920:"connecting"===zn(this.MR)?S=3237093921:this.Jd&&"connecting"===zn(this.Jd)&&(S=3237093936)):S=3237093903:S=3237093904:S=3237093913:S=3237093912,S}PR(){let a=!1;return Je()&&"closed"===this.pc.signalingState&&(a=!0,this.wR(15867908)),a}DR(){this.PR()||this.wR(15867907)}RR(){var a,u,S,D,L,Y,oe,_e,Ce;const Ue=Dn=>{var Bn,Mn;return(null!==(Bn=null==Dn?void 0:Dn.get("TCP"))&&void 0!==Bn?Bn:0)+(null!==(Mn=null==Dn?void 0:Dn.get("IPV6"))&&void 0!==Mn?Mn:0)},$e=(Dn,Bn)=>{let Mn=0;if(Bn){let ci=`${Dn} local candidates:`;for(const[li,mi]of Bn)Mn+=mi,ci+=` ${li}: ${mi}`;s.Log.i("{93c7910}","{0b0c6f9}",ci)}return Mn},Be=null===(a=this.jP)||void 0===a?void 0:a.JE(),at=$e("event",this.qD),At=$e("stats",Be),dt=at-this._D;let kt="";const _n=null===(u=this.pc)||void 0===u?void 0:u.getReceivers().find(Dn=>"video"===Dn.track.kind&&Dn.track.enabled),An=null===(Y=null===(L=null===(D=null===(S=null==_n?void 0:_n.transport)||void 0===S?void 0:S.iceTransport)||void 0===D?void 0:D.getSelectedCandidatePair)||void 0===L?void 0:L.call(D))||void 0===Y?void 0:Y.local;An&&(kt=`category: ${_o(An)}, type: ${An.type}`),this.telemetry.eb("LocalCandidatesCategories",kt,at,at-Ue(this.qD),At,At-Ue(Be));const tn=null!==(_e=null===(oe=this.jP)||void 0===oe?void 0:oe.ZE())&&void 0!==_e?_e:new Set;this.telemetry.eb("LocalCandidateRanges",`${null===(Ce=this.pc)||void 0===Ce?void 0:Ce.iceGatheringState}`,dt,null==tn?void 0:tn.size,this.KD.size,new Set([...tn,...this.KD]).size)}wR(a,u){var S;if(!this.dD){if(this.dD=!0,this.AR(),this.vR(),this.cD){const D={sessionId:this.session.sessionId,subSessionId:this.session.subSessionId,error:{code:a,description:u},zoneName:this.session.zoneName,zoneAddress:this.session.zoneAddress,isSessionAlive:Wo(a)};this.telemetry.Ke("SignalingState",Ve(a),null===(S=this.pc)||void 0===S?void 0:S.signalingState),s.Log.i("{93c7910}","{89d3ea6}",this.pc.signalingState),this.Kd.NR(D)}else this.lR({code:a});s.Log.e("{93c7910}","{573fb24}",Ve(a))}}xR(){for(const a of this.yD)a.streamId===We&&2===this.yD.length?a.streamId=ic:a.streamId===We?a.streamId=Me:a.streamId===Te&&(a.streamId=ve)}OR(){const a=this.yD.find(L=>L.streamId===Me),u=this.yD.find(L=>L.streamId===ic),S=this.yD.find(L=>L.streamId===ve),D=!(!u||!S);if(a)s.Log.i("{93c7910}","{a5e354c}");else if(D){const L={streamId:Me,tracks:u.tracks.concat(S.tracks)};this.yD.splice(this.yD.indexOf(u),1),this.yD.splice(this.yD.indexOf(S),1),this.yD.push(L),s.Log.i("{93c7910}","{e2dc4ec}")}else s.Log.i("{93c7910}",u?"{07f3411}":S?"{243a50b}":"{7388213}")}BR(){var a;this.OR();const u=null===(a=this.pc)||void 0===a?void 0:a.getTransceivers();if(!u)return;const S=new Map,D=new Map;for(const Y of this.yD){for(const oe of Y.tracks)oe.trackId&&S.set(oe.trackId,Y.streamId);D.set(Y.streamId,[])}let L=0;for(const Y of u){const oe=Y.receiver.track,_e=S.get(oe.id);if(void 0===_e)continue;const Ce=D.get(_e);if(Ce){if("video"===oe.kind){const Ue=this.sD[L++];if(!Ue)return s.Log.e("{93c7910}","{85759dc}"),3237093939;const $e=Ce.find(Be=>!Be.FR);$e?($e.FR=oe,$e.af=Ue):Ce.push({FR:oe,af:Ue})}else if("audio"===oe.kind){const Ue=Ce.find($e=>!$e.UR);Ue?Ue.UR=oe:Ce.push({UR:oe})}}else s.Log.w("{93c7910}","{4c622c1}",_e)}return this.LR(D)}setUpstreamMedia(a,u){return Promise.resolve(!1)}unsetUpstreamMedia(a){return Promise.resolve(!1)}stopUpstreamMedia(a){return Promise.resolve(!1)}iD(a,u){var S;null===(S=this.QD[u])||void 0===S||S.iD(a)}GR(){try{if(this.pc&&this.sendVideoTrack){const a=Bt(this.pc)[0];if(a){let u="",S=a.direction;a.direction!==ze&&(a.direction=ze,u=" ("+S+" direction is overridden by "+ze+")"),a.sender.replaceTrack(this.sendVideoTrack).then(()=>{s.Log.i("{93c7910}","{b54f651}",u)}).catch(D=>{a.direction!==S&&(a.direction=S),s.Log.w("{93c7910}","{d225159}",D)})}else s.Log.w("{93c7910}","{8272b59}")}}catch(a){s.Log.w("{93c7910}","{66082ec}",a)}}HR(a,u){s.Log.w("{93c7910}","{4d3c418}",a,u),this.telemetry.cc(u,a,"{93c7910}.ts",0,0,!0)}setCodecPreferences(a){var u,S,D;let L=0;const Y=Bt(this.pc);if(!Y.length)return L;if(!RTCRtpReceiver.getCapabilities||!RTCRtpSender.getCapabilities||!Y[0].setCodecPreferences)return s.Log.w("{93c7910}","{274c489}"),L;const oe=null===(u=RTCRtpReceiver.getCapabilities("video"))||void 0===u?void 0:u.codecs;if(!oe)return L;let _e=!1,Ce=!1;const Ue=["flexfec-03","rtx"];for(let $e=0;$e{const _n=oe.filter(An=>An.mimeType==="video/"+kt);return At=At.concat(_n),!!_n.length};if(!dt(Be.ak)&&"H264"!==Be.ak){if(1===Be.hk){s.Log.e("{93c7910}","{a3e8d28}",Be.ak),L=2;break}s.Log.w("{93c7910}","{d1d0397}",Be.ak),Be.ak="H264",dt(Be.ak),L=1}for(const kt of Ue)dt(kt);try{at.setCodecPreferences(At)}catch(kt){_e||(_e=!0,this.HR("Failed to set codec preferences to receiver capabilities",kt));try{At=At.concat(null!==(D=null===(S=RTCRtpSender.getCapabilities("video"))||void 0===S?void 0:S.codecs)&&void 0!==D?D:[]),at.setCodecPreferences(At)}catch(_n){Ce||(Ce=!0,this.HR("Failed to set codec preferences to sender and receiver capabilities",_n))}}}return L}VR(){var a;null===(a=this.pR)||void 0===a||a.uninitialize(4001),this.pR=void 0,this.Dy.startWebSocket(this.ID,this.maxReceivedAckId,this,!0)}lR(a){var u,S,D,L,Y,oe,_e;if(!this.cD){this.ND=Date.now()-this.DD,void 0===a?Mt.ar||(this.VR(),Mt.Io&&this.WR()):this.RR(),this.cD=!0,0!==this.AD&&(window.clearTimeout(this.AD),this.AD=0);for(const[Ue,$e]of this.session.streamInfo.entries())$e.bitDepth=null!==(D=null!==(u=$e.bitDepth)&&void 0!==u?u:null===(S=this.jP)||void 0===S?void 0:S.Iy(Ue))&&void 0!==D?D:8;let Ce={sessionId:this.session.sessionId,subSessionId:this.session.subSessionId,streams:this.yD,streamInfo:this.session.streamInfo,error:a,zoneName:this.session.zoneName,zoneAddress:this.session.zoneAddress,gpuType:this.session.gpuType,isResume:null!==(L=this.isResume)&&void 0!==L&&L,bitDepth:null!==(oe=null===(Y=this.jP)||void 0===Y?void 0:Y.Iy(0))&&void 0!==oe?oe:8};this.Kd._R(Ce),null===(_e=this.Zm)||void 0===_e||_e.send()}}qR(){return this.cD}LR(a){let u=!1;for(const S of a.values())for(const D of S)if(D.FR&&D.af){const L=[D.FR];D.UR&&L.push(D.UR),D.af.srcObject=new MediaStream(L)}else if(D.UR){if(!this.KS)return s.Log.e("{93c7910}","{a2fe53c}"),3237093937;if(u){s.Log.w("{93c7910}","{1376fbe}");continue}this.KS.srcObject=new MediaStream([D.UR]),u=!0}}uR(a){var u;try{if("open"===(null===(u=this.MR)||void 0===u?void 0:u.readyState)){let S=performance.now();this.MR.send(JSON.stringify(a));let D=performance.now()-S;this.Vc(D)}else s.Log.w("{93c7910}","{593db1b}")}catch(S){s.Log.e("{93c7910}","{a585a6e}",S),this.telemetry.cc(S,"sendControlMessage exception","{93c7910}.ts",0,0,!0)}}$R(a){"connecting"===zn(this.MR)?this.BD.push(a):this.uR(a)}Vc(a){var u;this.Dy.vM(a),null===(u=this.jP)||void 0===u||u.Ay(a)}OE(a){var u;null===(u=this.jP)||void 0===u||u.OE(a)}zR(a,u){var S;s.Log.d("{93c7910}","{5ba6173}",a,u),this.Yh.emit("StreamingEvent",{streamingWarnings:{code:a,secondsLeft:u}}),2===a&&(null===(S=this.KR)||void 0===S||S.dw(!0))}QR(a){let u=function(S){let D=0;switch(s.Log.d("{c00be32}","{44bd2b6}",S),S){case 1:case 2:D=1;break;case 3:case 5:break;case 4:D=2;break;case 6:D=3}return D}(a.timerNotification.code);0!==u?this.zR(u,a.timerNotification.secondsLeft):s.Log.e("{93c7910}","{de37ac5}",a.timerNotification.code)}XR(a){var u;if("Hdr10PlusGaming"===a.messageRecipient){if("Hdr10PlusGamingChange"===a.messageType&&a.data){const S=JSON.parse(a.data);null===(u=this.QD[0])||void 0===u||u.JP(S)}}else this.Yh.emit("CustomMessage",a)}YR(a,u){this.telemetry.eb("IceStats",a,0,u.KE,u.QE,u.XE)}jR(){var a;null===(a=this.JR)||void 0===a||a.start(this.pc)}fR(){var a;null===(a=this.JR)||void 0===a||a.save(),this.JR=void 0}zD(a){s.Log.d("{93c7910}","{4742d5e}"),a.candidate&&this._D++,Je()||this.pc&&this.pc.canTrickleIceCandidates&&this.pc.onicecandidate&&this.ZR(a,!0)}ZR(a,u){if(a.candidate){if(!u){const D=_o(a.candidate);if(this.qD.set(D,this.qD.get(D)+1),"IPV4"===D){const L=Pl(a.candidate);"UNKNOWN"!==L&&this.KD.add(L)}}if("tcp"===a.candidate.protocol)return void s.Log.d("{93c7910}","{6f19d1e}");s.Log.d("{93c7910}","{ac052fa}",a.candidate.port,a.candidate.protocol),this.tN(this.aD,{sdpMLineIndex:a.candidate.sdpMLineIndex,sdpMid:a.candidate.sdpMid,candidate:a.candidate.candidate}),this.gD=!0}else s.Log.d("{93c7910}","{a759d16}")}iN(a){var u,S,D,L,Y,oe,_e,Ce,Ue,$e,Bn;s.Log.d("{93c7910}","{d79ed0a}",a);try{let Be,at={},At=[];if(Mt.So.enableStunServer&&At.push({urls:"stun:s1.stun.gamestream.nvidia.com:19308"}),Mt.qo){At=[];const tn=Mt.qo.split("|");for(let Dn=0;Dnli.trim());Bn&&Mn&&ci?At.push({urls:Bn,username:Mn,credential:ci}):s.Log.w("{93c7910}","{cdc808b}",Bn,Mn,ci)}Be=Mt.iceTransportPolicy}else null!==(S=null===(u=this.session.iceServerConfiguration)||void 0===u?void 0:u.iceServers)&&void 0!==S&&S.length?(At=At.concat(this.session.iceServerConfiguration.iceServers),Be=this.session.iceServerConfiguration.iceTransportPolicy):null!==(L=null===(D=this.VM.sN)||void 0===D?void 0:D.iceServers)&&void 0!==L&&L.length&&(At=At.concat(this.VM.sN.iceServers),Be=this.VM.sN.iceTransportPolicy,At.length&&At.map(tn=>`${tn.urls} ${tn.username}`).join(" | "),s.Log.i("{93c7910}","{5d756ff}",At.length?At.map(tn=>`${tn.urls} ${tn.username}`).join(" | "):"None"));At.length&&(at.iceServers=At,at.iceTransportPolicy=Be),null===(Y=this.JR)||void 0===Y||Y.WM(at),s.Log.d("{93c7910}","{93106c2}",JSON.stringify(at)),this.aD=a,this.pc=new RTCPeerConnection(at);const dt=tn=>{var Dn,Bn,Mn,ci;this.eN&&(this.YR("disconnected",this.eN),this.eN=void 0);const li=null===(Dn=this.jP)||void 0===Dn?void 0:Dn.zE();li&&this.YR("failed",li),this.lD|=16,4&this.lD?0===(null===(Mn=this.jP)||void 0===Mn?void 0:Mn.$E())?this.wR(3237093900):0===(null===(ci=this.jP)||void 0===ci?void 0:ci._E())?this.wR(3237093901):this.wR(tn?3237093906:3237093899):this.wR(null!==(Bn=this.gR())&&void 0!==Bn?Bn:3237093894)};this.pc.onconnectionstatechange=tn=>{if(this.pc)switch(s.Log.d("{93c7910}","{4ced155}",this.pc.connectionState),this.pc.connectionState){case"connected":case"disconnected":case"closed":break;case"failed":this.PR()||dt(!1)}else s.Log.e("{93c7910}","{648f784}")},this.pc.oniceconnectionstatechange=tn=>{var Dn;if(this.pc)switch(s.Log.d("{93c7910}","{3a3143a}",this.pc.iceConnectionState),this.pc.iceConnectionState){case"new":this.lD|=1;break;case"checking":this.lD|=2;break;case"connected":this.eN=void 0,32&this.lD&&(this.Yh.emit("StreamingEvent",{streamingState:{state:"reconnected"}}),this.xD++),this.lD|=4;break;case"completed":this.eN=void 0,this.lD|=12;break;case"failed":dt(!0);break;case"disconnected":this.eN=null===(Dn=this.jP)||void 0===Dn?void 0:Dn.zE(),4&this.lD&&this.Yh.emit("StreamingEvent",{streamingState:{state:"reconnecting"}}),this.lD|=32;break;case"closed":this.lD|=64,32&this.lD&&this.wR(3237093892)}else s.Log.e("{93c7910}","{648f784}")},this.pc.ondatachannel=tn=>{s.Log.d("{93c7910}","{b364db9}",tn.channel.label),"control_channel"==tn.channel.label&&(this.jT(tn.channel,{errorCode:3237093898,open:()=>{this.MR=tn.channel;for(const Bn of this.BD)this.uR(Bn);s.Log.d("{93c7910}","{038895c}",this.BD.length),this.BD=[],this.HE(`NvRtcClient Browser name: ${this.Rs.browser}, Browser version: ${this.Rs.browserFullVer}`),this.nN("GPU Detail",this.Rs.gpuDetail),this.hN(),this.lf.Lp(0,this.UD),this.lf.Lp(1,this.UD),this.lf.Lp(2,this.UD),this.lf.TP()&&(this.oN(),this.lf.Lp(4,this.GD),this.lf.Lp(3,this.GD)),this.lf.RP()&&(this.HE("ClientGenericMapping: {ProcCpuUsage, TotalCpuUsage}"),this.rN(),this.lf.Lp(5,this.VD)),this.lf.DP()&&(this.CP(this.lf.tM()),this.lf.Lp(6,this.IP)),window.requestAnimationFrame(this.rR)}}),tn.channel.onmessage=Dn=>{var Bn;try{let Mn=JSON.parse(Dn.data);if(s.Log.d("{93c7910}","{9371373}"),Mn.exitMessage)this.wR(function(ci){if(ci.stopData){const li=function(mi){if(mi.length<2)return null;const Vi=atob(mi);let Xi=0;const Ii=()=>{const rr=256*Vi.charCodeAt(Xi)+Vi.charCodeAt(Xi+1);return Xi+=2,rr};return 0==Ii()?mi.length0);else if(Mn.videoQualitySnapshotResponse){let ci="unknown";switch(Mn.videoQualitySnapshotResponse.messageType){case 0:ci="success";break;case 1:ci="not enabled";break;case 2:ci="too many snapshots"}s.Log.i("{93c7910}","{cc428fc}",ci,Mn.videoQualitySnapshotResponse.snapshotsTaken)}else s.Log.d("{93c7910}","{d14e0fd}")}catch(Mn){s.Log.e("{93c7910}","{a40734a}",Mn),this.telemetry.cc(Mn,"Error in control_channel message handling","{93c7910}.ts",0,0,!0)}})},s.Log.d("{93c7910}","{d9ffda2}");const kt={ordered:!0,reliable:!0};if(s.Log.d("{93c7910}","{2bd4728}"),this.jd=this.pc.createDataChannel("input_channel_v1",kt),this.jd.binaryType="arraybuffer",this.jT(this.jd,{errorCode:3237093896}),this.VM.hD.oD>0){s.Log.d("{93c7910}","{860d2d7}");let tn={ordered:!1,maxPacketLifeTime:this.VM.hD.oD};s.Log.d("{93c7910}","{25e5dc3}",JSON.stringify(tn)),this.Jd=this.pc.createDataChannel("input_channel_partially_reliable",tn),this.Jd.binaryType="arraybuffer",this.jT(this.Jd,{errorCode:3237093929})}if(this.ER=this.pc.createDataChannel("cursor_channel",{ordered:!0,reliable:!0}),this.ER.binaryType="arraybuffer",this.jT(this.ER,{errorCode:3237093897}),-1!==(null!==(Bn=Mt.So.requireDS4TrackpadForAppIds)&&void 0!==Bn?Bn:[]).indexOf(this.session.appId)&&this.Jm.Vu(),this.Jm.Gu(this.VM.hD.rD),this.sD.length&&(this.KR=new Fs(this,this.sD[0],this.jd,this.ER,this.telemetry,this.Yh,this.df,2===this.appLaunchMode,this.jm,this.Jm,this.Rs,this.Kd,this.Zm,this.lf,this.Zd,this.ur,this.VM.hD,this.Jd,this.textInputElement)),this.OD&&(this.setKeyboardLayout(this.keyboardLayout),this.OD=!1),Mt.yo){s.Log.d("{93c7910}","{9ae428b}");const tn={zoneName:this.session.zoneName,clientAppVersion:null!==(oe=this.clientAppVersion)&&void 0!==oe?oe:"",appId:this.session.appId,My:null!==(_e=this.My)&&void 0!==_e?_e:"",gpuType:this.session.gpuType,streamInfo:null!==(Ce=this.session.streamInfo[0])&&void 0!==Ce?Ce:{width:0,height:0,fps:0},clientLocale:this.session.clientLocale};this.jP=new Ol(this.Yh,this,this.sD,this.pc,this.VM.video,this.telemetry,this.Rs,tn,this.lf,this.Zd,this.ur,this.Dy);for(const Dn of this.QD)Dn.YP(this.jP);PerformanceObserver&&(this.perf=new PerformanceObserver(Dn=>this.XD(Dn)))}this.pc.addEventListener("icecandidate",this.$D),this.pc.onsignalingstatechange=tn=>{s.Log.i("{93c7910}","{3236227}",this.pc.signalingState)},this.pc.onicecandidate=tn=>this.ZR(tn),this.pc.onicecandidateerror=tn=>{s.Log.w("{93c7910}","{9871b05}",tn.port,tn.url,tn.errorCode,tn.errorText)};const An=!ln(this.Rs)&&(null===(Ue=this.enableMicUpstream)||void 0===Ue||Ue);(null!==($e=Mt.$o)&&void 0!==$e?$e:An)&&this.eD.initialize(this.pc,this.Yh,this.sD[0],this.KS),this.pc.ontrack=tn=>{var Dn;const Bn=tn.streams[0];s.Log.d("{93c7910}","{47359d4}",Bn.id,tn.track.kind,tn.track.id,tn.streams.length,Ve(this.lD));let Mn={kind:"video"===tn.track.kind?"video":"audio",trackId:tn.track.id};"audio"!==tn.track.kind||Bn.id!==We&&Bn.id!==Me&&Bn.id!==Te&&Bn.id!==ve||(this.FD=tn.track.id,this.aN(Bn),null===(Dn=this.nD)||void 0===Dn||Dn.initialize(new MediaStream(Bn.getAudioTracks())));let ci=this.yD.find(li=>li.streamId===Bn.id);ci?ci.tracks.push(Mn):this.yD.push({streamId:Bn.id,tracks:[Mn]}),this.dN()}}catch(Be){s.Log.e("{93c7910}","{ff11182}",Be),this.telemetry.cc(Be,"Exception in creating peer connection","{93c7910}.ts",0,0,!0)}}AR(){this.KR&&(this.KR.uninitialize(),this.KR=void 0)}vR(){var a;null===(a=this.jP)||void 0===a||a.stop()}cN(a){const u=S=>S.startsWith("a=candidate:")?(this.wD=!0,"a="+this.lN(S.substr(2))):S;a.uN=a.uN.map(u);for(const S of a.AN)S.lines=S.lines.map(u)}lN(a){s.Log.d("{93c7910}","{2dd62a2}");const u=this.session.mediaConnectionInfo.find(S=>2===S.usage||17===S.usage);if(u){let S=a.split(" ");u.ip&&(S[4]=u.ip),u.port&&(S[5]=""+u.port);let D=S.join(" ");return s.Log.d("{93c7910}","{1fbcd88}",D),D}return s.Log.d("{93c7910}","{aee7283}"),a}TR(){const a=this.yD.flatMap(u=>u.tracks);for(const u of this.kD)if(!a.find(S=>S.trackId===u.trackId))return"audio"===u.kind?3237093914:3237093905;return s.Log.d("{93c7910}","{4fef10b}"),a.length>this.kD.length&&s.Log.w("{93c7910}","{7861bb3}"),15859712}vN(){let a=this.pc.getTransceivers();if(0===a.length)return s.Log.d("{93c7910}","{3399d9d}"),void this.lR({code:3237093909});for(const u of a)"3"===u.mid&&u.receiver.track.id!==this.FD?(s.Log.i("{93c7910}","{981392f}"),u.receiver.track.enabled=!1):this.kD.push({trackId:u.receiver.track.id,kind:u.receiver.track.kind});s.Log.d("{93c7910}","{648ae93}",JSON.stringify(this.kD))}mR(a,u){var S=this;return r(function*(){var D,At;s.Log.d("{93c7910}","{9978507}",a);try{const L=JSON.parse(u);if("offer"===L.type){let Y,oe;S.mD=!0;let _e=L.sdp||"";const Ce=null!==(D=L.nvstServerOverrides)&&void 0!==D?D:"";s.Log.d("{93c7910}","{ca9a155}",Oi(_e));const Ue=yield S.YD,$e=Jt(_e);if(Ot.fN($e,Ue,S.VM.video),L.nvstSdp){if(oe=function(At){let dt,kt,_n={origin:"",time:"",dk:new Map,media:[]},An=new Map,tn=!1;const Dn=()=>{if(tn){if(!kt||!dt)return s.Log.e("{eb7c2d0}","{adc37a7}"),!1;_n.media.push({ck:kt,lk:dt,attributes:An}),kt=void 0,dt=void 0}else _n.dk=An,tn=!0;return An=new Map,!0};for(const Bn of mo(At)){if(Bn.length<2||"="!==Bn[1])continue;const Mn=Bn[0],ci=Bn.substr(2);if("m"==Mn){if(!Dn())return;kt=ci.split(" ")[0]}else if("a"==Mn){const li=ci.indexOf(":");if(-1===li)continue;const mi=ci.slice(0,li),Vi=ci.slice(li+1);if("msid"===mi){if(void 0!==dt)return void s.Log.e("{eb7c2d0}","{dc7fbec}",Vi);dt=Vi}else An.set(mi,Vi)}else if("t"==Mn){if(tn)return void s.Log.e("{eb7c2d0}","{14fc069}");_n.time=ci}else if("o"==Mn){if(tn)return void s.Log.e("{eb7c2d0}","{eb0287a}");_n.origin=ci}}if(Dn()){if(""!==_n.time&&""!==_n.origin)return _n;s.Log.e("{eb7c2d0}","{8e7e486}")}}(L.nvstSdp),!oe)return void S.lR({code:3237093911});if(Y=S.pN(oe,Ce),!Y)return}S.JR=new _a(S.VM),S.iN(a);let Be=Date.now();S.cN($e),Ot.mN($e,S.VM.video.map(At=>({minWidth:960,maxWidth:At.jb,minHeight:540,maxHeight:At.Jb,gN:30,Zb:At.Zb}))),(null===(At=Mt.So.allowUpdateH265Tier)||void 0===At||At)&&function(At){var dt,kt,_n,An;if(null!==(kt=null===(dt=null==RTCRtpReceiver?void 0:RTCRtpReceiver.getCapabilities("video"))||void 0===dt?void 0:dt.codecs)&&void 0!==kt&&kt.some(Bn=>{var Mn;return"video/H265"===Bn.mimeType&&(null===(Mn=Bn.sdpFmtpLine)||void 0===Mn?void 0:Mn.includes("tier-flag=1"))}))return void s.Log.i("{93c7910}","{9da2c0f}");const tn=/^a=fmtp:([0-9]+)/;let Dn=!1;for(const Bn of At.AN)if(null!==(_n=Bn.lines[0])&&void 0!==_n&&_n.startsWith("m=video"))for(const[Mn,ci]of Bn.lines.entries()){const li=ci.match(tn);li&&("H265"===(null===(An=Bn.wN.get(li[1]))||void 0===An?void 0:An.codec)&&(Bn.lines[Mn]=ci.replace("tier-flag=1","tier-flag=0"),Dn=!0))}Dn&&s.Log.i("{93c7910}","{c656b20}")}($e);const at=Ot.SN($e);at&&Ot.bN($e,at),_e=Vn($e),s.Log.d("{93c7910}","{542f9d5}",Oi(_e)),S.pc.setRemoteDescription({type:L.type,sdp:_e}).then(()=>{S.TD=Date.now()-Be,S.vN(),s.Log.d("{93c7910}","{ab7b3af}",S.TD),S.xR();const At=S.BR();if(At)return void S.wR(At);S.GR();const dt=S.setCodecPreferences(S.VM.video);2!==dt?1===dt&&oe&&(Y=S.pN(oe,Ce),!Y)||(S.jR(),Be=Date.now(),S.pc.createAnswer().then(kt=>{var _n;S.MD=Date.now()-Be,s.Log.d("{93c7910}","{2984003}",S.MD);const An=S.VM.video.map(tn=>({max:tn.tk.toString(),min:tn.nk.toString(),kN:tn.ik.toString()}));if(s.Log.d("{93c7910}","{b535c15}",Oi(dr(null!==(_n=kt.sdp)&&void 0!==_n?_n:""))),kt.sdp){const tn=Jt(kt.sdp);Ot.yN(tn,An),Je()&&Ot.IN(tn,An),Ot.CN(tn),at&&Ot.TN(tn,at),kt.sdp=Vn(tn),s.Log.d("{93c7910}","{1a048a7}",Oi(dr(kt.sdp)))}Be=Date.now(),S.pc.setLocalDescription(kt).then(()=>{if(S.ED=Date.now()-Be,s.Log.d("{93c7910}","{de86c01}",S.ED),kt.sdp&&!Je()){const Dn=Jt(kt.sdp);Ot.IN(Dn,An),kt.sdp=Vn(Dn)}if(kt.sdp&&Y){const Dn=Us.WP(kt.sdp),Bn=Dn.shift(),Mn=Us.XP(Dn[0],Bn),ci=Us.KP(Dn[0],Bn),li=Us.WP(Y);li[0]+="a=general.icePassword:"+Mn.password+"\r\n",li[0]+="a=general.iceUserNameFragment:"+Mn.usernameFragment+"\r\n",li[0]+="a=general.dtlsFingerprint:"+ci.QP[0].value+"\r\n",Y=li.join("")}S.tN(a,{type:kt.type,sdp:kt.sdp,nvstSdp:Y}),s.Log.i("{93c7910}","{bd70666}",JSON.stringify(S.yD)),S.dN()}).catch(tn=>{s.Log.e("{93c7910}","{ba2deaa}",tn),S.wR(3237093902)})}).catch(kt=>{s.Log.d("{93c7910}","{40c0f69}",kt)})):S.wR(3237093938)}).catch(At=>{s.Log.e("{93c7910}","{ec2853e}",At),S.wR(3237093902)})}else if(L.candidate){s.Log.d("{93c7910}","{cf4c103}");let Y=S.lN(L.candidate);s.Log.d("{93c7910}","{43e80e0}",Y),S.pc.addIceCandidate({sdpMLineIndex:L.sdpMLineIndex,sdpMid:L.sdpMid,candidate:Y}).then(()=>{s.Log.d("{93c7910}","{db0ae14}"),S.wD=!0}).catch(oe=>{s.Log.e("{93c7910}","{62f207e}",oe),S.telemetry.Ke("AddCandidateFailed",null==oe?void 0:oe.name,null==oe?void 0:oe.message)}),s.Log.d("{93c7910}","{9454009}")}}catch(L){"BYE"===u?S.wR(15868672):(s.Log.e("{93c7910}","{93367fc}",L),S.telemetry.cc(L,"Invalid handlePeerMessage Response","{93c7910}.ts",0,0,!0))}})()}pN(a,u){var S;const D=function(L,Y,oe,_e){const Ce=function(Ue,$e,Be){var at,At,dt;const kt={origin:Ue.origin,time:Ue.time,dk:new Map,media:[]};kt.dk.set("general.clientSupportsIntraRefresh",Ct(Be)?"0":"1"),kt.dk.set("general.clientCapture",null!==(at=Ue.dk.get("general.clientCapture"))&&void 0!==at?at:"0"),kt.dk.set("runtime.serverTraceCapture","2");let _n=0;for(const An of Ue.media){const tn=new Map;"video"===An.ck&&_n<$e.video.length&&(go(tn,$e.video[_n],Be),_n++),"application"===An.ck&&sr(tn,An),kt.media.push({ck:An.ck,lk:An.lk,attributes:tn})}return kt.dk.set("general.turnInfo",null!==(At=Ue.dk.get("general.turnInfo"))&&void 0!==At?At:""),kt.dk.set("general.iceTransportPolicy",null!==(dt=Ue.dk.get("general.iceTransportPolicy"))&&void 0!==dt?dt:""),kt}(Y,L,_e);return Ss(null!==($e=null===(Ue=Mt.So.nvscClientConfigFields)||void 0===Ue?void 0:Ue.join("\n"))&&void 0!==$e?$e:"",Ce,Y,"remoteconfig"),Ss(oe,Ce,Y,"server"),Mt.isInternalUser&&!Ss(Mt.clientConfigOverride,Ce,Y,"client")?{error:3237093917}:function(Ue,$e){let Be=!0;const at=(tn,Dn)=>{const Bn=tn.get(Dn);if(Bn){const Mn=parseInt(Bn);if(!Number.isNaN(Mn))return Mn}return s.Log.e("{eb7c2d0}","{0a60213}",Dn),Be=!1,0},At=(tn,Dn)=>at(tn,Dn)>0,dt=(tn,Dn)=>{const Bn=tn.get(Dn);if(Bn)try{return BigInt(Bn)}catch{s.Log.e("{eb7c2d0}","{66a68eb}",Bn)}return s.Log.e("{eb7c2d0}","{0a60213}",Dn),Be=!1,BigInt(0)};Ue._M=at($e.dk,"general.clientCapture");let kt=0;for(const tn of $e.media){if("video"===tn.ck&&kt{const[Dn,Bn,,Mn]=tn.split(",");return`${Dn} (${Mn})`}).join(" | ")),s.Log.i("{eb7c2d0}","{f32ebdb}",An),Ue.sN=function(tn,Dn){const Bn=[];for(const Mn of tn.split("|")){const[ci,li,mi,Vi]=Mn.split(",").map(Xi=>Xi.trim());ci&&li&&mi&&Vi?Bn.push({urls:`${ci}?transport=${Vi}`,username:li,credential:mi}):s.Log.w("{eb7c2d0}","{d516cac}",Mn)}return{iceServers:Bn,iceTransportPolicy:"0"==Dn?"all":"relay"}}(_n,An)),Be}(L,Ce)?{config:L,EN:Dl(Ce,Y)}:{error:3237093918};var Ue,$e}(this.VM,a,u,this.Rs);return D.config&&D.EN?this.VM=D.config:this.lR({code:null!==(S=D.error)&&void 0!==S?S:3237093910}),D.EN}$p(a){var u,S;null===(u=this.jP)||void 0===u||u.$p(a),window.setTimeout(()=>this.rv()),null===(S=this.KR)||void 0===S||S.$p(a)}rv(){var a,u;this.dD||window.requestAnimationFrame(this.rR),null===(a=this.KR)||void 0===a||a.rv(),null===(u=this.jP)||void 0===u||u.rv()}toggleOnScreenStats(a=!1,u){Mt.isInternalUser&&(this.MN()?this.jP.toggleOnScreenStats(a,u):this.Wm("Stats is OFF. Please enable by ctrl+alt+F5/F6"))}Pm(){if(this.MN())return this.jP.Pm()}Mw(){this.vD?(this.Dy.stopProfiling(),this.vD=!1,this.PN(),this.Wm("Profiler: OFF, Stats: OFF")):(this.WR(),this.DN(),this.Wm("Profiler: ON, Stats: ON"))}Pw(){this.MN()?(this.PN(),this.Wm("Stats: OFF")):(this.DN(),this.Wm("Stats: ON"))}Rw(){var a;null===(a=this.jP)||void 0===a||a.Rw(0),this.Wm("User marker added")}Nw(){this.$R({videoQualitySnapshot:{}})}MN(){var a;return!(null===(a=this.jP)||void 0===a||!a.isEnabled())}DN(){var a;null===(a=this.jP)||void 0===a||a.AE()}PN(){var a;null===(a=this.jP)||void 0===a||a.lE()}tN(a,u){const S=JSON.stringify(u),D={peer_msg:{from:this.id,to:a,msg:S},ackid:this.iM.co()};s.Log.d("{93c7910}","{7ecb902}",a,S.length,Oi(dr(JSON.stringify(D)))),this.pR?this.pR.send(D):this.Dy.AM(D)}_E(){return this.jP?this.jP._E():0}wy(a){var u,S;let D=null===(u=this.jP)||void 0===u?void 0:u.wy(a);return void 0!==D&&"UNKNOWN"!==D||(D=null===(S=this.VM.video[a])||void 0===S?void 0:S.ak),D}toggleUserInput(a,u){this.KR?this.KR.toggleUserInput(a,u):s.Log.e("{93c7910}","{5a0e299}",a)}toggleRsdmm(a){var u;null===(u=this.KR)||void 0===u||u.toggleRsdmm(a)}Wm(a){this.tR.innerHTML=a,this.tR.style.display="block",this.uD&&clearTimeout(this.uD),this.uD=window.setTimeout(()=>{this.tR.style.display="none"},1e3)}WR(){this.Dy.startProfiling({stats:{from:this.id,to:this.aD}}),this.vD=!0}static yN(a,u){const S=fo(a);for(let D=0;D{var Be;return null===(Be=$e.lines[0])||void 0===Be?void 0:Be.startsWith("m=audio")});if(!u)return;let S,D,L,Y;for(const[$e,Be]of u.wN)"multiopus"===Be.codec?(S=$e,L=Be.channels,s.Log.i("{93c7910}","{898cad9}",S,L)):"red"===Be.codec&&(D=$e,Y=Be.channels,s.Log.i("{93c7910}","{8c08358}",D,Y));if(!S)return void s.Log.d("{93c7910}","{b49e215}");let oe=[],_e=[],Ce="";const Ue=/^a=(?:rtpmap|rtcp-fb|fmtp):([0-9]+)/;for(const $e of u.lines){const Be=$e.match(Ue);if(!Be)continue;const at=Be[1];at===S?(oe.push($e),$e.includes("fmtp")&&(Ce=$e.split(" ")[1])):at===D&&_e.push($e)}return{RN:D,NN:S,xN:_e,BN:oe,FN:null!=L?L:"",UN:null!=Y?Y:"",LN:Ce}}static bN(a,u){const S=a.AN.find(Y=>{var oe;return null===(oe=Y.lines[0])||void 0===oe?void 0:oe.startsWith("m=audio")});if(!S)return;if(u.UN&&u.UN!==u.FN){s.Log.w("{93c7910}","{ad53601}",u.UN,u.FN);const Y=S.lines[0].split(" ");for(let _e=3;_e{const Ce=_e.match(oe);return!Ce||Ce[1]!==u.RN})}const D=/^a=rtpmap:([0-9]+)/,L=/^a=fmtp:([0-9]+)/;for(const[Y,oe]of S.lines.entries()){const _e=oe.match(D);if(_e){const Ue=_e[1];Ue===u.NN?S.lines[Y]=ai(oe,"opus","2"):Ue===u.RN&&(S.lines[Y]=ai(oe,void 0,"2"))}const Ce=oe.match(L);if(Ce&&Ce[1]===u.NN){const Ue=oe.split(" "),$e=Ue[1].split(";").filter(Be=>!Be.startsWith("channel_mapping")&&!Be.startsWith("num_streams")&&!Be.startsWith("coupled_streams"));S.lines[Y]=Ue[0]+" "+$e.join(";")}}}static TN(a,u){const S=a.AN.find(Y=>{var oe;return null===(oe=Y.lines[0])||void 0===oe?void 0:oe.startsWith("m=audio")});if(!S)return;const D=/^a=rtpmap:([0-9]+)/,L=/^a=fmtp:([0-9]+)/;for(const[Y,oe]of S.lines.entries()){const _e=oe.match(D);if(_e){const Ue=_e[1];Ue===u.NN?S.lines[Y]=ai(oe,"multiopus",u.FN):Ue===u.RN&&(S.lines[Y]=ai(oe,void 0,u.UN))}const Ce=oe.match(L);if(Ce&&Ce[1]===u.NN){const Ue=oe.split(" ");S.lines[Y]=Ue[0]+" "+u.LN}}}static CN(a){var u,S;const D=/^a=fmtp:([0-9]+)/;for(const L of a.AN)if(null!==(u=L.lines[0])&&void 0!==u&&u.startsWith("m=audio"))for(const[Y,oe]of L.lines.entries()){const _e=oe.match(D);_e&&"opus"===(null===(S=L.wN.get(_e[1]))||void 0===S?void 0:S.codec)&&(L.lines[Y]=oe+";stereo=1",s.Log.d("{93c7910}","{6540768}",L.lines[Y]))}}static mN(a,u){var S;const D=fo(a);for(let L=0;L_e.startsWith("a=imageattr")))s.Log.d("{93c7910}","{b38bf22}");else for(const[_e,Ce]of Y.lines.entries())if(Ce.startsWith("a=fmtp:")){const Ue=Ce.slice(7,Ce.indexOf(" ")),$e=null===(S=Y.wN.get(Ue))||void 0===S?void 0:S.codec;"H264"!==$e&&"H265"!==$e||(Y.lines[_e]=Ce+`\r\na=imageattr:${Ue} send [x=[${oe.minWidth}:${oe.maxWidth}],y=[${oe.minHeight}:${oe.maxHeight}],fps=[${oe.gN}:${oe.Zb}]]`)}}}static IN(a,u){var S;const D=fo(a);for(let L=0;L0&&"connecting"!==zn(this.MR)&&"connecting"!==zn(this.ER)&&"connecting"!==zn(this.jd)&&(!this.Jd||"connecting"!==zn(this.Jd))&&15859712===this.TR()&&this.lR()}aN(a){let u=function(S){let D;const L=S.getAudioTracks();return L.length&&(D=L[0]),D}(a);u&&(u.onunmute=()=>{this.SD=!1})}setKeyboardLayout(a){this.keyboardLayout=a,this.KR?(this.sendCustomMessage({messageType:"kbLayout",messageRecipient:"KBLayoutChange",data:a}),this.KR.setKeyboardLayout(a)):this.OD=!0}dR(){s.Log.d("{93c7910}","{440d709}",this.ur.bd(),performance.timeOrigin)}jT(a,u){const S=a.label;let D=!1;a.onopen=()=>{var L;s.Log.d("{93c7910}","{8e9ee5d}",S),null===(L=u.open)||void 0===L||L.call(u),u.errorCode&&this.dN()},a.onclosing=()=>{s.Log.d("{93c7910}","{d0c8ae7}",S),D=!0},a.onclose=()=>{var L;s.Log.d("{93c7910}","{a3c9826}",S),null===(L=u.close)||void 0===L||L.call(u),u.errorCode&&this.PR()},a.onerror=L=>{s.Log.e("{93c7910}","{fcd64bb}",S),D&&u.errorCode?this.DR():(this.WN(S,L,a.bufferedAmount),u.errorCode&&this.wR(u.errorCode))}}hN(){var a,u;let S=0;this.lf.Jp()&&(S|=2),this.lf.UP()&&(S|=1),this.lf.Lm()&&(S|=16);for(let D=0;D{var u;return null===(u=a.lines[0])||void 0===u?void 0:u.startsWith("m=video")})}class qr{constructor(a,u){this._N=window.indexedDB,this.version=2,this.qN=!1,this.$N=!1,this.name=a,this.zN=u}open(){return new Promise((a,u)=>{try{if(this._N){let S=this._N.open(this.name,this.version);S.onerror=D=>{u(it(18,`${this.name} db opening failed`,S.error))},S.onsuccess=D=>{this.KN(S.result),a()},S.onupgradeneeded=D=>{s.Log.i("{10dc2cc}","{1f70767}",D.oldVersion,D.newVersion),this.KN(S.result);const L=Y=>{var oe;const _e=null===(oe=this.QN)||void 0===oe?void 0:oe.createObjectStore(Y.XN,Y.YN);Y.YN.keyPath&&(null==_e||_e.createIndex(Y.jN,Y.YN.keyPath,{unique:!0}))};switch(D.oldVersion){case 0:L(this.zN[0]);case 1:L(this.zN[1])}},S.onblocked=D=>{u(it(19,`${this.name} db blocked during opening`,S.error))}}else u(it(17,"Indexdb object not found"))}catch(S){u(it(20,"Unexpected Exception in open",S))}})}JN(){if(!this._N)return it(17,"Indexdb object not found");if(!this.QN)return it(1,"Db not yet open");if(this.qN){const a="hidden"===document.visibilityState;return it(2,"Db is closing, unexpectedly: "+this.$N+", visibility state hidden: "+a)}}get(a,u){const S=this.JN();return S?Promise.reject(S):new Promise((D,L)=>{try{const Y=this.QN.transaction(a,"readonly"),oe=Y.objectStore(a);Y.oncomplete=Ce=>{s.Log.i("{10dc2cc}","{82638ba}")};const _e=oe.get(u);_e.onsuccess=()=>{D(_e.result)},_e.onerror=Ce=>{L(it(32,"get method failed",Y.error))}}catch(Y){L(it(33,"Unexpected Exception happened in get",Y))}})}set(a,u){const S=this.JN();return S?Promise.reject(S):new Promise((D,L)=>{try{const Y=this.QN.transaction(a,"readwrite"),oe=Y.objectStore(a);Y.oncomplete=Ce=>{s.Log.i("{10dc2cc}","{f993875}")};const _e=oe.put(u);_e.onsuccess=()=>{D()},_e.onerror=Ce=>{L(it(48,"put method failed",Y.error))}}catch(Y){L(it(49,"Unexpected Exception happened in set",Y))}})}delete(a,u){const S=this.JN();return S?Promise.reject(S):new Promise((D,L)=>{try{const Y=this.QN.transaction(a,"readwrite"),oe=Y.objectStore(a);Y.oncomplete=Ce=>{s.Log.i("{10dc2cc}","{bc32bd7}")};const _e=oe.delete(u);_e.onsuccess=()=>{D()},_e.onerror=Ce=>{L(it(64,"delete method failed",Y.error))}}catch(Y){L(it(65,"Unexpected Exception in delete",Y))}})}clear(a){const u=this.JN();return u?Promise.reject(u):new Promise((S,D)=>{try{const L=this.QN.transaction(a,"readwrite"),Y=L.objectStore(a);L.oncomplete=_e=>{s.Log.i("{10dc2cc}","{30f23d1}")};const oe=Y.clear();oe.onsuccess=()=>{S()},oe.onerror=_e=>{D(it(80,"clear method failed)",L.error))}}catch(L){D(it(81,"Unexpected Exception happened in clear",L))}})}getAll(a){const u=this.JN();return u?Promise.reject(u):new Promise((S,D)=>{try{const L=this.QN.transaction(a,"readonly"),Y=L.objectStore(a);L.oncomplete=_e=>{s.Log.i("{10dc2cc}","{59d1f78}")};const oe=Y.getAll();oe.onsuccess=()=>{S(oe.result)},oe.onerror=_e=>{D(it(96,"getAll method failed",L.error))}}catch(L){D(it(97,"Unexpected Exception in getAll",L))}})}close(){var a;this.qN=!0,null===(a=this.QN)||void 0===a||a.close()}KN(a){this.qN=!1,this.$N=!1,this.QN=a,this.QN.onversionchange=u=>{s.Log.w("{10dc2cc}","{65276d8}"),this.close(),this.QN=void 0},this.QN.onclose=u=>{s.Log.w("{10dc2cc}","{342f7f8}"),this.qN=!0,this.$N=!0}}}const so=new class{constructor(){var m;this.ZN=new Map([["Ethernet",s.NetworkType.ETHERNET],["5GHz_WiFi",s.NetworkType.WIFI_5_0],["2.4GHz_WiFi",s.NetworkType.WIFI_2_4],["Others",s.NetworkType.OTHER],["disconnected",s.NetworkType.UNKNOWN],["wifi",s.NetworkType.WIFI],["ethernet",s.NetworkType.ETHERNET],["none",s.NetworkType.UNKNOWN],["bluetooth",s.NetworkType.BLUETOOTH],["wimax",s.NetworkType.WIMAX],["other",s.NetworkType.OTHER],["mobile",s.NetworkType.MOBILE],["unknown",s.NetworkType.UNKNOWN],["NONE",s.NetworkType.UNKNOWN],["UNKNOWN",s.NetworkType.UNKNOWN],["ETHERNET",s.NetworkType.ETHERNET],["WIFI",s.NetworkType.WIFI],["NET_PROXY",s.NetworkType.OTHER],["2G",s.NetworkType.MOBILE_2G],["2.5G",s.NetworkType.MOBILE_2G],["3G",s.NetworkType.MOBILE_3G],["4G",s.NetworkType.MOBILE_4G]]),this.tx=s.NetworkType.UNKNOWN,this.ix=[],window.addEventListener("GFNNetworkInfo",u=>{const S=u;s.Log.d("{aac1655}","{2925c9d}",S.detail.state),this.sx(S.detail.state)});const a=navigator.connection;if(null!=a&&a.type&&(this.sx(a.type),a.addEventListener("change",u=>{var S;const D=null===(S=navigator.connection)||void 0===S?void 0:S.type;D&&(s.Log.d("{aac1655}","{4a9e05b}",D),this.sx(D))})),null===(m=window.tizen)||void 0===m?void 0:m.systeminfo){const u="NETWORK",S=D=>{const L=D.networkType;L&&(s.Log.d("{aac1655}","{e9b5f27}",L),this.sx(L))};try{window.tizen.systeminfo.getPropertyValue(u,S),window.tizen.systeminfo.addPropertyValueChangeListener(u,S)}catch(D){s.Log.w("{aac1655}","{7d035ae}",D)}}}sx(m){const a=this.ZN.get(m);if(a){this.tx=a;for(const u of this.ix)u(this.getCurrentNetworkType())}else s.Log.d("{aac1655}","{1e3c13d}",m)}registerCallback(m){this.ix.push(m)}unregisterCallback(m){const a=this.ix.findIndex(u=>u==m);-1!==a&&this.ix.splice(a,1)}getCurrentNetworkType(){return this.tx}},sa="exit-events",Qa="telemetry-events";class cl{constructor(){this.nx={userId:"",sessionId:"",eventPayload:void 0,name:""},this.hx={},this.ox=!1,this.lx=!1,this.ux=!1,this.Ax=!1,this.vx="",this.mx="",this.gM=[],this.gx=!1,this.wx=new qr("ragnarok",[{XN:sa,YN:{keyPath:["userId","sessionId","name"]},jN:"exit-event-index"},{XN:Qa,YN:{keyPath:["userId","sessionId","name","eventPayload.ts"]},jN:"telemetry-event-index"}]),this.Sx=this.wx.open().catch(u=>{this.gx=!0,this.bx(u,"TelemetryEventProcessorConstruction",!0)})}kx(a){this.yx=a}Ix(a){let u=!1;return this.hx.commonData&&(a!==s.GdprLevel.FUNCTIONAL||"Full"!==this.hx.commonData.deviceGdprFuncOptIn&&"Temp"!==this.hx.commonData.deviceGdprFuncOptIn?(a===s.GdprLevel.TECHNICAL&&"Full"===this.hx.commonData.gdprTechOptIn||a===s.GdprLevel.BEHAVIORAL&&"Full"===this.hx.commonData.gdprBehOptIn)&&(u=!0):u=!0),u}Cx(a){this.hx.commonData?this.Ix(a.gdprLevel)&&(window.navigator.onLine?this.Tx(this.Ex(a)):this.Mx({userId:this.hx.commonData.userId,sessionId:this.hx.commonData.sessionId,name:a.name,eventPayload:a})):this.gM.push(a)}Ex(a){let u={};if(!this.hx.commonData)return u;const S={name:a.name,ts:a.ts,parameters:a.parameters};this.Px(u,this.hx);const D=u.commonData;return D.clientId=a.clientConfig.clientId,D.eventSchemaVer=a.clientConfig.eventSchemaVer,D.sentTs=(new Date).toISOString(),D.events=[S],u}Tx(a){var u,S,D,L;if(null!==(u=a.config)&&void 0!==u&&u.server&&null!==(S=a.config)&&void 0!==S&&S.version){const Y={method:"POST",headers:{"Content-Type":"application/json","X-Event-Protocol":null!==(L=null===(D=a.commonData)||void 0===D?void 0:D.eventProtocol)&&void 0!==L?L:"1.5"},body:JSON.stringify(a.commonData),retryCount:3,timeout:2e3};s.Log.i("{f7c1592}","{056661f}",Y.body),s.performHttpRequest(this.Dx(a.config),Y).then(oe=>{}).catch(oe=>{})}}Rx(a,u){this.mx=a,this.vx=u}Nx(a){var u;s.Log.d("{f7c1592}","{01dcfe5}",null===(u=a.parameters)||void 0===u?void 0:u.sessionId),this.xx(a),this.Ox(this.Ex(this.nx.eventPayload))}Bx(a){s.Log.d("{f7c1592}","{badefed}",a),this.Fx(a),this.nx.eventPayload=void 0}Px(a,u){a.commonData=u.commonData?Object.assign({},u.commonData):void 0,a.experiments=[],a.config=u.config,a.telemetryEventIds=u.telemetryEventIds}updateEventDataElements(a){var u;if(this.Px(this.hx,a),this.hx.commonData){s.Log.d("{f7c1592}","{66f209c}");for(let S of this.gM)this.Cx(S);this.gM=[]}this.nx.userId=null===(u=this.hx.commonData)||void 0===u?void 0:u.userId}xx(a){var u,S,D;this.nx.userId=null!==(S=null===(u=this.hx.commonData)||void 0===u?void 0:u.userId)&&void 0!==S?S:"",this.nx.sessionId=null!==(D=a.parameters.sessionId)&&void 0!==D?D:"",this.nx.name=a.name,this.nx.eventPayload=a}Ux(a,u,S,D,L,Y,oe,_e){const Ue=this.Lx({exitErrorCode:a,sessionId:u,subSessionId:S,zoneAddress:D,streamDuration:L,frameCount:Y,codec:oe,isResume:_e,sleep:!1,networkTestSessionId:""});return this.xx(Ue),Ue}Lx(a){var u;const S=new $o({zoneAddress:a.zoneAddress,networkSessionId:null!==(u=a.networkTestSessionId)&&void 0!==u?u:"",sessionId:a.sessionId,subSessionId:a.subSessionId,resumeType:Ht(a.isResume),overrideConfigType:Mt.Nn.type,overrideConfigVersion:Mt.Nn.version,exitReason:Ta(a.connectivityInfo,a.sleep),result:a.exitErrorCode,frameCount:a.frameCount,codec:Ns(a.codec),ipVersion:"UNKNOWN",streamDuration:Math.round(a.streamDuration),networkType:Lt(so.getCurrentNetworkType()),streamingProfileGuid:this.Gx(),systemInfoGuid:this.Hx(),cmsId:String(this.mx)});return{name:S.name,gdprLevel:S.gdprLevel,parameters:S.parameters,ts:S.ts,clientConfig:Zo}}bx(a,u,S){var D,L,Y,oe;if(s.Log.e("{f7c1592}","{146ec91}",u,Ve(a.code),a.description),S){const _e=null!==(Y=null!==(L=null===(D=a.error)||void 0===D?void 0:D.message)&&void 0!==L?L:a.description)&&void 0!==Y?Y:`Exception in ${u}`;this.yx?this.yx(a.error,_e,"telemetryeventprocessor.ts",a.code,0,!0,null===(oe=a.error)||void 0===oe?void 0:oe.name):s.Log.w("{f7c1592}","{12e0846}")}}Vx(a){return!!a.userId&&!!a.sessionId&&!!a.name}Mx(a){!this.gx&&this.Vx(a)&&this.Sx.then(()=>this.wx.set(Qa,a)).then(()=>{s.Log.i("{f7c1592}","{f03d70b}")}).catch(u=>{const S=!this.ux;this.ux=!0,this.bx(u,"cacheTelemetryEventInDb",S)})}Wx(){return this.gx||!this.Vx(this.nx)?Promise.resolve():this.Sx.then(()=>this.wx.set(sa,this.nx)).then(()=>{s.Log.i("{f7c1592}","{5d026f8}")}).catch(a=>{this.bx(a,"cacheExitEventInDb",!this.ox),this.ox||(this.ox=!0)})}Dx(a){return a.server+"/"+a.version+"/events/json"}Ox(a){var u,S;if(null!==(u=a.config)&&void 0!==u&&u.server&&null!==(S=a.config)&&void 0!==S&&S.version&&a.experiments){a.commonData&&(a.commonData.sentTs=(new Date).toISOString());const D=JSON.stringify(a.commonData),L=new Blob([D],{type:"text/plain"});let Y=!1;Y=navigator.sendBeacon(this.Dx(a.config),L),s.Log.i("{f7c1592}","{b9367c5}",Y,D)}}Fx(a){this.gx||a&&this.Sx.then(()=>this.wx.clear(sa)).then(()=>{s.Log.i("{f7c1592}","{1b8f127}")}).catch(u=>{this.bx(u,"clearExitEventStoreInDb",!this.lx),this.lx||(this.lx=!0)})}_x(){return this.gx?Promise.resolve([]):this.Sx.then(()=>this.wx.getAll(sa)).then(a=>{s.Log.i("{f7c1592}","{d938300}",a.length);let u=[];if(a.length>0)for(const S of a)S.eventPayload&&u.push(S.eventPayload);return u}).catch(a=>(this.bx(a,"getCachedExitEvents",!0),Promise.reject()))}qx(a){return this.gx?Promise.resolve():this.Sx.then(()=>this.wx.getAll(sa)).then(u=>{if(s.Log.i("{f7c1592}","{ca568ff}",u.length),u.length>0){for(const S of u)S.eventPayload&&this.Ox(this.Ex(S.eventPayload));this.Bx(a)}}).catch(u=>{this.bx(u,"sendCachedExitEvent",!0)})}$x(){this.gx||this.Sx.then(()=>this.wx.clear(Qa)).then(()=>{s.Log.i("{f7c1592}","{8f62936}")}).catch(a=>{this.bx(a,"clearEventStoreInDb",!this.Ax),this.Ax||(this.Ax=!0)})}zx(){this.gx||window.navigator.onLine&&this.Sx.then(()=>this.wx.getAll(Qa)).then(a=>{if(s.Log.i("{f7c1592}","{d4e574c}",a.length),a.length>0){this.$x();for(const u of a)u.eventPayload&&this.Cx(u.eventPayload)}}).catch(a=>{s.Log.e("{f7c1592}","{aaaa3de}",a.code,a.description)})}Kx(a,u){this.ox=!1,this.lx=!1,this.ux=!1,this.Ax=!1}Gx(){var a,u,S;return null!==(S=null===(u=null===(a=this.hx)||void 0===a?void 0:a.telemetryEventIds)||void 0===u?void 0:u.streamingProfileGuid)&&void 0!==S?S:""}Hx(){var a,u,S;return null!==(S=null===(u=null===(a=this.hx)||void 0===a?void 0:a.telemetryEventIds)||void 0===u?void 0:u.systemInfoGuid)&&void 0!==S?S:""}Qx(){return this.mx}}function Ta(m,a){var u;return a?"SleepExit":null!==(u=null==m?void 0:m.description)&&void 0!==u?u:"undefined"}class Ba{constructor(){this.sessionId="",this.subSessionId="",this.cmsId="",this.isResume=!1,this.zoneAddress="",this.Xx=0,this.Fn=new Map,this.Un=0,this.Yx=0,this.jx=0,this.Jx=s.TelemetryModule.createTelemetryProvider(Zo)}Zx(a,u,S,D,L){this.subSessionId=a,this.sessionId=u,this.cmsId=S,this.isResume=D,this.zoneAddress=L}tO(){this.subSessionId="",this.sessionId="",this.cmsId="",this.isResume=!1,this.zoneAddress="",this.Xx=0,this.Fn.clear(),this.Un=0}iO(a,u,S){var D,L,Y;const oe=s.TelemetryModule.getTelemetryEventIds(),_e=new Mo({zoneAddress:this.zoneAddress,networkSessionId:null!==(D=oe.networkSessionId)&&void 0!==D?D:"",sessionId:this.sessionId,subSessionId:this.subSessionId,resumeType:Ht(this.isResume),overrideConfigType:Mt.Nn.type,overrideConfigVersion:Mt.Nn.version,result:u,codec:Ns(S),ipVersion:"UNKNOWN",launchDuration:Math.round(a),networkType:Lt(so.getCurrentNetworkType()),streamingProfileGuid:null!==(L=oe.streamingProfileGuid)&&void 0!==L?L:"",systemInfoGuid:null!==(Y=oe.systemInfoGuid)&&void 0!==Y?Y:"",cmsId:this.cmsId});this.processEvent(_e)}sO(a,u,S,D,L,Y){const oe=Ta(L,Y);this.Ux(a,oe,u,S,D),L.Pn?this.eO():s.Log.d("{9838627}","{30029be}",a,oe)}Ux(a,u,S,D,L){var Y,oe,_e;const Ce=s.TelemetryModule.getTelemetryEventIds(),Ue=new $o({zoneAddress:this.zoneAddress,sessionId:this.sessionId,subSessionId:this.subSessionId,resumeType:Ht(this.isResume),cmsId:this.cmsId,overrideConfigType:Mt.Nn.type,overrideConfigVersion:Mt.Nn.version,exitReason:u,result:a,frameCount:L,codec:Ns(D),ipVersion:"UNKNOWN",streamDuration:Math.round(S),networkType:Lt(so.getCurrentNetworkType()),streamingProfileGuid:null!==(Y=Ce.streamingProfileGuid)&&void 0!==Y?Y:"",systemInfoGuid:null!==(oe=Ce.systemInfoGuid)&&void 0!==oe?oe:"",networkSessionId:null!==(_e=Ce.networkSessionId)&&void 0!==_e?_e:""});this.Yx=this.Jx.cacheEvent(Ue,this.Yx)}cc(a,u,S,D,L,Y,oe){var _e;if(!this.$n(u))return;a instanceof DOMException&&(a={name:a.name,message:a.message});const Ce=new wi({filename:S,lineno:D,stacktrace:null!==(_e=null==a?void 0:a.stack)&&void 0!==_e?_e:"",colno:L,handled:je(Y),category:null!=oe?oe:"",message:u,moduleName:"RAGNAROK",sessionId:this.sessionId,subSessionId:this.subSessionId});this.processEvent(Ce)}SR(a,u,S,D,L,Y){const oe=new Er({retryCount:L,sessionId:this.sessionId,subSessionId:this.subSessionId,serverId:S,url:a,overrideConfigType:Mt.Nn.type,overrideConfigVersion:Mt.Nn.version,disconnectionReason:D,cleanDisconnection:je(Y),networkType:Lt(so.getCurrentNetworkType()),statusCode:u?u.toString():"",cmsId:this.Qx(),moduleName:"RAGNAROK"});this.processEvent(oe)}nO(a,u,S,D,L){const Y=new Wn({featureName:a,supported:u?"SUPPORTED":"UNSUPPORTED",defaultEnabled:je(S),enabled:je(D),reason:L,moduleName:"RAGNAROK",networkType:Lt(so.getCurrentNetworkType()),overrideConfigType:Mt.Nn.type,overrideConfigVersion:Mt.Nn.version,sessionId:this.sessionId,subSessionId:this.subSessionId});this.processEvent(Y)}Ke(a,u,S,D,L){const Y=new oi({key1:null!=a?a:"",key2:null!=u?u:"",key3:null!=S?S:"",key4:null!=D?D:"",key5:null!=L?L:"",moduleName:"RAGNAROK",networkType:Lt(so.getCurrentNetworkType()),overrideConfigType:Mt.Nn.type,overrideConfigVersion:Mt.Nn.version,cmsId:this.Qx(),sessionId:this.sessionId,subSessionId:this.subSessionId});this.processEvent(Y)}eb(a,u,S,D,L,Y){const oe=new $i({metricName:a,moduleName:"RAGNAROK",valueInt1:D,valueInt2:L,valueInt3:Y,valueString:u,valueDouble:S,networkType:Lt(so.getCurrentNetworkType()),cmsId:this.Qx(),sessionId:this.sessionId,subSessionId:this.subSessionId});this.processEvent(oe)}Ku(a,u,S,D,L,Y,oe,_e,Ce){if(this.Xx>=50)return;this.Xx++;const Ue=new xo({deviceName:a,deviceType:"GAMEPAD",vendorId:u,productId:S,deviceIndex:D,reportIndex:oe?0:D,hapticsSupported:je(L),hapticsFeedbackCount:Y,state:_e,eventMapReceived:Ce,eventMapProcessed:Ce,sessionId:this.sessionId,subSessionId:this.subSessionId,cmsId:this.Qx()});this.processEvent(Ue)}hO(a,u,S,D,L,Y){const oe=new Ri({eventSequence:S,sleepTime:a,error:D,timeToSleep:u,moduleName:"RAGNAROK",cmsId:this.Qx(),sessionId:L,subSessionId:Y});this.processEvent(oe)}oO(a){if(!this.jx){this.eO();const u=()=>{const S=Ve(a.rO());this.Ux(S,S,a.aO(),a.wy(),a.Yy())};u(),this.jx=window.setInterval(u,12e4)}}dO(){this.jx&&(window.clearInterval(this.jx),this.jx=0)}processEvent(a){this.Jx.processEvent(a)}eO(){this.Jx.processCachedEvent(this.Yx),this.Yx=0}$n(a){var u;if(this.Un>=50)return!1;const S=null!==(u=this.Fn.get(a))&&void 0!==u?u:0;return!(S>=10||(this.Un++,this.Fn.set(a,S+1),0))}Qx(){return this.cmsId}}class rc extends Ba{constructor(a,u){super(),this.Yh=a,this.cO=u,this.cO.kx(this.cc.bind(this))}lO(a){this.clientShutDownCallback=a}Kn(a){this.sessionId=a,this.Xx=0}Qn(a){this.subSessionId=a,this.Fn.clear(),this.Un=0}Rx(a,u){this.cO.Rx(a,u)}uO(a,u,S,D,L,Y,oe,_e,Ce){var Ue,$e;const Be=this.getTelemetryEventIds(),at=new Mo({zoneAddress:D,networkSessionId:Ce,sessionId:a,subSessionId:u,resumeType:Ht(S),overrideConfigType:Mt.Nn.type,overrideConfigVersion:Mt.Nn.version,result:Y,codec:Ns(oe),ipVersion:"UNKNOWN",launchDuration:Math.round(L),networkType:Lt(so.getCurrentNetworkType()),streamingProfileGuid:null!==(Ue=Be.streamingProfileGuid)&&void 0!==Ue?Ue:"",systemInfoGuid:null!==($e=Be.systemInfoGuid)&&void 0!==$e?$e:"",cmsId:_e});this.dispatchEvent({name:at.name,gdprLevel:at.gdprLevel,parameters:at.parameters,ts:at.ts,clientConfig:Zo})}processEvent(a){this.dispatchEvent({name:a.name,gdprLevel:a.gdprLevel,parameters:a.parameters,ts:a.ts,clientConfig:Zo})}AO(a,u){let S;S=this.cO.Lx(a),this.vO(S),this.cO.Bx(u)}qx(a){return this.clientShutDownCallback?(s.Log.d("{9838627}","{c7dcc4e}"),this.cO._x().then(u=>{for(const S of u)this.vO(S);this.cO.Bx(a)}).catch(()=>{s.Log.d("{9838627}","{41cf828}")})):(s.Log.d("{9838627}","{77df598}"),this.cO.qx(a))}fO(a,u){let S=!1;this.clientShutDownCallback&&(S=this.clientShutDownCallback(a),s.Log.d("{9838627}","{caf81d9}",S)),S||(s.Log.d("{9838627}","{e939db1}"),u(a))}pO(a,u){this.Yh.hasListener("TelemetryEvent")?this.Yh.emit("TelemetryEvent",a):u(a)}Qx(){return this.cO.Qx()}}class Ja extends rc{dispatchEvent(a){this.pO(a,()=>{this.cO.Cx(a)})}vO(a){this.fO(a,()=>{this.cO.Nx(a)})}getTelemetryEventIds(){return{streamingProfileGuid:this.cO.Gx(),systemInfoGuid:this.cO.Hx()}}}class Sc extends rc{constructor(a,u){super(a,u),this.Jx=s.TelemetryModule.createTelemetryProvider(Zo)}dispatchEvent(a){this.pO(a,()=>{this.mO(a,!1)})}vO(a){this.fO(a,()=>{this.mO(a,!0)})}getTelemetryEventIds(){return s.TelemetryModule.getTelemetryEventIds()}mO(a,u){const S={name:(Y=a).name,gdprLevel:Y.gdprLevel,priority:u,ts:Y.ts,parameters:Y.parameters},D=a.clientConfig;var Y;let L;D.clientId===Zo.clientId?L=this.Jx:(this.gO||(this.gO=s.TelemetryModule.createTelemetryProvider(D)),L=this.gO),L.processEvent(S)}}const Ca="#006FCD",oc="#0e7a0d";class dl{constructor(){this.wO="gamepadTester",this.visible=!1,this.SO=[],this.bO=[],this.mu=new Map,Mt.Oo&&(document.body.appendChild(this.kO()),this.start())}hl(a){for(let u=0;u<4;u++){const S=this.mu.get(u);void 0!==S&&(a&1<{dt.style.position="absolute",dt.style.width="2%",dt.style.height="3.5%",dt.style.backgroundColor="red",dt.style.borderRadius="50%",dt.style.transform="translate(-50%, -50%)"},$e=dt=>{let kt=(_n=dt)?{left:{X:_n.axes[0],Y:_n.axes[1]},right:{X:_n.axes[2],Y:_n.axes[3]}}:null;var _n;if(null===u.querySelector(`.gamepad${dt.index}`).querySelector(".leftStick")){let _n=document.createElement("div");_n.className="gamepadJoystickPointer leftStick",Ue(_n),_n.style.left=`${L+kt.left.X*Ce}px`,_n.style.top=`${oe+kt.left.Y*Ce}px`,u.querySelector(`.gamepad${dt.index}`).querySelector(".gamepadContainer").appendChild(_n)}else{let _n=u.querySelector(`.gamepad${dt.index}`).querySelector(".leftStick");_n.style.opacity="1",_n.style.left=`${L+Ce*kt.left.X}px`,_n.style.top=`${oe+kt.left.Y*Ce}px`}if(null===u.querySelector(`.gamepad${dt.index}`).querySelector(".rightStick")){let _n=document.createElement("div");_n.className="gamepadJoystickPointer rightStick",Ue(_n),_n.style.left=`${Y+kt.right.X*Ce}px`,_n.style.top=`${_e+kt.right.Y*Ce}px`,u.querySelector(`.gamepad${dt.index}`).querySelector(".gamepadContainer").appendChild(_n)}else{let _n=u.querySelector(`.gamepad${dt.index}`).querySelector(".rightStick");_n.style.opacity="1",_n.style.left=(Y+kt.right.X*Ce).toString()+"px",_n.style.top=(_e+kt.right.Y*Ce).toString()+"px"}},Be=(dt,kt,_n,An)=>{var tn=dt.getContext("2d");if(!tn)return;tn.beginPath();const Dn=!0===_n?1:!1===_n?0:_n;tn.fillStyle=_n?An?Ca:oc:"grey";const Bn=Mn=>{if(!tn)return;const ci=.12*Dn;tn.rect(dt.width*Mn,dt.height*(.12-ci+.07),.02*dt.width,dt.height*ci),tn.closePath(),tn.fill(),tn.beginPath(),tn.fillStyle="grey",tn.rect(dt.width*Mn,.07*dt.height,.02*dt.width,dt.height*(.12-ci))};switch(kt){case 0:tn.moveTo(.14*dt.width,.48*dt.height),tn.lineTo(.19*dt.width,.48*dt.height),tn.lineTo(.165*dt.width,.54*dt.height),tn.lineTo(.14*dt.width,.48*dt.height);break;case 1:tn.moveTo(.14*dt.width,.66*dt.height),tn.lineTo(.19*dt.width,.66*dt.height),tn.lineTo(.165*dt.width,.61*dt.height),tn.lineTo(.14*dt.width,.66*dt.height);break;case 2:tn.moveTo(.09*dt.width,.55*dt.height),tn.lineTo(.09*dt.width,.61*dt.height),tn.lineTo(.135*dt.width,.57*dt.height),tn.lineTo(.09*dt.width,.55*dt.height);break;case 3:tn.moveTo(.24*dt.width,.55*dt.height),tn.lineTo(.24*dt.width,.61*dt.height),tn.lineTo(.195*dt.width,.57*dt.height),tn.lineTo(.24*dt.width,.55*dt.height);break;case 4:tn.arc(.7*dt.width,.4*dt.height,.02*dt.width,0,2*Math.PI);break;case 5:tn.arc(.3*dt.width,.4*dt.height,.02*dt.width,0,2*Math.PI);break;case 6:tn.arc(.3*dt.width,.8*dt.height,.07*dt.width,0,2*Math.PI);break;case 7:tn.arc(.7*dt.width,.8*dt.height,.07*dt.width,0,2*Math.PI);break;case 8:tn.rect(.13*dt.width,.23*dt.height,.07*dt.width,.05*dt.height);break;case 9:tn.rect(.815*dt.width,.23*dt.height,.07*dt.width,.05*dt.height);break;case 12:tn.arc(.85*dt.width,.65*dt.height,.02*dt.width,0,2*Math.PI);break;case 13:tn.arc(.9*dt.width,.55*dt.height,.02*dt.width,0,2*Math.PI);break;case 14:tn.arc(.8*dt.width,.55*dt.height,.02*dt.width,0,2*Math.PI);break;case 15:tn.arc(.85*dt.width,.45*dt.height,.02*dt.width,0,2*Math.PI);break;case-1:Bn(.155);break;case-2:Bn(.84);break;case 16:if(!An)break;tn.arc(.5*dt.width,.5*dt.height,.02*dt.width,0,2*Math.PI);break;case 17:if(!An)break;tn.roundRect?tn.roundRect(.395*dt.width,.085*dt.height,.21*dt.width,.18*dt.height,.02*dt.width):tn.arc(.5*dt.width,.175*dt.height,.02*dt.width,0,2*Math.PI)}tn.closePath(),tn.fill()},at=dt=>{if(null===u.querySelector(`.gamepad${dt.index}`)){let kt=document.createElement("div");kt.className=`gamepad gamepad${dt.index}`,kt.style.display="flex",kt.style.flexDirection="column",kt.style.justifyContent="space-between",kt.style.height="98%";let _n=document.createElement("p");_n.className="active",_n.style.margin="0px";let An=document.createElement("span");An.className="gamepadPlayerNumber",An.style.color="white",An.style.background=dt.yO?Ca:oc,An.style.position="relative",An.style.marginRight="0.5vw",An.innerHTML=dt.yO?"S":"X",An.style.fontSize="1.5vw",_n.appendChild(An);let tn=document.createElement("span");tn.className="gamepadPlayerNumber",tn.style.color="white",tn.style.position="relative",tn.innerHTML=`P${dt.index+1}|${dt.name}`,tn.style.fontSize="1.5vw",_n.appendChild(tn),kt.appendChild(_n);let Dn=document.createElement("div");Dn.className="gamepadContainer",Dn.style.position="relative",Dn.style.width=`${S+2}px`,Dn.style.height=`${D}px`;let Bn=document.createElement("canvas");Bn.className="canvas",Bn.width=S,Bn.height=D,Bn.style.width=`${S}px`,Bn.style.height=`${D}px`,Bn.style.border="1px solid white",Dn.appendChild(Bn),kt.appendChild(Dn),u.appendChild(kt);let Mn=u.querySelector("#instruction");Mn&&(Mn.style.display="none")}},At=()=>{if(this.visible){for(let dt=0;dt=1&&Be(An,16,65536&kt.buttons,_n),tn>=2&&Be(An,17,131072&kt.buttons,_n),Be(An,-1,(255&kt.trigger)/255,_n),Be(An,-2,(kt.trigger>>8&255)/255,_n)}else if(this.bO[dt]){if(!u.querySelector(`.gamepad${dt}`)){at(this.bO[dt]);let _n=u.querySelector(`.gamepad${dt}`).querySelector("canvas"),An=_n.getContext("2d");An&&(An.font="20px Arial",An.fillStyle="white",An.textAlign="center",An.fillText("Unsupported Gamepad",_n.width/2,_n.height/2))}}else{let _n=u.querySelector(`.gamepad${dt}`);if(_n&&u.removeChild(_n),u.childNodes.length<=1){let An=u.querySelector("#instruction");An&&(An.style.display="block")}}}a=window.requestAnimationFrame(At)}else window.cancelAnimationFrame(a)};At()}al(a,u,S,D,L){}dl(){}}class aa{constructor(){this.IO=!1,this.CO=[],this.TO=[],this.EO=0,this.MO=0,this.PO=0}DO(){if(s.Log.i("{4c846ba}","{b11cb24}"),this.RO){try{this.NO=new MediaRecorder(this.RO)}catch(a){return void s.Log.e("{4c846ba}","{0d1420e}",a)}this.NO&&(this.NO.onstart=()=>{},this.NO.onstop=()=>{s.Log.i("{4c846ba}","{7a944b4}")},this.NO.ondataavailable=a=>{a.data&&a.data.size>0&&(this.CO.push(a.data),this.TO.push(this.CO),++this.MO,this.CO=[])},s.Log.i("{4c846ba}","{ffb713f}",this.NO)),this.IO=!1}else s.Log.e("{4c846ba}","{74475ae}")}xO(){let a;if(1==this.PO)a=18e5;else{if(2!=this.PO)return;a=3e3}this.NO&&!this.IO&&(this.NO.start(),this.IO=!0,this.EO=window.setTimeout(()=>{s.Log.i("{4c846ba}","{2282d21}"),this.OO()},a),s.Log.i("{4c846ba}","{4f438e3}"))}BO(){this.OO(),this.DO(),this.xO()}OO(){var a;null===(a=this.NO)||void 0===a||a.stop(),this.NO=void 0,0!==this.EO&&(window.clearTimeout(this.EO),this.EO=0)}initialize(a){this.RO=a}uninitialize(){this.OO(),this.downloadAudio(),this.RO=void 0,this.PO=0}downloadAudio(){if(0!=this.PO){for(let a=0;a{},this.nF=(S,D,...L)=>this.hF(s.LogLevel.DEBUG,S,D,L),this.oF=(S,D,...L)=>this.hF(s.LogLevel.INFO,S,D,L),this.rF=(S,D,...L)=>this.hF(s.LogLevel.WARN,S,D,L),this.aF=(S,D,...L)=>this.hF(s.LogLevel.ERROR,S,D,L)}get d(){return this.enabled?this.iF?console.debug.bind(console,"%s DEBUG [%s] %s@@",this.dF(new Date)):this.nF:this.eF}get w(){return this.enabled?this.iF?console.warn.bind(console,"%s WARN [%s] %s@@",this.dF(new Date)):this.rF:this.eF}get i(){return this.enabled?this.iF?console.info.bind(console,"%s INFO [%s] %s@@",this.dF(new Date)):this.oF:this.eF}get e(){return this.iF?console.error.bind(console,"%s ERROR [%s] %s@@",this.dF(new Date)):this.aF}setLogCallback(a){this.Ln=a,this.Ln&&this.queue.length&&window.setTimeout(()=>{this.cF(!0)})}isCallbackRegistered(){return!!this.Ln}lF(...a){return a.length?`##${JSON.stringify(a)}`:""}cF(a){this.Ln&&this.queue.length&&(this.Ln(this.queue[0]),this.queue.shift(),a&&this.queue.length&&window.setTimeout(()=>{this.cF(!0)}))}hF(a,u,S,D){let L=`${S}${this.lF(...D)}`,Y={timestamp:this.dF(new Date),level:a,tag:this.module+"/"+u,message:L};this.queue.push(Y),this.Ln?window.setTimeout(()=>{this.cF(!1)}):this.queue.length>_l.uF&&this.queue.shift()}dF(a){const u=(D,L,Y)=>{const oe=L-D.length;if(oe>0){let _e="";for(let Ce=0;Ceu(D.getMinutes().toString(),2,"0"))(a)+":"+(D=>u(D.getSeconds().toString(),2,"0"))(a)+"."+(D=>u(D.getMilliseconds().toString(),3,"0"))(a),S}}I.RErrorCode=void 0,_l.uF=50,function(m){m[m.Success=15859712]="Success",m[m.AuthProviderError=3237085185]="AuthProviderError",m[m.InvalidOperation=3237085186]="InvalidOperation",m[m.NoNetwork=3237089281]="NoNetwork",m[m.NetworkError=3237089282]="NetworkError",m[m.GetActiveSessionServerError=3237089283]="GetActiveSessionServerError",m[m.ExceptionHappened=3237089284]="ExceptionHappened",m[m.AuthTokenNotUpdated=3237093377]="AuthTokenNotUpdated",m[m.SessionFinishedState=3237093378]="SessionFinishedState",m[m.ResponseParseFailure=3237093379]="ResponseParseFailure",m[m.GridAppNotInitialized=3237093380]="GridAppNotInitialized",m[m.InvalidServerResponse=3237093381]="InvalidServerResponse",m[m.PutOrPostInProgress=3237093382]="PutOrPostInProgress",m[m.GridServerNotInitialized=3237093383]="GridServerNotInitialized",m[m.DOMExceptionInGridServer=3237093384]="DOMExceptionInGridServer",m[m.InvalidAdStateTransition=3237093386]="InvalidAdStateTransition",m[m.SessionServerErrorBegin=3237093632]="SessionServerErrorBegin",m[m.RequestForbidden=3237093634]="RequestForbidden",m[m.ServerInternalTimeout=3237093635]="ServerInternalTimeout",m[m.ServerInternalError=3237093636]="ServerInternalError",m[m.ServerInvalidRequest=3237093637]="ServerInvalidRequest",m[m.ServerInvalidRequestVersion=3237093638]="ServerInvalidRequestVersion",m[m.SessionListLimitExceeded=3237093639]="SessionListLimitExceeded",m[m.InvalidRequestDataMalformed=3237093640]="InvalidRequestDataMalformed",m[m.InvalidRequestDataMissing=3237093641]="InvalidRequestDataMissing",m[m.RequestLimitExceeded=3237093642]="RequestLimitExceeded",m[m.SessionLimitExceeded=3237093643]="SessionLimitExceeded",m[m.InvalidRequestVersionOutOfDate=3237093644]="InvalidRequestVersionOutOfDate",m[m.SessionEntitledTimeExceeded=3237093645]="SessionEntitledTimeExceeded",m[m.AuthFailure=3237093646]="AuthFailure",m[m.InvalidAuthenticationMalformed=3237093647]="InvalidAuthenticationMalformed",m[m.InvalidAuthenticationExpired=3237093648]="InvalidAuthenticationExpired",m[m.InvalidAuthenticationNotFound=3237093649]="InvalidAuthenticationNotFound",m[m.EntitlementFailure=3237093650]="EntitlementFailure",m[m.InvalidAppIdNotAvailable=3237093651]="InvalidAppIdNotAvailable",m[m.InvalidAppIdNotFound=3237093652]="InvalidAppIdNotFound",m[m.InvalidSessionIdMalformed=3237093653]="InvalidSessionIdMalformed",m[m.InvalidSessionIdNotFound=3237093654]="InvalidSessionIdNotFound",m[m.EulaUnAccepted=3237093655]="EulaUnAccepted",m[m.MaintenanceStatus=3237093656]="MaintenanceStatus",m[m.ServiceUnAvailable=3237093657]="ServiceUnAvailable",m[m.SteamGuardRequired=3237093658]="SteamGuardRequired",m[m.SteamLoginRequired=3237093659]="SteamLoginRequired",m[m.SteamGuardInvalid=3237093660]="SteamGuardInvalid",m[m.SteamProfilePrivate=3237093661]="SteamProfilePrivate",m[m.InvalidCountryCode=3237093662]="InvalidCountryCode",m[m.InvalidLanguageCode=3237093663]="InvalidLanguageCode",m[m.MissingCountryCode=3237093664]="MissingCountryCode",m[m.MissingLanguageCode=3237093665]="MissingLanguageCode",m[m.SessionNotPaused=3237093666]="SessionNotPaused",m[m.EmailNotVerified=3237093667]="EmailNotVerified",m[m.InvalidAuthenticationUnsupportedProtocol=3237093668]="InvalidAuthenticationUnsupportedProtocol",m[m.InvalidAuthenticationUnknownToken=3237093669]="InvalidAuthenticationUnknownToken",m[m.InvalidAuthenticationCredentials=3237093670]="InvalidAuthenticationCredentials",m[m.SessionNotPlaying=3237093671]="SessionNotPlaying",m[m.InvalidServiceResponse=3237093672]="InvalidServiceResponse",m[m.AppPatching=3237093673]="AppPatching",m[m.GameNotFound=3237093674]="GameNotFound",m[m.NotEnoughCredits=3237093675]="NotEnoughCredits",m[m.InvitationOnlyRegistration=3237093676]="InvitationOnlyRegistration",m[m.RegionNotSupportedForRegistration=3237093677]="RegionNotSupportedForRegistration",m[m.SessionTerminatedByAnotherClient=3237093678]="SessionTerminatedByAnotherClient",m[m.DeviceIdAlreadyUsed=3237093679]="DeviceIdAlreadyUsed",m[m.ServiceNotExist=3237093680]="ServiceNotExist",m[m.SessionExpired=3237093681]="SessionExpired",m[m.SessionLimitPerDeviceReached=3237093682]="SessionLimitPerDeviceReached",m[m.ForwardingZoneOutOfCapacity=3237093683]="ForwardingZoneOutOfCapacity",m[m.RegionNotSupportedIndefinitely=3237093684]="RegionNotSupportedIndefinitely",m[m.RegionBanned=3237093685]="RegionBanned",m[m.RegionOnHoldForFree=3237093686]="RegionOnHoldForFree",m[m.RegionOnHoldForPaid=3237093687]="RegionOnHoldForPaid",m[m.AppMaintenanceStatus=3237093688]="AppMaintenanceStatus",m[m.ResourcePoolNotConfigured=3237093689]="ResourcePoolNotConfigured",m[m.InsufficientVmCapacity=3237093690]="InsufficientVmCapacity",m[m.InsufficientRouteCapacity=3237093691]="InsufficientRouteCapacity",m[m.InsufficientScratchSpaceCapacity=3237093692]="InsufficientScratchSpaceCapacity",m[m.RequiredSeatInstanceTypeNotSupported=3237093693]="RequiredSeatInstanceTypeNotSupported",m[m.ServerSessionQueueLengthExceeded=3237093694]="ServerSessionQueueLengthExceeded",m[m.RegionNotSupportedForStreaming=3237093695]="RegionNotSupportedForStreaming",m[m.SessionForwardRequestAllocationTimeExpired=3237093696]="SessionForwardRequestAllocationTimeExpired",m[m.SessionForwardGameBinariesNotAvailable=3237093697]="SessionForwardGameBinariesNotAvailable",m[m.GameBinariesNotAvailableInRegion=3237093698]="GameBinariesNotAvailableInRegion",m[m.UekRetrievalFailed=3237093699]="UekRetrievalFailed",m[m.EntitlementFailureForResource=3237093700]="EntitlementFailureForResource",m[m.SessionInQueueAbandoned=3237093701]="SessionInQueueAbandoned",m[m.MemberTerminated=3237093702]="MemberTerminated",m[m.SessionRemovedFromQueueMaintenance=3237093703]="SessionRemovedFromQueueMaintenance",m[m.ZoneMaintenanceStatus=3237093704]="ZoneMaintenanceStatus",m[m.GuestModeCampaignDisabled=3237093705]="GuestModeCampaignDisabled",m[m.RegionNotSupportedAnonymousAccess=3237093706]="RegionNotSupportedAnonymousAccess",m[m.InstanceTypeNotSupportedInSingleRegion=3237093707]="InstanceTypeNotSupportedInSingleRegion",m[m.InvalidZoneForQueuedSession=3237093710]="InvalidZoneForQueuedSession",m[m.SessionWaitingAdsTimeExpired=3237093711]="SessionWaitingAdsTimeExpired",m[m.UserCancelledWatchingAds=3237093712]="UserCancelledWatchingAds",m[m.StreamingNotAllowedInLimitedMode=3237093713]="StreamingNotAllowedInLimitedMode",m[m.ForwardRequestJPMFailed=3237093714]="ForwardRequestJPMFailed",m[m.MaxSessionNumberLimitExceeded=3237093715]="MaxSessionNumberLimitExceeded",m[m.GuestModePartnerCapacityDisabled=3237093716]="GuestModePartnerCapacityDisabled",m[m.SessionRejectedNoCapacity=3237093717]="SessionRejectedNoCapacity",m[m.SessionInsufficientPlayabilityLevel=3237093718]="SessionInsufficientPlayabilityLevel",m[m.SessionServerErrorEnd=3237093887]="SessionServerErrorEnd",m[m.StreamerErrorCategory=3237093888]="StreamerErrorCategory",m[m.StreamErrorGeneric=3237093889]="StreamErrorGeneric",m[m.StreamerSignInFailure=3237093890]="StreamerSignInFailure",m[m.StreamerHangingGetFailure=3237093891]="StreamerHangingGetFailure",m[m.StreamerNetworkError=3237093892]="StreamerNetworkError",m[m.StreamerVideoPlayError=3237093893]="StreamerVideoPlayError",m[m.StreamerIceConnectionFailed=3237093894]="StreamerIceConnectionFailed",m[m.StreamerGetRemotePeerTimedOut=3237093895]="StreamerGetRemotePeerTimedOut",m[m.StreamInputChannelError=3237093896]="StreamInputChannelError",m[m.StreamCursorChannelError=3237093897]="StreamCursorChannelError",m[m.StreamControlChannelError=3237093898]="StreamControlChannelError",m[m.StreamerReConnectionFailed=3237093899]="StreamerReConnectionFailed",m[m.StreamerNoVideoPacketsReceivedEver=3237093900]="StreamerNoVideoPacketsReceivedEver",m[m.StreamerNoVideoFramesLossyNetwork=3237093901]="StreamerNoVideoFramesLossyNetwork",m[m.StreamerSetSDPFailure=3237093902]="StreamerSetSDPFailure",m[m.StreamerNoLocalCandidates=3237093903]="StreamerNoLocalCandidates",m[m.StreamerNoRemoteCandidates=3237093904]="StreamerNoRemoteCandidates",m[m.StreamerNoVideoTrack=3237093905]="StreamerNoVideoTrack",m[m.StreamerIceReConnectionFailed=3237093906]="StreamerIceReConnectionFailed",m[m.StreamerSignInTimeout=3237093907]="StreamerSignInTimeout",m[m.StreamerSignInWorkerFailure=3237093908]="StreamerSignInWorkerFailure",m[m.StreamerNoTracksReceivedInSdp=3237093909]="StreamerNoTracksReceivedInSdp",m[m.StreamerNvstSdpFailure=3237093910]="StreamerNvstSdpFailure",m[m.StreamerNvstSdpParseFailure=3237093911]="StreamerNvstSdpParseFailure",m[m.StreamerNoPeerInfo=3237093912]="StreamerNoPeerInfo",m[m.StreamerNoOffer=3237093913]="StreamerNoOffer",m[m.StreamerNoAudioTrack=3237093914]="StreamerNoAudioTrack",m[m.StreamerInvalidRemoteConfigOverride=3237093915]="StreamerInvalidRemoteConfigOverride",m[m.StreamerInvalidServerOverride=3237093916]="StreamerInvalidServerOverride",m[m.StreamerInvalidClientOverride=3237093917]="StreamerInvalidClientOverride",m[m.StreamerConfigUpdateFailure=3237093918]="StreamerConfigUpdateFailure",m[m.StreamerInputChannelNotOpen=3237093919]="StreamerInputChannelNotOpen",m[m.StreamerCursorChannelNotOpen=3237093920]="StreamerCursorChannelNotOpen",m[m.StreamerControlChannelNotOpen=3237093921]="StreamerControlChannelNotOpen",m[m.StreamerVideoAdapterInitTimeOut=3237093922]="StreamerVideoAdapterInitTimeOut",m[m.StreamerVideoFrameProviderInitTimeOut=3237093923]="StreamerVideoFrameProviderInitTimeOut",m[m.StreamerVideoEncoderInitTimeOut=3237093924]="StreamerVideoEncoderInitTimeOut",m[m.StreamerVideoSetupTimeOut=3237093925]="StreamerVideoSetupTimeOut",m[m.StreamerNoStunResponsesReceived=3237093926]="StreamerNoStunResponsesReceived",m[m.StreamerNoNominatedCandidatePairs=3237093927]="StreamerNoNominatedCandidatePairs",m[m.StreamerNoSucceededCandidatePairs=3237093928]="StreamerNoSucceededCandidatePairs",m[m.StreamPartiallyReliableInputChannelError=3237093929]="StreamPartiallyReliableInputChannelError",m[m.StreamerPartiallyReliableInputChannelNotOpen=3237093936]="StreamerPartiallyReliableInputChannelNotOpen",m[m.StreamerNeedAudioElement=3237093937]="StreamerNeedAudioElement",m[m.StreamerInvalidVideoSettings=3237093938]="StreamerInvalidVideoSettings",m[m.StreamerNeedVideoElement=3237093939]="StreamerNeedVideoElement",m[m.SessionSetupCancelled=15867905]="SessionSetupCancelled",m[m.SessionSetupCancelledDuringQueuing=15867906]="SessionSetupCancelledDuringQueuing",m[m.StreamerDataChannelClosing=15867907]="StreamerDataChannelClosing",m[m.SystemSleepDuringStreaming=15867908]="SystemSleepDuringStreaming",m[m.SystemSleepDuringSessionSetup=15867909]="SystemSleepDuringSessionSetup",m[m.PauseSession=15867910]="PauseSession",m[m.DelayedSessionError=15867911]="DelayedSessionError",m[m.WebPageClosed=15867912]="WebPageClosed",m[m.ClientDisconnectedUserIdle=15867913]="ClientDisconnectedUserIdle",m[m.UnhandledException=3237093392]="UnhandledException",m[m.NoInternetDuringSessionSetup=15868417]="NoInternetDuringSessionSetup",m[m.NoInternetDuringStreaming=15868418]="NoInternetDuringStreaming",m[m.StreamDisconnectedFromServer=15868672]="StreamDisconnectedFromServer",m[m.ServerDisconnectedNoResponse=3237094145]="ServerDisconnectedNoResponse",m[m.ServerDisconnectedRemoteInputError=3237094146]="ServerDisconnectedRemoteInputError",m[m.ServerDisconnectedFrameGrabFailed=3237094147]="ServerDisconnectedFrameGrabFailed",m[m.ServerDisconnectedConfigUnAvailable=3237094148]="ServerDisconnectedConfigUnAvailable",m[m.ServerDisconnectedInvalidCommand=3237094149]="ServerDisconnectedInvalidCommand",m[m.ServerDisconnectedInvalidMouseState=3237094150]="ServerDisconnectedInvalidMouseState",m[m.ServerDisconnectedNetworkError=3237094151]="ServerDisconnectedNetworkError",m[m.ServerDisconnectedGameLaunchFailed=3237094152]="ServerDisconnectedGameLaunchFailed",m[m.ServerDisconnectedVideoFirstFrameSendFailed=3237094153]="ServerDisconnectedVideoFirstFrameSendFailed",m[m.ServerDisconnectedVideoNextFrameSendFailed=3237094154]="ServerDisconnectedVideoNextFrameSendFailed",m[m.ServerDisconnectedFrameGrabTimedOut=3237094155]="ServerDisconnectedFrameGrabTimedOut",m[m.ServerDisconnectedFrameEncodeTimedOut=3237094156]="ServerDisconnectedFrameEncodeTimedOut",m[m.ServerDisconnectedFrameSendTimedOut=3237094157]="ServerDisconnectedFrameSendTimedOut",m[m.ServerDisconnectedNetworkTimedOut=3237094158]="ServerDisconnectedNetworkTimedOut",m[m.ServerDisconnectedPeerRemovedByServer=3237094159]="ServerDisconnectedPeerRemovedByServer",m[m.ServerDisconnectedUnknownError=3237094160]="ServerDisconnectedUnknownError",m[m.ServerDisconnectedPeerRemovedBeforeStream=3237094161]="ServerDisconnectedPeerRemovedBeforeStream",m[m.ServerDisconnectedIntended=15868704]="ServerDisconnectedIntended",m[m.ServerDisconnectedHotKey=15868705]="ServerDisconnectedHotKey",m[m.ServerDisconnectedUserLoggedInDifferentAccount=15868706]="ServerDisconnectedUserLoggedInDifferentAccount",m[m.ServerDisconnectedWindowedMode=15868707]="ServerDisconnectedWindowedMode",m[m.ServerDisconnectedUserIdle=15868708]="ServerDisconnectedUserIdle",m[m.ServerDisconnectedUnAuthorizedProcessDetected=15868709]="ServerDisconnectedUnAuthorizedProcessDetected",m[m.ServerDisconnectedMaliciousProcessDetected=15868710]="ServerDisconnectedMaliciousProcessDetected",m[m.ServerDisconnectedUnKnownProcessDetected=15868711]="ServerDisconnectedUnKnownProcessDetected",m[m.ServerDisconnectedMinerProcessDetected=15868712]="ServerDisconnectedMinerProcessDetected",m[m.ServerDisconnectedStreamingUnsupported=15868713]="ServerDisconnectedStreamingUnsupported",m[m.ServerDisconnectedAnotherClient=15868714]="ServerDisconnectedAnotherClient",m[m.ServerDisconnectedCodeIntegrityViolation=15868715]="ServerDisconnectedCodeIntegrityViolation",m[m.ServerDisconnectedUnauthorizedActivityDetected=15868716]="ServerDisconnectedUnauthorizedActivityDetected",m[m.ServerDisconnectedGameNotOwnedByUser=15868717]="ServerDisconnectedGameNotOwnedByUser",m[m.ServerDisconnectedProtectedContent=15868718]="ServerDisconnectedProtectedContent",m[m.ServerDisconnectedDisplayTopologyChanged=15868719]="ServerDisconnectedDisplayTopologyChanged",m[m.ServerDisconnectedAbruptly=15868688]="ServerDisconnectedAbruptly",m[m.ServerDisconnectedUnknownFromPm=15868736]="ServerDisconnectedUnknownFromPm",m[m.ServerDisconnectedUserEntitledMinutesExceeded=15868737]="ServerDisconnectedUserEntitledMinutesExceeded",m[m.ServerDisconnectedClientReconnectTimeLimitExceeded=15868738]="ServerDisconnectedClientReconnectTimeLimitExceeded",m[m.ServerDisconnectedOperatorCommandedTermination=15868739]="ServerDisconnectedOperatorCommandedTermination",m[m.ServerDisconnectedConcurrentSessionLimitExceeded=15868740]="ServerDisconnectedConcurrentSessionLimitExceeded",m[m.ServerDisconnectedMaxSessionTimeLimitExceeded=15868741]="ServerDisconnectedMaxSessionTimeLimitExceeded",m[m.ServerDisconnectedBifrostInitiatedSessionPause=15868742]="ServerDisconnectedBifrostInitiatedSessionPause",m[m.ServerDisconnectedSystemCommandTermination=15868743]="ServerDisconnectedSystemCommandTermination",m[m.ServerDisconnectedMultipleLogin=15868744]="ServerDisconnectedMultipleLogin",m[m.ServerDisconnectedMaintenanceMode=15868745]="ServerDisconnectedMaintenanceMode",m[m.ServerDisconnectedMultipleTab=15868752]="ServerDisconnectedMultipleTab",m[m.InvalidVideoElement=3237094400]="InvalidVideoElement",m[m.InvalidAudioElement=3237094401]="InvalidAudioElement",m[m.WebSocketClosed=3237097472]="WebSocketClosed",m[m.WebSocketNormalClosure=3237101567]="WebSocketNormalClosure",m[m.WebSocketGoingAway=3237101566]="WebSocketGoingAway",m[m.WebSocketProtocolError=3237101565]="WebSocketProtocolError",m[m.WebSocketUnsupportedData=3237101564]="WebSocketUnsupportedData",m[m.WebSocketNoStatusRcvd=3237101562]="WebSocketNoStatusRcvd",m[m.WebSocketInvalidFramePayloadData=3237101560]="WebSocketInvalidFramePayloadData",m[m.WebSocketPolicyViolation=3237101559]="WebSocketPolicyViolation",m[m.WebSocketMessageTooBig=3237101558]="WebSocketMessageTooBig",m[m.WebSocketMandatoryExt=3237101557]="WebSocketMandatoryExt",m[m.WebSocketInternalError=3237101556]="WebSocketInternalError",m[m.WebSocketServiceRestart=3237101555]="WebSocketServiceRestart",m[m.WebSocketTryAgainLater=3237101554]="WebSocketTryAgainLater",m[m.WebSocketBadGateway=3237101553]="WebSocketBadGateway",m[m.WebSocketTLSHandshakeFailure=3237101552]="WebSocketTLSHandshakeFailure",m[m.WebSocketUnauthorized=3237101551]="WebSocketUnauthorized",m[m.WebSocketForbidden=3237101550]="WebSocketForbidden",m[m.WebSocketTimeout=3237101549]="WebSocketTimeout"}(I.RErrorCode||(I.RErrorCode={}));const bl="ios15AudioContext",yl="ios15AudioStream";performance.mark("GfnNskBegin");class Xc{constructor(a,u,S){this.Rs=a,this.delegate=u,this.AF=S,this.jm=new dl,this.nD=new aa,this.streamingState=0,this.startTime=0,this.isResume=!1,this.XO=0,this.vF=0,this.jO=0,this.sessionId="",this.subSessionId="",this.zoneAddress="",this.zoneName="",this.sD=[],this.fF=!1,this.appId=0,this.aB=L=>(s.Log.e("{0a9be04}","{8516485}",L.filename,L.lineno,L.colno),this.telemetry.cc(L.error,L.error&&L.error.message?L.error.message:L.message,L.filename,L.lineno,L.colno,!1),Mt.So.terminateUnhandledException&&this.pF(3237093392),!1),this.mF=()=>{var L;if(s.Log.i("{0a9be04}","{478a408}",document.visibilityState,!!this.Xd),!this.Xd)return;const Y=this.sD.find(Ue=>{const $e=Ue.srcObject;return $e instanceof MediaStream&&$e.getAudioTracks().length}),oe=this.KS,_e=Y&&oe&&In(this.Rs,15,4)&&Mt.Vo,Ce=In(this.Rs,15,4)&&this.fF&&Mt.Ho;if("hidden"===document.visibilityState)this.vF=performance.now(),_e&&(s.Log.i("{0a9be04}","{cbd3b6e}"),Y.muted=!0,oe.muted=!0);else if("visible"===document.visibilityState)if(_e&&(s.Log.i("{0a9be04}","{05deefa}"),Y.muted=!1,oe.muted=!1),Ce){const Ue=null!==(L=Mt.So.userTerminatedMicRecorderThreshold)&&void 0!==L?L:2e3;this.vF-this.eD.nb(){var L,Y;this.pF((null!==(L=this.CB)&&void 0!==L?L:null!==(Y=this.Xd)&&void 0!==Y&&Y.qR())?15867912:15867905)},this.lB=()=>{this.eD.cb(this.jO),this.jO++},this.AB=L=>{var Y;L.detail.idle&&(this.XO=window.setTimeout(()=>{var oe;null===(oe=this.Xd)||void 0===oe||oe.wR(15867913)},6e4),null===(Y=this.Xd)||void 0===Y||Y.zR(2,60))},this.QS=()=>{this.eD.QS()};const D=window.zoneless;this.ur=new kl,this.Jm=tr.getInstance(this.Rs,D),this.telemetry=new Ba,this.eD=new Es(this.Rs,this.telemetry),this.dB=new Ac(this.telemetry),Mt.Oo&&this.Jm.rA(this.jm),di(this.telemetry),this.vB(),Mt.So.sendNonEssentialMetricEvents&&this.telemetry.eb("PlatformDetailsExecutionTime","",this.Rs.totalTime,0,0,0),s.Log.i("{0a9be04}","{16f11e6}",Ye),s.Log.d("{0a9be04}","{e85ad66}",navigator.userAgent)}startStreaming(a){var u,S,D,L,Y,oe,_e,Ce,Ue,$e,Be,at,At,dt,kt,_n,An,tn;if(4!==this.streamingState&&0!==this.streamingState)return s.Log.w("{0a9be04}","{60a7ff5}"),this.telemetry.Ke("SessionSetupInProgressError",a.resume?"resume":"start"),3237085186;const Dn=this.gF(a);if(15859712!==Dn)return Dn;if(this.isResume=null!==(u=a.resume)&&void 0!==u&&u,this.sessionId=a.sessionId,this.subSessionId=null!==(S=a.subSessionId)&&void 0!==S?S:"",this.zoneAddress=null!==(D=a.zoneAddress)&&void 0!==D?D:"",this.zoneName=null!==(Y=null===(L=a.statTelemetryInfo)||void 0===L?void 0:L.zoneName)&&void 0!==Y?Y:"",this.appId=null!==(_e=null===(oe=a.statTelemetryInfo)||void 0===oe?void 0:oe.appId)&&void 0!==_e?_e:0,this.telemetry.Zx(this.subSessionId,this.sessionId,this.appId.toString(),this.isResume,this.zoneAddress),this.dB.reset(this.sessionId,this.subSessionId),In(this.Rs,15)){const mi="streamKitOldPlay";for(const Vi of this.sD){const Xi=Vi;Xi[mi]||(Xi[mi]=Vi.play);const Ii=Mt.Uo&&En(this.Rs,15,1);Vi.play=()=>{if(Mt.Lo&&(s.Log.i("{0a9be04}","{4a5b360}"),this.jB(),this.JB(),this.eD.QS()),Ii){s.Log.i("{0a9be04}","{8f5cd77}");const rr=Vi.srcObject;Vi.srcObject&&(Vi.srcObject=null,Vi.srcObject=rr)}return Xi[mi].apply(Vi)}}}if(Mt.Go&&(En(this.Rs,15,0)||En(this.Rs,15,1))){const mi="data-shouldautoplay",Vi="autoplay";for(const Xi of this.sD)Xi.hasAttribute(mi)?Xi.setAttribute(Vi,""):(Xi.setAttribute(mi,""),Xi.removeAttribute(Vi))}let Bn={ip:"",port:0,appLevelProtocol:0,usage:0,protocol:0};a.mediaConnectionInfo&&(Bn.ip=a.mediaConnectionInfo.address,Bn.port=a.mediaConnectionInfo.port,Bn.usage=2);const Mn={ip:a.signalConnectionInfo.address,port:a.signalConnectionInfo.port,protocol:(null!==(Ce=a.signalConnectionInfo.secure)&&void 0!==Ce?Ce:!tt(a.signalConnectionInfo.address))?"wss":"ws",resourcePath:a.signalConnectionInfo.resourcePath},ci={appId:this.appId,appLaunchMode:a.enableTouchInput?2:0,clientLocale:null!==($e=null===(Ue=a.statTelemetryInfo)||void 0===Ue?void 0:Ue.clientLocale)&&void 0!==$e?$e:"",gpuType:null!==(at=null===(Be=a.statTelemetryInfo)||void 0===Be?void 0:Be.gpuType)&&void 0!==at?at:"",mediaConnectionInfo:[Bn],sessionId:this.sessionId,signalConnectionInfo:Mn,state:"ready_for_connection",streamInfo:a.downstreamParams,subSessionId:this.subSessionId,zoneAddress:this.zoneAddress,zoneName:this.zoneName,finalizedStreamingFeatures:a.streamingFeatures,iceServerConfiguration:a.iceServerConfiguration},li={...Gr};return null!==(At=li.windowedStreaming)&&void 0!==At||(li.windowedStreaming=a.windowedStreaming),null!==(dt=li.cursorType)&&void 0!==dt||(li.cursorType=a.cursorType),this.Xd=new Ot(this,this.sD,this.eD,li,this.jm,this.Jm,this.telemetry,this.Rs,ci,this.ur,this.isResume,this.nD,a.downstreamParams,this.KS,null!==(kt=a.textInputElement)&&void 0!==kt?kt:null===(_n=this.AF)||void 0===_n?void 0:_n.textInputElement,null===(An=a.statTelemetryInfo)||void 0===An?void 0:An.clientAppVersion,null===(tn=a.statTelemetryInfo)||void 0===tn?void 0:tn.region,a.upstreamParams,a.signalConnectionInfo.queryParameters,a.enableMicUpstream),this.qB(),this.streamingState=1,this.dB.LO(),this.startTime=performance.now(),this.Xd.start(),a.keyboardLayout&&this.Xd.setKeyboardLayout(a.keyboardLayout),15859712}stopStreaming(a){this.Xd&&(1!==this.streamingState&&2!==this.streamingState||(s.Log.i("{0a9be04}","{ae7f61b}",Ve(a=null!=a?a:15859712)),this.streamingState=3,this.pF(a,!0)))}getStreamingState(){return this.streamingState}sendCustomMessage(a){var u;return null===(u=this.Xd)||void 0===u||u.sendCustomMessage(a),!!this.Xd}setStreamingMaxBitrate(a,u,S){var D;return null===(D=this.Xd)||void 0===D||D.setStreamingMaxBitrate(null!=u?u:0,a,S),!!this.Xd}setDynamicStreamingMode(a,u,S){var D;return null===(D=this.Xd)||void 0===D||D.setDrcDfcState(null!=u?u:0,a,S),!!this.Xd}setHdr10PlusGaming(a,u){var S;return null===(S=this.Xd)||void 0===S||S.iD(a,null!=u?u:0),!!this.Xd}setKeyboardLayout(a){var u;return null===(u=this.Xd)||void 0===u||u.setKeyboardLayout(a),!!this.Xd}setSupportedHidTypes(a){this.Jm.Bu(a)}setGamepadRsdmm(a){var u;return!!this.Xd&&(null===(u=this.Xd)||void 0===u||u.toggleRsdmm(a),!0)}getVirtualInputController(){return this}getGamepadBitmap(){return this.Jm.kv()}captureUserInput(a,u){var S;return null===(S=this.Xd)||void 0===S||S.toggleUserInput(a,u),!!this.Xd}sendTextInput(a){var u;return null===(u=this.Xd)||void 0===u||u.sendTextInput(a),!!this.Xd}getMicState(){return this.eD.WS()}captureMic(a,u){return!!this.Xd&&(this.fF=a,this.MB=a?u:void 0,this.fF?this.eD.jS(u):this.eD.zS(),!0)}setVideoTransforms(a,u,S,D){var L;return null===(L=this.Xd)||void 0===L||L.setVideoTransforms(a,u,S),!!this.Xd}setUpstreamMedia(a,u){var S;return this.Xd?null===(S=this.Xd)||void 0===S?void 0:S.setUpstreamMedia(a,u):Promise.resolve(!1)}unsetUpstreamMedia(a){var u;return this.Xd?null===(u=this.Xd)||void 0===u?void 0:u.unsetUpstreamMedia(a):Promise.resolve(!1)}stopUpstreamMedia(a){var u;return this.Xd?null===(u=this.Xd)||void 0===u?void 0:u.stopUpstreamMedia(a):Promise.resolve(!1)}startInputPlayback(a){var u;null===(u=this.Xd)||void 0===u||u.startInputPlayback(a)}_R(a){var u,S,D,L,Y,oe,_e;let Ce=15859712;if(a.error)Ce=a.error.code,this.delegate.onStreamStartFailed(Ce),this.pF(Ce);else{this.streamingState=2;const Ue={streams:[],separateAudioStream:!(null===(u=a.streams)||void 0===u||!u.find($e=>{const Be=$e.tracks.find(At=>"video"===At.kind),at=$e.tracks.find(At=>"audio"===At.kind);return!Be&&at}))};for(let $e=0;$e<(null!==(D=null===(S=a.streamInfo)||void 0===S?void 0:S.length)&&void 0!==D?D:0);$e++){const Be=a.streamInfo[$e],at={width:Be.width,height:Be.height,fps:Be.fps,sdrHdrMode:Be.sdrHdrMode,bitDepth:null!==(L=Be.bitDepth)&&void 0!==L?L:8,codec:null===(Y=this.Xd)||void 0===Y?void 0:Y.wy($e),videoTagId:this.sD[$e].id};Ue.streams.push(at)}this.delegate.onStreamStarted(Ue),this.isResume&&this.fF&&this.captureMic(!0,this.MB)}this.telemetry.iO(Math.round(performance.now()-this.startTime),Ve(Ce),null!==(_e=null===(oe=this.Xd)||void 0===oe?void 0:oe.wy(0))&&void 0!==_e?_e:"UNKNOWN"),15859712===Ce&&this.telemetry.oO({Yy:()=>{var Ue,$e;return null!==($e=null===(Ue=this.Xd)||void 0===Ue?void 0:Ue._E())&&void 0!==$e?$e:0},rO:()=>{var Ue;return null!==(Ue=this.CB)&&void 0!==Ue?Ue:15867911},wy:()=>{var Ue,$e;return null!==($e=null===(Ue=this.Xd)||void 0===Ue?void 0:Ue.wy(0))&&void 0!==$e?$e:"UNKNOWN"},aO:()=>performance.now()-this.startTime}),this.startTime=performance.now()}NR(a){this.pF(a.error.code)}jw(){this.zB()}emit(a,...u){var S,D,L,Y,oe,_e,Ce,Ue;if(u.length)switch(a){case"StreamingEvent":u[0].streamingWarnings&&(null===(D=(S=this.delegate).onStreamWarning)||void 0===D||D.call(S,u[0].streamingWarnings));break;case"StreamingQuality":null===(Y=(L=this.delegate).onStreamQuality)||void 0===Y||Y.call(L,u[0]);break;case"MicCapture":this.delegate.onMicStateUpdate&&void 0!==u[0].state&&this.delegate.onMicStateUpdate(u[0].state);break;case"TextComposition":null===(_e=(oe=this.delegate).onTextComposition)||void 0===_e||_e.call(oe,u[0]);break;case"CustomMessage":this.delegate.onCustomMessage&&this.delegate.onCustomMessage(u[0]);break;case"StreamStatsUpdate":null===(Ue=(Ce=this.delegate).onStreamStatistics)||void 0===Ue||Ue.call(Ce,u[0])}}addListener(a,u){}removeListener(a,u){}removeAllListeners(){}removeAllListenersOfEvent(a){}hasListener(a){return!0}setClientSupportsVirtualGamepad(a){this.Jm.getVirtualGamepadHandler().enable()}handleVirtualGamepadState(a,u,S){this.Jm.getVirtualGamepadHandler().updateInput(a,u,S)}setVirtualKeyboardState(a){var u;return null===(u=this.Xd)||void 0===u||u.setVirtualKeyboardState(a),!!this.Xd}handleVirtualKeyInput(a){var u;return null===(u=this.Xd)||void 0===u||u.sendKeyEvent(a),!!this.Xd}wF(){this.zB(),this.Xd=void 0,this.startTime=0,this.isResume=!1,this.CB=void 0,this.vF=0,this.jO=0,this.sessionId="",this.subSessionId="",this.zoneAddress="",this.zoneName="",this.sD=[],this.KS=void 0,this.fF=!1,this.MB=void 0,this.appId=0,this.setSupportedHidTypes(0),this.setGamepadRsdmm(!1)}vB(){var a,u,S;if(Mt.So.sendNonEssentialMetricEvents){const D="PerformanceTiming",L=performance.getEntriesByName("GfnJsInitStart")[0],Y=performance.getEntriesByName("platformBegin")[0],oe=performance.getEntriesByName("GfnNskBegin")[0],_e=performance.getEntriesByType("navigation"),Ce=Math.round(null!==(a=null==L?void 0:L.startTime)&&void 0!==a?a:-1),Ue=Math.round(null!==(u=null==Y?void 0:Y.startTime)&&void 0!==u?u:-1);if(this.telemetry.eb(D,"application timings",Ce,Ue,Math.round(null!==(S=null==oe?void 0:oe.startTime)&&void 0!==S?S:-1),Ue-Ce),!_e.length)return void this.telemetry.eb(D,"navigation timings unsupported",0,0,0,0);const $e=_e[_e.length-1];this.telemetry.eb(D,"load timings",Math.round($e.loadEventStart),Math.round($e.loadEventEnd),Math.round($e.domContentLoadedEventStart),Math.round($e.domContentLoadedEventEnd))}}pF(a,u){var S;if(4===this.streamingState||0===this.streamingState)return;const D=this.streamingState;this.streamingState=4,this.telemetry.dO(),this.telemetry.eb("HotPlug","",0,this.jO,0,0),Vt(this.Rs)&&this.fF&&(s.Log.d("{0a9be04}","{b9b1288}"),this.captureMic(!1)),this.eD.sb(),null===(S=this.Xd)||void 0===S||S.stop(a);const L=this.dB.HO(a);L&&(a=ks(a,this.Rs)),ut(this.zoneAddress,a).then(Y=>{var oe;if(a=Gs(a,Y),1!==D){const _e=ts(a,this.Rs);let Ce={code:a,isResumable:_e,isSessionAlive:Wo(a,_e),reason:3};u?Ce.reason=0:new Set([3237093892,15867907,3237093896,3237093897,3237093898,3237093899,3237093900,3237093895,3237093901,3237093906,3237093929,15867908,15868418,3237094151,3237094158]).has(a)?Ce.reason=2:15868672==(268435200&a)&&(Ce.reason=1);const $e=null===(oe=this.Xd)||void 0===oe?void 0:oe.GC(0);$e&&this.delegate.onStreamQualityReport&&this.delegate.onStreamQualityReport($e),this.delegate.onStreamStopped(Ce),this.Nx(a,Y,L)}this.jB(),this.wF(),this.$B()})}Nx(a,u,S){var D,L,Y,oe;const _e=Ve(a),Ce=performance.now()-this.startTime,Ue=null!==(L=null===(D=this.Xd)||void 0===D?void 0:D.wy(0))&&void 0!==L?L:"UNKNOWN",$e=null!==(oe=null===(Y=this.Xd)||void 0===Y?void 0:Y._E())&&void 0!==oe?oe:0;this.telemetry.sO(_e,Ce,Ue,$e,u,S)}zB(){this.XO&&(window.clearTimeout(this.XO),this.XO=0)}qB(){var a,u,S,D;const L=window.zoneless,Y=null!==(u=null===(a=null==L?void 0:L.windowAddEventListener)||void 0===a?void 0:a.bind(window))&&void 0!==u?u:window.addEventListener.bind(window),oe=null!==(D=null===(S=null==L?void 0:L.documentAddEventListener)||void 0===S?void 0:S.bind(document))&&void 0!==D?D:document.addEventListener.bind(document);Y("pagehide",this.eB),Y("error",this.aB),oe("visibilitychange",this.mF),navigator.mediaDevices&&navigator.mediaDevices.addEventListener("devicechange",this.lB),ln(this.Rs)&&oe("SystemIdle",this.AB)}$B(){var a,u,S,D;const L=window.zoneless,Y=null!==(u=null===(a=null==L?void 0:L.windowRemoveEventListener)||void 0===a?void 0:a.bind(window))&&void 0!==u?u:window.removeEventListener.bind(window),oe=null!==(D=null===(S=null==L?void 0:L.documentRemoveEventListener)||void 0===S?void 0:S.bind(document))&&void 0!==D?D:document.removeEventListener.bind(document);Y("pagehide",this.eB),Y("error",this.aB),oe("visibilitychange",this.mF),navigator.mediaDevices&&navigator.mediaDevices.removeEventListener("devicechange",this.lB),ln(this.Rs)&&(oe("SystemIdle",this.AB),this.zB())}jB(){Mt.Lo&&(window[bl]&&(window[bl].close(),window[bl]=void 0,s.Log.i("{0a9be04}","{0ac2a42}")),window[yl]=void 0,navigator.mediaDevices&&this.QS&&navigator.mediaDevices.removeEventListener("devicechange",this.QS))}JB(){if(!Mt.Lo)return;if(window[bl])return void s.Log.i("{0a9be04}","{e2aba64}");const a=new(window.AudioContext||window.webkitAudioContext)({latencyHint:"interactive",sampleRate:48e3});a.onstatechange=()=>{"suspended"===a.state&&(a.resume(),this.eD.QS(),s.Log.i("{0a9be04}","{faee684}"))},window[bl]=a,window[yl]=a.createMediaStreamDestination(),navigator.mediaDevices&&this.QS&&navigator.mediaDevices.addEventListener("devicechange",this.QS),s.Log.i("{0a9be04}","{b5f7b9b}")}gF(a){if(a.downstreamParams.length)for(const D of a.downstreamParams){const L=D.videoTagId,Y=document.getElementById(L);if(!(Y&&Y instanceof HTMLVideoElement))return s.Log.e("{0a9be04}","{543aef4}",L),3237094400;this.sD.push(Y)}else if(a.audioTagId){const D=document.getElementById(a.audioTagId);if(!(D&&D instanceof HTMLAudioElement))return 3237094401;this.KS=D}const u=!!Mt.Co&&!!Mt.To,S=!!Mt.fps;if(u||S){for(const D of a.downstreamParams)u&&(D.width=Mt.Co,D.height=Mt.To),S&&(D.fps=Mt.fps);u&&s.Log.i("{0a9be04}","{92a6b38}",Mt.Co,Mt.To),S&&s.Log.d("{0a9be04}","{6618bcd}",Mt.fps)}return a.iceServerConfiguration&&(a.iceServerConfiguration=gn(a.iceServerConfiguration)),15859712}}I.AuthType=s.AuthType,I.BitDepth=s.BitDepth,I.BrowserName=s.PlatformBrowser,I.ClientHeaderBrowserType=s.ClientHeaderBrowserType,I.ClientHeaderDeviceType=s.ClientHeaderDeviceType,I.ClientHeaderOSType=s.ClientHeaderOSType,I.LogLevel=s.LogLevel,I.NetworkType=s.NetworkType,I.PayloadBrowserType=s.PayloadBrowserType,I.PayloadDeviceType=s.PayloadDeviceType,I.PayloadOSType=s.PayloadOSType,I.PlatformName=s.PlatformOS,I.Profile=s.Profile,I.SdrHdrMode=s.SdrHdrMode,I.performHttpRequest=s.performHttpRequest,I.translatePlatformDetailsForClientHeader=s.translatePlatformInfoForClientHeader,I.translatePlatformDetailsForPayload=s.translatePlatformInfoForPayload,I.AddPlatformTelemetry=di,I.CHANGELIST="rel-74-29276016",I.CLIENT_IDENTIFICATION=po,I.CLIENT_VERSION=Uo,I.CalculateDataUsage=function(m,a){return nn(m,a)},I.CalculateMaxBitrateKbps=function(m,a,u){return qe(m,a,u)[0]},I.ChooseStreamingResolution=function(m=0,a){return Mr(m,null==a?void 0:a.map(u=>({resolution:u,frameRate:60})),es(),screen.width,screen.height).resolution},I.ChooseStreamingSettings=function(m=0,a,u){return Mr(m,a,es(u),screen.width,screen.height)},I.ConfigureGridServerSettings=function(m){Ko(m)},I.ConfigureRagnarokSettings=Kr,I.GetDeviceCapabilities=pn,I.GetSupportedAudioChannelCount=Ho,I.GridApp=class extends bi{constructor(m){var a,S;super("Log"),this.Rs=m,this._O=!1,this.$o=!1,this.jm=new dl,this.qO=!1,this.$O=void 0,this.zO=void 0,this.KO=!1,this.QO=0,this.XO=0,this.YO=0,this.jO=0,this.JO=!1,this.ZO=!1,this.tB=0,this.Yx=0,this.useTelemetryV2=!1,s.Logger.isCallbackRegistered()||s.Logger.register(this.Ye.bind(this)),this.iB={clientIdentification:po,clientVersion:Uo,deviceHashId:"",serverAddress:""},this.startTime=performance.now(),this.sB=this.eB.bind(this),this.nB=this.Pn.bind(this),this.hB=this.oB.bind(this),this.rB=this.aB.bind(this),this.framesDecoded=0,this.cO=new cl,this.useTelemetryV2=null===(a=Mt.So.useTelemetryV2)||void 0===a||a,this.telemetry=(S=this.cO,this.useTelemetryV2?new Sc(this,S):new Ja(this,S)),this.useTelemetryV2&&(this.Jx=s.TelemetryModule.createTelemetryProvider(Zo)),this.dB=new Ac(this.telemetry),this.isResume=!1,this.cB=Gr,this.nD=new aa,window.addEventListener("error",this.rB);const D=window.zoneless;this.eD=new Es(this.Rs,this.telemetry),this.zO=this.eD.QS.bind(this.eD),this.$O=this.lB.bind(this),this.ur=new kl,this.Jm=tr.getInstance(this.Rs,D),Mt.Oo&&this.Jm.rA(this.jm),this.uB=this.AB.bind(this),di(this.telemetry),this.vB(),Mt.So.sendNonEssentialMetricEvents&&this.telemetry.eb("PlatformDetailsExecutionTime","",this.Rs.totalTime,0,0,0),so.registerCallback(L=>{var Y;null===(Y=this.fB)||void 0===Y||Y.setNetworkType(L)})}pB(){if(this.fB){const m=this.fB.getSessionId(),a=this.fB.getSubSessionId();s.Log.d("{9d1820c}","{2fd42df}",m,a),this.telemetry.Qn(a),this.telemetry.Kn(m),this.dB.reset(m,a),this.cO.Kx(m,a)}}aB(m){return s.Log.e("{9d1820c}","{8516485}",m.filename,m.lineno,m.colno),this.telemetry.cc(m.error,m.error&&m.error.message?m.error.message:m.message,m.filename,m.lineno,m.colno,!1),Mt.So.terminateUnhandledException&&this.mB(3237093392),!1}gB(){this.tB=this.tB+(performance.now()-this.YO)}wB(m){"hidden"===document.visibilityState&&this.gB();let a=0;m&&(a=Math.max(0,100*(m-this.tB)/m)),this.telemetry.eb("sessionVisibilityMetrics","",a,Math.round(m),Math.round(this.tB),0),this.tB=0,this.YO=0}AO(m){var a;this.SB(),this.telemetry.AO(m,!0),this.Yx&&(null===(a=this.Jx)||void 0===a||a.dropCachedEvent(this.Yx),this.Yx=0),this.wB(m.streamDuration)}bB(m,a,u,S){var D,L,Y,oe;return{exitErrorCode:Ve(m.error?m.error.code:15859712),sessionId:m.sessionId,subSessionId:m.subSessionId,zoneAddress:m.zoneAddress,streamDuration:a,frameCount:this.framesDecoded,codec:null!==(L=null===(D=this.Xd)||void 0===D?void 0:D.wy(0))&&void 0!==L?L:"UNKNOWN",isResume:this.isResume,connectivityInfo:u,sleep:null!=S&&S,networkTestSessionId:null!==(oe=null===(Y=this.kB)||void 0===Y?void 0:Y.yB.networkSessionId)&&void 0!==oe?oe:""}}IB(){var m,a;this.KO||(this.KO=!0,this.mB((null!==(m=this.CB)&&void 0!==m?m:null!==(a=this.Xd)&&void 0!==a&&a.qR())?15867912:15867905))}eB(m){this.IB()}Pn(m){s.Log.i("{9d1820c}","{a9a135f}"),this.cO.zx()}oB(m){var a;if(s.Log.i("{9d1820c}","{478a408}",document.visibilityState,!!this.Xd),!this.Xd)return;const u=this.kB.TB[0].af,S=In(this.Rs,15,4)&&Mt.Vo,D=In(this.Rs,15,4)&&this.$o&&Mt.Ho;if("hidden"===document.visibilityState)this.YO=performance.now(),S&&(s.Log.i("{9d1820c}","{cbd3b6e}"),u.muted=!0),this.EB();else if("visible"===document.visibilityState)if(this.gB(),S&&(s.Log.i("{9d1820c}","{05deefa}"),u.muted=!1),D){const L=null!==(a=Mt.So.userTerminatedMicRecorderThreshold)&&void 0!==a?a:2e3;this.YO-this.eD.nb(){if(!L)throw{code:3237093381,message:"Server response does not contain session information"};return this.pB(),s.Log.d("{9d1820c}","{92a2573}",L.sessionId,L.subSessionId),"ready_for_connection"===L.state?(s.Log.d("{9d1820c}","{2042e0a}"),this.UB=L,this.UB.iceServerConfiguration=a.yB.iceServerConfiguration,new Promise((Y,oe)=>{Y(L)})):D.getSession(L.sessionId,!0)}).then(L=>{this.UB=L,this.UB&&(this.UB.iceServerConfiguration=a.yB.iceServerConfiguration),s.Log.d("{9d1820c}","{315afdc}",null==L?void 0:L.sessionId),this.startStreaming(a)}).catch(L=>{var Y,oe,_e,Ce,Ue,$e;if(this.pB(),L.code){15867905!=L.code&&15867906!=L.code||D.getSessionId()&&!this.ZO&&this.sendDeleteRequest(D.getSessionId(),D),s.Log.e("{9d1820c}","{09efe49}",Ve(L.code));let Be={sessionId:null!==(Y=D.getSessionId())&&void 0!==Y?Y:"",subSessionId:null!==(oe=D.getSubSessionId())&&void 0!==oe?oe:"",error:L,sessionList:L.sessionList,streamInfo:null===(_e=this.UB)||void 0===_e?void 0:_e.streamInfo,zoneName:null!==(Ce=D.getZoneName())&&void 0!==Ce?Ce:"",zoneAddress:null!==(Ue=D.getZoneAddress())&&void 0!==Ue?Ue:"",gpuType:null!==($e=D.getGpuType())&&void 0!==$e?$e:"",isResume:this.isResume};this._R(Be,!0)}else this.FB(L)})}catch(D){this.FB(D)}}else{const D={sessionId:"",subSessionId:"",zoneName:"",zoneAddress:"",gpuType:"",isResume:this.isResume,error:this.BB(this.isResume?"Resume":"Start")};this.emit("SessionStartResult",D)}}VB(m){this.telemetry.Ke("SessionSetupInProgressError",m?"resume":"start")}WB(m){var a,u,S,D,L,Y,oe,_e,Ce;return this.cO.Ux(m,null!==(u=null===(a=this.fB)||void 0===a?void 0:a.getSessionId())&&void 0!==u?u:"",null!==(D=null===(S=this.fB)||void 0===S?void 0:S.getSubSessionId())&&void 0!==D?D:"",(null===(L=this.fB)||void 0===L?void 0:L.getZoneAddress())||this.iB.serverAddress,performance.now()-this.startTime,null!==(oe=null===(Y=this.Xd)||void 0===Y?void 0:Y._E())&&void 0!==oe?oe:0,null!==(Ce=null===(_e=this.Xd)||void 0===_e?void 0:_e.wy(0))&&void 0!==Ce?Ce:"UNKNOWN",this.isResume)}SB(){0!==this.QO&&(window.clearTimeout(this.QO),this.QO=0)}EB(){var m,a,u;const S=this.WB(Ve(null!==(m=this.CB)&&void 0!==m?m:15867911)),D=this.QO;let L;this.useTelemetryV2?(this.Yx=null!==(u=null===(a=this.Jx)||void 0===a?void 0:a.cacheEvent({name:S.name,gdprLevel:S.gdprLevel,priority:!0,ts:S.ts,parameters:S.parameters},this.Yx))&&void 0!==u?u:0,L=Promise.resolve()):L=this.cO.Wx(),L.then(()=>{D===this.QO&&this._B()}).catch(()=>{s.Log.e("{9d1820c}","{204a7ac}")})}_B(){this.SB(),this.QO=window.setTimeout(()=>this.EB(),12e4)}qB(){window.addEventListener("pagehide",this.sB),window.addEventListener("online",this.nB),document.addEventListener("visibilitychange",this.hB),navigator.mediaDevices&&navigator.mediaDevices.addEventListener("devicechange",this.$O)}vB(){var m,a,u;if(Mt.So.sendNonEssentialMetricEvents){const S="PerformanceTiming",D=performance.getEntriesByName("GfnJsInitStart")[0],L=performance.getEntriesByName("platformBegin")[0],Y=performance.getEntriesByName("GfnRBegin")[0],oe=performance.getEntriesByType("navigation"),_e=Math.round(null!==(m=null==D?void 0:D.startTime)&&void 0!==m?m:-1),Ce=Math.round(null!==(a=null==L?void 0:L.startTime)&&void 0!==a?a:-1);if(this.telemetry.eb(S,"application timings",_e,Ce,Math.round(null!==(u=null==Y?void 0:Y.startTime)&&void 0!==u?u:-1),Ce-_e),!oe.length)return void this.telemetry.eb(S,"navigation timings unsupported",0,0,0,0);const Ue=oe[oe.length-1];this.telemetry.eb(S,"load timings",Math.round(Ue.loadEventStart),Math.round(Ue.loadEventEnd),Math.round(Ue.domContentLoadedEventStart),Math.round(Ue.domContentLoadedEventEnd))}}$B(){window.removeEventListener("pagehide",this.sB),window.removeEventListener("online",this.nB),document.removeEventListener("visibilitychange",this.hB),navigator.mediaDevices&&navigator.mediaDevices.removeEventListener("devicechange",this.$O),ln(this.Rs)&&(document.removeEventListener("SystemIdle",this.uB),this.zB())}KB(m){this.CB=void 0,this.cO.zx(),this.JO=!0,this.qB(),this.isResume=m,this.qO&&this.VB(this.isResume),this.qO=!0}startSession(m){this.KB(!1);const a=this.QB(m);a&&this.HB(0,a)}updateAdState(m){var a;return this.fB?null===(a=this.fB)||void 0===a?void 0:a.updateAdState(m):3237093380}getSession(m){if(this.fB)this.fB.getSession(m,!1).then(a=>{var u,S;let D={sessionId:null!==(u=null==a?void 0:a.sessionId)&&void 0!==u?u:"",appId:null==a?void 0:a.appId,subSessionId:null!==(S=null==a?void 0:a.subSessionId)&&void 0!==S?S:"",state:null==a?void 0:a.state,status:null==a?void 0:a.state};this.emit("GetSessionResult",D)}).catch(a=>{var u,S;let D={sessionId:m,subSessionId:null!==(S=null===(u=this.fB)||void 0===u?void 0:u.getSubSessionId())&&void 0!==S?S:"",error:a};this.emit("GetSessionResult",D)});else{const a={sessionId:"",subSessionId:"",error:this.BB("GetSession")};this.emit("GetSessionResult",a)}}resume(){this.resumeSession(this.kB.yB,this.fB.getSessionId())}resumeSession(m,a){this.KB(!0);const u=this.QB(m);u&&this.HB(2,u,a)}stopSession(m,a){var u,S,D,L,Y,oe,_e;if(this.fB)if(void 0!==a&&s.Log.i("{9d1820c}","{ae7f61b}",Ve(a)),m===this.fB.getSessionId()||void 0===m){15867910===a?this.ZO=!0:this._O=!1,this.eD.sb(),this.framesDecoded=null!==(S=null===(u=this.Xd)||void 0===u?void 0:u._E())&&void 0!==S?S:0,this.dB.GO();const Ce=this.bB({sessionId:null!==(D=this.fB.getSessionId())&&void 0!==D?D:"",subSessionId:null!==(L=this.fB.getSubSessionId())&&void 0!==L?L:"",error:a?{code:a}:void 0,zoneName:null!==(Y=this.fB.getZoneName())&&void 0!==Y?Y:"",zoneAddress:this.fB.getZoneAddress()||this.iB.serverAddress,gpuType:null!==(oe=this.fB.getGpuType())&&void 0!==oe?oe:"",isResume:this.isResume},performance.now()-this.startTime);m=null!==(_e=this.fB.getSessionId())&&void 0!==_e?_e:"",this.Xd?(this.JO=!1,this.$B(),this.Xd.qR()&&this.AO(Ce),this.XB(null!=a?a:this.Xd.qR()?15859712:15867905),15867910===a?(s.Log.d("{9d1820c}","{12bc45e}",m),this.YB(m)):this.sendDeleteRequest(m,this.fB)):this.UB?this.YB(m):this.cancelSessionSetup()}else m&&this.sendDeleteRequest(m,this.fB);else{const Ce={sessionId:"",subSessionId:"",error:this.BB("StopSession")};this.emit("SessionStopResult",Ce)}}pauseSession(m){this.stopSession(m,15867910)}startStreaming(m){var a,u,S,D,L;const Y={sessionId:null!==(u=null===(a=this.fB)||void 0===a?void 0:a.getSessionId())&&void 0!==u?u:"",subSessionId:null!==(D=null===(S=this.fB)||void 0===S?void 0:S.getSubSessionId())&&void 0!==D?D:"",progressState:"StartingStreamer",queuePosition:0,eta:0,ads:[],isAdsRequired:!1};this.emit("SessionUpdate",Y);const oe={...Y,state:Y.progressState};this.emit("ProgressUpdate",oe);const _e=tt(this.iB.serverAddress)?"":this.iB.serverAddress.split(".")[0],{af:Ce}=m.TB[0];if(In(this.Rs,15)){const At="streamKitOldPlay",dt=Ce;dt[At]||(dt[At]=Ce.play);const kt=Mt.Uo&&En(this.Rs,15,1);Ce.play=()=>{if(Mt.Lo&&(s.Log.i("{9d1820c}","{4a5b360}"),this.jB(),this.JB(),this.eD.QS()),kt){s.Log.i("{9d1820c}","{8f5cd77}");const _n=Ce.srcObject;Ce.srcObject=null,Ce.srcObject=_n}return dt[At].apply(Ce)}}if(Mt.Go&&(En(this.Rs,15,0)||En(this.Rs,15,1))){const At="data-shouldautoplay",dt="autoplay";Ce.hasAttribute(At)?Ce.setAttribute(dt,""):(Ce.setAttribute(At,""),Ce.removeAttribute(dt))}const Ue=m.yB.streamParams[0];let at;this.Xd=new Ot(this,[Ce],this.eD,this.cB,this.jm,this.Jm,this.telemetry,this.Rs,this.UB,this.ur,this.isResume,this.nD,[{width:Ue.width,height:Ue.height,fps:Ue.fps,videoTagId:Ue.videoTagId,dynamicStreamingMode:Ue.drc?3:!1===Ue.drc?0:void 0,maxBitrateKbps:Ue.maxBitrateKbps}],void 0,this.iB.textInputElement,this.iB.clientAppVersion,_e,Ue.sendVideoTrack?[{track:Ue.sendVideoTrack}]:void 0,m.yB.signalingUrlQueryParameters),this.Xd.start(),m.yB.keyboardLayout&&this.Xd.setKeyboardLayout(m.yB.keyboardLayout),this.useTelemetryV2?(null===(L=this.Jx)||void 0===L||L.processCachedEvent(this.Yx),at=Promise.resolve()):at=this.telemetry.qx(!0),at.then(()=>{this.EB()}).catch(()=>{s.Log.e("{9d1820c}","{c761bfd}")})}ZB(m){this.qO=!1,m.error&&(this.JO=!1,this.$B()),this.emit("SessionStartResult",m)}tF(m,a,u){var S,D,L,Y,oe;if(this.jB(),u){const _e=u.connectivityInfo;if(_e&&!_e.Pn){this.SB();const Ce=this.WB(Ve(null!==(D=null===(S=m.error)||void 0===S?void 0:S.code)&&void 0!==D?D:15867911));this.useTelemetryV2?this.Yx=null!==(Y=null===(L=this.Jx)||void 0===L?void 0:L.cacheEvent({name:Ce.name,gdprLevel:Ce.gdprLevel,priority:!0,ts:Ce.ts,parameters:Ce.parameters},this.Yx))&&void 0!==Y?Y:0:this.cO.Wx().catch(()=>{s.Log.e("{9d1820c}","{0c2de99}")})}else this.AO(u)}if(this.XB(m.error?m.error.code:15859712),a)this.ZB(m);else{if(m.error){const _e=ts(m.error.code,this.Rs),Ce=m;Ce.isResumable=_e,Ce.isSessionAlive=Wo(m.error.code,_e),s.Log.i("{9d1820c}","{723f7be}",_e)}if(this.JO=!1,this.qO=!1,this.$B(),this.Xd){const _e=null===(oe=this.Xd)||void 0===oe?void 0:oe.GC(0);_e&&this.emit("StreamQualityReport",_e)}this.emit("StreamStopped",m)}}XB(m){this.Xd&&(this.Xd.stop(m),this.Xd=void 0)}YB(m,a){var u,S;const D={sessionId:m,subSessionId:null!==(S=null===(u=this.fB)||void 0===u?void 0:u.getSubSessionId())&&void 0!==S?S:"",framesDecoded:this.framesDecoded,error:a};this.jB(),Vt(this.Rs)&&this.$o&&(s.Log.d("{9d1820c}","{b9b1288}"),this.setMicRecordingEnabled(!1)),this.emit("SessionStopResult",D)}_R(m,a){var u,S,D,L,Y,oe;if(m.error){const _e=this.dB.HO(m.error.code);_e&&(m.error.code=ks(m.error.code,this.Rs)),ut(this.iB.serverAddress,m.error.code).then(Ce=>{var Ue,$e,Be;let at;this.framesDecoded=null!==($e=null===(Ue=this.Xd)||void 0===Ue?void 0:Ue._E())&&void 0!==$e?$e:0,m.zoneAddress||(m.zoneAddress=this.iB.serverAddress),m.error&&(m.error.code=Gs(m.error.code,Ce)),a||(at=this.bB(m,0,Ce,_e),this.CB=null===(Be=m.error)||void 0===Be?void 0:Be.code),this.tF(m,!0,at)})}else this.telemetry.uO(m.sessionId,m.subSessionId,this.isResume,m.zoneAddress||this.iB.serverAddress,Math.round(performance.now()-this.startTime),Ve(15859712),null!==(S=null===(u=this.Xd)||void 0===u?void 0:u.wy(0))&&void 0!==S?S:"UNKNOWN",this.kB?String(null===(D=this.kB)||void 0===D?void 0:D.yB.appId):"",null!==(Y=null===(L=this.kB)||void 0===L?void 0:L.yB.networkSessionId)&&void 0!==Y?Y:""),this.startTime=performance.now(),"hidden"===document.visibilityState&&(this.YO=this.startTime),this.tB=0,this.isResume&&this.$o&&this.setMicRecordingEnabled(!0,this.MB),this.ZB(m),this._O&&(null===(oe=this.Xd)||void 0===oe||oe.toggleUserInput(!0,this.inputs)),ln(this.Rs)&&document.addEventListener("SystemIdle",this.uB)}NR(m){var a,u;this.eD.sb(),s.Log.d("{9d1820c}","{a94b484}");let S=this.dB.HO(m.error.code);S&&(m.error.code=ks(m.error.code,this.Rs)),this.framesDecoded=null!==(u=null===(a=this.Xd)||void 0===a?void 0:a._E())&&void 0!==u?u:0,m.zoneAddress||(m.zoneAddress=this.iB.serverAddress),ut(this.iB.serverAddress,m.error.code).then(D=>{m.error.code=Gs(m.error.code,D);const L=this.bB(m,performance.now()-this.startTime,D,S);this.CB=m.error.code,this.telemetry.eb("HotPlug","",0,this.jO,0,0),this.jO=0,this.tF(m,!1,L)})}jw(){this.zB()}QB(m){var a,u,S;let D={yB:Object.assign({},m),TB:[]};if(D.yB.streamParams)for(const _e of D.yB.streamParams){const Ce=document.getElementById(_e.videoTagId);if(null==Ce||!(Ce instanceof HTMLVideoElement))return void this.GB({code:3237094400,description:"Didn't find video element for videoTagId: "+_e.videoTagId},"",Ln());D.TB.push({af:Ce})}var L;if(D.yB.keyboardLayout=null!==(a=D.yB.keyboardLayout)&&void 0!==a?a:ke(this.Rs)?"m-us":"en_US",void 0!==D.yB.appLaunchMode&&0!==D.yB.appLaunchMode||(D.yB.appLaunchMode=Rn()||Xt(this.Rs)||Nt(this.Rs)||((L=this.Rs).platformType||L.deviceType)===s.PlatformType.HMD?1:0),Mt.Qo)if(D.yB.metaData)for(const _e in Mt.Qo)D.yB.metaData[_e]=Mt.Qo[_e];else D.yB.metaData=Mt.Qo;void 0!==Mt.appLaunchMode&&(D.yB.appLaunchMode=Mt.appLaunchMode,s.Log.d("{9d1820c}","{c4969b1}",Mt.appLaunchMode));const Y=!!Mt.Co&&!!Mt.To,oe=!!Mt.fps;return(Y||oe)&&(null===(u=D.yB.streamParams)||void 0===u||u.forEach(_e=>{Y&&(_e.width=Mt.Co,_e.height=Mt.To),oe&&(_e.fps=Mt.fps)}),null===(S=D.yB.monitorSettings)||void 0===S||S.forEach(_e=>{Y&&(_e.widthInPixels=Mt.Co,_e.heightInPixels=Mt.To),oe&&(_e.framesPerSecond=Mt.fps)}),Y&&s.Log.i("{9d1820c}","{92a6b38}",Mt.Co,Mt.To),oe&&s.Log.d("{9d1820c}","{6618bcd}",Mt.fps)),D.yB.iceServerConfiguration&&(D.yB.iceServerConfiguration=gn(D.yB.iceServerConfiguration)),this.kB=D,this.kB}sendDeleteRequest(m,a){a.sendDeleteRequest(m).then(()=>{s.Log.d("{9d1820c}","{fee1eea}",m),this.YB(m)},u=>{s.Log.e("{9d1820c}","{50e2a6e}",m),this.YB(m,u)})}isMicSupported(){return Es.isMicSupported()}setMicRecordingEnabled(m,a){s.Log.i("{9d1820c}","{f5b2f30}",m),m?(this.$o=!0,this.MB=a,this.eD.jS(this.MB)):(this.$o=!1,this.MB=void 0,this.eD.zS())}getMicState(){this.eD._S()}shouldDefaultEnableMic(){return Ee(this.Rs)}sendCustomMessage(m){var a;null===(a=this.Xd)||void 0===a||a.sendCustomMessage(m)}toggleUserInput(m,a){var u;null===(u=this.Xd)||void 0===u||u.toggleUserInput(m,a),this._O=m,this.inputs=a}toggleRsdmm(m){var a;null===(a=this.Xd)||void 0===a||a.toggleRsdmm(m)}getVirtualGamepadHandler(){var m;return null===(m=this.Xd)||void 0===m?void 0:m.getVirtualGamepadHandler()}setAuthInfo(m){var a;null===(a=this.fB)||void 0===a||a.setAuthInfo(m)}sendTextInput(m){var a;null===(a=this.Xd)||void 0===a||a.sendTextInput(m)}setVirtualKeyboardState(m){var a;null===(a=this.Xd)||void 0===a||a.setVirtualKeyboardState(m)}setVideoTransforms(m,a,u){var S;null===(S=this.Xd)||void 0===S||S.setVideoTransforms(m,a,u)}toggleOnScreenStats(){var m;Mt.isInternalUser&&(null===(m=this.Xd)||void 0===m||m.toggleOnScreenStats())}toggleStutterIndicator(){var m;null===(m=this.Xd)||void 0===m||m.toggleStutterIndicator()}setKeyboardLayout(m){var a;s.Log.i("{9d1820c}","{10717a6}",m),null===(a=this.Xd)||void 0===a||a.setKeyboardLayout(m)}sendKeyEvent(m){var a;null===(a=this.Xd)||void 0===a||a.sendKeyEvent(m)}setStreamingMaxBitrate(m,a=0){var u;null===(u=this.Xd)||void 0===u||u.setStreamingMaxBitrate(a,m)}setDrcDfcState(m,a=0){var u;null===(u=this.Xd)||void 0===u||u.setDrcDfcState(a,m?3:0)}setHdr10PlusGaming(m,a){var u;null===(u=this.Xd)||void 0===u||u.iD(m,null!=a?a:0)}startInputPlayback(m){var a;null===(a=this.Xd)||void 0===a||a.startInputPlayback(m)}JB(){if(!Mt.Lo)return;if(window[Ua])return void s.Log.i("{9d1820c}","{e2aba64}");const m=new(window.AudioContext||window.webkitAudioContext)({latencyHint:"interactive",sampleRate:48e3});m.onstatechange=()=>{"suspended"===m.state&&(m.resume(),this.eD.QS(),s.Log.i("{9d1820c}","{faee684}"))},window[Ua]=m,window[hs]=m.createMediaStreamDestination(),navigator.mediaDevices&&this.zO&&navigator.mediaDevices.addEventListener("devicechange",this.zO),s.Log.i("{9d1820c}","{b5f7b9b}")}jB(){Mt.Lo&&(window[Ua]&&(window[Ua].close(),window[Ua]=void 0,s.Log.i("{9d1820c}","{0ac2a42}")),window[hs]=void 0,navigator.mediaDevices&&this.zO&&navigator.mediaDevices.removeEventListener("devicechange",this.zO))}AB(m){var a;m.detail.idle&&(null===(a=this.Xd)||void 0===a||a.zR(2,60),this.XO=window.setTimeout(()=>{var u;null===(u=this.Xd)||void 0===u||u.wR(15867913)},6e4))}zB(){this.XO&&(window.clearTimeout(this.XO),this.XO=0)}lB(){this.eD.cb(this.jO),this.jO++}mB(m){var a,u,S,D,L,Y,oe,_e,Ce,Ue;if(!this.JO)return;this.JO=!1,this.framesDecoded=null!==(u=null===(a=this.Xd)||void 0===a?void 0:a._E())&&void 0!==u?u:0;const $e={sessionId:null!==(D=null===(S=this.fB)||void 0===S?void 0:S.getSessionId())&&void 0!==D?D:"",subSessionId:null!==(Y=null===(L=this.fB)||void 0===L?void 0:L.getSubSessionId())&&void 0!==Y?Y:"",zoneName:null!==(_e=null===(oe=this.fB)||void 0===oe?void 0:oe.getZoneName())&&void 0!==_e?_e:"",zoneAddress:(null===(Ce=this.fB)||void 0===Ce?void 0:Ce.getZoneAddress())||this.iB.serverAddress,error:{code:m}},Be=this.bB($e,performance.now()-this.startTime);this.eD.sb(),this.Xd&&!(null!==(Ue=this.Xd)&&void 0!==Ue&&Ue.qR())||this.AO(Be),this.XB(m),this.cancelSessionSetup()}cancelSessionSetup(){!this.Xd&&this.fB&&this.fB.cancelSessionSetup()}BB(m){return{code:3237093380,description:m+" called before initialize"}}},I.GridServer=Jo,I.GridServerSettings=pr,I.GsErrorCode=I.ScErrorCode,I.InitializeUtils=function(){},I.IsFeatureSupported=na,I.LogImpl=_l,I.MediaTrackKind=I.TrackType,I.PassThruServer=to,I.RNotificationCode=I.StreamWarningType,I.VirtualGamepadHandler=_r,I.configureSessionControlSettings=Ko,I.configureStreamKitSettings=Kr,I.createNskStreamClient=function(m,a,u){return new Xc(m,a,u)},I.createSessionControl=function(m){const a=new Ds;if(a.init(m))return a;throw new Error("Session Control initialization failure.")},I.decodeWsErrorCodes=function(m){switch(m){case 3237101567:return 1e3;case 3237101566:return 1001;case 3237101565:return 1002;case 3237101564:return 1003;case 3237101562:return 1005;case 3237093890:return 1006;case 3237101560:return 1007;case 3237101559:return 1008;case 3237101558:return 1009;case 3237101557:return 1010;case 3237101556:return 1011;case 3237101555:return 1012;case 3237101554:return 1013;case 3237101553:return 1014;case 3237101552:return 1015;case 3237101551:return 3e3;case 3237101550:return 3003;case 3237101549:return 3008}if(m>=3237097472&&m<=3237101567)return m-3237097472+4e3},I.defaultInputConfigFlags=Gr,I.estimateDataUsage=nn,I.getDeviceCapabilities=He,I.getNetworkTypeDetector=function(){return so},I.getPlatformDetails=Si,I.getRecommendedBitrate=qe,I.getResumableSession=function(m,a){for(const u of m)if(u.appId===a&&Vo(u.state))return u},I.getStreamStartParameters=function(m){const a=JSON.parse(m),u={downstreamParams:[],signalConnectionInfo:{address:"",port:0},enableTouchInput:2===a.appLaunchMode,sessionId:a.sessionId,subSessionId:a.subSessionId,audioTagId:"",zoneAddress:a.zoneAddress,statTelemetryInfo:{appId:a.appId,zoneName:a.zoneName,gpuType:a.gpuType},streamingFeatures:a.finalizedStreamingFeatures};for(const S of a.monitorSettings)u.downstreamParams.push({width:S.widthInPixels,height:S.heightInPixels,fps:S.framesPerSecond,videoTagId:"",sdrHdrMode:S.sdrHdrMode});for(const S of a.connectionInfo)switch(S.usage){case 14:u.signalConnectionInfo.address=S.ip,u.signalConnectionInfo.port=S.port,u.signalConnectionInfo.secure=5===S.appLevelProtocol,u.signalConnectionInfo.resourcePath=S.resourcePath;break;case 2:case 17:u.mediaConnectionInfo={address:S.ip,port:S.port}}return u},I.getStreamerType=function(){return"WEBRTC"},I.getSupportedCodecs=nr,I.isCancelCode=os,I.isFeatureSupported=na,I.isResumableSessionState=Vo,I.prefetchDeviceCapabilities=function(){Ki.lb()},I.registerDeviceCapabilitiesChanged=function(m){Ki.Ab(m)},I.registerLogCallback=function(m){m?s.Logger.register(m):s.Logger.unregister()},I.serializeDeviceCapabilities=function(m){return JSON.stringify(m)},I.shouldDefaultEnableMic=Ee,I.unregisterDeviceCapabilitiesChanged=function(m){Ki.fb(m)},I.updateSessionParameters=function(m,a){var u;const S=JSON.parse(a);m.monitorSettings=null!==(u=S.clientRequestMonitorSettings)&&void 0!==u?u:[],m.streamingFeatures=S.requestedStreamingFeatures}},352:(vt,I,f)=>{var r=f(8536).default;(()=>{"use strict";var s={36:(E,T,x)=>{Object.defineProperty(T,"__esModule",{value:!0}),T.LogUploader=void 0;const M=x(623),y=x(596),b=x(614),c=x(492),i="loguploader";T.LogUploader=class{constructor(h,A,P,V,B,j,re=M.UploadEnvironment.PROD){var z=this;this.buffer=new y.LogBuffer(512e3),this.loggingIntervalId=0,this.isUploadInProgress=!1,this.finishRequested=!1,this.uploadChunk=r(function*(H=!1){if(z.isUploadInProgress)return;z.isUploadInProgress=!0;const U=z.buffer.getData();z.buffer.clear(),yield z.loggingService.sendChunk(U,H),z.isUploadInProgress=!1,z.finishRequested&&!H&&(b.Log.i(i,"Initiating final chunk upload because finish request received during pending upload"),z.finishRequested=!1,yield z.uploadChunk(!0))}),this.loggingService=new c.RemoteLoggingService(h,A,P,V,B,j,re)}start(h){b.Log.i(i,"Starting log upload"),this.clearInterval(),this.finishRequested=!1,this.loggingService.startUpload(h).then(A=>{A?this.loggingIntervalId=window.setInterval(this.uploadChunk,1e4):b.Log.e(i,"Failed to start log upload")})}clearInterval(){0!==this.loggingIntervalId&&(window.clearInterval(this.loggingIntervalId),this.loggingIntervalId=0)}finish(){b.Log.i(i,"Requesting to finish log upload"),this.clearInterval(),this.isUploadInProgress?(this.finishRequested=!0,b.Log.i(i,"Upload in progress. Will finish upload after pending upload completes")):(b.Log.i(i,"No upload in progress. Uploading final chunk"),this.uploadChunk(!0))}log(h){this.buffer.log(h)}}},121:(E,T,x)=>{Object.defineProperty(T,"__esModule",{value:!0}),T.performHttpRequest=T.HttpErrorCode=void 0;const M=x(673),y=x(614),b=x(367),c=x(379),i=x(714),h="httprequest";T.HttpErrorCode=(0,i.defineEnum)({NoNetwork:3237089281,NetworkError:3237089282,ResponseParseFailure:3237093379,UserAborted:15867905,ExceptionHappened:3237089284});const A={method:"GET",headers:{},body:"",retryCount:0,timeout:0,keepalive:!1};T.performHttpRequest=function(P,V=A,B,j){var re;const z=null!==(re=V.method)&&void 0!==re?re:"GET";return b.TracingManager.getInstance().createSpan(z,()=>(function(H,U,O){const F=M.trace.getActiveSpan();if(!F)return;let k=new Map([["component",b.TracingComponent.name],["component.version",b.TracingComponent.version],["http.method",H],["http.url",U],["type",""],["http.hostname",""],["http.path",""]]);try{const $=new URL(U);k.set("type",$.protocol),k.set("http.hostname",$.hostname),k.set("http.path",$.pathname)}catch{y.Log.e(h,"Failed to extract http request attributes")}for(const[$,ne]of k)F.setAttribute($,ne);F.setAttributes(O)}(z,P,V.headers),function(H,U=A,O){var F,k;let $=void 0===U.retryCount?1:U.retryCount+1;const ne=$,te=null!==(F=U.backOffDelay)&&void 0!==F?F:500;let Z=te;const se=null!==(k=U.method)&&void 0!==k?k:"GET";let fe=new Headers;const Se=null!=O?O:new AbortController;void 0!==U.headers&&Object.keys(U.headers).forEach(q=>{fe.set(q,U.headers[q])});const pe={};M.propagation.inject(M.context.active(),pe);for(const[q,J]of Object.entries(pe))fe.set(q,J);return new Promise((q,J)=>{const ee=ae=>{(function(){const de=M.trace.getActiveSpan();de&&de.setAttribute("error","true")})(),J(ae)},X=()=>{if(navigator.onLine){let de,Pe={method:se,headers:fe,mode:"cors",keepalive:U.keepalive,signal:Se.signal,cache:"no-store"};"GET"!==se&&"HEAD"!==se&&(Pe.body=U.body);const ye=0,Le=[ye,DOMException.NETWORK_ERR,DOMException.TIMEOUT_ERR,503],Xe=U.timeout?new c.CancellableWait(U.timeout):void 0,ie=[];ie.push(fetch(H,Pe)),Xe&&ie.push(Xe.getPromise()),Promise.race(ie).then(K=>{if(null!=Xe&&Xe.isTimedOut())throw y.Log.w(h,`Timeout while performing HTTP request for Url: ${H}`),{code:DOMException.TIMEOUT_ERR,message:"Timeout while performing HTTP request"};if(K instanceof globalThis.Response)return de=K.status,K.text()}).then(K=>{if(!K&&Le.includes(de)){if($>1)throw{code:de,message:"Internal server error."};y.Log.w(h,`Failing with ${de} even after ${ne} retries`)}var ae;(function(de){const Pe=M.trace.getActiveSpan();Pe&&(Pe.setAttribute("error","false"),Pe.setAttribute("http.status_code",de.toString()))})((ae={status:de,data:null!=K?K:"",retries:ne-$}).status),q(ae)}).catch(K=>{const ge=Ie=>[ye,DOMException.NETWORK_ERR,DOMException.TIMEOUT_ERR].includes(Ie)?(y.Log.d(h,"Fetch failing with NetworkError"),T.HttpErrorCode.NetworkError):Ie==DOMException.ABORT_ERR?(y.Log.d(h,"Fetch failing since user aborted"),T.HttpErrorCode.UserAborted):(y.Log.w(h,`Unhandled Fetch error: ${Ie}`),T.HttpErrorCode.ExceptionHappened);K instanceof Error?y.Log.d(h,`Error in Fetch: ${K.message}`):y.Log.d(h,`Error in Fetch: ${JSON.stringify(K)}, ${K}`);const Oe=(Ie=>{let ht=ye;return null!=Ie&&Ie.code?ht=null==Ie?void 0:Ie.code:null!=Ie&&Ie.name&&("AbortError"===Ie.name?ht=DOMException.ABORT_ERR:"NetworkError"===Ie.name?ht=DOMException.NETWORK_ERR:"TimeoutError"===Ie.name&&(ht=DOMException.TIMEOUT_ERR)),ht})(K);Oe==ye&&U.keepalive&&(U.keepalive=!1),Le.includes(Oe)?(de=>{if($>1){$--,y.Log.d(h,`Failing with ${de}, retries left ${$}`);const Pe=new c.CancellableWait(Z,Se.signal);return Pe.getPromise().then(X).catch(ye=>{Pe.isAborted()?ee({code:T.HttpErrorCode.UserAborted,retries:ne-$}):(y.Log.w(h,`Unhandled exception caught: ${JSON.stringify(ye)}`),ee({code:T.HttpErrorCode.ExceptionHappened,retries:ne-$}))}),Z+=te,!0}return!1})(Oe)||(y.Log.w(h,`Fetch failing even after ${ne} retries. Error: ${Oe}`),ee({code:ge(Oe),retries:ne-$})):ee({code:ge(Oe),retries:ne-$})}).finally(()=>{null==Xe||Xe.cancel()})}else ee({code:T.HttpErrorCode.NoNetwork,description:"No network",retries:ne-$})};X()})}(P,V,j)))}},185:(E,T,x)=>{Object.defineProperty(T,"__esModule",{value:!0}),T.pageSessionId=T.computeSha256Checksum=T.GetHexString=T.convertToUnsignedInt=T.getNewGuid=void 0;const M=x(614),y="utils";function b(){let i=new Uint8Array(36);window.crypto.getRandomValues(i);let h="";for(let A=0;A<36;A++){let P=i[A]%16;8==A||13==A||18==A||23==A?h+="-":14==A?h+="4":(19==A&&(P=3&P|8),h+=P.toString(16))}return M.Log.i(y,"new guid "+h),h}function c(i){return i>>>0}T.getNewGuid=b,T.convertToUnsignedInt=c,T.GetHexString=function(i){return"0x"+("00000000"+(i=c(i)).toString(16).toUpperCase()).slice(-8)},T.computeSha256Checksum=function(){var i=r(function*(h){var A;if(null===(A=crypto.subtle)||void 0===A||!A.digest){const V="Crypto.subtle.digest is not available";throw M.Log.e(y,V),new Error(V)}const P=yield crypto.subtle.digest("SHA-256",h);return Array.from(new Uint8Array(P)).map(V=>V.toString(16).padStart(2,"0")).join("")});return function(h){return i.apply(this,arguments)}}(),T.pageSessionId=b()},250:(E,T,x)=>{Object.defineProperty(T,"__esModule",{value:!0}),T.AuthType=T.authInfoToHeader=void 0;const M=x(714);T.authInfoToHeader=function(y){if(!y.token)return"";switch(y.type){case T.AuthType.JWT_GFN:return`GFNJWT ${y.token}`;case T.AuthType.JWT_PARTNER:return`GFNPartnerJWT auth=${y.token}`;default:return""}},T.AuthType=(0,M.defineEnum)({NONE:-1,JARVIS:0,JWT_GFN:1,JWT_PARTNER:2})},297:(E,T,x)=>{Object.defineProperty(T,"__esModule",{value:!0}),T.Profile=T.BitDepth=T.SdrHdrMode=void 0;const M=x(714);T.SdrHdrMode=(0,M.defineEnum)({SDR:0,HDR:1,EDR:2}),T.BitDepth=(0,M.defineEnum)({BIT_DEPTH_8:0,BIT_DEPTH_10:1}),T.Profile=(0,M.defineEnum)({CUSTOM:0,BALANCED:1,COMPETITIVE:2,DATA_SAVER:3})},367:(E,T,x)=>{Object.defineProperty(T,"__esModule",{value:!0}),T.TracingManager=T.TracingComponent=void 0;const M=x(673);T.TracingComponent={name:"@gamestream/utils",version:"1.0"};class y{constructor(){this.tracer=M.trace.getTracer("gfn-web-gamestream","2.0")}static getInstance(){return y.instance||(y.instance=new y),y.instance}createSpan(c,i){const h=this.tracer.startSpan(c);return M.context.with(M.trace.setSpan(M.context.active(),h),r(function*(){try{const A=i();return A instanceof Promise?yield A:A}finally{h.end()}}))}}T.TracingManager=y},379:(E,T)=>{Object.defineProperty(T,"__esModule",{value:!0}),T.CancellableWait=void 0,T.CancellableWait=class{constructor(x,M){var y;this.timerId=0,this.timedOut=!1,this.aborted=!1,this.promise=new Promise((b,c)=>{this.promiseResolve=b,this.promiseReject=c}),null!=M&&M.aborted?(this.aborted=!0,this.promiseReject()):(this.abortSignal=M,this.onAbortFunc=this.onAbort.bind(this),null===(y=this.abortSignal)||void 0===y||y.addEventListener("abort",this.onAbortFunc),this.timerId=window.setTimeout(this.onTimeout.bind(this),x))}cancel(){var x;null===(x=this.abortSignal)||void 0===x||x.removeEventListener("abort",this.onAbortFunc),this.timerId&&(window.clearTimeout(this.timerId),this.timerId=0),this.abortSignal=void 0}getPromise(){return this.promise}isTimedOut(){return this.timedOut}isAborted(){return this.aborted}onAbort(){this.aborted=!0,this.promiseReject(),this.cancel()}onTimeout(){this.timedOut=!0,this.promiseResolve(),this.timerId=0,this.cancel()}}},386:(E,T,x)=>{Object.defineProperty(T,"__esModule",{value:!0}),T.IndexedDb=void 0;const M=x(614),y="indexdb";function b(c,i,h){return{code:c,description:i,error:null!==h?h:void 0}}T.IndexedDb=class{constructor(c,i){this.indexedDb=window.indexedDB,this.version=2,this.isDbClosing=!1,this.didDbCloseUnexpectedly=!1,this.name=c,this.storeDetails=i}open(){return new Promise((c,i)=>{try{if(this.indexedDb){let h=this.indexedDb.open(this.name,this.version);h.onerror=A=>{i(b(18,`${this.name} db opening failed`,h.error))},h.onsuccess=A=>{this.createDbInstance(h.result),c()},h.onupgradeneeded=A=>{M.Log.i(y,`Upgrading from version ${A.oldVersion} to ${A.newVersion}`),this.createDbInstance(h.result);const P=V=>{var B;const j=null===(B=this.dbInstance)||void 0===B?void 0:B.createObjectStore(V.storeName,V.storeOptions);V.storeOptions.keyPath&&(null==j||j.createIndex(V.storeIndexName,V.storeOptions.keyPath,{unique:!0}))};switch(A.oldVersion){case 0:P(this.storeDetails[0]);case 1:P(this.storeDetails[1])}},h.onblocked=A=>{i(b(19,`${this.name} db blocked during opening`,h.error))}}else i(b(17,"Indexdb object not found"))}catch(h){i(b(20,"Unexpected Exception in open",h))}})}getDbStateError(){if(!this.indexedDb)return b(17,"Indexdb object not found");if(!this.dbInstance)return b(1,"Db not yet open");if(this.isDbClosing){const c="hidden"===document.visibilityState;return b(2,"Db is closing, unexpectedly: "+this.didDbCloseUnexpectedly+", visibility state hidden: "+c)}}get(c,i){const h=this.getDbStateError();return h?Promise.reject(h):new Promise((A,P)=>{try{const V=this.dbInstance.transaction(c,"readonly"),B=V.objectStore(c);V.oncomplete=re=>{M.Log.i(y,"transaction complete in get")};const j=B.get(i);j.onsuccess=()=>{A(j.result)},j.onerror=re=>{P(b(32,"get method failed",V.error))}}catch(V){P(b(33,"Unexpected Exception happened in get",V))}})}set(c,i){const h=this.getDbStateError();return h?Promise.reject(h):new Promise((A,P)=>{try{const V=this.dbInstance.transaction(c,"readwrite"),B=V.objectStore(c);V.oncomplete=re=>{M.Log.i(y,"transaction complete in set")};const j=B.put(i);j.onsuccess=()=>{A()},j.onerror=re=>{P(b(48,"put method failed",V.error))}}catch(V){P(b(49,"Unexpected Exception happened in set",V))}})}delete(c,i){const h=this.getDbStateError();return h?Promise.reject(h):new Promise((A,P)=>{try{const V=this.dbInstance.transaction(c,"readwrite"),B=V.objectStore(c);V.oncomplete=re=>{M.Log.i(y,"transaction complete in delete")};const j=B.delete(i);j.onsuccess=()=>{A()},j.onerror=re=>{P(b(64,"delete method failed",V.error))}}catch(V){P(b(65,"Unexpected Exception in delete",V))}})}clear(c){const i=this.getDbStateError();return i?Promise.reject(i):new Promise((h,A)=>{try{const P=this.dbInstance.transaction(c,"readwrite"),V=P.objectStore(c);P.oncomplete=j=>{M.Log.i(y,"transaction complete in clear")};const B=V.clear();B.onsuccess=()=>{h()},B.onerror=j=>{A(b(80,"clear method failed)",P.error))}}catch(P){A(b(81,"Unexpected Exception happened in clear",P))}})}getAll(c){const i=this.getDbStateError();return i?Promise.reject(i):new Promise((h,A)=>{try{const P=this.dbInstance.transaction(c,"readonly"),V=P.objectStore(c);P.oncomplete=j=>{M.Log.i(y,"transaction complete in getAll")};const B=V.getAll();B.onsuccess=()=>{h(B.result)},B.onerror=j=>{A(b(96,"getAll method failed",P.error))}}catch(P){A(b(97,"Unexpected Exception in getAll",P))}})}close(){var c;this.isDbClosing=!0,null===(c=this.dbInstance)||void 0===c||c.close()}createDbInstance(c){this.isDbClosing=!1,this.didDbCloseUnexpectedly=!1,this.dbInstance=c,this.dbInstance.onversionchange=i=>{M.Log.w(y,"closing db to unblock other tabs"),this.close(),this.dbInstance=void 0},this.dbInstance.onclose=i=>{M.Log.w(y,"Db connection unexpectedly closed"),this.isDbClosing=!0,this.didDbCloseUnexpectedly=!0}}}},419:(E,T,x)=>{Object.defineProperty(T,"__esModule",{value:!0}),T.TelemetryModule=T.CLIENT_STORE=T.OFFLINE_STORE=T.STORAGE_NAME=T.GdprLevel=void 0;const M=x(386),y=x(185),b=x(614),c=x(121),i=x(623),h=x(537),A=x(714),P="telemetry";T.GdprLevel=(0,A.defineEnum)({FUNCTIONAL:"functional",TECHNICAL:"technical",BEHAVIORAL:"behavioral"});const V="https://events.gfe.nvidia.com/v1.1/events/json";T.STORAGE_NAME="telemetry",T.OFFLINE_STORE="offline-events-cache",T.CLIENT_STORE="client-events-cache",T.TelemetryModule=new class{constructor(){var B=this;this.commonDataSet=!1,this.telemetryEventIds={},this.uploadToServerTimerId=0,this.requestPending=!1,this.eventIdGenerator=0,this.exceptionHandled=new Set,this.clientEvents=new Map,this.pendingEvents=new Map,this.missingConsentEvents=[],this.dbPromises=new Map,this.dbInitialized=!1,this.serverUrl=V,this.httpConfiguration={method:"POST",headers:{"Content-Type":"application/json"},body:"",retryCount:3,timeout:15e3},this.eventSysVer="2.0",this.eventProtocol="1.5",this.maxEventsInStore=256,this.maxEventsInRequest=128,this.requestDelay=2e3,this.idb=new M.IndexedDb(T.STORAGE_NAME,[{storeName:T.OFFLINE_STORE,storeOptions:{keyPath:["clientId"]},storeIndexName:"offline-events-index"},{storeName:T.CLIENT_STORE,storeOptions:{keyPath:["clientId"]},storeIndexName:"client-events-index"}]),this.idb.open().then(r(function*(){B.dbInitialized=!0;const j=yield Promise.all([B.idb.getAll(T.OFFLINE_STORE),B.idb.getAll(T.CLIENT_STORE)]);j[0].forEach(re=>{b.Log.d(P,`Process offline events from previous sessions: ${re.payloads.length}`),re.payloads.forEach(z=>B.processEventPayload(z))}),j[1].forEach(re=>{b.Log.d(P,`Process client events from previous sessions: ${re.payloads.length}`),re.payloads.filter(z=>z.sessionId!==y.pageSessionId).forEach(z=>B.processEventPayload(z)),B.clientEvents.has(re.clientId)||B.clientEvents.set(re.clientId,[])}),B.saveEvents(T.OFFLINE_STORE,B.pendingEvents),B.saveEvents(T.CLIENT_STORE,B.clientEvents)})).catch(j=>{this.handleException("dbOpen",j)})}configure(B,j,re){var z,H,U,O,F,k,$,ne,te,Z,se;try{switch(typeof re){case"function":this.callback=re;break;case"number":this.serverUrl=re===i.UploadEnvironment.STAGING?"https://events.gfestage.nvidia.com/v1.1/events/json":V;break;case"string":this.serverUrl=new URL(re).toString()}this.appInfo=Object.assign({},B),this.deviceInfo=Object.assign({},j),this.platformPayload=(0,h.translatePlatformInfoForPayload)(j),void 0===j.os&&j.deviceOS&&(this.platformPayload.os=j.deviceOS),void 0===j.browser&&j.browserType&&(this.platformPayload.browser=j.browserType),void 0===j.platformType&&j.deviceType&&(this.platformPayload.deviceType=j.deviceType),null!==(z=(te=this.deviceInfo).osVersion)&&void 0!==z||(te.osVersion=null!==(H=this.deviceInfo.deviceOSVersion)&&void 0!==H?H:"");const fe="undefined";null!==(U=(Z=this.deviceInfo).model)&&void 0!==U||(Z.model=null!==(F=null===(O=this.deviceInfo)||void 0===O?void 0:O.deviceModel)&&void 0!==F?F:fe),null!==(k=(se=this.deviceInfo).make)&&void 0!==k||(se.make=null!==(ne=null===($=this.deviceInfo)||void 0===$?void 0:$.deviceMake)&&void 0!==ne?ne:fe),"function"==typeof re?(this.pendingEvents.forEach((Se,pe)=>{Se.forEach(we=>{re(we)}),this.pendingEvents.set(pe,[])}),this.saveEvents(T.OFFLINE_STORE,this.pendingEvents)):this.cacheAndMaybeUploadTelemetry()}catch(fe){return b.Log.e(P,`configure failed: ${JSON.stringify(fe)}`),!1}return!0}createTelemetryProvider(B){return{processEvent:this.processEvent.bind(this,B),cacheEvent:this.cacheEvent.bind(this,B),processCachedEvent:this.processCachedEvent.bind(this),dropCachedEvent:this.dropCachedEvent.bind(this)}}updateClientCommonData(B,j,re,z){if(this.commonDataSet=!0,this.userInfo&&(this.userInfo.userId!==B.userId||this.userInfo.externalUserId!==B.externalUserId||this.userInfo.idpId!==B.idpId)&&this.sendOldUserRelatedEvents(),this.userInfo=Object.assign({},B),re){this.userConsent=Object.assign({},re);const U=JSON.stringify(re);b.Log.d(P,`User consent has been synced: ${U}`)}this.deviceConsent=Object.assign({},j);const H=JSON.stringify(j);b.Log.d(P,`Device consent has been synced: ${H}`),this.integrationId=z,b.Log.d(P,`Common data updated, sending ${this.missingConsentEvents.length} events`),this.sendMissingConsentEvents()}sendOldUserRelatedEvents(){this.clientEvents.forEach((j,re)=>{j.forEach(z=>{0===this.hasConsented(z)&&(this.callback?this.callback(z):z.priority&&this.appInfo?this.sendBeacon(z):this.bufferEvent(this.pendingEvents,z))}),this.clientEvents.set(re,[])});let B=0;if(this.appInfo){let j=Promise.resolve();for(;this.getPendingEventsCount();)this.sendEvents(j).forEach(re=>{B+=re.events.length,this.dropSentEvents(re.events)}),j=j.then(()=>{new Promise(re=>window.setTimeout(re,this.requestDelay))})}else Array.from(this.pendingEvents.keys()).forEach(j=>{this.pendingEvents.set(j,[])});this.missingConsentEvents=[],this.saveEvents(T.OFFLINE_STORE,this.pendingEvents),this.saveEvents(T.CLIENT_STORE,this.clientEvents),b.Log.i(P,`User is switched, send ${B} events in buffer`)}sendMissingConsentEvents(){const B=this.missingConsentEvents;this.missingConsentEvents=[],B.forEach(j=>this.processEventPayload(j))}getTelemetryEventIds(){return Object.assign({},this.telemetryEventIds)}setTelemetryEventIds(B){B.networkSessionId&&(this.telemetryEventIds.networkSessionId=B.networkSessionId),B.streamingProfileGuid&&(this.telemetryEventIds.streamingProfileGuid=B.streamingProfileGuid),B.systemInfoGuid&&(this.telemetryEventIds.systemInfoGuid=B.systemInfoGuid)}processEvent(B,j){var re,z,H,U;if(this.callback)this.callback(j);else try{const O={name:j.name,eventId:++this.eventIdGenerator,parameters:JSON.parse(JSON.stringify(j.parameters)),gdprLevel:j.gdprLevel,ts:j.ts,sessionId:y.pageSessionId,userId:null!==(U=null!==(z=null===(re=this.userInfo)||void 0===re?void 0:re.userId)&&void 0!==z?z:null===(H=this.userInfo)||void 0===H?void 0:H.externalUserId)&&void 0!==U?U:"",priority:j.priority,config:Object.assign({},B)};this.processEventPayload(O)}catch(O){this.handleClientException(B,O,`JSON error occurred on processing event: ${j.name}`)}}hasConsented(B){if(!this.commonDataSet)return 2;const j=H=>{var U,O;return null!==(U=this.userInfo)&&void 0!==U&&U.userId||null!==(O=this.userInfo)&&void 0!==O&&O.externalUserId?H===i.ConsentLevel.FULL?0:1:H===i.ConsentLevel.TEMP?0:1};let re=1;switch(B.gdprLevel){case T.GdprLevel.FUNCTIONAL:this.userConsent?re=j(this.userConsent.gdprFuncOptIn):this.deviceConsent&&(re=(z=this.deviceConsent.deviceGdprFuncOptIn)===i.ConsentLevel.FULL||z===i.ConsentLevel.TEMP?0:1);break;case T.GdprLevel.TECHNICAL:this.userConsent&&(re=j(this.userConsent.gdprTechOptIn));break;case T.GdprLevel.BEHAVIORAL:this.userConsent&&(re=j(this.userConsent.gdprBehOptIn))}var z;return re}getDebugEventName(B){return`${B.name} ${y.pageSessionId===B.sessionId?"":"from previous session"}`}processEventPayload(B){switch(this.hasConsented(B)){case 0:this.appInfo?B.priority?this.sendBeacon(B):(this.bufferEvent(this.pendingEvents,B),this.cacheAndMaybeUploadTelemetry()):(b.Log.d(P,`No config, buffer event: ${this.getDebugEventName(B)}`),this.bufferEvent(this.pendingEvents,B));break;case 2:this.dropOldestEventIfNeeded(),b.Log.d(P,`Missing consent event: ${this.getDebugEventName(B)}`),this.missingConsentEvents.push(B);break;case 1:b.Log.d(P,`Drop event: ${this.getDebugEventName(B)}`)}}sendBeacon(B){const j=this.createTelemetryRequestData([B]),re=new Blob([j],{type:"text/plain"}),z=navigator.sendBeacon(this.serverUrl,re);b.Log.i(P,`telemetry upload sendBeacon result : ${z} event: ${this.getDebugEventName(B)}`)}cacheAndMaybeUploadTelemetry(){var B=this;this.appInfo&&!this.uploadToServerTimerId&&(this.uploadToServerTimerId=window.setInterval(r(function*(){if(0===B.getPendingEventsCount())return window.clearInterval(B.uploadToServerTimerId),void(B.uploadToServerTimerId=0);if(B.saveEvents(T.OFFLINE_STORE,B.pendingEvents),!B.requestPending){B.requestPending=!0;const j=B.sendEvents();(yield Promise.all(j.map(re=>re.retry))).forEach((re,z)=>{re||B.dropSentEvents(j[z].events)}),B.saveEvents(T.OFFLINE_STORE,B.pendingEvents),B.requestPending=!1}}),this.requestDelay))}makeRequestBatches(){const B=[];return this.pendingEvents.forEach(j=>{if(j.length>0){const re=j[0],z=j.filter(H=>H.sessionId===re.sessionId&&H.config.eventSchemaVer===re.config.eventSchemaVer);B.push(z)}}),B}dropSentEvents(B){let j=this.pendingEvents.get(B[0].config.clientId);const re=new Set(B.map(z=>`${z.sessionId}|${z.eventId}`));j&&(j=j.filter(z=>!re.has(`${z.sessionId}|${z.eventId}`)),this.pendingEvents.set(B[0].config.clientId,j))}sendEvents(B){const j=null!=B?B:Promise.resolve(),re=[];return this.makeRequestBatches().forEach(z=>{const H=z.splice(0,this.maxEventsInRequest);re.push({events:H,retry:j.then(()=>this.sendHttp(H))})}),re}sendHttp(B){var j=this;return r(function*(){if(0===B.length)return!1;let re=!1;const z=j.createTelemetryRequestData(B),H=B[0].config.clientId;try{const U=yield(0,c.performHttpRequest)(j.serverUrl,{...j.httpConfiguration,body:z}),F=`Telemetry http request status: ${H} ${U.status} ${U.data}`;[408,500,503].includes(U.status)?(b.Log.e(P,`${F} Retry ${B.length} events.`),re=!0):U.status>=200&&U.status<300?b.Log.i(P,`${F} Uploaded ${B.length} events.`):b.Log.e(P,`${F} Drop ${B.length} events.`)}catch(U){b.Log.e(P,`Client ${H} telemetry http request failed. Error: ${U}`)}return re})()}cacheEvent(B,j,re){var z,H,U;try{if(re){const O=this.clientEvents.get(B.clientId);if(O){const F=O.findIndex(k=>k.eventId===re);if(-1!==F){const k=O.splice(F,1),$={eventId:k[0].eventId,sessionId:k[0].sessionId,userId:k[0].userId,config:Object.assign({},B),name:j.name,gdprLevel:j.gdprLevel,priority:j.priority,ts:j.ts,parameters:JSON.parse(JSON.stringify(j.parameters))};O.push($)}}}else{re=++this.eventIdGenerator;const O={name:j.name,eventId:re,parameters:JSON.parse(JSON.stringify(j.parameters)),gdprLevel:j.gdprLevel,ts:j.ts,sessionId:y.pageSessionId,userId:null!==(H=null===(z=this.userInfo)||void 0===z?void 0:z.userId)&&void 0!==H?H:"",priority:null!==(U=j.priority)&&void 0!==U&&U,config:Object.assign({},B)};this.bufferEvent(this.clientEvents,O)}this.saveEvents(T.CLIENT_STORE,this.clientEvents)}catch(O){this.handleClientException(B,O,`JSON error occurred on caching event: ${j.name}`)}return null!=re?re:0}processCachedEvent(B){this.removeEventHelper(B,!0)}dropCachedEvent(B){this.removeEventHelper(B,!1)}removeEventHelper(B,j){for(let re of this.clientEvents){const z=re[1].findIndex(H=>H.eventId===B);if(-1!==z){const H=re[1].splice(z,1);this.saveEvents(T.CLIENT_STORE,this.clientEvents),j&&(this.callback?this.callback({name:H[0].name,gdprLevel:H[0].gdprLevel,priority:H[0].priority,ts:H[0].ts,parameters:H[0].parameters}):this.processEventPayload(H[0]));break}}}createTelemetryRequestData(B){var j,re,z,H,U,O,F,k,$,ne,te,Z,se,fe,Se,pe,we,q,J,W,ee,X,ae,de,Pe,ye,Le,Xe,ie,K,ce,ge,Oe,Ie,ht,Fe;const et="undefined",Rt={clientId:(null===(j=B[0])||void 0===j?void 0:j.config.clientId)||et,clientVer:(null===(re=this.appInfo)||void 0===re?void 0:re.clientVer)||et,eventSchemaVer:(null===(z=B[0])||void 0===z?void 0:z.config.eventSchemaVer)||et,eventSysVer:this.eventSysVer,eventProtocol:this.eventProtocol,deviceId:(null===(H=this.deviceInfo)||void 0===H?void 0:H.deviceId)||et,userId:(null===(U=this.userInfo)||void 0===U?void 0:U.userId)||et,externalUserId:null===(O=this.userInfo)||void 0===O?void 0:O.externalUserId,idpId:null===(F=this.userInfo)||void 0===F?void 0:F.idpId,sessionId:(null===(k=B[0])||void 0===k?void 0:k.sessionId)||et,events:[],gdprFuncOptIn:null!==(ne=null===($=this.userConsent)||void 0===$?void 0:$.gdprFuncOptIn)&&void 0!==ne?ne:et,gdprTechOptIn:null!==(Z=null===(te=this.userConsent)||void 0===te?void 0:te.gdprTechOptIn)&&void 0!==Z?Z:et,gdprBehOptIn:null!==(fe=null===(se=this.userConsent)||void 0===se?void 0:se.gdprBehOptIn)&&void 0!==fe?fe:et,deviceGdprFuncOptIn:null!==(pe=null===(Se=this.deviceConsent)||void 0===Se?void 0:Se.deviceGdprFuncOptIn)&&void 0!==pe?pe:et,deviceGdprTechOptIn:null!==(q=null===(we=this.deviceConsent)||void 0===we?void 0:we.deviceGdprTechOptIn)&&void 0!==q?q:et,deviceGdprBehOptIn:null!==(W=null===(J=this.deviceConsent)||void 0===J?void 0:J.deviceGdprBehOptIn)&&void 0!==W?W:et,deviceOS:null!==(X=null===(ee=this.platformPayload)||void 0===ee?void 0:ee.os)&&void 0!==X?X:et,deviceOSVersion:(null===(ae=this.deviceInfo)||void 0===ae?void 0:ae.osVersion)||et,deviceType:null!==(Pe=null===(de=this.platformPayload)||void 0===de?void 0:de.deviceType)&&void 0!==Pe?Pe:et,deviceModel:(null===(ye=this.deviceInfo)||void 0===ye?void 0:ye.model)||et,deviceMake:(null===(Le=this.deviceInfo)||void 0===Le?void 0:Le.make)||et,clientType:null!==(ie=null===(Xe=this.appInfo)||void 0===Xe?void 0:Xe.clientType)&&void 0!==ie?ie:et,clientVariant:null!==(ce=null===(K=this.appInfo)||void 0===K?void 0:K.clientVariant)&&void 0!==ce?ce:et,integrationId:this.integrationId||et,browserType:null!==(Oe=null===(ge=this.platformPayload)||void 0===ge?void 0:ge.browser)&&void 0!==Oe?Oe:et,productName:null===(Ie=this.appInfo)||void 0===Ie?void 0:Ie.productName,productVersion:null===(ht=this.appInfo)||void 0===ht?void 0:ht.productVersion,sentTs:""};Rt.sentTs=(new Date).toISOString();for(const _t of B)null===(Fe=Rt.events)||void 0===Fe||Fe.push({name:_t.name,ts:_t.ts,parameters:_t.parameters});return JSON.stringify(Rt)}getPendingEventsCount(){let B=0;return this.pendingEvents.forEach(j=>B+=j.length),B}dropOldestEventIfNeeded(){if(this.getPendingEventsCount()+this.missingConsentEvents.length{j?H[0].ts{var H;const U={clientId:z,payloads:re},O=`${B}|${z}`;let F=null!==(H=this.dbPromises.get(O))&&void 0!==H?H:Promise.resolve();F=F.then(()=>this.idb.set(B,U)).catch(k=>{this.handleException(`saveEvents(${B})`,k)}),this.dbPromises.set(O,F)})}handleException(B,j){var re,z,H;const U=null!==(H=null!==(z=null===(re=j.error)||void 0===re?void 0:re.message)&&void 0!==z?z:j.description)&&void 0!==H?H:`Exception in ${B}`;b.Log.e(P,`${B} failed: ${(0,y.GetHexString)(j.code)} ${U}`),this.exceptionHandled.has(B)||this.exceptionHandled.add(B)}handleClientException(B,j,re){b.Log.e(P,re),B.exceptionHandler&&B.exceptionHandler({error:j,description:re})}}},422:(E,T,x)=>{Object.defineProperty(T,"__esModule",{value:!0}),T.NetworkType=void 0;const M=x(714);T.NetworkType=(0,M.defineEnum)({OTHER:"OTHER",ETHERNET:"ETHERNET",UNKNOWN:"UNKNOWN",WIFI:"WIFI",WIFI_2_4:"WIFI_2_4",WIFI_5_0:"WIFI_5_0",MOBILE:"MOBILE",MOBILE_2G:"MOBILE_2G",MOBILE_3G:"MOBILE_3G",MOBILE_4G:"MOBILE_4G",MOBILE_5G:"MOBILE_5G",WIMAX:"WIMAX",BLUETOOTH:"BLUETOOTH"})},492:(E,T,x)=>{Object.defineProperty(T,"__esModule",{value:!0}),T.RemoteLoggingService=void 0;const M=x(623),y=x(921),b=x(121),c=x(614),i=x(537),h=x(185),A="https://telemetry.gfe.nvidia.com/gfc/v4.0",P="remoteloggingservice";T.RemoteLoggingService=class{constructor(V,B,j,re,z,H,U){var O,F,k,$,ne,te;this.chunkOffset=0,this.url=A;const Z=(0,i.translatePlatformInfoForPayload)(B);switch(void 0===B.os&&B.deviceOS&&(Z.os=B.deviceOS),void 0===B.browser&&B.browserType&&(Z.browser=B.browserType),void 0===B.platformType&&B.deviceType&&(Z.deviceType=B.deviceType),this.headPayload={browserType:Z.browser,clientId:y.CLIENT_ID,clientTs:"",clientType:j.clientType,clientVariant:j.clientVariant,clientVer:j.clientVer,deviceGdprBehOptIn:z.deviceGdprBehOptIn,deviceGdprFuncOptIn:z.deviceGdprFuncOptIn,deviceGdprTechOptIn:z.deviceGdprTechOptIn,deviceId:B.deviceId,deviceOS:Z.os,deviceOSVersion:null!==(O=B.osVersion)&&void 0!==O?O:B.deviceOSVersion,deviceMake:null!==(k=null!==(F=B.make)&&void 0!==F?F:B.deviceMake)&&void 0!==k?k:"",deviceModel:null!==(ne=null!==($=B.model)&&void 0!==$?$:B.deviceModel)&&void 0!==ne?ne:"",deviceType:Z.deviceType,feedbackId:"",feedbackName:"GS_Log_Event",feedbackProtocol:"4.4",feedbackSchemaVer:"3.2",feedbackSysVer:"v4.3",fileList:[{name:H}],gdprBehOptIn:re.gdprBehOptIn,gdprFuncOptIn:re.gdprFuncOptIn,gdprTechOptIn:re.gdprTechOptIn,parameters:{streamSessionId:"",streamSubSessionIds:[]},sentTs:"",sessionId:h.pageSessionId,userId:null!==(te=V.userId)&&void 0!==te?te:""},U){case M.UploadEnvironment.PROD:this.url=A;break;case M.UploadEnvironment.STAGING:this.url="https://telemetry.gfestage.nvidia.com/gfc/v4.0";break;default:this.url=U}}startUpload(V){var B=this;return r(function*(){B.chunkOffset=0,B.headPayload.feedbackId=crypto.randomUUID(),B.headPayload.parameters.streamSessionId=null!=V?V:"",B.headPayload.clientTs=(new Date).toISOString(),B.headPayload.sentTs=(new Date).toISOString();const j={method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(B.headPayload)},re=`${B.url}/head`,z=yield(0,b.performHttpRequest)(re,j);if(200!==z.status)return c.Log.e(P,`Head request failed with ${z.status}`),!1;let H=`Initiated feedback session ${B.headPayload.feedbackId}`;return V&&(H+=` for stream session ${V}`),c.Log.i(P,H),!0})()}sendChunk(V,B=!1){var j=this;return r(function*(){const re=new Blob([V]),z=new FormData;try{z.append("feedbackId",j.headPayload.feedbackId),z.append("offset",j.chunkOffset.toString()),z.append("checksum",yield(0,h.computeSha256Checksum)(V)),z.append("data2",re),z.append("size",re.size.toString()),z.append("parameters",JSON.stringify(j.headPayload.parameters))}catch(F){return c.Log.e(P,`Cannot send chunk: ${F}`),!1}B&&z.append("eob","true");const H={method:"POST",headers:{},body:z},U=`${j.url}/attachment`,O=yield(0,b.performHttpRequest)(U,H);switch(O.status){case 200:return c.Log.i(P,`Feedback session ${j.headPayload.feedbackId} closed.`),j.headPayload.feedbackId="",j.chunkOffset=0,!0;case 206:return j.chunkOffset+=re.size,!0;case 462:return c.Log.e(P,"Cannot send attachment request with invalid feedback id"),!1;case 463:return c.Log.e(P,"Incorrect data offset provided in attachment request"),!1;default:return c.Log.e(P,`Attachment request failed with ${O.status}`),!1}})()}}},537:(E,T,x)=>{Object.defineProperty(T,"__esModule",{value:!0}),T.translatePlatformInfoForClientHeader=T.translatePlatformInfoForPayload=void 0;const M=x(865);class y{static getMappedDeviceType(i){switch(i){case M.PlatformType.CONSOLE:return M.PayloadDeviceType.CONSOLE;case M.PlatformType.TABLET:return M.PayloadDeviceType.TABLET;case M.PlatformType.PHONE:return M.PayloadDeviceType.PHONE;case M.PlatformType.TV:return M.PayloadDeviceType.TV;case M.PlatformType.LAPTOP:return M.PayloadDeviceType.LAPTOP;case M.PlatformType.DESKTOP:return M.PayloadDeviceType.DESKTOP;case M.PlatformType.HMD:return M.PayloadDeviceType.HMD;default:return M.PayloadDeviceType.UNDEFINED}}static getMappedBrowserName(i){switch(i){case M.PlatformBrowser.CHROME:return M.PayloadBrowserType.CHROME;case M.PlatformBrowser.SAFARI:return M.PayloadBrowserType.SAFARI;case M.PlatformBrowser.YANDEX:return M.PayloadBrowserType.YANDEX;case M.PlatformBrowser.EDGE:return M.PayloadBrowserType.EDGE;case M.PlatformBrowser.EDGE_LEGACY:return M.PayloadBrowserType.EDGE_LEGACY;case M.PlatformBrowser.FIREFOX:return M.PayloadBrowserType.FIREFOX;case M.PlatformBrowser.SAMSUNG:return M.PayloadBrowserType.SAMSUNG;case M.PlatformBrowser.CHROMIUM:return M.PayloadBrowserType.CHROMIUM;case M.PlatformBrowser.OPERA:return M.PayloadBrowserType.OPERA;case M.PlatformBrowser.OPERAGX:return M.PayloadBrowserType.OPERAGX;case M.PlatformBrowser.BRAVE:return M.PayloadBrowserType.BRAVE;case M.PlatformBrowser.SILK:return M.PayloadBrowserType.SILK;default:return M.PayloadBrowserType.UNDEFINED}}static getMappedDeviceOS(i){switch(i){case M.PlatformOS.WINDOWS:return M.PayloadOSType.WINDOWS;case M.PlatformOS.MAC:return M.PayloadOSType.MACOS;case M.PlatformOS.CHROME_OS:return M.PayloadOSType.CHROMEOS;case M.PlatformOS.LINUX:return M.PayloadOSType.LINUX;case M.PlatformOS.IOS:return M.PayloadOSType.IOS;case M.PlatformOS.IPADOS:return M.PayloadOSType.IPADOS;case M.PlatformOS.TIZEN:return M.PayloadOSType.TIZEN;case M.PlatformOS.WEBOS:return M.PayloadOSType.WEBOS;case M.PlatformOS.XBOX:return M.PayloadOSType.XBOX;case M.PlatformOS.ANDROID:return M.PayloadOSType.ANDROID;case M.PlatformOS.STEAMOS:return M.PayloadOSType.STEAMOS;case M.PlatformOS.VISIONOS:return M.PayloadOSType.VISIONOS;default:return M.PayloadOSType.UNDEFINED}}constructor(i){this._platformInfo=i,this._gxtDetails=this.translateForPayload(),this._lcarsDetails=this.translateForClientHeaders()}translateForPayload(){var i;const h=this._platformInfo,A=y.getMappedDeviceType(h.platformType),P=y.getMappedBrowserName(h.browser);return{os:y.getMappedDeviceOS(null!==(i=h.os)&&void 0!==i?i:M.PlatformOS.UNKNOWN),browser:P,deviceType:A}}translateForClientHeaders(){var i;const h=this._platformInfo,A=y.extractDeviceTypeForBrowserClient(y.getMappedDeviceType(h.platformType)),P=y.extractBrowserTypeForBrowserClient(y.getMappedBrowserName(h.browser));return{os:y.mapOSPlatformNameToSupportedDeviceOs(y.getMappedDeviceOS(null!==(i=h.os)&&void 0!==i?i:M.PlatformOS.UNKNOWN)),browser:P,deviceType:A}}get gxtDetails(){return this._gxtDetails}get lcarsDetails(){return this._lcarsDetails}get info(){return this._platformInfo}}let b;y.mapOSPlatformNameToSupportedDeviceOs=c=>{switch(c){case M.PayloadOSType.WINDOWS:return M.ClientHeaderOSType.WINDOWS;case M.PayloadOSType.MACOS:return M.ClientHeaderOSType.MACOS;case M.PayloadOSType.LINUX:return M.ClientHeaderOSType.LINUX;case M.PayloadOSType.CHROMEOS:return M.ClientHeaderOSType.CHROMEOS;case M.PayloadOSType.IOS:return M.ClientHeaderOSType.IOS;case M.PayloadOSType.IPADOS:return M.ClientHeaderOSType.IPADOS;case M.PayloadOSType.WEBOS:return M.ClientHeaderOSType.WEBOS;case M.PayloadOSType.TIZEN:return M.ClientHeaderOSType.TIZEN;case M.PayloadOSType.XBOX:return M.ClientHeaderOSType.XBOX;case M.PayloadOSType.ANDROID:return M.ClientHeaderOSType.ANDROID;case M.PayloadOSType.STEAMOS:return M.ClientHeaderOSType.STEAMOS;case M.PayloadOSType.SHIELD:return M.ClientHeaderOSType.SHIELD;case M.PayloadOSType.VISIONOS:return M.ClientHeaderOSType.VISIONOS;default:return M.ClientHeaderOSType.UNKNOWN}},y.extractDeviceTypeForBrowserClient=c=>{switch(c){case M.PayloadDeviceType.DESKTOP:return M.ClientHeaderDeviceType.DESKTOP;case M.PayloadDeviceType.LAPTOP:return M.ClientHeaderDeviceType.LAPTOP;case M.PayloadDeviceType.TV:return M.ClientHeaderDeviceType.TV;case M.PayloadDeviceType.PHONE:return M.ClientHeaderDeviceType.PHONE;case M.PayloadDeviceType.TABLET:return M.ClientHeaderDeviceType.TABLET;case M.PayloadDeviceType.CONSOLE:return M.ClientHeaderDeviceType.CONSOLE;case M.PayloadDeviceType.HMD:return M.ClientHeaderDeviceType.HMD;default:return M.ClientHeaderDeviceType.DESKTOP}},y.extractBrowserTypeForBrowserClient=c=>{switch(c){case M.PayloadBrowserType.CHROME:return M.ClientHeaderBrowserType.CHROME;case M.PayloadBrowserType.SAFARI:return M.ClientHeaderBrowserType.SAFARI;case M.PayloadBrowserType.YANDEX:return M.ClientHeaderBrowserType.YANDEX;case M.PayloadBrowserType.EDGE:return M.ClientHeaderBrowserType.EDGE;case M.PayloadBrowserType.EDGE_LEGACY:return M.ClientHeaderBrowserType.EDGE_LEGACY;case M.PayloadBrowserType.FIREFOX:return M.ClientHeaderBrowserType.FIREFOX;case M.PayloadBrowserType.SAMSUNG:return M.ClientHeaderBrowserType.SAMSUNG;case M.PayloadBrowserType.CHROMIUM:return M.ClientHeaderBrowserType.CHROMIUM;case M.PayloadBrowserType.OPERA:return M.ClientHeaderBrowserType.OPERA;case M.PayloadBrowserType.OPERAGX:return M.ClientHeaderBrowserType.OPERAGX;case M.PayloadBrowserType.BRAVE:return M.ClientHeaderBrowserType.BRAVE;case M.PayloadBrowserType.SILK:return M.ClientHeaderBrowserType.SILK;default:return M.ClientHeaderBrowserType.UNKNOWN}},T.translatePlatformInfoForPayload=function(c){return b&&b.info==c||(b=new y(c)),b.gxtDetails},T.translatePlatformInfoForClientHeader=function(c){return b&&b.info==c||(b=new y(c)),b.lcarsDetails}},596:(E,T)=>{Object.defineProperty(T,"__esModule",{value:!0}),T.LogBuffer=void 0;class x{constructor(y){this.encoder=new TextEncoder,this.logIndex=0,this.full=!1,this.buffer=new Uint8Array(y+x.FULL_MESSAGE.length),this.maxLength=y}clear(){this.encoder=new TextEncoder,this.logIndex=0,this.full=!1}log(y){if(this.full)return;let b=this.encoder.encode(y+"\n");this.logIndex+b.byteLength>this.maxLength&&(this.full=!0,b=this.encoder.encode(x.FULL_MESSAGE)),this.buffer.set(b,this.logIndex),this.logIndex+=b.byteLength}getData(){return this.buffer.slice(0,this.logIndex)}}T.LogBuffer=x,x.FULL_MESSAGE="Log is full\n"},614:(E,T,x)=>{Object.defineProperty(T,"__esModule",{value:!0}),T.Logger=T.Log=T.LogMechanism=T.LogLevel=void 0;const M=x(714);T.LogLevel=(0,M.defineEnum)({INFO:"INFO",WARN:"WARN",DEBUG:"DEBUG",ERROR:"ERROR",NONE:"NONE"});const y={[T.LogLevel.NONE]:0,[T.LogLevel.ERROR]:1,[T.LogLevel.WARN]:2,[T.LogLevel.INFO]:3,[T.LogLevel.DEBUG]:4};T.LogMechanism=(0,M.defineEnum)({Default:0,Console:1});const c=new((()=>{class i{constructor(){this.queue=[],this.logMechanism=T.LogMechanism.Default,this.logLevel=T.LogLevel.DEBUG,this._nop=(A,P,...V)=>{},this._d=(A,P,...V)=>this.handleLog(T.LogLevel.DEBUG,A,P,V),this._i=(A,P,...V)=>this.handleLog(T.LogLevel.INFO,A,P,V),this._w=(A,P,...V)=>this.handleLog(T.LogLevel.WARN,A,P,V),this._e=(A,P,...V)=>this.handleLog(T.LogLevel.ERROR,A,P,V)}setLogMechanism(A){this.logMechanism=A}setLogLevel(A){this.logLevel=A}get d(){return y[this.logLevel]{this.executeLogCallback(!0)})}isCallbackRegistered(){return!!this.callback}stringifyArgs(...A){return A.length?`##${JSON.stringify(A)}`:""}executeLogCallback(A){this.callback&&this.queue.length&&(this.callback(this.queue[0]),this.queue.shift(),A&&this.queue.length&&window.setTimeout(()=>{this.executeLogCallback(!0)}))}unregister(){this.callback=void 0}handleLog(A,P,V,B){let j=`${V}${this.stringifyArgs(...B)}`,re={timestamp:this.renderDate(new Date),level:A,tag:P,message:j};this.queue.push(re),this.callback?window.setTimeout(()=>{this.executeLogCallback(!1)}):this.queue.length>i.MAX_QUEUE_SIZE&&this.queue.shift()}renderDate(A){const P=(B,j,re)=>{const z=j-B.length;if(z>0){let H="";for(let U=0;UP(B.getHours().toString(),2,"0"))(A)+":"+(B=>P(B.getMinutes().toString(),2,"0"))(A)+":"+(B=>P(B.getSeconds().toString(),2,"0"))(A)+"."+(B=>P(B.getMilliseconds().toString(),3,"0"))(A),V}}return i.MAX_QUEUE_SIZE=50,i})());T.Log=c,T.Logger=c},623:(E,T,x)=>{Object.defineProperty(T,"__esModule",{value:!0}),T.ProductName=T.ClientVariant=T.PayloadClientType=T.UploadEnvironment=T.ConsentLevel=void 0;const M=x(714);T.ConsentLevel=(0,M.defineEnum)({FULL:"Full",NONE:"None",TEMP:"Temp"}),T.UploadEnvironment=(0,M.defineEnum)({PROD:0,STAGING:1}),T.PayloadClientType=(0,M.defineEnum)({NATIVE:"Native",BROWSER:"Browser",GFNSDK:"GFNSDK",GFNSDK_BROWSER:"GFNSDK-Browser",UNDEFINED:"undefined"}),T.ClientVariant=(0,M.defineEnum)({BETA:"iBeta",RELEASE:"Release",UNDEFINED:"undefined"}),T.ProductName=(0,M.defineEnum)({GFN:"GFN",GFE:"GFE",NVAPP:"NvApp",DISPLAY_DRIVER:"DisplayDriver",UNDEFINED:"undefined"})},673:(E,T,x)=>{x.r(T),x.d(T,{DiagConsoleLogger:()=>X,DiagLogLevel:()=>j,INVALID_SPANID:()=>Tt,INVALID_SPAN_CONTEXT:()=>Ye,INVALID_TRACEID:()=>Et,ProxyTracer:()=>Rn,ProxyTracerProvider:()=>Xt,ROOT_CONTEXT:()=>W,SamplingDecision:()=>ke,SpanKind:()=>mt,SpanStatusCode:()=>ot,TraceFlags:()=>lt,ValueType:()=>q,baggageEntryMetadataFromString:()=>Se,context:()=>En,createContextKey:()=>pe,createNoopMeter:()=>Ae,createTraceState:()=>st,default:()=>ct,defaultTextMapGetter:()=>Ze,defaultTextMapSetter:()=>yt,diag:()=>In,isSpanContextValid:()=>Hn,isValidSpanId:()=>cn,isValidTraceId:()=>Ct,metrics:()=>$t,propagation:()=>ii,trace:()=>jt});var M="object"==typeof globalThis?globalThis:"object"==typeof self?self:"object"==typeof window?window:"object"==typeof x.g?x.g:{},y="1.4.1",b=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/,c=function(Re){var Qe=new Set([Re]),gt=new Set,Kt=Re.match(b);if(!Kt)return function(){return!1};var hn=+Kt[1],Fn=+Kt[2],Yn=+Kt[3];if(null!=Kt[4])return function(di){return di===Re};function qn(di){return gt.add(di),!1}function Si(di){return Qe.add(di),!0}return function(di){if(Qe.has(di))return!0;if(gt.has(di))return!1;var ji=di.match(b);if(!ji)return qn(di);var bi=+ji[2],St=+ji[3];return null!=ji[4]||hn!==+ji[1]?qn(di):0===hn?Fn===bi&&Yn<=St?Si(di):qn(di):Fn<=bi?Si(di):qn(di)}}(y),i=y.split(".")[0],h=Symbol.for("opentelemetry.js.api."+i),A=M;function P(Re,Qe,gt,Kt){var hn;void 0===Kt&&(Kt=!1);var Fn=A[h]=null!==(hn=A[h])&&void 0!==hn?hn:{version:y};if(!Kt&&Fn[Re]){var Yn=new Error("@opentelemetry/api: Attempted duplicate registration of API: "+Re);return gt.error(Yn.stack||Yn.message),!1}return Fn.version!==y?(Yn=new Error("@opentelemetry/api: Registration of version v"+Fn.version+" for "+Re+" does not match previously registered API v"+y),gt.error(Yn.stack||Yn.message),!1):(Fn[Re]=Qe,gt.debug("@opentelemetry/api: Registered a global for "+Re+" v"+y+"."),!0)}function V(Re){var Qe,gt,Kt=null===(Qe=A[h])||void 0===Qe?void 0:Qe.version;if(Kt&&c(Kt))return null===(gt=A[h])||void 0===gt?void 0:gt[Re]}function B(Re,Qe){Qe.debug("@opentelemetry/api: Unregistering a global for "+Re+" v"+y+".");var gt=A[h];gt&&delete gt[Re]}var j,Re,H=function(){function Re(Qe){this._namespace=Qe.namespace||"DiagComponentLogger"}return Re.prototype.debug=function(){for(var Qe=[],gt=0;gt0)&&!(Kt=Fn.next()).done;)Yn.push(Kt.value)}catch(qn){hn={error:qn}}finally{try{Kt&&!Kt.done&&(gt=Fn.return)&>.call(Fn)}finally{if(hn)throw hn.error}}return Yn}(gt),!1))}(Re=j||(j={}))[Re.NONE=0]="NONE",Re[Re.ERROR=30]="ERROR",Re[Re.WARN=50]="WARN",Re[Re.INFO=60]="INFO",Re[Re.DEBUG=70]="DEBUG",Re[Re.VERBOSE=80]="VERBOSE",Re[Re.ALL=9999]="ALL";var k=function(){function Re(){function Qe(Kt){return function(){for(var hn=[],Fn=0;Fn0)&&!(Kt=Fn.next()).done;)Yn.push(Kt.value)}catch(qn){hn={error:qn}}finally{try{Kt&&!Kt.done&&(gt=Fn.return)&>.call(Fn)}finally{if(hn)throw hn.error}}return Yn}(hn),!1))}}var gt=this;gt.setLogger=function(Kt,hn){var Fn,Yn,qn;if(void 0===hn&&(hn={logLevel:j.INFO}),Kt===gt){var Si=new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");return gt.error(null!==(Fn=Si.stack)&&void 0!==Fn?Fn:Si.message),!1}"number"==typeof hn&&(hn={logLevel:hn});var di=V("diag"),ji=function(bi,St){function Gt(mn,Wn){var oi=St[mn];return"function"==typeof oi&&bi>=Wn?oi.bind(St):function(){}}return bij.ALL&&(bi=j.ALL),St=St||{},{error:Gt("error",j.ERROR),warn:Gt("warn",j.WARN),info:Gt("info",j.INFO),debug:Gt("debug",j.DEBUG),verbose:Gt("verbose",j.VERBOSE)}}(null!==(Yn=hn.logLevel)&&void 0!==Yn?Yn:j.INFO,Kt);if(di&&!hn.suppressOverrideMessage){var xi=null!==(qn=(new Error).stack)&&void 0!==qn?qn:"";di.warn("Current logger will be overwritten from "+xi),ji.warn("Current logger will overwrite one already registered from "+xi)}return P("diag",ji,gt,!0)},gt.disable=function(){B("diag",gt)},gt.createComponentLogger=function(Kt){return new H(Kt)},gt.verbose=Qe("verbose"),gt.debug=Qe("debug"),gt.info=Qe("info"),gt.warn=Qe("warn"),gt.error=Qe("error")}return Re.instance=function(){return this._instance||(this._instance=new Re),this._instance},Re}(),te=function(){function Re(Qe){this._entries=Qe?new Map(Qe):new Map}return Re.prototype.getEntry=function(Qe){var gt=this._entries.get(Qe);if(gt)return Object.assign({},gt)},Re.prototype.getAllEntries=function(){return Array.from(this._entries.entries()).map(function(Qe){var gt=function(Re,Qe){var gt="function"==typeof Symbol&&Re[Symbol.iterator];if(!gt)return Re;var Kt,hn,Fn=gt.call(Re),Yn=[];try{for(;(void 0===Qe||Qe-- >0)&&!(Kt=Fn.next()).done;)Yn.push(Kt.value)}catch(qn){hn={error:qn}}finally{try{Kt&&!Kt.done&&(gt=Fn.return)&>.call(Fn)}finally{if(hn)throw hn.error}}return Yn}(Qe,2);return[gt[0],gt[1]]})},Re.prototype.setEntry=function(Qe,gt){var Kt=new Re(this._entries);return Kt._entries.set(Qe,gt),Kt},Re.prototype.removeEntry=function(Qe){var gt=new Re(this._entries);return gt._entries.delete(Qe),gt},Re.prototype.removeEntries=function(){for(var Qe,gt,Kt=[],hn=0;hn=Re.length&&(Re=void 0),{value:Re&&Re[Kt++],done:!Re}}};throw new TypeError(Qe?"Object is not iterable.":"Symbol.iterator is not defined.")}(Kt),qn=Yn.next();!qn.done;qn=Yn.next())Fn._entries.delete(qn.value)}catch(di){Qe={error:di}}finally{try{qn&&!qn.done&&(gt=Yn.return)&>.call(Yn)}finally{if(Qe)throw Qe.error}}return Fn},Re.prototype.clear=function(){return new Re},Re}(),Z=Symbol("BaggageEntryMetadata"),se=k.instance();function fe(Re){return void 0===Re&&(Re={}),new te(new Map(Object.entries(Re)))}function Se(Re){return"string"!=typeof Re&&(se.error("Cannot create baggage metadata from unknown type: "+typeof Re),Re=""),{__TYPE__:Z,toString:function(){return Re}}}function pe(Re){return Symbol.for(Re)}var we,q,W=new function Re(Qe){var gt=this;gt._currentContext=Qe?new Map(Qe):new Map,gt.getValue=function(Kt){return gt._currentContext.get(Kt)},gt.setValue=function(Kt,hn){var Fn=new Re(gt._currentContext);return Fn._currentContext.set(Kt,hn),Fn},gt.deleteValue=function(Kt){var hn=new Re(gt._currentContext);return hn._currentContext.delete(Kt),hn}},ee=[{n:"error",c:"error"},{n:"warn",c:"warn"},{n:"info",c:"info"},{n:"debug",c:"debug"},{n:"verbose",c:"trace"}],X=function(){function Re(gt){return function(){for(var Kt=[],hn=0;hn0)&&!(Kt=Fn.next()).done;)Yn.push(Kt.value)}catch(qn){hn={error:qn}}finally{try{Kt&&!Kt.done&&(gt=Fn.return)&>.call(Fn)}finally{if(hn)throw hn.error}}return Yn}(hn),!1))},Re.prototype.bind=function(Qe,gt){return gt},Re.prototype.enable=function(){return this},Re.prototype.disable=function(){return this},Re}(),dn="context",vn=new Wt,xe=function(){function Re(){}return Re.getInstance=function(){return this._instance||(this._instance=new Re),this._instance},Re.prototype.setGlobalContextManager=function(Qe){return P(dn,Qe,k.instance())},Re.prototype.active=function(){return this._getContextManager().active()},Re.prototype.with=function(Qe,gt,Kt){for(var hn,Fn=[],Yn=3;Yn0)&&!(Kt=Fn.next()).done;)Yn.push(Kt.value)}catch(qn){hn={error:qn}}finally{try{Kt&&!Kt.done&&(gt=Fn.return)&>.call(Fn)}finally{if(hn)throw hn.error}}return Yn}(Fn),!1))},Re.prototype.bind=function(Qe,gt){return this._getContextManager().bind(Qe,gt)},Re.prototype._getContextManager=function(){return V(dn)||vn},Re.prototype.disable=function(){this._getContextManager().disable(),B(dn,k.instance())},Re}();!function(Re){Re[Re.NONE=0]="NONE",Re[Re.SAMPLED=1]="SAMPLED"}(lt||(lt={}));var Tt="0000000000000000",Et="00000000000000000000000000000000",Ye={traceId:Et,spanId:Tt,traceFlags:lt.NONE},Nt=function(){function Re(Qe){void 0===Qe&&(Qe=Ye),this._spanContext=Qe}return Re.prototype.spanContext=function(){return this._spanContext},Re.prototype.setAttribute=function(Qe,gt){return this},Re.prototype.setAttributes=function(Qe){return this},Re.prototype.addEvent=function(Qe,gt){return this},Re.prototype.setStatus=function(Qe){return this},Re.prototype.updateName=function(Qe){return this},Re.prototype.end=function(Qe){},Re.prototype.isRecording=function(){return!1},Re.prototype.recordException=function(Qe,gt){},Re}(),Yt=pe("OpenTelemetry Context Key SPAN");function Ut(Re){return Re.getValue(Yt)||void 0}function Pn(){return Ut(xe.getInstance().active())}function Vt(Re,Qe){return Re.setValue(Yt,Qe)}function bt(Re){return Re.deleteValue(Yt)}function De(Re,Qe){return Vt(Re,new Nt(Qe))}function tt(Re){var Qe;return null===(Qe=Ut(Re))||void 0===Qe?void 0:Qe.spanContext()}var Ve=/^([0-9a-f]{32})$/i,Je=/^[0-9a-f]{16}$/i;function Ct(Re){return Ve.test(Re)&&Re!==Et}function cn(Re){return Je.test(Re)&&Re!==Tt}function Hn(Re){return Ct(Re.traceId)&&cn(Re.spanId)}function ln(Re){return new Nt(Re)}var ke,mt,ot,an=xe.getInstance(),Qt=function(){function Re(){}return Re.prototype.startSpan=function(Qe,gt,Kt){if(void 0===Kt&&(Kt=an.active()),null!=gt&>.root)return new Nt;var hn,Fn=Kt&&tt(Kt);return"object"==typeof(hn=Fn)&&"string"==typeof hn.spanId&&"string"==typeof hn.traceId&&"number"==typeof hn.traceFlags&&Hn(Fn)?new Nt(Fn):new Nt},Re.prototype.startActiveSpan=function(Qe,gt,Kt,hn){var Fn,Yn,qn;if(!(arguments.length<2)){2===arguments.length?qn=gt:3===arguments.length?(Fn=gt,qn=Kt):(Fn=gt,Yn=Kt,qn=hn);var Si=null!=Yn?Yn:an.active(),di=this.startSpan(Qe,Fn,Si),ji=Vt(Si,di);return an.with(ji,qn,void 0,di)}},Re}(),bn=new Qt,Rn=function(){function Re(Qe,gt,Kt,hn){this._provider=Qe,this.name=gt,this.version=Kt,this.options=hn}return Re.prototype.startSpan=function(Qe,gt,Kt){return this._getTracer().startSpan(Qe,gt,Kt)},Re.prototype.startActiveSpan=function(Qe,gt,Kt,hn){var Fn=this._getTracer();return Reflect.apply(Fn.startActiveSpan,Fn,arguments)},Re.prototype._getTracer=function(){if(this._delegate)return this._delegate;var Qe=this._provider.getDelegateTracer(this.name,this.version,this.options);return Qe?(this._delegate=Qe,this._delegate):bn},Re}(),Dt=new(function(){function Re(){}return Re.prototype.getTracer=function(Qe,gt,Kt){return new Qt},Re}()),Xt=function(){function Re(){}return Re.prototype.getTracer=function(Qe,gt,Kt){var hn;return null!==(hn=this.getDelegateTracer(Qe,gt,Kt))&&void 0!==hn?hn:new Rn(this,Qe,gt,Kt)},Re.prototype.getDelegate=function(){var Qe;return null!==(Qe=this._delegate)&&void 0!==Qe?Qe:Dt},Re.prototype.setDelegate=function(Qe){this._delegate=Qe},Re.prototype.getDelegateTracer=function(Qe,gt,Kt){var hn;return null===(hn=this._delegate)||void 0===hn?void 0:hn.getTracer(Qe,gt,Kt)},Re}();(function(Re){Re[Re.NOT_RECORD=0]="NOT_RECORD",Re[Re.RECORD=1]="RECORD",Re[Re.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"})(ke||(ke={})),function(Re){Re[Re.INTERNAL=0]="INTERNAL",Re[Re.SERVER=1]="SERVER",Re[Re.CLIENT=2]="CLIENT",Re[Re.PRODUCER=3]="PRODUCER",Re[Re.CONSUMER=4]="CONSUMER"}(mt||(mt={})),function(Re){Re[Re.UNSET=0]="UNSET",Re[Re.OK=1]="OK",Re[Re.ERROR=2]="ERROR"}(ot||(ot={}));var Ln="[_0-9a-z-*/]",Jn=new RegExp("^(?:[a-z]"+Ln+"{0,255}|[a-z0-9]"+Ln+"{0,240}@[a-z]"+Ln+"{0,13})$"),Ci=/^[ -~]{0,255}[!-~]$/,ki=/,|=/,Bi=function(){function Re(Qe){this._internalState=new Map,Qe&&this._parse(Qe)}return Re.prototype.set=function(Qe,gt){var Kt=this._clone();return Kt._internalState.has(Qe)&&Kt._internalState.delete(Qe),Kt._internalState.set(Qe,gt),Kt},Re.prototype.unset=function(Qe){var gt=this._clone();return gt._internalState.delete(Qe),gt},Re.prototype.get=function(Qe){return this._internalState.get(Qe)},Re.prototype.serialize=function(){var Qe=this;return this._keys().reduce(function(gt,Kt){return gt.push(Kt+"="+Qe.get(Kt)),gt},[]).join(",")},Re.prototype._parse=function(Qe){Qe.length>512||(this._internalState=Qe.split(",").reverse().reduce(function(gt,Kt){var Si,hn=Kt.trim(),Fn=hn.indexOf("=");if(-1!==Fn){var Yn=hn.slice(0,Fn),qn=hn.slice(Fn+1,Kt.length);Jn.test(Yn)&&(Ci.test(Si=qn)&&!ki.test(Si))&>.set(Yn,qn)}return gt},new Map),this._internalState.size>32&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,32))))},Re.prototype._keys=function(){return Array.from(this._internalState.keys()).reverse()},Re.prototype._clone=function(){var Qe=new Re;return Qe._internalState=new Map(this._internalState),Qe},Re}();function st(Re){return new Bi(Re)}var En=xe.getInstance(),In=k.instance(),it=new(function(){function Re(){}return Re.prototype.getMeter=function(Qe,gt,Kt){return Oe},Re}()),Lt="metrics",$t=function(){function Re(){}return Re.getInstance=function(){return this._instance||(this._instance=new Re),this._instance},Re.prototype.setGlobalMeterProvider=function(Qe){return P(Lt,Qe,k.instance())},Re.prototype.getMeterProvider=function(){return V(Lt)||it},Re.prototype.getMeter=function(Qe,gt,Kt){return this.getMeterProvider().getMeter(Qe,gt,Kt)},Re.prototype.disable=function(){B(Lt,k.instance())},Re}().getInstance(),gn=function(){function Re(){}return Re.prototype.inject=function(Qe,gt){},Re.prototype.extract=function(Qe,gt){return Qe},Re.prototype.fields=function(){return[]},Re}(),Tn=pe("OpenTelemetry Baggage Key");function ft(Re){return Re.getValue(Tn)||void 0}function Pt(){return ft(xe.getInstance().active())}function on(Re,Qe){return Re.setValue(Tn,Qe)}function Zt(Re){return Re.deleteValue(Tn)}var Sn="propagation",$n=new gn,Zn=function(){function Re(){this.createBaggage=fe,this.getBaggage=ft,this.getActiveBaggage=Pt,this.setBaggage=on,this.deleteBaggage=Zt}return Re.getInstance=function(){return this._instance||(this._instance=new Re),this._instance},Re.prototype.setGlobalPropagator=function(Qe){return P(Sn,Qe,k.instance())},Re.prototype.inject=function(Qe,gt,Kt){return void 0===Kt&&(Kt=yt),this._getGlobalPropagator().inject(Qe,gt,Kt)},Re.prototype.extract=function(Qe,gt,Kt){return void 0===Kt&&(Kt=Ze),this._getGlobalPropagator().extract(Qe,gt,Kt)},Re.prototype.fields=function(){return this._getGlobalPropagator().fields()},Re.prototype.disable=function(){B(Sn,k.instance())},Re.prototype._getGlobalPropagator=function(){return V(Sn)||$n},Re}(),ii=Zn.getInstance(),gi="trace",jt=function(){function Re(){this._proxyTracerProvider=new Xt,this.wrapSpanContext=ln,this.isSpanContextValid=Hn,this.deleteSpan=bt,this.getSpan=Ut,this.getActiveSpan=Pn,this.getSpanContext=tt,this.setSpan=Vt,this.setSpanContext=De}return Re.getInstance=function(){return this._instance||(this._instance=new Re),this._instance},Re.prototype.setGlobalTracerProvider=function(Qe){var gt=P(gi,this._proxyTracerProvider,k.instance());return gt&&this._proxyTracerProvider.setDelegate(Qe),gt},Re.prototype.getTracerProvider=function(){return V(gi)||this._proxyTracerProvider},Re.prototype.getTracer=function(Qe,gt){return this.getTracerProvider().getTracer(Qe,gt)},Re.prototype.disable=function(){B(gi,k.instance()),this._proxyTracerProvider=new Xt},Re}().getInstance();const ct={context:En,diag:In,metrics:$t,propagation:ii,trace:jt}},714:(E,T)=>{Object.defineProperty(T,"__esModule",{value:!0}),T.defineEnum=void 0,T.defineEnum=function(x){return x}},865:(E,T,x)=>{Object.defineProperty(T,"__esModule",{value:!0}),T.PlatformOS=T.PlatformType=T.PlatformBrowser=T.ClientHeaderDeviceType=T.ClientHeaderBrowserType=T.ClientHeaderOSType=T.PayloadOSType=T.PayloadBrowserType=T.PayloadDeviceType=void 0;const M=x(714);T.PayloadDeviceType=(0,M.defineEnum)({DESKTOP:"Desktop",LAPTOP:"Laptop",TV:"TV",PHONE:"Phone",TABLET:"Tablet",SERVER:"Server",CONSOLE:"Console",HMD:"HMD",UNDEFINED:"undefined"}),T.PayloadBrowserType=(0,M.defineEnum)({CHROME:"Chrome",SAFARI:"Safari",YANDEX:"Yandex",EDGE:"Edge",EDGE_LEGACY:"Edge_legacy",FIREFOX:"Firefox",SAMSUNG:"Samsung",CHROMIUM:"Chromium",OPERA:"Opera",OPERAGX:"OperaGX",BRAVE:"Brave",SILK:"Silk",UNDEFINED:"undefined"}),T.PayloadOSType=(0,M.defineEnum)({WINDOWS:"Windows",MACOS:"MacOS",SHIELD:"Shield",ANDROID:"Android",IOS:"iOS",IPADOS:"iPadOS",CHROMEOS:"ChromeOS",LINUX:"Linux",TIZEN:"Tizen",WEBOS:"WebOS",TVOS:"tvOS",XBOX:"Xbox",STEAMOS:"SteamOS",VISIONOS:"visionOS",UNDEFINED:"undefined"}),T.ClientHeaderOSType=(0,M.defineEnum)({WINDOWS:"WINDOWS",MACOS:"MACOS",SHIELD:"SHIELD",ANDROID:"ANDROID",IOS:"IOS",IPADOS:"IPADOS",CHROMEOS:"CHROMEOS",LINUX:"LINUX",TIZEN:"TIZEN",WEBOS:"WEBOS",XBOX:"XBOX",STEAMOS:"STEAMOS",VISIONOS:"VISIONOS",UNKNOWN:"UNKNOWN"}),T.ClientHeaderBrowserType=(0,M.defineEnum)({CHROME:"CHROME",SAFARI:"SAFARI",YANDEX:"YANDEX",EDGE:"EDGE",EDGE_LEGACY:"EDGE_LEGACY",FIREFOX:"FIREFOX",SAMSUNG:"SAMSUNG",CHROMIUM:"CHROMIUM",OPERA:"OPERA",OPERAGX:"OPERAGX",BRAVE:"BRAVE",SILK:"SILK",UNKNOWN:"UNKNOWN"}),T.ClientHeaderDeviceType=(0,M.defineEnum)({DESKTOP:"DESKTOP",LAPTOP:"LAPTOP",TV:"TV",PHONE:"PHONE",TABLET:"TABLET",CONSOLE:"CONSOLE",HMD:"HMD",UNKNOWN:"UNKNOWN"}),T.PlatformBrowser=(0,M.defineEnum)({UNKNOWN:"Unknown",CHROME:"Chrome",SAFARI:"Safari",YANDEX:"Yandex",EDGE:"Edge",EDGE_LEGACY:"Edge_Legacy",FIREFOX:"Firefox",SAMSUNG:"Samsung",CHROMIUM:"Chromium",OPERA:"Opera",OPERAGX:"OperaGX",BRAVE:"Brave",SILK:"Silk",REACT:"ReactNative",PICO:"Pico"}),T.PlatformType=(0,M.defineEnum)({UNKNOWN:"UNKNOWN",DESKTOP:"DESKTOP",LAPTOP:"LAPTOP",TV:"TV",PHONE:"PHONE",TABLET:"TABLET",CONSOLE:"CONSOLE",HMD:"HMD"}),T.PlatformOS=(0,M.defineEnum)({UNKNOWN:"Unknown",CHROME_OS:"ChromeOS",WINDOWS:"Windows",MAC:"macOS",LINUX:"Linux",IOS:"iOS",IPADOS:"iPadOS",WEBOS:"WebOS",TIZEN:"Tizen",ANDROID:"Android",FIRETV:"FireTV",XBOX:"Xbox",FREEBSD:"FreeBSD",STEAMOS:"SteamOS",CCOS:"ccOS",VISIONOS:"visionOS"})},921:(E,T)=>{Object.defineProperty(T,"__esModule",{value:!0}),T.CLIENT_ID=void 0,T.CLIENT_ID="62677554106929725"}},v={};function _(E){var T=v[E];if(void 0!==T)return T.exports;var x=v[E]={exports:{}};return s[E](x,x.exports,_),x.exports}_.d=(E,T)=>{for(var x in T)_.o(T,x)&&!_.o(E,x)&&Object.defineProperty(E,x,{enumerable:!0,get:T[x]})},_.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch{if("object"==typeof window)return window}}(),_.o=(E,T)=>Object.prototype.hasOwnProperty.call(E,T),_.r=E=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(E,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(E,"__esModule",{value:!0})};var g={};(()=>{var E=g;Object.defineProperty(E,"__esModule",{value:!0}),E.Profile=E.BitDepth=E.SdrHdrMode=E.translatePlatformInfoForClientHeader=E.translatePlatformInfoForPayload=E.TracingManager=E.LogUploader=E.Logger=E.Log=E.LogMechanism=E.LogLevel=E.LogBuffer=E.performHttpRequest=E.HttpErrorCode=E.CancellableWait=E.authInfoToHeader=E.AuthType=E.PlatformType=E.PlatformOS=E.PlatformBrowser=E.ClientHeaderDeviceType=E.ClientHeaderBrowserType=E.ClientHeaderOSType=E.PayloadOSType=E.PayloadBrowserType=E.PayloadDeviceType=E.TelemetryModule=E.GdprLevel=E.NetworkType=E.ProductName=E.ClientVariant=E.PayloadClientType=E.UploadEnvironment=E.ConsentLevel=void 0;var T=_(623);Object.defineProperty(E,"ConsentLevel",{enumerable:!0,get:function(){return T.ConsentLevel}}),Object.defineProperty(E,"UploadEnvironment",{enumerable:!0,get:function(){return T.UploadEnvironment}}),Object.defineProperty(E,"PayloadClientType",{enumerable:!0,get:function(){return T.PayloadClientType}}),Object.defineProperty(E,"ClientVariant",{enumerable:!0,get:function(){return T.ClientVariant}}),Object.defineProperty(E,"ProductName",{enumerable:!0,get:function(){return T.ProductName}});var x=_(422);Object.defineProperty(E,"NetworkType",{enumerable:!0,get:function(){return x.NetworkType}});var M=_(419);Object.defineProperty(E,"GdprLevel",{enumerable:!0,get:function(){return M.GdprLevel}}),Object.defineProperty(E,"TelemetryModule",{enumerable:!0,get:function(){return M.TelemetryModule}});var y=_(865);Object.defineProperty(E,"PayloadDeviceType",{enumerable:!0,get:function(){return y.PayloadDeviceType}}),Object.defineProperty(E,"PayloadBrowserType",{enumerable:!0,get:function(){return y.PayloadBrowserType}}),Object.defineProperty(E,"PayloadOSType",{enumerable:!0,get:function(){return y.PayloadOSType}}),Object.defineProperty(E,"ClientHeaderOSType",{enumerable:!0,get:function(){return y.ClientHeaderOSType}}),Object.defineProperty(E,"ClientHeaderBrowserType",{enumerable:!0,get:function(){return y.ClientHeaderBrowserType}}),Object.defineProperty(E,"ClientHeaderDeviceType",{enumerable:!0,get:function(){return y.ClientHeaderDeviceType}}),Object.defineProperty(E,"PlatformBrowser",{enumerable:!0,get:function(){return y.PlatformBrowser}}),Object.defineProperty(E,"PlatformOS",{enumerable:!0,get:function(){return y.PlatformOS}}),Object.defineProperty(E,"PlatformType",{enumerable:!0,get:function(){return y.PlatformType}});var b=_(250);Object.defineProperty(E,"AuthType",{enumerable:!0,get:function(){return b.AuthType}}),Object.defineProperty(E,"authInfoToHeader",{enumerable:!0,get:function(){return b.authInfoToHeader}});var c=_(379);Object.defineProperty(E,"CancellableWait",{enumerable:!0,get:function(){return c.CancellableWait}});var i=_(121);Object.defineProperty(E,"HttpErrorCode",{enumerable:!0,get:function(){return i.HttpErrorCode}}),Object.defineProperty(E,"performHttpRequest",{enumerable:!0,get:function(){return i.performHttpRequest}});var h=_(596);Object.defineProperty(E,"LogBuffer",{enumerable:!0,get:function(){return h.LogBuffer}});var A=_(614);Object.defineProperty(E,"LogLevel",{enumerable:!0,get:function(){return A.LogLevel}}),Object.defineProperty(E,"LogMechanism",{enumerable:!0,get:function(){return A.LogMechanism}}),Object.defineProperty(E,"Log",{enumerable:!0,get:function(){return A.Log}}),Object.defineProperty(E,"Logger",{enumerable:!0,get:function(){return A.Logger}});var P=_(36);Object.defineProperty(E,"LogUploader",{enumerable:!0,get:function(){return P.LogUploader}});var V=_(367);Object.defineProperty(E,"TracingManager",{enumerable:!0,get:function(){return V.TracingManager}});var B=_(537);Object.defineProperty(E,"translatePlatformInfoForPayload",{enumerable:!0,get:function(){return B.translatePlatformInfoForPayload}}),Object.defineProperty(E,"translatePlatformInfoForClientHeader",{enumerable:!0,get:function(){return B.translatePlatformInfoForClientHeader}});var j=_(297);Object.defineProperty(E,"SdrHdrMode",{enumerable:!0,get:function(){return j.SdrHdrMode}}),Object.defineProperty(E,"BitDepth",{enumerable:!0,get:function(){return j.BitDepth}}),Object.defineProperty(E,"Profile",{enumerable:!0,get:function(){return j.Profile}})})(),vt.exports=g})()},72271:function(vt,I,f){"use strict";var r=this&&this.__createBinding||(Object.create?function(v,_,g,E){void 0===E&&(E=g);var T=Object.getOwnPropertyDescriptor(_,g);(!T||("get"in T?!_.__esModule:T.writable||T.configurable))&&(T={enumerable:!0,get:function(){return _[g]}}),Object.defineProperty(v,E,T)}:function(v,_,g,E){void 0===E&&(E=g),v[E]=_[g]}),s=this&&this.__exportStar||function(v,_){for(var g in v)"default"!==g&&!Object.prototype.hasOwnProperty.call(_,g)&&r(_,v,g)};Object.defineProperty(I,"__esModule",{value:!0}),s(f(27621),I),s(f(51814),I),s(f(78564),I),s(f(24538),I)},78564:(vt,I,f)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.Logger=void 0;const r=f(51814);I.Logger=class s{constructor(_){this.loggingLevel=_}info(..._){this.logEntry(r.LoggingLevel.Info,_,console.log.bind(console))}error(..._){this.logEntry(r.LoggingLevel.Error,_,console.error.bind(console))}warn(..._){this.logEntry(r.LoggingLevel.Warning,_,console.warn.bind(console))}verbose(..._){this.logEntry(r.LoggingLevel.Verbose,_,console.log.bind(console))}event(..._){this.logEntry(r.LoggingLevel.Event,_,console.log.bind(console))}logEntry(_,g,E){E("[Cloud Variable SDK] "+g)}}},51814:(vt,I)=>{"use strict";var b;Object.defineProperty(I,"__esModule",{value:!0}),I.openTracingConfig=I.SpanNames=I.CachePolicy=I.ActivityType=I.ExperimentActivationType=I.ActivityExperienceType=I.CommonClientVariant=I.CommonClientType=I.DeviceType=I.CloudVariableStatus=I.StorageType=I.LoggingLevel=void 0,(b=I.LoggingLevel||(I.LoggingLevel={}))[b.None=-1]="None",b[b.Error=1]="Error",b[b.Warning=2]="Warning",b[b.Info=3]="Info",b[b.Verbose=4]="Verbose",b[b.Event=5]="Event",function(b){b.IndexedDB="IndexedDB",b.SharedStorage="SharedStoage",b.LocalStorage="LocalStorage",b.AbHub="AbHub"}(I.StorageType||(I.StorageType={})),function(b){b.Created="Created",b.Updated="Updated",b.Deleted="Deleted",b.Unknown="Unknown"}(I.CloudVariableStatus||(I.CloudVariableStatus={})),function(b){b.Desktop="Desktop",b.Laptop="Laptop",b.TV="TV",b.Phone="Phone",b.Tablet="Tablet",b.Server="Server",b.Undefined="undefined"}(I.DeviceType||(I.DeviceType={})),function(b){b.Native="Native",b.Browser="Browser",b.GFNSDK="GFNSDK",b.Undefined="undefined"}(I.CommonClientType||(I.CommonClientType={})),function(b){b.iBeta="iBeta",b.Release="Release",b.Undefined="undefined"}(I.CommonClientVariant||(I.CommonClientVariant={})),function(b){b.Variant="Variant",b.Control="Control",b.Default="Default",b.Alternate="Alternate"}(I.ActivityExperienceType||(I.ActivityExperienceType={})),function(b){b.USER_ID="USER_ID",b.DEVICE_ID="DEVICE_ID",b.SESSION_ID="SESSION_ID"}(I.ExperimentActivationType||(I.ExperimentActivationType={})),function(b){b.AB="AB",b.Unknown="Unknown",b.XT="XT",b.FR="FR"}(I.ActivityType||(I.ActivityType={})),function(b){b.CACHE="CACHE",b.LIVE="LIVE",b.CACHE_WITH_SILENT_UPDATE="CACHE_WITH_SILENT_UPDATE"}(I.CachePolicy||(I.CachePolicy={})),function(b){b.GxTargetGetCloudVariable="GxTargetGetCloudVariable",b.AxiosGetCloudVariable="AxiosGetCloudVariable"}(I.SpanNames||(I.SpanNames={})),I.openTracingConfig={accessToken:"zpdR5rGHUKaUny6FJUZZkEfSVhzkdRSIz6dCpsjvRtQ0TSQOXZdZlbcUOSaugWHyZnMUe6PGmK60Wi59/rk=",collectorUrl:"https://prod.otel.kaizen.nvidia.com/traces/otlp/v0.9",componentName:"gfn-web-client"}},27621:(vt,I,f)=>{"use strict";var r=f(8536).default;Object.defineProperty(I,"__esModule",{value:!0}),I.CloudVariableSdkService=void 0;const s=f(26875),v=f(73162),_=f(54326),g=f(51814),E=f(24538),T=f(78564);I.CloudVariableSdkService=class x{constructor(y,b,c,i,h,A){this.sdkConfig=y,this.url=this.url=y.url,this.cvChangeListenersByName=new Map,this.cvNameToResult=new Map,this.logger=new T.Logger(y.loggingLevel),this.readFromStorage=i||this.getIndexedDBCloudVariable,this.writeToStorage=h||this.setIndexedDBCloudVariable,this.buildClientStorageKeyForCv=A,this.cvChangeListeners=[],this.nvOpenTracing=new _.NvOTELTracingService,this.initializeOpenTracing(b,c),!i&&!h&&(this.idbName="gfnclient",this.storeName="kodiakSdkCacheStore",this.openDbInstance())}configureRequestApi(y,b){let c={};const i=this.startSpanUsingContext(y,b);return i&&this.nvOpenTracing.injectSpanHttpHeaders(i,c),[c,i||void 0]}subscribeToAllCloudVariables(y){var b=this;return r(function*(){b.cvChangeListeners.push(y)})()}subscribeToSingleCloudVariable(y,b){let c=this.cvChangeListenersByName.get(y);c?c.push(b):c=[b],this.cvChangeListenersByName.set(y,c)}getCloudVariables(y,b,c,i){if(b===g.CachePolicy.CACHE)return this.getCloudVariablesFromCache(y);let h=new Map,A=this.callGetCloudVariableApi(y,c,i).then(P=>{h=(0,E.formatCloudVariableResponse)(P);let V=this.detectGlobalDifferentCloudVariables(h,y);this.triggerCallbackFuncs(V),this.updateIDB(V)});if(b===g.CachePolicy.CACHE_WITH_SILENT_UPDATE){const P=this.getCloudVariablesFromMap(y);if(P.size>0)return Promise.resolve(P);this.logger.info("no cached cloud variable, sending live")}return A.then(P=>h)}getCloudVariable(y,b,c,i){var h=this;return r(function*(){if(y){const A=yield h.getCloudVariables([y],b,c,i);return A.has(y)?A.get(y):null}return h.logger.error("Cannot request empty cloud variable"),null})()}initializeOpenTracing(y,b){this.tracer=this.nvOpenTracing.getOTELTracer(y,b)}updateGlobalTags(y){this.nvOpenTracing.setGlobalTags(y)}updateServerUrl(y){this.url=y}startSpan(y,b){return this.nvOpenTracing.startSpan(y,b)}startSpanUsingContext(y,b){return this.nvOpenTracing.startSpanUsingContext(y,b)}closeSpan(y){this.nvOpenTracing.closeSpan(y)}callGetCloudVariableApi(y,b,c){var i=this;return r(function*(){const[h,A]=i.configureRequestApi(g.SpanNames.GxTargetGetCloudVariable,c),P=i.sdkConfig.clientInfo,V={cvName:y.join(","),...P,clientParams:JSON.stringify(b)},B=new URL(i.url+"/cloudvariables/v3");Object.keys(V).forEach(re=>B.searchParams.append(re,V[re]));const j=i.fetchWithExponentialBackoff(B,{method:"GET",headers:{"Content-type":"application/json",...h}}).then(re=>re.json().then(z=>z));return i.nvOpenTracing.handleHttpEndpointSpan(j,A)})()}getCloudVariablesFromCache(y){let b=new Map;const c=y.map(i=>this.readFromStorageWrapper(i).then(h=>{h&&b.set(i,h)}).catch(h=>{this.logger.error(`Error while reading cache for ${i}: ${h}`)}));return Promise.all(c).then(i=>b)}getCloudVariablesFromMap(y){let b=new Map;for(const c of y){const i=this.cvNameToResult.get(c);i&&b.set(c,i)}return b}detectGlobalDifferentCloudVariables(y,b){const c=new Map;return y.forEach((i,h)=>{const A=this.cvNameToResult.get(h);A?(0,s.isEqual)(i,A)&&(c.set(i.name,(0,E.formatCloudVariableClientResponse)(i,!1,g.CloudVariableStatus.Updated)),this.cvNameToResult.set(h,i)):(c.set(i.name,(0,E.formatCloudVariableClientResponse)(i,!1,g.CloudVariableStatus.Created)),this.cvNameToResult.set(h,i))}),this.cvNameToResult.forEach((i,h)=>{b.includes(h)&&!y.has(h)&&i.activity&&(c.set(h,(0,E.formatCloudVariableClientResponse)({activity:{id:i.activity.id}},!1,g.CloudVariableStatus.Deleted)),this.cvNameToResult.set(h,{}),this.writeToStorageWrapper(h,{}))}),c}triggerCallbackFuncs(y){this.cvChangeListeners.forEach(b=>{b(y)}),y.forEach((b,c)=>{const i=this.cvChangeListenersByName.get(c);i&&i.forEach(h=>h(y))})}updateIDB(y){y.forEach((b,c)=>{this.writeToStorageWrapper(c,{activity:b.activity,result:b.variation,name:b.name,metadata:b.metadata,value:b.value})})}readFromStorageWrapper(y){var b=this;return r(function*(){const c=(0,E.generateUserIdStorageKey)(y,b.sdkConfig.clientInfo.userId);let i=yield b.readFromStorage(c);if(i)return i;const h=(0,E.generateDeviceIdStorageKey)(y,b.sdkConfig.clientInfo.deviceId);return i=yield b.readFromStorage(h),i||null})()}writeToStorageWrapper(y,b){if((0,s.isEmpty)(b)||void 0===b.name)return;let c;c=this.buildClientStorageKeyForCv?this.buildClientStorageKeyForCv(b.activity.activationType):this.generateIndexedDBKey(b),this.writeToStorage(c,b)}openDbInstance(){var y=this;return r(function*(){const b=yield(0,v.openDB)(y.idbName),c=b.version,i=y.storeName;b.objectStoreNames.contains(i)||(0,v.openDB)(y.idbName,c+1,{upgrade(h){h.createObjectStore(i)}}),b.close()})()}generateIndexedDBKey(y){const b=y.name;let c;switch(y.activity.activationType){case g.ExperimentActivationType.USER_ID:c=(0,E.generateUserIdStorageKey)(b,this.sdkConfig.clientInfo.userId);break;case g.ExperimentActivationType.DEVICE_ID:c=(0,E.generateDeviceIdStorageKey)(b,this.sdkConfig.clientInfo.deviceId);break;default:c=b+"-undefined"}return c}getIndexedDBCloudVariable(y){var b=this;return r(function*(){const c=y.split("-")[0],i=yield(0,v.openDB)(b.idbName),h=yield i.get(b.storeName,y);if(i.close(),h){const A=h.cloudVariables.filter(P=>P.name===c);return 0===A.length?null:A[0]}return null})()}setIndexedDBCloudVariable(y,b){var c=this;return r(function*(){let i=yield(0,v.openDB)(c.idbName);const h=c.storeName,A=i.version;if((0,s.isEmpty)(b)||void 0===b.name)return yield i.delete(c.storeName,y),void i.close();i.objectStoreNames.contains(h)||(i=yield(0,v.openDB)(c.idbName,A+1,{upgrade(P){P.createObjectStore(h)}})),yield i.put(c.storeName,b,y),i.close()})()}fetchWithExponentialBackoff(y,b={}){let c=0;const i=()=>fetch(y,b).then(h=>{if(h.ok)return h;throw new Error(`Request failed with status: ${h.status}`)}).catch(h=>{if(c>=this.sdkConfig.defaultRetries)throw new Error(`Max retries reached. Last error: ${h.message}`);const A=this.sdkConfig.defaultTimeBetweenRetries*Math.pow(2,c);return c++,new Promise(P=>{setTimeout(()=>{P(i())},A)})});return i()}}},24538:(vt,I,f)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.getCommonClientVariant=I.generateDeviceIdStorageKey=I.generateUserIdStorageKey=I.formatCloudVariableClientResponse=I.formatCloudVariableResponse=void 0;const r=f(51814);I.formatCloudVariableResponse=function s(T){const x=T,M=new Map;return x.cloudVariables.forEach(y=>{M.set(y.name,{name:y.name,result:y.result,value:y.value,activity:y.activity,metadata:y.metadata})}),M},I.formatCloudVariableClientResponse=function v(T,x,M){return{name:T.name,variation:T.result,value:T.value,activity:T.activity,metadata:T.metadata,isCachedResult:x,state:M}},I.generateUserIdStorageKey=function _(T,x){return T+"-"+x},I.generateDeviceIdStorageKey=function g(T,x){return T+"-"+x},I.getCommonClientVariant=function E(T){switch(T){case"ibeta":return r.CommonClientVariant.iBeta;case"release":return r.CommonClientVariant.Release;default:return r.CommonClientVariant.Undefined}}},73162:(vt,I,f)=>{"use strict";f.r(I),f.d(I,{deleteDB:()=>z,openDB:()=>re,unwrap:()=>j,wrap:()=>B});var r=f(70650);const s=(k,$)=>$.some(ne=>k instanceof ne);let v,_;const T=new WeakMap,x=new WeakMap,M=new WeakMap,y=new WeakMap,b=new WeakMap;let h={get(k,$,ne){if(k instanceof IDBTransaction){if("done"===$)return x.get(k);if("objectStoreNames"===$)return k.objectStoreNames||M.get(k);if("store"===$)return ne.objectStoreNames[1]?void 0:ne.objectStore(ne.objectStoreNames[0])}return B(k[$])},set:(k,$,ne)=>(k[$]=ne,!0),has:(k,$)=>k instanceof IDBTransaction&&("done"===$||"store"===$)||$ in k};function V(k){return"function"==typeof k?function P(k){return k!==IDBDatabase.prototype.transaction||"objectStoreNames"in IDBTransaction.prototype?function E(){return _||(_=[IDBCursor.prototype.advance,IDBCursor.prototype.continue,IDBCursor.prototype.continuePrimaryKey])}().includes(k)?function(...$){return k.apply(j(this),$),B(T.get(this))}:function(...$){return B(k.apply(j(this),$))}:function($,...ne){const te=k.call(j(this),$,...ne);return M.set(te,$.sort?$.sort():[$]),B(te)}}(k):(k instanceof IDBTransaction&&function i(k){if(x.has(k))return;const $=new Promise((ne,te)=>{const Z=()=>{k.removeEventListener("complete",se),k.removeEventListener("error",fe),k.removeEventListener("abort",fe)},se=()=>{ne(),Z()},fe=()=>{te(k.error||new DOMException("AbortError","AbortError")),Z()};k.addEventListener("complete",se),k.addEventListener("error",fe),k.addEventListener("abort",fe)});x.set(k,$)}(k),s(k,function g(){return v||(v=[IDBDatabase,IDBObjectStore,IDBIndex,IDBCursor,IDBTransaction])}())?new Proxy(k,h):k)}function B(k){if(k instanceof IDBRequest)return function c(k){const $=new Promise((ne,te)=>{const Z=()=>{k.removeEventListener("success",se),k.removeEventListener("error",fe)},se=()=>{ne(B(k.result)),Z()},fe=()=>{te(k.error),Z()};k.addEventListener("success",se),k.addEventListener("error",fe)});return $.then(ne=>{ne instanceof IDBCursor&&T.set(ne,k)}).catch(()=>{}),b.set($,k),$}(k);if(y.has(k))return y.get(k);const $=V(k);return $!==k&&(y.set(k,$),b.set($,k)),$}const j=k=>b.get(k);function re(k,$,{blocked:ne,upgrade:te,blocking:Z,terminated:se}={}){const fe=indexedDB.open(k,$),Se=B(fe);return te&&fe.addEventListener("upgradeneeded",pe=>{te(B(fe.result),pe.oldVersion,pe.newVersion,B(fe.transaction))}),ne&&fe.addEventListener("blocked",()=>ne()),Se.then(pe=>{se&&pe.addEventListener("close",()=>se()),Z&&pe.addEventListener("versionchange",()=>Z())}).catch(()=>{}),Se}function z(k,{blocked:$}={}){const ne=indexedDB.deleteDatabase(k);return $&&ne.addEventListener("blocked",()=>$()),B(ne).then(()=>{})}const H=["get","getKey","getAll","getAllKeys","count"],U=["put","add","delete","clear"],O=new Map;function F(k,$){if(!(k instanceof IDBDatabase)||$ in k||"string"!=typeof $)return;if(O.get($))return O.get($);const ne=$.replace(/FromIndex$/,""),te=$!==ne,Z=U.includes(ne);if(!(ne in(te?IDBIndex:IDBObjectStore).prototype)||!Z&&!H.includes(ne))return;const se=function(){var fe=(0,r.A)(function*(Se,...pe){const we=this.transaction(Se,Z?"readwrite":"readonly");let q=we.store;return te&&(q=q.index(pe.shift())),(yield Promise.all([q[ne](...pe),Z&&we.done]))[0]});return function(pe){return fe.apply(this,arguments)}}();return O.set($,se),se}!function A(k){h=k(h)}(k=>({...k,get:($,ne,te)=>F($,ne)||k.get($,ne,te),has:($,ne)=>!!F($,ne)||k.has($,ne)}))},54326:function(vt,I,f){"use strict";var r=this&&this.__createBinding||(Object.create?function(v,_,g,E){void 0===E&&(E=g);var T=Object.getOwnPropertyDescriptor(_,g);(!T||("get"in T?!_.__esModule:T.writable||T.configurable))&&(T={enumerable:!0,get:function(){return _[g]}}),Object.defineProperty(v,E,T)}:function(v,_,g,E){void 0===E&&(E=g),v[E]=_[g]}),s=this&&this.__exportStar||function(v,_){for(var g in v)"default"!==g&&!Object.prototype.hasOwnProperty.call(_,g)&&r(_,v,g)};I.__esModule=!0,s(f(22909),I),s(f(51086),I)},51086:function(vt,I,f){"use strict";var r=this&&this.__extends||function(){var g=function(E,T){return(g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(x,M){x.__proto__=M}||function(x,M){for(var y in M)Object.prototype.hasOwnProperty.call(M,y)&&(x[y]=M[y])})(E,T)};return function(E,T){if("function"!=typeof T&&null!==T)throw new TypeError("Class extends value "+String(T)+" is not a constructor or null");function x(){this.constructor=E}g(E,T),E.prototype=null===T?Object.create(T):(x.prototype=T.prototype,new x)}}();I.__esModule=!0,I.CustomOTLPExporter=void 0;var s=f(25154),v=f(94591),_=function(g){function E(T,x){var M=g.call(this,T)||this;return M._isTracingDisabledReplaySubject=x,M}return r(E,g),E.prototype.export=function(T,x){var M=this;this._isTracingDisabledReplaySubject.asObservable().pipe((0,v.take)(1)).subscribe(function(y){y||g.prototype.export.call(M,T,x)})},E}(s.OTLPTraceExporter);I.CustomOTLPExporter=_},22909:function(vt,I,f){"use strict";var r=this&&this.__spreadArray||function(i,h,A){if(A||2===arguments.length)for(var B,P=0,V=h.length;P{"use strict";var f,M,r;Object.defineProperty(I,"__esModule",{value:!0}),I.isValidEvent=I.subscribeToIFrameEvents=I.initIFrameCommsChannel=I.LogLevel=I.SurveyEventType=void 0,(M=f=I.SurveyEventType||(I.SurveyEventType={})).Submitted="SURVEY_SUBMITTED",M.Dismissed="SURVEY_DISMISSED",M.Deferred="SURVEY_DEFERRED",M.Minimized="SURVEY_MINIMIZED",M.Errored="SURVEY_ERRORED",M.SubmissionErrored="SURVEY_SUBMISSION_ERRORED",M.Timeout="SURVEY_TIMEOUT",M.CloseDialog="SURVEY_CLOSE_DIALOG",M.LoadComplete="LOAD_COMPLETE",M.ScreenChanged="SCREEN_CHANGED",M.Log="SURVEY_LOG",function(M){M.INFO="INFO",M.WARN="WARN",M.DEBUG="DEBUG",M.ERROR="ERROR"}(r=I.LogLevel||(I.LogLevel={}));const s={logModule:"gxt-survey-app",timeStamp:(new Date).toISOString().replace("T"," ").replace("Z",""),logLevel:r.DEBUG,logTag:"gxt/surveyService",logStr:"Log message couldn't be fetched."};function v(M){return`${M.type}-${M.surveyId}`}const _={};I.initIFrameCommsChannel=()=>{const M=y=>{const b=y.data;if(b.hasOwnProperty("type")&&(0,I.isValidEvent)(b.type)){const c=_[v(b)];c&&c.forEach(i=>{if(b.type===f.Log){let h;h=b.hasOwnProperty("log")?b.log:s,i(h)}else i()})}};return window.addEventListener("message",M,!1),{unsubscribe:()=>window.removeEventListener("message",M)}},I.subscribeToIFrameEvents=function E(M,y){const b=v(M);return _.hasOwnProperty(b)||(_[b]=[]),_[b].push(y),{unsubscribe:T(M,y)}};const T=(M,y)=>()=>{const b=v(M);_[b]=_[b].filter(c=>c!==y)};I.isValidEvent=M=>Object.values(f).includes(M)},85270:(vt,I,f)=>{"use strict";Object.defineProperty(I,"__esModule",{value:!0}),I.SurveySdkService=I.ThemeType=I.TriggerType=I.SurveyStatus=I.SurveySdkSpanTagNames=void 0;const r=f(54326),s=f(93761);var v,x,E;(x=v=I.SurveySdkSpanTagNames||(I.SurveySdkSpanTagNames={})).ReadOnly="http.readOnly",x.ClientVariant="clientVariant",x.ClientVersion="clientVersion",x.Environment="env",x.UserId="userId",x.IdpId="idpId",x.SurveyId="surveyId",function(x){x.Progress="Progress",x.Completed="Completed",x.Timeout="Timeout"}(I.SurveyStatus||(I.SurveyStatus={})),function(x){x.UXTestBanner="UXTEST_BANNER",x.SurveyBanner="SURVEY_BANNER",x.CommunicationBanner="COMMUNICATION_BANNER",x.PostGame="POST_GAME",x.Feedback="FEEDBACK",x.NotificationBanner="NOTIFICATION_BANNER"}(I.TriggerType||(I.TriggerType={})),function(x){x.Light="lightTheme",x.Dark="darkTheme"}(E=I.ThemeType||(I.ThemeType={})),I.SurveySdkService=class T{constructor(){this.nvOpenTracing=new r.NvOTELTracingService,(0,s.initIFrameCommsChannel)()}initializeOpenTracing(M,y){this.tracer=this.nvOpenTracing.getOTELTracer(M,y)}getFullSurveyUrl(M,y){const b=Object.keys(y);if(b.length>0){M+="/?";for(const c of b)M+=`${c}=${y[c]}&`;M=M.substring(0,M.length-1)}return M}initializeClientConfig(M,y,b){this.clientConfig=M,this.initializeOpenTracing(y,b)}updateGlobalTags(M){this.nvOpenTracing.setGlobalTags(M)}updateServerUrl(M){this.clientConfig.url=M}startSpan(M,y){return this.nvOpenTracing.startSpan(M,y)}startSpanUsingContext(M,y){return this.nvOpenTracing.startSpanUsingContext(M,y)}closeSpan(M){this.nvOpenTracing.closeSpan(M)}set surveyStatus(M){this.activeSurveyStatus=M}get surveyStatus(){return this.activeSurveyStatus}getUserSurvey(M,y,b,c,i,h,A,P,V,B,j,re,z,H,U,O="2"){return this.getSurveyApi(M,y,b,!1,h,i,P,V,B,j,re,z,H,U).then(F=>{const k=this.clientConfig.surveyContainerBaseUrl;let $=null;const ne=F;if(Object.keys(ne).length){$={surveyContainerUrl:this.getFullSurveyUrl(k,{userid:M,idpId:y,locale:A,surveyid:ne.sid,clientid:this.clientConfig.clientId,deviceId:b,clientVersion:this.clientConfig.clientVersion,clientVariant:this.clientConfig.clientVariant||"",env:this.clientConfig.env||"",surveyTimeout:c[ne.triggerType]||600,triggerType:ne.triggerType,surveyVisited:ne.surveyVisited||!1,version:O,applicationType:i.application||"GFN",themeType:i.currentAppTheme||E.Dark,...ne.configuration||{}}),surveyId:ne.sid,triggerType:ne.triggerType,bannerText:ne.bannerText||"",notificationUrl:ne.notificationUrl||"",surveyVisited:ne.surveyVisited||!1};const te=ne.debugInfo;return te&&te.surveySessionId&&($.surveySessionId=te.surveySessionId),$}return $})}isCurrentSurveyCompleted(M,y,b,c,i,h,A,P,V,B,j,re,z){return this.getSurveyApi(M,y,b,!0,c,i,h,A,P,V,B,j,re,z).then(H=>!Object.keys(H).length)}configureRequestApi(M,y){let b={};const c=this.startSpanUsingContext(M,y);return c&&this.nvOpenTracing.injectSpanHttpHeaders(c,b),[b,c||void 0]}declineUserSurvey(M,y,b,c){const[i,h]=this.configureRequestApi(r.SpanNames.GxTargetPutSurvey,c);h&&this.nvOpenTracing.setSpanAttributes(h,{[v.SurveyId]:y});const P=new URLSearchParams({userId:M,sid:y,hasDeclined:!0,isPreview:b}),V=new URL(`${this.clientConfig.url}/survey/v1?${P}`),B=this.fetchWithExponentialBackoff(V,{method:"PUT",headers:{"Content-Type":"application/json",...i},body:JSON.stringify({})}).then(()=>!0);return this.nvOpenTracing.handleHttpEndpointSpan(B,h)}submitSurveyPage(M,y,b,c,i,h,A,P){return this.putSurveyDetails(M,y,c,b,i,h,A,P)}getFirstSurveyPage(M,y,b,c,i,h){return this.putSurveyDetails(M,y,b,void 0,void 0,c,i,h)}putSurveyDetails(M,y,b,c,i,h,A,P){const[V,B]=this.configureRequestApi(r.SpanNames.GxTargetPutSurvey,A);B&&this.nvOpenTracing.setSpanAttributes(B,{[v.SurveyId]:y});const re=i?{answers:i}:{},z=new URLSearchParams({userId:M,sid:y,pid:c,isPreview:h,locale:b,deviceId:P}),H=new URL(`${this.clientConfig.url}/survey/v1?${z}`),U=this.fetchWithExponentialBackoff(H,{method:"PUT",body:JSON.stringify(re),headers:{"Content-Type":"application/json",...V}}).then(O=>O.json().then(F=>{let $={surveyId:F.sid,page:F.page,isLastPage:F.is_last_page,error:F.error};return B&&console.log(O),$}));return this.nvOpenTracing.handleHttpEndpointSpan(U,B)}getSurveyApi(M,y,b,c=!1,i,h,A,P,V,B,j,re,z,H){const[U,O]=this.configureRequestApi(r.SpanNames.GxTargetGetSurvey,H);O&&this.nvOpenTracing.setSpanAttributes(O,{[v.ReadOnly]:c});const F={clientId:this.clientConfig.clientId,deviceId:b,userId:M,idpId:y,clientVer:this.clientConfig.clientVersion,clientVariant:this.clientConfig.clientVariant,clientParams:JSON.stringify(h),deviceOS:A,deviceType:P,deviceMake:V,deviceModel:B,deviceOSVersion:j,clientType:re,browserType:z,triggerType:i.join(","),readOnly:c},k=new URLSearchParams(F),$=new URL(`${this.clientConfig.url}/survey/v2?${k}`),ne=this.fetchWithExponentialBackoff($,{method:"GET",headers:{...U}}).then(te=>te.json().then(Z=>{if(O){const se=Z;console.log("fetch api data: "+JSON.stringify(se)),Object.keys(se).length&&this.nvOpenTracing.setSpanAttributes(O,{[v.SurveyId]:se.sid})}return Z})).catch(te=>{console.log("fetch error"+te)});return this.nvOpenTracing.handleHttpEndpointSpan(ne,O)}fetchWithExponentialBackoff(M,y={}){let b=0;const c=()=>fetch(M,y).then(i=>{if(i.ok)return i;throw new Error(`Request failed with status: ${i.status}`)}).catch(i=>{if(b>=this.clientConfig.defaultRetries)throw new Error(`Max retries reached. Last error: ${i.message}`);const h=this.clientConfig.defaultTimeBetweenRetries*Math.pow(2,b);return b++,new Promise(A=>{setTimeout(()=>{A(c())},h)})});return c()}}},18839:(vt,I,f)=>{"use strict";f.d(I,{_:()=>b});var r=f(24773),_=function(){function c(){}return c.prototype.active=function(){return r.l},c.prototype.with=function(i,h,A){for(var P=[],V=3;V0)&&!(P=A.next()).done;)V.push(P.value)}catch(j){B={error:j}}finally{try{P&&!P.done&&(h=A.return)&&h.call(A)}finally{if(B)throw B.error}}return V}(P),!1))},c.prototype.bind=function(i,h){return h},c.prototype.enable=function(){return this},c.prototype.disable=function(){return this},c}(),g=f(95727),E=f(14051),M="context",y=new _,b=function(){function c(){}return c.getInstance=function(){return this._instance||(this._instance=new c),this._instance},c.prototype.setGlobalContextManager=function(i){return(0,g.$G)(M,i,E.K.instance())},c.prototype.active=function(){return this._getContextManager().active()},c.prototype.with=function(i,h,A){for(var P,V=[],B=3;B0)&&!(P=A.next()).done;)V.push(P.value)}catch(j){B={error:j}}finally{try{P&&!P.done&&(h=A.return)&&h.call(A)}finally{if(B)throw B.error}}return V}(V),!1))},c.prototype.bind=function(i,h){return this._getContextManager().bind(i,h)},c.prototype._getContextManager=function(){return(0,g.mS)(M)||y},c.prototype.disable=function(){this._getContextManager().disable(),(0,g.kv)(M,E.K.instance())},c}()},14051:(vt,I,f)=>{"use strict";f.d(I,{K:()=>b});var r=f(95727),_=function(){function c(i){this._namespace=i.namespace||"DiagComponentLogger"}return c.prototype.debug=function(){for(var i=[],h=0;h0)&&!(P=A.next()).done;)V.push(P.value)}catch(j){B={error:j}}finally{try{P&&!P.done&&(h=A.return)&&h.call(A)}finally{if(B)throw B.error}}return V}(h),!1))}var E=f(56737),b=function(){function c(){function i(P){return function(){for(var V=[],B=0;B0)&&!(P=A.next()).done;)V.push(P.value)}catch(j){B={error:j}}finally{try{P&&!P.done&&(h=A.return)&&h.call(A)}finally{if(B)throw B.error}}return V}(V),!1))}}var h=this;h.setLogger=function(P,V){var B,j,re;if(void 0===V&&(V={logLevel:E.u.INFO}),P===h){var z=new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");return h.error(null!==(B=z.stack)&&void 0!==B?B:z.message),!1}"number"==typeof V&&(V={logLevel:V});var H=(0,r.mS)("diag"),U=function T(c,i){function h(A,P){var V=i[A];return"function"==typeof V&&c>=P?V.bind(i):function(){}}return cE.u.ALL&&(c=E.u.ALL),i=i||{},{error:h("error",E.u.ERROR),warn:h("warn",E.u.WARN),info:h("info",E.u.INFO),debug:h("debug",E.u.DEBUG),verbose:h("verbose",E.u.VERBOSE)}}(null!==(j=V.logLevel)&&void 0!==j?j:E.u.INFO,P);if(H&&!V.suppressOverrideMessage){var O=null!==(re=(new Error).stack)&&void 0!==re?re:"";H.warn("Current logger will be overwritten from "+O),U.warn("Current logger will overwrite one already registered from "+O)}return(0,r.$G)("diag",U,h,!0)},h.disable=function(){(0,r.kv)("diag",h)},h.createComponentLogger=function(P){return new _(P)},h.verbose=i("verbose"),h.debug=i("debug"),h.info=i("info"),h.warn=i("warn"),h.error=i("error")}return c.instance=function(){return this._instance||(this._instance=new c),this._instance},c}()},44588:(vt,I,f)=>{"use strict";f.d(I,{B:()=>x,L:()=>T});var r=f(14051),_=function(){function M(y){this._entries=y?new Map(y):new Map}return M.prototype.getEntry=function(y){var b=this._entries.get(y);if(b)return Object.assign({},b)},M.prototype.getAllEntries=function(){return Array.from(this._entries.entries()).map(function(y){var b=function(M,y){var b="function"==typeof Symbol&&M[Symbol.iterator];if(!b)return M;var i,A,c=b.call(M),h=[];try{for(;(void 0===y||y-- >0)&&!(i=c.next()).done;)h.push(i.value)}catch(P){A={error:P}}finally{try{i&&!i.done&&(b=c.return)&&b.call(c)}finally{if(A)throw A.error}}return h}(y,2);return[b[0],b[1]]})},M.prototype.setEntry=function(y,b){var c=new M(this._entries);return c._entries.set(y,b),c},M.prototype.removeEntry=function(y){var b=new M(this._entries);return b._entries.delete(y),b},M.prototype.removeEntries=function(){for(var y,b,c=[],i=0;i=M.length&&(M=void 0),{value:M&&M[c++],done:!M}}};throw new TypeError(y?"Object is not iterable.":"Symbol.iterator is not defined.")}(c),P=A.next();!P.done;P=A.next())h._entries.delete(P.value)}catch(B){y={error:B}}finally{try{P&&!P.done&&(b=A.return)&&b.call(A)}finally{if(y)throw y.error}}return h},M.prototype.clear=function(){return new M},M}(),g=Symbol("BaggageEntryMetadata"),E=r.K.instance();function T(M){return void 0===M&&(M={}),new _(new Map(Object.entries(M)))}function x(M){return"string"!=typeof M&&(E.error("Cannot create baggage metadata from unknown type: "+typeof M),M=""),{__TYPE__:g,toString:function(){return M}}}},33784:(vt,I,f)=>{"use strict";f.d(I,{_:()=>s});var s=f(18839)._.getInstance()},24773:(vt,I,f)=>{"use strict";function r(_){return Symbol.for(_)}f.d(I,{l:()=>v,n:()=>r});var v=new(function(){return function _(g){var E=this;E._currentContext=g?new Map(g):new Map,E.getValue=function(T){return E._currentContext.get(T)},E.setValue=function(T,x){var M=new _(E._currentContext);return M._currentContext.set(T,x),M},E.deleteValue=function(T){var x=new _(E._currentContext);return x._currentContext.delete(T),x}}}())},40698:(vt,I,f)=>{"use strict";f.d(I,{s:()=>s});var s=f(14051).K.instance()},56737:(vt,I,f)=>{"use strict";f.d(I,{u:()=>r});var r=function(s){return s[s.NONE=0]="NONE",s[s.ERROR=30]="ERROR",s[s.WARN=50]="WARN",s[s.INFO=60]="INFO",s[s.DEBUG=70]="DEBUG",s[s.VERBOSE=80]="VERBOSE",s[s.ALL=9999]="ALL",s}(r||{})},55561:(vt,I,f)=>{"use strict";f.r(I),f.d(I,{DiagConsoleLogger:()=>_,DiagLogLevel:()=>g.u,INVALID_SPANID:()=>ie.w9,INVALID_SPAN_CONTEXT:()=>ie.dM,INVALID_TRACEID:()=>ie.RH,ProxyTracer:()=>k.y,ProxyTracerProvider:()=>$.n,ROOT_CONTEXT:()=>s.l,SamplingDecision:()=>ne.i,SpanKind:()=>te.v,SpanStatusCode:()=>Z.s,TraceFlags:()=>se.X,ValueType:()=>O,baggageEntryMetadataFromString:()=>r.B,context:()=>K._,createContextKey:()=>s.n,createNoopMeter:()=>U,createTraceState:()=>Le,default:()=>lt,defaultTextMapGetter:()=>F.q,defaultTextMapSetter:()=>F.U,diag:()=>ce.s,isSpanContextValid:()=>Xe.YA,isValidSpanId:()=>Xe.wN,isValidTraceId:()=>Xe.hX,metrics:()=>Rt,propagation:()=>_t.$,trace:()=>Ae.u});var r=f(44588),s=f(24773),v=[{n:"error",c:"error"},{n:"warn",c:"warn"},{n:"info",c:"info"},{n:"debug",c:"debug"},{n:"verbose",c:"trace"}],_=function(){return function Ze(){function yt(kn){return function(){for(var Wt=[],rn=0;rn512||(this._internalState=yt.split(",").reverse().reduce(function(un,kn){var Wt=kn.trim(),rn=Wt.indexOf("=");if(-1!==rn){var zt=Wt.slice(0,rn),dn=Wt.slice(rn+1,kn.length);(function W(Ze){return we.test(Ze)})(zt)&&function ee(Ze){return q.test(Ze)&&!J.test(Ze)}(dn)&&un.set(zt,dn)}return un},new Map),this._internalState.size>32&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,32))))},Ze.prototype._keys=function(){return Array.from(this._internalState.keys()).reverse()},Ze.prototype._clone=function(){var yt=new Ze;return yt._internalState=new Map(this._internalState),yt},Ze}();function Le(Ze){return new ye(Ze)}var Xe=f(63051),ie=f(99652),K=f(33784),ce=f(40698),Oe=new(function(){function Ze(){}return Ze.prototype.getMeter=function(yt,un,kn){return P},Ze}()),Ie=f(95727),ht=f(14051),Fe="metrics",Rt=function(){function Ze(){}return Ze.getInstance=function(){return this._instance||(this._instance=new Ze),this._instance},Ze.prototype.setGlobalMeterProvider=function(yt){return(0,Ie.$G)(Fe,yt,ht.K.instance())},Ze.prototype.getMeterProvider=function(){return(0,Ie.mS)(Fe)||Oe},Ze.prototype.getMeter=function(yt,un,kn){return this.getMeterProvider().getMeter(yt,un,kn)},Ze.prototype.disable=function(){(0,Ie.kv)(Fe,ht.K.instance())},Ze}().getInstance(),_t=f(35475),Ae=f(92414);const lt={context:K._,diag:ce.s,metrics:Rt,propagation:_t.$,trace:Ae.u}},95727:(vt,I,f)=>{"use strict";f.d(I,{mS:()=>y,$G:()=>M,kv:()=>b});var r="object"==typeof globalThis?globalThis:"object"==typeof self?self:"object"==typeof window?window:"object"==typeof global?global:{},s="1.4.1",v=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/,g=function _(c){var i=new Set([c]),h=new Set,A=c.match(v);if(!A)return function(){return!1};var P_major=+A[1],P_minor=+A[2],P_patch=+A[3];if(null!=A[4])return function(re){return re===c};function V(j){return h.add(j),!1}function B(j){return i.add(j),!0}return function(re){if(i.has(re))return!0;if(h.has(re))return!1;var z=re.match(v);if(!z)return V(re);var H_minor=+z[2],H_patch=+z[3];return null!=z[4]||P_major!==+z[1]?V(re):0===P_major?P_minor===H_minor&&P_patch<=H_patch?B(re):V(re):P_minor<=H_minor?B(re):V(re)}}(s),E=s.split(".")[0],T=Symbol.for("opentelemetry.js.api."+E),x=r;function M(c,i,h,A){var P;void 0===A&&(A=!1);var V=x[T]=null!==(P=x[T])&&void 0!==P?P:{version:s};if(!A&&V[c]){var B=new Error("@opentelemetry/api: Attempted duplicate registration of API: "+c);return h.error(B.stack||B.message),!1}return V.version!==s?(B=new Error("@opentelemetry/api: Registration of version v"+V.version+" for "+c+" does not match previously registered API v"+s),h.error(B.stack||B.message),!1):(V[c]=i,h.debug("@opentelemetry/api: Registered a global for "+c+" v"+s+"."),!0)}function y(c){var i,h,A=null===(i=x[T])||void 0===i?void 0:i.version;if(A&&g(A))return null===(h=x[T])||void 0===h?void 0:h[c]}function b(c,i){i.debug("@opentelemetry/api: Unregistering a global for "+c+" v"+s+".");var h=x[T];h&&delete h[c]}},35475:(vt,I,f)=>{"use strict";f.d(I,{$:()=>P});var r=f(95727),s=function(){function V(){}return V.prototype.inject=function(B,j){},V.prototype.extract=function(B,j){return B},V.prototype.fields=function(){return[]},V}(),v=f(84877),_=f(18839),E=(0,f(24773).n)("OpenTelemetry Baggage Key");function T(V){return V.getValue(E)||void 0}function x(){return T(_._.getInstance().active())}function M(V,B){return V.setValue(E,B)}function y(V){return V.deleteValue(E)}var b=f(44588),c=f(14051),i="propagation",h=new s,P=function(){function V(){this.createBaggage=b.L,this.getBaggage=T,this.getActiveBaggage=x,this.setBaggage=M,this.deleteBaggage=y}return V.getInstance=function(){return this._instance||(this._instance=new V),this._instance},V.prototype.setGlobalPropagator=function(B){return(0,r.$G)(i,B,c.K.instance())},V.prototype.inject=function(B,j,re){return void 0===re&&(re=v.U),this._getGlobalPropagator().inject(B,j,re)},V.prototype.extract=function(B,j,re){return void 0===re&&(re=v.q),this._getGlobalPropagator().extract(B,j,re)},V.prototype.fields=function(){return this._getGlobalPropagator().fields()},V.prototype.disable=function(){(0,r.kv)(i,c.K.instance())},V.prototype._getGlobalPropagator=function(){return(0,r.mS)(i)||h},V}().getInstance()},84877:(vt,I,f)=>{"use strict";f.d(I,{U:()=>s,q:()=>r});var r={get:function(v,_){if(null!=v)return v[_]},keys:function(v){return null==v?[]:Object.keys(v)}},s={set:function(v,_,g){null!=v&&(v[_]=g)}}},92414:(vt,I,f)=>{"use strict";f.d(I,{u:()=>x});var r=f(95727),s=f(17409),v=f(63051),_=f(54551),g=f(14051),E="trace",x=function(){function M(){this._proxyTracerProvider=new s.n,this.wrapSpanContext=v.IP,this.isSpanContextValid=v.YA,this.deleteSpan=_.EW,this.getSpan=_.fU,this.getActiveSpan=_.Bk,this.getSpanContext=_.w8,this.setSpan=_.Bx,this.setSpanContext=_.g_}return M.getInstance=function(){return this._instance||(this._instance=new M),this._instance},M.prototype.setGlobalTracerProvider=function(y){var b=(0,r.$G)(E,this._proxyTracerProvider,g.K.instance());return b&&this._proxyTracerProvider.setDelegate(y),b},M.prototype.getTracerProvider=function(){return(0,r.mS)(E)||this._proxyTracerProvider},M.prototype.getTracer=function(y,b){return this.getTracerProvider().getTracer(y,b)},M.prototype.disable=function(){(0,r.kv)(E,g.K.instance()),this._proxyTracerProvider=new s.n},M}().getInstance()},38252:(vt,I,f)=>{"use strict";f.d(I,{d:()=>s});var r=f(99652),s=function(){function v(_){void 0===_&&(_=r.dM),this._spanContext=_}return v.prototype.spanContext=function(){return this._spanContext},v.prototype.setAttribute=function(_,g){return this},v.prototype.setAttributes=function(_){return this},v.prototype.addEvent=function(_,g){return this},v.prototype.setStatus=function(_){return this},v.prototype.updateName=function(_){return this},v.prototype.end=function(_){},v.prototype.isRecording=function(){return!1},v.prototype.recordException=function(_,g){},v}()},31799:(vt,I,f)=>{"use strict";f.d(I,{o:()=>E});var r=f(18839),s=f(54551),v=f(38252),_=f(63051),g=r._.getInstance(),E=function(){function x(){}return x.prototype.startSpan=function(M,y,b){if(void 0===b&&(b=g.active()),null!=y&&y.root)return new v.d;var i=b&&(0,s.w8)(b);return function T(x){return"object"==typeof x&&"string"==typeof x.spanId&&"string"==typeof x.traceId&&"number"==typeof x.traceFlags}(i)&&(0,_.YA)(i)?new v.d(i):new v.d},x.prototype.startActiveSpan=function(M,y,b,c){var i,h,A;if(!(arguments.length<2)){2===arguments.length?A=y:3===arguments.length?(i=y,A=b):(i=y,h=b,A=c);var P=null!=h?h:g.active(),V=this.startSpan(M,i,P),B=(0,s.Bx)(P,V);return g.with(B,A,void 0,V)}},x}()},62069:(vt,I,f)=>{"use strict";f.d(I,{y:()=>v});var s=new(f(31799).o),v=function(){function _(g,E,T,x){this._provider=g,this.name=E,this.version=T,this.options=x}return _.prototype.startSpan=function(g,E,T){return this._getTracer().startSpan(g,E,T)},_.prototype.startActiveSpan=function(g,E,T,x){var M=this._getTracer();return Reflect.apply(M.startActiveSpan,M,arguments)},_.prototype._getTracer=function(){if(this._delegate)return this._delegate;var g=this._provider.getDelegateTracer(this.name,this.version,this.options);return g?(this._delegate=g,this._delegate):s},_}()},17409:(vt,I,f)=>{"use strict";f.d(I,{n:()=>g});var r=f(62069),s=f(31799),_=new(function(){function E(){}return E.prototype.getTracer=function(T,x,M){return new s.o},E}()),g=function(){function E(){}return E.prototype.getTracer=function(T,x,M){var y;return null!==(y=this.getDelegateTracer(T,x,M))&&void 0!==y?y:new r.y(this,T,x,M)},E.prototype.getDelegate=function(){var T;return null!==(T=this._delegate)&&void 0!==T?T:_},E.prototype.setDelegate=function(T){this._delegate=T},E.prototype.getDelegateTracer=function(T,x,M){var y;return null===(y=this._delegate)||void 0===y?void 0:y.getTracer(T,x,M)},E}()},42710:(vt,I,f)=>{"use strict";f.d(I,{i:()=>r});var r=function(s){return s[s.NOT_RECORD=0]="NOT_RECORD",s[s.RECORD=1]="RECORD",s[s.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED",s}(r||{})},54551:(vt,I,f)=>{"use strict";f.d(I,{Bk:()=>E,Bx:()=>T,EW:()=>x,fU:()=>g,g_:()=>M,w8:()=>y});var r=f(24773),s=f(38252),v=f(18839),_=(0,r.n)("OpenTelemetry Context Key SPAN");function g(b){return b.getValue(_)||void 0}function E(){return g(v._.getInstance().active())}function T(b,c){return b.setValue(_,c)}function x(b){return b.deleteValue(_)}function M(b,c){return T(b,new s.d(c))}function y(b){var c;return null===(c=g(b))||void 0===c?void 0:c.spanContext()}},99652:(vt,I,f)=>{"use strict";f.d(I,{RH:()=>v,dM:()=>_,w9:()=>s});var r=f(57585),s="0000000000000000",v="00000000000000000000000000000000",_={traceId:v,spanId:s,traceFlags:r.X.NONE}},23431:(vt,I,f)=>{"use strict";f.d(I,{v:()=>r});var r=function(s){return s[s.INTERNAL=0]="INTERNAL",s[s.SERVER=1]="SERVER",s[s.CLIENT=2]="CLIENT",s[s.PRODUCER=3]="PRODUCER",s[s.CONSUMER=4]="CONSUMER",s}(r||{})},63051:(vt,I,f)=>{"use strict";f.d(I,{IP:()=>x,YA:()=>T,hX:()=>g,wN:()=>E});var r=f(99652),s=f(38252),v=/^([0-9a-f]{32})$/i,_=/^[0-9a-f]{16}$/i;function g(M){return v.test(M)&&M!==r.RH}function E(M){return _.test(M)&&M!==r.w9}function T(M){return g(M.traceId)&&E(M.spanId)}function x(M){return new s.d(M)}},75376:(vt,I,f)=>{"use strict";f.d(I,{s:()=>r});var r=function(s){return s[s.UNSET=0]="UNSET",s[s.OK=1]="OK",s[s.ERROR=2]="ERROR",s}(r||{})},57585:(vt,I,f)=>{"use strict";f.d(I,{X:()=>r});var r=function(s){return s[s.NONE=0]="NONE",s[s.SAMPLED=1]="SAMPLED",s}(r||{})},14525:(vt,I,f)=>{"use strict";f.d(I,{T:()=>_});var r=f(24773),v="OT_ZONE_CONTEXT",_=function(){function g(){this._enabled=!1,this._zoneCounter=0}return g.prototype._activeContextFromZone=function(E){return E&&E.get(v)||r.l},g.prototype._bindFunction=function(E,T){var x=this,M=function(){for(var y=this,b=[],c=0;c{"use strict";f.r(I),f.d(I,{ZoneContextManager:()=>r.T});var r=f(14525)},99200:(vt,I,f)=>{"use strict";f.d(I,{V:()=>r});var r=function(s){return s[s.SUCCESS=0]="SUCCESS",s[s.FAILED=1]="FAILED",s}(r||{})},93267:(vt,I,f)=>{"use strict";f.d(I,{EC:()=>v,KV:()=>E,QC:()=>g,hN:()=>s,kI:()=>T,r_:()=>_,un:()=>r});var r="=",s=";",v=",",_="baggage",g=180,E=4096,T=8192},9113:(vt,I,f)=>{"use strict";f.d(I,{t:()=>g});var r=f(35475),s=f(10857),v=f(93267),_=f(11907),g=function(){function E(){}return E.prototype.inject=function(T,x,M){var y=r.$.getBaggage(T);if(y&&!(0,s.Zf)(T)){var b=(0,_.getKeyPairs)(y).filter(function(i){return i.length<=v.KV}).slice(0,v.QC),c=(0,_.serializeKeyPairs)(b);c.length>0&&M.set(x,v.r_,c)}},E.prototype.extract=function(T,x,M){var y=M.get(x,v.r_),b=Array.isArray(y)?y.join(v.EC):y;if(!b)return T;var c={};return 0===b.length?T:(b.split(v.EC).forEach(function(h){var A=(0,_.parsePairKeyValue)(h);if(A){var P={value:A.value};A.metadata&&(P.metadata=A.metadata),c[A.key]=P}}),0===Object.entries(c).length?T:r.$.setBaggage(T,r.$.createBaggage(c)))},E.prototype.fields=function(){return[v.r_]},E}()},11907:(vt,I,f)=>{"use strict";f.r(I),f.d(I,{getKeyPairs:()=>g,parseKeyPairsIntoRecord:()=>T,parsePairKeyValue:()=>E,serializeKeyPairs:()=>_});var r=f(44588),s=f(93267),v=function(x,M){var y="function"==typeof Symbol&&x[Symbol.iterator];if(!y)return x;var c,h,b=y.call(x),i=[];try{for(;(void 0===M||M-- >0)&&!(c=b.next()).done;)i.push(c.value)}catch(A){h={error:A}}finally{try{c&&!c.done&&(y=b.return)&&y.call(b)}finally{if(h)throw h.error}}return i};function _(x){return x.reduce(function(M,y){var b=""+M+(""!==M?s.EC:"")+y;return b.length>s.kI?M:b},"")}function g(x){return x.getAllEntries().map(function(M){var y=v(M,2),c=y[1],i=encodeURIComponent(y[0])+"="+encodeURIComponent(c.value);return void 0!==c.metadata&&(i+=s.hN+c.metadata.toString()),i})}function E(x){var M=x.split(s.hN);if(!(M.length<=0)){var y=M.shift();if(y){var b=y.indexOf(s.un);if(!(b<=0)){var h,c=decodeURIComponent(y.substring(0,b).trim()),i=decodeURIComponent(y.substring(b+1).trim());return M.length>0&&(h=(0,r.B)(M.join(s.hN))),{key:c,value:i,metadata:h}}}}}function T(x){return"string"!=typeof x||0===x.length?{}:x.split(s.EC).map(function(M){return E(M)}).filter(function(M){return void 0!==M&&M.value.length>0}).reduce(function(M,y){return M[y.key]=y.value,M},{})}},58312:(vt,I,f)=>{"use strict";f.d(I,{L:()=>_,m:()=>E,oU:()=>g});var r=f(40698),s=function(M){var y="function"==typeof Symbol&&Symbol.iterator,b=y&&M[y],c=0;if(b)return b.call(M);if(M&&"number"==typeof M.length)return{next:function(){return M&&c>=M.length&&(M=void 0),{value:M&&M[c++],done:!M}}};throw new TypeError(y?"Object is not iterable.":"Symbol.iterator is not defined.")},v=function(M,y){var b="function"==typeof Symbol&&M[Symbol.iterator];if(!b)return M;var i,A,c=b.call(M),h=[];try{for(;(void 0===y||y-- >0)&&!(i=c.next()).done;)h.push(i.value)}catch(P){A={error:P}}finally{try{i&&!i.done&&(b=c.return)&&b.call(c)}finally{if(A)throw A.error}}return h};function _(M){var y,b,c={};if("object"!=typeof M||null==M)return c;try{for(var i=s(Object.entries(M)),h=i.next();!h.done;h=i.next()){var A=v(h.value,2),P=A[0],V=A[1];g(P)?E(V)?c[P]=Array.isArray(V)?V.slice():V:r.s.warn("Invalid attribute value set for key: "+P):r.s.warn("Invalid attribute key: "+P)}}catch(B){y={error:B}}finally{try{h&&!h.done&&(b=i.return)&&b.call(i)}finally{if(y)throw y.error}}return c}function g(M){return"string"==typeof M&&M.length>0}function E(M){return null==M||(Array.isArray(M)?function T(M){var y,b,c;try{for(var i=s(M),h=i.next();!h.done;h=i.next()){var A=h.value;if(null!=A){if(!c){if(x(A)){c=typeof A;continue}return!1}if(typeof A!==c)return!1}}}catch(P){y={error:P}}finally{try{h&&!h.done&&(b=i.return)&&b.call(i)}finally{if(y)throw y.error}}return!0}(M):x(M))}function x(M){switch(typeof M){case"number":case"boolean":case"string":return!0}return!1}},70440:(vt,I,f)=>{"use strict";f.d(I,{s:()=>_,u:()=>v});var s=(0,f(106).o)();function v(g){s=g}function _(g){try{s(g)}catch{}}},2776:(vt,I,f)=>{"use strict";function r(v){return v>=48&&v<=57?v-48:v>=97&&v<=102?v-87:v-55}function s(v){for(var _=new Uint8Array(v.length/2),g=0,E=0;Es})},106:(vt,I,f)=>{"use strict";f.d(I,{o:()=>s});var r=f(40698);function s(){return function(g){r.s.error(function v(g){return"string"==typeof g?g:JSON.stringify(function _(g){for(var E={},T=g;null!==T;)Object.getOwnPropertyNames(T).forEach(function(x){if(!E[x]){var M=T[x];M&&(E[x]=String(M))}}),T=Object.getPrototypeOf(T);return E}(g))}(g))}}},1119:(vt,I,f)=>{"use strict";f.d(I,{Ir:()=>P,JU:()=>i,KJ:()=>M,VL:()=>A,W5:()=>y,_5:()=>x,lg:()=>E,mw:()=>V,tq:()=>b,u5:()=>c,uc:()=>T,w_:()=>h});var r=f(52246),s=9,_=Math.pow(10,6),g=Math.pow(10,s);function E(B){return[Math.trunc(B/1e3),Math.round(B%1e3*_)]}function T(){var B=r.u.timeOrigin;if("number"!=typeof B){var j=r.u;B=j.timing&&j.timing.fetchStart}return B}function x(B){return V(E(T()),E("number"==typeof B?B:r.u.now()))}function M(B){if(A(B))return B;if("number"==typeof B)return B=g&&(re[1]-=g,re[0]+=1),re}},21902:(vt,I,f)=>{"use strict";f.r(I),f.d(I,{AlwaysOffSampler:()=>fe,AlwaysOnSampler:()=>Se,AnchoredClock:()=>s,BindOnceFuture:()=>ce.I,CompositePropagator:()=>U.n,DEFAULT_ATTRIBUTE_COUNT_LIMIT:()=>ae.fv,DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT:()=>ae.aE,DEFAULT_ENVIRONMENT:()=>ae.Uz,DEFAULT_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT:()=>ae.h9,DEFAULT_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT:()=>ae.V,ExportResultCode:()=>x.V,ParentBasedSampler:()=>J,RPCType:()=>$,RandomIdGenerator:()=>V,SDK_INFO:()=>z.q,TRACE_PARENT_HEADER:()=>O.ZS,TRACE_STATE_HEADER:()=>O.UD,TimeoutError:()=>Le,TraceIdRatioBasedSampler:()=>W,TraceState:()=>X.n,TracesSamplerValues:()=>Pe.R,VERSION:()=>ge.x,W3CBaggagePropagator:()=>r.t,W3CTraceContextPropagator:()=>O.lm,_globalThis:()=>b.X,addHrTimes:()=>E.mw,baggageUtils:()=>M,callWithTimeout:()=>Xe,deleteRPCMetadata:()=>te,getEnv:()=>y._,getEnvWithoutDefaults:()=>y.w,getRPCMetadata:()=>Z,getTimeOrigin:()=>E.uc,globalErrorHandler:()=>_.s,hexToBase64:()=>h,hexToBinary:()=>T.Q,hrTime:()=>E._5,hrTimeDuration:()=>E.W5,hrTimeToMicroseconds:()=>E.w_,hrTimeToMilliseconds:()=>E.JU,hrTimeToNanoseconds:()=>E.u5,hrTimeToTimeStamp:()=>E.tq,internal:()=>ht,isAttributeKey:()=>v.oU,isAttributeValue:()=>v.m,isTimeInput:()=>E.Ir,isTimeInputHrTime:()=>E.VL,isTracingSuppressed:()=>ee.Zf,isUrlIgnored:()=>ie.K,isWrapped:()=>K,loggingErrorHandler:()=>g.o,merge:()=>de.h,millisToHrTime:()=>E.lg,otperformance:()=>re.u,parseEnvironment:()=>ae.Nq,parseTraceParent:()=>O.ZI,sanitizeAttributes:()=>v.L,setGlobalErrorHandler:()=>_.u,setRPCMetadata:()=>ne,suppressTracing:()=>ee.M1,timeInputToHrTime:()=>E.KJ,unrefTimer:()=>H.K,unsuppressTracing:()=>ee.FU,urlMatches:()=>ie.f});var r=f(9113),s=function(){function Fe(et,Rt){this._monotonicClock=Rt,this._epochMillis=et.now(),this._performanceMillis=Rt.now()}return Fe.prototype.now=function(){var et=this._monotonicClock.now()-this._performanceMillis;return this._epochMillis+et},Fe}(),v=f(58312),_=f(70440),g=f(106),E=f(1119),T=f(2776),x=f(99200),M=f(11907),y=f(75701),b=f(321),c=function(Fe,et){var Rt="function"==typeof Symbol&&Fe[Symbol.iterator];if(!Rt)return Fe;var Ae,Ze,_t=Rt.call(Fe),lt=[];try{for(;(void 0===et||et-- >0)&&!(Ae=_t.next()).done;)lt.push(Ae.value)}catch(yt){Ze={error:yt}}finally{try{Ae&&!Ae.done&&(Rt=_t.return)&&Rt.call(_t)}finally{if(Ze)throw Ze.error}}return lt},i=function(Fe,et,Rt){if(Rt||2===arguments.length)for(var lt,_t=0,Ae=et.length;_t=58&&(B[Rt]+=39);return String.fromCharCode.apply(null,B.slice(0,2*Fe))}}var re=f(52246),z=f(91085),H=f(60554),U=f(76181),O=f(90775),k=(0,f(24773).n)("OpenTelemetry SDK Context Key RPC_METADATA"),$=function(Fe){return Fe.HTTP="http",Fe}($||{});function ne(Fe,et){return Fe.setValue(k,et)}function te(Fe){return Fe.deleteValue(k)}function Z(Fe){return Fe.getValue(k)}var se=f(42710),fe=function(){function Fe(){}return Fe.prototype.shouldSample=function(){return{decision:se.i.NOT_RECORD}},Fe.prototype.toString=function(){return"AlwaysOffSampler"},Fe}(),Se=function(){function Fe(){}return Fe.prototype.shouldSample=function(){return{decision:se.i.RECORD_AND_SAMPLED}},Fe.prototype.toString=function(){return"AlwaysOnSampler"},Fe}(),pe=f(92414),we=f(63051),q=f(57585),J=function(){function Fe(et){var Rt,_t,Ae,lt;this._root=et.root,this._root||((0,_.s)(new Error("ParentBasedSampler must have a root sampler configured")),this._root=new Se),this._remoteParentSampled=null!==(Rt=et.remoteParentSampled)&&void 0!==Rt?Rt:new Se,this._remoteParentNotSampled=null!==(_t=et.remoteParentNotSampled)&&void 0!==_t?_t:new fe,this._localParentSampled=null!==(Ae=et.localParentSampled)&&void 0!==Ae?Ae:new Se,this._localParentNotSampled=null!==(lt=et.localParentNotSampled)&&void 0!==lt?lt:new fe}return Fe.prototype.shouldSample=function(et,Rt,_t,Ae,lt,Ze){var yt=pe.u.getSpanContext(et);return yt&&(0,we.YA)(yt)?yt.isRemote?yt.traceFlags&q.X.SAMPLED?this._remoteParentSampled.shouldSample(et,Rt,_t,Ae,lt,Ze):this._remoteParentNotSampled.shouldSample(et,Rt,_t,Ae,lt,Ze):yt.traceFlags&q.X.SAMPLED?this._localParentSampled.shouldSample(et,Rt,_t,Ae,lt,Ze):this._localParentNotSampled.shouldSample(et,Rt,_t,Ae,lt,Ze):this._root.shouldSample(et,Rt,_t,Ae,lt,Ze)},Fe.prototype.toString=function(){return"ParentBased{root="+this._root.toString()+", remoteParentSampled="+this._remoteParentSampled.toString()+", remoteParentNotSampled="+this._remoteParentNotSampled.toString()+", localParentSampled="+this._localParentSampled.toString()+", localParentNotSampled="+this._localParentNotSampled.toString()+"}"},Fe}(),W=function(){function Fe(et){void 0===et&&(et=0),this._ratio=et,this._ratio=this._normalize(et),this._upperBound=Math.floor(4294967295*this._ratio)}return Fe.prototype.shouldSample=function(et,Rt){return{decision:(0,we.hX)(Rt)&&this._accumulate(Rt)=1?1:et<=0?0:et},Fe.prototype._accumulate=function(et){for(var Rt=0,_t=0;_t>>0}return Rt},Fe}(),ee=f(10857),X=f(36542),ae=f(98828),de=f(92848),Pe=f(26056),ye=function(){var Fe=function(et,Rt){return(Fe=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(_t,Ae){_t.__proto__=Ae}||function(_t,Ae){for(var lt in Ae)Object.prototype.hasOwnProperty.call(Ae,lt)&&(_t[lt]=Ae[lt])})(et,Rt)};return function(et,Rt){if("function"!=typeof Rt&&null!==Rt)throw new TypeError("Class extends value "+String(Rt)+" is not a constructor or null");function _t(){this.constructor=et}Fe(et,Rt),et.prototype=null===Rt?Object.create(Rt):(_t.prototype=Rt.prototype,new _t)}}(),Le=function(Fe){function et(Rt){var _t=Fe.call(this,Rt)||this;return Object.setPrototypeOf(_t,et.prototype),_t}return ye(et,Fe),et}(Error);function Xe(Fe,et){var Rt,_t=new Promise(function(lt,Ze){Rt=setTimeout(function(){Ze(new Le("Operation timed out."))},et)});return Promise.race([Fe,_t]).then(function(Ae){return clearTimeout(Rt),Ae},function(Ae){throw clearTimeout(Rt),Ae})}var ie=f(28280);function K(Fe){return"function"==typeof Fe&&"function"==typeof Fe.__original&&"function"==typeof Fe.__unwrap&&!0===Fe.__wrapped}var ce=f(25578),ge=f(37079),Oe=f(33784),ht={_export:function Ie(Fe,et){return new Promise(function(Rt){Oe._.with((0,ee.M1)(Oe._.active()),function(){Fe.export(et,function(_t){Rt(_t)})})})}}},75701:(vt,I,f)=>{"use strict";f.d(I,{_:()=>v,w:()=>_});var r=f(98828),s=f(321);function v(){var g=(0,r.Nq)(s.X);return Object.assign({},r.Uz,g)}function _(){return(0,r.Nq)(s.X)}},321:(vt,I,f)=>{"use strict";f.d(I,{X:()=>r});var r="object"==typeof globalThis?globalThis:"object"==typeof self?self:"object"==typeof window?window:"object"==typeof global?global:{}},52246:(vt,I,f)=>{"use strict";f.d(I,{u:()=>r});var r=performance},91085:(vt,I,f)=>{"use strict";f.d(I,{q:()=>_});var v,r=f(37079),s=f(23413),_=((v={})[s._2.TELEMETRY_SDK_NAME]="opentelemetry",v[s._2.PROCESS_RUNTIME_NAME]="browser",v[s._2.TELEMETRY_SDK_LANGUAGE]=s.wP.WEBJS,v[s._2.TELEMETRY_SDK_VERSION]=r.x,v)},60554:(vt,I,f)=>{"use strict";function r(s){}f.d(I,{K:()=>r})},76181:(vt,I,f)=>{"use strict";f.d(I,{n:()=>v});var r=f(40698),v=function(){function _(g){var E;void 0===g&&(g={}),this._propagators=null!==(E=g.propagators)&&void 0!==E?E:[],this._fields=Array.from(new Set(this._propagators.map(function(T){return"function"==typeof T.fields?T.fields():[]}).reduce(function(T,x){return T.concat(x)},[])))}return _.prototype.inject=function(g,E,T){var x,M;try{for(var y=function(_){var g="function"==typeof Symbol&&Symbol.iterator,E=g&&_[g],T=0;if(E)return E.call(_);if(_&&"number"==typeof _.length)return{next:function(){return _&&T>=_.length&&(_=void 0),{value:_&&_[T++],done:!_}}};throw new TypeError(g?"Object is not iterable.":"Symbol.iterator is not defined.")}(this._propagators),b=y.next();!b.done;b=y.next()){var c=b.value;try{c.inject(g,E,T)}catch(i){r.s.warn("Failed to inject with "+c.constructor.name+". Err: "+i.message)}}}catch(i){x={error:i}}finally{try{b&&!b.done&&(M=y.return)&&M.call(y)}finally{if(x)throw x.error}}},_.prototype.extract=function(g,E,T){return this._propagators.reduce(function(x,M){try{return M.extract(x,E,T)}catch(y){r.s.warn("Failed to inject with "+M.constructor.name+". Err: "+y.message)}return x},g)},_.prototype.fields=function(){return this._fields.slice()},_}()},36542:(vt,I,f)=>{"use strict";f.d(I,{n:()=>i});var r="[_0-9a-z-*/]",_=new RegExp("^(?:[a-z]"+r+"{0,255}|[a-z0-9]"+r+"{0,240}@[a-z]"+r+"{0,13})$"),g=/^[ -~]{0,255}[!-~]$/,E=/,|=/,i=function(){function h(A){this._internalState=new Map,A&&this._parse(A)}return h.prototype.set=function(A,P){var V=this._clone();return V._internalState.has(A)&&V._internalState.delete(A),V._internalState.set(A,P),V},h.prototype.unset=function(A){var P=this._clone();return P._internalState.delete(A),P},h.prototype.get=function(A){return this._internalState.get(A)},h.prototype.serialize=function(){var A=this;return this._keys().reduce(function(P,V){return P.push(V+"="+A.get(V)),P},[]).join(",")},h.prototype._parse=function(A){A.length>512||(this._internalState=A.split(",").reverse().reduce(function(P,V){var B=V.trim(),j=B.indexOf("=");if(-1!==j){var re=B.slice(0,j),z=B.slice(j+1,V.length);(function T(h){return _.test(h)})(re)&&function x(h){return g.test(h)&&!E.test(h)}(z)&&P.set(re,z)}return P},new Map),this._internalState.size>32&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,32))))},h.prototype._keys=function(){return Array.from(this._internalState.keys()).reverse()},h.prototype._clone=function(){var A=new h;return A._internalState=new Map(this._internalState),A},h}()},90775:(vt,I,f)=>{"use strict";f.d(I,{UD:()=>T,ZI:()=>h,ZS:()=>E,lm:()=>A});var r=f(92414),s=f(63051),v=f(57585),_=f(10857),g=f(36542),E="traceparent",T="tracestate",i=new RegExp("^\\s?((?!ff)[\\da-f]{2})-((?![0]{32})[\\da-f]{32})-((?![0]{16})[\\da-f]{16})-([\\da-f]{2})(-.*)?\\s?$");function h(P){var V=i.exec(P);return!V||"00"===V[1]&&V[5]?null:{traceId:V[2],spanId:V[3],traceFlags:parseInt(V[4],16)}}var A=function(){function P(){}return P.prototype.inject=function(V,B,j){var re=r.u.getSpanContext(V);if(re&&!(0,_.Zf)(V)&&(0,s.YA)(re)){var z="00-"+re.traceId+"-"+re.spanId+"-0"+Number(re.traceFlags||v.X.NONE).toString(16);j.set(B,E,z),re.traceState&&j.set(B,T,re.traceState.serialize())}},P.prototype.extract=function(V,B,j){var re=j.get(B,E);if(!re)return V;var z=Array.isArray(re)?re[0]:re;if("string"!=typeof z)return V;var H=h(z);if(!H)return V;H.isRemote=!0;var U=j.get(B,T);if(U){var O=Array.isArray(U)?U.join(","):U;H.traceState=new g.n("string"==typeof O?O:void 0)}return r.u.setSpanContext(V,H)},P.prototype.fields=function(){return[E,T]},P}()},10857:(vt,I,f)=>{"use strict";f.d(I,{FU:()=>_,M1:()=>v,Zf:()=>g});var s=(0,f(24773).n)("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function v(E){return E.setValue(s,!0)}function _(E){return E.deleteValue(s)}function g(E){return!0===E.getValue(s)}},25578:(vt,I,f)=>{"use strict";f.d(I,{I:()=>_});var r=function(){function g(){var E=this;this._promise=new Promise(function(T,x){E._resolve=T,E._reject=x})}return Object.defineProperty(g.prototype,"promise",{get:function(){return this._promise},enumerable:!1,configurable:!0}),g.prototype.resolve=function(E){this._resolve(E)},g.prototype.reject=function(E){this._reject(E)},g}(),_=function(){function g(E,T){this._callback=E,this._that=T,this._isCalled=!1,this._deferred=new r}return Object.defineProperty(g.prototype,"isCalled",{get:function(){return this._isCalled},enumerable:!1,configurable:!0}),Object.defineProperty(g.prototype,"promise",{get:function(){return this._deferred.promise},enumerable:!1,configurable:!0}),g.prototype.call=function(){for(var E,T=this,x=[],M=0;M0)&&!(M=x.next()).done;)y.push(M.value)}catch(c){b={error:c}}finally{try{M&&!M.done&&(T=x.return)&&T.call(x)}finally{if(b)throw b.error}}return y}(x),!1))).then(function(y){return T._deferred.resolve(y)},function(y){return T._deferred.reject(y)})}catch(y){this._deferred.reject(y)}}return this._deferred.promise},g}()},98828:(vt,I,f)=>{"use strict";f.d(I,{Nq:()=>re,Uz:()=>h,V:()=>i,aE:()=>y,fv:()=>b,h9:()=>c});var r=f(56737),s=f(26056),v=",",_=["OTEL_SDK_DISABLED"];function g(z){return _.indexOf(z)>-1}var E=["OTEL_BSP_EXPORT_TIMEOUT","OTEL_BSP_MAX_EXPORT_BATCH_SIZE","OTEL_BSP_MAX_QUEUE_SIZE","OTEL_BSP_SCHEDULE_DELAY","OTEL_BLRP_EXPORT_TIMEOUT","OTEL_BLRP_MAX_EXPORT_BATCH_SIZE","OTEL_BLRP_MAX_QUEUE_SIZE","OTEL_BLRP_SCHEDULE_DELAY","OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_ATTRIBUTE_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT","OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT","OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT","OTEL_SPAN_EVENT_COUNT_LIMIT","OTEL_SPAN_LINK_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT","OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT","OTEL_EXPORTER_OTLP_TIMEOUT","OTEL_EXPORTER_OTLP_TRACES_TIMEOUT","OTEL_EXPORTER_OTLP_METRICS_TIMEOUT","OTEL_EXPORTER_OTLP_LOGS_TIMEOUT","OTEL_EXPORTER_JAEGER_AGENT_PORT"];function T(z){return E.indexOf(z)>-1}var x=["OTEL_NO_PATCH_MODULES","OTEL_PROPAGATORS"];function M(z){return x.indexOf(z)>-1}var y=1/0,b=128,c=128,i=128,h={OTEL_SDK_DISABLED:!1,CONTAINER_NAME:"",ECS_CONTAINER_METADATA_URI_V4:"",ECS_CONTAINER_METADATA_URI:"",HOSTNAME:"",KUBERNETES_SERVICE_HOST:"",NAMESPACE:"",OTEL_BSP_EXPORT_TIMEOUT:3e4,OTEL_BSP_MAX_EXPORT_BATCH_SIZE:512,OTEL_BSP_MAX_QUEUE_SIZE:2048,OTEL_BSP_SCHEDULE_DELAY:5e3,OTEL_BLRP_EXPORT_TIMEOUT:3e4,OTEL_BLRP_MAX_EXPORT_BATCH_SIZE:512,OTEL_BLRP_MAX_QUEUE_SIZE:2048,OTEL_BLRP_SCHEDULE_DELAY:5e3,OTEL_EXPORTER_JAEGER_AGENT_HOST:"",OTEL_EXPORTER_JAEGER_AGENT_PORT:6832,OTEL_EXPORTER_JAEGER_ENDPOINT:"",OTEL_EXPORTER_JAEGER_PASSWORD:"",OTEL_EXPORTER_JAEGER_USER:"",OTEL_EXPORTER_OTLP_ENDPOINT:"",OTEL_EXPORTER_OTLP_TRACES_ENDPOINT:"",OTEL_EXPORTER_OTLP_METRICS_ENDPOINT:"",OTEL_EXPORTER_OTLP_LOGS_ENDPOINT:"",OTEL_EXPORTER_OTLP_HEADERS:"",OTEL_EXPORTER_OTLP_TRACES_HEADERS:"",OTEL_EXPORTER_OTLP_METRICS_HEADERS:"",OTEL_EXPORTER_OTLP_LOGS_HEADERS:"",OTEL_EXPORTER_OTLP_TIMEOUT:1e4,OTEL_EXPORTER_OTLP_TRACES_TIMEOUT:1e4,OTEL_EXPORTER_OTLP_METRICS_TIMEOUT:1e4,OTEL_EXPORTER_OTLP_LOGS_TIMEOUT:1e4,OTEL_EXPORTER_ZIPKIN_ENDPOINT:"http://localhost:9411/api/v2/spans",OTEL_LOG_LEVEL:r.u.INFO,OTEL_NO_PATCH_MODULES:[],OTEL_PROPAGATORS:["tracecontext","baggage"],OTEL_RESOURCE_ATTRIBUTES:"",OTEL_SERVICE_NAME:"",OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT:y,OTEL_ATTRIBUTE_COUNT_LIMIT:b,OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT:y,OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT:b,OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT:y,OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT:b,OTEL_SPAN_EVENT_COUNT_LIMIT:128,OTEL_SPAN_LINK_COUNT_LIMIT:128,OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT:c,OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT:i,OTEL_TRACES_EXPORTER:"",OTEL_TRACES_SAMPLER:s.R.ParentBasedAlwaysOn,OTEL_TRACES_SAMPLER_ARG:"",OTEL_LOGS_EXPORTER:"",OTEL_EXPORTER_OTLP_INSECURE:"",OTEL_EXPORTER_OTLP_TRACES_INSECURE:"",OTEL_EXPORTER_OTLP_METRICS_INSECURE:"",OTEL_EXPORTER_OTLP_LOGS_INSECURE:"",OTEL_EXPORTER_OTLP_CERTIFICATE:"",OTEL_EXPORTER_OTLP_TRACES_CERTIFICATE:"",OTEL_EXPORTER_OTLP_METRICS_CERTIFICATE:"",OTEL_EXPORTER_OTLP_LOGS_CERTIFICATE:"",OTEL_EXPORTER_OTLP_COMPRESSION:"",OTEL_EXPORTER_OTLP_TRACES_COMPRESSION:"",OTEL_EXPORTER_OTLP_METRICS_COMPRESSION:"",OTEL_EXPORTER_OTLP_LOGS_COMPRESSION:"",OTEL_EXPORTER_OTLP_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_TRACES_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_METRICS_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_LOGS_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_TRACES_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_METRICS_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_LOGS_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_TRACES_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_METRICS_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_LOGS_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE:"cumulative"};function A(z,H,U){if(!(typeof U[z]>"u")){var O=String(U[z]);H[z]="true"===O.toLowerCase()}}function P(z,H,U,O,F){if(void 0===O&&(O=-1/0),void 0===F&&(F=1/0),typeof U[z]<"u"){var k=Number(U[z]);isNaN(k)||(H[z]=kF?F:k)}}function V(z,H,U,O){void 0===O&&(O=v);var F=U[z];"string"==typeof F&&(H[z]=F.split(O).map(function(k){return k.trim()}))}var B={ALL:r.u.ALL,VERBOSE:r.u.VERBOSE,DEBUG:r.u.DEBUG,INFO:r.u.INFO,WARN:r.u.WARN,ERROR:r.u.ERROR,NONE:r.u.NONE};function j(z,H,U){var O=U[z];if("string"==typeof O){var F=B[O.toUpperCase()];null!=F&&(H[z]=F)}}function re(z){var H={};for(var U in h){var O=U;if("OTEL_LOG_LEVEL"===O)j(O,H,z);else if(g(O))A(O,H,z);else if(T(O))P(O,H,z);else if(M(O))V(O,H,z);else{var F=z[O];typeof F<"u"&&null!==F&&(H[O]=String(F))}}return H}},92848:(vt,I,f)=>{"use strict";f.d(I,{h:()=>j});var r="[object Object]",s="[object Null]",v="[object Undefined]",g=Function.prototype.toString,E=g.call(Object),T=function c(ne,te){return function(Z){return ne(te(Z))}}(Object.getPrototypeOf,Object),x=Object.prototype,M=x.hasOwnProperty,y=Symbol?Symbol.toStringTag:void 0,b=x.toString;function i(ne){if(!function h(ne){return null!=ne&&"object"==typeof ne}(ne)||function A(ne){return null==ne?void 0===ne?v:s:y&&y in Object(ne)?function P(ne){var te=M.call(ne,y),Z=ne[y],se=!1;try{ne[y]=void 0,se=!0}catch{}var fe=b.call(ne);return se&&(te?ne[y]=Z:delete ne[y]),fe}(ne):function V(ne){return b.call(ne)}(ne)}(ne)!==r)return!1;var te=T(ne);if(null===te)return!0;var Z=M.call(te,"constructor")&&te.constructor;return"function"==typeof Z&&Z instanceof Z&&g.call(Z)===E}var B=20;function j(){for(var ne=[],te=0;te0;)Z=z(Z,ne.shift(),0,se);return Z}function re(ne){return U(ne)?ne.slice():ne}function z(ne,te,Z,se){var fe;if(void 0===Z&&(Z=0),!(Z>B)){if(Z++,k(ne)||k(te)||O(te))fe=re(te);else if(U(ne)){if(fe=ne.slice(),U(te))for(var Se=0,pe=te.length;Se"u"?delete fe[q]:fe[q]=J;else{var W=fe[q],ee=J;if(H(ne,q,se)||H(te,q,se))delete fe[q];else{if(F(W)&&F(ee)){var X=se.get(W)||[],ae=se.get(ee)||[];X.push({obj:ne,key:q}),ae.push({obj:te,key:q}),se.set(W,X),se.set(ee,ae)}fe[q]=z(fe[q],J,Z,se)}}}}else fe=te;return fe}}function H(ne,te,Z){for(var se=Z.get(ne[te])||[],fe=0,Se=se.length;fe"u"||ne instanceof Date||ne instanceof RegExp||null===ne}},26056:(vt,I,f)=>{"use strict";f.d(I,{R:()=>r});var r=function(s){return s.AlwaysOff="always_off",s.AlwaysOn="always_on",s.ParentBasedAlwaysOff="parentbased_always_off",s.ParentBasedAlwaysOn="parentbased_always_on",s.ParentBasedTraceIdRatio="parentbased_traceidratio",s.TraceIdRatio="traceidratio",s}(r||{})},28280:(vt,I,f)=>{"use strict";f.d(I,{K:()=>v,f:()=>s});var r=function(_){var g="function"==typeof Symbol&&Symbol.iterator,E=g&&_[g],T=0;if(E)return E.call(_);if(_&&"number"==typeof _.length)return{next:function(){return _&&T>=_.length&&(_=void 0),{value:_&&_[T++],done:!_}}};throw new TypeError(g?"Object is not iterable.":"Symbol.iterator is not defined.")};function s(_,g){return"string"==typeof g?_===g:!!_.match(g)}function v(_,g){var E,T;if(!g)return!1;try{for(var x=r(g),M=x.next();!M.done;M=x.next())if(s(_,M.value))return!0}catch(b){E={error:b}}finally{try{M&&!M.done&&(T=x.return)&&T.call(x)}finally{if(E)throw E.error}}return!1}},37079:(vt,I,f)=>{"use strict";f.d(I,{x:()=>r});var r="1.24.1"},25154:(vt,I,f)=>{"use strict";f.r(I),f.d(I,{OTLPTraceExporter:()=>r.Q});var r=f(83594)},83594:(vt,I,f)=>{"use strict";f.d(I,{Q:()=>kn});var r=f(11907),s=f(75701),v=f(40698);function A(Wt,rn){return v.s.warn("Timeout must be greater than 0",Wt),rn}var B=function(Wt){return Wt[Wt.SPANS=0]="SPANS",Wt[Wt.METRICS=1]="METRICS",Wt[Wt.LOGS=2]="LOGS",Wt}(B||{}),j=function(){var Wt=function(rn,zt){return(Wt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(dn,vn){dn.__proto__=vn}||function(dn,vn){for(var xe in vn)Object.prototype.hasOwnProperty.call(vn,xe)&&(dn[xe]=vn[xe])})(rn,zt)};return function(rn,zt){if("function"!=typeof zt&&null!==zt)throw new TypeError("Class extends value "+String(zt)+" is not a constructor or null");function dn(){this.constructor=rn}Wt(rn,zt),rn.prototype=null===zt?Object.create(zt):(dn.prototype=zt.prototype,new dn)}}(),re=function(Wt){function rn(zt,dn,vn){var xe=Wt.call(this,zt)||this;return xe.name="OTLPExporterError",xe.data=vn,xe.code=dn,xe}return j(rn,Wt),rn}(Error),z=function(){return z=Object.assign||function(Wt){for(var rn,zt=1,dn=arguments.length;zt0)&&!(vn=dn.next()).done;)xe.push(vn.value)}catch(Et){Tt={error:Et}}finally{try{vn&&!vn.done&&(zt=dn.return)&&zt.call(dn)}finally{if(Tt)throw Tt.error}}return xe}(bt,2);Et.setRequestHeader(De[0],De[1])}),Et.send(Wt),Et.onreadystatechange=function(){if(Et.readyState===XMLHttpRequest.DONE&&!1===Ye)if(Et.status>=200&&Et.status<=299)v.s.debug("xhr success",Wt),vn(),clearTimeout(Nt),clearTimeout(Tt);else if(Et.status&&function P(Wt){return[429,502,503,504].includes(Wt)}(Et.status)&&Ut>0){var bt;Pn*=1.5,bt=Et.getResponseHeader("Retry-After")?function V(Wt){if(null==Wt)return-1;var rn=Number.parseInt(Wt,10);if(Number.isInteger(rn))return rn>0?1e3*rn:-1;var zt=new Date(Wt).getTime()-Date.now();return zt>=0?zt:0}(Et.getResponseHeader("Retry-After")):Math.round(Math.random()*(5e3-Pn)+Pn),Tt=setTimeout(function(){Yt(Ut-1,Pn)},bt)}else{var De=new re("Failed to export with XHR (status: "+Et.status+")",Et.status);xe(De),clearTimeout(Nt),clearTimeout(Tt)}},Et.onabort=function(){if(Ye){var bt=new re("Request Timeout");xe(bt)}clearTimeout(Nt),clearTimeout(Tt)},Et.onerror=function(){if(Ye){var bt=new re("Request Timeout");xe(bt)}clearTimeout(Nt),clearTimeout(Tt)}};Yt()}var F=f(25578),k=f(99200),$=function(){function Wt(rn){void 0===rn&&(rn={}),this._sendingPromises=[],this.url=this.getDefaultUrl(rn),"string"==typeof rn.hostname&&(this.hostname=rn.hostname),this.shutdown=this.shutdown.bind(this),this._shutdownOnce=new F.I(this._shutdown,this),this._concurrencyLimit="number"==typeof rn.concurrencyLimit?rn.concurrencyLimit:30,this.timeoutMillis=function i(Wt){return"number"==typeof Wt?Wt<=0?A(Wt,1e4):Wt:function h(){var Wt,rn=Number(null!==(Wt=(0,s._)().OTEL_EXPORTER_OTLP_TRACES_TIMEOUT)&&void 0!==Wt?Wt:(0,s._)().OTEL_EXPORTER_OTLP_TIMEOUT);return rn<=0?A(rn,1e4):rn}()}(rn.timeoutMillis),this.onInit(rn)}return Wt.prototype.export=function(rn,zt){this._shutdownOnce.isCalled?zt({code:k.V.FAILED,error:new Error("Exporter has been shutdown")}):this._sendingPromises.length>=this._concurrencyLimit?zt({code:k.V.FAILED,error:new Error("Concurrent export limit reached")}):this._export(rn).then(function(){zt({code:k.V.SUCCESS})}).catch(function(dn){zt({code:k.V.FAILED,error:dn})})},Wt.prototype._export=function(rn){var zt=this;return new Promise(function(dn,vn){try{v.s.debug("items to be sent",rn),zt.send(rn,dn,vn)}catch(xe){vn(xe)}})},Wt.prototype.shutdown=function(){return this._shutdownOnce.call()},Wt.prototype.forceFlush=function(){return Promise.all(this._sendingPromises).then(function(){})},Wt.prototype._shutdown=function(){return v.s.debug("shutdown started"),this.onShutdown(),this.forceFlush()},Wt}(),ne=function(){var Wt=function(rn,zt){return(Wt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(dn,vn){dn.__proto__=vn}||function(dn,vn){for(var xe in vn)Object.prototype.hasOwnProperty.call(vn,xe)&&(dn[xe]=vn[xe])})(rn,zt)};return function(rn,zt){if("function"!=typeof zt&&null!==zt)throw new TypeError("Class extends value "+String(zt)+" is not a constructor or null");function dn(){this.constructor=rn}Wt(rn,zt),rn.prototype=null===zt?Object.create(zt):(dn.prototype=zt.prototype,new dn)}}(),te=function(Wt){function rn(zt){void 0===zt&&(zt={});var dn=Wt.call(this,zt)||this;return dn._useXHR=!1,dn._useXHR=!!zt.headers||"function"!=typeof navigator.sendBeacon,dn._headers=dn._useXHR?Object.assign({},function y(Wt){void 0===Wt&&(Wt={});var rn={};return Object.entries(Wt).forEach(function(zt){var dn=function(Wt,rn){var zt="function"==typeof Symbol&&Wt[Symbol.iterator];if(!zt)return Wt;var vn,Tt,dn=zt.call(Wt),xe=[];try{for(;(void 0===rn||rn-- >0)&&!(vn=dn.next()).done;)xe.push(vn.value)}catch(Et){Tt={error:Et}}finally{try{vn&&!vn.done&&(zt=dn.return)&&zt.call(dn)}finally{if(Tt)throw Tt.error}}return xe}(zt,2),vn=dn[0],xe=dn[1];typeof xe<"u"?rn[vn]=String(xe):v.s.warn('Header "'+vn+'" has invalid value ('+xe+") and will be ignored")}),rn}(zt.headers),r.parseKeyPairsIntoRecord((0,s._)().OTEL_EXPORTER_OTLP_HEADERS)):{},dn}return ne(rn,Wt),rn.prototype.onInit=function(){},rn.prototype.onShutdown=function(){},rn.prototype.send=function(zt,dn,vn){var xe=this;if(this._shutdownOnce.isCalled)v.s.debug("Shutdown already started. Cannot send objects");else{var Tt=this.convert(zt),Et=JSON.stringify(Tt),Ye=new Promise(function(Yt,Ut){xe._useXHR?O(Et,xe.url,xe._headers,xe.timeoutMillis,Yt,Ut):function U(Wt,rn,zt,dn,vn){navigator.sendBeacon(rn,new Blob([Wt],zt))?(v.s.debug("sendBeacon - can send",Wt),dn()):vn(new re("sendBeacon - cannot send "+Wt))}(Et,xe.url,{type:"application/json"},Yt,Ut)}).then(dn,vn);this._sendingPromises.push(Ye);var Nt=function(){var Yt=xe._sendingPromises.indexOf(Ye);xe._sendingPromises.splice(Yt,1)};Ye.then(Nt,Nt)}},rn}($),Z=f(89304),fe=function(){var Wt=function(rn,zt){return(Wt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(dn,vn){dn.__proto__=vn}||function(dn,vn){for(var xe in vn)Object.prototype.hasOwnProperty.call(vn,xe)&&(dn[xe]=vn[xe])})(rn,zt)};return function(rn,zt){if("function"!=typeof zt&&null!==zt)throw new TypeError("Class extends value "+String(zt)+" is not a constructor or null");function dn(){this.constructor=rn}Wt(rn,zt),rn.prototype=null===zt?Object.create(zt):(dn.prototype=zt.prototype,new dn)}}(),Se=function(){return Se=Object.assign||function(Wt){for(var rn,zt=1,dn=arguments.length;zt0)&&!(vn=dn.next()).done;)xe.push(vn.value)}catch(Et){Tt={error:Et}}finally{try{vn&&!vn.done&&(zt=dn.return)&&zt.call(dn)}finally{if(Tt)throw Tt.error}}return xe};function q(Wt){return{name:Wt.name,version:Wt.version}}function J(Wt){return Object.keys(Wt).map(function(rn){return W(rn,Wt[rn])})}function W(Wt,rn){return{key:Wt,value:ee(rn)}}function ee(Wt){var rn=typeof Wt;return"string"===rn?{stringValue:Wt}:"number"===rn?Number.isInteger(Wt)?{intValue:Wt}:{doubleValue:Wt}:"boolean"===rn?{boolValue:Wt}:Wt instanceof Uint8Array?{bytesValue:Wt}:Array.isArray(Wt)?{arrayValue:{values:Wt.map(ee)}}:"object"===rn&&null!=Wt?{kvlistValue:{values:Object.entries(Wt).map(function(zt){var dn=we(zt,2);return W(dn[0],dn[1])})}}:{}}function X(Wt,rn){var zt,dn=Wt.spanContext(),vn=Wt.status;return{traceId:rn.encodeSpanContext(dn.traceId),spanId:rn.encodeSpanContext(dn.spanId),parentSpanId:rn.encodeOptionalSpanContext(Wt.parentSpanId),traceState:null===(zt=dn.traceState)||void 0===zt?void 0:zt.serialize(),name:Wt.name,kind:null==Wt.kind?0:Wt.kind+1,startTimeUnixNano:rn.encodeHrTime(Wt.startTime),endTimeUnixNano:rn.encodeHrTime(Wt.endTime),attributes:J(Wt.attributes),droppedAttributesCount:Wt.droppedAttributesCount,events:Wt.events.map(function(xe){return function de(Wt,rn){return{attributes:Wt.attributes?J(Wt.attributes):[],name:Wt.name,timeUnixNano:rn.encodeHrTime(Wt.time),droppedAttributesCount:Wt.droppedAttributesCount||0}}(xe,rn)}),droppedEventsCount:Wt.droppedEventsCount,status:{code:vn.code,message:vn.message},links:Wt.links.map(function(xe){return function ae(Wt,rn){var zt;return{attributes:Wt.attributes?J(Wt.attributes):[],spanId:rn.encodeSpanContext(Wt.context.spanId),traceId:rn.encodeSpanContext(Wt.context.traceId),traceState:null===(zt=Wt.context.traceState)||void 0===zt?void 0:zt.serialize(),droppedAttributesCount:Wt.droppedAttributesCount||0}}(xe,rn)}),droppedLinksCount:Wt.droppedLinksCount}}var Pe=f(1119),ye=f(2776);function Le(Wt){var rn=BigInt(1e9);return BigInt(Wt[0])*rn+BigInt(Wt[1])}function ie(Wt){return function Xe(Wt){return{low:Number(BigInt.asUintN(32,Wt)),high:Number(BigInt.asUintN(32,Wt>>BigInt(32)))}}(Le(Wt))}var ce=typeof BigInt<"u"?function K(Wt){return Le(Wt).toString()}:Pe.u5;function ge(Wt){return Wt}function Oe(Wt){if(void 0!==Wt)return(0,ye.Q)(Wt)}var Ie={encodeHrTime:ie,encodeSpanContext:ye.Q,encodeOptionalSpanContext:Oe};function Fe(Wt){return{attributes:J(Wt.attributes),droppedAttributesCount:0}}var et=function(Wt){var rn="function"==typeof Symbol&&Symbol.iterator,zt=rn&&Wt[rn],dn=0;if(zt)return zt.call(Wt);if(Wt&&"number"==typeof Wt.length)return{next:function(){return Wt&&dn>=Wt.length&&(Wt=void 0),{value:Wt&&Wt[dn++],done:!Wt}}};throw new TypeError(rn?"Object is not iterable.":"Symbol.iterator is not defined.")},Rt=function(Wt,rn){var zt="function"==typeof Symbol&&Wt[Symbol.iterator];if(!zt)return Wt;var vn,Tt,dn=zt.call(Wt),xe=[];try{for(;(void 0===rn||rn-- >0)&&!(vn=dn.next()).done;)xe.push(vn.value)}catch(Et){Tt={error:Et}}finally{try{vn&&!vn.done&&(zt=dn.return)&&zt.call(dn)}finally{if(Tt)throw Tt.error}}return xe};function lt(Wt,rn){for(var zt=function Ae(Wt){var rn,zt,dn=new Map;try{for(var vn=et(Wt),xe=vn.next();!xe.done;xe=vn.next()){var Tt=xe.value,Et=dn.get(Tt.resource);Et||dn.set(Tt.resource,Et=new Map);var Ye=Tt.instrumentationLibrary.name+"@"+(Tt.instrumentationLibrary.version||"")+":"+(Tt.instrumentationLibrary.schemaUrl||""),Nt=Et.get(Ye);Nt||Et.set(Ye,Nt=[]),Nt.push(Tt)}}catch(Yt){rn={error:Yt}}finally{try{xe&&!xe.done&&(zt=vn.return)&&zt.call(vn)}finally{if(rn)throw rn.error}}return dn}(Wt),dn=[],vn=zt.entries(),xe=vn.next();!xe.done;){for(var Tt=Rt(xe.value,2),Et=Tt[0],Nt=[],Yt=Tt[1].values(),Ut=Yt.next();!Ut.done;){var Pn=Ut.value;if(Pn.length>0){var Vt=Pn.map(function(De){return X(De,rn)});Nt.push({scope:q(Pn[0].instrumentationLibrary),spans:Vt,schemaUrl:Pn[0].instrumentationLibrary.schemaUrl})}Ut=Yt.next()}var bt={resource:Fe(Et),scopeSpans:Nt,schemaUrl:void 0};dn.push(bt),xe=vn.next()}return dn}var Ze=function(){var Wt=function(rn,zt){return(Wt=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(dn,vn){dn.__proto__=vn}||function(dn,vn){for(var xe in vn)Object.prototype.hasOwnProperty.call(vn,xe)&&(dn[xe]=vn[xe])})(rn,zt)};return function(rn,zt){if("function"!=typeof zt&&null!==zt)throw new TypeError("Class extends value "+String(zt)+" is not a constructor or null");function dn(){this.constructor=rn}Wt(rn,zt),rn.prototype=null===zt?Object.create(zt):(dn.prototype=zt.prototype,new dn)}}(),yt="v1/traces",un="http://localhost:4318/"+yt,kn=function(Wt){function rn(zt){void 0===zt&&(zt={});var dn=Wt.call(this,zt)||this;return dn._headers=Object.assign(dn._headers,r.parseKeyPairsIntoRecord((0,s._)().OTEL_EXPORTER_OTLP_TRACES_HEADERS)),dn}return Ze(rn,Wt),rn.prototype.convert=function(zt){return function _t(Wt,rn){var zt=function ht(Wt){var rn,zt;if(void 0===Wt)return Ie;var dn=null===(rn=Wt.useLongBits)||void 0===rn||rn,vn=null!==(zt=Wt.useHex)&&void 0!==zt&&zt;return{encodeHrTime:dn?ie:ce,encodeSpanContext:vn?ge:ye.Q,encodeOptionalSpanContext:vn?ge:Oe}}(rn);return{resourceSpans:lt(Wt,zt)}}(zt)},rn.prototype.getDefaultUrl=function(zt){return"string"==typeof zt.url?zt.url:(0,s._)().OTEL_EXPORTER_OTLP_TRACES_ENDPOINT.length>0?function c(Wt){try{var rn=new URL(Wt);return""===rn.pathname&&(rn.pathname=rn.pathname+"/"),rn.toString()}catch{return v.s.warn("Could not parse export URL: '"+Wt+"'"),Wt}}((0,s._)().OTEL_EXPORTER_OTLP_TRACES_ENDPOINT):(0,s._)().OTEL_EXPORTER_OTLP_ENDPOINT.length>0?function b(Wt,rn){return Wt.endsWith("/")||(Wt+="/"),Wt+rn}((0,s._)().OTEL_EXPORTER_OTLP_ENDPOINT,yt):un},rn.prototype.getServiceClientType=function(){return B.SPANS},rn}(pe)},89304:(vt,I,f)=>{"use strict";var M,x,T,E,r=f(6350),s=r.Reader,v=r.Writer,_=r.util,g=r.roots.default||(r.roots.default={});g.opentelemetry=((E={}).proto=((T={}).common=((x={}).v1=((M={}).AnyValue=function(){function y(c){if(c)for(var i=Object.keys(c),h=0;h>>3){case 1:P.stringValue=i.string();break;case 2:P.boolValue=i.bool();break;case 3:P.intValue=i.int64();break;case 4:P.doubleValue=i.double();break;case 5:P.arrayValue=g.opentelemetry.proto.common.v1.ArrayValue.decode(i,i.uint32());break;case 6:P.kvlistValue=g.opentelemetry.proto.common.v1.KeyValueList.decode(i,i.uint32());break;case 7:P.bytesValue=i.bytes();break;default:i.skipType(7&V)}}return P},y.decodeDelimited=function(i){return i instanceof s||(i=new s(i)),this.decode(i,i.uint32())},y.verify=function(i){if("object"!=typeof i||null===i)return"object expected";var h={};if(null!=i.stringValue&&i.hasOwnProperty("stringValue")&&(h.value=1,!_.isString(i.stringValue)))return"stringValue: string expected";if(null!=i.boolValue&&i.hasOwnProperty("boolValue")){if(1===h.value)return"value: multiple values";if(h.value=1,"boolean"!=typeof i.boolValue)return"boolValue: boolean expected"}if(null!=i.intValue&&i.hasOwnProperty("intValue")){if(1===h.value)return"value: multiple values";if(h.value=1,!(_.isInteger(i.intValue)||i.intValue&&_.isInteger(i.intValue.low)&&_.isInteger(i.intValue.high)))return"intValue: integer|Long expected"}if(null!=i.doubleValue&&i.hasOwnProperty("doubleValue")){if(1===h.value)return"value: multiple values";if(h.value=1,"number"!=typeof i.doubleValue)return"doubleValue: number expected"}if(null!=i.arrayValue&&i.hasOwnProperty("arrayValue")){if(1===h.value)return"value: multiple values";if(h.value=1,A=g.opentelemetry.proto.common.v1.ArrayValue.verify(i.arrayValue))return"arrayValue."+A}if(null!=i.kvlistValue&&i.hasOwnProperty("kvlistValue")){if(1===h.value)return"value: multiple values";var A;if(h.value=1,A=g.opentelemetry.proto.common.v1.KeyValueList.verify(i.kvlistValue))return"kvlistValue."+A}if(null!=i.bytesValue&&i.hasOwnProperty("bytesValue")){if(1===h.value)return"value: multiple values";if(h.value=1,!(i.bytesValue&&"number"==typeof i.bytesValue.length||_.isString(i.bytesValue)))return"bytesValue: buffer expected"}return null},y.fromObject=function(i){if(i instanceof g.opentelemetry.proto.common.v1.AnyValue)return i;var h=new g.opentelemetry.proto.common.v1.AnyValue;if(null!=i.stringValue&&(h.stringValue=String(i.stringValue)),null!=i.boolValue&&(h.boolValue=!!i.boolValue),null!=i.intValue&&(_.Long?(h.intValue=_.Long.fromValue(i.intValue)).unsigned=!1:"string"==typeof i.intValue?h.intValue=parseInt(i.intValue,10):"number"==typeof i.intValue?h.intValue=i.intValue:"object"==typeof i.intValue&&(h.intValue=new _.LongBits(i.intValue.low>>>0,i.intValue.high>>>0).toNumber())),null!=i.doubleValue&&(h.doubleValue=Number(i.doubleValue)),null!=i.arrayValue){if("object"!=typeof i.arrayValue)throw TypeError(".opentelemetry.proto.common.v1.AnyValue.arrayValue: object expected");h.arrayValue=g.opentelemetry.proto.common.v1.ArrayValue.fromObject(i.arrayValue)}if(null!=i.kvlistValue){if("object"!=typeof i.kvlistValue)throw TypeError(".opentelemetry.proto.common.v1.AnyValue.kvlistValue: object expected");h.kvlistValue=g.opentelemetry.proto.common.v1.KeyValueList.fromObject(i.kvlistValue)}return null!=i.bytesValue&&("string"==typeof i.bytesValue?_.base64.decode(i.bytesValue,h.bytesValue=_.newBuffer(_.base64.length(i.bytesValue)),0):i.bytesValue.length>=0&&(h.bytesValue=i.bytesValue)),h},y.toObject=function(i,h){h||(h={});var A={};return null!=i.stringValue&&i.hasOwnProperty("stringValue")&&(A.stringValue=i.stringValue,h.oneofs&&(A.value="stringValue")),null!=i.boolValue&&i.hasOwnProperty("boolValue")&&(A.boolValue=i.boolValue,h.oneofs&&(A.value="boolValue")),null!=i.intValue&&i.hasOwnProperty("intValue")&&(A.intValue="number"==typeof i.intValue?h.longs===String?String(i.intValue):i.intValue:h.longs===String?_.Long.prototype.toString.call(i.intValue):h.longs===Number?new _.LongBits(i.intValue.low>>>0,i.intValue.high>>>0).toNumber():i.intValue,h.oneofs&&(A.value="intValue")),null!=i.doubleValue&&i.hasOwnProperty("doubleValue")&&(A.doubleValue=h.json&&!isFinite(i.doubleValue)?String(i.doubleValue):i.doubleValue,h.oneofs&&(A.value="doubleValue")),null!=i.arrayValue&&i.hasOwnProperty("arrayValue")&&(A.arrayValue=g.opentelemetry.proto.common.v1.ArrayValue.toObject(i.arrayValue,h),h.oneofs&&(A.value="arrayValue")),null!=i.kvlistValue&&i.hasOwnProperty("kvlistValue")&&(A.kvlistValue=g.opentelemetry.proto.common.v1.KeyValueList.toObject(i.kvlistValue,h),h.oneofs&&(A.value="kvlistValue")),null!=i.bytesValue&&i.hasOwnProperty("bytesValue")&&(A.bytesValue=h.bytes===String?_.base64.encode(i.bytesValue,0,i.bytesValue.length):h.bytes===Array?Array.prototype.slice.call(i.bytesValue):i.bytesValue,h.oneofs&&(A.value="bytesValue")),A},y.prototype.toJSON=function(){return this.constructor.toObject(this,r.util.toJSONOptions)},y.getTypeUrl=function(i){return void 0===i&&(i="type.googleapis.com"),i+"/opentelemetry.proto.common.v1.AnyValue"},y}(),M.ArrayValue=function(){function y(b){if(this.values=[],b)for(var c=Object.keys(b),i=0;i>>3==1?(A.values&&A.values.length||(A.values=[]),A.values.push(g.opentelemetry.proto.common.v1.AnyValue.decode(c,c.uint32()))):c.skipType(7&P)}return A},y.decodeDelimited=function(c){return c instanceof s||(c=new s(c)),this.decode(c,c.uint32())},y.verify=function(c){if("object"!=typeof c||null===c)return"object expected";if(null!=c.values&&c.hasOwnProperty("values")){if(!Array.isArray(c.values))return"values: array expected";for(var i=0;i>>3==1?(A.values&&A.values.length||(A.values=[]),A.values.push(g.opentelemetry.proto.common.v1.KeyValue.decode(c,c.uint32()))):c.skipType(7&P)}return A},y.decodeDelimited=function(c){return c instanceof s||(c=new s(c)),this.decode(c,c.uint32())},y.verify=function(c){if("object"!=typeof c||null===c)return"object expected";if(null!=c.values&&c.hasOwnProperty("values")){if(!Array.isArray(c.values))return"values: array expected";for(var i=0;i>>3){case 1:A.key=c.string();break;case 2:A.value=g.opentelemetry.proto.common.v1.AnyValue.decode(c,c.uint32());break;default:c.skipType(7&P)}}return A},y.decodeDelimited=function(c){return c instanceof s||(c=new s(c)),this.decode(c,c.uint32())},y.verify=function(c){if("object"!=typeof c||null===c)return"object expected";if(null!=c.key&&c.hasOwnProperty("key")&&!_.isString(c.key))return"key: string expected";if(null!=c.value&&c.hasOwnProperty("value")){var i=g.opentelemetry.proto.common.v1.AnyValue.verify(c.value);if(i)return"value."+i}return null},y.fromObject=function(c){if(c instanceof g.opentelemetry.proto.common.v1.KeyValue)return c;var i=new g.opentelemetry.proto.common.v1.KeyValue;if(null!=c.key&&(i.key=String(c.key)),null!=c.value){if("object"!=typeof c.value)throw TypeError(".opentelemetry.proto.common.v1.KeyValue.value: object expected");i.value=g.opentelemetry.proto.common.v1.AnyValue.fromObject(c.value)}return i},y.toObject=function(c,i){i||(i={});var h={};return i.defaults&&(h.key="",h.value=null),null!=c.key&&c.hasOwnProperty("key")&&(h.key=c.key),null!=c.value&&c.hasOwnProperty("value")&&(h.value=g.opentelemetry.proto.common.v1.AnyValue.toObject(c.value,i)),h},y.prototype.toJSON=function(){return this.constructor.toObject(this,r.util.toJSONOptions)},y.getTypeUrl=function(c){return void 0===c&&(c="type.googleapis.com"),c+"/opentelemetry.proto.common.v1.KeyValue"},y}(),M.InstrumentationScope=function(){function y(b){if(this.attributes=[],b)for(var c=Object.keys(b),i=0;i>>3){case 1:A.name=c.string();break;case 2:A.version=c.string();break;case 3:A.attributes&&A.attributes.length||(A.attributes=[]),A.attributes.push(g.opentelemetry.proto.common.v1.KeyValue.decode(c,c.uint32()));break;case 4:A.droppedAttributesCount=c.uint32();break;default:c.skipType(7&P)}}return A},y.decodeDelimited=function(c){return c instanceof s||(c=new s(c)),this.decode(c,c.uint32())},y.verify=function(c){if("object"!=typeof c||null===c)return"object expected";if(null!=c.name&&c.hasOwnProperty("name")&&!_.isString(c.name))return"name: string expected";if(null!=c.version&&c.hasOwnProperty("version")&&!_.isString(c.version))return"version: string expected";if(null!=c.attributes&&c.hasOwnProperty("attributes")){if(!Array.isArray(c.attributes))return"attributes: array expected";for(var i=0;i>>0),i},y.toObject=function(c,i){i||(i={});var h={};if((i.arrays||i.defaults)&&(h.attributes=[]),i.defaults&&(h.name="",h.version="",h.droppedAttributesCount=0),null!=c.name&&c.hasOwnProperty("name")&&(h.name=c.name),null!=c.version&&c.hasOwnProperty("version")&&(h.version=c.version),c.attributes&&c.attributes.length){h.attributes=[];for(var A=0;A>>3){case 1:A.attributes&&A.attributes.length||(A.attributes=[]),A.attributes.push(g.opentelemetry.proto.common.v1.KeyValue.decode(c,c.uint32()));break;case 2:A.droppedAttributesCount=c.uint32();break;default:c.skipType(7&P)}}return A},y.decodeDelimited=function(c){return c instanceof s||(c=new s(c)),this.decode(c,c.uint32())},y.verify=function(c){if("object"!=typeof c||null===c)return"object expected";if(null!=c.attributes&&c.hasOwnProperty("attributes")){if(!Array.isArray(c.attributes))return"attributes: array expected";for(var i=0;i>>0),i},y.toObject=function(c,i){i||(i={});var h={};if((i.arrays||i.defaults)&&(h.attributes=[]),i.defaults&&(h.droppedAttributesCount=0),c.attributes&&c.attributes.length){h.attributes=[];for(var A=0;A>>3==1?(A.resourceSpans&&A.resourceSpans.length||(A.resourceSpans=[]),A.resourceSpans.push(g.opentelemetry.proto.trace.v1.ResourceSpans.decode(c,c.uint32()))):c.skipType(7&P)}return A},y.decodeDelimited=function(c){return c instanceof s||(c=new s(c)),this.decode(c,c.uint32())},y.verify=function(c){if("object"!=typeof c||null===c)return"object expected";if(null!=c.resourceSpans&&c.hasOwnProperty("resourceSpans")){if(!Array.isArray(c.resourceSpans))return"resourceSpans: array expected";for(var i=0;i>>3){case 1:A.resource=g.opentelemetry.proto.resource.v1.Resource.decode(c,c.uint32());break;case 2:A.scopeSpans&&A.scopeSpans.length||(A.scopeSpans=[]),A.scopeSpans.push(g.opentelemetry.proto.trace.v1.ScopeSpans.decode(c,c.uint32()));break;case 3:A.schemaUrl=c.string();break;default:c.skipType(7&P)}}return A},y.decodeDelimited=function(c){return c instanceof s||(c=new s(c)),this.decode(c,c.uint32())},y.verify=function(c){if("object"!=typeof c||null===c)return"object expected";if(null!=c.resource&&c.hasOwnProperty("resource")&&(i=g.opentelemetry.proto.resource.v1.Resource.verify(c.resource)))return"resource."+i;if(null!=c.scopeSpans&&c.hasOwnProperty("scopeSpans")){if(!Array.isArray(c.scopeSpans))return"scopeSpans: array expected";for(var h=0;h>>3){case 1:A.scope=g.opentelemetry.proto.common.v1.InstrumentationScope.decode(c,c.uint32());break;case 2:A.spans&&A.spans.length||(A.spans=[]),A.spans.push(g.opentelemetry.proto.trace.v1.Span.decode(c,c.uint32()));break;case 3:A.schemaUrl=c.string();break;default:c.skipType(7&P)}}return A},y.decodeDelimited=function(c){return c instanceof s||(c=new s(c)),this.decode(c,c.uint32())},y.verify=function(c){if("object"!=typeof c||null===c)return"object expected";if(null!=c.scope&&c.hasOwnProperty("scope")&&(i=g.opentelemetry.proto.common.v1.InstrumentationScope.verify(c.scope)))return"scope."+i;if(null!=c.spans&&c.hasOwnProperty("spans")){if(!Array.isArray(c.spans))return"spans: array expected";for(var h=0;h>>3){case 1:A.traceId=c.bytes();break;case 2:A.spanId=c.bytes();break;case 3:A.traceState=c.string();break;case 4:A.parentSpanId=c.bytes();break;case 5:A.name=c.string();break;case 6:A.kind=c.int32();break;case 7:A.startTimeUnixNano=c.fixed64();break;case 8:A.endTimeUnixNano=c.fixed64();break;case 9:A.attributes&&A.attributes.length||(A.attributes=[]),A.attributes.push(g.opentelemetry.proto.common.v1.KeyValue.decode(c,c.uint32()));break;case 10:A.droppedAttributesCount=c.uint32();break;case 11:A.events&&A.events.length||(A.events=[]),A.events.push(g.opentelemetry.proto.trace.v1.Span.Event.decode(c,c.uint32()));break;case 12:A.droppedEventsCount=c.uint32();break;case 13:A.links&&A.links.length||(A.links=[]),A.links.push(g.opentelemetry.proto.trace.v1.Span.Link.decode(c,c.uint32()));break;case 14:A.droppedLinksCount=c.uint32();break;case 15:A.status=g.opentelemetry.proto.trace.v1.Status.decode(c,c.uint32());break;default:c.skipType(7&P)}}return A},y.decodeDelimited=function(c){return c instanceof s||(c=new s(c)),this.decode(c,c.uint32())},y.verify=function(c){if("object"!=typeof c||null===c)return"object expected";if(null!=c.traceId&&c.hasOwnProperty("traceId")&&!(c.traceId&&"number"==typeof c.traceId.length||_.isString(c.traceId)))return"traceId: buffer expected";if(null!=c.spanId&&c.hasOwnProperty("spanId")&&!(c.spanId&&"number"==typeof c.spanId.length||_.isString(c.spanId)))return"spanId: buffer expected";if(null!=c.traceState&&c.hasOwnProperty("traceState")&&!_.isString(c.traceState))return"traceState: string expected";if(null!=c.parentSpanId&&c.hasOwnProperty("parentSpanId")&&!(c.parentSpanId&&"number"==typeof c.parentSpanId.length||_.isString(c.parentSpanId)))return"parentSpanId: buffer expected";if(null!=c.name&&c.hasOwnProperty("name")&&!_.isString(c.name))return"name: string expected";if(null!=c.kind&&c.hasOwnProperty("kind"))switch(c.kind){default:return"kind: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:}if(null!=c.startTimeUnixNano&&c.hasOwnProperty("startTimeUnixNano")&&!_.isInteger(c.startTimeUnixNano)&&!(c.startTimeUnixNano&&_.isInteger(c.startTimeUnixNano.low)&&_.isInteger(c.startTimeUnixNano.high)))return"startTimeUnixNano: integer|Long expected";if(null!=c.endTimeUnixNano&&c.hasOwnProperty("endTimeUnixNano")&&!_.isInteger(c.endTimeUnixNano)&&!(c.endTimeUnixNano&&_.isInteger(c.endTimeUnixNano.low)&&_.isInteger(c.endTimeUnixNano.high)))return"endTimeUnixNano: integer|Long expected";if(null!=c.attributes&&c.hasOwnProperty("attributes")){if(!Array.isArray(c.attributes))return"attributes: array expected";for(var i=0;i=0&&(i.traceId=c.traceId)),null!=c.spanId&&("string"==typeof c.spanId?_.base64.decode(c.spanId,i.spanId=_.newBuffer(_.base64.length(c.spanId)),0):c.spanId.length>=0&&(i.spanId=c.spanId)),null!=c.traceState&&(i.traceState=String(c.traceState)),null!=c.parentSpanId&&("string"==typeof c.parentSpanId?_.base64.decode(c.parentSpanId,i.parentSpanId=_.newBuffer(_.base64.length(c.parentSpanId)),0):c.parentSpanId.length>=0&&(i.parentSpanId=c.parentSpanId)),null!=c.name&&(i.name=String(c.name)),c.kind){default:if("number"==typeof c.kind){i.kind=c.kind;break}break;case"SPAN_KIND_UNSPECIFIED":case 0:i.kind=0;break;case"SPAN_KIND_INTERNAL":case 1:i.kind=1;break;case"SPAN_KIND_SERVER":case 2:i.kind=2;break;case"SPAN_KIND_CLIENT":case 3:i.kind=3;break;case"SPAN_KIND_PRODUCER":case 4:i.kind=4;break;case"SPAN_KIND_CONSUMER":case 5:i.kind=5}if(null!=c.startTimeUnixNano&&(_.Long?(i.startTimeUnixNano=_.Long.fromValue(c.startTimeUnixNano)).unsigned=!1:"string"==typeof c.startTimeUnixNano?i.startTimeUnixNano=parseInt(c.startTimeUnixNano,10):"number"==typeof c.startTimeUnixNano?i.startTimeUnixNano=c.startTimeUnixNano:"object"==typeof c.startTimeUnixNano&&(i.startTimeUnixNano=new _.LongBits(c.startTimeUnixNano.low>>>0,c.startTimeUnixNano.high>>>0).toNumber())),null!=c.endTimeUnixNano&&(_.Long?(i.endTimeUnixNano=_.Long.fromValue(c.endTimeUnixNano)).unsigned=!1:"string"==typeof c.endTimeUnixNano?i.endTimeUnixNano=parseInt(c.endTimeUnixNano,10):"number"==typeof c.endTimeUnixNano?i.endTimeUnixNano=c.endTimeUnixNano:"object"==typeof c.endTimeUnixNano&&(i.endTimeUnixNano=new _.LongBits(c.endTimeUnixNano.low>>>0,c.endTimeUnixNano.high>>>0).toNumber())),c.attributes){if(!Array.isArray(c.attributes))throw TypeError(".opentelemetry.proto.trace.v1.Span.attributes: array expected");i.attributes=[];for(var h=0;h>>0),c.events){if(!Array.isArray(c.events))throw TypeError(".opentelemetry.proto.trace.v1.Span.events: array expected");for(i.events=[],h=0;h>>0),c.links){if(!Array.isArray(c.links))throw TypeError(".opentelemetry.proto.trace.v1.Span.links: array expected");for(i.links=[],h=0;h>>0),null!=c.status){if("object"!=typeof c.status)throw TypeError(".opentelemetry.proto.trace.v1.Span.status: object expected");i.status=g.opentelemetry.proto.trace.v1.Status.fromObject(c.status)}return i},y.toObject=function(c,i){i||(i={});var h={};if((i.arrays||i.defaults)&&(h.attributes=[],h.events=[],h.links=[]),i.defaults){if(i.bytes===String?h.traceId="":(h.traceId=[],i.bytes!==Array&&(h.traceId=_.newBuffer(h.traceId))),i.bytes===String?h.spanId="":(h.spanId=[],i.bytes!==Array&&(h.spanId=_.newBuffer(h.spanId))),h.traceState="",i.bytes===String?h.parentSpanId="":(h.parentSpanId=[],i.bytes!==Array&&(h.parentSpanId=_.newBuffer(h.parentSpanId))),h.name="",h.kind=i.enums===String?"SPAN_KIND_UNSPECIFIED":0,_.Long){var A=new _.Long(0,0,!1);h.startTimeUnixNano=i.longs===String?A.toString():i.longs===Number?A.toNumber():A}else h.startTimeUnixNano=i.longs===String?"0":0;_.Long?(A=new _.Long(0,0,!1),h.endTimeUnixNano=i.longs===String?A.toString():i.longs===Number?A.toNumber():A):h.endTimeUnixNano=i.longs===String?"0":0,h.droppedAttributesCount=0,h.droppedEventsCount=0,h.droppedLinksCount=0,h.status=null}if(null!=c.traceId&&c.hasOwnProperty("traceId")&&(h.traceId=i.bytes===String?_.base64.encode(c.traceId,0,c.traceId.length):i.bytes===Array?Array.prototype.slice.call(c.traceId):c.traceId),null!=c.spanId&&c.hasOwnProperty("spanId")&&(h.spanId=i.bytes===String?_.base64.encode(c.spanId,0,c.spanId.length):i.bytes===Array?Array.prototype.slice.call(c.spanId):c.spanId),null!=c.traceState&&c.hasOwnProperty("traceState")&&(h.traceState=c.traceState),null!=c.parentSpanId&&c.hasOwnProperty("parentSpanId")&&(h.parentSpanId=i.bytes===String?_.base64.encode(c.parentSpanId,0,c.parentSpanId.length):i.bytes===Array?Array.prototype.slice.call(c.parentSpanId):c.parentSpanId),null!=c.name&&c.hasOwnProperty("name")&&(h.name=c.name),null!=c.kind&&c.hasOwnProperty("kind")&&(h.kind=i.enums===String?void 0===g.opentelemetry.proto.trace.v1.Span.SpanKind[c.kind]?c.kind:g.opentelemetry.proto.trace.v1.Span.SpanKind[c.kind]:c.kind),null!=c.startTimeUnixNano&&c.hasOwnProperty("startTimeUnixNano")&&(h.startTimeUnixNano="number"==typeof c.startTimeUnixNano?i.longs===String?String(c.startTimeUnixNano):c.startTimeUnixNano:i.longs===String?_.Long.prototype.toString.call(c.startTimeUnixNano):i.longs===Number?new _.LongBits(c.startTimeUnixNano.low>>>0,c.startTimeUnixNano.high>>>0).toNumber():c.startTimeUnixNano),null!=c.endTimeUnixNano&&c.hasOwnProperty("endTimeUnixNano")&&(h.endTimeUnixNano="number"==typeof c.endTimeUnixNano?i.longs===String?String(c.endTimeUnixNano):c.endTimeUnixNano:i.longs===String?_.Long.prototype.toString.call(c.endTimeUnixNano):i.longs===Number?new _.LongBits(c.endTimeUnixNano.low>>>0,c.endTimeUnixNano.high>>>0).toNumber():c.endTimeUnixNano),c.attributes&&c.attributes.length){h.attributes=[];for(var P=0;P>>3){case 1:P.timeUnixNano=i.fixed64();break;case 2:P.name=i.string();break;case 3:P.attributes&&P.attributes.length||(P.attributes=[]),P.attributes.push(g.opentelemetry.proto.common.v1.KeyValue.decode(i,i.uint32()));break;case 4:P.droppedAttributesCount=i.uint32();break;default:i.skipType(7&V)}}return P},b.decodeDelimited=function(i){return i instanceof s||(i=new s(i)),this.decode(i,i.uint32())},b.verify=function(i){if("object"!=typeof i||null===i)return"object expected";if(null!=i.timeUnixNano&&i.hasOwnProperty("timeUnixNano")&&!_.isInteger(i.timeUnixNano)&&!(i.timeUnixNano&&_.isInteger(i.timeUnixNano.low)&&_.isInteger(i.timeUnixNano.high)))return"timeUnixNano: integer|Long expected";if(null!=i.name&&i.hasOwnProperty("name")&&!_.isString(i.name))return"name: string expected";if(null!=i.attributes&&i.hasOwnProperty("attributes")){if(!Array.isArray(i.attributes))return"attributes: array expected";for(var h=0;h>>0,i.timeUnixNano.high>>>0).toNumber())),null!=i.name&&(h.name=String(i.name)),i.attributes){if(!Array.isArray(i.attributes))throw TypeError(".opentelemetry.proto.trace.v1.Span.Event.attributes: array expected");h.attributes=[];for(var A=0;A>>0),h},b.toObject=function(i,h){h||(h={});var A={};if((h.arrays||h.defaults)&&(A.attributes=[]),h.defaults){if(_.Long){var P=new _.Long(0,0,!1);A.timeUnixNano=h.longs===String?P.toString():h.longs===Number?P.toNumber():P}else A.timeUnixNano=h.longs===String?"0":0;A.name="",A.droppedAttributesCount=0}if(null!=i.timeUnixNano&&i.hasOwnProperty("timeUnixNano")&&(A.timeUnixNano="number"==typeof i.timeUnixNano?h.longs===String?String(i.timeUnixNano):i.timeUnixNano:h.longs===String?_.Long.prototype.toString.call(i.timeUnixNano):h.longs===Number?new _.LongBits(i.timeUnixNano.low>>>0,i.timeUnixNano.high>>>0).toNumber():i.timeUnixNano),null!=i.name&&i.hasOwnProperty("name")&&(A.name=i.name),i.attributes&&i.attributes.length){A.attributes=[];for(var V=0;V>>3){case 1:P.traceId=i.bytes();break;case 2:P.spanId=i.bytes();break;case 3:P.traceState=i.string();break;case 4:P.attributes&&P.attributes.length||(P.attributes=[]),P.attributes.push(g.opentelemetry.proto.common.v1.KeyValue.decode(i,i.uint32()));break;case 5:P.droppedAttributesCount=i.uint32();break;default:i.skipType(7&V)}}return P},b.decodeDelimited=function(i){return i instanceof s||(i=new s(i)),this.decode(i,i.uint32())},b.verify=function(i){if("object"!=typeof i||null===i)return"object expected";if(null!=i.traceId&&i.hasOwnProperty("traceId")&&!(i.traceId&&"number"==typeof i.traceId.length||_.isString(i.traceId)))return"traceId: buffer expected";if(null!=i.spanId&&i.hasOwnProperty("spanId")&&!(i.spanId&&"number"==typeof i.spanId.length||_.isString(i.spanId)))return"spanId: buffer expected";if(null!=i.traceState&&i.hasOwnProperty("traceState")&&!_.isString(i.traceState))return"traceState: string expected";if(null!=i.attributes&&i.hasOwnProperty("attributes")){if(!Array.isArray(i.attributes))return"attributes: array expected";for(var h=0;h=0&&(h.traceId=i.traceId)),null!=i.spanId&&("string"==typeof i.spanId?_.base64.decode(i.spanId,h.spanId=_.newBuffer(_.base64.length(i.spanId)),0):i.spanId.length>=0&&(h.spanId=i.spanId)),null!=i.traceState&&(h.traceState=String(i.traceState)),i.attributes){if(!Array.isArray(i.attributes))throw TypeError(".opentelemetry.proto.trace.v1.Span.Link.attributes: array expected");h.attributes=[];for(var A=0;A>>0),h},b.toObject=function(i,h){h||(h={});var A={};if((h.arrays||h.defaults)&&(A.attributes=[]),h.defaults&&(h.bytes===String?A.traceId="":(A.traceId=[],h.bytes!==Array&&(A.traceId=_.newBuffer(A.traceId))),h.bytes===String?A.spanId="":(A.spanId=[],h.bytes!==Array&&(A.spanId=_.newBuffer(A.spanId))),A.traceState="",A.droppedAttributesCount=0),null!=i.traceId&&i.hasOwnProperty("traceId")&&(A.traceId=h.bytes===String?_.base64.encode(i.traceId,0,i.traceId.length):h.bytes===Array?Array.prototype.slice.call(i.traceId):i.traceId),null!=i.spanId&&i.hasOwnProperty("spanId")&&(A.spanId=h.bytes===String?_.base64.encode(i.spanId,0,i.spanId.length):h.bytes===Array?Array.prototype.slice.call(i.spanId):i.spanId),null!=i.traceState&&i.hasOwnProperty("traceState")&&(A.traceState=i.traceState),i.attributes&&i.attributes.length){A.attributes=[];for(var P=0;P>>3){case 2:A.message=c.string();break;case 3:A.code=c.int32();break;default:c.skipType(7&P)}}return A},y.decodeDelimited=function(c){return c instanceof s||(c=new s(c)),this.decode(c,c.uint32())},y.verify=function(c){if("object"!=typeof c||null===c)return"object expected";if(null!=c.message&&c.hasOwnProperty("message")&&!_.isString(c.message))return"message: string expected";if(null!=c.code&&c.hasOwnProperty("code"))switch(c.code){default:return"code: enum value expected";case 0:case 1:case 2:}return null},y.fromObject=function(c){if(c instanceof g.opentelemetry.proto.trace.v1.Status)return c;var i=new g.opentelemetry.proto.trace.v1.Status;switch(null!=c.message&&(i.message=String(c.message)),c.code){default:if("number"==typeof c.code){i.code=c.code;break}break;case"STATUS_CODE_UNSET":case 0:i.code=0;break;case"STATUS_CODE_OK":case 1:i.code=1;break;case"STATUS_CODE_ERROR":case 2:i.code=2}return i},y.toObject=function(c,i){i||(i={});var h={};return i.defaults&&(h.message="",h.code=i.enums===String?"STATUS_CODE_UNSET":0),null!=c.message&&c.hasOwnProperty("message")&&(h.message=c.message),null!=c.code&&c.hasOwnProperty("code")&&(h.code=i.enums===String?void 0===g.opentelemetry.proto.trace.v1.Status.StatusCode[c.code]?c.code:g.opentelemetry.proto.trace.v1.Status.StatusCode[c.code]:c.code),h},y.prototype.toJSON=function(){return this.constructor.toObject(this,r.util.toJSONOptions)},y.getTypeUrl=function(c){return void 0===c&&(c="type.googleapis.com"),c+"/opentelemetry.proto.trace.v1.Status"},y.StatusCode=(b={},(c=Object.create(b))[b[0]="STATUS_CODE_UNSET"]=0,c[b[1]="STATUS_CODE_OK"]=1,c[b[2]="STATUS_CODE_ERROR"]=2,c),y;var b,c}(),M}(),x}(),T.collector=function(){var x={};return x.trace=function(){var y,M={};return M.v1=((y={}).TraceService=function(){function b(c,i,h){r.rpc.Service.call(this,c,i,h)}return(b.prototype=Object.create(r.rpc.Service.prototype)).constructor=b,b.create=function(i,h,A){return new this(i,h,A)},Object.defineProperty(b.prototype.export=function c(i,h){return this.rpcCall(c,g.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest,g.opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse,i,h)},"name",{value:"Export"}),b}(),y.ExportTraceServiceRequest=function(){function b(c){if(this.resourceSpans=[],c)for(var i=Object.keys(c),h=0;h>>3==1?(P.resourceSpans&&P.resourceSpans.length||(P.resourceSpans=[]),P.resourceSpans.push(g.opentelemetry.proto.trace.v1.ResourceSpans.decode(i,i.uint32()))):i.skipType(7&V)}return P},b.decodeDelimited=function(i){return i instanceof s||(i=new s(i)),this.decode(i,i.uint32())},b.verify=function(i){if("object"!=typeof i||null===i)return"object expected";if(null!=i.resourceSpans&&i.hasOwnProperty("resourceSpans")){if(!Array.isArray(i.resourceSpans))return"resourceSpans: array expected";for(var h=0;h>>3==1?P.partialSuccess=g.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.decode(i,i.uint32()):i.skipType(7&V)}return P},b.decodeDelimited=function(i){return i instanceof s||(i=new s(i)),this.decode(i,i.uint32())},b.verify=function(i){if("object"!=typeof i||null===i)return"object expected";if(null!=i.partialSuccess&&i.hasOwnProperty("partialSuccess")){var h=g.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.verify(i.partialSuccess);if(h)return"partialSuccess."+h}return null},b.fromObject=function(i){if(i instanceof g.opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse)return i;var h=new g.opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse;if(null!=i.partialSuccess){if("object"!=typeof i.partialSuccess)throw TypeError(".opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse.partialSuccess: object expected");h.partialSuccess=g.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.fromObject(i.partialSuccess)}return h},b.toObject=function(i,h){h||(h={});var A={};return h.defaults&&(A.partialSuccess=null),null!=i.partialSuccess&&i.hasOwnProperty("partialSuccess")&&(A.partialSuccess=g.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.toObject(i.partialSuccess,h)),A},b.prototype.toJSON=function(){return this.constructor.toObject(this,r.util.toJSONOptions)},b.getTypeUrl=function(i){return void 0===i&&(i="type.googleapis.com"),i+"/opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse"},b}(),y.ExportTracePartialSuccess=function(){function b(c){if(c)for(var i=Object.keys(c),h=0;h>>3){case 1:P.rejectedSpans=i.int64();break;case 2:P.errorMessage=i.string();break;default:i.skipType(7&V)}}return P},b.decodeDelimited=function(i){return i instanceof s||(i=new s(i)),this.decode(i,i.uint32())},b.verify=function(i){return"object"!=typeof i||null===i?"object expected":null==i.rejectedSpans||!i.hasOwnProperty("rejectedSpans")||_.isInteger(i.rejectedSpans)||i.rejectedSpans&&_.isInteger(i.rejectedSpans.low)&&_.isInteger(i.rejectedSpans.high)?null!=i.errorMessage&&i.hasOwnProperty("errorMessage")&&!_.isString(i.errorMessage)?"errorMessage: string expected":null:"rejectedSpans: integer|Long expected"},b.fromObject=function(i){if(i instanceof g.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess)return i;var h=new g.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess;return null!=i.rejectedSpans&&(_.Long?(h.rejectedSpans=_.Long.fromValue(i.rejectedSpans)).unsigned=!1:"string"==typeof i.rejectedSpans?h.rejectedSpans=parseInt(i.rejectedSpans,10):"number"==typeof i.rejectedSpans?h.rejectedSpans=i.rejectedSpans:"object"==typeof i.rejectedSpans&&(h.rejectedSpans=new _.LongBits(i.rejectedSpans.low>>>0,i.rejectedSpans.high>>>0).toNumber())),null!=i.errorMessage&&(h.errorMessage=String(i.errorMessage)),h},b.toObject=function(i,h){h||(h={});var A={};if(h.defaults){if(_.Long){var P=new _.Long(0,0,!1);A.rejectedSpans=h.longs===String?P.toString():h.longs===Number?P.toNumber():P}else A.rejectedSpans=h.longs===String?"0":0;A.errorMessage=""}return null!=i.rejectedSpans&&i.hasOwnProperty("rejectedSpans")&&(A.rejectedSpans="number"==typeof i.rejectedSpans?h.longs===String?String(i.rejectedSpans):i.rejectedSpans:h.longs===String?_.Long.prototype.toString.call(i.rejectedSpans):h.longs===Number?new _.LongBits(i.rejectedSpans.low>>>0,i.rejectedSpans.high>>>0).toNumber():i.rejectedSpans),null!=i.errorMessage&&i.hasOwnProperty("errorMessage")&&(A.errorMessage=i.errorMessage),A},b.prototype.toJSON=function(){return this.constructor.toObject(this,r.util.toJSONOptions)},b.getTypeUrl=function(i){return void 0===i&&(i="type.googleapis.com"),i+"/opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess"},b}(),y),M}(),x.metrics=function(){var y,M={};return M.v1=((y={}).MetricsService=function(){function b(c,i,h){r.rpc.Service.call(this,c,i,h)}return(b.prototype=Object.create(r.rpc.Service.prototype)).constructor=b,b.create=function(i,h,A){return new this(i,h,A)},Object.defineProperty(b.prototype.export=function c(i,h){return this.rpcCall(c,g.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest,g.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse,i,h)},"name",{value:"Export"}),b}(),y.ExportMetricsServiceRequest=function(){function b(c){if(this.resourceMetrics=[],c)for(var i=Object.keys(c),h=0;h>>3==1?(P.resourceMetrics&&P.resourceMetrics.length||(P.resourceMetrics=[]),P.resourceMetrics.push(g.opentelemetry.proto.metrics.v1.ResourceMetrics.decode(i,i.uint32()))):i.skipType(7&V)}return P},b.decodeDelimited=function(i){return i instanceof s||(i=new s(i)),this.decode(i,i.uint32())},b.verify=function(i){if("object"!=typeof i||null===i)return"object expected";if(null!=i.resourceMetrics&&i.hasOwnProperty("resourceMetrics")){if(!Array.isArray(i.resourceMetrics))return"resourceMetrics: array expected";for(var h=0;h>>3==1?P.partialSuccess=g.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.decode(i,i.uint32()):i.skipType(7&V)}return P},b.decodeDelimited=function(i){return i instanceof s||(i=new s(i)),this.decode(i,i.uint32())},b.verify=function(i){if("object"!=typeof i||null===i)return"object expected";if(null!=i.partialSuccess&&i.hasOwnProperty("partialSuccess")){var h=g.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.verify(i.partialSuccess);if(h)return"partialSuccess."+h}return null},b.fromObject=function(i){if(i instanceof g.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse)return i;var h=new g.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse;if(null!=i.partialSuccess){if("object"!=typeof i.partialSuccess)throw TypeError(".opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse.partialSuccess: object expected");h.partialSuccess=g.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.fromObject(i.partialSuccess)}return h},b.toObject=function(i,h){h||(h={});var A={};return h.defaults&&(A.partialSuccess=null),null!=i.partialSuccess&&i.hasOwnProperty("partialSuccess")&&(A.partialSuccess=g.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.toObject(i.partialSuccess,h)),A},b.prototype.toJSON=function(){return this.constructor.toObject(this,r.util.toJSONOptions)},b.getTypeUrl=function(i){return void 0===i&&(i="type.googleapis.com"),i+"/opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse"},b}(),y.ExportMetricsPartialSuccess=function(){function b(c){if(c)for(var i=Object.keys(c),h=0;h>>3){case 1:P.rejectedDataPoints=i.int64();break;case 2:P.errorMessage=i.string();break;default:i.skipType(7&V)}}return P},b.decodeDelimited=function(i){return i instanceof s||(i=new s(i)),this.decode(i,i.uint32())},b.verify=function(i){return"object"!=typeof i||null===i?"object expected":null==i.rejectedDataPoints||!i.hasOwnProperty("rejectedDataPoints")||_.isInteger(i.rejectedDataPoints)||i.rejectedDataPoints&&_.isInteger(i.rejectedDataPoints.low)&&_.isInteger(i.rejectedDataPoints.high)?null!=i.errorMessage&&i.hasOwnProperty("errorMessage")&&!_.isString(i.errorMessage)?"errorMessage: string expected":null:"rejectedDataPoints: integer|Long expected"},b.fromObject=function(i){if(i instanceof g.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess)return i;var h=new g.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess;return null!=i.rejectedDataPoints&&(_.Long?(h.rejectedDataPoints=_.Long.fromValue(i.rejectedDataPoints)).unsigned=!1:"string"==typeof i.rejectedDataPoints?h.rejectedDataPoints=parseInt(i.rejectedDataPoints,10):"number"==typeof i.rejectedDataPoints?h.rejectedDataPoints=i.rejectedDataPoints:"object"==typeof i.rejectedDataPoints&&(h.rejectedDataPoints=new _.LongBits(i.rejectedDataPoints.low>>>0,i.rejectedDataPoints.high>>>0).toNumber())),null!=i.errorMessage&&(h.errorMessage=String(i.errorMessage)),h},b.toObject=function(i,h){h||(h={});var A={};if(h.defaults){if(_.Long){var P=new _.Long(0,0,!1);A.rejectedDataPoints=h.longs===String?P.toString():h.longs===Number?P.toNumber():P}else A.rejectedDataPoints=h.longs===String?"0":0;A.errorMessage=""}return null!=i.rejectedDataPoints&&i.hasOwnProperty("rejectedDataPoints")&&(A.rejectedDataPoints="number"==typeof i.rejectedDataPoints?h.longs===String?String(i.rejectedDataPoints):i.rejectedDataPoints:h.longs===String?_.Long.prototype.toString.call(i.rejectedDataPoints):h.longs===Number?new _.LongBits(i.rejectedDataPoints.low>>>0,i.rejectedDataPoints.high>>>0).toNumber():i.rejectedDataPoints),null!=i.errorMessage&&i.hasOwnProperty("errorMessage")&&(A.errorMessage=i.errorMessage),A},b.prototype.toJSON=function(){return this.constructor.toObject(this,r.util.toJSONOptions)},b.getTypeUrl=function(i){return void 0===i&&(i="type.googleapis.com"),i+"/opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess"},b}(),y),M}(),x.logs=function(){var y,M={};return M.v1=((y={}).LogsService=function(){function b(c,i,h){r.rpc.Service.call(this,c,i,h)}return(b.prototype=Object.create(r.rpc.Service.prototype)).constructor=b,b.create=function(i,h,A){return new this(i,h,A)},Object.defineProperty(b.prototype.export=function c(i,h){return this.rpcCall(c,g.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest,g.opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse,i,h)},"name",{value:"Export"}),b}(),y.ExportLogsServiceRequest=function(){function b(c){if(this.resourceLogs=[],c)for(var i=Object.keys(c),h=0;h>>3==1?(P.resourceLogs&&P.resourceLogs.length||(P.resourceLogs=[]),P.resourceLogs.push(g.opentelemetry.proto.logs.v1.ResourceLogs.decode(i,i.uint32()))):i.skipType(7&V)}return P},b.decodeDelimited=function(i){return i instanceof s||(i=new s(i)),this.decode(i,i.uint32())},b.verify=function(i){if("object"!=typeof i||null===i)return"object expected";if(null!=i.resourceLogs&&i.hasOwnProperty("resourceLogs")){if(!Array.isArray(i.resourceLogs))return"resourceLogs: array expected";for(var h=0;h>>3==1?P.partialSuccess=g.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.decode(i,i.uint32()):i.skipType(7&V)}return P},b.decodeDelimited=function(i){return i instanceof s||(i=new s(i)),this.decode(i,i.uint32())},b.verify=function(i){if("object"!=typeof i||null===i)return"object expected";if(null!=i.partialSuccess&&i.hasOwnProperty("partialSuccess")){var h=g.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.verify(i.partialSuccess);if(h)return"partialSuccess."+h}return null},b.fromObject=function(i){if(i instanceof g.opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse)return i;var h=new g.opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse;if(null!=i.partialSuccess){if("object"!=typeof i.partialSuccess)throw TypeError(".opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse.partialSuccess: object expected");h.partialSuccess=g.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.fromObject(i.partialSuccess)}return h},b.toObject=function(i,h){h||(h={});var A={};return h.defaults&&(A.partialSuccess=null),null!=i.partialSuccess&&i.hasOwnProperty("partialSuccess")&&(A.partialSuccess=g.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.toObject(i.partialSuccess,h)),A},b.prototype.toJSON=function(){return this.constructor.toObject(this,r.util.toJSONOptions)},b.getTypeUrl=function(i){return void 0===i&&(i="type.googleapis.com"),i+"/opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse"},b}(),y.ExportLogsPartialSuccess=function(){function b(c){if(c)for(var i=Object.keys(c),h=0;h>>3){case 1:P.rejectedLogRecords=i.int64();break;case 2:P.errorMessage=i.string();break;default:i.skipType(7&V)}}return P},b.decodeDelimited=function(i){return i instanceof s||(i=new s(i)),this.decode(i,i.uint32())},b.verify=function(i){return"object"!=typeof i||null===i?"object expected":null==i.rejectedLogRecords||!i.hasOwnProperty("rejectedLogRecords")||_.isInteger(i.rejectedLogRecords)||i.rejectedLogRecords&&_.isInteger(i.rejectedLogRecords.low)&&_.isInteger(i.rejectedLogRecords.high)?null!=i.errorMessage&&i.hasOwnProperty("errorMessage")&&!_.isString(i.errorMessage)?"errorMessage: string expected":null:"rejectedLogRecords: integer|Long expected"},b.fromObject=function(i){if(i instanceof g.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess)return i;var h=new g.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess;return null!=i.rejectedLogRecords&&(_.Long?(h.rejectedLogRecords=_.Long.fromValue(i.rejectedLogRecords)).unsigned=!1:"string"==typeof i.rejectedLogRecords?h.rejectedLogRecords=parseInt(i.rejectedLogRecords,10):"number"==typeof i.rejectedLogRecords?h.rejectedLogRecords=i.rejectedLogRecords:"object"==typeof i.rejectedLogRecords&&(h.rejectedLogRecords=new _.LongBits(i.rejectedLogRecords.low>>>0,i.rejectedLogRecords.high>>>0).toNumber())),null!=i.errorMessage&&(h.errorMessage=String(i.errorMessage)),h},b.toObject=function(i,h){h||(h={});var A={};if(h.defaults){if(_.Long){var P=new _.Long(0,0,!1);A.rejectedLogRecords=h.longs===String?P.toString():h.longs===Number?P.toNumber():P}else A.rejectedLogRecords=h.longs===String?"0":0;A.errorMessage=""}return null!=i.rejectedLogRecords&&i.hasOwnProperty("rejectedLogRecords")&&(A.rejectedLogRecords="number"==typeof i.rejectedLogRecords?h.longs===String?String(i.rejectedLogRecords):i.rejectedLogRecords:h.longs===String?_.Long.prototype.toString.call(i.rejectedLogRecords):h.longs===Number?new _.LongBits(i.rejectedLogRecords.low>>>0,i.rejectedLogRecords.high>>>0).toNumber():i.rejectedLogRecords),null!=i.errorMessage&&i.hasOwnProperty("errorMessage")&&(A.errorMessage=i.errorMessage),A},b.prototype.toJSON=function(){return this.constructor.toObject(this,r.util.toJSONOptions)},b.getTypeUrl=function(i){return void 0===i&&(i="type.googleapis.com"),i+"/opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess"},b}(),y),M}(),x}(),T.metrics=function(){var x={};return x.v1=function(){var y,b,M={};return M.MetricsData=function(){function y(b){if(this.resourceMetrics=[],b)for(var c=Object.keys(b),i=0;i>>3==1?(A.resourceMetrics&&A.resourceMetrics.length||(A.resourceMetrics=[]),A.resourceMetrics.push(g.opentelemetry.proto.metrics.v1.ResourceMetrics.decode(c,c.uint32()))):c.skipType(7&P)}return A},y.decodeDelimited=function(c){return c instanceof s||(c=new s(c)),this.decode(c,c.uint32())},y.verify=function(c){if("object"!=typeof c||null===c)return"object expected";if(null!=c.resourceMetrics&&c.hasOwnProperty("resourceMetrics")){if(!Array.isArray(c.resourceMetrics))return"resourceMetrics: array expected";for(var i=0;i>>3){case 1:A.resource=g.opentelemetry.proto.resource.v1.Resource.decode(c,c.uint32());break;case 2:A.scopeMetrics&&A.scopeMetrics.length||(A.scopeMetrics=[]),A.scopeMetrics.push(g.opentelemetry.proto.metrics.v1.ScopeMetrics.decode(c,c.uint32()));break;case 3:A.schemaUrl=c.string();break;default:c.skipType(7&P)}}return A},y.decodeDelimited=function(c){return c instanceof s||(c=new s(c)),this.decode(c,c.uint32())},y.verify=function(c){if("object"!=typeof c||null===c)return"object expected";if(null!=c.resource&&c.hasOwnProperty("resource")&&(i=g.opentelemetry.proto.resource.v1.Resource.verify(c.resource)))return"resource."+i;if(null!=c.scopeMetrics&&c.hasOwnProperty("scopeMetrics")){if(!Array.isArray(c.scopeMetrics))return"scopeMetrics: array expected";for(var h=0;h>>3){case 1:A.scope=g.opentelemetry.proto.common.v1.InstrumentationScope.decode(c,c.uint32());break;case 2:A.metrics&&A.metrics.length||(A.metrics=[]),A.metrics.push(g.opentelemetry.proto.metrics.v1.Metric.decode(c,c.uint32()));break;case 3:A.schemaUrl=c.string();break;default:c.skipType(7&P)}}return A},y.decodeDelimited=function(c){return c instanceof s||(c=new s(c)),this.decode(c,c.uint32())},y.verify=function(c){if("object"!=typeof c||null===c)return"object expected";if(null!=c.scope&&c.hasOwnProperty("scope")&&(i=g.opentelemetry.proto.common.v1.InstrumentationScope.verify(c.scope)))return"scope."+i;if(null!=c.metrics&&c.hasOwnProperty("metrics")){if(!Array.isArray(c.metrics))return"metrics: array expected";for(var h=0;h>>3){case 1:P.name=i.string();break;case 2:P.description=i.string();break;case 3:P.unit=i.string();break;case 5:P.gauge=g.opentelemetry.proto.metrics.v1.Gauge.decode(i,i.uint32());break;case 7:P.sum=g.opentelemetry.proto.metrics.v1.Sum.decode(i,i.uint32());break;case 9:P.histogram=g.opentelemetry.proto.metrics.v1.Histogram.decode(i,i.uint32());break;case 10:P.exponentialHistogram=g.opentelemetry.proto.metrics.v1.ExponentialHistogram.decode(i,i.uint32());break;case 11:P.summary=g.opentelemetry.proto.metrics.v1.Summary.decode(i,i.uint32());break;default:i.skipType(7&V)}}return P},y.decodeDelimited=function(i){return i instanceof s||(i=new s(i)),this.decode(i,i.uint32())},y.verify=function(i){if("object"!=typeof i||null===i)return"object expected";var h={};if(null!=i.name&&i.hasOwnProperty("name")&&!_.isString(i.name))return"name: string expected";if(null!=i.description&&i.hasOwnProperty("description")&&!_.isString(i.description))return"description: string expected";if(null!=i.unit&&i.hasOwnProperty("unit")&&!_.isString(i.unit))return"unit: string expected";if(null!=i.gauge&&i.hasOwnProperty("gauge")&&(h.data=1,A=g.opentelemetry.proto.metrics.v1.Gauge.verify(i.gauge)))return"gauge."+A;if(null!=i.sum&&i.hasOwnProperty("sum")){if(1===h.data)return"data: multiple values";if(h.data=1,A=g.opentelemetry.proto.metrics.v1.Sum.verify(i.sum))return"sum."+A}if(null!=i.histogram&&i.hasOwnProperty("histogram")){if(1===h.data)return"data: multiple values";if(h.data=1,A=g.opentelemetry.proto.metrics.v1.Histogram.verify(i.histogram))return"histogram."+A}if(null!=i.exponentialHistogram&&i.hasOwnProperty("exponentialHistogram")){if(1===h.data)return"data: multiple values";if(h.data=1,A=g.opentelemetry.proto.metrics.v1.ExponentialHistogram.verify(i.exponentialHistogram))return"exponentialHistogram."+A}if(null!=i.summary&&i.hasOwnProperty("summary")){if(1===h.data)return"data: multiple values";var A;if(h.data=1,A=g.opentelemetry.proto.metrics.v1.Summary.verify(i.summary))return"summary."+A}return null},y.fromObject=function(i){if(i instanceof g.opentelemetry.proto.metrics.v1.Metric)return i;var h=new g.opentelemetry.proto.metrics.v1.Metric;if(null!=i.name&&(h.name=String(i.name)),null!=i.description&&(h.description=String(i.description)),null!=i.unit&&(h.unit=String(i.unit)),null!=i.gauge){if("object"!=typeof i.gauge)throw TypeError(".opentelemetry.proto.metrics.v1.Metric.gauge: object expected");h.gauge=g.opentelemetry.proto.metrics.v1.Gauge.fromObject(i.gauge)}if(null!=i.sum){if("object"!=typeof i.sum)throw TypeError(".opentelemetry.proto.metrics.v1.Metric.sum: object expected");h.sum=g.opentelemetry.proto.metrics.v1.Sum.fromObject(i.sum)}if(null!=i.histogram){if("object"!=typeof i.histogram)throw TypeError(".opentelemetry.proto.metrics.v1.Metric.histogram: object expected");h.histogram=g.opentelemetry.proto.metrics.v1.Histogram.fromObject(i.histogram)}if(null!=i.exponentialHistogram){if("object"!=typeof i.exponentialHistogram)throw TypeError(".opentelemetry.proto.metrics.v1.Metric.exponentialHistogram: object expected");h.exponentialHistogram=g.opentelemetry.proto.metrics.v1.ExponentialHistogram.fromObject(i.exponentialHistogram)}if(null!=i.summary){if("object"!=typeof i.summary)throw TypeError(".opentelemetry.proto.metrics.v1.Metric.summary: object expected");h.summary=g.opentelemetry.proto.metrics.v1.Summary.fromObject(i.summary)}return h},y.toObject=function(i,h){h||(h={});var A={};return h.defaults&&(A.name="",A.description="",A.unit=""),null!=i.name&&i.hasOwnProperty("name")&&(A.name=i.name),null!=i.description&&i.hasOwnProperty("description")&&(A.description=i.description),null!=i.unit&&i.hasOwnProperty("unit")&&(A.unit=i.unit),null!=i.gauge&&i.hasOwnProperty("gauge")&&(A.gauge=g.opentelemetry.proto.metrics.v1.Gauge.toObject(i.gauge,h),h.oneofs&&(A.data="gauge")),null!=i.sum&&i.hasOwnProperty("sum")&&(A.sum=g.opentelemetry.proto.metrics.v1.Sum.toObject(i.sum,h),h.oneofs&&(A.data="sum")),null!=i.histogram&&i.hasOwnProperty("histogram")&&(A.histogram=g.opentelemetry.proto.metrics.v1.Histogram.toObject(i.histogram,h),h.oneofs&&(A.data="histogram")),null!=i.exponentialHistogram&&i.hasOwnProperty("exponentialHistogram")&&(A.exponentialHistogram=g.opentelemetry.proto.metrics.v1.ExponentialHistogram.toObject(i.exponentialHistogram,h),h.oneofs&&(A.data="exponentialHistogram")),null!=i.summary&&i.hasOwnProperty("summary")&&(A.summary=g.opentelemetry.proto.metrics.v1.Summary.toObject(i.summary,h),h.oneofs&&(A.data="summary")),A},y.prototype.toJSON=function(){return this.constructor.toObject(this,r.util.toJSONOptions)},y.getTypeUrl=function(i){return void 0===i&&(i="type.googleapis.com"),i+"/opentelemetry.proto.metrics.v1.Metric"},y}(),M.Gauge=function(){function y(b){if(this.dataPoints=[],b)for(var c=Object.keys(b),i=0;i>>3==1?(A.dataPoints&&A.dataPoints.length||(A.dataPoints=[]),A.dataPoints.push(g.opentelemetry.proto.metrics.v1.NumberDataPoint.decode(c,c.uint32()))):c.skipType(7&P)}return A},y.decodeDelimited=function(c){return c instanceof s||(c=new s(c)),this.decode(c,c.uint32())},y.verify=function(c){if("object"!=typeof c||null===c)return"object expected";if(null!=c.dataPoints&&c.hasOwnProperty("dataPoints")){if(!Array.isArray(c.dataPoints))return"dataPoints: array expected";for(var i=0;i>>3){case 1:A.dataPoints&&A.dataPoints.length||(A.dataPoints=[]),A.dataPoints.push(g.opentelemetry.proto.metrics.v1.NumberDataPoint.decode(c,c.uint32()));break;case 2:A.aggregationTemporality=c.int32();break;case 3:A.isMonotonic=c.bool();break;default:c.skipType(7&P)}}return A},y.decodeDelimited=function(c){return c instanceof s||(c=new s(c)),this.decode(c,c.uint32())},y.verify=function(c){if("object"!=typeof c||null===c)return"object expected";if(null!=c.dataPoints&&c.hasOwnProperty("dataPoints")){if(!Array.isArray(c.dataPoints))return"dataPoints: array expected";for(var i=0;i>>3){case 1:A.dataPoints&&A.dataPoints.length||(A.dataPoints=[]),A.dataPoints.push(g.opentelemetry.proto.metrics.v1.HistogramDataPoint.decode(c,c.uint32()));break;case 2:A.aggregationTemporality=c.int32();break;default:c.skipType(7&P)}}return A},y.decodeDelimited=function(c){return c instanceof s||(c=new s(c)),this.decode(c,c.uint32())},y.verify=function(c){if("object"!=typeof c||null===c)return"object expected";if(null!=c.dataPoints&&c.hasOwnProperty("dataPoints")){if(!Array.isArray(c.dataPoints))return"dataPoints: array expected";for(var i=0;i>>3){case 1:A.dataPoints&&A.dataPoints.length||(A.dataPoints=[]),A.dataPoints.push(g.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.decode(c,c.uint32()));break;case 2:A.aggregationTemporality=c.int32();break;default:c.skipType(7&P)}}return A},y.decodeDelimited=function(c){return c instanceof s||(c=new s(c)),this.decode(c,c.uint32())},y.verify=function(c){if("object"!=typeof c||null===c)return"object expected";if(null!=c.dataPoints&&c.hasOwnProperty("dataPoints")){if(!Array.isArray(c.dataPoints))return"dataPoints: array expected";for(var i=0;i>>3==1?(A.dataPoints&&A.dataPoints.length||(A.dataPoints=[]),A.dataPoints.push(g.opentelemetry.proto.metrics.v1.SummaryDataPoint.decode(c,c.uint32()))):c.skipType(7&P)}return A},y.decodeDelimited=function(c){return c instanceof s||(c=new s(c)),this.decode(c,c.uint32())},y.verify=function(c){if("object"!=typeof c||null===c)return"object expected";if(null!=c.dataPoints&&c.hasOwnProperty("dataPoints")){if(!Array.isArray(c.dataPoints))return"dataPoints: array expected";for(var i=0;i>>3){case 7:P.attributes&&P.attributes.length||(P.attributes=[]),P.attributes.push(g.opentelemetry.proto.common.v1.KeyValue.decode(i,i.uint32()));break;case 2:P.startTimeUnixNano=i.fixed64();break;case 3:P.timeUnixNano=i.fixed64();break;case 4:P.asDouble=i.double();break;case 6:P.asInt=i.sfixed64();break;case 5:P.exemplars&&P.exemplars.length||(P.exemplars=[]),P.exemplars.push(g.opentelemetry.proto.metrics.v1.Exemplar.decode(i,i.uint32()));break;case 8:P.flags=i.uint32();break;default:i.skipType(7&V)}}return P},y.decodeDelimited=function(i){return i instanceof s||(i=new s(i)),this.decode(i,i.uint32())},y.verify=function(i){if("object"!=typeof i||null===i)return"object expected";var h={};if(null!=i.attributes&&i.hasOwnProperty("attributes")){if(!Array.isArray(i.attributes))return"attributes: array expected";for(var A=0;A>>0,i.startTimeUnixNano.high>>>0).toNumber())),null!=i.timeUnixNano&&(_.Long?(h.timeUnixNano=_.Long.fromValue(i.timeUnixNano)).unsigned=!1:"string"==typeof i.timeUnixNano?h.timeUnixNano=parseInt(i.timeUnixNano,10):"number"==typeof i.timeUnixNano?h.timeUnixNano=i.timeUnixNano:"object"==typeof i.timeUnixNano&&(h.timeUnixNano=new _.LongBits(i.timeUnixNano.low>>>0,i.timeUnixNano.high>>>0).toNumber())),null!=i.asDouble&&(h.asDouble=Number(i.asDouble)),null!=i.asInt&&(_.Long?(h.asInt=_.Long.fromValue(i.asInt)).unsigned=!1:"string"==typeof i.asInt?h.asInt=parseInt(i.asInt,10):"number"==typeof i.asInt?h.asInt=i.asInt:"object"==typeof i.asInt&&(h.asInt=new _.LongBits(i.asInt.low>>>0,i.asInt.high>>>0).toNumber())),i.exemplars){if(!Array.isArray(i.exemplars))throw TypeError(".opentelemetry.proto.metrics.v1.NumberDataPoint.exemplars: array expected");for(h.exemplars=[],A=0;A>>0),h},y.toObject=function(i,h){h||(h={});var A={};if((h.arrays||h.defaults)&&(A.exemplars=[],A.attributes=[]),h.defaults){if(_.Long){var P=new _.Long(0,0,!1);A.startTimeUnixNano=h.longs===String?P.toString():h.longs===Number?P.toNumber():P}else A.startTimeUnixNano=h.longs===String?"0":0;_.Long?(P=new _.Long(0,0,!1),A.timeUnixNano=h.longs===String?P.toString():h.longs===Number?P.toNumber():P):A.timeUnixNano=h.longs===String?"0":0,A.flags=0}if(null!=i.startTimeUnixNano&&i.hasOwnProperty("startTimeUnixNano")&&(A.startTimeUnixNano="number"==typeof i.startTimeUnixNano?h.longs===String?String(i.startTimeUnixNano):i.startTimeUnixNano:h.longs===String?_.Long.prototype.toString.call(i.startTimeUnixNano):h.longs===Number?new _.LongBits(i.startTimeUnixNano.low>>>0,i.startTimeUnixNano.high>>>0).toNumber():i.startTimeUnixNano),null!=i.timeUnixNano&&i.hasOwnProperty("timeUnixNano")&&(A.timeUnixNano="number"==typeof i.timeUnixNano?h.longs===String?String(i.timeUnixNano):i.timeUnixNano:h.longs===String?_.Long.prototype.toString.call(i.timeUnixNano):h.longs===Number?new _.LongBits(i.timeUnixNano.low>>>0,i.timeUnixNano.high>>>0).toNumber():i.timeUnixNano),null!=i.asDouble&&i.hasOwnProperty("asDouble")&&(A.asDouble=h.json&&!isFinite(i.asDouble)?String(i.asDouble):i.asDouble,h.oneofs&&(A.value="asDouble")),i.exemplars&&i.exemplars.length){A.exemplars=[];for(var V=0;V>>0,i.asInt.high>>>0).toNumber():i.asInt,h.oneofs&&(A.value="asInt")),i.attributes&&i.attributes.length)for(A.attributes=[],V=0;V>>3){case 9:P.attributes&&P.attributes.length||(P.attributes=[]),P.attributes.push(g.opentelemetry.proto.common.v1.KeyValue.decode(i,i.uint32()));break;case 2:P.startTimeUnixNano=i.fixed64();break;case 3:P.timeUnixNano=i.fixed64();break;case 4:P.count=i.fixed64();break;case 5:P.sum=i.double();break;case 6:if(P.bucketCounts&&P.bucketCounts.length||(P.bucketCounts=[]),2==(7&V))for(var B=i.uint32()+i.pos;i.pos>>0,i.startTimeUnixNano.high>>>0).toNumber())),null!=i.timeUnixNano&&(_.Long?(h.timeUnixNano=_.Long.fromValue(i.timeUnixNano)).unsigned=!1:"string"==typeof i.timeUnixNano?h.timeUnixNano=parseInt(i.timeUnixNano,10):"number"==typeof i.timeUnixNano?h.timeUnixNano=i.timeUnixNano:"object"==typeof i.timeUnixNano&&(h.timeUnixNano=new _.LongBits(i.timeUnixNano.low>>>0,i.timeUnixNano.high>>>0).toNumber())),null!=i.count&&(_.Long?(h.count=_.Long.fromValue(i.count)).unsigned=!1:"string"==typeof i.count?h.count=parseInt(i.count,10):"number"==typeof i.count?h.count=i.count:"object"==typeof i.count&&(h.count=new _.LongBits(i.count.low>>>0,i.count.high>>>0).toNumber())),null!=i.sum&&(h.sum=Number(i.sum)),i.bucketCounts){if(!Array.isArray(i.bucketCounts))throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.bucketCounts: array expected");for(h.bucketCounts=[],A=0;A>>0,i.bucketCounts[A].high>>>0).toNumber())}if(i.explicitBounds){if(!Array.isArray(i.explicitBounds))throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.explicitBounds: array expected");for(h.explicitBounds=[],A=0;A>>0),null!=i.min&&(h.min=Number(i.min)),null!=i.max&&(h.max=Number(i.max)),h},y.toObject=function(i,h){h||(h={});var A={};if((h.arrays||h.defaults)&&(A.bucketCounts=[],A.explicitBounds=[],A.exemplars=[],A.attributes=[]),h.defaults){if(_.Long){var P=new _.Long(0,0,!1);A.startTimeUnixNano=h.longs===String?P.toString():h.longs===Number?P.toNumber():P}else A.startTimeUnixNano=h.longs===String?"0":0;_.Long?(P=new _.Long(0,0,!1),A.timeUnixNano=h.longs===String?P.toString():h.longs===Number?P.toNumber():P):A.timeUnixNano=h.longs===String?"0":0,_.Long?(P=new _.Long(0,0,!1),A.count=h.longs===String?P.toString():h.longs===Number?P.toNumber():P):A.count=h.longs===String?"0":0,A.flags=0}if(null!=i.startTimeUnixNano&&i.hasOwnProperty("startTimeUnixNano")&&(A.startTimeUnixNano="number"==typeof i.startTimeUnixNano?h.longs===String?String(i.startTimeUnixNano):i.startTimeUnixNano:h.longs===String?_.Long.prototype.toString.call(i.startTimeUnixNano):h.longs===Number?new _.LongBits(i.startTimeUnixNano.low>>>0,i.startTimeUnixNano.high>>>0).toNumber():i.startTimeUnixNano),null!=i.timeUnixNano&&i.hasOwnProperty("timeUnixNano")&&(A.timeUnixNano="number"==typeof i.timeUnixNano?h.longs===String?String(i.timeUnixNano):i.timeUnixNano:h.longs===String?_.Long.prototype.toString.call(i.timeUnixNano):h.longs===Number?new _.LongBits(i.timeUnixNano.low>>>0,i.timeUnixNano.high>>>0).toNumber():i.timeUnixNano),null!=i.count&&i.hasOwnProperty("count")&&(A.count="number"==typeof i.count?h.longs===String?String(i.count):i.count:h.longs===String?_.Long.prototype.toString.call(i.count):h.longs===Number?new _.LongBits(i.count.low>>>0,i.count.high>>>0).toNumber():i.count),null!=i.sum&&i.hasOwnProperty("sum")&&(A.sum=h.json&&!isFinite(i.sum)?String(i.sum):i.sum,h.oneofs&&(A._sum="sum")),i.bucketCounts&&i.bucketCounts.length){A.bucketCounts=[];for(var V=0;V>>0,i.bucketCounts[V].high>>>0).toNumber():i.bucketCounts[V]}if(i.explicitBounds&&i.explicitBounds.length)for(A.explicitBounds=[],V=0;V>>3){case 1:P.attributes&&P.attributes.length||(P.attributes=[]),P.attributes.push(g.opentelemetry.proto.common.v1.KeyValue.decode(i,i.uint32()));break;case 2:P.startTimeUnixNano=i.fixed64();break;case 3:P.timeUnixNano=i.fixed64();break;case 4:P.count=i.fixed64();break;case 5:P.sum=i.double();break;case 6:P.scale=i.sint32();break;case 7:P.zeroCount=i.fixed64();break;case 8:P.positive=g.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.decode(i,i.uint32());break;case 9:P.negative=g.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.decode(i,i.uint32());break;case 10:P.flags=i.uint32();break;case 11:P.exemplars&&P.exemplars.length||(P.exemplars=[]),P.exemplars.push(g.opentelemetry.proto.metrics.v1.Exemplar.decode(i,i.uint32()));break;case 12:P.min=i.double();break;case 13:P.max=i.double();break;case 14:P.zeroThreshold=i.double();break;default:i.skipType(7&V)}}return P},y.decodeDelimited=function(i){return i instanceof s||(i=new s(i)),this.decode(i,i.uint32())},y.verify=function(i){if("object"!=typeof i||null===i)return"object expected";var h={};if(null!=i.attributes&&i.hasOwnProperty("attributes")){if(!Array.isArray(i.attributes))return"attributes: array expected";for(var A=0;A>>0,i.startTimeUnixNano.high>>>0).toNumber())),null!=i.timeUnixNano&&(_.Long?(h.timeUnixNano=_.Long.fromValue(i.timeUnixNano)).unsigned=!1:"string"==typeof i.timeUnixNano?h.timeUnixNano=parseInt(i.timeUnixNano,10):"number"==typeof i.timeUnixNano?h.timeUnixNano=i.timeUnixNano:"object"==typeof i.timeUnixNano&&(h.timeUnixNano=new _.LongBits(i.timeUnixNano.low>>>0,i.timeUnixNano.high>>>0).toNumber())),null!=i.count&&(_.Long?(h.count=_.Long.fromValue(i.count)).unsigned=!1:"string"==typeof i.count?h.count=parseInt(i.count,10):"number"==typeof i.count?h.count=i.count:"object"==typeof i.count&&(h.count=new _.LongBits(i.count.low>>>0,i.count.high>>>0).toNumber())),null!=i.sum&&(h.sum=Number(i.sum)),null!=i.scale&&(h.scale=0|i.scale),null!=i.zeroCount&&(_.Long?(h.zeroCount=_.Long.fromValue(i.zeroCount)).unsigned=!1:"string"==typeof i.zeroCount?h.zeroCount=parseInt(i.zeroCount,10):"number"==typeof i.zeroCount?h.zeroCount=i.zeroCount:"object"==typeof i.zeroCount&&(h.zeroCount=new _.LongBits(i.zeroCount.low>>>0,i.zeroCount.high>>>0).toNumber())),null!=i.positive){if("object"!=typeof i.positive)throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.positive: object expected");h.positive=g.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.fromObject(i.positive)}if(null!=i.negative){if("object"!=typeof i.negative)throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.negative: object expected");h.negative=g.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.fromObject(i.negative)}if(null!=i.flags&&(h.flags=i.flags>>>0),i.exemplars){if(!Array.isArray(i.exemplars))throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.exemplars: array expected");for(h.exemplars=[],A=0;A>>0,i.startTimeUnixNano.high>>>0).toNumber():i.startTimeUnixNano),null!=i.timeUnixNano&&i.hasOwnProperty("timeUnixNano")&&(A.timeUnixNano="number"==typeof i.timeUnixNano?h.longs===String?String(i.timeUnixNano):i.timeUnixNano:h.longs===String?_.Long.prototype.toString.call(i.timeUnixNano):h.longs===Number?new _.LongBits(i.timeUnixNano.low>>>0,i.timeUnixNano.high>>>0).toNumber():i.timeUnixNano),null!=i.count&&i.hasOwnProperty("count")&&(A.count="number"==typeof i.count?h.longs===String?String(i.count):i.count:h.longs===String?_.Long.prototype.toString.call(i.count):h.longs===Number?new _.LongBits(i.count.low>>>0,i.count.high>>>0).toNumber():i.count),null!=i.sum&&i.hasOwnProperty("sum")&&(A.sum=h.json&&!isFinite(i.sum)?String(i.sum):i.sum,h.oneofs&&(A._sum="sum")),null!=i.scale&&i.hasOwnProperty("scale")&&(A.scale=i.scale),null!=i.zeroCount&&i.hasOwnProperty("zeroCount")&&(A.zeroCount="number"==typeof i.zeroCount?h.longs===String?String(i.zeroCount):i.zeroCount:h.longs===String?_.Long.prototype.toString.call(i.zeroCount):h.longs===Number?new _.LongBits(i.zeroCount.low>>>0,i.zeroCount.high>>>0).toNumber():i.zeroCount),null!=i.positive&&i.hasOwnProperty("positive")&&(A.positive=g.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.toObject(i.positive,h)),null!=i.negative&&i.hasOwnProperty("negative")&&(A.negative=g.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.toObject(i.negative,h)),null!=i.flags&&i.hasOwnProperty("flags")&&(A.flags=i.flags),i.exemplars&&i.exemplars.length)for(A.exemplars=[],V=0;V>>3){case 1:V.offset=h.sint32();break;case 2:if(V.bucketCounts&&V.bucketCounts.length||(V.bucketCounts=[]),2==(7&B))for(var j=h.uint32()+h.pos;h.pos>>0,h.bucketCounts[P].high>>>0).toNumber(!0))}return A},c.toObject=function(h,A){A||(A={});var P={};if((A.arrays||A.defaults)&&(P.bucketCounts=[]),A.defaults&&(P.offset=0),null!=h.offset&&h.hasOwnProperty("offset")&&(P.offset=h.offset),h.bucketCounts&&h.bucketCounts.length){P.bucketCounts=[];for(var V=0;V>>0,h.bucketCounts[V].high>>>0).toNumber(!0):h.bucketCounts[V]}return P},c.prototype.toJSON=function(){return this.constructor.toObject(this,r.util.toJSONOptions)},c.getTypeUrl=function(h){return void 0===h&&(h="type.googleapis.com"),h+"/opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets"},c}(),y}(),M.SummaryDataPoint=function(){function y(b){if(this.attributes=[],this.quantileValues=[],b)for(var c=Object.keys(b),i=0;i>>3){case 7:A.attributes&&A.attributes.length||(A.attributes=[]),A.attributes.push(g.opentelemetry.proto.common.v1.KeyValue.decode(c,c.uint32()));break;case 2:A.startTimeUnixNano=c.fixed64();break;case 3:A.timeUnixNano=c.fixed64();break;case 4:A.count=c.fixed64();break;case 5:A.sum=c.double();break;case 6:A.quantileValues&&A.quantileValues.length||(A.quantileValues=[]),A.quantileValues.push(g.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.decode(c,c.uint32()));break;case 8:A.flags=c.uint32();break;default:c.skipType(7&P)}}return A},y.decodeDelimited=function(c){return c instanceof s||(c=new s(c)),this.decode(c,c.uint32())},y.verify=function(c){if("object"!=typeof c||null===c)return"object expected";if(null!=c.attributes&&c.hasOwnProperty("attributes")){if(!Array.isArray(c.attributes))return"attributes: array expected";for(var i=0;i>>0,c.startTimeUnixNano.high>>>0).toNumber())),null!=c.timeUnixNano&&(_.Long?(i.timeUnixNano=_.Long.fromValue(c.timeUnixNano)).unsigned=!1:"string"==typeof c.timeUnixNano?i.timeUnixNano=parseInt(c.timeUnixNano,10):"number"==typeof c.timeUnixNano?i.timeUnixNano=c.timeUnixNano:"object"==typeof c.timeUnixNano&&(i.timeUnixNano=new _.LongBits(c.timeUnixNano.low>>>0,c.timeUnixNano.high>>>0).toNumber())),null!=c.count&&(_.Long?(i.count=_.Long.fromValue(c.count)).unsigned=!1:"string"==typeof c.count?i.count=parseInt(c.count,10):"number"==typeof c.count?i.count=c.count:"object"==typeof c.count&&(i.count=new _.LongBits(c.count.low>>>0,c.count.high>>>0).toNumber())),null!=c.sum&&(i.sum=Number(c.sum)),c.quantileValues){if(!Array.isArray(c.quantileValues))throw TypeError(".opentelemetry.proto.metrics.v1.SummaryDataPoint.quantileValues: array expected");for(i.quantileValues=[],h=0;h>>0),i},y.toObject=function(c,i){i||(i={});var h={};if((i.arrays||i.defaults)&&(h.quantileValues=[],h.attributes=[]),i.defaults){if(_.Long){var A=new _.Long(0,0,!1);h.startTimeUnixNano=i.longs===String?A.toString():i.longs===Number?A.toNumber():A}else h.startTimeUnixNano=i.longs===String?"0":0;_.Long?(A=new _.Long(0,0,!1),h.timeUnixNano=i.longs===String?A.toString():i.longs===Number?A.toNumber():A):h.timeUnixNano=i.longs===String?"0":0,_.Long?(A=new _.Long(0,0,!1),h.count=i.longs===String?A.toString():i.longs===Number?A.toNumber():A):h.count=i.longs===String?"0":0,h.sum=0,h.flags=0}if(null!=c.startTimeUnixNano&&c.hasOwnProperty("startTimeUnixNano")&&(h.startTimeUnixNano="number"==typeof c.startTimeUnixNano?i.longs===String?String(c.startTimeUnixNano):c.startTimeUnixNano:i.longs===String?_.Long.prototype.toString.call(c.startTimeUnixNano):i.longs===Number?new _.LongBits(c.startTimeUnixNano.low>>>0,c.startTimeUnixNano.high>>>0).toNumber():c.startTimeUnixNano),null!=c.timeUnixNano&&c.hasOwnProperty("timeUnixNano")&&(h.timeUnixNano="number"==typeof c.timeUnixNano?i.longs===String?String(c.timeUnixNano):c.timeUnixNano:i.longs===String?_.Long.prototype.toString.call(c.timeUnixNano):i.longs===Number?new _.LongBits(c.timeUnixNano.low>>>0,c.timeUnixNano.high>>>0).toNumber():c.timeUnixNano),null!=c.count&&c.hasOwnProperty("count")&&(h.count="number"==typeof c.count?i.longs===String?String(c.count):c.count:i.longs===String?_.Long.prototype.toString.call(c.count):i.longs===Number?new _.LongBits(c.count.low>>>0,c.count.high>>>0).toNumber():c.count),null!=c.sum&&c.hasOwnProperty("sum")&&(h.sum=i.json&&!isFinite(c.sum)?String(c.sum):c.sum),c.quantileValues&&c.quantileValues.length){h.quantileValues=[];for(var P=0;P>>3){case 1:P.quantile=i.double();break;case 2:P.value=i.double();break;default:i.skipType(7&V)}}return P},b.decodeDelimited=function(i){return i instanceof s||(i=new s(i)),this.decode(i,i.uint32())},b.verify=function(i){return"object"!=typeof i||null===i?"object expected":null!=i.quantile&&i.hasOwnProperty("quantile")&&"number"!=typeof i.quantile?"quantile: number expected":null!=i.value&&i.hasOwnProperty("value")&&"number"!=typeof i.value?"value: number expected":null},b.fromObject=function(i){if(i instanceof g.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile)return i;var h=new g.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile;return null!=i.quantile&&(h.quantile=Number(i.quantile)),null!=i.value&&(h.value=Number(i.value)),h},b.toObject=function(i,h){h||(h={});var A={};return h.defaults&&(A.quantile=0,A.value=0),null!=i.quantile&&i.hasOwnProperty("quantile")&&(A.quantile=h.json&&!isFinite(i.quantile)?String(i.quantile):i.quantile),null!=i.value&&i.hasOwnProperty("value")&&(A.value=h.json&&!isFinite(i.value)?String(i.value):i.value),A},b.prototype.toJSON=function(){return this.constructor.toObject(this,r.util.toJSONOptions)},b.getTypeUrl=function(i){return void 0===i&&(i="type.googleapis.com"),i+"/opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile"},b}(),y}(),M.Exemplar=function(){function y(c){if(this.filteredAttributes=[],c)for(var i=Object.keys(c),h=0;h>>3){case 7:P.filteredAttributes&&P.filteredAttributes.length||(P.filteredAttributes=[]),P.filteredAttributes.push(g.opentelemetry.proto.common.v1.KeyValue.decode(i,i.uint32()));break;case 2:P.timeUnixNano=i.fixed64();break;case 3:P.asDouble=i.double();break;case 6:P.asInt=i.sfixed64();break;case 4:P.spanId=i.bytes();break;case 5:P.traceId=i.bytes();break;default:i.skipType(7&V)}}return P},y.decodeDelimited=function(i){return i instanceof s||(i=new s(i)),this.decode(i,i.uint32())},y.verify=function(i){if("object"!=typeof i||null===i)return"object expected";var h={};if(null!=i.filteredAttributes&&i.hasOwnProperty("filteredAttributes")){if(!Array.isArray(i.filteredAttributes))return"filteredAttributes: array expected";for(var A=0;A>>0,i.timeUnixNano.high>>>0).toNumber())),null!=i.asDouble&&(h.asDouble=Number(i.asDouble)),null!=i.asInt&&(_.Long?(h.asInt=_.Long.fromValue(i.asInt)).unsigned=!1:"string"==typeof i.asInt?h.asInt=parseInt(i.asInt,10):"number"==typeof i.asInt?h.asInt=i.asInt:"object"==typeof i.asInt&&(h.asInt=new _.LongBits(i.asInt.low>>>0,i.asInt.high>>>0).toNumber())),null!=i.spanId&&("string"==typeof i.spanId?_.base64.decode(i.spanId,h.spanId=_.newBuffer(_.base64.length(i.spanId)),0):i.spanId.length>=0&&(h.spanId=i.spanId)),null!=i.traceId&&("string"==typeof i.traceId?_.base64.decode(i.traceId,h.traceId=_.newBuffer(_.base64.length(i.traceId)),0):i.traceId.length>=0&&(h.traceId=i.traceId)),h},y.toObject=function(i,h){h||(h={});var A={};if((h.arrays||h.defaults)&&(A.filteredAttributes=[]),h.defaults){if(_.Long){var P=new _.Long(0,0,!1);A.timeUnixNano=h.longs===String?P.toString():h.longs===Number?P.toNumber():P}else A.timeUnixNano=h.longs===String?"0":0;h.bytes===String?A.spanId="":(A.spanId=[],h.bytes!==Array&&(A.spanId=_.newBuffer(A.spanId))),h.bytes===String?A.traceId="":(A.traceId=[],h.bytes!==Array&&(A.traceId=_.newBuffer(A.traceId)))}if(null!=i.timeUnixNano&&i.hasOwnProperty("timeUnixNano")&&(A.timeUnixNano="number"==typeof i.timeUnixNano?h.longs===String?String(i.timeUnixNano):i.timeUnixNano:h.longs===String?_.Long.prototype.toString.call(i.timeUnixNano):h.longs===Number?new _.LongBits(i.timeUnixNano.low>>>0,i.timeUnixNano.high>>>0).toNumber():i.timeUnixNano),null!=i.asDouble&&i.hasOwnProperty("asDouble")&&(A.asDouble=h.json&&!isFinite(i.asDouble)?String(i.asDouble):i.asDouble,h.oneofs&&(A.value="asDouble")),null!=i.spanId&&i.hasOwnProperty("spanId")&&(A.spanId=h.bytes===String?_.base64.encode(i.spanId,0,i.spanId.length):h.bytes===Array?Array.prototype.slice.call(i.spanId):i.spanId),null!=i.traceId&&i.hasOwnProperty("traceId")&&(A.traceId=h.bytes===String?_.base64.encode(i.traceId,0,i.traceId.length):h.bytes===Array?Array.prototype.slice.call(i.traceId):i.traceId),null!=i.asInt&&i.hasOwnProperty("asInt")&&(A.asInt="number"==typeof i.asInt?h.longs===String?String(i.asInt):i.asInt:h.longs===String?_.Long.prototype.toString.call(i.asInt):h.longs===Number?new _.LongBits(i.asInt.low>>>0,i.asInt.high>>>0).toNumber():i.asInt,h.oneofs&&(A.value="asInt")),i.filteredAttributes&&i.filteredAttributes.length){A.filteredAttributes=[];for(var V=0;V>>3==1?(A.resourceLogs&&A.resourceLogs.length||(A.resourceLogs=[]),A.resourceLogs.push(g.opentelemetry.proto.logs.v1.ResourceLogs.decode(c,c.uint32()))):c.skipType(7&P)}return A},y.decodeDelimited=function(c){return c instanceof s||(c=new s(c)),this.decode(c,c.uint32())},y.verify=function(c){if("object"!=typeof c||null===c)return"object expected";if(null!=c.resourceLogs&&c.hasOwnProperty("resourceLogs")){if(!Array.isArray(c.resourceLogs))return"resourceLogs: array expected";for(var i=0;i>>3){case 1:A.resource=g.opentelemetry.proto.resource.v1.Resource.decode(c,c.uint32());break;case 2:A.scopeLogs&&A.scopeLogs.length||(A.scopeLogs=[]),A.scopeLogs.push(g.opentelemetry.proto.logs.v1.ScopeLogs.decode(c,c.uint32()));break;case 3:A.schemaUrl=c.string();break;default:c.skipType(7&P)}}return A},y.decodeDelimited=function(c){return c instanceof s||(c=new s(c)),this.decode(c,c.uint32())},y.verify=function(c){if("object"!=typeof c||null===c)return"object expected";if(null!=c.resource&&c.hasOwnProperty("resource")&&(i=g.opentelemetry.proto.resource.v1.Resource.verify(c.resource)))return"resource."+i;if(null!=c.scopeLogs&&c.hasOwnProperty("scopeLogs")){if(!Array.isArray(c.scopeLogs))return"scopeLogs: array expected";for(var h=0;h>>3){case 1:A.scope=g.opentelemetry.proto.common.v1.InstrumentationScope.decode(c,c.uint32());break;case 2:A.logRecords&&A.logRecords.length||(A.logRecords=[]),A.logRecords.push(g.opentelemetry.proto.logs.v1.LogRecord.decode(c,c.uint32()));break;case 3:A.schemaUrl=c.string();break;default:c.skipType(7&P)}}return A},y.decodeDelimited=function(c){return c instanceof s||(c=new s(c)),this.decode(c,c.uint32())},y.verify=function(c){if("object"!=typeof c||null===c)return"object expected";if(null!=c.scope&&c.hasOwnProperty("scope")&&(i=g.opentelemetry.proto.common.v1.InstrumentationScope.verify(c.scope)))return"scope."+i;if(null!=c.logRecords&&c.hasOwnProperty("logRecords")){if(!Array.isArray(c.logRecords))return"logRecords: array expected";for(var h=0;h>>3){case 1:A.timeUnixNano=c.fixed64();break;case 11:A.observedTimeUnixNano=c.fixed64();break;case 2:A.severityNumber=c.int32();break;case 3:A.severityText=c.string();break;case 5:A.body=g.opentelemetry.proto.common.v1.AnyValue.decode(c,c.uint32());break;case 6:A.attributes&&A.attributes.length||(A.attributes=[]),A.attributes.push(g.opentelemetry.proto.common.v1.KeyValue.decode(c,c.uint32()));break;case 7:A.droppedAttributesCount=c.uint32();break;case 8:A.flags=c.fixed32();break;case 9:A.traceId=c.bytes();break;case 10:A.spanId=c.bytes();break;default:c.skipType(7&P)}}return A},y.decodeDelimited=function(c){return c instanceof s||(c=new s(c)),this.decode(c,c.uint32())},y.verify=function(c){if("object"!=typeof c||null===c)return"object expected";if(null!=c.timeUnixNano&&c.hasOwnProperty("timeUnixNano")&&!_.isInteger(c.timeUnixNano)&&!(c.timeUnixNano&&_.isInteger(c.timeUnixNano.low)&&_.isInteger(c.timeUnixNano.high)))return"timeUnixNano: integer|Long expected";if(null!=c.observedTimeUnixNano&&c.hasOwnProperty("observedTimeUnixNano")&&!_.isInteger(c.observedTimeUnixNano)&&!(c.observedTimeUnixNano&&_.isInteger(c.observedTimeUnixNano.low)&&_.isInteger(c.observedTimeUnixNano.high)))return"observedTimeUnixNano: integer|Long expected";if(null!=c.severityNumber&&c.hasOwnProperty("severityNumber"))switch(c.severityNumber){default:return"severityNumber: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:case 11:case 12:case 13:case 14:case 15:case 16:case 17:case 18:case 19:case 20:case 21:case 22:case 23:case 24:}if(null!=c.severityText&&c.hasOwnProperty("severityText")&&!_.isString(c.severityText))return"severityText: string expected";if(null!=c.body&&c.hasOwnProperty("body")&&(i=g.opentelemetry.proto.common.v1.AnyValue.verify(c.body)))return"body."+i;if(null!=c.attributes&&c.hasOwnProperty("attributes")){if(!Array.isArray(c.attributes))return"attributes: array expected";for(var h=0;h>>0,c.timeUnixNano.high>>>0).toNumber())),null!=c.observedTimeUnixNano&&(_.Long?(i.observedTimeUnixNano=_.Long.fromValue(c.observedTimeUnixNano)).unsigned=!1:"string"==typeof c.observedTimeUnixNano?i.observedTimeUnixNano=parseInt(c.observedTimeUnixNano,10):"number"==typeof c.observedTimeUnixNano?i.observedTimeUnixNano=c.observedTimeUnixNano:"object"==typeof c.observedTimeUnixNano&&(i.observedTimeUnixNano=new _.LongBits(c.observedTimeUnixNano.low>>>0,c.observedTimeUnixNano.high>>>0).toNumber())),c.severityNumber){default:if("number"==typeof c.severityNumber){i.severityNumber=c.severityNumber;break}break;case"SEVERITY_NUMBER_UNSPECIFIED":case 0:i.severityNumber=0;break;case"SEVERITY_NUMBER_TRACE":case 1:i.severityNumber=1;break;case"SEVERITY_NUMBER_TRACE2":case 2:i.severityNumber=2;break;case"SEVERITY_NUMBER_TRACE3":case 3:i.severityNumber=3;break;case"SEVERITY_NUMBER_TRACE4":case 4:i.severityNumber=4;break;case"SEVERITY_NUMBER_DEBUG":case 5:i.severityNumber=5;break;case"SEVERITY_NUMBER_DEBUG2":case 6:i.severityNumber=6;break;case"SEVERITY_NUMBER_DEBUG3":case 7:i.severityNumber=7;break;case"SEVERITY_NUMBER_DEBUG4":case 8:i.severityNumber=8;break;case"SEVERITY_NUMBER_INFO":case 9:i.severityNumber=9;break;case"SEVERITY_NUMBER_INFO2":case 10:i.severityNumber=10;break;case"SEVERITY_NUMBER_INFO3":case 11:i.severityNumber=11;break;case"SEVERITY_NUMBER_INFO4":case 12:i.severityNumber=12;break;case"SEVERITY_NUMBER_WARN":case 13:i.severityNumber=13;break;case"SEVERITY_NUMBER_WARN2":case 14:i.severityNumber=14;break;case"SEVERITY_NUMBER_WARN3":case 15:i.severityNumber=15;break;case"SEVERITY_NUMBER_WARN4":case 16:i.severityNumber=16;break;case"SEVERITY_NUMBER_ERROR":case 17:i.severityNumber=17;break;case"SEVERITY_NUMBER_ERROR2":case 18:i.severityNumber=18;break;case"SEVERITY_NUMBER_ERROR3":case 19:i.severityNumber=19;break;case"SEVERITY_NUMBER_ERROR4":case 20:i.severityNumber=20;break;case"SEVERITY_NUMBER_FATAL":case 21:i.severityNumber=21;break;case"SEVERITY_NUMBER_FATAL2":case 22:i.severityNumber=22;break;case"SEVERITY_NUMBER_FATAL3":case 23:i.severityNumber=23;break;case"SEVERITY_NUMBER_FATAL4":case 24:i.severityNumber=24}if(null!=c.severityText&&(i.severityText=String(c.severityText)),null!=c.body){if("object"!=typeof c.body)throw TypeError(".opentelemetry.proto.logs.v1.LogRecord.body: object expected");i.body=g.opentelemetry.proto.common.v1.AnyValue.fromObject(c.body)}if(c.attributes){if(!Array.isArray(c.attributes))throw TypeError(".opentelemetry.proto.logs.v1.LogRecord.attributes: array expected");i.attributes=[];for(var h=0;h>>0),null!=c.flags&&(i.flags=c.flags>>>0),null!=c.traceId&&("string"==typeof c.traceId?_.base64.decode(c.traceId,i.traceId=_.newBuffer(_.base64.length(c.traceId)),0):c.traceId.length>=0&&(i.traceId=c.traceId)),null!=c.spanId&&("string"==typeof c.spanId?_.base64.decode(c.spanId,i.spanId=_.newBuffer(_.base64.length(c.spanId)),0):c.spanId.length>=0&&(i.spanId=c.spanId)),i},y.toObject=function(c,i){i||(i={});var h={};if((i.arrays||i.defaults)&&(h.attributes=[]),i.defaults){if(_.Long){var A=new _.Long(0,0,!1);h.timeUnixNano=i.longs===String?A.toString():i.longs===Number?A.toNumber():A}else h.timeUnixNano=i.longs===String?"0":0;h.severityNumber=i.enums===String?"SEVERITY_NUMBER_UNSPECIFIED":0,h.severityText="",h.body=null,h.droppedAttributesCount=0,h.flags=0,i.bytes===String?h.traceId="":(h.traceId=[],i.bytes!==Array&&(h.traceId=_.newBuffer(h.traceId))),i.bytes===String?h.spanId="":(h.spanId=[],i.bytes!==Array&&(h.spanId=_.newBuffer(h.spanId))),_.Long?(A=new _.Long(0,0,!1),h.observedTimeUnixNano=i.longs===String?A.toString():i.longs===Number?A.toNumber():A):h.observedTimeUnixNano=i.longs===String?"0":0}if(null!=c.timeUnixNano&&c.hasOwnProperty("timeUnixNano")&&(h.timeUnixNano="number"==typeof c.timeUnixNano?i.longs===String?String(c.timeUnixNano):c.timeUnixNano:i.longs===String?_.Long.prototype.toString.call(c.timeUnixNano):i.longs===Number?new _.LongBits(c.timeUnixNano.low>>>0,c.timeUnixNano.high>>>0).toNumber():c.timeUnixNano),null!=c.severityNumber&&c.hasOwnProperty("severityNumber")&&(h.severityNumber=i.enums===String?void 0===g.opentelemetry.proto.logs.v1.SeverityNumber[c.severityNumber]?c.severityNumber:g.opentelemetry.proto.logs.v1.SeverityNumber[c.severityNumber]:c.severityNumber),null!=c.severityText&&c.hasOwnProperty("severityText")&&(h.severityText=c.severityText),null!=c.body&&c.hasOwnProperty("body")&&(h.body=g.opentelemetry.proto.common.v1.AnyValue.toObject(c.body,i)),c.attributes&&c.attributes.length){h.attributes=[];for(var P=0;P>>0,c.observedTimeUnixNano.high>>>0).toNumber():c.observedTimeUnixNano),h},y.prototype.toJSON=function(){return this.constructor.toObject(this,r.util.toJSONOptions)},y.getTypeUrl=function(c){return void 0===c&&(c="type.googleapis.com"),c+"/opentelemetry.proto.logs.v1.LogRecord"},y}(),M}(),x}(),T),E),vt.exports=g},23403:(vt,I,f)=>{"use strict";f.d(I,{F:()=>M});var r=f(40698),s=f(23413),v=f(91085),_=f(99583),g=function(){return g=Object.assign||function(y){for(var b,c=1,i=arguments.length;c0&&A[A.length-1])&&(6===j[0]||2===j[0])){c=0;continue}if(3===j[0]&&(!A||j[1]>A[0]&&j[1]0)&&!(h=i.next()).done;)A.push(h.value)}catch(V){P={error:V}}finally{try{h&&!h.done&&(c=i.return)&&c.call(i)}finally{if(P)throw P.error}}return A}(P,2),j=B[0],re=B[1];return g(g(g(g({},c._syncAttributes),j),null!==(V=b._syncAttributes)&&void 0!==V?V:b.attributes),re)});return new y(h,A)},y.EMPTY=new y({}),y}()},14656:(vt,I,f)=>{"use strict";f.r(I),f.d(I,{Resource:()=>r.F,browserDetector:()=>M,browserDetectorSync:()=>T,defaultServiceName:()=>s.m,detectResources:()=>se,detectResourcesSync:()=>fe,envDetector:()=>P,envDetectorSync:()=>h,hostDetector:()=>z,hostDetectorSync:()=>H,osDetector:()=>U,osDetectorSync:()=>O,processDetector:()=>F,processDetectorSync:()=>k,serviceInstanceIdDetectorSync:()=>$});var r=f(23403),s=f(99583),v=f(23413),_=f(40698),g=function(){return g=Object.assign||function(pe){for(var we,q=1,J=arguments.length;q0)&&!(W=J.next()).done;)ee.push(W.value)}catch(ae){X={error:ae}}finally{try{W&&!W.done&&(q=J.return)&&q.call(J)}finally{if(X)throw X.error}}return ee},h=new(function(){function pe(){this._MAX_LENGTH=255,this._COMMA_SEPARATOR=",",this._LABEL_KEY_VALUE_SPLITTER="=",this._ERROR_MESSAGE_INVALID_CHARS="should be a ASCII string with a length greater than 0 and not exceed "+this._MAX_LENGTH+" characters.",this._ERROR_MESSAGE_INVALID_VALUE="should be a ASCII string with a length not exceed "+this._MAX_LENGTH+" characters."}return pe.prototype.detect=function(we){var q={},J=(0,y._)(),W=J.OTEL_RESOURCE_ATTRIBUTES,ee=J.OTEL_SERVICE_NAME;if(W)try{var X=this._parseResourceAttributes(W);Object.assign(q,X)}catch(ae){_.s.debug("EnvDetector failed: "+ae.message)}return ee&&(q[v.AV]=ee),new r.F(q)},pe.prototype._parseResourceAttributes=function(we){var q,J;if(!we)return{};var W={},ee=we.split(this._COMMA_SEPARATOR,-1);try{for(var X=function(pe){var we="function"==typeof Symbol&&Symbol.iterator,q=we&&pe[we],J=0;if(q)return q.call(pe);if(pe&&"number"==typeof pe.length)return{next:function(){return pe&&J>=pe.length&&(pe=void 0),{value:pe&&pe[J++],done:!pe}}};throw new TypeError(we?"Object is not iterable.":"Symbol.iterator is not defined.")}(ee),ae=X.next();!ae.done;ae=X.next()){var Pe=ae.value.split(this._LABEL_KEY_VALUE_SPLITTER,-1);if(2===Pe.length){var ye=c(Pe,2),Le=ye[0],Xe=ye[1];if(Le=Le.trim(),Xe=Xe.trim().split(/^"|"$/).join(""),!this._isValidAndNotEmpty(Le))throw new Error("Attribute key "+this._ERROR_MESSAGE_INVALID_CHARS);if(!this._isValid(Xe))throw new Error("Attribute value "+this._ERROR_MESSAGE_INVALID_VALUE);W[Le]=decodeURIComponent(Xe)}}}catch(ie){q={error:ie}}finally{try{ae&&!ae.done&&(J=X.return)&&J.call(X)}finally{if(q)throw q.error}}return W},pe.prototype._isValid=function(we){return we.length<=this._MAX_LENGTH&&this._isBaggageOctetString(we)},pe.prototype._isBaggageOctetString=function(we){for(var q=0;q126)return!1}return!0},pe.prototype._isValidAndNotEmpty=function(we){return we.length>0&&this._isValid(we)},pe}()),P=new(function(){function pe(){}return pe.prototype.detect=function(we){return Promise.resolve(h.detect(we))},pe}()),B=new(function(){function pe(){}return pe.prototype.detect=function(){return new r.F({})},pe}()),re=new(function(){function pe(){}return pe.prototype.detect=function(){return Promise.resolve(B.detect())},pe}()),z=re,H=B,U=re,O=B,F=re,k=re,$=B,te=function(pe,we,q,J){return new(q||(q=Promise))(function(ee,X){function ae(ye){try{Pe(J.next(ye))}catch(Le){X(Le)}}function de(ye){try{Pe(J.throw(ye))}catch(Le){X(Le)}}function Pe(ye){ye.done?ee(ye.value):function W(ee){return ee instanceof q?ee:new q(function(X){X(ee)})}(ye.value).then(ae,de)}Pe((J=J.apply(pe,we||[])).next())})},Z=function(pe,we){var J,W,ee,X,q={label:0,sent:function(){if(1&ee[0])throw ee[1];return ee[1]},trys:[],ops:[]};return X={next:ae(0),throw:ae(1),return:ae(2)},"function"==typeof Symbol&&(X[Symbol.iterator]=function(){return this}),X;function ae(Pe){return function(ye){return function de(Pe){if(J)throw new TypeError("Generator is already executing.");for(;q;)try{if(J=1,W&&(ee=2&Pe[0]?W.return:Pe[0]?W.throw||((ee=W.return)&&ee.call(W),0):W.next)&&!(ee=ee.call(W,Pe[1])).done)return ee;switch(W=0,ee&&(Pe=[2&Pe[0],ee.value]),Pe[0]){case 0:case 1:ee=Pe;break;case 4:return q.label++,{value:Pe[1],done:!1};case 5:q.label++,W=Pe[1],Pe=[0];continue;case 7:Pe=q.ops.pop(),q.trys.pop();continue;default:if(!(ee=(ee=q.trys).length>0&&ee[ee.length-1])&&(6===Pe[0]||2===Pe[0])){q=0;continue}if(3===Pe[0]&&(!ee||Pe[1]>ee[0]&&Pe[1]0){var q=JSON.stringify(we.attributes,null,4);_.s.verbose(q)}})}},99583:(vt,I,f)=>{"use strict";function r(){return"unknown_service"}f.d(I,{m:()=>r})},19553:(vt,I,f)=>{"use strict";f.d(I,{l:()=>re,d:()=>j});var r=f(40698),s=f(92414),v=f(33784),_=f(35475),g=f(92848),E=f(75701),T=f(76181),x=f(90775),M=f(9113),y=f(23403),b=f(31661),c=f(87390),i=f(70440),h=function(z){var H="function"==typeof Symbol&&Symbol.iterator,U=H&&z[H],O=0;if(U)return U.call(z);if(z&&"number"==typeof z.length)return{next:function(){return z&&O>=z.length&&(z=void 0),{value:z&&z[O++],done:!z}}};throw new TypeError(H?"Object is not iterable.":"Symbol.iterator is not defined.")},A=function(){function z(H){this._spanProcessors=H}return z.prototype.forceFlush=function(){var H,U,O=[];try{for(var F=h(this._spanProcessors),k=F.next();!k.done;k=F.next())O.push(k.value.forceFlush())}catch(ne){H={error:ne}}finally{try{k&&!k.done&&(U=F.return)&&U.call(F)}finally{if(H)throw H.error}}return new Promise(function(ne){Promise.all(O).then(function(){ne()}).catch(function(te){(0,i.s)(te||new Error("MultiSpanProcessor: forceFlush failed")),ne()})})},z.prototype.onStart=function(H,U){var O,F;try{for(var k=h(this._spanProcessors),$=k.next();!$.done;$=k.next())$.value.onStart(H,U)}catch(te){O={error:te}}finally{try{$&&!$.done&&(F=k.return)&&F.call(k)}finally{if(O)throw O.error}}},z.prototype.onEnd=function(H){var U,O;try{for(var F=h(this._spanProcessors),k=F.next();!k.done;k=F.next())k.value.onEnd(H)}catch(ne){U={error:ne}}finally{try{k&&!k.done&&(O=F.return)&&O.call(F)}finally{if(U)throw U.error}}},z.prototype.shutdown=function(){var H,U,O=[];try{for(var F=h(this._spanProcessors),k=F.next();!k.done;k=F.next())O.push(k.value.shutdown())}catch(ne){H={error:ne}}finally{try{k&&!k.done&&(U=F.return)&&U.call(F)}finally{if(H)throw H.error}}return new Promise(function(ne,te){Promise.all(O).then(function(){ne()},te)})},z}(),P=f(18225),V=f(44748),B=f(77686),j=function(z){return z[z.resolved=0]="resolved",z[z.timeout=1]="timeout",z[z.error=2]="error",z[z.unresolved=3]="unresolved",z}(j||{}),re=function(){function z(H){var U;void 0===H&&(H={}),this._registeredSpanProcessors=[],this._tracers=new Map;var O=(0,g.h)({},(0,c.S)(),(0,B.W)(H));this.resource=null!==(U=O.resource)&&void 0!==U?U:y.F.empty(),this.resource=y.F.default().merge(this.resource),this._config=Object.assign({},O,{resource:this.resource});var F=this._buildExporterFromEnv();if(void 0!==F){var k=new V.J(F);this.activeSpanProcessor=k}else this.activeSpanProcessor=new P.N}return z.prototype.getTracer=function(H,U,O){var F=H+"@"+(U||"")+":"+((null==O?void 0:O.schemaUrl)||"");return this._tracers.has(F)||this._tracers.set(F,new b.s({name:H,version:U,schemaUrl:null==O?void 0:O.schemaUrl},this._config,this)),this._tracers.get(F)},z.prototype.addSpanProcessor=function(H){0===this._registeredSpanProcessors.length&&this.activeSpanProcessor.shutdown().catch(function(U){return r.s.error("Error while trying to shutdown current span processor",U)}),this._registeredSpanProcessors.push(H),this.activeSpanProcessor=new A(this._registeredSpanProcessors)},z.prototype.getActiveSpanProcessor=function(){return this.activeSpanProcessor},z.prototype.register=function(H){void 0===H&&(H={}),s.u.setGlobalTracerProvider(this),void 0===H.propagator&&(H.propagator=this._buildPropagatorFromEnv()),H.contextManager&&v._.setGlobalContextManager(H.contextManager),H.propagator&&_.$.setGlobalPropagator(H.propagator)},z.prototype.forceFlush=function(){var H=this._config.forceFlushTimeoutMillis,U=this._registeredSpanProcessors.map(function(O){return new Promise(function(F){var k,$=setTimeout(function(){F(new Error("Span processor did not completed within timeout period of "+H+" ms")),k=j.timeout},H);O.forceFlush().then(function(){clearTimeout($),k!==j.timeout&&F(k=j.resolved)}).catch(function(ne){clearTimeout($),k=j.error,F(ne)})})});return new Promise(function(O,F){Promise.all(U).then(function(k){var $=k.filter(function(ne){return ne!==j.resolved});$.length>0?F($):O()}).catch(function(k){return F([k])})})},z.prototype.shutdown=function(){return this.activeSpanProcessor.shutdown()},z.prototype._getPropagator=function(H){var U;return null===(U=this.constructor._registeredPropagators.get(H))||void 0===U?void 0:U()},z.prototype._getSpanExporter=function(H){var U;return null===(U=this.constructor._registeredExporters.get(H))||void 0===U?void 0:U()},z.prototype._buildPropagatorFromEnv=function(){var H=this,U=Array.from(new Set((0,E._)().OTEL_PROPAGATORS)),F=U.map(function(k){var $=H._getPropagator(k);return $||r.s.warn('Propagator "'+k+'" requested through environment variable is unavailable.'),$}).reduce(function(k,$){return $&&k.push($),k},[]);if(0!==F.length)return 1===U.length?F[0]:new T.n({propagators:F})},z.prototype._buildExporterFromEnv=function(){var H=(0,E._)().OTEL_TRACES_EXPORTER;if("none"!==H&&""!==H){var U=this._getSpanExporter(H);return U||r.s.error('Exporter "'+H+'" requested through environment variable is unavailable.'),U}},z._registeredPropagators=new Map([["tracecontext",function(){return new x.lm}],["baggage",function(){return new M.t}]]),z._registeredExporters=new Map,z}()},45198:(vt,I,f)=>{"use strict";f.d(I,{i:()=>r});var r=function(s){return s[s.NOT_RECORD=0]="NOT_RECORD",s[s.RECORD=1]="RECORD",s[s.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED",s}(r||{})},73569:(vt,I,f)=>{"use strict";f.d(I,{L:()=>y});var r=f(75376),s=f(40698),v=f(52246),_=f(1119),g=f(58312),E=f(52666),M=function(b,c){var i="function"==typeof Symbol&&b[Symbol.iterator];if(!i)return b;var A,V,h=i.call(b),P=[];try{for(;(void 0===c||c-- >0)&&!(A=h.next()).done;)P.push(A.value)}catch(B){V={error:B}}finally{try{A&&!A.done&&(i=h.return)&&i.call(h)}finally{if(V)throw V.error}}return P},y=function(){function b(c,i,h,A,P,V,B,j,re,z){void 0===B&&(B=[]),this.attributes={},this.links=[],this.events=[],this._droppedAttributesCount=0,this._droppedEventsCount=0,this._droppedLinksCount=0,this.status={code:r.s.UNSET},this.endTime=[0,0],this._ended=!1,this._duration=[-1,-1],this.name=h,this._spanContext=A,this.parentSpanId=V,this.kind=P,this.links=B;var H=Date.now();this._performanceStartTime=v.u.now(),this._performanceOffset=H-(this._performanceStartTime+(0,_.uc)()),this._startTimeProvided=null!=j,this.startTime=this._getTime(null!=j?j:H),this.resource=c.resource,this.instrumentationLibrary=c.instrumentationLibrary,this._spanLimits=c.getSpanLimits(),this._attributeValueLengthLimit=this._spanLimits.attributeValueLengthLimit||0,null!=z&&this.setAttributes(z),this._spanProcessor=c.getActiveSpanProcessor(),this._spanProcessor.onStart(this,i)}return b.prototype.spanContext=function(){return this._spanContext},b.prototype.setAttribute=function(c,i){return null==i||this._isSpanEnded()?this:0===c.length?(s.s.warn("Invalid attribute key: "+c),this):(0,g.m)(i)?Object.keys(this.attributes).length>=this._spanLimits.attributeCountLimit&&!Object.prototype.hasOwnProperty.call(this.attributes,c)?(this._droppedAttributesCount++,this):(this.attributes[c]=this._truncateToSize(i),this):(s.s.warn("Invalid attribute value set for key: "+c),this)},b.prototype.setAttributes=function(c){var i,h;try{for(var A=function(b){var c="function"==typeof Symbol&&Symbol.iterator,i=c&&b[c],h=0;if(i)return i.call(b);if(b&&"number"==typeof b.length)return{next:function(){return b&&h>=b.length&&(b=void 0),{value:b&&b[h++],done:!b}}};throw new TypeError(c?"Object is not iterable.":"Symbol.iterator is not defined.")}(Object.entries(c)),P=A.next();!P.done;P=A.next()){var V=M(P.value,2);this.setAttribute(V[0],V[1])}}catch(re){i={error:re}}finally{try{P&&!P.done&&(h=A.return)&&h.call(A)}finally{if(i)throw i.error}}return this},b.prototype.addEvent=function(c,i,h){if(this._isSpanEnded())return this;if(0===this._spanLimits.eventCountLimit)return s.s.warn("No events allowed."),this._droppedEventsCount++,this;this.events.length>=this._spanLimits.eventCountLimit&&(0===this._droppedEventsCount&&s.s.debug("Dropping extra events."),this.events.shift(),this._droppedEventsCount++),(0,_.Ir)(i)&&((0,_.Ir)(h)||(h=i),i=void 0);var A=(0,g.L)(i);return this.events.push({name:c,attributes:A,time:this._getTime(h),droppedAttributesCount:0}),this},b.prototype.setStatus=function(c){return this._isSpanEnded()||(this.status=c),this},b.prototype.updateName=function(c){return this._isSpanEnded()||(this.name=c),this},b.prototype.end=function(c){this._isSpanEnded()?s.s.error(this.name+" "+this._spanContext.traceId+"-"+this._spanContext.spanId+" - You can only call end() on a span once."):(this._ended=!0,this.endTime=this._getTime(c),this._duration=(0,_.W5)(this.startTime,this.endTime),this._duration[0]<0&&(s.s.warn("Inconsistent start and end time, startTime > endTime. Setting span duration to 0ms.",this.startTime,this.endTime),this.endTime=this.startTime.slice(),this._duration=[0,0]),this._droppedEventsCount>0&&s.s.warn("Dropped "+this._droppedEventsCount+" events because eventCountLimit reached"),this._spanProcessor.onEnd(this))},b.prototype._getTime=function(c){if("number"==typeof c&&c{"use strict";f.d(I,{s:()=>i});var r=f(33784),s=f(92414),v=f(40698),_=f(99652),g=f(23431),E=f(42710),T=f(57585),x=f(10857),M=f(58312),y=f(73569),b=f(77686),c=f(73348),i=function(){function h(A,P,V){this._tracerProvider=V;var B=(0,b.R)(P);this._sampler=B.sampler,this._generalLimits=B.generalLimits,this._spanLimits=B.spanLimits,this._idGenerator=P.idGenerator||new c.s,this.resource=V.resource,this.instrumentationLibrary=A}return h.prototype.startSpan=function(A,P,V){var B,j,re;void 0===P&&(P={}),void 0===V&&(V=r._.active()),P.root&&(V=s.u.deleteSpan(V));var z=s.u.getSpan(V);if((0,x.Zf)(V))return v.s.debug("Instrumentation suppressed, returning Noop Span"),s.u.wrapSpanContext(_.dM);var F,k,$,U=null==z?void 0:z.spanContext(),O=this._idGenerator.generateSpanId();U&&s.u.isSpanContextValid(U)?(F=U.traceId,k=U.traceState,$=U.spanId):F=this._idGenerator.generateTraceId();var ne=null!==(B=P.kind)&&void 0!==B?B:g.v.INTERNAL,te=(null!==(j=P.links)&&void 0!==j?j:[]).map(function(q){return{context:q.context,attributes:(0,M.L)(q.attributes)}}),Z=(0,M.L)(P.attributes),se=this._sampler.shouldSample(V,F,A,ne,Z,te);k=null!==(re=se.traceState)&&void 0!==re?re:k;var Se={traceId:F,spanId:O,traceFlags:se.decision===E.i.RECORD_AND_SAMPLED?T.X.SAMPLED:T.X.NONE,traceState:k};if(se.decision===E.i.NOT_RECORD)return v.s.debug("Recording is off, propagating context in a non-recording span"),s.u.wrapSpanContext(Se);var pe=(0,M.L)(Object.assign(Z,se.attributes));return new y.L(this,V,A,Se,ne,$,te,P.startTime,void 0,pe)},h.prototype.startActiveSpan=function(A,P,V,B){var j,re,z;if(!(arguments.length<2)){2===arguments.length?z=P:3===arguments.length?(j=P,z=V):(j=P,re=V,z=B);var H=null!=re?re:r._.active(),U=this.startSpan(A,j,H),O=s.u.setSpan(H,U);return r._.with(O,z,void 0,U)}},h.prototype.getGeneralLimits=function(){return this._generalLimits},h.prototype.getSpanLimits=function(){return this._spanLimits},h.prototype.getActiveSpanProcessor=function(){return this._tracerProvider.getActiveSpanProcessor()},h}()},87390:(vt,I,f)=>{"use strict";f.d(I,{S:()=>b,m:()=>c});var r=f(40698),s=f(75701),v=f(26056),_=f(3183),g=f(6221),E=f(80548),T=f(48211),x=(0,s._)(),M=v.R.AlwaysOn,y=1;function b(){return{sampler:c(x),forceFlushTimeoutMillis:3e4,generalLimits:{attributeValueLengthLimit:(0,s._)().OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:(0,s._)().OTEL_ATTRIBUTE_COUNT_LIMIT},spanLimits:{attributeValueLengthLimit:(0,s._)().OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:(0,s._)().OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT,linkCountLimit:(0,s._)().OTEL_SPAN_LINK_COUNT_LIMIT,eventCountLimit:(0,s._)().OTEL_SPAN_EVENT_COUNT_LIMIT,attributePerEventCountLimit:(0,s._)().OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT,attributePerLinkCountLimit:(0,s._)().OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT}}}function c(h){switch(void 0===h&&(h=(0,s._)()),h.OTEL_TRACES_SAMPLER){case v.R.AlwaysOn:return new g.f;case v.R.AlwaysOff:return new _.t;case v.R.ParentBasedAlwaysOn:return new E.e({root:new g.f});case v.R.ParentBasedAlwaysOff:return new E.e({root:new _.t});case v.R.TraceIdRatio:return new T.h(i(h));case v.R.ParentBasedTraceIdRatio:return new E.e({root:new T.h(i(h))});default:return r.s.error('OTEL_TRACES_SAMPLER value "'+h.OTEL_TRACES_SAMPLER+" invalid, defaulting to "+M+'".'),new g.f}}function i(h){if(void 0===h.OTEL_TRACES_SAMPLER_ARG||""===h.OTEL_TRACES_SAMPLER_ARG)return r.s.error("OTEL_TRACES_SAMPLER_ARG is blank, defaulting to "+y+"."),y;var A=Number(h.OTEL_TRACES_SAMPLER_ARG);return isNaN(A)?(r.s.error("OTEL_TRACES_SAMPLER_ARG="+h.OTEL_TRACES_SAMPLER_ARG+" was given, but it is invalid, defaulting to "+y+"."),y):A<0||A>1?(r.s.error("OTEL_TRACES_SAMPLER_ARG="+h.OTEL_TRACES_SAMPLER_ARG+" was given, but it is out of range ([0..1]), defaulting to "+y+"."),y):A}},18225:(vt,I,f)=>{"use strict";f.d(I,{N:()=>r});var r=function(){function s(){}return s.prototype.onStart=function(v,_){},s.prototype.onEnd=function(v){},s.prototype.shutdown=function(){return Promise.resolve()},s.prototype.forceFlush=function(){return Promise.resolve()},s}()},73348:(vt,I,f)=>{"use strict";f.d(I,{s:()=>v});var v=function(){return function E(){this.generateTraceId=g(16),this.generateSpanId=g(8)}}(),_=Array(32);function g(E){return function(){for(var x=0;x<2*E;x++)_[x]=Math.floor(16*Math.random())+48,_[x]>=58&&(_[x]+=39);return String.fromCharCode.apply(null,_.slice(0,2*E))}}},44748:(vt,I,f)=>{"use strict";f.d(I,{J:()=>c});var r=f(40698),s=f(57585),v=f(33784),_=f(75701),g=f(25578),E=f(10857),T=f(99200),x=f(70440),M=f(60554),y=function(){function i(h,A){this._exporter=h,this._isExporting=!1,this._finishedSpans=[],this._droppedSpansCount=0;var P=(0,_._)();this._maxExportBatchSize="number"==typeof(null==A?void 0:A.maxExportBatchSize)?A.maxExportBatchSize:P.OTEL_BSP_MAX_EXPORT_BATCH_SIZE,this._maxQueueSize="number"==typeof(null==A?void 0:A.maxQueueSize)?A.maxQueueSize:P.OTEL_BSP_MAX_QUEUE_SIZE,this._scheduledDelayMillis="number"==typeof(null==A?void 0:A.scheduledDelayMillis)?A.scheduledDelayMillis:P.OTEL_BSP_SCHEDULE_DELAY,this._exportTimeoutMillis="number"==typeof(null==A?void 0:A.exportTimeoutMillis)?A.exportTimeoutMillis:P.OTEL_BSP_EXPORT_TIMEOUT,this._shutdownOnce=new g.I(this._shutdown,this),this._maxExportBatchSize>this._maxQueueSize&&(r.s.warn("BatchSpanProcessor: maxExportBatchSize must be smaller or equal to maxQueueSize, setting maxExportBatchSize to match maxQueueSize"),this._maxExportBatchSize=this._maxQueueSize)}return i.prototype.forceFlush=function(){return this._shutdownOnce.isCalled?this._shutdownOnce.promise:this._flushAll()},i.prototype.onStart=function(h,A){},i.prototype.onEnd=function(h){this._shutdownOnce.isCalled||h.spanContext().traceFlags&s.X.SAMPLED&&this._addToBuffer(h)},i.prototype.shutdown=function(){return this._shutdownOnce.call()},i.prototype._shutdown=function(){var h=this;return Promise.resolve().then(function(){return h.onShutdown()}).then(function(){return h._flushAll()}).then(function(){return h._exporter.shutdown()})},i.prototype._addToBuffer=function(h){if(this._finishedSpans.length>=this._maxQueueSize)return 0===this._droppedSpansCount&&r.s.debug("maxQueueSize reached, dropping spans"),void this._droppedSpansCount++;this._droppedSpansCount>0&&(r.s.warn("Dropped "+this._droppedSpansCount+" spans because maxQueueSize reached"),this._droppedSpansCount=0),this._finishedSpans.push(h),this._maybeStartTimer()},i.prototype._flushAll=function(){var h=this;return new Promise(function(A,P){for(var V=[],j=0,re=Math.ceil(h._finishedSpans.length/h._maxExportBatchSize);j0&&(h._clearTimer(),h._maybeStartTimer())}).catch(function(P){h._isExporting=!1,(0,x.s)(P)})};if(this._finishedSpans.length>=this._maxExportBatchSize)return A();void 0===this._timer&&(this._timer=setTimeout(function(){return A()},this._scheduledDelayMillis),(0,M.K)(this._timer))}},i.prototype._clearTimer=function(){void 0!==this._timer&&(clearTimeout(this._timer),this._timer=void 0)},i}(),b=function(){var i=function(h,A){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(P,V){P.__proto__=V}||function(P,V){for(var B in V)Object.prototype.hasOwnProperty.call(V,B)&&(P[B]=V[B])})(h,A)};return function(h,A){if("function"!=typeof A&&null!==A)throw new TypeError("Class extends value "+String(A)+" is not a constructor or null");function P(){this.constructor=h}i(h,A),h.prototype=null===A?Object.create(A):(P.prototype=A.prototype,new P)}}(),c=function(i){function h(A,P){var V=i.call(this,A,P)||this;return V.onInit(P),V}return b(h,i),h.prototype.onInit=function(A){var P=this;!0!==(null==A?void 0:A.disableAutoFlushOnDocumentHide)&&typeof document<"u"&&(this._visibilityChangeListener=function(){"hidden"===document.visibilityState&&P.forceFlush()},this._pageHideListener=function(){P.forceFlush()},document.addEventListener("visibilitychange",this._visibilityChangeListener),document.addEventListener("pagehide",this._pageHideListener))},h.prototype.onShutdown=function(){typeof document<"u"&&(this._visibilityChangeListener&&document.removeEventListener("visibilitychange",this._visibilityChangeListener),this._pageHideListener&&document.removeEventListener("pagehide",this._pageHideListener))},h}(y)},3183:(vt,I,f)=>{"use strict";f.d(I,{t:()=>s});var r=f(45198),s=function(){function v(){}return v.prototype.shouldSample=function(){return{decision:r.i.NOT_RECORD}},v.prototype.toString=function(){return"AlwaysOffSampler"},v}()},6221:(vt,I,f)=>{"use strict";f.d(I,{f:()=>s});var r=f(45198),s=function(){function v(){}return v.prototype.shouldSample=function(){return{decision:r.i.RECORD_AND_SAMPLED}},v.prototype.toString=function(){return"AlwaysOnSampler"},v}()},80548:(vt,I,f)=>{"use strict";f.d(I,{e:()=>T});var r=f(92414),s=f(63051),v=f(57585),_=f(70440),g=f(3183),E=f(6221),T=function(){function x(M){var y,b,c,i;this._root=M.root,this._root||((0,_.s)(new Error("ParentBasedSampler must have a root sampler configured")),this._root=new E.f),this._remoteParentSampled=null!==(y=M.remoteParentSampled)&&void 0!==y?y:new E.f,this._remoteParentNotSampled=null!==(b=M.remoteParentNotSampled)&&void 0!==b?b:new g.t,this._localParentSampled=null!==(c=M.localParentSampled)&&void 0!==c?c:new E.f,this._localParentNotSampled=null!==(i=M.localParentNotSampled)&&void 0!==i?i:new g.t}return x.prototype.shouldSample=function(M,y,b,c,i,h){var A=r.u.getSpanContext(M);return A&&(0,s.YA)(A)?A.isRemote?A.traceFlags&v.X.SAMPLED?this._remoteParentSampled.shouldSample(M,y,b,c,i,h):this._remoteParentNotSampled.shouldSample(M,y,b,c,i,h):A.traceFlags&v.X.SAMPLED?this._localParentSampled.shouldSample(M,y,b,c,i,h):this._localParentNotSampled.shouldSample(M,y,b,c,i,h):this._root.shouldSample(M,y,b,c,i,h)},x.prototype.toString=function(){return"ParentBased{root="+this._root.toString()+", remoteParentSampled="+this._remoteParentSampled.toString()+", remoteParentNotSampled="+this._remoteParentNotSampled.toString()+", localParentSampled="+this._localParentSampled.toString()+", localParentNotSampled="+this._localParentNotSampled.toString()+"}"},x}()},48211:(vt,I,f)=>{"use strict";f.d(I,{h:()=>v});var r=f(63051),s=f(45198),v=function(){function _(g){void 0===g&&(g=0),this._ratio=g,this._ratio=this._normalize(g),this._upperBound=Math.floor(4294967295*this._ratio)}return _.prototype.shouldSample=function(g,E){return{decision:(0,r.hX)(E)&&this._accumulate(E)=1?1:g<=0?0:g},_.prototype._accumulate=function(g){for(var E=0,T=0;T>>0}return E},_}()},77686:(vt,I,f)=>{"use strict";f.d(I,{R:()=>_,W:()=>g});var r=f(87390),s=f(75701),v=f(98828);function _(E){var T={sampler:(0,r.m)()},x=(0,r.S)(),M=Object.assign({},x,T,E);return M.generalLimits=Object.assign({},x.generalLimits,E.generalLimits||{}),M.spanLimits=Object.assign({},x.spanLimits,E.spanLimits||{}),M}function g(E){var T,x,M,y,b,c,i,h,A,P,V,B,j=Object.assign({},E.spanLimits),re=(0,s.w)();return j.attributeCountLimit=null!==(c=null!==(b=null!==(y=null!==(x=null===(T=E.spanLimits)||void 0===T?void 0:T.attributeCountLimit)&&void 0!==x?x:null===(M=E.generalLimits)||void 0===M?void 0:M.attributeCountLimit)&&void 0!==y?y:re.OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT)&&void 0!==b?b:re.OTEL_ATTRIBUTE_COUNT_LIMIT)&&void 0!==c?c:v.fv,j.attributeValueLengthLimit=null!==(B=null!==(V=null!==(P=null!==(h=null===(i=E.spanLimits)||void 0===i?void 0:i.attributeValueLengthLimit)&&void 0!==h?h:null===(A=E.generalLimits)||void 0===A?void 0:A.attributeValueLengthLimit)&&void 0!==P?P:re.OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT)&&void 0!==V?V:re.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT)&&void 0!==B?B:v.aE,Object.assign({},E,{spanLimits:j})}},86215:(vt,I,f)=>{"use strict";f.d(I,{D:()=>_});var r=f(24773),_=function(){function g(){this._enabled=!1,this._currentContext=r.l}return g.prototype._bindFunction=function(E,T){void 0===E&&(E=r.l);var x=this,M=function(){for(var y=this,b=[],c=0;c0)&&!(M=x.next()).done;)y.push(M.value)}catch(c){b={error:c}}finally{try{M&&!M.done&&(T=x.return)&&T.call(x)}finally{if(b)throw b.error}}return y}(M),!1))}finally{this._currentContext=b}},g}()},77855:(vt,I,f)=>{"use strict";f.d(I,{Z:()=>_});var r=f(19553),s=f(86215),v=function(){var g=function(E,T){return(g=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(x,M){x.__proto__=M}||function(x,M){for(var y in M)Object.prototype.hasOwnProperty.call(M,y)&&(x[y]=M[y])})(E,T)};return function(E,T){if("function"!=typeof T&&null!==T)throw new TypeError("Class extends value "+String(T)+" is not a constructor or null");function x(){this.constructor=E}g(E,T),E.prototype=null===T?Object.create(T):(x.prototype=T.prototype,new x)}}(),_=function(g){function E(T){void 0===T&&(T={});var x=g.call(this,T)||this;if(T.contextManager)throw"contextManager should be defined in register method not in constructor";if(T.propagator)throw"propagator should be defined in register method not in constructor";return x}return v(E,g),E.prototype.register=function(T){void 0===T&&(T={}),void 0===T.contextManager&&(T.contextManager=new s.D),T.contextManager&&T.contextManager.enable(),g.prototype.register.call(this,T)},E}(r.l)},81116:(vt,I,f)=>{"use strict";f.r(I),f.d(I,{AlwaysOffSampler:()=>ae.t,AlwaysOnSampler:()=>de.f,BasicTracerProvider:()=>O.l,BatchSpanProcessor:()=>F.J,ConsoleSpanExporter:()=>te,ForceFlushState:()=>O.d,InMemorySpanExporter:()=>fe,NoopSpanProcessor:()=>X.N,ParentBasedSampler:()=>Pe.e,PerformanceTimingNames:()=>v,RandomIdGenerator:()=>k.s,SamplingDecision:()=>Le.i,SimpleSpanProcessor:()=>ee,Span:()=>Xe.L,StackContextManager:()=>s.D,TraceIdRatioBasedSampler:()=>ye.h,Tracer:()=>U.s,WebTracerProvider:()=>r.Z,addSpanNetworkEvent:()=>y,addSpanNetworkEvents:()=>b,getElementXPath:()=>j,getResource:()=>h,hasKey:()=>M,normalizeUrl:()=>B,parseUrl:()=>V,shouldPropagateTraceHeaders:()=>H,sortResources:()=>c});var T,r=f(77855),s=f(86215),v=function(ie){return ie.CONNECT_END="connectEnd",ie.CONNECT_START="connectStart",ie.DECODED_BODY_SIZE="decodedBodySize",ie.DOM_COMPLETE="domComplete",ie.DOM_CONTENT_LOADED_EVENT_END="domContentLoadedEventEnd",ie.DOM_CONTENT_LOADED_EVENT_START="domContentLoadedEventStart",ie.DOM_INTERACTIVE="domInteractive",ie.DOMAIN_LOOKUP_END="domainLookupEnd",ie.DOMAIN_LOOKUP_START="domainLookupStart",ie.ENCODED_BODY_SIZE="encodedBodySize",ie.FETCH_START="fetchStart",ie.LOAD_EVENT_END="loadEventEnd",ie.LOAD_EVENT_START="loadEventStart",ie.NAVIGATION_START="navigationStart",ie.REDIRECT_END="redirectEnd",ie.REDIRECT_START="redirectStart",ie.REQUEST_START="requestStart",ie.RESPONSE_END="responseEnd",ie.RESPONSE_START="responseStart",ie.SECURE_CONNECTION_START="secureConnectionStart",ie.UNLOAD_EVENT_END="unloadEventEnd",ie.UNLOAD_EVENT_START="unloadEventStart",ie}(v||{}),_=f(1119),g=f(28280),E=f(52666);function M(ie,K){return K in ie}function y(ie,K,ce,ge){var Oe=void 0,Ie=void 0;M(ce,K)&&"number"==typeof ce[K]&&(Oe=ce[K]);var ht=ge||v.FETCH_START;if(M(ce,ht)&&"number"==typeof ce[ht]&&(Ie=ce[ht]),void 0!==Oe&&void 0!==Ie&&Oe>=Ie)return ie.addEvent(K,Oe),ie}function b(ie,K){y(ie,v.FETCH_START,K),y(ie,v.DOMAIN_LOOKUP_START,K),y(ie,v.DOMAIN_LOOKUP_END,K),y(ie,v.CONNECT_START,K),M(K,"name")&&K.name.startsWith("https:")&&y(ie,v.SECURE_CONNECTION_START,K),y(ie,v.CONNECT_END,K),y(ie,v.REQUEST_START,K),y(ie,v.RESPONSE_START,K),y(ie,v.RESPONSE_END,K);var ce=K[v.ENCODED_BODY_SIZE];void 0!==ce&&ie.setAttribute(E.IXq.HTTP_RESPONSE_CONTENT_LENGTH,ce);var ge=K[v.DECODED_BODY_SIZE];void 0!==ge&&ce!==ge&&ie.setAttribute(E.IXq.HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED,ge)}function c(ie){return ie.slice().sort(function(K,ce){var ge=K[v.FETCH_START],Oe=ce[v.FETCH_START];return ge>Oe?1:ge=ht&&Ae<=Fe});return et.length>0&&(et=et.filter(function(Rt){return!Oe.has(Rt)})),et}(ie=ht.toString(),K,ce,ge,Oe,Ie);if(0===Fe.length)return{mainRequest:void 0};if(1===Fe.length)return{mainRequest:Fe[0]};var et=c(Fe);if(ht.origin!==i()&&et.length>1){var Rt=et[0],_t=function A(ie,K,ce){for(var ht,ge=(0,_.u5)(ce),Oe=(0,_.u5)((0,_.KJ)(K)),Ie=ie[1],Fe=ie.length,et=1;et=Oe&&(!ht||lt=0&&Oe===ie.localName}),ce.length>=1?ce.indexOf(ie)+1:0}(ie),Oe="";if(ce===Node.ELEMENT_NODE){var Ie=ie.getAttribute("id");if(K&&Ie)return'//*[@id="'+Ie+'"]';Oe=ie.localName}else if(ce===Node.TEXT_NODE||ce===Node.CDATA_SECTION_NODE)Oe="text()";else{if(ce!==Node.COMMENT_NODE)return"";Oe="comment()"}return Oe&&ge>1?"/"+Oe+"["+ge+"]":"/"+Oe}(ie,K);if(K&&ce.indexOf("@id")>0)return ce;var ge="";return ie.parentNode&&(ge+=j(ie.parentNode,!1)),ge+ce}function H(ie,K){var ce=K||[];return("string"==typeof ce||ce instanceof RegExp)&&(ce=[ce]),V(ie).origin===i()||ce.some(function(Oe){return(0,g.f)(ie,Oe)})}var U=f(31661),O=f(19553),F=f(44748),k=f(73348),$=f(99200),te=function(){function ie(){}return ie.prototype.export=function(K,ce){return this._sendSpans(K,ce)},ie.prototype.shutdown=function(){return this._sendSpans([]),this.forceFlush()},ie.prototype.forceFlush=function(){return Promise.resolve()},ie.prototype._exportInfo=function(K){var ce;return{resource:{attributes:K.resource.attributes},traceId:K.spanContext().traceId,parentId:K.parentSpanId,traceState:null===(ce=K.spanContext().traceState)||void 0===ce?void 0:ce.serialize(),name:K.name,id:K.spanContext().spanId,kind:K.kind,timestamp:(0,_.w_)(K.startTime),duration:(0,_.w_)(K.duration),attributes:K.attributes,status:K.status,events:K.events,links:K.links}},ie.prototype._sendSpans=function(K,ce){var ge,Oe;try{for(var Ie=function(ie){var K="function"==typeof Symbol&&Symbol.iterator,ce=K&&ie[K],ge=0;if(ce)return ce.call(ie);if(ie&&"number"==typeof ie.length)return{next:function(){return ie&&ge>=ie.length&&(ie=void 0),{value:ie&&ie[ge++],done:!ie}}};throw new TypeError(K?"Object is not iterable.":"Symbol.iterator is not defined.")}(K),ht=Ie.next();!ht.done;ht=Ie.next())console.dir(this._exportInfo(ht.value),{depth:3})}catch(et){ge={error:et}}finally{try{ht&&!ht.done&&(Oe=Ie.return)&&Oe.call(Ie)}finally{if(ge)throw ge.error}}if(ce)return ce({code:$.V.SUCCESS})},ie}(),fe=function(){function ie(){this._finishedSpans=[],this._stopped=!1}return ie.prototype.export=function(K,ce){var ge;if(this._stopped)return ce({code:$.V.FAILED,error:new Error("Exporter has been stopped")});(ge=this._finishedSpans).push.apply(ge,function(ie,K,ce){if(ce||2===arguments.length)for(var Ie,ge=0,Oe=K.length;ge0)&&!(Oe=ge.next()).done;)Ie.push(Oe.value)}catch(Fe){ht={error:Fe}}finally{try{Oe&&!Oe.done&&(ce=ge.return)&&ce.call(ge)}finally{if(ht)throw ht.error}}return Ie}(K),!1)),setTimeout(function(){return ce({code:$.V.SUCCESS})},0)},ie.prototype.shutdown=function(){return this._stopped=!0,this._finishedSpans=[],this.forceFlush()},ie.prototype.forceFlush=function(){return Promise.resolve()},ie.prototype.reset=function(){this._finishedSpans=[]},ie.prototype.getFinishedSpans=function(){return this._finishedSpans},ie}(),Se=f(57585),pe=f(25578),we=f(21902),q=f(70440),ee=function(){function ie(K){this._exporter=K,this._shutdownOnce=new pe.I(this._shutdown,this),this._unresolvedExports=new Set}return ie.prototype.forceFlush=function(){return function(ie,K,ce,ge){return new(ce||(ce=Promise))(function(Ie,ht){function Fe(_t){try{Rt(ge.next(_t))}catch(Ae){ht(Ae)}}function et(_t){try{Rt(ge.throw(_t))}catch(Ae){ht(Ae)}}function Rt(_t){_t.done?Ie(_t.value):function Oe(Ie){return Ie instanceof ce?Ie:new ce(function(ht){ht(Ie)})}(_t.value).then(Fe,et)}Rt((ge=ge.apply(ie,K||[])).next())})}(this,void 0,void 0,function(){return function(ie,K){var ge,Oe,Ie,ht,ce={label:0,sent:function(){if(1&Ie[0])throw Ie[1];return Ie[1]},trys:[],ops:[]};return ht={next:Fe(0),throw:Fe(1),return:Fe(2)},"function"==typeof Symbol&&(ht[Symbol.iterator]=function(){return this}),ht;function Fe(Rt){return function(_t){return function et(Rt){if(ge)throw new TypeError("Generator is already executing.");for(;ce;)try{if(ge=1,Oe&&(Ie=2&Rt[0]?Oe.return:Rt[0]?Oe.throw||((Ie=Oe.return)&&Ie.call(Oe),0):Oe.next)&&!(Ie=Ie.call(Oe,Rt[1])).done)return Ie;switch(Oe=0,Ie&&(Rt=[2&Rt[0],Ie.value]),Rt[0]){case 0:case 1:Ie=Rt;break;case 4:return ce.label++,{value:Rt[1],done:!1};case 5:ce.label++,Oe=Rt[1],Rt=[0];continue;case 7:Rt=ce.ops.pop(),ce.trys.pop();continue;default:if(!(Ie=(Ie=ce.trys).length>0&&Ie[Ie.length-1])&&(6===Rt[0]||2===Rt[0])){ce=0;continue}if(3===Rt[0]&&(!Ie||Rt[1]>Ie[0]&&Rt[1]{"use strict";f.r(I),f.d(I,{AWSECSLAUNCHTYPEVALUES_EC2:()=>s.Jn,AWSECSLAUNCHTYPEVALUES_FARGATE:()=>s.Fz,AwsEcsLaunchtypeValues:()=>s.AS,CLOUDPLATFORMVALUES_ALIBABA_CLOUD_ECS:()=>s.WE,CLOUDPLATFORMVALUES_ALIBABA_CLOUD_FC:()=>s.op,CLOUDPLATFORMVALUES_AWS_EC2:()=>s.WC,CLOUDPLATFORMVALUES_AWS_ECS:()=>s.p7,CLOUDPLATFORMVALUES_AWS_EKS:()=>s.Vx,CLOUDPLATFORMVALUES_AWS_ELASTIC_BEANSTALK:()=>s.Vf,CLOUDPLATFORMVALUES_AWS_LAMBDA:()=>s.JO,CLOUDPLATFORMVALUES_AZURE_AKS:()=>s.Vm,CLOUDPLATFORMVALUES_AZURE_APP_SERVICE:()=>s.L6,CLOUDPLATFORMVALUES_AZURE_CONTAINER_INSTANCES:()=>s.oH,CLOUDPLATFORMVALUES_AZURE_FUNCTIONS:()=>s.$R,CLOUDPLATFORMVALUES_AZURE_VM:()=>s.zF,CLOUDPLATFORMVALUES_GCP_APP_ENGINE:()=>s.$T,CLOUDPLATFORMVALUES_GCP_CLOUD_FUNCTIONS:()=>s.a1,CLOUDPLATFORMVALUES_GCP_CLOUD_RUN:()=>s.qB,CLOUDPLATFORMVALUES_GCP_COMPUTE_ENGINE:()=>s.Tg,CLOUDPLATFORMVALUES_GCP_KUBERNETES_ENGINE:()=>s.qN,CLOUDPROVIDERVALUES_ALIBABA_CLOUD:()=>s.Eh,CLOUDPROVIDERVALUES_AWS:()=>s.Xm,CLOUDPROVIDERVALUES_AZURE:()=>s.BY,CLOUDPROVIDERVALUES_GCP:()=>s.ov,CloudPlatformValues:()=>s.ns,CloudProviderValues:()=>s.jV,DBCASSANDRACONSISTENCYLEVELVALUES_ALL:()=>r.Bh9,DBCASSANDRACONSISTENCYLEVELVALUES_ANY:()=>r.Eo2,DBCASSANDRACONSISTENCYLEVELVALUES_EACH_QUORUM:()=>r.$8v,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_ONE:()=>r.slN,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_QUORUM:()=>r.VMk,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_SERIAL:()=>r.g9x,DBCASSANDRACONSISTENCYLEVELVALUES_ONE:()=>r.G49,DBCASSANDRACONSISTENCYLEVELVALUES_QUORUM:()=>r.vhy,DBCASSANDRACONSISTENCYLEVELVALUES_SERIAL:()=>r.OSW,DBCASSANDRACONSISTENCYLEVELVALUES_THREE:()=>r.O2W,DBCASSANDRACONSISTENCYLEVELVALUES_TWO:()=>r.WJJ,DBSYSTEMVALUES_ADABAS:()=>r.nWK,DBSYSTEMVALUES_CACHE:()=>r.V02,DBSYSTEMVALUES_CASSANDRA:()=>r.Rk0,DBSYSTEMVALUES_CLOUDSCAPE:()=>r.CQB,DBSYSTEMVALUES_COCKROACHDB:()=>r.y__,DBSYSTEMVALUES_COLDFUSION:()=>r.TKU,DBSYSTEMVALUES_COSMOSDB:()=>r.zmF,DBSYSTEMVALUES_COUCHBASE:()=>r.oBD,DBSYSTEMVALUES_COUCHDB:()=>r.hV,DBSYSTEMVALUES_DB2:()=>r.xhJ,DBSYSTEMVALUES_DERBY:()=>r.XTF,DBSYSTEMVALUES_DYNAMODB:()=>r.poY,DBSYSTEMVALUES_EDB:()=>r.ynC,DBSYSTEMVALUES_ELASTICSEARCH:()=>r.Ylk,DBSYSTEMVALUES_FILEMAKER:()=>r.Xdf,DBSYSTEMVALUES_FIREBIRD:()=>r.IOi,DBSYSTEMVALUES_FIRSTSQL:()=>r.$wW,DBSYSTEMVALUES_GEODE:()=>r.N4Y,DBSYSTEMVALUES_H2:()=>r.JZz,DBSYSTEMVALUES_HANADB:()=>r.Dzx,DBSYSTEMVALUES_HBASE:()=>r.Spc,DBSYSTEMVALUES_HIVE:()=>r.nwz,DBSYSTEMVALUES_HSQLDB:()=>r.pfp,DBSYSTEMVALUES_INFORMIX:()=>r.L5D,DBSYSTEMVALUES_INGRES:()=>r.L2R,DBSYSTEMVALUES_INSTANTDB:()=>r.K2_,DBSYSTEMVALUES_INTERBASE:()=>r.y6V,DBSYSTEMVALUES_MARIADB:()=>r.ngE,DBSYSTEMVALUES_MAXDB:()=>r.XER,DBSYSTEMVALUES_MEMCACHED:()=>r.Oe4,DBSYSTEMVALUES_MONGODB:()=>r.X36,DBSYSTEMVALUES_MSSQL:()=>r.Vp5,DBSYSTEMVALUES_MYSQL:()=>r.bfK,DBSYSTEMVALUES_NEO4J:()=>r.BJ_,DBSYSTEMVALUES_NETEZZA:()=>r.irN,DBSYSTEMVALUES_ORACLE:()=>r.PU4,DBSYSTEMVALUES_OTHER_SQL:()=>r.Wb_,DBSYSTEMVALUES_PERVASIVE:()=>r.mc2,DBSYSTEMVALUES_POINTBASE:()=>r.Y$v,DBSYSTEMVALUES_POSTGRESQL:()=>r.jCw,DBSYSTEMVALUES_PROGRESS:()=>r.KjL,DBSYSTEMVALUES_REDIS:()=>r.W_f,DBSYSTEMVALUES_REDSHIFT:()=>r.MpS,DBSYSTEMVALUES_SQLITE:()=>r.vl2,DBSYSTEMVALUES_SYBASE:()=>r.K0$,DBSYSTEMVALUES_TERADATA:()=>r.Xuz,DBSYSTEMVALUES_VERTICA:()=>r.lcm,DbCassandraConsistencyLevelValues:()=>r.Nxd,DbSystemValues:()=>r.Q5s,FAASDOCUMENTOPERATIONVALUES_DELETE:()=>r.mlL,FAASDOCUMENTOPERATIONVALUES_EDIT:()=>r.VEl,FAASDOCUMENTOPERATIONVALUES_INSERT:()=>r.oF4,FAASINVOKEDPROVIDERVALUES_ALIBABA_CLOUD:()=>r.y3W,FAASINVOKEDPROVIDERVALUES_AWS:()=>r.Tl5,FAASINVOKEDPROVIDERVALUES_AZURE:()=>r.d3j,FAASINVOKEDPROVIDERVALUES_GCP:()=>r.kOl,FAASTRIGGERVALUES_DATASOURCE:()=>r.uZf,FAASTRIGGERVALUES_HTTP:()=>r.v8K,FAASTRIGGERVALUES_OTHER:()=>r.ToY,FAASTRIGGERVALUES_PUBSUB:()=>r.CK9,FAASTRIGGERVALUES_TIMER:()=>r.IxL,FaasDocumentOperationValues:()=>r.Ijl,FaasInvokedProviderValues:()=>r.zI8,FaasTriggerValues:()=>r.iPC,HOSTARCHVALUES_AMD64:()=>s.so,HOSTARCHVALUES_ARM32:()=>s.hi,HOSTARCHVALUES_ARM64:()=>s.UQ,HOSTARCHVALUES_IA64:()=>s.av,HOSTARCHVALUES_PPC32:()=>s.OZ,HOSTARCHVALUES_PPC64:()=>s.DL,HOSTARCHVALUES_X86:()=>s.ig,HTTPFLAVORVALUES_HTTP_1_0:()=>r.dbJ,HTTPFLAVORVALUES_HTTP_1_1:()=>r.kPW,HTTPFLAVORVALUES_HTTP_2_0:()=>r.gGD,HTTPFLAVORVALUES_QUIC:()=>r.iFX,HTTPFLAVORVALUES_SPDY:()=>r.QhH,HostArchValues:()=>s.Cg,HttpFlavorValues:()=>r.dNH,MESSAGETYPEVALUES_RECEIVED:()=>r.sr7,MESSAGETYPEVALUES_SENT:()=>r.bZN,MESSAGINGDESTINATIONKINDVALUES_QUEUE:()=>r.npt,MESSAGINGDESTINATIONKINDVALUES_TOPIC:()=>r.HXm,MESSAGINGOPERATIONVALUES_PROCESS:()=>r.AVC,MESSAGINGOPERATIONVALUES_RECEIVE:()=>r.mO,MessageTypeValues:()=>r.Ywq,MessagingDestinationKindValues:()=>r.b7t,MessagingOperationValues:()=>r.Qgf,NETHOSTCONNECTIONSUBTYPEVALUES_CDMA:()=>r.i9b,NETHOSTCONNECTIONSUBTYPEVALUES_CDMA2000_1XRTT:()=>r.mN_,NETHOSTCONNECTIONSUBTYPEVALUES_EDGE:()=>r.Q_6,NETHOSTCONNECTIONSUBTYPEVALUES_EHRPD:()=>r.EPu,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_0:()=>r.uzh,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_A:()=>r.Bez,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_B:()=>r.uwh,NETHOSTCONNECTIONSUBTYPEVALUES_GPRS:()=>r.Rpt,NETHOSTCONNECTIONSUBTYPEVALUES_GSM:()=>r.AdO,NETHOSTCONNECTIONSUBTYPEVALUES_HSDPA:()=>r.hu9,NETHOSTCONNECTIONSUBTYPEVALUES_HSPA:()=>r.x0j,NETHOSTCONNECTIONSUBTYPEVALUES_HSPAP:()=>r.hze,NETHOSTCONNECTIONSUBTYPEVALUES_HSUPA:()=>r.kgK,NETHOSTCONNECTIONSUBTYPEVALUES_IDEN:()=>r.rBh,NETHOSTCONNECTIONSUBTYPEVALUES_IWLAN:()=>r.IMI,NETHOSTCONNECTIONSUBTYPEVALUES_LTE:()=>r.wYf,NETHOSTCONNECTIONSUBTYPEVALUES_LTE_CA:()=>r.bWQ,NETHOSTCONNECTIONSUBTYPEVALUES_NR:()=>r.JPM,NETHOSTCONNECTIONSUBTYPEVALUES_NRNSA:()=>r.ddb,NETHOSTCONNECTIONSUBTYPEVALUES_TD_SCDMA:()=>r._28,NETHOSTCONNECTIONSUBTYPEVALUES_UMTS:()=>r.yIV,NETHOSTCONNECTIONTYPEVALUES_CELL:()=>r.j7z,NETHOSTCONNECTIONTYPEVALUES_UNAVAILABLE:()=>r.D3U,NETHOSTCONNECTIONTYPEVALUES_UNKNOWN:()=>r.Vur,NETHOSTCONNECTIONTYPEVALUES_WIFI:()=>r.CGC,NETHOSTCONNECTIONTYPEVALUES_WIRED:()=>r.c1V,NETTRANSPORTVALUES_INPROC:()=>r.JjG,NETTRANSPORTVALUES_IP:()=>r.fN3,NETTRANSPORTVALUES_IP_TCP:()=>r.x85,NETTRANSPORTVALUES_IP_UDP:()=>r.ZUK,NETTRANSPORTVALUES_OTHER:()=>r.EUV,NETTRANSPORTVALUES_PIPE:()=>r.cjY,NETTRANSPORTVALUES_UNIX:()=>r.GR7,NetHostConnectionSubtypeValues:()=>r.cAF,NetHostConnectionTypeValues:()=>r.KSs,NetTransportValues:()=>r.z4S,OSTYPEVALUES_AIX:()=>s.cJ,OSTYPEVALUES_DARWIN:()=>s.JW,OSTYPEVALUES_DRAGONFLYBSD:()=>s.tD,OSTYPEVALUES_FREEBSD:()=>s.xG,OSTYPEVALUES_HPUX:()=>s.BT,OSTYPEVALUES_LINUX:()=>s.Yh,OSTYPEVALUES_NETBSD:()=>s.sS,OSTYPEVALUES_OPENBSD:()=>s.h7,OSTYPEVALUES_SOLARIS:()=>s.l9,OSTYPEVALUES_WINDOWS:()=>s.xR,OSTYPEVALUES_Z_OS:()=>s.Pi,OsTypeValues:()=>s.h0,RPCGRPCSTATUSCODEVALUES_ABORTED:()=>r.$5b,RPCGRPCSTATUSCODEVALUES_ALREADY_EXISTS:()=>r.TiO,RPCGRPCSTATUSCODEVALUES_CANCELLED:()=>r.Ryq,RPCGRPCSTATUSCODEVALUES_DATA_LOSS:()=>r.ueJ,RPCGRPCSTATUSCODEVALUES_DEADLINE_EXCEEDED:()=>r.wAY,RPCGRPCSTATUSCODEVALUES_FAILED_PRECONDITION:()=>r._pX,RPCGRPCSTATUSCODEVALUES_INTERNAL:()=>r.dXK,RPCGRPCSTATUSCODEVALUES_INVALID_ARGUMENT:()=>r.njt,RPCGRPCSTATUSCODEVALUES_NOT_FOUND:()=>r.ay9,RPCGRPCSTATUSCODEVALUES_OK:()=>r.wJ,RPCGRPCSTATUSCODEVALUES_OUT_OF_RANGE:()=>r.GY$,RPCGRPCSTATUSCODEVALUES_PERMISSION_DENIED:()=>r.nXs,RPCGRPCSTATUSCODEVALUES_RESOURCE_EXHAUSTED:()=>r.KNN,RPCGRPCSTATUSCODEVALUES_UNAUTHENTICATED:()=>r._Q_,RPCGRPCSTATUSCODEVALUES_UNAVAILABLE:()=>r.gFG,RPCGRPCSTATUSCODEVALUES_UNIMPLEMENTED:()=>r.p1q,RPCGRPCSTATUSCODEVALUES_UNKNOWN:()=>r.ch2,RpcGrpcStatusCodeValues:()=>r.f3T,SEMATTRS_AWS_DYNAMODB_ATTRIBUTES_TO_GET:()=>r.wpU,SEMATTRS_AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS:()=>r.fhG,SEMATTRS_AWS_DYNAMODB_CONSISTENT_READ:()=>r.tGA,SEMATTRS_AWS_DYNAMODB_CONSUMED_CAPACITY:()=>r.byW,SEMATTRS_AWS_DYNAMODB_COUNT:()=>r.F7w,SEMATTRS_AWS_DYNAMODB_EXCLUSIVE_START_TABLE:()=>r.Wif,SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES:()=>r.TVZ,SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES:()=>r.Ouu,SEMATTRS_AWS_DYNAMODB_INDEX_NAME:()=>r.gUJ,SEMATTRS_AWS_DYNAMODB_ITEM_COLLECTION_METRICS:()=>r.Wx7,SEMATTRS_AWS_DYNAMODB_LIMIT:()=>r.La$,SEMATTRS_AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES:()=>r.ti,SEMATTRS_AWS_DYNAMODB_PROJECTION:()=>r.frU,SEMATTRS_AWS_DYNAMODB_PROVISIONED_READ_CAPACITY:()=>r.a4d,SEMATTRS_AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY:()=>r.p30,SEMATTRS_AWS_DYNAMODB_SCANNED_COUNT:()=>r.sxk,SEMATTRS_AWS_DYNAMODB_SCAN_FORWARD:()=>r.r0m,SEMATTRS_AWS_DYNAMODB_SEGMENT:()=>r.F0K,SEMATTRS_AWS_DYNAMODB_SELECT:()=>r.u4L,SEMATTRS_AWS_DYNAMODB_TABLE_COUNT:()=>r.mGg,SEMATTRS_AWS_DYNAMODB_TABLE_NAMES:()=>r.Ta3,SEMATTRS_AWS_DYNAMODB_TOTAL_SEGMENTS:()=>r.DBy,SEMATTRS_AWS_LAMBDA_INVOKED_ARN:()=>r.TCh,SEMATTRS_CODE_FILEPATH:()=>r.cvh,SEMATTRS_CODE_FUNCTION:()=>r.jrL,SEMATTRS_CODE_LINENO:()=>r.usz,SEMATTRS_CODE_NAMESPACE:()=>r.klU,SEMATTRS_DB_CASSANDRA_CONSISTENCY_LEVEL:()=>r.Qt9,SEMATTRS_DB_CASSANDRA_COORDINATOR_DC:()=>r.DNX,SEMATTRS_DB_CASSANDRA_COORDINATOR_ID:()=>r.xq_,SEMATTRS_DB_CASSANDRA_IDEMPOTENCE:()=>r._iR,SEMATTRS_DB_CASSANDRA_KEYSPACE:()=>r.Unu,SEMATTRS_DB_CASSANDRA_PAGE_SIZE:()=>r.Itx,SEMATTRS_DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT:()=>r.NlD,SEMATTRS_DB_CASSANDRA_TABLE:()=>r.zri,SEMATTRS_DB_CONNECTION_STRING:()=>r.cd9,SEMATTRS_DB_HBASE_NAMESPACE:()=>r.bd4,SEMATTRS_DB_JDBC_DRIVER_CLASSNAME:()=>r.qGX,SEMATTRS_DB_MONGODB_COLLECTION:()=>r.NlA,SEMATTRS_DB_MSSQL_INSTANCE_NAME:()=>r.Eh5,SEMATTRS_DB_NAME:()=>r.Rt6,SEMATTRS_DB_OPERATION:()=>r.l60,SEMATTRS_DB_REDIS_DATABASE_INDEX:()=>r.wy2,SEMATTRS_DB_SQL_TABLE:()=>r.pHC,SEMATTRS_DB_STATEMENT:()=>r.FoJ,SEMATTRS_DB_SYSTEM:()=>r.V0Q,SEMATTRS_DB_USER:()=>r.N9D,SEMATTRS_ENDUSER_ID:()=>r.RHQ,SEMATTRS_ENDUSER_ROLE:()=>r.cSi,SEMATTRS_ENDUSER_SCOPE:()=>r.MWE,SEMATTRS_EXCEPTION_ESCAPED:()=>r.GKr,SEMATTRS_EXCEPTION_MESSAGE:()=>r.aP6,SEMATTRS_EXCEPTION_STACKTRACE:()=>r.ipG,SEMATTRS_EXCEPTION_TYPE:()=>r.P4J,SEMATTRS_FAAS_COLDSTART:()=>r.TRX,SEMATTRS_FAAS_CRON:()=>r.HVV,SEMATTRS_FAAS_DOCUMENT_COLLECTION:()=>r.LxM,SEMATTRS_FAAS_DOCUMENT_NAME:()=>r.aTe,SEMATTRS_FAAS_DOCUMENT_OPERATION:()=>r.abe,SEMATTRS_FAAS_DOCUMENT_TIME:()=>r.aKn,SEMATTRS_FAAS_EXECUTION:()=>r.dsp,SEMATTRS_FAAS_INVOKED_NAME:()=>r.PIi,SEMATTRS_FAAS_INVOKED_PROVIDER:()=>r.XNY,SEMATTRS_FAAS_INVOKED_REGION:()=>r.imY,SEMATTRS_FAAS_TIME:()=>r.cFk,SEMATTRS_FAAS_TRIGGER:()=>r.bes,SEMATTRS_HTTP_CLIENT_IP:()=>r.nS0,SEMATTRS_HTTP_FLAVOR:()=>r.o8O,SEMATTRS_HTTP_HOST:()=>r.Qv9,SEMATTRS_HTTP_METHOD:()=>r.vof,SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH:()=>r.OdI,SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED:()=>r.Plv,SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH:()=>r.crS,SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED:()=>r.XyR,SEMATTRS_HTTP_ROUTE:()=>r.tto,SEMATTRS_HTTP_SCHEME:()=>r.zPu,SEMATTRS_HTTP_SERVER_NAME:()=>r.H35,SEMATTRS_HTTP_STATUS_CODE:()=>r.W_O,SEMATTRS_HTTP_TARGET:()=>r.fub,SEMATTRS_HTTP_URL:()=>r.vSt,SEMATTRS_HTTP_USER_AGENT:()=>r.Nz$,SEMATTRS_MESSAGE_COMPRESSED_SIZE:()=>r.U5o,SEMATTRS_MESSAGE_ID:()=>r.Gsd,SEMATTRS_MESSAGE_TYPE:()=>r.$58,SEMATTRS_MESSAGE_UNCOMPRESSED_SIZE:()=>r.LfK,SEMATTRS_MESSAGING_CONSUMER_ID:()=>r.w54,SEMATTRS_MESSAGING_CONVERSATION_ID:()=>r.nN_,SEMATTRS_MESSAGING_DESTINATION:()=>r.Yjy,SEMATTRS_MESSAGING_DESTINATION_KIND:()=>r.lDI,SEMATTRS_MESSAGING_KAFKA_CLIENT_ID:()=>r.cZl,SEMATTRS_MESSAGING_KAFKA_CONSUMER_GROUP:()=>r.rsL,SEMATTRS_MESSAGING_KAFKA_MESSAGE_KEY:()=>r.yRs,SEMATTRS_MESSAGING_KAFKA_PARTITION:()=>r.tNm,SEMATTRS_MESSAGING_KAFKA_TOMBSTONE:()=>r.E__,SEMATTRS_MESSAGING_MESSAGE_ID:()=>r.XH7,SEMATTRS_MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES:()=>r.CdG,SEMATTRS_MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES:()=>r._Zr,SEMATTRS_MESSAGING_OPERATION:()=>r.zpg,SEMATTRS_MESSAGING_PROTOCOL:()=>r._af,SEMATTRS_MESSAGING_PROTOCOL_VERSION:()=>r.DA0,SEMATTRS_MESSAGING_RABBITMQ_ROUTING_KEY:()=>r.Zl1,SEMATTRS_MESSAGING_SYSTEM:()=>r.zBy,SEMATTRS_MESSAGING_TEMP_DESTINATION:()=>r.JK9,SEMATTRS_MESSAGING_URL:()=>r.t8j,SEMATTRS_NET_HOST_CARRIER_ICC:()=>r.wgx,SEMATTRS_NET_HOST_CARRIER_MCC:()=>r.cA3,SEMATTRS_NET_HOST_CARRIER_MNC:()=>r.hXS,SEMATTRS_NET_HOST_CARRIER_NAME:()=>r.ynP,SEMATTRS_NET_HOST_CONNECTION_SUBTYPE:()=>r.Ltc,SEMATTRS_NET_HOST_CONNECTION_TYPE:()=>r.PfM,SEMATTRS_NET_HOST_IP:()=>r.j$y,SEMATTRS_NET_HOST_NAME:()=>r.h70,SEMATTRS_NET_HOST_PORT:()=>r.Puv,SEMATTRS_NET_PEER_IP:()=>r.RvY,SEMATTRS_NET_PEER_NAME:()=>r.nvt,SEMATTRS_NET_PEER_PORT:()=>r.ZUg,SEMATTRS_NET_TRANSPORT:()=>r.Ac3,SEMATTRS_PEER_SERVICE:()=>r.RyT,SEMATTRS_RPC_GRPC_STATUS_CODE:()=>r.C2y,SEMATTRS_RPC_JSONRPC_ERROR_CODE:()=>r.Zwr,SEMATTRS_RPC_JSONRPC_ERROR_MESSAGE:()=>r.z_u,SEMATTRS_RPC_JSONRPC_REQUEST_ID:()=>r.yew,SEMATTRS_RPC_JSONRPC_VERSION:()=>r.ZSz,SEMATTRS_RPC_METHOD:()=>r.Y3v,SEMATTRS_RPC_SERVICE:()=>r.GOV,SEMATTRS_RPC_SYSTEM:()=>r.sLO,SEMATTRS_THREAD_ID:()=>r.lpz,SEMATTRS_THREAD_NAME:()=>r.taz,SEMRESATTRS_AWS_ECS_CLUSTER_ARN:()=>s.VH,SEMRESATTRS_AWS_ECS_CONTAINER_ARN:()=>s.SV,SEMRESATTRS_AWS_ECS_LAUNCHTYPE:()=>s.SA,SEMRESATTRS_AWS_ECS_TASK_ARN:()=>s.yB,SEMRESATTRS_AWS_ECS_TASK_FAMILY:()=>s.Zf,SEMRESATTRS_AWS_ECS_TASK_REVISION:()=>s.MK,SEMRESATTRS_AWS_EKS_CLUSTER_ARN:()=>s.v0,SEMRESATTRS_AWS_LOG_GROUP_ARNS:()=>s.an,SEMRESATTRS_AWS_LOG_GROUP_NAMES:()=>s.qF,SEMRESATTRS_AWS_LOG_STREAM_ARNS:()=>s.ZZ,SEMRESATTRS_AWS_LOG_STREAM_NAMES:()=>s.Dn,SEMRESATTRS_CLOUD_ACCOUNT_ID:()=>s.E3,SEMRESATTRS_CLOUD_AVAILABILITY_ZONE:()=>s.xC,SEMRESATTRS_CLOUD_PLATFORM:()=>s.Iq,SEMRESATTRS_CLOUD_PROVIDER:()=>s.mA,SEMRESATTRS_CLOUD_REGION:()=>s.Nw,SEMRESATTRS_CONTAINER_ID:()=>s.ux,SEMRESATTRS_CONTAINER_IMAGE_NAME:()=>s.uB,SEMRESATTRS_CONTAINER_IMAGE_TAG:()=>s.RB,SEMRESATTRS_CONTAINER_NAME:()=>s.aA,SEMRESATTRS_CONTAINER_RUNTIME:()=>s.PZ,SEMRESATTRS_DEPLOYMENT_ENVIRONMENT:()=>s.I2,SEMRESATTRS_DEVICE_ID:()=>s.tn,SEMRESATTRS_DEVICE_MODEL_IDENTIFIER:()=>s.BF,SEMRESATTRS_DEVICE_MODEL_NAME:()=>s.Bt,SEMRESATTRS_FAAS_ID:()=>s.Mm,SEMRESATTRS_FAAS_INSTANCE:()=>s.uu,SEMRESATTRS_FAAS_MAX_MEMORY:()=>s.PO,SEMRESATTRS_FAAS_NAME:()=>s.Uf,SEMRESATTRS_FAAS_VERSION:()=>s.lO,SEMRESATTRS_HOST_ARCH:()=>s.yT,SEMRESATTRS_HOST_ID:()=>s.zs,SEMRESATTRS_HOST_IMAGE_ID:()=>s.HP,SEMRESATTRS_HOST_IMAGE_NAME:()=>s.be,SEMRESATTRS_HOST_IMAGE_VERSION:()=>s.g9,SEMRESATTRS_HOST_NAME:()=>s.RK,SEMRESATTRS_HOST_TYPE:()=>s.kE,SEMRESATTRS_K8S_CLUSTER_NAME:()=>s.IG,SEMRESATTRS_K8S_CONTAINER_NAME:()=>s.Pb,SEMRESATTRS_K8S_CRONJOB_NAME:()=>s.Vy,SEMRESATTRS_K8S_CRONJOB_UID:()=>s.gT,SEMRESATTRS_K8S_DAEMONSET_NAME:()=>s.Su,SEMRESATTRS_K8S_DAEMONSET_UID:()=>s.rK,SEMRESATTRS_K8S_DEPLOYMENT_NAME:()=>s.do,SEMRESATTRS_K8S_DEPLOYMENT_UID:()=>s.k7,SEMRESATTRS_K8S_JOB_NAME:()=>s.z3,SEMRESATTRS_K8S_JOB_UID:()=>s.mc,SEMRESATTRS_K8S_NAMESPACE_NAME:()=>s.Tl,SEMRESATTRS_K8S_NODE_NAME:()=>s.Ky,SEMRESATTRS_K8S_NODE_UID:()=>s.pV,SEMRESATTRS_K8S_POD_NAME:()=>s.TH,SEMRESATTRS_K8S_POD_UID:()=>s.gJ,SEMRESATTRS_K8S_REPLICASET_NAME:()=>s.kv,SEMRESATTRS_K8S_REPLICASET_UID:()=>s.PU,SEMRESATTRS_K8S_STATEFULSET_NAME:()=>s.kn,SEMRESATTRS_K8S_STATEFULSET_UID:()=>s.f8,SEMRESATTRS_OS_DESCRIPTION:()=>s.ik,SEMRESATTRS_OS_NAME:()=>s.hQ,SEMRESATTRS_OS_TYPE:()=>s.ko,SEMRESATTRS_OS_VERSION:()=>s.AC,SEMRESATTRS_PROCESS_COMMAND:()=>s.Cn,SEMRESATTRS_PROCESS_COMMAND_ARGS:()=>s.U2,SEMRESATTRS_PROCESS_COMMAND_LINE:()=>s.x2,SEMRESATTRS_PROCESS_EXECUTABLE_NAME:()=>s.fP,SEMRESATTRS_PROCESS_EXECUTABLE_PATH:()=>s.xQ,SEMRESATTRS_PROCESS_OWNER:()=>s.Yb,SEMRESATTRS_PROCESS_PID:()=>s.ky,SEMRESATTRS_PROCESS_RUNTIME_DESCRIPTION:()=>s.C3,SEMRESATTRS_PROCESS_RUNTIME_NAME:()=>s.lb,SEMRESATTRS_PROCESS_RUNTIME_VERSION:()=>s.cV,SEMRESATTRS_SERVICE_INSTANCE_ID:()=>s.PL,SEMRESATTRS_SERVICE_NAME:()=>s.AV,SEMRESATTRS_SERVICE_NAMESPACE:()=>s.ar,SEMRESATTRS_SERVICE_VERSION:()=>s.xs,SEMRESATTRS_TELEMETRY_AUTO_VERSION:()=>s.nA,SEMRESATTRS_TELEMETRY_SDK_LANGUAGE:()=>s.Pl,SEMRESATTRS_TELEMETRY_SDK_NAME:()=>s.$L,SEMRESATTRS_TELEMETRY_SDK_VERSION:()=>s.y$,SEMRESATTRS_WEBENGINE_DESCRIPTION:()=>s.U1,SEMRESATTRS_WEBENGINE_NAME:()=>s.HF,SEMRESATTRS_WEBENGINE_VERSION:()=>s.WN,SemanticAttributes:()=>r.IXq,SemanticResourceAttributes:()=>s._2,TELEMETRYSDKLANGUAGEVALUES_CPP:()=>s.S5,TELEMETRYSDKLANGUAGEVALUES_DOTNET:()=>s.XE,TELEMETRYSDKLANGUAGEVALUES_ERLANG:()=>s.o2,TELEMETRYSDKLANGUAGEVALUES_GO:()=>s.HE,TELEMETRYSDKLANGUAGEVALUES_JAVA:()=>s.du,TELEMETRYSDKLANGUAGEVALUES_NODEJS:()=>s.wE,TELEMETRYSDKLANGUAGEVALUES_PHP:()=>s.tP,TELEMETRYSDKLANGUAGEVALUES_PYTHON:()=>s.$c,TELEMETRYSDKLANGUAGEVALUES_RUBY:()=>s.jN,TELEMETRYSDKLANGUAGEVALUES_WEBJS:()=>s.uh,TelemetrySdkLanguageValues:()=>s.wP});var r=f(52666),s=f(23413)},32610:(vt,I,f)=>{"use strict";function r(s){for(var v={},_=s.length,g=0;g<_;g++){var E=s[g];E&&(v[String(E).toUpperCase().replace(/[-.]/g,"_")]=E)}return v}f.d(I,{O:()=>r})},23413:(vt,I,f)=>{"use strict";f.d(I,{$L:()=>Ar,$R:()=>Ht,$T:()=>me,$c:()=>qe,AC:()=>Wr,AS:()=>sn,AV:()=>os,BF:()=>$t,BT:()=>tr,BY:()=>Mo,Bt:()=>gn,C3:()=>gs,Cg:()=>kr,Cn:()=>Uo,DL:()=>Hi,Dn:()=>Jn,E3:()=>cn,Eh:()=>Zo,Fz:()=>Bt,HE:()=>ys,HF:()=>Eo,HP:()=>jt,I2:()=>it,IG:()=>Re,Iq:()=>an,JO:()=>Ao,JW:()=>Pi,Jn:()=>ut,Ky:()=>Qe,L6:()=>nt,MK:()=>Rn,Mm:()=>ft,Nw:()=>Hn,OZ:()=>co,PL:()=>vs,PO:()=>Zt,PU:()=>qn,PZ:()=>st,Pb:()=>Yn,Pi:()=>no,Pl:()=>wr,RB:()=>In,RK:()=>$n,S5:()=>ea,SA:()=>mt,SV:()=>Qt,Su:()=>Gt,TH:()=>Fn,Tg:()=>qt,Tl:()=>Kt,U1:()=>ss,U2:()=>pr,UQ:()=>Rr,Uf:()=>Tn,VH:()=>ke,Vf:()=>Ns,Vm:()=>je,Vx:()=>Do,Vy:()=>wi,WC:()=>ts,WE:()=>Gs,WN:()=>Ds,XE:()=>ll,Xm:()=>ko,Yb:()=>Ko,Yh:()=>yi,ZZ:()=>Ci,Zf:()=>bn,_2:()=>Ro,a1:()=>yn,aA:()=>ki,an:()=>Ln,ar:()=>Vo,av:()=>Zr,be:()=>gi,cJ:()=>zs,cV:()=>xs,do:()=>ji,du:()=>Es,f8:()=>xi,fP:()=>ps,g9:()=>ct,gJ:()=>hn,gT:()=>oi,h0:()=>ls,h7:()=>No,hQ:()=>Er,hi:()=>Di,ig:()=>mr,ik:()=>Ri,jN:()=>nn,jV:()=>xo,k7:()=>di,kE:()=>Zn,kn:()=>bi,ko:()=>$i,kv:()=>Si,ky:()=>Pr,l9:()=>va,lO:()=>Pt,lb:()=>ms,mA:()=>Ct,mc:()=>mn,nA:()=>Fi,ns:()=>G,o2:()=>ta,oH:()=>rt,op:()=>ks,ov:()=>$o,p7:()=>Wo,pV:()=>gt,qB:()=>hi,qF:()=>Xt,qN:()=>Gi,rK:()=>St,sS:()=>_r,so:()=>zi,tD:()=>bs,tP:()=>Ee,tn:()=>Lt,uB:()=>En,uh:()=>He,uu:()=>on,ux:()=>Bi,v0:()=>Dt,wE:()=>na,wP:()=>Ft,x2:()=>po,xC:()=>ln,xG:()=>gr,xQ:()=>Ws,xR:()=>ti,xs:()=>vr,y$:()=>lr,yB:()=>ot,yT:()=>ii,z3:()=>Wn,zF:()=>Ls,zs:()=>Sn});var r=f(32610),s="cloud.provider",v="cloud.account.id",_="cloud.region",g="cloud.availability_zone",E="cloud.platform",T="aws.ecs.container.arn",x="aws.ecs.cluster.arn",M="aws.ecs.launchtype",y="aws.ecs.task.arn",b="aws.ecs.task.family",c="aws.ecs.task.revision",i="aws.eks.cluster.arn",h="aws.log.group.names",A="aws.log.group.arns",P="aws.log.stream.names",V="aws.log.stream.arns",B="container.name",j="container.id",re="container.runtime",z="container.image.name",H="container.image.tag",U="deployment.environment",O="device.id",F="device.model.identifier",k="device.model.name",$="faas.name",ne="faas.id",te="faas.version",Z="faas.instance",se="faas.max_memory",fe="host.id",Se="host.name",pe="host.type",we="host.arch",q="host.image.name",J="host.image.id",W="host.image.version",ee="k8s.cluster.name",X="k8s.node.name",ae="k8s.node.uid",de="k8s.namespace.name",Pe="k8s.pod.uid",ye="k8s.pod.name",Le="k8s.container.name",Xe="k8s.replicaset.uid",ie="k8s.replicaset.name",K="k8s.deployment.uid",ce="k8s.deployment.name",ge="k8s.statefulset.uid",Oe="k8s.statefulset.name",Ie="k8s.daemonset.uid",ht="k8s.daemonset.name",Fe="k8s.job.uid",et="k8s.job.name",Rt="k8s.cronjob.uid",_t="k8s.cronjob.name",Ae="os.type",lt="os.description",Ze="os.name",yt="os.version",un="process.pid",kn="process.executable.name",Wt="process.executable.path",rn="process.command",zt="process.command_line",dn="process.command_args",vn="process.owner",xe="process.runtime.name",Tt="process.runtime.version",Et="process.runtime.description",Ye="service.name",Nt="service.namespace",Yt="service.instance.id",Ut="service.version",Pn="telemetry.sdk.name",Vt="telemetry.sdk.language",bt="telemetry.sdk.version",De="telemetry.auto.version",tt="webengine.name",Ve="webengine.version",Je="webengine.description",Ct=s,cn=v,Hn=_,ln=g,an=E,Qt=T,ke=x,mt=M,ot=y,bn=b,Rn=c,Dt=i,Xt=h,Ln=A,Jn=P,Ci=V,ki=B,Bi=j,st=re,En=z,In=H,it=U,Lt=O,$t=F,gn=k,Tn=$,ft=ne,Pt=te,on=Z,Zt=se,Sn=fe,$n=Se,Zn=pe,ii=we,gi=q,jt=J,ct=W,Re=ee,Qe=X,gt=ae,Kt=de,hn=Pe,Fn=ye,Yn=Le,qn=Xe,Si=ie,di=K,ji=ce,xi=ge,bi=Oe,St=Ie,Gt=ht,mn=Fe,Wn=et,oi=Rt,wi=_t,$i=Ae,Ri=lt,Er=Ze,Wr=yt,Pr=un,ps=kn,Ws=Wt,Uo=rn,po=zt,pr=dn,Ko=vn,ms=xe,xs=Tt,gs=Et,os=Ye,Vo=Nt,vs=Yt,vr=Ut,Ar=Pn,wr=Vt,lr=bt,Fi=De,Eo=tt,Ds=Ve,ss=Je,Ro=(0,r.O)([s,v,_,g,E,T,x,M,y,b,c,i,h,A,P,V,B,j,re,z,H,U,O,F,k,$,ne,te,Z,se,fe,Se,pe,we,q,J,W,ee,X,ae,de,Pe,ye,Le,Xe,ie,K,ce,ge,Oe,Ie,ht,Fe,et,Rt,_t,Ae,lt,Ze,yt,un,kn,Wt,rn,zt,dn,vn,xe,Tt,Et,Ye,Nt,Yt,Ut,Pn,Vt,bt,De,tt,Ve,Je]),as="alibaba_cloud",Zo=as,ko="aws",Mo="azure",$o="gcp",xo=(0,r.O)([as,"aws","azure","gcp"]),Gr="alibaba_cloud_ecs",Yo="alibaba_cloud_fc",_s="aws_ec2",qo="aws_ecs",zr="aws_eks",Ir="aws_lambda",Mt="aws_elastic_beanstalk",Xo="azure_vm",jo="azure_container_instances",Kr="azure_aks",Ho="azure_functions",lo="azure_app_service",Mr="gcp_compute_engine",es="gcp_cloud_run",So="gcp_kubernetes_engine",Ji="gcp_cloud_functions",vo="gcp_app_engine",Gs=Gr,ks=Yo,ts=_s,Wo=qo,Do=zr,Ao=Ir,Ns=Mt,Ls=Xo,rt=jo,je=Kr,Ht=Ho,nt=lo,qt=Mr,hi=es,Gi=So,yn=Ji,me=vo,G=(0,r.O)([Gr,Yo,_s,qo,zr,Ir,Mt,Xo,jo,Kr,Ho,lo,Mr,es,So,Ji,vo]),Ne="fargate",ut="ec2",Bt=Ne,sn=(0,r.O)(["ec2",Ne]),zi="amd64",Di="arm32",Rr="arm64",Zr="ia64",co="ppc32",Hi="ppc64",mr="x86",kr=(0,r.O)(["amd64","arm32","arm64","ia64","ppc32","ppc64","x86"]),Fr="windows",ns="freebsd",Sa="openbsd",Os="dragonflybsd",ni="solaris",ti=Fr,yi="linux",Pi="darwin",gr=ns,_r="netbsd",No=Sa,bs=Os,tr="hpux",zs="aix",va=ni,no="z_os",ls=(0,r.O)([Fr,"linux","darwin",ns,"netbsd",Sa,Os,"hpux","aix",ni,"z_os"]),ea="cpp",ll="dotnet",ta="erlang",ys="go",Es="java",na="nodejs",Ee="php",qe="python",nn="ruby",He="webjs",Ft=(0,r.O)(["cpp","dotnet","erlang","go","java","nodejs","php","python","ruby","webjs"])},52666:(vt,I,f)=>{"use strict";f.d(I,{$58:()=>uo,$5b:()=>Lc,$8v:()=>D,$wW:()=>_a,AVC:()=>Od,Ac3:()=>Jo,AdO:()=>pp,BJ_:()=>Sc,Bez:()=>cc,Bh9:()=>S,C2y:()=>va,CGC:()=>qa,CK9:()=>Mn,CQB:()=>Pl,CdG:()=>Un,D3U:()=>Gl,DA0:()=>ns,DBy:()=>Di,DNX:()=>Uo,Dzx:()=>Ts,EPu:()=>Pc,EUV:()=>wc,E__:()=>No,Eh5:()=>wi,Eo2:()=>$e,F0K:()=>zi,F7w:()=>Rr,FoJ:()=>Wn,G49:()=>oe,GKr:()=>Vo,GOV:()=>tr,GR7:()=>xa,GY$:()=>Ld,Gsd:()=>Ks,H35:()=>nt,HVV:()=>Ds,HXm:()=>kc,IMI:()=>Ic,IOi:()=>ba,IXq:()=>Xa,Ijl:()=>eo,Itx:()=>Ri,IxL:()=>ci,JK9:()=>Vr,JPM:()=>yu,JZz:()=>fo,JjG:()=>Xs,K0$:()=>zn,K2_:()=>We,KNN:()=>od,KSs:()=>Mc,KjL:()=>us,L2R:()=>Rl,L5D:()=>Me,La$:()=>Bt,LfK:()=>ka,Ltc:()=>Yo,LxM:()=>Ar,MWE:()=>Kr,MpS:()=>oa,N4Y:()=>Ca,N9D:()=>St,NlA:()=>Ko,NlD:()=>ps,Nxd:()=>At,Nz$:()=>Ns,O2W:()=>Ce,OSW:()=>Be,OdI:()=>Ls,Oe4:()=>dl,Ouu:()=>Hi,P4J:()=>xs,PIi:()=>Ro,PU4:()=>vl,PfM:()=>Gr,Plv:()=>rt,Puv:()=>$o,Q5s:()=>Ac,Q_6:()=>lc,Qgf:()=>Hs,QhH:()=>qc,Qt9:()=>Er,Qv9:()=>ts,RHQ:()=>Xo,Rk0:()=>so,Rpt:()=>tl,Rt6:()=>mn,RvY:()=>to,RyT:()=>Mt,Ryq:()=>Mu,Spc:()=>sa,TCh:()=>ji,TKU:()=>qr,TRX:()=>ss,TVZ:()=>ei,Ta3:()=>Gi,TiO:()=>rd,Tl5:()=>$r,ToY:()=>li,U5o:()=>$s,Unu:()=>$i,V02:()=>Yc,V0Q:()=>xi,VEl:()=>Li,VMk:()=>Y,Vp5:()=>Yi,Vur:()=>zl,WJJ:()=>_e,W_O:()=>Do,W_f:()=>cl,Wb_:()=>ia,Wif:()=>Mi,Wx7:()=>me,X36:()=>Qa,XER:()=>Il,XH7:()=>Sa,XNY:()=>as,XTF:()=>ic,Xdf:()=>ve,Xuz:()=>Oi,XyR:()=>Ht,Y$v:()=>Vn,Y3v:()=>zs,Yjy:()=>kr,Ylk:()=>oc,Ywq:()=>Uh,ZSz:()=>no,ZUK:()=>Ma,ZUg:()=>Zo,Zl1:()=>ti,Zwr:()=>To,_28:()=>wd,_Q_:()=>Cl,_Zr:()=>Po,_af:()=>Oo,_iR:()=>Pr,_pX:()=>Xl,a4d:()=>G,aKn:()=>lr,aP6:()=>gs,aTe:()=>Fi,abe:()=>wr,ay9:()=>Lh,b7t:()=>Bl,bWQ:()=>Nh,bZN:()=>Fc,bd4:()=>po,bes:()=>vs,bfK:()=>Dr,byW:()=>yn,c1V:()=>Fo,cA3:()=>qo,cAF:()=>Rc,cFk:()=>Eo,cSi:()=>jo,cZl:()=>gr,cd9:()=>bi,ch2:()=>Ra,cjY:()=>Cc,crS:()=>je,cvh:()=>So,d3j:()=>Hr,dNH:()=>uc,dXK:()=>Fh,dbJ:()=>Eu,ddb:()=>Ha,dsp:()=>vr,f3T:()=>pc,fN3:()=>ca,fhG:()=>co,frU:()=>ut,fub:()=>ks,g9x:()=>at,gFG:()=>Bd,gGD:()=>hl,gUJ:()=>wn,h70:()=>xo,hV:()=>Ba,hXS:()=>zr,hu9:()=>fp,hze:()=>$l,i9b:()=>Cd,iFX:()=>xd,iPC:()=>mi,imY:()=>io,ipG:()=>os,irN:()=>Ot,j$y:()=>Mo,j7z:()=>ar,jCw:()=>Ol,jrL:()=>Mr,kOl:()=>fa,kPW:()=>Su,kgK:()=>kh,klU:()=>es,l60:()=>oi,lDI:()=>Fr,lcm:()=>dr,lpz:()=>Ho,mGg:()=>er,mN_:()=>Oc,mO:()=>Dd,mc2:()=>Jt,mlL:()=>Or,nN_:()=>Os,nS0:()=>hi,nWK:()=>Us,nXs:()=>Tl,ngE:()=>ze,njt:()=>mp,npt:()=>hr,nvt:()=>ko,nwz:()=>_o,o8O:()=>Ao,oBD:()=>Ta,oF4:()=>rr,p1q:()=>Fd,p30:()=>le,pHC:()=>ms,pfp:()=>As,poY:()=>Ja,qGX:()=>Gt,r0m:()=>cr,rBh:()=>Ll,rsL:()=>Pi,sLO:()=>bs,slN:()=>Ue,sr7:()=>Ou,sxk:()=>Zr,t8j:()=>Go,tGA:()=>Ne,tNm:()=>_r,taz:()=>lo,ti:()=>Ai,tto:()=>qt,u4L:()=>jn,uZf:()=>Dn,ueJ:()=>Bh,usz:()=>Ji,uwh:()=>bu,uzh:()=>_u,v8K:()=>Bn,vSt:()=>Gs,vhy:()=>L,vl2:()=>ai,vof:()=>vo,w54:()=>On,wAY:()=>xu,wJ:()=>Nd,wYf:()=>Fl,wgx:()=>Ir,wpU:()=>sn,wy2:()=>pr,x0j:()=>Qc,x85:()=>Vs,xhJ:()=>ra,xq_:()=>Ws,y3W:()=>Lo,y6V:()=>Te,yIV:()=>vu,yRs:()=>yi,y__:()=>aa,yew:()=>ls,ynC:()=>nc,ynP:()=>_s,z4S:()=>Nl,zBy:()=>mr,zI8:()=>la,zPu:()=>Wo,z_u:()=>fr,zmF:()=>rc,zpg:()=>ni,zri:()=>Wr});var r=f(32610),s="aws.lambda.invoked_arn",v="db.system",_="db.connection_string",g="db.user",E="db.jdbc.driver_classname",T="db.name",x="db.statement",M="db.operation",y="db.mssql.instance_name",b="db.cassandra.keyspace",c="db.cassandra.page_size",i="db.cassandra.consistency_level",h="db.cassandra.table",A="db.cassandra.idempotence",P="db.cassandra.speculative_execution_count",V="db.cassandra.coordinator.id",B="db.cassandra.coordinator.dc",j="db.hbase.namespace",re="db.redis.database_index",z="db.mongodb.collection",H="db.sql.table",U="exception.type",O="exception.message",F="exception.stacktrace",k="exception.escaped",$="faas.trigger",ne="faas.execution",te="faas.document.collection",Z="faas.document.operation",se="faas.document.time",fe="faas.document.name",Se="faas.time",pe="faas.cron",we="faas.coldstart",q="faas.invoked_name",J="faas.invoked_provider",W="faas.invoked_region",ee="net.transport",X="net.peer.ip",ae="net.peer.port",de="net.peer.name",Pe="net.host.ip",ye="net.host.port",Le="net.host.name",Xe="net.host.connection.type",ie="net.host.connection.subtype",K="net.host.carrier.name",ce="net.host.carrier.mcc",ge="net.host.carrier.mnc",Oe="net.host.carrier.icc",Ie="peer.service",ht="enduser.id",Fe="enduser.role",et="enduser.scope",Rt="thread.id",_t="thread.name",Ae="code.function",lt="code.namespace",Ze="code.filepath",yt="code.lineno",un="http.method",kn="http.url",Wt="http.target",rn="http.host",zt="http.scheme",dn="http.status_code",vn="http.flavor",xe="http.user_agent",Tt="http.request_content_length",Et="http.request_content_length_uncompressed",Ye="http.response_content_length",Nt="http.response_content_length_uncompressed",Yt="http.server_name",Ut="http.route",Pn="http.client_ip",Vt="aws.dynamodb.table_names",bt="aws.dynamodb.consumed_capacity",De="aws.dynamodb.item_collection_metrics",tt="aws.dynamodb.provisioned_read_capacity",Ve="aws.dynamodb.provisioned_write_capacity",Je="aws.dynamodb.consistent_read",Ct="aws.dynamodb.projection",cn="aws.dynamodb.limit",Hn="aws.dynamodb.attributes_to_get",ln="aws.dynamodb.index_name",an="aws.dynamodb.select",Qt="aws.dynamodb.global_secondary_indexes",ke="aws.dynamodb.local_secondary_indexes",mt="aws.dynamodb.exclusive_start_table",ot="aws.dynamodb.table_count",bn="aws.dynamodb.scan_forward",Rn="aws.dynamodb.segment",Dt="aws.dynamodb.total_segments",Xt="aws.dynamodb.count",Ln="aws.dynamodb.scanned_count",Jn="aws.dynamodb.attribute_definitions",Ci="aws.dynamodb.global_secondary_index_updates",ki="messaging.system",Bi="messaging.destination",st="messaging.destination_kind",En="messaging.temp_destination",In="messaging.protocol",it="messaging.protocol_version",Lt="messaging.url",$t="messaging.message_id",gn="messaging.conversation_id",Tn="messaging.message_payload_size_bytes",ft="messaging.message_payload_compressed_size_bytes",Pt="messaging.operation",on="messaging.consumer_id",Zt="messaging.rabbitmq.routing_key",Sn="messaging.kafka.message_key",$n="messaging.kafka.consumer_group",Zn="messaging.kafka.client_id",ii="messaging.kafka.partition",gi="messaging.kafka.tombstone",jt="rpc.system",ct="rpc.service",Re="rpc.method",Qe="rpc.grpc.status_code",gt="rpc.jsonrpc.version",Kt="rpc.jsonrpc.request_id",hn="rpc.jsonrpc.error_code",Fn="rpc.jsonrpc.error_message",Yn="message.type",qn="message.id",Si="message.compressed_size",di="message.uncompressed_size",ji=s,xi=v,bi=_,St=g,Gt=E,mn=T,Wn=x,oi=M,wi=y,$i=b,Ri=c,Er=i,Wr=h,Pr=A,ps=P,Ws=V,Uo=B,po=j,pr=re,Ko=z,ms=H,xs=U,gs=O,os=F,Vo=k,vs=$,vr=ne,Ar=te,wr=Z,lr=se,Fi=fe,Eo=Se,Ds=pe,ss=we,Ro=q,as=J,io=W,Jo=ee,to=X,Zo=ae,ko=de,Mo=Pe,$o=ye,xo=Le,Gr=Xe,Yo=ie,_s=K,qo=ce,zr=ge,Ir=Oe,Mt=Ie,Xo=ht,jo=Fe,Kr=et,Ho=Rt,lo=_t,Mr=Ae,es=lt,So=Ze,Ji=yt,vo=un,Gs=kn,ks=Wt,ts=rn,Wo=zt,Do=dn,Ao=vn,Ns=xe,Ls=Tt,rt=Et,je=Ye,Ht=Nt,nt=Yt,qt=Ut,hi=Pn,Gi=Vt,yn=bt,me=De,G=tt,le=Ve,Ne=Je,ut=Ct,Bt=cn,sn=Hn,wn=ln,jn=an,ei=Qt,Ai=ke,Mi=mt,er=ot,cr=bn,zi=Rn,Di=Dt,Rr=Xt,Zr=Ln,co=Jn,Hi=Ci,mr=ki,kr=Bi,Fr=st,Vr=En,Oo=In,ns=it,Go=Lt,Sa=$t,Os=gn,Po=Tn,Un=ft,ni=Pt,On=on,ti=Zt,yi=Sn,Pi=$n,gr=Zn,_r=ii,No=gi,bs=jt,tr=ct,zs=Re,va=Qe,no=gt,ls=Kt,To=hn,fr=Fn,uo=Yn,Ks=qn,$s=Si,ka=di,Xa=(0,r.O)([s,v,_,g,E,T,x,M,y,b,c,i,h,A,P,V,B,j,re,z,H,U,O,F,k,$,ne,te,Z,se,fe,Se,pe,we,q,J,W,ee,X,ae,de,Pe,ye,Le,Xe,ie,K,ce,ge,Oe,Ie,ht,Fe,et,Rt,_t,Ae,lt,Ze,yt,un,kn,Wt,rn,zt,dn,vn,xe,Tt,Et,Ye,Nt,Yt,Ut,Pn,Vt,bt,De,tt,Ve,Je,Ct,cn,Hn,ln,an,Qt,ke,mt,ot,bn,Rn,Dt,Xt,Ln,Jn,Ci,ki,Bi,st,En,In,it,Lt,$t,gn,Tn,ft,Pt,on,Zt,Sn,$n,Zn,ii,gi,jt,ct,Re,Qe,gt,Kt,hn,Fn,Yn,qn,Si,di]),Aa="other_sql",ta="postgresql",ys="redshift",na="cloudscape",qe="progress",pn="firstsql",Zi="firebird",Ki="filemaker",Nr="informix",jr="instantdb",yr="interbase",nr="mariadb",vi="netezza",Ui="pervasive",Xr="pointbase",mo="teradata",Ss="vertica",go="coldfusion",is="cassandra",ha="mongodb",Na="couchbase",ho="couchdb",La="cosmosdb",Fa="dynamodb",gl="elasticsearch",It="memcached",Ys="cockroachdb",ia=Aa,Yi="mssql",Dr="mysql",vl="oracle",ra="db2",Ol=ta,oa=ys,_o="hive",Pl=na,As="hsqldb",us=qe,Il="maxdb",Ts="hanadb",Rl="ingres",_a=pn,nc="edb",Yc="cache",Us="adabas",ba=Zi,ic="derby",ve=Ki,Me=Nr,We=jr,Te=yr,ze=nr,Ot=vi,Jt=Ui,Vn=Xr,ai="sqlite",zn="sybase",Oi=mo,dr=Ss,fo="h2",qr=go,so=is,sa="hbase",Qa=ha,cl="redis",Ta=Na,Ba=ho,rc=La,Ja=Fa,Sc="neo4j",Ca="geode",oc=gl,dl=It,aa=Ys,Ac=(0,r.O)([Aa,"mssql","mysql","oracle","db2",ta,ys,"hive",na,"hsqldb",qe,"maxdb","hanadb","ingres",pn,"edb","cache","adabas",Zi,"derby",Ki,Nr,jr,yr,nr,vi,Ui,Xr,"sqlite","sybase",mo,Ss,"h2",go,is,"hbase",ha,"redis",Na,ho,La,Fa,"neo4j","geode",gl,It,Ys]),kl="each_quorum",hs="local_quorum",Xc="local_one",a="serial",u="local_serial",S="all",D=kl,L="quorum",Y=hs,oe="one",_e="two",Ce="three",Ue=Xc,$e="any",Be=a,at=u,At=(0,r.O)(["all",kl,"quorum",hs,"one","two","three",Xc,"any",a,u]),dt="datasource",Dn=dt,Bn="http",Mn="pubsub",ci="timer",li="other",mi=(0,r.O)([dt,"http","pubsub","timer","other"]),rr="insert",Li="edit",Or="delete",eo=(0,r.O)(["insert","edit","delete"]),ao="alibaba_cloud",Lo=ao,$r="aws",Hr="azure",fa="gcp",la=(0,r.O)([ao,"aws","azure","gcp"]),Vs="ip_tcp",Ma="ip_udp",ca="ip",xa="unix",Cc="pipe",Xs="inproc",wc="other",Nl=(0,r.O)(["ip_tcp","ip_udp","ip","unix","pipe","inproc","other"]),fs="unavailable",Da="unknown",qa="wifi",Fo="wired",ar="cell",Gl=fs,zl=Da,Mc=(0,r.O)(["wifi","wired","cell",fs,Da]),Va="cdma2000_1xrtt",js="td_scdma",tl="gprs",lc="edge",vu="umts",Cd="cdma",_u="evdo_0",cc="evdo_a",Oc=Va,fp="hsdpa",kh="hsupa",Qc="hspa",Ll="iden",bu="evdo_b",Fl="lte",Pc="ehrpd",$l="hspap",pp="gsm",wd=js,Ic="iwlan",yu="nr",Ha="nrnsa",Nh="lte_ca",Rc=(0,r.O)(["gprs","edge","umts","cdma","evdo_0","evdo_a",Va,"hsdpa","hsupa","hspa","iden","evdo_b","lte","ehrpd","hspap","gsm",js,"iwlan","nr","nrnsa","lte_ca"]),Eu="1.0",Su="1.1",hl="2.0",qc="SPDY",xd="QUIC",uc={HTTP_1_0:"1.0",HTTP_1_1:"1.1",HTTP_2_0:"2.0",SPDY:"SPDY",QUIC:"QUIC"},hr="queue",kc="topic",Bl=(0,r.O)(["queue","topic"]),Ia="receive",ws="process",Dd=Ia,Od=ws,Hs=(0,r.O)([Ia,ws]),Nd=0,Mu=1,Ra=2,mp=3,xu=4,Lh=5,rd=6,Tl=7,od=8,Xl=9,Lc=10,Ld=11,Fd=12,Fh=13,Bd=14,Bh=15,Cl=16,pc={OK:0,CANCELLED:1,UNKNOWN:2,INVALID_ARGUMENT:3,DEADLINE_EXCEEDED:4,NOT_FOUND:5,ALREADY_EXISTS:6,PERMISSION_DENIED:7,RESOURCE_EXHAUSTED:8,FAILED_PRECONDITION:9,ABORTED:10,OUT_OF_RANGE:11,UNIMPLEMENTED:12,INTERNAL:13,UNAVAILABLE:14,DATA_LOSS:15,UNAUTHENTICATED:16},Ul="RECEIVED",Fc="SENT",Ou=Ul,Uh=(0,r.O)(["SENT",Ul])},69753:vt=>{"use strict";vt.exports=function I(f,r){for(var s=new Array(arguments.length-1),v=0,_=2,g=!0;_{"use strict";var f=I;f.length=function(E){var T=E.length;if(!T)return 0;for(var x=0;--T%4>1&&"="===E.charAt(T);)++x;return Math.ceil(3*E.length)/4-x};for(var r=new Array(64),s=new Array(123),v=0;v<64;)s[r[v]=v<26?v+65:v<52?v+71:v<62?v-4:v-59|43]=v++;f.encode=function(E,T,x){for(var i,M=null,y=[],b=0,c=0;T>2],i=(3&h)<<4,c=1;break;case 1:y[b++]=r[i|h>>4],i=(15&h)<<2,c=2;break;case 2:y[b++]=r[i|h>>6],y[b++]=r[63&h],c=0}b>8191&&((M||(M=[])).push(String.fromCharCode.apply(String,y)),b=0)}return c&&(y[b++]=r[i],y[b++]=61,1===c&&(y[b++]=61)),M?(b&&M.push(String.fromCharCode.apply(String,y.slice(0,b))),M.join("")):String.fromCharCode.apply(String,y.slice(0,b))};var _="invalid encoding";f.decode=function(E,T,x){for(var b,M=x,y=0,c=0;c1)break;if(void 0===(i=s[i]))throw Error(_);switch(y){case 0:b=i,y=1;break;case 1:T[x++]=b<<2|(48&i)>>4,b=i,y=2;break;case 2:T[x++]=(15&b)<<4|(60&i)>>2,b=i,y=3;break;case 3:T[x++]=(3&b)<<6|i,y=0}}if(1===y)throw Error(_);return x-M},f.test=function(E){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(E)}},84978:vt=>{"use strict";function I(){this._listeners={}}vt.exports=I,I.prototype.on=function(r,s,v){return(this._listeners[r]||(this._listeners[r]=[])).push({fn:s,ctx:v||this}),this},I.prototype.off=function(r,s){if(void 0===r)this._listeners={};else if(void 0===s)this._listeners[r]=[];else for(var v=this._listeners[r],_=0;_{"use strict";function I(_){return typeof Float32Array<"u"?function(){var g=new Float32Array([-0]),E=new Uint8Array(g.buffer),T=128===E[3];function x(c,i,h){g[0]=c,i[h]=E[0],i[h+1]=E[1],i[h+2]=E[2],i[h+3]=E[3]}function M(c,i,h){g[0]=c,i[h]=E[3],i[h+1]=E[2],i[h+2]=E[1],i[h+3]=E[0]}function y(c,i){return E[0]=c[i],E[1]=c[i+1],E[2]=c[i+2],E[3]=c[i+3],g[0]}function b(c,i){return E[3]=c[i],E[2]=c[i+1],E[1]=c[i+2],E[0]=c[i+3],g[0]}_.writeFloatLE=T?x:M,_.writeFloatBE=T?M:x,_.readFloatLE=T?y:b,_.readFloatBE=T?b:y}():function(){function g(T,x,M,y){var b=x<0?1:0;if(b&&(x=-x),0===x)T(1/x>0?0:2147483648,M,y);else if(isNaN(x))T(2143289344,M,y);else if(x>34028234663852886e22)T((b<<31|2139095040)>>>0,M,y);else if(x<11754943508222875e-54)T((b<<31|Math.round(x/1401298464324817e-60))>>>0,M,y);else{var c=Math.floor(Math.log(x)/Math.LN2);T((b<<31|c+127<<23|8388607&Math.round(x*Math.pow(2,-c)*8388608))>>>0,M,y)}}function E(T,x,M){var y=T(x,M),b=2*(y>>31)+1,c=y>>>23&255,i=8388607&y;return 255===c?i?NaN:b*(1/0):0===c?1401298464324817e-60*b*i:b*Math.pow(2,c-150)*(i+8388608)}_.writeFloatLE=g.bind(null,f),_.writeFloatBE=g.bind(null,r),_.readFloatLE=E.bind(null,s),_.readFloatBE=E.bind(null,v)}(),typeof Float64Array<"u"?function(){var g=new Float64Array([-0]),E=new Uint8Array(g.buffer),T=128===E[7];function x(c,i,h){g[0]=c,i[h]=E[0],i[h+1]=E[1],i[h+2]=E[2],i[h+3]=E[3],i[h+4]=E[4],i[h+5]=E[5],i[h+6]=E[6],i[h+7]=E[7]}function M(c,i,h){g[0]=c,i[h]=E[7],i[h+1]=E[6],i[h+2]=E[5],i[h+3]=E[4],i[h+4]=E[3],i[h+5]=E[2],i[h+6]=E[1],i[h+7]=E[0]}function y(c,i){return E[0]=c[i],E[1]=c[i+1],E[2]=c[i+2],E[3]=c[i+3],E[4]=c[i+4],E[5]=c[i+5],E[6]=c[i+6],E[7]=c[i+7],g[0]}function b(c,i){return E[7]=c[i],E[6]=c[i+1],E[5]=c[i+2],E[4]=c[i+3],E[3]=c[i+4],E[2]=c[i+5],E[1]=c[i+6],E[0]=c[i+7],g[0]}_.writeDoubleLE=T?x:M,_.writeDoubleBE=T?M:x,_.readDoubleLE=T?y:b,_.readDoubleBE=T?b:y}():function(){function g(T,x,M,y,b,c){var i=y<0?1:0;if(i&&(y=-y),0===y)T(0,b,c+x),T(1/y>0?0:2147483648,b,c+M);else if(isNaN(y))T(0,b,c+x),T(2146959360,b,c+M);else if(y>17976931348623157e292)T(0,b,c+x),T((i<<31|2146435072)>>>0,b,c+M);else{var h;if(y<22250738585072014e-324)T((h=y/5e-324)>>>0,b,c+x),T((i<<31|h/4294967296)>>>0,b,c+M);else{var A=Math.floor(Math.log(y)/Math.LN2);1024===A&&(A=1023),T(4503599627370496*(h=y*Math.pow(2,-A))>>>0,b,c+x),T((i<<31|A+1023<<20|1048576*h&1048575)>>>0,b,c+M)}}}function E(T,x,M,y,b){var c=T(y,b+x),i=T(y,b+M),h=2*(i>>31)+1,A=i>>>20&2047,P=4294967296*(1048575&i)+c;return 2047===A?P?NaN:h*(1/0):0===A?5e-324*h*P:h*Math.pow(2,A-1075)*(P+4503599627370496)}_.writeDoubleLE=g.bind(null,f,0,4),_.writeDoubleBE=g.bind(null,r,4,0),_.readDoubleLE=E.bind(null,s,0,4),_.readDoubleBE=E.bind(null,v,4,0)}(),_}function f(_,g,E){g[E]=255&_,g[E+1]=_>>>8&255,g[E+2]=_>>>16&255,g[E+3]=_>>>24}function r(_,g,E){g[E]=_>>>24,g[E+1]=_>>>16&255,g[E+2]=_>>>8&255,g[E+3]=255&_}function s(_,g){return(_[g]|_[g+1]<<8|_[g+2]<<16|_[g+3]<<24)>>>0}function v(_,g){return(_[g]<<24|_[g+1]<<16|_[g+2]<<8|_[g+3])>>>0}vt.exports=I(I)},46469:module=>{"use strict";function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(vt){}return null}module.exports=inquire},74722:vt=>{"use strict";vt.exports=function I(f,r,s){var v=s||8192,_=v>>>1,g=null,E=v;return function(x){if(x<1||x>_)return f(x);E+x>v&&(g=f(v),E=0);var M=r.call(g,E,E+=x);return 7&E&&(E=1+(7|E)),M}}},61755:(vt,I)=>{"use strict";var f=I;f.length=function(s){for(var v=0,_=0,g=0;g191&&M<224?T[x++]=(31&M)<<6|63&s[v++]:M>239&&M<365?(M=((7&M)<<18|(63&s[v++])<<12|(63&s[v++])<<6|63&s[v++])-65536,T[x++]=55296+(M>>10),T[x++]=56320+(1023&M)):T[x++]=(15&M)<<12|(63&s[v++])<<6|63&s[v++],x>8191&&((E||(E=[])).push(String.fromCharCode.apply(String,T)),x=0);return E?(x&&E.push(String.fromCharCode.apply(String,T.slice(0,x))),E.join("")):String.fromCharCode.apply(String,T.slice(0,x))},f.write=function(s,v,_){for(var E,T,g=_,x=0;x>6|192,v[_++]=63&E|128):55296==(64512&E)&&56320==(64512&(T=s.charCodeAt(x+1)))?(++x,v[_++]=(E=65536+((1023&E)<<10)+(1023&T))>>18|240,v[_++]=E>>12&63|128,v[_++]=E>>6&63|128,v[_++]=63&E|128):(v[_++]=E>>12|224,v[_++]=E>>6&63|128,v[_++]=63&E|128);return _-g}},94329:vt=>{var _=.1,g="function"==typeof Float32Array;function E(h,A){return 1-3*A+3*h}function T(h,A){return 3*A-6*h}function x(h){return 3*h}function M(h,A,P){return((E(A,P)*h+T(A,P))*h+x(A))*h}function y(h,A,P){return 3*E(A,P)*h*h+2*T(A,P)*h+x(A)}function i(h){return h}vt.exports=function(A,P,V,B){if(!(0<=A&&A<=1&&0<=V&&V<=1))throw new Error("bezier x values must be in [0, 1] range");if(A===P&&V===B)return i;for(var j=g?new Float32Array(11):new Array(11),re=0;re<11;++re)j[re]=M(re*_,A,V);return function(U){return 0===U?0:1===U?1:M(function z(H){for(var U=0,O=1;10!==O&&j[O]<=H;++O)U+=_;--O;var $=U+(H-j[O])/(j[O+1]-j[O])*_,ne=y($,A,V);return ne>=.001?function c(h,A,P,V){for(var B=0;B<4;++B){var j=y(A,P,V);if(0===j)return A;A-=(M(A,P,V)-h)/j}return A}(H,$,A,V):0===ne?$:function b(h,A,P,V,B){var j,re,z=0;do{(j=M(re=A+(P-A)/2,V,B)-h)>0?P=re:A=re}while(Math.abs(j)>1e-7&&++z<10);return re}(H,U,U+_,A,V)}(U),P,B)}}},39184:(vt,I,f)=>{"use strict";f.d(I,{A:()=>i});var r=function(A){return function s(h){return!!h&&"object"==typeof h}(A)&&!function v(h){var A=Object.prototype.toString.call(h);return"[object RegExp]"===A||"[object Date]"===A||function E(h){return h.$$typeof===g}(h)}(A)},g="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function x(h,A){return!1!==A.clone&&A.isMergeableObject(h)?b(function T(h){return Array.isArray(h)?[]:{}}(h),h,A):h}function M(h,A,P){return h.concat(A).map(function(V){return x(V,P)})}function b(h,A,P){(P=P||{}).arrayMerge=P.arrayMerge||M,P.isMergeableObject=P.isMergeableObject||r;var V=Array.isArray(A);return V===Array.isArray(h)?V?P.arrayMerge(h,A,P):function y(h,A,P){var V={};return P.isMergeableObject(h)&&Object.keys(h).forEach(function(B){V[B]=x(h[B],P)}),Object.keys(A).forEach(function(B){V[B]=P.isMergeableObject(A[B])&&h[B]?b(h[B],A[B],P):x(A[B],P)}),V}(h,A,P):x(A,P)}b.all=function(A,P){if(!Array.isArray(A))throw new Error("first argument should be an array");return A.reduce(function(V,B){return b(V,B,P)},{})};const i=b},19884:vt=>{"use strict";var I={single_source_shortest_paths:function(f,r,s){var v={},_={};_[r]=0;var E,T,x,M,y,c,g=I.PriorityQueue.make();for(g.push(r,0);!g.empty();)for(x in M=(E=g.pop()).cost,y=f[T=E.value]||{})y.hasOwnProperty(x)&&(c=M+y[x],(typeof _[x]>"u"||_[x]>c)&&(_[x]=c,g.push(x,c),v[x]=T));if(typeof s<"u"&&typeof _[s]>"u"){var A=["Could not find a path from ",r," to ",s,"."].join("");throw new Error(A)}return v},extract_shortest_path_from_predecessor_list:function(f,r){for(var s=[],v=r;v;)s.push(v),v=f[v];return s.reverse(),s},find_path:function(f,r,s){var v=I.single_source_shortest_paths(f,r,s);return I.extract_shortest_path_from_predecessor_list(v,s)},PriorityQueue:{make:function(f){var v,r=I.PriorityQueue,s={};for(v in f=f||{},r)r.hasOwnProperty(v)&&(s[v]=r[v]);return s.queue=[],s.sorter=f.sorter||r.default_sorter,s},default_sorter:function(f,r){return f.cost-r.cost},push:function(f,r){this.queue.push({value:f,cost:r}),this.queue.sort(this.sorter)},pop:function(){return this.queue.shift()},empty:function(){return 0===this.queue.length}}};vt.exports=I},30741:vt=>{"use strict";vt.exports=function(f){for(var r=[],s=f.length,v=0;v=55296&&_<=56319&&s>v+1){var g=f.charCodeAt(v+1);g>=56320&&g<=57343&&(_=1024*(_-55296)+g-56320+65536,v+=1)}_<128?r.push(_):_<2048?(r.push(_>>6|192),r.push(63&_|128)):_<55296||_>=57344&&_<65536?(r.push(_>>12|224),r.push(_>>6&63|128),r.push(63&_|128)):_>=65536&&_<=1114111?(r.push(_>>18|240),r.push(_>>12&63|128),r.push(_>>6&63|128),r.push(63&_|128)):r.push(239,191,189)}return new Uint8Array(r).buffer}},91724:(vt,I,f)=>{var r;!function(s,v,_,g){"use strict";var P,E=["","webkit","Moz","MS","ms","o"],T=v.createElement("div"),x="function",M=Math.round,y=Math.abs,b=Date.now;function c(St,Gt,mn){return setTimeout(re(St,mn),Gt)}function i(St,Gt,mn){return!!Array.isArray(St)&&(h(St,mn[Gt],mn),!0)}function h(St,Gt,mn){var Wn;if(St)if(St.forEach)St.forEach(Gt,mn);else if(St.length!==g)for(Wn=0;Wn\s*\(/gm,"{anonymous}()@"):"Unknown Stack Trace",$i=s.console&&(s.console.warn||s.console.log);return $i&&$i.call(s.console,Wn,wi),St.apply(this,arguments)}}P="function"!=typeof Object.assign?function(Gt){if(Gt===g||null===Gt)throw new TypeError("Cannot convert undefined or null to object");for(var mn=Object(Gt),Wn=1;Wn-1}function $(St){return St.trim().split(/\s+/g)}function ne(St,Gt,mn){if(St.indexOf&&!mn)return St.indexOf(Gt);for(var Wn=0;WnWr[Gt]}):Wn.sort()),Wn}function se(St,Gt){for(var mn,Wn,oi=Gt[0].toUpperCase()+Gt.slice(1),wi=0;wi1&&!mn.firstMultiple?mn.firstMultiple=Wt(Gt):1===oi&&(mn.firstMultiple=!1);var wi=mn.firstInput,$i=mn.firstMultiple,Ri=$i?$i.center:wi.center,Er=Gt.center=rn(Wn);Gt.timeStamp=b(),Gt.deltaTime=Gt.timeStamp-wi.timeStamp,Gt.angle=xe(Ri,Er),Gt.distance=vn(Ri,Er),function un(St,Gt){var mn=Gt.center,Wn=St.offsetDelta||{},oi=St.prevDelta||{},wi=St.prevInput||{};(Gt.eventType===ye||wi.eventType===Xe)&&(oi=St.prevDelta={x:wi.deltaX||0,y:wi.deltaY||0},Wn=St.offsetDelta={x:mn.x,y:mn.y}),Gt.deltaX=oi.x+(mn.x-Wn.x),Gt.deltaY=oi.y+(mn.y-Wn.y)}(mn,Gt),Gt.offsetDirection=dn(Gt.deltaX,Gt.deltaY);var Wr=zt(Gt.deltaTime,Gt.deltaX,Gt.deltaY);Gt.overallVelocityX=Wr.x,Gt.overallVelocityY=Wr.y,Gt.overallVelocity=y(Wr.x)>y(Wr.y)?Wr.x:Wr.y,Gt.scale=$i?function Et(St,Gt){return vn(Gt[0],Gt[1],_t)/vn(St[0],St[1],_t)}($i.pointers,Wn):1,Gt.rotation=$i?function Tt(St,Gt){return xe(Gt[1],Gt[0],_t)+xe(St[1],St[0],_t)}($i.pointers,Wn):0,Gt.maxPointers=mn.prevInput?Gt.pointers.length>mn.prevInput.maxPointers?Gt.pointers.length:mn.prevInput.maxPointers:Gt.pointers.length,function kn(St,Gt){var oi,wi,$i,Ri,mn=St.lastInterval||Gt,Wn=Gt.timeStamp-mn.timeStamp;if(Gt.eventType!=ie&&(Wn>Pe||mn.velocity===g)){var Er=Gt.deltaX-mn.deltaX,Wr=Gt.deltaY-mn.deltaY,Pr=zt(Wn,Er,Wr);wi=Pr.x,$i=Pr.y,oi=y(Pr.x)>y(Pr.y)?Pr.x:Pr.y,Ri=dn(Er,Wr),St.lastInterval=Gt}else oi=mn.velocity,wi=mn.velocityX,$i=mn.velocityY,Ri=mn.direction;Gt.velocity=oi,Gt.velocityX=wi,Gt.velocityY=$i,Gt.direction=Ri}(mn,Gt);var Pr=St.element;F(Gt.srcEvent.target,Pr)&&(Pr=Gt.srcEvent.target),Gt.target=Pr}(St,mn),St.emit("hammer.input",mn),St.recognize(mn),St.session.prevInput=mn}function Wt(St){for(var Gt=[],mn=0;mn=y(Gt)?St<0?ce:ge:Gt<0?Oe:Ie}function vn(St,Gt,mn){mn||(mn=Rt);var Wn=Gt[mn[0]]-St[mn[0]],oi=Gt[mn[1]]-St[mn[1]];return Math.sqrt(Wn*Wn+oi*oi)}function xe(St,Gt,mn){return mn||(mn=Rt),180*Math.atan2(Gt[mn[1]]-St[mn[1]],Gt[mn[0]]-St[mn[0]])/Math.PI}Ae.prototype={handler:function(){},init:function(){this.evEl&&U(this.element,this.evEl,this.domHandler),this.evTarget&&U(this.target,this.evTarget,this.domHandler),this.evWin&&U(pe(this.element),this.evWin,this.domHandler)},destroy:function(){this.evEl&&O(this.element,this.evEl,this.domHandler),this.evTarget&&O(this.target,this.evTarget,this.domHandler),this.evWin&&O(pe(this.element),this.evWin,this.domHandler)}};var Ye={mousedown:ye,mousemove:2,mouseup:Xe},Nt="mousedown",Yt="mousemove mouseup";function Ut(){this.evEl=Nt,this.evWin=Yt,this.pressed=!1,Ae.apply(this,arguments)}j(Ut,Ae,{handler:function(Gt){var mn=Ye[Gt.type];mn&ye&&0===Gt.button&&(this.pressed=!0),2&mn&&1!==Gt.which&&(mn=Xe),this.pressed&&(mn&Xe&&(this.pressed=!1),this.callback(this.manager,mn,{pointers:[Gt],changedPointers:[Gt],pointerType:ae,srcEvent:Gt}))}});var Pn={pointerdown:ye,pointermove:2,pointerup:Xe,pointercancel:ie,pointerout:ie},Vt={2:ee,3:"pen",4:ae,5:"kinect"},bt="pointerdown",De="pointermove pointerup pointercancel";function tt(){this.evEl=bt,this.evWin=De,Ae.apply(this,arguments),this.store=this.manager.session.pointerEvents=[]}s.MSPointerEvent&&!s.PointerEvent&&(bt="MSPointerDown",De="MSPointerMove MSPointerUp MSPointerCancel"),j(tt,Ae,{handler:function(Gt){var mn=this.store,Wn=!1,oi=Gt.type.toLowerCase().replace("ms",""),wi=Pn[oi],$i=Vt[Gt.pointerType]||Gt.pointerType,Ri=$i==ee,Er=ne(mn,Gt.pointerId,"pointerId");wi&ye&&(0===Gt.button||Ri)?Er<0&&(mn.push(Gt),Er=mn.length-1):wi&(Xe|ie)&&(Wn=!0),!(Er<0)&&(mn[Er]=Gt,this.callback(this.manager,wi,{pointers:mn,changedPointers:[Gt],pointerType:$i,srcEvent:Gt}),Wn&&mn.splice(Er,1))}});var Ve={touchstart:ye,touchmove:2,touchend:Xe,touchcancel:ie};function cn(){this.evTarget="touchstart",this.evWin="touchstart touchmove touchend touchcancel",this.started=!1,Ae.apply(this,arguments)}function Hn(St,Gt){var mn=te(St.touches),Wn=te(St.changedTouches);return Gt&(Xe|ie)&&(mn=Z(mn.concat(Wn),"identifier",!0)),[mn,Wn]}j(cn,Ae,{handler:function(Gt){var mn=Ve[Gt.type];if(mn===ye&&(this.started=!0),this.started){var Wn=Hn.call(this,Gt,mn);mn&(Xe|ie)&&Wn[0].length-Wn[1].length==0&&(this.started=!1),this.callback(this.manager,mn,{pointers:Wn[0],changedPointers:Wn[1],pointerType:ee,srcEvent:Gt})}}});var ln={touchstart:ye,touchmove:2,touchend:Xe,touchcancel:ie},an="touchstart touchmove touchend touchcancel";function Qt(){this.evTarget=an,this.targetIds={},Ae.apply(this,arguments)}function ke(St,Gt){var mn=te(St.touches),Wn=this.targetIds;if(Gt&(2|ye)&&1===mn.length)return Wn[mn[0].identifier]=!0,[mn,mn];var oi,wi,$i=te(St.changedTouches),Ri=[],Er=this.target;if(wi=mn.filter(function(Wr){return F(Wr.target,Er)}),Gt===ye)for(oi=0;oi-1&&Wn.splice(wi,1)},mt)}}function Xt(St){for(var Gt=St.srcEvent.clientX,mn=St.srcEvent.clientY,Wn=0;Wn-1&&this.requireFail.splice(Gt,1),this},hasRequireFailures:function(){return this.requireFail.length>0},canRecognizeWith:function(St){return!!this.simultaneous[St.id]},emit:function(St){var Gt=this,mn=this.state;function Wn(oi){Gt.manager.emit(oi,St)}mn<8&&Wn(Gt.options.event+ii(mn)),Wn(Gt.options.event),St.additionalEvent&&Wn(St.additionalEvent),mn>=8&&Wn(Gt.options.event+ii(mn))},tryEmit:function(St){if(this.canEmit())return this.emit(St);this.state=32},canEmit:function(){for(var St=0;StGt.threshold&&oi&Gt.direction},attrTest:function(St){return ct.prototype.attrTest.call(this,St)&&(2&this.state||!(2&this.state)&&this.directionTest(St))},emit:function(St){this.pX=St.deltaX,this.pY=St.deltaY;var Gt=gi(St.direction);Gt&&(St.additionalEvent=this.options.event+Gt),this._super.emit.call(this,St)}}),j(Qe,ct,{defaults:{event:"pinch",threshold:0,pointers:2},getTouchAction:function(){return[st]},attrTest:function(St){return this._super.attrTest.call(this,St)&&(Math.abs(St.scale-1)>this.options.threshold||2&this.state)},emit:function(St){1!==St.scale&&(St.additionalEvent=this.options.event+(St.scale<1?"in":"out")),this._super.emit.call(this,St)}}),j(gt,Zn,{defaults:{event:"press",pointers:1,time:251,threshold:9},getTouchAction:function(){return["auto"]},process:function(St){var Gt=this.options,mn=St.pointers.length===Gt.pointers,Wn=St.distanceGt.time;if(this._input=St,!Wn||!mn||St.eventType&(Xe|ie)&&!oi)this.reset();else if(St.eventType&ye)this.reset(),this._timer=c(function(){this.state=8,this.tryEmit()},Gt.time,this);else if(St.eventType&Xe)return 8;return 32},reset:function(){clearTimeout(this._timer)},emit:function(St){8===this.state&&(St&&St.eventType&Xe?this.manager.emit(this.options.event+"up",St):(this._input.timeStamp=b(),this.manager.emit(this.options.event,this._input)))}}),j(Kt,ct,{defaults:{event:"rotate",threshold:0,pointers:2},getTouchAction:function(){return[st]},attrTest:function(St){return this._super.attrTest.call(this,St)&&(Math.abs(St.rotation)>this.options.threshold||2&this.state)}}),j(hn,ct,{defaults:{event:"swipe",threshold:10,velocity:.3,direction:ht|Fe,pointers:1},getTouchAction:function(){return Re.prototype.getTouchAction.call(this)},attrTest:function(St){var mn,Gt=this.options.direction;return Gt&(ht|Fe)?mn=St.overallVelocity:Gt&ht?mn=St.overallVelocityX:Gt&Fe&&(mn=St.overallVelocityY),this._super.attrTest.call(this,St)&&Gt&St.offsetDirection&&St.distance>this.options.threshold&&St.maxPointers==this.options.pointers&&y(mn)>this.options.velocity&&St.eventType&Xe},emit:function(St){var Gt=gi(St.offsetDirection);Gt&&this.manager.emit(this.options.event+Gt,St),this.manager.emit(this.options.event,St)}}),j(Fn,Zn,{defaults:{event:"tap",pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},getTouchAction:function(){return[Bi]},process:function(St){var Gt=this.options,mn=St.pointers.length===Gt.pointers,Wn=St.distance{var r;!function(){"use strict";var s="input is invalid type",v="object"==typeof window,_=v?window:{};_.JS_SHA256_NO_WINDOW&&(v=!1);var g=!v&&"object"==typeof self,E=!_.JS_SHA256_NO_NODE_JS&&"object"==typeof process&&process.versions&&process.versions.node;E?_=global:g&&(_=self);var T=!_.JS_SHA256_NO_COMMON_JS&&vt.exports,x=f.amdO,M=!_.JS_SHA256_NO_ARRAY_BUFFER&&typeof ArrayBuffer<"u",y="0123456789abcdef".split(""),b=[-2147483648,8388608,32768,128],c=[24,16,8,0],i=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],h=["hex","array","digest","arrayBuffer"],A=[];(_.JS_SHA256_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(O){return"[object Array]"===Object.prototype.toString.call(O)}),M&&(_.JS_SHA256_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(O){return"object"==typeof O&&O.buffer&&O.buffer.constructor===ArrayBuffer});var P=function(O,F){return function(k){return new z(F,!0).update(k)[O]()}},V=function(O){var F=P("hex",O);E&&(F=B(F,O)),F.create=function(){return new z(O)},F.update=function(ne){return F.create().update(ne)};for(var k=0;k>>6,te[se++]=128|63&fe):fe<55296||fe>=57344?(te[se++]=224|fe>>>12,te[se++]=128|fe>>>6&63,te[se++]=128|63&fe):(fe=65536+((1023&fe)<<10|1023&O.charCodeAt(++$)),te[se++]=240|fe>>>18,te[se++]=128|fe>>>12&63,te[se++]=128|fe>>>6&63,te[se++]=128|63&fe);O=te}else{if("object"!==ne)throw new Error(s);if(null===O)throw new Error(s);if(M&&O.constructor===ArrayBuffer)O=new Uint8Array(O);else if(!(Array.isArray(O)||M&&ArrayBuffer.isView(O)))throw new Error(s)}O.length>64&&(O=new z(F,!0).update(O).array());var Se=[],pe=[];for($=0;$<64;++$){var we=O[$]||0;Se[$]=92^we,pe[$]=54^we}z.call(this,F,k),this.update(pe),this.oKeyPad=Se,this.inner=!0,this.sharedMemory=k}z.prototype.update=function(O){if(!this.finalized){var F,k=typeof O;if("string"!==k){if("object"!==k)throw new Error(s);if(null===O)throw new Error(s);if(M&&O.constructor===ArrayBuffer)O=new Uint8Array(O);else if(!(Array.isArray(O)||M&&ArrayBuffer.isView(O)))throw new Error(s);F=!0}for(var $,te,ne=0,Z=O.length,se=this.blocks;ne>>2]|=O[ne]<>>2]|=$<>>2]|=(192|$>>>6)<>>2]|=(128|63&$)<=57344?(se[te>>>2]|=(224|$>>>12)<>>2]|=(128|$>>>6&63)<>>2]|=(128|63&$)<>>2]|=(240|$>>>18)<>>2]|=(128|$>>>12&63)<>>2]|=(128|$>>>6&63)<>>2]|=(128|63&$)<=64?(this.block=se[16],this.start=te-64,this.hash(),this.hashed=!0):this.start=te}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296|0,this.bytes=this.bytes%4294967296),this}},z.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var O=this.blocks,F=this.lastByteIndex;O[16]=this.block,O[F>>>2]|=b[3&F],this.block=O[16],F>=56&&(this.hashed||this.hash(),O[0]=this.block,O[16]=O[1]=O[2]=O[3]=O[4]=O[5]=O[6]=O[7]=O[8]=O[9]=O[10]=O[11]=O[12]=O[13]=O[14]=O[15]=0),O[14]=this.hBytes<<3|this.bytes>>>29,O[15]=this.bytes<<3,this.hash()}},z.prototype.hash=function(){var Se,J,X,ae,de,Pe,O=this.h0,F=this.h1,k=this.h2,$=this.h3,ne=this.h4,te=this.h5,Z=this.h6,se=this.h7,fe=this.blocks;for(Se=16;Se<64;++Se)fe[Se]=fe[Se-16]+(((J=fe[Se-15])>>>7|J<<25)^(J>>>18|J<<14)^J>>>3)+fe[Se-7]+(((J=fe[Se-2])>>>17|J<<15)^(J>>>19|J<<13)^J>>>10)|0;for(Pe=F&k,Se=0;Se<64;Se+=4)this.first?(this.is224?(X=300032,se=(J=fe[0]-1413257819)-150054599|0,$=J+24177077|0):(X=704751109,se=(J=fe[0]-210244248)-1521486534|0,$=J+143694565|0),this.first=!1):(se=$+(J=se+((ne>>>6|ne<<26)^(ne>>>11|ne<<21)^(ne>>>25|ne<<7))+(ne&te^~ne&Z)+i[Se]+fe[Se])|0,$=J+(((O>>>2|O<<30)^(O>>>13|O<<19)^(O>>>22|O<<10))+((X=O&F)^O&k^Pe))|0),Z=k+(J=Z+((se>>>6|se<<26)^(se>>>11|se<<21)^(se>>>25|se<<7))+(se&ne^~se&te)+i[Se+1]+fe[Se+1])|0,k=J+((($>>>2|$<<30)^($>>>13|$<<19)^($>>>22|$<<10))+((ae=$&O)^$&F^X))|0,te=F+(J=te+((Z>>>6|Z<<26)^(Z>>>11|Z<<21)^(Z>>>25|Z<<7))+(Z&se^~Z&ne)+i[Se+2]+fe[Se+2])|0,F=J+(((k>>>2|k<<30)^(k>>>13|k<<19)^(k>>>22|k<<10))+((de=k&$)^k&O^ae))|0,ne=O+(J=ne+((te>>>6|te<<26)^(te>>>11|te<<21)^(te>>>25|te<<7))+(te&Z^~te&se)+i[Se+3]+fe[Se+3])|0,O=J+(((F>>>2|F<<30)^(F>>>13|F<<19)^(F>>>22|F<<10))+((Pe=F&k)^F&$^de))|0,this.chromeBugWorkAround=!0;this.h0=this.h0+O|0,this.h1=this.h1+F|0,this.h2=this.h2+k|0,this.h3=this.h3+$|0,this.h4=this.h4+ne|0,this.h5=this.h5+te|0,this.h6=this.h6+Z|0,this.h7=this.h7+se|0},z.prototype.toString=z.prototype.hex=function(){this.finalize();var O=this.h0,F=this.h1,k=this.h2,$=this.h3,ne=this.h4,te=this.h5,Z=this.h6,se=this.h7,fe=y[O>>>28&15]+y[O>>>24&15]+y[O>>>20&15]+y[O>>>16&15]+y[O>>>12&15]+y[O>>>8&15]+y[O>>>4&15]+y[15&O]+y[F>>>28&15]+y[F>>>24&15]+y[F>>>20&15]+y[F>>>16&15]+y[F>>>12&15]+y[F>>>8&15]+y[F>>>4&15]+y[15&F]+y[k>>>28&15]+y[k>>>24&15]+y[k>>>20&15]+y[k>>>16&15]+y[k>>>12&15]+y[k>>>8&15]+y[k>>>4&15]+y[15&k]+y[$>>>28&15]+y[$>>>24&15]+y[$>>>20&15]+y[$>>>16&15]+y[$>>>12&15]+y[$>>>8&15]+y[$>>>4&15]+y[15&$]+y[ne>>>28&15]+y[ne>>>24&15]+y[ne>>>20&15]+y[ne>>>16&15]+y[ne>>>12&15]+y[ne>>>8&15]+y[ne>>>4&15]+y[15&ne]+y[te>>>28&15]+y[te>>>24&15]+y[te>>>20&15]+y[te>>>16&15]+y[te>>>12&15]+y[te>>>8&15]+y[te>>>4&15]+y[15&te]+y[Z>>>28&15]+y[Z>>>24&15]+y[Z>>>20&15]+y[Z>>>16&15]+y[Z>>>12&15]+y[Z>>>8&15]+y[Z>>>4&15]+y[15&Z];return this.is224||(fe+=y[se>>>28&15]+y[se>>>24&15]+y[se>>>20&15]+y[se>>>16&15]+y[se>>>12&15]+y[se>>>8&15]+y[se>>>4&15]+y[15&se]),fe},z.prototype.array=z.prototype.digest=function(){this.finalize();var O=this.h0,F=this.h1,k=this.h2,$=this.h3,ne=this.h4,te=this.h5,Z=this.h6,se=this.h7,fe=[O>>>24&255,O>>>16&255,O>>>8&255,255&O,F>>>24&255,F>>>16&255,F>>>8&255,255&F,k>>>24&255,k>>>16&255,k>>>8&255,255&k,$>>>24&255,$>>>16&255,$>>>8&255,255&$,ne>>>24&255,ne>>>16&255,ne>>>8&255,255&ne,te>>>24&255,te>>>16&255,te>>>8&255,255&te,Z>>>24&255,Z>>>16&255,Z>>>8&255,255&Z];return this.is224||fe.push(se>>>24&255,se>>>16&255,se>>>8&255,255&se),fe},z.prototype.arrayBuffer=function(){this.finalize();var O=new ArrayBuffer(this.is224?28:32),F=new DataView(O);return F.setUint32(0,this.h0),F.setUint32(4,this.h1),F.setUint32(8,this.h2),F.setUint32(12,this.h3),F.setUint32(16,this.h4),F.setUint32(20,this.h5),F.setUint32(24,this.h6),this.is224||F.setUint32(28,this.h7),O},(H.prototype=new z).finalize=function(){if(z.prototype.finalize.call(this),this.inner){this.inner=!1;var O=this.array();z.call(this,this.is224,this.sharedMemory),this.update(this.oKeyPad),this.update(O),z.prototype.finalize.call(this)}};var U=V();U.sha256=U,U.sha224=V(!0),U.sha256.hmac=re(),U.sha224.hmac=re(!0),T?vt.exports=U:(_.sha256=U.sha256,_.sha224=U.sha224,x&&void 0!==(r=function(){return U}.call(U,f,U,vt))&&(vt.exports=r))}()},26875:function(vt,I,f){var r;vt=f.nmd(vt),function(){var s,E="Expected a function",x="__lodash_hash_undefined__",y="__lodash_placeholder__",z=32,U=128,Se=1/0,pe=9007199254740991,q=NaN,J=4294967295,X=[["ary",U],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",z],["partialRight",64],["rearg",256]],ae="[object Arguments]",de="[object Array]",ye="[object Boolean]",Le="[object Date]",ie="[object Error]",K="[object Function]",ce="[object GeneratorFunction]",ge="[object Map]",Oe="[object Number]",ht="[object Object]",Fe="[object Promise]",Rt="[object RegExp]",_t="[object Set]",Ae="[object String]",lt="[object Symbol]",yt="[object WeakMap]",kn="[object ArrayBuffer]",Wt="[object DataView]",rn="[object Float32Array]",zt="[object Float64Array]",dn="[object Int8Array]",vn="[object Int16Array]",xe="[object Int32Array]",Tt="[object Uint8Array]",Et="[object Uint8ClampedArray]",Ye="[object Uint16Array]",Nt="[object Uint32Array]",Yt=/\b__p \+= '';/g,Ut=/\b(__p \+=) '' \+/g,Pn=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Vt=/&(?:amp|lt|gt|quot|#39);/g,bt=/[&<>"']/g,De=RegExp(Vt.source),tt=RegExp(bt.source),Ve=/<%-([\s\S]+?)%>/g,Je=/<%([\s\S]+?)%>/g,Ct=/<%=([\s\S]+?)%>/g,cn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Hn=/^\w*$/,ln=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,an=/[\\^$.*+?()[\]{}|]/g,Qt=RegExp(an.source),ke=/^\s+/,mt=/\s/,ot=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,bn=/\{\n\/\* \[wrapped with (.+)\] \*/,Rn=/,? & /,Dt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Xt=/[()=,{}\[\]\/\s]/,Ln=/\\(\\)?/g,Jn=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Ci=/\w*$/,ki=/^[-+]0x[0-9a-f]+$/i,Bi=/^0b[01]+$/i,st=/^\[object .+?Constructor\]$/,En=/^0o[0-7]+$/i,In=/^(?:0|[1-9]\d*)$/,it=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Lt=/($^)/,$t=/['\n\r\u2028\u2029\\]/g,gn="\\ud800-\\udfff",on="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Zt="\\u2700-\\u27bf",Sn="a-z\\xdf-\\xf6\\xf8-\\xff",jt="A-Z\\xc0-\\xd6\\xd8-\\xde",ct="\\ufe0e\\ufe0f",Re="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",gt="["+gn+"]",Kt="["+Re+"]",hn="["+on+"]",Fn="\\d+",Yn="["+Zt+"]",qn="["+Sn+"]",Si="[^"+gn+Re+Fn+Zt+Sn+jt+"]",di="\\ud83c[\\udffb-\\udfff]",xi="[^"+gn+"]",bi="(?:\\ud83c[\\udde6-\\uddff]){2}",St="[\\ud800-\\udbff][\\udc00-\\udfff]",Gt="["+jt+"]",Wn="(?:"+qn+"|"+Si+")",oi="(?:"+Gt+"|"+Si+")",wi="(?:['\u2019](?:d|ll|m|re|s|t|ve))?",$i="(?:['\u2019](?:D|LL|M|RE|S|T|VE))?",Ri="(?:"+hn+"|"+di+")?",Er="["+ct+"]?",Ws=Er+Ri+"(?:\\u200d(?:"+[xi,bi,St].join("|")+")"+Er+Ri+")*",Uo="(?:"+[Yn,bi,St].join("|")+")"+Ws,po="(?:"+[xi+hn+"?",hn,bi,St,gt].join("|")+")",pr=RegExp("['\u2019]","g"),Ko=RegExp(hn,"g"),ms=RegExp(di+"(?="+di+")|"+po+Ws,"g"),xs=RegExp([Gt+"?"+qn+"+"+wi+"(?="+[Kt,Gt,"$"].join("|")+")",oi+"+"+$i+"(?="+[Kt,Gt+Wn,"$"].join("|")+")",Gt+"?"+Wn+"+"+wi,Gt+"+"+$i,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Fn,Uo].join("|"),"g"),gs=RegExp("[\\u200d"+gn+on+ct+"]"),os=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Vo=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],vs=-1,vr={};vr[rn]=vr[zt]=vr[dn]=vr[vn]=vr[xe]=vr[Tt]=vr[Et]=vr[Ye]=vr[Nt]=!0,vr[ae]=vr[de]=vr[kn]=vr[ye]=vr[Wt]=vr[Le]=vr[ie]=vr[K]=vr[ge]=vr[Oe]=vr[ht]=vr[Rt]=vr[_t]=vr[Ae]=vr[yt]=!1;var Ar={};Ar[ae]=Ar[de]=Ar[kn]=Ar[Wt]=Ar[ye]=Ar[Le]=Ar[rn]=Ar[zt]=Ar[dn]=Ar[vn]=Ar[xe]=Ar[ge]=Ar[Oe]=Ar[ht]=Ar[Rt]=Ar[_t]=Ar[Ae]=Ar[lt]=Ar[Tt]=Ar[Et]=Ar[Ye]=Ar[Nt]=!0,Ar[ie]=Ar[K]=Ar[yt]=!1;var Eo={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Ds=parseFloat,ss=parseInt,Ro="object"==typeof global&&global&&global.Object===Object&&global,as="object"==typeof self&&self&&self.Object===Object&&self,io=Ro||as||Function("return this")(),Jo=I&&!I.nodeType&&I,to=Jo&&vt&&!vt.nodeType&&vt,Zo=to&&to.exports===Jo,ko=Zo&&Ro.process,Mo=function(){try{return to&&to.require&&to.require("util").types||ko&&ko.binding&&ko.binding("util")}catch{}}(),$o=Mo&&Mo.isArrayBuffer,xo=Mo&&Mo.isDate,Gr=Mo&&Mo.isMap,Yo=Mo&&Mo.isRegExp,_s=Mo&&Mo.isSet,qo=Mo&&Mo.isTypedArray;function zr(Un,ni,On){switch(On.length){case 0:return Un.call(ni);case 1:return Un.call(ni,On[0]);case 2:return Un.call(ni,On[0],On[1]);case 3:return Un.call(ni,On[0],On[1],On[2])}return Un.apply(ni,On)}function Ir(Un,ni,On,ti){for(var yi=-1,Pi=null==Un?0:Un.length;++yi-1}function lo(Un,ni,On){for(var ti=-1,yi=null==Un?0:Un.length;++ti-1;);return On}function Bt(Un,ni){for(var On=Un.length;On--&&Ao(ni,Un[On],0)>-1;);return On}var wn=Ht({\u00c0:"A",\u00c1:"A",\u00c2:"A",\u00c3:"A",\u00c4:"A",\u00c5:"A",\u00e0:"a",\u00e1:"a",\u00e2:"a",\u00e3:"a",\u00e4:"a",\u00e5:"a",\u00c7:"C",\u00e7:"c",\u00d0:"D",\u00f0:"d",\u00c8:"E",\u00c9:"E",\u00ca:"E",\u00cb:"E",\u00e8:"e",\u00e9:"e",\u00ea:"e",\u00eb:"e",\u00cc:"I",\u00cd:"I",\u00ce:"I",\u00cf:"I",\u00ec:"i",\u00ed:"i",\u00ee:"i",\u00ef:"i",\u00d1:"N",\u00f1:"n",\u00d2:"O",\u00d3:"O",\u00d4:"O",\u00d5:"O",\u00d6:"O",\u00d8:"O",\u00f2:"o",\u00f3:"o",\u00f4:"o",\u00f5:"o",\u00f6:"o",\u00f8:"o",\u00d9:"U",\u00da:"U",\u00db:"U",\u00dc:"U",\u00f9:"u",\u00fa:"u",\u00fb:"u",\u00fc:"u",\u00dd:"Y",\u00fd:"y",\u00ff:"y",\u00c6:"Ae",\u00e6:"ae",\u00de:"Th",\u00fe:"th",\u00df:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010a:"C",\u010c:"C",\u0107:"c",\u0109:"c",\u010b:"c",\u010d:"c",\u010e:"D",\u0110:"D",\u010f:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011a:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011b:"e",\u011c:"G",\u011e:"G",\u0120:"G",\u0122:"G",\u011d:"g",\u011f:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012a:"I",\u012c:"I",\u012e:"I",\u0130:"I",\u0129:"i",\u012b:"i",\u012d:"i",\u012f:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013b:"L",\u013d:"L",\u013f:"L",\u0141:"L",\u013a:"l",\u013c:"l",\u013e:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014a:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014b:"n",\u014c:"O",\u014e:"O",\u0150:"O",\u014d:"o",\u014f:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015a:"S",\u015c:"S",\u015e:"S",\u0160:"S",\u015b:"s",\u015d:"s",\u015f:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016a:"U",\u016c:"U",\u016e:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016b:"u",\u016d:"u",\u016f:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017b:"Z",\u017d:"Z",\u017a:"z",\u017c:"z",\u017e:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017f:"s"}),jn=Ht({"&":"&","<":"<",">":">",'"':""","'":"'"});function ei(Un){return"\\"+Eo[Un]}function Mi(Un){return gs.test(Un)}function zi(Un){var ni=-1,On=Array(Un.size);return Un.forEach(function(ti,yi){On[++ni]=[yi,ti]}),On}function Di(Un,ni){return function(On){return Un(ni(On))}}function Rr(Un,ni){for(var On=-1,ti=Un.length,yi=0,Pi=[];++On",""":'"',"'":"'"}),Po=function Un(ni){var w,On=(ni=null==ni?io:Po.defaults(io.Object(),ni,Po.pick(io,Vo))).Array,ti=ni.Date,yi=ni.Error,Pi=ni.Function,gr=ni.Math,_r=ni.Object,No=ni.RegExp,bs=ni.String,tr=ni.TypeError,zs=On.prototype,no=_r.prototype,ls=ni["__core-js_shared__"],To=Pi.prototype.toString,fr=no.hasOwnProperty,uo=0,Ks=(w=/[^.]+$/.exec(ls&&ls.keys&&ls.keys.IE_PROTO||""))?"Symbol(src)_1."+w:"",$s=no.toString,ka=To.call(_r),Xa=io._,Aa=No("^"+To.call(fr).replace(an,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Fs=Zo?ni.Buffer:s,cs=ni.Symbol,ea=ni.Uint8Array,ll=Fs?Fs.allocUnsafe:s,ta=Di(_r.getPrototypeOf,_r),ys=_r.create,Es=no.propertyIsEnumerable,na=zs.splice,Ee=cs?cs.isConcatSpreadable:s,qe=cs?cs.iterator:s,nn=cs?cs.toStringTag:s,He=function(){try{var w=Ia(_r,"defineProperty");return w({},"",{}),w}catch{}}(),Ft=ni.clearTimeout!==io.clearTimeout&&ni.clearTimeout,pn=ti&&ti.now!==io.Date.now&&ti.now,Qn=ni.setTimeout!==io.setTimeout&&ni.setTimeout,fi=gr.ceil,or=gr.floor,Zi=_r.getOwnPropertySymbols,xr=Fs?Fs.isBuffer:s,Ki=ni.isFinite,Nr=zs.join,jr=Di(_r.keys,_r),yr=gr.max,nr=gr.min,vi=ti.now,Ui=ni.parseInt,Xr=gr.random,Co=zs.reverse,ro=Ia(ni,"DataView"),mo=Ia(ni,"Map"),Ss=Ia(ni,"Promise"),Sr=Ia(ni,"Set"),go=Ia(ni,"WeakMap"),is=Ia(_r,"create"),sr=go&&new go,ha={},Dl=pc(ro),Na=pc(mo),ho=pc(Ss),La=pc(Sr),Fa=pc(go),Bs=cs?cs.prototype:s,ds=Bs?Bs.valueOf:s,gl=Bs?Bs.toString:s;function It(w){if(Rs(w)&&!Br(w)&&!(w instanceof Dr)){if(w instanceof Yi)return w;if(fr.call(w,"__wrapped__"))return Ul(w)}return new Yi(w)}var Ys=function(){function w(){}return function(N){if(!Ms(N))return{};if(ys)return ys(N);w.prototype=N;var he=new w;return w.prototype=s,he}}();function ia(){}function Yi(w,N){this.__wrapped__=w,this.__actions__=[],this.__chain__=!!N,this.__index__=0,this.__values__=s}function Dr(w){this.__wrapped__=w,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=J,this.__views__=[]}function oa(w){var N=-1,he=null==w?0:w.length;for(this.clear();++N=N?w:N)),w}function aa(w,N,he,Ke,wt,en){var Cn,Nn=1&N,Gn=2&N,pi=4&N;if(he&&(Cn=wt?he(w,Ke,wt,en):he(w)),Cn!==s)return Cn;if(!Ms(w))return w;var ui=Br(w);if(ui){if(Cn=function Tu(w){var N=w.length,he=new w.constructor(N);return N&&"string"==typeof w[0]&&fr.call(w,"index")&&(he.index=w.index,he.input=w.input),he}(w),!Nn)return js(w,Cn)}else{var Ei=Hs(w),Ni=Ei==K||Ei==ce;if(gc(w))return Va(w,Nn);if(Ei==ht||Ei==ae||Ni&&!wt){if(Cn=Gn||Ni?{}:ed(w),!Nn)return Gn?function Td(w,N){return Pa(w,Od(w),N)}(w,function Sc(w,N){return w&&Pa(N,Ka(N),w)}(Cn,w)):function Ad(w,N){return Pa(w,Dd(w),N)}(w,Ja(Cn,w))}else{if(!Ar[Ei])return wt?w:{};Cn=function td(w,N,he){var Ke=w.constructor;switch(N){case kn:return xc(w);case ye:case Le:return new Ke(+w);case Wt:return function mu(w,N){var he=N?xc(w.buffer):w.buffer;return new w.constructor(he,w.byteOffset,w.byteLength)}(w,he);case rn:case zt:case dn:case vn:case xe:case Tt:case Et:case Ye:case Nt:return Kl(w,he);case ge:return new Ke;case Oe:case Ae:return new Ke(w);case Rt:return function Ed(w){var N=new w.constructor(w.source,Ci.exec(w));return N.lastIndex=w.lastIndex,N}(w);case _t:return new Ke;case lt:return function Sd(w){return ds?_r(ds.call(w)):{}}(w)}}(w,Ei,Nn)}}en||(en=new Vn);var qi=en.get(w);if(qi)return qi;en.set(w,Cn),cf(w)?w.forEach(function(ir){Cn.add(aa(ir,N,he,ir,w,en))}):Gu(w)&&w.forEach(function(ir,Qr){Cn.set(Qr,aa(ir,N,he,Qr,w,en))});var Yr=ui?s:(pi?Gn?xd:qc:Gn?Ka:pa)(w);return Mt(Yr||w,function(ir,Qr){Yr&&(ir=w[Qr=ir]),Ta(Cn,Qr,aa(ir,N,he,Qr,w,en))}),Cn}function Tc(w,N,he){var Ke=he.length;if(null==w)return!Ke;for(w=_r(w);Ke--;){var wt=he[Ke],Cn=w[wt];if(Cn===s&&!(wt in w)||!(0,N[wt])(Cn))return!1}return!0}function kl(w,N,he){if("function"!=typeof w)throw new tr(E);return Lc(function(){w.apply(s,he)},N)}function Ua(w,N,he,Ke){var wt=-1,en=Ho,Cn=!0,Nn=w.length,Gn=[],pi=N.length;if(!Nn)return Gn;he&&(N=Mr(N,G(he))),Ke?(en=lo,Cn=!1):N.length>=200&&(en=Ne,Cn=!1,N=new ze(N));e:for(;++wt-1},Ts.prototype.set=function Us(w,N){var he=this.__data__,Ke=Ba(he,w);return Ke<0?(++this.size,he.push([w,N])):he[Ke][1]=N,this},ba.prototype.clear=function ic(){this.size=0,this.__data__={hash:new oa,map:new(mo||Ts),string:new oa}},ba.prototype.delete=function ve(w){var N=kc(this,w).delete(w);return this.size-=N?1:0,N},ba.prototype.get=function Me(w){return kc(this,w).get(w)},ba.prototype.has=function We(w){return kc(this,w).has(w)},ba.prototype.set=function Te(w,N){var he=kc(this,w),Ke=he.size;return he.set(w,N),this.size+=he.size==Ke?0:1,this},ze.prototype.add=ze.prototype.push=function Ot(w){return this.__data__.set(w,x),this},ze.prototype.has=function Jt(w){return this.__data__.has(w)},Vn.prototype.clear=function ai(){this.__data__=new Ts,this.size=0},Vn.prototype.delete=function zn(w){var N=this.__data__,he=N.delete(w);return this.size=N.size,he},Vn.prototype.get=function Oi(w){return this.__data__.get(w)},Vn.prototype.has=function dr(w){return this.__data__.has(w)},Vn.prototype.set=function fo(w,N){var he=this.__data__;if(he instanceof Ts){var Ke=he.__data__;if(!mo||Ke.length<199)return Ke.push([w,N]),this.size=++he.size,this;he=this.__data__=new ba(Ke)}return he.set(w,N),this.size=he.size,this};var hs=lc(D),_l=lc(L,!0);function bl(w,N){var he=!0;return hs(w,function(Ke,wt,en){return he=!!N(Ke,wt,en)}),he}function yl(w,N,he){for(var Ke=-1,wt=w.length;++Ke0&&he(Nn)?N>1?a(Nn,N-1,he,Ke,wt):es(wt,Nn):Ke||(wt[wt.length]=Nn)}return wt}var u=vu(),S=vu(!0);function D(w,N){return w&&u(w,N,pa)}function L(w,N){return w&&S(w,N,pa)}function Y(w,N){return Kr(N,function(he){return jl(w[he])})}function oe(w,N){for(var he=0,Ke=(N=bo(N,w)).length;null!=w&&heN}function $e(w,N){return null!=w&&fr.call(w,N)}function Be(w,N){return null!=w&&N in _r(w)}function At(w,N,he){for(var Ke=he?lo:Ho,wt=w[0].length,en=w.length,Cn=en,Nn=On(en),Gn=1/0,pi=[];Cn--;){var ui=w[Cn];Cn&&N&&(ui=Mr(ui,G(N))),Gn=nr(ui.length,Gn),Nn[Cn]=!he&&(N||wt>=120&&ui.length>=120)?new ze(Cn&&ui):s}ui=w[0];var Ei=-1,Ni=Nn[0];e:for(;++Ei=Nn?Gn:Gn*("desc"==he[Ke]?-1:1)}return w.index-N.index}(en,Cn,he)})}function fa(w,N,he){for(var Ke=-1,wt=N.length,en={};++Ke-1;)Nn!==w&&na.call(Nn,Gn,1),na.call(w,Gn,1);return w}function Ps(w,N){for(var he=w?N.length:0,Ke=he-1;he--;){var wt=N[he];if(he==Ke||wt!==en){var en=wt;fl(wt)?na.call(w,wt,1):qa(w,wt)}}return w}function Cs(w,N){return w+or(Xr()*(N-w+1))}function Za(w,N){var he="";if(!w||N<1||N>pe)return he;do{N%2&&(he+=w),(N=or(N/2))&&(w+=w)}while(N);return he}function Qi(w,N){return Ld(Lh(w,N,ya),w+"")}function Qo(w){return so(Gc(w))}function Vs(w,N){var he=Gc(w);return Bd(he,dl(N,0,he.length))}function Ma(w,N,he,Ke){if(!Ms(w))return w;for(var wt=-1,en=(N=bo(N,w)).length,Cn=en-1,Nn=w;null!=Nn&&++wtwt?0:wt+N),(he=he>wt?wt:he)<0&&(he+=wt),wt=N>he?0:he-N>>>0,N>>>=0;for(var en=On(wt);++Ke>>1,Cn=w[en];null!==Cn&&!il(Cn)&&(he?Cn<=N:Cn=200){var pi=N?null:Nh(w);if(pi)return Zr(pi);Cn=!1,wt=Ne,Gn=new ze}else Gn=N?[]:Nn;e:for(;++Ke=Ke?w:Xs(w,N,he)}var zo=Ft||function(w){return io.clearTimeout(w)};function Va(w,N){if(N)return w.slice();var he=w.length,Ke=ll?ll(he):new w.constructor(he);return w.copy(Ke),Ke}function xc(w){var N=new w.constructor(w.byteLength);return new ea(N).set(new ea(w)),N}function Kl(w,N){var he=N?xc(w.buffer):w.buffer;return new w.constructor(he,w.byteOffset,w.length)}function ja(w,N){if(w!==N){var he=w!==s,Ke=null===w,wt=w==w,en=il(w),Cn=N!==s,Nn=null===N,Gn=N==N,pi=il(N);if(!Nn&&!pi&&!en&&w>N||en&&Cn&&Gn&&!Nn&&!pi||Ke&&Cn&&Gn||!he&&Gn||!wt)return 1;if(!Ke&&!en&&!pi&&w1?he[wt-1]:s,Cn=wt>2?he[2]:s;for(en=w.length>3&&"function"==typeof en?(wt--,en):s,Cn&&da(he[0],he[1],Cn)&&(en=wt<3?s:en,wt=1),N=_r(N);++Ke-1?wt[en?N[Cn]:Cn]:s}}function Qc(w){return hl(function(N){var he=N.length,Ke=he,wt=Yi.prototype.thru;for(w&&N.reverse();Ke--;){var en=N[Ke];if("function"!=typeof en)throw new tr(E);if(wt&&!Cn&&"wrapper"==nl(en))var Cn=new Yi([],!0)}for(Ke=Cn?Ke:he;++Ke1&&oo.reverse(),ui&&GnNn))return!1;var pi=en.get(w),ui=en.get(N);if(pi&&ui)return pi==N&&ui==w;var Ei=-1,Ni=!0,qi=2&he?new ze:s;for(en.set(w,N),en.set(N,w);++Ei-1&&w%1==0&&w1?"& ":"")+N[Ke],N=N.join(he>2?", ":" "),w.replace(ot,"{\n/* [wrapped with "+N+"] */\n")}(Ke,function Du(w,N){return Mt(X,function(he){var Ke="_."+he[0];N&he[1]&&!Ho(w,Ke)&&w.push(Ke)}),w.sort()}(function Pd(w){var N=w.match(bn);return N?N[1].split(Rn):[]}(Ke),he)))}function Fh(w){var N=0,he=0;return function(){var Ke=vi(),wt=16-(Ke-he);if(he=Ke,wt>0){if(++N>=800)return arguments[0]}else N=0;return w.apply(s,arguments)}}function Bd(w,N){var he=-1,Ke=w.length,wt=Ke-1;for(N=N===s?Ke:N;++he1?w[N-1]:s;return he="function"==typeof he?(w.pop(),he):s,Lg(w,he)});function Nu(w){var N=It(w);return N.__chain__=!0,N}function Lu(w,N){return N(w)}var Vg=hl(function(w){var N=w.length,he=N?w[0]:0,Ke=this.__wrapped__,wt=function(en){return oc(en,w)};return!(N>1||this.__actions__.length)&&Ke instanceof Dr&&fl(he)?((Ke=Ke.slice(he,+he+(N?1:0))).__actions__.push({func:Lu,args:[wt],thisArg:s}),new Yi(Ke,this.__chain__).thru(function(en){return N&&!en.length&&en.push(s),en})):this.thru(wt)}),$h=Dc(function(w,N,he){fr.call(w,he)?++w[he]:Ca(w,he,1)}),Uu=kh(Vd),ad=kh(jd);function Gd(w,N){return(Br(w)?Mt:hs)(w,hr(N,3))}function cd(w,N){return(Br(w)?Xo:_l)(w,hr(N,3))}var Lb=Dc(function(w,N,he){fr.call(w,he)?w[he].push(N):Ca(w,he,[N])}),zd=Qi(function(w,N,he){var Ke=-1,wt="function"==typeof N,en=za(w)?On(w.length):[];return hs(w,function(Cn){en[++Ke]=wt?zr(N,Cn,he):kt(Cn,N,he)}),en}),Gg=Dc(function(w,N,he){Ca(w,he,N)});function Kd(w,N){return(Br(w)?Mr:eo)(w,hr(N,3))}var Kg=Dc(function(w,N,he){w[he?0:1].push(N)},function(){return[[],[]]}),Fb=Qi(function(w,N){if(null==w)return[];var he=N.length;return he>1&&da(w,N[0],N[1])?N=[]:he>2&&da(N[0],N[1],N[2])&&(N=[N[0]]),$r(w,a(N,1),[])}),Zh=pn||function(){return io.Date.now()};function Bp(w,N,he){return N=he?s:N,Wa(w,U,s,s,s,s,N=w&&null==N?w.length:N)}function Xd(w,N){var he;if("function"!=typeof N)throw new tr(E);return w=Ur(w),function(){return--w>0&&(he=N.apply(this,arguments)),w<=1&&(N=s),he}}var Qd=Qi(function(w,N,he){var Ke=1;if(he.length){var wt=Rr(he,Yl(Qd));Ke|=z}return Wa(w,Ke,N,he,wt)}),Up=Qi(function(w,N,he){var Ke=3;if(he.length){var wt=Rr(he,Yl(Up));Ke|=z}return Wa(N,Ke,w,he,wt)});function Jd(w,N,he){var Ke,wt,en,Cn,Nn,Gn,pi=0,ui=!1,Ei=!1,Ni=!0;if("function"!=typeof w)throw new tr(E);function qi(rs){var sl=Ke,_c=wt;return Ke=wt=s,pi=rs,Cn=w.apply(_c,sl)}function ir(rs){var sl=rs-Gn;return Gn===s||sl>=N||sl<0||Ei&&rs-pi>=en}function Qr(){var rs=Zh();if(ir(rs))return oo(rs);Nn=Lc(Qr,function Yr(rs){var If=N-(rs-Gn);return Ei?nr(If,en-(rs-pi)):If}(rs))}function oo(rs){return Nn=s,Ni&&Ke?qi(rs):(Ke=wt=s,Cn)}function Ya(){var rs=Zh(),sl=ir(rs);if(Ke=arguments,wt=this,Gn=rs,sl){if(Nn===s)return function br(rs){return pi=rs,Nn=Lc(Qr,N),ui?qi(rs):Cn}(Gn);if(Ei)return zo(Nn),Nn=Lc(Qr,N),qi(Gn)}return Nn===s&&(Nn=Lc(Qr,N)),Cn}return N=pl(N)||0,Ms(he)&&(ui=!!he.leading,en=(Ei="maxWait"in he)?yr(pl(he.maxWait)||0,N):en,Ni="trailing"in he?!!he.trailing:Ni),Ya.cancel=function ol(){Nn!==s&&zo(Nn),pi=0,Ke=Gn=wt=Nn=s},Ya.flush=function Ea(){return Nn===s?Cn:oo(Zh())},Ya}var ju=Qi(function(w,N){return kl(w,1,N)}),Vp=Qi(function(w,N,he){return kl(w,pl(N)||0,he)});function Zd(w,N){if("function"!=typeof w||null!=N&&"function"!=typeof N)throw new tr(E);var he=function(){var Ke=arguments,wt=N?N.apply(this,Ke):Ke[0],en=he.cache;if(en.has(wt))return en.get(wt);var Cn=w.apply(this,Ke);return he.cache=en.set(wt,Cn)||en,Cn};return he.cache=new(Zd.Cache||ba),he}function Bc(w){if("function"!=typeof w)throw new tr(E);return function(){var N=arguments;switch(N.length){case 0:return!w.call(this);case 1:return!w.call(this,N[0]);case 2:return!w.call(this,N[0],N[1]);case 3:return!w.call(this,N[0],N[1],N[2])}return!w.apply(this,N)}}Zd.Cache=ba;var dd=el(function(w,N){var he=(N=1==N.length&&Br(N[0])?Mr(N[0],G(hr())):Mr(a(N,1),G(hr()))).length;return Qi(function(Ke){for(var wt=-1,en=nr(Ke.length,he);++wt=N}),Vc=_n(function(){return arguments}())?_n:function(w){return Rs(w)&&fr.call(w,"callee")&&!Es.call(w,"callee")},Br=On.isArray,nv=$o?G($o):function An(w){return Rs(w)&&Ce(w)==kn};function za(w){return null!=w&&sf(w.length)&&!jl(w)}function Is(w){return Rs(w)&&za(w)}var gc=xr||ru,iv=xo?G(xo):function tn(w){return Rs(w)&&Ce(w)==Le};function jc(w){if(!Rs(w))return!1;var N=Ce(w);return N==ie||"[object DOMException]"==N||"string"==typeof w.message&&"string"==typeof w.name&&!qd(w)}function jl(w){if(!Ms(w))return!1;var N=Ce(w);return N==K||N==ce||"[object AsyncFunction]"==N||"[object Proxy]"==N}function rf(w){return"number"==typeof w&&w==Ur(w)}function sf(w){return"number"==typeof w&&w>-1&&w%1==0&&w<=pe}function Ms(w){var N=typeof w;return null!=w&&("object"==N||"function"==N)}function Rs(w){return null!=w&&"object"==typeof w}var Gu=Gr?G(Gr):function Mn(w){return Rs(w)&&Hs(w)==ge};function Xp(w){return"number"==typeof w||Rs(w)&&Ce(w)==Oe}function qd(w){if(!Rs(w)||Ce(w)!=ht)return!1;var N=ta(w);if(null===N)return!0;var he=fr.call(N,"constructor")&&N.constructor;return"function"==typeof he&&he instanceof he&&To.call(he)==ka}var lf=Yo?G(Yo):function mi(w){return Rs(w)&&Ce(w)==Rt},cf=_s?G(_s):function Vi(w){return Rs(w)&&Hs(w)==_t};function zu(w){return"string"==typeof w||!Br(w)&&Rs(w)&&Ce(w)==Ae}function il(w){return"symbol"==typeof w||Rs(w)&&Ce(w)==lt}var Hc=qo?G(qo):function Xi(w){return Rs(w)&&sf(w.length)&&!!vr[Ce(w)]},lv=Ic(Or),Wc=Ic(function(w,N){return w<=N});function uf(w){if(!w)return[];if(za(w))return zu(w)?Fr(w):js(w);if(qe&&w[qe])return function cr(Un){for(var ni,On=[];!(ni=Un.next()).done;)On.push(ni.value);return On}(w[qe]());var N=Hs(w);return(N==ge?zi:N==_t?Zr:Gc)(w)}function Jl(w){return w?(w=pl(w))===Se||w===-Se?17976931348623157e292*(w<0?-1:1):w==w?w:0:0===w?w:0}function Ur(w){var N=Jl(w),he=N%1;return N==N?he?N-he:N:0}function $u(w){return w?dl(Ur(w),0,J):0}function pl(w){if("number"==typeof w)return w;if(il(w))return q;if(Ms(w)){var N="function"==typeof w.valueOf?w.valueOf():w;w=Ms(N)?N+"":N}if("string"!=typeof w)return 0===w?w:+w;w=me(w);var he=Bi.test(w);return he||En.test(w)?ss(w.slice(2),he?2:8):ki.test(w)?q:+w}function Zp(w){return Pa(w,Ka(w))}function yo(w){return null==w?"":fs(w)}var qp=tl(function(w,N){if(fc(N)||za(N))Pa(N,pa(N),w);else for(var he in N)fr.call(N,he)&&Ta(w,he,N[he])}),dv=tl(function(w,N){Pa(N,Ka(N),w)}),hf=tl(function(w,N,he,Ke){Pa(N,Ka(N),w,Ke)}),eu=tl(function(w,N,he,Ke){Pa(N,pa(N),w,Ke)}),uv=hl(oc),fv=Qi(function(w,N){w=_r(w);var he=-1,Ke=N.length,wt=Ke>2?N[2]:s;for(wt&&da(N[0],N[1],wt)&&(Ke=1);++he1),en}),Pa(w,xd(w),he),Ke&&(he=aa(he,7,Zc));for(var wt=N.length;wt--;)qa(he,N[wt]);return he}),om=hl(function(w,N){return null==w?{}:function Hr(w,N){return fa(w,N,function(he,Ke){return nm(w,Ke)})}(w,N)});function vf(w,N){if(null==w)return{};var he=Mr(xd(w),function(Ke){return[Ke]});return N=hr(N),fa(w,he,function(Ke,wt){return N(Ke,wt[0])})}var _f=Rc(pa),yv=Rc(Ka);function Gc(w){return null==w?[]:le(w,pa(w))}var Sv=cc(function(w,N,he){return N=N.toLowerCase(),w+(he?zc(N):N)});function zc(w){return th(yo(w).toLowerCase())}function Ju(w){return(w=yo(w))&&w.replace(it,wn).replace(Ko,"")}var Av=cc(function(w,N,he){return w+(he?"-":"")+N.toLowerCase()}),Tv=cc(function(w,N,he){return w+(he?" ":"")+N.toLowerCase()}),lm=_u("toLowerCase"),Sf=cc(function(w,N,he){return w+(he?"_":"")+N.toLowerCase()}),Dv=cc(function(w,N,he){return w+(he?" ":"")+th(N)}),fm=cc(function(w,N,he){return w+(he?" ":"")+N.toUpperCase()}),th=_u("toUpperCase");function Tf(w,N,he){return w=yo(w),(N=he?s:N)===s?function er(Un){return os.test(Un)}(w)?function Sa(Un){return Un.match(xs)||[]}(w):function ts(Un){return Un.match(Dt)||[]}(w):w.match(N)||[]}var nh=Qi(function(w,N){try{return zr(w,s,N)}catch(he){return jc(he)?he:new yi(he)}}),pm=hl(function(w,N){return Mt(N,function(he){he=Cl(he),Ca(w,he,Qd(w[he],w))}),w});function rh(w){return function(){return w}}var iu=Qc(),mm=Qc(!0);function ya(w){return w}function fd(w){return Ii("function"==typeof w?w:aa(w,1))}var Rv=Qi(function(w,N){return function(he){return kt(he,w,N)}}),kv=Qi(function(w,N){return function(he){return kt(w,he,N)}});function wf(w,N,he){var Ke=pa(N),wt=Y(N,Ke);null==he&&(!Ms(N)||!wt.length&&Ke.length)&&(he=N,N=w,w=this,wt=Y(N,pa(N)));var en=!(Ms(he)&&"chain"in he&&!he.chain),Cn=jl(w);return Mt(wt,function(Nn){var Gn=N[Nn];w[Nn]=Gn,Cn&&(w.prototype[Nn]=function(){var pi=this.__chain__;if(en||pi){var ui=w(this.__wrapped__);return(ui.__actions__=js(this.__actions__)).push({func:Gn,args:arguments,thisArg:w}),ui.__chain__=pi,ui}return Gn.apply(w,es([this.value()],arguments))})}),w}function oh(){}var _m=Pc(Mr),bm=Pc(jo),pd=Pc(vo);function Mf(w){return nd(w)?je(Cl(w)):function la(w){return function(N){return oe(N,w)}}(w)}var Nv=wd(),sh=wd(!0);function vc(){return[]}function ru(){return!1}var Pf=Fl(function(w,N){return w+N},0),Lv=Ha("ceil"),Fv=Fl(function(w,N){return w/N},1),Bv=Ha("floor"),Cm=Fl(function(w,N){return w*N},1),Wv=Ha("round"),Gv=Fl(function(w,N){return w-N},0);return It.after=function Yd(w,N){if("function"!=typeof N)throw new tr(E);return w=Ur(w),function(){if(--w<1)return N.apply(this,arguments)}},It.ary=Bp,It.assign=qp,It.assignIn=dv,It.assignInWith=hf,It.assignWith=eu,It.at=uv,It.before=Xd,It.bind=Qd,It.bindAll=pm,It.bindKey=Up,It.castArray=function Uc(){if(!arguments.length)return[];var w=arguments[0];return Br(w)?w:[w]},It.chain=Nu,It.chunk=function Fc(w,N,he){N=(he?da(w,N,he):N===s)?1:yr(Ur(N),0);var Ke=null==w?0:w.length;if(!Ke||N<1)return[];for(var wt=0,en=0,Cn=On(fi(Ke/N));wtwt?0:wt+he),(Ke=Ke===s||Ke>wt?wt:Ur(Ke))<0&&(Ke+=wt),Ke=he>Ke?0:$u(Ke);he>>0)?(w=yo(w))&&("string"==typeof N||null!=N&&!lf(N))&&!(N=fs(N))&&Mi(w)?ur(Fr(w),0,he):w.split(N,he):[]},It.spread=function nf(w,N){if("function"!=typeof w)throw new tr(E);return N=null==N?0:yr(Ur(N),0),Qi(function(he){var Ke=he[N],wt=ur(he,0,N);return Ke&&es(wt,Ke),zr(w,this,wt)})},It.tail=function xp(w){var N=null==w?0:w.length;return N?Xs(w,1,N):[]},It.take=function Dp(w,N,he){return w&&w.length?Xs(w,0,(N=he||N===s?1:Ur(N))<0?0:N):[]},It.takeRight=function Op(w,N,he){var Ke=null==w?0:w.length;return Ke?Xs(w,(N=Ke-(N=he||N===s?1:Ur(N)))<0?0:N,Ke):[]},It.takeRightWhile=function Pg(w,N){return w&&w.length?ar(w,hr(N,3),!1,!0):[]},It.takeWhile=function Ig(w,N){return w&&w.length?ar(w,hr(N,3)):[]},It.tap=function Rb(w,N){return N(w),w},It.throttle=function Wp(w,N,he){var Ke=!0,wt=!0;if("function"!=typeof w)throw new tr(E);return Ms(he)&&(Ke="leading"in he?!!he.leading:Ke,wt="trailing"in he?!!he.trailing:wt),Jd(w,N,{leading:Ke,maxWait:N,trailing:wt})},It.thru=Lu,It.toArray=uf,It.toPairs=_f,It.toPairsIn=yv,It.toPath=function Of(w){return Br(w)?Mr(w,Cl):il(w)?[w]:js(Bh(yo(w)))},It.toPlainObject=Zp,It.transform=function Ev(w,N,he){var Ke=Br(w),wt=Ke||gc(w)||Hc(w);if(N=hr(N,4),null==he){var en=w&&w.constructor;he=wt?Ke?new en:[]:Ms(w)&&jl(en)?Ys(ta(w)):{}}return(wt?Mt:D)(w,function(Cn,Nn,Gn){return N(he,Cn,Nn,Gn)}),he},It.unary=function Gp(w){return Bp(w,1)},It.union=Rg,It.unionBy=kg,It.unionWith=Pp,It.uniq=function Ib(w){return w&&w.length?Da(w):[]},It.uniqBy=function Ip(w,N){return w&&w.length?Da(w,hr(N,2)):[]},It.uniqWith=function Ng(w,N){return N="function"==typeof N?N:s,w&&w.length?Da(w,s,N):[]},It.unset=function zb(w,N){return null==w||qa(w,N)},It.unzip=Gh,It.unzipWith=Lg,It.update=function Kb(w,N,he){return null==w?w:Fo(w,N,Al(he))},It.updateWith=function sm(w,N,he,Ke){return Ke="function"==typeof Ke?Ke:s,null==w?w:Fo(w,N,Al(he),Ke)},It.values=Gc,It.valuesIn=function $b(w){return null==w?[]:le(w,Ka(w))},It.without=Fg,It.words=Tf,It.wrap=function zp(w,N){return tf(Al(N),w)},It.xor=Rp,It.xorBy=zh,It.xorWith=Bg,It.zip=mc,It.zipObject=function kp(w,N){return Mc(w||[],N||[],Ta)},It.zipObjectDeep=function Ug(w,N){return Mc(w||[],N||[],Ma)},It.zipWith=Np,It.entries=_f,It.entriesIn=yv,It.extend=dv,It.extendWith=hf,wf(It,It),It.add=Pf,It.attempt=nh,It.camelCase=Sv,It.capitalize=zc,It.ceil=Lv,It.clamp=function Qu(w,N,he){return he===s&&(he=N,N=s),he!==s&&(he=(he=pl(he))==he?he:0),N!==s&&(N=(N=pl(N))==N?N:0),dl(pl(w),N,he)},It.clone=function Qg(w){return aa(w,4)},It.cloneDeep=function Zg(w){return aa(w,5)},It.cloneDeepWith=function qg(w,N){return aa(w,5,N="function"==typeof N?N:s)},It.cloneWith=function Jg(w,N){return aa(w,4,N="function"==typeof N?N:s)},It.conformsTo=function ev(w,N){return null==N||Tc(w,N,pa(N))},It.deburr=Ju,It.defaultTo=function Cf(w,N){return null==w||w!=w?N:w},It.divide=Fv,It.endsWith=function am(w,N,he){w=yo(w),N=fs(N);var Ke=w.length,wt=he=he===s?Ke:dl(Ur(he),0,Ke);return(he-=N.length)>=0&&w.slice(he,wt)==N},It.eq=Qs,It.escape=function Ef(w){return(w=yo(w))&&tt.test(w)?w.replace(bt,jn):w},It.escapeRegExp=function Zu(w){return(w=yo(w))&&Qt.test(w)?w.replace(an,"\\$&"):w},It.every=function sd(w,N,he){var Ke=Br(w)?jo:bl;return he&&da(w,N,he)&&(N=s),Ke(w,hr(N,3))},It.find=Uu,It.findIndex=Vd,It.findKey=function pv(w,N){return Wo(w,hr(N,3),D)},It.findLast=ad,It.findLastIndex=jd,It.findLastKey=function mv(w,N){return Wo(w,hr(N,3),L)},It.floor=Bv,It.forEach=Gd,It.forEachRight=cd,It.forIn=function gv(w,N){return null==w?w:u(w,hr(N,3),Ka)},It.forInRight=function vv(w,N){return null==w?w:S(w,hr(N,3),Ka)},It.forOwn=function _v(w,N){return w&&D(w,hr(N,3))},It.forOwnRight=function bv(w,N){return w&&L(w,hr(N,3))},It.get=tm,It.gt=ud,It.gte=tv,It.has=function pf(w,N){return null!=w&&hc(w,N,$e)},It.hasIn=nm,It.head=jh,It.identity=ya,It.includes=function Xh(w,N,he,Ke){w=za(w)?w:Gc(w),he=he&&!Ke?Ur(he):0;var wt=w.length;return he<0&&(he=yr(wt+he,0)),zu(w)?he<=wt&&w.indexOf(N,he)>-1:!!wt&&Ao(w,N,he)>-1},It.indexOf=function Ag(w,N,he){var Ke=null==w?0:w.length;if(!Ke)return-1;var wt=null==he?0:Ur(he);return wt<0&&(wt=yr(Ke+wt,0)),Ao(w,N,wt)},It.inRange=function bf(w,N,he){return N=Jl(N),he===s?(he=N,N=0):he=Jl(he),function at(w,N,he){return w>=nr(N,he)&&w=-pe&&w<=pe},It.isSet=cf,It.isString=zu,It.isSymbol=il,It.isTypedArray=Hc,It.isUndefined=function Ku(w){return w===s},It.isWeakMap=function Jp(w){return Rs(w)&&Hs(w)==yt},It.isWeakSet=function df(w){return Rs(w)&&"[object WeakSet]"==Ce(w)},It.join=function Wh(w,N){return null==w?"":Nr.call(w,N)},It.kebabCase=Av,It.last=Bo,It.lastIndexOf=function Hd(w,N,he){var Ke=null==w?0:w.length;if(!Ke)return-1;var wt=Ke;return he!==s&&(wt=(wt=Ur(he))<0?yr(Ke+wt,0):nr(wt,Ke-1)),N==N?function mr(Un,ni,On){for(var ti=On+1;ti--;)if(Un[ti]===ni)return ti;return ti}(w,N,wt):Do(w,Ls,wt,!0)},It.lowerCase=Tv,It.lowerFirst=lm,It.lt=lv,It.lte=Wc,It.max=function Am(w){return w&&w.length?yl(w,ya,Ue):s},It.maxBy=function Uv(w,N){return w&&w.length?yl(w,hr(N,2),Ue):s},It.mean=function Vv(w){return rt(w,ya)},It.meanBy=function jv(w,N){return rt(w,hr(N,2))},It.min=function Hv(w){return w&&w.length?yl(w,ya,Or):s},It.minBy=function Tm(w,N){return w&&w.length?yl(w,hr(N,2),Or):s},It.stubArray=vc,It.stubFalse=ru,It.stubObject=function ou(){return{}},It.stubString=function Em(){return""},It.stubTrue=function xf(){return!0},It.multiply=Cm,It.nth=function bp(w,N){return w&&w.length?Lo(w,Ur(N)):s},It.noConflict=function vm(){return io._===this&&(io._=Xa),this},It.noop=oh,It.now=Zh,It.pad=function Cv(w,N,he){w=yo(w);var Ke=(N=Ur(N))?kr(w):0;if(!N||Ke>=N)return w;var wt=(N-Ke)/2;return $l(or(wt),he)+w+$l(fi(wt),he)},It.padEnd=function wv(w,N,he){w=yo(w);var Ke=(N=Ur(N))?kr(w):0;return N&&KeN){var Ke=w;w=N,N=Ke}if(he||w%1||N%1){var wt=Xr();return nr(w+wt*(N-w+Ds("1e-"+((wt+"").length-1))),N)}return Cs(w,N)},It.reduce=function Qh(w,N,he){var Ke=Br(w)?So:nt,wt=arguments.length<3;return Ke(w,hr(N,4),he,wt,hs)},It.reduceRight=function Lp(w,N,he){var Ke=Br(w)?Ji:nt,wt=arguments.length<3;return Ke(w,hr(N,4),he,wt,_l)},It.repeat=function tu(w,N,he){return N=(he?da(w,N,he):N===s)?1:Ur(N),Za(yo(w),N)},It.replace=function qu(){var w=arguments,N=yo(w[0]);return w.length<3?N:N.replace(w[1],w[2])},It.result=function hd(w,N,he){var Ke=-1,wt=(N=bo(N,w)).length;for(wt||(wt=1,w=s);++Kepe)return[];var he=J,Ke=nr(w,J);N=hr(N),w-=J;for(var wt=Gi(Ke,N);++he=en)return w;var Nn=he-kr(Ke);if(Nn<1)return Ke;var Gn=Cn?ur(Cn,0,Nn).join(""):w.slice(0,Nn);if(wt===s)return Gn+Ke;if(Cn&&(Nn+=Gn.length-Nn),lf(wt)){if(w.slice(Nn).search(wt)){var pi,ui=Gn;for(wt.global||(wt=No(wt.source,yo(Ci.exec(wt))+"g")),wt.lastIndex=0;pi=wt.exec(ui);)var Ei=pi.index;Gn=Gn.slice(0,Ei===s?Nn:Ei)}}else if(w.indexOf(fs(wt),Nn)!=Nn){var Ni=Gn.lastIndexOf(wt);Ni>-1&&(Gn=Gn.slice(0,Ni))}return Gn+Ke},It.unescape=function Pv(w){return(w=yo(w))&&De.test(w)?w.replace(Vt,Oo):w},It.uniqueId=function Sm(w){var N=++uo;return yo(w)+N},It.upperCase=fm,It.upperFirst=th,It.each=Gd,It.eachRight=cd,It.first=jh,wf(It,function(){var w={};return D(It,function(N,he){fr.call(It.prototype,he)||(w[he]=N)}),w}(),{chain:!1}),It.VERSION="4.17.21",Mt(["bind","bindKey","curry","curryRight","partial","partialRight"],function(w){It[w].placeholder=It}),Mt(["drop","take"],function(w,N){Dr.prototype[w]=function(he){he=he===s?1:yr(Ur(he),0);var Ke=this.__filtered__&&!N?new Dr(this):this.clone();return Ke.__filtered__?Ke.__takeCount__=nr(he,Ke.__takeCount__):Ke.__views__.push({size:nr(he,J),type:w+(Ke.__dir__<0?"Right":"")}),Ke},Dr.prototype[w+"Right"]=function(he){return this.reverse()[w](he).reverse()}}),Mt(["filter","map","takeWhile"],function(w,N){var he=N+1,Ke=1==he||3==he;Dr.prototype[w]=function(wt){var en=this.clone();return en.__iteratees__.push({iteratee:hr(wt,3),type:he}),en.__filtered__=en.__filtered__||Ke,en}}),Mt(["head","last"],function(w,N){var he="take"+(N?"Right":"");Dr.prototype[w]=function(){return this[he](1).value()[0]}}),Mt(["initial","tail"],function(w,N){var he="drop"+(N?"":"Right");Dr.prototype[w]=function(){return this.__filtered__?new Dr(this):this[he](1)}}),Dr.prototype.compact=function(){return this.filter(ya)},Dr.prototype.find=function(w){return this.filter(w).head()},Dr.prototype.findLast=function(w){return this.reverse().find(w)},Dr.prototype.invokeMap=Qi(function(w,N){return"function"==typeof w?new Dr(this):this.map(function(he){return kt(he,w,N)})}),Dr.prototype.reject=function(w){return this.filter(Bc(hr(w)))},Dr.prototype.slice=function(w,N){w=Ur(w);var he=this;return he.__filtered__&&(w>0||N<0)?new Dr(he):(w<0?he=he.takeRight(-w):w&&(he=he.drop(w)),N!==s&&(he=(N=Ur(N))<0?he.dropRight(-N):he.take(N-w)),he)},Dr.prototype.takeRightWhile=function(w){return this.reverse().takeWhile(w).reverse()},Dr.prototype.toArray=function(){return this.take(J)},D(Dr.prototype,function(w,N){var he=/^(?:filter|find|map|reject)|While$/.test(N),Ke=/^(?:head|last)$/.test(N),wt=It[Ke?"take"+("last"==N?"Right":""):N],en=Ke||/^find/.test(N);wt&&(It.prototype[N]=function(){var Cn=this.__wrapped__,Nn=Ke?[1]:arguments,Gn=Cn instanceof Dr,pi=Nn[0],ui=Gn||Br(Cn),Ei=function(Qr){var oo=wt.apply(It,es([Qr],Nn));return Ke&&Ni?oo[0]:oo};ui&&he&&"function"==typeof pi&&1!=pi.length&&(Gn=ui=!1);var Ni=this.__chain__,br=en&&!Ni,Yr=Gn&&!this.__actions__.length;if(!en&&ui){Cn=Yr?Cn:new Dr(this);var ir=w.apply(Cn,Nn);return ir.__actions__.push({func:Lu,args:[Ei],thisArg:s}),new Yi(ir,Ni)}return br&&Yr?w.apply(this,Nn):(ir=this.thru(Ei),br?Ke?ir.value()[0]:ir.value():ir)})}),Mt(["pop","push","shift","sort","splice","unshift"],function(w){var N=zs[w],he=/^(?:push|sort|unshift)$/.test(w)?"tap":"thru",Ke=/^(?:pop|shift)$/.test(w);It.prototype[w]=function(){var wt=arguments;if(Ke&&!this.__chain__){var en=this.value();return N.apply(Br(en)?en:[],wt)}return this[he](function(Cn){return N.apply(Br(Cn)?Cn:[],wt)})}}),D(Dr.prototype,function(w,N){var he=It[N];if(he){var Ke=he.name+"";fr.call(ha,Ke)||(ha[Ke]=[]),ha[Ke].push({name:N,func:he})}}),ha[Ll(s,2).name]=[{name:"wrapper",func:s}],Dr.prototype.clone=function vl(){var w=new Dr(this.__wrapped__);return w.__actions__=js(this.__actions__),w.__dir__=this.__dir__,w.__filtered__=this.__filtered__,w.__iteratees__=js(this.__iteratees__),w.__takeCount__=this.__takeCount__,w.__views__=js(this.__views__),w},Dr.prototype.reverse=function ra(){if(this.__filtered__){var w=new Dr(this);w.__dir__=-1,w.__filtered__=!0}else(w=this.clone()).__dir__*=-1;return w},Dr.prototype.value=function Ol(){var w=this.__wrapped__.value(),N=this.__dir__,he=Br(w),Ke=N<0,wt=he?w.length:0,en=function Au(w,N,he){for(var Ke=-1,wt=he.length;++Ke=this.__values__.length;return{done:w,value:w?s:this.__values__[this.__index__++]}},It.prototype.plant=function Fu(w){for(var N,he=this;he instanceof ia;){var Ke=Ul(he);Ke.__index__=0,Ke.__values__=s,N?wt.__wrapped__=Ke:N=Ke;var wt=Ke;he=he.__wrapped__}return wt.__wrapped__=w,N},It.prototype.reverse=function Wg(){var w=this.__wrapped__;if(w instanceof Dr){var N=w;return this.__actions__.length&&(N=new Dr(this)),(N=N.reverse()).__actions__.push({func:Lu,args:[Ru],thisArg:s}),new Yi(N,this.__chain__)}return this.thru(Ru)},It.prototype.toJSON=It.prototype.valueOf=It.prototype.value=function Kh(){return Gl(this.__wrapped__,this.__actions__)},It.prototype.first=It.prototype.head,qe&&(It.prototype[qe]=function Nb(){return this}),It}();io._=Po,(r=function(){return Po}.call(I,f,I,vt))!==s&&(vt.exports=r)}.call(this)},80062:vt=>{vt.exports=function I(f,r,s){function v(E,T){if(!r[E]){if(!f[E]){if(_)return _(E,!0);throw new Error("Cannot find module '"+E+"'")}var M=r[E]={exports:{}};f[E][0].call(M.exports,function(y){return v(f[E][1][y]||y)},M,M.exports,I,f,r,s)}return r[E].exports}for(var _=void 0,g=0;g>16),te((65280&O)>>8),te(255&O);return 2==F?te(255&(O=re(z.charAt(H))<<2|re(z.charAt(H+1))>>4)):1==F&&(te((O=re(z.charAt(H))<<10|re(z.charAt(H+1))<<4|re(z.charAt(H+2))>>2)>>8&255),te(255&O)),k},b.fromByteArray=function(z){var H,U,O,F,k=z.length%3,$="";function ne(te){return"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(te)}for(H=0,O=z.length-k;H>18&63)+ne(F>>12&63)+ne(F>>6&63)+ne(63&F);switch(k){case 1:$+=ne((U=z[z.length-1])>>2),$+=ne(U<<4&63),$+="==";break;case 2:$+=ne((U=(z[z.length-2]<<8)+z[z.length-1])>>10),$+=ne(U>>4&63),$+=ne(U<<2&63),$+="="}return $}}(void 0===r?this.base64js={}:r)}).call(this,I("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},I("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/base64-js/lib/b64.js","/node_modules/gulp-browserify/node_modules/base64-js/lib")},{buffer:3,lYpoI2:10}],3:[function(I,f,r){(function(s,v,i,g,E,T,x,M,y){var b=I("base64-js"),c=I("ieee754");function i(de,Pe,ye){if(!(this instanceof i))return new i(de,Pe,ye);var Le,Xe,ie,K,ce,ge=typeof de;if("base64"===Pe&&"string"==ge)for(de=(Le=de).trim?Le.trim():Le.replace(/^\s+|\s+$/g,"");de.length%4!=0;)de+="=";if("number"==ge)Xe=se(de);else if("string"==ge)Xe=i.byteLength(de,Pe);else{if("object"!=ge)throw new Error("First argument needs to be a number, array or string.");Xe=se(de.length)}if(i._useTypedArrays?ie=i._augment(new Uint8Array(Xe)):((ie=this).length=Xe,ie._isBuffer=!0),i._useTypedArrays&&"number"==typeof de.byteLength)ie._set(de);else if(fe(ce=de)||i.isBuffer(ce)||ce&&"object"==typeof ce&&"number"==typeof ce.length)for(K=0;K>>0)):(Pe+1>>0),Xe}function j(de,Pe,ye,Le){if(Le||(ae("boolean"==typeof ye,"missing or invalid endian"),ae(null!=Pe,"missing offset"),ae(Pe+1>>8*(Le?K:1-K)}function O(de,Pe,ye,Le,Xe){Xe||(ae(null!=Pe,"missing value"),ae("boolean"==typeof Le,"missing or invalid endian"),ae(null!=ye,"missing offset"),ae(ye+3>>8*(Le?K:3-K)&255}function F(de,Pe,ye,Le,Xe){Xe||(ae(null!=Pe,"missing value"),ae("boolean"==typeof Le,"missing or invalid endian"),ae(null!=ye,"missing offset"),ae(ye+1>8,ge.push(ie%256),ge.push(K);return ge}(Pe),de,ye,Le)}(this,de,Pe,ye);break;default:throw new Error("Unknown encoding")}return ie},i.prototype.toString=function(de,Pe,ye){var Le,Xe,ie,K,ce=this;if(de=String(de||"utf8").toLowerCase(),Pe=Number(Pe)||0,(ye=void 0!==ye?Number(ye):ye=ce.length)===Pe)return"";switch(de){case"hex":Le=function(ge,Oe,Ie){var ht=ge.length;(!Oe||Oe<0)&&(Oe=0),(!Ie||Ie<0||htthis.length&&(Le=this.length),de.length-Pe=this.length))return this[de]},i.prototype.readUInt16LE=function(de,Pe){return V(this,de,!0,Pe)},i.prototype.readUInt16BE=function(de,Pe){return V(this,de,!1,Pe)},i.prototype.readUInt32LE=function(de,Pe){return B(this,de,!0,Pe)},i.prototype.readUInt32BE=function(de,Pe){return B(this,de,!1,Pe)},i.prototype.readInt8=function(de,Pe){if(Pe||(ae(null!=de,"missing offset"),ae(de=this.length))return 128&this[de]?-1*(255-this[de]+1):this[de]},i.prototype.readInt16LE=function(de,Pe){return j(this,de,!0,Pe)},i.prototype.readInt16BE=function(de,Pe){return j(this,de,!1,Pe)},i.prototype.readInt32LE=function(de,Pe){return re(this,de,!0,Pe)},i.prototype.readInt32BE=function(de,Pe){return re(this,de,!1,Pe)},i.prototype.readFloatLE=function(de,Pe){return z(this,de,!0,Pe)},i.prototype.readFloatBE=function(de,Pe){return z(this,de,!1,Pe)},i.prototype.readDoubleLE=function(de,Pe){return H(this,de,!0,Pe)},i.prototype.readDoubleBE=function(de,Pe){return H(this,de,!1,Pe)},i.prototype.writeUInt8=function(de,Pe,ye){ye||(ae(null!=de,"missing value"),ae(null!=Pe,"missing offset"),ae(Pe=this.length||(this[Pe]=de)},i.prototype.writeUInt16LE=function(de,Pe,ye){U(this,de,Pe,!0,ye)},i.prototype.writeUInt16BE=function(de,Pe,ye){U(this,de,Pe,!1,ye)},i.prototype.writeUInt32LE=function(de,Pe,ye){O(this,de,Pe,!0,ye)},i.prototype.writeUInt32BE=function(de,Pe,ye){O(this,de,Pe,!1,ye)},i.prototype.writeInt8=function(de,Pe,ye){ye||(ae(null!=de,"missing value"),ae(null!=Pe,"missing offset"),ae(Pe=this.length||this.writeUInt8(0<=de?de:255+de+1,Pe,ye)},i.prototype.writeInt16LE=function(de,Pe,ye){F(this,de,Pe,!0,ye)},i.prototype.writeInt16BE=function(de,Pe,ye){F(this,de,Pe,!1,ye)},i.prototype.writeInt32LE=function(de,Pe,ye){k(this,de,Pe,!0,ye)},i.prototype.writeInt32BE=function(de,Pe,ye){k(this,de,Pe,!1,ye)},i.prototype.writeFloatLE=function(de,Pe,ye){$(this,de,Pe,!0,ye)},i.prototype.writeFloatBE=function(de,Pe,ye){$(this,de,Pe,!1,ye)},i.prototype.writeDoubleLE=function(de,Pe,ye){ne(this,de,Pe,!0,ye)},i.prototype.writeDoubleBE=function(de,Pe,ye){ne(this,de,Pe,!1,ye)},i.prototype.fill=function(de,Pe,ye){if(Pe=Pe||0,ye=ye||this.length,"string"==typeof(de=de||0)&&(de=de.charCodeAt(0)),ae("number"==typeof de&&!isNaN(de),"value is not a number"),ae(Pe<=ye,"end < start"),ye!==Pe&&0!==this.length){ae(0<=Pe&&Pe"},i.prototype.toArrayBuffer=function(){if(typeof Uint8Array>"u")throw new Error("Buffer.toArrayBuffer not supported in this browser");if(i._useTypedArrays)return new i(this).buffer;for(var de=new Uint8Array(this.length),Pe=0,ye=de.length;Pe=Pe.length||Xe>=de.length);Xe++)Pe[Xe+ye]=de[Xe];return Xe}function J(de){try{return decodeURIComponent(de)}catch{return"\ufffd"}}function W(de,Pe){ae("number"==typeof de,"cannot write a non-number as a number"),ae(0<=de,"specified a negative value for writing an unsigned value"),ae(de<=Pe,"value is larger than maximum value for type"),ae(Math.floor(de)===de,"value has a fractional component")}function ee(de,Pe,ye){ae("number"==typeof de,"cannot write a non-number as a number"),ae(de<=Pe,"value larger than maximum allowed value"),ae(ye<=de,"value smaller than minimum allowed value"),ae(Math.floor(de)===de,"value has a fractional component")}function X(de,Pe,ye){ae("number"==typeof de,"cannot write a non-number as a number"),ae(de<=Pe,"value larger than maximum allowed value"),ae(ye<=de,"value smaller than minimum allowed value")}function ae(de,Pe){if(!de)throw new Error(Pe||"Failed assertion")}i._augment=function(de){return de._isBuffer=!0,de._get=de.get,de._set=de.set,de.get=te.get,de.set=te.set,de.write=te.write,de.toString=te.toString,de.toLocaleString=te.toString,de.toJSON=te.toJSON,de.copy=te.copy,de.slice=te.slice,de.readUInt8=te.readUInt8,de.readUInt16LE=te.readUInt16LE,de.readUInt16BE=te.readUInt16BE,de.readUInt32LE=te.readUInt32LE,de.readUInt32BE=te.readUInt32BE,de.readInt8=te.readInt8,de.readInt16LE=te.readInt16LE,de.readInt16BE=te.readInt16BE,de.readInt32LE=te.readInt32LE,de.readInt32BE=te.readInt32BE,de.readFloatLE=te.readFloatLE,de.readFloatBE=te.readFloatBE,de.readDoubleLE=te.readDoubleLE,de.readDoubleBE=te.readDoubleBE,de.writeUInt8=te.writeUInt8,de.writeUInt16LE=te.writeUInt16LE,de.writeUInt16BE=te.writeUInt16BE,de.writeUInt32LE=te.writeUInt32LE,de.writeUInt32BE=te.writeUInt32BE,de.writeInt8=te.writeInt8,de.writeInt16LE=te.writeInt16LE,de.writeInt16BE=te.writeInt16BE,de.writeInt32LE=te.writeInt32LE,de.writeInt32BE=te.writeInt32BE,de.writeFloatLE=te.writeFloatLE,de.writeFloatBE=te.writeFloatBE,de.writeDoubleLE=te.writeDoubleLE,de.writeDoubleBE=te.writeDoubleBE,de.fill=te.fill,de.inspect=te.inspect,de.toArrayBuffer=te.toArrayBuffer,de}}).call(this,I("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},I("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/buffer/index.js","/node_modules/gulp-browserify/node_modules/buffer")},{"base64-js":2,buffer:3,ieee754:11,lYpoI2:10}],4:[function(I,f,r){(function(s,v,_,g,E,T,x,M,y){_=I("buffer").Buffer;var c=new _(4);c.fill(0),f.exports={hash:function(i,h,A,P){return _.isBuffer(i)||(i=new _(i)),function(V,B,j){for(var re=new _(B),z=j?re.writeInt32BE:re.writeInt32LE,H=0;HA?$=k($):$.length>5]|=128<>>9<<4)]=re;for(var z=1732584193,H=-271733879,U=-1732584194,O=271733878,F=0;F>>32-k,z);var F,k}function h(j,re,z,H,U,O,F){return i(re&z|~re&H,j,re,U,O,F)}function A(j,re,z,H,U,O,F){return i(re&H|z&~H,j,re,U,O,F)}function P(j,re,z,H,U,O,F){return i(re^z^H,j,re,U,O,F)}function V(j,re,z,H,U,O,F){return i(z^(re|~H),j,re,U,O,F)}function B(j,re){var z=(65535&j)+(65535&re);return(j>>16)+(re>>16)+(z>>16)<<16|65535&z}f.exports=function(j){return b.hash(j,c,16)}}).call(this,I("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},I("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/md5.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:3,lYpoI2:10}],7:[function(I,f,r){(function(s,v,_,g,E,T,x,M,y){f.exports=function(i){for(var h,A=new Array(i),P=0;P>>((3&P)<<3)&255;return A}}).call(this,I("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},I("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/rng.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{buffer:3,lYpoI2:10}],8:[function(I,f,r){(function(s,v,_,g,E,T,x,M,y){var b=I("./helpers");function c(P,V){P[V>>5]|=128<<24-V%32,P[15+(V+64>>9<<4)]=V;for(var B,j=Array(80),re=1732584193,z=-271733879,H=-1732584194,U=271733878,O=-1009589776,F=0;F>16)+(V>>16)+(B>>16)<<16|65535&B}function A(P,V){return P<>>32-V}f.exports=function(P){return b.hash(P,c,20,!0)}}).call(this,I("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},I("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/sha.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:3,lYpoI2:10}],9:[function(I,f,r){(function(s,v,_,g,E,T,x,M,y){function b(P,V){var B=(65535&P)+(65535&V);return(P>>16)+(V>>16)+(B>>16)<<16|65535&B}function c(P,V){return P>>>V|P<<32-V}function i(P,V){return P>>>V}function h(P,V){var B,j,re,z,H,U,O,F,k,$,ne,te,Z,se,fe,Se,pe,we,q=new Array(1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298),J=new Array(1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225),W=new Array(64);P[V>>5]|=128<<24-V%32,P[15+(V+64>>9<<4)]=V;for(var ee=0;ee>1,z=-7,H=i?A-1:0,U=i?-1:1,O=b[c+H];for(H+=U,P=O&(1<<-z)-1,O>>=-z,z+=B;0>=-z,z+=h;0>1,U=23===A?Math.pow(2,-24)-Math.pow(2,-77):0,O=h?0:P-1,F=h?1:-1,k=c<0||0===c&&1/c<0?1:0;for(c=Math.abs(c),isNaN(c)||c===1/0?(B=isNaN(c)?1:0,V=z):(V=Math.floor(Math.log(c)/Math.LN2),c*(j=Math.pow(2,-V))<1&&(V--,j*=2),2<=(c+=1<=V+H?U/j:U*Math.pow(2,1-H))*j&&(V++,j/=2),z<=V+H?(B=0,V=z):1<=V+H?(B=(c*j-1)*Math.pow(2,A),V+=H):(B=c*Math.pow(2,H-1)*Math.pow(2,A),V=0));8<=A;b[i+O]=255&B,O+=F,B/=256,A-=8);for(V=V<{"use strict";vt.exports=f(26222)},26222:(vt,I,f)=>{"use strict";var r=I;function s(){r.util._configure(),r.Writer._configure(r.BufferWriter),r.Reader._configure(r.BufferReader)}r.build="minimal",r.Writer=f(60973),r.BufferWriter=f(72038),r.Reader=f(57249),r.BufferReader=f(58),r.util=f(75014),r.rpc=f(84043),r.roots=f(60653),r.configure=s,s()},57249:(vt,I,f)=>{"use strict";vt.exports=E;var s,r=f(75014),v=r.LongBits,_=r.utf8;function g(c,i){return RangeError("index out of range: "+c.pos+" + "+(i||1)+" > "+c.len)}function E(c){this.buf=c,this.pos=0,this.len=c.length}var T=typeof Uint8Array<"u"?function(i){if(i instanceof Uint8Array||Array.isArray(i))return new E(i);throw Error("illegal buffer")}:function(i){if(Array.isArray(i))return new E(i);throw Error("illegal buffer")},x=function(){return r.Buffer?function(h){return(E.create=function(P){return r.Buffer.isBuffer(P)?new s(P):T(P)})(h)}:T};function M(){var c=new v(0,0),i=0;if(!(this.len-this.pos>4)){for(;i<3;++i){if(this.pos>=this.len)throw g(this);if(c.lo=(c.lo|(127&this.buf[this.pos])<<7*i)>>>0,this.buf[this.pos++]<128)return c}return c.lo=(c.lo|(127&this.buf[this.pos++])<<7*i)>>>0,c}for(;i<4;++i)if(c.lo=(c.lo|(127&this.buf[this.pos])<<7*i)>>>0,this.buf[this.pos++]<128)return c;if(c.lo=(c.lo|(127&this.buf[this.pos])<<28)>>>0,c.hi=(c.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return c;if(i=0,this.len-this.pos>4){for(;i<5;++i)if(c.hi=(c.hi|(127&this.buf[this.pos])<<7*i+3)>>>0,this.buf[this.pos++]<128)return c}else for(;i<5;++i){if(this.pos>=this.len)throw g(this);if(c.hi=(c.hi|(127&this.buf[this.pos])<<7*i+3)>>>0,this.buf[this.pos++]<128)return c}throw Error("invalid varint encoding")}function y(c,i){return(c[i-4]|c[i-3]<<8|c[i-2]<<16|c[i-1]<<24)>>>0}function b(){if(this.pos+8>this.len)throw g(this,8);return new v(y(this.buf,this.pos+=4),y(this.buf,this.pos+=4))}E.create=x(),E.prototype._slice=r.Array.prototype.subarray||r.Array.prototype.slice,E.prototype.uint32=function(){var i=4294967295;return function(){if(i=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128||(i=(i|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)||(i=(i|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)||(i=(i|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)||(i=(i|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128))return i;if((this.pos+=5)>this.len)throw this.pos=this.len,g(this,10);return i}}(),E.prototype.int32=function(){return 0|this.uint32()},E.prototype.sint32=function(){var i=this.uint32();return i>>>1^-(1&i)},E.prototype.bool=function(){return 0!==this.uint32()},E.prototype.fixed32=function(){if(this.pos+4>this.len)throw g(this,4);return y(this.buf,this.pos+=4)},E.prototype.sfixed32=function(){if(this.pos+4>this.len)throw g(this,4);return 0|y(this.buf,this.pos+=4)},E.prototype.float=function(){if(this.pos+4>this.len)throw g(this,4);var i=r.float.readFloatLE(this.buf,this.pos);return this.pos+=4,i},E.prototype.double=function(){if(this.pos+8>this.len)throw g(this,4);var i=r.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,i},E.prototype.bytes=function(){var i=this.uint32(),h=this.pos,A=this.pos+i;if(A>this.len)throw g(this,i);if(this.pos+=i,Array.isArray(this.buf))return this.buf.slice(h,A);if(h===A){var P=r.Buffer;return P?P.alloc(0):new this.buf.constructor(0)}return this._slice.call(this.buf,h,A)},E.prototype.string=function(){var i=this.bytes();return _.read(i,0,i.length)},E.prototype.skip=function(i){if("number"==typeof i){if(this.pos+i>this.len)throw g(this,i);this.pos+=i}else do{if(this.pos>=this.len)throw g(this)}while(128&this.buf[this.pos++]);return this},E.prototype.skipType=function(c){switch(c){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;4!=(c=7&this.uint32());)this.skipType(c);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+c+" at offset "+this.pos)}return this},E._configure=function(c){s=c,E.create=x(),s._configure();var i=r.Long?"toLong":"toNumber";r.merge(E.prototype,{int64:function(){return M.call(this)[i](!1)},uint64:function(){return M.call(this)[i](!0)},sint64:function(){return M.call(this).zzDecode()[i](!1)},fixed64:function(){return b.call(this)[i](!0)},sfixed64:function(){return b.call(this)[i](!1)}})}},58:(vt,I,f)=>{"use strict";vt.exports=v;var r=f(57249);(v.prototype=Object.create(r.prototype)).constructor=v;var s=f(75014);function v(_){r.call(this,_)}v._configure=function(){s.Buffer&&(v.prototype._slice=s.Buffer.prototype.slice)},v.prototype.string=function(){var g=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+g,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+g,this.len))},v._configure()},60653:vt=>{"use strict";vt.exports={}},84043:(vt,I,f)=>{"use strict";I.Service=f(11423)},11423:(vt,I,f)=>{"use strict";vt.exports=s;var r=f(75014);function s(v,_,g){if("function"!=typeof v)throw TypeError("rpcImpl must be a function");r.EventEmitter.call(this),this.rpcImpl=v,this.requestDelimited=!!_,this.responseDelimited=!!g}(s.prototype=Object.create(r.EventEmitter.prototype)).constructor=s,s.prototype.rpcCall=function v(_,g,E,T,x){if(!T)throw TypeError("request must be specified");var M=this;if(!x)return r.asPromise(v,M,_,g,E,T);if(M.rpcImpl)try{return M.rpcImpl(_,g[M.requestDelimited?"encodeDelimited":"encode"](T).finish(),function(b,c){if(b)return M.emit("error",b,_),x(b);if(null!==c){if(!(c instanceof E))try{c=E[M.responseDelimited?"decodeDelimited":"decode"](c)}catch(i){return M.emit("error",i,_),x(i)}return M.emit("data",c,_),x(null,c)}M.end(!0)})}catch(y){return M.emit("error",y,_),void setTimeout(function(){x(y)},0)}else setTimeout(function(){x(Error("already ended"))},0)},s.prototype.end=function(_){return this.rpcImpl&&(_||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}},91995:(vt,I,f)=>{"use strict";vt.exports=s;var r=f(75014);function s(E,T){this.lo=E>>>0,this.hi=T>>>0}var v=s.zero=new s(0,0);v.toNumber=function(){return 0},v.zzEncode=v.zzDecode=function(){return this},v.length=function(){return 1};var _=s.zeroHash="\0\0\0\0\0\0\0\0";s.fromNumber=function(T){if(0===T)return v;var x=T<0;x&&(T=-T);var M=T>>>0,y=(T-M)/4294967296>>>0;return x&&(y=~y>>>0,M=~M>>>0,++M>4294967295&&(M=0,++y>4294967295&&(y=0))),new s(M,y)},s.from=function(T){if("number"==typeof T)return s.fromNumber(T);if(r.isString(T)){if(!r.Long)return s.fromNumber(parseInt(T,10));T=r.Long.fromString(T)}return T.low||T.high?new s(T.low>>>0,T.high>>>0):v},s.prototype.toNumber=function(T){if(!T&&this.hi>>>31){var x=1+~this.lo>>>0,M=~this.hi>>>0;return x||(M=M+1>>>0),-(x+4294967296*M)}return this.lo+4294967296*this.hi},s.prototype.toLong=function(T){return r.Long?new r.Long(0|this.lo,0|this.hi,!!T):{low:0|this.lo,high:0|this.hi,unsigned:!!T}};var g=String.prototype.charCodeAt;s.fromHash=function(T){return T===_?v:new s((g.call(T,0)|g.call(T,1)<<8|g.call(T,2)<<16|g.call(T,3)<<24)>>>0,(g.call(T,4)|g.call(T,5)<<8|g.call(T,6)<<16|g.call(T,7)<<24)>>>0)},s.prototype.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},s.prototype.zzEncode=function(){var T=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^T)>>>0,this.lo=(this.lo<<1^T)>>>0,this},s.prototype.zzDecode=function(){var T=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^T)>>>0,this.hi=(this.hi>>>1^T)>>>0,this},s.prototype.length=function(){var T=this.lo,x=(this.lo>>>28|this.hi<<4)>>>0,M=this.hi>>>24;return 0===M?0===x?T<16384?T<128?1:2:T<2097152?3:4:x<16384?x<128?5:6:x<2097152?7:8:M<128?9:10}},75014:function(vt,I,f){"use strict";var r=I;function s(_,g,E){for(var T=Object.keys(g),x=0;x0)},r.Buffer=function(){try{var _=r.inquire("buffer").Buffer;return _.prototype.utf8Write?_:null}catch{return null}}(),r._Buffer_from=null,r._Buffer_allocUnsafe=null,r.newBuffer=function(g){return"number"==typeof g?r.Buffer?r._Buffer_allocUnsafe(g):new r.Array(g):r.Buffer?r._Buffer_from(g):typeof Uint8Array>"u"?g:new Uint8Array(g)},r.Array=typeof Uint8Array<"u"?Uint8Array:Array,r.Long=r.global.dcodeIO&&r.global.dcodeIO.Long||r.global.Long||r.inquire("long"),r.key2Re=/^true|false|0|1$/,r.key32Re=/^-?(?:0|[1-9][0-9]*)$/,r.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,r.longToHash=function(g){return g?r.LongBits.from(g).toHash():r.LongBits.zeroHash},r.longFromHash=function(g,E){var T=r.LongBits.fromHash(g);return r.Long?r.Long.fromBits(T.lo,T.hi,E):T.toNumber(!!E)},r.merge=s,r.lcFirst=function(g){return g.charAt(0).toLowerCase()+g.substring(1)},r.newError=v,r.ProtocolError=v("ProtocolError"),r.oneOfGetter=function(g){for(var E={},T=0;T-1;--M)if(1===E[x[M]]&&null!=this[x[M]])return x[M]}},r.oneOfSetter=function(g){return function(E){for(var T=0;T{"use strict";vt.exports=M;var s,r=f(75014),v=r.LongBits,_=r.base64,g=r.utf8;function E(V,B,j){this.fn=V,this.len=B,this.next=void 0,this.val=j}function T(){}function x(V){this.head=V.head,this.tail=V.tail,this.len=V.len,this.next=V.states}function M(){this.len=0,this.head=new E(T,0,0),this.tail=this.head,this.states=null}var y=function(){return r.Buffer?function(){return(M.create=function(){return new s})()}:function(){return new M}};function b(V,B,j){B[j]=255&V}function i(V,B){this.len=V,this.next=void 0,this.val=B}function h(V,B,j){for(;V.hi;)B[j++]=127&V.lo|128,V.lo=(V.lo>>>7|V.hi<<25)>>>0,V.hi>>>=7;for(;V.lo>127;)B[j++]=127&V.lo|128,V.lo=V.lo>>>7;B[j++]=V.lo}function A(V,B,j){B[j]=255&V,B[j+1]=V>>>8&255,B[j+2]=V>>>16&255,B[j+3]=V>>>24}M.create=y(),M.alloc=function(B){return new r.Array(B)},r.Array!==Array&&(M.alloc=r.pool(M.alloc,r.Array.prototype.subarray)),M.prototype._push=function(B,j,re){return this.tail=this.tail.next=new E(B,j,re),this.len+=j,this},(i.prototype=Object.create(E.prototype)).fn=function c(V,B,j){for(;V>127;)B[j++]=127&V|128,V>>>=7;B[j]=V},M.prototype.uint32=function(B){return this.len+=(this.tail=this.tail.next=new i((B>>>=0)<128?1:B<16384?2:B<2097152?3:B<268435456?4:5,B)).len,this},M.prototype.int32=function(B){return B<0?this._push(h,10,v.fromNumber(B)):this.uint32(B)},M.prototype.sint32=function(B){return this.uint32((B<<1^B>>31)>>>0)},M.prototype.int64=M.prototype.uint64=function(B){var j=v.from(B);return this._push(h,j.length(),j)},M.prototype.sint64=function(B){var j=v.from(B).zzEncode();return this._push(h,j.length(),j)},M.prototype.bool=function(B){return this._push(b,1,B?1:0)},M.prototype.sfixed32=M.prototype.fixed32=function(B){return this._push(A,4,B>>>0)},M.prototype.sfixed64=M.prototype.fixed64=function(B){var j=v.from(B);return this._push(A,4,j.lo)._push(A,4,j.hi)},M.prototype.float=function(B){return this._push(r.float.writeFloatLE,4,B)},M.prototype.double=function(B){return this._push(r.float.writeDoubleLE,8,B)};var P=r.Array.prototype.set?function(B,j,re){j.set(B,re)}:function(B,j,re){for(var z=0;z>>0;if(!j)return this._push(b,1,0);if(r.isString(B)){var re=M.alloc(j=_.length(B));_.decode(B,re,0),B=re}return this.uint32(j)._push(P,j,B)},M.prototype.string=function(B){var j=g.length(B);return j?this.uint32(j)._push(g.write,j,B):this._push(b,1,0)},M.prototype.fork=function(){return this.states=new x(this),this.head=this.tail=new E(T,0,0),this.len=0,this},M.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new E(T,0,0),this.len=0),this},M.prototype.ldelim=function(){var B=this.head,j=this.tail,re=this.len;return this.reset().uint32(re),re&&(this.tail.next=B.next,this.tail=j,this.len+=re),this},M.prototype.finish=function(){for(var B=this.head.next,j=this.constructor.alloc(this.len),re=0;B;)B.fn(B.val,j,re),re+=B.len,B=B.next;return j},M._configure=function(V){s=V,M.create=y(),s._configure()}},72038:(vt,I,f)=>{"use strict";vt.exports=v;var r=f(60973);(v.prototype=Object.create(r.prototype)).constructor=v;var s=f(75014);function v(){r.call(this)}function _(g,E,T){g.length<40?s.utf8.write(g,E,T):E.utf8Write?E.utf8Write(g,T):E.write(g,T)}v._configure=function(){v.alloc=s._Buffer_allocUnsafe,v.writeBytesBuffer=s.Buffer&&s.Buffer.prototype instanceof Uint8Array&&"set"===s.Buffer.prototype.set.name?function(E,T,x){T.set(E,x)}:function(E,T,x){if(E.copy)E.copy(T,x,0,E.length);else for(var M=0;M>>0;return this.uint32(T),T&&this._push(v.writeBytesBuffer,T,E),this},v.prototype.string=function(E){var T=s.Buffer.byteLength(E);return this.uint32(T),T&&this._push(_,T,E),this},v._configure()},85667:(vt,I,f)=>{const s=f(56281),v=f(92649),_=f(36967),g=f(66288);function E(T,x,M,y,b){const c=[].slice.call(arguments,1),i=c.length,h="function"==typeof c[i-1];if(!h&&!s())throw new Error("Callback required as last argument");if(!h){if(i<1)throw new Error("Too few arguments provided");return 1===i?(M=x,x=y=void 0):2===i&&!x.getContext&&(y=M,M=x,x=void 0),new Promise(function(A,P){try{const V=v.create(M,y);A(T(V,x,y))}catch(V){P(V)}})}if(i<2)throw new Error("Too few arguments provided");2===i?(b=M,M=x,x=y=void 0):3===i&&(x.getContext&&typeof b>"u"?(b=y,y=void 0):(b=y,y=M,M=x,x=void 0));try{const A=v.create(M,y);b(null,T(A,x,y))}catch(A){b(A)}}I.mo=E.bind(null,_.render),I.dY=E.bind(null,_.renderToDataURL),I.toString=E.bind(null,function(T,x,M){return g.render(T,M)})},56281:vt=>{vt.exports=function(){return"function"==typeof Promise&&Promise.prototype&&Promise.prototype.then}},68817:(vt,I,f)=>{const r=f(17610).getSymbolSize;I.getRowColCoords=function(v){if(1===v)return[];const _=Math.floor(v/7)+2,g=r(v),E=145===g?26:2*Math.ceil((g-13)/(2*_-2)),T=[g-7];for(let x=1;x<_-1;x++)T[x]=T[x-1]-E;return T.push(6),T.reverse()},I.getPositions=function(v){const _=[],g=I.getRowColCoords(v),E=g.length;for(let T=0;T{const r=f(7092),s=["0","1","2","3","4","5","6","7","8","9","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"," ","$","%","*","+","-",".","/",":"];function v(_){this.mode=r.ALPHANUMERIC,this.data=_}v.getBitsLength=function(g){return 11*Math.floor(g/2)+g%2*6},v.prototype.getLength=function(){return this.data.length},v.prototype.getBitsLength=function(){return v.getBitsLength(this.data.length)},v.prototype.write=function(g){let E;for(E=0;E+2<=this.data.length;E+=2){let T=45*s.indexOf(this.data[E]);T+=s.indexOf(this.data[E+1]),g.put(T,11)}this.data.length%2&&g.put(s.indexOf(this.data[E]),6)},vt.exports=v},71535:vt=>{function I(){this.buffer=[],this.length=0}I.prototype={get:function(f){const r=Math.floor(f/8);return 1==(this.buffer[r]>>>7-f%8&1)},put:function(f,r){for(let s=0;s>>r-s-1&1))},getLengthInBits:function(){return this.length},putBit:function(f){const r=Math.floor(this.length/8);this.buffer.length<=r&&this.buffer.push(0),f&&(this.buffer[r]|=128>>>this.length%8),this.length++}},vt.exports=I},37672:vt=>{function I(f){if(!f||f<1)throw new Error("BitMatrix size must be defined and greater than 0");this.size=f,this.data=new Uint8Array(f*f),this.reservedBit=new Uint8Array(f*f)}I.prototype.set=function(f,r,s,v){const _=f*this.size+r;this.data[_]=s,v&&(this.reservedBit[_]=!0)},I.prototype.get=function(f,r){return this.data[f*this.size+r]},I.prototype.xor=function(f,r,s){this.data[f*this.size+r]^=s},I.prototype.isReserved=function(f,r){return this.reservedBit[f*this.size+r]},vt.exports=I},19138:(vt,I,f)=>{const r=f(30741),s=f(7092);function v(_){this.mode=s.BYTE,"string"==typeof _&&(_=r(_)),this.data=new Uint8Array(_)}v.getBitsLength=function(g){return 8*g},v.prototype.getLength=function(){return this.data.length},v.prototype.getBitsLength=function(){return v.getBitsLength(this.data.length)},v.prototype.write=function(_){for(let g=0,E=this.data.length;g{const r=f(89605),s=[1,1,1,1,1,1,1,1,1,1,2,2,1,2,2,4,1,2,4,4,2,4,4,4,2,4,6,5,2,4,6,6,2,5,8,8,4,5,8,8,4,5,8,11,4,8,10,11,4,9,12,16,4,9,16,16,6,10,12,18,6,10,17,16,6,11,16,19,6,13,18,21,7,14,21,25,8,16,20,25,8,17,23,25,9,17,23,34,9,18,25,30,10,20,27,32,12,21,29,35,12,23,34,37,12,25,34,40,13,26,35,42,14,28,38,45,15,29,40,48,16,31,43,51,17,33,45,54,18,35,48,57,19,37,51,60,19,38,53,63,20,40,56,66,21,43,59,70,22,45,62,74,24,47,65,77,25,49,68,81],v=[7,10,13,17,10,16,22,28,15,26,36,44,20,36,52,64,26,48,72,88,36,64,96,112,40,72,108,130,48,88,132,156,60,110,160,192,72,130,192,224,80,150,224,264,96,176,260,308,104,198,288,352,120,216,320,384,132,240,360,432,144,280,408,480,168,308,448,532,180,338,504,588,196,364,546,650,224,416,600,700,224,442,644,750,252,476,690,816,270,504,750,900,300,560,810,960,312,588,870,1050,336,644,952,1110,360,700,1020,1200,390,728,1050,1260,420,784,1140,1350,450,812,1200,1440,480,868,1290,1530,510,924,1350,1620,540,980,1440,1710,570,1036,1530,1800,570,1064,1590,1890,600,1120,1680,1980,630,1204,1770,2100,660,1260,1860,2220,720,1316,1950,2310,750,1372,2040,2430];I.getBlocksCount=function(g,E){switch(E){case r.L:return s[4*(g-1)+0];case r.M:return s[4*(g-1)+1];case r.Q:return s[4*(g-1)+2];case r.H:return s[4*(g-1)+3];default:return}},I.getTotalCodewordsCount=function(g,E){switch(E){case r.L:return v[4*(g-1)+0];case r.M:return v[4*(g-1)+1];case r.Q:return v[4*(g-1)+2];case r.H:return v[4*(g-1)+3];default:return}}},89605:(vt,I)=>{I.L={bit:1},I.M={bit:0},I.Q={bit:3},I.H={bit:2},I.isValid=function(s){return s&&typeof s.bit<"u"&&s.bit>=0&&s.bit<4},I.from=function(s,v){if(I.isValid(s))return s;try{return function f(r){if("string"!=typeof r)throw new Error("Param is not a string");switch(r.toLowerCase()){case"l":case"low":return I.L;case"m":case"medium":return I.M;case"q":case"quartile":return I.Q;case"h":case"high":return I.H;default:throw new Error("Unknown EC Level: "+r)}}(s)}catch{return v}}},30008:(vt,I,f)=>{const r=f(17610).getSymbolSize;I.getPositions=function(_){const g=r(_);return[[0,0],[g-7,0],[0,g-7]]}},44321:(vt,I,f)=>{const r=f(17610),_=r.getBCHDigit(1335);I.getEncodedBits=function(E,T){const x=E.bit<<3|T;let M=x<<10;for(;r.getBCHDigit(M)-_>=0;)M^=1335<{const f=new Uint8Array(512),r=new Uint8Array(256);(function(){let v=1;for(let _=0;_<255;_++)f[_]=v,r[v]=_,v<<=1,256&v&&(v^=285);for(let _=255;_<512;_++)f[_]=f[_-255]})(),I.log=function(v){if(v<1)throw new Error("log("+v+")");return r[v]},I.exp=function(v){return f[v]},I.mul=function(v,_){return 0===v||0===_?0:f[r[v]+r[_]]}},8897:(vt,I,f)=>{const r=f(7092),s=f(17610);function v(_){this.mode=r.KANJI,this.data=_}v.getBitsLength=function(g){return 13*g},v.prototype.getLength=function(){return this.data.length},v.prototype.getBitsLength=function(){return v.getBitsLength(this.data.length)},v.prototype.write=function(_){let g;for(g=0;g=33088&&E<=40956)E-=33088;else{if(!(E>=57408&&E<=60351))throw new Error("Invalid SJIS character: "+this.data[g]+"\nMake sure your charset is UTF-8");E-=49472}E=192*(E>>>8&255)+(255&E),_.put(E,13)}},vt.exports=v},43800:(vt,I)=>{I.Patterns={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7};function r(s,v,_){switch(s){case I.Patterns.PATTERN000:return(v+_)%2==0;case I.Patterns.PATTERN001:return v%2==0;case I.Patterns.PATTERN010:return _%3==0;case I.Patterns.PATTERN011:return(v+_)%3==0;case I.Patterns.PATTERN100:return(Math.floor(v/2)+Math.floor(_/3))%2==0;case I.Patterns.PATTERN101:return v*_%2+v*_%3==0;case I.Patterns.PATTERN110:return(v*_%2+v*_%3)%2==0;case I.Patterns.PATTERN111:return(v*_%3+(v+_)%2)%2==0;default:throw new Error("bad maskPattern:"+s)}}I.isValid=function(v){return null!=v&&""!==v&&!isNaN(v)&&v>=0&&v<=7},I.from=function(v){return I.isValid(v)?parseInt(v,10):void 0},I.getPenaltyN1=function(v){const _=v.size;let g=0,E=0,T=0,x=null,M=null;for(let y=0;y<_;y++){E=T=0,x=M=null;for(let b=0;b<_;b++){let c=v.get(y,b);c===x?E++:(E>=5&&(g+=E-5+3),x=c,E=1),c=v.get(b,y),c===M?T++:(T>=5&&(g+=T-5+3),M=c,T=1)}E>=5&&(g+=E-5+3),T>=5&&(g+=T-5+3)}return g},I.getPenaltyN2=function(v){const _=v.size;let g=0;for(let E=0;E<_-1;E++)for(let T=0;T<_-1;T++){const x=v.get(E,T)+v.get(E,T+1)+v.get(E+1,T)+v.get(E+1,T+1);(4===x||0===x)&&g++}return 3*g},I.getPenaltyN3=function(v){const _=v.size;let g=0,E=0,T=0;for(let x=0;x<_;x++){E=T=0;for(let M=0;M<_;M++)E=E<<1&2047|v.get(x,M),M>=10&&(1488===E||93===E)&&g++,T=T<<1&2047|v.get(M,x),M>=10&&(1488===T||93===T)&&g++}return 40*g},I.getPenaltyN4=function(v){let _=0;const g=v.data.length;for(let T=0;T{const r=f(74242),s=f(94568);I.NUMERIC={id:"Numeric",bit:1,ccBits:[10,12,14]},I.ALPHANUMERIC={id:"Alphanumeric",bit:2,ccBits:[9,11,13]},I.BYTE={id:"Byte",bit:4,ccBits:[8,16,16]},I.KANJI={id:"Kanji",bit:8,ccBits:[8,10,12]},I.MIXED={bit:-1},I.getCharCountIndicator=function(g,E){if(!g.ccBits)throw new Error("Invalid mode: "+g);if(!r.isValid(E))throw new Error("Invalid version: "+E);return E>=1&&E<10?g.ccBits[0]:E<27?g.ccBits[1]:g.ccBits[2]},I.getBestModeForData=function(g){return s.testNumeric(g)?I.NUMERIC:s.testAlphanumeric(g)?I.ALPHANUMERIC:s.testKanji(g)?I.KANJI:I.BYTE},I.toString=function(g){if(g&&g.id)return g.id;throw new Error("Invalid mode")},I.isValid=function(g){return g&&g.bit&&g.ccBits},I.from=function(g,E){if(I.isValid(g))return g;try{return function v(_){if("string"!=typeof _)throw new Error("Param is not a string");switch(_.toLowerCase()){case"numeric":return I.NUMERIC;case"alphanumeric":return I.ALPHANUMERIC;case"kanji":return I.KANJI;case"byte":return I.BYTE;default:throw new Error("Unknown mode: "+_)}}(g)}catch{return E}}},69569:(vt,I,f)=>{const r=f(7092);function s(v){this.mode=r.NUMERIC,this.data=v.toString()}s.getBitsLength=function(_){return 10*Math.floor(_/3)+(_%3?_%3*3+1:0)},s.prototype.getLength=function(){return this.data.length},s.prototype.getBitsLength=function(){return s.getBitsLength(this.data.length)},s.prototype.write=function(_){let g,E,T;for(g=0;g+3<=this.data.length;g+=3)E=this.data.substr(g,3),T=parseInt(E,10),_.put(T,10);const x=this.data.length-g;x>0&&(E=this.data.substr(g),T=parseInt(E,10),_.put(T,3*x+1))},vt.exports=s},84333:(vt,I,f)=>{const r=f(5199);I.mul=function(v,_){const g=new Uint8Array(v.length+_.length-1);for(let E=0;E=0;){const E=g[0];for(let x=0;x<_.length;x++)g[x]^=r.mul(_[x],E);let T=0;for(;T{const r=f(17610),s=f(89605),v=f(71535),_=f(37672),g=f(68817),E=f(30008),T=f(43800),x=f(16554),M=f(85968),y=f(11167),b=f(44321),c=f(7092),i=f(42765);function B(U,O,F){const k=U.size,$=b.getEncodedBits(O,F);let ne,te;for(ne=0;ne<15;ne++)te=1==($>>ne&1),U.set(ne<6?ne:ne<8?ne+1:k-15+ne,8,te,!0),U.set(8,ne<8?k-ne-1:ne<9?15-ne-1+1:15-ne-1,te,!0);U.set(k-8,8,1,!0)}function H(U,O,F,k){let $;if(Array.isArray(U))$=i.fromArray(U);else{if("string"!=typeof U)throw new Error("Invalid data");{let fe=O;if(!fe){const Se=i.rawSplit(U);fe=y.getBestVersionForData(Se,F)}$=i.fromString(U,fe||40)}}const ne=y.getBestVersionForData($,F);if(!ne)throw new Error("The amount of data is too big to be stored in a QR Code");if(O){if(O=0&&Z<=6&&(0===se||6===se)||se>=0&&se<=6&&(0===Z||6===Z)||Z>=2&&Z<=4&&se>=2&&se<=4,!0)}}(se,O),function A(U){const O=U.size;for(let F=8;F=7&&function V(U,O){const F=U.size,k=y.getEncodedBits(O);let $,ne,te;for(let Z=0;Z<18;Z++)$=Math.floor(Z/3),ne=Z%3+F-8-3,te=1==(k>>Z&1),U.set($,ne,te,!0),U.set(ne,$,te,!0)}(se,O),function j(U,O){const F=U.size;let k=-1,$=F-1,ne=7,te=0;for(let Z=F-1;Z>0;Z-=2)for(6===Z&&Z--;;){for(let se=0;se<2;se++)if(!U.isReserved($,Z-se)){let fe=!1;te>>ne&1)),U.set($,Z-se,fe),ne--,-1===ne&&(te++,ne=7)}if($+=k,$<0||F<=$){$-=k,k=-k;break}}}(se,te),isNaN(k)&&(k=T.getBestMask(se,B.bind(null,se,F))),T.applyMask(k,se),B(se,F,k),{modules:se,version:O,errorCorrectionLevel:F,maskPattern:k,segments:$}}I.create=function(O,F){if(typeof O>"u"||""===O)throw new Error("No input text");let $,ne,k=s.M;return typeof F<"u"&&(k=s.from(F.errorCorrectionLevel,s.M),$=y.from(F.version),ne=T.from(F.maskPattern),F.toSJISFunc&&r.setToSJISFunction(F.toSJISFunc)),H(O,$,k,ne)}},85968:(vt,I,f)=>{const r=f(84333);function s(v){this.genPoly=void 0,this.degree=v,this.degree&&this.initialize(this.degree)}s.prototype.initialize=function(_){this.degree=_,this.genPoly=r.generateECPolynomial(this.degree)},s.prototype.encode=function(_){if(!this.genPoly)throw new Error("Encoder not initialized");const g=new Uint8Array(_.length+this.degree);g.set(_);const E=r.mod(g,this.genPoly),T=this.degree-E.length;if(T>0){const x=new Uint8Array(this.degree);return x.set(E,T),x}return E},vt.exports=s},94568:(vt,I)=>{const f="[0-9]+";let s="(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+";s=s.replace(/u/g,"\\u");const v="(?:(?![A-Z0-9 $%*+\\-./:]|"+s+")(?:.|[\r\n]))+";I.KANJI=new RegExp(s,"g"),I.BYTE_KANJI=new RegExp("[^A-Z0-9 $%*+\\-./:]+","g"),I.BYTE=new RegExp(v,"g"),I.NUMERIC=new RegExp(f,"g"),I.ALPHANUMERIC=new RegExp("[A-Z $%*+\\-./:]+","g");const _=new RegExp("^"+s+"$"),g=new RegExp("^"+f+"$"),E=new RegExp("^[A-Z0-9 $%*+\\-./:]+$");I.testKanji=function(x){return _.test(x)},I.testNumeric=function(x){return g.test(x)},I.testAlphanumeric=function(x){return E.test(x)}},42765:(vt,I,f)=>{const r=f(7092),s=f(69569),v=f(61925),_=f(19138),g=f(8897),E=f(94568),T=f(17610),x=f(19884);function M(V){return unescape(encodeURIComponent(V)).length}function y(V,B,j){const re=[];let z;for(;null!==(z=V.exec(j));)re.push({data:z[0],index:z.index,mode:B,length:z[0].length});return re}function b(V){const B=y(E.NUMERIC,r.NUMERIC,V),j=y(E.ALPHANUMERIC,r.ALPHANUMERIC,V);let re,z;return T.isKanjiModeEnabled()?(re=y(E.BYTE,r.BYTE,V),z=y(E.KANJI,r.KANJI,V)):(re=y(E.BYTE_KANJI,r.BYTE,V),z=[]),B.concat(j,re,z).sort(function(U,O){return U.index-O.index}).map(function(U){return{data:U.data,mode:U.mode,length:U.length}})}function c(V,B){switch(B){case r.NUMERIC:return s.getBitsLength(V);case r.ALPHANUMERIC:return v.getBitsLength(V);case r.KANJI:return g.getBitsLength(V);case r.BYTE:return _.getBitsLength(V)}}function P(V,B){let j;const re=r.getBestModeForData(V);if(j=r.from(B,re),j!==r.BYTE&&j.bit=0?B[B.length-1]:null;return re&&re.mode===j.mode?(B[B.length-1].data+=j.data,B):(B.push(j),B)},[])}(O))},I.rawSplit=function(B){return I.fromArray(b(B,T.isKanjiModeEnabled()))}},17610:(vt,I)=>{let f;const r=[0,26,44,70,100,134,172,196,242,292,346,404,466,532,581,655,733,815,901,991,1085,1156,1258,1364,1474,1588,1706,1828,1921,2051,2185,2323,2465,2611,2761,2876,3034,3196,3362,3532,3706];I.getSymbolSize=function(v){if(!v)throw new Error('"version" cannot be null or undefined');if(v<1||v>40)throw new Error('"version" should be in range from 1 to 40');return 4*v+17},I.getSymbolTotalCodewords=function(v){return r[v]},I.getBCHDigit=function(s){let v=0;for(;0!==s;)v++,s>>>=1;return v},I.setToSJISFunction=function(v){if("function"!=typeof v)throw new Error('"toSJISFunc" is not a valid function.');f=v},I.isKanjiModeEnabled=function(){return typeof f<"u"},I.toSJIS=function(v){return f(v)}},74242:(vt,I)=>{I.isValid=function(r){return!isNaN(r)&&r>=1&&r<=40}},11167:(vt,I,f)=>{const r=f(17610),s=f(16554),v=f(89605),_=f(7092),g=f(74242),T=r.getBCHDigit(7973);function M(c,i){return _.getCharCountIndicator(c,i)+4}function y(c,i){let h=0;return c.forEach(function(A){const P=M(A.mode,i);h+=P+A.getBitsLength()}),h}I.from=function(i,h){return g.isValid(i)?parseInt(i,10):h},I.getCapacity=function(i,h,A){if(!g.isValid(i))throw new Error("Invalid QR Code version");typeof A>"u"&&(A=_.BYTE);const B=8*(r.getSymbolTotalCodewords(i)-s.getTotalCodewordsCount(i,h));if(A===_.MIXED)return B;const j=B-M(A,i);switch(A){case _.NUMERIC:return Math.floor(j/10*3);case _.ALPHANUMERIC:return Math.floor(j/11*2);case _.KANJI:return Math.floor(j/13);default:return Math.floor(j/8)}},I.getBestVersionForData=function(i,h){let A;const P=v.from(h,v.M);if(Array.isArray(i)){if(i.length>1)return function b(c,i){for(let h=1;h<=40;h++)if(y(c,h)<=I.getCapacity(h,i,_.MIXED))return h}(i,P);if(0===i.length)return 1;A=i[0]}else A=i;return function x(c,i,h){for(let A=1;A<=40;A++)if(i<=I.getCapacity(A,h,c))return A}(A.mode,A.getLength(),P)},I.getEncodedBits=function(i){if(!g.isValid(i)||i<7)throw new Error("Invalid QR Code version");let h=i<<12;for(;r.getBCHDigit(h)-T>=0;)h^=7973<{const r=f(41618);I.render=function(g,E,T){let x=T,M=E;typeof x>"u"&&(!E||!E.getContext)&&(x=E,E=void 0),E||(M=function v(){try{return document.createElement("canvas")}catch{throw new Error("You need to specify a canvas element")}}()),x=r.getOptions(x);const y=r.getImageWidth(g.modules.size,x),b=M.getContext("2d"),c=b.createImageData(y,y);return r.qrToImageData(c.data,g,x),function s(_,g,E){_.clearRect(0,0,g.width,g.height),g.style||(g.style={}),g.height=E,g.width=E,g.style.height=E+"px",g.style.width=E+"px"}(b,M,y),b.putImageData(c,0,0),M},I.renderToDataURL=function(g,E,T){let x=T;return typeof x>"u"&&(!E||!E.getContext)&&(x=E,E=void 0),x||(x={}),I.render(g,E,x).toDataURL(x.type||"image/png",(x.rendererOpts||{}).quality)}},66288:(vt,I,f)=>{const r=f(41618);function s(g,E){const T=g.a/255,x=E+'="'+g.hex+'"';return T<1?x+" "+E+'-opacity="'+T.toFixed(2).slice(1)+'"':x}function v(g,E,T){let x=g+E;return typeof T<"u"&&(x+=" "+T),x}I.render=function(E,T,x){const M=r.getOptions(T),y=E.modules.size,b=E.modules.data,c=y+2*M.margin,i=M.color.light.a?"':"",h="0&&i>0&&g[c-1]||(x+=y?v("M",i+T,.5+h+T):v("m",M,0),M=0,y=!1),i+1',V=''+i+h+"\n";return"function"==typeof x&&x(null,V),V}},41618:(vt,I)=>{function f(r){if("number"==typeof r&&(r=r.toString()),"string"!=typeof r)throw new Error("Color should be defined as hex string");let s=r.slice().replace("#","").split("");if(s.length<3||5===s.length||s.length>8)throw new Error("Invalid hex color: "+r);(3===s.length||4===s.length)&&(s=Array.prototype.concat.apply([],s.map(function(_){return[_,_]}))),6===s.length&&s.push("F","F");const v=parseInt(s.join(""),16);return{r:v>>24&255,g:v>>16&255,b:v>>8&255,a:255&v,hex:"#"+s.slice(0,6).join("")}}I.getOptions=function(s){s||(s={}),s.color||(s.color={});const _=s.width&&s.width>=21?s.width:void 0;return{width:_,scale:_?4:s.scale||4,margin:typeof s.margin>"u"||null===s.margin||s.margin<0?4:s.margin,color:{dark:f(s.color.dark||"#000000ff"),light:f(s.color.light||"#ffffffff")},type:s.type,rendererOpts:s.rendererOpts||{}}},I.getScale=function(s,v){return v.width&&v.width>=s+2*v.margin?v.width/(s+2*v.margin):v.scale},I.getImageWidth=function(s,v){const _=I.getScale(s,v);return Math.floor((s+2*v.margin)*_)},I.qrToImageData=function(s,v,_){const g=v.modules.size,E=v.modules.data,T=I.getScale(g,_),x=Math.floor((g+2*_.margin)*T),M=_.margin*T,y=[_.color.light,_.color.dark];for(let b=0;b=M&&c>=M&&b1&&void 0!==arguments[1]&&arguments[1],b=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,c=[];if(c.push({level:M,stream:new v.RawStream,type:"raw"}),b){var i=b.map(function(h){h.level=M});c=c.concat(i)}y&&(g=[],c.push({level:M,stream:{write:function(h){var A="["+h.time.toISOString()+"] "+s.nameFromLevel[h.level]+": "+h.msg;g.push(A)}}})),_=(0,s.createLogger)({level:M,name:"red5pro-sdk",streams:c})},f.getLogger=function(){return _},f.getRecordedLogs=function(){return g},f.trace=T(x.TRACE),f.info=T(x.INFO),f.debug=T(x.DEBUG),f.warn=T(x.WARN),f.error=T(x.ERROR),f.fatal=T(x.FATAL)},function(I,f,r){I.exports={default:r(163),__esModule:!0}},function(I,f){var r=I.exports={version:"2.4.0"};"number"==typeof __e&&(__e=r)},function(I,f,r){"use strict";function s(M){return M&&M.__esModule?M:{default:M}}f.__esModule=!0;var _=s(r(146)),E=s(r(144)),x=s(r(63));f.default=function(M,y){if("function"!=typeof y&&null!==y)throw new TypeError("Super expression must either be null or a function, not "+(void 0===y?"undefined":(0,x.default)(y)));M.prototype=(0,E.default)(y&&y.prototype,{constructor:{value:M,enumerable:!1,writable:!0,configurable:!0}}),y&&(_.default?(0,_.default)(M,y):M.__proto__=y)}},function(I,f,r){"use strict";f.__esModule=!0;var _,v=(_=r(63))&&_.__esModule?_:{default:_};f.default=function(_,g){if(!_)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!g||"object"!==(void 0===g?"undefined":(0,v.default)(g))&&"function"!=typeof g?_:g}},function(I,f,r){"use strict";function v(O){var F=screen.orientation?screen.orientation.angle:void 0,k=void 0===F?window.matchMedia("(orientation: portrait)").matches?0:90:F,$=void 0,ne=h.length;for((0,y.debug)("[window:onorientationchange]","orientation("+k+")."),$=0;$0||O.canPlayType("application/x-mpegURL").length>0||O.canPlayType("audio/mpegurl").length>0||O.canPlayType("audio/x-mpegurl").length>0},supportsFlashVersion:function(O){var F=arguments.length>1&&void 0!==arguments[1]?arguments[1]:".";return function(){var O="0,0,0";try{O=new window.ActiveXObject("ShockwaveFlash.ShockwaveFlash").GetVariable("$version").replace(/\D+/g,",").match(/^,?(.+),?$/)[1]}catch{try{navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin&&(O=(navigator.plugins["Shockwave Flash 2.0"]||navigator.plugins["Shockwave Flash"]).description.replace(/\D+/g,",").match(/^,?(.+),?$/)[1])}catch{}}return O.split(",")}()[0]>=O.split(F)[0]},resolveElement:function(O){try{var F=document.getElementById(O);if(!F)throw new x.NoElementFoundError("Element with id("+O+") could not be found.");return F}catch(k){throw new x.NoElementFoundError("Error in accessing element with id("+O+"). "+k.message)}},createWebSocket:function(O){return new WebSocket(O)},setVideoSource:function(O,F){var k=arguments.length>2&&void 0!==arguments[2]&&arguments[2];try{O.srcObject=F}catch(ne){(0,y.warn)("[setVideoSource:obj]","Could not set srcObject: "+ne.message),re?O.mozSrcObject=F:O.src=window.URL.createObjectURL(F)}if(k)try{var $=O.play();$&&$.then(function(){return(0,y.debug)("[setVideoSource:action]","play (START)")}).catch(function(ne){return(0,y.warn)("[setVideoSource:action]","play (FAULT) "+(ne.message?ne.message:ne))})}catch(ne){(0,y.warn)("[setVideoSource:action]","play (CATCH::FAULT) "+ne.message);try{O.setAttribute("autoplay",!1),O.pause()}catch(te){(0,y.warn)("[setVideoSource:action]","pause (CATCH::FAULT) "+te.message)}}else try{O.setAttribute("autoplay",!1),O.pause()}catch{}},injectScript:function(O){var F=new T.DeferredPromise,k=document.createElement("script");return k.type="text/javascript",k.onload=function(){F.resolve()},k.onreadystatechange=function(){"loaded"!==k.readyState&&"complete"!==k.readyState||(k.onreadystatechange=null,F.resolve())},k.src=O,document.getElementsByTagName("head")[0].appendChild(k),F.promise},gUM:function(O){return(navigator.mediaDevices||navigator).getUserMedia(O)},setGlobal:function(O,F){window[O]=F},getSwfObject:function(){return window.swfobject},getEmbedObject:function(O){return document.getElementById(O)},getElementId:function(O){return O.getAttribute("id")},addOrientationChangeHandler:function(O){var F=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];"onorientationchange"in window&&((0,y.debug)("[window:orientation]","[addOrientationChangeHandler]","adding responder."),h.push(O),F&&v()),1===h.length&&((0,y.debug)("[window:orientation]","[addOrientationChangeHandler]","onorientationchange added."),window.addEventListener("orientationchange",v))},removeOrientationChangeHandler:function(O){for(var F=h.length;--F>-1;)if(h[F]===O){h.slice(F,1);break}0===h.length&&((0,y.debug)("[window:orientation]","[removeOrientationChangeHandler]:: onorientationchange removed."),window.removeEventListener("onorientationchange",v))},addCloseHandler:function(O){var F=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1;A.splice(-1===F?A.length:F,0,O),P||window.addEventListener("unload",_)},removeCloseHandler:function(O){for(var F=A.length;--F>-1;)if(A[F]===O){A.slice(F,1);break}},invoke:function(O,F){window.hasOwnProperty(O)&&window[O].call(window,F)},toggleFullScreen:function(O){window.screenfull&&window.screenfull.enabled&&window.screenfull.toggle(O)},onFullScreenStateChange:function(O){c.push(O),function s(){!i&&window.screenfull&&window.screenfull.enabled&&(i=!0,window.screenfull.onchange(function(){var O=void 0,F=c.length;for(O=0;O1&&void 0!==arguments[1]?arguments[1]:void 0;(0,y.default)(this,H),this._type=U,this._data=O}return(0,c.default)(H,[{key:"type",get:function(){return this._type}},{key:"data",get:function(){return this._data}}]),H}(),B=function(H){function U(O,F,k){(0,y.default)(this,U);var $=(0,E.default)(this,(U.__proto__||(0,_.default)(U)).call(this,O,k));return $._publisher=F,$}return(0,x.default)(U,H),(0,c.default)(U,[{key:"publisher",get:function(){return this._publisher}}]),U}(V),j=function(H){function U(O,F,k){(0,y.default)(this,U);var $=(0,E.default)(this,(U.__proto__||(0,_.default)(U)).call(this,O,k));return $._subscriber=F,$}return(0,x.default)(U,H),(0,c.default)(U,[{key:"subscriber",get:function(){return this._subscriber}}]),U}(V),re=function(H){function U(O,F,k){(0,y.default)(this,U);var $=(0,E.default)(this,(U.__proto__||(0,_.default)(U)).call(this,O,k));return $._name=F,$}return(0,x.default)(U,H),(0,c.default)(U,[{key:"name",get:function(){return this._name}}]),U}(V),z=function(H){function U(O,F,k){(0,y.default)(this,U);var $=(0,E.default)(this,(U.__proto__||(0,_.default)(U)).call(this,O,k));return $._name=F,$}return(0,x.default)(U,H),(0,c.default)(U,[{key:"name",get:function(){return this._name}}]),U}(V);f.Event=V,f.PublisherEvent=B,f.SubscriberEvent=j,f.SharedObjectEvent=re,f.MessageTransportStateEvent=z},function(I,f){I.exports=function(r){return"object"==typeof r?null!==r:"function"==typeof r}},function(I,f,r){var s=r(16),v=r(104),_=r(77),g=Object.defineProperty;f.f=r(17)?Object.defineProperty:function(E,T,x){if(s(E),T=_(T,!0),s(x),v)try{return g(E,T,x)}catch{}if("get"in x||"set"in x)throw TypeError("Accessors not supported!");return"value"in x&&(E[T]=x.value),E}},function(I,f,r){var s=r(14);I.exports=function(v){if(!s(v))throw TypeError(v+" is not an object!");return v}},function(I,f,r){I.exports=!r(26)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(I,f,r){I.exports={default:r(161),__esModule:!0}},function(I,f,r){"use strict";function s(M){return M&&M.__esModule?M:{default:M}}Object.defineProperty(f,"__esModule",{value:!0});var _=s(r(0)),E=s(r(1)),T="RED5PRO",x=function(){function M(){(0,_.default)(this,M),this._callbacks={},this._callbacks[T]=[]}return(0,E.default)(M,[{key:"_notify",value:function(y,b){var c=void 0,i=y.length;for(c=0;c=60&&(te=parseInt(Z/60),Z%=60),se=0===ne?0:parseInt(ne%60);var fe=te<10?["0"+te]:[te];return fe.push(Z<10?["0"+Z]:[Z]),fe.push(se<10?["0"+se]:[se]),fe.join(":")}},{key:"getVolume",value:function(){return this._volumeValue}},{key:"setVolume",value:function(ne){return this._volumeField.value=ne,this._volumeValue=ne,0===ne?this.setMutedState(!0):this.getMutedState()&&this.setMutedState(!1),this}},{key:"setSeekTime",value:function(ne){var te=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return this._seekTimeField.value=0===te?0:ne/te,0!==this._playbackDuration&&parseInt(this._playbackDuration)<=parseInt(ne)&&(this._seekTimeField.value=1),this._timeField.innerText=this.formatTime(Math.floor(ne)),this}},{key:"setPlaybackDuration",value:function(ne){(0,z.debug)(H,"[setplaybackduration]: "+ne),this._playbackDuration=ne}},{key:"getState",value:function(){return this._state}},{key:"setState",value:function(ne){return(0,z.debug)(H,"[setState]: "+re.PlaybackStateReadable[ne]),this._state=ne,this.onStateChange(this._state),this}},{key:"getMutedState",value:function(){return"muted"in this.player?this.player.muted:this._mutedState}},{key:"setMutedState",value:function(ne){return this._mutedState=ne,this.onMutedStateChange(this._mutedState),this}},{key:"onStateChange",value:function(ne){return ne===re.PlaybackState.PLAYING?(this._playPauseButton.classList.remove("red5pro-media-play-button"),this._playPauseButton.classList.add("red5pro-media-pause-button")):(this._playPauseButton.classList.add("red5pro-media-play-button"),this._playPauseButton.classList.remove("red5pro-media-pause-button")),this}},{key:"onMutedStateChange",value:function(ne){ne?(this._muteButton.classList.add("red5pro-media-mute-button"),this._muteButton.classList.remove("red5pro-media-unmute-button"),this._volumeField.value=0):(this._muteButton.classList.remove("red5pro-media-mute-button"),this._muteButton.classList.add("red5pro-media-unmute-button"),this._volumeField.value=this._volumeValue)}},{key:"onFullScreenChange",value:function(ne){return ne?(this._fullScreenButton.classList.add("red5pro-media-exit-fullscreen-button"),this._fullScreenButton.classList.remove("red5pro-media-fullscreen-button")):(this._fullScreenButton.classList.remove("red5pro-media-exit-fullscreen-button"),this._fullScreenButton.classList.add("red5pro-media-fullscreen-button")),this}},{key:"setAsVOD",value:function(ne){(0,z.debug)(H,"[setAsVOD]: "+ne),ne?this._seekTimeField.disabled=!1:(this._seekTimeField.value=0,this._seekTimeField.disabled=!0)}},{key:"detach",value:function(){this.enable(!1),this._controlbar&&this._controlbar.parentNode===this.container&&this.container.removeChild(this._controlbar)}}]),$}(O);f.PlaybackController=U,f.PlaybackControls=O,f.PlaybackControlsImpl=F},function(I,f,r){"use strict";function s(T){return T&&T.__esModule?T:{default:T}}Object.defineProperty(f,"__esModule",{value:!0}),f.isObjectEmpty=f.metadataResolutionToObject=f.deepCopy=f.deepDefine=void 0;var _=s(r(38)),E=s(r(10));f.deepDefine=function(T,x,M){for(var y=0,b=T,c=x.pop(),i=x.length;y=_.length?{value:void 0,done:!0}:(v=s(_,g),this._i+=v.length,{value:v,done:!1})})},function(I,f,r){r(192);for(var s=r(12),v=r(22),_=r(32),g=r(9)("toStringTag"),E=["NodeList","DOMTokenList","MediaList","StyleSheetList","CSSRuleList"],T=0;T<5;T++){var x=E[T],M=s[x],y=M&&M.prototype;y&&!y[g]&&v(y,g,x),_[x]=_.Array}},function(I,f,r){"use strict";function s(k){return k&&k.__esModule?k:{default:k}}Object.defineProperty(f,"__esModule",{value:!0}),f.RTCSessionDescription=f.RTCIceCandidate=f.RTCPeerConnection=f.updateBandwidth=f.forceUserMedia=f.getUserMedia=f.supportsDataChannel=f.isSupported=f.determineSupportedResolution=f.quickResolutionSupport=void 0;var _=s(r(10)),E=s(r(7)),T=r(8),x=r(93),M=r(25),y=r(2),b=[{label:"4K(UHD)",width:3840,height:2160},{label:"1080p(FHD)",width:1920,height:1080},{label:"UXGA",width:1600,height:1200},{label:"720p(HD)",width:1280,height:720},{label:"SVGA",width:800,height:600},{label:"VGA",width:640,height:480},{label:"360p(nHD)",width:640,height:360},{label:"CIF",width:352,height:288},{label:"QVGA",width:320,height:240},{label:"QCIF",width:176,height:144},{label:"QQVGA",width:160,height:120}],i=function(k){return k.exact||k.ideal||k.max||k.min||k},h=(0,x.curry)(function(k,$){if("boolean"==typeof k.video)return!0;var ne=k.video.hasOwnProperty("width")?i(k.video.width):0,te=k.video.hasOwnProperty("height")?i(k.video.height):0,Z=ne===$.width&&te===$.height;return Z&&(0,y.debug)("[gum:isExact]","Found matching resolution for "+$.width+", "+$.height+"."),Z}),A=(0,x.curry)(function(k,$){var ne=k.video.hasOwnProperty("width")?i(k.video.width):0,te=k.video.hasOwnProperty("height")?i(k.video.height):0;return $.width*$.height0}),V=(0,x.curry)(function(k,$){var ne=A($);return(0,x.filter)(ne)(k)}),j=function k($,ne,te){if(0!=ne.length){var Z=ne.shift();$.video.width={exact:Z.width},$.video.height={exact:Z.height},E.default.gUM($).then(function(se){te.resolve({media:se,constraints:$})}).catch(function(se){var fe="string"==typeof se?se:[se.name,se.message].join(": ");(0,y.debug)("[gum:getUserMedia]","Failure in getUserMedia: "+fe+". Attempting other resolution tests..."),(0,y.debug)("[gUM:findformat]","Constraints declined by browser: "+(0,_.default)($,null,2)),k($,ne,te)})}else!function(k,$){k.video=!0,E.default.gUM(k).then(function(ne){$.resolve({media:ne,constraints:k})}).catch(function(ne){var te="string"==typeof ne?ne:[ne.name,ne.message].join(": ");(0,y.debug)("[gum:getUserMedia]","Failure in getUserMedia: "+te+". Attempting other resolution tests..."),(0,y.debug)("[gUM:findformat]","Constraints declined by browser: "+(0,_.default)(k,null,2)),$.reject("Could not find proper camera for provided constraints.")})}($,te)},re=f.quickResolutionSupport=function(k){var $=(0,M.deepCopy)(k);return"boolean"==typeof k.video||(k.video.width&&($.video.width={exact:i(k.video.width)}),k.video.height&&($.video.height={exact:i(k.video.height)})),$},z=f.determineSupportedResolution=function(k){(0,y.debug)("[gum:determineSupportedResolution]","Determine next neighbor based on constraints: "+(0,_.default)(k,null,2));var $=new T.DeferredPromise,ne=V(b)(k),te=(0,M.deepCopy)(k);return j(te,ne,$),$.promise},H=f.isSupported=function(){return U&&O&&F},U=(f.supportsDataChannel=function(){try{var k=new U(null);return k.createDataChannel({name:"test"}).close(),k.close(),!!H()}catch($){return(0,y.debug)("Could not detect RTCDataChannel support: "+$.message),!1}},f.getUserMedia=function(k,$){var ne=new T.DeferredPromise,te=P(b);(0,y.debug)("[gum:getUserMedia]","Is Available in format listing: "+te(k));var Z=function(fe){if(fe){var Se="string"==typeof fe?fe:[fe.name,fe.message].join(": ");(0,y.debug)("[gum:getUserMedia]","Failure in getUserMedia: "+Se+". Attempting other resolution tests...")}z(k).then(function(pe){ne.resolve({media:pe.media,constraints:pe.constraints})}).catch(function(pe){$&&$(k),ne.reject({error:pe,constraints:k})})};if(function(k){return k.hasOwnProperty("video")&&(k.video.hasOwnProperty("width")||k.video.hasOwnProperty("height"))}(k))if(te(k)){(0,y.debug)("[gum:getUserMedia]","Found constraints in list. Checking quick support for faster setup with: "+(0,_.default)(k,null,2));var se=re(k);E.default.gUM(se).then(function(fe){ne.resolve({media:fe,constraints:se})}).catch(Z)}else(0,y.debug)("[gum:getUserMedia]","Could not find contraints in list. Attempting failover..."),$&&$(k),Z();else(0,y.debug)("[gum:getUserMedia]","Constraints were not defined properly. Attempting failover..."),E.default.gUM(k).then(function(fe){ne.resolve({media:fe,constraints:k})}).catch(Z);return ne.promise},f.forceUserMedia=function(k){return E.default.gUM(k)},f.updateBandwidth=function(k,$){var ne=$.indexOf("m=audio"),te=$.indexOf("m=video"),Z=void 0,se=void 0,fe=void 0;return ne>-1&&(k.audio&&(Z=$.indexOf("\r\n",ne),se=$.slice(0,Z),fe=$.slice(Z+2,$.length),$=[se,"b=AS:"+k.audio,fe].join("\r\n")),te=$.indexOf("m=video")),te>-1&&k.video&&(Z=$.indexOf("\r\n",te),se=$.slice(0,Z),fe=$.slice(Z+2,$.length),$=[se,"b=AS:"+k.video,fe].join("\r\n")),-1===ne&&-1===te&&($=$.replace(/b=AS([^\r\n]+\r\n)/g,""),k.audio&&($=$.replace(/a=mid:audio\r\n/g,"a=mid:audio\r\nb=AS:"+k.audio+"\r\n")),k.video&&($=$.replace(/a=mid:video\r\n/g,"a=mid:video\r\nb=AS:"+k.video+"\r\n"))),$},window.RTCPeerConnection||window.mozRTCPeerConnection||window.webkitRTCPeerConnection),O=window.RTCIceCandidate||window.mozRTCIceCandidate||window.webkitRTCIceCandidate,F=window.RTCSessionDescription||window.mozRTCSessionDescription||window.webkitRTCSessionDescription;f.RTCPeerConnection=U,f.RTCIceCandidate=O,f.RTCSessionDescription=F},function(I,f,r){"use strict";f.__esModule=!0;var _,v=(_=r(143))&&_.__esModule?_:{default:_};f.default=v.default||function(_){for(var g=1;gH;H++)if((j=c?z(g(V=b[H])[0],V[1]):z(b[H]))===x||j===M)return j}else for(B=re.call(b);!(V=B.next()).done;)if((j=v(B,z,V.value,c))===x||j===M)return j}).BREAK=x,y.RETURN=M},function(I,f){I.exports=function(r,s){return{enumerable:!(1&r),configurable:!(2&r),writable:!(4&r),value:s}}},function(I,f,r){var s=r(15).f,v=r(21),_=r(9)("toStringTag");I.exports=function(g,E,T){g&&!v(g=T?g:g.prototype,_)&&s(g,_,{configurable:!0,value:E})}},function(I,f){},function(I,f,r){"use strict";Object.defineProperty(f,"__esModule",{value:!0}),f.create=f.isSupported=void 0;var _,v=(_=r(7))&&_.__esModule?_:{default:_};f.isSupported=function(){return v.default.supportsWebSocket()},f.create=function(_){return v.default.createWebSocket(_)}},function(I,f,r){"use strict";function s(F){return F&&F.__esModule?F:{default:F}}Object.defineProperty(f,"__esModule",{value:!0});var _=s(r(10)),E=s(r(3)),x=s(r(0)),y=s(r(1)),c=s(r(6)),h=s(r(5)),P=function(F){if(F&&F.__esModule)return F;var k={};if(null!=F)for(var $ in F)Object.prototype.hasOwnProperty.call(F,$)&&(k[$]=F[$]);return k.default=F,k}(r(44)),B=s(r(7)),re=s(r(87)),z=r(13),H=r(2),O=function(F){function k($,ne){(0,x.default)(this,k);var te=(0,c.default)(this,(k.__proto__||(0,E.default)(k)).call(this,ne||"R5ProSocketProxy"));return te._responder=$,te._pendingPostRequests=[],te._websocket=void 0,te._connectionPromise=void 0,te._responseHandlers=[],te._isTerminated=!1,te._retryCount=0,te._retryLimit=1,te._readyCheckCount=0,te._readyCheckLimit=10,te._openState=0,te._onclose=te.tearDown.bind(te),te._onopenTimeout=0,te}return(0,h.default)(k,F),(0,y.default)(k,[{key:"_resetOnopenTimeout",value:function($,ne){var te=this,Z=setTimeout(function(){if(clearTimeout(Z),1===$.readyState){for((0,H.info)(te._name,"[websocketopen]"),te._openState=1;te._pendingPostRequests.length>0;)te.post(te._pendingPostRequests.shift());te._responder&&te._responder.onSocketOpen&&te._responder.onSocketOpen(),te.trigger(new z.MessageTransportStateEvent(z.MessageTransportStateEventTypes.OPEN,te._name,{socket:te}))}else 0===$.readyState?++te._readyCheckCount>te._readyCheckLimit?((0,H.warn)(te._name,"WebSocket connection issue. We have waited for "+(te._readyCheckCount-1)+" samples, without any connection."),te.clearRetry(),ne.reject({type:"Timeout"}),te.tearDown()):((0,H.info)(te._name,"WebSocket connection is still opening, will let it continue ("+te._readyCheckCount+")..."),te._onopenTimeout=te._resetOnopenTimeout($,ne)):(0,H.info)(te._name,"WebSocket connection attempts have ended with state ("+$.readyState+").")},500);return Z}},{key:"_removeSocketHandlers",value:function($){$&&($.onopen=void 0,$.onmessage=void 0,$.onerror=void 0,$.onclose=void 0)}},{key:"_addSocketHandlers",value:function($,ne){var te=this;this._openState=0,this._readyCheckCount=0,clearTimeout(this._onopenTimeout),this._onopenTimeout=this._resetOnopenTimeout($,ne),$.onerror=function(Z){(0,H.warn)(te._name,"[websocketerror]: Error from WebSocket. "+Z.type+"."),te.clearRetry(),ne.reject(Z),te.trigger(new z.MessageTransportStateEvent(z.MessageTransportStateEventTypes.ERROR,te._name,{socket:te,error:Z}))},$.onmessage=function(Z){te.respond(Z)},$.onclose=function(Z){Z.code>1e3?(0,H.warn)(te._name,"[websocketclose]: "+Z.code):(0,H.debug)(te._name,"[websocketclose]: "+Z.code),te._responder&&te._responder.onSocketClose&&te._responder.onSocketClose(Z),te.clearRetry(),te._removeSocketHandlers($||te._websocket),te._openState=0,te.trigger(new z.MessageTransportStateEvent(z.MessageTransportStateEventTypes.CLOSE,te._name,{socket:te,event:Z}))}}},{key:"_onUnexpectedSocketError",value:function($){this._responder&&this._responder.onSocketClose&&this._responder.onSocketClose($),this.trigger(new z.MessageTransportStateEvent(z.MessageTransportStateEventTypes.CLOSE,this._name,{socket:this})),(0,H.warn)(this._name,"[websocketerror]: Possible Unexpected Error from WebSocket. "+$.type+", "+$.detail),this.clearRetry(),this._removeSocketHandlers(this._websocket)}},{key:"clearRetry",value:function(){this._retryCount=0,this._readyCheckCount=0,clearTimeout(this._onopenTimeout)}},{key:"setUp",value:function($,ne){var te=this,Z=B.default.getIsMoz()||B.default.getIsEdge();if((0,H.debug)(this._name,"[websocket:setup] "+$+"."),this.tearDown(),this._isTerminated=!1,this._connectionPromise=ne,B.default.addCloseHandler(this._onclose),this._websocket=P.create($),this._addSocketHandlers(this._websocket,this._connectionPromise),Z&&this._retryCount++>"),(0,H.debug)(this._name,"[WebSocket("+this._websocket.url+")] close() >>");try{this._websocket.close()}catch($){(0,H.warn)(this._name,"Attempt to close WebSocket failed: "+$.message+"."),this._removeSocketHandlers(this._websocket)}finally{this._websocket&&(0,H.debug)(this._name,"<< [WebSocket("+this._websocket.url+")] close()")}(0,H.debug)(this._name,"<< [teardown]")}for(this._websocket=void 0,this._isTerminated=!0,this._openState=0;this._responseHandlers.length>0;)this._responseHandlers.shift();B.default.removeCloseHandler(this._onclose)}},{key:"postEndOfCandidates",value:function($){this.post({handleCandidate:$,data:{candidate:{type:"candidate",candidate:""}}})}},{key:"post",value:function($){if(void 0===this._websocket||1!==this._openState)return(void 0===this._websocket||2!==this._websocket.readyState&&3!==this._websocket.readyState)&&!this._isTerminated&&(this._pendingPostRequests.push($),!0);try{return(0,H.debug)(this._name,"[websocket-post]: "+(0,_.default)($,null,2)),this._websocket.send((0,_.default)($)),!0}catch(ne){return(0,H.debug)(this._name,"Could not send request: "+$+". "+ne),!1}}},{key:"respond",value:function($){var ne=this.handleMessageResponse($);if(!ne&&$.data){var te=this.getJsonFromSocketMessage($);if(null===te)return(0,H.warn)(this._name,"Determined websocket response not in correct format. Aborting message handle."),!0;if((0,H.debug)(this._name,"[websocket-response]: "+(0,_.default)(te,null,2)),void 0!==te.isAvailable)return"boolean"==typeof te.isAvailable&&te.isAvailable?(this._responder&&this._responder.onStreamAvailable(te),!0):(this._responder&&this._responder.onStreamUnavailable(te),!0);if(te.async&&te.id){var se=this._asyncTickets.find(function(Se){return Se.id===te.id}).promise;se&&te.data?se.resolve(te.data):se&&te.error&&se.reject(te.error)}else if(void 0!==te.data){var fe=te.data;if(void 0!==fe.message){if("error"===fe.type&&this._responder)return this._responder.onSocketMessageError(fe.message,fe.detail),!0}else if("status"===fe.type){if("NetConnection.Connect.Success"===fe.code)return this._websocket.onerror=this._onUnexpectedSocketError.bind(this),this._connectionPromise.resolve(this),!0;if("NetConnection.DataChannel.Available"===fe.code)return this._responder.onDataChannelAvailable(fe.description),!0;if("NetConnection.Connect.Rejected"===fe.code)return this._connectionPromise.reject("NetConnection.Connect.Rejected"),!0}else if("error"===fe.type){if("NetConnection.Connect.Rejected"===fe.code)return this._connectionPromise.reject("NetConnection.Connect.Rejected"),!0;if("NetConnection.Connect.Failed"===fe.code)return this._connectionPromise.reject("NetConnection.Connect.Failed"),!0}}}return ne}},{key:"isTerminated",get:function(){return this._isTerminated}}]),k}(re.default);f.default=O},function(I,f,r){"use strict";function s(M){return M&&M.__esModule?M:{default:M}}Object.defineProperty(f,"__esModule",{value:!0}),f.hlsSocketEndpointFromOptions=f.rtcSocketEndpointFromOptions=f.encodeKeyValues=void 0;var _=s(r(30)),E=s(r(38)),T=function(M){switch(M){case 8083:case"8083":return console.warn("The default WebSocket port on the server has changed from 8083 to 443 for secure connections."),443;case 8081:case"8081":return console.warn("The default WebSocket port on the server has changed from 8081 to 5080 or 80 for secure connections."),5080}return M},x=f.encodeKeyValues=function(M){var y={};return(0,E.default)(M).forEach(function(b,c){y[b]=encodeURIComponent(M[b])}),y};f.rtcSocketEndpointFromOptions=function(M){var y=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,b=M.wsprotocol||M.protocol,c=T(M.wsport||M.port),i=M.context?[M.app,M.context].join("/"):M.app,h=b+"://"+M.host+":"+c+"/"+i+"/";if(void 0!==M.connectionParams){var A=x(M.connectionParams);y=(0,_.default)(y,A)}if(void 0!==y){var P=[];(0,E.default)(y).forEach(function(V,B){P.push([V,y[V]].join("="))}),P.length>0&&(h+="?"+P.join("&"))}return h},f.hlsSocketEndpointFromOptions=function(M){var y=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,b=M.socketParams,c=M.connectionParams,i=b.protocol,h=T(b.port||("wss"===i?443:5080)),A=i+"://"+b.host+":"+h+"/"+b.app+"/";if(c){var P=x(M.connectionParams);y=(0,_.default)(y,P)}if(y){var V=[];(0,E.default)(y).forEach(function(B,j){V.push([B,y[B]].join("="))}),V.length>0&&(A+="?"+V.join("&"))}return A}},function(I,f,r){"use strict";function s(i){return i&&i.__esModule?i:{default:i}}Object.defineProperty(f,"__esModule",{value:!0}),f.PlaybackView=void 0;var _=s(r(0)),E=s(r(1)),x=s(r(7)),M=r(2),y="R5ProPlaybackView",c=f.PlaybackView=function(){function i(){var h=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"red5pro-subscriber";(0,_.default)(this,i);try{this._targetElement=x.default.resolveElement(h)}catch(A){throw(0,M.error)(y,"Could not instantiate a new instance of Red5ProSubscriber. Reason: "+A.message),A}}return(0,E.default)(i,[{key:"attachSubscriber",value:function(h){(0,M.debug)(y,"[attachsubscriber]"),h.setView(this,x.default.getElementId(this._targetElement))}},{key:"attachStream",value:function(h){var A=this.isAutoplay;(0,M.debug)(y,"[attachstream]"),x.default.setVideoSource(this._targetElement,h,A)}},{key:"detachStream",value:function(){(0,M.debug)(y,"[detachstream]"),x.default.setVideoSource(this._targetElement,null,this.isAutoplay)}},{key:"isAutoplay",get:function(){return x.default.hasAttributeDefined(this._targetElement,"autoplay")}},{key:"view",get:function(){return this._targetElement}}]),i}();f.default=c},function(I,f){I.exports=function(r,s,v,_){if(!(r instanceof s)||void 0!==_&&_ in r)throw TypeError(v+": incorrect invocation!");return r}},function(I,f,r){var s=r(39),v=r(9)("toStringTag"),_="Arguments"==s(function(){return arguments}());I.exports=function(E){var T,x,M;return void 0===E?"Undefined":null===E?"Null":"string"==typeof(x=function(E,T){try{return E[T]}catch{}}(T=Object(E),v))?x:_?s(T):"Object"==(M=s(T))&&"function"==typeof T.callee?"Arguments":M}},function(I,f){I.exports=function(r){if(null==r)throw TypeError("Can't call method on "+r);return r}},function(I,f){I.exports=!0},function(I,f,r){var s=r(16),v=r(183),_=r(68),g=r(74)("IE_PROTO"),E=function(){},T=function(){var x,M=r(67)("iframe"),y=_.length;for(M.style.display="none",r(103).appendChild(M),M.src="javascript:",(x=M.contentWindow.document).open(),x.write("