/**
 * @imqa/web-agent
 *  version: 1.4.4
 *  commit-hash: ee1907f
 *  build time: 2026-02-04T00:25:44.232Z
 *  SPDX-FileCopyrightText: LicenseRef-ONYCOM-Proprietary
 *  Copyright © 2024-2026 ONYCOM CO., LTD. <https://www.imqa.io>
 *  BOM: See CycloneDX SBOM at /.well-known/sbom
 *  
 */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).IMQA=t()}(this,(function(){"use strict";var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function t(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function n(e){if(Object.prototype.hasOwnProperty.call(e,"__esModule"))return e;var t=e.default;if("function"==typeof t){var n=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach((function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})})),n}var r={},o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},o(e,t)};function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var a=function(){return a=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},a.apply(this,arguments)};function s(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function c(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function u(e,t){return function(n,r){t(n,r,e)}}function l(e,t,n,r,o,i){function a(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var s,c=r.kind,u="getter"===c?"get":"setter"===c?"set":"value",l=!t&&e?r.static?e:e.prototype:null,p=t||(l?Object.getOwnPropertyDescriptor(l,r.name):{}),d=!1,f=n.length-1;f>=0;f--){var h={};for(var m in r)h[m]="access"===m?{}:r[m];for(var m in r.access)h.access[m]=r.access[m];h.addInitializer=function(e){if(d)throw new TypeError("Cannot add initializers after decoration has completed");i.push(a(e||null))};var g=(0,n[f])("accessor"===c?{get:p.get,set:p.set}:p[u],h);if("accessor"===c){if(void 0===g)continue;if(null===g||"object"!=typeof g)throw new TypeError("Object expected");(s=a(g.get))&&(p.get=s),(s=a(g.set))&&(p.set=s),(s=a(g.init))&&o.unshift(s)}else(s=a(g))&&("field"===c?o.unshift(s):p[u]=s)}l&&Object.defineProperty(l,r.name,p),d=!0}function p(e,t,n){for(var r=arguments.length>2,o=0;o<t.length;o++)n=r?t[o].call(e,n):t[o].call(e);return r?n:void 0}function d(e){return"symbol"==typeof e?e:"".concat(e)}function f(e,t,n){return"symbol"==typeof t&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:n?"".concat(n," ",t):t})}function h(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function m(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))}function g(e,t){var n,r,o,i={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(c){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(i=0)),i;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return i.label++,{value:s[1],done:!1};case 5:i.label++,r=s[1],s=[0];continue;case 7:s=i.ops.pop(),i.trys.pop();continue;default:if(!(o=i.trys,(o=o.length>0&&o[o.length-1])||6!==s[0]&&2!==s[0])){i=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){i.label=s[1];break}if(6===s[0]&&i.label<o[1]){i.label=o[1],o=s;break}if(o&&i.label<o[2]){i.label=o[2],i.ops.push(s);break}o[2]&&i.ops.pop(),i.trys.pop();continue}s=t.call(e,i)}catch(e){s=[6,e],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}}var _=Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]};function y(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||_(t,e,n)}function v(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function b(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function E(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(b(arguments[t]));return e}function S(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,s=i.length;a<s;a++,o++)r[o]=i[a];return r}function T(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}function O(e){return this instanceof O?(this.v=e,this):new O(e)}function A(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=n.apply(e,t||[]),i=[];return r=Object.create(("function"==typeof AsyncIterator?AsyncIterator:Object).prototype),a("next"),a("throw"),a("return",(function(e){return function(t){return Promise.resolve(t).then(e,u)}})),r[Symbol.asyncIterator]=function(){return this},r;function a(e,t){o[e]&&(r[e]=function(t){return new Promise((function(n,r){i.push([e,t,n,r])>1||s(e,t)}))},t&&(r[e]=t(r[e])))}function s(e,t){try{(n=o[e](t)).value instanceof O?Promise.resolve(n.value.v).then(c,u):l(i[0][2],n)}catch(e){l(i[0][3],e)}var n}function c(e){s("next",e)}function u(e){s("throw",e)}function l(e,t){e(t),i.shift(),i.length&&s(i[0][0],i[0][1])}}function w(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:O(e[r](t)),done:!1}:o?o(t):t}:o}}function R(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=v(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,o){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,o,(t=e[n](t)).done,t.value)}))}}}function N(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var I=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t},P=function(e){return P=Object.getOwnPropertyNames||function(e){var t=[];for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[t.length]=n);return t},P(e)};function x(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n=P(e),r=0;r<n.length;r++)"default"!==n[r]&&_(t,e,n[r]);return I(t,e),t}function C(e){return e&&e.__esModule?e:{default:e}}function M(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)}function L(e,t,n,r,o){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?o.call(e,n):o?o.value=n:t.set(e,n),n}function U(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}function k(e,t,n){if(null!=t){if("object"!=typeof t&&"function"!=typeof t)throw new TypeError("Object expected.");var r,o;if(n){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");r=t[Symbol.asyncDispose]}if(void 0===r){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");r=t[Symbol.dispose],n&&(o=r)}if("function"!=typeof r)throw new TypeError("Object not disposable.");o&&(r=function(){try{o.call(this)}catch(e){return Promise.reject(e)}}),e.stack.push({value:t,dispose:r,async:n})}else n&&e.stack.push({async:!0});return t}var D="function"==typeof SuppressedError?SuppressedError:function(e,t,n){var r=new Error(n);return r.name="SuppressedError",r.error=e,r.suppressed=t,r};function j(e){function t(t){e.error=e.hasError?new D(t,e.error,"An error was suppressed during disposal."):t,e.hasError=!0}var n,r=0;return function o(){for(;n=e.stack.pop();)try{if(!n.async&&1===r)return r=0,e.stack.push(n),Promise.resolve().then(o);if(n.dispose){var i=n.dispose.call(n.value);if(n.async)return r|=2,Promise.resolve(i).then(o,(function(e){return t(e),o()}))}else r|=1}catch(e){t(e)}if(1===r)return e.hasError?Promise.reject(e.error):Promise.resolve();if(e.hasError)throw e.error}()}function B(e,t){return"string"==typeof e&&/^\.\.?\//.test(e)?e.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i,(function(e,n,r,o,i){return n?t?".jsx":".js":!r||o&&i?r+o+"."+i.toLowerCase()+"js":e})):e}var V={__extends:i,__assign:a,__rest:s,__decorate:c,__param:u,__esDecorate:l,__runInitializers:p,__propKey:d,__setFunctionName:f,__metadata:h,__awaiter:m,__generator:g,__createBinding:_,__exportStar:y,__values:v,__read:b,__spread:E,__spreadArrays:S,__spreadArray:T,__await:O,__asyncGenerator:A,__asyncDelegator:w,__asyncValues:R,__makeTemplateObject:N,__importStar:x,__importDefault:C,__classPrivateFieldGet:M,__classPrivateFieldSet:L,__classPrivateFieldIn:U,__addDisposableResource:k,__disposeResources:j,__rewriteRelativeImportExtension:B},F=n(Object.freeze({__proto__:null,__addDisposableResource:k,get __assign(){return a},__asyncDelegator:w,__asyncGenerator:A,__asyncValues:R,__await:O,__awaiter:m,__classPrivateFieldGet:M,__classPrivateFieldIn:U,__classPrivateFieldSet:L,__createBinding:_,__decorate:c,__disposeResources:j,__esDecorate:l,__exportStar:y,__extends:i,__generator:g,__importDefault:C,__importStar:x,__makeTemplateObject:N,__metadata:h,__param:u,__propKey:d,__read:b,__rest:s,__rewriteRelativeImportExtension:B,__runInitializers:p,__setFunctionName:f,__spread:E,__spreadArray:T,__spreadArrays:S,__values:v,default:V})),G={},H="object"==typeof globalThis?globalThis:"object"==typeof self?self:"object"==typeof window?window:"object"==typeof global?global:{},Y="1.9.0",q=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/;var z=function(e){var t=new Set([e]),n=new Set,r=e.match(q);if(!r)return function(){return!1};var o=+r[1],i=+r[2],a=+r[3];if(null!=r[4])return function(t){return t===e};function s(e){return n.add(e),!1}function c(e){return t.add(e),!0}return function(e){if(t.has(e))return!0;if(n.has(e))return!1;var r=e.match(q);if(!r)return s(e);var u=+r[1],l=+r[2],p=+r[3];return null!=r[4]||o!==u?s(e):0===o?i===l&&a<=p?c(e):s(e):i<=l?c(e):s(e)}}(Y),K=Y.split(".")[0],W=Symbol.for("opentelemetry.js.api."+K),Q=H;function J(e,t,n,r){var o;void 0===r&&(r=!1);var i=Q[W]=null!==(o=Q[W])&&void 0!==o?o:{version:Y};if(!r&&i[e]){var a=new Error("@opentelemetry/api: Attempted duplicate registration of API: "+e);return n.error(a.stack||a.message),!1}if(i.version!==Y){a=new Error("@opentelemetry/api: Registration of version v"+i.version+" for "+e+" does not match previously registered API v"+Y);return n.error(a.stack||a.message),!1}return i[e]=t,n.debug("@opentelemetry/api: Registered a global for "+e+" v"+Y+"."),!0}function $(e){var t,n,r=null===(t=Q[W])||void 0===t?void 0:t.version;if(r&&z(r))return null===(n=Q[W])||void 0===n?void 0:n[e]}function X(e,t){t.debug("@opentelemetry/api: Unregistering a global for "+e+" v"+Y+".");var n=Q[W];n&&delete n[e]}var Z,ee=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},te=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))},ne=function(){function e(e){this._namespace=e.namespace||"DiagComponentLogger"}return e.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return re("debug",this._namespace,e)},e.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return re("error",this._namespace,e)},e.prototype.info=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return re("info",this._namespace,e)},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return re("warn",this._namespace,e)},e.prototype.verbose=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return re("verbose",this._namespace,e)},e}();function re(e,t,n){var r=$("diag");if(r)return n.unshift(t),r[e].apply(r,te([],ee(n),!1))}!function(e){e[e.NONE=0]="NONE",e[e.ERROR=30]="ERROR",e[e.WARN=50]="WARN",e[e.INFO=60]="INFO",e[e.DEBUG=70]="DEBUG",e[e.VERBOSE=80]="VERBOSE",e[e.ALL=9999]="ALL"}(Z||(Z={}));var oe=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},ie=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))},ae=function(){function e(){function e(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=$("diag");if(r)return r[e].apply(r,ie([],oe(t),!1))}}var t=this;t.setLogger=function(e,n){var r,o,i;if(void 0===n&&(n={logLevel:Z.INFO}),e===t){var a=new Error("Cannot use diag as the logger for itself. Please use a DiagLogger implementation like ConsoleDiagLogger or a custom implementation");return t.error(null!==(r=a.stack)&&void 0!==r?r:a.message),!1}"number"==typeof n&&(n={logLevel:n});var s=$("diag"),c=function(e,t){function n(n,r){var o=t[n];return"function"==typeof o&&e>=r?o.bind(t):function(){}}return e<Z.NONE?e=Z.NONE:e>Z.ALL&&(e=Z.ALL),t=t||{},{error:n("error",Z.ERROR),warn:n("warn",Z.WARN),info:n("info",Z.INFO),debug:n("debug",Z.DEBUG),verbose:n("verbose",Z.VERBOSE)}}(null!==(o=n.logLevel)&&void 0!==o?o:Z.INFO,e);if(s&&!n.suppressOverrideMessage){var u=null!==(i=(new Error).stack)&&void 0!==i?i:"<failed to generate stacktrace>";s.warn("Current logger will be overwritten from "+u),c.warn("Current logger will overwrite one already registered from "+u)}return J("diag",c,t,!0)},t.disable=function(){X("diag",t)},t.createComponentLogger=function(e){return new ne(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}(),se=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},ce=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},ue=function(){function e(e){this._entries=e?new Map(e):new Map}return e.prototype.getEntry=function(e){var t=this._entries.get(e);if(t)return Object.assign({},t)},e.prototype.getAllEntries=function(){return Array.from(this._entries.entries()).map((function(e){var t=se(e,2);return[t[0],t[1]]}))},e.prototype.setEntry=function(t,n){var r=new e(this._entries);return r._entries.set(t,n),r},e.prototype.removeEntry=function(t){var n=new e(this._entries);return n._entries.delete(t),n},e.prototype.removeEntries=function(){for(var t,n,r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];var i=new e(this._entries);try{for(var a=ce(r),s=a.next();!s.done;s=a.next()){var c=s.value;i._entries.delete(c)}}catch(e){t={error:e}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}return i},e.prototype.clear=function(){return new e},e}(),le=Symbol("BaggageEntryMetadata"),pe=ae.instance();function de(e){return void 0===e&&(e={}),new ue(new Map(Object.entries(e)))}function fe(e){return"string"!=typeof e&&(pe.error("Cannot create baggage metadata from unknown type: "+typeof e),e=""),{__TYPE__:le,toString:function(){return e}}}function he(e){return Symbol.for(e)}var me,ge=function e(t){var n=this;n._currentContext=t?new Map(t):new Map,n.getValue=function(e){return n._currentContext.get(e)},n.setValue=function(t,r){var o=new e(n._currentContext);return o._currentContext.set(t,r),o},n.deleteValue=function(t){var r=new e(n._currentContext);return r._currentContext.delete(t),r}},_e=new ge,ye=[{n:"error",c:"error"},{n:"warn",c:"warn"},{n:"info",c:"info"},{n:"debug",c:"debug"},{n:"verbose",c:"trace"}],ve=function(){function e(e){return function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];if(console){var r=console[e];if("function"!=typeof r&&(r=console.log),"function"==typeof r)return r.apply(console,t)}}}for(var t=0;t<ye.length;t++)this[ye[t].n]=e(ye[t].c)},be=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ee=function(){function e(){}return e.prototype.createGauge=function(e,t){return Me},e.prototype.createHistogram=function(e,t){return Le},e.prototype.createCounter=function(e,t){return Ce},e.prototype.createUpDownCounter=function(e,t){return Ue},e.prototype.createObservableGauge=function(e,t){return De},e.prototype.createObservableCounter=function(e,t){return ke},e.prototype.createObservableUpDownCounter=function(e,t){return je},e.prototype.addBatchObservableCallback=function(e,t){},e.prototype.removeBatchObservableCallback=function(e){},e}(),Se=function(){},Te=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return be(t,e),t.prototype.add=function(e,t){},t}(Se),Oe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return be(t,e),t.prototype.add=function(e,t){},t}(Se),Ae=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return be(t,e),t.prototype.record=function(e,t){},t}(Se),we=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return be(t,e),t.prototype.record=function(e,t){},t}(Se),Re=function(){function e(){}return e.prototype.addCallback=function(e){},e.prototype.removeCallback=function(e){},e}(),Ne=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return be(t,e),t}(Re),Ie=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return be(t,e),t}(Re),Pe=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return be(t,e),t}(Re),xe=new Ee,Ce=new Te,Me=new Ae,Le=new we,Ue=new Oe,ke=new Ne,De=new Ie,je=new Pe;!function(e){e[e.INT=0]="INT",e[e.DOUBLE=1]="DOUBLE"}(me||(me={}));var Be,Ve={get:function(e,t){if(null!=e)return e[t]},keys:function(e){return null==e?[]:Object.keys(e)}},Fe={set:function(e,t,n){null!=e&&(e[t]=n)}},Ge=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},He=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))},Ye=function(){function e(){}return e.prototype.active=function(){return _e},e.prototype.with=function(e,t,n){for(var r=[],o=3;o<arguments.length;o++)r[o-3]=arguments[o];return t.call.apply(t,He([n],Ge(r),!1))},e.prototype.bind=function(e,t){return t},e.prototype.enable=function(){return this},e.prototype.disable=function(){return this},e}(),qe=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},ze=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))},Ke="context",We=new Ye,Qe=function(){function e(){}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalContextManager=function(e){return J(Ke,e,ae.instance())},e.prototype.active=function(){return this._getContextManager().active()},e.prototype.with=function(e,t,n){for(var r,o=[],i=3;i<arguments.length;i++)o[i-3]=arguments[i];return(r=this._getContextManager()).with.apply(r,ze([e,t,n],qe(o),!1))},e.prototype.bind=function(e,t){return this._getContextManager().bind(e,t)},e.prototype._getContextManager=function(){return $(Ke)||We},e.prototype.disable=function(){this._getContextManager().disable(),X(Ke,ae.instance())},e}();!function(e){e[e.NONE=0]="NONE",e[e.SAMPLED=1]="SAMPLED"}(Be||(Be={}));var Je="0000000000000000",$e="00000000000000000000000000000000",Xe={traceId:$e,spanId:Je,traceFlags:Be.NONE},Ze=function(){function e(e){void 0===e&&(e=Xe),this._spanContext=e}return e.prototype.spanContext=function(){return this._spanContext},e.prototype.setAttribute=function(e,t){return this},e.prototype.setAttributes=function(e){return this},e.prototype.addEvent=function(e,t){return this},e.prototype.addLink=function(e){return this},e.prototype.addLinks=function(e){return this},e.prototype.setStatus=function(e){return this},e.prototype.updateName=function(e){return this},e.prototype.end=function(e){},e.prototype.isRecording=function(){return!1},e.prototype.recordException=function(e,t){},e}(),et=he("OpenTelemetry Context Key SPAN");function tt(e){return e.getValue(et)||void 0}function nt(){return tt(Qe.getInstance().active())}function rt(e,t){return e.setValue(et,t)}function ot(e){return e.deleteValue(et)}function it(e,t){return rt(e,new Ze(t))}function at(e){var t;return null===(t=tt(e))||void 0===t?void 0:t.spanContext()}var st=/^([0-9a-f]{32})$/i,ct=/^[0-9a-f]{16}$/i;function ut(e){return st.test(e)&&e!==$e}function lt(e){return ct.test(e)&&e!==Je}function pt(e){return ut(e.traceId)&&lt(e.spanId)}function dt(e){return new Ze(e)}var ft=Qe.getInstance(),ht=function(){function e(){}return e.prototype.startSpan=function(e,t,n){if(void 0===n&&(n=ft.active()),Boolean(null==t?void 0:t.root))return new Ze;var r,o=n&&at(n);return"object"==typeof(r=o)&&"string"==typeof r.spanId&&"string"==typeof r.traceId&&"number"==typeof r.traceFlags&&pt(o)?new Ze(o):new Ze},e.prototype.startActiveSpan=function(e,t,n,r){var o,i,a;if(!(arguments.length<2)){2===arguments.length?a=t:3===arguments.length?(o=t,a=n):(o=t,i=n,a=r);var s=null!=i?i:ft.active(),c=this.startSpan(e,o,s),u=rt(s,c);return ft.with(u,a,void 0,c)}},e}();var mt,gt,_t,yt=new ht,vt=function(){function e(e,t,n,r){this._provider=e,this.name=t,this.version=n,this.options=r}return e.prototype.startSpan=function(e,t,n){return this._getTracer().startSpan(e,t,n)},e.prototype.startActiveSpan=function(e,t,n,r){var o=this._getTracer();return Reflect.apply(o.startActiveSpan,o,arguments)},e.prototype._getTracer=function(){if(this._delegate)return this._delegate;var e=this._provider.getDelegateTracer(this.name,this.version,this.options);return e?(this._delegate=e,this._delegate):yt},e}(),bt=new(function(){function e(){}return e.prototype.getTracer=function(e,t,n){return new ht},e}()),Et=function(){function e(){}return e.prototype.getTracer=function(e,t,n){var r;return null!==(r=this.getDelegateTracer(e,t,n))&&void 0!==r?r:new vt(this,e,t,n)},e.prototype.getDelegate=function(){var e;return null!==(e=this._delegate)&&void 0!==e?e:bt},e.prototype.setDelegate=function(e){this._delegate=e},e.prototype.getDelegateTracer=function(e,t,n){var r;return null===(r=this._delegate)||void 0===r?void 0:r.getTracer(e,t,n)},e}();!function(e){e[e.NOT_RECORD=0]="NOT_RECORD",e[e.RECORD=1]="RECORD",e[e.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"}(mt||(mt={})),function(e){e[e.INTERNAL=0]="INTERNAL",e[e.SERVER=1]="SERVER",e[e.CLIENT=2]="CLIENT",e[e.PRODUCER=3]="PRODUCER",e[e.CONSUMER=4]="CONSUMER"}(gt||(gt={})),function(e){e[e.UNSET=0]="UNSET",e[e.OK=1]="OK",e[e.ERROR=2]="ERROR"}(_t||(_t={}));var St="[_0-9a-z-*/]",Tt=new RegExp("^(?:"+("[a-z]"+St+"{0,255}")+"|"+("[a-z0-9]"+St+"{0,240}@[a-z]"+St+"{0,13}")+")$"),Ot=/^[ -~]{0,255}[!-~]$/,At=/,|=/;var wt=function(){function e(e){this._internalState=new Map,e&&this._parse(e)}return e.prototype.set=function(e,t){var n=this._clone();return n._internalState.has(e)&&n._internalState.delete(e),n._internalState.set(e,t),n},e.prototype.unset=function(e){var t=this._clone();return t._internalState.delete(e),t},e.prototype.get=function(e){return this._internalState.get(e)},e.prototype.serialize=function(){var e=this;return this._keys().reduce((function(t,n){return t.push(n+"="+e.get(n)),t}),[]).join(",")},e.prototype._parse=function(e){e.length>512||(this._internalState=e.split(",").reverse().reduce((function(e,t){var n=t.trim(),r=n.indexOf("=");if(-1!==r){var o=n.slice(0,r),i=n.slice(r+1,t.length);(function(e){return Tt.test(e)})(o)&&function(e){return Ot.test(e)&&!At.test(e)}(i)&&e.set(o,i)}return e}),new Map),this._internalState.size>32&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,32))))},e.prototype._keys=function(){return Array.from(this._internalState.keys()).reverse()},e.prototype._clone=function(){var t=new e;return t._internalState=new Map(this._internalState),t},e}();var Rt=Qe.getInstance(),Nt=ae.instance(),It=new(function(){function e(){}return e.prototype.getMeter=function(e,t,n){return xe},e}()),Pt="metrics",xt=function(){function e(){}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalMeterProvider=function(e){return J(Pt,e,ae.instance())},e.prototype.getMeterProvider=function(){return $(Pt)||It},e.prototype.getMeter=function(e,t,n){return this.getMeterProvider().getMeter(e,t,n)},e.prototype.disable=function(){X(Pt,ae.instance())},e}(),Ct=xt.getInstance(),Mt=function(){function e(){}return e.prototype.inject=function(e,t){},e.prototype.extract=function(e,t){return e},e.prototype.fields=function(){return[]},e}(),Lt=he("OpenTelemetry Baggage Key");function Ut(e){return e.getValue(Lt)||void 0}function kt(){return Ut(Qe.getInstance().active())}function Dt(e,t){return e.setValue(Lt,t)}function jt(e){return e.deleteValue(Lt)}var Bt,Vt="propagation",Ft=new Mt,Gt=function(){function e(){this.createBaggage=de,this.getBaggage=Ut,this.getActiveBaggage=kt,this.setBaggage=Dt,this.deleteBaggage=jt}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalPropagator=function(e){return J(Vt,e,ae.instance())},e.prototype.inject=function(e,t,n){return void 0===n&&(n=Fe),this._getGlobalPropagator().inject(e,t,n)},e.prototype.extract=function(e,t,n){return void 0===n&&(n=Ve),this._getGlobalPropagator().extract(e,t,n)},e.prototype.fields=function(){return this._getGlobalPropagator().fields()},e.prototype.disable=function(){X(Vt,ae.instance())},e.prototype._getGlobalPropagator=function(){return $(Vt)||Ft},e}(),Ht=Gt.getInstance(),Yt="trace",qt=function(){function e(){this._proxyTracerProvider=new Et,this.wrapSpanContext=dt,this.isSpanContextValid=pt,this.deleteSpan=ot,this.getSpan=tt,this.getActiveSpan=nt,this.getSpanContext=at,this.setSpan=rt,this.setSpanContext=it}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalTracerProvider=function(e){var t=J(Yt,this._proxyTracerProvider,ae.instance());return t&&this._proxyTracerProvider.setDelegate(e),t},e.prototype.getTracerProvider=function(){return $(Yt)||this._proxyTracerProvider},e.prototype.getTracer=function(e,t){return this.getTracerProvider().getTracer(e,t)},e.prototype.disable=function(){X(Yt,ae.instance()),this._proxyTracerProvider=new Et},e}(),zt=qt.getInstance(),Kt={context:Rt,diag:Nt,metrics:Ct,propagation:Ht,trace:zt},Wt=n(Object.freeze({__proto__:null,DiagConsoleLogger:ve,get DiagLogLevel(){return Z},INVALID_SPANID:Je,INVALID_SPAN_CONTEXT:Xe,INVALID_TRACEID:$e,ProxyTracer:vt,ProxyTracerProvider:Et,ROOT_CONTEXT:_e,get SamplingDecision(){return mt},get SpanKind(){return gt},get SpanStatusCode(){return _t},get TraceFlags(){return Be},get ValueType(){return me},baggageEntryMetadataFromString:fe,context:Rt,createContextKey:he,createNoopMeter:function(){return xe},createTraceState:function(e){return new wt(e)},default:Kt,defaultTextMapGetter:Ve,defaultTextMapSetter:Fe,diag:Nt,isSpanContextValid:pt,isValidSpanId:lt,isValidTraceId:ut,metrics:Ct,propagation:Ht,trace:zt}));!function(e){e[e.UNSPECIFIED=0]="UNSPECIFIED",e[e.TRACE=1]="TRACE",e[e.TRACE2=2]="TRACE2",e[e.TRACE3=3]="TRACE3",e[e.TRACE4=4]="TRACE4",e[e.DEBUG=5]="DEBUG",e[e.DEBUG2=6]="DEBUG2",e[e.DEBUG3=7]="DEBUG3",e[e.DEBUG4=8]="DEBUG4",e[e.INFO=9]="INFO",e[e.INFO2=10]="INFO2",e[e.INFO3=11]="INFO3",e[e.INFO4=12]="INFO4",e[e.WARN=13]="WARN",e[e.WARN2=14]="WARN2",e[e.WARN3=15]="WARN3",e[e.WARN4=16]="WARN4",e[e.ERROR=17]="ERROR",e[e.ERROR2=18]="ERROR2",e[e.ERROR3=19]="ERROR3",e[e.ERROR4=20]="ERROR4",e[e.FATAL=21]="FATAL",e[e.FATAL2=22]="FATAL2",e[e.FATAL3=23]="FATAL3",e[e.FATAL4=24]="FATAL4"}(Bt||(Bt={}));var Qt=function(){function e(){}return e.prototype.emit=function(e){},e}(),Jt=new Qt,$t=function(){function e(){}return e.prototype.getLogger=function(e,t,n){return new Qt},e}(),Xt=new $t,Zt=function(){function e(e,t,n,r){this._provider=e,this.name=t,this.version=n,this.options=r}return e.prototype.emit=function(e){this._getLogger().emit(e)},e.prototype._getLogger=function(){if(this._delegate)return this._delegate;var e=this._provider.getDelegateLogger(this.name,this.version,this.options);return e?(this._delegate=e,this._delegate):Jt},e}(),en=function(){function e(){}return e.prototype.getLogger=function(e,t,n){var r;return null!==(r=this.getDelegateLogger(e,t,n))&&void 0!==r?r:new Zt(this,e,t,n)},e.prototype.getDelegate=function(){var e;return null!==(e=this._delegate)&&void 0!==e?e:Xt},e.prototype.setDelegate=function(e){this._delegate=e},e.prototype.getDelegateLogger=function(e,t,n){var r;return null===(r=this._delegate)||void 0===r?void 0:r.getLogger(e,t,n)},e}(),tn="object"==typeof globalThis?globalThis:"object"==typeof self?self:"object"==typeof window?window:"object"==typeof global?global:{},nn=Symbol.for("io.opentelemetry.js.api.logs"),rn=tn;var on,an,sn=function(){function e(){this._proxyLoggerProvider=new en}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalLoggerProvider=function(e){return rn[nn]?this.getLoggerProvider():(rn[nn]=function(e,t,n){return function(r){return r===e?t:n}}(1,e,Xt),this._proxyLoggerProvider.setDelegate(e),e)},e.prototype.getLoggerProvider=function(){var e,t;return null!==(t=null===(e=rn[nn])||void 0===e?void 0:e.call(rn,1))&&void 0!==t?t:this._proxyLoggerProvider},e.prototype.getLogger=function(e,t,n){return this.getLoggerProvider().getLogger(e,t,n)},e.prototype.disable=function(){delete rn[nn],this._proxyLoggerProvider=new en},e}(),cn=sn.getInstance(),un=Object.freeze({__proto__:null,NOOP_LOGGER:Jt,NOOP_LOGGER_PROVIDER:Xt,NoopLogger:Qt,NoopLoggerProvider:$t,ProxyLogger:Zt,ProxyLoggerProvider:en,get SeverityNumber(){return Bt},logs:cn});function ln(e){var t,n,r=e.tracerProvider||zt.getTracerProvider(),o=e.meterProvider||Ct.getMeterProvider(),i=e.loggerProvider||cn.getLoggerProvider(),a=null!==(n=null===(t=e.instrumentations)||void 0===t?void 0:t.flat())&&void 0!==n?n:[];return function(e,t,n,r){for(var o=0,i=e.length;o<i;o++){var a=e[o];t&&a.setTracerProvider(t),n&&a.setMeterProvider(n),r&&a.setLoggerProvider&&a.setLoggerProvider(r),a.getConfig().enabled||a.enable()}}(a,r,o,i),function(){!function(e){e.forEach((function(e){return e.disable()}))}(a)}}function pn(){if(an)return on;function e(e){return"function"==typeof e}an=1;var t=console.error.bind(console);function n(e,t,n){var r=!!e[t]&&e.propertyIsEnumerable(t);Object.defineProperty(e,t,{configurable:!0,enumerable:r,writable:!0,value:n})}function r(n){n&&n.logger&&(e(n.logger)?t=n.logger:t("new logger isn't a function, not replacing"))}function o(r,o,i){if(r&&r[o]){if(!i)return t("no wrapper function"),void t((new Error).stack);if(e(r[o])&&e(i)){var a=r[o],s=i(a,o);return n(s,"__original",a),n(s,"__unwrap",(function(){r[o]===s&&n(r,o,a)})),n(s,"__wrapped",!0),n(r,o,s),s}t("original object and wrapper must be functions")}else t("no original function "+o+" to wrap")}function i(e,n){return e&&e[n]?e[n].__unwrap?e[n].__unwrap():void t("no original to unwrap to -- has "+n+" already been unwrapped?"):(t("no function to unwrap."),void t((new Error).stack))}return r.wrap=o,r.massWrap=function(e,n,r){if(!e)return t("must provide one or more modules to patch"),void t((new Error).stack);Array.isArray(e)||(e=[e]),n&&Array.isArray(n)?e.forEach((function(e){n.forEach((function(t){o(e,t,r)}))})):t("must provide one or more functions to wrap on modules")},r.unwrap=i,r.massUnwrap=function(e,n){if(!e)return t("must provide one or more modules to patch"),void t((new Error).stack);Array.isArray(e)||(e=[e]),n&&Array.isArray(n)?e.forEach((function(e){n.forEach((function(t){i(e,t)}))})):t("must provide one or more functions to unwrap on modules")},on=r}var dn=pn(),fn=function(){return fn=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},fn.apply(this,arguments)},hn=function(){function e(e,t,n){this.instrumentationName=e,this.instrumentationVersion=t,this._config={},this._wrap=dn.wrap,this._unwrap=dn.unwrap,this._massWrap=dn.massWrap,this._massUnwrap=dn.massUnwrap,this.setConfig(n),this._diag=Nt.createComponentLogger({namespace:e}),this._tracer=zt.getTracer(e,t),this._meter=Ct.getMeter(e,t),this._logger=cn.getLogger(e,t),this._updateMetricInstruments()}return Object.defineProperty(e.prototype,"meter",{get:function(){return this._meter},enumerable:!1,configurable:!0}),e.prototype.setMeterProvider=function(e){this._meter=e.getMeter(this.instrumentationName,this.instrumentationVersion),this._updateMetricInstruments()},Object.defineProperty(e.prototype,"logger",{get:function(){return this._logger},enumerable:!1,configurable:!0}),e.prototype.setLoggerProvider=function(e){this._logger=e.getLogger(this.instrumentationName,this.instrumentationVersion)},e.prototype.getModuleDefinitions=function(){var e,t=null!==(e=this.init())&&void 0!==e?e:[];return Array.isArray(t)?t:[t]},e.prototype._updateMetricInstruments=function(){},e.prototype.getConfig=function(){return this._config},e.prototype.setConfig=function(e){this._config=fn({enabled:!0},e)},e.prototype.setTracerProvider=function(e){this._tracer=e.getTracer(this.instrumentationName,this.instrumentationVersion)},Object.defineProperty(e.prototype,"tracer",{get:function(){return this._tracer},enumerable:!1,configurable:!0}),e.prototype._runSpanCustomizationHook=function(e,t,n,r){if(e)try{e(n,r)}catch(e){this._diag.error("Error running span customization hook due to exception in handler",{triggerName:t},e)}},e}(),mn=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),gn=function(e){function t(t,n,r){var o=e.call(this,t,n,r)||this;return o._config.enabled&&o.enable(),o}return mn(t,e),t}(hn);var _n=function(e,t,n,r,o){this.name=e,this.supportedVersions=t,this.patch=n,this.unpatch=r,this.files=o||[]},yn=function(e,t,n,r){this.supportedVersions=t,this.patch=n,this.unpatch=r,this.name=function(e){return Nt.warn("Path normalization is not implemented for this platform. To silence this warning, ensure no node-specific instrumentations are loaded, and node-specific types (e.g. InstrumentationNodeModuleFile), are not used in a browser context)"),e}(e)},vn=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},bn=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};function En(e,t,n){var r,o;try{o=e()}catch(e){r=e}finally{if(t(r,o),r&&!n)throw r;return o}}function Sn(e){return"function"==typeof e&&"function"==typeof e.__original&&"function"==typeof e.__unwrap&&!0===e.__wrapped}var Tn=Object.freeze({__proto__:null,InstrumentationBase:gn,InstrumentationNodeModuleDefinition:_n,InstrumentationNodeModuleFile:yn,isWrapped:Sn,registerInstrumentations:ln,safeExecuteInTheMiddle:En,safeExecuteInTheMiddleAsync:function(e,t,n){return vn(this,void 0,void 0,(function(){var r,o,i;return bn(this,(function(a){switch(a.label){case 0:return a.trys.push([0,2,3,4]),[4,e()];case 1:return o=a.sent(),[3,4];case 2:return i=a.sent(),r=i,[3,4];case 3:if(t(r,o),r&&!n)throw r;return[2,o];case 4:return[2]}}))}))}}),On=n(Tn);function An(e){let t={};const n=e.length;for(let r=0;r<n;r++){const n=e[r];n&&(t[String(n).toUpperCase().replace(/[-.]/g,"_")]=n)}return t}const wn="aws.lambda.invoked_arn",Rn="db.system",Nn="db.connection_string",In="db.user",Pn="db.jdbc.driver_classname",xn="db.name",Cn="db.statement",Mn="db.operation",Ln="db.mssql.instance_name",Un="db.cassandra.keyspace",kn="db.cassandra.page_size",Dn="db.cassandra.consistency_level",jn="db.cassandra.table",Bn="db.cassandra.idempotence",Vn="db.cassandra.speculative_execution_count",Fn="db.cassandra.coordinator.id",Gn="db.cassandra.coordinator.dc",Hn="db.hbase.namespace",Yn="db.redis.database_index",qn="db.mongodb.collection",zn="db.sql.table",Kn="exception.type",Wn="exception.message",Qn="exception.stacktrace",Jn="exception.escaped",$n="faas.trigger",Xn="faas.execution",Zn="faas.document.collection",er="faas.document.operation",tr="faas.document.time",nr="faas.document.name",rr="faas.time",or="faas.cron",ir="faas.coldstart",ar="faas.invoked_name",sr="faas.invoked_provider",cr="faas.invoked_region",ur="net.transport",lr="net.peer.ip",pr="net.peer.port",dr="net.peer.name",fr="net.host.ip",hr="net.host.port",mr="net.host.name",gr="net.host.connection.type",_r="net.host.connection.subtype",yr="net.host.carrier.name",vr="net.host.carrier.mcc",br="net.host.carrier.mnc",Er="net.host.carrier.icc",Sr="peer.service",Tr="enduser.id",Or="enduser.role",Ar="enduser.scope",wr="thread.id",Rr="thread.name",Nr="code.function",Ir="code.namespace",Pr="code.filepath",xr="code.lineno",Cr="http.method",Mr="http.url",Lr="http.target",Ur="http.host",kr="http.scheme",Dr="http.status_code",jr="http.flavor",Br="http.user_agent",Vr="http.request_content_length",Fr="http.request_content_length_uncompressed",Gr="http.response_content_length",Hr="http.response_content_length_uncompressed",Yr="http.server_name",qr="http.route",zr="http.client_ip",Kr="aws.dynamodb.table_names",Wr="aws.dynamodb.consumed_capacity",Qr="aws.dynamodb.item_collection_metrics",Jr="aws.dynamodb.provisioned_read_capacity",$r="aws.dynamodb.provisioned_write_capacity",Xr="aws.dynamodb.consistent_read",Zr="aws.dynamodb.projection",eo="aws.dynamodb.limit",to="aws.dynamodb.attributes_to_get",no="aws.dynamodb.index_name",ro="aws.dynamodb.select",oo="aws.dynamodb.global_secondary_indexes",io="aws.dynamodb.local_secondary_indexes",ao="aws.dynamodb.exclusive_start_table",so="aws.dynamodb.table_count",co="aws.dynamodb.scan_forward",uo="aws.dynamodb.segment",lo="aws.dynamodb.total_segments",po="aws.dynamodb.count",fo="aws.dynamodb.scanned_count",ho="aws.dynamodb.attribute_definitions",mo="aws.dynamodb.global_secondary_index_updates",go="messaging.system",_o="messaging.destination",yo="messaging.destination_kind",vo="messaging.temp_destination",bo="messaging.protocol",Eo="messaging.protocol_version",So="messaging.url",To="messaging.message_id",Oo="messaging.conversation_id",Ao="messaging.message_payload_size_bytes",wo="messaging.message_payload_compressed_size_bytes",Ro="messaging.operation",No="messaging.consumer_id",Io="messaging.rabbitmq.routing_key",Po="messaging.kafka.message_key",xo="messaging.kafka.consumer_group",Co="messaging.kafka.client_id",Mo="messaging.kafka.partition",Lo="messaging.kafka.tombstone",Uo="rpc.system",ko="rpc.service",Do="rpc.method",jo="rpc.grpc.status_code",Bo="rpc.jsonrpc.version",Vo="rpc.jsonrpc.request_id",Fo="rpc.jsonrpc.error_code",Go="rpc.jsonrpc.error_message",Ho="message.type",Yo="message.id",qo="message.compressed_size",zo="message.uncompressed_size",Ko=wn,Wo=Rn,Qo=Nn,Jo=In,$o=Pn,Xo=xn,Zo=Cn,ei=Mn,ti=Ln,ni=Un,ri=kn,oi=Dn,ii=jn,ai=Bn,si=Vn,ci=Fn,ui=Gn,li=Hn,pi=Yn,di=qn,fi=zn,hi=Kn,mi=Wn,gi=Qn,_i=Jn,yi=$n,vi=Xn,bi=Zn,Ei=er,Si=tr,Ti=nr,Oi=rr,Ai=or,wi=ir,Ri=ar,Ni=sr,Ii=cr,Pi=ur,xi=lr,Ci=pr,Mi=dr,Li=fr,Ui=hr,ki=mr,Di=gr,ji=_r,Bi=yr,Vi=vr,Fi=br,Gi=Er,Hi=Sr,Yi=Tr,qi=Or,zi=Ar,Ki=wr,Wi=Rr,Qi=Nr,Ji=Ir,$i=Pr,Xi=xr,Zi=Cr,ea=Mr,ta=Lr,na=Ur,ra=kr,oa=Dr,ia=jr,aa=Br,sa=Vr,ca=Fr,ua=Gr,la=Hr,pa=Yr,da=qr,fa=zr,ha=Kr,ma=Wr,ga=Qr,_a=Jr,ya=$r,va=Xr,ba=Zr,Ea=eo,Sa=to,Ta=no,Oa=ro,Aa=oo,wa=io,Ra=ao,Na=so,Ia=co,Pa=uo,xa=lo,Ca=po,Ma=fo,La=ho,Ua=mo,ka=go,Da=_o,ja=yo,Ba=vo,Va=bo,Fa=Eo,Ga=So,Ha=To,Ya=Oo,qa=Ao,za=wo,Ka=Ro,Wa=No,Qa=Io,Ja=Po,$a=xo,Xa=Co,Za=Mo,es=Lo,ts=Uo,ns=ko,rs=Do,os=jo,is=Bo,as=Vo,ss=Fo,cs=Go,us=Ho,ls=Yo,ps=qo,ds=zo,fs=An([wn,Rn,Nn,In,Pn,xn,Cn,Mn,Ln,Un,kn,Dn,jn,Bn,Vn,Fn,Gn,Hn,Yn,qn,zn,Kn,Wn,Qn,Jn,$n,Xn,Zn,er,tr,nr,rr,or,ir,ar,sr,cr,ur,lr,pr,dr,fr,hr,mr,gr,_r,yr,vr,br,Er,Sr,Tr,Or,Ar,wr,Rr,Nr,Ir,Pr,xr,Cr,Mr,Lr,Ur,kr,Dr,jr,Br,Vr,Fr,Gr,Hr,Yr,qr,zr,Kr,Wr,Qr,Jr,$r,Xr,Zr,eo,to,no,ro,oo,io,ao,so,co,uo,lo,po,fo,ho,mo,go,_o,yo,vo,bo,Eo,So,To,Oo,Ao,wo,Ro,No,Io,Po,xo,Co,Mo,Lo,Uo,ko,Do,jo,Bo,Vo,Fo,Go,Ho,Yo,qo,zo]),hs="other_sql",ms="mssql",gs="mysql",_s="oracle",ys="postgresql",vs="redshift",bs="hive",Es="cloudscape",Ss="hsqldb",Ts="progress",Os="maxdb",As="hanadb",ws="ingres",Rs="firstsql",Ns="cache",Is="adabas",Ps="firebird",xs="derby",Cs="filemaker",Ms="informix",Ls="instantdb",Us="interbase",ks="mariadb",Ds="netezza",js="pervasive",Bs="pointbase",Vs="sqlite",Fs="sybase",Gs="teradata",Hs="vertica",Ys="coldfusion",qs="cassandra",zs="hbase",Ks="mongodb",Ws="redis",Qs="couchbase",Js="couchdb",$s="cosmosdb",Xs="dynamodb",Zs="neo4j",ec="geode",tc="elasticsearch",nc="memcached",rc="cockroachdb",oc=hs,ic=ms,ac=gs,sc=_s,cc=ys,uc=vs,lc=bs,pc=Es,dc=Ss,fc=Ts,hc=Os,mc=As,gc=ws,_c=Rs,yc=Ns,vc=Is,bc=Ps,Ec=xs,Sc=Cs,Tc=Ms,Oc=Ls,Ac=Us,wc=ks,Rc=Ds,Nc=js,Ic=Bs,Pc=Vs,xc=Fs,Cc=Gs,Mc=Hs,Lc=Ys,Uc=qs,kc=zs,Dc=Ks,jc=Ws,Bc=Qs,Vc=Js,Fc=$s,Gc=Xs,Hc=Zs,Yc=ec,qc=tc,zc=nc,Kc=rc,Wc=An([hs,ms,gs,_s,"db2",ys,vs,bs,Es,Ss,Ts,Os,As,ws,Rs,"edb",Ns,Is,Ps,xs,Cs,Ms,Ls,Us,ks,Ds,js,Bs,Vs,Fs,Gs,Hs,"h2",Ys,qs,zs,Ks,Ws,Qs,Js,$s,Xs,Zs,ec,tc,nc,rc]),Qc="each_quorum",Jc="quorum",$c="local_quorum",Xc="three",Zc="local_one",eu="serial",tu="local_serial",nu=Qc,ru=Jc,ou=$c,iu=Xc,au=Zc,su=eu,cu=tu,uu=An(["all",Qc,Jc,$c,"one","two",Xc,Zc,"any",eu,tu]),lu="datasource",pu="http",du="pubsub",fu="timer",hu="other",mu=lu,gu=pu,_u=du,yu=fu,vu=hu,bu=An([lu,pu,du,fu,hu]),Eu="insert",Su="edit",Tu="delete",Ou=Eu,Au=Su,wu=Tu,Ru=An([Eu,Su,Tu]),Nu="alibaba_cloud",Iu="azure",Pu=Nu,xu=Iu,Cu=An([Nu,"aws",Iu,"gcp"]),Mu="ip_tcp",Lu="ip_udp",Uu="unix",ku="pipe",Du="inproc",ju="other",Bu=Mu,Vu=Lu,Fu=Uu,Gu=ku,Hu=Du,Yu=ju,qu=An([Mu,Lu,"ip",Uu,ku,Du,ju]),zu="wifi",Ku="wired",Wu="cell",Qu="unavailable",Ju="unknown",$u=zu,Xu=Ku,Zu=Wu,el=Qu,tl=Ju,nl=An([zu,Ku,Wu,Qu,Ju]),rl="gprs",ol="edge",il="umts",al="cdma",sl="evdo_0",cl="evdo_a",ul="cdma2000_1xrtt",ll="hsdpa",pl="hsupa",dl="hspa",fl="iden",hl="evdo_b",ml="ehrpd",gl="hspap",_l="td_scdma",yl="iwlan",vl="nrnsa",bl="lte_ca",El=rl,Sl=ol,Tl=il,Ol=al,Al=sl,wl=cl,Rl=ul,Nl=ll,Il=pl,Pl=dl,xl=fl,Cl=hl,Ml=ml,Ll=gl,Ul=_l,kl=yl,Dl=vl,jl=bl,Bl=An([rl,ol,il,al,sl,cl,ul,ll,pl,dl,fl,hl,"lte",ml,gl,"gsm",_l,yl,"nr",vl,bl]),Vl="SPDY",Fl="QUIC",Gl=Vl,Hl=Fl,Yl={HTTP_1_0:"1.0",HTTP_1_1:"1.1",HTTP_2_0:"2.0",SPDY:Vl,QUIC:Fl},ql="queue",zl="topic",Kl=ql,Wl=zl,Ql=An([ql,zl]),Jl="receive",$l="process",Xl=Jl,Zl=$l,ep=An([Jl,$l]),tp={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},np="SENT",rp="RECEIVED",op=np,ip=rp,ap=An([np,rp]),sp="cloud.provider",cp="cloud.account.id",up="cloud.region",lp="cloud.availability_zone",pp="cloud.platform",dp="aws.ecs.container.arn",fp="aws.ecs.cluster.arn",hp="aws.ecs.launchtype",mp="aws.ecs.task.arn",gp="aws.ecs.task.family",_p="aws.ecs.task.revision",yp="aws.eks.cluster.arn",vp="aws.log.group.names",bp="aws.log.group.arns",Ep="aws.log.stream.names",Sp="aws.log.stream.arns",Tp="container.name",Op="container.id",Ap="container.runtime",wp="container.image.name",Rp="container.image.tag",Np="deployment.environment",Ip="device.id",Pp="device.model.identifier",xp="device.model.name",Cp="faas.name",Mp="faas.id",Lp="faas.version",Up="faas.instance",kp="faas.max_memory",Dp="host.id",jp="host.name",Bp="host.type",Vp="host.arch",Fp="host.image.name",Gp="host.image.id",Hp="host.image.version",Yp="k8s.cluster.name",qp="k8s.node.name",zp="k8s.node.uid",Kp="k8s.namespace.name",Wp="k8s.pod.uid",Qp="k8s.pod.name",Jp="k8s.container.name",$p="k8s.replicaset.uid",Xp="k8s.replicaset.name",Zp="k8s.deployment.uid",ed="k8s.deployment.name",td="k8s.statefulset.uid",nd="k8s.statefulset.name",rd="k8s.daemonset.uid",od="k8s.daemonset.name",id="k8s.job.uid",ad="k8s.job.name",sd="k8s.cronjob.uid",cd="k8s.cronjob.name",ud="os.type",ld="os.description",pd="os.name",dd="os.version",fd="process.pid",hd="process.executable.name",md="process.executable.path",gd="process.command",_d="process.command_line",yd="process.command_args",vd="process.owner",bd="process.runtime.name",Ed="process.runtime.version",Sd="process.runtime.description",Td="service.name",Od="service.namespace",Ad="service.instance.id",wd="service.version",Rd="telemetry.sdk.name",Nd="telemetry.sdk.language",Id="telemetry.sdk.version",Pd="telemetry.auto.version",xd="webengine.name",Cd="webengine.version",Md="webengine.description",Ld=sp,Ud=cp,kd=up,Dd=lp,jd=pp,Bd=dp,Vd=fp,Fd=hp,Gd=mp,Hd=gp,Yd=_p,qd=yp,zd=vp,Kd=bp,Wd=Ep,Qd=Sp,Jd=Tp,$d=Op,Xd=Ap,Zd=wp,ef=Rp,tf=Np,nf=Ip,rf=Pp,of=xp,af=Cp,sf=Mp,cf=Lp,uf=Up,lf=kp,pf=Dp,df=jp,ff=Bp,hf=Vp,mf=Fp,gf=Gp,_f=Hp,yf=Yp,vf=qp,bf=zp,Ef=Kp,Sf=Wp,Tf=Qp,Of=Jp,Af=$p,wf=Xp,Rf=Zp,Nf=ed,If=td,Pf=nd,xf=rd,Cf=od,Mf=id,Lf=ad,Uf=sd,kf=cd,Df=ud,jf=ld,Bf=pd,Vf=dd,Ff=fd,Gf=hd,Hf=md,Yf=gd,qf=_d,zf=yd,Kf=vd,Wf=bd,Qf=Ed,Jf=Sd,$f=Td,Xf=Od,Zf=Ad,eh=wd,th=Rd,nh=Nd,rh=Id,oh=Pd,ih=xd,ah=Cd,sh=Md,ch=An([sp,cp,up,lp,pp,dp,fp,hp,mp,gp,_p,yp,vp,bp,Ep,Sp,Tp,Op,Ap,wp,Rp,Np,Ip,Pp,xp,Cp,Mp,Lp,Up,kp,Dp,jp,Bp,Vp,Fp,Gp,Hp,Yp,qp,zp,Kp,Wp,Qp,Jp,$p,Xp,Zp,ed,td,nd,rd,od,id,ad,sd,cd,ud,ld,pd,dd,fd,hd,md,gd,_d,yd,vd,bd,Ed,Sd,Td,Od,Ad,wd,Rd,Nd,Id,Pd,xd,Cd,Md]),uh="alibaba_cloud",lh="azure",ph=uh,dh=lh,fh=An([uh,"aws",lh,"gcp"]),hh="alibaba_cloud_ecs",mh="alibaba_cloud_fc",gh="aws_ec2",_h="aws_ecs",yh="aws_eks",vh="aws_lambda",bh="aws_elastic_beanstalk",Eh="azure_vm",Sh="azure_container_instances",Th="azure_aks",Oh="azure_functions",Ah="azure_app_service",wh="gcp_compute_engine",Rh="gcp_cloud_run",Nh="gcp_kubernetes_engine",Ih="gcp_cloud_functions",Ph="gcp_app_engine",xh=hh,Ch=mh,Mh=gh,Lh=_h,Uh=yh,kh=vh,Dh=bh,jh=Eh,Bh=Sh,Vh=Th,Fh=Oh,Gh=Ah,Hh=wh,Yh=Rh,qh=Nh,zh=Ih,Kh=Ph,Wh=An([hh,mh,gh,_h,yh,vh,bh,Eh,Sh,Th,Oh,Ah,wh,Rh,Nh,Ih,Ph]),Qh="fargate",Jh=Qh,$h=An(["ec2",Qh]),Xh="amd64",Zh="arm32",em="arm64",tm="ia64",nm="ppc32",rm="ppc64",om=Xh,im=Zh,am=em,sm=tm,cm=nm,um=rm,lm=An([Xh,Zh,em,tm,nm,rm,"x86"]),pm="windows",dm="linux",fm="darwin",hm="freebsd",mm="netbsd",gm="openbsd",_m="dragonflybsd",ym="hpux",vm="solaris",bm="z_os",Em=pm,Sm=dm,Tm=fm,Om=hm,Am=mm,wm=gm,Rm=_m,Nm=ym,Im=vm,Pm=bm,xm=An([pm,dm,fm,hm,mm,gm,_m,ym,"aix",vm,bm]),Cm="dotnet",Mm="erlang",Lm="java",Um="nodejs",km="python",Dm="ruby",jm="webjs",Bm=Cm,Vm=Mm,Fm=Lm,Gm=Um,Hm=km,Ym=Dm,qm=jm,zm=An(["cpp",Cm,Mm,"go",Lm,Um,"php",km,Dm,jm]);var Km=n(Object.freeze({__proto__:null,ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_ABORTED:"aborted",ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_HANDLED:"handled",ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_SKIPPED:"skipped",ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT_VALUE_UNHANDLED:"unhandled",ASPNETCORE_RATE_LIMITING_RESULT_VALUE_ACQUIRED:"acquired",ASPNETCORE_RATE_LIMITING_RESULT_VALUE_ENDPOINT_LIMITER:"endpoint_limiter",ASPNETCORE_RATE_LIMITING_RESULT_VALUE_GLOBAL_LIMITER:"global_limiter",ASPNETCORE_RATE_LIMITING_RESULT_VALUE_REQUEST_CANCELED:"request_canceled",ASPNETCORE_ROUTING_MATCH_STATUS_VALUE_FAILURE:"failure",ASPNETCORE_ROUTING_MATCH_STATUS_VALUE_SUCCESS:"success",ATTR_ASPNETCORE_DIAGNOSTICS_EXCEPTION_RESULT:"aspnetcore.diagnostics.exception.result",ATTR_ASPNETCORE_DIAGNOSTICS_HANDLER_TYPE:"aspnetcore.diagnostics.handler.type",ATTR_ASPNETCORE_RATE_LIMITING_POLICY:"aspnetcore.rate_limiting.policy",ATTR_ASPNETCORE_RATE_LIMITING_RESULT:"aspnetcore.rate_limiting.result",ATTR_ASPNETCORE_REQUEST_IS_UNHANDLED:"aspnetcore.request.is_unhandled",ATTR_ASPNETCORE_ROUTING_IS_FALLBACK:"aspnetcore.routing.is_fallback",ATTR_ASPNETCORE_ROUTING_MATCH_STATUS:"aspnetcore.routing.match_status",ATTR_CLIENT_ADDRESS:"client.address",ATTR_CLIENT_PORT:"client.port",ATTR_CODE_COLUMN_NUMBER:"code.column.number",ATTR_CODE_FILE_PATH:"code.file.path",ATTR_CODE_FUNCTION_NAME:"code.function.name",ATTR_CODE_LINE_NUMBER:"code.line.number",ATTR_CODE_STACKTRACE:"code.stacktrace",ATTR_DB_COLLECTION_NAME:"db.collection.name",ATTR_DB_NAMESPACE:"db.namespace",ATTR_DB_OPERATION_BATCH_SIZE:"db.operation.batch.size",ATTR_DB_OPERATION_NAME:"db.operation.name",ATTR_DB_QUERY_SUMMARY:"db.query.summary",ATTR_DB_QUERY_TEXT:"db.query.text",ATTR_DB_RESPONSE_STATUS_CODE:"db.response.status_code",ATTR_DB_STORED_PROCEDURE_NAME:"db.stored_procedure.name",ATTR_DB_SYSTEM_NAME:"db.system.name",ATTR_DOTNET_GC_HEAP_GENERATION:"dotnet.gc.heap.generation",ATTR_ERROR_TYPE:"error.type",ATTR_EXCEPTION_ESCAPED:"exception.escaped",ATTR_EXCEPTION_MESSAGE:"exception.message",ATTR_EXCEPTION_STACKTRACE:"exception.stacktrace",ATTR_EXCEPTION_TYPE:"exception.type",ATTR_HTTP_REQUEST_HEADER:e=>`http.request.header.${e}`,ATTR_HTTP_REQUEST_METHOD:"http.request.method",ATTR_HTTP_REQUEST_METHOD_ORIGINAL:"http.request.method_original",ATTR_HTTP_REQUEST_RESEND_COUNT:"http.request.resend_count",ATTR_HTTP_RESPONSE_HEADER:e=>`http.response.header.${e}`,ATTR_HTTP_RESPONSE_STATUS_CODE:"http.response.status_code",ATTR_HTTP_ROUTE:"http.route",ATTR_JVM_GC_ACTION:"jvm.gc.action",ATTR_JVM_GC_NAME:"jvm.gc.name",ATTR_JVM_MEMORY_POOL_NAME:"jvm.memory.pool.name",ATTR_JVM_MEMORY_TYPE:"jvm.memory.type",ATTR_JVM_THREAD_DAEMON:"jvm.thread.daemon",ATTR_JVM_THREAD_STATE:"jvm.thread.state",ATTR_NETWORK_LOCAL_ADDRESS:"network.local.address",ATTR_NETWORK_LOCAL_PORT:"network.local.port",ATTR_NETWORK_PEER_ADDRESS:"network.peer.address",ATTR_NETWORK_PEER_PORT:"network.peer.port",ATTR_NETWORK_PROTOCOL_NAME:"network.protocol.name",ATTR_NETWORK_PROTOCOL_VERSION:"network.protocol.version",ATTR_NETWORK_TRANSPORT:"network.transport",ATTR_NETWORK_TYPE:"network.type",ATTR_OTEL_SCOPE_NAME:"otel.scope.name",ATTR_OTEL_SCOPE_VERSION:"otel.scope.version",ATTR_OTEL_STATUS_CODE:"otel.status_code",ATTR_OTEL_STATUS_DESCRIPTION:"otel.status_description",ATTR_SERVER_ADDRESS:"server.address",ATTR_SERVER_PORT:"server.port",ATTR_SERVICE_NAME:"service.name",ATTR_SERVICE_VERSION:"service.version",ATTR_SIGNALR_CONNECTION_STATUS:"signalr.connection.status",ATTR_SIGNALR_TRANSPORT:"signalr.transport",ATTR_TELEMETRY_SDK_LANGUAGE:"telemetry.sdk.language",ATTR_TELEMETRY_SDK_NAME:"telemetry.sdk.name",ATTR_TELEMETRY_SDK_VERSION:"telemetry.sdk.version",ATTR_URL_FRAGMENT:"url.fragment",ATTR_URL_FULL:"url.full",ATTR_URL_PATH:"url.path",ATTR_URL_QUERY:"url.query",ATTR_URL_SCHEME:"url.scheme",ATTR_USER_AGENT_ORIGINAL:"user_agent.original",AWSECSLAUNCHTYPEVALUES_EC2:"ec2",AWSECSLAUNCHTYPEVALUES_FARGATE:Jh,AwsEcsLaunchtypeValues:$h,CLOUDPLATFORMVALUES_ALIBABA_CLOUD_ECS:xh,CLOUDPLATFORMVALUES_ALIBABA_CLOUD_FC:Ch,CLOUDPLATFORMVALUES_AWS_EC2:Mh,CLOUDPLATFORMVALUES_AWS_ECS:Lh,CLOUDPLATFORMVALUES_AWS_EKS:Uh,CLOUDPLATFORMVALUES_AWS_ELASTIC_BEANSTALK:Dh,CLOUDPLATFORMVALUES_AWS_LAMBDA:kh,CLOUDPLATFORMVALUES_AZURE_AKS:Vh,CLOUDPLATFORMVALUES_AZURE_APP_SERVICE:Gh,CLOUDPLATFORMVALUES_AZURE_CONTAINER_INSTANCES:Bh,CLOUDPLATFORMVALUES_AZURE_FUNCTIONS:Fh,CLOUDPLATFORMVALUES_AZURE_VM:jh,CLOUDPLATFORMVALUES_GCP_APP_ENGINE:Kh,CLOUDPLATFORMVALUES_GCP_CLOUD_FUNCTIONS:zh,CLOUDPLATFORMVALUES_GCP_CLOUD_RUN:Yh,CLOUDPLATFORMVALUES_GCP_COMPUTE_ENGINE:Hh,CLOUDPLATFORMVALUES_GCP_KUBERNETES_ENGINE:qh,CLOUDPROVIDERVALUES_ALIBABA_CLOUD:ph,CLOUDPROVIDERVALUES_AWS:"aws",CLOUDPROVIDERVALUES_AZURE:dh,CLOUDPROVIDERVALUES_GCP:"gcp",CloudPlatformValues:Wh,CloudProviderValues:fh,DBCASSANDRACONSISTENCYLEVELVALUES_ALL:"all",DBCASSANDRACONSISTENCYLEVELVALUES_ANY:"any",DBCASSANDRACONSISTENCYLEVELVALUES_EACH_QUORUM:nu,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_ONE:au,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_QUORUM:ou,DBCASSANDRACONSISTENCYLEVELVALUES_LOCAL_SERIAL:cu,DBCASSANDRACONSISTENCYLEVELVALUES_ONE:"one",DBCASSANDRACONSISTENCYLEVELVALUES_QUORUM:ru,DBCASSANDRACONSISTENCYLEVELVALUES_SERIAL:su,DBCASSANDRACONSISTENCYLEVELVALUES_THREE:iu,DBCASSANDRACONSISTENCYLEVELVALUES_TWO:"two",DBSYSTEMVALUES_ADABAS:vc,DBSYSTEMVALUES_CACHE:yc,DBSYSTEMVALUES_CASSANDRA:Uc,DBSYSTEMVALUES_CLOUDSCAPE:pc,DBSYSTEMVALUES_COCKROACHDB:Kc,DBSYSTEMVALUES_COLDFUSION:Lc,DBSYSTEMVALUES_COSMOSDB:Fc,DBSYSTEMVALUES_COUCHBASE:Bc,DBSYSTEMVALUES_COUCHDB:Vc,DBSYSTEMVALUES_DB2:"db2",DBSYSTEMVALUES_DERBY:Ec,DBSYSTEMVALUES_DYNAMODB:Gc,DBSYSTEMVALUES_EDB:"edb",DBSYSTEMVALUES_ELASTICSEARCH:qc,DBSYSTEMVALUES_FILEMAKER:Sc,DBSYSTEMVALUES_FIREBIRD:bc,DBSYSTEMVALUES_FIRSTSQL:_c,DBSYSTEMVALUES_GEODE:Yc,DBSYSTEMVALUES_H2:"h2",DBSYSTEMVALUES_HANADB:mc,DBSYSTEMVALUES_HBASE:kc,DBSYSTEMVALUES_HIVE:lc,DBSYSTEMVALUES_HSQLDB:dc,DBSYSTEMVALUES_INFORMIX:Tc,DBSYSTEMVALUES_INGRES:gc,DBSYSTEMVALUES_INSTANTDB:Oc,DBSYSTEMVALUES_INTERBASE:Ac,DBSYSTEMVALUES_MARIADB:wc,DBSYSTEMVALUES_MAXDB:hc,DBSYSTEMVALUES_MEMCACHED:zc,DBSYSTEMVALUES_MONGODB:Dc,DBSYSTEMVALUES_MSSQL:ic,DBSYSTEMVALUES_MYSQL:ac,DBSYSTEMVALUES_NEO4J:Hc,DBSYSTEMVALUES_NETEZZA:Rc,DBSYSTEMVALUES_ORACLE:sc,DBSYSTEMVALUES_OTHER_SQL:oc,DBSYSTEMVALUES_PERVASIVE:Nc,DBSYSTEMVALUES_POINTBASE:Ic,DBSYSTEMVALUES_POSTGRESQL:cc,DBSYSTEMVALUES_PROGRESS:fc,DBSYSTEMVALUES_REDIS:jc,DBSYSTEMVALUES_REDSHIFT:uc,DBSYSTEMVALUES_SQLITE:Pc,DBSYSTEMVALUES_SYBASE:xc,DBSYSTEMVALUES_TERADATA:Cc,DBSYSTEMVALUES_VERTICA:Mc,DB_SYSTEM_NAME_VALUE_ACTIAN_INGRES:"actian.ingres",DB_SYSTEM_NAME_VALUE_AWS_DYNAMODB:"aws.dynamodb",DB_SYSTEM_NAME_VALUE_AWS_REDSHIFT:"aws.redshift",DB_SYSTEM_NAME_VALUE_AZURE_COSMOSDB:"azure.cosmosdb",DB_SYSTEM_NAME_VALUE_CASSANDRA:"cassandra",DB_SYSTEM_NAME_VALUE_CLICKHOUSE:"clickhouse",DB_SYSTEM_NAME_VALUE_COCKROACHDB:"cockroachdb",DB_SYSTEM_NAME_VALUE_COUCHBASE:"couchbase",DB_SYSTEM_NAME_VALUE_COUCHDB:"couchdb",DB_SYSTEM_NAME_VALUE_DERBY:"derby",DB_SYSTEM_NAME_VALUE_ELASTICSEARCH:"elasticsearch",DB_SYSTEM_NAME_VALUE_FIREBIRDSQL:"firebirdsql",DB_SYSTEM_NAME_VALUE_GCP_SPANNER:"gcp.spanner",DB_SYSTEM_NAME_VALUE_GEODE:"geode",DB_SYSTEM_NAME_VALUE_H2DATABASE:"h2database",DB_SYSTEM_NAME_VALUE_HBASE:"hbase",DB_SYSTEM_NAME_VALUE_HIVE:"hive",DB_SYSTEM_NAME_VALUE_HSQLDB:"hsqldb",DB_SYSTEM_NAME_VALUE_IBM_DB2:"ibm.db2",DB_SYSTEM_NAME_VALUE_IBM_INFORMIX:"ibm.informix",DB_SYSTEM_NAME_VALUE_IBM_NETEZZA:"ibm.netezza",DB_SYSTEM_NAME_VALUE_INFLUXDB:"influxdb",DB_SYSTEM_NAME_VALUE_INSTANTDB:"instantdb",DB_SYSTEM_NAME_VALUE_INTERSYSTEMS_CACHE:"intersystems.cache",DB_SYSTEM_NAME_VALUE_MARIADB:"mariadb",DB_SYSTEM_NAME_VALUE_MEMCACHED:"memcached",DB_SYSTEM_NAME_VALUE_MICROSOFT_SQL_SERVER:"microsoft.sql_server",DB_SYSTEM_NAME_VALUE_MONGODB:"mongodb",DB_SYSTEM_NAME_VALUE_MYSQL:"mysql",DB_SYSTEM_NAME_VALUE_NEO4J:"neo4j",DB_SYSTEM_NAME_VALUE_OPENSEARCH:"opensearch",DB_SYSTEM_NAME_VALUE_ORACLE_DB:"oracle.db",DB_SYSTEM_NAME_VALUE_OTHER_SQL:"other_sql",DB_SYSTEM_NAME_VALUE_POSTGRESQL:"postgresql",DB_SYSTEM_NAME_VALUE_REDIS:"redis",DB_SYSTEM_NAME_VALUE_SAP_HANA:"sap.hana",DB_SYSTEM_NAME_VALUE_SAP_MAXDB:"sap.maxdb",DB_SYSTEM_NAME_VALUE_SOFTWAREAG_ADABAS:"softwareag.adabas",DB_SYSTEM_NAME_VALUE_SQLITE:"sqlite",DB_SYSTEM_NAME_VALUE_TERADATA:"teradata",DB_SYSTEM_NAME_VALUE_TRINO:"trino",DOTNET_GC_HEAP_GENERATION_VALUE_GEN0:"gen0",DOTNET_GC_HEAP_GENERATION_VALUE_GEN1:"gen1",DOTNET_GC_HEAP_GENERATION_VALUE_GEN2:"gen2",DOTNET_GC_HEAP_GENERATION_VALUE_LOH:"loh",DOTNET_GC_HEAP_GENERATION_VALUE_POH:"poh",DbCassandraConsistencyLevelValues:uu,DbSystemValues:Wc,ERROR_TYPE_VALUE_OTHER:"_OTHER",FAASDOCUMENTOPERATIONVALUES_DELETE:wu,FAASDOCUMENTOPERATIONVALUES_EDIT:Au,FAASDOCUMENTOPERATIONVALUES_INSERT:Ou,FAASINVOKEDPROVIDERVALUES_ALIBABA_CLOUD:Pu,FAASINVOKEDPROVIDERVALUES_AWS:"aws",FAASINVOKEDPROVIDERVALUES_AZURE:xu,FAASINVOKEDPROVIDERVALUES_GCP:"gcp",FAASTRIGGERVALUES_DATASOURCE:mu,FAASTRIGGERVALUES_HTTP:gu,FAASTRIGGERVALUES_OTHER:vu,FAASTRIGGERVALUES_PUBSUB:_u,FAASTRIGGERVALUES_TIMER:yu,FaasDocumentOperationValues:Ru,FaasInvokedProviderValues:Cu,FaasTriggerValues:bu,HOSTARCHVALUES_AMD64:om,HOSTARCHVALUES_ARM32:im,HOSTARCHVALUES_ARM64:am,HOSTARCHVALUES_IA64:sm,HOSTARCHVALUES_PPC32:cm,HOSTARCHVALUES_PPC64:um,HOSTARCHVALUES_X86:"x86",HTTPFLAVORVALUES_HTTP_1_0:"1.0",HTTPFLAVORVALUES_HTTP_1_1:"1.1",HTTPFLAVORVALUES_HTTP_2_0:"2.0",HTTPFLAVORVALUES_QUIC:Hl,HTTPFLAVORVALUES_SPDY:Gl,HTTP_REQUEST_METHOD_VALUE_CONNECT:"CONNECT",HTTP_REQUEST_METHOD_VALUE_DELETE:"DELETE",HTTP_REQUEST_METHOD_VALUE_GET:"GET",HTTP_REQUEST_METHOD_VALUE_HEAD:"HEAD",HTTP_REQUEST_METHOD_VALUE_OPTIONS:"OPTIONS",HTTP_REQUEST_METHOD_VALUE_OTHER:"_OTHER",HTTP_REQUEST_METHOD_VALUE_PATCH:"PATCH",HTTP_REQUEST_METHOD_VALUE_POST:"POST",HTTP_REQUEST_METHOD_VALUE_PUT:"PUT",HTTP_REQUEST_METHOD_VALUE_TRACE:"TRACE",HostArchValues:lm,HttpFlavorValues:Yl,JVM_MEMORY_TYPE_VALUE_HEAP:"heap",JVM_MEMORY_TYPE_VALUE_NON_HEAP:"non_heap",JVM_THREAD_STATE_VALUE_BLOCKED:"blocked",JVM_THREAD_STATE_VALUE_NEW:"new",JVM_THREAD_STATE_VALUE_RUNNABLE:"runnable",JVM_THREAD_STATE_VALUE_TERMINATED:"terminated",JVM_THREAD_STATE_VALUE_TIMED_WAITING:"timed_waiting",JVM_THREAD_STATE_VALUE_WAITING:"waiting",MESSAGETYPEVALUES_RECEIVED:ip,MESSAGETYPEVALUES_SENT:op,MESSAGINGDESTINATIONKINDVALUES_QUEUE:Kl,MESSAGINGDESTINATIONKINDVALUES_TOPIC:Wl,MESSAGINGOPERATIONVALUES_PROCESS:Zl,MESSAGINGOPERATIONVALUES_RECEIVE:Xl,METRIC_ASPNETCORE_DIAGNOSTICS_EXCEPTIONS:"aspnetcore.diagnostics.exceptions",METRIC_ASPNETCORE_RATE_LIMITING_ACTIVE_REQUEST_LEASES:"aspnetcore.rate_limiting.active_request_leases",METRIC_ASPNETCORE_RATE_LIMITING_QUEUED_REQUESTS:"aspnetcore.rate_limiting.queued_requests",METRIC_ASPNETCORE_RATE_LIMITING_REQUESTS:"aspnetcore.rate_limiting.requests",METRIC_ASPNETCORE_RATE_LIMITING_REQUEST_LEASE_DURATION:"aspnetcore.rate_limiting.request_lease.duration",METRIC_ASPNETCORE_RATE_LIMITING_REQUEST_TIME_IN_QUEUE:"aspnetcore.rate_limiting.request.time_in_queue",METRIC_ASPNETCORE_ROUTING_MATCH_ATTEMPTS:"aspnetcore.routing.match_attempts",METRIC_DB_CLIENT_OPERATION_DURATION:"db.client.operation.duration",METRIC_DOTNET_ASSEMBLY_COUNT:"dotnet.assembly.count",METRIC_DOTNET_EXCEPTIONS:"dotnet.exceptions",METRIC_DOTNET_GC_COLLECTIONS:"dotnet.gc.collections",METRIC_DOTNET_GC_HEAP_TOTAL_ALLOCATED:"dotnet.gc.heap.total_allocated",METRIC_DOTNET_GC_LAST_COLLECTION_HEAP_FRAGMENTATION_SIZE:"dotnet.gc.last_collection.heap.fragmentation.size",METRIC_DOTNET_GC_LAST_COLLECTION_HEAP_SIZE:"dotnet.gc.last_collection.heap.size",METRIC_DOTNET_GC_LAST_COLLECTION_MEMORY_COMMITTED_SIZE:"dotnet.gc.last_collection.memory.committed_size",METRIC_DOTNET_GC_PAUSE_TIME:"dotnet.gc.pause.time",METRIC_DOTNET_JIT_COMPILATION_TIME:"dotnet.jit.compilation.time",METRIC_DOTNET_JIT_COMPILED_IL_SIZE:"dotnet.jit.compiled_il.size",METRIC_DOTNET_JIT_COMPILED_METHODS:"dotnet.jit.compiled_methods",METRIC_DOTNET_MONITOR_LOCK_CONTENTIONS:"dotnet.monitor.lock_contentions",METRIC_DOTNET_PROCESS_CPU_COUNT:"dotnet.process.cpu.count",METRIC_DOTNET_PROCESS_CPU_TIME:"dotnet.process.cpu.time",METRIC_DOTNET_PROCESS_MEMORY_WORKING_SET:"dotnet.process.memory.working_set",METRIC_DOTNET_THREAD_POOL_QUEUE_LENGTH:"dotnet.thread_pool.queue.length",METRIC_DOTNET_THREAD_POOL_THREAD_COUNT:"dotnet.thread_pool.thread.count",METRIC_DOTNET_THREAD_POOL_WORK_ITEM_COUNT:"dotnet.thread_pool.work_item.count",METRIC_DOTNET_TIMER_COUNT:"dotnet.timer.count",METRIC_HTTP_CLIENT_REQUEST_DURATION:"http.client.request.duration",METRIC_HTTP_SERVER_REQUEST_DURATION:"http.server.request.duration",METRIC_JVM_CLASS_COUNT:"jvm.class.count",METRIC_JVM_CLASS_LOADED:"jvm.class.loaded",METRIC_JVM_CLASS_UNLOADED:"jvm.class.unloaded",METRIC_JVM_CPU_COUNT:"jvm.cpu.count",METRIC_JVM_CPU_RECENT_UTILIZATION:"jvm.cpu.recent_utilization",METRIC_JVM_CPU_TIME:"jvm.cpu.time",METRIC_JVM_GC_DURATION:"jvm.gc.duration",METRIC_JVM_MEMORY_COMMITTED:"jvm.memory.committed",METRIC_JVM_MEMORY_LIMIT:"jvm.memory.limit",METRIC_JVM_MEMORY_USED:"jvm.memory.used",METRIC_JVM_MEMORY_USED_AFTER_LAST_GC:"jvm.memory.used_after_last_gc",METRIC_JVM_THREAD_COUNT:"jvm.thread.count",METRIC_KESTREL_ACTIVE_CONNECTIONS:"kestrel.active_connections",METRIC_KESTREL_ACTIVE_TLS_HANDSHAKES:"kestrel.active_tls_handshakes",METRIC_KESTREL_CONNECTION_DURATION:"kestrel.connection.duration",METRIC_KESTREL_QUEUED_CONNECTIONS:"kestrel.queued_connections",METRIC_KESTREL_QUEUED_REQUESTS:"kestrel.queued_requests",METRIC_KESTREL_REJECTED_CONNECTIONS:"kestrel.rejected_connections",METRIC_KESTREL_TLS_HANDSHAKE_DURATION:"kestrel.tls_handshake.duration",METRIC_KESTREL_UPGRADED_CONNECTIONS:"kestrel.upgraded_connections",METRIC_SIGNALR_SERVER_ACTIVE_CONNECTIONS:"signalr.server.active_connections",METRIC_SIGNALR_SERVER_CONNECTION_DURATION:"signalr.server.connection.duration",MessageTypeValues:ap,MessagingDestinationKindValues:Ql,MessagingOperationValues:ep,NETHOSTCONNECTIONSUBTYPEVALUES_CDMA:Ol,NETHOSTCONNECTIONSUBTYPEVALUES_CDMA2000_1XRTT:Rl,NETHOSTCONNECTIONSUBTYPEVALUES_EDGE:Sl,NETHOSTCONNECTIONSUBTYPEVALUES_EHRPD:Ml,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_0:Al,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_A:wl,NETHOSTCONNECTIONSUBTYPEVALUES_EVDO_B:Cl,NETHOSTCONNECTIONSUBTYPEVALUES_GPRS:El,NETHOSTCONNECTIONSUBTYPEVALUES_GSM:"gsm",NETHOSTCONNECTIONSUBTYPEVALUES_HSDPA:Nl,NETHOSTCONNECTIONSUBTYPEVALUES_HSPA:Pl,NETHOSTCONNECTIONSUBTYPEVALUES_HSPAP:Ll,NETHOSTCONNECTIONSUBTYPEVALUES_HSUPA:Il,NETHOSTCONNECTIONSUBTYPEVALUES_IDEN:xl,NETHOSTCONNECTIONSUBTYPEVALUES_IWLAN:kl,NETHOSTCONNECTIONSUBTYPEVALUES_LTE:"lte",NETHOSTCONNECTIONSUBTYPEVALUES_LTE_CA:jl,NETHOSTCONNECTIONSUBTYPEVALUES_NR:"nr",NETHOSTCONNECTIONSUBTYPEVALUES_NRNSA:Dl,NETHOSTCONNECTIONSUBTYPEVALUES_TD_SCDMA:Ul,NETHOSTCONNECTIONSUBTYPEVALUES_UMTS:Tl,NETHOSTCONNECTIONTYPEVALUES_CELL:Zu,NETHOSTCONNECTIONTYPEVALUES_UNAVAILABLE:el,NETHOSTCONNECTIONTYPEVALUES_UNKNOWN:tl,NETHOSTCONNECTIONTYPEVALUES_WIFI:$u,NETHOSTCONNECTIONTYPEVALUES_WIRED:Xu,NETTRANSPORTVALUES_INPROC:Hu,NETTRANSPORTVALUES_IP:"ip",NETTRANSPORTVALUES_IP_TCP:Bu,NETTRANSPORTVALUES_IP_UDP:Vu,NETTRANSPORTVALUES_OTHER:Yu,NETTRANSPORTVALUES_PIPE:Gu,NETTRANSPORTVALUES_UNIX:Fu,NETWORK_TRANSPORT_VALUE_PIPE:"pipe",NETWORK_TRANSPORT_VALUE_QUIC:"quic",NETWORK_TRANSPORT_VALUE_TCP:"tcp",NETWORK_TRANSPORT_VALUE_UDP:"udp",NETWORK_TRANSPORT_VALUE_UNIX:"unix",NETWORK_TYPE_VALUE_IPV4:"ipv4",NETWORK_TYPE_VALUE_IPV6:"ipv6",NetHostConnectionSubtypeValues:Bl,NetHostConnectionTypeValues:nl,NetTransportValues:qu,OSTYPEVALUES_AIX:"aix",OSTYPEVALUES_DARWIN:Tm,OSTYPEVALUES_DRAGONFLYBSD:Rm,OSTYPEVALUES_FREEBSD:Om,OSTYPEVALUES_HPUX:Nm,OSTYPEVALUES_LINUX:Sm,OSTYPEVALUES_NETBSD:Am,OSTYPEVALUES_OPENBSD:wm,OSTYPEVALUES_SOLARIS:Im,OSTYPEVALUES_WINDOWS:Em,OSTYPEVALUES_Z_OS:Pm,OTEL_STATUS_CODE_VALUE_ERROR:"ERROR",OTEL_STATUS_CODE_VALUE_OK:"OK",OsTypeValues:xm,RPCGRPCSTATUSCODEVALUES_ABORTED:10,RPCGRPCSTATUSCODEVALUES_ALREADY_EXISTS:6,RPCGRPCSTATUSCODEVALUES_CANCELLED:1,RPCGRPCSTATUSCODEVALUES_DATA_LOSS:15,RPCGRPCSTATUSCODEVALUES_DEADLINE_EXCEEDED:4,RPCGRPCSTATUSCODEVALUES_FAILED_PRECONDITION:9,RPCGRPCSTATUSCODEVALUES_INTERNAL:13,RPCGRPCSTATUSCODEVALUES_INVALID_ARGUMENT:3,RPCGRPCSTATUSCODEVALUES_NOT_FOUND:5,RPCGRPCSTATUSCODEVALUES_OK:0,RPCGRPCSTATUSCODEVALUES_OUT_OF_RANGE:11,RPCGRPCSTATUSCODEVALUES_PERMISSION_DENIED:7,RPCGRPCSTATUSCODEVALUES_RESOURCE_EXHAUSTED:8,RPCGRPCSTATUSCODEVALUES_UNAUTHENTICATED:16,RPCGRPCSTATUSCODEVALUES_UNAVAILABLE:14,RPCGRPCSTATUSCODEVALUES_UNIMPLEMENTED:12,RPCGRPCSTATUSCODEVALUES_UNKNOWN:2,RpcGrpcStatusCodeValues:tp,SEMATTRS_AWS_DYNAMODB_ATTRIBUTES_TO_GET:Sa,SEMATTRS_AWS_DYNAMODB_ATTRIBUTE_DEFINITIONS:La,SEMATTRS_AWS_DYNAMODB_CONSISTENT_READ:va,SEMATTRS_AWS_DYNAMODB_CONSUMED_CAPACITY:ma,SEMATTRS_AWS_DYNAMODB_COUNT:Ca,SEMATTRS_AWS_DYNAMODB_EXCLUSIVE_START_TABLE:Ra,SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEXES:Aa,SEMATTRS_AWS_DYNAMODB_GLOBAL_SECONDARY_INDEX_UPDATES:Ua,SEMATTRS_AWS_DYNAMODB_INDEX_NAME:Ta,SEMATTRS_AWS_DYNAMODB_ITEM_COLLECTION_METRICS:ga,SEMATTRS_AWS_DYNAMODB_LIMIT:Ea,SEMATTRS_AWS_DYNAMODB_LOCAL_SECONDARY_INDEXES:wa,SEMATTRS_AWS_DYNAMODB_PROJECTION:ba,SEMATTRS_AWS_DYNAMODB_PROVISIONED_READ_CAPACITY:_a,SEMATTRS_AWS_DYNAMODB_PROVISIONED_WRITE_CAPACITY:ya,SEMATTRS_AWS_DYNAMODB_SCANNED_COUNT:Ma,SEMATTRS_AWS_DYNAMODB_SCAN_FORWARD:Ia,SEMATTRS_AWS_DYNAMODB_SEGMENT:Pa,SEMATTRS_AWS_DYNAMODB_SELECT:Oa,SEMATTRS_AWS_DYNAMODB_TABLE_COUNT:Na,SEMATTRS_AWS_DYNAMODB_TABLE_NAMES:ha,SEMATTRS_AWS_DYNAMODB_TOTAL_SEGMENTS:xa,SEMATTRS_AWS_LAMBDA_INVOKED_ARN:Ko,SEMATTRS_CODE_FILEPATH:$i,SEMATTRS_CODE_FUNCTION:Qi,SEMATTRS_CODE_LINENO:Xi,SEMATTRS_CODE_NAMESPACE:Ji,SEMATTRS_DB_CASSANDRA_CONSISTENCY_LEVEL:oi,SEMATTRS_DB_CASSANDRA_COORDINATOR_DC:ui,SEMATTRS_DB_CASSANDRA_COORDINATOR_ID:ci,SEMATTRS_DB_CASSANDRA_IDEMPOTENCE:ai,SEMATTRS_DB_CASSANDRA_KEYSPACE:ni,SEMATTRS_DB_CASSANDRA_PAGE_SIZE:ri,SEMATTRS_DB_CASSANDRA_SPECULATIVE_EXECUTION_COUNT:si,SEMATTRS_DB_CASSANDRA_TABLE:ii,SEMATTRS_DB_CONNECTION_STRING:Qo,SEMATTRS_DB_HBASE_NAMESPACE:li,SEMATTRS_DB_JDBC_DRIVER_CLASSNAME:$o,SEMATTRS_DB_MONGODB_COLLECTION:di,SEMATTRS_DB_MSSQL_INSTANCE_NAME:ti,SEMATTRS_DB_NAME:Xo,SEMATTRS_DB_OPERATION:ei,SEMATTRS_DB_REDIS_DATABASE_INDEX:pi,SEMATTRS_DB_SQL_TABLE:fi,SEMATTRS_DB_STATEMENT:Zo,SEMATTRS_DB_SYSTEM:Wo,SEMATTRS_DB_USER:Jo,SEMATTRS_ENDUSER_ID:Yi,SEMATTRS_ENDUSER_ROLE:qi,SEMATTRS_ENDUSER_SCOPE:zi,SEMATTRS_EXCEPTION_ESCAPED:_i,SEMATTRS_EXCEPTION_MESSAGE:mi,SEMATTRS_EXCEPTION_STACKTRACE:gi,SEMATTRS_EXCEPTION_TYPE:hi,SEMATTRS_FAAS_COLDSTART:wi,SEMATTRS_FAAS_CRON:Ai,SEMATTRS_FAAS_DOCUMENT_COLLECTION:bi,SEMATTRS_FAAS_DOCUMENT_NAME:Ti,SEMATTRS_FAAS_DOCUMENT_OPERATION:Ei,SEMATTRS_FAAS_DOCUMENT_TIME:Si,SEMATTRS_FAAS_EXECUTION:vi,SEMATTRS_FAAS_INVOKED_NAME:Ri,SEMATTRS_FAAS_INVOKED_PROVIDER:Ni,SEMATTRS_FAAS_INVOKED_REGION:Ii,SEMATTRS_FAAS_TIME:Oi,SEMATTRS_FAAS_TRIGGER:yi,SEMATTRS_HTTP_CLIENT_IP:fa,SEMATTRS_HTTP_FLAVOR:ia,SEMATTRS_HTTP_HOST:na,SEMATTRS_HTTP_METHOD:Zi,SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH:sa,SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED:ca,SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH:ua,SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH_UNCOMPRESSED:la,SEMATTRS_HTTP_ROUTE:da,SEMATTRS_HTTP_SCHEME:ra,SEMATTRS_HTTP_SERVER_NAME:pa,SEMATTRS_HTTP_STATUS_CODE:oa,SEMATTRS_HTTP_TARGET:ta,SEMATTRS_HTTP_URL:ea,SEMATTRS_HTTP_USER_AGENT:aa,SEMATTRS_MESSAGE_COMPRESSED_SIZE:ps,SEMATTRS_MESSAGE_ID:ls,SEMATTRS_MESSAGE_TYPE:us,SEMATTRS_MESSAGE_UNCOMPRESSED_SIZE:ds,SEMATTRS_MESSAGING_CONSUMER_ID:Wa,SEMATTRS_MESSAGING_CONVERSATION_ID:Ya,SEMATTRS_MESSAGING_DESTINATION:Da,SEMATTRS_MESSAGING_DESTINATION_KIND:ja,SEMATTRS_MESSAGING_KAFKA_CLIENT_ID:Xa,SEMATTRS_MESSAGING_KAFKA_CONSUMER_GROUP:$a,SEMATTRS_MESSAGING_KAFKA_MESSAGE_KEY:Ja,SEMATTRS_MESSAGING_KAFKA_PARTITION:Za,SEMATTRS_MESSAGING_KAFKA_TOMBSTONE:es,SEMATTRS_MESSAGING_MESSAGE_ID:Ha,SEMATTRS_MESSAGING_MESSAGE_PAYLOAD_COMPRESSED_SIZE_BYTES:za,SEMATTRS_MESSAGING_MESSAGE_PAYLOAD_SIZE_BYTES:qa,SEMATTRS_MESSAGING_OPERATION:Ka,SEMATTRS_MESSAGING_PROTOCOL:Va,SEMATTRS_MESSAGING_PROTOCOL_VERSION:Fa,SEMATTRS_MESSAGING_RABBITMQ_ROUTING_KEY:Qa,SEMATTRS_MESSAGING_SYSTEM:ka,SEMATTRS_MESSAGING_TEMP_DESTINATION:Ba,SEMATTRS_MESSAGING_URL:Ga,SEMATTRS_NET_HOST_CARRIER_ICC:Gi,SEMATTRS_NET_HOST_CARRIER_MCC:Vi,SEMATTRS_NET_HOST_CARRIER_MNC:Fi,SEMATTRS_NET_HOST_CARRIER_NAME:Bi,SEMATTRS_NET_HOST_CONNECTION_SUBTYPE:ji,SEMATTRS_NET_HOST_CONNECTION_TYPE:Di,SEMATTRS_NET_HOST_IP:Li,SEMATTRS_NET_HOST_NAME:ki,SEMATTRS_NET_HOST_PORT:Ui,SEMATTRS_NET_PEER_IP:xi,SEMATTRS_NET_PEER_NAME:Mi,SEMATTRS_NET_PEER_PORT:Ci,SEMATTRS_NET_TRANSPORT:Pi,SEMATTRS_PEER_SERVICE:Hi,SEMATTRS_RPC_GRPC_STATUS_CODE:os,SEMATTRS_RPC_JSONRPC_ERROR_CODE:ss,SEMATTRS_RPC_JSONRPC_ERROR_MESSAGE:cs,SEMATTRS_RPC_JSONRPC_REQUEST_ID:as,SEMATTRS_RPC_JSONRPC_VERSION:is,SEMATTRS_RPC_METHOD:rs,SEMATTRS_RPC_SERVICE:ns,SEMATTRS_RPC_SYSTEM:ts,SEMATTRS_THREAD_ID:Ki,SEMATTRS_THREAD_NAME:Wi,SEMRESATTRS_AWS_ECS_CLUSTER_ARN:Vd,SEMRESATTRS_AWS_ECS_CONTAINER_ARN:Bd,SEMRESATTRS_AWS_ECS_LAUNCHTYPE:Fd,SEMRESATTRS_AWS_ECS_TASK_ARN:Gd,SEMRESATTRS_AWS_ECS_TASK_FAMILY:Hd,SEMRESATTRS_AWS_ECS_TASK_REVISION:Yd,SEMRESATTRS_AWS_EKS_CLUSTER_ARN:qd,SEMRESATTRS_AWS_LOG_GROUP_ARNS:Kd,SEMRESATTRS_AWS_LOG_GROUP_NAMES:zd,SEMRESATTRS_AWS_LOG_STREAM_ARNS:Qd,SEMRESATTRS_AWS_LOG_STREAM_NAMES:Wd,SEMRESATTRS_CLOUD_ACCOUNT_ID:Ud,SEMRESATTRS_CLOUD_AVAILABILITY_ZONE:Dd,SEMRESATTRS_CLOUD_PLATFORM:jd,SEMRESATTRS_CLOUD_PROVIDER:Ld,SEMRESATTRS_CLOUD_REGION:kd,SEMRESATTRS_CONTAINER_ID:$d,SEMRESATTRS_CONTAINER_IMAGE_NAME:Zd,SEMRESATTRS_CONTAINER_IMAGE_TAG:ef,SEMRESATTRS_CONTAINER_NAME:Jd,SEMRESATTRS_CONTAINER_RUNTIME:Xd,SEMRESATTRS_DEPLOYMENT_ENVIRONMENT:tf,SEMRESATTRS_DEVICE_ID:nf,SEMRESATTRS_DEVICE_MODEL_IDENTIFIER:rf,SEMRESATTRS_DEVICE_MODEL_NAME:of,SEMRESATTRS_FAAS_ID:sf,SEMRESATTRS_FAAS_INSTANCE:uf,SEMRESATTRS_FAAS_MAX_MEMORY:lf,SEMRESATTRS_FAAS_NAME:af,SEMRESATTRS_FAAS_VERSION:cf,SEMRESATTRS_HOST_ARCH:hf,SEMRESATTRS_HOST_ID:pf,SEMRESATTRS_HOST_IMAGE_ID:gf,SEMRESATTRS_HOST_IMAGE_NAME:mf,SEMRESATTRS_HOST_IMAGE_VERSION:_f,SEMRESATTRS_HOST_NAME:df,SEMRESATTRS_HOST_TYPE:ff,SEMRESATTRS_K8S_CLUSTER_NAME:yf,SEMRESATTRS_K8S_CONTAINER_NAME:Of,SEMRESATTRS_K8S_CRONJOB_NAME:kf,SEMRESATTRS_K8S_CRONJOB_UID:Uf,SEMRESATTRS_K8S_DAEMONSET_NAME:Cf,SEMRESATTRS_K8S_DAEMONSET_UID:xf,SEMRESATTRS_K8S_DEPLOYMENT_NAME:Nf,SEMRESATTRS_K8S_DEPLOYMENT_UID:Rf,SEMRESATTRS_K8S_JOB_NAME:Lf,SEMRESATTRS_K8S_JOB_UID:Mf,SEMRESATTRS_K8S_NAMESPACE_NAME:Ef,SEMRESATTRS_K8S_NODE_NAME:vf,SEMRESATTRS_K8S_NODE_UID:bf,SEMRESATTRS_K8S_POD_NAME:Tf,SEMRESATTRS_K8S_POD_UID:Sf,SEMRESATTRS_K8S_REPLICASET_NAME:wf,SEMRESATTRS_K8S_REPLICASET_UID:Af,SEMRESATTRS_K8S_STATEFULSET_NAME:Pf,SEMRESATTRS_K8S_STATEFULSET_UID:If,SEMRESATTRS_OS_DESCRIPTION:jf,SEMRESATTRS_OS_NAME:Bf,SEMRESATTRS_OS_TYPE:Df,SEMRESATTRS_OS_VERSION:Vf,SEMRESATTRS_PROCESS_COMMAND:Yf,SEMRESATTRS_PROCESS_COMMAND_ARGS:zf,SEMRESATTRS_PROCESS_COMMAND_LINE:qf,SEMRESATTRS_PROCESS_EXECUTABLE_NAME:Gf,SEMRESATTRS_PROCESS_EXECUTABLE_PATH:Hf,SEMRESATTRS_PROCESS_OWNER:Kf,SEMRESATTRS_PROCESS_PID:Ff,SEMRESATTRS_PROCESS_RUNTIME_DESCRIPTION:Jf,SEMRESATTRS_PROCESS_RUNTIME_NAME:Wf,SEMRESATTRS_PROCESS_RUNTIME_VERSION:Qf,SEMRESATTRS_SERVICE_INSTANCE_ID:Zf,SEMRESATTRS_SERVICE_NAME:$f,SEMRESATTRS_SERVICE_NAMESPACE:Xf,SEMRESATTRS_SERVICE_VERSION:eh,SEMRESATTRS_TELEMETRY_AUTO_VERSION:oh,SEMRESATTRS_TELEMETRY_SDK_LANGUAGE:nh,SEMRESATTRS_TELEMETRY_SDK_NAME:th,SEMRESATTRS_TELEMETRY_SDK_VERSION:rh,SEMRESATTRS_WEBENGINE_DESCRIPTION:sh,SEMRESATTRS_WEBENGINE_NAME:ih,SEMRESATTRS_WEBENGINE_VERSION:ah,SIGNALR_CONNECTION_STATUS_VALUE_APP_SHUTDOWN:"app_shutdown",SIGNALR_CONNECTION_STATUS_VALUE_NORMAL_CLOSURE:"normal_closure",SIGNALR_CONNECTION_STATUS_VALUE_TIMEOUT:"timeout",SIGNALR_TRANSPORT_VALUE_LONG_POLLING:"long_polling",SIGNALR_TRANSPORT_VALUE_SERVER_SENT_EVENTS:"server_sent_events",SIGNALR_TRANSPORT_VALUE_WEB_SOCKETS:"web_sockets",SemanticAttributes:fs,SemanticResourceAttributes:ch,TELEMETRYSDKLANGUAGEVALUES_CPP:"cpp",TELEMETRYSDKLANGUAGEVALUES_DOTNET:Bm,TELEMETRYSDKLANGUAGEVALUES_ERLANG:Vm,TELEMETRYSDKLANGUAGEVALUES_GO:"go",TELEMETRYSDKLANGUAGEVALUES_JAVA:Fm,TELEMETRYSDKLANGUAGEVALUES_NODEJS:Gm,TELEMETRYSDKLANGUAGEVALUES_PHP:"php",TELEMETRYSDKLANGUAGEVALUES_PYTHON:Hm,TELEMETRYSDKLANGUAGEVALUES_RUBY:Ym,TELEMETRYSDKLANGUAGEVALUES_WEBJS:qm,TELEMETRY_SDK_LANGUAGE_VALUE_CPP:"cpp",TELEMETRY_SDK_LANGUAGE_VALUE_DOTNET:"dotnet",TELEMETRY_SDK_LANGUAGE_VALUE_ERLANG:"erlang",TELEMETRY_SDK_LANGUAGE_VALUE_GO:"go",TELEMETRY_SDK_LANGUAGE_VALUE_JAVA:"java",TELEMETRY_SDK_LANGUAGE_VALUE_NODEJS:"nodejs",TELEMETRY_SDK_LANGUAGE_VALUE_PHP:"php",TELEMETRY_SDK_LANGUAGE_VALUE_PYTHON:"python",TELEMETRY_SDK_LANGUAGE_VALUE_RUBY:"ruby",TELEMETRY_SDK_LANGUAGE_VALUE_RUST:"rust",TELEMETRY_SDK_LANGUAGE_VALUE_SWIFT:"swift",TELEMETRY_SDK_LANGUAGE_VALUE_WEBJS:"webjs",TelemetrySdkLanguageValues:zm})),Wm=he("OpenTelemetry SDK Context Key SUPPRESS_TRACING");function Qm(e){return e.setValue(Wm,!0)}function Jm(e){return!0===e.getValue(Wm)}var $m=",",Xm="baggage",Zm=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a};function eg(e){return e.reduce((function(e,t){var n=""+e+(""!==e?$m:"")+t;return n.length>8192?e:n}),"")}function tg(e){return e.getAllEntries().map((function(e){var t=Zm(e,2),n=t[0],r=t[1],o=encodeURIComponent(n)+"="+encodeURIComponent(r.value);return void 0!==r.metadata&&(o+=";"+r.metadata.toString()),o}))}function ng(e){var t=e.split(";");if(!(t.length<=0)){var n=t.shift();if(n){var r=n.indexOf("=");if(!(r<=0)){var o,i=decodeURIComponent(n.substring(0,r).trim()),a=decodeURIComponent(n.substring(r+1).trim());return t.length>0&&(o=fe(t.join(";"))),{key:i,value:a,metadata:o}}}}}var rg=function(){function e(){}return e.prototype.inject=function(e,t,n){var r=Ht.getBaggage(e);if(r&&!Jm(e)){var o=eg(tg(r).filter((function(e){return e.length<=4096})).slice(0,180));o.length>0&&n.set(t,Xm,o)}},e.prototype.extract=function(e,t,n){var r=n.get(t,Xm),o=Array.isArray(r)?r.join($m):r;if(!o)return e;var i={};return 0===o.length?e:(o.split($m).forEach((function(e){var t=ng(e);if(t){var n={value:t.value};t.metadata&&(n.metadata=t.metadata),i[t.key]=n}})),0===Object.entries(i).length?e:Ht.setBaggage(e,Ht.createBaggage(i)))},e.prototype.fields=function(){return[Xm]},e}(),og=function(){function e(e,t){this._monotonicClock=t,this._epochMillis=e.now(),this._performanceMillis=t.now()}return e.prototype.now=function(){var e=this._monotonicClock.now()-this._performanceMillis;return this._epochMillis+e},e}(),ig=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},ag=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a};function sg(e){var t,n,r={};if("object"!=typeof e||null==e)return r;try{for(var o=ig(Object.entries(e)),i=o.next();!i.done;i=o.next()){var a=ag(i.value,2),s=a[0],c=a[1];cg(s)?ug(c)?Array.isArray(c)?r[s]=c.slice():r[s]=c:Nt.warn("Invalid attribute value set for key: "+s):Nt.warn("Invalid attribute key: "+s)}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return r}function cg(e){return"string"==typeof e&&e.length>0}function ug(e){return null==e||(Array.isArray(e)?function(e){var t,n,r;try{for(var o=ig(e),i=o.next();!i.done;i=o.next()){var a=i.value;if(null!=a){if(!r){if(lg(a)){r=typeof a;continue}return!1}if(typeof a!==r)return!1}}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return!0}(e):lg(e))}function lg(e){switch(typeof e){case"number":case"boolean":case"string":return!0}return!1}function pg(){return function(e){Nt.error(function(e){return"string"==typeof e?e:JSON.stringify(function(e){var t={},n=e;for(;null!==n;)Object.getOwnPropertyNames(n).forEach((function(e){if(!t[e]){var r=n[e];r&&(t[e]=String(r))}})),n=Object.getPrototypeOf(n);return t}(e))}(e))}}var dg,fg=pg();function hg(e){try{fg(e)}catch(e){}}!function(e){e.AlwaysOff="always_off",e.AlwaysOn="always_on",e.ParentBasedAlwaysOff="parentbased_always_off",e.ParentBasedAlwaysOn="parentbased_always_on",e.ParentBasedTraceIdRatio="parentbased_traceidratio",e.TraceIdRatio="traceidratio"}(dg||(dg={}));var mg=["OTEL_SDK_DISABLED"];function gg(e){return mg.indexOf(e)>-1}var _g=["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 yg(e){return _g.indexOf(e)>-1}var vg=["OTEL_NO_PATCH_MODULES","OTEL_PROPAGATORS","OTEL_SEMCONV_STABILITY_OPT_IN"];function bg(e){return vg.indexOf(e)>-1}var Eg=1/0,Sg=128,Tg={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:Z.INFO,OTEL_NO_PATCH_MODULES:[],OTEL_PROPAGATORS:["tracecontext","baggage"],OTEL_RESOURCE_ATTRIBUTES:"",OTEL_SERVICE_NAME:"",OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT:Eg,OTEL_ATTRIBUTE_COUNT_LIMIT:Sg,OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT:Eg,OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT:Sg,OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT:Eg,OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT:Sg,OTEL_SPAN_EVENT_COUNT_LIMIT:128,OTEL_SPAN_LINK_COUNT_LIMIT:128,OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT:128,OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT:128,OTEL_TRACES_EXPORTER:"",OTEL_TRACES_SAMPLER:dg.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",OTEL_SEMCONV_STABILITY_OPT_IN:[]};function Og(e,t,n){if(void 0!==n[e]){var r=String(n[e]);t[e]="true"===r.toLowerCase()}}function Ag(e,t,n,r,o){if(void 0===r&&(r=-1/0),void 0===o&&(o=1/0),void 0!==n[e]){var i=Number(n[e]);isNaN(i)||(t[e]=i<r?r:i>o?o:i)}}function wg(e,t,n,r){void 0===r&&(r=",");var o=n[e];"string"==typeof o&&(t[e]=o.split(r).map((function(e){return e.trim()})))}var Rg={ALL:Z.ALL,VERBOSE:Z.VERBOSE,DEBUG:Z.DEBUG,INFO:Z.INFO,WARN:Z.WARN,ERROR:Z.ERROR,NONE:Z.NONE};function Ng(e,t,n){var r=n[e];if("string"==typeof r){var o=Rg[r.toUpperCase()];null!=o&&(t[e]=o)}}function Ig(e){var t={};for(var n in Tg){var r=n;if("OTEL_LOG_LEVEL"===r)Ng(r,t,e);else if(gg(r))Og(r,t,e);else if(yg(r))Ag(r,t,e);else if(bg(r))wg(r,t,e);else{var o=e[r];null!=o&&(t[r]=String(o))}}return t}var Pg="object"==typeof globalThis?globalThis:"object"==typeof self?self:"object"==typeof window?window:"object"==typeof global?global:{};function xg(){var e=Ig(Pg);return Object.assign({},Tg,e)}function Cg(){return Ig(Pg)}function Mg(e){return e>=48&&e<=57?e-48:e>=97&&e<=102?e-87:e-55}function Lg(e){for(var t=new Uint8Array(e.length/2),n=0,r=0;r<e.length;r+=2){var o=Mg(e.charCodeAt(r)),i=Mg(e.charCodeAt(r+1));t[n++]=o<<4|i}return t}var Ug=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},kg=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))};var Dg=function(){this.generateTraceId=Bg(16),this.generateSpanId=Bg(8)},jg=Array(32);function Bg(e){return function(){for(var t=0;t<2*e;t++)jg[t]=Math.floor(16*Math.random())+48,jg[t]>=58&&(jg[t]+=39);return String.fromCharCode.apply(null,jg.slice(0,2*e))}}var Vg,Fg=performance,Gg="1.30.1",Hg=((Vg={})[th]="opentelemetry",Vg[Wf]="browser",Vg[nh]=qm,Vg[rh]=Gg,Vg);function Yg(e){}var qg,zg=Math.pow(10,6),Kg=Math.pow(10,9);function Wg(e){var t=e/1e3;return[Math.trunc(t),Math.round(e%1e3*zg)]}function Qg(){var e=Fg.timeOrigin;if("number"!=typeof e){var t=Fg;e=t.timing&&t.timing.fetchStart}return e}function Jg(e){return r_(Wg(Qg()),Wg("number"==typeof e?e:Fg.now()))}function $g(e){if(t_(e))return e;if("number"==typeof e)return e<Qg()?Jg(e):Wg(e);if(e instanceof Date)return Wg(e.getTime());throw TypeError("Invalid input type")}function Xg(e,t){var n=t[0]-e[0],r=t[1]-e[1];return r<0&&(n-=1,r+=Kg),[n,r]}function Zg(e){return e[0]*Kg+e[1]}function e_(e){return 1e6*e[0]+e[1]/1e3}function t_(e){return Array.isArray(e)&&2===e.length&&"number"==typeof e[0]&&"number"==typeof e[1]}function n_(e){return t_(e)||"number"==typeof e||e instanceof Date}function r_(e,t){var n=[e[0]+t[0],e[1]+t[1]];return n[1]>=Kg&&(n[1]-=Kg,n[0]+=1),n}!function(e){e[e.SUCCESS=0]="SUCCESS",e[e.FAILED=1]="FAILED"}(qg||(qg={}));var o_=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},i_=function(){function e(e){var t;void 0===e&&(e={}),this._propagators=null!==(t=e.propagators)&&void 0!==t?t:[],this._fields=Array.from(new Set(this._propagators.map((function(e){return"function"==typeof e.fields?e.fields():[]})).reduce((function(e,t){return e.concat(t)}),[])))}return e.prototype.inject=function(e,t,n){var r,o;try{for(var i=o_(this._propagators),a=i.next();!a.done;a=i.next()){var s=a.value;try{s.inject(e,t,n)}catch(e){Nt.warn("Failed to inject with "+s.constructor.name+". Err: "+e.message)}}}catch(e){r={error:e}}finally{try{a&&!a.done&&(o=i.return)&&o.call(i)}finally{if(r)throw r.error}}},e.prototype.extract=function(e,t,n){return this._propagators.reduce((function(e,r){try{return r.extract(e,t,n)}catch(e){Nt.warn("Failed to extract with "+r.constructor.name+". Err: "+e.message)}return e}),e)},e.prototype.fields=function(){return this._fields.slice()},e}(),a_="[_0-9a-z-*/]",s_=new RegExp("^(?:"+("[a-z]"+a_+"{0,255}")+"|"+("[a-z0-9]"+a_+"{0,240}@[a-z]"+a_+"{0,13}")+")$"),c_=/^[ -~]{0,255}[!-~]$/,u_=/,|=/;var l_=function(){function e(e){this._internalState=new Map,e&&this._parse(e)}return e.prototype.set=function(e,t){var n=this._clone();return n._internalState.has(e)&&n._internalState.delete(e),n._internalState.set(e,t),n},e.prototype.unset=function(e){var t=this._clone();return t._internalState.delete(e),t},e.prototype.get=function(e){return this._internalState.get(e)},e.prototype.serialize=function(){var e=this;return this._keys().reduce((function(t,n){return t.push(n+"="+e.get(n)),t}),[]).join(",")},e.prototype._parse=function(e){e.length>512||(this._internalState=e.split(",").reverse().reduce((function(e,t){var n=t.trim(),r=n.indexOf("=");if(-1!==r){var o=n.slice(0,r),i=n.slice(r+1,t.length);(function(e){return s_.test(e)})(o)&&function(e){return c_.test(e)&&!u_.test(e)}(i)&&e.set(o,i)}return e}),new Map),this._internalState.size>32&&(this._internalState=new Map(Array.from(this._internalState.entries()).reverse().slice(0,32))))},e.prototype._keys=function(){return Array.from(this._internalState.keys()).reverse()},e.prototype._clone=function(){var t=new e;return t._internalState=new Map(this._internalState),t},e}(),p_="traceparent",d_="tracestate",f_=new RegExp("^\\s?((?!ff)[\\da-f]{2})-((?![0]{32})[\\da-f]{32})-((?![0]{16})[\\da-f]{16})-([\\da-f]{2})(-.*)?\\s?$");function h_(e){var t=f_.exec(e);return t?"00"===t[1]&&t[5]?null:{traceId:t[2],spanId:t[3],traceFlags:parseInt(t[4],16)}:null}var m_,g_=function(){function e(){}return e.prototype.inject=function(e,t,n){var r=zt.getSpanContext(e);if(r&&!Jm(e)&&pt(r)){var o="00-"+r.traceId+"-"+r.spanId+"-0"+Number(r.traceFlags||Be.NONE).toString(16);n.set(t,p_,o),r.traceState&&n.set(t,d_,r.traceState.serialize())}},e.prototype.extract=function(e,t,n){var r=n.get(t,p_);if(!r)return e;var o=Array.isArray(r)?r[0]:r;if("string"!=typeof o)return e;var i=h_(o);if(!i)return e;i.isRemote=!0;var a=n.get(t,d_);if(a){var s=Array.isArray(a)?a.join(","):a;i.traceState=new l_("string"==typeof s?s:void 0)}return zt.setSpanContext(e,i)},e.prototype.fields=function(){return[p_,d_]},e}(),__=he("OpenTelemetry SDK Context Key RPC_METADATA");!function(e){e.HTTP="http"}(m_||(m_={}));var y_,v_,b_=function(){function e(){}return e.prototype.shouldSample=function(){return{decision:mt.NOT_RECORD}},e.prototype.toString=function(){return"AlwaysOffSampler"},e}(),E_=function(){function e(){}return e.prototype.shouldSample=function(){return{decision:mt.RECORD_AND_SAMPLED}},e.prototype.toString=function(){return"AlwaysOnSampler"},e}(),S_=function(){function e(e){var t,n,r,o;this._root=e.root,this._root||(hg(new Error("ParentBasedSampler must have a root sampler configured")),this._root=new E_),this._remoteParentSampled=null!==(t=e.remoteParentSampled)&&void 0!==t?t:new E_,this._remoteParentNotSampled=null!==(n=e.remoteParentNotSampled)&&void 0!==n?n:new b_,this._localParentSampled=null!==(r=e.localParentSampled)&&void 0!==r?r:new E_,this._localParentNotSampled=null!==(o=e.localParentNotSampled)&&void 0!==o?o:new b_}return e.prototype.shouldSample=function(e,t,n,r,o,i){var a=zt.getSpanContext(e);return a&&pt(a)?a.isRemote?a.traceFlags&Be.SAMPLED?this._remoteParentSampled.shouldSample(e,t,n,r,o,i):this._remoteParentNotSampled.shouldSample(e,t,n,r,o,i):a.traceFlags&Be.SAMPLED?this._localParentSampled.shouldSample(e,t,n,r,o,i):this._localParentNotSampled.shouldSample(e,t,n,r,o,i):this._root.shouldSample(e,t,n,r,o,i)},e.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()+"}"},e}(),T_=function(){function e(e){void 0===e&&(e=0),this._ratio=e,this._ratio=this._normalize(e),this._upperBound=Math.floor(4294967295*this._ratio)}return e.prototype.shouldSample=function(e,t){return{decision:ut(t)&&this._accumulate(t)<this._upperBound?mt.RECORD_AND_SAMPLED:mt.NOT_RECORD}},e.prototype.toString=function(){return"TraceIdRatioBased{"+this._ratio+"}"},e.prototype._normalize=function(e){return"number"!=typeof e||isNaN(e)?0:e>=1?1:e<=0?0:e},e.prototype._accumulate=function(e){for(var t=0,n=0;n<e.length/8;n++){var r=8*n;t=(t^parseInt(e.slice(r,r+8),16))>>>0}return t},e}(),O_="[object Null]",A_="[object Undefined]",w_=Function.prototype.toString,R_=w_.call(Object),N_=(y_=Object.getPrototypeOf,v_=Object,function(e){return y_(v_(e))}),I_=Object.prototype,P_=I_.hasOwnProperty,x_=Symbol?Symbol.toStringTag:void 0,C_=I_.toString;function M_(e){if(!function(e){return null!=e&&"object"==typeof e}(e)||"[object Object]"!==function(e){if(null==e)return void 0===e?A_:O_;return x_&&x_ in Object(e)?function(e){var t=P_.call(e,x_),n=e[x_],r=!1;try{e[x_]=void 0,r=!0}catch(e){}var o=C_.call(e);r&&(t?e[x_]=n:delete e[x_]);return o}(e):function(e){return C_.call(e)}(e)}(e))return!1;var t=N_(e);if(null===t)return!0;var n=P_.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&w_.call(n)===R_}function L_(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=e.shift(),r=new WeakMap;e.length>0;)n=k_(n,e.shift(),0,r);return n}function U_(e){return j_(e)?e.slice():e}function k_(e,t,n,r){var o;if(void 0===n&&(n=0),!(n>20)){if(n++,F_(e)||F_(t)||B_(t))o=U_(t);else if(j_(e)){if(o=e.slice(),j_(t))for(var i=0,a=t.length;i<a;i++)o.push(U_(t[i]));else if(V_(t))for(i=0,a=(s=Object.keys(t)).length;i<a;i++){o[c=s[i]]=U_(t[c])}}else if(V_(e))if(V_(t)){if(!function(e,t){if(!M_(e)||!M_(t))return!1;return!0}(e,t))return t;o=Object.assign({},e);var s;for(i=0,a=(s=Object.keys(t)).length;i<a;i++){var c,u=t[c=s[i]];if(F_(u))void 0===u?delete o[c]:o[c]=u;else{var l=o[c],p=u;if(D_(e,c,r)||D_(t,c,r))delete o[c];else{if(V_(l)&&V_(p)){var d=r.get(l)||[],f=r.get(p)||[];d.push({obj:e,key:c}),f.push({obj:t,key:c}),r.set(l,d),r.set(p,f)}o[c]=k_(o[c],u,n,r)}}}}else o=t;return o}}function D_(e,t,n){for(var r=n.get(e[t])||[],o=0,i=r.length;o<i;o++){var a=r[o];if(a.key===t&&a.obj===e)return!0}return!1}function j_(e){return Array.isArray(e)}function B_(e){return"function"==typeof e}function V_(e){return!F_(e)&&!j_(e)&&!B_(e)&&"object"==typeof e}function F_(e){return"string"==typeof e||"number"==typeof e||"boolean"==typeof e||void 0===e||e instanceof Date||e instanceof RegExp||null===e}var G_=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),H_=function(e){function t(n){var r=e.call(this,n)||this;return Object.setPrototypeOf(r,t.prototype),r}return G_(t,e),t}(Error);function Y_(e,t){var n,r=new Promise((function(e,r){n=setTimeout((function(){r(new H_("Operation timed out."))}),t)}));return Promise.race([e,r]).then((function(e){return clearTimeout(n),e}),(function(e){throw clearTimeout(n),e}))}var q_=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};function z_(e,t){return"string"==typeof t?e===t:!!e.match(t)}function K_(e,t){var n,r;if(!t)return!1;try{for(var o=q_(t),i=o.next();!i.done;i=o.next()){if(z_(e,i.value))return!0}}catch(e){n={error:e}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}return!1}var W_=function(){function e(){var e=this;this._promise=new Promise((function(t,n){e._resolve=t,e._reject=n}))}return Object.defineProperty(e.prototype,"promise",{get:function(){return this._promise},enumerable:!1,configurable:!0}),e.prototype.resolve=function(e){this._resolve(e)},e.prototype.reject=function(e){this._reject(e)},e}(),Q_=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},J_=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))},$_=function(){function e(e,t){this._callback=e,this._that=t,this._isCalled=!1,this._deferred=new W_}return Object.defineProperty(e.prototype,"isCalled",{get:function(){return this._isCalled},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"promise",{get:function(){return this._deferred.promise},enumerable:!1,configurable:!0}),e.prototype.call=function(){for(var e,t=this,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];if(!this._isCalled){this._isCalled=!0;try{Promise.resolve((e=this._callback).call.apply(e,J_([this._that],Q_(n),!1))).then((function(e){return t._deferred.resolve(e)}),(function(e){return t._deferred.reject(e)}))}catch(e){this._deferred.reject(e)}}return this._deferred.promise},e}();var X_,Z_={getKeyPairs:tg,serializeKeyPairs:eg,parseKeyPairsIntoRecord:function(e){return"string"!=typeof e||0===e.length?{}:e.split($m).map((function(e){return ng(e)})).filter((function(e){return void 0!==e&&e.value.length>0})).reduce((function(e,t){return e[t.key]=t.value,e}),{})},parsePairKeyValue:ng},ey={_export:function(e,t){return new Promise((function(n){Rt.with(Qm(Rt.active()),(function(){e.export(t,(function(e){n(e)}))}))}))}},ty=Object.freeze({__proto__:null,AlwaysOffSampler:b_,AlwaysOnSampler:E_,AnchoredClock:og,BindOnceFuture:$_,CompositePropagator:i_,DEFAULT_ATTRIBUTE_COUNT_LIMIT:Sg,DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT:Eg,DEFAULT_ENVIRONMENT:Tg,DEFAULT_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT:128,DEFAULT_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT:128,get ExportResultCode(){return qg},ParentBasedSampler:S_,get RPCType(){return m_},RandomIdGenerator:Dg,SDK_INFO:Hg,TRACE_PARENT_HEADER:p_,TRACE_STATE_HEADER:d_,TimeoutError:H_,TraceIdRatioBasedSampler:T_,TraceState:l_,get TracesSamplerValues(){return dg},VERSION:Gg,W3CBaggagePropagator:rg,W3CTraceContextPropagator:g_,_globalThis:Pg,addHrTimes:r_,baggageUtils:Z_,callWithTimeout:Y_,deleteRPCMetadata:function(e){return e.deleteValue(__)},getEnv:xg,getEnvWithoutDefaults:Cg,getRPCMetadata:function(e){return e.getValue(__)},getTimeOrigin:Qg,globalErrorHandler:hg,hexToBase64:function(e){return btoa(String.fromCharCode.apply(String,kg([],Ug(Lg(e)),!1)))},hexToBinary:Lg,hrTime:Jg,hrTimeDuration:Xg,hrTimeToMicroseconds:e_,hrTimeToMilliseconds:function(e){return 1e3*e[0]+e[1]/1e6},hrTimeToNanoseconds:Zg,hrTimeToTimeStamp:function(e){var t=""+"0".repeat(9)+e[1]+"Z",n=t.substring(t.length-9-1);return new Date(1e3*e[0]).toISOString().replace("000Z",n)},internal:ey,isAttributeKey:cg,isAttributeValue:ug,isTimeInput:n_,isTimeInputHrTime:t_,isTracingSuppressed:Jm,isUrlIgnored:K_,isWrapped:function(e){return"function"==typeof e&&"function"==typeof e.__original&&"function"==typeof e.__unwrap&&!0===e.__wrapped},loggingErrorHandler:pg,merge:L_,millisToHrTime:Wg,otperformance:Fg,parseEnvironment:Ig,parseTraceParent:h_,sanitizeAttributes:sg,setGlobalErrorHandler:function(e){fg=e},setRPCMetadata:function(e,t){return e.setValue(__,t)},suppressTracing:Qm,timeInputToHrTime:$g,unrefTimer:Yg,unsuppressTracing:function(e){return e.deleteValue(Wm)},urlMatches:z_}),ny=n(ty),ry={},oy={};function iy(){return X_||(X_=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ATTR_IMQA_WEB_VERSION=e.ATTR_IMQA_DEPLOYMENT_ENVIRONMENT_NAME=e.ATTR_IMQA_SERVICE_NAMESPACE=e.ATTR_IMQA_ELEMENT_CLASS=e.ATTR_IMQA_ELEMENT_ID=e.ATTR_IMQA_ELEMENT_TAG=e.ATTR_IMQA_ELEMENT_TEXT=e.ATTR_IMQA_SERVICE_TYPE=e.ATTR_OS_VERSION=e.ATTR_OS_NAME=e.ATTR_IMQA_USER_INTERACTION_PREV_HREF=e.ATTR_IMQA_BROWSER_LOCATION_HREF=e.ATTR_IMQA_LONGTASK_DURATION=e.ATTR_IMQA_LONGTASK_ENTRY_TYPE=e.ATTR_IMQA_LONGTASK_NAME=e.ATTR_IMQA_DOCUMENT_SCREEN_XY=e.ATTR_IMQA_DOCUMENT_REFERRER=e.ATTR_IMQA_CONNECTIVITY_ONLINE=e.ATTR_IMQA_LINK_SPAN_ID=e.ATTR_IMQA_LINK_TRACE_ID=e.ATTR_IMQA_HTTP_RESPONSE_BODY=e.ATTR_IMQA_HTTP_REQUEST_BODY=e.ATTR_IMQA_RUM_SCRIPT_INSTANCE=e.ATTR_IMQA_RUM_AGENT_VERSION=e.ATTR_IMQA_RUM_VERSION=e.ATTR_IMQA_AGENT_VERSION=e.ATTR_IMQA_SERVICE_KEY=e.ATTR_IMQA_LOG_MESSAGE=e.ATTR_IMQA_LOG_LEVEL=e.ATTR_IMQA_SESSION_ID=e.ATTR_IMQA_SCREEN_TYPE=e.ATTR_IMQA_SCREEN_NAME=e.ATTR_IMQA_SPAN_TYPE=e.ATTR_IMQA_RUM_COMPONENT=e.ATTR_IMQA_BROWSER_VERSION_MAJOR=e.ATTR_IMQA_BROWSER_VERSION=e.ATTR_IMQA_BROWSER_NAME=e.ATTR_IMQA_BROWSER_DEVICE=void 0;F.__exportStar(Km,e);const t=Km;e.ATTR_IMQA_BROWSER_DEVICE="imqa.browser.device",e.ATTR_IMQA_BROWSER_NAME="imqa.browser.name",e.ATTR_IMQA_BROWSER_VERSION="imqa.browser.version",e.ATTR_IMQA_BROWSER_VERSION_MAJOR="imqa.browser.version_major",e.ATTR_IMQA_RUM_COMPONENT="component",e.ATTR_IMQA_SPAN_TYPE="span.type",e.ATTR_IMQA_SCREEN_NAME="screen.name",e.ATTR_IMQA_SCREEN_TYPE="screen.type",e.ATTR_IMQA_SESSION_ID="session.id",e.ATTR_IMQA_LOG_LEVEL="level",e.ATTR_IMQA_LOG_MESSAGE="message",e.ATTR_IMQA_SERVICE_KEY="service.key",e.ATTR_IMQA_AGENT_VERSION="imqa.agent.version",e.ATTR_IMQA_RUM_VERSION="rum.version",e.ATTR_IMQA_RUM_AGENT_VERSION="imqa.rum.version",e.ATTR_IMQA_RUM_SCRIPT_INSTANCE="rum.scriptInstance",e.ATTR_IMQA_HTTP_REQUEST_BODY="http.request.body",e.ATTR_IMQA_HTTP_RESPONSE_BODY="http.response.body",e.ATTR_IMQA_LINK_TRACE_ID="link.traceId",e.ATTR_IMQA_LINK_SPAN_ID="link.spanId",e.ATTR_IMQA_CONNECTIVITY_ONLINE="online",e.ATTR_IMQA_DOCUMENT_REFERRER="document.referrer",e.ATTR_IMQA_DOCUMENT_SCREEN_XY="screen.xy",e.ATTR_IMQA_LONGTASK_NAME="longtask.name",e.ATTR_IMQA_LONGTASK_ENTRY_TYPE="longtask.entry_type",e.ATTR_IMQA_LONGTASK_DURATION="longtask.duration",e.ATTR_IMQA_BROWSER_LOCATION_HREF="location.href",e.ATTR_IMQA_USER_INTERACTION_PREV_HREF="prev.href",e.ATTR_OS_NAME="os.name",e.ATTR_OS_VERSION="os.version",e.ATTR_IMQA_SERVICE_TYPE="imqa.service.type",e.ATTR_IMQA_ELEMENT_TEXT="target_element_text",e.ATTR_IMQA_ELEMENT_TAG="target_element_tag",e.ATTR_IMQA_ELEMENT_ID="target_element_id",e.ATTR_IMQA_ELEMENT_CLASS="target_element_class",e.ATTR_IMQA_SERVICE_NAMESPACE=t.SEMRESATTRS_SERVICE_NAMESPACE,e.ATTR_IMQA_DEPLOYMENT_ENVIRONMENT_NAME="deployment.environment.name",e.ATTR_IMQA_WEB_VERSION="web.version"}(oy)),oy}var ay,sy,cy={};function uy(){return sy||(sy=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.LOCALSTORAGE_KEY=e.COOKIE_NAME=void 0,e.setSessionId=function(e){window.__imqa_session_id=e,g()},e.updateSessionStatus=g,e.initSessionTracking=function(e,t,n){(null==n?void 0:n.domain)&&(c=n.domain);(null==n?void 0:n.storage)&&(p=n.storage);s=e,l=!0,u=t,g();const r=setInterval((()=>g()),1e3*a);return["click","scroll","mousedown","keydown","touchend","visibilitychange"].forEach((e=>document.addEventListener(e,d,{capture:!0,passive:!0}))),{deinit:()=>{clearInterval(r),s=void 0,u=void 0}}},e.getRumSessionId=_,e.setRumSessionId=function(e){e.setAttribute(n.ATTR_IMQA_SESSION_ID,_())};const t=Wt,n=iy(),r=function(){if(ay)return cy;ay=1,Object.defineProperty(cy,"__esModule",{value:!0}),cy.generateId=function(e){return"x".repeat(e/4).replace(/x/g,(function(){return(16*Math.random()|0).toString(16)}))},cy.findCookieValue=function(e){const t=decodeURIComponent(document.cookie).split(";");for(let n=0;n<t.length;n++){const r=t[n].trim();if(0===r.indexOf(e+"="))return r.substring((e+"=").length,r.length)}},cy.isIframe=function(){try{return window.self!==window.top}catch(t){return e.diag.error("Error checking if window is in an iframe:",t),!0}};const e=Wt;return cy}(),o=144e5,i=900,a=60;let s;e.COOKIE_NAME="__imqa_rum_sid",e.LOCALSTORAGE_KEY="__imqa_rum_sid";let c,u,l=!1,p="cookie";function d(){l=!0}function f(e){const t=Date.now();return e>t||t>e+o}function h(){if(window.__imqa_session_id)return;let n;if("localStorage"===p)n=function(){try{const t=localStorage.getItem(e.LOCALSTORAGE_KEY);if(!t)return null;const n=JSON.parse(t),r=Date.now();return n.expiresAt&&n.expiresAt<r?(localStorage.removeItem(e.LOCALSTORAGE_KEY),null):n}catch(e){return t.diag.error("Failed to read from localStorage:",e),null}}();else{const o=(0,r.findCookieValue)(e.COOKIE_NAME);if(!o)return;const i=decodeURIComponent(o);if(!i)return;try{n=JSON.parse(i)}catch(e){return void t.diag.error("Failed to parse session state from cookie:",e)}}return n&&"object"==typeof n&&n.id&&"string"==typeof n.id&&n.id.length&&32===n.id.length&&n.startTime&&"number"==typeof n.startTime&&!f(n.startTime)?n:void 0}function m(n){if(!f(n.startTime))if("localStorage"===p)!function(n){try{const t=Date.now()+1e3*i,r={...n,expiresAt:t};localStorage.setItem(e.LOCALSTORAGE_KEY,JSON.stringify(r))}catch(e){t.diag.error("Failed to write to localStorage:",e)}}(n);else{const t=encodeURIComponent(JSON.stringify(n)),o=c?`domain=${c};`:"";let a=e.COOKIE_NAME+"="+t+"; path=/;"+o+"max-age="+i;(0,r.isIframe)()?a+=";SameSite=None; Secure":a+=";SameSite=Strict",document.cookie=a}}function g(){let e=h();e||(e=window.__imqa_session_id?{id:window.__imqa_session_id,startTime:Date.now()}:{id:(0,r.generateId)(128),startTime:Date.now()},l=!0),s=e.id,s&&(null==u||u.emit("session-changed",{sessionId:s})),l&&m(e),l=!1}function _(){return s||""}}(ry)),ry}var ly,py={};function dy(){return ly||(ly=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.spanResources=e.setScreenName=e.getScreenName=e.getTitle=void 0,e.setScreenAttribute=function(e){var t;r=e,o=null===(t=null===window||void 0===window?void 0:window.location)||void 0===t?void 0:t.href};const t=uy(),n=iy();let r,o;e.getTitle=()=>{if(!document)return"";const e=document.getElementsByTagName("title")[0];return e?e.innerHTML:"unknown"};const i=e=>{const t=new URL(window.location.href),n=t.hash.split("?")[0],r=`${t.origin}${t.pathname}${n}`;return e?t.href:r};e.getScreenName=t=>{const{screenNameType:n,urlWithSearchParams:a}=t;if(!window)return"unknown";if(o&&window.location.href!==o&&(r=void 0,o=window.location.href),r)return r;const s=(0,e.getTitle)();let c="";return c="titleOnly"===n?s:"routeOnly"===n?i(a):`${s} - ${i(a)}`,c};e.setScreenName=(t,n)=>{t.setAttribute("screen.name",(0,e.getScreenName)(n)),t.setAttribute("screen.type","page")};e.spanResources=(r,o)=>{const{screenNameType:i="routeOnly",urlWithSearchParams:a=!1}=o||{};(0,e.setScreenName)(r,{screenNameType:i,urlWithSearchParams:a}),(0,t.setRumSessionId)(r),r.setAttribute(n.ATTR_URL_FULL,window.location.href)}}(py)),py}var fy,hy={},my={},gy={},_y={};function yy(){return fy||(fy=1,Object.defineProperty(_y,"__esModule",{value:!0}),_y.ExceptionEventName=void 0,_y.ExceptionEventName="exception"),_y}var vy,by,Ey={},Sy={exports:{}};function Ty(){return vy||(vy=1,function(e){function t(e,t){var n=[],r=[];return null==t&&(t=function(e,t){return n[0]===t?"[Circular ~]":"[Circular ~."+r.slice(0,n.indexOf(t)).join(".")+"]"}),function(o,i){if(n.length>0){var a=n.indexOf(this);~a?n.splice(a+1):n.push(this),~a?r.splice(a,1/0,o):r.push(o),~n.indexOf(i)&&(i=t.call(this,o,i))}else n.push(i);return null==e?i:e.call(this,o,i)}}(e.exports=function(e,n,r,o){return JSON.stringify(e,t(n,o),r)}).getSerialize=t}(Sy)),Sy.exports}var Oy,Ay,wy={};function Ry(){return Oy||(Oy=1,Object.defineProperty(wy,"__esModule",{value:!0}),wy.VERSION=void 0,wy.VERSION="0.0.17"),wy}function Ny(){return Ay||(Ay=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.getEventProcessor=e.getSpanNameFromEvent=e.isSentryEventAnException=e.extractSpanEventsFromException=e.extractSemAttrsFromEvent=e.SEMATTRS_SENTRY_VERSION=e.SEMATTRS_EXCEPTION_THREAD_ID=e.SEMATTRS_EXCEPTION_TAGS=e.SEMATTRS_EXCEPTION_PARSED_STACKTRACE=e.SEMATTRS_EXCEPTION_MODULES=e.SEMATTRS_EXCEPTION_MODULE=e.SEMATTRS_EXCEPTION_MECHANISM=void 0;const t=F.__importStar(Wt),n=yy(),r=Km,o=function(){if(by)return Ey;by=1,Object.defineProperty(Ey,"__esModule",{value:!0}),Ey.jsonToString=void 0;const e=Wt,t=F.__importDefault(Ty());return Ey.jsonToString=n=>{try{return JSON.stringify(n)}catch(r){return e.diag.error("Failed to stringify json",r),(0,t.default)(n)}},Ey}(),i=Ry(),a=t.default.trace.getTracer("@imqa/instrumentation-node",i.VERSION);e.SEMATTRS_EXCEPTION_MECHANISM="exception.mechanism",e.SEMATTRS_EXCEPTION_MODULE="exception.module",e.SEMATTRS_EXCEPTION_MODULES="exception.modules",e.SEMATTRS_EXCEPTION_PARSED_STACKTRACE="exception.parsed_stacktrace",e.SEMATTRS_EXCEPTION_TAGS="exception.tags",e.SEMATTRS_EXCEPTION_THREAD_ID="exception.thread_id",e.SEMATTRS_SENTRY_VERSION="sentry.version";e.extractSemAttrsFromEvent=(t,n,i)=>{var a,s,c,u,l,p;return{...i&&{[e.SEMATTRS_SENTRY_VERSION]:i},...t.modules&&{[e.SEMATTRS_EXCEPTION_MODULES]:(0,o.jsonToString)(t.modules)},[e.SEMATTRS_EXCEPTION_TAGS]:(0,o.jsonToString)({culture:null===(a=t.contexts)||void 0===a?void 0:a.culture,dist:t.dist,environment:t.environment,mechanism:n.mechanism,release:t.release}),...(null===(s=t.contexts)||void 0===s?void 0:s.app)&&{"app.build_type":t.contexts.app.build_type,"app.id":t.contexts.app.app_identifier,"app.memory":t.contexts.app.app_memory,"app.name":t.contexts.app.app_name,"app.start_time":t.contexts.app.app_start_time,"app.version":t.contexts.app.app_version},...(null===(c=t.contexts)||void 0===c?void 0:c.response)&&{[r.SEMATTRS_HTTP_STATUS_CODE]:t.contexts.response.status_code,[r.SEMATTRS_HTTP_RESPONSE_CONTENT_LENGTH]:t.contexts.response.body_size,...(t.contexts.response.headers&&Object.entries(t.contexts.response.headers).reduce(((e,[t,n])=>(e[`http.response.header.${t}`]=n,e))),{})},...(null===(u=t.contexts)||void 0===u?void 0:u.cloud_resource)&&{"cloud.provider":t.contexts.cloud_resource["cloud.provider"],"cloud.account.id":t.contexts.cloud_resource["cloud.account.id"],"cloud.region":t.contexts.cloud_resource["cloud.region"],"cloud.availability_zone":t.contexts.cloud_resource["cloud.availability_zone"],"cloud.platform":t.contexts.cloud_resource["cloud.platform"],"host.id":t.contexts.cloud_resource["host.id"],"host.type":t.contexts.cloud_resource["host.type"]},...(null===(l=t.contexts)||void 0===l?void 0:l.os)&&{"os.build_id":t.contexts.os.build,"os.kernel_version":t.contexts.os.kernel_version,"os.type":t.contexts.os.name,"os.version":t.contexts.os.version},...(null===(p=t.contexts)||void 0===p?void 0:p.device)&&{"device.id":t.contexts.device.device_unique_identifier,"device.manufacturer":t.contexts.device.manufacturer,"device.model.identifier":t.contexts.device.model_id,"device.model.name":t.contexts.device.model,"device.type":t.contexts.device.device_type,"device.battery_level":t.contexts.device.battery_level,"device.battery_status":t.contexts.device.battery_status,"device.orientation":t.contexts.device.orientation,"device.brand":t.contexts.device.brand,"device.sreen_resolution":t.contexts.device.screen_resolution,"device.screen_height_pixels":t.contexts.device.screen_height_pixels,"device.screen_width_pixels":t.contexts.device.screen_width_pixels,"device.screen_density":t.contexts.device.screen_density,"device.screen_dpi":t.contexts.device.screen_dpi,"device.online":t.contexts.device.online,"device.charging":t.contexts.device.charging,"device.supports_vibration":t.contexts.device.supports_vibration,"device.supports_accelerometer":t.contexts.device.supports_accelerometer,"device.supports_gyroscope":t.contexts.device.supports_gyroscope,"device.supports_audio":t.contexts.device.supports_audio,"device.supports_location_service":t.contexts.device.supports_location_service,"device.boot_time":t.contexts.device.boot_time,"device.low_memory":t.contexts.device.low_memory,"device.simulator":t.contexts.device.simulator,"device.memory_size":t.contexts.device.memory_size,"device.free_memory":t.contexts.device.free_memory,"device.usable_memory":t.contexts.device.usable_memory,"device.storage_size":t.contexts.device.storage_size,"device.free_storage":t.contexts.device.free_storage,"device.external_storage_size":t.contexts.device.external_storage_size,"device.external_free_storage":t.contexts.device.external_free_storage,"host.cpu.model.name":t.contexts.device.cpu_description,"host.cpu.count":t.contexts.device.processor_count,"host.cpu.frequency":t.contexts.device.processor_frequency},...t.server_name&&{"host.name":t.server_name}}};e.extractSpanEventsFromException=t=>({[r.ATTR_EXCEPTION_MESSAGE]:t.value,[e.SEMATTRS_EXCEPTION_PARSED_STACKTRACE]:(0,o.jsonToString)(t.stacktrace),[r.ATTR_EXCEPTION_TYPE]:t.type,...t.mechanism&&{[e.SEMATTRS_EXCEPTION_MECHANISM]:(0,o.jsonToString)(t.mechanism)},...t.module&&{[e.SEMATTRS_EXCEPTION_MODULE]:t.module},...t.thread_id&&{[e.SEMATTRS_EXCEPTION_THREAD_ID]:t.thread_id}});e.isSentryEventAnException=e=>{var t,n;return(null===(n=null===(t=e.exception)||void 0===t?void 0:t.values)||void 0===n?void 0:n.length)>0};e.getSpanNameFromEvent=e=>{var t;return e.message?e.message:[null===(t=e.exception)||void 0===t?void 0:t.values[0].type,e.transaction].join(" ")};e.getEventProcessor=(r,o)=>(i,s,c,u)=>{try{if(t.diag.debug("Received Sentry event",i),(0,e.isSentryEventAnException)(i)){let l=r;null==l&&(l=a,t.diag.debug("Using default tracer")),(({customAttributes:r,event:o,hint:i,sentryVersion:a,span:s,spanStatus:c,tracer:u})=>{var l,p;let d=s,f=!1;const h=1e3*o.timestamp,m=(0,e.extractSemAttrsFromEvent)(o,i,a);null==d&&(f=!0,d=u.startSpan((0,e.getSpanNameFromEvent)(o),{attributes:{...r,...m},startTime:h,kind:t.SpanKind.INTERNAL})),d.setStatus({code:c});for(const t of null!==(p=null===(l=o.exception)||void 0===l?void 0:l.values)&&void 0!==p?p:[])d.addEvent(n.ExceptionEventName,(0,e.extractSpanEventsFromException)(t));f&&d.end(h)})({customAttributes:u,event:i,hint:s,sentryVersion:o,span:c,spanStatus:t.SpanStatusCode.ERROR,tracer:l})}}catch(e){t.diag.error("Error processing event",e)}return i}}(gy)),gy}var Iy,Py,xy={},Cy={};function My(){if(Py)return xy;Py=1,Object.defineProperty(xy,"__esModule",{value:!0}),xy.SentryNodeInstrumentation=void 0;const e=Wt,t=On,n=(Iy||(Iy=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.imqaIntegration=e._imqaIntegration=void 0;const t=Ny();e._imqaIntegration=()=>({name:"IMQA",setupOnce(){},setup(e){var n;if(!e.on)return;const r=e.getSdkMetadata(),o=(0,t.getEventProcessor)(void 0,null===(n=r.sdk)||void 0===n?void 0:n.version);e.on("beforeSendEvent",((e,t)=>{o(e,t)}))}}),e.imqaIntegration=e._imqaIntegration}(Cy)),Cy),r=Ry();class o extends t.InstrumentationBase{constructor(e={}){super("@imqa/instrumentation-node",r.VERSION,e)}setConfig(e={}){this._config=Object.assign({},e)}getConfig(){return this._config}init(){return[new t.InstrumentationNodeModuleDefinition("@sentry/node",[">=7.30.0 <9"],(t=>(e.diag.debug(`Detected Sentry installed with SDK version: ${t.SDK_VERSION}`),this._wrap(t,"init",(r=>(...o)=>{const i=r.apply(this,o);try{t.addIntegration instanceof Function?(t.addIntegration((0,n.imqaIntegration)()),e.diag.debug("Added IMQA Sentry integration")):e.diag.error("Sentry SDK does not support addIntegration method")}catch(t){e.diag.error("Error adding IMQA Sentry integration",t)}return i})),t)),(e=>{}))]}}return xy.SentryNodeInstrumentation=o,xy}var Ly,Uy,ky={};function Dy(){return Uy||(Uy=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=F;t.__exportStar(Ny(),e),t.__exportStar(My(),e),t.__exportStar((Ly||(Ly=1,Object.defineProperty(ky,"__esModule",{value:!0})),ky),e)}(my)),my}var jy,By={},Vy={},Fy={};function Gy(){if(jy)return Fy;jy=1,Object.defineProperty(Fy,"__esModule",{value:!0});const e="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__;return Fy.DEBUG_BUILD=e,Fy}var Hy,Yy,qy={},zy={},Ky={};function Wy(){if(Hy)return Ky;Hy=1,Object.defineProperty(Ky,"__esModule",{value:!0});return Ky.SDK_VERSION="8.55.0",Ky}function Qy(){if(Yy)return zy;Yy=1,Object.defineProperty(zy,"__esModule",{value:!0});const e=Wy(),t=globalThis;return zy.GLOBAL_OBJ=t,zy.getGlobalSingleton=function(n,r,o){const i=o||t,a=i.__SENTRY__=i.__SENTRY__||{},s=a[e.SDK_VERSION]=a[e.SDK_VERSION]||{};return s[n]||(s[n]=r())},zy}var Jy,$y={},Xy={};function Zy(){if(Jy)return Xy;Jy=1,Object.defineProperty(Xy,"__esModule",{value:!0});const e="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__;return Xy.DEBUG_BUILD=e,Xy}var ev,tv={};function nv(){if(ev)return tv;ev=1,Object.defineProperty(tv,"__esModule",{value:!0});const e=Zy(),t=Qy(),n=["debug","info","warn","error","log","assert","trace"],r={};function o(e){if(!("console"in t.GLOBAL_OBJ))return e();const n=t.GLOBAL_OBJ.console,o={},i=Object.keys(r);i.forEach((e=>{const t=r[e];o[e]=n[e],n[e]=t}));try{return e()}finally{i.forEach((e=>{n[e]=o[e]}))}}const i=t.getGlobalSingleton("logger",(function(){let r=!1;const i={enable:()=>{r=!0},disable:()=>{r=!1},isEnabled:()=>r};return e.DEBUG_BUILD?n.forEach((e=>{i[e]=(...n)=>{r&&o((()=>{t.GLOBAL_OBJ.console[e](`Sentry Logger [${e}]:`,...n)}))}})):n.forEach((e=>{i[e]=()=>{}})),i}));return tv.CONSOLE_LEVELS=n,tv.consoleSandbox=o,tv.logger=i,tv.originalConsoleMethods=r,tv}var rv,ov,iv,av={};function sv(){if(rv)return av;rv=1,Object.defineProperty(av,"__esModule",{value:!0});const e=/\(error: (.*)\)/,t=/captureMessage|captureException/;function n(...t){const n=t.sort(((e,t)=>e[0]-t[0])).map((e=>e[1]));return(t,o=0,i=0)=>{const a=[],s=t.split("\n");for(let t=o;t<s.length;t++){const r=s[t];if(r.length>1024)continue;const o=e.test(r)?r.replace(e,"$1"):r;if(!o.match(/\S*Error: /)){for(const e of n){const t=e(o);if(t){a.push(t);break}}if(a.length>=50+i)break}}return r(a.slice(i))}}function r(e){if(!e.length)return[];const n=Array.from(e);return/sentryWrapped/.test(o(n).function||"")&&n.pop(),n.reverse(),t.test(o(n).function||"")&&(n.pop(),t.test(o(n).function||"")&&n.pop()),n.slice(0,50).map((e=>({...e,filename:e.filename||o(n).filename,function:e.function||"?"})))}function o(e){return e[e.length-1]||{}}const i="<anonymous>";return av.UNKNOWN_FUNCTION="?",av.createStackParser=n,av.getFramesFromEvent=function(e){const t=e.exception;if(t){const e=[];try{return t.values.forEach((t=>{t.stacktrace.frames&&e.push(...t.stacktrace.frames)})),e}catch(e){return}}},av.getFunctionName=function(e){try{return e&&"function"==typeof e&&e.name||i}catch(e){return i}},av.stackParserFromStackParserOptions=function(e){return Array.isArray(e)?n(...e):e},av.stripSentryFramesAndReverse=r,av}function cv(){if(ov)return $y;ov=1,Object.defineProperty($y,"__esModule",{value:!0});const e=Zy(),t=nv(),n=sv(),r={},o={};return $y.addHandler=function(e,t){r[e]=r[e]||[],r[e].push(t)},$y.maybeInstrument=function(n,r){if(!o[n]){o[n]=!0;try{r()}catch(r){e.DEBUG_BUILD&&t.logger.error(`Error while instrumenting ${n}`,r)}}},$y.resetInstrumentationHandlers=function(){Object.keys(r).forEach((e=>{r[e]=void 0}))},$y.triggerHandlers=function(o,i){const a=o&&r[o];if(a)for(const r of a)try{r(i)}catch(i){e.DEBUG_BUILD&&t.logger.error(`Error while triggering instrumentation handler.\nType: ${o}\nName: ${n.getFunctionName(r)}\nError:`,i)}},$y}function uv(){if(iv)return qy;iv=1,Object.defineProperty(qy,"__esModule",{value:!0});const e=Qy(),t=cv();let n=null;function r(){n=e.GLOBAL_OBJ.onerror,e.GLOBAL_OBJ.onerror=function(e,r,o,i,a){const s={column:i,error:a,line:o,msg:e,url:r};return t.triggerHandlers("error",s),!!n&&n.apply(this,arguments)},e.GLOBAL_OBJ.onerror.__SENTRY_INSTRUMENTED__=!0}return qy.addGlobalErrorInstrumentationHandler=function(e){const n="error";t.addHandler(n,e),t.maybeInstrument(n,r)},qy}var lv,pv={};function dv(){if(lv)return pv;lv=1,Object.defineProperty(pv,"__esModule",{value:!0});const e=Qy(),t=cv();let n=null;function r(){n=e.GLOBAL_OBJ.onunhandledrejection,e.GLOBAL_OBJ.onunhandledrejection=function(e){const r=e;return t.triggerHandlers("unhandledrejection",r),!n||n.apply(this,arguments)},e.GLOBAL_OBJ.onunhandledrejection.__SENTRY_INSTRUMENTED__=!0}return pv.addGlobalUnhandledRejectionInstrumentationHandler=function(e){const n="unhandledrejection";t.addHandler(n,e),t.maybeInstrument(n,r)},pv}var fv,hv={},mv={},gv={};function _v(){if(fv)return gv;fv=1,Object.defineProperty(gv,"__esModule",{value:!0});const e=Wy(),t=Qy();function n(t){const n=t.__SENTRY__=t.__SENTRY__||{};return n.version=n.version||e.SDK_VERSION,n[e.SDK_VERSION]=n[e.SDK_VERSION]||{}}return gv.getMainCarrier=function(){return n(t.GLOBAL_OBJ),t.GLOBAL_OBJ},gv.getSentryCarrier=n,gv}var yv,vv,bv={},Ev={},Sv={},Tv={},Ov={},Av={},wv={};function Rv(){if(yv)return wv;yv=1,Object.defineProperty(wv,"__esModule",{value:!0});const e=Object.prototype.toString;function t(t,n){return e.call(t)===`[object ${n}]`}function n(e){return"object"==typeof e&&null!==e&&"__sentry_template_string__"in e&&"__sentry_template_values__"in e}function r(e){return t(e,"Object")}function o(e,t){try{return e instanceof t}catch(e){return!1}}return wv.isDOMError=function(e){return t(e,"DOMError")},wv.isDOMException=function(e){return t(e,"DOMException")},wv.isElement=function(e){return"undefined"!=typeof Element&&o(e,Element)},wv.isError=function(t){switch(e.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return o(t,Error)}},wv.isErrorEvent=function(e){return t(e,"ErrorEvent")},wv.isEvent=function(e){return"undefined"!=typeof Event&&o(e,Event)},wv.isInstanceOf=o,wv.isParameterizedString=n,wv.isPlainObject=r,wv.isPrimitive=function(e){return null===e||n(e)||"object"!=typeof e&&"function"!=typeof e},wv.isRegExp=function(e){return t(e,"RegExp")},wv.isString=function(e){return t(e,"String")},wv.isSyntheticEvent=function(e){return r(e)&&"nativeEvent"in e&&"preventDefault"in e&&"stopPropagation"in e},wv.isThenable=function(e){return Boolean(e&&e.then&&"function"==typeof e.then)},wv.isVueViewModel=function(e){return!("object"!=typeof e||null===e||!e.__isVue&&!e._isVue)},wv}function Nv(){if(vv)return Av;vv=1,Object.defineProperty(Av,"__esModule",{value:!0});const e=Rv(),t=Qy().GLOBAL_OBJ;function n(n,r){const o=n,i=[];if(!o||!o.tagName)return"";if(t.HTMLElement&&o instanceof HTMLElement&&o.dataset){if(o.dataset.sentryComponent)return o.dataset.sentryComponent;if(o.dataset.sentryElement)return o.dataset.sentryElement}i.push(o.tagName.toLowerCase());const a=r&&r.length?r.filter((e=>o.getAttribute(e))).map((e=>[e,o.getAttribute(e)])):null;if(a&&a.length)a.forEach((e=>{i.push(`[${e[0]}="${e[1]}"]`)}));else{o.id&&i.push(`#${o.id}`);const t=o.className;if(t&&e.isString(t)){const e=t.split(/\s+/);for(const t of e)i.push(`.${t}`)}}const s=["aria-label","type","name","title","alt"];for(const e of s){const t=o.getAttribute(e);t&&i.push(`[${e}="${t}"]`)}return i.join("")}return Av.getComponentName=function(e){if(!t.HTMLElement)return null;let n=e;for(let e=0;e<5;e++){if(!n)return null;if(n instanceof HTMLElement){if(n.dataset.sentryComponent)return n.dataset.sentryComponent;if(n.dataset.sentryElement)return n.dataset.sentryElement}n=n.parentNode}return null},Av.getDomElement=function(e){return t.document&&t.document.querySelector?t.document.querySelector(e):null},Av.getLocationHref=function(){try{return t.document.location.href}catch(e){return""}},Av.htmlTreeAsString=function(e,t={}){if(!e)return"<unknown>";try{let r=e;const o=5,i=[];let a=0,s=0;const c=" > ",u=c.length;let l;const p=Array.isArray(t)?t:t.keyAttrs,d=!Array.isArray(t)&&t.maxStringLength||80;for(;r&&a++<o&&(l=n(r,p),!("html"===l||a>1&&s+i.length*u+l.length>=d));)i.push(l),s+=l.length,r=r.parentNode;return i.reverse().join(c)}catch(e){return"<unknown>"}},Av}var Iv,Pv,xv={};function Cv(){if(Iv)return xv;Iv=1,Object.defineProperty(xv,"__esModule",{value:!0});const e=Rv();function t(t,n,r=!1){return!!e.isString(t)&&(e.isRegExp(n)?n.test(t):!!e.isString(n)&&(r?t===n:t.includes(n)))}return xv.isMatchingPattern=t,xv.safeJoin=function(t,n){if(!Array.isArray(t))return"";const r=[];for(let n=0;n<t.length;n++){const o=t[n];try{e.isVueViewModel(o)?r.push("[VueViewModel]"):r.push(String(o))}catch(e){r.push("[value cannot be serialized]")}}return r.join(n)},xv.snipLine=function(e,t){let n=e;const r=n.length;if(r<=150)return n;t>r&&(t=r);let o=Math.max(t-60,0);o<5&&(o=0);let i=Math.min(o+140,r);return i>r-5&&(i=r),i===r&&(o=Math.max(i-140,0)),n=n.slice(o,i),o>0&&(n=`'{snip} ${n}`),i<r&&(n+=" {snip}"),n},xv.stringMatchesSomePattern=function(e,n=[],r=!1){return n.some((n=>t(e,n,r)))},xv.truncate=function(e,t=0){return"string"!=typeof e||0===t||e.length<=t?e:`${e.slice(0,t)}...`},xv}function Mv(){if(Pv)return Ov;Pv=1,Object.defineProperty(Ov,"__esModule",{value:!0});const e=Nv(),t=Zy(),n=Rv(),r=nv(),o=Cv();function i(e,n,o){try{Object.defineProperty(e,n,{value:o,writable:!0,configurable:!0})}catch(o){t.DEBUG_BUILD&&r.logger.log(`Failed to add non-enumerable property "${n}" to object`,e)}}function a(e,t){try{const n=t.prototype||{};e.prototype=t.prototype=n,i(e,"__sentry_original__",t)}catch(e){}}function s(e){if(n.isError(e))return{message:e.message,name:e.name,stack:e.stack,...u(e)};if(n.isEvent(e)){const t={type:e.type,target:c(e.target),currentTarget:c(e.currentTarget),...u(e)};return"undefined"!=typeof CustomEvent&&n.isInstanceOf(e,CustomEvent)&&(t.detail=e.detail),t}return e}function c(t){try{return n.isElement(t)?e.htmlTreeAsString(t):Object.prototype.toString.call(t)}catch(e){return"<unknown>"}}function u(e){if("object"==typeof e&&null!==e){const t={};for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}return{}}function l(e,t){if(function(e){if(!n.isPlainObject(e))return!1;try{const t=Object.getPrototypeOf(e).constructor.name;return!t||"Object"===t}catch(e){return!0}}(e)){const n=t.get(e);if(void 0!==n)return n;const r={};t.set(e,r);for(const n of Object.getOwnPropertyNames(e))void 0!==e[n]&&(r[n]=l(e[n],t));return r}if(Array.isArray(e)){const n=t.get(e);if(void 0!==n)return n;const r=[];return t.set(e,r),e.forEach((e=>{r.push(l(e,t))})),r}return e}return Ov.addNonEnumerableProperty=i,Ov.convertToPlainObject=s,Ov.dropUndefinedKeys=function(e){return l(e,new Map)},Ov.extractExceptionKeysForMessage=function(e,t=40){const n=Object.keys(s(e));n.sort();const r=n[0];if(!r)return"[object has no keys]";if(r.length>=t)return o.truncate(r,t);for(let e=n.length;e>0;e--){const r=n.slice(0,e).join(", ");if(!(r.length>t))return e===n.length?r:o.truncate(r,t)}return""},Ov.fill=function(e,n,o){if(!(n in e))return;const i=e[n],s=o(i);"function"==typeof s&&a(s,i);try{e[n]=s}catch(o){t.DEBUG_BUILD&&r.logger.log(`Failed to replace method "${n}" in object`,e)}},Ov.getOriginalFunction=function(e){return e.__sentry_original__},Ov.markFunctionWrapped=a,Ov.objectify=function(e){let t;switch(!0){case null==e:t=new String(e);break;case"symbol"==typeof e||"bigint"==typeof e:t=Object(e);break;case n.isPrimitive(e):t=new e.constructor(e);break;default:t=e}return t},Ov.urlEncode=function(e){return Object.entries(e).map((([e,t])=>`${encodeURIComponent(e)}=${encodeURIComponent(t)}`)).join("&")},Ov}var Lv,Uv={};function kv(){if(Lv)return Uv;Lv=1,Object.defineProperty(Uv,"__esModule",{value:!0});const e=Qy();function t(){return Date.now()/1e3}const n=function(){const{performance:n}=e.GLOBAL_OBJ;if(!n||!n.now)return t;const r=Date.now()-n.now(),o=null==n.timeOrigin?r:n.timeOrigin;return()=>(o+n.now())/1e3}();Uv._browserPerformanceTimeOriginMode=void 0;const r=(()=>{const{performance:t}=e.GLOBAL_OBJ;if(!t||!t.now)return void(Uv._browserPerformanceTimeOriginMode="none");const n=36e5,r=t.now(),o=Date.now(),i=t.timeOrigin?Math.abs(t.timeOrigin+r-o):n,a=i<n,s=t.timing&&t.timing.navigationStart,c="number"==typeof s?Math.abs(s+r-o):n;return a||c<n?i<=c?(Uv._browserPerformanceTimeOriginMode="timeOrigin",t.timeOrigin):(Uv._browserPerformanceTimeOriginMode="navigationStart",s):(Uv._browserPerformanceTimeOriginMode="dateNow",o)})();return Uv.browserPerformanceTimeOrigin=r,Uv.dateTimestampInSeconds=t,Uv.timestampInSeconds=n,Uv}var Dv,jv={};function Bv(){if(Dv)return jv;Dv=1,Object.defineProperty(jv,"__esModule",{value:!0});const e=Mv(),t=Cv(),n=Qy();function r(e){return e.exception&&e.exception.values?e.exception.values[0]:void 0}const o=/^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/;function i(e){return parseInt(e||"",10)}return jv.addContextToFrame=function(e,n,r=5){if(void 0===n.lineno)return;const o=e.length,i=Math.max(Math.min(o-1,n.lineno-1),0);n.pre_context=e.slice(Math.max(0,i-r),i).map((e=>t.snipLine(e,0)));const a=Math.min(o-1,i);n.context_line=t.snipLine(e[a],n.colno||0),n.post_context=e.slice(Math.min(i+1,o),i+1+r).map((e=>t.snipLine(e,0)))},jv.addExceptionMechanism=function(e,t){const n=r(e);if(!n)return;const o=n.mechanism;if(n.mechanism={type:"generic",handled:!0,...o,...t},t&&"data"in t){const e={...o&&o.data,...t.data};n.mechanism.data=e}},jv.addExceptionTypeValue=function(e,t,n){const r=e.exception=e.exception||{},o=r.values=r.values||[],i=o[0]=o[0]||{};i.value||(i.value=t||""),i.type||(i.type=n||"Error")},jv.arrayify=function(e){return Array.isArray(e)?e:[e]},jv.checkOrSetAlreadyCaught=function(t){if(function(e){try{return e.__sentry_captured__}catch(e){}}(t))return!0;try{e.addNonEnumerableProperty(t,"__sentry_captured__",!0)}catch(e){}return!1},jv.getEventDescription=function(e){const{message:t,event_id:n}=e;if(t)return t;const o=r(e);return o?o.type&&o.value?`${o.type}: ${o.value}`:o.type||o.value||n||"<unknown>":n||"<unknown>"},jv.parseSemver=function(e){const t=e.match(o)||[],n=i(t[1]),r=i(t[2]),a=i(t[3]);return{buildmetadata:t[5],major:isNaN(n)?void 0:n,minor:isNaN(r)?void 0:r,patch:isNaN(a)?void 0:a,prerelease:t[4]}},jv.uuid4=function(){const e=n.GLOBAL_OBJ,t=e.crypto||e.msCrypto;let r=()=>16*Math.random();try{if(t&&t.randomUUID)return t.randomUUID().replace(/-/g,"");t&&t.getRandomValues&&(r=()=>{const e=new Uint8Array(1);return t.getRandomValues(e),e[0]})}catch(e){}return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,(e=>(e^(15&r())>>e/4).toString(16)))},jv}var Vv,Fv,Gv={};function Hv(){if(Vv)return Gv;Vv=1,Object.defineProperty(Gv,"__esModule",{value:!0});const e=Rv();var t;!function(e){e[e.PENDING=0]="PENDING";e[e.RESOLVED=1]="RESOLVED";e[e.REJECTED=2]="REJECTED"}(t||(t={}));class n{constructor(e){n.prototype.__init.call(this),n.prototype.__init2.call(this),n.prototype.__init3.call(this),n.prototype.__init4.call(this),this._state=t.PENDING,this._handlers=[];try{e(this._resolve,this._reject)}catch(e){this._reject(e)}}then(e,t){return new n(((n,r)=>{this._handlers.push([!1,t=>{if(e)try{n(e(t))}catch(e){r(e)}else n(t)},e=>{if(t)try{n(t(e))}catch(e){r(e)}else r(e)}]),this._executeHandlers()}))}catch(e){return this.then((e=>e),e)}finally(e){return new n(((t,n)=>{let r,o;return this.then((t=>{o=!1,r=t,e&&e()}),(t=>{o=!0,r=t,e&&e()})).then((()=>{o?n(r):t(r)}))}))}__init(){this._resolve=e=>{this._setResult(t.RESOLVED,e)}}__init2(){this._reject=e=>{this._setResult(t.REJECTED,e)}}__init3(){this._setResult=(n,r)=>{this._state===t.PENDING&&(e.isThenable(r)?r.then(this._resolve,this._reject):(this._state=n,this._value=r,this._executeHandlers()))}}__init4(){this._executeHandlers=()=>{if(this._state===t.PENDING)return;const e=this._handlers.slice();this._handlers=[],e.forEach((e=>{e[0]||(this._state===t.RESOLVED&&e[1](this._value),this._state===t.REJECTED&&e[2](this._value),e[0]=!0)}))}}}return Gv.SyncPromise=n,Gv.rejectedSyncPromise=function(e){return new n(((t,n)=>{n(e)}))},Gv.resolvedSyncPromise=function(e){return new n((t=>{t(e)}))},Gv}function Yv(){if(Fv)return Tv;Fv=1,Object.defineProperty(Tv,"__esModule",{value:!0});const e=Mv(),t=kv(),n=Bv();function r(e,r={}){if(r.user&&(!e.ipAddress&&r.user.ip_address&&(e.ipAddress=r.user.ip_address),e.did||r.did||(e.did=r.user.id||r.user.email||r.user.username)),e.timestamp=r.timestamp||t.timestampInSeconds(),r.abnormal_mechanism&&(e.abnormal_mechanism=r.abnormal_mechanism),r.ignoreDuration&&(e.ignoreDuration=r.ignoreDuration),r.sid&&(e.sid=32===r.sid.length?r.sid:n.uuid4()),void 0!==r.init&&(e.init=r.init),!e.did&&r.did&&(e.did=`${r.did}`),"number"==typeof r.started&&(e.started=r.started),e.ignoreDuration)e.duration=void 0;else if("number"==typeof r.duration)e.duration=r.duration;else{const t=e.timestamp-e.started;e.duration=t>=0?t:0}r.release&&(e.release=r.release),r.environment&&(e.environment=r.environment),!e.ipAddress&&r.ipAddress&&(e.ipAddress=r.ipAddress),!e.userAgent&&r.userAgent&&(e.userAgent=r.userAgent),"number"==typeof r.errors&&(e.errors=r.errors),r.status&&(e.status=r.status)}return Tv.closeSession=function(e,t){let n={};t?n={status:t}:"ok"===e.status&&(n={status:"exited"}),r(e,n)},Tv.makeSession=function(o){const i=t.timestampInSeconds(),a={sid:n.uuid4(),init:!0,timestamp:i,started:i,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>function(t){return e.dropUndefinedKeys({sid:`${t.sid}`,init:t.init,started:new Date(1e3*t.started).toISOString(),timestamp:new Date(1e3*t.timestamp).toISOString(),status:t.status,errors:t.errors,did:"number"==typeof t.did||"string"==typeof t.did?`${t.did}`:void 0,duration:t.duration,abnormal_mechanism:t.abnormal_mechanism,attrs:{release:t.release,environment:t.environment,ip_address:t.ipAddress,user_agent:t.userAgent}})}(a)};return o&&r(a,o),a},Tv.updateSession=r,Tv}var qv,zv={};function Kv(){if(qv)return zv;qv=1,Object.defineProperty(zv,"__esModule",{value:!0});const e=Bv();function t(){return e.uuid4()}function n(){return e.uuid4().substring(16)}return zv.generatePropagationContext=function(){return{traceId:t(),spanId:n()}},zv.generateSpanId=n,zv.generateTraceId=t,zv}var Wv,Qv={};function Jv(){if(Wv)return Qv;return Wv=1,Object.defineProperty(Qv,"__esModule",{value:!0}),Qv.merge=function e(t,n,r=2){if(!n||"object"!=typeof n||r<=0)return n;if(t&&n&&0===Object.keys(n).length)return t;const o={...t};for(const t in n)Object.prototype.hasOwnProperty.call(n,t)&&(o[t]=e(o[t],n[t],r-1));return o},Qv}var $v,Xv,Zv,eb,tb,nb={};function rb(){if($v)return nb;$v=1,Object.defineProperty(nb,"__esModule",{value:!0});const e=Mv(),t="_sentrySpan";return nb._getSpanForScope=function(e){return e[t]},nb._setSpanForScope=function(n,r){r?e.addNonEnumerableProperty(n,t,r):delete n[t]},nb}function ob(){if(Xv)return Sv;Xv=1,Object.defineProperty(Sv,"__esModule",{value:!0});const e=Yv(),t=Rv(),n=nv(),r=Bv(),o=Kv(),i=kv(),a=Jv(),s=rb();class c{constructor(){this._notifyingListeners=!1,this._scopeListeners=[],this._eventProcessors=[],this._breadcrumbs=[],this._attachments=[],this._user={},this._tags={},this._extra={},this._contexts={},this._sdkProcessingMetadata={},this._propagationContext={traceId:o.generateTraceId(),spanId:o.generateSpanId()}}clone(){const e=new c;return e._breadcrumbs=[...this._breadcrumbs],e._tags={...this._tags},e._extra={...this._extra},e._contexts={...this._contexts},this._contexts.flags&&(e._contexts.flags={values:[...this._contexts.flags.values]}),e._user=this._user,e._level=this._level,e._session=this._session,e._transactionName=this._transactionName,e._fingerprint=this._fingerprint,e._eventProcessors=[...this._eventProcessors],e._requestSession=this._requestSession,e._attachments=[...this._attachments],e._sdkProcessingMetadata={...this._sdkProcessingMetadata},e._propagationContext={...this._propagationContext},e._client=this._client,e._lastEventId=this._lastEventId,s._setSpanForScope(e,s._getSpanForScope(this)),e}setClient(e){this._client=e}setLastEventId(e){this._lastEventId=e}getClient(){return this._client}lastEventId(){return this._lastEventId}addScopeListener(e){this._scopeListeners.push(e)}addEventProcessor(e){return this._eventProcessors.push(e),this}setUser(t){return this._user=t||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this._session&&e.updateSession(this._session,{user:t}),this._notifyScopeListeners(),this}getUser(){return this._user}getRequestSession(){return this._requestSession}setRequestSession(e){return this._requestSession=e,this}setTags(e){return this._tags={...this._tags,...e},this._notifyScopeListeners(),this}setTag(e,t){return this._tags={...this._tags,[e]:t},this._notifyScopeListeners(),this}setExtras(e){return this._extra={...this._extra,...e},this._notifyScopeListeners(),this}setExtra(e,t){return this._extra={...this._extra,[e]:t},this._notifyScopeListeners(),this}setFingerprint(e){return this._fingerprint=e,this._notifyScopeListeners(),this}setLevel(e){return this._level=e,this._notifyScopeListeners(),this}setTransactionName(e){return this._transactionName=e,this._notifyScopeListeners(),this}setContext(e,t){return null===t?delete this._contexts[e]:this._contexts[e]=t,this._notifyScopeListeners(),this}setSession(e){return e?this._session=e:delete this._session,this._notifyScopeListeners(),this}getSession(){return this._session}update(e){if(!e)return this;const n="function"==typeof e?e(this):e,[r,o]=n instanceof u?[n.getScopeData(),n.getRequestSession()]:t.isPlainObject(n)?[e,e.requestSession]:[],{tags:i,extra:a,user:s,contexts:c,level:l,fingerprint:p=[],propagationContext:d}=r||{};return this._tags={...this._tags,...i},this._extra={...this._extra,...a},this._contexts={...this._contexts,...c},s&&Object.keys(s).length&&(this._user=s),l&&(this._level=l),p.length&&(this._fingerprint=p),d&&(this._propagationContext=d),o&&(this._requestSession=o),this}clear(){return this._breadcrumbs=[],this._tags={},this._extra={},this._user={},this._contexts={},this._level=void 0,this._transactionName=void 0,this._fingerprint=void 0,this._requestSession=void 0,this._session=void 0,s._setSpanForScope(this,void 0),this._attachments=[],this.setPropagationContext({traceId:o.generateTraceId()}),this._notifyScopeListeners(),this}addBreadcrumb(e,t){const n="number"==typeof t?t:100;if(n<=0)return this;const r={timestamp:i.dateTimestampInSeconds(),...e};return this._breadcrumbs.push(r),this._breadcrumbs.length>n&&(this._breadcrumbs=this._breadcrumbs.slice(-n),this._client&&this._client.recordDroppedEvent("buffer_overflow","log_item")),this._notifyScopeListeners(),this}getLastBreadcrumb(){return this._breadcrumbs[this._breadcrumbs.length-1]}clearBreadcrumbs(){return this._breadcrumbs=[],this._notifyScopeListeners(),this}addAttachment(e){return this._attachments.push(e),this}clearAttachments(){return this._attachments=[],this}getScopeData(){return{breadcrumbs:this._breadcrumbs,attachments:this._attachments,contexts:this._contexts,tags:this._tags,extra:this._extra,user:this._user,level:this._level,fingerprint:this._fingerprint||[],eventProcessors:this._eventProcessors,propagationContext:this._propagationContext,sdkProcessingMetadata:this._sdkProcessingMetadata,transactionName:this._transactionName,span:s._getSpanForScope(this)}}setSDKProcessingMetadata(e){return this._sdkProcessingMetadata=a.merge(this._sdkProcessingMetadata,e,2),this}setPropagationContext(e){return this._propagationContext={spanId:o.generateSpanId(),...e},this}getPropagationContext(){return this._propagationContext}captureException(e,t){const o=t&&t.event_id?t.event_id:r.uuid4();if(!this._client)return n.logger.warn("No client configured on scope - will not capture exception!"),o;const i=new Error("Sentry syntheticException");return this._client.captureException(e,{originalException:e,syntheticException:i,...t,event_id:o},this),o}captureMessage(e,t,o){const i=o&&o.event_id?o.event_id:r.uuid4();if(!this._client)return n.logger.warn("No client configured on scope - will not capture message!"),i;const a=new Error(e);return this._client.captureMessage(e,t,{originalException:e,syntheticException:a,...o,event_id:i},this),i}captureEvent(e,t){const o=t&&t.event_id?t.event_id:r.uuid4();return this._client?(this._client.captureEvent(e,{...t,event_id:o},this),o):(n.logger.warn("No client configured on scope - will not capture event!"),o)}_notifyScopeListeners(){this._notifyingListeners||(this._notifyingListeners=!0,this._scopeListeners.forEach((e=>{e(this)})),this._notifyingListeners=!1)}}const u=c;return Sv.Scope=u,Sv}function ib(){if(Zv)return Ev;Zv=1,Object.defineProperty(Ev,"__esModule",{value:!0});const e=ob(),t=Qy();return Ev.getDefaultCurrentScope=function(){return t.getGlobalSingleton("defaultCurrentScope",(()=>new e.Scope))},Ev.getDefaultIsolationScope=function(){return t.getGlobalSingleton("defaultIsolationScope",(()=>new e.Scope))},Ev}function ab(){if(eb)return bv;eb=1,Object.defineProperty(bv,"__esModule",{value:!0});const e=ib(),t=ob(),n=Rv(),r=_v();class o{constructor(e,n){let r,o;r=e||new t.Scope,o=n||new t.Scope,this._stack=[{scope:r}],this._isolationScope=o}withScope(e){const t=this._pushScope();let r;try{r=e(t)}catch(e){throw this._popScope(),e}return n.isThenable(r)?r.then((e=>(this._popScope(),e)),(e=>{throw this._popScope(),e})):(this._popScope(),r)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this._isolationScope}getStackTop(){return this._stack[this._stack.length-1]}_pushScope(){const e=this.getScope().clone();return this._stack.push({client:this.getClient(),scope:e}),e}_popScope(){return!(this._stack.length<=1)&&!!this._stack.pop()}}function i(){const t=r.getMainCarrier(),n=r.getSentryCarrier(t);return n.stack=n.stack||new o(e.getDefaultCurrentScope(),e.getDefaultIsolationScope())}function a(e){return i().withScope(e)}function s(e,t){const n=i();return n.withScope((()=>(n.getStackTop().scope=e,t(e))))}function c(e){return i().withScope((()=>e(i().getIsolationScope())))}return bv.AsyncContextStack=o,bv.getStackAsyncContextStrategy=function(){return{withIsolationScope:c,withScope:a,withSetScope:s,withSetIsolationScope:(e,t)=>c(t),getCurrentScope:()=>i().getScope(),getIsolationScope:()=>i().getIsolationScope()}},bv}function sb(){if(tb)return mv;tb=1,Object.defineProperty(mv,"__esModule",{value:!0});const e=_v(),t=ab();return mv.getAsyncContextStrategy=function(n){const r=e.getSentryCarrier(n);return r.acs?r.acs:t.getStackAsyncContextStrategy()},mv.setAsyncContextStrategy=function(t){const n=e.getMainCarrier();e.getSentryCarrier(n).acs=t},mv}var cb,ub={};function lb(){if(cb)return ub;cb=1,Object.defineProperty(ub,"__esModule",{value:!0});const e=sb(),t=_v(),n=ob(),r=Mv(),o=Qy();function i(){const n=t.getMainCarrier();return e.getAsyncContextStrategy(n).getCurrentScope()}return ub.getClient=function(){return i().getClient()},ub.getCurrentScope=i,ub.getGlobalScope=function(){return o.getGlobalSingleton("globalScope",(()=>new n.Scope))},ub.getIsolationScope=function(){const n=t.getMainCarrier();return e.getAsyncContextStrategy(n).getIsolationScope()},ub.getTraceContextFromScope=function(e){const t=e.getPropagationContext(),{traceId:n,spanId:o,parentSpanId:i}=t;return r.dropUndefinedKeys({trace_id:n,span_id:o,parent_span_id:i})},ub.withIsolationScope=function(...n){const r=t.getMainCarrier(),o=e.getAsyncContextStrategy(r);if(2===n.length){const[e,t]=n;return e?o.withSetIsolationScope(e,t):o.withIsolationScope(t)}return o.withIsolationScope(n[0])},ub.withScope=function(...n){const r=t.getMainCarrier(),o=e.getAsyncContextStrategy(r);if(2===n.length){const[e,t]=n;return e?o.withSetScope(e,t):o.withScope(t)}return o.withScope(n[0])},ub}var pb,db={};function fb(){if(pb)return db;pb=1,Object.defineProperty(db,"__esModule",{value:!0});const e=Mv(),t="_sentryMetrics";return db.getMetricSummaryJsonForSpan=function(n){const r=n[t];if(!r)return;const o={};for(const[,[t,n]]of r){(o[t]||(o[t]=[])).push(e.dropUndefinedKeys(n))}return o},db.updateMetricSummaryOnSpan=function(e,n,r,o,i,a,s){const c=e[t]||(e[t]=new Map),u=`${n}:${r}@${i}`,l=c.get(s);if(l){const[,e]=l;c.set(s,[u,{min:Math.min(e.min,o),max:Math.max(e.max,o),count:e.count+=1,sum:e.sum+=o,tags:e.tags}])}else c.set(s,[u,{min:o,max:o,count:1,sum:o,tags:a}])},db}var hb,mb={};function gb(){if(hb)return mb;hb=1,Object.defineProperty(mb,"__esModule",{value:!0});return mb.SEMANTIC_ATTRIBUTE_CACHE_HIT="cache.hit",mb.SEMANTIC_ATTRIBUTE_CACHE_ITEM_SIZE="cache.item_size",mb.SEMANTIC_ATTRIBUTE_CACHE_KEY="cache.key",mb.SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME="sentry.exclusive_time",mb.SEMANTIC_ATTRIBUTE_HTTP_REQUEST_METHOD="http.request.method",mb.SEMANTIC_ATTRIBUTE_PROFILE_ID="sentry.profile_id",mb.SEMANTIC_ATTRIBUTE_SENTRY_CUSTOM_SPAN_NAME="sentry.custom_span_name",mb.SEMANTIC_ATTRIBUTE_SENTRY_IDLE_SPAN_FINISH_REASON="sentry.idle_span_finish_reason",mb.SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT="sentry.measurement_unit",mb.SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE="sentry.measurement_value",mb.SEMANTIC_ATTRIBUTE_SENTRY_OP="sentry.op",mb.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN="sentry.origin",mb.SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE="sentry.sample_rate",mb.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE="sentry.source",mb.SEMANTIC_ATTRIBUTE_URL_FULL="url.full",mb}var _b,yb={};function vb(){if(_b)return yb;_b=1,Object.defineProperty(yb,"__esModule",{value:!0});function e(e){if(e<400&&e>=100)return{code:1};if(e>=400&&e<500)switch(e){case 401:return{code:2,message:"unauthenticated"};case 403:return{code:2,message:"permission_denied"};case 404:return{code:2,message:"not_found"};case 409:return{code:2,message:"already_exists"};case 413:return{code:2,message:"failed_precondition"};case 429:return{code:2,message:"resource_exhausted"};case 499:return{code:2,message:"cancelled"};default:return{code:2,message:"invalid_argument"}}if(e>=500&&e<600)switch(e){case 501:return{code:2,message:"unimplemented"};case 503:return{code:2,message:"unavailable"};case 504:return{code:2,message:"deadline_exceeded"};default:return{code:2,message:"internal_error"}}return{code:2,message:"unknown_error"}}return yb.SPAN_STATUS_ERROR=2,yb.SPAN_STATUS_OK=1,yb.SPAN_STATUS_UNSET=0,yb.getSpanStatusFromHttpCode=e,yb.setHttpStatus=function(t,n){t.setAttribute("http.response.status_code",n);const r=e(n);"unknown_error"!==r.message&&t.setStatus(r)},yb}var bb,Eb,Sb,Tb,Ob={},Ab={};function wb(){if(bb)return Ab;bb=1,Object.defineProperty(Ab,"__esModule",{value:!0});const e=Zy(),t=Rv(),n=nv(),r="sentry-",o=/^sentry-/,i=8192;function a(e){if(e&&(t.isString(e)||Array.isArray(e)))return Array.isArray(e)?e.reduce(((e,t)=>{const n=s(t);return Object.entries(n).forEach((([t,n])=>{e[t]=n})),e}),{}):s(e)}function s(e){return e.split(",").map((e=>e.split("=").map((e=>decodeURIComponent(e.trim()))))).reduce(((e,[t,n])=>(t&&n&&(e[t]=n),e)),{})}return Ab.BAGGAGE_HEADER_NAME="baggage",Ab.MAX_BAGGAGE_STRING_LENGTH=i,Ab.SENTRY_BAGGAGE_KEY_PREFIX=r,Ab.SENTRY_BAGGAGE_KEY_PREFIX_REGEX=o,Ab.baggageHeaderToDynamicSamplingContext=function(e){const t=a(e);if(!t)return;const n=Object.entries(t).reduce(((e,[t,n])=>{if(t.match(o)){e[t.slice(7)]=n}return e}),{});return Object.keys(n).length>0?n:void 0},Ab.dynamicSamplingContextToSentryBaggageHeader=function(t){if(!t)return;return function(t){if(0===Object.keys(t).length)return;return Object.entries(t).reduce(((t,[r,o],a)=>{const s=`${encodeURIComponent(r)}=${encodeURIComponent(o)}`,c=0===a?s:`${t},${s}`;return c.length>i?(e.DEBUG_BUILD&&n.logger.warn(`Not adding key: ${r} with val: ${o} to baggage header due to exceeding baggage size limits.`),t):c}),"")}(Object.entries(t).reduce(((e,[t,n])=>(n&&(e[`${r}${t}`]=n),e)),{}))},Ab.parseBaggageHeader=a,Ab}function Rb(){if(Eb)return Ob;Eb=1,Object.defineProperty(Ob,"__esModule",{value:!0});const e=wb(),t=Kv(),n=new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");function r(e){if(!e)return;const t=e.match(n);if(!t)return;let r;return"1"===t[3]?r=!0:"0"===t[3]&&(r=!1),{traceId:t[1],parentSampled:r,parentSpanId:t[2]}}return Ob.TRACEPARENT_REGEXP=n,Ob.extractTraceparentData=r,Ob.generateSentryTraceHeader=function(e=t.generateTraceId(),n=t.generateSpanId(),r){let o="";return void 0!==r&&(o=r?"-1":"-0"),`${e}-${n}${o}`},Ob.propagationContextFromHeaders=function(n,o){const i=r(n),a=e.baggageHeaderToDynamicSamplingContext(o);if(!i||!i.traceId)return{traceId:t.generateTraceId(),spanId:t.generateSpanId()};const{traceId:s,parentSpanId:c,parentSampled:u}=i;return{traceId:s,parentSpanId:c,spanId:t.generateSpanId(),sampled:u,dsc:a||{}}},Ob}function Nb(){if(Sb)return hv;Sb=1,Object.defineProperty(hv,"__esModule",{value:!0});const e=sb(),t=_v(),n=lb(),r=fb(),o=gb(),i=vb(),a=nv(),s=Mv(),c=Kv(),u=kv(),l=Rb(),p=rb();let d=!1;function f(e){return"number"==typeof e?h(e):Array.isArray(e)?e[0]+e[1]/1e9:e instanceof Date?h(e.getTime()):u.timestampInSeconds()}function h(e){return e>9999999999?e/1e3:e}function m(e){if(function(e){return"function"==typeof e.getSpanJSON}(e))return e.getSpanJSON();try{const{spanId:t,traceId:n}=e.spanContext();if(function(e){const t=e;return!!(t.attributes&&t.startTime&&t.name&&t.endTime&&t.status)}(e)){const{attributes:i,startTime:a,name:c,endTime:u,parentSpanId:l,status:p}=e;return s.dropUndefinedKeys({span_id:t,trace_id:n,data:i,description:c,parent_span_id:l,start_timestamp:f(a),timestamp:f(u)||void 0,status:_(p),op:i[o.SEMANTIC_ATTRIBUTE_SENTRY_OP],origin:i[o.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN],_metrics_summary:r.getMetricSummaryJsonForSpan(e)})}return{span_id:t,trace_id:n}}catch(e){return{}}}function g(e){const{traceFlags:t}=e.spanContext();return 1===t}function _(e){if(e&&e.code!==i.SPAN_STATUS_UNSET)return e.code===i.SPAN_STATUS_OK?"ok":e.message||"unknown_error"}const y="_sentryChildSpans",v="_sentryRootSpan";function b(){const r=t.getMainCarrier(),o=e.getAsyncContextStrategy(r);return o.getActiveSpan?o.getActiveSpan():p._getSpanForScope(n.getCurrentScope())}return hv.TRACE_FLAG_NONE=0,hv.TRACE_FLAG_SAMPLED=1,hv.addChildSpanToSpan=function(e,t){const n=e[v]||e;s.addNonEnumerableProperty(t,v,n),e[y]?e[y].add(t):s.addNonEnumerableProperty(e,y,new Set([t]))},hv.getActiveSpan=b,hv.getRootSpan=function(e){return e[v]||e},hv.getSpanDescendants=function(e){const t=new Set;return function e(n){if(!t.has(n)&&g(n)){t.add(n);const r=n[y]?Array.from(n[y]):[];for(const t of r)e(t)}}(e),Array.from(t)},hv.getStatusMessage=_,hv.removeChildSpanFromSpan=function(e,t){e[y]&&e[y].delete(t)},hv.showSpanDropWarning=function(){d||(a.consoleSandbox((()=>{console.warn("[Sentry] Deprecation warning: Returning null from `beforeSendSpan` will be disallowed from SDK version 9.0.0 onwards. The callback will only support mutating spans. To drop certain spans, configure the respective integrations directly.")})),d=!0)},hv.spanIsSampled=g,hv.spanTimeInputToSeconds=f,hv.spanToJSON=m,hv.spanToTraceContext=function(e){const{spanId:t,traceId:n,isRemote:r}=e.spanContext(),o=r?t:m(e).parent_span_id,i=r?c.generateSpanId():t;return s.dropUndefinedKeys({parent_span_id:o,span_id:i,trace_id:n})},hv.spanToTraceHeader=function(e){const{traceId:t,spanId:n}=e.spanContext(),r=g(e);return l.generateSentryTraceHeader(t,n,r)},hv.spanToTransactionTraceContext=function(e){const{spanId:t,traceId:n}=e.spanContext(),{data:r,op:o,parent_span_id:i,status:a,origin:c}=m(e);return s.dropUndefinedKeys({parent_span_id:i,span_id:t,trace_id:n,data:r,op:o,status:a,origin:c})},hv.updateMetricSummaryOnActiveSpan=function(e,t,n,o,i,a){const s=b();s&&r.updateMetricSummaryOnSpan(s,e,t,n,o,i,a)},hv.updateSpanName=function(e,t){e.updateName(t),e.setAttributes({[o.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]:"custom",[o.SEMANTIC_ATTRIBUTE_SENTRY_CUSTOM_SPAN_NAME]:t})},hv}function Ib(){if(Tb)return Vy;Tb=1,Object.defineProperty(Vy,"__esModule",{value:!0});const e=Gy(),t=uv(),n=dv(),r=nv(),o=Nb(),i=vb();let a=!1;function s(){const t=o.getActiveSpan(),n=t&&o.getRootSpan(t);if(n){const t="internal_error";e.DEBUG_BUILD&&r.logger.log(`[Tracing] Root span: ${t} -> Global error occurred`),n.setStatus({code:i.SPAN_STATUS_ERROR,message:t})}}return s.tag="sentry_tracingErrorCallback",Vy.registerSpanErrorInstrumentation=function(){a||(a=!0,t.addGlobalErrorInstrumentationHandler(s),n.addGlobalUnhandledRejectionInstrumentationHandler(s))},Vy}var Pb,xb={};function Cb(){if(Pb)return xb;Pb=1,Object.defineProperty(xb,"__esModule",{value:!0});const e=Mv(),t="_sentryScope",n="_sentryIsolationScope";return xb.getCapturedScopesOnSpan=function(e){return{scope:e[t],isolationScope:e[n]}},xb.setCapturedScopesOnSpan=function(r,o,i){r&&(e.addNonEnumerableProperty(r,n,i),e.addNonEnumerableProperty(r,t,o))},xb}var Mb,Lb={};function Ub(){if(Mb)return Lb;Mb=1,Object.defineProperty(Lb,"__esModule",{value:!0});const e=Ib();return Lb.addTracingExtensions=function(){e.registerSpanErrorInstrumentation()},Lb}var kb,Db={},jb={};function Bb(){if(kb)return jb;kb=1,Object.defineProperty(jb,"__esModule",{value:!0});const e=lb();return jb.hasTracingEnabled=function(t){if("boolean"==typeof __SENTRY_TRACING__&&!__SENTRY_TRACING__)return!1;const n=e.getClient(),r=t||n&&n.getOptions();return!!r&&(r.enableTracing||"tracesSampleRate"in r||"tracesSampler"in r)},jb}var Vb,Fb={};function Gb(){if(Vb)return Fb;Vb=1,Object.defineProperty(Fb,"__esModule",{value:!0});const e=Kv(),t=Nb();return Fb.SentryNonRecordingSpan=class{constructor(t={}){this._traceId=t.traceId||e.generateTraceId(),this._spanId=t.spanId||e.generateSpanId()}spanContext(){return{spanId:this._spanId,traceId:this._traceId,traceFlags:t.TRACE_FLAG_NONE}}end(e){}setAttribute(e,t){return this}setAttributes(e){return this}setStatus(e){return this}updateName(e){return this}isRecording(){return!1}addEvent(e,t,n){return this}addLink(e){return this}addLinks(e){return this}recordException(e,t){}},Fb}var Hb,Yb={},qb={};function zb(){if(Hb)return qb;Hb=1,Object.defineProperty(qb,"__esModule",{value:!0});const e=Rv();return qb.handleCallbackErrors=function(t,n,r=()=>{}){let o;try{o=t()}catch(e){throw n(e),r(),e}return function(t,n,r){if(e.isThenable(t))return t.then((e=>(r(),e)),(e=>{throw n(e),r(),e}));return r(),t}(o,n,r)},qb}var Kb,Wb,Qb={},Jb={};function $b(){if(Kb)return Jb;Kb=1,Object.defineProperty(Jb,"__esModule",{value:!0});return Jb.DEFAULT_ENVIRONMENT="production",Jb}function Xb(){if(Wb)return Qb;Wb=1,Object.defineProperty(Qb,"__esModule",{value:!0});const e=$b(),t=lb(),n=gb(),r=wb(),o=Mv(),i=Bb(),a=Nb(),s="_frozenDsc";function c(t,n){const r=n.getOptions(),{publicKey:i}=n.getDsn()||{},a=o.dropUndefinedKeys({environment:r.environment||e.DEFAULT_ENVIRONMENT,release:r.release,public_key:i,trace_id:t});return n.emit("createDsc",a),a}function u(e){const o=t.getClient();if(!o)return{};const u=a.getRootSpan(e),l=u[s];if(l)return l;const p=u.spanContext().traceState,d=p&&p.get("sentry.dsc"),f=d&&r.baggageHeaderToDynamicSamplingContext(d);if(f)return f;const h=c(e.spanContext().traceId,o),m=a.spanToJSON(u),g=m.data||{},_=g[n.SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE];null!=_&&(h.sample_rate=`${_}`);const y=g[n.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE],v=m.description;return"url"!==y&&v&&(h.transaction=v),i.hasTracingEnabled()&&(h.sampled=String(a.spanIsSampled(u))),o.emit("createDsc",h,u),h}return Qb.freezeDscOnSpan=function(e,t){const n=e;o.addNonEnumerableProperty(n,s,t)},Qb.getDynamicSamplingContextFromClient=c,Qb.getDynamicSamplingContextFromScope=function(e,t){const n=t.getPropagationContext();return n.dsc||c(n.traceId,e)},Qb.getDynamicSamplingContextFromSpan=u,Qb.spanToBaggageHeader=function(e){const t=u(e);return r.dynamicSamplingContextToSentryBaggageHeader(t)},Qb}var Zb,eE={};function tE(){if(Zb)return eE;Zb=1,Object.defineProperty(eE,"__esModule",{value:!0});const e=Gy(),t=nv(),n=Nb();return eE.logSpanEnd=function(r){if(!e.DEBUG_BUILD)return;const{description:o="< unknown name >",op:i="< unknown op >"}=n.spanToJSON(r),{spanId:a}=r.spanContext(),s=`[Tracing] Finishing "${i}" ${n.getRootSpan(r)===r?"root ":""}span "${o}" with ID ${a}`;t.logger.log(s)},eE.logSpanStart=function(r){if(!e.DEBUG_BUILD)return;const{description:o="< unknown name >",op:i="< unknown op >",parent_span_id:a}=n.spanToJSON(r),{spanId:s}=r.spanContext(),c=n.spanIsSampled(r),u=n.getRootSpan(r),l=u===r,p=`[Tracing] Starting ${c?"sampled":"unsampled"} ${l?"root ":""}span`,d=[`op: ${i}`,`name: ${o}`,`ID: ${s}`];if(a&&d.push(`parent ID: ${a}`),!l){const{op:e,description:t}=n.spanToJSON(u);d.push(`root ID: ${u.spanContext().spanId}`),e&&d.push(`root op: ${e}`),t&&d.push(`root description: ${t}`)}t.logger.log(`${p}\n  ${d.join("\n  ")}`)},eE}var nE,rE,oE={},iE={};function aE(){if(nE)return iE;nE=1,Object.defineProperty(iE,"__esModule",{value:!0});const e=Gy(),t=nv();return iE.parseSampleRate=function(n){if("boolean"==typeof n)return Number(n);const r="string"==typeof n?parseFloat(n):n;if(!("number"!=typeof r||isNaN(r)||r<0||r>1))return r;e.DEBUG_BUILD&&t.logger.warn(`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(n)} of type ${JSON.stringify(typeof n)}.`)},iE}function sE(){if(rE)return oE;rE=1,Object.defineProperty(oE,"__esModule",{value:!0});const e=lb(),t=Gy(),n=nv(),r=Bb(),o=aE();return oE.sampleSpan=function(i,a){if(!r.hasTracingEnabled(i))return[!1];const s=e.getIsolationScope().getScopeData().sdkProcessingMetadata.normalizedRequest,c={...a,normalizedRequest:a.normalizedRequest||s};let u;u="function"==typeof i.tracesSampler?i.tracesSampler(c):void 0!==c.parentSampled?c.parentSampled:void 0!==i.tracesSampleRate?i.tracesSampleRate:1;const l=o.parseSampleRate(u);return void 0===l?(t.DEBUG_BUILD&&n.logger.warn("[Tracing] Discarding transaction because of invalid sample rate."),[!1]):l?Math.random()<l?[!0,l]:(t.DEBUG_BUILD&&n.logger.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(u)})`),[!1,l]):(t.DEBUG_BUILD&&n.logger.log("[Tracing] Discarding transaction because "+("function"==typeof i.tracesSampler?"tracesSampler returned 0 or false":"a negative sampling decision was inherited or tracesSampleRate is set to 0")),[!1,l])},oE}var cE,uE={},lE={},pE={};function dE(){if(cE)return pE;cE=1,Object.defineProperty(pE,"__esModule",{value:!0});const e=Zy(),t=nv(),n=/^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;function r(e){const r=n.exec(e);if(!r)return void t.consoleSandbox((()=>{console.error(`Invalid Sentry Dsn: ${e}`)}));const[i,a,s="",c="",u="",l=""]=r.slice(1);let p="",d=l;const f=d.split("/");if(f.length>1&&(p=f.slice(0,-1).join("/"),d=f.pop()),d){const e=d.match(/^\d+/);e&&(d=e[0])}return o({host:c,pass:s,path:p,projectId:d,port:u,protocol:i,publicKey:a})}function o(e){return{protocol:e.protocol,publicKey:e.publicKey||"",pass:e.pass||"",host:e.host,port:e.port||"",path:e.path||"",projectId:e.projectId}}return pE.dsnFromString=r,pE.dsnToString=function(e,t=!1){const{host:n,path:r,pass:o,port:i,projectId:a,protocol:s,publicKey:c}=e;return`${s}://${c}${t&&o?`:${o}`:""}@${n}${i?`:${i}`:""}/${r?`${r}/`:r}${a}`},pE.makeDsn=function(n){const i="string"==typeof n?r(n):o(n);if(i&&function(n){if(!e.DEBUG_BUILD)return!0;const{port:r,projectId:o,protocol:i}=n;return!(["protocol","publicKey","host","projectId"].find((e=>!n[e]&&(t.logger.error(`Invalid Sentry Dsn: ${e} missing`),!0)))||(o.match(/^\d+$/)?function(e){return"http"===e||"https"===e}(i)?r&&isNaN(parseInt(r,10))&&(t.logger.error(`Invalid Sentry Dsn: Invalid port ${r}`),1):(t.logger.error(`Invalid Sentry Dsn: Invalid protocol ${i}`),1):(t.logger.error(`Invalid Sentry Dsn: Invalid projectId ${o}`),1)))}(i))return i},pE}var fE,hE,mE,gE,_E={},yE={},vE={};function bE(){if(fE)return vE;return fE=1,Object.defineProperty(vE,"__esModule",{value:!0}),vE.memoBuilder=function(){const e="function"==typeof WeakSet,t=e?new WeakSet:[];return[function(n){if(e)return!!t.has(n)||(t.add(n),!1);for(let e=0;e<t.length;e++){if(t[e]===n)return!0}return t.push(n),!1},function(n){if(e)t.delete(n);else for(let e=0;e<t.length;e++)if(t[e]===n){t.splice(e,1);break}}]},vE}function EE(){if(hE)return yE;hE=1,Object.defineProperty(yE,"__esModule",{value:!0});const t=Rv(),n=bE(),r=Mv(),o=sv();function i(e,t=100,n=1/0){try{return a("",e,t,n)}catch(e){return{ERROR:`**non-serializable** (${e})`}}}function a(i,s,c=1/0,u=1/0,l=n.memoBuilder()){const[p,d]=l;if(null==s||["boolean","string"].includes(typeof s)||"number"==typeof s&&Number.isFinite(s))return s;const f=function(n,r){try{if("domain"===n&&r&&"object"==typeof r&&r._events)return"[Domain]";if("domainEmitter"===n)return"[DomainEmitter]";if(void 0!==e&&r===e)return"[Global]";if("undefined"!=typeof window&&r===window)return"[Window]";if("undefined"!=typeof document&&r===document)return"[Document]";if(t.isVueViewModel(r))return"[VueViewModel]";if(t.isSyntheticEvent(r))return"[SyntheticEvent]";if("number"==typeof r&&!Number.isFinite(r))return`[${r}]`;if("function"==typeof r)return`[Function: ${o.getFunctionName(r)}]`;if("symbol"==typeof r)return`[${String(r)}]`;if("bigint"==typeof r)return`[BigInt: ${String(r)}]`;const i=function(e){const t=Object.getPrototypeOf(e);return t?t.constructor.name:"null prototype"}(r);return/^HTML(\w*)Element$/.test(i)?`[HTMLElement: ${i}]`:`[object ${i}]`}catch(e){return`**non-serializable** (${e})`}}(i,s);if(!f.startsWith("[object "))return f;if(s.__sentry_skip_normalization__)return s;const h="number"==typeof s.__sentry_override_normalization_depth__?s.__sentry_override_normalization_depth__:c;if(0===h)return f.replace("object ","");if(p(s))return"[Circular ~]";const m=s;if(m&&"function"==typeof m.toJSON)try{return a("",m.toJSON(),h-1,u,l)}catch(e){}const g=Array.isArray(s)?[]:{};let _=0;const y=r.convertToPlainObject(s);for(const e in y){if(!Object.prototype.hasOwnProperty.call(y,e))continue;if(_>=u){g[e]="[MaxProperties ~]";break}const t=y[e];g[e]=a(e,t,h-1,u,l),_++}return d(s),g}return yE.normalize=i,yE.normalizeToSize=function e(t,n=3,r=102400){const o=i(t,n);return a=o,function(e){return~-encodeURI(e).split(/%..|./).length}(JSON.stringify(a))>r?e(t,n-1,r):o;var a},yE.normalizeUrlToBase=function(e,t){const n=t.replace(/\\/g,"/").replace(/[|\\{}()[\]^$+*?.]/g,"\\$&");let r=e;try{r=decodeURI(e)}catch(e){}return r.replace(/\\/g,"/").replace(/webpack:\/?/g,"").replace(new RegExp(`(file://)?/*${n}/*`,"ig"),"app:///")},yE}function SE(){if(mE)return _E;mE=1,Object.defineProperty(_E,"__esModule",{value:!0});const e=dE(),t=EE(),n=Mv(),r=Qy();function o(e,t){const n=e[1];for(const e of n){if(t(e,e[0].type))return!0}return!1}function i(e){return r.GLOBAL_OBJ.__SENTRY__&&r.GLOBAL_OBJ.__SENTRY__.encodePolyfill?r.GLOBAL_OBJ.__SENTRY__.encodePolyfill(e):(new TextEncoder).encode(e)}const a={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",statsd:"metric_bucket",raw_security:"security"};return _E.addItemToEnvelope=function(e,t){const[n,r]=e;return[n,[...r,t]]},_E.createAttachmentEnvelopeItem=function(e){const t="string"==typeof e.data?i(e.data):e.data;return[n.dropUndefinedKeys({type:"attachment",length:t.length,filename:e.filename,content_type:e.contentType,attachment_type:e.attachmentType}),t]},_E.createEnvelope=function(e,t=[]){return[e,t]},_E.createEventEnvelopeHeaders=function(t,r,o,i){const a=t.sdkProcessingMetadata&&t.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:t.event_id,sent_at:(new Date).toISOString(),...r&&{sdk:r},...!!o&&i&&{dsn:e.dsnToString(i)},...a&&{trace:n.dropUndefinedKeys({...a})}}},_E.createSpanEnvelopeItem=function(e){return[{type:"span"},e]},_E.envelopeContainsItemType=function(e,t){return o(e,((e,n)=>t.includes(n)))},_E.envelopeItemTypeToDataCategory=function(e){return a[e]},_E.forEachEnvelopeItem=o,_E.getSdkMetadataForEnvelopeHeader=function(e){if(!e||!e.sdk)return;const{name:t,version:n}=e.sdk;return{name:t,version:n}},_E.parseEnvelope=function(e){let t="string"==typeof e?i(e):e;function n(e){const n=t.subarray(0,e);return t=t.subarray(e+1),n}function o(){let e=t.indexOf(10);return e<0&&(e=t.length),JSON.parse((o=n(e),r.GLOBAL_OBJ.__SENTRY__&&r.GLOBAL_OBJ.__SENTRY__.decodePolyfill?r.GLOBAL_OBJ.__SENTRY__.decodePolyfill(o):(new TextDecoder).decode(o)));var o}const a=o(),s=[];for(;t.length;){const e=o(),t="number"==typeof e.length?e.length:void 0;s.push([e,t?n(t):o()])}return[a,s]},_E.serializeEnvelope=function(e){const[n,r]=e;let o=JSON.stringify(n);function a(e){"string"==typeof o?o="string"==typeof e?o+e:[i(o),e]:o.push("string"==typeof e?i(e):e)}for(const e of r){const[n,r]=e;if(a(`\n${JSON.stringify(n)}\n`),"string"==typeof r||r instanceof Uint8Array)a(r);else{let e;try{e=JSON.stringify(r)}catch(n){e=JSON.stringify(t.normalize(r))}a(e)}}return"string"==typeof o?o:function(e){const t=e.reduce(((e,t)=>e+t.length),0),n=new Uint8Array(t);let r=0;for(const t of e)n.set(t,r),r+=t.length;return n}(o)},_E}function TE(){if(gE)return lE;gE=1,Object.defineProperty(lE,"__esModule",{value:!0});const e=Xb(),t=dE(),n=SE(),r=Nb();return lE.createEventEnvelope=function(e,t,r,o){const i=n.getSdkMetadataForEnvelopeHeader(r),a=e.type&&"replay_event"!==e.type?e.type:"event";!function(e,t){t&&(e.sdk=e.sdk||{},e.sdk.name=e.sdk.name||t.name,e.sdk.version=e.sdk.version||t.version,e.sdk.integrations=[...e.sdk.integrations||[],...t.integrations||[]],e.sdk.packages=[...e.sdk.packages||[],...t.packages||[]])}(e,r&&r.sdk);const s=n.createEventEnvelopeHeaders(e,i,o,t);delete e.sdkProcessingMetadata;const c=[{type:a},e];return n.createEnvelope(s,[c])},lE.createSessionEnvelope=function(e,r,o,i){const a=n.getSdkMetadataForEnvelopeHeader(o),s={sent_at:(new Date).toISOString(),...a&&{sdk:a},...!!i&&r&&{dsn:t.dsnToString(r)}},c="aggregates"in e?[{type:"sessions"},e]:[{type:"session"},e.toJSON()];return n.createEnvelope(s,[c])},lE.createSpanEnvelope=function(o,i){const a=e.getDynamicSamplingContextFromSpan(o[0]),s=i&&i.getDsn(),c=i&&i.getOptions().tunnel,u={sent_at:(new Date).toISOString(),...function(e){return!!e.trace_id&&!!e.public_key}(a)&&{trace:a},...!!c&&s&&{dsn:t.dsnToString(s)}},l=i&&i.getOptions().beforeSendSpan,p=l?e=>{const t=l(r.spanToJSON(e));return t||r.showSpanDropWarning(),t}:e=>r.spanToJSON(e),d=[];for(const e of o){const t=p(e);t&&d.push(n.createSpanEnvelopeItem(t))}return n.createEnvelope(u,d)},lE}var OE,AE,wE,RE,NE={};function IE(){if(OE)return NE;OE=1,Object.defineProperty(NE,"__esModule",{value:!0});const e=Gy(),t=gb(),n=nv(),r=Nb();return NE.setMeasurement=function(o,i,a,s=r.getActiveSpan()){const c=s&&r.getRootSpan(s);c&&(e.DEBUG_BUILD&&n.logger.log(`[Measurement] Setting measurement on root span: ${o} = ${i} ${a}`),c.addEvent(o,{[t.SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE]:i,[t.SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT]:a}))},NE.timedEventsToMeasurements=function(e){if(!e||0===e.length)return;const n={};return e.forEach((e=>{const r=e.attributes||{},o=r[t.SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT],i=r[t.SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE];"string"==typeof o&&"number"==typeof i&&(n[e.name]={value:i,unit:o})})),n},NE}function PE(){if(AE)return uE;AE=1,Object.defineProperty(uE,"__esModule",{value:!0});const e=lb(),t=Gy(),n=TE(),r=fb(),o=gb(),i=nv(),a=Mv(),s=Kv(),c=kv(),u=Nb(),l=Xb(),p=tE(),d=IE(),f=Cb();class h{constructor(e={}){this._traceId=e.traceId||s.generateTraceId(),this._spanId=e.spanId||s.generateSpanId(),this._startTime=e.startTimestamp||c.timestampInSeconds(),this._attributes={},this.setAttributes({[o.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]:"manual",[o.SEMANTIC_ATTRIBUTE_SENTRY_OP]:e.op,...e.attributes}),this._name=e.name,e.parentSpanId&&(this._parentSpanId=e.parentSpanId),"sampled"in e&&(this._sampled=e.sampled),e.endTimestamp&&(this._endTime=e.endTimestamp),this._events=[],this._isStandaloneSpan=e.isStandalone,this._endTime&&this._onSpanEnded()}addLink(e){return this}addLinks(e){return this}recordException(e,t){}spanContext(){const{_spanId:e,_traceId:t,_sampled:n}=this;return{spanId:e,traceId:t,traceFlags:n?u.TRACE_FLAG_SAMPLED:u.TRACE_FLAG_NONE}}setAttribute(e,t){return void 0===t?delete this._attributes[e]:this._attributes[e]=t,this}setAttributes(e){return Object.keys(e).forEach((t=>this.setAttribute(t,e[t]))),this}updateStartTime(e){this._startTime=u.spanTimeInputToSeconds(e)}setStatus(e){return this._status=e,this}updateName(e){return this._name=e,this.setAttribute(o.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE,"custom"),this}end(e){this._endTime||(this._endTime=u.spanTimeInputToSeconds(e),p.logSpanEnd(this),this._onSpanEnded())}getSpanJSON(){return a.dropUndefinedKeys({data:this._attributes,description:this._name,op:this._attributes[o.SEMANTIC_ATTRIBUTE_SENTRY_OP],parent_span_id:this._parentSpanId,span_id:this._spanId,start_timestamp:this._startTime,status:u.getStatusMessage(this._status),timestamp:this._endTime,trace_id:this._traceId,origin:this._attributes[o.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN],_metrics_summary:r.getMetricSummaryJsonForSpan(this),profile_id:this._attributes[o.SEMANTIC_ATTRIBUTE_PROFILE_ID],exclusive_time:this._attributes[o.SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME],measurements:d.timedEventsToMeasurements(this._events),is_segment:this._isStandaloneSpan&&u.getRootSpan(this)===this||void 0,segment_id:this._isStandaloneSpan?u.getRootSpan(this).spanContext().spanId:void 0})}isRecording(){return!this._endTime&&!!this._sampled}addEvent(e,n,r){t.DEBUG_BUILD&&i.logger.log("[Tracing] Adding an event to span:",e);const o=m(n)?n:r||c.timestampInSeconds(),a=m(n)?{}:n||{},s={name:e,time:u.spanTimeInputToSeconds(o),attributes:a};return this._events.push(s),this}isStandaloneSpan(){return!!this._isStandaloneSpan}_onSpanEnded(){const r=e.getClient();r&&r.emit("spanEnd",this);if(!(this._isStandaloneSpan||this===u.getRootSpan(this)))return;if(this._isStandaloneSpan)return void(this._sampled?function(t){const n=e.getClient();if(!n)return;const r=t[1];if(!r||0===r.length)return void n.recordDroppedEvent("before_send","span");n.sendEnvelope(t)}(n.createSpanEnvelope([this],r)):(t.DEBUG_BUILD&&i.logger.log("[Tracing] Discarding standalone span because its trace was not chosen to be sampled."),r&&r.recordDroppedEvent("sample_rate","span")));const o=this._convertSpanToTransaction();if(o){(f.getCapturedScopesOnSpan(this).scope||e.getCurrentScope()).captureEvent(o)}}_convertSpanToTransaction(){if(!g(u.spanToJSON(this)))return;this._name||(t.DEBUG_BUILD&&i.logger.warn("Transaction has no name, falling back to `<unlabeled transaction>`."),this._name="<unlabeled transaction>");const{scope:n,isolationScope:s}=f.getCapturedScopesOnSpan(this),c=(n||e.getCurrentScope()).getClient()||e.getClient();if(!0!==this._sampled)return t.DEBUG_BUILD&&i.logger.log("[Tracing] Discarding transaction because its trace was not chosen to be sampled."),void(c&&c.recordDroppedEvent("sample_rate","transaction"));const p=u.getSpanDescendants(this).filter((e=>e!==this&&!function(e){return e instanceof h&&e.isStandaloneSpan()}(e))).map((e=>u.spanToJSON(e))).filter(g),m=this._attributes[o.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE];delete this._attributes[o.SEMANTIC_ATTRIBUTE_SENTRY_CUSTOM_SPAN_NAME],p.forEach((e=>{e.data&&delete e.data[o.SEMANTIC_ATTRIBUTE_SENTRY_CUSTOM_SPAN_NAME]}));const _={contexts:{trace:u.spanToTransactionTraceContext(this)},spans:p.length>1e3?p.sort(((e,t)=>e.start_timestamp-t.start_timestamp)).slice(0,1e3):p,start_timestamp:this._startTime,timestamp:this._endTime,transaction:this._name,type:"transaction",sdkProcessingMetadata:{capturedSpanScope:n,capturedSpanIsolationScope:s,...a.dropUndefinedKeys({dynamicSamplingContext:l.getDynamicSamplingContextFromSpan(this)})},_metrics_summary:r.getMetricSummaryJsonForSpan(this),...m&&{transaction_info:{source:m}}},y=d.timedEventsToMeasurements(this._events);return y&&Object.keys(y).length&&(t.DEBUG_BUILD&&i.logger.log("[Measurements] Adding measurements to transaction event",JSON.stringify(y,void 0,2)),_.measurements=y),_}}function m(e){return e&&"number"==typeof e||e instanceof Date||Array.isArray(e)}function g(e){return!!(e.start_timestamp&&e.timestamp&&e.span_id&&e.trace_id)}return uE.SentrySpan=h,uE}function xE(){if(wE)return Yb;wE=1,Object.defineProperty(Yb,"__esModule",{value:!0});const e=_v(),t=lb(),n=sb(),r=Gy(),o=gb(),i=nv(),a=Kv(),s=Rb(),c=zb(),u=Bb(),l=rb(),p=Nb(),d=Xb(),f=tE(),h=sE(),m=Gb(),g=PE(),_=vb(),y=Cb(),v="__SENTRY_SUPPRESS_TRACING__";function b(e,n){const r=T();return r.withActiveSpan?r.withActiveSpan(e,n):t.withScope((t=>(l._setSpanForScope(t,e||void 0),n(t))))}function E({parentSpan:e,spanArguments:n,forceTransaction:r,scope:o}){if(!u.hasTracingEnabled())return new m.SentryNonRecordingSpan;const i=t.getIsolationScope();let a;if(e&&!r)a=function(e,n,r){const{spanId:o,traceId:i}=e.spanContext(),a=!n.getScopeData().sdkProcessingMetadata[v]&&p.spanIsSampled(e),s=a?new g.SentrySpan({...r,parentSpanId:o,traceId:i,sampled:a}):new m.SentryNonRecordingSpan({traceId:i});p.addChildSpanToSpan(e,s);const c=t.getClient();c&&(c.emit("spanStart",s),r.endTimestamp&&c.emit("spanEnd",s));return s}(e,o,n),p.addChildSpanToSpan(e,a);else if(e){const t=d.getDynamicSamplingContextFromSpan(e),{traceId:r,spanId:i}=e.spanContext(),s=p.spanIsSampled(e);a=O({traceId:r,parentSpanId:i,...n},o,s),d.freezeDscOnSpan(a,t)}else{const{traceId:e,dsc:t,parentSpanId:r,sampled:s}={...i.getPropagationContext(),...o.getPropagationContext()};a=O({traceId:e,parentSpanId:r,...n},o,s),t&&d.freezeDscOnSpan(a,t)}return f.logSpanStart(a),y.setCapturedScopesOnSpan(a,o,i),a}function S(e){const t={isStandalone:(e.experimental||{}).standalone,...e};if(e.startTime){const n={...t};return n.startTimestamp=p.spanTimeInputToSeconds(e.startTime),delete n.startTime,n}return t}function T(){const t=e.getMainCarrier();return n.getAsyncContextStrategy(t)}function O(e,n,r){const i=t.getClient(),a=i&&i.getOptions()||{},{name:s="",attributes:c}=e,[u,l]=n.getScopeData().sdkProcessingMetadata[v]?[!1]:h.sampleSpan(a,{name:s,parentSampled:r,attributes:c,transactionContext:{name:s,parentSampled:r}}),p=new g.SentrySpan({...e,attributes:{[o.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]:"custom",...e.attributes},sampled:u});return void 0!==l&&p.setAttribute(o.SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE,l),i&&i.emit("spanStart",p),p}function A(e){const n=l._getSpanForScope(e);if(!n)return;const r=t.getClient();return(r?r.getOptions():{}).parentSpanIsAlwaysRootSpan?p.getRootSpan(n):n}function w(e){return void 0!==e?t=>b(e,t):e=>e()}return Yb.continueTrace=(r,o)=>{const i=e.getMainCarrier(),a=n.getAsyncContextStrategy(i);if(a.continueTrace)return a.continueTrace(r,o);const{sentryTrace:c,baggage:u}=r;return t.withScope((e=>{const t=s.propagationContextFromHeaders(c,u);return e.setPropagationContext(t),o()}))},Yb.startInactiveSpan=function(e){const n=T();if(n.startInactiveSpan)return n.startInactiveSpan(e);const r=S(e),{forceTransaction:o,parentSpan:i}=e;return(e.scope?n=>t.withScope(e.scope,n):void 0!==i?e=>b(i,e):e=>e())((()=>{const n=t.getCurrentScope(),i=A(n);return e.onlyIfParent&&!i?new m.SentryNonRecordingSpan:E({parentSpan:i,spanArguments:r,forceTransaction:o,scope:n})}))},Yb.startNewTrace=function(e){return t.withScope((t=>(t.setPropagationContext({traceId:a.generateTraceId()}),r.DEBUG_BUILD&&i.logger.info(`Starting a new trace with id ${t.getPropagationContext().traceId}`),b(null,e))))},Yb.startSpan=function(e,n){const r=T();if(r.startSpan)return r.startSpan(e,n);const o=S(e),{forceTransaction:i,parentSpan:a}=e;return t.withScope(e.scope,(()=>w(a)((()=>{const r=t.getCurrentScope(),a=A(r),s=e.onlyIfParent&&!a?new m.SentryNonRecordingSpan:E({parentSpan:a,spanArguments:o,forceTransaction:i,scope:r});return l._setSpanForScope(r,s),c.handleCallbackErrors((()=>n(s)),(()=>{const{status:e}=p.spanToJSON(s);!s.isRecording()||e&&"ok"!==e||s.setStatus({code:_.SPAN_STATUS_ERROR,message:"internal_error"})}),(()=>s.end()))}))))},Yb.startSpanManual=function(e,n){const r=T();if(r.startSpanManual)return r.startSpanManual(e,n);const o=S(e),{forceTransaction:i,parentSpan:a}=e;return t.withScope(e.scope,(()=>w(a)((()=>{const r=t.getCurrentScope(),a=A(r),s=e.onlyIfParent&&!a?new m.SentryNonRecordingSpan:E({parentSpan:a,spanArguments:o,forceTransaction:i,scope:r});function u(){s.end()}return l._setSpanForScope(r,s),c.handleCallbackErrors((()=>n(s,u)),(()=>{const{status:e}=p.spanToJSON(s);!s.isRecording()||e&&"ok"!==e||s.setStatus({code:_.SPAN_STATUS_ERROR,message:"internal_error"})}))}))))},Yb.suppressTracing=function(e){const n=T();return n.suppressTracing?n.suppressTracing(e):t.withScope((t=>(t.setSDKProcessingMetadata({[v]:!0}),e())))},Yb.withActiveSpan=b,Yb}function CE(){if(RE)return Db;RE=1,Object.defineProperty(Db,"__esModule",{value:!0});const e=lb(),t=Gy(),n=gb(),r=nv(),o=kv(),i=Bb(),a=rb(),s=Nb(),c=Gb(),u=vb(),l=xE(),p={idleTimeout:1e3,finalTimeout:3e4,childSpanTimeout:15e3};return Db.TRACING_DEFAULTS=p,Db.startIdleSpan=function(d,f={}){const h=new Map;let m,g=!1,_="externalFinish",y=!f.disableAutoFinish;const v=[],{idleTimeout:b=p.idleTimeout,finalTimeout:E=p.finalTimeout,childSpanTimeout:S=p.childSpanTimeout,beforeSpanEnd:T}=f,O=e.getClient();if(!O||!i.hasTracingEnabled())return new c.SentryNonRecordingSpan;const A=e.getCurrentScope(),w=s.getActiveSpan(),R=function(n){const o=l.startInactiveSpan(n);return a._setSpanForScope(e.getCurrentScope(),o),t.DEBUG_BUILD&&r.logger.log("[Tracing] Started span is an idle span"),o}(d);function N(){m&&(clearTimeout(m),m=void 0)}function I(e){N(),m=setTimeout((()=>{!g&&0===h.size&&y&&(_="idleTimeout",R.end(e))}),b)}function P(e){m=setTimeout((()=>{!g&&y&&(_="heartbeatFailed",R.end(e))}),S)}function x(e){g=!0,h.clear(),v.forEach((e=>e())),a._setSpanForScope(A,w);const o=s.spanToJSON(R),{start_timestamp:i}=o;if(!i)return;(o.data||{})[n.SEMANTIC_ATTRIBUTE_SENTRY_IDLE_SPAN_FINISH_REASON]||R.setAttribute(n.SEMANTIC_ATTRIBUTE_SENTRY_IDLE_SPAN_FINISH_REASON,_),r.logger.log(`[Tracing] Idle span "${o.op}" finished`);const c=s.getSpanDescendants(R).filter((e=>e!==R));let l=0;c.forEach((n=>{n.isRecording()&&(n.setStatus({code:u.SPAN_STATUS_ERROR,message:"cancelled"}),n.end(e),t.DEBUG_BUILD&&r.logger.log("[Tracing] Cancelling span since span ended early",JSON.stringify(n,void 0,2)));const o=s.spanToJSON(n),{timestamp:i=0,start_timestamp:a=0}=o,c=a<=e,p=i-a<=(E+b)/1e3;if(t.DEBUG_BUILD){const e=JSON.stringify(n,void 0,2);c?p||r.logger.log("[Tracing] Discarding span since it finished after idle span final timeout",e):r.logger.log("[Tracing] Discarding span since it happened after idle span was finished",e)}p&&c||(s.removeChildSpanFromSpan(R,n),l++)})),l>0&&R.setAttribute("sentry.idle_span_discarded_spans",l)}return R.end=new Proxy(R.end,{apply(e,t,n){T&&T(R);const[r,...i]=n,a=r||o.timestampInSeconds(),c=s.spanTimeInputToSeconds(a),u=s.getSpanDescendants(R).filter((e=>e!==R));if(!u.length)return x(c),Reflect.apply(e,t,[c,...i]);const l=u.map((e=>s.spanToJSON(e).timestamp)).filter((e=>!!e)),p=l.length?Math.max(...l):void 0,d=s.spanToJSON(R).start_timestamp,f=Math.min(d?d+E/1e3:1/0,Math.max(d||-1/0,Math.min(c,p||1/0)));return x(f),Reflect.apply(e,t,[f,...i])}}),v.push(O.on("spanStart",(e=>{if(g||e===R||s.spanToJSON(e).timestamp)return;var t;s.getSpanDescendants(R).includes(e)&&(t=e.spanContext().spanId,N(),h.set(t,!0),P(o.timestampInSeconds()+S/1e3))}))),v.push(O.on("spanEnd",(e=>{var t;g||(t=e.spanContext().spanId,h.has(t)&&h.delete(t),0===h.size&&I(o.timestampInSeconds()+b/1e3))}))),v.push(O.on("idleSpanEnableAutoFinish",(e=>{e===R&&(y=!0,I(),h.size&&P())}))),f.disableAutoFinish||I(),setTimeout((()=>{g||(R.setStatus({code:u.SPAN_STATUS_ERROR,message:"deadline_exceeded"}),_="finalTimeout",R.end())}),E),R},Db}var ME,LE={},UE={},kE={};function DE(){if(ME)return kE;ME=1,Object.defineProperty(kE,"__esModule",{value:!0});const e=Gy(),t=Rv(),n=nv(),r=Hv();return kE.notifyEventProcessors=function o(i,a,s,c=0){return new r.SyncPromise(((r,u)=>{const l=i[c];if(null===a||"function"!=typeof l)r(a);else{const p=l({...a},s);e.DEBUG_BUILD&&l.id&&null===p&&n.logger.log(`Event processor "${l.id}" dropped event`),t.isThenable(p)?p.then((e=>o(i,e,s,c+1).then(r))).then(null,u):o(i,p,s,c+1).then(r).then(null,u)}}))},kE}var jE,BE={};function VE(){if(jE)return BE;jE=1,Object.defineProperty(BE,"__esModule",{value:!0});const e=Qy();let t,n,r;function o(o){const i=e.GLOBAL_OBJ._sentryDebugIds;if(!i)return{};const a=Object.keys(i);return r&&a.length===n||(n=a.length,r=a.reduce(((e,n)=>{t||(t={});const r=t[n];if(r)e[r[0]]=r[1];else{const r=o(n);for(let o=r.length-1;o>=0;o--){const a=r[o],s=a&&a.filename,c=i[n];if(s&&c){e[s]=c,t[n]=[s,c];break}}}return e}),{})),r}return BE.getDebugImagesForResources=function(e,t){const n=o(e);if(!n)return[];const r=[];for(const e of t)e&&n[e]&&r.push({type:"sourcemap",code_file:e,debug_id:n[e]});return r},BE.getFilenameToDebugIdMap=o,BE}var FE,GE,HE,YE={};function qE(){if(FE)return YE;FE=1,Object.defineProperty(YE,"__esModule",{value:!0});const e=Xb(),t=Mv(),n=Jv(),r=Nb();function o(e,t,r){e[t]=n.merge(e[t],r,1)}return YE.applyScopeDataToEvent=function(n,o){const{fingerprint:i,span:a,breadcrumbs:s,sdkProcessingMetadata:c}=o;!function(e,n){const{extra:r,tags:o,user:i,contexts:a,level:s,transactionName:c}=n,u=t.dropUndefinedKeys(r);u&&Object.keys(u).length&&(e.extra={...u,...e.extra});const l=t.dropUndefinedKeys(o);l&&Object.keys(l).length&&(e.tags={...l,...e.tags});const p=t.dropUndefinedKeys(i);p&&Object.keys(p).length&&(e.user={...p,...e.user});const d=t.dropUndefinedKeys(a);d&&Object.keys(d).length&&(e.contexts={...d,...e.contexts});s&&(e.level=s);c&&"transaction"!==e.type&&(e.transaction=c)}(n,o),a&&function(t,n){t.contexts={trace:r.spanToTraceContext(n),...t.contexts},t.sdkProcessingMetadata={dynamicSamplingContext:e.getDynamicSamplingContextFromSpan(n),...t.sdkProcessingMetadata};const o=r.getRootSpan(n),i=r.spanToJSON(o).description;i&&!t.transaction&&"transaction"===t.type&&(t.transaction=i)}(n,a),function(e,t){e.fingerprint=e.fingerprint?Array.isArray(e.fingerprint)?e.fingerprint:[e.fingerprint]:[],t&&(e.fingerprint=e.fingerprint.concat(t));e.fingerprint&&!e.fingerprint.length&&delete e.fingerprint}(n,i),function(e,t){const n=[...e.breadcrumbs||[],...t];e.breadcrumbs=n.length?n:void 0}(n,s),function(e,t){e.sdkProcessingMetadata={...e.sdkProcessingMetadata,...t}}(n,c)},YE.mergeAndOverwriteScopeData=o,YE.mergeScopeData=function(e,t){const{extra:r,tags:i,user:a,contexts:s,level:c,sdkProcessingMetadata:u,breadcrumbs:l,fingerprint:p,eventProcessors:d,attachments:f,propagationContext:h,transactionName:m,span:g}=t;o(e,"extra",r),o(e,"tags",i),o(e,"user",a),o(e,"contexts",s),e.sdkProcessingMetadata=n.merge(e.sdkProcessingMetadata,u,2),c&&(e.level=c),m&&(e.transactionName=m),g&&(e.span=g),l.length&&(e.breadcrumbs=[...e.breadcrumbs,...l]),p.length&&(e.fingerprint=[...e.fingerprint,...p]),d.length&&(e.eventProcessors=[...e.eventProcessors,...d]),f.length&&(e.attachments=[...e.attachments,...f]),e.propagationContext={...e.propagationContext,...h}},YE}function zE(){if(GE)return UE;GE=1,Object.defineProperty(UE,"__esModule",{value:!0});const e=$b(),t=lb(),n=DE(),r=ob(),o=VE(),i=Bv(),a=EE(),s=Cv(),c=kv(),u=qE();function l(t,n){const{environment:r,release:o,dist:i,maxValueLength:a=250}=n;t.environment=t.environment||r||e.DEFAULT_ENVIRONMENT,!t.release&&o&&(t.release=o),!t.dist&&i&&(t.dist=i),t.message&&(t.message=s.truncate(t.message,a));const c=t.exception&&t.exception.values&&t.exception.values[0];c&&c.value&&(c.value=s.truncate(c.value,a));const u=t.request;u&&u.url&&(u.url=s.truncate(u.url,a))}function p(e,t){const n=o.getFilenameToDebugIdMap(t);try{e.exception.values.forEach((e=>{e.stacktrace.frames.forEach((e=>{n&&e.filename&&(e.debug_id=n[e.filename])}))}))}catch(e){}}function d(e){const t={};try{e.exception.values.forEach((e=>{e.stacktrace.frames.forEach((e=>{e.debug_id&&(e.abs_path?t[e.abs_path]=e.debug_id:e.filename&&(t[e.filename]=e.debug_id),delete e.debug_id)}))}))}catch(e){}if(0===Object.keys(t).length)return;e.debug_meta=e.debug_meta||{},e.debug_meta.images=e.debug_meta.images||[];const n=e.debug_meta.images;Object.entries(t).forEach((([e,t])=>{n.push({type:"sourcemap",code_file:e,debug_id:t})}))}function f(e,t){if(!t)return e;const n=e?e.clone():new r.Scope;return n.update(t),n}const h=["user","level","extra","contexts","tags","fingerprint","requestSession","propagationContext"];return UE.applyClientOptions=l,UE.applyDebugIds=p,UE.applyDebugMeta=d,UE.parseEventHintOrCaptureContext=function(e){if(e)return function(e){return e instanceof r.Scope||"function"==typeof e}(e)||function(e){return Object.keys(e).some((e=>h.includes(e)))}(e)?{captureContext:e}:e},UE.prepareEvent=function(e,r,o,s,h,m){const{normalizeDepth:g=3,normalizeMaxBreadth:_=1e3}=e,y={...r,event_id:r.event_id||o.event_id||i.uuid4(),timestamp:r.timestamp||c.dateTimestampInSeconds()},v=o.integrations||e.integrations.map((e=>e.name));l(y,e),function(e,t){t.length>0&&(e.sdk=e.sdk||{},e.sdk.integrations=[...e.sdk.integrations||[],...t])}(y,v),h&&h.emit("applyFrameMetadata",r),void 0===r.type&&p(y,e.stackParser);const b=f(s,o.captureContext);o.mechanism&&i.addExceptionMechanism(y,o.mechanism);const E=h?h.getEventProcessors():[],S=t.getGlobalScope().getScopeData();if(m){const e=m.getScopeData();u.mergeScopeData(S,e)}if(b){const e=b.getScopeData();u.mergeScopeData(S,e)}const T=[...o.attachments||[],...S.attachments];T.length&&(o.attachments=T),u.applyScopeDataToEvent(y,S);const O=[...E,...S.eventProcessors];return n.notifyEventProcessors(O,y,o).then((e=>(e&&d(e),"number"==typeof g&&g>0?function(e,t,n){if(!e)return null;const r={...e,...e.breadcrumbs&&{breadcrumbs:e.breadcrumbs.map((e=>({...e,...e.data&&{data:a.normalize(e.data,t,n)}})))},...e.user&&{user:a.normalize(e.user,t,n)},...e.contexts&&{contexts:a.normalize(e.contexts,t,n)},...e.extra&&{extra:a.normalize(e.extra,t,n)}};e.contexts&&e.contexts.trace&&r.contexts&&(r.contexts.trace=e.contexts.trace,e.contexts.trace.data&&(r.contexts.trace.data=a.normalize(e.contexts.trace.data,t,n)));e.spans&&(r.spans=e.spans.map((e=>({...e,...e.data&&{data:a.normalize(e.data,t,n)}}))));e.contexts&&e.contexts.flags&&r.contexts&&(r.contexts.flags=a.normalize(e.contexts.flags,3,n));return r}(e,g,_):e)))},UE}function KE(){if(HE)return LE;HE=1,Object.defineProperty(LE,"__esModule",{value:!0});const e=$b(),t=lb(),n=Gy(),r=Yv(),o=Rv(),i=nv(),a=Bv(),s=kv(),c=Qy(),u=zE();function l(e,r){const o=t.getCurrentScope(),s=t.getClient();if(s){if(s.captureCheckIn)return s.captureCheckIn(e,r,o);n.DEBUG_BUILD&&i.logger.warn("Cannot capture check-in. Client does not support sending check-ins.")}else n.DEBUG_BUILD&&i.logger.warn("Cannot capture check-in. No client defined.");return a.uuid4()}function p(){const e=t.getIsolationScope(),n=t.getCurrentScope(),o=n.getSession()||e.getSession();o&&r.closeSession(o),d(),e.setSession(),n.setSession()}function d(){const e=t.getIsolationScope(),n=t.getCurrentScope(),r=t.getClient(),o=n.getSession()||e.getSession();o&&r&&r.captureSession(o)}return LE.addEventProcessor=function(e){t.getIsolationScope().addEventProcessor(e)},LE.captureCheckIn=l,LE.captureEvent=function(e,n){return t.getCurrentScope().captureEvent(e,n)},LE.captureException=function(e,n){return t.getCurrentScope().captureException(e,u.parseEventHintOrCaptureContext(n))},LE.captureMessage=function(e,n){const r="string"==typeof n?n:void 0,o="string"!=typeof n?{captureContext:n}:void 0;return t.getCurrentScope().captureMessage(e,r,o)},LE.captureSession=function(e=!1){e?p():d()},LE.close=async function(e){const r=t.getClient();return r?r.close(e):(n.DEBUG_BUILD&&i.logger.warn("Cannot flush events and disable SDK. No client defined."),Promise.resolve(!1))},LE.endSession=p,LE.flush=async function(e){const r=t.getClient();return r?r.flush(e):(n.DEBUG_BUILD&&i.logger.warn("Cannot flush events. No client defined."),Promise.resolve(!1))},LE.isEnabled=function(){const e=t.getClient();return!!e&&!1!==e.getOptions().enabled&&!!e.getTransport()},LE.isInitialized=function(){return!!t.getClient()},LE.lastEventId=function(){return t.getIsolationScope().lastEventId()},LE.setContext=function(e,n){t.getIsolationScope().setContext(e,n)},LE.setExtra=function(e,n){t.getIsolationScope().setExtra(e,n)},LE.setExtras=function(e){t.getIsolationScope().setExtras(e)},LE.setTag=function(e,n){t.getIsolationScope().setTag(e,n)},LE.setTags=function(e){t.getIsolationScope().setTags(e)},LE.setUser=function(e){t.getIsolationScope().setUser(e)},LE.startSession=function(n){const o=t.getClient(),i=t.getIsolationScope(),a=t.getCurrentScope(),{release:s,environment:u=e.DEFAULT_ENVIRONMENT}=o&&o.getOptions()||{},{userAgent:l}=c.GLOBAL_OBJ.navigator||{},d=r.makeSession({release:s,environment:u,user:a.getUser()||i.getUser(),...l&&{userAgent:l},...n}),f=i.getSession();return f&&"ok"===f.status&&r.updateSession(f,{status:"exited"}),p(),i.setSession(d),a.setSession(d),d},LE.withMonitor=function(e,n,r){const i=l({monitorSlug:e,status:"in_progress"},r),a=s.timestampInSeconds();function c(t){l({monitorSlug:e,status:t,checkInId:i,duration:s.timestampInSeconds()-a})}return t.withIsolationScope((()=>{let e;try{e=n()}catch(e){throw c("error"),e}return o.isThenable(e)?Promise.resolve(e).then((()=>{c("ok")}),(e=>{throw c("error"),e})):c("ok"),e}))},LE}var WE,QE={};function JE(){if(WE)return QE;WE=1,Object.defineProperty(QE,"__esModule",{value:!0});const e=lb(),t=Mv();return QE.SessionFlusher=class{constructor(e,t){this._client=e,this.flushTimeout=60,this._pendingAggregates=new Map,this._isEnabled=!0,this._intervalId=setInterval((()=>this.flush()),1e3*this.flushTimeout),this._intervalId.unref&&this._intervalId.unref(),this._sessionAttrs=t}flush(){const e=this.getSessionAggregates();0!==e.aggregates.length&&(this._pendingAggregates=new Map,this._client.sendSession(e))}getSessionAggregates(){const e=Array.from(this._pendingAggregates.values()),n={attrs:this._sessionAttrs,aggregates:e};return t.dropUndefinedKeys(n)}close(){clearInterval(this._intervalId),this._isEnabled=!1,this.flush()}incrementSessionStatusCount(){if(!this._isEnabled)return;const t=e.getIsolationScope(),n=t.getRequestSession();n&&n.status&&(this._incrementSessionStatusCount(n.status,new Date),t.setRequestSession(void 0))}_incrementSessionStatusCount(e,t){const n=new Date(t).setSeconds(0,0);let r=this._pendingAggregates.get(n);switch(r||(r={started:new Date(n).toISOString()},this._pendingAggregates.set(n,r)),e){case"errored":return r.errored=(r.errored||0)+1,r.errored;case"ok":return r.exited=(r.exited||0)+1,r.exited;default:return r.crashed=(r.crashed||0)+1,r.crashed}}},QE}var $E,XE={};function ZE(){if($E)return XE;$E=1,Object.defineProperty(XE,"__esModule",{value:!0});const e=dE();function t(e){const t=e.protocol?`${e.protocol}:`:"",n=e.port?`:${e.port}`:"";return`${t}//${e.host}${n}${e.path?`/${e.path}`:""}/api/`}return XE.getEnvelopeEndpointWithUrlEncodedAuth=function(e,n,r){return n||`${function(e){return`${t(e)}${e.projectId}/envelope/`}(e)}?${function(e,t){const n={sentry_version:"7"};return e.publicKey&&(n.sentry_key=e.publicKey),t&&(n.sentry_client=`${t.name}/${t.version}`),new URLSearchParams(n).toString()}(e,r)}`},XE.getReportDialogEndpoint=function(n,r){const o=e.makeDsn(n);if(!o)return"";const i=`${t(o)}embed/error-page/`;let a=`dsn=${e.dsnToString(o)}`;for(const e in r)if("dsn"!==e&&"onClose"!==e)if("user"===e){const e=r.user;if(!e)continue;e.name&&(a+=`&name=${encodeURIComponent(e.name)}`),e.email&&(a+=`&email=${encodeURIComponent(e.email)}`)}else a+=`&${encodeURIComponent(e)}=${encodeURIComponent(r[e])}`;return`${i}?${a}`},XE}var eS,tS={},nS={};function rS(){if(eS)return nS;eS=1,Object.defineProperty(nS,"__esModule",{value:!0});const e=lb(),t=Gy(),n=nv(),r=[];function o(e,o,i){if(i[o.name])t.DEBUG_BUILD&&n.logger.log(`Integration skipped because it was already installed: ${o.name}`);else{if(i[o.name]=o,-1===r.indexOf(o.name)&&"function"==typeof o.setupOnce&&(o.setupOnce(),r.push(o.name)),o.setup&&"function"==typeof o.setup&&o.setup(e),"function"==typeof o.preprocessEvent){const t=o.preprocessEvent.bind(o);e.on("preprocessEvent",((n,r)=>t(n,r,e)))}if("function"==typeof o.processEvent){const t=o.processEvent.bind(o),n=Object.assign(((n,r)=>t(n,r,e)),{id:o.name});e.addEventProcessor(n)}t.DEBUG_BUILD&&n.logger.log(`Integration installed: ${o.name}`)}}return nS.addIntegration=function(r){const o=e.getClient();o?o.addIntegration(r):t.DEBUG_BUILD&&n.logger.warn(`Cannot add integration "${r.name}" because no SDK Client is available.`)},nS.afterSetupIntegrations=function(e,t){for(const n of t)n&&n.afterAllSetup&&n.afterAllSetup(e)},nS.defineIntegration=function(e){return e},nS.getIntegrationsToSetup=function(e){const t=e.defaultIntegrations||[],n=e.integrations;let r;if(t.forEach((e=>{e.isDefaultInstance=!0})),Array.isArray(n))r=[...t,...n];else if("function"==typeof n){const e=n(t);r=Array.isArray(e)?e:[e]}else r=t;const o=function(e){const t={};return e.forEach((e=>{const{name:n}=e,r=t[n];r&&!r.isDefaultInstance&&e.isDefaultInstance||(t[n]=e)})),Object.values(t)}(r),i=o.findIndex((e=>"Debug"===e.name));if(i>-1){const[e]=o.splice(i,1);o.push(e)}return o},nS.installedIntegrations=r,nS.setupIntegration=o,nS.setupIntegrations=function(e,t){const n={};return t.forEach((t=>{t&&o(e,t,n)})),n},nS}var oS,iS={};function requireClientreport(){if(oS)return iS;oS=1,Object.defineProperty(iS,"__esModule",{value:!0});const e=SE(),t=kv();return iS.createClientReportEnvelope=function(n,r,o){const i=[{type:"client_report"},{timestamp:o||t.dateTimestampInSeconds(),discarded_events:n}];return e.createEnvelope(r?{dsn:r}:{},[i])},iS}var aS,sS,cS={};function uS(){if(aS)return cS;aS=1,Object.defineProperty(cS,"__esModule",{value:!0});class e extends Error{constructor(e,t="warn"){super(e),this.message=e,this.logLevel=t}}return cS.SentryError=e,cS}function lS(){if(sS)return tS;sS=1,Object.defineProperty(tS,"__esModule",{value:!0});const e=ZE(),t=lb(),n=Gy(),r=TE(),o=rS(),i=Yv(),a=Xb(),s=requireClientreport(),c=dE(),u=SE(),l=uS(),p=Rv(),d=nv(),f=Bv(),h=Hv(),m=aE(),g=zE(),_=Nb(),y="Not capturing exception because it's already been captured.";function v(e){return void 0===e.type}function b(e){return"transaction"===e.type}return tS.BaseClient=class{constructor(t){if(this._options=t,this._integrations={},this._numProcessing=0,this._outcomes={},this._hooks={},this._eventProcessors=[],t.dsn?this._dsn=c.makeDsn(t.dsn):n.DEBUG_BUILD&&d.logger.warn("No DSN provided, client will not send events."),this._dsn){const n=e.getEnvelopeEndpointWithUrlEncodedAuth(this._dsn,t.tunnel,t._metadata?t._metadata.sdk:void 0);this._transport=t.transport({tunnel:this._options.tunnel,recordDroppedEvent:this.recordDroppedEvent.bind(this),...t.transportOptions,url:n})}const r=["enableTracing","tracesSampleRate","tracesSampler"].find((e=>e in t&&null==t[e]));r&&d.consoleSandbox((()=>{console.warn(`[Sentry] Deprecation warning: \`${r}\` is set to undefined, which leads to tracing being enabled. In v9, a value of \`undefined\` will result in tracing being disabled.`)}))}captureException(e,t,r){const o=f.uuid4();if(f.checkOrSetAlreadyCaught(e))return n.DEBUG_BUILD&&d.logger.log(y),o;const i={event_id:o,...t};return this._process(this.eventFromException(e,i).then((e=>this._captureEvent(e,i,r)))),i.event_id}captureMessage(e,t,n,r){const o={event_id:f.uuid4(),...n},i=p.isParameterizedString(e)?e:String(e),a=p.isPrimitive(e)?this.eventFromMessage(i,t,o):this.eventFromException(e,o);return this._process(a.then((e=>this._captureEvent(e,o,r)))),o.event_id}captureEvent(e,t,r){const o=f.uuid4();if(t&&t.originalException&&f.checkOrSetAlreadyCaught(t.originalException))return n.DEBUG_BUILD&&d.logger.log(y),o;const i={event_id:o,...t},a=(e.sdkProcessingMetadata||{}).capturedSpanScope;return this._process(this._captureEvent(e,i,a||r)),i.event_id}captureSession(e){"string"!=typeof e.release?n.DEBUG_BUILD&&d.logger.warn("Discarded session because of missing or non-string release"):(this.sendSession(e),i.updateSession(e,{init:!1}))}getDsn(){return this._dsn}getOptions(){return this._options}getSdkMetadata(){return this._options._metadata}getTransport(){return this._transport}flush(e){const t=this._transport;return t?(this.emit("flush"),this._isClientDoneProcessing(e).then((n=>t.flush(e).then((e=>n&&e))))):h.resolvedSyncPromise(!0)}close(e){return this.flush(e).then((e=>(this.getOptions().enabled=!1,this.emit("close"),e)))}getEventProcessors(){return this._eventProcessors}addEventProcessor(e){this._eventProcessors.push(e)}init(){(this._isEnabled()||this._options.integrations.some((({name:e})=>e.startsWith("Spotlight"))))&&this._setupIntegrations()}getIntegrationByName(e){return this._integrations[e]}addIntegration(e){const t=this._integrations[e.name];o.setupIntegration(this,e,this._integrations),t||o.afterSetupIntegrations(this,[e])}sendEvent(e,t={}){this.emit("beforeSendEvent",e,t);let n=r.createEventEnvelope(e,this._dsn,this._options._metadata,this._options.tunnel);for(const e of t.attachments||[])n=u.addItemToEnvelope(n,u.createAttachmentEnvelopeItem(e));const o=this.sendEnvelope(n);o&&o.then((t=>this.emit("afterSendEvent",e,t)),null)}sendSession(e){const t=r.createSessionEnvelope(e,this._dsn,this._options._metadata,this._options.tunnel);this.sendEnvelope(t)}recordDroppedEvent(e,t,r){if(this._options.sendClientReports){const o="number"==typeof r?r:1,i=`${e}:${t}`;n.DEBUG_BUILD&&d.logger.log(`Recording outcome: "${i}"${o>1?` (${o} times)`:""}`),this._outcomes[i]=(this._outcomes[i]||0)+o}}on(e,t){const n=this._hooks[e]=this._hooks[e]||[];return n.push(t),()=>{const e=n.indexOf(t);e>-1&&n.splice(e,1)}}emit(e,...t){const n=this._hooks[e];n&&n.forEach((e=>e(...t)))}sendEnvelope(e){return this.emit("beforeEnvelope",e),this._isEnabled()&&this._transport?this._transport.send(e).then(null,(e=>(n.DEBUG_BUILD&&d.logger.error("Error while sending envelope:",e),e))):(n.DEBUG_BUILD&&d.logger.error("Transport disabled"),h.resolvedSyncPromise({}))}_setupIntegrations(){const{integrations:e}=this._options;this._integrations=o.setupIntegrations(this,e),o.afterSetupIntegrations(this,e)}_updateSessionFromEvent(e,t){let n="fatal"===t.level,r=!1;const o=t.exception&&t.exception.values;if(o){r=!0;for(const e of o){const t=e.mechanism;if(t&&!1===t.handled){n=!0;break}}}const a="ok"===e.status;(a&&0===e.errors||a&&n)&&(i.updateSession(e,{...n&&{status:"crashed"},errors:e.errors||Number(r||n)}),this.captureSession(e))}_isClientDoneProcessing(e){return new h.SyncPromise((t=>{let n=0;const r=setInterval((()=>{0==this._numProcessing?(clearInterval(r),t(!0)):(n+=1,e&&n>=e&&(clearInterval(r),t(!1)))}),1)}))}_isEnabled(){return!1!==this.getOptions().enabled&&void 0!==this._transport}_prepareEvent(e,n,r=t.getCurrentScope(),o=t.getIsolationScope()){const i=this.getOptions(),s=Object.keys(this._integrations);return!n.integrations&&s.length>0&&(n.integrations=s),this.emit("preprocessEvent",e,n),e.type||o.setLastEventId(e.event_id||n.event_id),g.prepareEvent(i,e,n,r,this,o).then((e=>{if(null===e)return e;e.contexts={trace:t.getTraceContextFromScope(r),...e.contexts};const n=a.getDynamicSamplingContextFromScope(this,r);return e.sdkProcessingMetadata={dynamicSamplingContext:n,...e.sdkProcessingMetadata},e}))}_captureEvent(e,t={},r){return this._processEvent(e,t,r).then((e=>e.event_id),(e=>{n.DEBUG_BUILD&&(e instanceof l.SentryError&&"log"===e.logLevel?d.logger.log(e.message):d.logger.warn(e))}))}_processEvent(e,t,n){const r=this.getOptions(),{sampleRate:o}=r,i=b(e),a=v(e),s=e.type||"error",c=`before send for type \`${s}\``,u=void 0===o?void 0:m.parseSampleRate(o);if(a&&"number"==typeof u&&Math.random()>u)return this.recordDroppedEvent("sample_rate","error",e),h.rejectedSyncPromise(new l.SentryError(`Discarding event because it's not included in the random sample (sampling rate = ${o})`,"log"));const d="replay_event"===s?"replay":s,f=(e.sdkProcessingMetadata||{}).capturedSpanIsolationScope;return this._prepareEvent(e,t,n,f).then((n=>{if(null===n)throw this.recordDroppedEvent("event_processor",d,e),new l.SentryError("An event processor returned `null`, will not send event.","log");if(t.data&&!0===t.data.__sentry__)return n;const o=function(e,t,n,r){const{beforeSend:o,beforeSendTransaction:i,beforeSendSpan:a}=t;if(v(n)&&o)return o(n,r);if(b(n)){if(n.spans&&a){const t=[];for(const r of n.spans){const n=a(r);n?t.push(n):(_.showSpanDropWarning(),e.recordDroppedEvent("before_send","span"))}n.spans=t}if(i){if(n.spans){const e=n.spans.length;n.sdkProcessingMetadata={...n.sdkProcessingMetadata,spanCountBeforeProcessing:e}}return i(n,r)}}return n}(this,r,n,t);return function(e,t){const n=`${t} must return \`null\` or a valid event.`;if(p.isThenable(e))return e.then((e=>{if(!p.isPlainObject(e)&&null!==e)throw new l.SentryError(n);return e}),(e=>{throw new l.SentryError(`${t} rejected with ${e}`)}));if(!p.isPlainObject(e)&&null!==e)throw new l.SentryError(n);return e}(o,c)})).then((r=>{if(null===r){if(this.recordDroppedEvent("before_send",d,e),i){const t=1+(e.spans||[]).length;this.recordDroppedEvent("before_send","span",t)}throw new l.SentryError(`${c} returned \`null\`, will not send event.`,"log")}const o=n&&n.getSession();if(!i&&o&&this._updateSessionFromEvent(o,r),i){const e=(r.sdkProcessingMetadata&&r.sdkProcessingMetadata.spanCountBeforeProcessing||0)-(r.spans?r.spans.length:0);e>0&&this.recordDroppedEvent("before_send","span",e)}const a=r.transaction_info;if(i&&a&&r.transaction!==e.transaction){const e="custom";r.transaction_info={...a,source:e}}return this.sendEvent(r,t),r})).then(null,(e=>{if(e instanceof l.SentryError)throw e;throw this.captureException(e,{data:{__sentry__:!0},originalException:e}),new l.SentryError(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.\nReason: ${e}`)}))}_process(e){this._numProcessing++,e.then((e=>(this._numProcessing--,e)),(e=>(this._numProcessing--,e)))}_clearOutcomes(){const e=this._outcomes;return this._outcomes={},Object.entries(e).map((([e,t])=>{const[n,r]=e.split(":");return{reason:n,category:r,quantity:t}}))}_flushOutcomes(){n.DEBUG_BUILD&&d.logger.log("Flushing outcomes...");const e=this._clearOutcomes();if(0===e.length)return void(n.DEBUG_BUILD&&d.logger.log("No outcomes to send"));if(!this._dsn)return void(n.DEBUG_BUILD&&d.logger.log("No dsn provided, will not send outcomes"));n.DEBUG_BUILD&&d.logger.log("Sending outcomes:",e);const t=s.createClientReportEnvelope(e,this._options.tunnel&&c.dsnToString(this._dsn));this.sendEnvelope(t)}},tS}var pS,dS={},fS={};function hS(){if(pS)return fS;pS=1,Object.defineProperty(fS,"__esModule",{value:!0});const e=dE(),t=SE(),n=Mv();return fS.createCheckInEnvelope=function(r,o,i,a,s){const c={sent_at:(new Date).toISOString()};i&&i.sdk&&(c.sdk={name:i.sdk.name,version:i.sdk.version}),a&&s&&(c.dsn=e.dsnToString(s)),o&&(c.trace=n.dropUndefinedKeys(o));const u=function(e){return[{type:"check_in"},e]}(r);return t.createEnvelope(c,[u])},fS}var mS,gS,_S={};function yS(){if(mS)return _S;mS=1,Object.defineProperty(_S,"__esModule",{value:!0});const e=Rv(),t=Bv(),n=EE(),r=Mv();function o(e,t){return e(t.stack||"",1)}function i(e,t){const n={type:t.name||t.constructor.name,value:t.message},r=o(e,t);return r.length&&(n.stacktrace={frames:r}),n}function a(t){if("name"in t&&"string"==typeof t.name){let e=`'${t.name}' captured as exception`;return"message"in t&&"string"==typeof t.message&&(e+=` with message '${t.message}'`),e}if("message"in t&&"string"==typeof t.message)return t.message;const n=r.extractExceptionKeysForMessage(t);if(e.isErrorEvent(t))return`Event \`ErrorEvent\` captured as exception with message \`${t.message}\``;const o=function(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch(e){}}(t);return`${o&&"Object"!==o?`'${o}'`:"Object"} captured as exception with keys: ${n}`}function s(t,r,o,i){if(e.isError(o))return[o,void 0];if(r.synthetic=!0,e.isPlainObject(o)){const e=t&&t.getOptions().normalizeDepth,r={__serialized__:n.normalizeToSize(o,e)},s=function(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)){const n=e[t];if(n instanceof Error)return n}}(o);if(s)return[s,r];const c=a(o),u=i&&i.syntheticException||new Error(c);return u.message=c,[u,r]}const s=i&&i.syntheticException||new Error(o);return s.message=`${o}`,[s,void 0]}return _S.eventFromMessage=function(n,r,i="info",a,s){const c={event_id:a&&a.event_id,level:i};if(s&&a&&a.syntheticException){const e=o(n,a.syntheticException);e.length&&(c.exception={values:[{value:r,stacktrace:{frames:e}}]},t.addExceptionMechanism(c,{synthetic:!0}))}if(e.isParameterizedString(r)){const{__sentry_template_string__:e,__sentry_template_values__:t}=r;return c.logentry={message:e,params:t},c}return c.message=r,c},_S.eventFromUnknownInput=function(e,n,r,o){const a=o&&o.data&&o.data.mechanism||{handled:!0,type:"generic"},[c,u]=s(e,a,r,o),l={exception:{values:[i(n,c)]}};return u&&(l.extra=u),t.addExceptionTypeValue(l,void 0,void 0),t.addExceptionMechanism(l,a),{...l,event_id:o&&o.event_id}},_S.exceptionFromError=i,_S.parseStackFrames=o,_S}function vS(){if(gS)return dS;gS=1,Object.defineProperty(dS,"__esModule",{value:!0});const e=lS(),t=hS(),n=lb(),r=Gy(),o=JE(),i=Ib(),a=nv(),s=rb(),c=Nb(),u=Bv(),l=Hv(),p=yS(),d=Xb();class f extends e.BaseClient{constructor(e){i.registerSpanErrorInstrumentation(),super(e)}eventFromException(e,t){const n=p.eventFromUnknownInput(this,this._options.stackParser,e,t);return n.level="error",l.resolvedSyncPromise(n)}eventFromMessage(e,t="info",n){return l.resolvedSyncPromise(p.eventFromMessage(this._options.stackParser,e,t,n,this._options.attachStacktrace))}captureException(e,t,r){if(this._options.autoSessionTracking&&this._sessionFlusher){const e=n.getIsolationScope().getRequestSession();e&&"ok"===e.status&&(e.status="errored")}return super.captureException(e,t,r)}captureEvent(e,t,r){if(this._options.autoSessionTracking&&this._sessionFlusher){if("exception"===(e.type||"exception")&&e.exception&&e.exception.values&&e.exception.values.length>0){const e=n.getIsolationScope().getRequestSession();e&&"ok"===e.status&&(e.status="errored")}}return super.captureEvent(e,t,r)}close(e){return this._sessionFlusher&&this._sessionFlusher.close(),super.close(e)}initSessionFlusher(){const{release:e,environment:t}=this._options;e?this._sessionFlusher=new o.SessionFlusher(this,{release:e,environment:t}):r.DEBUG_BUILD&&a.logger.warn("Cannot initialize an instance of SessionFlusher if no release is provided!")}captureCheckIn(e,n,o){const i="checkInId"in e&&e.checkInId?e.checkInId:u.uuid4();if(!this._isEnabled())return r.DEBUG_BUILD&&a.logger.warn("SDK not enabled, will not capture checkin."),i;const s=this.getOptions(),{release:c,environment:l,tunnel:p}=s,d={check_in_id:i,monitor_slug:e.monitorSlug,status:e.status,release:c,environment:l};"duration"in e&&(d.duration=e.duration),n&&(d.monitor_config={schedule:n.schedule,checkin_margin:n.checkinMargin,max_runtime:n.maxRuntime,timezone:n.timezone,failure_issue_threshold:n.failureIssueThreshold,recovery_threshold:n.recoveryThreshold});const[f,h]=this._getTraceInfoFromScope(o);h&&(d.contexts={trace:h});const m=t.createCheckInEnvelope(d,f,this.getSdkMetadata(),p,this.getDsn());return r.DEBUG_BUILD&&a.logger.info("Sending checkin:",e.monitorSlug,e.status),this.sendEnvelope(m),i}_captureRequestSession(){this._sessionFlusher?this._sessionFlusher.incrementSessionStatusCount():r.DEBUG_BUILD&&a.logger.warn("Discarded request mode session because autoSessionTracking option was disabled")}_prepareEvent(e,t,n,r){return this._options.platform&&(e.platform=e.platform||this._options.platform),this._options.runtime&&(e.contexts={...e.contexts,runtime:(e.contexts||{}).runtime||this._options.runtime}),this._options.serverName&&(e.server_name=e.server_name||this._options.serverName),super._prepareEvent(e,t,n,r)}_getTraceInfoFromScope(e){if(!e)return[void 0,void 0];const t=s._getSpanForScope(e),r=t?c.spanToTraceContext(t):n.getTraceContextFromScope(e);return[t?d.getDynamicSamplingContextFromSpan(t):d.getDynamicSamplingContextFromScope(this,e),r]}}return dS.ServerRuntimeClient=f,dS}var bS,ES={};function SS(){if(bS)return ES;bS=1,Object.defineProperty(ES,"__esModule",{value:!0});const e=lb(),t=Gy(),n=nv();function r(t){e.getCurrentScope().setClient(t)}return ES.initAndBind=function(o,i){!0===i.debug&&(t.DEBUG_BUILD?n.logger.enable():n.consoleSandbox((()=>{console.warn("[Sentry] Cannot initialize SDK with `debug` option using a non-debug bundle.")}))),e.getCurrentScope().update(i.initialScope);const a=new o(i);return r(a),a.init(),a},ES.setCurrentClient=r,ES}var TS,OS={},AS={};function wS(){if(TS)return AS;TS=1,Object.defineProperty(AS,"__esModule",{value:!0});const e=uS(),t=Hv();return AS.makePromiseBuffer=function(n){const r=[];function o(e){return r.splice(r.indexOf(e),1)[0]||Promise.resolve(void 0)}return{$:r,add:function(i){if(!(void 0===n||r.length<n))return t.rejectedSyncPromise(new e.SentryError("Not adding Promise because buffer limit was reached."));const a=i();return-1===r.indexOf(a)&&r.push(a),a.then((()=>o(a))).then(null,(()=>o(a).then(null,(()=>{})))),a},drain:function(e){return new t.SyncPromise(((n,o)=>{let i=r.length;if(!i)return n(!0);const a=setTimeout((()=>{e&&e>0&&n(!1)}),e);r.forEach((e=>{t.resolvedSyncPromise(e).then((()=>{--i||(clearTimeout(a),n(!0))}),o)}))}))}}},AS}var RS,NS,IS={};function PS(){if(RS)return IS;RS=1,Object.defineProperty(IS,"__esModule",{value:!0});function e(e,t=Date.now()){const n=parseInt(`${e}`,10);if(!isNaN(n))return 1e3*n;const r=Date.parse(`${e}`);return isNaN(r)?6e4:r-t}function t(e,t){return e[t]||e.all||0}return IS.DEFAULT_RETRY_AFTER=6e4,IS.disabledUntil=t,IS.isRateLimited=function(e,n,r=Date.now()){return t(e,n)>r},IS.parseRetryAfterHeader=e,IS.updateRateLimits=function(t,{statusCode:n,headers:r},o=Date.now()){const i={...t},a=r&&r["x-sentry-rate-limits"],s=r&&r["retry-after"];if(a)for(const e of a.trim().split(",")){const[t,n,,,r]=e.split(":",5),a=parseInt(t,10),s=1e3*(isNaN(a)?60:a);if(n)for(const e of n.split(";"))"metric_bucket"===e&&r&&!r.split(";").includes("custom")||(i[e]=o+s);else i.all=o+s}else s?i.all=o+e(s,o):429===n&&(i.all=o+6e4);return i},IS}function xS(){if(NS)return OS;NS=1,Object.defineProperty(OS,"__esModule",{value:!0});const e=Gy(),t=SE(),n=uS(),r=nv(),o=wS(),i=PS(),a=Hv();function s(e,t){if("event"===t||"transaction"===t)return Array.isArray(e)?e[1]:void 0}return OS.DEFAULT_TRANSPORT_BUFFER_SIZE=64,OS.createTransport=function(c,u,l=o.makePromiseBuffer(c.bufferSize||64)){let p={};return{send:function(o){const d=[];if(t.forEachEnvelopeItem(o,((e,n)=>{const r=t.envelopeItemTypeToDataCategory(n);if(i.isRateLimited(p,r)){const t=s(e,n);c.recordDroppedEvent("ratelimit_backoff",r,t)}else d.push(e)})),0===d.length)return a.resolvedSyncPromise({});const f=t.createEnvelope(o[0],d),h=e=>{t.forEachEnvelopeItem(f,((n,r)=>{const o=s(n,r);c.recordDroppedEvent(e,t.envelopeItemTypeToDataCategory(r),o)}))};return l.add((()=>u({body:t.serializeEnvelope(f)}).then((t=>(void 0!==t.statusCode&&(t.statusCode<200||t.statusCode>=300)&&e.DEBUG_BUILD&&r.logger.warn(`Sentry responded with status code ${t.statusCode} to sent event.`),p=i.updateRateLimits(p,t),t)),(e=>{throw h("network_error"),e})))).then((e=>e),(t=>{if(t instanceof n.SentryError)return e.DEBUG_BUILD&&r.logger.error("Skipped sending event because buffer is full."),h("queue_overflow"),a.resolvedSyncPromise({});throw t}))},flush:e=>l.drain(e)}},OS}var CS,MS={};function LS(){if(CS)return MS;CS=1,Object.defineProperty(MS,"__esModule",{value:!0});const e=Gy(),t=SE(),n=nv(),r=PS(),o=100,i=5e3;return MS.MIN_DELAY=o,MS.START_DELAY=i,MS.makeOfflineTransport=function(a){function s(...t){e.DEBUG_BUILD&&n.logger.info("[Offline]:",...t)}return e=>{const n=a(e);if(!e.createStore)throw new Error("No `createStore` function was provided");const c=e.createStore(e);let u,l=i;function p(e){u&&clearTimeout(u),u=setTimeout((async()=>{u=void 0;const e=await c.shift();e&&(s("Attempting to send previously queued event"),e[0].sent_at=(new Date).toISOString(),f(e,!0).catch((e=>{s("Failed to retry sending",e)})))}),e),"number"!=typeof u&&u.unref&&u.unref()}function d(){u||(p(l),l=Math.min(2*l,36e5))}async function f(a,u=!1){if(!u&&t.envelopeContainsItemType(a,["replay_event","replay_recording"]))return await c.push(a),p(o),{};try{const e=await n.send(a);let t=o;if(e)if(e.headers&&e.headers["retry-after"])t=r.parseRetryAfterHeader(e.headers["retry-after"]);else if(e.headers&&e.headers["x-sentry-rate-limits"])t=6e4;else if((e.statusCode||0)>=400)return e;return p(t),l=i,e}catch(n){if(await function(n,r,o){return!t.envelopeContainsItemType(n,["client_report"])&&(!e.shouldStore||e.shouldStore(n,r,o))}(a,n,l))return u?await c.unshift(a):await c.push(a),d(),s("Error sending. Event queued.",n),{};throw n}}return e.flushAtStartup&&d(),{send:f,flush:e=>(void 0===e&&(l=i,p(o)),n.flush(e))}}},MS}var US,kS={};function DS(){if(US)return kS;US=1,Object.defineProperty(kS,"__esModule",{value:!0});const e=ZE(),t=dE(),n=SE();function r(e,t){let r;return n.forEachEnvelopeItem(e,((e,n)=>(t.includes(n)&&(r=Array.isArray(e)?e[1]:void 0),!!r))),r}function o(e,t){return n.createEnvelope(t?{...e[0],dsn:t}:e[0],e[1])}return kS.eventFromEnvelope=r,kS.makeMultiplexedTransport=function(n,i){return a=>{const s=n(a),c=new Map;function u(o,i){const s=i?`${o}:${i}`:o;let u=c.get(s);if(!u){const l=t.dsnFromString(o);if(!l)return;const p=e.getEnvelopeEndpointWithUrlEncodedAuth(l,a.tunnel);u=i?function(e,t){return n=>{const o=e(n);return{...o,send:async e=>{const n=r(e,["event","transaction","profile","replay_event"]);return n&&(n.release=t),o.send(e)}}}}(n,i)({...a,url:p}):n({...a,url:p}),c.set(s,u)}return[o,u]}return{send:async function(e){const t=i({envelope:e,getEvent:function(t){const n=t&&t.length?t:["event"];return r(e,n)}}).map((e=>"string"==typeof e?u(e,void 0):u(e.dsn,e.release))).filter((e=>!!e)),n=t.length?t:[["",s]],a=await Promise.all(n.map((([t,n])=>n.send(o(e,t)))));return a[0]},flush:async function(e){const t=[...c.values(),s];return(await Promise.all(t.map((t=>t.flush(e))))).every((e=>e))}}}},kS}var jS,BS={};function VS(){if(jS)return BS;function e(e){return"/"===e[e.length-1]?e.slice(0,-1):e}return jS=1,Object.defineProperty(BS,"__esModule",{value:!0}),BS.isSentryRequestUrl=function(t,n){const r=n&&n.getDsn(),o=n&&n.getOptions().tunnel;return function(e,t){return!!t&&e.includes(t.host)}(t,r)||function(t,n){if(!n)return!1;return e(t)===e(n)}(t,o)},BS}var FS,GS={};function HS(){if(FS)return GS;return FS=1,Object.defineProperty(GS,"__esModule",{value:!0}),GS.parameterize=function(e,...t){const n=new String(String.raw(e,...t));return n.__sentry_template_string__=e.join("\0").replace(/%/g,"%%").replace(/\0/g,"%s"),n.__sentry_template_values__=t,n},GS}var YS,qS={};function zS(){if(YS)return qS;YS=1,Object.defineProperty(qS,"__esModule",{value:!0});const e=Wy();return qS.applySdkMetadata=function(t,n,r=[n],o="npm"){const i=t._metadata||{};i.sdk||(i.sdk={name:`sentry.javascript.${n}`,packages:r.map((t=>({name:`${o}:@sentry/${t}`,version:e.SDK_VERSION}))),version:e.SDK_VERSION}),t._metadata=i},qS}var KS,WS={};function QS(){if(KS)return WS;KS=1,Object.defineProperty(WS,"__esModule",{value:!0});const e=sb(),t=_v(),n=lb(),r=KE(),o=nv(),i=Nb(),a=Rb(),s=Xb(),c=wb();return WS.getTraceData=function(u={}){const l=n.getClient();if(!r.isEnabled()||!l)return{};const p=t.getMainCarrier(),d=e.getAsyncContextStrategy(p);if(d.getTraceData)return d.getTraceData(u);const f=n.getCurrentScope(),h=u.span||i.getActiveSpan(),m=h?i.spanToTraceHeader(h):function(e){const{traceId:t,sampled:n,spanId:r}=e.getPropagationContext();return a.generateSentryTraceHeader(t,r,n)}(f),g=h?s.getDynamicSamplingContextFromSpan(h):s.getDynamicSamplingContextFromScope(l,f),_=c.dynamicSamplingContextToSentryBaggageHeader(g);return a.TRACEPARENT_REGEXP.test(m)?{"sentry-trace":m,baggage:_}:(o.logger.warn("Invalid sentry-trace data. Cannot generate trace data"),{})},WS}var JS,$S={};function XS(){if(JS)return $S;JS=1,Object.defineProperty($S,"__esModule",{value:!0});const e=QS();return $S.getTraceMetaTags=function(){return Object.entries(e.getTraceData()).map((([e,t])=>`<meta name="${e}" content="${t}"/>`)).join("\n")},$S}var ZS,eT={};function tT(){if(ZS)return eT;ZS=1,Object.defineProperty(eT,"__esModule",{value:!0});const e=lb(),t=nv(),n=kv(),r=100;return eT.addBreadcrumb=function(o,i){const a=e.getClient(),s=e.getIsolationScope();if(!a)return;const{beforeBreadcrumb:c=null,maxBreadcrumbs:u=r}=a.getOptions();if(u<=0)return;const l={timestamp:n.dateTimestampInSeconds(),...o},p=c?t.consoleSandbox((()=>c(l,i))):l;null!==p&&(a.emit&&a.emit("beforeAddBreadcrumb",p,i),s.addBreadcrumb(p,u))},eT}var nT,rT={};function oT(){if(nT)return rT;nT=1,Object.defineProperty(rT,"__esModule",{value:!0});const e=lb(),t=rS(),n=Mv();let r;const o=new WeakMap,i=t.defineIntegration((()=>({name:"FunctionToString",setupOnce(){r=Function.prototype.toString;try{Function.prototype.toString=function(...t){const i=n.getOriginalFunction(this),a=o.has(e.getClient())&&void 0!==i?i:this;return r.apply(a,t)}}catch(e){}},setup(e){o.set(e,!0)}})));return rT.functionToStringIntegration=i,rT}var iT,aT={};function sT(){if(iT)return aT;iT=1,Object.defineProperty(aT,"__esModule",{value:!0});const e=Gy(),t=rS(),n=nv(),r=Bv(),o=Cv(),i=[/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,/^ResizeObserver loop completed with undelivered notifications.$/,/^Cannot redefine property: googletag$/,"undefined is not an object (evaluating 'a.L')",'can\'t redefine non-configurable property "solana"',"vv().getRestrictions is not a function. (In 'vv().getRestrictions(1,a)', 'vv().getRestrictions' is undefined)","Can't find variable: _AutofillCallbackHandler",/^Non-Error promise rejection captured with value: Object Not Found Matching Id:\d+, MethodName:simulateEvent, ParamCount:\d+$/],a=t.defineIntegration(((t={})=>({name:"InboundFilters",processEvent(a,c,u){const l=u.getOptions(),p=function(e={},t={}){return{allowUrls:[...e.allowUrls||[],...t.allowUrls||[]],denyUrls:[...e.denyUrls||[],...t.denyUrls||[]],ignoreErrors:[...e.ignoreErrors||[],...t.ignoreErrors||[],...e.disableErrorDefaults?[]:i],ignoreTransactions:[...e.ignoreTransactions||[],...t.ignoreTransactions||[]],ignoreInternal:void 0===e.ignoreInternal||e.ignoreInternal}}(t,l);return function(t,i){if(i.ignoreInternal&&function(e){try{return"SentryError"===e.exception.values[0].type}catch(e){}return!1}(t))return e.DEBUG_BUILD&&n.logger.warn(`Event dropped due to being internal Sentry Error.\nEvent: ${r.getEventDescription(t)}`),!0;if(function(e,t){if(e.type||!t||!t.length)return!1;return function(e){const t=[];e.message&&t.push(e.message);let n;try{n=e.exception.values[e.exception.values.length-1]}catch(e){}n&&n.value&&(t.push(n.value),n.type&&t.push(`${n.type}: ${n.value}`));return t}(e).some((e=>o.stringMatchesSomePattern(e,t)))}(t,i.ignoreErrors))return e.DEBUG_BUILD&&n.logger.warn(`Event dropped due to being matched by \`ignoreErrors\` option.\nEvent: ${r.getEventDescription(t)}`),!0;if(function(e){if(e.type)return!1;if(!e.exception||!e.exception.values||0===e.exception.values.length)return!1;return!e.message&&!e.exception.values.some((e=>e.stacktrace||e.type&&"Error"!==e.type||e.value))}(t))return e.DEBUG_BUILD&&n.logger.warn(`Event dropped due to not having an error message, error type or stacktrace.\nEvent: ${r.getEventDescription(t)}`),!0;if(function(e,t){if("transaction"!==e.type||!t||!t.length)return!1;const n=e.transaction;return!!n&&o.stringMatchesSomePattern(n,t)}(t,i.ignoreTransactions))return e.DEBUG_BUILD&&n.logger.warn(`Event dropped due to being matched by \`ignoreTransactions\` option.\nEvent: ${r.getEventDescription(t)}`),!0;if(function(e,t){if(!t||!t.length)return!1;const n=s(e);return!!n&&o.stringMatchesSomePattern(n,t)}(t,i.denyUrls))return e.DEBUG_BUILD&&n.logger.warn(`Event dropped due to being matched by \`denyUrls\` option.\nEvent: ${r.getEventDescription(t)}.\nUrl: ${s(t)}`),!0;if(!function(e,t){if(!t||!t.length)return!0;const n=s(e);return!n||o.stringMatchesSomePattern(n,t)}(t,i.allowUrls))return e.DEBUG_BUILD&&n.logger.warn(`Event dropped due to not being matched by \`allowUrls\` option.\nEvent: ${r.getEventDescription(t)}.\nUrl: ${s(t)}`),!0;return!1}(a,p)?null:a}})));function s(t){try{let e;try{e=t.exception.values[0].stacktrace.frames}catch(e){}return e?function(e=[]){for(let t=e.length-1;t>=0;t--){const n=e[t];if(n&&"<anonymous>"!==n.filename&&"[native code]"!==n.filename)return n.filename||null}return null}(e):null}catch(o){return e.DEBUG_BUILD&&n.logger.error(`Cannot extract url for event ${r.getEventDescription(t)}`),null}}return aT.inboundFiltersIntegration=a,aT}var cT,uT,lT={},pT={};function dT(){if(cT)return pT;cT=1,Object.defineProperty(pT,"__esModule",{value:!0});const e=Rv(),t=Cv();function n(t,i,a,s,c,u,l,p){if(u.length>=a+1)return u;let d=[...u];if(e.isInstanceOf(s[c],Error)){r(l,p);const e=t(i,s[c]),u=d.length;o(e,c,u,p),d=n(t,i,a,s[c],c,[e,...d],e,u)}return Array.isArray(s.errors)&&s.errors.forEach(((s,u)=>{if(e.isInstanceOf(s,Error)){r(l,p);const e=t(i,s),f=d.length;o(e,`errors[${u}]`,f,p),d=n(t,i,a,s,c,[e,...d],e,f)}})),d}function r(e,t){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,..."AggregateError"===e.type&&{is_exception_group:!0},exception_id:t}}function o(e,t,n,r){e.mechanism=e.mechanism||{type:"generic",handled:!0},e.mechanism={...e.mechanism,type:"chained",source:t,exception_id:n,parent_id:r}}return pT.applyAggregateErrorsToEvent=function(r,o,i=250,a,s,c,u){if(!(c.exception&&c.exception.values&&u&&e.isInstanceOf(u.originalException,Error)))return;const l=c.exception.values.length>0?c.exception.values[c.exception.values.length-1]:void 0;var p,d;l&&(c.exception.values=(p=n(r,o,s,u.originalException,a,c.exception.values,l,0),d=i,p.map((e=>(e.value&&(e.value=t.truncate(e.value,d)),e)))))},pT}function fT(){if(uT)return lT;uT=1,Object.defineProperty(lT,"__esModule",{value:!0});const e=rS(),t=dT(),n=yS(),r=e.defineIntegration(((e={})=>{const r=e.limit||5,o=e.key||"cause";return{name:"LinkedErrors",preprocessEvent(e,i,a){const s=a.getOptions();t.applyAggregateErrorsToEvent(n.exceptionFromError,s.stackParser,s.maxValueLength,o,r,e,i)}}}));return lT.linkedErrorsIntegration=r,lT}var hT,mT,gT={},_T={};function yT(){if(hT)return _T;hT=1,Object.defineProperty(_T,"__esModule",{value:!0});const e=Qy(),t=new Map,n=new Set;function r(r,o){return function(r){if(e.GLOBAL_OBJ._sentryModuleMetadata)for(const o of Object.keys(e.GLOBAL_OBJ._sentryModuleMetadata)){const i=e.GLOBAL_OBJ._sentryModuleMetadata[o];if(n.has(o))continue;n.add(o);const a=r(o);for(const e of a.reverse())if(e.filename){t.set(e.filename,i);break}}}(r),t.get(o)}return _T.addMetadataToStackFrames=function(e,t){try{t.exception.values.forEach((t=>{if(t.stacktrace)for(const n of t.stacktrace.frames||[]){if(!n.filename||n.module_metadata)continue;const t=r(e,n.filename);t&&(n.module_metadata=t)}}))}catch(e){}},_T.getMetadataForUrl=r,_T.stripMetadataFromStackFrames=function(e){try{e.exception.values.forEach((e=>{if(e.stacktrace)for(const t of e.stacktrace.frames||[])delete t.module_metadata}))}catch(e){}},_T}function vT(){if(mT)return gT;mT=1,Object.defineProperty(gT,"__esModule",{value:!0});const e=rS(),t=yT(),n=SE(),r=e.defineIntegration((()=>({name:"ModuleMetadata",setup(e){e.on("beforeEnvelope",(e=>{n.forEachEnvelopeItem(e,((e,n)=>{if("event"===n){const n=Array.isArray(e)?e[1]:void 0;n&&(t.stripMetadataFromStackFrames(n),e[1]=n)}}))})),e.on("applyFrameMetadata",(n=>{if(n.type)return;const r=e.getOptions().stackParser;t.addMetadataToStackFrames(r,n)}))}})));return gT.moduleMetadataIntegration=r,gT}var bT,ET={},ST={},TT={};function OT(){if(bT)return TT;return bT=1,Object.defineProperty(TT,"__esModule",{value:!0}),TT.parseCookie=function(e){const t={};let n=0;for(;n<e.length;){const r=e.indexOf("=",n);if(-1===r)break;let o=e.indexOf(";",n);if(-1===o)o=e.length;else if(o<r){n=e.lastIndexOf(";",r-1)+1;continue}const i=e.slice(n,r).trim();if(void 0===t[i]){let n=e.slice(r+1,o).trim();34===n.charCodeAt(0)&&(n=n.slice(1,-1));try{t[i]=-1!==n.indexOf("%")?decodeURIComponent(n):n}catch(e){t[i]=n}}n=o+1}return t},TT}var AT,wT={};function RT(){if(AT)return wT;return AT=1,Object.defineProperty(wT,"__esModule",{value:!0}),wT.getNumberOfUrlSegments=function(e){return e.split(/\\?\//).filter((e=>e.length>0&&","!==e)).length},wT.getSanitizedUrlString=function(e){const{protocol:t,host:n,path:r}=e;return`${t?`${t}://`:""}${n&&n.replace(/^.*@/,"[filtered]:[filtered]@").replace(/(:80)$/,"").replace(/(:443)$/,"")||""}${r}`},wT.parseUrl=function(e){if(!e)return{};const t=e.match(/^(([^:/?#]+):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};const n=t[6]||"",r=t[8]||"";return{host:t[4],path:t[5],protocol:t[2],search:n,hash:r,relative:t[5]+n+r}},wT.stripUrlQueryAndFragment=function(e){return e.split(/[?#]/,1)[0]},wT}var NT,IT,PT,xT={};function CT(){if(NT)return xT;NT=1,Object.defineProperty(xT,"__esModule",{value:!0});const e=["X-Client-IP","X-Forwarded-For","Fly-Client-IP","CF-Connecting-IP","Fastly-Client-Ip","True-Client-Ip","X-Real-IP","X-Cluster-Client-IP","X-Forwarded","Forwarded-For","Forwarded","X-Vercel-Forwarded-For"];return xT.getClientIPAddress=function(t){const n=e.map((e=>{const n=t[e],r=Array.isArray(n)?n.join(";"):n;return"Forwarded"===e?function(e){if(!e)return null;for(const t of e.split(";"))if(t.startsWith("for="))return t.slice(4);return null}(r):r&&r.split(",").map((e=>e.trim()))})).reduce(((e,t)=>t?e.concat(t):e),[]).find((e=>null!==e&&function(e){const t=/(?:^(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}$)|(?:^(?:(?:[a-fA-F\d]{1,4}:){7}(?:[a-fA-F\d]{1,4}|:)|(?:[a-fA-F\d]{1,4}:){6}(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|:[a-fA-F\d]{1,4}|:)|(?:[a-fA-F\d]{1,4}:){5}(?::(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-fA-F\d]{1,4}){1,2}|:)|(?:[a-fA-F\d]{1,4}:){4}(?:(?::[a-fA-F\d]{1,4}){0,1}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-fA-F\d]{1,4}){1,3}|:)|(?:[a-fA-F\d]{1,4}:){3}(?:(?::[a-fA-F\d]{1,4}){0,2}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-fA-F\d]{1,4}){1,4}|:)|(?:[a-fA-F\d]{1,4}:){2}(?:(?::[a-fA-F\d]{1,4}){0,3}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-fA-F\d]{1,4}){1,5}|:)|(?:[a-fA-F\d]{1,4}:){1}(?:(?::[a-fA-F\d]{1,4}){0,4}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-fA-F\d]{1,4}){1,6}|:)|(?::(?:(?::[a-fA-F\d]{1,4}){0,5}:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:\\.(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}|(?::[a-fA-F\d]{1,4}){1,7}|:)))(?:%[0-9a-zA-Z]{1,})?$)/;return t.test(e)}(e)));return n||null},xT.ipHeaderNames=e,xT}function MT(){if(IT)return ST;IT=1,Object.defineProperty(ST,"__esModule",{value:!0});const e=OT(),t=Zy(),n=Rv(),r=nv(),o=EE(),i=Mv(),a=Cv(),s=RT(),c=CT(),u={ip:!1,request:!0,user:!0},l=["cookies","data","headers","method","query_string","url"],p=["id","username","email"];function d(e,t){const n={};return(Array.isArray(t)?t:p).forEach((t=>{e&&t in e&&(n[t]=e[t])})),n}function f(t,r={}){const{include:i=l}=r,s={},u=t.headers||{},p=t.method,d=u.host||t.hostname||t.host||"<no host>",f="https"===t.protocol||t.socket&&t.socket.encrypted?"https":"http",h=t.originalUrl||t.url||"",m=h.startsWith(f)?h:`${f}://${d}${h}`;return i.forEach((r=>{switch(r){case"headers":s.headers=u,i.includes("cookies")||delete s.headers.cookie,i.includes("ip")||c.ipHeaderNames.forEach((e=>{delete s.headers[e]}));break;case"method":s.method=p;break;case"url":s.url=m;break;case"cookies":s.cookies=t.cookies||u.cookie&&e.parseCookie(u.cookie)||{};break;case"query_string":s.query_string=function(e){let t=e.originalUrl||e.url||"";if(!t)return;t.startsWith("/")&&(t=`http://dogs.are.great${t}`);try{const n=e.query||new URL(t).search.slice(1);return n.length?n:void 0}catch(e){return}}(t);break;case"data":{if("GET"===p||"HEAD"===p)break;const e=t.body;if(void 0!==e){const t=n.isString(e)?e:n.isPlainObject(e)?JSON.stringify(o.normalize(e)):a.truncate(`${e}`,1024);t&&(s.data=t)}break}default:({}).hasOwnProperty.call(t,r)&&(s[r]=t[r])}})),s}function h(e){const n={};try{e.forEach(((e,t)=>{"string"==typeof e&&(n[t]=e)}))}catch(e){t.DEBUG_BUILD&&r.logger.warn("Sentry failed extracting headers from a request object. If you see this, please file an issue.")}return n}function m(e){const n=Object.create(null);try{Object.entries(e).forEach((([e,t])=>{"string"==typeof t&&(n[e]=t)}))}catch(e){t.DEBUG_BUILD&&r.logger.warn("Sentry failed extracting headers from a request object. If you see this, please file an issue.")}return n}function g(e){if(e)try{const t=new URL(e,"http://dogs.are.great").search.slice(1);return t.length?t:void 0}catch(e){return}}return ST.DEFAULT_USER_INCLUDES=p,ST.addNormalizedRequestDataToEvent=function(t,r,o,i){const a={...u,...i&&i.include};if(a.request){const n=Array.isArray(a.request)?[...a.request]:[...l];a.ip&&n.push("ip");const o=function(t,{include:n}){const r=n?Array.isArray(n)?n:l:[],o={},i={...t.headers};r.includes("headers")&&(o.headers=i,n.includes("cookies")||delete i.cookie,n.includes("ip")||c.ipHeaderNames.forEach((e=>{delete i[e]})));r.includes("method")&&(o.method=t.method);r.includes("url")&&(o.url=t.url);if(r.includes("cookies")){const n=t.cookies||(i&&i.cookie?e.parseCookie(i.cookie):void 0);o.cookies=n||{}}r.includes("query_string")&&(o.query_string=t.query_string);r.includes("data")&&(o.data=t.data);return o}(r,{include:n});t.request={...t.request,...o}}if(a.user){const e=o.user&&n.isPlainObject(o.user)?d(o.user,a.user):{};Object.keys(e).length&&(t.user={...e,...t.user})}if(a.ip){const e=r.headers&&c.getClientIPAddress(r.headers)||o.ipAddress;e&&(t.user={...t.user,ip_address:e})}},ST.addRequestDataToEvent=function(e,t,r){const o={...u,...r&&r.include};if(o.request){const n=Array.isArray(o.request)?[...o.request]:[...l];o.ip&&n.push("ip");const r=f(t,{include:n});e.request={...e.request,...r}}if(o.user){const r=t.user&&n.isPlainObject(t.user)?d(t.user,o.user):{};Object.keys(r).length&&(e.user={...e.user,...r})}if(o.ip){const n=t.headers&&c.getClientIPAddress(t.headers)||t.ip||t.socket&&t.socket.remoteAddress;n&&(e.user={...e.user,ip_address:n})}return e},ST.extractPathForTransaction=function(e,t={}){const n=e.method&&e.method.toUpperCase();let r="",o="url";t.customRoute||e.route?(r=t.customRoute||`${e.baseUrl||""}${e.route&&e.route.path}`,o="route"):(e.originalUrl||e.url)&&(r=s.stripUrlQueryAndFragment(e.originalUrl||e.url||""));let i="";return t.method&&n&&(i+=n),t.method&&t.path&&(i+=" "),t.path&&r&&(i+=r),[i,o]},ST.extractQueryParamsFromUrl=g,ST.extractRequestData=f,ST.headersToDict=m,ST.httpRequestToRequestData=function(e){const t=e.headers||{},n=t.host||"<no host>",r=e.socket&&e.socket.encrypted?"https":"http",o=e.url||"",a=o.startsWith(r)?o:`${r}://${n}${o}`,s=e.body||void 0,c=e.cookies;return i.dropUndefinedKeys({url:a,method:e.method,query_string:g(o),headers:m(t),cookies:c,data:s})},ST.winterCGHeadersToDict=h,ST.winterCGRequestToRequestData=function(e){const t=h(e.headers);return{method:e.method,url:e.url,query_string:g(e.url),headers:t}},ST}function LT(){if(PT)return ET;PT=1,Object.defineProperty(ET,"__esModule",{value:!0});const e=rS(),t=MT(),n={include:{cookies:!0,data:!0,headers:!0,ip:!1,query_string:!0,url:!0,user:{id:!0,username:!0,email:!0}},transactionNamingScheme:"methodPath"},r=e.defineIntegration(((e={})=>{const r={...n,...e,include:{...n.include,...e.include,user:e.include&&"boolean"==typeof e.include.user?e.include.user:{...n.include.user,...(e.include||{}).user}}};return{name:"RequestData",processEvent(e){const{sdkProcessingMetadata:n={}}=e,{request:o,normalizedRequest:i}=n,a=function(e){const{transactionNamingScheme:t,include:{ip:n,user:r,...o}}=e,i=["method"];for(const[e,t]of Object.entries(o))t&&i.push(e);let a;if(void 0===r)a=!0;else if("boolean"==typeof r)a=r;else{const e=[];for(const[t,n]of Object.entries(r))n&&e.push(t);a=e}return{include:{ip:n,user:a,request:0!==i.length?i:void 0,transaction:t}}}(r);if(i){const n=o?o.ip||o.socket&&o.socket.remoteAddress:void 0,r=o?o.user:void 0;return t.addNormalizedRequestDataToEvent(e,i,{ipAddress:n,user:r},a),e}return o?t.addRequestDataToEvent(e,o,a):e}}}));return ET.requestDataIntegration=r,ET}var UT,kT={},DT={};function jT(){if(UT)return DT;UT=1,Object.defineProperty(DT,"__esModule",{value:!0});const e=nv(),t=Mv(),n=Qy(),r=cv();function o(){"console"in n.GLOBAL_OBJ&&e.CONSOLE_LEVELS.forEach((function(o){o in n.GLOBAL_OBJ.console&&t.fill(n.GLOBAL_OBJ.console,o,(function(t){return e.originalConsoleMethods[o]=t,function(...t){const i={args:t,level:o};r.triggerHandlers("console",i);const a=e.originalConsoleMethods[o];a&&a.apply(n.GLOBAL_OBJ.console,t)}}))}))}return DT.addConsoleInstrumentationHandler=function(e){const t="console";r.addHandler(t,e),r.maybeInstrument(t,o)},DT}var BT,VT,FT={};function GT(){if(BT)return FT;BT=1,Object.defineProperty(FT,"__esModule",{value:!0});return FT.severityLevelFromString=function(e){return"warn"===e?"warning":["fatal","error","warning","log","info","debug"].includes(e)?e:"log"},FT.validSeverityLevels=["fatal","error","warning","log","info","debug"],FT}function HT(){if(VT)return kT;VT=1,Object.defineProperty(kT,"__esModule",{value:!0});const e=lb(),t=KE(),n=rS(),r=jT(),o=nv(),i=Bv(),a=GT(),s=Cv(),c=Qy(),u=n.defineIntegration(((n={})=>{const u=n.levels||o.CONSOLE_LEVELS,l=!!n.handled;return{name:"CaptureConsole",setup(n){"console"in c.GLOBAL_OBJ&&r.addConsoleInstrumentationHandler((({args:r,level:o})=>{e.getClient()===n&&u.includes(o)&&function(n,r,o){const c={level:a.severityLevelFromString(r),extra:{arguments:n}};e.withScope((e=>{if(e.addEventProcessor((e=>(e.logger="console",i.addExceptionMechanism(e,{handled:o,type:"console"}),e))),"assert"===r){if(!n[0]){const r=`Assertion failed: ${s.safeJoin(n.slice(1)," ")||"console.assert"}`;e.setExtra("arguments",n.slice(1)),t.captureMessage(r,c)}return}const a=n.find((e=>e instanceof Error));if(a)return void t.captureException(a,c);const u=s.safeJoin(n," ");t.captureMessage(u,c)}))}(r,o,l)}))}}}));return kT.captureConsoleIntegration=u,kT}var YT,qT={};function zT(){if(YT)return qT;YT=1,Object.defineProperty(qT,"__esModule",{value:!0});const e=rS(),t=nv(),n=e.defineIntegration(((e={})=>{const n={debugger:!1,stringify:!1,...e};return{name:"Debug",setup(e){e.on("beforeSendEvent",((e,r)=>{n.debugger,t.consoleSandbox((()=>{n.stringify?(console.log(JSON.stringify(e,null,2)),r&&Object.keys(r).length&&console.log(JSON.stringify(r,null,2))):(console.log(e),r&&Object.keys(r).length&&console.log(r))}))}))}}}));return qT.debugIntegration=n,qT}var KT,WT={};function QT(){if(KT)return WT;KT=1,Object.defineProperty(WT,"__esModule",{value:!0});const e=rS(),t=Gy(),n=nv(),r=sv(),o=e.defineIntegration((()=>{let e;return{name:"Dedupe",processEvent(r){if(r.type)return r;try{if(i(r,e))return t.DEBUG_BUILD&&n.logger.warn("Event dropped due to being a duplicate of previously captured event."),null}catch(e){}return e=r}}}));function i(e,t){return!!t&&(!!function(e,t){const n=e.message,r=t.message;if(!n&&!r)return!1;if(n&&!r||!n&&r)return!1;if(n!==r)return!1;if(!s(e,t))return!1;if(!a(e,t))return!1;return!0}(e,t)||!!function(e,t){const n=c(t),r=c(e);if(!n||!r)return!1;if(n.type!==r.type||n.value!==r.value)return!1;if(!s(e,t))return!1;if(!a(e,t))return!1;return!0}(e,t))}function a(e,t){let n=r.getFramesFromEvent(e),o=r.getFramesFromEvent(t);if(!n&&!o)return!0;if(n&&!o||!n&&o)return!1;if(o.length!==n.length)return!1;for(let e=0;e<o.length;e++){const t=o[e],r=n[e];if(t.filename!==r.filename||t.lineno!==r.lineno||t.colno!==r.colno||t.function!==r.function)return!1}return!0}function s(e,t){let n=e.fingerprint,r=t.fingerprint;if(!n&&!r)return!0;if(n&&!r||!n&&r)return!1;try{return!(n.join("")!==r.join(""))}catch(e){return!1}}function c(e){return e.exception&&e.exception.values&&e.exception.values[0]}return WT._shouldDropEvent=i,WT.dedupeIntegration=o,WT}var JT,$T={};function XT(){if(JT)return $T;JT=1,Object.defineProperty($T,"__esModule",{value:!0});const e=rS(),t=Gy(),n=Rv(),r=nv(),o=EE(),i=Mv(),a=Cv(),s=e.defineIntegration(((e={})=>{const{depth:s=3,captureErrorCause:c=!0}=e;return{name:"ExtraErrorData",processEvent(e,u,l){const{maxValueLength:p=250}=l.getOptions();return function(e,s={},c,u,l){if(!s.originalException||!n.isError(s.originalException))return e;const p=s.originalException.name||s.originalException.constructor.name,d=function(e,o,i){try{const t=["name","message","stack","line","column","fileName","lineNumber","columnNumber","toJSON"],r={};for(const o of Object.keys(e)){if(-1!==t.indexOf(o))continue;const s=e[o];r[o]=n.isError(s)||"string"==typeof s?a.truncate(`${s}`,i):s}if(o&&void 0!==e.cause&&(r.cause=n.isError(e.cause)?e.cause.toString():e.cause),"function"==typeof e.toJSON){const t=e.toJSON();for(const e of Object.keys(t)){const o=t[e];r[e]=n.isError(o)?o.toString():o}}return r}catch(e){t.DEBUG_BUILD&&r.logger.error("Unable to extract extra data from the Error object:",e)}return null}(s.originalException,u,l);if(d){const t={...e.contexts},r=o.normalize(d,c);return n.isPlainObject(r)&&(i.addNonEnumerableProperty(r,"__sentry_skip_normalization__",!0),t[p]=r),{...e,contexts:t}}return e}(e,u,s,c,p)}}}));return $T.extraErrorDataIntegration=s,$T}var ZT,eO,tO={},nO={};function rO(){if(ZT)return nO;function e(e,t){let n=0;for(let t=e.length-1;t>=0;t--){const r=e[t];"."===r?e.splice(t,1):".."===r?(e.splice(t,1),n++):n&&(e.splice(t,1),n--)}if(t)for(;n--;n)e.unshift("..");return e}ZT=1,Object.defineProperty(nO,"__esModule",{value:!0});const t=/^(\S+:\\|\/?)([\s\S]*?)((?:\.{1,2}|[^/\\]+?|)(\.[^./\\]*|))(?:[/\\]*)$/;function n(e){const n=e.length>1024?`<truncated>${e.slice(-1024)}`:e,r=t.exec(n);return r?r.slice(1):[]}function r(...t){let n="",r=!1;for(let e=t.length-1;e>=-1&&!r;e--){const o=e>=0?t[e]:"/";o&&(n=`${o}/${n}`,r="/"===o.charAt(0))}return n=e(n.split("/").filter((e=>!!e)),!r).join("/"),(r?"/":"")+n||"."}function o(e){let t=0;for(;t<e.length&&""===e[t];t++);let n=e.length-1;for(;n>=0&&""===e[n];n--);return t>n?[]:e.slice(t,n-t+1)}function i(t){const n=a(t),r="/"===t.slice(-1);let o=e(t.split("/").filter((e=>!!e)),!n).join("/");return o||n||(o="."),o&&r&&(o+="/"),(n?"/":"")+o}function a(e){return"/"===e.charAt(0)}return nO.basename=function(e,t){let r=n(e)[2]||"";return t&&r.slice(-1*t.length)===t&&(r=r.slice(0,r.length-t.length)),r},nO.dirname=function(e){const t=n(e),r=t[0]||"";let o=t[1];return r||o?(o&&(o=o.slice(0,o.length-1)),r+o):"."},nO.isAbsolute=a,nO.join=function(...e){return i(e.join("/"))},nO.normalizePath=i,nO.relative=function(e,t){e=r(e).slice(1),t=r(t).slice(1);const n=o(e.split("/")),i=o(t.split("/")),a=Math.min(n.length,i.length);let s=a;for(let e=0;e<a;e++)if(n[e]!==i[e]){s=e;break}let c=[];for(let e=s;e<n.length;e++)c.push("..");return c=c.concat(i.slice(s)),c.join("/")},nO.resolve=r,nO}function oO(){if(eO)return tO;eO=1,Object.defineProperty(tO,"__esModule",{value:!0});const e=rS(),t=rO(),n=Qy(),r=e.defineIntegration(((e={})=>{const t=e.root,r=e.prefix||"app:///",i="window"in n.GLOBAL_OBJ&&void 0!==n.GLOBAL_OBJ.window,a=e.iteratee||o({isBrowser:i,root:t,prefix:r});function s(e){return{...e,frames:e&&e.frames&&e.frames.map((e=>a(e)))}}return{name:"RewriteFrames",processEvent(e){let t=e;return e.exception&&Array.isArray(e.exception.values)&&(t=function(e){try{return{...e,exception:{...e.exception,values:e.exception.values.map((e=>({...e,...e.stacktrace&&{stacktrace:s(e.stacktrace)}})))}}}catch(t){return e}}(t)),t}}}));function o({isBrowser:e,root:n,prefix:r}){return o=>{if(!o.filename)return o;const i=/^[a-zA-Z]:\\/.test(o.filename)||o.filename.includes("\\")&&!o.filename.includes("/"),a=/^\//.test(o.filename);if(e){if(n){const e=o.filename;0===e.indexOf(n)&&(o.filename=e.replace(n,r))}}else if(i||a){const e=i?o.filename.replace(/^[a-zA-Z]:/,"").replace(/\\/g,"/"):o.filename,a=n?t.relative(n,e):t.basename(e);o.filename=`${r}${a}`}return o}}return tO.generateIteratee=o,tO.rewriteFramesIntegration=r,tO}var iO,aO={};function sO(){if(iO)return aO;iO=1,Object.defineProperty(aO,"__esModule",{value:!0});const e=rS(),t=kv(),n=e.defineIntegration((()=>{const e=1e3*t.timestampInSeconds();return{name:"SessionTiming",processEvent(n){const r=1e3*t.timestampInSeconds();return{...n,extra:{...n.extra,"session:start":e,"session:duration":r-e,"session:end":r}}}}}));return aO.sessionTimingIntegration=n,aO}var cO,uO={};function lO(){if(cO)return uO;cO=1,Object.defineProperty(uO,"__esModule",{value:!0});const e=rS(),t=Rv(),n=Cv();function r(e){return{...e,path:"path"in e&&Array.isArray(e.path)?e.path.join("."):void 0,keys:"keys"in e?JSON.stringify(e.keys):void 0,unionErrors:"unionErrors"in e?JSON.stringify(e.unionErrors):void 0}}function o(e){return e.map((e=>"number"==typeof e?"<array>":e)).join(".")}function i(e){const t=new Set;for(const n of e.issues){const e=o(n.path);e.length>0&&t.add(e)}const r=Array.from(t);if(0===r.length){let t="variable";if(e.issues.length>0){const n=e.issues[0];void 0!==n&&"expected"in n&&"string"==typeof n.expected&&(t=n.expected)}return`Failed to validate ${t}`}return`Failed to validate keys: ${n.truncate(r.join(", "),100)}`}function a(e,n=!1,o,a){if(!(o.exception&&o.exception.values&&a&&a.originalException&&(s=a.originalException,t.isError(s)&&"ZodError"===s.name&&Array.isArray(s.issues))&&0!==a.originalException.issues.length))return o;var s;try{const t=(n?a.originalException.issues:a.originalException.issues.slice(0,e)).map(r);return n&&(Array.isArray(a.attachments)||(a.attachments=[]),a.attachments.push({filename:"zod_issues.json",data:JSON.stringify({issues:t})})),{...o,exception:{...o.exception,values:[{...o.exception.values[0],value:i(a.originalException)},...o.exception.values.slice(1)]},extra:{...o.extra,"zoderror.issues":t.slice(0,e)}}}catch(e){return{...o,extra:{...o.extra,"zoderrors sentry integration parse error":{message:"an exception was thrown while processing ZodError within applyZodErrorsToEvent()",error:e instanceof Error?`${e.name}: ${e.message}\n${e.stack}`:"unknown"}}}}}const s=e.defineIntegration(((e={})=>{const t=void 0===e.limit?10:e.limit;return{name:"ZodErrors",processEvent:(n,r)=>a(t,e.saveZodIssuesAsAttachment,n,r)}}));return uO.applyZodErrorsToEvent=a,uO.flattenIssue=r,uO.flattenIssuePath=o,uO.formatIssueMessage=i,uO.zodErrorsIntegration=s,uO}var pO,dO={};function fO(){if(pO)return dO;pO=1,Object.defineProperty(dO,"__esModule",{value:!0});const e=rS(),t=yT(),n=SE(),r=sv(),o=e.defineIntegration((e=>({name:"ThirdPartyErrorsFilter",setup(e){e.on("beforeEnvelope",(e=>{n.forEachEnvelopeItem(e,((e,n)=>{if("event"===n){const n=Array.isArray(e)?e[1]:void 0;n&&(t.stripMetadataFromStackFrames(n),e[1]=n)}}))})),e.on("applyFrameMetadata",(n=>{if(n.type)return;const r=e.getOptions().stackParser;t.addMetadataToStackFrames(r,n)}))},processEvent(t){const n=function(e){const t=r.getFramesFromEvent(e);if(!t)return;return t.filter((e=>!!e.filename)).map((e=>e.module_metadata?Object.keys(e.module_metadata).filter((e=>e.startsWith(i))).map((e=>e.slice(i.length))):[]))}(t);if(n){if(n["drop-error-if-contains-third-party-frames"===e.behaviour||"apply-tag-if-contains-third-party-frames"===e.behaviour?"some":"every"]((t=>!t.some((t=>e.filterKeys.includes(t)))))){if("drop-error-if-contains-third-party-frames"===e.behaviour||"drop-error-if-exclusively-contains-third-party-frames"===e.behaviour)return null;t.tags={...t.tags,third_party_code:!0}}}return t}})));const i="_sentryBundlerPluginAppKey:";return dO.thirdPartyErrorFilterIntegration=o,dO}var hO,mO,gO={},_O={};function yO(){if(hO)return _O;hO=1,Object.defineProperty(_O,"__esModule",{value:!0});return _O.COUNTER_METRIC_TYPE="c",_O.DEFAULT_BROWSER_FLUSH_INTERVAL=5e3,_O.DEFAULT_FLUSH_INTERVAL=1e4,_O.DISTRIBUTION_METRIC_TYPE="d",_O.GAUGE_METRIC_TYPE="g",_O.MAX_WEIGHT=1e4,_O.SET_METRIC_TYPE="s",_O}function vO(){if(mO)return gO;mO=1,Object.defineProperty(gO,"__esModule",{value:!0});const e=lb(),t=Gy(),n=Qy(),r=nv(),o=kv(),i=Nb(),a=xE(),s=zb(),c=yO();function u(e,t){const r=n.getGlobalSingleton("globalMetricsAggregators",(()=>new WeakMap)),o=r.get(e);if(o)return o;const i=new t(e);return e.on("flush",(()=>i.flush())),e.on("close",(()=>i.close())),r.set(e,i),i}function l(n,o,a,s,c={}){const l=c.client||e.getClient();if(!l)return;const p=i.getActiveSpan(),d=p?i.getRootSpan(p):void 0,f=d&&i.spanToJSON(d).description,{unit:h,tags:m,timestamp:g}=c,{release:_,environment:y}=l.getOptions(),v={};_&&(v.release=_),y&&(v.environment=y),f&&(v.transaction=f),t.DEBUG_BUILD&&r.logger.log(`Adding value of ${s} to ${o} metric ${a}`);u(l,n).add(o,a,s,h,{...v,...m},g)}function p(e,t,n,r){l(e,c.DISTRIBUTION_METRIC_TYPE,t,f(n),r)}const d={increment:function(e,t,n=1,r){l(e,c.COUNTER_METRIC_TYPE,t,f(n),r)},distribution:p,set:function(e,t,n,r){l(e,c.SET_METRIC_TYPE,t,n,r)},gauge:function(e,t,n,r){l(e,c.GAUGE_METRIC_TYPE,t,f(n),r)},timing:function(e,t,n,r="second",i){if("function"==typeof n){const r=o.timestampInSeconds();return a.startSpanManual({op:"metrics.timing",name:t,startTime:r,onlyIfParent:!0},(a=>s.handleCallbackErrors((()=>n()),(()=>{}),(()=>{const n=o.timestampInSeconds();p(e,t,n-r,{...i,unit:"second"}),a.end(n)}))))}p(e,t,n,{...i,unit:r})},getMetricsAggregatorForClient:u};function f(e){return"string"==typeof e?parseInt(e):e}return gO.metrics=d,gO}var bO,EO={};function SO(){if(bO)return EO;bO=1,Object.defineProperty(EO,"__esModule",{value:!0});const e=lb(),t=Gy(),n=nv();function r(e){return!!e&&void 0!==e._profiler&&"function"==typeof e._profiler.start&&"function"==typeof e._profiler.stop}const o={startProfiler:function(){const o=e.getClient();if(!o)return void(t.DEBUG_BUILD&&n.logger.warn("No Sentry client available, profiling is not started"));const i=o.getIntegrationByName("ProfilingIntegration");i?r(i)?i._profiler.start():t.DEBUG_BUILD&&n.logger.warn("Profiler is not available on profiling integration."):t.DEBUG_BUILD&&n.logger.warn("ProfilingIntegration is not available")},stopProfiler:function(){const o=e.getClient();if(!o)return void(t.DEBUG_BUILD&&n.logger.warn("No Sentry client available, profiling is not started"));const i=o.getIntegrationByName("ProfilingIntegration");i?r(i)?i._profiler.stop():t.DEBUG_BUILD&&n.logger.warn("Profiler is not available on profiling integration."):t.DEBUG_BUILD&&n.logger.warn("ProfilingIntegration is not available")}};return EO.profiler=o,EO}var TO,OO,AO={},wO={},RO={},NO={};function IO(){if(TO)return NO;TO=1,Object.defineProperty(NO,"__esModule",{value:!0});const e=Mv();function t(e){return e.replace(/[^\w\-./]+/gi,"")}const n=[["\n","\\n"],["\r","\\r"],["\t","\\t"],["\\","\\\\"],["|","\\u{7c}"],[",","\\u{2c}"]];function r(e){return[...e].reduce(((e,t)=>e+function(e){for(const[t,r]of n)if(e===t)return r;return e}(t)),"")}return NO.getBucketKey=function(t,n,r,o){return`${t}${n}${r}${Object.entries(e.dropUndefinedKeys(o)).sort(((e,t)=>e[0].localeCompare(t[0])))}`},NO.sanitizeMetricKey=function(e){return e.replace(/[^\w\-.]+/gi,"_")},NO.sanitizeTags=function(e){const n={};for(const o in e)if(Object.prototype.hasOwnProperty.call(e,o)){n[t(o)]=r(String(e[o]))}return n},NO.sanitizeUnit=function(e){return e.replace(/[^\w]+/gi,"_")},NO.serializeMetricBuckets=function(e){let t="";for(const n of e){const e=Object.entries(n.tags),r=e.length>0?`|#${e.map((([e,t])=>`${e}:${t}`)).join(",")}`:"";t+=`${n.name}@${n.unit}:${n.metric}|${n.metricType}${r}|T${n.timestamp}\n`}return t},NO.simpleHash=function(e){let t=0;for(let n=0;n<e.length;n++){t=(t<<5)-t+e.charCodeAt(n),t&=t}return t>>>0},NO}function PO(){if(OO)return RO;OO=1,Object.defineProperty(RO,"__esModule",{value:!0});const e=dE(),t=SE(),n=nv(),r=IO();function o(n,o,i,a){const s={sent_at:(new Date).toISOString()};i&&i.sdk&&(s.sdk={name:i.sdk.name,version:i.sdk.version}),a&&o&&(s.dsn=e.dsnToString(o));const c=function(e){const t=r.serializeMetricBuckets(e);return[{type:"statsd",length:t.length},t]}(n);return t.createEnvelope(s,[c])}return RO.captureAggregateMetrics=function(e,t){n.logger.log(`Flushing aggregated metrics, number of metrics: ${t.length}`);const r=o(t,e.getDsn(),e.getSdkMetadata(),e.getOptions().tunnel);e.sendEnvelope(r)},RO.createMetricEnvelope=o,RO}var xO,CO,MO,LO={};function UO(){if(xO)return LO;xO=1,Object.defineProperty(LO,"__esModule",{value:!0});const e=yO(),t=IO();class n{constructor(e){this._value=e}get weight(){return 1}add(e){this._value+=e}toString(){return`${this._value}`}}class r{constructor(e){this._last=e,this._min=e,this._max=e,this._sum=e,this._count=1}get weight(){return 5}add(e){this._last=e,e<this._min&&(this._min=e),e>this._max&&(this._max=e),this._sum+=e,this._count++}toString(){return`${this._last}:${this._min}:${this._max}:${this._sum}:${this._count}`}}class o{constructor(e){this._value=[e]}get weight(){return this._value.length}add(e){this._value.push(e)}toString(){return this._value.join(":")}}class i{constructor(e){this.first=e,this._value=new Set([e])}get weight(){return this._value.size}add(e){this._value.add(e)}toString(){return Array.from(this._value).map((e=>"string"==typeof e?t.simpleHash(e):e)).join(":")}}const a={[e.COUNTER_METRIC_TYPE]:n,[e.GAUGE_METRIC_TYPE]:r,[e.DISTRIBUTION_METRIC_TYPE]:o,[e.SET_METRIC_TYPE]:i};return LO.CounterMetric=n,LO.DistributionMetric=o,LO.GaugeMetric=r,LO.METRIC_MAP=a,LO.SetMetric=i,LO}function kO(){if(CO)return wO;CO=1,Object.defineProperty(wO,"__esModule",{value:!0});const e=kv(),t=Nb(),n=yO(),r=PO(),o=UO(),i=IO();return wO.MetricsAggregator=class{constructor(e){this._client=e,this._buckets=new Map,this._bucketsTotalWeight=0,this._interval=setInterval((()=>this._flush()),n.DEFAULT_FLUSH_INTERVAL),this._interval.unref&&this._interval.unref(),this._flushShift=Math.floor(Math.random()*n.DEFAULT_FLUSH_INTERVAL/1e3),this._forceFlush=!1}add(r,a,s,c="none",u={},l=e.timestampInSeconds()){const p=Math.floor(l),d=i.sanitizeMetricKey(a),f=i.sanitizeTags(u),h=i.sanitizeUnit(c),m=i.getBucketKey(r,d,h,f);let g=this._buckets.get(m);const _=g&&r===n.SET_METRIC_TYPE?g.metric.weight:0;g?(g.metric.add(s),g.timestamp<p&&(g.timestamp=p)):(g={metric:new o.METRIC_MAP[r](s),timestamp:p,metricType:r,name:d,unit:h,tags:f},this._buckets.set(m,g));const y="string"==typeof s?g.metric.weight-_:s;t.updateMetricSummaryOnActiveSpan(r,d,y,h,u,m),this._bucketsTotalWeight+=g.metric.weight,this._bucketsTotalWeight>=n.MAX_WEIGHT&&this.flush()}flush(){this._forceFlush=!0,this._flush()}close(){this._forceFlush=!0,clearInterval(this._interval),this._flush()}_flush(){if(this._forceFlush)return this._forceFlush=!1,this._bucketsTotalWeight=0,this._captureMetrics(this._buckets),void this._buckets.clear();const t=Math.floor(e.timestampInSeconds())-n.DEFAULT_FLUSH_INTERVAL/1e3-this._flushShift,r=new Map;for(const[e,n]of this._buckets)n.timestamp<=t&&(r.set(e,n),this._bucketsTotalWeight-=n.metric.weight);for(const[e]of r)this._buckets.delete(e);this._captureMetrics(r)}_captureMetrics(e){if(e.size>0){const t=Array.from(e).map((([,e])=>e));r.captureAggregateMetrics(this._client,t)}}},wO}function DO(){if(MO)return AO;MO=1,Object.defineProperty(AO,"__esModule",{value:!0});const e=kO(),t=vO();const n={increment:function(n,r=1,o){t.metrics.increment(e.MetricsAggregator,n,r,o)},distribution:function(n,r,o){t.metrics.distribution(e.MetricsAggregator,n,r,o)},set:function(n,r,o){t.metrics.set(e.MetricsAggregator,n,r,o)},gauge:function(n,r,o){t.metrics.gauge(e.MetricsAggregator,n,r,o)},timing:function(n,r,o="second",i){return t.metrics.timing(e.MetricsAggregator,n,r,o,i)},getMetricsAggregatorForClient:function(n){return t.metrics.getMetricsAggregatorForClient(n,e.MetricsAggregator)}};return AO.metricsDefault=n,AO}var jO,BO={};function VO(){if(jO)return BO;jO=1,Object.defineProperty(BO,"__esModule",{value:!0});const e=kv(),t=Nb(),n=yO(),r=PO(),o=UO(),i=IO();return BO.BrowserMetricsAggregator=class{constructor(e){this._client=e,this._buckets=new Map,this._interval=setInterval((()=>this.flush()),n.DEFAULT_BROWSER_FLUSH_INTERVAL)}add(r,a,s,c="none",u={},l=e.timestampInSeconds()){const p=Math.floor(l),d=i.sanitizeMetricKey(a),f=i.sanitizeTags(u),h=i.sanitizeUnit(c),m=i.getBucketKey(r,d,h,f);let g=this._buckets.get(m);const _=g&&r===n.SET_METRIC_TYPE?g.metric.weight:0;g?(g.metric.add(s),g.timestamp<p&&(g.timestamp=p)):(g={metric:new o.METRIC_MAP[r](s),timestamp:p,metricType:r,name:d,unit:h,tags:f},this._buckets.set(m,g));const y="string"==typeof s?g.metric.weight-_:s;t.updateMetricSummaryOnActiveSpan(r,d,y,h,u,m)}flush(){if(0===this._buckets.size)return;const e=Array.from(this._buckets.values());r.captureAggregateMetrics(this._client,e),this._buckets.clear()}close(){clearInterval(this._interval),this.flush()}},BO}var FO,GO={};function HO(){if(FO)return GO;FO=1,Object.defineProperty(GO,"__esModule",{value:!0});const e=gb(),t=Rv(),n=RT(),r=wb(),o=Bb(),i=Nb(),a=Gb(),s=vb(),c=xE(),u=QS();function l(e,n,r){const o=u.getTraceData({span:r}),i=o["sentry-trace"],a=o.baggage;if(!i)return;const s=n.headers||(function(e){return"undefined"!=typeof Request&&t.isInstanceOf(e,Request)}(e)?e.headers:void 0);if(s){if(function(e){return"undefined"!=typeof Headers&&t.isInstanceOf(e,Headers)}(s)){const e=new Headers(s);if(e.set("sentry-trace",i),a){const t=e.get("baggage");if(t){const n=p(t);e.set("baggage",n?`${n},${a}`:a)}else e.set("baggage",a)}return e}if(Array.isArray(s)){const e=[...s.filter((e=>!(Array.isArray(e)&&"sentry-trace"===e[0]))).map((e=>{if(Array.isArray(e)&&"baggage"===e[0]&&"string"==typeof e[1]){const[t,n,...r]=e;return[t,p(n),...r]}return e})),["sentry-trace",i]];return a&&e.push(["baggage",a]),e}{const e="baggage"in s?s.baggage:void 0;let t=[];return Array.isArray(e)?t=e.map((e=>"string"==typeof e?p(e):e)).filter((e=>""===e)):e&&t.push(p(e)),a&&t.push(a),{...s,"sentry-trace":i,baggage:t.length>0?t.join(","):void 0}}}return{...o}}function p(e){return e.split(",").filter((e=>!e.split("=")[0].startsWith(r.SENTRY_BAGGAGE_KEY_PREFIX))).join(",")}return GO.addTracingHeadersToFetchRequest=function(e,t,n,r,o){return l(e,r,o)},GO.instrumentFetchRequest=function(t,r,u,p,d="auto.http.browser"){if(!t.fetchData)return;const f=o.hasTracingEnabled()&&r(t.fetchData.url);if(t.endTimestamp&&f){const e=t.fetchData.__span;if(!e)return;const n=p[e];return void(n&&(!function(e,t){if(t.response){s.setHttpStatus(e,t.response.status);const n=t.response&&t.response.headers&&t.response.headers.get("content-length");if(n){const t=parseInt(n);t>0&&e.setAttribute("http.response_content_length",t)}}else t.error&&e.setStatus({code:s.SPAN_STATUS_ERROR,message:"internal_error"});e.end()}(n,t),delete p[e]))}const{method:h,url:m}=t.fetchData,g=function(e){try{return new URL(e).href}catch(e){return}}(m),_=g?n.parseUrl(g).host:void 0,y=!!i.getActiveSpan(),v=f&&y?c.startInactiveSpan({name:`${h} ${m}`,attributes:{url:m,type:"fetch","http.method":h,"http.url":g,"server.address":_,[e.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]:d,[e.SEMANTIC_ATTRIBUTE_SENTRY_OP]:"http.client"}}):new a.SentryNonRecordingSpan;if(t.fetchData.__span=v.spanContext().spanId,p[v.spanContext().spanId]=v,u(t.fetchData.url)){const e=t.args[0],n=t.args[1]||{},r=l(e,n,o.hasTracingEnabled()&&y?v:void 0);r&&(t.args[1]=n,n.headers=r)}return v},GO}var YO,qO={};function zO(){if(YO)return qO;YO=1,Object.defineProperty(qO,"__esModule",{value:!0});const e=lb(),t=KE(),n=gb(),r=EE(),o=xE(),i={mechanism:{handled:!1,data:{function:"trpcMiddleware"}}};return qO.trpcMiddleware=function(a={}){return async function(s){const{path:c,type:u,next:l,rawInput:p,getRawInput:d}=s,f=e.getClient(),h=f&&f.getOptions(),m={procedure_path:c,procedure_type:u};if((void 0!==a.attachRpcInput?a.attachRpcInput:h&&h.sendDefaultPii)&&(void 0!==p&&(m.input=r.normalize(p)),void 0!==d&&"function"==typeof d))try{const e=await d();m.input=r.normalize(e)}catch(e){}return e.withScope((e=>(e.setContext("trpc",m),o.startSpanManual({name:`trpc/${c}`,op:"rpc.server",attributes:{[n.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]:"route",[n.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]:"auto.rpc.trpc"}},(async e=>{try{const n=await l();return function(e){"object"==typeof e&&null!==e&&"ok"in e&&!e.ok&&"error"in e&&t.captureException(e.error,i)}(n),e.end(),n}catch(n){throw t.captureException(n,i),e.end(),n}})))))}},qO}var KO,WO={};function QO(){if(KO)return WO;KO=1,Object.defineProperty(WO,"__esModule",{value:!0});const e=lb(),t=Mv();return WO.captureFeedback=function(n,r={},o=e.getCurrentScope()){const{message:i,name:a,email:s,url:c,source:u,associatedEventId:l,tags:p}=n,d={contexts:{feedback:t.dropUndefinedKeys({contact_email:s,name:a,message:i,url:c,source:u,associated_event_id:l})},type:"feedback",level:"info",tags:p},f=o&&o.getClient()||e.getClient();return f&&f.emit("beforeSendFeedback",d,r),o.captureEvent(d,r)},WO}var JO,$O={};function XO(){if(JO)return $O;JO=1,Object.defineProperty($O,"__esModule",{value:!0});const e=tT(),t=lb(),n=KE();function r(){return{bindClient(e){t.getCurrentScope().setClient(e)},withScope:t.withScope,getClient:()=>t.getClient(),getScope:t.getCurrentScope,getIsolationScope:t.getIsolationScope,captureException:(e,n)=>t.getCurrentScope().captureException(e,n),captureMessage:(e,n,r)=>t.getCurrentScope().captureMessage(e,n,r),captureEvent:n.captureEvent,addBreadcrumb:e.addBreadcrumb,setUser:n.setUser,setTags:n.setTags,setTag:n.setTag,setExtra:n.setExtra,setExtras:n.setExtras,setContext:n.setContext,getIntegration(e){const n=t.getClient();return n&&n.getIntegrationByName(e.id)||null},startSession:n.startSession,endSession:n.endSession,captureSession(e){if(e)return n.endSession();!function(){const e=t.getCurrentScope(),n=t.getClient(),r=e.getSession();n&&r&&n.captureSession(r)}()}}}const o=r;return $O.getCurrentHub=o,$O.getCurrentHubShim=r,$O}var ZO,eA={};function tA(){if(ZO)return eA;return ZO=1,Object.defineProperty(eA,"__esModule",{value:!0}),eA.flatten=function(e){const t=[],n=e=>{e.forEach((e=>{Array.isArray(e)?n(e):t.push(e)}))};return n(e),t},eA}var nA,rA={};function oA(){if(nA)return rA;return nA=1,Object.defineProperty(rA,"__esModule",{value:!0}),rA.getBreadcrumbLogLevelFromHttpStatusCode=function(e){return void 0===e?void 0:e>=400&&e<500?"warning":e>=500?"error":void 0},rA}var iA,aA,sA={},cA={};function uA(){if(iA)return cA;iA=1,Object.defineProperty(cA,"__esModule",{value:!0});const e=Zy(),t=nv(),n=Qy().GLOBAL_OBJ;function r(){if(!("fetch"in n))return!1;try{return new Headers,new Request("http://www.example.com"),new Response,!0}catch(e){return!1}}function o(e){return e&&/^function\s+\w+\(\)\s+\{\s+\[native code\]\s+\}$/.test(e.toString())}return cA.isNativeFunction=o,cA.supportsDOMError=function(){try{return new DOMError(""),!0}catch(e){return!1}},cA.supportsDOMException=function(){try{return new DOMException(""),!0}catch(e){return!1}},cA.supportsErrorEvent=function(){try{return new ErrorEvent(""),!0}catch(e){return!1}},cA.supportsFetch=r,cA.supportsNativeFetch=function(){if("string"==typeof EdgeRuntime)return!0;if(!r())return!1;if(o(n.fetch))return!0;let i=!1;const a=n.document;if(a&&"function"==typeof a.createElement)try{const e=a.createElement("iframe");e.hidden=!0,a.head.appendChild(e),e.contentWindow&&e.contentWindow.fetch&&(i=o(e.contentWindow.fetch)),a.head.removeChild(e)}catch(n){e.DEBUG_BUILD&&t.logger.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",n)}return i},cA.supportsReferrerPolicy=function(){if(!r())return!1;try{return new Request("_",{referrerPolicy:"origin"}),!0}catch(e){return!1}},cA.supportsReportingObserver=function(){return"ReportingObserver"in n},cA}function lA(){if(aA)return sA;aA=1,Object.defineProperty(sA,"__esModule",{value:!0});const e=Rv(),t=Mv(),n=uA(),r=kv(),o=Qy(),i=cv();function a(a,s=!1){s&&!n.supportsNativeFetch()||t.fill(o.GLOBAL_OBJ,"fetch",(function(n){return function(...s){const c=new Error,{method:u,url:p}=l(s),d={args:s,fetchData:{method:u,url:p},startTimestamp:1e3*r.timestampInSeconds(),virtualError:c};return a||i.triggerHandlers("fetch",{...d}),n.apply(o.GLOBAL_OBJ,s).then((async e=>(a?a(e):i.triggerHandlers("fetch",{...d,endTimestamp:1e3*r.timestampInSeconds(),response:e}),e)),(n=>{throw i.triggerHandlers("fetch",{...d,endTimestamp:1e3*r.timestampInSeconds(),error:n}),e.isError(n)&&void 0===n.stack&&(n.stack=c.stack,t.addNonEnumerableProperty(n,"framesToPop",1)),n}))}}))}function s(e){let t;try{t=e.clone()}catch(e){return}!async function(e,t){if(e&&e.body){const n=e.body,r=n.getReader(),o=setTimeout((()=>{n.cancel().then(null,(()=>{}))}),9e4);let i=!0;for(;i;){let e;try{e=setTimeout((()=>{n.cancel().then(null,(()=>{}))}),5e3);const{done:o}=await r.read();clearTimeout(e),o&&(t(),i=!1)}catch(e){i=!1}finally{clearTimeout(e)}}clearTimeout(o),r.releaseLock(),n.cancel().then(null,(()=>{}))}}(t,(()=>{i.triggerHandlers("fetch-body-resolved",{endTimestamp:1e3*r.timestampInSeconds(),response:e})}))}function c(e,t){return!!e&&"object"==typeof e&&!!e[t]}function u(e){return"string"==typeof e?e:e?c(e,"url")?e.url:e.toString?e.toString():"":""}function l(e){if(0===e.length)return{method:"GET",url:""};if(2===e.length){const[t,n]=e;return{url:u(t),method:c(n,"method")?String(n.method).toUpperCase():"GET"}}const t=e[0];return{url:u(t),method:c(t,"method")?String(t.method).toUpperCase():"GET"}}return sA.addFetchEndInstrumentationHandler=function(e){const t="fetch-body-resolved";i.addHandler(t,e),i.maybeInstrument(t,(()=>a(s)))},sA.addFetchInstrumentationHandler=function(e,t){const n="fetch";i.addHandler(n,e),i.maybeInstrument(n,(()=>a(void 0,t)))},sA.parseFetchArgs=l,sA}var pA,dA,fA,hA={},mA={exports:{}},gA={};function _A(){if(pA)return gA;return pA=1,Object.defineProperty(gA,"__esModule",{value:!0}),gA.getSDKSource=function(){return"npm"},gA.isBrowserBundle=function(){return"undefined"!=typeof __SENTRY_BROWSER_BUNDLE__&&!!__SENTRY_BROWSER_BUNDLE__},gA}function yA(){return dA||(dA=1,function(e,t){Object.defineProperty(t,"__esModule",{value:!0});const n=_A();function r(e,t){return e.require(t)}t.dynamicRequire=r,t.isNodeEnv=function(){return!n.isBrowserBundle()&&"[object process]"===Object.prototype.toString.call("undefined"!=typeof process?process:0)},t.loadModule=function(t,n=e){let o;try{o=r(n,t)}catch(e){}if(!o)try{const{cwd:e}=r(n,"process");o=r(n,`${e()}/node_modules/${t}`)}catch(e){}return o}}(mA,mA.exports)),mA.exports}function vA(){if(fA)return hA;fA=1,Object.defineProperty(hA,"__esModule",{value:!0});const e=yA(),t=Qy();return hA.isBrowser=function(){return"undefined"!=typeof window&&(!e.isNodeEnv()||function(){const e=t.GLOBAL_OBJ.process;return!!e&&"renderer"===e.type}())},hA}var bA,EA={};function SA(){if(bA)return EA;bA=1,Object.defineProperty(EA,"__esModule",{value:!0});const e=sv();function t(e,t=!1){return!(t||e&&!e.startsWith("/")&&!e.match(/^[A-Z]:/)&&!e.startsWith(".")&&!e.match(/^[a-zA-Z]([a-zA-Z0-9.\-+])*:\/\//))&&void 0!==e&&!e.includes("node_modules/")}function n(n){const o=/^\s*[-]{4,}$/,i=/at (?:async )?(?:(.+?)\s+\()?(?:(.+):(\d+):(\d+)?|([^)]+))\)?/;return a=>{const s=a.match(i);if(s){let o,i,a,c,u;if(s[1]){a=s[1];let e=a.lastIndexOf(".");if("."===a[e-1]&&e--,e>0){o=a.slice(0,e),i=a.slice(e+1);const t=o.indexOf(".Module");t>0&&(a=a.slice(t+1),o=o.slice(0,t))}c=void 0}i&&(c=o,u=i),"<anonymous>"===i&&(u=void 0,a=void 0),void 0===a&&(u=u||e.UNKNOWN_FUNCTION,a=c?`${c}.${u}`:u);let l=s[2]&&s[2].startsWith("file://")?s[2].slice(7):s[2];const p="native"===s[5];return l&&l.match(/\/[A-Z]:/)&&(l=l.slice(1)),l||!s[5]||p||(l=s[5]),{filename:l?decodeURI(l):void 0,module:n?n(l):void 0,function:a,lineno:r(s[3]),colno:r(s[4]),in_app:t(l||"",p)}}if(a.match(o))return{filename:a}}}function r(e){return parseInt(e||"",10)||void 0}return EA.filenameIsInApp=t,EA.node=n,EA.nodeStackLineParser=function(e){return[90,n(e)]},EA}var TA,OA={};function AA(){if(TA)return OA;return TA=1,Object.defineProperty(OA,"__esModule",{value:!0}),OA.makeFifoCache=function(e){let t=[],n={};return{add(r,o){for(;t.length>=e;){const e=t.shift();void 0!==e&&delete n[e]}n[r]&&this.delete(r),t.push(r),n[r]=o},clear(){n={},t=[]},get:e=>n[e],size:()=>t.length,delete(e){if(!n[e])return!1;delete n[e];for(let n=0;n<t.length;n++)if(t[n]===e){t.splice(n,1);break}return!0}}},OA}var wA,RA={};function NA(){if(wA)return RA;wA=1,Object.defineProperty(RA,"__esModule",{value:!0});const e=SA(),t=Mv(),n=sv();return RA.callFrameToStackFrame=function(r,o,i){const a=o?o.replace(/^file:\/\//,""):void 0,s=r.location.columnNumber?r.location.columnNumber+1:void 0,c=r.location.lineNumber?r.location.lineNumber+1:void 0;return t.dropUndefinedKeys({filename:a,module:i(a),function:r.functionName||n.UNKNOWN_FUNCTION,colno:s,lineno:c,in_app:a?e.filenameIsInApp(a):void 0})},RA.watchdogTimer=function(e,t,n,r){const o=e();let i=!1,a=!0;return setInterval((()=>{const e=o.getTimeMs();!1===i&&e>t+n&&(i=!0,a&&r()),e<t+n&&(i=!1)}),20),{poll:()=>{o.reset()},enabled:e=>{a=e}}},RA}var IA,PA={};function xA(){if(IA)return PA;IA=1,Object.defineProperty(PA,"__esModule",{value:!0});return PA.LRUMap=class{constructor(e){this._maxSize=e,this._cache=new Map}get size(){return this._cache.size}get(e){const t=this._cache.get(e);if(void 0!==t)return this._cache.delete(e),this._cache.set(e,t),t}set(e,t){this._cache.size>=this._maxSize&&this._cache.delete(this._cache.keys().next().value),this._cache.set(e,t)}remove(e){const t=this._cache.get(e);return t&&this._cache.delete(e),t}clear(){this._cache.clear()}keys(){return Array.from(this._cache.keys())}values(){const e=[];return this._cache.forEach((t=>e.push(t))),e}},PA}var CA,MA={};function LA(){if(CA)return MA;CA=1,Object.defineProperty(MA,"__esModule",{value:!0});const e=Qy();return MA.vercelWaitUntil=function(t){const n=e.GLOBAL_OBJ[Symbol.for("@vercel/request-context")],r=n&&n.get&&n.get()?n.get():{};r&&r.waitUntil&&r.waitUntil(t)},MA}var UA,kA={};function DA(){if(UA)return kA;return UA=1,Object.defineProperty(kA,"__esModule",{value:!0}),kA.escapeStringForRegex=function(e){return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")},kA}var jA,BA={};function VA(){if(jA)return BA;jA=1,Object.defineProperty(BA,"__esModule",{value:!0});const e=Qy().GLOBAL_OBJ;return BA.supportsHistory=function(){const t=e.chrome,n=t&&t.app&&t.app.runtime,r="history"in e&&!!e.history.pushState&&!!e.history.replaceState;return!n&&r},BA}var FA,GA,HA={},YA={};function qA(){if(FA)return YA;return FA=1,Object.defineProperty(YA,"__esModule",{value:!0}),YA._nullishCoalesce=function(e,t){return null!=e?e:t()},YA}function zA(){if(GA)return HA;GA=1,Object.defineProperty(HA,"__esModule",{value:!0});const e=qA();return HA._asyncNullishCoalesce=async function(t,n){return e._nullishCoalesce(t,n)},HA}var KA,WA={};function QA(){if(KA)return WA;return KA=1,Object.defineProperty(WA,"__esModule",{value:!0}),WA._asyncOptionalChain=async function(e){let t,n=e[0],r=1;for(;r<e.length;){const o=e[r],i=e[r+1];if(r+=2,("optionalAccess"===o||"optionalCall"===o)&&null==n)return;"access"===o||"optionalAccess"===o?(t=n,n=await i(n)):"call"!==o&&"optionalCall"!==o||(n=await i(((...e)=>n.call(t,...e))),t=void 0)}return n},WA}var JA,$A={};function XA(){if(JA)return $A;JA=1,Object.defineProperty($A,"__esModule",{value:!0});const e=QA();return $A._asyncOptionalChainDelete=async function(t){const n=await e._asyncOptionalChain(t);return null==n||n},$A}var ZA,ew={};function tw(){if(ZA)return ew;return ZA=1,Object.defineProperty(ew,"__esModule",{value:!0}),ew._optionalChain=function(e){let t,n=e[0],r=1;for(;r<e.length;){const o=e[r],i=e[r+1];if(r+=2,("optionalAccess"===o||"optionalCall"===o)&&null==n)return;"access"===o||"optionalAccess"===o?(t=n,n=i(n)):"call"!==o&&"optionalCall"!==o||(n=i(((...e)=>n.call(t,...e))),t=void 0)}return n},ew}var nw,rw,ow={};function iw(){if(nw)return ow;nw=1,Object.defineProperty(ow,"__esModule",{value:!0});const e=tw();return ow._optionalChainDelete=function(t){const n=e._optionalChain(t);return null==n||n},ow}function aw(){return rw||(rw=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=Ib(),n=Cb(),r=Ub(),o=CE(),i=PE(),a=Gb(),s=vb(),c=xE(),u=Xb(),l=IE(),p=sE(),d=tE(),f=gb(),h=TE(),m=KE(),g=lb(),_=ib(),y=sb(),v=_v(),b=Yv(),E=JE(),S=ob(),T=DE(),O=ZE(),A=lS(),w=vS(),R=SS(),N=xS(),I=LS(),P=DS(),x=rS(),C=qE(),M=zE(),L=hS(),U=Bb(),k=VS(),D=zb(),j=HS(),B=Nb(),V=aE(),F=zS(),G=QS(),H=XS(),Y=$b(),q=tT(),z=oT(),K=sT(),W=fT(),Q=vT(),J=LT(),$=HT(),X=zT(),Z=QT(),ee=XT(),te=oO(),ne=sO(),re=lO(),oe=fO(),ie=vO(),ae=SO(),se=DO(),ce=VO(),ue=fb(),le=HO(),pe=zO(),de=QO(),fe=XO(),he=dT(),me=tA(),ge=oA(),_e=Nv(),ye=dE(),ve=uS(),be=Qy(),Ee=jT(),Se=lA(),Te=uv(),Oe=dv(),Ae=cv(),we=Rv(),Re=vA(),Ne=nv(),Ie=bE(),Pe=Bv(),xe=yA(),Ce=EE(),Me=Mv(),Le=rO(),Ue=wS(),ke=MT(),De=GT(),je=sv(),Be=SA(),Ve=Cv(),Fe=uA(),Ge=Hv(),He=kv(),Ye=Rb(),qe=_A(),ze=SE(),Ke=requireClientreport(),We=PS(),Qe=wb(),Je=RT(),$e=AA(),Xe=yS(),Ze=NA(),et=xA(),tt=Kv(),nt=LA(),rt=Wy(),ot=VE(),it=DA(),at=VA(),st=zA(),ct=QA(),ut=XA(),lt=qA(),pt=tw(),dt=iw();e.registerSpanErrorInstrumentation=t.registerSpanErrorInstrumentation,e.getCapturedScopesOnSpan=n.getCapturedScopesOnSpan,e.setCapturedScopesOnSpan=n.setCapturedScopesOnSpan,e.addTracingExtensions=r.addTracingExtensions,e.TRACING_DEFAULTS=o.TRACING_DEFAULTS,e.startIdleSpan=o.startIdleSpan,e.SentrySpan=i.SentrySpan,e.SentryNonRecordingSpan=a.SentryNonRecordingSpan,e.SPAN_STATUS_ERROR=s.SPAN_STATUS_ERROR,e.SPAN_STATUS_OK=s.SPAN_STATUS_OK,e.SPAN_STATUS_UNSET=s.SPAN_STATUS_UNSET,e.getSpanStatusFromHttpCode=s.getSpanStatusFromHttpCode,e.setHttpStatus=s.setHttpStatus,e.continueTrace=c.continueTrace,e.startInactiveSpan=c.startInactiveSpan,e.startNewTrace=c.startNewTrace,e.startSpan=c.startSpan,e.startSpanManual=c.startSpanManual,e.suppressTracing=c.suppressTracing,e.withActiveSpan=c.withActiveSpan,e.getDynamicSamplingContextFromClient=u.getDynamicSamplingContextFromClient,e.getDynamicSamplingContextFromScope=u.getDynamicSamplingContextFromScope,e.getDynamicSamplingContextFromSpan=u.getDynamicSamplingContextFromSpan,e.spanToBaggageHeader=u.spanToBaggageHeader,e.setMeasurement=l.setMeasurement,e.timedEventsToMeasurements=l.timedEventsToMeasurements,e.sampleSpan=p.sampleSpan,e.logSpanEnd=d.logSpanEnd,e.logSpanStart=d.logSpanStart,e.SEMANTIC_ATTRIBUTE_CACHE_HIT=f.SEMANTIC_ATTRIBUTE_CACHE_HIT,e.SEMANTIC_ATTRIBUTE_CACHE_ITEM_SIZE=f.SEMANTIC_ATTRIBUTE_CACHE_ITEM_SIZE,e.SEMANTIC_ATTRIBUTE_CACHE_KEY=f.SEMANTIC_ATTRIBUTE_CACHE_KEY,e.SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME=f.SEMANTIC_ATTRIBUTE_EXCLUSIVE_TIME,e.SEMANTIC_ATTRIBUTE_HTTP_REQUEST_METHOD=f.SEMANTIC_ATTRIBUTE_HTTP_REQUEST_METHOD,e.SEMANTIC_ATTRIBUTE_PROFILE_ID=f.SEMANTIC_ATTRIBUTE_PROFILE_ID,e.SEMANTIC_ATTRIBUTE_SENTRY_CUSTOM_SPAN_NAME=f.SEMANTIC_ATTRIBUTE_SENTRY_CUSTOM_SPAN_NAME,e.SEMANTIC_ATTRIBUTE_SENTRY_IDLE_SPAN_FINISH_REASON=f.SEMANTIC_ATTRIBUTE_SENTRY_IDLE_SPAN_FINISH_REASON,e.SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT=f.SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_UNIT,e.SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE=f.SEMANTIC_ATTRIBUTE_SENTRY_MEASUREMENT_VALUE,e.SEMANTIC_ATTRIBUTE_SENTRY_OP=f.SEMANTIC_ATTRIBUTE_SENTRY_OP,e.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN=f.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,e.SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE=f.SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE,e.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE=f.SEMANTIC_ATTRIBUTE_SENTRY_SOURCE,e.SEMANTIC_ATTRIBUTE_URL_FULL=f.SEMANTIC_ATTRIBUTE_URL_FULL,e.createEventEnvelope=h.createEventEnvelope,e.createSessionEnvelope=h.createSessionEnvelope,e.createSpanEnvelope=h.createSpanEnvelope,e.addEventProcessor=m.addEventProcessor,e.captureCheckIn=m.captureCheckIn,e.captureEvent=m.captureEvent,e.captureException=m.captureException,e.captureMessage=m.captureMessage,e.captureSession=m.captureSession,e.close=m.close,e.endSession=m.endSession,e.flush=m.flush,e.isEnabled=m.isEnabled,e.isInitialized=m.isInitialized,e.lastEventId=m.lastEventId,e.setContext=m.setContext,e.setExtra=m.setExtra,e.setExtras=m.setExtras,e.setTag=m.setTag,e.setTags=m.setTags,e.setUser=m.setUser,e.startSession=m.startSession,e.withMonitor=m.withMonitor,e.getClient=g.getClient,e.getCurrentScope=g.getCurrentScope,e.getGlobalScope=g.getGlobalScope,e.getIsolationScope=g.getIsolationScope,e.getTraceContextFromScope=g.getTraceContextFromScope,e.withIsolationScope=g.withIsolationScope,e.withScope=g.withScope,e.getDefaultCurrentScope=_.getDefaultCurrentScope,e.getDefaultIsolationScope=_.getDefaultIsolationScope,e.setAsyncContextStrategy=y.setAsyncContextStrategy,e.getMainCarrier=v.getMainCarrier,e.closeSession=b.closeSession,e.makeSession=b.makeSession,e.updateSession=b.updateSession,e.SessionFlusher=E.SessionFlusher,e.Scope=S.Scope,e.notifyEventProcessors=T.notifyEventProcessors,e.getEnvelopeEndpointWithUrlEncodedAuth=O.getEnvelopeEndpointWithUrlEncodedAuth,e.getReportDialogEndpoint=O.getReportDialogEndpoint,e.BaseClient=A.BaseClient,e.ServerRuntimeClient=w.ServerRuntimeClient,e.initAndBind=R.initAndBind,e.setCurrentClient=R.setCurrentClient,e.createTransport=N.createTransport,e.makeOfflineTransport=I.makeOfflineTransport,e.makeMultiplexedTransport=P.makeMultiplexedTransport,e.addIntegration=x.addIntegration,e.defineIntegration=x.defineIntegration,e.getIntegrationsToSetup=x.getIntegrationsToSetup,e.applyScopeDataToEvent=C.applyScopeDataToEvent,e.mergeScopeData=C.mergeScopeData,e.prepareEvent=M.prepareEvent,e.createCheckInEnvelope=L.createCheckInEnvelope,e.hasTracingEnabled=U.hasTracingEnabled,e.isSentryRequestUrl=k.isSentryRequestUrl,e.handleCallbackErrors=D.handleCallbackErrors,e.parameterize=j.parameterize,e.addChildSpanToSpan=B.addChildSpanToSpan,e.getActiveSpan=B.getActiveSpan,e.getRootSpan=B.getRootSpan,e.getSpanDescendants=B.getSpanDescendants,e.getStatusMessage=B.getStatusMessage,e.spanIsSampled=B.spanIsSampled,e.spanTimeInputToSeconds=B.spanTimeInputToSeconds,e.spanToJSON=B.spanToJSON,e.spanToTraceContext=B.spanToTraceContext,e.spanToTraceHeader=B.spanToTraceHeader,e.updateSpanName=B.updateSpanName,e.parseSampleRate=V.parseSampleRate,e.applySdkMetadata=F.applySdkMetadata,e.getTraceData=G.getTraceData,e.getTraceMetaTags=H.getTraceMetaTags,e.DEFAULT_ENVIRONMENT=Y.DEFAULT_ENVIRONMENT,e.addBreadcrumb=q.addBreadcrumb,e.functionToStringIntegration=z.functionToStringIntegration,e.inboundFiltersIntegration=K.inboundFiltersIntegration,e.linkedErrorsIntegration=W.linkedErrorsIntegration,e.moduleMetadataIntegration=Q.moduleMetadataIntegration,e.requestDataIntegration=J.requestDataIntegration,e.captureConsoleIntegration=$.captureConsoleIntegration,e.debugIntegration=X.debugIntegration,e.dedupeIntegration=Z.dedupeIntegration,e.extraErrorDataIntegration=ee.extraErrorDataIntegration,e.rewriteFramesIntegration=te.rewriteFramesIntegration,e.sessionTimingIntegration=ne.sessionTimingIntegration,e.zodErrorsIntegration=re.zodErrorsIntegration,e.thirdPartyErrorFilterIntegration=oe.thirdPartyErrorFilterIntegration,e.metrics=ie.metrics,e.profiler=ae.profiler,e.metricsDefault=se.metricsDefault,e.BrowserMetricsAggregator=ce.BrowserMetricsAggregator,e.getMetricSummaryJsonForSpan=ue.getMetricSummaryJsonForSpan,e.addTracingHeadersToFetchRequest=le.addTracingHeadersToFetchRequest,e.instrumentFetchRequest=le.instrumentFetchRequest,e.trpcMiddleware=pe.trpcMiddleware,e.captureFeedback=de.captureFeedback,e.getCurrentHub=fe.getCurrentHub,e.getCurrentHubShim=fe.getCurrentHubShim,e.applyAggregateErrorsToEvent=he.applyAggregateErrorsToEvent,e.flatten=me.flatten,e.getBreadcrumbLogLevelFromHttpStatusCode=ge.getBreadcrumbLogLevelFromHttpStatusCode,e.getComponentName=_e.getComponentName,e.getDomElement=_e.getDomElement,e.getLocationHref=_e.getLocationHref,e.htmlTreeAsString=_e.htmlTreeAsString,e.dsnFromString=ye.dsnFromString,e.dsnToString=ye.dsnToString,e.makeDsn=ye.makeDsn,e.SentryError=ve.SentryError,e.GLOBAL_OBJ=be.GLOBAL_OBJ,e.getGlobalSingleton=be.getGlobalSingleton,e.addConsoleInstrumentationHandler=Ee.addConsoleInstrumentationHandler,e.addFetchEndInstrumentationHandler=Se.addFetchEndInstrumentationHandler,e.addFetchInstrumentationHandler=Se.addFetchInstrumentationHandler,e.addGlobalErrorInstrumentationHandler=Te.addGlobalErrorInstrumentationHandler,e.addGlobalUnhandledRejectionInstrumentationHandler=Oe.addGlobalUnhandledRejectionInstrumentationHandler,e.addHandler=Ae.addHandler,e.maybeInstrument=Ae.maybeInstrument,e.resetInstrumentationHandlers=Ae.resetInstrumentationHandlers,e.triggerHandlers=Ae.triggerHandlers,e.isDOMError=we.isDOMError,e.isDOMException=we.isDOMException,e.isElement=we.isElement,e.isError=we.isError,e.isErrorEvent=we.isErrorEvent,e.isEvent=we.isEvent,e.isInstanceOf=we.isInstanceOf,e.isParameterizedString=we.isParameterizedString,e.isPlainObject=we.isPlainObject,e.isPrimitive=we.isPrimitive,e.isRegExp=we.isRegExp,e.isString=we.isString,e.isSyntheticEvent=we.isSyntheticEvent,e.isThenable=we.isThenable,e.isVueViewModel=we.isVueViewModel,e.isBrowser=Re.isBrowser,e.CONSOLE_LEVELS=Ne.CONSOLE_LEVELS,e.consoleSandbox=Ne.consoleSandbox,e.logger=Ne.logger,e.originalConsoleMethods=Ne.originalConsoleMethods,e.memoBuilder=Ie.memoBuilder,e.addContextToFrame=Pe.addContextToFrame,e.addExceptionMechanism=Pe.addExceptionMechanism,e.addExceptionTypeValue=Pe.addExceptionTypeValue,e.arrayify=Pe.arrayify,e.checkOrSetAlreadyCaught=Pe.checkOrSetAlreadyCaught,e.getEventDescription=Pe.getEventDescription,e.parseSemver=Pe.parseSemver,e.uuid4=Pe.uuid4,e.dynamicRequire=xe.dynamicRequire,e.isNodeEnv=xe.isNodeEnv,e.loadModule=xe.loadModule,e.normalize=Ce.normalize,e.normalizeToSize=Ce.normalizeToSize,e.normalizeUrlToBase=Ce.normalizeUrlToBase,e.addNonEnumerableProperty=Me.addNonEnumerableProperty,e.convertToPlainObject=Me.convertToPlainObject,e.dropUndefinedKeys=Me.dropUndefinedKeys,e.extractExceptionKeysForMessage=Me.extractExceptionKeysForMessage,e.fill=Me.fill,e.getOriginalFunction=Me.getOriginalFunction,e.markFunctionWrapped=Me.markFunctionWrapped,e.objectify=Me.objectify,e.urlEncode=Me.urlEncode,e.basename=Le.basename,e.dirname=Le.dirname,e.isAbsolute=Le.isAbsolute,e.join=Le.join,e.normalizePath=Le.normalizePath,e.relative=Le.relative,e.resolve=Le.resolve,e.makePromiseBuffer=Ue.makePromiseBuffer,e.DEFAULT_USER_INCLUDES=ke.DEFAULT_USER_INCLUDES,e.addNormalizedRequestDataToEvent=ke.addNormalizedRequestDataToEvent,e.addRequestDataToEvent=ke.addRequestDataToEvent,e.extractPathForTransaction=ke.extractPathForTransaction,e.extractQueryParamsFromUrl=ke.extractQueryParamsFromUrl,e.extractRequestData=ke.extractRequestData,e.headersToDict=ke.headersToDict,e.httpRequestToRequestData=ke.httpRequestToRequestData,e.winterCGHeadersToDict=ke.winterCGHeadersToDict,e.winterCGRequestToRequestData=ke.winterCGRequestToRequestData,e.severityLevelFromString=De.severityLevelFromString,e.validSeverityLevels=De.validSeverityLevels,e.UNKNOWN_FUNCTION=je.UNKNOWN_FUNCTION,e.createStackParser=je.createStackParser,e.getFramesFromEvent=je.getFramesFromEvent,e.getFunctionName=je.getFunctionName,e.stackParserFromStackParserOptions=je.stackParserFromStackParserOptions,e.stripSentryFramesAndReverse=je.stripSentryFramesAndReverse,e.filenameIsInApp=Be.filenameIsInApp,e.node=Be.node,e.nodeStackLineParser=Be.nodeStackLineParser,e.isMatchingPattern=Ve.isMatchingPattern,e.safeJoin=Ve.safeJoin,e.snipLine=Ve.snipLine,e.stringMatchesSomePattern=Ve.stringMatchesSomePattern,e.truncate=Ve.truncate,e.isNativeFunction=Fe.isNativeFunction,e.supportsDOMError=Fe.supportsDOMError,e.supportsDOMException=Fe.supportsDOMException,e.supportsErrorEvent=Fe.supportsErrorEvent,e.supportsFetch=Fe.supportsFetch,e.supportsNativeFetch=Fe.supportsNativeFetch,e.supportsReferrerPolicy=Fe.supportsReferrerPolicy,e.supportsReportingObserver=Fe.supportsReportingObserver,e.SyncPromise=Ge.SyncPromise,e.rejectedSyncPromise=Ge.rejectedSyncPromise,e.resolvedSyncPromise=Ge.resolvedSyncPromise,Object.defineProperty(e,"_browserPerformanceTimeOriginMode",{enumerable:!0,get:()=>He._browserPerformanceTimeOriginMode}),e.browserPerformanceTimeOrigin=He.browserPerformanceTimeOrigin,e.dateTimestampInSeconds=He.dateTimestampInSeconds,e.timestampInSeconds=He.timestampInSeconds,e.TRACEPARENT_REGEXP=Ye.TRACEPARENT_REGEXP,e.extractTraceparentData=Ye.extractTraceparentData,e.generateSentryTraceHeader=Ye.generateSentryTraceHeader,e.propagationContextFromHeaders=Ye.propagationContextFromHeaders,e.getSDKSource=qe.getSDKSource,e.isBrowserBundle=qe.isBrowserBundle,e.addItemToEnvelope=ze.addItemToEnvelope,e.createAttachmentEnvelopeItem=ze.createAttachmentEnvelopeItem,e.createEnvelope=ze.createEnvelope,e.createEventEnvelopeHeaders=ze.createEventEnvelopeHeaders,e.createSpanEnvelopeItem=ze.createSpanEnvelopeItem,e.envelopeContainsItemType=ze.envelopeContainsItemType,e.envelopeItemTypeToDataCategory=ze.envelopeItemTypeToDataCategory,e.forEachEnvelopeItem=ze.forEachEnvelopeItem,e.getSdkMetadataForEnvelopeHeader=ze.getSdkMetadataForEnvelopeHeader,e.parseEnvelope=ze.parseEnvelope,e.serializeEnvelope=ze.serializeEnvelope,e.createClientReportEnvelope=Ke.createClientReportEnvelope,e.DEFAULT_RETRY_AFTER=We.DEFAULT_RETRY_AFTER,e.disabledUntil=We.disabledUntil,e.isRateLimited=We.isRateLimited,e.parseRetryAfterHeader=We.parseRetryAfterHeader,e.updateRateLimits=We.updateRateLimits,e.BAGGAGE_HEADER_NAME=Qe.BAGGAGE_HEADER_NAME,e.MAX_BAGGAGE_STRING_LENGTH=Qe.MAX_BAGGAGE_STRING_LENGTH,e.SENTRY_BAGGAGE_KEY_PREFIX=Qe.SENTRY_BAGGAGE_KEY_PREFIX,e.SENTRY_BAGGAGE_KEY_PREFIX_REGEX=Qe.SENTRY_BAGGAGE_KEY_PREFIX_REGEX,e.baggageHeaderToDynamicSamplingContext=Qe.baggageHeaderToDynamicSamplingContext,e.dynamicSamplingContextToSentryBaggageHeader=Qe.dynamicSamplingContextToSentryBaggageHeader,e.parseBaggageHeader=Qe.parseBaggageHeader,e.getNumberOfUrlSegments=Je.getNumberOfUrlSegments,e.getSanitizedUrlString=Je.getSanitizedUrlString,e.parseUrl=Je.parseUrl,e.stripUrlQueryAndFragment=Je.stripUrlQueryAndFragment,e.makeFifoCache=$e.makeFifoCache,e.eventFromMessage=Xe.eventFromMessage,e.eventFromUnknownInput=Xe.eventFromUnknownInput,e.exceptionFromError=Xe.exceptionFromError,e.parseStackFrames=Xe.parseStackFrames,e.callFrameToStackFrame=Ze.callFrameToStackFrame,e.watchdogTimer=Ze.watchdogTimer,e.LRUMap=et.LRUMap,e.generatePropagationContext=tt.generatePropagationContext,e.generateSpanId=tt.generateSpanId,e.generateTraceId=tt.generateTraceId,e.vercelWaitUntil=nt.vercelWaitUntil,e.SDK_VERSION=rt.SDK_VERSION,e.getDebugImagesForResources=ot.getDebugImagesForResources,e.getFilenameToDebugIdMap=ot.getFilenameToDebugIdMap,e.escapeStringForRegex=it.escapeStringForRegex,e.supportsHistory=at.supportsHistory,e._asyncNullishCoalesce=st._asyncNullishCoalesce,e._asyncOptionalChain=ct._asyncOptionalChain,e._asyncOptionalChainDelete=ut._asyncOptionalChainDelete,e._nullishCoalesce=lt._nullishCoalesce,e._optionalChain=pt._optionalChain,e._optionalChainDelete=dt._optionalChainDelete}(By)),By}var sw,cw={};var uw,lw={};function pw(){if(uw)return lw;uw=1,Object.defineProperty(lw,"__esModule",{value:!0}),lw.exceptionFromError=t,lw.eventFromException=function(t,n,r,o){const i=r&&r.syntheticException||void 0,a=s(t,n,i,o);(0,e.addExceptionMechanism)(a),a.level="error",r&&r.event_id&&(a.event_id=r.event_id);return(0,e.resolvedSyncPromise)(a)},lw.eventFromMessage=function(t,n,r="info",o,i){const a=o&&o.syntheticException||void 0,s=c(t,n,a,i);s.level=r,o&&o.event_id&&(s.event_id=o.event_id);return(0,e.resolvedSyncPromise)(s)},lw.eventFromUnknownInput=s;const e=aw();function t(e,t){const n=o(e,t),r={type:t&&t.name,value:a(t)};return n.length&&(r.stacktrace={frames:n}),void 0===r.type&&""===r.value&&(r.value="Unrecoverable error caught"),r}function n(n,r,i,a){const s=(0,e.getClient)(),c=s&&s.getOptions().normalizeDepth,l=function(e){for(const t in e)if(Object.prototype.hasOwnProperty.call(e,t)){const n=e[t];if(n instanceof Error)return n}return}(r),p={__serialized__:(0,e.normalizeToSize)(r,c)};if(l)return{exception:{values:[t(n,l)]},extra:p};const d={exception:{values:[{type:(0,e.isEvent)(r)?r.constructor.name:a?"UnhandledRejection":"Error",value:u(r,{isUnhandledRejection:a})}]},extra:p};if(i){const e=o(n,i);e.length&&(d.exception.values[0].stacktrace={frames:e})}return d}function r(e,n){return{exception:{values:[t(e,n)]}}}function o(e,t){const n=t.stacktrace||t.stack||"",r=function(e){if(e&&i.test(e.message))return 1;return 0}(t),o=function(e){if("number"==typeof e.framesToPop)return e.framesToPop;return 0}(t);try{return e(n,r,o)}catch{}return[]}const i=/Minified React error #\d+;/i;function a(e){const t=e&&e.message;return t?t.error&&"string"==typeof t.error.message?t.error.message:t:"No error message"}function s(t,o,i,a,s){let u;if((0,e.isErrorEvent)(o)&&o.error){return r(t,o.error)}if((0,e.isDOMError)(o)||(0,e.isDOMException)(o)){const n=o;if("stack"in o)u=r(t,o);else{const r=n.name||((0,e.isDOMError)(n)?"DOMError":"DOMException"),o=n.message?`${r}: ${n.message}`:r;u=c(t,o,i,a),(0,e.addExceptionTypeValue)(u,o)}return"code"in n&&(u.tags={...u.tags,"DOMException.code":`${n.code}`}),u}if((0,e.isError)(o))return r(t,o);if((0,e.isPlainObject)(o)||(0,e.isEvent)(o)){return u=n(t,o,i,s),(0,e.addExceptionMechanism)(u,{synthetic:!0}),u}return u=c(t,o,i,a),(0,e.addExceptionTypeValue)(u,`${o}`,void 0),(0,e.addExceptionMechanism)(u,{synthetic:!0}),u}function c(t,n,r,i){const a={};if(i&&r){const e=o(t,r);e.length&&(a.exception={values:[{value:n,stacktrace:{frames:e}}]})}if((0,e.isParameterizedString)(n)){const{__sentry_template_string__:e,__sentry_template_values__:t}=n;return a.logentry={message:e,params:t},a}return a.message=n,a}function u(t,{isUnhandledRejection:n}){const r=(0,e.extractExceptionKeysForMessage)(t),o=n?"promise rejection":"exception";if((0,e.isErrorEvent)(t))return`Event \`ErrorEvent\` captured as ${o} with message \`${t.message}\``;if((0,e.isEvent)(t)){return`Event \`${function(e){try{const t=Object.getPrototypeOf(e);return t?t.constructor.name:void 0}catch{return}}(t)}\` (type=${t.type}) captured as ${o}`}return`Object captured as ${o} with keys: ${r}`}return lw}var dw,fw,hw={},mw={};function gw(){if(dw)return mw;dw=1,Object.defineProperty(mw,"__esModule",{value:!0}),mw.WINDOW=void 0,mw.shouldIgnoreOnError=function(){return t>0},mw.ignoreNextOnError=n,mw.wrap=function t(r,o={},i){if("function"!=typeof r)return r;try{const t=r.__sentry_wrapped__;if(t)return t;if((0,e.getOriginalFunction)(r))return r}catch{return r}const a=function(){const a=Array.prototype.slice.call(arguments);try{i&&"function"==typeof i&&i.apply(this,arguments);const e=a.map((e=>t(e,o)));return r.apply(this,e)}catch(t){throw n(),(0,e.withScope)((n=>{n.addEventProcessor((t=>(o.mechanism&&((0,e.addExceptionTypeValue)(t,void 0,void 0),(0,e.addExceptionMechanism)(t,o.mechanism)),t.extra={...t.extra,arguments:a},t))),(0,e.captureException)(t)})),t}};try{for(const e in r)Object.prototype.hasOwnProperty.call(r,e)&&(a[e]=r[e])}catch{}(0,e.markFunctionWrapped)(a,r),(0,e.addNonEnumerableProperty)(r,"__sentry_wrapped__",a);try{Object.getOwnPropertyDescriptor(a,"name").configurable&&Object.defineProperty(a,"name",{get:()=>r.name})}catch{}return a};const e=aw();mw.WINDOW=e.GLOBAL_OBJ;let t=0;function n(){t++,setTimeout((()=>{t--}))}return mw}var _w,yw={};function vw(){if(_w)return yw;_w=1,Object.defineProperty(yw,"__esModule",{value:!0}),yw.contextLinesIntegration=void 0,yw.applySourceContextToFrame=n;const e=aw(),t=e.GLOBAL_OBJ;function n(t,n,r,o){return t.filename===r&&t.lineno&&n.length?((0,e.addContextToFrame)(n,t,o),t):t}return yw.contextLinesIntegration=(0,e.defineIntegration)(((r={})=>{const o=null!=r.frameContextLines?r.frameContextLines:7;return{name:"ContextLines",processEvent:r=>function(r,o){const i=t.document,a=t.location&&(0,e.stripUrlQueryAndFragment)(t.location.href);if(!i||!a)return r;const s=r.exception&&r.exception.values;if(!s||!s.length)return r;const c=i.documentElement.innerHTML;if(!c)return r;const u=["<!DOCTYPE html>","<html>",...c.split("\n"),"</html>"];return s.forEach((e=>{const t=e.stacktrace;t&&t.frames&&(t.frames=t.frames.map((e=>n(e,u,a,o))))})),r}(r,o)}})),yw}var bw,Ew={};var Sw,Tw={};function Ow(){return Sw||(Sw=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.imqaIntegration=e._imqaIntegration=void 0;const t=Wt,n=aw();e._imqaIntegration=()=>({name:"IMQA",processEvent(e){var n,r,o,i,a,s,c,u;const l=function(e){const n=[];e.message&&n.push(e.message);let r;try{r=e.exception.values[e.exception.values.length-1]}catch(e){t.diag.error("Failed to get last exception",e)}r&&r.value&&(n.push(r.value),r.type&&n.push(`${r.type}: ${r.value}`));return n}(e);l.length>0&&(e.message=l[l.length-1]);const p=null===(n=e.exception)||void 0===n?void 0:n.values;if(p&&p.length>0)for(const e of p)if(null===(r=e.stacktrace)||void 0===r?void 0:r.frames){const t=[];let n=null;for(let r=e.stacktrace.frames.length-1;r>=0;r--){const l=e.stacktrace.frames[r];(null===(o=l.filename)||void 0===o?void 0:o.includes("framework-"))||((null===(i=l.function)||void 0===i?void 0:i.endsWith("imqaReportString"))||(null===(a=l.function)||void 0===a?void 0:a.endsWith("imqaReportError"))||(null===(s=l.function)||void 0===s?void 0:s.endsWith("imqaReportErrorEvent"))||(null===(c=l.function)||void 0===c?void 0:c.endsWith("imqaReportEvent"))||((null===(u=l.function)||void 0===u?void 0:u.endsWith("imqaReport"))?n=l.filename:n&&l.filename===n?n=null:t.unshift(l)))}e.stacktrace.frames=t}return e}}),e.imqaIntegration=(0,n.defineIntegration)(e._imqaIntegration)}(Tw)),Tw}var Aw,ww={};var Rw,Nw,Iw={};function Pw(){return Nw||(Nw=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.recordException=e.buildEventFromException=e.applyIntegrations=e.setupIntegrations=void 0;const t=Dy(),n=Wt,r=aw(),o=(sw||(sw=1,Object.defineProperty(cw,"__esModule",{value:!0}),cw.VERSION=void 0,cw.VERSION="0.0.12"),cw),i=pw(),a=function(){if(fw)return hw;fw=1,Object.defineProperty(hw,"__esModule",{value:!0}),hw.browserApiErrorsIntegration=void 0;const e=aw(),t=gw(),n=Wt,r=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","BroadcastChannel","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","SharedWorker","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"];function o(n){return function(...r){const o=r[0];return r[0]=(0,t.wrap)(o,{mechanism:{data:{function:(0,e.getFunctionName)(n)},handled:!1,type:"instrument"}}),n.apply(this,r)}}function i(n){return function(r){return n.apply(this,[(0,t.wrap)(r,{mechanism:{data:{function:"requestAnimationFrame",handler:(0,e.getFunctionName)(n)},handled:!1,type:"instrument"}})])}}function a(n){return function(...r){const o=this;return["onload","onerror","onprogress","onreadystatechange"].forEach((n=>{n in o&&"function"==typeof o[n]&&(0,e.fill)(o,n,(function(r){const o={mechanism:{data:{function:n,handler:(0,e.getFunctionName)(r)},handled:!1,type:"instrument"}},i=(0,e.getOriginalFunction)(r);return i&&(o.mechanism.data.handler=(0,e.getFunctionName)(i)),(0,t.wrap)(r,o)}))})),n.apply(this,r)}}function s(r){const o=t.WINDOW,i=o[r]&&o[r].prototype;i&&i.hasOwnProperty&&i.hasOwnProperty("addEventListener")&&((0,e.fill)(i,"addEventListener",(function(o){return function(i,a,s){try{"function"==typeof a.handleEvent&&(a.handleEvent=(0,t.wrap)(a.handleEvent,{mechanism:{data:{function:"handleEvent",handler:(0,e.getFunctionName)(a),target:r},handled:!1,type:"instrument"}}))}catch(e){n.diag.error("Failed to wrap event listener",e)}return o.apply(this,[i,(0,t.wrap)(a,{mechanism:{data:{function:"addEventListener",handler:(0,e.getFunctionName)(a),target:r},handled:!1,type:"instrument"}}),s])}})),(0,e.fill)(i,"removeEventListener",(function(e){return function(t,r,o){const i=r;try{const n=i&&i.__sentry_wrapped__;n&&e.call(this,t,n,o)}catch(e){n.diag.error("Failed to unwrap event listener",e)}return e.call(this,t,i,o)}})))}return hw.browserApiErrorsIntegration=(0,e.defineIntegration)(((n={})=>{const c={XMLHttpRequest:!0,eventTarget:!0,requestAnimationFrame:!0,setInterval:!0,setTimeout:!0,...n};return{name:"BrowserApiErrors",setupOnce(){c.setTimeout&&(0,e.fill)(t.WINDOW,"setTimeout",o),c.setInterval&&(0,e.fill)(t.WINDOW,"setInterval",o),c.requestAnimationFrame&&(0,e.fill)(t.WINDOW,"requestAnimationFrame",i),c.XMLHttpRequest&&"XMLHttpRequest"in t.WINDOW&&(0,e.fill)(XMLHttpRequest.prototype,"send",a);const n=c.eventTarget;n&&(Array.isArray(n)?n:r).forEach(s)}}})),hw}(),s=vw(),c=function(){if(bw)return Ew;bw=1,Object.defineProperty(Ew,"__esModule",{value:!0}),Ew.httpContextIntegration=void 0;const e=aw(),t=gw();return Ew.httpContextIntegration=(0,e.defineIntegration)((()=>({name:"HttpContext",preprocessEvent(e){if(!t.WINDOW.navigator&&!t.WINDOW.location&&!t.WINDOW.document)return;const n=e.request&&e.request.url||t.WINDOW.location&&t.WINDOW.location.href,{referrer:r}=t.WINDOW.document||{},{userAgent:o}=t.WINDOW.navigator||{},i={...e.request&&e.request.headers,...r&&{Referer:r},...o&&{"User-Agent":o}},a={...e.request,...n&&{url:n},headers:i};e.request=a}}))),Ew}(),u=Ow(),l=function(){if(Aw)return ww;Aw=1,Object.defineProperty(ww,"__esModule",{value:!0}),ww.linkedErrorsIntegration=void 0;const e=aw(),t=pw();return ww.linkedErrorsIntegration=(0,e.defineIntegration)(((n={})=>{const r=n.limit||5,o=n.key||"cause";return{name:"LinkedErrors",preprocessEvent(n,i,a){const s=a.getOptions();(0,e.applyAggregateErrorsToEvent)(t.exceptionFromError,s.stackParser,s.maxValueLength,o,r,n,i)}}})),ww}(),p=(Rw||(Rw=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.defaultStackParser=e.defaultStackLineParsers=e.opera11StackLineParser=e.opera10StackLineParser=e.winjsStackLineParser=e.geckoStackLineParser=e.chromeStackLineParser=void 0;const t=aw();function n(e,n,r,o){const i={filename:e,function:"<anonymous>"===n?t.UNKNOWN_FUNCTION:n,in_app:!0};return void 0!==r&&(i.lineno=r),void 0!==o&&(i.colno=o),i}const r=/^\s*at (?:(.+?\)(?: \[.+\])?|.*?) ?\((?:address at )?)?(?:async )?((?:<anonymous>|[-a-z]+:|.*bundle|\/)?.*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,o=/\((\S*)(?::(\d+))(?::(\d+))\)/;e.chromeStackLineParser=[30,e=>{const i=r.exec(e);if(i){if(i[2]&&0===i[2].indexOf("eval")){const e=o.exec(i[2]);e&&(i[2]=e[1],i[3]=e[2],i[4]=e[3])}const[e,r]=l(i[1]||t.UNKNOWN_FUNCTION,i[2]);return n(r,e,i[3]?+i[3]:void 0,i[4]?+i[4]:void 0)}}];const i=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)?((?:[-a-z]+)?:\/.*?|\[native code\]|[^@]*(?:bundle|\d+\.js)|\/[\w\-. /=]+)(?::(\d+))?(?::(\d+))?\s*$/i,a=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;e.geckoStackLineParser=[50,e=>{const r=i.exec(e);if(r){if(r[3]&&r[3].indexOf(" > eval")>-1){const e=a.exec(r[3]);e&&(r[1]=r[1]||"eval",r[3]=e[1],r[4]=e[2],r[5]="")}let e=r[3],o=r[1]||t.UNKNOWN_FUNCTION;return[o,e]=l(o,e),n(e,o,r[4]?+r[4]:void 0,r[5]?+r[5]:void 0)}}];const s=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:[-a-z]+):.*?):(\d+)(?::(\d+))?\)?\s*$/i;e.winjsStackLineParser=[40,e=>{const r=s.exec(e);return r?n(r[2],r[1]||t.UNKNOWN_FUNCTION,+r[3],r[4]?+r[4]:void 0):void 0}];const c=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i;e.opera10StackLineParser=[10,e=>{const r=c.exec(e);return r?n(r[2],r[3]||t.UNKNOWN_FUNCTION,+r[1]):void 0}];const u=/ line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^)]+))\(.*\))? in (.*):\s*$/i;e.opera11StackLineParser=[20,e=>{const r=u.exec(e);return r?n(r[5],r[3]||r[4]||t.UNKNOWN_FUNCTION,+r[1],+r[2]):void 0}],e.defaultStackLineParsers=[e.chromeStackLineParser,e.geckoStackLineParser],e.defaultStackParser=(0,t.createStackParser)(...e.defaultStackLineParsers);const l=(e,n)=>{const r=-1!==e.indexOf("safari-extension"),o=-1!==e.indexOf("safari-web-extension");return r||o?[-1!==e.indexOf("@")?e.split("@")[0]:t.UNKNOWN_FUNCTION,r?`safari-extension:${n}`:`safari-web-extension:${n}`]:[e,n]}}(Iw)),Iw),d=n.trace.getTracer("@imqa/instrumentation-browser-exception",o.VERSION),f=[(0,r.inboundFiltersIntegration)(),(0,s.contextLinesIntegration)(),(0,a.browserApiErrorsIntegration)(),(0,l.linkedErrorsIntegration)(),(0,c.httpContextIntegration)(),(0,u.imqaIntegration)()],h={integrations:f,stackParser:p.defaultStackParser,maxValueLength:250,transport:{}},m={getOptions:()=>h};e.setupIntegrations=()=>{var e,t;for(const n of f)null===(e=n.setupOnce)||void 0===e||e.call(n),null===(t=n.setup)||void 0===t||t.call(n,m)};e.applyIntegrations=async(e,t)=>{var n;for(const r of f)await(null===(n=r.preprocessEvent)||void 0===n?void 0:n.call(r,e,t,m));for(const n of f)"function"==typeof n.processEvent&&(e=await n.processEvent(e,t,m));return e};e.buildEventFromException=async(t,o)=>{let a=(0,i.eventFromUnknownInput)(p.defaultStackParser,t);try{a=await(0,r.prepareEvent)(h,a,o)}catch(e){n.diag.error("Failed to prepare event",e)}return(0,e.applyIntegrations)(a,o)};e.recordException=async(r,o)=>{try{const{tracer:n,span:i,attributes:a,...s}=null!=o?o:{},c=Object.keys(s).length>0?s:{mechanism:{type:"generic",handled:!0}},u=(0,t.getEventProcessor)(null!=n?n:d);u(await(0,e.buildEventFromException)(r,{data:c}),c,i,a)}catch(e){n.diag.error("Failed to capture exception",e)}}}(hy)),hy}var xw,Cw,Mw={};function Lw(){if(xw)return Mw;return xw=1,Object.defineProperty(Mw,"__esModule",{value:!0}),Mw.limitLen=function(e,t){return e.length>t?e.substring(0,t):e},Mw.getElementXPath=function e(t,n){if(t.nodeType===Node.DOCUMENT_NODE)return"/";const r=function(e,t){const n=e.nodeType,r=function(e){if(!e.parentNode)return 0;const t=[e.nodeType];e.nodeType===Node.CDATA_SECTION_NODE&&t.push(Node.TEXT_NODE);let n=Array.from(e.parentNode.childNodes);if(n=n.filter((n=>{const r=n.localName;return t.indexOf(n.nodeType)>=0&&r===e.localName})),n.length>=1)return n.indexOf(e)+1;return 0}(e);let o="";if(n===Node.ELEMENT_NODE){const n=e.getAttribute("id");if(t&&n)return`//*[@id="${n}"]`;o=e.localName}else if(n===Node.TEXT_NODE||n===Node.CDATA_SECTION_NODE)o="text()";else{if(n!==Node.COMMENT_NODE)return"";o="comment()"}if(o&&r>1)return`/${o}[${r}]`;return`/${o}`}(t,n);if(n&&r.indexOf("@id")>0)return r;let o="";t.parentNode&&(o+=e(t.parentNode,!1));return o+=r,o},Mw}var Uw,kw,Dw={};var jw,Bw=(kw||(kw=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.recordException=void 0;const t=F;t.__exportStar((Cw||(Cw=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.IMQAErrorInstrumentation=e.ERROR_INSTRUMENTATION_VERSION=e.ERROR_INSTRUMENTATION_NAME=void 0;const t=Wt,n=On,r=Km,o=ny,i=F.__importStar(pn()),a=uy(),s=dy(),c=iy(),u=Pw(),l=Lw(),p=4096,d=1024;function f(e){return e&&""!==e.trim()&&!e.startsWith("[object")&&"error"!==e}function h(e){return void 0===e?"(undefined)":e.toString()}function m(e,t){t&&t.stack&&f(t.stack)&&e.setAttribute("error.stack",(0,l.limitLen)(t.stack.toString(),p))}e.ERROR_INSTRUMENTATION_NAME="@imqa/instrumentation-browser-exception",e.ERROR_INSTRUMENTATION_VERSION="0.0.1";const g={screenNameType:"routeOnly",urlWithSearchParams:!1};class _ extends n.InstrumentationBase{constructor(n){var r;super(e.ERROR_INSTRUMENTATION_NAME,e.ERROR_INSTRUMENTATION_VERSION,n),this._consoleErrorHandler=e=>{const t=(...n)=>{let r;const o=n.find((e=>e instanceof Error));if(o)r=o;else if(r=new Error("console.error call"),Error.captureStackTrace)Error.captureStackTrace(r,t);else if(r.stack){const e=r.stack.split("\n").filter(((e,t)=>0===t||!e.includes("handlerFunction")&&!e.includes("_consoleErrorHandler")&&!e.includes("IMQAErrorInstrumentation")));r.stack=e.join("\n")}return this.imqaReport("console.error",n,r),e.apply(this,n)};return t},this._unhandledRejectionListener=e=>{const n=t.context.active();t.context.with(n,(()=>{this.imqaReport("unhandledrejection",e.reason)}))},this._errorListener=e=>{this.imqaReport("onerror",e)},this._documentErrorListener=e=>{this.imqaReport("eventListener.error",e)},this._screenNameOption=g,this._captureConsoleError=!0,this._screenNameOption={...g,...n.screenNameOption},this._captureConsoleError=null===(r=n.captureConsoleError)||void 0===r||r,this._applyCustomAttributes=n.applyCustomAttributes}_getCustomAttributes(e){if(this._applyCustomAttributes)try{return this._applyCustomAttributes(e)}catch{return{}}return{}}init(){}enable(){this._captureConsoleError&&i.wrap(console,"error",this._consoleErrorHandler),window.addEventListener("unhandledrejection",this._unhandledRejectionListener),window.addEventListener("error",this._errorListener),document.documentElement.addEventListener("error",this._documentErrorListener,{capture:!0})}disable(){this._captureConsoleError&&i.unwrap(console,"error"),window.removeEventListener("unhandledrejection",this._unhandledRejectionListener),window.removeEventListener("error",this._errorListener),document.documentElement.removeEventListener("error",this._documentErrorListener,{capture:!0})}imqaReportError(e,n){const i=n.message||n.toString();if(!f(i)&&!n.stack)return;const g=(0,o.hrTime)(),_=t.context.active(),y=this.tracer.startSpan(e,{startTime:g},_),v=f(n.name)?n.name:n.constructor&&n.constructor.name?n.constructor.name:"Error",b=this._getCustomAttributes(n);y.setStatus({code:t.SpanStatusCode.ERROR}),y.setAttribute("component","error"),y.setAttribute(c.ATTR_IMQA_SPAN_TYPE,"error"),y.setAttribute("error",!0),y.setAttribute(r.ATTR_EXCEPTION_TYPE,v),y.setAttribute(r.ATTR_EXCEPTION_MESSAGE,(0,l.limitLen)(i,d)),y.setAttribute(r.ATTR_EXCEPTION_STACKTRACE,(0,l.limitLen)(n.stack,p)),y.setAttributes(b),m(y,n),(0,a.setRumSessionId)(y),(0,s.spanResources)(y,this._screenNameOption);const E=(0,s.getScreenName)({screenNameType:"routeOnly",urlWithSearchParams:!1,...this._screenNameOption}),S=t.trace.setSpanContext(_,y.spanContext());try{this.logger.emit({timestamp:g,severityText:"error",severityNumber:17,body:h(n),attributes:{[c.ATTR_IMQA_SPAN_TYPE]:"error",[c.ATTR_IMQA_SCREEN_NAME]:E,[c.ATTR_IMQA_SESSION_ID]:(0,a.getRumSessionId)(),[r.ATTR_EXCEPTION_TYPE]:v,[r.ATTR_EXCEPTION_MESSAGE]:(0,l.limitLen)(i,d),[r.ATTR_EXCEPTION_STACKTRACE]:(0,l.limitLen)(n.stack,p),"span.id":y.spanContext().spanId,"trace.id":y.spanContext().traceId,...b},context:S})}catch{}t.context.with(S,(()=>{(0,u.recordException)(n,{tracer:this.tracer,span:y}).catch((()=>{})).finally((()=>{y.end(g)}))}))}imqaReportString(e,n,i,h){if(!f(n))return;const g=(0,o.hrTime)(),_=t.context.active(),y=this.tracer.startSpan(e,{startTime:g},_),v=this._getCustomAttributes(n),b=h||i;y.setStatus({code:t.SpanStatusCode.ERROR}),y.setAttribute("component","error"),y.setAttribute(c.ATTR_IMQA_SPAN_TYPE,"error"),y.setAttribute("error",!0),y.setAttribute("error.object","String"),y.setAttribute(r.ATTR_EXCEPTION_MESSAGE,(0,l.limitLen)(n,d)),y.setAttribute(r.ATTR_EXCEPTION_TYPE,"Error"),b&&b.stack&&y.setAttribute(r.ATTR_EXCEPTION_STACKTRACE,(0,l.limitLen)(b.stack,p)),y.setAttributes(v),(0,a.setRumSessionId)(y),(0,s.spanResources)(y,this._screenNameOption);const E=(0,s.getScreenName)({screenNameType:"routeOnly",urlWithSearchParams:!1,...this._screenNameOption}),S=t.trace.setSpanContext(_,y.spanContext());try{this.logger.emit({timestamp:g,severityText:"error",severityNumber:17,body:n,attributes:{[c.ATTR_IMQA_SPAN_TYPE]:"error",[c.ATTR_IMQA_SESSION_ID]:(0,a.getRumSessionId)(),[c.ATTR_IMQA_SCREEN_NAME]:E,[r.ATTR_EXCEPTION_TYPE]:"Error",[r.ATTR_EXCEPTION_MESSAGE]:(0,l.limitLen)(n,d),...(null==b?void 0:b.stack)?{[r.ATTR_EXCEPTION_STACKTRACE]:(0,l.limitLen)(b.stack,p)}:{},"span.id":y.spanContext().spanId,"trace.id":y.spanContext().traceId,...v},context:S})}catch{}i?(m(y,i),t.context.with(S,(()=>{(0,u.recordException)(i,{tracer:this.tracer,span:y}).catch((()=>{})).finally((()=>{y.end(g)}))}))):y.end(g)}imqaReportErrorEvent(e,t){t.error?this.imqaReport(e,t.error):t.message&&this.imqaReport(e,t.message)}imqaReportEvent(e,n){if(!n.target&&!f(n.type))return;const i=(0,o.hrTime)(),p=t.context.active(),d=this.tracer.startSpan(e,{startTime:i},p),h=this._getCustomAttributes(n);if(d.setStatus({code:t.SpanStatusCode.ERROR}),d.setAttribute("component","error"),d.setAttribute(c.ATTR_IMQA_SPAN_TYPE,"error"),d.setAttribute("error",!0),d.setAttribute(r.ATTR_EXCEPTION_TYPE,n.type),d.setAttribute(r.ATTR_EXCEPTION_MESSAGE,"event error"),n.target){const e=n.target;d.setAttribute("target_element",e.tagName),d.setAttribute("target_xpath",(0,l.getElementXPath)(n.target,!0)),"src"in e&&d.setAttribute("target_src",e.src)}d.setAttributes(h),(0,a.setRumSessionId)(d),(0,s.spanResources)(d,this._screenNameOption);const m=(0,s.getScreenName)({screenNameType:"routeOnly",urlWithSearchParams:!1,...this._screenNameOption}),g=t.trace.setSpanContext(p,d.spanContext());try{this.logger.emit({timestamp:i,severityText:"error",severityNumber:17,body:"event error",attributes:{[c.ATTR_IMQA_SPAN_TYPE]:"error",[c.ATTR_IMQA_SESSION_ID]:(0,a.getRumSessionId)(),[c.ATTR_IMQA_SCREEN_NAME]:m,[r.ATTR_EXCEPTION_TYPE]:n.type,[r.ATTR_EXCEPTION_MESSAGE]:"event error","span.id":d.spanContext().spanId,"trace.id":d.spanContext().traceId,...h},context:g})}catch{}t.context.with(g,(()=>{(0,u.recordException)(n,{tracer:this.tracer,span:d}).catch((()=>{})).finally((()=>{d.end(i)}))}))}imqaReport(e,t,n){if(!Array.isArray(t)||0!==t.length)if(t instanceof Array&&1===t.length&&(t=t[0]),t instanceof Error)this.imqaReportError(e,t);else if(t instanceof ErrorEvent)this.imqaReportErrorEvent(e,t);else if(t instanceof Event)this.imqaReportEvent(e,t);else if("string"==typeof t)this.imqaReportString(e,t,void 0,n);else if(t instanceof Array){const r=t.find((e=>e instanceof Error));this.imqaReportString(e,t.map((e=>h(e))).join(" "),r,n)}else this.imqaReportString(e,h(t),void 0,n)}}e.IMQAErrorInstrumentation=_}(G)),G),e);var n=Pw();Object.defineProperty(e,"recordException",{enumerable:!0,get:function(){return n.recordException}}),t.__exportStar((Uw||(Uw=1,Object.defineProperty(Dw,"__esModule",{value:!0})),Dw),e)}(r)),r),Vw=function(){return Vw=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Vw.apply(this,arguments)},Fw=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Gw=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},Hw=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))},Yw=function(){function e(e,t,n,r,o,i,a,s,c,u){void 0===a&&(a=[]),this.attributes={},this.links=[],this.events=[],this._droppedAttributesCount=0,this._droppedEventsCount=0,this._droppedLinksCount=0,this.status={code:_t.UNSET},this.endTime=[0,0],this._ended=!1,this._duration=[-1,-1],this.name=n,this._spanContext=r,this.parentSpanId=i,this.kind=o,this.links=a;var l=Date.now();this._performanceStartTime=Fg.now(),this._performanceOffset=l-(this._performanceStartTime+Qg()),this._startTimeProvided=null!=s,this.startTime=this._getTime(null!=s?s:l),this.resource=e.resource,this.instrumentationLibrary=e.instrumentationLibrary,this._spanLimits=e.getSpanLimits(),this._attributeValueLengthLimit=this._spanLimits.attributeValueLengthLimit||0,null!=u&&this.setAttributes(u),this._spanProcessor=e.getActiveSpanProcessor(),this._spanProcessor.onStart(this,t)}return e.prototype.spanContext=function(){return this._spanContext},e.prototype.setAttribute=function(e,t){return null==t||this._isSpanEnded()?this:0===e.length?(Nt.warn("Invalid attribute key: "+e),this):ug(t)?Object.keys(this.attributes).length>=this._spanLimits.attributeCountLimit&&!Object.prototype.hasOwnProperty.call(this.attributes,e)?(this._droppedAttributesCount++,this):(this.attributes[e]=this._truncateToSize(t),this):(Nt.warn("Invalid attribute value set for key: "+e),this)},e.prototype.setAttributes=function(e){var t,n;try{for(var r=Fw(Object.entries(e)),o=r.next();!o.done;o=r.next()){var i=Gw(o.value,2),a=i[0],s=i[1];this.setAttribute(a,s)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}return this},e.prototype.addEvent=function(e,t,n){if(this._isSpanEnded())return this;if(0===this._spanLimits.eventCountLimit)return Nt.warn("No events allowed."),this._droppedEventsCount++,this;this.events.length>=this._spanLimits.eventCountLimit&&(0===this._droppedEventsCount&&Nt.debug("Dropping extra events."),this.events.shift(),this._droppedEventsCount++),n_(t)&&(n_(n)||(n=t),t=void 0);var r=sg(t);return this.events.push({name:e,attributes:r,time:this._getTime(n),droppedAttributesCount:0}),this},e.prototype.addLink=function(e){return this.links.push(e),this},e.prototype.addLinks=function(e){var t;return(t=this.links).push.apply(t,Hw([],Gw(e),!1)),this},e.prototype.setStatus=function(e){return this._isSpanEnded()||(this.status=Vw({},e),null!=this.status.message&&"string"!=typeof e.message&&(Nt.warn("Dropping invalid status.message of type '"+typeof e.message+"', expected 'string'"),delete this.status.message)),this},e.prototype.updateName=function(e){return this._isSpanEnded()||(this.name=e),this},e.prototype.end=function(e){this._isSpanEnded()?Nt.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(e),this._duration=Xg(this.startTime,this.endTime),this._duration[0]<0&&(Nt.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&&Nt.warn("Dropped "+this._droppedEventsCount+" events because eventCountLimit reached"),this._spanProcessor.onEnd(this))},e.prototype._getTime=function(e){if("number"==typeof e&&e<=Fg.now())return Jg(e+this._performanceOffset);if("number"==typeof e)return Wg(e);if(e instanceof Date)return Wg(e.getTime());if(t_(e))return e;if(this._startTimeProvided)return Wg(Date.now());var t=Fg.now()-this._performanceStartTime;return r_(this.startTime,Wg(t))},e.prototype.isRecording=function(){return!1===this._ended},e.prototype.recordException=function(e,t){var n={};"string"==typeof e?n[mi]=e:e&&(e.code?n[hi]=e.code.toString():e.name&&(n[hi]=e.name),e.message&&(n[mi]=e.message),e.stack&&(n[gi]=e.stack)),n[hi]||n[mi]?this.addEvent("exception",n,t):Nt.warn("Failed to record an exception "+e)},Object.defineProperty(e.prototype,"duration",{get:function(){return this._duration},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ended",{get:function(){return this._ended},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"droppedAttributesCount",{get:function(){return this._droppedAttributesCount},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"droppedEventsCount",{get:function(){return this._droppedEventsCount},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"droppedLinksCount",{get:function(){return this._droppedLinksCount},enumerable:!1,configurable:!0}),e.prototype._isSpanEnded=function(){return this._ended&&Nt.warn("Can not execute the operation on ended Span {traceId: "+this._spanContext.traceId+", spanId: "+this._spanContext.spanId+"}"),this._ended},e.prototype._truncateToLimitUtil=function(e,t){return e.length<=t?e:e.substring(0,t)},e.prototype._truncateToSize=function(e){var t=this,n=this._attributeValueLengthLimit;return n<=0?(Nt.warn("Attribute value limit must be positive, got "+n),e):"string"==typeof e?this._truncateToLimitUtil(e,n):Array.isArray(e)?e.map((function(e){return"string"==typeof e?t._truncateToLimitUtil(e,n):e})):e},e}();!function(e){e[e.NOT_RECORD=0]="NOT_RECORD",e[e.RECORD=1]="RECORD",e[e.RECORD_AND_SAMPLED=2]="RECORD_AND_SAMPLED"}(jw||(jw={}));var qw=function(){function e(){}return e.prototype.shouldSample=function(){return{decision:jw.NOT_RECORD}},e.prototype.toString=function(){return"AlwaysOffSampler"},e}(),zw=function(){function e(){}return e.prototype.shouldSample=function(){return{decision:jw.RECORD_AND_SAMPLED}},e.prototype.toString=function(){return"AlwaysOnSampler"},e}(),Kw=function(){function e(e){var t,n,r,o;this._root=e.root,this._root||(hg(new Error("ParentBasedSampler must have a root sampler configured")),this._root=new zw),this._remoteParentSampled=null!==(t=e.remoteParentSampled)&&void 0!==t?t:new zw,this._remoteParentNotSampled=null!==(n=e.remoteParentNotSampled)&&void 0!==n?n:new qw,this._localParentSampled=null!==(r=e.localParentSampled)&&void 0!==r?r:new zw,this._localParentNotSampled=null!==(o=e.localParentNotSampled)&&void 0!==o?o:new qw}return e.prototype.shouldSample=function(e,t,n,r,o,i){var a=zt.getSpanContext(e);return a&&pt(a)?a.isRemote?a.traceFlags&Be.SAMPLED?this._remoteParentSampled.shouldSample(e,t,n,r,o,i):this._remoteParentNotSampled.shouldSample(e,t,n,r,o,i):a.traceFlags&Be.SAMPLED?this._localParentSampled.shouldSample(e,t,n,r,o,i):this._localParentNotSampled.shouldSample(e,t,n,r,o,i):this._root.shouldSample(e,t,n,r,o,i)},e.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()+"}"},e}(),Ww=function(){function e(e){void 0===e&&(e=0),this._ratio=e,this._ratio=this._normalize(e),this._upperBound=Math.floor(4294967295*this._ratio)}return e.prototype.shouldSample=function(e,t){return{decision:ut(t)&&this._accumulate(t)<this._upperBound?jw.RECORD_AND_SAMPLED:jw.NOT_RECORD}},e.prototype.toString=function(){return"TraceIdRatioBased{"+this._ratio+"}"},e.prototype._normalize=function(e){return"number"!=typeof e||isNaN(e)?0:e>=1?1:e<=0?0:e},e.prototype._accumulate=function(e){for(var t=0,n=0;n<e.length/8;n++){var r=8*n;t=(t^parseInt(e.slice(r,r+8),16))>>>0}return t},e}(),Qw=dg.AlwaysOn;function Jw(){var e=xg();return{sampler:$w(e),forceFlushTimeoutMillis:3e4,generalLimits:{attributeValueLengthLimit:e.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:e.OTEL_ATTRIBUTE_COUNT_LIMIT},spanLimits:{attributeValueLengthLimit:e.OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:e.OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT,linkCountLimit:e.OTEL_SPAN_LINK_COUNT_LIMIT,eventCountLimit:e.OTEL_SPAN_EVENT_COUNT_LIMIT,attributePerEventCountLimit:e.OTEL_SPAN_ATTRIBUTE_PER_EVENT_COUNT_LIMIT,attributePerLinkCountLimit:e.OTEL_SPAN_ATTRIBUTE_PER_LINK_COUNT_LIMIT},mergeResourceWithDefaults:!0}}function $w(e){switch(void 0===e&&(e=xg()),e.OTEL_TRACES_SAMPLER){case dg.AlwaysOn:return new zw;case dg.AlwaysOff:return new qw;case dg.ParentBasedAlwaysOn:return new Kw({root:new zw});case dg.ParentBasedAlwaysOff:return new Kw({root:new qw});case dg.TraceIdRatio:return new Ww(Xw(e));case dg.ParentBasedTraceIdRatio:return new Kw({root:new Ww(Xw(e))});default:return Nt.error('OTEL_TRACES_SAMPLER value "'+e.OTEL_TRACES_SAMPLER+" invalid, defaulting to "+Qw+'".'),new zw}}function Xw(e){if(void 0===e.OTEL_TRACES_SAMPLER_ARG||""===e.OTEL_TRACES_SAMPLER_ARG)return Nt.error("OTEL_TRACES_SAMPLER_ARG is blank, defaulting to 1."),1;var t=Number(e.OTEL_TRACES_SAMPLER_ARG);return isNaN(t)?(Nt.error("OTEL_TRACES_SAMPLER_ARG="+e.OTEL_TRACES_SAMPLER_ARG+" was given, but it is invalid, defaulting to 1."),1):t<0||t>1?(Nt.error("OTEL_TRACES_SAMPLER_ARG="+e.OTEL_TRACES_SAMPLER_ARG+" was given, but it is out of range ([0..1]), defaulting to 1."),1):t}var Zw=function(){function e(e,t){this._exporter=e,this._isExporting=!1,this._finishedSpans=[],this._droppedSpansCount=0;var n=xg();this._maxExportBatchSize="number"==typeof(null==t?void 0:t.maxExportBatchSize)?t.maxExportBatchSize:n.OTEL_BSP_MAX_EXPORT_BATCH_SIZE,this._maxQueueSize="number"==typeof(null==t?void 0:t.maxQueueSize)?t.maxQueueSize:n.OTEL_BSP_MAX_QUEUE_SIZE,this._scheduledDelayMillis="number"==typeof(null==t?void 0:t.scheduledDelayMillis)?t.scheduledDelayMillis:n.OTEL_BSP_SCHEDULE_DELAY,this._exportTimeoutMillis="number"==typeof(null==t?void 0:t.exportTimeoutMillis)?t.exportTimeoutMillis:n.OTEL_BSP_EXPORT_TIMEOUT,this._shutdownOnce=new $_(this._shutdown,this),this._maxExportBatchSize>this._maxQueueSize&&(Nt.warn("BatchSpanProcessor: maxExportBatchSize must be smaller or equal to maxQueueSize, setting maxExportBatchSize to match maxQueueSize"),this._maxExportBatchSize=this._maxQueueSize)}return e.prototype.forceFlush=function(){return this._shutdownOnce.isCalled?this._shutdownOnce.promise:this._flushAll()},e.prototype.onStart=function(e,t){},e.prototype.onEnd=function(e){this._shutdownOnce.isCalled||0!==(e.spanContext().traceFlags&Be.SAMPLED)&&this._addToBuffer(e)},e.prototype.shutdown=function(){return this._shutdownOnce.call()},e.prototype._shutdown=function(){var e=this;return Promise.resolve().then((function(){return e.onShutdown()})).then((function(){return e._flushAll()})).then((function(){return e._exporter.shutdown()}))},e.prototype._addToBuffer=function(e){if(this._finishedSpans.length>=this._maxQueueSize)return 0===this._droppedSpansCount&&Nt.debug("maxQueueSize reached, dropping spans"),void this._droppedSpansCount++;this._droppedSpansCount>0&&(Nt.warn("Dropped "+this._droppedSpansCount+" spans because maxQueueSize reached"),this._droppedSpansCount=0),this._finishedSpans.push(e),this._maybeStartTimer()},e.prototype._flushAll=function(){var e=this;return new Promise((function(t,n){for(var r=[],o=0,i=Math.ceil(e._finishedSpans.length/e._maxExportBatchSize);o<i;o++)r.push(e._flushOneBatch());Promise.all(r).then((function(){t()})).catch(n)}))},e.prototype._flushOneBatch=function(){var e=this;return this._clearTimer(),0===this._finishedSpans.length?Promise.resolve():new Promise((function(t,n){var r=setTimeout((function(){n(new Error("Timeout"))}),e._exportTimeoutMillis);Rt.with(Qm(Rt.active()),(function(){var o;e._finishedSpans.length<=e._maxExportBatchSize?(o=e._finishedSpans,e._finishedSpans=[]):o=e._finishedSpans.splice(0,e._maxExportBatchSize);for(var i=function(){return e._exporter.export(o,(function(e){var o;clearTimeout(r),e.code===qg.SUCCESS?t():n(null!==(o=e.error)&&void 0!==o?o:new Error("BatchSpanProcessor: span export failed"))}))},a=null,s=0,c=o.length;s<c;s++){var u=o[s];u.resource.asyncAttributesPending&&u.resource.waitForAsyncAttributes&&(null!=a||(a=[]),a.push(u.resource.waitForAsyncAttributes()))}null===a?i():Promise.all(a).then(i,(function(e){hg(e),n(e)}))}))}))},e.prototype._maybeStartTimer=function(){var e=this;if(!this._isExporting){var t=function(){e._isExporting=!0,e._flushOneBatch().finally((function(){e._isExporting=!1,e._finishedSpans.length>0&&(e._clearTimer(),e._maybeStartTimer())})).catch((function(t){e._isExporting=!1,hg(t)}))};if(this._finishedSpans.length>=this._maxExportBatchSize)return t();void 0===this._timer&&(this._timer=setTimeout((function(){return t()}),this._scheduledDelayMillis),this._timer)}},e.prototype._clearTimer=function(){void 0!==this._timer&&(clearTimeout(this._timer),this._timer=void 0)},e}(),eR=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),tR=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.onInit(n),r}return eR(t,e),t.prototype.onInit=function(e){var t=this;!0!==(null==e?void 0:e.disableAutoFlushOnDocumentHide)&&"undefined"!=typeof document&&(this._visibilityChangeListener=function(){"hidden"===document.visibilityState&&t.forceFlush().catch((function(e){hg(e)}))},this._pageHideListener=function(){t.forceFlush().catch((function(e){hg(e)}))},document.addEventListener("visibilitychange",this._visibilityChangeListener),document.addEventListener("pagehide",this._pageHideListener))},t.prototype.onShutdown=function(){"undefined"!=typeof document&&(this._visibilityChangeListener&&document.removeEventListener("visibilitychange",this._visibilityChangeListener),this._pageHideListener&&document.removeEventListener("pagehide",this._pageHideListener))},t}(Zw),nR=function(){this.generateTraceId=oR(16),this.generateSpanId=oR(8)},rR=Array(32);function oR(e){return function(){for(var t=0;t<2*e;t++)rR[t]=Math.floor(16*Math.random())+48,rR[t]>=58&&(rR[t]+=39);return String.fromCharCode.apply(null,rR.slice(0,2*e))}}var iR=function(){function e(e,t,n){this._tracerProvider=n;var r,o,i,a,s=(r=t,o={sampler:$w()},i=Jw(),(a=Object.assign({},i,o,r)).generalLimits=Object.assign({},i.generalLimits,r.generalLimits||{}),a.spanLimits=Object.assign({},i.spanLimits,r.spanLimits||{}),a);this._sampler=s.sampler,this._generalLimits=s.generalLimits,this._spanLimits=s.spanLimits,this._idGenerator=t.idGenerator||new nR,this.resource=n.resource,this.instrumentationLibrary=e}return e.prototype.startSpan=function(e,t,n){var r,o,i;void 0===t&&(t={}),void 0===n&&(n=Rt.active()),t.root&&(n=zt.deleteSpan(n));var a=zt.getSpan(n);if(Jm(n))return Nt.debug("Instrumentation suppressed, returning Noop Span"),zt.wrapSpanContext(Xe);var s,c,u,l=null==a?void 0:a.spanContext(),p=this._idGenerator.generateSpanId();l&&zt.isSpanContextValid(l)?(s=l.traceId,c=l.traceState,u=l.spanId):s=this._idGenerator.generateTraceId();var d=null!==(r=t.kind)&&void 0!==r?r:gt.INTERNAL,f=(null!==(o=t.links)&&void 0!==o?o:[]).map((function(e){return{context:e.context,attributes:sg(e.attributes)}})),h=sg(t.attributes),m=this._sampler.shouldSample(n,s,e,d,h,f);c=null!==(i=m.traceState)&&void 0!==i?i:c;var g={traceId:s,spanId:p,traceFlags:m.decision===mt.RECORD_AND_SAMPLED?Be.SAMPLED:Be.NONE,traceState:c};if(m.decision===mt.NOT_RECORD)return Nt.debug("Recording is off, propagating context in a non-recording span"),zt.wrapSpanContext(g);var _=sg(Object.assign(h,m.attributes));return new Yw(this,n,e,g,d,u,f,t.startTime,void 0,_)},e.prototype.startActiveSpan=function(e,t,n,r){var o,i,a;if(!(arguments.length<2)){2===arguments.length?a=t:3===arguments.length?(o=t,a=n):(o=t,i=n,a=r);var s=null!=i?i:Rt.active(),c=this.startSpan(e,o,s),u=zt.setSpan(s,c);return Rt.with(u,a,void 0,c)}},e.prototype.getGeneralLimits=function(){return this._generalLimits},e.prototype.getSpanLimits=function(){return this._spanLimits},e.prototype.getActiveSpanProcessor=function(){return this._tracerProvider.getActiveSpanProcessor()},e}();function aR(){return"unknown_service"}var sR,cR=function(){return cR=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},cR.apply(this,arguments)},uR=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},lR=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},pR=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},dR=function(){function e(e,t){var n,r=this;this._attributes=e,this.asyncAttributesPending=null!=t,this._syncAttributes=null!==(n=this._attributes)&&void 0!==n?n:{},this._asyncAttributesPromise=null==t?void 0:t.then((function(e){return r._attributes=Object.assign({},r._attributes,e),r.asyncAttributesPending=!1,e}),(function(e){return Nt.debug("a resource's async attributes promise rejected: %s",e),r.asyncAttributesPending=!1,{}}))}return e.empty=function(){return e.EMPTY},e.default=function(){var t;return new e(((t={})[$f]="unknown_service",t[nh]=Hg[nh],t[th]=Hg[th],t[rh]=Hg[rh],t))},Object.defineProperty(e.prototype,"attributes",{get:function(){var e;return this.asyncAttributesPending&&Nt.error("Accessing resource attributes before async attributes settled"),null!==(e=this._attributes)&&void 0!==e?e:{}},enumerable:!1,configurable:!0}),e.prototype.waitForAsyncAttributes=function(){return uR(this,void 0,void 0,(function(){return lR(this,(function(e){switch(e.label){case 0:return this.asyncAttributesPending?[4,this._asyncAttributesPromise]:[3,2];case 1:e.sent(),e.label=2;case 2:return[2]}}))}))},e.prototype.merge=function(t){var n,r=this;if(!t)return this;var o=cR(cR({},this._syncAttributes),null!==(n=t._syncAttributes)&&void 0!==n?n:t.attributes);if(!this._asyncAttributesPromise&&!t._asyncAttributesPromise)return new e(o);var i=Promise.all([this._asyncAttributesPromise,t._asyncAttributesPromise]).then((function(e){var n,o=pR(e,2),i=o[0],a=o[1];return cR(cR(cR(cR({},r._syncAttributes),i),null!==(n=t._syncAttributes)&&void 0!==n?n:t.attributes),a)}));return new e(o,i)},e.EMPTY=new e({}),e}(),fR=new(function(){function e(){}return e.prototype.detect=function(){return new dR({})},e}()),hR=new(function(){function e(){}return e.prototype.detect=function(){return Promise.resolve(fR.detect())},e}()),mR=hR,gR=fR,_R=hR,yR=fR,vR=hR,bR=hR,ER=fR,SR=function(){return SR=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},SR.apply(this,arguments)},TR=function(){function e(){}return e.prototype.detect=function(e){var t,n,r,o;if(!("undefined"!=typeof navigator&&void 0===(null===(r=null===(n=global.process)||void 0===n?void 0:n.versions)||void 0===r?void 0:r.node)&&void 0===(null===(o=global.Bun)||void 0===o?void 0:o.version)))return dR.empty();var i=((t={})[Wf]="browser",t[Jf]="Web Browser",t[Qf]=navigator.userAgent,t);return this._getResourceAttributes(i,e)},e.prototype._getResourceAttributes=function(e,t){return""===e[Qf]?(Nt.debug("BrowserDetector failed: Unable to find required browser resources. "),dR.empty()):new dR(SR({},e))},e}(),OR=new TR,AR=function(){function e(){}return e.prototype.detect=function(e){return Promise.resolve(OR.detect(e))},e}(),wR=new AR,RR=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},NR=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},IR=function(){function e(){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 e.prototype.detect=function(e){var t={},n=xg(),r=n.OTEL_RESOURCE_ATTRIBUTES,o=n.OTEL_SERVICE_NAME;if(r)try{var i=this._parseResourceAttributes(r);Object.assign(t,i)}catch(e){Nt.debug("EnvDetector failed: "+e.message)}return o&&(t[$f]=o),new dR(t)},e.prototype._parseResourceAttributes=function(e){var t,n;if(!e)return{};var r={},o=e.split(this._COMMA_SEPARATOR,-1);try{for(var i=RR(o),a=i.next();!a.done;a=i.next()){var s=a.value.split(this._LABEL_KEY_VALUE_SPLITTER,-1);if(2===s.length){var c=NR(s,2),u=c[0],l=c[1];if(u=u.trim(),l=l.trim().split(/^"|"$/).join(""),!this._isValidAndNotEmpty(u))throw new Error("Attribute key "+this._ERROR_MESSAGE_INVALID_CHARS);if(!this._isValid(l))throw new Error("Attribute value "+this._ERROR_MESSAGE_INVALID_VALUE);r[u]=decodeURIComponent(l)}}}catch(e){t={error:e}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(t)throw t.error}}return r},e.prototype._isValid=function(e){return e.length<=this._MAX_LENGTH&&this._isBaggageOctetString(e)},e.prototype._isBaggageOctetString=function(e){for(var t=0;t<e.length;t++){var n=e.charCodeAt(t);if(n<33||44===n||59===n||92===n||n>126)return!1}return!0},e.prototype._isValidAndNotEmpty=function(e){return e.length>0&&this._isValid(e)},e}(),PR=new IR,xR=function(){function e(){}return e.prototype.detect=function(e){return Promise.resolve(PR.detect(e))},e}(),CR=new xR,MR=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},LR=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},UR=function(e){e.forEach((function(e){if(Object.keys(e.attributes).length>0){var t=JSON.stringify(e.attributes,null,4);Nt.verbose(t)}}))},kR=Object.freeze({__proto__:null,Resource:dR,browserDetector:wR,browserDetectorSync:OR,defaultServiceName:aR,detectResources:function(e){return void 0===e&&(e={}),MR(void 0,void 0,void 0,(function(){var t;return LR(this,(function(n){switch(n.label){case 0:return[4,Promise.all((e.detectors||[]).map((function(t){return MR(void 0,void 0,void 0,(function(){var n,r;return LR(this,(function(o){switch(o.label){case 0:return o.trys.push([0,2,,3]),[4,t.detect(e)];case 1:return n=o.sent(),Nt.debug(t.constructor.name+" found resource.",n),[2,n];case 2:return r=o.sent(),Nt.debug(t.constructor.name+" failed: "+r.message),[2,dR.empty()];case 3:return[2]}}))}))})))];case 1:return t=n.sent(),UR(t),[2,t.reduce((function(e,t){return e.merge(t)}),dR.empty())]}}))}))},detectResourcesSync:function(e){var t;void 0===e&&(e={});var n=(null!==(t=e.detectors)&&void 0!==t?t:[]).map((function(t){try{var n,r=t.detect(e);if(null!==(o=r)&&"object"==typeof o&&"function"==typeof o.then){n=new dR({},MR(void 0,void 0,void 0,(function(){var e,t;return LR(this,(function(n){switch(n.label){case 0:return[4,r];case 1:return e=n.sent(),[4,null===(t=e.waitForAsyncAttributes)||void 0===t?void 0:t.call(e)];case 2:return n.sent(),[2,e.attributes]}}))})))}else n=r;return n.waitForAsyncAttributes?n.waitForAsyncAttributes().then((function(){return Nt.debug(t.constructor.name+" found resource.",n)})):Nt.debug(t.constructor.name+" found resource.",n),n}catch(e){return Nt.error(t.constructor.name+" failed: "+e.message),dR.empty()}var o})),r=n.reduce((function(e,t){return e.merge(t)}),dR.empty());return r.waitForAsyncAttributes&&r.waitForAsyncAttributes().then((function(){UR(n)})),r},envDetector:CR,envDetectorSync:PR,hostDetector:mR,hostDetectorSync:gR,osDetector:_R,osDetectorSync:yR,processDetector:vR,processDetectorSync:bR,serviceInstanceIdDetectorSync:ER}),DR=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},jR=function(){function e(e){this._spanProcessors=e}return e.prototype.forceFlush=function(){var e,t,n=[];try{for(var r=DR(this._spanProcessors),o=r.next();!o.done;o=r.next()){var i=o.value;n.push(i.forceFlush())}}catch(t){e={error:t}}finally{try{o&&!o.done&&(t=r.return)&&t.call(r)}finally{if(e)throw e.error}}return new Promise((function(e){Promise.all(n).then((function(){e()})).catch((function(t){hg(t||new Error("MultiSpanProcessor: forceFlush failed")),e()}))}))},e.prototype.onStart=function(e,t){var n,r;try{for(var o=DR(this._spanProcessors),i=o.next();!i.done;i=o.next()){i.value.onStart(e,t)}}catch(e){n={error:e}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}},e.prototype.onEnd=function(e){var t,n;try{for(var r=DR(this._spanProcessors),o=r.next();!o.done;o=r.next()){o.value.onEnd(e)}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}},e.prototype.shutdown=function(){var e,t,n=[];try{for(var r=DR(this._spanProcessors),o=r.next();!o.done;o=r.next()){var i=o.value;n.push(i.shutdown())}}catch(t){e={error:t}}finally{try{o&&!o.done&&(t=r.return)&&t.call(r)}finally{if(e)throw e.error}}return new Promise((function(e,t){Promise.all(n).then((function(){e()}),t)}))},e}(),BR=function(){function e(){}return e.prototype.onStart=function(e,t){},e.prototype.onEnd=function(e){},e.prototype.shutdown=function(){return Promise.resolve()},e.prototype.forceFlush=function(){return Promise.resolve()},e}(),VR=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},FR=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))};!function(e){e[e.resolved=0]="resolved",e[e.timeout=1]="timeout",e[e.error=2]="error",e[e.unresolved=3]="unresolved"}(sR||(sR={}));var GR,HR,YR=function(){function e(e){var t,n;void 0===e&&(e={}),this._registeredSpanProcessors=[],this._tracers=new Map;var r=L_({},Jw(),function(e){var t,n,r,o,i,a,s,c,u,l,p,d,f=Object.assign({},e.spanLimits),h=Cg();return f.attributeCountLimit=null!==(a=null!==(i=null!==(o=null!==(n=null===(t=e.spanLimits)||void 0===t?void 0:t.attributeCountLimit)&&void 0!==n?n:null===(r=e.generalLimits)||void 0===r?void 0:r.attributeCountLimit)&&void 0!==o?o:h.OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT)&&void 0!==i?i:h.OTEL_ATTRIBUTE_COUNT_LIMIT)&&void 0!==a?a:Sg,f.attributeValueLengthLimit=null!==(d=null!==(p=null!==(l=null!==(c=null===(s=e.spanLimits)||void 0===s?void 0:s.attributeValueLengthLimit)&&void 0!==c?c:null===(u=e.generalLimits)||void 0===u?void 0:u.attributeValueLengthLimit)&&void 0!==l?l:h.OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT)&&void 0!==p?p:h.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT)&&void 0!==d?d:Eg,Object.assign({},e,{spanLimits:f})}(e));if(this.resource=null!==(t=r.resource)&&void 0!==t?t:dR.empty(),r.mergeResourceWithDefaults&&(this.resource=dR.default().merge(this.resource)),this._config=Object.assign({},r,{resource:this.resource}),null===(n=e.spanProcessors)||void 0===n?void 0:n.length)this._registeredSpanProcessors=FR([],VR(e.spanProcessors),!1),this.activeSpanProcessor=new jR(this._registeredSpanProcessors);else{var o=this._buildExporterFromEnv();if(void 0!==o){var i=new tR(o);this.activeSpanProcessor=i}else this.activeSpanProcessor=new BR}}return e.prototype.getTracer=function(e,t,n){var r=e+"@"+(t||"")+":"+((null==n?void 0:n.schemaUrl)||"");return this._tracers.has(r)||this._tracers.set(r,new iR({name:e,version:t,schemaUrl:null==n?void 0:n.schemaUrl},this._config,this)),this._tracers.get(r)},e.prototype.addSpanProcessor=function(e){0===this._registeredSpanProcessors.length&&this.activeSpanProcessor.shutdown().catch((function(e){return Nt.error("Error while trying to shutdown current span processor",e)})),this._registeredSpanProcessors.push(e),this.activeSpanProcessor=new jR(this._registeredSpanProcessors)},e.prototype.getActiveSpanProcessor=function(){return this.activeSpanProcessor},e.prototype.register=function(e){void 0===e&&(e={}),zt.setGlobalTracerProvider(this),void 0===e.propagator&&(e.propagator=this._buildPropagatorFromEnv()),e.contextManager&&Rt.setGlobalContextManager(e.contextManager),e.propagator&&Ht.setGlobalPropagator(e.propagator)},e.prototype.forceFlush=function(){var e=this._config.forceFlushTimeoutMillis,t=this._registeredSpanProcessors.map((function(t){return new Promise((function(n){var r,o=setTimeout((function(){n(new Error("Span processor did not completed within timeout period of "+e+" ms")),r=sR.timeout}),e);t.forceFlush().then((function(){clearTimeout(o),r!==sR.timeout&&(r=sR.resolved,n(r))})).catch((function(e){clearTimeout(o),r=sR.error,n(e)}))}))}));return new Promise((function(e,n){Promise.all(t).then((function(t){var r=t.filter((function(e){return e!==sR.resolved}));r.length>0?n(r):e()})).catch((function(e){return n([e])}))}))},e.prototype.shutdown=function(){return this.activeSpanProcessor.shutdown()},e.prototype._getPropagator=function(e){var t;return null===(t=this.constructor._registeredPropagators.get(e))||void 0===t?void 0:t()},e.prototype._getSpanExporter=function(e){var t;return null===(t=this.constructor._registeredExporters.get(e))||void 0===t?void 0:t()},e.prototype._buildPropagatorFromEnv=function(){var e=this,t=Array.from(new Set(xg().OTEL_PROPAGATORS)),n=t.map((function(t){var n=e._getPropagator(t);return n||Nt.warn('Propagator "'+t+'" requested through environment variable is unavailable.'),n})).reduce((function(e,t){return t&&e.push(t),e}),[]);return 0===n.length?void 0:1===t.length?n[0]:new i_({propagators:n})},e.prototype._buildExporterFromEnv=function(){var e=xg().OTEL_TRACES_EXPORTER;if("none"!==e&&""!==e){var t=this._getSpanExporter(e);return t||Nt.error('Exporter "'+e+'" requested through environment variable is unavailable.'),t}},e._registeredPropagators=new Map([["tracecontext",function(){return new g_}],["baggage",function(){return new rg}]]),e._registeredExporters=new Map,e}(),qR=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},zR=function(){function e(){}return e.prototype.export=function(e,t){return this._sendSpans(e,t)},e.prototype.shutdown=function(){return this._sendSpans([]),this.forceFlush()},e.prototype.forceFlush=function(){return Promise.resolve()},e.prototype._exportInfo=function(e){var t;return{resource:{attributes:e.resource.attributes},instrumentationScope:e.instrumentationLibrary,traceId:e.spanContext().traceId,parentId:e.parentSpanId,traceState:null===(t=e.spanContext().traceState)||void 0===t?void 0:t.serialize(),name:e.name,id:e.spanContext().spanId,kind:e.kind,timestamp:e_(e.startTime),duration:e_(e.duration),attributes:e.attributes,status:e.status,events:e.events,links:e.links}},e.prototype._sendSpans=function(e,t){var n,r;try{for(var o=qR(e),i=o.next();!i.done;i=o.next()){var a=i.value;console.dir(this._exportInfo(a),{depth:3})}}catch(e){n={error:e}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}if(t)return t({code:qg.SUCCESS})},e}(),KR=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},WR=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))},QR=function(){function e(){this._finishedSpans=[],this._stopped=!1}return e.prototype.export=function(e,t){var n;if(this._stopped)return t({code:qg.FAILED,error:new Error("Exporter has been stopped")});(n=this._finishedSpans).push.apply(n,WR([],KR(e),!1)),setTimeout((function(){return t({code:qg.SUCCESS})}),0)},e.prototype.shutdown=function(){return this._stopped=!0,this._finishedSpans=[],this.forceFlush()},e.prototype.forceFlush=function(){return Promise.resolve()},e.prototype.reset=function(){this._finishedSpans=[]},e.prototype.getFinishedSpans=function(){return this._finishedSpans},e}(),JR=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},$R=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},XR=function(){function e(e){this._exporter=e,this._shutdownOnce=new $_(this._shutdown,this),this._unresolvedExports=new Set}return e.prototype.forceFlush=function(){return JR(this,void 0,void 0,(function(){return $R(this,(function(e){switch(e.label){case 0:return[4,Promise.all(Array.from(this._unresolvedExports))];case 1:return e.sent(),this._exporter.forceFlush?[4,this._exporter.forceFlush()]:[3,3];case 2:e.sent(),e.label=3;case 3:return[2]}}))}))},e.prototype.onStart=function(e,t){},e.prototype.onEnd=function(e){var t,n,r=this;if(!this._shutdownOnce.isCalled&&0!==(e.spanContext().traceFlags&Be.SAMPLED)){var o=function(){return ey._export(r._exporter,[e]).then((function(e){var t;e.code!==qg.SUCCESS&&hg(null!==(t=e.error)&&void 0!==t?t:new Error("SimpleSpanProcessor: span export failed (status "+e+")"))})).catch((function(e){hg(e)}))};if(e.resource.asyncAttributesPending){var i=null===(n=(t=e.resource).waitForAsyncAttributes)||void 0===n?void 0:n.call(t).then((function(){return null!=i&&r._unresolvedExports.delete(i),o()}),(function(e){return hg(e)}));null!=i&&this._unresolvedExports.add(i)}else o()}},e.prototype.shutdown=function(){return this._shutdownOnce.call()},e.prototype._shutdown=function(){return this._exporter.shutdown()},e}(),ZR=Object.freeze({__proto__:null,AlwaysOffSampler:qw,AlwaysOnSampler:zw,BasicTracerProvider:YR,BatchSpanProcessor:tR,ConsoleSpanExporter:zR,get ForceFlushState(){return sR},InMemorySpanExporter:QR,NoopSpanProcessor:BR,ParentBasedSampler:Kw,RandomIdGenerator:nR,get SamplingDecision(){return jw},SimpleSpanProcessor:XR,Span:Yw,TraceIdRatioBasedSampler:Ww,Tracer:iR}),eN={},tN=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},nN=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))},rN=function(){function e(){this._enabled=!1,this._currentContext=_e}return e.prototype._bindFunction=function(e,t){void 0===e&&(e=_e);var n=this,r=function(){for(var r=this,o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];return n.with(e,(function(){return t.apply(r,o)}))};return Object.defineProperty(r,"length",{enumerable:!1,configurable:!0,writable:!1,value:t.length}),r},e.prototype.active=function(){return this._currentContext},e.prototype.bind=function(e,t){return void 0===e&&(e=this.active()),"function"==typeof t?this._bindFunction(e,t):t},e.prototype.disable=function(){return this._currentContext=_e,this._enabled=!1,this},e.prototype.enable=function(){return this._enabled||(this._enabled=!0,this._currentContext=_e),this},e.prototype.with=function(e,t,n){for(var r=[],o=3;o<arguments.length;o++)r[o-3]=arguments[o];var i=this._currentContext;this._currentContext=e||_e;try{return t.call.apply(t,nN([n],tN(r),!1))}finally{this._currentContext=i}},e}(),oN=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),iN=function(e){function t(t){void 0===t&&(t={});var n=e.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 n}return oN(t,e),t.prototype.register=function(t){void 0===t&&(t={}),void 0===t.contextManager&&(t.contextManager=new rN),t.contextManager&&t.contextManager.enable(),e.prototype.register.call(this,t)},t}(YR);function aN(e,t){return t in e}function sN(e,t,n,r){var o=void 0,i=void 0;aN(n,t)&&"number"==typeof n[t]&&(o=n[t]);var a=r||GR.FETCH_START;if(aN(n,a)&&"number"==typeof n[a]&&(i=n[a]),void 0!==o&&void 0!==i&&o>=i)return e.addEvent(t,o),e}function cN(e,t,n){void 0===n&&(n=!1),n||(sN(e,GR.FETCH_START,t),sN(e,GR.DOMAIN_LOOKUP_START,t),sN(e,GR.DOMAIN_LOOKUP_END,t),sN(e,GR.CONNECT_START,t),aN(t,"name")&&t.name.startsWith("https:")&&sN(e,GR.SECURE_CONNECTION_START,t),sN(e,GR.CONNECT_END,t),sN(e,GR.REQUEST_START,t),sN(e,GR.RESPONSE_START,t),sN(e,GR.RESPONSE_END,t));var r=t[GR.ENCODED_BODY_SIZE];void 0!==r&&e.setAttribute(ua,r);var o=t[GR.DECODED_BODY_SIZE];void 0!==o&&r!==o&&e.setAttribute(la,o)}function uN(e){return e.slice().sort((function(e,t){var n=e[GR.FETCH_START],r=t[GR.FETCH_START];return n>r?1:n<r?-1:0}))}function lN(){return"undefined"!=typeof location?location.origin:void 0}function pN(e,t,n,r,o,i){void 0===o&&(o=new WeakSet);var a=dN(e),s=function(e,t,n,r,o,i){var a=Zg(t),s=Zg(n),c=r.filter((function(t){var n=Zg($g(t[GR.FETCH_START])),r=Zg($g(t[GR.RESPONSE_END]));return t.initiatorType.toLowerCase()===(i||"xmlhttprequest")&&t.name===e&&n>=a&&r<=s}));c.length>0&&(c=c.filter((function(e){return!o.has(e)})));return c}(e=a.toString(),t,n,r,o,i);if(0===s.length)return{mainRequest:void 0};if(1===s.length)return{mainRequest:s[0]};var c=uN(s);if(a.origin!==lN()&&c.length>1){var u=c[0],l=function(e,t,n){for(var r,o=Zg(n),i=Zg($g(t)),a=e[1],s=e.length,c=1;c<s;c++){var u=e[c],l=Zg($g(u[GR.FETCH_START])),p=o-Zg($g(u[GR.RESPONSE_END]));l>=i&&(!r||p<r)&&(r=p,a=u)}return a}(c,u[GR.RESPONSE_END],n),p=u[GR.RESPONSE_END];return l[GR.FETCH_START]<p&&(l=u,u=void 0),{corsPreFlightRequest:u,mainRequest:l}}return{mainRequest:s[0]}}function dN(e){if("function"==typeof URL)return new URL(e,"undefined"!=typeof document?document.baseURI:"undefined"!=typeof location?location.href:void 0);var t=(HR||(HR=document.createElement("a")),HR);return t.href=e,t}function fN(e,t){if(e.nodeType===Node.DOCUMENT_NODE)return"/";var n=function(e,t){var n=e.nodeType,r=function(e){if(!e.parentNode)return 0;var t=[e.nodeType];e.nodeType===Node.CDATA_SECTION_NODE&&t.push(Node.TEXT_NODE);var n=Array.from(e.parentNode.childNodes);if(n=n.filter((function(n){var r=n.localName;return t.indexOf(n.nodeType)>=0&&r===e.localName})),n.length>=1)return n.indexOf(e)+1;return 0}(e),o="";if(n===Node.ELEMENT_NODE){var i=e.getAttribute("id");if(t&&i)return'//*[@id="'+i+'"]';o=e.localName}else if(n===Node.TEXT_NODE||n===Node.CDATA_SECTION_NODE)o="text()";else{if(n!==Node.COMMENT_NODE)return"";o="comment()"}if(o&&r>1)return"/"+o+"["+r+"]";return"/"+o}(e,t);if(t&&n.indexOf("@id")>0)return n;var r="";return e.parentNode&&(r+=fN(e.parentNode,!1)),r+=n}function hN(e,t){var n=t||[];return("string"==typeof n||n instanceof RegExp)&&(n=[n]),dN(e).origin===lN()||n.some((function(t){return z_(e,t)}))}!function(e){e.CONNECT_END="connectEnd",e.CONNECT_START="connectStart",e.DECODED_BODY_SIZE="decodedBodySize",e.DOM_COMPLETE="domComplete",e.DOM_CONTENT_LOADED_EVENT_END="domContentLoadedEventEnd",e.DOM_CONTENT_LOADED_EVENT_START="domContentLoadedEventStart",e.DOM_INTERACTIVE="domInteractive",e.DOMAIN_LOOKUP_END="domainLookupEnd",e.DOMAIN_LOOKUP_START="domainLookupStart",e.ENCODED_BODY_SIZE="encodedBodySize",e.FETCH_START="fetchStart",e.LOAD_EVENT_END="loadEventEnd",e.LOAD_EVENT_START="loadEventStart",e.NAVIGATION_START="navigationStart",e.REDIRECT_END="redirectEnd",e.REDIRECT_START="redirectStart",e.REQUEST_START="requestStart",e.RESPONSE_END="responseEnd",e.RESPONSE_START="responseStart",e.SECURE_CONNECTION_START="secureConnectionStart",e.UNLOAD_EVENT_END="unloadEventEnd",e.UNLOAD_EVENT_START="unloadEventStart"}(GR||(GR={}));var mN,gN=Object.freeze({__proto__:null,AlwaysOffSampler:qw,AlwaysOnSampler:zw,BasicTracerProvider:YR,BatchSpanProcessor:tR,ConsoleSpanExporter:zR,get ForceFlushState(){return sR},InMemorySpanExporter:QR,NoopSpanProcessor:BR,ParentBasedSampler:Kw,get PerformanceTimingNames(){return GR},RandomIdGenerator:nR,get SamplingDecision(){return jw},SimpleSpanProcessor:XR,Span:Yw,StackContextManager:rN,TraceIdRatioBasedSampler:Ww,Tracer:iR,WebTracerProvider:iN,addSpanNetworkEvent:sN,addSpanNetworkEvents:cN,getElementXPath:fN,getResource:pN,hasKey:aN,normalizeUrl:function(e){return dN(e).href},parseUrl:dN,shouldPropagateTraceHeaders:hN,sortResources:uN});!function(e){e.EVENT_TYPE="event_type",e.TARGET_ELEMENT="target_element",e.TARGET_XPATH="target_xpath",e.HTTP_URL="http.url"}(mN||(mN={}));var _N="0.44.1",yN=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),vN=["click"];function bN(){return!1}var EN,SN=function(e){function t(t){var n;void 0===t&&(t={});var r=e.call(this,"@opentelemetry/instrumentation-user-interaction",_N,t)||this;return r.version=_N,r.moduleName="user-interaction",r._spansData=new WeakMap,r._wrappedListeners=new WeakMap,r._eventsSpanMap=new WeakMap,r._eventNames=new Set(null!==(n=null==t?void 0:t.eventNames)&&void 0!==n?n:vN),r._shouldPreventSpanCreation="function"==typeof(null==t?void 0:t.shouldPreventSpanCreation)?t.shouldPreventSpanCreation:bN,r}return yN(t,e),t.prototype.init=function(){},t.prototype._checkForTimeout=function(e,t){var n=this._spansData.get(t);n&&("setTimeout"===e.source?n.hrTimeLastTimeout=Jg():"Promise.then"!==e.source&&"setTimeout"!==e.source&&(n.hrTimeLastTimeout=void 0))},t.prototype._allowEventName=function(e){return this._eventNames.has(e)},t.prototype._createSpan=function(e,t,n){var r;if(e instanceof HTMLElement&&e.getAttribute&&!e.hasAttribute("disabled")&&this._allowEventName(t)){var o=fN(e,!0);try{var i=this.tracer.startSpan(t,{attributes:(r={},r[mN.EVENT_TYPE]=t,r[mN.TARGET_ELEMENT]=e.tagName,r[mN.TARGET_XPATH]=o,r[mN.HTTP_URL]=window.location.href,r)},n?zt.setSpan(Rt.active(),n):void 0);if(!0===this._shouldPreventSpanCreation(t,e,i))return;return this._spansData.set(i,{taskCount:0}),i}catch(e){this._diag.error("failed to start create new user interaction span",e)}}},t.prototype._decrementTask=function(e){var t=this._spansData.get(e);t&&(t.taskCount--,0===t.taskCount&&this._tryToEndSpan(e,t.hrTimeLastTimeout))},t.prototype._getCurrentSpan=function(e){var t=e.get("OT_ZONE_CONTEXT");return t?zt.getSpan(t):t},t.prototype._incrementTask=function(e){var t=this._spansData.get(e);t&&t.taskCount++},t.prototype.addPatchedListener=function(e,t,n,r){var o=this._wrappedListeners.get(n);o||(o=new Map,this._wrappedListeners.set(n,o));var i=o.get(t);return i||(i=new Map,o.set(t,i)),!i.has(e)&&(i.set(e,r),!0)},t.prototype.removePatchedListener=function(e,t,n){var r=this._wrappedListeners.get(n);if(r){var o=r.get(t);if(o){var i=o.get(e);return i&&(o.delete(e),0===o.size&&(r.delete(t),0===r.size&&this._wrappedListeners.delete(n))),i}}},t.prototype._invokeListener=function(e,t,n){return"function"==typeof e?e.apply(t,n):e.handleEvent(n[0])},t.prototype._patchAddEventListener=function(){var e=this;return function(t){return function(n,r,o){if(!r)return t.call(this,n,r,o);var i=o&&"object"==typeof o&&o.once,a=function(){for(var t,o=this,a=[],s=0;s<arguments.length;s++)a[s]=arguments[s];var c=a[0],u=null==c?void 0:c.target;c&&(t=e._eventsSpanMap.get(c)),i&&e.removePatchedListener(this,n,r);var l=e._createSpan(u,n,t);return l?(c&&e._eventsSpanMap.set(c,l),Rt.with(zt.setSpan(Rt.active(),l),(function(){var t=e._invokeListener(r,o,a);return l.end(),t}))):e._invokeListener(r,this,a)};return e.addPatchedListener(this,n,r,a)?t.call(this,n,a,o):void 0}}},t.prototype._patchRemoveEventListener=function(){var e=this;return function(t){return function(n,r,o){var i=e.removePatchedListener(this,n,r);return i?t.call(this,n,i,o):t.call(this,n,r,o)}}},t.prototype._getPatchableEventTargets=function(){return window.EventTarget?[EventTarget.prototype]:[Node.prototype,Window.prototype]},t.prototype._patchHistoryApi=function(){this._unpatchHistoryApi(),this._wrap(history,"replaceState",this._patchHistoryMethod()),this._wrap(history,"pushState",this._patchHistoryMethod()),this._wrap(history,"back",this._patchHistoryMethod()),this._wrap(history,"forward",this._patchHistoryMethod()),this._wrap(history,"go",this._patchHistoryMethod())},t.prototype._patchHistoryMethod=function(){var e=this;return function(t){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var o=""+location.pathname+location.hash+location.search,i=t.apply(this,n),a=""+location.pathname+location.hash+location.search;return o!==a&&e._updateInteractionName(a),i}}},t.prototype._unpatchHistoryApi=function(){Sn(history.replaceState)&&this._unwrap(history,"replaceState"),Sn(history.pushState)&&this._unwrap(history,"pushState"),Sn(history.back)&&this._unwrap(history,"back"),Sn(history.forward)&&this._unwrap(history,"forward"),Sn(history.go)&&this._unwrap(history,"go")},t.prototype._updateInteractionName=function(e){var t=zt.getSpan(Rt.active());t&&"function"==typeof t.updateName&&t.updateName("Navigation: "+e)},t.prototype._patchZoneCancelTask=function(){var e=this;return function(t){return function(n){var r=Zone.current,o=e._getCurrentSpan(r);return o&&e._shouldCountTask(n,r)&&e._decrementTask(o),t.call(this,n)}}},t.prototype._patchZoneScheduleTask=function(){var e=this;return function(t){return function(n){var r=Zone.current,o=e._getCurrentSpan(r);return o&&e._shouldCountTask(n,r)&&(e._incrementTask(o),e._checkForTimeout(n,o)),t.call(this,n)}}},t.prototype._patchZoneRunTask=function(){var e=this;return function(t){return function(n,r,o){var i,a=Array.isArray(o)&&o[0]instanceof Event?o[0]:void 0,s=null==a?void 0:a.target,c=this;if(s){if(i=e._createSpan(s,n.eventName))return e._incrementTask(i),c.run((function(){try{return Rt.with(zt.setSpan(Rt.active(),i),(function(){var e=Zone.current;return n._zone=e,t.call(e,n,r,o)}))}finally{e._decrementTask(i)}}))}else i=e._getCurrentSpan(c);try{return t.call(c,n,r,o)}finally{i&&e._shouldCountTask(n,c)&&e._decrementTask(i)}}}},t.prototype._shouldCountTask=function(e,t){if(e._zone&&(t=e._zone),!t||!e.data||e.data.isPeriodic)return!1;var n=this._getCurrentSpan(t);return!!n&&(!!this._spansData.get(n)&&("macroTask"===e.type||"microTask"===e.type))},t.prototype._tryToEndSpan=function(e,t){e&&(this._spansData.get(e)&&(e.end(t),this._spansData.delete(e)))},t.prototype.enable=function(){var e=this,t=this._getZoneWithPrototype();(this._diag.debug("applying patch to",this.moduleName,this.version,"zone:",!!t),t)?(Sn(t.prototype.runTask)&&(this._unwrap(t.prototype,"runTask"),this._diag.debug("removing previous patch from method runTask")),Sn(t.prototype.scheduleTask)&&(this._unwrap(t.prototype,"scheduleTask"),this._diag.debug("removing previous patch from method scheduleTask")),Sn(t.prototype.cancelTask)&&(this._unwrap(t.prototype,"cancelTask"),this._diag.debug("removing previous patch from method cancelTask")),this._zonePatched=!0,this._wrap(t.prototype,"runTask",this._patchZoneRunTask()),this._wrap(t.prototype,"scheduleTask",this._patchZoneScheduleTask()),this._wrap(t.prototype,"cancelTask",this._patchZoneCancelTask())):(this._zonePatched=!1,this._getPatchableEventTargets().forEach((function(t){Sn(t.addEventListener)&&(e._unwrap(t,"addEventListener"),e._diag.debug("removing previous patch from method addEventListener")),Sn(t.removeEventListener)&&(e._unwrap(t,"removeEventListener"),e._diag.debug("removing previous patch from method removeEventListener")),e._wrap(t,"addEventListener",e._patchAddEventListener()),e._wrap(t,"removeEventListener",e._patchRemoveEventListener())})));this._patchHistoryApi()},t.prototype.disable=function(){var e=this,t=this._getZoneWithPrototype();(this._diag.debug("removing patch from",this.moduleName,this.version,"zone:",!!t),t&&this._zonePatched)?(Sn(t.prototype.runTask)&&this._unwrap(t.prototype,"runTask"),Sn(t.prototype.scheduleTask)&&this._unwrap(t.prototype,"scheduleTask"),Sn(t.prototype.cancelTask)&&this._unwrap(t.prototype,"cancelTask")):this._getPatchableEventTargets().forEach((function(t){Sn(t.addEventListener)&&e._unwrap(t,"addEventListener"),Sn(t.removeEventListener)&&e._unwrap(t,"removeEventListener")}));this._unpatchHistoryApi()},t.prototype._getZoneWithPrototype=function(){return window.Zone},t}(gn),TN=n(Object.freeze({__proto__:null,get AttributeNames(){return mN},UserInteractionInstrumentation:SN}));var ON,AN=(EN||(EN=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.IMQAUserInteractionInstrumentation=e.DEFAULT_AUTO_INSTRUMENTED_EVENT_NAMES=e.DEFAULT_AUTO_INSTRUMENTED_EVENTS=void 0;const t=Wt,n=TN,r=dy(),o=iy();e.DEFAULT_AUTO_INSTRUMENTED_EVENTS={click:!0,dblclick:!0,mousedown:!0,mouseup:!0,submit:!0,reset:!0,change:!0,dragend:!0,drop:!0,ended:!0,pause:!0,play:!0},e.DEFAULT_AUTO_INSTRUMENTED_EVENT_NAMES=Object.keys(e.DEFAULT_AUTO_INSTRUMENTED_EVENTS);const i="@imqa/intrumentation-route",a="0.0.1";class s extends n.UserInteractionInstrumentation{constructor(n={}){if(!n.eventNames){const t=Object.assign({},e.DEFAULT_AUTO_INSTRUMENTED_EVENTS,n.events),r=Object.entries(t).filter((([,e])=>e)).map((([e])=>e));n.eventNames=r}super(n),this._screenNameOption=n.screenNameOption,this._routingTracer=t.trace.getTracer(i,a);const s=this._createSpan.bind(this);this._createSpan=(e,t,i)=>{var a;e===document&&(e=document.documentElement);const c=s(e,t,i);if(c){if(c.setAttribute(o.ATTR_IMQA_RUM_COMPONENT,this.moduleName),c.setAttribute(o.ATTR_IMQA_SPAN_TYPE,"event"),e instanceof HTMLElement){const t=null===(a=e.innerText)||void 0===a?void 0:a.trim();t&&c.setAttribute(o.ATTR_IMQA_ELEMENT_TEXT,t.substring(0,100)),e.tagName&&c.setAttribute(o.ATTR_IMQA_ELEMENT_TAG,e.tagName.toLowerCase()),e.id&&c.setAttribute(o.ATTR_IMQA_ELEMENT_ID,e.id),e.className&&"string"==typeof e.className&&c.setAttribute(o.ATTR_IMQA_ELEMENT_CLASS,e.className)}(0,r.spanResources)(c,n.screenNameOption)}return c};const c=this._patchAddEventListener.bind(this);this._patchAddEventListener=()=>{const e=c();return t=>{const n=e(t);return function(e,r,o){return function(e){return e&&("function"==typeof e||"object"==typeof e&&"function"==typeof e.handleEvent)}(r)?(null===o&&(o=void 0),n.call(this,e,r,o)):t.call(this,e,r,o)}}}}setTracerProvider(e){super.setTracerProvider(e),this._routingTracer=e.getTracer(i,a)}getZoneWithPrototype(){}enable(){this.__hashChangeHandler=e=>{this._emitRouteChangeSpan(e.oldURL)},window.addEventListener("hashchange",this.__hashChangeHandler),super.enable()}disable(){super.disable(),this.__hashChangeHandler&&window.removeEventListener("hashchange",this.__hashChangeHandler)}_patchHistoryMethod(){const e=this;return t=>function(...n){const r=location.href,o=t.apply(this,n);return r!==location.href&&e._emitRouteChangeSpan(r),o}}_emitRouteChangeSpan(e){const t=Date.now(),n=this._routingTracer.startSpan("routeChange",{startTime:t});n.setAttribute(o.ATTR_IMQA_RUM_COMPONENT,this.moduleName),n.setAttribute(o.ATTR_IMQA_SPAN_TYPE,"route"),n.setAttribute(o.ATTR_IMQA_USER_INTERACTION_PREV_HREF,e),n.setAttribute("imqa.route.current_href",location.href),(0,r.spanResources)(n,this._screenNameOption),n.end(t)}}e.IMQAUserInteractionInstrumentation=s}(eN)),eN),wN={};function RN(){if(ON)return wN;ON=1,Object.defineProperty(wN,"__esModule",{value:!0}),wN.getcollectorUrl=wN.jsonToString=void 0,wN.safeJsonParse=function(e,t){if(null==e||""===e)return t;try{const n=JSON.parse(e);return null===n||"object"!=typeof n?t:n}catch{return t}},wN.generateId=function(e){return"x".repeat(e/4).replace(/x/g,(function(){return(16*Math.random()|0).toString(16)}))},wN.findCookieValue=function(e){const t=decodeURIComponent(document.cookie).split(";");for(let n=0;n<t.length;n++){const r=t[n].trim();if(0===r.indexOf(e+"="))return r.substring((e+"=").length,r.length)}return},wN.limitLen=function(e,t){return e.length>t?e.substring(0,t):e},wN.getPluginConfig=function(e,t,n){if(!1===e)return e;if(void 0===e&&n)return!1;return Object.assign({},t,e)},wN.isFunction=function(e){return"function"==typeof e},wN.isIframe=function(){try{return window.self!==window.top}catch(e){return t.diag.error("Error checking if window is in an iframe:",e),!0}},wN.wrapNatively=function(e,t,r){const o=e[t];(0,n.wrap)(e,t,r);e[t].toString=o.toString.bind(o)},wN.getOriginalFunction=function(e){for(;e.__original&&e.__original!==e;)e=e.__original;return e},wN.waitForGlobal=function(e,t){if(window[e])return t(window[e]),()=>{};const n=window[e];let r=!1;return Object.defineProperty(window,e,{get:()=>n,set(n){delete window[e],r=!0,window[e]=n,t(n)},configurable:!0,enumerable:!1}),()=>{r||window[e]!==n||(delete window[e],void 0!==n&&(window[e]=n))}},wN.headerCapture=function(e,t){const n=new Map(t.map((e=>[e,e.toLowerCase().replace(/-/g,"_")])));return(t,r)=>{for(const[o,i]of n){const n=r(o);if(void 0===n)continue;const a=`http.${e}.header.${i}`;"string"==typeof n?t.setAttribute(a,[n]):Array.isArray(n)?t.setAttribute(a,n):t.setAttribute(a,[n])}}},wN.convertReadableLogRecordsToOTLPJson=function(e){var t,n;const i=new Map;for(const a of e){const e=JSON.stringify(a.resource.attributes);i.has(e)||i.set(e,{resource:{attributes:Object.entries(a.resource.attributes).map((([e,t])=>({key:e,value:o(t)})))},scopeLogs:[]});const s=i.get(e);let c=s.scopeLogs.find((e=>e.scope.name===a.instrumentationScope.name&&e.scope.version===a.instrumentationScope.version));c||(c={scope:{name:a.instrumentationScope.name,version:a.instrumentationScope.version},logRecords:[]},s.scopeLogs.push(c)),c.logRecords.push({timeUnixNano:r(a.hrTime),observedTimeUnixNano:a.hrTimeObserved?r(a.hrTimeObserved):void 0,traceId:null===(t=a.spanContext)||void 0===t?void 0:t.traceId,spanId:null===(n=a.spanContext)||void 0===n?void 0:n.spanId,severityNumber:a.severityNumber,severityText:a.severityText,body:void 0!==a.body?o(a.body):void 0,attributes:a.attributes?Object.entries(a.attributes).map((([e,t])=>({key:e,value:o(t)}))):[]})}return{resourceLogs:Array.from(i.values())}},wN.convertReadableSpansToOTLPJson=function(e){const t=new Map;for(const n of e){const e=JSON.stringify(n.resource.attributes);t.has(e)||t.set(e,{resource:{attributes:Object.entries(n.resource.attributes).map((([e,t])=>({key:e,value:o(t)})))},scopeSpans:[]});const i=t.get(e);let a=i.scopeSpans.find((e=>e.scope.name===n.instrumentationLibrary.name&&e.scope.version===n.instrumentationLibrary.version));a||(a={scope:{name:n.instrumentationLibrary.name,version:n.instrumentationLibrary.version},spans:[]},i.scopeSpans.push(a)),a.spans.push({traceId:n.spanContext().traceId,spanId:n.spanContext().spanId,parentSpanId:n.parentSpanId||void 0,name:n.name,kind:n.kind,startTimeUnixNano:r(n.startTime),endTimeUnixNano:r(n.endTime),attributes:Object.entries(n.attributes).map((([e,t])=>({key:e,value:o(t)}))),status:{code:n.status.code,message:n.status.message||""}})}return{resourceSpans:Array.from(t.values())}};const e=F.__importDefault(Ty()),t=Wt,n=pn();wN.jsonToString=n=>{let r="[IMQA] Failed to stringify",o=!1;try{r=JSON.stringify(n)}catch{o=!0}if(o)try{r=(0,e.default)(n)}catch{t.diag.error("Failed to stringify json",n)}return r};function r(e){return String(1e9*e[0]+e[1])}function o(e){const t=typeof e;return"string"===t?{stringValue:e}:"number"===t?Number.isInteger(e)?{intValue:e}:{doubleValue:e}:"boolean"===t?{boolValue:e}:{stringValue:JSON.stringify(e)}}return wN.getcollectorUrl=e=>{if(!/^https?:\/\//i.test(e))throw new Error(`Invalid URL: "${e}" must include a scheme (http:// or https://)`);const t=new URL(e);return t.pathname=t.pathname.replace(/\/v1\/(traces|metrics|logs)\/?$/,""),t.pathname.endsWith("/")||(t.pathname+="/"),t.href},wN}var NN,IN=RN(),PN=uy(),xN={},CN={};var MN,LN=n(gN);var UN,kN=function(){if(MN)return xN;MN=1,Object.defineProperty(xN,"__esModule",{value:!0}),xN.IMQAPostDocLoadResourceInstrumentation=void 0;const e=On,t=(NN||(NN=1,Object.defineProperty(CN,"__esModule",{value:!0}),CN.VERSION=void 0,CN.VERSION="0.0.6"),CN),n=ny,r=LN,o=Wt,i=dy(),a=iy(),s="@imqa/instrumentation-post-doc-load-resource",c=["img","script","css","link"],u=e=>e instanceof HTMLScriptElement||e instanceof HTMLImageElement;class l extends e.InstrumentationBase{constructor(e={}){const n=Object.assign({},{allowedInitiatorTypes:c},e);super(s,t.VERSION,n),this.config=n,this.urlToContextMap={}}init(){}enable(){window.PerformanceObserver&&window.addEventListener("load",(()=>{this._startPerformanceObserver()})),window.MutationObserver&&this._startHeadMutationObserver()}disable(){this.performanceObserver&&this.performanceObserver.disconnect(),this.headMutationObserver&&this.headMutationObserver.disconnect()}onBeforeContextChange(){var e;this._processHeadMutationObserverRecords((null===(e=this.headMutationObserver)||void 0===e?void 0:e.takeRecords())||[])}_startPerformanceObserver(){this.performanceObserver=new PerformanceObserver((e=>{"complete"===window.document.readyState&&e.getEntries().forEach((e=>{var t;(null===(t=this.config.allowedInitiatorTypes)||void 0===t?void 0:t.includes(e.initiatorType))&&this._createSpan(e)}))})),this.performanceObserver.observe({entryTypes:["resource","navigation","element"]})}_startHeadMutationObserver(){this.headMutationObserver=new MutationObserver(this._processHeadMutationObserverRecords.bind(this)),this.headMutationObserver.observe(document.head,{childList:!0})}_processHeadMutationObserverRecords(e){o.context.active()!==o.ROOT_CONTEXT&&e.flatMap((e=>Array.from(e.addedNodes||[]))).filter(u).forEach((e=>{try{const t=e.getAttribute("src");if(!t)return;const n=new URL(t,location.origin);this.urlToContextMap[n.toString()]=o.context.active()}catch{o.diag.warn("Failed to process added node",e)}}))}_createSpan(e){if((0,n.isUrlIgnored)(e.name,this.config.ignoreUrls))return;const t=new URL(e.name,location.origin),o=this.tracer.startSpan("resourceFetch",{startTime:e.fetchStart},this.urlToContextMap[t.toString()]);o.setAttribute(a.ATTR_IMQA_RUM_COMPONENT,s),(0,i.spanResources)(o,this.config.screenNameOption),o.setAttribute(a.ATTR_URL_FULL,e.name),o.setAttribute(a.ATTR_HTTP_REQUEST_METHOD,"GET"),o.setAttribute(a.ATTR_IMQA_SPAN_TYPE,"post-docs"),(0,r.addSpanNetworkEvents)(o,e);const c=e.responseEnd;c&&c>0?o.end(c):o.end()}}return xN.IMQAPostDocLoadResourceInstrumentation=l,xN}(),DN={},jN={};var BN,VN,FN={},GN={},HN=n(un),YN=n(kR),qN={},zN={};function KN(){if(BN)return zN;BN=1,Object.defineProperty(zN,"__esModule",{value:!0}),zN.LogRecord=void 0;const e=Wt,t=Wt,n=ny;return zN.LogRecord=class{constructor(e,r,o){this.attributes={},this.totalAttributesCount=0,this._isReadonly=!1;const{timestamp:i,observedTimestamp:a,severityNumber:s,severityText:c,body:u,attributes:l={},context:p}=o,d=Date.now();if(this.hrTime=(0,n.timeInputToHrTime)(null!=i?i:d),this.hrTimeObserved=(0,n.timeInputToHrTime)(null!=a?a:d),p){const e=t.trace.getSpanContext(p);e&&t.isSpanContextValid(e)&&(this.spanContext=e)}this.severityNumber=s,this.severityText=c,this.body=u,this.resource=e.resource,this.instrumentationScope=r,this._logRecordLimits=e.logRecordLimits,this.setAttributes(l)}set severityText(e){this._isLogRecordReadonly()||(this._severityText=e)}get severityText(){return this._severityText}set severityNumber(e){this._isLogRecordReadonly()||(this._severityNumber=e)}get severityNumber(){return this._severityNumber}set body(e){this._isLogRecordReadonly()||(this._body=e)}get body(){return this._body}get droppedAttributesCount(){return this.totalAttributesCount-Object.keys(this.attributes).length}setAttribute(e,r){return this._isLogRecordReadonly()||null===r?this:0===e.length?(t.diag.warn(`Invalid attribute key: ${e}`),this):(0,n.isAttributeValue)(r)||"object"==typeof r&&!Array.isArray(r)&&Object.keys(r).length>0?(this.totalAttributesCount+=1,Object.keys(this.attributes).length>=this._logRecordLimits.attributeCountLimit&&!Object.prototype.hasOwnProperty.call(this.attributes,e)?(1===this.droppedAttributesCount&&t.diag.warn("Dropping extra attributes."),this):((0,n.isAttributeValue)(r)?this.attributes[e]=this._truncateToSize(r):this.attributes[e]=r,this)):(t.diag.warn(`Invalid attribute value set for key: ${e}`),this)}setAttributes(e){for(const[t,n]of Object.entries(e))this.setAttribute(t,n);return this}setBody(e){return this.body=e,this}setSeverityNumber(e){return this.severityNumber=e,this}setSeverityText(e){return this.severityText=e,this}_makeReadonly(){this._isReadonly=!0}_truncateToSize(e){const n=this._logRecordLimits.attributeValueLengthLimit;return n<=0?(t.diag.warn(`Attribute value limit must be positive, got ${n}`),e):"string"==typeof e?this._truncateToLimitUtil(e,n):Array.isArray(e)?e.map((e=>"string"==typeof e?this._truncateToLimitUtil(e,n):e)):e}_truncateToLimitUtil(e,t){return e.length<=t?e:e.substring(0,t)}_isLogRecordReadonly(){return this._isReadonly&&e.diag.warn("Can not execute the operation on emitted log record"),this._isReadonly}},zN}function WN(){if(VN)return qN;VN=1,Object.defineProperty(qN,"__esModule",{value:!0}),qN.Logger=void 0;const e=Wt,t=KN();return qN.Logger=class{constructor(e,t){this.instrumentationScope=e,this._sharedState=t}emit(n){const r=n.context||e.context.active(),o=new t.LogRecord(this._sharedState,this.instrumentationScope,Object.assign({context:r},n));this._sharedState.activeProcessor.onEmit(o,r),o._makeReadonly()}},qN}var QN,JN={};function $N(){if(QN)return JN;QN=1,Object.defineProperty(JN,"__esModule",{value:!0}),JN.reconfigureLimits=JN.loadDefaultConfig=void 0;const e=ny;return JN.loadDefaultConfig=function(){return{forceFlushTimeoutMillis:3e4,logRecordLimits:{attributeValueLengthLimit:(0,e.getEnv)().OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT,attributeCountLimit:(0,e.getEnv)().OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT},includeTraceContext:!0,mergeResourceWithDefaults:!0}},JN.reconfigureLimits=function(t){var n,r,o,i,a,s;const c=(0,e.getEnvWithoutDefaults)();return{attributeCountLimit:null!==(o=null!==(r=null!==(n=t.attributeCountLimit)&&void 0!==n?n:c.OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT)&&void 0!==r?r:c.OTEL_ATTRIBUTE_COUNT_LIMIT)&&void 0!==o?o:e.DEFAULT_ATTRIBUTE_COUNT_LIMIT,attributeValueLengthLimit:null!==(s=null!==(a=null!==(i=t.attributeValueLengthLimit)&&void 0!==i?i:c.OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT)&&void 0!==a?a:c.OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT)&&void 0!==s?s:e.DEFAULT_ATTRIBUTE_VALUE_LENGTH_LIMIT}},JN}var XN,ZN={};function eI(){if(XN)return ZN;XN=1,Object.defineProperty(ZN,"__esModule",{value:!0}),ZN.MultiLogRecordProcessor=void 0;const e=ny;return ZN.MultiLogRecordProcessor=class{constructor(e,t){this.processors=e,this.forceFlushTimeoutMillis=t}async forceFlush(){const t=this.forceFlushTimeoutMillis;await Promise.all(this.processors.map((n=>(0,e.callWithTimeout)(n.forceFlush(),t))))}onEmit(e,t){this.processors.forEach((n=>n.onEmit(e,t)))}async shutdown(){await Promise.all(this.processors.map((e=>e.shutdown())))}},ZN}var tI,nI,rI,oI,iI={},aI={};function sI(){if(tI)return aI;tI=1,Object.defineProperty(aI,"__esModule",{value:!0}),aI.NoopLogRecordProcessor=void 0;return aI.NoopLogRecordProcessor=class{forceFlush(){return Promise.resolve()}onEmit(e,t){}shutdown(){return Promise.resolve()}},aI}function cI(){if(nI)return iI;nI=1,Object.defineProperty(iI,"__esModule",{value:!0}),iI.LoggerProviderSharedState=void 0;const e=sI();return iI.LoggerProviderSharedState=class{constructor(t,n,r){this.resource=t,this.forceFlushTimeoutMillis=n,this.logRecordLimits=r,this.loggers=new Map,this.registeredLogRecordProcessors=[],this.activeProcessor=new e.NoopLogRecordProcessor}},iI}function uI(){return rI||(rI=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.LoggerProvider=e.DEFAULT_LOGGER_NAME=void 0;const t=Wt,n=HN,r=YN,o=ny,i=WN(),a=$N(),s=eI(),c=cI();e.DEFAULT_LOGGER_NAME="unknown";e.LoggerProvider=class{constructor(e={}){const t=(0,o.merge)({},(0,a.loadDefaultConfig)(),e),n=function(e,t){const n=null!=t?t:r.Resource.empty();return e?r.Resource.default().merge(n):n}(t.mergeResourceWithDefaults,e.resource);this._sharedState=new c.LoggerProviderSharedState(n,t.forceFlushTimeoutMillis,(0,a.reconfigureLimits)(t.logRecordLimits)),this._shutdownOnce=new o.BindOnceFuture(this._shutdown,this)}getLogger(r,o,a){if(this._shutdownOnce.isCalled)return t.diag.warn("A shutdown LoggerProvider cannot provide a Logger"),n.NOOP_LOGGER;r||t.diag.warn("Logger requested without instrumentation scope name.");const s=r||e.DEFAULT_LOGGER_NAME,c=`${s}@${o||""}:${(null==a?void 0:a.schemaUrl)||""}`;return this._sharedState.loggers.has(c)||this._sharedState.loggers.set(c,new i.Logger({name:s,version:o,schemaUrl:null==a?void 0:a.schemaUrl},this._sharedState)),this._sharedState.loggers.get(c)}addLogRecordProcessor(e){0===this._sharedState.registeredLogRecordProcessors.length&&this._sharedState.activeProcessor.shutdown().catch((e=>t.diag.error("Error while trying to shutdown current log record processor",e))),this._sharedState.registeredLogRecordProcessors.push(e),this._sharedState.activeProcessor=new s.MultiLogRecordProcessor(this._sharedState.registeredLogRecordProcessors,this._sharedState.forceFlushTimeoutMillis)}forceFlush(){return this._shutdownOnce.isCalled?(t.diag.warn("invalid attempt to force flush after LoggerProvider shutdown"),this._shutdownOnce.promise):this._sharedState.activeProcessor.forceFlush()}shutdown(){return this._shutdownOnce.isCalled?(t.diag.warn("shutdown may only be called once per LoggerProvider"),this._shutdownOnce.promise):this._shutdownOnce.call()}_shutdown(){return this._sharedState.activeProcessor.shutdown()}}}(GN)),GN}var lI,pI={},dI={},fI={},hI={};function mI(){if(lI)return hI;lI=1,Object.defineProperty(hI,"__esModule",{value:!0}),hI.equalsCaseInsensitive=hI.binarySearchUB=hI.setEquals=hI.FlatMap=hI.isPromiseAllSettledRejectionResult=hI.PromiseAllSettled=hI.callWithTimeout=hI.TimeoutError=hI.instrumentationScopeId=hI.hashAttributes=hI.isNotNullish=void 0,hI.isNotNullish=function(e){return null!=e},hI.hashAttributes=function(e){let t=Object.keys(e);return 0===t.length?"":(t=t.sort(),JSON.stringify(t.map((t=>[t,e[t]]))))},hI.instrumentationScopeId=function(e){var t,n;return`${e.name}:${null!==(t=e.version)&&void 0!==t?t:""}:${null!==(n=e.schemaUrl)&&void 0!==n?n:""}`};class e extends Error{constructor(t){super(t),Object.setPrototypeOf(this,e.prototype)}}return hI.TimeoutError=e,hI.callWithTimeout=function(t,n){let r;const o=new Promise((function(t,o){r=setTimeout((function(){o(new e("Operation timed out."))}),n)}));return Promise.race([t,o]).then((e=>(clearTimeout(r),e)),(e=>{throw clearTimeout(r),e}))},hI.PromiseAllSettled=async function(e){return Promise.all(e.map((async e=>{try{return{status:"fulfilled",value:await e}}catch(e){return{status:"rejected",reason:e}}})))},hI.isPromiseAllSettledRejectionResult=function(e){return"rejected"===e.status},hI.FlatMap=function(e,t){const n=[];return e.forEach((e=>{n.push(...t(e))})),n},hI.setEquals=function(e,t){if(e.size!==t.size)return!1;for(const n of e)if(!t.has(n))return!1;return!0},hI.binarySearchUB=function(e,t){let n=0,r=e.length-1,o=e.length;for(;r>=n;){const i=n+Math.trunc((r-n)/2);e[i]<t?n=i+1:(o=i,r=i-1)}return o},hI.equalsCaseInsensitive=function(e,t){return e.toLowerCase()===t.toLowerCase()},hI}var gI,_I={};function yI(){if(gI)return _I;gI=1,Object.defineProperty(_I,"__esModule",{value:!0}),_I.ViewRegistry=void 0;return _I.ViewRegistry=class{constructor(){this._registeredViews=[]}addView(e){this._registeredViews.push(e)}findViews(e,t){return this._registeredViews.filter((n=>this._matchInstrument(n.instrumentSelector,e)&&this._matchMeter(n.meterSelector,t)))}_matchInstrument(e,t){return(void 0===e.getType()||t.type===e.getType())&&e.getNameFilter().match(t.name)&&e.getUnitFilter().match(t.unit)}_matchMeter(e,t){return e.getNameFilter().match(t.name)&&(void 0===t.version||e.getVersionFilter().match(t.version))&&(void 0===t.schemaUrl||e.getSchemaUrlFilter().match(t.schemaUrl))}},_I}var vI,bI={},EI={};function SI(){return vI||(vI=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isValidName=e.isDescriptorCompatibleWith=e.createInstrumentDescriptorWithView=e.createInstrumentDescriptor=e.InstrumentType=void 0;const t=Wt,n=mI();!function(e){e.COUNTER="COUNTER",e.GAUGE="GAUGE",e.HISTOGRAM="HISTOGRAM",e.UP_DOWN_COUNTER="UP_DOWN_COUNTER",e.OBSERVABLE_COUNTER="OBSERVABLE_COUNTER",e.OBSERVABLE_GAUGE="OBSERVABLE_GAUGE",e.OBSERVABLE_UP_DOWN_COUNTER="OBSERVABLE_UP_DOWN_COUNTER"}(e.InstrumentType||(e.InstrumentType={})),e.createInstrumentDescriptor=function(e,n,r){var i,a,s,c;return o(e)||t.diag.warn(`Invalid metric name: "${e}". The metric name should be a ASCII string with a length no greater than 255 characters.`),{name:e,type:n,description:null!==(i=null==r?void 0:r.description)&&void 0!==i?i:"",unit:null!==(a=null==r?void 0:r.unit)&&void 0!==a?a:"",valueType:null!==(s=null==r?void 0:r.valueType)&&void 0!==s?s:t.ValueType.DOUBLE,advice:null!==(c=null==r?void 0:r.advice)&&void 0!==c?c:{}}},e.createInstrumentDescriptorWithView=function(e,t){var n,r;return{name:null!==(n=e.name)&&void 0!==n?n:t.name,description:null!==(r=e.description)&&void 0!==r?r:t.description,type:t.type,unit:t.unit,valueType:t.valueType,advice:t.advice}},e.isDescriptorCompatibleWith=function(e,t){return(0,n.equalsCaseInsensitive)(e.name,t.name)&&e.unit===t.unit&&e.type===t.type&&e.valueType===t.valueType};const r=/^[a-z][a-z0-9_.\-/]{0,254}$/i;function o(e){return null!=e.match(r)}e.isValidName=o}(EI)),EI}var TI,OI,AI={},wI={};function RI(){if(TI)return wI;TI=1,Object.defineProperty(wI,"__esModule",{value:!0}),wI.isObservableInstrument=wI.ObservableUpDownCounterInstrument=wI.ObservableGaugeInstrument=wI.ObservableCounterInstrument=wI.ObservableInstrument=wI.HistogramInstrument=wI.GaugeInstrument=wI.CounterInstrument=wI.UpDownCounterInstrument=wI.SyncInstrument=void 0;const e=Wt,t=ny;class n{constructor(e,t){this._writableMetricStorage=e,this._descriptor=t}_record(n,r={},o=e.context.active()){"number"==typeof n?(this._descriptor.valueType!==e.ValueType.INT||Number.isInteger(n)||(e.diag.warn(`INT value type cannot accept a floating-point value for ${this._descriptor.name}, ignoring the fractional digits.`),n=Math.trunc(n),Number.isInteger(n)))&&this._writableMetricStorage.record(n,r,o,(0,t.millisToHrTime)(Date.now())):e.diag.warn(`non-number value provided to metric ${this._descriptor.name}: ${n}`)}}wI.SyncInstrument=n;wI.UpDownCounterInstrument=class extends n{add(e,t,n){this._record(e,t,n)}};wI.CounterInstrument=class extends n{add(t,n,r){t<0?e.diag.warn(`negative value provided to counter ${this._descriptor.name}: ${t}`):this._record(t,n,r)}};wI.GaugeInstrument=class extends n{record(e,t,n){this._record(e,t,n)}};wI.HistogramInstrument=class extends n{record(t,n,r){t<0?e.diag.warn(`negative value provided to histogram ${this._descriptor.name}: ${t}`):this._record(t,n,r)}};class r{constructor(e,t,n){this._observableRegistry=n,this._descriptor=e,this._metricStorages=t}addCallback(e){this._observableRegistry.addCallback(e,this)}removeCallback(e){this._observableRegistry.removeCallback(e,this)}}wI.ObservableInstrument=r;wI.ObservableCounterInstrument=class extends r{};wI.ObservableGaugeInstrument=class extends r{};return wI.ObservableUpDownCounterInstrument=class extends r{},wI.isObservableInstrument=function(e){return e instanceof r},wI}function NI(){if(OI)return AI;OI=1,Object.defineProperty(AI,"__esModule",{value:!0}),AI.Meter=void 0;const e=SI(),t=RI();return AI.Meter=class{constructor(e){this._meterSharedState=e}createGauge(n,r){const o=(0,e.createInstrumentDescriptor)(n,e.InstrumentType.GAUGE,r),i=this._meterSharedState.registerMetricStorage(o);return new t.GaugeInstrument(i,o)}createHistogram(n,r){const o=(0,e.createInstrumentDescriptor)(n,e.InstrumentType.HISTOGRAM,r),i=this._meterSharedState.registerMetricStorage(o);return new t.HistogramInstrument(i,o)}createCounter(n,r){const o=(0,e.createInstrumentDescriptor)(n,e.InstrumentType.COUNTER,r),i=this._meterSharedState.registerMetricStorage(o);return new t.CounterInstrument(i,o)}createUpDownCounter(n,r){const o=(0,e.createInstrumentDescriptor)(n,e.InstrumentType.UP_DOWN_COUNTER,r),i=this._meterSharedState.registerMetricStorage(o);return new t.UpDownCounterInstrument(i,o)}createObservableGauge(n,r){const o=(0,e.createInstrumentDescriptor)(n,e.InstrumentType.OBSERVABLE_GAUGE,r),i=this._meterSharedState.registerAsyncMetricStorage(o);return new t.ObservableGaugeInstrument(o,i,this._meterSharedState.observableRegistry)}createObservableCounter(n,r){const o=(0,e.createInstrumentDescriptor)(n,e.InstrumentType.OBSERVABLE_COUNTER,r),i=this._meterSharedState.registerAsyncMetricStorage(o);return new t.ObservableCounterInstrument(o,i,this._meterSharedState.observableRegistry)}createObservableUpDownCounter(n,r){const o=(0,e.createInstrumentDescriptor)(n,e.InstrumentType.OBSERVABLE_UP_DOWN_COUNTER,r),i=this._meterSharedState.registerAsyncMetricStorage(o);return new t.ObservableUpDownCounterInstrument(o,i,this._meterSharedState.observableRegistry)}addBatchObservableCallback(e,t){this._meterSharedState.observableRegistry.addBatchCallback(e,t)}removeBatchObservableCallback(e,t){this._meterSharedState.observableRegistry.removeBatchCallback(e,t)}},AI}var II,PI={},xI={};function CI(){if(II)return xI;II=1,Object.defineProperty(xI,"__esModule",{value:!0}),xI.MetricStorage=void 0;const e=SI();return xI.MetricStorage=class{constructor(e){this._instrumentDescriptor=e}getInstrumentDescriptor(){return this._instrumentDescriptor}updateDescription(t){this._instrumentDescriptor=(0,e.createInstrumentDescriptor)(this._instrumentDescriptor.name,this._instrumentDescriptor.type,{description:t,valueType:this._instrumentDescriptor.valueType,unit:this._instrumentDescriptor.unit,advice:this._instrumentDescriptor.advice})}},xI}var MI,LI,UI={},kI={};function DI(){if(MI)return kI;MI=1,Object.defineProperty(kI,"__esModule",{value:!0}),kI.AttributeHashMap=kI.HashMap=void 0;const e=mI();let t=class{constructor(e){this._hash=e,this._valueMap=new Map,this._keyMap=new Map}get(e,t){return null!=t||(t=this._hash(e)),this._valueMap.get(t)}getOrDefault(e,t){const n=this._hash(e);if(this._valueMap.has(n))return this._valueMap.get(n);const r=t();return this._keyMap.has(n)||this._keyMap.set(n,e),this._valueMap.set(n,r),r}set(e,t,n){null!=n||(n=this._hash(e)),this._keyMap.has(n)||this._keyMap.set(n,e),this._valueMap.set(n,t)}has(e,t){return null!=t||(t=this._hash(e)),this._valueMap.has(t)}*keys(){const e=this._keyMap.entries();let t=e.next();for(;!0!==t.done;)yield[t.value[1],t.value[0]],t=e.next()}*entries(){const e=this._valueMap.entries();let t=e.next();for(;!0!==t.done;)yield[this._keyMap.get(t.value[0]),t.value[1],t.value[0]],t=e.next()}get size(){return this._valueMap.size}};kI.HashMap=t;return kI.AttributeHashMap=class extends t{constructor(){super(e.hashAttributes)}},kI}function jI(){if(LI)return UI;LI=1,Object.defineProperty(UI,"__esModule",{value:!0}),UI.DeltaMetricProcessor=void 0;const e=mI(),t=DI();return UI.DeltaMetricProcessor=class{constructor(n,r){this._aggregator=n,this._activeCollectionStorage=new t.AttributeHashMap,this._cumulativeMemoStorage=new t.AttributeHashMap,this._overflowAttributes={"otel.metric.overflow":!0},this._cardinalityLimit=(null!=r?r:2e3)-1,this._overflowHashCode=(0,e.hashAttributes)(this._overflowAttributes)}record(e,t,n,r){let o=this._activeCollectionStorage.get(t);if(!o){if(this._activeCollectionStorage.size>=this._cardinalityLimit){const t=this._activeCollectionStorage.getOrDefault(this._overflowAttributes,(()=>this._aggregator.createAccumulation(r)));return void(null==t||t.record(e))}o=this._aggregator.createAccumulation(r),this._activeCollectionStorage.set(t,o)}null==o||o.record(e)}batchCumulate(e,t){Array.from(e.entries()).forEach((([e,n,r])=>{const o=this._aggregator.createAccumulation(t);null==o||o.record(n);let i=o;if(this._cumulativeMemoStorage.has(e,r)){const t=this._cumulativeMemoStorage.get(e,r);i=this._aggregator.diff(t,o)}else if(this._cumulativeMemoStorage.size>=this._cardinalityLimit&&(e=this._overflowAttributes,r=this._overflowHashCode,this._cumulativeMemoStorage.has(e,r))){const t=this._cumulativeMemoStorage.get(e,r);i=this._aggregator.diff(t,o)}if(this._activeCollectionStorage.has(e,r)){const t=this._activeCollectionStorage.get(e,r);i=this._aggregator.merge(t,i)}this._cumulativeMemoStorage.set(e,o,r),this._activeCollectionStorage.set(e,i,r)}))}collect(){const e=this._activeCollectionStorage;return this._activeCollectionStorage=new t.AttributeHashMap,e}},UI}var BI,VI,FI,GI={},HI={};function YI(){return BI||(BI=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.AggregationTemporality=void 0,function(e){e[e.DELTA=0]="DELTA",e[e.CUMULATIVE=1]="CUMULATIVE"}(e.AggregationTemporality||(e.AggregationTemporality={}))}(HI)),HI}function qI(){if(VI)return GI;VI=1,Object.defineProperty(GI,"__esModule",{value:!0}),GI.TemporalMetricProcessor=void 0;const e=YI(),t=DI();return GI.TemporalMetricProcessor=class n{constructor(e,t){this._aggregator=e,this._unreportedAccumulations=new Map,this._reportHistory=new Map,t.forEach((e=>{this._unreportedAccumulations.set(e,[])}))}buildMetrics(t,r,o,i){this._stashAccumulations(o);const a=this._getMergedUnreportedAccumulations(t);let s,c=a;if(this._reportHistory.has(t)){const r=this._reportHistory.get(t),o=r.collectionTime;s=r.aggregationTemporality,c=s===e.AggregationTemporality.CUMULATIVE?n.merge(r.accumulations,a,this._aggregator):n.calibrateStartTime(r.accumulations,a,o)}else s=t.selectAggregationTemporality(r.type);this._reportHistory.set(t,{accumulations:c,collectionTime:i,aggregationTemporality:s});const u=(l=c,Array.from(l.entries()));var l;if(0!==u.length)return this._aggregator.toMetricData(r,s,u,i)}_stashAccumulations(e){const t=this._unreportedAccumulations.keys();for(const n of t){let t=this._unreportedAccumulations.get(n);void 0===t&&(t=[],this._unreportedAccumulations.set(n,t)),t.push(e)}}_getMergedUnreportedAccumulations(e){let r=new t.AttributeHashMap;const o=this._unreportedAccumulations.get(e);if(this._unreportedAccumulations.set(e,[]),void 0===o)return r;for(const e of o)r=n.merge(r,e,this._aggregator);return r}static merge(e,t,n){const r=e,o=t.entries();let i=o.next();for(;!0!==i.done;){const[t,a,s]=i.value;if(e.has(t,s)){const o=e.get(t,s),i=n.merge(o,a);r.set(t,i,s)}else r.set(t,a,s);i=o.next()}return r}static calibrateStartTime(e,t,n){for(const[r,o]of e.keys()){const e=t.get(r,o);null==e||e.setStartTime(n)}return t}},GI}function zI(){if(FI)return PI;FI=1,Object.defineProperty(PI,"__esModule",{value:!0}),PI.AsyncMetricStorage=void 0;const e=CI(),t=jI(),n=qI(),r=DI();let o=class extends e.MetricStorage{constructor(e,r,o,i,a){super(e),this._attributesProcessor=o,this._aggregationCardinalityLimit=a,this._deltaMetricStorage=new t.DeltaMetricProcessor(r,this._aggregationCardinalityLimit),this._temporalMetricStorage=new n.TemporalMetricProcessor(r,i)}record(e,t){const n=new r.AttributeHashMap;Array.from(e.entries()).forEach((([e,t])=>{n.set(this._attributesProcessor.process(e),t)})),this._deltaMetricStorage.batchCumulate(n,t)}collect(e,t){const n=this._deltaMetricStorage.collect();return this._temporalMetricStorage.buildMetrics(e,this._instrumentDescriptor,n,t)}};return PI.AsyncMetricStorage=o,PI}var KI,WI,QI={},JI={};function $I(){if(KI)return JI;function e(e,t){return`\t- use valueType '${e.valueType}' on instrument creation or use an instrument name other than '${t.name}'`}function t(e,t){return`\t- use unit '${e.unit}' on instrument creation or use an instrument name other than '${t.name}'`}function n(e,t){const n={name:t.name,type:t.type,unit:t.unit},r=JSON.stringify(n);return`\t- create a new view with a name other than '${e.name}' and InstrumentSelector '${r}'`}function r(e,t){const n={name:t.name,type:t.type,unit:t.unit},r=JSON.stringify(n);return`\t- create a new view with a name other than '${e.name}' and InstrumentSelector '${r}'\n    \t- OR - create a new view with the name ${e.name} and description '${e.description}' and InstrumentSelector ${r}\n    \t- OR - create a new view with the name ${t.name} and description '${e.description}' and InstrumentSelector ${r}`}return KI=1,Object.defineProperty(JI,"__esModule",{value:!0}),JI.getConflictResolutionRecipe=JI.getDescriptionResolutionRecipe=JI.getTypeConflictResolutionRecipe=JI.getUnitConflictResolutionRecipe=JI.getValueTypeConflictResolutionRecipe=JI.getIncompatibilityDetails=void 0,JI.getIncompatibilityDetails=function(e,t){let n="";return e.unit!==t.unit&&(n+=`\t- Unit '${e.unit}' does not match '${t.unit}'\n`),e.type!==t.type&&(n+=`\t- Type '${e.type}' does not match '${t.type}'\n`),e.valueType!==t.valueType&&(n+=`\t- Value Type '${e.valueType}' does not match '${t.valueType}'\n`),e.description!==t.description&&(n+=`\t- Description '${e.description}' does not match '${t.description}'\n`),n},JI.getValueTypeConflictResolutionRecipe=e,JI.getUnitConflictResolutionRecipe=t,JI.getTypeConflictResolutionRecipe=n,JI.getDescriptionResolutionRecipe=r,JI.getConflictResolutionRecipe=function(o,i){return o.valueType!==i.valueType?e(o,i):o.unit!==i.unit?t(o,i):o.type!==i.type?n(o,i):o.description!==i.description?r(o,i):""},JI}function XI(){if(WI)return QI;WI=1,Object.defineProperty(QI,"__esModule",{value:!0}),QI.MetricStorageRegistry=void 0;const e=SI(),t=Wt,n=$I();return QI.MetricStorageRegistry=class r{constructor(){this._sharedRegistry=new Map,this._perCollectorRegistry=new Map}static create(){return new r}getStorages(e){let t=[];for(const e of this._sharedRegistry.values())t=t.concat(e);const n=this._perCollectorRegistry.get(e);if(null!=n)for(const e of n.values())t=t.concat(e);return t}register(e){this._registerStorage(e,this._sharedRegistry)}registerForCollector(e,t){let n=this._perCollectorRegistry.get(e);null==n&&(n=new Map,this._perCollectorRegistry.set(e,n)),this._registerStorage(t,n)}findOrUpdateCompatibleStorage(e){const t=this._sharedRegistry.get(e.name);return void 0===t?null:this._findOrUpdateCompatibleStorage(e,t)}findOrUpdateCompatibleCollectorStorage(e,t){const n=this._perCollectorRegistry.get(e);if(void 0===n)return null;const r=n.get(t.name);return void 0===r?null:this._findOrUpdateCompatibleStorage(t,r)}_registerStorage(e,t){const n=e.getInstrumentDescriptor(),r=t.get(n.name);void 0!==r?r.push(e):t.set(n.name,[e])}_findOrUpdateCompatibleStorage(r,o){let i=null;for(const a of o){const o=a.getInstrumentDescriptor();(0,e.isDescriptorCompatibleWith)(o,r)?(o.description!==r.description&&(r.description.length>o.description.length&&a.updateDescription(r.description),t.diag.warn("A view or instrument with the name ",r.name," has already been registered, but has a different description and is incompatible with another registered view.\n","Details:\n",(0,n.getIncompatibilityDetails)(o,r),"The longer description will be used.\nTo resolve the conflict:",(0,n.getConflictResolutionRecipe)(o,r))),i=a):t.diag.warn("A view or instrument with the name ",r.name," has already been registered and is incompatible with another registered view.\n","Details:\n",(0,n.getIncompatibilityDetails)(o,r),"To resolve the conflict:\n",(0,n.getConflictResolutionRecipe)(o,r))}return i}},QI}var ZI,eP={};function tP(){if(ZI)return eP;ZI=1,Object.defineProperty(eP,"__esModule",{value:!0}),eP.MultiMetricStorage=void 0;return eP.MultiMetricStorage=class{constructor(e){this._backingStorages=e}record(e,t,n,r){this._backingStorages.forEach((o=>{o.record(e,t,n,r)}))}},eP}var nP,rP,oP={},iP={};function aP(){if(nP)return iP;nP=1,Object.defineProperty(iP,"__esModule",{value:!0}),iP.BatchObservableResultImpl=iP.ObservableResultImpl=void 0;const e=Wt,t=DI(),n=RI();iP.ObservableResultImpl=class{constructor(e,n){this._instrumentName=e,this._valueType=n,this._buffer=new t.AttributeHashMap}observe(t,n={}){"number"==typeof t?(this._valueType!==e.ValueType.INT||Number.isInteger(t)||(e.diag.warn(`INT value type cannot accept a floating-point value for ${this._instrumentName}, ignoring the fractional digits.`),t=Math.trunc(t),Number.isInteger(t)))&&this._buffer.set(n,t):e.diag.warn(`non-number value provided to metric ${this._instrumentName}: ${t}`)}};return iP.BatchObservableResultImpl=class{constructor(){this._buffer=new Map}observe(r,o,i={}){if(!(0,n.isObservableInstrument)(r))return;let a=this._buffer.get(r);null==a&&(a=new t.AttributeHashMap,this._buffer.set(r,a)),"number"==typeof o?(r._descriptor.valueType!==e.ValueType.INT||Number.isInteger(o)||(e.diag.warn(`INT value type cannot accept a floating-point value for ${r._descriptor.name}, ignoring the fractional digits.`),o=Math.trunc(o),Number.isInteger(o)))&&a.set(i,o):e.diag.warn(`non-number value provided to metric ${r._descriptor.name}: ${o}`)}},iP}function sP(){if(rP)return oP;rP=1,Object.defineProperty(oP,"__esModule",{value:!0}),oP.ObservableRegistry=void 0;const e=Wt,t=RI(),n=aP(),r=mI();return oP.ObservableRegistry=class{constructor(){this._callbacks=[],this._batchCallbacks=[]}addCallback(e,t){this._findCallback(e,t)>=0||this._callbacks.push({callback:e,instrument:t})}removeCallback(e,t){const n=this._findCallback(e,t);n<0||this._callbacks.splice(n,1)}addBatchCallback(n,r){const o=new Set(r.filter(t.isObservableInstrument));if(0===o.size)return void e.diag.error("BatchObservableCallback is not associated with valid instruments",r);this._findBatchCallback(n,o)>=0||this._batchCallbacks.push({callback:n,instruments:o})}removeBatchCallback(e,n){const r=new Set(n.filter(t.isObservableInstrument)),o=this._findBatchCallback(e,r);o<0||this._batchCallbacks.splice(o,1)}async observe(e,t){const n=this._observeCallbacks(e,t),o=this._observeBatchCallbacks(e,t);return(await(0,r.PromiseAllSettled)([...n,...o])).filter(r.isPromiseAllSettledRejectionResult).map((e=>e.reason))}_observeCallbacks(e,t){return this._callbacks.map((async({callback:o,instrument:i})=>{const a=new n.ObservableResultImpl(i._descriptor.name,i._descriptor.valueType);let s=Promise.resolve(o(a));null!=t&&(s=(0,r.callWithTimeout)(s,t)),await s,i._metricStorages.forEach((t=>{t.record(a._buffer,e)}))}))}_observeBatchCallbacks(e,t){return this._batchCallbacks.map((async({callback:o,instruments:i})=>{const a=new n.BatchObservableResultImpl;let s=Promise.resolve(o(a));null!=t&&(s=(0,r.callWithTimeout)(s,t)),await s,i.forEach((t=>{const n=a._buffer.get(t);null!=n&&t._metricStorages.forEach((t=>{t.record(n,e)}))}))}))}_findCallback(e,t){return this._callbacks.findIndex((n=>n.callback===e&&n.instrument===t))}_findBatchCallback(e,t){return this._batchCallbacks.findIndex((n=>n.callback===e&&(0,r.setEquals)(n.instruments,t)))}},oP}var cP,uP={};function lP(){if(cP)return uP;cP=1,Object.defineProperty(uP,"__esModule",{value:!0}),uP.SyncMetricStorage=void 0;const e=CI(),t=jI(),n=qI();let r=class extends e.MetricStorage{constructor(e,r,o,i,a){super(e),this._attributesProcessor=o,this._aggregationCardinalityLimit=a,this._deltaMetricStorage=new t.DeltaMetricProcessor(r,this._aggregationCardinalityLimit),this._temporalMetricStorage=new n.TemporalMetricProcessor(r,i)}record(e,t,n,r){t=this._attributesProcessor.process(t,n),this._deltaMetricStorage.record(e,t,n,r)}collect(e,t){const n=this._deltaMetricStorage.collect();return this._temporalMetricStorage.buildMetrics(e,this._instrumentDescriptor,n,t)}};return uP.SyncMetricStorage=r,uP}var pP,dP,fP,hP={};function mP(){if(pP)return hP;pP=1,Object.defineProperty(hP,"__esModule",{value:!0}),hP.FilteringAttributesProcessor=hP.NoopAttributesProcessor=hP.AttributesProcessor=void 0;let e=class{static Noop(){return n}};hP.AttributesProcessor=e;class t extends e{process(e,t){return e}}hP.NoopAttributesProcessor=t;hP.FilteringAttributesProcessor=class extends e{constructor(e){super(),this._allowedAttributeNames=e}process(e,t){const n={};return Object.keys(e).filter((e=>this._allowedAttributeNames.includes(e))).forEach((t=>n[t]=e[t])),n}};const n=new t;return hP}function gP(){if(dP)return bI;dP=1,Object.defineProperty(bI,"__esModule",{value:!0}),bI.MeterSharedState=void 0;const e=SI(),t=NI(),n=mI(),r=zI(),o=XI(),i=tP(),a=sP(),s=lP(),c=mP();return bI.MeterSharedState=class{constructor(e,n){this._meterProviderSharedState=e,this._instrumentationScope=n,this.metricStorageRegistry=new o.MetricStorageRegistry,this.observableRegistry=new a.ObservableRegistry,this.meter=new t.Meter(this)}registerMetricStorage(e){const t=this._registerMetricStorage(e,s.SyncMetricStorage);return 1===t.length?t[0]:new i.MultiMetricStorage(t)}registerAsyncMetricStorage(e){return this._registerMetricStorage(e,r.AsyncMetricStorage)}async collect(e,t,r){const o=await this.observableRegistry.observe(t,null==r?void 0:r.timeoutMillis),i=this.metricStorageRegistry.getStorages(e);if(0===i.length)return null;const a=i.map((n=>n.collect(e,t))).filter(n.isNotNullish);return 0===a.length?{errors:o}:{scopeMetrics:{scope:this._instrumentationScope,metrics:a},errors:o}}_registerMetricStorage(t,n){let r=this._meterProviderSharedState.viewRegistry.findViews(t,this._instrumentationScope).map((r=>{const o=(0,e.createInstrumentDescriptorWithView)(r,t),i=this.metricStorageRegistry.findOrUpdateCompatibleStorage(o);if(null!=i)return i;const a=r.aggregation.createAggregator(o),s=new n(o,a,r.attributesProcessor,this._meterProviderSharedState.metricCollectors,r.aggregationCardinalityLimit);return this.metricStorageRegistry.register(s),s}));if(0===r.length){const e=this._meterProviderSharedState.selectAggregations(t.type).map((([e,r])=>{const o=this.metricStorageRegistry.findOrUpdateCompatibleCollectorStorage(e,t);if(null!=o)return o;const i=r.createAggregator(t),a=e.selectCardinalityLimit(t.type),s=new n(t,i,c.AttributesProcessor.Noop(),[e],a);return this.metricStorageRegistry.registerForCollector(e,s),s}));r=r.concat(e)}return r}},bI}function _P(){if(fP)return fI;fP=1,Object.defineProperty(fI,"__esModule",{value:!0}),fI.MeterProviderSharedState=void 0;const e=mI(),t=yI(),n=gP();return fI.MeterProviderSharedState=class{constructor(e){this.resource=e,this.viewRegistry=new t.ViewRegistry,this.metricCollectors=[],this.meterSharedStates=new Map}getMeterSharedState(t){const r=(0,e.instrumentationScopeId)(t);let o=this.meterSharedStates.get(r);return null==o&&(o=new n.MeterSharedState(this,t),this.meterSharedStates.set(r,o)),o}selectAggregations(e){const t=[];for(const n of this.metricCollectors)t.push([n,n.selectAggregation(e)]);return t}},fI}var yP,vP,bP,EP,SP={};function TP(){if(yP)return SP;yP=1,Object.defineProperty(SP,"__esModule",{value:!0}),SP.MetricCollector=void 0;const e=ny;return SP.MetricCollector=class{constructor(e,t){this._sharedState=e,this._metricReader=t}async collect(t){const n=(0,e.millisToHrTime)(Date.now()),r=[],o=[],i=Array.from(this._sharedState.meterSharedStates.values()).map((async e=>{const i=await e.collect(this,n,t);null!=(null==i?void 0:i.scopeMetrics)&&r.push(i.scopeMetrics),null!=(null==i?void 0:i.errors)&&o.push(...i.errors)}));return await Promise.all(i),{resourceMetrics:{resource:this._sharedState.resource,scopeMetrics:r},errors:o}}async forceFlush(e){await this._metricReader.forceFlush(e)}async shutdown(e){await this._metricReader.shutdown(e)}selectAggregationTemporality(e){return this._metricReader.selectAggregationTemporality(e)}selectAggregation(e){return this._metricReader.selectAggregation(e)}selectCardinalityLimit(e){var t,n,r;return null!==(r=null===(n=(t=this._metricReader).selectCardinalityLimit)||void 0===n?void 0:n.call(t,e))&&void 0!==r?r:2e3}},SP}function OP(){if(vP)return dI;vP=1,Object.defineProperty(dI,"__esModule",{value:!0}),dI.MeterProvider=void 0;const e=Wt,t=YN,n=_P(),r=TP();return dI.MeterProvider=class{constructor(e){var r;if(this._shutdown=!1,this._sharedState=new n.MeterProviderSharedState(function(e,n){const r=null!=n?n:t.Resource.empty();return e?t.Resource.default().merge(r):r}(null===(r=null==e?void 0:e.mergeResourceWithDefaults)||void 0===r||r,null==e?void 0:e.resource)),null!=(null==e?void 0:e.views)&&e.views.length>0)for(const t of e.views)this._sharedState.viewRegistry.addView(t);if(null!=(null==e?void 0:e.readers)&&e.readers.length>0)for(const t of e.readers)this.addMetricReader(t)}getMeter(t,n="",r={}){return this._shutdown?(e.diag.warn("A shutdown MeterProvider cannot provide a Meter"),(0,e.createNoopMeter)()):this._sharedState.getMeterSharedState({name:t,version:n,schemaUrl:r.schemaUrl}).meter}addMetricReader(e){const t=new r.MetricCollector(this._sharedState,e);e.setMetricProducer(t),this._sharedState.metricCollectors.push(t)}async shutdown(t){this._shutdown?e.diag.warn("shutdown may only be called once per MeterProvider"):(this._shutdown=!0,await Promise.all(this._sharedState.metricCollectors.map((e=>e.shutdown(t)))))}async forceFlush(t){this._shutdown?e.diag.warn("invalid attempt to force flush after MeterProvider shutdown"):await Promise.all(this._sharedState.metricCollectors.map((e=>e.forceFlush(t))))}},dI}var AP,wP=(EP||(EP=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=F;t.__exportStar(function(){if(UN)return jN;UN=1,Object.defineProperty(jN,"__esModule",{value:!0}),jN.IMQAWebTracerProvider=void 0;const e=Wt,t=LN;class n extends t.WebTracerProvider{shutdown(){return new Promise((t=>{e.propagation.disable(),e.context.disable(),e.trace.disable(),t()})).then((()=>super.shutdown()))}}return jN.IMQAWebTracerProvider=n,jN}(),e),t.__exportStar(function(){if(oI)return FN;oI=1,Object.defineProperty(FN,"__esModule",{value:!0}),FN.IMQALoggerProvider=void 0;const e=Wt,t=uI();class n extends t.LoggerProvider{shutdown(){return new Promise((t=>{e.propagation.disable(),e.context.disable(),e.trace.disable(),t()})).then((()=>super.shutdown()))}}return FN.IMQALoggerProvider=n,FN}(),e),t.__exportStar(function(){if(bP)return pI;bP=1,Object.defineProperty(pI,"__esModule",{value:!0}),pI.IMQAMeterProvider=void 0;const e=Wt,t=OP();class n extends t.MeterProvider{shutdown(){return new Promise((t=>{e.propagation.disable(),e.context.disable(),e.trace.disable(),t()})).then((()=>super.shutdown()))}}return pI.IMQAMeterProvider=n,pI}(),e)}(DN)),DN),RP={};var NP,IP=(AP||(AP=1,Object.defineProperty(RP,"__esModule",{value:!0}),RP.InternalEventTarget=void 0,RP.InternalEventTarget=class{constructor(){this.events={}}addEventListener(e,t){this.events[e]||(this.events[e]=[]),this.events[e].push(t)}removeEventListener(e,t){if(!this.events[e])return;const n=this.events[e].indexOf(t);n>=0&&this.events[e].splice(n,1)}emit(e,t){const n=this.events[e];n&&n.forEach((e=>{Promise.resolve({payload:t}).then(e)}))}}),RP),PP={};var xP=function(){if(NP)return PP;NP=1,Object.defineProperty(PP,"__esModule",{value:!0}),PP.IMQAContextManager=void 0;const e=Wt,t=pn(),n=RN(),r="__imqa_context";return PP.IMQAContextManager=class{_config;_enabled=!1;_currentContext=e.ROOT_CONTEXT;_hashChangeContext=null;constructor(e={}){this._config=e}_bindFunction(t,n=e.ROOT_CONTEXT){const r=this,o=function(...e){return r.with(n,(()=>t.apply(this,e)))};return Object.defineProperty(o,"length",{enumerable:!1,configurable:!0,writable:!1,value:t.length}),o}active(){return this._currentContext}bind(e,t){return(0,n.isFunction)(t)?this._bindFunction(t,e):t}disable(){return this._enabled?(this._config.async&&(this._unpatchTimeouts(),this._unpatchPromise(),this._unpatchMutationObserver(),this._unpatchEvents(),this._unpatchMessageChannel()),this._currentContext=e.ROOT_CONTEXT,this._enabled=!1,this):this}enable(){return this._enabled||(this._config.async&&(this._patchTimeouts(),this._patchPromise(),this._patchMutationObserver(),this._patchEvents(),this._patchMessageChannel()),this._enabled=!0,this._currentContext=e.ROOT_CONTEXT),this}bindActiveToArgument(e,t){(0,n.isFunction)(e[t])&&(e[t]=this.bind(this.active(),e[t]))}_patchTimeouts(){const e=this;(0,n.wrapNatively)(window,"setTimeout",(t=>function(...n){return(!n[1]||n[1]<=34)&&e.bindActiveToArgument(n,0),t.apply(this,n)})),"function"==typeof window.setImmediate&&(0,n.wrapNatively)(window,"setImmediate",(t=>function(...n){return e.bindActiveToArgument(n,0),t.apply(this,n)})),"function"==typeof window.requestAnimationFrame&&(0,n.wrapNatively)(window,"requestAnimationFrame",(t=>function(...n){return e.bindActiveToArgument(n,0),t.apply(this,n)}))}_unpatchTimeouts(){(0,t.unwrap)(window,"setTimeout"),"function"==typeof window.setImmediate&&(0,t.unwrap)(window,"setImmediate")}_patchPromise(){if(!window.Promise)return;const e=this;(0,n.wrapNatively)(Promise.prototype,"then",(t=>function(...n){return e.bindActiveToArgument(n,0),e.bindActiveToArgument(n,1),t.apply(this,n)})),(0,n.wrapNatively)(Promise.prototype,"catch",(t=>function(...n){return e.bindActiveToArgument(n,0),t.apply(this,n)})),(0,n.wrapNatively)(Promise.prototype,"finally",(t=>function(...n){return e.bindActiveToArgument(n,0),t.apply(this,n)}))}_unpatchPromise(){window.Promise&&((0,t.unwrap)(Promise.prototype,"then"),(0,t.unwrap)(Promise.prototype,"catch"),(0,t.unwrap)(Promise.prototype,"finally"))}_patchMutationObserver(){const e=this;(0,n.wrapNatively)(window,"MutationObserver",(t=>class extends t{constructor(...t){if((0,n.isFunction)(t[0])){const n=t[0];t[0]=function(...t){return this[r]&&e._enabled?e.with(this[r],n,this,...t):n.apply(this,t)}}super(...t),Object.defineProperty(this,r,{value:null,writable:!0,enumerable:!1})}observe(...t){if(t[0]&&t[0]instanceof Text&&!t[0].parentNode&&t[1]&&t[1].characterData){const n=this,o=t[0],i=Object.getOwnPropertyDescriptor(CharacterData.prototype,"data");Object.defineProperty(o,"data",{...i,enumerable:!1,set:function(...t){const o=e.active();if(o&&(n[r]=o),i&&i.set)return i.set.apply(this,t)}})}return super.observe(...t)}}))}_unpatchMutationObserver(){(0,t.unwrap)(window,"MutationObserver")}_contextResumingListeners=new WeakMap;_getListenersMap(e,t){this._contextResumingListeners.has(e)||this._contextResumingListeners.set(e,new Map);const n=this._contextResumingListeners.get(e);if(!n)throw new Error("Listeners by type map is undefined");n.has(t)||n.set(t,new WeakMap);const r=n.get(t);if(!r)throw new Error("Listeners by type map is undefined");return r}_patchEvents(){const e=this;(0,n.wrapNatively)(XMLHttpRequest.prototype,"addEventListener",(t=>function(...r){if((0,n.isFunction)(r[1])){const t=e._getListenersMap(this,r[0]);let n=t.get(r[1]);n||(n=e.bind(e.active(),r[1]),t.set(r[1],n)),r[1]=n}return t.apply(this,r)})),(0,n.wrapNatively)(XMLHttpRequest.prototype,"removeEventListener",(t=>function(...r){if((0,n.isFunction)(r[1])){const t=e._getListenersMap(this,r[0]).get(r[1]);t&&(r[1]=t)}return t.apply(this,r)})),["onabort","onerror","onload","onloadend","onloadstart","onprogress","ontimeout"].forEach((t=>{const r=Object.getOwnPropertyDescriptor(XMLHttpRequestEventTarget.prototype,t);r&&((0,n.wrapNatively)(r,"get",(e=>function(){const t=e?e.call(this):void 0;return(0,n.isFunction)(t)&&t._orig?t._orig:t})),(0,n.wrapNatively)(r,"set",(t=>function(r){if((0,n.isFunction)(r)){const t=r,n=e.bind(e.active(),r);n._orig=t,r=n}if(t)return t.call(this,r)})),r&&Object.defineProperty(XMLHttpRequestEventTarget.prototype,t,r))})),(0,n.wrapNatively)(Window.prototype,"addEventListener",(t=>function(...r){if("hashchange"===r[0]&&(0,n.isFunction)(r[1])){const t=e._getListenersMap(this,r[0]);let n=t.get(r[1]);n||(n=e._getWrappedEventListener(r[1],(()=>e._hashChangeContext||void 0)),t.set(r[1],n)),r[1]=n}return t.apply(this,r)}));const t=Object.getOwnPropertyDescriptor(window,"onhashchange");t&&((0,n.wrapNatively)(t,"get",(e=>function(){const t=e?e.call(this):void 0;return(0,n.isFunction)(t)&&t._orig?t._orig:t})),(0,n.wrapNatively)(t,"set",(t=>function(r){if((0,n.isFunction)(r)){const t=e._getWrappedEventListener(r,(()=>e._hashChangeContext||void 0));t._orig=r,r=t}if(t)return t.call(this,r)}))),t&&Object.defineProperty(window,"onhashchange",t)}_unpatchEvents(){(0,t.unwrap)(XMLHttpRequest.prototype,"addEventListener"),(0,t.unwrap)(XMLHttpRequest.prototype,"removeEventListener")}_messagePorts=new WeakMap;_patchMessageChannel(){const e=this;(0,n.wrapNatively)(window,"MessageChannel",(t=>class extends t{constructor(...t){super(...t),e._messagePorts.set(this.port1,this.port2),e._messagePorts.set(this.port2,this.port1),Object.defineProperty(this.port1,r,{value:null,writable:!0,enumerable:!1}),Object.defineProperty(this.port2,r,{value:null,writable:!0,enumerable:!1})}})),(0,n.wrapNatively)(MessagePort.prototype,"postMessage",(t=>function(o,i){const a=e.active();if(!e._messagePorts.has(this)||!a)return Array.isArray(i)||void 0!==i?t.call(this,o,i):t.call(this,o);const s=e._messagePorts.get(this);let c;return s&&(s[r]=a),c=Array.isArray(i)||void 0!==i?t.call(this,o,i):t.call(this,o),(0,n.getOriginalFunction)(setTimeout)((()=>{s?.[r]===a&&s&&(s[r]=null)}),100),c})),(0,n.wrapNatively)(MessagePort.prototype,"addEventListener",(t=>function(...o){if("message"===o[0]&&(0,n.isFunction)(o[1])){const t=e._getListenersMap(this,o[0]);let n=t.get(o[1]);n||(n=e._getWrappedEventListener(o[1],(()=>this[r])),t.set(o[1],n)),o[1]=n}return t.apply(this,o)})),(0,n.wrapNatively)(MessagePort.prototype,"removeEventListener",(t=>function(...r){if("message"===r[0]&&(0,n.isFunction)(r[1])){const t=e._getListenersMap(this,r[0]).get(r[1]);t&&(r[1]=t)}return t.apply(this,r)}));const t=Object.getOwnPropertyDescriptor(MessagePort.prototype,"onmessage");t&&((0,n.wrapNatively)(t,"get",(e=>function(){const t=e?e.call(this):void 0;return(0,n.isFunction)(t)&&t._orig?t._orig:t})),(0,n.wrapNatively)(t,"set",(t=>function(o){if((0,n.isFunction)(o)){const t=e._getWrappedEventListener(o,(()=>this[r]));t._orig=o,o=t}if(t)return t.call(this,o)}))),t&&Object.defineProperty(MessagePort.prototype,"onmessage",t)}_getWrappedEventListener(e,t){const n=this;return function(...r){const o=t();return o&&n._enabled?n.with(o,e,this,...r):e.apply(this,r)}}_unpatchMessageChannel(){(0,t.unwrap)(window,"MessageChannel"),(0,t.unwrap)(MessagePort.prototype,"postMessage"),(0,t.unwrap)(MessagePort.prototype,"addEventListener"),(0,t.unwrap)(MessagePort.prototype,"removeEventListener");const e=Object.getOwnPropertyDescriptor(MessagePort.prototype,"onmessage");e&&(0,t.unwrap)(e,"get"),e&&(0,t.unwrap)(e,"set"),e&&Object.defineProperty(MessagePort.prototype,"onmessage",e)}with(t,r,o,...i){try{this._config.onBeforeContextStart?.()}catch{}const a=this._currentContext;this._currentContext=t||e.ROOT_CONTEXT;const s=location.hash;try{const e=r.call(o,...i);return this._config.onBeforeContextEnd?.(),e}finally{this._currentContext=a,s!==location.hash&&(this._hashChangeContext=t,(0,n.getOriginalFunction)(setTimeout)((()=>{this._hashChangeContext===t&&(this._hashChangeContext=null)}),33))}}},PP}();const CP="1.3.1";var MP,LP={},UP={},kP=n(ZR);var DP,jP,BP={};var VP,FP,GP=(jP||(jP=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=F;t.__exportStar(function(){if(MP)return UP;MP=1,Object.defineProperty(UP,"__esModule",{value:!0}),UP.IMQABatchSpanProcessor=void 0;const e=F.__importDefault(Wt),t=kP,n=ny;class r extends t.BatchSpanProcessor{constructor(t,n,r){if(super(t,n),r){const t=this,n=t.onEnd.bind(this);t.onEnd=t=>{const o=t.spanContext(),i=e.default.trace.setSpanContext(e.default.context.active(),o),a=1e3*t.duration[0]+t.duration[1]/1e6;return null==r||r.createGauge("durationInMs",{description:"Duration in milliseconds"}).record(a,{...t.attributes,"span.id":o.spanId,"trace.id":o.traceId},i),n(t)}}}onInit(e){!0!==(null==e?void 0:e.disableAutoFlushOnDocumentHide)&&"undefined"!=typeof document&&(this._visibilityChangeListener=()=>{"hidden"===document.visibilityState&&this.forceFlush().catch((e=>(0,n.globalErrorHandler)(e)))},this._pageHideListener=()=>{this.forceFlush().catch((e=>(0,n.globalErrorHandler)(e)))},document.addEventListener("visibilitychange",this._visibilityChangeListener),document.addEventListener("pagehide",this._pageHideListener))}}return UP.IMQABatchSpanProcessor=r,UP}(),e),t.__exportStar(function(){if(DP)return BP;DP=1,Object.defineProperty(BP,"__esModule",{value:!0}),BP.IMQASpanAttributesProcessor=BP.IMQALogAttributesProcessor=void 0;const e=dy(),t=iy();return BP.IMQALogAttributesProcessor=class{constructor(e){this._globalAttributes=null!=e?e:{}}setGlobalAttributes(e){if(e)Object.assign(this._globalAttributes,e);else for(const e of Object.keys(this._globalAttributes))delete this._globalAttributes[e]}getGlobalAttributes(){return this._globalAttributes}forceFlush(){return Promise.resolve()}onEmit(n){n.attributes[t.ATTR_IMQA_BROWSER_LOCATION_HREF]=location.href,n.attributes={...n.attributes,...this._globalAttributes},(0,e.spanResources)(n)}shutdown(){return Promise.resolve()}},BP.IMQASpanAttributesProcessor=class{constructor(e){this._globalAttributes=null!=e?e:{}}setGlobalAttributes(e){if(e)Object.assign(this._globalAttributes,e);else for(const e of Object.keys(this._globalAttributes))delete this._globalAttributes[e]}getGlobalAttributes(){return this._globalAttributes}forceFlush(){return Promise.resolve()}onStart(n){n.setAttribute(t.ATTR_IMQA_BROWSER_LOCATION_HREF,location.href),n.setAttributes(this._globalAttributes),(0,e.spanResources)(n)}onEnd(){}shutdown(){return Promise.resolve()}},BP}(),e)}(LP)),LP),HP={},YP={};var qP,zP=(FP||(FP=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),F.__exportStar(function(){if(VP)return YP;VP=1,Object.defineProperty(YP,"__esModule",{value:!0}),YP.IMQALogAttributesProcessor=void 0;const e=dy(),t=iy();return YP.IMQALogAttributesProcessor=class{constructor(e){this._globalAttributes=null!=e?e:{}}setGlobalAttributes(e){if(e)Object.assign(this._globalAttributes,e);else for(const e of Object.keys(this._globalAttributes))delete this._globalAttributes[e]}getGlobalAttributes(){return this._globalAttributes}forceFlush(){return Promise.resolve()}onEmit(n){n.attributes[t.ATTR_IMQA_BROWSER_LOCATION_HREF]=location.href,n.attributes={...n.attributes,...this._globalAttributes},(0,e.spanResources)(n)}shutdown(){return Promise.resolve()}},YP}(),e)}(HP)),HP),KP={};var WP,QP=function(){if(qP)return KP;qP=1,Object.defineProperty(KP,"__esModule",{value:!0}),KP.SessionBasedSampler=void 0;const e=kP,t=uy();return KP.SessionBasedSampler=class{constructor({ratio:t=1,sampled:n=new e.AlwaysOnSampler,notSampled:r=new e.AlwaysOffSampler}={}){this._ratio=this._normalize(t),this._upperBound=Math.floor(4294967295*this._ratio),this._sampled=n,this._notSampled=r}shouldSample(e,n,r,o,i,a){const s=(0,t.getRumSessionId)();this._currentSession!==s&&(this._currentSessionSampled=this._accumulate(s)<this._upperBound,this._currentSession=s);return(this._currentSessionSampled?this._sampled:this._notSampled).shouldSample(e,n,r,o,i,a)}toString(){return`SessionBased{ratio=${this._ratio}, sampled=${this._sampled.toString()}, notSampled=${this._notSampled.toString()}}`}_normalize(e){return"number"!=typeof e||isNaN(e)?0:e>=1?1:e<=0?0:e}_accumulate(e){let t=0;for(let n=0;n<e.length/8;n++){const r=8*n;t=(t^parseInt(e.slice(r,r+8),16))>>>0}return t}},KP}(),JP={},$P={},XP={},ZP={};var ex,tx={};var nx,rx,ox,ix={},ax={},sx={};function cx(){if(rx)return ax;rx=1,Object.defineProperty(ax,"__esModule",{value:!0});const e=(nx||(nx=1,Object.defineProperty(sx,"__esModule",{value:!0}),sx.default=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i),sx);return ax.default=function(t){return"string"==typeof t&&e.default.test(t)},ax}function ux(){if(ox)return ix;ox=1,Object.defineProperty(ix,"__esModule",{value:!0});const e=cx();return ix.default=function(t){if(!(0,e.default)(t))throw TypeError("Invalid UUID");let n;return Uint8Array.of((n=parseInt(t.slice(0,8),16))>>>24,n>>>16&255,n>>>8&255,255&n,(n=parseInt(t.slice(9,13),16))>>>8,255&n,(n=parseInt(t.slice(14,18),16))>>>8,255&n,(n=parseInt(t.slice(19,23),16))>>>8,255&n,(n=parseInt(t.slice(24,36),16))/1099511627776&255,n/4294967296&255,n>>>24&255,n>>>16&255,n>>>8&255,255&n)},ix}var lx,px={};function dx(){if(lx)return px;lx=1,Object.defineProperty(px,"__esModule",{value:!0}),px.unsafeStringify=void 0;const e=cx(),t=[];for(let e=0;e<256;++e)t.push((e+256).toString(16).slice(1));function n(e,n=0){return(t[e[n+0]]+t[e[n+1]]+t[e[n+2]]+t[e[n+3]]+"-"+t[e[n+4]]+t[e[n+5]]+"-"+t[e[n+6]]+t[e[n+7]]+"-"+t[e[n+8]]+t[e[n+9]]+"-"+t[e[n+10]]+t[e[n+11]]+t[e[n+12]]+t[e[n+13]]+t[e[n+14]]+t[e[n+15]]).toLowerCase()}return px.unsafeStringify=n,px.default=function(t,r=0){const o=n(t,r);if(!(0,e.default)(o))throw TypeError("Stringified UUID is invalid");return o},px}var fx,hx,mx={},gx={};function _x(){if(fx)return gx;let e;fx=1,Object.defineProperty(gx,"__esModule",{value:!0});const t=new Uint8Array(16);return gx.default=function(){if(!e){if("undefined"==typeof crypto||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");e=crypto.getRandomValues.bind(crypto)}return e(t)},gx}function yx(){if(hx)return mx;hx=1,Object.defineProperty(mx,"__esModule",{value:!0}),mx.updateV1State=void 0;const e=_x(),t=dx(),n={};function r(e,t,n){return e.msecs??=-1/0,e.nsecs??=0,t===e.msecs?(e.nsecs++,e.nsecs>=1e4&&(e.node=void 0,e.nsecs=0)):t>e.msecs?e.nsecs=0:t<e.msecs&&(e.node=void 0),e.node||(e.node=n.slice(10,16),e.node[0]|=1,e.clockseq=16383&(n[8]<<8|n[9])),e.msecs=t,e}function o(e,t,n,r,o,i,a=0){if(e.length<16)throw new Error("Random bytes length must be >= 16");if(i){if(a<0||a+16>i.length)throw new RangeError(`UUID byte range ${a}:${a+15} is out of buffer bounds`)}else i=new Uint8Array(16),a=0;t??=Date.now(),n??=0,r??=16383&(e[8]<<8|e[9]),o??=e.slice(10,16);const s=(1e4*(268435455&(t+=122192928e5))+n)%4294967296;i[a++]=s>>>24&255,i[a++]=s>>>16&255,i[a++]=s>>>8&255,i[a++]=255&s;const c=t/4294967296*1e4&268435455;i[a++]=c>>>8&255,i[a++]=255&c,i[a++]=c>>>24&15|16,i[a++]=c>>>16&255,i[a++]=r>>>8|128,i[a++]=255&r;for(let e=0;e<6;++e)i[a++]=o[e];return i}return mx.updateV1State=r,mx.default=function(i,a,s){let c;const u=i?._v6??!1;if(i){const e=Object.keys(i);1===e.length&&"_v6"===e[0]&&(i=void 0)}if(i)c=o(i.random??i.rng?.()??(0,e.default)(),i.msecs,i.nsecs,i.clockseq,i.node,a,s);else{const t=Date.now(),i=(0,e.default)();r(n,t,i),c=o(i,n.msecs,n.nsecs,u?void 0:n.clockseq,u?void 0:n.node,a,s)}return a??(0,t.unsafeStringify)(c)},mx}var vx,bx={};function Ex(){if(vx)return bx;vx=1,Object.defineProperty(bx,"__esModule",{value:!0});const e=ux(),t=dx();return bx.default=function(n){const r=function(e){return Uint8Array.of((15&e[6])<<4|e[7]>>4&15,(15&e[7])<<4|(240&e[4])>>4,(15&e[4])<<4|(240&e[5])>>4,(15&e[5])<<4|(240&e[0])>>4,(15&e[0])<<4|(240&e[1])>>4,(15&e[1])<<4|(240&e[2])>>4,96|15&e[2],e[3],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15])}("string"==typeof n?(0,e.default)(n):n);return"string"==typeof n?(0,t.unsafeStringify)(r):r},bx}var Sx,Tx={},Ox={};function Ax(){if(Sx)return Ox;function e(e){return 14+(e+64>>>9<<4)+1}function t(e,t){const n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function n(e,n,r,o,i,a){return t((s=t(t(n,e),t(o,a)))<<(c=i)|s>>>32-c,r);var s,c}function r(e,t,r,o,i,a,s){return n(t&r|~t&o,e,t,i,a,s)}function o(e,t,r,o,i,a,s){return n(t&o|r&~o,e,t,i,a,s)}function i(e,t,r,o,i,a,s){return n(t^r^o,e,t,i,a,s)}function a(e,t,r,o,i,a,s){return n(r^(t|~o),e,t,i,a,s)}return Sx=1,Object.defineProperty(Ox,"__esModule",{value:!0}),Ox.default=function(n){const s=function(t){if(0===t.length)return new Uint32Array;const n=new Uint32Array(e(8*t.length)).fill(0);for(let e=0;e<t.length;e++)n[e>>2]|=(255&t[e])<<e%4*8;return n}(n),c=function(n,s){const c=new Uint32Array(e(s)).fill(0);c.set(n),c[s>>5]|=128<<s%32,c[c.length-1]=s,n=c;let u=1732584193,l=-271733879,p=-1732584194,d=271733878;for(let e=0;e<n.length;e+=16){const s=u,c=l,f=p,h=d;u=r(u,l,p,d,n[e],7,-680876936),d=r(d,u,l,p,n[e+1],12,-389564586),p=r(p,d,u,l,n[e+2],17,606105819),l=r(l,p,d,u,n[e+3],22,-1044525330),u=r(u,l,p,d,n[e+4],7,-176418897),d=r(d,u,l,p,n[e+5],12,1200080426),p=r(p,d,u,l,n[e+6],17,-1473231341),l=r(l,p,d,u,n[e+7],22,-45705983),u=r(u,l,p,d,n[e+8],7,1770035416),d=r(d,u,l,p,n[e+9],12,-1958414417),p=r(p,d,u,l,n[e+10],17,-42063),l=r(l,p,d,u,n[e+11],22,-1990404162),u=r(u,l,p,d,n[e+12],7,1804603682),d=r(d,u,l,p,n[e+13],12,-40341101),p=r(p,d,u,l,n[e+14],17,-1502002290),l=r(l,p,d,u,n[e+15],22,1236535329),u=o(u,l,p,d,n[e+1],5,-165796510),d=o(d,u,l,p,n[e+6],9,-1069501632),p=o(p,d,u,l,n[e+11],14,643717713),l=o(l,p,d,u,n[e],20,-373897302),u=o(u,l,p,d,n[e+5],5,-701558691),d=o(d,u,l,p,n[e+10],9,38016083),p=o(p,d,u,l,n[e+15],14,-660478335),l=o(l,p,d,u,n[e+4],20,-405537848),u=o(u,l,p,d,n[e+9],5,568446438),d=o(d,u,l,p,n[e+14],9,-1019803690),p=o(p,d,u,l,n[e+3],14,-187363961),l=o(l,p,d,u,n[e+8],20,1163531501),u=o(u,l,p,d,n[e+13],5,-1444681467),d=o(d,u,l,p,n[e+2],9,-51403784),p=o(p,d,u,l,n[e+7],14,1735328473),l=o(l,p,d,u,n[e+12],20,-1926607734),u=i(u,l,p,d,n[e+5],4,-378558),d=i(d,u,l,p,n[e+8],11,-2022574463),p=i(p,d,u,l,n[e+11],16,1839030562),l=i(l,p,d,u,n[e+14],23,-35309556),u=i(u,l,p,d,n[e+1],4,-1530992060),d=i(d,u,l,p,n[e+4],11,1272893353),p=i(p,d,u,l,n[e+7],16,-155497632),l=i(l,p,d,u,n[e+10],23,-1094730640),u=i(u,l,p,d,n[e+13],4,681279174),d=i(d,u,l,p,n[e],11,-358537222),p=i(p,d,u,l,n[e+3],16,-722521979),l=i(l,p,d,u,n[e+6],23,76029189),u=i(u,l,p,d,n[e+9],4,-640364487),d=i(d,u,l,p,n[e+12],11,-421815835),p=i(p,d,u,l,n[e+15],16,530742520),l=i(l,p,d,u,n[e+2],23,-995338651),u=a(u,l,p,d,n[e],6,-198630844),d=a(d,u,l,p,n[e+7],10,1126891415),p=a(p,d,u,l,n[e+14],15,-1416354905),l=a(l,p,d,u,n[e+5],21,-57434055),u=a(u,l,p,d,n[e+12],6,1700485571),d=a(d,u,l,p,n[e+3],10,-1894986606),p=a(p,d,u,l,n[e+10],15,-1051523),l=a(l,p,d,u,n[e+1],21,-2054922799),u=a(u,l,p,d,n[e+8],6,1873313359),d=a(d,u,l,p,n[e+15],10,-30611744),p=a(p,d,u,l,n[e+6],15,-1560198380),l=a(l,p,d,u,n[e+13],21,1309151649),u=a(u,l,p,d,n[e+4],6,-145523070),d=a(d,u,l,p,n[e+11],10,-1120210379),p=a(p,d,u,l,n[e+2],15,718787259),l=a(l,p,d,u,n[e+9],21,-343485551),u=t(u,s),l=t(l,c),p=t(p,f),d=t(d,h)}return Uint32Array.of(u,l,p,d)}(s,8*n.length);return function(e){const t=new Uint8Array(4*e.length);for(let n=0;n<4*e.length;n++)t[n]=e[n>>2]>>>n%4*8&255;return t}(c)},Ox}var wx,Rx,Nx={};function Ix(){if(wx)return Nx;wx=1,Object.defineProperty(Nx,"__esModule",{value:!0}),Nx.URL=Nx.DNS=Nx.stringToBytes=void 0;const e=ux(),t=dx();function n(e){e=unescape(encodeURIComponent(e));const t=new Uint8Array(e.length);for(let n=0;n<e.length;++n)t[n]=e.charCodeAt(n);return t}return Nx.stringToBytes=n,Nx.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",Nx.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",Nx.default=function(r,o,i,a,s,c){const u="string"==typeof i?n(i):i,l="string"==typeof a?(0,e.default)(a):a;if("string"==typeof a&&(a=(0,e.default)(a)),16!==a?.length)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let p=new Uint8Array(16+u.length);if(p.set(l),p.set(u,l.length),p=o(p),p[6]=15&p[6]|r,p[8]=63&p[8]|128,s){c=c||0;for(let e=0;e<16;++e)s[c+e]=p[e];return s}return(0,t.unsafeStringify)(p)},Nx}var Px,xx,Cx={},Mx={};function Lx(){if(xx)return Cx;xx=1,Object.defineProperty(Cx,"__esModule",{value:!0});const e=function(){if(Px)return Mx;Px=1,Object.defineProperty(Mx,"__esModule",{value:!0});const e="undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);return Mx.default={randomUUID:e},Mx}(),t=_x(),n=dx();return Cx.default=function(r,o,i){if(e.default.randomUUID&&!o&&!r)return e.default.randomUUID();const a=(r=r||{}).random??r.rng?.()??(0,t.default)();if(a.length<16)throw new Error("Random bytes length must be >= 16");if(a[6]=15&a[6]|64,a[8]=63&a[8]|128,o){if((i=i||0)<0||i+16>o.length)throw new RangeError(`UUID byte range ${i}:${i+15} is out of buffer bounds`);for(let e=0;e<16;++e)o[i+e]=a[e];return o}return(0,n.unsafeStringify)(a)},Cx}var Ux,kx,Dx={},jx={};function Bx(){return kx||(kx=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.URL=e.DNS=void 0;const t=function(){if(Ux)return jx;function e(e,t,n,r){switch(e){case 0:return t&n^~t&r;case 1:case 3:return t^n^r;case 2:return t&n^t&r^n&r}}function t(e,t){return e<<t|e>>>32-t}return Ux=1,Object.defineProperty(jx,"__esModule",{value:!0}),jx.default=function(n){const r=[1518500249,1859775393,2400959708,3395469782],o=[1732584193,4023233417,2562383102,271733878,3285377520],i=new Uint8Array(n.length+1);i.set(n),i[n.length]=128;const a=(n=i).length/4+2,s=Math.ceil(a/16),c=new Array(s);for(let e=0;e<s;++e){const t=new Uint32Array(16);for(let r=0;r<16;++r)t[r]=n[64*e+4*r]<<24|n[64*e+4*r+1]<<16|n[64*e+4*r+2]<<8|n[64*e+4*r+3];c[e]=t}c[s-1][14]=8*(n.length-1)/Math.pow(2,32),c[s-1][14]=Math.floor(c[s-1][14]),c[s-1][15]=8*(n.length-1)&4294967295;for(let n=0;n<s;++n){const i=new Uint32Array(80);for(let e=0;e<16;++e)i[e]=c[n][e];for(let e=16;e<80;++e)i[e]=t(i[e-3]^i[e-8]^i[e-14]^i[e-16],1);let a=o[0],s=o[1],u=o[2],l=o[3],p=o[4];for(let n=0;n<80;++n){const o=Math.floor(n/20),c=t(a,5)+e(o,s,u,l)+p+r[o]+i[n]>>>0;p=l,l=u,u=t(s,30)>>>0,s=a,a=c}o[0]=o[0]+a>>>0,o[1]=o[1]+s>>>0,o[2]=o[2]+u>>>0,o[3]=o[3]+l>>>0,o[4]=o[4]+p>>>0}return Uint8Array.of(o[0]>>24,o[0]>>16,o[0]>>8,o[0],o[1]>>24,o[1]>>16,o[1]>>8,o[1],o[2]>>24,o[2]>>16,o[2]>>8,o[2],o[3]>>24,o[3]>>16,o[3]>>8,o[3],o[4]>>24,o[4]>>16,o[4]>>8,o[4])},jx}(),n=Ix();var r=Ix();function o(e,r,o,i){return(0,n.default)(80,t.default,e,r,o,i)}Object.defineProperty(e,"DNS",{enumerable:!0,get:function(){return r.DNS}}),Object.defineProperty(e,"URL",{enumerable:!0,get:function(){return r.URL}}),o.DNS=n.DNS,o.URL=n.URL,e.default=o}(Dx)),Dx}var Vx,Fx={};var Gx,Hx={};function Yx(){if(Gx)return Hx;Gx=1,Object.defineProperty(Hx,"__esModule",{value:!0});const e=ux(),t=dx();return Hx.default=function(n){const r=function(e){return Uint8Array.of((15&e[3])<<4|e[4]>>4&15,(15&e[4])<<4|(240&e[5])>>4,(15&e[5])<<4|15&e[6],e[7],(15&e[1])<<4|(240&e[2])>>4,(15&e[2])<<4|(240&e[3])>>4,16|(240&e[0])>>4,(15&e[0])<<4|(240&e[1])>>4,e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15])}("string"==typeof n?(0,e.default)(n):n);return"string"==typeof n?(0,t.unsafeStringify)(r):r},Hx}var qx,zx={};var Kx,Wx,Qx={};function Jx(){return Wx||(Wx=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.version=e.validate=e.v7=e.v6ToV1=e.v6=e.v5=e.v4=e.v3=e.v1ToV6=e.v1=e.stringify=e.parse=e.NIL=e.MAX=void 0;var t=(WP||(WP=1,Object.defineProperty(ZP,"__esModule",{value:!0}),ZP.default="ffffffff-ffff-ffff-ffff-ffffffffffff"),ZP);Object.defineProperty(e,"MAX",{enumerable:!0,get:function(){return t.default}});var n=(ex||(ex=1,Object.defineProperty(tx,"__esModule",{value:!0}),tx.default="00000000-0000-0000-0000-000000000000"),tx);Object.defineProperty(e,"NIL",{enumerable:!0,get:function(){return n.default}});var r=ux();Object.defineProperty(e,"parse",{enumerable:!0,get:function(){return r.default}});var o=dx();Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return o.default}});var i=yx();Object.defineProperty(e,"v1",{enumerable:!0,get:function(){return i.default}});var a=Ex();Object.defineProperty(e,"v1ToV6",{enumerable:!0,get:function(){return a.default}});var s=(Rx||(Rx=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.URL=e.DNS=void 0;const t=Ax(),n=Ix();var r=Ix();function o(e,r,o,i){return(0,n.default)(48,t.default,e,r,o,i)}Object.defineProperty(e,"DNS",{enumerable:!0,get:function(){return r.DNS}}),Object.defineProperty(e,"URL",{enumerable:!0,get:function(){return r.URL}}),o.DNS=n.DNS,o.URL=n.URL,e.default=o}(Tx)),Tx);Object.defineProperty(e,"v3",{enumerable:!0,get:function(){return s.default}});var c=Lx();Object.defineProperty(e,"v4",{enumerable:!0,get:function(){return c.default}});var u=Bx();Object.defineProperty(e,"v5",{enumerable:!0,get:function(){return u.default}});var l=function(){if(Vx)return Fx;Vx=1,Object.defineProperty(Fx,"__esModule",{value:!0});const e=dx(),t=yx(),n=Ex();return Fx.default=function(r,o,i){r??={},i??=0;let a=(0,t.default)({...r,_v6:!0},new Uint8Array(16));if(a=(0,n.default)(a),o){for(let e=0;e<16;e++)o[i+e]=a[e];return o}return(0,e.unsafeStringify)(a)},Fx}();Object.defineProperty(e,"v6",{enumerable:!0,get:function(){return l.default}});var p=Yx();Object.defineProperty(e,"v6ToV1",{enumerable:!0,get:function(){return p.default}});var d=function(){if(qx)return zx;qx=1,Object.defineProperty(zx,"__esModule",{value:!0}),zx.updateV7State=void 0;const e=_x(),t=dx(),n={};function r(e,t,n){return e.msecs??=-1/0,e.seq??=0,t>e.msecs?(e.seq=n[6]<<23|n[7]<<16|n[8]<<8|n[9],e.msecs=t):(e.seq=e.seq+1|0,0===e.seq&&e.msecs++),e}function o(e,t,n,r,o=0){if(e.length<16)throw new Error("Random bytes length must be >= 16");if(r){if(o<0||o+16>r.length)throw new RangeError(`UUID byte range ${o}:${o+15} is out of buffer bounds`)}else r=new Uint8Array(16),o=0;return t??=Date.now(),n??=127*e[6]<<24|e[7]<<16|e[8]<<8|e[9],r[o++]=t/1099511627776&255,r[o++]=t/4294967296&255,r[o++]=t/16777216&255,r[o++]=t/65536&255,r[o++]=t/256&255,r[o++]=255&t,r[o++]=112|n>>>28&15,r[o++]=n>>>20&255,r[o++]=128|n>>>14&63,r[o++]=n>>>6&255,r[o++]=n<<2&255|3&e[10],r[o++]=e[11],r[o++]=e[12],r[o++]=e[13],r[o++]=e[14],r[o++]=e[15],r}return zx.updateV7State=r,zx.default=function(i,a,s){let c;if(i)c=o(i.random??i.rng?.()??(0,e.default)(),i.msecs,i.seq,a,s);else{const t=Date.now(),i=(0,e.default)();r(n,t,i),c=o(i,n.msecs,n.seq,a,s)}return a??(0,t.unsafeStringify)(c)},zx}();Object.defineProperty(e,"v7",{enumerable:!0,get:function(){return d.default}});var f=cx();Object.defineProperty(e,"validate",{enumerable:!0,get:function(){return f.default}});var h=function(){if(Kx)return Qx;Kx=1,Object.defineProperty(Qx,"__esModule",{value:!0});const e=cx();return Qx.default=function(t){if(!(0,e.default)(t))throw TypeError("Invalid UUID");return parseInt(t.slice(14,15),16)},Qx}();Object.defineProperty(e,"version",{enumerable:!0,get:function(){return h.default}})}(XP)),XP}var $x,Xx,Zx={},eC={};function tC(){if(Xx)return $x;return Xx=1,$x=function(e,t){var n=new Array(arguments.length-1),r=0,o=2,i=!0;for(;o<arguments.length;)n[r++]=arguments[o++];return new Promise((function(o,a){n[r]=function(e){if(i)if(i=!1,e)a(e);else{for(var t=new Array(arguments.length-1),n=0;n<t.length;)t[n++]=arguments[n];o.apply(null,t)}};try{e.apply(t||null,n)}catch(e){i&&(i=!1,a(e))}}))},$x}var nC,rC,oC,iC,aC,sC,cC,uC={};function lC(){return nC||(nC=1,function(e){var t=e;t.length=function(e){var t=e.length;if(!t)return 0;for(var n=0;--t%4>1&&"="===e.charAt(t);)++n;return Math.ceil(3*e.length)/4-n};for(var n=new Array(64),r=new Array(123),o=0;o<64;)r[n[o]=o<26?o+65:o<52?o+71:o<62?o-4:o-59|43]=o++;t.encode=function(e,t,r){for(var o,i=null,a=[],s=0,c=0;t<r;){var u=e[t++];switch(c){case 0:a[s++]=n[u>>2],o=(3&u)<<4,c=1;break;case 1:a[s++]=n[o|u>>4],o=(15&u)<<2,c=2;break;case 2:a[s++]=n[o|u>>6],a[s++]=n[63&u],c=0}s>8191&&((i||(i=[])).push(String.fromCharCode.apply(String,a)),s=0)}return c&&(a[s++]=n[o],a[s++]=61,1===c&&(a[s++]=61)),i?(s&&i.push(String.fromCharCode.apply(String,a.slice(0,s))),i.join("")):String.fromCharCode.apply(String,a.slice(0,s))};var i="invalid encoding";t.decode=function(e,t,n){for(var o,a=n,s=0,c=0;c<e.length;){var u=e.charCodeAt(c++);if(61===u&&s>1)break;if(void 0===(u=r[u]))throw Error(i);switch(s){case 0:o=u,s=1;break;case 1:t[n++]=o<<2|(48&u)>>4,o=u,s=2;break;case 2:t[n++]=(15&o)<<4|(60&u)>>2,o=u,s=3;break;case 3:t[n++]=(3&o)<<6|u,s=0}}if(1===s)throw Error(i);return n-a},t.test=function(e){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(e)}}(uC)),uC}function pC(){if(oC)return rC;function e(){this._listeners={}}return oC=1,rC=e,e.prototype.on=function(e,t,n){return(this._listeners[e]||(this._listeners[e]=[])).push({fn:t,ctx:n||this}),this},e.prototype.off=function(e,t){if(void 0===e)this._listeners={};else if(void 0===t)this._listeners[e]=[];else for(var n=this._listeners[e],r=0;r<n.length;)n[r].fn===t?n.splice(r,1):++r;return this},e.prototype.emit=function(e){var t=this._listeners[e];if(t){for(var n=[],r=1;r<arguments.length;)n.push(arguments[r++]);for(r=0;r<t.length;)t[r].fn.apply(t[r++].ctx,n)}return this},rC}function dC(){if(aC)return iC;function e(e){return"undefined"!=typeof Float32Array?function(){var t=new Float32Array([-0]),n=new Uint8Array(t.buffer),r=128===n[3];function o(e,r,o){t[0]=e,r[o]=n[0],r[o+1]=n[1],r[o+2]=n[2],r[o+3]=n[3]}function i(e,r,o){t[0]=e,r[o]=n[3],r[o+1]=n[2],r[o+2]=n[1],r[o+3]=n[0]}function a(e,r){return n[0]=e[r],n[1]=e[r+1],n[2]=e[r+2],n[3]=e[r+3],t[0]}function s(e,r){return n[3]=e[r],n[2]=e[r+1],n[1]=e[r+2],n[0]=e[r+3],t[0]}e.writeFloatLE=r?o:i,e.writeFloatBE=r?i:o,e.readFloatLE=r?a:s,e.readFloatBE=r?s:a}():function(){function i(e,t,n,r){var o=t<0?1:0;if(o&&(t=-t),0===t)e(1/t>0?0:2147483648,n,r);else if(isNaN(t))e(2143289344,n,r);else if(t>34028234663852886e22)e((o<<31|2139095040)>>>0,n,r);else if(t<11754943508222875e-54)e((o<<31|Math.round(t/1401298464324817e-60))>>>0,n,r);else{var i=Math.floor(Math.log(t)/Math.LN2);e((o<<31|i+127<<23|8388607&Math.round(t*Math.pow(2,-i)*8388608))>>>0,n,r)}}function a(e,t,n){var r=e(t,n),o=2*(r>>31)+1,i=r>>>23&255,a=8388607&r;return 255===i?a?NaN:o*(1/0):0===i?1401298464324817e-60*o*a:o*Math.pow(2,i-150)*(a+8388608)}e.writeFloatLE=i.bind(null,t),e.writeFloatBE=i.bind(null,n),e.readFloatLE=a.bind(null,r),e.readFloatBE=a.bind(null,o)}(),"undefined"!=typeof Float64Array?function(){var t=new Float64Array([-0]),n=new Uint8Array(t.buffer),r=128===n[7];function o(e,r,o){t[0]=e,r[o]=n[0],r[o+1]=n[1],r[o+2]=n[2],r[o+3]=n[3],r[o+4]=n[4],r[o+5]=n[5],r[o+6]=n[6],r[o+7]=n[7]}function i(e,r,o){t[0]=e,r[o]=n[7],r[o+1]=n[6],r[o+2]=n[5],r[o+3]=n[4],r[o+4]=n[3],r[o+5]=n[2],r[o+6]=n[1],r[o+7]=n[0]}function a(e,r){return n[0]=e[r],n[1]=e[r+1],n[2]=e[r+2],n[3]=e[r+3],n[4]=e[r+4],n[5]=e[r+5],n[6]=e[r+6],n[7]=e[r+7],t[0]}function s(e,r){return n[7]=e[r],n[6]=e[r+1],n[5]=e[r+2],n[4]=e[r+3],n[3]=e[r+4],n[2]=e[r+5],n[1]=e[r+6],n[0]=e[r+7],t[0]}e.writeDoubleLE=r?o:i,e.writeDoubleBE=r?i:o,e.readDoubleLE=r?a:s,e.readDoubleBE=r?s:a}():function(){function i(e,t,n,r,o,i){var a=r<0?1:0;if(a&&(r=-r),0===r)e(0,o,i+t),e(1/r>0?0:2147483648,o,i+n);else if(isNaN(r))e(0,o,i+t),e(2146959360,o,i+n);else if(r>17976931348623157e292)e(0,o,i+t),e((a<<31|2146435072)>>>0,o,i+n);else{var s;if(r<22250738585072014e-324)e((s=r/5e-324)>>>0,o,i+t),e((a<<31|s/4294967296)>>>0,o,i+n);else{var c=Math.floor(Math.log(r)/Math.LN2);1024===c&&(c=1023),e(4503599627370496*(s=r*Math.pow(2,-c))>>>0,o,i+t),e((a<<31|c+1023<<20|1048576*s&1048575)>>>0,o,i+n)}}}function a(e,t,n,r,o){var i=e(r,o+t),a=e(r,o+n),s=2*(a>>31)+1,c=a>>>20&2047,u=4294967296*(1048575&a)+i;return 2047===c?u?NaN:s*(1/0):0===c?5e-324*s*u:s*Math.pow(2,c-1075)*(u+4503599627370496)}e.writeDoubleLE=i.bind(null,t,0,4),e.writeDoubleBE=i.bind(null,n,4,0),e.readDoubleLE=a.bind(null,r,0,4),e.readDoubleBE=a.bind(null,o,4,0)}(),e}function t(e,t,n){t[n]=255&e,t[n+1]=e>>>8&255,t[n+2]=e>>>16&255,t[n+3]=e>>>24}function n(e,t,n){t[n]=e>>>24,t[n+1]=e>>>16&255,t[n+2]=e>>>8&255,t[n+3]=255&e}function r(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0}function o(e,t){return(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}return aC=1,iC=e(e)}function fC(){if(cC)return sC;return cC=1,sC=function(e){try{var t=void 0;t}catch(e){}return null}}var hC,mC,gC,_C,yC,vC,bC,EC,SC,TC,OC,AC,wC,RC,NC={};function IC(){return hC||(hC=1,function(e){var t=e;t.length=function(e){for(var t=0,n=0,r=0;r<e.length;++r)(n=e.charCodeAt(r))<128?t+=1:n<2048?t+=2:55296==(64512&n)&&56320==(64512&e.charCodeAt(r+1))?(++r,t+=4):t+=3;return t},t.read=function(e,t,n){if(n-t<1)return"";for(var r,o=null,i=[],a=0;t<n;)(r=e[t++])<128?i[a++]=r:r>191&&r<224?i[a++]=(31&r)<<6|63&e[t++]:r>239&&r<365?(r=((7&r)<<18|(63&e[t++])<<12|(63&e[t++])<<6|63&e[t++])-65536,i[a++]=55296+(r>>10),i[a++]=56320+(1023&r)):i[a++]=(15&r)<<12|(63&e[t++])<<6|63&e[t++],a>8191&&((o||(o=[])).push(String.fromCharCode.apply(String,i)),a=0);return o?(a&&o.push(String.fromCharCode.apply(String,i.slice(0,a))),o.join("")):String.fromCharCode.apply(String,i.slice(0,a))},t.write=function(e,t,n){for(var r,o,i=n,a=0;a<e.length;++a)(r=e.charCodeAt(a))<128?t[n++]=r:r<2048?(t[n++]=r>>6|192,t[n++]=63&r|128):55296==(64512&r)&&56320==(64512&(o=e.charCodeAt(a+1)))?(r=65536+((1023&r)<<10)+(1023&o),++a,t[n++]=r>>18|240,t[n++]=r>>12&63|128,t[n++]=r>>6&63|128,t[n++]=63&r|128):(t[n++]=r>>12|224,t[n++]=r>>6&63|128,t[n++]=63&r|128);return n-i}}(NC)),NC}function PC(){if(gC)return mC;return gC=1,mC=function(e,t,n){var r=n||8192,o=r>>>1,i=null,a=r;return function(n){if(n<1||n>o)return e(n);a+n>r&&(i=e(r),a=0);var s=t.call(i,a,a+=n);return 7&a&&(a=1+(7|a)),s}}}function xC(){return vC||(vC=1,function(t){var n=t;function r(e,t,n){for(var r=Object.keys(t),o=0;o<r.length;++o)void 0!==e[r[o]]&&n||(e[r[o]]=t[r[o]]);return e}function o(e){function t(e,n){if(!(this instanceof t))return new t(e,n);Object.defineProperty(this,"message",{get:function(){return e}}),Error.captureStackTrace?Error.captureStackTrace(this,t):Object.defineProperty(this,"stack",{value:(new Error).stack||""}),n&&r(this,n)}return(t.prototype=Object.create(Error.prototype)).constructor=t,Object.defineProperty(t.prototype,"name",{get:function(){return e}}),t.prototype.toString=function(){return this.name+": "+this.message},t}n.asPromise=tC(),n.base64=lC(),n.EventEmitter=pC(),n.float=dC(),n.inquire=fC(),n.utf8=IC(),n.pool=PC(),n.LongBits=function(){if(yC)return _C;yC=1,_C=t;var e=xC();function t(e,t){this.lo=e>>>0,this.hi=t>>>0}var n=t.zero=new t(0,0);n.toNumber=function(){return 0},n.zzEncode=n.zzDecode=function(){return this},n.length=function(){return 1};var r=t.zeroHash="\0\0\0\0\0\0\0\0";t.fromNumber=function(e){if(0===e)return n;var r=e<0;r&&(e=-e);var o=e>>>0,i=(e-o)/4294967296>>>0;return r&&(i=~i>>>0,o=~o>>>0,++o>4294967295&&(o=0,++i>4294967295&&(i=0))),new t(o,i)},t.from=function(r){if("number"==typeof r)return t.fromNumber(r);if(e.isString(r)){if(!e.Long)return t.fromNumber(parseInt(r,10));r=e.Long.fromString(r)}return r.low||r.high?new t(r.low>>>0,r.high>>>0):n},t.prototype.toNumber=function(e){if(!e&&this.hi>>>31){var t=1+~this.lo>>>0,n=~this.hi>>>0;return t||(n=n+1>>>0),-(t+4294967296*n)}return this.lo+4294967296*this.hi},t.prototype.toLong=function(t){return e.Long?new e.Long(0|this.lo,0|this.hi,Boolean(t)):{low:0|this.lo,high:0|this.hi,unsigned:Boolean(t)}};var o=String.prototype.charCodeAt;return t.fromHash=function(e){return e===r?n:new t((o.call(e,0)|o.call(e,1)<<8|o.call(e,2)<<16|o.call(e,3)<<24)>>>0,(o.call(e,4)|o.call(e,5)<<8|o.call(e,6)<<16|o.call(e,7)<<24)>>>0)},t.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)},t.prototype.zzEncode=function(){var e=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^e)>>>0,this.lo=(this.lo<<1^e)>>>0,this},t.prototype.zzDecode=function(){var e=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^e)>>>0,this.hi=(this.hi>>>1^e)>>>0,this},t.prototype.length=function(){var e=this.lo,t=(this.lo>>>28|this.hi<<4)>>>0,n=this.hi>>>24;return 0===n?0===t?e<16384?e<128?1:2:e<2097152?3:4:t<16384?t<128?5:6:t<2097152?7:8:n<128?9:10},_C}(),n.isNode=Boolean(void 0!==e&&e&&e.process&&e.process.versions&&e.process.versions.node),n.global=n.isNode&&e||"undefined"!=typeof window&&window||"undefined"!=typeof self&&self||eC,n.emptyArray=Object.freeze?Object.freeze([]):[],n.emptyObject=Object.freeze?Object.freeze({}):{},n.isInteger=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e},n.isString=function(e){return"string"==typeof e||e instanceof String},n.isObject=function(e){return e&&"object"==typeof e},n.isset=n.isSet=function(e,t){var n=e[t];return!(null==n||!e.hasOwnProperty(t))&&("object"!=typeof n||(Array.isArray(n)?n.length:Object.keys(n).length)>0)},n.Buffer=function(){try{var e=n.inquire("buffer").Buffer;return e.prototype.utf8Write?e:null}catch(e){return null}}(),n._Buffer_from=null,n._Buffer_allocUnsafe=null,n.newBuffer=function(e){return"number"==typeof e?n.Buffer?n._Buffer_allocUnsafe(e):new n.Array(e):n.Buffer?n._Buffer_from(e):"undefined"==typeof Uint8Array?e:new Uint8Array(e)},n.Array="undefined"!=typeof Uint8Array?Uint8Array:Array,n.Long=n.global.dcodeIO&&n.global.dcodeIO.Long||n.global.Long||n.inquire("long"),n.key2Re=/^true|false|0|1$/,n.key32Re=/^-?(?:0|[1-9][0-9]*)$/,n.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,n.longToHash=function(e){return e?n.LongBits.from(e).toHash():n.LongBits.zeroHash},n.longFromHash=function(e,t){var r=n.LongBits.fromHash(e);return n.Long?n.Long.fromBits(r.lo,r.hi,t):r.toNumber(Boolean(t))},n.merge=r,n.lcFirst=function(e){return e.charAt(0).toLowerCase()+e.substring(1)},n.newError=o,n.ProtocolError=o("ProtocolError"),n.oneOfGetter=function(e){for(var t={},n=0;n<e.length;++n)t[e[n]]=1;return function(){for(var e=Object.keys(this),n=e.length-1;n>-1;--n)if(1===t[e[n]]&&void 0!==this[e[n]]&&null!==this[e[n]])return e[n]}},n.oneOfSetter=function(e){return function(t){for(var n=0;n<e.length;++n)e[n]!==t&&delete this[e[n]]}},n.toJSONOptions={longs:String,enums:String,bytes:String,json:!0},n._configure=function(){var e=n.Buffer;e?(n._Buffer_from=e.from!==Uint8Array.from&&e.from||function(t,n){return new e(t,n)},n._Buffer_allocUnsafe=e.allocUnsafe||function(t){return new e(t)}):n._Buffer_from=n._Buffer_allocUnsafe=null}}(eC)),eC}function CC(){if(EC)return bC;EC=1,bC=c;var e,t=xC(),n=t.LongBits,r=t.base64,o=t.utf8;function i(e,t,n){this.fn=e,this.len=t,this.next=void 0,this.val=n}function a(){}function s(e){this.head=e.head,this.tail=e.tail,this.len=e.len,this.next=e.states}function c(){this.len=0,this.head=new i(a,0,0),this.tail=this.head,this.states=null}var u=function(){return t.Buffer?function(){return(c.create=function(){return new e})()}:function(){return new c}};function l(e,t,n){t[n]=255&e}function p(e,t){this.len=e,this.next=void 0,this.val=t}function d(e,t,n){for(;e.hi;)t[n++]=127&e.lo|128,e.lo=(e.lo>>>7|e.hi<<25)>>>0,e.hi>>>=7;for(;e.lo>127;)t[n++]=127&e.lo|128,e.lo=e.lo>>>7;t[n++]=e.lo}function f(e,t,n){t[n]=255&e,t[n+1]=e>>>8&255,t[n+2]=e>>>16&255,t[n+3]=e>>>24}c.create=u(),c.alloc=function(e){return new t.Array(e)},t.Array!==Array&&(c.alloc=t.pool(c.alloc,t.Array.prototype.subarray)),c.prototype._push=function(e,t,n){return this.tail=this.tail.next=new i(e,t,n),this.len+=t,this},p.prototype=Object.create(i.prototype),p.prototype.fn=function(e,t,n){for(;e>127;)t[n++]=127&e|128,e>>>=7;t[n]=e},c.prototype.uint32=function(e){return this.len+=(this.tail=this.tail.next=new p((e>>>=0)<128?1:e<16384?2:e<2097152?3:e<268435456?4:5,e)).len,this},c.prototype.int32=function(e){return e<0?this._push(d,10,n.fromNumber(e)):this.uint32(e)},c.prototype.sint32=function(e){return this.uint32((e<<1^e>>31)>>>0)},c.prototype.uint64=function(e){var t=n.from(e);return this._push(d,t.length(),t)},c.prototype.int64=c.prototype.uint64,c.prototype.sint64=function(e){var t=n.from(e).zzEncode();return this._push(d,t.length(),t)},c.prototype.bool=function(e){return this._push(l,1,e?1:0)},c.prototype.fixed32=function(e){return this._push(f,4,e>>>0)},c.prototype.sfixed32=c.prototype.fixed32,c.prototype.fixed64=function(e){var t=n.from(e);return this._push(f,4,t.lo)._push(f,4,t.hi)},c.prototype.sfixed64=c.prototype.fixed64,c.prototype.float=function(e){return this._push(t.float.writeFloatLE,4,e)},c.prototype.double=function(e){return this._push(t.float.writeDoubleLE,8,e)};var h=t.Array.prototype.set?function(e,t,n){t.set(e,n)}:function(e,t,n){for(var r=0;r<e.length;++r)t[n+r]=e[r]};return c.prototype.bytes=function(e){var n=e.length>>>0;if(!n)return this._push(l,1,0);if(t.isString(e)){var o=c.alloc(n=r.length(e));r.decode(e,o,0),e=o}return this.uint32(n)._push(h,n,e)},c.prototype.string=function(e){var t=o.length(e);return t?this.uint32(t)._push(o.write,t,e):this._push(l,1,0)},c.prototype.fork=function(){return this.states=new s(this),this.head=this.tail=new i(a,0,0),this.len=0,this},c.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 i(a,0,0),this.len=0),this},c.prototype.ldelim=function(){var e=this.head,t=this.tail,n=this.len;return this.reset().uint32(n),n&&(this.tail.next=e.next,this.tail=t,this.len+=n),this},c.prototype.finish=function(){for(var e=this.head.next,t=this.constructor.alloc(this.len),n=0;e;)e.fn(e.val,t,n),n+=e.len,e=e.next;return t},c._configure=function(t){e=t,c.create=u(),e._configure()},bC}function MC(){if(AC)return OC;AC=1,OC=i;var e,t=xC(),n=t.LongBits,r=t.utf8;function o(e,t){return RangeError("index out of range: "+e.pos+" + "+(t||1)+" > "+e.len)}function i(e){this.buf=e,this.pos=0,this.len=e.length}var a,s="undefined"!=typeof Uint8Array?function(e){if(e instanceof Uint8Array||Array.isArray(e))return new i(e);throw Error("illegal buffer")}:function(e){if(Array.isArray(e))return new i(e);throw Error("illegal buffer")},c=function(){return t.Buffer?function(n){return(i.create=function(n){return t.Buffer.isBuffer(n)?new e(n):s(n)})(n)}:s};function u(){var e=new n(0,0),t=0;if(!(this.len-this.pos>4)){for(;t<3;++t){if(this.pos>=this.len)throw o(this);if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e}return e.lo=(e.lo|(127&this.buf[this.pos++])<<7*t)>>>0,e}for(;t<4;++t)if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e;if(e.lo=(e.lo|(127&this.buf[this.pos])<<28)>>>0,e.hi=(e.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return e;if(t=0,this.len-this.pos>4){for(;t<5;++t)if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}else for(;t<5;++t){if(this.pos>=this.len)throw o(this);if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}throw Error("invalid varint encoding")}function l(e,t){return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0}function p(){if(this.pos+8>this.len)throw o(this,8);return new n(l(this.buf,this.pos+=4),l(this.buf,this.pos+=4))}return i.create=c(),i.prototype._slice=t.Array.prototype.subarray||t.Array.prototype.slice,i.prototype.uint32=(a=4294967295,function(){if(a=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128)return a;if(a=(a|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)return a;if(a=(a|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)return a;if(a=(a|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)return a;if(a=(a|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128)return a;if((this.pos+=5)>this.len)throw this.pos=this.len,o(this,10);return a}),i.prototype.int32=function(){return 0|this.uint32()},i.prototype.sint32=function(){var e=this.uint32();return e>>>1^-(1&e)},i.prototype.bool=function(){return 0!==this.uint32()},i.prototype.fixed32=function(){if(this.pos+4>this.len)throw o(this,4);return l(this.buf,this.pos+=4)},i.prototype.sfixed32=function(){if(this.pos+4>this.len)throw o(this,4);return 0|l(this.buf,this.pos+=4)},i.prototype.float=function(){if(this.pos+4>this.len)throw o(this,4);var e=t.float.readFloatLE(this.buf,this.pos);return this.pos+=4,e},i.prototype.double=function(){if(this.pos+8>this.len)throw o(this,4);var e=t.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,e},i.prototype.bytes=function(){var e=this.uint32(),t=this.pos,n=this.pos+e;if(n>this.len)throw o(this,e);return this.pos+=e,Array.isArray(this.buf)?this.buf.slice(t,n):t===n?new this.buf.constructor(0):this._slice.call(this.buf,t,n)},i.prototype.string=function(){var e=this.bytes();return r.read(e,0,e.length)},i.prototype.skip=function(e){if("number"==typeof e){if(this.pos+e>this.len)throw o(this,e);this.pos+=e}else do{if(this.pos>=this.len)throw o(this)}while(128&this.buf[this.pos++]);return this},i.prototype.skipType=function(e){switch(e){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;4!=(e=7&this.uint32());)this.skipType(e);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+e+" at offset "+this.pos)}return this},i._configure=function(n){e=n,i.create=c(),e._configure();var r=t.Long?"toLong":"toNumber";t.merge(i.prototype,{int64:function(){return u.call(this)[r](!1)},uint64:function(){return u.call(this)[r](!0)},sint64:function(){return u.call(this).zzDecode()[r](!1)},fixed64:function(){return p.call(this)[r](!0)},sfixed64:function(){return p.call(this)[r](!1)}})},OC}var LC,UC,kC,DC,jC,BC,VC,FC,GC,HC,YC,qC,zC={};function KC(){return kC||(kC=1,function(e){e.Service=function(){if(UC)return LC;UC=1,LC=t;var e=xC();function t(t,n,r){if("function"!=typeof t)throw TypeError("rpcImpl must be a function");e.EventEmitter.call(this),this.rpcImpl=t,this.requestDelimited=Boolean(n),this.responseDelimited=Boolean(r)}return(t.prototype=Object.create(e.EventEmitter.prototype)).constructor=t,t.prototype.rpcCall=function t(n,r,o,i,a){if(!i)throw TypeError("request must be specified");var s=this;if(!a)return e.asPromise(t,s,n,r,o,i);if(s.rpcImpl)try{return s.rpcImpl(n,r[s.requestDelimited?"encodeDelimited":"encode"](i).finish(),(function(e,t){if(e)return s.emit("error",e,n),a(e);if(null!==t){if(!(t instanceof o))try{t=o[s.responseDelimited?"decodeDelimited":"decode"](t)}catch(e){return s.emit("error",e,n),a(e)}return s.emit("data",t,n),a(null,t)}s.end(!0)}))}catch(e){return s.emit("error",e,n),void setTimeout((function(){a(e)}),0)}else setTimeout((function(){a(Error("already ended"))}),0)},t.prototype.end=function(e){return this.rpcImpl&&(e||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this},LC}()}(zC)),zC}function WC(){return BC||(BC=1,function(e){var t=e;function n(){t.util._configure(),t.Writer._configure(t.BufferWriter),t.Reader._configure(t.BufferReader)}t.build="minimal",t.Writer=CC(),t.BufferWriter=function(){if(TC)return SC;TC=1,SC=n;var e=CC();(n.prototype=Object.create(e.prototype)).constructor=n;var t=xC();function n(){e.call(this)}function r(e,n,r){e.length<40?t.utf8.write(e,n,r):n.utf8Write?n.utf8Write(e,r):n.write(e,r)}return n._configure=function(){n.alloc=t._Buffer_allocUnsafe,n.writeBytesBuffer=t.Buffer&&t.Buffer.prototype instanceof Uint8Array&&"set"===t.Buffer.prototype.set.name?function(e,t,n){t.set(e,n)}:function(e,t,n){if(e.copy)e.copy(t,n,0,e.length);else for(var r=0;r<e.length;)t[n++]=e[r++]}},n.prototype.bytes=function(e){t.isString(e)&&(e=t._Buffer_from(e,"base64"));var r=e.length>>>0;return this.uint32(r),r&&this._push(n.writeBytesBuffer,r,e),this},n.prototype.string=function(e){var n=t.Buffer.byteLength(e);return this.uint32(n),n&&this._push(r,n,e),this},n._configure(),SC}(),t.Reader=MC(),t.BufferReader=function(){if(RC)return wC;RC=1,wC=n;var e=MC();(n.prototype=Object.create(e.prototype)).constructor=n;var t=xC();function n(t){e.call(this,t)}return n._configure=function(){t.Buffer&&(n.prototype._slice=t.Buffer.prototype.slice)},n.prototype.string=function(){var e=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+e,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+e,this.len))},n._configure(),wC}(),t.util=xC(),t.rpc=KC(),t.roots=jC?DC:(jC=1,DC={}),t.configure=n,n()}(Zx)),Zx}function QC(){return FC?VC:(FC=1,VC=WC())}function JC(){if(YC)return $P;YC=1,Object.defineProperty($P,"__esModule",{value:!0}),$P.IMQAOpAMPClient=void 0;const e=F,t=Jx(),n=e.__importDefault(function(){if(HC)return GC;HC=1;var e,t,n,r,o=QC(),i=o.Reader,a=o.Writer,s=o.util,c=o.roots.default||(o.roots.default={});return c.opamp=((r={}).proto=((n={}).AgentToServer=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.instance_uid=s.newBuffer([]),e.prototype.sequence_num=s.Long?s.Long.fromBits(0,0,!0):0,e.prototype.agent_description=null,e.prototype.capabilities=s.Long?s.Long.fromBits(0,0,!0):0,e.prototype.health=null,e.prototype.effective_config=null,e.prototype.remote_config_status=null,e.prototype.package_statuses=null,e.prototype.agent_disconnect=null,e.prototype.flags=s.Long?s.Long.fromBits(0,0,!0):0,e.prototype.connection_settings_request=null,e.prototype.custom_capabilities=null,e.prototype.custom_message=null,e.prototype.available_components=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=a.create()),null!=e.instance_uid&&Object.hasOwnProperty.call(e,"instance_uid")&&t.uint32(10).bytes(e.instance_uid),null!=e.sequence_num&&Object.hasOwnProperty.call(e,"sequence_num")&&t.uint32(16).uint64(e.sequence_num),null!=e.agent_description&&Object.hasOwnProperty.call(e,"agent_description")&&c.opamp.proto.AgentDescription.encode(e.agent_description,t.uint32(26).fork()).ldelim(),null!=e.capabilities&&Object.hasOwnProperty.call(e,"capabilities")&&t.uint32(32).uint64(e.capabilities),null!=e.health&&Object.hasOwnProperty.call(e,"health")&&c.opamp.proto.ComponentHealth.encode(e.health,t.uint32(42).fork()).ldelim(),null!=e.effective_config&&Object.hasOwnProperty.call(e,"effective_config")&&c.opamp.proto.EffectiveConfig.encode(e.effective_config,t.uint32(50).fork()).ldelim(),null!=e.remote_config_status&&Object.hasOwnProperty.call(e,"remote_config_status")&&c.opamp.proto.RemoteConfigStatus.encode(e.remote_config_status,t.uint32(58).fork()).ldelim(),null!=e.package_statuses&&Object.hasOwnProperty.call(e,"package_statuses")&&c.opamp.proto.PackageStatuses.encode(e.package_statuses,t.uint32(66).fork()).ldelim(),null!=e.agent_disconnect&&Object.hasOwnProperty.call(e,"agent_disconnect")&&c.opamp.proto.AgentDisconnect.encode(e.agent_disconnect,t.uint32(74).fork()).ldelim(),null!=e.flags&&Object.hasOwnProperty.call(e,"flags")&&t.uint32(80).uint64(e.flags),null!=e.connection_settings_request&&Object.hasOwnProperty.call(e,"connection_settings_request")&&c.opamp.proto.ConnectionSettingsRequest.encode(e.connection_settings_request,t.uint32(90).fork()).ldelim(),null!=e.custom_capabilities&&Object.hasOwnProperty.call(e,"custom_capabilities")&&c.opamp.proto.CustomCapabilities.encode(e.custom_capabilities,t.uint32(98).fork()).ldelim(),null!=e.custom_message&&Object.hasOwnProperty.call(e,"custom_message")&&c.opamp.proto.CustomMessage.encode(e.custom_message,t.uint32(106).fork()).ldelim(),null!=e.available_components&&Object.hasOwnProperty.call(e,"available_components")&&c.opamp.proto.AvailableComponents.encode(e.available_components,t.uint32(114).fork()).ldelim(),t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t){e instanceof i||(e=i.create(e));for(var n=void 0===t?e.len:e.pos+t,r=new c.opamp.proto.AgentToServer;e.pos<n;){var o=e.uint32();switch(o>>>3){case 1:r.instance_uid=e.bytes();break;case 2:r.sequence_num=e.uint64();break;case 3:r.agent_description=c.opamp.proto.AgentDescription.decode(e,e.uint32());break;case 4:r.capabilities=e.uint64();break;case 5:r.health=c.opamp.proto.ComponentHealth.decode(e,e.uint32());break;case 6:r.effective_config=c.opamp.proto.EffectiveConfig.decode(e,e.uint32());break;case 7:r.remote_config_status=c.opamp.proto.RemoteConfigStatus.decode(e,e.uint32());break;case 8:r.package_statuses=c.opamp.proto.PackageStatuses.decode(e,e.uint32());break;case 9:r.agent_disconnect=c.opamp.proto.AgentDisconnect.decode(e,e.uint32());break;case 10:r.flags=e.uint64();break;case 11:r.connection_settings_request=c.opamp.proto.ConnectionSettingsRequest.decode(e,e.uint32());break;case 12:r.custom_capabilities=c.opamp.proto.CustomCapabilities.decode(e,e.uint32());break;case 13:r.custom_message=c.opamp.proto.CustomMessage.decode(e,e.uint32());break;case 14:r.available_components=c.opamp.proto.AvailableComponents.decode(e,e.uint32());break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof i||(e=new i(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.instance_uid&&e.hasOwnProperty("instance_uid")&&!(e.instance_uid&&"number"==typeof e.instance_uid.length||s.isString(e.instance_uid))?"instance_uid: buffer expected":null!=e.sequence_num&&e.hasOwnProperty("sequence_num")&&!(s.isInteger(e.sequence_num)||e.sequence_num&&s.isInteger(e.sequence_num.low)&&s.isInteger(e.sequence_num.high))?"sequence_num: integer|Long expected":null!=e.agent_description&&e.hasOwnProperty("agent_description")&&(t=c.opamp.proto.AgentDescription.verify(e.agent_description))?"agent_description."+t:null!=e.capabilities&&e.hasOwnProperty("capabilities")&&!(s.isInteger(e.capabilities)||e.capabilities&&s.isInteger(e.capabilities.low)&&s.isInteger(e.capabilities.high))?"capabilities: integer|Long expected":null!=e.health&&e.hasOwnProperty("health")&&(t=c.opamp.proto.ComponentHealth.verify(e.health))?"health."+t:null!=e.effective_config&&e.hasOwnProperty("effective_config")&&(t=c.opamp.proto.EffectiveConfig.verify(e.effective_config))?"effective_config."+t:null!=e.remote_config_status&&e.hasOwnProperty("remote_config_status")&&(t=c.opamp.proto.RemoteConfigStatus.verify(e.remote_config_status))?"remote_config_status."+t:null!=e.package_statuses&&e.hasOwnProperty("package_statuses")&&(t=c.opamp.proto.PackageStatuses.verify(e.package_statuses))?"package_statuses."+t:null!=e.agent_disconnect&&e.hasOwnProperty("agent_disconnect")&&(t=c.opamp.proto.AgentDisconnect.verify(e.agent_disconnect))?"agent_disconnect."+t:null!=e.flags&&e.hasOwnProperty("flags")&&!(s.isInteger(e.flags)||e.flags&&s.isInteger(e.flags.low)&&s.isInteger(e.flags.high))?"flags: integer|Long expected":null!=e.connection_settings_request&&e.hasOwnProperty("connection_settings_request")&&(t=c.opamp.proto.ConnectionSettingsRequest.verify(e.connection_settings_request))?"connection_settings_request."+t:null!=e.custom_capabilities&&e.hasOwnProperty("custom_capabilities")&&(t=c.opamp.proto.CustomCapabilities.verify(e.custom_capabilities))?"custom_capabilities."+t:null!=e.custom_message&&e.hasOwnProperty("custom_message")&&(t=c.opamp.proto.CustomMessage.verify(e.custom_message))?"custom_message."+t:null!=e.available_components&&e.hasOwnProperty("available_components")&&(t=c.opamp.proto.AvailableComponents.verify(e.available_components))?"available_components."+t:null;var t},e.fromObject=function(e){if(e instanceof c.opamp.proto.AgentToServer)return e;var t=new c.opamp.proto.AgentToServer;if(null!=e.instance_uid&&("string"==typeof e.instance_uid?s.base64.decode(e.instance_uid,t.instance_uid=s.newBuffer(s.base64.length(e.instance_uid)),0):e.instance_uid.length&&(t.instance_uid=e.instance_uid)),null!=e.sequence_num&&(s.Long?(t.sequence_num=s.Long.fromValue(e.sequence_num)).unsigned=!0:"string"==typeof e.sequence_num?t.sequence_num=parseInt(e.sequence_num,10):"number"==typeof e.sequence_num?t.sequence_num=e.sequence_num:"object"==typeof e.sequence_num&&(t.sequence_num=new s.LongBits(e.sequence_num.low>>>0,e.sequence_num.high>>>0).toNumber(!0))),null!=e.agent_description){if("object"!=typeof e.agent_description)throw TypeError(".opamp.proto.AgentToServer.agent_description: object expected");t.agent_description=c.opamp.proto.AgentDescription.fromObject(e.agent_description)}if(null!=e.capabilities&&(s.Long?(t.capabilities=s.Long.fromValue(e.capabilities)).unsigned=!0:"string"==typeof e.capabilities?t.capabilities=parseInt(e.capabilities,10):"number"==typeof e.capabilities?t.capabilities=e.capabilities:"object"==typeof e.capabilities&&(t.capabilities=new s.LongBits(e.capabilities.low>>>0,e.capabilities.high>>>0).toNumber(!0))),null!=e.health){if("object"!=typeof e.health)throw TypeError(".opamp.proto.AgentToServer.health: object expected");t.health=c.opamp.proto.ComponentHealth.fromObject(e.health)}if(null!=e.effective_config){if("object"!=typeof e.effective_config)throw TypeError(".opamp.proto.AgentToServer.effective_config: object expected");t.effective_config=c.opamp.proto.EffectiveConfig.fromObject(e.effective_config)}if(null!=e.remote_config_status){if("object"!=typeof e.remote_config_status)throw TypeError(".opamp.proto.AgentToServer.remote_config_status: object expected");t.remote_config_status=c.opamp.proto.RemoteConfigStatus.fromObject(e.remote_config_status)}if(null!=e.package_statuses){if("object"!=typeof e.package_statuses)throw TypeError(".opamp.proto.AgentToServer.package_statuses: object expected");t.package_statuses=c.opamp.proto.PackageStatuses.fromObject(e.package_statuses)}if(null!=e.agent_disconnect){if("object"!=typeof e.agent_disconnect)throw TypeError(".opamp.proto.AgentToServer.agent_disconnect: object expected");t.agent_disconnect=c.opamp.proto.AgentDisconnect.fromObject(e.agent_disconnect)}if(null!=e.flags&&(s.Long?(t.flags=s.Long.fromValue(e.flags)).unsigned=!0:"string"==typeof e.flags?t.flags=parseInt(e.flags,10):"number"==typeof e.flags?t.flags=e.flags:"object"==typeof e.flags&&(t.flags=new s.LongBits(e.flags.low>>>0,e.flags.high>>>0).toNumber(!0))),null!=e.connection_settings_request){if("object"!=typeof e.connection_settings_request)throw TypeError(".opamp.proto.AgentToServer.connection_settings_request: object expected");t.connection_settings_request=c.opamp.proto.ConnectionSettingsRequest.fromObject(e.connection_settings_request)}if(null!=e.custom_capabilities){if("object"!=typeof e.custom_capabilities)throw TypeError(".opamp.proto.AgentToServer.custom_capabilities: object expected");t.custom_capabilities=c.opamp.proto.CustomCapabilities.fromObject(e.custom_capabilities)}if(null!=e.custom_message){if("object"!=typeof e.custom_message)throw TypeError(".opamp.proto.AgentToServer.custom_message: object expected");t.custom_message=c.opamp.proto.CustomMessage.fromObject(e.custom_message)}if(null!=e.available_components){if("object"!=typeof e.available_components)throw TypeError(".opamp.proto.AgentToServer.available_components: object expected");t.available_components=c.opamp.proto.AvailableComponents.fromObject(e.available_components)}return t},e.toObject=function(e,t){t||(t={});var n={};if(t.defaults){if(t.bytes===String?n.instance_uid="":(n.instance_uid=[],t.bytes!==Array&&(n.instance_uid=s.newBuffer(n.instance_uid))),s.Long){var r=new s.Long(0,0,!0);n.sequence_num=t.longs===String?r.toString():t.longs===Number?r.toNumber():r}else n.sequence_num=t.longs===String?"0":0;n.agent_description=null,s.Long?(r=new s.Long(0,0,!0),n.capabilities=t.longs===String?r.toString():t.longs===Number?r.toNumber():r):n.capabilities=t.longs===String?"0":0,n.health=null,n.effective_config=null,n.remote_config_status=null,n.package_statuses=null,n.agent_disconnect=null,s.Long?(r=new s.Long(0,0,!0),n.flags=t.longs===String?r.toString():t.longs===Number?r.toNumber():r):n.flags=t.longs===String?"0":0,n.connection_settings_request=null,n.custom_capabilities=null,n.custom_message=null,n.available_components=null}return null!=e.instance_uid&&e.hasOwnProperty("instance_uid")&&(n.instance_uid=t.bytes===String?s.base64.encode(e.instance_uid,0,e.instance_uid.length):t.bytes===Array?Array.prototype.slice.call(e.instance_uid):e.instance_uid),null!=e.sequence_num&&e.hasOwnProperty("sequence_num")&&("number"==typeof e.sequence_num?n.sequence_num=t.longs===String?String(e.sequence_num):e.sequence_num:n.sequence_num=t.longs===String?s.Long.prototype.toString.call(e.sequence_num):t.longs===Number?new s.LongBits(e.sequence_num.low>>>0,e.sequence_num.high>>>0).toNumber(!0):e.sequence_num),null!=e.agent_description&&e.hasOwnProperty("agent_description")&&(n.agent_description=c.opamp.proto.AgentDescription.toObject(e.agent_description,t)),null!=e.capabilities&&e.hasOwnProperty("capabilities")&&("number"==typeof e.capabilities?n.capabilities=t.longs===String?String(e.capabilities):e.capabilities:n.capabilities=t.longs===String?s.Long.prototype.toString.call(e.capabilities):t.longs===Number?new s.LongBits(e.capabilities.low>>>0,e.capabilities.high>>>0).toNumber(!0):e.capabilities),null!=e.health&&e.hasOwnProperty("health")&&(n.health=c.opamp.proto.ComponentHealth.toObject(e.health,t)),null!=e.effective_config&&e.hasOwnProperty("effective_config")&&(n.effective_config=c.opamp.proto.EffectiveConfig.toObject(e.effective_config,t)),null!=e.remote_config_status&&e.hasOwnProperty("remote_config_status")&&(n.remote_config_status=c.opamp.proto.RemoteConfigStatus.toObject(e.remote_config_status,t)),null!=e.package_statuses&&e.hasOwnProperty("package_statuses")&&(n.package_statuses=c.opamp.proto.PackageStatuses.toObject(e.package_statuses,t)),null!=e.agent_disconnect&&e.hasOwnProperty("agent_disconnect")&&(n.agent_disconnect=c.opamp.proto.AgentDisconnect.toObject(e.agent_disconnect,t)),null!=e.flags&&e.hasOwnProperty("flags")&&("number"==typeof e.flags?n.flags=t.longs===String?String(e.flags):e.flags:n.flags=t.longs===String?s.Long.prototype.toString.call(e.flags):t.longs===Number?new s.LongBits(e.flags.low>>>0,e.flags.high>>>0).toNumber(!0):e.flags),null!=e.connection_settings_request&&e.hasOwnProperty("connection_settings_request")&&(n.connection_settings_request=c.opamp.proto.ConnectionSettingsRequest.toObject(e.connection_settings_request,t)),null!=e.custom_capabilities&&e.hasOwnProperty("custom_capabilities")&&(n.custom_capabilities=c.opamp.proto.CustomCapabilities.toObject(e.custom_capabilities,t)),null!=e.custom_message&&e.hasOwnProperty("custom_message")&&(n.custom_message=c.opamp.proto.CustomMessage.toObject(e.custom_message,t)),null!=e.available_components&&e.hasOwnProperty("available_components")&&(n.available_components=c.opamp.proto.AvailableComponents.toObject(e.available_components,t)),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/opamp.proto.AgentToServer"},e}(),n.AgentToServerFlags=(e={},(t=Object.create(e))[e[0]="AgentToServerFlags_Unspecified"]=0,t[e[1]="AgentToServerFlags_RequestInstanceUid"]=1,t),n.AgentDisconnect=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=a.create()),t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t){e instanceof i||(e=i.create(e));for(var n=void 0===t?e.len:e.pos+t,r=new c.opamp.proto.AgentDisconnect;e.pos<n;){var o=e.uint32();e.skipType(7&o)}return r},e.decodeDelimited=function(e){return e instanceof i||(e=new i(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!=typeof e||null===e?"object expected":null},e.fromObject=function(e){return e instanceof c.opamp.proto.AgentDisconnect?e:new c.opamp.proto.AgentDisconnect},e.toObject=function(){return{}},e.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/opamp.proto.AgentDisconnect"},e}(),n.ConnectionSettingsRequest=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.opamp=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=a.create()),null!=e.opamp&&Object.hasOwnProperty.call(e,"opamp")&&c.opamp.proto.OpAMPConnectionSettingsRequest.encode(e.opamp,t.uint32(10).fork()).ldelim(),t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t){e instanceof i||(e=i.create(e));for(var n=void 0===t?e.len:e.pos+t,r=new c.opamp.proto.ConnectionSettingsRequest;e.pos<n;){var o=e.uint32();o>>>3==1?r.opamp=c.opamp.proto.OpAMPConnectionSettingsRequest.decode(e,e.uint32()):e.skipType(7&o)}return r},e.decodeDelimited=function(e){return e instanceof i||(e=new i(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.opamp&&e.hasOwnProperty("opamp")){var t=c.opamp.proto.OpAMPConnectionSettingsRequest.verify(e.opamp);if(t)return"opamp."+t}return null},e.fromObject=function(e){if(e instanceof c.opamp.proto.ConnectionSettingsRequest)return e;var t=new c.opamp.proto.ConnectionSettingsRequest;if(null!=e.opamp){if("object"!=typeof e.opamp)throw TypeError(".opamp.proto.ConnectionSettingsRequest.opamp: object expected");t.opamp=c.opamp.proto.OpAMPConnectionSettingsRequest.fromObject(e.opamp)}return t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.opamp=null),null!=e.opamp&&e.hasOwnProperty("opamp")&&(n.opamp=c.opamp.proto.OpAMPConnectionSettingsRequest.toObject(e.opamp,t)),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/opamp.proto.ConnectionSettingsRequest"},e}(),n.OpAMPConnectionSettingsRequest=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.certificate_request=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=a.create()),null!=e.certificate_request&&Object.hasOwnProperty.call(e,"certificate_request")&&c.opamp.proto.CertificateRequest.encode(e.certificate_request,t.uint32(10).fork()).ldelim(),t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t){e instanceof i||(e=i.create(e));for(var n=void 0===t?e.len:e.pos+t,r=new c.opamp.proto.OpAMPConnectionSettingsRequest;e.pos<n;){var o=e.uint32();o>>>3==1?r.certificate_request=c.opamp.proto.CertificateRequest.decode(e,e.uint32()):e.skipType(7&o)}return r},e.decodeDelimited=function(e){return e instanceof i||(e=new i(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.certificate_request&&e.hasOwnProperty("certificate_request")){var t=c.opamp.proto.CertificateRequest.verify(e.certificate_request);if(t)return"certificate_request."+t}return null},e.fromObject=function(e){if(e instanceof c.opamp.proto.OpAMPConnectionSettingsRequest)return e;var t=new c.opamp.proto.OpAMPConnectionSettingsRequest;if(null!=e.certificate_request){if("object"!=typeof e.certificate_request)throw TypeError(".opamp.proto.OpAMPConnectionSettingsRequest.certificate_request: object expected");t.certificate_request=c.opamp.proto.CertificateRequest.fromObject(e.certificate_request)}return t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.certificate_request=null),null!=e.certificate_request&&e.hasOwnProperty("certificate_request")&&(n.certificate_request=c.opamp.proto.CertificateRequest.toObject(e.certificate_request,t)),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/opamp.proto.OpAMPConnectionSettingsRequest"},e}(),n.CertificateRequest=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.csr=s.newBuffer([]),e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=a.create()),null!=e.csr&&Object.hasOwnProperty.call(e,"csr")&&t.uint32(10).bytes(e.csr),t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t){e instanceof i||(e=i.create(e));for(var n=void 0===t?e.len:e.pos+t,r=new c.opamp.proto.CertificateRequest;e.pos<n;){var o=e.uint32();o>>>3==1?r.csr=e.bytes():e.skipType(7&o)}return r},e.decodeDelimited=function(e){return e instanceof i||(e=new i(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.csr&&e.hasOwnProperty("csr")&&!(e.csr&&"number"==typeof e.csr.length||s.isString(e.csr))?"csr: buffer expected":null},e.fromObject=function(e){if(e instanceof c.opamp.proto.CertificateRequest)return e;var t=new c.opamp.proto.CertificateRequest;return null!=e.csr&&("string"==typeof e.csr?s.base64.decode(e.csr,t.csr=s.newBuffer(s.base64.length(e.csr)),0):e.csr.length&&(t.csr=e.csr)),t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(t.bytes===String?n.csr="":(n.csr=[],t.bytes!==Array&&(n.csr=s.newBuffer(n.csr)))),null!=e.csr&&e.hasOwnProperty("csr")&&(n.csr=t.bytes===String?s.base64.encode(e.csr,0,e.csr.length):t.bytes===Array?Array.prototype.slice.call(e.csr):e.csr),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/opamp.proto.CertificateRequest"},e}(),n.AvailableComponents=function(){function e(e){if(this.components={},e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.components=s.emptyObject,e.prototype.hash=s.newBuffer([]),e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=a.create()),null!=e.components&&Object.hasOwnProperty.call(e,"components"))for(var n=Object.keys(e.components),r=0;r<n.length;++r)t.uint32(10).fork().uint32(10).string(n[r]),c.opamp.proto.ComponentDetails.encode(e.components[n[r]],t.uint32(18).fork()).ldelim().ldelim();return null!=e.hash&&Object.hasOwnProperty.call(e,"hash")&&t.uint32(18).bytes(e.hash),t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t){e instanceof i||(e=i.create(e));for(var n,r,o=void 0===t?e.len:e.pos+t,a=new c.opamp.proto.AvailableComponents;e.pos<o;){var u=e.uint32();switch(u>>>3){case 1:a.components===s.emptyObject&&(a.components={});var l=e.uint32()+e.pos;for(n="",r=null;e.pos<l;){var p=e.uint32();switch(p>>>3){case 1:n=e.string();break;case 2:r=c.opamp.proto.ComponentDetails.decode(e,e.uint32());break;default:e.skipType(7&p)}}a.components[n]=r;break;case 2:a.hash=e.bytes();break;default:e.skipType(7&u)}}return a},e.decodeDelimited=function(e){return e instanceof i||(e=new i(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.components&&e.hasOwnProperty("components")){if(!s.isObject(e.components))return"components: object expected";for(var t=Object.keys(e.components),n=0;n<t.length;++n){var r=c.opamp.proto.ComponentDetails.verify(e.components[t[n]]);if(r)return"components."+r}}return null!=e.hash&&e.hasOwnProperty("hash")&&!(e.hash&&"number"==typeof e.hash.length||s.isString(e.hash))?"hash: buffer expected":null},e.fromObject=function(e){if(e instanceof c.opamp.proto.AvailableComponents)return e;var t=new c.opamp.proto.AvailableComponents;if(e.components){if("object"!=typeof e.components)throw TypeError(".opamp.proto.AvailableComponents.components: object expected");t.components={};for(var n=Object.keys(e.components),r=0;r<n.length;++r){if("object"!=typeof e.components[n[r]])throw TypeError(".opamp.proto.AvailableComponents.components: object expected");t.components[n[r]]=c.opamp.proto.ComponentDetails.fromObject(e.components[n[r]])}}return null!=e.hash&&("string"==typeof e.hash?s.base64.decode(e.hash,t.hash=s.newBuffer(s.base64.length(e.hash)),0):e.hash.length&&(t.hash=e.hash)),t},e.toObject=function(e,t){t||(t={});var n,r={};if((t.objects||t.defaults)&&(r.components={}),t.defaults&&(t.bytes===String?r.hash="":(r.hash=[],t.bytes!==Array&&(r.hash=s.newBuffer(r.hash)))),e.components&&(n=Object.keys(e.components)).length){r.components={};for(var o=0;o<n.length;++o)r.components[n[o]]=c.opamp.proto.ComponentDetails.toObject(e.components[n[o]],t)}return null!=e.hash&&e.hasOwnProperty("hash")&&(r.hash=t.bytes===String?s.base64.encode(e.hash,0,e.hash.length):t.bytes===Array?Array.prototype.slice.call(e.hash):e.hash),r},e.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/opamp.proto.AvailableComponents"},e}(),n.ComponentDetails=function(){function e(e){if(this.metadata=[],this.sub_component_map={},e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.metadata=s.emptyArray,e.prototype.sub_component_map=s.emptyObject,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=a.create()),null!=e.metadata&&e.metadata.length)for(var n=0;n<e.metadata.length;++n)c.opamp.proto.KeyValue.encode(e.metadata[n],t.uint32(10).fork()).ldelim();if(null!=e.sub_component_map&&Object.hasOwnProperty.call(e,"sub_component_map")){var r=Object.keys(e.sub_component_map);for(n=0;n<r.length;++n)t.uint32(18).fork().uint32(10).string(r[n]),c.opamp.proto.ComponentDetails.encode(e.sub_component_map[r[n]],t.uint32(18).fork()).ldelim().ldelim()}return t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t){e instanceof i||(e=i.create(e));for(var n,r,o=void 0===t?e.len:e.pos+t,a=new c.opamp.proto.ComponentDetails;e.pos<o;){var u=e.uint32();switch(u>>>3){case 1:a.metadata&&a.metadata.length||(a.metadata=[]),a.metadata.push(c.opamp.proto.KeyValue.decode(e,e.uint32()));break;case 2:a.sub_component_map===s.emptyObject&&(a.sub_component_map={});var l=e.uint32()+e.pos;for(n="",r=null;e.pos<l;){var p=e.uint32();switch(p>>>3){case 1:n=e.string();break;case 2:r=c.opamp.proto.ComponentDetails.decode(e,e.uint32());break;default:e.skipType(7&p)}}a.sub_component_map[n]=r;break;default:e.skipType(7&u)}}return a},e.decodeDelimited=function(e){return e instanceof i||(e=new i(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.metadata&&e.hasOwnProperty("metadata")){if(!Array.isArray(e.metadata))return"metadata: array expected";for(var t=0;t<e.metadata.length;++t)if(r=c.opamp.proto.KeyValue.verify(e.metadata[t]))return"metadata."+r}if(null!=e.sub_component_map&&e.hasOwnProperty("sub_component_map")){if(!s.isObject(e.sub_component_map))return"sub_component_map: object expected";var n=Object.keys(e.sub_component_map);for(t=0;t<n.length;++t){var r;if(r=c.opamp.proto.ComponentDetails.verify(e.sub_component_map[n[t]]))return"sub_component_map."+r}}return null},e.fromObject=function(e){if(e instanceof c.opamp.proto.ComponentDetails)return e;var t=new c.opamp.proto.ComponentDetails;if(e.metadata){if(!Array.isArray(e.metadata))throw TypeError(".opamp.proto.ComponentDetails.metadata: array expected");t.metadata=[];for(var n=0;n<e.metadata.length;++n){if("object"!=typeof e.metadata[n])throw TypeError(".opamp.proto.ComponentDetails.metadata: object expected");t.metadata[n]=c.opamp.proto.KeyValue.fromObject(e.metadata[n])}}if(e.sub_component_map){if("object"!=typeof e.sub_component_map)throw TypeError(".opamp.proto.ComponentDetails.sub_component_map: object expected");t.sub_component_map={};var r=Object.keys(e.sub_component_map);for(n=0;n<r.length;++n){if("object"!=typeof e.sub_component_map[r[n]])throw TypeError(".opamp.proto.ComponentDetails.sub_component_map: object expected");t.sub_component_map[r[n]]=c.opamp.proto.ComponentDetails.fromObject(e.sub_component_map[r[n]])}}return t},e.toObject=function(e,t){t||(t={});var n,r={};if((t.arrays||t.defaults)&&(r.metadata=[]),(t.objects||t.defaults)&&(r.sub_component_map={}),e.metadata&&e.metadata.length){r.metadata=[];for(var o=0;o<e.metadata.length;++o)r.metadata[o]=c.opamp.proto.KeyValue.toObject(e.metadata[o],t)}if(e.sub_component_map&&(n=Object.keys(e.sub_component_map)).length)for(r.sub_component_map={},o=0;o<n.length;++o)r.sub_component_map[n[o]]=c.opamp.proto.ComponentDetails.toObject(e.sub_component_map[n[o]],t);return r},e.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/opamp.proto.ComponentDetails"},e}(),n.ServerToAgent=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.instance_uid=s.newBuffer([]),e.prototype.error_response=null,e.prototype.remote_config=null,e.prototype.connection_settings=null,e.prototype.packages_available=null,e.prototype.flags=s.Long?s.Long.fromBits(0,0,!0):0,e.prototype.capabilities=s.Long?s.Long.fromBits(0,0,!0):0,e.prototype.agent_identification=null,e.prototype.command=null,e.prototype.custom_capabilities=null,e.prototype.custom_message=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=a.create()),null!=e.instance_uid&&Object.hasOwnProperty.call(e,"instance_uid")&&t.uint32(10).bytes(e.instance_uid),null!=e.error_response&&Object.hasOwnProperty.call(e,"error_response")&&c.opamp.proto.ServerErrorResponse.encode(e.error_response,t.uint32(18).fork()).ldelim(),null!=e.remote_config&&Object.hasOwnProperty.call(e,"remote_config")&&c.opamp.proto.AgentRemoteConfig.encode(e.remote_config,t.uint32(26).fork()).ldelim(),null!=e.connection_settings&&Object.hasOwnProperty.call(e,"connection_settings")&&c.opamp.proto.ConnectionSettingsOffers.encode(e.connection_settings,t.uint32(34).fork()).ldelim(),null!=e.packages_available&&Object.hasOwnProperty.call(e,"packages_available")&&c.opamp.proto.PackagesAvailable.encode(e.packages_available,t.uint32(42).fork()).ldelim(),null!=e.flags&&Object.hasOwnProperty.call(e,"flags")&&t.uint32(48).uint64(e.flags),null!=e.capabilities&&Object.hasOwnProperty.call(e,"capabilities")&&t.uint32(56).uint64(e.capabilities),null!=e.agent_identification&&Object.hasOwnProperty.call(e,"agent_identification")&&c.opamp.proto.AgentIdentification.encode(e.agent_identification,t.uint32(66).fork()).ldelim(),null!=e.command&&Object.hasOwnProperty.call(e,"command")&&c.opamp.proto.ServerToAgentCommand.encode(e.command,t.uint32(74).fork()).ldelim(),null!=e.custom_capabilities&&Object.hasOwnProperty.call(e,"custom_capabilities")&&c.opamp.proto.CustomCapabilities.encode(e.custom_capabilities,t.uint32(82).fork()).ldelim(),null!=e.custom_message&&Object.hasOwnProperty.call(e,"custom_message")&&c.opamp.proto.CustomMessage.encode(e.custom_message,t.uint32(90).fork()).ldelim(),t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t){e instanceof i||(e=i.create(e));for(var n=void 0===t?e.len:e.pos+t,r=new c.opamp.proto.ServerToAgent;e.pos<n;){var o=e.uint32();switch(o>>>3){case 1:r.instance_uid=e.bytes();break;case 2:r.error_response=c.opamp.proto.ServerErrorResponse.decode(e,e.uint32());break;case 3:r.remote_config=c.opamp.proto.AgentRemoteConfig.decode(e,e.uint32());break;case 4:r.connection_settings=c.opamp.proto.ConnectionSettingsOffers.decode(e,e.uint32());break;case 5:r.packages_available=c.opamp.proto.PackagesAvailable.decode(e,e.uint32());break;case 6:r.flags=e.uint64();break;case 7:r.capabilities=e.uint64();break;case 8:r.agent_identification=c.opamp.proto.AgentIdentification.decode(e,e.uint32());break;case 9:r.command=c.opamp.proto.ServerToAgentCommand.decode(e,e.uint32());break;case 10:r.custom_capabilities=c.opamp.proto.CustomCapabilities.decode(e,e.uint32());break;case 11:r.custom_message=c.opamp.proto.CustomMessage.decode(e,e.uint32());break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof i||(e=new i(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.instance_uid&&e.hasOwnProperty("instance_uid")&&!(e.instance_uid&&"number"==typeof e.instance_uid.length||s.isString(e.instance_uid))?"instance_uid: buffer expected":null!=e.error_response&&e.hasOwnProperty("error_response")&&(t=c.opamp.proto.ServerErrorResponse.verify(e.error_response))?"error_response."+t:null!=e.remote_config&&e.hasOwnProperty("remote_config")&&(t=c.opamp.proto.AgentRemoteConfig.verify(e.remote_config))?"remote_config."+t:null!=e.connection_settings&&e.hasOwnProperty("connection_settings")&&(t=c.opamp.proto.ConnectionSettingsOffers.verify(e.connection_settings))?"connection_settings."+t:null!=e.packages_available&&e.hasOwnProperty("packages_available")&&(t=c.opamp.proto.PackagesAvailable.verify(e.packages_available))?"packages_available."+t:null!=e.flags&&e.hasOwnProperty("flags")&&!(s.isInteger(e.flags)||e.flags&&s.isInteger(e.flags.low)&&s.isInteger(e.flags.high))?"flags: integer|Long expected":null!=e.capabilities&&e.hasOwnProperty("capabilities")&&!(s.isInteger(e.capabilities)||e.capabilities&&s.isInteger(e.capabilities.low)&&s.isInteger(e.capabilities.high))?"capabilities: integer|Long expected":null!=e.agent_identification&&e.hasOwnProperty("agent_identification")&&(t=c.opamp.proto.AgentIdentification.verify(e.agent_identification))?"agent_identification."+t:null!=e.command&&e.hasOwnProperty("command")&&(t=c.opamp.proto.ServerToAgentCommand.verify(e.command))?"command."+t:null!=e.custom_capabilities&&e.hasOwnProperty("custom_capabilities")&&(t=c.opamp.proto.CustomCapabilities.verify(e.custom_capabilities))?"custom_capabilities."+t:null!=e.custom_message&&e.hasOwnProperty("custom_message")&&(t=c.opamp.proto.CustomMessage.verify(e.custom_message))?"custom_message."+t:null;var t},e.fromObject=function(e){if(e instanceof c.opamp.proto.ServerToAgent)return e;var t=new c.opamp.proto.ServerToAgent;if(null!=e.instance_uid&&("string"==typeof e.instance_uid?s.base64.decode(e.instance_uid,t.instance_uid=s.newBuffer(s.base64.length(e.instance_uid)),0):e.instance_uid.length&&(t.instance_uid=e.instance_uid)),null!=e.error_response){if("object"!=typeof e.error_response)throw TypeError(".opamp.proto.ServerToAgent.error_response: object expected");t.error_response=c.opamp.proto.ServerErrorResponse.fromObject(e.error_response)}if(null!=e.remote_config){if("object"!=typeof e.remote_config)throw TypeError(".opamp.proto.ServerToAgent.remote_config: object expected");t.remote_config=c.opamp.proto.AgentRemoteConfig.fromObject(e.remote_config)}if(null!=e.connection_settings){if("object"!=typeof e.connection_settings)throw TypeError(".opamp.proto.ServerToAgent.connection_settings: object expected");t.connection_settings=c.opamp.proto.ConnectionSettingsOffers.fromObject(e.connection_settings)}if(null!=e.packages_available){if("object"!=typeof e.packages_available)throw TypeError(".opamp.proto.ServerToAgent.packages_available: object expected");t.packages_available=c.opamp.proto.PackagesAvailable.fromObject(e.packages_available)}if(null!=e.flags&&(s.Long?(t.flags=s.Long.fromValue(e.flags)).unsigned=!0:"string"==typeof e.flags?t.flags=parseInt(e.flags,10):"number"==typeof e.flags?t.flags=e.flags:"object"==typeof e.flags&&(t.flags=new s.LongBits(e.flags.low>>>0,e.flags.high>>>0).toNumber(!0))),null!=e.capabilities&&(s.Long?(t.capabilities=s.Long.fromValue(e.capabilities)).unsigned=!0:"string"==typeof e.capabilities?t.capabilities=parseInt(e.capabilities,10):"number"==typeof e.capabilities?t.capabilities=e.capabilities:"object"==typeof e.capabilities&&(t.capabilities=new s.LongBits(e.capabilities.low>>>0,e.capabilities.high>>>0).toNumber(!0))),null!=e.agent_identification){if("object"!=typeof e.agent_identification)throw TypeError(".opamp.proto.ServerToAgent.agent_identification: object expected");t.agent_identification=c.opamp.proto.AgentIdentification.fromObject(e.agent_identification)}if(null!=e.command){if("object"!=typeof e.command)throw TypeError(".opamp.proto.ServerToAgent.command: object expected");t.command=c.opamp.proto.ServerToAgentCommand.fromObject(e.command)}if(null!=e.custom_capabilities){if("object"!=typeof e.custom_capabilities)throw TypeError(".opamp.proto.ServerToAgent.custom_capabilities: object expected");t.custom_capabilities=c.opamp.proto.CustomCapabilities.fromObject(e.custom_capabilities)}if(null!=e.custom_message){if("object"!=typeof e.custom_message)throw TypeError(".opamp.proto.ServerToAgent.custom_message: object expected");t.custom_message=c.opamp.proto.CustomMessage.fromObject(e.custom_message)}return t},e.toObject=function(e,t){t||(t={});var n={};if(t.defaults){if(t.bytes===String?n.instance_uid="":(n.instance_uid=[],t.bytes!==Array&&(n.instance_uid=s.newBuffer(n.instance_uid))),n.error_response=null,n.remote_config=null,n.connection_settings=null,n.packages_available=null,s.Long){var r=new s.Long(0,0,!0);n.flags=t.longs===String?r.toString():t.longs===Number?r.toNumber():r}else n.flags=t.longs===String?"0":0;s.Long?(r=new s.Long(0,0,!0),n.capabilities=t.longs===String?r.toString():t.longs===Number?r.toNumber():r):n.capabilities=t.longs===String?"0":0,n.agent_identification=null,n.command=null,n.custom_capabilities=null,n.custom_message=null}return null!=e.instance_uid&&e.hasOwnProperty("instance_uid")&&(n.instance_uid=t.bytes===String?s.base64.encode(e.instance_uid,0,e.instance_uid.length):t.bytes===Array?Array.prototype.slice.call(e.instance_uid):e.instance_uid),null!=e.error_response&&e.hasOwnProperty("error_response")&&(n.error_response=c.opamp.proto.ServerErrorResponse.toObject(e.error_response,t)),null!=e.remote_config&&e.hasOwnProperty("remote_config")&&(n.remote_config=c.opamp.proto.AgentRemoteConfig.toObject(e.remote_config,t)),null!=e.connection_settings&&e.hasOwnProperty("connection_settings")&&(n.connection_settings=c.opamp.proto.ConnectionSettingsOffers.toObject(e.connection_settings,t)),null!=e.packages_available&&e.hasOwnProperty("packages_available")&&(n.packages_available=c.opamp.proto.PackagesAvailable.toObject(e.packages_available,t)),null!=e.flags&&e.hasOwnProperty("flags")&&("number"==typeof e.flags?n.flags=t.longs===String?String(e.flags):e.flags:n.flags=t.longs===String?s.Long.prototype.toString.call(e.flags):t.longs===Number?new s.LongBits(e.flags.low>>>0,e.flags.high>>>0).toNumber(!0):e.flags),null!=e.capabilities&&e.hasOwnProperty("capabilities")&&("number"==typeof e.capabilities?n.capabilities=t.longs===String?String(e.capabilities):e.capabilities:n.capabilities=t.longs===String?s.Long.prototype.toString.call(e.capabilities):t.longs===Number?new s.LongBits(e.capabilities.low>>>0,e.capabilities.high>>>0).toNumber(!0):e.capabilities),null!=e.agent_identification&&e.hasOwnProperty("agent_identification")&&(n.agent_identification=c.opamp.proto.AgentIdentification.toObject(e.agent_identification,t)),null!=e.command&&e.hasOwnProperty("command")&&(n.command=c.opamp.proto.ServerToAgentCommand.toObject(e.command,t)),null!=e.custom_capabilities&&e.hasOwnProperty("custom_capabilities")&&(n.custom_capabilities=c.opamp.proto.CustomCapabilities.toObject(e.custom_capabilities,t)),null!=e.custom_message&&e.hasOwnProperty("custom_message")&&(n.custom_message=c.opamp.proto.CustomMessage.toObject(e.custom_message,t)),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/opamp.proto.ServerToAgent"},e}(),n.ServerToAgentFlags=function(){var e={},t=Object.create(e);return t[e[0]="ServerToAgentFlags_Unspecified"]=0,t[e[1]="ServerToAgentFlags_ReportFullState"]=1,t[e[2]="ServerToAgentFlags_ReportAvailableComponents"]=2,t}(),n.ServerCapabilities=function(){var e={},t=Object.create(e);return t[e[0]="ServerCapabilities_Unspecified"]=0,t[e[1]="ServerCapabilities_AcceptsStatus"]=1,t[e[2]="ServerCapabilities_OffersRemoteConfig"]=2,t[e[4]="ServerCapabilities_AcceptsEffectiveConfig"]=4,t[e[8]="ServerCapabilities_OffersPackages"]=8,t[e[16]="ServerCapabilities_AcceptsPackagesStatus"]=16,t[e[32]="ServerCapabilities_OffersConnectionSettings"]=32,t[e[64]="ServerCapabilities_AcceptsConnectionSettingsRequest"]=64,t}(),n.OpAMPConnectionSettings=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.destination_endpoint="",e.prototype.headers=null,e.prototype.certificate=null,e.prototype.heartbeat_interval_seconds=s.Long?s.Long.fromBits(0,0,!0):0,e.prototype.tls=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=a.create()),null!=e.destination_endpoint&&Object.hasOwnProperty.call(e,"destination_endpoint")&&t.uint32(10).string(e.destination_endpoint),null!=e.headers&&Object.hasOwnProperty.call(e,"headers")&&c.opamp.proto.Headers.encode(e.headers,t.uint32(18).fork()).ldelim(),null!=e.certificate&&Object.hasOwnProperty.call(e,"certificate")&&c.opamp.proto.TLSCertificate.encode(e.certificate,t.uint32(26).fork()).ldelim(),null!=e.heartbeat_interval_seconds&&Object.hasOwnProperty.call(e,"heartbeat_interval_seconds")&&t.uint32(32).uint64(e.heartbeat_interval_seconds),null!=e.tls&&Object.hasOwnProperty.call(e,"tls")&&c.opamp.proto.TLSConnectionSettings.encode(e.tls,t.uint32(42).fork()).ldelim(),t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t){e instanceof i||(e=i.create(e));for(var n=void 0===t?e.len:e.pos+t,r=new c.opamp.proto.OpAMPConnectionSettings;e.pos<n;){var o=e.uint32();switch(o>>>3){case 1:r.destination_endpoint=e.string();break;case 2:r.headers=c.opamp.proto.Headers.decode(e,e.uint32());break;case 3:r.certificate=c.opamp.proto.TLSCertificate.decode(e,e.uint32());break;case 4:r.heartbeat_interval_seconds=e.uint64();break;case 5:r.tls=c.opamp.proto.TLSConnectionSettings.decode(e,e.uint32());break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof i||(e=new i(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.destination_endpoint&&e.hasOwnProperty("destination_endpoint")&&!s.isString(e.destination_endpoint)?"destination_endpoint: string expected":null!=e.headers&&e.hasOwnProperty("headers")&&(t=c.opamp.proto.Headers.verify(e.headers))?"headers."+t:null!=e.certificate&&e.hasOwnProperty("certificate")&&(t=c.opamp.proto.TLSCertificate.verify(e.certificate))?"certificate."+t:null!=e.heartbeat_interval_seconds&&e.hasOwnProperty("heartbeat_interval_seconds")&&!(s.isInteger(e.heartbeat_interval_seconds)||e.heartbeat_interval_seconds&&s.isInteger(e.heartbeat_interval_seconds.low)&&s.isInteger(e.heartbeat_interval_seconds.high))?"heartbeat_interval_seconds: integer|Long expected":null!=e.tls&&e.hasOwnProperty("tls")&&(t=c.opamp.proto.TLSConnectionSettings.verify(e.tls))?"tls."+t:null;var t},e.fromObject=function(e){if(e instanceof c.opamp.proto.OpAMPConnectionSettings)return e;var t=new c.opamp.proto.OpAMPConnectionSettings;if(null!=e.destination_endpoint&&(t.destination_endpoint=String(e.destination_endpoint)),null!=e.headers){if("object"!=typeof e.headers)throw TypeError(".opamp.proto.OpAMPConnectionSettings.headers: object expected");t.headers=c.opamp.proto.Headers.fromObject(e.headers)}if(null!=e.certificate){if("object"!=typeof e.certificate)throw TypeError(".opamp.proto.OpAMPConnectionSettings.certificate: object expected");t.certificate=c.opamp.proto.TLSCertificate.fromObject(e.certificate)}if(null!=e.heartbeat_interval_seconds&&(s.Long?(t.heartbeat_interval_seconds=s.Long.fromValue(e.heartbeat_interval_seconds)).unsigned=!0:"string"==typeof e.heartbeat_interval_seconds?t.heartbeat_interval_seconds=parseInt(e.heartbeat_interval_seconds,10):"number"==typeof e.heartbeat_interval_seconds?t.heartbeat_interval_seconds=e.heartbeat_interval_seconds:"object"==typeof e.heartbeat_interval_seconds&&(t.heartbeat_interval_seconds=new s.LongBits(e.heartbeat_interval_seconds.low>>>0,e.heartbeat_interval_seconds.high>>>0).toNumber(!0))),null!=e.tls){if("object"!=typeof e.tls)throw TypeError(".opamp.proto.OpAMPConnectionSettings.tls: object expected");t.tls=c.opamp.proto.TLSConnectionSettings.fromObject(e.tls)}return t},e.toObject=function(e,t){t||(t={});var n={};if(t.defaults){if(n.destination_endpoint="",n.headers=null,n.certificate=null,s.Long){var r=new s.Long(0,0,!0);n.heartbeat_interval_seconds=t.longs===String?r.toString():t.longs===Number?r.toNumber():r}else n.heartbeat_interval_seconds=t.longs===String?"0":0;n.tls=null}return null!=e.destination_endpoint&&e.hasOwnProperty("destination_endpoint")&&(n.destination_endpoint=e.destination_endpoint),null!=e.headers&&e.hasOwnProperty("headers")&&(n.headers=c.opamp.proto.Headers.toObject(e.headers,t)),null!=e.certificate&&e.hasOwnProperty("certificate")&&(n.certificate=c.opamp.proto.TLSCertificate.toObject(e.certificate,t)),null!=e.heartbeat_interval_seconds&&e.hasOwnProperty("heartbeat_interval_seconds")&&("number"==typeof e.heartbeat_interval_seconds?n.heartbeat_interval_seconds=t.longs===String?String(e.heartbeat_interval_seconds):e.heartbeat_interval_seconds:n.heartbeat_interval_seconds=t.longs===String?s.Long.prototype.toString.call(e.heartbeat_interval_seconds):t.longs===Number?new s.LongBits(e.heartbeat_interval_seconds.low>>>0,e.heartbeat_interval_seconds.high>>>0).toNumber(!0):e.heartbeat_interval_seconds),null!=e.tls&&e.hasOwnProperty("tls")&&(n.tls=c.opamp.proto.TLSConnectionSettings.toObject(e.tls,t)),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/opamp.proto.OpAMPConnectionSettings"},e}(),n.TelemetryConnectionSettings=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.destination_endpoint="",e.prototype.headers=null,e.prototype.certificate=null,e.prototype.tls=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=a.create()),null!=e.destination_endpoint&&Object.hasOwnProperty.call(e,"destination_endpoint")&&t.uint32(10).string(e.destination_endpoint),null!=e.headers&&Object.hasOwnProperty.call(e,"headers")&&c.opamp.proto.Headers.encode(e.headers,t.uint32(18).fork()).ldelim(),null!=e.certificate&&Object.hasOwnProperty.call(e,"certificate")&&c.opamp.proto.TLSCertificate.encode(e.certificate,t.uint32(26).fork()).ldelim(),null!=e.tls&&Object.hasOwnProperty.call(e,"tls")&&c.opamp.proto.TLSConnectionSettings.encode(e.tls,t.uint32(34).fork()).ldelim(),t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t){e instanceof i||(e=i.create(e));for(var n=void 0===t?e.len:e.pos+t,r=new c.opamp.proto.TelemetryConnectionSettings;e.pos<n;){var o=e.uint32();switch(o>>>3){case 1:r.destination_endpoint=e.string();break;case 2:r.headers=c.opamp.proto.Headers.decode(e,e.uint32());break;case 3:r.certificate=c.opamp.proto.TLSCertificate.decode(e,e.uint32());break;case 4:r.tls=c.opamp.proto.TLSConnectionSettings.decode(e,e.uint32());break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof i||(e=new i(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.destination_endpoint&&e.hasOwnProperty("destination_endpoint")&&!s.isString(e.destination_endpoint)?"destination_endpoint: string expected":null!=e.headers&&e.hasOwnProperty("headers")&&(t=c.opamp.proto.Headers.verify(e.headers))?"headers."+t:null!=e.certificate&&e.hasOwnProperty("certificate")&&(t=c.opamp.proto.TLSCertificate.verify(e.certificate))?"certificate."+t:null!=e.tls&&e.hasOwnProperty("tls")&&(t=c.opamp.proto.TLSConnectionSettings.verify(e.tls))?"tls."+t:null;var t},e.fromObject=function(e){if(e instanceof c.opamp.proto.TelemetryConnectionSettings)return e;var t=new c.opamp.proto.TelemetryConnectionSettings;if(null!=e.destination_endpoint&&(t.destination_endpoint=String(e.destination_endpoint)),null!=e.headers){if("object"!=typeof e.headers)throw TypeError(".opamp.proto.TelemetryConnectionSettings.headers: object expected");t.headers=c.opamp.proto.Headers.fromObject(e.headers)}if(null!=e.certificate){if("object"!=typeof e.certificate)throw TypeError(".opamp.proto.TelemetryConnectionSettings.certificate: object expected");t.certificate=c.opamp.proto.TLSCertificate.fromObject(e.certificate)}if(null!=e.tls){if("object"!=typeof e.tls)throw TypeError(".opamp.proto.TelemetryConnectionSettings.tls: object expected");t.tls=c.opamp.proto.TLSConnectionSettings.fromObject(e.tls)}return t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.destination_endpoint="",n.headers=null,n.certificate=null,n.tls=null),null!=e.destination_endpoint&&e.hasOwnProperty("destination_endpoint")&&(n.destination_endpoint=e.destination_endpoint),null!=e.headers&&e.hasOwnProperty("headers")&&(n.headers=c.opamp.proto.Headers.toObject(e.headers,t)),null!=e.certificate&&e.hasOwnProperty("certificate")&&(n.certificate=c.opamp.proto.TLSCertificate.toObject(e.certificate,t)),null!=e.tls&&e.hasOwnProperty("tls")&&(n.tls=c.opamp.proto.TLSConnectionSettings.toObject(e.tls,t)),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/opamp.proto.TelemetryConnectionSettings"},e}(),n.OtherConnectionSettings=function(){function e(e){if(this.other_settings={},e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.destination_endpoint="",e.prototype.headers=null,e.prototype.certificate=null,e.prototype.other_settings=s.emptyObject,e.prototype.tls=null,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=a.create()),null!=e.destination_endpoint&&Object.hasOwnProperty.call(e,"destination_endpoint")&&t.uint32(10).string(e.destination_endpoint),null!=e.headers&&Object.hasOwnProperty.call(e,"headers")&&c.opamp.proto.Headers.encode(e.headers,t.uint32(18).fork()).ldelim(),null!=e.certificate&&Object.hasOwnProperty.call(e,"certificate")&&c.opamp.proto.TLSCertificate.encode(e.certificate,t.uint32(26).fork()).ldelim(),null!=e.other_settings&&Object.hasOwnProperty.call(e,"other_settings"))for(var n=Object.keys(e.other_settings),r=0;r<n.length;++r)t.uint32(34).fork().uint32(10).string(n[r]).uint32(18).string(e.other_settings[n[r]]).ldelim();return null!=e.tls&&Object.hasOwnProperty.call(e,"tls")&&c.opamp.proto.TLSConnectionSettings.encode(e.tls,t.uint32(42).fork()).ldelim(),t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t){e instanceof i||(e=i.create(e));for(var n,r,o=void 0===t?e.len:e.pos+t,a=new c.opamp.proto.OtherConnectionSettings;e.pos<o;){var u=e.uint32();switch(u>>>3){case 1:a.destination_endpoint=e.string();break;case 2:a.headers=c.opamp.proto.Headers.decode(e,e.uint32());break;case 3:a.certificate=c.opamp.proto.TLSCertificate.decode(e,e.uint32());break;case 4:a.other_settings===s.emptyObject&&(a.other_settings={});var l=e.uint32()+e.pos;for(n="",r="";e.pos<l;){var p=e.uint32();switch(p>>>3){case 1:n=e.string();break;case 2:r=e.string();break;default:e.skipType(7&p)}}a.other_settings[n]=r;break;case 5:a.tls=c.opamp.proto.TLSConnectionSettings.decode(e,e.uint32());break;default:e.skipType(7&u)}}return a},e.decodeDelimited=function(e){return e instanceof i||(e=new i(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.destination_endpoint&&e.hasOwnProperty("destination_endpoint")&&!s.isString(e.destination_endpoint))return"destination_endpoint: string expected";var t;if(null!=e.headers&&e.hasOwnProperty("headers")&&(t=c.opamp.proto.Headers.verify(e.headers)))return"headers."+t;if(null!=e.certificate&&e.hasOwnProperty("certificate")&&(t=c.opamp.proto.TLSCertificate.verify(e.certificate)))return"certificate."+t;if(null!=e.other_settings&&e.hasOwnProperty("other_settings")){if(!s.isObject(e.other_settings))return"other_settings: object expected";for(var n=Object.keys(e.other_settings),r=0;r<n.length;++r)if(!s.isString(e.other_settings[n[r]]))return"other_settings: string{k:string} expected"}return null!=e.tls&&e.hasOwnProperty("tls")&&(t=c.opamp.proto.TLSConnectionSettings.verify(e.tls))?"tls."+t:null},e.fromObject=function(e){if(e instanceof c.opamp.proto.OtherConnectionSettings)return e;var t=new c.opamp.proto.OtherConnectionSettings;if(null!=e.destination_endpoint&&(t.destination_endpoint=String(e.destination_endpoint)),null!=e.headers){if("object"!=typeof e.headers)throw TypeError(".opamp.proto.OtherConnectionSettings.headers: object expected");t.headers=c.opamp.proto.Headers.fromObject(e.headers)}if(null!=e.certificate){if("object"!=typeof e.certificate)throw TypeError(".opamp.proto.OtherConnectionSettings.certificate: object expected");t.certificate=c.opamp.proto.TLSCertificate.fromObject(e.certificate)}if(e.other_settings){if("object"!=typeof e.other_settings)throw TypeError(".opamp.proto.OtherConnectionSettings.other_settings: object expected");t.other_settings={};for(var n=Object.keys(e.other_settings),r=0;r<n.length;++r)t.other_settings[n[r]]=String(e.other_settings[n[r]])}if(null!=e.tls){if("object"!=typeof e.tls)throw TypeError(".opamp.proto.OtherConnectionSettings.tls: object expected");t.tls=c.opamp.proto.TLSConnectionSettings.fromObject(e.tls)}return t},e.toObject=function(e,t){t||(t={});var n,r={};if((t.objects||t.defaults)&&(r.other_settings={}),t.defaults&&(r.destination_endpoint="",r.headers=null,r.certificate=null,r.tls=null),null!=e.destination_endpoint&&e.hasOwnProperty("destination_endpoint")&&(r.destination_endpoint=e.destination_endpoint),null!=e.headers&&e.hasOwnProperty("headers")&&(r.headers=c.opamp.proto.Headers.toObject(e.headers,t)),null!=e.certificate&&e.hasOwnProperty("certificate")&&(r.certificate=c.opamp.proto.TLSCertificate.toObject(e.certificate,t)),e.other_settings&&(n=Object.keys(e.other_settings)).length){r.other_settings={};for(var o=0;o<n.length;++o)r.other_settings[n[o]]=e.other_settings[n[o]]}return null!=e.tls&&e.hasOwnProperty("tls")&&(r.tls=c.opamp.proto.TLSConnectionSettings.toObject(e.tls,t)),r},e.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/opamp.proto.OtherConnectionSettings"},e}(),n.TLSConnectionSettings=function(){function e(e){if(this.cipher_suites=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.ca_pem_contents="",e.prototype.include_system_ca_certs_pool=!1,e.prototype.insecure_skip_verify=!1,e.prototype.min_version="",e.prototype.max_version="",e.prototype.cipher_suites=s.emptyArray,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=a.create()),null!=e.ca_pem_contents&&Object.hasOwnProperty.call(e,"ca_pem_contents")&&t.uint32(10).string(e.ca_pem_contents),null!=e.include_system_ca_certs_pool&&Object.hasOwnProperty.call(e,"include_system_ca_certs_pool")&&t.uint32(16).bool(e.include_system_ca_certs_pool),null!=e.insecure_skip_verify&&Object.hasOwnProperty.call(e,"insecure_skip_verify")&&t.uint32(24).bool(e.insecure_skip_verify),null!=e.min_version&&Object.hasOwnProperty.call(e,"min_version")&&t.uint32(34).string(e.min_version),null!=e.max_version&&Object.hasOwnProperty.call(e,"max_version")&&t.uint32(42).string(e.max_version),null!=e.cipher_suites&&e.cipher_suites.length)for(var n=0;n<e.cipher_suites.length;++n)t.uint32(50).string(e.cipher_suites[n]);return t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t){e instanceof i||(e=i.create(e));for(var n=void 0===t?e.len:e.pos+t,r=new c.opamp.proto.TLSConnectionSettings;e.pos<n;){var o=e.uint32();switch(o>>>3){case 1:r.ca_pem_contents=e.string();break;case 2:r.include_system_ca_certs_pool=e.bool();break;case 3:r.insecure_skip_verify=e.bool();break;case 4:r.min_version=e.string();break;case 5:r.max_version=e.string();break;case 6:r.cipher_suites&&r.cipher_suites.length||(r.cipher_suites=[]),r.cipher_suites.push(e.string());break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof i||(e=new i(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.ca_pem_contents&&e.hasOwnProperty("ca_pem_contents")&&!s.isString(e.ca_pem_contents))return"ca_pem_contents: string expected";if(null!=e.include_system_ca_certs_pool&&e.hasOwnProperty("include_system_ca_certs_pool")&&"boolean"!=typeof e.include_system_ca_certs_pool)return"include_system_ca_certs_pool: boolean expected";if(null!=e.insecure_skip_verify&&e.hasOwnProperty("insecure_skip_verify")&&"boolean"!=typeof e.insecure_skip_verify)return"insecure_skip_verify: boolean expected";if(null!=e.min_version&&e.hasOwnProperty("min_version")&&!s.isString(e.min_version))return"min_version: string expected";if(null!=e.max_version&&e.hasOwnProperty("max_version")&&!s.isString(e.max_version))return"max_version: string expected";if(null!=e.cipher_suites&&e.hasOwnProperty("cipher_suites")){if(!Array.isArray(e.cipher_suites))return"cipher_suites: array expected";for(var t=0;t<e.cipher_suites.length;++t)if(!s.isString(e.cipher_suites[t]))return"cipher_suites: string[] expected"}return null},e.fromObject=function(e){if(e instanceof c.opamp.proto.TLSConnectionSettings)return e;var t=new c.opamp.proto.TLSConnectionSettings;if(null!=e.ca_pem_contents&&(t.ca_pem_contents=String(e.ca_pem_contents)),null!=e.include_system_ca_certs_pool&&(t.include_system_ca_certs_pool=Boolean(e.include_system_ca_certs_pool)),null!=e.insecure_skip_verify&&(t.insecure_skip_verify=Boolean(e.insecure_skip_verify)),null!=e.min_version&&(t.min_version=String(e.min_version)),null!=e.max_version&&(t.max_version=String(e.max_version)),e.cipher_suites){if(!Array.isArray(e.cipher_suites))throw TypeError(".opamp.proto.TLSConnectionSettings.cipher_suites: array expected");t.cipher_suites=[];for(var n=0;n<e.cipher_suites.length;++n)t.cipher_suites[n]=String(e.cipher_suites[n])}return t},e.toObject=function(e,t){t||(t={});var n={};if((t.arrays||t.defaults)&&(n.cipher_suites=[]),t.defaults&&(n.ca_pem_contents="",n.include_system_ca_certs_pool=!1,n.insecure_skip_verify=!1,n.min_version="",n.max_version=""),null!=e.ca_pem_contents&&e.hasOwnProperty("ca_pem_contents")&&(n.ca_pem_contents=e.ca_pem_contents),null!=e.include_system_ca_certs_pool&&e.hasOwnProperty("include_system_ca_certs_pool")&&(n.include_system_ca_certs_pool=e.include_system_ca_certs_pool),null!=e.insecure_skip_verify&&e.hasOwnProperty("insecure_skip_verify")&&(n.insecure_skip_verify=e.insecure_skip_verify),null!=e.min_version&&e.hasOwnProperty("min_version")&&(n.min_version=e.min_version),null!=e.max_version&&e.hasOwnProperty("max_version")&&(n.max_version=e.max_version),e.cipher_suites&&e.cipher_suites.length){n.cipher_suites=[];for(var r=0;r<e.cipher_suites.length;++r)n.cipher_suites[r]=e.cipher_suites[r]}return n},e.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/opamp.proto.TLSConnectionSettings"},e}(),n.Headers=function(){function e(e){if(this.headers=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.headers=s.emptyArray,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=a.create()),null!=e.headers&&e.headers.length)for(var n=0;n<e.headers.length;++n)c.opamp.proto.Header.encode(e.headers[n],t.uint32(10).fork()).ldelim();return t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t){e instanceof i||(e=i.create(e));for(var n=void 0===t?e.len:e.pos+t,r=new c.opamp.proto.Headers;e.pos<n;){var o=e.uint32();o>>>3==1?(r.headers&&r.headers.length||(r.headers=[]),r.headers.push(c.opamp.proto.Header.decode(e,e.uint32()))):e.skipType(7&o)}return r},e.decodeDelimited=function(e){return e instanceof i||(e=new i(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.headers&&e.hasOwnProperty("headers")){if(!Array.isArray(e.headers))return"headers: array expected";for(var t=0;t<e.headers.length;++t){var n=c.opamp.proto.Header.verify(e.headers[t]);if(n)return"headers."+n}}return null},e.fromObject=function(e){if(e instanceof c.opamp.proto.Headers)return e;var t=new c.opamp.proto.Headers;if(e.headers){if(!Array.isArray(e.headers))throw TypeError(".opamp.proto.Headers.headers: array expected");t.headers=[];for(var n=0;n<e.headers.length;++n){if("object"!=typeof e.headers[n])throw TypeError(".opamp.proto.Headers.headers: object expected");t.headers[n]=c.opamp.proto.Header.fromObject(e.headers[n])}}return t},e.toObject=function(e,t){t||(t={});var n={};if((t.arrays||t.defaults)&&(n.headers=[]),e.headers&&e.headers.length){n.headers=[];for(var r=0;r<e.headers.length;++r)n.headers[r]=c.opamp.proto.Header.toObject(e.headers[r],t)}return n},e.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/opamp.proto.Headers"},e}(),n.Header=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.key="",e.prototype.value="",e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=a.create()),null!=e.key&&Object.hasOwnProperty.call(e,"key")&&t.uint32(10).string(e.key),null!=e.value&&Object.hasOwnProperty.call(e,"value")&&t.uint32(18).string(e.value),t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t){e instanceof i||(e=i.create(e));for(var n=void 0===t?e.len:e.pos+t,r=new c.opamp.proto.Header;e.pos<n;){var o=e.uint32();switch(o>>>3){case 1:r.key=e.string();break;case 2:r.value=e.string();break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof i||(e=new i(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.key&&e.hasOwnProperty("key")&&!s.isString(e.key)?"key: string expected":null!=e.value&&e.hasOwnProperty("value")&&!s.isString(e.value)?"value: string expected":null},e.fromObject=function(e){if(e instanceof c.opamp.proto.Header)return e;var t=new c.opamp.proto.Header;return null!=e.key&&(t.key=String(e.key)),null!=e.value&&(t.value=String(e.value)),t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.key="",n.value=""),null!=e.key&&e.hasOwnProperty("key")&&(n.key=e.key),null!=e.value&&e.hasOwnProperty("value")&&(n.value=e.value),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/opamp.proto.Header"},e}(),n.TLSCertificate=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.cert=s.newBuffer([]),e.prototype.private_key=s.newBuffer([]),e.prototype.ca_cert=s.newBuffer([]),e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=a.create()),null!=e.cert&&Object.hasOwnProperty.call(e,"cert")&&t.uint32(10).bytes(e.cert),null!=e.private_key&&Object.hasOwnProperty.call(e,"private_key")&&t.uint32(18).bytes(e.private_key),null!=e.ca_cert&&Object.hasOwnProperty.call(e,"ca_cert")&&t.uint32(26).bytes(e.ca_cert),t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t){e instanceof i||(e=i.create(e));for(var n=void 0===t?e.len:e.pos+t,r=new c.opamp.proto.TLSCertificate;e.pos<n;){var o=e.uint32();switch(o>>>3){case 1:r.cert=e.bytes();break;case 2:r.private_key=e.bytes();break;case 3:r.ca_cert=e.bytes();break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof i||(e=new i(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.cert&&e.hasOwnProperty("cert")&&!(e.cert&&"number"==typeof e.cert.length||s.isString(e.cert))?"cert: buffer expected":null!=e.private_key&&e.hasOwnProperty("private_key")&&!(e.private_key&&"number"==typeof e.private_key.length||s.isString(e.private_key))?"private_key: buffer expected":null!=e.ca_cert&&e.hasOwnProperty("ca_cert")&&!(e.ca_cert&&"number"==typeof e.ca_cert.length||s.isString(e.ca_cert))?"ca_cert: buffer expected":null},e.fromObject=function(e){if(e instanceof c.opamp.proto.TLSCertificate)return e;var t=new c.opamp.proto.TLSCertificate;return null!=e.cert&&("string"==typeof e.cert?s.base64.decode(e.cert,t.cert=s.newBuffer(s.base64.length(e.cert)),0):e.cert.length&&(t.cert=e.cert)),null!=e.private_key&&("string"==typeof e.private_key?s.base64.decode(e.private_key,t.private_key=s.newBuffer(s.base64.length(e.private_key)),0):e.private_key.length&&(t.private_key=e.private_key)),null!=e.ca_cert&&("string"==typeof e.ca_cert?s.base64.decode(e.ca_cert,t.ca_cert=s.newBuffer(s.base64.length(e.ca_cert)),0):e.ca_cert.length&&(t.ca_cert=e.ca_cert)),t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(t.bytes===String?n.cert="":(n.cert=[],t.bytes!==Array&&(n.cert=s.newBuffer(n.cert))),t.bytes===String?n.private_key="":(n.private_key=[],t.bytes!==Array&&(n.private_key=s.newBuffer(n.private_key))),t.bytes===String?n.ca_cert="":(n.ca_cert=[],t.bytes!==Array&&(n.ca_cert=s.newBuffer(n.ca_cert)))),null!=e.cert&&e.hasOwnProperty("cert")&&(n.cert=t.bytes===String?s.base64.encode(e.cert,0,e.cert.length):t.bytes===Array?Array.prototype.slice.call(e.cert):e.cert),null!=e.private_key&&e.hasOwnProperty("private_key")&&(n.private_key=t.bytes===String?s.base64.encode(e.private_key,0,e.private_key.length):t.bytes===Array?Array.prototype.slice.call(e.private_key):e.private_key),null!=e.ca_cert&&e.hasOwnProperty("ca_cert")&&(n.ca_cert=t.bytes===String?s.base64.encode(e.ca_cert,0,e.ca_cert.length):t.bytes===Array?Array.prototype.slice.call(e.ca_cert):e.ca_cert),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/opamp.proto.TLSCertificate"},e}(),n.ConnectionSettingsOffers=function(){function e(e){if(this.other_connections={},e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.hash=s.newBuffer([]),e.prototype.opamp=null,e.prototype.own_metrics=null,e.prototype.own_traces=null,e.prototype.own_logs=null,e.prototype.other_connections=s.emptyObject,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=a.create()),null!=e.hash&&Object.hasOwnProperty.call(e,"hash")&&t.uint32(10).bytes(e.hash),null!=e.opamp&&Object.hasOwnProperty.call(e,"opamp")&&c.opamp.proto.OpAMPConnectionSettings.encode(e.opamp,t.uint32(18).fork()).ldelim(),null!=e.own_metrics&&Object.hasOwnProperty.call(e,"own_metrics")&&c.opamp.proto.TelemetryConnectionSettings.encode(e.own_metrics,t.uint32(26).fork()).ldelim(),null!=e.own_traces&&Object.hasOwnProperty.call(e,"own_traces")&&c.opamp.proto.TelemetryConnectionSettings.encode(e.own_traces,t.uint32(34).fork()).ldelim(),null!=e.own_logs&&Object.hasOwnProperty.call(e,"own_logs")&&c.opamp.proto.TelemetryConnectionSettings.encode(e.own_logs,t.uint32(42).fork()).ldelim(),null!=e.other_connections&&Object.hasOwnProperty.call(e,"other_connections"))for(var n=Object.keys(e.other_connections),r=0;r<n.length;++r)t.uint32(50).fork().uint32(10).string(n[r]),c.opamp.proto.OtherConnectionSettings.encode(e.other_connections[n[r]],t.uint32(18).fork()).ldelim().ldelim();return t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t){e instanceof i||(e=i.create(e));for(var n,r,o=void 0===t?e.len:e.pos+t,a=new c.opamp.proto.ConnectionSettingsOffers;e.pos<o;){var u=e.uint32();switch(u>>>3){case 1:a.hash=e.bytes();break;case 2:a.opamp=c.opamp.proto.OpAMPConnectionSettings.decode(e,e.uint32());break;case 3:a.own_metrics=c.opamp.proto.TelemetryConnectionSettings.decode(e,e.uint32());break;case 4:a.own_traces=c.opamp.proto.TelemetryConnectionSettings.decode(e,e.uint32());break;case 5:a.own_logs=c.opamp.proto.TelemetryConnectionSettings.decode(e,e.uint32());break;case 6:a.other_connections===s.emptyObject&&(a.other_connections={});var l=e.uint32()+e.pos;for(n="",r=null;e.pos<l;){var p=e.uint32();switch(p>>>3){case 1:n=e.string();break;case 2:r=c.opamp.proto.OtherConnectionSettings.decode(e,e.uint32());break;default:e.skipType(7&p)}}a.other_connections[n]=r;break;default:e.skipType(7&u)}}return a},e.decodeDelimited=function(e){return e instanceof i||(e=new i(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.hash&&e.hasOwnProperty("hash")&&!(e.hash&&"number"==typeof e.hash.length||s.isString(e.hash)))return"hash: buffer expected";if(null!=e.opamp&&e.hasOwnProperty("opamp")&&(r=c.opamp.proto.OpAMPConnectionSettings.verify(e.opamp)))return"opamp."+r;if(null!=e.own_metrics&&e.hasOwnProperty("own_metrics")&&(r=c.opamp.proto.TelemetryConnectionSettings.verify(e.own_metrics)))return"own_metrics."+r;if(null!=e.own_traces&&e.hasOwnProperty("own_traces")&&(r=c.opamp.proto.TelemetryConnectionSettings.verify(e.own_traces)))return"own_traces."+r;if(null!=e.own_logs&&e.hasOwnProperty("own_logs")&&(r=c.opamp.proto.TelemetryConnectionSettings.verify(e.own_logs)))return"own_logs."+r;if(null!=e.other_connections&&e.hasOwnProperty("other_connections")){if(!s.isObject(e.other_connections))return"other_connections: object expected";for(var t=Object.keys(e.other_connections),n=0;n<t.length;++n){var r;if(r=c.opamp.proto.OtherConnectionSettings.verify(e.other_connections[t[n]]))return"other_connections."+r}}return null},e.fromObject=function(e){if(e instanceof c.opamp.proto.ConnectionSettingsOffers)return e;var t=new c.opamp.proto.ConnectionSettingsOffers;if(null!=e.hash&&("string"==typeof e.hash?s.base64.decode(e.hash,t.hash=s.newBuffer(s.base64.length(e.hash)),0):e.hash.length&&(t.hash=e.hash)),null!=e.opamp){if("object"!=typeof e.opamp)throw TypeError(".opamp.proto.ConnectionSettingsOffers.opamp: object expected");t.opamp=c.opamp.proto.OpAMPConnectionSettings.fromObject(e.opamp)}if(null!=e.own_metrics){if("object"!=typeof e.own_metrics)throw TypeError(".opamp.proto.ConnectionSettingsOffers.own_metrics: object expected");t.own_metrics=c.opamp.proto.TelemetryConnectionSettings.fromObject(e.own_metrics)}if(null!=e.own_traces){if("object"!=typeof e.own_traces)throw TypeError(".opamp.proto.ConnectionSettingsOffers.own_traces: object expected");t.own_traces=c.opamp.proto.TelemetryConnectionSettings.fromObject(e.own_traces)}if(null!=e.own_logs){if("object"!=typeof e.own_logs)throw TypeError(".opamp.proto.ConnectionSettingsOffers.own_logs: object expected");t.own_logs=c.opamp.proto.TelemetryConnectionSettings.fromObject(e.own_logs)}if(e.other_connections){if("object"!=typeof e.other_connections)throw TypeError(".opamp.proto.ConnectionSettingsOffers.other_connections: object expected");t.other_connections={};for(var n=Object.keys(e.other_connections),r=0;r<n.length;++r){if("object"!=typeof e.other_connections[n[r]])throw TypeError(".opamp.proto.ConnectionSettingsOffers.other_connections: object expected");t.other_connections[n[r]]=c.opamp.proto.OtherConnectionSettings.fromObject(e.other_connections[n[r]])}}return t},e.toObject=function(e,t){t||(t={});var n,r={};if((t.objects||t.defaults)&&(r.other_connections={}),t.defaults&&(t.bytes===String?r.hash="":(r.hash=[],t.bytes!==Array&&(r.hash=s.newBuffer(r.hash))),r.opamp=null,r.own_metrics=null,r.own_traces=null,r.own_logs=null),null!=e.hash&&e.hasOwnProperty("hash")&&(r.hash=t.bytes===String?s.base64.encode(e.hash,0,e.hash.length):t.bytes===Array?Array.prototype.slice.call(e.hash):e.hash),null!=e.opamp&&e.hasOwnProperty("opamp")&&(r.opamp=c.opamp.proto.OpAMPConnectionSettings.toObject(e.opamp,t)),null!=e.own_metrics&&e.hasOwnProperty("own_metrics")&&(r.own_metrics=c.opamp.proto.TelemetryConnectionSettings.toObject(e.own_metrics,t)),null!=e.own_traces&&e.hasOwnProperty("own_traces")&&(r.own_traces=c.opamp.proto.TelemetryConnectionSettings.toObject(e.own_traces,t)),null!=e.own_logs&&e.hasOwnProperty("own_logs")&&(r.own_logs=c.opamp.proto.TelemetryConnectionSettings.toObject(e.own_logs,t)),e.other_connections&&(n=Object.keys(e.other_connections)).length){r.other_connections={};for(var o=0;o<n.length;++o)r.other_connections[n[o]]=c.opamp.proto.OtherConnectionSettings.toObject(e.other_connections[n[o]],t)}return r},e.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/opamp.proto.ConnectionSettingsOffers"},e}(),n.PackagesAvailable=function(){function e(e){if(this.packages={},e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.packages=s.emptyObject,e.prototype.all_packages_hash=s.newBuffer([]),e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=a.create()),null!=e.packages&&Object.hasOwnProperty.call(e,"packages"))for(var n=Object.keys(e.packages),r=0;r<n.length;++r)t.uint32(10).fork().uint32(10).string(n[r]),c.opamp.proto.PackageAvailable.encode(e.packages[n[r]],t.uint32(18).fork()).ldelim().ldelim();return null!=e.all_packages_hash&&Object.hasOwnProperty.call(e,"all_packages_hash")&&t.uint32(18).bytes(e.all_packages_hash),t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t){e instanceof i||(e=i.create(e));for(var n,r,o=void 0===t?e.len:e.pos+t,a=new c.opamp.proto.PackagesAvailable;e.pos<o;){var u=e.uint32();switch(u>>>3){case 1:a.packages===s.emptyObject&&(a.packages={});var l=e.uint32()+e.pos;for(n="",r=null;e.pos<l;){var p=e.uint32();switch(p>>>3){case 1:n=e.string();break;case 2:r=c.opamp.proto.PackageAvailable.decode(e,e.uint32());break;default:e.skipType(7&p)}}a.packages[n]=r;break;case 2:a.all_packages_hash=e.bytes();break;default:e.skipType(7&u)}}return a},e.decodeDelimited=function(e){return e instanceof i||(e=new i(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.packages&&e.hasOwnProperty("packages")){if(!s.isObject(e.packages))return"packages: object expected";for(var t=Object.keys(e.packages),n=0;n<t.length;++n){var r=c.opamp.proto.PackageAvailable.verify(e.packages[t[n]]);if(r)return"packages."+r}}return null!=e.all_packages_hash&&e.hasOwnProperty("all_packages_hash")&&!(e.all_packages_hash&&"number"==typeof e.all_packages_hash.length||s.isString(e.all_packages_hash))?"all_packages_hash: buffer expected":null},e.fromObject=function(e){if(e instanceof c.opamp.proto.PackagesAvailable)return e;var t=new c.opamp.proto.PackagesAvailable;if(e.packages){if("object"!=typeof e.packages)throw TypeError(".opamp.proto.PackagesAvailable.packages: object expected");t.packages={};for(var n=Object.keys(e.packages),r=0;r<n.length;++r){if("object"!=typeof e.packages[n[r]])throw TypeError(".opamp.proto.PackagesAvailable.packages: object expected");t.packages[n[r]]=c.opamp.proto.PackageAvailable.fromObject(e.packages[n[r]])}}return null!=e.all_packages_hash&&("string"==typeof e.all_packages_hash?s.base64.decode(e.all_packages_hash,t.all_packages_hash=s.newBuffer(s.base64.length(e.all_packages_hash)),0):e.all_packages_hash.length&&(t.all_packages_hash=e.all_packages_hash)),t},e.toObject=function(e,t){t||(t={});var n,r={};if((t.objects||t.defaults)&&(r.packages={}),t.defaults&&(t.bytes===String?r.all_packages_hash="":(r.all_packages_hash=[],t.bytes!==Array&&(r.all_packages_hash=s.newBuffer(r.all_packages_hash)))),e.packages&&(n=Object.keys(e.packages)).length){r.packages={};for(var o=0;o<n.length;++o)r.packages[n[o]]=c.opamp.proto.PackageAvailable.toObject(e.packages[n[o]],t)}return null!=e.all_packages_hash&&e.hasOwnProperty("all_packages_hash")&&(r.all_packages_hash=t.bytes===String?s.base64.encode(e.all_packages_hash,0,e.all_packages_hash.length):t.bytes===Array?Array.prototype.slice.call(e.all_packages_hash):e.all_packages_hash),r},e.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/opamp.proto.PackagesAvailable"},e}(),n.PackageAvailable=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.type=0,e.prototype.version="",e.prototype.file=null,e.prototype.hash=s.newBuffer([]),e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=a.create()),null!=e.type&&Object.hasOwnProperty.call(e,"type")&&t.uint32(8).int32(e.type),null!=e.version&&Object.hasOwnProperty.call(e,"version")&&t.uint32(18).string(e.version),null!=e.file&&Object.hasOwnProperty.call(e,"file")&&c.opamp.proto.DownloadableFile.encode(e.file,t.uint32(26).fork()).ldelim(),null!=e.hash&&Object.hasOwnProperty.call(e,"hash")&&t.uint32(34).bytes(e.hash),t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t){e instanceof i||(e=i.create(e));for(var n=void 0===t?e.len:e.pos+t,r=new c.opamp.proto.PackageAvailable;e.pos<n;){var o=e.uint32();switch(o>>>3){case 1:r.type=e.int32();break;case 2:r.version=e.string();break;case 3:r.file=c.opamp.proto.DownloadableFile.decode(e,e.uint32());break;case 4:r.hash=e.bytes();break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof i||(e=new i(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.type&&e.hasOwnProperty("type"))switch(e.type){default:return"type: enum value expected";case 0:case 1:}if(null!=e.version&&e.hasOwnProperty("version")&&!s.isString(e.version))return"version: string expected";if(null!=e.file&&e.hasOwnProperty("file")){var t=c.opamp.proto.DownloadableFile.verify(e.file);if(t)return"file."+t}return null!=e.hash&&e.hasOwnProperty("hash")&&!(e.hash&&"number"==typeof e.hash.length||s.isString(e.hash))?"hash: buffer expected":null},e.fromObject=function(e){if(e instanceof c.opamp.proto.PackageAvailable)return e;var t=new c.opamp.proto.PackageAvailable;switch(e.type){case"PackageType_TopLevel":case 0:t.type=0;break;case"PackageType_Addon":case 1:t.type=1}if(null!=e.version&&(t.version=String(e.version)),null!=e.file){if("object"!=typeof e.file)throw TypeError(".opamp.proto.PackageAvailable.file: object expected");t.file=c.opamp.proto.DownloadableFile.fromObject(e.file)}return null!=e.hash&&("string"==typeof e.hash?s.base64.decode(e.hash,t.hash=s.newBuffer(s.base64.length(e.hash)),0):e.hash.length&&(t.hash=e.hash)),t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.type=t.enums===String?"PackageType_TopLevel":0,n.version="",n.file=null,t.bytes===String?n.hash="":(n.hash=[],t.bytes!==Array&&(n.hash=s.newBuffer(n.hash)))),null!=e.type&&e.hasOwnProperty("type")&&(n.type=t.enums===String?c.opamp.proto.PackageType[e.type]:e.type),null!=e.version&&e.hasOwnProperty("version")&&(n.version=e.version),null!=e.file&&e.hasOwnProperty("file")&&(n.file=c.opamp.proto.DownloadableFile.toObject(e.file,t)),null!=e.hash&&e.hasOwnProperty("hash")&&(n.hash=t.bytes===String?s.base64.encode(e.hash,0,e.hash.length):t.bytes===Array?Array.prototype.slice.call(e.hash):e.hash),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/opamp.proto.PackageAvailable"},e}(),n.PackageType=function(){var e={},t=Object.create(e);return t[e[0]="PackageType_TopLevel"]=0,t[e[1]="PackageType_Addon"]=1,t}(),n.DownloadableFile=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.download_url="",e.prototype.content_hash=s.newBuffer([]),e.prototype.signature=s.newBuffer([]),e.prototype.headers=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=a.create()),null!=e.download_url&&Object.hasOwnProperty.call(e,"download_url")&&t.uint32(10).string(e.download_url),null!=e.content_hash&&Object.hasOwnProperty.call(e,"content_hash")&&t.uint32(18).bytes(e.content_hash),null!=e.signature&&Object.hasOwnProperty.call(e,"signature")&&t.uint32(26).bytes(e.signature),null!=e.headers&&Object.hasOwnProperty.call(e,"headers")&&c.opamp.proto.Headers.encode(e.headers,t.uint32(34).fork()).ldelim(),t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t){e instanceof i||(e=i.create(e));for(var n=void 0===t?e.len:e.pos+t,r=new c.opamp.proto.DownloadableFile;e.pos<n;){var o=e.uint32();switch(o>>>3){case 1:r.download_url=e.string();break;case 2:r.content_hash=e.bytes();break;case 3:r.signature=e.bytes();break;case 4:r.headers=c.opamp.proto.Headers.decode(e,e.uint32());break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof i||(e=new i(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.download_url&&e.hasOwnProperty("download_url")&&!s.isString(e.download_url))return"download_url: string expected";if(null!=e.content_hash&&e.hasOwnProperty("content_hash")&&!(e.content_hash&&"number"==typeof e.content_hash.length||s.isString(e.content_hash)))return"content_hash: buffer expected";if(null!=e.signature&&e.hasOwnProperty("signature")&&!(e.signature&&"number"==typeof e.signature.length||s.isString(e.signature)))return"signature: buffer expected";if(null!=e.headers&&e.hasOwnProperty("headers")){var t=c.opamp.proto.Headers.verify(e.headers);if(t)return"headers."+t}return null},e.fromObject=function(e){if(e instanceof c.opamp.proto.DownloadableFile)return e;var t=new c.opamp.proto.DownloadableFile;if(null!=e.download_url&&(t.download_url=String(e.download_url)),null!=e.content_hash&&("string"==typeof e.content_hash?s.base64.decode(e.content_hash,t.content_hash=s.newBuffer(s.base64.length(e.content_hash)),0):e.content_hash.length&&(t.content_hash=e.content_hash)),null!=e.signature&&("string"==typeof e.signature?s.base64.decode(e.signature,t.signature=s.newBuffer(s.base64.length(e.signature)),0):e.signature.length&&(t.signature=e.signature)),null!=e.headers){if("object"!=typeof e.headers)throw TypeError(".opamp.proto.DownloadableFile.headers: object expected");t.headers=c.opamp.proto.Headers.fromObject(e.headers)}return t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.download_url="",t.bytes===String?n.content_hash="":(n.content_hash=[],t.bytes!==Array&&(n.content_hash=s.newBuffer(n.content_hash))),t.bytes===String?n.signature="":(n.signature=[],t.bytes!==Array&&(n.signature=s.newBuffer(n.signature))),n.headers=null),null!=e.download_url&&e.hasOwnProperty("download_url")&&(n.download_url=e.download_url),null!=e.content_hash&&e.hasOwnProperty("content_hash")&&(n.content_hash=t.bytes===String?s.base64.encode(e.content_hash,0,e.content_hash.length):t.bytes===Array?Array.prototype.slice.call(e.content_hash):e.content_hash),null!=e.signature&&e.hasOwnProperty("signature")&&(n.signature=t.bytes===String?s.base64.encode(e.signature,0,e.signature.length):t.bytes===Array?Array.prototype.slice.call(e.signature):e.signature),null!=e.headers&&e.hasOwnProperty("headers")&&(n.headers=c.opamp.proto.Headers.toObject(e.headers,t)),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/opamp.proto.DownloadableFile"},e}(),n.ServerErrorResponse=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}var t;return e.prototype.type=0,e.prototype.error_message="",e.prototype.retry_info=null,Object.defineProperty(e.prototype,"Details",{get:s.oneOfGetter(t=["retry_info"]),set:s.oneOfSetter(t)}),e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=a.create()),null!=e.type&&Object.hasOwnProperty.call(e,"type")&&t.uint32(8).int32(e.type),null!=e.error_message&&Object.hasOwnProperty.call(e,"error_message")&&t.uint32(18).string(e.error_message),null!=e.retry_info&&Object.hasOwnProperty.call(e,"retry_info")&&c.opamp.proto.RetryInfo.encode(e.retry_info,t.uint32(26).fork()).ldelim(),t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t){e instanceof i||(e=i.create(e));for(var n=void 0===t?e.len:e.pos+t,r=new c.opamp.proto.ServerErrorResponse;e.pos<n;){var o=e.uint32();switch(o>>>3){case 1:r.type=e.int32();break;case 2:r.error_message=e.string();break;case 3:r.retry_info=c.opamp.proto.RetryInfo.decode(e,e.uint32());break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof i||(e=new i(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.type&&e.hasOwnProperty("type"))switch(e.type){default:return"type: enum value expected";case 0:case 1:case 2:}if(null!=e.error_message&&e.hasOwnProperty("error_message")&&!s.isString(e.error_message))return"error_message: string expected";if(null!=e.retry_info&&e.hasOwnProperty("retry_info")){var t=c.opamp.proto.RetryInfo.verify(e.retry_info);if(t)return"retry_info."+t}return null},e.fromObject=function(e){if(e instanceof c.opamp.proto.ServerErrorResponse)return e;var t=new c.opamp.proto.ServerErrorResponse;switch(e.type){case"ServerErrorResponseType_Unknown":case 0:t.type=0;break;case"ServerErrorResponseType_BadRequest":case 1:t.type=1;break;case"ServerErrorResponseType_Unavailable":case 2:t.type=2}if(null!=e.error_message&&(t.error_message=String(e.error_message)),null!=e.retry_info){if("object"!=typeof e.retry_info)throw TypeError(".opamp.proto.ServerErrorResponse.retry_info: object expected");t.retry_info=c.opamp.proto.RetryInfo.fromObject(e.retry_info)}return t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.type=t.enums===String?"ServerErrorResponseType_Unknown":0,n.error_message=""),null!=e.type&&e.hasOwnProperty("type")&&(n.type=t.enums===String?c.opamp.proto.ServerErrorResponseType[e.type]:e.type),null!=e.error_message&&e.hasOwnProperty("error_message")&&(n.error_message=e.error_message),null!=e.retry_info&&e.hasOwnProperty("retry_info")&&(n.retry_info=c.opamp.proto.RetryInfo.toObject(e.retry_info,t),t.oneofs&&(n.Details="retry_info")),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/opamp.proto.ServerErrorResponse"},e}(),n.ServerErrorResponseType=function(){var e={},t=Object.create(e);return t[e[0]="ServerErrorResponseType_Unknown"]=0,t[e[1]="ServerErrorResponseType_BadRequest"]=1,t[e[2]="ServerErrorResponseType_Unavailable"]=2,t}(),n.RetryInfo=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.retry_after_nanoseconds=s.Long?s.Long.fromBits(0,0,!0):0,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=a.create()),null!=e.retry_after_nanoseconds&&Object.hasOwnProperty.call(e,"retry_after_nanoseconds")&&t.uint32(8).uint64(e.retry_after_nanoseconds),t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t){e instanceof i||(e=i.create(e));for(var n=void 0===t?e.len:e.pos+t,r=new c.opamp.proto.RetryInfo;e.pos<n;){var o=e.uint32();o>>>3==1?r.retry_after_nanoseconds=e.uint64():e.skipType(7&o)}return r},e.decodeDelimited=function(e){return e instanceof i||(e=new i(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.retry_after_nanoseconds&&e.hasOwnProperty("retry_after_nanoseconds")&&!(s.isInteger(e.retry_after_nanoseconds)||e.retry_after_nanoseconds&&s.isInteger(e.retry_after_nanoseconds.low)&&s.isInteger(e.retry_after_nanoseconds.high))?"retry_after_nanoseconds: integer|Long expected":null},e.fromObject=function(e){if(e instanceof c.opamp.proto.RetryInfo)return e;var t=new c.opamp.proto.RetryInfo;return null!=e.retry_after_nanoseconds&&(s.Long?(t.retry_after_nanoseconds=s.Long.fromValue(e.retry_after_nanoseconds)).unsigned=!0:"string"==typeof e.retry_after_nanoseconds?t.retry_after_nanoseconds=parseInt(e.retry_after_nanoseconds,10):"number"==typeof e.retry_after_nanoseconds?t.retry_after_nanoseconds=e.retry_after_nanoseconds:"object"==typeof e.retry_after_nanoseconds&&(t.retry_after_nanoseconds=new s.LongBits(e.retry_after_nanoseconds.low>>>0,e.retry_after_nanoseconds.high>>>0).toNumber(!0))),t},e.toObject=function(e,t){t||(t={});var n={};if(t.defaults)if(s.Long){var r=new s.Long(0,0,!0);n.retry_after_nanoseconds=t.longs===String?r.toString():t.longs===Number?r.toNumber():r}else n.retry_after_nanoseconds=t.longs===String?"0":0;return null!=e.retry_after_nanoseconds&&e.hasOwnProperty("retry_after_nanoseconds")&&("number"==typeof e.retry_after_nanoseconds?n.retry_after_nanoseconds=t.longs===String?String(e.retry_after_nanoseconds):e.retry_after_nanoseconds:n.retry_after_nanoseconds=t.longs===String?s.Long.prototype.toString.call(e.retry_after_nanoseconds):t.longs===Number?new s.LongBits(e.retry_after_nanoseconds.low>>>0,e.retry_after_nanoseconds.high>>>0).toNumber(!0):e.retry_after_nanoseconds),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/opamp.proto.RetryInfo"},e}(),n.ServerToAgentCommand=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.type=0,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=a.create()),null!=e.type&&Object.hasOwnProperty.call(e,"type")&&t.uint32(8).int32(e.type),t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t){e instanceof i||(e=i.create(e));for(var n=void 0===t?e.len:e.pos+t,r=new c.opamp.proto.ServerToAgentCommand;e.pos<n;){var o=e.uint32();o>>>3==1?r.type=e.int32():e.skipType(7&o)}return r},e.decodeDelimited=function(e){return e instanceof i||(e=new i(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.type&&e.hasOwnProperty("type")&&0!==e.type?"type: enum value expected":null},e.fromObject=function(e){if(e instanceof c.opamp.proto.ServerToAgentCommand)return e;var t=new c.opamp.proto.ServerToAgentCommand;switch(e.type){case"CommandType_Restart":case 0:t.type=0}return t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.type=t.enums===String?"CommandType_Restart":0),null!=e.type&&e.hasOwnProperty("type")&&(n.type=t.enums===String?c.opamp.proto.CommandType[e.type]:e.type),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/opamp.proto.ServerToAgentCommand"},e}(),n.CommandType=function(){var e={},t=Object.create(e);return t[e[0]="CommandType_Restart"]=0,t}(),n.AgentDescription=function(){function e(e){if(this.identifying_attributes=[],this.non_identifying_attributes=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.identifying_attributes=s.emptyArray,e.prototype.non_identifying_attributes=s.emptyArray,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=a.create()),null!=e.identifying_attributes&&e.identifying_attributes.length)for(var n=0;n<e.identifying_attributes.length;++n)c.opamp.proto.KeyValue.encode(e.identifying_attributes[n],t.uint32(10).fork()).ldelim();if(null!=e.non_identifying_attributes&&e.non_identifying_attributes.length)for(n=0;n<e.non_identifying_attributes.length;++n)c.opamp.proto.KeyValue.encode(e.non_identifying_attributes[n],t.uint32(18).fork()).ldelim();return t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t){e instanceof i||(e=i.create(e));for(var n=void 0===t?e.len:e.pos+t,r=new c.opamp.proto.AgentDescription;e.pos<n;){var o=e.uint32();switch(o>>>3){case 1:r.identifying_attributes&&r.identifying_attributes.length||(r.identifying_attributes=[]),r.identifying_attributes.push(c.opamp.proto.KeyValue.decode(e,e.uint32()));break;case 2:r.non_identifying_attributes&&r.non_identifying_attributes.length||(r.non_identifying_attributes=[]),r.non_identifying_attributes.push(c.opamp.proto.KeyValue.decode(e,e.uint32()));break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof i||(e=new i(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.identifying_attributes&&e.hasOwnProperty("identifying_attributes")){if(!Array.isArray(e.identifying_attributes))return"identifying_attributes: array expected";for(var t=0;t<e.identifying_attributes.length;++t)if(n=c.opamp.proto.KeyValue.verify(e.identifying_attributes[t]))return"identifying_attributes."+n}if(null!=e.non_identifying_attributes&&e.hasOwnProperty("non_identifying_attributes")){if(!Array.isArray(e.non_identifying_attributes))return"non_identifying_attributes: array expected";for(t=0;t<e.non_identifying_attributes.length;++t){var n;if(n=c.opamp.proto.KeyValue.verify(e.non_identifying_attributes[t]))return"non_identifying_attributes."+n}}return null},e.fromObject=function(e){if(e instanceof c.opamp.proto.AgentDescription)return e;var t=new c.opamp.proto.AgentDescription;if(e.identifying_attributes){if(!Array.isArray(e.identifying_attributes))throw TypeError(".opamp.proto.AgentDescription.identifying_attributes: array expected");t.identifying_attributes=[];for(var n=0;n<e.identifying_attributes.length;++n){if("object"!=typeof e.identifying_attributes[n])throw TypeError(".opamp.proto.AgentDescription.identifying_attributes: object expected");t.identifying_attributes[n]=c.opamp.proto.KeyValue.fromObject(e.identifying_attributes[n])}}if(e.non_identifying_attributes){if(!Array.isArray(e.non_identifying_attributes))throw TypeError(".opamp.proto.AgentDescription.non_identifying_attributes: array expected");for(t.non_identifying_attributes=[],n=0;n<e.non_identifying_attributes.length;++n){if("object"!=typeof e.non_identifying_attributes[n])throw TypeError(".opamp.proto.AgentDescription.non_identifying_attributes: object expected");t.non_identifying_attributes[n]=c.opamp.proto.KeyValue.fromObject(e.non_identifying_attributes[n])}}return t},e.toObject=function(e,t){t||(t={});var n={};if((t.arrays||t.defaults)&&(n.identifying_attributes=[],n.non_identifying_attributes=[]),e.identifying_attributes&&e.identifying_attributes.length){n.identifying_attributes=[];for(var r=0;r<e.identifying_attributes.length;++r)n.identifying_attributes[r]=c.opamp.proto.KeyValue.toObject(e.identifying_attributes[r],t)}if(e.non_identifying_attributes&&e.non_identifying_attributes.length)for(n.non_identifying_attributes=[],r=0;r<e.non_identifying_attributes.length;++r)n.non_identifying_attributes[r]=c.opamp.proto.KeyValue.toObject(e.non_identifying_attributes[r],t);return n},e.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/opamp.proto.AgentDescription"},e}(),n.AgentCapabilities=function(){var e={},t=Object.create(e);return t[e[0]="AgentCapabilities_Unspecified"]=0,t[e[1]="AgentCapabilities_ReportsStatus"]=1,t[e[2]="AgentCapabilities_AcceptsRemoteConfig"]=2,t[e[4]="AgentCapabilities_ReportsEffectiveConfig"]=4,t[e[8]="AgentCapabilities_AcceptsPackages"]=8,t[e[16]="AgentCapabilities_ReportsPackageStatuses"]=16,t[e[32]="AgentCapabilities_ReportsOwnTraces"]=32,t[e[64]="AgentCapabilities_ReportsOwnMetrics"]=64,t[e[128]="AgentCapabilities_ReportsOwnLogs"]=128,t[e[256]="AgentCapabilities_AcceptsOpAMPConnectionSettings"]=256,t[e[512]="AgentCapabilities_AcceptsOtherConnectionSettings"]=512,t[e[1024]="AgentCapabilities_AcceptsRestartCommand"]=1024,t[e[2048]="AgentCapabilities_ReportsHealth"]=2048,t[e[4096]="AgentCapabilities_ReportsRemoteConfig"]=4096,t[e[8192]="AgentCapabilities_ReportsHeartbeat"]=8192,t[e[16384]="AgentCapabilities_ReportsAvailableComponents"]=16384,t}(),n.ComponentHealth=function(){function e(e){if(this.component_health_map={},e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.healthy=!1,e.prototype.start_time_unix_nano=s.Long?s.Long.fromBits(0,0,!1):0,e.prototype.last_error="",e.prototype.status="",e.prototype.status_time_unix_nano=s.Long?s.Long.fromBits(0,0,!1):0,e.prototype.component_health_map=s.emptyObject,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=a.create()),null!=e.healthy&&Object.hasOwnProperty.call(e,"healthy")&&t.uint32(8).bool(e.healthy),null!=e.start_time_unix_nano&&Object.hasOwnProperty.call(e,"start_time_unix_nano")&&t.uint32(17).fixed64(e.start_time_unix_nano),null!=e.last_error&&Object.hasOwnProperty.call(e,"last_error")&&t.uint32(26).string(e.last_error),null!=e.status&&Object.hasOwnProperty.call(e,"status")&&t.uint32(34).string(e.status),null!=e.status_time_unix_nano&&Object.hasOwnProperty.call(e,"status_time_unix_nano")&&t.uint32(41).fixed64(e.status_time_unix_nano),null!=e.component_health_map&&Object.hasOwnProperty.call(e,"component_health_map"))for(var n=Object.keys(e.component_health_map),r=0;r<n.length;++r)t.uint32(50).fork().uint32(10).string(n[r]),c.opamp.proto.ComponentHealth.encode(e.component_health_map[n[r]],t.uint32(18).fork()).ldelim().ldelim();return t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t){e instanceof i||(e=i.create(e));for(var n,r,o=void 0===t?e.len:e.pos+t,a=new c.opamp.proto.ComponentHealth;e.pos<o;){var u=e.uint32();switch(u>>>3){case 1:a.healthy=e.bool();break;case 2:a.start_time_unix_nano=e.fixed64();break;case 3:a.last_error=e.string();break;case 4:a.status=e.string();break;case 5:a.status_time_unix_nano=e.fixed64();break;case 6:a.component_health_map===s.emptyObject&&(a.component_health_map={});var l=e.uint32()+e.pos;for(n="",r=null;e.pos<l;){var p=e.uint32();switch(p>>>3){case 1:n=e.string();break;case 2:r=c.opamp.proto.ComponentHealth.decode(e,e.uint32());break;default:e.skipType(7&p)}}a.component_health_map[n]=r;break;default:e.skipType(7&u)}}return a},e.decodeDelimited=function(e){return e instanceof i||(e=new i(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.healthy&&e.hasOwnProperty("healthy")&&"boolean"!=typeof e.healthy)return"healthy: boolean expected";if(null!=e.start_time_unix_nano&&e.hasOwnProperty("start_time_unix_nano")&&!(s.isInteger(e.start_time_unix_nano)||e.start_time_unix_nano&&s.isInteger(e.start_time_unix_nano.low)&&s.isInteger(e.start_time_unix_nano.high)))return"start_time_unix_nano: integer|Long expected";if(null!=e.last_error&&e.hasOwnProperty("last_error")&&!s.isString(e.last_error))return"last_error: string expected";if(null!=e.status&&e.hasOwnProperty("status")&&!s.isString(e.status))return"status: string expected";if(null!=e.status_time_unix_nano&&e.hasOwnProperty("status_time_unix_nano")&&!(s.isInteger(e.status_time_unix_nano)||e.status_time_unix_nano&&s.isInteger(e.status_time_unix_nano.low)&&s.isInteger(e.status_time_unix_nano.high)))return"status_time_unix_nano: integer|Long expected";if(null!=e.component_health_map&&e.hasOwnProperty("component_health_map")){if(!s.isObject(e.component_health_map))return"component_health_map: object expected";for(var t=Object.keys(e.component_health_map),n=0;n<t.length;++n){var r=c.opamp.proto.ComponentHealth.verify(e.component_health_map[t[n]]);if(r)return"component_health_map."+r}}return null},e.fromObject=function(e){if(e instanceof c.opamp.proto.ComponentHealth)return e;var t=new c.opamp.proto.ComponentHealth;if(null!=e.healthy&&(t.healthy=Boolean(e.healthy)),null!=e.start_time_unix_nano&&(s.Long?(t.start_time_unix_nano=s.Long.fromValue(e.start_time_unix_nano)).unsigned=!1:"string"==typeof e.start_time_unix_nano?t.start_time_unix_nano=parseInt(e.start_time_unix_nano,10):"number"==typeof e.start_time_unix_nano?t.start_time_unix_nano=e.start_time_unix_nano:"object"==typeof e.start_time_unix_nano&&(t.start_time_unix_nano=new s.LongBits(e.start_time_unix_nano.low>>>0,e.start_time_unix_nano.high>>>0).toNumber())),null!=e.last_error&&(t.last_error=String(e.last_error)),null!=e.status&&(t.status=String(e.status)),null!=e.status_time_unix_nano&&(s.Long?(t.status_time_unix_nano=s.Long.fromValue(e.status_time_unix_nano)).unsigned=!1:"string"==typeof e.status_time_unix_nano?t.status_time_unix_nano=parseInt(e.status_time_unix_nano,10):"number"==typeof e.status_time_unix_nano?t.status_time_unix_nano=e.status_time_unix_nano:"object"==typeof e.status_time_unix_nano&&(t.status_time_unix_nano=new s.LongBits(e.status_time_unix_nano.low>>>0,e.status_time_unix_nano.high>>>0).toNumber())),e.component_health_map){if("object"!=typeof e.component_health_map)throw TypeError(".opamp.proto.ComponentHealth.component_health_map: object expected");t.component_health_map={};for(var n=Object.keys(e.component_health_map),r=0;r<n.length;++r){if("object"!=typeof e.component_health_map[n[r]])throw TypeError(".opamp.proto.ComponentHealth.component_health_map: object expected");t.component_health_map[n[r]]=c.opamp.proto.ComponentHealth.fromObject(e.component_health_map[n[r]])}}return t},e.toObject=function(e,t){t||(t={});var n,r={};if((t.objects||t.defaults)&&(r.component_health_map={}),t.defaults){if(r.healthy=!1,s.Long){var o=new s.Long(0,0,!1);r.start_time_unix_nano=t.longs===String?o.toString():t.longs===Number?o.toNumber():o}else r.start_time_unix_nano=t.longs===String?"0":0;r.last_error="",r.status="",s.Long?(o=new s.Long(0,0,!1),r.status_time_unix_nano=t.longs===String?o.toString():t.longs===Number?o.toNumber():o):r.status_time_unix_nano=t.longs===String?"0":0}if(null!=e.healthy&&e.hasOwnProperty("healthy")&&(r.healthy=e.healthy),null!=e.start_time_unix_nano&&e.hasOwnProperty("start_time_unix_nano")&&("number"==typeof e.start_time_unix_nano?r.start_time_unix_nano=t.longs===String?String(e.start_time_unix_nano):e.start_time_unix_nano:r.start_time_unix_nano=t.longs===String?s.Long.prototype.toString.call(e.start_time_unix_nano):t.longs===Number?new s.LongBits(e.start_time_unix_nano.low>>>0,e.start_time_unix_nano.high>>>0).toNumber():e.start_time_unix_nano),null!=e.last_error&&e.hasOwnProperty("last_error")&&(r.last_error=e.last_error),null!=e.status&&e.hasOwnProperty("status")&&(r.status=e.status),null!=e.status_time_unix_nano&&e.hasOwnProperty("status_time_unix_nano")&&("number"==typeof e.status_time_unix_nano?r.status_time_unix_nano=t.longs===String?String(e.status_time_unix_nano):e.status_time_unix_nano:r.status_time_unix_nano=t.longs===String?s.Long.prototype.toString.call(e.status_time_unix_nano):t.longs===Number?new s.LongBits(e.status_time_unix_nano.low>>>0,e.status_time_unix_nano.high>>>0).toNumber():e.status_time_unix_nano),e.component_health_map&&(n=Object.keys(e.component_health_map)).length){r.component_health_map={};for(var i=0;i<n.length;++i)r.component_health_map[n[i]]=c.opamp.proto.ComponentHealth.toObject(e.component_health_map[n[i]],t)}return r},e.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/opamp.proto.ComponentHealth"},e}(),n.EffectiveConfig=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.config_map=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=a.create()),null!=e.config_map&&Object.hasOwnProperty.call(e,"config_map")&&c.opamp.proto.AgentConfigMap.encode(e.config_map,t.uint32(10).fork()).ldelim(),t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t){e instanceof i||(e=i.create(e));for(var n=void 0===t?e.len:e.pos+t,r=new c.opamp.proto.EffectiveConfig;e.pos<n;){var o=e.uint32();o>>>3==1?r.config_map=c.opamp.proto.AgentConfigMap.decode(e,e.uint32()):e.skipType(7&o)}return r},e.decodeDelimited=function(e){return e instanceof i||(e=new i(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.config_map&&e.hasOwnProperty("config_map")){var t=c.opamp.proto.AgentConfigMap.verify(e.config_map);if(t)return"config_map."+t}return null},e.fromObject=function(e){if(e instanceof c.opamp.proto.EffectiveConfig)return e;var t=new c.opamp.proto.EffectiveConfig;if(null!=e.config_map){if("object"!=typeof e.config_map)throw TypeError(".opamp.proto.EffectiveConfig.config_map: object expected");t.config_map=c.opamp.proto.AgentConfigMap.fromObject(e.config_map)}return t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.config_map=null),null!=e.config_map&&e.hasOwnProperty("config_map")&&(n.config_map=c.opamp.proto.AgentConfigMap.toObject(e.config_map,t)),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/opamp.proto.EffectiveConfig"},e}(),n.RemoteConfigStatus=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.last_remote_config_hash=s.newBuffer([]),e.prototype.status=0,e.prototype.error_message="",e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=a.create()),null!=e.last_remote_config_hash&&Object.hasOwnProperty.call(e,"last_remote_config_hash")&&t.uint32(10).bytes(e.last_remote_config_hash),null!=e.status&&Object.hasOwnProperty.call(e,"status")&&t.uint32(16).int32(e.status),null!=e.error_message&&Object.hasOwnProperty.call(e,"error_message")&&t.uint32(26).string(e.error_message),t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t){e instanceof i||(e=i.create(e));for(var n=void 0===t?e.len:e.pos+t,r=new c.opamp.proto.RemoteConfigStatus;e.pos<n;){var o=e.uint32();switch(o>>>3){case 1:r.last_remote_config_hash=e.bytes();break;case 2:r.status=e.int32();break;case 3:r.error_message=e.string();break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof i||(e=new i(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.last_remote_config_hash&&e.hasOwnProperty("last_remote_config_hash")&&!(e.last_remote_config_hash&&"number"==typeof e.last_remote_config_hash.length||s.isString(e.last_remote_config_hash)))return"last_remote_config_hash: buffer expected";if(null!=e.status&&e.hasOwnProperty("status"))switch(e.status){default:return"status: enum value expected";case 0:case 1:case 2:case 3:}return null!=e.error_message&&e.hasOwnProperty("error_message")&&!s.isString(e.error_message)?"error_message: string expected":null},e.fromObject=function(e){if(e instanceof c.opamp.proto.RemoteConfigStatus)return e;var t=new c.opamp.proto.RemoteConfigStatus;switch(null!=e.last_remote_config_hash&&("string"==typeof e.last_remote_config_hash?s.base64.decode(e.last_remote_config_hash,t.last_remote_config_hash=s.newBuffer(s.base64.length(e.last_remote_config_hash)),0):e.last_remote_config_hash.length&&(t.last_remote_config_hash=e.last_remote_config_hash)),e.status){case"RemoteConfigStatuses_UNSET":case 0:t.status=0;break;case"RemoteConfigStatuses_APPLIED":case 1:t.status=1;break;case"RemoteConfigStatuses_APPLYING":case 2:t.status=2;break;case"RemoteConfigStatuses_FAILED":case 3:t.status=3}return null!=e.error_message&&(t.error_message=String(e.error_message)),t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(t.bytes===String?n.last_remote_config_hash="":(n.last_remote_config_hash=[],t.bytes!==Array&&(n.last_remote_config_hash=s.newBuffer(n.last_remote_config_hash))),n.status=t.enums===String?"RemoteConfigStatuses_UNSET":0,n.error_message=""),null!=e.last_remote_config_hash&&e.hasOwnProperty("last_remote_config_hash")&&(n.last_remote_config_hash=t.bytes===String?s.base64.encode(e.last_remote_config_hash,0,e.last_remote_config_hash.length):t.bytes===Array?Array.prototype.slice.call(e.last_remote_config_hash):e.last_remote_config_hash),null!=e.status&&e.hasOwnProperty("status")&&(n.status=t.enums===String?c.opamp.proto.RemoteConfigStatuses[e.status]:e.status),null!=e.error_message&&e.hasOwnProperty("error_message")&&(n.error_message=e.error_message),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/opamp.proto.RemoteConfigStatus"},e}(),n.RemoteConfigStatuses=function(){var e={},t=Object.create(e);return t[e[0]="RemoteConfigStatuses_UNSET"]=0,t[e[1]="RemoteConfigStatuses_APPLIED"]=1,t[e[2]="RemoteConfigStatuses_APPLYING"]=2,t[e[3]="RemoteConfigStatuses_FAILED"]=3,t}(),n.PackageStatuses=function(){function e(e){if(this.packages={},e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.packages=s.emptyObject,e.prototype.server_provided_all_packages_hash=s.newBuffer([]),e.prototype.error_message="",e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=a.create()),null!=e.packages&&Object.hasOwnProperty.call(e,"packages"))for(var n=Object.keys(e.packages),r=0;r<n.length;++r)t.uint32(10).fork().uint32(10).string(n[r]),c.opamp.proto.PackageStatus.encode(e.packages[n[r]],t.uint32(18).fork()).ldelim().ldelim();return null!=e.server_provided_all_packages_hash&&Object.hasOwnProperty.call(e,"server_provided_all_packages_hash")&&t.uint32(18).bytes(e.server_provided_all_packages_hash),null!=e.error_message&&Object.hasOwnProperty.call(e,"error_message")&&t.uint32(26).string(e.error_message),t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t){e instanceof i||(e=i.create(e));for(var n,r,o=void 0===t?e.len:e.pos+t,a=new c.opamp.proto.PackageStatuses;e.pos<o;){var u=e.uint32();switch(u>>>3){case 1:a.packages===s.emptyObject&&(a.packages={});var l=e.uint32()+e.pos;for(n="",r=null;e.pos<l;){var p=e.uint32();switch(p>>>3){case 1:n=e.string();break;case 2:r=c.opamp.proto.PackageStatus.decode(e,e.uint32());break;default:e.skipType(7&p)}}a.packages[n]=r;break;case 2:a.server_provided_all_packages_hash=e.bytes();break;case 3:a.error_message=e.string();break;default:e.skipType(7&u)}}return a},e.decodeDelimited=function(e){return e instanceof i||(e=new i(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.packages&&e.hasOwnProperty("packages")){if(!s.isObject(e.packages))return"packages: object expected";for(var t=Object.keys(e.packages),n=0;n<t.length;++n){var r=c.opamp.proto.PackageStatus.verify(e.packages[t[n]]);if(r)return"packages."+r}}return null!=e.server_provided_all_packages_hash&&e.hasOwnProperty("server_provided_all_packages_hash")&&!(e.server_provided_all_packages_hash&&"number"==typeof e.server_provided_all_packages_hash.length||s.isString(e.server_provided_all_packages_hash))?"server_provided_all_packages_hash: buffer expected":null!=e.error_message&&e.hasOwnProperty("error_message")&&!s.isString(e.error_message)?"error_message: string expected":null},e.fromObject=function(e){if(e instanceof c.opamp.proto.PackageStatuses)return e;var t=new c.opamp.proto.PackageStatuses;if(e.packages){if("object"!=typeof e.packages)throw TypeError(".opamp.proto.PackageStatuses.packages: object expected");t.packages={};for(var n=Object.keys(e.packages),r=0;r<n.length;++r){if("object"!=typeof e.packages[n[r]])throw TypeError(".opamp.proto.PackageStatuses.packages: object expected");t.packages[n[r]]=c.opamp.proto.PackageStatus.fromObject(e.packages[n[r]])}}return null!=e.server_provided_all_packages_hash&&("string"==typeof e.server_provided_all_packages_hash?s.base64.decode(e.server_provided_all_packages_hash,t.server_provided_all_packages_hash=s.newBuffer(s.base64.length(e.server_provided_all_packages_hash)),0):e.server_provided_all_packages_hash.length&&(t.server_provided_all_packages_hash=e.server_provided_all_packages_hash)),null!=e.error_message&&(t.error_message=String(e.error_message)),t},e.toObject=function(e,t){t||(t={});var n,r={};if((t.objects||t.defaults)&&(r.packages={}),t.defaults&&(t.bytes===String?r.server_provided_all_packages_hash="":(r.server_provided_all_packages_hash=[],t.bytes!==Array&&(r.server_provided_all_packages_hash=s.newBuffer(r.server_provided_all_packages_hash))),r.error_message=""),e.packages&&(n=Object.keys(e.packages)).length){r.packages={};for(var o=0;o<n.length;++o)r.packages[n[o]]=c.opamp.proto.PackageStatus.toObject(e.packages[n[o]],t)}return null!=e.server_provided_all_packages_hash&&e.hasOwnProperty("server_provided_all_packages_hash")&&(r.server_provided_all_packages_hash=t.bytes===String?s.base64.encode(e.server_provided_all_packages_hash,0,e.server_provided_all_packages_hash.length):t.bytes===Array?Array.prototype.slice.call(e.server_provided_all_packages_hash):e.server_provided_all_packages_hash),null!=e.error_message&&e.hasOwnProperty("error_message")&&(r.error_message=e.error_message),r},e.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/opamp.proto.PackageStatuses"},e}(),n.PackageStatus=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.name="",e.prototype.agent_has_version="",e.prototype.agent_has_hash=s.newBuffer([]),e.prototype.server_offered_version="",e.prototype.server_offered_hash=s.newBuffer([]),e.prototype.status=0,e.prototype.error_message="",e.prototype.download_details=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=a.create()),null!=e.name&&Object.hasOwnProperty.call(e,"name")&&t.uint32(10).string(e.name),null!=e.agent_has_version&&Object.hasOwnProperty.call(e,"agent_has_version")&&t.uint32(18).string(e.agent_has_version),null!=e.agent_has_hash&&Object.hasOwnProperty.call(e,"agent_has_hash")&&t.uint32(26).bytes(e.agent_has_hash),null!=e.server_offered_version&&Object.hasOwnProperty.call(e,"server_offered_version")&&t.uint32(34).string(e.server_offered_version),null!=e.server_offered_hash&&Object.hasOwnProperty.call(e,"server_offered_hash")&&t.uint32(42).bytes(e.server_offered_hash),null!=e.status&&Object.hasOwnProperty.call(e,"status")&&t.uint32(48).int32(e.status),null!=e.error_message&&Object.hasOwnProperty.call(e,"error_message")&&t.uint32(58).string(e.error_message),null!=e.download_details&&Object.hasOwnProperty.call(e,"download_details")&&c.opamp.proto.PackageDownloadDetails.encode(e.download_details,t.uint32(66).fork()).ldelim(),t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t){e instanceof i||(e=i.create(e));for(var n=void 0===t?e.len:e.pos+t,r=new c.opamp.proto.PackageStatus;e.pos<n;){var o=e.uint32();switch(o>>>3){case 1:r.name=e.string();break;case 2:r.agent_has_version=e.string();break;case 3:r.agent_has_hash=e.bytes();break;case 4:r.server_offered_version=e.string();break;case 5:r.server_offered_hash=e.bytes();break;case 6:r.status=e.int32();break;case 7:r.error_message=e.string();break;case 8:r.download_details=c.opamp.proto.PackageDownloadDetails.decode(e,e.uint32());break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof i||(e=new i(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.name&&e.hasOwnProperty("name")&&!s.isString(e.name))return"name: string expected";if(null!=e.agent_has_version&&e.hasOwnProperty("agent_has_version")&&!s.isString(e.agent_has_version))return"agent_has_version: string expected";if(null!=e.agent_has_hash&&e.hasOwnProperty("agent_has_hash")&&!(e.agent_has_hash&&"number"==typeof e.agent_has_hash.length||s.isString(e.agent_has_hash)))return"agent_has_hash: buffer expected";if(null!=e.server_offered_version&&e.hasOwnProperty("server_offered_version")&&!s.isString(e.server_offered_version))return"server_offered_version: string expected";if(null!=e.server_offered_hash&&e.hasOwnProperty("server_offered_hash")&&!(e.server_offered_hash&&"number"==typeof e.server_offered_hash.length||s.isString(e.server_offered_hash)))return"server_offered_hash: buffer expected";if(null!=e.status&&e.hasOwnProperty("status"))switch(e.status){default:return"status: enum value expected";case 0:case 1:case 2:case 3:case 4:}if(null!=e.error_message&&e.hasOwnProperty("error_message")&&!s.isString(e.error_message))return"error_message: string expected";if(null!=e.download_details&&e.hasOwnProperty("download_details")){var t=c.opamp.proto.PackageDownloadDetails.verify(e.download_details);if(t)return"download_details."+t}return null},e.fromObject=function(e){if(e instanceof c.opamp.proto.PackageStatus)return e;var t=new c.opamp.proto.PackageStatus;switch(null!=e.name&&(t.name=String(e.name)),null!=e.agent_has_version&&(t.agent_has_version=String(e.agent_has_version)),null!=e.agent_has_hash&&("string"==typeof e.agent_has_hash?s.base64.decode(e.agent_has_hash,t.agent_has_hash=s.newBuffer(s.base64.length(e.agent_has_hash)),0):e.agent_has_hash.length&&(t.agent_has_hash=e.agent_has_hash)),null!=e.server_offered_version&&(t.server_offered_version=String(e.server_offered_version)),null!=e.server_offered_hash&&("string"==typeof e.server_offered_hash?s.base64.decode(e.server_offered_hash,t.server_offered_hash=s.newBuffer(s.base64.length(e.server_offered_hash)),0):e.server_offered_hash.length&&(t.server_offered_hash=e.server_offered_hash)),e.status){case"PackageStatusEnum_Installed":case 0:t.status=0;break;case"PackageStatusEnum_InstallPending":case 1:t.status=1;break;case"PackageStatusEnum_Installing":case 2:t.status=2;break;case"PackageStatusEnum_InstallFailed":case 3:t.status=3;break;case"PackageStatusEnum_Downloading":case 4:t.status=4}if(null!=e.error_message&&(t.error_message=String(e.error_message)),null!=e.download_details){if("object"!=typeof e.download_details)throw TypeError(".opamp.proto.PackageStatus.download_details: object expected");t.download_details=c.opamp.proto.PackageDownloadDetails.fromObject(e.download_details)}return t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.name="",n.agent_has_version="",t.bytes===String?n.agent_has_hash="":(n.agent_has_hash=[],t.bytes!==Array&&(n.agent_has_hash=s.newBuffer(n.agent_has_hash))),n.server_offered_version="",t.bytes===String?n.server_offered_hash="":(n.server_offered_hash=[],t.bytes!==Array&&(n.server_offered_hash=s.newBuffer(n.server_offered_hash))),n.status=t.enums===String?"PackageStatusEnum_Installed":0,n.error_message="",n.download_details=null),null!=e.name&&e.hasOwnProperty("name")&&(n.name=e.name),null!=e.agent_has_version&&e.hasOwnProperty("agent_has_version")&&(n.agent_has_version=e.agent_has_version),null!=e.agent_has_hash&&e.hasOwnProperty("agent_has_hash")&&(n.agent_has_hash=t.bytes===String?s.base64.encode(e.agent_has_hash,0,e.agent_has_hash.length):t.bytes===Array?Array.prototype.slice.call(e.agent_has_hash):e.agent_has_hash),null!=e.server_offered_version&&e.hasOwnProperty("server_offered_version")&&(n.server_offered_version=e.server_offered_version),null!=e.server_offered_hash&&e.hasOwnProperty("server_offered_hash")&&(n.server_offered_hash=t.bytes===String?s.base64.encode(e.server_offered_hash,0,e.server_offered_hash.length):t.bytes===Array?Array.prototype.slice.call(e.server_offered_hash):e.server_offered_hash),null!=e.status&&e.hasOwnProperty("status")&&(n.status=t.enums===String?c.opamp.proto.PackageStatusEnum[e.status]:e.status),null!=e.error_message&&e.hasOwnProperty("error_message")&&(n.error_message=e.error_message),null!=e.download_details&&e.hasOwnProperty("download_details")&&(n.download_details=c.opamp.proto.PackageDownloadDetails.toObject(e.download_details,t)),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/opamp.proto.PackageStatus"},e}(),n.PackageDownloadDetails=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.download_percent=0,e.prototype.download_bytes_per_second=0,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=a.create()),null!=e.download_percent&&Object.hasOwnProperty.call(e,"download_percent")&&t.uint32(9).double(e.download_percent),null!=e.download_bytes_per_second&&Object.hasOwnProperty.call(e,"download_bytes_per_second")&&t.uint32(17).double(e.download_bytes_per_second),t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t){e instanceof i||(e=i.create(e));for(var n=void 0===t?e.len:e.pos+t,r=new c.opamp.proto.PackageDownloadDetails;e.pos<n;){var o=e.uint32();switch(o>>>3){case 1:r.download_percent=e.double();break;case 2:r.download_bytes_per_second=e.double();break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof i||(e=new i(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.download_percent&&e.hasOwnProperty("download_percent")&&"number"!=typeof e.download_percent?"download_percent: number expected":null!=e.download_bytes_per_second&&e.hasOwnProperty("download_bytes_per_second")&&"number"!=typeof e.download_bytes_per_second?"download_bytes_per_second: number expected":null},e.fromObject=function(e){if(e instanceof c.opamp.proto.PackageDownloadDetails)return e;var t=new c.opamp.proto.PackageDownloadDetails;return null!=e.download_percent&&(t.download_percent=Number(e.download_percent)),null!=e.download_bytes_per_second&&(t.download_bytes_per_second=Number(e.download_bytes_per_second)),t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.download_percent=0,n.download_bytes_per_second=0),null!=e.download_percent&&e.hasOwnProperty("download_percent")&&(n.download_percent=t.json&&!isFinite(e.download_percent)?String(e.download_percent):e.download_percent),null!=e.download_bytes_per_second&&e.hasOwnProperty("download_bytes_per_second")&&(n.download_bytes_per_second=t.json&&!isFinite(e.download_bytes_per_second)?String(e.download_bytes_per_second):e.download_bytes_per_second),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/opamp.proto.PackageDownloadDetails"},e}(),n.PackageStatusEnum=function(){var e={},t=Object.create(e);return t[e[0]="PackageStatusEnum_Installed"]=0,t[e[1]="PackageStatusEnum_InstallPending"]=1,t[e[2]="PackageStatusEnum_Installing"]=2,t[e[3]="PackageStatusEnum_InstallFailed"]=3,t[e[4]="PackageStatusEnum_Downloading"]=4,t}(),n.AgentIdentification=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.new_instance_uid=s.newBuffer([]),e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=a.create()),null!=e.new_instance_uid&&Object.hasOwnProperty.call(e,"new_instance_uid")&&t.uint32(10).bytes(e.new_instance_uid),t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t){e instanceof i||(e=i.create(e));for(var n=void 0===t?e.len:e.pos+t,r=new c.opamp.proto.AgentIdentification;e.pos<n;){var o=e.uint32();o>>>3==1?r.new_instance_uid=e.bytes():e.skipType(7&o)}return r},e.decodeDelimited=function(e){return e instanceof i||(e=new i(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.new_instance_uid&&e.hasOwnProperty("new_instance_uid")&&!(e.new_instance_uid&&"number"==typeof e.new_instance_uid.length||s.isString(e.new_instance_uid))?"new_instance_uid: buffer expected":null},e.fromObject=function(e){if(e instanceof c.opamp.proto.AgentIdentification)return e;var t=new c.opamp.proto.AgentIdentification;return null!=e.new_instance_uid&&("string"==typeof e.new_instance_uid?s.base64.decode(e.new_instance_uid,t.new_instance_uid=s.newBuffer(s.base64.length(e.new_instance_uid)),0):e.new_instance_uid.length&&(t.new_instance_uid=e.new_instance_uid)),t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(t.bytes===String?n.new_instance_uid="":(n.new_instance_uid=[],t.bytes!==Array&&(n.new_instance_uid=s.newBuffer(n.new_instance_uid)))),null!=e.new_instance_uid&&e.hasOwnProperty("new_instance_uid")&&(n.new_instance_uid=t.bytes===String?s.base64.encode(e.new_instance_uid,0,e.new_instance_uid.length):t.bytes===Array?Array.prototype.slice.call(e.new_instance_uid):e.new_instance_uid),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/opamp.proto.AgentIdentification"},e}(),n.AgentRemoteConfig=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.config=null,e.prototype.config_hash=s.newBuffer([]),e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=a.create()),null!=e.config&&Object.hasOwnProperty.call(e,"config")&&c.opamp.proto.AgentConfigMap.encode(e.config,t.uint32(10).fork()).ldelim(),null!=e.config_hash&&Object.hasOwnProperty.call(e,"config_hash")&&t.uint32(18).bytes(e.config_hash),t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t){e instanceof i||(e=i.create(e));for(var n=void 0===t?e.len:e.pos+t,r=new c.opamp.proto.AgentRemoteConfig;e.pos<n;){var o=e.uint32();switch(o>>>3){case 1:r.config=c.opamp.proto.AgentConfigMap.decode(e,e.uint32());break;case 2:r.config_hash=e.bytes();break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof i||(e=new i(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.config&&e.hasOwnProperty("config")){var t=c.opamp.proto.AgentConfigMap.verify(e.config);if(t)return"config."+t}return null!=e.config_hash&&e.hasOwnProperty("config_hash")&&!(e.config_hash&&"number"==typeof e.config_hash.length||s.isString(e.config_hash))?"config_hash: buffer expected":null},e.fromObject=function(e){if(e instanceof c.opamp.proto.AgentRemoteConfig)return e;var t=new c.opamp.proto.AgentRemoteConfig;if(null!=e.config){if("object"!=typeof e.config)throw TypeError(".opamp.proto.AgentRemoteConfig.config: object expected");t.config=c.opamp.proto.AgentConfigMap.fromObject(e.config)}return null!=e.config_hash&&("string"==typeof e.config_hash?s.base64.decode(e.config_hash,t.config_hash=s.newBuffer(s.base64.length(e.config_hash)),0):e.config_hash.length&&(t.config_hash=e.config_hash)),t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.config=null,t.bytes===String?n.config_hash="":(n.config_hash=[],t.bytes!==Array&&(n.config_hash=s.newBuffer(n.config_hash)))),null!=e.config&&e.hasOwnProperty("config")&&(n.config=c.opamp.proto.AgentConfigMap.toObject(e.config,t)),null!=e.config_hash&&e.hasOwnProperty("config_hash")&&(n.config_hash=t.bytes===String?s.base64.encode(e.config_hash,0,e.config_hash.length):t.bytes===Array?Array.prototype.slice.call(e.config_hash):e.config_hash),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/opamp.proto.AgentRemoteConfig"},e}(),n.AgentConfigMap=function(){function e(e){if(this.config_map={},e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.config_map=s.emptyObject,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=a.create()),null!=e.config_map&&Object.hasOwnProperty.call(e,"config_map"))for(var n=Object.keys(e.config_map),r=0;r<n.length;++r)t.uint32(10).fork().uint32(10).string(n[r]),c.opamp.proto.AgentConfigFile.encode(e.config_map[n[r]],t.uint32(18).fork()).ldelim().ldelim();return t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t){e instanceof i||(e=i.create(e));for(var n,r,o=void 0===t?e.len:e.pos+t,a=new c.opamp.proto.AgentConfigMap;e.pos<o;){var u=e.uint32();if(u>>>3==1){a.config_map===s.emptyObject&&(a.config_map={});var l=e.uint32()+e.pos;for(n="",r=null;e.pos<l;){var p=e.uint32();switch(p>>>3){case 1:n=e.string();break;case 2:r=c.opamp.proto.AgentConfigFile.decode(e,e.uint32());break;default:e.skipType(7&p)}}a.config_map[n]=r}else e.skipType(7&u)}return a},e.decodeDelimited=function(e){return e instanceof i||(e=new i(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.config_map&&e.hasOwnProperty("config_map")){if(!s.isObject(e.config_map))return"config_map: object expected";for(var t=Object.keys(e.config_map),n=0;n<t.length;++n){var r=c.opamp.proto.AgentConfigFile.verify(e.config_map[t[n]]);if(r)return"config_map."+r}}return null},e.fromObject=function(e){if(e instanceof c.opamp.proto.AgentConfigMap)return e;var t=new c.opamp.proto.AgentConfigMap;if(e.config_map){if("object"!=typeof e.config_map)throw TypeError(".opamp.proto.AgentConfigMap.config_map: object expected");t.config_map={};for(var n=Object.keys(e.config_map),r=0;r<n.length;++r){if("object"!=typeof e.config_map[n[r]])throw TypeError(".opamp.proto.AgentConfigMap.config_map: object expected");t.config_map[n[r]]=c.opamp.proto.AgentConfigFile.fromObject(e.config_map[n[r]])}}return t},e.toObject=function(e,t){t||(t={});var n,r={};if((t.objects||t.defaults)&&(r.config_map={}),e.config_map&&(n=Object.keys(e.config_map)).length){r.config_map={};for(var o=0;o<n.length;++o)r.config_map[n[o]]=c.opamp.proto.AgentConfigFile.toObject(e.config_map[n[o]],t)}return r},e.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/opamp.proto.AgentConfigMap"},e}(),n.AgentConfigFile=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.body=s.newBuffer([]),e.prototype.content_type="",e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=a.create()),null!=e.body&&Object.hasOwnProperty.call(e,"body")&&t.uint32(10).bytes(e.body),null!=e.content_type&&Object.hasOwnProperty.call(e,"content_type")&&t.uint32(18).string(e.content_type),t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t){e instanceof i||(e=i.create(e));for(var n=void 0===t?e.len:e.pos+t,r=new c.opamp.proto.AgentConfigFile;e.pos<n;){var o=e.uint32();switch(o>>>3){case 1:r.body=e.bytes();break;case 2:r.content_type=e.string();break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof i||(e=new i(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.body&&e.hasOwnProperty("body")&&!(e.body&&"number"==typeof e.body.length||s.isString(e.body))?"body: buffer expected":null!=e.content_type&&e.hasOwnProperty("content_type")&&!s.isString(e.content_type)?"content_type: string expected":null},e.fromObject=function(e){if(e instanceof c.opamp.proto.AgentConfigFile)return e;var t=new c.opamp.proto.AgentConfigFile;return null!=e.body&&("string"==typeof e.body?s.base64.decode(e.body,t.body=s.newBuffer(s.base64.length(e.body)),0):e.body.length&&(t.body=e.body)),null!=e.content_type&&(t.content_type=String(e.content_type)),t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(t.bytes===String?n.body="":(n.body=[],t.bytes!==Array&&(n.body=s.newBuffer(n.body))),n.content_type=""),null!=e.body&&e.hasOwnProperty("body")&&(n.body=t.bytes===String?s.base64.encode(e.body,0,e.body.length):t.bytes===Array?Array.prototype.slice.call(e.body):e.body),null!=e.content_type&&e.hasOwnProperty("content_type")&&(n.content_type=e.content_type),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/opamp.proto.AgentConfigFile"},e}(),n.CustomCapabilities=function(){function e(e){if(this.capabilities=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.capabilities=s.emptyArray,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=a.create()),null!=e.capabilities&&e.capabilities.length)for(var n=0;n<e.capabilities.length;++n)t.uint32(10).string(e.capabilities[n]);return t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t){e instanceof i||(e=i.create(e));for(var n=void 0===t?e.len:e.pos+t,r=new c.opamp.proto.CustomCapabilities;e.pos<n;){var o=e.uint32();o>>>3==1?(r.capabilities&&r.capabilities.length||(r.capabilities=[]),r.capabilities.push(e.string())):e.skipType(7&o)}return r},e.decodeDelimited=function(e){return e instanceof i||(e=new i(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.capabilities&&e.hasOwnProperty("capabilities")){if(!Array.isArray(e.capabilities))return"capabilities: array expected";for(var t=0;t<e.capabilities.length;++t)if(!s.isString(e.capabilities[t]))return"capabilities: string[] expected"}return null},e.fromObject=function(e){if(e instanceof c.opamp.proto.CustomCapabilities)return e;var t=new c.opamp.proto.CustomCapabilities;if(e.capabilities){if(!Array.isArray(e.capabilities))throw TypeError(".opamp.proto.CustomCapabilities.capabilities: array expected");t.capabilities=[];for(var n=0;n<e.capabilities.length;++n)t.capabilities[n]=String(e.capabilities[n])}return t},e.toObject=function(e,t){t||(t={});var n={};if((t.arrays||t.defaults)&&(n.capabilities=[]),e.capabilities&&e.capabilities.length){n.capabilities=[];for(var r=0;r<e.capabilities.length;++r)n.capabilities[r]=e.capabilities[r]}return n},e.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/opamp.proto.CustomCapabilities"},e}(),n.CustomMessage=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.capability="",e.prototype.type="",e.prototype.data=s.newBuffer([]),e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=a.create()),null!=e.capability&&Object.hasOwnProperty.call(e,"capability")&&t.uint32(10).string(e.capability),null!=e.type&&Object.hasOwnProperty.call(e,"type")&&t.uint32(18).string(e.type),null!=e.data&&Object.hasOwnProperty.call(e,"data")&&t.uint32(26).bytes(e.data),t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t){e instanceof i||(e=i.create(e));for(var n=void 0===t?e.len:e.pos+t,r=new c.opamp.proto.CustomMessage;e.pos<n;){var o=e.uint32();switch(o>>>3){case 1:r.capability=e.string();break;case 2:r.type=e.string();break;case 3:r.data=e.bytes();break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof i||(e=new i(e)),this.decode(e,e.uint32())},e.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.capability&&e.hasOwnProperty("capability")&&!s.isString(e.capability)?"capability: string expected":null!=e.type&&e.hasOwnProperty("type")&&!s.isString(e.type)?"type: string expected":null!=e.data&&e.hasOwnProperty("data")&&!(e.data&&"number"==typeof e.data.length||s.isString(e.data))?"data: buffer expected":null},e.fromObject=function(e){if(e instanceof c.opamp.proto.CustomMessage)return e;var t=new c.opamp.proto.CustomMessage;return null!=e.capability&&(t.capability=String(e.capability)),null!=e.type&&(t.type=String(e.type)),null!=e.data&&("string"==typeof e.data?s.base64.decode(e.data,t.data=s.newBuffer(s.base64.length(e.data)),0):e.data.length&&(t.data=e.data)),t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.capability="",n.type="",t.bytes===String?n.data="":(n.data=[],t.bytes!==Array&&(n.data=s.newBuffer(n.data)))),null!=e.capability&&e.hasOwnProperty("capability")&&(n.capability=e.capability),null!=e.type&&e.hasOwnProperty("type")&&(n.type=e.type),null!=e.data&&e.hasOwnProperty("data")&&(n.data=t.bytes===String?s.base64.encode(e.data,0,e.data.length):t.bytes===Array?Array.prototype.slice.call(e.data):e.data),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/opamp.proto.CustomMessage"},e}(),n.AnyValue=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}var t;return e.prototype.string_value=null,e.prototype.bool_value=null,e.prototype.int_value=null,e.prototype.double_value=null,e.prototype.array_value=null,e.prototype.kvlist_value=null,e.prototype.bytes_value=null,Object.defineProperty(e.prototype,"value",{get:s.oneOfGetter(t=["string_value","bool_value","int_value","double_value","array_value","kvlist_value","bytes_value"]),set:s.oneOfSetter(t)}),e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=a.create()),null!=e.string_value&&Object.hasOwnProperty.call(e,"string_value")&&t.uint32(10).string(e.string_value),null!=e.bool_value&&Object.hasOwnProperty.call(e,"bool_value")&&t.uint32(16).bool(e.bool_value),null!=e.int_value&&Object.hasOwnProperty.call(e,"int_value")&&t.uint32(24).int64(e.int_value),null!=e.double_value&&Object.hasOwnProperty.call(e,"double_value")&&t.uint32(33).double(e.double_value),null!=e.array_value&&Object.hasOwnProperty.call(e,"array_value")&&c.opamp.proto.ArrayValue.encode(e.array_value,t.uint32(42).fork()).ldelim(),null!=e.kvlist_value&&Object.hasOwnProperty.call(e,"kvlist_value")&&c.opamp.proto.KeyValueList.encode(e.kvlist_value,t.uint32(50).fork()).ldelim(),null!=e.bytes_value&&Object.hasOwnProperty.call(e,"bytes_value")&&t.uint32(58).bytes(e.bytes_value),t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t){e instanceof i||(e=i.create(e));for(var n=void 0===t?e.len:e.pos+t,r=new c.opamp.proto.AnyValue;e.pos<n;){var o=e.uint32();switch(o>>>3){case 1:r.string_value=e.string();break;case 2:r.bool_value=e.bool();break;case 3:r.int_value=e.int64();break;case 4:r.double_value=e.double();break;case 5:r.array_value=c.opamp.proto.ArrayValue.decode(e,e.uint32());break;case 6:r.kvlist_value=c.opamp.proto.KeyValueList.decode(e,e.uint32());break;case 7:r.bytes_value=e.bytes();break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof i||(e=new i(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";var t={};if(null!=e.string_value&&e.hasOwnProperty("string_value")&&(t.value=1,!s.isString(e.string_value)))return"string_value: string expected";if(null!=e.bool_value&&e.hasOwnProperty("bool_value")){if(1===t.value)return"value: multiple values";if(t.value=1,"boolean"!=typeof e.bool_value)return"bool_value: boolean expected"}if(null!=e.int_value&&e.hasOwnProperty("int_value")){if(1===t.value)return"value: multiple values";if(t.value=1,!(s.isInteger(e.int_value)||e.int_value&&s.isInteger(e.int_value.low)&&s.isInteger(e.int_value.high)))return"int_value: integer|Long expected"}if(null!=e.double_value&&e.hasOwnProperty("double_value")){if(1===t.value)return"value: multiple values";if(t.value=1,"number"!=typeof e.double_value)return"double_value: number expected"}if(null!=e.array_value&&e.hasOwnProperty("array_value")){if(1===t.value)return"value: multiple values";if(t.value=1,n=c.opamp.proto.ArrayValue.verify(e.array_value))return"array_value."+n}if(null!=e.kvlist_value&&e.hasOwnProperty("kvlist_value")){if(1===t.value)return"value: multiple values";var n;if(t.value=1,n=c.opamp.proto.KeyValueList.verify(e.kvlist_value))return"kvlist_value."+n}if(null!=e.bytes_value&&e.hasOwnProperty("bytes_value")){if(1===t.value)return"value: multiple values";if(t.value=1,!(e.bytes_value&&"number"==typeof e.bytes_value.length||s.isString(e.bytes_value)))return"bytes_value: buffer expected"}return null},e.fromObject=function(e){if(e instanceof c.opamp.proto.AnyValue)return e;var t=new c.opamp.proto.AnyValue;if(null!=e.string_value&&(t.string_value=String(e.string_value)),null!=e.bool_value&&(t.bool_value=Boolean(e.bool_value)),null!=e.int_value&&(s.Long?(t.int_value=s.Long.fromValue(e.int_value)).unsigned=!1:"string"==typeof e.int_value?t.int_value=parseInt(e.int_value,10):"number"==typeof e.int_value?t.int_value=e.int_value:"object"==typeof e.int_value&&(t.int_value=new s.LongBits(e.int_value.low>>>0,e.int_value.high>>>0).toNumber())),null!=e.double_value&&(t.double_value=Number(e.double_value)),null!=e.array_value){if("object"!=typeof e.array_value)throw TypeError(".opamp.proto.AnyValue.array_value: object expected");t.array_value=c.opamp.proto.ArrayValue.fromObject(e.array_value)}if(null!=e.kvlist_value){if("object"!=typeof e.kvlist_value)throw TypeError(".opamp.proto.AnyValue.kvlist_value: object expected");t.kvlist_value=c.opamp.proto.KeyValueList.fromObject(e.kvlist_value)}return null!=e.bytes_value&&("string"==typeof e.bytes_value?s.base64.decode(e.bytes_value,t.bytes_value=s.newBuffer(s.base64.length(e.bytes_value)),0):e.bytes_value.length&&(t.bytes_value=e.bytes_value)),t},e.toObject=function(e,t){t||(t={});var n={};return null!=e.string_value&&e.hasOwnProperty("string_value")&&(n.string_value=e.string_value,t.oneofs&&(n.value="string_value")),null!=e.bool_value&&e.hasOwnProperty("bool_value")&&(n.bool_value=e.bool_value,t.oneofs&&(n.value="bool_value")),null!=e.int_value&&e.hasOwnProperty("int_value")&&("number"==typeof e.int_value?n.int_value=t.longs===String?String(e.int_value):e.int_value:n.int_value=t.longs===String?s.Long.prototype.toString.call(e.int_value):t.longs===Number?new s.LongBits(e.int_value.low>>>0,e.int_value.high>>>0).toNumber():e.int_value,t.oneofs&&(n.value="int_value")),null!=e.double_value&&e.hasOwnProperty("double_value")&&(n.double_value=t.json&&!isFinite(e.double_value)?String(e.double_value):e.double_value,t.oneofs&&(n.value="double_value")),null!=e.array_value&&e.hasOwnProperty("array_value")&&(n.array_value=c.opamp.proto.ArrayValue.toObject(e.array_value,t),t.oneofs&&(n.value="array_value")),null!=e.kvlist_value&&e.hasOwnProperty("kvlist_value")&&(n.kvlist_value=c.opamp.proto.KeyValueList.toObject(e.kvlist_value,t),t.oneofs&&(n.value="kvlist_value")),null!=e.bytes_value&&e.hasOwnProperty("bytes_value")&&(n.bytes_value=t.bytes===String?s.base64.encode(e.bytes_value,0,e.bytes_value.length):t.bytes===Array?Array.prototype.slice.call(e.bytes_value):e.bytes_value,t.oneofs&&(n.value="bytes_value")),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/opamp.proto.AnyValue"},e}(),n.ArrayValue=function(){function e(e){if(this.values=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.values=s.emptyArray,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=a.create()),null!=e.values&&e.values.length)for(var n=0;n<e.values.length;++n)c.opamp.proto.AnyValue.encode(e.values[n],t.uint32(10).fork()).ldelim();return t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t){e instanceof i||(e=i.create(e));for(var n=void 0===t?e.len:e.pos+t,r=new c.opamp.proto.ArrayValue;e.pos<n;){var o=e.uint32();o>>>3==1?(r.values&&r.values.length||(r.values=[]),r.values.push(c.opamp.proto.AnyValue.decode(e,e.uint32()))):e.skipType(7&o)}return r},e.decodeDelimited=function(e){return e instanceof i||(e=new i(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.values&&e.hasOwnProperty("values")){if(!Array.isArray(e.values))return"values: array expected";for(var t=0;t<e.values.length;++t){var n=c.opamp.proto.AnyValue.verify(e.values[t]);if(n)return"values."+n}}return null},e.fromObject=function(e){if(e instanceof c.opamp.proto.ArrayValue)return e;var t=new c.opamp.proto.ArrayValue;if(e.values){if(!Array.isArray(e.values))throw TypeError(".opamp.proto.ArrayValue.values: array expected");t.values=[];for(var n=0;n<e.values.length;++n){if("object"!=typeof e.values[n])throw TypeError(".opamp.proto.ArrayValue.values: object expected");t.values[n]=c.opamp.proto.AnyValue.fromObject(e.values[n])}}return t},e.toObject=function(e,t){t||(t={});var n={};if((t.arrays||t.defaults)&&(n.values=[]),e.values&&e.values.length){n.values=[];for(var r=0;r<e.values.length;++r)n.values[r]=c.opamp.proto.AnyValue.toObject(e.values[r],t)}return n},e.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/opamp.proto.ArrayValue"},e}(),n.KeyValueList=function(){function e(e){if(this.values=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.values=s.emptyArray,e.create=function(t){return new e(t)},e.encode=function(e,t){if(t||(t=a.create()),null!=e.values&&e.values.length)for(var n=0;n<e.values.length;++n)c.opamp.proto.KeyValue.encode(e.values[n],t.uint32(10).fork()).ldelim();return t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t){e instanceof i||(e=i.create(e));for(var n=void 0===t?e.len:e.pos+t,r=new c.opamp.proto.KeyValueList;e.pos<n;){var o=e.uint32();o>>>3==1?(r.values&&r.values.length||(r.values=[]),r.values.push(c.opamp.proto.KeyValue.decode(e,e.uint32()))):e.skipType(7&o)}return r},e.decodeDelimited=function(e){return e instanceof i||(e=new i(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.values&&e.hasOwnProperty("values")){if(!Array.isArray(e.values))return"values: array expected";for(var t=0;t<e.values.length;++t){var n=c.opamp.proto.KeyValue.verify(e.values[t]);if(n)return"values."+n}}return null},e.fromObject=function(e){if(e instanceof c.opamp.proto.KeyValueList)return e;var t=new c.opamp.proto.KeyValueList;if(e.values){if(!Array.isArray(e.values))throw TypeError(".opamp.proto.KeyValueList.values: array expected");t.values=[];for(var n=0;n<e.values.length;++n){if("object"!=typeof e.values[n])throw TypeError(".opamp.proto.KeyValueList.values: object expected");t.values[n]=c.opamp.proto.KeyValue.fromObject(e.values[n])}}return t},e.toObject=function(e,t){t||(t={});var n={};if((t.arrays||t.defaults)&&(n.values=[]),e.values&&e.values.length){n.values=[];for(var r=0;r<e.values.length;++r)n.values[r]=c.opamp.proto.KeyValue.toObject(e.values[r],t)}return n},e.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/opamp.proto.KeyValueList"},e}(),n.KeyValue=function(){function e(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return e.prototype.key="",e.prototype.value=null,e.create=function(t){return new e(t)},e.encode=function(e,t){return t||(t=a.create()),null!=e.key&&Object.hasOwnProperty.call(e,"key")&&t.uint32(10).string(e.key),null!=e.value&&Object.hasOwnProperty.call(e,"value")&&c.opamp.proto.AnyValue.encode(e.value,t.uint32(18).fork()).ldelim(),t},e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},e.decode=function(e,t){e instanceof i||(e=i.create(e));for(var n=void 0===t?e.len:e.pos+t,r=new c.opamp.proto.KeyValue;e.pos<n;){var o=e.uint32();switch(o>>>3){case 1:r.key=e.string();break;case 2:r.value=c.opamp.proto.AnyValue.decode(e,e.uint32());break;default:e.skipType(7&o)}}return r},e.decodeDelimited=function(e){return e instanceof i||(e=new i(e)),this.decode(e,e.uint32())},e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.key&&e.hasOwnProperty("key")&&!s.isString(e.key))return"key: string expected";if(null!=e.value&&e.hasOwnProperty("value")){var t=c.opamp.proto.AnyValue.verify(e.value);if(t)return"value."+t}return null},e.fromObject=function(e){if(e instanceof c.opamp.proto.KeyValue)return e;var t=new c.opamp.proto.KeyValue;if(null!=e.key&&(t.key=String(e.key)),null!=e.value){if("object"!=typeof e.value)throw TypeError(".opamp.proto.KeyValue.value: object expected");t.value=c.opamp.proto.AnyValue.fromObject(e.value)}return t},e.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.key="",n.value=null),null!=e.key&&e.hasOwnProperty("key")&&(n.key=e.key),null!=e.value&&e.hasOwnProperty("value")&&(n.value=c.opamp.proto.AnyValue.toObject(e.value,t)),n},e.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},e.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/opamp.proto.KeyValue"},e}(),n),r),GC=c}()),r=Wt,{opamp:o}=n.default;return $P.IMQAOpAMPClient=class{constructor(e){this.ws=null,this.sequenceNum=0,this.reconnectAttempts=0,this.maxReconnectAttempts=5,this.reconnectDelay=1e3,this.reconnectTimer=null,this.config=e,this.instanceId=new Uint8Array((0,t.v4)().split("-").join("").match(/.{2}/g).map((e=>parseInt(e,16))))}async connect(){return this.ws&&this.ws.close(),this.reconnectTimer&&(window.clearTimeout(this.reconnectTimer),this.reconnectTimer=null),new Promise(((e,t)=>{var n,o;try{const n=new URL(this.config.serverUrl);"http:"===n.protocol?n.protocol="ws:":"https:"===n.protocol&&(n.protocol="wss:"),this.ws=new WebSocket(n.toString()),this.ws.binaryType="arraybuffer",this.ws.onopen=()=>{var t,n;console.log("OpAMP WebSocket connected"),null===(n=(t=this.config).onConnectionChange)||void 0===n||n.call(t,!0),this.reconnectAttempts=0,this.sendInitialMessage(),e()},this.ws.onclose=()=>{var e,t;console.log("OpAMP WebSocket closed"),null===(t=(e=this.config).onConnectionChange)||void 0===t||t.call(e,!1),this.handleReconnect()},this.ws.onerror=e=>{var n,r;console.error("OpAMP WebSocket error:",e),null===(r=(n=this.config).onError)||void 0===r||r.call(n,new Error("WebSocket connection error")),t(e)},this.ws.onmessage=e=>{this.handleServerMessage(e.data)}}catch(e){r.diag.error("Failed to connect:",e),null===(o=(n=this.config).onError)||void 0===o||o.call(n,new Error("Failed to establish WebSocket connection")),t(e)}}))}handleReconnect(){if(this.reconnectAttempts<this.maxReconnectAttempts){this.reconnectAttempts++;const e=Math.min(this.reconnectDelay*Math.pow(2,this.reconnectAttempts-1),3e4);console.log(`Attempting to reconnect in ${e}ms (attempt ${this.reconnectAttempts})`),this.reconnectTimer=window.setTimeout((()=>{this.connect().catch((()=>{}))}),e)}}sendInitialMessage(){const e={instanceUid:this.instanceId,sequenceNum:++this.sequenceNum,agentDescription:{identifyingAttributes:[{key:"service.name",value:{stringValue:this.config.agentType}},{key:"service.version",value:{stringValue:this.config.agentVersion}}]},capabilities:BigInt(1)},t=o.proto.AgentToServer.create(e);this.sendMessage(t)}sendMessage(e){var t,n;if(this.ws&&this.ws.readyState===WebSocket.OPEN)try{const t=o.proto.AgentToServer.encode(e).finish();this.ws.send(t)}catch(e){r.diag.error("Error encoding/sending message:",e),null===(n=(t=this.config).onError)||void 0===n||n.call(t,new Error("Failed to send message"))}}handleServerMessage(e){var t,n,i,a;try{const i=o.proto.ServerToAgent.decode(new Uint8Array(e));if(!i.instance_uid.every(((e,t)=>e===this.instanceId[t])))return void r.diag.warn("Received message with mismatched instance ID");i.remote_config&&(null===(n=(t=this.config).onConfigChange)||void 0===n||n.call(t,i.remote_config))}catch(e){r.diag.error("Error decoding message:",e),null===(a=(i=this.config).onError)||void 0===a||a.call(i,new Error("Failed to decode server message"))}}async disconnect(){this.reconnectTimer&&(window.clearTimeout(this.reconnectTimer),this.reconnectTimer=null),this.ws&&(this.ws.close(),this.ws=null)}async reportStatus(e,t){const n={instanceUid:this.instanceId,sequenceNum:++this.sequenceNum,health:{healthy:e,startTimeUnixNano:BigInt(1e6*Date.now()),lastError:e?void 0:t,status:e?"healthy":"unhealthy",statusTimeUnixNano:BigInt(1e6*Date.now())}},r=o.proto.AgentToServer.create(n);this.sendMessage(r)}},$P}var $C,XC,ZC=(qC||(qC=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),F.__exportStar(JC(),e)}(JP)),JP),eM=dy(),tM={},nM={};var rM,oM,iM=function(){if(XC)return tM;XC=1,Object.defineProperty(tM,"__esModule",{value:!0}),tM.UserEvent=void 0;const e=Wt,t=RN(),n=iy(),r=($C||($C=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.USER_EVENT_TIMEOUT_HOURS=e.CURRENT_ACTIVE_EVENT_KEY=e.USER_EVENT_STORAGE_KEY=void 0,e.getStoredUserEvents=n,e.setStoredUserEvents=r,e.addStoredUserEvent=function(t){const o=n(),i={...t,expiresAt:Date.now()+60*e.USER_EVENT_TIMEOUT_HOURS*60*1e3};o.push(i),r(o)},e.removeStoredUserEvent=function(e){r(n().filter((t=>t.id!==e)))},e.getStoredUserEvent=function(e){return n().find((t=>t.id===e))},e.clearAllStoredUserEvents=function(){try{localStorage.removeItem(e.USER_EVENT_STORAGE_KEY),localStorage.removeItem(e.CURRENT_ACTIVE_EVENT_KEY)}catch(e){t.diag.error("Failed to clear user events from localStorage:",e)}},e.setCurrentActiveEventId=function(n){try{n?localStorage.setItem(e.CURRENT_ACTIVE_EVENT_KEY,n):localStorage.removeItem(e.CURRENT_ACTIVE_EVENT_KEY)}catch(e){t.diag.error("Failed to save current active event ID to localStorage:",e)}},e.getCurrentActiveEventId=function(){try{return localStorage.getItem(e.CURRENT_ACTIVE_EVENT_KEY)||void 0}catch(e){return void t.diag.error("Failed to read current active event ID from localStorage:",e)}};const t=Wt;function n(){try{const t=localStorage.getItem(e.USER_EVENT_STORAGE_KEY);if(!t)return[];const n=JSON.parse(t),o=Date.now(),i=n.filter((e=>e.expiresAt>o));return i.length!==n.length&&r(i),i}catch(e){return t.diag.error("Failed to read user events from localStorage:",e),[]}}function r(n){try{localStorage.setItem(e.USER_EVENT_STORAGE_KEY,JSON.stringify(n))}catch(e){t.diag.error("Failed to write user events to localStorage:",e)}}e.USER_EVENT_STORAGE_KEY="__imqa_user_events",e.CURRENT_ACTIVE_EVENT_KEY="__imqa_current_active_event",e.USER_EVENT_TIMEOUT_HOURS=2}(nM)),nM);return tM.UserEvent=class{constructor(e,t){this.activeEvents=new Map,this.contextManager=e,this.tracer=t,this.restoreStoredEvents()}setTracer(e){this.tracer=e,this.restoreStoredEvents()}restoreStoredEvents(){if(!this.tracer)return;const t=(0,r.getStoredUserEvents)();for(const n of t){if(this.activeEvents.has(n.id))continue;const t=this.contextManager.active(),r=this.tracer.startSpan(n.name||`user-event-${n.id}`,{startTime:n.startTime}),o=e.trace.setSpan(t,r),i={id:n.id,context:o,startTime:n.startTime,name:n.name,attributes:{}};this.activeEvents.set(n.id,i)}const n=(0,r.getCurrentActiveEventId)();if(n&&this.activeEvents.has(n)){const e=this.activeEvents.get(n);e&&(this.currentActiveId=n,this.contextManager._currentContext=e.context,console.log("Restored current active event ID:",n))}}start(n,o){var i;if(!this.tracer)throw new Error("Tracer not available. Make sure IMQA is initialized.");const a=(0,t.generateId)(16),s=Date.now(),c=this.currentActiveId&&(null===(i=this.activeEvents.get(this.currentActiveId))||void 0===i?void 0:i.context)||this.contextManager.active(),u=this.tracer.startSpan(n||`user-event-${a}`,{startTime:s,attributes:{...o,"user_event.id":a,"user_event.name":n||`user-event-${a}`}}),l=e.trace.setSpan(c,u),p={id:a,context:l,startTime:s,name:n,attributes:o};return this.activeEvents.set(a,p),(0,r.addStoredUserEvent)({id:a,name:n,startTime:s,spanId:u.spanContext().spanId,traceId:u.spanContext().traceId}),this.currentActiveId=a,this.contextManager._currentContext=l,(0,r.setCurrentActiveEventId)(a),console.log(`[UserEvent] Started event ${a} with context. All instrumentations will now use this context.`),a}end(t,o){let i=this.activeEvents.get(t);if(!i){const n=(0,r.getStoredUserEvent)(t);if(n&&this.tracer){const r=this.contextManager.active(),o=this.tracer.startSpan(n.name||`user-event-${n.id}`,{startTime:n.startTime}),a=e.trace.setSpan(r,o);i={id:n.id,context:a,startTime:n.startTime,name:n.name,attributes:{}},this.activeEvents.set(t,i)}}if(!i)return void console.warn(`[UserEvent] No active user event found with id: ${t}`);const a=Date.now(),s=a-i.startTime,c=e.trace.getSpan(i.context);if(c&&(o&&c.setAttributes(o),c.setAttributes({[n.ATTR_IMQA_SPAN_TYPE]:"user_event","user_event.duration_ms":s,"user_event.end_time":a,"user_event.status":"completed"}),c.end(a)),this.activeEvents.delete(t),(0,r.removeStoredUserEvent)(t),this.currentActiveId===t){const n=Array.from(this.activeEvents.keys());if(n.length>0){const e=n[n.length-1],o=this.activeEvents.get(e);o&&(this.currentActiveId=e,this.contextManager._currentContext=o.context,(0,r.setCurrentActiveEventId)(e),console.log(`[UserEvent] Ended event ${t}, switched to event ${e}`))}else this.currentActiveId=void 0,this.contextManager._currentContext=e.ROOT_CONTEXT,(0,r.setCurrentActiveEventId)(void 0),console.log(`[UserEvent] Ended event ${t}, no more active events. Context reset to ROOT.`)}else console.log(`[UserEvent] Ended non-active event ${t}`)}getActive(){if(this.currentActiveId)return this.activeEvents.get(this.currentActiveId)}getActiveContext(){if(!this.currentActiveId)return e.ROOT_CONTEXT;const t=this.activeEvents.get(this.currentActiveId);return(null==t?void 0:t.context)||e.ROOT_CONTEXT}getContext(e){const t=this.activeEvents.get(e);return null==t?void 0:t.context}hasActiveUserEvent(){return void 0!==this.currentActiveId&&this.activeEvents.has(this.currentActiveId)}with(e,t){const n=this.activeEvents.get(e);if(!n)return console.warn(`[UserEvent] No active user event found with id: ${e}. Executing with current context.`),t();const r=this.currentActiveId,o=this.contextManager.active();try{return this.currentActiveId=e,this.contextManager._currentContext=n.context,this.contextManager.with(n.context,t)}finally{this.currentActiveId=r,this.contextManager._currentContext=o}}withActive(e){return this.currentActiveId?this.with(this.currentActiveId,e):(console.warn("[UserEvent] No active user event. Executing with current context."),e())}switchTo(e){const t=this.activeEvents.get(e);t?(this.currentActiveId=e,this.contextManager._currentContext=t.context,(0,r.setCurrentActiveEventId)(e),console.log(`[UserEvent] Switched context to event ${e}`)):console.warn(`[UserEvent] Cannot switch to user event ${e}: not found`)}cancel(t){const n=this.activeEvents.get(t);if(!n)return void console.warn(`UserEvent: No active user event found with id: ${t}`);const o=e.trace.getSpan(n.context);o&&(o.setAttributes({"user_event.cancelled":!0}),o.end(n.startTime)),this.activeEvents.delete(t),(0,r.removeStoredUserEvent)(t),this.currentActiveId===t&&(this.currentActiveId=void 0,this.contextManager._currentContext=e.ROOT_CONTEXT,(0,r.setCurrentActiveEventId)(void 0))}hasActiveEvents(){return this.activeEvents.size>0}getActiveEventIds(){return Array.from(this.activeEvents.keys())}hasStoredEvent(e){return void 0!==(0,r.getStoredUserEvent)(e)}getStoredEvents(){return(0,r.getStoredUserEvents)().map((e=>({id:e.id,name:e.name,startTime:e.startTime})))}hasAnyStoredEvents(){return(0,r.getStoredUserEvents)().length>0}cleanup(){(0,r.clearAllStoredUserEvents)()}},tM}(),aM=iy();!function(e){e[e.DELTA=0]="DELTA",e[e.CUMULATIVE=1]="CUMULATIVE"}(rM||(rM={})),function(e){e[e.HISTOGRAM=0]="HISTOGRAM",e[e.EXPONENTIAL_HISTOGRAM=1]="EXPONENTIAL_HISTOGRAM",e[e.GAUGE=2]="GAUGE",e[e.SUM=3]="SUM"}(oM||(oM={}));var sM,cM=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),uM=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},lM=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))},pM=function(e){function t(n){var r=e.call(this,n)||this;return Object.setPrototypeOf(r,t.prototype),r}return cM(t,e),t}(Error);function dM(e,t){var n,r=new Promise((function(e,r){n=setTimeout((function(){r(new pM("Operation timed out."))}),t)}));return Promise.race([e,r]).then((function(e){return clearTimeout(n),e}),(function(e){throw clearTimeout(n),e}))}function fM(e,t){var n=[];return e.forEach((function(e){n.push.apply(n,lM([],uM(t(e)),!1))})),n}!function(e){e[e.DROP=0]="DROP",e[e.SUM=1]="SUM",e[e.LAST_VALUE=2]="LAST_VALUE",e[e.HISTOGRAM=3]="HISTOGRAM",e[e.EXPONENTIAL_HISTOGRAM=4]="EXPONENTIAL_HISTOGRAM"}(sM||(sM={}));var hM,mM=function(){function e(){this.kind=sM.DROP}return e.prototype.createAccumulation=function(){},e.prototype.merge=function(e,t){},e.prototype.diff=function(e,t){},e.prototype.toMetricData=function(e,t,n,r){},e}();!function(e){e.COUNTER="COUNTER",e.GAUGE="GAUGE",e.HISTOGRAM="HISTOGRAM",e.UP_DOWN_COUNTER="UP_DOWN_COUNTER",e.OBSERVABLE_COUNTER="OBSERVABLE_COUNTER",e.OBSERVABLE_GAUGE="OBSERVABLE_GAUGE",e.OBSERVABLE_UP_DOWN_COUNTER="OBSERVABLE_UP_DOWN_COUNTER"}(hM||(hM={}));var gM=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a};var _M=function(){function e(e,t,n,r){var o,i;void 0===n&&(n=!0),void 0===r&&((i=(o=t).map((function(){return 0}))).push(0),r={buckets:{boundaries:o,counts:i},sum:0,count:0,hasMinMax:!1,min:1/0,max:-1/0}),this.startTime=e,this._boundaries=t,this._recordMinMax=n,this._current=r}return e.prototype.record=function(e){if(!Number.isNaN(e)){this._current.count+=1,this._current.sum+=e,this._recordMinMax&&(this._current.min=Math.min(e,this._current.min),this._current.max=Math.max(e,this._current.max),this._current.hasMinMax=!0);var t=function(e,t){for(var n=0,r=e.length-1,o=e.length;r>=n;){var i=n+Math.trunc((r-n)/2);e[i]<t?n=i+1:(o=i,r=i-1)}return o}(this._boundaries,e);this._current.buckets.counts[t]+=1}},e.prototype.setStartTime=function(e){this.startTime=e},e.prototype.toPointValue=function(){return this._current},e}(),yM=function(){function e(e,t){this._boundaries=e,this._recordMinMax=t,this.kind=sM.HISTOGRAM}return e.prototype.createAccumulation=function(e){return new _M(e,this._boundaries,this._recordMinMax)},e.prototype.merge=function(e,t){for(var n=e.toPointValue(),r=t.toPointValue(),o=n.buckets.counts,i=r.buckets.counts,a=new Array(o.length),s=0;s<o.length;s++)a[s]=o[s]+i[s];var c=1/0,u=-1/0;return this._recordMinMax&&(n.hasMinMax&&r.hasMinMax?(c=Math.min(n.min,r.min),u=Math.max(n.max,r.max)):n.hasMinMax?(c=n.min,u=n.max):r.hasMinMax&&(c=r.min,u=r.max)),new _M(e.startTime,n.buckets.boundaries,this._recordMinMax,{buckets:{boundaries:n.buckets.boundaries,counts:a},count:n.count+r.count,sum:n.sum+r.sum,hasMinMax:this._recordMinMax&&(n.hasMinMax||r.hasMinMax),min:c,max:u})},e.prototype.diff=function(e,t){for(var n=e.toPointValue(),r=t.toPointValue(),o=n.buckets.counts,i=r.buckets.counts,a=new Array(o.length),s=0;s<o.length;s++)a[s]=i[s]-o[s];return new _M(t.startTime,n.buckets.boundaries,this._recordMinMax,{buckets:{boundaries:n.buckets.boundaries,counts:a},count:r.count-n.count,sum:r.sum-n.sum,hasMinMax:!1,min:1/0,max:-1/0})},e.prototype.toMetricData=function(e,t,n,r){return{descriptor:e,aggregationTemporality:t,dataPointType:oM.HISTOGRAM,dataPoints:n.map((function(t){var n=gM(t,2),o=n[0],i=n[1],a=i.toPointValue(),s=e.type===hM.GAUGE||e.type===hM.UP_DOWN_COUNTER||e.type===hM.OBSERVABLE_GAUGE||e.type===hM.OBSERVABLE_UP_DOWN_COUNTER;return{attributes:o,startTime:i.startTime,endTime:r,value:{min:a.hasMinMax?a.min:void 0,max:a.hasMinMax?a.max:void 0,sum:s?void 0:a.sum,buckets:a.buckets,count:a.count}}}))}},e}(),vM=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},bM=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))},EM=function(){function e(e,t,n,r){void 0===e&&(e=new SM),void 0===t&&(t=0),void 0===n&&(n=0),void 0===r&&(r=0),this.backing=e,this.indexBase=t,this.indexStart=n,this.indexEnd=r}return Object.defineProperty(e.prototype,"offset",{get:function(){return this.indexStart},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"length",{get:function(){return 0===this.backing.length||this.indexEnd===this.indexStart&&0===this.at(0)?0:this.indexEnd-this.indexStart+1},enumerable:!1,configurable:!0}),e.prototype.counts=function(){var e=this;return Array.from({length:this.length},(function(t,n){return e.at(n)}))},e.prototype.at=function(e){var t=this.indexBase-this.indexStart;return e<t&&(e+=this.backing.length),e-=t,this.backing.countAt(e)},e.prototype.incrementBucket=function(e,t){this.backing.increment(e,t)},e.prototype.decrementBucket=function(e,t){this.backing.decrement(e,t)},e.prototype.trim=function(){for(var e=0;e<this.length;e++){if(0!==this.at(e)){this.indexStart+=e;break}if(e===this.length-1)return void(this.indexStart=this.indexEnd=this.indexBase=0)}for(e=this.length-1;e>=0;e--)if(0!==this.at(e)){this.indexEnd-=this.length-e-1;break}this._rotate()},e.prototype.downscale=function(e){this._rotate();for(var t=1+this.indexEnd-this.indexStart,n=1<<e,r=0,o=0,i=this.indexStart;i<=this.indexEnd;){var a=i%n;a<0&&(a+=n);for(var s=a;s<n&&r<t;s++)this._relocateBucket(o,r),r++,i++;o++}this.indexStart>>=e,this.indexEnd>>=e,this.indexBase=this.indexStart},e.prototype.clone=function(){return new e(this.backing.clone(),this.indexBase,this.indexStart,this.indexEnd)},e.prototype._rotate=function(){var e=this.indexBase-this.indexStart;0!==e&&(e>0?(this.backing.reverse(0,this.backing.length),this.backing.reverse(0,e),this.backing.reverse(e,this.backing.length)):(this.backing.reverse(0,this.backing.length),this.backing.reverse(0,this.backing.length+e)),this.indexBase=this.indexStart)},e.prototype._relocateBucket=function(e,t){e!==t&&this.incrementBucket(e,this.backing.emptyBucket(t))},e}(),SM=function(){function e(e){void 0===e&&(e=[0]),this._counts=e}return Object.defineProperty(e.prototype,"length",{get:function(){return this._counts.length},enumerable:!1,configurable:!0}),e.prototype.countAt=function(e){return this._counts[e]},e.prototype.growTo=function(e,t,n){var r=new Array(e).fill(0);r.splice.apply(r,bM([n,this._counts.length-t],vM(this._counts.slice(t)),!1)),r.splice.apply(r,bM([0,t],vM(this._counts.slice(0,t)),!1)),this._counts=r},e.prototype.reverse=function(e,t){for(var n=Math.floor((e+t)/2)-e,r=0;r<n;r++){var o=this._counts[e+r];this._counts[e+r]=this._counts[t-r-1],this._counts[t-r-1]=o}},e.prototype.emptyBucket=function(e){var t=this._counts[e];return this._counts[e]=0,t},e.prototype.increment=function(e,t){this._counts[e]+=t},e.prototype.decrement=function(e,t){this._counts[e]>=t?this._counts[e]-=t:this._counts[e]=0},e.prototype.clone=function(){return new e(bM([],vM(this._counts),!1))},e}(),TM=Math.pow(2,-1022);function OM(e){var t=new DataView(new ArrayBuffer(8));return t.setFloat64(0,e),((2146435072&t.getUint32(0))>>20)-1023}function AM(e){var t=new DataView(new ArrayBuffer(8));t.setFloat64(0,e);var n=t.getUint32(0),r=t.getUint32(4);return(1048575&n)*Math.pow(2,32)+r}function wM(e,t){return 0===e||e===Number.POSITIVE_INFINITY||e===Number.NEGATIVE_INFINITY||Number.isNaN(e)?e:e*Math.pow(2,t)}var RM=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),NM=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return RM(t,e),t}(Error),IM=function(){function e(e){this._shift=-e}return e.prototype.mapToIndex=function(e){return e<TM?this._minNormalLowerBoundaryIndex():OM(e)+this._rightShift(AM(e)-1,52)>>this._shift},e.prototype.lowerBoundary=function(e){var t=this._minNormalLowerBoundaryIndex();if(e<t)throw new NM("underflow: "+e+" is < minimum lower boundary: "+t);var n=this._maxNormalLowerBoundaryIndex();if(e>n)throw new NM("overflow: "+e+" is > maximum lower boundary: "+n);return wM(1,e<<this._shift)},Object.defineProperty(e.prototype,"scale",{get:function(){return 0===this._shift?0:-this._shift},enumerable:!1,configurable:!0}),e.prototype._minNormalLowerBoundaryIndex=function(){var e=-1022>>this._shift;return this._shift<2&&e--,e},e.prototype._maxNormalLowerBoundaryIndex=function(){return 1023>>this._shift},e.prototype._rightShift=function(e,t){return Math.floor(e*Math.pow(2,-t))},e}(),PM=function(){function e(e){this._scale=e,this._scaleFactor=wM(Math.LOG2E,e),this._inverseFactor=wM(Math.LN2,-e)}return e.prototype.mapToIndex=function(e){if(e<=TM)return this._minNormalLowerBoundaryIndex()-1;if(0===AM(e))return(OM(e)<<this._scale)-1;var t=Math.floor(Math.log(e)*this._scaleFactor),n=this._maxNormalLowerBoundaryIndex();return t>=n?n:t},e.prototype.lowerBoundary=function(e){var t=this._maxNormalLowerBoundaryIndex();if(e>=t){if(e===t)return 2*Math.exp((e-(1<<this._scale))/this._scaleFactor);throw new NM("overflow: "+e+" is > maximum lower boundary: "+t)}var n=this._minNormalLowerBoundaryIndex();if(e<=n){if(e===n)return TM;if(e===n-1)return Math.exp((e+(1<<this._scale))/this._scaleFactor)/2;throw new NM("overflow: "+e+" is < minimum lower boundary: "+n)}return Math.exp(e*this._inverseFactor)},Object.defineProperty(e.prototype,"scale",{get:function(){return this._scale},enumerable:!1,configurable:!0}),e.prototype._minNormalLowerBoundaryIndex=function(){return-1022<<this._scale},e.prototype._maxNormalLowerBoundaryIndex=function(){return(1024<<this._scale)-1},e}(),xM=Array.from({length:31},(function(e,t){return t>10?new PM(t-10):new IM(t-10)}));function CM(e){if(e>20||e<-10)throw new NM("expected scale >= -10 && <= 20, got: "+e);return xM[e+10]}var MM,LM,UM,kM,DM,jM,BM,VM,FM,GM,HM,YM,qM,zM,KM,WM,QM,JM,$M,XM,ZM,eL,tL,nL,rL=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},oL=function(){function e(e,t){this.low=e,this.high=t}return e.combine=function(t,n){return new e(Math.min(t.low,n.low),Math.max(t.high,n.high))},e}(),iL=function(){function e(e,t,n,r,o,i,a,s,c,u,l){void 0===t&&(t=160),void 0===n&&(n=!0),void 0===r&&(r=0),void 0===o&&(o=0),void 0===i&&(i=0),void 0===a&&(a=Number.POSITIVE_INFINITY),void 0===s&&(s=Number.NEGATIVE_INFINITY),void 0===c&&(c=new EM),void 0===u&&(u=new EM),void 0===l&&(l=CM(20)),this.startTime=e,this._maxSize=t,this._recordMinMax=n,this._sum=r,this._count=o,this._zeroCount=i,this._min=a,this._max=s,this._positive=c,this._negative=u,this._mapping=l,this._maxSize<2&&(Nt.warn("Exponential Histogram Max Size set to "+this._maxSize+",                 changing to the minimum size of: 2"),this._maxSize=2)}return e.prototype.record=function(e){this.updateByIncrement(e,1)},e.prototype.setStartTime=function(e){this.startTime=e},e.prototype.toPointValue=function(){return{hasMinMax:this._recordMinMax,min:this.min,max:this.max,sum:this.sum,positive:{offset:this.positive.offset,bucketCounts:this.positive.counts()},negative:{offset:this.negative.offset,bucketCounts:this.negative.counts()},count:this.count,scale:this.scale,zeroCount:this.zeroCount}},Object.defineProperty(e.prototype,"sum",{get:function(){return this._sum},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"min",{get:function(){return this._min},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"max",{get:function(){return this._max},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"count",{get:function(){return this._count},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"zeroCount",{get:function(){return this._zeroCount},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"scale",{get:function(){return this._count===this._zeroCount?0:this._mapping.scale},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"positive",{get:function(){return this._positive},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"negative",{get:function(){return this._negative},enumerable:!1,configurable:!0}),e.prototype.updateByIncrement=function(e,t){Number.isNaN(e)||(e>this._max&&(this._max=e),e<this._min&&(this._min=e),this._count+=t,0!==e?(this._sum+=e*t,e>0?this._updateBuckets(this._positive,e,t):this._updateBuckets(this._negative,-e,t)):this._zeroCount+=t)},e.prototype.merge=function(e){0===this._count?(this._min=e.min,this._max=e.max):0!==e.count&&(e.min<this.min&&(this._min=e.min),e.max>this.max&&(this._max=e.max)),this.startTime=e.startTime,this._sum+=e.sum,this._count+=e.count,this._zeroCount+=e.zeroCount;var t=this._minScale(e);this._downscale(this.scale-t),this._mergeBuckets(this.positive,e,e.positive,t),this._mergeBuckets(this.negative,e,e.negative,t)},e.prototype.diff=function(e){this._min=1/0,this._max=-1/0,this._sum-=e.sum,this._count-=e.count,this._zeroCount-=e.zeroCount;var t=this._minScale(e);this._downscale(this.scale-t),this._diffBuckets(this.positive,e,e.positive,t),this._diffBuckets(this.negative,e,e.negative,t)},e.prototype.clone=function(){return new e(this.startTime,this._maxSize,this._recordMinMax,this._sum,this._count,this._zeroCount,this._min,this._max,this.positive.clone(),this.negative.clone(),this._mapping)},e.prototype._updateBuckets=function(e,t,n){var r=this._mapping.mapToIndex(t),o=!1,i=0,a=0;if(0===e.length?(e.indexStart=r,e.indexEnd=e.indexStart,e.indexBase=e.indexStart):r<e.indexStart&&e.indexEnd-r>=this._maxSize?(o=!0,a=r,i=e.indexEnd):r>e.indexEnd&&r-e.indexStart>=this._maxSize&&(o=!0,a=e.indexStart,i=r),o){var s=this._changeScale(i,a);this._downscale(s),r=this._mapping.mapToIndex(t)}this._incrementIndexBy(e,r,n)},e.prototype._incrementIndexBy=function(e,t,n){if(0!==n){if(0===e.length&&(e.indexStart=e.indexEnd=e.indexBase=t),t<e.indexStart)(r=e.indexEnd-t)>=e.backing.length&&this._grow(e,r+1),e.indexStart=t;else if(t>e.indexEnd){var r;(r=t-e.indexStart)>=e.backing.length&&this._grow(e,r+1),e.indexEnd=t}var o=t-e.indexBase;o<0&&(o+=e.backing.length),e.incrementBucket(o,n)}},e.prototype._grow=function(e,t){var n,r=e.backing.length,o=e.indexBase-e.indexStart,i=r-o,a=(n=t,n--,n|=n>>1,n|=n>>2,n|=n>>4,n|=n>>8,n|=n>>16,++n);a>this._maxSize&&(a=this._maxSize);var s=a-o;e.backing.growTo(a,i,s)},e.prototype._changeScale=function(e,t){for(var n=0;e-t>=this._maxSize;)e>>=1,t>>=1,n++;return n},e.prototype._downscale=function(e){if(0!==e){if(e<0)throw new Error("impossible change of scale: "+this.scale);var t=this._mapping.scale-e;this._positive.downscale(e),this._negative.downscale(e),this._mapping=CM(t)}},e.prototype._minScale=function(e){var t=Math.min(this.scale,e.scale),n=oL.combine(this._highLowAtScale(this.positive,this.scale,t),this._highLowAtScale(e.positive,e.scale,t)),r=oL.combine(this._highLowAtScale(this.negative,this.scale,t),this._highLowAtScale(e.negative,e.scale,t));return Math.min(t-this._changeScale(n.high,n.low),t-this._changeScale(r.high,r.low))},e.prototype._highLowAtScale=function(e,t,n){if(0===e.length)return new oL(0,-1);var r=t-n;return new oL(e.indexStart>>r,e.indexEnd>>r)},e.prototype._mergeBuckets=function(e,t,n,r){for(var o=n.offset,i=t.scale-r,a=0;a<n.length;a++)this._incrementIndexBy(e,o+a>>i,n.at(a))},e.prototype._diffBuckets=function(e,t,n,r){for(var o=n.offset,i=t.scale-r,a=0;a<n.length;a++){var s=(o+a>>i)-e.indexBase;s<0&&(s+=e.backing.length),e.decrementBucket(s,n.at(a))}e.trim()},e}(),aL=function(){function e(e,t){this._maxSize=e,this._recordMinMax=t,this.kind=sM.EXPONENTIAL_HISTOGRAM}return e.prototype.createAccumulation=function(e){return new iL(e,this._maxSize,this._recordMinMax)},e.prototype.merge=function(e,t){var n=t.clone();return n.merge(e),n},e.prototype.diff=function(e,t){var n=t.clone();return n.diff(e),n},e.prototype.toMetricData=function(e,t,n,r){return{descriptor:e,aggregationTemporality:t,dataPointType:oM.EXPONENTIAL_HISTOGRAM,dataPoints:n.map((function(t){var n=rL(t,2),o=n[0],i=n[1],a=i.toPointValue(),s=e.type===hM.GAUGE||e.type===hM.UP_DOWN_COUNTER||e.type===hM.OBSERVABLE_GAUGE||e.type===hM.OBSERVABLE_UP_DOWN_COUNTER;return{attributes:o,startTime:i.startTime,endTime:r,value:{min:a.hasMinMax?a.min:void 0,max:a.hasMinMax?a.max:void 0,sum:s?void 0:a.sum,positive:{offset:a.positive.offset,bucketCounts:a.positive.bucketCounts},negative:{offset:a.negative.offset,bucketCounts:a.negative.bucketCounts},count:a.count,scale:a.scale,zeroCount:a.zeroCount}}}))}},e}(),sL=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},cL=function(){function e(e,t,n){void 0===t&&(t=0),void 0===n&&(n=[0,0]),this.startTime=e,this._current=t,this.sampleTime=n}return e.prototype.record=function(e){this._current=e,this.sampleTime=Wg(Date.now())},e.prototype.setStartTime=function(e){this.startTime=e},e.prototype.toPointValue=function(){return this._current},e}(),uL=function(){function e(){this.kind=sM.LAST_VALUE}return e.prototype.createAccumulation=function(e){return new cL(e)},e.prototype.merge=function(e,t){var n=e_(t.sampleTime)>=e_(e.sampleTime)?t:e;return new cL(e.startTime,n.toPointValue(),n.sampleTime)},e.prototype.diff=function(e,t){var n=e_(t.sampleTime)>=e_(e.sampleTime)?t:e;return new cL(t.startTime,n.toPointValue(),n.sampleTime)},e.prototype.toMetricData=function(e,t,n,r){return{descriptor:e,aggregationTemporality:t,dataPointType:oM.GAUGE,dataPoints:n.map((function(e){var t=sL(e,2),n=t[0],o=t[1];return{attributes:n,startTime:o.startTime,endTime:r,value:o.toPointValue()}}))}},e}(),lL=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},pL=function(){function e(e,t,n,r){void 0===n&&(n=0),void 0===r&&(r=!1),this.startTime=e,this.monotonic=t,this._current=n,this.reset=r}return e.prototype.record=function(e){this.monotonic&&e<0||(this._current+=e)},e.prototype.setStartTime=function(e){this.startTime=e},e.prototype.toPointValue=function(){return this._current},e}(),dL=function(){function e(e){this.monotonic=e,this.kind=sM.SUM}return e.prototype.createAccumulation=function(e){return new pL(e,this.monotonic)},e.prototype.merge=function(e,t){var n=e.toPointValue(),r=t.toPointValue();return t.reset?new pL(t.startTime,this.monotonic,r,t.reset):new pL(e.startTime,this.monotonic,n+r)},e.prototype.diff=function(e,t){var n=e.toPointValue(),r=t.toPointValue();return this.monotonic&&n>r?new pL(t.startTime,this.monotonic,r,!0):new pL(t.startTime,this.monotonic,r-n)},e.prototype.toMetricData=function(e,t,n,r){return{descriptor:e,aggregationTemporality:t,dataPointType:oM.SUM,dataPoints:n.map((function(e){var t=lL(e,2),n=t[0],o=t[1];return{attributes:n,startTime:o.startTime,endTime:r,value:o.toPointValue()}})),isMonotonic:this.monotonic}},e}(),fL=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),hL=function(){function e(){}return e.Drop=function(){return SL},e.Sum=function(){return TL},e.LastValue=function(){return OL},e.Histogram=function(){return AL},e.ExponentialHistogram=function(){return wL},e.Default=function(){return RL},e}(),mL=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return fL(t,e),t.prototype.createAggregator=function(e){return t.DEFAULT_INSTANCE},t.DEFAULT_INSTANCE=new mM,t}(hL),gL=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return fL(t,e),t.prototype.createAggregator=function(e){switch(e.type){case hM.COUNTER:case hM.OBSERVABLE_COUNTER:case hM.HISTOGRAM:return t.MONOTONIC_INSTANCE;default:return t.NON_MONOTONIC_INSTANCE}},t.MONOTONIC_INSTANCE=new dL(!0),t.NON_MONOTONIC_INSTANCE=new dL(!1),t}(hL),_L=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return fL(t,e),t.prototype.createAggregator=function(e){return t.DEFAULT_INSTANCE},t.DEFAULT_INSTANCE=new uL,t}(hL),yL=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return fL(t,e),t.prototype.createAggregator=function(e){return t.DEFAULT_INSTANCE},t.DEFAULT_INSTANCE=new yM([0,5,10,25,50,75,100,250,500,750,1e3,2500,5e3,7500,1e4],!0),t}(hL),vL=function(e){function t(t,n){void 0===n&&(n=!0);var r=e.call(this)||this;if(r._recordMinMax=n,null==t)throw new Error("ExplicitBucketHistogramAggregation should be created with explicit boundaries, if a single bucket histogram is required, please pass an empty array");var o=(t=(t=t.concat()).sort((function(e,t){return e-t}))).lastIndexOf(-1/0),i=t.indexOf(1/0);return-1===i&&(i=void 0),r._boundaries=t.slice(o+1,i),r}return fL(t,e),t.prototype.createAggregator=function(e){return new yM(this._boundaries,this._recordMinMax)},t}(hL),bL=function(e){function t(t,n){void 0===t&&(t=160),void 0===n&&(n=!0);var r=e.call(this)||this;return r._maxSize=t,r._recordMinMax=n,r}return fL(t,e),t.prototype.createAggregator=function(e){return new aL(this._maxSize,this._recordMinMax)},t}(hL),EL=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return fL(t,e),t.prototype._resolve=function(e){switch(e.type){case hM.COUNTER:case hM.UP_DOWN_COUNTER:case hM.OBSERVABLE_COUNTER:case hM.OBSERVABLE_UP_DOWN_COUNTER:return TL;case hM.GAUGE:case hM.OBSERVABLE_GAUGE:return OL;case hM.HISTOGRAM:return e.advice.explicitBucketBoundaries?new vL(e.advice.explicitBucketBoundaries):AL}return Nt.warn("Unable to recognize instrument type: "+e.type),SL},t.prototype.createAggregator=function(e){return this._resolve(e).createAggregator(e)},t}(hL),SL=new mL,TL=new gL,OL=new _L,AL=new yL,wL=new bL,RL=new EL,NL=function(e){return hL.Default()},IL=function(e){return rM.CUMULATIVE},PL=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},xL=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},CL=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},ML=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))},LL=function(){function e(e){var t,n,r;this._shutdown=!1,this._aggregationSelector=null!==(t=null==e?void 0:e.aggregationSelector)&&void 0!==t?t:NL,this._aggregationTemporalitySelector=null!==(n=null==e?void 0:e.aggregationTemporalitySelector)&&void 0!==n?n:IL,this._metricProducers=null!==(r=null==e?void 0:e.metricProducers)&&void 0!==r?r:[],this._cardinalitySelector=null==e?void 0:e.cardinalitySelector}return e.prototype.setMetricProducer=function(e){if(this._sdkMetricProducer)throw new Error("MetricReader can not be bound to a MeterProvider again.");this._sdkMetricProducer=e,this.onInitialized()},e.prototype.selectAggregation=function(e){return this._aggregationSelector(e)},e.prototype.selectAggregationTemporality=function(e){return this._aggregationTemporalitySelector(e)},e.prototype.selectCardinalityLimit=function(e){return this._cardinalitySelector?this._cardinalitySelector(e):2e3},e.prototype.onInitialized=function(){},e.prototype.collect=function(e){return PL(this,void 0,void 0,(function(){var t,n,r,o,i,a;return xL(this,(function(s){switch(s.label){case 0:if(void 0===this._sdkMetricProducer)throw new Error("MetricReader is not bound to a MetricProducer");if(this._shutdown)throw new Error("MetricReader is shutdown");return[4,Promise.all(ML([this._sdkMetricProducer.collect({timeoutMillis:null==e?void 0:e.timeoutMillis})],CL(this._metricProducers.map((function(t){return t.collect({timeoutMillis:null==e?void 0:e.timeoutMillis})}))),!1))];case 1:return t=CL.apply(void 0,[s.sent()]),n=t[0],r=t.slice(1),o=n.errors.concat(fM(r,(function(e){return e.errors}))),i=n.resourceMetrics.resource,a=n.resourceMetrics.scopeMetrics.concat(fM(r,(function(e){return e.resourceMetrics.scopeMetrics}))),[2,{resourceMetrics:{resource:i,scopeMetrics:a},errors:o}]}}))}))},e.prototype.shutdown=function(e){return PL(this,void 0,void 0,(function(){return xL(this,(function(t){switch(t.label){case 0:return this._shutdown?(Nt.error("Cannot call shutdown twice."),[2]):null!=(null==e?void 0:e.timeoutMillis)?[3,2]:[4,this.onShutdown()];case 1:return t.sent(),[3,4];case 2:return[4,dM(this.onShutdown(),e.timeoutMillis)];case 3:t.sent(),t.label=4;case 4:return this._shutdown=!0,[2]}}))}))},e.prototype.forceFlush=function(e){return PL(this,void 0,void 0,(function(){return xL(this,(function(t){switch(t.label){case 0:return this._shutdown?(Nt.warn("Cannot forceFlush on already shutdown MetricReader."),[2]):null!=(null==e?void 0:e.timeoutMillis)?[3,2]:[4,this.onForceFlush()];case 1:case 3:return t.sent(),[2];case 2:return[4,dM(this.onForceFlush(),e.timeoutMillis)]}}))}))},e}(),UL=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),kL=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},DL=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},jL=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},BL=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))},VL=function(e){function t(t){var n,r,o,i,a=e.call(this,{aggregationSelector:null===(n=t.exporter.selectAggregation)||void 0===n?void 0:n.bind(t.exporter),aggregationTemporalitySelector:null===(r=t.exporter.selectAggregationTemporality)||void 0===r?void 0:r.bind(t.exporter),metricProducers:t.metricProducers})||this;if(void 0!==t.exportIntervalMillis&&t.exportIntervalMillis<=0)throw Error("exportIntervalMillis must be greater than 0");if(void 0!==t.exportTimeoutMillis&&t.exportTimeoutMillis<=0)throw Error("exportTimeoutMillis must be greater than 0");if(void 0!==t.exportTimeoutMillis&&void 0!==t.exportIntervalMillis&&t.exportIntervalMillis<t.exportTimeoutMillis)throw Error("exportIntervalMillis must be greater than or equal to exportTimeoutMillis");return a._exportInterval=null!==(o=t.exportIntervalMillis)&&void 0!==o?o:6e4,a._exportTimeout=null!==(i=t.exportTimeoutMillis)&&void 0!==i?i:3e4,a._exporter=t.exporter,a}return UL(t,e),t.prototype._runOnce=function(){return kL(this,void 0,void 0,(function(){var e;return DL(this,(function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,dM(this._doRun(),this._exportTimeout)];case 1:return t.sent(),[3,3];case 2:return(e=t.sent())instanceof pM?(Nt.error("Export took longer than %s milliseconds and timed out.",this._exportTimeout),[2]):(hg(e),[3,3]);case 3:return[2]}}))}))},t.prototype._doRun=function(){var e,t;return kL(this,void 0,void 0,(function(){var n,r,o,i,a,s;return DL(this,(function(c){switch(c.label){case 0:return[4,this.collect({timeoutMillis:this._exportTimeout})];case 1:if(n=c.sent(),r=n.resourceMetrics,(o=n.errors).length>0&&(s=Nt).error.apply(s,BL(["PeriodicExportingMetricReader: metrics collection errors"],jL(o),!1)),!r.resource.asyncAttributesPending)return[3,5];c.label=2;case 2:return c.trys.push([2,4,,5]),[4,null===(t=(e=r.resource).waitForAsyncAttributes)||void 0===t?void 0:t.call(e)];case 3:return c.sent(),[3,5];case 4:return i=c.sent(),Nt.debug("Error while resolving async portion of resource: ",i),hg(i),[3,5];case 5:return 0===r.scopeMetrics.length?[2]:[4,ey._export(this._exporter,r)];case 6:if((a=c.sent()).code!==qg.SUCCESS)throw new Error("PeriodicExportingMetricReader: metrics export failed (error "+a.error+")");return[2]}}))}))},t.prototype.onInitialized=function(){var e=this;this._interval=setInterval((function(){e._runOnce()}),this._exportInterval),this._interval},t.prototype.onForceFlush=function(){return kL(this,void 0,void 0,(function(){return DL(this,(function(e){switch(e.label){case 0:return[4,this._runOnce()];case 1:return e.sent(),[4,this._exporter.forceFlush()];case 2:return e.sent(),[2]}}))}))},t.prototype.onShutdown=function(){return kL(this,void 0,void 0,(function(){return DL(this,(function(e){switch(e.label){case 0:return this._interval&&clearInterval(this._interval),[4,this.onForceFlush()];case 1:return e.sent(),[4,this._exporter.shutdown()];case 2:return e.sent(),[2]}}))}))},t}(LL),FL={};function GL(){if(kM)return UM;kM=1;var t=function(){if(LM)return MM;LM=1;var t="object"==typeof e&&e&&e.Object===Object&&e;return MM=t}(),n="object"==typeof self&&self&&self.Object===Object&&self,r=t||n||Function("return this")();return UM=r}function HL(){if(jM)return DM;jM=1;var e=GL().Symbol;return DM=e}function YL(){if(YM)return HM;YM=1;var e=HL(),t=function(){if(VM)return BM;VM=1;var e=HL(),t=Object.prototype,n=t.hasOwnProperty,r=t.toString,o=e?e.toStringTag:void 0;return BM=function(e){var t=n.call(e,o),i=e[o];try{e[o]=void 0;var a=!0}catch(e){}var s=r.call(e);return a&&(t?e[o]=i:delete e[o]),s}}(),n=function(){if(GM)return FM;GM=1;var e=Object.prototype.toString;return FM=function(t){return e.call(t)}}(),r=e?e.toStringTag:void 0;return HM=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":r&&r in Object(e)?t(e):n(e)}}function qL(){if(WM)return KM;return WM=1,KM=function(e){return null!=e&&"object"==typeof e}}function zL(){if(JM)return QM;JM=1;var e=YL(),t=function(){if(zM)return qM;zM=1;var e=Array.isArray;return qM=e}(),n=qL();return QM=function(r){return"string"==typeof r||!t(r)&&n(r)&&"[object String]"==e(r)}}function KL(){if(eL)return ZM;eL=1;var e=(XM||(XM=1,$M=function(e,t){return function(n){return e(t(n))}}),$M),t=e(Object.getPrototypeOf,Object);return ZM=t}function WL(){if(nL)return tL;nL=1;var e=YL(),t=KL(),n=qL(),r=Function.prototype,o=Object.prototype,i=r.toString,a=o.hasOwnProperty,s=i.call(Object);return tL=function(r){if(!n(r)||"[object Object]"!=e(r))return!1;var o=t(r);if(null===o)return!0;var c=a.call(o,"constructor")&&o.constructor;return"function"==typeof c&&c instanceof c&&i.call(c)==s}}var QL,JL,$L={};var XL,ZL=function(){if(JL)return FL;JL=1,Object.defineProperty(FL,"__esModule",{value:!0}),FL.recordLog=function(e,o,l){const p=Date.now(),{tracer:d,logger:f,screenNameOption:h}=l||{},{screenNameType:m,urlWithSearchParams:g}=h||{screenNameType:"routeOnly",urlWithSearchParams:!1},_=(d||u).startSpan("custom-log",{startTime:p});_.setAttribute("component","log"),_.setAttribute(c.ATTR_IMQA_SPAN_TYPE,"log"),_.setAttribute(c.ATTR_IMQA_LOG_LEVEL,"info"),_.setAttribute(c.ATTR_IMQA_LOG_MESSAGE,(0,i.jsonToString)(e)),(0,a.spanResources)(_,h);const y=(0,n.default)(e)?e:(0,i.jsonToString)(e);null==f||f.emit({timestamp:p,severityText:"info",severityNumber:9,body:y,attributes:{component:"log",[c.ATTR_IMQA_SPAN_TYPE]:"log",[c.ATTR_IMQA_SESSION_ID]:(0,s.getRumSessionId)(),[c.ATTR_IMQA_SCREEN_NAME]:(0,a.getScreenName)({screenNameType:m,urlWithSearchParams:g}),[c.ATTR_IMQA_SCREEN_TYPE]:"page",[c.ATTR_IMQA_LOG_LEVEL]:"info",[c.ATTR_IMQA_LOG_MESSAGE]:(0,i.jsonToString)(e),...(0,r.default)(o)?o:{}},context:t.trace.setSpanContext(t.context.active(),_.spanContext())}),_.end(p)};const e=F,t=Wt,n=e.__importDefault(zL()),r=e.__importDefault(WL()),o=(QL||(QL=1,Object.defineProperty($L,"__esModule",{value:!0}),$L.VERSION=void 0,$L.VERSION="0.0.2"),$L),i=RN(),a=dy(),s=uy(),c=iy(),u=t.trace.getTracer("@imqa/custom-log",o.VERSION);return FL}(),eU="user-agent",tU="",nU="function",rU="undefined",oU="object",iU="string",aU="browser",sU="cpu",cU="device",uU="engine",lU="os",pU="result",dU="name",fU="type",hU="vendor",mU="version",gU="architecture",_U="major",yU="model",vU="console",bU="mobile",EU="tablet",SU="smarttv",TU="wearable",OU="xr",AU="embedded",wU="inapp",RU="brands",NU="formFactors",IU="fullVersionList",PU="platform",xU="platformVersion",CU="bitness",MU="sec-ch-ua",LU=MU+"-full-version-list",UU=MU+"-arch",kU=MU+"-"+CU,DU=MU+"-form-factors",jU=MU+"-"+bU,BU=MU+"-"+yU,VU=MU+"-"+PU,FU=VU+"-version",GU=[RU,IU,bU,yU,PU,xU,gU,NU,CU],HU="Amazon",YU="Apple",qU="ASUS",zU="BlackBerry",KU="Google",WU="Huawei",QU="Lenovo",JU="Honor",$U="LG",XU="Microsoft",ZU="Motorola",ek="Nvidia",tk="OnePlus",nk="OPPO",rk="Samsung",ok="Sharp",ik="Sony",ak="Xiaomi",sk="Zebra",ck="Chrome",uk="Chromium",lk="Chromecast",pk="Firefox",dk="Opera",fk="Facebook",hk="Sogou",mk="Mobile ",gk=" Browser",_k="Windows",yk=typeof window!==rU&&window.navigator?window.navigator:void 0,vk=yk&&yk.userAgentData?yk.userAgentData:void 0,bk=function(e){for(var t={},n=0;n<e.length;n++)t[e[n].toUpperCase()]=e[n];return t},Ek=function(e,t){if(typeof e===oU&&e.length>0){for(var n in e)if(Ak(e[n])==Ak(t))return!0;return!1}return!!Tk(e)&&-1!==Ak(t).indexOf(Ak(e))},Sk=function(e,t){for(var n in e)return/^(browser|cpu|device|engine|os)$/.test(n)||!!t&&Sk(e[n])},Tk=function(e){return typeof e===iU},Ok=function(e){if(e){for(var t=[],n=Nk(/\\?\"/g,e).split(","),r=0;r<n.length;r++)if(n[r].indexOf(";")>-1){var o=Pk(n[r]).split(";v=");t[r]={brand:o[0],version:o[1]}}else t[r]=Pk(n[r]);return t}},Ak=function(e){return Tk(e)?e.toLowerCase():e},wk=function(e){return Tk(e)?Nk(/[^\d\.]/g,e).split(".")[0]:void 0},Rk=function(e){for(var t in e){var n=e[t];typeof n==oU&&2==n.length?this[n[0]]=n[1]:this[n]=void 0}return this},Nk=function(e,t){return Tk(t)?t.replace(e,tU):t},Ik=function(e){return Nk(/\\?\"/g,e)},Pk=function(e,t){if(Tk(e))return e=Nk(/^\s\s*/,e),typeof t===rU?e:e.substring(0,500)},xk=function(e,t){if(e&&t)for(var n,r,o,i,a,s,c=0;c<t.length&&!a;){var u=t[c],l=t[c+1];for(n=r=0;n<u.length&&!a&&u[n];)if(a=u[n++].exec(e))for(o=0;o<l.length;o++)s=a[++r],typeof(i=l[o])===oU&&i.length>0?2===i.length?typeof i[1]==nU?this[i[0]]=i[1].call(this,s):this[i[0]]=i[1]:3===i.length?typeof i[1]!==nU||i[1].exec&&i[1].test?this[i[0]]=s?s.replace(i[1],i[2]):void 0:this[i[0]]=s?i[1].call(this,s,i[2]):void 0:4===i.length&&(this[i[0]]=s?i[3].call(this,s.replace(i[1],i[2])):void 0):this[i]=s||void 0;c+=2}},Ck=function(e,t){for(var n in t)if(typeof t[n]===oU&&t[n].length>0){for(var r=0;r<t[n].length;r++)if(Ek(t[n][r],e))return"?"===n?void 0:n}else if(Ek(t[n],e))return"?"===n?void 0:n;return t.hasOwnProperty("*")?t["*"]:e},Mk={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},Lk={embedded:"Automotive",mobile:"Mobile",tablet:["Tablet","EInk"],smarttv:"TV",wearable:"Watch",xr:["VR","XR"],"?":["Desktop","Unknown"],"*":void 0},Uk={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[mU,[dU,mk+"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[mU,[dU,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[dU,mU],[/opios[\/ ]+([\w\.]+)/i],[mU,[dU,dk+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[mU,[dU,dk+" GX"]],[/\bopr\/([\w\.]+)/i],[mU,[dU,dk]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[mU,[dU,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[mU,[dU,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon|otter|dooble|(?:lg |qute)browser)\/([-\w\.]+)/i,/(heytap|ovi|115|surf)browser\/([\d\.]+)/i,/(ecosia|weibo)(?:__| \w+@)([\d\.]+)/i],[dU,mU],[/quark(?:pc)?\/([-\w\.]+)/i],[mU,[dU,"Quark"]],[/\bddg\/([\w\.]+)/i],[mU,[dU,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[mU,[dU,"UCBrowser"]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[mU,[dU,"WeChat"]],[/konqueror\/([\w\.]+)/i],[mU,[dU,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[mU,[dU,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[mU,[dU,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[mU,[dU,"Smart "+QU+gk]],[/(avast|avg)\/([\w\.]+)/i],[[dU,/(.+)/,"$1 Secure"+gk],mU],[/\bfocus\/([\w\.]+)/i],[mU,[dU,pk+" Focus"]],[/\bopt\/([\w\.]+)/i],[mU,[dU,dk+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[mU,[dU,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[mU,[dU,"Dolphin"]],[/coast\/([\w\.]+)/i],[mU,[dU,dk+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[mU,[dU,"MIUI"+gk]],[/fxios\/([\w\.-]+)/i],[mU,[dU,mk+pk]],[/\bqihoobrowser\/?([\w\.]*)/i],[mU,[dU,"360"]],[/\b(qq)\/([\w\.]+)/i],[[dU,/(.+)/,"$1Browser"],mU],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[dU,/(.+)/,"$1"+gk],mU],[/samsungbrowser\/([\w\.]+)/i],[mU,[dU,rk+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[mU,[dU,hk+" Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[dU,hk+" Mobile"],mU],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[dU,mU],[/(lbbrowser|rekonq)/i],[dU],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[mU,dU],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[dU,fk],mU,[fU,wU]],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/(daum)apps[\/ ]([\w\.]+)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(instagram|snapchat)[\/ ]([-\w\.]+)/i],[dU,mU,[fU,wU]],[/\bgsa\/([\w\.]+) .*safari\//i],[mU,[dU,"GSA"],[fU,wU]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[mU,[dU,"TikTok"],[fU,wU]],[/\[(linkedin)app\]/i],[dU,[fU,wU]],[/(chromium)[\/ ]([-\w\.]+)/i],[dU,mU],[/headlesschrome(?:\/([\w\.]+)| )/i],[mU,[dU,ck+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[dU,ck+" WebView"],mU],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[mU,[dU,"Android"+gk]],[/chrome\/([\w\.]+) mobile/i],[mU,[dU,mk+"Chrome"]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[dU,mU],[/version\/([\w\.\,]+) .*mobile(?:\/\w+ | ?)safari/i],[mU,[dU,mk+"Safari"]],[/iphone .*mobile(?:\/\w+ | ?)safari/i],[[dU,mk+"Safari"]],[/version\/([\w\.\,]+) .*(safari)/i],[mU,dU],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[dU,[mU,"1"]],[/(webkit|khtml)\/([\w\.]+)/i],[dU,mU],[/(?:mobile|tablet);.*(firefox)\/([\w\.-]+)/i],[[dU,mk+pk],mU],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[dU,"Netscape"],mU],[/(wolvic|librewolf)\/([\w\.]+)/i],[dU,mU],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[mU,[dU,pk+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(amaya|dillo|doris|icab|ladybird|lynx|mosaic|netsurf|obigo|polaris|w3m|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/\b(links) \(([\w\.]+)/i],[dU,[mU,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[dU,[mU,/[^\d\.]+./,tU]]],cpu:[[/\b((amd|x|x86[-_]?|wow|win)64)\b/i],[[gU,"amd64"]],[/(ia32(?=;))/i,/\b((i[346]|x)86)(pc)?\b/i],[[gU,"ia32"]],[/\b(aarch64|arm(v?[89]e?l?|_?64))\b/i],[[gU,"arm64"]],[/\b(arm(v[67])?ht?n?[fl]p?)\b/i],[[gU,"armhf"]],[/( (ce|mobile); ppc;|\/[\w\.]+arm\b)/i],[[gU,"arm"]],[/((ppc|powerpc)(64)?)( mac|;|\))/i],[[gU,/ower/,tU,Ak]],[/ sun4\w[;\)]/i],[[gU,"sparc"]],[/\b(avr32|ia64(?=;)|68k(?=\))|\barm(?=v([1-7]|[5-7]1)l?|;|eabi)|(irix|mips|sparc)(64)?\b|pa-risc)/i],[[gU,Ak]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[yU,[hU,rk],[fU,EU]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[yU,[hU,rk],[fU,bU]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[yU,[hU,YU],[fU,bU]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[yU,[hU,YU],[fU,EU]],[/(macintosh);/i],[yU,[hU,YU]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[yU,[hU,ok],[fU,bU]],[/\b((?:brt|eln|hey2?|gdi|jdn)-a?[lnw]09|(?:ag[rm]3?|jdn2|kob2)-a?[lw]0[09]hn)(?: bui|\)|;)/i],[yU,[hU,JU],[fU,EU]],[/honor([-\w ]+)[;\)]/i],[yU,[hU,JU],[fU,bU]],[/\b((?:ag[rs][2356]?k?|bah[234]?|bg[2o]|bt[kv]|cmr|cpn|db[ry]2?|jdn2|got|kob2?k?|mon|pce|scm|sht?|[tw]gr|vrd)-[ad]?[lw][0125][09]b?|605hw|bg2-u03|(?:gem|fdr|m2|ple|t1)-[7a]0[1-4][lu]|t1-a2[13][lw]|mediapad[\w\. ]*(?= bui|\)))\b(?!.+d\/s)/i],[yU,[hU,WU],[fU,EU]],[/(?:huawei)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[yU,[hU,WU],[fU,bU]],[/oid[^\)]+; (2[\dbc]{4}(182|283|rp\w{2})[cgl]|m2105k81a?c)(?: bui|\))/i,/\b((?:red)?mi[-_ ]?pad[\w- ]*)(?: bui|\))/i],[[yU,/_/g," "],[hU,ak],[fU,EU]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i,/ ([\w ]+) miui\/v?\d/i],[[yU,/_/g," "],[hU,ak],[fU,bU]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[yU,[hU,nk],[fU,bU]],[/\b(opd2(\d{3}a?))(?: bui|\))/i],[yU,[hU,Ck,{OnePlus:["304","403","203"],"*":nk}],[fU,EU]],[/(vivo (5r?|6|8l?|go|one|s|x[il]?[2-4]?)[\w\+ ]*)(?: bui|\))/i],[yU,[hU,"BLU"],[fU,bU]],[/; vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[yU,[hU,"Vivo"],[fU,bU]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[yU,[hU,"Realme"],[fU,bU]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto(?! 360)[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[yU,[hU,ZU],[fU,bU]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[yU,[hU,ZU],[fU,EU]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[yU,[hU,$U],[fU,EU]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+(?!.*(?:browser|netcast|android tv|watch))(\w+)/i,/\blg-?([\d\w]+) bui/i],[yU,[hU,$U],[fU,bU]],[/(ideatab[-\w ]+|602lv|d-42a|a101lv|a2109a|a3500-hv|s[56]000|pb-6505[my]|tb-?x?\d{3,4}(?:f[cu]|xu|[av])|yt\d?-[jx]?\d+[lfmx])( bui|;|\)|\/)/i,/lenovo ?(b[68]0[08]0-?[hf]?|tab(?:[\w- ]+?)|tb[\w-]{6,7})( bui|;|\)|\/)/i],[yU,[hU,QU],[fU,EU]],[/(nokia) (t[12][01])/i],[hU,yU,[fU,EU]],[/(?:maemo|nokia).*(n900|lumia \d+|rm-\d+)/i,/nokia[-_ ]?(([-\w\. ]*))/i],[[yU,/_/g," "],[fU,bU],[hU,"Nokia"]],[/(pixel (c|tablet))\b/i],[yU,[hU,KU],[fU,EU]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[yU,[hU,KU],[fU,bU]],[/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[yU,[hU,ik],[fU,bU]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[yU,"Xperia Tablet"],[hU,ik],[fU,EU]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[yU,[hU,tk],[fU,bU]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[yU,[hU,HU],[fU,EU]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[yU,/(.+)/g,"Fire Phone $1"],[hU,HU],[fU,bU]],[/(playbook);[-\w\),; ]+(rim)/i],[yU,hU,[fU,EU]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[yU,[hU,zU],[fU,bU]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[yU,[hU,qU],[fU,EU]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[yU,[hU,qU],[fU,bU]],[/(nexus 9)/i],[yU,[hU,"HTC"],[fU,EU]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[hU,[yU,/_/g," "],[fU,bU]],[/tcl (xess p17aa)/i,/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])(_\w(\w|\w\w))?(\)| bui)/i],[yU,[hU,"TCL"],[fU,EU]],[/droid [\w\.]+; (418(?:7d|8v)|5087z|5102l|61(?:02[dh]|25[adfh]|27[ai]|56[dh]|59k|65[ah])|a509dl|t(?:43(?:0w|1[adepqu])|50(?:6d|7[adju])|6(?:09dl|10k|12b|71[efho]|76[hjk])|7(?:66[ahju]|67[hw]|7[045][bh]|71[hk]|73o|76[ho]|79w|81[hks]?|82h|90[bhsy]|99b)|810[hs]))(_\w(\w|\w\w))?(\)| bui)/i],[yU,[hU,"TCL"],[fU,bU]],[/(itel) ((\w+))/i],[[hU,Ak],yU,[fU,Ck,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[yU,[hU,"Acer"],[fU,EU]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[yU,[hU,"Meizu"],[fU,bU]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[yU,[hU,"Ulefone"],[fU,bU]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[yU,[hU,"Energizer"],[fU,bU]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[yU,[hU,"Cat"],[fU,bU]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[yU,[hU,"Smartfren"],[fU,bU]],[/droid.+; (a(?:015|06[35]|142p?))/i],[yU,[hU,"Nothing"],[fU,bU]],[/; (x67 5g|tikeasy \w+|ac[1789]\d\w+)( b|\))/i,/archos ?(5|gamepad2?|([\w ]*[t1789]|hello) ?\d+[\w ]*)( b|\))/i],[yU,[hU,"Archos"],[fU,EU]],[/archos ([\w ]+)( b|\))/i,/; (ac[3-6]\d\w{2,8})( b|\))/i],[yU,[hU,"Archos"],[fU,bU]],[/(imo) (tab \w+)/i,/(infinix) (x1101b?)/i],[hU,yU,[fU,EU]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus(?! zenw)|dell|jolla|meizu|motorola|polytron|infinix|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (blu|hmd|imo|tcl)[_ ]([\w\+ ]+?)(?: bui|\)|; r)/i,/(hp) ([\w ]+\w)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w ]+?)(?: bui|\)|\/)/i,/(oppo) ?([\w ]+) bui/i],[hU,yU,[fU,bU]],[/(kobo)\s(ereader|touch)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i],[hU,yU,[fU,EU]],[/(surface duo)/i],[yU,[hU,XU],[fU,EU]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[yU,[hU,"Fairphone"],[fU,bU]],[/((?:tegranote|shield t(?!.+d tv))[\w- ]*?)(?: b|\))/i],[yU,[hU,ek],[fU,EU]],[/(sprint) (\w+)/i],[hU,yU,[fU,bU]],[/(kin\.[onetw]{3})/i],[[yU,/\./g," "],[hU,XU],[fU,bU]],[/droid.+; ([c6]+|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[yU,[hU,sk],[fU,EU]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[yU,[hU,sk],[fU,bU]],[/smart-tv.+(samsung)/i],[hU,[fU,SU]],[/hbbtv.+maple;(\d+)/i],[[yU,/^/,"SmartTV"],[hU,rk],[fU,SU]],[/tcast.+(lg)e?. ([-\w]+)/i],[hU,yU,[fU,SU]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[hU,$U],[fU,SU]],[/(apple) ?tv/i],[hU,[yU,YU+" TV"],[fU,SU]],[/crkey.*devicetype\/chromecast/i],[[yU,lk+" Third Generation"],[hU,KU],[fU,SU]],[/crkey.*devicetype\/([^/]*)/i],[[yU,/^/,"Chromecast "],[hU,KU],[fU,SU]],[/fuchsia.*crkey/i],[[yU,lk+" Nest Hub"],[hU,KU],[fU,SU]],[/crkey/i],[[yU,lk],[hU,KU],[fU,SU]],[/(portaltv)/i],[yU,[hU,fk],[fU,SU]],[/droid.+aft(\w+)( bui|\))/i],[yU,[hU,HU],[fU,SU]],[/(shield \w+ tv)/i],[yU,[hU,ek],[fU,SU]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[yU,[hU,ok],[fU,SU]],[/(bravia[\w ]+)( bui|\))/i],[yU,[hU,ik],[fU,SU]],[/(mi(tv|box)-?\w+) bui/i],[yU,[hU,ak],[fU,SU]],[/Hbbtv.*(technisat) (.*);/i],[hU,yU,[fU,SU]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[hU,Pk],[yU,Pk],[fU,SU]],[/droid.+; ([\w- ]+) (?:android tv|smart[- ]?tv)/i],[yU,[fU,SU]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[fU,SU]],[/(ouya)/i,/(nintendo) (\w+)/i],[hU,yU,[fU,vU]],[/droid.+; (shield)( bui|\))/i],[yU,[hU,ek],[fU,vU]],[/(playstation \w+)/i],[yU,[hU,ik],[fU,vU]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[yU,[hU,XU],[fU,vU]],[/\b(sm-[lr]\d\d[0156][fnuw]?s?|gear live)\b/i],[yU,[hU,rk],[fU,TU]],[/((pebble))app/i,/(asus|google|lg|oppo) ((pixel |zen)?watch[\w ]*)( bui|\))/i],[hU,yU,[fU,TU]],[/(ow(?:19|20)?we?[1-3]{1,3})/i],[yU,[hU,nk],[fU,TU]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[yU,[hU,YU],[fU,TU]],[/(opwwe\d{3})/i],[yU,[hU,tk],[fU,TU]],[/(moto 360)/i],[yU,[hU,ZU],[fU,TU]],[/(smartwatch 3)/i],[yU,[hU,ik],[fU,TU]],[/(g watch r)/i],[yU,[hU,$U],[fU,TU]],[/droid.+; (wt63?0{2,3})\)/i],[yU,[hU,sk],[fU,TU]],[/droid.+; (glass) \d/i],[yU,[hU,KU],[fU,OU]],[/(pico) (4|neo3(?: link|pro)?)/i],[hU,yU,[fU,OU]],[/(quest( \d| pro)?s?).+vr/i],[yU,[hU,fk],[fU,OU]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[hU,[fU,AU]],[/(aeobc)\b/i],[yU,[hU,HU],[fU,AU]],[/(homepod).+mac os/i],[yU,[hU,YU],[fU,AU]],[/windows iot/i],[[fU,AU]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+?(mobile|vr|\d) safari/i],[yU,[fU,Ck,{mobile:"Mobile",xr:"VR","*":EU}]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[fU,EU]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[fU,bU]],[/droid .+?; ([\w\. -]+)( bui|\))/i],[yU,[hU,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[mU,[dU,"EdgeHTML"]],[/(arkweb)\/([\w\.]+)/i],[dU,mU],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[mU,[dU,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[dU,mU],[/ladybird\//i],[[dU,"LibWeb"]],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[mU,dU]],os:[[/microsoft (windows) (vista|xp)/i],[dU,mU],[/(windows (?:phone(?: os)?|mobile|iot))[\/ ]?([\d\.\w ]*)/i],[dU,[mU,Ck,Mk]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[mU,Ck,Mk],[dU,_k]],[/[adehimnop]{4,7}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[mU,/_/g,"."],[dU,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[dU,"macOS"],[mU,/_/g,"."]],[/android ([\d\.]+).*crkey/i],[mU,[dU,lk+" Android"]],[/fuchsia.*crkey\/([\d\.]+)/i],[mU,[dU,lk+" Fuchsia"]],[/crkey\/([\d\.]+).*devicetype\/smartspeaker/i],[mU,[dU,lk+" SmartSpeaker"]],[/linux.*crkey\/([\d\.]+)/i],[mU,[dU,lk+" Linux"]],[/crkey\/([\d\.]+)/i],[mU,[dU,lk]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[mU,dU],[/(ubuntu) ([\w\.]+) like android/i],[[dU,/(.+)/,"$1 Touch"],mU],[/(android|bada|blackberry|kaios|maemo|meego|openharmony|qnx|rim tablet os|sailfish|series40|symbian|tizen|webos)\w*[-\/\.; ]?([\d\.]*)/i],[dU,mU],[/\(bb(10);/i],[mU,[dU,zU]],[/(?:symbian ?os|symbos|s60(?=;)|series ?60)[-\/ ]?([\w\.]*)/i],[mU,[dU,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[mU,[dU,pk+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[mU,[dU,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[mU,[dU,"watchOS"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[dU,"Chrome OS"],mU],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) (\w+)/i,/(xbox); +xbox ([^\);]+)/i,/(pico) .+os([\w\.]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux)(?: arm\w*| x86\w*| ?)([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[dU,mU],[/(sunos) ?([\w\.\d]*)/i],[[dU,"Solaris"],mU],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[dU,mU]]},kk=(Rk.call((XL={init:{},isIgnore:{},isIgnoreRgx:{},toString:{}}).init,[[aU,[dU,mU,_U,fU]],[sU,[gU]],[cU,[fU,yU,hU]],[uU,[dU,mU]],[lU,[dU,mU]]]),Rk.call(XL.isIgnore,[[aU,[mU,_U]],[uU,[mU]],[lU,[mU]]]),Rk.call(XL.isIgnoreRgx,[[aU,/ ?browser$/i],[lU,/ ?os$/i]]),Rk.call(XL.toString,[[aU,[dU,mU]],[sU,[gU]],[cU,[hU,yU]],[uU,[dU,mU]],[lU,[dU,mU]]]),XL),Dk=function(e,t){var n=kk.init[t],r=kk.isIgnore[t]||0,o=kk.isIgnoreRgx[t]||0,i=kk.toString[t]||0;function a(){Rk.call(this,n)}return a.prototype.getItem=function(){return e},a.prototype.withClientHints=function(){return vk?vk.getHighEntropyValues(GU).then((function(t){return e.setCH(new jk(t,!1)).parseCH().get()})):e.parseCH().get()},a.prototype.withFeatureCheck=function(){return e.detectFeature().get()},t!=pU&&(a.prototype.is=function(e){var t=!1;for(var n in this)if(this.hasOwnProperty(n)&&!Ek(r,n)&&Ak(o?Nk(o,this[n]):this[n])==Ak(o?Nk(o,e):e)){if(t=!0,e!=rU)break}else if(e==rU&&t){t=!t;break}return t},a.prototype.toString=function(){var e=tU;for(var t in i)typeof this[i[t]]!==rU&&(e+=(e?" ":tU)+this[i[t]]);return e||rU}),vk||(a.prototype.then=function(e){var t=this,n=function(){for(var e in t)t.hasOwnProperty(e)&&(this[e]=t[e])};n.prototype={is:a.prototype.is,toString:a.prototype.toString};var r=new n;return e(r),r}),new a};function jk(e,t){if(e=e||{},Rk.call(this,GU),t)Rk.call(this,[[RU,Ok(e[MU])],[IU,Ok(e[LU])],[bU,/\?1/.test(e[jU])],[yU,Ik(e[BU])],[PU,Ik(e[VU])],[xU,Ik(e[FU])],[gU,Ik(e[UU])],[NU,Ok(e[DU])],[CU,Ik(e[kU])]]);else for(var n in e)this.hasOwnProperty(n)&&typeof e[n]!==rU&&(this[n]=e[n])}function Bk(e,t,n,r){return this.get=function(e){return e?this.data.hasOwnProperty(e)?this.data[e]:void 0:this.data},this.set=function(e,t){return this.data[e]=t,this},this.setCH=function(e){return this.uaCH=e,this},this.detectFeature=function(){if(yk&&yk.userAgent==this.ua)switch(this.itemType){case aU:yk.brave&&typeof yk.brave.isBrave==nU&&this.set(dU,"Brave");break;case cU:!this.get(fU)&&vk&&vk[bU]&&this.set(fU,bU),"Macintosh"==this.get(yU)&&yk&&typeof yk.standalone!==rU&&yk.maxTouchPoints&&yk.maxTouchPoints>2&&this.set(yU,"iPad").set(fU,EU);break;case lU:!this.get(dU)&&vk&&vk[PU]&&this.set(dU,vk[PU]);break;case pU:var e=this.data,t=function(t){return e[t].getItem().detectFeature().get()};this.set(aU,t(aU)).set(sU,t(sU)).set(cU,t(cU)).set(uU,t(uU)).set(lU,t(lU))}return this},this.parseUA=function(){return this.itemType!=pU&&xk.call(this.data,this.ua,this.rgxMap),this.itemType==aU&&this.set(_U,wk(this.get(mU))),this},this.parseCH=function(){var e=this.uaCH,t=this.rgxMap;switch(this.itemType){case aU:case uU:var n,r=e[IU]||e[RU];if(r)for(var o in r){var i=r[o].brand||r[o],a=r[o].version;this.itemType!=aU||/not.a.brand/i.test(i)||n&&(!/chrom/i.test(n)||i==uk)||(i=Ck(i,{Chrome:"Google Chrome",Edge:"Microsoft Edge","Chrome WebView":"Android WebView","Chrome Headless":"HeadlessChrome","Huawei Browser":"HuaweiBrowser","MIUI Browser":"Miui Browser","Opera Mobi":"OperaMobile",Yandex:"YaBrowser"}),this.set(dU,i).set(mU,a).set(_U,wk(a)),n=i),this.itemType==uU&&i==uk&&this.set(mU,a)}break;case sU:var s=e[gU];s&&(s&&"64"==e[CU]&&(s+="64"),xk.call(this.data,s+";",t));break;case cU:if(e[bU]&&this.set(fU,bU),e[yU]&&(this.set(yU,e[yU]),!this.get(fU)||!this.get(hU))){var c={};xk.call(c,"droid 9; "+e[yU]+")",t),!this.get(fU)&&c.type&&this.set(fU,c.type),!this.get(hU)&&c.vendor&&this.set(hU,c.vendor)}if(e[NU]){var u;if("string"!=typeof e[NU])for(var l=0;!u&&l<e[NU].length;)u=Ck(e[NU][l++],Lk);else u=Ck(e[NU],Lk);this.set(fU,u)}break;case lU:var p=e[PU];if(p){var d=e[xU];p==_k&&(d=parseInt(wk(d),10)>=13?"11":"10"),this.set(dU,p).set(mU,d)}this.get(dU)==_k&&"Xbox"==e[yU]&&this.set(dU,"Xbox").set(mU,void 0);break;case pU:var f=this.data,h=function(t){return f[t].getItem().setCH(e).parseCH().get()};this.set(aU,h(aU)).set(sU,h(sU)).set(cU,h(cU)).set(uU,h(uU)).set(lU,h(lU))}return this},Rk.call(this,[["itemType",e],["ua",t],["uaCH",r],["rgxMap",n],["data",Dk(this,e)]]),this}function Vk(e,t,n){if(typeof e===oU?(Sk(e,!0)?(typeof t===oU&&(n=t),t=e):(n=e,t=void 0),e=void 0):typeof e!==iU||Sk(t,!0)||(n=t,t=void 0),n&&typeof n.append===nU){var r={};n.forEach((function(e,t){r[t]=e})),n=r}if(!(this instanceof Vk))return new Vk(e,t,n).getResult();var o=typeof e===iU?e:n&&n[eU]?n[eU]:yk&&yk.userAgent?yk.userAgent:tU,i=new jk(n,!0),a=t?function(e,t){var n={},r=t;if(!Sk(t))for(var o in r={},t)for(var i in t[o])r[i]=t[o][i].concat(r[i]?r[i]:[]);for(var a in e)n[a]=r[a]&&r[a].length%2==0?r[a].concat(e[a]):e[a];return n}(Uk,t):Uk,s=function(e){return e==pU?function(){return new Bk(e,o,a,i).set("ua",o).set(aU,this.getBrowser()).set(sU,this.getCPU()).set(cU,this.getDevice()).set(uU,this.getEngine()).set(lU,this.getOS()).get()}:function(){return new Bk(e,o,a[e],i).parseUA().get()}};return Rk.call(this,[["getBrowser",s(aU)],["getCPU",s(sU)],["getDevice",s(cU)],["getEngine",s(uU)],["getOS",s(lU)],["getResult",s(pU)],["getUA",function(){return o}],["setUA",function(e){return Tk(e)&&(o=e.length>500?Pk(e,500):e),this}]]).setUA(o),this}Vk.VERSION="2.0.3",Vk.BROWSER=bk([dU,mU,_U,fU]),Vk.CPU=bk([gU]),Vk.DEVICE=bk([yU,hU,fU,vU,bU,SU,EU,TU,AU]),Vk.ENGINE=Vk.OS=bk([dU,mU]);const Fk=e=>{switch(e){case"wearable":case"mobile":return"mobile";case"tablet":return"tablet";default:return"desktop"}};var Gk,Hk={};!function(e){e.DOCUMENT_LOAD="documentLoad",e.DOCUMENT_FETCH="documentFetch",e.RESOURCE_FETCH="resourceFetch"}(Gk||(Gk={}));var Yk;!function(e){e.FIRST_PAINT="firstPaint",e.FIRST_CONTENTFUL_PAINT="firstContentfulPaint"}(Yk||(Yk={}));var qk,zk,Kk={"first-paint":Yk.FIRST_PAINT,"first-contentful-paint":Yk.FIRST_CONTENTFUL_PAINT},Wk=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Qk=function(e){function t(t){void 0===t&&(t={});var n=e.call(this,"@opentelemetry/instrumentation-document-load","0.44.1",t)||this;return n.component="document-load",n.version="1",n.moduleName=n.component,n}return Wk(t,e),t.prototype.init=function(){},t.prototype._onDocumentLoaded=function(){var e=this;window.setTimeout((function(){e._collectPerformance()}))},t.prototype._addResourcesSpans=function(e){var t,n,r=this,o=null===(n=(t=Fg).getEntriesByType)||void 0===n?void 0:n.call(t,"resource");o&&o.forEach((function(t){r._initResourceSpan(t,e)}))},t.prototype._collectPerformance=function(){var e=this,t=Array.from(document.getElementsByTagName("meta")).find((function(e){return e.getAttribute("name")===p_})),n=function(){var e,t,n={},r=null===(t=(e=Fg).getEntriesByType)||void 0===t?void 0:t.call(e,"navigation")[0];if(r)Object.values(GR).forEach((function(e){if(aN(r,e)){var t=r[e];"number"==typeof t&&(n[e]=t)}}));else{var o=Fg.timing;o&&Object.values(GR).forEach((function(e){if(aN(o,e)){var t=o[e];"number"==typeof t&&(n[e]=t)}}))}return n}(),r=t&&t.content||"";Rt.with(Ht.extract(_e,{traceparent:r}),(function(){var t,r=e._startSpan(Gk.DOCUMENT_LOAD,GR.FETCH_START,n);r&&(Rt.with(zt.setSpan(Rt.active(),r),(function(){var t=e._startSpan(Gk.DOCUMENT_FETCH,GR.FETCH_START,n);t&&(t.setAttribute(ea,location.href),Rt.with(zt.setSpan(Rt.active(),t),(function(){var r;e.getConfig().ignoreNetworkEvents||cN(t,n),e._addCustomAttributesOnSpan(t,null===(r=e.getConfig().applyCustomAttributesOnSpan)||void 0===r?void 0:r.documentFetch),e._endSpan(t,GR.RESPONSE_END,n)})))})),r.setAttribute(ea,location.href),r.setAttribute(aa,navigator.userAgent),e._addResourcesSpans(r),e.getConfig().ignoreNetworkEvents||(sN(r,GR.FETCH_START,n),sN(r,GR.UNLOAD_EVENT_START,n),sN(r,GR.UNLOAD_EVENT_END,n),sN(r,GR.DOM_INTERACTIVE,n),sN(r,GR.DOM_CONTENT_LOADED_EVENT_START,n),sN(r,GR.DOM_CONTENT_LOADED_EVENT_END,n),sN(r,GR.DOM_COMPLETE,n),sN(r,GR.LOAD_EVENT_START,n),sN(r,GR.LOAD_EVENT_END,n)),e.getConfig().ignorePerformancePaintEvents||function(e){var t,n,r=null===(n=(t=Fg).getEntriesByType)||void 0===n?void 0:n.call(t,"paint");r&&r.forEach((function(t){var n=t.name,r=t.startTime;aN(Kk,n)&&e.addEvent(Kk[n],r)}))}(r),e._addCustomAttributesOnSpan(r,null===(t=e.getConfig().applyCustomAttributesOnSpan)||void 0===t?void 0:t.documentLoad),e._endSpan(r,GR.LOAD_EVENT_END,n))}))},t.prototype._endSpan=function(e,t,n){e&&(aN(n,t)?e.end(n[t]):e.end())},t.prototype._initResourceSpan=function(e,t){var n,r=this._startSpan(Gk.RESOURCE_FETCH,GR.FETCH_START,e,t);r&&(r.setAttribute(ea,e.name),this.getConfig().ignoreNetworkEvents||cN(r,e),this._addCustomAttributesOnResourceSpan(r,e,null===(n=this.getConfig().applyCustomAttributesOnSpan)||void 0===n?void 0:n.resourceFetch),this._endSpan(r,GR.RESPONSE_END,e))},t.prototype._startSpan=function(e,t,n,r){if(aN(n,t)&&"number"==typeof n[t])return this.tracer.startSpan(e,{startTime:n[t]},r?zt.setSpan(Rt.active(),r):void 0)},t.prototype._waitForPageLoad=function(){"complete"===window.document.readyState?this._onDocumentLoaded():(this._onDocumentLoaded=this._onDocumentLoaded.bind(this),window.addEventListener("load",this._onDocumentLoaded))},t.prototype._addCustomAttributesOnSpan=function(e,t){var n=this;t&&En((function(){return t(e)}),(function(e){e&&n._diag.error("addCustomAttributesOnSpan",e)}),!0)},t.prototype._addCustomAttributesOnResourceSpan=function(e,t,n){var r=this;n&&En((function(){return n(e,t)}),(function(e){e&&r._diag.error("addCustomAttributesOnResourceSpan",e)}),!0)},t.prototype.enable=function(){window.removeEventListener("load",this._onDocumentLoaded),this._waitForPageLoad()},t.prototype.disable=function(){window.removeEventListener("load",this._onDocumentLoaded)},t}(gn),Jk=n(Object.freeze({__proto__:null,get AttributeNames(){return Gk},DocumentLoadInstrumentation:Qk})),$k={};function Xk(){if(qk)return $k;qk=1,Object.defineProperty($k,"__esModule",{value:!0}),$k.captureTraceParent=function(e,r){for(let o of e.split(",")){o=o.trim();const e=o.match(n);e&&t(e,r)}},$k.captureTraceParentFromPerformanceEntries=function(e,n){if(!e.serverTiming)return;for(const o of e.serverTiming)if("traceparent"===o.name&&o.description){const e=o.description.match(r);e&&t(e,n)}};const e=iy();function t(t,n){if(t&&t[1]&&t[2]){const r=t[1],o=t[2];n.setAttribute(e.ATTR_IMQA_LINK_TRACE_ID,r),n.setAttribute(e.ATTR_IMQA_LINK_SPAN_ID,o)}}const n=new RegExp("traceparent;desc=['\"]00-([0-9a-f]{32})-([0-9a-f]{16})-01['\"]");const r=new RegExp("00-([0-9a-f]{32})-([0-9a-f]{16})-01");return $k}var Zk=function(){if(zk)return Hk;zk=1,Object.defineProperty(Hk,"__esModule",{value:!0}),Hk.IMQADocumentLoadInstrumentation=void 0;const e=Jk,t=Xk(),n=ny,r=Km,o=dy(),i=iy(),a=["beacon","fetch","xmlhttprequest"];class s extends e.DocumentLoadInstrumentation{constructor(e={}){super(e);const{screenNameOption:s}=e,c=this,u=c._endSpan.bind(this);c._endSpan=(e,n,a)=>{var c;const l=e;if(e&&(e.setAttribute(i.ATTR_IMQA_RUM_COMPONENT,this.component),(0,o.spanResources)(e,s)),e&&"documentLoad"!==l.name){if(e.setAttribute(i.ATTR_IMQA_SPAN_TYPE,"render_child"),"documentFetch"===l.name&&!a.serverTiming&&performance.getEntriesByType){const e=performance.getEntriesByType("navigation");(null===(c=e[0])||void 0===c?void 0:c.serverTiming)&&(a.serverTiming=e[0].serverTiming)}(0,t.captureTraceParentFromPerformanceEntries)(a,e),e.setAttribute(r.ATTR_HTTP_REQUEST_METHOD,"GET")}return e&&"documentLoad"===l.name&&(e.setAttribute(i.ATTR_IMQA_SPAN_TYPE,"render"),function(e){document.referrer&&""!==document.referrer&&e.setAttribute(i.ATTR_IMQA_DOCUMENT_REFERRER,document.referrer),window.screen&&e.setAttribute(i.ATTR_IMQA_DOCUMENT_SCREEN_XY,window.screen.width+"x"+window.screen.height)}(e)),u(e,n,a)};const l=c._initResourceSpan.bind(this);c._initResourceSpan=(t,r)=>{-1!==a.indexOf(t.initiatorType)||(0,n.isUrlIgnored)(t.name,e.ignoreUrls)||l(t,r)}}}return Hk.IMQADocumentLoadInstrumentation=s,Hk}(),eD={},tD={},nD=function(){function e(e){this._delegate=e}return e.prototype.export=function(e,t){this._delegate.export(e,t)},e.prototype.forceFlush=function(){return this._delegate.forceFlush()},e.prototype.shutdown=function(){return this._delegate.shutdown()},e}(),rD=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),oD=function(e){function t(t,n,r){var o=e.call(this,t)||this;return o.name="OTLPExporterError",o.data=r,o.code=n,o}return rD(t,e),t}(Error);function iD(e){if(!Number.isNaN(e)&&Number.isFinite(e)&&e>0)return e;throw new Error("Configuration: timeoutMillis is invalid, expected number greater than 0 (actual: '"+e+"')")}function aD(e){if(null!=e)return function(){return e}}var sD=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},cD=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},uD=function(){function e(e){this._sendingPromises=[],this._concurrencyLimit=e}return e.prototype.pushPromise=function(e){var t=this;if(this.hasReachedLimit())throw new Error("Concurrency Limit reached");this._sendingPromises.push(e);var n=function(){var n=t._sendingPromises.indexOf(e);t._sendingPromises.splice(n,1)};e.then(n,n)},e.prototype.hasReachedLimit=function(){return this._sendingPromises.length>=this._concurrencyLimit},e.prototype.awaitAll=function(){return sD(this,void 0,void 0,(function(){return cD(this,(function(e){switch(e.label){case 0:return[4,Promise.all(this._sendingPromises)];case 1:return e.sent(),[2]}}))}))},e}();function lD(e){return new uD(e.concurrencyLimit)}function pD(){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&&Nt.warn("Received Partial Success response:",JSON.stringify(e.partialSuccess))}}}var dD=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},fD=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},hD=function(){function e(e,t,n,r,o){this._transport=e,this._serializer=t,this._responseHandler=n,this._promiseQueue=r,this._timeout=o,this._diagLogger=Nt.createComponentLogger({namespace:"OTLPExportDelegate"})}return e.prototype.export=function(e,t){var n=this;if(this._diagLogger.debug("items to be sent",e),this._promiseQueue.hasReachedLimit())t({code:qg.FAILED,error:new Error("Concurrent export limit reached")});else{var r=this._serializer.serializeRequest(e);null!=r?this._promiseQueue.pushPromise(this._transport.send(r,this._timeout).then((function(e){if("success"!==e.status)"failure"===e.status&&e.error?t({code:qg.FAILED,error:e.error}):"retryable"===e.status?t({code:qg.FAILED,error:new oD("Export failed with retryable status")}):t({code:qg.FAILED,error:new oD("Export failed with unknown error")});else{if(null!=e.data)try{n._responseHandler.handleResponse(n._serializer.deserializeResponse(e.data))}catch(t){n._diagLogger.warn("Export succeeded but could not deserialize response - is the response specification compliant?",t,e.data)}t({code:qg.SUCCESS})}}),(function(e){return t({code:qg.FAILED,error:e})}))):t({code:qg.FAILED,error:new Error("Nothing to send")})}},e.prototype.forceFlush=function(){return this._promiseQueue.awaitAll()},e.prototype.shutdown=function(){return dD(this,void 0,void 0,(function(){return fD(this,(function(e){switch(e.label){case 0:return this._diagLogger.debug("shutdown started"),[4,this.forceFlush()];case 1:return e.sent(),this._transport.shutdown(),[2]}}))}))},e}();function mD(e,t,n){return r={transport:n,serializer:t,promiseHandler:lD(e)},o={timeout:e.timeoutMillis},new hD(r.transport,r.serializer,pD(),r.promiseHandler,o.timeout);var r,o}var gD,_D,yD,vD,bD,ED,SD,TD,OD,AD,wD,RD={},ND={};function ID(){return yD||(yD=1,function(t){var n=t;function r(e,t,n){for(var r=Object.keys(t),o=0;o<r.length;++o)void 0!==e[r[o]]&&n||(e[r[o]]=t[r[o]]);return e}function o(e){function t(e,n){if(!(this instanceof t))return new t(e,n);Object.defineProperty(this,"message",{get:function(){return e}}),Error.captureStackTrace?Error.captureStackTrace(this,t):Object.defineProperty(this,"stack",{value:(new Error).stack||""}),n&&r(this,n)}return t.prototype=Object.create(Error.prototype,{constructor:{value:t,writable:!0,enumerable:!1,configurable:!0},name:{get:function(){return e},set:void 0,enumerable:!1,configurable:!0},toString:{value:function(){return this.name+": "+this.message},writable:!0,enumerable:!1,configurable:!0}}),t}n.asPromise=tC(),n.base64=lC(),n.EventEmitter=pC(),n.float=dC(),n.inquire=fC(),n.utf8=IC(),n.pool=PC(),n.LongBits=function(){if(_D)return gD;_D=1,gD=t;var e=ID();function t(e,t){this.lo=e>>>0,this.hi=t>>>0}var n=t.zero=new t(0,0);n.toNumber=function(){return 0},n.zzEncode=n.zzDecode=function(){return this},n.length=function(){return 1};var r=t.zeroHash="\0\0\0\0\0\0\0\0";t.fromNumber=function(e){if(0===e)return n;var r=e<0;r&&(e=-e);var o=e>>>0,i=(e-o)/4294967296>>>0;return r&&(i=~i>>>0,o=~o>>>0,++o>4294967295&&(o=0,++i>4294967295&&(i=0))),new t(o,i)},t.from=function(r){if("number"==typeof r)return t.fromNumber(r);if(e.isString(r)){if(!e.Long)return t.fromNumber(parseInt(r,10));r=e.Long.fromString(r)}return r.low||r.high?new t(r.low>>>0,r.high>>>0):n},t.prototype.toNumber=function(e){if(!e&&this.hi>>>31){var t=1+~this.lo>>>0,n=~this.hi>>>0;return t||(n=n+1>>>0),-(t+4294967296*n)}return this.lo+4294967296*this.hi},t.prototype.toLong=function(t){return e.Long?new e.Long(0|this.lo,0|this.hi,Boolean(t)):{low:0|this.lo,high:0|this.hi,unsigned:Boolean(t)}};var o=String.prototype.charCodeAt;return t.fromHash=function(e){return e===r?n:new t((o.call(e,0)|o.call(e,1)<<8|o.call(e,2)<<16|o.call(e,3)<<24)>>>0,(o.call(e,4)|o.call(e,5)<<8|o.call(e,6)<<16|o.call(e,7)<<24)>>>0)},t.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)},t.prototype.zzEncode=function(){var e=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^e)>>>0,this.lo=(this.lo<<1^e)>>>0,this},t.prototype.zzDecode=function(){var e=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^e)>>>0,this.hi=(this.hi>>>1^e)>>>0,this},t.prototype.length=function(){var e=this.lo,t=(this.lo>>>28|this.hi<<4)>>>0,n=this.hi>>>24;return 0===n?0===t?e<16384?e<128?1:2:e<2097152?3:4:t<16384?t<128?5:6:t<2097152?7:8:n<128?9:10},gD}(),n.isNode=Boolean(void 0!==e&&e&&e.process&&e.process.versions&&e.process.versions.node),n.global=n.isNode&&e||"undefined"!=typeof window&&window||"undefined"!=typeof self&&self||ND,n.emptyArray=Object.freeze?Object.freeze([]):[],n.emptyObject=Object.freeze?Object.freeze({}):{},n.isInteger=Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e},n.isString=function(e){return"string"==typeof e||e instanceof String},n.isObject=function(e){return e&&"object"==typeof e},n.isset=n.isSet=function(e,t){var n=e[t];return!(null==n||!e.hasOwnProperty(t))&&("object"!=typeof n||(Array.isArray(n)?n.length:Object.keys(n).length)>0)},n.Buffer=function(){try{var e=n.inquire("buffer").Buffer;return e.prototype.utf8Write?e:null}catch(e){return null}}(),n._Buffer_from=null,n._Buffer_allocUnsafe=null,n.newBuffer=function(e){return"number"==typeof e?n.Buffer?n._Buffer_allocUnsafe(e):new n.Array(e):n.Buffer?n._Buffer_from(e):"undefined"==typeof Uint8Array?e:new Uint8Array(e)},n.Array="undefined"!=typeof Uint8Array?Uint8Array:Array,n.Long=n.global.dcodeIO&&n.global.dcodeIO.Long||n.global.Long||n.inquire("long"),n.key2Re=/^true|false|0|1$/,n.key32Re=/^-?(?:0|[1-9][0-9]*)$/,n.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,n.longToHash=function(e){return e?n.LongBits.from(e).toHash():n.LongBits.zeroHash},n.longFromHash=function(e,t){var r=n.LongBits.fromHash(e);return n.Long?n.Long.fromBits(r.lo,r.hi,t):r.toNumber(Boolean(t))},n.merge=r,n.lcFirst=function(e){return e.charAt(0).toLowerCase()+e.substring(1)},n.newError=o,n.ProtocolError=o("ProtocolError"),n.oneOfGetter=function(e){for(var t={},n=0;n<e.length;++n)t[e[n]]=1;return function(){for(var e=Object.keys(this),n=e.length-1;n>-1;--n)if(1===t[e[n]]&&void 0!==this[e[n]]&&null!==this[e[n]])return e[n]}},n.oneOfSetter=function(e){return function(t){for(var n=0;n<e.length;++n)e[n]!==t&&delete this[e[n]]}},n.toJSONOptions={longs:String,enums:String,bytes:String,json:!0},n._configure=function(){var e=n.Buffer;e?(n._Buffer_from=e.from!==Uint8Array.from&&e.from||function(t,n){return new e(t,n)},n._Buffer_allocUnsafe=e.allocUnsafe||function(t){return new e(t)}):n._Buffer_from=n._Buffer_allocUnsafe=null}}(ND)),ND}function PD(){if(bD)return vD;bD=1,vD=c;var e,t=ID(),n=t.LongBits,r=t.base64,o=t.utf8;function i(e,t,n){this.fn=e,this.len=t,this.next=void 0,this.val=n}function a(){}function s(e){this.head=e.head,this.tail=e.tail,this.len=e.len,this.next=e.states}function c(){this.len=0,this.head=new i(a,0,0),this.tail=this.head,this.states=null}var u=function(){return t.Buffer?function(){return(c.create=function(){return new e})()}:function(){return new c}};function l(e,t,n){t[n]=255&e}function p(e,t){this.len=e,this.next=void 0,this.val=t}function d(e,t,n){for(;e.hi;)t[n++]=127&e.lo|128,e.lo=(e.lo>>>7|e.hi<<25)>>>0,e.hi>>>=7;for(;e.lo>127;)t[n++]=127&e.lo|128,e.lo=e.lo>>>7;t[n++]=e.lo}function f(e,t,n){t[n]=255&e,t[n+1]=e>>>8&255,t[n+2]=e>>>16&255,t[n+3]=e>>>24}c.create=u(),c.alloc=function(e){return new t.Array(e)},t.Array!==Array&&(c.alloc=t.pool(c.alloc,t.Array.prototype.subarray)),c.prototype._push=function(e,t,n){return this.tail=this.tail.next=new i(e,t,n),this.len+=t,this},p.prototype=Object.create(i.prototype),p.prototype.fn=function(e,t,n){for(;e>127;)t[n++]=127&e|128,e>>>=7;t[n]=e},c.prototype.uint32=function(e){return this.len+=(this.tail=this.tail.next=new p((e>>>=0)<128?1:e<16384?2:e<2097152?3:e<268435456?4:5,e)).len,this},c.prototype.int32=function(e){return e<0?this._push(d,10,n.fromNumber(e)):this.uint32(e)},c.prototype.sint32=function(e){return this.uint32((e<<1^e>>31)>>>0)},c.prototype.uint64=function(e){var t=n.from(e);return this._push(d,t.length(),t)},c.prototype.int64=c.prototype.uint64,c.prototype.sint64=function(e){var t=n.from(e).zzEncode();return this._push(d,t.length(),t)},c.prototype.bool=function(e){return this._push(l,1,e?1:0)},c.prototype.fixed32=function(e){return this._push(f,4,e>>>0)},c.prototype.sfixed32=c.prototype.fixed32,c.prototype.fixed64=function(e){var t=n.from(e);return this._push(f,4,t.lo)._push(f,4,t.hi)},c.prototype.sfixed64=c.prototype.fixed64,c.prototype.float=function(e){return this._push(t.float.writeFloatLE,4,e)},c.prototype.double=function(e){return this._push(t.float.writeDoubleLE,8,e)};var h=t.Array.prototype.set?function(e,t,n){t.set(e,n)}:function(e,t,n){for(var r=0;r<e.length;++r)t[n+r]=e[r]};return c.prototype.bytes=function(e){var n=e.length>>>0;if(!n)return this._push(l,1,0);if(t.isString(e)){var o=c.alloc(n=r.length(e));r.decode(e,o,0),e=o}return this.uint32(n)._push(h,n,e)},c.prototype.string=function(e){var t=o.length(e);return t?this.uint32(t)._push(o.write,t,e):this._push(l,1,0)},c.prototype.fork=function(){return this.states=new s(this),this.head=this.tail=new i(a,0,0),this.len=0,this},c.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 i(a,0,0),this.len=0),this},c.prototype.ldelim=function(){var e=this.head,t=this.tail,n=this.len;return this.reset().uint32(n),n&&(this.tail.next=e.next,this.tail=t,this.len+=n),this},c.prototype.finish=function(){for(var e=this.head.next,t=this.constructor.alloc(this.len),n=0;e;)e.fn(e.val,t,n),n+=e.len,e=e.next;return t},c._configure=function(t){e=t,c.create=u(),e._configure()},vD}function xD(){if(OD)return TD;OD=1,TD=i;var e,t=ID(),n=t.LongBits,r=t.utf8;function o(e,t){return RangeError("index out of range: "+e.pos+" + "+(t||1)+" > "+e.len)}function i(e){this.buf=e,this.pos=0,this.len=e.length}var a,s="undefined"!=typeof Uint8Array?function(e){if(e instanceof Uint8Array||Array.isArray(e))return new i(e);throw Error("illegal buffer")}:function(e){if(Array.isArray(e))return new i(e);throw Error("illegal buffer")},c=function(){return t.Buffer?function(n){return(i.create=function(n){return t.Buffer.isBuffer(n)?new e(n):s(n)})(n)}:s};function u(){var e=new n(0,0),t=0;if(!(this.len-this.pos>4)){for(;t<3;++t){if(this.pos>=this.len)throw o(this);if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e}return e.lo=(e.lo|(127&this.buf[this.pos++])<<7*t)>>>0,e}for(;t<4;++t)if(e.lo=(e.lo|(127&this.buf[this.pos])<<7*t)>>>0,this.buf[this.pos++]<128)return e;if(e.lo=(e.lo|(127&this.buf[this.pos])<<28)>>>0,e.hi=(e.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return e;if(t=0,this.len-this.pos>4){for(;t<5;++t)if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}else for(;t<5;++t){if(this.pos>=this.len)throw o(this);if(e.hi=(e.hi|(127&this.buf[this.pos])<<7*t+3)>>>0,this.buf[this.pos++]<128)return e}throw Error("invalid varint encoding")}function l(e,t){return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0}function p(){if(this.pos+8>this.len)throw o(this,8);return new n(l(this.buf,this.pos+=4),l(this.buf,this.pos+=4))}return i.create=c(),i.prototype._slice=t.Array.prototype.subarray||t.Array.prototype.slice,i.prototype.uint32=(a=4294967295,function(){if(a=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128)return a;if(a=(a|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)return a;if(a=(a|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)return a;if(a=(a|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)return a;if(a=(a|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128)return a;if((this.pos+=5)>this.len)throw this.pos=this.len,o(this,10);return a}),i.prototype.int32=function(){return 0|this.uint32()},i.prototype.sint32=function(){var e=this.uint32();return e>>>1^-(1&e)},i.prototype.bool=function(){return 0!==this.uint32()},i.prototype.fixed32=function(){if(this.pos+4>this.len)throw o(this,4);return l(this.buf,this.pos+=4)},i.prototype.sfixed32=function(){if(this.pos+4>this.len)throw o(this,4);return 0|l(this.buf,this.pos+=4)},i.prototype.float=function(){if(this.pos+4>this.len)throw o(this,4);var e=t.float.readFloatLE(this.buf,this.pos);return this.pos+=4,e},i.prototype.double=function(){if(this.pos+8>this.len)throw o(this,4);var e=t.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,e},i.prototype.bytes=function(){var e=this.uint32(),n=this.pos,r=this.pos+e;if(r>this.len)throw o(this,e);if(this.pos+=e,Array.isArray(this.buf))return this.buf.slice(n,r);if(n===r){var i=t.Buffer;return i?i.alloc(0):new this.buf.constructor(0)}return this._slice.call(this.buf,n,r)},i.prototype.string=function(){var e=this.bytes();return r.read(e,0,e.length)},i.prototype.skip=function(e){if("number"==typeof e){if(this.pos+e>this.len)throw o(this,e);this.pos+=e}else do{if(this.pos>=this.len)throw o(this)}while(128&this.buf[this.pos++]);return this},i.prototype.skipType=function(e){switch(e){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;4!=(e=7&this.uint32());)this.skipType(e);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+e+" at offset "+this.pos)}return this},i._configure=function(n){e=n,i.create=c(),e._configure();var r=t.Long?"toLong":"toNumber";t.merge(i.prototype,{int64:function(){return u.call(this)[r](!1)},uint64:function(){return u.call(this)[r](!0)},sint64:function(){return u.call(this).zzDecode()[r](!1)},fixed64:function(){return p.call(this)[r](!0)},sfixed64:function(){return p.call(this)[r](!1)}})},TD}var CD,MD,LD,UD,kD,DD,jD,BD,VD,FD,GD={};function HD(){return LD||(LD=1,function(e){e.Service=function(){if(MD)return CD;MD=1,CD=t;var e=ID();function t(t,n,r){if("function"!=typeof t)throw TypeError("rpcImpl must be a function");e.EventEmitter.call(this),this.rpcImpl=t,this.requestDelimited=Boolean(n),this.responseDelimited=Boolean(r)}return(t.prototype=Object.create(e.EventEmitter.prototype)).constructor=t,t.prototype.rpcCall=function t(n,r,o,i,a){if(!i)throw TypeError("request must be specified");var s=this;if(!a)return e.asPromise(t,s,n,r,o,i);if(s.rpcImpl)try{return s.rpcImpl(n,r[s.requestDelimited?"encodeDelimited":"encode"](i).finish(),(function(e,t){if(e)return s.emit("error",e,n),a(e);if(null!==t){if(!(t instanceof o))try{t=o[s.responseDelimited?"decodeDelimited":"decode"](t)}catch(e){return s.emit("error",e,n),a(e)}return s.emit("data",t,n),a(null,t)}s.end(!0)}))}catch(e){return s.emit("error",e,n),void setTimeout((function(){a(e)}),0)}else setTimeout((function(){a(Error("already ended"))}),0)},t.prototype.end=function(e){return this.rpcImpl&&(e||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this},CD}()}(GD)),GD}function YD(){return DD||(DD=1,function(e){var t=e;function n(){t.util._configure(),t.Writer._configure(t.BufferWriter),t.Reader._configure(t.BufferReader)}t.build="minimal",t.Writer=PD(),t.BufferWriter=function(){if(SD)return ED;SD=1,ED=n;var e=PD();(n.prototype=Object.create(e.prototype)).constructor=n;var t=ID();function n(){e.call(this)}function r(e,n,r){e.length<40?t.utf8.write(e,n,r):n.utf8Write?n.utf8Write(e,r):n.write(e,r)}return n._configure=function(){n.alloc=t._Buffer_allocUnsafe,n.writeBytesBuffer=t.Buffer&&t.Buffer.prototype instanceof Uint8Array&&"set"===t.Buffer.prototype.set.name?function(e,t,n){t.set(e,n)}:function(e,t,n){if(e.copy)e.copy(t,n,0,e.length);else for(var r=0;r<e.length;)t[n++]=e[r++]}},n.prototype.bytes=function(e){t.isString(e)&&(e=t._Buffer_from(e,"base64"));var r=e.length>>>0;return this.uint32(r),r&&this._push(n.writeBytesBuffer,r,e),this},n.prototype.string=function(e){var n=t.Buffer.byteLength(e);return this.uint32(n),n&&this._push(r,n,e),this},n._configure(),ED}(),t.Reader=xD(),t.BufferReader=function(){if(wD)return AD;wD=1,AD=n;var e=xD();(n.prototype=Object.create(e.prototype)).constructor=n;var t=ID();function n(t){e.call(this,t)}return n._configure=function(){t.Buffer&&(n.prototype._slice=t.Buffer.prototype.slice)},n.prototype.string=function(){var e=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+e,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+e,this.len))},n._configure(),AD}(),t.util=ID(),t.rpc=HD(),t.roots=kD?UD:(kD=1,UD={}),t.configure=n,n()}(RD)),RD}function qD(){if(FD)return VD;FD=1;var e=BD?jD:(BD=1,jD=YD()),t=e.Reader,n=e.Writer,r=e.util,o=e.roots.default||(e.roots.default={});return o.opentelemetry=function(){var i,a,s,c,u={};return u.proto=((c={}).common=((i={}).v1=function(){var i={};return i.AnyValue=function(){function i(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}var a;return i.prototype.stringValue=null,i.prototype.boolValue=null,i.prototype.intValue=null,i.prototype.doubleValue=null,i.prototype.arrayValue=null,i.prototype.kvlistValue=null,i.prototype.bytesValue=null,Object.defineProperty(i.prototype,"value",{get:r.oneOfGetter(a=["stringValue","boolValue","intValue","doubleValue","arrayValue","kvlistValue","bytesValue"]),set:r.oneOfSetter(a)}),i.create=function(e){return new i(e)},i.encode=function(e,t){return t||(t=n.create()),null!=e.stringValue&&Object.hasOwnProperty.call(e,"stringValue")&&t.uint32(10).string(e.stringValue),null!=e.boolValue&&Object.hasOwnProperty.call(e,"boolValue")&&t.uint32(16).bool(e.boolValue),null!=e.intValue&&Object.hasOwnProperty.call(e,"intValue")&&t.uint32(24).int64(e.intValue),null!=e.doubleValue&&Object.hasOwnProperty.call(e,"doubleValue")&&t.uint32(33).double(e.doubleValue),null!=e.arrayValue&&Object.hasOwnProperty.call(e,"arrayValue")&&o.opentelemetry.proto.common.v1.ArrayValue.encode(e.arrayValue,t.uint32(42).fork()).ldelim(),null!=e.kvlistValue&&Object.hasOwnProperty.call(e,"kvlistValue")&&o.opentelemetry.proto.common.v1.KeyValueList.encode(e.kvlistValue,t.uint32(50).fork()).ldelim(),null!=e.bytesValue&&Object.hasOwnProperty.call(e,"bytesValue")&&t.uint32(58).bytes(e.bytesValue),t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,i=new o.opentelemetry.proto.common.v1.AnyValue;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:i.stringValue=e.string();break;case 2:i.boolValue=e.bool();break;case 3:i.intValue=e.int64();break;case 4:i.doubleValue=e.double();break;case 5:i.arrayValue=o.opentelemetry.proto.common.v1.ArrayValue.decode(e,e.uint32());break;case 6:i.kvlistValue=o.opentelemetry.proto.common.v1.KeyValueList.decode(e,e.uint32());break;case 7:i.bytesValue=e.bytes();break;default:e.skipType(7&a)}}return i},i.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},i.verify=function(e){if("object"!=typeof e||null===e)return"object expected";var t={};if(null!=e.stringValue&&e.hasOwnProperty("stringValue")&&(t.value=1,!r.isString(e.stringValue)))return"stringValue: string expected";if(null!=e.boolValue&&e.hasOwnProperty("boolValue")){if(1===t.value)return"value: multiple values";if(t.value=1,"boolean"!=typeof e.boolValue)return"boolValue: boolean expected"}if(null!=e.intValue&&e.hasOwnProperty("intValue")){if(1===t.value)return"value: multiple values";if(t.value=1,!(r.isInteger(e.intValue)||e.intValue&&r.isInteger(e.intValue.low)&&r.isInteger(e.intValue.high)))return"intValue: integer|Long expected"}if(null!=e.doubleValue&&e.hasOwnProperty("doubleValue")){if(1===t.value)return"value: multiple values";if(t.value=1,"number"!=typeof e.doubleValue)return"doubleValue: number expected"}if(null!=e.arrayValue&&e.hasOwnProperty("arrayValue")){if(1===t.value)return"value: multiple values";if(t.value=1,n=o.opentelemetry.proto.common.v1.ArrayValue.verify(e.arrayValue))return"arrayValue."+n}if(null!=e.kvlistValue&&e.hasOwnProperty("kvlistValue")){if(1===t.value)return"value: multiple values";var n;if(t.value=1,n=o.opentelemetry.proto.common.v1.KeyValueList.verify(e.kvlistValue))return"kvlistValue."+n}if(null!=e.bytesValue&&e.hasOwnProperty("bytesValue")){if(1===t.value)return"value: multiple values";if(t.value=1,!(e.bytesValue&&"number"==typeof e.bytesValue.length||r.isString(e.bytesValue)))return"bytesValue: buffer expected"}return null},i.fromObject=function(e){if(e instanceof o.opentelemetry.proto.common.v1.AnyValue)return e;var t=new o.opentelemetry.proto.common.v1.AnyValue;if(null!=e.stringValue&&(t.stringValue=String(e.stringValue)),null!=e.boolValue&&(t.boolValue=Boolean(e.boolValue)),null!=e.intValue&&(r.Long?(t.intValue=r.Long.fromValue(e.intValue)).unsigned=!1:"string"==typeof e.intValue?t.intValue=parseInt(e.intValue,10):"number"==typeof e.intValue?t.intValue=e.intValue:"object"==typeof e.intValue&&(t.intValue=new r.LongBits(e.intValue.low>>>0,e.intValue.high>>>0).toNumber())),null!=e.doubleValue&&(t.doubleValue=Number(e.doubleValue)),null!=e.arrayValue){if("object"!=typeof e.arrayValue)throw TypeError(".opentelemetry.proto.common.v1.AnyValue.arrayValue: object expected");t.arrayValue=o.opentelemetry.proto.common.v1.ArrayValue.fromObject(e.arrayValue)}if(null!=e.kvlistValue){if("object"!=typeof e.kvlistValue)throw TypeError(".opentelemetry.proto.common.v1.AnyValue.kvlistValue: object expected");t.kvlistValue=o.opentelemetry.proto.common.v1.KeyValueList.fromObject(e.kvlistValue)}return null!=e.bytesValue&&("string"==typeof e.bytesValue?r.base64.decode(e.bytesValue,t.bytesValue=r.newBuffer(r.base64.length(e.bytesValue)),0):e.bytesValue.length>=0&&(t.bytesValue=e.bytesValue)),t},i.toObject=function(e,t){t||(t={});var n={};return null!=e.stringValue&&e.hasOwnProperty("stringValue")&&(n.stringValue=e.stringValue,t.oneofs&&(n.value="stringValue")),null!=e.boolValue&&e.hasOwnProperty("boolValue")&&(n.boolValue=e.boolValue,t.oneofs&&(n.value="boolValue")),null!=e.intValue&&e.hasOwnProperty("intValue")&&("number"==typeof e.intValue?n.intValue=t.longs===String?String(e.intValue):e.intValue:n.intValue=t.longs===String?r.Long.prototype.toString.call(e.intValue):t.longs===Number?new r.LongBits(e.intValue.low>>>0,e.intValue.high>>>0).toNumber():e.intValue,t.oneofs&&(n.value="intValue")),null!=e.doubleValue&&e.hasOwnProperty("doubleValue")&&(n.doubleValue=t.json&&!isFinite(e.doubleValue)?String(e.doubleValue):e.doubleValue,t.oneofs&&(n.value="doubleValue")),null!=e.arrayValue&&e.hasOwnProperty("arrayValue")&&(n.arrayValue=o.opentelemetry.proto.common.v1.ArrayValue.toObject(e.arrayValue,t),t.oneofs&&(n.value="arrayValue")),null!=e.kvlistValue&&e.hasOwnProperty("kvlistValue")&&(n.kvlistValue=o.opentelemetry.proto.common.v1.KeyValueList.toObject(e.kvlistValue,t),t.oneofs&&(n.value="kvlistValue")),null!=e.bytesValue&&e.hasOwnProperty("bytesValue")&&(n.bytesValue=t.bytes===String?r.base64.encode(e.bytesValue,0,e.bytesValue.length):t.bytes===Array?Array.prototype.slice.call(e.bytesValue):e.bytesValue,t.oneofs&&(n.value="bytesValue")),n},i.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},i.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/opentelemetry.proto.common.v1.AnyValue"},i}(),i.ArrayValue=function(){function i(e){if(this.values=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return i.prototype.values=r.emptyArray,i.create=function(e){return new i(e)},i.encode=function(e,t){if(t||(t=n.create()),null!=e.values&&e.values.length)for(var r=0;r<e.values.length;++r)o.opentelemetry.proto.common.v1.AnyValue.encode(e.values[r],t.uint32(10).fork()).ldelim();return t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,i=new o.opentelemetry.proto.common.v1.ArrayValue;e.pos<r;){var a=e.uint32();a>>>3==1?(i.values&&i.values.length||(i.values=[]),i.values.push(o.opentelemetry.proto.common.v1.AnyValue.decode(e,e.uint32()))):e.skipType(7&a)}return i},i.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},i.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.values&&e.hasOwnProperty("values")){if(!Array.isArray(e.values))return"values: array expected";for(var t=0;t<e.values.length;++t){var n=o.opentelemetry.proto.common.v1.AnyValue.verify(e.values[t]);if(n)return"values."+n}}return null},i.fromObject=function(e){if(e instanceof o.opentelemetry.proto.common.v1.ArrayValue)return e;var t=new o.opentelemetry.proto.common.v1.ArrayValue;if(e.values){if(!Array.isArray(e.values))throw TypeError(".opentelemetry.proto.common.v1.ArrayValue.values: array expected");t.values=[];for(var n=0;n<e.values.length;++n){if("object"!=typeof e.values[n])throw TypeError(".opentelemetry.proto.common.v1.ArrayValue.values: object expected");t.values[n]=o.opentelemetry.proto.common.v1.AnyValue.fromObject(e.values[n])}}return t},i.toObject=function(e,t){t||(t={});var n={};if((t.arrays||t.defaults)&&(n.values=[]),e.values&&e.values.length){n.values=[];for(var r=0;r<e.values.length;++r)n.values[r]=o.opentelemetry.proto.common.v1.AnyValue.toObject(e.values[r],t)}return n},i.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},i.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/opentelemetry.proto.common.v1.ArrayValue"},i}(),i.KeyValueList=function(){function i(e){if(this.values=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return i.prototype.values=r.emptyArray,i.create=function(e){return new i(e)},i.encode=function(e,t){if(t||(t=n.create()),null!=e.values&&e.values.length)for(var r=0;r<e.values.length;++r)o.opentelemetry.proto.common.v1.KeyValue.encode(e.values[r],t.uint32(10).fork()).ldelim();return t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,i=new o.opentelemetry.proto.common.v1.KeyValueList;e.pos<r;){var a=e.uint32();a>>>3==1?(i.values&&i.values.length||(i.values=[]),i.values.push(o.opentelemetry.proto.common.v1.KeyValue.decode(e,e.uint32()))):e.skipType(7&a)}return i},i.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},i.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.values&&e.hasOwnProperty("values")){if(!Array.isArray(e.values))return"values: array expected";for(var t=0;t<e.values.length;++t){var n=o.opentelemetry.proto.common.v1.KeyValue.verify(e.values[t]);if(n)return"values."+n}}return null},i.fromObject=function(e){if(e instanceof o.opentelemetry.proto.common.v1.KeyValueList)return e;var t=new o.opentelemetry.proto.common.v1.KeyValueList;if(e.values){if(!Array.isArray(e.values))throw TypeError(".opentelemetry.proto.common.v1.KeyValueList.values: array expected");t.values=[];for(var n=0;n<e.values.length;++n){if("object"!=typeof e.values[n])throw TypeError(".opentelemetry.proto.common.v1.KeyValueList.values: object expected");t.values[n]=o.opentelemetry.proto.common.v1.KeyValue.fromObject(e.values[n])}}return t},i.toObject=function(e,t){t||(t={});var n={};if((t.arrays||t.defaults)&&(n.values=[]),e.values&&e.values.length){n.values=[];for(var r=0;r<e.values.length;++r)n.values[r]=o.opentelemetry.proto.common.v1.KeyValue.toObject(e.values[r],t)}return n},i.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},i.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/opentelemetry.proto.common.v1.KeyValueList"},i}(),i.KeyValue=function(){function i(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return i.prototype.key=null,i.prototype.value=null,i.create=function(e){return new i(e)},i.encode=function(e,t){return t||(t=n.create()),null!=e.key&&Object.hasOwnProperty.call(e,"key")&&t.uint32(10).string(e.key),null!=e.value&&Object.hasOwnProperty.call(e,"value")&&o.opentelemetry.proto.common.v1.AnyValue.encode(e.value,t.uint32(18).fork()).ldelim(),t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,i=new o.opentelemetry.proto.common.v1.KeyValue;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:i.key=e.string();break;case 2:i.value=o.opentelemetry.proto.common.v1.AnyValue.decode(e,e.uint32());break;default:e.skipType(7&a)}}return i},i.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},i.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.key&&e.hasOwnProperty("key")&&!r.isString(e.key))return"key: string expected";if(null!=e.value&&e.hasOwnProperty("value")){var t=o.opentelemetry.proto.common.v1.AnyValue.verify(e.value);if(t)return"value."+t}return null},i.fromObject=function(e){if(e instanceof o.opentelemetry.proto.common.v1.KeyValue)return e;var t=new o.opentelemetry.proto.common.v1.KeyValue;if(null!=e.key&&(t.key=String(e.key)),null!=e.value){if("object"!=typeof e.value)throw TypeError(".opentelemetry.proto.common.v1.KeyValue.value: object expected");t.value=o.opentelemetry.proto.common.v1.AnyValue.fromObject(e.value)}return t},i.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.key="",n.value=null),null!=e.key&&e.hasOwnProperty("key")&&(n.key=e.key),null!=e.value&&e.hasOwnProperty("value")&&(n.value=o.opentelemetry.proto.common.v1.AnyValue.toObject(e.value,t)),n},i.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},i.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/opentelemetry.proto.common.v1.KeyValue"},i}(),i.InstrumentationScope=function(){function i(e){if(this.attributes=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return i.prototype.name=null,i.prototype.version=null,i.prototype.attributes=r.emptyArray,i.prototype.droppedAttributesCount=null,i.create=function(e){return new i(e)},i.encode=function(e,t){if(t||(t=n.create()),null!=e.name&&Object.hasOwnProperty.call(e,"name")&&t.uint32(10).string(e.name),null!=e.version&&Object.hasOwnProperty.call(e,"version")&&t.uint32(18).string(e.version),null!=e.attributes&&e.attributes.length)for(var r=0;r<e.attributes.length;++r)o.opentelemetry.proto.common.v1.KeyValue.encode(e.attributes[r],t.uint32(26).fork()).ldelim();return null!=e.droppedAttributesCount&&Object.hasOwnProperty.call(e,"droppedAttributesCount")&&t.uint32(32).uint32(e.droppedAttributesCount),t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,i=new o.opentelemetry.proto.common.v1.InstrumentationScope;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:i.name=e.string();break;case 2:i.version=e.string();break;case 3:i.attributes&&i.attributes.length||(i.attributes=[]),i.attributes.push(o.opentelemetry.proto.common.v1.KeyValue.decode(e,e.uint32()));break;case 4:i.droppedAttributesCount=e.uint32();break;default:e.skipType(7&a)}}return i},i.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},i.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.name&&e.hasOwnProperty("name")&&!r.isString(e.name))return"name: string expected";if(null!=e.version&&e.hasOwnProperty("version")&&!r.isString(e.version))return"version: string expected";if(null!=e.attributes&&e.hasOwnProperty("attributes")){if(!Array.isArray(e.attributes))return"attributes: array expected";for(var t=0;t<e.attributes.length;++t){var n=o.opentelemetry.proto.common.v1.KeyValue.verify(e.attributes[t]);if(n)return"attributes."+n}}return null!=e.droppedAttributesCount&&e.hasOwnProperty("droppedAttributesCount")&&!r.isInteger(e.droppedAttributesCount)?"droppedAttributesCount: integer expected":null},i.fromObject=function(e){if(e instanceof o.opentelemetry.proto.common.v1.InstrumentationScope)return e;var t=new o.opentelemetry.proto.common.v1.InstrumentationScope;if(null!=e.name&&(t.name=String(e.name)),null!=e.version&&(t.version=String(e.version)),e.attributes){if(!Array.isArray(e.attributes))throw TypeError(".opentelemetry.proto.common.v1.InstrumentationScope.attributes: array expected");t.attributes=[];for(var n=0;n<e.attributes.length;++n){if("object"!=typeof e.attributes[n])throw TypeError(".opentelemetry.proto.common.v1.InstrumentationScope.attributes: object expected");t.attributes[n]=o.opentelemetry.proto.common.v1.KeyValue.fromObject(e.attributes[n])}}return null!=e.droppedAttributesCount&&(t.droppedAttributesCount=e.droppedAttributesCount>>>0),t},i.toObject=function(e,t){t||(t={});var n={};if((t.arrays||t.defaults)&&(n.attributes=[]),t.defaults&&(n.name="",n.version="",n.droppedAttributesCount=0),null!=e.name&&e.hasOwnProperty("name")&&(n.name=e.name),null!=e.version&&e.hasOwnProperty("version")&&(n.version=e.version),e.attributes&&e.attributes.length){n.attributes=[];for(var r=0;r<e.attributes.length;++r)n.attributes[r]=o.opentelemetry.proto.common.v1.KeyValue.toObject(e.attributes[r],t)}return null!=e.droppedAttributesCount&&e.hasOwnProperty("droppedAttributesCount")&&(n.droppedAttributesCount=e.droppedAttributesCount),n},i.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},i.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/opentelemetry.proto.common.v1.InstrumentationScope"},i}(),i}(),i),c.resource=((a={}).v1=function(){var i={};return i.Resource=function(){function i(e){if(this.attributes=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return i.prototype.attributes=r.emptyArray,i.prototype.droppedAttributesCount=null,i.create=function(e){return new i(e)},i.encode=function(e,t){if(t||(t=n.create()),null!=e.attributes&&e.attributes.length)for(var r=0;r<e.attributes.length;++r)o.opentelemetry.proto.common.v1.KeyValue.encode(e.attributes[r],t.uint32(10).fork()).ldelim();return null!=e.droppedAttributesCount&&Object.hasOwnProperty.call(e,"droppedAttributesCount")&&t.uint32(16).uint32(e.droppedAttributesCount),t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,i=new o.opentelemetry.proto.resource.v1.Resource;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:i.attributes&&i.attributes.length||(i.attributes=[]),i.attributes.push(o.opentelemetry.proto.common.v1.KeyValue.decode(e,e.uint32()));break;case 2:i.droppedAttributesCount=e.uint32();break;default:e.skipType(7&a)}}return i},i.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},i.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.attributes&&e.hasOwnProperty("attributes")){if(!Array.isArray(e.attributes))return"attributes: array expected";for(var t=0;t<e.attributes.length;++t){var n=o.opentelemetry.proto.common.v1.KeyValue.verify(e.attributes[t]);if(n)return"attributes."+n}}return null!=e.droppedAttributesCount&&e.hasOwnProperty("droppedAttributesCount")&&!r.isInteger(e.droppedAttributesCount)?"droppedAttributesCount: integer expected":null},i.fromObject=function(e){if(e instanceof o.opentelemetry.proto.resource.v1.Resource)return e;var t=new o.opentelemetry.proto.resource.v1.Resource;if(e.attributes){if(!Array.isArray(e.attributes))throw TypeError(".opentelemetry.proto.resource.v1.Resource.attributes: array expected");t.attributes=[];for(var n=0;n<e.attributes.length;++n){if("object"!=typeof e.attributes[n])throw TypeError(".opentelemetry.proto.resource.v1.Resource.attributes: object expected");t.attributes[n]=o.opentelemetry.proto.common.v1.KeyValue.fromObject(e.attributes[n])}}return null!=e.droppedAttributesCount&&(t.droppedAttributesCount=e.droppedAttributesCount>>>0),t},i.toObject=function(e,t){t||(t={});var n={};if((t.arrays||t.defaults)&&(n.attributes=[]),t.defaults&&(n.droppedAttributesCount=0),e.attributes&&e.attributes.length){n.attributes=[];for(var r=0;r<e.attributes.length;++r)n.attributes[r]=o.opentelemetry.proto.common.v1.KeyValue.toObject(e.attributes[r],t)}return null!=e.droppedAttributesCount&&e.hasOwnProperty("droppedAttributesCount")&&(n.droppedAttributesCount=e.droppedAttributesCount),n},i.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},i.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/opentelemetry.proto.resource.v1.Resource"},i}(),i}(),a),c.trace=function(){var i={};return i.v1=function(){var i={};return i.TracesData=function(){function i(e){if(this.resourceSpans=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return i.prototype.resourceSpans=r.emptyArray,i.create=function(e){return new i(e)},i.encode=function(e,t){if(t||(t=n.create()),null!=e.resourceSpans&&e.resourceSpans.length)for(var r=0;r<e.resourceSpans.length;++r)o.opentelemetry.proto.trace.v1.ResourceSpans.encode(e.resourceSpans[r],t.uint32(10).fork()).ldelim();return t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,i=new o.opentelemetry.proto.trace.v1.TracesData;e.pos<r;){var a=e.uint32();a>>>3==1?(i.resourceSpans&&i.resourceSpans.length||(i.resourceSpans=[]),i.resourceSpans.push(o.opentelemetry.proto.trace.v1.ResourceSpans.decode(e,e.uint32()))):e.skipType(7&a)}return i},i.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},i.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.resourceSpans&&e.hasOwnProperty("resourceSpans")){if(!Array.isArray(e.resourceSpans))return"resourceSpans: array expected";for(var t=0;t<e.resourceSpans.length;++t){var n=o.opentelemetry.proto.trace.v1.ResourceSpans.verify(e.resourceSpans[t]);if(n)return"resourceSpans."+n}}return null},i.fromObject=function(e){if(e instanceof o.opentelemetry.proto.trace.v1.TracesData)return e;var t=new o.opentelemetry.proto.trace.v1.TracesData;if(e.resourceSpans){if(!Array.isArray(e.resourceSpans))throw TypeError(".opentelemetry.proto.trace.v1.TracesData.resourceSpans: array expected");t.resourceSpans=[];for(var n=0;n<e.resourceSpans.length;++n){if("object"!=typeof e.resourceSpans[n])throw TypeError(".opentelemetry.proto.trace.v1.TracesData.resourceSpans: object expected");t.resourceSpans[n]=o.opentelemetry.proto.trace.v1.ResourceSpans.fromObject(e.resourceSpans[n])}}return t},i.toObject=function(e,t){t||(t={});var n={};if((t.arrays||t.defaults)&&(n.resourceSpans=[]),e.resourceSpans&&e.resourceSpans.length){n.resourceSpans=[];for(var r=0;r<e.resourceSpans.length;++r)n.resourceSpans[r]=o.opentelemetry.proto.trace.v1.ResourceSpans.toObject(e.resourceSpans[r],t)}return n},i.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},i.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/opentelemetry.proto.trace.v1.TracesData"},i}(),i.ResourceSpans=function(){function i(e){if(this.scopeSpans=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return i.prototype.resource=null,i.prototype.scopeSpans=r.emptyArray,i.prototype.schemaUrl=null,i.create=function(e){return new i(e)},i.encode=function(e,t){if(t||(t=n.create()),null!=e.resource&&Object.hasOwnProperty.call(e,"resource")&&o.opentelemetry.proto.resource.v1.Resource.encode(e.resource,t.uint32(10).fork()).ldelim(),null!=e.scopeSpans&&e.scopeSpans.length)for(var r=0;r<e.scopeSpans.length;++r)o.opentelemetry.proto.trace.v1.ScopeSpans.encode(e.scopeSpans[r],t.uint32(18).fork()).ldelim();return null!=e.schemaUrl&&Object.hasOwnProperty.call(e,"schemaUrl")&&t.uint32(26).string(e.schemaUrl),t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,i=new o.opentelemetry.proto.trace.v1.ResourceSpans;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:i.resource=o.opentelemetry.proto.resource.v1.Resource.decode(e,e.uint32());break;case 2:i.scopeSpans&&i.scopeSpans.length||(i.scopeSpans=[]),i.scopeSpans.push(o.opentelemetry.proto.trace.v1.ScopeSpans.decode(e,e.uint32()));break;case 3:i.schemaUrl=e.string();break;default:e.skipType(7&a)}}return i},i.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},i.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.resource&&e.hasOwnProperty("resource")&&(n=o.opentelemetry.proto.resource.v1.Resource.verify(e.resource)))return"resource."+n;if(null!=e.scopeSpans&&e.hasOwnProperty("scopeSpans")){if(!Array.isArray(e.scopeSpans))return"scopeSpans: array expected";for(var t=0;t<e.scopeSpans.length;++t){var n;if(n=o.opentelemetry.proto.trace.v1.ScopeSpans.verify(e.scopeSpans[t]))return"scopeSpans."+n}}return null!=e.schemaUrl&&e.hasOwnProperty("schemaUrl")&&!r.isString(e.schemaUrl)?"schemaUrl: string expected":null},i.fromObject=function(e){if(e instanceof o.opentelemetry.proto.trace.v1.ResourceSpans)return e;var t=new o.opentelemetry.proto.trace.v1.ResourceSpans;if(null!=e.resource){if("object"!=typeof e.resource)throw TypeError(".opentelemetry.proto.trace.v1.ResourceSpans.resource: object expected");t.resource=o.opentelemetry.proto.resource.v1.Resource.fromObject(e.resource)}if(e.scopeSpans){if(!Array.isArray(e.scopeSpans))throw TypeError(".opentelemetry.proto.trace.v1.ResourceSpans.scopeSpans: array expected");t.scopeSpans=[];for(var n=0;n<e.scopeSpans.length;++n){if("object"!=typeof e.scopeSpans[n])throw TypeError(".opentelemetry.proto.trace.v1.ResourceSpans.scopeSpans: object expected");t.scopeSpans[n]=o.opentelemetry.proto.trace.v1.ScopeSpans.fromObject(e.scopeSpans[n])}}return null!=e.schemaUrl&&(t.schemaUrl=String(e.schemaUrl)),t},i.toObject=function(e,t){t||(t={});var n={};if((t.arrays||t.defaults)&&(n.scopeSpans=[]),t.defaults&&(n.resource=null,n.schemaUrl=""),null!=e.resource&&e.hasOwnProperty("resource")&&(n.resource=o.opentelemetry.proto.resource.v1.Resource.toObject(e.resource,t)),e.scopeSpans&&e.scopeSpans.length){n.scopeSpans=[];for(var r=0;r<e.scopeSpans.length;++r)n.scopeSpans[r]=o.opentelemetry.proto.trace.v1.ScopeSpans.toObject(e.scopeSpans[r],t)}return null!=e.schemaUrl&&e.hasOwnProperty("schemaUrl")&&(n.schemaUrl=e.schemaUrl),n},i.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},i.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/opentelemetry.proto.trace.v1.ResourceSpans"},i}(),i.ScopeSpans=function(){function i(e){if(this.spans=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return i.prototype.scope=null,i.prototype.spans=r.emptyArray,i.prototype.schemaUrl=null,i.create=function(e){return new i(e)},i.encode=function(e,t){if(t||(t=n.create()),null!=e.scope&&Object.hasOwnProperty.call(e,"scope")&&o.opentelemetry.proto.common.v1.InstrumentationScope.encode(e.scope,t.uint32(10).fork()).ldelim(),null!=e.spans&&e.spans.length)for(var r=0;r<e.spans.length;++r)o.opentelemetry.proto.trace.v1.Span.encode(e.spans[r],t.uint32(18).fork()).ldelim();return null!=e.schemaUrl&&Object.hasOwnProperty.call(e,"schemaUrl")&&t.uint32(26).string(e.schemaUrl),t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,i=new o.opentelemetry.proto.trace.v1.ScopeSpans;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:i.scope=o.opentelemetry.proto.common.v1.InstrumentationScope.decode(e,e.uint32());break;case 2:i.spans&&i.spans.length||(i.spans=[]),i.spans.push(o.opentelemetry.proto.trace.v1.Span.decode(e,e.uint32()));break;case 3:i.schemaUrl=e.string();break;default:e.skipType(7&a)}}return i},i.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},i.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.scope&&e.hasOwnProperty("scope")&&(n=o.opentelemetry.proto.common.v1.InstrumentationScope.verify(e.scope)))return"scope."+n;if(null!=e.spans&&e.hasOwnProperty("spans")){if(!Array.isArray(e.spans))return"spans: array expected";for(var t=0;t<e.spans.length;++t){var n;if(n=o.opentelemetry.proto.trace.v1.Span.verify(e.spans[t]))return"spans."+n}}return null!=e.schemaUrl&&e.hasOwnProperty("schemaUrl")&&!r.isString(e.schemaUrl)?"schemaUrl: string expected":null},i.fromObject=function(e){if(e instanceof o.opentelemetry.proto.trace.v1.ScopeSpans)return e;var t=new o.opentelemetry.proto.trace.v1.ScopeSpans;if(null!=e.scope){if("object"!=typeof e.scope)throw TypeError(".opentelemetry.proto.trace.v1.ScopeSpans.scope: object expected");t.scope=o.opentelemetry.proto.common.v1.InstrumentationScope.fromObject(e.scope)}if(e.spans){if(!Array.isArray(e.spans))throw TypeError(".opentelemetry.proto.trace.v1.ScopeSpans.spans: array expected");t.spans=[];for(var n=0;n<e.spans.length;++n){if("object"!=typeof e.spans[n])throw TypeError(".opentelemetry.proto.trace.v1.ScopeSpans.spans: object expected");t.spans[n]=o.opentelemetry.proto.trace.v1.Span.fromObject(e.spans[n])}}return null!=e.schemaUrl&&(t.schemaUrl=String(e.schemaUrl)),t},i.toObject=function(e,t){t||(t={});var n={};if((t.arrays||t.defaults)&&(n.spans=[]),t.defaults&&(n.scope=null,n.schemaUrl=""),null!=e.scope&&e.hasOwnProperty("scope")&&(n.scope=o.opentelemetry.proto.common.v1.InstrumentationScope.toObject(e.scope,t)),e.spans&&e.spans.length){n.spans=[];for(var r=0;r<e.spans.length;++r)n.spans[r]=o.opentelemetry.proto.trace.v1.Span.toObject(e.spans[r],t)}return null!=e.schemaUrl&&e.hasOwnProperty("schemaUrl")&&(n.schemaUrl=e.schemaUrl),n},i.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},i.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/opentelemetry.proto.trace.v1.ScopeSpans"},i}(),i.Span=function(){function i(e){if(this.attributes=[],this.events=[],this.links=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}var a,s;return i.prototype.traceId=null,i.prototype.spanId=null,i.prototype.traceState=null,i.prototype.parentSpanId=null,i.prototype.name=null,i.prototype.kind=null,i.prototype.startTimeUnixNano=null,i.prototype.endTimeUnixNano=null,i.prototype.attributes=r.emptyArray,i.prototype.droppedAttributesCount=null,i.prototype.events=r.emptyArray,i.prototype.droppedEventsCount=null,i.prototype.links=r.emptyArray,i.prototype.droppedLinksCount=null,i.prototype.status=null,i.create=function(e){return new i(e)},i.encode=function(e,t){if(t||(t=n.create()),null!=e.traceId&&Object.hasOwnProperty.call(e,"traceId")&&t.uint32(10).bytes(e.traceId),null!=e.spanId&&Object.hasOwnProperty.call(e,"spanId")&&t.uint32(18).bytes(e.spanId),null!=e.traceState&&Object.hasOwnProperty.call(e,"traceState")&&t.uint32(26).string(e.traceState),null!=e.parentSpanId&&Object.hasOwnProperty.call(e,"parentSpanId")&&t.uint32(34).bytes(e.parentSpanId),null!=e.name&&Object.hasOwnProperty.call(e,"name")&&t.uint32(42).string(e.name),null!=e.kind&&Object.hasOwnProperty.call(e,"kind")&&t.uint32(48).int32(e.kind),null!=e.startTimeUnixNano&&Object.hasOwnProperty.call(e,"startTimeUnixNano")&&t.uint32(57).fixed64(e.startTimeUnixNano),null!=e.endTimeUnixNano&&Object.hasOwnProperty.call(e,"endTimeUnixNano")&&t.uint32(65).fixed64(e.endTimeUnixNano),null!=e.attributes&&e.attributes.length)for(var r=0;r<e.attributes.length;++r)o.opentelemetry.proto.common.v1.KeyValue.encode(e.attributes[r],t.uint32(74).fork()).ldelim();if(null!=e.droppedAttributesCount&&Object.hasOwnProperty.call(e,"droppedAttributesCount")&&t.uint32(80).uint32(e.droppedAttributesCount),null!=e.events&&e.events.length)for(r=0;r<e.events.length;++r)o.opentelemetry.proto.trace.v1.Span.Event.encode(e.events[r],t.uint32(90).fork()).ldelim();if(null!=e.droppedEventsCount&&Object.hasOwnProperty.call(e,"droppedEventsCount")&&t.uint32(96).uint32(e.droppedEventsCount),null!=e.links&&e.links.length)for(r=0;r<e.links.length;++r)o.opentelemetry.proto.trace.v1.Span.Link.encode(e.links[r],t.uint32(106).fork()).ldelim();return null!=e.droppedLinksCount&&Object.hasOwnProperty.call(e,"droppedLinksCount")&&t.uint32(112).uint32(e.droppedLinksCount),null!=e.status&&Object.hasOwnProperty.call(e,"status")&&o.opentelemetry.proto.trace.v1.Status.encode(e.status,t.uint32(122).fork()).ldelim(),t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,i=new o.opentelemetry.proto.trace.v1.Span;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:i.traceId=e.bytes();break;case 2:i.spanId=e.bytes();break;case 3:i.traceState=e.string();break;case 4:i.parentSpanId=e.bytes();break;case 5:i.name=e.string();break;case 6:i.kind=e.int32();break;case 7:i.startTimeUnixNano=e.fixed64();break;case 8:i.endTimeUnixNano=e.fixed64();break;case 9:i.attributes&&i.attributes.length||(i.attributes=[]),i.attributes.push(o.opentelemetry.proto.common.v1.KeyValue.decode(e,e.uint32()));break;case 10:i.droppedAttributesCount=e.uint32();break;case 11:i.events&&i.events.length||(i.events=[]),i.events.push(o.opentelemetry.proto.trace.v1.Span.Event.decode(e,e.uint32()));break;case 12:i.droppedEventsCount=e.uint32();break;case 13:i.links&&i.links.length||(i.links=[]),i.links.push(o.opentelemetry.proto.trace.v1.Span.Link.decode(e,e.uint32()));break;case 14:i.droppedLinksCount=e.uint32();break;case 15:i.status=o.opentelemetry.proto.trace.v1.Status.decode(e,e.uint32());break;default:e.skipType(7&a)}}return i},i.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},i.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.traceId&&e.hasOwnProperty("traceId")&&!(e.traceId&&"number"==typeof e.traceId.length||r.isString(e.traceId)))return"traceId: buffer expected";if(null!=e.spanId&&e.hasOwnProperty("spanId")&&!(e.spanId&&"number"==typeof e.spanId.length||r.isString(e.spanId)))return"spanId: buffer expected";if(null!=e.traceState&&e.hasOwnProperty("traceState")&&!r.isString(e.traceState))return"traceState: string expected";if(null!=e.parentSpanId&&e.hasOwnProperty("parentSpanId")&&!(e.parentSpanId&&"number"==typeof e.parentSpanId.length||r.isString(e.parentSpanId)))return"parentSpanId: buffer expected";if(null!=e.name&&e.hasOwnProperty("name")&&!r.isString(e.name))return"name: string expected";if(null!=e.kind&&e.hasOwnProperty("kind"))switch(e.kind){default:return"kind: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:}if(null!=e.startTimeUnixNano&&e.hasOwnProperty("startTimeUnixNano")&&!(r.isInteger(e.startTimeUnixNano)||e.startTimeUnixNano&&r.isInteger(e.startTimeUnixNano.low)&&r.isInteger(e.startTimeUnixNano.high)))return"startTimeUnixNano: integer|Long expected";if(null!=e.endTimeUnixNano&&e.hasOwnProperty("endTimeUnixNano")&&!(r.isInteger(e.endTimeUnixNano)||e.endTimeUnixNano&&r.isInteger(e.endTimeUnixNano.low)&&r.isInteger(e.endTimeUnixNano.high)))return"endTimeUnixNano: integer|Long expected";if(null!=e.attributes&&e.hasOwnProperty("attributes")){if(!Array.isArray(e.attributes))return"attributes: array expected";for(var t=0;t<e.attributes.length;++t)if(n=o.opentelemetry.proto.common.v1.KeyValue.verify(e.attributes[t]))return"attributes."+n}if(null!=e.droppedAttributesCount&&e.hasOwnProperty("droppedAttributesCount")&&!r.isInteger(e.droppedAttributesCount))return"droppedAttributesCount: integer expected";if(null!=e.events&&e.hasOwnProperty("events")){if(!Array.isArray(e.events))return"events: array expected";for(t=0;t<e.events.length;++t)if(n=o.opentelemetry.proto.trace.v1.Span.Event.verify(e.events[t]))return"events."+n}if(null!=e.droppedEventsCount&&e.hasOwnProperty("droppedEventsCount")&&!r.isInteger(e.droppedEventsCount))return"droppedEventsCount: integer expected";if(null!=e.links&&e.hasOwnProperty("links")){if(!Array.isArray(e.links))return"links: array expected";for(t=0;t<e.links.length;++t)if(n=o.opentelemetry.proto.trace.v1.Span.Link.verify(e.links[t]))return"links."+n}return null!=e.droppedLinksCount&&e.hasOwnProperty("droppedLinksCount")&&!r.isInteger(e.droppedLinksCount)?"droppedLinksCount: integer expected":null!=e.status&&e.hasOwnProperty("status")&&(n=o.opentelemetry.proto.trace.v1.Status.verify(e.status))?"status."+n:null;var n},i.fromObject=function(e){if(e instanceof o.opentelemetry.proto.trace.v1.Span)return e;var t=new o.opentelemetry.proto.trace.v1.Span;switch(null!=e.traceId&&("string"==typeof e.traceId?r.base64.decode(e.traceId,t.traceId=r.newBuffer(r.base64.length(e.traceId)),0):e.traceId.length>=0&&(t.traceId=e.traceId)),null!=e.spanId&&("string"==typeof e.spanId?r.base64.decode(e.spanId,t.spanId=r.newBuffer(r.base64.length(e.spanId)),0):e.spanId.length>=0&&(t.spanId=e.spanId)),null!=e.traceState&&(t.traceState=String(e.traceState)),null!=e.parentSpanId&&("string"==typeof e.parentSpanId?r.base64.decode(e.parentSpanId,t.parentSpanId=r.newBuffer(r.base64.length(e.parentSpanId)),0):e.parentSpanId.length>=0&&(t.parentSpanId=e.parentSpanId)),null!=e.name&&(t.name=String(e.name)),e.kind){default:if("number"==typeof e.kind){t.kind=e.kind;break}break;case"SPAN_KIND_UNSPECIFIED":case 0:t.kind=0;break;case"SPAN_KIND_INTERNAL":case 1:t.kind=1;break;case"SPAN_KIND_SERVER":case 2:t.kind=2;break;case"SPAN_KIND_CLIENT":case 3:t.kind=3;break;case"SPAN_KIND_PRODUCER":case 4:t.kind=4;break;case"SPAN_KIND_CONSUMER":case 5:t.kind=5}if(null!=e.startTimeUnixNano&&(r.Long?(t.startTimeUnixNano=r.Long.fromValue(e.startTimeUnixNano)).unsigned=!1:"string"==typeof e.startTimeUnixNano?t.startTimeUnixNano=parseInt(e.startTimeUnixNano,10):"number"==typeof e.startTimeUnixNano?t.startTimeUnixNano=e.startTimeUnixNano:"object"==typeof e.startTimeUnixNano&&(t.startTimeUnixNano=new r.LongBits(e.startTimeUnixNano.low>>>0,e.startTimeUnixNano.high>>>0).toNumber())),null!=e.endTimeUnixNano&&(r.Long?(t.endTimeUnixNano=r.Long.fromValue(e.endTimeUnixNano)).unsigned=!1:"string"==typeof e.endTimeUnixNano?t.endTimeUnixNano=parseInt(e.endTimeUnixNano,10):"number"==typeof e.endTimeUnixNano?t.endTimeUnixNano=e.endTimeUnixNano:"object"==typeof e.endTimeUnixNano&&(t.endTimeUnixNano=new r.LongBits(e.endTimeUnixNano.low>>>0,e.endTimeUnixNano.high>>>0).toNumber())),e.attributes){if(!Array.isArray(e.attributes))throw TypeError(".opentelemetry.proto.trace.v1.Span.attributes: array expected");t.attributes=[];for(var n=0;n<e.attributes.length;++n){if("object"!=typeof e.attributes[n])throw TypeError(".opentelemetry.proto.trace.v1.Span.attributes: object expected");t.attributes[n]=o.opentelemetry.proto.common.v1.KeyValue.fromObject(e.attributes[n])}}if(null!=e.droppedAttributesCount&&(t.droppedAttributesCount=e.droppedAttributesCount>>>0),e.events){if(!Array.isArray(e.events))throw TypeError(".opentelemetry.proto.trace.v1.Span.events: array expected");for(t.events=[],n=0;n<e.events.length;++n){if("object"!=typeof e.events[n])throw TypeError(".opentelemetry.proto.trace.v1.Span.events: object expected");t.events[n]=o.opentelemetry.proto.trace.v1.Span.Event.fromObject(e.events[n])}}if(null!=e.droppedEventsCount&&(t.droppedEventsCount=e.droppedEventsCount>>>0),e.links){if(!Array.isArray(e.links))throw TypeError(".opentelemetry.proto.trace.v1.Span.links: array expected");for(t.links=[],n=0;n<e.links.length;++n){if("object"!=typeof e.links[n])throw TypeError(".opentelemetry.proto.trace.v1.Span.links: object expected");t.links[n]=o.opentelemetry.proto.trace.v1.Span.Link.fromObject(e.links[n])}}if(null!=e.droppedLinksCount&&(t.droppedLinksCount=e.droppedLinksCount>>>0),null!=e.status){if("object"!=typeof e.status)throw TypeError(".opentelemetry.proto.trace.v1.Span.status: object expected");t.status=o.opentelemetry.proto.trace.v1.Status.fromObject(e.status)}return t},i.toObject=function(e,t){t||(t={});var n={};if((t.arrays||t.defaults)&&(n.attributes=[],n.events=[],n.links=[]),t.defaults){if(t.bytes===String?n.traceId="":(n.traceId=[],t.bytes!==Array&&(n.traceId=r.newBuffer(n.traceId))),t.bytes===String?n.spanId="":(n.spanId=[],t.bytes!==Array&&(n.spanId=r.newBuffer(n.spanId))),n.traceState="",t.bytes===String?n.parentSpanId="":(n.parentSpanId=[],t.bytes!==Array&&(n.parentSpanId=r.newBuffer(n.parentSpanId))),n.name="",n.kind=t.enums===String?"SPAN_KIND_UNSPECIFIED":0,r.Long){var i=new r.Long(0,0,!1);n.startTimeUnixNano=t.longs===String?i.toString():t.longs===Number?i.toNumber():i}else n.startTimeUnixNano=t.longs===String?"0":0;r.Long?(i=new r.Long(0,0,!1),n.endTimeUnixNano=t.longs===String?i.toString():t.longs===Number?i.toNumber():i):n.endTimeUnixNano=t.longs===String?"0":0,n.droppedAttributesCount=0,n.droppedEventsCount=0,n.droppedLinksCount=0,n.status=null}if(null!=e.traceId&&e.hasOwnProperty("traceId")&&(n.traceId=t.bytes===String?r.base64.encode(e.traceId,0,e.traceId.length):t.bytes===Array?Array.prototype.slice.call(e.traceId):e.traceId),null!=e.spanId&&e.hasOwnProperty("spanId")&&(n.spanId=t.bytes===String?r.base64.encode(e.spanId,0,e.spanId.length):t.bytes===Array?Array.prototype.slice.call(e.spanId):e.spanId),null!=e.traceState&&e.hasOwnProperty("traceState")&&(n.traceState=e.traceState),null!=e.parentSpanId&&e.hasOwnProperty("parentSpanId")&&(n.parentSpanId=t.bytes===String?r.base64.encode(e.parentSpanId,0,e.parentSpanId.length):t.bytes===Array?Array.prototype.slice.call(e.parentSpanId):e.parentSpanId),null!=e.name&&e.hasOwnProperty("name")&&(n.name=e.name),null!=e.kind&&e.hasOwnProperty("kind")&&(n.kind=t.enums===String?void 0===o.opentelemetry.proto.trace.v1.Span.SpanKind[e.kind]?e.kind:o.opentelemetry.proto.trace.v1.Span.SpanKind[e.kind]:e.kind),null!=e.startTimeUnixNano&&e.hasOwnProperty("startTimeUnixNano")&&("number"==typeof e.startTimeUnixNano?n.startTimeUnixNano=t.longs===String?String(e.startTimeUnixNano):e.startTimeUnixNano:n.startTimeUnixNano=t.longs===String?r.Long.prototype.toString.call(e.startTimeUnixNano):t.longs===Number?new r.LongBits(e.startTimeUnixNano.low>>>0,e.startTimeUnixNano.high>>>0).toNumber():e.startTimeUnixNano),null!=e.endTimeUnixNano&&e.hasOwnProperty("endTimeUnixNano")&&("number"==typeof e.endTimeUnixNano?n.endTimeUnixNano=t.longs===String?String(e.endTimeUnixNano):e.endTimeUnixNano:n.endTimeUnixNano=t.longs===String?r.Long.prototype.toString.call(e.endTimeUnixNano):t.longs===Number?new r.LongBits(e.endTimeUnixNano.low>>>0,e.endTimeUnixNano.high>>>0).toNumber():e.endTimeUnixNano),e.attributes&&e.attributes.length){n.attributes=[];for(var a=0;a<e.attributes.length;++a)n.attributes[a]=o.opentelemetry.proto.common.v1.KeyValue.toObject(e.attributes[a],t)}if(null!=e.droppedAttributesCount&&e.hasOwnProperty("droppedAttributesCount")&&(n.droppedAttributesCount=e.droppedAttributesCount),e.events&&e.events.length)for(n.events=[],a=0;a<e.events.length;++a)n.events[a]=o.opentelemetry.proto.trace.v1.Span.Event.toObject(e.events[a],t);if(null!=e.droppedEventsCount&&e.hasOwnProperty("droppedEventsCount")&&(n.droppedEventsCount=e.droppedEventsCount),e.links&&e.links.length)for(n.links=[],a=0;a<e.links.length;++a)n.links[a]=o.opentelemetry.proto.trace.v1.Span.Link.toObject(e.links[a],t);return null!=e.droppedLinksCount&&e.hasOwnProperty("droppedLinksCount")&&(n.droppedLinksCount=e.droppedLinksCount),null!=e.status&&e.hasOwnProperty("status")&&(n.status=o.opentelemetry.proto.trace.v1.Status.toObject(e.status,t)),n},i.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},i.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/opentelemetry.proto.trace.v1.Span"},i.SpanKind=(a={},(s=Object.create(a))[a[0]="SPAN_KIND_UNSPECIFIED"]=0,s[a[1]="SPAN_KIND_INTERNAL"]=1,s[a[2]="SPAN_KIND_SERVER"]=2,s[a[3]="SPAN_KIND_CLIENT"]=3,s[a[4]="SPAN_KIND_PRODUCER"]=4,s[a[5]="SPAN_KIND_CONSUMER"]=5,s),i.Event=function(){function i(e){if(this.attributes=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return i.prototype.timeUnixNano=null,i.prototype.name=null,i.prototype.attributes=r.emptyArray,i.prototype.droppedAttributesCount=null,i.create=function(e){return new i(e)},i.encode=function(e,t){if(t||(t=n.create()),null!=e.timeUnixNano&&Object.hasOwnProperty.call(e,"timeUnixNano")&&t.uint32(9).fixed64(e.timeUnixNano),null!=e.name&&Object.hasOwnProperty.call(e,"name")&&t.uint32(18).string(e.name),null!=e.attributes&&e.attributes.length)for(var r=0;r<e.attributes.length;++r)o.opentelemetry.proto.common.v1.KeyValue.encode(e.attributes[r],t.uint32(26).fork()).ldelim();return null!=e.droppedAttributesCount&&Object.hasOwnProperty.call(e,"droppedAttributesCount")&&t.uint32(32).uint32(e.droppedAttributesCount),t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,i=new o.opentelemetry.proto.trace.v1.Span.Event;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:i.timeUnixNano=e.fixed64();break;case 2:i.name=e.string();break;case 3:i.attributes&&i.attributes.length||(i.attributes=[]),i.attributes.push(o.opentelemetry.proto.common.v1.KeyValue.decode(e,e.uint32()));break;case 4:i.droppedAttributesCount=e.uint32();break;default:e.skipType(7&a)}}return i},i.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},i.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.timeUnixNano&&e.hasOwnProperty("timeUnixNano")&&!(r.isInteger(e.timeUnixNano)||e.timeUnixNano&&r.isInteger(e.timeUnixNano.low)&&r.isInteger(e.timeUnixNano.high)))return"timeUnixNano: integer|Long expected";if(null!=e.name&&e.hasOwnProperty("name")&&!r.isString(e.name))return"name: string expected";if(null!=e.attributes&&e.hasOwnProperty("attributes")){if(!Array.isArray(e.attributes))return"attributes: array expected";for(var t=0;t<e.attributes.length;++t){var n=o.opentelemetry.proto.common.v1.KeyValue.verify(e.attributes[t]);if(n)return"attributes."+n}}return null!=e.droppedAttributesCount&&e.hasOwnProperty("droppedAttributesCount")&&!r.isInteger(e.droppedAttributesCount)?"droppedAttributesCount: integer expected":null},i.fromObject=function(e){if(e instanceof o.opentelemetry.proto.trace.v1.Span.Event)return e;var t=new o.opentelemetry.proto.trace.v1.Span.Event;if(null!=e.timeUnixNano&&(r.Long?(t.timeUnixNano=r.Long.fromValue(e.timeUnixNano)).unsigned=!1:"string"==typeof e.timeUnixNano?t.timeUnixNano=parseInt(e.timeUnixNano,10):"number"==typeof e.timeUnixNano?t.timeUnixNano=e.timeUnixNano:"object"==typeof e.timeUnixNano&&(t.timeUnixNano=new r.LongBits(e.timeUnixNano.low>>>0,e.timeUnixNano.high>>>0).toNumber())),null!=e.name&&(t.name=String(e.name)),e.attributes){if(!Array.isArray(e.attributes))throw TypeError(".opentelemetry.proto.trace.v1.Span.Event.attributes: array expected");t.attributes=[];for(var n=0;n<e.attributes.length;++n){if("object"!=typeof e.attributes[n])throw TypeError(".opentelemetry.proto.trace.v1.Span.Event.attributes: object expected");t.attributes[n]=o.opentelemetry.proto.common.v1.KeyValue.fromObject(e.attributes[n])}}return null!=e.droppedAttributesCount&&(t.droppedAttributesCount=e.droppedAttributesCount>>>0),t},i.toObject=function(e,t){t||(t={});var n={};if((t.arrays||t.defaults)&&(n.attributes=[]),t.defaults){if(r.Long){var i=new r.Long(0,0,!1);n.timeUnixNano=t.longs===String?i.toString():t.longs===Number?i.toNumber():i}else n.timeUnixNano=t.longs===String?"0":0;n.name="",n.droppedAttributesCount=0}if(null!=e.timeUnixNano&&e.hasOwnProperty("timeUnixNano")&&("number"==typeof e.timeUnixNano?n.timeUnixNano=t.longs===String?String(e.timeUnixNano):e.timeUnixNano:n.timeUnixNano=t.longs===String?r.Long.prototype.toString.call(e.timeUnixNano):t.longs===Number?new r.LongBits(e.timeUnixNano.low>>>0,e.timeUnixNano.high>>>0).toNumber():e.timeUnixNano),null!=e.name&&e.hasOwnProperty("name")&&(n.name=e.name),e.attributes&&e.attributes.length){n.attributes=[];for(var a=0;a<e.attributes.length;++a)n.attributes[a]=o.opentelemetry.proto.common.v1.KeyValue.toObject(e.attributes[a],t)}return null!=e.droppedAttributesCount&&e.hasOwnProperty("droppedAttributesCount")&&(n.droppedAttributesCount=e.droppedAttributesCount),n},i.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},i.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/opentelemetry.proto.trace.v1.Span.Event"},i}(),i.Link=function(){function i(e){if(this.attributes=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return i.prototype.traceId=null,i.prototype.spanId=null,i.prototype.traceState=null,i.prototype.attributes=r.emptyArray,i.prototype.droppedAttributesCount=null,i.create=function(e){return new i(e)},i.encode=function(e,t){if(t||(t=n.create()),null!=e.traceId&&Object.hasOwnProperty.call(e,"traceId")&&t.uint32(10).bytes(e.traceId),null!=e.spanId&&Object.hasOwnProperty.call(e,"spanId")&&t.uint32(18).bytes(e.spanId),null!=e.traceState&&Object.hasOwnProperty.call(e,"traceState")&&t.uint32(26).string(e.traceState),null!=e.attributes&&e.attributes.length)for(var r=0;r<e.attributes.length;++r)o.opentelemetry.proto.common.v1.KeyValue.encode(e.attributes[r],t.uint32(34).fork()).ldelim();return null!=e.droppedAttributesCount&&Object.hasOwnProperty.call(e,"droppedAttributesCount")&&t.uint32(40).uint32(e.droppedAttributesCount),t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,i=new o.opentelemetry.proto.trace.v1.Span.Link;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:i.traceId=e.bytes();break;case 2:i.spanId=e.bytes();break;case 3:i.traceState=e.string();break;case 4:i.attributes&&i.attributes.length||(i.attributes=[]),i.attributes.push(o.opentelemetry.proto.common.v1.KeyValue.decode(e,e.uint32()));break;case 5:i.droppedAttributesCount=e.uint32();break;default:e.skipType(7&a)}}return i},i.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},i.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.traceId&&e.hasOwnProperty("traceId")&&!(e.traceId&&"number"==typeof e.traceId.length||r.isString(e.traceId)))return"traceId: buffer expected";if(null!=e.spanId&&e.hasOwnProperty("spanId")&&!(e.spanId&&"number"==typeof e.spanId.length||r.isString(e.spanId)))return"spanId: buffer expected";if(null!=e.traceState&&e.hasOwnProperty("traceState")&&!r.isString(e.traceState))return"traceState: string expected";if(null!=e.attributes&&e.hasOwnProperty("attributes")){if(!Array.isArray(e.attributes))return"attributes: array expected";for(var t=0;t<e.attributes.length;++t){var n=o.opentelemetry.proto.common.v1.KeyValue.verify(e.attributes[t]);if(n)return"attributes."+n}}return null!=e.droppedAttributesCount&&e.hasOwnProperty("droppedAttributesCount")&&!r.isInteger(e.droppedAttributesCount)?"droppedAttributesCount: integer expected":null},i.fromObject=function(e){if(e instanceof o.opentelemetry.proto.trace.v1.Span.Link)return e;var t=new o.opentelemetry.proto.trace.v1.Span.Link;if(null!=e.traceId&&("string"==typeof e.traceId?r.base64.decode(e.traceId,t.traceId=r.newBuffer(r.base64.length(e.traceId)),0):e.traceId.length>=0&&(t.traceId=e.traceId)),null!=e.spanId&&("string"==typeof e.spanId?r.base64.decode(e.spanId,t.spanId=r.newBuffer(r.base64.length(e.spanId)),0):e.spanId.length>=0&&(t.spanId=e.spanId)),null!=e.traceState&&(t.traceState=String(e.traceState)),e.attributes){if(!Array.isArray(e.attributes))throw TypeError(".opentelemetry.proto.trace.v1.Span.Link.attributes: array expected");t.attributes=[];for(var n=0;n<e.attributes.length;++n){if("object"!=typeof e.attributes[n])throw TypeError(".opentelemetry.proto.trace.v1.Span.Link.attributes: object expected");t.attributes[n]=o.opentelemetry.proto.common.v1.KeyValue.fromObject(e.attributes[n])}}return null!=e.droppedAttributesCount&&(t.droppedAttributesCount=e.droppedAttributesCount>>>0),t},i.toObject=function(e,t){t||(t={});var n={};if((t.arrays||t.defaults)&&(n.attributes=[]),t.defaults&&(t.bytes===String?n.traceId="":(n.traceId=[],t.bytes!==Array&&(n.traceId=r.newBuffer(n.traceId))),t.bytes===String?n.spanId="":(n.spanId=[],t.bytes!==Array&&(n.spanId=r.newBuffer(n.spanId))),n.traceState="",n.droppedAttributesCount=0),null!=e.traceId&&e.hasOwnProperty("traceId")&&(n.traceId=t.bytes===String?r.base64.encode(e.traceId,0,e.traceId.length):t.bytes===Array?Array.prototype.slice.call(e.traceId):e.traceId),null!=e.spanId&&e.hasOwnProperty("spanId")&&(n.spanId=t.bytes===String?r.base64.encode(e.spanId,0,e.spanId.length):t.bytes===Array?Array.prototype.slice.call(e.spanId):e.spanId),null!=e.traceState&&e.hasOwnProperty("traceState")&&(n.traceState=e.traceState),e.attributes&&e.attributes.length){n.attributes=[];for(var i=0;i<e.attributes.length;++i)n.attributes[i]=o.opentelemetry.proto.common.v1.KeyValue.toObject(e.attributes[i],t)}return null!=e.droppedAttributesCount&&e.hasOwnProperty("droppedAttributesCount")&&(n.droppedAttributesCount=e.droppedAttributesCount),n},i.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},i.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/opentelemetry.proto.trace.v1.Span.Link"},i}(),i}(),i.Status=function(){function i(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}var a,s;return i.prototype.message=null,i.prototype.code=null,i.create=function(e){return new i(e)},i.encode=function(e,t){return t||(t=n.create()),null!=e.message&&Object.hasOwnProperty.call(e,"message")&&t.uint32(18).string(e.message),null!=e.code&&Object.hasOwnProperty.call(e,"code")&&t.uint32(24).int32(e.code),t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,i=new o.opentelemetry.proto.trace.v1.Status;e.pos<r;){var a=e.uint32();switch(a>>>3){case 2:i.message=e.string();break;case 3:i.code=e.int32();break;default:e.skipType(7&a)}}return i},i.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},i.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.message&&e.hasOwnProperty("message")&&!r.isString(e.message))return"message: string expected";if(null!=e.code&&e.hasOwnProperty("code"))switch(e.code){default:return"code: enum value expected";case 0:case 1:case 2:}return null},i.fromObject=function(e){if(e instanceof o.opentelemetry.proto.trace.v1.Status)return e;var t=new o.opentelemetry.proto.trace.v1.Status;switch(null!=e.message&&(t.message=String(e.message)),e.code){default:if("number"==typeof e.code){t.code=e.code;break}break;case"STATUS_CODE_UNSET":case 0:t.code=0;break;case"STATUS_CODE_OK":case 1:t.code=1;break;case"STATUS_CODE_ERROR":case 2:t.code=2}return t},i.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.message="",n.code=t.enums===String?"STATUS_CODE_UNSET":0),null!=e.message&&e.hasOwnProperty("message")&&(n.message=e.message),null!=e.code&&e.hasOwnProperty("code")&&(n.code=t.enums===String?void 0===o.opentelemetry.proto.trace.v1.Status.StatusCode[e.code]?e.code:o.opentelemetry.proto.trace.v1.Status.StatusCode[e.code]:e.code),n},i.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},i.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/opentelemetry.proto.trace.v1.Status"},i.StatusCode=(a={},(s=Object.create(a))[a[0]="STATUS_CODE_UNSET"]=0,s[a[1]="STATUS_CODE_OK"]=1,s[a[2]="STATUS_CODE_ERROR"]=2,s),i}(),i}(),i}(),c.collector=((s={}).trace=function(){var i={};return i.v1=function(){var i={};return i.TraceService=function(){function t(t,n,r){e.rpc.Service.call(this,t,n,r)}return(t.prototype=Object.create(e.rpc.Service.prototype)).constructor=t,t.create=function(e,t,n){return new this(e,t,n)},Object.defineProperty(t.prototype.export=function e(t,n){return this.rpcCall(e,o.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest,o.opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse,t,n)},"name",{value:"Export"}),t}(),i.ExportTraceServiceRequest=function(){function i(e){if(this.resourceSpans=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return i.prototype.resourceSpans=r.emptyArray,i.create=function(e){return new i(e)},i.encode=function(e,t){if(t||(t=n.create()),null!=e.resourceSpans&&e.resourceSpans.length)for(var r=0;r<e.resourceSpans.length;++r)o.opentelemetry.proto.trace.v1.ResourceSpans.encode(e.resourceSpans[r],t.uint32(10).fork()).ldelim();return t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,i=new o.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest;e.pos<r;){var a=e.uint32();a>>>3==1?(i.resourceSpans&&i.resourceSpans.length||(i.resourceSpans=[]),i.resourceSpans.push(o.opentelemetry.proto.trace.v1.ResourceSpans.decode(e,e.uint32()))):e.skipType(7&a)}return i},i.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},i.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.resourceSpans&&e.hasOwnProperty("resourceSpans")){if(!Array.isArray(e.resourceSpans))return"resourceSpans: array expected";for(var t=0;t<e.resourceSpans.length;++t){var n=o.opentelemetry.proto.trace.v1.ResourceSpans.verify(e.resourceSpans[t]);if(n)return"resourceSpans."+n}}return null},i.fromObject=function(e){if(e instanceof o.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest)return e;var t=new o.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest;if(e.resourceSpans){if(!Array.isArray(e.resourceSpans))throw TypeError(".opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest.resourceSpans: array expected");t.resourceSpans=[];for(var n=0;n<e.resourceSpans.length;++n){if("object"!=typeof e.resourceSpans[n])throw TypeError(".opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest.resourceSpans: object expected");t.resourceSpans[n]=o.opentelemetry.proto.trace.v1.ResourceSpans.fromObject(e.resourceSpans[n])}}return t},i.toObject=function(e,t){t||(t={});var n={};if((t.arrays||t.defaults)&&(n.resourceSpans=[]),e.resourceSpans&&e.resourceSpans.length){n.resourceSpans=[];for(var r=0;r<e.resourceSpans.length;++r)n.resourceSpans[r]=o.opentelemetry.proto.trace.v1.ResourceSpans.toObject(e.resourceSpans[r],t)}return n},i.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},i.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest"},i}(),i.ExportTraceServiceResponse=function(){function r(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return r.prototype.partialSuccess=null,r.create=function(e){return new r(e)},r.encode=function(e,t){return t||(t=n.create()),null!=e.partialSuccess&&Object.hasOwnProperty.call(e,"partialSuccess")&&o.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.encode(e.partialSuccess,t.uint32(10).fork()).ldelim(),t},r.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},r.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,i=new o.opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse;e.pos<r;){var a=e.uint32();a>>>3==1?i.partialSuccess=o.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.decode(e,e.uint32()):e.skipType(7&a)}return i},r.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},r.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.partialSuccess&&e.hasOwnProperty("partialSuccess")){var t=o.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.verify(e.partialSuccess);if(t)return"partialSuccess."+t}return null},r.fromObject=function(e){if(e instanceof o.opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse)return e;var t=new o.opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse;if(null!=e.partialSuccess){if("object"!=typeof e.partialSuccess)throw TypeError(".opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse.partialSuccess: object expected");t.partialSuccess=o.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.fromObject(e.partialSuccess)}return t},r.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.partialSuccess=null),null!=e.partialSuccess&&e.hasOwnProperty("partialSuccess")&&(n.partialSuccess=o.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess.toObject(e.partialSuccess,t)),n},r.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},r.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse"},r}(),i.ExportTracePartialSuccess=function(){function i(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return i.prototype.rejectedSpans=null,i.prototype.errorMessage=null,i.create=function(e){return new i(e)},i.encode=function(e,t){return t||(t=n.create()),null!=e.rejectedSpans&&Object.hasOwnProperty.call(e,"rejectedSpans")&&t.uint32(8).int64(e.rejectedSpans),null!=e.errorMessage&&Object.hasOwnProperty.call(e,"errorMessage")&&t.uint32(18).string(e.errorMessage),t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,i=new o.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:i.rejectedSpans=e.int64();break;case 2:i.errorMessage=e.string();break;default:e.skipType(7&a)}}return i},i.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},i.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.rejectedSpans&&e.hasOwnProperty("rejectedSpans")&&!(r.isInteger(e.rejectedSpans)||e.rejectedSpans&&r.isInteger(e.rejectedSpans.low)&&r.isInteger(e.rejectedSpans.high))?"rejectedSpans: integer|Long expected":null!=e.errorMessage&&e.hasOwnProperty("errorMessage")&&!r.isString(e.errorMessage)?"errorMessage: string expected":null},i.fromObject=function(e){if(e instanceof o.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess)return e;var t=new o.opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess;return null!=e.rejectedSpans&&(r.Long?(t.rejectedSpans=r.Long.fromValue(e.rejectedSpans)).unsigned=!1:"string"==typeof e.rejectedSpans?t.rejectedSpans=parseInt(e.rejectedSpans,10):"number"==typeof e.rejectedSpans?t.rejectedSpans=e.rejectedSpans:"object"==typeof e.rejectedSpans&&(t.rejectedSpans=new r.LongBits(e.rejectedSpans.low>>>0,e.rejectedSpans.high>>>0).toNumber())),null!=e.errorMessage&&(t.errorMessage=String(e.errorMessage)),t},i.toObject=function(e,t){t||(t={});var n={};if(t.defaults){if(r.Long){var o=new r.Long(0,0,!1);n.rejectedSpans=t.longs===String?o.toString():t.longs===Number?o.toNumber():o}else n.rejectedSpans=t.longs===String?"0":0;n.errorMessage=""}return null!=e.rejectedSpans&&e.hasOwnProperty("rejectedSpans")&&("number"==typeof e.rejectedSpans?n.rejectedSpans=t.longs===String?String(e.rejectedSpans):e.rejectedSpans:n.rejectedSpans=t.longs===String?r.Long.prototype.toString.call(e.rejectedSpans):t.longs===Number?new r.LongBits(e.rejectedSpans.low>>>0,e.rejectedSpans.high>>>0).toNumber():e.rejectedSpans),null!=e.errorMessage&&e.hasOwnProperty("errorMessage")&&(n.errorMessage=e.errorMessage),n},i.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},i.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/opentelemetry.proto.collector.trace.v1.ExportTracePartialSuccess"},i}(),i}(),i}(),s.metrics=function(){var i={};return i.v1=function(){var i={};return i.MetricsService=function(){function t(t,n,r){e.rpc.Service.call(this,t,n,r)}return(t.prototype=Object.create(e.rpc.Service.prototype)).constructor=t,t.create=function(e,t,n){return new this(e,t,n)},Object.defineProperty(t.prototype.export=function e(t,n){return this.rpcCall(e,o.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest,o.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse,t,n)},"name",{value:"Export"}),t}(),i.ExportMetricsServiceRequest=function(){function i(e){if(this.resourceMetrics=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return i.prototype.resourceMetrics=r.emptyArray,i.create=function(e){return new i(e)},i.encode=function(e,t){if(t||(t=n.create()),null!=e.resourceMetrics&&e.resourceMetrics.length)for(var r=0;r<e.resourceMetrics.length;++r)o.opentelemetry.proto.metrics.v1.ResourceMetrics.encode(e.resourceMetrics[r],t.uint32(10).fork()).ldelim();return t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,i=new o.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest;e.pos<r;){var a=e.uint32();a>>>3==1?(i.resourceMetrics&&i.resourceMetrics.length||(i.resourceMetrics=[]),i.resourceMetrics.push(o.opentelemetry.proto.metrics.v1.ResourceMetrics.decode(e,e.uint32()))):e.skipType(7&a)}return i},i.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},i.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.resourceMetrics&&e.hasOwnProperty("resourceMetrics")){if(!Array.isArray(e.resourceMetrics))return"resourceMetrics: array expected";for(var t=0;t<e.resourceMetrics.length;++t){var n=o.opentelemetry.proto.metrics.v1.ResourceMetrics.verify(e.resourceMetrics[t]);if(n)return"resourceMetrics."+n}}return null},i.fromObject=function(e){if(e instanceof o.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest)return e;var t=new o.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest;if(e.resourceMetrics){if(!Array.isArray(e.resourceMetrics))throw TypeError(".opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest.resourceMetrics: array expected");t.resourceMetrics=[];for(var n=0;n<e.resourceMetrics.length;++n){if("object"!=typeof e.resourceMetrics[n])throw TypeError(".opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest.resourceMetrics: object expected");t.resourceMetrics[n]=o.opentelemetry.proto.metrics.v1.ResourceMetrics.fromObject(e.resourceMetrics[n])}}return t},i.toObject=function(e,t){t||(t={});var n={};if((t.arrays||t.defaults)&&(n.resourceMetrics=[]),e.resourceMetrics&&e.resourceMetrics.length){n.resourceMetrics=[];for(var r=0;r<e.resourceMetrics.length;++r)n.resourceMetrics[r]=o.opentelemetry.proto.metrics.v1.ResourceMetrics.toObject(e.resourceMetrics[r],t)}return n},i.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},i.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest"},i}(),i.ExportMetricsServiceResponse=function(){function r(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return r.prototype.partialSuccess=null,r.create=function(e){return new r(e)},r.encode=function(e,t){return t||(t=n.create()),null!=e.partialSuccess&&Object.hasOwnProperty.call(e,"partialSuccess")&&o.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.encode(e.partialSuccess,t.uint32(10).fork()).ldelim(),t},r.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},r.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,i=new o.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse;e.pos<r;){var a=e.uint32();a>>>3==1?i.partialSuccess=o.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.decode(e,e.uint32()):e.skipType(7&a)}return i},r.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},r.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.partialSuccess&&e.hasOwnProperty("partialSuccess")){var t=o.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.verify(e.partialSuccess);if(t)return"partialSuccess."+t}return null},r.fromObject=function(e){if(e instanceof o.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse)return e;var t=new o.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse;if(null!=e.partialSuccess){if("object"!=typeof e.partialSuccess)throw TypeError(".opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse.partialSuccess: object expected");t.partialSuccess=o.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.fromObject(e.partialSuccess)}return t},r.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.partialSuccess=null),null!=e.partialSuccess&&e.hasOwnProperty("partialSuccess")&&(n.partialSuccess=o.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess.toObject(e.partialSuccess,t)),n},r.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},r.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse"},r}(),i.ExportMetricsPartialSuccess=function(){function i(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return i.prototype.rejectedDataPoints=null,i.prototype.errorMessage=null,i.create=function(e){return new i(e)},i.encode=function(e,t){return t||(t=n.create()),null!=e.rejectedDataPoints&&Object.hasOwnProperty.call(e,"rejectedDataPoints")&&t.uint32(8).int64(e.rejectedDataPoints),null!=e.errorMessage&&Object.hasOwnProperty.call(e,"errorMessage")&&t.uint32(18).string(e.errorMessage),t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,i=new o.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:i.rejectedDataPoints=e.int64();break;case 2:i.errorMessage=e.string();break;default:e.skipType(7&a)}}return i},i.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},i.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.rejectedDataPoints&&e.hasOwnProperty("rejectedDataPoints")&&!(r.isInteger(e.rejectedDataPoints)||e.rejectedDataPoints&&r.isInteger(e.rejectedDataPoints.low)&&r.isInteger(e.rejectedDataPoints.high))?"rejectedDataPoints: integer|Long expected":null!=e.errorMessage&&e.hasOwnProperty("errorMessage")&&!r.isString(e.errorMessage)?"errorMessage: string expected":null},i.fromObject=function(e){if(e instanceof o.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess)return e;var t=new o.opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess;return null!=e.rejectedDataPoints&&(r.Long?(t.rejectedDataPoints=r.Long.fromValue(e.rejectedDataPoints)).unsigned=!1:"string"==typeof e.rejectedDataPoints?t.rejectedDataPoints=parseInt(e.rejectedDataPoints,10):"number"==typeof e.rejectedDataPoints?t.rejectedDataPoints=e.rejectedDataPoints:"object"==typeof e.rejectedDataPoints&&(t.rejectedDataPoints=new r.LongBits(e.rejectedDataPoints.low>>>0,e.rejectedDataPoints.high>>>0).toNumber())),null!=e.errorMessage&&(t.errorMessage=String(e.errorMessage)),t},i.toObject=function(e,t){t||(t={});var n={};if(t.defaults){if(r.Long){var o=new r.Long(0,0,!1);n.rejectedDataPoints=t.longs===String?o.toString():t.longs===Number?o.toNumber():o}else n.rejectedDataPoints=t.longs===String?"0":0;n.errorMessage=""}return null!=e.rejectedDataPoints&&e.hasOwnProperty("rejectedDataPoints")&&("number"==typeof e.rejectedDataPoints?n.rejectedDataPoints=t.longs===String?String(e.rejectedDataPoints):e.rejectedDataPoints:n.rejectedDataPoints=t.longs===String?r.Long.prototype.toString.call(e.rejectedDataPoints):t.longs===Number?new r.LongBits(e.rejectedDataPoints.low>>>0,e.rejectedDataPoints.high>>>0).toNumber():e.rejectedDataPoints),null!=e.errorMessage&&e.hasOwnProperty("errorMessage")&&(n.errorMessage=e.errorMessage),n},i.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},i.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/opentelemetry.proto.collector.metrics.v1.ExportMetricsPartialSuccess"},i}(),i}(),i}(),s.logs=function(){var i={};return i.v1=function(){var i={};return i.LogsService=function(){function t(t,n,r){e.rpc.Service.call(this,t,n,r)}return(t.prototype=Object.create(e.rpc.Service.prototype)).constructor=t,t.create=function(e,t,n){return new this(e,t,n)},Object.defineProperty(t.prototype.export=function e(t,n){return this.rpcCall(e,o.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest,o.opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse,t,n)},"name",{value:"Export"}),t}(),i.ExportLogsServiceRequest=function(){function i(e){if(this.resourceLogs=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return i.prototype.resourceLogs=r.emptyArray,i.create=function(e){return new i(e)},i.encode=function(e,t){if(t||(t=n.create()),null!=e.resourceLogs&&e.resourceLogs.length)for(var r=0;r<e.resourceLogs.length;++r)o.opentelemetry.proto.logs.v1.ResourceLogs.encode(e.resourceLogs[r],t.uint32(10).fork()).ldelim();return t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,i=new o.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest;e.pos<r;){var a=e.uint32();a>>>3==1?(i.resourceLogs&&i.resourceLogs.length||(i.resourceLogs=[]),i.resourceLogs.push(o.opentelemetry.proto.logs.v1.ResourceLogs.decode(e,e.uint32()))):e.skipType(7&a)}return i},i.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},i.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.resourceLogs&&e.hasOwnProperty("resourceLogs")){if(!Array.isArray(e.resourceLogs))return"resourceLogs: array expected";for(var t=0;t<e.resourceLogs.length;++t){var n=o.opentelemetry.proto.logs.v1.ResourceLogs.verify(e.resourceLogs[t]);if(n)return"resourceLogs."+n}}return null},i.fromObject=function(e){if(e instanceof o.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest)return e;var t=new o.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest;if(e.resourceLogs){if(!Array.isArray(e.resourceLogs))throw TypeError(".opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest.resourceLogs: array expected");t.resourceLogs=[];for(var n=0;n<e.resourceLogs.length;++n){if("object"!=typeof e.resourceLogs[n])throw TypeError(".opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest.resourceLogs: object expected");t.resourceLogs[n]=o.opentelemetry.proto.logs.v1.ResourceLogs.fromObject(e.resourceLogs[n])}}return t},i.toObject=function(e,t){t||(t={});var n={};if((t.arrays||t.defaults)&&(n.resourceLogs=[]),e.resourceLogs&&e.resourceLogs.length){n.resourceLogs=[];for(var r=0;r<e.resourceLogs.length;++r)n.resourceLogs[r]=o.opentelemetry.proto.logs.v1.ResourceLogs.toObject(e.resourceLogs[r],t)}return n},i.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},i.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest"},i}(),i.ExportLogsServiceResponse=function(){function r(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return r.prototype.partialSuccess=null,r.create=function(e){return new r(e)},r.encode=function(e,t){return t||(t=n.create()),null!=e.partialSuccess&&Object.hasOwnProperty.call(e,"partialSuccess")&&o.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.encode(e.partialSuccess,t.uint32(10).fork()).ldelim(),t},r.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},r.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,i=new o.opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse;e.pos<r;){var a=e.uint32();a>>>3==1?i.partialSuccess=o.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.decode(e,e.uint32()):e.skipType(7&a)}return i},r.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},r.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.partialSuccess&&e.hasOwnProperty("partialSuccess")){var t=o.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.verify(e.partialSuccess);if(t)return"partialSuccess."+t}return null},r.fromObject=function(e){if(e instanceof o.opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse)return e;var t=new o.opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse;if(null!=e.partialSuccess){if("object"!=typeof e.partialSuccess)throw TypeError(".opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse.partialSuccess: object expected");t.partialSuccess=o.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.fromObject(e.partialSuccess)}return t},r.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.partialSuccess=null),null!=e.partialSuccess&&e.hasOwnProperty("partialSuccess")&&(n.partialSuccess=o.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess.toObject(e.partialSuccess,t)),n},r.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},r.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse"},r}(),i.ExportLogsPartialSuccess=function(){function i(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return i.prototype.rejectedLogRecords=null,i.prototype.errorMessage=null,i.create=function(e){return new i(e)},i.encode=function(e,t){return t||(t=n.create()),null!=e.rejectedLogRecords&&Object.hasOwnProperty.call(e,"rejectedLogRecords")&&t.uint32(8).int64(e.rejectedLogRecords),null!=e.errorMessage&&Object.hasOwnProperty.call(e,"errorMessage")&&t.uint32(18).string(e.errorMessage),t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,i=new o.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:i.rejectedLogRecords=e.int64();break;case 2:i.errorMessage=e.string();break;default:e.skipType(7&a)}}return i},i.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},i.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.rejectedLogRecords&&e.hasOwnProperty("rejectedLogRecords")&&!(r.isInteger(e.rejectedLogRecords)||e.rejectedLogRecords&&r.isInteger(e.rejectedLogRecords.low)&&r.isInteger(e.rejectedLogRecords.high))?"rejectedLogRecords: integer|Long expected":null!=e.errorMessage&&e.hasOwnProperty("errorMessage")&&!r.isString(e.errorMessage)?"errorMessage: string expected":null},i.fromObject=function(e){if(e instanceof o.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess)return e;var t=new o.opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess;return null!=e.rejectedLogRecords&&(r.Long?(t.rejectedLogRecords=r.Long.fromValue(e.rejectedLogRecords)).unsigned=!1:"string"==typeof e.rejectedLogRecords?t.rejectedLogRecords=parseInt(e.rejectedLogRecords,10):"number"==typeof e.rejectedLogRecords?t.rejectedLogRecords=e.rejectedLogRecords:"object"==typeof e.rejectedLogRecords&&(t.rejectedLogRecords=new r.LongBits(e.rejectedLogRecords.low>>>0,e.rejectedLogRecords.high>>>0).toNumber())),null!=e.errorMessage&&(t.errorMessage=String(e.errorMessage)),t},i.toObject=function(e,t){t||(t={});var n={};if(t.defaults){if(r.Long){var o=new r.Long(0,0,!1);n.rejectedLogRecords=t.longs===String?o.toString():t.longs===Number?o.toNumber():o}else n.rejectedLogRecords=t.longs===String?"0":0;n.errorMessage=""}return null!=e.rejectedLogRecords&&e.hasOwnProperty("rejectedLogRecords")&&("number"==typeof e.rejectedLogRecords?n.rejectedLogRecords=t.longs===String?String(e.rejectedLogRecords):e.rejectedLogRecords:n.rejectedLogRecords=t.longs===String?r.Long.prototype.toString.call(e.rejectedLogRecords):t.longs===Number?new r.LongBits(e.rejectedLogRecords.low>>>0,e.rejectedLogRecords.high>>>0).toNumber():e.rejectedLogRecords),null!=e.errorMessage&&e.hasOwnProperty("errorMessage")&&(n.errorMessage=e.errorMessage),n},i.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},i.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/opentelemetry.proto.collector.logs.v1.ExportLogsPartialSuccess"},i}(),i}(),i}(),s),c.metrics=function(){var i={};return i.v1=function(){var i,a,s={};return s.MetricsData=function(){function i(e){if(this.resourceMetrics=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return i.prototype.resourceMetrics=r.emptyArray,i.create=function(e){return new i(e)},i.encode=function(e,t){if(t||(t=n.create()),null!=e.resourceMetrics&&e.resourceMetrics.length)for(var r=0;r<e.resourceMetrics.length;++r)o.opentelemetry.proto.metrics.v1.ResourceMetrics.encode(e.resourceMetrics[r],t.uint32(10).fork()).ldelim();return t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,i=new o.opentelemetry.proto.metrics.v1.MetricsData;e.pos<r;){var a=e.uint32();a>>>3==1?(i.resourceMetrics&&i.resourceMetrics.length||(i.resourceMetrics=[]),i.resourceMetrics.push(o.opentelemetry.proto.metrics.v1.ResourceMetrics.decode(e,e.uint32()))):e.skipType(7&a)}return i},i.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},i.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.resourceMetrics&&e.hasOwnProperty("resourceMetrics")){if(!Array.isArray(e.resourceMetrics))return"resourceMetrics: array expected";for(var t=0;t<e.resourceMetrics.length;++t){var n=o.opentelemetry.proto.metrics.v1.ResourceMetrics.verify(e.resourceMetrics[t]);if(n)return"resourceMetrics."+n}}return null},i.fromObject=function(e){if(e instanceof o.opentelemetry.proto.metrics.v1.MetricsData)return e;var t=new o.opentelemetry.proto.metrics.v1.MetricsData;if(e.resourceMetrics){if(!Array.isArray(e.resourceMetrics))throw TypeError(".opentelemetry.proto.metrics.v1.MetricsData.resourceMetrics: array expected");t.resourceMetrics=[];for(var n=0;n<e.resourceMetrics.length;++n){if("object"!=typeof e.resourceMetrics[n])throw TypeError(".opentelemetry.proto.metrics.v1.MetricsData.resourceMetrics: object expected");t.resourceMetrics[n]=o.opentelemetry.proto.metrics.v1.ResourceMetrics.fromObject(e.resourceMetrics[n])}}return t},i.toObject=function(e,t){t||(t={});var n={};if((t.arrays||t.defaults)&&(n.resourceMetrics=[]),e.resourceMetrics&&e.resourceMetrics.length){n.resourceMetrics=[];for(var r=0;r<e.resourceMetrics.length;++r)n.resourceMetrics[r]=o.opentelemetry.proto.metrics.v1.ResourceMetrics.toObject(e.resourceMetrics[r],t)}return n},i.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},i.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/opentelemetry.proto.metrics.v1.MetricsData"},i}(),s.ResourceMetrics=function(){function i(e){if(this.scopeMetrics=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return i.prototype.resource=null,i.prototype.scopeMetrics=r.emptyArray,i.prototype.schemaUrl=null,i.create=function(e){return new i(e)},i.encode=function(e,t){if(t||(t=n.create()),null!=e.resource&&Object.hasOwnProperty.call(e,"resource")&&o.opentelemetry.proto.resource.v1.Resource.encode(e.resource,t.uint32(10).fork()).ldelim(),null!=e.scopeMetrics&&e.scopeMetrics.length)for(var r=0;r<e.scopeMetrics.length;++r)o.opentelemetry.proto.metrics.v1.ScopeMetrics.encode(e.scopeMetrics[r],t.uint32(18).fork()).ldelim();return null!=e.schemaUrl&&Object.hasOwnProperty.call(e,"schemaUrl")&&t.uint32(26).string(e.schemaUrl),t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,i=new o.opentelemetry.proto.metrics.v1.ResourceMetrics;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:i.resource=o.opentelemetry.proto.resource.v1.Resource.decode(e,e.uint32());break;case 2:i.scopeMetrics&&i.scopeMetrics.length||(i.scopeMetrics=[]),i.scopeMetrics.push(o.opentelemetry.proto.metrics.v1.ScopeMetrics.decode(e,e.uint32()));break;case 3:i.schemaUrl=e.string();break;default:e.skipType(7&a)}}return i},i.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},i.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.resource&&e.hasOwnProperty("resource")&&(n=o.opentelemetry.proto.resource.v1.Resource.verify(e.resource)))return"resource."+n;if(null!=e.scopeMetrics&&e.hasOwnProperty("scopeMetrics")){if(!Array.isArray(e.scopeMetrics))return"scopeMetrics: array expected";for(var t=0;t<e.scopeMetrics.length;++t){var n;if(n=o.opentelemetry.proto.metrics.v1.ScopeMetrics.verify(e.scopeMetrics[t]))return"scopeMetrics."+n}}return null!=e.schemaUrl&&e.hasOwnProperty("schemaUrl")&&!r.isString(e.schemaUrl)?"schemaUrl: string expected":null},i.fromObject=function(e){if(e instanceof o.opentelemetry.proto.metrics.v1.ResourceMetrics)return e;var t=new o.opentelemetry.proto.metrics.v1.ResourceMetrics;if(null!=e.resource){if("object"!=typeof e.resource)throw TypeError(".opentelemetry.proto.metrics.v1.ResourceMetrics.resource: object expected");t.resource=o.opentelemetry.proto.resource.v1.Resource.fromObject(e.resource)}if(e.scopeMetrics){if(!Array.isArray(e.scopeMetrics))throw TypeError(".opentelemetry.proto.metrics.v1.ResourceMetrics.scopeMetrics: array expected");t.scopeMetrics=[];for(var n=0;n<e.scopeMetrics.length;++n){if("object"!=typeof e.scopeMetrics[n])throw TypeError(".opentelemetry.proto.metrics.v1.ResourceMetrics.scopeMetrics: object expected");t.scopeMetrics[n]=o.opentelemetry.proto.metrics.v1.ScopeMetrics.fromObject(e.scopeMetrics[n])}}return null!=e.schemaUrl&&(t.schemaUrl=String(e.schemaUrl)),t},i.toObject=function(e,t){t||(t={});var n={};if((t.arrays||t.defaults)&&(n.scopeMetrics=[]),t.defaults&&(n.resource=null,n.schemaUrl=""),null!=e.resource&&e.hasOwnProperty("resource")&&(n.resource=o.opentelemetry.proto.resource.v1.Resource.toObject(e.resource,t)),e.scopeMetrics&&e.scopeMetrics.length){n.scopeMetrics=[];for(var r=0;r<e.scopeMetrics.length;++r)n.scopeMetrics[r]=o.opentelemetry.proto.metrics.v1.ScopeMetrics.toObject(e.scopeMetrics[r],t)}return null!=e.schemaUrl&&e.hasOwnProperty("schemaUrl")&&(n.schemaUrl=e.schemaUrl),n},i.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},i.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/opentelemetry.proto.metrics.v1.ResourceMetrics"},i}(),s.ScopeMetrics=function(){function i(e){if(this.metrics=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return i.prototype.scope=null,i.prototype.metrics=r.emptyArray,i.prototype.schemaUrl=null,i.create=function(e){return new i(e)},i.encode=function(e,t){if(t||(t=n.create()),null!=e.scope&&Object.hasOwnProperty.call(e,"scope")&&o.opentelemetry.proto.common.v1.InstrumentationScope.encode(e.scope,t.uint32(10).fork()).ldelim(),null!=e.metrics&&e.metrics.length)for(var r=0;r<e.metrics.length;++r)o.opentelemetry.proto.metrics.v1.Metric.encode(e.metrics[r],t.uint32(18).fork()).ldelim();return null!=e.schemaUrl&&Object.hasOwnProperty.call(e,"schemaUrl")&&t.uint32(26).string(e.schemaUrl),t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,i=new o.opentelemetry.proto.metrics.v1.ScopeMetrics;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:i.scope=o.opentelemetry.proto.common.v1.InstrumentationScope.decode(e,e.uint32());break;case 2:i.metrics&&i.metrics.length||(i.metrics=[]),i.metrics.push(o.opentelemetry.proto.metrics.v1.Metric.decode(e,e.uint32()));break;case 3:i.schemaUrl=e.string();break;default:e.skipType(7&a)}}return i},i.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},i.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.scope&&e.hasOwnProperty("scope")&&(n=o.opentelemetry.proto.common.v1.InstrumentationScope.verify(e.scope)))return"scope."+n;if(null!=e.metrics&&e.hasOwnProperty("metrics")){if(!Array.isArray(e.metrics))return"metrics: array expected";for(var t=0;t<e.metrics.length;++t){var n;if(n=o.opentelemetry.proto.metrics.v1.Metric.verify(e.metrics[t]))return"metrics."+n}}return null!=e.schemaUrl&&e.hasOwnProperty("schemaUrl")&&!r.isString(e.schemaUrl)?"schemaUrl: string expected":null},i.fromObject=function(e){if(e instanceof o.opentelemetry.proto.metrics.v1.ScopeMetrics)return e;var t=new o.opentelemetry.proto.metrics.v1.ScopeMetrics;if(null!=e.scope){if("object"!=typeof e.scope)throw TypeError(".opentelemetry.proto.metrics.v1.ScopeMetrics.scope: object expected");t.scope=o.opentelemetry.proto.common.v1.InstrumentationScope.fromObject(e.scope)}if(e.metrics){if(!Array.isArray(e.metrics))throw TypeError(".opentelemetry.proto.metrics.v1.ScopeMetrics.metrics: array expected");t.metrics=[];for(var n=0;n<e.metrics.length;++n){if("object"!=typeof e.metrics[n])throw TypeError(".opentelemetry.proto.metrics.v1.ScopeMetrics.metrics: object expected");t.metrics[n]=o.opentelemetry.proto.metrics.v1.Metric.fromObject(e.metrics[n])}}return null!=e.schemaUrl&&(t.schemaUrl=String(e.schemaUrl)),t},i.toObject=function(e,t){t||(t={});var n={};if((t.arrays||t.defaults)&&(n.metrics=[]),t.defaults&&(n.scope=null,n.schemaUrl=""),null!=e.scope&&e.hasOwnProperty("scope")&&(n.scope=o.opentelemetry.proto.common.v1.InstrumentationScope.toObject(e.scope,t)),e.metrics&&e.metrics.length){n.metrics=[];for(var r=0;r<e.metrics.length;++r)n.metrics[r]=o.opentelemetry.proto.metrics.v1.Metric.toObject(e.metrics[r],t)}return null!=e.schemaUrl&&e.hasOwnProperty("schemaUrl")&&(n.schemaUrl=e.schemaUrl),n},i.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},i.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/opentelemetry.proto.metrics.v1.ScopeMetrics"},i}(),s.Metric=function(){function i(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}var a;return i.prototype.name=null,i.prototype.description=null,i.prototype.unit=null,i.prototype.gauge=null,i.prototype.sum=null,i.prototype.histogram=null,i.prototype.exponentialHistogram=null,i.prototype.summary=null,Object.defineProperty(i.prototype,"data",{get:r.oneOfGetter(a=["gauge","sum","histogram","exponentialHistogram","summary"]),set:r.oneOfSetter(a)}),i.create=function(e){return new i(e)},i.encode=function(e,t){return t||(t=n.create()),null!=e.name&&Object.hasOwnProperty.call(e,"name")&&t.uint32(10).string(e.name),null!=e.description&&Object.hasOwnProperty.call(e,"description")&&t.uint32(18).string(e.description),null!=e.unit&&Object.hasOwnProperty.call(e,"unit")&&t.uint32(26).string(e.unit),null!=e.gauge&&Object.hasOwnProperty.call(e,"gauge")&&o.opentelemetry.proto.metrics.v1.Gauge.encode(e.gauge,t.uint32(42).fork()).ldelim(),null!=e.sum&&Object.hasOwnProperty.call(e,"sum")&&o.opentelemetry.proto.metrics.v1.Sum.encode(e.sum,t.uint32(58).fork()).ldelim(),null!=e.histogram&&Object.hasOwnProperty.call(e,"histogram")&&o.opentelemetry.proto.metrics.v1.Histogram.encode(e.histogram,t.uint32(74).fork()).ldelim(),null!=e.exponentialHistogram&&Object.hasOwnProperty.call(e,"exponentialHistogram")&&o.opentelemetry.proto.metrics.v1.ExponentialHistogram.encode(e.exponentialHistogram,t.uint32(82).fork()).ldelim(),null!=e.summary&&Object.hasOwnProperty.call(e,"summary")&&o.opentelemetry.proto.metrics.v1.Summary.encode(e.summary,t.uint32(90).fork()).ldelim(),t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,i=new o.opentelemetry.proto.metrics.v1.Metric;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:i.name=e.string();break;case 2:i.description=e.string();break;case 3:i.unit=e.string();break;case 5:i.gauge=o.opentelemetry.proto.metrics.v1.Gauge.decode(e,e.uint32());break;case 7:i.sum=o.opentelemetry.proto.metrics.v1.Sum.decode(e,e.uint32());break;case 9:i.histogram=o.opentelemetry.proto.metrics.v1.Histogram.decode(e,e.uint32());break;case 10:i.exponentialHistogram=o.opentelemetry.proto.metrics.v1.ExponentialHistogram.decode(e,e.uint32());break;case 11:i.summary=o.opentelemetry.proto.metrics.v1.Summary.decode(e,e.uint32());break;default:e.skipType(7&a)}}return i},i.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},i.verify=function(e){if("object"!=typeof e||null===e)return"object expected";var t={};if(null!=e.name&&e.hasOwnProperty("name")&&!r.isString(e.name))return"name: string expected";if(null!=e.description&&e.hasOwnProperty("description")&&!r.isString(e.description))return"description: string expected";if(null!=e.unit&&e.hasOwnProperty("unit")&&!r.isString(e.unit))return"unit: string expected";if(null!=e.gauge&&e.hasOwnProperty("gauge")&&(t.data=1,n=o.opentelemetry.proto.metrics.v1.Gauge.verify(e.gauge)))return"gauge."+n;if(null!=e.sum&&e.hasOwnProperty("sum")){if(1===t.data)return"data: multiple values";if(t.data=1,n=o.opentelemetry.proto.metrics.v1.Sum.verify(e.sum))return"sum."+n}if(null!=e.histogram&&e.hasOwnProperty("histogram")){if(1===t.data)return"data: multiple values";if(t.data=1,n=o.opentelemetry.proto.metrics.v1.Histogram.verify(e.histogram))return"histogram."+n}if(null!=e.exponentialHistogram&&e.hasOwnProperty("exponentialHistogram")){if(1===t.data)return"data: multiple values";if(t.data=1,n=o.opentelemetry.proto.metrics.v1.ExponentialHistogram.verify(e.exponentialHistogram))return"exponentialHistogram."+n}if(null!=e.summary&&e.hasOwnProperty("summary")){if(1===t.data)return"data: multiple values";var n;if(t.data=1,n=o.opentelemetry.proto.metrics.v1.Summary.verify(e.summary))return"summary."+n}return null},i.fromObject=function(e){if(e instanceof o.opentelemetry.proto.metrics.v1.Metric)return e;var t=new o.opentelemetry.proto.metrics.v1.Metric;if(null!=e.name&&(t.name=String(e.name)),null!=e.description&&(t.description=String(e.description)),null!=e.unit&&(t.unit=String(e.unit)),null!=e.gauge){if("object"!=typeof e.gauge)throw TypeError(".opentelemetry.proto.metrics.v1.Metric.gauge: object expected");t.gauge=o.opentelemetry.proto.metrics.v1.Gauge.fromObject(e.gauge)}if(null!=e.sum){if("object"!=typeof e.sum)throw TypeError(".opentelemetry.proto.metrics.v1.Metric.sum: object expected");t.sum=o.opentelemetry.proto.metrics.v1.Sum.fromObject(e.sum)}if(null!=e.histogram){if("object"!=typeof e.histogram)throw TypeError(".opentelemetry.proto.metrics.v1.Metric.histogram: object expected");t.histogram=o.opentelemetry.proto.metrics.v1.Histogram.fromObject(e.histogram)}if(null!=e.exponentialHistogram){if("object"!=typeof e.exponentialHistogram)throw TypeError(".opentelemetry.proto.metrics.v1.Metric.exponentialHistogram: object expected");t.exponentialHistogram=o.opentelemetry.proto.metrics.v1.ExponentialHistogram.fromObject(e.exponentialHistogram)}if(null!=e.summary){if("object"!=typeof e.summary)throw TypeError(".opentelemetry.proto.metrics.v1.Metric.summary: object expected");t.summary=o.opentelemetry.proto.metrics.v1.Summary.fromObject(e.summary)}return t},i.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.name="",n.description="",n.unit=""),null!=e.name&&e.hasOwnProperty("name")&&(n.name=e.name),null!=e.description&&e.hasOwnProperty("description")&&(n.description=e.description),null!=e.unit&&e.hasOwnProperty("unit")&&(n.unit=e.unit),null!=e.gauge&&e.hasOwnProperty("gauge")&&(n.gauge=o.opentelemetry.proto.metrics.v1.Gauge.toObject(e.gauge,t),t.oneofs&&(n.data="gauge")),null!=e.sum&&e.hasOwnProperty("sum")&&(n.sum=o.opentelemetry.proto.metrics.v1.Sum.toObject(e.sum,t),t.oneofs&&(n.data="sum")),null!=e.histogram&&e.hasOwnProperty("histogram")&&(n.histogram=o.opentelemetry.proto.metrics.v1.Histogram.toObject(e.histogram,t),t.oneofs&&(n.data="histogram")),null!=e.exponentialHistogram&&e.hasOwnProperty("exponentialHistogram")&&(n.exponentialHistogram=o.opentelemetry.proto.metrics.v1.ExponentialHistogram.toObject(e.exponentialHistogram,t),t.oneofs&&(n.data="exponentialHistogram")),null!=e.summary&&e.hasOwnProperty("summary")&&(n.summary=o.opentelemetry.proto.metrics.v1.Summary.toObject(e.summary,t),t.oneofs&&(n.data="summary")),n},i.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},i.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/opentelemetry.proto.metrics.v1.Metric"},i}(),s.Gauge=function(){function i(e){if(this.dataPoints=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return i.prototype.dataPoints=r.emptyArray,i.create=function(e){return new i(e)},i.encode=function(e,t){if(t||(t=n.create()),null!=e.dataPoints&&e.dataPoints.length)for(var r=0;r<e.dataPoints.length;++r)o.opentelemetry.proto.metrics.v1.NumberDataPoint.encode(e.dataPoints[r],t.uint32(10).fork()).ldelim();return t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,i=new o.opentelemetry.proto.metrics.v1.Gauge;e.pos<r;){var a=e.uint32();a>>>3==1?(i.dataPoints&&i.dataPoints.length||(i.dataPoints=[]),i.dataPoints.push(o.opentelemetry.proto.metrics.v1.NumberDataPoint.decode(e,e.uint32()))):e.skipType(7&a)}return i},i.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},i.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.dataPoints&&e.hasOwnProperty("dataPoints")){if(!Array.isArray(e.dataPoints))return"dataPoints: array expected";for(var t=0;t<e.dataPoints.length;++t){var n=o.opentelemetry.proto.metrics.v1.NumberDataPoint.verify(e.dataPoints[t]);if(n)return"dataPoints."+n}}return null},i.fromObject=function(e){if(e instanceof o.opentelemetry.proto.metrics.v1.Gauge)return e;var t=new o.opentelemetry.proto.metrics.v1.Gauge;if(e.dataPoints){if(!Array.isArray(e.dataPoints))throw TypeError(".opentelemetry.proto.metrics.v1.Gauge.dataPoints: array expected");t.dataPoints=[];for(var n=0;n<e.dataPoints.length;++n){if("object"!=typeof e.dataPoints[n])throw TypeError(".opentelemetry.proto.metrics.v1.Gauge.dataPoints: object expected");t.dataPoints[n]=o.opentelemetry.proto.metrics.v1.NumberDataPoint.fromObject(e.dataPoints[n])}}return t},i.toObject=function(e,t){t||(t={});var n={};if((t.arrays||t.defaults)&&(n.dataPoints=[]),e.dataPoints&&e.dataPoints.length){n.dataPoints=[];for(var r=0;r<e.dataPoints.length;++r)n.dataPoints[r]=o.opentelemetry.proto.metrics.v1.NumberDataPoint.toObject(e.dataPoints[r],t)}return n},i.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},i.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/opentelemetry.proto.metrics.v1.Gauge"},i}(),s.Sum=function(){function i(e){if(this.dataPoints=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return i.prototype.dataPoints=r.emptyArray,i.prototype.aggregationTemporality=null,i.prototype.isMonotonic=null,i.create=function(e){return new i(e)},i.encode=function(e,t){if(t||(t=n.create()),null!=e.dataPoints&&e.dataPoints.length)for(var r=0;r<e.dataPoints.length;++r)o.opentelemetry.proto.metrics.v1.NumberDataPoint.encode(e.dataPoints[r],t.uint32(10).fork()).ldelim();return null!=e.aggregationTemporality&&Object.hasOwnProperty.call(e,"aggregationTemporality")&&t.uint32(16).int32(e.aggregationTemporality),null!=e.isMonotonic&&Object.hasOwnProperty.call(e,"isMonotonic")&&t.uint32(24).bool(e.isMonotonic),t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,i=new o.opentelemetry.proto.metrics.v1.Sum;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:i.dataPoints&&i.dataPoints.length||(i.dataPoints=[]),i.dataPoints.push(o.opentelemetry.proto.metrics.v1.NumberDataPoint.decode(e,e.uint32()));break;case 2:i.aggregationTemporality=e.int32();break;case 3:i.isMonotonic=e.bool();break;default:e.skipType(7&a)}}return i},i.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},i.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.dataPoints&&e.hasOwnProperty("dataPoints")){if(!Array.isArray(e.dataPoints))return"dataPoints: array expected";for(var t=0;t<e.dataPoints.length;++t){var n=o.opentelemetry.proto.metrics.v1.NumberDataPoint.verify(e.dataPoints[t]);if(n)return"dataPoints."+n}}if(null!=e.aggregationTemporality&&e.hasOwnProperty("aggregationTemporality"))switch(e.aggregationTemporality){default:return"aggregationTemporality: enum value expected";case 0:case 1:case 2:}return null!=e.isMonotonic&&e.hasOwnProperty("isMonotonic")&&"boolean"!=typeof e.isMonotonic?"isMonotonic: boolean expected":null},i.fromObject=function(e){if(e instanceof o.opentelemetry.proto.metrics.v1.Sum)return e;var t=new o.opentelemetry.proto.metrics.v1.Sum;if(e.dataPoints){if(!Array.isArray(e.dataPoints))throw TypeError(".opentelemetry.proto.metrics.v1.Sum.dataPoints: array expected");t.dataPoints=[];for(var n=0;n<e.dataPoints.length;++n){if("object"!=typeof e.dataPoints[n])throw TypeError(".opentelemetry.proto.metrics.v1.Sum.dataPoints: object expected");t.dataPoints[n]=o.opentelemetry.proto.metrics.v1.NumberDataPoint.fromObject(e.dataPoints[n])}}switch(e.aggregationTemporality){default:if("number"==typeof e.aggregationTemporality){t.aggregationTemporality=e.aggregationTemporality;break}break;case"AGGREGATION_TEMPORALITY_UNSPECIFIED":case 0:t.aggregationTemporality=0;break;case"AGGREGATION_TEMPORALITY_DELTA":case 1:t.aggregationTemporality=1;break;case"AGGREGATION_TEMPORALITY_CUMULATIVE":case 2:t.aggregationTemporality=2}return null!=e.isMonotonic&&(t.isMonotonic=Boolean(e.isMonotonic)),t},i.toObject=function(e,t){t||(t={});var n={};if((t.arrays||t.defaults)&&(n.dataPoints=[]),t.defaults&&(n.aggregationTemporality=t.enums===String?"AGGREGATION_TEMPORALITY_UNSPECIFIED":0,n.isMonotonic=!1),e.dataPoints&&e.dataPoints.length){n.dataPoints=[];for(var r=0;r<e.dataPoints.length;++r)n.dataPoints[r]=o.opentelemetry.proto.metrics.v1.NumberDataPoint.toObject(e.dataPoints[r],t)}return null!=e.aggregationTemporality&&e.hasOwnProperty("aggregationTemporality")&&(n.aggregationTemporality=t.enums===String?void 0===o.opentelemetry.proto.metrics.v1.AggregationTemporality[e.aggregationTemporality]?e.aggregationTemporality:o.opentelemetry.proto.metrics.v1.AggregationTemporality[e.aggregationTemporality]:e.aggregationTemporality),null!=e.isMonotonic&&e.hasOwnProperty("isMonotonic")&&(n.isMonotonic=e.isMonotonic),n},i.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},i.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/opentelemetry.proto.metrics.v1.Sum"},i}(),s.Histogram=function(){function i(e){if(this.dataPoints=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return i.prototype.dataPoints=r.emptyArray,i.prototype.aggregationTemporality=null,i.create=function(e){return new i(e)},i.encode=function(e,t){if(t||(t=n.create()),null!=e.dataPoints&&e.dataPoints.length)for(var r=0;r<e.dataPoints.length;++r)o.opentelemetry.proto.metrics.v1.HistogramDataPoint.encode(e.dataPoints[r],t.uint32(10).fork()).ldelim();return null!=e.aggregationTemporality&&Object.hasOwnProperty.call(e,"aggregationTemporality")&&t.uint32(16).int32(e.aggregationTemporality),t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,i=new o.opentelemetry.proto.metrics.v1.Histogram;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:i.dataPoints&&i.dataPoints.length||(i.dataPoints=[]),i.dataPoints.push(o.opentelemetry.proto.metrics.v1.HistogramDataPoint.decode(e,e.uint32()));break;case 2:i.aggregationTemporality=e.int32();break;default:e.skipType(7&a)}}return i},i.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},i.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.dataPoints&&e.hasOwnProperty("dataPoints")){if(!Array.isArray(e.dataPoints))return"dataPoints: array expected";for(var t=0;t<e.dataPoints.length;++t){var n=o.opentelemetry.proto.metrics.v1.HistogramDataPoint.verify(e.dataPoints[t]);if(n)return"dataPoints."+n}}if(null!=e.aggregationTemporality&&e.hasOwnProperty("aggregationTemporality"))switch(e.aggregationTemporality){default:return"aggregationTemporality: enum value expected";case 0:case 1:case 2:}return null},i.fromObject=function(e){if(e instanceof o.opentelemetry.proto.metrics.v1.Histogram)return e;var t=new o.opentelemetry.proto.metrics.v1.Histogram;if(e.dataPoints){if(!Array.isArray(e.dataPoints))throw TypeError(".opentelemetry.proto.metrics.v1.Histogram.dataPoints: array expected");t.dataPoints=[];for(var n=0;n<e.dataPoints.length;++n){if("object"!=typeof e.dataPoints[n])throw TypeError(".opentelemetry.proto.metrics.v1.Histogram.dataPoints: object expected");t.dataPoints[n]=o.opentelemetry.proto.metrics.v1.HistogramDataPoint.fromObject(e.dataPoints[n])}}switch(e.aggregationTemporality){default:if("number"==typeof e.aggregationTemporality){t.aggregationTemporality=e.aggregationTemporality;break}break;case"AGGREGATION_TEMPORALITY_UNSPECIFIED":case 0:t.aggregationTemporality=0;break;case"AGGREGATION_TEMPORALITY_DELTA":case 1:t.aggregationTemporality=1;break;case"AGGREGATION_TEMPORALITY_CUMULATIVE":case 2:t.aggregationTemporality=2}return t},i.toObject=function(e,t){t||(t={});var n={};if((t.arrays||t.defaults)&&(n.dataPoints=[]),t.defaults&&(n.aggregationTemporality=t.enums===String?"AGGREGATION_TEMPORALITY_UNSPECIFIED":0),e.dataPoints&&e.dataPoints.length){n.dataPoints=[];for(var r=0;r<e.dataPoints.length;++r)n.dataPoints[r]=o.opentelemetry.proto.metrics.v1.HistogramDataPoint.toObject(e.dataPoints[r],t)}return null!=e.aggregationTemporality&&e.hasOwnProperty("aggregationTemporality")&&(n.aggregationTemporality=t.enums===String?void 0===o.opentelemetry.proto.metrics.v1.AggregationTemporality[e.aggregationTemporality]?e.aggregationTemporality:o.opentelemetry.proto.metrics.v1.AggregationTemporality[e.aggregationTemporality]:e.aggregationTemporality),n},i.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},i.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/opentelemetry.proto.metrics.v1.Histogram"},i}(),s.ExponentialHistogram=function(){function i(e){if(this.dataPoints=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return i.prototype.dataPoints=r.emptyArray,i.prototype.aggregationTemporality=null,i.create=function(e){return new i(e)},i.encode=function(e,t){if(t||(t=n.create()),null!=e.dataPoints&&e.dataPoints.length)for(var r=0;r<e.dataPoints.length;++r)o.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.encode(e.dataPoints[r],t.uint32(10).fork()).ldelim();return null!=e.aggregationTemporality&&Object.hasOwnProperty.call(e,"aggregationTemporality")&&t.uint32(16).int32(e.aggregationTemporality),t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,i=new o.opentelemetry.proto.metrics.v1.ExponentialHistogram;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:i.dataPoints&&i.dataPoints.length||(i.dataPoints=[]),i.dataPoints.push(o.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.decode(e,e.uint32()));break;case 2:i.aggregationTemporality=e.int32();break;default:e.skipType(7&a)}}return i},i.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},i.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.dataPoints&&e.hasOwnProperty("dataPoints")){if(!Array.isArray(e.dataPoints))return"dataPoints: array expected";for(var t=0;t<e.dataPoints.length;++t){var n=o.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.verify(e.dataPoints[t]);if(n)return"dataPoints."+n}}if(null!=e.aggregationTemporality&&e.hasOwnProperty("aggregationTemporality"))switch(e.aggregationTemporality){default:return"aggregationTemporality: enum value expected";case 0:case 1:case 2:}return null},i.fromObject=function(e){if(e instanceof o.opentelemetry.proto.metrics.v1.ExponentialHistogram)return e;var t=new o.opentelemetry.proto.metrics.v1.ExponentialHistogram;if(e.dataPoints){if(!Array.isArray(e.dataPoints))throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogram.dataPoints: array expected");t.dataPoints=[];for(var n=0;n<e.dataPoints.length;++n){if("object"!=typeof e.dataPoints[n])throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogram.dataPoints: object expected");t.dataPoints[n]=o.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.fromObject(e.dataPoints[n])}}switch(e.aggregationTemporality){default:if("number"==typeof e.aggregationTemporality){t.aggregationTemporality=e.aggregationTemporality;break}break;case"AGGREGATION_TEMPORALITY_UNSPECIFIED":case 0:t.aggregationTemporality=0;break;case"AGGREGATION_TEMPORALITY_DELTA":case 1:t.aggregationTemporality=1;break;case"AGGREGATION_TEMPORALITY_CUMULATIVE":case 2:t.aggregationTemporality=2}return t},i.toObject=function(e,t){t||(t={});var n={};if((t.arrays||t.defaults)&&(n.dataPoints=[]),t.defaults&&(n.aggregationTemporality=t.enums===String?"AGGREGATION_TEMPORALITY_UNSPECIFIED":0),e.dataPoints&&e.dataPoints.length){n.dataPoints=[];for(var r=0;r<e.dataPoints.length;++r)n.dataPoints[r]=o.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.toObject(e.dataPoints[r],t)}return null!=e.aggregationTemporality&&e.hasOwnProperty("aggregationTemporality")&&(n.aggregationTemporality=t.enums===String?void 0===o.opentelemetry.proto.metrics.v1.AggregationTemporality[e.aggregationTemporality]?e.aggregationTemporality:o.opentelemetry.proto.metrics.v1.AggregationTemporality[e.aggregationTemporality]:e.aggregationTemporality),n},i.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},i.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/opentelemetry.proto.metrics.v1.ExponentialHistogram"},i}(),s.Summary=function(){function i(e){if(this.dataPoints=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return i.prototype.dataPoints=r.emptyArray,i.create=function(e){return new i(e)},i.encode=function(e,t){if(t||(t=n.create()),null!=e.dataPoints&&e.dataPoints.length)for(var r=0;r<e.dataPoints.length;++r)o.opentelemetry.proto.metrics.v1.SummaryDataPoint.encode(e.dataPoints[r],t.uint32(10).fork()).ldelim();return t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,i=new o.opentelemetry.proto.metrics.v1.Summary;e.pos<r;){var a=e.uint32();a>>>3==1?(i.dataPoints&&i.dataPoints.length||(i.dataPoints=[]),i.dataPoints.push(o.opentelemetry.proto.metrics.v1.SummaryDataPoint.decode(e,e.uint32()))):e.skipType(7&a)}return i},i.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},i.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.dataPoints&&e.hasOwnProperty("dataPoints")){if(!Array.isArray(e.dataPoints))return"dataPoints: array expected";for(var t=0;t<e.dataPoints.length;++t){var n=o.opentelemetry.proto.metrics.v1.SummaryDataPoint.verify(e.dataPoints[t]);if(n)return"dataPoints."+n}}return null},i.fromObject=function(e){if(e instanceof o.opentelemetry.proto.metrics.v1.Summary)return e;var t=new o.opentelemetry.proto.metrics.v1.Summary;if(e.dataPoints){if(!Array.isArray(e.dataPoints))throw TypeError(".opentelemetry.proto.metrics.v1.Summary.dataPoints: array expected");t.dataPoints=[];for(var n=0;n<e.dataPoints.length;++n){if("object"!=typeof e.dataPoints[n])throw TypeError(".opentelemetry.proto.metrics.v1.Summary.dataPoints: object expected");t.dataPoints[n]=o.opentelemetry.proto.metrics.v1.SummaryDataPoint.fromObject(e.dataPoints[n])}}return t},i.toObject=function(e,t){t||(t={});var n={};if((t.arrays||t.defaults)&&(n.dataPoints=[]),e.dataPoints&&e.dataPoints.length){n.dataPoints=[];for(var r=0;r<e.dataPoints.length;++r)n.dataPoints[r]=o.opentelemetry.proto.metrics.v1.SummaryDataPoint.toObject(e.dataPoints[r],t)}return n},i.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},i.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/opentelemetry.proto.metrics.v1.Summary"},i}(),s.AggregationTemporality=(i={},(a=Object.create(i))[i[0]="AGGREGATION_TEMPORALITY_UNSPECIFIED"]=0,a[i[1]="AGGREGATION_TEMPORALITY_DELTA"]=1,a[i[2]="AGGREGATION_TEMPORALITY_CUMULATIVE"]=2,a),s.DataPointFlags=function(){var e={},t=Object.create(e);return t[e[0]="DATA_POINT_FLAGS_DO_NOT_USE"]=0,t[e[1]="DATA_POINT_FLAGS_NO_RECORDED_VALUE_MASK"]=1,t}(),s.NumberDataPoint=function(){function i(e){if(this.attributes=[],this.exemplars=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}var a;return i.prototype.attributes=r.emptyArray,i.prototype.startTimeUnixNano=null,i.prototype.timeUnixNano=null,i.prototype.asDouble=null,i.prototype.asInt=null,i.prototype.exemplars=r.emptyArray,i.prototype.flags=null,Object.defineProperty(i.prototype,"value",{get:r.oneOfGetter(a=["asDouble","asInt"]),set:r.oneOfSetter(a)}),i.create=function(e){return new i(e)},i.encode=function(e,t){if(t||(t=n.create()),null!=e.startTimeUnixNano&&Object.hasOwnProperty.call(e,"startTimeUnixNano")&&t.uint32(17).fixed64(e.startTimeUnixNano),null!=e.timeUnixNano&&Object.hasOwnProperty.call(e,"timeUnixNano")&&t.uint32(25).fixed64(e.timeUnixNano),null!=e.asDouble&&Object.hasOwnProperty.call(e,"asDouble")&&t.uint32(33).double(e.asDouble),null!=e.exemplars&&e.exemplars.length)for(var r=0;r<e.exemplars.length;++r)o.opentelemetry.proto.metrics.v1.Exemplar.encode(e.exemplars[r],t.uint32(42).fork()).ldelim();if(null!=e.asInt&&Object.hasOwnProperty.call(e,"asInt")&&t.uint32(49).sfixed64(e.asInt),null!=e.attributes&&e.attributes.length)for(r=0;r<e.attributes.length;++r)o.opentelemetry.proto.common.v1.KeyValue.encode(e.attributes[r],t.uint32(58).fork()).ldelim();return null!=e.flags&&Object.hasOwnProperty.call(e,"flags")&&t.uint32(64).uint32(e.flags),t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,i=new o.opentelemetry.proto.metrics.v1.NumberDataPoint;e.pos<r;){var a=e.uint32();switch(a>>>3){case 7:i.attributes&&i.attributes.length||(i.attributes=[]),i.attributes.push(o.opentelemetry.proto.common.v1.KeyValue.decode(e,e.uint32()));break;case 2:i.startTimeUnixNano=e.fixed64();break;case 3:i.timeUnixNano=e.fixed64();break;case 4:i.asDouble=e.double();break;case 6:i.asInt=e.sfixed64();break;case 5:i.exemplars&&i.exemplars.length||(i.exemplars=[]),i.exemplars.push(o.opentelemetry.proto.metrics.v1.Exemplar.decode(e,e.uint32()));break;case 8:i.flags=e.uint32();break;default:e.skipType(7&a)}}return i},i.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},i.verify=function(e){if("object"!=typeof e||null===e)return"object expected";var t={};if(null!=e.attributes&&e.hasOwnProperty("attributes")){if(!Array.isArray(e.attributes))return"attributes: array expected";for(var n=0;n<e.attributes.length;++n)if(i=o.opentelemetry.proto.common.v1.KeyValue.verify(e.attributes[n]))return"attributes."+i}if(null!=e.startTimeUnixNano&&e.hasOwnProperty("startTimeUnixNano")&&!(r.isInteger(e.startTimeUnixNano)||e.startTimeUnixNano&&r.isInteger(e.startTimeUnixNano.low)&&r.isInteger(e.startTimeUnixNano.high)))return"startTimeUnixNano: integer|Long expected";if(null!=e.timeUnixNano&&e.hasOwnProperty("timeUnixNano")&&!(r.isInteger(e.timeUnixNano)||e.timeUnixNano&&r.isInteger(e.timeUnixNano.low)&&r.isInteger(e.timeUnixNano.high)))return"timeUnixNano: integer|Long expected";if(null!=e.asDouble&&e.hasOwnProperty("asDouble")&&(t.value=1,"number"!=typeof e.asDouble))return"asDouble: number expected";if(null!=e.asInt&&e.hasOwnProperty("asInt")){if(1===t.value)return"value: multiple values";if(t.value=1,!(r.isInteger(e.asInt)||e.asInt&&r.isInteger(e.asInt.low)&&r.isInteger(e.asInt.high)))return"asInt: integer|Long expected"}if(null!=e.exemplars&&e.hasOwnProperty("exemplars")){if(!Array.isArray(e.exemplars))return"exemplars: array expected";for(n=0;n<e.exemplars.length;++n){var i;if(i=o.opentelemetry.proto.metrics.v1.Exemplar.verify(e.exemplars[n]))return"exemplars."+i}}return null!=e.flags&&e.hasOwnProperty("flags")&&!r.isInteger(e.flags)?"flags: integer expected":null},i.fromObject=function(e){if(e instanceof o.opentelemetry.proto.metrics.v1.NumberDataPoint)return e;var t=new o.opentelemetry.proto.metrics.v1.NumberDataPoint;if(e.attributes){if(!Array.isArray(e.attributes))throw TypeError(".opentelemetry.proto.metrics.v1.NumberDataPoint.attributes: array expected");t.attributes=[];for(var n=0;n<e.attributes.length;++n){if("object"!=typeof e.attributes[n])throw TypeError(".opentelemetry.proto.metrics.v1.NumberDataPoint.attributes: object expected");t.attributes[n]=o.opentelemetry.proto.common.v1.KeyValue.fromObject(e.attributes[n])}}if(null!=e.startTimeUnixNano&&(r.Long?(t.startTimeUnixNano=r.Long.fromValue(e.startTimeUnixNano)).unsigned=!1:"string"==typeof e.startTimeUnixNano?t.startTimeUnixNano=parseInt(e.startTimeUnixNano,10):"number"==typeof e.startTimeUnixNano?t.startTimeUnixNano=e.startTimeUnixNano:"object"==typeof e.startTimeUnixNano&&(t.startTimeUnixNano=new r.LongBits(e.startTimeUnixNano.low>>>0,e.startTimeUnixNano.high>>>0).toNumber())),null!=e.timeUnixNano&&(r.Long?(t.timeUnixNano=r.Long.fromValue(e.timeUnixNano)).unsigned=!1:"string"==typeof e.timeUnixNano?t.timeUnixNano=parseInt(e.timeUnixNano,10):"number"==typeof e.timeUnixNano?t.timeUnixNano=e.timeUnixNano:"object"==typeof e.timeUnixNano&&(t.timeUnixNano=new r.LongBits(e.timeUnixNano.low>>>0,e.timeUnixNano.high>>>0).toNumber())),null!=e.asDouble&&(t.asDouble=Number(e.asDouble)),null!=e.asInt&&(r.Long?(t.asInt=r.Long.fromValue(e.asInt)).unsigned=!1:"string"==typeof e.asInt?t.asInt=parseInt(e.asInt,10):"number"==typeof e.asInt?t.asInt=e.asInt:"object"==typeof e.asInt&&(t.asInt=new r.LongBits(e.asInt.low>>>0,e.asInt.high>>>0).toNumber())),e.exemplars){if(!Array.isArray(e.exemplars))throw TypeError(".opentelemetry.proto.metrics.v1.NumberDataPoint.exemplars: array expected");for(t.exemplars=[],n=0;n<e.exemplars.length;++n){if("object"!=typeof e.exemplars[n])throw TypeError(".opentelemetry.proto.metrics.v1.NumberDataPoint.exemplars: object expected");t.exemplars[n]=o.opentelemetry.proto.metrics.v1.Exemplar.fromObject(e.exemplars[n])}}return null!=e.flags&&(t.flags=e.flags>>>0),t},i.toObject=function(e,t){t||(t={});var n={};if((t.arrays||t.defaults)&&(n.exemplars=[],n.attributes=[]),t.defaults){if(r.Long){var i=new r.Long(0,0,!1);n.startTimeUnixNano=t.longs===String?i.toString():t.longs===Number?i.toNumber():i}else n.startTimeUnixNano=t.longs===String?"0":0;r.Long?(i=new r.Long(0,0,!1),n.timeUnixNano=t.longs===String?i.toString():t.longs===Number?i.toNumber():i):n.timeUnixNano=t.longs===String?"0":0,n.flags=0}if(null!=e.startTimeUnixNano&&e.hasOwnProperty("startTimeUnixNano")&&("number"==typeof e.startTimeUnixNano?n.startTimeUnixNano=t.longs===String?String(e.startTimeUnixNano):e.startTimeUnixNano:n.startTimeUnixNano=t.longs===String?r.Long.prototype.toString.call(e.startTimeUnixNano):t.longs===Number?new r.LongBits(e.startTimeUnixNano.low>>>0,e.startTimeUnixNano.high>>>0).toNumber():e.startTimeUnixNano),null!=e.timeUnixNano&&e.hasOwnProperty("timeUnixNano")&&("number"==typeof e.timeUnixNano?n.timeUnixNano=t.longs===String?String(e.timeUnixNano):e.timeUnixNano:n.timeUnixNano=t.longs===String?r.Long.prototype.toString.call(e.timeUnixNano):t.longs===Number?new r.LongBits(e.timeUnixNano.low>>>0,e.timeUnixNano.high>>>0).toNumber():e.timeUnixNano),null!=e.asDouble&&e.hasOwnProperty("asDouble")&&(n.asDouble=t.json&&!isFinite(e.asDouble)?String(e.asDouble):e.asDouble,t.oneofs&&(n.value="asDouble")),e.exemplars&&e.exemplars.length){n.exemplars=[];for(var a=0;a<e.exemplars.length;++a)n.exemplars[a]=o.opentelemetry.proto.metrics.v1.Exemplar.toObject(e.exemplars[a],t)}if(null!=e.asInt&&e.hasOwnProperty("asInt")&&("number"==typeof e.asInt?n.asInt=t.longs===String?String(e.asInt):e.asInt:n.asInt=t.longs===String?r.Long.prototype.toString.call(e.asInt):t.longs===Number?new r.LongBits(e.asInt.low>>>0,e.asInt.high>>>0).toNumber():e.asInt,t.oneofs&&(n.value="asInt")),e.attributes&&e.attributes.length)for(n.attributes=[],a=0;a<e.attributes.length;++a)n.attributes[a]=o.opentelemetry.proto.common.v1.KeyValue.toObject(e.attributes[a],t);return null!=e.flags&&e.hasOwnProperty("flags")&&(n.flags=e.flags),n},i.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},i.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/opentelemetry.proto.metrics.v1.NumberDataPoint"},i}(),s.HistogramDataPoint=function(){function i(e){if(this.attributes=[],this.bucketCounts=[],this.explicitBounds=[],this.exemplars=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}var a;return i.prototype.attributes=r.emptyArray,i.prototype.startTimeUnixNano=null,i.prototype.timeUnixNano=null,i.prototype.count=null,i.prototype.sum=null,i.prototype.bucketCounts=r.emptyArray,i.prototype.explicitBounds=r.emptyArray,i.prototype.exemplars=r.emptyArray,i.prototype.flags=null,i.prototype.min=null,i.prototype.max=null,Object.defineProperty(i.prototype,"_sum",{get:r.oneOfGetter(a=["sum"]),set:r.oneOfSetter(a)}),Object.defineProperty(i.prototype,"_min",{get:r.oneOfGetter(a=["min"]),set:r.oneOfSetter(a)}),Object.defineProperty(i.prototype,"_max",{get:r.oneOfGetter(a=["max"]),set:r.oneOfSetter(a)}),i.create=function(e){return new i(e)},i.encode=function(e,t){if(t||(t=n.create()),null!=e.startTimeUnixNano&&Object.hasOwnProperty.call(e,"startTimeUnixNano")&&t.uint32(17).fixed64(e.startTimeUnixNano),null!=e.timeUnixNano&&Object.hasOwnProperty.call(e,"timeUnixNano")&&t.uint32(25).fixed64(e.timeUnixNano),null!=e.count&&Object.hasOwnProperty.call(e,"count")&&t.uint32(33).fixed64(e.count),null!=e.sum&&Object.hasOwnProperty.call(e,"sum")&&t.uint32(41).double(e.sum),null!=e.bucketCounts&&e.bucketCounts.length){t.uint32(50).fork();for(var r=0;r<e.bucketCounts.length;++r)t.fixed64(e.bucketCounts[r]);t.ldelim()}if(null!=e.explicitBounds&&e.explicitBounds.length){for(t.uint32(58).fork(),r=0;r<e.explicitBounds.length;++r)t.double(e.explicitBounds[r]);t.ldelim()}if(null!=e.exemplars&&e.exemplars.length)for(r=0;r<e.exemplars.length;++r)o.opentelemetry.proto.metrics.v1.Exemplar.encode(e.exemplars[r],t.uint32(66).fork()).ldelim();if(null!=e.attributes&&e.attributes.length)for(r=0;r<e.attributes.length;++r)o.opentelemetry.proto.common.v1.KeyValue.encode(e.attributes[r],t.uint32(74).fork()).ldelim();return null!=e.flags&&Object.hasOwnProperty.call(e,"flags")&&t.uint32(80).uint32(e.flags),null!=e.min&&Object.hasOwnProperty.call(e,"min")&&t.uint32(89).double(e.min),null!=e.max&&Object.hasOwnProperty.call(e,"max")&&t.uint32(97).double(e.max),t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,i=new o.opentelemetry.proto.metrics.v1.HistogramDataPoint;e.pos<r;){var a=e.uint32();switch(a>>>3){case 9:i.attributes&&i.attributes.length||(i.attributes=[]),i.attributes.push(o.opentelemetry.proto.common.v1.KeyValue.decode(e,e.uint32()));break;case 2:i.startTimeUnixNano=e.fixed64();break;case 3:i.timeUnixNano=e.fixed64();break;case 4:i.count=e.fixed64();break;case 5:i.sum=e.double();break;case 6:if(i.bucketCounts&&i.bucketCounts.length||(i.bucketCounts=[]),2==(7&a))for(var s=e.uint32()+e.pos;e.pos<s;)i.bucketCounts.push(e.fixed64());else i.bucketCounts.push(e.fixed64());break;case 7:if(i.explicitBounds&&i.explicitBounds.length||(i.explicitBounds=[]),2==(7&a))for(s=e.uint32()+e.pos;e.pos<s;)i.explicitBounds.push(e.double());else i.explicitBounds.push(e.double());break;case 8:i.exemplars&&i.exemplars.length||(i.exemplars=[]),i.exemplars.push(o.opentelemetry.proto.metrics.v1.Exemplar.decode(e,e.uint32()));break;case 10:i.flags=e.uint32();break;case 11:i.min=e.double();break;case 12:i.max=e.double();break;default:e.skipType(7&a)}}return i},i.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},i.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.attributes&&e.hasOwnProperty("attributes")){if(!Array.isArray(e.attributes))return"attributes: array expected";for(var t=0;t<e.attributes.length;++t)if(n=o.opentelemetry.proto.common.v1.KeyValue.verify(e.attributes[t]))return"attributes."+n}if(null!=e.startTimeUnixNano&&e.hasOwnProperty("startTimeUnixNano")&&!(r.isInteger(e.startTimeUnixNano)||e.startTimeUnixNano&&r.isInteger(e.startTimeUnixNano.low)&&r.isInteger(e.startTimeUnixNano.high)))return"startTimeUnixNano: integer|Long expected";if(null!=e.timeUnixNano&&e.hasOwnProperty("timeUnixNano")&&!(r.isInteger(e.timeUnixNano)||e.timeUnixNano&&r.isInteger(e.timeUnixNano.low)&&r.isInteger(e.timeUnixNano.high)))return"timeUnixNano: integer|Long expected";if(null!=e.count&&e.hasOwnProperty("count")&&!(r.isInteger(e.count)||e.count&&r.isInteger(e.count.low)&&r.isInteger(e.count.high)))return"count: integer|Long expected";if(null!=e.sum&&e.hasOwnProperty("sum")&&"number"!=typeof e.sum)return"sum: number expected";if(null!=e.bucketCounts&&e.hasOwnProperty("bucketCounts")){if(!Array.isArray(e.bucketCounts))return"bucketCounts: array expected";for(t=0;t<e.bucketCounts.length;++t)if(!(r.isInteger(e.bucketCounts[t])||e.bucketCounts[t]&&r.isInteger(e.bucketCounts[t].low)&&r.isInteger(e.bucketCounts[t].high)))return"bucketCounts: integer|Long[] expected"}if(null!=e.explicitBounds&&e.hasOwnProperty("explicitBounds")){if(!Array.isArray(e.explicitBounds))return"explicitBounds: array expected";for(t=0;t<e.explicitBounds.length;++t)if("number"!=typeof e.explicitBounds[t])return"explicitBounds: number[] expected"}if(null!=e.exemplars&&e.hasOwnProperty("exemplars")){if(!Array.isArray(e.exemplars))return"exemplars: array expected";for(t=0;t<e.exemplars.length;++t){var n;if(n=o.opentelemetry.proto.metrics.v1.Exemplar.verify(e.exemplars[t]))return"exemplars."+n}}return null!=e.flags&&e.hasOwnProperty("flags")&&!r.isInteger(e.flags)?"flags: integer expected":null!=e.min&&e.hasOwnProperty("min")&&"number"!=typeof e.min?"min: number expected":null!=e.max&&e.hasOwnProperty("max")&&"number"!=typeof e.max?"max: number expected":null},i.fromObject=function(e){if(e instanceof o.opentelemetry.proto.metrics.v1.HistogramDataPoint)return e;var t=new o.opentelemetry.proto.metrics.v1.HistogramDataPoint;if(e.attributes){if(!Array.isArray(e.attributes))throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.attributes: array expected");t.attributes=[];for(var n=0;n<e.attributes.length;++n){if("object"!=typeof e.attributes[n])throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.attributes: object expected");t.attributes[n]=o.opentelemetry.proto.common.v1.KeyValue.fromObject(e.attributes[n])}}if(null!=e.startTimeUnixNano&&(r.Long?(t.startTimeUnixNano=r.Long.fromValue(e.startTimeUnixNano)).unsigned=!1:"string"==typeof e.startTimeUnixNano?t.startTimeUnixNano=parseInt(e.startTimeUnixNano,10):"number"==typeof e.startTimeUnixNano?t.startTimeUnixNano=e.startTimeUnixNano:"object"==typeof e.startTimeUnixNano&&(t.startTimeUnixNano=new r.LongBits(e.startTimeUnixNano.low>>>0,e.startTimeUnixNano.high>>>0).toNumber())),null!=e.timeUnixNano&&(r.Long?(t.timeUnixNano=r.Long.fromValue(e.timeUnixNano)).unsigned=!1:"string"==typeof e.timeUnixNano?t.timeUnixNano=parseInt(e.timeUnixNano,10):"number"==typeof e.timeUnixNano?t.timeUnixNano=e.timeUnixNano:"object"==typeof e.timeUnixNano&&(t.timeUnixNano=new r.LongBits(e.timeUnixNano.low>>>0,e.timeUnixNano.high>>>0).toNumber())),null!=e.count&&(r.Long?(t.count=r.Long.fromValue(e.count)).unsigned=!1:"string"==typeof e.count?t.count=parseInt(e.count,10):"number"==typeof e.count?t.count=e.count:"object"==typeof e.count&&(t.count=new r.LongBits(e.count.low>>>0,e.count.high>>>0).toNumber())),null!=e.sum&&(t.sum=Number(e.sum)),e.bucketCounts){if(!Array.isArray(e.bucketCounts))throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.bucketCounts: array expected");for(t.bucketCounts=[],n=0;n<e.bucketCounts.length;++n)r.Long?(t.bucketCounts[n]=r.Long.fromValue(e.bucketCounts[n])).unsigned=!1:"string"==typeof e.bucketCounts[n]?t.bucketCounts[n]=parseInt(e.bucketCounts[n],10):"number"==typeof e.bucketCounts[n]?t.bucketCounts[n]=e.bucketCounts[n]:"object"==typeof e.bucketCounts[n]&&(t.bucketCounts[n]=new r.LongBits(e.bucketCounts[n].low>>>0,e.bucketCounts[n].high>>>0).toNumber())}if(e.explicitBounds){if(!Array.isArray(e.explicitBounds))throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.explicitBounds: array expected");for(t.explicitBounds=[],n=0;n<e.explicitBounds.length;++n)t.explicitBounds[n]=Number(e.explicitBounds[n])}if(e.exemplars){if(!Array.isArray(e.exemplars))throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.exemplars: array expected");for(t.exemplars=[],n=0;n<e.exemplars.length;++n){if("object"!=typeof e.exemplars[n])throw TypeError(".opentelemetry.proto.metrics.v1.HistogramDataPoint.exemplars: object expected");t.exemplars[n]=o.opentelemetry.proto.metrics.v1.Exemplar.fromObject(e.exemplars[n])}}return null!=e.flags&&(t.flags=e.flags>>>0),null!=e.min&&(t.min=Number(e.min)),null!=e.max&&(t.max=Number(e.max)),t},i.toObject=function(e,t){t||(t={});var n={};if((t.arrays||t.defaults)&&(n.bucketCounts=[],n.explicitBounds=[],n.exemplars=[],n.attributes=[]),t.defaults){if(r.Long){var i=new r.Long(0,0,!1);n.startTimeUnixNano=t.longs===String?i.toString():t.longs===Number?i.toNumber():i}else n.startTimeUnixNano=t.longs===String?"0":0;r.Long?(i=new r.Long(0,0,!1),n.timeUnixNano=t.longs===String?i.toString():t.longs===Number?i.toNumber():i):n.timeUnixNano=t.longs===String?"0":0,r.Long?(i=new r.Long(0,0,!1),n.count=t.longs===String?i.toString():t.longs===Number?i.toNumber():i):n.count=t.longs===String?"0":0,n.flags=0}if(null!=e.startTimeUnixNano&&e.hasOwnProperty("startTimeUnixNano")&&("number"==typeof e.startTimeUnixNano?n.startTimeUnixNano=t.longs===String?String(e.startTimeUnixNano):e.startTimeUnixNano:n.startTimeUnixNano=t.longs===String?r.Long.prototype.toString.call(e.startTimeUnixNano):t.longs===Number?new r.LongBits(e.startTimeUnixNano.low>>>0,e.startTimeUnixNano.high>>>0).toNumber():e.startTimeUnixNano),null!=e.timeUnixNano&&e.hasOwnProperty("timeUnixNano")&&("number"==typeof e.timeUnixNano?n.timeUnixNano=t.longs===String?String(e.timeUnixNano):e.timeUnixNano:n.timeUnixNano=t.longs===String?r.Long.prototype.toString.call(e.timeUnixNano):t.longs===Number?new r.LongBits(e.timeUnixNano.low>>>0,e.timeUnixNano.high>>>0).toNumber():e.timeUnixNano),null!=e.count&&e.hasOwnProperty("count")&&("number"==typeof e.count?n.count=t.longs===String?String(e.count):e.count:n.count=t.longs===String?r.Long.prototype.toString.call(e.count):t.longs===Number?new r.LongBits(e.count.low>>>0,e.count.high>>>0).toNumber():e.count),null!=e.sum&&e.hasOwnProperty("sum")&&(n.sum=t.json&&!isFinite(e.sum)?String(e.sum):e.sum,t.oneofs&&(n._sum="sum")),e.bucketCounts&&e.bucketCounts.length){n.bucketCounts=[];for(var a=0;a<e.bucketCounts.length;++a)"number"==typeof e.bucketCounts[a]?n.bucketCounts[a]=t.longs===String?String(e.bucketCounts[a]):e.bucketCounts[a]:n.bucketCounts[a]=t.longs===String?r.Long.prototype.toString.call(e.bucketCounts[a]):t.longs===Number?new r.LongBits(e.bucketCounts[a].low>>>0,e.bucketCounts[a].high>>>0).toNumber():e.bucketCounts[a]}if(e.explicitBounds&&e.explicitBounds.length)for(n.explicitBounds=[],a=0;a<e.explicitBounds.length;++a)n.explicitBounds[a]=t.json&&!isFinite(e.explicitBounds[a])?String(e.explicitBounds[a]):e.explicitBounds[a];if(e.exemplars&&e.exemplars.length)for(n.exemplars=[],a=0;a<e.exemplars.length;++a)n.exemplars[a]=o.opentelemetry.proto.metrics.v1.Exemplar.toObject(e.exemplars[a],t);if(e.attributes&&e.attributes.length)for(n.attributes=[],a=0;a<e.attributes.length;++a)n.attributes[a]=o.opentelemetry.proto.common.v1.KeyValue.toObject(e.attributes[a],t);return null!=e.flags&&e.hasOwnProperty("flags")&&(n.flags=e.flags),null!=e.min&&e.hasOwnProperty("min")&&(n.min=t.json&&!isFinite(e.min)?String(e.min):e.min,t.oneofs&&(n._min="min")),null!=e.max&&e.hasOwnProperty("max")&&(n.max=t.json&&!isFinite(e.max)?String(e.max):e.max,t.oneofs&&(n._max="max")),n},i.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},i.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/opentelemetry.proto.metrics.v1.HistogramDataPoint"},i}(),s.ExponentialHistogramDataPoint=function(){function i(e){if(this.attributes=[],this.exemplars=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}var a;return i.prototype.attributes=r.emptyArray,i.prototype.startTimeUnixNano=null,i.prototype.timeUnixNano=null,i.prototype.count=null,i.prototype.sum=null,i.prototype.scale=null,i.prototype.zeroCount=null,i.prototype.positive=null,i.prototype.negative=null,i.prototype.flags=null,i.prototype.exemplars=r.emptyArray,i.prototype.min=null,i.prototype.max=null,i.prototype.zeroThreshold=null,Object.defineProperty(i.prototype,"_sum",{get:r.oneOfGetter(a=["sum"]),set:r.oneOfSetter(a)}),Object.defineProperty(i.prototype,"_min",{get:r.oneOfGetter(a=["min"]),set:r.oneOfSetter(a)}),Object.defineProperty(i.prototype,"_max",{get:r.oneOfGetter(a=["max"]),set:r.oneOfSetter(a)}),i.create=function(e){return new i(e)},i.encode=function(e,t){if(t||(t=n.create()),null!=e.attributes&&e.attributes.length)for(var r=0;r<e.attributes.length;++r)o.opentelemetry.proto.common.v1.KeyValue.encode(e.attributes[r],t.uint32(10).fork()).ldelim();if(null!=e.startTimeUnixNano&&Object.hasOwnProperty.call(e,"startTimeUnixNano")&&t.uint32(17).fixed64(e.startTimeUnixNano),null!=e.timeUnixNano&&Object.hasOwnProperty.call(e,"timeUnixNano")&&t.uint32(25).fixed64(e.timeUnixNano),null!=e.count&&Object.hasOwnProperty.call(e,"count")&&t.uint32(33).fixed64(e.count),null!=e.sum&&Object.hasOwnProperty.call(e,"sum")&&t.uint32(41).double(e.sum),null!=e.scale&&Object.hasOwnProperty.call(e,"scale")&&t.uint32(48).sint32(e.scale),null!=e.zeroCount&&Object.hasOwnProperty.call(e,"zeroCount")&&t.uint32(57).fixed64(e.zeroCount),null!=e.positive&&Object.hasOwnProperty.call(e,"positive")&&o.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.encode(e.positive,t.uint32(66).fork()).ldelim(),null!=e.negative&&Object.hasOwnProperty.call(e,"negative")&&o.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.encode(e.negative,t.uint32(74).fork()).ldelim(),null!=e.flags&&Object.hasOwnProperty.call(e,"flags")&&t.uint32(80).uint32(e.flags),null!=e.exemplars&&e.exemplars.length)for(r=0;r<e.exemplars.length;++r)o.opentelemetry.proto.metrics.v1.Exemplar.encode(e.exemplars[r],t.uint32(90).fork()).ldelim();return null!=e.min&&Object.hasOwnProperty.call(e,"min")&&t.uint32(97).double(e.min),null!=e.max&&Object.hasOwnProperty.call(e,"max")&&t.uint32(105).double(e.max),null!=e.zeroThreshold&&Object.hasOwnProperty.call(e,"zeroThreshold")&&t.uint32(113).double(e.zeroThreshold),t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,i=new o.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:i.attributes&&i.attributes.length||(i.attributes=[]),i.attributes.push(o.opentelemetry.proto.common.v1.KeyValue.decode(e,e.uint32()));break;case 2:i.startTimeUnixNano=e.fixed64();break;case 3:i.timeUnixNano=e.fixed64();break;case 4:i.count=e.fixed64();break;case 5:i.sum=e.double();break;case 6:i.scale=e.sint32();break;case 7:i.zeroCount=e.fixed64();break;case 8:i.positive=o.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.decode(e,e.uint32());break;case 9:i.negative=o.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.decode(e,e.uint32());break;case 10:i.flags=e.uint32();break;case 11:i.exemplars&&i.exemplars.length||(i.exemplars=[]),i.exemplars.push(o.opentelemetry.proto.metrics.v1.Exemplar.decode(e,e.uint32()));break;case 12:i.min=e.double();break;case 13:i.max=e.double();break;case 14:i.zeroThreshold=e.double();break;default:e.skipType(7&a)}}return i},i.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},i.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.attributes&&e.hasOwnProperty("attributes")){if(!Array.isArray(e.attributes))return"attributes: array expected";for(var t=0;t<e.attributes.length;++t)if(n=o.opentelemetry.proto.common.v1.KeyValue.verify(e.attributes[t]))return"attributes."+n}if(null!=e.startTimeUnixNano&&e.hasOwnProperty("startTimeUnixNano")&&!(r.isInteger(e.startTimeUnixNano)||e.startTimeUnixNano&&r.isInteger(e.startTimeUnixNano.low)&&r.isInteger(e.startTimeUnixNano.high)))return"startTimeUnixNano: integer|Long expected";if(null!=e.timeUnixNano&&e.hasOwnProperty("timeUnixNano")&&!(r.isInteger(e.timeUnixNano)||e.timeUnixNano&&r.isInteger(e.timeUnixNano.low)&&r.isInteger(e.timeUnixNano.high)))return"timeUnixNano: integer|Long expected";if(null!=e.count&&e.hasOwnProperty("count")&&!(r.isInteger(e.count)||e.count&&r.isInteger(e.count.low)&&r.isInteger(e.count.high)))return"count: integer|Long expected";if(null!=e.sum&&e.hasOwnProperty("sum")&&"number"!=typeof e.sum)return"sum: number expected";if(null!=e.scale&&e.hasOwnProperty("scale")&&!r.isInteger(e.scale))return"scale: integer expected";if(null!=e.zeroCount&&e.hasOwnProperty("zeroCount")&&!(r.isInteger(e.zeroCount)||e.zeroCount&&r.isInteger(e.zeroCount.low)&&r.isInteger(e.zeroCount.high)))return"zeroCount: integer|Long expected";if(null!=e.positive&&e.hasOwnProperty("positive")&&(n=o.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.verify(e.positive)))return"positive."+n;if(null!=e.negative&&e.hasOwnProperty("negative")&&(n=o.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.verify(e.negative)))return"negative."+n;if(null!=e.flags&&e.hasOwnProperty("flags")&&!r.isInteger(e.flags))return"flags: integer expected";if(null!=e.exemplars&&e.hasOwnProperty("exemplars")){if(!Array.isArray(e.exemplars))return"exemplars: array expected";for(t=0;t<e.exemplars.length;++t){var n;if(n=o.opentelemetry.proto.metrics.v1.Exemplar.verify(e.exemplars[t]))return"exemplars."+n}}return null!=e.min&&e.hasOwnProperty("min")&&"number"!=typeof e.min?"min: number expected":null!=e.max&&e.hasOwnProperty("max")&&"number"!=typeof e.max?"max: number expected":null!=e.zeroThreshold&&e.hasOwnProperty("zeroThreshold")&&"number"!=typeof e.zeroThreshold?"zeroThreshold: number expected":null},i.fromObject=function(e){if(e instanceof o.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint)return e;var t=new o.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint;if(e.attributes){if(!Array.isArray(e.attributes))throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.attributes: array expected");t.attributes=[];for(var n=0;n<e.attributes.length;++n){if("object"!=typeof e.attributes[n])throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.attributes: object expected");t.attributes[n]=o.opentelemetry.proto.common.v1.KeyValue.fromObject(e.attributes[n])}}if(null!=e.startTimeUnixNano&&(r.Long?(t.startTimeUnixNano=r.Long.fromValue(e.startTimeUnixNano)).unsigned=!1:"string"==typeof e.startTimeUnixNano?t.startTimeUnixNano=parseInt(e.startTimeUnixNano,10):"number"==typeof e.startTimeUnixNano?t.startTimeUnixNano=e.startTimeUnixNano:"object"==typeof e.startTimeUnixNano&&(t.startTimeUnixNano=new r.LongBits(e.startTimeUnixNano.low>>>0,e.startTimeUnixNano.high>>>0).toNumber())),null!=e.timeUnixNano&&(r.Long?(t.timeUnixNano=r.Long.fromValue(e.timeUnixNano)).unsigned=!1:"string"==typeof e.timeUnixNano?t.timeUnixNano=parseInt(e.timeUnixNano,10):"number"==typeof e.timeUnixNano?t.timeUnixNano=e.timeUnixNano:"object"==typeof e.timeUnixNano&&(t.timeUnixNano=new r.LongBits(e.timeUnixNano.low>>>0,e.timeUnixNano.high>>>0).toNumber())),null!=e.count&&(r.Long?(t.count=r.Long.fromValue(e.count)).unsigned=!1:"string"==typeof e.count?t.count=parseInt(e.count,10):"number"==typeof e.count?t.count=e.count:"object"==typeof e.count&&(t.count=new r.LongBits(e.count.low>>>0,e.count.high>>>0).toNumber())),null!=e.sum&&(t.sum=Number(e.sum)),null!=e.scale&&(t.scale=0|e.scale),null!=e.zeroCount&&(r.Long?(t.zeroCount=r.Long.fromValue(e.zeroCount)).unsigned=!1:"string"==typeof e.zeroCount?t.zeroCount=parseInt(e.zeroCount,10):"number"==typeof e.zeroCount?t.zeroCount=e.zeroCount:"object"==typeof e.zeroCount&&(t.zeroCount=new r.LongBits(e.zeroCount.low>>>0,e.zeroCount.high>>>0).toNumber())),null!=e.positive){if("object"!=typeof e.positive)throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.positive: object expected");t.positive=o.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.fromObject(e.positive)}if(null!=e.negative){if("object"!=typeof e.negative)throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.negative: object expected");t.negative=o.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.fromObject(e.negative)}if(null!=e.flags&&(t.flags=e.flags>>>0),e.exemplars){if(!Array.isArray(e.exemplars))throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.exemplars: array expected");for(t.exemplars=[],n=0;n<e.exemplars.length;++n){if("object"!=typeof e.exemplars[n])throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.exemplars: object expected");t.exemplars[n]=o.opentelemetry.proto.metrics.v1.Exemplar.fromObject(e.exemplars[n])}}return null!=e.min&&(t.min=Number(e.min)),null!=e.max&&(t.max=Number(e.max)),null!=e.zeroThreshold&&(t.zeroThreshold=Number(e.zeroThreshold)),t},i.toObject=function(e,t){t||(t={});var n={};if((t.arrays||t.defaults)&&(n.attributes=[],n.exemplars=[]),t.defaults){if(r.Long){var i=new r.Long(0,0,!1);n.startTimeUnixNano=t.longs===String?i.toString():t.longs===Number?i.toNumber():i}else n.startTimeUnixNano=t.longs===String?"0":0;r.Long?(i=new r.Long(0,0,!1),n.timeUnixNano=t.longs===String?i.toString():t.longs===Number?i.toNumber():i):n.timeUnixNano=t.longs===String?"0":0,r.Long?(i=new r.Long(0,0,!1),n.count=t.longs===String?i.toString():t.longs===Number?i.toNumber():i):n.count=t.longs===String?"0":0,n.scale=0,r.Long?(i=new r.Long(0,0,!1),n.zeroCount=t.longs===String?i.toString():t.longs===Number?i.toNumber():i):n.zeroCount=t.longs===String?"0":0,n.positive=null,n.negative=null,n.flags=0,n.zeroThreshold=0}if(e.attributes&&e.attributes.length){n.attributes=[];for(var a=0;a<e.attributes.length;++a)n.attributes[a]=o.opentelemetry.proto.common.v1.KeyValue.toObject(e.attributes[a],t)}if(null!=e.startTimeUnixNano&&e.hasOwnProperty("startTimeUnixNano")&&("number"==typeof e.startTimeUnixNano?n.startTimeUnixNano=t.longs===String?String(e.startTimeUnixNano):e.startTimeUnixNano:n.startTimeUnixNano=t.longs===String?r.Long.prototype.toString.call(e.startTimeUnixNano):t.longs===Number?new r.LongBits(e.startTimeUnixNano.low>>>0,e.startTimeUnixNano.high>>>0).toNumber():e.startTimeUnixNano),null!=e.timeUnixNano&&e.hasOwnProperty("timeUnixNano")&&("number"==typeof e.timeUnixNano?n.timeUnixNano=t.longs===String?String(e.timeUnixNano):e.timeUnixNano:n.timeUnixNano=t.longs===String?r.Long.prototype.toString.call(e.timeUnixNano):t.longs===Number?new r.LongBits(e.timeUnixNano.low>>>0,e.timeUnixNano.high>>>0).toNumber():e.timeUnixNano),null!=e.count&&e.hasOwnProperty("count")&&("number"==typeof e.count?n.count=t.longs===String?String(e.count):e.count:n.count=t.longs===String?r.Long.prototype.toString.call(e.count):t.longs===Number?new r.LongBits(e.count.low>>>0,e.count.high>>>0).toNumber():e.count),null!=e.sum&&e.hasOwnProperty("sum")&&(n.sum=t.json&&!isFinite(e.sum)?String(e.sum):e.sum,t.oneofs&&(n._sum="sum")),null!=e.scale&&e.hasOwnProperty("scale")&&(n.scale=e.scale),null!=e.zeroCount&&e.hasOwnProperty("zeroCount")&&("number"==typeof e.zeroCount?n.zeroCount=t.longs===String?String(e.zeroCount):e.zeroCount:n.zeroCount=t.longs===String?r.Long.prototype.toString.call(e.zeroCount):t.longs===Number?new r.LongBits(e.zeroCount.low>>>0,e.zeroCount.high>>>0).toNumber():e.zeroCount),null!=e.positive&&e.hasOwnProperty("positive")&&(n.positive=o.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.toObject(e.positive,t)),null!=e.negative&&e.hasOwnProperty("negative")&&(n.negative=o.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.toObject(e.negative,t)),null!=e.flags&&e.hasOwnProperty("flags")&&(n.flags=e.flags),e.exemplars&&e.exemplars.length)for(n.exemplars=[],a=0;a<e.exemplars.length;++a)n.exemplars[a]=o.opentelemetry.proto.metrics.v1.Exemplar.toObject(e.exemplars[a],t);return null!=e.min&&e.hasOwnProperty("min")&&(n.min=t.json&&!isFinite(e.min)?String(e.min):e.min,t.oneofs&&(n._min="min")),null!=e.max&&e.hasOwnProperty("max")&&(n.max=t.json&&!isFinite(e.max)?String(e.max):e.max,t.oneofs&&(n._max="max")),null!=e.zeroThreshold&&e.hasOwnProperty("zeroThreshold")&&(n.zeroThreshold=t.json&&!isFinite(e.zeroThreshold)?String(e.zeroThreshold):e.zeroThreshold),n},i.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},i.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint"},i.Buckets=function(){function i(e){if(this.bucketCounts=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return i.prototype.offset=null,i.prototype.bucketCounts=r.emptyArray,i.create=function(e){return new i(e)},i.encode=function(e,t){if(t||(t=n.create()),null!=e.offset&&Object.hasOwnProperty.call(e,"offset")&&t.uint32(8).sint32(e.offset),null!=e.bucketCounts&&e.bucketCounts.length){t.uint32(18).fork();for(var r=0;r<e.bucketCounts.length;++r)t.uint64(e.bucketCounts[r]);t.ldelim()}return t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,i=new o.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:i.offset=e.sint32();break;case 2:if(i.bucketCounts&&i.bucketCounts.length||(i.bucketCounts=[]),2==(7&a))for(var s=e.uint32()+e.pos;e.pos<s;)i.bucketCounts.push(e.uint64());else i.bucketCounts.push(e.uint64());break;default:e.skipType(7&a)}}return i},i.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},i.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.offset&&e.hasOwnProperty("offset")&&!r.isInteger(e.offset))return"offset: integer expected";if(null!=e.bucketCounts&&e.hasOwnProperty("bucketCounts")){if(!Array.isArray(e.bucketCounts))return"bucketCounts: array expected";for(var t=0;t<e.bucketCounts.length;++t)if(!(r.isInteger(e.bucketCounts[t])||e.bucketCounts[t]&&r.isInteger(e.bucketCounts[t].low)&&r.isInteger(e.bucketCounts[t].high)))return"bucketCounts: integer|Long[] expected"}return null},i.fromObject=function(e){if(e instanceof o.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets)return e;var t=new o.opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets;if(null!=e.offset&&(t.offset=0|e.offset),e.bucketCounts){if(!Array.isArray(e.bucketCounts))throw TypeError(".opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets.bucketCounts: array expected");t.bucketCounts=[];for(var n=0;n<e.bucketCounts.length;++n)r.Long?(t.bucketCounts[n]=r.Long.fromValue(e.bucketCounts[n])).unsigned=!0:"string"==typeof e.bucketCounts[n]?t.bucketCounts[n]=parseInt(e.bucketCounts[n],10):"number"==typeof e.bucketCounts[n]?t.bucketCounts[n]=e.bucketCounts[n]:"object"==typeof e.bucketCounts[n]&&(t.bucketCounts[n]=new r.LongBits(e.bucketCounts[n].low>>>0,e.bucketCounts[n].high>>>0).toNumber(!0))}return t},i.toObject=function(e,t){t||(t={});var n={};if((t.arrays||t.defaults)&&(n.bucketCounts=[]),t.defaults&&(n.offset=0),null!=e.offset&&e.hasOwnProperty("offset")&&(n.offset=e.offset),e.bucketCounts&&e.bucketCounts.length){n.bucketCounts=[];for(var o=0;o<e.bucketCounts.length;++o)"number"==typeof e.bucketCounts[o]?n.bucketCounts[o]=t.longs===String?String(e.bucketCounts[o]):e.bucketCounts[o]:n.bucketCounts[o]=t.longs===String?r.Long.prototype.toString.call(e.bucketCounts[o]):t.longs===Number?new r.LongBits(e.bucketCounts[o].low>>>0,e.bucketCounts[o].high>>>0).toNumber(!0):e.bucketCounts[o]}return n},i.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},i.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/opentelemetry.proto.metrics.v1.ExponentialHistogramDataPoint.Buckets"},i}(),i}(),s.SummaryDataPoint=function(){function i(e){if(this.attributes=[],this.quantileValues=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return i.prototype.attributes=r.emptyArray,i.prototype.startTimeUnixNano=null,i.prototype.timeUnixNano=null,i.prototype.count=null,i.prototype.sum=null,i.prototype.quantileValues=r.emptyArray,i.prototype.flags=null,i.create=function(e){return new i(e)},i.encode=function(e,t){if(t||(t=n.create()),null!=e.startTimeUnixNano&&Object.hasOwnProperty.call(e,"startTimeUnixNano")&&t.uint32(17).fixed64(e.startTimeUnixNano),null!=e.timeUnixNano&&Object.hasOwnProperty.call(e,"timeUnixNano")&&t.uint32(25).fixed64(e.timeUnixNano),null!=e.count&&Object.hasOwnProperty.call(e,"count")&&t.uint32(33).fixed64(e.count),null!=e.sum&&Object.hasOwnProperty.call(e,"sum")&&t.uint32(41).double(e.sum),null!=e.quantileValues&&e.quantileValues.length)for(var r=0;r<e.quantileValues.length;++r)o.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.encode(e.quantileValues[r],t.uint32(50).fork()).ldelim();if(null!=e.attributes&&e.attributes.length)for(r=0;r<e.attributes.length;++r)o.opentelemetry.proto.common.v1.KeyValue.encode(e.attributes[r],t.uint32(58).fork()).ldelim();return null!=e.flags&&Object.hasOwnProperty.call(e,"flags")&&t.uint32(64).uint32(e.flags),t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,i=new o.opentelemetry.proto.metrics.v1.SummaryDataPoint;e.pos<r;){var a=e.uint32();switch(a>>>3){case 7:i.attributes&&i.attributes.length||(i.attributes=[]),i.attributes.push(o.opentelemetry.proto.common.v1.KeyValue.decode(e,e.uint32()));break;case 2:i.startTimeUnixNano=e.fixed64();break;case 3:i.timeUnixNano=e.fixed64();break;case 4:i.count=e.fixed64();break;case 5:i.sum=e.double();break;case 6:i.quantileValues&&i.quantileValues.length||(i.quantileValues=[]),i.quantileValues.push(o.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.decode(e,e.uint32()));break;case 8:i.flags=e.uint32();break;default:e.skipType(7&a)}}return i},i.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},i.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.attributes&&e.hasOwnProperty("attributes")){if(!Array.isArray(e.attributes))return"attributes: array expected";for(var t=0;t<e.attributes.length;++t)if(n=o.opentelemetry.proto.common.v1.KeyValue.verify(e.attributes[t]))return"attributes."+n}if(null!=e.startTimeUnixNano&&e.hasOwnProperty("startTimeUnixNano")&&!(r.isInteger(e.startTimeUnixNano)||e.startTimeUnixNano&&r.isInteger(e.startTimeUnixNano.low)&&r.isInteger(e.startTimeUnixNano.high)))return"startTimeUnixNano: integer|Long expected";if(null!=e.timeUnixNano&&e.hasOwnProperty("timeUnixNano")&&!(r.isInteger(e.timeUnixNano)||e.timeUnixNano&&r.isInteger(e.timeUnixNano.low)&&r.isInteger(e.timeUnixNano.high)))return"timeUnixNano: integer|Long expected";if(null!=e.count&&e.hasOwnProperty("count")&&!(r.isInteger(e.count)||e.count&&r.isInteger(e.count.low)&&r.isInteger(e.count.high)))return"count: integer|Long expected";if(null!=e.sum&&e.hasOwnProperty("sum")&&"number"!=typeof e.sum)return"sum: number expected";if(null!=e.quantileValues&&e.hasOwnProperty("quantileValues")){if(!Array.isArray(e.quantileValues))return"quantileValues: array expected";for(t=0;t<e.quantileValues.length;++t){var n;if(n=o.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.verify(e.quantileValues[t]))return"quantileValues."+n}}return null!=e.flags&&e.hasOwnProperty("flags")&&!r.isInteger(e.flags)?"flags: integer expected":null},i.fromObject=function(e){if(e instanceof o.opentelemetry.proto.metrics.v1.SummaryDataPoint)return e;var t=new o.opentelemetry.proto.metrics.v1.SummaryDataPoint;if(e.attributes){if(!Array.isArray(e.attributes))throw TypeError(".opentelemetry.proto.metrics.v1.SummaryDataPoint.attributes: array expected");t.attributes=[];for(var n=0;n<e.attributes.length;++n){if("object"!=typeof e.attributes[n])throw TypeError(".opentelemetry.proto.metrics.v1.SummaryDataPoint.attributes: object expected");t.attributes[n]=o.opentelemetry.proto.common.v1.KeyValue.fromObject(e.attributes[n])}}if(null!=e.startTimeUnixNano&&(r.Long?(t.startTimeUnixNano=r.Long.fromValue(e.startTimeUnixNano)).unsigned=!1:"string"==typeof e.startTimeUnixNano?t.startTimeUnixNano=parseInt(e.startTimeUnixNano,10):"number"==typeof e.startTimeUnixNano?t.startTimeUnixNano=e.startTimeUnixNano:"object"==typeof e.startTimeUnixNano&&(t.startTimeUnixNano=new r.LongBits(e.startTimeUnixNano.low>>>0,e.startTimeUnixNano.high>>>0).toNumber())),null!=e.timeUnixNano&&(r.Long?(t.timeUnixNano=r.Long.fromValue(e.timeUnixNano)).unsigned=!1:"string"==typeof e.timeUnixNano?t.timeUnixNano=parseInt(e.timeUnixNano,10):"number"==typeof e.timeUnixNano?t.timeUnixNano=e.timeUnixNano:"object"==typeof e.timeUnixNano&&(t.timeUnixNano=new r.LongBits(e.timeUnixNano.low>>>0,e.timeUnixNano.high>>>0).toNumber())),null!=e.count&&(r.Long?(t.count=r.Long.fromValue(e.count)).unsigned=!1:"string"==typeof e.count?t.count=parseInt(e.count,10):"number"==typeof e.count?t.count=e.count:"object"==typeof e.count&&(t.count=new r.LongBits(e.count.low>>>0,e.count.high>>>0).toNumber())),null!=e.sum&&(t.sum=Number(e.sum)),e.quantileValues){if(!Array.isArray(e.quantileValues))throw TypeError(".opentelemetry.proto.metrics.v1.SummaryDataPoint.quantileValues: array expected");for(t.quantileValues=[],n=0;n<e.quantileValues.length;++n){if("object"!=typeof e.quantileValues[n])throw TypeError(".opentelemetry.proto.metrics.v1.SummaryDataPoint.quantileValues: object expected");t.quantileValues[n]=o.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.fromObject(e.quantileValues[n])}}return null!=e.flags&&(t.flags=e.flags>>>0),t},i.toObject=function(e,t){t||(t={});var n={};if((t.arrays||t.defaults)&&(n.quantileValues=[],n.attributes=[]),t.defaults){if(r.Long){var i=new r.Long(0,0,!1);n.startTimeUnixNano=t.longs===String?i.toString():t.longs===Number?i.toNumber():i}else n.startTimeUnixNano=t.longs===String?"0":0;r.Long?(i=new r.Long(0,0,!1),n.timeUnixNano=t.longs===String?i.toString():t.longs===Number?i.toNumber():i):n.timeUnixNano=t.longs===String?"0":0,r.Long?(i=new r.Long(0,0,!1),n.count=t.longs===String?i.toString():t.longs===Number?i.toNumber():i):n.count=t.longs===String?"0":0,n.sum=0,n.flags=0}if(null!=e.startTimeUnixNano&&e.hasOwnProperty("startTimeUnixNano")&&("number"==typeof e.startTimeUnixNano?n.startTimeUnixNano=t.longs===String?String(e.startTimeUnixNano):e.startTimeUnixNano:n.startTimeUnixNano=t.longs===String?r.Long.prototype.toString.call(e.startTimeUnixNano):t.longs===Number?new r.LongBits(e.startTimeUnixNano.low>>>0,e.startTimeUnixNano.high>>>0).toNumber():e.startTimeUnixNano),null!=e.timeUnixNano&&e.hasOwnProperty("timeUnixNano")&&("number"==typeof e.timeUnixNano?n.timeUnixNano=t.longs===String?String(e.timeUnixNano):e.timeUnixNano:n.timeUnixNano=t.longs===String?r.Long.prototype.toString.call(e.timeUnixNano):t.longs===Number?new r.LongBits(e.timeUnixNano.low>>>0,e.timeUnixNano.high>>>0).toNumber():e.timeUnixNano),null!=e.count&&e.hasOwnProperty("count")&&("number"==typeof e.count?n.count=t.longs===String?String(e.count):e.count:n.count=t.longs===String?r.Long.prototype.toString.call(e.count):t.longs===Number?new r.LongBits(e.count.low>>>0,e.count.high>>>0).toNumber():e.count),null!=e.sum&&e.hasOwnProperty("sum")&&(n.sum=t.json&&!isFinite(e.sum)?String(e.sum):e.sum),e.quantileValues&&e.quantileValues.length){n.quantileValues=[];for(var a=0;a<e.quantileValues.length;++a)n.quantileValues[a]=o.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile.toObject(e.quantileValues[a],t)}if(e.attributes&&e.attributes.length)for(n.attributes=[],a=0;a<e.attributes.length;++a)n.attributes[a]=o.opentelemetry.proto.common.v1.KeyValue.toObject(e.attributes[a],t);return null!=e.flags&&e.hasOwnProperty("flags")&&(n.flags=e.flags),n},i.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},i.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/opentelemetry.proto.metrics.v1.SummaryDataPoint"},i.ValueAtQuantile=function(){function r(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return r.prototype.quantile=null,r.prototype.value=null,r.create=function(e){return new r(e)},r.encode=function(e,t){return t||(t=n.create()),null!=e.quantile&&Object.hasOwnProperty.call(e,"quantile")&&t.uint32(9).double(e.quantile),null!=e.value&&Object.hasOwnProperty.call(e,"value")&&t.uint32(17).double(e.value),t},r.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},r.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,i=new o.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:i.quantile=e.double();break;case 2:i.value=e.double();break;default:e.skipType(7&a)}}return i},r.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},r.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.quantile&&e.hasOwnProperty("quantile")&&"number"!=typeof e.quantile?"quantile: number expected":null!=e.value&&e.hasOwnProperty("value")&&"number"!=typeof e.value?"value: number expected":null},r.fromObject=function(e){if(e instanceof o.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile)return e;var t=new o.opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile;return null!=e.quantile&&(t.quantile=Number(e.quantile)),null!=e.value&&(t.value=Number(e.value)),t},r.toObject=function(e,t){t||(t={});var n={};return t.defaults&&(n.quantile=0,n.value=0),null!=e.quantile&&e.hasOwnProperty("quantile")&&(n.quantile=t.json&&!isFinite(e.quantile)?String(e.quantile):e.quantile),null!=e.value&&e.hasOwnProperty("value")&&(n.value=t.json&&!isFinite(e.value)?String(e.value):e.value),n},r.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},r.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/opentelemetry.proto.metrics.v1.SummaryDataPoint.ValueAtQuantile"},r}(),i}(),s.Exemplar=function(){function i(e){if(this.filteredAttributes=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}var a;return i.prototype.filteredAttributes=r.emptyArray,i.prototype.timeUnixNano=null,i.prototype.asDouble=null,i.prototype.asInt=null,i.prototype.spanId=null,i.prototype.traceId=null,Object.defineProperty(i.prototype,"value",{get:r.oneOfGetter(a=["asDouble","asInt"]),set:r.oneOfSetter(a)}),i.create=function(e){return new i(e)},i.encode=function(e,t){if(t||(t=n.create()),null!=e.timeUnixNano&&Object.hasOwnProperty.call(e,"timeUnixNano")&&t.uint32(17).fixed64(e.timeUnixNano),null!=e.asDouble&&Object.hasOwnProperty.call(e,"asDouble")&&t.uint32(25).double(e.asDouble),null!=e.spanId&&Object.hasOwnProperty.call(e,"spanId")&&t.uint32(34).bytes(e.spanId),null!=e.traceId&&Object.hasOwnProperty.call(e,"traceId")&&t.uint32(42).bytes(e.traceId),null!=e.asInt&&Object.hasOwnProperty.call(e,"asInt")&&t.uint32(49).sfixed64(e.asInt),null!=e.filteredAttributes&&e.filteredAttributes.length)for(var r=0;r<e.filteredAttributes.length;++r)o.opentelemetry.proto.common.v1.KeyValue.encode(e.filteredAttributes[r],t.uint32(58).fork()).ldelim();return t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,i=new o.opentelemetry.proto.metrics.v1.Exemplar;e.pos<r;){var a=e.uint32();switch(a>>>3){case 7:i.filteredAttributes&&i.filteredAttributes.length||(i.filteredAttributes=[]),i.filteredAttributes.push(o.opentelemetry.proto.common.v1.KeyValue.decode(e,e.uint32()));break;case 2:i.timeUnixNano=e.fixed64();break;case 3:i.asDouble=e.double();break;case 6:i.asInt=e.sfixed64();break;case 4:i.spanId=e.bytes();break;case 5:i.traceId=e.bytes();break;default:e.skipType(7&a)}}return i},i.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},i.verify=function(e){if("object"!=typeof e||null===e)return"object expected";var t={};if(null!=e.filteredAttributes&&e.hasOwnProperty("filteredAttributes")){if(!Array.isArray(e.filteredAttributes))return"filteredAttributes: array expected";for(var n=0;n<e.filteredAttributes.length;++n){var i=o.opentelemetry.proto.common.v1.KeyValue.verify(e.filteredAttributes[n]);if(i)return"filteredAttributes."+i}}if(null!=e.timeUnixNano&&e.hasOwnProperty("timeUnixNano")&&!(r.isInteger(e.timeUnixNano)||e.timeUnixNano&&r.isInteger(e.timeUnixNano.low)&&r.isInteger(e.timeUnixNano.high)))return"timeUnixNano: integer|Long expected";if(null!=e.asDouble&&e.hasOwnProperty("asDouble")&&(t.value=1,"number"!=typeof e.asDouble))return"asDouble: number expected";if(null!=e.asInt&&e.hasOwnProperty("asInt")){if(1===t.value)return"value: multiple values";if(t.value=1,!(r.isInteger(e.asInt)||e.asInt&&r.isInteger(e.asInt.low)&&r.isInteger(e.asInt.high)))return"asInt: integer|Long expected"}return null!=e.spanId&&e.hasOwnProperty("spanId")&&!(e.spanId&&"number"==typeof e.spanId.length||r.isString(e.spanId))?"spanId: buffer expected":null!=e.traceId&&e.hasOwnProperty("traceId")&&!(e.traceId&&"number"==typeof e.traceId.length||r.isString(e.traceId))?"traceId: buffer expected":null},i.fromObject=function(e){if(e instanceof o.opentelemetry.proto.metrics.v1.Exemplar)return e;var t=new o.opentelemetry.proto.metrics.v1.Exemplar;if(e.filteredAttributes){if(!Array.isArray(e.filteredAttributes))throw TypeError(".opentelemetry.proto.metrics.v1.Exemplar.filteredAttributes: array expected");t.filteredAttributes=[];for(var n=0;n<e.filteredAttributes.length;++n){if("object"!=typeof e.filteredAttributes[n])throw TypeError(".opentelemetry.proto.metrics.v1.Exemplar.filteredAttributes: object expected");t.filteredAttributes[n]=o.opentelemetry.proto.common.v1.KeyValue.fromObject(e.filteredAttributes[n])}}return null!=e.timeUnixNano&&(r.Long?(t.timeUnixNano=r.Long.fromValue(e.timeUnixNano)).unsigned=!1:"string"==typeof e.timeUnixNano?t.timeUnixNano=parseInt(e.timeUnixNano,10):"number"==typeof e.timeUnixNano?t.timeUnixNano=e.timeUnixNano:"object"==typeof e.timeUnixNano&&(t.timeUnixNano=new r.LongBits(e.timeUnixNano.low>>>0,e.timeUnixNano.high>>>0).toNumber())),null!=e.asDouble&&(t.asDouble=Number(e.asDouble)),null!=e.asInt&&(r.Long?(t.asInt=r.Long.fromValue(e.asInt)).unsigned=!1:"string"==typeof e.asInt?t.asInt=parseInt(e.asInt,10):"number"==typeof e.asInt?t.asInt=e.asInt:"object"==typeof e.asInt&&(t.asInt=new r.LongBits(e.asInt.low>>>0,e.asInt.high>>>0).toNumber())),null!=e.spanId&&("string"==typeof e.spanId?r.base64.decode(e.spanId,t.spanId=r.newBuffer(r.base64.length(e.spanId)),0):e.spanId.length>=0&&(t.spanId=e.spanId)),null!=e.traceId&&("string"==typeof e.traceId?r.base64.decode(e.traceId,t.traceId=r.newBuffer(r.base64.length(e.traceId)),0):e.traceId.length>=0&&(t.traceId=e.traceId)),t},i.toObject=function(e,t){t||(t={});var n={};if((t.arrays||t.defaults)&&(n.filteredAttributes=[]),t.defaults){if(r.Long){var i=new r.Long(0,0,!1);n.timeUnixNano=t.longs===String?i.toString():t.longs===Number?i.toNumber():i}else n.timeUnixNano=t.longs===String?"0":0;t.bytes===String?n.spanId="":(n.spanId=[],t.bytes!==Array&&(n.spanId=r.newBuffer(n.spanId))),t.bytes===String?n.traceId="":(n.traceId=[],t.bytes!==Array&&(n.traceId=r.newBuffer(n.traceId)))}if(null!=e.timeUnixNano&&e.hasOwnProperty("timeUnixNano")&&("number"==typeof e.timeUnixNano?n.timeUnixNano=t.longs===String?String(e.timeUnixNano):e.timeUnixNano:n.timeUnixNano=t.longs===String?r.Long.prototype.toString.call(e.timeUnixNano):t.longs===Number?new r.LongBits(e.timeUnixNano.low>>>0,e.timeUnixNano.high>>>0).toNumber():e.timeUnixNano),null!=e.asDouble&&e.hasOwnProperty("asDouble")&&(n.asDouble=t.json&&!isFinite(e.asDouble)?String(e.asDouble):e.asDouble,t.oneofs&&(n.value="asDouble")),null!=e.spanId&&e.hasOwnProperty("spanId")&&(n.spanId=t.bytes===String?r.base64.encode(e.spanId,0,e.spanId.length):t.bytes===Array?Array.prototype.slice.call(e.spanId):e.spanId),null!=e.traceId&&e.hasOwnProperty("traceId")&&(n.traceId=t.bytes===String?r.base64.encode(e.traceId,0,e.traceId.length):t.bytes===Array?Array.prototype.slice.call(e.traceId):e.traceId),null!=e.asInt&&e.hasOwnProperty("asInt")&&("number"==typeof e.asInt?n.asInt=t.longs===String?String(e.asInt):e.asInt:n.asInt=t.longs===String?r.Long.prototype.toString.call(e.asInt):t.longs===Number?new r.LongBits(e.asInt.low>>>0,e.asInt.high>>>0).toNumber():e.asInt,t.oneofs&&(n.value="asInt")),e.filteredAttributes&&e.filteredAttributes.length){n.filteredAttributes=[];for(var a=0;a<e.filteredAttributes.length;++a)n.filteredAttributes[a]=o.opentelemetry.proto.common.v1.KeyValue.toObject(e.filteredAttributes[a],t)}return n},i.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},i.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/opentelemetry.proto.metrics.v1.Exemplar"},i}(),s}(),i}(),c.logs=function(){var i={};return i.v1=function(){var i,a,s={};return s.LogsData=function(){function i(e){if(this.resourceLogs=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return i.prototype.resourceLogs=r.emptyArray,i.create=function(e){return new i(e)},i.encode=function(e,t){if(t||(t=n.create()),null!=e.resourceLogs&&e.resourceLogs.length)for(var r=0;r<e.resourceLogs.length;++r)o.opentelemetry.proto.logs.v1.ResourceLogs.encode(e.resourceLogs[r],t.uint32(10).fork()).ldelim();return t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,i=new o.opentelemetry.proto.logs.v1.LogsData;e.pos<r;){var a=e.uint32();a>>>3==1?(i.resourceLogs&&i.resourceLogs.length||(i.resourceLogs=[]),i.resourceLogs.push(o.opentelemetry.proto.logs.v1.ResourceLogs.decode(e,e.uint32()))):e.skipType(7&a)}return i},i.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},i.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.resourceLogs&&e.hasOwnProperty("resourceLogs")){if(!Array.isArray(e.resourceLogs))return"resourceLogs: array expected";for(var t=0;t<e.resourceLogs.length;++t){var n=o.opentelemetry.proto.logs.v1.ResourceLogs.verify(e.resourceLogs[t]);if(n)return"resourceLogs."+n}}return null},i.fromObject=function(e){if(e instanceof o.opentelemetry.proto.logs.v1.LogsData)return e;var t=new o.opentelemetry.proto.logs.v1.LogsData;if(e.resourceLogs){if(!Array.isArray(e.resourceLogs))throw TypeError(".opentelemetry.proto.logs.v1.LogsData.resourceLogs: array expected");t.resourceLogs=[];for(var n=0;n<e.resourceLogs.length;++n){if("object"!=typeof e.resourceLogs[n])throw TypeError(".opentelemetry.proto.logs.v1.LogsData.resourceLogs: object expected");t.resourceLogs[n]=o.opentelemetry.proto.logs.v1.ResourceLogs.fromObject(e.resourceLogs[n])}}return t},i.toObject=function(e,t){t||(t={});var n={};if((t.arrays||t.defaults)&&(n.resourceLogs=[]),e.resourceLogs&&e.resourceLogs.length){n.resourceLogs=[];for(var r=0;r<e.resourceLogs.length;++r)n.resourceLogs[r]=o.opentelemetry.proto.logs.v1.ResourceLogs.toObject(e.resourceLogs[r],t)}return n},i.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},i.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/opentelemetry.proto.logs.v1.LogsData"},i}(),s.ResourceLogs=function(){function i(e){if(this.scopeLogs=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return i.prototype.resource=null,i.prototype.scopeLogs=r.emptyArray,i.prototype.schemaUrl=null,i.create=function(e){return new i(e)},i.encode=function(e,t){if(t||(t=n.create()),null!=e.resource&&Object.hasOwnProperty.call(e,"resource")&&o.opentelemetry.proto.resource.v1.Resource.encode(e.resource,t.uint32(10).fork()).ldelim(),null!=e.scopeLogs&&e.scopeLogs.length)for(var r=0;r<e.scopeLogs.length;++r)o.opentelemetry.proto.logs.v1.ScopeLogs.encode(e.scopeLogs[r],t.uint32(18).fork()).ldelim();return null!=e.schemaUrl&&Object.hasOwnProperty.call(e,"schemaUrl")&&t.uint32(26).string(e.schemaUrl),t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,i=new o.opentelemetry.proto.logs.v1.ResourceLogs;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:i.resource=o.opentelemetry.proto.resource.v1.Resource.decode(e,e.uint32());break;case 2:i.scopeLogs&&i.scopeLogs.length||(i.scopeLogs=[]),i.scopeLogs.push(o.opentelemetry.proto.logs.v1.ScopeLogs.decode(e,e.uint32()));break;case 3:i.schemaUrl=e.string();break;default:e.skipType(7&a)}}return i},i.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},i.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.resource&&e.hasOwnProperty("resource")&&(n=o.opentelemetry.proto.resource.v1.Resource.verify(e.resource)))return"resource."+n;if(null!=e.scopeLogs&&e.hasOwnProperty("scopeLogs")){if(!Array.isArray(e.scopeLogs))return"scopeLogs: array expected";for(var t=0;t<e.scopeLogs.length;++t){var n;if(n=o.opentelemetry.proto.logs.v1.ScopeLogs.verify(e.scopeLogs[t]))return"scopeLogs."+n}}return null!=e.schemaUrl&&e.hasOwnProperty("schemaUrl")&&!r.isString(e.schemaUrl)?"schemaUrl: string expected":null},i.fromObject=function(e){if(e instanceof o.opentelemetry.proto.logs.v1.ResourceLogs)return e;var t=new o.opentelemetry.proto.logs.v1.ResourceLogs;if(null!=e.resource){if("object"!=typeof e.resource)throw TypeError(".opentelemetry.proto.logs.v1.ResourceLogs.resource: object expected");t.resource=o.opentelemetry.proto.resource.v1.Resource.fromObject(e.resource)}if(e.scopeLogs){if(!Array.isArray(e.scopeLogs))throw TypeError(".opentelemetry.proto.logs.v1.ResourceLogs.scopeLogs: array expected");t.scopeLogs=[];for(var n=0;n<e.scopeLogs.length;++n){if("object"!=typeof e.scopeLogs[n])throw TypeError(".opentelemetry.proto.logs.v1.ResourceLogs.scopeLogs: object expected");t.scopeLogs[n]=o.opentelemetry.proto.logs.v1.ScopeLogs.fromObject(e.scopeLogs[n])}}return null!=e.schemaUrl&&(t.schemaUrl=String(e.schemaUrl)),t},i.toObject=function(e,t){t||(t={});var n={};if((t.arrays||t.defaults)&&(n.scopeLogs=[]),t.defaults&&(n.resource=null,n.schemaUrl=""),null!=e.resource&&e.hasOwnProperty("resource")&&(n.resource=o.opentelemetry.proto.resource.v1.Resource.toObject(e.resource,t)),e.scopeLogs&&e.scopeLogs.length){n.scopeLogs=[];for(var r=0;r<e.scopeLogs.length;++r)n.scopeLogs[r]=o.opentelemetry.proto.logs.v1.ScopeLogs.toObject(e.scopeLogs[r],t)}return null!=e.schemaUrl&&e.hasOwnProperty("schemaUrl")&&(n.schemaUrl=e.schemaUrl),n},i.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},i.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/opentelemetry.proto.logs.v1.ResourceLogs"},i}(),s.ScopeLogs=function(){function i(e){if(this.logRecords=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return i.prototype.scope=null,i.prototype.logRecords=r.emptyArray,i.prototype.schemaUrl=null,i.create=function(e){return new i(e)},i.encode=function(e,t){if(t||(t=n.create()),null!=e.scope&&Object.hasOwnProperty.call(e,"scope")&&o.opentelemetry.proto.common.v1.InstrumentationScope.encode(e.scope,t.uint32(10).fork()).ldelim(),null!=e.logRecords&&e.logRecords.length)for(var r=0;r<e.logRecords.length;++r)o.opentelemetry.proto.logs.v1.LogRecord.encode(e.logRecords[r],t.uint32(18).fork()).ldelim();return null!=e.schemaUrl&&Object.hasOwnProperty.call(e,"schemaUrl")&&t.uint32(26).string(e.schemaUrl),t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,i=new o.opentelemetry.proto.logs.v1.ScopeLogs;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:i.scope=o.opentelemetry.proto.common.v1.InstrumentationScope.decode(e,e.uint32());break;case 2:i.logRecords&&i.logRecords.length||(i.logRecords=[]),i.logRecords.push(o.opentelemetry.proto.logs.v1.LogRecord.decode(e,e.uint32()));break;case 3:i.schemaUrl=e.string();break;default:e.skipType(7&a)}}return i},i.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},i.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.scope&&e.hasOwnProperty("scope")&&(n=o.opentelemetry.proto.common.v1.InstrumentationScope.verify(e.scope)))return"scope."+n;if(null!=e.logRecords&&e.hasOwnProperty("logRecords")){if(!Array.isArray(e.logRecords))return"logRecords: array expected";for(var t=0;t<e.logRecords.length;++t){var n;if(n=o.opentelemetry.proto.logs.v1.LogRecord.verify(e.logRecords[t]))return"logRecords."+n}}return null!=e.schemaUrl&&e.hasOwnProperty("schemaUrl")&&!r.isString(e.schemaUrl)?"schemaUrl: string expected":null},i.fromObject=function(e){if(e instanceof o.opentelemetry.proto.logs.v1.ScopeLogs)return e;var t=new o.opentelemetry.proto.logs.v1.ScopeLogs;if(null!=e.scope){if("object"!=typeof e.scope)throw TypeError(".opentelemetry.proto.logs.v1.ScopeLogs.scope: object expected");t.scope=o.opentelemetry.proto.common.v1.InstrumentationScope.fromObject(e.scope)}if(e.logRecords){if(!Array.isArray(e.logRecords))throw TypeError(".opentelemetry.proto.logs.v1.ScopeLogs.logRecords: array expected");t.logRecords=[];for(var n=0;n<e.logRecords.length;++n){if("object"!=typeof e.logRecords[n])throw TypeError(".opentelemetry.proto.logs.v1.ScopeLogs.logRecords: object expected");t.logRecords[n]=o.opentelemetry.proto.logs.v1.LogRecord.fromObject(e.logRecords[n])}}return null!=e.schemaUrl&&(t.schemaUrl=String(e.schemaUrl)),t},i.toObject=function(e,t){t||(t={});var n={};if((t.arrays||t.defaults)&&(n.logRecords=[]),t.defaults&&(n.scope=null,n.schemaUrl=""),null!=e.scope&&e.hasOwnProperty("scope")&&(n.scope=o.opentelemetry.proto.common.v1.InstrumentationScope.toObject(e.scope,t)),e.logRecords&&e.logRecords.length){n.logRecords=[];for(var r=0;r<e.logRecords.length;++r)n.logRecords[r]=o.opentelemetry.proto.logs.v1.LogRecord.toObject(e.logRecords[r],t)}return null!=e.schemaUrl&&e.hasOwnProperty("schemaUrl")&&(n.schemaUrl=e.schemaUrl),n},i.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},i.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/opentelemetry.proto.logs.v1.ScopeLogs"},i}(),s.SeverityNumber=(i={},(a=Object.create(i))[i[0]="SEVERITY_NUMBER_UNSPECIFIED"]=0,a[i[1]="SEVERITY_NUMBER_TRACE"]=1,a[i[2]="SEVERITY_NUMBER_TRACE2"]=2,a[i[3]="SEVERITY_NUMBER_TRACE3"]=3,a[i[4]="SEVERITY_NUMBER_TRACE4"]=4,a[i[5]="SEVERITY_NUMBER_DEBUG"]=5,a[i[6]="SEVERITY_NUMBER_DEBUG2"]=6,a[i[7]="SEVERITY_NUMBER_DEBUG3"]=7,a[i[8]="SEVERITY_NUMBER_DEBUG4"]=8,a[i[9]="SEVERITY_NUMBER_INFO"]=9,a[i[10]="SEVERITY_NUMBER_INFO2"]=10,a[i[11]="SEVERITY_NUMBER_INFO3"]=11,a[i[12]="SEVERITY_NUMBER_INFO4"]=12,a[i[13]="SEVERITY_NUMBER_WARN"]=13,a[i[14]="SEVERITY_NUMBER_WARN2"]=14,a[i[15]="SEVERITY_NUMBER_WARN3"]=15,a[i[16]="SEVERITY_NUMBER_WARN4"]=16,a[i[17]="SEVERITY_NUMBER_ERROR"]=17,a[i[18]="SEVERITY_NUMBER_ERROR2"]=18,a[i[19]="SEVERITY_NUMBER_ERROR3"]=19,a[i[20]="SEVERITY_NUMBER_ERROR4"]=20,a[i[21]="SEVERITY_NUMBER_FATAL"]=21,a[i[22]="SEVERITY_NUMBER_FATAL2"]=22,a[i[23]="SEVERITY_NUMBER_FATAL3"]=23,a[i[24]="SEVERITY_NUMBER_FATAL4"]=24,a),s.LogRecordFlags=function(){var e={},t=Object.create(e);return t[e[0]="LOG_RECORD_FLAGS_DO_NOT_USE"]=0,t[e[255]="LOG_RECORD_FLAGS_TRACE_FLAGS_MASK"]=255,t}(),s.LogRecord=function(){function i(e){if(this.attributes=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return i.prototype.timeUnixNano=null,i.prototype.observedTimeUnixNano=null,i.prototype.severityNumber=null,i.prototype.severityText=null,i.prototype.body=null,i.prototype.attributes=r.emptyArray,i.prototype.droppedAttributesCount=null,i.prototype.flags=null,i.prototype.traceId=null,i.prototype.spanId=null,i.create=function(e){return new i(e)},i.encode=function(e,t){if(t||(t=n.create()),null!=e.timeUnixNano&&Object.hasOwnProperty.call(e,"timeUnixNano")&&t.uint32(9).fixed64(e.timeUnixNano),null!=e.severityNumber&&Object.hasOwnProperty.call(e,"severityNumber")&&t.uint32(16).int32(e.severityNumber),null!=e.severityText&&Object.hasOwnProperty.call(e,"severityText")&&t.uint32(26).string(e.severityText),null!=e.body&&Object.hasOwnProperty.call(e,"body")&&o.opentelemetry.proto.common.v1.AnyValue.encode(e.body,t.uint32(42).fork()).ldelim(),null!=e.attributes&&e.attributes.length)for(var r=0;r<e.attributes.length;++r)o.opentelemetry.proto.common.v1.KeyValue.encode(e.attributes[r],t.uint32(50).fork()).ldelim();return null!=e.droppedAttributesCount&&Object.hasOwnProperty.call(e,"droppedAttributesCount")&&t.uint32(56).uint32(e.droppedAttributesCount),null!=e.flags&&Object.hasOwnProperty.call(e,"flags")&&t.uint32(69).fixed32(e.flags),null!=e.traceId&&Object.hasOwnProperty.call(e,"traceId")&&t.uint32(74).bytes(e.traceId),null!=e.spanId&&Object.hasOwnProperty.call(e,"spanId")&&t.uint32(82).bytes(e.spanId),null!=e.observedTimeUnixNano&&Object.hasOwnProperty.call(e,"observedTimeUnixNano")&&t.uint32(89).fixed64(e.observedTimeUnixNano),t},i.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},i.decode=function(e,n){e instanceof t||(e=t.create(e));for(var r=void 0===n?e.len:e.pos+n,i=new o.opentelemetry.proto.logs.v1.LogRecord;e.pos<r;){var a=e.uint32();switch(a>>>3){case 1:i.timeUnixNano=e.fixed64();break;case 11:i.observedTimeUnixNano=e.fixed64();break;case 2:i.severityNumber=e.int32();break;case 3:i.severityText=e.string();break;case 5:i.body=o.opentelemetry.proto.common.v1.AnyValue.decode(e,e.uint32());break;case 6:i.attributes&&i.attributes.length||(i.attributes=[]),i.attributes.push(o.opentelemetry.proto.common.v1.KeyValue.decode(e,e.uint32()));break;case 7:i.droppedAttributesCount=e.uint32();break;case 8:i.flags=e.fixed32();break;case 9:i.traceId=e.bytes();break;case 10:i.spanId=e.bytes();break;default:e.skipType(7&a)}}return i},i.decodeDelimited=function(e){return e instanceof t||(e=new t(e)),this.decode(e,e.uint32())},i.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.timeUnixNano&&e.hasOwnProperty("timeUnixNano")&&!(r.isInteger(e.timeUnixNano)||e.timeUnixNano&&r.isInteger(e.timeUnixNano.low)&&r.isInteger(e.timeUnixNano.high)))return"timeUnixNano: integer|Long expected";if(null!=e.observedTimeUnixNano&&e.hasOwnProperty("observedTimeUnixNano")&&!(r.isInteger(e.observedTimeUnixNano)||e.observedTimeUnixNano&&r.isInteger(e.observedTimeUnixNano.low)&&r.isInteger(e.observedTimeUnixNano.high)))return"observedTimeUnixNano: integer|Long expected";if(null!=e.severityNumber&&e.hasOwnProperty("severityNumber"))switch(e.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!=e.severityText&&e.hasOwnProperty("severityText")&&!r.isString(e.severityText))return"severityText: string expected";if(null!=e.body&&e.hasOwnProperty("body")&&(n=o.opentelemetry.proto.common.v1.AnyValue.verify(e.body)))return"body."+n;if(null!=e.attributes&&e.hasOwnProperty("attributes")){if(!Array.isArray(e.attributes))return"attributes: array expected";for(var t=0;t<e.attributes.length;++t){var n;if(n=o.opentelemetry.proto.common.v1.KeyValue.verify(e.attributes[t]))return"attributes."+n}}return null!=e.droppedAttributesCount&&e.hasOwnProperty("droppedAttributesCount")&&!r.isInteger(e.droppedAttributesCount)?"droppedAttributesCount: integer expected":null!=e.flags&&e.hasOwnProperty("flags")&&!r.isInteger(e.flags)?"flags: integer expected":null!=e.traceId&&e.hasOwnProperty("traceId")&&!(e.traceId&&"number"==typeof e.traceId.length||r.isString(e.traceId))?"traceId: buffer expected":null!=e.spanId&&e.hasOwnProperty("spanId")&&!(e.spanId&&"number"==typeof e.spanId.length||r.isString(e.spanId))?"spanId: buffer expected":null},i.fromObject=function(e){if(e instanceof o.opentelemetry.proto.logs.v1.LogRecord)return e;var t=new o.opentelemetry.proto.logs.v1.LogRecord;switch(null!=e.timeUnixNano&&(r.Long?(t.timeUnixNano=r.Long.fromValue(e.timeUnixNano)).unsigned=!1:"string"==typeof e.timeUnixNano?t.timeUnixNano=parseInt(e.timeUnixNano,10):"number"==typeof e.timeUnixNano?t.timeUnixNano=e.timeUnixNano:"object"==typeof e.timeUnixNano&&(t.timeUnixNano=new r.LongBits(e.timeUnixNano.low>>>0,e.timeUnixNano.high>>>0).toNumber())),null!=e.observedTimeUnixNano&&(r.Long?(t.observedTimeUnixNano=r.Long.fromValue(e.observedTimeUnixNano)).unsigned=!1:"string"==typeof e.observedTimeUnixNano?t.observedTimeUnixNano=parseInt(e.observedTimeUnixNano,10):"number"==typeof e.observedTimeUnixNano?t.observedTimeUnixNano=e.observedTimeUnixNano:"object"==typeof e.observedTimeUnixNano&&(t.observedTimeUnixNano=new r.LongBits(e.observedTimeUnixNano.low>>>0,e.observedTimeUnixNano.high>>>0).toNumber())),e.severityNumber){default:if("number"==typeof e.severityNumber){t.severityNumber=e.severityNumber;break}break;case"SEVERITY_NUMBER_UNSPECIFIED":case 0:t.severityNumber=0;break;case"SEVERITY_NUMBER_TRACE":case 1:t.severityNumber=1;break;case"SEVERITY_NUMBER_TRACE2":case 2:t.severityNumber=2;break;case"SEVERITY_NUMBER_TRACE3":case 3:t.severityNumber=3;break;case"SEVERITY_NUMBER_TRACE4":case 4:t.severityNumber=4;break;case"SEVERITY_NUMBER_DEBUG":case 5:t.severityNumber=5;break;case"SEVERITY_NUMBER_DEBUG2":case 6:t.severityNumber=6;break;case"SEVERITY_NUMBER_DEBUG3":case 7:t.severityNumber=7;break;case"SEVERITY_NUMBER_DEBUG4":case 8:t.severityNumber=8;break;case"SEVERITY_NUMBER_INFO":case 9:t.severityNumber=9;break;case"SEVERITY_NUMBER_INFO2":case 10:t.severityNumber=10;break;case"SEVERITY_NUMBER_INFO3":case 11:t.severityNumber=11;break;case"SEVERITY_NUMBER_INFO4":case 12:t.severityNumber=12;break;case"SEVERITY_NUMBER_WARN":case 13:t.severityNumber=13;break;case"SEVERITY_NUMBER_WARN2":case 14:t.severityNumber=14;break;case"SEVERITY_NUMBER_WARN3":case 15:t.severityNumber=15;break;case"SEVERITY_NUMBER_WARN4":case 16:t.severityNumber=16;break;case"SEVERITY_NUMBER_ERROR":case 17:t.severityNumber=17;break;case"SEVERITY_NUMBER_ERROR2":case 18:t.severityNumber=18;break;case"SEVERITY_NUMBER_ERROR3":case 19:t.severityNumber=19;break;case"SEVERITY_NUMBER_ERROR4":case 20:t.severityNumber=20;break;case"SEVERITY_NUMBER_FATAL":case 21:t.severityNumber=21;break;case"SEVERITY_NUMBER_FATAL2":case 22:t.severityNumber=22;break;case"SEVERITY_NUMBER_FATAL3":case 23:t.severityNumber=23;break;case"SEVERITY_NUMBER_FATAL4":case 24:t.severityNumber=24}if(null!=e.severityText&&(t.severityText=String(e.severityText)),null!=e.body){if("object"!=typeof e.body)throw TypeError(".opentelemetry.proto.logs.v1.LogRecord.body: object expected");t.body=o.opentelemetry.proto.common.v1.AnyValue.fromObject(e.body)}if(e.attributes){if(!Array.isArray(e.attributes))throw TypeError(".opentelemetry.proto.logs.v1.LogRecord.attributes: array expected");t.attributes=[];for(var n=0;n<e.attributes.length;++n){if("object"!=typeof e.attributes[n])throw TypeError(".opentelemetry.proto.logs.v1.LogRecord.attributes: object expected");t.attributes[n]=o.opentelemetry.proto.common.v1.KeyValue.fromObject(e.attributes[n])}}return null!=e.droppedAttributesCount&&(t.droppedAttributesCount=e.droppedAttributesCount>>>0),null!=e.flags&&(t.flags=e.flags>>>0),null!=e.traceId&&("string"==typeof e.traceId?r.base64.decode(e.traceId,t.traceId=r.newBuffer(r.base64.length(e.traceId)),0):e.traceId.length>=0&&(t.traceId=e.traceId)),null!=e.spanId&&("string"==typeof e.spanId?r.base64.decode(e.spanId,t.spanId=r.newBuffer(r.base64.length(e.spanId)),0):e.spanId.length>=0&&(t.spanId=e.spanId)),t},i.toObject=function(e,t){t||(t={});var n={};if((t.arrays||t.defaults)&&(n.attributes=[]),t.defaults){if(r.Long){var i=new r.Long(0,0,!1);n.timeUnixNano=t.longs===String?i.toString():t.longs===Number?i.toNumber():i}else n.timeUnixNano=t.longs===String?"0":0;n.severityNumber=t.enums===String?"SEVERITY_NUMBER_UNSPECIFIED":0,n.severityText="",n.body=null,n.droppedAttributesCount=0,n.flags=0,t.bytes===String?n.traceId="":(n.traceId=[],t.bytes!==Array&&(n.traceId=r.newBuffer(n.traceId))),t.bytes===String?n.spanId="":(n.spanId=[],t.bytes!==Array&&(n.spanId=r.newBuffer(n.spanId))),r.Long?(i=new r.Long(0,0,!1),n.observedTimeUnixNano=t.longs===String?i.toString():t.longs===Number?i.toNumber():i):n.observedTimeUnixNano=t.longs===String?"0":0}if(null!=e.timeUnixNano&&e.hasOwnProperty("timeUnixNano")&&("number"==typeof e.timeUnixNano?n.timeUnixNano=t.longs===String?String(e.timeUnixNano):e.timeUnixNano:n.timeUnixNano=t.longs===String?r.Long.prototype.toString.call(e.timeUnixNano):t.longs===Number?new r.LongBits(e.timeUnixNano.low>>>0,e.timeUnixNano.high>>>0).toNumber():e.timeUnixNano),null!=e.severityNumber&&e.hasOwnProperty("severityNumber")&&(n.severityNumber=t.enums===String?void 0===o.opentelemetry.proto.logs.v1.SeverityNumber[e.severityNumber]?e.severityNumber:o.opentelemetry.proto.logs.v1.SeverityNumber[e.severityNumber]:e.severityNumber),null!=e.severityText&&e.hasOwnProperty("severityText")&&(n.severityText=e.severityText),null!=e.body&&e.hasOwnProperty("body")&&(n.body=o.opentelemetry.proto.common.v1.AnyValue.toObject(e.body,t)),e.attributes&&e.attributes.length){n.attributes=[];for(var a=0;a<e.attributes.length;++a)n.attributes[a]=o.opentelemetry.proto.common.v1.KeyValue.toObject(e.attributes[a],t)}return null!=e.droppedAttributesCount&&e.hasOwnProperty("droppedAttributesCount")&&(n.droppedAttributesCount=e.droppedAttributesCount),null!=e.flags&&e.hasOwnProperty("flags")&&(n.flags=e.flags),null!=e.traceId&&e.hasOwnProperty("traceId")&&(n.traceId=t.bytes===String?r.base64.encode(e.traceId,0,e.traceId.length):t.bytes===Array?Array.prototype.slice.call(e.traceId):e.traceId),null!=e.spanId&&e.hasOwnProperty("spanId")&&(n.spanId=t.bytes===String?r.base64.encode(e.spanId,0,e.spanId.length):t.bytes===Array?Array.prototype.slice.call(e.spanId):e.spanId),null!=e.observedTimeUnixNano&&e.hasOwnProperty("observedTimeUnixNano")&&("number"==typeof e.observedTimeUnixNano?n.observedTimeUnixNano=t.longs===String?String(e.observedTimeUnixNano):e.observedTimeUnixNano:n.observedTimeUnixNano=t.longs===String?r.Long.prototype.toString.call(e.observedTimeUnixNano):t.longs===Number?new r.LongBits(e.observedTimeUnixNano.low>>>0,e.observedTimeUnixNano.high>>>0).toNumber():e.observedTimeUnixNano),n},i.prototype.toJSON=function(){return this.constructor.toObject(this,e.util.toJSONOptions)},i.getTypeUrl=function(e){return void 0===e&&(e="type.googleapis.com"),e+"/opentelemetry.proto.logs.v1.LogRecord"},i}(),s}(),i}(),c),u}(),VD=o}var zD=qD();function KD(e){var t=BigInt(1e9);return BigInt(e[0])*t+BigInt(e[1])}function WD(e){var t,n=KD(e);return t=n,{low:Number(BigInt.asUintN(32,t)),high:Number(BigInt.asUintN(32,t>>BigInt(32)))}}var QD="undefined"!=typeof BigInt?function(e){return KD(e).toString()}:Zg;function JD(e){return e}function $D(e){if(void 0!==e)return Lg(e)}var XD={encodeHrTime:WD,encodeSpanContext:Lg,encodeOptionalSpanContext:$D};function ZD(e){var t,n;if(void 0===e)return XD;var r=null===(t=e.useLongBits)||void 0===t||t,o=null!==(n=e.useHex)&&void 0!==n&&n;return{encodeHrTime:r?WD:QD,encodeSpanContext:o?JD:Lg,encodeOptionalSpanContext:o?JD:$D}}var ej=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a};function tj(e){return{attributes:rj(e.attributes),droppedAttributesCount:0}}function nj(e){return{name:e.name,version:e.version}}function rj(e){return Object.keys(e).map((function(t){return oj(t,e[t])}))}function oj(e,t){return{key:e,value:ij(t)}}function ij(e){var t=typeof 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(ij)}}:"object"===t&&null!=e?{kvlistValue:{values:Object.entries(e).map((function(e){var t=ej(e,2);return oj(t[0],t[1])}))}}:{}}var aj=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},sj=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a};function cj(e,t){return{resourceLogs:uj(e,ZD(t))}}function uj(e,t){var n=function(e){var t,n,r=new Map;try{for(var o=aj(e),i=o.next();!i.done;i=o.next()){var a=i.value,s=a.resource,c=a.instrumentationScope,u=c.name,l=c.version,p=void 0===l?"":l,d=c.schemaUrl,f=void 0===d?"":d,h=r.get(s);h||(h=new Map,r.set(s,h));var m=u+"@"+p+":"+f,g=h.get(m);g||(g=[],h.set(m,g)),g.push(a)}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return r}(e);return Array.from(n,(function(e){var n=sj(e,2),r=n[0],o=n[1];return{resource:tj(r),scopeLogs:Array.from(o,(function(e){var n=sj(e,2)[1];return{scope:nj(n[0].instrumentationScope),logRecords:n.map((function(e){return function(e,t){var n,r,o;return{timeUnixNano:t.encodeHrTime(e.hrTime),observedTimeUnixNano:t.encodeHrTime(e.hrTimeObserved),severityNumber:e.severityNumber,severityText:e.severityText,body:ij(e.body),attributes:lj(e.attributes),droppedAttributesCount:e.droppedAttributesCount,flags:null===(n=e.spanContext)||void 0===n?void 0:n.traceFlags,traceId:t.encodeOptionalSpanContext(null===(r=e.spanContext)||void 0===r?void 0:r.traceId),spanId:t.encodeOptionalSpanContext(null===(o=e.spanContext)||void 0===o?void 0:o.spanId)}}(e,t)})),schemaUrl:n[0].instrumentationScope.schemaUrl}})),schemaUrl:void 0}}))}function lj(e){return Object.keys(e).map((function(t){return oj(t,e[t])}))}var pj=zD.opentelemetry.proto.collector.logs.v1.ExportLogsServiceResponse,dj=zD.opentelemetry.proto.collector.logs.v1.ExportLogsServiceRequest,fj={serializeRequest:function(e){var t=cj(e);return dj.encode(t).finish()},deserializeResponse:function(e){return pj.decode(e)}};function hj(e,t){return Array.from(e.map((function(e){return{scope:nj(e.scope),metrics:e.metrics.map((function(e){return function(e,t){var n={name:e.descriptor.name,description:e.descriptor.description,unit:e.descriptor.unit},r=function(e){switch(e){case rM.DELTA:return 1;case rM.CUMULATIVE:return 2}}(e.aggregationTemporality);switch(e.dataPointType){case oM.SUM:n.sum={aggregationTemporality:r,isMonotonic:e.isMonotonic,dataPoints:mj(e,t)};break;case oM.GAUGE:n.gauge={dataPoints:mj(e,t)};break;case oM.HISTOGRAM:n.histogram={aggregationTemporality:r,dataPoints:gj(e,t)};break;case oM.EXPONENTIAL_HISTOGRAM:n.exponentialHistogram={aggregationTemporality:r,dataPoints:_j(e,t)}}return n}(e,t)})),schemaUrl:e.scope.schemaUrl}})))}function mj(e,t){return e.dataPoints.map((function(n){return function(e,t,n){var r={attributes:rj(e.attributes),startTimeUnixNano:n.encodeHrTime(e.startTime),timeUnixNano:n.encodeHrTime(e.endTime)};switch(t){case me.INT:r.asInt=e.value;break;case me.DOUBLE:r.asDouble=e.value}return r}(n,e.descriptor.valueType,t)}))}function gj(e,t){return e.dataPoints.map((function(e){var n=e.value;return{attributes:rj(e.attributes),bucketCounts:n.buckets.counts,explicitBounds:n.buckets.boundaries,count:n.count,sum:n.sum,min:n.min,max:n.max,startTimeUnixNano:t.encodeHrTime(e.startTime),timeUnixNano:t.encodeHrTime(e.endTime)}}))}function _j(e,t){return e.dataPoints.map((function(e){var n=e.value;return{attributes:rj(e.attributes),count:n.count,min:n.min,max:n.max,sum:n.sum,positive:{offset:n.positive.offset,bucketCounts:n.positive.bucketCounts},negative:{offset:n.negative.offset,bucketCounts:n.negative.bucketCounts},scale:n.scale,zeroCount:n.zeroCount,startTimeUnixNano:t.encodeHrTime(e.startTime),timeUnixNano:t.encodeHrTime(e.endTime)}}))}function yj(e,t){return{resourceMetrics:e.map((function(e){return function(e,t){var n=ZD(t);return{resource:tj(e.resource),schemaUrl:void 0,scopeMetrics:hj(e.scopeMetrics,n)}}(e,t)}))}}var vj=zD.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceResponse,bj=zD.opentelemetry.proto.collector.metrics.v1.ExportMetricsServiceRequest,Ej={serializeRequest:function(e){var t=yj([e]);return bj.encode(t).finish()},deserializeResponse:function(e){return vj.decode(e)}},Sj=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Tj=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a};function Oj(e,t){var n,r=e.spanContext(),o=e.status;return{traceId:t.encodeSpanContext(r.traceId),spanId:t.encodeSpanContext(r.spanId),parentSpanId:t.encodeOptionalSpanContext(e.parentSpanId),traceState:null===(n=r.traceState)||void 0===n?void 0:n.serialize(),name:e.name,kind:null==e.kind?0:e.kind+1,startTimeUnixNano:t.encodeHrTime(e.startTime),endTimeUnixNano:t.encodeHrTime(e.endTime),attributes:rj(e.attributes),droppedAttributesCount:e.droppedAttributesCount,events:e.events.map((function(e){return function(e,t){return{attributes:e.attributes?rj(e.attributes):[],name:e.name,timeUnixNano:t.encodeHrTime(e.time),droppedAttributesCount:e.droppedAttributesCount||0}}(e,t)})),droppedEventsCount:e.droppedEventsCount,status:{code:o.code,message:o.message},links:e.links.map((function(e){return function(e,t){var n;return{attributes:e.attributes?rj(e.attributes):[],spanId:t.encodeSpanContext(e.context.spanId),traceId:t.encodeSpanContext(e.context.traceId),traceState:null===(n=e.context.traceState)||void 0===n?void 0:n.serialize(),droppedAttributesCount:e.droppedAttributesCount||0}}(e,t)})),droppedLinksCount:e.droppedLinksCount}}function Aj(e,t){return{resourceSpans:wj(e,ZD(t))}}function wj(e,t){for(var n=function(e){var t,n,r=new Map;try{for(var o=Sj(e),i=o.next();!i.done;i=o.next()){var a=i.value,s=r.get(a.resource);s||(s=new Map,r.set(a.resource,s));var c=a.instrumentationLibrary.name+"@"+(a.instrumentationLibrary.version||"")+":"+(a.instrumentationLibrary.schemaUrl||""),u=s.get(c);u||(u=[],s.set(c,u)),u.push(a)}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return r}(e),r=[],o=n.entries(),i=o.next();!i.done;){for(var a=Tj(i.value,2),s=a[0],c=[],u=a[1].values(),l=u.next();!l.done;){var p=l.value;if(p.length>0){var d=p.map((function(e){return Oj(e,t)}));c.push({scope:nj(p[0].instrumentationLibrary),spans:d,schemaUrl:p[0].instrumentationLibrary.schemaUrl})}l=u.next()}var f={resource:tj(s),scopeSpans:c,schemaUrl:void 0};r.push(f),i=o.next()}return r}var Rj=zD.opentelemetry.proto.collector.trace.v1.ExportTraceServiceResponse,Nj=zD.opentelemetry.proto.collector.trace.v1.ExportTraceServiceRequest,Ij={serializeRequest:function(e){var t=Aj(e);return Nj.encode(t).finish()},deserializeResponse:function(e){return Rj.decode(e)}},Pj={serializeRequest:function(e){var t=cj(e,{useHex:!0,useLongBits:!1});return(new TextEncoder).encode(JSON.stringify(t))},deserializeResponse:function(e){var t=new TextDecoder;return JSON.parse(t.decode(e))}},xj={serializeRequest:function(e){var t=yj([e],{useLongBits:!1});return(new TextEncoder).encode(JSON.stringify(t))},deserializeResponse:function(e){var t=new TextDecoder;return JSON.parse(t.decode(e))}},Cj={serializeRequest:function(e){var t=Aj(e,{useHex:!0,useLongBits:!1});return(new TextEncoder).encode(JSON.stringify(t))},deserializeResponse:function(e){var t=new TextDecoder;return JSON.parse(t.decode(e))}},Mj=Object.freeze({__proto__:null,JsonLogsSerializer:Pj,JsonMetricsSerializer:xj,JsonTraceSerializer:Cj,ProtobufLogsSerializer:fj,ProtobufMetricsSerializer:Ej,ProtobufTraceSerializer:Ij}),Lj=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},Uj=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}};var kj=function(){function e(e){this._transport=e}return e.prototype.retry=function(e,t,n){var r=this;return new Promise((function(o,i){setTimeout((function(){r._transport.send(e,t).then(o,i)}),n)}))},e.prototype.send=function(e,t){var n;return Lj(this,void 0,void 0,(function(){var r,o,i,a,s,c,u;return Uj(this,(function(l){switch(l.label){case 0:return r=Date.now()+t,[4,this._transport.send(e,t)];case 1:o=l.sent(),i=5,a=1e3,l.label=2;case 2:return"retryable"===o.status&&i>0?(i--,s=Math.max(Math.min(a,5e3)+(.4*Math.random()-.2),0),a*=1.5,c=null!==(n=o.retryInMillis)&&void 0!==n?n:s,u=r-Date.now(),c>u?[2,o]:[4,this.retry(e,u,c)]):[3,4];case 3:return o=l.sent(),[3,2];case 4:return[2,o]}}))}))},e.prototype.shutdown=function(){return this._transport.shutdown()},e}();function Dj(e){return new kj(e.transport)}function jj(e){if(null!=e){var t=Number.parseInt(e,10);if(Number.isInteger(t))return t>0?1e3*t:-1;var n=new Date(e).getTime()-Date.now();return n>=0?n:0}}var Bj=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},Vj=function(){function e(e){this._parameters=e}return e.prototype.send=function(e,t){var n=this;return new Promise((function(r){var o=new XMLHttpRequest;o.timeout=t,o.open("POST",n._parameters.url);var i=n._parameters.headers();Object.entries(i).forEach((function(e){var t=Bj(e,2),n=t[0],r=t[1];o.setRequestHeader(n,r)})),o.ontimeout=function(e){r({status:"failure",error:new Error("XHR request timed out")})},o.onreadystatechange=function(){var e;o.status>=200&&o.status<=299?(Nt.debug("XHR success"),r({status:"success"})):o.status&&(e=o.status,[429,502,503,504].includes(e))?r({status:"retryable",retryInMillis:jj(o.getResponseHeader("Retry-After"))}):0!==o.status&&r({status:"failure",error:new Error("XHR request failed with non-retryable status")})},o.onabort=function(){r({status:"failure",error:new Error("XHR request aborted")})},o.onerror=function(){r({status:"failure",error:new Error("XHR request errored")})},o.send(e)}))},e.prototype.shutdown=function(){},e}();var Fj=function(){function e(e){this._params=e}return e.prototype.send=function(e){var t=this;return new Promise((function(n){navigator.sendBeacon(t._params.url,new Blob([e],{type:t._params.blobType}))?(Nt.debug("SendBeacon success"),n({status:"success"})):n({status:"failure",error:new Error("SendBeacon failed")})}))},e.prototype.shutdown=function(){},e}();var Gj=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a};var Hj=function(){return Hj=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},Hj.apply(this,arguments)};function Yj(e,t,n){var r=Hj({},n()),o={};return function(){return null!=t&&Object.assign(o,t()),null!=e&&Object.assign(o,e()),Object.assign(o,r)}}function qj(e){if(null!=e)try{return new URL(e),e}catch(t){throw new Error("Configuration: Could not parse user-provided export URL: '"+e+"'")}}function zj(e,t,n){var r,o,i,a,s;return Hj(Hj({},function(e,t,n){var r,o,i,a,s,c;return{timeoutMillis:iD(null!==(o=null!==(r=e.timeoutMillis)&&void 0!==r?r:t.timeoutMillis)&&void 0!==o?o:n.timeoutMillis),concurrencyLimit:null!==(a=null!==(i=e.concurrencyLimit)&&void 0!==i?i:t.concurrencyLimit)&&void 0!==a?a:n.concurrencyLimit,compression:null!==(c=null!==(s=e.compression)&&void 0!==s?s:t.compression)&&void 0!==c?c:n.compression}}(e,t,n)),{headers:Yj((s=e.headers,function(){var e,t={};return Object.entries(null!==(e=null==s?void 0:s())&&void 0!==e?e:{}).forEach((function(e){var n=Gj(e,2),r=n[0],o=n[1];void 0!==o?t[r]=String(o):Nt.warn('Header "'+r+'" has invalid value ('+o+") and will be ignored")})),t}),t.headers,n.headers),url:null!==(o=null!==(r=qj(e.url))&&void 0!==r?r:t.url)&&void 0!==o?o:n.url,agentOptions:null!==(a=null!==(i=e.agentOptions)&&void 0!==i?i:t.agentOptions)&&void 0!==a?a:n.agentOptions})}function Kj(e,t,n){return zj({url:e.url,timeoutMillis:e.timeoutMillis,headers:aD(e.headers),concurrencyLimit:e.concurrencyLimit},{},function(e,t){return Hj(Hj({},{timeoutMillis:1e4,concurrencyLimit:30,compression:"none"}),{headers:function(){return e},url:"http://localhost:4318/"+t,agentOptions:{keepAlive:!0}})}(n,t))}function Wj(e,t,n,r){var o=!!e.headers||"function"!=typeof navigator.sendBeacon,i=Kj(e,n,r);return o?function(e,t){return mD(e,t,Dj({transport:(n=e,new Vj(n))}));var n}(i,t):function(e,t){return mD(e,t,Dj({transport:(n={url:e.url,blobType:e.headers()["Content-Type"]},new Fj(n))}));var n}(i,t)}var Qj,Jj,$j=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Xj=function(e){function t(t){return void 0===t&&(t={}),e.call(this,Wj(t,Cj,"v1/traces",{"Content-Type":"application/json"}))||this}return $j(t,e),t}(nD),Zj=n(Object.freeze({__proto__:null,OTLPTraceExporter:Xj})),eB=n(Mj),tB={};function nB(){if(Qj)return tB;Qj=1,Object.defineProperty(tB,"__esModule",{value:!0}),tB.sendBeacon=void 0;const e=Wt,t=ny,n=e=>{if(void 0!==globalThis.window&&"undefined"!=typeof CustomEvent)try{globalThis.window.dispatchEvent(new CustomEvent("imqa:exporter",{detail:{type:e}}))}catch{}},r=(r,o,i,a)=>{var s;try{const s=new XMLHttpRequest;s.open("POST",r,!0),(null==a?void 0:a.withCredentials)&&(s.withCredentials=!0),s.onload=()=>{var e,o;s.status>=200&&s.status<300?((null==a?void 0:a.debug)&&console.log(`[IMQA] Successfully sent data to ${r}`,{status:s.status}),n("success"),null===(e=null==a?void 0:a.onExportSuccess)||void 0===e||e.call(a),i({code:t.ExportResultCode.SUCCESS})):((null==a?void 0:a.debug)&&console.warn(`[IMQA] Failed to send data to ${r}`,{status:s.status,statusText:s.statusText,responseHeaders:s.getAllResponseHeaders()}),n("failure"),null===(o=null==a?void 0:a.onExportFailure)||void 0===o||o.call(a),i({code:t.ExportResultCode.FAILED}))},s.onerror=()=>{var e;(null==a?void 0:a.debug)&&console.error(`[IMQA] Network error sending data to ${r}. This might be a CORS issue.`,{readyState:s.readyState,status:s.status,statusText:s.statusText}),n("failure"),null===(e=null==a?void 0:a.onExportFailure)||void 0===e||e.call(a),i({code:t.ExportResultCode.FAILED})},s.ontimeout=()=>{var e;(null==a?void 0:a.debug)&&console.warn(`[IMQA] Timeout sending data to ${r}`,{timeout:a.timeout}),n("failure"),null===(e=null==a?void 0:a.onExportFailure)||void 0===e||e.call(a),i({code:t.ExportResultCode.FAILED})},s.setRequestHeader("Content-Type","application/json"),(null==a?void 0:a.headers)&&Object.entries(a.headers).forEach((([t,n])=>{try{s.setRequestHeader(t,n)}catch(r){(null==a?void 0:a.debug)&&e.diag.warn(`[IMQA] Failed to set header ${t}: ${n}`,r)}})),s.timeout=(null==a?void 0:a.timeout)||1e4,(null==a?void 0:a.debug)&&console.log(`[IMQA] Sending telemetry data to ${r}`,{method:"POST",headers:a.headers,withCredentials:a.withCredentials,timeout:s.timeout,dataSize:o.size}),s.send(o)}catch(o){(null==a?void 0:a.debug)&&e.diag.error(`[IMQA] Exception sending data to ${r}:`,o),n("failure"),null===(s=null==a?void 0:a.onExportFailure)||void 0===s||s.call(a),i({code:t.ExportResultCode.FAILED})}};return tB.sendBeacon=(o,i,a,s)=>{var c,u;try{const u=i instanceof Blob?i:new Blob([i instanceof Uint8Array?i.buffer:i]),l=null==s?void 0:s.dropPolicyEnabled,p=(()=>{if(void 0===globalThis.window||!globalThis.window.localStorage)return!1;try{const t=globalThis.window.localStorage.getItem("__imqa_service_status");if(t){const n=JSON.parse(t),r=!0===n.dropPolicy;return e.diag.debug(`[IMQA] isDropPolicyEnabled check: dropPolicy=${n.dropPolicy}, result=${r}`),r}e.diag.debug("[IMQA] isDropPolicyEnabled: no stored service status found")}catch(t){e.diag.debug("[IMQA] isDropPolicyEnabled: parse error",t)}return!1})(),d=null!=l?l:p;if(e.diag.debug(`[IMQA] sendBeacon: dropPolicyFromOptions=${l}, dropPolicyFromStorage=${p}, dropPolicyActive=${d}`),d)return e.diag.debug(`[IMQA] dropPolicy enabled, using XHR for ${o}`),void r(o,u,a,s);if("undefined"!=typeof navigator&&"function"==typeof navigator.sendBeacon){(null==s?void 0:s.debug)&&e.diag.debug(`[IMQA] Attempting to use navigator.sendBeacon for ${o}`);navigator.sendBeacon(o,u)?((null==s?void 0:s.debug)&&e.diag.debug(`[IMQA] navigator.sendBeacon succeeded for ${o}`),n("success"),null===(c=null==s?void 0:s.onExportSuccess)||void 0===c||c.call(s),a({code:t.ExportResultCode.SUCCESS})):((null==s?void 0:s.debug)&&e.diag.warn(`[IMQA] navigator.sendBeacon failed for ${o}, falling back to XHR`),r(o,u,a,s))}else(null==s?void 0:s.debug)&&e.diag.debug(`[IMQA] navigator.sendBeacon not available, using XHR for ${o}`),r(o,u,a,s)}catch(r){(null==s?void 0:s.debug)&&e.diag.error(`[IMQA] Exception in sendBeacon for ${o}:`,r),n("failure"),null===(u=null==s?void 0:s.onExportFailure)||void 0===u||u.call(s),a({code:t.ExportResultCode.FAILED})}},tB}var rB,oB={};var iB,aB,sB,cB={},uB=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),lB=function(e){function t(t){return void 0===t&&(t={}),e.call(this,Wj(t,Ij,"v1/traces",{"Content-Type":"application/x-protobuf"}))||this}return uB(t,e),t}(nD),pB=n(Object.freeze({__proto__:null,OTLPTraceExporter:lB})),dB={},fB={};function hB(){return iB||(iB=1,function(e){var t={};e.default=function(e,n,r,o,i){var a=new Worker(t[n]||(t[n]=URL.createObjectURL(new Blob([e+';addEventListener("error",function(e){e=e.error;postMessage({$e$:[e.message,e.code,e.stack]})})'],{type:"text/javascript"}))));return a.onmessage=function(e){var t=e.data,n=t.$e$;if(n){var r=new Error(n[0]);r.code=n[1],r.stack=n[2],i(r,null)}else i(null,t)},a.postMessage(r,o),a}}(fB)),fB}function mB(){if(aB)return dB;aB=1;var e=hB(),t=Uint8Array,n=Uint16Array,r=Uint32Array,o=new t([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),i=new t([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),a=new t([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),s=function(e,t){for(var o=new n(31),i=0;i<31;++i)o[i]=t+=1<<e[i-1];var a=new r(o[30]);for(i=1;i<30;++i)for(var s=o[i];s<o[i+1];++s)a[s]=s-o[i]<<5|i;return[o,a]},c=s(o,2),u=c[0],l=c[1];u[28]=258,l[258]=28;for(var p=s(i,0),d=p[0],f=p[1],h=new n(32768),m=0;m<32768;++m){var g=(43690&m)>>>1|(21845&m)<<1;g=(61680&(g=(52428&g)>>>2|(13107&g)<<2))>>>4|(3855&g)<<4,h[m]=((65280&g)>>>8|(255&g)<<8)>>>1}var _=function(e,t,r){for(var o=e.length,i=0,a=new n(t);i<o;++i)e[i]&&++a[e[i]-1];var s,c=new n(t);for(i=0;i<t;++i)c[i]=c[i-1]+a[i-1]<<1;if(r){s=new n(1<<t);var u=15-t;for(i=0;i<o;++i)if(e[i])for(var l=i<<4|e[i],p=t-e[i],d=c[e[i]-1]++<<p,f=d|(1<<p)-1;d<=f;++d)s[h[d]>>>u]=l}else for(s=new n(o),i=0;i<o;++i)e[i]&&(s[i]=h[c[e[i]-1]++]>>>15-e[i]);return s},y=new t(288);for(m=0;m<144;++m)y[m]=8;for(m=144;m<256;++m)y[m]=9;for(m=256;m<280;++m)y[m]=7;for(m=280;m<288;++m)y[m]=8;var v=new t(32);for(m=0;m<32;++m)v[m]=5;var b=_(y,9,0),E=_(y,9,1),S=_(v,5,0),T=_(v,5,1),O=function(e){for(var t=e[0],n=1;n<e.length;++n)e[n]>t&&(t=e[n]);return t},A=function(e,t,n){var r=t/8|0;return(e[r]|e[r+1]<<8)>>(7&t)&n},w=function(e,t){var n=t/8|0;return(e[n]|e[n+1]<<8|e[n+2]<<16)>>(7&t)},R=function(e){return(e+7)/8|0},N=function(e,o,i){(null==o||o<0)&&(o=0),(null==i||i>e.length)&&(i=e.length);var a=new(2==e.BYTES_PER_ELEMENT?n:4==e.BYTES_PER_ELEMENT?r:t)(i-o);return a.set(e.subarray(o,i)),a};dB.FlateErrorCode={UnexpectedEOF:0,InvalidBlockType:1,InvalidLengthLiteral:2,InvalidDistance:3,StreamFinished:4,NoStreamHandler:5,InvalidHeader:6,NoCallback:7,InvalidUTF8:8,ExtraFieldTooLong:9,InvalidDate:10,FilenameTooLong:11,StreamFinishing:12,InvalidZipData:13,UnknownCompressionMethod:14};var I=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],P=function(e,t,n){var r=new Error(t||I[e]);if(r.code=e,Error.captureStackTrace&&Error.captureStackTrace(r,P),!n)throw r;return r},x=function(e,n,r){var s=e.length;if(!s||r&&r.f&&!r.l)return n||new t(0);var c=!n||r,l=!r||r.i;r||(r={}),n||(n=new t(3*s));var p=function(e){var r=n.length;if(e>r){var o=new t(Math.max(2*r,e));o.set(n),n=o}},f=r.f||0,h=r.p||0,m=r.b||0,g=r.l,y=r.d,v=r.m,b=r.n,S=8*s;do{if(!g){f=A(e,h,1);var I=A(e,h+1,3);if(h+=3,!I){var x=e[(G=R(h)+4)-4]|e[G-3]<<8,C=G+x;if(C>s){l&&P(0);break}c&&p(m+x),n.set(e.subarray(G,C),m),r.b=m+=x,r.p=h=8*C,r.f=f;continue}if(1==I)g=E,y=T,v=9,b=5;else if(2==I){var M=A(e,h,31)+257,L=A(e,h+10,15)+4,U=M+A(e,h+5,31)+1;h+=14;for(var k=new t(U),D=new t(19),j=0;j<L;++j)D[a[j]]=A(e,h+3*j,7);h+=3*L;var B=O(D),V=(1<<B)-1,F=_(D,B,1);for(j=0;j<U;){var G,H=F[A(e,h,V)];if(h+=15&H,(G=H>>>4)<16)k[j++]=G;else{var Y=0,q=0;for(16==G?(q=3+A(e,h,3),h+=2,Y=k[j-1]):17==G?(q=3+A(e,h,7),h+=3):18==G&&(q=11+A(e,h,127),h+=7);q--;)k[j++]=Y}}var z=k.subarray(0,M),K=k.subarray(M);v=O(z),b=O(K),g=_(z,v,1),y=_(K,b,1)}else P(1);if(h>S){l&&P(0);break}}c&&p(m+131072);for(var W=(1<<v)-1,Q=(1<<b)-1,J=h;;J=h){var $=(Y=g[w(e,h)&W])>>>4;if((h+=15&Y)>S){l&&P(0);break}if(Y||P(2),$<256)n[m++]=$;else{if(256==$){J=h,g=null;break}var X=$-254;if($>264){var Z=o[j=$-257];X=A(e,h,(1<<Z)-1)+u[j],h+=Z}var ee=y[w(e,h)&Q],te=ee>>>4;ee||P(3),h+=15&ee;K=d[te];if(te>3){Z=i[te];K+=w(e,h)&(1<<Z)-1,h+=Z}if(h>S){l&&P(0);break}c&&p(m+131072);for(var ne=m+X;m<ne;m+=4)n[m]=n[m-K],n[m+1]=n[m+1-K],n[m+2]=n[m+2-K],n[m+3]=n[m+3-K];m=ne}}r.l=g,r.p=J,r.b=m,r.f=f,g&&(f=1,r.m=v,r.d=y,r.n=b)}while(!f);return m==n.length?n:N(n,0,m)},C=function(e,t,n){n<<=7&t;var r=t/8|0;e[r]|=n,e[r+1]|=n>>>8},M=function(e,t,n){n<<=7&t;var r=t/8|0;e[r]|=n,e[r+1]|=n>>>8,e[r+2]|=n>>>16},L=function(e,r){for(var o=[],i=0;i<e.length;++i)e[i]&&o.push({s:i,f:e[i]});var a=o.length,s=o.slice();if(!a)return[F,0];if(1==a){var c=new t(o[0].s+1);return c[o[0].s]=1,[c,1]}o.sort((function(e,t){return e.f-t.f})),o.push({s:-1,f:25001});var u=o[0],l=o[1],p=0,d=1,f=2;for(o[0]={s:-1,f:u.f+l.f,l:u,r:l};d!=a-1;)u=o[o[p].f<o[f].f?p++:f++],l=o[p!=d&&o[p].f<o[f].f?p++:f++],o[d++]={s:-1,f:u.f+l.f,l:u,r:l};var h=s[0].s;for(i=1;i<a;++i)s[i].s>h&&(h=s[i].s);var m=new n(h+1),g=U(o[d-1],m,0);if(g>r){i=0;var _=0,y=g-r,v=1<<y;for(s.sort((function(e,t){return m[t.s]-m[e.s]||e.f-t.f}));i<a;++i){var b=s[i].s;if(!(m[b]>r))break;_+=v-(1<<g-m[b]),m[b]=r}for(_>>>=y;_>0;){var E=s[i].s;m[E]<r?_-=1<<r-m[E]++-1:++i}for(;i>=0&&_;--i){var S=s[i].s;m[S]==r&&(--m[S],++_)}g=r}return[new t(m),g]},U=function(e,t,n){return-1==e.s?Math.max(U(e.l,t,n+1),U(e.r,t,n+1)):t[e.s]=n},k=function(e){for(var t=e.length;t&&!e[--t];);for(var r=new n(++t),o=0,i=e[0],a=1,s=function(e){r[o++]=e},c=1;c<=t;++c)if(e[c]==i&&c!=t)++a;else{if(!i&&a>2){for(;a>138;a-=138)s(32754);a>2&&(s(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(s(i),--a;a>6;a-=6)s(8304);a>2&&(s(a-3<<5|8208),a=0)}for(;a--;)s(i);a=1,i=e[c]}return[r.subarray(0,o),t]},D=function(e,t){for(var n=0,r=0;r<t.length;++r)n+=e[r]*t[r];return n},j=function(e,t,n){var r=n.length,o=R(t+2);e[o]=255&r,e[o+1]=r>>>8,e[o+2]=255^e[o],e[o+3]=255^e[o+1];for(var i=0;i<r;++i)e[o+i+4]=n[i];return 8*(o+4+r)},B=function(e,t,r,s,c,u,l,p,d,f,h){C(t,h++,r),++c[256];for(var m=L(c,15),g=m[0],E=m[1],T=L(u,15),O=T[0],A=T[1],w=k(g),R=w[0],N=w[1],I=k(O),P=I[0],x=I[1],U=new n(19),B=0;B<R.length;++B)U[31&R[B]]++;for(B=0;B<P.length;++B)U[31&P[B]]++;for(var V=L(U,7),F=V[0],G=V[1],H=19;H>4&&!F[a[H-1]];--H);var Y,q,z,K,W=f+5<<3,Q=D(c,y)+D(u,v)+l,J=D(c,g)+D(u,O)+l+14+3*H+D(U,F)+(2*U[16]+3*U[17]+7*U[18]);if(W<=Q&&W<=J)return j(t,h,e.subarray(d,d+f));if(C(t,h,1+(J<Q)),h+=2,J<Q){Y=_(g,E,0),q=g,z=_(O,A,0),K=O;var $=_(F,G,0);C(t,h,N-257),C(t,h+5,x-1),C(t,h+10,H-4),h+=14;for(B=0;B<H;++B)C(t,h+3*B,F[a[B]]);h+=3*H;for(var X=[R,P],Z=0;Z<2;++Z){var ee=X[Z];for(B=0;B<ee.length;++B){var te=31&ee[B];C(t,h,$[te]),h+=F[te],te>15&&(C(t,h,ee[B]>>>5&127),h+=ee[B]>>>12)}}}else Y=b,q=y,z=S,K=v;for(B=0;B<p;++B)if(s[B]>255){te=s[B]>>>18&31;M(t,h,Y[te+257]),h+=q[te+257],te>7&&(C(t,h,s[B]>>>23&31),h+=o[te]);var ne=31&s[B];M(t,h,z[ne]),h+=K[ne],ne>3&&(M(t,h,s[B]>>>5&8191),h+=i[ne])}else M(t,h,Y[s[B]]),h+=q[s[B]];return M(t,h,Y[256]),h+q[256]},V=new r([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),F=new t(0),G=function(e,a,s,c,u,p){var d=e.length,h=new t(c+d+5*(1+Math.ceil(d/7e3))+u),m=h.subarray(c,h.length-u),g=0;if(!a||d<8)for(var _=0;_<=d;_+=65535){var y=_+65535;y>=d&&(m[g>>3]=p),g=j(m,g+1,e.subarray(_,y))}else{for(var v=V[a-1],b=v>>>13,E=8191&v,S=(1<<s)-1,T=new n(32768),O=new n(S+1),A=Math.ceil(s/3),w=2*A,I=function(t){return(e[t]^e[t+1]<<A^e[t+2]<<w)&S},P=new r(25e3),x=new n(288),C=new n(32),M=0,L=0,U=(_=0,0),k=0,D=0;_<d;++_){var G=I(_),H=32767&_,Y=O[G];if(T[H]=Y,O[G]=H,k<=_){var q=d-_;if((M>7e3||U>24576)&&q>423){g=B(e,m,0,P,x,C,L,U,D,_-D,g),U=M=L=0,D=_;for(var z=0;z<286;++z)x[z]=0;for(z=0;z<30;++z)C[z]=0}var K=2,W=0,Q=E,J=H-Y&32767;if(q>2&&G==I(_-J))for(var $=Math.min(b,q)-1,X=Math.min(32767,_),Z=Math.min(258,q);J<=X&&--Q&&H!=Y;){if(e[_+K]==e[_+K-J]){for(var ee=0;ee<Z&&e[_+ee]==e[_+ee-J];++ee);if(ee>K){if(K=ee,W=J,ee>$)break;var te=Math.min(J,ee-2),ne=0;for(z=0;z<te;++z){var re=_-J+z+32768&32767,oe=re-T[re]+32768&32767;oe>ne&&(ne=oe,Y=re)}}}J+=(H=Y)-(Y=T[H])+32768&32767}if(W){P[U++]=268435456|l[K]<<18|f[W];var ie=31&l[K],ae=31&f[W];L+=o[ie]+i[ae],++x[257+ie],++C[ae],k=_+K,++M}else P[U++]=e[_],++x[e[_]]}}g=B(e,m,p,P,x,C,L,U,D,_-D,g),!p&&7&g&&(g=j(m,g+1,F))}return N(h,0,c+R(g)+u)},H=function(){for(var e=new Int32Array(256),t=0;t<256;++t){for(var n=t,r=9;--r;)n=(1&n&&-306674912)^n>>>1;e[t]=n}return e}(),Y=function(){var e=-1;return{p:function(t){for(var n=e,r=0;r<t.length;++r)n=H[255&n^t[r]]^n>>>8;e=n},d:function(){return~e}}},q=function(){var e=1,t=0;return{p:function(n){for(var r=e,o=t,i=0|n.length,a=0;a!=i;){for(var s=Math.min(a+2655,i);a<s;++a)o+=r+=n[a];r=(65535&r)+15*(r>>16),o=(65535&o)+15*(o>>16)}e=r,t=o},d:function(){return(255&(e%=65521))<<24|e>>>8<<16|(255&(t%=65521))<<8|t>>>8}}},z=function(e,t,n,r,o){return G(e,null==t.level?6:t.level,null==t.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(e.length)))):12+t.mem,n,r,!o)},K=function(e,t){var n={};for(var r in e)n[r]=e[r];for(var r in t)n[r]=t[r];return n},W=function(e,t,n){for(var r=e(),o=e.toString(),i=o.slice(o.indexOf("[")+1,o.lastIndexOf("]")).replace(/\s+/g,"").split(","),a=0;a<r.length;++a){var s=r[a],c=i[a];if("function"==typeof s){t+=";"+c+"=";var u=s.toString();if(s.prototype)if(-1!=u.indexOf("[native code]")){var l=u.indexOf(" ",8)+1;t+=u.slice(l,u.indexOf("(",l))}else for(var p in t+=u,s.prototype)t+=";"+c+".prototype."+p+"="+s.prototype[p].toString();else t+=u}else n[c]=s}return[t,n]},Q=[],J=function(t,n,r,o){var i;if(!Q[r]){for(var a="",s={},c=t.length-1,u=0;u<c;++u)a=(i=W(t[u],a,s))[0],s=i[1];Q[r]=W(t[c],a,s)}var l=K({},Q[r][1]);return e.default(Q[r][0]+";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage="+n.toString()+"}",r,l,function(e){var t=[];for(var n in e)e[n].buffer&&t.push((e[n]=new e[n].constructor(e[n])).buffer);return t}(l),o)},$=function(){return[t,n,r,o,i,a,u,d,E,T,h,I,_,O,A,w,R,N,P,x,we,re,oe]},X=function(){return[t,n,r,o,i,a,l,f,b,y,S,v,h,V,F,_,C,M,L,U,k,D,j,B,R,N,G,z,Se,re]},Z=function(){return[de,me,pe,Y,H]},ee=function(){return[fe,he]},te=function(){return[ge,pe,q]},ne=function(){return[_e]},re=function(e){return postMessage(e,[e.buffer])},oe=function(e){return e&&e.size&&new t(e.size)},ie=function(e,t,n,r,o,i){var a=J(n,r,o,(function(e,t){a.terminate(),i(e,t)}));return a.postMessage([e,t],t.consume?[e.buffer]:[]),function(){a.terminate()}},ae=function(e){return e.ondata=function(e,t){return postMessage([e,t],[e.buffer])},function(t){return e.push(t.data[0],t.data[1])}},se=function(e,t,n,r,o){var i,a=J(e,r,o,(function(e,n){e?(a.terminate(),t.ondata.call(t,e)):(n[1]&&a.terminate(),t.ondata.call(t,e,n[0],n[1]))}));a.postMessage(n),t.push=function(e,n){t.ondata||P(5),i&&t.ondata(P(4,0,1),null,!!n),a.postMessage([e,i=n],[e.buffer])},t.terminate=function(){a.terminate()}},ce=function(e,t){return e[t]|e[t+1]<<8},ue=function(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0},le=function(e,t){return ue(e,t)+4294967296*ue(e,t+4)},pe=function(e,t,n){for(;n;++t)e[t]=n,n>>>=8},de=function(e,t){var n=t.filename;if(e[0]=31,e[1]=139,e[2]=8,e[8]=t.level<2?4:9==t.level?2:0,e[9]=3,0!=t.mtime&&pe(e,4,Math.floor(new Date(t.mtime||Date.now())/1e3)),n){e[3]=8;for(var r=0;r<=n.length;++r)e[r+10]=n.charCodeAt(r)}},fe=function(e){31==e[0]&&139==e[1]&&8==e[2]||P(6,"invalid gzip data");var t=e[3],n=10;4&t&&(n+=e[10]|2+(e[11]<<8));for(var r=(t>>3&1)+(t>>4&1);r>0;r-=!e[n++]);return n+(2&t)},he=function(e){var t=e.length;return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0},me=function(e){return 10+(e.filename&&e.filename.length+1||0)},ge=function(e,t){var n=t.level,r=0==n?0:n<6?1:9==n?3:2;e[0]=120,e[1]=r<<6|(r?32-2*r:1)},_e=function(e){(8!=(15&e[0])||e[0]>>>4>7||(e[0]<<8|e[1])%31)&&P(6,"invalid zlib data"),32&e[1]&&P(6,"invalid zlib data: preset dictionaries not supported")};function ye(e,t){return t||"function"!=typeof e||(t=e,e={}),this.ondata=t,e}var ve=function(){function e(e,t){t||"function"!=typeof e||(t=e,e={}),this.ondata=t,this.o=e||{}}return e.prototype.p=function(e,t){this.ondata(z(e,this.o,0,0,!t),t)},e.prototype.push=function(e,t){this.ondata||P(5),this.d&&P(4),this.d=t,this.p(e,t||!1)},e}();dB.Deflate=ve;var be=function(){return function(e,t){se([X,function(){return[ae,ve]}],this,ye.call(this,e,t),(function(e){var t=new ve(e.data);onmessage=ae(t)}),6)}}();function Ee(e,t,n){return n||(n=t,t={}),"function"!=typeof n&&P(7),ie(e,t,[X],(function(e){return re(Se(e.data[0],e.data[1]))}),0,n)}function Se(e,t){return z(e,t||{},0,0)}dB.AsyncDeflate=be,dB.deflate=Ee,dB.deflateSync=Se;var Te=function(){function e(e){this.s={},this.p=new t(0),this.ondata=e}return e.prototype.e=function(e){this.ondata||P(5),this.d&&P(4);var n=this.p.length,r=new t(n+e.length);r.set(this.p),r.set(e,n),this.p=r},e.prototype.c=function(e){this.d=this.s.i=e||!1;var t=this.s.b,n=x(this.p,this.o,this.s);this.ondata(N(n,t,this.s.b),this.d),this.o=N(n,this.s.b-32768),this.s.b=this.o.length,this.p=N(this.p,this.s.p/8|0),this.s.p&=7},e.prototype.push=function(e,t){this.e(e),this.c(t)},e}();dB.Inflate=Te;var Oe=function(){return function(e){this.ondata=e,se([$,function(){return[ae,Te]}],this,0,(function(){var e=new Te;onmessage=ae(e)}),7)}}();function Ae(e,t,n){return n||(n=t,t={}),"function"!=typeof n&&P(7),ie(e,t,[$],(function(e){return re(we(e.data[0],oe(e.data[1])))}),1,n)}function we(e,t){return x(e,t)}dB.AsyncInflate=Oe,dB.inflate=Ae,dB.inflateSync=we;var Re=function(){function e(e,t){this.c=Y(),this.l=0,this.v=1,ve.call(this,e,t)}return e.prototype.push=function(e,t){ve.prototype.push.call(this,e,t)},e.prototype.p=function(e,t){this.c.p(e),this.l+=e.length;var n=z(e,this.o,this.v&&me(this.o),t&&8,!t);this.v&&(de(n,this.o),this.v=0),t&&(pe(n,n.length-8,this.c.d()),pe(n,n.length-4,this.l)),this.ondata(n,t)},e}();dB.Gzip=Re,dB.Compress=Re;var Ne=function(){return function(e,t){se([X,Z,function(){return[ae,ve,Re]}],this,ye.call(this,e,t),(function(e){var t=new Re(e.data);onmessage=ae(t)}),8)}}();function Ie(e,t,n){return n||(n=t,t={}),"function"!=typeof n&&P(7),ie(e,t,[X,Z,function(){return[Pe]}],(function(e){return re(Pe(e.data[0],e.data[1]))}),2,n)}function Pe(e,t){t||(t={});var n=Y(),r=e.length;n.p(e);var o=z(e,t,me(t),8),i=o.length;return de(o,t),pe(o,i-8,n.d()),pe(o,i-4,r),o}dB.AsyncGzip=Ne,dB.AsyncCompress=Ne,dB.gzip=Ie,dB.compress=Ie,dB.gzipSync=Pe,dB.compressSync=Pe;var xe=function(){function e(e){this.v=1,Te.call(this,e)}return e.prototype.push=function(e,t){if(Te.prototype.e.call(this,e),this.v){var n=this.p.length>3?fe(this.p):4;if(n>=this.p.length&&!t)return;this.p=this.p.subarray(n),this.v=0}t&&(this.p.length<8&&P(6,"invalid gzip data"),this.p=this.p.subarray(0,-8)),Te.prototype.c.call(this,t)},e}();dB.Gunzip=xe;var Ce=function(){return function(e){this.ondata=e,se([$,ee,function(){return[ae,Te,xe]}],this,0,(function(){var e=new xe;onmessage=ae(e)}),9)}}();function Me(e,t,n){return n||(n=t,t={}),"function"!=typeof n&&P(7),ie(e,t,[$,ee,function(){return[Le]}],(function(e){return re(Le(e.data[0]))}),3,n)}function Le(e,n){return x(e.subarray(fe(e),-8),n||new t(he(e)))}dB.AsyncGunzip=Ce,dB.gunzip=Me,dB.gunzipSync=Le;var Ue=function(){function e(e,t){this.c=q(),this.v=1,ve.call(this,e,t)}return e.prototype.push=function(e,t){ve.prototype.push.call(this,e,t)},e.prototype.p=function(e,t){this.c.p(e);var n=z(e,this.o,this.v&&2,t&&4,!t);this.v&&(ge(n,this.o),this.v=0),t&&pe(n,n.length-4,this.c.d()),this.ondata(n,t)},e}();dB.Zlib=Ue;var ke=function(){return function(e,t){se([X,te,function(){return[ae,ve,Ue]}],this,ye.call(this,e,t),(function(e){var t=new Ue(e.data);onmessage=ae(t)}),10)}}();function De(e,t){t||(t={});var n=q();n.p(e);var r=z(e,t,2,4);return ge(r,t),pe(r,r.length-4,n.d()),r}dB.AsyncZlib=ke,dB.zlib=function(e,t,n){return n||(n=t,t={}),"function"!=typeof n&&P(7),ie(e,t,[X,te,function(){return[De]}],(function(e){return re(De(e.data[0],e.data[1]))}),4,n)},dB.zlibSync=De;var je=function(){function e(e){this.v=1,Te.call(this,e)}return e.prototype.push=function(e,t){if(Te.prototype.e.call(this,e),this.v){if(this.p.length<2&&!t)return;this.p=this.p.subarray(2),this.v=0}t&&(this.p.length<4&&P(6,"invalid zlib data"),this.p=this.p.subarray(0,-4)),Te.prototype.c.call(this,t)},e}();dB.Unzlib=je;var Be=function(){return function(e){this.ondata=e,se([$,ne,function(){return[ae,Te,je]}],this,0,(function(){var e=new je;onmessage=ae(e)}),11)}}();function Ve(e,t,n){return n||(n=t,t={}),"function"!=typeof n&&P(7),ie(e,t,[$,ne,function(){return[Fe]}],(function(e){return re(Fe(e.data[0],oe(e.data[1])))}),5,n)}function Fe(e,t){return x((_e(e),e.subarray(2,-4)),t)}dB.AsyncUnzlib=Be,dB.unzlib=Ve,dB.unzlibSync=Fe;var Ge=function(){function e(e){this.G=xe,this.I=Te,this.Z=je,this.ondata=e}return e.prototype.push=function(e,n){if(this.ondata||P(5),this.s)this.s.push(e,n);else{if(this.p&&this.p.length){var r=new t(this.p.length+e.length);r.set(this.p),r.set(e,this.p.length)}else this.p=e;if(this.p.length>2){var o=this,i=function(){o.ondata.apply(o,arguments)};this.s=31==this.p[0]&&139==this.p[1]&&8==this.p[2]?new this.G(i):8!=(15&this.p[0])||this.p[0]>>4>7||(this.p[0]<<8|this.p[1])%31?new this.I(i):new this.Z(i),this.s.push(this.p,n),this.p=null}}},e}();dB.Decompress=Ge;var He=function(){function e(e){this.G=Ce,this.I=Oe,this.Z=Be,this.ondata=e}return e.prototype.push=function(e,t){Ge.prototype.push.call(this,e,t)},e}();dB.AsyncDecompress=He,dB.decompress=function(e,t,n){return n||(n=t,t={}),"function"!=typeof n&&P(7),31==e[0]&&139==e[1]&&8==e[2]?Me(e,t,n):8!=(15&e[0])||e[0]>>4>7||(e[0]<<8|e[1])%31?Ae(e,t,n):Ve(e,t,n)},dB.decompressSync=function(e,t){return 31==e[0]&&139==e[1]&&8==e[2]?Le(e,t):8!=(15&e[0])||e[0]>>4>7||(e[0]<<8|e[1])%31?we(e,t):Fe(e,t)};var Ye=function(e,n,r,o){for(var i in e){var a=e[i],s=n+i,c=o;Array.isArray(a)&&(c=K(o,a[1]),a=a[0]),a instanceof t?r[s]=[a,c]:(r[s+="/"]=[new t(0),c],Ye(a,s,r,o))}},qe="undefined"!=typeof TextEncoder&&new TextEncoder,ze="undefined"!=typeof TextDecoder&&new TextDecoder,Ke=0;try{ze.decode(F,{stream:!0}),Ke=1}catch(e){}var We=function(e){for(var t="",n=0;;){var r=e[n++],o=(r>127)+(r>223)+(r>239);if(n+o>e.length)return[t,N(e,n-1)];o?3==o?(r=((15&r)<<18|(63&e[n++])<<12|(63&e[n++])<<6|63&e[n++])-65536,t+=String.fromCharCode(55296|r>>10,56320|1023&r)):t+=1&o?String.fromCharCode((31&r)<<6|63&e[n++]):String.fromCharCode((15&r)<<12|(63&e[n++])<<6|63&e[n++]):t+=String.fromCharCode(r)}},Qe=function(){function e(e){this.ondata=e,Ke?this.t=new TextDecoder:this.p=F}return e.prototype.push=function(e,n){if(this.ondata||P(5),n=!!n,this.t)return this.ondata(this.t.decode(e,{stream:!0}),n),void(n&&(this.t.decode().length&&P(8),this.t=null));this.p||P(4);var r=new t(this.p.length+e.length);r.set(this.p),r.set(e,this.p.length);var o=We(r),i=o[0],a=o[1];n?(a.length&&P(8),this.p=null):this.p=a,this.ondata(i,n)},e}();dB.DecodeUTF8=Qe;var Je=function(){function e(e){this.ondata=e}return e.prototype.push=function(e,t){this.ondata||P(5),this.d&&P(4),this.ondata($e(e),this.d=t||!1)},e}();function $e(e,n){if(n){for(var r=new t(e.length),o=0;o<e.length;++o)r[o]=e.charCodeAt(o);return r}if(qe)return qe.encode(e);var i=e.length,a=new t(e.length+(e.length>>1)),s=0,c=function(e){a[s++]=e};for(o=0;o<i;++o){if(s+5>a.length){var u=new t(s+8+(i-o<<1));u.set(a),a=u}var l=e.charCodeAt(o);l<128||n?c(l):l<2048?(c(192|l>>6),c(128|63&l)):l>55295&&l<57344?(c(240|(l=65536+(1047552&l)|1023&e.charCodeAt(++o))>>18),c(128|l>>12&63),c(128|l>>6&63),c(128|63&l)):(c(224|l>>12),c(128|l>>6&63),c(128|63&l))}return N(a,0,s)}function Xe(e,t){if(t){for(var n="",r=0;r<e.length;r+=16384)n+=String.fromCharCode.apply(null,e.subarray(r,r+16384));return n}if(ze)return ze.decode(e);var o=We(e),i=o[0];return o[1].length&&P(8),i}dB.EncodeUTF8=Je,dB.strToU8=$e,dB.strFromU8=Xe;var Ze=function(e){return 1==e?3:e<6?2:9==e?1:0},et=function(e,t){return t+30+ce(e,t+26)+ce(e,t+28)},tt=function(e,t,n){var r=ce(e,t+28),o=Xe(e.subarray(t+46,t+46+r),!(2048&ce(e,t+8))),i=t+46+r,a=ue(e,t+20),s=n&&4294967295==a?nt(e,i):[a,ue(e,t+24),ue(e,t+42)],c=s[0],u=s[1],l=s[2];return[ce(e,t+10),c,u,o,i+ce(e,t+30)+ce(e,t+32),l]},nt=function(e,t){for(;1!=ce(e,t);t+=4+ce(e,t+2));return[le(e,t+12),le(e,t+4),le(e,t+20)]},rt=function(e){var t=0;if(e)for(var n in e){var r=e[n].length;r>65535&&P(9),t+=r+4}return t},ot=function(e,t,n,r,o,i,a,s){var c=r.length,u=n.extra,l=s&&s.length,p=rt(u);pe(e,t,null!=a?33639248:67324752),t+=4,null!=a&&(e[t++]=20,e[t++]=n.os),e[t]=20,t+=2,e[t++]=n.flag<<1|(i<0&&8),e[t++]=o&&8,e[t++]=255&n.compression,e[t++]=n.compression>>8;var d=new Date(null==n.mtime?Date.now():n.mtime),f=d.getFullYear()-1980;if((f<0||f>119)&&P(10),pe(e,t,f<<25|d.getMonth()+1<<21|d.getDate()<<16|d.getHours()<<11|d.getMinutes()<<5|d.getSeconds()>>>1),t+=4,-1!=i&&(pe(e,t,n.crc),pe(e,t+4,i<0?-i-2:i),pe(e,t+8,n.size)),pe(e,t+12,c),pe(e,t+14,p),t+=16,null!=a&&(pe(e,t,l),pe(e,t+6,n.attrs),pe(e,t+10,a),t+=14),e.set(r,t),t+=c,p)for(var h in u){var m=u[h],g=m.length;pe(e,t,+h),pe(e,t+2,g),e.set(m,t+4),t+=4+g}return l&&(e.set(s,t),t+=l),t},it=function(e,t,n,r,o){pe(e,t,101010256),pe(e,t+8,n),pe(e,t+10,n),pe(e,t+12,r),pe(e,t+16,o)},at=function(){function e(e){this.filename=e,this.c=Y(),this.size=0,this.compression=0}return e.prototype.process=function(e,t){this.ondata(null,e,t)},e.prototype.push=function(e,t){this.ondata||P(5),this.c.p(e),this.size+=e.length,t&&(this.crc=this.c.d()),this.process(e,t||!1)},e}();dB.ZipPassThrough=at;var st=function(){function e(e,t){var n=this;t||(t={}),at.call(this,e),this.d=new ve(t,(function(e,t){n.ondata(null,e,t)})),this.compression=8,this.flag=Ze(t.level)}return e.prototype.process=function(e,t){try{this.d.push(e,t)}catch(e){this.ondata(e,null,t)}},e.prototype.push=function(e,t){at.prototype.push.call(this,e,t)},e}();dB.ZipDeflate=st;var ct=function(){function e(e,t){var n=this;t||(t={}),at.call(this,e),this.d=new be(t,(function(e,t,r){n.ondata(e,t,r)})),this.compression=8,this.flag=Ze(t.level),this.terminate=this.d.terminate}return e.prototype.process=function(e,t){this.d.push(e,t)},e.prototype.push=function(e,t){at.prototype.push.call(this,e,t)},e}();dB.AsyncZipDeflate=ct;var ut=function(){function e(e){this.ondata=e,this.u=[],this.d=1}return e.prototype.add=function(e){var n=this;if(this.ondata||P(5),2&this.d)this.ondata(P(4+8*(1&this.d),0,1),null,!1);else{var r=$e(e.filename),o=r.length,i=e.comment,a=i&&$e(i),s=o!=e.filename.length||a&&i.length!=a.length,c=o+rt(e.extra)+30;o>65535&&this.ondata(P(11,0,1),null,!1);var u=new t(c);ot(u,0,e,r,s,-1);var l=[u],p=function(){for(var e=0,t=l;e<t.length;e++){var r=t[e];n.ondata(null,r,!1)}l=[]},d=this.d;this.d=0;var f=this.u.length,h=K(e,{f:r,u:s,o:a,t:function(){e.terminate&&e.terminate()},r:function(){if(p(),d){var e=n.u[f+1];e?e.r():n.d=1}d=1}}),m=0;e.ondata=function(r,o,i){if(r)n.ondata(r,o,i),n.terminate();else if(m+=o.length,l.push(o),i){var a=new t(16);pe(a,0,134695760),pe(a,4,e.crc),pe(a,8,m),pe(a,12,e.size),l.push(a),h.c=m,h.b=c+m+16,h.crc=e.crc,h.size=e.size,d&&h.r(),d=1}else d&&p()},this.u.push(h)}},e.prototype.end=function(){var e=this;2&this.d?this.ondata(P(4+8*(1&this.d),0,1),null,!0):(this.d?this.e():this.u.push({r:function(){1&e.d&&(e.u.splice(-1,1),e.e())},t:function(){}}),this.d=3)},e.prototype.e=function(){for(var e=0,n=0,r=0,o=0,i=this.u;o<i.length;o++){r+=46+(u=i[o]).f.length+rt(u.extra)+(u.o?u.o.length:0)}for(var a=new t(r+22),s=0,c=this.u;s<c.length;s++){var u=c[s];ot(a,e,u,u.f,u.u,-u.c-2,n,u.o),e+=46+u.f.length+rt(u.extra)+(u.o?u.o.length:0),n+=u.b}it(a,e,this.u.length,r,n),this.ondata(null,a,!0),this.d=2},e.prototype.terminate=function(){for(var e=0,t=this.u;e<t.length;e++){t[e].t()}this.d=2},e}();dB.Zip=ut,dB.zip=function(e,n,r){r||(r=n,n={}),"function"!=typeof r&&P(7);var o={};Ye(e,"",o,n);var i=Object.keys(o),a=i.length,s=0,c=0,u=a,l=new Array(a),p=[],d=function(){for(var e=0;e<p.length;++e)p[e]()},f=function(e,t){ht((function(){r(e,t)}))};ht((function(){f=r}));var h=function(){var e=new t(c+22),n=s,r=c-s;c=0;for(var o=0;o<u;++o){var i=l[o];try{var a=i.c.length;ot(e,c,i,i.f,i.u,a);var p=30+i.f.length+rt(i.extra),d=c+p;e.set(i.c,d),ot(e,s,i,i.f,i.u,a,c,i.m),s+=16+p+(i.m?i.m.length:0),c=d+a}catch(e){return f(e,null)}}it(e,s,l.length,r,n),f(null,e)};a||h();for(var m=function(e){var t=i[e],n=o[t],r=n[0],u=n[1],m=Y(),g=r.length;m.p(r);var _=$e(t),y=_.length,v=u.comment,b=v&&$e(v),E=b&&b.length,S=rt(u.extra),T=0==u.level?0:8,O=function(n,r){if(n)d(),f(n,null);else{var o=r.length;l[e]=K(u,{size:g,crc:m.d(),c:r,f:_,m:b,u:y!=t.length||b&&v.length!=E,compression:T}),s+=30+y+S+o,c+=76+2*(y+S)+(E||0)+o,--a||h()}};if(y>65535&&O(P(11,0,1),null),T)if(g<16e4)try{O(null,Se(r,u))}catch(e){O(e,null)}else p.push(Ee(r,u,O));else O(null,r)},g=0;g<u;++g)m(g);return d},dB.zipSync=function(e,n){n||(n={});var r={},o=[];Ye(e,"",r,n);var i=0,a=0;for(var s in r){var c=r[s],u=c[0],l=c[1],p=0==l.level?0:8,d=(O=$e(s)).length,f=l.comment,h=f&&$e(f),m=h&&h.length,g=rt(l.extra);d>65535&&P(11);var _=p?Se(u,l):u,y=_.length,v=Y();v.p(u),o.push(K(l,{size:u.length,crc:v.d(),c:_,f:O,m:h,u:d!=s.length||h&&f.length!=m,o:i,compression:p})),i+=30+d+g+y,a+=76+2*(d+g)+(m||0)+y}for(var b=new t(a+22),E=i,S=a-i,T=0;T<o.length;++T){var O=o[T];ot(b,O.o,O,O.f,O.u,O.c.length);var A=30+O.f.length+rt(O.extra);b.set(O.c,O.o+A),ot(b,i,O,O.f,O.u,O.c.length,O.o,O.m),i+=16+A+(O.m?O.m.length:0)}return it(b,i,o.length,S,E),b};var lt=function(){function e(){}return e.prototype.push=function(e,t){this.ondata(null,e,t)},e.compression=0,e}();dB.UnzipPassThrough=lt;var pt=function(){function e(){var e=this;this.i=new Te((function(t,n){e.ondata(null,t,n)}))}return e.prototype.push=function(e,t){try{this.i.push(e,t)}catch(e){this.ondata(e,null,t)}},e.compression=8,e}();dB.UnzipInflate=pt;var dt=function(){function e(e,t){var n=this;t<32e4?this.i=new Te((function(e,t){n.ondata(null,e,t)})):(this.i=new Oe((function(e,t,r){n.ondata(e,t,r)})),this.terminate=this.i.terminate)}return e.prototype.push=function(e,t){this.i.terminate&&(e=N(e,0)),this.i.push(e,t)},e.compression=8,e}();dB.AsyncUnzipInflate=dt;var ft=function(){function e(e){this.onfile=e,this.k=[],this.o={0:lt},this.p=F}return e.prototype.push=function(e,n){var r=this;if(this.onfile||P(5),this.p||P(4),this.c>0){var o=Math.min(this.c,e.length),i=e.subarray(0,o);if(this.c-=o,this.d?this.d.push(i,!this.c):this.k[0].push(i),(e=e.subarray(o)).length)return this.push(e,n)}else{var a=0,s=0,c=void 0,u=void 0;this.p.length?e.length?((u=new t(this.p.length+e.length)).set(this.p),u.set(e,this.p.length)):u=this.p:u=e;for(var l=u.length,p=this.c,d=p&&this.d,f=function(){var e,t=ue(u,s);if(67324752==t){a=1,c=s,h.d=null,h.c=0;var n=ce(u,s+6),o=ce(u,s+8),i=2048&n,d=8&n,f=ce(u,s+26),m=ce(u,s+28);if(l>s+30+f+m){var g=[];h.k.unshift(g),a=2;var _,y=ue(u,s+18),v=ue(u,s+22),b=Xe(u.subarray(s+30,s+=30+f),!i);4294967295==y?(e=d?[-2]:nt(u,s),y=e[0],v=e[1]):d&&(y=-1),s+=m,h.c=y;var E={name:b,compression:o,start:function(){if(E.ondata||P(5),y){var e=r.o[o];e||E.ondata(P(14,"unknown compression type "+o,1),null,!1),(_=y<0?new e(b):new e(b,y,v)).ondata=function(e,t,n){E.ondata(e,t,n)};for(var t=0,n=g;t<n.length;t++){var i=n[t];_.push(i,!1)}r.k[0]==g&&r.c?r.d=_:_.push(F,!0)}else E.ondata(null,F,!0)},terminate:function(){_&&_.terminate&&_.terminate()}};y>=0&&(E.size=y,E.originalSize=v),h.onfile(E)}return"break"}if(p){if(134695760==t)return c=s+=12+(-2==p&&8),a=3,h.c=0,"break";if(33639248==t)return c=s-=4,a=3,h.c=0,"break"}},h=this;s<l-4;++s){if("break"===f())break}if(this.p=F,p<0){var m=a?u.subarray(0,c-12-(-2==p&&8)-(134695760==ue(u,c-16)&&4)):u.subarray(0,s);d?d.push(m,!!a):this.k[+(2==a)].push(m)}if(2&a)return this.push(u.subarray(s),n);this.p=u.subarray(s)}n&&(this.c&&P(13),this.p=null)},e.prototype.register=function(e){this.o[e.compression]=e},e}();dB.Unzip=ft;var ht="function"==typeof queueMicrotask?queueMicrotask:"function"==typeof setTimeout?setTimeout:function(e){e()};return dB.unzip=function(e,n,r){r||(r=n,n={}),"function"!=typeof r&&P(7);var o=[],i=function(){for(var e=0;e<o.length;++e)o[e]()},a={},s=function(e,t){ht((function(){r(e,t)}))};ht((function(){s=r}));for(var c=e.length-22;101010256!=ue(e,c);--c)if(!c||e.length-c>65558)return s(P(13,0,1),null),i;var u=ce(e,c+8);if(u){var l=u,p=ue(e,c+16),d=4294967295==p||65535==l;if(d){var f=ue(e,c-12);(d=101075792==ue(e,f))&&(l=u=ue(e,f+32),p=ue(e,f+48))}for(var h=n&&n.filter,m=function(n){var r=tt(e,p,d),c=r[0],l=r[1],f=r[2],m=r[3],g=r[4],_=r[5],y=et(e,_);p=g;var v=function(e,t){e?(i(),s(e,null)):(t&&(a[m]=t),--u||s(null,a))};if(!h||h({name:m,size:l,originalSize:f,compression:c}))if(c)if(8==c){var b=e.subarray(y,y+l);if(l<32e4)try{v(null,we(b,new t(f)))}catch(e){v(e,null)}else o.push(Ae(b,{size:f},v))}else v(P(14,"unknown compression type "+c,1),null);else v(null,N(e,y,y+l));else v(null,null)},g=0;g<l;++g)m()}else s(null,{});return i},dB.unzipSync=function(e,n){for(var r={},o=e.length-22;101010256!=ue(e,o);--o)(!o||e.length-o>65558)&&P(13);var i=ce(e,o+8);if(!i)return{};var a=ue(e,o+16),s=4294967295==a||65535==i;if(s){var c=ue(e,o-12);(s=101075792==ue(e,c))&&(i=ue(e,c+32),a=ue(e,c+48))}for(var u=n&&n.filter,l=0;l<i;++l){var p=tt(e,a,s),d=p[0],f=p[1],h=p[2],m=p[3],g=p[4],_=p[5],y=et(e,_);a=g,u&&!u({name:m,size:f,originalSize:h,compression:d})||(d?8==d?r[m]=we(e.subarray(y,y+f),new t(h)):P(14,"unknown compression type "+d):r[m]=N(e,y,y+f))}return r},dB}var gB,_B={},yB=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),vB=function(e){function t(t){return void 0===t&&(t={}),e.call(this,Wj(t,Pj,"v1/logs",{"Content-Type":"application/json"}))||this}return yB(t,e),t}(nD),bB=n(Object.freeze({__proto__:null,OTLPLogExporter:vB}));var EB,SB={};var TB,OB,AB={},wB=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),RB=function(e){function t(t){return void 0===t&&(t={}),e.call(this,Wj(t,fj,"v1/logs",{"Content-Type":"application/x-protobuf"}))||this}return wB(t,e),t}(nD),NB=n(Object.freeze({__proto__:null,OTLPLogExporter:RB}));var IB,PB=(OB||(OB=1,function(e){Object.defineProperty(e,"__esModule",{value:!0});const t=F;t.__exportStar(function(){if(Jj)return tD;Jj=1,Object.defineProperty(tD,"__esModule",{value:!0}),tD.IMQATraceExporter=void 0;const e=Zj,t=ny,n=eB,r=nB();class o extends e.OTLPTraceExporter{constructor(e){super({url:(null==e?void 0:e.url)||"https://collector.imqa.io/v1/traces",headers:{"Content-Type":"application/json",...null==e?void 0:e.headers}}),this.url=(null==e?void 0:e.url)||"https://collector.imqa.io/v1/traces",this.sendBeaconOptions={headers:null==e?void 0:e.headers,timeout:null==e?void 0:e.timeout,withCredentials:null==e?void 0:e.withCredentials,debug:null==e?void 0:e.debug,onExportSuccess:null==e?void 0:e.onExportSuccess,onExportFailure:null==e?void 0:e.onExportFailure,dropPolicyEnabled:null==e?void 0:e.dropPolicyEnabled}}export(e,o){try{const t=n.JsonTraceSerializer.serializeRequest(e),i=new Blob([t.buffer],{type:"application/json"});(0,r.sendBeacon)(this.url,i,o,this.sendBeaconOptions)}catch{o({code:t.ExportResultCode.FAILED})}}shutdown(){return super.shutdown()}}return tD.IMQATraceExporter=o,tD}(),e),t.__exportStar(function(){if(rB)return oB;rB=1,Object.defineProperty(oB,"__esModule",{value:!0}),oB.IMQATracePlainTextBeaconExporter=void 0;const e=ny,t=nB(),n=eB;return oB.IMQATracePlainTextBeaconExporter=class{constructor({url:e}){this.url=e}export(r,o){try{const e=n.JsonTraceSerializer.serializeRequest(r),i=(new TextDecoder).decode(e),a=new Blob([i],{type:"text/plain"});(0,t.sendBeacon)(this.url,a,o)}catch{o({code:e.ExportResultCode.FAILED})}}shutdown(){return Promise.resolve()}},oB}(),e),t.__exportStar(function(){if(sB)return cB;sB=1,Object.defineProperty(cB,"__esModule",{value:!0}),cB.IMQATraceExporterProto=void 0;const e=pB,t=eB,n=mB(),r=ny,o={"Content-Type":"application/x-protobuf","Content-Encoding":"gzip"};class i extends e.OTLPTraceExporter{constructor(e={}){super({url:(null==e?void 0:e.url)||"https://collector.imqa.io/v1/traces",headers:o}),this.url=(null==e?void 0:e.url)||"https://collector.imqa.io/v1/traces",this.config=e}export(e,i){try{const a=t.ProtobufTraceSerializer.serializeRequest(e),s=(0,n.gzipSync)(a),c=this.config.headers?Object.assign({},o,this.config.headers):o;fetch(this.url,{method:"POST",body:s,headers:c}).then((e=>{i({code:e.ok?r.ExportResultCode.SUCCESS:r.ExportResultCode.FAILED})})).catch((()=>{i({code:r.ExportResultCode.FAILED})}))}catch{i({code:r.ExportResultCode.FAILED})}}}return cB.IMQATraceExporterProto=i,cB}(),e),t.__exportStar(function(){if(gB)return _B;gB=1,Object.defineProperty(_B,"__esModule",{value:!0}),_B.IMQALogExporter=void 0;const e=bB,t=nB(),n=ny,r=eB;class o extends e.OTLPLogExporter{constructor(e){super({url:(null==e?void 0:e.url)||"https://collector.imqa.io/v1/logs",headers:{"Content-Type":"application/json",...null==e?void 0:e.headers}}),this.url=(null==e?void 0:e.url)||"https://collector.imqa.io/v1/logs",this.sendBeaconOptions={headers:null==e?void 0:e.headers,timeout:null==e?void 0:e.timeout,withCredentials:null==e?void 0:e.withCredentials,debug:null==e?void 0:e.debug,onExportSuccess:null==e?void 0:e.onExportSuccess,onExportFailure:null==e?void 0:e.onExportFailure,dropPolicyEnabled:null==e?void 0:e.dropPolicyEnabled}}export(e,o){try{const n=r.JsonLogsSerializer.serializeRequest(e),i=(new TextDecoder).decode(n.buffer).replace(/"droppedAttributesCount":\s*-\d+/g,'"droppedAttributesCount":0'),a=new Blob([i],{type:"application/json"});(0,t.sendBeacon)(this.url,a,o,this.sendBeaconOptions)}catch{o({code:n.ExportResultCode.FAILED})}}shutdown(){return super.shutdown()}}return _B.IMQALogExporter=o,_B}(),e),t.__exportStar(function(){if(EB)return SB;EB=1,Object.defineProperty(SB,"__esModule",{value:!0}),SB.IMQALogPlainTextExporter=void 0;const e=bB,t=nB(),n=ny,r=eB;class o extends e.OTLPLogExporter{constructor(e){super({url:(null==e?void 0:e.url)||"https://collector.imqa.io/v1/logs",headers:{"Content-Type":"application/json"}}),this.url=(null==e?void 0:e.url)||"https://collector.imqa.io/v1/logs"}export(e,o){try{const i=r.JsonLogsSerializer.serializeRequest(e),a=(new TextDecoder).decode(i),s=new Blob([a],{type:"text/plain"});(0,t.sendBeacon)(this.url,s,o),o({code:n.ExportResultCode.SUCCESS})}catch{o({code:n.ExportResultCode.FAILED})}}shutdown(){return super.shutdown()}}return SB.IMQALogPlainTextExporter=o,SB}(),e),t.__exportStar(function(){if(TB)return AB;TB=1,Object.defineProperty(AB,"__esModule",{value:!0}),AB.IMQALogExporterProto=void 0;const e=NB,t=eB,n=mB(),r=ny,o={"Content-Type":"application/x-protobuf","Content-Encoding":"gzip"};class i extends e.OTLPLogExporter{constructor(e={}){super({url:(null==e?void 0:e.url)||"https://collector.imqa.io/v1/logs",headers:o}),this.url=(null==e?void 0:e.url)||"https://collector.imqa.io/v1/logs",this.config=e}export(e,i){try{const a=t.ProtobufLogsSerializer.serializeRequest(e),s=(0,n.gzipSync)(a),c=this.config.headers?Object.assign({},o,this.config.headers):o;fetch(this.url,{method:"POST",body:s,headers:c}).then((e=>{i({code:e.ok?r.ExportResultCode.SUCCESS:r.ExportResultCode.FAILED})})).catch((()=>{i({code:r.ExportResultCode.FAILED})}))}catch{i({code:r.ExportResultCode.FAILED})}}}return AB.IMQALogExporterProto=i,AB}(),e),t.__exportStar(nB(),e)}(eD)),eD);!function(e){e[e.DELTA=0]="DELTA",e[e.CUMULATIVE=1]="CUMULATIVE",e[e.LOWMEMORY=2]="LOWMEMORY"}(IB||(IB={}));var xB=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),CB=function(){return rM.CUMULATIVE},MB=function(e){switch(e){case hM.COUNTER:case hM.OBSERVABLE_COUNTER:case hM.GAUGE:case hM.HISTOGRAM:case hM.OBSERVABLE_GAUGE:return rM.DELTA;case hM.UP_DOWN_COUNTER:case hM.OBSERVABLE_UP_DOWN_COUNTER:return rM.CUMULATIVE}},LB=function(e){switch(e){case hM.COUNTER:case hM.HISTOGRAM:return rM.DELTA;case hM.GAUGE:case hM.UP_DOWN_COUNTER:case hM.OBSERVABLE_UP_DOWN_COUNTER:case hM.OBSERVABLE_COUNTER:case hM.OBSERVABLE_GAUGE:return rM.CUMULATIVE}};function UB(e){return null!=e?e===IB.DELTA?MB:e===IB.LOWMEMORY?LB:CB:function(){var e=xg(),t=e.OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE.trim().toLowerCase();return"cumulative"===t?CB:"delta"===t?MB:"lowmemory"===t?LB:(Nt.warn("OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE is set to '"+e.OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE+"', but only 'cumulative' and 'delta' are allowed. Using default ('cumulative') instead."),CB)}()}var kB,DB,jB=function(e){function t(t,n){var r=e.call(this,t)||this;return r._aggregationSelector=function(e){return(null==e?void 0:e.aggregationPreference)?e.aggregationPreference:function(e){return hL.Default()}}(n),r._aggregationTemporalitySelector=UB(null==n?void 0:n.temporalityPreference),r}return xB(t,e),t.prototype.selectAggregation=function(e){return this._aggregationSelector(e)},t.prototype.selectAggregationTemporality=function(e){return this._aggregationTemporalitySelector(e)},t}(nD),BB=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),VB=function(e){function t(t){return e.call(this,Wj(null!=t?t:{},xj,"v1/metrics",{"Content-Type":"application/json"}),t)||this}return BB(t,e),t}(jB),FB={},GB={};var HB,YB,qB=function(){if(DB)return FB;DB=1,Object.defineProperty(FB,"__esModule",{value:!0}),FB.IMQAWebSocketInstrumentation=void 0;const e=F.__importStar(pn()),t=Wt,n=ny,r=(kB||(kB=1,Object.defineProperty(GB,"__esModule",{value:!0}),GB.VERSION=void 0,GB.VERSION="0.0.6"),GB),o=On,i=dy(),a=iy();function s(e){return e.byteLength||e.size||e.length||void 0}class c extends o.InstrumentationBase{constructor(e){super("@imqa/instrumentation-websocket",r.VERSION,e),this.listener2ws2patched=new WeakMap,this._config=e,this._screenNameOption=e.screenNameOption}init(){}enable(){const r=this;e.wrap(window,"WebSocket",(function(){class e extends WebSocket{constructor(e,o,a){if((0,n.isUrlIgnored)(e,r._config.ignoreUrls))return void super(e,o);const s=r.tracer.startSpan("connect",{kind:t.SpanKind.CLIENT,attributes:{component:"websocket"}});(0,i.spanResources)(s,a),e&&s.setAttribute("http.url",e),o&&("string"==typeof o?s.setAttribute("protocols",o):s.setAttribute("protocols",JSON.stringify(o)));try{super(e,o)}catch(e){throw r.endSpanExceptionally(s,e instanceof Error?e:new Error(String(e))),e}this.addEventListener("open",(function(){s.end()})),this.addEventListener("error",(function(e){s.isRecording()?r.endSpanExceptionally(s,new Error(e.error||e.message||"Could not connect.")):r.startSpan(this,"error",t.SpanKind.CLIENT).end()})),r.patchSend(this),r.patchEventListener(this)}}return e}))}disable(){e.unwrap(window,"WebSocket")}startSpan(e,t,n){const r=this.tracer.startSpan(t,{kind:n});return(0,i.spanResources)(r,this._screenNameOption),r.setAttribute(a.ATTR_IMQA_RUM_COMPONENT,"websocket"),r.setAttribute(a.ATTR_IMQA_SPAN_TYPE,"websocket"),r.setAttribute(a.ATTR_NETWORK_PROTOCOL_NAME,e.protocol),r.setAttribute(a.ATTR_URL_FULL,e.url),r}patchSend(e){const n=this,r=e.send;e.send=function(...o){const a=n.startSpan(e,"send",t.SpanKind.PRODUCER);(0,i.spanResources)(a);const c=o.length>0?s(o[0]):void 0;let u;a.setAttribute("http.request_content_length",c);try{u=r.apply(e,o)}catch(e){throw n.endSpanExceptionally(a,e instanceof Error?e:new Error(String(e))),e}return!1===u&&n.endSpanExceptionally(a,new Error("Failed to send frame.")),a.end(),u}}addPatchedListener(e,t,n){let r=this.listener2ws2patched.get(t);return r||(r=new Map,this.listener2ws2patched.set(t,r)),!r.has(e)&&(r.set(e,n),!0)}removePatchedListener(e,t){const n=this.listener2ws2patched.get(t);if(!n)return;const r=n.get(e);return r&&(n.delete(e),0===n.size&&this.listener2ws2patched.delete(e)),r}patchEventListener(e){const n=this,r=e.addEventListener.bind(e);e.addEventListener=function(o,a,c){if("message"!==o)return void r(o,a,c);const u="boolean"==typeof c||null==c?void 0:c.once,l=function(...r){const o=this,c=r;u&&n.removePatchedListener(e,a);const l=n.startSpan(e,"onmessage",t.SpanKind.CONSUMER);(0,i.spanResources)(l),c&&c[0]&&c[0].data&&l.setAttribute("http.response_content_length",s(c[0].data)),t.context.with(t.trace.setSpan(t.context.active(),l),(()=>{let e;return e="function"==typeof a?a.call(o,c[0]):a.handleEvent(r[0]),l.end(),e}))};n.addPatchedListener(e,a,l)&&r.apply(e,[o,l,c])};const o=e.removeEventListener;e.removeEventListener=function(t,r,i){if("message"!==t)return o.call(e,t,r,i);const a=n.removePatchedListener(e,r);return a?o.call(e,t,a,i):o.call(e,t,r,i)}}endSpanExceptionally(e,t){e.setAttribute("error",!0),e.setAttribute("error.message",t.message),e.setAttribute("error.object",t.name?t.name:t.constructor&&t.constructor.name?t.constructor.name:"Error"),(0,i.spanResources)(e),e.end()}}return FB.IMQAWebSocketInstrumentation=c,FB}(),zB={},KB={};var WB,QB,JB=function(){if(YB)return zB;YB=1,Object.defineProperty(zB,"__esModule",{value:!0}),zB.IMQALongTaskInstrumentation=void 0;const e=On,t=(HB||(HB=1,Object.defineProperty(KB,"__esModule",{value:!0}),KB.VERSION=void 0,KB.VERSION="0.0.6"),KB),n=dy(),r=iy(),o="longtask",i="@imqa/instrumentation-browser-longtask";class a extends e.InstrumentationBase{constructor(e={}){super(i,t.VERSION,Object.assign({},e)),this._screenNameOption=e.screenNameOption}init(){}enable(){this.isSupported()&&(this._longtaskObserver=new PerformanceObserver((e=>{e.getEntries().forEach((e=>this._createSpanFromEntry(e)))})),this._longtaskObserver.observe({type:o,buffered:!0}))}disable(){var e;this.isSupported()&&(null===(e=this._longtaskObserver)||void 0===e||e.disconnect())}_createSpanFromEntry(e){const t=this.tracer.startSpan(o,{startTime:e.startTime});t.setAttribute(r.ATTR_IMQA_RUM_COMPONENT,i),t.setAttribute(r.ATTR_IMQA_SPAN_TYPE,"longtask"),(0,n.spanResources)(t,this._screenNameOption),t.setAttribute(r.ATTR_IMQA_LONGTASK_NAME,e.name),t.setAttribute(r.ATTR_IMQA_LONGTASK_ENTRY_TYPE,e.entryType),t.setAttribute(r.ATTR_IMQA_LONGTASK_DURATION,e.duration);const a=e.attribution;Array.isArray(a)&&a.forEach(((e,n)=>{const r=e>1?`longtask.attribution[${n}]`:"longtask.attribution";t.setAttribute(`${r}.name`,e.name),t.setAttribute(`${r}.entry_type`,e.entryType),t.setAttribute(`${r}.start_time`,e.startTime),t.setAttribute(`${r}.duration`,e.duration),t.setAttribute(`${r}.container_type`,e.containerType),t.setAttribute(`${r}.container_src`,e.containerSrc),t.setAttribute(`${r}.container_id`,e.containerId),t.setAttribute(`${r}.container_name`,e.containerName)})),t.end(e.startTime+e.duration)}isSupported(){return(window.PerformanceObserver&&PerformanceObserver.supportedEntryTypes||[]).includes(o)}}return zB.IMQALongTaskInstrumentation=a,zB}(),$B={},XB={};var ZB,eV,tV=function(){if(QB)return $B;QB=1,Object.defineProperty($B,"__esModule",{value:!0}),$B.IMQAPageVisibilityInstrumentation=void 0;const e=On,t=(WB||(WB=1,Object.defineProperty(XB,"__esModule",{value:!0}),XB.VERSION=void 0,XB.VERSION="0.0.6"),XB),n=dy(),r=iy();class o extends e.InstrumentationBase{constructor(e={}){super("@imqa/instrumentation-page-visibility",t.VERSION,Object.assign({},e)),this._screenNameOption=e.screenNameOption,this.unloading=!1}init(){}enable(){document.hidden&&this._createSpan(document.hidden),this.unloadListener=()=>{this.unloading=!0},this.visibilityListener=()=>{this.unloading||this._createSpan(document.hidden)},window.addEventListener("beforeunload",this.unloadListener),window.addEventListener("visibilitychange",this.visibilityListener)}disable(){window.removeEventListener("beforeunload",this.unloadListener),window.removeEventListener("visibilitychange",this.visibilityListener)}_createSpan(e){const t=Date.now(),o=this.tracer.startSpan("visibility",{startTime:t});o.setAttribute(r.ATTR_IMQA_SPAN_TYPE,"visibility"),(0,n.spanResources)(o,this._screenNameOption),o.setAttribute("hidden",e),o.end(t)}}return $B.IMQAPageVisibilityInstrumentation=o,$B}(),nV={},rV={};var oV,iV,aV=function(){if(eV)return nV;eV=1,Object.defineProperty(nV,"__esModule",{value:!0}),nV.IMQAConnectivityInstrumentation=void 0;const e=On,t=iy(),n=dy(),r=(ZB||(ZB=1,Object.defineProperty(rV,"__esModule",{value:!0}),rV.VERSION=void 0,rV.VERSION="0.0.6"),rV);class o extends e.InstrumentationBase{constructor(e={}){super("@imqa/instrumentation-connectivity",r.VERSION,Object.assign({},e)),this.offlineStart=navigator.onLine?null:Date.now(),this._screenNameOption=e.screenNameOption}init(){}enable(){this.offlineListener=()=>{this.offlineStart=Date.now()},this.onlineListener=()=>{this.offlineStart&&(this._createSpan(!1,this.offlineStart),this._createSpan(!0,Date.now()))},window.addEventListener("offline",this.offlineListener),window.addEventListener("online",this.onlineListener)}disable(){window.removeEventListener("offline",this.offlineListener),window.removeEventListener("online",this.onlineListener)}_createSpan(e,r){const o=this.tracer.startSpan("connectivity",{startTime:r});o.setAttribute(t.ATTR_IMQA_CONNECTIVITY_ONLINE,e),o.setAttribute(t.ATTR_IMQA_SPAN_TYPE,"connectivity"),(0,n.spanResources)(o,this._screenNameOption),o.end(r)}}return nV.IMQAConnectivityInstrumentation=o,nV}(),sV={},cV={};var uV,lV,pV=function(){if(iV)return sV;iV=1,Object.defineProperty(sV,"__esModule",{value:!0}),sV.IMQASocketIoClientInstrumentation=void 0;const e=Wt,t=On,n=Km,r=RN(),o=(oV||(oV=1,Object.defineProperty(cV,"__esModule",{value:!0}),cV.VERSION=void 0,cV.VERSION="0.0.6"),cV),i=dy(),a="messaging.socket.io.namespace",s="messaging.socket.io.event_name",c=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];class u extends t.InstrumentationBase{constructor(e={}){super("@imqa/instrumentation-socket.io-client",o.VERSION,Object.assign({target:"io"},e)),this.listeners=new WeakMap,this._screenNameOption=e.screenNameOption}init(){}getConfig(){return this._config}patchSocketIo(t){if(!function(e){return"function"==typeof e&&"function"==typeof e.Socket}(t))return void this._diag.debug("Doesn't seem like socket.io-client",t);const r=this;this._wrap(t.Socket.prototype,"emit",(t=>function(o,...i){const c=r.tracer.startSpan(`${o} send`,{kind:e.SpanKind.PRODUCER,attributes:{[n.SemanticAttributes.MESSAGING_SYSTEM]:"socket.io",[n.SemanticAttributes.MESSAGING_DESTINATION]:this.nsp,[n.SemanticAttributes.MESSAGING_DESTINATION_KIND]:n.MessagingDestinationKindValues.TOPIC,[a]:this.nsp,[s]:o}});try{return e.context.with(e.trace.setSpan(e.context.active(),c),(()=>t.apply(this,[o,...i])))}catch(t){let n="";throw t instanceof Error&&(c.recordException(t),n=t.message),c.setStatus({code:e.SpanStatusCode.ERROR,message:n}),t}finally{c.end()}})),this._wrap(t.Socket.prototype,"on",(t=>function(o,u){if(c.includes(o)||"function"!=typeof u)return t.call(this,o,u);let l;return r.listeners.has(u)?l=r.listeners.get(u):(l=function(...t){const c=r.tracer.startSpan(`${o} ${n.MessagingOperationValues.RECEIVE}`,{kind:e.SpanKind.CONSUMER,attributes:{[n.SemanticAttributes.MESSAGING_SYSTEM]:"socket.io",[n.SemanticAttributes.MESSAGING_DESTINATION]:this.nsp,[n.SemanticAttributes.MESSAGING_DESTINATION_KIND]:n.MessagingDestinationKindValues.TOPIC,[n.SemanticAttributes.MESSAGING_OPERATION]:n.MessagingOperationValues.RECEIVE,[a]:this.nsp,[s]:o}});(0,i.spanResources)(c,this._screenNameOption),c.setAttribute("span.type","socket-io");try{u.call(this,t)}catch(e){throw e instanceof Error&&c.recordException(e),e}finally{c.end()}},r.listeners.set(u,l)),t.call(this,o,l)})),t.Socket.prototype.addEventListener=t.Socket.prototype.on,this._wrap(t.Socket.prototype,"off",(e=>function(t,n){return!t||c.includes(t)||"function"!=typeof n?e.call(this,t,n):r.listeners.has(n)?e.call(this,t,r.listeners.get(n)):e.call(this,t,n)})),t.Socket.prototype.removeListener=t.Socket.prototype.off,t.Socket.prototype.removeEventListener=t.Socket.prototype.off,t.Socket.prototype.removeAllListeners=t.Socket.prototype.off,this._onDisable=()=>{this._unwrap(t.Socket.prototype,"emit"),this._unwrap(t.Socket.prototype,"on"),t.Socket.prototype.addEventListener=t.Socket.prototype.on,this._unwrap(t.Socket.prototype,"off"),t.Socket.prototype.removeListener=t.Socket.prototype.off,t.Socket.prototype.removeEventListener=t.Socket.prototype.off,t.Socket.prototype.removeAllListeners=t.Socket.prototype.off}}enable(){const e=this.getConfig();e.target&&("string"==typeof e.target?this._onDisable=(0,r.waitForGlobal)(e.target,(e=>this.patchSocketIo(e))):this.patchSocketIo(e.target))}disable(){this._onDisable&&(this._onDisable(),this._onDisable=void 0)}}return sV.IMQASocketIoClientInstrumentation=u,sV}(),dV={};function fV(){if(lV)return uV;return lV=1,uV=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}}var hV,mV,gV={};var _V,yV=(mV||(mV=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.IMQAConsoleInstrumentation=e._parseConsoleArgs=void 0;const t=F,n=t.__importStar(pn()),r=Wt,o=On,i=t.__importDefault(fV()),a=t.__importDefault(WL()),s=t.__importDefault(zL()),c=(hV||(hV=1,Object.defineProperty(gV,"__esModule",{value:!0}),gV.VERSION=void 0,gV.VERSION="0.0.7"),gV),u=RN(),l=dy(),p=uy(),d=iy(),f=dy(),h="@imqa/instrumentation-console";e._parseConsoleArgs=e=>{const t=[];let n;for(const o of e)if((0,i.default)(o)){null==n&&(0,a.default)(o)&&(n=o);try{const e=JSON.stringify(o);null!=e&&t.push(e)}catch(e){r.diag.error("Failed to stringify console argument",e)}}else t.push(o);return n?{...n,...e.length>1&&{message:t.join(" ")}}:t.join(" ")};class m extends o.InstrumentationBase{_createSpan(t,...n){const o=Date.now(),i=(0,e._parseConsoleArgs)(n),c=(0,s.default)(i)?i:(0,u.jsonToString)(i),m=this.tracer.startSpan(`console.${t}`,{kind:r.SpanKind.INTERNAL,startTime:o});let g=t,_=0;"log"===t&&(g="info",_=9),"info"===t&&(_=9),"warn"===t&&(_=13),"debug"===t&&(_=5),(0,f.spanResources)(m,this._screenNameOption),m.setAttribute(d.ATTR_IMQA_RUM_COMPONENT,h),m.setAttribute(d.ATTR_IMQA_SPAN_TYPE,"log"),m.setAttribute(d.ATTR_IMQA_LOG_LEVEL,g),m.setAttribute(d.ATTR_IMQA_LOG_MESSAGE,c),(0,a.default)(i)&&m.setAttributes(i),this.logger.emit({timestamp:o,severityText:g,severityNumber:_,body:c,attributes:{[d.ATTR_IMQA_RUM_COMPONENT]:h,[d.ATTR_IMQA_SPAN_TYPE]:"log",[d.ATTR_IMQA_SCREEN_NAME]:(0,l.getScreenName)({screenNameType:"routeOnly",urlWithSearchParams:!1,...this._screenNameOption}),[d.ATTR_IMQA_SCREEN_TYPE]:"page",level:g,[d.ATTR_IMQA_SESSION_ID]:(0,p.getRumSessionId)()},context:r.trace.setSpanContext(r.context.active(),m.spanContext())}),m.end(o)}constructor(e={}){super(h,c.VERSION,Object.assign({},e)),this._consoleLogHandler=e=>(...t)=>(this._createSpan("log",...t),e.apply(this,t)),this._consoleInfoHandler=e=>(...t)=>(this._createSpan("info",...t),e.apply(this,t)),this._consoleWarnHandler=e=>(...t)=>(this._createSpan("warn",...t),e.apply(this,t)),this._consoleDebugHandler=e=>(...t)=>(this._createSpan("debug",...t),e.apply(this,t)),this._screenNameOption=e.screenNameOption}init(){}enable(){n.wrap(console,"debug",this._consoleDebugHandler),n.wrap(console,"info",this._consoleInfoHandler),n.wrap(console,"log",this._consoleLogHandler),n.wrap(console,"warn",this._consoleWarnHandler)}disable(){n.unwrap(console,"debug"),n.unwrap(console,"info"),n.unwrap(console,"log"),n.unwrap(console,"warn")}}e.IMQAConsoleInstrumentation=m}(dV)),dV),vV={};!function(e){e.COMPONENT="component",e.HTTP_ERROR_NAME="http.error_name",e.HTTP_STATUS_TEXT="http.status_text"}(_V||(_V={}));var bV=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},EV=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},SV=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},TV=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},OV=Nt.createComponentLogger({namespace:"@opentelemetry/opentelemetry-instrumentation-fetch/utils"});function AV(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(e[0]instanceof URL||"string"==typeof e[0]){var n=e[1];if(!(null==n?void 0:n.body))return Promise.resolve();if(n.body instanceof ReadableStream){var r=function(e){if(!e.pipeThrough)return OV.warn("Platform has ReadableStream but not pipeThrough!"),{body:e,length:Promise.resolve(void 0)};var t,n=0,r=new Promise((function(e){t=e})),o=new TransformStream({start:function(){},transform:function(e,t){return bV(this,void 0,void 0,(function(){var r;return EV(this,(function(o){switch(o.label){case 0:return[4,e];case 1:return r=o.sent(),n+=r.byteLength,t.enqueue(e),[2]}}))}))},flush:function(){t(n)}});return{body:e.pipeThrough(o),length:r}}(n.body),o=r.body,i=r.length;return n.body=o,i}return Promise.resolve(function(e){if("undefined"!=typeof Document&&e instanceof Document)return(new XMLSerializer).serializeToString(document).length;if(e instanceof Blob)return e.size;if(void 0!==e.byteLength)return e.byteLength;if(e instanceof FormData)return function(e){var t,n,r=0;try{for(var o=SV(e.entries()),i=o.next();!i.done;i=o.next()){var a=TV(i.value,2),s=a[0],c=a[1];r+=s.length,c instanceof Blob?r+=c.size:r+=c.length}}catch(e){t={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}return r}(e);if(e instanceof URLSearchParams)return RV(e.toString());if("string"==typeof e)return RV(e);return void OV.warn("unknown body type")}(n.body))}var a=e[0];return(null==a?void 0:a.body)?a.clone().text().then((function(e){return RV(e)})):Promise.resolve()}var wV=new TextEncoder;function RV(e){return wV.encode(e).byteLength}var NV,IV,PV="0.57.2",xV=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),CV=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a},MV=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))},LV="object"==typeof process&&"node"===(null===(NV=process.release)||void 0===NV?void 0:NV.name),UV=function(e){function t(t){void 0===t&&(t={});var n=e.call(this,"@opentelemetry/instrumentation-fetch",PV,t)||this;return n.component="fetch",n.version=PV,n.moduleName=n.component,n._usedResources=new WeakSet,n._tasksCount=0,n}return xV(t,e),t.prototype.init=function(){},t.prototype._addChildSpan=function(e,t){var n=this.tracer.startSpan("CORS Preflight",{startTime:t[GR.FETCH_START]},zt.setSpan(Rt.active(),e));cN(n,t,this.getConfig().ignoreNetworkEvents),n.end(t[GR.RESPONSE_END])},t.prototype._addFinalSpanAttributes=function(e,t){var n=dN(t.url);e.setAttribute(oa,t.status),null!=t.statusText&&e.setAttribute(_V.HTTP_STATUS_TEXT,t.statusText),e.setAttribute(na,n.host),e.setAttribute(ra,n.protocol.replace(":","")),"undefined"!=typeof navigator&&e.setAttribute(aa,navigator.userAgent)},t.prototype._addHeaders=function(e,t){if(!hN(t,this.getConfig().propagateTraceHeaderCorsUrls)){var n={};return Ht.inject(Rt.active(),n),void(Object.keys(n).length>0&&this._diag.debug("headers inject skipped due to CORS policy"))}if(e instanceof Request)Ht.inject(Rt.active(),e.headers,{set:function(e,t,n){return e.set(t,"string"==typeof n?n:String(n))}});else if(e.headers instanceof Headers)Ht.inject(Rt.active(),e.headers,{set:function(e,t,n){return e.set(t,"string"==typeof n?n:String(n))}});else if(e.headers instanceof Map)Ht.inject(Rt.active(),e.headers,{set:function(e,t,n){return e.set(t,"string"==typeof n?n:String(n))}});else{n={};Ht.inject(Rt.active(),n),e.headers=Object.assign({},n,e.headers||{})}},t.prototype._clearResources=function(){0===this._tasksCount&&this.getConfig().clearTimingResources&&(performance.clearResourceTimings(),this._usedResources=new WeakSet)},t.prototype._createSpan=function(e,t){var n;if(void 0===t&&(t={}),!K_(e,this.getConfig().ignoreUrls)){var r=(t.method||"GET").toUpperCase(),o="HTTP "+r;return this.tracer.startSpan(o,{kind:gt.CLIENT,attributes:(n={},n[_V.COMPONENT]=this.moduleName,n[Zi]=r,n[ea]=e,n)})}this._diag.debug("ignoring span as url matches ignored url")},t.prototype._findResourceAndAddNetworkEvents=function(e,t,n){var r=t.entries;if(!r.length){if(!performance.getEntriesByType)return;r=performance.getEntriesByType("resource")}var o=pN(t.spanUrl,t.startTime,n,r,this._usedResources,"fetch");if(o.mainRequest){var i=o.mainRequest;this._markResourceAsUsed(i);var a=o.corsPreFlightRequest;a&&(this._addChildSpan(e,a),this._markResourceAsUsed(a)),cN(e,i,this.getConfig().ignoreNetworkEvents)}},t.prototype._markResourceAsUsed=function(e){this._usedResources.add(e)},t.prototype._endSpan=function(e,t,n){var r=this,o=Wg(Date.now()),i=Jg();this._addFinalSpanAttributes(e,n),setTimeout((function(){var n;null===(n=t.observer)||void 0===n||n.disconnect(),r._findResourceAndAddNetworkEvents(e,t,i),r._tasksCount--,r._clearResources(),e.end(o)}),300)},t.prototype._patchConstructor=function(){var e=this;return function(t){var n=e;return function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var o=this,i=dN(e[0]instanceof Request?e[0].url:String(e[0])).href,a=e[0]instanceof Request?e[0]:e[1]||{},s=n._createSpan(i,a);if(!s)return t.apply(this,e);var c=n._prepareSpanData(i);function u(e,t){n._applyAttributesAfterFetch(e,a,t),n._endSpan(e,c,{status:t.status||0,statusText:t.message,url:i})}function l(e,t){n._applyAttributesAfterFetch(e,a,t),t.status>=200&&t.status<400?n._endSpan(e,c,t):n._endSpan(e,c,{status:t.status,statusText:t.statusText,url:i})}function p(e,t,n){try{var r=n.clone(),o=n.clone(),i=r.body;if(i){var a=i.getReader(),s=function(){a.read().then((function(t){t.done?l(e,o):s()}),(function(t){u(e,t)}))};s()}else l(e,n)}finally{t(n)}}function d(e,t,n){try{u(e,n)}finally{t(n)}}return n.getConfig().measureRequestSize&&AV.apply(void 0,MV([],CV(e),!1)).then((function(e){e&&s.setAttribute(ca,e)})).catch((function(e){n._diag.warn("getFetchBodyLength",e)})),new Promise((function(e,r){return Rt.with(zt.setSpan(Rt.active(),s),(function(){return n._addHeaders(a,i),n._tasksCount++,t.apply(o,a instanceof Request?[a]:[i,a]).then(p.bind(o,s,e),d.bind(o,s,r))}))}))}}},t.prototype._applyAttributesAfterFetch=function(e,t,n){var r=this,o=this.getConfig().applyCustomAttributesOnSpan;o&&En((function(){return o(e,t,n)}),(function(e){e&&r._diag.error("applyCustomAttributesOnSpan",e)}),!0)},t.prototype._prepareSpanData=function(e){var t=Jg(),n=[];if("function"!=typeof PerformanceObserver)return{entries:n,startTime:t,spanUrl:e};var r=new PerformanceObserver((function(t){t.getEntries().forEach((function(t){"fetch"===t.initiatorType&&t.name===e&&n.push(t)}))}));return r.observe({entryTypes:["resource"]}),{entries:n,observer:r,startTime:t,spanUrl:e}},t.prototype.enable=function(){LV?this._diag.warn("this instrumentation is intended for web usage only, it does not instrument Node.js's fetch()"):(Sn(fetch)&&(this._unwrap(Pg,"fetch"),this._diag.debug("removing previous patch for constructor")),this._wrap(Pg,"fetch",this._patchConstructor()))},t.prototype.disable=function(){LV||(this._unwrap(Pg,"fetch"),this._usedResources=new WeakSet)},t}(gn),kV=n(Object.freeze({__proto__:null,FetchInstrumentation:UV}));var DV,jV=function(){if(IV)return vV;IV=1,Object.defineProperty(vV,"__esModule",{value:!0}),vV.IMQAFetchInstrumentation=void 0;const e=kV,t=Xk(),n=RN(),r=dy(),o=iy();class i extends e.FetchInstrumentation{constructor(e={}){const i=e.applyCustomAttributesOnSpan,{screenNameOption:a}=e;e.applyCustomAttributesOnSpan=function(s,c,u){var l;if(s.updateName(`HTTP ${(c.method||"GET").toUpperCase()}`),s.setAttribute(o.ATTR_IMQA_RUM_COMPONENT,"fetch"),s.setAttribute(o.ATTR_IMQA_SPAN_TYPE,"fetch"),(0,r.spanResources)(s,a),u instanceof Response&&s.setAttribute(o.ATTR_URL_FULL,u.url),(null===(l=e.advancedNetworkCapture)||void 0===l?void 0:l.call(e))&&s&&(c.headers&&(0,n.headerCapture)("request",Object.keys(c.headers))(s,(e=>{var t;return null===(t=c.headers)||void 0===t?void 0:t[e]})),c.body&&(c.body instanceof ReadableStream?s.setAttribute(o.ATTR_IMQA_HTTP_REQUEST_BODY,"[ReadableStream]"):s.setAttribute(o.ATTR_IMQA_HTTP_REQUEST_BODY,c.body.toString())),u instanceof Response)){if(u.headers){const e=[];u.headers.forEach(((t,n)=>{e.push(n)})),(0,n.headerCapture)("response",e)(s,(e=>{var t;return null!==(t=u.headers.get(e))&&void 0!==t?t:""}))}u.clone().text().then((e=>{s.setAttribute(o.ATTR_IMQA_HTTP_REQUEST_BODY,e)})).catch((()=>{}))}if(s&&u instanceof Response&&u.headers){const e=u.headers.get("Server-Timing");e&&(0,t.captureTraceParent)(e,s)}i&&i(s,c,u)},super(e)}enable(){window.fetch&&super.enable()}}return vV.IMQAFetchInstrumentation=i,vV}(),BV={},VV={},FV={};function GV(){return DV||(DV=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.EventNames=void 0,function(e){e.METHOD_OPEN="open",e.METHOD_SEND="send",e.EVENT_ABORT="abort",e.EVENT_ERROR="error",e.EVENT_LOAD="loaded",e.EVENT_TIMEOUT="timeout"}(e.EventNames||(e.EventNames={}))}(FV)),FV}var HV,YV={};function qV(){if(HV)return YV;HV=1,Object.defineProperty(YV,"__esModule",{value:!0}),YV.getXHRBodyLength=void 0;const e=Wt.diag.createComponentLogger({namespace:"@opentelemetry/opentelemetry-instrumentation-xml-http-request/utils"});YV.getXHRBodyLength=function(t){return"undefined"!=typeof Document&&t instanceof Document?(new XMLSerializer).serializeToString(document).length:t instanceof Blob?t.size:void 0!==t.byteLength?t.byteLength:t instanceof FormData?function(e){let t=0;for(const[n,r]of e.entries())t+=n.length,r instanceof Blob?t+=r.size:t+=r.length;return t}(t):t instanceof URLSearchParams?n(t.toString()):"string"==typeof t?n(t):void e.warn("unknown body type")};const t=new TextEncoder;function n(e){return t.encode(e).byteLength}return YV}var zV,KV={};function WV(){return zV||(zV=1,Object.defineProperty(KV,"__esModule",{value:!0}),KV.VERSION=void 0,KV.VERSION="0.57.2"),KV}var QV,JV,$V,XV={};function ZV(){return QV||(QV=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.AttributeNames=void 0,function(e){e.HTTP_STATUS_TEXT="http.status_text"}(e.AttributeNames||(e.AttributeNames={}))}(XV)),XV}function eF(){if(JV)return VV;JV=1,Object.defineProperty(VV,"__esModule",{value:!0}),VV.XMLHttpRequestInstrumentation=void 0;const e=Wt,t=On,n=ny,r=Km,o=LN,i=GV(),a=qV(),s=WV(),c=ZV();class u extends t.InstrumentationBase{constructor(e={}){super("@opentelemetry/instrumentation-xml-http-request",s.VERSION,e),this.component="xml-http-request",this.version=s.VERSION,this.moduleName=this.component,this._tasksCount=0,this._xhrMem=new WeakMap,this._usedResources=new WeakSet}init(){}_addHeaders(t,n){const r=(0,o.parseUrl)(n).href;if(!(0,o.shouldPropagateTraceHeaders)(r,this.getConfig().propagateTraceHeaderCorsUrls)){const t={};return e.propagation.inject(e.context.active(),t),void(Object.keys(t).length>0&&this._diag.debug("headers inject skipped due to CORS policy"))}const i={};e.propagation.inject(e.context.active(),i),Object.keys(i).forEach((e=>{t.setRequestHeader(e,String(i[e]))}))}_addChildSpan(t,n){e.context.with(e.trace.setSpan(e.context.active(),t),(()=>{const e=this.tracer.startSpan("CORS Preflight",{startTime:n[o.PerformanceTimingNames.FETCH_START]});(0,o.addSpanNetworkEvents)(e,n,this.getConfig().ignoreNetworkEvents),e.end(n[o.PerformanceTimingNames.RESPONSE_END])}))}_addFinalSpanAttributes(e,t,n){if("string"==typeof n){const i=(0,o.parseUrl)(n);void 0!==t.status&&e.setAttribute(r.SEMATTRS_HTTP_STATUS_CODE,t.status),void 0!==t.statusText&&e.setAttribute(c.AttributeNames.HTTP_STATUS_TEXT,t.statusText),e.setAttribute(r.SEMATTRS_HTTP_HOST,i.host),e.setAttribute(r.SEMATTRS_HTTP_SCHEME,i.protocol.replace(":","")),e.setAttribute(r.SEMATTRS_HTTP_USER_AGENT,navigator.userAgent)}}_applyAttributesAfterXHR(e,n){const r=this.getConfig().applyCustomAttributesOnSpan;"function"==typeof r&&(0,t.safeExecuteInTheMiddle)((()=>r(e,n)),(e=>{e&&this._diag.error("applyCustomAttributesOnSpan",e)}),!0)}_addResourceObserver(e,t){const n=this._xhrMem.get(e);n&&"function"==typeof PerformanceObserver&&"function"==typeof PerformanceResourceTiming&&(n.createdResources={observer:new PerformanceObserver((e=>{const r=e.getEntries(),i=(0,o.parseUrl)(t);r.forEach((e=>{"xmlhttprequest"===e.initiatorType&&e.name===i.href&&n.createdResources&&n.createdResources.entries.push(e)}))})),entries:[]},n.createdResources.observer.observe({entryTypes:["resource"]}))}_clearResources(){0===this._tasksCount&&this.getConfig().clearTimingResources&&(n.otperformance.clearResourceTimings(),this._xhrMem=new WeakMap,this._usedResources=new WeakSet)}_findResourceAndAddNetworkEvents(e,t,r,i,a){if(!(r&&i&&a&&e.createdResources))return;let s=e.createdResources.entries;s&&s.length||(s=n.otperformance.getEntriesByType("resource"));const c=(0,o.getResource)((0,o.parseUrl)(r).href,i,a,s,this._usedResources);if(c.mainRequest){const e=c.mainRequest;this._markResourceAsUsed(e);const n=c.corsPreFlightRequest;n&&(this._addChildSpan(t,n),this._markResourceAsUsed(n)),(0,o.addSpanNetworkEvents)(t,e,this.getConfig().ignoreNetworkEvents)}}_cleanPreviousSpanInformation(e){const t=this._xhrMem.get(e);if(t){const n=t.callbackToRemoveEvents;n&&n(),this._xhrMem.delete(e)}}_createSpan(t,a,s){if((0,n.isUrlIgnored)(a,this.getConfig().ignoreUrls))return void this._diag.debug("ignoring span as url matches ignored url");const c=s.toUpperCase(),u=this.tracer.startSpan(c,{kind:e.SpanKind.CLIENT,attributes:{[r.SEMATTRS_HTTP_METHOD]:s,[r.SEMATTRS_HTTP_URL]:(0,o.parseUrl)(a).toString()}});return u.addEvent(i.EventNames.METHOD_OPEN),this._cleanPreviousSpanInformation(t),this._xhrMem.set(t,{span:u,spanUrl:a}),u}_markResourceAsUsed(e){this._usedResources.add(e)}_patchOpen(){return e=>{const t=this;return function(...n){const r=n[0],o=n[1];return t._createSpan(this,o,r),e.apply(this,n)}}}_patchSend(){const t=this;function o(e,r){const o=t._xhrMem.get(r);if(!o)return;o.status=r.status,o.statusText=r.statusText,t._xhrMem.delete(r),o.span&&t._applyAttributesAfterXHR(o.span,r);const i=(0,n.hrTime)(),a=Date.now();setTimeout((()=>{!function(e,n,r,o){const i=n.callbackToRemoveEvents;"function"==typeof i&&i();const{span:a,spanUrl:s,sendStartTime:c}=n;a&&(t._findResourceAndAddNetworkEvents(n,a,s,c,r),a.addEvent(e,o),t._addFinalSpanAttributes(a,n,s),a.end(o),t._tasksCount--),t._clearResources()}(e,o,i,a)}),300)}function s(){o(i.EventNames.EVENT_ERROR,this)}function c(){o(i.EventNames.EVENT_ABORT,this)}function u(){o(i.EventNames.EVENT_TIMEOUT,this)}function l(){this.status<299?o(i.EventNames.EVENT_LOAD,this):o(i.EventNames.EVENT_ERROR,this)}return o=>function(...p){const d=t._xhrMem.get(this);if(!d)return o.apply(this,p);const f=d.span,h=d.spanUrl;if(f&&h){if(t.getConfig().measureRequestSize&&(null==p?void 0:p[0])){const e=p[0],t=(0,a.getXHRBodyLength)(e);void 0!==t&&f.setAttribute(r.SEMATTRS_HTTP_REQUEST_CONTENT_LENGTH_UNCOMPRESSED,t)}e.context.with(e.trace.setSpan(e.context.active(),f),(()=>{t._tasksCount++,d.sendStartTime=(0,n.hrTime)(),f.addEvent(i.EventNames.METHOD_SEND),this.addEventListener("abort",c),this.addEventListener("error",s),this.addEventListener("load",l),this.addEventListener("timeout",u),d.callbackToRemoveEvents=()=>{!function(e){e.removeEventListener("abort",c),e.removeEventListener("error",s),e.removeEventListener("load",l),e.removeEventListener("timeout",u);const n=t._xhrMem.get(e);n&&(n.callbackToRemoveEvents=void 0)}(this),d.createdResources&&d.createdResources.observer.disconnect()},t._addHeaders(this,h),t._addResourceObserver(this,h)}))}return o.apply(this,p)}}enable(){this._diag.debug("applying patch to",this.moduleName,this.version),(0,t.isWrapped)(XMLHttpRequest.prototype.open)&&(this._unwrap(XMLHttpRequest.prototype,"open"),this._diag.debug("removing previous patch from method open")),(0,t.isWrapped)(XMLHttpRequest.prototype.send)&&(this._unwrap(XMLHttpRequest.prototype,"send"),this._diag.debug("removing previous patch from method send")),this._wrap(XMLHttpRequest.prototype,"open",this._patchOpen()),this._wrap(XMLHttpRequest.prototype,"send",this._patchSend())}disable(){this._diag.debug("removing patch from",this.moduleName,this.version),this._unwrap(XMLHttpRequest.prototype,"open"),this._unwrap(XMLHttpRequest.prototype,"send"),this._tasksCount=0,this._xhrMem=new WeakMap,this._usedResources=new WeakSet}}return VV.XMLHttpRequestInstrumentation=u,VV}var tF,nF=function(){if($V)return BV;$V=1,Object.defineProperty(BV,"__esModule",{value:!0}),BV.IMQAXMLHttpRequestInstrumentation=void 0;const e=F.__importStar(pn()),t=eF(),n=Xk(),r=RN(),o=dy(),i=iy(),a=Wt;class s extends t.XMLHttpRequestInstrumentation{constructor(t={}){super(t);const s=this._createSpan.bind(this);this._createSpan=(c,u,l)=>{var p;const d=s(c,u,l);return d&&((null===(p=t.advancedNetworkCapture)||void 0===p?void 0:p.call(t))&&c.addEventListener("readystatechange",(function(){if(c.readyState===c.OPENED)e.wrap(c,"setRequestHeader",(e=>function(t,n){return(0,r.headerCapture)("request",[t])(d,(()=>n)),e.call(this,t,n)})),e.wrap(c,"send",(e=>function(t){return t&&d.setAttribute(i.ATTR_IMQA_HTTP_REQUEST_BODY,t.toString()),e.call(this,t)}));else if(c.readyState===c.DONE){const t=c.getAllResponseHeaders().split("\r\n").reduce(((e,t)=>{const[n,r]=t.split(": ");return n&&r&&(e[n]=r),e}),{});(0,r.headerCapture)("response",Object.keys(t))(d,(e=>t[e]));try{d.setAttribute(i.ATTR_IMQA_HTTP_RESPONSE_BODY,c.responseText)}catch{a.diag.error("Failed to process response body",c)}e.unwrap(c,"setRequestHeader"),e.unwrap(c,"send")}})),c.addEventListener("readystatechange",(function(){if(c.readyState===c.HEADERS_RECEIVED){if(-1!==c.getAllResponseHeaders().toLowerCase().indexOf("server-timing")){const e=c.getResponseHeader("server-timing");null!==e&&(0,n.captureTraceParent)(e,d)}}})),(0,o.spanResources)(d,t.screenNameOption),d.setAttribute(i.ATTR_URL_FULL,u),d.setAttribute(i.ATTR_IMQA_RUM_COMPONENT,this.moduleName),d.setAttribute(i.ATTR_IMQA_SPAN_TYPE,"xhr"),d.updateName(`HTTP ${l.toUpperCase()}`)),d};const c=this._addResourceObserver.bind(this);this._addResourceObserver=(e,t)=>{"function"==typeof PerformanceObserver&&"function"==typeof PerformanceResourceTiming&&c(e,t)}}}return BV.IMQAXMLHttpRequestInstrumentation=s,BV}(),rF=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{c(r.next(e))}catch(e){i(e)}}function s(e){try{c(r.throw(e))}catch(e){i(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}c((r=r.apply(e,t||[])).next())}))},oF=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!(o=a.trys,(o=o.length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){a.label=i[1];break}if(6===i[0]&&a.label<o[1]){a.label=o[1],o=i;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},iF=function(){function e(e,t){var n,r,o,i;this._exporter=e,this._finishedLogRecords=[];var a=xg();this._maxExportBatchSize=null!==(n=null==t?void 0:t.maxExportBatchSize)&&void 0!==n?n:a.OTEL_BLRP_MAX_EXPORT_BATCH_SIZE,this._maxQueueSize=null!==(r=null==t?void 0:t.maxQueueSize)&&void 0!==r?r:a.OTEL_BLRP_MAX_QUEUE_SIZE,this._scheduledDelayMillis=null!==(o=null==t?void 0:t.scheduledDelayMillis)&&void 0!==o?o:a.OTEL_BLRP_SCHEDULE_DELAY,this._exportTimeoutMillis=null!==(i=null==t?void 0:t.exportTimeoutMillis)&&void 0!==i?i:a.OTEL_BLRP_EXPORT_TIMEOUT,this._shutdownOnce=new $_(this._shutdown,this),this._maxExportBatchSize>this._maxQueueSize&&(Nt.warn("BatchLogRecordProcessor: maxExportBatchSize must be smaller or equal to maxQueueSize, setting maxExportBatchSize to match maxQueueSize"),this._maxExportBatchSize=this._maxQueueSize)}return e.prototype.onEmit=function(e){this._shutdownOnce.isCalled||this._addToBuffer(e)},e.prototype.forceFlush=function(){return this._shutdownOnce.isCalled?this._shutdownOnce.promise:this._flushAll()},e.prototype.shutdown=function(){return this._shutdownOnce.call()},e.prototype._shutdown=function(){return rF(this,void 0,void 0,(function(){return oF(this,(function(e){switch(e.label){case 0:return this.onShutdown(),[4,this._flushAll()];case 1:return e.sent(),[4,this._exporter.shutdown()];case 2:return e.sent(),[2]}}))}))},e.prototype._addToBuffer=function(e){this._finishedLogRecords.length>=this._maxQueueSize||(this._finishedLogRecords.push(e),this._maybeStartTimer())},e.prototype._flushAll=function(){var e=this;return new Promise((function(t,n){for(var r=[],o=Math.ceil(e._finishedLogRecords.length/e._maxExportBatchSize),i=0;i<o;i++)r.push(e._flushOneBatch());Promise.all(r).then((function(){t()})).catch(n)}))},e.prototype._flushOneBatch=function(){var e=this;return this._clearTimer(),0===this._finishedLogRecords.length?Promise.resolve():new Promise((function(t,n){Y_(e._export(e._finishedLogRecords.splice(0,e._maxExportBatchSize)),e._exportTimeoutMillis).then((function(){return t()})).catch(n)}))},e.prototype._maybeStartTimer=function(){var e=this;void 0===this._timer&&(this._timer=setTimeout((function(){e._flushOneBatch().then((function(){e._finishedLogRecords.length>0&&(e._clearTimer(),e._maybeStartTimer())})).catch((function(e){hg(e)}))}),this._scheduledDelayMillis),this._timer)},e.prototype._clearTimer=function(){void 0!==this._timer&&(clearTimeout(this._timer),this._timer=void 0)},e.prototype._export=function(e){var t=this,n=function(){return ey._export(t._exporter,e).then((function(e){var t;e.code!==qg.SUCCESS&&hg(null!==(t=e.error)&&void 0!==t?t:new Error("BatchLogRecordProcessor: log record export failed (status "+e+")"))})).catch(hg)},r=e.map((function(e){return e.resource})).filter((function(e){return e.asyncAttributesPending}));return 0===r.length?n():Promise.all(r.map((function(e){var t;return null===(t=e.waitForAsyncAttributes)||void 0===t?void 0:t.call(e)}))).then(n,hg)},e}(),aF=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),sF=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r._onInit(n),r}return aF(t,e),t.prototype.onShutdown=function(){"undefined"!=typeof document&&(this._visibilityChangeListener&&document.removeEventListener("visibilitychange",this._visibilityChangeListener),this._pageHideListener&&document.removeEventListener("pagehide",this._pageHideListener))},t.prototype._onInit=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))},t}(iF),cF={},uF={exports:{}};function lF(){return tF||(tF=1,function(e,t){!function(e){var t,n,r,o,i,a=-1,s=function(e){addEventListener("pageshow",(function(t){t.persisted&&(a=t.timeStamp,e(t))}),!0)},c=function(){var e=self.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart<performance.now())return e},u=function(){var e=c();return e&&e.activationStart||0},l=function(e,t){var n=c(),r="navigate";return a>=0?r="back-forward-cache":n&&(document.prerendering||u()>0?r="prerender":document.wasDiscarded?r="restore":n.type&&(r=n.type.replace(/_/g,"-"))),{name:e,value:void 0===t?-1:t,rating:"good",delta:0,entries:[],id:"v4-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:r}},p=function(e,t,n){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){var r=new PerformanceObserver((function(e){Promise.resolve().then((function(){t(e.getEntries())}))}));return r.observe(Object.assign({type:e,buffered:!0},n||{})),r}}catch(e){}},d=function(e,t,n,r){var o,i;return function(a){t.value>=0&&(a||r)&&((i=t.value-(o||0))||void 0===o)&&(o=t.value,t.delta=i,t.rating=function(e,t){return e>t[1]?"poor":e>t[0]?"needs-improvement":"good"}(t.value,n),e(t))}},f=function(e){requestAnimationFrame((function(){return requestAnimationFrame((function(){return e()}))}))},h=function(e){document.addEventListener("visibilitychange",(function(){"hidden"===document.visibilityState&&e()}))},m=function(e){var t=!1;return function(){t||(e(),t=!0)}},g=-1,_=function(){return"hidden"!==document.visibilityState||document.prerendering?1/0:0},y=function(e){"hidden"===document.visibilityState&&g>-1&&(g="visibilitychange"===e.type?e.timeStamp:0,b())},v=function(){addEventListener("visibilitychange",y,!0),addEventListener("prerenderingchange",y,!0)},b=function(){removeEventListener("visibilitychange",y,!0),removeEventListener("prerenderingchange",y,!0)},E=function(){return g<0&&(g=_(),v(),s((function(){setTimeout((function(){g=_(),v()}),0)}))),{get firstHiddenTime(){return g}}},S=function(e){document.prerendering?addEventListener("prerenderingchange",(function(){return e()}),!0):e()},T=[1800,3e3],O=function(e,t){t=t||{},S((function(){var n,r=E(),o=l("FCP"),i=p("paint",(function(e){e.forEach((function(e){"first-contentful-paint"===e.name&&(i.disconnect(),e.startTime<r.firstHiddenTime&&(o.value=Math.max(e.startTime-u(),0),o.entries.push(e),n(!0)))}))}));i&&(n=d(e,o,T,t.reportAllChanges),s((function(r){o=l("FCP"),n=d(e,o,T,t.reportAllChanges),f((function(){o.value=performance.now()-r.timeStamp,n(!0)}))})))}))},A=[.1,.25],w=0,R=1/0,N=0,I=function(e){e.forEach((function(e){e.interactionId&&(R=Math.min(R,e.interactionId),N=Math.max(N,e.interactionId),w=N?(N-R)/7+1:0)}))},P=function(){return t?w:performance.interactionCount||0},x=function(){"interactionCount"in performance||t||(t=p("event",I,{type:"event",buffered:!0,durationThreshold:0}))},C=[],M=new Map,L=0,U=function(){var e=Math.min(C.length-1,Math.floor((P()-L)/50));return C[e]},k=[],D=function(e){if(k.forEach((function(t){return t(e)})),e.interactionId||"first-input"===e.entryType){var t=C[C.length-1],n=M.get(e.interactionId);if(n||C.length<10||e.duration>t.latency){if(n)e.duration>n.latency?(n.entries=[e],n.latency=e.duration):e.duration===n.latency&&e.startTime===n.entries[0].startTime&&n.entries.push(e);else{var r={id:e.interactionId,latency:e.duration,entries:[e]};M.set(r.id,r),C.push(r)}C.sort((function(e,t){return t.latency-e.latency})),C.length>10&&C.splice(10).forEach((function(e){return M.delete(e.id)}))}}},j=function(e){var t=self.requestIdleCallback||self.setTimeout,n=-1;return e=m(e),"hidden"===document.visibilityState?e():(n=t(e),h(e)),n},B=[200,500],V=[2500,4e3],F={},G=[800,1800],H=function e(t){document.prerendering?S((function(){return e(t)})):"complete"!==document.readyState?addEventListener("load",(function(){return e(t)}),!0):setTimeout(t,0)},Y={passive:!0,capture:!0},q=new Date,z=function(e,t){n||(n=t,r=e,o=new Date,Q(removeEventListener),K())},K=function(){if(r>=0&&r<o-q){var e={entryType:"first-input",name:n.type,target:n.target,cancelable:n.cancelable,startTime:n.timeStamp,processingStart:n.timeStamp+r};i.forEach((function(t){t(e)})),i=[]}},W=function(e){if(e.cancelable){var t=(e.timeStamp>1e12?new Date:performance.now())-e.timeStamp;"pointerdown"==e.type?function(e,t){var n=function(){z(e,t),o()},r=function(){o()},o=function(){removeEventListener("pointerup",n,Y),removeEventListener("pointercancel",r,Y)};addEventListener("pointerup",n,Y),addEventListener("pointercancel",r,Y)}(t,e):z(t,e)}},Q=function(e){["mousedown","keydown","touchstart","pointerdown"].forEach((function(t){return e(t,W,Y)}))},J=[100,300];e.CLSThresholds=A,e.FCPThresholds=T,e.FIDThresholds=J,e.INPThresholds=B,e.LCPThresholds=V,e.TTFBThresholds=G,e.onCLS=function(e,t){t=t||{},O(m((function(){var n,r=l("CLS",0),o=0,i=[],a=function(e){e.forEach((function(e){if(!e.hadRecentInput){var t=i[0],n=i[i.length-1];o&&e.startTime-n.startTime<1e3&&e.startTime-t.startTime<5e3?(o+=e.value,i.push(e)):(o=e.value,i=[e])}})),o>r.value&&(r.value=o,r.entries=i,n())},c=p("layout-shift",a);c&&(n=d(e,r,A,t.reportAllChanges),h((function(){a(c.takeRecords()),n(!0)})),s((function(){o=0,r=l("CLS",0),n=d(e,r,A,t.reportAllChanges),f((function(){return n()}))})),setTimeout(n,0))})))},e.onFCP=O,e.onFID=function(e,t){t=t||{},S((function(){var o,a=E(),c=l("FID"),u=function(e){e.startTime<a.firstHiddenTime&&(c.value=e.processingStart-e.startTime,c.entries.push(e),o(!0))},f=function(e){e.forEach(u)},g=p("first-input",f);o=d(e,c,J,t.reportAllChanges),g&&(h(m((function(){f(g.takeRecords()),g.disconnect()}))),s((function(){var a;c=l("FID"),o=d(e,c,J,t.reportAllChanges),i=[],r=-1,n=null,Q(addEventListener),a=u,i.push(a),K()})))}))},e.onINP=function(e,t){"PerformanceEventTiming"in self&&"interactionId"in PerformanceEventTiming.prototype&&(t=t||{},S((function(){var n;x();var r,o=l("INP"),i=function(e){j((function(){e.forEach(D);var t=U();t&&t.latency!==o.value&&(o.value=t.latency,o.entries=t.entries,r())}))},a=p("event",i,{durationThreshold:null!==(n=t.durationThreshold)&&void 0!==n?n:40});r=d(e,o,B,t.reportAllChanges),a&&(a.observe({type:"first-input",buffered:!0}),h((function(){i(a.takeRecords()),r(!0)})),s((function(){L=P(),C.length=0,M.clear(),o=l("INP"),r=d(e,o,B,t.reportAllChanges)})))})))},e.onLCP=function(e,t){t=t||{},S((function(){var n,r=E(),o=l("LCP"),i=function(e){t.reportAllChanges||(e=e.slice(-1)),e.forEach((function(e){e.startTime<r.firstHiddenTime&&(o.value=Math.max(e.startTime-u(),0),o.entries=[e],n())}))},a=p("largest-contentful-paint",i);if(a){n=d(e,o,V,t.reportAllChanges);var c=m((function(){F[o.id]||(i(a.takeRecords()),a.disconnect(),F[o.id]=!0,n(!0))}));["keydown","click"].forEach((function(e){addEventListener(e,(function(){return j(c)}),{once:!0,capture:!0})})),h(c),s((function(r){o=l("LCP"),n=d(e,o,V,t.reportAllChanges),f((function(){o.value=performance.now()-r.timeStamp,F[o.id]=!0,n(!0)}))}))}}))},e.onTTFB=function(e,t){t=t||{};var n=l("TTFB"),r=d(e,n,G,t.reportAllChanges);H((function(){var o=c();o&&(n.value=Math.max(o.responseStart-u(),0),n.entries=[o],r(!0),s((function(){n=l("TTFB",0),(r=d(e,n,G,t.reportAllChanges))(!0)})))}))}}(t)}(0,uF.exports)),uF.exports}var pF,dF,fF={};var hF=function(){if(dF)return cF;dF=1,Object.defineProperty(cF,"__esModule",{value:!0}),cF.IMQAWebvitalsInstrumentation=void 0;const e=On,t=Wt,n=lF(),r=dy(),o=iy(),i=(pF||(pF=1,Object.defineProperty(fF,"__esModule",{value:!0}),fF.VERSION=void 0,fF.VERSION="0.1.0"),fF),a="@imqa/instrumentation-webvitals";class s extends e.InstrumentationBase{constructor(e={}){super(a,i.VERSION,e),this._histogram=null,this._reported={},this._screenNameOption=e.screenNameOption}_report(e,n){if(this._reported[e])return;this._reported[e]=!0;const i=n.value,s=Date.now(),c=this.tracer.startSpan(a,{startTime:s});if((0,r.spanResources)(c,this._screenNameOption),c.setAttribute(o.ATTR_IMQA_SPAN_TYPE,"webvitals"),c.setAttribute("web-vital.name",e),c.setAttribute("web-vital.value",i),c.setAttribute("web-vital.delta",n.delta),c.setAttribute("web-vital.navigation_type",n.navigationType),c.setAttribute("web-vital.rating",n.rating),c.end(s),this._histogram){const r={[o.ATTR_IMQA_SPAN_TYPE]:"webvitals","web-vital.name":e,"web-vital.delta":n.delta,"web-vital.navigation_type":n.navigationType,"web-vital.rating":n.rating};t.diag.debug(`Recording webvitals metric: ${e} = ${i}`,r),this._histogram.record(i,r)}else t.diag.warn("WebVitals histogram not available for metric:",e)}init(){try{t.diag.debug("IMQAWebvitalsInstrumentation: Initializing meter");let e=this.meter;t.diag.debug("IMQAWebvitalsInstrumentation: Meter from instrumentation base:",!!e),e||(t.diag.debug("IMQAWebvitalsInstrumentation: Using global meter as fallback"),e=t.metrics.getMeter(a,i.VERSION)),this._histogram=e.createHistogram("webvitals",{description:"Core Web Vitals metrics",unit:""}),t.diag.debug("IMQAWebvitalsInstrumentation: Histogram created:",!!this._histogram)}catch(e){t.diag.error("Failed to create webvitals histogram:",e)}}enable(){(0,n.onFCP)((e=>{this._report("fcp",e)})),(0,n.onTTFB)((e=>{this._report("ttfb",e)})),(0,n.onFID)((e=>{this._report("fid",e)})),(0,n.onCLS)((e=>{this._report("cls",e)})),(0,n.onLCP)((e=>{this._report("lcp",e)})),(0,n.onINP)((e=>{this._report("inp",e)}))}disable(){var e;null===(e=this._observer)||void 0===e||e.disconnect(),this._observer=void 0}}return cF.IMQAWebvitalsInstrumentation=s,cF}();const mF={serviceName:"unknown-browser-service",serviceVersion:"unknown-browser-version",serviceKey:"unknown-browser-key",collectorUrl:void 0,bufferTimeout:4e3,bufferSize:50,instrumentations:{},spanExporter:{factory:e=>"proto"===e.exporterProtocol?new PB.IMQATraceExporterProto({url:e.url}):e.disablePreflight?new PB.IMQATracePlainTextBeaconExporter({url:e.url}):new PB.IMQATraceExporter({url:e.url})},logExporter:{factory:e=>"proto"===e.exporterProtocol?new PB.IMQALogExporterProto({url:e.url}):e.disablePreflight?new PB.IMQALogPlainTextExporter({url:e.url}):new PB.IMQALogExporter({url:e.url})},meterExporter:{factory:e=>new VB({url:e.url})},spanProcessor:{factory:(e,t,n)=>new GP.IMQABatchSpanProcessor(e,t,n)},logProcessor:{factory:(e,t)=>new sF(e,t)},exporterProtocol:"json",disablePreflight:!1,screenNameOption:{screenNameType:"routeOnly",urlWithSearchParams:!1}},gF=[{Instrument:Zk.IMQADocumentLoadInstrumentation,confKey:"document",disable:!1},{Instrument:nF.IMQAXMLHttpRequestInstrumentation,confKey:"xhr",disable:!1},{Instrument:AN.IMQAUserInteractionInstrumentation,confKey:"interactions",disable:!1},{Instrument:kN.IMQAPostDocLoadResourceInstrumentation,confKey:"postload",disable:!1},{Instrument:jV.IMQAFetchInstrumentation,confKey:"fetch",disable:!1},{Instrument:qB.IMQAWebSocketInstrumentation,confKey:"websocket",disable:!0},{Instrument:JB.IMQALongTaskInstrumentation,confKey:"longtask",disable:!1},{Instrument:Bw.IMQAErrorInstrumentation,confKey:"errors",disable:!1},{Instrument:tV.IMQAPageVisibilityInstrumentation,confKey:"visibility",disable:!0},{Instrument:aV.IMQAConnectivityInstrumentation,confKey:"connectivity",disable:!1},{Instrument:pV.IMQASocketIoClientInstrumentation,confKey:"socketio",disable:!1},{Instrument:yV.IMQAConsoleInstrumentation,confKey:"console",disable:!0},{Instrument:hF.IMQAWebvitalsInstrumentation,confKey:"webvitals",disable:!1}];gF.map((e=>e.confKey)).reduce(((e,t)=>(e[t]=!1,e)),{webvitals:!1});var _F=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};let yF,vF,bF,EF,SF,TF,OF=!1;const AF={screenNameType:"routeOnly",urlWithSearchParams:!1},wF={DEFAULT_AUTO_INSTRUMENTED_EVENTS:AN.DEFAULT_AUTO_INSTRUMENTED_EVENTS,DEFAULT_AUTO_INSTRUMENTED_EVENT_NAMES:AN.DEFAULT_AUTO_INSTRUMENTED_EVENT_NAMES,AlwaysOnSampler:zw,AlwaysOffSampler:qw,ParentBasedSampler:Kw,SessionBasedSampler:QP.SessionBasedSampler,get inited(){return OF},_internalInit:function(e){wF.init(Object.assign(Object.assign({},mF),e))},options:void 0,_screenNameOption:AF,init:function(e){const{serviceKey:t}=e,n=_F(e,["serviceKey"]);this.options=Object.assign(Object.assign({},n),{serviceKey:"hidden"}),this._screenNameOption=e.screenNameOption||AF,e.opampServerUrl&&(this.opampClient=new ZC.IMQAOpAMPClient({serverUrl:e.opampServerUrl,agentType:"web",agentVersion:CP,onConnectionChange:e=>{e?Nt.info("IMQA OpAMP connected"):Nt.info("IMQA OpAMP disconnected")},onConfigChange:e=>{Nt.info("IMQA OpAMP config changed",e)}}));const r=(e,t)=>"function"==typeof e&&!0!==e.__wrapped&&e.name===t,o=r(null===console||void 0===console?void 0:console.log,"log")?console.log:()=>{},i=r(null===console||void 0===console?void 0:console.warn,"warn")?console.warn:o,a=r(null===console||void 0===console?void 0:console.error,"error")?console.error:o,s=r(null===console||void 0===console?void 0:console.debug,"debug")?console.debug:o,c=r(null===console||void 0===console?void 0:console.trace,"trace")?console.trace:o;if(Nt.setLogger({error:(...e)=>{r(a,"error")&&a(...e)},warn:(...e)=>{r(i,"warn")&&i(...e)},info:(...e)=>{r(o,"log")&&o(...e)},debug:(...e)=>{r(s,"debug")&&s(...e)},verbose:(...e)=>{r(c,"trace")&&c(...e)}},{suppressOverrideMessage:!0,logLevel:(null==e?void 0:e.debug)?Z.DEBUG:Z.NONE}),"object"!=typeof window)return void Nt.error("IMQA: Non-browser environment detected, aborting");if("function"!=typeof Symbol)return void Nt.error("IMQA: browser not supported, disabling instrumentation.");let u;if(SF=new IP.InternalEventTarget,e.collectorUrl)try{u=IN.getcollectorUrl(e.collectorUrl)}catch(e){return void Nt.error("IMQA: Invalid collectorUrl provided, aborting init.",e)}const l=Object.assign({},mF,e,u,{exporter:Object.assign({},mF.exporter,e.exporter)});if(OF)return void Nt.warn("IMQA already init()ed.");if(!l.debug){if(!l.collectorUrl)throw new Error("IMQA.init( { collectorUrl: 'https://collector.yourdomain.com'} ) is required.");if(!l.collectorUrl.startsWith("https")&&!l.allowInsecureUrl)throw new Error("Not using https is unsafe, if you want to force it use allowInsecureUrl option.")}const p=IN.generateId(64);vF=PN.initSessionTracking(p,SF,{domain:l.cookieDomain,storage:l.sessionStorage}).deinit;const{ignoreUrls:d,deploymentEnvironment:f,version:h,serviceName:m,serviceKey:g,serviceVersion:_,serviceType:y="web",serviceNamespace:v,webServiceVersion:b,webviewNativeResource:E}=l,S={ignoreUrls:d,enabled:!1},T=new Vk(navigator.userAgent),O=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},Hg),{[aM.ATTR_TELEMETRY_SDK_NAME]:"@imqa/web-agent",[aM.ATTR_TELEMETRY_SDK_VERSION]:CP,[aM.ATTR_SERVICE_NAME]:m,[aM.ATTR_SERVICE_VERSION]:_,[aM.ATTR_OS_NAME]:T.getOS().name,[aM.ATTR_OS_VERSION]:T.getOS().version}),E),{[aM.ATTR_IMQA_BROWSER_DEVICE]:Fk(T.getDevice().type),[aM.ATTR_IMQA_BROWSER_NAME]:T.getBrowser().name,[aM.ATTR_IMQA_BROWSER_VERSION]:T.getBrowser().version,[aM.ATTR_IMQA_BROWSER_VERSION_MAJOR]:T.getBrowser().major,[aM.ATTR_IMQA_SERVICE_KEY]:g,[aM.ATTR_IMQA_SERVICE_TYPE]:y,[aM.ATTR_IMQA_AGENT_VERSION]:CP,[aM.ATTR_IMQA_RUM_VERSION]:CP,[aM.ATTR_IMQA_RUM_SCRIPT_INSTANCE]:p,[aM.ATTR_IMQA_RUM_AGENT_VERSION]:h,[aM.ATTR_IMQA_DEPLOYMENT_ENVIRONMENT_NAME]:f,[aM.ATTR_IMQA_WEB_VERSION]:b}),v?{[aM.ATTR_IMQA_SERVICE_NAMESPACE]:v}:{}),A=window.syntheticsRunId;A&&(O["Synthetics-RunId"]=A);const w=new dR(Object.assign(Object.assign({},O),{"session.id":PN.getRumSessionId()}));this.resourceAttributes=O;const R=new wP.IMQAWebTracerProvider(Object.assign(Object.assign({},l.tracer),{resource:w})),N=new wP.IMQALoggerProvider({resource:w}),I=new wP.IMQAMeterProvider({resource:w});Object.defineProperty(R.resource.attributes,"session.id",{get:()=>PN.getRumSessionId(),configurable:!0,enumerable:!0}),this.traceProvider=R,this.logProvider=N,this.meterProvider=I;const P=gF.map((({Instrument:e,confKey:t,disable:n})=>{const r=IN.getPluginConfig(l.instrumentations[t],S,n);if(r){const n=new e(r);return"errors"===t&&n instanceof Bw.IMQAErrorInstrumentation&&(bF=n),"postload"===t&&n instanceof kN.IMQAPostDocLoadResourceInstrumentation&&(EF=n),n}return null})).filter((e=>Boolean(e)));if(this.attributesProcessor=new GP.IMQASpanAttributesProcessor(Object.assign(Object.assign({},f?{environment:f,[aM.ATTR_IMQA_DEPLOYMENT_ENVIRONMENT_NAME]:f}:{}),l.globalAttributes||{})),this.logAttribuitesProcessor=new zP.IMQALogAttributesProcessor(Object.assign(Object.assign({},f?{environment:f,[aM.ATTR_IMQA_DEPLOYMENT_ENVIRONMENT_NAME]:f}:{}),l.globalAttributes||{})),this.traceProvider.addSpanProcessor(this.attributesProcessor),this.logProvider.addLogRecordProcessor(this.logAttribuitesProcessor),l.collectorUrl){const t=function(e){return e.spanExporter.factory({url:new URL("v1/traces",e.collectorUrl).href,disablePreflight:!!e.disablePreflight,exporterProtocol:e.exporterProtocol})}(l),n=function(e){return e.logExporter.factory({url:new URL("v1/logs",e.collectorUrl).href,disablePreflight:!!e.disablePreflight,exporterProtocol:e.exporterProtocol})}(l),r=function(e){return e.meterExporter.factory({url:new URL("v1/metrics",e.collectorUrl).href})}(l);this.meterProvider.addMetricReader(new VL({exporter:r}));const o=this.meterProvider.getMeter("@imqa/metric","0.0.1"),i=l.spanProcessor.factory(t,{scheduledDelayMillis:l.bufferTimeout,maxExportBatchSize:l.bufferSize},e.captureMetrics?o:void 0),a=l.logProcessor.factory(n,{scheduledDelayMillis:l.bufferTimeout,maxExportBatchSize:l.bufferSize});this.traceProvider.addSpanProcessor(i),this.logProvider.addLogRecordProcessor(a),this._processor=i}l.debug&&this.traceProvider.addSpanProcessor(new XR(new zR)),window.addEventListener("visibilitychange",(()=>{"hidden"===document.visibilityState&&this._processor&&this._processor.forceFlush()}));const x=new xP.IMQAContextManager(Object.assign(Object.assign({},l.context),{onBeforeContextStart:()=>null==EF?void 0:EF.onBeforeContextChange(),onBeforeContextEnd:()=>null==EF?void 0:EF.onBeforeContextChange()}));this.traceProvider.register({contextManager:x});const C=R.getTracer("@imqa/user-event",CP);TF=new iM.UserEvent(x,C),yF=ln({tracerProvider:this.traceProvider,loggerProvider:this.logProvider,meterProvider:this.meterProvider,instrumentations:P}),OF=!0,Nt.info("IMQA.init() complete")},deinit(){var e,t,n;OF&&(null==yF||yF(),yF=void 0,null==vF||vF(),vF=void 0,null===(e=this.traceProvider)||void 0===e||e.shutdown(),delete this.traceProvider,null===(t=this.logProvider)||void 0===t||t.shutdown(),delete this.logProvider,null===(n=this.meterProvider)||void 0===n||n.shutdown(),delete this.meterProvider,SF=void 0,TF=void 0,Nt.disable(),OF=!1)},setGlobalAttributes(e){var t,n,r;null===(t=this.attributesProcessor)||void 0===t||t.setGlobalAttributes(e),null===(n=this.logAttribuitesProcessor)||void 0===n||n.setGlobalAttributes(e),null==SF||SF.emit("global-attributes-changed",{attributes:(null===(r=this.attributesProcessor)||void 0===r?void 0:r.getGlobalAttributes())||{}})},setUserIdAttribute(e){var t,n;null===(t=this.attributesProcessor)||void 0===t||t.setGlobalAttributes({"user.id":e}),null==SF||SF.emit("global-attributes-changed",{attributes:(null===(n=this.attributesProcessor)||void 0===n?void 0:n.getGlobalAttributes())||{}})},setAreaCodeAttribute(e){var t,n;null===(t=this.attributesProcessor)||void 0===t||t.setGlobalAttributes({"area.code":e}),null==SF||SF.emit("global-attributes-changed",{attributes:(null===(n=this.attributesProcessor)||void 0===n?void 0:n.getGlobalAttributes())||{}})},getGlobalAttributes(){var e;return(null===(e=this.attributesProcessor)||void 0===e?void 0:e.getGlobalAttributes())||{}},addAction(e,t){if(!OF)return void Nt.debug("IMQA not inited");if(!this.traceProvider)return void Nt.error("IMQA trace provider is not initialized");const n=Date.now(),r=this.traceProvider.getTracer("custom-action").startSpan(e,{startTime:n});t&&r.setAttributes(t),r.end(n)},_experimental_getGlobalAttributes(){return this.getGlobalAttributes()},recordException(e,t){var n;if(!OF)return void Nt.debug("IMQA RUM is not inited");const r=null===(n=this.traceProvider)||void 0===n?void 0:n.getTracer("@imqa/instrumentation-browser-exception");return Bw.recordException(e,{tracer:r,attributes:t})},recordLog(e,t){var n;if(!OF)return void Nt.debug("IMQA RUM is not inited");if(!this.logProvider)return void Nt.error("IMQA RUM log provider is not initialized");if(!this.traceProvider)return void Nt.error("IMQA RUM trace provider is not initialized");const r=null===(n=this.traceProvider)||void 0===n?void 0:n.getTracer("@imqa/custom-log","1.0.0"),o=this.logProvider.getLogger("@imqa/custom-log","1.0.0");ZL.recordLog(e,t,{tracer:r,logger:o,screenNameOption:this._screenNameOption})},userEvent:{start(e,t){if(!TF)throw new Error("UserEvent not initialized. Make sure IMQA is initialized first.");return TF.start(e,t)},end(e,t){if(!TF)throw new Error("UserEvent not initialized. Make sure IMQA is initialized first.");TF.end(e,t)},getActive(){if(TF)return TF.getActive()},cancel(e){if(!TF)throw new Error("UserEvent not initialized. Make sure IMQA is initialized first.");TF.cancel(e)},getActiveContext:()=>TF?TF.getActiveContext():_e,getContext(e){if(TF)return TF.getContext(e)},hasActiveUserEvent:()=>!!TF&&TF.hasActiveUserEvent(),with(e,t){if(!TF)throw new Error("UserEvent not initialized. Make sure IMQA is initialized first.");return TF.with(e,t)},withActive:e=>TF?TF.withActive(e):e(),switchTo(e){if(!TF)throw new Error("UserEvent not initialized. Make sure IMQA is initialized first.");TF.switchTo(e)},hasStoredEvent:e=>!!TF&&TF.hasStoredEvent(e),getStoredEvents:()=>TF?TF.getStoredEvents():[],hasAnyStoredEvents:()=>!!TF&&TF.hasAnyStoredEvents(),cleanup(){TF&&TF.cleanup()}},error(...e){OF?bF?bF.imqaReport("IMQA.error",e):Nt.error("Error was reported, but error instrumentation is disabled."):Nt.debug("IMQA not inited")},addEventListener(e,t){null==SF||SF.addEventListener(e,t)},removeEventListener(e,t){null==SF||SF.removeEventListener(e,t)},_experimental_addEventListener(e,t){return this.addEventListener(e,t)},_experimental_removeEventListener(e,t){return this.removeEventListener(e,t)},getSessionId:()=>PN.getRumSessionId(),setScreenAttribute(e){eM.setScreenAttribute(e),null==SF||SF.emit("screen-attribute-changed",{attribute:e})},_experimental_getSessionId(){return this.getSessionId()}};
/*! *****************************************************************************
	Copyright (c) Microsoft Corporation.

	Permission to use, copy, modify, and/or distribute this software for any
	purpose with or without fee is hereby granted.

	THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
	REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
	AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
	INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
	LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
	OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
	PERFORMANCE OF THIS SOFTWARE.
	***************************************************************************** */
var RF,NF=function(){return NF=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},NF.apply(this,arguments)};function IF(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function PF(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function xF(e,t,n){if(2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}function CF(e){var t,n=null===(t=e)||void 0===t?void 0:t.host;return Boolean(n&&n.shadowRoot&&n.shadowRoot===e)}function MF(e){var t=e.maskInputOptions,n=e.tagName,r=e.type,o=e.value,i=e.maskInputFn,a=o||"";return(t[n.toLowerCase()]||t[r])&&(a=i?i(a):"*".repeat(a.length)),a}!function(e){e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment"}(RF||(RF={}));var LF="__rrweb_original__";var UF,kF,DF=1,jF=new RegExp("[^a-z0-9-_:]");function BF(e){try{var t=e.rules||e.cssRules;return t?Array.from(t).map(VF).join(""):null}catch(e){return null}}function VF(e){var t=e.cssText;if(function(e){return"styleSheet"in e}(e))try{t=BF(e.styleSheet)||t}catch(e){}return t}var FF=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,GF=/^(?!www\.|(?:http|ftp)s?:\/\/|[A-Za-z]:\\|\/\/|#).*/,HF=/^(data:)([^,]*),(.*)/i;function YF(e,t){return(e||"").replace(FF,(function(e,n,r,o,i,a){var s=r||i||a,c=n||o||"";if(!s)return e;if(!GF.test(s))return"url("+c+s+c+")";if(HF.test(s))return"url("+c+s+c+")";if("/"===s[0])return"url("+c+(function(e){return(e.indexOf("//")>-1?e.split("/").slice(0,3).join("/"):e.split("/")[0]).split("?")[0]}(t)+s)+c+")";var u=t.split("/"),l=s.split("/");u.pop();for(var p=0,d=l;p<d.length;p++){var f=d[p];"."!==f&&(".."===f?u.pop():u.push(f))}return"url("+c+u.join("/")+c+")"}))}var qF,zF,KF,WF,QF,JF,$F=/^[^ \t\n\r\u000c]+/,XF=/^[, \t\n\r\u000c]+/;function ZF(e,t){if(!t||""===t.trim())return t;var n=e.createElement("a");return n.href=t,n.href}function eG(){var e=document.createElement("a");return e.href="",e.href}function tG(e,t,n,r){return"src"===n||"href"===n&&r||"xlink:href"===n&&r&&"#"!==r[0]?ZF(e,r):"background"!==n||!r||"table"!==t&&"td"!==t&&"th"!==t?"srcset"===n&&r?function(e,t){if(""===t.trim())return t;var n=0;function r(e){var r,o=e.exec(t.substring(n));return o?(r=o[0],n+=r.length,r):""}for(var o=[];r(XF),!(n>=t.length);){var i=r($F);if(","===i.slice(-1))i=ZF(e,i.substring(0,i.length-1)),o.push(i);else{var a="";i=ZF(e,i);for(var s=!1;;){var c=t.charAt(n);if(""===c){o.push((i+a).trim());break}if(s)")"===c&&(s=!1);else{if(","===c){n+=1,o.push((i+a).trim());break}"("===c&&(s=!0)}a+=c,n+=1}}}return o.join(", ")}(e,r):"style"===n&&r?YF(r,eG()):"object"===t&&"data"===n&&r?ZF(e,r):r:ZF(e,r)}function nG(e,t,n){if(!e)return!1;if(e.nodeType===e.ELEMENT_NODE){if("string"==typeof t){if(e.classList.contains(t))return!0}else for(var r=0;r<e.classList.length;r++){var o=e.classList[r];if(t.test(o))return!0}return!(!n||!e.matches(n))||nG(e.parentNode,t,n)}return e.nodeType,e.TEXT_NODE,nG(e.parentNode,t,n)}function rG(e,t){var n,r,o,i,a=t.doc,s=t.blockClass,c=t.blockSelector,u=t.maskTextClass,l=t.maskTextSelector,p=t.inlineStylesheet,d=t.maskInputOptions,f=void 0===d?{}:d,h=t.maskTextFn,m=t.maskInputFn,g=t.dataURLOptions,_=void 0===g?{}:g,y=t.inlineImages,v=t.recordCanvas,b=t.keepIframeSrcFn;if(a.__sn){var E=a.__sn.id;r=1===E?void 0:E}switch(e.nodeType){case e.DOCUMENT_NODE:return"CSS1Compat"!==e.compatMode?{type:RF.Document,childNodes:[],compatMode:e.compatMode,rootId:r}:{type:RF.Document,childNodes:[],rootId:r};case e.DOCUMENT_TYPE_NODE:return{type:RF.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:r};case e.ELEMENT_NODE:for(var S=function(e,t,n){if("string"==typeof t){if(e.classList.contains(t))return!0}else for(var r=0;r<e.classList.length;r++){var o=e.classList[r];if(t.test(o))return!0}return!!n&&e.matches(n)}(e,s,c),T=function(e){if(e instanceof HTMLFormElement)return"form";var t=e.tagName.toLowerCase().trim();return jF.test(t)?"div":t}(e),O={},A=0,w=Array.from(e.attributes);A<w.length;A++){var R=w[A],N=R.name,I=R.value;O[N]=tG(a,T,N,I)}if("link"===T&&p){var P=Array.from(a.styleSheets).find((function(t){return t.href===e.href})),x=null;P&&(x=BF(P)),x&&(delete O.rel,delete O.href,O._cssText=YF(x,P.href))}if("style"===T&&e.sheet&&!(e.innerText||e.textContent||"").trim().length)(x=BF(e.sheet))&&(O._cssText=YF(x,eG()));if("input"===T||"textarea"===T||"select"===T){I=e.value;"radio"!==O.type&&"checkbox"!==O.type&&"submit"!==O.type&&"button"!==O.type&&I?O.value=MF({type:O.type,tagName:T,value:I,maskInputOptions:f,maskInputFn:m}):e.checked&&(O.checked=e.checked)}if("option"===T&&(e.selected&&!f.select?O.selected=!0:delete O.selected),"canvas"===T&&v)if("2d"===e.__context)(function(e){var t=e.getContext("2d");if(!t)return!0;for(var n=0;n<e.width;n+=50)for(var r=0;r<e.height;r+=50){var o=t.getImageData,i=LF in o?o[LF]:o;if(new Uint32Array(i.call(t,n,r,Math.min(50,e.width-n),Math.min(50,e.height-r)).data.buffer).some((function(e){return 0!==e})))return!1}return!0})(e)||(O.rr_dataURL=e.toDataURL(_.type,_.quality));else if(!("__context"in e)){var C=e.toDataURL(_.type,_.quality),M=document.createElement("canvas");M.width=e.width,M.height=e.height,C!==M.toDataURL(_.type,_.quality)&&(O.rr_dataURL=C)}if("img"===T&&y){UF||(UF=a.createElement("canvas"),kF=UF.getContext("2d"));var L=e,U=L.crossOrigin;L.crossOrigin="anonymous";var k=function(){try{UF.width=L.naturalWidth,UF.height=L.naturalHeight,kF.drawImage(L,0,0),O.rr_dataURL=UF.toDataURL(_.type,_.quality)}catch(e){console.warn("Cannot inline img src="+L.currentSrc+"! Error: "+e)}U?O.crossOrigin=U:delete O.crossOrigin};L.complete&&0!==L.naturalWidth?k():L.onload=k}if("audio"!==T&&"video"!==T||(O.rr_mediaState=e.paused?"paused":"played",O.rr_mediaCurrentTime=e.currentTime),e.scrollLeft&&(O.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(O.rr_scrollTop=e.scrollTop),S){var D=e.getBoundingClientRect(),j=D.width,B=D.height;O={class:O.class,rr_width:j+"px",rr_height:B+"px"}}return"iframe"!==T||b(O.src)||(e.contentDocument||(O.rr_src=O.src),delete O.src),{type:RF.Element,tagName:T,attributes:O,childNodes:[],isSVG:(i=e,Boolean("svg"===i.tagName||i.ownerSVGElement)||void 0),needBlock:S,rootId:r};case e.TEXT_NODE:var V=e.parentNode&&e.parentNode.tagName,F=e.textContent,G="STYLE"===V||void 0,H="SCRIPT"===V||void 0;if(G&&F){try{e.nextSibling||e.previousSibling||(null===(n=e.parentNode.sheet)||void 0===n?void 0:n.cssRules)&&(F=(o=e.parentNode.sheet).cssRules?Array.from(o.cssRules).map((function(e){return e.cssText||""})).join(""):"")}catch(t){console.warn("Cannot get CSS styles from text's parentNode. Error: "+t,e)}F=YF(F,eG())}return H&&(F="SCRIPT_PLACEHOLDER"),!G&&!H&&nG(e,u,l)&&F&&(F=h?h(F):F.replace(/[\S]/g,"*")),{type:RF.Text,textContent:F||"",isStyle:G,rootId:r};case e.CDATA_SECTION_NODE:return{type:RF.CDATA,textContent:"",rootId:r};case e.COMMENT_NODE:return{type:RF.Comment,textContent:e.textContent||"",rootId:r};default:return!1}}function oG(e){return void 0===e?"":e.toLowerCase()}function iG(e,t){var n,r=t.doc,o=t.map,i=t.blockClass,a=t.blockSelector,s=t.maskTextClass,c=t.maskTextSelector,u=t.skipChild,l=void 0!==u&&u,p=t.inlineStylesheet,d=void 0===p||p,f=t.maskInputOptions,h=void 0===f?{}:f,m=t.maskTextFn,g=t.maskInputFn,_=t.slimDOMOptions,y=t.dataURLOptions,v=void 0===y?{}:y,b=t.inlineImages,E=void 0!==b&&b,S=t.recordCanvas,T=void 0!==S&&S,O=t.onSerialize,A=t.onIframeLoad,w=t.iframeLoadTimeout,R=void 0===w?5e3:w,N=t.keepIframeSrcFn,I=void 0===N?function(){return!1}:N,P=t.preserveWhiteSpace,x=void 0===P||P,C=rG(e,{doc:r,blockClass:i,blockSelector:a,maskTextClass:s,maskTextSelector:c,inlineStylesheet:d,maskInputOptions:h,maskTextFn:m,maskInputFn:g,dataURLOptions:v,inlineImages:E,recordCanvas:T,keepIframeSrcFn:I});if(!C)return console.warn(e,"not serialized"),null;n="__sn"in e?e.__sn.id:!function(e,t){if(t.comment&&e.type===RF.Comment)return!0;if(e.type===RF.Element){if(t.script&&("script"===e.tagName||"link"===e.tagName&&"preload"===e.attributes.rel&&"script"===e.attributes.as||"link"===e.tagName&&"prefetch"===e.attributes.rel&&"string"==typeof e.attributes.href&&e.attributes.href.endsWith(".js")))return!0;if(t.headFavicon&&("link"===e.tagName&&"shortcut icon"===e.attributes.rel||"meta"===e.tagName&&(oG(e.attributes.name).match(/^msapplication-tile(image|color)$/)||"application-name"===oG(e.attributes.name)||"icon"===oG(e.attributes.rel)||"apple-touch-icon"===oG(e.attributes.rel)||"shortcut icon"===oG(e.attributes.rel))))return!0;if("meta"===e.tagName){if(t.headMetaDescKeywords&&oG(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(oG(e.attributes.property).match(/^(og|twitter|fb):/)||oG(e.attributes.name).match(/^(og|twitter):/)||"pinterest"===oG(e.attributes.name)))return!0;if(t.headMetaRobots&&("robots"===oG(e.attributes.name)||"googlebot"===oG(e.attributes.name)||"bingbot"===oG(e.attributes.name)))return!0;if(t.headMetaHttpEquiv&&void 0!==e.attributes["http-equiv"])return!0;if(t.headMetaAuthorship&&("author"===oG(e.attributes.name)||"generator"===oG(e.attributes.name)||"framework"===oG(e.attributes.name)||"publisher"===oG(e.attributes.name)||"progid"===oG(e.attributes.name)||oG(e.attributes.property).match(/^article:/)||oG(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&("google-site-verification"===oG(e.attributes.name)||"yandex-verification"===oG(e.attributes.name)||"csrf-token"===oG(e.attributes.name)||"p:domain_verify"===oG(e.attributes.name)||"verify-v1"===oG(e.attributes.name)||"verification"===oG(e.attributes.name)||"shopify-checkout-api-token"===oG(e.attributes.name)))return!0}}return!1}(C,_)&&(x||C.type!==RF.Text||C.isStyle||C.textContent.replace(/^\s+|\s+$/gm,"").length)?DF++:-2;var M=Object.assign(C,{id:n});if(e.__sn=M,-2===n)return null;o[n]=e,O&&O(e);var L=!l;if(M.type===RF.Element&&(L=L&&!M.needBlock,delete M.needBlock,e.shadowRoot&&(M.isShadowHost=!0)),(M.type===RF.Document||M.type===RF.Element)&&L){_.headWhitespace&&C.type===RF.Element&&"head"===C.tagName&&(x=!1);for(var U={doc:r,map:o,blockClass:i,blockSelector:a,maskTextClass:s,maskTextSelector:c,skipChild:l,inlineStylesheet:d,maskInputOptions:h,maskTextFn:m,maskInputFn:g,slimDOMOptions:_,dataURLOptions:v,inlineImages:E,recordCanvas:T,preserveWhiteSpace:x,onSerialize:O,onIframeLoad:A,iframeLoadTimeout:R,keepIframeSrcFn:I},k=0,D=Array.from(e.childNodes);k<D.length;k++){(V=iG(D[k],U))&&M.childNodes.push(V)}if(function(e){return e.nodeType===e.ELEMENT_NODE}(e)&&e.shadowRoot)for(var j=0,B=Array.from(e.shadowRoot.childNodes);j<B.length;j++){var V;(V=iG(B[j],U))&&(V.isShadow=!0,M.childNodes.push(V))}}return e.parentNode&&CF(e.parentNode)&&(M.isShadow=!0),M.type===RF.Element&&"iframe"===M.tagName&&function(e,t,n){var r=e.contentWindow;if(r){var o,i=!1;try{o=r.document.readyState}catch(e){return}if("complete"===o){var a="about:blank";r.location.href===a&&e.src!==a&&""!==e.src?e.addEventListener("load",t):setTimeout(t,0)}else{var s=setTimeout((function(){i||(t(),i=!0)}),n);e.addEventListener("load",(function(){clearTimeout(s),i=!0,t()}))}}}(e,(function(){var t=e.contentDocument;if(t&&A){var n=iG(t,{doc:t,map:o,blockClass:i,blockSelector:a,maskTextClass:s,maskTextSelector:c,skipChild:!1,inlineStylesheet:d,maskInputOptions:h,maskTextFn:m,maskInputFn:g,slimDOMOptions:_,dataURLOptions:v,inlineImages:E,recordCanvas:T,preserveWhiteSpace:x,onSerialize:O,onIframeLoad:A,iframeLoadTimeout:R,keepIframeSrcFn:I});n&&A(e,n)}}),R),M}function aG(e,t,n){void 0===n&&(n=document);var r={capture:!0,passive:!0};return n.addEventListener(e,t,r),function(){return n.removeEventListener(e,t,r)}}!function(e){e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin"}(qF||(qF={})),function(e){e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration"}(zF||(zF={})),function(e){e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel"}(KF||(KF={})),function(e){e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2"}(WF||(WF={})),function(e){e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked",e[e.VolumeChange=3]="VolumeChange"}(QF||(QF={})),function(e){e.Start="start",e.Pause="pause",e.Resume="resume",e.Resize="resize",e.Finish="finish",e.FullsnapshotRebuilded="fullsnapshot-rebuilded",e.LoadStylesheetStart="load-stylesheet-start",e.LoadStylesheetEnd="load-stylesheet-end",e.SkipStart="skip-start",e.SkipEnd="skip-end",e.MouseInteraction="mouse-interaction",e.EventCast="event-cast",e.CustomEvent="custom-event",e.Flush="flush",e.StateChange="state-change",e.PlayBack="play-back"}(JF||(JF={}));var sG="Please stop import mirror directly. Instead of that,\r\nnow you can use replayer.getMirror() to access the mirror instance of a replayer,\r\nor you can use record.mirror to access the mirror instance during recording.",cG={map:{},getId:function(){return console.error(sG),-1},getNode:function(){return console.error(sG),null},removeNodeFromMap:function(){console.error(sG)},has:function(){return console.error(sG),!1},reset:function(){console.error(sG)}};function uG(e,t,n){void 0===n&&(n={});var r=null,o=0;return function(i){var a=Date.now();o||!1!==n.leading||(o=a);var s=t-(a-o),c=this,u=arguments;s<=0||s>t?(r&&(clearTimeout(r),r=null),o=a,e.apply(c,u)):r||!1===n.trailing||(r=setTimeout((function(){o=!1===n.leading?0:Date.now(),r=null,e.apply(c,u)}),s))}}function lG(e,t,n,r,o){void 0===o&&(o=window);var i=o.Object.getOwnPropertyDescriptor(e,t);return o.Object.defineProperty(e,t,r?n:{set:function(e){var t=this;setTimeout((function(){n.set.call(t,e)}),0),i&&i.set&&i.set.call(this,e)}}),function(){return lG(e,t,i||{},!0)}}function pG(e,t,n){try{if(!(t in e))return function(){};var r=e[t],o=n(r);return"function"==typeof o&&(o.prototype=o.prototype||{},Object.defineProperties(o,{__rrweb_original__:{enumerable:!1,value:r}})),e[t]=o,function(){e[t]=r}}catch(e){return function(){}}}function dG(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function fG(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function hG(e,t){if(!e)return!1;if(e.nodeType===e.ELEMENT_NODE){var n=!1;if("string"==typeof t){if(void 0!==e.closest)return null!==e.closest("."+t);n=e.classList.contains(t)}else e.classList.forEach((function(e){t.test(e)&&(n=!0)}));return n||hG(e.parentNode,t)}return e.nodeType,e.TEXT_NODE,hG(e.parentNode,t)}function mG(e){return"__sn"in e&&-2===e.__sn.id}function gG(e,t){if(CF(e))return!1;var n=t.getId(e);return!t.has(n)||(!e.parentNode||e.parentNode.nodeType!==e.DOCUMENT_NODE)&&(!e.parentNode||gG(e.parentNode,t))}function _G(e){return Boolean(e.changedTouches)}function yG(e){return"__sn"in e&&(e.__sn.type===RF.Element&&"iframe"===e.__sn.tagName)}function vG(e){return Boolean(null==e?void 0:e.shadowRoot)}function bG(e){return"__ln"in e}"undefined"!=typeof window&&window.Proxy&&window.Reflect&&(cG=new Proxy(cG,{get:function(e,t,n){return"map"===t&&console.error(sG),Reflect.get(e,t,n)}}));var EG=function(){function e(){this.length=0,this.head=null}return e.prototype.get=function(e){if(e>=this.length)throw new Error("Position outside of list range");for(var t=this.head,n=0;n<e;n++)t=(null==t?void 0:t.next)||null;return t},e.prototype.addNode=function(e){var t={value:e,previous:null,next:null};if(e.__ln=t,e.previousSibling&&bG(e.previousSibling)){var n=e.previousSibling.__ln.next;t.next=n,t.previous=e.previousSibling.__ln,e.previousSibling.__ln.next=t,n&&(n.previous=t)}else if(e.nextSibling&&bG(e.nextSibling)&&e.nextSibling.__ln.previous){n=e.nextSibling.__ln.previous;t.previous=n,t.next=e.nextSibling.__ln,e.nextSibling.__ln.previous=t,n&&(n.next=t)}else this.head&&(this.head.previous=t),t.next=this.head,this.head=t;this.length++},e.prototype.removeNode=function(e){var t=e.__ln;this.head&&(t.previous?(t.previous.next=t.next,t.next&&(t.next.previous=t.previous)):(this.head=t.next,this.head&&(this.head.previous=null)),e.__ln&&delete e.__ln,this.length--)},e}(),SG=function(e,t){return"".concat(e,"@").concat(t)};function TG(e){return"__sn"in e}var OG=function(){function e(){var e=this;this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=function(t){t.forEach(e.processMutation),e.emit()},this.emit=function(){var t,n,r,o;if(!e.frozen&&!e.locked){for(var i=[],a=new EG,s=function(t){for(var n=t,r=-2;-2===r;)r=(n=n&&n.nextSibling)&&e.mirror.getId(n);return r},c=function(t){for(var n,r,o,c,u,l=t.getRootNode?null===(n=t.getRootNode())||void 0===n?void 0:n.host:null,p=l;null===(o=null===(r=null==p?void 0:p.getRootNode)||void 0===r?void 0:r.call(p))||void 0===o?void 0:o.host;)p=(null===(u=null===(c=null==p?void 0:p.getRootNode)||void 0===c?void 0:c.call(p))||void 0===u?void 0:u.host)||null;var d=!(e.doc.contains(t)||null!==p&&e.doc.contains(p));if(t.parentNode&&!d){var f=CF(t.parentNode)?e.mirror.getId(l):e.mirror.getId(t.parentNode),h=s(t);if(-1===f||-1===h)return a.addNode(t);var m=iG(t,{doc:e.doc,map:e.mirror.map,blockClass:e.blockClass,blockSelector:e.blockSelector,maskTextClass:e.maskTextClass,maskTextSelector:e.maskTextSelector,skipChild:!0,inlineStylesheet:e.inlineStylesheet,maskInputOptions:e.maskInputOptions,maskTextFn:e.maskTextFn,maskInputFn:e.maskInputFn,slimDOMOptions:e.slimDOMOptions,recordCanvas:e.recordCanvas,inlineImages:e.inlineImages,onSerialize:function(n){yG(n)&&e.iframeManager.addIframe(n),vG(t)&&e.shadowDomManager.addShadowRoot(t.shadowRoot,document)},onIframeLoad:function(t,n){e.iframeManager.attachIframe(t,n),e.shadowDomManager.observeAttachShadow(t)}});m&&i.push({parentId:f,nextId:h,node:m})}};e.mapRemoves.length;)e.mirror.removeNodeFromMap(e.mapRemoves.shift());try{for(var u=IF(e.movedSet),l=u.next();!l.done;l=u.next()){var p=l.value;wG(e.removes,p,e.mirror)&&!e.movedSet.has(p.parentNode)||c(p)}}catch(e){t={error:e}}finally{try{l&&!l.done&&(n=u.return)&&n.call(u)}finally{if(t)throw t.error}}try{for(var d=IF(e.addedSet),f=d.next();!f.done;f=d.next()){p=f.value;RG(e.droppedSet,p)||wG(e.removes,p,e.mirror)?RG(e.movedSet,p)?c(p):e.droppedSet.add(p):c(p)}}catch(e){r={error:e}}finally{try{f&&!f.done&&(o=d.return)&&o.call(d)}finally{if(r)throw r.error}}for(var h=null;a.length;){var m=null;if(h){var g=e.mirror.getId(h.value.parentNode),_=s(h.value);-1!==g&&-1!==_&&(m=h)}if(!m)for(var y=a.length-1;y>=0;y--){var v=a.get(y);if(v){g=e.mirror.getId(v.value.parentNode),_=s(v.value);if(-1!==g&&-1!==_){m=v;break}}}if(!m){for(;a.head;)a.removeNode(a.head.value);break}h=m.previous,a.removeNode(m.value),c(m.value)}var b={texts:e.texts.map((function(t){return{id:e.mirror.getId(t.node),value:t.value}})).filter((function(t){return e.mirror.has(t.id)})),attributes:e.attributes.map((function(t){return{id:e.mirror.getId(t.node),attributes:t.attributes}})).filter((function(t){return e.mirror.has(t.id)})),removes:e.removes,adds:i};(b.texts.length||b.attributes.length||b.removes.length||b.adds.length)&&(e.texts=[],e.attributes=[],e.removes=[],e.addedSet=new Set,e.movedSet=new Set,e.droppedSet=new Set,e.movedMap={},e.mutationCb(b))}},this.processMutation=function(t){var n,r,o,i;if(!mG(t.target))switch(t.type){case"characterData":var a=t.target.textContent;hG(t.target,e.blockClass)||a===t.oldValue||e.texts.push({value:nG(t.target,e.maskTextClass,e.maskTextSelector)&&a?e.maskTextFn?e.maskTextFn(a):a.replace(/[\S]/g,"*"):a,node:t.target});break;case"attributes":var s=t.target;a=t.target.getAttribute(t.attributeName);if("value"===t.attributeName&&(a=MF({maskInputOptions:e.maskInputOptions,tagName:t.target.tagName,type:t.target.getAttribute("type"),value:a,maskInputFn:e.maskInputFn})),hG(t.target,e.blockClass)||a===t.oldValue)return;var c=e.attributes.find((function(e){return e.node===t.target}));if(c||(c={node:t.target,attributes:{}},e.attributes.push(c)),"style"===t.attributeName){var u=e.doc.createElement("span");t.oldValue&&u.setAttribute("style",t.oldValue),void 0!==c.attributes.style&&null!==c.attributes.style||(c.attributes.style={});var l=c.attributes.style;try{for(var p=IF(Array.from(s.style)),d=p.next();!d.done;d=p.next()){var f=d.value,h=s.style.getPropertyValue(f),m=s.style.getPropertyPriority(f);h===u.style.getPropertyValue(f)&&m===u.style.getPropertyPriority(f)||(l[f]=""===m?h:[h,m])}}catch(e){n={error:e}}finally{try{d&&!d.done&&(r=p.return)&&r.call(p)}finally{if(n)throw n.error}}try{for(var g=IF(Array.from(u.style)),_=g.next();!_.done;_=g.next()){f=_.value;""===s.style.getPropertyValue(f)&&(l[f]=!1)}}catch(e){o={error:e}}finally{try{_&&!_.done&&(i=g.return)&&i.call(g)}finally{if(o)throw o.error}}}else c.attributes[t.attributeName]=tG(e.doc,t.target.tagName,t.attributeName,a);break;case"childList":t.addedNodes.forEach((function(n){return e.genAdds(n,t.target)})),t.removedNodes.forEach((function(n){var r=e.mirror.getId(n),o=CF(t.target)?e.mirror.getId(t.target.host):e.mirror.getId(t.target);hG(t.target,e.blockClass)||mG(n)||(e.addedSet.has(n)?(AG(e.addedSet,n),e.droppedSet.add(n)):e.addedSet.has(t.target)&&-1===r||gG(t.target,e.mirror)||(e.movedSet.has(n)&&e.movedMap[SG(r,o)]?AG(e.movedSet,n):e.removes.push({parentId:o,id:r,isShadow:!!CF(t.target)||void 0})),e.mapRemoves.push(n))}))}},this.genAdds=function(t,n){if(!n||!hG(n,e.blockClass)){if(TG(t)){if(mG(t))return;e.movedSet.add(t);var r=null;n&&TG(n)&&(r=n.__sn.id),r&&(e.movedMap[SG(t.__sn.id,r)]=!0)}else e.addedSet.add(t),e.droppedSet.delete(t);hG(t,e.blockClass)||t.childNodes.forEach((function(t){return e.genAdds(t)}))}}}return e.prototype.init=function(e){var t=this;["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","recordCanvas","inlineImages","slimDOMOptions","doc","mirror","iframeManager","shadowDomManager","canvasManager"].forEach((function(n){t[n]=e[n]}))},e.prototype.freeze=function(){this.frozen=!0,this.canvasManager.freeze()},e.prototype.unfreeze=function(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()},e.prototype.isFrozen=function(){return this.frozen},e.prototype.lock=function(){this.locked=!0,this.canvasManager.lock()},e.prototype.unlock=function(){this.locked=!1,this.canvasManager.unlock(),this.emit()},e.prototype.reset=function(){this.shadowDomManager.reset(),this.canvasManager.reset()},e}();function AG(e,t){e.delete(t),t.childNodes.forEach((function(t){return AG(e,t)}))}function wG(e,t,n){var r=t.parentNode;if(!r)return!1;var o=n.getId(r);return!!e.some((function(e){return e.id===o}))||wG(e,r,n)}function RG(e,t){var n=t.parentNode;return!!n&&(!!e.has(n)||RG(e,n))}var NG=[],IG="undefined"!=typeof CSSGroupingRule,PG="undefined"!=typeof CSSMediaRule,xG="undefined"!=typeof CSSSupportsRule,CG="undefined"!=typeof CSSConditionRule;function MG(e){try{if("composedPath"in e){var t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0];return e.target}catch(t){return e.target}}function LG(e,t){var n,r,o=new OG;NG.push(o),o.init(e);var i=window.MutationObserver||window.__rrMutationObserver,a=null===(r=null===(n=null===window||void 0===window?void 0:window.Zone)||void 0===n?void 0:n.__symbol__)||void 0===r?void 0:r.call(n,"MutationObserver");a&&window[a]&&(i=window[a]);var s=new i(o.processMutations.bind(o));return s.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),s}function UG(e){var t=e.mouseInteractionCb,n=e.doc,r=e.mirror,o=e.blockClass,i=e.sampling;if(!1===i.mouseInteraction)return function(){};var a=!0===i.mouseInteraction||void 0===i.mouseInteraction?{}:i.mouseInteraction,s=[];return Object.keys(KF).filter((function(e){return Number.isNaN(Number(e))&&!e.endsWith("_Departed")&&!1!==a[e]})).forEach((function(e){var i=e.toLowerCase(),a=function(e){return function(n){var i=MG(n);if(!hG(i,o)){var a=_G(n)?n.changedTouches[0]:n;if(a){var s=r.getId(i),c=a.clientX,u=a.clientY;t({type:KF[e],id:s,x:c,y:u})}}}}(e);s.push(aG(i,a,n))})),function(){s.forEach((function(e){return e()}))}}function kG(e){var t=e.scrollCb,n=e.doc,r=e.mirror,o=e.blockClass;return aG("scroll",uG((function(e){var i=MG(e);if(i&&!hG(i,o)){var a=r.getId(i);if(i===n){var s=n.scrollingElement||n.documentElement;t({id:a,x:s.scrollLeft,y:s.scrollTop})}else t({id:a,x:i.scrollLeft,y:i.scrollTop})}}),e.sampling.scroll||100),n)}function DG(e,t){var n=NF({},e);return t||delete n.userTriggered,n}var jG=["INPUT","TEXTAREA","SELECT"],BG=new WeakMap;function VG(e){return function(e,t){if(IG&&e.parentRule instanceof CSSGroupingRule||PG&&e.parentRule instanceof CSSMediaRule||xG&&e.parentRule instanceof CSSSupportsRule||CG&&e.parentRule instanceof CSSConditionRule){var n=Array.from(e.parentRule.cssRules).indexOf(e);t.unshift(n)}else{n=Array.from(e.parentStyleSheet.cssRules).indexOf(e);t.unshift(n)}return t}(e,[])}function FG(e,t){var n,r;void 0===t&&(t={});var o=e.doc.defaultView;if(!o)return function(){};!function(e,t){var n=e.mutationCb,r=e.mousemoveCb,o=e.mouseInteractionCb,i=e.scrollCb,a=e.viewportResizeCb,s=e.inputCb,c=e.mediaInteractionCb,u=e.styleSheetRuleCb,l=e.styleDeclarationCb,p=e.canvasMutationCb,d=e.fontCb;e.mutationCb=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];t.mutation&&t.mutation.apply(t,xF([],PF(e),!1)),n.apply(void 0,xF([],PF(e),!1))},e.mousemoveCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.mousemove&&t.mousemove.apply(t,xF([],PF(e),!1)),r.apply(void 0,xF([],PF(e),!1))},e.mouseInteractionCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.mouseInteraction&&t.mouseInteraction.apply(t,xF([],PF(e),!1)),o.apply(void 0,xF([],PF(e),!1))},e.scrollCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.scroll&&t.scroll.apply(t,xF([],PF(e),!1)),i.apply(void 0,xF([],PF(e),!1))},e.viewportResizeCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.viewportResize&&t.viewportResize.apply(t,xF([],PF(e),!1)),a.apply(void 0,xF([],PF(e),!1))},e.inputCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.input&&t.input.apply(t,xF([],PF(e),!1)),s.apply(void 0,xF([],PF(e),!1))},e.mediaInteractionCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.mediaInteaction&&t.mediaInteaction.apply(t,xF([],PF(e),!1)),c.apply(void 0,xF([],PF(e),!1))},e.styleSheetRuleCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.styleSheetRule&&t.styleSheetRule.apply(t,xF([],PF(e),!1)),u.apply(void 0,xF([],PF(e),!1))},e.styleDeclarationCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.styleDeclaration&&t.styleDeclaration.apply(t,xF([],PF(e),!1)),l.apply(void 0,xF([],PF(e),!1))},e.canvasMutationCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.canvasMutation&&t.canvasMutation.apply(t,xF([],PF(e),!1)),p.apply(void 0,xF([],PF(e),!1))},e.fontCb=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.font&&t.font.apply(t,xF([],PF(e),!1)),d.apply(void 0,xF([],PF(e),!1))}}(e,t);var i=LG(e,e.doc),a=function(e){var t=e.mousemoveCb,n=e.sampling,r=e.doc,o=e.mirror;if(!1===n.mousemove)return function(){};var i,a="number"==typeof n.mousemove?n.mousemove:50,s="number"==typeof n.mousemoveCallback?n.mousemoveCallback:500,c=[],u=uG((function(e){var n=Date.now()-i;t(c.map((function(e){return e.timeOffset-=n,e})),e),c=[],i=null}),s),l=uG((function(e){var t=MG(e),n=_G(e)?e.changedTouches[0]:e,r=n.clientX,a=n.clientY;i||(i=Date.now()),c.push({x:r,y:a,id:o.getId(t),timeOffset:Date.now()-i}),u("undefined"!=typeof DragEvent&&e instanceof DragEvent?zF.Drag:e instanceof MouseEvent?zF.MouseMove:zF.TouchMove)}),a,{trailing:!1}),p=[aG("mousemove",l,r),aG("touchmove",l,r),aG("drag",l,r)];return function(){p.forEach((function(e){return e()}))}}(e),s=UG(e),c=kG(e),u=function(e){var t=e.viewportResizeCb,n=-1,r=-1;return aG("resize",uG((function(){var e=dG(),o=fG();n===e&&r===o||(t({width:Number(o),height:Number(e)}),n=e,r=o)}),200),window)}(e),l=function(e){var t=e.inputCb,n=e.doc,r=e.mirror,o=e.blockClass,i=e.ignoreClass,a=e.maskInputOptions,s=e.maskInputFn,c=e.sampling,u=e.userTriggeredOnInput;function l(e){var t=MG(e),r=e.isTrusted;if(t&&"OPTION"===t.tagName&&(t=t.parentElement),t&&t.tagName&&!(jG.indexOf(t.tagName)<0)&&!hG(t,o)){var c=t.type;if(!t.classList.contains(i)){var l=t.value,d=!1;"radio"===c||"checkbox"===c?d=t.checked:(a[t.tagName.toLowerCase()]||a[c])&&(l=MF({maskInputOptions:a,tagName:t.tagName,type:c,value:l,maskInputFn:s})),p(t,DG({text:l,isChecked:d,userTriggered:r},u));var f=t.name;"radio"===c&&f&&d&&n.querySelectorAll('input[type="radio"][name="'.concat(f,'"]')).forEach((function(e){e!==t&&p(e,DG({text:e.value,isChecked:!d,userTriggered:!1},u))}))}}}function p(e,n){var o=BG.get(e);if(!o||o.text!==n.text||o.isChecked!==n.isChecked){BG.set(e,n);var i=r.getId(e);t(NF(NF({},n),{id:i}))}}var d=("last"===c.input?["change"]:["input","change"]).map((function(e){return aG(e,l,n)})),f=Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value"),h=[[HTMLInputElement.prototype,"value"],[HTMLInputElement.prototype,"checked"],[HTMLSelectElement.prototype,"value"],[HTMLTextAreaElement.prototype,"value"],[HTMLSelectElement.prototype,"selectedIndex"],[HTMLOptionElement.prototype,"selected"]];return f&&f.set&&d.push.apply(d,xF([],PF(h.map((function(e){return lG(e[0],e[1],{set:function(){l({target:this})}})}))),!1)),function(){d.forEach((function(e){return e()}))}}(e),p=function(e){var t=e.mediaInteractionCb,n=e.blockClass,r=e.mirror,o=e.sampling,i=function(e){return uG((function(o){var i=MG(o);if(i&&!hG(i,n)){var a=i,s=a.currentTime,c=a.volume,u=a.muted;t({type:e,id:r.getId(i),currentTime:s,volume:c,muted:u})}}),o.media||500)},a=[aG("play",i(0)),aG("pause",i(1)),aG("seeked",i(2)),aG("volumechange",i(3))];return function(){a.forEach((function(e){return e()}))}}(e),d=function(e,t){var n=e.styleSheetRuleCb,r=e.mirror,o=t.win,i=o.CSSStyleSheet.prototype.insertRule;o.CSSStyleSheet.prototype.insertRule=function(e,t){var o=r.getId(this.ownerNode);return-1!==o&&n({id:o,adds:[{rule:e,index:t}]}),i.apply(this,arguments)};var a=o.CSSStyleSheet.prototype.deleteRule;o.CSSStyleSheet.prototype.deleteRule=function(e){var t=r.getId(this.ownerNode);return-1!==t&&n({id:t,removes:[{index:e}]}),a.apply(this,arguments)};var s={};IG?s.CSSGroupingRule=o.CSSGroupingRule:(PG&&(s.CSSMediaRule=o.CSSMediaRule),CG&&(s.CSSConditionRule=o.CSSConditionRule),xG&&(s.CSSSupportsRule=o.CSSSupportsRule));var c={};return Object.entries(s).forEach((function(e){var t=PF(e,2),o=t[0],i=t[1];c[o]={insertRule:i.prototype.insertRule,deleteRule:i.prototype.deleteRule},i.prototype.insertRule=function(e,t){var i=r.getId(this.parentStyleSheet.ownerNode);return-1!==i&&n({id:i,adds:[{rule:e,index:xF(xF([],PF(VG(this)),!1),[t||0],!1)}]}),c[o].insertRule.apply(this,arguments)},i.prototype.deleteRule=function(e){var t=r.getId(this.parentStyleSheet.ownerNode);return-1!==t&&n({id:t,removes:[{index:xF(xF([],PF(VG(this)),!1),[e],!1)}]}),c[o].deleteRule.apply(this,arguments)}})),function(){o.CSSStyleSheet.prototype.insertRule=i,o.CSSStyleSheet.prototype.deleteRule=a,Object.entries(s).forEach((function(e){var t=PF(e,2),n=t[0],r=t[1];r.prototype.insertRule=c[n].insertRule,r.prototype.deleteRule=c[n].deleteRule}))}}(e,{win:o}),f=function(e,t){var n=e.styleDeclarationCb,r=e.mirror,o=t.win,i=o.CSSStyleDeclaration.prototype.setProperty;o.CSSStyleDeclaration.prototype.setProperty=function(e,t,o){var a,s,c=r.getId(null===(s=null===(a=this.parentRule)||void 0===a?void 0:a.parentStyleSheet)||void 0===s?void 0:s.ownerNode);return-1!==c&&n({id:c,set:{property:e,value:t,priority:o},index:VG(this.parentRule)}),i.apply(this,arguments)};var a=o.CSSStyleDeclaration.prototype.removeProperty;return o.CSSStyleDeclaration.prototype.removeProperty=function(e){var t,o,i=r.getId(null===(o=null===(t=this.parentRule)||void 0===t?void 0:t.parentStyleSheet)||void 0===o?void 0:o.ownerNode);return-1!==i&&n({id:i,remove:{property:e},index:VG(this.parentRule)}),a.apply(this,arguments)},function(){o.CSSStyleDeclaration.prototype.setProperty=i,o.CSSStyleDeclaration.prototype.removeProperty=a}}(e,{win:o}),h=e.collectFonts?function(e){var t=e.fontCb,n=e.doc,r=n.defaultView;if(!r)return function(){};var o=[],i=new WeakMap,a=r.FontFace;r.FontFace=function(e,t,n){var r=new a(e,t,n);return i.set(r,{family:e,buffer:"string"!=typeof t,descriptors:n,fontSource:"string"==typeof t?t:JSON.stringify(Array.from(new Uint8Array(t)))}),r};var s=pG(n.fonts,"add",(function(e){return function(n){return setTimeout((function(){var e=i.get(n);e&&(t(e),i.delete(n))}),0),e.apply(this,[n])}}));return o.push((function(){r.FontFace=a})),o.push(s),function(){o.forEach((function(e){return e()}))}}(e):function(){},m=[];try{for(var g=IF(e.plugins),_=g.next();!_.done;_=g.next()){var y=_.value;m.push(y.observer(y.callback,o,y.options))}}catch(e){n={error:e}}finally{try{_&&!_.done&&(r=g.return)&&r.call(g)}finally{if(n)throw n.error}}return function(){NG.forEach((function(e){return e.reset()})),i.disconnect(),a(),s(),c(),u(),l(),p(),d(),f(),h(),m.forEach((function(e){return e()}))}}var GG=function(){function e(e){this.iframes=new WeakMap,this.mutationCb=e.mutationCb}return e.prototype.addIframe=function(e){this.iframes.set(e,!0)},e.prototype.addLoadListener=function(e){this.loadListener=e},e.prototype.attachIframe=function(e,t){var n;this.mutationCb({adds:[{parentId:e.__sn.id,nextId:null,node:t}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),null===(n=this.loadListener)||void 0===n||n.call(this,e)},e}(),HG=function(){function e(e){this.restorePatches=[],this.mutationCb=e.mutationCb,this.scrollCb=e.scrollCb,this.bypassOptions=e.bypassOptions,this.mirror=e.mirror;var t=this;this.restorePatches.push(pG(HTMLElement.prototype,"attachShadow",(function(e){return function(){var n=e.apply(this,arguments);return this.shadowRoot&&t.addShadowRoot(this.shadowRoot,this.ownerDocument),n}})))}return e.prototype.addShadowRoot=function(e,t){LG(NF(NF({},this.bypassOptions),{doc:t,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),e),kG(NF(NF({},this.bypassOptions),{scrollCb:this.scrollCb,doc:e,mirror:this.mirror}))},e.prototype.observeAttachShadow=function(e){if(e.contentWindow){var t=this;this.restorePatches.push(pG(e.contentWindow.HTMLElement.prototype,"attachShadow",(function(n){return function(){var r=n.apply(this,arguments);return this.shadowRoot&&t.addShadowRoot(this.shadowRoot,e.contentDocument),r}})))}},e.prototype.reset=function(){this.restorePatches.forEach((function(e){return e()}))},e}();for(var YG="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",qG="undefined"==typeof Uint8Array?[]:new Uint8Array(256),zG=0;zG<64;zG++)qG[YG.charCodeAt(zG)]=zG;var KG=new Map;var WG=function(e,t,n){if(e&&(JG(e,t)||"object"==typeof e)){var r=function(e,t){var n=KG.get(e);return n||(n=new Map,KG.set(e,n)),n.has(t)||n.set(t,[]),n.get(t)}(n,e.constructor.name),o=r.indexOf(e);return-1===o&&(o=r.length,r.push(e)),o}};function QG(e,t,n){if(e instanceof Array)return e.map((function(e){return QG(e,t,n)}));if(null===e)return e;if(e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray)return{rr_type:e.constructor.name,args:[Object.values(e)]};if(e instanceof ArrayBuffer){var r=e.constructor.name,o=function(e){var t,n=new Uint8Array(e),r=n.length,o="";for(t=0;t<r;t+=3)o+=YG[n[t]>>2],o+=YG[(3&n[t])<<4|n[t+1]>>4],o+=YG[(15&n[t+1])<<2|n[t+2]>>6],o+=YG[63&n[t+2]];return r%3==2?o=o.substring(0,o.length-1)+"=":r%3==1&&(o=o.substring(0,o.length-2)+"=="),o}(e);return{rr_type:r,base64:o}}return e instanceof DataView?{rr_type:e.constructor.name,args:[QG(e.buffer,t,n),e.byteOffset,e.byteLength]}:e instanceof HTMLImageElement?{rr_type:e.constructor.name,src:e.src}:e instanceof ImageData?{rr_type:e.constructor.name,args:[QG(e.data,t,n),e.width,e.height]}:JG(e,t)||"object"==typeof e?{rr_type:e.constructor.name,index:WG(e,t,n)}:e}var JG=function(e,t){var n=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter((function(e){return"function"==typeof t[e]}));return Boolean(n.find((function(n){return e instanceof t[n]})))};function $G(e,t,n,r,o,i){var a,s,c=[],u=Object.getOwnPropertyNames(e),l=function(a){try{if("function"!=typeof e[a])return"continue";var s=pG(e,a,(function(s){return function(){for(var c=[],u=0;u<arguments.length;u++)c[u]=arguments[u];var l=s.apply(this,c);if(WG(l,i,e),!hG(this.canvas,r)){o.getId(this.canvas);var p=function(e,t,n){return xF([],PF(e),!1).map((function(e){return QG(e,t,n)}))}(xF([],PF(c),!1),i,e),d={type:t,property:a,args:p};n(this.canvas,d)}return l}}));c.push(s)}catch(r){var u=lG(e,a,{set:function(e){n(this.canvas,{type:t,property:a,args:[e],setter:!0})}});c.push(u)}};try{for(var p=IF(u),d=p.next();!d.done;d=p.next()){l(d.value)}}catch(e){a={error:e}}finally{try{d&&!d.done&&(s=p.return)&&s.call(p)}finally{if(a)throw a.error}}return c}var XG,ZG,eH=function(){function e(e){this.pendingCanvasMutations=new Map,this.rafStamps={latestId:0,invokeId:null},this.frozen=!1,this.locked=!1,this.processMutation=function(e,t){!(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId)&&this.rafStamps.invokeId||(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(e)||this.pendingCanvasMutations.set(e,[]),this.pendingCanvasMutations.get(e).push(t)},this.mutationCb=e.mutationCb,this.mirror=e.mirror,!0===e.recordCanvas&&this.initCanvasMutationObserver(e.win,e.blockClass)}return e.prototype.reset=function(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()},e.prototype.freeze=function(){this.frozen=!0},e.prototype.unfreeze=function(){this.frozen=!1},e.prototype.lock=function(){this.locked=!0},e.prototype.unlock=function(){this.locked=!1},e.prototype.initCanvasMutationObserver=function(e,t){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();var n=function(e,t){var n=[];try{var r=pG(e.HTMLCanvasElement.prototype,"getContext",(function(e){return function(n){for(var r=[],o=1;o<arguments.length;o++)r[o-1]=arguments[o];return hG(this,t)||"__context"in this||(this.__context=n),e.apply(this,xF([n],PF(r),!1))}}));n.push(r)}catch(e){console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return function(){n.forEach((function(e){return e()}))}}(e,t),r=function(e,t,n){var r,o,i=[],a=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype),s=function(r){try{if("function"!=typeof t.CanvasRenderingContext2D.prototype[r])return"continue";var o=pG(t.CanvasRenderingContext2D.prototype,r,(function(t){return function(){for(var o=this,i=[],a=0;a<arguments.length;a++)i[a]=arguments[a];return hG(this.canvas,n)||setTimeout((function(){var t=xF([],PF(i),!1);if("drawImage"===r&&t[0]&&t[0]instanceof HTMLCanvasElement){var n=t[0],a=n.getContext("2d"),s=null==a?void 0:a.getImageData(0,0,n.width,n.height),c=null==s?void 0:s.data;t[0]=JSON.stringify(c)}e(o.canvas,{type:WF["2D"],property:r,args:t})}),0),t.apply(this,i)}}));i.push(o)}catch(n){var a=lG(t.CanvasRenderingContext2D.prototype,r,{set:function(t){e(this.canvas,{type:WF["2D"],property:r,args:[t],setter:!0})}});i.push(a)}};try{for(var c=IF(a),u=c.next();!u.done;u=c.next())s(u.value)}catch(e){r={error:e}}finally{try{u&&!u.done&&(o=c.return)&&o.call(c)}finally{if(r)throw r.error}}return function(){i.forEach((function(e){return e()}))}}(this.processMutation.bind(this),e,t,this.mirror),o=function(e,t,n,r){var o=[];return o.push.apply(o,xF([],PF($G(t.WebGLRenderingContext.prototype,WF.WebGL,e,n,r,t)),!1)),void 0!==t.WebGL2RenderingContext&&o.push.apply(o,xF([],PF($G(t.WebGL2RenderingContext.prototype,WF.WebGL2,e,n,r,t)),!1)),function(){o.forEach((function(e){return e()}))}}(this.processMutation.bind(this),e,t,this.mirror);this.resetObservers=function(){n(),r(),o()}},e.prototype.startPendingCanvasMutationFlusher=function(){var e=this;requestAnimationFrame((function(){return e.flushPendingCanvasMutations()}))},e.prototype.startRAFTimestamping=function(){var e=this,t=function(n){e.rafStamps.latestId=n,requestAnimationFrame(t)};requestAnimationFrame(t)},e.prototype.flushPendingCanvasMutations=function(){var e=this;this.pendingCanvasMutations.forEach((function(t,n){var r=e.mirror.getId(n);e.flushPendingCanvasMutationFor(n,r)})),requestAnimationFrame((function(){return e.flushPendingCanvasMutations()}))},e.prototype.flushPendingCanvasMutationFor=function(e,t){if(!this.frozen&&!this.locked){var n=this.pendingCanvasMutations.get(e);if(n&&-1!==t){var r=n.map((function(e){e.type;var t=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(e,["type"]);return t})),o=n[0].type;this.mutationCb({id:t,type:o,commands:r}),this.pendingCanvasMutations.delete(e)}}},e}();function tH(e){return NF(NF({},e),{timestamp:Date.now()})}var nH={map:{},getId:function(e){return e&&e.__sn?e.__sn.id:-1},getNode:function(e){return this.map[e]||null},removeNodeFromMap:function(e){var t=this,n=e.__sn&&e.__sn.id;delete this.map[n],e.childNodes&&e.childNodes.forEach((function(e){return t.removeNodeFromMap(e)}))},has:function(e){return this.map.hasOwnProperty(e)},reset:function(){this.map={}}};function rH(e){void 0===e&&(e={});var t=e.emit,n=e.checkoutEveryNms,r=e.checkoutEveryNth,o=e.blockClass,i=void 0===o?"rr-block":o,a=e.blockSelector,s=void 0===a?null:a,c=e.ignoreClass,u=void 0===c?"rr-ignore":c,l=e.maskTextClass,p=void 0===l?"rr-mask":l,d=e.maskTextSelector,f=void 0===d?null:d,h=e.inlineStylesheet,m=void 0===h||h,g=e.maskAllInputs,_=e.maskInputOptions,y=e.slimDOMOptions,v=e.maskInputFn,b=e.maskTextFn,E=e.hooks,S=e.packFn,T=e.sampling,O=void 0===T?{}:T,A=e.mousemoveWait,w=e.recordCanvas,R=void 0!==w&&w,N=e.userTriggeredOnInput,I=void 0!==N&&N,P=e.collectFonts,x=void 0!==P&&P,C=e.inlineImages,M=void 0!==C&&C,L=e.plugins,U=e.keepIframeSrcFn,k=void 0===U?function(){return!1}:U;if(!t)throw new Error("emit function is required");void 0!==A&&void 0===O.mousemove&&(O.mousemove=A);var D,j,B=!0===g?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:void 0!==_?_:{password:!0},V=!0===y||"all"===y?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:"all"===y,headMetaDescKeywords:"all"===y}:y||{};void 0===D&&(D=window),"NodeList"in D&&!D.NodeList.prototype.forEach&&(D.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in D&&!D.DOMTokenList.prototype.forEach&&(D.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=function(e){if(!(0 in arguments))throw new TypeError("1 argument is required");do{if(this===e)return!0}while(e=e&&e.parentNode);return!1});var F=0;XG=function(e,o){var i;if(!(null===(i=NG[0])||void 0===i?void 0:i.isFrozen())||e.type===qF.FullSnapshot||e.type===qF.IncrementalSnapshot&&e.data.source===zF.Mutation||NG.forEach((function(e){return e.unfreeze()})),t(function(e){var t,n;try{for(var r=IF(L||[]),o=r.next();!o.done;o=r.next()){var i=o.value;i.eventProcessor&&(e=i.eventProcessor(e))}}catch(e){t={error:e}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(t)throw t.error}}return S&&(e=S(e)),e}(e),o),e.type===qF.FullSnapshot)j=e,F=0;else if(e.type===qF.IncrementalSnapshot){if(e.data.source===zF.Mutation&&e.data.isAttachIframe)return;F++;var a=r&&F>=r,s=n&&e.timestamp-j.timestamp>n;(a||s)&&ZG(!0)}};var G=function(e){XG(tH({type:qF.IncrementalSnapshot,data:NF({source:zF.Mutation},e)}))},H=function(e){return XG(tH({type:qF.IncrementalSnapshot,data:NF({source:zF.Scroll},e)}))},Y=function(e){return XG(tH({type:qF.IncrementalSnapshot,data:NF({source:zF.CanvasMutation},e)}))},q=new GG({mutationCb:G}),z=new eH({recordCanvas:R,mutationCb:Y,win:window,blockClass:i,mirror:nH}),K=new HG({mutationCb:G,scrollCb:H,bypassOptions:{blockClass:i,blockSelector:s,maskTextClass:p,maskTextSelector:f,inlineStylesheet:m,maskInputOptions:B,maskTextFn:b,maskInputFn:v,recordCanvas:R,inlineImages:M,sampling:O,slimDOMOptions:V,iframeManager:q,canvasManager:z},mirror:nH});ZG=function(e){var t,n,r,o;void 0===e&&(e=!1),XG(tH({type:qF.Meta,data:{href:window.location.href,width:fG(),height:dG()}}),e),NG.forEach((function(e){return e.lock()}));var a=PF(function(e,t){var n=t||{},r=n.blockClass,o=void 0===r?"rr-block":r,i=n.blockSelector,a=void 0===i?null:i,s=n.maskTextClass,c=void 0===s?"rr-mask":s,u=n.maskTextSelector,l=void 0===u?null:u,p=n.inlineStylesheet,d=void 0===p||p,f=n.inlineImages,h=void 0!==f&&f,m=n.recordCanvas,g=void 0!==m&&m,_=n.maskAllInputs,y=void 0!==_&&_,v=n.maskTextFn,b=n.maskInputFn,E=n.slimDOM,S=void 0!==E&&E,T=n.dataURLOptions,O=n.preserveWhiteSpace,A=n.onSerialize,w=n.onIframeLoad,R=n.iframeLoadTimeout,N=n.keepIframeSrcFn,I={};return[iG(e,{doc:e,map:I,blockClass:o,blockSelector:a,maskTextClass:c,maskTextSelector:l,skipChild:!1,inlineStylesheet:d,maskInputOptions:!0===y?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:!1===y?{password:!0}:y,maskTextFn:v,maskInputFn:b,slimDOMOptions:!0===S||"all"===S?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:"all"===S,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:!1===S?{}:S,dataURLOptions:T,inlineImages:h,recordCanvas:g,preserveWhiteSpace:O,onSerialize:A,onIframeLoad:w,iframeLoadTimeout:R,keepIframeSrcFn:void 0===N?function(){return!1}:N}),I]}(document,{blockClass:i,blockSelector:s,maskTextClass:p,maskTextSelector:f,inlineStylesheet:m,maskAllInputs:B,maskTextFn:b,slimDOM:V,recordCanvas:R,inlineImages:M,onSerialize:function(e){yG(e)&&q.addIframe(e),vG(e)&&K.addShadowRoot(e.shadowRoot,document)},onIframeLoad:function(e,t){q.attachIframe(e,t),K.observeAttachShadow(e)},keepIframeSrcFn:k}),2),c=a[0],u=a[1];if(!c)return console.warn("Failed to snapshot the document");nH.map=u,XG(tH({type:qF.FullSnapshot,data:{node:c,initialOffset:{left:void 0!==window.pageXOffset?window.pageXOffset:(null===document||void 0===document?void 0:document.documentElement.scrollLeft)||(null===(n=null===(t=null===document||void 0===document?void 0:document.body)||void 0===t?void 0:t.parentElement)||void 0===n?void 0:n.scrollLeft)||(null===document||void 0===document?void 0:document.body.scrollLeft)||0,top:void 0!==window.pageYOffset?window.pageYOffset:(null===document||void 0===document?void 0:document.documentElement.scrollTop)||(null===(o=null===(r=null===document||void 0===document?void 0:document.body)||void 0===r?void 0:r.parentElement)||void 0===o?void 0:o.scrollTop)||(null===document||void 0===document?void 0:document.body.scrollTop)||0}}})),NG.forEach((function(e){return e.unlock()}))};try{var W=[];W.push(aG("DOMContentLoaded",(function(){XG(tH({type:qF.DomContentLoaded,data:{}}))})));var Q=function(e){var t;return FG({mutationCb:G,mousemoveCb:function(e,t){return XG(tH({type:qF.IncrementalSnapshot,data:{source:t,positions:e}}))},mouseInteractionCb:function(e){return XG(tH({type:qF.IncrementalSnapshot,data:NF({source:zF.MouseInteraction},e)}))},scrollCb:H,viewportResizeCb:function(e){return XG(tH({type:qF.IncrementalSnapshot,data:NF({source:zF.ViewportResize},e)}))},inputCb:function(e){return XG(tH({type:qF.IncrementalSnapshot,data:NF({source:zF.Input},e)}))},mediaInteractionCb:function(e){return XG(tH({type:qF.IncrementalSnapshot,data:NF({source:zF.MediaInteraction},e)}))},styleSheetRuleCb:function(e){return XG(tH({type:qF.IncrementalSnapshot,data:NF({source:zF.StyleSheetRule},e)}))},styleDeclarationCb:function(e){return XG(tH({type:qF.IncrementalSnapshot,data:NF({source:zF.StyleDeclaration},e)}))},canvasMutationCb:Y,fontCb:function(e){return XG(tH({type:qF.IncrementalSnapshot,data:NF({source:zF.Font},e)}))},blockClass:i,ignoreClass:u,maskTextClass:p,maskTextSelector:f,maskInputOptions:B,inlineStylesheet:m,sampling:O,recordCanvas:R,inlineImages:M,userTriggeredOnInput:I,collectFonts:x,doc:e,maskInputFn:v,maskTextFn:b,blockSelector:s,slimDOMOptions:V,mirror:nH,iframeManager:q,shadowDomManager:K,canvasManager:z,plugins:(null===(t=null==L?void 0:L.filter((function(e){return e.observer})))||void 0===t?void 0:t.map((function(e){return{observer:e.observer,options:e.options,callback:function(t){return XG(tH({type:qF.Plugin,data:{plugin:e.name,payload:t}}))}}})))||[]},E)};q.addLoadListener((function(e){W.push(Q(e.contentDocument))}));var J=function(){ZG(),W.push(Q(document))};return"interactive"===document.readyState||"complete"===document.readyState?J():W.push(aG("load",(function(){XG(tH({type:qF.Load,data:{}})),J()}),window)),function(){W.forEach((function(e){return e()}))}}catch(e){console.warn(e)}}rH.addCustomEvent=function(e,t){if(!XG)throw new Error("please add custom event after start recording");XG(tH({type:qF.Custom,data:{tag:e,payload:t}}))},rH.freezePage=function(){NG.forEach((function(e){return e.freeze()}))},rH.takeFullSnapshot=function(e){if(!ZG)throw new Error("please take full snapshot after start recording");ZG(e)},rH.mirror=nH;var oH=Uint8Array,iH=Uint16Array,aH=Uint32Array,sH=new oH([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),cH=new oH([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),uH=new oH([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),lH=function(e,t){for(var n=new iH(31),r=0;r<31;++r)n[r]=t+=1<<e[r-1];var o=new aH(n[30]);for(r=1;r<30;++r)for(var i=n[r];i<n[r+1];++i)o[i]=i-n[r]<<5|r;return[n,o]},pH=lH(sH,2),dH=pH[0],fH=pH[1];dH[28]=258,fH[258]=28;for(var hH=lH(cH,0)[1],mH=new iH(32768),gH=0;gH<32768;++gH){var _H=(43690&gH)>>>1|(21845&gH)<<1;_H=(61680&(_H=(52428&_H)>>>2|(13107&_H)<<2))>>>4|(3855&_H)<<4,mH[gH]=((65280&_H)>>>8|(255&_H)<<8)>>>1}var yH=function(e,t,n){for(var r=e.length,o=0,i=new iH(t);o<r;++o)e[o]&&++i[e[o]-1];var a,s=new iH(t);for(o=0;o<t;++o)s[o]=s[o-1]+i[o-1]<<1;if(n){a=new iH(1<<t);var c=15-t;for(o=0;o<r;++o)if(e[o])for(var u=o<<4|e[o],l=t-e[o],p=s[e[o]-1]++<<l,d=p|(1<<l)-1;p<=d;++p)a[mH[p]>>>c]=u}else for(a=new iH(r),o=0;o<r;++o)e[o]&&(a[o]=mH[s[e[o]-1]++]>>>15-e[o]);return a},vH=new oH(288);for(gH=0;gH<144;++gH)vH[gH]=8;for(gH=144;gH<256;++gH)vH[gH]=9;for(gH=256;gH<280;++gH)vH[gH]=7;for(gH=280;gH<288;++gH)vH[gH]=8;var bH=new oH(32);for(gH=0;gH<32;++gH)bH[gH]=5;var EH=yH(vH,9,0),SH=yH(bH,5,0),TH=function(e){return(e+7)/8|0},OH=function(e,t,n){n<<=7&t;var r=t/8|0;e[r]|=n,e[r+1]|=n>>>8},AH=function(e,t,n){n<<=7&t;var r=t/8|0;e[r]|=n,e[r+1]|=n>>>8,e[r+2]|=n>>>16},wH=function(e,t){for(var n=[],r=0;r<e.length;++r)e[r]&&n.push({s:r,f:e[r]});var o=n.length,i=n.slice();if(!o)return[MH,0];if(1==o){var a=new oH(n[0].s+1);return a[n[0].s]=1,[a,1]}n.sort((function(e,t){return e.f-t.f})),n.push({s:-1,f:25001});var s=n[0],c=n[1],u=0,l=1,p=2;for(n[0]={s:-1,f:s.f+c.f,l:s,r:c};l!=o-1;)s=n[n[u].f<n[p].f?u++:p++],c=n[u!=l&&n[u].f<n[p].f?u++:p++],n[l++]={s:-1,f:s.f+c.f,l:s,r:c};var d=i[0].s;for(r=1;r<o;++r)i[r].s>d&&(d=i[r].s);var f=new iH(d+1),h=RH(n[l-1],f,0);if(h>t){r=0;var m=0,g=h-t,_=1<<g;for(i.sort((function(e,t){return f[t.s]-f[e.s]||e.f-t.f}));r<o;++r){var y=i[r].s;if(!(f[y]>t))break;m+=_-(1<<h-f[y]),f[y]=t}for(m>>>=g;m>0;){var v=i[r].s;f[v]<t?m-=1<<t-f[v]++-1:++r}for(;r>=0&&m;--r){var b=i[r].s;f[b]==t&&(--f[b],++m)}h=t}return[new oH(f),h]},RH=function(e,t,n){return-1==e.s?Math.max(RH(e.l,t,n+1),RH(e.r,t,n+1)):t[e.s]=n},NH=function(e){for(var t=e.length;t&&!e[--t];);for(var n=new iH(++t),r=0,o=e[0],i=1,a=function(e){n[r++]=e},s=1;s<=t;++s)if(e[s]==o&&s!=t)++i;else{if(!o&&i>2){for(;i>138;i-=138)a(32754);i>2&&(a(i>10?i-11<<5|28690:i-3<<5|12305),i=0)}else if(i>3){for(a(o),--i;i>6;i-=6)a(8304);i>2&&(a(i-3<<5|8208),i=0)}for(;i--;)a(o);i=1,o=e[s]}return[n.subarray(0,r),t]},IH=function(e,t){for(var n=0,r=0;r<t.length;++r)n+=e[r]*t[r];return n},PH=function(e,t,n){var r=n.length,o=TH(t+2);e[o]=255&r,e[o+1]=r>>>8,e[o+2]=255^e[o],e[o+3]=255^e[o+1];for(var i=0;i<r;++i)e[o+i+4]=n[i];return 8*(o+4+r)},xH=function(e,t,n,r,o,i,a,s,c,u,l){OH(t,l++,n),++o[256];for(var p=wH(o,15),d=p[0],f=p[1],h=wH(i,15),m=h[0],g=h[1],_=NH(d),y=_[0],v=_[1],b=NH(m),E=b[0],S=b[1],T=new iH(19),O=0;O<y.length;++O)T[31&y[O]]++;for(O=0;O<E.length;++O)T[31&E[O]]++;for(var A=wH(T,7),w=A[0],R=A[1],N=19;N>4&&!w[uH[N-1]];--N);var I,P,x,C,M=u+5<<3,L=IH(o,vH)+IH(i,bH)+a,U=IH(o,d)+IH(i,m)+a+14+3*N+IH(T,w)+(2*T[16]+3*T[17]+7*T[18]);if(M<=L&&M<=U)return PH(t,l,e.subarray(c,c+u));if(OH(t,l,1+(U<L)),l+=2,U<L){I=yH(d,f,0),P=d,x=yH(m,g,0),C=m;var k=yH(w,R,0);OH(t,l,v-257),OH(t,l+5,S-1),OH(t,l+10,N-4),l+=14;for(O=0;O<N;++O)OH(t,l+3*O,w[uH[O]]);l+=3*N;for(var D=[y,E],j=0;j<2;++j){var B=D[j];for(O=0;O<B.length;++O){var V=31&B[O];OH(t,l,k[V]),l+=w[V],V>15&&(OH(t,l,B[O]>>>5&127),l+=B[O]>>>12)}}}else I=EH,P=vH,x=SH,C=bH;for(O=0;O<s;++O)if(r[O]>255){V=r[O]>>>18&31;AH(t,l,I[V+257]),l+=P[V+257],V>7&&(OH(t,l,r[O]>>>23&31),l+=sH[V]);var F=31&r[O];AH(t,l,x[F]),l+=C[F],F>3&&(AH(t,l,r[O]>>>5&8191),l+=cH[F])}else AH(t,l,I[r[O]]),l+=P[r[O]];return AH(t,l,I[256]),l+P[256]},CH=new aH([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),MH=new oH(0),LH=function(e,t,n,r,o,i){var a=e.length,s=new oH(r+a+5*(1+Math.ceil(a/7e3))+o),c=s.subarray(r,s.length-o),u=0;if(!t||a<8)for(var l=0;l<=a;l+=65535){var p=l+65535;p>=a&&(c[u>>3]=i),u=PH(c,u+1,e.subarray(l,p))}else{for(var d=CH[t-1],f=d>>>13,h=8191&d,m=(1<<n)-1,g=new iH(32768),_=new iH(m+1),y=Math.ceil(n/3),v=2*y,b=function(t){return(e[t]^e[t+1]<<y^e[t+2]<<v)&m},E=new aH(25e3),S=new iH(288),T=new iH(32),O=0,A=0,w=(l=0,0),R=0,N=0;l<a;++l){var I=b(l),P=32767&l,x=_[I];if(g[P]=x,_[I]=P,R<=l){var C=a-l;if((O>7e3||w>24576)&&C>423){u=xH(e,c,0,E,S,T,A,w,N,l-N,u),w=O=A=0,N=l;for(var M=0;M<286;++M)S[M]=0;for(M=0;M<30;++M)T[M]=0}var L=2,U=0,k=h,D=P-x&32767;if(C>2&&I==b(l-D))for(var j=Math.min(f,C)-1,B=Math.min(32767,l),V=Math.min(258,C);D<=B&&--k&&P!=x;){if(e[l+L]==e[l+L-D]){for(var F=0;F<V&&e[l+F]==e[l+F-D];++F);if(F>L){if(L=F,U=D,F>j)break;var G=Math.min(D,F-2),H=0;for(M=0;M<G;++M){var Y=l-D+M+32768&32767,q=Y-g[Y]+32768&32767;q>H&&(H=q,x=Y)}}}D+=(P=x)-(x=g[P])+32768&32767}if(U){E[w++]=268435456|fH[L]<<18|hH[U];var z=31&fH[L],K=31&hH[U];A+=sH[z]+cH[K],++S[257+z],++T[K],R=l+L,++O}else E[w++]=e[l],++S[e[l]]}}u=xH(e,c,i,E,S,T,A,w,N,l-N,u)}return function(e,t,n){(null==n||n>e.length)&&(n=e.length);var r=new(2==e.BYTES_PER_ELEMENT?iH:4==e.BYTES_PER_ELEMENT?aH:oH)(n-t);return r.set(e.subarray(t,n)),r}(s,0,r+TH(u)+o)},UH=function(){for(var e=new Int32Array(256),t=0;t<256;++t){for(var n=t,r=9;--r;)n=(1&n&&-306674912)^n>>>1;e[t]=n}return e}(),kH=function(e,t,n){for(;n;++t)e[t]=n,n>>>=8};function DH(e,t){t||(t={});var n=function(){var e=-1;return{p:function(t){for(var n=e,r=0;r<t.length;++r)n=UH[255&n^t[r]]^n>>>8;e=n},d:function(){return~e}}}(),r=e.length;n.p(e);var o,i,a,s,c,u=(o=e,i=t,a=10+((c=t).filename&&c.filename.length+1||0),s=8,LH(o,null==i.level?6:i.level,null==i.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(o.length)))):12+i.mem,a,s,!0)),l=u.length;return function(e,t){var n=t.filename;if(e[0]=31,e[1]=139,e[2]=8,e[8]=t.level<2?4:9==t.level?2:0,e[9]=3,0!=t.mtime&&kH(e,4,Math.floor(new Date(t.mtime||Date.now())/1e3)),n){e[3]=8;for(var r=0;r<=n.length;++r)e[r+10]=n.charCodeAt(r)}}(u,t),kH(u,l-8,n.d()),kH(u,l-4,r),u}var jH="undefined"!=typeof TextDecoder&&new TextDecoder;try{jH.decode(MH,{stream:!0})}catch(e){}
/**
	 * @license
	 * Copyright 2009 The Closure Library Authors
	 * Copyright 2020 Daniel Wirtz / The long.js Authors.
	 *
	 * Licensed under the Apache License, Version 2.0 (the "License");
	 * you may not use this file except in compliance with the License.
	 * You may obtain a copy of the License at
	 *
	 *     http://www.apache.org/licenses/LICENSE-2.0
	 *
	 * Unless required by applicable law or agreed to in writing, software
	 * distributed under the License is distributed on an "AS IS" BASIS,
	 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
	 * See the License for the specific language governing permissions and
	 * limitations under the License.
	 *
	 * SPDX-License-Identifier: Apache-2.0
	 */var BH=null;try{BH=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch{}function VH(e,t,n){this.low=0|e,this.high=0|t,this.unsigned=!!n}function FH(e){return!0===(e&&e.__isLong__)}function GH(e){var t=Math.clz32(e&-e);return e?31-t:t}VH.prototype.__isLong__,Object.defineProperty(VH.prototype,"__isLong__",{value:!0}),VH.isLong=FH;var HH={},YH={};function qH(e,t){var n,r,o;return t?(o=0<=(e>>>=0)&&e<256)&&(r=YH[e])?r:(n=KH(e,0,!0),o&&(YH[e]=n),n):(o=-128<=(e|=0)&&e<128)&&(r=HH[e])?r:(n=KH(e,e<0?-1:0,!1),o&&(HH[e]=n),n)}function zH(e,t){if(isNaN(e))return t?nY:tY;if(t){if(e<0)return nY;if(e>=XH)return sY}else{if(e<=-0x8000000000000000)return cY;if(e+1>=ZH)return aY}return e<0?zH(-e,t).neg():KH(e%$H|0,e/$H|0,t)}function KH(e,t,n){return new VH(e,t,n)}VH.fromInt=qH,VH.fromNumber=zH,VH.fromBits=KH;var WH=Math.pow;function QH(e,t,n){if(0===e.length)throw Error("empty string");if("number"==typeof t?(n=t,t=!1):t=!!t,"NaN"===e||"Infinity"===e||"+Infinity"===e||"-Infinity"===e)return t?nY:tY;if((n=n||10)<2||36<n)throw RangeError("radix");var r;if((r=e.indexOf("-"))>0)throw Error("interior hyphen");if(0===r)return QH(e.substring(1),t,n).neg();for(var o=zH(WH(n,8)),i=tY,a=0;a<e.length;a+=8){var s=Math.min(8,e.length-a),c=parseInt(e.substring(a,a+s),n);if(s<8){var u=zH(WH(n,s));i=i.mul(u).add(zH(c))}else i=(i=i.mul(o)).add(zH(c))}return i.unsigned=t,i}function JH(e,t){return"number"==typeof e?zH(e,t):"string"==typeof e?QH(e,t):KH(e.low,e.high,"boolean"==typeof t?t:e.unsigned)}VH.fromString=QH,VH.fromValue=JH;var $H=4294967296,XH=$H*$H,ZH=XH/2,eY=qH(1<<24),tY=qH(0);VH.ZERO=tY;var nY=qH(0,!0);VH.UZERO=nY;var rY=qH(1);VH.ONE=rY;var oY=qH(1,!0);VH.UONE=oY;var iY=qH(-1);VH.NEG_ONE=iY;var aY=KH(-1,2147483647,!1);VH.MAX_VALUE=aY;var sY=KH(-1,-1,!0);VH.MAX_UNSIGNED_VALUE=sY;var cY=KH(0,-2147483648,!1);VH.MIN_VALUE=cY;var uY=VH.prototype;uY.toInt=function(){return this.unsigned?this.low>>>0:this.low},uY.toNumber=function(){return this.unsigned?(this.high>>>0)*$H+(this.low>>>0):this.high*$H+(this.low>>>0)},uY.toString=function(e){if((e=e||10)<2||36<e)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative()){if(this.eq(cY)){var t=zH(e),n=this.div(t),r=n.mul(t).sub(this);return n.toString(e)+r.toInt().toString(e)}return"-"+this.neg().toString(e)}for(var o=zH(WH(e,6),this.unsigned),i=this,a="";;){var s=i.div(o),c=(i.sub(s.mul(o)).toInt()>>>0).toString(e);if((i=s).isZero())return c+a;for(;c.length<6;)c="0"+c;a=""+c+a}},uY.getHighBits=function(){return this.high},uY.getHighBitsUnsigned=function(){return this.high>>>0},uY.getLowBits=function(){return this.low},uY.getLowBitsUnsigned=function(){return this.low>>>0},uY.getNumBitsAbs=function(){if(this.isNegative())return this.eq(cY)?64:this.neg().getNumBitsAbs();for(var e=0!=this.high?this.high:this.low,t=31;t>0&&!(e&1<<t);t--);return 0!=this.high?t+33:t+1},uY.isSafeInteger=function(){var e=this.high>>21;return!e||!this.unsigned&&(-1===e&&!(0===this.low&&-2097152===this.high))},uY.isZero=function(){return 0===this.high&&0===this.low},uY.eqz=uY.isZero,uY.isNegative=function(){return!this.unsigned&&this.high<0},uY.isPositive=function(){return this.unsigned||this.high>=0},uY.isOdd=function(){return!(1&~this.low)},uY.isEven=function(){return!(1&this.low)},uY.equals=function(e){return FH(e)||(e=JH(e)),(this.unsigned===e.unsigned||this.high>>>31!=1||e.high>>>31!=1)&&(this.high===e.high&&this.low===e.low)},uY.eq=uY.equals,uY.notEquals=function(e){return!this.eq(e)},uY.neq=uY.notEquals,uY.ne=uY.notEquals,uY.lessThan=function(e){return this.comp(e)<0},uY.lt=uY.lessThan,uY.lessThanOrEqual=function(e){return this.comp(e)<=0},uY.lte=uY.lessThanOrEqual,uY.le=uY.lessThanOrEqual,uY.greaterThan=function(e){return this.comp(e)>0},uY.gt=uY.greaterThan,uY.greaterThanOrEqual=function(e){return this.comp(e)>=0},uY.gte=uY.greaterThanOrEqual,uY.ge=uY.greaterThanOrEqual,uY.compare=function(e){if(FH(e)||(e=JH(e)),this.eq(e))return 0;var t=this.isNegative(),n=e.isNegative();return t&&!n?-1:!t&&n?1:this.unsigned?e.high>>>0>this.high>>>0||e.high===this.high&&e.low>>>0>this.low>>>0?-1:1:this.sub(e).isNegative()?-1:1},uY.comp=uY.compare,uY.negate=function(){return!this.unsigned&&this.eq(cY)?cY:this.not().add(rY)},uY.neg=uY.negate,uY.add=function(e){FH(e)||(e=JH(e));var t=this.high>>>16,n=65535&this.high,r=this.low>>>16,o=65535&this.low,i=e.high>>>16,a=65535&e.high,s=e.low>>>16,c=0,u=0,l=0,p=0;return l+=(p+=o+(65535&e.low))>>>16,u+=(l+=r+s)>>>16,c+=(u+=n+a)>>>16,c+=t+i,KH((l&=65535)<<16|(p&=65535),(c&=65535)<<16|(u&=65535),this.unsigned)},uY.subtract=function(e){return FH(e)||(e=JH(e)),this.add(e.neg())},uY.sub=uY.subtract,uY.multiply=function(e){if(this.isZero())return this;if(FH(e)||(e=JH(e)),BH)return KH(BH.mul(this.low,this.high,e.low,e.high),BH.get_high(),this.unsigned);if(e.isZero())return this.unsigned?nY:tY;if(this.eq(cY))return e.isOdd()?cY:tY;if(e.eq(cY))return this.isOdd()?cY:tY;if(this.isNegative())return e.isNegative()?this.neg().mul(e.neg()):this.neg().mul(e).neg();if(e.isNegative())return this.mul(e.neg()).neg();if(this.lt(eY)&&e.lt(eY))return zH(this.toNumber()*e.toNumber(),this.unsigned);var t=this.high>>>16,n=65535&this.high,r=this.low>>>16,o=65535&this.low,i=e.high>>>16,a=65535&e.high,s=e.low>>>16,c=65535&e.low,u=0,l=0,p=0,d=0;return p+=(d+=o*c)>>>16,l+=(p+=r*c)>>>16,p&=65535,l+=(p+=o*s)>>>16,u+=(l+=n*c)>>>16,l&=65535,u+=(l+=r*s)>>>16,l&=65535,u+=(l+=o*a)>>>16,u+=t*c+n*s+r*a+o*i,KH((p&=65535)<<16|(d&=65535),(u&=65535)<<16|(l&=65535),this.unsigned)},uY.mul=uY.multiply,uY.divide=function(e){if(FH(e)||(e=JH(e)),e.isZero())throw Error("division by zero");var t,n,r;if(BH)return this.unsigned||-2147483648!==this.high||-1!==e.low||-1!==e.high?KH((this.unsigned?BH.div_u:BH.div_s)(this.low,this.high,e.low,e.high),BH.get_high(),this.unsigned):this;if(this.isZero())return this.unsigned?nY:tY;if(this.unsigned){if(e.unsigned||(e=e.toUnsigned()),e.gt(this))return nY;if(e.gt(this.shru(1)))return oY;r=nY}else{if(this.eq(cY))return e.eq(rY)||e.eq(iY)?cY:e.eq(cY)?rY:(t=this.shr(1).div(e).shl(1)).eq(tY)?e.isNegative()?rY:iY:(n=this.sub(e.mul(t)),r=t.add(n.div(e)));if(e.eq(cY))return this.unsigned?nY:tY;if(this.isNegative())return e.isNegative()?this.neg().div(e.neg()):this.neg().div(e).neg();if(e.isNegative())return this.div(e.neg()).neg();r=tY}for(n=this;n.gte(e);){t=Math.max(1,Math.floor(n.toNumber()/e.toNumber()));for(var o=Math.ceil(Math.log(t)/Math.LN2),i=o<=48?1:WH(2,o-48),a=zH(t),s=a.mul(e);s.isNegative()||s.gt(n);)s=(a=zH(t-=i,this.unsigned)).mul(e);a.isZero()&&(a=rY),r=r.add(a),n=n.sub(s)}return r},uY.div=uY.divide,uY.modulo=function(e){return FH(e)||(e=JH(e)),BH?KH((this.unsigned?BH.rem_u:BH.rem_s)(this.low,this.high,e.low,e.high),BH.get_high(),this.unsigned):this.sub(this.div(e).mul(e))},uY.mod=uY.modulo,uY.rem=uY.modulo,uY.not=function(){return KH(~this.low,~this.high,this.unsigned)},uY.countLeadingZeros=function(){return this.high?Math.clz32(this.high):Math.clz32(this.low)+32},uY.clz=uY.countLeadingZeros,uY.countTrailingZeros=function(){return this.low?GH(this.low):GH(this.high)+32},uY.ctz=uY.countTrailingZeros,uY.and=function(e){return FH(e)||(e=JH(e)),KH(this.low&e.low,this.high&e.high,this.unsigned)},uY.or=function(e){return FH(e)||(e=JH(e)),KH(this.low|e.low,this.high|e.high,this.unsigned)},uY.xor=function(e){return FH(e)||(e=JH(e)),KH(this.low^e.low,this.high^e.high,this.unsigned)},uY.shiftLeft=function(e){return FH(e)&&(e=e.toInt()),0==(e&=63)?this:e<32?KH(this.low<<e,this.high<<e|this.low>>>32-e,this.unsigned):KH(0,this.low<<e-32,this.unsigned)},uY.shl=uY.shiftLeft,uY.shiftRight=function(e){return FH(e)&&(e=e.toInt()),0==(e&=63)?this:e<32?KH(this.low>>>e|this.high<<32-e,this.high>>e,this.unsigned):KH(this.high>>e-32,this.high>=0?0:-1,this.unsigned)},uY.shr=uY.shiftRight,uY.shiftRightUnsigned=function(e){return FH(e)&&(e=e.toInt()),0==(e&=63)?this:e<32?KH(this.low>>>e|this.high<<32-e,this.high>>>e,this.unsigned):KH(32===e?this.high:this.high>>>e-32,0,this.unsigned)},uY.shru=uY.shiftRightUnsigned,uY.shr_u=uY.shiftRightUnsigned,uY.rotateLeft=function(e){var t;return FH(e)&&(e=e.toInt()),0==(e&=63)?this:32===e?KH(this.high,this.low,this.unsigned):e<32?(t=32-e,KH(this.low<<e|this.high>>>t,this.high<<e|this.low>>>t,this.unsigned)):(t=32-(e-=32),KH(this.high<<e|this.low>>>t,this.low<<e|this.high>>>t,this.unsigned))},uY.rotl=uY.rotateLeft,uY.rotateRight=function(e){var t;return FH(e)&&(e=e.toInt()),0==(e&=63)?this:32===e?KH(this.high,this.low,this.unsigned):e<32?(t=32-e,KH(this.high<<t|this.low>>>e,this.low<<t|this.high>>>e,this.unsigned)):(t=32-(e-=32),KH(this.low<<t|this.high>>>e,this.high<<t|this.low>>>e,this.unsigned))},uY.rotr=uY.rotateRight,uY.toSigned=function(){return this.unsigned?KH(this.low,this.high,!1):this},uY.toUnsigned=function(){return this.unsigned?this:KH(this.low,this.high,!0)},uY.toBytes=function(e){return e?this.toBytesLE():this.toBytesBE()},uY.toBytesLE=function(){var e=this.high,t=this.low;return[255&t,t>>>8&255,t>>>16&255,t>>>24,255&e,e>>>8&255,e>>>16&255,e>>>24]},uY.toBytesBE=function(){var e=this.high,t=this.low;return[e>>>24,e>>>16&255,e>>>8&255,255&e,t>>>24,t>>>16&255,t>>>8&255,255&t]},VH.fromBytes=function(e,t,n){return n?VH.fromBytesLE(e,t):VH.fromBytesBE(e,t)},VH.fromBytesLE=function(e,t){return new VH(e[0]|e[1]<<8|e[2]<<16|e[3]<<24,e[4]|e[5]<<8|e[6]<<16|e[7]<<24,t)},VH.fromBytesBE=function(e,t){return new VH(e[4]<<24|e[5]<<16|e[6]<<8|e[7],e[0]<<24|e[1]<<16|e[2]<<8|e[3],t)},"function"==typeof BigInt&&(VH.fromBigInt=function(e,t){return KH(Number(BigInt.asIntN(32,e)),Number(BigInt.asIntN(32,e>>BigInt(32))),t)},VH.fromValue=function(e,t){return"bigint"==typeof e?VH.fromBigInt(e,t):JH(e,t)},uY.toBigInt=function(){var e=BigInt(this.low>>>0);return BigInt(this.unsigned?this.high>>>0:this.high)<<BigInt(32)|e});var lY=t(QC());const pY={encode:(e,t=lY.Writer.create())=>(void 0!==e.stringValue&&t.uint32(10).string(e.stringValue),void 0!==e.boolValue&&t.uint32(16).bool(e.boolValue),void 0!==e.intValue&&t.uint32(24).int64(e.intValue),void 0!==e.doubleValue&&t.uint32(33).double(e.doubleValue),void 0!==e.arrayValue&&dY.encode(e.arrayValue,t.uint32(42).fork()).ldelim(),void 0!==e.kvlistValue&&fY.encode(e.kvlistValue,t.uint32(50).fork()).ldelim(),void 0!==e.bytesValue&&t.uint32(58).bytes(e.bytesValue),t),decode(e,t){const n=e instanceof lY.Reader?e:lY.Reader.create(e);let r=void 0===t?n.len:n.pos+t;const o={stringValue:void 0,boolValue:void 0,intValue:void 0,doubleValue:void 0,arrayValue:void 0,kvlistValue:void 0,bytesValue:void 0};for(;n.pos<r;){const e=n.uint32();switch(e>>>3){case 1:if(10!==e)break;o.stringValue=n.string();continue;case 2:if(16!==e)break;o.boolValue=n.bool();continue;case 3:if(24!==e)break;o.intValue=yY(n.int64());continue;case 4:if(33!==e)break;o.doubleValue=n.double();continue;case 5:if(42!==e)break;o.arrayValue=dY.decode(n,n.uint32());continue;case 6:if(50!==e)break;o.kvlistValue=fY.decode(n,n.uint32());continue;case 7:if(58!==e)break;o.bytesValue=n.bytes();continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return o},fromJSON:e=>({stringValue:vY(e.stringValue)?globalThis.String(e.stringValue):void 0,boolValue:vY(e.boolValue)?globalThis.Boolean(e.boolValue):void 0,intValue:vY(e.intValue)?globalThis.Number(e.intValue):void 0,doubleValue:vY(e.doubleValue)?globalThis.Number(e.doubleValue):void 0,arrayValue:vY(e.arrayValue)?dY.fromJSON(e.arrayValue):void 0,kvlistValue:vY(e.kvlistValue)?fY.fromJSON(e.kvlistValue):void 0,bytesValue:vY(e.bytesValue)?_Y(e.bytesValue):void 0}),toJSON(e){const t={};return void 0!==e.stringValue&&(t.stringValue=e.stringValue),void 0!==e.boolValue&&(t.boolValue=e.boolValue),void 0!==e.intValue&&(t.intValue=Math.round(e.intValue)),void 0!==e.doubleValue&&(t.doubleValue=e.doubleValue),void 0!==e.arrayValue&&(t.arrayValue=dY.toJSON(e.arrayValue)),void 0!==e.kvlistValue&&(t.kvlistValue=fY.toJSON(e.kvlistValue)),void 0!==e.bytesValue&&(t.bytesValue=function(e){if(globalThis.Buffer)return globalThis.Buffer.from(e).toString("base64");{const t=[];return e.forEach((e=>{t.push(globalThis.String.fromCharCode(e))})),globalThis.btoa(t.join(""))}}(e.bytesValue)),t},create:e=>pY.fromPartial(null!=e?e:{}),fromPartial(e){var t,n,r,o,i;const a={stringValue:void 0,boolValue:void 0,intValue:void 0,doubleValue:void 0,arrayValue:void 0,kvlistValue:void 0,bytesValue:void 0};return a.stringValue=null!==(t=e.stringValue)&&void 0!==t?t:void 0,a.boolValue=null!==(n=e.boolValue)&&void 0!==n?n:void 0,a.intValue=null!==(r=e.intValue)&&void 0!==r?r:void 0,a.doubleValue=null!==(o=e.doubleValue)&&void 0!==o?o:void 0,a.arrayValue=void 0!==e.arrayValue&&null!==e.arrayValue?dY.fromPartial(e.arrayValue):void 0,a.kvlistValue=void 0!==e.kvlistValue&&null!==e.kvlistValue?fY.fromPartial(e.kvlistValue):void 0,a.bytesValue=null!==(i=e.bytesValue)&&void 0!==i?i:void 0,a}};const dY={encode(e,t=lY.Writer.create()){if(void 0!==e.values&&0!==e.values.length)for(const n of e.values)pY.encode(n,t.uint32(10).fork()).ldelim();return t},decode(e,t){const n=e instanceof lY.Reader?e:lY.Reader.create(e);let r=void 0===t?n.len:n.pos+t;const o={values:[]};for(;n.pos<r;){const e=n.uint32();switch(e>>>3){case 1:if(10!==e)break;o.values.push(pY.decode(n,n.uint32()));continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return o},fromJSON:e=>({values:globalThis.Array.isArray(null==e?void 0:e.values)?e.values.map((e=>pY.fromJSON(e))):[]}),toJSON(e){var t;const n={};return(null===(t=e.values)||void 0===t?void 0:t.length)&&(n.values=e.values.map((e=>pY.toJSON(e)))),n},create:e=>dY.fromPartial(null!=e?e:{}),fromPartial(e){var t;const n={values:[]};return n.values=(null===(t=e.values)||void 0===t?void 0:t.map((e=>pY.fromPartial(e))))||[],n}};const fY={encode(e,t=lY.Writer.create()){if(void 0!==e.values&&0!==e.values.length)for(const n of e.values)hY.encode(n,t.uint32(10).fork()).ldelim();return t},decode(e,t){const n=e instanceof lY.Reader?e:lY.Reader.create(e);let r=void 0===t?n.len:n.pos+t;const o={values:[]};for(;n.pos<r;){const e=n.uint32();switch(e>>>3){case 1:if(10!==e)break;o.values.push(hY.decode(n,n.uint32()));continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return o},fromJSON:e=>({values:globalThis.Array.isArray(null==e?void 0:e.values)?e.values.map((e=>hY.fromJSON(e))):[]}),toJSON(e){var t;const n={};return(null===(t=e.values)||void 0===t?void 0:t.length)&&(n.values=e.values.map((e=>hY.toJSON(e)))),n},create:e=>fY.fromPartial(null!=e?e:{}),fromPartial(e){var t;const n={values:[]};return n.values=(null===(t=e.values)||void 0===t?void 0:t.map((e=>hY.fromPartial(e))))||[],n}};const hY={encode:(e,t=lY.Writer.create())=>(void 0!==e.key&&""!==e.key&&t.uint32(10).string(e.key),void 0!==e.value&&pY.encode(e.value,t.uint32(18).fork()).ldelim(),t),decode(e,t){const n=e instanceof lY.Reader?e:lY.Reader.create(e);let r=void 0===t?n.len:n.pos+t;const o={key:"",value:void 0};for(;n.pos<r;){const e=n.uint32();switch(e>>>3){case 1:if(10!==e)break;o.key=n.string();continue;case 2:if(18!==e)break;o.value=pY.decode(n,n.uint32());continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return o},fromJSON:e=>({key:vY(e.key)?globalThis.String(e.key):"",value:vY(e.value)?pY.fromJSON(e.value):void 0}),toJSON(e){const t={};return void 0!==e.key&&""!==e.key&&(t.key=e.key),void 0!==e.value&&(t.value=pY.toJSON(e.value)),t},create:e=>hY.fromPartial(null!=e?e:{}),fromPartial(e){var t;const n={key:"",value:void 0};return n.key=null!==(t=e.key)&&void 0!==t?t:"",n.value=void 0!==e.value&&null!==e.value?pY.fromPartial(e.value):void 0,n}};const mY={encode:(e,t=lY.Writer.create())=>(void 0!==e.name&&""!==e.name&&t.uint32(10).string(e.name),void 0!==e.version&&""!==e.version&&t.uint32(18).string(e.version),t),decode(e,t){const n=e instanceof lY.Reader?e:lY.Reader.create(e);let r=void 0===t?n.len:n.pos+t;const o={name:"",version:""};for(;n.pos<r;){const e=n.uint32();switch(e>>>3){case 1:if(10!==e)break;o.name=n.string();continue;case 2:if(18!==e)break;o.version=n.string();continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return o},fromJSON:e=>({name:vY(e.name)?globalThis.String(e.name):"",version:vY(e.version)?globalThis.String(e.version):""}),toJSON(e){const t={};return void 0!==e.name&&""!==e.name&&(t.name=e.name),void 0!==e.version&&""!==e.version&&(t.version=e.version),t},create:e=>mY.fromPartial(null!=e?e:{}),fromPartial(e){var t,n;const r={name:"",version:""};return r.name=null!==(t=e.name)&&void 0!==t?t:"",r.version=null!==(n=e.version)&&void 0!==n?n:"",r}};const gY={encode:(e,t=lY.Writer.create())=>(void 0!==e.name&&""!==e.name&&t.uint32(10).string(e.name),void 0!==e.version&&""!==e.version&&t.uint32(18).string(e.version),t),decode(e,t){const n=e instanceof lY.Reader?e:lY.Reader.create(e);let r=void 0===t?n.len:n.pos+t;const o={name:"",version:""};for(;n.pos<r;){const e=n.uint32();switch(e>>>3){case 1:if(10!==e)break;o.name=n.string();continue;case 2:if(18!==e)break;o.version=n.string();continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return o},fromJSON:e=>({name:vY(e.name)?globalThis.String(e.name):"",version:vY(e.version)?globalThis.String(e.version):""}),toJSON(e){const t={};return void 0!==e.name&&""!==e.name&&(t.name=e.name),void 0!==e.version&&""!==e.version&&(t.version=e.version),t},create:e=>gY.fromPartial(null!=e?e:{}),fromPartial(e){var t,n;const r={name:"",version:""};return r.name=null!==(t=e.name)&&void 0!==t?t:"",r.version=null!==(n=e.version)&&void 0!==n?n:"",r}};function _Y(e){if(globalThis.Buffer)return Uint8Array.from(globalThis.Buffer.from(e,"base64"));{const t=globalThis.atob(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;++e)n[e]=t.charCodeAt(e);return n}}function yY(e){if(e.gt(globalThis.Number.MAX_SAFE_INTEGER))throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");return e.toNumber()}function vY(e){return null!=e}lY.util.Long!==VH&&(lY.util.Long=VH,lY.configure());const bY={encode(e,t=lY.Writer.create()){if(void 0!==e.attributes&&0!==e.attributes.length)for(const n of e.attributes)hY.encode(n,t.uint32(10).fork()).ldelim();return void 0!==e.droppedAttributesCount&&0!==e.droppedAttributesCount&&t.uint32(16).uint32(e.droppedAttributesCount),t},decode(e,t){const n=e instanceof lY.Reader?e:lY.Reader.create(e);let r=void 0===t?n.len:n.pos+t;const o={attributes:[],droppedAttributesCount:0};for(;n.pos<r;){const e=n.uint32();switch(e>>>3){case 1:if(10!==e)break;o.attributes.push(hY.decode(n,n.uint32()));continue;case 2:if(16!==e)break;o.droppedAttributesCount=n.uint32();continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return o},fromJSON(e){return{attributes:globalThis.Array.isArray(null==e?void 0:e.attributes)?e.attributes.map((e=>hY.fromJSON(e))):[],droppedAttributesCount:(t=e.droppedAttributesCount,null!=t?globalThis.Number(e.droppedAttributesCount):0)};var t},toJSON(e){var t;const n={};return(null===(t=e.attributes)||void 0===t?void 0:t.length)&&(n.attributes=e.attributes.map((e=>hY.toJSON(e)))),void 0!==e.droppedAttributesCount&&0!==e.droppedAttributesCount&&(n.droppedAttributesCount=Math.round(e.droppedAttributesCount)),n},create:e=>bY.fromPartial(null!=e?e:{}),fromPartial(e){var t,n;const r={attributes:[],droppedAttributesCount:0};return r.attributes=(null===(t=e.attributes)||void 0===t?void 0:t.map((e=>hY.fromPartial(e))))||[],r.droppedAttributesCount=null!==(n=e.droppedAttributesCount)&&void 0!==n?n:0,r}};var EY,SY;function TY(e){switch(e){case 0:case"SEVERITY_NUMBER_UNSPECIFIED":return EY.SEVERITY_NUMBER_UNSPECIFIED;case 1:case"SEVERITY_NUMBER_TRACE":return EY.SEVERITY_NUMBER_TRACE;case 2:case"SEVERITY_NUMBER_TRACE2":return EY.SEVERITY_NUMBER_TRACE2;case 3:case"SEVERITY_NUMBER_TRACE3":return EY.SEVERITY_NUMBER_TRACE3;case 4:case"SEVERITY_NUMBER_TRACE4":return EY.SEVERITY_NUMBER_TRACE4;case 5:case"SEVERITY_NUMBER_DEBUG":return EY.SEVERITY_NUMBER_DEBUG;case 6:case"SEVERITY_NUMBER_DEBUG2":return EY.SEVERITY_NUMBER_DEBUG2;case 7:case"SEVERITY_NUMBER_DEBUG3":return EY.SEVERITY_NUMBER_DEBUG3;case 8:case"SEVERITY_NUMBER_DEBUG4":return EY.SEVERITY_NUMBER_DEBUG4;case 9:case"SEVERITY_NUMBER_INFO":return EY.SEVERITY_NUMBER_INFO;case 10:case"SEVERITY_NUMBER_INFO2":return EY.SEVERITY_NUMBER_INFO2;case 11:case"SEVERITY_NUMBER_INFO3":return EY.SEVERITY_NUMBER_INFO3;case 12:case"SEVERITY_NUMBER_INFO4":return EY.SEVERITY_NUMBER_INFO4;case 13:case"SEVERITY_NUMBER_WARN":return EY.SEVERITY_NUMBER_WARN;case 14:case"SEVERITY_NUMBER_WARN2":return EY.SEVERITY_NUMBER_WARN2;case 15:case"SEVERITY_NUMBER_WARN3":return EY.SEVERITY_NUMBER_WARN3;case 16:case"SEVERITY_NUMBER_WARN4":return EY.SEVERITY_NUMBER_WARN4;case 17:case"SEVERITY_NUMBER_ERROR":return EY.SEVERITY_NUMBER_ERROR;case 18:case"SEVERITY_NUMBER_ERROR2":return EY.SEVERITY_NUMBER_ERROR2;case 19:case"SEVERITY_NUMBER_ERROR3":return EY.SEVERITY_NUMBER_ERROR3;case 20:case"SEVERITY_NUMBER_ERROR4":return EY.SEVERITY_NUMBER_ERROR4;case 21:case"SEVERITY_NUMBER_FATAL":return EY.SEVERITY_NUMBER_FATAL;case 22:case"SEVERITY_NUMBER_FATAL2":return EY.SEVERITY_NUMBER_FATAL2;case 23:case"SEVERITY_NUMBER_FATAL3":return EY.SEVERITY_NUMBER_FATAL3;case 24:case"SEVERITY_NUMBER_FATAL4":return EY.SEVERITY_NUMBER_FATAL4;default:return EY.UNRECOGNIZED}}!function(e){e[e.SEVERITY_NUMBER_UNSPECIFIED=0]="SEVERITY_NUMBER_UNSPECIFIED",e[e.SEVERITY_NUMBER_TRACE=1]="SEVERITY_NUMBER_TRACE",e[e.SEVERITY_NUMBER_TRACE2=2]="SEVERITY_NUMBER_TRACE2",e[e.SEVERITY_NUMBER_TRACE3=3]="SEVERITY_NUMBER_TRACE3",e[e.SEVERITY_NUMBER_TRACE4=4]="SEVERITY_NUMBER_TRACE4",e[e.SEVERITY_NUMBER_DEBUG=5]="SEVERITY_NUMBER_DEBUG",e[e.SEVERITY_NUMBER_DEBUG2=6]="SEVERITY_NUMBER_DEBUG2",e[e.SEVERITY_NUMBER_DEBUG3=7]="SEVERITY_NUMBER_DEBUG3",e[e.SEVERITY_NUMBER_DEBUG4=8]="SEVERITY_NUMBER_DEBUG4",e[e.SEVERITY_NUMBER_INFO=9]="SEVERITY_NUMBER_INFO",e[e.SEVERITY_NUMBER_INFO2=10]="SEVERITY_NUMBER_INFO2",e[e.SEVERITY_NUMBER_INFO3=11]="SEVERITY_NUMBER_INFO3",e[e.SEVERITY_NUMBER_INFO4=12]="SEVERITY_NUMBER_INFO4",e[e.SEVERITY_NUMBER_WARN=13]="SEVERITY_NUMBER_WARN",e[e.SEVERITY_NUMBER_WARN2=14]="SEVERITY_NUMBER_WARN2",e[e.SEVERITY_NUMBER_WARN3=15]="SEVERITY_NUMBER_WARN3",e[e.SEVERITY_NUMBER_WARN4=16]="SEVERITY_NUMBER_WARN4",e[e.SEVERITY_NUMBER_ERROR=17]="SEVERITY_NUMBER_ERROR",e[e.SEVERITY_NUMBER_ERROR2=18]="SEVERITY_NUMBER_ERROR2",e[e.SEVERITY_NUMBER_ERROR3=19]="SEVERITY_NUMBER_ERROR3",e[e.SEVERITY_NUMBER_ERROR4=20]="SEVERITY_NUMBER_ERROR4",e[e.SEVERITY_NUMBER_FATAL=21]="SEVERITY_NUMBER_FATAL",e[e.SEVERITY_NUMBER_FATAL2=22]="SEVERITY_NUMBER_FATAL2",e[e.SEVERITY_NUMBER_FATAL3=23]="SEVERITY_NUMBER_FATAL3",e[e.SEVERITY_NUMBER_FATAL4=24]="SEVERITY_NUMBER_FATAL4",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(EY||(EY={})),function(e){e[e.LOG_RECORD_FLAG_UNSPECIFIED=0]="LOG_RECORD_FLAG_UNSPECIFIED",e[e.LOG_RECORD_FLAG_TRACE_FLAGS_MASK=255]="LOG_RECORD_FLAG_TRACE_FLAGS_MASK",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"}(SY||(SY={}));const OY={encode(e,t=lY.Writer.create()){if(void 0!==e.resourceLogs&&0!==e.resourceLogs.length)for(const n of e.resourceLogs)AY.encode(n,t.uint32(10).fork()).ldelim();return t},decode(e,t){const n=e instanceof lY.Reader?e:lY.Reader.create(e);let r=void 0===t?n.len:n.pos+t;const o={resourceLogs:[]};for(;n.pos<r;){const e=n.uint32();switch(e>>>3){case 1:if(10!==e)break;o.resourceLogs.push(AY.decode(n,n.uint32()));continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return o},fromJSON:e=>({resourceLogs:globalThis.Array.isArray(null==e?void 0:e.resourceLogs)?e.resourceLogs.map((e=>AY.fromJSON(e))):[]}),toJSON(e){var t;const n={};return(null===(t=e.resourceLogs)||void 0===t?void 0:t.length)&&(n.resourceLogs=e.resourceLogs.map((e=>AY.toJSON(e)))),n},create:e=>OY.fromPartial(null!=e?e:{}),fromPartial(e){var t;const n={resourceLogs:[]};return n.resourceLogs=(null===(t=e.resourceLogs)||void 0===t?void 0:t.map((e=>AY.fromPartial(e))))||[],n}};const AY={encode(e,t=lY.Writer.create()){if(void 0!==e.resource&&bY.encode(e.resource,t.uint32(10).fork()).ldelim(),void 0!==e.scopeLogs&&0!==e.scopeLogs.length)for(const n of e.scopeLogs)wY.encode(n,t.uint32(18).fork()).ldelim();if(void 0!==e.instrumentationLibraryLogs&&0!==e.instrumentationLibraryLogs.length)for(const n of e.instrumentationLibraryLogs)RY.encode(n,t.uint32(8002).fork()).ldelim();return void 0!==e.schemaUrl&&""!==e.schemaUrl&&t.uint32(26).string(e.schemaUrl),t},decode(e,t){const n=e instanceof lY.Reader?e:lY.Reader.create(e);let r=void 0===t?n.len:n.pos+t;const o={resource:void 0,scopeLogs:[],instrumentationLibraryLogs:[],schemaUrl:""};for(;n.pos<r;){const e=n.uint32();switch(e>>>3){case 1:if(10!==e)break;o.resource=bY.decode(n,n.uint32());continue;case 2:if(18!==e)break;o.scopeLogs.push(wY.decode(n,n.uint32()));continue;case 1e3:if(8002!==e)break;o.instrumentationLibraryLogs.push(RY.decode(n,n.uint32()));continue;case 3:if(26!==e)break;o.schemaUrl=n.string();continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return o},fromJSON:e=>({resource:MY(e.resource)?bY.fromJSON(e.resource):void 0,scopeLogs:globalThis.Array.isArray(null==e?void 0:e.scopeLogs)?e.scopeLogs.map((e=>wY.fromJSON(e))):[],instrumentationLibraryLogs:globalThis.Array.isArray(null==e?void 0:e.instrumentationLibraryLogs)?e.instrumentationLibraryLogs.map((e=>RY.fromJSON(e))):[],schemaUrl:MY(e.schemaUrl)?globalThis.String(e.schemaUrl):""}),toJSON(e){var t,n;const r={};return void 0!==e.resource&&(r.resource=bY.toJSON(e.resource)),(null===(t=e.scopeLogs)||void 0===t?void 0:t.length)&&(r.scopeLogs=e.scopeLogs.map((e=>wY.toJSON(e)))),(null===(n=e.instrumentationLibraryLogs)||void 0===n?void 0:n.length)&&(r.instrumentationLibraryLogs=e.instrumentationLibraryLogs.map((e=>RY.toJSON(e)))),void 0!==e.schemaUrl&&""!==e.schemaUrl&&(r.schemaUrl=e.schemaUrl),r},create:e=>AY.fromPartial(null!=e?e:{}),fromPartial(e){var t,n,r;const o={resource:void 0,scopeLogs:[],instrumentationLibraryLogs:[],schemaUrl:""};return o.resource=void 0!==e.resource&&null!==e.resource?bY.fromPartial(e.resource):void 0,o.scopeLogs=(null===(t=e.scopeLogs)||void 0===t?void 0:t.map((e=>wY.fromPartial(e))))||[],o.instrumentationLibraryLogs=(null===(n=e.instrumentationLibraryLogs)||void 0===n?void 0:n.map((e=>RY.fromPartial(e))))||[],o.schemaUrl=null!==(r=e.schemaUrl)&&void 0!==r?r:"",o}};const wY={encode(e,t=lY.Writer.create()){if(void 0!==e.scope&&gY.encode(e.scope,t.uint32(10).fork()).ldelim(),void 0!==e.logRecords&&0!==e.logRecords.length)for(const n of e.logRecords)IY.encode(n,t.uint32(18).fork()).ldelim();return void 0!==e.schemaUrl&&""!==e.schemaUrl&&t.uint32(26).string(e.schemaUrl),t},decode(e,t){const n=e instanceof lY.Reader?e:lY.Reader.create(e);let r=void 0===t?n.len:n.pos+t;const o={scope:void 0,logRecords:[],schemaUrl:""};for(;n.pos<r;){const e=n.uint32();switch(e>>>3){case 1:if(10!==e)break;o.scope=gY.decode(n,n.uint32());continue;case 2:if(18!==e)break;o.logRecords.push(IY.decode(n,n.uint32()));continue;case 3:if(26!==e)break;o.schemaUrl=n.string();continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return o},fromJSON:e=>({scope:MY(e.scope)?gY.fromJSON(e.scope):void 0,logRecords:globalThis.Array.isArray(null==e?void 0:e.logRecords)?e.logRecords.map((e=>IY.fromJSON(e))):[],schemaUrl:MY(e.schemaUrl)?globalThis.String(e.schemaUrl):""}),toJSON(e){var t;const n={};return void 0!==e.scope&&(n.scope=gY.toJSON(e.scope)),(null===(t=e.logRecords)||void 0===t?void 0:t.length)&&(n.logRecords=e.logRecords.map((e=>IY.toJSON(e)))),void 0!==e.schemaUrl&&""!==e.schemaUrl&&(n.schemaUrl=e.schemaUrl),n},create:e=>wY.fromPartial(null!=e?e:{}),fromPartial(e){var t,n;const r={scope:void 0,logRecords:[],schemaUrl:""};return r.scope=void 0!==e.scope&&null!==e.scope?gY.fromPartial(e.scope):void 0,r.logRecords=(null===(t=e.logRecords)||void 0===t?void 0:t.map((e=>IY.fromPartial(e))))||[],r.schemaUrl=null!==(n=e.schemaUrl)&&void 0!==n?n:"",r}};const RY={encode(e,t=lY.Writer.create()){if(void 0!==e.instrumentationLibrary&&mY.encode(e.instrumentationLibrary,t.uint32(10).fork()).ldelim(),void 0!==e.logRecords&&0!==e.logRecords.length)for(const n of e.logRecords)IY.encode(n,t.uint32(18).fork()).ldelim();return void 0!==e.schemaUrl&&""!==e.schemaUrl&&t.uint32(26).string(e.schemaUrl),t},decode(e,t){const n=e instanceof lY.Reader?e:lY.Reader.create(e);let r=void 0===t?n.len:n.pos+t;const o={instrumentationLibrary:void 0,logRecords:[],schemaUrl:""};for(;n.pos<r;){const e=n.uint32();switch(e>>>3){case 1:if(10!==e)break;o.instrumentationLibrary=mY.decode(n,n.uint32());continue;case 2:if(18!==e)break;o.logRecords.push(IY.decode(n,n.uint32()));continue;case 3:if(26!==e)break;o.schemaUrl=n.string();continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return o},fromJSON:e=>({instrumentationLibrary:MY(e.instrumentationLibrary)?mY.fromJSON(e.instrumentationLibrary):void 0,logRecords:globalThis.Array.isArray(null==e?void 0:e.logRecords)?e.logRecords.map((e=>IY.fromJSON(e))):[],schemaUrl:MY(e.schemaUrl)?globalThis.String(e.schemaUrl):""}),toJSON(e){var t;const n={};return void 0!==e.instrumentationLibrary&&(n.instrumentationLibrary=mY.toJSON(e.instrumentationLibrary)),(null===(t=e.logRecords)||void 0===t?void 0:t.length)&&(n.logRecords=e.logRecords.map((e=>IY.toJSON(e)))),void 0!==e.schemaUrl&&""!==e.schemaUrl&&(n.schemaUrl=e.schemaUrl),n},create:e=>RY.fromPartial(null!=e?e:{}),fromPartial(e){var t,n;const r={instrumentationLibrary:void 0,logRecords:[],schemaUrl:""};return r.instrumentationLibrary=void 0!==e.instrumentationLibrary&&null!==e.instrumentationLibrary?mY.fromPartial(e.instrumentationLibrary):void 0,r.logRecords=(null===(t=e.logRecords)||void 0===t?void 0:t.map((e=>IY.fromPartial(e))))||[],r.schemaUrl=null!==(n=e.schemaUrl)&&void 0!==n?n:"",r}};function NY(){return{timeUnixNano:0,observedTimeUnixNano:0,severityNumber:0,severityText:"",body:void 0,attributes:[],droppedAttributesCount:0,flags:0,traceId:new Uint8Array(0),spanId:new Uint8Array(0)}}const IY={encode(e,t=lY.Writer.create()){if(void 0!==e.timeUnixNano&&0!==e.timeUnixNano&&t.uint32(9).fixed64(e.timeUnixNano),void 0!==e.observedTimeUnixNano&&0!==e.observedTimeUnixNano&&t.uint32(89).fixed64(e.observedTimeUnixNano),void 0!==e.severityNumber&&0!==e.severityNumber&&t.uint32(16).int32(e.severityNumber),void 0!==e.severityText&&""!==e.severityText&&t.uint32(26).string(e.severityText),void 0!==e.body&&pY.encode(e.body,t.uint32(42).fork()).ldelim(),void 0!==e.attributes&&0!==e.attributes.length)for(const n of e.attributes)hY.encode(n,t.uint32(50).fork()).ldelim();return void 0!==e.droppedAttributesCount&&0!==e.droppedAttributesCount&&t.uint32(56).uint32(e.droppedAttributesCount),void 0!==e.flags&&0!==e.flags&&t.uint32(69).fixed32(e.flags),void 0!==e.traceId&&0!==e.traceId.length&&t.uint32(74).bytes(e.traceId),void 0!==e.spanId&&0!==e.spanId.length&&t.uint32(82).bytes(e.spanId),t},decode(e,t){const n=e instanceof lY.Reader?e:lY.Reader.create(e);let r=void 0===t?n.len:n.pos+t;const o=NY();for(;n.pos<r;){const e=n.uint32();switch(e>>>3){case 1:if(9!==e)break;o.timeUnixNano=CY(n.fixed64());continue;case 11:if(89!==e)break;o.observedTimeUnixNano=CY(n.fixed64());continue;case 2:if(16!==e)break;o.severityNumber=n.int32();continue;case 3:if(26!==e)break;o.severityText=n.string();continue;case 5:if(42!==e)break;o.body=pY.decode(n,n.uint32());continue;case 6:if(50!==e)break;o.attributes.push(hY.decode(n,n.uint32()));continue;case 7:if(56!==e)break;o.droppedAttributesCount=n.uint32();continue;case 8:if(69!==e)break;o.flags=n.fixed32();continue;case 9:if(74!==e)break;o.traceId=n.bytes();continue;case 10:if(82!==e)break;o.spanId=n.bytes();continue}if(4==(7&e)||0===e)break;n.skipType(7&e)}return o},fromJSON:e=>({timeUnixNano:MY(e.timeUnixNano)?globalThis.Number(e.timeUnixNano):0,observedTimeUnixNano:MY(e.observedTimeUnixNano)?globalThis.Number(e.observedTimeUnixNano):0,severityNumber:MY(e.severityNumber)?TY(e.severityNumber):0,severityText:MY(e.severityText)?globalThis.String(e.severityText):"",body:MY(e.body)?pY.fromJSON(e.body):void 0,attributes:globalThis.Array.isArray(null==e?void 0:e.attributes)?e.attributes.map((e=>hY.fromJSON(e))):[],droppedAttributesCount:MY(e.droppedAttributesCount)?globalThis.Number(e.droppedAttributesCount):0,flags:MY(e.flags)?globalThis.Number(e.flags):0,traceId:MY(e.traceId)?PY(e.traceId):new Uint8Array(0),spanId:MY(e.spanId)?PY(e.spanId):new Uint8Array(0)}),toJSON(e){var t;const n={};return void 0!==e.timeUnixNano&&0!==e.timeUnixNano&&(n.timeUnixNano=Math.round(e.timeUnixNano)),void 0!==e.observedTimeUnixNano&&0!==e.observedTimeUnixNano&&(n.observedTimeUnixNano=Math.round(e.observedTimeUnixNano)),void 0!==e.severityNumber&&0!==e.severityNumber&&(n.severityNumber=function(e){switch(e){case EY.SEVERITY_NUMBER_UNSPECIFIED:return"SEVERITY_NUMBER_UNSPECIFIED";case EY.SEVERITY_NUMBER_TRACE:return"SEVERITY_NUMBER_TRACE";case EY.SEVERITY_NUMBER_TRACE2:return"SEVERITY_NUMBER_TRACE2";case EY.SEVERITY_NUMBER_TRACE3:return"SEVERITY_NUMBER_TRACE3";case EY.SEVERITY_NUMBER_TRACE4:return"SEVERITY_NUMBER_TRACE4";case EY.SEVERITY_NUMBER_DEBUG:return"SEVERITY_NUMBER_DEBUG";case EY.SEVERITY_NUMBER_DEBUG2:return"SEVERITY_NUMBER_DEBUG2";case EY.SEVERITY_NUMBER_DEBUG3:return"SEVERITY_NUMBER_DEBUG3";case EY.SEVERITY_NUMBER_DEBUG4:return"SEVERITY_NUMBER_DEBUG4";case EY.SEVERITY_NUMBER_INFO:return"SEVERITY_NUMBER_INFO";case EY.SEVERITY_NUMBER_INFO2:return"SEVERITY_NUMBER_INFO2";case EY.SEVERITY_NUMBER_INFO3:return"SEVERITY_NUMBER_INFO3";case EY.SEVERITY_NUMBER_INFO4:return"SEVERITY_NUMBER_INFO4";case EY.SEVERITY_NUMBER_WARN:return"SEVERITY_NUMBER_WARN";case EY.SEVERITY_NUMBER_WARN2:return"SEVERITY_NUMBER_WARN2";case EY.SEVERITY_NUMBER_WARN3:return"SEVERITY_NUMBER_WARN3";case EY.SEVERITY_NUMBER_WARN4:return"SEVERITY_NUMBER_WARN4";case EY.SEVERITY_NUMBER_ERROR:return"SEVERITY_NUMBER_ERROR";case EY.SEVERITY_NUMBER_ERROR2:return"SEVERITY_NUMBER_ERROR2";case EY.SEVERITY_NUMBER_ERROR3:return"SEVERITY_NUMBER_ERROR3";case EY.SEVERITY_NUMBER_ERROR4:return"SEVERITY_NUMBER_ERROR4";case EY.SEVERITY_NUMBER_FATAL:return"SEVERITY_NUMBER_FATAL";case EY.SEVERITY_NUMBER_FATAL2:return"SEVERITY_NUMBER_FATAL2";case EY.SEVERITY_NUMBER_FATAL3:return"SEVERITY_NUMBER_FATAL3";case EY.SEVERITY_NUMBER_FATAL4:return"SEVERITY_NUMBER_FATAL4";case EY.UNRECOGNIZED:default:return"UNRECOGNIZED"}}(e.severityNumber)),void 0!==e.severityText&&""!==e.severityText&&(n.severityText=e.severityText),void 0!==e.body&&(n.body=pY.toJSON(e.body)),(null===(t=e.attributes)||void 0===t?void 0:t.length)&&(n.attributes=e.attributes.map((e=>hY.toJSON(e)))),void 0!==e.droppedAttributesCount&&0!==e.droppedAttributesCount&&(n.droppedAttributesCount=Math.round(e.droppedAttributesCount)),void 0!==e.flags&&0!==e.flags&&(n.flags=Math.round(e.flags)),void 0!==e.traceId&&0!==e.traceId.length&&(n.traceId=xY(e.traceId)),void 0!==e.spanId&&0!==e.spanId.length&&(n.spanId=xY(e.spanId)),n},create:e=>IY.fromPartial(null!=e?e:{}),fromPartial(e){var t,n,r,o,i,a,s,c,u;const l=NY();return l.timeUnixNano=null!==(t=e.timeUnixNano)&&void 0!==t?t:0,l.observedTimeUnixNano=null!==(n=e.observedTimeUnixNano)&&void 0!==n?n:0,l.severityNumber=null!==(r=e.severityNumber)&&void 0!==r?r:0,l.severityText=null!==(o=e.severityText)&&void 0!==o?o:"",l.body=void 0!==e.body&&null!==e.body?pY.fromPartial(e.body):void 0,l.attributes=(null===(i=e.attributes)||void 0===i?void 0:i.map((e=>hY.fromPartial(e))))||[],l.droppedAttributesCount=null!==(a=e.droppedAttributesCount)&&void 0!==a?a:0,l.flags=null!==(s=e.flags)&&void 0!==s?s:0,l.traceId=null!==(c=e.traceId)&&void 0!==c?c:new Uint8Array(0),l.spanId=null!==(u=e.spanId)&&void 0!==u?u:new Uint8Array(0),l}};function PY(e){if(globalThis.Buffer)return Uint8Array.from(globalThis.Buffer.from(e,"base64"));{const t=globalThis.atob(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;++e)n[e]=t.charCodeAt(e);return n}}function xY(e){if(globalThis.Buffer)return globalThis.Buffer.from(e).toString("base64");{const t=[];return e.forEach((e=>{t.push(globalThis.String.fromCharCode(e))})),globalThis.btoa(t.join(""))}}function CY(e){if(e.gt(globalThis.Number.MAX_SAFE_INTEGER))throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");return e.toNumber()}function MY(e){return null!=e}lY.util.Long!==VH&&(lY.util.Long=VH,lY.configure());const LY="0.0.20",UY={"Content-Type":"application/x-protobuf","Content-Encoding":"gzip"},kY=OY;function DY(e){return Array.isArray(e)}function jY(e){return function(e){return!!e&&"object"==typeof e&&!DY(e)}(e)?{kvlistValue:{values:Object.entries(e).map((([e,t])=>({key:e,value:jY(t)})))}}:DY(e)?{arrayValue:{values:e.map((e=>jY(e)))}}:"string"==typeof e?{stringValue:e}:"number"==typeof e?{doubleValue:e}:"boolean"==typeof e?{boolValue:e}:{}}class BY{constructor(e){this.config=e}constructLogData(e){var t,n,r;return{resourceLogs:[{resource:{attributes:null===(r=null===(n=jY((null===(t=this.config.resource)||void 0===t?void 0:t.attributes)||{}))||void 0===n?void 0:n.kvlistValue)||void 0===r?void 0:r.values},scopeLogs:[{scope:{name:"rum.rr-web",version:LY},logRecords:e.map((e=>{var t,n;return{body:jY(null!==(t=e.body)&&void 0!==t?t:{}),timeUnixNano:1e6*e.timeUnixNano,attributes:null===(n=jY(e.attributes||{}).kvlistValue)||void 0===n?void 0:n.values}}))}]}]}}export(e){if(0===e.length)return;const t=this.constructLogData(e);this.config.debug&&console.log("otlp request",t);const n=DH(kY.encode(t).finish()),r=this.config.headers?Object.assign({},UY,this.config.headers):UY;fetch(this.config.beaconUrl,{method:"POST",body:n,headers:r}).catch((e=>{Nt.error("Error sending OTLP logs:",e)}))}}class VY{constructor(e,t){this.logs=[],this.scheduledDelayMillis=(null==t?void 0:t.scheduledDelayMillis)||5e3,this.exporter=e,window.addEventListener("unload",(()=>{this._flushAll()}))}onLog(e){this.logs.push(e),void 0===this.timeout&&(this.timeout=setTimeout((()=>{this.timeout=void 0,this._flushAll()}),this.scheduledDelayMillis))}_flushAll(){this.lastBatchSent=Date.now(),Rt.with(Qm(Rt.active()),(()=>{const e=this.logs.splice(0,this.logs.length);this.exporter.export(e)}))}}function FY(e,t,n){return{body:e,timeUnixNano:t,attributes:n}}class GY{constructor(e,t={}){var n,r;this.rrweb=e,this.options=t,this.bucketSize=100,this.refillRate=10,this.mutationBuckets={},this.loggedTracker={},this.refillBuckets=()=>{Object.keys(this.mutationBuckets).forEach((e=>{this.mutationBuckets[e]=this.mutationBuckets[e]+this.refillRate,this.mutationBuckets[e]>=this.bucketSize&&delete this.mutationBuckets[e]}))},this.getNodeOrRelevantParent=e=>{const t=this.rrweb.mirror.getNode(e);if("svg"!==(null==t?void 0:t.nodeName)&&t instanceof Element){const e=t.closest("svg");if(e)return[this.rrweb.mirror.getId(e),e]}return[e,t]},this.numberOfChanges=e=>{var t,n,r,o,i,a,s,c;return(null!==(n=null===(t=e.removes)||void 0===t?void 0:t.length)&&void 0!==n?n:0)+(null!==(o=null===(r=e.attributes)||void 0===r?void 0:r.length)&&void 0!==o?o:0)+(null!==(a=null===(i=e.texts)||void 0===i?void 0:i.length)&&void 0!==a?a:0)+(null!==(c=null===(s=e.adds)||void 0===s?void 0:s.length)&&void 0!==c?c:0)},this.throttleMutations=e=>{if(3!==e.type||0!==e.data.source)return e;const t=e.data,n=this.numberOfChanges(t);t.attributes&&(t.attributes=t.attributes.filter((e=>{var t,n,r;const[o,i]=this.getNodeOrRelevantParent(e.id);return 0!==this.mutationBuckets[o]&&(this.mutationBuckets[o]=null!==(t=this.mutationBuckets[o])&&void 0!==t?t:this.bucketSize,this.mutationBuckets[o]=Math.max(this.mutationBuckets[o]-1,0),0===this.mutationBuckets[o]&&(this.loggedTracker[o]||(this.loggedTracker[o]=!0,null===(r=(n=this.options).onBlockedNode)||void 0===r||r.call(n,o,i))),e)})));const r=this.numberOfChanges(t);return 0!==r||n===r?e:void 0},this.refillRate=null!==(n=this.options.refillRate)&&void 0!==n?n:this.refillRate,this.bucketSize=null!==(r=this.options.bucketSize)&&void 0!==r?r:this.bucketSize,setInterval((()=>{this.refillBuckets()}),1e3)}}Ty();var HY=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n};const YY=972800,qY=new TextEncoder,zY=new TextDecoder;let KY,WY,QY,JY,$Y=!1,XY=0,ZY=!1,eq=1,tq=1;const nq={get inited(){return Boolean($Y)},init(e){if($Y)return;if("undefined"==typeof window)return void console.error("Session recorder can't be ran in non-browser environments");let t=zt.getTracerProvider();if(t&&"getDelegate"in t&&(t=t.getDelegate()),!(null==t?void 0:t.resource))return void console.error("RUM OTEL Web must be inited before recorder.");const n=t.resource,{apiKey:r,url:o,debug:i}=e,a=HY(e,["apiKey","url","debug"]);KY=zt.getTracer("rum.rr-web",LY);const s=KY.startSpan("record init");if(function(e){e.setAttribute("session.id","")}(s),s.setAttribute("span.type","record"),!s.isRecording())return;s.end();const c=new BY({beaconUrl:null!=o?o:"https://in-otel.imqa.io/v1/logs",debug:i,resource:n}),u=new VY(c,{});WY=n.attributes["rum.sessionId"],XY=Date.now(),QY=null!=QY?QY:new GY(rH,{onBlockedNode:(e,t)=>{const n=`OpenTelemetry Session Recorder: Rate limiting recording mutations on node ${e}. This can be due to excessive animations.`,r=Date.now(),o=KY.startSpan("console.warn",{kind:gt.INTERNAL,startTime:r});o.setAttribute("component","console"),o.setAttribute("level","warn"),o.setAttribute("message",n),o.end(r),i&&console.warn(n,t),clearTimeout(JY),JY=setTimeout((()=>{rH.takeFullSnapshot()}),1e3)}}),$Y=rH(Object.assign(Object.assign({maskAllInputs:!0,maskTextSelector:"*"},a),{emit(e){if(ZY)return;if(n.attributes["rum.sessionId"]!==WY){if(document.hidden)return;WY=n.attributes["rum.sessionId"],XY=Date.now(),eq=1,tq=1,rH.takeFullSnapshot()}if(e.timestamp>XY+1446e4)return;const t=QY?QY.throttleMutations(e):e;if(!t)return;const r=t.timestamp,o=eq++,a=qY.encode(function(e){if(e.length>5e6){const t=/data:([\w/\-.]+);(\w+),([^)"]*)/gim,n=e.matchAll(t);for(const t of n)e="image/"===t[1].toLocaleLowerCase().slice(0,6)?e.replace(t[0],"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3Qgd2lkdGg9IjE2IiBoZWlnaHQ9IjE2IiBmaWxsPSJibGFjayIvPgo8cGF0aCBkPSJNOCAwSDE2TDAgMTZWOEw4IDBaIiBmaWxsPSIjMkQyRDJEIi8+CjxwYXRoIGQ9Ik0xNiA4VjE2SDhMMTYgOFoiIGZpbGw9IiMyRDJEMkQiLz4KPC9zdmc+Cg=="):e.replace(t[0],"")}return e}(JSON.stringify(t))),s=Math.ceil(a.byteLength/YY);for(let e=0;e<s;e++){const t=e*YY,n=(e+1)*YY,c=FY(zY.decode(a.slice(t,n)),r,{"rr-web.offset":tq++,"rr-web.event":o,"rr-web.chunk":e+1,"rr-web.total-chunks":s});i&&console.log(c),u.onLog(c)}}}))},resume(){if(!$Y)return;const e=ZY;ZY=!1,e||(rH.takeFullSnapshot(),KY.startSpan("record resume").end())},stop(){$Y&&(ZY&&KY.startSpan("record stop").end(),ZY=!0)},deinit(){$Y&&($Y(),$Y=!1)}},rq="__imqa_service_status";function oq(){if("undefined"==typeof window||!window.localStorage)return null;try{const e=window.localStorage.getItem(rq);if(e)return JSON.parse(e)}catch(e){Nt.error("IMQA: Failed to read service status from localStorage",e)}return null}function iq(e){switch(e.toLowerCase()){case"android":return"ANDROID";case"ios":return"IOS";default:return"WEB"}}class aq{constructor(e){this._failureCount=0,this._dropPolicy=!1,this._targetDropCount=0,this._onThresholdReached=null,this._thresholdReached=!1,(null==e?void 0:e.onThresholdReached)&&(this._onThresholdReached=e.onThresholdReached),this._loadFromStorage()}_loadFromStorage(){const e=oq();e&&(this._dropPolicy=e.dropPolicy,this._targetDropCount=e.targetDropCount)}updatePolicy(e,t){this._dropPolicy=e,this._targetDropCount=t,Nt.debug(`IMQA: ExporterFailureTracker policy updated - dropPolicy: ${e}, targetDropCount: ${t}`)}reset(){this._failureCount=0,this._thresholdReached=!1,this._saveFailureCount(),Nt.debug("IMQA: ExporterFailureTracker reset")}recordFailure(){return!!this._dropPolicy&&(this._failureCount++,this._saveFailureCount(),Nt.debug(`IMQA: Exporter failure recorded (${this._failureCount}/${this._targetDropCount})`),this._failureCount>=this._targetDropCount&&!this._thresholdReached&&(this._thresholdReached=!0,Nt.warn(`IMQA: Exporter failure threshold reached (${this._failureCount}/${this._targetDropCount}). Instrumentation will be disabled.`),this._onThresholdReached&&this._onThresholdReached(),!0))}recordSuccess(){}getFailureCount(){return this._failureCount}isThresholdReached(){return this._thresholdReached}isDropPolicyEnabled(){return this._dropPolicy}getTargetDropCount(){return this._targetDropCount}_saveFailureCount(){if("undefined"!=typeof window&&window.localStorage)try{window.localStorage.setItem("__imqa_exporter_failure_count",String(this._failureCount))}catch(e){Nt.error("IMQA: Failed to save failure count to localStorage",e)}}}function sq(){return"undefined"!=typeof window}var cq=new class{constructor(){this._advancedNetworkCapture=!1,this._failureTracker=null,this._serviceStatusChecked=!1,this._exporterEventHandler=null,this._webviewNativeResource={},this.userEvent={start:(e,t)=>{if(!sq())throw new Error("IMQA: browser not supported, disabling instrumentation.");return wF.userEvent.start(e,t)},end:(e,t)=>{if(!sq())throw new Error("IMQA: browser not supported, disabling instrumentation.");return wF.userEvent.end(e,t)},getActive:()=>{if(!sq())throw new Error("IMQA: browser not supported, disabling instrumentation.");return wF.userEvent.getActive()},cancel:e=>{if(!sq())throw new Error("IMQA: browser not supported, disabling instrumentation.");return wF.userEvent.cancel(e)},getActiveContext:()=>{if(!sq())throw new Error("IMQA: browser not supported, disabling instrumentation.");return wF.userEvent.getActiveContext()},getContext:e=>{if(!sq())throw new Error("IMQA: browser not supported, disabling instrumentation.");return wF.userEvent.getContext(e)},hasActiveUserEvent:()=>{if(!sq())throw new Error("IMQA: browser not supported, disabling instrumentation.");return wF.userEvent.hasActiveUserEvent()},with:(e,t)=>{if(!sq())throw new Error("IMQA: browser not supported, disabling instrumentation.");return wF.userEvent.with(e,t)},withActive:e=>{if(!sq())throw new Error("IMQA: browser not supported, disabling instrumentation.");return wF.userEvent.withActive(e)},switchTo:e=>{if(!sq())throw new Error("IMQA: browser not supported, disabling instrumentation.");return wF.userEvent.switchTo(e)},hasStoredEvent:e=>{if(!sq())throw new Error("IMQA: browser not supported, disabling instrumentation.");return wF.userEvent.hasStoredEvent(e)},getStoredEvents:()=>{if(!sq())throw new Error("IMQA: browser not supported, disabling instrumentation.");return wF.userEvent.getStoredEvents()},hasAnyStoredEvents:()=>{if(!sq())throw new Error("IMQA: browser not supported, disabling instrumentation.");return wF.userEvent.hasAnyStoredEvents()},cleanup:()=>{if(!sq())throw new Error("IMQA: browser not supported, disabling instrumentation.");return wF.userEvent.cleanup()}}}async init(e={}){if(!sq())return;const{defaultAttributes:t,advancedNetworkCapture:n=!1,blockClass:r,consoleCapture:o,debug:i=!1,disableIntercom:a=!1,disableReplay:s=!0,ignoreClass:c,ignoreUrls:u,instrumentations:l={},maskAllInputs:p=!0,maskAllText:d=!1,maskClass:f,recordCanvas:h=!1,sampling:m,tracePropagationTargets:g,webVitals:_=!0,websocket:y=!1,socketio:v=!1,captureMetrics:b=!1,disablePreflight:E=!1,opampServerUrl:S,exporterProtocol:T="json",screenNameOption:O,sessionStorage:A="cookie"}=e,w=this._webviewParamsControl(e);if(!w)return;const{urlBase:R,serviceName:N,serviceKey:I,serviceVersion:P,webServiceVersion:x,serviceType:C,serviceNamespace:M,deploymentEnvironment:L}=w;this._advancedNetworkCapture=n,window.IMQA=wF;const U=N&&P&&I&&R;if(!function(){const e=oq();return null===e||e.isCollecting}())return Nt.info("IMQA: Instrumentation disabled based on previous service status (isCollecting: false)"),void(U&&this._checkAndUpdateServiceStatus(R,N,P,I,C));if(this._failureTracker=new aq({onThresholdReached:()=>{Nt.warn("IMQA: Exporter failure threshold reached. Deinitializing instrumentation."),this.deinit()}}),this._failureTracker.reset(),this._setupExporterEventListener(),U&&this._checkAndUpdateServiceStatus(R,N,P,I,C),!window.__imqa_deactivated){const e={screenNameOption:O};wF.init({debug:i,collectorUrl:R,allowInsecureUrl:!0,deploymentEnvironment:L,globalAttributes:{...t},webviewNativeResource:this._webviewNativeResource,serviceNamespace:M,serviceName:N,serviceVersion:P,webServiceVersion:x,serviceKey:I,serviceType:C,ignoreUrls:u,captureMetrics:b,disablePreflight:E,exporterProtocol:T,sessionStorage:A,instrumentations:{visibility:e,console:!!o&&e,webvitals:!!_&&e,websocket:!!y&&e,socketio:!!v&&e,connectivity:e,longtask:e,errors:e,document:e,postload:e,fetch:{...null!=g?{propagateTraceHeaderCorsUrls:g}:{},...e,advancedNetworkCapture:()=>this._advancedNetworkCapture},xhr:{...null!=g?{propagateTraceHeaderCorsUrls:g}:{},...e,advancedNetworkCapture:()=>this._advancedNetworkCapture},...l},version:"1.4.4",opampServerUrl:S}),this._webviewNativeResource["user.id"]&&wF.setGlobalAttributes({"user.id":this._webviewNativeResource["user.id"]})}!0!==s&&nq.init({blockClass:r,debug:i,ignoreClass:c,maskAllInputs:p,maskTextClass:f,maskTextSelector:d?"*":void 0,recordCanvas:h,sampling:m,url:`${R}/v1/logs`});const k=Kt.trace.getTracer("@imqa/web-agent");var D;!0!==a&&(D="Intercom",new Promise(((e,t)=>{let n=0;const r=setInterval((()=>{n>20&&(clearInterval(r),t(new Error(`Global ${D} not found`))),window[D]&&(clearInterval(r),e(window[D])),n++}),100)}))).then((()=>{window.Intercom("onShow",(()=>{const e=this.getSessionUrl();if(null!=e){const t={imqaSessionUrl:e};window.Intercom("update",t),window.Intercom("trackEvent","IMQA",t);const n=Date.now(),r=k.startSpan("intercom.onShow",{startTime:n});r.setAttribute("component","intercom"),r.end(n)}}))})).catch((e=>{Nt.error("Error initializing Intercom:",e)})),this.opamp=wF.opampClient}deinit(){sq()&&(this._removeExporterEventListener(),wF.inited&&wF.deinit(),nq.inited&&nq.deinit(),this.opamp=void 0,this._failureTracker=null)}get inited(){return wF.inited}stopSessionRecorder(){sq()&&nq.stop()}resumeSessionRecorder(){sq()&&nq.resume()}addAction(e,t){sq()&&wF.addAction(e,t)}recordException(e,t){sq()&&wF.recordException(e,t)}recordLog(e,t){sq()&&wF.recordLog(e,t)}enableAdvancedNetworkCapture(){this._advancedNetworkCapture=!0}disableAdvancedNetworkCapture(){this._advancedNetworkCapture=!1}setGlobalAttributes(e){sq()&&wF.setGlobalAttributes(e)}setUserIdAttribute(e){sq()&&wF.setGlobalAttributes({"user.id":e})}setAreaCodeAttribute(e){sq()&&wF.setGlobalAttributes({"area.code":e})}getSessionId(){return wF.getSessionId()}getSessionUrl(){const e=Date.now(),t=144e5,n=e-t,r=e+t;return wF.inited?`https://www.imqa.io/sessions?q=process.tag.rum.sessionId%3A"${wF.getSessionId()}"&sid=${wF.getSessionId()}&sfrom=${n}&sto=${r}&ts=${e}`:void 0}attachToReactErrorBoundary(e){if(!e)return Nt.warn("Attempted to attach to an ErrorBoundary that does not exist.");const t=this.recordException,n=e.prototype.componentDidCatch;e.prototype.componentDidCatch=function(e,r){const o=null==r?void 0:r.componentStack;t(e,{componentStack:o}),n.call(this,e,r)}}_webviewParamsControl(e){if(!sq())return;let{collectorUrl:t,serviceName:n,serviceKey:r,serviceVersion:o,serviceNamespace:i,deploymentEnvironment:a}=e;const s=o;let c="web",u=!1;if(window.IMQANative){const{__imqa_shared_session:e,__imqa_session_id:t,__imqa_service_name:n,__imqa_service_key:r,__imqa_service_version:o,__imqa_service_type:i,__imqa_collector_url:a,__imqa_deactivated:s,__imqa_service_namespace:c,__imqa_deployment_environment_name:l}=IN.safeJsonParse(window.IMQANative.getSession(),{});if(e&&(window.__imqa_shared_session=e,u=!0),s&&(window.__imqa_deactivated=s),t&&(window.__imqa_session_id=t),n&&(window.__imqa_service_name=n),r&&(window.__imqa_service_key=r),i&&(window.__imqa_service_type=i||"web"),o&&(window.__imqa_service_version=o),a&&(window.__imqa_collector_url=a),c&&(window.__imqa_service_namespace=c),l&&(window.__imqa_deployment_environment_name=l),window.IMQANative.getResources){const e=IN.safeJsonParse(window.IMQANative.getResources(),{});this._webviewNativeResource=e}}if(window.__imqa_resources&&(this._webviewNativeResource={...this._webviewNativeResource,...window.__imqa_resources}),window.__imqa_shared_session&&(window.__imqa_service_type&&(c=window.__imqa_service_type),window.__imqa_session_id&&(n=window.__imqa_service_name),window.__imqa_service_key&&(r=window.__imqa_service_key),window.__imqa_service_version&&(o=window.__imqa_service_version),window.__imqa_collector_url&&(t=window.__imqa_collector_url),window.__imqa_service_namespace&&(i=window.__imqa_service_namespace),window.__imqa_deployment_environment_name&&(a=window.__imqa_deployment_environment_name)),null==t?Nt.warn("IMQA: Missing collectorUrl, telemetry will not be saved."):""===t?Nt.warn("IMQA: collectorUrl is empty string, telemetry will not be saved."):"string"!=typeof t&&Nt.warn("IMQA: collectorUrl must be a string, telemetry will not be saved."),null==o?Nt.warn("IMQA: Missing serviceVersion, telemetry will not be saved."):""===o?Nt.warn("IMQA: serviceVersion is empty string, telemetry will not be saved."):"string"!=typeof o&&Nt.warn("IMQA: serviceVersion must be a string, telemetry will not be saved."),null==n?Nt.warn("IMQA: Missing serviceName, telemetry will not be saved."):""===n?Nt.warn("IMQA: serviceName is empty string, telemetry will not be saved."):"string"!=typeof n&&Nt.warn("IMQA: serviceName must be a string, telemetry will not be saved."),null==r?Nt.warn("IMQA: Missing serviceKey, telemetry will not be saved."):""===r?Nt.warn("IMQA: serviceKey is empty string, telemetry will not be saved."):"string"!=typeof r&&Nt.warn("IMQA: serviceKey must be a string, telemetry will not be saved."),!t)throw new Error("IMQA: Missing url, telemetry will not be saved.");return{urlBase:null!=t?t:"https://in-otel.imqa.io",serviceName:n,serviceKey:r,serviceVersion:o,webServiceVersion:u?s:o,serviceType:c,serviceNamespace:i,deploymentEnvironment:a,isWebview:u}}_setupExporterEventListener(){sq()&&(this._removeExporterEventListener(),this._exporterEventHandler=e=>{var t,n;const r=e;"failure"===(null===(t=r.detail)||void 0===t?void 0:t.type)?this.recordExporterFailure():"success"===(null===(n=r.detail)||void 0===n?void 0:n.type)&&this.recordExporterSuccess()},window.addEventListener("imqa:exporter",this._exporterEventHandler))}_removeExporterEventListener(){sq()&&this._exporterEventHandler&&(window.removeEventListener("imqa:exporter",this._exporterEventHandler),this._exporterEventHandler=null)}async _checkAndUpdateServiceStatus(e,t,n,r,o){if(!this._serviceStatusChecked)try{const i={service_name:t,service_version:n,service_key:r,os_name:iq(o)},a=await async function(e,t){try{const n=new URL("/v2/service/status",e).href,r=await fetch(n,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});return r.ok?await r.json():(Nt.warn(`IMQA: Service status API returned ${r.status}`,r.statusText),null)}catch(e){return Nt.error("IMQA: Failed to fetch service status",e),null}}(e,i);a&&(!function(e){if("undefined"!=typeof window&&window.localStorage)try{const t={isCollecting:e.isCollecting,dropPolicy:e.dropPolicy,targetDropCount:e.targetDropCount,token:e.token,updatedAt:Date.now()};window.localStorage.setItem(rq,JSON.stringify(t))}catch(e){Nt.error("IMQA: Failed to save service status to localStorage",e)}}(a),this._serviceStatusChecked=!0,this._failureTracker&&this._failureTracker.updatePolicy(a.dropPolicy,a.targetDropCount),Nt.debug("IMQA: Service status updated",{isCollecting:a.isCollecting,dropPolicy:a.dropPolicy,targetDropCount:a.targetDropCount}),a.isCollecting||Nt.info("IMQA: isCollecting is false. Instrumentation will be disabled on next init."))}catch(e){Nt.error("IMQA: Failed to check service status",e)}}recordExporterFailure(){return!!this._failureTracker&&this._failureTracker.recordFailure()}recordExporterSuccess(){this._failureTracker&&this._failureTracker.recordSuccess()}getDeviceId(){try{const e=this._webviewNativeResource["device.id"];return"string"==typeof e&&e?e:null}catch{return null}}getServiceStatus(){const e=oq();return e?{isCollecting:e.isCollecting,dropPolicy:e.dropPolicy,targetDropCount:e.targetDropCount,token:e.token}:null}};return cq}));
