var e={880:function(e){e.exports=function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=90)}({17:function(e,t,r){t.__esModule=!0,t.default=void 0;var n=r(18),o=function(){function e(){}return e.getFirstMatch=function(e,t){var r=t.match(e);return r&&r.length>0&&r[1]||""},e.getSecondMatch=function(e,t){var r=t.match(e);return r&&r.length>1&&r[2]||""},e.matchAndReturnConst=function(e,t,r){if(e.test(t))return r},e.getWindowsVersionName=function(e){switch(e){case"NT":return"NT";case"XP":case"NT 5.1":return"XP";case"NT 5.0":return"2000";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}},e.getMacOSVersionName=function(e){var t=e.split(".").splice(0,2).map((function(e){return parseInt(e,10)||0}));t.push(0);var r=t[0],n=t[1];if(10===r)switch(n){case 5:return"Leopard";case 6:return"Snow Leopard";case 7:return"Lion";case 8:return"Mountain Lion";case 9:return"Mavericks";case 10:return"Yosemite";case 11:return"El Capitan";case 12:return"Sierra";case 13:return"High Sierra";case 14:return"Mojave";case 15:return"Catalina";default:return}switch(r){case 11:return"Big Sur";case 12:return"Monterey";case 13:return"Ventura";case 14:return"Sonoma";case 15:return"Sequoia";default:return}},e.getAndroidVersionName=function(e){var t=e.split(".").splice(0,2).map((function(e){return parseInt(e,10)||0}));if(t.push(0),!(1===t[0]&&t[1]<5))return 1===t[0]&&t[1]<6?"Cupcake":1===t[0]&&t[1]>=6?"Donut":2===t[0]&&t[1]<2?"Eclair":2===t[0]&&2===t[1]?"Froyo":2===t[0]&&t[1]>2?"Gingerbread":3===t[0]?"Honeycomb":4===t[0]&&t[1]<1?"Ice Cream Sandwich":4===t[0]&&t[1]<4?"Jelly Bean":4===t[0]&&t[1]>=4?"KitKat":5===t[0]?"Lollipop":6===t[0]?"Marshmallow":7===t[0]?"Nougat":8===t[0]?"Oreo":9===t[0]?"Pie":void 0},e.getVersionPrecision=function(e){return e.split(".").length},e.compareVersions=function(t,r,n){void 0===n&&(n=!1);var o=e.getVersionPrecision(t),i=e.getVersionPrecision(r),a=Math.max(o,i),s=0,u=e.map([t,r],(function(t){var r=a-e.getVersionPrecision(t),n=t+new Array(r+1).join(".0");return e.map(n.split("."),(function(e){return new Array(20-e.length).join("0")+e})).reverse()}));for(n&&(s=a-Math.min(o,i)),a-=1;a>=s;){if(u[0][a]>u[1][a])return 1;if(u[0][a]===u[1][a]){if(a===s)return 0;a-=1}else if(u[0][a]1?o-1:0),a=1;a0){var a=Object.keys(r),u=s.default.find(a,(function(e){return t.isOS(e)}));if(u){var c=this.satisfies(r[u]);if(void 0!==c)return c}var l=s.default.find(a,(function(e){return t.isPlatform(e)}));if(l){var f=this.satisfies(r[l]);if(void 0!==f)return f}}if(i>0){var d=Object.keys(o),p=s.default.find(d,(function(e){return t.isBrowser(e,!0)}));if(void 0!==p)return this.compareVersion(o[p])}},t.isBrowser=function(e,t){void 0===t&&(t=!1);var r=this.getBrowserName().toLowerCase(),n=e.toLowerCase(),o=s.default.getBrowserTypeByAlias(n);return t&&o&&(n=o.toLowerCase()),n===r},t.compareVersion=function(e){var t=[0],r=e,n=!1,o=this.getBrowserVersion();if("string"==typeof o)return">"===e[0]||"<"===e[0]?(r=e.substr(1),"="===e[1]?(n=!0,r=e.substr(2)):t=[],">"===e[0]?t.push(1):t.push(-1)):"="===e[0]?r=e.substr(1):"~"===e[0]&&(n=!0,r=e.substr(1)),t.indexOf(s.default.compareVersions(o,r,n))>-1},t.isOS=function(e){return this.getOSName(!0)===String(e).toLowerCase()},t.isPlatform=function(e){return this.getPlatformType(!0)===String(e).toLowerCase()},t.isEngine=function(e){return this.getEngineName(!0)===String(e).toLowerCase()},t.is=function(e,t){return void 0===t&&(t=!1),this.isBrowser(e,t)||this.isOS(e)||this.isPlatform(e)},t.some=function(e){var t=this;return void 0===e&&(e=[]),e.some((function(e){return t.is(e)}))},e}();t.default=c,e.exports=t.default},92:function(e,t,r){t.__esModule=!0,t.default=void 0;var n,o=(n=r(17))&&n.__esModule?n:{default:n},i=/version\/(\d+(\.?_?\d+)+)/i,a=[{test:[/gptbot/i],describe:function(e){var t={name:"GPTBot"},r=o.default.getFirstMatch(/gptbot\/(\d+(\.\d+)+)/i,e)||o.default.getFirstMatch(i,e);return r&&(t.version=r),t}},{test:[/chatgpt-user/i],describe:function(e){var t={name:"ChatGPT-User"},r=o.default.getFirstMatch(/chatgpt-user\/(\d+(\.\d+)+)/i,e)||o.default.getFirstMatch(i,e);return r&&(t.version=r),t}},{test:[/oai-searchbot/i],describe:function(e){var t={name:"OAI-SearchBot"},r=o.default.getFirstMatch(/oai-searchbot\/(\d+(\.\d+)+)/i,e)||o.default.getFirstMatch(i,e);return r&&(t.version=r),t}},{test:[/claudebot/i,/claude-web/i,/claude-user/i,/claude-searchbot/i],describe:function(e){var t={name:"ClaudeBot"},r=o.default.getFirstMatch(/(?:claudebot|claude-web|claude-user|claude-searchbot)\/(\d+(\.\d+)+)/i,e)||o.default.getFirstMatch(i,e);return r&&(t.version=r),t}},{test:[/omgilibot/i,/webzio-extended/i],describe:function(e){var t={name:"Omgilibot"},r=o.default.getFirstMatch(/(?:omgilibot|webzio-extended)\/(\d+(\.\d+)+)/i,e)||o.default.getFirstMatch(i,e);return r&&(t.version=r),t}},{test:[/diffbot/i],describe:function(e){var t={name:"Diffbot"},r=o.default.getFirstMatch(/diffbot\/(\d+(\.\d+)+)/i,e)||o.default.getFirstMatch(i,e);return r&&(t.version=r),t}},{test:[/perplexitybot/i],describe:function(e){var t={name:"PerplexityBot"},r=o.default.getFirstMatch(/perplexitybot\/(\d+(\.\d+)+)/i,e)||o.default.getFirstMatch(i,e);return r&&(t.version=r),t}},{test:[/perplexity-user/i],describe:function(e){var t={name:"Perplexity-User"},r=o.default.getFirstMatch(/perplexity-user\/(\d+(\.\d+)+)/i,e)||o.default.getFirstMatch(i,e);return r&&(t.version=r),t}},{test:[/youbot/i],describe:function(e){var t={name:"YouBot"},r=o.default.getFirstMatch(/youbot\/(\d+(\.\d+)+)/i,e)||o.default.getFirstMatch(i,e);return r&&(t.version=r),t}},{test:[/meta-webindexer/i],describe:function(e){var t={name:"Meta-WebIndexer"},r=o.default.getFirstMatch(/meta-webindexer\/(\d+(\.\d+)+)/i,e)||o.default.getFirstMatch(i,e);return r&&(t.version=r),t}},{test:[/meta-externalads/i],describe:function(e){var t={name:"Meta-ExternalAds"},r=o.default.getFirstMatch(/meta-externalads\/(\d+(\.\d+)+)/i,e)||o.default.getFirstMatch(i,e);return r&&(t.version=r),t}},{test:[/meta-externalagent/i],describe:function(e){var t={name:"Meta-ExternalAgent"},r=o.default.getFirstMatch(/meta-externalagent\/(\d+(\.\d+)+)/i,e)||o.default.getFirstMatch(i,e);return r&&(t.version=r),t}},{test:[/meta-externalfetcher/i],describe:function(e){var t={name:"Meta-ExternalFetcher"},r=o.default.getFirstMatch(/meta-externalfetcher\/(\d+(\.\d+)+)/i,e)||o.default.getFirstMatch(i,e);return r&&(t.version=r),t}},{test:[/googlebot/i],describe:function(e){var t={name:"Googlebot"},r=o.default.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,e)||o.default.getFirstMatch(i,e);return r&&(t.version=r),t}},{test:[/linespider/i],describe:function(e){var t={name:"Linespider"},r=o.default.getFirstMatch(/(?:linespider)(?:-[-\w]+)?[\s/](\d+(\.\d+)+)/i,e)||o.default.getFirstMatch(i,e);return r&&(t.version=r),t}},{test:[/amazonbot/i],describe:function(e){var t={name:"AmazonBot"},r=o.default.getFirstMatch(/amazonbot\/(\d+(\.\d+)+)/i,e)||o.default.getFirstMatch(i,e);return r&&(t.version=r),t}},{test:[/bingbot/i],describe:function(e){var t={name:"BingCrawler"},r=o.default.getFirstMatch(/bingbot\/(\d+(\.\d+)+)/i,e)||o.default.getFirstMatch(i,e);return r&&(t.version=r),t}},{test:[/baiduspider/i],describe:function(e){var t={name:"BaiduSpider"},r=o.default.getFirstMatch(/baiduspider\/(\d+(\.\d+)+)/i,e)||o.default.getFirstMatch(i,e);return r&&(t.version=r),t}},{test:[/duckduckbot/i],describe:function(e){var t={name:"DuckDuckBot"},r=o.default.getFirstMatch(/duckduckbot\/(\d+(\.\d+)+)/i,e)||o.default.getFirstMatch(i,e);return r&&(t.version=r),t}},{test:[/ia_archiver/i],describe:function(e){var t={name:"InternetArchiveCrawler"},r=o.default.getFirstMatch(/ia_archiver\/(\d+(\.\d+)+)/i,e)||o.default.getFirstMatch(i,e);return r&&(t.version=r),t}},{test:[/facebookexternalhit/i,/facebookcatalog/i],describe:function(){return{name:"FacebookExternalHit"}}},{test:[/slackbot/i,/slack-imgProxy/i],describe:function(e){var t={name:"SlackBot"},r=o.default.getFirstMatch(/(?:slackbot|slack-imgproxy)(?:-[-\w]+)?[\s/](\d+(\.\d+)+)/i,e)||o.default.getFirstMatch(i,e);return r&&(t.version=r),t}},{test:[/yahoo!?[\s/]*slurp/i],describe:function(){return{name:"YahooSlurp"}}},{test:[/yandexbot/i,/yandexmobilebot/i],describe:function(){return{name:"YandexBot"}}},{test:[/pingdom/i],describe:function(){return{name:"PingdomBot"}}},{test:[/opera/i],describe:function(e){var t={name:"Opera"},r=o.default.getFirstMatch(i,e)||o.default.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/opr\/|opios/i],describe:function(e){var t={name:"Opera"},r=o.default.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,e)||o.default.getFirstMatch(i,e);return r&&(t.version=r),t}},{test:[/SamsungBrowser/i],describe:function(e){var t={name:"Samsung Internet for Android"},r=o.default.getFirstMatch(i,e)||o.default.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/Whale/i],describe:function(e){var t={name:"NAVER Whale Browser"},r=o.default.getFirstMatch(i,e)||o.default.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/PaleMoon/i],describe:function(e){var t={name:"Pale Moon"},r=o.default.getFirstMatch(i,e)||o.default.getFirstMatch(/(?:PaleMoon)[\s/](\d+(?:\.\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/MZBrowser/i],describe:function(e){var t={name:"MZ Browser"},r=o.default.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i,e)||o.default.getFirstMatch(i,e);return r&&(t.version=r),t}},{test:[/focus/i],describe:function(e){var t={name:"Focus"},r=o.default.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i,e)||o.default.getFirstMatch(i,e);return r&&(t.version=r),t}},{test:[/swing/i],describe:function(e){var t={name:"Swing"},r=o.default.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i,e)||o.default.getFirstMatch(i,e);return r&&(t.version=r),t}},{test:[/coast/i],describe:function(e){var t={name:"Opera Coast"},r=o.default.getFirstMatch(i,e)||o.default.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/opt\/\d+(?:.?_?\d+)+/i],describe:function(e){var t={name:"Opera Touch"},r=o.default.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i,e)||o.default.getFirstMatch(i,e);return r&&(t.version=r),t}},{test:[/yabrowser/i],describe:function(e){var t={name:"Yandex Browser"},r=o.default.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i,e)||o.default.getFirstMatch(i,e);return r&&(t.version=r),t}},{test:[/ucbrowser/i],describe:function(e){var t={name:"UC Browser"},r=o.default.getFirstMatch(i,e)||o.default.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/Maxthon|mxios/i],describe:function(e){var t={name:"Maxthon"},r=o.default.getFirstMatch(i,e)||o.default.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/epiphany/i],describe:function(e){var t={name:"Epiphany"},r=o.default.getFirstMatch(i,e)||o.default.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/puffin/i],describe:function(e){var t={name:"Puffin"},r=o.default.getFirstMatch(i,e)||o.default.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/sleipnir/i],describe:function(e){var t={name:"Sleipnir"},r=o.default.getFirstMatch(i,e)||o.default.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/k-meleon/i],describe:function(e){var t={name:"K-Meleon"},r=o.default.getFirstMatch(i,e)||o.default.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/micromessenger/i],describe:function(e){var t={name:"WeChat"},r=o.default.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i,e)||o.default.getFirstMatch(i,e);return r&&(t.version=r),t}},{test:[/qqbrowser/i],describe:function(e){var t={name:/qqbrowserlite/i.test(e)?"QQ Browser Lite":"QQ Browser"},r=o.default.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i,e)||o.default.getFirstMatch(i,e);return r&&(t.version=r),t}},{test:[/msie|trident/i],describe:function(e){var t={name:"Internet Explorer"},r=o.default.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/\sedg\//i],describe:function(e){var t={name:"Microsoft Edge"},r=o.default.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/edg([ea]|ios)/i],describe:function(e){var t={name:"Microsoft Edge"},r=o.default.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/vivaldi/i],describe:function(e){var t={name:"Vivaldi"},r=o.default.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/seamonkey/i],describe:function(e){var t={name:"SeaMonkey"},r=o.default.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/sailfish/i],describe:function(e){var t={name:"Sailfish"},r=o.default.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i,e);return r&&(t.version=r),t}},{test:[/silk/i],describe:function(e){var t={name:"Amazon Silk"},r=o.default.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/phantom/i],describe:function(e){var t={name:"PhantomJS"},r=o.default.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/slimerjs/i],describe:function(e){var t={name:"SlimerJS"},r=o.default.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t={name:"BlackBerry"},r=o.default.getFirstMatch(i,e)||o.default.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t={name:"WebOS Browser"},r=o.default.getFirstMatch(i,e)||o.default.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/bada/i],describe:function(e){var t={name:"Bada"},r=o.default.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/tizen/i],describe:function(e){var t={name:"Tizen"},r=o.default.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i,e)||o.default.getFirstMatch(i,e);return r&&(t.version=r),t}},{test:[/qupzilla/i],describe:function(e){var t={name:"QupZilla"},r=o.default.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i,e)||o.default.getFirstMatch(i,e);return r&&(t.version=r),t}},{test:[/librewolf/i],describe:function(e){var t={name:"LibreWolf"},r=o.default.getFirstMatch(/(?:librewolf)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/firefox|iceweasel|fxios/i],describe:function(e){var t={name:"Firefox"},r=o.default.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/electron/i],describe:function(e){var t={name:"Electron"},r=o.default.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/sogoumobilebrowser/i,/metasr/i,/se 2\.[x]/i],describe:function(e){var t={name:"Sogou Browser"},r=o.default.getFirstMatch(/(?:sogoumobilebrowser)[\s/](\d+(\.?_?\d+)+)/i,e),n=o.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e),i=o.default.getFirstMatch(/se ([\d.]+)x/i,e),a=r||n||i;return a&&(t.version=a),t}},{test:[/MiuiBrowser/i],describe:function(e){var t={name:"Miui"},r=o.default.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:function(e){return!!e.hasBrand("DuckDuckGo")||e.test(/\sDdg\/[\d.]+$/i)},describe:function(e,t){var r={name:"DuckDuckGo"};if(t){var n=t.getBrandVersion("DuckDuckGo");if(n)return r.version=n,r}var i=o.default.getFirstMatch(/\sDdg\/([\d.]+)$/i,e);return i&&(r.version=i),r}},{test:function(e){return e.hasBrand("Brave")},describe:function(e,t){var r={name:"Brave"};if(t){var n=t.getBrandVersion("Brave");if(n)return r.version=n,r}return r}},{test:[/chromium/i],describe:function(e){var t={name:"Chromium"},r=o.default.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i,e)||o.default.getFirstMatch(i,e);return r&&(t.version=r),t}},{test:[/chrome|crios|crmo/i],describe:function(e){var t={name:"Chrome"},r=o.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/GSA/i],describe:function(e){var t={name:"Google Search"},r=o.default.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:function(e){var t=!e.test(/like android/i),r=e.test(/android/i);return t&&r},describe:function(e){var t={name:"Android Browser"},r=o.default.getFirstMatch(i,e);return r&&(t.version=r),t}},{test:[/playstation 4/i],describe:function(e){var t={name:"PlayStation 4"},r=o.default.getFirstMatch(i,e);return r&&(t.version=r),t}},{test:[/safari|applewebkit/i],describe:function(e){var t={name:"Safari"},r=o.default.getFirstMatch(i,e);return r&&(t.version=r),t}},{test:[/.*/i],describe:function(e){var t=-1!==e.search("\\(")?/^(.*)\/(.*)[ \t]\((.*)/:/^(.*)\/(.*) /;return{name:o.default.getFirstMatch(t,e),version:o.default.getSecondMatch(t,e)}}}];t.default=a,e.exports=t.default},93:function(e,t,r){t.__esModule=!0,t.default=void 0;var n,o=(n=r(17))&&n.__esModule?n:{default:n},i=r(18),a=[{test:[/Roku\/DVP/],describe:function(e){var t=o.default.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,e);return{name:i.OS_MAP.Roku,version:t}}},{test:[/windows phone/i],describe:function(e){var t=o.default.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i,e);return{name:i.OS_MAP.WindowsPhone,version:t}}},{test:[/windows /i],describe:function(e){var t=o.default.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i,e),r=o.default.getWindowsVersionName(t);return{name:i.OS_MAP.Windows,version:t,versionName:r}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(e){var t={name:i.OS_MAP.iOS},r=o.default.getSecondMatch(/(Version\/)(\d[\d.]+)/,e);return r&&(t.version=r),t}},{test:[/macintosh/i],describe:function(e){var t=o.default.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i,e).replace(/[_\s]/g,"."),r=o.default.getMacOSVersionName(t),n={name:i.OS_MAP.MacOS,version:t};return r&&(n.versionName=r),n}},{test:[/(ipod|iphone|ipad)/i],describe:function(e){var t=o.default.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i,e).replace(/[_\s]/g,".");return{name:i.OS_MAP.iOS,version:t}}},{test:[/OpenHarmony/i],describe:function(e){var t=o.default.getFirstMatch(/OpenHarmony\s+(\d+(\.\d+)*)/i,e);return{name:i.OS_MAP.HarmonyOS,version:t}}},{test:function(e){var t=!e.test(/like android/i),r=e.test(/android/i);return t&&r},describe:function(e){var t=o.default.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,e),r=o.default.getAndroidVersionName(t),n={name:i.OS_MAP.Android,version:t};return r&&(n.versionName=r),n}},{test:[/(web|hpw)[o0]s/i],describe:function(e){var t=o.default.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i,e),r={name:i.OS_MAP.WebOS};return t&&t.length&&(r.version=t),r}},{test:[/blackberry|\bbb\d+/i,/rim\stablet/i],describe:function(e){var t=o.default.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i,e)||o.default.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i,e)||o.default.getFirstMatch(/\bbb(\d+)/i,e);return{name:i.OS_MAP.BlackBerry,version:t}}},{test:[/bada/i],describe:function(e){var t=o.default.getFirstMatch(/bada\/(\d+(\.\d+)*)/i,e);return{name:i.OS_MAP.Bada,version:t}}},{test:[/tizen/i],describe:function(e){var t=o.default.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i,e);return{name:i.OS_MAP.Tizen,version:t}}},{test:[/linux/i],describe:function(){return{name:i.OS_MAP.Linux}}},{test:[/CrOS/],describe:function(){return{name:i.OS_MAP.ChromeOS}}},{test:[/PlayStation 4/],describe:function(e){var t=o.default.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i,e);return{name:i.OS_MAP.PlayStation4,version:t}}}];t.default=a,e.exports=t.default},94:function(e,t,r){t.__esModule=!0,t.default=void 0;var n,o=(n=r(17))&&n.__esModule?n:{default:n},i=r(18),a=[{test:[/googlebot/i],describe:function(){return{type:i.PLATFORMS_MAP.bot,vendor:"Google"}}},{test:[/linespider/i],describe:function(){return{type:i.PLATFORMS_MAP.bot,vendor:"Line"}}},{test:[/amazonbot/i],describe:function(){return{type:i.PLATFORMS_MAP.bot,vendor:"Amazon"}}},{test:[/gptbot/i],describe:function(){return{type:i.PLATFORMS_MAP.bot,vendor:"OpenAI"}}},{test:[/chatgpt-user/i],describe:function(){return{type:i.PLATFORMS_MAP.bot,vendor:"OpenAI"}}},{test:[/oai-searchbot/i],describe:function(){return{type:i.PLATFORMS_MAP.bot,vendor:"OpenAI"}}},{test:[/baiduspider/i],describe:function(){return{type:i.PLATFORMS_MAP.bot,vendor:"Baidu"}}},{test:[/bingbot/i],describe:function(){return{type:i.PLATFORMS_MAP.bot,vendor:"Bing"}}},{test:[/duckduckbot/i],describe:function(){return{type:i.PLATFORMS_MAP.bot,vendor:"DuckDuckGo"}}},{test:[/claudebot/i,/claude-web/i,/claude-user/i,/claude-searchbot/i],describe:function(){return{type:i.PLATFORMS_MAP.bot,vendor:"Anthropic"}}},{test:[/omgilibot/i,/webzio-extended/i],describe:function(){return{type:i.PLATFORMS_MAP.bot,vendor:"Webz.io"}}},{test:[/diffbot/i],describe:function(){return{type:i.PLATFORMS_MAP.bot,vendor:"Diffbot"}}},{test:[/perplexitybot/i],describe:function(){return{type:i.PLATFORMS_MAP.bot,vendor:"Perplexity AI"}}},{test:[/perplexity-user/i],describe:function(){return{type:i.PLATFORMS_MAP.bot,vendor:"Perplexity AI"}}},{test:[/youbot/i],describe:function(){return{type:i.PLATFORMS_MAP.bot,vendor:"You.com"}}},{test:[/ia_archiver/i],describe:function(){return{type:i.PLATFORMS_MAP.bot,vendor:"Internet Archive"}}},{test:[/meta-webindexer/i],describe:function(){return{type:i.PLATFORMS_MAP.bot,vendor:"Meta"}}},{test:[/meta-externalads/i],describe:function(){return{type:i.PLATFORMS_MAP.bot,vendor:"Meta"}}},{test:[/meta-externalagent/i],describe:function(){return{type:i.PLATFORMS_MAP.bot,vendor:"Meta"}}},{test:[/meta-externalfetcher/i],describe:function(){return{type:i.PLATFORMS_MAP.bot,vendor:"Meta"}}},{test:[/facebookexternalhit/i,/facebookcatalog/i],describe:function(){return{type:i.PLATFORMS_MAP.bot,vendor:"Meta"}}},{test:[/slackbot/i,/slack-imgProxy/i],describe:function(){return{type:i.PLATFORMS_MAP.bot,vendor:"Slack"}}},{test:[/yahoo/i],describe:function(){return{type:i.PLATFORMS_MAP.bot,vendor:"Yahoo"}}},{test:[/yandexbot/i,/yandexmobilebot/i],describe:function(){return{type:i.PLATFORMS_MAP.bot,vendor:"Yandex"}}},{test:[/pingdom/i],describe:function(){return{type:i.PLATFORMS_MAP.bot,vendor:"Pingdom"}}},{test:[/huawei/i],describe:function(e){var t=o.default.getFirstMatch(/(can-l01)/i,e)&&"Nova",r={type:i.PLATFORMS_MAP.mobile,vendor:"Huawei"};return t&&(r.model=t),r}},{test:[/nexus\s*(?:7|8|9|10).*/i],describe:function(){return{type:i.PLATFORMS_MAP.tablet,vendor:"Nexus"}}},{test:[/ipad/i],describe:function(){return{type:i.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/Macintosh(.*?) FxiOS(.*?)\//],describe:function(){return{type:i.PLATFORMS_MAP.tablet,vendor:"Apple",model:"iPad"}}},{test:[/kftt build/i],describe:function(){return{type:i.PLATFORMS_MAP.tablet,vendor:"Amazon",model:"Kindle Fire HD 7"}}},{test:[/silk/i],describe:function(){return{type:i.PLATFORMS_MAP.tablet,vendor:"Amazon"}}},{test:[/tablet(?! pc)/i],describe:function(){return{type:i.PLATFORMS_MAP.tablet}}},{test:function(e){var t=e.test(/ipod|iphone/i),r=e.test(/like (ipod|iphone)/i);return t&&!r},describe:function(e){var t=o.default.getFirstMatch(/(ipod|iphone)/i,e);return{type:i.PLATFORMS_MAP.mobile,vendor:"Apple",model:t}}},{test:[/nexus\s*[0-6].*/i,/galaxy nexus/i],describe:function(){return{type:i.PLATFORMS_MAP.mobile,vendor:"Nexus"}}},{test:[/Nokia/i],describe:function(e){var t=o.default.getFirstMatch(/Nokia\s+([0-9]+(\.[0-9]+)?)/i,e),r={type:i.PLATFORMS_MAP.mobile,vendor:"Nokia"};return t&&(r.model=t),r}},{test:[/[^-]mobi/i],describe:function(){return{type:i.PLATFORMS_MAP.mobile}}},{test:function(e){return"blackberry"===e.getBrowserName(!0)},describe:function(){return{type:i.PLATFORMS_MAP.mobile,vendor:"BlackBerry"}}},{test:function(e){return"bada"===e.getBrowserName(!0)},describe:function(){return{type:i.PLATFORMS_MAP.mobile}}},{test:function(e){return"windows phone"===e.getBrowserName()},describe:function(){return{type:i.PLATFORMS_MAP.mobile,vendor:"Microsoft"}}},{test:function(e){var t=Number(String(e.getOSVersion()).split(".")[0]);return"android"===e.getOSName(!0)&&t>=3},describe:function(){return{type:i.PLATFORMS_MAP.tablet}}},{test:function(e){return"android"===e.getOSName(!0)},describe:function(){return{type:i.PLATFORMS_MAP.mobile}}},{test:[/smart-?tv|smarttv/i],describe:function(){return{type:i.PLATFORMS_MAP.tv}}},{test:[/netcast/i],describe:function(){return{type:i.PLATFORMS_MAP.tv}}},{test:function(e){return"macos"===e.getOSName(!0)},describe:function(){return{type:i.PLATFORMS_MAP.desktop,vendor:"Apple"}}},{test:function(e){return"windows"===e.getOSName(!0)},describe:function(){return{type:i.PLATFORMS_MAP.desktop}}},{test:function(e){return"linux"===e.getOSName(!0)},describe:function(){return{type:i.PLATFORMS_MAP.desktop}}},{test:function(e){return"playstation 4"===e.getOSName(!0)},describe:function(){return{type:i.PLATFORMS_MAP.tv}}},{test:function(e){return"roku"===e.getOSName(!0)},describe:function(){return{type:i.PLATFORMS_MAP.tv}}}];t.default=a,e.exports=t.default},95:function(e,t,r){t.__esModule=!0,t.default=void 0;var n,o=(n=r(17))&&n.__esModule?n:{default:n},i=r(18),a=[{test:function(e){return"microsoft edge"===e.getBrowserName(!0)},describe:function(e){if(/\sedg\//i.test(e))return{name:i.ENGINE_MAP.Blink};var t=o.default.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,e);return{name:i.ENGINE_MAP.EdgeHTML,version:t}}},{test:[/trident/i],describe:function(e){var t={name:i.ENGINE_MAP.Trident},r=o.default.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:function(e){return e.test(/presto/i)},describe:function(e){var t={name:i.ENGINE_MAP.Presto},r=o.default.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:function(e){var t=e.test(/gecko/i),r=e.test(/like gecko/i);return t&&!r},describe:function(e){var t={name:i.ENGINE_MAP.Gecko},r=o.default.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}},{test:[/(apple)?webkit\/537\.36/i],describe:function(){return{name:i.ENGINE_MAP.Blink}}},{test:[/(apple)?webkit/i],describe:function(e){var t={name:i.ENGINE_MAP.WebKit},r=o.default.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,e);return r&&(t.version=r),t}}];t.default=a,e.exports=t.default}})}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return e[n].call(i.exports,i,i.exports,r),i.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var n={};r.d(n,{P:()=>ii,E:()=>ai});var o,i=(o=function(e,t){return o=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},o(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}o(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),a=function(){function e(){}return e.prototype.createHistogram=function(e,t){return y},e.prototype.createCounter=function(e,t){return v},e.prototype.createUpDownCounter=function(e,t){return _},e.prototype.createObservableGauge=function(e,t){return b},e.prototype.createObservableCounter=function(e,t){return g},e.prototype.createObservableUpDownCounter=function(e,t){return w},e.prototype.addBatchObservableCallback=function(e,t){},e.prototype.removeBatchObservableCallback=function(e){},e}(),s=function(){},u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.add=function(e,t){},t}(s),c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.add=function(e,t){},t}(s),l=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.record=function(e,t){},t}(s),f=function(){function e(){}return e.prototype.addCallback=function(e){},e.prototype.removeCallback=function(e){},e}(),d=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t}(f),p=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t}(f),h=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t}(f),m=new a,v=new u,y=new l,_=new c,g=new d,b=new p,w=new h,E=new(function(){function e(){}return e.prototype.getMeter=function(e,t,r){return m},e}()),T="object"==typeof globalThis?globalThis:"object"==typeof self?self:"object"==typeof window?window:"object"==typeof r.g?r.g:{},O="1.8.0",S=/^(\d+)\.(\d+)\.(\d+)(-(.+))?$/,M=function(e){var t=new Set([e]),r=new Set,n=e.match(S);if(!n)return function(){return!1};var o=+n[1],i=+n[2],a=+n[3];if(null!=n[4])return function(t){return t===e};function s(e){return r.add(e),!1}function u(e){return t.add(e),!0}return function(e){if(t.has(e))return!0;if(r.has(e))return!1;var n=e.match(S);if(!n)return s(e);var c=+n[1],l=+n[2],f=+n[3];return null!=n[4]||o!==c?s(e):0===o?i===l&&a<=f?u(e):s(e):i<=l?u(e):s(e)}}(O),A=O.split(".")[0],P=Symbol.for("opentelemetry.js.api."+A),R=T;function x(e,t,r,n){var o;void 0===n&&(n=!1);var i=R[P]=null!==(o=R[P])&&void 0!==o?o:{version:O};if(!n&&i[e]){var a=new Error("@opentelemetry/api: Attempted duplicate registration of API: "+e);return r.error(a.stack||a.message),!1}return i.version!==O?(a=new Error("@opentelemetry/api: Registration of version v"+i.version+" for "+e+" does not match previously registered API v"+O),r.error(a.stack||a.message),!1):(i[e]=t,r.debug("@opentelemetry/api: Registered a global for "+e+" v"+O+"."),!0)}function L(e){var t,r,n=null===(t=R[P])||void 0===t?void 0:t.version;if(n&&M(n))return null===(r=R[P])||void 0===r?void 0:r[e]}function k(e,t){t.debug("@opentelemetry/api: Unregistering a global for "+e+" v"+O+".");var r=R[P];r&&delete r[e]}var C,I=function(){function e(e){this._namespace=e.namespace||"DiagComponentLogger"}return e.prototype.debug=function(){for(var e=[],t=0;t0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a}(r),!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"}(C||(C={}));var B=function(){function e(){function e(e){return function(){for(var t=[],r=0;r0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a}(t),!1))}}var t=this;t.setLogger=function(e,r){var n,o,i;if(void 0===r&&(r={logLevel:C.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!==(n=a.stack)&&void 0!==n?n:a.message),!1}"number"==typeof r&&(r={logLevel:r});var s=L("diag"),u=function(e,t){function r(r,n){var o=t[r];return"function"==typeof o&&e>=n?o.bind(t):function(){}}return eC.ALL&&(e=C.ALL),t=t||{},{error:r("error",C.ERROR),warn:r("warn",C.WARN),info:r("info",C.INFO),debug:r("debug",C.DEBUG),verbose:r("verbose",C.VERBOSE)}}(null!==(o=r.logLevel)&&void 0!==o?o:C.INFO,e);if(s&&!r.suppressOverrideMessage){var c=null!==(i=(new Error).stack)&&void 0!==i?i:"";s.warn("Current logger will be overwritten from "+c),u.warn("Current logger will overwrite one already registered from "+c)}return x("diag",u,t,!0)},t.disable=function(){k("diag",t)},t.createComponentLogger=function(e){return new I(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}(),F="metrics",U=function(){function e(){}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalMeterProvider=function(e){return x(F,e,B.instance())},e.prototype.getMeterProvider=function(){return L(F)||E},e.prototype.getMeter=function(e,t,r){return this.getMeterProvider().getMeter(e,t,r)},e.prototype.disable=function(){k(F,B.instance())},e}().getInstance(),D=B.instance();function j(e){for(var t={},r=e.length,n=0;n0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a}(e,2),i=o[0],a=o[1];return ee(ee(ee(ee({},n._syncAttributes),i),null!==(r=t._syncAttributes)&&void 0!==r?r:t.attributes),a)}));return new e(o,i)},e.EMPTY=new e({}),e}();!function(e){e[e.DELTA=0]="DELTA",e[e.CUMULATIVE=1]="CUMULATIVE"}(V||(V={}));var re,ne=new function e(t){var r=this;r._currentContext=t?new Map(t):new Map,r.getValue=function(e){return r._currentContext.get(e)},r.setValue=function(t,n){var o=new e(r._currentContext);return o._currentContext.set(t,n),o},r.deleteValue=function(t){var n=new e(r._currentContext);return n._currentContext.delete(t),n}},oe=function(){function e(){}return e.prototype.active=function(){return ne},e.prototype.with=function(e,t,r){for(var n=[],o=3;o0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a}(n),!1))},e.prototype.bind=function(e,t){return t},e.prototype.enable=function(){return this},e.prototype.disable=function(){return this},e}(),ie="context",ae=new oe,se=function(){function e(){}return e.getInstance=function(){return this._instance||(this._instance=new e),this._instance},e.prototype.setGlobalContextManager=function(e){return x(ie,e,B.instance())},e.prototype.active=function(){return this._getContextManager().active()},e.prototype.with=function(e,t,r){for(var n,o=[],i=3;i0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a}(o),!1))},e.prototype.bind=function(e,t){return this._getContextManager().bind(e,t)},e.prototype._getContextManager=function(){return L(ie)||ae},e.prototype.disable=function(){this._getContextManager().disable(),k(ie,B.instance())},e}(),ue=se.getInstance(),ce=("OpenTelemetry SDK Context Key SUPPRESS_TRACING",Symbol.for("OpenTelemetry SDK Context Key SUPPRESS_TRACING")),le=function(e,t){return new Promise((function(r){ue.with(ue.active().setValue(ce,!0),(function(){e.export(t,(function(e){r(e)}))}))}))};!function(e){e[e.SUCCESS=0]="SUCCESS",e[e.FAILED=1]="FAILED"}(re||(re={}));var fe=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),de=function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{u(n.next(e))}catch(e){i(e)}}function s(e){try{u(n.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},pe=function(e,t){var r,n,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(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=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++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).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]0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a}(t(e)),!1))})),r}!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"}(ve||(ve={}));var Ee,Te=function(){function e(){this.kind=ve.DROP}return e.prototype.createAccumulation=function(){},e.prototype.merge=function(e,t){},e.prototype.diff=function(e,t){},e.prototype.toMetricData=function(e,t,r,n){},e}();!function(e){e[e.HISTOGRAM=0]="HISTOGRAM",e[e.EXPONENTIAL_HISTOGRAM=1]="EXPONENTIAL_HISTOGRAM",e[e.GAUGE=2]="GAUGE",e[e.SUM=3]="SUM"}(Ee||(Ee={}));var Oe=function(){function e(e,t,r,n){void 0===r&&(r=0),void 0===n&&(n=!1),this.startTime=e,this.monotonic=t,this._current=r,this.reset=n}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}(),Se=function(){function e(e){this.monotonic=e,this.kind=ve.SUM}return e.prototype.createAccumulation=function(e){return new Oe(e,this.monotonic)},e.prototype.merge=function(e,t){var r=e.toPointValue(),n=t.toPointValue();return t.reset?new Oe(t.startTime,this.monotonic,n,t.reset):new Oe(e.startTime,this.monotonic,r+n)},e.prototype.diff=function(e,t){var r=e.toPointValue(),n=t.toPointValue();return this.monotonic&&r>n?new Oe(t.startTime,this.monotonic,n,!0):new Oe(t.startTime,this.monotonic,n-r)},e.prototype.toMetricData=function(e,t,r,n){return{descriptor:e,aggregationTemporality:t,dataPointType:Ee.SUM,dataPoints:r.map((function(e){var t=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a}(e,2),r=t[0],o=t[1];return{attributes:r,startTime:o.startTime,endTime:n,value:o.toPointValue()}})),isMonotonic:this.monotonic}},e}(),Me=Math.pow(10,6),Ae=Math.pow(10,9);function Pe(e){var t=e/1e3;return[Math.trunc(t),Math.round(e%1e3*Me)]}function Re(e){return 1e6*e[0]+e[1]/1e3}var xe,Le,ke=function(){function e(e,t,r){void 0===t&&(t=0),void 0===r&&(r=[0,0]),this.startTime=e,this._current=t,this.sampleTime=r}return e.prototype.record=function(e){this._current=e,this.sampleTime=Pe(Date.now())},e.prototype.setStartTime=function(e){this.startTime=e},e.prototype.toPointValue=function(){return this._current},e}(),Ce=function(){function e(){this.kind=ve.LAST_VALUE}return e.prototype.createAccumulation=function(e){return new ke(e)},e.prototype.merge=function(e,t){var r=Re(t.sampleTime)>=Re(e.sampleTime)?t:e;return new ke(e.startTime,r.toPointValue(),r.sampleTime)},e.prototype.diff=function(e,t){var r=Re(t.sampleTime)>=Re(e.sampleTime)?t:e;return new ke(t.startTime,r.toPointValue(),r.sampleTime)},e.prototype.toMetricData=function(e,t,r,n){return{descriptor:e,aggregationTemporality:t,dataPointType:Ee.GAUGE,dataPoints:r.map((function(e){var t=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a}(e,2),r=t[0],o=t[1];return{attributes:r,startTime:o.startTime,endTime:n,value:o.toPointValue()}}))}},e}();function Ie(e,t,r){var n,o,i,a;return function(e){return null!=e.match(Ne)}(e)||D.warn('Invalid metric name: "'+e+'". The metric name should be a ASCII string with a length no greater than 255 characters.'),{name:e,type:t,description:null!==(n=null==r?void 0:r.description)&&void 0!==n?n:"",unit:null!==(o=null==r?void 0:r.unit)&&void 0!==o?o:"",valueType:null!==(i=null==r?void 0:r.valueType)&&void 0!==i?i:xe.DOUBLE,advice:null!==(a=null==r?void 0:r.advice)&&void 0!==a?a:{}}}!function(e){e[e.INT=0]="INT",e[e.DOUBLE=1]="DOUBLE"}(xe||(xe={})),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"}(Le||(Le={}));var Ne=/^[a-z][a-z0-9_.\-/]{0,254}$/i,Be=function(){function e(e,t,r,n){var o,i;void 0===r&&(r=!0),void 0===n&&((i=(o=t).map((function(){return 0}))).push(0),n={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=r,this._current=n}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 r=0,n=e.length-1;n-r>1;){var o=Math.trunc((n+r)/2);e[o]<=t?r=o:n=o-1}return e[n]<=t?n:e[r]<=t?r:-1}(this._boundaries,e);this._current.buckets.counts[t+1]+=1}},e.prototype.setStartTime=function(e){this.startTime=e},e.prototype.toPointValue=function(){return this._current},e}(),Fe=function(){function e(e,t){this._boundaries=e,this._recordMinMax=t,this.kind=ve.HISTOGRAM}return e.prototype.createAccumulation=function(e){return new Be(e,this._boundaries,this._recordMinMax)},e.prototype.merge=function(e,t){for(var r=e.toPointValue(),n=t.toPointValue(),o=r.buckets.counts,i=n.buckets.counts,a=new Array(o.length),s=0;s0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a}(t,2),o=r[0],i=r[1],a=i.toPointValue(),s=e.type===Le.GAUGE||e.type===Le.UP_DOWN_COUNTER||e.type===Le.OBSERVABLE_GAUGE||e.type===Le.OBSERVABLE_UP_DOWN_COUNTER;return{attributes:o,startTime:i.startTime,endTime:n,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}(),Ue=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},De=function(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o=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,r=1<>=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}(),Ge=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,r){var n=new Array(e).fill(0);n.splice.apply(n,De([r,this._counts.length-t],Ue(this._counts.slice(t)),!1)),n.splice.apply(n,De([0,t],Ue(this._counts.slice(0,t)),!1)),this._counts=n},e.prototype.reverse=function(e,t){for(var r=Math.floor((e+t)/2)-e,n=0;n=t?this._counts[e]-=t:this._counts[e]=0},e.prototype.clone=function(){return new e(De([],Ue(this._counts),!1))},e}(),Ve=Math.pow(2,-1022);function He(e){var t=new DataView(new ArrayBuffer(8));return t.setFloat64(0,e),((2146435072&t.getUint32(0))>>20)-1023}function ze(e){var t=new DataView(new ArrayBuffer(8));t.setFloat64(0,e);var r=t.getUint32(0),n=t.getUint32(4);return(1048575&r)*Math.pow(2,32)+n}function Xe(e,t){return 0===e||e===Number.POSITIVE_INFINITY||e===Number.NEGATIVE_INFINITY||Number.isNaN(e)?e:e*Math.pow(2,t)}var We=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ye=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return We(t,e),t}(Error),qe=function(){function e(e){this._shift=-e}return e.prototype.mapToIndex=function(e){return e>this._shift},e.prototype.lowerBoundary=function(e){var t=this._minNormalLowerBoundaryIndex();if(er)throw new Ye("overflow: "+e+" is > maximum lower boundary: "+r);return Xe(1,e<>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}(),Ke=function(){function e(e){this._scale=e,this._scaleFactor=Xe(Math.LOG2E,e),this._inverseFactor=Xe(Math.LN2,-e)}return e.prototype.mapToIndex=function(e){if(e<=Ve)return this._minNormalLowerBoundaryIndex()-1;if(0===ze(e))return(He(e)<=r?r:t},e.prototype.lowerBoundary=function(e){var t=this._maxNormalLowerBoundaryIndex();if(e>=t){if(e===t)return 2*Math.exp((e-(1< maximum lower boundary: "+t)}var r=this._minNormalLowerBoundaryIndex();if(e<=r){if(e===r)return Ve;if(e===r-1)return Math.exp((e+(1<10?new Ke(t-10):new qe(t-10)}));function Qe(e){if(e>20||e<-10)throw new Ye("expected scale >= -10 && <= 20, got: "+e);return Je[e+10]}var Ze=function(){function e(e,t){this.low=e,this.high=t}return e.combine=function(t,r){return new e(Math.min(t.low,r.low),Math.max(t.high,r.high))},e}(),$e=function(){function e(e,t,r,n,o,i,a,s,u,c,l){void 0===t&&(t=160),void 0===r&&(r=!0),void 0===n&&(n=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===u&&(u=new je),void 0===c&&(c=new je),void 0===l&&(l=Qe(20)),this.startTime=e,this._maxSize=t,this._recordMinMax=r,this._sum=n,this._count=o,this._zeroCount=i,this._min=a,this._max=s,this._positive=u,this._negative=c,this._mapping=l,this._maxSize<2&&(D.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),e0?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.minthis.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,r){var n=this._mapping.mapToIndex(t),o=!1,i=0,a=0;if(0===e.length?(e.indexStart=n,e.indexEnd=e.indexStart,e.indexBase=e.indexStart):n=this._maxSize?(o=!0,a=n,i=e.indexEnd):n>e.indexEnd&&n-e.indexStart>=this._maxSize&&(o=!0,a=e.indexStart,i=n),o){var s=this._changeScale(i,a);this._downscale(s),n=this._mapping.mapToIndex(t)}this._incrementIndexBy(e,n,r)},e.prototype._incrementIndexBy=function(e,t,r){if(0!==r){if(0===e.length&&(e.indexStart=e.indexEnd=e.indexBase=t),t=e.backing.length&&this._grow(e,n+1),e.indexStart=t;else if(t>e.indexEnd){var n;(n=t-e.indexStart)>=e.backing.length&&this._grow(e,n+1),e.indexEnd=t}var o=t-e.indexBase;o<0&&(o+=e.backing.length),e.incrementBucket(o,r)}},e.prototype._grow=function(e,t){var r=e.backing.length,n=e.indexBase-e.indexStart,o=r-n,i=function(e){return e--,e|=e>>1,e|=e>>2,e|=e>>4,e|=e>>8,e|=e>>16,++e}(t);i>this._maxSize&&(i=this._maxSize);var a=i-n;e.backing.growTo(i,o,a)},e.prototype._changeScale=function(e,t){for(var r=0;e-t>=this._maxSize;)e>>=1,t>>=1,r++;return r},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=Qe(t)}},e.prototype._minScale=function(e){var t=Math.min(this.scale,e.scale),r=Ze.combine(this._highLowAtScale(this.positive,this.scale,t),this._highLowAtScale(e.positive,e.scale,t)),n=Ze.combine(this._highLowAtScale(this.negative,this.scale,t),this._highLowAtScale(e.negative,e.scale,t));return Math.min(t-this._changeScale(r.high,r.low),t-this._changeScale(n.high,n.low))},e.prototype._highLowAtScale=function(e,t,r){if(0===e.length)return new Ze(0,-1);var n=t-r;return new Ze(e.indexStart>>n,e.indexEnd>>n)},e.prototype._mergeBuckets=function(e,t,r,n){for(var o=r.offset,i=t.scale-n,a=0;a>i,r.at(a))},e.prototype._diffBuckets=function(e,t,r,n){for(var o=r.offset,i=t.scale-n,a=0;a>i)-e.indexBase;s<0&&(s+=e.backing.length),e.decrementBucket(s,r.at(a))}e.trim()},e}(),et=function(){function e(e,t){this._maxSize=e,this._recordMinMax=t,this.kind=ve.EXPONENTIAL_HISTOGRAM}return e.prototype.createAccumulation=function(e){return new $e(e,this._maxSize,this._recordMinMax)},e.prototype.merge=function(e,t){var r=t.clone();return r.merge(e),r},e.prototype.diff=function(e,t){var r=t.clone();return r.diff(e),r},e.prototype.toMetricData=function(e,t,r,n){return{descriptor:e,aggregationTemporality:t,dataPointType:Ee.EXPONENTIAL_HISTOGRAM,dataPoints:r.map((function(t){var r=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a}(t,2),o=r[0],i=r[1],a=i.toPointValue(),s=e.type===Le.GAUGE||e.type===Le.UP_DOWN_COUNTER||e.type===Le.OBSERVABLE_GAUGE||e.type===Le.OBSERVABLE_UP_DOWN_COUNTER;return{attributes:o,startTime:i.startTime,endTime:n,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}(),tt=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),rt=function(){function e(){}return e.Drop=function(){return lt},e.Sum=function(){return ft},e.LastValue=function(){return dt},e.Histogram=function(){return pt},e.ExponentialHistogram=function(){return ht},e.Default=function(){return mt},e}(),nt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return tt(t,e),t.prototype.createAggregator=function(e){return t.DEFAULT_INSTANCE},t.DEFAULT_INSTANCE=new Te,t}(rt),ot=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return tt(t,e),t.prototype.createAggregator=function(e){switch(e.type){case Le.COUNTER:case Le.OBSERVABLE_COUNTER:case Le.HISTOGRAM:return t.MONOTONIC_INSTANCE;default:return t.NON_MONOTONIC_INSTANCE}},t.MONOTONIC_INSTANCE=new Se(!0),t.NON_MONOTONIC_INSTANCE=new Se(!1),t}(rt),it=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return tt(t,e),t.prototype.createAggregator=function(e){return t.DEFAULT_INSTANCE},t.DEFAULT_INSTANCE=new Ce,t}(rt),at=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return tt(t,e),t.prototype.createAggregator=function(e){return t.DEFAULT_INSTANCE},t.DEFAULT_INSTANCE=new Fe([0,5,10,25,50,75,100,250,500,750,1e3,2500,5e3,7500,1e4],!0),t}(rt),st=function(e){function t(t,r){void 0===r&&(r=!0);var n=e.call(this)||this;if(n._recordMinMax=r,null==t)throw new Error("ExplicitBucketHistogramAggregation should be created with explicit boundaries, if a single bucket histogram is required, please pass an empty array");t=(t=t.concat()).sort((function(e,t){return e-t}));var o=t.lastIndexOf(-1/0),i=t.indexOf(1/0);return-1===i&&(i=void 0),n._boundaries=t.slice(o+1,i),n}return tt(t,e),t.prototype.createAggregator=function(e){return new Fe(this._boundaries,this._recordMinMax)},t}(rt),ut=function(e){function t(t,r){void 0===t&&(t=160),void 0===r&&(r=!0);var n=e.call(this)||this;return n._maxSize=t,n._recordMinMax=r,n}return tt(t,e),t.prototype.createAggregator=function(e){return new et(this._maxSize,this._recordMinMax)},t}(rt),ct=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return tt(t,e),t.prototype._resolve=function(e){switch(e.type){case Le.COUNTER:case Le.UP_DOWN_COUNTER:case Le.OBSERVABLE_COUNTER:case Le.OBSERVABLE_UP_DOWN_COUNTER:return ft;case Le.GAUGE:case Le.OBSERVABLE_GAUGE:return dt;case Le.HISTOGRAM:return e.advice.explicitBucketBoundaries?new st(e.advice.explicitBucketBoundaries):pt}return D.warn("Unable to recognize instrument type: "+e.type),lt},t.prototype.createAggregator=function(e){return this._resolve(e).createAggregator(e)},t}(rt),lt=new nt,ft=new ot,dt=new it,pt=new at,ht=new ut,mt=new ct,vt=function(e){return rt.Default()},yt=function(e){return V.CUMULATIVE},_t=function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{u(n.next(e))}catch(e){i(e)}}function s(e){try{u(n.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},gt=function(e,t){var r,n,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(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=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++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).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]0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},wt=function(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0&&(a=D).error.apply(a,function(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a}(o),!1)),i=function(){return Ot(s,void 0,void 0,(function(){var e;return St(this,(function(t){switch(t.label){case 0:return[4,le(this._exporter,n)];case 1:if((e=t.sent()).code!==re.SUCCESS)throw new Error("PeriodicExportingMetricReader: metrics export failed (error "+e.error+")");return[2]}}))}))},n.resource.asyncAttributesPending?(null===(t=(e=n.resource).waitForAsyncAttributes)||void 0===t||t.call(e).then(i,(function(e){return D.debug("Error while resolving async portion of resource: ",e)})),[3,4]):[3,2];case 2:return[4,i()];case 3:u.sent(),u.label=4;case 4:return[2]}}))}))},t.prototype.onInitialized=function(){var e=this;this._interval=setInterval((function(){e._runOnce()}),this._exportInterval),this._interval},t.prototype.onForceFlush=function(){return Ot(this,void 0,void 0,(function(){return St(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 Ot(this,void 0,void 0,(function(){return St(this,(function(e){switch(e.label){case 0:return this._interval&&clearInterval(this._interval),[4,this._exporter.shutdown()];case 1:return e.sent(),[2]}}))}))},t}(Et);function At(e){for(var t={},r=e.length,n=0;n0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a}(e,2),i=o[0],a=o[1];return jt(jt(jt(jt({},n._syncAttributes),i),null!==(r=t._syncAttributes)&&void 0!==r?r:t.attributes),a)}));return new e(o,i)},e.EMPTY=new e({}),e}(),Vt=function(){function e(){this._registeredViews=[]}return e.prototype.addView=function(e){this._registeredViews.push(e)},e.prototype.findViews=function(e,t){var r=this;return this._registeredViews.filter((function(n){return r._matchInstrument(n.instrumentSelector,e)&&r._matchMeter(n.meterSelector,t)}))},e.prototype._matchInstrument=function(e,t){return(void 0===e.getType()||t.type===e.getType())&&e.getNameFilter().match(t.name)&&e.getUnitFilter().match(t.unit)},e.prototype._matchMeter=function(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))},e}(),Ht=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),zt=function(){function e(e,t){this._writableMetricStorage=e,this._descriptor=t}return e.prototype._record=function(e,t,r){void 0===t&&(t={}),void 0===r&&(r=ue.active()),"number"==typeof e?(this._descriptor.valueType!==xe.INT||Number.isInteger(e)||(D.warn("INT value type cannot accept a floating-point value for "+this._descriptor.name+", ignoring the fractional digits."),e=Math.trunc(e),Number.isInteger(e)))&&this._writableMetricStorage.record(e,t,r,Pe(Date.now())):D.warn("non-number value provided to metric "+this._descriptor.name+": "+e)},e}(),Xt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ht(t,e),t.prototype.add=function(e,t,r){this._record(e,t,r)},t}(zt),Wt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ht(t,e),t.prototype.add=function(e,t,r){e<0?D.warn("negative value provided to counter "+this._descriptor.name+": "+e):this._record(e,t,r)},t}(zt),Yt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ht(t,e),t.prototype.record=function(e,t,r){this._record(e,t,r)},t}(zt),qt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ht(t,e),t.prototype.record=function(e,t,r){e<0?D.warn("negative value provided to histogram "+this._descriptor.name+": "+e):this._record(e,t,r)},t}(zt),Kt=function(){function e(e,t,r){this._observableRegistry=r,this._descriptor=e,this._metricStorages=t}return e.prototype.addCallback=function(e){this._observableRegistry.addCallback(e,this)},e.prototype.removeCallback=function(e){this._observableRegistry.removeCallback(e,this)},e}(),Jt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ht(t,e),t}(Kt),Qt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ht(t,e),t}(Kt),Zt=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ht(t,e),t}(Kt);function $t(e){return e instanceof Kt}var er=function(){function e(e){this._meterSharedState=e}return e.prototype.createGauge=function(e,t){var r=Ie(e,Le.GAUGE,t),n=this._meterSharedState.registerMetricStorage(r);return new Yt(n,r)},e.prototype.createHistogram=function(e,t){var r=Ie(e,Le.HISTOGRAM,t),n=this._meterSharedState.registerMetricStorage(r);return new qt(n,r)},e.prototype.createCounter=function(e,t){var r=Ie(e,Le.COUNTER,t),n=this._meterSharedState.registerMetricStorage(r);return new Wt(n,r)},e.prototype.createUpDownCounter=function(e,t){var r=Ie(e,Le.UP_DOWN_COUNTER,t),n=this._meterSharedState.registerMetricStorage(r);return new Xt(n,r)},e.prototype.createObservableGauge=function(e,t){var r=Ie(e,Le.OBSERVABLE_GAUGE,t),n=this._meterSharedState.registerAsyncMetricStorage(r);return new Qt(r,n,this._meterSharedState.observableRegistry)},e.prototype.createObservableCounter=function(e,t){var r=Ie(e,Le.OBSERVABLE_COUNTER,t),n=this._meterSharedState.registerAsyncMetricStorage(r);return new Jt(r,n,this._meterSharedState.observableRegistry)},e.prototype.createObservableUpDownCounter=function(e,t){var r=Ie(e,Le.OBSERVABLE_UP_DOWN_COUNTER,t),n=this._meterSharedState.registerAsyncMetricStorage(r);return new Zt(r,n,this._meterSharedState.observableRegistry)},e.prototype.addBatchObservableCallback=function(e,t){this._meterSharedState.observableRegistry.addBatchCallback(e,t)},e.prototype.removeBatchObservableCallback=function(e,t){this._meterSharedState.observableRegistry.removeBatchCallback(e,t)},e}(),tr=function(){function e(e){this._instrumentDescriptor=e}return e.prototype.getInstrumentDescriptor=function(){return this._instrumentDescriptor},e.prototype.updateDescription=function(e){this._instrumentDescriptor=Ie(this._instrumentDescriptor.name,this._instrumentDescriptor.type,{description:e,valueType:this._instrumentDescriptor.valueType,unit:this._instrumentDescriptor.unit,advice:this._instrumentDescriptor.advice})},e}(),rr=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),nr=function(e,t){var r,n,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(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=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++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).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]0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a}(e,3),o=n[0],i=n[1],a=n[2],s=r._aggregator.createAccumulation(t);null==s||s.record(i);var u=s;if(r._cumulativeMemoStorage.has(o,a)){var c=r._cumulativeMemoStorage.get(o,a);u=r._aggregator.diff(c,s)}if(r._activeCollectionStorage.has(o,a)){var l=r._activeCollectionStorage.get(o,a);u=r._aggregator.merge(l,u)}r._cumulativeMemoStorage.set(o,s,a),r._activeCollectionStorage.set(o,u,a)}))},e.prototype.collect=function(){var e=this._activeCollectionStorage;return this._activeCollectionStorage=new ir,e},e}(),sr=function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},ur=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},cr=function(){function e(e,t){var r=this;this._aggregator=e,this._unreportedAccumulations=new Map,this._reportHistory=new Map,t.forEach((function(e){r._unreportedAccumulations.set(e,[])}))}return e.prototype.buildMetrics=function(t,r,n,o){this._stashAccumulations(n);var i,a=this._getMergedUnreportedAccumulations(t),s=a;if(this._reportHistory.has(t)){var u=this._reportHistory.get(t),c=u.collectionTime;s=(i=u.aggregationTemporality)===V.CUMULATIVE?e.merge(u.accumulations,a,this._aggregator):e.calibrateStartTime(u.accumulations,a,c)}else i=t.selectAggregationTemporality(r.type);this._reportHistory.set(t,{accumulations:s,collectionTime:o,aggregationTemporality:i});var l,f=(l=s,Array.from(l.entries()));if(0!==f.length)return this._aggregator.toMetricData(r,i,f,o)},e.prototype._stashAccumulations=function(e){var t,r,n=this._unreportedAccumulations.keys();try{for(var o=sr(n),i=o.next();!i.done;i=o.next()){var a=i.value,s=this._unreportedAccumulations.get(a);void 0===s&&(s=[],this._unreportedAccumulations.set(a,s)),s.push(e)}}catch(e){t={error:e}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}},e.prototype._getMergedUnreportedAccumulations=function(t){var r,n,o=new ir,i=this._unreportedAccumulations.get(t);if(this._unreportedAccumulations.set(t,[]),void 0===i)return o;try{for(var a=sr(i),s=a.next();!s.done;s=a.next()){var u=s.value;o=e.merge(o,u,this._aggregator)}}catch(e){r={error:e}}finally{try{s&&!s.done&&(n=a.return)&&n.call(a)}finally{if(r)throw r.error}}return o},e.merge=function(e,t,r){for(var n=e,o=t.entries(),i=o.next();!0!==i.done;){var a=ur(i.value,3),s=a[0],u=a[1],c=a[2];if(e.has(s,c)){var l=e.get(s,c),f=r.merge(l,u);n.set(s,f,c)}else n.set(s,u,c);i=o.next()}return n},e.calibrateStartTime=function(e,t,r){var n,o;try{for(var i=sr(e.keys()),a=i.next();!a.done;a=i.next()){var s=ur(a.value,2),u=s[0],c=s[1],l=t.get(u,c);null==l||l.setStartTime(r)}}catch(e){n={error:e}}finally{try{a&&!a.done&&(o=i.return)&&o.call(i)}finally{if(n)throw n.error}}return t},e}(),lr=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),fr=function(e){function t(t,r,n,o){var i=e.call(this,t)||this;return i._attributesProcessor=n,i._deltaMetricStorage=new ar(r),i._temporalMetricStorage=new cr(r,o),i}return lr(t,e),t.prototype.record=function(e,t){var r=this,n=new ir;Array.from(e.entries()).forEach((function(e){var t=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a}(e,2),o=t[0],i=t[1];n.set(r._attributesProcessor.process(o),i)})),this._deltaMetricStorage.batchCumulate(n,t)},t.prototype.collect=function(e,t){var r=this._deltaMetricStorage.collect();return this._temporalMetricStorage.buildMetrics(e,this._instrumentDescriptor,r,t)},t}(tr);function dr(e,t){var r="";return e.unit!==t.unit&&(r+="\t- Unit '"+e.unit+"' does not match '"+t.unit+"'\n"),e.type!==t.type&&(r+="\t- Type '"+e.type+"' does not match '"+t.type+"'\n"),e.valueType!==t.valueType&&(r+="\t- Value Type '"+e.valueType+"' does not match '"+t.valueType+"'\n"),e.description!==t.description&&(r+="\t- Description '"+e.description+"' does not match '"+t.description+"'\n"),r}function pr(e,t){return e.valueType!==t.valueType?function(e,t){return"\t- use valueType '"+e.valueType+"' on instrument creation or use an instrument name other than '"+t.name+"'"}(e,t):e.unit!==t.unit?function(e,t){return"\t- use unit '"+e.unit+"' on instrument creation or use an instrument name other than '"+t.name+"'"}(e,t):e.type!==t.type?function(e,t){var r={name:t.name,type:t.type,unit:t.unit},n=JSON.stringify(r);return"\t- create a new view with a name other than '"+e.name+"' and InstrumentSelector '"+n+"'"}(e,t):e.description!==t.description?function(e,t){var r={name:t.name,type:t.type,unit:t.unit},n=JSON.stringify(r);return"\t- create a new view with a name other than '"+e.name+"' and InstrumentSelector '"+n+"'\n \t- OR - create a new view with the name "+e.name+" and description '"+e.description+"' and InstrumentSelector "+n+"\n \t- OR - create a new view with the name "+t.name+" and description '"+e.description+"' and InstrumentSelector "+n}(e,t):""}var hr,mr=function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},vr=function(){function e(){this._sharedRegistry=new Map,this._perCollectorRegistry=new Map}return e.create=function(){return new e},e.prototype.getStorages=function(e){var t,r,n,o,i=[];try{for(var a=mr(this._sharedRegistry.values()),s=a.next();!s.done;s=a.next()){var u=s.value;i=i.concat(u)}}catch(e){t={error:e}}finally{try{s&&!s.done&&(r=a.return)&&r.call(a)}finally{if(t)throw t.error}}var c=this._perCollectorRegistry.get(e);if(null!=c)try{for(var l=mr(c.values()),f=l.next();!f.done;f=l.next())u=f.value,i=i.concat(u)}catch(e){n={error:e}}finally{try{f&&!f.done&&(o=l.return)&&o.call(l)}finally{if(n)throw n.error}}return i},e.prototype.register=function(e){this._registerStorage(e,this._sharedRegistry)},e.prototype.registerForCollector=function(e,t){var r=this._perCollectorRegistry.get(e);null==r&&(r=new Map,this._perCollectorRegistry.set(e,r)),this._registerStorage(t,r)},e.prototype.findOrUpdateCompatibleStorage=function(e){var t=this._sharedRegistry.get(e.name);return void 0===t?null:this._findOrUpdateCompatibleStorage(e,t)},e.prototype.findOrUpdateCompatibleCollectorStorage=function(e,t){var r=this._perCollectorRegistry.get(e);if(void 0===r)return null;var n=r.get(t.name);return void 0===n?null:this._findOrUpdateCompatibleStorage(t,n)},e.prototype._registerStorage=function(e,t){var r=e.getInstrumentDescriptor(),n=t.get(r.name);void 0!==n?n.push(e):t.set(r.name,[e])},e.prototype._findOrUpdateCompatibleStorage=function(e,t){var r,n,o,i,a,s,u=null;try{for(var c=mr(t),l=c.next();!l.done;l=c.next()){var f=l.value,d=f.getInstrumentDescriptor();i=e,a=void 0,s=void 0,a=(o=d).name,s=i.name,a.toLowerCase()===s.toLowerCase()&&o.unit===i.unit&&o.type===i.type&&o.valueType===i.valueType?(d.description!==e.description&&(e.description.length>d.description.length&&f.updateDescription(e.description),D.warn("A view or instrument with the name ",e.name," has already been registered, but has a different description and is incompatible with another registered view.\n","Details:\n",dr(d,e),"The longer description will be used.\nTo resolve the conflict:",pr(d,e))),u=f):D.warn("A view or instrument with the name ",e.name," has already been registered and is incompatible with another registered view.\n","Details:\n",dr(d,e),"To resolve the conflict:\n",pr(d,e))}}catch(e){r={error:e}}finally{try{l&&!l.done&&(n=c.return)&&n.call(c)}finally{if(r)throw r.error}}return u},e}(),yr=function(){function e(e){this._backingStorages=e}return e.prototype.record=function(e,t,r,n){this._backingStorages.forEach((function(o){o.record(e,t,r,n)}))},e}(),_r=function(){function e(e,t){this._instrumentName=e,this._valueType=t,this._buffer=new ir}return e.prototype.observe=function(e,t){void 0===t&&(t={}),"number"==typeof e?(this._valueType!==xe.INT||Number.isInteger(e)||(D.warn("INT value type cannot accept a floating-point value for "+this._instrumentName+", ignoring the fractional digits."),e=Math.trunc(e),Number.isInteger(e)))&&this._buffer.set(t,e):D.warn("non-number value provided to metric "+this._instrumentName+": "+e)},e}(),gr=function(){function e(){this._buffer=new Map}return e.prototype.observe=function(e,t,r){if(void 0===r&&(r={}),$t(e)){var n=this._buffer.get(e);null==n&&(n=new ir,this._buffer.set(e,n)),"number"==typeof t?(e._descriptor.valueType!==xe.INT||Number.isInteger(t)||(D.warn("INT value type cannot accept a floating-point value for "+e._descriptor.name+", ignoring the fractional digits."),t=Math.trunc(t),Number.isInteger(t)))&&n.set(r,t):D.warn("non-number value provided to metric "+e._descriptor.name+": "+t)}},e}(),br=function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{u(n.next(e))}catch(e){i(e)}}function s(e){try{u(n.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},wr=function(e,t){var r,n,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(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=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++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).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]0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a},Tr=function(e,t,r){if(r||2===arguments.length)for(var n,o=0,i=t.length;o=0||this._callbacks.push({callback:e,instrument:t})},e.prototype.removeCallback=function(e,t){var r=this._findCallback(e,t);r<0||this._callbacks.splice(r,1)},e.prototype.addBatchCallback=function(e,t){var r=new Set(t.filter($t));0!==r.size?this._findBatchCallback(e,r)>=0||this._batchCallbacks.push({callback:e,instruments:r}):D.error("BatchObservableCallback is not associated with valid instruments",t)},e.prototype.removeBatchCallback=function(e,t){var r=new Set(t.filter($t)),n=this._findBatchCallback(e,r);n<0||this._batchCallbacks.splice(n,1)},e.prototype.observe=function(e,t){return br(this,void 0,void 0,(function(){var r,n;return wr(this,(function(o){switch(o.label){case 0:return r=this._observeCallbacks(e,t),n=this._observeBatchCallbacks(e,t),[4,ge(Tr(Tr([],Er(r),!1),Er(n),!1))];case 1:return[2,o.sent().filter(be).map((function(e){return e.reason}))]}}))}))},e.prototype._observeCallbacks=function(e,t){var r=this;return this._callbacks.map((function(n){var o=n.callback,i=n.instrument;return br(r,void 0,void 0,(function(){var r,n;return wr(this,(function(a){switch(a.label){case 0:return r=new _r(i._descriptor.name,i._descriptor.valueType),n=Promise.resolve(o(r)),null!=t&&(n=_e(n,t)),[4,n];case 1:return a.sent(),i._metricStorages.forEach((function(t){t.record(r._buffer,e)})),[2]}}))}))}))},e.prototype._observeBatchCallbacks=function(e,t){var r=this;return this._batchCallbacks.map((function(n){var o=n.callback,i=n.instruments;return br(r,void 0,void 0,(function(){var r,n;return wr(this,(function(a){switch(a.label){case 0:return r=new gr,n=Promise.resolve(o(r)),null!=t&&(n=_e(n,t)),[4,n];case 1:return a.sent(),i.forEach((function(t){var n=r._buffer.get(t);null!=n&&t._metricStorages.forEach((function(t){t.record(n,e)}))})),[2]}}))}))}))},e.prototype._findCallback=function(e,t){return this._callbacks.findIndex((function(r){return r.callback===e&&r.instrument===t}))},e.prototype._findBatchCallback=function(e,t){return this._batchCallbacks.findIndex((function(r){return r.callback===e&&function(e,t){var r,n;if(e.size!==t.size)return!1;try{for(var o=function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(e),i=o.next();!i.done;i=o.next()){var a=i.value;if(!t.has(a))return!1}}catch(e){r={error:e}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(r)throw r.error}}return!0}(r.instruments,t)}))},e}(),Sr=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Mr=function(e){function t(t,r,n,o){var i=e.call(this,t)||this;return i._attributesProcessor=n,i._deltaMetricStorage=new ar(r),i._temporalMetricStorage=new cr(r,o),i}return Sr(t,e),t.prototype.record=function(e,t,r,n){t=this._attributesProcessor.process(t,r),this._deltaMetricStorage.record(e,t,r,n)},t.prototype.collect=function(e,t){var r=this._deltaMetricStorage.collect();return this._temporalMetricStorage.buildMetrics(e,this._instrumentDescriptor,r,t)},t}(tr),Ar=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Pr=function(){function e(){}return e.Noop=function(){return xr},e}(),Rr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return Ar(t,e),t.prototype.process=function(e,t){return e},t}(Pr),xr=(function(e){function t(t){var r=e.call(this)||this;return r._allowedAttributeNames=t,r}Ar(t,e),t.prototype.process=function(e,t){var r=this,n={};return Object.keys(e).filter((function(e){return r._allowedAttributeNames.includes(e)})).forEach((function(t){return n[t]=e[t]})),n}}(Pr),new Rr),Lr=function(){function e(e,t){this._meterProviderSharedState=e,this._instrumentationScope=t,this.metricStorageRegistry=new vr,this.observableRegistry=new Or,this.meter=new er(this)}return e.prototype.registerMetricStorage=function(e){var t=this._registerMetricStorage(e,Mr);return 1===t.length?t[0]:new yr(t)},e.prototype.registerAsyncMetricStorage=function(e){return this._registerMetricStorage(e,fr)},e.prototype.collect=function(e,t,r){return function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{u(n.next(e))}catch(e){i(e)}}function s(e){try{u(n.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))}(this,void 0,void 0,(function(){var n,o,i;return function(e,t){var r,n,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(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=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++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).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]0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a}(n,2),i=o[0],a=o[1],s=r.metricStorageRegistry.findOrUpdateCompatibleCollectorStorage(i,e);if(null!=s)return s;var u=a.createAggregator(e),c=new t(e,u,Pr.Noop(),[i]);return r.metricStorageRegistry.registerForCollector(i,c),c}));n=n.concat(o)}return n},e}(),kr=function(){function e(e){this.resource=e,this.viewRegistry=new Vt,this.metricCollectors=[],this.meterSharedStates=new Map}return e.prototype.getMeterSharedState=function(e){var t=function(e){var t,r;return e.name+":"+(null!==(t=e.version)&&void 0!==t?t:"")+":"+(null!==(r=e.schemaUrl)&&void 0!==r?r:"")}(e),r=this.meterSharedStates.get(t);return null==r&&(r=new Lr(this,e),this.meterSharedStates.set(t,r)),r},e.prototype.selectAggregations=function(e){var t,r,n=[];try{for(var o=function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(this.metricCollectors),i=o.next();!i.done;i=o.next()){var a=i.value;n.push([a,a.selectAggregation(e)])}}catch(e){t={error:e}}finally{try{i&&!i.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}return n},e}(),Cr=function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{u(n.next(e))}catch(e){i(e)}}function s(e){try{u(n.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},Ir=function(e,t){var r,n,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(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=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++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).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]0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a}(i.errors),!1)),[2]}}))}))})),[4,Promise.all(o)];case 1:return a.sent(),[2,{resourceMetrics:{resource:this._sharedState.resource,scopeMetrics:r},errors:n}]}}))}))},e.prototype.forceFlush=function(e){return Cr(this,void 0,void 0,(function(){return Ir(this,(function(t){switch(t.label){case 0:return[4,this._metricReader.forceFlush(e)];case 1:return t.sent(),[2]}}))}))},e.prototype.shutdown=function(e){return Cr(this,void 0,void 0,(function(){return Ir(this,(function(t){switch(t.label){case 0:return[4,this._metricReader.shutdown(e)];case 1:return t.sent(),[2]}}))}))},e.prototype.selectAggregationTemporality=function(e){return this._metricReader.selectAggregationTemporality(e)},e.prototype.selectAggregation=function(e){return this._metricReader.selectAggregation(e)},e}(),Br=function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{u(n.next(e))}catch(e){i(e)}}function s(e){try{u(n.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))},Fr=function(e,t){var r,n,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(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=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++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).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]=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},Dr=function(){function e(e){var t,r,n,o,i;this._shutdown=!1;var a=Gt.default().merge(null!==(i=null==e?void 0:e.resource)&&void 0!==i?i:Gt.empty());if(this._sharedState=new kr(a),null!=(null==e?void 0:e.views)&&e.views.length>0)try{for(var s=Ur(e.views),u=s.next();!u.done;u=s.next()){var c=u.value;this._sharedState.viewRegistry.addView(c)}}catch(e){t={error:e}}finally{try{u&&!u.done&&(r=s.return)&&r.call(s)}finally{if(t)throw t.error}}if(null!=(null==e?void 0:e.readers)&&e.readers.length>0)try{for(var l=Ur(e.readers),f=l.next();!f.done;f=l.next()){var d=f.value;this.addMetricReader(d)}}catch(e){n={error:e}}finally{try{f&&!f.done&&(o=l.return)&&o.call(l)}finally{if(n)throw n.error}}}return e.prototype.getMeter=function(e,t,r){return void 0===t&&(t=""),void 0===r&&(r={}),this._shutdown?(D.warn("A shutdown MeterProvider cannot provide a Meter"),m):this._sharedState.getMeterSharedState({name:e,version:t,schemaUrl:r.schemaUrl}).meter},e.prototype.addMetricReader=function(e){var t=new Nr(this._sharedState,e);e.setMetricProducer(t),this._sharedState.metricCollectors.push(t)},e.prototype.shutdown=function(e){return Br(this,void 0,void 0,(function(){return Fr(this,(function(t){switch(t.label){case 0:return this._shutdown?(D.warn("shutdown may only be called once per MeterProvider"),[2]):(this._shutdown=!0,[4,Promise.all(this._sharedState.metricCollectors.map((function(t){return t.shutdown(e)})))]);case 1:return t.sent(),[2]}}))}))},e.prototype.forceFlush=function(e){return Br(this,void 0,void 0,(function(){return Fr(this,(function(t){switch(t.label){case 0:return this._shutdown?(D.warn("invalid attempt to force flush after MeterProvider shutdown"),[2]):[4,Promise.all(this._sharedState.metricCollectors.map((function(t){return t.forceFlush(e)})))];case 1:return t.sent(),[2]}}))}))},e}(),jr=r(880),Gr=r.n(jr),Vr=/bot|crawl|http|lighthouse|scan|search|spider/i;var Hr=function(e){return"string"==typeof(t=e)&&""!==t&&function(){if(hr instanceof RegExp)return hr;try{hr=new RegExp(" daum[ /]| deusu/|(?:^|[^g])news(?!sapphire)|(?"string"==typeof e,Wr={"browser.name":Xr,"browser.version":Xr,"browser.device_type":e=>zr.includes(e),"browser.language":Xr,"browser.mobile":e=>"boolean"==typeof e,"browser.platform":Xr,"user_agent.original":Xr},Yr=(Object.keys(Wr),["browser.name","browser.device_type","browser.mobile"]),qr=()=>{const e=(e=>{if(!e)return{browser:{},mobile:!1};const{browser:t,platform:r}=Gr().parse(e);return{browser:t,deviceType:Hr(e)?"bot":r?.type,mobile:["tablet","mobile"].includes(r?.type||"")}})(window.navigator.userAgent);return{"browser.name":e.browser.name,"browser.device_type":e.deviceType,"browser.mobile":e.mobile}},Kr=(e,t,r)=>{if(!t||"object"!=typeof t)return e;const n=Object.fromEntries(r.filter((e=>Wr[e](t[e]))).map((e=>[e,t[e]])));return{...e,...n}},Jr={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let Qr;const Zr=new Uint8Array(16);function $r(){if(!Qr&&(Qr="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!Qr))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Qr(Zr)}const en=[];for(let e=0;e<256;++e)en.push((e+256).toString(16).slice(1));const tn=function(e,t,r){if(Jr.randomUUID&&!t&&!e)return Jr.randomUUID();const n=(e=e||{}).random||(e.rng||$r)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){r=r||0;for(let e=0;e<16;++e)t[r+e]=n[e];return t}return function(e,t=0){return en[e[t+0]]+en[e[t+1]]+en[e[t+2]]+en[e[t+3]]+"-"+en[e[t+4]]+en[e[t+5]]+"-"+en[e[t+6]]+en[e[t+7]]+"-"+en[e[t+8]]+en[e[t+9]]+"-"+en[e[t+10]]+en[e[t+11]]+en[e[t+12]]+en[e[t+13]]+en[e[t+14]]+en[e[t+15]]}(n)},rn=()=>{let e=sessionStorage.getItem("ebay-rum-session-id");return e||(e=tn(),sessionStorage.setItem("ebay-rum-session-id",e)),e},nn=(e,t)=>{let r;try{r=new URL(t,e).toString()}catch{throw new Error("Invalid value for property 'endpoint' provided to initializer")}return r};var on,an=Symbol("BaggageEntryMetadata"),sn=B.instance(),un="=",cn=";";function ln(e){return"string"!=typeof e||0===e.length?{}:e.split(",").map((function(e){return function(e){var t=e.split(cn);if(!(t.length<=0)){var r=t.shift();if(r){var n=r.indexOf(un);if(!(n<=0)){var o,i,a=decodeURIComponent(r.substring(0,n).trim()),s=decodeURIComponent(r.substring(n+1).trim());return t.length>0&&("string"!=typeof(i=t.join(cn))&&(sn.error("Cannot create baggage metadata from unknown type: "+typeof i),i=""),o={__TYPE__:an,toString:function(){return i}}),{key:a,value:s,metadata:o}}}}}(e)})).filter((function(e){return void 0!==e&&e.value.length>0})).reduce((function(e,t){return e[t.key]=t.value,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"}(on||(on={}));var fn=",",dn=["OTEL_SDK_DISABLED"];function pn(e){return dn.indexOf(e)>-1}var hn=["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 mn(e){return hn.indexOf(e)>-1}var vn=["OTEL_NO_PATCH_MODULES","OTEL_PROPAGATORS"];function yn(e){return vn.indexOf(e)>-1}var _n=1/0,gn={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:C.INFO,OTEL_NO_PATCH_MODULES:[],OTEL_PROPAGATORS:["tracecontext","baggage"],OTEL_RESOURCE_ATTRIBUTES:"",OTEL_SERVICE_NAME:"",OTEL_ATTRIBUTE_VALUE_LENGTH_LIMIT:_n,OTEL_ATTRIBUTE_COUNT_LIMIT:128,OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT:_n,OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT:128,OTEL_LOGRECORD_ATTRIBUTE_VALUE_LENGTH_LIMIT:_n,OTEL_LOGRECORD_ATTRIBUTE_COUNT_LIMIT:128,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:on.ParentBasedAlwaysOn,OTEL_TRACES_SAMPLER_ARG:"",OTEL_LOGS_EXPORTER:"",OTEL_EXPORTER_OTLP_INSECURE:"",OTEL_EXPORTER_OTLP_TRACES_INSECURE:"",OTEL_EXPORTER_OTLP_METRICS_INSECURE:"",OTEL_EXPORTER_OTLP_LOGS_INSECURE:"",OTEL_EXPORTER_OTLP_CERTIFICATE:"",OTEL_EXPORTER_OTLP_TRACES_CERTIFICATE:"",OTEL_EXPORTER_OTLP_METRICS_CERTIFICATE:"",OTEL_EXPORTER_OTLP_LOGS_CERTIFICATE:"",OTEL_EXPORTER_OTLP_COMPRESSION:"",OTEL_EXPORTER_OTLP_TRACES_COMPRESSION:"",OTEL_EXPORTER_OTLP_METRICS_COMPRESSION:"",OTEL_EXPORTER_OTLP_LOGS_COMPRESSION:"",OTEL_EXPORTER_OTLP_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_TRACES_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_METRICS_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_LOGS_CLIENT_KEY:"",OTEL_EXPORTER_OTLP_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_TRACES_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_METRICS_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_LOGS_CLIENT_CERTIFICATE:"",OTEL_EXPORTER_OTLP_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_TRACES_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_METRICS_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_LOGS_PROTOCOL:"http/protobuf",OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE:"cumulative"};function bn(e,t,r){if(void 0!==r[e]){var n=String(r[e]);t[e]="true"===n.toLowerCase()}}function wn(e,t,r,n,o){if(void 0===n&&(n=-1/0),void 0===o&&(o=1/0),void 0!==r[e]){var i=Number(r[e]);isNaN(i)||(t[e]=io?o:i)}}function En(e,t,r,n){void 0===n&&(n=fn);var o=r[e];"string"==typeof o&&(t[e]=o.split(n).map((function(e){return e.trim()})))}var Tn={ALL:C.ALL,VERBOSE:C.VERBOSE,DEBUG:C.DEBUG,INFO:C.INFO,WARN:C.WARN,ERROR:C.ERROR,NONE:C.NONE};function On(e,t,r){var n=r[e];if("string"==typeof n){var o=Tn[n.toUpperCase()];null!=o&&(t[e]=o)}}var Sn,Mn="object"==typeof globalThis?globalThis:"object"==typeof self?self:"object"==typeof window?window:"object"==typeof r.g?r.g:{};function An(){var e=function(e){var t={};for(var r in gn){var n=r;if("OTEL_LOG_LEVEL"===n)On(n,t,e);else if(pn(n))bn(n,t,e);else if(mn(n))wn(n,t,e);else if(yn(n))En(n,t,e);else{var o=e[n];null!=o&&(t[n]=String(o))}}return t}(Mn);return Object.assign({},gn,e)}!function(e){e[e.DELTA=0]="DELTA",e[e.CUMULATIVE=1]="CUMULATIVE",e[e.LOWMEMORY=2]="LOWMEMORY"}(Sn||(Sn={}));var Pn=function(){return V.CUMULATIVE},Rn=function(e){switch(e){case Le.COUNTER:case Le.OBSERVABLE_COUNTER:case Le.GAUGE:case Le.HISTOGRAM:case Le.OBSERVABLE_GAUGE:return V.DELTA;case Le.UP_DOWN_COUNTER:case Le.OBSERVABLE_UP_DOWN_COUNTER:return V.CUMULATIVE}},xn=function(e){switch(e){case Le.COUNTER:case Le.HISTOGRAM:return V.DELTA;case Le.GAUGE:case Le.UP_DOWN_COUNTER:case Le.OBSERVABLE_UP_DOWN_COUNTER:case Le.OBSERVABLE_COUNTER:case Le.OBSERVABLE_GAUGE:return V.CUMULATIVE}};var Ln=function(){function e(e,t){var r,n,o;this._otlpExporter=e,this._aggregationSelector=function(e){return(null==e?void 0:e.aggregationPreference)?e.aggregationPreference:function(e){return rt.Default()}}(t),this._aggregationTemporalitySelector=null!=(r=null==t?void 0:t.temporalityPreference)?r===Sn.DELTA?Rn:r===Sn.LOWMEMORY?xn:Pn:"cumulative"===(o=(n=An()).OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE.trim().toLowerCase())?Pn:"delta"===o?Rn:"lowmemory"===o?xn:(D.warn("OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE is set to '"+n.OTEL_EXPORTER_OTLP_METRICS_TEMPORALITY_PREFERENCE+"', but only 'cumulative' and 'delta' are allowed. Using default ('cumulative') instead."),Pn)}return e.prototype.export=function(e,t){this._otlpExporter.export([e],t)},e.prototype.shutdown=function(){return function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{u(n.next(e))}catch(e){i(e)}}function s(e){try{u(n.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}u((n=n.apply(e,t||[])).next())}))}(this,void 0,void 0,(function(){return function(e,t){var r,n,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(r)throw new TypeError("Generator is already executing.");for(;a;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=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++,n=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).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]0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a}(r),!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}(),Nn=function(){function e(e){var t;void 0===e&&(e={}),this._sendingPromises=[],this.url=this.getDefaultUrl(e),"string"==typeof e.hostname&&(this.hostname=e.hostname),this.shutdown=this.shutdown.bind(this),this._shutdownOnce=new In(this._shutdown,this),this._concurrencyLimit="number"==typeof e.concurrencyLimit?e.concurrencyLimit:30,this.timeoutMillis="number"==typeof(t=e.timeoutMillis)?t<=0?kn(t,1e4):t:function(){var e,t=Number(null!==(e=An().OTEL_EXPORTER_OTLP_TRACES_TIMEOUT)&&void 0!==e?e:An().OTEL_EXPORTER_OTLP_TIMEOUT);return t<=0?kn(t,1e4):t}(),this.onInit(e)}return e.prototype.export=function(e,t){this._shutdownOnce.isCalled?t({code:re.FAILED,error:new Error("Exporter has been shutdown")}):this._sendingPromises.length>=this._concurrencyLimit?t({code:re.FAILED,error:new Error("Concurrent export limit reached")}):this._export(e).then((function(){t({code:re.SUCCESS})})).catch((function(e){t({code:re.FAILED,error:e})}))},e.prototype._export=function(e){var t=this;return new Promise((function(r,n){try{D.debug("items to be sent",e),t.send(e,r,n)}catch(e){n(e)}}))},e.prototype.shutdown=function(){return this._shutdownOnce.call()},e.prototype.forceFlush=function(){return Promise.all(this._sendingPromises).then((function(){}))},e.prototype._shutdown=function(){return D.debug("shutdown started"),this.onShutdown(),this.forceFlush()},e}(),Bn=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Fn=function(e){function t(t,r,n){var o=e.call(this,t)||this;return o.name="OTLPExporterError",o.data=n,o.code=r,o}return Bn(t,e),t}(Error),Un=function(){return Un=Object.assign||function(e){for(var t,r=1,n=arguments.length;r0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a}(e,2),r=t[0],n=t[1];s.setRequestHeader(r,n)})),s.send(e),s.onreadystatechange=function(){if(s.readyState===XMLHttpRequest.DONE&&!1===u)if(s.status>=200&&s.status<=299)D.debug("xhr success",e),o(),clearTimeout(c),clearTimeout(a);else if(s.status&&(d=s.status,[429,502,503,504].includes(d))&&n>0){var t;f*=1.5,t=s.getResponseHeader("Retry-After")?function(e){if(null==e)return-1;var t=Number.parseInt(e,10);if(Number.isInteger(t))return t>0?1e3*t:-1;var r=new Date(e).getTime()-Date.now();return r>=0?r:0}(s.getResponseHeader("Retry-After")):Math.round(Math.random()*(5e3-f)+f),a=setTimeout((function(){l(n-1,f)}),t)}else{var r=new Fn("Failed to export with XHR (status: "+s.status+")",s.status);i(r),clearTimeout(c),clearTimeout(a)}var d},s.onabort=function(){if(u){var e=new Fn("Request Timeout");i(e)}clearTimeout(c),clearTimeout(a)},s.onerror=function(){if(u){var e=new Fn("Request Timeout");i(e)}clearTimeout(c),clearTimeout(a)}};l()}var jn=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Gn=function(e){function t(t){void 0===t&&(t={});var r=e.call(this,t)||this;return r._useXHR=!1,r._useXHR=!!t.headers||"function"!=typeof navigator.sendBeacon,r._useXHR?r._headers=Object.assign({},function(e){void 0===e&&(e={});var t={};return Object.entries(e).forEach((function(e){var r=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a}(e,2),n=r[0],o=r[1];void 0!==o?t[n]=String(o):D.warn('Header "'+n+'" has invalid value ('+o+") and will be ignored")})),t}(t.headers),ln(An().OTEL_EXPORTER_OTLP_HEADERS)):r._headers={},r}return jn(t,e),t.prototype.onInit=function(){},t.prototype.onShutdown=function(){},t.prototype.send=function(e,t,r){var n=this;if(this._shutdownOnce.isCalled)D.debug("Shutdown already started. Cannot send objects");else{var o=this.convert(e),i=JSON.stringify(o),a=new Promise((function(e,t){n._useXHR?Dn(i,n.url,n._headers,n.timeoutMillis,e,t):function(e,t,r,n,o){navigator.sendBeacon(t,new Blob([e],{type:"application/json"}))?(D.debug("sendBeacon - can send",e),n()):o(new Fn("sendBeacon - cannot send "+e))}(i,n.url,0,e,t)})).then(t,r);this._sendingPromises.push(a);var s=function(){var e=n._sendingPromises.indexOf(a);n._sendingPromises.splice(e,1)};a.then(s,s)}},t}(Nn);function Vn(e){return e>=48&&e<=57?e-48:e>=97&&e<=102?e-87:e-55}function Hn(e){for(var t=new Uint8Array(e.length/2),r=0,n=0;n>BigInt(32)))}}var Wn="undefined"!=typeof BigInt?function(e){return zn(e).toString()}:function(e){return e[0]*Ae+e[1]};function Yn(e){return e}function qn(e){if(void 0!==e)return Hn(e)}var Kn={encodeHrTime:Xn,encodeSpanContext:Hn,encodeOptionalSpanContext:qn},Jn=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,o,i=r.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(e){o={error:e}}finally{try{n&&!n.done&&(r=i.return)&&r.call(i)}finally{if(o)throw o.error}}return a};function Qn(e){return Object.keys(e).map((function(t){return Zn(t,e[t])}))}function Zn(e,t){return{key:e,value:$n(t)}}function $n(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($n)}}:"object"===t&&null!=e?{kvlistValue:{values:Object.entries(e).map((function(e){var t=Jn(e,2);return Zn(t[0],t[1])}))}}:{}}function eo(e,t){return Array.from(e.map((function(e){return{scope:(r=e.scope,{name:r.name,version:r.version}),metrics:e.metrics.map((function(e){return function(e,t){var r={name:e.descriptor.name,description:e.descriptor.description,unit:e.descriptor.unit},n=function(e){switch(e){case V.DELTA:return 1;case V.CUMULATIVE:return 2}}(e.aggregationTemporality);switch(e.dataPointType){case Ee.SUM:r.sum={aggregationTemporality:n,isMonotonic:e.isMonotonic,dataPoints:to(e,t)};break;case Ee.GAUGE:r.gauge={dataPoints:to(e,t)};break;case Ee.HISTOGRAM:r.histogram={aggregationTemporality:n,dataPoints:ro(e,t)};break;case Ee.EXPONENTIAL_HISTOGRAM:r.exponentialHistogram={aggregationTemporality:n,dataPoints:no(e,t)}}return r}(e,t)})),schemaUrl:e.scope.schemaUrl};var r})))}function to(e,t){return e.dataPoints.map((function(r){return function(e,t,r){var n={attributes:Qn(e.attributes),startTimeUnixNano:r.encodeHrTime(e.startTime),timeUnixNano:r.encodeHrTime(e.endTime)};switch(t){case xe.INT:n.asInt=e.value;break;case xe.DOUBLE:n.asDouble=e.value}return n}(r,e.descriptor.valueType,t)}))}function ro(e,t){return e.dataPoints.map((function(e){var r=e.value;return{attributes:Qn(e.attributes),bucketCounts:r.buckets.counts,explicitBounds:r.buckets.boundaries,count:r.count,sum:r.sum,min:r.min,max:r.max,startTimeUnixNano:t.encodeHrTime(e.startTime),timeUnixNano:t.encodeHrTime(e.endTime)}}))}function no(e,t){return e.dataPoints.map((function(e){var r=e.value;return{attributes:Qn(e.attributes),count:r.count,min:r.min,max:r.max,sum:r.sum,positive:{offset:r.positive.offset,bucketCounts:r.positive.bucketCounts},negative:{offset:r.negative.offset,bucketCounts:r.negative.bucketCounts},scale:r.scale,zeroCount:r.zeroCount,startTimeUnixNano:t.encodeHrTime(e.startTime),timeUnixNano:t.encodeHrTime(e.endTime)}}))}var oo=function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},e(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),io="v1/metrics",ao="http://localhost:4318/"+io,so=function(e){function t(t){var r=e.call(this,t)||this;return r._headers=Object.assign(r._headers,ln(An().OTEL_EXPORTER_OTLP_METRICS_HEADERS)),r}return oo(t,e),t.prototype.getDefaultUrl=function(e){return"string"==typeof e.url?e.url:An().OTEL_EXPORTER_OTLP_METRICS_ENDPOINT.length>0?function(e){try{var t=new URL(e);return""===t.pathname&&(t.pathname=t.pathname+"/"),t.toString()}catch(t){return D.warn("Could not parse export URL: '"+e+"'"),e}}(An().OTEL_EXPORTER_OTLP_METRICS_ENDPOINT):An().OTEL_EXPORTER_OTLP_ENDPOINT.length>0?(t=An().OTEL_EXPORTER_OTLP_ENDPOINT,r=io,t.endsWith("/")||(t+="/"),t+r):ao;var t,r},t.prototype.convert=function(e){return t={useLongBits:!1},{resourceMetrics:e.map((function(e){return function(e,t){var r,n=function(e){var t,r;if(void 0===e)return Kn;var n=null===(t=e.useLongBits)||void 0===t||t,o=null!==(r=e.useHex)&&void 0!==r&&r;return{encodeHrTime:n?Xn:Wn,encodeSpanContext:o?Yn:Hn,encodeOptionalSpanContext:o?Yn:qn}}(t);return{resource:(r=e.resource,{attributes:Qn(r.attributes),droppedAttributesCount:0}),schemaUrl:void 0,scopeMetrics:eo(e.scopeMetrics,n)}}(e,t)}))};var t},t}(Gn),uo=function(e){function t(t){return e.call(this,new so(t),t)||this}return oo(t,e),t}(Ln);const co=e=>(e?.dataPoints?.length??0)>0,lo=e=>e?.metrics?.some(co)??!1;class fo extends uo{export(e,t){return e?.scopeMetrics?.some(lo)?super.export(e,t):t({code:re.SUCCESS})}}let po=-1;const ho=e=>{addEventListener("pageshow",(t=>{t.persisted&&(po=t.timeStamp,e(t))}),!0)},mo=(e,t,r,n)=>{let o,i;return a=>{t.value>=0&&(a||n)&&(i=t.value-(o??0),(i||void 0===o)&&(o=t.value,t.delta=i,t.rating=((e,t)=>e>t[1]?"poor":e>t[0]?"needs-improvement":"good")(t.value,r),e(t)))}},vo=e=>{requestAnimationFrame((()=>requestAnimationFrame((()=>e()))))},yo=()=>{const e=performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart{const e=yo();return e?.activationStart??0},go=(e,t=-1)=>{const r=yo();let n="navigate";return po>=0?n="back-forward-cache":r&&(document.prerendering||_o()>0?n="prerender":document.wasDiscarded?n="restore":r.type&&(n=r.type.replace(/_/g,"-"))),{name:e,value:t,rating:"good",delta:0,entries:[],id:`v5-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:n}},bo=new WeakMap;function wo(e,t){return bo.get(e)||bo.set(e,new t),bo.get(e)}class Eo{t;i=0;o=[];h(e){if(e.hadRecentInput)return;const t=this.o[0],r=this.o.at(-1);this.i&&t&&r&&e.startTime-r.startTime<1e3&&e.startTime-t.startTime<5e3?(this.i+=e.value,this.o.push(e)):(this.i=e.value,this.o=[e]),this.t?.(e)}}const To=(e,t,r={})=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){const n=new PerformanceObserver((e=>{Promise.resolve().then((()=>{t(e.getEntries())}))}));return n.observe({type:e,buffered:!0,...r}),n}}catch{}},Oo=e=>{let t=!1;return()=>{t||(e(),t=!0)}};let So=-1;const Mo=new Set,Ao=()=>"hidden"!==document.visibilityState||document.prerendering?1/0:0,Po=e=>{if("hidden"===document.visibilityState){if("visibilitychange"===e.type)for(const e of Mo)e();isFinite(So)||(So="visibilitychange"===e.type?e.timeStamp:0,removeEventListener("prerenderingchange",Po,!0))}},Ro=()=>{if(So<0){const e=_o(),t=document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").filter((t=>"hidden"===t.name&&t.startTime>e))[0]?.startTime;So=t??Ao(),addEventListener("visibilitychange",Po,!0),addEventListener("prerenderingchange",Po,!0),ho((()=>{setTimeout((()=>{So=Ao()}))}))}return{get firstHiddenTime(){return So},onHidden(e){Mo.add(e)}}},xo=e=>{document.prerendering?addEventListener("prerenderingchange",(()=>e()),!0):e()},Lo=[1800,3e3],ko=(e,t={})=>{xo((()=>{const r=Ro();let n,o=go("FCP");const i=To("paint",(e=>{for(const t of e)"first-contentful-paint"===t.name&&(i.disconnect(),t.startTime{o=go("FCP"),n=mo(e,o,Lo,t.reportAllChanges),vo((()=>{o.value=performance.now()-r.timeStamp,n(!0)}))})))}))},Co=[.1,.25];let Io=0,No=1/0,Bo=0;const Fo=e=>{for(const t of e)t.interactionId&&(No=Math.min(No,t.interactionId),Bo=Math.max(Bo,t.interactionId),Io=Bo?(Bo-No)/7+1:0)};let Uo;const Do=()=>Uo?Io:performance.interactionCount??0;let jo=0;class Go{u=[];l=new Map;m;p;v(){jo=Do(),this.u.length=0,this.l.clear()}L(){const e=Math.min(this.u.length-1,Math.floor((Do()-jo)/50));return this.u[e]}h(e){if(this.m?.(e),!e.interactionId&&"first-input"!==e.entryType)return;const t=this.u.at(-1);let r=this.l.get(e.interactionId);if(r||this.u.length<10||e.duration>t.P){if(r?e.duration>r.P?(r.entries=[e],r.P=e.duration):e.duration===r.P&&e.startTime===r.entries[0].startTime&&r.entries.push(e):(r={id:e.interactionId,entries:[e],P:e.duration},this.l.set(r.id,r),this.u.push(r)),this.u.sort(((e,t)=>t.P-e.P)),this.u.length>10){const e=this.u.splice(10);for(const t of e)this.l.delete(t.id)}this.p?.(r)}}}const Vo=e=>{const t=globalThis.requestIdleCallback||setTimeout;"hidden"===document.visibilityState?e():(e=Oo(e),addEventListener("visibilitychange",e,{once:!0,capture:!0}),t((()=>{e(),removeEventListener("visibilitychange",e,{capture:!0})})))},Ho=[200,500];class zo{m;h(e){this.m?.(e)}}const Xo=[2500,4e3],Wo=[800,1800],Yo=e=>{document.prerendering?xo((()=>Yo(e))):"complete"!==document.readyState?addEventListener("load",(()=>Yo(e)),!0):setTimeout(e)},qo=e=>Number.isFinite(e)&&e>=0?e:-1;function Ko(e,t,r){return e<=t?"good":e<=r?"needs-improvement":"poor"}const Jo=[{name:"browser.page_load.duration",description:"Total client-measured page load duration",legacy:"ex3",bucketsMs:[100,250,500,1e3,1500,2e3,2500,3e3,3500,4e3,5e3,6e3,7500,9e3,1e4,12500,15e3,2e4],goodLe:2500,needsImprovementLe:4e3,value:e=>e.duration},{name:"browser.render.duration",description:"Client render/processing duration (responseStart to now)",legacy:"jseaa",bucketsMs:[100,250,500,750,1e3,1250,1500,1750,2e3,2500,3e3,3500,4e3,5e3,6500,8e3,1e4,15e3],goodLe:1500,needsImprovementLe:2500,value:e=>e.duration-e.responseStart},{name:"browser.ttfb.duration",description:"Time to first byte (start to responseStart)",legacy:"jseap",bucketsMs:[50,100,150,200,300,400,500,650,800,1e3,1250,1500,1750,2e3,2500,3e3,4e3,5e3],goodLe:800,needsImprovementLe:1800,value:e=>e.responseStart},{name:"browser.dom_complete.duration",description:"Duration from first byte to DOM complete",legacy:"ct1chnk",bucketsMs:[100,250,500,750,1e3,1250,1500,1750,2e3,2500,3e3,3500,4e3,5e3,6500,8e3,1e4,15e3],goodLe:2e3,needsImprovementLe:4e3,value:e=>e.domComplete-e.responseStart},{name:"network.dns_lookup.duration",description:"DNS lookup duration",legacy:"jsljgr3",bucketsMs:[5,10,20,30,50,75,100,150,200,300,400,500,650,800,1e3,1500,2e3],goodLe:50,needsImprovementLe:150,value:e=>e.domainLookupEnd-e.domainLookupStart},{name:"network.tcp_connect.duration",description:"TCP connect duration",legacy:"svo",bucketsMs:[10,20,30,50,75,100,150,200,300,400,500,650,800,1e3,1500,2e3,3e3,5e3],goodLe:150,needsImprovementLe:400,value:e=>e.connectEnd-e.connectStart},{name:"network.request.duration",description:"Request start to first byte duration",legacy:"jsljgr1",bucketsMs:[50,100,150,200,300,400,500,650,800,1e3,1250,1500,1750,2e3,2500,3e3,4e3,5e3],goodLe:600,needsImprovementLe:1500,value:e=>e.responseStart-e.requestStart},{name:"network.response_download.duration",description:"Response download duration (first byte to response end)",legacy:"slo",bucketsMs:[20,50,75,100,150,200,300,400,500,650,800,1e3,1250,1500,1750,2e3,3e3,5e3,8e3],goodLe:800,needsImprovementLe:2e3,value:e=>e.responseEnd-e.responseStart},{name:"network.tls_handshake.duration",description:"TLS handshake duration (secure connection start to connect end)",legacy:"i_ssl",bucketsMs:[10,50,75,100,150,200,300,400,500,650,800,1e3,1250,1500,1750,2e3,3e3,5e3],goodLe:250,needsImprovementLe:500,value:e=>e.connectEnd-e.secureConnectionStart}],Qo=[{name:"browser.memory.heap_used",description:"Used JavaScript heap size in megabytes",unit:"MB",goodLe:50,legacy:"n/a",needsImprovementLe:150,value:()=>{const e=performance.memory;return Number.isFinite(e?.usedJSHeapSize)?Math.round(e.usedJSHeapSize/1048576):void 0}},{name:"browser.dom.nodes",description:"Total number of DOM nodes in the document",unit:"1",goodLe:3e3,legacy:"dcon",needsImprovementLe:8e3,value:()=>document.getElementsByTagName("*").length}];function Zo(e,t={}){var r;r=()=>{!function(e,t={}){const r=Object.fromEntries(Jo.map((t=>[t.name,e.createHistogram(t.name,{description:t.description,unit:"ms",valueType:xe.DOUBLE,advice:{explicitBucketBoundaries:[...t.bucketsMs]}})])));try{const e=performance.getEntriesByType?.("navigation")?.[0];if(!e)return;for(const n of Jo){const o=qo(n.value(e));if(o<0)continue;const i=Ko(o,n.goodLe,n.needsImprovementLe);r[n.name].record(o,{...t,"legacy.beacon_key":n.legacy,rating:i,"rating.good_le_ms":n.goodLe,"rating.needs_improvement_le_ms":n.needsImprovementLe})}}catch{}}(e,t),function(e,t={}){for(const r of Qo){const n=e.createObservableGauge(r.name,{description:r.description,unit:r.unit,valueType:xe.DOUBLE}),o=e=>{const i=r.value();if(!i||!Number.isFinite(i))return;const a=Ko(i,r.goodLe,r.needsImprovementLe);e.observe(i,{...t,rating:a,"rating.good_le":r.goodLe,"rating.needs_improvement_le":r.needsImprovementLe,"legacy.beacon_key":r.legacy}),setTimeout((()=>{n.removeCallback(o)}),1e3)};n.addCallback(o)}}(e,t)},"function"==typeof requestIdleCallback?requestIdleCallback(r):setTimeout(r,200)}const $o=[1e3,1250,1500,1750,2e3,2500,3e3,3500,4e3,5e3,8e3,1e4,12e3,15e3,18e3,2e4],ei=[100,150,200,300,400,600,800,1e3,1200,1500,2e3,3e3,5e3,8e3],ti=[50,75,100,150,175,200,225,250,275,300,400,500,600,800,1e3],ri=[1e-5,.03,.05,.1,.15,.25,.5,.75];function ni(e){const{rating:t}=e;return{rating:t}}const oi=(e,t,r,n)=>e.createHistogram(t,{description:r,unit:"ms",valueType:xe.DOUBLE,advice:{explicitBucketBoundaries:n}}),ii={initializeMeter:function(e){if(!e.serviceName)throw new Error("serviceName is required");if(!e.endpoint)throw new Error("endpoint is required");const{endpoint:t,exportIntervalMillis:r=5e3,siteId:n,sessionId:o=rn(),serviceName:i,serviceVersion:a,serviceConsumerId:s,environment:u,pageId:c,pool:l,browserResourceOverrideValues:f}=e,d=new te({"telemetry.sdk.name":"opentelemetry-js","telemetry.sdk.language":"web","telemetry.sdk.version":"0.24.0",_namespace_:"platform-browser","site.id":n,"session.id":o,session_id:o,"service.name":i,"service.version":a,application_id:s,environment:u,pool:l,page_id:c,...Kr(qr(),f,Yr)}),p=new fo({headers:{},temporalityPreference:V.DELTA,url:nn(t,"/ufeservice/v1/metrics")}),h=new Mt({exporter:p,exportIntervalMillis:r}),m=new Dr({resource:d,readers:[h]});U.setGlobalMeterProvider(m);let v=!1;const y=async()=>{if(!v){v=!0;try{await m.forceFlush()}catch(e){console.error("forceFlush failed:",e)}try{await m.shutdown(),console.log("Meter provider shut down successfully")}catch(e){console.error("shutdown failed:",e)}}},_=U.getMeter(`${i}-meter`,a);return window.addEventListener("pagehide",y,{capture:!0}),{meter:_,flushAndShutdownOnce:y}},initializeWebVitals:function(e){const t=oi(e,"web_vitals_lcp","Largest Contentful Paint",$o),r=oi(e,"web_vitals_ttfb","Time to First Byte",ei),n=oi(e,"web_vitals_inp","Interaction to Next Paint",ti),o=oi(e,"web_vitals_cls","Cumulative Layout Shift",ri);((e,t={})=>{xo((()=>{const r=Ro();let n,o=go("LCP");const i=wo(t,zo),a=e=>{t.reportAllChanges||(e=e.slice(-1));for(const t of e)i.h(t),t.startTime{a(s.takeRecords()),s.disconnect(),n(!0)})),i=e=>{e.isTrusted&&(Vo(r),removeEventListener(e.type,i,{capture:!0}))};for(const e of["keydown","click","visibilitychange"])addEventListener(e,i,{capture:!0});ho((r=>{o=go("LCP"),n=mo(e,o,Xo,t.reportAllChanges),vo((()=>{o.value=performance.now()-r.timeStamp,n(!0)}))}))}}))})((e=>{t.record(e.value,ni(e))})),((e,t={})=>{let r=go("TTFB"),n=mo(e,r,Wo,t.reportAllChanges);Yo((()=>{const o=yo();o&&(r.value=Math.max(o.responseStart-_o(),0),r.entries=[o],n(!0),ho((()=>{r=go("TTFB",0),n=mo(e,r,Wo,t.reportAllChanges),n(!0)})))}))})((e=>{r.record(e.value,ni(e))})),((e,t={})=>{if(!globalThis.PerformanceEventTiming||!("interactionId"in PerformanceEventTiming.prototype))return;const r=Ro();xo((()=>{"interactionCount"in performance||Uo||(Uo=To("event",Fo,{type:"event",buffered:!0,durationThreshold:0}));let n,o=go("INP");const i=wo(t,Go),a=e=>{Vo((()=>{for(const t of e)i.h(t);const t=i.L();t&&t.P!==o.value&&(o.value=t.P,o.entries=t.entries,n())}))},s=To("event",a,{durationThreshold:t.durationThreshold??40});n=mo(e,o,Ho,t.reportAllChanges),s&&(s.observe({type:"first-input",buffered:!0}),r.onHidden((()=>{a(s.takeRecords()),n(!0)})),ho((()=>{i.v(),o=go("INP"),n=mo(e,o,Ho,t.reportAllChanges)})))}))})((e=>{n.record(e.value,ni(e))})),((e,t={})=>{const r=Ro();ko(Oo((()=>{let n,o=go("CLS",0);const i=wo(t,Eo),a=e=>{for(const t of e)i.h(t);i.i>o.value&&(o.value=i.i,o.entries=i.o,n())},s=To("layout-shift",a);s&&(n=mo(e,o,Co,t.reportAllChanges),r.onHidden((()=>{a(s.takeRecords()),n(!0)})),ho((()=>{i.i=0,o=go("CLS",0),n=mo(e,o,Co,t.reportAllChanges),vo((()=>n()))})),setTimeout(n))})))})((e=>{o.record(e.value,ni(e))})),"complete"===document.readyState?Zo(e):window.addEventListener("load",(()=>Zo(e)),{once:!0})}},ai="metrics";var si=n.P,ui=n.E;export{si as factory,ui as key};