!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).signoz={})}(this,function(e){"use strict"; /** * @author Toru Nagashima * @copyright 2015 Toru Nagashima. All rights reserved. * See LICENSE file in root directory for full license. */const t=new WeakMap,r=new WeakMap;function n(e){const r=t.get(e);return console.assert(null!=r,"'this' is expected an Event object, but got",e),r}function i(e){null==e.passiveListener?e.event.cancelable&&(e.canceled=!0,"function"==typeof e.event.preventDefault&&e.event.preventDefault()):"undefined"!=typeof console&&"function"==typeof console.error&&console.error("Unable to preventDefault inside passive event listener invocation.",e.passiveListener)}function o(e,r){t.set(this,{eventTarget:e,event:r,eventPhase:2,currentTarget:e,canceled:!1,stopped:!1,immediateStopped:!1,passiveListener:null,timeStamp:r.timeStamp||Date.now()}),Object.defineProperty(this,"isTrusted",{value:!1,enumerable:!0});const n=Object.keys(r);for(let e=0;e0){const e=new Array(arguments.length);for(let t=0;t65536&&(r=!1),(n=t,"function"==typeof n.text?n.text():new Promise(function(e,t){var r=new FileReader;r.onload=function(){return e(r.result)},r.onerror=t,r.readAsText(n)})).then(function(t){fetch(e,{method:"POST",keepalive:r,headers:{"Content-Type":"application/json"},body:t})})}else fetch(e,{method:"POST",keepalive:!0,body:t});var n;return!0});var P="object"===("undefined"==typeof globalThis?"undefined":S(globalThis))?globalThis:"object"===("undefined"==typeof self?"undefined":S(self))?self:"object"===("undefined"==typeof window?"undefined":S(window))?window:"object"===("undefined"==typeof global?"undefined":S(global))?global:{},L="1.9.0",j=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;var R=function(e){var t=new Set([e]),r=new Set,n=e.match(j);if(!n)return function(){return!1};var i=+n[1],o=+n[2],a=+n[3];if(null!=n[4])return function(t){return t===e};function s(e){return r.add(e),!1}function u(e){return t.add(e),!0}return function(e){if(t.has(e))return!0;if(r.has(e))return!1;var n=e.match(j);if(!n)return s(e);var c=+n[1],l=+n[2],f=+n[3];return null!=n[4]||i!==c?s(e):0===i?o===l&&a<=f?u(e):s(e):o<=l?u(e):s(e)}}(L),C=L.split(".")[0],M=Symbol.for("opentelemetry.js.api."+C),I=P;function N(e,t,r,n){var i;void 0===n&&(n=!1);var o=I[M]=null!==(i=I[M])&&void 0!==i?i:{version:L};if(!n&&o[e]){var a=new Error("@opentelemetry/api: Attempted duplicate registration of API: "+e);return r.error(a.stack||a.message),!1}if(o.version!==L){a=new Error("@opentelemetry/api: Registration of version v"+o.version+" for "+e+" does not match previously registered API v"+L);return r.error(a.stack||a.message),!1}return o[e]=t,r.debug("@opentelemetry/api: Registered a global for "+e+" v"+L+"."),!0}function B(e){var t,r,n=null===(t=I[M])||void 0===t?void 0:t.version;if(n&&R(n))return null===(r=I[M])||void 0===r?void 0:r[e]}function D(e,t){t.debug("@opentelemetry/api: Unregistering a global for "+e+" v"+L+".");var r=I[M];r&&delete r[e]}var F,U=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a},q=function(e,t,r){if(r||2===arguments.length)for(var n,i=0,o=t.length;i0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a},W=function(e,t,r){if(r||2===arguments.length)for(var n,i=0,o=t.length;i=n?i.bind(t):function(){}}return eF.ALL&&(e=F.ALL),t=t||{},{error:r("error",F.ERROR),warn:r("warn",F.WARN),info:r("info",F.INFO),debug:r("debug",F.DEBUG),verbose:r("verbose",F.VERBOSE)}}(null!==(i=r.logLevel)&&void 0!==i?i:F.INFO,e);if(s&&!r.suppressOverrideMessage){var c=null!==(o=(new Error).stack)&&void 0!==o?o:"";s.warn("Current logger will be overwritten from "+c),u.warn("Current logger will overwrite one already registered from "+c)}return N("diag",u,t,!0)},t.disable=function(){D("diag",t)},t.createComponentLogger=function(e){return new z(e)},t.verbose=e("verbose"),t.debug=e("debug"),t.info=e("info"),t.warn=e("warn"),t.error=e("error")}return e.instance=function(){return this._instance||(this._instance=new e),this._instance},e}();function $(e){return Symbol.for(e)}var X,Q=function e(t){var r=this;r._currentContext=t?new Map(t):new Map,r.getValue=function(e){return r._currentContext.get(e)},r.setValue=function(t,n){var i=new e(r._currentContext);return i._currentContext.set(t,n),i},r.deleteValue=function(t){var n=new e(r._currentContext);return n._currentContext.delete(t),n}},Y=new Q,J=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a},K=function(e,t,r){if(r||2===arguments.length)for(var n,i=0,o=t.length;i0)&&!(n=o.next()).done;)a.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a},te=function(e,t,r){if(r||2===arguments.length)for(var n,i=0,o=t.length;ie.length)&&(t=e.length);for(var r=0,n=Array(t);r3?(r=h===t)&&(s=o[(a=o[4])?5:(a=3,3)],o[4]=o[5]=n):o[0]<=p&&((r=e<2&&pt||t>h)&&(o[4]=e,o[5]=t,d.n=h,a=0))}if(r||e>1)return c;throw f=!0,t}return function(r,l,h){if(u>1)throw TypeError("Generator is already running");for(f&&1===l&&p(l,h),a=l,s=h;(i=a<2?n:s)||!f;){o||(a?a<3?(a>1&&(d.n=-1),p(a,s)):d.n=s:d.v=s);try{if(u=2,o){if(a||(r="next"),i=o[r]){if(!(i=i.call(o,s)))throw TypeError("iterator result is not an object");if(!i.done)return i;s=i.value,a<2&&(a=0)}else 1===a&&(i=o.return)&&i.call(o),a<2&&(s=TypeError("The iterator does not provide a '"+r+"' method"),a=1);o=n}else if((i=(f=d.n<0)?s:e.call(t,d))!==c)break}catch(e){o=n,a=1,s=e}finally{u=1}}return{value:i,done:f}}}(e,o,a),!0),u}var c={};function l(){}function f(){}function d(){}i=Object.getPrototypeOf;var p=[][a]?i(i([][a]())):(t(i={},a,function(){return this}),i),h=d.prototype=l.prototype=Object.create(p);function v(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,d):(e.__proto__=d,t(e,s,"GeneratorFunction")),e.prototype=Object.create(h),e}return f.prototype=d,t(h,"constructor",d),t(d,"constructor",f),f.displayName="GeneratorFunction",t(d,s,"GeneratorFunction"),t(h),t(h,s,"Generator"),t(h,a,function(){return this}),t(h,"toString",function(){return"[object Generator]"}),(e.exports=r=function(){return{w:u,m:v}},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports}(Ze)),Ze.exports}var nt,it,ot,at={exports:{}},st={exports:{}},ut={exports:{}};function ct(){return nt||(nt=1,function(e){var t=Ye(),r=tt();e.exports=function e(n,i){function o(e,r,a,s){try{var u=n[e](r),c=u.value;return c instanceof t?i.resolve(c.v).then(function(e){o("next",e,a,s)},function(e){o("throw",e,a,s)}):i.resolve(c).then(function(e){u.value=e,a(u)},function(e){return o("throw",e,a,s)})}catch(e){s(e)}}var a;this.next||(r(e.prototype),r(e.prototype,"function"==typeof Symbol&&Symbol.asyncIterator||"@asyncIterator",function(){return this})),r(this,"_invoke",function(e,t,r){function n(){return new i(function(t,n){o(e,r,t,n)})}return a=a?a.then(n,n):n()},!0)},e.exports.__esModule=!0,e.exports.default=e.exports}(ut)),ut.exports}function lt(){return it||(it=1,function(e){var t=rt(),r=ct();e.exports=function(e,n,i,o,a){return new r(t().w(e,n,i,o),a||Promise)},e.exports.__esModule=!0,e.exports.default=e.exports}(st)),st.exports}function ft(){return ot||(ot=1,function(e){var t=lt();e.exports=function(e,r,n,i,o){var a=t(e,r,n,i,o);return a.next().then(function(e){return e.done?e.value:a.next()})},e.exports.__esModule=!0,e.exports.default=e.exports}(at)),at.exports}var dt,pt={exports:{}};function ht(){return dt||(dt=1,function(e){e.exports=function(e){var t=Object(e),r=[];for(var n in t)r.unshift(n);return function e(){for(;r.length;)if((n=r.pop())in t)return e.value=n,e.done=!1,e;return e.done=!0,e}},e.exports.__esModule=!0,e.exports.default=e.exports}(pt)),pt.exports}var vt,bt,yt,mt,gt,wt={exports:{}},xt={exports:{}};function _t(){return vt||(vt=1,function(e){function t(r){return e.exports=t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports.default=e.exports,t(r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}(xt)),xt.exports}function kt(){return bt||(bt=1,function(e){var t=_t().default;e.exports=function(e){if(null!=e){var r=e["function"==typeof Symbol&&Symbol.iterator||"@@iterator"],n=0;if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length))return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}}throw new TypeError(t(e)+" is not iterable")},e.exports.__esModule=!0,e.exports.default=e.exports}(wt)),wt.exports}var St=function(){if(gt)return mt;gt=1;var e=(yt||(yt=1,function(e){var t=Ye(),r=rt(),n=ft(),i=lt(),o=ct(),a=ht(),s=kt();function u(){var c=r(),l=c.m(u),f=(Object.getPrototypeOf?Object.getPrototypeOf(l):l.__proto__).constructor;function d(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===f||"GeneratorFunction"===(t.displayName||t.name))}var p={throw:1,return:2,break:3,continue:3};function h(e){var t,r;return function(n){t||(t={stop:function(){return r(n.a,2)},catch:function(){return n.v},abrupt:function(e,t){return r(n.a,p[e],t)},delegateYield:function(e,i,o){return t.resultName=i,r(n.d,s(e),o)},finish:function(e){return r(n.f,e)}},r=function(e,r,i){n.p=t.prev,n.n=t.next;try{return e(r,i)}finally{t.next=n.n}}),t.resultName&&(t[t.resultName]=n.v,t.resultName=void 0),t.sent=n.v,t.next=n.n;try{return e.call(this,t)}finally{n.p=t.prev,n.n=t.next}}}return(e.exports=u=function(){return{wrap:function(e,t,r,n){return c.w(h(e),t,r,n&&n.reverse())},isGeneratorFunction:d,mark:c.m,awrap:function(e,r){return new t(e,r)},AsyncIterator:o,async:function(e,t,r,o,a){return(d(t)?i:n)(h(e),t,r,o,a)},keys:a,values:s}},e.exports.__esModule=!0,e.exports.default=e.exports)()}e.exports=u,e.exports.__esModule=!0,e.exports.default=e.exports}(Xe)),Xe.exports)();mt=e;try{regeneratorRuntime=e}catch(t){"object"===("undefined"==typeof globalThis?"undefined":S(globalThis))?globalThis.regeneratorRuntime=e:Function("r","regeneratorRuntime = r")(e)}return mt}(),Ot=Ge(St),Et=$("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function Tt(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return At(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?At(e,t):void 0}}(e))||t){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}function At(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r=Ut&&(r[1]-=Ut,r[0]+=1);return r}(qt(zt()),qt("number"==typeof e?e:Ct.now()))}function Vt(e){if(t=e,Array.isArray(t)&&2===t.length&&"number"==typeof t[0]&&"number"==typeof t[1])return e;if("number"==typeof e)return e2&&void 0!==arguments[2]?arguments[2]:0,i=arguments.length>3?arguments[3]:void 0;if(!(n>20)){if(n++,sr(e)||sr(t)||or(t))r=tr(t);else if(ir(e)){if(r=e.slice(),ir(t))for(var o=0,a=t.length;o=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}function _r(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r0,n}}]);var t}();function Sr(e,t){return kr.FromAttributeList(Object.entries(e),t)}function Or(e){return e.map(function(e){var t=We(e,2),r=t[0],n=t[1];return wr(n)?[r,n.catch(function(e){Ae.debug("promise rejection for resource attribute: %s - %s",r,e)})]:[r,n]})}var Er=function(){return T(function e(t,r,n){k(this,e),A(this,"hrTime",void 0),A(this,"hrTimeObserved",void 0),A(this,"spanContext",void 0),A(this,"resource",void 0),A(this,"instrumentationScope",void 0),A(this,"attributes",{}),A(this,"_severityText",void 0),A(this,"_severityNumber",void 0),A(this,"_body",void 0),A(this,"_eventName",void 0),A(this,"totalAttributesCount",0),A(this,"_isReadonly",!1),A(this,"_logRecordLimits",void 0);var i=n.timestamp,o=n.observedTimestamp,a=n.eventName,s=n.severityNumber,u=n.severityText,c=n.body,l=n.attributes,f=void 0===l?{}:l,d=n.context,p=Date.now();if(this.hrTime=Vt(null!=i?i:p),this.hrTimeObserved=Vt(null!=o?o:p),d){var h=Le.getSpanContext(d);h&&me(h)&&(this.spanContext=h)}this.severityNumber=s,this.severityText=u,this.body=c,this.resource=t.resource,this.instrumentationScope=r,this._logRecordLimits=t.logRecordLimits,this._eventName=a,this.setAttributes(f)},[{key:"severityText",get:function(){return this._severityText},set:function(e){this._isLogRecordReadonly()||(this._severityText=e)}},{key:"severityNumber",get:function(){return this._severityNumber},set:function(e){this._isLogRecordReadonly()||(this._severityNumber=e)}},{key:"body",get:function(){return this._body},set:function(e){this._isLogRecordReadonly()||(this._body=e)}},{key:"eventName",get:function(){return this._eventName},set:function(e){this._isLogRecordReadonly()||(this._eventName=e)}},{key:"droppedAttributesCount",get:function(){return this.totalAttributesCount-Object.keys(this.attributes).length}},{key:"setAttribute",value:function(e,t){return this._isLogRecordReadonly()||null===t?this:0===e.length?(Ae.warn("Invalid attribute key: ".concat(e)),this):Pt(t)||"object"===S(t)&&!Array.isArray(t)&&Object.keys(t).length>0?(this.totalAttributesCount+=1,Object.keys(this.attributes).length>=this._logRecordLimits.attributeCountLimit&&!Object.prototype.hasOwnProperty.call(this.attributes,e)?(1===this.droppedAttributesCount&&Ae.warn("Dropping extra attributes."),this):(Pt(t)?this.attributes[e]=this._truncateToSize(t):this.attributes[e]=t,this)):(Ae.warn("Invalid attribute value set for key: ".concat(e)),this)}},{key:"setAttributes",value:function(e){for(var t=0,r=Object.entries(e);t0?(this.registeredLogRecordProcessors=i,this.activeProcessor=new Lr(this.registeredLogRecordProcessors,this.forceFlushTimeoutMillis)):this.activeProcessor=new Pr}),Rr=function(){return T(function e(){var t,r,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};k(this,e),A(this,"_shutdownOnce",void 0),A(this,"_sharedState",void 0);var i,o,a,s,u,c,l,f=function(){for(var e=arguments.length,t=new Array(e),r=0;r0;)n=rr(n,t.shift(),0,i);return n}({},{forceFlushTimeoutMillis:3e4,logRecordLimits:{attributeValueLengthLimit:1/0,attributeCountLimit:128},includeTraceContext:!0},n),d=null!==(t=n.resource)&&void 0!==t?t:Sr(A(A(A(A({},"service.name","unknown_service"),Mt,Bt[Mt]),It,Bt[It]),Nt,Bt[Nt]));this._sharedState=new jr(d,f.forceFlushTimeoutMillis,(i=f.logRecordLimits,{attributeCountLimit:null!==(o=null!==(a=null!==(s=i.attributeCountLimit)&&void 0!==s?s:void 0)&&void 0!==a?a:void 0)&&void 0!==o?o:128,attributeValueLengthLimit:null!==(u=null!==(c=null!==(l=i.attributeValueLengthLimit)&&void 0!==l?l:void 0)&&void 0!==c?c:void 0)&&void 0!==u?u:1/0}),null!==(r=null==n?void 0:n.processors)&&void 0!==r?r:[]),this._shutdownOnce=new mr(this._shutdown,this)},[{key:"getLogger",value:function(e,t,r){if(this._shutdownOnce.isCalled)return Ae.warn("A shutdown LoggerProvider cannot provide a Logger"),Re;e||Ae.warn("Logger requested without instrumentation scope name.");var n=e||"unknown",i="".concat(n,"@").concat(t||"",":").concat((null==r?void 0:r.schemaUrl)||"");return this._sharedState.loggers.has(i)||this._sharedState.loggers.set(i,new Ar({name:n,version:t,schemaUrl:null==r?void 0:r.schemaUrl},this._sharedState)),this._sharedState.loggers.get(i)}},{key:"forceFlush",value:function(){return this._shutdownOnce.isCalled?(Ae.warn("invalid attempt to force flush after LoggerProvider shutdown"),this._shutdownOnce.promise):this._sharedState.activeProcessor.forceFlush()}},{key:"shutdown",value:function(){return this._shutdownOnce.isCalled?(Ae.warn("shutdown may only be called once per LoggerProvider"),this._shutdownOnce.promise):this._shutdownOnce.call()}},{key:"_shutdown",value:function(){return this._sharedState.activeProcessor.shutdown()}}])}(),Cr=function(){return T(function e(t,r){var n,i,o,a,s,u,c,l;k(this,e),A(this,"_exporter",void 0),A(this,"_maxExportBatchSize",void 0),A(this,"_maxQueueSize",void 0),A(this,"_scheduledDelayMillis",void 0),A(this,"_exportTimeoutMillis",void 0),A(this,"_finishedLogRecords",[]),A(this,"_timer",void 0),A(this,"_shutdownOnce",void 0),this._exporter=t,this._maxExportBatchSize=null!==(n=null!==(i=null==r?void 0:r.maxExportBatchSize)&&void 0!==i?i:void 0)&&void 0!==n?n:512,this._maxQueueSize=null!==(o=null!==(a=null==r?void 0:r.maxQueueSize)&&void 0!==a?a:void 0)&&void 0!==o?o:2048,this._scheduledDelayMillis=null!==(s=null!==(u=null==r?void 0:r.scheduledDelayMillis)&&void 0!==u?u:void 0)&&void 0!==s?s:5e3,this._exportTimeoutMillis=null!==(c=null!==(l=null==r?void 0:r.exportTimeoutMillis)&&void 0!==l?l:void 0)&&void 0!==c?c:3e4,this._shutdownOnce=new mr(this._shutdown,this),this._maxExportBatchSize>this._maxQueueSize&&(Ae.warn("BatchLogRecordProcessor: maxExportBatchSize must be smaller or equal to maxQueueSize, setting maxExportBatchSize to match maxQueueSize"),this._maxExportBatchSize=this._maxQueueSize)},[{key:"onEmit",value:function(e){this._shutdownOnce.isCalled||this._addToBuffer(e)}},{key:"forceFlush",value:function(){return this._shutdownOnce.isCalled?this._shutdownOnce.promise:this._flushAll()}},{key:"shutdown",value:function(){return this._shutdownOnce.call()}},{key:"_shutdown",value:(e=Ve(Ot.mark(function e(){return Ot.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return this.onShutdown(),e.next=1,this._flushAll();case 1:return e.next=2,this._exporter.shutdown();case 2:case"end":return e.stop()}},e,this)})),function(){return e.apply(this,arguments)})},{key:"_addToBuffer",value:function(e){this._finishedLogRecords.length>=this._maxQueueSize||(this._finishedLogRecords.push(e),this._maybeStartTimer())}},{key:"_flushAll",value:function(){var e=this;return new Promise(function(t,r){for(var n=[],i=Math.ceil(e._finishedLogRecords.length/e._maxExportBatchSize),o=0;o0&&(e._clearTimer(),e._maybeStartTimer())}).catch(function(e){Rt(e)})},this._scheduledDelayMillis),this._timer)}},{key:"_clearTimer",value:function(){void 0!==this._timer&&(clearTimeout(this._timer),this._timer=void 0)}},{key:"_export",value:function(e){var t=this,r=function(){return gr._export(t._exporter,e).then(function(e){var t;e.code!==Dt.SUCCESS&&Rt(null!==(t=e.error)&&void 0!==t?t:new Error("BatchLogRecordProcessor: log record export failed (status ".concat(e,")")))}).catch(Rt)},n=e.map(function(e){return e.resource}).filter(function(e){return e.asyncAttributesPending});return 0===n.length?r():Promise.all(n.map(function(e){var t;return null===(t=e.waitForAsyncAttributes)||void 0===t?void 0:t.call(e)})).then(r,Rt)}}]);var e}();function Mr(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Mr=function(){return!!e})()}var Ir=function(e){function t(e,r){var n;return k(this,t),n=function(e,t,r){return t=cr(t),ur(e,Mr()?Reflect.construct(t,r||[],cr(e).constructor):t.apply(e,r))}(this,t,[e,r]),A(n,"_visibilityChangeListener",void 0),A(n,"_pageHideListener",void 0),n._onInit(r),n}return fr(t,e),T(t,[{key:"onShutdown",value:function(){"undefined"!=typeof document&&(this._visibilityChangeListener&&document.removeEventListener("visibilitychange",this._visibilityChangeListener),this._pageHideListener&&document.removeEventListener("pagehide",this._pageHideListener))}},{key:"_onInit",value:function(e){var t=this;!0!==(null==e?void 0:e.disableAutoFlushOnDocumentHide)&&"undefined"!=typeof document&&(this._visibilityChangeListener=function(){"hidden"===document.visibilityState&&t.forceFlush()},this._pageHideListener=function(){t.forceFlush()},document.addEventListener("visibilitychange",this._visibilityChangeListener),document.addEventListener("pagehide",this._pageHideListener))}}])}(Cr),Nr=function(){return T(function e(t){k(this,e),A(this,"_delegate",void 0),this._delegate=t},[{key:"export",value:function(e,t){this._delegate.export(e,t)}},{key:"forceFlush",value:function(){return this._delegate.forceFlush()}},{key:"shutdown",value:function(){return this._delegate.shutdown()}}])}();function Br(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Br=function(){return!!e})()}var Dr=function(e){function t(e,r,n){var i;return k(this,t),i=function(e,t,r){return t=cr(t),ur(e,Br()?Reflect.construct(t,r||[],cr(e).constructor):t.apply(e,r))}(this,t,[e]),A(i,"code",void 0),A(i,"name","OTLPExporterError"),A(i,"data",void 0),i.data=n,i.code=r,i}return fr(t,e),T(t)}(pr(Error));function Fr(e){if(Number.isFinite(e)&&e>0)return e;throw new Error("Configuration: timeoutMillis is invalid, expected number greater than 0 (actual: '".concat(e,"')"))}function Ur(e){if(null!=e)return function(){return e}}var qr=function(){return T(function e(t){k(this,e),A(this,"_concurrencyLimit",void 0),A(this,"_sendingPromises",[]),this._concurrencyLimit=t},[{key:"pushPromise",value:function(e){var t=this;if(this.hasReachedLimit())throw new Error("Concurrency Limit reached");this._sendingPromises.push(e);var r=function(){var r=t._sendingPromises.indexOf(e);t._sendingPromises.splice(r,1)};e.then(r,r)}},{key:"hasReachedLimit",value:function(){return this._sendingPromises.length>=this._concurrencyLimit}},{key:"awaitAll",value:(e=Ve(Ot.mark(function e(){return Ot.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=1,Promise.all(this._sendingPromises);case 1:case"end":return e.stop()}},e,this)})),function(){return e.apply(this,arguments)})}]);var e}();function zr(e){return new qr(e.concurrencyLimit)}function Hr(){return{handleResponse:function(e){null!=e&&function(e){return Object.prototype.hasOwnProperty.call(e,"partialSuccess")}(e)&&null!=e.partialSuccess&&0!==Object.keys(e.partialSuccess).length&&Ae.warn("Received Partial Success response:",JSON.stringify(e.partialSuccess))}}}var Vr=function(){return T(function e(t,r,n,i,o){k(this,e),A(this,"_transport",void 0),A(this,"_serializer",void 0),A(this,"_responseHandler",void 0),A(this,"_promiseQueue",void 0),A(this,"_timeout",void 0),A(this,"_diagLogger",void 0),this._transport=t,this._serializer=r,this._responseHandler=n,this._promiseQueue=i,this._timeout=o,this._diagLogger=Ae.createComponentLogger({namespace:"OTLPExportDelegate"})},[{key:"export",value:function(e,t){var r=this;if(this._diagLogger.debug("items to be sent",e),this._promiseQueue.hasReachedLimit())t({code:Dt.FAILED,error:new Error("Concurrent export limit reached")});else{var n=this._serializer.serializeRequest(e);null!=n?this._promiseQueue.pushPromise(this._transport.send(n,this._timeout).then(function(e){if("success"!==e.status)"failure"===e.status&&e.error?t({code:Dt.FAILED,error:e.error}):"retryable"===e.status?t({code:Dt.FAILED,error:new Dr("Export failed with retryable status")}):t({code:Dt.FAILED,error:new Dr("Export failed with unknown error")});else{if(null!=e.data)try{r._responseHandler.handleResponse(r._serializer.deserializeResponse(e.data))}catch(t){r._diagLogger.warn("Export succeeded but could not deserialize response - is the response specification compliant?",t,e.data)}t({code:Dt.SUCCESS})}},function(e){return t({code:Dt.FAILED,error:e})})):t({code:Dt.FAILED,error:new Error("Nothing to send")})}}},{key:"forceFlush",value:function(){return this._promiseQueue.awaitAll()}},{key:"shutdown",value:(e=Ve(Ot.mark(function e(){return Ot.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return this._diagLogger.debug("shutdown started"),e.next=1,this.forceFlush();case 1:this._transport.shutdown();case 2:case"end":return e.stop()}},e,this)})),function(){return e.apply(this,arguments)})}]);var e}();function Wr(e,t,r){return n={transport:r,serializer:t,promiseHandler:zr(e)},i={timeout:e.timeoutMillis},new Vr(n.transport,n.serializer,Hr(),n.promiseHandler,i.timeout);var n,i}function Gr(e){return e>=48&&e<=57?e-48:e>=97&&e<=102?e-87:e-55}function $r(e){for(var t=new Uint8Array(e.length/2),r=0,n=0;n>BigInt(32)))}}var Yr="undefined"!=typeof BigInt?function(e){return Xr(e).toString()}:function(e){return e[0]*Ut+e[1]};function Jr(e){return e}function Kr(e){if(void 0!==e)return $r(e)}var Zr={encodeHrTime:Qr,encodeSpanContext:$r,encodeOptionalSpanContext:Kr};function en(e,t){return{key:e,value:tn(t)}}function tn(e){var t=S(e);return"string"===t?{stringValue:e}:"number"===t?Number.isInteger(e)?{intValue:e}:{doubleValue:e}:"boolean"===t?{boolValue:e}:e instanceof Uint8Array?{bytesValue:e}:Array.isArray(e)?{arrayValue:{values:e.map(tn)}}:"object"===t&&null!=e?{kvlistValue:{values:Object.entries(e).map(function(e){var t=We(e,2);return en(t[0],t[1])})}}:{}}function rn(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return nn(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?nn(e,t):void 0}}(e))||t){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}function nn(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r0)){e.next=5;break}if(o--,u=Math.max(Math.min(a,5e3)+cn(),0),a*=1.5,c=null!==(s=i.retryInMillis)&&void 0!==s?s:u,l=n-Date.now(),!(c>l)){e.next=3;break}return e.abrupt("return",i);case 3:return e.next=4,this.retry(t,l,c);case 4:i=e.sent,e.next=2;break;case 5:return e.abrupt("return",i);case 6:case"end":return e.stop()}},e,this)})),function(t,r){return e.apply(this,arguments)})},{key:"shutdown",value:function(){return this._transport.shutdown()}}]);var e}();function fn(e){return new ln(e.transport)}function dn(e){return[429,502,503,504].includes(e)}function pn(e){if(null!=e){var t=Number.parseInt(e,10);if(Number.isInteger(t))return t>0?1e3*t:-1;var r=new Date(e).getTime()-Date.now();return r>=0?r:0}}var hn=function(){return T(function e(t){k(this,e),A(this,"_parameters",void 0),this._parameters=t},[{key:"send",value:function(e,t){var r=this;return new Promise(function(n){var i=new XMLHttpRequest;i.timeout=t,i.open("POST",r._parameters.url);var o=r._parameters.headers();Object.entries(o).forEach(function(e){var t=We(e,2),r=t[0],n=t[1];i.setRequestHeader(r,n)}),i.ontimeout=function(e){n({status:"failure",error:new Error("XHR request timed out")})},i.onreadystatechange=function(){i.status>=200&&i.status<=299?(Ae.debug("XHR success"),n({status:"success"})):i.status&&dn(i.status)?n({status:"retryable",retryInMillis:pn(i.getResponseHeader("Retry-After"))}):0!==i.status&&n({status:"failure",error:new Error("XHR request failed with non-retryable status")})},i.onabort=function(){n({status:"failure",error:new Error("XHR request aborted")})},i.onerror=function(){n({status:"failure",error:new Error("XHR request errored")})},i.send(e)})}},{key:"shutdown",value:function(){}}])}();var vn=function(){return T(function e(t){k(this,e),A(this,"_params",void 0),this._params=t},[{key:"send",value:function(e){var t=this;return new Promise(function(r){navigator.sendBeacon(t._params.url,new Blob([e],{type:t._params.blobType}))?(Ae.debug("SendBeacon success"),r({status:"success"})):r({status:"failure",error:new Error("SendBeacon failed")})})}},{key:"shutdown",value:function(){}}])}();var bn=function(){return T(function e(t){k(this,e),A(this,"_parameters",void 0),this._parameters=t},[{key:"send",value:(e=Ve(Ot.mark(function e(t,r){var n,i,o,a,s,u,c,l,f;return Ot.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=new AbortController,i=setTimeout(function(){return n.abort()},r),e.prev=1,a=!!globalThis.location,s=new URL(this._parameters.url),e.next=2,fetch(s.href,{method:"POST",headers:this._parameters.headers(),body:t,signal:n.signal,keepalive:a,mode:a?(null===(o=globalThis.location)||void 0===o?void 0:o.origin)===s.origin?"same-origin":"cors":"no-cors"});case 2:if(!((u=e.sent).status>=200&&u.status<=299)){e.next=3;break}return Ae.debug("response success"),e.abrupt("return",{status:"success"});case 3:if(!dn(u.status)){e.next=4;break}return c=u.headers.get("Retry-After"),l=pn(c),e.abrupt("return",{status:"retryable",retryInMillis:l});case 4:return e.abrupt("return",{status:"failure",error:new Error("Fetch request failed with non-retryable status")});case 5:if(e.prev=5,"AbortError"!==(null==(f=e.catch(1))?void 0:f.name)){e.next=6;break}return e.abrupt("return",{status:"failure",error:new Error("Fetch request timed out",{cause:f})});case 6:return e.abrupt("return",{status:"failure",error:new Error("Fetch request errored",{cause:f})});case 7:return e.prev=7,clearTimeout(i),e.finish(7);case 8:case"end":return e.stop()}},e,this,[[1,5,7,8]])})),function(t,r){return e.apply(this,arguments)})},{key:"shutdown",value:function(){}}]);var e}();function yn(e,t){return Wr(e,t,fn({transport:(r=e,new hn(r))}));var r}function mn(e,t){return Wr(e,t,fn({transport:(r=e,new bn(r))}));var r}function gn(e,t){return Wr(e,t,fn({transport:(r={url:e.url,blobType:e.headers()["Content-Type"]},new vn(r))}));var r}function wn(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function xn(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:{};return k(this,t),function(e,t,r){return t=cr(t),ur(e,En()?Reflect.construct(t,r||[],cr(e).constructor):t.apply(e,r))}(this,t,[On(e,un,"v1/logs",{"Content-Type":"application/json"})])}return fr(t,e),T(t)}(Nr),Pn="user-agent",Ln="",jn="function",Rn="object",Cn="string",Mn="undefined",In="browser",Nn="cpu",Bn="device",Dn="engine",Fn="os",Un="result",qn="name",zn="type",Hn="vendor",Vn="version",Wn="architecture",Gn="major",$n="model",Xn="console",Qn="mobile",Yn="tablet",Jn="smarttv",Kn="wearable",Zn="xr",ei="embedded",ti="inapp",ri="brands",ni="formFactors",ii="fullVersionList",oi="platform",ai="platformVersion",si="bitness",ui="sec-ch-ua",ci=ui+"-full-version-list",li=ui+"-arch",fi=ui+"-"+si,di=ui+"-form-factors",pi=ui+"-"+Qn,hi=ui+"-"+$n,vi=ui+"-"+oi,bi=vi+"-version",yi=[ri,ii,Qn,$n,oi,ai,Wn,ni,si],mi="Amazon",gi="Apple",wi="ASUS",xi="BlackBerry",_i="Google",ki="Huawei",Si="Lenovo",Oi="Honor",Ei="LG",Ti="Microsoft",Ai="Motorola",Pi="Nvidia",Li="OnePlus",ji="OPPO",Ri="Samsung",Ci="Sharp",Mi="Sony",Ii="Xiaomi",Ni="Zebra",Bi="Chrome",Di="Chromium",Fi="Chromecast",Ui="Edge",qi="Firefox",zi="Opera",Hi="Facebook",Vi="Sogou",Wi="Mobile ",Gi=" Browser",$i="Windows",Xi=typeof window!==Mn&&window.navigator?window.navigator:void 0,Qi=Xi&&Xi.userAgentData?Xi.userAgentData:void 0,Yi=function(e){for(var t={},r=0;r0){for(var r in e)if(to(t)==to(e[r]))return!0;return!1}return!!Zi(e)&&to(t)==to(e)},Ki=function(e,t){for(var r in e)return/^(browser|cpu|device|engine|os)$/.test(r)||!!t&&Ki(e[r])},Zi=function(e){return typeof e===Cn},eo=function(e){if(e){for(var t=[],r=io(/\\?\"/g,e).split(","),n=0;n-1){var i=ao(r[n]).split(";v=");t[n]={brand:i[0],version:i[1]}}else t[n]=ao(r[n]);return t}},to=function(e){return Zi(e)?e.toLowerCase():e},ro=function(e){return Zi(e)?io(/[^\d\.]/g,e).split(".")[0]:void 0},no=function(e){for(var t in e)if(e.hasOwnProperty(t)){var r=e[t];typeof r==Rn&&2==r.length?this[r[0]]=r[1]:this[r]=void 0}return this},io=function(e,t){return Zi(t)?t.replace(e,Ln):t},oo=function(e){return io(/\\?\"/g,e)},ao=function(e,t){return e=io(/^\s\s*/,String(e)),typeof t===Mn?e:e.substring(0,t)},so=function(e,t){if(e&&t)for(var r,n,i,o,a,s,u=0;u0?2===o.length?typeof o[1]==jn?this[o[0]]=o[1].call(this,s):this[o[0]]=o[1]:o.length>=3&&(typeof o[1]!==jn||o[1].exec&&o[1].test?3==o.length?this[o[0]]=s?s.replace(o[1],o[2]):void 0:4==o.length?this[o[0]]=s?o[3].call(this,s.replace(o[1],o[2])):void 0:o.length>4&&(this[o[0]]=s?o[3].apply(this,[s.replace(o[1],o[2])].concat(o.slice(4))):void 0):o.length>3?this[o[0]]=s?o[1].apply(this,o.slice(2)):void 0:this[o[0]]=s?o[1].call(this,s,o[2]):void 0):this[o]=s||void 0;u+=2}},uo=function(e,t){for(var r in t)if(typeof t[r]===Rn&&t[r].length>0){for(var n=0;n2&&this.set($n,"iPad").set(zn,Yn);break;case Fn:!this.get(qn)&&Qi&&Qi[oi]&&this.set(qn,Qi[oi]);break;case Un:var e=this.data,t=function(t){return e[t].getItem().detectFeature().get()};this.set(In,t(In)).set(Nn,t(Nn)).set(Bn,t(Bn)).set(Dn,t(Dn)).set(Fn,t(Fn))}return this},this.parseUA=function(){switch(this.itemType!=Un&&so.call(this.data,this.ua,this.rgxMap),this.itemType){case In:this.set(Gn,ro(this.get(Vn)));break;case Fn:if("iOS"==this.get(qn)&&"18.6"==this.get(Vn)){var e=/\) Version\/([\d\.]+)/.exec(this.ua);e&&parseInt(e[1].substring(0,2),10)>=26&&this.set(Vn,e[1])}}return this},this.parseCH=function(){var e=this.uaCH,t=this.rgxMap;switch(this.itemType){case In:case Dn:var r,n=e[ii]||e[ri];if(n)for(var i=0;i=13?"11":"10"),this.set(qn,f).set(Vn,d)}this.get(qn)==$i&&"Xbox"==e[$n]&&this.set(qn,"Xbox").set(Vn,void 0);break;case Un:var p=this.data,h=function(t){return p[t].getItem().setCH(e).parseCH().get()};this.set(In,h(In)).set(Nn,h(Nn)).set(Bn,h(Bn)).set(Dn,h(Dn)).set(Fn,h(Fn))}return this},no.call(this,[["itemType",e],["ua",t],["uaCH",n],["rgxMap",r],["data",vo(this,e)]]),this}function mo(e,t,r){if(typeof e===Rn?(Ki(e,!0)?(typeof t===Rn&&(r=t),t=e):(r=e,t=void 0),e=void 0):typeof e!==Cn||Ki(t,!0)||(r=t,t=void 0),r)if(typeof r.append===jn){var n={};r.forEach(function(e,t){n[String(t).toLowerCase()]=e}),r=n}else{var i={};for(var o in r)r.hasOwnProperty(o)&&(i[String(o).toLowerCase()]=r[o]);r=i}if(!(this instanceof mo))return new mo(e,t,r).getResult();var a=typeof e===Cn?e:r&&r[Pn]?r[Pn]:Xi&&Xi.userAgent?Xi.userAgent:Ln,s=new bo(r,!0),u=t?function(e,t){var r={},n=t;if(!Ki(t))for(var i in n={},t)for(var o in t[i])n[o]=t[i][o].concat(n[o]?n[o]:[]);for(var a in e)r[a]=n[a]&&n[a].length%2==0?n[a].concat(e[a]):e[a];return r}(po,t):po,c=function(e){return e==Un?function(){return new yo(e,a,u,s).set("ua",a).set(In,this.getBrowser()).set(Nn,this.getCPU()).set(Bn,this.getDevice()).set(Dn,this.getEngine()).set(Fn,this.getOS()).get()}:function(){return new yo(e,a,u[e],s).parseUA().get()}};return no.call(this,[["getBrowser",c(In)],["getCPU",c(Nn)],["getDevice",c(Bn)],["getEngine",c(Dn)],["getOS",c(Fn)],["getResult",c(Un)],["getUA",function(){return a}],["setUA",function(e){return Zi(e)&&(a=ao(e,500)),this}]]).setUA(a),this}function go(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function wo(e){for(var t=1;t1&&void 0!==s[1]?s[1]:{},n=s.length>2&&void 0!==s[2]?s[2]:3e3,i=new AbortController,o=setTimeout(function(){return i.abort()},n),e.prev=1,e.next=2,fetch(t,wo(wo({},r),{},{signal:i.signal}));case 2:return a=e.sent,e.abrupt("return",a);case 3:return e.prev=3,e.catch(1),e.abrupt("return",new Response(""));case 4:return e.prev=4,clearTimeout(o),e.finish(4);case 5:case"end":return e.stop()}},e,null,[[1,3,4,5]])})),xo.apply(this,arguments)}mo.VERSION="2.0.6",mo.BROWSER=Yi([qn,Vn,Gn,zn]),mo.CPU=Yi([Wn]),mo.DEVICE=Yi([$n,Hn,zn,Xn,Qn,Jn,Yn,Kn,ei]),mo.ENGINE=mo.OS=Yi([qn,Vn]);var _o="",ko=function(){return xo.apply(this,arguments)}("https://apm-collector-uc.intsig.net/ip").then(function(e){return e.text()}).then(function(e){return _o=e.trim()});var So=function(){return{}};function Oo(){return wo(wo(wo(wo({},_o?{"source.address":_o}:{}),{"browser.name":(e=new mo({browser:[[/(CamScanner)\/([\w.]+)/i],[mo.BROWSER.NAME,mo.BROWSER.VERSION,[mo.BROWSER.TYPE,"bot"]],[/(CamScannerWindows)\/([\w.]+)/i],[mo.BROWSER.NAME,mo.BROWSER.VERSION,[mo.BROWSER.TYPE,"bot"]],[/(CamScannerMac)\/([\w.]+)/i],[mo.BROWSER.NAME,mo.BROWSER.VERSION,[mo.BROWSER.TYPE,"bot"]]]}).getResult()).browser.name,"browser.version":e.browser.version,"browser.user_agent":e.ua}),So()),{localTime:(new Date).toISOString(),path:location.pathname+location.search+location.hash,pathname:location.pathname,referrer:document.referrer});var e}var Eo=function(){return T(function e(){k(this,e)},[{key:"onEmit",value:function(e){var t=Oo();e.setAttributes(t)}},{key:"shutdown",value:function(){return Promise.resolve()}},{key:"forceFlush",value:function(){return Promise.resolve()}}])}(),To=Fe.getLogger("web");function Ao(e){return Po.apply(this,arguments)}function Po(){return Po=Ve(Ot.mark(function e(t){var r,n=arguments;return Ot.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=n.length>1&&void 0!==n[1]?n[1]:{},e.next=1,ko;case 1:To.emit({body:"",severityNumber:_e.INFO,severityText:t,attributes:r});case 2:case"end":return e.stop()}},e)})),Po.apply(this,arguments)}function Lo(){return Lo=Ve(Ot.mark(function e(t){var r,n=arguments;return Ot.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=n.length>1&&void 0!==n[1]?n[1]:{},e.next=1,ko;case 1:To.emit({body:"",severityNumber:_e.WARN,severityText:t,attributes:r});case 2:case"end":return e.stop()}},e)})),Lo.apply(this,arguments)}function jo(e){return Ro.apply(this,arguments)}function Ro(){return Ro=Ve(Ot.mark(function e(t){var r,n,i=arguments;return Ot.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=i.length>1&&void 0!==i[1]?i[1]:"error",e.next=1,ko;case 1:n={filename:t.filename||void 0,lineNo:t.lineNo?t.lineNo:void 0,colNo:t.colNo?t.colNo:void 0,message:t.message||t.error&&t.error.message||void 0,stack:t.stack||t.error&&t.error.stack||void 0,name:t.error&&t.error.name||void 0},"promise"===r&&t.reason&&(n.message=t.reason.message,n.stack=t.reason.stack),To.emit({body:"",severityNumber:_e.ERROR,severityText:r,attributes:n});case 2:case"end":return e.stop()}},e)})),Ro.apply(this,arguments)}function Co(e,t){return Mo.apply(this,arguments)}function Mo(){return Mo=Ve(Ot.mark(function e(t,r){var n,i=arguments;return Ot.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=i.length>2&&void 0!==i[2]?i[2]:"metric",e.next=1,ko;case 1:To.emit({body:"",severityNumber:_e.INFO,severityText:n,attributes:{type:t,value:r}});case 2:case"end":return e.stop()}},e)})),Mo.apply(this,arguments)}function Io(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return No(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?No(e,t):void 0}}(e))||t){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}function No(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r=0&&(a||n)&&(((o=t.value-(null!=i?i:0))||void 0===i)&&(i=t.value,t.delta=o,t.rating=function(e,t){return e>t[1]?"poor":e>t[0]?"needs-improvement":"good"}(t.value,r),e(t)))}},qo=function(e){requestAnimationFrame(function(){return requestAnimationFrame(function(){return e()})})},zo=function(){var e=performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart1&&void 0!==arguments[1]?arguments[1]:-1,r=zo(),n="navigate";return Do>=0?n="back-forward-cache":r&&(document.prerendering||Ho()>0?n="prerender":document.wasDiscarded?n="restore":r.type&&(n=r.type.replace(/_/g,"-"))),{name:e,value:t,rating:"good",delta:0,entries:[],id:"v5-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:n}},Wo=new WeakMap;function Go(e,t){return Wo.get(e)||Wo.set(e,new t),Wo.get(e)}var $o,Xo=function(){return T(function e(){k(this,e),A(this,"t",void 0),A(this,"i",0),A(this,"o",[])},[{key:"h",value:function(e){var t;if(!e.hadRecentInput){var r=this.o[0],n=this.o.at(-1);this.i&&r&&n&&e.startTime-n.startTime<1e3&&e.startTime-r.startTime<5e3?(this.i+=e.value,this.o.push(e)):(this.i=e.value,this.o=[e]),null===(t=this.t)||void 0===t||t.call(this,e)}}}])}(),Qo=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};try{if(PerformanceObserver.supportedEntryTypes.includes(e)){var n=new PerformanceObserver(function(e){Promise.resolve().then(function(){t(e.getEntries())})});return n.observe(function(e){for(var t=1;tt})[0])||void 0===e?void 0:e.startTime;Jo=null!=r?r:Zo(),addEventListener("visibilitychange",ea,!0),addEventListener("prerenderingchange",ea,!0),Fo(function(){setTimeout(function(){Jo=Zo()})})}return{get firstHiddenTime(){return Jo},onHidden:function(e){Ko.add(e)}}},ra=function(e){document.prerendering?addEventListener("prerenderingchange",function(){return e()},!0):e()},na=[1800,3e3],ia=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};ra(function(){var r,n=ta(),i=Vo("FCP"),o=Qo("paint",function(e){var t,a=Io(e);try{for(a.s();!(t=a.n()).done;){var s=t.value;"first-contentful-paint"===s.name&&(o.disconnect(),s.startTimer.P){var i;if(n?e.duration>n.P?(n.entries=[e],n.P=e.duration):e.duration===n.P&&e.startTime===n.entries[0].startTime&&n.entries.push(e):(n={id:e.interactionId,entries:[e],P:e.duration},this.l.set(n.id,n),this.u.push(n)),this.u.sort(function(e,t){return t.P-e.P}),this.u.length>10){var o,a=Io(this.u.splice(10));try{for(a.s();!(o=a.n()).done;){var s=o.value;this.l.delete(s.id)}}catch(e){a.e(e)}finally{a.f()}}null===(i=this.p)||void 0===i||i.call(this,n)}}}}])}(),pa=function(e){var t=globalThis.requestIdleCallback||setTimeout;"hidden"===document.visibilityState?e():(e=Yo(e),addEventListener("visibilitychange",e,{once:!0,capture:!0}),t(function(){e(),removeEventListener("visibilitychange",e,{capture:!0})}))},ha=[200,500],va=function(){return T(function e(){k(this,e),A(this,"m",void 0)},[{key:"h",value:function(e){var t;null===(t=this.m)||void 0===t||t.call(this,e)}}])}(),ba=[2500,4e3],ya=[800,1800],ma=function(e){document.prerendering?ra(function(){return ma(e)}):"complete"!==document.readyState?addEventListener("load",function(){return ma(e)},!0):setTimeout(e)};function ga(){if(window.performance&&performance.getEntries){var e=We(performance.getEntriesByType("navigation"),1)[0];if(e){var t={redirect:Math.round(e.redirectEnd-e.redirectStart),serviceWorkerInit:Math.round(e.fetchStart-e.workerStart),checkCache:Math.round(e.domainLookupStart-e.fetchStart),dns:Math.round(e.domainLookupEnd-e.domainLookupStart),connectWait:Math.round(e.connectStart-e.domainLookupEnd),tcp:Math.round(e.connectEnd-e.connectStart),ssl:e.secureConnectionStart>0?Math.round(e.connectEnd-e.secureConnectionStart):0,ttfb:Math.round(e.responseStart-e.requestStart),response:Math.round(e.responseEnd-e.responseStart),htmlParse:Math.round(e.domInteractive-e.responseEnd),domContentLoadedDelay:Math.round(e.domContentLoadedEventStart-e.domInteractive),domContentLoaded:Math.round(e.domContentLoadedEventEnd-e.domContentLoadedEventStart),resourceLoad:Math.round(e.domComplete-e.domContentLoadedEventEnd),loadDelay:Math.round(e.loadEventStart-e.domComplete),load:Math.round(e.loadEventEnd-e.loadEventStart),pageLoad:Math.round(e.loadEventEnd)};if(performance.getEntries){var r=performance.getEntries(),n=0,i=0,o=0,a=0,s=0,u=0;r.forEach(function(e){/\.css$/i.test(e.name)?(n+=Math.floor(e.duration)||0,i++):/\.js$/i.test(e.name)?(o+=Math.floor(e.duration)||0,a++):"first-paint"===e.name?s=Math.floor(e.startTime)||0:"first-contentful-paint"===e.name&&(u=Math.floor(e.startTime)||0)}),i&&(t.css=Math.floor(n/i)),a&&(t.js=Math.floor(o/a)),s&&(t.fpt=s),u&&(t.fcpt=u)}Ao("perform",t)}}}ia(function(e){Co("fcp",e.value,"web-vitals")}),function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};ra(function(){var r,n=ta(),i=Vo("LCP"),o=Go(t,va),a=function(e){t.reportAllChanges||(e=e.slice(-1));var a,s=Io(e);try{for(s.s();!(a=s.n()).done;){var u=a.value;o.h(u),u.startTime1&&void 0!==arguments[1]?arguments[1]:{},r=ta();ia(Yo(function(){var n,i=Vo("CLS",0),o=Go(t,Xo),a=function(e){var t,r=Io(e);try{for(r.s();!(t=r.n()).done;){var a=t.value;o.h(a)}}catch(e){r.e(e)}finally{r.f()}o.i>i.value&&(i.value=o.i,i.entries=o.o,n())},s=Qo("layout-shift",a);s&&(n=Uo(e,i,oa,t.reportAllChanges),r.onHidden(function(){a(s.takeRecords()),n(!0)}),Fo(function(){o.i=0,i=Vo("CLS",0),n=Uo(e,i,oa,t.reportAllChanges),qo(function(){return n()})}),setTimeout(n))}))}(function(e){Co("cls",e.value,"web-vitals")}),function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(globalThis.PerformanceEventTiming&&"interactionId"in PerformanceEventTiming.prototype){var r=ta();ra(function(){var n;"interactionCount"in performance||$o||($o=Qo("event",ca,{type:"event",buffered:!0,durationThreshold:0}));var i,o=Vo("INP"),a=Go(t,da),s=function(e){pa(function(){var t,r=Io(e);try{for(r.s();!(t=r.n()).done;){var n=t.value;a.h(n)}}catch(e){r.e(e)}finally{r.f()}var s=a.L();s&&s.P!==o.value&&(o.value=s.P,o.entries=s.entries,i())})},u=Qo("event",s,{durationThreshold:null!==(n=t.durationThreshold)&&void 0!==n?n:40});i=Uo(e,o,ha,t.reportAllChanges),u&&(u.observe({type:"first-input",buffered:!0}),r.onHidden(function(){s(u.takeRecords()),i(!0)}),Fo(function(){a.v(),o=Vo("INP"),i=Uo(e,o,ha,t.reportAllChanges)}))})}}(function(e){Co("inp",e.value,"web-vitals")}),function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=Vo("TTFB"),n=Uo(e,r,ya,t.reportAllChanges);ma(function(){var i=zo();i&&(r.value=Math.max(i.responseStart-Ho(),0),r.entries=[i],n(!0),Fo(function(){r=Vo("TTFB",0),(n=Uo(e,r,ya,t.reportAllChanges))(!0)}))})}(function(e){Co("ttfb",e.value,"web-vitals")}),"complete"===document.readyState?setTimeout(function(){ga()},0):window.addEventListener("load",function(){setTimeout(function(){ga()},0)}),window.addEventListener("error",function(e){jo(e,"error")}),window.addEventListener("unhandledrejection",function(e){jo(e,"promise")});var wa=XMLHttpRequest.prototype.open,xa=XMLHttpRequest.prototype.send,_a=[],ka=[],Sa=[],Oa=[];function Ea(e,t){if(!e||!t)return!1;if(!Pa(t)&&(Ta(t)||Aa(t)||t.source)&&(t=[t]),!Pa(t))return!1;for(var r=[],n=0,i=t.length;n-1&&(t=1e3),e["request.body"]&&e["request.body"].length>t&&(e["request.body"]=e["request.body"].substring(0,t)),e["response.body"]&&e["response.body"].length>t&&(e["response.body"]=e["response.body"].substring(0,t))}(e),function(e){var t=/(password['"]*[:=]?)[\s\S]{5}/g;e["request.body"]=e["request.body"]?e["request.body"].replace(t,"$1*"):"",e["response.body"]=e["response.body"]?e["response.body"].replace(t,"$1*"):""}(e),Ao("request",e)}XMLHttpRequest.prototype.open=function(){for(var e=arguments.length,t=new Array(e),r=0;r