@bdky/aaas-pilot-kit 1.0.3 → 1.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*! For license information please see index.cjs.js.LICENSE.txt */
2
- var __webpack_modules__={"../../node_modules/@baidu/weirwood-error/esm/plugins/Plugin.js":function(){},"../../node_modules/@baidu/weirwood-perf/esm/index.js":function(e,n){var r=new Date().getTime();function i(e){var n=window.BOOMR;if(window){if(!e){if(window.parent===window||!document.getElementById("boomr-if-as"))return;if(window.BOOMR&&n.boomerang_frame&&n.window)try{n.boomerang_frame.document.domain!==n.window.document.domain&&(n.boomerang_frame.document.domain=n.window.document.domain)}catch(e){n.isCrossOriginError(e)||n.addError(e,"BOOMR_check_doc_domain.domainFix")}e=document.domain}if(e&&-1!==e.indexOf(".")&&window.parent){try{window.parent.document;return}catch(n){try{document.domain=e}catch(e){return}}try{window.parent.document;return}catch(n){e=e.replace(/^[\w\-]+\./,"")}i(e)}}}function o(e){return"[object String]"===Object.prototype.toString.call(e)}function s(e){return"object"==typeof e&&null!==e}function a(e,n){return!!o(n)&&e.some(function(e){if(!e)return!1;if(o(e))return -1!==n.indexOf(e);if("[object RegExp]"===Object.prototype.toString.call(e))try{return e.test(n)}catch(n){return console.error(e+"正则书写有误"),!1}return console.error(e+"忽略匹配项类型应该是String、RegExp"),!1})}function c(e,n){var r=e.lastClick,i=void 0===r?0:r,o=n.timing.requestStart;return!!i&&!!(o-i<50)}i(),n.PerfClient=function(){function e(e){!(e&&e.ignoreUrls&&e.ignoreUrls.length&&this.shouldIgnoreUrls(e.ignoreUrls))&&(this.BOOMR=function(e){var n,o,s,a,c,l,u,d,p,h=e;e.parent!==e&&document.getElementById("boomr-if-as")&&"script"===document.getElementById("boomr-if-as").nodeName.toLowerCase()&&(e=e.parent),c=e.document,e.BOOMR||(e.BOOMR={});var f=e.BOOMR;if(f.version)return f;f.version="1.3.15",f.window=e,f.boomerang_frame=h,f.plugins||(f.plugins={});try{new e.CustomEvent("CustomEvent"),l=function(n,r){return new e.CustomEvent(n,r)}}catch(e){}try{!l&&c.createEvent&&c.createEvent("CustomEvent")&&(l=function(e,n){var r=c.createEvent("CustomEvent");return n=n||{cancelable:!1,bubbles:!1},r.initCustomEvent(e,n.bubbles,n.cancelable,n.detail),r})}catch(e){}if(!l&&c.createEventObject&&(l=function(e,n){var r=c.createEventObject();return r.type=r.propertyName=e,r.detail=n.detail,r}),l||(l=function(){}),u=function(e,n,r){var i=l(e,{detail:n});function o(){try{c.dispatchEvent?c.dispatchEvent(i):c.fireEvent&&c.fireEvent("onpropertychange",i)}catch(e){}}i&&(r?f.setImmediate(o):o())},void 0!==c.hidden?(d="visibilityState",p="visibilitychange"):void 0!==c.mozHidden?(d="mozVisibilityState",p="mozvisibilitychange"):void 0!==c.msHidden?(d="msVisibilityState",p="msvisibilitychange"):void 0!==c.webkitHidden&&(d="webkitVisibilityState",p="webkitvisibilitychange"),a={t_start:r,t_end:void 0,url:"",config_url:null,loadedLate:!1,beaconsSent:0,isUnloaded:!1,beaconInQueue:!1,cookies:{},testedCookies:!1,constants:{BEACON_TYPE_SPAS:["spa","spa_hard"],MAX_GET_LENGTH:2e3},session:{domain:(s={beacon_url:"",beacon_url_force_https:!0,beacon_urls_allowed:[],beacon_type:"AUTO",beacon_auth_key:"Authorization",beacon_auth_token:void 0,beacon_with_credentials:!1,beacon_disable_sendbeacon:!1,site_domain:e.location.hostname.replace(/.*?([^.]+\.[^.]+)\.?$/,"$1").toLowerCase(),user_ip:"",autorun:!0,hasSentPageLoadBeacon:!1,r:void 0,same_site_cookie:"Lax",secure_cookie:!1,forced_same_site_cookie_none:!1,events:{page_ready:[],page_unload:[],before_unload:[],dom_loaded:[],visibility_changed:[],prerender_to_visible:[],before_beacon:[],beacon:[],page_load_beacon:[],xhr_load:[],click:[],form_submit:[],config:[],xhr_init:[],spa_init:[],spa_navigation:[],spa_cancel:[],xhr_send:[],xhr_error:[],error:[],netinfo:[],rage_click:[],before_early_beacon:[]},public_events:{before_beacon:"onBeforeBoomerangBeacon",beacon:"onBoomerangBeacon",onboomerangloaded:"onBoomerangLoaded"},translate_events:{onbeacon:"beacon",onconfig:"config",onerror:"error",onxhrerror:"xhr_error"},unloadEventsCount:0,unloadEventCalled:0,listenerCallbacks:{},vars:{},singleBeaconVars:{},varPriority:{"-1":{},1:{}},errors:{},disabled_plugins:{},localStorageSupported:!1,LOCAL_STORAGE_PREFIX:"_boomr_",nativeOverwrites:[],xb_handler:function(n){return function(r){var i;r||(r=e.event),r.target?i=r.target:r.srcElement&&(i=r.srcElement),3===i.nodeType&&(i=i.parentNode),i&&i.nodeName&&"OBJECT"===i.nodeName.toUpperCase()&&"application/x-shockwave-flash"===i.type||s.fireEvent(n,i)}},clearEvents:function(){var e;for(e in this.events)this.events.hasOwnProperty(e)&&(this.events[e]=[])},clearListeners:function(){var e;for(e in s.listenerCallbacks)if(s.listenerCallbacks.hasOwnProperty(e))for(;s.listenerCallbacks[e].length;)f.utils.removeListener(s.listenerCallbacks[e][0].el,e,s.listenerCallbacks[e][0].fn);s.listenerCallbacks={}},fireEvent:function(e,n){var r,i,o,s;if(e=e.toLowerCase(),this.translate_events[e]&&(e=this.translate_events[e]),this.events.hasOwnProperty(e)){for(this.public_events.hasOwnProperty(e)&&u(this.public_events[e],n),o=this.events[e],"before_beacon"!==e&&"beacon"!==e&&f.real_sendBeacon(),s=o.length,r=0;r<s;r++)try{(i=o[r]).fn.call(i.scope,n,i.cb_data)}catch(n){f.addError(n,"fireEvent."+e+"<"+r+">")}for(r=0;r<s;r++)try{o[r].once&&(o.splice(r,1),s--,r--)}catch(n){f.addError(n,"fireEvent."+e+"<"+r+">")}}},spaNavigation:function(){s.onloadfired=!0},beaconUrlAllowed:function(e){if(!s.beacon_urls_allowed||0===s.beacon_urls_allowed.length)return!0;for(var n=0;n<s.beacon_urls_allowed.length;n++)if(new RegExp(s.beacon_urls_allowed[n]).exec(e))return!0;return!1},checkLocalStorageSupport:function(){var n=s.LOCAL_STORAGE_PREFIX+"clss";s.localStorageSupported=!1;try{if(!e.JSON||!e.localStorage)return;e.localStorage.setItem(n,n),s.localStorageSupported=e.localStorage.getItem(n)===n,e.localStorage.removeItem(n)}catch(e){s.localStorageSupported=!1}},onFrameUnloaded:function(){var e,n;for(e=0,f.isUnloaded=!0;e<s.nativeOverwrites.length;e++)(n=s.nativeOverwrites[e]).obj[n.functionName]=n.origFn;s.nativeOverwrites=[]}}).site_domain,ID:void 0,start:void 0,length:0,enabled:!0},utils:{hasPostMessageSupport:function(){return!!e.postMessage&&("function"==typeof e.postMessage||"object"==typeof e.postMessage)},objectToString:function(e,n,r){var i,o=[];if(!e||"object"!=typeof e)return e;if(void 0===n&&(n="\n "),r||(r=0),f.utils.isArray(e)){for(i=0;i<e.length;i++)r>0&&null!==e[i]&&"object"==typeof e[i]?o.push(this.objectToString(e[i],n+("\n "===n?" ":""),r-1)):"&"===n?o.push(encodeURIComponent(e[i])):o.push(e[i]);n=","}else for(i in e)Object.prototype.hasOwnProperty.call(e,i)&&(r>0&&null!==e[i]&&"object"==typeof e[i]?o.push(encodeURIComponent(i)+"="+this.objectToString(e[i],n+("\n "===n?" ":""),r-1)):"&"===n?o.push(encodeURIComponent(i)+"="+encodeURIComponent(e[i])):o.push(i+"="+e[i]));return o.join(n)},getCookie:function(e){var n;if(!e)return null;if(f.utils.mark("get_cookie"),void 0!==f.cookies[e])return!1===f.cookies[e]?void 0:f.cookies[e];if(void 0===(n=this.getRawCookie(e))){f.cookies[e]=!1;return}return f.cookies[e]=n,f.cookies[e]},getRawCookie:function(e){var n,r;return e?(e=" "+e+"=",(n=(r=" "+c.cookie+";").indexOf(e))>=0)?(n+=e.length,r.substring(n,r.indexOf(";",n)).replace(/^"/,"").replace(/"$/,"")):void 0:null},setCookie:function(e,n,r){var i,o,a,l,u;if(!e||!f.session.domain||void 0===n)return f.addVar("nocookie",1),!1;if((i=this.objectToString(n,"&"))===f.cookies[e])return!0;if((o=e+'="'+i+'"').length<500){l=[o,"path=/","domain="+f.session.domain],"number"==typeof r&&((u=new Date).setTime(u.getTime()+1e3*r),u=u.toGMTString(),l.push("expires="+u));var d=this.getSameSiteAttributeParts();if("https:"===location.protocol&&!0===s.secure_cookie&&-1===d.indexOf("Secure")&&d.push("Secure"),l=l.concat(d),f.utils.mark("set_cookie_real"),c.cookie=l.join("; "),f.testedCookies)return"number"!=typeof r||r>0?f.cookies[e]=i:f.cookies[e]=void 0,!0;if(f.cookies[e]=void 0,i===(a=this.getCookie(e))||void 0===a&&"number"==typeof r&&r<=0)return f.cookies[e]=i,f.testedCookies=!0,f.removeVar("nocookie"),!0}return f.addVar("nocookie",1),!1},getSubCookies:function(e){var n,r,i,o,s=!1,a={};if(!e||"string"!=typeof e)return null;for(r=0,i=(n=e.split("&")).length;r<i;r++)(o=n[r].split("="))[0]&&(o.push(""),a[decodeURIComponent(o[0])]=decodeURIComponent(o[1]),s=!0);return s?a:null},removeCookie:function(e){return this.setCookie(e,{},-86400)},getSameSiteAttributeParts:function(){var e=s.same_site_cookie.toUpperCase();return(s.forced_same_site_cookie_none&&(e="NONE"),"LAX"===e)?["SameSite=Lax"]:"NONE"===e?"https:"===location.protocol&&this.isCurrentUASameSiteNoneCompatible()?["SameSite=None","Secure"]:[]:"STRICT"===e?["SameSite=Strict"]:["SameSite=Lax"]},getLocalStorage:function(n){var r,i;if(!n||!s.localStorageSupported)return null;try{if(r=e.localStorage.getItem(s.LOCAL_STORAGE_PREFIX+n),null===r)return;i=e.JSON.parse(r)}catch(e){return null}return i&&"object"==typeof i.items?"number"==typeof i.expires&&f.now()>=i.expires?void this.removeLocalStorage(n):i.items:(this.removeLocalStorage(n),null)},setLocalStorage:function(n,r,i){var o,a,c;if(!n||!s.localStorageSupported||"object"!=typeof r)return!1;if(o={items:r},"number"==typeof i&&(o.expires=f.now()+1e3*i),(a=e.JSON.stringify(o)).length<5e4)try{if(e.localStorage.setItem(s.LOCAL_STORAGE_PREFIX+n,a),c=e.localStorage.getItem(s.LOCAL_STORAGE_PREFIX+n),a===c)return!0}catch(e){}return!1},removeLocalStorage:function(n){if(!n||!s.localStorageSupported)return!1;try{return e.localStorage.removeItem(s.LOCAL_STORAGE_PREFIX+n),!0}catch(e){}return!1},cleanupURL:function(e,n){if(!e||f.utils.isArray(e))return"";if(s.strip_query_string&&(e=e.replace(/\?.*/,"?qs-redacted")),void 0!==n&&e&&e.length>n){var r=e.indexOf("?");e=-1!==r&&r<n?e.substr(0,r)+"?...":e.substr(0,n-3)+"..."}return e},hashQueryString:function(e,n){return e?e.match?(e.match(/^\/\//)&&(e=location.protocol+e),e.match(/^(https?|file):/))?(n&&(e=e.replace(/#.*/,"")),e.replace(/\?([^#]*)/,function(e,n){return"?"+(n.length>10?f.utils.hashString(n):n)})):(f.error("Passed in URL is invalid: "+e),""):(f.addError("TypeError: Not a string","hashQueryString",typeof e),""):e},pluginConfig:function(e,n,r,i){var o,s=0;if(!n||!n[r])return!1;for(o=0;o<i.length;o++)void 0!==n[r][i[o]]&&(e[i[o]]=n[r][i[o]],s++);return s>0},arrayFilter:function(e,n){var r=[];if(!(this.isArray(e)||e&&"number"==typeof e.length)||"function"!=typeof n)return r;if("function"==typeof e.filter)r=e.filter(n);else for(var i,o=-1,s=e.length;++o<s;)n(i=e[o],o,e)&&(r[r.length]=i);return r},arrayFind:function(e,n){if((this.isArray(e)||e&&"number"==typeof e.length)&&"function"==typeof n)if("function"==typeof e.find)return e.find(n);else{for(var r,i=-1,o=e.length;++i<o;)if(n(r=e[i],i,e))return r;return}},isMutationObserverSupported:function(){return!(e&&e.navigator&&e.navigator.userAgent&&e.navigator.userAgent.match(/Trident.*rv[ :]*11\./))&&e&&e.MutationObserver&&"function"==typeof e.MutationObserver},addObserver:function(n,r,i,o,s,a){var c,l,u={observer:null,timer:null};if(!this.isMutationObserverSupported()||!o||!n)return null;function d(e){var n=!1;u.timer&&(clearTimeout(u.timer),u.timer=null),o&&((n=o.call(a,e,s))||(o=null)),!n&&u.observer&&(u.observer.disconnect(),u.observer=null),"number"==typeof n&&n>0&&(u.timer=setTimeout(d,n))}return c=e.MutationObserver,e.Zone&&"function"==typeof e.Zone.__symbol__&&(l=e.Zone.__symbol__("MutationObserver"))&&"string"==typeof l&&e.hasOwnProperty(l)&&"function"==typeof e[l]&&(c=e[l]),u.observer=new c(d),i&&(u.timer=setTimeout(d,u.timeout)),u.observer.observe(n,r),u},addListener:function(e,n,r,i){var o=!1;e.addEventListener?("object"==typeof i?o=i:"boolean"==typeof i&&i&&f.browser.supportsPassive()&&(o={capture:!1,passive:!0}),e.addEventListener(n,r,o)):e.attachEvent&&e.attachEvent("on"+n,r),s.listenerCallbacks[n]=s.listenerCallbacks[n]||[],s.listenerCallbacks[n].push({el:e,fn:r})},removeListener:function(e,n,r){if(e.removeEventListener?e.removeEventListener(n,r,!1):e.detachEvent&&e.detachEvent("on"+n,r),s.listenerCallbacks.hasOwnProperty(n)){for(var i=0;i<s.listenerCallbacks[n].length;i++)if(r===s.listenerCallbacks[n][i].fn&&e===s.listenerCallbacks[n][i].el)return void s.listenerCallbacks[n].splice(i,1)}},isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)},inArray:function(e,n){var r;if(void 0===e||void 0===n||!n.length)return!1;for(r=0;r<n.length;r++)if(n[r]===e)return!0;return!1},getQueryParamValue:function(e,n){var r,i,o,s;if(!e)return null;for("string"==typeof n?(r=f.window.document.createElement("a")).href=n:r="object"==typeof n&&"string"==typeof n.search?n:f.window.location,i=r.search.slice(1).split(/&/),o=0;o<i.length;o++)if(i[o]&&(s=i[o].split("=")).length&&s[0]===e)try{return s.length>1?decodeURIComponent(s.splice(1).join("=").replace(/\+/g," ")):""}catch(e){if(e&&"string"==typeof e.name&&-1!==e.name.indexOf("URIError"));else throw e}return null},generateUUID:function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var n=16*Math.random()|0;return("x"===e?n:3&n|8).toString(16)})},generateId:function(e){return"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx".substr(0,e||40).replace(/x/g,function(e){var e=(Math.random()||.01).toString(36);return"0"===e?"0":e.substr(2,1)})},serializeForUrl:function(e){return f.utils.Compression&&f.utils.Compression.jsUrl?f.utils.Compression.jsUrl(e):window.JSON?JSON.stringify(e):""},getMyURL:function(){var e=document.currentScript||document.getElementById("boomr-if-as")||document.getElementById("boomr-scr-as");if(e)return e.src;var n,r,i=document.getElementsByTagName("script");for(r=i.length;r--;)if("interactive"===i[r].readyState)return i[r].src;try{throw Error()}catch(e){if("stack"in e&&(n=this.arrayFilter(e.stack.split(/\n/),function(e){return e.match(/https?:\/\//)}))&&n.length)return n[0].replace(/.*(https?:\/\/.+?)(:\d+)+\D*$/m,"$1")}return""},scroll:function(){var n=void 0!==e.pageXOffset,r="CSS1Compat"===(e.document.compatMode||""),i={x:0,y:0};return n?"function"==typeof e.pageXOffset?(i.x=e.pageXOffset(),i.y=e.pageYOffset()):(i.x=e.pageXOffset,i.y=e.pageYOffset):r?(i.x=e.document.documentElement.scrollLeft,i.y=e.document.documentElement.scrollTop):(i.x=e.document.body.scrollLeft,i.y=e.document.body.scrollTop),"number"==typeof i.sx&&(i.sx=Math.round(i.sx)),"number"==typeof i.sy&&(i.sy=Math.round(i.sy)),i},windowHeight:function(){return e.innerHeight||e.document.documentElement.clientHeight||e.document.body.clientHeight},windowWidth:function(){return e.innerWidth||e.document.documentElement.clientWidth||e.document.body.clientWidth},isNative:function(e){return!!e&&e.toString&&!e.hasOwnProperty("toString")&&/\[native code\]/.test(String(e))},overwriteNative:function(e,n,r){e&&r&&(f.boomerang_frame!==f.window&&s.nativeOverwrites.push({obj:e,functionName:n,origFn:e[n]}),e[n]=r)},isInteger:function(e){return(Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e})(e)},isObjectEmpty:function(e){for(var n in e)if(e.hasOwnProperty(n))return!1;return!0},hashString:function(e){e=encodeURIComponent(e);for(var n=0x811c9dc5,r=0;r<e.length;r++)n^=e.charCodeAt(r),n+=(n<<1)+(n<<4)+(n<<7)+(n<<8)+(n<<24);return parseInt((n>>>0).toString()+e.length).toString(36)},isCurrentUASameSiteNoneCompatible:function(){return!e||!e.navigator||!e.navigator.userAgent||"string"!=typeof e.navigator.userAgent||this.isUASameSiteNoneCompatible(e.navigator.userAgent)},isUASameSiteNoneCompatible:function(e){var n=e.match(/(UCBrowser)\/(\d+\.\d+)\.(\d+)/);if(n){var r=parseFloat(n[2]),i=n[3];return 12.13===r?!(i<=2):!(r<12.13)}if(n=e.match(/(Chrome)\/(\d+)\.(\d+)\.(\d+)\.(\d+)/)){var o=n[2];return!(o>=51)||!(o<=66)}if(n=e.match(/(Macintosh;.*Mac OS X 10_14[_\d]*.*) AppleWebKit\//))return(!(n=e.match(/Version\/.* Safari\//))||null!==(n=e.match(/Chrom(?:e|ium)/)))&&!(n=e.match(/^Mozilla\/\d+(?:\.\d+)* \(Macintosh;.*Mac OS X \d+(?:_\d+)*\) AppleWebKit\/\d+(?:\.\d+)* \(KHTML, like Gecko\)$/));return!(n=e.match(/(iP.+; CPU .*OS 12(?:_\d+)*.*)/))},forEach:function(e,n,r){if(f.utils.isArray(e)&&"function"==typeof n)for(var i=e.length,o=0;o<i;o++)e.hasOwnProperty(o)&&n.call(r,e[o],o,e)},mark:function(e){var n=f.getPerformance();n&&"function"==typeof n.mark&&!f.window.BOOMR_no_mark&&n.mark("boomr:"+e)},measure:function(e,n,r){var i=f.getPerformance();i&&"function"==typeof i.measure&&!f.window.BOOMR_no_mark&&i.measure("boomr:"+e,n?"boomr:"+n:void 0,r?"boomr:"+r:void 0)}},browser:{results:{},supportsPassive:function(){if(void 0===f.browser.results.supportsPassive){if(f.browser.results.supportsPassive=!1,!Object.defineProperty)return!1;try{var e=Object.defineProperty({},"passive",{get:function(){f.browser.results.supportsPassive=!0}});window.addEventListener("test",null,e)}catch(e){}}return f.browser.results.supportsPassive}},init:function(n){var r,o,a,l,u=["autorun","sampleRate","interactionSampleRate","normalizeUrl","initiatorTypes","ignoreXhrs","beacon_auth_key","beacon_auth_token","beacon_with_credentials","beacon_disable_sendbeacon","beacon_url","beacon_url_force_https","beacon_type","site_domain","strip_query_string","user_ip","sendWindow"];if(i(),n||(n={}),void 0!==n.log&&(this.log=n.log),this.log||(this.log=function(){}),this.pageId||(this.pageId=f.utils.generateId(8)),n.primary&&s.handlers_attached)return this;for(l in void 0!==n.site_domain&&(/:/.test(n.site_domain)&&(n.site_domain=e.location.hostname.toLowerCase()),this.session.domain=n.site_domain),f.session.enabled&&void 0===f.session.ID&&(f.session.ID=f.utils.generateUUID()),void 0!==n.autorun&&(s.autorun=n.autorun),this.plugins)if(this.plugins.hasOwnProperty(l)){if(n[l]&&n[l].hasOwnProperty("enabled")&&!1===n[l].enabled){s.disabled_plugins[l]=1,"function"==typeof this.plugins[l].disable&&this.plugins[l].disable();continue}if(s.disabled_plugins[l]){if(!n[l]||!n[l].hasOwnProperty("enabled")||!0!==n[l].enabled)continue;"function"==typeof this.plugins[l].enable&&this.plugins[l].enable(),delete s.disabled_plugins[l]}if("function"==typeof this.plugins[l].init)try{this.plugins[l].init(n)}catch(e){f.addError(e,l+".init")}}for(a=0;a<u.length;a++)void 0!==n[u[a]]&&(s[u[a]]=n[u[a]]);if((!s.handlers_attached&&!n.wait||s.handlers_attached&&s.waiting_for_config)&&(s.onloadfired||void 0!==s.autorun&&!1===s.autorun||(f.hasBrowserOnloadFired()&&(f.loadedLate=!0),f.attach_page_ready(f.page_ready_autorun)),s.waiting_for_config=!1),s.handlers_attached)return this;for(n.wait&&(s.waiting_for_config=!0),f.attach_page_ready(function(){f.t_onload||(f.t_onload=f.now())}),f.utils.addListener(e,"DOMContentLoaded",function(){s.fireEvent("dom_loaded")}),f.fireEvent("config",n),f.subscribe("config",function(e){e.beacon_url&&(s.beacon_url=e.beacon_url)}),f.subscribe("spa_navigation",s.spaNavigation,null,s),void 0!==p&&(f.utils.addListener(c,p,function(){s.fireEvent("visibility_changed")}),s.lastVisibilityState=f.visibilityState(),f.subscribe("visibility_changed",function(){var e=f.visibilityState();f.lastVisibilityEvent[e]=f.now(),"prerender"===s.lastVisibilityState&&"prerender"!==e&&(f.addVar("vis.pre","1"),s.fireEvent("prerender_to_visible")),s.lastVisibilityState=e})),f.utils.addListener(c,"mouseup",s.xb_handler("click")),r=c.getElementsByTagName("form"),o=0;o<r.length;o++)f.utils.addListener(r[o],"submit",s.xb_handler("form_submit"));return e.onpagehide||null===e.onpagehide||f.utils.addListener(e,"unload",function(){f.window=e=null}),f.boomerang_frame!==f.window&&f.utils.addListener(f.boomerang_frame,"unload",s.onFrameUnloaded),s.handlers_attached=!0,this},attach_page_ready:function(n){f.hasBrowserOnloadFired()?this.setImmediate(n,null,null,f):e.onpagehide||null===e.onpagehide?f.utils.addListener(e,"pageshow",function(){n()}):f.utils.addListener(e,"load",function(){n()})},page_ready_autorun:function(e){s.autorun&&f.page_ready(e,!0)},page_ready:function(n,r){var i;return r||"number"!=typeof n||(i=n,n=null),n||(n=e.event),n||(n={name:"load"}),r?"number"==typeof e.BOOMR_page_ready&&(n.timing=n.timing||{},n.timing.loadEventEnd=e.BOOMR_page_ready,f.addVar("pr",1,!0)):(n.timing=n.timing||{},i?n.timing.loadEventEnd=i:"number"==typeof e.BOOMR_page_ready?n.timing.loadEventEnd=e.BOOMR_page_ready:n.timing.loadEventEnd=f.now(),f.addVar("pr",1,!0)),s.onloadfired||(s.fireEvent("page_ready",n),s.onloadfired=!0),this},hasBrowserOnloadFired:function(){var n=f.getPerformance();return c.readyState&&"complete"===c.readyState||n&&n.timing&&n.timing.loadEventStart>0||e.BOOMR_onload>0},onloadFired:function(){return s.onloadfired},setImmediate:function(n,r,i,o){var s,a;"undefined"!=typeof Error&&(a=(a=Error()).stack?a.stack.replace(/^Error/,"Called"):void 0),s=function(){n.call(o||null,r,i||{},a),s=null},e.requestIdleCallback?e.requestIdleCallback(s,{timeout:1e3}):e.setImmediate?e.setImmediate(s):setTimeout(s,10)},now:Date.now||function(){return new Date().getTime()},getPerformance:function(){try{if(f.window){if("performance"in f.window&&f.window.performance)return f.window.performance;return f.window.msPerformance||f.window.webkitPerformance||f.window.mozPerformance}}catch(e){}},forceSameSiteCookieNone:function(){s.forced_same_site_cookie_none=!0},hrNow:function(){var e,n,r=f.getPerformance();return r&&r.now?e=r.now():(n=f.plugins.RT&&f.plugins.RT.navigationStart&&f.plugins.RT.navigationStart()||f.t_lstart||f.t_start,e=f.now()-n),e},visibilityState:void 0===d?function(){return"visible"}:function(){return c[d]},lastVisibilityEvent:{},registerEvent:function(e){return s.events.hasOwnProperty(e)||(s.events[e]=[]),this},disable:function(){s.clearEvents(),s.clearListeners()},fireEvent:function(e,n){return s.fireEvent(e,n)},subscribe:function(n,r,i,o,a){var c,l,u;for(n=n.toLowerCase(),s.translate_events[n]&&(n=s.translate_events[n]),s.events.hasOwnProperty(n)||(s.events[n]=[]),u=s.events[n],c=0;c<u.length;c++)if((l=u[c])&&l.fn===r&&l.cb_data===i&&l.scope===o)return this;if(u.push({fn:r,cb_data:i||{},scope:o||null,once:a||!1}),"page_ready"===n&&s.onloadfired&&s.autorun&&this.setImmediate(r,null,i,o),"page_unload"===n||"before_unload"===n){s.unloadEventsCount++;var d,p=this;u.length,d=function(n){if(r&&r.call(o,n||e.event,i),++s.unloadEventCalled===s.unloadEventsCount){f.real_sendBeacon();var a=p.plugins.Continuity;a&&"function"==typeof a.checkIfSendAdditionalBeacon&&a.checkIfSendAdditionalBeacon()}},"page_unload"===n&&(e.onpagehide||null===e.onpagehide?f.utils.addListener(e,"pagehide",d):f.utils.addListener(e,"unload",d)),f.utils.addListener(e,"beforeunload",d)}return this},addError:function(e,n,r){var i,o=f.plugins.Errors;if(f.error("Boomerang caught error: "+e+", src: "+n+", extra: "+r),o&&o.is_supported())return void("string"==typeof e?o.send({message:e,extra:r,functionName:n,noStack:!0},o.VIA_APP,o.SOURCE_BOOMERANG):("string"==typeof n&&(e.functionName=n),void 0!==r&&(e.extra=r),o.send(e,o.VIA_APP,o.SOURCE_BOOMERANG)));"string"!=typeof e&&((i=String(e)).match(/^\[object/)&&(i=e.name+": "+(e.description||e.message).replace(/\r\n$/,"")),e=i),void 0!==n&&(e="["+n+":"+f.now()+"] "+e),r&&(e+=":: "+r),s.errors[e]?s.errors[e]++:s.errors[e]=1},isCrossOriginError:function(e){return"SecurityError"===e.name||"TypeError"===e.name&&"Permission denied"===e.message||"Error"===e.name&&e.message&&e.message.match(/^(Permission|Access is) denied/)||-0x7ff5ffba===e.number},addVar:function(e,n,r){if("string"==typeof e)s.vars[e]=n,r&&(s.singleBeaconVars[e]=1);else if("object"==typeof e){var i;for(i in e)e.hasOwnProperty(i)&&(s.vars[i]=e[i],r&&(s.singleBeaconVars[i]=1))}return this},appendVar:function(e,n){var r=f.getVar(e)||"";return r&&(r+=","),f.addVar(e,r+n),this},removeVar:function(e){var n,r;if(!arguments.length)return this;for(n=0,r=1==arguments.length&&f.utils.isArray(e)?e:arguments;n<r.length;n++)s.vars.hasOwnProperty(r[n])&&delete s.vars[r[n]];return this},hasVar:function(e){return s.vars.hasOwnProperty(e)},getVar:function(e){return s.vars[e]},getPendingVar:function(e){return s.ttinewBeaconPendingData?s.ttinewBeaconPendingData[e]:s.vars[e]},hasPending:function(){return s.ttinewBeaconPending},setVarPriority:function(e,n){return"number"!=typeof n||1!==Math.abs(n)||(s.varPriority[n][e]=1),this},setReferrer:function(e){s.r=e},requestStart:function(e){var n=f.now();return f.plugins.RT.startTimer("xhr_"+e,n),{loaded:function(r){f.responseEnd(e,n,r)}}},readyToSend:function(){var e;for(e in this.plugins)if(this.plugins.hasOwnProperty(e)){if(s.disabled_plugins[e])continue;if("function"==typeof this.plugins[e].readyToSend&&!1===this.plugins[e].readyToSend())return!1}return!0},responseEnd:function(e,n,r,i){if(n="number"==typeof n?n:f.now(),i="number"==typeof i?i:f.now(),!f.readyToSend())return void setTimeout(function(){f.responseEnd(e,n,r,i)},1e3);if(!f.hasSentPageLoadBeacon()&&!f.utils.inArray(e.initiator,f.constants.BEACON_TYPE_SPAS))return void f.subscribe("page_load_beacon",function(){f.responseEnd(e,n,r,i)},null,f,!0);if(s.beaconInQueue)return void f.subscribe("beacon",function(){f.responseEnd(e,n,r,i)},null,f,!0);if(s.beaconInQueue=!0,"object"==typeof e){if(!e.url)return;s.fireEvent("xhr_load",e)}else f.real_sendBeacon(),f.addVar("xhr.pg",e),f.plugins.RT.startTimer("xhr_"+e,n),s.fireEvent("xhr_load",{name:"xhr_"+e,data:r,timing:{loadEventEnd:i}})},uninstrumentXHR:function(){},instrumentXHR:function(){},uninstrumentFetch:function(){},instrumentFetch:function(){},sendBeacon:function(e){return e&&(s.beacon_url_override=e),s.beaconQueued||(s.beaconQueued=!0,f.setImmediate(f.real_sendBeacon,null,null,f)),!0},sendBeaconWhenReady:function(e,n,r){if(s.beaconInQueue)return void f.subscribe("beacon",function(){f.sendBeaconWhenReady(e,n,r)},null,f,!0);for(var i in s.beaconInQueue=!0,e)e.hasOwnProperty(i)&&f.addVar(i,e[i],!0);"function"==typeof n&&void 0!==r&&n.apply(r),f.sendBeacon()},real_sendBeacon:function(){var n,r=[],i={};if(!s.beaconQueued&&!s.ttinewBeaconPending)return!1;for(n in s.beaconQueued=!1,this.plugins)if(this.plugins.hasOwnProperty(n)){if(s.disabled_plugins[n])continue;if(!this.plugins[n].is_complete(s.vars))return delete s.vars.early,!1}if(!window||!window.Image||!window.navigator||!f.window)return!1;var o=f.utils.inArray(s.vars["http.initiator"],f.constants.BEACON_TYPE_SPAS),a=void 0===s.vars["http.initiator"]||o;for(n in s.vars.pgu||(s.vars.pgu=o?c.URL:c.URL.replace(/#.*/,"")),s.vars.pgu=f.utils.cleanupURL(s.vars.pgu),(!s.vars.u||o)&&(s.vars.u=s.vars.pgu),s.vars.pgu===s.vars.u&&delete s.vars.pgu,s.r?s.vars.r=f.utils.cleanupURL(s.r):delete s.vars.r,s.vars.v=f.version,f.snippetVersion&&(s.vars.sv=f.snippetVersion),s.vars.sm=f.snippetMethod||"i",f.session.enabled&&(s.vars["rt.si"]=f.session.ID+"-"+Math.round(f.session.start/1e3).toString(36),s.vars["rt.ss"]=f.session.start,void 0===s.vars.early?s.vars["rt.sl"]=f.session.length>=1?f.session.length:1:s.vars["rt.sl"]=f.session.length),f.visibilityState()&&(s.vars["vis.st"]=f.visibilityState(),f.lastVisibilityEvent.visible&&(s.vars["vis.lv"]=f.now()-f.lastVisibilityEvent.visible),f.lastVisibilityEvent.hidden&&(s.vars["vis.lh"]=f.now()-f.lastVisibilityEvent.hidden)),s.vars["ua.plt"]=navigator.platform,s.vars["ua.vnd"]=navigator.vendor,this.pageId&&(s.vars.pid=this.pageId),s.vars.n=++this.beaconsSent,e!==window&&(s.vars.if=""),s.errors)s.errors.hasOwnProperty(n)&&r.push(n+(s.errors[n]>1?" (*"+s.errors[n]+")":""));if(r.length>0&&(s.vars.errors=r.join("\n")),s.errors={},"function"==typeof s.normalizeUrl&&s.vars.u&&(s.vars.nmu=s.normalizeUrl(s.vars.u)),s.vars["http.initiator"]&&-1===s.initiatorTypes.indexOf(s.vars["http.initiator"]))return s.beaconInQueue=!1,!1;for(n in s.fireEvent("before_beacon",s.vars),s.vars)s.vars.hasOwnProperty(n)&&(i[n]=s.vars[n]);if(f.removeVar(["qt","pgu"]),void 0===s.vars.early){for(var l in s.singleBeaconVars)s.singleBeaconVars.hasOwnProperty(l)&&f.removeVar(l);s.singleBeaconVars={},!s.hasSentPageLoadBeacon&&a&&(s.hasSentPageLoadBeacon=!0,f.setImmediate(function(){s.fireEvent("page_load_beacon",i)}))}if(f.session.rate_limited)return!1;if(s.beaconInQueue=!1,"interaction"===s.vars["http.initiator"]){if("number"==typeof s.interactionSampleRate&&Math.random()>s.interactionSampleRate)return!1}else if("number"==typeof s.sampleRate&&Math.random()>s.sampleRate)return!1;return this.plugins.Continuity.getTtiWaitForXHRDone()&&"spa_hard"===i["http.initiator"]&&!i["c.tti.new"]&&(s.ttinewBeaconPending=!0,s.ttinewBeaconPendingData=i),f.sendBeaconData(i),!0},sendAdditionalBeacon:function(e){s.ttinewBeaconPendingData&&(f.sendBeaconData(Object.assign(s.ttinewBeaconPendingData,e)),s.ttinewBeaconPendingData=void 0,s.ttinewBeaconPending=!1)},sendBeaconData:function(n){var r,i,o,a,c=[],l=[],u=!0;if(s.beacon_url=s.beacon_url_override||s.beacon_url,!s.beacon_url||!s.beaconUrlAllowed(s.beacon_url)||f.utils.isObjectEmpty(n))return!1;s.fireEvent("beacon",n),c=this.getVarsOfPriority(n,-1),l=this.getVarsOfPriority(n,1),r=c.concat(this.getVarsOfPriority(n,0),l).join("&"),s.beacon_url_force_https&&s.beacon_url.match(/^\/\//)&&(s.beacon_url="https:"+s.beacon_url),i=s.beacon_url+(s.beacon_url.indexOf("?")>-1?"&":"?")+r,"GET"===s.beacon_type?(u=!0,i.length>f.constants.MAX_GET_LENGTH&&(window.console&&(console.warn||console.log)||function(){})("Boomerang: Warning: Beacon may not be sent via GET due to payload size > 2000 bytes")):("POST"===s.beacon_type||i.length>f.constants.MAX_GET_LENGTH)&&(u=!1);var d=s.sendWindow;if(d&&d.navigator&&"function"==typeof d.navigator.sendBeacon&&f.utils.isNative(d.navigator.sendBeacon)&&"function"==typeof e.Blob&&"GET"!==s.beacon_type&&void 0===s.beacon_auth_token&&!s.beacon_disable_sendbeacon){var p=new e.Blob([r+"&sb=1"],{type:"text/plain"});if(d.navigator.sendBeacon(s.beacon_url,p))return!0}if(f.orig_XMLHttpRequest||d&&d.XMLHttpRequest||(u=!0),u){try{o=new Image}catch(e){return!1}o.src=i}else{a=new(d.XMLHttpRequest||f.window.orig_XMLHttpRequest||f.orig_XMLHttpRequest||f.window.XMLHttpRequest);try{this.sendXhrPostBeacon(a,r)}catch(e){a=new f.boomerang_frame.XMLHttpRequest,this.sendXhrPostBeacon(a,r)}}return!0},hasSentPageLoadBeacon:function(){return s.hasSentPageLoadBeacon},sendXhrPostBeacon:function(e,n){e.open("POST",s.beacon_url),e.setRequestHeader("Content-type","text/plain"),void 0!==s.beacon_auth_token&&(void 0===s.beacon_auth_key&&(s.beacon_auth_key="Authorization"),e.setRequestHeader(s.beacon_auth_key,s.beacon_auth_token)),s.beacon_with_credentials&&(e.withCredentials=!0),e.send(n)},getVarsOfPriority:function(e,n){var r,i=[],o=0!==n?s.varPriority[n]:e;for(r in o)o.hasOwnProperty(r)&&e.hasOwnProperty(r)&&(i.push(this.getUriEncodedVar(r,void 0===e[r]?"":e[r])),0!==n&&delete e[r]);return i},getUriEncodedVar:function(e,n){return null==n&&(n=""),"object"==typeof n&&(n=f.utils.serializeForUrl(n)),encodeURIComponent(e)+"="+encodeURIComponent(n)},getResourceTiming:function(e,n,r){var i,o=f.getPerformance();try{if(o&&"function"==typeof o.getEntriesByName){if(!(i=o.getEntriesByName(e))||!i.length||"function"==typeof r&&(!(i=f.utils.arrayFilter(i,r))||!i.length))return;return i.length>1&&"function"==typeof n&&i.sort(n),i[i.length-1]}}catch(e){}},setBeaconUrlsAllowed:function(e){s.beacon_urls_allowed=e}},f.url){var m=f.window.document.createElement("a");m.href=f.url,a.url=m.href}else a.url=a.utils.getMyURL();delete window.BOOMR_start,"number"==typeof window.BOOMR_lstart?(a.t_lstart=window.BOOMR_lstart,delete window.BOOMR_lstart):"number"==typeof f.window.BOOMR_lstart&&(a.t_lstart=f.window.BOOMR_lstart),"number"==typeof f.window.BOOMR_onload&&(a.t_onload=f.window.BOOMR_onload),"object"==typeof console&&void 0!==console.log?a.log=function(e,n,r){}:a.log=function(){},a.debug=(n=function(e){return function(n,r){return this.log(n,e,"boomerang"+(r?"."+r:"")),this}})("debug"),a.info=n("info"),a.warn=n("warn"),a.error=n("error"),a.traceTime=function(e){var n=e||f.now();return[new Date(n).getHours(),new Date(n).getMinutes(),new Date(n).getSeconds(),new Date(n).getMilliseconds()].join(":")},a.cleanupURL=function(){return""+location.toString().replace(location.protocol+"//"+location.host,"")},a.trace=function(e,n,r,i){r="("+f.traceTime()+") {"+f.cleanupURL()+"} ["+e+"] <"+n+"> "+r},a.traceHighlight=function(e,n,r,i){r="("+f.traceTime()+") {"+f.cleanupURL()+"} ["+e+"] <"+n+"> "+r},a.warn=function(e,n,r,i){r="("+f.traceTime()+") {"+f.cleanupURL()+"} ["+e+"] <"+n+"> "+r};try{var g=a.getPerformance();g&&"function"==typeof g.now&&/\[native code\]/.test(String(g.now))&&g.timing&&g.timing.navigationStart&&(a.now=function(){return Math.round(g.now()+g.timing.navigationStart)})}catch(e){}for(o in s.checkLocalStorageSupport(),a)a.hasOwnProperty(o)&&(f[o]=a[o]);return f.xhr_excludes||(f.xhr_excludes={}),f.checkWindowOverrides=function(e){if(!Object.getOwnPropertyNames)return[];var n,r,i,o=[];function s(n){(function(n){for(var r,i,o=n.split("."),s=e;s&&o.length;)try{s=s[o.shift()]}catch(e){return!1}return"function"==typeof s&&(r=s,!("console.assert"===(i=n)||"Function.prototype"===i||i.indexOf("onload")>=0||i.indexOf("onbeforeunload")>=0||i.indexOf("onerror")>=0||i.indexOf("onload")>=0||i.indexOf("NodeFilter")>=0||r.toString&&!r.hasOwnProperty("toString")&&/\[native code\]/.test(String(r))))})(n)&&o.push(n)}(n=c.createElement("iframe")).style.display="none",n.src="javascript:false",c.getElementsByTagName("script")[0].parentNode.appendChild(n),i=Object.getOwnPropertyNames(r=n.contentWindow);for(var a=0;a<i.length;a++){var l=i[a];if("window"!==l&&"self"!==l&&"top"!==l&&"parent"!==l&&"frames"!==l&&r[l]&&("object"==typeof r[l]||"function"==typeof r[l])){s(l);var u=[];try{u=Object.getOwnPropertyNames(r[l])}catch(e){}for(var d=0;d<u.length;d++)s([l,u[d]].join("."));if(r[l].prototype){u=Object.getOwnPropertyNames(r[l].prototype);for(var d=0;d<u.length;d++)s([l,"prototype",u[d]].join("."))}}}return o},f.checkDocumentOverrides=function(e){return f.utils.arrayFilter(["readyState","domain","hidden","URL","cookie"],function(n){return e.hasOwnProperty(n)})},"true"===f.utils.getQueryParamValue("overridden")&&e&&e.Object&&Object.getOwnPropertyNames&&[].concat(f.checkWindowOverrides(e)).concat(f.checkDocumentOverrides(c)).length,u("onBoomerangLoaded",{BOOMR:f},!0),f}(window),this.BOOMR.addVar("token",e.token),e&&this.initOptions(e))}return e.prototype.shouldIgnoreUrls=function(e){return a(e,location.href)},e.prototype.initOptions=function(e){this.installPlugins();var n=e.sampleRate||1,r=e.interactionSampleRate||.1;for(var i in this.BOOMR.init({beacon_url:"https://fclog.baidu.com/log/weirwood?type=perf",autorun:!1,History:{auto:!0},instrument_xhr:!0,monitor_fetch:!0,ResourceTiming:{clearOnBeacon:!0,monitorClearResourceTimings:!0},Continuity:{monitorLongTasks:!0,monitorPageBusy:!0,monitorFrameRate:!0,monitorInteractions:!0,monitorStats:!1,ttiWaitForXHRDone:e.ttiWaitForXHRDone||!0,ttiWaitForXHRIgnore:e.ttiWaitForXHRIgnore||[],waitAfterOnload:e.waitAfterOnload||!1,afterOnload:e.afterOnload||!1},ignoreImage:e.ignoreImage||!1,sampleRate:n,interactionSampleRate:n*r,normalizeUrl:e.normalizeUrl,initiatorTypes:e.initiatorTypes||["spa_hard","spa","xhr"],ignoreXhrs:e.ignoreXhrs||[],sendWindow:e.sendWindow||window}),this.BOOMR)this.BOOMR.hasOwnProperty(i)&&(this[i]=this.BOOMR[i])},e.prototype.installPlugins=function(){var e,n,r,i,o=function(e){var n,r,i=(e=e||window).document,o=function(n){var r=!1;if(n.getBoundingClientRect){var o=n.getBoundingClientRect();(r={top:Math.max(o.top,0),left:Math.max(o.left,0),bottom:Math.min(o.bottom,e.innerHeight||i.documentElement.clientHeight),right:Math.min(o.right,e.innerWidth||i.documentElement.clientWidth)}).bottom<=r.top||r.right<=r.left?r=!1:r.area=(r.bottom-r.top)*(r.right-r.left)}return r},s=function(e,n){if(n){var r=o(e);r&&a.push({url:n,area:r.area,rect:r})}},a=[],c=[];try{var l=e.performance.timing.navigationStart;!function(){for(var n=i.getElementsByTagName("*"),r=/url\(.*(http.*)\)/ig,c=0;c<n.length;c++){var l=n[c],u=e.getComputedStyle(l);if("IMG"==l.tagName&&s(l,l.currentSrc||l.src),u["background-image"]){r.lastIndex=0;var d=r.exec(u["background-image"]);d&&d.length>1&&s(l,d[1].replace('"',""))}if("IFRAME"==l.tagName)try{var p=o(l);if(p){var h=RUMSpeedIndex(l.contentWindow);h&&a.push({tm:h,area:p.area,rect:p})}}catch(e){}}}();for(var u={},d=e.performance.getEntriesByType("resource"),p=0;p<d.length;p++)u[d[p].name]=d[p].responseEnd;for(var h=0;h<a.length;h++)"tm"in a[h]||(a[h].tm=void 0!==u[a[h].url]?u[a[h].url]:0);if(!function(){try{for(var r=performance.getEntriesByType("paint"),o=0;o<r.length;o++)if("first-paint"==r[o].name){l=performance.getEntriesByType("navigation")[0].startTime,n=r[o].startTime-l;break}}catch(e){}if(void 0===n&&"msFirstPaint"in e.performance.timing&&(n=e.performance.timing.msFirstPaint-l),void 0===n&&"chrome"in e&&"loadTimes"in e.chrome){var s=e.chrome.loadTimes();if("firstPaintTime"in s&&s.firstPaintTime>0){var a=s.startLoadTime;"requestTime"in s&&(a=s.requestTime),s.firstPaintTime>=a&&(n=(s.firstPaintTime-a)*1e3)}}if(void 0===n||n<0||n>12e4){n=e.performance.timing.responseStart-l;for(var c={},u=i.getElementsByTagName("head")[0].children,o=0;o<u.length;o++){var d=u[o];"SCRIPT"==d.tagName&&d.src&&!d.async&&(c[d.src]=!0),"LINK"==d.tagName&&"stylesheet"==d.rel&&d.href&&(c[d.href]=!0)}for(var p=e.performance.getEntriesByType("resource"),h=!1,f=0;f<p.length;f++)if(!h&&c[p[f].name]&&("script"==p[f].initiatorType||"link"==p[f].initiatorType)){var m=p[f].responseEnd;(void 0===n||m>n)&&(n=m)}else h=!0}n=Math.max(n,0)}(),!function(){for(var r={0:0},o=0,s=0;s<a.length;s++){var l=n;"tm"in a[s]&&a[s].tm>n&&(l=a[s].tm),void 0===r[l]&&(r[l]=0),r[l]+=a[s].area,o+=a[s].area}var u=Math.max(i.documentElement.clientWidth,e.innerWidth||0)*Math.max(i.documentElement.clientHeight,e.innerHeight||0);if(u>0&&(u=.1*Math.max(u-o,0),void 0===r[n]&&(r[n]=0),r[n]+=u,o+=u),o){for(var d in r)r.hasOwnProperty(d)&&c.push({tm:d,area:r[d]});c.sort(function(e,n){return e.tm-n.tm});for(var p=0,h=0;h<c.length;h++)p+=c[h].area,c[h].progress=p/o}}(),c.length){r=0;for(var f=0,m=0,g=0;g<c.length;g++){var v=c[g].tm-f;v>0&&m<1&&(r+=(1-m)*v),f=c[g].tm,m=c[g].progress}}else r=n}catch(e){}return r}(window);if(this.BOOMR.addVar("speedIndex",o,!0),!function(){if(!BOOMR.plugins.Continuity){var e,n=0,r=1,i=2,o="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_",s=".",a={passive:!0,capture:!0},c=BOOMR.getPerformance(),l={},u=c&&c.timing&&c.timing.navigationStart?c.timing.navigationStart:BOOMR.now(),d=function(r){var i={},o={},s=[],a=0,d=0,p=0,h=!0;function f(){return Math.floor((BOOMR.now()-r)/100)}function m(n){function o(e){return n?BOOMR.getPendingVar(e):BOOMR.getVar(e)}if(e.ttiWaitForXHRDone&&BOOMR.utils.inArray(o("http.initiator"),BOOMR.constants.BEACON_TYPE_SPAS)){var s=o("c.tti.xd"),a=0,c="spa"===o("http.initiator");c&&(a=o("rt.tstart")-u,s=o("c.tti.xd.increasing"));var l=s?s-(r-u):c?a:r-u,d=f(),p=0,h=0,m=0;for(p=Math.floor(l/100);p<=d;p++){if(!n&&(i.longtask&&i.longtask[p]||i.fps&&(!i.fps[p]||i.fps[p]<2)||i.busy&&i.busy[p]>50||i.interdly&&i.interdly[p])){h=0;continue}if(++h>=5){m=Math.max((m=r+(p-5)*100-a)-u,o("c.tti.xd"));break}}return m>0?(n||e.addToBeacon("c.tti.new",m),e.hasAddedTtinewToBeacon=!0,m):(e.hasAddedTtinewToBeacon=!1,0)}}return BOOMR.fpsLog&&BOOMR.fpsLog.length&&(r=BOOMR.fpsLog[0]+u),l.timeToInteractive=function(){if(a)return a-u},l.timeToVisuallyReady=function(){if(d)return d-u},l.timeToHeroImagesReady=function(){if(e.ttiWaitForHeroImages&&p)return p-u},l.timeToFrameworkReady=function(){if(e.ttiWaitForFrameworkReady&&e.frameworkReady)return e.frameworkReady-u},l.log=function(){return s},{register:function(e,r,s){i[e]||(i[e]=[]),o[e]={compressMode:r||n,backfillLast:s}},set:function(e,n,r){void 0===r&&(r=f()),i[e]&&(i[e][r]=n)},log:function(n,r,i){void 0===r&&(r=f()),s.push({type:n,time:r,val:i}),s.length>e.logMaxEntries&&Array.prototype.splice.call(s,0,s.length-e.logMaxEntries)},increment:function(e,n,r){void 0===r&&(r=f()),void 0===n&&(n=1),i[e]&&(i[e][r]||(i[e][r]=0),i[e][r]+=n)},getTimeBucket:f,getStats:function(e,n){var o,s=0,a=0,c=1/0,l=0,u=Math.floor((n-r)/100);if(!i[e])return 0;for(var d in i[e])(d=parseInt(d,10))>=u&&i[e].hasOwnProperty(d)&&(o=i[e][d],s++,a+=o,c=Math.min(c,o),l=Math.max(l,o));return{total:a,count:s,min:c,max:l}},analyze:function(n){var g=f(),v=0,y=0;if(e.sendLog&&void 0!==n&&function(){for(var n="",r=0;r<s.length;r++){var i=s[r];for(var o in 0!==r&&(n+="|"),n+=i.type,n+=Math.round(i.time-u).toString(36),i.val)i.val.hasOwnProperty(o)&&(n+=","+o,"number"==typeof i.val[o]?n+=i.val[o].toString(36):n+=i.val[o])}""!==n&&e.addToBeacon("c.l",n)}(),e.sendTimeline&&void 0!==n){var b,_,w=n?Math.max(n,BOOMR.now()-12e4):n;for(b in i)i.hasOwnProperty(b)&&""!==(_=M(o[b].compressMode,o[b].backfillLast,i[b],0!==w?Math.floor((w-r)/100):0,f()))&&e.addToBeacon("c.t."+b,_)}if(!a){if(!d&&!(d=function(){var n=0;if(e.ttiWaitForFrameworkReady){if(!e.frameworkReady)return;n=e.frameworkReady}if(BOOMR.plugins.PaintTiming&&BOOMR.plugins.PaintTiming.is_supported()&&c&&c.timeOrigin){var r=BOOMR.plugins.PaintTiming.getTimingFor("largest-contentful-paint");r||(r=BOOMR.plugins.PaintTiming.getTimingFor("first-contentful-paint")),r||(r=BOOMR.plugins.PaintTiming.getTimingFor("first-paint")),r&&(n=Math.max(n,Math.round(r+c.timeOrigin)))}else if(c&&c.timing&&c.timing.msFirstPaint)n=Math.max(n,c.timing.msFirstPaint);else if(BOOMR.window&&BOOMR.window.chrome&&"function"==typeof BOOMR.window.chrome.loadTimes){var i=BOOMR.window.chrome.loadTimes();i&&i.firstPaintTime&&(n=Math.max(n,1e3*i.firstPaintTime))}return c&&c.timing&&c.timing.domContentLoadedEventEnd&&(n=Math.max(n,c.timing.domContentLoadedEventEnd)),e.ttiWaitForHeroImages&&(p=function(e){var n,r,i,o,s,a=0;if(!BOOMR.window||!BOOMR.window.document||"function"!=typeof BOOMR.window.document.querySelectorAll||!c||"function"!=typeof c.getEntriesByType)return 0;if((n=BOOMR.window.document.querySelectorAll(e+", "+e+" * img, "+e+" * image"))&&n.length)for(r=0;r<n.length;r++){if(!(o=n[r].currentSrc||n[r].src||"function"==typeof n[r].getAttribute&&n[r].getAttribute("xlink:href"))&&"function"==typeof BOOMR.window.getComputedStyle){var l=BOOMR.window.getComputedStyle(n[r])&&BOOMR.window.getComputedStyle(n[r]).getPropertyValue("background");if(l){var d=l.match(/url\(["']?([^"']*)["']?\)/);d&&d.length>0&&(o=d[1])}}if(o&&(s=c.getEntriesByName(o))&&s.length)for(i=0;i<s.length;i++)a=Math.max(a,s[i].responseEnd)}return a?Math.floor(a+u):0}(e.ttiWaitForHeroImages))&&(n=Math.max(n,p)),n}())||(h&&(e.addToBeacon("c.tti.vr",l.timeToVisuallyReady()),e.addToBeacon("c.tti.fr",l.timeToFrameworkReady()),e.addToBeacon("c.tti.hi",l.timeToHeroImagesReady()),h=!1),!i.longtask&&!i.fps&&!i.busy))return;for(v=Math.floor((d-r)/100);v<=g;v++){if(i.longtask&&i.longtask[v]||i.fps&&(!i.fps[v]||i.fps[v]<2)||i.busy&&i.busy[v]>50||i.interdly&&i.interdly[v]){y=0;continue}if(++y>=5){a=Math.max(a=r+(v-5)*100,d);break}}a>0&&e.addToBeacon("c.tti",l.timeToInteractive())}m()},analyzeXHRDone:m,stop:function(){i={},s=[]},onBeacon:function(){for(var e in i)i.hasOwnProperty(e)&&(i[e]=[]);s=[],h=!1}}},p=function(n){if(n.PerformanceObserver&&n.LayoutShift){var r=!0,i=0,o=0,s=[],a=new n.PerformanceObserver(function(e){r&&e.getEntries().map(function(e){if(!e.hadRecentInput){var n=s[0],r=s[s.length-1];o&&e.startTime-r.startTime<1e3&&e.startTime-n.startTime<5e3?(o+=e.value,s.push(e)):(o=e.value,s=[e]),o>i&&(i=o)}})});try{a.observe({type:"layout-shift",buffered:!0})}catch(e){return}return l.clsScore=function(){return i},{clearClsScore:c,analyze:function(n){e.addToBeacon("c.cls",l.clsScore())},stop:function(){r=!1,a.disconnect(),c()},onBeacon:function(){c()}}}function c(){i=0}},h=function(r,i){if(r.PerformanceObserver&&r.PerformanceLongTaskTiming){var o={unknown:0,self:1,"same-origin-ancestor":2,"same-origin-descendant":3,"same-origin":4,"cross-origin-ancestor":5,"cross-origin-descendant":6,"cross-origin-unreachable":7,"multiple-contexts":8},s={unknown:0,script:1,layout:2},a={unknown:0,iframe:1,embed:2,object:3},c=new r.PerformanceObserver(function(e){var n,r,o={};if(d){n=e.getEntries(),Array.prototype.push.apply(u,n);var s=i.getTimeBucket();for(r=0;r<n.length;r++){var a=n[r].duration;p+=a;var c=s;for(a-=100;a>0&&c>=0;)o[--c]?o[c]++:o[c]=1,a-=100}for(var l in o)o.hasOwnProperty(l)&&i.increment("longtask",o[l],l);i.increment("longtask",n.length)}});try{c.observe({entryTypes:["longtask"]})}catch(e){return}i.register("longtask",n);var u=[],d=!0,p=0;return l.longTasksTime=function(){return p},l.longTasksCount=function(){return u.length},{getTasks:function(){return u},clearTasks:h,analyze:function(n){var r,i,c,d,p,h=[],f=[];if(0!==u.length){for(r=0;r<u.length;r++){for(i=0,d={s:Math.round((c=u[r]).startTime).toString(36),d:Math.ceil(c.duration).toString(36),n:o[c.name]?o[c.name]:0},f=[];i<c.attribution.length;i++)if("script"!==(p=c.attribution[i]).name||"iframe"!==p.containerType||p.containerName||p.containerId||p.containerSrc){var m,g,v=p.containerName?p.containerName:void 0,y=p.containerId?p.containerId:void 0;v===y&&(v=void 0);var b=void 0===y?p.containerSrc:void 0;f.push({a:s[p.name]?s[p.name]:0,t:a[p.containerType]?a[p.containerType]:0,n:v,i:y,s:b})}f.length>0&&(d.a=f),h.push(d)}e.addToBeacon("c.lt.n",l.longTasksCount(),!0),e.addToBeacon("c.lt.tt",l.longTasksTime()),e.addToBeacon("c.lt",(m=h,(g=BOOMR.utils.Compression&&BOOMR.utils.Compression.jsUrl||window.UserTimingCompression&&window.UserTimingCompression.jsUrl||BOOMR.window.UserTimingCompression&&BOOMR.window.UserTimingCompression.jsUrl)?g(m):window.JSON?JSON.stringify(m):""))}},stop:function(){d=!1,c.disconnect(),h()},onBeacon:function(){h()}}}function h(){u=[],p=0}},f=function(n,r){r.register("busy",i);var o=Math.floor(3.125),s=BOOMR.now(),a=0,c=0,u=0,d=0,p=!1,h=!1;return l.pageBusy=function(){return 0===u?0:Math.ceil(d/u*100)},p=setInterval(function(){var e=BOOMR.now(),n=e-s;if(s=e,n>68){var r=Math.floor((n-32)/32);a+=r,c+=r,n-=32*r}a++,n>36&&c++},32),h=setInterval(function(){var e=r.getTimeBucket(),n=e,i=0;if(0!==a){for(;a>o+1&&i<=100;)r.set("busy",100,--n),a-=o,c=Math.max(c-o,0),u+=o,d+=o,i++;u+=a,d+=c,r.set("busy",Math.ceil(c/a*100),e),a=0,c=0}},100),{analyze:function(n){e.addToBeacon("c.b",l.pageBusy())},stop:function(){p&&(clearInterval(p),p=!1),h&&(clearInterval(h),h=!1)},onBeacon:function(){u=0,d=0}}},m=function(r,i){i.register("fps",n);var o,s,a=0,c=0,d=!0;if(BOOMR.fpsLog&&BOOMR.fpsLog.length){s=o=BOOMR.fpsLog[0]+u;for(var p=0;p<BOOMR.fpsLog.length;p++){var h=u+BOOMR.fpsLog[p];i.increment("fps",1,Math.floor((h-o)/100)),h-s>=50&&c++,s=h}a=BOOMR.fpsLog.length,delete BOOMR.fpsLog}else o=BOOMR.now();return r.requestAnimationFrame(function e(n){d&&(n-s>=50&&c++,s=n,a++,i.increment("fps"),r.requestAnimationFrame(e))}),l.fps=function(){var e=l.fpsDuration();if(e)return Math.floor(a/(e/1e3))},l.fpsDuration=function(){if(o)return BOOMR.now()-o},l.fpsMinimum=function(){if(l.fpsDuration()){var e=i.getStats("fps",o).min;return e!==1/0?e:void 0}},l.fpsLongFrames=function(){return c},l.fpsStart=function(){return o?o.toString(36):0},{analyze:function(n){e.addToBeacon("c.f",l.fps()),e.addToBeacon("c.f.d",l.fpsDuration()),e.addToBeacon("c.f.m",l.fpsMinimum()),e.addToBeacon("c.f.l",l.fpsLongFrames()),e.addToBeacon("c.f.s",l.fpsStart())},stop:function(){d=!1,o=0},onBeacon:function(){d&&(o=BOOMR.now()),a=0,c=0}}},g=function(r,o,s){if(r&&r.document&&r.document.body&&r.document.documentElement){var c=2e3,u=20,d=0,p=0,h=0,f=0,m=0,g=0,v=0,y=0,b=!1,_=r.document.body,w=r.document.documentElement;o.register("scroll",n),o.register("scrollpct",i);var O=Math.max(_.scrollHeight,_.offsetHeight,w.clientHeight,w.scrollHeight,w.offsetHeight)-BOOMR.utils.windowHeight();return l.scrollPct=function(){return f},l.scrollCount=function(){return m},l.scrollDistinct=function(){return v},l.scrollPixels=function(){return g},BOOMR.utils.addListener(r,"scroll",R,a),b=setInterval(function(){var e=Math.min(h,100);0!==e&&o.set("scrollpct",e),h=0},100),{analyze:function(n){e.addToBeacon("c.s",l.scrollCount()),e.addToBeacon("c.s.p",l.scrollPct()),e.addToBeacon("c.s.y",l.scrollPixels()),e.addToBeacon("c.s.d",l.scrollDistinct())},stop:function(){b&&(clearInterval(b),b=!1),BOOMR.utils.removeListener(r,"scroll",R)},onBeacon:function(){f=0,m=0,g=0,v=0}}}function R(e){var n=BOOMR.now();m++,n-y>c&&v++,y=n;var r=Math.ceil(BOOMR.utils.scroll().y),i=Math.abs(d-r);g+=i,o.increment("scroll",i),(0===p||Math.abs(p-r)>u)&&(o.log(0,n,{y:r}),p=r),h+=Math.round(i/O*100),f+=Math.round(i/O*100),d=r}},v=function(r,i,o){i.register("click",n);var s=0,c=0,u=0,d=0,p=0,h=null;function f(e){var n=BOOMR.now(),r=e.clientX,a=e.clientY;s++;var l=Math.round(Math.sqrt(Math.pow(p-a,2)+Math.pow(d-r,2)));h===e.target||l<=10?++c+1>=3&&(u++,BOOMR.fireEvent("rage_click",e)):c=0,d=r,p=a,h=e.target,i.increment("click"),i.log(1,n,{x:r,y:a}),e.cancelable&&o.interact("click",n,e)}return l.clicksCount=function(){return s},l.clicksRage=function(){return u},BOOMR.utils.addListener(r.document,"click",f,a),{analyze:function(n){e.addToBeacon("c.c",l.clicksCount()),e.addToBeacon("c.c.r",l.clicksRage())},stop:function(){BOOMR.utils.removeListener(r.document,"click",f)},onBeacon:function(){s=0,c=0,u=0}}},y=function(r,i,o){i.register("key",n);var s=0,c=0;function u(e){var n=BOOMR.now();s++,27===e.keyCode&&c++,i.increment("key"),i.log(3,n),e.cancelable&&o.interact("key",n,e)}return l.keyCount=function(){return s},l.keyEscapes=function(){return c},BOOMR.utils.addListener(r.document,"keydown",u,a),{analyze:function(n){e.addToBeacon("c.k",l.keyCount()),e.addToBeacon("c.k.e",l.keyEscapes())},stop:function(){BOOMR.utils.removeListener(r.document,"keydown",u)},onBeacon:function(){s=0,c=0}}},b=function(r,o,s){o.register("mouse",n),o.register("mousepct",i);var c=0,u=0,d=0,p=0,h=0,f=0,m=0,g=!1,v=!1,y=Math.round(Math.sqrt(Math.pow(BOOMR.utils.windowHeight(),2)+Math.pow(BOOMR.utils.windowWidth(),2)));function b(e){var n=e.clientX,r=e.clientY,i=Math.round(Math.sqrt(Math.pow(u-r,2)+Math.pow(c-n,2))),s=Math.round(i/y*100);h+=s,f+=s,m+=i,c=n,u=r,o.increment("mouse",i)}return l.mousePct=function(){return f},l.mousePixels=function(){return m},g=setInterval(function(){var e=Math.min(h,100);0!==e&&o.set("mousepct",e),h=0},100),v=setInterval(function(){(d!==c||p!==u)&&Math.round(Math.sqrt(Math.pow(p-u,2)+Math.pow(d-c,2)))>=10&&(o.log(2,BOOMR.now(),{x:c,y:u}),d=c,p=u)},250),BOOMR.utils.addListener(r.document,"mousemove",b,a),{analyze:function(n){e.addToBeacon("c.m.p",l.mousePct()),e.addToBeacon("c.m.n",l.mousePixels())},stop:function(){g&&(clearInterval(g),g=!1),v&&(clearInterval(v),v=!1),BOOMR.utils.removeListener(r.document,"mousemove",b)},onBeacon:function(){f=0,m=0}}},_=function(r,i,o){i.register("inter",n),i.register("interdly",n);var s=0,a=null,c=0,d=0,p=0,h=0,f=!0,m=0,g=0,v=!1,y=!1,b=!1,_=!1;function w(){v&&(clearTimeout(v),v=!1),y&&(clearTimeout(y),y=!1)}function O(){BOOMR.sendBeaconWhenReady({"rt.start":"manual","http.initiator":"interaction","rt.tstart":m,"rt.end":g},function(){w(),BOOMR.fireEvent("interaction")},e)}return l.interactionDelayed=function(){return p},l.interactionDelayedTime=function(){return Math.ceil(h)},l.interactionAvgDelay=function(){if(c>0)return Math.ceil(d/c)},l.timeToFirstInteraction=function(){if(s)return s-u},l.firstInputDelay=function(){if(null!==a)return a},BOOMR.subscribe("spa_init",function(){b=!0,w()},null,e),{interact:function(n,l,_){var w=0;l=l||BOOMR.now(),f&&(c++,s||(s=_&&_.timeStamp?_.timeStamp+u:l),_&&_.timeStamp&&!(e.isSafari&&r!==window)&&(w=_.timeStamp>14e11?l-_.timeStamp:BOOMR.hrNow()-_.timeStamp,d+=w,null===a&&(a=Math.ceil(w)),w>50&&(i.increment("interdly"),p++,h+=w)),i.increment("inter"),!b&&e.afterOnloadMonitoring&&(g=BOOMR.now(),m||(m=g,y=setTimeout(O,3e4)),v&&(clearTimeout(v),v=!1),v=setTimeout(O,o)))},analyze:function(n){var r;e.addToBeacon("c.i.dc",l.interactionDelayed()),e.addToBeacon("c.i.dt",l.interactionDelayedTime()),e.addToBeacon("c.i.a",l.interactionAvgDelay()),!_&&(BOOMR.plugins.EventTiming&&BOOMR.plugins.EventTiming.is_enabled()&&(r=BOOMR.plugins.EventTiming.metrics.firstInputDelay()),r||null===a||(r=l.firstInputDelay()),r&&(e.addToBeacon("c.fid",Math.ceil(r),!0),e.addToBeacon("c.ttfi",BOOMR.plugins.EventTiming.metrics.timeToFirstInteraction()||l.timeToFirstInteraction()),_=!0))},stop:function(){f=!1},onBeacon:function(){h=0,p=0,c=0,d=0,m=0,g=0,b=!1,w()}}},w=function(e,n,r){var i,o,s=!0;function c(){s&&(r.interact("pd",i,o),i=null,o=null,BOOMR.utils.removeListener(window,"pointerup",c))}function l(e){s&&e.cancelable&&(i=BOOMR.now(),o=e,BOOMR.utils.addListener(window,"pointerup",c,a))}function u(){s=!1,BOOMR.utils.removeListener(window,"pointerdown",l),BOOMR.utils.removeListener(window,"pointerup",c),BOOMR.utils.removeListener(window,"pointercancel",u)}return BOOMR.utils.addListener(window,"pointerdown",l,a),BOOMR.utils.addListener(window,"pointercancel",u,a),{stop:u}},O=function(e,n,r){var i=!0;function o(e){if(i&&e.cancelable){var n=BOOMR.now();r.interact("md",n,e)}}return BOOMR.utils.addListener(window,"mousedown",o,a),{stop:function(){i=!1,BOOMR.utils.removeListener(window,"mousedown",o)}}},R=function(e,n,r){var i=!0;function o(e){if(i&&e.cancelable){var n=BOOMR.now();r.interact("ts",n,e)}}return BOOMR.utils.addListener(window,"touchstart",o,a),{stop:function(){i=!1,BOOMR.utils.removeListener(window,"touchstart",o)}}},S=function(e,r,i){r.register("vis",n);var o={visible:0,hidden:1,prerender:2,unloaded:3},s=!0;return BOOMR.subscribe("visibility_changed",function(e){var n=BOOMR.now();s&&(r.increment("vis"),r.log(4,n,{s:o[BOOMR.visibilityState()]}))}),{stop:function(){s=!1}}},E=function(e,r,i){r.register("orn",n);var o=!0;function s(e){var n=BOOMR.now(),i=window.orientation;if(o){r.increment("orn");var s=window.screen&&(screen.orientation||screen.msOrientation||screen.mozOrientation||{});s&&"number"==typeof s.angle&&(i=screen.orientation.angle),"number"==typeof i&&r.log(5,n,{a:i})}}return BOOMR.utils.addListener(e,"orientationchange",s,a),{stop:function(){o=!1,BOOMR.utils.removeListener(e,"orientationchange",s)}}},T=function(e,o){o.register("mem",r,!0),o.register("bat",i,!0),o.register("domsz",r,!0),o.register("domln",r,!0),o.register("mut",n);var s,a=e.document,l=!0,u=!1,d=null,p=0,h=0,f=a.getElementsByTagName("*");function m(){l&&d&&o.set("bat",d.level)}return u=setInterval(function(){var e=c&&c.memory&&c.memory.usedJSHeapSize;if(e&&o.set("mem",e),h=f.length,o.set("domsz",a.documentElement.innerHTML.length),o.set("domln",h),p>0){var n=Math.min(Math.round(p/h*100),100);o.set("mut",n),p=0}},1e3),e.navigator&&"function"==typeof e.navigator.getBattery&&e.navigator.getBattery().then(function(e){(d=e).onlevelchange&&(d.onlevelchange=m)}),BOOMR.utils.isMutationObserverSupported()&&(s=BOOMR.utils.addObserver(a,{childList:!0,subtree:!0},null,function(e){return e.forEach(function(e){if("childList"!==e.type)return!0;for(var n=0;n<e.addedNodes.length;n++){var r=e.addedNodes[n];p++,p+=r.getElementsByTagName?r.getElementsByTagName("*").length:0}}),!0},null,this)),{stop:function(){l=!1,u&&(clearInterval(u),u=!1),s&&s.observer&&(s.observer.disconnect(),s=null),d&&d.onlevelchange&&(d.onlevelchange=null),f=null}}};e={monitorLongTasks:!0,monitorPageBusy:!0,monitorFrameRate:!0,monitorInteractions:!0,monitorStats:!1,monitorLayoutShifts:!0,afterOnload:!1,afterOnloadMaxLength:6e4,afterOnloadMinWait:5e3,waitAfterOnload:!1,ttiWaitForFrameworkReady:!1,ttiWaitForHeroImages:!1,ttiWaitForXHRDone:!1,ttiWaitForXHRIgnore:[],sendLog:!0,sendTimeline:!0,logMaxEntries:100,initialized:!1,complete:!1,isSpa:!1,firedPageReady:!1,afterOnloadMonitoring:!1,frameworkReady:null,timeline:null,ttiMethod:null,longTaskMonitor:null,pageBusyMonitor:null,frameRateMonitor:null,interactionMonitor:null,scrollMonitor:null,clickMonitor:null,keyMonitor:null,mouseMonitor:null,visibilityMonitor:null,orientationMonitor:null,touchStartMonitor:null,mouseDownMonitor:null,pointerDownMonitor:null,statsMonitor:null,layoutShiftMonitor:null,monitors:["timeline","longTaskMonitor","pageBusyMonitor","frameRateMonitor","scrollMonitor","keyMonitor","clickMonitor","mouseMonitor","interactionMonitor","visibilityMonitor","orientationMonitor","statsMonitor","layoutShiftMonitor","touchStartMonitor","mouseDownMonitor","pointerDownMonitor"],timeOfLastBeacon:0,hasAddedDataToBeacon:!1,hasAddedTtinewToBeacon:void 0,isSafari:window&&window.navigator&&window.navigator.vendor&&-1!==window.navigator.vendor.indexOf("Apple"),onBeforeBeacon:function(){e.runAllAnalyzers()},checkIfSendAdditionalBeacon:function(){if(!1===e.hasAddedTtinewToBeacon&&BOOMR.hasPending()){var n=e.timeline.analyzeXHRDone(!0);BOOMR.sendAdditionalBeacon(n>0?{"c.tti.new":n,add:1}:{"c.tti.new":void 0,add:2})}},runAllAnalyzers:function(){var n,r;if(!e.hasAddedDataToBeacon){for(n=0;n<e.monitors.length;n++)(r=e[e.monitors[n]])&&"function"==typeof r.analyze&&r.analyze(e.timeOfLastBeacon);e.addToBeacon("c.lb",e.timeOfLastBeacon?e.timeOfLastBeacon.toString(36):0),e.timeOfLastBeacon=BOOMR.now(),e.hasAddedDataToBeacon=!0}},onBeacon:function(n){var r;if(!n||void 0===n.early&&(!n["http.initiator"]||0!==n["http.initiator"].indexOf("api_custom_"))){for(r=0;r<e.monitors.length;r++){var i=e[e.monitors[r]];i&&(e.afterOnload||"function"!=typeof i.stop||i.stop(),"function"==typeof i.onBeacon&&i.onBeacon())}e.hasAddedDataToBeacon=!1,n&&n.add&&(e.hasAddedTtinewToBeacon=void 0)}},onXhrLoad:function(n){n&&BOOMR.utils.inArray(n.initiator,BOOMR.constants.BEACON_TYPE_SPAS)&&(e.isSpa=!0),n&&"spa_hard"===n.initiator&&e.onPageReady()},onPageReady:function(){if(e.firedPageReady=!0,e.afterOnload&&e.monitorInteractions&&(e.afterOnloadMonitoring=!0,e.isSpa||"number"!=typeof e.afterOnloadMaxLength||setTimeout(function(){e.afterOnloadMonitoring=!1},e.afterOnloadMaxLength)),e.waitAfterOnload){var n=BOOMR.now();setTimeout(function r(){BOOMR.now()-n>e.waitAfterOnload?(e.complete=!0,BOOMR.sendBeacon()):(e.timeline.analyze(),(e.ttiWaitForXHRDone?BOOMR.getVar("c.tti.new"):l.timeToInteractive())?(e.complete=!0,BOOMR.sendBeacon()):setTimeout(r,500))},500)}else e.complete=!0},addToBeacon:function(e,n,r){if((0===n||void 0===n)&&!r)return void BOOMR.removeVar(e);BOOMR.addVar(e,n,!0)}},BOOMR.plugins.Continuity={init:function(n){if(BOOMR.utils.pluginConfig(e,n,"Continuity",["monitorLongTasks","monitorPageBusy","monitorFrameRate","monitorInteractions","monitorStats","afterOnload","afterOnloadMaxLength","afterOnloadMinWait","waitAfterOnload","ttiWaitForFrameworkReady","ttiWaitForHeroImages","ttiWaitForXHRDone","ttiWaitForXHRIgnore","sendLog","logMaxEntries","sendTimeline"]),e.initialized)return this;if(e.initialized=!0,e.timeline=new d(BOOMR.now()),BOOMR.window){if(e.monitorLongTasks&&BOOMR.window.PerformanceObserver&&BOOMR.window.PerformanceLongTaskTiming&&(e.longTaskMonitor=new h(BOOMR.window,e.timeline),e.ttiMethod="lt"),e.monitorFrameRate&&"function"==typeof BOOMR.window.requestAnimationFrame&&(e.frameRateMonitor=new m(BOOMR.window,e.timeline),e.ttiMethod||(e.ttiMethod="raf")),!e.monitorPageBusy||BOOMR.window.PerformanceObserver&&BOOMR.window.PerformanceLongTaskTiming&&e.monitorLongTasks||(e.pageBusyMonitor=new f(BOOMR.window,e.timeline),e.ttiMethod||(e.ttiMethod="b")),e.monitorInteractions){var r=BOOMR.window;e.interactionMonitor=new _(r,e.timeline,e.afterOnloadMinWait),e.scrollMonitor=new g(r,e.timeline,e.interactionMonitor),e.keyMonitor=new y(r,e.timeline,e.interactionMonitor),e.clickMonitor=new v(r,e.timeline,e.interactionMonitor),e.mouseMonitor=new b(r,e.timeline,e.interactionMonitor),e.visibilityMonitor=new S(r,e.timeline,e.interactionMonitor),e.orientationMonitor=new E(r,e.timeline,e.interactionMonitor),e.touchStartMonitor=new R(r,e.timeline,e.interactionMonitor),e.mouseDownMonitor=new O(r,e.timeline,e.interactionMonitor),e.pointerDownMonitor=new w(r,e.timeline,e.interactionMonitor)}e.monitorStats&&(e.statsMonitor=new T(BOOMR.window,e.timeline,e.interactionMonitor)),e.monitorLayoutShifts&&BOOMR.window.PerformanceObserver&&(e.layoutShiftMonitor=new p(BOOMR.window))}return BOOMR.addVar("c.e",u.toString(36)),BOOMR.addVar("c.tti.m",e.ttiMethod),BOOMR.subscribe("before_beacon",e.onBeforeBeacon,null,e),BOOMR.subscribe("beacon",e.onBeacon,null,e),BOOMR.subscribe("page_ready",e.onPageReady,null,e),BOOMR.subscribe("xhr_load",e.onXhrLoad,null,e),BOOMR.subscribe("route_change",e.checkIfSendAdditionalBeacon,null,e),this},is_complete:function(n){return e.complete||n&&("error"===n["http.initiator"]||void 0!==n.early)},frameworkReady:function(){e.frameworkReady=BOOMR.now()},getTtiWaitForXHRDone:function(){return e.ttiWaitForXHRDone},getTTIWaitForXHRIngore:function(){return"function"==typeof e.ttiWaitForXHRIgnore?e.ttiWaitForXHRIgnore():e.ttiWaitForXHRIgnore},checkIfSendAdditionalBeacon:e.checkIfSendAdditionalBeacon,metrics:l,compressBucketLog:M,decompressBucketLog:function(e,o){var a,c,l,u,d,p,h=[],f=o||0;if(!e||0===e.length)return[];for(a=0,p=parseInt(e.charAt(0),10),e=e.substring(1),u=1;a<e.length;a++){if("*"===e.charAt(a)){a++,l=e.indexOf("*",a),u=parseInt(e.substring(a,l),36),a=l;continue}for(e.charAt(a)===s?(a++,l=e.indexOf(s,a),d=parseInt(e.substring(a,l),36),a=l):p===n?d=x(e.charAt(a)):p===r?-1!==(l=e.indexOf(",",a))?(d=parseInt(e.substring(a,l),36),a=l):(d=parseInt(e.substring(a),36),a=e.length):p===i&&(d="__"===e.substr(a,2)?100:parseInt(e.substr(a,2),10),a++),c=1,h[f]=d;c<u;c++)h[++f]=d;f++,u=1}return h},decompressBucketLogNumber:x,decompressLog:function(e){var n,r,i,o,s,a=[];for(n=0,o=e.split("|");n<o.length;n++){for(r=1,s={type:parseInt((i=o[n].split(","))[0].charAt(0),10),time:parseInt(i[0].substring(1),36)};r<i.length;r++)s[i[r].charAt(0)]=i[r].substring(1);a.push(s)}return a}}}function M(e,a,c,l,u){var d,p,h,f,m,g="",v=0;if(!c||0===c.length)return"";if(a)for(void 0===c[l]&&(c[l]=0),d=l+1;d<=u;d++)void 0===c[d]&&(c[d]=c[d-1]);for(d=l;d<=u;d++){if(v="number"!=typeof c[d]||isNaN(c[d])?0:c[d],e===n?h=v<=63?o.charAt(v):s+v.toString(36)+s:e===r?h=v.toString(36):e===i&&(h=v<99?v<=9?"0"+Math.max(v,0):v:"__"),d+3<=u&&(c[d+1]===v||0===v&&void 0===c[d+1])&&(c[d+2]===v||0===v&&void 0===c[d+2])&&(c[d+3]===v||0===v&&void 0===c[d+3])){for(p=1;d<u&&(c[d+1]===v||0===v&&void 0===c[d+1]);)p++,d++;f="*"+p.toString(36)+"*"+h}else f=h;(0!==v||d!==u)&&(e===r&&m&&(g+=","),m=!0,g+=f)}return m?e.toString()+g:""}function x(e){if(!e||!e.charCodeAt)return 0;var n=e.charCodeAt(0);if(n>=48&&n<=57)return n-48;if(n>=97&&n<=122)return n-97+10;if(n>=65&&n<=90)return n-65+36;if(95===n)return 62;if(45===n)return 63;else return 0}}(),!function(){var e,n,r,i,o,s=["uninitialized","open","responseStart","domInteractive","responseEnd"];function l(e){if(!e)return null;e.href=e.href;var n=e.pathname;return"/"!==n.charAt(0)&&(n="/"+n),n}function u(e){var n;if(e.href&&(e.href.match(/^(about:|javascript:|data:)/i)||"function"==typeof BOOMR.getBeaconURL&&BOOMR.getBeaconURL()&&(0===(n=e.href.indexOf(BOOMR.getBeaconURL()))||5===n||6===n)))return!0;return BOOMR.xhr_excludes.hasOwnProperty(e.href)||BOOMR.xhr_excludes.hasOwnProperty(e.hostname)||BOOMR.xhr_excludes.hasOwnProperty(l(e))}function d(){this.watch=0,this.timer=null,this.timerEarlyBeacon=null,this.checkTimer=null,this.pending_events=[],this.lastSpaLocation=null}function p(e,n){var r,i;if(!n||!e)return!1;if("boolean"==typeof n)return!0===n;if("function"==typeof n)try{return!0===n(e)}catch(e){return!1}if(BOOMR.utils.isArray(n)){for(r=0;r<n.length;r++)if("string"==typeof(i=n[r])&&i===e||i instanceof RegExp&&i.test(e))return!0}return!1}function h(){if(o.monitorFetch&&"function"==typeof e.fetch&&"function"==typeof e.Request&&"function"==typeof e.Response&&"function"==typeof e.Promise&&"function"==typeof window.fetch&&!e.fetch.polyfill&&(!BOOMR.proxy_fetch||BOOMR.proxy_fetch!==e.fetch)){if(BOOMR.proxy_fetch&&BOOMR.orig_fetch&&BOOMR.orig_fetch===e.fetch){e.fetch=BOOMR.proxy_fetch;return}BOOMR.orig_fetch=e.orig_fetch||e.fetch,BOOMR.proxy_fetch=function(n,s){var a,c,l,u={timing:{},initiator:"xhr"};if("object"==typeof n&&n instanceof e.Request?(a=n.url,c=s&&s.method||n.method||"GET",o.captureXhrRequestResponse&&(l=s&&s.body||n.body||void 0)):(a=n,c=s&&s.method||"GET",o.captureXhrRequestResponse&&(l=s&&s.body||void 0)),i.href=a,o.xhrExcludeFilter(i))return BOOMR.orig_fetch.apply(e,arguments);BOOMR.fireEvent("xhr_init","fetch"),u.url=i.href,u.method=c,u.type="fetch",l&&(u.requestPayload=l),BOOMR.fireEvent("xhr_send",{resource:u}),r.addEvent(u);try{u.timing.requestStart||(u.timing.requestStart=BOOMR.now());var d=BOOMR.orig_fetch.apply(this,arguments);function p(n,r,i){function s(){var e;i.fetchResponse&&!i.fetchResponse.bodyUsed&&o.fetchBodyUsedWait?(e=BOOMR.now(),i.responseBodyNotUsed=!0,setTimeout(function(){o.loadFinished(i,e)},o.fetchBodyUsedWait)):o.loadFinished(i)}return function(){var o,a=n._bmrNextP;try{for(o=r.apply(this===window?e:this,arguments);a&&!a._bmrHasOnFulfilled;)a=a._bmrNextP;return a||(o instanceof e.Promise?o.then=h(o,o.then,i):s()),o}catch(e){for(;a&&!a._bmrHasOnRejected;)a=a._bmrNextP;throw a||s(),e}}}function h(e,n,r){return e._bmrNextP?n:function(){var i=Array.prototype.slice.call(arguments);i.length>0&&("function"==typeof i[0]&&(i[0]=p(e,i[0],r),e._bmrHasOnFulfilled=!0),i.length>1&&"function"==typeof i[1]&&(i[1]=p(e,i[1],r),e._bmrHasOnRejected=!0));var o=n.apply(e,i);return e._bmrNextP=o,o.then=h(o,o.then,r),o}}return d.then=h(d,d.then,u),d.then(function(n){var i,s,a=!1,c=!1;if(n.redirected&&(u.responseUrl=n.url),(n.status<200||n.status>=400)&&(u.status=n.status),u.fetchResponse=n,u.index>=0&&r.monitorMO(u.index),o.captureXhrRequestResponse&&"function"==typeof n.clone){(s=n.headers.get("content-type"))&&(a=-1!==s.indexOf("json"),c=-1!==s.indexOf("xml")),u.response={};try{n.clone().text().then(function(n){u.response.text=n,u.response.raw=n,c&&"function"==typeof e.DOMParser&&(u.response.xml=new e.DOMParser().parseFromString(n,"text/xml"))}).then(null,function(e){})}catch(e){}if(a)try{n.clone().json().then(function(e){u.response.json=e}).then(null,function(e){})}catch(e){}}return n},function(e){throw e&&("AbortError"===e.name||20===e.code)?u.status=-999:u.status=-998,e})}catch(e){throw u.status=-997,o.loadFinished(u),e}},BOOMR.utils.overwriteNative(e,"fetch",BOOMR.proxy_fetch)}}function f(){"function"==typeof e.fetch&&BOOMR.orig_fetch&&BOOMR.orig_fetch!==e.fetch&&(e.fetch=BOOMR.orig_fetch)}function m(){if(!BOOMR.proxy_XMLHttpRequest||BOOMR.proxy_XMLHttpRequest!==e.XMLHttpRequest){if(BOOMR.proxy_XMLHttpRequest&&BOOMR.orig_XMLHttpRequest&&BOOMR.orig_XMLHttpRequest===e.XMLHttpRequest){e.XMLHttpRequest=BOOMR.proxy_XMLHttpRequest,d.start();return}BOOMR.orig_XMLHttpRequest=e.orig_XMLHttpRequest||e.XMLHttpRequest,d.start(),BOOMR.subscribe("click",function(){if(!o.singlePageApp||o.spaStartFromClick){var n={timing:{},initiator:"click"};BOOMR.orig_XMLHttpRequest&&BOOMR.orig_XMLHttpRequest!==e.XMLHttpRequest&&(n.timing.requestStart=BOOMR.now(),r.addEvent(n))}}),BOOMR.proxy_XMLHttpRequest=function(){var n,a,c,l={timing:{},initiator:"xhr"},u=!1,d=!1;return a=(n=new BOOMR.orig_XMLHttpRequest).open,c=n.send,n.open=function(r,c,p){if(i.href=c,o.xhrExcludeFilter(i))return d=!0,a.apply(n,arguments);function h(r,i){n.addEventListener(r,function(){if("readystatechange"===r)if(l.timing[s[n.readyState]]=BOOMR.now(),4===n.readyState&&0!==n.status){if(n.responseURL!==l.url&&(l.responseUrl=n.responseURL),(n.status<200||n.status>=400)&&(l.status=n.status),o.captureXhrRequestResponse&&(l.response={text:""===n.responseType||"text"===n.responseType?n.responseText:null,xml:""===n.responseType||"document"===n.responseType?n.responseXML:null,raw:n.response,json:n.responseJSON},n.response&&n.response.constructor&&n.response.constructor===BOOMR.boomerang_frame.Object&&BOOMR.boomerang_frame.Object!==e.Object))try{n.response.constructor=e.Object}catch(e){}o.loadFinished(l)}else 0===n.readyState&&"number"==typeof l.timing.open&&(n.responseURL!==l.url&&(l.responseUrl=n.responseURL),l.status=-999,o.loadFinished(l));else n.responseURL!==l.url&&(l.responseUrl=n.responseURL),"load"===r?0!==n.status&&(n.status<200||n.status>=400)&&(l.status=n.status):l.status=void 0===i?n.status:i,o.loadFinished(l)},!1)}d=!1,void 0===p&&(p=!0),BOOMR.fireEvent("xhr_init","xhr"),u||(p&&h("readystatechange"),h("load"),h("timeout",-1001),h("error",-998),h("abort",-999)),l.url=i.href,l.method=r,l.type="xhr",delete l.status,p||(l.synchronous=!0),u=!0;try{return a.apply(n,arguments)}catch(e){throw l.status=-997,o.loadFinished(l),e}},n.send=function(e){return d||(o.captureXhrRequestResponse&&(n.resource.requestPayload=e),BOOMR.fireEvent("xhr_send",n),r.addEvent(l),l.timing.requestStart||(l.timing.requestStart=BOOMR.now()),void 0===l.status||-997!==l.status)?c.apply(n,arguments):void 0},n.resource=l,n},BOOMR.proxy_XMLHttpRequest.UNSENT=0,BOOMR.proxy_XMLHttpRequest.OPENED=1,BOOMR.proxy_XMLHttpRequest.HEADERS_RECEIVED=2,BOOMR.proxy_XMLHttpRequest.LOADING=3,BOOMR.proxy_XMLHttpRequest.DONE=4,BOOMR.proxy_XMLHttpRequest.prototype=BOOMR.orig_XMLHttpRequest.prototype,BOOMR.utils.overwriteNative(e,"XMLHttpRequest",BOOMR.proxy_XMLHttpRequest)}}function g(){BOOMR.orig_XMLHttpRequest&&BOOMR.orig_XMLHttpRequest!==e.XMLHttpRequest&&(e.XMLHttpRequest=BOOMR.orig_XMLHttpRequest)}function v(e){e.initiator="xhr",BOOMR.responseEnd(e)}!BOOMR.plugins.AutoXHR&&(e=BOOMR.window)&&e.XMLHttpRequest&&new e.XMLHttpRequest().addEventListener&&(d.stop=function(){d.pause(),d.observer=null},d.pause=function(){d.observer&&d.observer.observer&&!d.isPaused&&(d.isPaused=!0,d.observer.observer.disconnect())},d.resume=function(){d.observer&&d.observer.observer&&d.isPaused&&(d.isPaused=!1,d.observer.observer.observe(n,d.observer.config))},d.start=function(){if(!d.observer){var e={childList:!0,attributes:!0,subtree:!0,attributeFilter:["src","href"]};d.observer=BOOMR.utils.addObserver(n,e,null,r.mutation_cb,null,r),d.observer&&(d.observer.config=e,BOOMR.subscribe("page_unload",d.stop,null,d))}},d.prototype.addEvent=function(e){if(BOOMR.plugins.SPA&&BOOMR.plugins.SPA.get_ready()||BOOMR.utils.inArray(e.initiator,BOOMR.constants.BEACON_TYPE_SPAS)){var n,i,s,l={type:e.initiator,resource:e,nodes_to_wait:0,total_nodes:0,resources:[],xhr_resources:[],complete:!1,aborted:!1,firedEarlyBeacon:!1},u=this.pending_events.length,p=this;for(n=u-1;n>=0;n--)if(this.pending_events[n]&&!this.pending_events[n].complete){i=this.pending_events[n],s=n;break}if(i){if("click"===i.type&&o.singlePageApp&&o.spaStartFromClick&&"xhr"===l.type)l.resource.fromClick=!0,l.resource.timing.click=i.resource.timing.requestStart,l.resource.timing.requestStart=i.resource.timing.requestStart,l.interesting=i.interesting||0,l.total_nodes+=i.total_nodes,l.resources=i.resources.concat(l.resources),l.xhr_resources=i.xhr_resources.concat(l.xhr_resources),this.pending_events[s]=void 0,this.watch--;else if(("click"===i.type||i.resource.fromClick)&&o.singlePageApp&&o.spaStartFromClick&&"spa"===l.type)l.resource.timing=i.resource.timing,l.interesting=i.interesting||0,l.total_nodes+=i.total_nodes,l.resources=i.resources.concat(l.resources),i.resource.url&&l.xhr_resources.push(i.resource.url),l.xhr_resources=l.xhr_resources.concat(i.xhr_resources),this.pending_events[s]=void 0,this.watch--;else if("click"===i.type)(0===i.nodes_to_wait||!i.resource.url)&&(this.pending_events[s]=void 0,this.watch--);else if("xhr"===i.type){if("click"===l.type)return null;else if("xhr"===l.type)return r.add_event_resource(e),null}else if(BOOMR.utils.inArray(i.type,BOOMR.constants.BEACON_TYPE_SPAS)){if("xhr"===l.type)return r.add_event_resource(e),null;if("click"===l.type)return i.resource.lastClick=l.resource.timing.requestStart,null;if(BOOMR.utils.inArray(l.type,BOOMR.constants.BEACON_TYPE_SPAS)){var h=l.resource.timing.requestStart-i.resource.timing.requestStart;"spa_hard"!==i.type&&c(i.resource,l.resource)&&h<500?(this.pending_events[s]=void 0,this.watch--):(i.resource.timing.loadEventEnd=BOOMR.now(),i.aborted=!0,this.sendEvent(s))}}}if("click"===l.type){if(!d.observer)return null;this.setTimeout(o.xhrIdleTimeout,u)}else if("xhr"===l.type){if(a(o.ignoreXhrs,e.url))return null;l.nodes_to_wait++,l.total_nodes++,l.ignoreMO=!0}else BOOMR.utils.inArray(l.type,BOOMR.constants.BEACON_TYPE_SPAS)&&(d.start(),e.wait?(l.nodes_to_wait++,l.total_nodes++,e.waitComplete=function(){p.load_finished(u),e.waitComplete=void 0}):this.setTimeout(o.spaIdleTimeout,u));return this.watch++,this.pending_events.push(l),e.index=u,u}},d.prototype.sendEvent=function(e){var r=this.pending_events[e],i=this;if(BOOMR.now(),r&&!r.complete)if(this.clearTimeout(e),BOOMR.readyToSend()){if(r.complete=!0,r.resource.complete=!0,this.watch--,BOOMR.utils.inArray(r.type,BOOMR.constants.BEACON_TYPE_SPAS)&&(r.resource.url=n.URL),"spa"===r.type&&0===r.total_nodes&&r.resource.url===i.lastSpaLocation){BOOMR.fireEvent("spa_cancel"),this.pending_events[e]=void 0;return}if("click"===r.type&&(0===r.total_nodes||!r.resource.url)||("click"===r.type&&o.singlePageApp&&o.spaStartFromClick&&(r.type=r.resource.initiator="xhr"),o.xhrRequireChanges&&"xhr"===r.type&&1===r.total_nodes&&(void 0===r.interesting||0===r.interesting)&&!p(r.resource.url,o.alwaysSendXhr))){this.pending_events[e]=void 0;return}if(BOOMR.utils.inArray(r.type,BOOMR.constants.BEACON_TYPE_SPAS)&&(i.lastSpaLocation=r.resource.url,!r.forced)&&("spa"===r.type&&0===r.total_nodes&&(r.resource.timing.loadEventEnd=r.resource.timing.requestStart+1),"spa_hard"===r.type)){var s=BOOMR.getPerformance();s&&s.timing&&s.timing.loadEventEnd&&r.resource.timing.loadEventEnd&&r.resource.timing.loadEventEnd<s.timing.loadEventEnd&&(r.resource.timing.loadEventEnd=s.timing.loadEventEnd)}this.sendResource(r.resource,e)}else setTimeout(function(){i.sendEvent(e)},500)},d.prototype.sendResource=function(r,i){var o=this,s=o.pending_events[i],a=r.timing?r.timing.requestStart:void 0,c=function(e,s){e&&(r.timing.loadEventEnd=s||BOOMR.now()),BOOMR.real_sendBeacon(),r.onComplete&&r.onComplete(r),BOOMR.plugins.ResourceTiming&&BOOMR.plugins.ResourceTiming.is_enabled()&&r.timing&&r.timing.requestStart&&(r.restiming=BOOMR.plugins.ResourceTiming.getCompressedResourceTiming(r.timing.requestStart,r.timing.loadEventEnd)),BOOMR.utils.inArray(r.initiator,BOOMR.constants.BEACON_TYPE_SPAS)&&(o.calculateSpaTimings(r),"number"==typeof i&&o.pending_events[i].aborted&&(BOOMR.addVar("pgu",n.URL,!0),BOOMR.addVar("rt.quit","",!0),BOOMR.addVar("rt.abld","",!0))),BOOMR.responseEnd(r,a,r),"number"==typeof i&&(o.pending_events[i]=void 0)};if("spa_hard"===r.initiator&&(!s||!s.aborted)&&!BOOMR.hasBrowserOnloadFired())return void BOOMR.utils.addListener(e,"load",function(){var e=BOOMR.now();BOOMR.setImmediate(function(){c(!0,e)})});c(!1)},d.prototype.calculateSpaTimings=function(e){var n=BOOMR.getPerformance();if(n&&n.timing){if("spa_hard"===e.initiator)e.timing.responseEnd=n.timing.responseStart,e.timing.fetchStart=n.timing.navigationStart;else{if(!BOOMR.plugins.ResourceTiming||!BOOMR.plugins.ResourceTiming.is_supported())return;var r=BOOMR.plugins.ResourceTiming.getFilteredResourceTiming(e.timing.requestStart,e.timing.loadEventEnd,o.spaBackEndResources).entries,i=Math.round(e.timing.loadEventEnd-e.timing.requestStart);if(!r||!r.length){BOOMR.addVar("noresources",1,!0),e.timers={t_resp:0,t_page:i,t_done:i};return}for(var s=e.timing.loadEventEnd-n.timing.navigationStart,c=0;c<r.length;c++)r[c].responseStart>s?(r[c].responseStart=s,r[c].responseEnd=s):r[c].responseEnd>s&&(r[c].responseEnd=s);var l=Math.round(BOOMR.plugins.ResourceTiming.calculateResourceTimingUnion(r)),u=i-l;if(l<0||i<0||u<0)return void BOOMR.addError("Incorrect SPA time calculation");BOOMR.addVar("t_resp_calc",l,!0),BOOMR.addVar("resourceLength",r.length,!0),e.timers={t_resp:l,t_page:u,t_done:i}}var d=BOOMR.plugins.ResourceTiming.getFilteredResourceTiming(e.timing.requestStart,e.timing.loadEventEnd,["xmlhttprequest","fetch"]).entries,p=BOOMR.plugins.Continuity.getTTIWaitForXHRIngore();d=d.filter(function(e){return!a(p,e.name)});var h=e.timing.requestStart-n.timing.navigationStart,s=d.reduce(function(e,n){return n.responseEnd>e?n.responseEnd:e},h);"spa"===e.initiator&&(BOOMR.addVar("c.tti.xd.increasing",s),s-=h,BOOMR.addVar("spa.calcttixd",1,!0)),BOOMR.addVar("c.tti.xd",s)}},d.prototype.setTimeout=function(e,n){var r=this;e&&(this.clearTimeout(n),this.timer=setTimeout(function(){r.timedout(n)},e))},d.prototype.timedout=function(e){var n;if(this.clearTimeout(e),n=this.pending_events[e]){if(BOOMR.utils.inArray(n.type,BOOMR.constants.BEACON_TYPE_SPAS)&&!BOOMR.hasBrowserOnloadFired())return void this.setTimeout(o.spaIdleTimeout,e);0===n.nodes_to_wait&&this.sendEvent(e)}},d.prototype.clearTimeout=function(e){this.timer&&e===this.pending_events.length-1&&(clearTimeout(this.timer),this.timer=null)},d.prototype.load_cb=function(e,n){var r,i,o=BOOMR.now();(r=e.target||e.srcElement)&&r._bmr&&(i=r._bmr.idx,n=void 0!==n?n:r._bmr.res||0,r._bmr.end[n]||(r._bmr.end[n]=o,this.load_finished(i,o)))},d.prototype.monitorMO=function(e){var n=this.pending_events[e];n&&delete n.ignoreMO},d.prototype.load_finished=function(e,n){var i=this.pending_events[e];if(i){if(i.nodes_to_wait--,0===i.nodes_to_wait)this.checkTimer&&clearTimeout(this.checkTimer),this.checkTimer=null,i.resource.timing.loadEventEnd=n||BOOMR.now(),e===this.pending_events.length-1?BOOMR.utils.inArray(i.type,BOOMR.constants.BEACON_TYPE_SPAS)?(!i.firedEarlyBeacon&&BOOMR.plugins.Early&&BOOMR.plugins.Early.is_supported()&&(this.timerEarlyBeacon&&(clearTimeout(this.timerEarlyBeacon),this.timerEarlyBeacon=null),this.timerEarlyBeacon=setTimeout(function(){r.timerEarlyBeacon=null,i.firedEarlyBeacon||0!==i.nodes_to_wait||(i.firedEarlyBeacon=!0,BOOMR.plugins.Early.sendEarlyBeacon(i.resource,i.type))},100)),this.setTimeout(o.spaIdleTimeout,e)):this.setTimeout(o.xhrIdleTimeout,e):this.sendEvent(e);else if(!this.checkTimer&&BOOMR.utils.inArray(i.type,BOOMR.constants.BEACON_TYPE_SPAS)){var s=this;this.checkTimer=setTimeout(function(){0!==i.nodes_to_wait&&i.resources.forEach(function(r){var i=r._bmr,o=i.res||0;try{!i.end[o]&&("LINK"===i.type&&r.sheet||("IMG"===i.type||"IMAGE"===i.type)&&r.complete)&&(i.end[o]=n,s.load_finished(e,n))}catch(e){}}),s.checkTimer=null},500)}}},d.prototype.wait_for_node=function(e,n){var r,s,a,c,l,u,d,p,h,f=this,m=!1,g=!1;if(e&&e.nodeName&&(!o.ignoreImage&&e.nodeName.toUpperCase().match(/^(IMG|IMAGE)$/)||e.nodeName.toUpperCase().match(/^IFRAME$/)||"LINK"===e.nodeName.toUpperCase()&&e.rel&&e.rel.match(/\bstylesheet\b/i))){if(e._bmr&&"number"==typeof e._bmr.res&&e._bmr.end[e._bmr.res]&&(g=!0),l=e.src||"function"==typeof e.getAttribute&&(e.getAttribute("xlink:href")||e.getAttribute("href"))||e.href,e._bmr&&e._bmr.url!==l&&(g=!0),g&&"function"==typeof e._bmr.listener&&(f.load_cb({target:e,type:"changed"}),e.removeEventListener("load",e._bmr.listener),e.removeEventListener("error",e._bmr.listener),delete e._bmr.listener),!l||l.match(/^(about:|javascript:|data:)/i))return!1;if("IMG"===e.nodeName){if(e.naturalWidth&&!g)return!1;else if("function"==typeof e.getAttribute&&""===e.getAttribute("src"))return!1;else if("lazy"===e.loading)return!1}if("IFRAME"===e.nodeName&&g||("function"==typeof e.getAttribute&&(d=parseInt(e.getAttribute("height"),10),p=parseInt(e.getAttribute("width"),10)),isNaN(d)&&(d=e.style&&("0"===e.style.height||"0px"===e.style.height||"1px"===e.style.height)?0:void 0),isNaN(p)&&(p=e.style&&("0"===e.style.width||"0px"===e.style.width||"1px"===e.style.width)?0:void 0),!isNaN(d)&&d<=1&&!isNaN(p)&&p<=1||0===d||0===p||e.style&&("none"===e.style.display||"hidden"===e.style.visibility||"0"===e.style.opacity)||o.domExcludeFilter(e)||!(r=this.pending_events[n]))||(u=r.resources.length,r.urls||(r.urls={}),r.urls[l]))return!1;if(!r.resource.url){if(i.href=l,o.xhrExcludeFilter(i))return!1;r.resource.url=i.href}e._bmr||(e._bmr={end:{},type:e.nodeName.toUpperCase()}),e._bmr.res=u,e._bmr.idx=n,delete e._bmr.end[u],e._bmr.url=l,h=function(n){f.load_cb(n,u),e.removeEventListener("load",h),e.removeEventListener("error",h),delete e._bmr.listener},e._bmr.listener=h,e.addEventListener("load",h),e.addEventListener("error",h),r.nodes_to_wait++,this.clearTimeout(n),r.total_nodes++,r.resources.push(e),r.urls[l]=1,m=!0}else e.nodeType===Node.ELEMENT_NODE&&["IMAGE","IMG"].forEach(function(r){if((s=e.getElementsByTagName(r))&&s.length)for(a=0,c=s.length;a<c;a++)m|=this.wait_for_node(s[a],n)},this);return m},d.prototype.add_event_resource=function(e){var n,r=this.pending_events.length-1;return!(r<0)&&(n=this.pending_events[r])&&e?(n.xhr_resources.push(e.url),n.nodes_to_wait++,n.total_nodes++,e.index=r,e.node=!0,r):-1},d.prototype.mutation_cb=function(e){var n,r,i;return!this.watch||(n=this,(r=this.pending_events.length-1)<0||!this.pending_events[r]||!!(i=this.pending_events[r]).ignoreMO||(void 0===i.interesting&&(i.interesting=!1),e&&e.length&&(i.resource.timing.domComplete=BOOMR.now(),e.forEach(function(e){var o,s,a;if("attributes"===e.type)i.interesting|=n.wait_for_node(e.target,r);else if("childList"===e.type){for(o=0,s=e.addedNodes.length;o<s;o++)i.interesting|=n.wait_for_node(e.addedNodes[o],r);for(o=0,s=e.removedNodes.length;o<s;o++)"IFRAME"===(a=e.removedNodes[o]).nodeName&&a._bmr&&n.load_cb({target:a,type:"removed"})}})),i.interesting||i.timeoutExtended||(this.setTimeout(1e3,r),i.timeoutExtended=!0),!0))},d.prototype.queue_is_empty=function(){return 0===this.nodesWaitingFor()},d.prototype.nodesWaitingFor=function(e){var n;return 0===this.pending_events.length?0:(void 0===e&&(e=this.pending_events.length-1),n=this.pending_events[e])?n.nodes_to_wait:0},d.prototype.completeEvent=function(e){var n,r=BOOMR.now();0!==this.pending_events.length&&(void 0===e&&(e=this.pending_events.length-1),(n=this.pending_events[e])&&(n.resource.timing.loadEventEnd=r,n.forced=!0,this.sendEvent(e)))},r=new d,o={spaBackEndResources:["xmlhttprequest","script","fetch"],alwaysSendXhr:!1,xhrExcludeFilters:[],domExcludeFilters:[],initialized:!1,captureXhrRequestResponse:!1,singlePageApp:!1,spaStartFromClick:!1,autoXhrEnabled:!1,monitorFetch:!1,fetchBodyUsedWait:200,spaIdleTimeout:1e3,xhrIdleTimeout:50,xhrRequireChanges:!1,ignoreImage:!1,xhrExcludeFilter:function(e){var n,r;if(!e||!e.href)return!1;for(n=0;n<o.xhrExcludeFilters.length;n++)if("function"==typeof o.xhrExcludeFilters[n].cb){r=o.xhrExcludeFilters[n].ctx;try{if(o.xhrExcludeFilters[n].cb.call(r,e))return!0}catch(e){BOOMR.addError(e,"BOOMR.plugins.AutoXHR.impl.xhrExcludeFilter()")}}return!1},domExcludeFilter:function(e){var n,r;for(n=0;n<o.domExcludeFilters.length;n++)if("function"==typeof o.domExcludeFilters[n].cb){r=o.domExcludeFilters[n].ctx,o.domExcludeFilters[n].name;try{if(o.domExcludeFilters[n].cb.call(r,e))return!0}catch(e){BOOMR.addError(e,"BOOMR.plugins.AutoXHR.impl.domExcludeFilter()")}}return!1},loadFinished:function(e,n){var i,s,a,c,l;n=n||BOOMR.now(),!e.timing.loadEventEnd&&(e.status&&BOOMR.fireEvent("xhr_error",e),e.timing.loadEventEnd=n,(l=BOOMR.getPerformance())&&l.timing&&(s=l.timing.navigationStart,(i=BOOMR.getResourceTiming(e.url,function(e,n){return e.responseEnd-n.responseEnd},function(n){return Math.ceil(s+n.startTime+2)>=e.timing.requestStart&&0!==n.responseEnd}))&&(a=Math.floor(s+i.startTime),(c=Math.floor(s+i.responseEnd))<=BOOMR.now()&&(e.timing.responseEnd=c,e.timing.loadEventEnd<c&&(e.timing.loadEventEnd=c),e.fromClick&&e.timing.requestStart||(e.timing.requestStart=a),e.timing.fetchStart=a,0!==i.responseStart&&(e.timing.responseStart=Math.floor(s+i.responseStart)),e.restiming=i))),e.node&&p(e.url,o.alwaysSendXhr)&&r.sendResource(e),e.index>=0&&(r.monitorMO(e.index),r.load_finished(e.index,e.timing.responseEnd)))}},BOOMR.plugins.AutoXHR={is_complete:function(){return!0},init:function(r){var s,a;if(n=e.document,e&&n){if(i=n.createElement("A"),BOOMR.utils.pluginConfig(o,r,"AutoXHR",["spaBackEndResources","alwaysSendXhr","monitorFetch","fetchBodyUsedWait","spaIdleTimeout","xhrIdleTimeout","xhrRequireChanges","spaStartFromClick"]),BOOMR.instrumentXHR=m,BOOMR.uninstrumentXHR=g,BOOMR.instrumentFetch=h,BOOMR.uninstrumentFetch=f,o.initialized||(this.addExcludeFilter(u,null,"shouldExcludeXhr"),o.initialized=!0),r&&r.AutoXHR&&r.AutoXHR.excludeFilters&&r.AutoXHR.excludeFilters.length>0)for(a=0;a<r.AutoXHR.excludeFilters.length;a++)"function"==typeof r.AutoXHR.excludeFilters[a]?o.xhrExcludeFilters.push({cb:r.AutoXHR.excludeFilters[a],ctx:this,name:"unknown XHR filter"}):o.xhrExcludeFilters.push(r.AutoXHR.excludeFilters[a]);if(r&&r.AutoXHR&&r.AutoXHR.domExcludeFilters&&r.AutoXHR.domExcludeFilters.length>0)for(a=0;a<r.AutoXHR.domExcludeFilters.length;a++)"function"==typeof r.AutoXHR.domExcludeFilters[a]?o.domExcludeFilters.push({cb:r.AutoXHR.domExcludeFilters[a],ctx:this,name:"unknown DOM filter"}):o.domExcludeFilters.push(r.AutoXHR.domExcludeFilters[a]);if(o.ignoreXhrs=r.ignoreXhrs,o.ignoreImage=r.ignoreImage,o.autoXhrEnabled=r.instrument_xhr,o.monitorFetch=r.monitor_fetch,o.singlePageApp=BOOMR.plugins.SPA&&BOOMR.plugins.SPA.isSinglePageApp(r),o.alwaysSendXhr&&o.autoXhrEnabled&&BOOMR.xhr&&"function"==typeof BOOMR.xhr.stop){function c(e){if(e.length)for(s=0;s<e.length;s++)v(e[s]);else v(e)}var l=BOOMR.xhr.stop(c);l&&l.length&&BOOMR.setImmediate(c,l)}o.singlePageApp?(o.alwaysSendXhr||(o.autoXhrEnabled=!1),o.autoXhrEnabled&&(BOOMR.instrumentXHR(),BOOMR.instrumentFetch())):o.autoXhrEnabled?(BOOMR.instrumentXHR(),BOOMR.instrumentFetch()):!1===o.autoXhrEnabled&&(BOOMR.uninstrumentXHR(),BOOMR.uninstrumentFetch()),BOOMR.registerEvent("xhr_error")}},getMutationHandler:function(){return r},getPathname:l,enableAutoXhr:function(){o.autoXhrEnabled||(BOOMR.instrumentXHR(),BOOMR.instrumentFetch()),o.autoXhrEnabled=!0},addExcludeFilter:function(e,n,r){o.xhrExcludeFilters.push({cb:e,ctx:n,name:r})},addDomExcludeFilter:function(e,n,r){o.domExcludeFilters.push({cb:e,ctx:n,name:r})},setXhrRequestResponseCapturing:function(e){o.captureXhrRequestResponse=e},matchesAlwaysSendXhr:p})}(),!function(){var e,n=!1,r=!1,i=!1,o=!1,s=!1,a=!0,l=!1,u=!1,d=[],p=!1;if(!BOOMR.plugins.SPA&&BOOMR.plugins.AutoXHR){var h={spaHardMissedOnComplete:function(e){var n,r,i=BOOMR.plugins.RT&&BOOMR.plugins.RT.navigationStart(),o=BOOMR.plugins.AutoXHR.getMutationHandler();p=!1,BOOMR.addVar("spa.missed","1",!0),BOOMR.plugins.RT&&BOOMR.plugins.RT.clearTimer("t_done"),e.timing.requestStart=i,(!(n=o.pending_events[e.index])||0===n.total_nodes)&&(r=BOOMR.getPerformance())&&r.timing&&r.timing.navigationStart&&r.timing.loadEventEnd&&void 0===e.timing.loadEventEnd&&(e.timing.loadEventEnd=r.timing.loadEventEnd)},pageReady:function(){o=!0}};BOOMR.plugins.SPA={is_complete:function(e){return!p||e&&("error"===e["http.initiator"]||void 0!==e.early)},get_ready:function(){return i},init:function(e){e&&e.instrument_xhr&&(s=e.instrument_xhr,i&&s&&BOOMR.plugins.AutoXHR.enableAutoXhr()),r||(r=!0,BOOMR.subscribe("page_ready",h.pageReady,null,h))},register:function(e){d.push(e)},supported_frameworks:function(){return d},onLoadSpaHardMissed:function(){i||(o=!0,s&&BOOMR.plugins.AutoXHR.enableAutoXhr(),p=!0,u?p=!1:BOOMR.plugins.SPA.route_change(h.spaHardMissedOnComplete))},hook:function(e,r){return"function"==typeof(r=r||{}).routeFilter&&(l=r.routeFilter),"function"==typeof r.routeChangeWaitFilter&&r.routeChangeWaitFilter,"boolean"==typeof r.routeChangeWaitFilterHardNavs&&r.routeChangeWaitFilterHardNavs,r.disableHardNav&&(u=r.disableHardNav),n||(e&&BOOMR.attach_page_ready(this.onLoadSpaHardMissed),n=!0),this},route_change:function(n,r){BOOMR.fireEvent("route_change");var d=!1,p=a&&!u?"spa_hard":"spa",h=BOOMR.plugins.RT&&BOOMR.plugins.RT.navigationStart(),f=o?BOOMR.now():h,m=BOOMR.window.document.URL,g={timing:{requestStart:f},initiator:p,url:m};if("spa"===p&&e&&!e.complete)try{if(!c(e,g))return}catch(e){BOOMR.addError(e,"SPA.route_change.routeChangeWaitFilter")}if("spa"===p&&l)try{if(!l.apply(null,r))return}catch(e){BOOMR.addError(e,"SPA.route_change.routeFilter")}i=!0,BOOMR.fireEvent("spa_init",[BOOMR.plugins.SPA.current_spa_nav(),m]),a=!1,o&&"function"!=typeof n||(o=!0,g.onComplete=function(e){d||(d=!0,BOOMR.fireEvent("spa_navigation")),"function"==typeof n&&n(e)}),e=g,g.index=BOOMR.plugins.AutoXHR.getMutationHandler().addEvent(g),s&&BOOMR.plugins.AutoXHR.enableAutoXhr()},last_location:function(e){lastLocationChange=e},current_spa_nav:function(){return o?"spa":"spa_hard"},wait_complete:function(){e&&(e.wait=!1,e.waitComplete&&e.waitComplete(),e=null)},markNavigationComplete:function(){var n,r,i=BOOMR.plugins.AutoXHR.getMutationHandler();if(e&&e.wait&&BOOMR.plugins.SPA.wait_complete(),i&&i.pending_events.length>0){for(n=i.pending_events.length-1;n>=0;n--)if((r=i.pending_events[n])&&BOOMR.utils.inArray(r.type,BOOMR.constants.BEACON_TYPE_SPAS)){if(r.complete)break;i.nodesWaitingFor(n),BOOMR.addVar("spa.forced","1",!0),BOOMR.addVar("spa.waiting",i.nodesWaitingFor(),!0),i.completeEvent(n);return}}},isSpaNavInProgress:function(){var e,n,r=BOOMR.plugins.AutoXHR.getMutationHandler();if(r&&r.pending_events.length>0){for(e=r.pending_events.length-1;e>=0;e--)if((n=r.pending_events[e])&&BOOMR.utils.inArray(n.type,BOOMR.constants.BEACON_TYPE_SPAS))return!n.complete}return!1},isSinglePageApp:function(e){for(var n=!1,r=this.supported_frameworks(),i=0;i<r.length;i++){var o=r[i];if(e[o]&&e[o].enabled){n=!0;break}}return n}},BOOMR.plugins.SPA.waitComplete=BOOMR.plugins.SPA.wait_complete}}(),e={auto:!1,enabled:!0,hooked:!1,routeHooked:!1,hadMissedRouteChange:!1,routeChangeInProgress:!1,disableHardNav:!1,routeFilter:void 0,routeChangeWaitFilter:void 0,monitorReplaceState:!0,a:void 0,originHistoryPushState:null,originHistoryReplaceState:null,originHistoryGo:null,originHistoryBack:null,originHistoryForward:null,resetRouteChangeInProgress:function(){e.routeChangeInProgress&&clearTimeout(e.routeChangeInProgress),e.routeChangeInProgress=!1},setRouteChangeInProgress:function(){e.routeChangeInProgress&&clearTimeout(e.routeChangeInProgress),e.routeChangeInProgress=setTimeout(e.resetRouteChangeInProgress,50)},spaInit:function(e,n){n?BOOMR.fireEvent("spa_init",[BOOMR.plugins.SPA.current_spa_nav(),n]):e?BOOMR.fireEvent("spa_init",[BOOMR.plugins.SPA.current_spa_nav(),e]):BOOMR.fireEvent("spa_init",[BOOMR.plugins.SPA.current_spa_nav(),BOOMR.window.document.URL])},routeChange:function(n,r){e.enabled?(!e.disableHardNav||BOOMR.onloadFired())&&(e.routeChangeInProgress||(e.spaInit(n,r),BOOMR.plugins.SPA.route_change())):(e.hadMissedRouteChange=!0,e.resetRouteChangeInProgress())}},!BOOMR.plugins.History&&void 0!==BOOMR.plugins.SPA&&void 0!==BOOMR.plugins.AutoXHR&&BOOMR.window&&BOOMR.window.history&&(BOOMR.plugins.SPA.register("History"),e.a=BOOMR.window.document.createElement("A"),BOOMR.plugins.History={is_complete:function(){return!0},hook:function(n,r,i){return(i=i||{}).disableHardNav=e.disableHardNav,e.hooked||(e.routeFilter&&(i.routeFilter=e.routeFilter),e.routeChangeWaitFilter&&(i.routeChangeWaitFilter=e.routeChangeWaitFilter),function(){var n,r,i,o,s,a=BOOMR.window.history;function c(){BOOMR.window.addEventListener("popstate",function(n){e.routeChange()})}return"function"==typeof a.pushState&&(e.originHistoryPushState=a.pushState,n=a.pushState,a.pushState=function(r,i,o){return e.routeChange(i,o),n.apply(this,arguments)}),e.monitorReplaceState&&"function"==typeof a.replaceState&&(e.originHistoryReplaceState=a.pushState,r=a.replaceState,a.replaceState=function(n,i,o){if("undefined"!=typeof BOOMR){var s=BOOMR.window.document.URL,a=s;return arguments.length>=3&&null!=o&&(e.a.href=o,a=e.a.href),BOOMR.plugins.SPA.isSpaNavInProgress()&&a===s||e.routeChange(i,o),r.apply(this,arguments)}}),"function"==typeof a.go&&(e.originHistoryGo=a.go,i=a.go,a.go=function(n){return e.routeChange(),i.apply(this,arguments)}),"function"==typeof a.back&&(e.originHistoryBack=a.back,o=a.back,a.back=function(){return e.routeChange(),o.apply(this,arguments)}),"function"==typeof a.forward&&(e.originHistoryForward=a.forward,s=a.forward,a.forward=function(){return e.routeChange(),s.apply(this,arguments)}),BOOMR.window.addEventListener("hashchange",function(n){var r=(n||{}).newURL;e.routeChange(null,r)}),BOOMR.hasBrowserOnloadFired()?c():BOOMR.window.addEventListener("load",function(){setTimeout(c,0)}),BOOMR.subscribe("beacon",e.resetRouteChangeInProgress),BOOMR.subscribe("spa_cancel",e.resetRouteChangeInProgress),BOOMR.subscribe("spa_init",e.setRouteChangeInProgress),!0}()&&(BOOMR.plugins.SPA.hook(r,i),e.hooked=!0)),this},init:function(n){return BOOMR.utils.pluginConfig(e,n,"History",["auto","enabled","disableHardNav","routeFilter","routeChangeWaitFilter","monitorReplaceState"]),e.auto&&e.enabled&&this.hook(void 0,!0,{}),this},disable:function(){return history.pushState=e.originHistoryPushState,history.replaceState=e.originHistoryReplaceState,history.go=e.originHistoryGo,history.back=e.originHistoryBack,history.forward=e.originHistoryForward,e.enabled=!1,this},enable:function(){return e.enabled=!0,e.hooked&&e.hadMissedRouteChange&&(e.hadMissedRouteChange=!1,BOOMR.plugins.SPA.route_change(),e.setRouteChangeInProgress()),this}}),n=window,BOOMR.plugins.RT||(i={onloadfired:!1,unloadfired:!1,visiblefired:!1,initialized:!1,complete:!1,autorun:!0,timers:{},cookie:"RT",cookie_exp:604800,session_exp:1800,strict_referrer:!0,navigationType:0,navigationStart:void 0,responseStart:void 0,loadTime:0,oboError:0,t_start:void 0,cached_t_start:void 0,cached_xhr_start:void 0,t_fb_approx:void 0,r:void 0,beacon_url:void 0,next_beacon_url:void 0,basic_timers:{t_done:1,t_resp:1,t_page:1},crossdomain_sending:!1,navigationStartSource:"",updateCookie:function(e,n){var r,o,s,a;if(!this.cookie)return!1;for(a in s=BOOMR.utils.getSubCookies(BOOMR.utils.getCookie(this.cookie))||{})s.hasOwnProperty(a)&&!isNaN(parseInt(a,10))&&delete s[a];if("object"==typeof e)for(a in e)e.hasOwnProperty(a)&&(void 0===e[a]?s.hasOwnProperty(a)&&delete s[a]:s[a]=e[a]);return(s.z=1,s.dm=BOOMR.session.domain,s.si=BOOMR.session.ID,s.ss=BOOMR.session.start.toString(36),s.sl=BOOMR.session.length.toString(36),1800!==i.session_exp&&(s.se=i.session_exp.toString(36)),BOOMR.session.rate_limited&&(s.rl=1),s.tt=this.loadTime.toString(36),this.oboError>0?s.obo=this.oboError.toString(36):delete s.obo,o=BOOMR.now(),n&&(s[n]=(o-BOOMR.session.start).toString(36),i.lastActionTime=o),this.beacon_url&&(s.bcn=this.beacon_url),BOOMR.utils.setCookie(this.cookie,s,this.cookie_exp))?((r=BOOMR.now())-o>50&&(BOOMR.utils.removeCookie(this.cookie),BOOMR.error("took more than 50ms to set cookie... aborting: "+o+" -> "+r,"rt")),!0):(BOOMR.error("cannot set start cookie","rt"),!1)},refreshSession:function(e){e||(e=BOOMR.plugins.RT.getCookie()),e&&(e.ss?BOOMR.session.start=e.ss:BOOMR.session.start=BOOMR.plugins.RT.navigationStart()||BOOMR.t_lstart||BOOMR.t_start,e.si&&e.si.match(/-/)&&(BOOMR.session.ID=e.si),e.sl&&(BOOMR.session.length=e.sl),e.tt&&(this.loadTime=e.tt),e.obo&&(this.oboError=e.obo),e.dm&&!BOOMR.session.domain&&(BOOMR.session.domain=e.dm),e.se&&(i.session_exp=e.se),e.bcn&&(this.beacon_url=e.bcn),e.rl&&"1"===e.rl&&(BOOMR.session.rate_limited=!0))},maybeResetSession:function(e,n){var r=0;BOOMR.session.start&&BOOMR.session.length&&(r=(BOOMR.now()-BOOMR.session.start)/BOOMR.session.length);var o=1e3*i.session_exp;(!BOOMR.session.start||n&&BOOMR.session.start>n||e-(i.lastActionTime||BOOMR.t_start)>o||r>o)&&(BOOMR.session.start=n||BOOMR.plugins.RT.navigationStart()||BOOMR.t_lstart||BOOMR.t_start,BOOMR.session.length=0,BOOMR.session.rate_limited=!1,i.loadTime=0,i.oboError=0,i.beacon_url=i.next_beacon_url,i.lastActionTime=e,i.updateCookie({rl:void 0,sl:BOOMR.session.length,ss:BOOMR.session.start,tt:i.loadTime,obo:void 0,bcn:i.beacon_url}))},initFromCookie:function(){var e,n,i;i=BOOMR.plugins.RT.getCookie(),this.cookie||(BOOMR.session.enabled=!1),i&&(i.s=Math.max(+i.ld||0,Math.max(+i.ul||0,+i.cl||0)),i.s&&(i.r||i.nu)&&(this.r=i.r,e=BOOMR.utils.hashString(r.URL),n=BOOMR.utils.hashString(r&&r.referrer||""),i.cl,i.nu,!this.strict_referrer||i.cl&&i.nu&&i.nu===e&&i.s<+i.cl+15||i.s===+i.ul&&this.r===n?(this.t_start=i.s,+i.hd>i.s&&(this.t_fb_approx=i.hd)):this.t_start=this.t_fb_approx=void 0),i.s&&(this.lastActionTime=i.s),this.refreshSession(i),this.updateCookie({s:void 0,ul:void 0,cl:void 0,hd:void 0,ld:void 0,rl:void 0,r:void 0,nu:void 0,sh:void 0}),this.maybeResetSession(BOOMR.now()))},incrementSessionDetails:function(){BOOMR.session.length++,!i.timers.t_done||isNaN(i.timers.t_done.delta)?i.oboError++:i.loadTime+=i.timers.t_done.delta},getBoomerangTimings:function(){var e,n,r,i,o;function s(e,n){var r=Math.round(e||0),i=Math.round(n||0);return(r=0===r?0:r-i)||""}BOOMR.t_start&&(BOOMR.plugins.RT.startTimer("boomerang",BOOMR.t_start),BOOMR.plugins.RT.endTimer("boomerang",BOOMR.t_end),BOOMR.plugins.RT.endTimer("boomr_fb",BOOMR.t_start),BOOMR.t_lstart&&(BOOMR.plugins.RT.endTimer("boomr_ld",BOOMR.t_lstart),BOOMR.plugins.RT.setTimer("boomr_lat",BOOMR.t_start-BOOMR.t_lstart)));try{if(window&&"performance"in window&&window.performance&&"function"==typeof window.performance.getEntriesByName){for(r in n={"rt.bmr":BOOMR.url},BOOMR.config_url&&(n["rt.cnf"]=BOOMR.config_url),n)if(n.hasOwnProperty(r)&&n[r]){if(!(e=window.performance.getEntriesByName(n[r]))||0===e.length||!e[0])continue;e=e[0],o=[i=s(e.startTime,0),s(e.responseEnd,i),s(e.responseStart,i),s(e.requestStart,i),s(e.connectEnd,i),s(e.secureConnectionStart,i),s(e.connectStart,i),s(e.domainLookupEnd,i),s(e.domainLookupStart,i),s(e.redirectEnd,i),s(e.redirectStart,i)].join(",").replace(/,+$/,""),BOOMR.addVar(r,o,!0)}}}catch(e){e&&e.name&&e.name.hasOwnProperty("length")&&-1===e.name.indexOf("NS_ERROR_FAILURE")&&BOOMR.addError(e,"rt.getBoomerangTimings")}},checkPreRender:function(){return"prerender"===BOOMR.visibilityState()&&(BOOMR.plugins.RT.startTimer("t_load",this.navigationStart),BOOMR.plugins.RT.endTimer("t_load"),BOOMR.plugins.RT.startTimer("t_prerender",this.navigationStart),BOOMR.plugins.RT.startTimer("t_postrender"),!0)},initFromNavTiming:function(){var e,r;!this.navigationStart&&((r=BOOMR.getPerformance())&&r.navigation&&(this.navigationType=r.navigation.type),r&&r.timing?(e=r.timing,this.navigationStartSource="navigation"):n.chrome&&n.chrome.csi&&n.chrome.csi().startE?(e={navigationStart:n.chrome.csi().startE},this.navigationStartSource="csi"):n.gtbExternal&&n.gtbExternal.startE()&&(e={navigationStart:n.gtbExternal.startE()},this.navigationStartSource="gtb"),e&&(this.navigationStart=e.navigationStart||e.fetchStart||void 0,this.fetchStart=e.fetchStart||void 0,this.responseStart=e.responseStart||void 0,navigator.userAgent.match(/Firefox\/[78]\./)&&(this.navigationStart=e.unloadEventStart||e.fetchStart||void 0)))},validateLoadTimestamp:function(e,n,r){var i;return n&&n.timing&&n.timing.loadEventEnd?n.timing.loadEventEnd:"xhr"!==r||n&&BOOMR.utils.inArray(n.initiator,BOOMR.constants.BEACON_TYPE_SPAS)?(i=BOOMR.getPerformance())&&i.timing?i.timing.loadEventEnd?i.timing.loadEventEnd:e:BOOMR.t_onload||BOOMR.t_lstart||BOOMR.t_start||e:e},setPageLoadTimers:function(e,n,r){var o,s;if("xhr"!==e&&!("early"===e&&r&&BOOMR.utils.inArray(r.initiator,BOOMR.constants.BEACON_TYPE_SPAS))&&(i.initFromCookie(),i.initFromNavTiming(),BOOMR.addVar("rt.start",this.navigationStartSource),i.checkPreRender()))return!1;if("xhr"===e)if(r.timers)for(var a in r.timers)r.timers.hasOwnProperty(a)&&BOOMR.plugins.RT.setTimer(a,r.timers[a]);else r&&r.timing&&(void 0===(s=r.timing.fetchStart)||r.timing.responseEnd>=s)&&(o=r.timing.responseEnd);else i.responseStart?i.responseStart>=i.navigationStart&&i.responseStart>=i.fetchStart&&(o=i.responseStart):i.timers.hasOwnProperty("t_page")?BOOMR.plugins.RT.endTimer("t_page"):i.t_fb_approx&&(o=i.t_fb_approx);return o&&"early"!==e&&(s?BOOMR.plugins.RT.setTimer("t_resp",s,o):BOOMR.plugins.RT.endTimer("t_resp",o),"load"===e&&i.timers.t_load?BOOMR.plugins.RT.setTimer("t_page",i.timers.t_load.end-o):n<o?BOOMR.addVar("t_page.inv",1,!0):n-o==0&&r&&r.timing&&r.timing.requestStart&&i.timers.t_resp&&i.timers.t_resp.delta?BOOMR.plugins.RT.setTimer("t_page",n-r.timing.requestStart-i.timers.t_resp.delta):BOOMR.plugins.RT.setTimer("t_page",n-o)),"load"===e&&i.timers.hasOwnProperty("t_postrender")&&(BOOMR.plugins.RT.endTimer("t_postrender"),BOOMR.plugins.RT.endTimer("t_prerender")),!0},setSupportingTimestamps:function(e,n){e&&BOOMR.addVar("rt.tstart",e,!0),"number"==typeof i.navigationStart&&i.navigationStart!==e&&BOOMR.addVar("rt.nstart",i.navigationStart,!0),"number"==typeof i.t_start&&i.t_start!==e&&BOOMR.addVar("rt.cstart",i.t_start,!0),BOOMR.addVar("rt.bstart",BOOMR.t_start,!0),BOOMR.t_lstart&&BOOMR.addVar("rt.blstart",BOOMR.t_lstart,!0),"early"===n?BOOMR.addVar("rt.end",e||BOOMR.now(),!0):i.timers.t_done&&BOOMR.addVar("rt.end",i.timers.t_done.end,!0)},determineTStart:function(e,n){var r;return"xhr"===e||"early"===e&&n&&"spa"===n.initiator?(n&&n.name&&i.timers[n.name]?r=i.timers[n.name].start:n&&n.timing&&n.timing.requestStart&&(r=n.timing.requestStart),void 0===r&&n&&BOOMR.utils.inArray(n.initiator,BOOMR.constants.BEACON_TYPE_SPAS)?BOOMR.addVar("rt.start","none"):BOOMR.addVar("rt.start","manual"),i.cached_xhr_start=r):(i.navigationStart?r=i.navigationStart:i.t_start&&2!==i.navigationType?(r=i.t_start,BOOMR.addVar("rt.start","cookie")):i.cached_t_start?r=i.cached_t_start:(BOOMR.addVar("rt.start","none"),r=void 0),i.cached_t_start=r),r},page_ready:function(){this.onloadfired=!0},check_visibility:function(){"visible"===BOOMR.visibilityState()&&(i.visiblefired=!0)},prerenderToVisible:function(){i.onloadfired&&i.autorun&&(BOOMR.addVar("vis.pre","1",!0),BOOMR.plugins.RT.done(null,"visible"))},page_unload:function(e){this.unloadfired||BOOMR.plugins.RT.done(e,"unload"),this.updateCookie(!i.navigationStart&&i.strict_referrer?{r:BOOMR.utils.hashString(r.URL)}:null,"beforeunload"===e.type?"ul":"hd"),this.unloadfired=!0},_iterable_click:function(e,n,r,i){var o;if(r){for(;r&&r.nodeName&&r.nodeName.toUpperCase()!==n;)r=r.parentNode;r&&r.nodeName&&r.nodeName.toUpperCase()===n&&(this.refreshSession(),this.maybeResetSession(BOOMR.now()),o=i(r),this.updateCookie({nu:BOOMR.utils.hashString(o)},"cl"),BOOMR.addVar("nu",BOOMR.utils.cleanupURL(o),!0))}},onclick:function(e){i._iterable_click("Click","A",e,function(e){return e.href})},markComplete:function(){this.onloadfired&&(i.complete=!0)},onsubmit:function(e){i._iterable_click("Submit","FORM",e,function(e){var n="function"==typeof e.getAttribute&&e.getAttribute("action")||r.URL||"";return n.match(/\?/)?n:n+"?"})},onconfig:function(e){e.beacon_url&&(i.beacon_url=e.beacon_url),e.RT&&(e.RT.oboError&&!isNaN(e.RT.oboError)&&e.RT.oboError>i.oboError&&(i.oboError=e.RT.oboError),e.RT.loadTime&&!isNaN(e.RT.loadTime)&&e.RT.loadTime>i.loadTime&&(i.loadTime=e.RT.loadTime,i.timers.t_done&&!isNaN(i.timers.t_done.delta)&&(i.loadTime+=i.timers.t_done.delta)))},domloaded:function(){BOOMR.plugins.RT&&BOOMR.plugins.RT.endTimer("t_domloaded")},clear:function(e){e&&void 0!==e.early||BOOMR.removeVar("rt.start")},spaNavigation:function(){i.onloadfired=!0}},BOOMR.plugins.RT={init:function(e){if(n!==BOOMR.window&&(n=BOOMR.window),e&&e.CrossDomain&&e.CrossDomain.sending&&(i.crossdomain_sending=!0),n&&n.document)return r=n.document,BOOMR.utils.pluginConfig(i,e,"RT",["cookie","cookie_exp","session_exp","strict_referrer"]),e&&void 0!==e.autorun&&(i.autorun=e.autorun),e&&e.beacon_url&&((!i.beacon_url||e.force_beacon_url)&&(i.beacon_url=e.beacon_url),i.next_beacon_url=e.beacon_url),void 0!==r&&(i.r=BOOMR.utils.hashQueryString(r.referrer,!0)),i.initFromCookie(),i.initialized||(i.complete=!1,i.timers={},i.check_visibility(),BOOMR.subscribe("page_ready",i.page_ready,null,i),BOOMR.subscribe("visibility_changed",i.check_visibility,null,i),BOOMR.subscribe("prerender_to_visible",i.prerenderToVisible,null,i),BOOMR.subscribe("page_ready",this.done,"load",this),BOOMR.subscribe("xhr_load",this.done,"xhr",this),BOOMR.subscribe("before_early_beacon",this.done,"early",this),BOOMR.subscribe("dom_loaded",i.domloaded,null,i),BOOMR.subscribe("page_unload",i.page_unload,null,i),BOOMR.subscribe("click",i.onclick,null,i),BOOMR.subscribe("form_submit",i.onsubmit,null,i),BOOMR.subscribe("before_beacon",this.addTimersToBeacon,"beacon",this),BOOMR.subscribe("beacon",i.clear,null,i),BOOMR.subscribe("error",i.markComplete,null,i),BOOMR.subscribe("config",i.onconfig,null,i),BOOMR.subscribe("spa_navigation",i.spaNavigation,null,i),BOOMR.subscribe("interaction",i.markComplete,null,i),BOOMR.getBeaconURL=function(){return i.beacon_url},i.initialized=!0),this},startTimer:function(e,n){return e&&("t_page"===e&&this.endTimer("t_resp",n),i.timers[e]={start:"number"==typeof n?n:BOOMR.now()}),this},endTimer:function(e,n){return e&&(i.timers[e]=i.timers[e]||{},void 0===i.timers[e].end&&(i.timers[e].end="number"==typeof n?n:BOOMR.now())),this},clearTimer:function(e){return e&&delete i.timers[e],this},setTimer:function(e,n,r){return e&&(void 0!==r?i.timers[e]={start:n,end:r,delta:r-n}:i.timers[e]={delta:n}),this},addTimersToBeacon:function(e,n){var r,o,s=[];for(r in i.timers)if(i.timers.hasOwnProperty(r)){if("number"!=typeof(o=i.timers[r]).delta&&("number"!=typeof o.start&&(o.start="xhr"===n?i.cached_xhr_start:i.cached_t_start),o.delta=o.end-o.start),isNaN(o.delta))continue;i.basic_timers.hasOwnProperty(r)?BOOMR.addVar(r,o.delta,!0):s.push(r+"|"+o.delta)}s.length&&BOOMR.addVar("t_other",s.join(","),!0),"beacon"!==n||e&&void 0!==e.early||(i.timers={},i.complete=!1)},done:function(e,n){if(BOOMR.plugins.RT){var r,o,s=BOOMR.now(),a=!1;return i.complete=!1,o=i.validateLoadTimestamp(s,e,n),("load"!==n&&"visible"!==n&&"xhr"!==n&&"early"!==n||i.setPageLoadTimers(n,o,e))&&(("load"===n||"visible"===n||"early"===n&&(!e||void 0===e.initiator||"spa_hard"===e.initiator)||"xhr"===n&&e&&"spa_hard"===e.initiator)&&i.getBoomerangTimings(),r=i.determineTStart(n,e),i.refreshSession(),i.maybeResetSession(o,r),"early"!==n&&this.endTimer("t_done",o),e&&"xhr"===e.initiator&&this.setTimer("t_done",e.timing.requestStart,e.timing.loadEventEnd),i.setSupportingTimestamps(r,n),this.addTimersToBeacon(null,n),BOOMR.setReferrer(i.r),"xhr"===n&&e&&e&&e.data&&(e=e.data),"xhr"===n&&e&&(a=e.subresource,e.url&&BOOMR.addVar("u",BOOMR.utils.cleanupURL(e.url.replace(/#.*/,""))),e.status&&(e.status<-1||e.status>=400)&&BOOMR.addVar("http.errno",e.status,!0),e.method&&"GET"!==e.method&&BOOMR.addVar("http.method",e.method,!0),e.type&&"xhr"!==e.type&&BOOMR.addVar("http.type",e.type[0],!0),e.headers&&BOOMR.addVar("http.hdr",e.headers,!0),e.synchronous&&BOOMR.addVar("xhr.sync",1,!0),e.initiator&&BOOMR.addVar("http.initiator",e.initiator,!0),e.responseBodyNotUsed&&BOOMR.addVar("fetch.bnu",1,!0),e.responseUrl&&BOOMR.addVar("xhr.ru",BOOMR.utils.cleanupURL(e.responseUrl),!0)),a&&"passive"!==a&&BOOMR.addVar("rt.subres",1,!0),"load"!==n&&"visible"!==n&&("xhr"!==n||a)&&("unload"!==n||i.onloadfired||!i.autorun||i.crossdomain_sending)||(i.incrementSessionDetails(),i.updateCookie(null,"ld")),BOOMR.addVar({"rt.tt":i.loadTime,"rt.obo":i.oboError},void 0,!0),i.updateCookie(),"unload"===n&&(BOOMR.addVar("rt.quit","",!0),i.onloadfired||BOOMR.addVar("rt.abld","",!0),i.visiblefired||BOOMR.addVar("rt.ntvu","",!0)),"early"!==n&&(i.complete=!0),BOOMR.sendBeacon(i.beacon_url)),this}},is_complete:function(e){return i.complete||e&&"error"===e["http.initiator"]||e&&void 0!==e.early},updateCookie:function(){i.updateCookie()},getCookie:function(){var e,n,r;return!!i.cookie&&(1&(e=BOOMR.utils.getSubCookies(BOOMR.utils.getCookie(i.cookie))||{}).z?(n=36,r=parseInt(e.ss||0,36)):(n=10,r=0),e.ss=parseInt(e.ss||0,n),e.tt=parseInt(e.tt||0,n),e.obo=parseInt(e.obo||0,n),e.sl=parseInt(e.sl||0,n),e.se&&(e.se=parseInt(e.se,n)||1800),e.ld&&(e.ld=r+parseInt(e.ld,n)),e.ul&&(e.ul=r+parseInt(e.ul,n)),e.cl&&(e.cl=r+parseInt(e.cl,n)),e.hd&&(e.hd=r+parseInt(e.hd,n)),e)},incrementSessionDetails:function(){i.incrementSessionDetails()},navigationStart:function(){return i.navigationStart||i.initFromNavTiming(),i.navigationStart},resetTimings:function(){i.navigationStart=void 0,i.responseStart=void 0,i.loadTime=0,i.cached_t_start=void 0}}),!BOOMR.plugins.PaintTiming){var l={"first-paint":"fp","first-contentful-paint":"fcp","largest-contentful-paint":"lcp"},u={initialized:!1,complete:!1,supported:null,timingCache:{},timingHistory:{},observer:null,externalMetrics:{},done:function(e,n){var r,i,o;if(this.complete)return this;if("load"!==n&&(!e||"spa_hard"!==e.initiator))return this.complete=!0,this;if(!(r=BOOMR.getPerformance())||"function"!=typeof r.getEntriesByType){this.complete=!0;return}if((i=r.getEntriesByType("paint"))&&i.length){for(BOOMR.info("This user agent supports PaintTiming","pt"),o=0;o<i.length;o++)u.timingCache[i[o].name]=i[o].startTime,l[i[o].name]&&BOOMR.addVar("pt."+l[i[o].name],Math.floor(i[o].startTime),!0);this.complete=!0,BOOMR.sendBeacon()}},onObserver:function(e){var n=e.getEntries();if(0!==n.length){var r=n[n.length-1],i=r.renderTime||r.loadTime;u.timingCache[r.entryType]=i,u.timingHistory[r.entryType]=u.timingHistory[r.entryType]||[],u.timingHistory[r.entryType].push(i),BOOMR.addVar("pt.lcp",Math.floor(i),!0),u.externalMetrics.lcp=function(){return Math.floor(i)}}}};BOOMR.plugins.PaintTiming={init:function(){return this.is_supported()||(u.complete=!0,u.initialized=!0),u.complete||"hidden"!==BOOMR.visibilityState()||(BOOMR.addVar("pt.hid",1,!0),u.complete=!0),u.initialized||(BOOMR.subscribe("page_ready",u.done,"load",u),BOOMR.subscribe("xhr_load",u.done,"xhr",u),BOOMR.subscribe("before_unload",u.done,null,u),"function"==typeof BOOMR.window.PerformanceObserver&&"function"==typeof window.LargestContentfulPaint&&(u.observer=new BOOMR.window.PerformanceObserver(u.onObserver),u.observer.observe({type:"largest-contentful-paint",buffered:!0})),u.initialized=!0),this},is_complete:function(){return!0},is_enabled:function(){return u.initialized&&this.is_supported()},is_supported:function(){if(null!==u.supported)return u.supported;var e=BOOMR.getPerformance();return u.supported=e&&void 0!==window.PerformancePaintTiming&&"function"==typeof e.getEntriesByType,u.supported},getTimingFor:function(e){if(u.timingCache[e])return u.timingCache[e];if(this.is_supported()){var n,r,i=BOOMR.getPerformance();if(i&&"function"==typeof i.getEntriesByType&&(n=i.getEntriesByType("paint"))&&n.length){for(r=0;r<n.length;r++)if(n[r].name===e)return u.timingCache[e]=n[r].startTime,u.timingCache[e]}}},getHistoryFor:function(e){return u.timingHistory[e]||[]},metrics:u.externalMetrics}}if(!BOOMR.plugins.NavigationTiming){var d={complete:!1,fullySent:!1,sendBeacon:function(){this.complete=!0,BOOMR.sendBeacon()},xhr_done:function(e){if(e&&"spa_hard"===e.initiator)return void d.done(e);if(e&&"spa"===e.initiator)return void d.sendBeacon();BOOMR.window;var n,r,i,o={};if(e){if(e.data&&(e=e.data),(n=BOOMR.getPerformance())&&e.restiming)for(i in o={nt_red_st:e.restiming.redirectStart,nt_red_end:e.restiming.redirectEnd,nt_fet_st:e.restiming.fetchStart,nt_dns_st:e.restiming.domainLookupStart,nt_dns_end:e.restiming.domainLookupEnd,nt_con_st:e.restiming.connectStart,nt_con_end:e.restiming.connectEnd,nt_req_st:e.restiming.requestStart,nt_res_st:e.restiming.responseStart,nt_res_end:e.restiming.responseEnd},e.restiming.secureConnectionStart&&(o.nt_ssl_st=e.restiming.secureConnectionStart),o)o.hasOwnProperty(i)&&o[i]&&(o[i]+=n.timing.navigationStart,o[i]=Math.floor(o[i]));for(i in e.timing&&(r=e.timing,o.nt_req_st||(o.nt_req_st=r.requestStart),o.nt_res_st||(o.nt_res_st=r.responseStart),o.nt_res_end||(o.nt_res_end=r.responseEnd),o.nt_domint=r.domInteractive,o.nt_domcomp=r.domComplete,o.nt_load_st=r.loadEventEnd,o.nt_load_end=r.loadEventEnd),o)o.hasOwnProperty(i)&&!o[i]&&delete o[i];BOOMR.addVar(o,void 0,!0),d.sendBeacon()}},done:function(){var e,n,r,i,o,s,a=BOOMR.window,c={},l=0,u=!1;if(this.complete)return this;if(e=BOOMR.getPerformance()){for(s in"function"==typeof e.getEntriesByType&&((i=e.getEntriesByType("navigation"))&&i.length?(BOOMR.info("This user agent supports NavigationTiming2","nt"),i=i[0],l=e.timing?e.timing.navigationStart:0):i=void 0),!i&&e.timing&&(BOOMR.info("This user agent supports NavigationTiming","nt"),i=e.timing),i&&(!(c={nt_nav_st:e.timing?e.timing.navigationStart:0,nt_red_st:p(l,i.redirectStart),nt_red_end:p(l,i.redirectEnd),nt_fet_st:p(l,i.fetchStart),nt_dns_st:p(l,i.domainLookupStart),nt_dns_end:p(l,i.domainLookupEnd),nt_con_st:p(l,i.connectStart),nt_con_end:p(l,i.connectEnd),nt_req_st:p(l,i.requestStart),nt_res_st:p(l,i.responseStart),nt_res_end:p(l,i.responseEnd),nt_domloading:p(l,i.domLoading),nt_domint:p(l,i.domInteractive),nt_domcontloaded_st:p(l,i.domContentLoadedEventStart),nt_domcontloaded_end:p(l,i.domContentLoadedEventEnd),nt_domcomp:p(l,i.domComplete),nt_load_st:p(l,i.loadEventStart),nt_load_end:p(l,i.loadEventEnd),nt_unload_st:p(l,i.unloadEventStart),nt_unload_end:p(l,i.unloadEventEnd)}).nt_domloading&&e&&e.timing&&e.timing.domLoading&&(c.nt_domloading=e.timing.domLoading),i.secureConnectionStart&&(c.nt_ssl_st=p(l,i.secureConnectionStart)),e.timing&&e.timing.msFirstPaint&&(c.nt_first_paint=e.timing.msFirstPaint),i.workerStart&&(c.nt_worker_start=p(l,i.workerStart)),(i.decodedBodySize||i.transferSize)&&(c.nt_enc_size=i.encodedBodySize,c.nt_dec_size=i.decodedBodySize,c.nt_trn_size=i.transferSize),i.nextHopProtocol&&(c.nt_protocol=i.nextHopProtocol)),!c.nt_first_paint&&BOOMR.plugins.PaintTiming&&(u=BOOMR.plugins.PaintTiming.is_supported(),(o=BOOMR.plugins.PaintTiming.getTimingFor("first-paint"))&&(c.nt_first_paint=p(l,o))),(!c.nt_protocol||!c.nt_first_paint)&&(!i||""!==i.nextHopProtocol)&&!u&&a.chrome&&"function"==typeof a.chrome.loadTimes&&(r=a.chrome.loadTimes())&&(c.nt_spdy=+!!r.wasFetchedViaSpdy,c.nt_cinf=r.connectionInfo,"number"==typeof r.firstPaintTime&&0!==r.firstPaintTime&&(c.nt_first_paint=Math.round(1e3*r.firstPaintTime))),e.navigation&&(n=e.navigation,c.nt_red_cnt=n.redirectCount,c.nt_nav_type=n.type),c)c.hasOwnProperty(s)&&void 0===c[s]&&delete c[s];BOOMR.addVar(c,void 0,!0),i&&(i.requestStart&&i.navigationStart&&i.requestStart<i.navigationStart||i.responseStart&&i.navigationStart&&i.responseStart<i.navigationStart||i.responseStart&&i.fetchStart&&i.responseStart<i.fetchStart||i.navigationStart&&i.fetchStart<i.navigationStart||i.responseEnd&&i.responseEnd>BOOMR.now()+864e5)&&BOOMR.addVar("nt_bad",1,!0),c.nt_load_end>0&&(this.fullySent=!0)}d.sendBeacon()},clear:function(e){this.complete=!(e&&e.early)&&this.fullySent},prerenderToVisible:function(){this.complete=!1,this.done()},onBeforeEarlyBeacon:function(e){e&&void 0!==e.initiator&&"spa_hard"!==e.initiator||this.done()}};BOOMR.plugins.NavigationTiming={init:function(){return d.initialized||(BOOMR.subscribe("page_ready",d.done,null,d),BOOMR.subscribe("prerender_to_visible",d.prerenderToVisible,null,d),BOOMR.subscribe("before_early_beacon",d.onBeforeEarlyBeacon,null,d),BOOMR.subscribe("xhr_load",d.xhr_done,null,d),BOOMR.subscribe("before_unload",d.done,null,d),BOOMR.subscribe("beacon",d.clear,null,d),d.initialized=!0),this},is_complete:function(){return!0}}}function p(e,n){if("number"==typeof n&&0!==n)return Math.floor((e||0)+n)}if(!function(){if(!BOOMR.plugins.ResourceTiming){var e,n={other:0,img:1,link:2,script:3,css:4,xmlhttprequest:5,html:6,image:7,beacon:8,fetch:9,iframe:"a",subdocument:"a",body:"b",input:"c",frame:"a",object:"d",video:"e",audio:"f",source:"g",track:"h",embed:"i",eventsource:"j",navigation:6},r={prefetch:1,preload:2,prerender:3,stylesheet:4},i=["startTime","redirectStart","redirectEnd","fetchStart","domainLookupStart","domainLookupEnd","connectStart","secureConnectionStart","connectEnd","requestStart","responseStart","responseEnd","workerStart"],o="\n",s="*",c="0",l="1",u="2",d=1,p=2,h=4,f="3",m="4",g="5",v="6",y="7";e={complete:!1,sentNavBeacon:!1,initialized:!1,supported:null,xhr_load:function(e){e&&e.restiming&&q(e.restiming),this.complete||(this.complete=!0,BOOMR.sendBeacon())},xssBreakWords:[/(h)(ref)/gi,/(s)(rc)/gi,/(a)(ction)/gi],urlLimit:500,clearOnBeacon:!1,trimUrls:[],serverTiming:!0,monitorClearResourceTimings:!1,splitAtPath:!1,getSrcsetDimensions:!1,trackedResourceTypes:"*",done:function(){this.sentNavBeacon||(N(),this.complete=!0,this.sentNavBeacon=!0,BOOMR.sendBeacon())},onBeacon:function(n){var r=BOOMR.getPerformance();if(e.clearOnBeacon&&r){var i=r.clearResourceTimings||r.webkitClearResourceTimings;i&&"function"==typeof i&&i.call(r)}},prerenderToVisible:function(){this.sentNavBeacon=!1,this.done()}},BOOMR.plugins.ResourceTiming={init:function(n){if(BOOMR.utils.pluginConfig(e,n,"ResourceTiming",["xssBreakWords","clearOnBeacon","urlLimit","trimUrls","trackedResourceTypes","serverTiming","monitorClearResourceTimings","splitAtPath","getSrcsetDimensions"]),e.initialized)return this;if(this.is_supported()){if(BOOMR.subscribe("page_ready",e.done,null,e),BOOMR.subscribe("prerender_to_visible",e.prerenderToVisible,null,e),BOOMR.subscribe("xhr_load",e.xhr_load,null,e),BOOMR.subscribe("beacon",e.onBeacon,null,e),BOOMR.subscribe("before_unload",e.done,null,e),e.monitorClearResourceTimings){var r,i=this;BOOMR.window.performance.clearResourceTimings=(r=BOOMR.window.performance.clearResourceTimings,function(){i.addResources(BOOMR.window.performance.getEntriesByType("resource")),r.apply(BOOMR.window.performance,arguments)})}}else e.complete=!0;return e.initialized=!0,this},is_complete:function(){return!0},is_enabled:function(){return e.initialized&&this.is_supported()},is_supported:function(){if(null!==e.supported)return e.supported;var n=BOOMR.getPerformance();return e.supported=n&&"function"==typeof n.getEntriesByType&&void 0!==window.PerformanceResourceTiming,e.supported},addResources:function(n,r){if(this.is_supported()&&BOOMR.utils.isArray(n)){if(e.collectedEntries=e.collectedEntries||[],"number"==typeof r){var o=r-(BOOMR.window.performance.timeOrigin||BOOMR.window.performance.timing.navigationStart);n=BOOMR.utils.arrayFilter(n,function(e){for(var n=0;n<i.length;n++){var r=i[n];e.hasOwnProperty(r)&&(e[r]+=o)}return!0})}Array.prototype.push.apply(e.collectedEntries,n)}},getCompressedResourceTiming:B,getFilteredResourceTiming:x,calculateResourceTimingUnion:function(e){if(!e||!e.length)return 0;e.sort(function(e,n){return e.fetchStart!==n.fetchStart?e.fetchStart-n.fetchStart:(e.responseStart||e.responseEnd)-(n.responseStart||n.responseEnd)});var n,r=P(e),i=[],o=0;for(n=0;n<r.length;n++){var s=r[n];s.fetchStart<o&&(s.fetchStart=o),s.fetchStart<s.responseEnd&&(i.push(s),o=s.responseEnd)}var a=P(i),c=0;for(n=0;n<a.length;n++)c+=a[n].responseEnd-a[n].fetchStart;return c},addResourceTimingToBeacon:N,addToBeacon:q,trimTiming:w,convertToTrie:b,optimizeTrie:_,findPerformanceEntriesForFrame:S,toBase36:T,getVisibleEntries:M,reduceFetchStarts:P,compressSize:C,decompressSize:function(e,n){var r,i;for(void 0===n&&(n={}),r=e.split(","),i=0;i<r.length;i++)"_"===r[i]?r[i]=0:(""===r[i]&&(r[i]=0),r[i]=parseInt(r[i],36),i>0&&(r[i]+=r[0]));return 1===r.length&&r.push(r[0]),2===r.length&&r.push(r[0]),n.encodedBodySize=r[0],n.transferSize=r[1],n.decodedBodySize=r[2],n},trimUrl:I,getResourceLatestTime:j,mergePixels:A,countPixels:k,getOptimizedTimepoints:function(e){var n,r,i,o,s,a,c,l,u,d,p={},h=[];for(n=0,r=Object.keys(e);n<r.length;n++)void 0===p[s=Math.round(Number(r[n]))]&&(p[s]=[]),Array.prototype.push.apply(p[s],e[r[n]]);if(0===(r=Object.keys(p).map(Number).sort(function(e,n){return e-n})).length)return{};for(n=0;n<r.length;n++)c=k(i=A(i,p[s=r[n]],s)),r[n]=[s,c];for(n=0,o=0,a=0,l=0;n<r.length;n++)s=r[n][0],c=r[n][1],u=k(i,0,s),(c>a||u>l)&&(h.push(d=(d=(s===1/0?"":T(Math.round(s-o)))+"~"+T(c-a)+"~"+T(c-u)).replace(/~~/,"-").replace(/~$/,"")),o=s,a=c,l=u);return h.join("!").replace(/!+$/,"")},decompressTimePoints:function(e){var n,r,i,o={},s=[0,0,0];for(r=0,n=e.split("!");r<n.length;r++)o[(i=n[r].replace(/^~/,"Infinity~").replace("-","~0~").split("~").map(function(e,n){return e="Infinity"===e?1/0:parseInt(e,36),2===n?e=s[1]-e:e+=s[n],s[n]=e,e}))[0]]=[i[1],i[2]||i[1]];return o},accumulateServerTimingEntries:D,compressServerTiming:L,indexServerTiming:F,identifyServerTimingEntry:U,decompressServerTiming:function(e,n){var r=n.split(":"),i=Number(r[0]),o=0,s=0;if(r.length>1){var a=r[1].split(".");""!==a[0]&&(o=Number(a[0])),a.length>1&&(s=Number(a[1]))}var c,l="";return Array.isArray(e[o])?(c=e[o][0],l=e[o][1+s]||""):c=e[o],{name:c,duration:i,description:l}},SPECIAL_DATA_PREFIX:s,SPECIAL_DATA_DIMENSION_TYPE:c,SPECIAL_DATA_SIZE_TYPE:l,SPECIAL_DATA_SCRIPT_ATTR_TYPE:u,SPECIAL_DATA_LINK_ATTR_TYPE:m,SPECIAL_DATA_SERVICE_WORKER_TYPE:v,ASYNC_ATTR:d,DEFER_ATTR:p,LOCAT_ATTR:h,INITIATOR_TYPES:n,REL_TYPES:r}}function b(n,r){var i,s,a,c,l,u,d,p,h={};for(i in n){for(a=0,s=i;a<e.xssBreakWords.length;a++)s=s.replace(e.xssBreakWords[a],"$1"+o+"$2");if(n.hasOwnProperty(i))for(a=0,c=n[i],l=r?[(l=s.split("/"))[0]+"//",l[2]+(l.length>3?"/":"")].concat(l.slice(3).reduce(function(e){return function(n,r,i){var s,a;if(-1!==r.indexOf(o)){for(a=0,s=r.split(o);a<s.length-1;a++)n.push(s[a]),n.push(o);r=s.slice(-1)}return"number"==typeof e&&i<e&&(r+="/"),n.concat(r)}}(l.length-4),[])):s.split(""),d=h;a<l.length;a++)void 0===(p=d[u=l[a]])?d=d[u]=a===l.length-1?c:{}:"string"==typeof p?d=d[u]={"|":p}:a===l.length-1?d[u]["|"]=c:d=d[u]}return h}function _(e,n){var r,i,s,a=0,c=[];for(r in e)e.hasOwnProperty(r)&&c.push(r);for(var l=0;l<c.length;l++)"object"==typeof e[r=c[l]]&&(i=_(e[r],!1))&&(delete e[r],r===o?(r=i.name,a++):r+=i.name,e[r]=i.value),a++;if(1===a)if(n)return(s={})[r]=e[r],s;else return{name:r,value:e[r]};return!!n&&e}function w(e,n){"number"!=typeof e&&(e=0),"number"!=typeof n&&(n=0);var r=Math.round(e||0),i=Math.round(n||0);return 0===r?0:r-i}function O(e){try{if(e.location&&e.location.href,e.document,"performance"in e&&e.performance)return!0}catch(e){}return!1}function R(e){var n=0;return O(e)&&e.performance.timing&&e.performance.timing.navigationStart&&(n=e.performance.timing.navigationStart),n}function S(n,o,s,a,c){var l,u,f,m,g,v,y,b,_,w=[],T={},x={};if(void 0===o&&(o=!0),void 0===s&&(s=0),void 0===a&&(a=0),a>10)return w;try{if(!O(n))return w;if(f=R(n),b=M(n,c),_=n.document.createElement("a"),E(_,T,"script"),E(_,x,"link"),(v=n.document.getElementsByTagName("iframe"))&&v.length)for(l=0;l<v.length;l++)m=R(v[l].contentWindow),g=0,m>f&&(g=s+(m-f)),_.href=v[l].src,w=w.concat(S(v[l].contentWindow,!1,g,a+1,b[_.href]));if("function"!=typeof n.performance.getEntriesByType)return w;function C(n){return e.serverTiming&&n.serverTiming||[]}o&&(I=n,A=w,k=u,B=y,P=C,(k=I.performance.getEntriesByType("navigation"))&&1===k.length?(B=k[0],A.push({name:I.location.href,startTime:0,initiatorType:"html",redirectStart:B.redirectStart,redirectEnd:B.redirectEnd,fetchStart:B.fetchStart,domainLookupStart:B.domainLookupStart,domainLookupEnd:B.domainLookupEnd,connectStart:B.connectStart,secureConnectionStart:B.secureConnectionStart,connectEnd:B.connectEnd,requestStart:B.requestStart,responseStart:B.responseStart,responseEnd:B.responseEnd,workerStart:B.workerStart,encodedBodySize:B.encodedBodySize,decodedBodySize:B.decodedBodySize,transferSize:B.transferSize,serverTiming:P(B)})):I.performance.timing&&0!==(t=I.performance.timing).navigationStart&&t.responseEnd<=t.navigationStart+36e5&&A.push({name:I.location.href,startTime:0,initiatorType:"html",redirectStart:t.redirectStart?t.redirectStart-t.navigationStart:0,redirectEnd:t.redirectEnd?t.redirectEnd-t.navigationStart:0,fetchStart:t.fetchStart?t.fetchStart-t.navigationStart:0,domainLookupStart:t.domainLookupStart?t.domainLookupStart-t.navigationStart:0,domainLookupEnd:t.domainLookupEnd?t.domainLookupEnd-t.navigationStart:0,connectStart:t.connectStart?t.connectStart-t.navigationStart:0,secureConnectionStart:t.secureConnectionStart?t.secureConnectionStart-t.navigationStart:0,connectEnd:t.connectEnd?t.connectEnd-t.navigationStart:0,requestStart:t.requestStart?t.requestStart-t.navigationStart:0,responseStart:t.responseStart?t.responseStart-t.navigationStart:0,responseEnd:t.responseEnd?t.responseEnd-t.navigationStart:0}));var I,A,k,B,P,N=n.performance.getEntriesByType("resource");n===BOOMR.window&&e.collectedEntries&&(Array.prototype.push.apply(N,e.collectedEntries),e.collectedEntries=[]),w=w.concat(function(e,n,o,s,a,c){for(var l,u,f=[],m=0;e&&m<e.length;m++){l={name:(u=e[m]).name,initiatorType:u.initiatorType,encodedBodySize:u.encodedBodySize,decodedBodySize:u.decodedBodySize,transferSize:u.transferSize,serverTiming:n(u),visibleDimensions:o[u.name],latestTime:j(u)};for(var g=0;g<i.length;g++){var v=i[g];l[v]="startTime"===v||u[v]?u[v]+s:0}if(u.hasOwnProperty("_data")&&(l._data=u._data),("script"===u.initiatorType||"link"===u.initiatorType)&&a[u.name]){var y=a[u.name];for(l.scriptAttrs=(y.async?d:0)|(y.defer?p:0);1===y.nodeType&&"BODY"!==y.nodeName;)y=y.parentNode;l.scriptAttrs|="BODY"===y.nodeName?h:0}"link"===u.initiatorType&&c[u.name]&&BOOMR.utils.arrayFind(c[u.name].rel.split(/[\u0009\u000A\u000C\u000D\u0020]+/),function(e){if(r[e=e.toLowerCase()])return l.linkAttrs=r[e],!0}),f.push(l)}return f}(N,C,b,s,T,x))}catch(e){}return w}function E(e,n,r){Array.prototype.forEach.call(e.ownerDocument.getElementsByTagName(r),function(r){e.href=r.currentSrc||r.src||"function"==typeof r.getAttribute&&r.getAttribute("xlink:href")||r.href,e.href.match(/^https?:\/\//)&&(n[e.href]=r)})}function T(e){return"number"==typeof e&&0!==e?e.toString(36):"string"==typeof e?e:""}function M(n,r){var i,o,s={},a=n.document,c=a.createElement("A");return i=(r=r||[0,0,0,0])[3]+(void 0!==n.pageXOffset)?n.pageXOffset:(a.documentElement||a.body.parentNode||a.body).scrollLeft,o=r[2]+(void 0!==n.pageYOffset)?n.pageYOffset:(a.documentElement||a.body.parentNode||a.body).scrollTop,["img","iframe","image"].forEach(function(n){var r,l,u,d,p,h,f,m=a.getElementsByTagName(n);for(p=0;p<m.length;p++)if((d=m[p])&&(c.href=f=d.currentSrc||d.src||"function"==typeof d.getAttribute&&d.getAttribute("src")||d.getAttribute("xlink:href"),(f=c.href)&&!s[f]&&((h=d.getBoundingClientRect()).height||d.offsetHeight)&&(h.width||d.offsetWidth))){if(s[f]=[h.height||d.offsetHeight,h.width||d.offsetWidth,Math.round(h.top+o),Math.round(h.left+i)],!d.naturalHeight&&!d.naturalWidth)continue;e.getSrcsetDimensions&&d.currentSrc&&(d.srcset||d.parentNode&&d.parentNode.nodeName&&"PICTURE"===d.parentNode.nodeName.toUpperCase())?(r=d.isConnected?d.ownerDocument.createElement("IMG"):new BOOMR.window.Image).src=f:r=d,l=r.naturalHeight||d.naturalHeight,u=r.naturalWidth||d.naturalWidth,(l||u)&&(s[f][0]!==l||s[f][1]!==u)&&s[f].push(l,u)}}),s}function x(e,n,r){var i,o,s=S(BOOMR.window,!0,0,0),a=R(BOOMR.window),c={};if(!s||!s.length)return{entries:[]};s.sort(function(e,n){return e.startTime-n.startTime});var l=[];for(i=0;i<s.length;i++)if(!("string"!=typeof(o=s[i]).name||0!==o.name.indexOf("http:")&&0!==o.name.indexOf("https:")||"function"==typeof BOOMR.getBeaconURL&&BOOMR.getBeaconURL()&&o.name.indexOf(BOOMR.getBeaconURL())>-1)&&(!e||!(a+o.startTime<e))){if(n&&a+o.startTime>n)break;(void 0===r||"*"===r||!r.length||o.initiatorType&&BOOMR.utils.inArray(o.initiatorType,r))&&(D(c,o.serverTiming),l.push(o))}var u=L(c);return{entries:l,serverTiming:{lookup:u,indexed:F(u)}}}function C(e){var n,r,i;return e.encodedBodySize||e.decodedBodySize||e.transferSize?(n=e.transferSize,r=e.encodedBodySize,[r,n?n-r:"_",(i=e.decodedBodySize)?i-r:0].map(T).join(",").replace(/,+$/,"")):""}function I(n,r){var i,o,s;if(n&&r)for(i=0;i<r.length;i++)if("string"==typeof(s=r[i])){if(-1!==(o=n.indexOf(s))){n=n.substr(0,o+s.length)+"...";break}}else s instanceof RegExp&&s.test(n)&&(n=n.replace(s,"$1")+"...");return BOOMR.utils.cleanupURL(n,e.urlLimit)}function j(e){return e.responseEnd?e.responseEnd:e.responseStart&&e.startTime?e.responseStart+(e.responseStart-e.startTime)*.2:1/0}function A(e,n,r){var i=BOOMR.window.screen,o=i.height,s=i.width;return n.reduce(function(e,n){var i,a,c,l,u,d;if(i=Math.max(0,n[3]),c=Math.max(0,n[2]),a=Math.min(n[3]+n[1],s),l=Math.min(n[2]+n[0],o),i>=a||c>=l)return e;for(d=c;d<l;d++)for(e[d]||(e[d]=[]),u=i;u<a;u++)e[d][u]=r;return e},e||[])}function k(e,n,r){return n=n||0,r=r||1/0,e.reduce(function(e,i){return e+i.filter(function(e){return n<=e&&e<=r}).length},0)}function B(r,i){var o,d,p,h,O,R={},S={},E=x(r,i,e.trackedResourceTypes),M=E.entries,j=E.serverTiming;if(!M||!M.length)return{restiming:{},servertiming:[]};for(o=0;o<M.length;o++){d=M[o];var A=BOOMR.plugins.Continuity.getTTIWaitForXHRIngore(),k=d.initiatorType&&BOOMR.utils.inArray(d.initiatorType,["xmlhttprequest","fetch"])&&a(A,d.name);void 0===(p=n[d.initiatorType])&&(p=0),O=p+[w(d.startTime,0),w(d.responseEnd,d.startTime),w(d.responseStart,d.startTime),w(d.requestStart,d.startTime),w(d.connectEnd,d.startTime),w(d.secureConnectionStart,d.startTime),w(d.connectStart,d.startTime),w(d.domainLookupEnd,d.startTime),w(d.domainLookupStart,d.startTime),w(d.redirectEnd,d.startTime),w(d.redirectStart,d.startTime)].map(T).join(",").replace(/,+$/,"");var B=C(d);if(""!==B&&(O+=s+l+B),d.hasOwnProperty("scriptAttrs")&&(O+=s+u+d.scriptAttrs),d.serverTiming&&d.serverTiming.length&&(O+=s+f+d.serverTiming.reduce(function(e,n,r){var i=String(void 0!==n.duration?n.duration:n.value);"0."===i.substring(0,2)&&(i=i.substring(1));var o=n.name||n.metric;return e+((r>0?",":"")+i+U(j.indexed[o].index,j.indexed[o].descriptions[n.description]))},"")),d.hasOwnProperty("linkAttrs")&&(O+=s+m+d.linkAttrs),d.workerStart&&"number"==typeof d.workerStart&&0!==d.workerStart){var P,N=w(("number"!=typeof(P=d.workerStart)&&(P=0),Math.ceil(P||0)),d.startTime);O+=s+v+T(N)}if(k&&(O+=s+y+1),h=I(d.name,e.trimUrls),d.hasOwnProperty("_data")){var D="";for(var L in d._data)d._data.hasOwnProperty(L)&&(D+=s+g+L+":"+d._data[L]);void 0===R[h]?R[h]=O+D:R[h]+=D}else void 0!==R[h]?R[h]+="|"+O:d.visibleDimensions?R[h]=s+c+d.visibleDimensions.map(Math.round).map(T).join(",").replace(/,+$/,"")+"|"+O:R[h]=O;d.visibleDimensions&&(S[d.latestTime]||(S[d.latestTime]=[]),S[d.latestTime].push(d.visibleDimensions))}return{restiming:_(b(R,e.splitAtPath),!0),servertiming:j.lookup}}function P(e){var n=[];if(!e||!e.length)return n;for(var r=0;r<e.length;r++){var i=e[r];(r===e.length-1||i.fetchStart!==e[r+1].fetchStart)&&n.push({fetchStart:i.fetchStart,responseEnd:i.responseStart||i.responseEnd})}return n}function N(e,n){var r;"undefined"!=typeof JSON&&(r=B(e,n))&&(BOOMR.info("Client supports Resource Timing API","restiming"),q(r))}function D(e,n){(n||[]).forEach(function(n){var r=n.name||n.metric;void 0===e[r]&&(e[r]={count:0,counts:{}});var i=e[r];i.counts[n.description]=i.counts[n.description]||0,i.counts[n.description]++,i.count++})}function L(e){return Object.keys(e).sort(function(n,r){return e[r].count-e[n].count}).reduce(function(n,r){var i=Object.keys(e[r].counts).sort(function(n,i){return e[r].counts[i]-e[r].counts[n]});return n.push(1===i.length&&""===i[0]?r:[r].concat(i)),n},[])}function F(e){return e.reduce(function(e,n,r){var i,o;return Array.isArray(n)?(i=n[0],o=n.slice(1).reduce(function(e,n,r){return e[n]=r,e},{})):(i=n,o={"":0}),e[i]={index:r,descriptions:o},e},{})}function U(e,n){var r="";return e&&(r+=e),n&&(r+="."+n),r.length&&(r=":"+r),r}function q(e){BOOMR.addVar("restiming",JSON.stringify(e.restiming),!0),e.servertiming.length&&BOOMR.addVar("servertiming",BOOMR.utils.serializeForUrl(e.servertiming),!0)}}(),!BOOMR.plugins.UserTiming){var h={complete:!1,initialized:!1,supported:!1,options:{from:0,window:BOOMR.window},getUserTiming:function(){var e,n=this.findUserTimingForFrame(h.options.window);h.options.from&&(n=n.filter(function(e){return e.startTime+e.duration>=h.options.from}));var r=window.UserTimingCompression||BOOMR.window.UserTimingCompression;if(void 0!==r)return e=r.compressUserTiming(n),r.compressForUri(e);if(0===n.length)return null;for(var i=this.getUserTimingMap(),o=0,s=n.length;o<s;o++){var a=n[o];"measure"===a.entryType&&0===a.name.indexOf("x_")&&(i[a.name]?i[a.name].push(a.duration):i[a.name]=[a.duration])}return JSON.stringify(i)},addEntriesToBeacon:function(e){var n,r=BOOMR.hrNow();this.complete||e&&void 0!==e.early||((n=this.getUserTiming())&&BOOMR.addVar("usertiming",n,!0),this.options.from=r,this.complete=!0)},getUserTimingMap:function(){var e,n=BOOMR.getVar("usertiming");if(!n)return{};try{if(e=JSON.parse(n),s(e))return e}catch(e){}return{}},findUserTimingForFrame:function(e){var n;if(!e)return[];try{if(e.location&&e.location.href,!("performance"in e)||!e.performance||!e.performance.getEntriesByType)return n;n=(n=e.performance.getEntriesByType("mark")).concat(e.performance.getEntriesByType("measure"))}catch(e){}return n},clearMetrics:function(e){this.complete=!1},subscribe:function(){BOOMR.subscribe("before_beacon",this.addEntriesToBeacon,null,this),BOOMR.subscribe("beacon",this.clearMetrics,null,this)},pageReady:function(){this.checkSupport()&&this.subscribe()},checkSupport:function(){if(this.supported)return!0;var e=BOOMR.getPerformance();if(e&&"function"==typeof e.getEntriesByType){var n=e.getEntriesByType("mark"),r=e.getEntriesByType("measure");if(BOOMR.utils.isArray(n)&&BOOMR.utils.isArray(r))return BOOMR.info("Client supports UserTiming API","usertiming"),this.supported=!0,!0}return!1}};BOOMR.plugins.UserTiming={init:function(e){return h.initialized||(h.checkSupport()?h.subscribe():BOOMR.subscribe("page_ready",h.pageReady,null,h),h.initialized=!0),this},is_complete:function(){return!0},is_supported:function(){return h.initialized&&h.supported},addUserTiming:function(e){var n=h.getUserTimingMap();s(e)&&(Object.keys(e).forEach(function(r){var i,o=e[r];i=o,"[object Number]"===Object.prototype.toString.call(i)&&(o=[o]),n[r]?n[r].concat(o):n[r]=o}),n&&BOOMR.addVar("usertiming",JSON.stringify(n),!0))}}}if(!BOOMR.plugins.EventTiming){var f={click:0,dblclick:1,mousedown:2,mouseup:3,mousemove:4,touchstart:5,touchend:6,touchmove:7,keydown:8,keyup:9,keypress:10,wheel:11,pointerdown:12,pointerup:13,pointermove:14,compositionstart:17,compositionupdate:18,compositionend:19,contextmenu:20},m={initialized:!1,supported:null,observerEvent:null,observerFirstInput:null,entries:[],firstInputDelay:null,timeToFirstInteraction:null,onBeforeBeacon:function(){var e;if(m.entries&&m.entries.length){var n=[];for(e=0;e<m.entries.length;e++)n.push({n:f[m.entries[e].name]?f[m.entries[e].name]:m.entries[e].name,s:Math.round(m.entries[e].startTime).toString(36),d:Math.round(m.entries[e].duration).toString(36),p:Math.round(m.entries[e].processingEnd-m.entries[e].processingStart).toString(36),c:+!!m.entries[e].cancelable,fi:"first-input"===m.entries[e].entryType?1:void 0});BOOMR.addVar("et.e",BOOMR.utils.serializeForUrl(n),!0)}m.entries=[],null!==m.firstInputDelay&&(BOOMR.addVar("et.fid",Math.ceil(m.firstInputDelay),!0),m.firstInputDelay=null)},onEventTiming:function(e){m.entries=m.entries.concat(e.getEntries())},onFirstInput:function(e){var n=e.getEntries();m.entries=m.entries.concat(n),m.firstInputDelay=n[0].processingStart-n[0].startTime,m.timeToFirstInteraction=n[0].startTime}};BOOMR.plugins.EventTiming={init:function(){if(this.is_supported()||(m.initialized=!0),!m.initialized){BOOMR.subscribe("before_beacon",m.onBeforeBeacon,null,m);try{var e=BOOMR.window;m.observerEvent=new e.PerformanceObserver(m.onEventTiming),m.observerEvent.observe({type:["event"],buffered:!0}),m.observerFirstInput=new e.PerformanceObserver(m.onFirstInput),m.observerFirstInput.observe({type:["first-input"],buffered:!0})}catch(e){m.supported=!1}m.initialized=!0}return this},is_complete:function(){return!0},is_enabled:function(){return m.initialized&&this.is_supported()},is_supported:function(){if(null!==m.supported)return m.supported;var e=BOOMR.window;return m.supported=BOOMR.getPerformance()&&void 0!==e.PerformanceEventTiming&&"function"==typeof e.PerformanceObserver,m.supported&&BOOMR.info("This user agent supports EventTiming","et"),m.supported},stop:function(){m.observerEvent&&(m.observerEvent.disconnect(),m.observerEvent=null),m.observerFirstInput&&(m.observerFirstInput.disconnect(),m.observerFirstInput=null)},metrics:{count:function(){return m.entries.length},averageDuration:function(){if(0===m.entries.length)return 0;for(var e=0,n=0;n<m.entries.length;n++)e+=m.entries[n].duration;return e/m.entries.length},firstInputDelay:function(){return m.firstInputDelay},timeToFirstInteraction:function(){return m.timeToFirstInteraction}}}}},e.prototype.uninstall=function(){var e=this.BOOMR,n=e.plugins;e.disable(),Object.keys(n).forEach(function(e){n[e].disable&&n[e].disable()}),e.orig_XMLHttpRequest&&e.orig_XMLHttpRequest!==window.XMLHttpRequest&&(window.XMLHttpRequest=e.orig_XMLHttpRequest)},e.prototype.addUserTiming=function(e){var n=this.BOOMR;n&&n.plugins.UserTiming&&n.plugins.UserTiming.addUserTiming&&n.plugins.UserTiming.addUserTiming(e)},e}()},"../../node_modules/abort-signal-polyfill/dist/staticMethods/abort.js":function(e,n){"use strict";n.abortSignalAbort=function(e){let n=new AbortController;return n.abort(e),n.signal}},"../../node_modules/abort-signal-polyfill/dist/staticMethods/any.js":function(e,n){"use strict";n.abortSignalAny=function(e){if(0===e.length)return new AbortController().signal;if(1===e.length)return e[0];for(let n of e)if(n.aborted)return n;let n=new AbortController,r=Array(e.length),i=()=>{for(let e of r)e()};return e.forEach((e,o)=>{let s=()=>{n.abort(e.reason),i()};e.addEventListener("abort",s),r[o]=()=>e.removeEventListener("abort",s)}),n.signal}},"../../node_modules/abort-signal-polyfill/dist/staticMethods/timeout.js":function(e,n){"use strict";n.abortSignalTimeout=function(e){let n=new AbortController;return setTimeout(()=>{n.abort(new DOMException(`signal timed out after ${e} ms`,"TimeoutError"))},e),n.signal}},"../../node_modules/p-queue/node_modules/eventemitter3/index.js":function(e){"use strict";var n=Object.prototype.hasOwnProperty,r="~";function i(){}function o(e,n,r){this.fn=e,this.context=n,this.once=r||!1}function s(e,n,i,s,a){if("function"!=typeof i)throw TypeError("The listener must be a function");var c=new o(i,s||e,a),l=r?r+n:n;return e._events[l]?e._events[l].fn?e._events[l]=[e._events[l],c]:e._events[l].push(c):(e._events[l]=c,e._eventsCount++),e}function a(e,n){0==--e._eventsCount?e._events=new i:delete e._events[n]}function c(){this._events=new i,this._eventsCount=0}Object.create&&(i.prototype=Object.create(null),new i().__proto__||(r=!1)),c.prototype.eventNames=function(){var e,i,o=[];if(0===this._eventsCount)return o;for(i in e=this._events)n.call(e,i)&&o.push(r?i.slice(1):i);return Object.getOwnPropertySymbols?o.concat(Object.getOwnPropertySymbols(e)):o},c.prototype.listeners=function(e){var n=r?r+e:e,i=this._events[n];if(!i)return[];if(i.fn)return[i.fn];for(var o=0,s=i.length,a=Array(s);o<s;o++)a[o]=i[o].fn;return a},c.prototype.listenerCount=function(e){var n=r?r+e:e,i=this._events[n];return i?i.fn?1:i.length:0},c.prototype.emit=function(e,n,i,o,s,a){var c=r?r+e:e;if(!this._events[c])return!1;var l,u,d=this._events[c],p=arguments.length;if(d.fn){switch(d.once&&this.removeListener(e,d.fn,void 0,!0),p){case 1:return d.fn.call(d.context),!0;case 2:return d.fn.call(d.context,n),!0;case 3:return d.fn.call(d.context,n,i),!0;case 4:return d.fn.call(d.context,n,i,o),!0;case 5:return d.fn.call(d.context,n,i,o,s),!0;case 6:return d.fn.call(d.context,n,i,o,s,a),!0}for(u=1,l=Array(p-1);u<p;u++)l[u-1]=arguments[u];d.fn.apply(d.context,l)}else{var h,f=d.length;for(u=0;u<f;u++)switch(d[u].once&&this.removeListener(e,d[u].fn,void 0,!0),p){case 1:d[u].fn.call(d[u].context);break;case 2:d[u].fn.call(d[u].context,n);break;case 3:d[u].fn.call(d[u].context,n,i);break;case 4:d[u].fn.call(d[u].context,n,i,o);break;default:if(!l)for(h=1,l=Array(p-1);h<p;h++)l[h-1]=arguments[h];d[u].fn.apply(d[u].context,l)}}return!0},c.prototype.on=function(e,n,r){return s(this,e,n,r,!1)},c.prototype.once=function(e,n,r){return s(this,e,n,r,!0)},c.prototype.removeListener=function(e,n,i,o){var s=r?r+e:e;if(!this._events[s])return this;if(!n)return a(this,s),this;var c=this._events[s];if(c.fn)c.fn!==n||o&&!c.once||i&&c.context!==i||a(this,s);else{for(var l=0,u=[],d=c.length;l<d;l++)(c[l].fn!==n||o&&!c[l].once||i&&c[l].context!==i)&&u.push(c[l]);u.length?this._events[s]=1===u.length?u[0]:u:a(this,s)}return this},c.prototype.removeAllListeners=function(e){var n;return e?(n=r?r+e:e,this._events[n]&&a(this,n)):(this._events=new i,this._eventsCount=0),this},c.prototype.off=c.prototype.removeListener,c.prototype.addListener=c.prototype.on,c.prefixed=r,c.EventEmitter=c,e.exports=c},"../../node_modules/process/browser.js":function(e){var n,r,i,o=e.exports={};function s(){throw Error("setTimeout has not been defined")}function a(){throw Error("clearTimeout has not been defined")}try{n="function"==typeof setTimeout?setTimeout:s}catch(e){n=s}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(e){r=a}function c(e){if(n===setTimeout)return setTimeout(e,0);if((n===s||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(r){try{return n.call(null,e,0)}catch(r){return n.call(this,e,0)}}}var l=[],u=!1,d=-1;function p(){u&&i&&(u=!1,i.length?l=i.concat(l):d=-1,l.length&&h())}function h(){if(!u){var e=c(p);u=!0;for(var n=l.length;n;){for(i=l,l=[];++d<n;)i&&i[d].run();d=-1,n=l.length}i=null,u=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(n){try{return r.call(null,e)}catch(n){return r.call(this,e)}}}(e)}}function f(e,n){this.fun=e,this.array=n}function m(){}o.nextTick=function(e){var n=Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)n[r-1]=arguments[r];l.push(new f(e,n)),1!==l.length||u||c(h)},f.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=m,o.addListener=m,o.once=m,o.off=m,o.removeListener=m,o.removeAllListeners=m,o.emit=m,o.prependListener=m,o.prependOnceListener=m,o.listeners=function(e){return[]},o.binding=function(e){throw Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw Error("process.chdir is not supported")},o.umask=function(){return 0}},"../../node_modules/sdp/sdp.js":function(e){"use strict";let n={};n.generateIdentifier=function(){return Math.random().toString(36).substring(2,12)},n.localCName=n.generateIdentifier(),n.splitLines=function(e){return e.trim().split("\n").map(e=>e.trim())},n.splitSections=function(e){return e.split("\nm=").map((e,n)=>(n>0?"m="+e:e).trim()+"\r\n")},n.getDescription=function(e){let r=n.splitSections(e);return r&&r[0]},n.getMediaSections=function(e){let r=n.splitSections(e);return r.shift(),r},n.matchPrefix=function(e,r){return n.splitLines(e).filter(e=>0===e.indexOf(r))},n.parseCandidate=function(e){let n,r={foundation:(n=0===e.indexOf("a=candidate:")?e.substring(12).split(" "):e.substring(10).split(" "))[0],component:{1:"rtp",2:"rtcp"}[n[1]]||n[1],protocol:n[2].toLowerCase(),priority:parseInt(n[3],10),ip:n[4],address:n[4],port:parseInt(n[5],10),type:n[7]};for(let e=8;e<n.length;e+=2)switch(n[e]){case"raddr":r.relatedAddress=n[e+1];break;case"rport":r.relatedPort=parseInt(n[e+1],10);break;case"tcptype":r.tcpType=n[e+1];break;case"ufrag":r.ufrag=n[e+1],r.usernameFragment=n[e+1];break;default:void 0===r[n[e]]&&(r[n[e]]=n[e+1])}return r},n.writeCandidate=function(e){let n=[];n.push(e.foundation);let r=e.component;"rtp"===r?n.push(1):"rtcp"===r?n.push(2):n.push(r),n.push(e.protocol.toUpperCase()),n.push(e.priority),n.push(e.address||e.ip),n.push(e.port);let i=e.type;return n.push("typ"),n.push(i),"host"!==i&&e.relatedAddress&&e.relatedPort&&(n.push("raddr"),n.push(e.relatedAddress),n.push("rport"),n.push(e.relatedPort)),e.tcpType&&"tcp"===e.protocol.toLowerCase()&&(n.push("tcptype"),n.push(e.tcpType)),(e.usernameFragment||e.ufrag)&&(n.push("ufrag"),n.push(e.usernameFragment||e.ufrag)),"candidate:"+n.join(" ")},n.parseIceOptions=function(e){return e.substring(14).split(" ")},n.parseRtpMap=function(e){let n=e.substring(9).split(" "),r={payloadType:parseInt(n.shift(),10)};return r.name=(n=n[0].split("/"))[0],r.clockRate=parseInt(n[1],10),r.channels=3===n.length?parseInt(n[2],10):1,r.numChannels=r.channels,r},n.writeRtpMap=function(e){let n=e.payloadType;void 0!==e.preferredPayloadType&&(n=e.preferredPayloadType);let r=e.channels||e.numChannels||1;return"a=rtpmap:"+n+" "+e.name+"/"+e.clockRate+(1!==r?"/"+r:"")+"\r\n"},n.parseExtmap=function(e){let n=e.substring(9).split(" ");return{id:parseInt(n[0],10),direction:n[0].indexOf("/")>0?n[0].split("/")[1]:"sendrecv",uri:n[1],attributes:n.slice(2).join(" ")}},n.writeExtmap=function(e){return"a=extmap:"+(e.id||e.preferredId)+(e.direction&&"sendrecv"!==e.direction?"/"+e.direction:"")+" "+e.uri+(e.attributes?" "+e.attributes:"")+"\r\n"},n.parseFmtp=function(e){let n,r={},i=e.substring(e.indexOf(" ")+1).split(";");for(let e=0;e<i.length;e++)r[(n=i[e].trim().split("="))[0].trim()]=n[1];return r},n.writeFmtp=function(e){let n="",r=e.payloadType;if(void 0!==e.preferredPayloadType&&(r=e.preferredPayloadType),e.parameters&&Object.keys(e.parameters).length){let i=[];Object.keys(e.parameters).forEach(n=>{void 0!==e.parameters[n]?i.push(n+"="+e.parameters[n]):i.push(n)}),n+="a=fmtp:"+r+" "+i.join(";")+"\r\n"}return n},n.parseRtcpFb=function(e){let n=e.substring(e.indexOf(" ")+1).split(" ");return{type:n.shift(),parameter:n.join(" ")}},n.writeRtcpFb=function(e){let n="",r=e.payloadType;return void 0!==e.preferredPayloadType&&(r=e.preferredPayloadType),e.rtcpFeedback&&e.rtcpFeedback.length&&e.rtcpFeedback.forEach(e=>{n+="a=rtcp-fb:"+r+" "+e.type+(e.parameter&&e.parameter.length?" "+e.parameter:"")+"\r\n"}),n},n.parseSsrcMedia=function(e){let n=e.indexOf(" "),r={ssrc:parseInt(e.substring(7,n),10)},i=e.indexOf(":",n);return i>-1?(r.attribute=e.substring(n+1,i),r.value=e.substring(i+1)):r.attribute=e.substring(n+1),r},n.parseSsrcGroup=function(e){let n=e.substring(13).split(" ");return{semantics:n.shift(),ssrcs:n.map(e=>parseInt(e,10))}},n.getMid=function(e){let r=n.matchPrefix(e,"a=mid:")[0];if(r)return r.substring(6)},n.parseFingerprint=function(e){let n=e.substring(14).split(" ");return{algorithm:n[0].toLowerCase(),value:n[1].toUpperCase()}},n.getDtlsParameters=function(e,r){return{role:"auto",fingerprints:n.matchPrefix(e+r,"a=fingerprint:").map(n.parseFingerprint)}},n.writeDtlsParameters=function(e,n){let r="a=setup:"+n+"\r\n";return e.fingerprints.forEach(e=>{r+="a=fingerprint:"+e.algorithm+" "+e.value+"\r\n"}),r},n.parseCryptoLine=function(e){let n=e.substring(9).split(" ");return{tag:parseInt(n[0],10),cryptoSuite:n[1],keyParams:n[2],sessionParams:n.slice(3)}},n.writeCryptoLine=function(e){return"a=crypto:"+e.tag+" "+e.cryptoSuite+" "+("object"==typeof e.keyParams?n.writeCryptoKeyParams(e.keyParams):e.keyParams)+(e.sessionParams?" "+e.sessionParams.join(" "):"")+"\r\n"},n.parseCryptoKeyParams=function(e){if(0!==e.indexOf("inline:"))return null;let n=e.substring(7).split("|");return{keyMethod:"inline",keySalt:n[0],lifeTime:n[1],mkiValue:n[2]?n[2].split(":")[0]:void 0,mkiLength:n[2]?n[2].split(":")[1]:void 0}},n.writeCryptoKeyParams=function(e){return e.keyMethod+":"+e.keySalt+(e.lifeTime?"|"+e.lifeTime:"")+(e.mkiValue&&e.mkiLength?"|"+e.mkiValue+":"+e.mkiLength:"")},n.getCryptoParameters=function(e,r){return n.matchPrefix(e+r,"a=crypto:").map(n.parseCryptoLine)},n.getIceParameters=function(e,r){let i=n.matchPrefix(e+r,"a=ice-ufrag:")[0],o=n.matchPrefix(e+r,"a=ice-pwd:")[0];return i&&o?{usernameFragment:i.substring(12),password:o.substring(10)}:null},n.writeIceParameters=function(e){let n="a=ice-ufrag:"+e.usernameFragment+"\r\na=ice-pwd:"+e.password+"\r\n";return e.iceLite&&(n+="a=ice-lite\r\n"),n},n.parseRtpParameters=function(e){let r={codecs:[],headerExtensions:[],fecMechanisms:[],rtcp:[]},i=n.splitLines(e)[0].split(" ");r.profile=i[2];for(let o=3;o<i.length;o++){let s=i[o],a=n.matchPrefix(e,"a=rtpmap:"+s+" ")[0];if(a){let i=n.parseRtpMap(a),o=n.matchPrefix(e,"a=fmtp:"+s+" ");switch(i.parameters=o.length?n.parseFmtp(o[0]):{},i.rtcpFeedback=n.matchPrefix(e,"a=rtcp-fb:"+s+" ").map(n.parseRtcpFb),r.codecs.push(i),i.name.toUpperCase()){case"RED":case"ULPFEC":r.fecMechanisms.push(i.name.toUpperCase())}}}n.matchPrefix(e,"a=extmap:").forEach(e=>{r.headerExtensions.push(n.parseExtmap(e))});let o=n.matchPrefix(e,"a=rtcp-fb:* ").map(n.parseRtcpFb);return r.codecs.forEach(e=>{o.forEach(n=>{e.rtcpFeedback.find(e=>e.type===n.type&&e.parameter===n.parameter)||e.rtcpFeedback.push(n)})}),r},n.writeRtpDescription=function(e,r){let i="";i+="m="+e+" ",i+=r.codecs.length>0?"9":"0",i+=" "+(r.profile||"UDP/TLS/RTP/SAVPF")+" ",i+=r.codecs.map(e=>void 0!==e.preferredPayloadType?e.preferredPayloadType:e.payloadType).join(" ")+"\r\n",i+="c=IN IP4 0.0.0.0\r\n",i+="a=rtcp:9 IN IP4 0.0.0.0\r\n",r.codecs.forEach(e=>{i+=n.writeRtpMap(e),i+=n.writeFmtp(e),i+=n.writeRtcpFb(e)});let o=0;return r.codecs.forEach(e=>{e.maxptime>o&&(o=e.maxptime)}),o>0&&(i+="a=maxptime:"+o+"\r\n"),r.headerExtensions&&r.headerExtensions.forEach(e=>{i+=n.writeExtmap(e)}),i},n.parseRtpEncodingParameters=function(e){let r,i=[],o=n.parseRtpParameters(e),s=-1!==o.fecMechanisms.indexOf("RED"),a=-1!==o.fecMechanisms.indexOf("ULPFEC"),c=n.matchPrefix(e,"a=ssrc:").map(e=>n.parseSsrcMedia(e)).filter(e=>"cname"===e.attribute),l=c.length>0&&c[0].ssrc,u=n.matchPrefix(e,"a=ssrc-group:FID").map(e=>e.substring(17).split(" ").map(e=>parseInt(e,10)));u.length>0&&u[0].length>1&&u[0][0]===l&&(r=u[0][1]),o.codecs.forEach(e=>{if("RTX"===e.name.toUpperCase()&&e.parameters.apt){let n={ssrc:l,codecPayloadType:parseInt(e.parameters.apt,10)};l&&r&&(n.rtx={ssrc:r}),i.push(n),s&&((n=JSON.parse(JSON.stringify(n))).fec={ssrc:l,mechanism:a?"red+ulpfec":"red"},i.push(n))}}),0===i.length&&l&&i.push({ssrc:l});let d=n.matchPrefix(e,"b=");return d.length&&(d=0===d[0].indexOf("b=TIAS:")?parseInt(d[0].substring(7),10):0===d[0].indexOf("b=AS:")?1e3*parseInt(d[0].substring(5),10)*.95-16e3:void 0,i.forEach(e=>{e.maxBitrate=d})),i},n.parseRtcpParameters=function(e){let r={},i=n.matchPrefix(e,"a=ssrc:").map(e=>n.parseSsrcMedia(e)).filter(e=>"cname"===e.attribute)[0];i&&(r.cname=i.value,r.ssrc=i.ssrc);let o=n.matchPrefix(e,"a=rtcp-rsize");return r.reducedSize=o.length>0,r.compound=0===o.length,r.mux=n.matchPrefix(e,"a=rtcp-mux").length>0,r},n.writeRtcpParameters=function(e){let n="";return e.reducedSize&&(n+="a=rtcp-rsize\r\n"),e.mux&&(n+="a=rtcp-mux\r\n"),void 0!==e.ssrc&&e.cname&&(n+="a=ssrc:"+e.ssrc+" cname:"+e.cname+"\r\n"),n},n.parseMsid=function(e){let r,i=n.matchPrefix(e,"a=msid:");if(1===i.length)return{stream:(r=i[0].substring(7).split(" "))[0],track:r[1]};let o=n.matchPrefix(e,"a=ssrc:").map(e=>n.parseSsrcMedia(e)).filter(e=>"msid"===e.attribute);if(o.length>0)return{stream:(r=o[0].value.split(" "))[0],track:r[1]}},n.parseSctpDescription=function(e){let r,i=n.parseMLine(e),o=n.matchPrefix(e,"a=max-message-size:");o.length>0&&(r=parseInt(o[0].substring(19),10)),isNaN(r)&&(r=65536);let s=n.matchPrefix(e,"a=sctp-port:");if(s.length>0)return{port:parseInt(s[0].substring(12),10),protocol:i.fmt,maxMessageSize:r};let a=n.matchPrefix(e,"a=sctpmap:");if(a.length>0){let e=a[0].substring(10).split(" ");return{port:parseInt(e[0],10),protocol:e[1],maxMessageSize:r}}},n.writeSctpDescription=function(e,n){let r=[];return r="DTLS/SCTP"!==e.protocol?["m="+e.kind+" 9 "+e.protocol+" "+n.protocol+"\r\n","c=IN IP4 0.0.0.0\r\n","a=sctp-port:"+n.port+"\r\n"]:["m="+e.kind+" 9 "+e.protocol+" "+n.port+"\r\n","c=IN IP4 0.0.0.0\r\n","a=sctpmap:"+n.port+" "+n.protocol+" 65535\r\n"],void 0!==n.maxMessageSize&&r.push("a=max-message-size:"+n.maxMessageSize+"\r\n"),r.join("")},n.generateSessionId=function(){return Math.random().toString().substr(2,22)},n.writeSessionBoilerplate=function(e,r,i){return"v=0\r\no="+(i||"thisisadapterortc")+" "+(e||n.generateSessionId())+" "+(void 0!==r?r:2)+" IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\n"},n.getDirection=function(e,r){let i=n.splitLines(e);for(let e=0;e<i.length;e++)switch(i[e]){case"a=sendrecv":case"a=sendonly":case"a=recvonly":case"a=inactive":return i[e].substring(2)}return r?n.getDirection(r):"sendrecv"},n.getKind=function(e){return n.splitLines(e)[0].split(" ")[0].substring(2)},n.isRejected=function(e){return"0"===e.split(" ",2)[1]},n.parseMLine=function(e){let r=n.splitLines(e)[0].substring(2).split(" ");return{kind:r[0],port:parseInt(r[1],10),protocol:r[2],fmt:r.slice(3).join(" ")}},n.parseOLine=function(e){let r=n.matchPrefix(e,"o=")[0].substring(2).split(" ");return{username:r[0],sessionId:r[1],sessionVersion:parseInt(r[2],10),netType:r[3],addressType:r[4],address:r[5]}},n.isValidSDP=function(e){if("string"!=typeof e||0===e.length)return!1;let r=n.splitLines(e);for(let e=0;e<r.length;e++)if(r[e].length<2||"="!==r[e].charAt(1))return!1;return!0},e.exports=n},"../../node_modules/typewriter-effect/dist/core.js":function(e,n,r){var i,o=r("../../node_modules/process/browser.js");"undefined"!=typeof self&&self,e.exports=(()=>{var e={3146:(e,n,r)=>{for(var i=r(3491),o="undefined"==typeof window?r.g:window,s=["moz","webkit"],a="AnimationFrame",c=o["request"+a],l=o["cancel"+a]||o["cancelRequest"+a],u=0;!c&&u<s.length;u++)c=o[s[u]+"Request"+a],l=o[s[u]+"Cancel"+a]||o[s[u]+"CancelRequest"+a];if(!c||!l){var d=0,p=0,h=[],f=1e3/60;c=function(e){if(0===h.length){var n=i(),r=Math.max(0,f-(n-d));d=r+n,setTimeout(function(){var e=h.slice(0);h.length=0;for(var n=0;n<e.length;n++)if(!e[n].cancelled)try{e[n].callback(d)}catch(e){setTimeout(function(){throw e},0)}},Math.round(r))}return h.push({handle:++p,callback:e,cancelled:!1}),p},l=function(e){for(var n=0;n<h.length;n++)h[n].handle===e&&(h[n].cancelled=!0)}}e.exports=function(e){return c.call(o,e)},e.exports.cancel=function(){l.apply(o,arguments)},e.exports.polyfill=function(e){e||(e=o),e.requestAnimationFrame=c,e.cancelAnimationFrame=l}},3491:function(e){(function(){var n,r,i,s;"undefined"!=typeof performance&&null!==performance&&performance.now?e.exports=function(){return performance.now()}:null!=o&&o.hrtime?(e.exports=function(){return(n()-s)/1e6},r=o.hrtime,s=(n=function(){var e;return 1e9*(e=r())[0]+e[1]})()-1e9*o.uptime()):Date.now?(e.exports=function(){return Date.now()-i},i=Date.now()):(e.exports=function(){return(new Date).getTime()-i},i=(new Date).getTime())}).call(this)}},n={};function r(i){var o=n[i];if(void 0!==o)return o.exports;var s=n[i]={exports:{}};return e[i].call(s.exports,s,s.exports,r),s.exports}r.n=e=>{var n=e&&e.__esModule?()=>e.default:()=>e;return r.d(n,{a:n}),n},r.d=(e,n)=>{for(var i in n)r.o(n,i)&&!r.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:n[i]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,n)=>Object.prototype.hasOwnProperty.call(e,n);var i={};return(()=>{"use strict";r.d(i,{default:()=>T});var e=r(3146),n=r.n(e);let o=function(e){return new RegExp(/<[a-z][\s\S]*>/i).test(e)},s=function(e,n){return Math.floor(Math.random()*(n-e+1))+e};var a="TYPE_CHARACTER",c="REMOVE_CHARACTER",l="REMOVE_ALL",u="REMOVE_LAST_VISIBLE_NODE",d="PAUSE_FOR",p="CALL_FUNCTION",h="ADD_HTML_TAG_ELEMENT",f="CHANGE_DELETE_SPEED",m="CHANGE_DELAY",g="CHANGE_CURSOR",v="PASTE_STRING",y="HTML_TAG";function b(e){return(b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),r.push.apply(r,i)}return r}function w(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?_(Object(r),!0).forEach(function(n){S(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function O(e){return function(e){if(Array.isArray(e))return R(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,n){if(e){if("string"==typeof e)return R(e,void 0);var r=({}).toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?R(e,void 0):void 0}}(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function R(e,n){(null==n||n>e.length)&&(n=e.length);for(var r=0,i=Array(n);r<n;r++)i[r]=e[r];return i}function S(e,n,r){return(n=E(n))in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function E(e){var n=function(e){if("object"!=b(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=b(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==b(n)?n:n+""}let T=function(){var r;function i(r,b){var _=this;if(function(e,n){if(!(e instanceof n))throw TypeError("Cannot call a class as a function")}(this,i),S(this,"state",{cursorAnimation:null,lastFrameTime:null,pauseUntil:null,eventQueue:[],eventLoop:null,eventLoopPaused:!1,reverseCalledEvents:[],calledEvents:[],visibleNodes:[],initialOptions:null,elements:{container:null,wrapper:document.createElement("span"),cursor:document.createElement("span")}}),S(this,"options",{strings:null,cursor:"|",delay:"natural",pauseFor:1500,deleteSpeed:"natural",loop:!1,autoStart:!1,devMode:!1,skipAddStyles:!1,wrapperClassName:"Typewriter__wrapper",cursorClassName:"Typewriter__cursor",stringSplitter:null,onCreateTextNode:null,onRemoveNode:null}),S(this,"setupWrapperElement",function(){_.state.elements.container&&(_.state.elements.wrapper.className=_.options.wrapperClassName,_.state.elements.cursor.className=_.options.cursorClassName,_.state.elements.cursor.innerHTML=_.options.cursor,_.state.elements.container.innerHTML="",_.state.elements.container.appendChild(_.state.elements.wrapper),_.state.elements.container.appendChild(_.state.elements.cursor))}),S(this,"start",function(){return _.state.eventLoopPaused=!1,_.runEventLoop(),_}),S(this,"pause",function(){return _.state.eventLoopPaused=!0,_}),S(this,"stop",function(){return _.state.eventLoop&&((0,e.cancel)(_.state.eventLoop),_.state.eventLoop=null),_}),S(this,"pauseFor",function(e){return _.addEventToQueue(d,{ms:e}),_}),S(this,"typeOutAllStrings",function(){return"string"==typeof _.options.strings?_.typeString(_.options.strings).pauseFor(_.options.pauseFor):_.options.strings.forEach(function(e){_.typeString(e).pauseFor(_.options.pauseFor).deleteAll(_.options.deleteSpeed)}),_}),S(this,"typeString",function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(o(e))return _.typeOutHTMLString(e,n);if(e){var r=(_.options||{}).stringSplitter,i="function"==typeof r?r(e):e.split("");_.typeCharacters(i,n)}return _}),S(this,"pasteString",function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return o(e)?_.typeOutHTMLString(e,n,!0):(e&&_.addEventToQueue(v,{character:e,node:n}),_)}),S(this,"typeOutHTMLString",function(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=arguments.length>2?arguments[2]:void 0,o=((n=document.createElement("div")).innerHTML=e,n.childNodes);if(o.length>0)for(var s=0;s<o.length;s++){var a=o[s],c=a.innerHTML;a&&3!==a.nodeType?(a.innerHTML="",_.addEventToQueue(h,{node:a,parentNode:r}),i?_.pasteString(c,a):_.typeString(c,a)):a.textContent&&(i?_.pasteString(a.textContent,r):_.typeString(a.textContent,r))}return _}),S(this,"deleteAll",function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"natural";return _.addEventToQueue(l,{speed:e}),_}),S(this,"changeDeleteSpeed",function(e){if(!e)throw Error("Must provide new delete speed");return _.addEventToQueue(f,{speed:e}),_}),S(this,"changeDelay",function(e){if(!e)throw Error("Must provide new delay");return _.addEventToQueue(m,{delay:e}),_}),S(this,"changeCursor",function(e){if(!e)throw Error("Must provide new cursor");return _.addEventToQueue(g,{cursor:e}),_}),S(this,"deleteChars",function(e){if(!e)throw Error("Must provide amount of characters to delete");for(var n=0;n<e;n++)_.addEventToQueue(c);return _}),S(this,"callFunction",function(e,n){if(!e||"function"!=typeof e)throw Error("Callback must be a function");return _.addEventToQueue(p,{cb:e,thisArg:n}),_}),S(this,"typeCharacters",function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!e||!Array.isArray(e))throw Error("Characters must be an array");return e.forEach(function(e){_.addEventToQueue(a,{character:e,node:n})}),_}),S(this,"removeCharacters",function(e){if(!e||!Array.isArray(e))throw Error("Characters must be an array");return e.forEach(function(){_.addEventToQueue(c)}),_}),S(this,"addEventToQueue",function(e,n){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return _.addEventToStateProperty(e,n,r,"eventQueue")}),S(this,"addReverseCalledEvent",function(e,n){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return _.options.loop?_.addEventToStateProperty(e,n,r,"reverseCalledEvents"):_}),S(this,"addEventToStateProperty",function(e,n){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3?arguments[3]:void 0,o={eventName:e,eventArgs:n||{}};return _.state[i]=r?[o].concat(O(_.state[i])):[].concat(O(_.state[i]),[o]),_}),S(this,"runEventLoop",function(){_.state.lastFrameTime||(_.state.lastFrameTime=Date.now());var e=Date.now(),r=e-_.state.lastFrameTime;if(!_.state.eventQueue.length){if(!_.options.loop)return;_.state.eventQueue=O(_.state.calledEvents),_.state.calledEvents=[],_.options=w({},_.state.initialOptions)}if(_.state.eventLoop=n()(_.runEventLoop),!_.state.eventLoopPaused){if(_.state.pauseUntil){if(e<_.state.pauseUntil)return;_.state.pauseUntil=null}var i,o=O(_.state.eventQueue),b=o.shift();if(!(r<=(i=b.eventName===u||b.eventName===c?"natural"===_.options.deleteSpeed?s(40,80):_.options.deleteSpeed:"natural"===_.options.delay?s(120,160):_.options.delay))){var R=b.eventName,S=b.eventArgs;switch(_.logInDevMode({currentEvent:b,state:_.state,delay:i}),R){case v:case a:var E=S.character,T=S.node,M=document.createTextNode(E),x=M;_.options.onCreateTextNode&&"function"==typeof _.options.onCreateTextNode&&(x=_.options.onCreateTextNode(E,M)),x&&(T?T.appendChild(x):_.state.elements.wrapper.appendChild(x)),_.state.visibleNodes=[].concat(O(_.state.visibleNodes),[{type:"TEXT_NODE",character:E,node:x}]);break;case c:o.unshift({eventName:u,eventArgs:{removingCharacterNode:!0}});break;case d:var C=b.eventArgs.ms;_.state.pauseUntil=Date.now()+parseInt(C);break;case p:var I=b.eventArgs,j=I.cb,A=I.thisArg;j.call(A,{elements:_.state.elements});break;case h:var k=b.eventArgs,B=k.node,P=k.parentNode;P?P.appendChild(B):_.state.elements.wrapper.appendChild(B),_.state.visibleNodes=[].concat(O(_.state.visibleNodes),[{type:y,node:B,parentNode:P||_.state.elements.wrapper}]);break;case l:var N=_.state.visibleNodes,D=S.speed,L=[];D&&L.push({eventName:f,eventArgs:{speed:D,temp:!0}});for(var F=0,U=N.length;F<U;F++)L.push({eventName:u,eventArgs:{removingCharacterNode:!1}});D&&L.push({eventName:f,eventArgs:{speed:_.options.deleteSpeed,temp:!0}}),o.unshift.apply(o,L);break;case u:var q=b.eventArgs.removingCharacterNode;if(_.state.visibleNodes.length){var H=_.state.visibleNodes.pop(),V=H.type,X=H.node,W=H.character;_.options.onRemoveNode&&"function"==typeof _.options.onRemoveNode&&_.options.onRemoveNode({node:X,character:W}),X&&X.parentNode.removeChild(X),V===y&&q&&o.unshift({eventName:u,eventArgs:{}})}break;case f:_.options.deleteSpeed=b.eventArgs.speed;break;case m:_.options.delay=b.eventArgs.delay;break;case g:_.options.cursor=b.eventArgs.cursor,_.state.elements.cursor.innerHTML=b.eventArgs.cursor}_.options.loop&&(b.eventName===u||b.eventArgs&&b.eventArgs.temp||(_.state.calledEvents=[].concat(O(_.state.calledEvents),[b]))),_.state.eventQueue=o,_.state.lastFrameTime=e}}}),r)if("string"==typeof r){var R=document.querySelector(r);if(!R)throw Error("Could not find container element");this.state.elements.container=R}else this.state.elements.container=r;b&&(this.options=w(w({},this.options),b)),this.state.initialOptions=w({},this.options),this.init()}return r=[{key:"init",value:function(){var e;this.setupWrapperElement(),this.addEventToQueue(g,{cursor:this.options.cursor},!0),this.addEventToQueue(l,null,!0),!window||window.___TYPEWRITER_JS_STYLES_ADDED___||this.options.skipAddStyles||((e=document.createElement("style")).appendChild(document.createTextNode(".Typewriter__cursor{-webkit-animation:Typewriter-cursor 1s infinite;animation:Typewriter-cursor 1s infinite;margin-left:1px}@-webkit-keyframes Typewriter-cursor{0%{opacity:0}50%{opacity:1}100%{opacity:0}}@keyframes Typewriter-cursor{0%{opacity:0}50%{opacity:1}100%{opacity:0}}")),document.head.appendChild(e),window.___TYPEWRITER_JS_STYLES_ADDED___=!0),!0===this.options.autoStart&&this.options.strings&&this.typeOutAllStrings().start()}},{key:"logInDevMode",value:function(e){this.options.devMode&&console.log(e)}}],function(e,n){for(var r=0;r<n.length;r++){var i=n[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,E(i.key),i)}}(i.prototype,r),Object.defineProperty(i,"prototype",{writable:!1}),i}()})(),i.default})()},"../../node_modules/ua-parser-js/src/ua-parser.js":function(e,n){!function(r,i){"use strict";var o="function",s="undefined",a="object",c="string",l="major",u="model",d="name",p="type",h="vendor",f="version",m="architecture",g="console",v="mobile",y="tablet",b="smarttv",_="wearable",w="embedded",O="Amazon",R="Apple",S="ASUS",E="BlackBerry",T="Browser",M="Chrome",x="Firefox",C="Google",I="Huawei",j="Microsoft",A="Motorola",k="Opera",B="Samsung",P="Sharp",N="Sony",D="Xiaomi",L="Zebra",F="Facebook",U="Chromium OS",q="Mac OS",H=" Browser",V=function(e,n){var r={};for(var i in e)n[i]&&n[i].length%2==0?r[i]=n[i].concat(e[i]):r[i]=e[i];return r},X=function(e){for(var n={},r=0;r<e.length;r++)n[e[r].toUpperCase()]=e[r];return n},W=function(e,n){return typeof e===c&&-1!==$(n).indexOf($(e))},$=function(e){return e.toLowerCase()},z=function(e,n){if(typeof e===c)return e=e.replace(/^\s\s*/,""),typeof n===s?e:e.substring(0,500)},G=function(e,n){for(var r,s,c,l,u,d,p=0;p<n.length&&!u;){var h=n[p],f=n[p+1];for(r=s=0;r<h.length&&!u&&h[r];)if(u=h[r++].exec(e))for(c=0;c<f.length;c++)d=u[++s],typeof(l=f[c])===a&&l.length>0?2===l.length?typeof l[1]==o?this[l[0]]=l[1].call(this,d):this[l[0]]=l[1]:3===l.length?typeof l[1]!==o||l[1].exec&&l[1].test?this[l[0]]=d?d.replace(l[1],l[2]):void 0:this[l[0]]=d?l[1].call(this,d,l[2]):void 0:4===l.length&&(this[l[0]]=d?l[3].call(this,d.replace(l[1],l[2])):i):this[l]=d||i;p+=2}},K=function(e,n){for(var r in n)if(typeof n[r]===a&&n[r].length>0){for(var o=0;o<n[r].length;o++)if(W(n[r][o],e))return"?"===r?i:r}else if(W(n[r],e))return"?"===r?i:r;return n.hasOwnProperty("*")?n["*"]:e},Y={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2","8.1":"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},J={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[f,[d,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[f,[d,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[d,f],[/opios[\/ ]+([\w\.]+)/i],[f,[d,k+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[f,[d,k+" GX"]],[/\bopr\/([\w\.]+)/i],[f,[d,k]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[f,[d,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[f,[d,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon)\/([-\w\.]+)/i,/(heytap|ovi|115)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[d,f],[/quark(?:pc)?\/([-\w\.]+)/i],[f,[d,"Quark"]],[/\bddg\/([\w\.]+)/i],[f,[d,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[f,[d,"UC"+T]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[f,[d,"WeChat"]],[/konqueror\/([\w\.]+)/i],[f,[d,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[f,[d,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[f,[d,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[f,[d,"Smart Lenovo "+T]],[/(avast|avg)\/([\w\.]+)/i],[[d,/(.+)/,"$1 Secure "+T],f],[/\bfocus\/([\w\.]+)/i],[f,[d,x+" Focus"]],[/\bopt\/([\w\.]+)/i],[f,[d,k+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[f,[d,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[f,[d,"Dolphin"]],[/coast\/([\w\.]+)/i],[f,[d,k+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[f,[d,"MIUI"+H]],[/fxios\/([\w\.-]+)/i],[f,[d,x]],[/\bqihoobrowser\/?([\w\.]*)/i],[f,[d,"360"]],[/\b(qq)\/([\w\.]+)/i],[[d,/(.+)/,"$1Browser"],f],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[d,/(.+)/,"$1"+H],f],[/samsungbrowser\/([\w\.]+)/i],[f,[d,B+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[f,[d,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[d,"Sogou Mobile"],f],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[d,f],[/(lbbrowser|rekonq)/i,/\[(linkedin)app\]/i],[d],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[f,d],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[d,F],f],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[d,f],[/\bgsa\/([\w\.]+) .*safari\//i],[f,[d,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[f,[d,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[f,[d,M+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[d,M+" WebView"],f],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[f,[d,"Android "+T]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[d,f],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[f,[d,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[f,d],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[d,[f,K,{"1.0":"/8","1.2":"/1","1.3":"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}]],[/(webkit|khtml)\/([\w\.]+)/i],[d,f],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[d,"Netscape"],f],[/(wolvic|librewolf)\/([\w\.]+)/i],[d,f],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[f,[d,x+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i],[d,[f,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[d,[f,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[m,"amd64"]],[/(ia32(?=;))/i],[[m,$]],[/((?:i[346]|x)86)[;\)]/i],[[m,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[m,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[m,"armhf"]],[/windows (ce|mobile); ppc;/i],[[m,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[m,/ower/,"",$]],[/(sun4\w)[;\)]/i],[[m,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[m,$]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[u,[h,B],[p,y]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[u,[h,B],[p,v]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[u,[h,R],[p,v]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[u,[h,R],[p,y]],[/(macintosh);/i],[u,[h,R]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[u,[h,P],[p,v]],[/(?:honor)([-\w ]+)[;\)]/i],[u,[h,"Honor"],[p,v]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[u,[h,I],[p,y]],[/(?:huawei)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[u,[h,I],[p,v]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i],[[u,/_/g," "],[h,D],[p,v]],[/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[u,/_/g," "],[h,D],[p,y]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[u,[h,"OPPO"],[p,v]],[/\b(opd2\d{3}a?) bui/i],[u,[h,"OPPO"],[p,y]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[u,[h,"Vivo"],[p,v]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[u,[h,"Realme"],[p,v]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[u,[h,A],[p,v]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[u,[h,A],[p,y]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[u,[h,"LG"],[p,y]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[u,[h,"LG"],[p,v]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[u,[h,"Lenovo"],[p,y]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[u,/_/g," "],[h,"Nokia"],[p,v]],[/(pixel c)\b/i],[u,[h,C],[p,y]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[u,[h,C],[p,v]],[/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[u,[h,N],[p,v]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[u,"Xperia Tablet"],[h,N],[p,y]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[u,[h,"OnePlus"],[p,v]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[u,[h,O],[p,y]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[u,/(.+)/g,"Fire Phone $1"],[h,O],[p,v]],[/(playbook);[-\w\),; ]+(rim)/i],[u,h,[p,y]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[u,[h,E],[p,v]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[u,[h,S],[p,y]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[u,[h,S],[p,v]],[/(nexus 9)/i],[u,[h,"HTC"],[p,y]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[h,[u,/_/g," "],[p,v]],[/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])\w*(\)| bui)/i],[u,[h,"TCL"],[p,y]],[/(itel) ((\w+))/i],[[h,$],u,[p,K,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[u,[h,"Acer"],[p,y]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[u,[h,"Meizu"],[p,v]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[u,[h,"Ulefone"],[p,v]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[u,[h,"Energizer"],[p,v]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[u,[h,"Cat"],[p,v]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[u,[h,"Smartfren"],[p,v]],[/droid.+; (a(?:015|06[35]|142p?))/i],[u,[h,"Nothing"],[p,v]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (imo) ((?!tab)[\w ]+?)(?: bui|\))/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[h,u,[p,v]],[/(imo) (tab \w+)/i,/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[h,u,[p,y]],[/(surface duo)/i],[u,[h,j],[p,y]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[u,[h,"Fairphone"],[p,v]],[/(u304aa)/i],[u,[h,"AT&T"],[p,v]],[/\bsie-(\w*)/i],[u,[h,"Siemens"],[p,v]],[/\b(rct\w+) b/i],[u,[h,"RCA"],[p,y]],[/\b(venue[\d ]{2,7}) b/i],[u,[h,"Dell"],[p,y]],[/\b(q(?:mv|ta)\w+) b/i],[u,[h,"Verizon"],[p,y]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[u,[h,"Barnes & Noble"],[p,y]],[/\b(tm\d{3}\w+) b/i],[u,[h,"NuVision"],[p,y]],[/\b(k88) b/i],[u,[h,"ZTE"],[p,y]],[/\b(nx\d{3}j) b/i],[u,[h,"ZTE"],[p,v]],[/\b(gen\d{3}) b.+49h/i],[u,[h,"Swiss"],[p,v]],[/\b(zur\d{3}) b/i],[u,[h,"Swiss"],[p,y]],[/\b((zeki)?tb.*\b) b/i],[u,[h,"Zeki"],[p,y]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[h,"Dragon Touch"],u,[p,y]],[/\b(ns-?\w{0,9}) b/i],[u,[h,"Insignia"],[p,y]],[/\b((nxa|next)-?\w{0,9}) b/i],[u,[h,"NextBook"],[p,y]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[h,"Voice"],u,[p,v]],[/\b(lvtel\-)?(v1[12]) b/i],[[h,"LvTel"],u,[p,v]],[/\b(ph-1) /i],[u,[h,"Essential"],[p,v]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[u,[h,"Envizen"],[p,y]],[/\b(trio[-\w\. ]+) b/i],[u,[h,"MachSpeed"],[p,y]],[/\btu_(1491) b/i],[u,[h,"Rotor"],[p,y]],[/(shield[\w ]+) b/i],[u,[h,"Nvidia"],[p,y]],[/(sprint) (\w+)/i],[h,u,[p,v]],[/(kin\.[onetw]{3})/i],[[u,/\./g," "],[h,j],[p,v]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[u,[h,L],[p,y]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[u,[h,L],[p,v]],[/smart-tv.+(samsung)/i],[h,[p,b]],[/hbbtv.+maple;(\d+)/i],[[u,/^/,"SmartTV"],[h,B],[p,b]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[h,"LG"],[p,b]],[/(apple) ?tv/i],[h,[u,R+" TV"],[p,b]],[/crkey/i],[[u,M+"cast"],[h,C],[p,b]],[/droid.+aft(\w+)( bui|\))/i],[u,[h,O],[p,b]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[u,[h,P],[p,b]],[/(bravia[\w ]+)( bui|\))/i],[u,[h,N],[p,b]],[/(mitv-\w{5}) bui/i],[u,[h,D],[p,b]],[/Hbbtv.*(technisat) (.*);/i],[h,u,[p,b]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[h,z],[u,z],[p,b]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[p,b]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[h,u,[p,g]],[/droid.+; (shield) bui/i],[u,[h,"Nvidia"],[p,g]],[/(playstation [345portablevi]+)/i],[u,[h,N],[p,g]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[u,[h,j],[p,g]],[/\b(sm-[lr]\d\d[05][fnuw]?s?)\b/i],[u,[h,B],[p,_]],[/((pebble))app/i],[h,u,[p,_]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[u,[h,R],[p,_]],[/droid.+; (glass) \d/i],[u,[h,C],[p,_]],[/droid.+; (wt63?0{2,3})\)/i],[u,[h,L],[p,_]],[/droid.+; (glass) \d/i],[u,[h,C],[p,_]],[/(pico) (4|neo3(?: link|pro)?)/i],[h,u,[p,_]],[/; (quest( \d| pro)?)/i],[u,[h,F],[p,_]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[h,[p,w]],[/(aeobc)\b/i],[u,[h,O],[p,w]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[u,[p,v]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[u,[p,y]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[p,y]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[p,v]],[/(android[-\w\. ]{0,9});.+buil/i],[u,[h,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[f,[d,"EdgeHTML"]],[/(arkweb)\/([\w\.]+)/i],[d,f],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[f,[d,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[d,f],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[f,d]],os:[[/microsoft (windows) (vista|xp)/i],[d,f],[/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i],[d,[f,K,Y]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[f,K,Y],[d,"Windows"]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[f,/_/g,"."],[d,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[d,q],[f,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[f,d],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish|openharmony)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[d,f],[/\(bb(10);/i],[f,[d,E]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[f,[d,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[f,[d,x+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[f,[d,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[f,[d,"watchOS"]],[/crkey\/([\d\.]+)/i],[f,[d,M+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[d,U],f],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[d,f],[/(sunos) ?([\w\.\d]*)/i],[[d,"Solaris"],f],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[d,f]]},Q=function(e,n){if(typeof e===a&&(n=e,e=i),!(this instanceof Q))return new Q(e,n).getResult();var g=typeof r!==s&&r.navigator?r.navigator:i,b=e||(g&&g.userAgent?g.userAgent:""),_=g&&g.userAgentData?g.userAgentData:i,w=n?V(J,n):J,O=g&&g.userAgent==b;return this.getBrowser=function(){var e,n={};return n[d]=i,n[f]=i,G.call(n,b,w.browser),n[l]=typeof(e=n[f])===c?e.replace(/[^\d\.]/g,"").split(".")[0]:i,O&&g&&g.brave&&typeof g.brave.isBrave==o&&(n[d]="Brave"),n},this.getCPU=function(){var e={};return e[m]=i,G.call(e,b,w.cpu),e},this.getDevice=function(){var e={};return e[h]=i,e[u]=i,e[p]=i,G.call(e,b,w.device),O&&!e[p]&&_&&_.mobile&&(e[p]=v),O&&"Macintosh"==e[u]&&g&&typeof g.standalone!==s&&g.maxTouchPoints&&g.maxTouchPoints>2&&(e[u]="iPad",e[p]=y),e},this.getEngine=function(){var e={};return e[d]=i,e[f]=i,G.call(e,b,w.engine),e},this.getOS=function(){var e={};return e[d]=i,e[f]=i,G.call(e,b,w.os),O&&!e[d]&&_&&_.platform&&"Unknown"!=_.platform&&(e[d]=_.platform.replace(/chrome os/i,U).replace(/macos/i,q)),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return b},this.setUA=function(e){return b=typeof e===c&&e.length>500?z(e,500):e,this},this.setUA(b),this};Q.VERSION="1.0.40",Q.BROWSER=X([d,f,l]),Q.CPU=X([m]),Q.DEVICE=X([u,h,p,g,v,b,y,_,w]),Q.ENGINE=Q.OS=X([d,f]),typeof n!==s?(e.exports&&(n=e.exports=Q),n.UAParser=Q):typeof define===o&&define.amd?define(function(){return Q}):typeof r!==s&&(r.UAParser=Q);var Z=typeof r!==s&&(r.jQuery||r.Zepto);if(Z&&!Z.ua){var ee=new Q;Z.ua=ee.getResult(),Z.ua.get=function(){return ee.getUA()},Z.ua.set=function(e){ee.setUA(e);var n=ee.getResult();for(var r in n)Z.ua[r]=n[r]}}}("object"==typeof window?window:this)},"../../node_modules/core-js/internals/a-callable.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/is-callable.js"),o=r("../../node_modules/core-js/internals/try-to-string.js"),s=TypeError;e.exports=function(e){if(i(e))return e;throw new s(o(e)+" is not a function")}},"../../node_modules/core-js/internals/a-possible-prototype.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/is-possible-prototype.js"),o=String,s=TypeError;e.exports=function(e){if(i(e))return e;throw new s("Can't set "+o(e)+" as a prototype")}},"../../node_modules/core-js/internals/add-to-unscopables.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/well-known-symbol.js"),o=r("../../node_modules/core-js/internals/object-create.js"),s=r("../../node_modules/core-js/internals/object-define-property.js").f,a=i("unscopables"),c=Array.prototype;void 0===c[a]&&s(c,a,{configurable:!0,value:o(null)}),e.exports=function(e){c[a][e]=!0}},"../../node_modules/core-js/internals/an-object.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/is-object.js"),o=String,s=TypeError;e.exports=function(e){if(i(e))return e;throw new s(o(e)+" is not an object")}},"../../node_modules/core-js/internals/array-buffer-basic-detection.js":function(e){"use strict";e.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},"../../node_modules/core-js/internals/array-buffer-view-core.js":function(e,n,r){"use strict";var i,o,s,a=r("../../node_modules/core-js/internals/array-buffer-basic-detection.js"),c=r("../../node_modules/core-js/internals/descriptors.js"),l=r("../../node_modules/core-js/internals/global-this.js"),u=r("../../node_modules/core-js/internals/is-callable.js"),d=r("../../node_modules/core-js/internals/is-object.js"),p=r("../../node_modules/core-js/internals/has-own-property.js"),h=r("../../node_modules/core-js/internals/classof.js"),f=r("../../node_modules/core-js/internals/try-to-string.js"),m=r("../../node_modules/core-js/internals/create-non-enumerable-property.js"),g=r("../../node_modules/core-js/internals/define-built-in.js"),v=r("../../node_modules/core-js/internals/define-built-in-accessor.js"),y=r("../../node_modules/core-js/internals/object-is-prototype-of.js"),b=r("../../node_modules/core-js/internals/object-get-prototype-of.js"),_=r("../../node_modules/core-js/internals/object-set-prototype-of.js"),w=r("../../node_modules/core-js/internals/well-known-symbol.js"),O=r("../../node_modules/core-js/internals/uid.js"),R=r("../../node_modules/core-js/internals/internal-state.js"),S=R.enforce,E=R.get,T=l.Int8Array,M=T&&T.prototype,x=l.Uint8ClampedArray,C=x&&x.prototype,I=T&&b(T),j=M&&b(M),A=Object.prototype,k=l.TypeError,B=w("toStringTag"),P=O("TYPED_ARRAY_TAG"),N="TypedArrayConstructor",D=a&&!!_&&"Opera"!==h(l.opera),L=!1,F={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},U={BigInt64Array:8,BigUint64Array:8},q=function(e){var n=b(e);if(d(n)){var r=E(n);return r&&p(r,N)?r[N]:q(n)}},H=function(e){if(!d(e))return!1;var n=h(e);return p(F,n)||p(U,n)};for(i in F)(s=(o=l[i])&&o.prototype)?S(s)[N]=o:D=!1;for(i in U)(s=(o=l[i])&&o.prototype)&&(S(s)[N]=o);if((!D||!u(I)||I===Function.prototype)&&(I=function(){throw new k("Incorrect invocation")},D))for(i in F)l[i]&&_(l[i],I);if((!D||!j||j===A)&&(j=I.prototype,D))for(i in F)l[i]&&_(l[i].prototype,j);if(D&&b(C)!==j&&_(C,j),c&&!p(j,B))for(i in L=!0,v(j,B,{configurable:!0,get:function(){return d(this)?this[P]:void 0}}),F)l[i]&&m(l[i],P,i);e.exports={NATIVE_ARRAY_BUFFER_VIEWS:D,TYPED_ARRAY_TAG:L&&P,aTypedArray:function(e){if(H(e))return e;throw new k("Target is not a typed array")},aTypedArrayConstructor:function(e){if(u(e)&&(!_||y(I,e)))return e;throw new k(f(e)+" is not a typed array constructor")},exportTypedArrayMethod:function(e,n,r,i){if(c){if(r)for(var o in F){var s=l[o];if(s&&p(s.prototype,e))try{delete s.prototype[e]}catch(r){try{s.prototype[e]=n}catch(e){}}}(!j[e]||r)&&g(j,e,r?n:D&&M[e]||n,i)}},exportTypedArrayStaticMethod:function(e,n,r){var i,o;if(c){if(_){if(r){for(i in F)if((o=l[i])&&p(o,e))try{delete o[e]}catch(e){}}if(I[e]&&!r)return;try{return g(I,e,r?n:D&&I[e]||n)}catch(e){}}for(i in F)(o=l[i])&&(!o[e]||r)&&g(o,e,n)}},getTypedArrayConstructor:q,isView:function(e){if(!d(e))return!1;var n=h(e);return"DataView"===n||p(F,n)||p(U,n)},isTypedArray:H,TypedArray:I,TypedArrayPrototype:j}},"../../node_modules/core-js/internals/array-includes.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/to-indexed-object.js"),o=r("../../node_modules/core-js/internals/to-absolute-index.js"),s=r("../../node_modules/core-js/internals/length-of-array-like.js"),a=function(e){return function(n,r,a){var c,l=i(n),u=s(l);if(0===u)return!e&&-1;var d=o(a,u);if(e&&r!=r){for(;u>d;)if((c=l[d++])!=c)return!0}else for(;u>d;d++)if((e||d in l)&&l[d]===r)return e||d||0;return!e&&-1}};e.exports={includes:a(!0),indexOf:a(!1)}},"../../node_modules/core-js/internals/array-method-is-strict.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/fails.js");e.exports=function(e,n){var r=[][e];return!!r&&i(function(){r.call(null,n||function(){return 1},1)})}},"../../node_modules/core-js/internals/array-reduce.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/a-callable.js"),o=r("../../node_modules/core-js/internals/to-object.js"),s=r("../../node_modules/core-js/internals/indexed-object.js"),a=r("../../node_modules/core-js/internals/length-of-array-like.js"),c=TypeError,l="Reduce of empty array with no initial value",u=function(e){return function(n,r,u,d){var p=o(n),h=s(p),f=a(p);if(i(r),0===f&&u<2)throw new c(l);var m=e?f-1:0,g=e?-1:1;if(u<2)for(;;){if(m in h){d=h[m],m+=g;break}if(m+=g,e?m<0:f<=m)throw new c(l)}for(;e?m>=0:f>m;m+=g)m in h&&(d=r(d,h[m],m,p));return d}};e.exports={left:u(!1),right:u(!0)}},"../../node_modules/core-js/internals/classof-raw.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/function-uncurry-this.js"),o=i({}.toString),s=i("".slice);e.exports=function(e){return s(o(e),8,-1)}},"../../node_modules/core-js/internals/classof.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/to-string-tag-support.js"),o=r("../../node_modules/core-js/internals/is-callable.js"),s=r("../../node_modules/core-js/internals/classof-raw.js"),a=r("../../node_modules/core-js/internals/well-known-symbol.js")("toStringTag"),c=Object,l="Arguments"===s(function(){return arguments}()),u=function(e,n){try{return e[n]}catch(e){}};e.exports=i?s:function(e){var n,r,i;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=u(n=c(e),a))?r:l?s(n):"Object"===(i=s(n))&&o(n.callee)?"Arguments":i}},"../../node_modules/core-js/internals/copy-constructor-properties.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/has-own-property.js"),o=r("../../node_modules/core-js/internals/own-keys.js"),s=r("../../node_modules/core-js/internals/object-get-own-property-descriptor.js"),a=r("../../node_modules/core-js/internals/object-define-property.js");e.exports=function(e,n,r){for(var c=o(n),l=a.f,u=s.f,d=0;d<c.length;d++){var p=c[d];i(e,p)||r&&i(r,p)||l(e,p,u(n,p))}}},"../../node_modules/core-js/internals/correct-prototype-getter.js":function(e,n,r){"use strict";e.exports=!r("../../node_modules/core-js/internals/fails.js")(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})},"../../node_modules/core-js/internals/create-non-enumerable-property.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/descriptors.js"),o=r("../../node_modules/core-js/internals/object-define-property.js"),s=r("../../node_modules/core-js/internals/create-property-descriptor.js");e.exports=i?function(e,n,r){return o.f(e,n,s(1,r))}:function(e,n,r){return e[n]=r,e}},"../../node_modules/core-js/internals/create-property-descriptor.js":function(e){"use strict";e.exports=function(e,n){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:n}}},"../../node_modules/core-js/internals/define-built-in-accessor.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/make-built-in.js"),o=r("../../node_modules/core-js/internals/object-define-property.js");e.exports=function(e,n,r){return r.get&&i(r.get,n,{getter:!0}),r.set&&i(r.set,n,{setter:!0}),o.f(e,n,r)}},"../../node_modules/core-js/internals/define-built-in.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/is-callable.js"),o=r("../../node_modules/core-js/internals/object-define-property.js"),s=r("../../node_modules/core-js/internals/make-built-in.js"),a=r("../../node_modules/core-js/internals/define-global-property.js");e.exports=function(e,n,r,c){c||(c={});var l=c.enumerable,u=void 0!==c.name?c.name:n;if(i(r)&&s(r,u,c),c.global)l?e[n]=r:a(n,r);else{try{c.unsafe?e[n]&&(l=!0):delete e[n]}catch(e){}l?e[n]=r:o.f(e,n,{value:r,enumerable:!1,configurable:!c.nonConfigurable,writable:!c.nonWritable})}return e}},"../../node_modules/core-js/internals/define-global-property.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/global-this.js"),o=Object.defineProperty;e.exports=function(e,n){try{o(i,e,{value:n,configurable:!0,writable:!0})}catch(r){i[e]=n}return n}},"../../node_modules/core-js/internals/descriptors.js":function(e,n,r){"use strict";e.exports=!r("../../node_modules/core-js/internals/fails.js")(function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})},"../../node_modules/core-js/internals/document-create-element.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/global-this.js"),o=r("../../node_modules/core-js/internals/is-object.js"),s=i.document,a=o(s)&&o(s.createElement);e.exports=function(e){return a?s.createElement(e):{}}},"../../node_modules/core-js/internals/enum-bug-keys.js":function(e){"use strict";e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},"../../node_modules/core-js/internals/environment-is-node.js":function(e,n,r){"use strict";e.exports="NODE"===r("../../node_modules/core-js/internals/environment.js")},"../../node_modules/core-js/internals/environment-user-agent.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/global-this.js").navigator,o=i&&i.userAgent;e.exports=o?String(o):""},"../../node_modules/core-js/internals/environment-v8-version.js":function(e,n,r){"use strict";var i,o,s=r("../../node_modules/core-js/internals/global-this.js"),a=r("../../node_modules/core-js/internals/environment-user-agent.js"),c=s.process,l=s.Deno,u=c&&c.versions||l&&l.version,d=u&&u.v8;d&&(o=(i=d.split("."))[0]>0&&i[0]<4?1:+(i[0]+i[1])),!o&&a&&(!(i=a.match(/Edge\/(\d+)/))||i[1]>=74)&&(i=a.match(/Chrome\/(\d+)/))&&(o=+i[1]),e.exports=o},"../../node_modules/core-js/internals/environment.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/global-this.js"),o=r("../../node_modules/core-js/internals/environment-user-agent.js"),s=r("../../node_modules/core-js/internals/classof-raw.js"),a=function(e){return o.slice(0,e.length)===e};e.exports=a("Bun/")?"BUN":a("Cloudflare-Workers")?"CLOUDFLARE":a("Deno/")?"DENO":a("Node.js/")?"NODE":i.Bun&&"string"==typeof Bun.version?"BUN":i.Deno&&"object"==typeof Deno.version?"DENO":"process"===s(i.process)?"NODE":i.window&&i.document?"BROWSER":"REST"},"../../node_modules/core-js/internals/export.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/global-this.js"),o=r("../../node_modules/core-js/internals/object-get-own-property-descriptor.js").f,s=r("../../node_modules/core-js/internals/create-non-enumerable-property.js"),a=r("../../node_modules/core-js/internals/define-built-in.js"),c=r("../../node_modules/core-js/internals/define-global-property.js"),l=r("../../node_modules/core-js/internals/copy-constructor-properties.js"),u=r("../../node_modules/core-js/internals/is-forced.js");e.exports=function(e,n){var r,d,p,h,f,m=e.target,g=e.global,v=e.stat;if(r=g?i:v?i[m]||c(m,{}):i[m]&&i[m].prototype)for(d in n){if(h=n[d],p=e.dontCallGetSet?(f=o(r,d))&&f.value:r[d],!u(g?d:m+(v?".":"#")+d,e.forced)&&void 0!==p){if(typeof h==typeof p)continue;l(h,p)}(e.sham||p&&p.sham)&&s(h,"sham",!0),a(r,d,h,e)}}},"../../node_modules/core-js/internals/fails.js":function(e){"use strict";e.exports=function(e){try{return!!e()}catch(e){return!0}}},"../../node_modules/core-js/internals/function-bind-native.js":function(e,n,r){"use strict";e.exports=!r("../../node_modules/core-js/internals/fails.js")(function(){var e=(function(){}).bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})},"../../node_modules/core-js/internals/function-call.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/function-bind-native.js"),o=Function.prototype.call;e.exports=i?o.bind(o):function(){return o.apply(o,arguments)}},"../../node_modules/core-js/internals/function-name.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/descriptors.js"),o=r("../../node_modules/core-js/internals/has-own-property.js"),s=Function.prototype,a=i&&Object.getOwnPropertyDescriptor,c=o(s,"name"),l=c&&(!i||i&&a(s,"name").configurable);e.exports={EXISTS:c,PROPER:c&&"something"===(function(){}).name,CONFIGURABLE:l}},"../../node_modules/core-js/internals/function-uncurry-this-accessor.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/function-uncurry-this.js"),o=r("../../node_modules/core-js/internals/a-callable.js");e.exports=function(e,n,r){try{return i(o(Object.getOwnPropertyDescriptor(e,n)[r]))}catch(e){}}},"../../node_modules/core-js/internals/function-uncurry-this.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/function-bind-native.js"),o=Function.prototype,s=o.call,a=i&&o.bind.bind(s,s);e.exports=i?a:function(e){return function(){return s.apply(e,arguments)}}},"../../node_modules/core-js/internals/get-built-in.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/global-this.js"),o=r("../../node_modules/core-js/internals/is-callable.js");e.exports=function(e,n){var r;return arguments.length<2?o(r=i[e])?r:void 0:i[e]&&i[e][n]}},"../../node_modules/core-js/internals/get-method.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/a-callable.js"),o=r("../../node_modules/core-js/internals/is-null-or-undefined.js");e.exports=function(e,n){var r=e[n];return o(r)?void 0:i(r)}},"../../node_modules/core-js/internals/global-this.js":function(e,n,r){"use strict";var i=function(e){return e&&e.Math===Math&&e};e.exports=i("object"==typeof globalThis&&globalThis)||i("object"==typeof window&&window)||i("object"==typeof self&&self)||i("object"==typeof r.g&&r.g)||i("object"==typeof this&&this)||function(){return this}()||Function("return this")()},"../../node_modules/core-js/internals/has-own-property.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/function-uncurry-this.js"),o=r("../../node_modules/core-js/internals/to-object.js"),s=i({}.hasOwnProperty);e.exports=Object.hasOwn||function(e,n){return s(o(e),n)}},"../../node_modules/core-js/internals/hidden-keys.js":function(e){"use strict";e.exports={}},"../../node_modules/core-js/internals/html.js":function(e,n,r){"use strict";e.exports=r("../../node_modules/core-js/internals/get-built-in.js")("document","documentElement")},"../../node_modules/core-js/internals/ie8-dom-define.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/descriptors.js"),o=r("../../node_modules/core-js/internals/fails.js"),s=r("../../node_modules/core-js/internals/document-create-element.js");e.exports=!i&&!o(function(){return 7!==Object.defineProperty(s("div"),"a",{get:function(){return 7}}).a})},"../../node_modules/core-js/internals/indexed-object.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/function-uncurry-this.js"),o=r("../../node_modules/core-js/internals/fails.js"),s=r("../../node_modules/core-js/internals/classof-raw.js"),a=Object,c=i("".split);e.exports=o(function(){return!a("z").propertyIsEnumerable(0)})?function(e){return"String"===s(e)?c(e,""):a(e)}:a},"../../node_modules/core-js/internals/inspect-source.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/function-uncurry-this.js"),o=r("../../node_modules/core-js/internals/is-callable.js"),s=r("../../node_modules/core-js/internals/shared-store.js"),a=i(Function.toString);o(s.inspectSource)||(s.inspectSource=function(e){return a(e)}),e.exports=s.inspectSource},"../../node_modules/core-js/internals/internal-state.js":function(e,n,r){"use strict";var i,o,s,a=r("../../node_modules/core-js/internals/weak-map-basic-detection.js"),c=r("../../node_modules/core-js/internals/global-this.js"),l=r("../../node_modules/core-js/internals/is-object.js"),u=r("../../node_modules/core-js/internals/create-non-enumerable-property.js"),d=r("../../node_modules/core-js/internals/has-own-property.js"),p=r("../../node_modules/core-js/internals/shared-store.js"),h=r("../../node_modules/core-js/internals/shared-key.js"),f=r("../../node_modules/core-js/internals/hidden-keys.js"),m="Object already initialized",g=c.TypeError,v=c.WeakMap;if(a||p.state){var y=p.state||(p.state=new v);y.get=y.get,y.has=y.has,y.set=y.set,i=function(e,n){if(y.has(e))throw new g(m);return n.facade=e,y.set(e,n),n},o=function(e){return y.get(e)||{}},s=function(e){return y.has(e)}}else{var b=h("state");f[b]=!0,i=function(e,n){if(d(e,b))throw new g(m);return n.facade=e,u(e,b,n),n},o=function(e){return d(e,b)?e[b]:{}},s=function(e){return d(e,b)}}e.exports={set:i,get:o,has:s,enforce:function(e){return s(e)?o(e):i(e,{})},getterFor:function(e){return function(n){var r;if(!l(n)||(r=o(n)).type!==e)throw new g("Incompatible receiver, "+e+" required");return r}}}},"../../node_modules/core-js/internals/is-callable.js":function(e){"use strict";var n="object"==typeof document&&document.all;e.exports=void 0===n&&void 0!==n?function(e){return"function"==typeof e||e===n}:function(e){return"function"==typeof e}},"../../node_modules/core-js/internals/is-forced.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/fails.js"),o=r("../../node_modules/core-js/internals/is-callable.js"),s=/#|\.prototype\./,a=function(e,n){var r=l[c(e)];return r===d||r!==u&&(o(n)?i(n):!!n)},c=a.normalize=function(e){return String(e).replace(s,".").toLowerCase()},l=a.data={},u=a.NATIVE="N",d=a.POLYFILL="P";e.exports=a},"../../node_modules/core-js/internals/is-null-or-undefined.js":function(e){"use strict";e.exports=function(e){return null==e}},"../../node_modules/core-js/internals/is-object.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/is-callable.js");e.exports=function(e){return"object"==typeof e?null!==e:i(e)}},"../../node_modules/core-js/internals/is-possible-prototype.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/is-object.js");e.exports=function(e){return i(e)||null===e}},"../../node_modules/core-js/internals/is-pure.js":function(e){"use strict";e.exports=!1},"../../node_modules/core-js/internals/is-symbol.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/get-built-in.js"),o=r("../../node_modules/core-js/internals/is-callable.js"),s=r("../../node_modules/core-js/internals/object-is-prototype-of.js"),a=r("../../node_modules/core-js/internals/use-symbol-as-uid.js"),c=Object;e.exports=a?function(e){return"symbol"==typeof e}:function(e){var n=i("Symbol");return o(n)&&s(n.prototype,c(e))}},"../../node_modules/core-js/internals/length-of-array-like.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/to-length.js");e.exports=function(e){return i(e.length)}},"../../node_modules/core-js/internals/make-built-in.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/function-uncurry-this.js"),o=r("../../node_modules/core-js/internals/fails.js"),s=r("../../node_modules/core-js/internals/is-callable.js"),a=r("../../node_modules/core-js/internals/has-own-property.js"),c=r("../../node_modules/core-js/internals/descriptors.js"),l=r("../../node_modules/core-js/internals/function-name.js").CONFIGURABLE,u=r("../../node_modules/core-js/internals/inspect-source.js"),d=r("../../node_modules/core-js/internals/internal-state.js"),p=d.enforce,h=d.get,f=String,m=Object.defineProperty,g=i("".slice),v=i("".replace),y=i([].join),b=c&&!o(function(){return 8!==m(function(){},"length",{value:8}).length}),_=String(String).split("String"),w=e.exports=function(e,n,r){"Symbol("===g(f(n),0,7)&&(n="["+v(f(n),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),r&&r.getter&&(n="get "+n),r&&r.setter&&(n="set "+n),(!a(e,"name")||l&&e.name!==n)&&(c?m(e,"name",{value:n,configurable:!0}):e.name=n),b&&r&&a(r,"arity")&&e.length!==r.arity&&m(e,"length",{value:r.arity});try{r&&a(r,"constructor")&&r.constructor?c&&m(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var i=p(e);return a(i,"source")||(i.source=y(_,"string"==typeof n?n:"")),e};Function.prototype.toString=w(function(){return s(this)&&h(this).source||u(this)},"toString")},"../../node_modules/core-js/internals/math-trunc.js":function(e){"use strict";var n=Math.ceil,r=Math.floor;e.exports=Math.trunc||function(e){var i=+e;return(i>0?r:n)(i)}},"../../node_modules/core-js/internals/object-create.js":function(e,n,r){"use strict";var i,o=r("../../node_modules/core-js/internals/an-object.js"),s=r("../../node_modules/core-js/internals/object-define-properties.js"),a=r("../../node_modules/core-js/internals/enum-bug-keys.js"),c=r("../../node_modules/core-js/internals/hidden-keys.js"),l=r("../../node_modules/core-js/internals/html.js"),u=r("../../node_modules/core-js/internals/document-create-element.js"),d=r("../../node_modules/core-js/internals/shared-key.js"),p="prototype",h="script",f=d("IE_PROTO"),m=function(){},g=function(e){return"<"+h+">"+e+"</"+h+">"},v=function(e){e.write(g("")),e.close();var n=e.parentWindow.Object;return e=null,n},y=function(){var e,n=u("iframe");return n.style.display="none",l.appendChild(n),n.src=String("java"+h+":"),(e=n.contentWindow.document).open(),e.write(g("document.F=Object")),e.close(),e.F},b=function(){try{i=new ActiveXObject("htmlfile")}catch(e){}b="undefined"!=typeof document?document.domain&&i?v(i):y():v(i);for(var e=a.length;e--;)delete b[p][a[e]];return b()};c[f]=!0,e.exports=Object.create||function(e,n){var r;return null!==e?(m[p]=o(e),r=new m,m[p]=null,r[f]=e):r=b(),void 0===n?r:s.f(r,n)}},"../../node_modules/core-js/internals/object-define-properties.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/descriptors.js"),o=r("../../node_modules/core-js/internals/v8-prototype-define-bug.js"),s=r("../../node_modules/core-js/internals/object-define-property.js"),a=r("../../node_modules/core-js/internals/an-object.js"),c=r("../../node_modules/core-js/internals/to-indexed-object.js"),l=r("../../node_modules/core-js/internals/object-keys.js");n.f=i&&!o?Object.defineProperties:function(e,n){a(e);for(var r,i=c(n),o=l(n),u=o.length,d=0;u>d;)s.f(e,r=o[d++],i[r]);return e}},"../../node_modules/core-js/internals/object-define-property.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/descriptors.js"),o=r("../../node_modules/core-js/internals/ie8-dom-define.js"),s=r("../../node_modules/core-js/internals/v8-prototype-define-bug.js"),a=r("../../node_modules/core-js/internals/an-object.js"),c=r("../../node_modules/core-js/internals/to-property-key.js"),l=TypeError,u=Object.defineProperty,d=Object.getOwnPropertyDescriptor,p="enumerable",h="configurable",f="writable";n.f=i?s?function(e,n,r){if(a(e),n=c(n),a(r),"function"==typeof e&&"prototype"===n&&"value"in r&&f in r&&!r[f]){var i=d(e,n);i&&i[f]&&(e[n]=r.value,r={configurable:h in r?r[h]:i[h],enumerable:p in r?r[p]:i[p],writable:!1})}return u(e,n,r)}:u:function(e,n,r){if(a(e),n=c(n),a(r),o)try{return u(e,n,r)}catch(e){}if("get"in r||"set"in r)throw new l("Accessors not supported");return"value"in r&&(e[n]=r.value),e}},"../../node_modules/core-js/internals/object-get-own-property-descriptor.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/descriptors.js"),o=r("../../node_modules/core-js/internals/function-call.js"),s=r("../../node_modules/core-js/internals/object-property-is-enumerable.js"),a=r("../../node_modules/core-js/internals/create-property-descriptor.js"),c=r("../../node_modules/core-js/internals/to-indexed-object.js"),l=r("../../node_modules/core-js/internals/to-property-key.js"),u=r("../../node_modules/core-js/internals/has-own-property.js"),d=r("../../node_modules/core-js/internals/ie8-dom-define.js"),p=Object.getOwnPropertyDescriptor;n.f=i?p:function(e,n){if(e=c(e),n=l(n),d)try{return p(e,n)}catch(e){}if(u(e,n))return a(!o(s.f,e,n),e[n])}},"../../node_modules/core-js/internals/object-get-own-property-names.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/object-keys-internal.js"),o=r("../../node_modules/core-js/internals/enum-bug-keys.js").concat("length","prototype");n.f=Object.getOwnPropertyNames||function(e){return i(e,o)}},"../../node_modules/core-js/internals/object-get-own-property-symbols.js":function(e,n){"use strict";n.f=Object.getOwnPropertySymbols},"../../node_modules/core-js/internals/object-get-prototype-of.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/has-own-property.js"),o=r("../../node_modules/core-js/internals/is-callable.js"),s=r("../../node_modules/core-js/internals/to-object.js"),a=r("../../node_modules/core-js/internals/shared-key.js"),c=r("../../node_modules/core-js/internals/correct-prototype-getter.js"),l=a("IE_PROTO"),u=Object,d=u.prototype;e.exports=c?u.getPrototypeOf:function(e){var n=s(e);if(i(n,l))return n[l];var r=n.constructor;return o(r)&&n instanceof r?r.prototype:n instanceof u?d:null}},"../../node_modules/core-js/internals/object-is-prototype-of.js":function(e,n,r){"use strict";e.exports=r("../../node_modules/core-js/internals/function-uncurry-this.js")({}.isPrototypeOf)},"../../node_modules/core-js/internals/object-keys-internal.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/function-uncurry-this.js"),o=r("../../node_modules/core-js/internals/has-own-property.js"),s=r("../../node_modules/core-js/internals/to-indexed-object.js"),a=r("../../node_modules/core-js/internals/array-includes.js").indexOf,c=r("../../node_modules/core-js/internals/hidden-keys.js"),l=i([].push);e.exports=function(e,n){var r,i=s(e),u=0,d=[];for(r in i)!o(c,r)&&o(i,r)&&l(d,r);for(;n.length>u;)o(i,r=n[u++])&&(~a(d,r)||l(d,r));return d}},"../../node_modules/core-js/internals/object-keys.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/object-keys-internal.js"),o=r("../../node_modules/core-js/internals/enum-bug-keys.js");e.exports=Object.keys||function(e){return i(e,o)}},"../../node_modules/core-js/internals/object-property-is-enumerable.js":function(e,n){"use strict";var r={}.propertyIsEnumerable,i=Object.getOwnPropertyDescriptor;n.f=i&&!r.call({1:2},1)?function(e){var n=i(this,e);return!!n&&n.enumerable}:r},"../../node_modules/core-js/internals/object-set-prototype-of.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/function-uncurry-this-accessor.js"),o=r("../../node_modules/core-js/internals/is-object.js"),s=r("../../node_modules/core-js/internals/require-object-coercible.js"),a=r("../../node_modules/core-js/internals/a-possible-prototype.js");e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,n=!1,r={};try{(e=i(Object.prototype,"__proto__","set"))(r,[]),n=r instanceof Array}catch(e){}return function(r,i){return s(r),a(i),o(r)&&(n?e(r,i):r.__proto__=i),r}}():void 0)},"../../node_modules/core-js/internals/ordinary-to-primitive.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/function-call.js"),o=r("../../node_modules/core-js/internals/is-callable.js"),s=r("../../node_modules/core-js/internals/is-object.js"),a=TypeError;e.exports=function(e,n){var r,c;if("string"===n&&o(r=e.toString)&&!s(c=i(r,e))||o(r=e.valueOf)&&!s(c=i(r,e))||"string"!==n&&o(r=e.toString)&&!s(c=i(r,e)))return c;throw new a("Can't convert object to primitive value")}},"../../node_modules/core-js/internals/own-keys.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/get-built-in.js"),o=r("../../node_modules/core-js/internals/function-uncurry-this.js"),s=r("../../node_modules/core-js/internals/object-get-own-property-names.js"),a=r("../../node_modules/core-js/internals/object-get-own-property-symbols.js"),c=r("../../node_modules/core-js/internals/an-object.js"),l=o([].concat);e.exports=i("Reflect","ownKeys")||function(e){var n=s.f(c(e)),r=a.f;return r?l(n,r(e)):n}},"../../node_modules/core-js/internals/require-object-coercible.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/is-null-or-undefined.js"),o=TypeError;e.exports=function(e){if(i(e))throw new o("Can't call method on "+e);return e}},"../../node_modules/core-js/internals/shared-key.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/shared.js"),o=r("../../node_modules/core-js/internals/uid.js"),s=i("keys");e.exports=function(e){return s[e]||(s[e]=o(e))}},"../../node_modules/core-js/internals/shared-store.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/is-pure.js"),o=r("../../node_modules/core-js/internals/global-this.js"),s=r("../../node_modules/core-js/internals/define-global-property.js"),a="__core-js_shared__",c=e.exports=o[a]||s(a,{});(c.versions||(c.versions=[])).push({version:"3.44.0",mode:i?"pure":"global",copyright:"\xa9 2014-2025 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.44.0/LICENSE",source:"https://github.com/zloirock/core-js"})},"../../node_modules/core-js/internals/shared.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/shared-store.js");e.exports=function(e,n){return i[e]||(i[e]=n||{})}},"../../node_modules/core-js/internals/symbol-constructor-detection.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/environment-v8-version.js"),o=r("../../node_modules/core-js/internals/fails.js"),s=r("../../node_modules/core-js/internals/global-this.js").String;e.exports=!!Object.getOwnPropertySymbols&&!o(function(){var e=Symbol("symbol detection");return!s(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&i&&i<41})},"../../node_modules/core-js/internals/to-absolute-index.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/to-integer-or-infinity.js"),o=Math.max,s=Math.min;e.exports=function(e,n){var r=i(e);return r<0?o(r+n,0):s(r,n)}},"../../node_modules/core-js/internals/to-indexed-object.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/indexed-object.js"),o=r("../../node_modules/core-js/internals/require-object-coercible.js");e.exports=function(e){return i(o(e))}},"../../node_modules/core-js/internals/to-integer-or-infinity.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/math-trunc.js");e.exports=function(e){var n=+e;return n!=n||0===n?0:i(n)}},"../../node_modules/core-js/internals/to-length.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/to-integer-or-infinity.js"),o=Math.min;e.exports=function(e){var n=i(e);return n>0?o(n,0x1fffffffffffff):0}},"../../node_modules/core-js/internals/to-object.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/require-object-coercible.js"),o=Object;e.exports=function(e){return o(i(e))}},"../../node_modules/core-js/internals/to-offset.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/to-positive-integer.js"),o=RangeError;e.exports=function(e,n){var r=i(e);if(r%n)throw new o("Wrong offset");return r}},"../../node_modules/core-js/internals/to-positive-integer.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/to-integer-or-infinity.js"),o=RangeError;e.exports=function(e){var n=i(e);if(n<0)throw new o("The argument can't be less than 0");return n}},"../../node_modules/core-js/internals/to-primitive.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/function-call.js"),o=r("../../node_modules/core-js/internals/is-object.js"),s=r("../../node_modules/core-js/internals/is-symbol.js"),a=r("../../node_modules/core-js/internals/get-method.js"),c=r("../../node_modules/core-js/internals/ordinary-to-primitive.js"),l=r("../../node_modules/core-js/internals/well-known-symbol.js"),u=TypeError,d=l("toPrimitive");e.exports=function(e,n){if(!o(e)||s(e))return e;var r,l=a(e,d);if(l){if(void 0===n&&(n="default"),!o(r=i(l,e,n))||s(r))return r;throw new u("Can't convert object to primitive value")}return void 0===n&&(n="number"),c(e,n)}},"../../node_modules/core-js/internals/to-property-key.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/to-primitive.js"),o=r("../../node_modules/core-js/internals/is-symbol.js");e.exports=function(e){var n=i(e,"string");return o(n)?n:n+""}},"../../node_modules/core-js/internals/to-string-tag-support.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/well-known-symbol.js")("toStringTag"),o={};o[i]="z",e.exports="[object z]"===String(o)},"../../node_modules/core-js/internals/try-to-string.js":function(e){"use strict";var n=String;e.exports=function(e){try{return n(e)}catch(e){return"Object"}}},"../../node_modules/core-js/internals/uid.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/function-uncurry-this.js"),o=0,s=Math.random(),a=i(1.1.toString);e.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+a(++o+s,36)}},"../../node_modules/core-js/internals/use-symbol-as-uid.js":function(e,n,r){"use strict";e.exports=r("../../node_modules/core-js/internals/symbol-constructor-detection.js")&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},"../../node_modules/core-js/internals/v8-prototype-define-bug.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/descriptors.js"),o=r("../../node_modules/core-js/internals/fails.js");e.exports=i&&o(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype})},"../../node_modules/core-js/internals/weak-map-basic-detection.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/global-this.js"),o=r("../../node_modules/core-js/internals/is-callable.js"),s=i.WeakMap;e.exports=o(s)&&/native code/.test(String(s))},"../../node_modules/core-js/internals/well-known-symbol.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/global-this.js"),o=r("../../node_modules/core-js/internals/shared.js"),s=r("../../node_modules/core-js/internals/has-own-property.js"),a=r("../../node_modules/core-js/internals/uid.js"),c=r("../../node_modules/core-js/internals/symbol-constructor-detection.js"),l=r("../../node_modules/core-js/internals/use-symbol-as-uid.js"),u=i.Symbol,d=o("wks"),p=l?u.for||u:u&&u.withoutSetter||a;e.exports=function(e){return s(d,e)||(d[e]=c&&s(u,e)?u[e]:p("Symbol."+e)),d[e]}},"../../node_modules/core-js/modules/es.array.includes.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/export.js"),o=r("../../node_modules/core-js/internals/array-includes.js").includes,s=r("../../node_modules/core-js/internals/fails.js"),a=r("../../node_modules/core-js/internals/add-to-unscopables.js");i({target:"Array",proto:!0,forced:s(function(){return![,].includes()})},{includes:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}}),a("includes")},"../../node_modules/core-js/modules/es.array.reduce.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/export.js"),o=r("../../node_modules/core-js/internals/array-reduce.js").left,s=r("../../node_modules/core-js/internals/array-method-is-strict.js"),a=r("../../node_modules/core-js/internals/environment-v8-version.js");i({target:"Array",proto:!0,forced:!r("../../node_modules/core-js/internals/environment-is-node.js")&&a>79&&a<83||!s("reduce")},{reduce:function(e){var n=arguments.length;return o(this,e,n,n>1?arguments[1]:void 0)}})},"../../node_modules/core-js/modules/es.object.has-own.js":function(e,n,r){"use strict";r("../../node_modules/core-js/internals/export.js")({target:"Object",stat:!0},{hasOwn:r("../../node_modules/core-js/internals/has-own-property.js")})},"../../node_modules/core-js/modules/es.typed-array.set.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/global-this.js"),o=r("../../node_modules/core-js/internals/function-call.js"),s=r("../../node_modules/core-js/internals/array-buffer-view-core.js"),a=r("../../node_modules/core-js/internals/length-of-array-like.js"),c=r("../../node_modules/core-js/internals/to-offset.js"),l=r("../../node_modules/core-js/internals/to-object.js"),u=r("../../node_modules/core-js/internals/fails.js"),d=i.RangeError,p=i.Int8Array,h=p&&p.prototype,f=h&&h.set,m=s.aTypedArray,g=s.exportTypedArrayMethod,v=!u(function(){var e=new Uint8ClampedArray(2);return o(f,e,{length:1,0:3},1),3!==e[1]}),y=v&&s.NATIVE_ARRAY_BUFFER_VIEWS&&u(function(){var e=new p(2);return e.set(1),e.set("2",1),0!==e[0]||2!==e[1]});g("set",function(e){m(this);var n=c(arguments.length>1?arguments[1]:void 0,1),r=l(e);if(v)return o(f,this,r,n);var i=this.length,s=a(r),u=0;if(s+n>i)throw new d("Wrong length");for(;u<s;)this[n+u]=r[u++]},!v||y)},"../../node_modules/reflect-metadata/Reflect.js":function(e,n,r){var i,o;o=i||(i={}),function(e){var n="object"==typeof globalThis?globalThis:"object"==typeof r.g?r.g:"object"==typeof self?self:"object"==typeof this?this:function(){try{return Function("return this;")()}catch(e){}}()||function(){try{return(0,eval)("(function() { return this; })()")}catch(e){}}(),i=s(o);function s(e,n){return function(r,i){Object.defineProperty(e,r,{configurable:!0,writable:!0,value:i}),n&&n(r,i)}}void 0!==n.Reflect&&(i=s(n.Reflect,i)),e(i,n),void 0===n.Reflect&&(n.Reflect=o)}(function(e,n){var r,i=Object.prototype.hasOwnProperty,o="function"==typeof Symbol,s=o&&void 0!==Symbol.toPrimitive?Symbol.toPrimitive:"@@toPrimitive",a=o&&void 0!==Symbol.iterator?Symbol.iterator:"@@iterator",c="function"==typeof Object.create,l=({__proto__:[]})instanceof Array,u=!c&&!l,d={create:c?function(){return L(Object.create(null))}:l?function(){return L({__proto__:null})}:function(){return L({})},has:u?function(e,n){return i.call(e,n)}:function(e,n){return n in e},get:u?function(e,n){return i.call(e,n)?e[n]:void 0}:function(e,n){return e[n]}},p=Object.getPrototypeOf(Function),h="function"==typeof Map&&"function"==typeof Map.prototype.entries?Map:function(){var e={},n=[],r=function(){function e(e,n,r){this._index=0,this._keys=e,this._values=n,this._selector=r}return e.prototype["@@iterator"]=function(){return this},e.prototype[a]=function(){return this},e.prototype.next=function(){var e=this._index;if(e>=0&&e<this._keys.length){var r=this._selector(this._keys[e],this._values[e]);return e+1>=this._keys.length?(this._index=-1,this._keys=n,this._values=n):this._index++,{value:r,done:!1}}return{value:void 0,done:!0}},e.prototype.throw=function(e){throw this._index>=0&&(this._index=-1,this._keys=n,this._values=n),e},e.prototype.return=function(e){return this._index>=0&&(this._index=-1,this._keys=n,this._values=n),{value:e,done:!0}},e}();function i(){this._keys=[],this._values=[],this._cacheKey=e,this._cacheIndex=-2}return Object.defineProperty(i.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),i.prototype.has=function(e){return this._find(e,!1)>=0},i.prototype.get=function(e){var n=this._find(e,!1);return n>=0?this._values[n]:void 0},i.prototype.set=function(e,n){var r=this._find(e,!0);return this._values[r]=n,this},i.prototype.delete=function(n){var r=this._find(n,!1);if(r>=0){for(var i=this._keys.length,o=r+1;o<i;o++)this._keys[o-1]=this._keys[o],this._values[o-1]=this._values[o];return this._keys.length--,this._values.length--,j(n,this._cacheKey)&&(this._cacheKey=e,this._cacheIndex=-2),!0}return!1},i.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=e,this._cacheIndex=-2},i.prototype.keys=function(){return new r(this._keys,this._values,o)},i.prototype.values=function(){return new r(this._keys,this._values,s)},i.prototype.entries=function(){return new r(this._keys,this._values,c)},i.prototype["@@iterator"]=function(){return this.entries()},i.prototype[a]=function(){return this.entries()},i.prototype._find=function(e,n){if(!j(this._cacheKey,e)){this._cacheIndex=-1;for(var r=0;r<this._keys.length;r++)if(j(this._keys[r],e)){this._cacheIndex=r;break}}return this._cacheIndex<0&&n&&(this._cacheIndex=this._keys.length,this._keys.push(e),this._values.push(void 0)),this._cacheIndex},i;function o(e,n){return e}function s(e,n){return n}function c(e,n){return[e,n]}}(),f="function"==typeof Set&&"function"==typeof Set.prototype.entries?Set:function(){function e(){this._map=new h}return Object.defineProperty(e.prototype,"size",{get:function(){return this._map.size},enumerable:!0,configurable:!0}),e.prototype.has=function(e){return this._map.has(e)},e.prototype.add=function(e){return this._map.set(e,e),this},e.prototype.delete=function(e){return this._map.delete(e)},e.prototype.clear=function(){this._map.clear()},e.prototype.keys=function(){return this._map.keys()},e.prototype.values=function(){return this._map.keys()},e.prototype.entries=function(){return this._map.entries()},e.prototype["@@iterator"]=function(){return this.keys()},e.prototype[a]=function(){return this.keys()},e}(),m="function"==typeof WeakMap?WeakMap:function(){var e=d.create(),n=o();function r(){this._key=o()}return r.prototype.has=function(e){var n=s(e,!1);return void 0!==n&&d.has(n,this._key)},r.prototype.get=function(e){var n=s(e,!1);return void 0!==n?d.get(n,this._key):void 0},r.prototype.set=function(e,n){return s(e,!0)[this._key]=n,this},r.prototype.delete=function(e){var n=s(e,!1);return void 0!==n&&delete n[this._key]},r.prototype.clear=function(){this._key=o()},r;function o(){var n;do n="@@WeakMap@@"+function(){var e=function(e){if("function"==typeof Uint8Array){var n=new Uint8Array(16);return"undefined"!=typeof crypto?crypto.getRandomValues(n):"undefined"!=typeof msCrypto?msCrypto.getRandomValues(n):a(n,16),n}return a(Array(e),e)}(16);e[6]=79&e[6]|64,e[8]=191&e[8]|128;for(var n="",r=0;r<16;++r){var i=e[r];(4===r||6===r||8===r)&&(n+="-"),i<16&&(n+="0"),n+=i.toString(16).toLowerCase()}return n}();while(d.has(e,n));return e[n]=!0,n}function s(e,r){if(!i.call(e,n)){if(!r)return;Object.defineProperty(e,n,{value:d.create()})}return e[n]}function a(e,n){for(var r=0;r<n;++r)e[r]=255*Math.random()|0;return e}}(),g=o?Symbol.for("@reflect-metadata:registry"):void 0,v=(!S(g)&&T(n.Reflect)&&Object.isExtensible(n.Reflect)&&(r=n.Reflect[g]),S(r)&&(r=function(){S(g)||void 0===n.Reflect||g in n.Reflect||"function"!=typeof n.Reflect.defineMetadata||(r=(e=n.Reflect).defineMetadata,i=e.hasOwnMetadata,o=e.getOwnMetadata,s=e.getOwnMetadataKeys,a=e.deleteMetadata,c=new m,l={isProviderFor:function(e,n){var r=c.get(e);return!!(!S(r)&&r.has(n))||!!s(e,n).length&&(S(r)&&(r=new f,c.set(e,r)),r.add(n),!0)},OrdinaryDefineOwnMetadata:r,OrdinaryHasOwnMetadata:i,OrdinaryGetOwnMetadata:o,OrdinaryOwnMetadataKeys:s,OrdinaryDeleteMetadata:a});var e,r,i,o,s,a,c,l,u,d,p,v=new m,y={registerProvider:function(e){if(!Object.isExtensible(y))throw Error("Cannot add provider to a frozen registry.");switch(!0){case l===e:break;case S(u):u=e;break;case u===e:break;case S(d):d=e;break;case d===e:break;default:void 0===p&&(p=new f),p.add(e)}},getProvider:b,setProvider:function(e,n,r){if(!function(e){if(S(e))throw TypeError();return u===e||d===e||!S(p)&&p.has(e)}(r))throw Error("Metadata provider not registered.");var i=b(e,n);if(i!==r){if(!S(i))return!1;var o=v.get(e);S(o)&&(o=new h,v.set(e,o)),o.set(n,r)}return!0}};return y;function b(e,n){var r,i=v.get(e);return S(i)||(r=i.get(n)),S(r)&&(r=function(e,n){if(!S(u)){if(u.isProviderFor(e,n))return u;if(!S(d)){if(d.isProviderFor(e,n))return u;if(!S(p))for(var r=k(p);;){var i=B(r);if(!i)return;var o=i.value;if(o.isProviderFor(e,n))return P(r),o}}}if(!S(l)&&l.isProviderFor(e,n))return l}(e,n),S(r)||(S(i)&&(i=new h,v.set(e,i)),i.set(n,r))),r}}()),!S(g)&&T(n.Reflect)&&Object.isExtensible(n.Reflect)&&Object.defineProperty(n.Reflect,g,{enumerable:!1,configurable:!1,writable:!1,value:r}),r),y=function(e){var n=new m,r={isProviderFor:function(e,r){var i=n.get(e);return!S(i)&&i.has(r)},OrdinaryDefineOwnMetadata:function(e,n,r,o){i(r,o,!0).set(e,n)},OrdinaryHasOwnMetadata:function(e,n,r){var o=i(n,r,!1);return!S(o)&&!!o.has(e)},OrdinaryGetOwnMetadata:function(e,n,r){var o=i(n,r,!1);if(!S(o))return o.get(e)},OrdinaryOwnMetadataKeys:function(e,n){var r=[],o=i(e,n,!1);if(S(o))return r;for(var s=k(o.keys()),a=0;;){var c=B(s);if(!c)return r.length=a,r;var l=c.value;try{r[a]=l}catch(e){try{P(s)}finally{throw e}}a++}},OrdinaryDeleteMetadata:function(e,r,o){var s=i(r,o,!1);if(S(s)||!s.delete(e))return!1;if(0===s.size){var a=n.get(r);S(a)||(a.delete(o),0===a.size&&n.delete(a))}return!0}};return v.registerProvider(r),r;function i(i,o,s){var a=n.get(i),c=!1;if(S(a)){if(!s)return;a=new h,n.set(i,a),c=!0}var l=a.get(o);if(S(l)){if(!s)return;if(l=new h,a.set(o,l),!e.setProvider(i,o,r))throw a.delete(o),c&&n.delete(i),Error("Wrong provider for target.")}return l}}(v);function b(e,n,r){var i=D(n,r,!1);return!S(i)&&!!i.OrdinaryHasOwnMetadata(e,n,r)}function _(e,n,r){var i=D(n,r,!1);if(!S(i))return i.OrdinaryGetOwnMetadata(e,n,r)}function w(e,n,r,i){D(r,i,!0).OrdinaryDefineOwnMetadata(e,n,r,i)}function O(e,n){var r=D(e,n,!1);return r?r.OrdinaryOwnMetadataKeys(e,n):[]}function R(e){if(null===e)return 1;switch(typeof e){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return null===e?1:6;default:return 6}}function S(e){return void 0===e}function E(e){return null===e}function T(e){return"object"==typeof e?null!==e:"function"==typeof e}e("decorate",function(e,n,r,i){if(S(r)){if(!x(e)||!I(n))throw TypeError();for(var o=e,s=n,a=o.length-1;a>=0;--a){var c=(0,o[a])(s);if(!S(c)&&!E(c)){if(!I(c))throw TypeError();s=c}}return s}if(!x(e)||!T(n)||!T(i)&&!S(i)&&!E(i))throw TypeError();return E(i)&&(i=void 0),function(e,n,r,i){for(var o=e.length-1;o>=0;--o){var s=(0,e[o])(n,r,i);if(!S(s)&&!E(s)){if(!T(s))throw TypeError();i=s}}return i}(e,n,r=M(r),i)}),e("metadata",function(e,n){return function(r,i){if(!T(r)||!S(i)&&!function(e){switch(R(e)){case 3:case 4:return!0;default:return!1}}(i))throw TypeError();w(e,n,r,i)}}),e("defineMetadata",function(e,n,r,i){if(!T(r))throw TypeError();return S(i)||(i=M(i)),w(e,n,r,i)}),e("hasMetadata",function(e,n,r){if(!T(n))throw TypeError();return S(r)||(r=M(r)),function e(n,r,i){if(b(n,r,i))return!0;var o=N(r);return!E(o)&&e(n,o,i)}(e,n,r)}),e("hasOwnMetadata",function(e,n,r){if(!T(n))throw TypeError();return S(r)||(r=M(r)),b(e,n,r)}),e("getMetadata",function(e,n,r){if(!T(n))throw TypeError();return S(r)||(r=M(r)),function e(n,r,i){if(b(n,r,i))return _(n,r,i);var o=N(r);if(!E(o))return e(n,o,i)}(e,n,r)}),e("getOwnMetadata",function(e,n,r){if(!T(n))throw TypeError();return S(r)||(r=M(r)),_(e,n,r)}),e("getMetadataKeys",function(e,n){if(!T(e))throw TypeError();return S(n)||(n=M(n)),function e(n,r){var i=O(n,r),o=N(n);if(null===o)return i;var s=e(o,r);if(s.length<=0)return i;if(i.length<=0)return s;for(var a=new f,c=[],l=0;l<i.length;l++){var u=i[l],d=a.has(u);d||(a.add(u),c.push(u))}for(var p=0;p<s.length;p++){var u=s[p],d=a.has(u);d||(a.add(u),c.push(u))}return c}(e,n)}),e("getOwnMetadataKeys",function(e,n){if(!T(e))throw TypeError();return S(n)||(n=M(n)),O(e,n)}),e("deleteMetadata",function(e,n,r){if(!T(n)||(S(r)||(r=M(r)),!T(n)))throw TypeError();S(r)||(r=M(r));var i=D(n,r,!1);return!S(i)&&i.OrdinaryDeleteMetadata(e,n,r)});function M(e){var n=function(e,n){switch(R(e)){case 0:case 1:case 2:case 3:case 4:case 5:return e}var r="string",i=A(e,s);if(void 0!==i){var o=i.call(e,r);if(T(o))throw TypeError();return o}return function(e,n){if("string"===n){var r=e.toString;if(C(r)){var i=r.call(e);if(!T(i))return i}var o=e.valueOf;if(C(o)){var i=o.call(e);if(!T(i))return i}}else{var o=e.valueOf;if(C(o)){var i=o.call(e);if(!T(i))return i}var s=e.toString;if(C(s)){var i=s.call(e);if(!T(i))return i}}throw TypeError()}(e,r)}(e,0);return"symbol"==typeof n?n:""+n}function x(e){return Array.isArray?Array.isArray(e):e instanceof Object?e instanceof Array:"[object Array]"===Object.prototype.toString.call(e)}function C(e){return"function"==typeof e}function I(e){return"function"==typeof e}function j(e,n){return e===n||e!=e&&n!=n}function A(e,n){var r=e[n];if(null!=r){if(!C(r))throw TypeError();return r}}function k(e){var n=A(e,a);if(!C(n))throw TypeError();var r=n.call(e);if(!T(r))throw TypeError();return r}function B(e){var n=e.next();return!n.done&&n}function P(e){var n=e.return;n&&n.call(e)}function N(e){var n=Object.getPrototypeOf(e);if("function"!=typeof e||e===p||n!==p)return n;var r=e.prototype,i=r&&Object.getPrototypeOf(r);if(null==i||i===Object.prototype)return n;var o=i.constructor;return"function"!=typeof o||o===e?n:o}function D(e,n,r){var i=v.getProvider(e,n);if(!S(i))return i;if(r){if(v.setProvider(e,n,y))return y;throw Error("Illegal state.")}}function L(e){return e.__=void 0,delete e.__,e}})}},__webpack_module_cache__={};function __webpack_require__(e){var n=__webpack_module_cache__[e];if(void 0!==n)return n.exports;var r=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e].call(r.exports,r,r.exports,__webpack_require__),r.exports}__webpack_require__.n=e=>{var n=e&&e.__esModule?()=>e.default:()=>e;return __webpack_require__.d(n,{a:n}),n},__webpack_require__.d=(e,n)=>{for(var r in n)__webpack_require__.o(n,r)&&!__webpack_require__.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},__webpack_require__.g=(()=>{if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}})(),__webpack_require__.o=(e,n)=>Object.prototype.hasOwnProperty.call(e,n),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var __webpack_exports__={};for(var __webpack_i__ in(()=>{"use strict";let e,n;__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{AIWorkerConversationBean:()=>iu,ClientConversationBean:()=>rf,ConversationService:()=>ih,DEFAULT_OPTIONS:()=>rs,createAaaSPilotKit:()=>sQ,ConversationBean:()=>rp,AaaSPilotKitController:()=>oZ,BaseAgentService:()=>rr});var r,i,o,s,a,c,l,u,d,p,h,f,m,g,v,y,b,_,w,O,R,S,E,T,M,x,C,I={};__webpack_require__.r(I),__webpack_require__.d(I,{fixNegotiationNeeded:()=>sv,shimAddTrackRemoveTrack:()=>sm,shimAddTrackRemoveTrackWithNative:()=>sf,shimGetSendersWithDtmf:()=>sp,shimGetUserMedia:()=>sl,shimMediaStream:()=>su,shimOnTrack:()=>sd,shimPeerConnection:()=>sg,shimSenderReceiverGetStats:()=>sh});var j={};__webpack_require__.r(j),__webpack_require__.d(j,{shimAddTransceiver:()=>sT,shimCreateAnswer:()=>sC,shimCreateOffer:()=>sx,shimGetDisplayMedia:()=>sb,shimGetParameters:()=>sM,shimGetUserMedia:()=>sy,shimOnTrack:()=>s_,shimPeerConnection:()=>sw,shimRTCDataChannel:()=>sE,shimReceiverGetStats:()=>sR,shimRemoveStream:()=>sS,shimSenderGetStats:()=>sO});var A={};__webpack_require__.r(A),__webpack_require__.d(A,{shimAudioContext:()=>sL,shimCallbacksAPI:()=>sA,shimConstraints:()=>sB,shimCreateOfferLegacy:()=>sD,shimGetUserMedia:()=>sk,shimLocalStreamsAPI:()=>sI,shimRTCIceServerUrls:()=>sP,shimRemoteStreamsAPI:()=>sj,shimTrackEventTransceiver:()=>sN});var k={};__webpack_require__.r(k),__webpack_require__.d(k,{removeExtmapAllowMixed:()=>s$,shimAddIceCandidateNullOrEmpty:()=>sz,shimConnectionState:()=>sW,shimMaxMessageSize:()=>sV,shimParameterlessSetLocalDescription:()=>sG,shimRTCIceCandidate:()=>sq,shimRTCIceCandidateRelayProtocol:()=>sH,shimSendThrowTypeError:()=>sX});var B={};function P(e){return("object"==typeof e&&null!==e||"function"==typeof e)&&"function"==typeof e.then}function N(e){switch(typeof e){case"string":case"symbol":return e.toString();case"function":return e.name;default:throw Error(`Unexpected ${typeof e} service id type`)}}__webpack_require__.r(B),__webpack_require__.d(B,{default:()=>sK}),__webpack_require__("../../node_modules/core-js/modules/es.object.has-own.js"),__webpack_require__("../../node_modules/reflect-metadata/Reflect.js");let D=Symbol.for("@inversifyjs/common/islazyServiceIdentifier");class L{#e;constructor(e){this.#e=e,this[D]=!0}static is(e){return"object"==typeof e&&null!==e&&!0===e[D]}unwrap(){return this.#e()}}function F(e,n){return Reflect.getOwnMetadata(n,e)}function U(e,n,r){Reflect.defineMetadata(n,r,e)}function q(e,n,r,i){var o;let s=i(null!=(o=F(e,n))?o:r());Reflect.defineMetadata(n,s,e)}__webpack_require__("../../node_modules/core-js/modules/es.array.includes.js");let H="@inversifyjs/container/bindingId";function V(){var e;let n=null!=(e=F(Object,H))?e:0;return n===Number.MAX_SAFE_INTEGER?U(Object,H,Number.MIN_SAFE_INTEGER):q(Object,H,()=>n,e=>e+1),n}let X={Request:"Request",Singleton:"Singleton",Transient:"Transient"},W={ConstantValue:"ConstantValue",DynamicValue:"DynamicValue",Factory:"Factory",Instance:"Instance",Provider:"Provider",ResolvedValue:"ResolvedValue",ServiceRedirection:"ServiceRedirection"};function*$(){for(var e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];for(let e of n)yield*e}class z{#e;#t;#n;constructor(e){for(let n of(this.#e=new Map,this.#t={},Reflect.ownKeys(e)))this.#t[n]=new Map;this.#n=e}add(e,n){for(let r of(this.#r(e).push(n),Reflect.ownKeys(n)))this.#i(r,n[r]).push(e)}clone(){let e=this.#o(),n=this.#s(),r=Reflect.ownKeys(this.#n),i=this._buildNewInstance(this.#n);for(let o of(this.#a(this.#e,i.#e,e,n),r))this.#c(this.#t[o],i.#t[o],e);return i}get(e,n){return this.#t[e].get(n)}getAllKeys(e){return this.#t[e].keys()}removeByRelation(e,n){let r=this.get(e,n);if(void 0!==r)for(let i of new Set(r)){let r=this.#e.get(i);if(void 0===r)throw Error("Expecting model relation, none found");for(let o of r)o[e]===n&&this.#l(i,o);this.#e.delete(i)}}_buildNewInstance(e){return new z(e)}_cloneModel(e){return e}_cloneRelation(e){return e}#o(){let e=new Map;for(let n of this.#e.keys()){let r=this._cloneModel(n);e.set(n,r)}return e}#s(){let e=new Map;for(let n of this.#e.values())for(let r of n){let n=this._cloneRelation(r);e.set(r,n)}return e}#r(e){let n=this.#e.get(e);return void 0===n&&(n=[],this.#e.set(e,n)),n}#i(e,n){let r=this.#t[e].get(n);return void 0===r&&(r=[],this.#t[e].set(n,r)),r}#u(e,n){let r=n.get(e);if(void 0===r)throw Error("Expecting model to be cloned, none found");return r}#d(e,n){let r=n.get(e);if(void 0===r)throw Error("Expecting relation to be cloned, none found");return r}#c(e,n,r){for(let[i,o]of e){let e=[];for(let n of o)e.push(this.#u(n,r));n.set(i,e)}}#a(e,n,r,i){for(let[o,s]of e){let e=[];for(let n of s)e.push(this.#d(n,i));n.set(this.#u(o,r),e)}}#l(e,n){for(let r of Reflect.ownKeys(n))this.#p(e,r,n[r])}#p(e,n,r){let i=this.#t[n].get(r);if(void 0!==i){let o=i.indexOf(e);-1!==o&&i.splice(o,1),0===i.length&&this.#t[n].delete(r)}}}!function(e){e.moduleId="moduleId",e.serviceId="serviceId"}(p||(p={}));class G{#h;#f;constructor(e,n){this.#h=null!=n?n:new z({moduleId:{isOptional:!0},serviceId:{isOptional:!1}}),this.#f=e}static build(e){return new G(e)}add(e,n){this.#h.add(e,n)}clone(){return new G(this.#f,this.#h.clone())}get(e){var n;let r=[],i=this.#h.get(p.serviceId,e);void 0!==i&&r.push(i);let o=null==(n=this.#f)?void 0:n.get(e);if(void 0!==o&&r.push(o),0!==r.length)return $(...r)}removeAllByModuleId(e){this.#h.removeByRelation(p.moduleId,e)}removeAllByServiceId(e){this.#h.removeByRelation(p.serviceId,e)}}function K(e){return e.isRight?{isRight:!0,value:e.value}:e}!function(e){e.id="id",e.moduleId="moduleId",e.serviceId="serviceId"}(h||(h={}));class Y extends z{_buildNewInstance(e){return new Y(e)}_cloneModel(e){return function(e){var n,r,i,o,s,a;switch(e.type){case W.ConstantValue:case W.DynamicValue:return{cache:K((n=e).cache),id:n.id,isSatisfiedBy:n.isSatisfiedBy,moduleId:n.moduleId,onActivation:n.onActivation,onDeactivation:n.onDeactivation,scope:n.scope,serviceIdentifier:n.serviceIdentifier,type:n.type,value:n.value};case W.Factory:return{cache:K((r=e).cache),factory:r.factory,id:r.id,isSatisfiedBy:r.isSatisfiedBy,moduleId:r.moduleId,onActivation:r.onActivation,onDeactivation:r.onDeactivation,scope:r.scope,serviceIdentifier:r.serviceIdentifier,type:r.type};case W.Instance:return{cache:K((i=e).cache),id:i.id,implementationType:i.implementationType,isSatisfiedBy:i.isSatisfiedBy,moduleId:i.moduleId,onActivation:i.onActivation,onDeactivation:i.onDeactivation,scope:i.scope,serviceIdentifier:i.serviceIdentifier,type:i.type};case W.Provider:return{cache:K((o=e).cache),id:o.id,isSatisfiedBy:o.isSatisfiedBy,moduleId:o.moduleId,onActivation:o.onActivation,onDeactivation:o.onDeactivation,provider:o.provider,scope:o.scope,serviceIdentifier:o.serviceIdentifier,type:o.type};case W.ResolvedValue:return{cache:K((s=e).cache),factory:s.factory,id:s.id,isSatisfiedBy:s.isSatisfiedBy,metadata:s.metadata,moduleId:s.moduleId,onActivation:s.onActivation,onDeactivation:s.onDeactivation,scope:s.scope,serviceIdentifier:s.serviceIdentifier,type:s.type};case W.ServiceRedirection:return{id:(a=e).id,isSatisfiedBy:a.isSatisfiedBy,moduleId:a.moduleId,serviceIdentifier:a.serviceIdentifier,targetServiceIdentifier:a.targetServiceIdentifier,type:a.type}}}(e)}}class J{#m;#f;constructor(e,n){this.#m=null!=n?n:new Y({id:{isOptional:!1},moduleId:{isOptional:!0},serviceId:{isOptional:!1}}),this.#f=e}static build(e){return new J(e)}clone(){return new J(this.#f,this.#m.clone())}get(e){var n,r;return null!=(r=this.getNonParentBindings(e))?r:null==(n=this.#f)?void 0:n.get(e)}getBoundServices(){let e=new Set(this.#m.getAllKeys(h.serviceId));if(void 0!==this.#f)for(let n of this.#f.getBoundServices())e.add(n);return e}getById(e){var n,r;return null!=(r=this.#m.get(h.id,e))?r:null==(n=this.#f)?void 0:n.getById(e)}getByModuleId(e){var n,r;return null!=(r=this.#m.get(h.moduleId,e))?r:null==(n=this.#f)?void 0:n.getByModuleId(e)}getNonParentBindings(e){return this.#m.get(h.serviceId,e)}getNonParentBoundServices(){return this.#m.getAllKeys(h.serviceId)}removeById(e){this.#m.removeByRelation(h.id,e)}removeAllByModuleId(e){this.#m.removeByRelation(h.moduleId,e)}removeAllByServiceId(e){this.#m.removeByRelation(h.serviceId,e)}set(e){let n={[h.id]:e.id,[h.serviceId]:e.serviceIdentifier};void 0!==e.moduleId&&(n[h.moduleId]=e.moduleId),this.#m.add(e,n)}}!function(e){e.moduleId="moduleId",e.serviceId="serviceId"}(f||(f={}));class Q{#g;#f;constructor(e,n){this.#g=null!=n?n:new z({moduleId:{isOptional:!0},serviceId:{isOptional:!1}}),this.#f=e}static build(e){return new Q(e)}add(e,n){this.#g.add(e,n)}clone(){return new Q(this.#f,this.#g.clone())}get(e){var n;let r=[],i=this.#g.get(f.serviceId,e);void 0!==i&&r.push(i);let o=null==(n=this.#f)?void 0:n.get(e);if(void 0!==o&&r.push(o),0!==r.length)return $(...r)}removeAllByModuleId(e){this.#g.removeByRelation(f.moduleId,e)}removeAllByServiceId(e){this.#g.removeByRelation(f.serviceId,e)}}function Z(e,n,r){let i=Array.isArray(e)?e:[e];if(void 0!==r)if("number"!=typeof r)Reflect.decorate(i,n.prototype,r);else for(let e of i)e(n,void 0,r);else Reflect.decorate(i,n)}let ee="@inversifyjs/core/classMetadataReflectKey";function et(){return{constructorArguments:[],lifecycle:{postConstructMethodName:void 0,preDestroyMethodName:void 0},properties:new Map,scope:void 0}}let en="@inversifyjs/core/pendingClassMetadataCountReflectKey",er=Symbol.for("@inversifyjs/core/InversifyCoreError");class ei extends Error{constructor(e,n,r){super(n,r),this[er]=!0,this.kind=e}static is(e){return"object"==typeof e&&null!==e&&!0===e[er]}static isErrorOfKind(e,n){return ei.is(e)&&e.kind===n}}function eo(e){let n=null!=(r=F(e,ee))?r:et();if(!function(e){let n=F(e,en);return void 0!==n&&0!==n}(e))return function(e,n){let r=[];if(n.length<e.length)throw new ei(m.missingInjectionDecorator,`Found unexpected missing metadata on type "${e.name}". "${e.name}" constructor requires at least ${e.length.toString()} arguments, found ${n.length.toString()} instead.
2
+ var __webpack_modules__={"../../node_modules/@baidu/weirwood-error/esm/plugins/Plugin.js":function(){},"../../node_modules/@baidu/weirwood-perf/esm/index.js":function(e,n){var r=new Date().getTime();function i(e){var n=window.BOOMR;if(window){if(!e){if(window.parent===window||!document.getElementById("boomr-if-as"))return;if(window.BOOMR&&n.boomerang_frame&&n.window)try{n.boomerang_frame.document.domain!==n.window.document.domain&&(n.boomerang_frame.document.domain=n.window.document.domain)}catch(e){n.isCrossOriginError(e)||n.addError(e,"BOOMR_check_doc_domain.domainFix")}e=document.domain}if(e&&-1!==e.indexOf(".")&&window.parent){try{window.parent.document;return}catch(n){try{document.domain=e}catch(e){return}}try{window.parent.document;return}catch(n){e=e.replace(/^[\w\-]+\./,"")}i(e)}}}function o(e){return"[object String]"===Object.prototype.toString.call(e)}function s(e){return"object"==typeof e&&null!==e}function a(e,n){return!!o(n)&&e.some(function(e){if(!e)return!1;if(o(e))return -1!==n.indexOf(e);if("[object RegExp]"===Object.prototype.toString.call(e))try{return e.test(n)}catch(n){return console.error(e+"正则书写有误"),!1}return console.error(e+"忽略匹配项类型应该是String、RegExp"),!1})}function c(e,n){var r=e.lastClick,i=void 0===r?0:r,o=n.timing.requestStart;return!!i&&!!(o-i<50)}i(),n.PerfClient=function(){function e(e){!(e&&e.ignoreUrls&&e.ignoreUrls.length&&this.shouldIgnoreUrls(e.ignoreUrls))&&(this.BOOMR=function(e){var n,o,s,a,c,l,u,d,p,h=e;e.parent!==e&&document.getElementById("boomr-if-as")&&"script"===document.getElementById("boomr-if-as").nodeName.toLowerCase()&&(e=e.parent),c=e.document,e.BOOMR||(e.BOOMR={});var f=e.BOOMR;if(f.version)return f;f.version="1.3.15",f.window=e,f.boomerang_frame=h,f.plugins||(f.plugins={});try{new e.CustomEvent("CustomEvent"),l=function(n,r){return new e.CustomEvent(n,r)}}catch(e){}try{!l&&c.createEvent&&c.createEvent("CustomEvent")&&(l=function(e,n){var r=c.createEvent("CustomEvent");return n=n||{cancelable:!1,bubbles:!1},r.initCustomEvent(e,n.bubbles,n.cancelable,n.detail),r})}catch(e){}if(!l&&c.createEventObject&&(l=function(e,n){var r=c.createEventObject();return r.type=r.propertyName=e,r.detail=n.detail,r}),l||(l=function(){}),u=function(e,n,r){var i=l(e,{detail:n});function o(){try{c.dispatchEvent?c.dispatchEvent(i):c.fireEvent&&c.fireEvent("onpropertychange",i)}catch(e){}}i&&(r?f.setImmediate(o):o())},void 0!==c.hidden?(d="visibilityState",p="visibilitychange"):void 0!==c.mozHidden?(d="mozVisibilityState",p="mozvisibilitychange"):void 0!==c.msHidden?(d="msVisibilityState",p="msvisibilitychange"):void 0!==c.webkitHidden&&(d="webkitVisibilityState",p="webkitvisibilitychange"),a={t_start:r,t_end:void 0,url:"",config_url:null,loadedLate:!1,beaconsSent:0,isUnloaded:!1,beaconInQueue:!1,cookies:{},testedCookies:!1,constants:{BEACON_TYPE_SPAS:["spa","spa_hard"],MAX_GET_LENGTH:2e3},session:{domain:(s={beacon_url:"",beacon_url_force_https:!0,beacon_urls_allowed:[],beacon_type:"AUTO",beacon_auth_key:"Authorization",beacon_auth_token:void 0,beacon_with_credentials:!1,beacon_disable_sendbeacon:!1,site_domain:e.location.hostname.replace(/.*?([^.]+\.[^.]+)\.?$/,"$1").toLowerCase(),user_ip:"",autorun:!0,hasSentPageLoadBeacon:!1,r:void 0,same_site_cookie:"Lax",secure_cookie:!1,forced_same_site_cookie_none:!1,events:{page_ready:[],page_unload:[],before_unload:[],dom_loaded:[],visibility_changed:[],prerender_to_visible:[],before_beacon:[],beacon:[],page_load_beacon:[],xhr_load:[],click:[],form_submit:[],config:[],xhr_init:[],spa_init:[],spa_navigation:[],spa_cancel:[],xhr_send:[],xhr_error:[],error:[],netinfo:[],rage_click:[],before_early_beacon:[]},public_events:{before_beacon:"onBeforeBoomerangBeacon",beacon:"onBoomerangBeacon",onboomerangloaded:"onBoomerangLoaded"},translate_events:{onbeacon:"beacon",onconfig:"config",onerror:"error",onxhrerror:"xhr_error"},unloadEventsCount:0,unloadEventCalled:0,listenerCallbacks:{},vars:{},singleBeaconVars:{},varPriority:{"-1":{},1:{}},errors:{},disabled_plugins:{},localStorageSupported:!1,LOCAL_STORAGE_PREFIX:"_boomr_",nativeOverwrites:[],xb_handler:function(n){return function(r){var i;r||(r=e.event),r.target?i=r.target:r.srcElement&&(i=r.srcElement),3===i.nodeType&&(i=i.parentNode),i&&i.nodeName&&"OBJECT"===i.nodeName.toUpperCase()&&"application/x-shockwave-flash"===i.type||s.fireEvent(n,i)}},clearEvents:function(){var e;for(e in this.events)this.events.hasOwnProperty(e)&&(this.events[e]=[])},clearListeners:function(){var e;for(e in s.listenerCallbacks)if(s.listenerCallbacks.hasOwnProperty(e))for(;s.listenerCallbacks[e].length;)f.utils.removeListener(s.listenerCallbacks[e][0].el,e,s.listenerCallbacks[e][0].fn);s.listenerCallbacks={}},fireEvent:function(e,n){var r,i,o,s;if(e=e.toLowerCase(),this.translate_events[e]&&(e=this.translate_events[e]),this.events.hasOwnProperty(e)){for(this.public_events.hasOwnProperty(e)&&u(this.public_events[e],n),o=this.events[e],"before_beacon"!==e&&"beacon"!==e&&f.real_sendBeacon(),s=o.length,r=0;r<s;r++)try{(i=o[r]).fn.call(i.scope,n,i.cb_data)}catch(n){f.addError(n,"fireEvent."+e+"<"+r+">")}for(r=0;r<s;r++)try{o[r].once&&(o.splice(r,1),s--,r--)}catch(n){f.addError(n,"fireEvent."+e+"<"+r+">")}}},spaNavigation:function(){s.onloadfired=!0},beaconUrlAllowed:function(e){if(!s.beacon_urls_allowed||0===s.beacon_urls_allowed.length)return!0;for(var n=0;n<s.beacon_urls_allowed.length;n++)if(new RegExp(s.beacon_urls_allowed[n]).exec(e))return!0;return!1},checkLocalStorageSupport:function(){var n=s.LOCAL_STORAGE_PREFIX+"clss";s.localStorageSupported=!1;try{if(!e.JSON||!e.localStorage)return;e.localStorage.setItem(n,n),s.localStorageSupported=e.localStorage.getItem(n)===n,e.localStorage.removeItem(n)}catch(e){s.localStorageSupported=!1}},onFrameUnloaded:function(){var e,n;for(e=0,f.isUnloaded=!0;e<s.nativeOverwrites.length;e++)(n=s.nativeOverwrites[e]).obj[n.functionName]=n.origFn;s.nativeOverwrites=[]}}).site_domain,ID:void 0,start:void 0,length:0,enabled:!0},utils:{hasPostMessageSupport:function(){return!!e.postMessage&&("function"==typeof e.postMessage||"object"==typeof e.postMessage)},objectToString:function(e,n,r){var i,o=[];if(!e||"object"!=typeof e)return e;if(void 0===n&&(n="\n "),r||(r=0),f.utils.isArray(e)){for(i=0;i<e.length;i++)r>0&&null!==e[i]&&"object"==typeof e[i]?o.push(this.objectToString(e[i],n+("\n "===n?" ":""),r-1)):"&"===n?o.push(encodeURIComponent(e[i])):o.push(e[i]);n=","}else for(i in e)Object.prototype.hasOwnProperty.call(e,i)&&(r>0&&null!==e[i]&&"object"==typeof e[i]?o.push(encodeURIComponent(i)+"="+this.objectToString(e[i],n+("\n "===n?" ":""),r-1)):"&"===n?o.push(encodeURIComponent(i)+"="+encodeURIComponent(e[i])):o.push(i+"="+e[i]));return o.join(n)},getCookie:function(e){var n;if(!e)return null;if(f.utils.mark("get_cookie"),void 0!==f.cookies[e])return!1===f.cookies[e]?void 0:f.cookies[e];if(void 0===(n=this.getRawCookie(e))){f.cookies[e]=!1;return}return f.cookies[e]=n,f.cookies[e]},getRawCookie:function(e){var n,r;return e?(e=" "+e+"=",(n=(r=" "+c.cookie+";").indexOf(e))>=0)?(n+=e.length,r.substring(n,r.indexOf(";",n)).replace(/^"/,"").replace(/"$/,"")):void 0:null},setCookie:function(e,n,r){var i,o,a,l,u;if(!e||!f.session.domain||void 0===n)return f.addVar("nocookie",1),!1;if((i=this.objectToString(n,"&"))===f.cookies[e])return!0;if((o=e+'="'+i+'"').length<500){l=[o,"path=/","domain="+f.session.domain],"number"==typeof r&&((u=new Date).setTime(u.getTime()+1e3*r),u=u.toGMTString(),l.push("expires="+u));var d=this.getSameSiteAttributeParts();if("https:"===location.protocol&&!0===s.secure_cookie&&-1===d.indexOf("Secure")&&d.push("Secure"),l=l.concat(d),f.utils.mark("set_cookie_real"),c.cookie=l.join("; "),f.testedCookies)return"number"!=typeof r||r>0?f.cookies[e]=i:f.cookies[e]=void 0,!0;if(f.cookies[e]=void 0,i===(a=this.getCookie(e))||void 0===a&&"number"==typeof r&&r<=0)return f.cookies[e]=i,f.testedCookies=!0,f.removeVar("nocookie"),!0}return f.addVar("nocookie",1),!1},getSubCookies:function(e){var n,r,i,o,s=!1,a={};if(!e||"string"!=typeof e)return null;for(r=0,i=(n=e.split("&")).length;r<i;r++)(o=n[r].split("="))[0]&&(o.push(""),a[decodeURIComponent(o[0])]=decodeURIComponent(o[1]),s=!0);return s?a:null},removeCookie:function(e){return this.setCookie(e,{},-86400)},getSameSiteAttributeParts:function(){var e=s.same_site_cookie.toUpperCase();return(s.forced_same_site_cookie_none&&(e="NONE"),"LAX"===e)?["SameSite=Lax"]:"NONE"===e?"https:"===location.protocol&&this.isCurrentUASameSiteNoneCompatible()?["SameSite=None","Secure"]:[]:"STRICT"===e?["SameSite=Strict"]:["SameSite=Lax"]},getLocalStorage:function(n){var r,i;if(!n||!s.localStorageSupported)return null;try{if(r=e.localStorage.getItem(s.LOCAL_STORAGE_PREFIX+n),null===r)return;i=e.JSON.parse(r)}catch(e){return null}return i&&"object"==typeof i.items?"number"==typeof i.expires&&f.now()>=i.expires?void this.removeLocalStorage(n):i.items:(this.removeLocalStorage(n),null)},setLocalStorage:function(n,r,i){var o,a,c;if(!n||!s.localStorageSupported||"object"!=typeof r)return!1;if(o={items:r},"number"==typeof i&&(o.expires=f.now()+1e3*i),(a=e.JSON.stringify(o)).length<5e4)try{if(e.localStorage.setItem(s.LOCAL_STORAGE_PREFIX+n,a),c=e.localStorage.getItem(s.LOCAL_STORAGE_PREFIX+n),a===c)return!0}catch(e){}return!1},removeLocalStorage:function(n){if(!n||!s.localStorageSupported)return!1;try{return e.localStorage.removeItem(s.LOCAL_STORAGE_PREFIX+n),!0}catch(e){}return!1},cleanupURL:function(e,n){if(!e||f.utils.isArray(e))return"";if(s.strip_query_string&&(e=e.replace(/\?.*/,"?qs-redacted")),void 0!==n&&e&&e.length>n){var r=e.indexOf("?");e=-1!==r&&r<n?e.substr(0,r)+"?...":e.substr(0,n-3)+"..."}return e},hashQueryString:function(e,n){return e?e.match?(e.match(/^\/\//)&&(e=location.protocol+e),e.match(/^(https?|file):/))?(n&&(e=e.replace(/#.*/,"")),e.replace(/\?([^#]*)/,function(e,n){return"?"+(n.length>10?f.utils.hashString(n):n)})):(f.error("Passed in URL is invalid: "+e),""):(f.addError("TypeError: Not a string","hashQueryString",typeof e),""):e},pluginConfig:function(e,n,r,i){var o,s=0;if(!n||!n[r])return!1;for(o=0;o<i.length;o++)void 0!==n[r][i[o]]&&(e[i[o]]=n[r][i[o]],s++);return s>0},arrayFilter:function(e,n){var r=[];if(!(this.isArray(e)||e&&"number"==typeof e.length)||"function"!=typeof n)return r;if("function"==typeof e.filter)r=e.filter(n);else for(var i,o=-1,s=e.length;++o<s;)n(i=e[o],o,e)&&(r[r.length]=i);return r},arrayFind:function(e,n){if((this.isArray(e)||e&&"number"==typeof e.length)&&"function"==typeof n)if("function"==typeof e.find)return e.find(n);else{for(var r,i=-1,o=e.length;++i<o;)if(n(r=e[i],i,e))return r;return}},isMutationObserverSupported:function(){return!(e&&e.navigator&&e.navigator.userAgent&&e.navigator.userAgent.match(/Trident.*rv[ :]*11\./))&&e&&e.MutationObserver&&"function"==typeof e.MutationObserver},addObserver:function(n,r,i,o,s,a){var c,l,u={observer:null,timer:null};if(!this.isMutationObserverSupported()||!o||!n)return null;function d(e){var n=!1;u.timer&&(clearTimeout(u.timer),u.timer=null),o&&((n=o.call(a,e,s))||(o=null)),!n&&u.observer&&(u.observer.disconnect(),u.observer=null),"number"==typeof n&&n>0&&(u.timer=setTimeout(d,n))}return c=e.MutationObserver,e.Zone&&"function"==typeof e.Zone.__symbol__&&(l=e.Zone.__symbol__("MutationObserver"))&&"string"==typeof l&&e.hasOwnProperty(l)&&"function"==typeof e[l]&&(c=e[l]),u.observer=new c(d),i&&(u.timer=setTimeout(d,u.timeout)),u.observer.observe(n,r),u},addListener:function(e,n,r,i){var o=!1;e.addEventListener?("object"==typeof i?o=i:"boolean"==typeof i&&i&&f.browser.supportsPassive()&&(o={capture:!1,passive:!0}),e.addEventListener(n,r,o)):e.attachEvent&&e.attachEvent("on"+n,r),s.listenerCallbacks[n]=s.listenerCallbacks[n]||[],s.listenerCallbacks[n].push({el:e,fn:r})},removeListener:function(e,n,r){if(e.removeEventListener?e.removeEventListener(n,r,!1):e.detachEvent&&e.detachEvent("on"+n,r),s.listenerCallbacks.hasOwnProperty(n)){for(var i=0;i<s.listenerCallbacks[n].length;i++)if(r===s.listenerCallbacks[n][i].fn&&e===s.listenerCallbacks[n][i].el)return void s.listenerCallbacks[n].splice(i,1)}},isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)},inArray:function(e,n){var r;if(void 0===e||void 0===n||!n.length)return!1;for(r=0;r<n.length;r++)if(n[r]===e)return!0;return!1},getQueryParamValue:function(e,n){var r,i,o,s;if(!e)return null;for("string"==typeof n?(r=f.window.document.createElement("a")).href=n:r="object"==typeof n&&"string"==typeof n.search?n:f.window.location,i=r.search.slice(1).split(/&/),o=0;o<i.length;o++)if(i[o]&&(s=i[o].split("=")).length&&s[0]===e)try{return s.length>1?decodeURIComponent(s.splice(1).join("=").replace(/\+/g," ")):""}catch(e){if(e&&"string"==typeof e.name&&-1!==e.name.indexOf("URIError"));else throw e}return null},generateUUID:function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var n=16*Math.random()|0;return("x"===e?n:3&n|8).toString(16)})},generateId:function(e){return"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx".substr(0,e||40).replace(/x/g,function(e){var e=(Math.random()||.01).toString(36);return"0"===e?"0":e.substr(2,1)})},serializeForUrl:function(e){return f.utils.Compression&&f.utils.Compression.jsUrl?f.utils.Compression.jsUrl(e):window.JSON?JSON.stringify(e):""},getMyURL:function(){var e=document.currentScript||document.getElementById("boomr-if-as")||document.getElementById("boomr-scr-as");if(e)return e.src;var n,r,i=document.getElementsByTagName("script");for(r=i.length;r--;)if("interactive"===i[r].readyState)return i[r].src;try{throw Error()}catch(e){if("stack"in e&&(n=this.arrayFilter(e.stack.split(/\n/),function(e){return e.match(/https?:\/\//)}))&&n.length)return n[0].replace(/.*(https?:\/\/.+?)(:\d+)+\D*$/m,"$1")}return""},scroll:function(){var n=void 0!==e.pageXOffset,r="CSS1Compat"===(e.document.compatMode||""),i={x:0,y:0};return n?"function"==typeof e.pageXOffset?(i.x=e.pageXOffset(),i.y=e.pageYOffset()):(i.x=e.pageXOffset,i.y=e.pageYOffset):r?(i.x=e.document.documentElement.scrollLeft,i.y=e.document.documentElement.scrollTop):(i.x=e.document.body.scrollLeft,i.y=e.document.body.scrollTop),"number"==typeof i.sx&&(i.sx=Math.round(i.sx)),"number"==typeof i.sy&&(i.sy=Math.round(i.sy)),i},windowHeight:function(){return e.innerHeight||e.document.documentElement.clientHeight||e.document.body.clientHeight},windowWidth:function(){return e.innerWidth||e.document.documentElement.clientWidth||e.document.body.clientWidth},isNative:function(e){return!!e&&e.toString&&!e.hasOwnProperty("toString")&&/\[native code\]/.test(String(e))},overwriteNative:function(e,n,r){e&&r&&(f.boomerang_frame!==f.window&&s.nativeOverwrites.push({obj:e,functionName:n,origFn:e[n]}),e[n]=r)},isInteger:function(e){return(Number.isInteger||function(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e})(e)},isObjectEmpty:function(e){for(var n in e)if(e.hasOwnProperty(n))return!1;return!0},hashString:function(e){e=encodeURIComponent(e);for(var n=0x811c9dc5,r=0;r<e.length;r++)n^=e.charCodeAt(r),n+=(n<<1)+(n<<4)+(n<<7)+(n<<8)+(n<<24);return parseInt((n>>>0).toString()+e.length).toString(36)},isCurrentUASameSiteNoneCompatible:function(){return!e||!e.navigator||!e.navigator.userAgent||"string"!=typeof e.navigator.userAgent||this.isUASameSiteNoneCompatible(e.navigator.userAgent)},isUASameSiteNoneCompatible:function(e){var n=e.match(/(UCBrowser)\/(\d+\.\d+)\.(\d+)/);if(n){var r=parseFloat(n[2]),i=n[3];return 12.13===r?!(i<=2):!(r<12.13)}if(n=e.match(/(Chrome)\/(\d+)\.(\d+)\.(\d+)\.(\d+)/)){var o=n[2];return!(o>=51)||!(o<=66)}if(n=e.match(/(Macintosh;.*Mac OS X 10_14[_\d]*.*) AppleWebKit\//))return(!(n=e.match(/Version\/.* Safari\//))||null!==(n=e.match(/Chrom(?:e|ium)/)))&&!(n=e.match(/^Mozilla\/\d+(?:\.\d+)* \(Macintosh;.*Mac OS X \d+(?:_\d+)*\) AppleWebKit\/\d+(?:\.\d+)* \(KHTML, like Gecko\)$/));return!(n=e.match(/(iP.+; CPU .*OS 12(?:_\d+)*.*)/))},forEach:function(e,n,r){if(f.utils.isArray(e)&&"function"==typeof n)for(var i=e.length,o=0;o<i;o++)e.hasOwnProperty(o)&&n.call(r,e[o],o,e)},mark:function(e){var n=f.getPerformance();n&&"function"==typeof n.mark&&!f.window.BOOMR_no_mark&&n.mark("boomr:"+e)},measure:function(e,n,r){var i=f.getPerformance();i&&"function"==typeof i.measure&&!f.window.BOOMR_no_mark&&i.measure("boomr:"+e,n?"boomr:"+n:void 0,r?"boomr:"+r:void 0)}},browser:{results:{},supportsPassive:function(){if(void 0===f.browser.results.supportsPassive){if(f.browser.results.supportsPassive=!1,!Object.defineProperty)return!1;try{var e=Object.defineProperty({},"passive",{get:function(){f.browser.results.supportsPassive=!0}});window.addEventListener("test",null,e)}catch(e){}}return f.browser.results.supportsPassive}},init:function(n){var r,o,a,l,u=["autorun","sampleRate","interactionSampleRate","normalizeUrl","initiatorTypes","ignoreXhrs","beacon_auth_key","beacon_auth_token","beacon_with_credentials","beacon_disable_sendbeacon","beacon_url","beacon_url_force_https","beacon_type","site_domain","strip_query_string","user_ip","sendWindow"];if(i(),n||(n={}),void 0!==n.log&&(this.log=n.log),this.log||(this.log=function(){}),this.pageId||(this.pageId=f.utils.generateId(8)),n.primary&&s.handlers_attached)return this;for(l in void 0!==n.site_domain&&(/:/.test(n.site_domain)&&(n.site_domain=e.location.hostname.toLowerCase()),this.session.domain=n.site_domain),f.session.enabled&&void 0===f.session.ID&&(f.session.ID=f.utils.generateUUID()),void 0!==n.autorun&&(s.autorun=n.autorun),this.plugins)if(this.plugins.hasOwnProperty(l)){if(n[l]&&n[l].hasOwnProperty("enabled")&&!1===n[l].enabled){s.disabled_plugins[l]=1,"function"==typeof this.plugins[l].disable&&this.plugins[l].disable();continue}if(s.disabled_plugins[l]){if(!n[l]||!n[l].hasOwnProperty("enabled")||!0!==n[l].enabled)continue;"function"==typeof this.plugins[l].enable&&this.plugins[l].enable(),delete s.disabled_plugins[l]}if("function"==typeof this.plugins[l].init)try{this.plugins[l].init(n)}catch(e){f.addError(e,l+".init")}}for(a=0;a<u.length;a++)void 0!==n[u[a]]&&(s[u[a]]=n[u[a]]);if((!s.handlers_attached&&!n.wait||s.handlers_attached&&s.waiting_for_config)&&(s.onloadfired||void 0!==s.autorun&&!1===s.autorun||(f.hasBrowserOnloadFired()&&(f.loadedLate=!0),f.attach_page_ready(f.page_ready_autorun)),s.waiting_for_config=!1),s.handlers_attached)return this;for(n.wait&&(s.waiting_for_config=!0),f.attach_page_ready(function(){f.t_onload||(f.t_onload=f.now())}),f.utils.addListener(e,"DOMContentLoaded",function(){s.fireEvent("dom_loaded")}),f.fireEvent("config",n),f.subscribe("config",function(e){e.beacon_url&&(s.beacon_url=e.beacon_url)}),f.subscribe("spa_navigation",s.spaNavigation,null,s),void 0!==p&&(f.utils.addListener(c,p,function(){s.fireEvent("visibility_changed")}),s.lastVisibilityState=f.visibilityState(),f.subscribe("visibility_changed",function(){var e=f.visibilityState();f.lastVisibilityEvent[e]=f.now(),"prerender"===s.lastVisibilityState&&"prerender"!==e&&(f.addVar("vis.pre","1"),s.fireEvent("prerender_to_visible")),s.lastVisibilityState=e})),f.utils.addListener(c,"mouseup",s.xb_handler("click")),r=c.getElementsByTagName("form"),o=0;o<r.length;o++)f.utils.addListener(r[o],"submit",s.xb_handler("form_submit"));return e.onpagehide||null===e.onpagehide||f.utils.addListener(e,"unload",function(){f.window=e=null}),f.boomerang_frame!==f.window&&f.utils.addListener(f.boomerang_frame,"unload",s.onFrameUnloaded),s.handlers_attached=!0,this},attach_page_ready:function(n){f.hasBrowserOnloadFired()?this.setImmediate(n,null,null,f):e.onpagehide||null===e.onpagehide?f.utils.addListener(e,"pageshow",function(){n()}):f.utils.addListener(e,"load",function(){n()})},page_ready_autorun:function(e){s.autorun&&f.page_ready(e,!0)},page_ready:function(n,r){var i;return r||"number"!=typeof n||(i=n,n=null),n||(n=e.event),n||(n={name:"load"}),r?"number"==typeof e.BOOMR_page_ready&&(n.timing=n.timing||{},n.timing.loadEventEnd=e.BOOMR_page_ready,f.addVar("pr",1,!0)):(n.timing=n.timing||{},i?n.timing.loadEventEnd=i:"number"==typeof e.BOOMR_page_ready?n.timing.loadEventEnd=e.BOOMR_page_ready:n.timing.loadEventEnd=f.now(),f.addVar("pr",1,!0)),s.onloadfired||(s.fireEvent("page_ready",n),s.onloadfired=!0),this},hasBrowserOnloadFired:function(){var n=f.getPerformance();return c.readyState&&"complete"===c.readyState||n&&n.timing&&n.timing.loadEventStart>0||e.BOOMR_onload>0},onloadFired:function(){return s.onloadfired},setImmediate:function(n,r,i,o){var s,a;"undefined"!=typeof Error&&(a=(a=Error()).stack?a.stack.replace(/^Error/,"Called"):void 0),s=function(){n.call(o||null,r,i||{},a),s=null},e.requestIdleCallback?e.requestIdleCallback(s,{timeout:1e3}):e.setImmediate?e.setImmediate(s):setTimeout(s,10)},now:Date.now||function(){return new Date().getTime()},getPerformance:function(){try{if(f.window){if("performance"in f.window&&f.window.performance)return f.window.performance;return f.window.msPerformance||f.window.webkitPerformance||f.window.mozPerformance}}catch(e){}},forceSameSiteCookieNone:function(){s.forced_same_site_cookie_none=!0},hrNow:function(){var e,n,r=f.getPerformance();return r&&r.now?e=r.now():(n=f.plugins.RT&&f.plugins.RT.navigationStart&&f.plugins.RT.navigationStart()||f.t_lstart||f.t_start,e=f.now()-n),e},visibilityState:void 0===d?function(){return"visible"}:function(){return c[d]},lastVisibilityEvent:{},registerEvent:function(e){return s.events.hasOwnProperty(e)||(s.events[e]=[]),this},disable:function(){s.clearEvents(),s.clearListeners()},fireEvent:function(e,n){return s.fireEvent(e,n)},subscribe:function(n,r,i,o,a){var c,l,u;for(n=n.toLowerCase(),s.translate_events[n]&&(n=s.translate_events[n]),s.events.hasOwnProperty(n)||(s.events[n]=[]),u=s.events[n],c=0;c<u.length;c++)if((l=u[c])&&l.fn===r&&l.cb_data===i&&l.scope===o)return this;if(u.push({fn:r,cb_data:i||{},scope:o||null,once:a||!1}),"page_ready"===n&&s.onloadfired&&s.autorun&&this.setImmediate(r,null,i,o),"page_unload"===n||"before_unload"===n){s.unloadEventsCount++;var d,p=this;u.length,d=function(n){if(r&&r.call(o,n||e.event,i),++s.unloadEventCalled===s.unloadEventsCount){f.real_sendBeacon();var a=p.plugins.Continuity;a&&"function"==typeof a.checkIfSendAdditionalBeacon&&a.checkIfSendAdditionalBeacon()}},"page_unload"===n&&(e.onpagehide||null===e.onpagehide?f.utils.addListener(e,"pagehide",d):f.utils.addListener(e,"unload",d)),f.utils.addListener(e,"beforeunload",d)}return this},addError:function(e,n,r){var i,o=f.plugins.Errors;if(f.error("Boomerang caught error: "+e+", src: "+n+", extra: "+r),o&&o.is_supported())return void("string"==typeof e?o.send({message:e,extra:r,functionName:n,noStack:!0},o.VIA_APP,o.SOURCE_BOOMERANG):("string"==typeof n&&(e.functionName=n),void 0!==r&&(e.extra=r),o.send(e,o.VIA_APP,o.SOURCE_BOOMERANG)));"string"!=typeof e&&((i=String(e)).match(/^\[object/)&&(i=e.name+": "+(e.description||e.message).replace(/\r\n$/,"")),e=i),void 0!==n&&(e="["+n+":"+f.now()+"] "+e),r&&(e+=":: "+r),s.errors[e]?s.errors[e]++:s.errors[e]=1},isCrossOriginError:function(e){return"SecurityError"===e.name||"TypeError"===e.name&&"Permission denied"===e.message||"Error"===e.name&&e.message&&e.message.match(/^(Permission|Access is) denied/)||-0x7ff5ffba===e.number},addVar:function(e,n,r){if("string"==typeof e)s.vars[e]=n,r&&(s.singleBeaconVars[e]=1);else if("object"==typeof e){var i;for(i in e)e.hasOwnProperty(i)&&(s.vars[i]=e[i],r&&(s.singleBeaconVars[i]=1))}return this},appendVar:function(e,n){var r=f.getVar(e)||"";return r&&(r+=","),f.addVar(e,r+n),this},removeVar:function(e){var n,r;if(!arguments.length)return this;for(n=0,r=1==arguments.length&&f.utils.isArray(e)?e:arguments;n<r.length;n++)s.vars.hasOwnProperty(r[n])&&delete s.vars[r[n]];return this},hasVar:function(e){return s.vars.hasOwnProperty(e)},getVar:function(e){return s.vars[e]},getPendingVar:function(e){return s.ttinewBeaconPendingData?s.ttinewBeaconPendingData[e]:s.vars[e]},hasPending:function(){return s.ttinewBeaconPending},setVarPriority:function(e,n){return"number"!=typeof n||1!==Math.abs(n)||(s.varPriority[n][e]=1),this},setReferrer:function(e){s.r=e},requestStart:function(e){var n=f.now();return f.plugins.RT.startTimer("xhr_"+e,n),{loaded:function(r){f.responseEnd(e,n,r)}}},readyToSend:function(){var e;for(e in this.plugins)if(this.plugins.hasOwnProperty(e)){if(s.disabled_plugins[e])continue;if("function"==typeof this.plugins[e].readyToSend&&!1===this.plugins[e].readyToSend())return!1}return!0},responseEnd:function(e,n,r,i){if(n="number"==typeof n?n:f.now(),i="number"==typeof i?i:f.now(),!f.readyToSend())return void setTimeout(function(){f.responseEnd(e,n,r,i)},1e3);if(!f.hasSentPageLoadBeacon()&&!f.utils.inArray(e.initiator,f.constants.BEACON_TYPE_SPAS))return void f.subscribe("page_load_beacon",function(){f.responseEnd(e,n,r,i)},null,f,!0);if(s.beaconInQueue)return void f.subscribe("beacon",function(){f.responseEnd(e,n,r,i)},null,f,!0);if(s.beaconInQueue=!0,"object"==typeof e){if(!e.url)return;s.fireEvent("xhr_load",e)}else f.real_sendBeacon(),f.addVar("xhr.pg",e),f.plugins.RT.startTimer("xhr_"+e,n),s.fireEvent("xhr_load",{name:"xhr_"+e,data:r,timing:{loadEventEnd:i}})},uninstrumentXHR:function(){},instrumentXHR:function(){},uninstrumentFetch:function(){},instrumentFetch:function(){},sendBeacon:function(e){return e&&(s.beacon_url_override=e),s.beaconQueued||(s.beaconQueued=!0,f.setImmediate(f.real_sendBeacon,null,null,f)),!0},sendBeaconWhenReady:function(e,n,r){if(s.beaconInQueue)return void f.subscribe("beacon",function(){f.sendBeaconWhenReady(e,n,r)},null,f,!0);for(var i in s.beaconInQueue=!0,e)e.hasOwnProperty(i)&&f.addVar(i,e[i],!0);"function"==typeof n&&void 0!==r&&n.apply(r),f.sendBeacon()},real_sendBeacon:function(){var n,r=[],i={};if(!s.beaconQueued&&!s.ttinewBeaconPending)return!1;for(n in s.beaconQueued=!1,this.plugins)if(this.plugins.hasOwnProperty(n)){if(s.disabled_plugins[n])continue;if(!this.plugins[n].is_complete(s.vars))return delete s.vars.early,!1}if(!window||!window.Image||!window.navigator||!f.window)return!1;var o=f.utils.inArray(s.vars["http.initiator"],f.constants.BEACON_TYPE_SPAS),a=void 0===s.vars["http.initiator"]||o;for(n in s.vars.pgu||(s.vars.pgu=o?c.URL:c.URL.replace(/#.*/,"")),s.vars.pgu=f.utils.cleanupURL(s.vars.pgu),(!s.vars.u||o)&&(s.vars.u=s.vars.pgu),s.vars.pgu===s.vars.u&&delete s.vars.pgu,s.r?s.vars.r=f.utils.cleanupURL(s.r):delete s.vars.r,s.vars.v=f.version,f.snippetVersion&&(s.vars.sv=f.snippetVersion),s.vars.sm=f.snippetMethod||"i",f.session.enabled&&(s.vars["rt.si"]=f.session.ID+"-"+Math.round(f.session.start/1e3).toString(36),s.vars["rt.ss"]=f.session.start,void 0===s.vars.early?s.vars["rt.sl"]=f.session.length>=1?f.session.length:1:s.vars["rt.sl"]=f.session.length),f.visibilityState()&&(s.vars["vis.st"]=f.visibilityState(),f.lastVisibilityEvent.visible&&(s.vars["vis.lv"]=f.now()-f.lastVisibilityEvent.visible),f.lastVisibilityEvent.hidden&&(s.vars["vis.lh"]=f.now()-f.lastVisibilityEvent.hidden)),s.vars["ua.plt"]=navigator.platform,s.vars["ua.vnd"]=navigator.vendor,this.pageId&&(s.vars.pid=this.pageId),s.vars.n=++this.beaconsSent,e!==window&&(s.vars.if=""),s.errors)s.errors.hasOwnProperty(n)&&r.push(n+(s.errors[n]>1?" (*"+s.errors[n]+")":""));if(r.length>0&&(s.vars.errors=r.join("\n")),s.errors={},"function"==typeof s.normalizeUrl&&s.vars.u&&(s.vars.nmu=s.normalizeUrl(s.vars.u)),s.vars["http.initiator"]&&-1===s.initiatorTypes.indexOf(s.vars["http.initiator"]))return s.beaconInQueue=!1,!1;for(n in s.fireEvent("before_beacon",s.vars),s.vars)s.vars.hasOwnProperty(n)&&(i[n]=s.vars[n]);if(f.removeVar(["qt","pgu"]),void 0===s.vars.early){for(var l in s.singleBeaconVars)s.singleBeaconVars.hasOwnProperty(l)&&f.removeVar(l);s.singleBeaconVars={},!s.hasSentPageLoadBeacon&&a&&(s.hasSentPageLoadBeacon=!0,f.setImmediate(function(){s.fireEvent("page_load_beacon",i)}))}if(f.session.rate_limited)return!1;if(s.beaconInQueue=!1,"interaction"===s.vars["http.initiator"]){if("number"==typeof s.interactionSampleRate&&Math.random()>s.interactionSampleRate)return!1}else if("number"==typeof s.sampleRate&&Math.random()>s.sampleRate)return!1;return this.plugins.Continuity.getTtiWaitForXHRDone()&&"spa_hard"===i["http.initiator"]&&!i["c.tti.new"]&&(s.ttinewBeaconPending=!0,s.ttinewBeaconPendingData=i),f.sendBeaconData(i),!0},sendAdditionalBeacon:function(e){s.ttinewBeaconPendingData&&(f.sendBeaconData(Object.assign(s.ttinewBeaconPendingData,e)),s.ttinewBeaconPendingData=void 0,s.ttinewBeaconPending=!1)},sendBeaconData:function(n){var r,i,o,a,c=[],l=[],u=!0;if(s.beacon_url=s.beacon_url_override||s.beacon_url,!s.beacon_url||!s.beaconUrlAllowed(s.beacon_url)||f.utils.isObjectEmpty(n))return!1;s.fireEvent("beacon",n),c=this.getVarsOfPriority(n,-1),l=this.getVarsOfPriority(n,1),r=c.concat(this.getVarsOfPriority(n,0),l).join("&"),s.beacon_url_force_https&&s.beacon_url.match(/^\/\//)&&(s.beacon_url="https:"+s.beacon_url),i=s.beacon_url+(s.beacon_url.indexOf("?")>-1?"&":"?")+r,"GET"===s.beacon_type?(u=!0,i.length>f.constants.MAX_GET_LENGTH&&(window.console&&(console.warn||console.log)||function(){})("Boomerang: Warning: Beacon may not be sent via GET due to payload size > 2000 bytes")):("POST"===s.beacon_type||i.length>f.constants.MAX_GET_LENGTH)&&(u=!1);var d=s.sendWindow;if(d&&d.navigator&&"function"==typeof d.navigator.sendBeacon&&f.utils.isNative(d.navigator.sendBeacon)&&"function"==typeof e.Blob&&"GET"!==s.beacon_type&&void 0===s.beacon_auth_token&&!s.beacon_disable_sendbeacon){var p=new e.Blob([r+"&sb=1"],{type:"text/plain"});if(d.navigator.sendBeacon(s.beacon_url,p))return!0}if(f.orig_XMLHttpRequest||d&&d.XMLHttpRequest||(u=!0),u){try{o=new Image}catch(e){return!1}o.src=i}else{a=new(d.XMLHttpRequest||f.window.orig_XMLHttpRequest||f.orig_XMLHttpRequest||f.window.XMLHttpRequest);try{this.sendXhrPostBeacon(a,r)}catch(e){a=new f.boomerang_frame.XMLHttpRequest,this.sendXhrPostBeacon(a,r)}}return!0},hasSentPageLoadBeacon:function(){return s.hasSentPageLoadBeacon},sendXhrPostBeacon:function(e,n){e.open("POST",s.beacon_url),e.setRequestHeader("Content-type","text/plain"),void 0!==s.beacon_auth_token&&(void 0===s.beacon_auth_key&&(s.beacon_auth_key="Authorization"),e.setRequestHeader(s.beacon_auth_key,s.beacon_auth_token)),s.beacon_with_credentials&&(e.withCredentials=!0),e.send(n)},getVarsOfPriority:function(e,n){var r,i=[],o=0!==n?s.varPriority[n]:e;for(r in o)o.hasOwnProperty(r)&&e.hasOwnProperty(r)&&(i.push(this.getUriEncodedVar(r,void 0===e[r]?"":e[r])),0!==n&&delete e[r]);return i},getUriEncodedVar:function(e,n){return null==n&&(n=""),"object"==typeof n&&(n=f.utils.serializeForUrl(n)),encodeURIComponent(e)+"="+encodeURIComponent(n)},getResourceTiming:function(e,n,r){var i,o=f.getPerformance();try{if(o&&"function"==typeof o.getEntriesByName){if(!(i=o.getEntriesByName(e))||!i.length||"function"==typeof r&&(!(i=f.utils.arrayFilter(i,r))||!i.length))return;return i.length>1&&"function"==typeof n&&i.sort(n),i[i.length-1]}}catch(e){}},setBeaconUrlsAllowed:function(e){s.beacon_urls_allowed=e}},f.url){var m=f.window.document.createElement("a");m.href=f.url,a.url=m.href}else a.url=a.utils.getMyURL();delete window.BOOMR_start,"number"==typeof window.BOOMR_lstart?(a.t_lstart=window.BOOMR_lstart,delete window.BOOMR_lstart):"number"==typeof f.window.BOOMR_lstart&&(a.t_lstart=f.window.BOOMR_lstart),"number"==typeof f.window.BOOMR_onload&&(a.t_onload=f.window.BOOMR_onload),"object"==typeof console&&void 0!==console.log?a.log=function(e,n,r){}:a.log=function(){},a.debug=(n=function(e){return function(n,r){return this.log(n,e,"boomerang"+(r?"."+r:"")),this}})("debug"),a.info=n("info"),a.warn=n("warn"),a.error=n("error"),a.traceTime=function(e){var n=e||f.now();return[new Date(n).getHours(),new Date(n).getMinutes(),new Date(n).getSeconds(),new Date(n).getMilliseconds()].join(":")},a.cleanupURL=function(){return""+location.toString().replace(location.protocol+"//"+location.host,"")},a.trace=function(e,n,r,i){r="("+f.traceTime()+") {"+f.cleanupURL()+"} ["+e+"] <"+n+"> "+r},a.traceHighlight=function(e,n,r,i){r="("+f.traceTime()+") {"+f.cleanupURL()+"} ["+e+"] <"+n+"> "+r},a.warn=function(e,n,r,i){r="("+f.traceTime()+") {"+f.cleanupURL()+"} ["+e+"] <"+n+"> "+r};try{var g=a.getPerformance();g&&"function"==typeof g.now&&/\[native code\]/.test(String(g.now))&&g.timing&&g.timing.navigationStart&&(a.now=function(){return Math.round(g.now()+g.timing.navigationStart)})}catch(e){}for(o in s.checkLocalStorageSupport(),a)a.hasOwnProperty(o)&&(f[o]=a[o]);return f.xhr_excludes||(f.xhr_excludes={}),f.checkWindowOverrides=function(e){if(!Object.getOwnPropertyNames)return[];var n,r,i,o=[];function s(n){(function(n){for(var r,i,o=n.split("."),s=e;s&&o.length;)try{s=s[o.shift()]}catch(e){return!1}return"function"==typeof s&&(r=s,!("console.assert"===(i=n)||"Function.prototype"===i||i.indexOf("onload")>=0||i.indexOf("onbeforeunload")>=0||i.indexOf("onerror")>=0||i.indexOf("onload")>=0||i.indexOf("NodeFilter")>=0||r.toString&&!r.hasOwnProperty("toString")&&/\[native code\]/.test(String(r))))})(n)&&o.push(n)}(n=c.createElement("iframe")).style.display="none",n.src="javascript:false",c.getElementsByTagName("script")[0].parentNode.appendChild(n),i=Object.getOwnPropertyNames(r=n.contentWindow);for(var a=0;a<i.length;a++){var l=i[a];if("window"!==l&&"self"!==l&&"top"!==l&&"parent"!==l&&"frames"!==l&&r[l]&&("object"==typeof r[l]||"function"==typeof r[l])){s(l);var u=[];try{u=Object.getOwnPropertyNames(r[l])}catch(e){}for(var d=0;d<u.length;d++)s([l,u[d]].join("."));if(r[l].prototype){u=Object.getOwnPropertyNames(r[l].prototype);for(var d=0;d<u.length;d++)s([l,"prototype",u[d]].join("."))}}}return o},f.checkDocumentOverrides=function(e){return f.utils.arrayFilter(["readyState","domain","hidden","URL","cookie"],function(n){return e.hasOwnProperty(n)})},"true"===f.utils.getQueryParamValue("overridden")&&e&&e.Object&&Object.getOwnPropertyNames&&[].concat(f.checkWindowOverrides(e)).concat(f.checkDocumentOverrides(c)).length,u("onBoomerangLoaded",{BOOMR:f},!0),f}(window),this.BOOMR.addVar("token",e.token),e&&this.initOptions(e))}return e.prototype.shouldIgnoreUrls=function(e){return a(e,location.href)},e.prototype.initOptions=function(e){this.installPlugins();var n=e.sampleRate||1,r=e.interactionSampleRate||.1;for(var i in this.BOOMR.init({beacon_url:"https://fclog.baidu.com/log/weirwood?type=perf",autorun:!1,History:{auto:!0},instrument_xhr:!0,monitor_fetch:!0,ResourceTiming:{clearOnBeacon:!0,monitorClearResourceTimings:!0},Continuity:{monitorLongTasks:!0,monitorPageBusy:!0,monitorFrameRate:!0,monitorInteractions:!0,monitorStats:!1,ttiWaitForXHRDone:e.ttiWaitForXHRDone||!0,ttiWaitForXHRIgnore:e.ttiWaitForXHRIgnore||[],waitAfterOnload:e.waitAfterOnload||!1,afterOnload:e.afterOnload||!1},ignoreImage:e.ignoreImage||!1,sampleRate:n,interactionSampleRate:n*r,normalizeUrl:e.normalizeUrl,initiatorTypes:e.initiatorTypes||["spa_hard","spa","xhr"],ignoreXhrs:e.ignoreXhrs||[],sendWindow:e.sendWindow||window}),this.BOOMR)this.BOOMR.hasOwnProperty(i)&&(this[i]=this.BOOMR[i])},e.prototype.installPlugins=function(){var e,n,r,i,o=function(e){var n,r,i=(e=e||window).document,o=function(n){var r=!1;if(n.getBoundingClientRect){var o=n.getBoundingClientRect();(r={top:Math.max(o.top,0),left:Math.max(o.left,0),bottom:Math.min(o.bottom,e.innerHeight||i.documentElement.clientHeight),right:Math.min(o.right,e.innerWidth||i.documentElement.clientWidth)}).bottom<=r.top||r.right<=r.left?r=!1:r.area=(r.bottom-r.top)*(r.right-r.left)}return r},s=function(e,n){if(n){var r=o(e);r&&a.push({url:n,area:r.area,rect:r})}},a=[],c=[];try{var l=e.performance.timing.navigationStart;!function(){for(var n=i.getElementsByTagName("*"),r=/url\(.*(http.*)\)/ig,c=0;c<n.length;c++){var l=n[c],u=e.getComputedStyle(l);if("IMG"==l.tagName&&s(l,l.currentSrc||l.src),u["background-image"]){r.lastIndex=0;var d=r.exec(u["background-image"]);d&&d.length>1&&s(l,d[1].replace('"',""))}if("IFRAME"==l.tagName)try{var p=o(l);if(p){var h=RUMSpeedIndex(l.contentWindow);h&&a.push({tm:h,area:p.area,rect:p})}}catch(e){}}}();for(var u={},d=e.performance.getEntriesByType("resource"),p=0;p<d.length;p++)u[d[p].name]=d[p].responseEnd;for(var h=0;h<a.length;h++)"tm"in a[h]||(a[h].tm=void 0!==u[a[h].url]?u[a[h].url]:0);if(!function(){try{for(var r=performance.getEntriesByType("paint"),o=0;o<r.length;o++)if("first-paint"==r[o].name){l=performance.getEntriesByType("navigation")[0].startTime,n=r[o].startTime-l;break}}catch(e){}if(void 0===n&&"msFirstPaint"in e.performance.timing&&(n=e.performance.timing.msFirstPaint-l),void 0===n&&"chrome"in e&&"loadTimes"in e.chrome){var s=e.chrome.loadTimes();if("firstPaintTime"in s&&s.firstPaintTime>0){var a=s.startLoadTime;"requestTime"in s&&(a=s.requestTime),s.firstPaintTime>=a&&(n=(s.firstPaintTime-a)*1e3)}}if(void 0===n||n<0||n>12e4){n=e.performance.timing.responseStart-l;for(var c={},u=i.getElementsByTagName("head")[0].children,o=0;o<u.length;o++){var d=u[o];"SCRIPT"==d.tagName&&d.src&&!d.async&&(c[d.src]=!0),"LINK"==d.tagName&&"stylesheet"==d.rel&&d.href&&(c[d.href]=!0)}for(var p=e.performance.getEntriesByType("resource"),h=!1,f=0;f<p.length;f++)if(!h&&c[p[f].name]&&("script"==p[f].initiatorType||"link"==p[f].initiatorType)){var m=p[f].responseEnd;(void 0===n||m>n)&&(n=m)}else h=!0}n=Math.max(n,0)}(),!function(){for(var r={0:0},o=0,s=0;s<a.length;s++){var l=n;"tm"in a[s]&&a[s].tm>n&&(l=a[s].tm),void 0===r[l]&&(r[l]=0),r[l]+=a[s].area,o+=a[s].area}var u=Math.max(i.documentElement.clientWidth,e.innerWidth||0)*Math.max(i.documentElement.clientHeight,e.innerHeight||0);if(u>0&&(u=.1*Math.max(u-o,0),void 0===r[n]&&(r[n]=0),r[n]+=u,o+=u),o){for(var d in r)r.hasOwnProperty(d)&&c.push({tm:d,area:r[d]});c.sort(function(e,n){return e.tm-n.tm});for(var p=0,h=0;h<c.length;h++)p+=c[h].area,c[h].progress=p/o}}(),c.length){r=0;for(var f=0,m=0,g=0;g<c.length;g++){var v=c[g].tm-f;v>0&&m<1&&(r+=(1-m)*v),f=c[g].tm,m=c[g].progress}}else r=n}catch(e){}return r}(window);if(this.BOOMR.addVar("speedIndex",o,!0),!function(){if(!BOOMR.plugins.Continuity){var e,n=0,r=1,i=2,o="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ-_",s=".",a={passive:!0,capture:!0},c=BOOMR.getPerformance(),l={},u=c&&c.timing&&c.timing.navigationStart?c.timing.navigationStart:BOOMR.now(),d=function(r){var i={},o={},s=[],a=0,d=0,p=0,h=!0;function f(){return Math.floor((BOOMR.now()-r)/100)}function m(n){function o(e){return n?BOOMR.getPendingVar(e):BOOMR.getVar(e)}if(e.ttiWaitForXHRDone&&BOOMR.utils.inArray(o("http.initiator"),BOOMR.constants.BEACON_TYPE_SPAS)){var s=o("c.tti.xd"),a=0,c="spa"===o("http.initiator");c&&(a=o("rt.tstart")-u,s=o("c.tti.xd.increasing"));var l=s?s-(r-u):c?a:r-u,d=f(),p=0,h=0,m=0;for(p=Math.floor(l/100);p<=d;p++){if(!n&&(i.longtask&&i.longtask[p]||i.fps&&(!i.fps[p]||i.fps[p]<2)||i.busy&&i.busy[p]>50||i.interdly&&i.interdly[p])){h=0;continue}if(++h>=5){m=Math.max((m=r+(p-5)*100-a)-u,o("c.tti.xd"));break}}return m>0?(n||e.addToBeacon("c.tti.new",m),e.hasAddedTtinewToBeacon=!0,m):(e.hasAddedTtinewToBeacon=!1,0)}}return BOOMR.fpsLog&&BOOMR.fpsLog.length&&(r=BOOMR.fpsLog[0]+u),l.timeToInteractive=function(){if(a)return a-u},l.timeToVisuallyReady=function(){if(d)return d-u},l.timeToHeroImagesReady=function(){if(e.ttiWaitForHeroImages&&p)return p-u},l.timeToFrameworkReady=function(){if(e.ttiWaitForFrameworkReady&&e.frameworkReady)return e.frameworkReady-u},l.log=function(){return s},{register:function(e,r,s){i[e]||(i[e]=[]),o[e]={compressMode:r||n,backfillLast:s}},set:function(e,n,r){void 0===r&&(r=f()),i[e]&&(i[e][r]=n)},log:function(n,r,i){void 0===r&&(r=f()),s.push({type:n,time:r,val:i}),s.length>e.logMaxEntries&&Array.prototype.splice.call(s,0,s.length-e.logMaxEntries)},increment:function(e,n,r){void 0===r&&(r=f()),void 0===n&&(n=1),i[e]&&(i[e][r]||(i[e][r]=0),i[e][r]+=n)},getTimeBucket:f,getStats:function(e,n){var o,s=0,a=0,c=1/0,l=0,u=Math.floor((n-r)/100);if(!i[e])return 0;for(var d in i[e])(d=parseInt(d,10))>=u&&i[e].hasOwnProperty(d)&&(o=i[e][d],s++,a+=o,c=Math.min(c,o),l=Math.max(l,o));return{total:a,count:s,min:c,max:l}},analyze:function(n){var g=f(),v=0,y=0;if(e.sendLog&&void 0!==n&&function(){for(var n="",r=0;r<s.length;r++){var i=s[r];for(var o in 0!==r&&(n+="|"),n+=i.type,n+=Math.round(i.time-u).toString(36),i.val)i.val.hasOwnProperty(o)&&(n+=","+o,"number"==typeof i.val[o]?n+=i.val[o].toString(36):n+=i.val[o])}""!==n&&e.addToBeacon("c.l",n)}(),e.sendTimeline&&void 0!==n){var b,_,w=n?Math.max(n,BOOMR.now()-12e4):n;for(b in i)i.hasOwnProperty(b)&&""!==(_=M(o[b].compressMode,o[b].backfillLast,i[b],0!==w?Math.floor((w-r)/100):0,f()))&&e.addToBeacon("c.t."+b,_)}if(!a){if(!d&&!(d=function(){var n=0;if(e.ttiWaitForFrameworkReady){if(!e.frameworkReady)return;n=e.frameworkReady}if(BOOMR.plugins.PaintTiming&&BOOMR.plugins.PaintTiming.is_supported()&&c&&c.timeOrigin){var r=BOOMR.plugins.PaintTiming.getTimingFor("largest-contentful-paint");r||(r=BOOMR.plugins.PaintTiming.getTimingFor("first-contentful-paint")),r||(r=BOOMR.plugins.PaintTiming.getTimingFor("first-paint")),r&&(n=Math.max(n,Math.round(r+c.timeOrigin)))}else if(c&&c.timing&&c.timing.msFirstPaint)n=Math.max(n,c.timing.msFirstPaint);else if(BOOMR.window&&BOOMR.window.chrome&&"function"==typeof BOOMR.window.chrome.loadTimes){var i=BOOMR.window.chrome.loadTimes();i&&i.firstPaintTime&&(n=Math.max(n,1e3*i.firstPaintTime))}return c&&c.timing&&c.timing.domContentLoadedEventEnd&&(n=Math.max(n,c.timing.domContentLoadedEventEnd)),e.ttiWaitForHeroImages&&(p=function(e){var n,r,i,o,s,a=0;if(!BOOMR.window||!BOOMR.window.document||"function"!=typeof BOOMR.window.document.querySelectorAll||!c||"function"!=typeof c.getEntriesByType)return 0;if((n=BOOMR.window.document.querySelectorAll(e+", "+e+" * img, "+e+" * image"))&&n.length)for(r=0;r<n.length;r++){if(!(o=n[r].currentSrc||n[r].src||"function"==typeof n[r].getAttribute&&n[r].getAttribute("xlink:href"))&&"function"==typeof BOOMR.window.getComputedStyle){var l=BOOMR.window.getComputedStyle(n[r])&&BOOMR.window.getComputedStyle(n[r]).getPropertyValue("background");if(l){var d=l.match(/url\(["']?([^"']*)["']?\)/);d&&d.length>0&&(o=d[1])}}if(o&&(s=c.getEntriesByName(o))&&s.length)for(i=0;i<s.length;i++)a=Math.max(a,s[i].responseEnd)}return a?Math.floor(a+u):0}(e.ttiWaitForHeroImages))&&(n=Math.max(n,p)),n}())||(h&&(e.addToBeacon("c.tti.vr",l.timeToVisuallyReady()),e.addToBeacon("c.tti.fr",l.timeToFrameworkReady()),e.addToBeacon("c.tti.hi",l.timeToHeroImagesReady()),h=!1),!i.longtask&&!i.fps&&!i.busy))return;for(v=Math.floor((d-r)/100);v<=g;v++){if(i.longtask&&i.longtask[v]||i.fps&&(!i.fps[v]||i.fps[v]<2)||i.busy&&i.busy[v]>50||i.interdly&&i.interdly[v]){y=0;continue}if(++y>=5){a=Math.max(a=r+(v-5)*100,d);break}}a>0&&e.addToBeacon("c.tti",l.timeToInteractive())}m()},analyzeXHRDone:m,stop:function(){i={},s=[]},onBeacon:function(){for(var e in i)i.hasOwnProperty(e)&&(i[e]=[]);s=[],h=!1}}},p=function(n){if(n.PerformanceObserver&&n.LayoutShift){var r=!0,i=0,o=0,s=[],a=new n.PerformanceObserver(function(e){r&&e.getEntries().map(function(e){if(!e.hadRecentInput){var n=s[0],r=s[s.length-1];o&&e.startTime-r.startTime<1e3&&e.startTime-n.startTime<5e3?(o+=e.value,s.push(e)):(o=e.value,s=[e]),o>i&&(i=o)}})});try{a.observe({type:"layout-shift",buffered:!0})}catch(e){return}return l.clsScore=function(){return i},{clearClsScore:c,analyze:function(n){e.addToBeacon("c.cls",l.clsScore())},stop:function(){r=!1,a.disconnect(),c()},onBeacon:function(){c()}}}function c(){i=0}},h=function(r,i){if(r.PerformanceObserver&&r.PerformanceLongTaskTiming){var o={unknown:0,self:1,"same-origin-ancestor":2,"same-origin-descendant":3,"same-origin":4,"cross-origin-ancestor":5,"cross-origin-descendant":6,"cross-origin-unreachable":7,"multiple-contexts":8},s={unknown:0,script:1,layout:2},a={unknown:0,iframe:1,embed:2,object:3},c=new r.PerformanceObserver(function(e){var n,r,o={};if(d){n=e.getEntries(),Array.prototype.push.apply(u,n);var s=i.getTimeBucket();for(r=0;r<n.length;r++){var a=n[r].duration;p+=a;var c=s;for(a-=100;a>0&&c>=0;)o[--c]?o[c]++:o[c]=1,a-=100}for(var l in o)o.hasOwnProperty(l)&&i.increment("longtask",o[l],l);i.increment("longtask",n.length)}});try{c.observe({entryTypes:["longtask"]})}catch(e){return}i.register("longtask",n);var u=[],d=!0,p=0;return l.longTasksTime=function(){return p},l.longTasksCount=function(){return u.length},{getTasks:function(){return u},clearTasks:h,analyze:function(n){var r,i,c,d,p,h=[],f=[];if(0!==u.length){for(r=0;r<u.length;r++){for(i=0,d={s:Math.round((c=u[r]).startTime).toString(36),d:Math.ceil(c.duration).toString(36),n:o[c.name]?o[c.name]:0},f=[];i<c.attribution.length;i++)if("script"!==(p=c.attribution[i]).name||"iframe"!==p.containerType||p.containerName||p.containerId||p.containerSrc){var m,g,v=p.containerName?p.containerName:void 0,y=p.containerId?p.containerId:void 0;v===y&&(v=void 0);var b=void 0===y?p.containerSrc:void 0;f.push({a:s[p.name]?s[p.name]:0,t:a[p.containerType]?a[p.containerType]:0,n:v,i:y,s:b})}f.length>0&&(d.a=f),h.push(d)}e.addToBeacon("c.lt.n",l.longTasksCount(),!0),e.addToBeacon("c.lt.tt",l.longTasksTime()),e.addToBeacon("c.lt",(m=h,(g=BOOMR.utils.Compression&&BOOMR.utils.Compression.jsUrl||window.UserTimingCompression&&window.UserTimingCompression.jsUrl||BOOMR.window.UserTimingCompression&&BOOMR.window.UserTimingCompression.jsUrl)?g(m):window.JSON?JSON.stringify(m):""))}},stop:function(){d=!1,c.disconnect(),h()},onBeacon:function(){h()}}}function h(){u=[],p=0}},f=function(n,r){r.register("busy",i);var o=Math.floor(3.125),s=BOOMR.now(),a=0,c=0,u=0,d=0,p=!1,h=!1;return l.pageBusy=function(){return 0===u?0:Math.ceil(d/u*100)},p=setInterval(function(){var e=BOOMR.now(),n=e-s;if(s=e,n>68){var r=Math.floor((n-32)/32);a+=r,c+=r,n-=32*r}a++,n>36&&c++},32),h=setInterval(function(){var e=r.getTimeBucket(),n=e,i=0;if(0!==a){for(;a>o+1&&i<=100;)r.set("busy",100,--n),a-=o,c=Math.max(c-o,0),u+=o,d+=o,i++;u+=a,d+=c,r.set("busy",Math.ceil(c/a*100),e),a=0,c=0}},100),{analyze:function(n){e.addToBeacon("c.b",l.pageBusy())},stop:function(){p&&(clearInterval(p),p=!1),h&&(clearInterval(h),h=!1)},onBeacon:function(){u=0,d=0}}},m=function(r,i){i.register("fps",n);var o,s,a=0,c=0,d=!0;if(BOOMR.fpsLog&&BOOMR.fpsLog.length){s=o=BOOMR.fpsLog[0]+u;for(var p=0;p<BOOMR.fpsLog.length;p++){var h=u+BOOMR.fpsLog[p];i.increment("fps",1,Math.floor((h-o)/100)),h-s>=50&&c++,s=h}a=BOOMR.fpsLog.length,delete BOOMR.fpsLog}else o=BOOMR.now();return r.requestAnimationFrame(function e(n){d&&(n-s>=50&&c++,s=n,a++,i.increment("fps"),r.requestAnimationFrame(e))}),l.fps=function(){var e=l.fpsDuration();if(e)return Math.floor(a/(e/1e3))},l.fpsDuration=function(){if(o)return BOOMR.now()-o},l.fpsMinimum=function(){if(l.fpsDuration()){var e=i.getStats("fps",o).min;return e!==1/0?e:void 0}},l.fpsLongFrames=function(){return c},l.fpsStart=function(){return o?o.toString(36):0},{analyze:function(n){e.addToBeacon("c.f",l.fps()),e.addToBeacon("c.f.d",l.fpsDuration()),e.addToBeacon("c.f.m",l.fpsMinimum()),e.addToBeacon("c.f.l",l.fpsLongFrames()),e.addToBeacon("c.f.s",l.fpsStart())},stop:function(){d=!1,o=0},onBeacon:function(){d&&(o=BOOMR.now()),a=0,c=0}}},g=function(r,o,s){if(r&&r.document&&r.document.body&&r.document.documentElement){var c=2e3,u=20,d=0,p=0,h=0,f=0,m=0,g=0,v=0,y=0,b=!1,_=r.document.body,w=r.document.documentElement;o.register("scroll",n),o.register("scrollpct",i);var O=Math.max(_.scrollHeight,_.offsetHeight,w.clientHeight,w.scrollHeight,w.offsetHeight)-BOOMR.utils.windowHeight();return l.scrollPct=function(){return f},l.scrollCount=function(){return m},l.scrollDistinct=function(){return v},l.scrollPixels=function(){return g},BOOMR.utils.addListener(r,"scroll",R,a),b=setInterval(function(){var e=Math.min(h,100);0!==e&&o.set("scrollpct",e),h=0},100),{analyze:function(n){e.addToBeacon("c.s",l.scrollCount()),e.addToBeacon("c.s.p",l.scrollPct()),e.addToBeacon("c.s.y",l.scrollPixels()),e.addToBeacon("c.s.d",l.scrollDistinct())},stop:function(){b&&(clearInterval(b),b=!1),BOOMR.utils.removeListener(r,"scroll",R)},onBeacon:function(){f=0,m=0,g=0,v=0}}}function R(e){var n=BOOMR.now();m++,n-y>c&&v++,y=n;var r=Math.ceil(BOOMR.utils.scroll().y),i=Math.abs(d-r);g+=i,o.increment("scroll",i),(0===p||Math.abs(p-r)>u)&&(o.log(0,n,{y:r}),p=r),h+=Math.round(i/O*100),f+=Math.round(i/O*100),d=r}},v=function(r,i,o){i.register("click",n);var s=0,c=0,u=0,d=0,p=0,h=null;function f(e){var n=BOOMR.now(),r=e.clientX,a=e.clientY;s++;var l=Math.round(Math.sqrt(Math.pow(p-a,2)+Math.pow(d-r,2)));h===e.target||l<=10?++c+1>=3&&(u++,BOOMR.fireEvent("rage_click",e)):c=0,d=r,p=a,h=e.target,i.increment("click"),i.log(1,n,{x:r,y:a}),e.cancelable&&o.interact("click",n,e)}return l.clicksCount=function(){return s},l.clicksRage=function(){return u},BOOMR.utils.addListener(r.document,"click",f,a),{analyze:function(n){e.addToBeacon("c.c",l.clicksCount()),e.addToBeacon("c.c.r",l.clicksRage())},stop:function(){BOOMR.utils.removeListener(r.document,"click",f)},onBeacon:function(){s=0,c=0,u=0}}},y=function(r,i,o){i.register("key",n);var s=0,c=0;function u(e){var n=BOOMR.now();s++,27===e.keyCode&&c++,i.increment("key"),i.log(3,n),e.cancelable&&o.interact("key",n,e)}return l.keyCount=function(){return s},l.keyEscapes=function(){return c},BOOMR.utils.addListener(r.document,"keydown",u,a),{analyze:function(n){e.addToBeacon("c.k",l.keyCount()),e.addToBeacon("c.k.e",l.keyEscapes())},stop:function(){BOOMR.utils.removeListener(r.document,"keydown",u)},onBeacon:function(){s=0,c=0}}},b=function(r,o,s){o.register("mouse",n),o.register("mousepct",i);var c=0,u=0,d=0,p=0,h=0,f=0,m=0,g=!1,v=!1,y=Math.round(Math.sqrt(Math.pow(BOOMR.utils.windowHeight(),2)+Math.pow(BOOMR.utils.windowWidth(),2)));function b(e){var n=e.clientX,r=e.clientY,i=Math.round(Math.sqrt(Math.pow(u-r,2)+Math.pow(c-n,2))),s=Math.round(i/y*100);h+=s,f+=s,m+=i,c=n,u=r,o.increment("mouse",i)}return l.mousePct=function(){return f},l.mousePixels=function(){return m},g=setInterval(function(){var e=Math.min(h,100);0!==e&&o.set("mousepct",e),h=0},100),v=setInterval(function(){(d!==c||p!==u)&&Math.round(Math.sqrt(Math.pow(p-u,2)+Math.pow(d-c,2)))>=10&&(o.log(2,BOOMR.now(),{x:c,y:u}),d=c,p=u)},250),BOOMR.utils.addListener(r.document,"mousemove",b,a),{analyze:function(n){e.addToBeacon("c.m.p",l.mousePct()),e.addToBeacon("c.m.n",l.mousePixels())},stop:function(){g&&(clearInterval(g),g=!1),v&&(clearInterval(v),v=!1),BOOMR.utils.removeListener(r.document,"mousemove",b)},onBeacon:function(){f=0,m=0}}},_=function(r,i,o){i.register("inter",n),i.register("interdly",n);var s=0,a=null,c=0,d=0,p=0,h=0,f=!0,m=0,g=0,v=!1,y=!1,b=!1,_=!1;function w(){v&&(clearTimeout(v),v=!1),y&&(clearTimeout(y),y=!1)}function O(){BOOMR.sendBeaconWhenReady({"rt.start":"manual","http.initiator":"interaction","rt.tstart":m,"rt.end":g},function(){w(),BOOMR.fireEvent("interaction")},e)}return l.interactionDelayed=function(){return p},l.interactionDelayedTime=function(){return Math.ceil(h)},l.interactionAvgDelay=function(){if(c>0)return Math.ceil(d/c)},l.timeToFirstInteraction=function(){if(s)return s-u},l.firstInputDelay=function(){if(null!==a)return a},BOOMR.subscribe("spa_init",function(){b=!0,w()},null,e),{interact:function(n,l,_){var w=0;l=l||BOOMR.now(),f&&(c++,s||(s=_&&_.timeStamp?_.timeStamp+u:l),_&&_.timeStamp&&!(e.isSafari&&r!==window)&&(w=_.timeStamp>14e11?l-_.timeStamp:BOOMR.hrNow()-_.timeStamp,d+=w,null===a&&(a=Math.ceil(w)),w>50&&(i.increment("interdly"),p++,h+=w)),i.increment("inter"),!b&&e.afterOnloadMonitoring&&(g=BOOMR.now(),m||(m=g,y=setTimeout(O,3e4)),v&&(clearTimeout(v),v=!1),v=setTimeout(O,o)))},analyze:function(n){var r;e.addToBeacon("c.i.dc",l.interactionDelayed()),e.addToBeacon("c.i.dt",l.interactionDelayedTime()),e.addToBeacon("c.i.a",l.interactionAvgDelay()),!_&&(BOOMR.plugins.EventTiming&&BOOMR.plugins.EventTiming.is_enabled()&&(r=BOOMR.plugins.EventTiming.metrics.firstInputDelay()),r||null===a||(r=l.firstInputDelay()),r&&(e.addToBeacon("c.fid",Math.ceil(r),!0),e.addToBeacon("c.ttfi",BOOMR.plugins.EventTiming.metrics.timeToFirstInteraction()||l.timeToFirstInteraction()),_=!0))},stop:function(){f=!1},onBeacon:function(){h=0,p=0,c=0,d=0,m=0,g=0,b=!1,w()}}},w=function(e,n,r){var i,o,s=!0;function c(){s&&(r.interact("pd",i,o),i=null,o=null,BOOMR.utils.removeListener(window,"pointerup",c))}function l(e){s&&e.cancelable&&(i=BOOMR.now(),o=e,BOOMR.utils.addListener(window,"pointerup",c,a))}function u(){s=!1,BOOMR.utils.removeListener(window,"pointerdown",l),BOOMR.utils.removeListener(window,"pointerup",c),BOOMR.utils.removeListener(window,"pointercancel",u)}return BOOMR.utils.addListener(window,"pointerdown",l,a),BOOMR.utils.addListener(window,"pointercancel",u,a),{stop:u}},O=function(e,n,r){var i=!0;function o(e){if(i&&e.cancelable){var n=BOOMR.now();r.interact("md",n,e)}}return BOOMR.utils.addListener(window,"mousedown",o,a),{stop:function(){i=!1,BOOMR.utils.removeListener(window,"mousedown",o)}}},R=function(e,n,r){var i=!0;function o(e){if(i&&e.cancelable){var n=BOOMR.now();r.interact("ts",n,e)}}return BOOMR.utils.addListener(window,"touchstart",o,a),{stop:function(){i=!1,BOOMR.utils.removeListener(window,"touchstart",o)}}},S=function(e,r,i){r.register("vis",n);var o={visible:0,hidden:1,prerender:2,unloaded:3},s=!0;return BOOMR.subscribe("visibility_changed",function(e){var n=BOOMR.now();s&&(r.increment("vis"),r.log(4,n,{s:o[BOOMR.visibilityState()]}))}),{stop:function(){s=!1}}},E=function(e,r,i){r.register("orn",n);var o=!0;function s(e){var n=BOOMR.now(),i=window.orientation;if(o){r.increment("orn");var s=window.screen&&(screen.orientation||screen.msOrientation||screen.mozOrientation||{});s&&"number"==typeof s.angle&&(i=screen.orientation.angle),"number"==typeof i&&r.log(5,n,{a:i})}}return BOOMR.utils.addListener(e,"orientationchange",s,a),{stop:function(){o=!1,BOOMR.utils.removeListener(e,"orientationchange",s)}}},T=function(e,o){o.register("mem",r,!0),o.register("bat",i,!0),o.register("domsz",r,!0),o.register("domln",r,!0),o.register("mut",n);var s,a=e.document,l=!0,u=!1,d=null,p=0,h=0,f=a.getElementsByTagName("*");function m(){l&&d&&o.set("bat",d.level)}return u=setInterval(function(){var e=c&&c.memory&&c.memory.usedJSHeapSize;if(e&&o.set("mem",e),h=f.length,o.set("domsz",a.documentElement.innerHTML.length),o.set("domln",h),p>0){var n=Math.min(Math.round(p/h*100),100);o.set("mut",n),p=0}},1e3),e.navigator&&"function"==typeof e.navigator.getBattery&&e.navigator.getBattery().then(function(e){(d=e).onlevelchange&&(d.onlevelchange=m)}),BOOMR.utils.isMutationObserverSupported()&&(s=BOOMR.utils.addObserver(a,{childList:!0,subtree:!0},null,function(e){return e.forEach(function(e){if("childList"!==e.type)return!0;for(var n=0;n<e.addedNodes.length;n++){var r=e.addedNodes[n];p++,p+=r.getElementsByTagName?r.getElementsByTagName("*").length:0}}),!0},null,this)),{stop:function(){l=!1,u&&(clearInterval(u),u=!1),s&&s.observer&&(s.observer.disconnect(),s=null),d&&d.onlevelchange&&(d.onlevelchange=null),f=null}}};e={monitorLongTasks:!0,monitorPageBusy:!0,monitorFrameRate:!0,monitorInteractions:!0,monitorStats:!1,monitorLayoutShifts:!0,afterOnload:!1,afterOnloadMaxLength:6e4,afterOnloadMinWait:5e3,waitAfterOnload:!1,ttiWaitForFrameworkReady:!1,ttiWaitForHeroImages:!1,ttiWaitForXHRDone:!1,ttiWaitForXHRIgnore:[],sendLog:!0,sendTimeline:!0,logMaxEntries:100,initialized:!1,complete:!1,isSpa:!1,firedPageReady:!1,afterOnloadMonitoring:!1,frameworkReady:null,timeline:null,ttiMethod:null,longTaskMonitor:null,pageBusyMonitor:null,frameRateMonitor:null,interactionMonitor:null,scrollMonitor:null,clickMonitor:null,keyMonitor:null,mouseMonitor:null,visibilityMonitor:null,orientationMonitor:null,touchStartMonitor:null,mouseDownMonitor:null,pointerDownMonitor:null,statsMonitor:null,layoutShiftMonitor:null,monitors:["timeline","longTaskMonitor","pageBusyMonitor","frameRateMonitor","scrollMonitor","keyMonitor","clickMonitor","mouseMonitor","interactionMonitor","visibilityMonitor","orientationMonitor","statsMonitor","layoutShiftMonitor","touchStartMonitor","mouseDownMonitor","pointerDownMonitor"],timeOfLastBeacon:0,hasAddedDataToBeacon:!1,hasAddedTtinewToBeacon:void 0,isSafari:window&&window.navigator&&window.navigator.vendor&&-1!==window.navigator.vendor.indexOf("Apple"),onBeforeBeacon:function(){e.runAllAnalyzers()},checkIfSendAdditionalBeacon:function(){if(!1===e.hasAddedTtinewToBeacon&&BOOMR.hasPending()){var n=e.timeline.analyzeXHRDone(!0);BOOMR.sendAdditionalBeacon(n>0?{"c.tti.new":n,add:1}:{"c.tti.new":void 0,add:2})}},runAllAnalyzers:function(){var n,r;if(!e.hasAddedDataToBeacon){for(n=0;n<e.monitors.length;n++)(r=e[e.monitors[n]])&&"function"==typeof r.analyze&&r.analyze(e.timeOfLastBeacon);e.addToBeacon("c.lb",e.timeOfLastBeacon?e.timeOfLastBeacon.toString(36):0),e.timeOfLastBeacon=BOOMR.now(),e.hasAddedDataToBeacon=!0}},onBeacon:function(n){var r;if(!n||void 0===n.early&&(!n["http.initiator"]||0!==n["http.initiator"].indexOf("api_custom_"))){for(r=0;r<e.monitors.length;r++){var i=e[e.monitors[r]];i&&(e.afterOnload||"function"!=typeof i.stop||i.stop(),"function"==typeof i.onBeacon&&i.onBeacon())}e.hasAddedDataToBeacon=!1,n&&n.add&&(e.hasAddedTtinewToBeacon=void 0)}},onXhrLoad:function(n){n&&BOOMR.utils.inArray(n.initiator,BOOMR.constants.BEACON_TYPE_SPAS)&&(e.isSpa=!0),n&&"spa_hard"===n.initiator&&e.onPageReady()},onPageReady:function(){if(e.firedPageReady=!0,e.afterOnload&&e.monitorInteractions&&(e.afterOnloadMonitoring=!0,e.isSpa||"number"!=typeof e.afterOnloadMaxLength||setTimeout(function(){e.afterOnloadMonitoring=!1},e.afterOnloadMaxLength)),e.waitAfterOnload){var n=BOOMR.now();setTimeout(function r(){BOOMR.now()-n>e.waitAfterOnload?(e.complete=!0,BOOMR.sendBeacon()):(e.timeline.analyze(),(e.ttiWaitForXHRDone?BOOMR.getVar("c.tti.new"):l.timeToInteractive())?(e.complete=!0,BOOMR.sendBeacon()):setTimeout(r,500))},500)}else e.complete=!0},addToBeacon:function(e,n,r){if((0===n||void 0===n)&&!r)return void BOOMR.removeVar(e);BOOMR.addVar(e,n,!0)}},BOOMR.plugins.Continuity={init:function(n){if(BOOMR.utils.pluginConfig(e,n,"Continuity",["monitorLongTasks","monitorPageBusy","monitorFrameRate","monitorInteractions","monitorStats","afterOnload","afterOnloadMaxLength","afterOnloadMinWait","waitAfterOnload","ttiWaitForFrameworkReady","ttiWaitForHeroImages","ttiWaitForXHRDone","ttiWaitForXHRIgnore","sendLog","logMaxEntries","sendTimeline"]),e.initialized)return this;if(e.initialized=!0,e.timeline=new d(BOOMR.now()),BOOMR.window){if(e.monitorLongTasks&&BOOMR.window.PerformanceObserver&&BOOMR.window.PerformanceLongTaskTiming&&(e.longTaskMonitor=new h(BOOMR.window,e.timeline),e.ttiMethod="lt"),e.monitorFrameRate&&"function"==typeof BOOMR.window.requestAnimationFrame&&(e.frameRateMonitor=new m(BOOMR.window,e.timeline),e.ttiMethod||(e.ttiMethod="raf")),!e.monitorPageBusy||BOOMR.window.PerformanceObserver&&BOOMR.window.PerformanceLongTaskTiming&&e.monitorLongTasks||(e.pageBusyMonitor=new f(BOOMR.window,e.timeline),e.ttiMethod||(e.ttiMethod="b")),e.monitorInteractions){var r=BOOMR.window;e.interactionMonitor=new _(r,e.timeline,e.afterOnloadMinWait),e.scrollMonitor=new g(r,e.timeline,e.interactionMonitor),e.keyMonitor=new y(r,e.timeline,e.interactionMonitor),e.clickMonitor=new v(r,e.timeline,e.interactionMonitor),e.mouseMonitor=new b(r,e.timeline,e.interactionMonitor),e.visibilityMonitor=new S(r,e.timeline,e.interactionMonitor),e.orientationMonitor=new E(r,e.timeline,e.interactionMonitor),e.touchStartMonitor=new R(r,e.timeline,e.interactionMonitor),e.mouseDownMonitor=new O(r,e.timeline,e.interactionMonitor),e.pointerDownMonitor=new w(r,e.timeline,e.interactionMonitor)}e.monitorStats&&(e.statsMonitor=new T(BOOMR.window,e.timeline,e.interactionMonitor)),e.monitorLayoutShifts&&BOOMR.window.PerformanceObserver&&(e.layoutShiftMonitor=new p(BOOMR.window))}return BOOMR.addVar("c.e",u.toString(36)),BOOMR.addVar("c.tti.m",e.ttiMethod),BOOMR.subscribe("before_beacon",e.onBeforeBeacon,null,e),BOOMR.subscribe("beacon",e.onBeacon,null,e),BOOMR.subscribe("page_ready",e.onPageReady,null,e),BOOMR.subscribe("xhr_load",e.onXhrLoad,null,e),BOOMR.subscribe("route_change",e.checkIfSendAdditionalBeacon,null,e),this},is_complete:function(n){return e.complete||n&&("error"===n["http.initiator"]||void 0!==n.early)},frameworkReady:function(){e.frameworkReady=BOOMR.now()},getTtiWaitForXHRDone:function(){return e.ttiWaitForXHRDone},getTTIWaitForXHRIngore:function(){return"function"==typeof e.ttiWaitForXHRIgnore?e.ttiWaitForXHRIgnore():e.ttiWaitForXHRIgnore},checkIfSendAdditionalBeacon:e.checkIfSendAdditionalBeacon,metrics:l,compressBucketLog:M,decompressBucketLog:function(e,o){var a,c,l,u,d,p,h=[],f=o||0;if(!e||0===e.length)return[];for(a=0,p=parseInt(e.charAt(0),10),e=e.substring(1),u=1;a<e.length;a++){if("*"===e.charAt(a)){a++,l=e.indexOf("*",a),u=parseInt(e.substring(a,l),36),a=l;continue}for(e.charAt(a)===s?(a++,l=e.indexOf(s,a),d=parseInt(e.substring(a,l),36),a=l):p===n?d=x(e.charAt(a)):p===r?-1!==(l=e.indexOf(",",a))?(d=parseInt(e.substring(a,l),36),a=l):(d=parseInt(e.substring(a),36),a=e.length):p===i&&(d="__"===e.substr(a,2)?100:parseInt(e.substr(a,2),10),a++),c=1,h[f]=d;c<u;c++)h[++f]=d;f++,u=1}return h},decompressBucketLogNumber:x,decompressLog:function(e){var n,r,i,o,s,a=[];for(n=0,o=e.split("|");n<o.length;n++){for(r=1,s={type:parseInt((i=o[n].split(","))[0].charAt(0),10),time:parseInt(i[0].substring(1),36)};r<i.length;r++)s[i[r].charAt(0)]=i[r].substring(1);a.push(s)}return a}}}function M(e,a,c,l,u){var d,p,h,f,m,g="",v=0;if(!c||0===c.length)return"";if(a)for(void 0===c[l]&&(c[l]=0),d=l+1;d<=u;d++)void 0===c[d]&&(c[d]=c[d-1]);for(d=l;d<=u;d++){if(v="number"!=typeof c[d]||isNaN(c[d])?0:c[d],e===n?h=v<=63?o.charAt(v):s+v.toString(36)+s:e===r?h=v.toString(36):e===i&&(h=v<99?v<=9?"0"+Math.max(v,0):v:"__"),d+3<=u&&(c[d+1]===v||0===v&&void 0===c[d+1])&&(c[d+2]===v||0===v&&void 0===c[d+2])&&(c[d+3]===v||0===v&&void 0===c[d+3])){for(p=1;d<u&&(c[d+1]===v||0===v&&void 0===c[d+1]);)p++,d++;f="*"+p.toString(36)+"*"+h}else f=h;(0!==v||d!==u)&&(e===r&&m&&(g+=","),m=!0,g+=f)}return m?e.toString()+g:""}function x(e){if(!e||!e.charCodeAt)return 0;var n=e.charCodeAt(0);if(n>=48&&n<=57)return n-48;if(n>=97&&n<=122)return n-97+10;if(n>=65&&n<=90)return n-65+36;if(95===n)return 62;if(45===n)return 63;else return 0}}(),!function(){var e,n,r,i,o,s=["uninitialized","open","responseStart","domInteractive","responseEnd"];function l(e){if(!e)return null;e.href=e.href;var n=e.pathname;return"/"!==n.charAt(0)&&(n="/"+n),n}function u(e){var n;if(e.href&&(e.href.match(/^(about:|javascript:|data:)/i)||"function"==typeof BOOMR.getBeaconURL&&BOOMR.getBeaconURL()&&(0===(n=e.href.indexOf(BOOMR.getBeaconURL()))||5===n||6===n)))return!0;return BOOMR.xhr_excludes.hasOwnProperty(e.href)||BOOMR.xhr_excludes.hasOwnProperty(e.hostname)||BOOMR.xhr_excludes.hasOwnProperty(l(e))}function d(){this.watch=0,this.timer=null,this.timerEarlyBeacon=null,this.checkTimer=null,this.pending_events=[],this.lastSpaLocation=null}function p(e,n){var r,i;if(!n||!e)return!1;if("boolean"==typeof n)return!0===n;if("function"==typeof n)try{return!0===n(e)}catch(e){return!1}if(BOOMR.utils.isArray(n)){for(r=0;r<n.length;r++)if("string"==typeof(i=n[r])&&i===e||i instanceof RegExp&&i.test(e))return!0}return!1}function h(){if(o.monitorFetch&&"function"==typeof e.fetch&&"function"==typeof e.Request&&"function"==typeof e.Response&&"function"==typeof e.Promise&&"function"==typeof window.fetch&&!e.fetch.polyfill&&(!BOOMR.proxy_fetch||BOOMR.proxy_fetch!==e.fetch)){if(BOOMR.proxy_fetch&&BOOMR.orig_fetch&&BOOMR.orig_fetch===e.fetch){e.fetch=BOOMR.proxy_fetch;return}BOOMR.orig_fetch=e.orig_fetch||e.fetch,BOOMR.proxy_fetch=function(n,s){var a,c,l,u={timing:{},initiator:"xhr"};if("object"==typeof n&&n instanceof e.Request?(a=n.url,c=s&&s.method||n.method||"GET",o.captureXhrRequestResponse&&(l=s&&s.body||n.body||void 0)):(a=n,c=s&&s.method||"GET",o.captureXhrRequestResponse&&(l=s&&s.body||void 0)),i.href=a,o.xhrExcludeFilter(i))return BOOMR.orig_fetch.apply(e,arguments);BOOMR.fireEvent("xhr_init","fetch"),u.url=i.href,u.method=c,u.type="fetch",l&&(u.requestPayload=l),BOOMR.fireEvent("xhr_send",{resource:u}),r.addEvent(u);try{u.timing.requestStart||(u.timing.requestStart=BOOMR.now());var d=BOOMR.orig_fetch.apply(this,arguments);function p(n,r,i){function s(){var e;i.fetchResponse&&!i.fetchResponse.bodyUsed&&o.fetchBodyUsedWait?(e=BOOMR.now(),i.responseBodyNotUsed=!0,setTimeout(function(){o.loadFinished(i,e)},o.fetchBodyUsedWait)):o.loadFinished(i)}return function(){var o,a=n._bmrNextP;try{for(o=r.apply(this===window?e:this,arguments);a&&!a._bmrHasOnFulfilled;)a=a._bmrNextP;return a||(o instanceof e.Promise?o.then=h(o,o.then,i):s()),o}catch(e){for(;a&&!a._bmrHasOnRejected;)a=a._bmrNextP;throw a||s(),e}}}function h(e,n,r){return e._bmrNextP?n:function(){var i=Array.prototype.slice.call(arguments);i.length>0&&("function"==typeof i[0]&&(i[0]=p(e,i[0],r),e._bmrHasOnFulfilled=!0),i.length>1&&"function"==typeof i[1]&&(i[1]=p(e,i[1],r),e._bmrHasOnRejected=!0));var o=n.apply(e,i);return e._bmrNextP=o,o.then=h(o,o.then,r),o}}return d.then=h(d,d.then,u),d.then(function(n){var i,s,a=!1,c=!1;if(n.redirected&&(u.responseUrl=n.url),(n.status<200||n.status>=400)&&(u.status=n.status),u.fetchResponse=n,u.index>=0&&r.monitorMO(u.index),o.captureXhrRequestResponse&&"function"==typeof n.clone){(s=n.headers.get("content-type"))&&(a=-1!==s.indexOf("json"),c=-1!==s.indexOf("xml")),u.response={};try{n.clone().text().then(function(n){u.response.text=n,u.response.raw=n,c&&"function"==typeof e.DOMParser&&(u.response.xml=new e.DOMParser().parseFromString(n,"text/xml"))}).then(null,function(e){})}catch(e){}if(a)try{n.clone().json().then(function(e){u.response.json=e}).then(null,function(e){})}catch(e){}}return n},function(e){throw e&&("AbortError"===e.name||20===e.code)?u.status=-999:u.status=-998,e})}catch(e){throw u.status=-997,o.loadFinished(u),e}},BOOMR.utils.overwriteNative(e,"fetch",BOOMR.proxy_fetch)}}function f(){"function"==typeof e.fetch&&BOOMR.orig_fetch&&BOOMR.orig_fetch!==e.fetch&&(e.fetch=BOOMR.orig_fetch)}function m(){if(!BOOMR.proxy_XMLHttpRequest||BOOMR.proxy_XMLHttpRequest!==e.XMLHttpRequest){if(BOOMR.proxy_XMLHttpRequest&&BOOMR.orig_XMLHttpRequest&&BOOMR.orig_XMLHttpRequest===e.XMLHttpRequest){e.XMLHttpRequest=BOOMR.proxy_XMLHttpRequest,d.start();return}BOOMR.orig_XMLHttpRequest=e.orig_XMLHttpRequest||e.XMLHttpRequest,d.start(),BOOMR.subscribe("click",function(){if(!o.singlePageApp||o.spaStartFromClick){var n={timing:{},initiator:"click"};BOOMR.orig_XMLHttpRequest&&BOOMR.orig_XMLHttpRequest!==e.XMLHttpRequest&&(n.timing.requestStart=BOOMR.now(),r.addEvent(n))}}),BOOMR.proxy_XMLHttpRequest=function(){var n,a,c,l={timing:{},initiator:"xhr"},u=!1,d=!1;return a=(n=new BOOMR.orig_XMLHttpRequest).open,c=n.send,n.open=function(r,c,p){if(i.href=c,o.xhrExcludeFilter(i))return d=!0,a.apply(n,arguments);function h(r,i){n.addEventListener(r,function(){if("readystatechange"===r)if(l.timing[s[n.readyState]]=BOOMR.now(),4===n.readyState&&0!==n.status){if(n.responseURL!==l.url&&(l.responseUrl=n.responseURL),(n.status<200||n.status>=400)&&(l.status=n.status),o.captureXhrRequestResponse&&(l.response={text:""===n.responseType||"text"===n.responseType?n.responseText:null,xml:""===n.responseType||"document"===n.responseType?n.responseXML:null,raw:n.response,json:n.responseJSON},n.response&&n.response.constructor&&n.response.constructor===BOOMR.boomerang_frame.Object&&BOOMR.boomerang_frame.Object!==e.Object))try{n.response.constructor=e.Object}catch(e){}o.loadFinished(l)}else 0===n.readyState&&"number"==typeof l.timing.open&&(n.responseURL!==l.url&&(l.responseUrl=n.responseURL),l.status=-999,o.loadFinished(l));else n.responseURL!==l.url&&(l.responseUrl=n.responseURL),"load"===r?0!==n.status&&(n.status<200||n.status>=400)&&(l.status=n.status):l.status=void 0===i?n.status:i,o.loadFinished(l)},!1)}d=!1,void 0===p&&(p=!0),BOOMR.fireEvent("xhr_init","xhr"),u||(p&&h("readystatechange"),h("load"),h("timeout",-1001),h("error",-998),h("abort",-999)),l.url=i.href,l.method=r,l.type="xhr",delete l.status,p||(l.synchronous=!0),u=!0;try{return a.apply(n,arguments)}catch(e){throw l.status=-997,o.loadFinished(l),e}},n.send=function(e){return d||(o.captureXhrRequestResponse&&(n.resource.requestPayload=e),BOOMR.fireEvent("xhr_send",n),r.addEvent(l),l.timing.requestStart||(l.timing.requestStart=BOOMR.now()),void 0===l.status||-997!==l.status)?c.apply(n,arguments):void 0},n.resource=l,n},BOOMR.proxy_XMLHttpRequest.UNSENT=0,BOOMR.proxy_XMLHttpRequest.OPENED=1,BOOMR.proxy_XMLHttpRequest.HEADERS_RECEIVED=2,BOOMR.proxy_XMLHttpRequest.LOADING=3,BOOMR.proxy_XMLHttpRequest.DONE=4,BOOMR.proxy_XMLHttpRequest.prototype=BOOMR.orig_XMLHttpRequest.prototype,BOOMR.utils.overwriteNative(e,"XMLHttpRequest",BOOMR.proxy_XMLHttpRequest)}}function g(){BOOMR.orig_XMLHttpRequest&&BOOMR.orig_XMLHttpRequest!==e.XMLHttpRequest&&(e.XMLHttpRequest=BOOMR.orig_XMLHttpRequest)}function v(e){e.initiator="xhr",BOOMR.responseEnd(e)}!BOOMR.plugins.AutoXHR&&(e=BOOMR.window)&&e.XMLHttpRequest&&new e.XMLHttpRequest().addEventListener&&(d.stop=function(){d.pause(),d.observer=null},d.pause=function(){d.observer&&d.observer.observer&&!d.isPaused&&(d.isPaused=!0,d.observer.observer.disconnect())},d.resume=function(){d.observer&&d.observer.observer&&d.isPaused&&(d.isPaused=!1,d.observer.observer.observe(n,d.observer.config))},d.start=function(){if(!d.observer){var e={childList:!0,attributes:!0,subtree:!0,attributeFilter:["src","href"]};d.observer=BOOMR.utils.addObserver(n,e,null,r.mutation_cb,null,r),d.observer&&(d.observer.config=e,BOOMR.subscribe("page_unload",d.stop,null,d))}},d.prototype.addEvent=function(e){if(BOOMR.plugins.SPA&&BOOMR.plugins.SPA.get_ready()||BOOMR.utils.inArray(e.initiator,BOOMR.constants.BEACON_TYPE_SPAS)){var n,i,s,l={type:e.initiator,resource:e,nodes_to_wait:0,total_nodes:0,resources:[],xhr_resources:[],complete:!1,aborted:!1,firedEarlyBeacon:!1},u=this.pending_events.length,p=this;for(n=u-1;n>=0;n--)if(this.pending_events[n]&&!this.pending_events[n].complete){i=this.pending_events[n],s=n;break}if(i){if("click"===i.type&&o.singlePageApp&&o.spaStartFromClick&&"xhr"===l.type)l.resource.fromClick=!0,l.resource.timing.click=i.resource.timing.requestStart,l.resource.timing.requestStart=i.resource.timing.requestStart,l.interesting=i.interesting||0,l.total_nodes+=i.total_nodes,l.resources=i.resources.concat(l.resources),l.xhr_resources=i.xhr_resources.concat(l.xhr_resources),this.pending_events[s]=void 0,this.watch--;else if(("click"===i.type||i.resource.fromClick)&&o.singlePageApp&&o.spaStartFromClick&&"spa"===l.type)l.resource.timing=i.resource.timing,l.interesting=i.interesting||0,l.total_nodes+=i.total_nodes,l.resources=i.resources.concat(l.resources),i.resource.url&&l.xhr_resources.push(i.resource.url),l.xhr_resources=l.xhr_resources.concat(i.xhr_resources),this.pending_events[s]=void 0,this.watch--;else if("click"===i.type)(0===i.nodes_to_wait||!i.resource.url)&&(this.pending_events[s]=void 0,this.watch--);else if("xhr"===i.type){if("click"===l.type)return null;else if("xhr"===l.type)return r.add_event_resource(e),null}else if(BOOMR.utils.inArray(i.type,BOOMR.constants.BEACON_TYPE_SPAS)){if("xhr"===l.type)return r.add_event_resource(e),null;if("click"===l.type)return i.resource.lastClick=l.resource.timing.requestStart,null;if(BOOMR.utils.inArray(l.type,BOOMR.constants.BEACON_TYPE_SPAS)){var h=l.resource.timing.requestStart-i.resource.timing.requestStart;"spa_hard"!==i.type&&c(i.resource,l.resource)&&h<500?(this.pending_events[s]=void 0,this.watch--):(i.resource.timing.loadEventEnd=BOOMR.now(),i.aborted=!0,this.sendEvent(s))}}}if("click"===l.type){if(!d.observer)return null;this.setTimeout(o.xhrIdleTimeout,u)}else if("xhr"===l.type){if(a(o.ignoreXhrs,e.url))return null;l.nodes_to_wait++,l.total_nodes++,l.ignoreMO=!0}else BOOMR.utils.inArray(l.type,BOOMR.constants.BEACON_TYPE_SPAS)&&(d.start(),e.wait?(l.nodes_to_wait++,l.total_nodes++,e.waitComplete=function(){p.load_finished(u),e.waitComplete=void 0}):this.setTimeout(o.spaIdleTimeout,u));return this.watch++,this.pending_events.push(l),e.index=u,u}},d.prototype.sendEvent=function(e){var r=this.pending_events[e],i=this;if(BOOMR.now(),r&&!r.complete)if(this.clearTimeout(e),BOOMR.readyToSend()){if(r.complete=!0,r.resource.complete=!0,this.watch--,BOOMR.utils.inArray(r.type,BOOMR.constants.BEACON_TYPE_SPAS)&&(r.resource.url=n.URL),"spa"===r.type&&0===r.total_nodes&&r.resource.url===i.lastSpaLocation){BOOMR.fireEvent("spa_cancel"),this.pending_events[e]=void 0;return}if("click"===r.type&&(0===r.total_nodes||!r.resource.url)||("click"===r.type&&o.singlePageApp&&o.spaStartFromClick&&(r.type=r.resource.initiator="xhr"),o.xhrRequireChanges&&"xhr"===r.type&&1===r.total_nodes&&(void 0===r.interesting||0===r.interesting)&&!p(r.resource.url,o.alwaysSendXhr))){this.pending_events[e]=void 0;return}if(BOOMR.utils.inArray(r.type,BOOMR.constants.BEACON_TYPE_SPAS)&&(i.lastSpaLocation=r.resource.url,!r.forced)&&("spa"===r.type&&0===r.total_nodes&&(r.resource.timing.loadEventEnd=r.resource.timing.requestStart+1),"spa_hard"===r.type)){var s=BOOMR.getPerformance();s&&s.timing&&s.timing.loadEventEnd&&r.resource.timing.loadEventEnd&&r.resource.timing.loadEventEnd<s.timing.loadEventEnd&&(r.resource.timing.loadEventEnd=s.timing.loadEventEnd)}this.sendResource(r.resource,e)}else setTimeout(function(){i.sendEvent(e)},500)},d.prototype.sendResource=function(r,i){var o=this,s=o.pending_events[i],a=r.timing?r.timing.requestStart:void 0,c=function(e,s){e&&(r.timing.loadEventEnd=s||BOOMR.now()),BOOMR.real_sendBeacon(),r.onComplete&&r.onComplete(r),BOOMR.plugins.ResourceTiming&&BOOMR.plugins.ResourceTiming.is_enabled()&&r.timing&&r.timing.requestStart&&(r.restiming=BOOMR.plugins.ResourceTiming.getCompressedResourceTiming(r.timing.requestStart,r.timing.loadEventEnd)),BOOMR.utils.inArray(r.initiator,BOOMR.constants.BEACON_TYPE_SPAS)&&(o.calculateSpaTimings(r),"number"==typeof i&&o.pending_events[i].aborted&&(BOOMR.addVar("pgu",n.URL,!0),BOOMR.addVar("rt.quit","",!0),BOOMR.addVar("rt.abld","",!0))),BOOMR.responseEnd(r,a,r),"number"==typeof i&&(o.pending_events[i]=void 0)};if("spa_hard"===r.initiator&&(!s||!s.aborted)&&!BOOMR.hasBrowserOnloadFired())return void BOOMR.utils.addListener(e,"load",function(){var e=BOOMR.now();BOOMR.setImmediate(function(){c(!0,e)})});c(!1)},d.prototype.calculateSpaTimings=function(e){var n=BOOMR.getPerformance();if(n&&n.timing){if("spa_hard"===e.initiator)e.timing.responseEnd=n.timing.responseStart,e.timing.fetchStart=n.timing.navigationStart;else{if(!BOOMR.plugins.ResourceTiming||!BOOMR.plugins.ResourceTiming.is_supported())return;var r=BOOMR.plugins.ResourceTiming.getFilteredResourceTiming(e.timing.requestStart,e.timing.loadEventEnd,o.spaBackEndResources).entries,i=Math.round(e.timing.loadEventEnd-e.timing.requestStart);if(!r||!r.length){BOOMR.addVar("noresources",1,!0),e.timers={t_resp:0,t_page:i,t_done:i};return}for(var s=e.timing.loadEventEnd-n.timing.navigationStart,c=0;c<r.length;c++)r[c].responseStart>s?(r[c].responseStart=s,r[c].responseEnd=s):r[c].responseEnd>s&&(r[c].responseEnd=s);var l=Math.round(BOOMR.plugins.ResourceTiming.calculateResourceTimingUnion(r)),u=i-l;if(l<0||i<0||u<0)return void BOOMR.addError("Incorrect SPA time calculation");BOOMR.addVar("t_resp_calc",l,!0),BOOMR.addVar("resourceLength",r.length,!0),e.timers={t_resp:l,t_page:u,t_done:i}}var d=BOOMR.plugins.ResourceTiming.getFilteredResourceTiming(e.timing.requestStart,e.timing.loadEventEnd,["xmlhttprequest","fetch"]).entries,p=BOOMR.plugins.Continuity.getTTIWaitForXHRIngore();d=d.filter(function(e){return!a(p,e.name)});var h=e.timing.requestStart-n.timing.navigationStart,s=d.reduce(function(e,n){return n.responseEnd>e?n.responseEnd:e},h);"spa"===e.initiator&&(BOOMR.addVar("c.tti.xd.increasing",s),s-=h,BOOMR.addVar("spa.calcttixd",1,!0)),BOOMR.addVar("c.tti.xd",s)}},d.prototype.setTimeout=function(e,n){var r=this;e&&(this.clearTimeout(n),this.timer=setTimeout(function(){r.timedout(n)},e))},d.prototype.timedout=function(e){var n;if(this.clearTimeout(e),n=this.pending_events[e]){if(BOOMR.utils.inArray(n.type,BOOMR.constants.BEACON_TYPE_SPAS)&&!BOOMR.hasBrowserOnloadFired())return void this.setTimeout(o.spaIdleTimeout,e);0===n.nodes_to_wait&&this.sendEvent(e)}},d.prototype.clearTimeout=function(e){this.timer&&e===this.pending_events.length-1&&(clearTimeout(this.timer),this.timer=null)},d.prototype.load_cb=function(e,n){var r,i,o=BOOMR.now();(r=e.target||e.srcElement)&&r._bmr&&(i=r._bmr.idx,n=void 0!==n?n:r._bmr.res||0,r._bmr.end[n]||(r._bmr.end[n]=o,this.load_finished(i,o)))},d.prototype.monitorMO=function(e){var n=this.pending_events[e];n&&delete n.ignoreMO},d.prototype.load_finished=function(e,n){var i=this.pending_events[e];if(i){if(i.nodes_to_wait--,0===i.nodes_to_wait)this.checkTimer&&clearTimeout(this.checkTimer),this.checkTimer=null,i.resource.timing.loadEventEnd=n||BOOMR.now(),e===this.pending_events.length-1?BOOMR.utils.inArray(i.type,BOOMR.constants.BEACON_TYPE_SPAS)?(!i.firedEarlyBeacon&&BOOMR.plugins.Early&&BOOMR.plugins.Early.is_supported()&&(this.timerEarlyBeacon&&(clearTimeout(this.timerEarlyBeacon),this.timerEarlyBeacon=null),this.timerEarlyBeacon=setTimeout(function(){r.timerEarlyBeacon=null,i.firedEarlyBeacon||0!==i.nodes_to_wait||(i.firedEarlyBeacon=!0,BOOMR.plugins.Early.sendEarlyBeacon(i.resource,i.type))},100)),this.setTimeout(o.spaIdleTimeout,e)):this.setTimeout(o.xhrIdleTimeout,e):this.sendEvent(e);else if(!this.checkTimer&&BOOMR.utils.inArray(i.type,BOOMR.constants.BEACON_TYPE_SPAS)){var s=this;this.checkTimer=setTimeout(function(){0!==i.nodes_to_wait&&i.resources.forEach(function(r){var i=r._bmr,o=i.res||0;try{!i.end[o]&&("LINK"===i.type&&r.sheet||("IMG"===i.type||"IMAGE"===i.type)&&r.complete)&&(i.end[o]=n,s.load_finished(e,n))}catch(e){}}),s.checkTimer=null},500)}}},d.prototype.wait_for_node=function(e,n){var r,s,a,c,l,u,d,p,h,f=this,m=!1,g=!1;if(e&&e.nodeName&&(!o.ignoreImage&&e.nodeName.toUpperCase().match(/^(IMG|IMAGE)$/)||e.nodeName.toUpperCase().match(/^IFRAME$/)||"LINK"===e.nodeName.toUpperCase()&&e.rel&&e.rel.match(/\bstylesheet\b/i))){if(e._bmr&&"number"==typeof e._bmr.res&&e._bmr.end[e._bmr.res]&&(g=!0),l=e.src||"function"==typeof e.getAttribute&&(e.getAttribute("xlink:href")||e.getAttribute("href"))||e.href,e._bmr&&e._bmr.url!==l&&(g=!0),g&&"function"==typeof e._bmr.listener&&(f.load_cb({target:e,type:"changed"}),e.removeEventListener("load",e._bmr.listener),e.removeEventListener("error",e._bmr.listener),delete e._bmr.listener),!l||l.match(/^(about:|javascript:|data:)/i))return!1;if("IMG"===e.nodeName){if(e.naturalWidth&&!g)return!1;else if("function"==typeof e.getAttribute&&""===e.getAttribute("src"))return!1;else if("lazy"===e.loading)return!1}if("IFRAME"===e.nodeName&&g||("function"==typeof e.getAttribute&&(d=parseInt(e.getAttribute("height"),10),p=parseInt(e.getAttribute("width"),10)),isNaN(d)&&(d=e.style&&("0"===e.style.height||"0px"===e.style.height||"1px"===e.style.height)?0:void 0),isNaN(p)&&(p=e.style&&("0"===e.style.width||"0px"===e.style.width||"1px"===e.style.width)?0:void 0),!isNaN(d)&&d<=1&&!isNaN(p)&&p<=1||0===d||0===p||e.style&&("none"===e.style.display||"hidden"===e.style.visibility||"0"===e.style.opacity)||o.domExcludeFilter(e)||!(r=this.pending_events[n]))||(u=r.resources.length,r.urls||(r.urls={}),r.urls[l]))return!1;if(!r.resource.url){if(i.href=l,o.xhrExcludeFilter(i))return!1;r.resource.url=i.href}e._bmr||(e._bmr={end:{},type:e.nodeName.toUpperCase()}),e._bmr.res=u,e._bmr.idx=n,delete e._bmr.end[u],e._bmr.url=l,h=function(n){f.load_cb(n,u),e.removeEventListener("load",h),e.removeEventListener("error",h),delete e._bmr.listener},e._bmr.listener=h,e.addEventListener("load",h),e.addEventListener("error",h),r.nodes_to_wait++,this.clearTimeout(n),r.total_nodes++,r.resources.push(e),r.urls[l]=1,m=!0}else e.nodeType===Node.ELEMENT_NODE&&["IMAGE","IMG"].forEach(function(r){if((s=e.getElementsByTagName(r))&&s.length)for(a=0,c=s.length;a<c;a++)m|=this.wait_for_node(s[a],n)},this);return m},d.prototype.add_event_resource=function(e){var n,r=this.pending_events.length-1;return!(r<0)&&(n=this.pending_events[r])&&e?(n.xhr_resources.push(e.url),n.nodes_to_wait++,n.total_nodes++,e.index=r,e.node=!0,r):-1},d.prototype.mutation_cb=function(e){var n,r,i;return!this.watch||(n=this,(r=this.pending_events.length-1)<0||!this.pending_events[r]||!!(i=this.pending_events[r]).ignoreMO||(void 0===i.interesting&&(i.interesting=!1),e&&e.length&&(i.resource.timing.domComplete=BOOMR.now(),e.forEach(function(e){var o,s,a;if("attributes"===e.type)i.interesting|=n.wait_for_node(e.target,r);else if("childList"===e.type){for(o=0,s=e.addedNodes.length;o<s;o++)i.interesting|=n.wait_for_node(e.addedNodes[o],r);for(o=0,s=e.removedNodes.length;o<s;o++)"IFRAME"===(a=e.removedNodes[o]).nodeName&&a._bmr&&n.load_cb({target:a,type:"removed"})}})),i.interesting||i.timeoutExtended||(this.setTimeout(1e3,r),i.timeoutExtended=!0),!0))},d.prototype.queue_is_empty=function(){return 0===this.nodesWaitingFor()},d.prototype.nodesWaitingFor=function(e){var n;return 0===this.pending_events.length?0:(void 0===e&&(e=this.pending_events.length-1),n=this.pending_events[e])?n.nodes_to_wait:0},d.prototype.completeEvent=function(e){var n,r=BOOMR.now();0!==this.pending_events.length&&(void 0===e&&(e=this.pending_events.length-1),(n=this.pending_events[e])&&(n.resource.timing.loadEventEnd=r,n.forced=!0,this.sendEvent(e)))},r=new d,o={spaBackEndResources:["xmlhttprequest","script","fetch"],alwaysSendXhr:!1,xhrExcludeFilters:[],domExcludeFilters:[],initialized:!1,captureXhrRequestResponse:!1,singlePageApp:!1,spaStartFromClick:!1,autoXhrEnabled:!1,monitorFetch:!1,fetchBodyUsedWait:200,spaIdleTimeout:1e3,xhrIdleTimeout:50,xhrRequireChanges:!1,ignoreImage:!1,xhrExcludeFilter:function(e){var n,r;if(!e||!e.href)return!1;for(n=0;n<o.xhrExcludeFilters.length;n++)if("function"==typeof o.xhrExcludeFilters[n].cb){r=o.xhrExcludeFilters[n].ctx;try{if(o.xhrExcludeFilters[n].cb.call(r,e))return!0}catch(e){BOOMR.addError(e,"BOOMR.plugins.AutoXHR.impl.xhrExcludeFilter()")}}return!1},domExcludeFilter:function(e){var n,r;for(n=0;n<o.domExcludeFilters.length;n++)if("function"==typeof o.domExcludeFilters[n].cb){r=o.domExcludeFilters[n].ctx,o.domExcludeFilters[n].name;try{if(o.domExcludeFilters[n].cb.call(r,e))return!0}catch(e){BOOMR.addError(e,"BOOMR.plugins.AutoXHR.impl.domExcludeFilter()")}}return!1},loadFinished:function(e,n){var i,s,a,c,l;n=n||BOOMR.now(),!e.timing.loadEventEnd&&(e.status&&BOOMR.fireEvent("xhr_error",e),e.timing.loadEventEnd=n,(l=BOOMR.getPerformance())&&l.timing&&(s=l.timing.navigationStart,(i=BOOMR.getResourceTiming(e.url,function(e,n){return e.responseEnd-n.responseEnd},function(n){return Math.ceil(s+n.startTime+2)>=e.timing.requestStart&&0!==n.responseEnd}))&&(a=Math.floor(s+i.startTime),(c=Math.floor(s+i.responseEnd))<=BOOMR.now()&&(e.timing.responseEnd=c,e.timing.loadEventEnd<c&&(e.timing.loadEventEnd=c),e.fromClick&&e.timing.requestStart||(e.timing.requestStart=a),e.timing.fetchStart=a,0!==i.responseStart&&(e.timing.responseStart=Math.floor(s+i.responseStart)),e.restiming=i))),e.node&&p(e.url,o.alwaysSendXhr)&&r.sendResource(e),e.index>=0&&(r.monitorMO(e.index),r.load_finished(e.index,e.timing.responseEnd)))}},BOOMR.plugins.AutoXHR={is_complete:function(){return!0},init:function(r){var s,a;if(n=e.document,e&&n){if(i=n.createElement("A"),BOOMR.utils.pluginConfig(o,r,"AutoXHR",["spaBackEndResources","alwaysSendXhr","monitorFetch","fetchBodyUsedWait","spaIdleTimeout","xhrIdleTimeout","xhrRequireChanges","spaStartFromClick"]),BOOMR.instrumentXHR=m,BOOMR.uninstrumentXHR=g,BOOMR.instrumentFetch=h,BOOMR.uninstrumentFetch=f,o.initialized||(this.addExcludeFilter(u,null,"shouldExcludeXhr"),o.initialized=!0),r&&r.AutoXHR&&r.AutoXHR.excludeFilters&&r.AutoXHR.excludeFilters.length>0)for(a=0;a<r.AutoXHR.excludeFilters.length;a++)"function"==typeof r.AutoXHR.excludeFilters[a]?o.xhrExcludeFilters.push({cb:r.AutoXHR.excludeFilters[a],ctx:this,name:"unknown XHR filter"}):o.xhrExcludeFilters.push(r.AutoXHR.excludeFilters[a]);if(r&&r.AutoXHR&&r.AutoXHR.domExcludeFilters&&r.AutoXHR.domExcludeFilters.length>0)for(a=0;a<r.AutoXHR.domExcludeFilters.length;a++)"function"==typeof r.AutoXHR.domExcludeFilters[a]?o.domExcludeFilters.push({cb:r.AutoXHR.domExcludeFilters[a],ctx:this,name:"unknown DOM filter"}):o.domExcludeFilters.push(r.AutoXHR.domExcludeFilters[a]);if(o.ignoreXhrs=r.ignoreXhrs,o.ignoreImage=r.ignoreImage,o.autoXhrEnabled=r.instrument_xhr,o.monitorFetch=r.monitor_fetch,o.singlePageApp=BOOMR.plugins.SPA&&BOOMR.plugins.SPA.isSinglePageApp(r),o.alwaysSendXhr&&o.autoXhrEnabled&&BOOMR.xhr&&"function"==typeof BOOMR.xhr.stop){function c(e){if(e.length)for(s=0;s<e.length;s++)v(e[s]);else v(e)}var l=BOOMR.xhr.stop(c);l&&l.length&&BOOMR.setImmediate(c,l)}o.singlePageApp?(o.alwaysSendXhr||(o.autoXhrEnabled=!1),o.autoXhrEnabled&&(BOOMR.instrumentXHR(),BOOMR.instrumentFetch())):o.autoXhrEnabled?(BOOMR.instrumentXHR(),BOOMR.instrumentFetch()):!1===o.autoXhrEnabled&&(BOOMR.uninstrumentXHR(),BOOMR.uninstrumentFetch()),BOOMR.registerEvent("xhr_error")}},getMutationHandler:function(){return r},getPathname:l,enableAutoXhr:function(){o.autoXhrEnabled||(BOOMR.instrumentXHR(),BOOMR.instrumentFetch()),o.autoXhrEnabled=!0},addExcludeFilter:function(e,n,r){o.xhrExcludeFilters.push({cb:e,ctx:n,name:r})},addDomExcludeFilter:function(e,n,r){o.domExcludeFilters.push({cb:e,ctx:n,name:r})},setXhrRequestResponseCapturing:function(e){o.captureXhrRequestResponse=e},matchesAlwaysSendXhr:p})}(),!function(){var e,n=!1,r=!1,i=!1,o=!1,s=!1,a=!0,l=!1,u=!1,d=[],p=!1;if(!BOOMR.plugins.SPA&&BOOMR.plugins.AutoXHR){var h={spaHardMissedOnComplete:function(e){var n,r,i=BOOMR.plugins.RT&&BOOMR.plugins.RT.navigationStart(),o=BOOMR.plugins.AutoXHR.getMutationHandler();p=!1,BOOMR.addVar("spa.missed","1",!0),BOOMR.plugins.RT&&BOOMR.plugins.RT.clearTimer("t_done"),e.timing.requestStart=i,(!(n=o.pending_events[e.index])||0===n.total_nodes)&&(r=BOOMR.getPerformance())&&r.timing&&r.timing.navigationStart&&r.timing.loadEventEnd&&void 0===e.timing.loadEventEnd&&(e.timing.loadEventEnd=r.timing.loadEventEnd)},pageReady:function(){o=!0}};BOOMR.plugins.SPA={is_complete:function(e){return!p||e&&("error"===e["http.initiator"]||void 0!==e.early)},get_ready:function(){return i},init:function(e){e&&e.instrument_xhr&&(s=e.instrument_xhr,i&&s&&BOOMR.plugins.AutoXHR.enableAutoXhr()),r||(r=!0,BOOMR.subscribe("page_ready",h.pageReady,null,h))},register:function(e){d.push(e)},supported_frameworks:function(){return d},onLoadSpaHardMissed:function(){i||(o=!0,s&&BOOMR.plugins.AutoXHR.enableAutoXhr(),p=!0,u?p=!1:BOOMR.plugins.SPA.route_change(h.spaHardMissedOnComplete))},hook:function(e,r){return"function"==typeof(r=r||{}).routeFilter&&(l=r.routeFilter),"function"==typeof r.routeChangeWaitFilter&&r.routeChangeWaitFilter,"boolean"==typeof r.routeChangeWaitFilterHardNavs&&r.routeChangeWaitFilterHardNavs,r.disableHardNav&&(u=r.disableHardNav),n||(e&&BOOMR.attach_page_ready(this.onLoadSpaHardMissed),n=!0),this},route_change:function(n,r){BOOMR.fireEvent("route_change");var d=!1,p=a&&!u?"spa_hard":"spa",h=BOOMR.plugins.RT&&BOOMR.plugins.RT.navigationStart(),f=o?BOOMR.now():h,m=BOOMR.window.document.URL,g={timing:{requestStart:f},initiator:p,url:m};if("spa"===p&&e&&!e.complete)try{if(!c(e,g))return}catch(e){BOOMR.addError(e,"SPA.route_change.routeChangeWaitFilter")}if("spa"===p&&l)try{if(!l.apply(null,r))return}catch(e){BOOMR.addError(e,"SPA.route_change.routeFilter")}i=!0,BOOMR.fireEvent("spa_init",[BOOMR.plugins.SPA.current_spa_nav(),m]),a=!1,o&&"function"!=typeof n||(o=!0,g.onComplete=function(e){d||(d=!0,BOOMR.fireEvent("spa_navigation")),"function"==typeof n&&n(e)}),e=g,g.index=BOOMR.plugins.AutoXHR.getMutationHandler().addEvent(g),s&&BOOMR.plugins.AutoXHR.enableAutoXhr()},last_location:function(e){lastLocationChange=e},current_spa_nav:function(){return o?"spa":"spa_hard"},wait_complete:function(){e&&(e.wait=!1,e.waitComplete&&e.waitComplete(),e=null)},markNavigationComplete:function(){var n,r,i=BOOMR.plugins.AutoXHR.getMutationHandler();if(e&&e.wait&&BOOMR.plugins.SPA.wait_complete(),i&&i.pending_events.length>0){for(n=i.pending_events.length-1;n>=0;n--)if((r=i.pending_events[n])&&BOOMR.utils.inArray(r.type,BOOMR.constants.BEACON_TYPE_SPAS)){if(r.complete)break;i.nodesWaitingFor(n),BOOMR.addVar("spa.forced","1",!0),BOOMR.addVar("spa.waiting",i.nodesWaitingFor(),!0),i.completeEvent(n);return}}},isSpaNavInProgress:function(){var e,n,r=BOOMR.plugins.AutoXHR.getMutationHandler();if(r&&r.pending_events.length>0){for(e=r.pending_events.length-1;e>=0;e--)if((n=r.pending_events[e])&&BOOMR.utils.inArray(n.type,BOOMR.constants.BEACON_TYPE_SPAS))return!n.complete}return!1},isSinglePageApp:function(e){for(var n=!1,r=this.supported_frameworks(),i=0;i<r.length;i++){var o=r[i];if(e[o]&&e[o].enabled){n=!0;break}}return n}},BOOMR.plugins.SPA.waitComplete=BOOMR.plugins.SPA.wait_complete}}(),e={auto:!1,enabled:!0,hooked:!1,routeHooked:!1,hadMissedRouteChange:!1,routeChangeInProgress:!1,disableHardNav:!1,routeFilter:void 0,routeChangeWaitFilter:void 0,monitorReplaceState:!0,a:void 0,originHistoryPushState:null,originHistoryReplaceState:null,originHistoryGo:null,originHistoryBack:null,originHistoryForward:null,resetRouteChangeInProgress:function(){e.routeChangeInProgress&&clearTimeout(e.routeChangeInProgress),e.routeChangeInProgress=!1},setRouteChangeInProgress:function(){e.routeChangeInProgress&&clearTimeout(e.routeChangeInProgress),e.routeChangeInProgress=setTimeout(e.resetRouteChangeInProgress,50)},spaInit:function(e,n){n?BOOMR.fireEvent("spa_init",[BOOMR.plugins.SPA.current_spa_nav(),n]):e?BOOMR.fireEvent("spa_init",[BOOMR.plugins.SPA.current_spa_nav(),e]):BOOMR.fireEvent("spa_init",[BOOMR.plugins.SPA.current_spa_nav(),BOOMR.window.document.URL])},routeChange:function(n,r){e.enabled?(!e.disableHardNav||BOOMR.onloadFired())&&(e.routeChangeInProgress||(e.spaInit(n,r),BOOMR.plugins.SPA.route_change())):(e.hadMissedRouteChange=!0,e.resetRouteChangeInProgress())}},!BOOMR.plugins.History&&void 0!==BOOMR.plugins.SPA&&void 0!==BOOMR.plugins.AutoXHR&&BOOMR.window&&BOOMR.window.history&&(BOOMR.plugins.SPA.register("History"),e.a=BOOMR.window.document.createElement("A"),BOOMR.plugins.History={is_complete:function(){return!0},hook:function(n,r,i){return(i=i||{}).disableHardNav=e.disableHardNav,e.hooked||(e.routeFilter&&(i.routeFilter=e.routeFilter),e.routeChangeWaitFilter&&(i.routeChangeWaitFilter=e.routeChangeWaitFilter),function(){var n,r,i,o,s,a=BOOMR.window.history;function c(){BOOMR.window.addEventListener("popstate",function(n){e.routeChange()})}return"function"==typeof a.pushState&&(e.originHistoryPushState=a.pushState,n=a.pushState,a.pushState=function(r,i,o){return e.routeChange(i,o),n.apply(this,arguments)}),e.monitorReplaceState&&"function"==typeof a.replaceState&&(e.originHistoryReplaceState=a.pushState,r=a.replaceState,a.replaceState=function(n,i,o){if("undefined"!=typeof BOOMR){var s=BOOMR.window.document.URL,a=s;return arguments.length>=3&&null!=o&&(e.a.href=o,a=e.a.href),BOOMR.plugins.SPA.isSpaNavInProgress()&&a===s||e.routeChange(i,o),r.apply(this,arguments)}}),"function"==typeof a.go&&(e.originHistoryGo=a.go,i=a.go,a.go=function(n){return e.routeChange(),i.apply(this,arguments)}),"function"==typeof a.back&&(e.originHistoryBack=a.back,o=a.back,a.back=function(){return e.routeChange(),o.apply(this,arguments)}),"function"==typeof a.forward&&(e.originHistoryForward=a.forward,s=a.forward,a.forward=function(){return e.routeChange(),s.apply(this,arguments)}),BOOMR.window.addEventListener("hashchange",function(n){var r=(n||{}).newURL;e.routeChange(null,r)}),BOOMR.hasBrowserOnloadFired()?c():BOOMR.window.addEventListener("load",function(){setTimeout(c,0)}),BOOMR.subscribe("beacon",e.resetRouteChangeInProgress),BOOMR.subscribe("spa_cancel",e.resetRouteChangeInProgress),BOOMR.subscribe("spa_init",e.setRouteChangeInProgress),!0}()&&(BOOMR.plugins.SPA.hook(r,i),e.hooked=!0)),this},init:function(n){return BOOMR.utils.pluginConfig(e,n,"History",["auto","enabled","disableHardNav","routeFilter","routeChangeWaitFilter","monitorReplaceState"]),e.auto&&e.enabled&&this.hook(void 0,!0,{}),this},disable:function(){return history.pushState=e.originHistoryPushState,history.replaceState=e.originHistoryReplaceState,history.go=e.originHistoryGo,history.back=e.originHistoryBack,history.forward=e.originHistoryForward,e.enabled=!1,this},enable:function(){return e.enabled=!0,e.hooked&&e.hadMissedRouteChange&&(e.hadMissedRouteChange=!1,BOOMR.plugins.SPA.route_change(),e.setRouteChangeInProgress()),this}}),n=window,BOOMR.plugins.RT||(i={onloadfired:!1,unloadfired:!1,visiblefired:!1,initialized:!1,complete:!1,autorun:!0,timers:{},cookie:"RT",cookie_exp:604800,session_exp:1800,strict_referrer:!0,navigationType:0,navigationStart:void 0,responseStart:void 0,loadTime:0,oboError:0,t_start:void 0,cached_t_start:void 0,cached_xhr_start:void 0,t_fb_approx:void 0,r:void 0,beacon_url:void 0,next_beacon_url:void 0,basic_timers:{t_done:1,t_resp:1,t_page:1},crossdomain_sending:!1,navigationStartSource:"",updateCookie:function(e,n){var r,o,s,a;if(!this.cookie)return!1;for(a in s=BOOMR.utils.getSubCookies(BOOMR.utils.getCookie(this.cookie))||{})s.hasOwnProperty(a)&&!isNaN(parseInt(a,10))&&delete s[a];if("object"==typeof e)for(a in e)e.hasOwnProperty(a)&&(void 0===e[a]?s.hasOwnProperty(a)&&delete s[a]:s[a]=e[a]);return(s.z=1,s.dm=BOOMR.session.domain,s.si=BOOMR.session.ID,s.ss=BOOMR.session.start.toString(36),s.sl=BOOMR.session.length.toString(36),1800!==i.session_exp&&(s.se=i.session_exp.toString(36)),BOOMR.session.rate_limited&&(s.rl=1),s.tt=this.loadTime.toString(36),this.oboError>0?s.obo=this.oboError.toString(36):delete s.obo,o=BOOMR.now(),n&&(s[n]=(o-BOOMR.session.start).toString(36),i.lastActionTime=o),this.beacon_url&&(s.bcn=this.beacon_url),BOOMR.utils.setCookie(this.cookie,s,this.cookie_exp))?((r=BOOMR.now())-o>50&&(BOOMR.utils.removeCookie(this.cookie),BOOMR.error("took more than 50ms to set cookie... aborting: "+o+" -> "+r,"rt")),!0):(BOOMR.error("cannot set start cookie","rt"),!1)},refreshSession:function(e){e||(e=BOOMR.plugins.RT.getCookie()),e&&(e.ss?BOOMR.session.start=e.ss:BOOMR.session.start=BOOMR.plugins.RT.navigationStart()||BOOMR.t_lstart||BOOMR.t_start,e.si&&e.si.match(/-/)&&(BOOMR.session.ID=e.si),e.sl&&(BOOMR.session.length=e.sl),e.tt&&(this.loadTime=e.tt),e.obo&&(this.oboError=e.obo),e.dm&&!BOOMR.session.domain&&(BOOMR.session.domain=e.dm),e.se&&(i.session_exp=e.se),e.bcn&&(this.beacon_url=e.bcn),e.rl&&"1"===e.rl&&(BOOMR.session.rate_limited=!0))},maybeResetSession:function(e,n){var r=0;BOOMR.session.start&&BOOMR.session.length&&(r=(BOOMR.now()-BOOMR.session.start)/BOOMR.session.length);var o=1e3*i.session_exp;(!BOOMR.session.start||n&&BOOMR.session.start>n||e-(i.lastActionTime||BOOMR.t_start)>o||r>o)&&(BOOMR.session.start=n||BOOMR.plugins.RT.navigationStart()||BOOMR.t_lstart||BOOMR.t_start,BOOMR.session.length=0,BOOMR.session.rate_limited=!1,i.loadTime=0,i.oboError=0,i.beacon_url=i.next_beacon_url,i.lastActionTime=e,i.updateCookie({rl:void 0,sl:BOOMR.session.length,ss:BOOMR.session.start,tt:i.loadTime,obo:void 0,bcn:i.beacon_url}))},initFromCookie:function(){var e,n,i;i=BOOMR.plugins.RT.getCookie(),this.cookie||(BOOMR.session.enabled=!1),i&&(i.s=Math.max(+i.ld||0,Math.max(+i.ul||0,+i.cl||0)),i.s&&(i.r||i.nu)&&(this.r=i.r,e=BOOMR.utils.hashString(r.URL),n=BOOMR.utils.hashString(r&&r.referrer||""),i.cl,i.nu,!this.strict_referrer||i.cl&&i.nu&&i.nu===e&&i.s<+i.cl+15||i.s===+i.ul&&this.r===n?(this.t_start=i.s,+i.hd>i.s&&(this.t_fb_approx=i.hd)):this.t_start=this.t_fb_approx=void 0),i.s&&(this.lastActionTime=i.s),this.refreshSession(i),this.updateCookie({s:void 0,ul:void 0,cl:void 0,hd:void 0,ld:void 0,rl:void 0,r:void 0,nu:void 0,sh:void 0}),this.maybeResetSession(BOOMR.now()))},incrementSessionDetails:function(){BOOMR.session.length++,!i.timers.t_done||isNaN(i.timers.t_done.delta)?i.oboError++:i.loadTime+=i.timers.t_done.delta},getBoomerangTimings:function(){var e,n,r,i,o;function s(e,n){var r=Math.round(e||0),i=Math.round(n||0);return(r=0===r?0:r-i)||""}BOOMR.t_start&&(BOOMR.plugins.RT.startTimer("boomerang",BOOMR.t_start),BOOMR.plugins.RT.endTimer("boomerang",BOOMR.t_end),BOOMR.plugins.RT.endTimer("boomr_fb",BOOMR.t_start),BOOMR.t_lstart&&(BOOMR.plugins.RT.endTimer("boomr_ld",BOOMR.t_lstart),BOOMR.plugins.RT.setTimer("boomr_lat",BOOMR.t_start-BOOMR.t_lstart)));try{if(window&&"performance"in window&&window.performance&&"function"==typeof window.performance.getEntriesByName){for(r in n={"rt.bmr":BOOMR.url},BOOMR.config_url&&(n["rt.cnf"]=BOOMR.config_url),n)if(n.hasOwnProperty(r)&&n[r]){if(!(e=window.performance.getEntriesByName(n[r]))||0===e.length||!e[0])continue;e=e[0],o=[i=s(e.startTime,0),s(e.responseEnd,i),s(e.responseStart,i),s(e.requestStart,i),s(e.connectEnd,i),s(e.secureConnectionStart,i),s(e.connectStart,i),s(e.domainLookupEnd,i),s(e.domainLookupStart,i),s(e.redirectEnd,i),s(e.redirectStart,i)].join(",").replace(/,+$/,""),BOOMR.addVar(r,o,!0)}}}catch(e){e&&e.name&&e.name.hasOwnProperty("length")&&-1===e.name.indexOf("NS_ERROR_FAILURE")&&BOOMR.addError(e,"rt.getBoomerangTimings")}},checkPreRender:function(){return"prerender"===BOOMR.visibilityState()&&(BOOMR.plugins.RT.startTimer("t_load",this.navigationStart),BOOMR.plugins.RT.endTimer("t_load"),BOOMR.plugins.RT.startTimer("t_prerender",this.navigationStart),BOOMR.plugins.RT.startTimer("t_postrender"),!0)},initFromNavTiming:function(){var e,r;!this.navigationStart&&((r=BOOMR.getPerformance())&&r.navigation&&(this.navigationType=r.navigation.type),r&&r.timing?(e=r.timing,this.navigationStartSource="navigation"):n.chrome&&n.chrome.csi&&n.chrome.csi().startE?(e={navigationStart:n.chrome.csi().startE},this.navigationStartSource="csi"):n.gtbExternal&&n.gtbExternal.startE()&&(e={navigationStart:n.gtbExternal.startE()},this.navigationStartSource="gtb"),e&&(this.navigationStart=e.navigationStart||e.fetchStart||void 0,this.fetchStart=e.fetchStart||void 0,this.responseStart=e.responseStart||void 0,navigator.userAgent.match(/Firefox\/[78]\./)&&(this.navigationStart=e.unloadEventStart||e.fetchStart||void 0)))},validateLoadTimestamp:function(e,n,r){var i;return n&&n.timing&&n.timing.loadEventEnd?n.timing.loadEventEnd:"xhr"!==r||n&&BOOMR.utils.inArray(n.initiator,BOOMR.constants.BEACON_TYPE_SPAS)?(i=BOOMR.getPerformance())&&i.timing?i.timing.loadEventEnd?i.timing.loadEventEnd:e:BOOMR.t_onload||BOOMR.t_lstart||BOOMR.t_start||e:e},setPageLoadTimers:function(e,n,r){var o,s;if("xhr"!==e&&!("early"===e&&r&&BOOMR.utils.inArray(r.initiator,BOOMR.constants.BEACON_TYPE_SPAS))&&(i.initFromCookie(),i.initFromNavTiming(),BOOMR.addVar("rt.start",this.navigationStartSource),i.checkPreRender()))return!1;if("xhr"===e)if(r.timers)for(var a in r.timers)r.timers.hasOwnProperty(a)&&BOOMR.plugins.RT.setTimer(a,r.timers[a]);else r&&r.timing&&(void 0===(s=r.timing.fetchStart)||r.timing.responseEnd>=s)&&(o=r.timing.responseEnd);else i.responseStart?i.responseStart>=i.navigationStart&&i.responseStart>=i.fetchStart&&(o=i.responseStart):i.timers.hasOwnProperty("t_page")?BOOMR.plugins.RT.endTimer("t_page"):i.t_fb_approx&&(o=i.t_fb_approx);return o&&"early"!==e&&(s?BOOMR.plugins.RT.setTimer("t_resp",s,o):BOOMR.plugins.RT.endTimer("t_resp",o),"load"===e&&i.timers.t_load?BOOMR.plugins.RT.setTimer("t_page",i.timers.t_load.end-o):n<o?BOOMR.addVar("t_page.inv",1,!0):n-o==0&&r&&r.timing&&r.timing.requestStart&&i.timers.t_resp&&i.timers.t_resp.delta?BOOMR.plugins.RT.setTimer("t_page",n-r.timing.requestStart-i.timers.t_resp.delta):BOOMR.plugins.RT.setTimer("t_page",n-o)),"load"===e&&i.timers.hasOwnProperty("t_postrender")&&(BOOMR.plugins.RT.endTimer("t_postrender"),BOOMR.plugins.RT.endTimer("t_prerender")),!0},setSupportingTimestamps:function(e,n){e&&BOOMR.addVar("rt.tstart",e,!0),"number"==typeof i.navigationStart&&i.navigationStart!==e&&BOOMR.addVar("rt.nstart",i.navigationStart,!0),"number"==typeof i.t_start&&i.t_start!==e&&BOOMR.addVar("rt.cstart",i.t_start,!0),BOOMR.addVar("rt.bstart",BOOMR.t_start,!0),BOOMR.t_lstart&&BOOMR.addVar("rt.blstart",BOOMR.t_lstart,!0),"early"===n?BOOMR.addVar("rt.end",e||BOOMR.now(),!0):i.timers.t_done&&BOOMR.addVar("rt.end",i.timers.t_done.end,!0)},determineTStart:function(e,n){var r;return"xhr"===e||"early"===e&&n&&"spa"===n.initiator?(n&&n.name&&i.timers[n.name]?r=i.timers[n.name].start:n&&n.timing&&n.timing.requestStart&&(r=n.timing.requestStart),void 0===r&&n&&BOOMR.utils.inArray(n.initiator,BOOMR.constants.BEACON_TYPE_SPAS)?BOOMR.addVar("rt.start","none"):BOOMR.addVar("rt.start","manual"),i.cached_xhr_start=r):(i.navigationStart?r=i.navigationStart:i.t_start&&2!==i.navigationType?(r=i.t_start,BOOMR.addVar("rt.start","cookie")):i.cached_t_start?r=i.cached_t_start:(BOOMR.addVar("rt.start","none"),r=void 0),i.cached_t_start=r),r},page_ready:function(){this.onloadfired=!0},check_visibility:function(){"visible"===BOOMR.visibilityState()&&(i.visiblefired=!0)},prerenderToVisible:function(){i.onloadfired&&i.autorun&&(BOOMR.addVar("vis.pre","1",!0),BOOMR.plugins.RT.done(null,"visible"))},page_unload:function(e){this.unloadfired||BOOMR.plugins.RT.done(e,"unload"),this.updateCookie(!i.navigationStart&&i.strict_referrer?{r:BOOMR.utils.hashString(r.URL)}:null,"beforeunload"===e.type?"ul":"hd"),this.unloadfired=!0},_iterable_click:function(e,n,r,i){var o;if(r){for(;r&&r.nodeName&&r.nodeName.toUpperCase()!==n;)r=r.parentNode;r&&r.nodeName&&r.nodeName.toUpperCase()===n&&(this.refreshSession(),this.maybeResetSession(BOOMR.now()),o=i(r),this.updateCookie({nu:BOOMR.utils.hashString(o)},"cl"),BOOMR.addVar("nu",BOOMR.utils.cleanupURL(o),!0))}},onclick:function(e){i._iterable_click("Click","A",e,function(e){return e.href})},markComplete:function(){this.onloadfired&&(i.complete=!0)},onsubmit:function(e){i._iterable_click("Submit","FORM",e,function(e){var n="function"==typeof e.getAttribute&&e.getAttribute("action")||r.URL||"";return n.match(/\?/)?n:n+"?"})},onconfig:function(e){e.beacon_url&&(i.beacon_url=e.beacon_url),e.RT&&(e.RT.oboError&&!isNaN(e.RT.oboError)&&e.RT.oboError>i.oboError&&(i.oboError=e.RT.oboError),e.RT.loadTime&&!isNaN(e.RT.loadTime)&&e.RT.loadTime>i.loadTime&&(i.loadTime=e.RT.loadTime,i.timers.t_done&&!isNaN(i.timers.t_done.delta)&&(i.loadTime+=i.timers.t_done.delta)))},domloaded:function(){BOOMR.plugins.RT&&BOOMR.plugins.RT.endTimer("t_domloaded")},clear:function(e){e&&void 0!==e.early||BOOMR.removeVar("rt.start")},spaNavigation:function(){i.onloadfired=!0}},BOOMR.plugins.RT={init:function(e){if(n!==BOOMR.window&&(n=BOOMR.window),e&&e.CrossDomain&&e.CrossDomain.sending&&(i.crossdomain_sending=!0),n&&n.document)return r=n.document,BOOMR.utils.pluginConfig(i,e,"RT",["cookie","cookie_exp","session_exp","strict_referrer"]),e&&void 0!==e.autorun&&(i.autorun=e.autorun),e&&e.beacon_url&&((!i.beacon_url||e.force_beacon_url)&&(i.beacon_url=e.beacon_url),i.next_beacon_url=e.beacon_url),void 0!==r&&(i.r=BOOMR.utils.hashQueryString(r.referrer,!0)),i.initFromCookie(),i.initialized||(i.complete=!1,i.timers={},i.check_visibility(),BOOMR.subscribe("page_ready",i.page_ready,null,i),BOOMR.subscribe("visibility_changed",i.check_visibility,null,i),BOOMR.subscribe("prerender_to_visible",i.prerenderToVisible,null,i),BOOMR.subscribe("page_ready",this.done,"load",this),BOOMR.subscribe("xhr_load",this.done,"xhr",this),BOOMR.subscribe("before_early_beacon",this.done,"early",this),BOOMR.subscribe("dom_loaded",i.domloaded,null,i),BOOMR.subscribe("page_unload",i.page_unload,null,i),BOOMR.subscribe("click",i.onclick,null,i),BOOMR.subscribe("form_submit",i.onsubmit,null,i),BOOMR.subscribe("before_beacon",this.addTimersToBeacon,"beacon",this),BOOMR.subscribe("beacon",i.clear,null,i),BOOMR.subscribe("error",i.markComplete,null,i),BOOMR.subscribe("config",i.onconfig,null,i),BOOMR.subscribe("spa_navigation",i.spaNavigation,null,i),BOOMR.subscribe("interaction",i.markComplete,null,i),BOOMR.getBeaconURL=function(){return i.beacon_url},i.initialized=!0),this},startTimer:function(e,n){return e&&("t_page"===e&&this.endTimer("t_resp",n),i.timers[e]={start:"number"==typeof n?n:BOOMR.now()}),this},endTimer:function(e,n){return e&&(i.timers[e]=i.timers[e]||{},void 0===i.timers[e].end&&(i.timers[e].end="number"==typeof n?n:BOOMR.now())),this},clearTimer:function(e){return e&&delete i.timers[e],this},setTimer:function(e,n,r){return e&&(void 0!==r?i.timers[e]={start:n,end:r,delta:r-n}:i.timers[e]={delta:n}),this},addTimersToBeacon:function(e,n){var r,o,s=[];for(r in i.timers)if(i.timers.hasOwnProperty(r)){if("number"!=typeof(o=i.timers[r]).delta&&("number"!=typeof o.start&&(o.start="xhr"===n?i.cached_xhr_start:i.cached_t_start),o.delta=o.end-o.start),isNaN(o.delta))continue;i.basic_timers.hasOwnProperty(r)?BOOMR.addVar(r,o.delta,!0):s.push(r+"|"+o.delta)}s.length&&BOOMR.addVar("t_other",s.join(","),!0),"beacon"!==n||e&&void 0!==e.early||(i.timers={},i.complete=!1)},done:function(e,n){if(BOOMR.plugins.RT){var r,o,s=BOOMR.now(),a=!1;return i.complete=!1,o=i.validateLoadTimestamp(s,e,n),("load"!==n&&"visible"!==n&&"xhr"!==n&&"early"!==n||i.setPageLoadTimers(n,o,e))&&(("load"===n||"visible"===n||"early"===n&&(!e||void 0===e.initiator||"spa_hard"===e.initiator)||"xhr"===n&&e&&"spa_hard"===e.initiator)&&i.getBoomerangTimings(),r=i.determineTStart(n,e),i.refreshSession(),i.maybeResetSession(o,r),"early"!==n&&this.endTimer("t_done",o),e&&"xhr"===e.initiator&&this.setTimer("t_done",e.timing.requestStart,e.timing.loadEventEnd),i.setSupportingTimestamps(r,n),this.addTimersToBeacon(null,n),BOOMR.setReferrer(i.r),"xhr"===n&&e&&e&&e.data&&(e=e.data),"xhr"===n&&e&&(a=e.subresource,e.url&&BOOMR.addVar("u",BOOMR.utils.cleanupURL(e.url.replace(/#.*/,""))),e.status&&(e.status<-1||e.status>=400)&&BOOMR.addVar("http.errno",e.status,!0),e.method&&"GET"!==e.method&&BOOMR.addVar("http.method",e.method,!0),e.type&&"xhr"!==e.type&&BOOMR.addVar("http.type",e.type[0],!0),e.headers&&BOOMR.addVar("http.hdr",e.headers,!0),e.synchronous&&BOOMR.addVar("xhr.sync",1,!0),e.initiator&&BOOMR.addVar("http.initiator",e.initiator,!0),e.responseBodyNotUsed&&BOOMR.addVar("fetch.bnu",1,!0),e.responseUrl&&BOOMR.addVar("xhr.ru",BOOMR.utils.cleanupURL(e.responseUrl),!0)),a&&"passive"!==a&&BOOMR.addVar("rt.subres",1,!0),"load"!==n&&"visible"!==n&&("xhr"!==n||a)&&("unload"!==n||i.onloadfired||!i.autorun||i.crossdomain_sending)||(i.incrementSessionDetails(),i.updateCookie(null,"ld")),BOOMR.addVar({"rt.tt":i.loadTime,"rt.obo":i.oboError},void 0,!0),i.updateCookie(),"unload"===n&&(BOOMR.addVar("rt.quit","",!0),i.onloadfired||BOOMR.addVar("rt.abld","",!0),i.visiblefired||BOOMR.addVar("rt.ntvu","",!0)),"early"!==n&&(i.complete=!0),BOOMR.sendBeacon(i.beacon_url)),this}},is_complete:function(e){return i.complete||e&&"error"===e["http.initiator"]||e&&void 0!==e.early},updateCookie:function(){i.updateCookie()},getCookie:function(){var e,n,r;return!!i.cookie&&(1&(e=BOOMR.utils.getSubCookies(BOOMR.utils.getCookie(i.cookie))||{}).z?(n=36,r=parseInt(e.ss||0,36)):(n=10,r=0),e.ss=parseInt(e.ss||0,n),e.tt=parseInt(e.tt||0,n),e.obo=parseInt(e.obo||0,n),e.sl=parseInt(e.sl||0,n),e.se&&(e.se=parseInt(e.se,n)||1800),e.ld&&(e.ld=r+parseInt(e.ld,n)),e.ul&&(e.ul=r+parseInt(e.ul,n)),e.cl&&(e.cl=r+parseInt(e.cl,n)),e.hd&&(e.hd=r+parseInt(e.hd,n)),e)},incrementSessionDetails:function(){i.incrementSessionDetails()},navigationStart:function(){return i.navigationStart||i.initFromNavTiming(),i.navigationStart},resetTimings:function(){i.navigationStart=void 0,i.responseStart=void 0,i.loadTime=0,i.cached_t_start=void 0}}),!BOOMR.plugins.PaintTiming){var l={"first-paint":"fp","first-contentful-paint":"fcp","largest-contentful-paint":"lcp"},u={initialized:!1,complete:!1,supported:null,timingCache:{},timingHistory:{},observer:null,externalMetrics:{},done:function(e,n){var r,i,o;if(this.complete)return this;if("load"!==n&&(!e||"spa_hard"!==e.initiator))return this.complete=!0,this;if(!(r=BOOMR.getPerformance())||"function"!=typeof r.getEntriesByType){this.complete=!0;return}if((i=r.getEntriesByType("paint"))&&i.length){for(BOOMR.info("This user agent supports PaintTiming","pt"),o=0;o<i.length;o++)u.timingCache[i[o].name]=i[o].startTime,l[i[o].name]&&BOOMR.addVar("pt."+l[i[o].name],Math.floor(i[o].startTime),!0);this.complete=!0,BOOMR.sendBeacon()}},onObserver:function(e){var n=e.getEntries();if(0!==n.length){var r=n[n.length-1],i=r.renderTime||r.loadTime;u.timingCache[r.entryType]=i,u.timingHistory[r.entryType]=u.timingHistory[r.entryType]||[],u.timingHistory[r.entryType].push(i),BOOMR.addVar("pt.lcp",Math.floor(i),!0),u.externalMetrics.lcp=function(){return Math.floor(i)}}}};BOOMR.plugins.PaintTiming={init:function(){return this.is_supported()||(u.complete=!0,u.initialized=!0),u.complete||"hidden"!==BOOMR.visibilityState()||(BOOMR.addVar("pt.hid",1,!0),u.complete=!0),u.initialized||(BOOMR.subscribe("page_ready",u.done,"load",u),BOOMR.subscribe("xhr_load",u.done,"xhr",u),BOOMR.subscribe("before_unload",u.done,null,u),"function"==typeof BOOMR.window.PerformanceObserver&&"function"==typeof window.LargestContentfulPaint&&(u.observer=new BOOMR.window.PerformanceObserver(u.onObserver),u.observer.observe({type:"largest-contentful-paint",buffered:!0})),u.initialized=!0),this},is_complete:function(){return!0},is_enabled:function(){return u.initialized&&this.is_supported()},is_supported:function(){if(null!==u.supported)return u.supported;var e=BOOMR.getPerformance();return u.supported=e&&void 0!==window.PerformancePaintTiming&&"function"==typeof e.getEntriesByType,u.supported},getTimingFor:function(e){if(u.timingCache[e])return u.timingCache[e];if(this.is_supported()){var n,r,i=BOOMR.getPerformance();if(i&&"function"==typeof i.getEntriesByType&&(n=i.getEntriesByType("paint"))&&n.length){for(r=0;r<n.length;r++)if(n[r].name===e)return u.timingCache[e]=n[r].startTime,u.timingCache[e]}}},getHistoryFor:function(e){return u.timingHistory[e]||[]},metrics:u.externalMetrics}}if(!BOOMR.plugins.NavigationTiming){var d={complete:!1,fullySent:!1,sendBeacon:function(){this.complete=!0,BOOMR.sendBeacon()},xhr_done:function(e){if(e&&"spa_hard"===e.initiator)return void d.done(e);if(e&&"spa"===e.initiator)return void d.sendBeacon();BOOMR.window;var n,r,i,o={};if(e){if(e.data&&(e=e.data),(n=BOOMR.getPerformance())&&e.restiming)for(i in o={nt_red_st:e.restiming.redirectStart,nt_red_end:e.restiming.redirectEnd,nt_fet_st:e.restiming.fetchStart,nt_dns_st:e.restiming.domainLookupStart,nt_dns_end:e.restiming.domainLookupEnd,nt_con_st:e.restiming.connectStart,nt_con_end:e.restiming.connectEnd,nt_req_st:e.restiming.requestStart,nt_res_st:e.restiming.responseStart,nt_res_end:e.restiming.responseEnd},e.restiming.secureConnectionStart&&(o.nt_ssl_st=e.restiming.secureConnectionStart),o)o.hasOwnProperty(i)&&o[i]&&(o[i]+=n.timing.navigationStart,o[i]=Math.floor(o[i]));for(i in e.timing&&(r=e.timing,o.nt_req_st||(o.nt_req_st=r.requestStart),o.nt_res_st||(o.nt_res_st=r.responseStart),o.nt_res_end||(o.nt_res_end=r.responseEnd),o.nt_domint=r.domInteractive,o.nt_domcomp=r.domComplete,o.nt_load_st=r.loadEventEnd,o.nt_load_end=r.loadEventEnd),o)o.hasOwnProperty(i)&&!o[i]&&delete o[i];BOOMR.addVar(o,void 0,!0),d.sendBeacon()}},done:function(){var e,n,r,i,o,s,a=BOOMR.window,c={},l=0,u=!1;if(this.complete)return this;if(e=BOOMR.getPerformance()){for(s in"function"==typeof e.getEntriesByType&&((i=e.getEntriesByType("navigation"))&&i.length?(BOOMR.info("This user agent supports NavigationTiming2","nt"),i=i[0],l=e.timing?e.timing.navigationStart:0):i=void 0),!i&&e.timing&&(BOOMR.info("This user agent supports NavigationTiming","nt"),i=e.timing),i&&(!(c={nt_nav_st:e.timing?e.timing.navigationStart:0,nt_red_st:p(l,i.redirectStart),nt_red_end:p(l,i.redirectEnd),nt_fet_st:p(l,i.fetchStart),nt_dns_st:p(l,i.domainLookupStart),nt_dns_end:p(l,i.domainLookupEnd),nt_con_st:p(l,i.connectStart),nt_con_end:p(l,i.connectEnd),nt_req_st:p(l,i.requestStart),nt_res_st:p(l,i.responseStart),nt_res_end:p(l,i.responseEnd),nt_domloading:p(l,i.domLoading),nt_domint:p(l,i.domInteractive),nt_domcontloaded_st:p(l,i.domContentLoadedEventStart),nt_domcontloaded_end:p(l,i.domContentLoadedEventEnd),nt_domcomp:p(l,i.domComplete),nt_load_st:p(l,i.loadEventStart),nt_load_end:p(l,i.loadEventEnd),nt_unload_st:p(l,i.unloadEventStart),nt_unload_end:p(l,i.unloadEventEnd)}).nt_domloading&&e&&e.timing&&e.timing.domLoading&&(c.nt_domloading=e.timing.domLoading),i.secureConnectionStart&&(c.nt_ssl_st=p(l,i.secureConnectionStart)),e.timing&&e.timing.msFirstPaint&&(c.nt_first_paint=e.timing.msFirstPaint),i.workerStart&&(c.nt_worker_start=p(l,i.workerStart)),(i.decodedBodySize||i.transferSize)&&(c.nt_enc_size=i.encodedBodySize,c.nt_dec_size=i.decodedBodySize,c.nt_trn_size=i.transferSize),i.nextHopProtocol&&(c.nt_protocol=i.nextHopProtocol)),!c.nt_first_paint&&BOOMR.plugins.PaintTiming&&(u=BOOMR.plugins.PaintTiming.is_supported(),(o=BOOMR.plugins.PaintTiming.getTimingFor("first-paint"))&&(c.nt_first_paint=p(l,o))),(!c.nt_protocol||!c.nt_first_paint)&&(!i||""!==i.nextHopProtocol)&&!u&&a.chrome&&"function"==typeof a.chrome.loadTimes&&(r=a.chrome.loadTimes())&&(c.nt_spdy=+!!r.wasFetchedViaSpdy,c.nt_cinf=r.connectionInfo,"number"==typeof r.firstPaintTime&&0!==r.firstPaintTime&&(c.nt_first_paint=Math.round(1e3*r.firstPaintTime))),e.navigation&&(n=e.navigation,c.nt_red_cnt=n.redirectCount,c.nt_nav_type=n.type),c)c.hasOwnProperty(s)&&void 0===c[s]&&delete c[s];BOOMR.addVar(c,void 0,!0),i&&(i.requestStart&&i.navigationStart&&i.requestStart<i.navigationStart||i.responseStart&&i.navigationStart&&i.responseStart<i.navigationStart||i.responseStart&&i.fetchStart&&i.responseStart<i.fetchStart||i.navigationStart&&i.fetchStart<i.navigationStart||i.responseEnd&&i.responseEnd>BOOMR.now()+864e5)&&BOOMR.addVar("nt_bad",1,!0),c.nt_load_end>0&&(this.fullySent=!0)}d.sendBeacon()},clear:function(e){this.complete=!(e&&e.early)&&this.fullySent},prerenderToVisible:function(){this.complete=!1,this.done()},onBeforeEarlyBeacon:function(e){e&&void 0!==e.initiator&&"spa_hard"!==e.initiator||this.done()}};BOOMR.plugins.NavigationTiming={init:function(){return d.initialized||(BOOMR.subscribe("page_ready",d.done,null,d),BOOMR.subscribe("prerender_to_visible",d.prerenderToVisible,null,d),BOOMR.subscribe("before_early_beacon",d.onBeforeEarlyBeacon,null,d),BOOMR.subscribe("xhr_load",d.xhr_done,null,d),BOOMR.subscribe("before_unload",d.done,null,d),BOOMR.subscribe("beacon",d.clear,null,d),d.initialized=!0),this},is_complete:function(){return!0}}}function p(e,n){if("number"==typeof n&&0!==n)return Math.floor((e||0)+n)}if(!function(){if(!BOOMR.plugins.ResourceTiming){var e,n={other:0,img:1,link:2,script:3,css:4,xmlhttprequest:5,html:6,image:7,beacon:8,fetch:9,iframe:"a",subdocument:"a",body:"b",input:"c",frame:"a",object:"d",video:"e",audio:"f",source:"g",track:"h",embed:"i",eventsource:"j",navigation:6},r={prefetch:1,preload:2,prerender:3,stylesheet:4},i=["startTime","redirectStart","redirectEnd","fetchStart","domainLookupStart","domainLookupEnd","connectStart","secureConnectionStart","connectEnd","requestStart","responseStart","responseEnd","workerStart"],o="\n",s="*",c="0",l="1",u="2",d=1,p=2,h=4,f="3",m="4",g="5",v="6",y="7";e={complete:!1,sentNavBeacon:!1,initialized:!1,supported:null,xhr_load:function(e){e&&e.restiming&&q(e.restiming),this.complete||(this.complete=!0,BOOMR.sendBeacon())},xssBreakWords:[/(h)(ref)/gi,/(s)(rc)/gi,/(a)(ction)/gi],urlLimit:500,clearOnBeacon:!1,trimUrls:[],serverTiming:!0,monitorClearResourceTimings:!1,splitAtPath:!1,getSrcsetDimensions:!1,trackedResourceTypes:"*",done:function(){this.sentNavBeacon||(N(),this.complete=!0,this.sentNavBeacon=!0,BOOMR.sendBeacon())},onBeacon:function(n){var r=BOOMR.getPerformance();if(e.clearOnBeacon&&r){var i=r.clearResourceTimings||r.webkitClearResourceTimings;i&&"function"==typeof i&&i.call(r)}},prerenderToVisible:function(){this.sentNavBeacon=!1,this.done()}},BOOMR.plugins.ResourceTiming={init:function(n){if(BOOMR.utils.pluginConfig(e,n,"ResourceTiming",["xssBreakWords","clearOnBeacon","urlLimit","trimUrls","trackedResourceTypes","serverTiming","monitorClearResourceTimings","splitAtPath","getSrcsetDimensions"]),e.initialized)return this;if(this.is_supported()){if(BOOMR.subscribe("page_ready",e.done,null,e),BOOMR.subscribe("prerender_to_visible",e.prerenderToVisible,null,e),BOOMR.subscribe("xhr_load",e.xhr_load,null,e),BOOMR.subscribe("beacon",e.onBeacon,null,e),BOOMR.subscribe("before_unload",e.done,null,e),e.monitorClearResourceTimings){var r,i=this;BOOMR.window.performance.clearResourceTimings=(r=BOOMR.window.performance.clearResourceTimings,function(){i.addResources(BOOMR.window.performance.getEntriesByType("resource")),r.apply(BOOMR.window.performance,arguments)})}}else e.complete=!0;return e.initialized=!0,this},is_complete:function(){return!0},is_enabled:function(){return e.initialized&&this.is_supported()},is_supported:function(){if(null!==e.supported)return e.supported;var n=BOOMR.getPerformance();return e.supported=n&&"function"==typeof n.getEntriesByType&&void 0!==window.PerformanceResourceTiming,e.supported},addResources:function(n,r){if(this.is_supported()&&BOOMR.utils.isArray(n)){if(e.collectedEntries=e.collectedEntries||[],"number"==typeof r){var o=r-(BOOMR.window.performance.timeOrigin||BOOMR.window.performance.timing.navigationStart);n=BOOMR.utils.arrayFilter(n,function(e){for(var n=0;n<i.length;n++){var r=i[n];e.hasOwnProperty(r)&&(e[r]+=o)}return!0})}Array.prototype.push.apply(e.collectedEntries,n)}},getCompressedResourceTiming:B,getFilteredResourceTiming:x,calculateResourceTimingUnion:function(e){if(!e||!e.length)return 0;e.sort(function(e,n){return e.fetchStart!==n.fetchStart?e.fetchStart-n.fetchStart:(e.responseStart||e.responseEnd)-(n.responseStart||n.responseEnd)});var n,r=P(e),i=[],o=0;for(n=0;n<r.length;n++){var s=r[n];s.fetchStart<o&&(s.fetchStart=o),s.fetchStart<s.responseEnd&&(i.push(s),o=s.responseEnd)}var a=P(i),c=0;for(n=0;n<a.length;n++)c+=a[n].responseEnd-a[n].fetchStart;return c},addResourceTimingToBeacon:N,addToBeacon:q,trimTiming:w,convertToTrie:b,optimizeTrie:_,findPerformanceEntriesForFrame:S,toBase36:T,getVisibleEntries:M,reduceFetchStarts:P,compressSize:C,decompressSize:function(e,n){var r,i;for(void 0===n&&(n={}),r=e.split(","),i=0;i<r.length;i++)"_"===r[i]?r[i]=0:(""===r[i]&&(r[i]=0),r[i]=parseInt(r[i],36),i>0&&(r[i]+=r[0]));return 1===r.length&&r.push(r[0]),2===r.length&&r.push(r[0]),n.encodedBodySize=r[0],n.transferSize=r[1],n.decodedBodySize=r[2],n},trimUrl:I,getResourceLatestTime:j,mergePixels:A,countPixels:k,getOptimizedTimepoints:function(e){var n,r,i,o,s,a,c,l,u,d,p={},h=[];for(n=0,r=Object.keys(e);n<r.length;n++)void 0===p[s=Math.round(Number(r[n]))]&&(p[s]=[]),Array.prototype.push.apply(p[s],e[r[n]]);if(0===(r=Object.keys(p).map(Number).sort(function(e,n){return e-n})).length)return{};for(n=0;n<r.length;n++)c=k(i=A(i,p[s=r[n]],s)),r[n]=[s,c];for(n=0,o=0,a=0,l=0;n<r.length;n++)s=r[n][0],c=r[n][1],u=k(i,0,s),(c>a||u>l)&&(h.push(d=(d=(s===1/0?"":T(Math.round(s-o)))+"~"+T(c-a)+"~"+T(c-u)).replace(/~~/,"-").replace(/~$/,"")),o=s,a=c,l=u);return h.join("!").replace(/!+$/,"")},decompressTimePoints:function(e){var n,r,i,o={},s=[0,0,0];for(r=0,n=e.split("!");r<n.length;r++)o[(i=n[r].replace(/^~/,"Infinity~").replace("-","~0~").split("~").map(function(e,n){return e="Infinity"===e?1/0:parseInt(e,36),2===n?e=s[1]-e:e+=s[n],s[n]=e,e}))[0]]=[i[1],i[2]||i[1]];return o},accumulateServerTimingEntries:D,compressServerTiming:L,indexServerTiming:F,identifyServerTimingEntry:U,decompressServerTiming:function(e,n){var r=n.split(":"),i=Number(r[0]),o=0,s=0;if(r.length>1){var a=r[1].split(".");""!==a[0]&&(o=Number(a[0])),a.length>1&&(s=Number(a[1]))}var c,l="";return Array.isArray(e[o])?(c=e[o][0],l=e[o][1+s]||""):c=e[o],{name:c,duration:i,description:l}},SPECIAL_DATA_PREFIX:s,SPECIAL_DATA_DIMENSION_TYPE:c,SPECIAL_DATA_SIZE_TYPE:l,SPECIAL_DATA_SCRIPT_ATTR_TYPE:u,SPECIAL_DATA_LINK_ATTR_TYPE:m,SPECIAL_DATA_SERVICE_WORKER_TYPE:v,ASYNC_ATTR:d,DEFER_ATTR:p,LOCAT_ATTR:h,INITIATOR_TYPES:n,REL_TYPES:r}}function b(n,r){var i,s,a,c,l,u,d,p,h={};for(i in n){for(a=0,s=i;a<e.xssBreakWords.length;a++)s=s.replace(e.xssBreakWords[a],"$1"+o+"$2");if(n.hasOwnProperty(i))for(a=0,c=n[i],l=r?[(l=s.split("/"))[0]+"//",l[2]+(l.length>3?"/":"")].concat(l.slice(3).reduce(function(e){return function(n,r,i){var s,a;if(-1!==r.indexOf(o)){for(a=0,s=r.split(o);a<s.length-1;a++)n.push(s[a]),n.push(o);r=s.slice(-1)}return"number"==typeof e&&i<e&&(r+="/"),n.concat(r)}}(l.length-4),[])):s.split(""),d=h;a<l.length;a++)void 0===(p=d[u=l[a]])?d=d[u]=a===l.length-1?c:{}:"string"==typeof p?d=d[u]={"|":p}:a===l.length-1?d[u]["|"]=c:d=d[u]}return h}function _(e,n){var r,i,s,a=0,c=[];for(r in e)e.hasOwnProperty(r)&&c.push(r);for(var l=0;l<c.length;l++)"object"==typeof e[r=c[l]]&&(i=_(e[r],!1))&&(delete e[r],r===o?(r=i.name,a++):r+=i.name,e[r]=i.value),a++;if(1===a)if(n)return(s={})[r]=e[r],s;else return{name:r,value:e[r]};return!!n&&e}function w(e,n){"number"!=typeof e&&(e=0),"number"!=typeof n&&(n=0);var r=Math.round(e||0),i=Math.round(n||0);return 0===r?0:r-i}function O(e){try{if(e.location&&e.location.href,e.document,"performance"in e&&e.performance)return!0}catch(e){}return!1}function R(e){var n=0;return O(e)&&e.performance.timing&&e.performance.timing.navigationStart&&(n=e.performance.timing.navigationStart),n}function S(n,o,s,a,c){var l,u,f,m,g,v,y,b,_,w=[],T={},x={};if(void 0===o&&(o=!0),void 0===s&&(s=0),void 0===a&&(a=0),a>10)return w;try{if(!O(n))return w;if(f=R(n),b=M(n,c),_=n.document.createElement("a"),E(_,T,"script"),E(_,x,"link"),(v=n.document.getElementsByTagName("iframe"))&&v.length)for(l=0;l<v.length;l++)m=R(v[l].contentWindow),g=0,m>f&&(g=s+(m-f)),_.href=v[l].src,w=w.concat(S(v[l].contentWindow,!1,g,a+1,b[_.href]));if("function"!=typeof n.performance.getEntriesByType)return w;function C(n){return e.serverTiming&&n.serverTiming||[]}o&&(I=n,A=w,k=u,B=y,P=C,(k=I.performance.getEntriesByType("navigation"))&&1===k.length?(B=k[0],A.push({name:I.location.href,startTime:0,initiatorType:"html",redirectStart:B.redirectStart,redirectEnd:B.redirectEnd,fetchStart:B.fetchStart,domainLookupStart:B.domainLookupStart,domainLookupEnd:B.domainLookupEnd,connectStart:B.connectStart,secureConnectionStart:B.secureConnectionStart,connectEnd:B.connectEnd,requestStart:B.requestStart,responseStart:B.responseStart,responseEnd:B.responseEnd,workerStart:B.workerStart,encodedBodySize:B.encodedBodySize,decodedBodySize:B.decodedBodySize,transferSize:B.transferSize,serverTiming:P(B)})):I.performance.timing&&0!==(t=I.performance.timing).navigationStart&&t.responseEnd<=t.navigationStart+36e5&&A.push({name:I.location.href,startTime:0,initiatorType:"html",redirectStart:t.redirectStart?t.redirectStart-t.navigationStart:0,redirectEnd:t.redirectEnd?t.redirectEnd-t.navigationStart:0,fetchStart:t.fetchStart?t.fetchStart-t.navigationStart:0,domainLookupStart:t.domainLookupStart?t.domainLookupStart-t.navigationStart:0,domainLookupEnd:t.domainLookupEnd?t.domainLookupEnd-t.navigationStart:0,connectStart:t.connectStart?t.connectStart-t.navigationStart:0,secureConnectionStart:t.secureConnectionStart?t.secureConnectionStart-t.navigationStart:0,connectEnd:t.connectEnd?t.connectEnd-t.navigationStart:0,requestStart:t.requestStart?t.requestStart-t.navigationStart:0,responseStart:t.responseStart?t.responseStart-t.navigationStart:0,responseEnd:t.responseEnd?t.responseEnd-t.navigationStart:0}));var I,A,k,B,P,N=n.performance.getEntriesByType("resource");n===BOOMR.window&&e.collectedEntries&&(Array.prototype.push.apply(N,e.collectedEntries),e.collectedEntries=[]),w=w.concat(function(e,n,o,s,a,c){for(var l,u,f=[],m=0;e&&m<e.length;m++){l={name:(u=e[m]).name,initiatorType:u.initiatorType,encodedBodySize:u.encodedBodySize,decodedBodySize:u.decodedBodySize,transferSize:u.transferSize,serverTiming:n(u),visibleDimensions:o[u.name],latestTime:j(u)};for(var g=0;g<i.length;g++){var v=i[g];l[v]="startTime"===v||u[v]?u[v]+s:0}if(u.hasOwnProperty("_data")&&(l._data=u._data),("script"===u.initiatorType||"link"===u.initiatorType)&&a[u.name]){var y=a[u.name];for(l.scriptAttrs=(y.async?d:0)|(y.defer?p:0);1===y.nodeType&&"BODY"!==y.nodeName;)y=y.parentNode;l.scriptAttrs|="BODY"===y.nodeName?h:0}"link"===u.initiatorType&&c[u.name]&&BOOMR.utils.arrayFind(c[u.name].rel.split(/[\u0009\u000A\u000C\u000D\u0020]+/),function(e){if(r[e=e.toLowerCase()])return l.linkAttrs=r[e],!0}),f.push(l)}return f}(N,C,b,s,T,x))}catch(e){}return w}function E(e,n,r){Array.prototype.forEach.call(e.ownerDocument.getElementsByTagName(r),function(r){e.href=r.currentSrc||r.src||"function"==typeof r.getAttribute&&r.getAttribute("xlink:href")||r.href,e.href.match(/^https?:\/\//)&&(n[e.href]=r)})}function T(e){return"number"==typeof e&&0!==e?e.toString(36):"string"==typeof e?e:""}function M(n,r){var i,o,s={},a=n.document,c=a.createElement("A");return i=(r=r||[0,0,0,0])[3]+(void 0!==n.pageXOffset)?n.pageXOffset:(a.documentElement||a.body.parentNode||a.body).scrollLeft,o=r[2]+(void 0!==n.pageYOffset)?n.pageYOffset:(a.documentElement||a.body.parentNode||a.body).scrollTop,["img","iframe","image"].forEach(function(n){var r,l,u,d,p,h,f,m=a.getElementsByTagName(n);for(p=0;p<m.length;p++)if((d=m[p])&&(c.href=f=d.currentSrc||d.src||"function"==typeof d.getAttribute&&d.getAttribute("src")||d.getAttribute("xlink:href"),(f=c.href)&&!s[f]&&((h=d.getBoundingClientRect()).height||d.offsetHeight)&&(h.width||d.offsetWidth))){if(s[f]=[h.height||d.offsetHeight,h.width||d.offsetWidth,Math.round(h.top+o),Math.round(h.left+i)],!d.naturalHeight&&!d.naturalWidth)continue;e.getSrcsetDimensions&&d.currentSrc&&(d.srcset||d.parentNode&&d.parentNode.nodeName&&"PICTURE"===d.parentNode.nodeName.toUpperCase())?(r=d.isConnected?d.ownerDocument.createElement("IMG"):new BOOMR.window.Image).src=f:r=d,l=r.naturalHeight||d.naturalHeight,u=r.naturalWidth||d.naturalWidth,(l||u)&&(s[f][0]!==l||s[f][1]!==u)&&s[f].push(l,u)}}),s}function x(e,n,r){var i,o,s=S(BOOMR.window,!0,0,0),a=R(BOOMR.window),c={};if(!s||!s.length)return{entries:[]};s.sort(function(e,n){return e.startTime-n.startTime});var l=[];for(i=0;i<s.length;i++)if(!("string"!=typeof(o=s[i]).name||0!==o.name.indexOf("http:")&&0!==o.name.indexOf("https:")||"function"==typeof BOOMR.getBeaconURL&&BOOMR.getBeaconURL()&&o.name.indexOf(BOOMR.getBeaconURL())>-1)&&(!e||!(a+o.startTime<e))){if(n&&a+o.startTime>n)break;(void 0===r||"*"===r||!r.length||o.initiatorType&&BOOMR.utils.inArray(o.initiatorType,r))&&(D(c,o.serverTiming),l.push(o))}var u=L(c);return{entries:l,serverTiming:{lookup:u,indexed:F(u)}}}function C(e){var n,r,i;return e.encodedBodySize||e.decodedBodySize||e.transferSize?(n=e.transferSize,r=e.encodedBodySize,[r,n?n-r:"_",(i=e.decodedBodySize)?i-r:0].map(T).join(",").replace(/,+$/,"")):""}function I(n,r){var i,o,s;if(n&&r)for(i=0;i<r.length;i++)if("string"==typeof(s=r[i])){if(-1!==(o=n.indexOf(s))){n=n.substr(0,o+s.length)+"...";break}}else s instanceof RegExp&&s.test(n)&&(n=n.replace(s,"$1")+"...");return BOOMR.utils.cleanupURL(n,e.urlLimit)}function j(e){return e.responseEnd?e.responseEnd:e.responseStart&&e.startTime?e.responseStart+(e.responseStart-e.startTime)*.2:1/0}function A(e,n,r){var i=BOOMR.window.screen,o=i.height,s=i.width;return n.reduce(function(e,n){var i,a,c,l,u,d;if(i=Math.max(0,n[3]),c=Math.max(0,n[2]),a=Math.min(n[3]+n[1],s),l=Math.min(n[2]+n[0],o),i>=a||c>=l)return e;for(d=c;d<l;d++)for(e[d]||(e[d]=[]),u=i;u<a;u++)e[d][u]=r;return e},e||[])}function k(e,n,r){return n=n||0,r=r||1/0,e.reduce(function(e,i){return e+i.filter(function(e){return n<=e&&e<=r}).length},0)}function B(r,i){var o,d,p,h,O,R={},S={},E=x(r,i,e.trackedResourceTypes),M=E.entries,j=E.serverTiming;if(!M||!M.length)return{restiming:{},servertiming:[]};for(o=0;o<M.length;o++){d=M[o];var A=BOOMR.plugins.Continuity.getTTIWaitForXHRIngore(),k=d.initiatorType&&BOOMR.utils.inArray(d.initiatorType,["xmlhttprequest","fetch"])&&a(A,d.name);void 0===(p=n[d.initiatorType])&&(p=0),O=p+[w(d.startTime,0),w(d.responseEnd,d.startTime),w(d.responseStart,d.startTime),w(d.requestStart,d.startTime),w(d.connectEnd,d.startTime),w(d.secureConnectionStart,d.startTime),w(d.connectStart,d.startTime),w(d.domainLookupEnd,d.startTime),w(d.domainLookupStart,d.startTime),w(d.redirectEnd,d.startTime),w(d.redirectStart,d.startTime)].map(T).join(",").replace(/,+$/,"");var B=C(d);if(""!==B&&(O+=s+l+B),d.hasOwnProperty("scriptAttrs")&&(O+=s+u+d.scriptAttrs),d.serverTiming&&d.serverTiming.length&&(O+=s+f+d.serverTiming.reduce(function(e,n,r){var i=String(void 0!==n.duration?n.duration:n.value);"0."===i.substring(0,2)&&(i=i.substring(1));var o=n.name||n.metric;return e+((r>0?",":"")+i+U(j.indexed[o].index,j.indexed[o].descriptions[n.description]))},"")),d.hasOwnProperty("linkAttrs")&&(O+=s+m+d.linkAttrs),d.workerStart&&"number"==typeof d.workerStart&&0!==d.workerStart){var P,N=w(("number"!=typeof(P=d.workerStart)&&(P=0),Math.ceil(P||0)),d.startTime);O+=s+v+T(N)}if(k&&(O+=s+y+1),h=I(d.name,e.trimUrls),d.hasOwnProperty("_data")){var D="";for(var L in d._data)d._data.hasOwnProperty(L)&&(D+=s+g+L+":"+d._data[L]);void 0===R[h]?R[h]=O+D:R[h]+=D}else void 0!==R[h]?R[h]+="|"+O:d.visibleDimensions?R[h]=s+c+d.visibleDimensions.map(Math.round).map(T).join(",").replace(/,+$/,"")+"|"+O:R[h]=O;d.visibleDimensions&&(S[d.latestTime]||(S[d.latestTime]=[]),S[d.latestTime].push(d.visibleDimensions))}return{restiming:_(b(R,e.splitAtPath),!0),servertiming:j.lookup}}function P(e){var n=[];if(!e||!e.length)return n;for(var r=0;r<e.length;r++){var i=e[r];(r===e.length-1||i.fetchStart!==e[r+1].fetchStart)&&n.push({fetchStart:i.fetchStart,responseEnd:i.responseStart||i.responseEnd})}return n}function N(e,n){var r;"undefined"!=typeof JSON&&(r=B(e,n))&&(BOOMR.info("Client supports Resource Timing API","restiming"),q(r))}function D(e,n){(n||[]).forEach(function(n){var r=n.name||n.metric;void 0===e[r]&&(e[r]={count:0,counts:{}});var i=e[r];i.counts[n.description]=i.counts[n.description]||0,i.counts[n.description]++,i.count++})}function L(e){return Object.keys(e).sort(function(n,r){return e[r].count-e[n].count}).reduce(function(n,r){var i=Object.keys(e[r].counts).sort(function(n,i){return e[r].counts[i]-e[r].counts[n]});return n.push(1===i.length&&""===i[0]?r:[r].concat(i)),n},[])}function F(e){return e.reduce(function(e,n,r){var i,o;return Array.isArray(n)?(i=n[0],o=n.slice(1).reduce(function(e,n,r){return e[n]=r,e},{})):(i=n,o={"":0}),e[i]={index:r,descriptions:o},e},{})}function U(e,n){var r="";return e&&(r+=e),n&&(r+="."+n),r.length&&(r=":"+r),r}function q(e){BOOMR.addVar("restiming",JSON.stringify(e.restiming),!0),e.servertiming.length&&BOOMR.addVar("servertiming",BOOMR.utils.serializeForUrl(e.servertiming),!0)}}(),!BOOMR.plugins.UserTiming){var h={complete:!1,initialized:!1,supported:!1,options:{from:0,window:BOOMR.window},getUserTiming:function(){var e,n=this.findUserTimingForFrame(h.options.window);h.options.from&&(n=n.filter(function(e){return e.startTime+e.duration>=h.options.from}));var r=window.UserTimingCompression||BOOMR.window.UserTimingCompression;if(void 0!==r)return e=r.compressUserTiming(n),r.compressForUri(e);if(0===n.length)return null;for(var i=this.getUserTimingMap(),o=0,s=n.length;o<s;o++){var a=n[o];"measure"===a.entryType&&0===a.name.indexOf("x_")&&(i[a.name]?i[a.name].push(a.duration):i[a.name]=[a.duration])}return JSON.stringify(i)},addEntriesToBeacon:function(e){var n,r=BOOMR.hrNow();this.complete||e&&void 0!==e.early||((n=this.getUserTiming())&&BOOMR.addVar("usertiming",n,!0),this.options.from=r,this.complete=!0)},getUserTimingMap:function(){var e,n=BOOMR.getVar("usertiming");if(!n)return{};try{if(e=JSON.parse(n),s(e))return e}catch(e){}return{}},findUserTimingForFrame:function(e){var n;if(!e)return[];try{if(e.location&&e.location.href,!("performance"in e)||!e.performance||!e.performance.getEntriesByType)return n;n=(n=e.performance.getEntriesByType("mark")).concat(e.performance.getEntriesByType("measure"))}catch(e){}return n},clearMetrics:function(e){this.complete=!1},subscribe:function(){BOOMR.subscribe("before_beacon",this.addEntriesToBeacon,null,this),BOOMR.subscribe("beacon",this.clearMetrics,null,this)},pageReady:function(){this.checkSupport()&&this.subscribe()},checkSupport:function(){if(this.supported)return!0;var e=BOOMR.getPerformance();if(e&&"function"==typeof e.getEntriesByType){var n=e.getEntriesByType("mark"),r=e.getEntriesByType("measure");if(BOOMR.utils.isArray(n)&&BOOMR.utils.isArray(r))return BOOMR.info("Client supports UserTiming API","usertiming"),this.supported=!0,!0}return!1}};BOOMR.plugins.UserTiming={init:function(e){return h.initialized||(h.checkSupport()?h.subscribe():BOOMR.subscribe("page_ready",h.pageReady,null,h),h.initialized=!0),this},is_complete:function(){return!0},is_supported:function(){return h.initialized&&h.supported},addUserTiming:function(e){var n=h.getUserTimingMap();s(e)&&(Object.keys(e).forEach(function(r){var i,o=e[r];i=o,"[object Number]"===Object.prototype.toString.call(i)&&(o=[o]),n[r]?n[r].concat(o):n[r]=o}),n&&BOOMR.addVar("usertiming",JSON.stringify(n),!0))}}}if(!BOOMR.plugins.EventTiming){var f={click:0,dblclick:1,mousedown:2,mouseup:3,mousemove:4,touchstart:5,touchend:6,touchmove:7,keydown:8,keyup:9,keypress:10,wheel:11,pointerdown:12,pointerup:13,pointermove:14,compositionstart:17,compositionupdate:18,compositionend:19,contextmenu:20},m={initialized:!1,supported:null,observerEvent:null,observerFirstInput:null,entries:[],firstInputDelay:null,timeToFirstInteraction:null,onBeforeBeacon:function(){var e;if(m.entries&&m.entries.length){var n=[];for(e=0;e<m.entries.length;e++)n.push({n:f[m.entries[e].name]?f[m.entries[e].name]:m.entries[e].name,s:Math.round(m.entries[e].startTime).toString(36),d:Math.round(m.entries[e].duration).toString(36),p:Math.round(m.entries[e].processingEnd-m.entries[e].processingStart).toString(36),c:+!!m.entries[e].cancelable,fi:"first-input"===m.entries[e].entryType?1:void 0});BOOMR.addVar("et.e",BOOMR.utils.serializeForUrl(n),!0)}m.entries=[],null!==m.firstInputDelay&&(BOOMR.addVar("et.fid",Math.ceil(m.firstInputDelay),!0),m.firstInputDelay=null)},onEventTiming:function(e){m.entries=m.entries.concat(e.getEntries())},onFirstInput:function(e){var n=e.getEntries();m.entries=m.entries.concat(n),m.firstInputDelay=n[0].processingStart-n[0].startTime,m.timeToFirstInteraction=n[0].startTime}};BOOMR.plugins.EventTiming={init:function(){if(this.is_supported()||(m.initialized=!0),!m.initialized){BOOMR.subscribe("before_beacon",m.onBeforeBeacon,null,m);try{var e=BOOMR.window;m.observerEvent=new e.PerformanceObserver(m.onEventTiming),m.observerEvent.observe({type:["event"],buffered:!0}),m.observerFirstInput=new e.PerformanceObserver(m.onFirstInput),m.observerFirstInput.observe({type:["first-input"],buffered:!0})}catch(e){m.supported=!1}m.initialized=!0}return this},is_complete:function(){return!0},is_enabled:function(){return m.initialized&&this.is_supported()},is_supported:function(){if(null!==m.supported)return m.supported;var e=BOOMR.window;return m.supported=BOOMR.getPerformance()&&void 0!==e.PerformanceEventTiming&&"function"==typeof e.PerformanceObserver,m.supported&&BOOMR.info("This user agent supports EventTiming","et"),m.supported},stop:function(){m.observerEvent&&(m.observerEvent.disconnect(),m.observerEvent=null),m.observerFirstInput&&(m.observerFirstInput.disconnect(),m.observerFirstInput=null)},metrics:{count:function(){return m.entries.length},averageDuration:function(){if(0===m.entries.length)return 0;for(var e=0,n=0;n<m.entries.length;n++)e+=m.entries[n].duration;return e/m.entries.length},firstInputDelay:function(){return m.firstInputDelay},timeToFirstInteraction:function(){return m.timeToFirstInteraction}}}}},e.prototype.uninstall=function(){var e=this.BOOMR,n=e.plugins;e.disable(),Object.keys(n).forEach(function(e){n[e].disable&&n[e].disable()}),e.orig_XMLHttpRequest&&e.orig_XMLHttpRequest!==window.XMLHttpRequest&&(window.XMLHttpRequest=e.orig_XMLHttpRequest)},e.prototype.addUserTiming=function(e){var n=this.BOOMR;n&&n.plugins.UserTiming&&n.plugins.UserTiming.addUserTiming&&n.plugins.UserTiming.addUserTiming(e)},e}()},"../../node_modules/abort-signal-polyfill/dist/staticMethods/abort.js":function(e,n){"use strict";n.abortSignalAbort=function(e){let n=new AbortController;return n.abort(e),n.signal}},"../../node_modules/abort-signal-polyfill/dist/staticMethods/any.js":function(e,n){"use strict";n.abortSignalAny=function(e){if(0===e.length)return new AbortController().signal;if(1===e.length)return e[0];for(let n of e)if(n.aborted)return n;let n=new AbortController,r=Array(e.length),i=()=>{for(let e of r)e()};return e.forEach((e,o)=>{let s=()=>{n.abort(e.reason),i()};e.addEventListener("abort",s),r[o]=()=>e.removeEventListener("abort",s)}),n.signal}},"../../node_modules/abort-signal-polyfill/dist/staticMethods/timeout.js":function(e,n){"use strict";n.abortSignalTimeout=function(e){let n=new AbortController;return setTimeout(()=>{n.abort(new DOMException(`signal timed out after ${e} ms`,"TimeoutError"))},e),n.signal}},"../../node_modules/p-queue/node_modules/eventemitter3/index.js":function(e){"use strict";var n=Object.prototype.hasOwnProperty,r="~";function i(){}function o(e,n,r){this.fn=e,this.context=n,this.once=r||!1}function s(e,n,i,s,a){if("function"!=typeof i)throw TypeError("The listener must be a function");var c=new o(i,s||e,a),l=r?r+n:n;return e._events[l]?e._events[l].fn?e._events[l]=[e._events[l],c]:e._events[l].push(c):(e._events[l]=c,e._eventsCount++),e}function a(e,n){0==--e._eventsCount?e._events=new i:delete e._events[n]}function c(){this._events=new i,this._eventsCount=0}Object.create&&(i.prototype=Object.create(null),new i().__proto__||(r=!1)),c.prototype.eventNames=function(){var e,i,o=[];if(0===this._eventsCount)return o;for(i in e=this._events)n.call(e,i)&&o.push(r?i.slice(1):i);return Object.getOwnPropertySymbols?o.concat(Object.getOwnPropertySymbols(e)):o},c.prototype.listeners=function(e){var n=r?r+e:e,i=this._events[n];if(!i)return[];if(i.fn)return[i.fn];for(var o=0,s=i.length,a=Array(s);o<s;o++)a[o]=i[o].fn;return a},c.prototype.listenerCount=function(e){var n=r?r+e:e,i=this._events[n];return i?i.fn?1:i.length:0},c.prototype.emit=function(e,n,i,o,s,a){var c=r?r+e:e;if(!this._events[c])return!1;var l,u,d=this._events[c],p=arguments.length;if(d.fn){switch(d.once&&this.removeListener(e,d.fn,void 0,!0),p){case 1:return d.fn.call(d.context),!0;case 2:return d.fn.call(d.context,n),!0;case 3:return d.fn.call(d.context,n,i),!0;case 4:return d.fn.call(d.context,n,i,o),!0;case 5:return d.fn.call(d.context,n,i,o,s),!0;case 6:return d.fn.call(d.context,n,i,o,s,a),!0}for(u=1,l=Array(p-1);u<p;u++)l[u-1]=arguments[u];d.fn.apply(d.context,l)}else{var h,f=d.length;for(u=0;u<f;u++)switch(d[u].once&&this.removeListener(e,d[u].fn,void 0,!0),p){case 1:d[u].fn.call(d[u].context);break;case 2:d[u].fn.call(d[u].context,n);break;case 3:d[u].fn.call(d[u].context,n,i);break;case 4:d[u].fn.call(d[u].context,n,i,o);break;default:if(!l)for(h=1,l=Array(p-1);h<p;h++)l[h-1]=arguments[h];d[u].fn.apply(d[u].context,l)}}return!0},c.prototype.on=function(e,n,r){return s(this,e,n,r,!1)},c.prototype.once=function(e,n,r){return s(this,e,n,r,!0)},c.prototype.removeListener=function(e,n,i,o){var s=r?r+e:e;if(!this._events[s])return this;if(!n)return a(this,s),this;var c=this._events[s];if(c.fn)c.fn!==n||o&&!c.once||i&&c.context!==i||a(this,s);else{for(var l=0,u=[],d=c.length;l<d;l++)(c[l].fn!==n||o&&!c[l].once||i&&c[l].context!==i)&&u.push(c[l]);u.length?this._events[s]=1===u.length?u[0]:u:a(this,s)}return this},c.prototype.removeAllListeners=function(e){var n;return e?(n=r?r+e:e,this._events[n]&&a(this,n)):(this._events=new i,this._eventsCount=0),this},c.prototype.off=c.prototype.removeListener,c.prototype.addListener=c.prototype.on,c.prefixed=r,c.EventEmitter=c,e.exports=c},"../../node_modules/process/browser.js":function(e){var n,r,i,o=e.exports={};function s(){throw Error("setTimeout has not been defined")}function a(){throw Error("clearTimeout has not been defined")}try{n="function"==typeof setTimeout?setTimeout:s}catch(e){n=s}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(e){r=a}function c(e){if(n===setTimeout)return setTimeout(e,0);if((n===s||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(r){try{return n.call(null,e,0)}catch(r){return n.call(this,e,0)}}}var l=[],u=!1,d=-1;function p(){u&&i&&(u=!1,i.length?l=i.concat(l):d=-1,l.length&&h())}function h(){if(!u){var e=c(p);u=!0;for(var n=l.length;n;){for(i=l,l=[];++d<n;)i&&i[d].run();d=-1,n=l.length}i=null,u=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(n){try{return r.call(null,e)}catch(n){return r.call(this,e)}}}(e)}}function f(e,n){this.fun=e,this.array=n}function m(){}o.nextTick=function(e){var n=Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)n[r-1]=arguments[r];l.push(new f(e,n)),1!==l.length||u||c(h)},f.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=m,o.addListener=m,o.once=m,o.off=m,o.removeListener=m,o.removeAllListeners=m,o.emit=m,o.prependListener=m,o.prependOnceListener=m,o.listeners=function(e){return[]},o.binding=function(e){throw Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw Error("process.chdir is not supported")},o.umask=function(){return 0}},"../../node_modules/sdp/sdp.js":function(e){"use strict";let n={};n.generateIdentifier=function(){return Math.random().toString(36).substring(2,12)},n.localCName=n.generateIdentifier(),n.splitLines=function(e){return e.trim().split("\n").map(e=>e.trim())},n.splitSections=function(e){return e.split("\nm=").map((e,n)=>(n>0?"m="+e:e).trim()+"\r\n")},n.getDescription=function(e){let r=n.splitSections(e);return r&&r[0]},n.getMediaSections=function(e){let r=n.splitSections(e);return r.shift(),r},n.matchPrefix=function(e,r){return n.splitLines(e).filter(e=>0===e.indexOf(r))},n.parseCandidate=function(e){let n,r={foundation:(n=0===e.indexOf("a=candidate:")?e.substring(12).split(" "):e.substring(10).split(" "))[0],component:{1:"rtp",2:"rtcp"}[n[1]]||n[1],protocol:n[2].toLowerCase(),priority:parseInt(n[3],10),ip:n[4],address:n[4],port:parseInt(n[5],10),type:n[7]};for(let e=8;e<n.length;e+=2)switch(n[e]){case"raddr":r.relatedAddress=n[e+1];break;case"rport":r.relatedPort=parseInt(n[e+1],10);break;case"tcptype":r.tcpType=n[e+1];break;case"ufrag":r.ufrag=n[e+1],r.usernameFragment=n[e+1];break;default:void 0===r[n[e]]&&(r[n[e]]=n[e+1])}return r},n.writeCandidate=function(e){let n=[];n.push(e.foundation);let r=e.component;"rtp"===r?n.push(1):"rtcp"===r?n.push(2):n.push(r),n.push(e.protocol.toUpperCase()),n.push(e.priority),n.push(e.address||e.ip),n.push(e.port);let i=e.type;return n.push("typ"),n.push(i),"host"!==i&&e.relatedAddress&&e.relatedPort&&(n.push("raddr"),n.push(e.relatedAddress),n.push("rport"),n.push(e.relatedPort)),e.tcpType&&"tcp"===e.protocol.toLowerCase()&&(n.push("tcptype"),n.push(e.tcpType)),(e.usernameFragment||e.ufrag)&&(n.push("ufrag"),n.push(e.usernameFragment||e.ufrag)),"candidate:"+n.join(" ")},n.parseIceOptions=function(e){return e.substring(14).split(" ")},n.parseRtpMap=function(e){let n=e.substring(9).split(" "),r={payloadType:parseInt(n.shift(),10)};return r.name=(n=n[0].split("/"))[0],r.clockRate=parseInt(n[1],10),r.channels=3===n.length?parseInt(n[2],10):1,r.numChannels=r.channels,r},n.writeRtpMap=function(e){let n=e.payloadType;void 0!==e.preferredPayloadType&&(n=e.preferredPayloadType);let r=e.channels||e.numChannels||1;return"a=rtpmap:"+n+" "+e.name+"/"+e.clockRate+(1!==r?"/"+r:"")+"\r\n"},n.parseExtmap=function(e){let n=e.substring(9).split(" ");return{id:parseInt(n[0],10),direction:n[0].indexOf("/")>0?n[0].split("/")[1]:"sendrecv",uri:n[1],attributes:n.slice(2).join(" ")}},n.writeExtmap=function(e){return"a=extmap:"+(e.id||e.preferredId)+(e.direction&&"sendrecv"!==e.direction?"/"+e.direction:"")+" "+e.uri+(e.attributes?" "+e.attributes:"")+"\r\n"},n.parseFmtp=function(e){let n,r={},i=e.substring(e.indexOf(" ")+1).split(";");for(let e=0;e<i.length;e++)r[(n=i[e].trim().split("="))[0].trim()]=n[1];return r},n.writeFmtp=function(e){let n="",r=e.payloadType;if(void 0!==e.preferredPayloadType&&(r=e.preferredPayloadType),e.parameters&&Object.keys(e.parameters).length){let i=[];Object.keys(e.parameters).forEach(n=>{void 0!==e.parameters[n]?i.push(n+"="+e.parameters[n]):i.push(n)}),n+="a=fmtp:"+r+" "+i.join(";")+"\r\n"}return n},n.parseRtcpFb=function(e){let n=e.substring(e.indexOf(" ")+1).split(" ");return{type:n.shift(),parameter:n.join(" ")}},n.writeRtcpFb=function(e){let n="",r=e.payloadType;return void 0!==e.preferredPayloadType&&(r=e.preferredPayloadType),e.rtcpFeedback&&e.rtcpFeedback.length&&e.rtcpFeedback.forEach(e=>{n+="a=rtcp-fb:"+r+" "+e.type+(e.parameter&&e.parameter.length?" "+e.parameter:"")+"\r\n"}),n},n.parseSsrcMedia=function(e){let n=e.indexOf(" "),r={ssrc:parseInt(e.substring(7,n),10)},i=e.indexOf(":",n);return i>-1?(r.attribute=e.substring(n+1,i),r.value=e.substring(i+1)):r.attribute=e.substring(n+1),r},n.parseSsrcGroup=function(e){let n=e.substring(13).split(" ");return{semantics:n.shift(),ssrcs:n.map(e=>parseInt(e,10))}},n.getMid=function(e){let r=n.matchPrefix(e,"a=mid:")[0];if(r)return r.substring(6)},n.parseFingerprint=function(e){let n=e.substring(14).split(" ");return{algorithm:n[0].toLowerCase(),value:n[1].toUpperCase()}},n.getDtlsParameters=function(e,r){return{role:"auto",fingerprints:n.matchPrefix(e+r,"a=fingerprint:").map(n.parseFingerprint)}},n.writeDtlsParameters=function(e,n){let r="a=setup:"+n+"\r\n";return e.fingerprints.forEach(e=>{r+="a=fingerprint:"+e.algorithm+" "+e.value+"\r\n"}),r},n.parseCryptoLine=function(e){let n=e.substring(9).split(" ");return{tag:parseInt(n[0],10),cryptoSuite:n[1],keyParams:n[2],sessionParams:n.slice(3)}},n.writeCryptoLine=function(e){return"a=crypto:"+e.tag+" "+e.cryptoSuite+" "+("object"==typeof e.keyParams?n.writeCryptoKeyParams(e.keyParams):e.keyParams)+(e.sessionParams?" "+e.sessionParams.join(" "):"")+"\r\n"},n.parseCryptoKeyParams=function(e){if(0!==e.indexOf("inline:"))return null;let n=e.substring(7).split("|");return{keyMethod:"inline",keySalt:n[0],lifeTime:n[1],mkiValue:n[2]?n[2].split(":")[0]:void 0,mkiLength:n[2]?n[2].split(":")[1]:void 0}},n.writeCryptoKeyParams=function(e){return e.keyMethod+":"+e.keySalt+(e.lifeTime?"|"+e.lifeTime:"")+(e.mkiValue&&e.mkiLength?"|"+e.mkiValue+":"+e.mkiLength:"")},n.getCryptoParameters=function(e,r){return n.matchPrefix(e+r,"a=crypto:").map(n.parseCryptoLine)},n.getIceParameters=function(e,r){let i=n.matchPrefix(e+r,"a=ice-ufrag:")[0],o=n.matchPrefix(e+r,"a=ice-pwd:")[0];return i&&o?{usernameFragment:i.substring(12),password:o.substring(10)}:null},n.writeIceParameters=function(e){let n="a=ice-ufrag:"+e.usernameFragment+"\r\na=ice-pwd:"+e.password+"\r\n";return e.iceLite&&(n+="a=ice-lite\r\n"),n},n.parseRtpParameters=function(e){let r={codecs:[],headerExtensions:[],fecMechanisms:[],rtcp:[]},i=n.splitLines(e)[0].split(" ");r.profile=i[2];for(let o=3;o<i.length;o++){let s=i[o],a=n.matchPrefix(e,"a=rtpmap:"+s+" ")[0];if(a){let i=n.parseRtpMap(a),o=n.matchPrefix(e,"a=fmtp:"+s+" ");switch(i.parameters=o.length?n.parseFmtp(o[0]):{},i.rtcpFeedback=n.matchPrefix(e,"a=rtcp-fb:"+s+" ").map(n.parseRtcpFb),r.codecs.push(i),i.name.toUpperCase()){case"RED":case"ULPFEC":r.fecMechanisms.push(i.name.toUpperCase())}}}n.matchPrefix(e,"a=extmap:").forEach(e=>{r.headerExtensions.push(n.parseExtmap(e))});let o=n.matchPrefix(e,"a=rtcp-fb:* ").map(n.parseRtcpFb);return r.codecs.forEach(e=>{o.forEach(n=>{e.rtcpFeedback.find(e=>e.type===n.type&&e.parameter===n.parameter)||e.rtcpFeedback.push(n)})}),r},n.writeRtpDescription=function(e,r){let i="";i+="m="+e+" ",i+=r.codecs.length>0?"9":"0",i+=" "+(r.profile||"UDP/TLS/RTP/SAVPF")+" ",i+=r.codecs.map(e=>void 0!==e.preferredPayloadType?e.preferredPayloadType:e.payloadType).join(" ")+"\r\n",i+="c=IN IP4 0.0.0.0\r\n",i+="a=rtcp:9 IN IP4 0.0.0.0\r\n",r.codecs.forEach(e=>{i+=n.writeRtpMap(e),i+=n.writeFmtp(e),i+=n.writeRtcpFb(e)});let o=0;return r.codecs.forEach(e=>{e.maxptime>o&&(o=e.maxptime)}),o>0&&(i+="a=maxptime:"+o+"\r\n"),r.headerExtensions&&r.headerExtensions.forEach(e=>{i+=n.writeExtmap(e)}),i},n.parseRtpEncodingParameters=function(e){let r,i=[],o=n.parseRtpParameters(e),s=-1!==o.fecMechanisms.indexOf("RED"),a=-1!==o.fecMechanisms.indexOf("ULPFEC"),c=n.matchPrefix(e,"a=ssrc:").map(e=>n.parseSsrcMedia(e)).filter(e=>"cname"===e.attribute),l=c.length>0&&c[0].ssrc,u=n.matchPrefix(e,"a=ssrc-group:FID").map(e=>e.substring(17).split(" ").map(e=>parseInt(e,10)));u.length>0&&u[0].length>1&&u[0][0]===l&&(r=u[0][1]),o.codecs.forEach(e=>{if("RTX"===e.name.toUpperCase()&&e.parameters.apt){let n={ssrc:l,codecPayloadType:parseInt(e.parameters.apt,10)};l&&r&&(n.rtx={ssrc:r}),i.push(n),s&&((n=JSON.parse(JSON.stringify(n))).fec={ssrc:l,mechanism:a?"red+ulpfec":"red"},i.push(n))}}),0===i.length&&l&&i.push({ssrc:l});let d=n.matchPrefix(e,"b=");return d.length&&(d=0===d[0].indexOf("b=TIAS:")?parseInt(d[0].substring(7),10):0===d[0].indexOf("b=AS:")?1e3*parseInt(d[0].substring(5),10)*.95-16e3:void 0,i.forEach(e=>{e.maxBitrate=d})),i},n.parseRtcpParameters=function(e){let r={},i=n.matchPrefix(e,"a=ssrc:").map(e=>n.parseSsrcMedia(e)).filter(e=>"cname"===e.attribute)[0];i&&(r.cname=i.value,r.ssrc=i.ssrc);let o=n.matchPrefix(e,"a=rtcp-rsize");return r.reducedSize=o.length>0,r.compound=0===o.length,r.mux=n.matchPrefix(e,"a=rtcp-mux").length>0,r},n.writeRtcpParameters=function(e){let n="";return e.reducedSize&&(n+="a=rtcp-rsize\r\n"),e.mux&&(n+="a=rtcp-mux\r\n"),void 0!==e.ssrc&&e.cname&&(n+="a=ssrc:"+e.ssrc+" cname:"+e.cname+"\r\n"),n},n.parseMsid=function(e){let r,i=n.matchPrefix(e,"a=msid:");if(1===i.length)return{stream:(r=i[0].substring(7).split(" "))[0],track:r[1]};let o=n.matchPrefix(e,"a=ssrc:").map(e=>n.parseSsrcMedia(e)).filter(e=>"msid"===e.attribute);if(o.length>0)return{stream:(r=o[0].value.split(" "))[0],track:r[1]}},n.parseSctpDescription=function(e){let r,i=n.parseMLine(e),o=n.matchPrefix(e,"a=max-message-size:");o.length>0&&(r=parseInt(o[0].substring(19),10)),isNaN(r)&&(r=65536);let s=n.matchPrefix(e,"a=sctp-port:");if(s.length>0)return{port:parseInt(s[0].substring(12),10),protocol:i.fmt,maxMessageSize:r};let a=n.matchPrefix(e,"a=sctpmap:");if(a.length>0){let e=a[0].substring(10).split(" ");return{port:parseInt(e[0],10),protocol:e[1],maxMessageSize:r}}},n.writeSctpDescription=function(e,n){let r=[];return r="DTLS/SCTP"!==e.protocol?["m="+e.kind+" 9 "+e.protocol+" "+n.protocol+"\r\n","c=IN IP4 0.0.0.0\r\n","a=sctp-port:"+n.port+"\r\n"]:["m="+e.kind+" 9 "+e.protocol+" "+n.port+"\r\n","c=IN IP4 0.0.0.0\r\n","a=sctpmap:"+n.port+" "+n.protocol+" 65535\r\n"],void 0!==n.maxMessageSize&&r.push("a=max-message-size:"+n.maxMessageSize+"\r\n"),r.join("")},n.generateSessionId=function(){return Math.random().toString().substr(2,22)},n.writeSessionBoilerplate=function(e,r,i){return"v=0\r\no="+(i||"thisisadapterortc")+" "+(e||n.generateSessionId())+" "+(void 0!==r?r:2)+" IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\n"},n.getDirection=function(e,r){let i=n.splitLines(e);for(let e=0;e<i.length;e++)switch(i[e]){case"a=sendrecv":case"a=sendonly":case"a=recvonly":case"a=inactive":return i[e].substring(2)}return r?n.getDirection(r):"sendrecv"},n.getKind=function(e){return n.splitLines(e)[0].split(" ")[0].substring(2)},n.isRejected=function(e){return"0"===e.split(" ",2)[1]},n.parseMLine=function(e){let r=n.splitLines(e)[0].substring(2).split(" ");return{kind:r[0],port:parseInt(r[1],10),protocol:r[2],fmt:r.slice(3).join(" ")}},n.parseOLine=function(e){let r=n.matchPrefix(e,"o=")[0].substring(2).split(" ");return{username:r[0],sessionId:r[1],sessionVersion:parseInt(r[2],10),netType:r[3],addressType:r[4],address:r[5]}},n.isValidSDP=function(e){if("string"!=typeof e||0===e.length)return!1;let r=n.splitLines(e);for(let e=0;e<r.length;e++)if(r[e].length<2||"="!==r[e].charAt(1))return!1;return!0},e.exports=n},"../../node_modules/typewriter-effect/dist/core.js":function(e,n,r){var i,o=r("../../node_modules/process/browser.js");"undefined"!=typeof self&&self,e.exports=(()=>{var e={3146:(e,n,r)=>{for(var i=r(3491),o="undefined"==typeof window?r.g:window,s=["moz","webkit"],a="AnimationFrame",c=o["request"+a],l=o["cancel"+a]||o["cancelRequest"+a],u=0;!c&&u<s.length;u++)c=o[s[u]+"Request"+a],l=o[s[u]+"Cancel"+a]||o[s[u]+"CancelRequest"+a];if(!c||!l){var d=0,p=0,h=[],f=1e3/60;c=function(e){if(0===h.length){var n=i(),r=Math.max(0,f-(n-d));d=r+n,setTimeout(function(){var e=h.slice(0);h.length=0;for(var n=0;n<e.length;n++)if(!e[n].cancelled)try{e[n].callback(d)}catch(e){setTimeout(function(){throw e},0)}},Math.round(r))}return h.push({handle:++p,callback:e,cancelled:!1}),p},l=function(e){for(var n=0;n<h.length;n++)h[n].handle===e&&(h[n].cancelled=!0)}}e.exports=function(e){return c.call(o,e)},e.exports.cancel=function(){l.apply(o,arguments)},e.exports.polyfill=function(e){e||(e=o),e.requestAnimationFrame=c,e.cancelAnimationFrame=l}},3491:function(e){(function(){var n,r,i,s;"undefined"!=typeof performance&&null!==performance&&performance.now?e.exports=function(){return performance.now()}:null!=o&&o.hrtime?(e.exports=function(){return(n()-s)/1e6},r=o.hrtime,s=(n=function(){var e;return 1e9*(e=r())[0]+e[1]})()-1e9*o.uptime()):Date.now?(e.exports=function(){return Date.now()-i},i=Date.now()):(e.exports=function(){return(new Date).getTime()-i},i=(new Date).getTime())}).call(this)}},n={};function r(i){var o=n[i];if(void 0!==o)return o.exports;var s=n[i]={exports:{}};return e[i].call(s.exports,s,s.exports,r),s.exports}r.n=e=>{var n=e&&e.__esModule?()=>e.default:()=>e;return r.d(n,{a:n}),n},r.d=(e,n)=>{for(var i in n)r.o(n,i)&&!r.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:n[i]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,n)=>Object.prototype.hasOwnProperty.call(e,n);var i={};return(()=>{"use strict";r.d(i,{default:()=>T});var e=r(3146),n=r.n(e);let o=function(e){return new RegExp(/<[a-z][\s\S]*>/i).test(e)},s=function(e,n){return Math.floor(Math.random()*(n-e+1))+e};var a="TYPE_CHARACTER",c="REMOVE_CHARACTER",l="REMOVE_ALL",u="REMOVE_LAST_VISIBLE_NODE",d="PAUSE_FOR",p="CALL_FUNCTION",h="ADD_HTML_TAG_ELEMENT",f="CHANGE_DELETE_SPEED",m="CHANGE_DELAY",g="CHANGE_CURSOR",v="PASTE_STRING",y="HTML_TAG";function b(e){return(b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),r.push.apply(r,i)}return r}function w(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?_(Object(r),!0).forEach(function(n){S(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function O(e){return function(e){if(Array.isArray(e))return R(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,n){if(e){if("string"==typeof e)return R(e,void 0);var r=({}).toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?R(e,void 0):void 0}}(e)||function(){throw TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function R(e,n){(null==n||n>e.length)&&(n=e.length);for(var r=0,i=Array(n);r<n;r++)i[r]=e[r];return i}function S(e,n,r){return(n=E(n))in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function E(e){var n=function(e){if("object"!=b(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,"string");if("object"!=b(r))return r;throw TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==b(n)?n:n+""}let T=function(){var r;function i(r,b){var _=this;if(function(e,n){if(!(e instanceof n))throw TypeError("Cannot call a class as a function")}(this,i),S(this,"state",{cursorAnimation:null,lastFrameTime:null,pauseUntil:null,eventQueue:[],eventLoop:null,eventLoopPaused:!1,reverseCalledEvents:[],calledEvents:[],visibleNodes:[],initialOptions:null,elements:{container:null,wrapper:document.createElement("span"),cursor:document.createElement("span")}}),S(this,"options",{strings:null,cursor:"|",delay:"natural",pauseFor:1500,deleteSpeed:"natural",loop:!1,autoStart:!1,devMode:!1,skipAddStyles:!1,wrapperClassName:"Typewriter__wrapper",cursorClassName:"Typewriter__cursor",stringSplitter:null,onCreateTextNode:null,onRemoveNode:null}),S(this,"setupWrapperElement",function(){_.state.elements.container&&(_.state.elements.wrapper.className=_.options.wrapperClassName,_.state.elements.cursor.className=_.options.cursorClassName,_.state.elements.cursor.innerHTML=_.options.cursor,_.state.elements.container.innerHTML="",_.state.elements.container.appendChild(_.state.elements.wrapper),_.state.elements.container.appendChild(_.state.elements.cursor))}),S(this,"start",function(){return _.state.eventLoopPaused=!1,_.runEventLoop(),_}),S(this,"pause",function(){return _.state.eventLoopPaused=!0,_}),S(this,"stop",function(){return _.state.eventLoop&&((0,e.cancel)(_.state.eventLoop),_.state.eventLoop=null),_}),S(this,"pauseFor",function(e){return _.addEventToQueue(d,{ms:e}),_}),S(this,"typeOutAllStrings",function(){return"string"==typeof _.options.strings?_.typeString(_.options.strings).pauseFor(_.options.pauseFor):_.options.strings.forEach(function(e){_.typeString(e).pauseFor(_.options.pauseFor).deleteAll(_.options.deleteSpeed)}),_}),S(this,"typeString",function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(o(e))return _.typeOutHTMLString(e,n);if(e){var r=(_.options||{}).stringSplitter,i="function"==typeof r?r(e):e.split("");_.typeCharacters(i,n)}return _}),S(this,"pasteString",function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return o(e)?_.typeOutHTMLString(e,n,!0):(e&&_.addEventToQueue(v,{character:e,node:n}),_)}),S(this,"typeOutHTMLString",function(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,i=arguments.length>2?arguments[2]:void 0,o=((n=document.createElement("div")).innerHTML=e,n.childNodes);if(o.length>0)for(var s=0;s<o.length;s++){var a=o[s],c=a.innerHTML;a&&3!==a.nodeType?(a.innerHTML="",_.addEventToQueue(h,{node:a,parentNode:r}),i?_.pasteString(c,a):_.typeString(c,a)):a.textContent&&(i?_.pasteString(a.textContent,r):_.typeString(a.textContent,r))}return _}),S(this,"deleteAll",function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"natural";return _.addEventToQueue(l,{speed:e}),_}),S(this,"changeDeleteSpeed",function(e){if(!e)throw Error("Must provide new delete speed");return _.addEventToQueue(f,{speed:e}),_}),S(this,"changeDelay",function(e){if(!e)throw Error("Must provide new delay");return _.addEventToQueue(m,{delay:e}),_}),S(this,"changeCursor",function(e){if(!e)throw Error("Must provide new cursor");return _.addEventToQueue(g,{cursor:e}),_}),S(this,"deleteChars",function(e){if(!e)throw Error("Must provide amount of characters to delete");for(var n=0;n<e;n++)_.addEventToQueue(c);return _}),S(this,"callFunction",function(e,n){if(!e||"function"!=typeof e)throw Error("Callback must be a function");return _.addEventToQueue(p,{cb:e,thisArg:n}),_}),S(this,"typeCharacters",function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!e||!Array.isArray(e))throw Error("Characters must be an array");return e.forEach(function(e){_.addEventToQueue(a,{character:e,node:n})}),_}),S(this,"removeCharacters",function(e){if(!e||!Array.isArray(e))throw Error("Characters must be an array");return e.forEach(function(){_.addEventToQueue(c)}),_}),S(this,"addEventToQueue",function(e,n){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return _.addEventToStateProperty(e,n,r,"eventQueue")}),S(this,"addReverseCalledEvent",function(e,n){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return _.options.loop?_.addEventToStateProperty(e,n,r,"reverseCalledEvents"):_}),S(this,"addEventToStateProperty",function(e,n){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3?arguments[3]:void 0,o={eventName:e,eventArgs:n||{}};return _.state[i]=r?[o].concat(O(_.state[i])):[].concat(O(_.state[i]),[o]),_}),S(this,"runEventLoop",function(){_.state.lastFrameTime||(_.state.lastFrameTime=Date.now());var e=Date.now(),r=e-_.state.lastFrameTime;if(!_.state.eventQueue.length){if(!_.options.loop)return;_.state.eventQueue=O(_.state.calledEvents),_.state.calledEvents=[],_.options=w({},_.state.initialOptions)}if(_.state.eventLoop=n()(_.runEventLoop),!_.state.eventLoopPaused){if(_.state.pauseUntil){if(e<_.state.pauseUntil)return;_.state.pauseUntil=null}var i,o=O(_.state.eventQueue),b=o.shift();if(!(r<=(i=b.eventName===u||b.eventName===c?"natural"===_.options.deleteSpeed?s(40,80):_.options.deleteSpeed:"natural"===_.options.delay?s(120,160):_.options.delay))){var R=b.eventName,S=b.eventArgs;switch(_.logInDevMode({currentEvent:b,state:_.state,delay:i}),R){case v:case a:var E=S.character,T=S.node,M=document.createTextNode(E),x=M;_.options.onCreateTextNode&&"function"==typeof _.options.onCreateTextNode&&(x=_.options.onCreateTextNode(E,M)),x&&(T?T.appendChild(x):_.state.elements.wrapper.appendChild(x)),_.state.visibleNodes=[].concat(O(_.state.visibleNodes),[{type:"TEXT_NODE",character:E,node:x}]);break;case c:o.unshift({eventName:u,eventArgs:{removingCharacterNode:!0}});break;case d:var C=b.eventArgs.ms;_.state.pauseUntil=Date.now()+parseInt(C);break;case p:var I=b.eventArgs,j=I.cb,A=I.thisArg;j.call(A,{elements:_.state.elements});break;case h:var k=b.eventArgs,B=k.node,P=k.parentNode;P?P.appendChild(B):_.state.elements.wrapper.appendChild(B),_.state.visibleNodes=[].concat(O(_.state.visibleNodes),[{type:y,node:B,parentNode:P||_.state.elements.wrapper}]);break;case l:var N=_.state.visibleNodes,D=S.speed,L=[];D&&L.push({eventName:f,eventArgs:{speed:D,temp:!0}});for(var F=0,U=N.length;F<U;F++)L.push({eventName:u,eventArgs:{removingCharacterNode:!1}});D&&L.push({eventName:f,eventArgs:{speed:_.options.deleteSpeed,temp:!0}}),o.unshift.apply(o,L);break;case u:var q=b.eventArgs.removingCharacterNode;if(_.state.visibleNodes.length){var H=_.state.visibleNodes.pop(),V=H.type,X=H.node,W=H.character;_.options.onRemoveNode&&"function"==typeof _.options.onRemoveNode&&_.options.onRemoveNode({node:X,character:W}),X&&X.parentNode.removeChild(X),V===y&&q&&o.unshift({eventName:u,eventArgs:{}})}break;case f:_.options.deleteSpeed=b.eventArgs.speed;break;case m:_.options.delay=b.eventArgs.delay;break;case g:_.options.cursor=b.eventArgs.cursor,_.state.elements.cursor.innerHTML=b.eventArgs.cursor}_.options.loop&&(b.eventName===u||b.eventArgs&&b.eventArgs.temp||(_.state.calledEvents=[].concat(O(_.state.calledEvents),[b]))),_.state.eventQueue=o,_.state.lastFrameTime=e}}}),r)if("string"==typeof r){var R=document.querySelector(r);if(!R)throw Error("Could not find container element");this.state.elements.container=R}else this.state.elements.container=r;b&&(this.options=w(w({},this.options),b)),this.state.initialOptions=w({},this.options),this.init()}return r=[{key:"init",value:function(){var e;this.setupWrapperElement(),this.addEventToQueue(g,{cursor:this.options.cursor},!0),this.addEventToQueue(l,null,!0),!window||window.___TYPEWRITER_JS_STYLES_ADDED___||this.options.skipAddStyles||((e=document.createElement("style")).appendChild(document.createTextNode(".Typewriter__cursor{-webkit-animation:Typewriter-cursor 1s infinite;animation:Typewriter-cursor 1s infinite;margin-left:1px}@-webkit-keyframes Typewriter-cursor{0%{opacity:0}50%{opacity:1}100%{opacity:0}}@keyframes Typewriter-cursor{0%{opacity:0}50%{opacity:1}100%{opacity:0}}")),document.head.appendChild(e),window.___TYPEWRITER_JS_STYLES_ADDED___=!0),!0===this.options.autoStart&&this.options.strings&&this.typeOutAllStrings().start()}},{key:"logInDevMode",value:function(e){this.options.devMode&&console.log(e)}}],function(e,n){for(var r=0;r<n.length;r++){var i=n[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,E(i.key),i)}}(i.prototype,r),Object.defineProperty(i,"prototype",{writable:!1}),i}()})(),i.default})()},"../../node_modules/ua-parser-js/src/ua-parser.js":function(e,n){!function(r,i){"use strict";var o="function",s="undefined",a="object",c="string",l="major",u="model",d="name",p="type",h="vendor",f="version",m="architecture",g="console",v="mobile",y="tablet",b="smarttv",_="wearable",w="embedded",O="Amazon",R="Apple",S="ASUS",E="BlackBerry",T="Browser",M="Chrome",x="Firefox",C="Google",I="Huawei",j="Microsoft",A="Motorola",k="Opera",B="Samsung",P="Sharp",N="Sony",D="Xiaomi",L="Zebra",F="Facebook",U="Chromium OS",q="Mac OS",H=" Browser",V=function(e,n){var r={};for(var i in e)n[i]&&n[i].length%2==0?r[i]=n[i].concat(e[i]):r[i]=e[i];return r},X=function(e){for(var n={},r=0;r<e.length;r++)n[e[r].toUpperCase()]=e[r];return n},W=function(e,n){return typeof e===c&&-1!==$(n).indexOf($(e))},$=function(e){return e.toLowerCase()},z=function(e,n){if(typeof e===c)return e=e.replace(/^\s\s*/,""),typeof n===s?e:e.substring(0,500)},G=function(e,n){for(var r,s,c,l,u,d,p=0;p<n.length&&!u;){var h=n[p],f=n[p+1];for(r=s=0;r<h.length&&!u&&h[r];)if(u=h[r++].exec(e))for(c=0;c<f.length;c++)d=u[++s],typeof(l=f[c])===a&&l.length>0?2===l.length?typeof l[1]==o?this[l[0]]=l[1].call(this,d):this[l[0]]=l[1]:3===l.length?typeof l[1]!==o||l[1].exec&&l[1].test?this[l[0]]=d?d.replace(l[1],l[2]):void 0:this[l[0]]=d?l[1].call(this,d,l[2]):void 0:4===l.length&&(this[l[0]]=d?l[3].call(this,d.replace(l[1],l[2])):i):this[l]=d||i;p+=2}},K=function(e,n){for(var r in n)if(typeof n[r]===a&&n[r].length>0){for(var o=0;o<n[r].length;o++)if(W(n[r][o],e))return"?"===r?i:r}else if(W(n[r],e))return"?"===r?i:r;return n.hasOwnProperty("*")?n["*"]:e},Y={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2","8.1":"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},Q={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[f,[d,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[f,[d,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[d,f],[/opios[\/ ]+([\w\.]+)/i],[f,[d,k+" Mini"]],[/\bop(?:rg)?x\/([\w\.]+)/i],[f,[d,k+" GX"]],[/\bopr\/([\w\.]+)/i],[f,[d,k]],[/\bb[ai]*d(?:uhd|[ub]*[aekoprswx]{5,6})[\/ ]?([\w\.]+)/i],[f,[d,"Baidu"]],[/\b(?:mxbrowser|mxios|myie2)\/?([-\w\.]*)\b/i],[f,[d,"Maxthon"]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer|sleipnir)[\/ ]?([\w\.]*)/i,/(avant|iemobile|slim(?:browser|boat|jet))[\/ ]?([\d\.]*)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|ovibrowser|bolt|iron|vivaldi|iridium|phantomjs|bowser|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|duckduckgo|klar|helio|(?=comodo_)?dragon)\/([-\w\.]+)/i,/(heytap|ovi|115)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[d,f],[/quark(?:pc)?\/([-\w\.]+)/i],[f,[d,"Quark"]],[/\bddg\/([\w\.]+)/i],[f,[d,"DuckDuckGo"]],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[f,[d,"UC"+T]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i,/micromessenger\/([\w\.]+)/i],[f,[d,"WeChat"]],[/konqueror\/([\w\.]+)/i],[f,[d,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[f,[d,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[f,[d,"Yandex"]],[/slbrowser\/([\w\.]+)/i],[f,[d,"Smart Lenovo "+T]],[/(avast|avg)\/([\w\.]+)/i],[[d,/(.+)/,"$1 Secure "+T],f],[/\bfocus\/([\w\.]+)/i],[f,[d,x+" Focus"]],[/\bopt\/([\w\.]+)/i],[f,[d,k+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[f,[d,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[f,[d,"Dolphin"]],[/coast\/([\w\.]+)/i],[f,[d,k+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[f,[d,"MIUI"+H]],[/fxios\/([\w\.-]+)/i],[f,[d,x]],[/\bqihoobrowser\/?([\w\.]*)/i],[f,[d,"360"]],[/\b(qq)\/([\w\.]+)/i],[[d,/(.+)/,"$1Browser"],f],[/(oculus|sailfish|huawei|vivo|pico)browser\/([\w\.]+)/i],[[d,/(.+)/,"$1"+H],f],[/samsungbrowser\/([\w\.]+)/i],[f,[d,B+" Internet"]],[/metasr[\/ ]?([\d\.]+)/i],[f,[d,"Sogou Explorer"]],[/(sogou)mo\w+\/([\d\.]+)/i],[[d,"Sogou Mobile"],f],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|2345(?=browser|chrome|explorer))\w*[\/ ]?v?([\w\.]+)/i],[d,f],[/(lbbrowser|rekonq)/i,/\[(linkedin)app\]/i],[d],[/ome\/([\w\.]+) \w* ?(iron) saf/i,/ome\/([\w\.]+).+qihu (360)[es]e/i],[f,d],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[d,F],f],[/(Klarna)\/([\w\.]+)/i,/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(alipay)client\/([\w\.]+)/i,/(twitter)(?:and| f.+e\/([\w\.]+))/i,/(chromium|instagram|snapchat)[\/ ]([-\w\.]+)/i],[d,f],[/\bgsa\/([\w\.]+) .*safari\//i],[f,[d,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[f,[d,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[f,[d,M+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[d,M+" WebView"],f],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[f,[d,"Android "+T]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[d,f],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[f,[d,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[f,d],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[d,[f,K,{"1.0":"/8","1.2":"/1","1.3":"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}]],[/(webkit|khtml)\/([\w\.]+)/i],[d,f],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[d,"Netscape"],f],[/(wolvic|librewolf)\/([\w\.]+)/i],[d,f],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[f,[d,x+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i],[d,[f,/_/g,"."]],[/(cobalt)\/([\w\.]+)/i],[d,[f,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[m,"amd64"]],[/(ia32(?=;))/i],[[m,$]],[/((?:i[346]|x)86)[;\)]/i],[[m,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[m,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[m,"armhf"]],[/windows (ce|mobile); ppc;/i],[[m,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[m,/ower/,"",$]],[/(sun4\w)[;\)]/i],[[m,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[m,$]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[u,[h,B],[p,y]],[/\b((?:s[cgp]h|gt|sm)-(?![lr])\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]((?!sm-[lr])[-\w]+)/i,/sec-(sgh\w+)/i],[u,[h,B],[p,v]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[u,[h,R],[p,v]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[u,[h,R],[p,y]],[/(macintosh);/i],[u,[h,R]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[u,[h,P],[p,v]],[/(?:honor)([-\w ]+)[;\)]/i],[u,[h,"Honor"],[p,v]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[u,[h,I],[p,y]],[/(?:huawei)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[u,[h,I],[p,v]],[/\b(poco[\w ]+|m2\d{3}j\d\d[a-z]{2})(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/oid[^\)]+; (m?[12][0-389][01]\w{3,6}[c-y])( bui|; wv|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite|pro)?)(?: bui|\))/i],[[u,/_/g," "],[h,D],[p,v]],[/oid[^\)]+; (2\d{4}(283|rpbf)[cgl])( bui|\))/i,/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[u,/_/g," "],[h,D],[p,y]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[u,[h,"OPPO"],[p,v]],[/\b(opd2\d{3}a?) bui/i],[u,[h,"OPPO"],[p,y]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[u,[h,"Vivo"],[p,v]],[/\b(rmx[1-3]\d{3})(?: bui|;|\))/i],[u,[h,"Realme"],[p,v]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[u,[h,A],[p,v]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[u,[h,A],[p,y]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[u,[h,"LG"],[p,y]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[u,[h,"LG"],[p,v]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[u,[h,"Lenovo"],[p,y]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[u,/_/g," "],[h,"Nokia"],[p,v]],[/(pixel c)\b/i],[u,[h,C],[p,y]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[u,[h,C],[p,v]],[/droid.+; (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[u,[h,N],[p,v]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[u,"Xperia Tablet"],[h,N],[p,y]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[u,[h,"OnePlus"],[p,v]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo(?!bc)\w\w)( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[u,[h,O],[p,y]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[u,/(.+)/g,"Fire Phone $1"],[h,O],[p,v]],[/(playbook);[-\w\),; ]+(rim)/i],[u,h,[p,y]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[u,[h,E],[p,v]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[u,[h,S],[p,y]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[u,[h,S],[p,v]],[/(nexus 9)/i],[u,[h,"HTC"],[p,y]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[h,[u,/_/g," "],[p,v]],[/droid [\w\.]+; ((?:8[14]9[16]|9(?:0(?:48|60|8[01])|1(?:3[27]|66)|2(?:6[69]|9[56])|466))[gqswx])\w*(\)| bui)/i],[u,[h,"TCL"],[p,y]],[/(itel) ((\w+))/i],[[h,$],u,[p,K,{tablet:["p10001l","w7001"],"*":"mobile"}]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[u,[h,"Acer"],[p,y]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[u,[h,"Meizu"],[p,v]],[/; ((?:power )?armor(?:[\w ]{0,8}))(?: bui|\))/i],[u,[h,"Ulefone"],[p,v]],[/; (energy ?\w+)(?: bui|\))/i,/; energizer ([\w ]+)(?: bui|\))/i],[u,[h,"Energizer"],[p,v]],[/; cat (b35);/i,/; (b15q?|s22 flip|s48c|s62 pro)(?: bui|\))/i],[u,[h,"Cat"],[p,v]],[/((?:new )?andromax[\w- ]+)(?: bui|\))/i],[u,[h,"Smartfren"],[p,v]],[/droid.+; (a(?:015|06[35]|142p?))/i],[u,[h,"Nothing"],[p,v]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron|infinix|tecno|micromax|advan)[-_ ]?([-\w]*)/i,/; (imo) ((?!tab)[\w ]+?)(?: bui|\))/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[h,u,[p,v]],[/(imo) (tab \w+)/i,/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[h,u,[p,y]],[/(surface duo)/i],[u,[h,j],[p,y]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[u,[h,"Fairphone"],[p,v]],[/(u304aa)/i],[u,[h,"AT&T"],[p,v]],[/\bsie-(\w*)/i],[u,[h,"Siemens"],[p,v]],[/\b(rct\w+) b/i],[u,[h,"RCA"],[p,y]],[/\b(venue[\d ]{2,7}) b/i],[u,[h,"Dell"],[p,y]],[/\b(q(?:mv|ta)\w+) b/i],[u,[h,"Verizon"],[p,y]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[u,[h,"Barnes & Noble"],[p,y]],[/\b(tm\d{3}\w+) b/i],[u,[h,"NuVision"],[p,y]],[/\b(k88) b/i],[u,[h,"ZTE"],[p,y]],[/\b(nx\d{3}j) b/i],[u,[h,"ZTE"],[p,v]],[/\b(gen\d{3}) b.+49h/i],[u,[h,"Swiss"],[p,v]],[/\b(zur\d{3}) b/i],[u,[h,"Swiss"],[p,y]],[/\b((zeki)?tb.*\b) b/i],[u,[h,"Zeki"],[p,y]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[h,"Dragon Touch"],u,[p,y]],[/\b(ns-?\w{0,9}) b/i],[u,[h,"Insignia"],[p,y]],[/\b((nxa|next)-?\w{0,9}) b/i],[u,[h,"NextBook"],[p,y]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[h,"Voice"],u,[p,v]],[/\b(lvtel\-)?(v1[12]) b/i],[[h,"LvTel"],u,[p,v]],[/\b(ph-1) /i],[u,[h,"Essential"],[p,v]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[u,[h,"Envizen"],[p,y]],[/\b(trio[-\w\. ]+) b/i],[u,[h,"MachSpeed"],[p,y]],[/\btu_(1491) b/i],[u,[h,"Rotor"],[p,y]],[/(shield[\w ]+) b/i],[u,[h,"Nvidia"],[p,y]],[/(sprint) (\w+)/i],[h,u,[p,v]],[/(kin\.[onetw]{3})/i],[[u,/\./g," "],[h,j],[p,v]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[u,[h,L],[p,y]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[u,[h,L],[p,v]],[/smart-tv.+(samsung)/i],[h,[p,b]],[/hbbtv.+maple;(\d+)/i],[[u,/^/,"SmartTV"],[h,B],[p,b]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[h,"LG"],[p,b]],[/(apple) ?tv/i],[h,[u,R+" TV"],[p,b]],[/crkey/i],[[u,M+"cast"],[h,C],[p,b]],[/droid.+aft(\w+)( bui|\))/i],[u,[h,O],[p,b]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[u,[h,P],[p,b]],[/(bravia[\w ]+)( bui|\))/i],[u,[h,N],[p,b]],[/(mitv-\w{5}) bui/i],[u,[h,D],[p,b]],[/Hbbtv.*(technisat) (.*);/i],[h,u,[p,b]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[h,z],[u,z],[p,b]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[p,b]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[h,u,[p,g]],[/droid.+; (shield) bui/i],[u,[h,"Nvidia"],[p,g]],[/(playstation [345portablevi]+)/i],[u,[h,N],[p,g]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[u,[h,j],[p,g]],[/\b(sm-[lr]\d\d[05][fnuw]?s?)\b/i],[u,[h,B],[p,_]],[/((pebble))app/i],[h,u,[p,_]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[u,[h,R],[p,_]],[/droid.+; (glass) \d/i],[u,[h,C],[p,_]],[/droid.+; (wt63?0{2,3})\)/i],[u,[h,L],[p,_]],[/droid.+; (glass) \d/i],[u,[h,C],[p,_]],[/(pico) (4|neo3(?: link|pro)?)/i],[h,u,[p,_]],[/; (quest( \d| pro)?)/i],[u,[h,F],[p,_]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[h,[p,w]],[/(aeobc)\b/i],[u,[h,O],[p,w]],[/droid .+?; ([^;]+?)(?: bui|; wv\)|\) applew).+? mobile safari/i],[u,[p,v]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[u,[p,y]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[p,y]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[p,v]],[/(android[-\w\. ]{0,9});.+buil/i],[u,[h,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[f,[d,"EdgeHTML"]],[/(arkweb)\/([\w\.]+)/i],[d,f],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[f,[d,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna|servo)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[d,f],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[f,d]],os:[[/microsoft (windows) (vista|xp)/i],[d,f],[/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i],[d,[f,K,Y]],[/windows nt 6\.2; (arm)/i,/windows[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i,/(?:win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[f,K,Y],[d,"Windows"]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/(?:ios;fbsv\/|iphone.+ios[\/ ])([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[f,/_/g,"."],[d,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[d,q],[f,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[f,d],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish|openharmony)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[d,f],[/\(bb(10);/i],[f,[d,E]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[f,[d,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[f,[d,x+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[f,[d,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[f,[d,"watchOS"]],[/crkey\/([\d\.]+)/i],[f,[d,M+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[d,U],f],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[d,f],[/(sunos) ?([\w\.\d]*)/i],[[d,"Solaris"],f],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[d,f]]},J=function(e,n){if(typeof e===a&&(n=e,e=i),!(this instanceof J))return new J(e,n).getResult();var g=typeof r!==s&&r.navigator?r.navigator:i,b=e||(g&&g.userAgent?g.userAgent:""),_=g&&g.userAgentData?g.userAgentData:i,w=n?V(Q,n):Q,O=g&&g.userAgent==b;return this.getBrowser=function(){var e,n={};return n[d]=i,n[f]=i,G.call(n,b,w.browser),n[l]=typeof(e=n[f])===c?e.replace(/[^\d\.]/g,"").split(".")[0]:i,O&&g&&g.brave&&typeof g.brave.isBrave==o&&(n[d]="Brave"),n},this.getCPU=function(){var e={};return e[m]=i,G.call(e,b,w.cpu),e},this.getDevice=function(){var e={};return e[h]=i,e[u]=i,e[p]=i,G.call(e,b,w.device),O&&!e[p]&&_&&_.mobile&&(e[p]=v),O&&"Macintosh"==e[u]&&g&&typeof g.standalone!==s&&g.maxTouchPoints&&g.maxTouchPoints>2&&(e[u]="iPad",e[p]=y),e},this.getEngine=function(){var e={};return e[d]=i,e[f]=i,G.call(e,b,w.engine),e},this.getOS=function(){var e={};return e[d]=i,e[f]=i,G.call(e,b,w.os),O&&!e[d]&&_&&_.platform&&"Unknown"!=_.platform&&(e[d]=_.platform.replace(/chrome os/i,U).replace(/macos/i,q)),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return b},this.setUA=function(e){return b=typeof e===c&&e.length>500?z(e,500):e,this},this.setUA(b),this};J.VERSION="1.0.40",J.BROWSER=X([d,f,l]),J.CPU=X([m]),J.DEVICE=X([u,h,p,g,v,b,y,_,w]),J.ENGINE=J.OS=X([d,f]),typeof n!==s?(e.exports&&(n=e.exports=J),n.UAParser=J):typeof define===o&&define.amd?define(function(){return J}):typeof r!==s&&(r.UAParser=J);var Z=typeof r!==s&&(r.jQuery||r.Zepto);if(Z&&!Z.ua){var ee=new J;Z.ua=ee.getResult(),Z.ua.get=function(){return ee.getUA()},Z.ua.set=function(e){ee.setUA(e);var n=ee.getResult();for(var r in n)Z.ua[r]=n[r]}}}("object"==typeof window?window:this)},"../../node_modules/core-js/internals/a-callable.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/is-callable.js"),o=r("../../node_modules/core-js/internals/try-to-string.js"),s=TypeError;e.exports=function(e){if(i(e))return e;throw new s(o(e)+" is not a function")}},"../../node_modules/core-js/internals/a-possible-prototype.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/is-possible-prototype.js"),o=String,s=TypeError;e.exports=function(e){if(i(e))return e;throw new s("Can't set "+o(e)+" as a prototype")}},"../../node_modules/core-js/internals/add-to-unscopables.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/well-known-symbol.js"),o=r("../../node_modules/core-js/internals/object-create.js"),s=r("../../node_modules/core-js/internals/object-define-property.js").f,a=i("unscopables"),c=Array.prototype;void 0===c[a]&&s(c,a,{configurable:!0,value:o(null)}),e.exports=function(e){c[a][e]=!0}},"../../node_modules/core-js/internals/an-object.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/is-object.js"),o=String,s=TypeError;e.exports=function(e){if(i(e))return e;throw new s(o(e)+" is not an object")}},"../../node_modules/core-js/internals/array-buffer-basic-detection.js":function(e){"use strict";e.exports="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView},"../../node_modules/core-js/internals/array-buffer-view-core.js":function(e,n,r){"use strict";var i,o,s,a=r("../../node_modules/core-js/internals/array-buffer-basic-detection.js"),c=r("../../node_modules/core-js/internals/descriptors.js"),l=r("../../node_modules/core-js/internals/global-this.js"),u=r("../../node_modules/core-js/internals/is-callable.js"),d=r("../../node_modules/core-js/internals/is-object.js"),p=r("../../node_modules/core-js/internals/has-own-property.js"),h=r("../../node_modules/core-js/internals/classof.js"),f=r("../../node_modules/core-js/internals/try-to-string.js"),m=r("../../node_modules/core-js/internals/create-non-enumerable-property.js"),g=r("../../node_modules/core-js/internals/define-built-in.js"),v=r("../../node_modules/core-js/internals/define-built-in-accessor.js"),y=r("../../node_modules/core-js/internals/object-is-prototype-of.js"),b=r("../../node_modules/core-js/internals/object-get-prototype-of.js"),_=r("../../node_modules/core-js/internals/object-set-prototype-of.js"),w=r("../../node_modules/core-js/internals/well-known-symbol.js"),O=r("../../node_modules/core-js/internals/uid.js"),R=r("../../node_modules/core-js/internals/internal-state.js"),S=R.enforce,E=R.get,T=l.Int8Array,M=T&&T.prototype,x=l.Uint8ClampedArray,C=x&&x.prototype,I=T&&b(T),j=M&&b(M),A=Object.prototype,k=l.TypeError,B=w("toStringTag"),P=O("TYPED_ARRAY_TAG"),N="TypedArrayConstructor",D=a&&!!_&&"Opera"!==h(l.opera),L=!1,F={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},U={BigInt64Array:8,BigUint64Array:8},q=function(e){var n=b(e);if(d(n)){var r=E(n);return r&&p(r,N)?r[N]:q(n)}},H=function(e){if(!d(e))return!1;var n=h(e);return p(F,n)||p(U,n)};for(i in F)(s=(o=l[i])&&o.prototype)?S(s)[N]=o:D=!1;for(i in U)(s=(o=l[i])&&o.prototype)&&(S(s)[N]=o);if((!D||!u(I)||I===Function.prototype)&&(I=function(){throw new k("Incorrect invocation")},D))for(i in F)l[i]&&_(l[i],I);if((!D||!j||j===A)&&(j=I.prototype,D))for(i in F)l[i]&&_(l[i].prototype,j);if(D&&b(C)!==j&&_(C,j),c&&!p(j,B))for(i in L=!0,v(j,B,{configurable:!0,get:function(){return d(this)?this[P]:void 0}}),F)l[i]&&m(l[i],P,i);e.exports={NATIVE_ARRAY_BUFFER_VIEWS:D,TYPED_ARRAY_TAG:L&&P,aTypedArray:function(e){if(H(e))return e;throw new k("Target is not a typed array")},aTypedArrayConstructor:function(e){if(u(e)&&(!_||y(I,e)))return e;throw new k(f(e)+" is not a typed array constructor")},exportTypedArrayMethod:function(e,n,r,i){if(c){if(r)for(var o in F){var s=l[o];if(s&&p(s.prototype,e))try{delete s.prototype[e]}catch(r){try{s.prototype[e]=n}catch(e){}}}(!j[e]||r)&&g(j,e,r?n:D&&M[e]||n,i)}},exportTypedArrayStaticMethod:function(e,n,r){var i,o;if(c){if(_){if(r){for(i in F)if((o=l[i])&&p(o,e))try{delete o[e]}catch(e){}}if(I[e]&&!r)return;try{return g(I,e,r?n:D&&I[e]||n)}catch(e){}}for(i in F)(o=l[i])&&(!o[e]||r)&&g(o,e,n)}},getTypedArrayConstructor:q,isView:function(e){if(!d(e))return!1;var n=h(e);return"DataView"===n||p(F,n)||p(U,n)},isTypedArray:H,TypedArray:I,TypedArrayPrototype:j}},"../../node_modules/core-js/internals/array-includes.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/to-indexed-object.js"),o=r("../../node_modules/core-js/internals/to-absolute-index.js"),s=r("../../node_modules/core-js/internals/length-of-array-like.js"),a=function(e){return function(n,r,a){var c,l=i(n),u=s(l);if(0===u)return!e&&-1;var d=o(a,u);if(e&&r!=r){for(;u>d;)if((c=l[d++])!=c)return!0}else for(;u>d;d++)if((e||d in l)&&l[d]===r)return e||d||0;return!e&&-1}};e.exports={includes:a(!0),indexOf:a(!1)}},"../../node_modules/core-js/internals/array-method-is-strict.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/fails.js");e.exports=function(e,n){var r=[][e];return!!r&&i(function(){r.call(null,n||function(){return 1},1)})}},"../../node_modules/core-js/internals/array-reduce.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/a-callable.js"),o=r("../../node_modules/core-js/internals/to-object.js"),s=r("../../node_modules/core-js/internals/indexed-object.js"),a=r("../../node_modules/core-js/internals/length-of-array-like.js"),c=TypeError,l="Reduce of empty array with no initial value",u=function(e){return function(n,r,u,d){var p=o(n),h=s(p),f=a(p);if(i(r),0===f&&u<2)throw new c(l);var m=e?f-1:0,g=e?-1:1;if(u<2)for(;;){if(m in h){d=h[m],m+=g;break}if(m+=g,e?m<0:f<=m)throw new c(l)}for(;e?m>=0:f>m;m+=g)m in h&&(d=r(d,h[m],m,p));return d}};e.exports={left:u(!1),right:u(!0)}},"../../node_modules/core-js/internals/classof-raw.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/function-uncurry-this.js"),o=i({}.toString),s=i("".slice);e.exports=function(e){return s(o(e),8,-1)}},"../../node_modules/core-js/internals/classof.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/to-string-tag-support.js"),o=r("../../node_modules/core-js/internals/is-callable.js"),s=r("../../node_modules/core-js/internals/classof-raw.js"),a=r("../../node_modules/core-js/internals/well-known-symbol.js")("toStringTag"),c=Object,l="Arguments"===s(function(){return arguments}()),u=function(e,n){try{return e[n]}catch(e){}};e.exports=i?s:function(e){var n,r,i;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=u(n=c(e),a))?r:l?s(n):"Object"===(i=s(n))&&o(n.callee)?"Arguments":i}},"../../node_modules/core-js/internals/copy-constructor-properties.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/has-own-property.js"),o=r("../../node_modules/core-js/internals/own-keys.js"),s=r("../../node_modules/core-js/internals/object-get-own-property-descriptor.js"),a=r("../../node_modules/core-js/internals/object-define-property.js");e.exports=function(e,n,r){for(var c=o(n),l=a.f,u=s.f,d=0;d<c.length;d++){var p=c[d];i(e,p)||r&&i(r,p)||l(e,p,u(n,p))}}},"../../node_modules/core-js/internals/correct-prototype-getter.js":function(e,n,r){"use strict";e.exports=!r("../../node_modules/core-js/internals/fails.js")(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})},"../../node_modules/core-js/internals/create-non-enumerable-property.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/descriptors.js"),o=r("../../node_modules/core-js/internals/object-define-property.js"),s=r("../../node_modules/core-js/internals/create-property-descriptor.js");e.exports=i?function(e,n,r){return o.f(e,n,s(1,r))}:function(e,n,r){return e[n]=r,e}},"../../node_modules/core-js/internals/create-property-descriptor.js":function(e){"use strict";e.exports=function(e,n){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:n}}},"../../node_modules/core-js/internals/define-built-in-accessor.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/make-built-in.js"),o=r("../../node_modules/core-js/internals/object-define-property.js");e.exports=function(e,n,r){return r.get&&i(r.get,n,{getter:!0}),r.set&&i(r.set,n,{setter:!0}),o.f(e,n,r)}},"../../node_modules/core-js/internals/define-built-in.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/is-callable.js"),o=r("../../node_modules/core-js/internals/object-define-property.js"),s=r("../../node_modules/core-js/internals/make-built-in.js"),a=r("../../node_modules/core-js/internals/define-global-property.js");e.exports=function(e,n,r,c){c||(c={});var l=c.enumerable,u=void 0!==c.name?c.name:n;if(i(r)&&s(r,u,c),c.global)l?e[n]=r:a(n,r);else{try{c.unsafe?e[n]&&(l=!0):delete e[n]}catch(e){}l?e[n]=r:o.f(e,n,{value:r,enumerable:!1,configurable:!c.nonConfigurable,writable:!c.nonWritable})}return e}},"../../node_modules/core-js/internals/define-global-property.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/global-this.js"),o=Object.defineProperty;e.exports=function(e,n){try{o(i,e,{value:n,configurable:!0,writable:!0})}catch(r){i[e]=n}return n}},"../../node_modules/core-js/internals/descriptors.js":function(e,n,r){"use strict";e.exports=!r("../../node_modules/core-js/internals/fails.js")(function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})},"../../node_modules/core-js/internals/document-create-element.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/global-this.js"),o=r("../../node_modules/core-js/internals/is-object.js"),s=i.document,a=o(s)&&o(s.createElement);e.exports=function(e){return a?s.createElement(e):{}}},"../../node_modules/core-js/internals/enum-bug-keys.js":function(e){"use strict";e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},"../../node_modules/core-js/internals/environment-is-node.js":function(e,n,r){"use strict";e.exports="NODE"===r("../../node_modules/core-js/internals/environment.js")},"../../node_modules/core-js/internals/environment-user-agent.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/global-this.js").navigator,o=i&&i.userAgent;e.exports=o?String(o):""},"../../node_modules/core-js/internals/environment-v8-version.js":function(e,n,r){"use strict";var i,o,s=r("../../node_modules/core-js/internals/global-this.js"),a=r("../../node_modules/core-js/internals/environment-user-agent.js"),c=s.process,l=s.Deno,u=c&&c.versions||l&&l.version,d=u&&u.v8;d&&(o=(i=d.split("."))[0]>0&&i[0]<4?1:+(i[0]+i[1])),!o&&a&&(!(i=a.match(/Edge\/(\d+)/))||i[1]>=74)&&(i=a.match(/Chrome\/(\d+)/))&&(o=+i[1]),e.exports=o},"../../node_modules/core-js/internals/environment.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/global-this.js"),o=r("../../node_modules/core-js/internals/environment-user-agent.js"),s=r("../../node_modules/core-js/internals/classof-raw.js"),a=function(e){return o.slice(0,e.length)===e};e.exports=a("Bun/")?"BUN":a("Cloudflare-Workers")?"CLOUDFLARE":a("Deno/")?"DENO":a("Node.js/")?"NODE":i.Bun&&"string"==typeof Bun.version?"BUN":i.Deno&&"object"==typeof Deno.version?"DENO":"process"===s(i.process)?"NODE":i.window&&i.document?"BROWSER":"REST"},"../../node_modules/core-js/internals/export.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/global-this.js"),o=r("../../node_modules/core-js/internals/object-get-own-property-descriptor.js").f,s=r("../../node_modules/core-js/internals/create-non-enumerable-property.js"),a=r("../../node_modules/core-js/internals/define-built-in.js"),c=r("../../node_modules/core-js/internals/define-global-property.js"),l=r("../../node_modules/core-js/internals/copy-constructor-properties.js"),u=r("../../node_modules/core-js/internals/is-forced.js");e.exports=function(e,n){var r,d,p,h,f,m=e.target,g=e.global,v=e.stat;if(r=g?i:v?i[m]||c(m,{}):i[m]&&i[m].prototype)for(d in n){if(h=n[d],p=e.dontCallGetSet?(f=o(r,d))&&f.value:r[d],!u(g?d:m+(v?".":"#")+d,e.forced)&&void 0!==p){if(typeof h==typeof p)continue;l(h,p)}(e.sham||p&&p.sham)&&s(h,"sham",!0),a(r,d,h,e)}}},"../../node_modules/core-js/internals/fails.js":function(e){"use strict";e.exports=function(e){try{return!!e()}catch(e){return!0}}},"../../node_modules/core-js/internals/function-bind-native.js":function(e,n,r){"use strict";e.exports=!r("../../node_modules/core-js/internals/fails.js")(function(){var e=(function(){}).bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})},"../../node_modules/core-js/internals/function-call.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/function-bind-native.js"),o=Function.prototype.call;e.exports=i?o.bind(o):function(){return o.apply(o,arguments)}},"../../node_modules/core-js/internals/function-name.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/descriptors.js"),o=r("../../node_modules/core-js/internals/has-own-property.js"),s=Function.prototype,a=i&&Object.getOwnPropertyDescriptor,c=o(s,"name"),l=c&&(!i||i&&a(s,"name").configurable);e.exports={EXISTS:c,PROPER:c&&"something"===(function(){}).name,CONFIGURABLE:l}},"../../node_modules/core-js/internals/function-uncurry-this-accessor.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/function-uncurry-this.js"),o=r("../../node_modules/core-js/internals/a-callable.js");e.exports=function(e,n,r){try{return i(o(Object.getOwnPropertyDescriptor(e,n)[r]))}catch(e){}}},"../../node_modules/core-js/internals/function-uncurry-this.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/function-bind-native.js"),o=Function.prototype,s=o.call,a=i&&o.bind.bind(s,s);e.exports=i?a:function(e){return function(){return s.apply(e,arguments)}}},"../../node_modules/core-js/internals/get-built-in.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/global-this.js"),o=r("../../node_modules/core-js/internals/is-callable.js");e.exports=function(e,n){var r;return arguments.length<2?o(r=i[e])?r:void 0:i[e]&&i[e][n]}},"../../node_modules/core-js/internals/get-method.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/a-callable.js"),o=r("../../node_modules/core-js/internals/is-null-or-undefined.js");e.exports=function(e,n){var r=e[n];return o(r)?void 0:i(r)}},"../../node_modules/core-js/internals/global-this.js":function(e,n,r){"use strict";var i=function(e){return e&&e.Math===Math&&e};e.exports=i("object"==typeof globalThis&&globalThis)||i("object"==typeof window&&window)||i("object"==typeof self&&self)||i("object"==typeof r.g&&r.g)||i("object"==typeof this&&this)||function(){return this}()||Function("return this")()},"../../node_modules/core-js/internals/has-own-property.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/function-uncurry-this.js"),o=r("../../node_modules/core-js/internals/to-object.js"),s=i({}.hasOwnProperty);e.exports=Object.hasOwn||function(e,n){return s(o(e),n)}},"../../node_modules/core-js/internals/hidden-keys.js":function(e){"use strict";e.exports={}},"../../node_modules/core-js/internals/html.js":function(e,n,r){"use strict";e.exports=r("../../node_modules/core-js/internals/get-built-in.js")("document","documentElement")},"../../node_modules/core-js/internals/ie8-dom-define.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/descriptors.js"),o=r("../../node_modules/core-js/internals/fails.js"),s=r("../../node_modules/core-js/internals/document-create-element.js");e.exports=!i&&!o(function(){return 7!==Object.defineProperty(s("div"),"a",{get:function(){return 7}}).a})},"../../node_modules/core-js/internals/indexed-object.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/function-uncurry-this.js"),o=r("../../node_modules/core-js/internals/fails.js"),s=r("../../node_modules/core-js/internals/classof-raw.js"),a=Object,c=i("".split);e.exports=o(function(){return!a("z").propertyIsEnumerable(0)})?function(e){return"String"===s(e)?c(e,""):a(e)}:a},"../../node_modules/core-js/internals/inspect-source.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/function-uncurry-this.js"),o=r("../../node_modules/core-js/internals/is-callable.js"),s=r("../../node_modules/core-js/internals/shared-store.js"),a=i(Function.toString);o(s.inspectSource)||(s.inspectSource=function(e){return a(e)}),e.exports=s.inspectSource},"../../node_modules/core-js/internals/internal-state.js":function(e,n,r){"use strict";var i,o,s,a=r("../../node_modules/core-js/internals/weak-map-basic-detection.js"),c=r("../../node_modules/core-js/internals/global-this.js"),l=r("../../node_modules/core-js/internals/is-object.js"),u=r("../../node_modules/core-js/internals/create-non-enumerable-property.js"),d=r("../../node_modules/core-js/internals/has-own-property.js"),p=r("../../node_modules/core-js/internals/shared-store.js"),h=r("../../node_modules/core-js/internals/shared-key.js"),f=r("../../node_modules/core-js/internals/hidden-keys.js"),m="Object already initialized",g=c.TypeError,v=c.WeakMap;if(a||p.state){var y=p.state||(p.state=new v);y.get=y.get,y.has=y.has,y.set=y.set,i=function(e,n){if(y.has(e))throw new g(m);return n.facade=e,y.set(e,n),n},o=function(e){return y.get(e)||{}},s=function(e){return y.has(e)}}else{var b=h("state");f[b]=!0,i=function(e,n){if(d(e,b))throw new g(m);return n.facade=e,u(e,b,n),n},o=function(e){return d(e,b)?e[b]:{}},s=function(e){return d(e,b)}}e.exports={set:i,get:o,has:s,enforce:function(e){return s(e)?o(e):i(e,{})},getterFor:function(e){return function(n){var r;if(!l(n)||(r=o(n)).type!==e)throw new g("Incompatible receiver, "+e+" required");return r}}}},"../../node_modules/core-js/internals/is-callable.js":function(e){"use strict";var n="object"==typeof document&&document.all;e.exports=void 0===n&&void 0!==n?function(e){return"function"==typeof e||e===n}:function(e){return"function"==typeof e}},"../../node_modules/core-js/internals/is-forced.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/fails.js"),o=r("../../node_modules/core-js/internals/is-callable.js"),s=/#|\.prototype\./,a=function(e,n){var r=l[c(e)];return r===d||r!==u&&(o(n)?i(n):!!n)},c=a.normalize=function(e){return String(e).replace(s,".").toLowerCase()},l=a.data={},u=a.NATIVE="N",d=a.POLYFILL="P";e.exports=a},"../../node_modules/core-js/internals/is-null-or-undefined.js":function(e){"use strict";e.exports=function(e){return null==e}},"../../node_modules/core-js/internals/is-object.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/is-callable.js");e.exports=function(e){return"object"==typeof e?null!==e:i(e)}},"../../node_modules/core-js/internals/is-possible-prototype.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/is-object.js");e.exports=function(e){return i(e)||null===e}},"../../node_modules/core-js/internals/is-pure.js":function(e){"use strict";e.exports=!1},"../../node_modules/core-js/internals/is-symbol.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/get-built-in.js"),o=r("../../node_modules/core-js/internals/is-callable.js"),s=r("../../node_modules/core-js/internals/object-is-prototype-of.js"),a=r("../../node_modules/core-js/internals/use-symbol-as-uid.js"),c=Object;e.exports=a?function(e){return"symbol"==typeof e}:function(e){var n=i("Symbol");return o(n)&&s(n.prototype,c(e))}},"../../node_modules/core-js/internals/length-of-array-like.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/to-length.js");e.exports=function(e){return i(e.length)}},"../../node_modules/core-js/internals/make-built-in.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/function-uncurry-this.js"),o=r("../../node_modules/core-js/internals/fails.js"),s=r("../../node_modules/core-js/internals/is-callable.js"),a=r("../../node_modules/core-js/internals/has-own-property.js"),c=r("../../node_modules/core-js/internals/descriptors.js"),l=r("../../node_modules/core-js/internals/function-name.js").CONFIGURABLE,u=r("../../node_modules/core-js/internals/inspect-source.js"),d=r("../../node_modules/core-js/internals/internal-state.js"),p=d.enforce,h=d.get,f=String,m=Object.defineProperty,g=i("".slice),v=i("".replace),y=i([].join),b=c&&!o(function(){return 8!==m(function(){},"length",{value:8}).length}),_=String(String).split("String"),w=e.exports=function(e,n,r){"Symbol("===g(f(n),0,7)&&(n="["+v(f(n),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),r&&r.getter&&(n="get "+n),r&&r.setter&&(n="set "+n),(!a(e,"name")||l&&e.name!==n)&&(c?m(e,"name",{value:n,configurable:!0}):e.name=n),b&&r&&a(r,"arity")&&e.length!==r.arity&&m(e,"length",{value:r.arity});try{r&&a(r,"constructor")&&r.constructor?c&&m(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var i=p(e);return a(i,"source")||(i.source=y(_,"string"==typeof n?n:"")),e};Function.prototype.toString=w(function(){return s(this)&&h(this).source||u(this)},"toString")},"../../node_modules/core-js/internals/math-trunc.js":function(e){"use strict";var n=Math.ceil,r=Math.floor;e.exports=Math.trunc||function(e){var i=+e;return(i>0?r:n)(i)}},"../../node_modules/core-js/internals/object-create.js":function(e,n,r){"use strict";var i,o=r("../../node_modules/core-js/internals/an-object.js"),s=r("../../node_modules/core-js/internals/object-define-properties.js"),a=r("../../node_modules/core-js/internals/enum-bug-keys.js"),c=r("../../node_modules/core-js/internals/hidden-keys.js"),l=r("../../node_modules/core-js/internals/html.js"),u=r("../../node_modules/core-js/internals/document-create-element.js"),d=r("../../node_modules/core-js/internals/shared-key.js"),p="prototype",h="script",f=d("IE_PROTO"),m=function(){},g=function(e){return"<"+h+">"+e+"</"+h+">"},v=function(e){e.write(g("")),e.close();var n=e.parentWindow.Object;return e=null,n},y=function(){var e,n=u("iframe");return n.style.display="none",l.appendChild(n),n.src=String("java"+h+":"),(e=n.contentWindow.document).open(),e.write(g("document.F=Object")),e.close(),e.F},b=function(){try{i=new ActiveXObject("htmlfile")}catch(e){}b="undefined"!=typeof document?document.domain&&i?v(i):y():v(i);for(var e=a.length;e--;)delete b[p][a[e]];return b()};c[f]=!0,e.exports=Object.create||function(e,n){var r;return null!==e?(m[p]=o(e),r=new m,m[p]=null,r[f]=e):r=b(),void 0===n?r:s.f(r,n)}},"../../node_modules/core-js/internals/object-define-properties.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/descriptors.js"),o=r("../../node_modules/core-js/internals/v8-prototype-define-bug.js"),s=r("../../node_modules/core-js/internals/object-define-property.js"),a=r("../../node_modules/core-js/internals/an-object.js"),c=r("../../node_modules/core-js/internals/to-indexed-object.js"),l=r("../../node_modules/core-js/internals/object-keys.js");n.f=i&&!o?Object.defineProperties:function(e,n){a(e);for(var r,i=c(n),o=l(n),u=o.length,d=0;u>d;)s.f(e,r=o[d++],i[r]);return e}},"../../node_modules/core-js/internals/object-define-property.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/descriptors.js"),o=r("../../node_modules/core-js/internals/ie8-dom-define.js"),s=r("../../node_modules/core-js/internals/v8-prototype-define-bug.js"),a=r("../../node_modules/core-js/internals/an-object.js"),c=r("../../node_modules/core-js/internals/to-property-key.js"),l=TypeError,u=Object.defineProperty,d=Object.getOwnPropertyDescriptor,p="enumerable",h="configurable",f="writable";n.f=i?s?function(e,n,r){if(a(e),n=c(n),a(r),"function"==typeof e&&"prototype"===n&&"value"in r&&f in r&&!r[f]){var i=d(e,n);i&&i[f]&&(e[n]=r.value,r={configurable:h in r?r[h]:i[h],enumerable:p in r?r[p]:i[p],writable:!1})}return u(e,n,r)}:u:function(e,n,r){if(a(e),n=c(n),a(r),o)try{return u(e,n,r)}catch(e){}if("get"in r||"set"in r)throw new l("Accessors not supported");return"value"in r&&(e[n]=r.value),e}},"../../node_modules/core-js/internals/object-get-own-property-descriptor.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/descriptors.js"),o=r("../../node_modules/core-js/internals/function-call.js"),s=r("../../node_modules/core-js/internals/object-property-is-enumerable.js"),a=r("../../node_modules/core-js/internals/create-property-descriptor.js"),c=r("../../node_modules/core-js/internals/to-indexed-object.js"),l=r("../../node_modules/core-js/internals/to-property-key.js"),u=r("../../node_modules/core-js/internals/has-own-property.js"),d=r("../../node_modules/core-js/internals/ie8-dom-define.js"),p=Object.getOwnPropertyDescriptor;n.f=i?p:function(e,n){if(e=c(e),n=l(n),d)try{return p(e,n)}catch(e){}if(u(e,n))return a(!o(s.f,e,n),e[n])}},"../../node_modules/core-js/internals/object-get-own-property-names.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/object-keys-internal.js"),o=r("../../node_modules/core-js/internals/enum-bug-keys.js").concat("length","prototype");n.f=Object.getOwnPropertyNames||function(e){return i(e,o)}},"../../node_modules/core-js/internals/object-get-own-property-symbols.js":function(e,n){"use strict";n.f=Object.getOwnPropertySymbols},"../../node_modules/core-js/internals/object-get-prototype-of.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/has-own-property.js"),o=r("../../node_modules/core-js/internals/is-callable.js"),s=r("../../node_modules/core-js/internals/to-object.js"),a=r("../../node_modules/core-js/internals/shared-key.js"),c=r("../../node_modules/core-js/internals/correct-prototype-getter.js"),l=a("IE_PROTO"),u=Object,d=u.prototype;e.exports=c?u.getPrototypeOf:function(e){var n=s(e);if(i(n,l))return n[l];var r=n.constructor;return o(r)&&n instanceof r?r.prototype:n instanceof u?d:null}},"../../node_modules/core-js/internals/object-is-prototype-of.js":function(e,n,r){"use strict";e.exports=r("../../node_modules/core-js/internals/function-uncurry-this.js")({}.isPrototypeOf)},"../../node_modules/core-js/internals/object-keys-internal.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/function-uncurry-this.js"),o=r("../../node_modules/core-js/internals/has-own-property.js"),s=r("../../node_modules/core-js/internals/to-indexed-object.js"),a=r("../../node_modules/core-js/internals/array-includes.js").indexOf,c=r("../../node_modules/core-js/internals/hidden-keys.js"),l=i([].push);e.exports=function(e,n){var r,i=s(e),u=0,d=[];for(r in i)!o(c,r)&&o(i,r)&&l(d,r);for(;n.length>u;)o(i,r=n[u++])&&(~a(d,r)||l(d,r));return d}},"../../node_modules/core-js/internals/object-keys.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/object-keys-internal.js"),o=r("../../node_modules/core-js/internals/enum-bug-keys.js");e.exports=Object.keys||function(e){return i(e,o)}},"../../node_modules/core-js/internals/object-property-is-enumerable.js":function(e,n){"use strict";var r={}.propertyIsEnumerable,i=Object.getOwnPropertyDescriptor;n.f=i&&!r.call({1:2},1)?function(e){var n=i(this,e);return!!n&&n.enumerable}:r},"../../node_modules/core-js/internals/object-set-prototype-of.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/function-uncurry-this-accessor.js"),o=r("../../node_modules/core-js/internals/is-object.js"),s=r("../../node_modules/core-js/internals/require-object-coercible.js"),a=r("../../node_modules/core-js/internals/a-possible-prototype.js");e.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var e,n=!1,r={};try{(e=i(Object.prototype,"__proto__","set"))(r,[]),n=r instanceof Array}catch(e){}return function(r,i){return s(r),a(i),o(r)&&(n?e(r,i):r.__proto__=i),r}}():void 0)},"../../node_modules/core-js/internals/ordinary-to-primitive.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/function-call.js"),o=r("../../node_modules/core-js/internals/is-callable.js"),s=r("../../node_modules/core-js/internals/is-object.js"),a=TypeError;e.exports=function(e,n){var r,c;if("string"===n&&o(r=e.toString)&&!s(c=i(r,e))||o(r=e.valueOf)&&!s(c=i(r,e))||"string"!==n&&o(r=e.toString)&&!s(c=i(r,e)))return c;throw new a("Can't convert object to primitive value")}},"../../node_modules/core-js/internals/own-keys.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/get-built-in.js"),o=r("../../node_modules/core-js/internals/function-uncurry-this.js"),s=r("../../node_modules/core-js/internals/object-get-own-property-names.js"),a=r("../../node_modules/core-js/internals/object-get-own-property-symbols.js"),c=r("../../node_modules/core-js/internals/an-object.js"),l=o([].concat);e.exports=i("Reflect","ownKeys")||function(e){var n=s.f(c(e)),r=a.f;return r?l(n,r(e)):n}},"../../node_modules/core-js/internals/require-object-coercible.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/is-null-or-undefined.js"),o=TypeError;e.exports=function(e){if(i(e))throw new o("Can't call method on "+e);return e}},"../../node_modules/core-js/internals/shared-key.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/shared.js"),o=r("../../node_modules/core-js/internals/uid.js"),s=i("keys");e.exports=function(e){return s[e]||(s[e]=o(e))}},"../../node_modules/core-js/internals/shared-store.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/is-pure.js"),o=r("../../node_modules/core-js/internals/global-this.js"),s=r("../../node_modules/core-js/internals/define-global-property.js"),a="__core-js_shared__",c=e.exports=o[a]||s(a,{});(c.versions||(c.versions=[])).push({version:"3.44.0",mode:i?"pure":"global",copyright:"\xa9 2014-2025 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.44.0/LICENSE",source:"https://github.com/zloirock/core-js"})},"../../node_modules/core-js/internals/shared.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/shared-store.js");e.exports=function(e,n){return i[e]||(i[e]=n||{})}},"../../node_modules/core-js/internals/symbol-constructor-detection.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/environment-v8-version.js"),o=r("../../node_modules/core-js/internals/fails.js"),s=r("../../node_modules/core-js/internals/global-this.js").String;e.exports=!!Object.getOwnPropertySymbols&&!o(function(){var e=Symbol("symbol detection");return!s(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&i&&i<41})},"../../node_modules/core-js/internals/to-absolute-index.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/to-integer-or-infinity.js"),o=Math.max,s=Math.min;e.exports=function(e,n){var r=i(e);return r<0?o(r+n,0):s(r,n)}},"../../node_modules/core-js/internals/to-indexed-object.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/indexed-object.js"),o=r("../../node_modules/core-js/internals/require-object-coercible.js");e.exports=function(e){return i(o(e))}},"../../node_modules/core-js/internals/to-integer-or-infinity.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/math-trunc.js");e.exports=function(e){var n=+e;return n!=n||0===n?0:i(n)}},"../../node_modules/core-js/internals/to-length.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/to-integer-or-infinity.js"),o=Math.min;e.exports=function(e){var n=i(e);return n>0?o(n,0x1fffffffffffff):0}},"../../node_modules/core-js/internals/to-object.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/require-object-coercible.js"),o=Object;e.exports=function(e){return o(i(e))}},"../../node_modules/core-js/internals/to-offset.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/to-positive-integer.js"),o=RangeError;e.exports=function(e,n){var r=i(e);if(r%n)throw new o("Wrong offset");return r}},"../../node_modules/core-js/internals/to-positive-integer.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/to-integer-or-infinity.js"),o=RangeError;e.exports=function(e){var n=i(e);if(n<0)throw new o("The argument can't be less than 0");return n}},"../../node_modules/core-js/internals/to-primitive.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/function-call.js"),o=r("../../node_modules/core-js/internals/is-object.js"),s=r("../../node_modules/core-js/internals/is-symbol.js"),a=r("../../node_modules/core-js/internals/get-method.js"),c=r("../../node_modules/core-js/internals/ordinary-to-primitive.js"),l=r("../../node_modules/core-js/internals/well-known-symbol.js"),u=TypeError,d=l("toPrimitive");e.exports=function(e,n){if(!o(e)||s(e))return e;var r,l=a(e,d);if(l){if(void 0===n&&(n="default"),!o(r=i(l,e,n))||s(r))return r;throw new u("Can't convert object to primitive value")}return void 0===n&&(n="number"),c(e,n)}},"../../node_modules/core-js/internals/to-property-key.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/to-primitive.js"),o=r("../../node_modules/core-js/internals/is-symbol.js");e.exports=function(e){var n=i(e,"string");return o(n)?n:n+""}},"../../node_modules/core-js/internals/to-string-tag-support.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/well-known-symbol.js")("toStringTag"),o={};o[i]="z",e.exports="[object z]"===String(o)},"../../node_modules/core-js/internals/try-to-string.js":function(e){"use strict";var n=String;e.exports=function(e){try{return n(e)}catch(e){return"Object"}}},"../../node_modules/core-js/internals/uid.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/function-uncurry-this.js"),o=0,s=Math.random(),a=i(1.1.toString);e.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+a(++o+s,36)}},"../../node_modules/core-js/internals/use-symbol-as-uid.js":function(e,n,r){"use strict";e.exports=r("../../node_modules/core-js/internals/symbol-constructor-detection.js")&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},"../../node_modules/core-js/internals/v8-prototype-define-bug.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/descriptors.js"),o=r("../../node_modules/core-js/internals/fails.js");e.exports=i&&o(function(){return 42!==Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype})},"../../node_modules/core-js/internals/weak-map-basic-detection.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/global-this.js"),o=r("../../node_modules/core-js/internals/is-callable.js"),s=i.WeakMap;e.exports=o(s)&&/native code/.test(String(s))},"../../node_modules/core-js/internals/well-known-symbol.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/global-this.js"),o=r("../../node_modules/core-js/internals/shared.js"),s=r("../../node_modules/core-js/internals/has-own-property.js"),a=r("../../node_modules/core-js/internals/uid.js"),c=r("../../node_modules/core-js/internals/symbol-constructor-detection.js"),l=r("../../node_modules/core-js/internals/use-symbol-as-uid.js"),u=i.Symbol,d=o("wks"),p=l?u.for||u:u&&u.withoutSetter||a;e.exports=function(e){return s(d,e)||(d[e]=c&&s(u,e)?u[e]:p("Symbol."+e)),d[e]}},"../../node_modules/core-js/modules/es.array.includes.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/export.js"),o=r("../../node_modules/core-js/internals/array-includes.js").includes,s=r("../../node_modules/core-js/internals/fails.js"),a=r("../../node_modules/core-js/internals/add-to-unscopables.js");i({target:"Array",proto:!0,forced:s(function(){return![,].includes()})},{includes:function(e){return o(this,e,arguments.length>1?arguments[1]:void 0)}}),a("includes")},"../../node_modules/core-js/modules/es.array.reduce.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/export.js"),o=r("../../node_modules/core-js/internals/array-reduce.js").left,s=r("../../node_modules/core-js/internals/array-method-is-strict.js"),a=r("../../node_modules/core-js/internals/environment-v8-version.js");i({target:"Array",proto:!0,forced:!r("../../node_modules/core-js/internals/environment-is-node.js")&&a>79&&a<83||!s("reduce")},{reduce:function(e){var n=arguments.length;return o(this,e,n,n>1?arguments[1]:void 0)}})},"../../node_modules/core-js/modules/es.object.has-own.js":function(e,n,r){"use strict";r("../../node_modules/core-js/internals/export.js")({target:"Object",stat:!0},{hasOwn:r("../../node_modules/core-js/internals/has-own-property.js")})},"../../node_modules/core-js/modules/es.typed-array.set.js":function(e,n,r){"use strict";var i=r("../../node_modules/core-js/internals/global-this.js"),o=r("../../node_modules/core-js/internals/function-call.js"),s=r("../../node_modules/core-js/internals/array-buffer-view-core.js"),a=r("../../node_modules/core-js/internals/length-of-array-like.js"),c=r("../../node_modules/core-js/internals/to-offset.js"),l=r("../../node_modules/core-js/internals/to-object.js"),u=r("../../node_modules/core-js/internals/fails.js"),d=i.RangeError,p=i.Int8Array,h=p&&p.prototype,f=h&&h.set,m=s.aTypedArray,g=s.exportTypedArrayMethod,v=!u(function(){var e=new Uint8ClampedArray(2);return o(f,e,{length:1,0:3},1),3!==e[1]}),y=v&&s.NATIVE_ARRAY_BUFFER_VIEWS&&u(function(){var e=new p(2);return e.set(1),e.set("2",1),0!==e[0]||2!==e[1]});g("set",function(e){m(this);var n=c(arguments.length>1?arguments[1]:void 0,1),r=l(e);if(v)return o(f,this,r,n);var i=this.length,s=a(r),u=0;if(s+n>i)throw new d("Wrong length");for(;u<s;)this[n+u]=r[u++]},!v||y)},"../../node_modules/reflect-metadata/Reflect.js":function(e,n,r){var i,o;o=i||(i={}),function(e){var n="object"==typeof globalThis?globalThis:"object"==typeof r.g?r.g:"object"==typeof self?self:"object"==typeof this?this:function(){try{return Function("return this;")()}catch(e){}}()||function(){try{return(0,eval)("(function() { return this; })()")}catch(e){}}(),i=s(o);function s(e,n){return function(r,i){Object.defineProperty(e,r,{configurable:!0,writable:!0,value:i}),n&&n(r,i)}}void 0!==n.Reflect&&(i=s(n.Reflect,i)),e(i,n),void 0===n.Reflect&&(n.Reflect=o)}(function(e,n){var r,i=Object.prototype.hasOwnProperty,o="function"==typeof Symbol,s=o&&void 0!==Symbol.toPrimitive?Symbol.toPrimitive:"@@toPrimitive",a=o&&void 0!==Symbol.iterator?Symbol.iterator:"@@iterator",c="function"==typeof Object.create,l=({__proto__:[]})instanceof Array,u=!c&&!l,d={create:c?function(){return L(Object.create(null))}:l?function(){return L({__proto__:null})}:function(){return L({})},has:u?function(e,n){return i.call(e,n)}:function(e,n){return n in e},get:u?function(e,n){return i.call(e,n)?e[n]:void 0}:function(e,n){return e[n]}},p=Object.getPrototypeOf(Function),h="function"==typeof Map&&"function"==typeof Map.prototype.entries?Map:function(){var e={},n=[],r=function(){function e(e,n,r){this._index=0,this._keys=e,this._values=n,this._selector=r}return e.prototype["@@iterator"]=function(){return this},e.prototype[a]=function(){return this},e.prototype.next=function(){var e=this._index;if(e>=0&&e<this._keys.length){var r=this._selector(this._keys[e],this._values[e]);return e+1>=this._keys.length?(this._index=-1,this._keys=n,this._values=n):this._index++,{value:r,done:!1}}return{value:void 0,done:!0}},e.prototype.throw=function(e){throw this._index>=0&&(this._index=-1,this._keys=n,this._values=n),e},e.prototype.return=function(e){return this._index>=0&&(this._index=-1,this._keys=n,this._values=n),{value:e,done:!0}},e}();function i(){this._keys=[],this._values=[],this._cacheKey=e,this._cacheIndex=-2}return Object.defineProperty(i.prototype,"size",{get:function(){return this._keys.length},enumerable:!0,configurable:!0}),i.prototype.has=function(e){return this._find(e,!1)>=0},i.prototype.get=function(e){var n=this._find(e,!1);return n>=0?this._values[n]:void 0},i.prototype.set=function(e,n){var r=this._find(e,!0);return this._values[r]=n,this},i.prototype.delete=function(n){var r=this._find(n,!1);if(r>=0){for(var i=this._keys.length,o=r+1;o<i;o++)this._keys[o-1]=this._keys[o],this._values[o-1]=this._values[o];return this._keys.length--,this._values.length--,j(n,this._cacheKey)&&(this._cacheKey=e,this._cacheIndex=-2),!0}return!1},i.prototype.clear=function(){this._keys.length=0,this._values.length=0,this._cacheKey=e,this._cacheIndex=-2},i.prototype.keys=function(){return new r(this._keys,this._values,o)},i.prototype.values=function(){return new r(this._keys,this._values,s)},i.prototype.entries=function(){return new r(this._keys,this._values,c)},i.prototype["@@iterator"]=function(){return this.entries()},i.prototype[a]=function(){return this.entries()},i.prototype._find=function(e,n){if(!j(this._cacheKey,e)){this._cacheIndex=-1;for(var r=0;r<this._keys.length;r++)if(j(this._keys[r],e)){this._cacheIndex=r;break}}return this._cacheIndex<0&&n&&(this._cacheIndex=this._keys.length,this._keys.push(e),this._values.push(void 0)),this._cacheIndex},i;function o(e,n){return e}function s(e,n){return n}function c(e,n){return[e,n]}}(),f="function"==typeof Set&&"function"==typeof Set.prototype.entries?Set:function(){function e(){this._map=new h}return Object.defineProperty(e.prototype,"size",{get:function(){return this._map.size},enumerable:!0,configurable:!0}),e.prototype.has=function(e){return this._map.has(e)},e.prototype.add=function(e){return this._map.set(e,e),this},e.prototype.delete=function(e){return this._map.delete(e)},e.prototype.clear=function(){this._map.clear()},e.prototype.keys=function(){return this._map.keys()},e.prototype.values=function(){return this._map.keys()},e.prototype.entries=function(){return this._map.entries()},e.prototype["@@iterator"]=function(){return this.keys()},e.prototype[a]=function(){return this.keys()},e}(),m="function"==typeof WeakMap?WeakMap:function(){var e=d.create(),n=o();function r(){this._key=o()}return r.prototype.has=function(e){var n=s(e,!1);return void 0!==n&&d.has(n,this._key)},r.prototype.get=function(e){var n=s(e,!1);return void 0!==n?d.get(n,this._key):void 0},r.prototype.set=function(e,n){return s(e,!0)[this._key]=n,this},r.prototype.delete=function(e){var n=s(e,!1);return void 0!==n&&delete n[this._key]},r.prototype.clear=function(){this._key=o()},r;function o(){var n;do n="@@WeakMap@@"+function(){var e=function(e){if("function"==typeof Uint8Array){var n=new Uint8Array(16);return"undefined"!=typeof crypto?crypto.getRandomValues(n):"undefined"!=typeof msCrypto?msCrypto.getRandomValues(n):a(n,16),n}return a(Array(e),e)}(16);e[6]=79&e[6]|64,e[8]=191&e[8]|128;for(var n="",r=0;r<16;++r){var i=e[r];(4===r||6===r||8===r)&&(n+="-"),i<16&&(n+="0"),n+=i.toString(16).toLowerCase()}return n}();while(d.has(e,n));return e[n]=!0,n}function s(e,r){if(!i.call(e,n)){if(!r)return;Object.defineProperty(e,n,{value:d.create()})}return e[n]}function a(e,n){for(var r=0;r<n;++r)e[r]=255*Math.random()|0;return e}}(),g=o?Symbol.for("@reflect-metadata:registry"):void 0,v=(!S(g)&&T(n.Reflect)&&Object.isExtensible(n.Reflect)&&(r=n.Reflect[g]),S(r)&&(r=function(){S(g)||void 0===n.Reflect||g in n.Reflect||"function"!=typeof n.Reflect.defineMetadata||(r=(e=n.Reflect).defineMetadata,i=e.hasOwnMetadata,o=e.getOwnMetadata,s=e.getOwnMetadataKeys,a=e.deleteMetadata,c=new m,l={isProviderFor:function(e,n){var r=c.get(e);return!!(!S(r)&&r.has(n))||!!s(e,n).length&&(S(r)&&(r=new f,c.set(e,r)),r.add(n),!0)},OrdinaryDefineOwnMetadata:r,OrdinaryHasOwnMetadata:i,OrdinaryGetOwnMetadata:o,OrdinaryOwnMetadataKeys:s,OrdinaryDeleteMetadata:a});var e,r,i,o,s,a,c,l,u,d,p,v=new m,y={registerProvider:function(e){if(!Object.isExtensible(y))throw Error("Cannot add provider to a frozen registry.");switch(!0){case l===e:break;case S(u):u=e;break;case u===e:break;case S(d):d=e;break;case d===e:break;default:void 0===p&&(p=new f),p.add(e)}},getProvider:b,setProvider:function(e,n,r){if(!function(e){if(S(e))throw TypeError();return u===e||d===e||!S(p)&&p.has(e)}(r))throw Error("Metadata provider not registered.");var i=b(e,n);if(i!==r){if(!S(i))return!1;var o=v.get(e);S(o)&&(o=new h,v.set(e,o)),o.set(n,r)}return!0}};return y;function b(e,n){var r,i=v.get(e);return S(i)||(r=i.get(n)),S(r)&&(r=function(e,n){if(!S(u)){if(u.isProviderFor(e,n))return u;if(!S(d)){if(d.isProviderFor(e,n))return u;if(!S(p))for(var r=k(p);;){var i=B(r);if(!i)return;var o=i.value;if(o.isProviderFor(e,n))return P(r),o}}}if(!S(l)&&l.isProviderFor(e,n))return l}(e,n),S(r)||(S(i)&&(i=new h,v.set(e,i)),i.set(n,r))),r}}()),!S(g)&&T(n.Reflect)&&Object.isExtensible(n.Reflect)&&Object.defineProperty(n.Reflect,g,{enumerable:!1,configurable:!1,writable:!1,value:r}),r),y=function(e){var n=new m,r={isProviderFor:function(e,r){var i=n.get(e);return!S(i)&&i.has(r)},OrdinaryDefineOwnMetadata:function(e,n,r,o){i(r,o,!0).set(e,n)},OrdinaryHasOwnMetadata:function(e,n,r){var o=i(n,r,!1);return!S(o)&&!!o.has(e)},OrdinaryGetOwnMetadata:function(e,n,r){var o=i(n,r,!1);if(!S(o))return o.get(e)},OrdinaryOwnMetadataKeys:function(e,n){var r=[],o=i(e,n,!1);if(S(o))return r;for(var s=k(o.keys()),a=0;;){var c=B(s);if(!c)return r.length=a,r;var l=c.value;try{r[a]=l}catch(e){try{P(s)}finally{throw e}}a++}},OrdinaryDeleteMetadata:function(e,r,o){var s=i(r,o,!1);if(S(s)||!s.delete(e))return!1;if(0===s.size){var a=n.get(r);S(a)||(a.delete(o),0===a.size&&n.delete(a))}return!0}};return v.registerProvider(r),r;function i(i,o,s){var a=n.get(i),c=!1;if(S(a)){if(!s)return;a=new h,n.set(i,a),c=!0}var l=a.get(o);if(S(l)){if(!s)return;if(l=new h,a.set(o,l),!e.setProvider(i,o,r))throw a.delete(o),c&&n.delete(i),Error("Wrong provider for target.")}return l}}(v);function b(e,n,r){var i=D(n,r,!1);return!S(i)&&!!i.OrdinaryHasOwnMetadata(e,n,r)}function _(e,n,r){var i=D(n,r,!1);if(!S(i))return i.OrdinaryGetOwnMetadata(e,n,r)}function w(e,n,r,i){D(r,i,!0).OrdinaryDefineOwnMetadata(e,n,r,i)}function O(e,n){var r=D(e,n,!1);return r?r.OrdinaryOwnMetadataKeys(e,n):[]}function R(e){if(null===e)return 1;switch(typeof e){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return null===e?1:6;default:return 6}}function S(e){return void 0===e}function E(e){return null===e}function T(e){return"object"==typeof e?null!==e:"function"==typeof e}e("decorate",function(e,n,r,i){if(S(r)){if(!x(e)||!I(n))throw TypeError();for(var o=e,s=n,a=o.length-1;a>=0;--a){var c=(0,o[a])(s);if(!S(c)&&!E(c)){if(!I(c))throw TypeError();s=c}}return s}if(!x(e)||!T(n)||!T(i)&&!S(i)&&!E(i))throw TypeError();return E(i)&&(i=void 0),function(e,n,r,i){for(var o=e.length-1;o>=0;--o){var s=(0,e[o])(n,r,i);if(!S(s)&&!E(s)){if(!T(s))throw TypeError();i=s}}return i}(e,n,r=M(r),i)}),e("metadata",function(e,n){return function(r,i){if(!T(r)||!S(i)&&!function(e){switch(R(e)){case 3:case 4:return!0;default:return!1}}(i))throw TypeError();w(e,n,r,i)}}),e("defineMetadata",function(e,n,r,i){if(!T(r))throw TypeError();return S(i)||(i=M(i)),w(e,n,r,i)}),e("hasMetadata",function(e,n,r){if(!T(n))throw TypeError();return S(r)||(r=M(r)),function e(n,r,i){if(b(n,r,i))return!0;var o=N(r);return!E(o)&&e(n,o,i)}(e,n,r)}),e("hasOwnMetadata",function(e,n,r){if(!T(n))throw TypeError();return S(r)||(r=M(r)),b(e,n,r)}),e("getMetadata",function(e,n,r){if(!T(n))throw TypeError();return S(r)||(r=M(r)),function e(n,r,i){if(b(n,r,i))return _(n,r,i);var o=N(r);if(!E(o))return e(n,o,i)}(e,n,r)}),e("getOwnMetadata",function(e,n,r){if(!T(n))throw TypeError();return S(r)||(r=M(r)),_(e,n,r)}),e("getMetadataKeys",function(e,n){if(!T(e))throw TypeError();return S(n)||(n=M(n)),function e(n,r){var i=O(n,r),o=N(n);if(null===o)return i;var s=e(o,r);if(s.length<=0)return i;if(i.length<=0)return s;for(var a=new f,c=[],l=0;l<i.length;l++){var u=i[l],d=a.has(u);d||(a.add(u),c.push(u))}for(var p=0;p<s.length;p++){var u=s[p],d=a.has(u);d||(a.add(u),c.push(u))}return c}(e,n)}),e("getOwnMetadataKeys",function(e,n){if(!T(e))throw TypeError();return S(n)||(n=M(n)),O(e,n)}),e("deleteMetadata",function(e,n,r){if(!T(n)||(S(r)||(r=M(r)),!T(n)))throw TypeError();S(r)||(r=M(r));var i=D(n,r,!1);return!S(i)&&i.OrdinaryDeleteMetadata(e,n,r)});function M(e){var n=function(e,n){switch(R(e)){case 0:case 1:case 2:case 3:case 4:case 5:return e}var r="string",i=A(e,s);if(void 0!==i){var o=i.call(e,r);if(T(o))throw TypeError();return o}return function(e,n){if("string"===n){var r=e.toString;if(C(r)){var i=r.call(e);if(!T(i))return i}var o=e.valueOf;if(C(o)){var i=o.call(e);if(!T(i))return i}}else{var o=e.valueOf;if(C(o)){var i=o.call(e);if(!T(i))return i}var s=e.toString;if(C(s)){var i=s.call(e);if(!T(i))return i}}throw TypeError()}(e,r)}(e,0);return"symbol"==typeof n?n:""+n}function x(e){return Array.isArray?Array.isArray(e):e instanceof Object?e instanceof Array:"[object Array]"===Object.prototype.toString.call(e)}function C(e){return"function"==typeof e}function I(e){return"function"==typeof e}function j(e,n){return e===n||e!=e&&n!=n}function A(e,n){var r=e[n];if(null!=r){if(!C(r))throw TypeError();return r}}function k(e){var n=A(e,a);if(!C(n))throw TypeError();var r=n.call(e);if(!T(r))throw TypeError();return r}function B(e){var n=e.next();return!n.done&&n}function P(e){var n=e.return;n&&n.call(e)}function N(e){var n=Object.getPrototypeOf(e);if("function"!=typeof e||e===p||n!==p)return n;var r=e.prototype,i=r&&Object.getPrototypeOf(r);if(null==i||i===Object.prototype)return n;var o=i.constructor;return"function"!=typeof o||o===e?n:o}function D(e,n,r){var i=v.getProvider(e,n);if(!S(i))return i;if(r){if(v.setProvider(e,n,y))return y;throw Error("Illegal state.")}}function L(e){return e.__=void 0,delete e.__,e}})}},__webpack_module_cache__={};function __webpack_require__(e){var n=__webpack_module_cache__[e];if(void 0!==n)return n.exports;var r=__webpack_module_cache__[e]={exports:{}};return __webpack_modules__[e].call(r.exports,r,r.exports,__webpack_require__),r.exports}__webpack_require__.n=e=>{var n=e&&e.__esModule?()=>e.default:()=>e;return __webpack_require__.d(n,{a:n}),n},__webpack_require__.d=(e,n)=>{for(var r in n)__webpack_require__.o(n,r)&&!__webpack_require__.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},__webpack_require__.g=(()=>{if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}})(),__webpack_require__.o=(e,n)=>Object.prototype.hasOwnProperty.call(e,n),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var __webpack_exports__={};for(var __webpack_i__ in(()=>{"use strict";let e,n;__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{AIWorkerConversationBean:()=>iu,ClientConversationBean:()=>rf,ConversationService:()=>ih,DEFAULT_OPTIONS:()=>rs,createAaaSPilotKit:()=>sJ,ConversationBean:()=>rp,AaaSPilotKitController:()=>oZ,BaseAgentService:()=>rr});var r,i,o,s,a,c,l,u,d,p,h,f,m,g,v,y,b,_,w,O,R,S,E,T,M,x,C,I={};__webpack_require__.r(I),__webpack_require__.d(I,{fixNegotiationNeeded:()=>sv,shimAddTrackRemoveTrack:()=>sm,shimAddTrackRemoveTrackWithNative:()=>sf,shimGetSendersWithDtmf:()=>sp,shimGetUserMedia:()=>sl,shimMediaStream:()=>su,shimOnTrack:()=>sd,shimPeerConnection:()=>sg,shimSenderReceiverGetStats:()=>sh});var j={};__webpack_require__.r(j),__webpack_require__.d(j,{shimAddTransceiver:()=>sT,shimCreateAnswer:()=>sC,shimCreateOffer:()=>sx,shimGetDisplayMedia:()=>sb,shimGetParameters:()=>sM,shimGetUserMedia:()=>sy,shimOnTrack:()=>s_,shimPeerConnection:()=>sw,shimRTCDataChannel:()=>sE,shimReceiverGetStats:()=>sR,shimRemoveStream:()=>sS,shimSenderGetStats:()=>sO});var A={};__webpack_require__.r(A),__webpack_require__.d(A,{shimAudioContext:()=>sL,shimCallbacksAPI:()=>sA,shimConstraints:()=>sB,shimCreateOfferLegacy:()=>sD,shimGetUserMedia:()=>sk,shimLocalStreamsAPI:()=>sI,shimRTCIceServerUrls:()=>sP,shimRemoteStreamsAPI:()=>sj,shimTrackEventTransceiver:()=>sN});var k={};__webpack_require__.r(k),__webpack_require__.d(k,{removeExtmapAllowMixed:()=>s$,shimAddIceCandidateNullOrEmpty:()=>sz,shimConnectionState:()=>sW,shimMaxMessageSize:()=>sV,shimParameterlessSetLocalDescription:()=>sG,shimRTCIceCandidate:()=>sq,shimRTCIceCandidateRelayProtocol:()=>sH,shimSendThrowTypeError:()=>sX});var B={};function P(e){return("object"==typeof e&&null!==e||"function"==typeof e)&&"function"==typeof e.then}function N(e){switch(typeof e){case"string":case"symbol":return e.toString();case"function":return e.name;default:throw Error(`Unexpected ${typeof e} service id type`)}}__webpack_require__.r(B),__webpack_require__.d(B,{default:()=>sK}),__webpack_require__("../../node_modules/core-js/modules/es.object.has-own.js"),__webpack_require__("../../node_modules/reflect-metadata/Reflect.js");let D=Symbol.for("@inversifyjs/common/islazyServiceIdentifier");class L{#e;constructor(e){this.#e=e,this[D]=!0}static is(e){return"object"==typeof e&&null!==e&&!0===e[D]}unwrap(){return this.#e()}}function F(e,n){return Reflect.getOwnMetadata(n,e)}function U(e,n,r){Reflect.defineMetadata(n,r,e)}function q(e,n,r,i){var o;let s=i(null!=(o=F(e,n))?o:r());Reflect.defineMetadata(n,s,e)}__webpack_require__("../../node_modules/core-js/modules/es.array.includes.js");let H="@inversifyjs/container/bindingId";function V(){var e;let n=null!=(e=F(Object,H))?e:0;return n===Number.MAX_SAFE_INTEGER?U(Object,H,Number.MIN_SAFE_INTEGER):q(Object,H,()=>n,e=>e+1),n}let X={Request:"Request",Singleton:"Singleton",Transient:"Transient"},W={ConstantValue:"ConstantValue",DynamicValue:"DynamicValue",Factory:"Factory",Instance:"Instance",Provider:"Provider",ResolvedValue:"ResolvedValue",ServiceRedirection:"ServiceRedirection"};function*$(){for(var e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];for(let e of n)yield*e}class z{#e;#t;#n;constructor(e){for(let n of(this.#e=new Map,this.#t={},Reflect.ownKeys(e)))this.#t[n]=new Map;this.#n=e}add(e,n){for(let r of(this.#r(e).push(n),Reflect.ownKeys(n)))this.#i(r,n[r]).push(e)}clone(){let e=this.#o(),n=this.#s(),r=Reflect.ownKeys(this.#n),i=this._buildNewInstance(this.#n);for(let o of(this.#a(this.#e,i.#e,e,n),r))this.#c(this.#t[o],i.#t[o],e);return i}get(e,n){return this.#t[e].get(n)}getAllKeys(e){return this.#t[e].keys()}removeByRelation(e,n){let r=this.get(e,n);if(void 0!==r)for(let i of new Set(r)){let r=this.#e.get(i);if(void 0===r)throw Error("Expecting model relation, none found");for(let o of r)o[e]===n&&this.#l(i,o);this.#e.delete(i)}}_buildNewInstance(e){return new z(e)}_cloneModel(e){return e}_cloneRelation(e){return e}#o(){let e=new Map;for(let n of this.#e.keys()){let r=this._cloneModel(n);e.set(n,r)}return e}#s(){let e=new Map;for(let n of this.#e.values())for(let r of n){let n=this._cloneRelation(r);e.set(r,n)}return e}#r(e){let n=this.#e.get(e);return void 0===n&&(n=[],this.#e.set(e,n)),n}#i(e,n){let r=this.#t[e].get(n);return void 0===r&&(r=[],this.#t[e].set(n,r)),r}#u(e,n){let r=n.get(e);if(void 0===r)throw Error("Expecting model to be cloned, none found");return r}#d(e,n){let r=n.get(e);if(void 0===r)throw Error("Expecting relation to be cloned, none found");return r}#c(e,n,r){for(let[i,o]of e){let e=[];for(let n of o)e.push(this.#u(n,r));n.set(i,e)}}#a(e,n,r,i){for(let[o,s]of e){let e=[];for(let n of s)e.push(this.#d(n,i));n.set(this.#u(o,r),e)}}#l(e,n){for(let r of Reflect.ownKeys(n))this.#p(e,r,n[r])}#p(e,n,r){let i=this.#t[n].get(r);if(void 0!==i){let o=i.indexOf(e);-1!==o&&i.splice(o,1),0===i.length&&this.#t[n].delete(r)}}}!function(e){e.moduleId="moduleId",e.serviceId="serviceId"}(p||(p={}));class G{#h;#f;constructor(e,n){this.#h=null!=n?n:new z({moduleId:{isOptional:!0},serviceId:{isOptional:!1}}),this.#f=e}static build(e){return new G(e)}add(e,n){this.#h.add(e,n)}clone(){return new G(this.#f,this.#h.clone())}get(e){var n;let r=[],i=this.#h.get(p.serviceId,e);void 0!==i&&r.push(i);let o=null==(n=this.#f)?void 0:n.get(e);if(void 0!==o&&r.push(o),0!==r.length)return $(...r)}removeAllByModuleId(e){this.#h.removeByRelation(p.moduleId,e)}removeAllByServiceId(e){this.#h.removeByRelation(p.serviceId,e)}}function K(e){return e.isRight?{isRight:!0,value:e.value}:e}!function(e){e.id="id",e.moduleId="moduleId",e.serviceId="serviceId"}(h||(h={}));class Y extends z{_buildNewInstance(e){return new Y(e)}_cloneModel(e){return function(e){var n,r,i,o,s,a;switch(e.type){case W.ConstantValue:case W.DynamicValue:return{cache:K((n=e).cache),id:n.id,isSatisfiedBy:n.isSatisfiedBy,moduleId:n.moduleId,onActivation:n.onActivation,onDeactivation:n.onDeactivation,scope:n.scope,serviceIdentifier:n.serviceIdentifier,type:n.type,value:n.value};case W.Factory:return{cache:K((r=e).cache),factory:r.factory,id:r.id,isSatisfiedBy:r.isSatisfiedBy,moduleId:r.moduleId,onActivation:r.onActivation,onDeactivation:r.onDeactivation,scope:r.scope,serviceIdentifier:r.serviceIdentifier,type:r.type};case W.Instance:return{cache:K((i=e).cache),id:i.id,implementationType:i.implementationType,isSatisfiedBy:i.isSatisfiedBy,moduleId:i.moduleId,onActivation:i.onActivation,onDeactivation:i.onDeactivation,scope:i.scope,serviceIdentifier:i.serviceIdentifier,type:i.type};case W.Provider:return{cache:K((o=e).cache),id:o.id,isSatisfiedBy:o.isSatisfiedBy,moduleId:o.moduleId,onActivation:o.onActivation,onDeactivation:o.onDeactivation,provider:o.provider,scope:o.scope,serviceIdentifier:o.serviceIdentifier,type:o.type};case W.ResolvedValue:return{cache:K((s=e).cache),factory:s.factory,id:s.id,isSatisfiedBy:s.isSatisfiedBy,metadata:s.metadata,moduleId:s.moduleId,onActivation:s.onActivation,onDeactivation:s.onDeactivation,scope:s.scope,serviceIdentifier:s.serviceIdentifier,type:s.type};case W.ServiceRedirection:return{id:(a=e).id,isSatisfiedBy:a.isSatisfiedBy,moduleId:a.moduleId,serviceIdentifier:a.serviceIdentifier,targetServiceIdentifier:a.targetServiceIdentifier,type:a.type}}}(e)}}class Q{#m;#f;constructor(e,n){this.#m=null!=n?n:new Y({id:{isOptional:!1},moduleId:{isOptional:!0},serviceId:{isOptional:!1}}),this.#f=e}static build(e){return new Q(e)}clone(){return new Q(this.#f,this.#m.clone())}get(e){var n,r;return null!=(r=this.getNonParentBindings(e))?r:null==(n=this.#f)?void 0:n.get(e)}getBoundServices(){let e=new Set(this.#m.getAllKeys(h.serviceId));if(void 0!==this.#f)for(let n of this.#f.getBoundServices())e.add(n);return e}getById(e){var n,r;return null!=(r=this.#m.get(h.id,e))?r:null==(n=this.#f)?void 0:n.getById(e)}getByModuleId(e){var n,r;return null!=(r=this.#m.get(h.moduleId,e))?r:null==(n=this.#f)?void 0:n.getByModuleId(e)}getNonParentBindings(e){return this.#m.get(h.serviceId,e)}getNonParentBoundServices(){return this.#m.getAllKeys(h.serviceId)}removeById(e){this.#m.removeByRelation(h.id,e)}removeAllByModuleId(e){this.#m.removeByRelation(h.moduleId,e)}removeAllByServiceId(e){this.#m.removeByRelation(h.serviceId,e)}set(e){let n={[h.id]:e.id,[h.serviceId]:e.serviceIdentifier};void 0!==e.moduleId&&(n[h.moduleId]=e.moduleId),this.#m.add(e,n)}}!function(e){e.moduleId="moduleId",e.serviceId="serviceId"}(f||(f={}));class J{#g;#f;constructor(e,n){this.#g=null!=n?n:new z({moduleId:{isOptional:!0},serviceId:{isOptional:!1}}),this.#f=e}static build(e){return new J(e)}add(e,n){this.#g.add(e,n)}clone(){return new J(this.#f,this.#g.clone())}get(e){var n;let r=[],i=this.#g.get(f.serviceId,e);void 0!==i&&r.push(i);let o=null==(n=this.#f)?void 0:n.get(e);if(void 0!==o&&r.push(o),0!==r.length)return $(...r)}removeAllByModuleId(e){this.#g.removeByRelation(f.moduleId,e)}removeAllByServiceId(e){this.#g.removeByRelation(f.serviceId,e)}}function Z(e,n,r){let i=Array.isArray(e)?e:[e];if(void 0!==r)if("number"!=typeof r)Reflect.decorate(i,n.prototype,r);else for(let e of i)e(n,void 0,r);else Reflect.decorate(i,n)}let ee="@inversifyjs/core/classMetadataReflectKey";function et(){return{constructorArguments:[],lifecycle:{postConstructMethodName:void 0,preDestroyMethodName:void 0},properties:new Map,scope:void 0}}let en="@inversifyjs/core/pendingClassMetadataCountReflectKey",er=Symbol.for("@inversifyjs/core/InversifyCoreError");class ei extends Error{constructor(e,n,r){super(n,r),this[er]=!0,this.kind=e}static is(e){return"object"==typeof e&&null!==e&&!0===e[er]}static isErrorOfKind(e,n){return ei.is(e)&&e.kind===n}}function eo(e){let n=null!=(r=F(e,ee))?r:et();if(!function(e){let n=F(e,en);return void 0!==n&&0!==n}(e))return function(e,n){let r=[];if(n.length<e.length)throw new ei(m.missingInjectionDecorator,`Found unexpected missing metadata on type "${e.name}". "${e.name}" constructor requires at least ${e.length.toString()} arguments, found ${n.length.toString()} instead.
3
3
  Are you using @inject, @multiInject or @unmanaged decorators in every non optional constructor argument?
4
4
 
5
5
  If you're using typescript and want to rely on auto injection, set "emitDecoratorMetadata" compiler option to true`);for(let e=0;e<n.length;++e)void 0===n[e]&&r.push(e);if(r.length>0)throw new ei(m.missingInjectionDecorator,`Found unexpected missing metadata on type "${e.name}" at constructor indexes "${r.join('", "')}".
@@ -40,5 +40,5 @@ ${ek(r)}`;throw new ei(m.planning,i)}function eA(e,n){return void 0===n?`${N(e)}
40
40
  - tags:
41
41
  - ${[...e.tags.keys()].map(e=>e.toString()).join("\n - ")}`;return`Binding constraints:
42
42
  - service identifier: ${N(e.serviceIdentifier)}
43
- - name: ${null!=(r=null==(n=e.name)?void 0:n.toString())?r:"-"}${i}`}function eB(e,n,r){if(Array.isArray(e.bindings)&&1===e.bindings.length){let[i]=e.bindings;eC(i)&&function e(n,r,i){if(1!==n.redirections.length)eI(n.redirections,r,n,i);else{let[o]=n.redirections;eC(o)&&e(o,r,i)}}(i,n,r)}else eI(e.bindings,n,e,r)}function eP(e,n,r){if(r.kind===v.unmanaged)return;let i=L.is(r.value)?r.value.unwrap():r.value,o=n.concat({name:r.name,serviceIdentifier:i,tags:r.tags}),s=new eT(o.last),a=ex(e,s),c=[],l={bindings:c,parent:e.node,serviceIdentifier:i};if(c.push(...eN(e,o,a,l)),r.kind===v.singleInjection){eB(l,r.optional,s);let[e]=c;l.bindings=e}return l}function eN(e,n,r,i){let o=eC(i)?i.binding.targetServiceIdentifier:i.serviceIdentifier;e.servicesBranch.push(o);let s=[];for(let o of r)switch(o.type){case W.Instance:s.push(function(e,n,r,i){let o={binding:n,classMetadata:e.getClassMetadata(n.implementationType),constructorParams:[],parent:i,propertyParams:new Map};return eD({autobindOptions:e.autobindOptions,getBindings:e.getBindings,getClassMetadata:e.getClassMetadata,node:o,servicesBranch:e.servicesBranch,setBinding:e.setBinding},r)}(e,o,n,i));break;case W.ResolvedValue:var a,c,l,u;s.push((a=e,c=o,l=n,u=i,eD({autobindOptions:a.autobindOptions,getBindings:a.getBindings,getClassMetadata:a.getClassMetadata,node:{binding:c,params:[],parent:u},servicesBranch:a.servicesBranch,setBinding:a.setBinding},l)));break;case W.ServiceRedirection:{let r=function(e,n,r,i){let o={binding:r,parent:i,redirections:[]},s=ex(e,new eT(n.last),{customServiceIdentifier:r.targetServiceIdentifier});return o.redirections.push(...eN(e,n,s,o)),o}(e,n,o,i);s.push(r);break}default:s.push({binding:o,parent:i})}return e.servicesBranch.pop(),s}function eD(e,n){return e.node.binding.type===W.Instance?function(e,n,r){let i=n.classMetadata;for(let[o,s]of i.constructorArguments.entries())n.constructorParams[o]=eP(e,r,s);for(let[o,s]of i.properties){let i=eP(e,r,s);void 0!==i&&n.propertyParams.set(o,i)}return e.node}(e,e.node,n):function(e,n,r){for(let[i,o]of n.binding.metadata.arguments.entries())n.params[i]=function(e,n,r){let i=L.is(r.value)?r.value.unwrap():r.value,o=n.concat({name:r.name,serviceIdentifier:i,tags:r.tags}),s=new eT(o.last),a=ex(e,s),c=[],l={bindings:c,parent:e.node,serviceIdentifier:i};if(c.push(...eN(e,o,a,l)),r.kind===b.singleInjection){eB(l,r.optional,s);let[e]=c;l.bindings=e}return l}(e,r,o);return e.node}(e,e.node,n)}class eL{#y;#b;#_;constructor(){this.#y=[],this.#b=8,this.#_=1024}*[Symbol.iterator](){let e=0;for(let n of this.#y){let r=n.deref();void 0===r?++e:yield r}this.#y.length>=this.#b&&this.#w(e)&&this.#O(e)}push(e){let n=new WeakRef(e);if(this.#y.push(n),this.#y.length>=this.#b&&this.#y.length%this.#_==0){let e=0;for(let n of this.#y)void 0===n.deref()&&++e;this.#w(e)&&this.#O(e)}}#O(e){let n=Array(this.#y.length-e),r=0;for(let e of this.#y)e.deref()&&(n[r++]=e);this.#y=n}#w(e){return e>=.5*this.#y.length}}!function(e){e[e.singleMandatory=0]="singleMandatory",e[e.singleOptional=1]="singleOptional",e[e.multipleMandatory=2]="multipleMandatory",e[e.multipleOptional=3]="multipleOptional",e[e.length=4]="length"}(_||(_={}));class eF{#R;#S;#E;#T;#M;constructor(){this.#R=this.#x(),this.#S=this.#x(),this.#E=this.#x(),this.#T=this.#x(),this.#M=new eL}clearCache(){for(let e of this.#C())e.clear();for(let e of this.#M)e.clearCache()}get(e){var n,r,i,o,s,a;return void 0===e.name?void 0===e.tag?this.#I(this.#R,e).get(e.serviceIdentifier):null==(r=this.#I(this.#T,e).get(e.serviceIdentifier))||null==(n=r.get(e.tag.key))?void 0:n.get(e.tag.value):void 0===e.tag?null==(i=this.#I(this.#S,e).get(e.serviceIdentifier))?void 0:i.get(e.name):null==(a=this.#I(this.#E,e).get(e.serviceIdentifier))||null==(s=a.get(e.name))||null==(o=s.get(e.tag.key))?void 0:o.get(e.tag.value)}set(e,n){void 0===e.name?void 0===e.tag?this.#I(this.#R,e).set(e.serviceIdentifier,n):this.#j(this.#j(this.#I(this.#T,e),e.serviceIdentifier),e.tag.key).set(e.tag.value,n):void 0===e.tag?this.#j(this.#I(this.#S,e),e.serviceIdentifier).set(e.name,n):this.#j(this.#j(this.#j(this.#I(this.#E,e),e.serviceIdentifier),e.name),e.tag.key).set(e.tag.value,n)}subscribe(e){this.#M.push(e)}#x(){let e=Array(_.length);for(let n=0;n<e.length;++n)e[n]=new Map;return e}#j(e,n){let r=e.get(n);return void 0===r&&(r=new Map,e.set(n,r)),r}#I(e,n){return e[this.#A(n)]}#C(){return[...this.#R,...this.#S,...this.#E,...this.#T]}#A(e){return e.isMultiple?!0===e.optional?_.multipleOptional:_.multipleMandatory:!0===e.optional?_.singleOptional:_.singleMandatory}}function eU(e,n){return P(n)?(e.cache={isRight:!0,value:n},n.then(n=>eq(e,n))):eq(e,n)}function eq(e,n){return e.cache={isRight:!0,value:n},n}async function eH(e,n,r){let i=await n,o=r.next();for(;!0!==o.done;)i=await o.value(e.context,i),o=r.next();return i}function eV(e,n,r){let i=r;if(void 0!==n.onActivation){let r=n.onActivation;i=P(i)?i.then(n=>r(e.context,n)):r(e.context,i)}var o=e,s=n.serviceIdentifier,a=i;let c=o.getActivations(s);return void 0===c?a:P(a)?eH(o,a,c[Symbol.iterator]()):function(e,n,r){let i=n,o=r.next();for(;!0!==o.done;){let n=o.value(e.context,i);if(P(n))return eH(e,n,r);i=n,o=r.next()}return i}(o,a,c[Symbol.iterator]())}function eX(e){return(n,r)=>r.cache.isRight?r.cache.value:eU(r,eV(n,r,e(n,r)))}let eW=eX(function(e,n){return n.value});function e$(e){return e}function ez(e,n){return(r,i)=>{let o=e(i);switch(o.scope){case X.Singleton:if(o.cache.isRight)return o.cache.value;return eU(o,eV(r,o,n(r,i)));case X.Request:{if(r.requestScopeCache.has(o.id))return r.requestScopeCache.get(o.id);let e=eV(r,o,n(r,i));return r.requestScopeCache.set(o.id,e),e}case X.Transient:return eV(r,o,n(r,i))}}}let eG=ez(e$,function(e,n){return n.value(e.context)}),eK=eX(function(e,n){return n.factory(e.context)});function eY(e,n,r){let i=function(e,n,r){if(void 0!==r){if(!(r in e))throw new ei(m.resolution,`Expecting a "${r.toString()}" property when resolving "${n.implementationType.name}" class @postConstruct decorated method, none found.`);if("function"!=typeof e[r])throw new ei(m.resolution,`Expecting a "${r.toString()}" method when resolving "${n.implementationType.name}" class @postConstruct decorated method, a non function property was found instead.`);{let i;try{i=e[r]()}catch(e){throw new ei(m.resolution,`Unexpected error found when calling "${r.toString()}" @postConstruct decorated method on class "${n.implementationType.name}"`,{cause:e})}if(P(i))return async function(e,n,r){try{await r}catch(r){throw new ei(m.resolution,`Unexpected error found when calling "${n.toString()}" @postConstruct decorated method on class "${e.implementationType.name}"`,{cause:r})}}(n,r,i)}}}(e,n,r);return P(i)?i.then(()=>e):e}function eJ(e){return(n,r,i)=>{let o=new i.binding.implementationType(...n),s=e(r,o,i);return P(s)?s.then(()=>eY(o,i.binding,i.classMetadata.lifecycle.postConstructMethodName)):eY(o,i.binding,i.classMetadata.lifecycle.postConstructMethodName)}}let eQ=eX(function(e,n){return n.provider(e.context)});function eZ(e){return e.binding}function e0(e){return e.binding}let e1=(r=e9,(e,n,i)=>{let o=[];for(let[s,a]of i.propertyParams){let c=i.classMetadata.properties.get(s);if(void 0===c)throw new ei(m.resolution,`Expecting metadata at property "${s.toString()}", none found`);c.kind!==v.unmanaged&&void 0!==a.bindings&&(n[s]=r(e,a),P(n[s])&&o.push((async()=>{n[s]=await n[s]})()))}if(o.length>0)return Promise.all(o).then(()=>{})}),e2=(i=e8,function e(n,r){let o=[];for(let s of r.redirections)eC(s)?o.push(...e(n,s)):o.push(i(n,s));return o}),e3=(o=e9,a=(e,n)=>{let r=[];for(let i of n.constructorParams)void 0===i?r.push(void 0):r.push(o(e,i));return r.some(P)?Promise.all(r):r},s=eJ(e1),c=async(e,n,r)=>s(await e,n,r),l=eJ(e1),(e,n)=>{let r=a(e,n);return P(r)?c(r,e,n):l(r,e,n)}),e6=(u=e9,d=(e,n)=>{let r=[];for(let i of n.params)r.push(u(e,i));return r.some(P)?Promise.all(r):r},(e,n)=>{let r=d(e,n);return P(r)?r.then(e=>n.binding.factory(...e)):n.binding.factory(...r)}),e5=ez(eZ,e3),e4=ez(e0,e6);function e8(e,n){switch(n.binding.type){case W.ConstantValue:return eW(e,n.binding);case W.DynamicValue:return eG(e,n.binding);case W.Factory:return eK(e,n.binding);case W.Instance:return e5(e,n);case W.Provider:return eQ(e,n.binding);case W.ResolvedValue:return e4(e,n)}}function e9(e,n){if(void 0!==n.bindings)return Array.isArray(n.bindings)?function(e,n){let r=[];for(let i of n)eC(i)?r.push(...e2(e,i)):r.push(e8(e,i));return r.some(P)?Promise.all(r):r}(e,n.bindings):function(e,n){if(eC(n)){let r=e2(e,n);if(1===r.length)return r[0];throw new ei(m.resolution,"Unexpected multiple resolved values on single injection")}return e8(e,n)}(e,n.bindings)}function e7(e,n){if(void 0!==e.lifecycle.preDestroyMethodName&&"function"==typeof n[e.lifecycle.preDestroyMethodName])return n[e.lifecycle.preDestroyMethodName]()}function te(e,n,r){let i=e.getDeactivations(n);if(void 0!==i)return P(r)?tt(r,i[Symbol.iterator]()):function(e,n){let r=n.next();for(;!0!==r.done;){if(P(r.value(e)))return tt(e,n);r=n.next()}}(r,i[Symbol.iterator]())}async function tt(e,n){let r=await e,i=n.next();for(;!0!==i.done;)await i.value(r),i=n.next()}function tn(e,n){let r=n.cache;return P(r.value)?r.value.then(r=>tr(e,n,r)):tr(e,n,r.value)}function tr(e,n,r){let i;return void 0!==n.onDeactivation&&(i=(0,n.onDeactivation)(r)),void 0===i?te(e,n.serviceIdentifier,r):i.then(()=>te(e,n.serviceIdentifier,r))}function ti(e,n){if(void 0===n)return;let r=function(e){let n=[];for(let r of e)void 0!==r.scope&&r.scope===X.Singleton&&r.cache.isRight&&n.push(r);return n}(n),i=[];for(let n of r){let r=function(e,n){let r=function(e,n){if(n.type===W.Instance){let r=e.getClassMetadata(n.implementationType),i=n.cache.value;return P(i)?i.then(e=>e7(r,e)):e7(r,i)}}(e,n);return void 0===r?tn(e,n):r.then(()=>tn(e,n))}(e,n);void 0!==r&&i.push(r)}return i.length>0?Promise.all(i).then(()=>{}):void 0}function to(e,n){let r=e.getBindings(n);return ti(e,r)}let ts=Symbol.for("@inversifyjs/plugin/isPlugin"),ta=Symbol.for("@inversifyjs/container/bindingIdentifier");function tc(e){return"object"==typeof e&&null!==e&&!0===e[ta]}class tl{static #k=this.always=e=>!0}function tu(e){return{[ta]:!0,id:e.id}}function td(e){return n=>{for(let r=n.getAncestor();void 0!==r;r=r.getAncestor())if(e(r))return!0;return!1}}function tp(e){return n=>n.name===e}function th(e){return n=>n.serviceIdentifier===e}function tf(e,n){return r=>r.tags.has(e)&&r.tags.get(e)===n}function tm(e){return void 0===e.name&&0===e.tags.size}function tg(e){let n=td(e);return e=>!n(e)}function tv(e){return n=>{let r=n.getAncestor();return void 0===r||!e(r)}}function ty(e){return n=>{let r=n.getAncestor();return void 0!==r&&e(r)}}class tb{#r;constructor(e){this.#r=e}getIdentifier(){return tu(this.#r)}inRequestScope(){return this.#r.scope=X.Request,new tR(this.#r)}inSingletonScope(){return this.#r.scope=X.Singleton,new tR(this.#r)}inTransientScope(){return this.#r.scope=X.Transient,new tR(this.#r)}}class t_{#t;#o;#s;#a;constructor(e,n,r,i){this.#t=e,this.#o=n,this.#s=r,this.#a=i}to(e){var n;let r=eo(e),i={cache:{isRight:!1,value:void 0},id:V(),implementationType:e,isSatisfiedBy:tl.always,moduleId:this.#o,onActivation:void 0,onDeactivation:void 0,scope:null!=(n=r.scope)?n:this.#s,serviceIdentifier:this.#a,type:W.Instance};return this.#t(i),new tS(i)}toSelf(){if("function"!=typeof this.#a)throw Error('"toSelf" function can only be applied when a newable function is used as service identifier');return this.to(this.#a)}toConstantValue(e){let n={cache:{isRight:!1,value:void 0},id:V(),isSatisfiedBy:tl.always,moduleId:this.#o,onActivation:void 0,onDeactivation:void 0,scope:X.Singleton,serviceIdentifier:this.#a,type:W.ConstantValue,value:e};return this.#t(n),new tR(n)}toDynamicValue(e){let n={cache:{isRight:!1,value:void 0},id:V(),isSatisfiedBy:tl.always,moduleId:this.#o,onActivation:void 0,onDeactivation:void 0,scope:this.#s,serviceIdentifier:this.#a,type:W.DynamicValue,value:e};return this.#t(n),new tS(n)}toResolvedValue(e,n){let r={cache:{isRight:!1,value:void 0},factory:e,id:V(),isSatisfiedBy:tl.always,metadata:this.#i(n),moduleId:this.#o,onActivation:void 0,onDeactivation:void 0,scope:this.#s,serviceIdentifier:this.#a,type:W.ResolvedValue};return this.#t(r),new tS(r)}toFactory(e){let n={cache:{isRight:!1,value:void 0},factory:e,id:V(),isSatisfiedBy:tl.always,moduleId:this.#o,onActivation:void 0,onDeactivation:void 0,scope:X.Singleton,serviceIdentifier:this.#a,type:W.Factory};return this.#t(n),new tR(n)}toProvider(e){let n={cache:{isRight:!1,value:void 0},id:V(),isSatisfiedBy:tl.always,moduleId:this.#o,onActivation:void 0,onDeactivation:void 0,provider:e,scope:X.Singleton,serviceIdentifier:this.#a,type:W.Provider};return this.#t(n),new tR(n)}toService(e){let n={id:V(),isSatisfiedBy:tl.always,moduleId:this.#o,serviceIdentifier:this.#a,targetServiceIdentifier:e,type:W.ServiceRedirection};this.#t(n)}#i(e){return{arguments:(null!=e?e:[]).map(e=>{var n,r,i;return"object"!=typeof(i=e)||L.is(i)?{kind:b.singleInjection,name:void 0,optional:!1,tags:new Map,value:e}:{kind:!0===e.isMultiple?b.multipleInjection:b.singleInjection,name:e.name,optional:null!=(n=e.optional)&&n,tags:new Map((null!=(r=e.tags)?r:[]).map(e=>[e.key,e.value])),value:e.serviceIdentifier}})}}}class tw{#r;constructor(e){this.#r=e}getIdentifier(){return tu(this.#r)}onActivation(e){return this.#r.onActivation=e,new tO(this.#r)}onDeactivation(e){return this.#r.onDeactivation=e,new tO(this.#r)}}class tO{#r;constructor(e){this.#r=e}getIdentifier(){return tu(this.#r)}when(e){return this.#r.isSatisfiedBy=e,new tw(this.#r)}whenAnyAncestor(e){return this.when(td(e))}whenAnyAncestorIs(e){return this.when(td(th(e)))}whenAnyAncestorNamed(e){return this.when(td(tp(e)))}whenAnyAncestorTagged(e,n){return this.when(td(tf(e,n)))}whenDefault(){return this.when(tm)}whenNamed(e){return this.when(tp(e))}whenNoParent(e){return this.when(tv(e))}whenNoParentIs(e){return this.when(tv(th(e)))}whenNoParentNamed(e){return this.when(tv(tp(e)))}whenNoParentTagged(e,n){return this.when(tv(tf(e,n)))}whenParent(e){return this.when(ty(e))}whenParentIs(e){return this.when(ty(th(e)))}whenParentNamed(e){return this.when(ty(tp(e)))}whenParentTagged(e,n){return this.when(ty(tf(e,n)))}whenTagged(e,n){return this.when(tf(e,n))}whenNoAncestor(e){return this.when(tg(e))}whenNoAncestorIs(e){return this.when(tg(th(e)))}whenNoAncestorNamed(e){return this.when(tg(tp(e)))}whenNoAncestorTagged(e,n){return this.when(tg(tf(e,n)))}}class tR extends tO{#c;constructor(e){super(e),this.#c=new tw(e)}onActivation(e){return this.#c.onActivation(e)}onDeactivation(e){return this.#c.onDeactivation(e)}}class tS extends tR{#u;constructor(e){super(e),this.#u=new tb(e)}inRequestScope(){return this.#u.inRequestScope()}inSingletonScope(){return this.#u.inSingletonScope()}inTransientScope(){return this.#u.inTransientScope()}}let tE=Symbol.for("@inversifyjs/container/InversifyContainerError");class tT extends Error{constructor(e,n,r){super(n,r),this[tE]=!0,this.kind=e}static is(e){return"object"==typeof e&&null!==e&&!0===e[tE]}static isErrorOfKind(e,n){return tT.is(e)&&e.kind===n}}!function(e){e[e.invalidOperation=0]="invalidOperation"}(w||(w={}));class tM{#d;#s;#l;constructor(e,n,r){this.#d=e,this.#s=n,this.#l=r}bind(e){return new t_(e=>{this.#m(e)},void 0,this.#s,e)}isBound(e,n){let r=this.#l.bindingService.get(e);return this.#v(e,r,n)}isCurrentBound(e,n){let r=this.#l.bindingService.getNonParentBindings(e);return this.#v(e,r,n)}async rebind(e){return await this.unbind(e),this.bind(e)}rebindSync(e){return this.unbindSync(e),this.bind(e)}async unbind(e){await this.#f(e)}async unbindAll(){let e=[...this.#l.bindingService.getNonParentBoundServices()];for(let n of(await Promise.all(e.map(async e=>to(this.#d,e))),e))this.#l.activationService.removeAllByServiceId(n),this.#l.bindingService.removeAllByServiceId(n),this.#l.deactivationService.removeAllByServiceId(n);this.#l.planResultCacheService.clearCache()}unbindSync(e){void 0!==this.#f(e)&&this.#h(e)}#m(e){this.#l.bindingService.set(e),this.#l.planResultCacheService.clearCache()}#h(e){var n;let r;if(tc(e)){let i=this.#l.bindingService.getById(e.id),o=null==(n=function(e){if(void 0===e)return;let n=e.next();return!0!==n.done?n.value:void 0}(null==i?void 0:i[Symbol.iterator]()))?void 0:n.serviceIdentifier;r=void 0===o?"Unexpected asynchronous deactivation when unbinding binding identifier. Consider using Container.unbind() instead.":`Unexpected asynchronous deactivation when unbinding "${N(o)}" binding. Consider using Container.unbind() instead.`}else r=`Unexpected asynchronous deactivation when unbinding "${N(e)}" service. Consider using Container.unbind() instead.`;throw new tT(w.invalidOperation,r)}#f(e){return tc(e)?this.#O(e):this.#p(e)}#O(e){let n=this.#l.bindingService.getById(e.id),r=ti(this.#d,n);if(void 0!==r)return r.then(()=>{this.#R(e)});this.#R(e)}#R(e){this.#l.bindingService.removeById(e.id),this.#l.planResultCacheService.clearCache()}#p(e){let n=to(this.#d,e);if(void 0!==n)return n.then(()=>{this.#b(e)});this.#b(e)}#b(e){this.#l.activationService.removeAllByServiceId(e),this.#l.bindingService.removeAllByServiceId(e),this.#l.deactivationService.removeAllByServiceId(e),this.#l.planResultCacheService.clearCache()}#v(e,n,r){if(void 0===n)return!1;let i={getAncestor:()=>{},name:null==r?void 0:r.name,serviceIdentifier:e,tags:new Map};for(let e of(void 0!==(null==r?void 0:r.tag)&&i.tags.set(r.tag.key,r.tag.value),n))if(e.isSatisfiedBy(i))return!0;return!1}}class tx{#y;#d;#s;#l;constructor(e,n,r,i){this.#y=e,this.#d=n,this.#s=r,this.#l=i}async load(){for(var e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];await Promise.all(this.#n(...n))}loadSync(){for(var e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];for(let e of this.#n(...n))if(void 0!==e)throw new tT(w.invalidOperation,"Unexpected asynchronous module load. Consider using Container.load() instead.")}async unload(){for(var e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];await Promise.all(this.#E(...n)),this.#w(n)}unloadSync(){for(var e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];for(let e of this.#E(...n))if(void 0!==e)throw new tT(w.invalidOperation,"Unexpected asynchronous module unload. Consider using Container.unload() instead.");this.#w(n)}#g(e){return{bind:n=>new t_(e=>{this.#m(e)},e,this.#s,n),isBound:this.#y.isBound.bind(this.#y),onActivation:(n,r)=>{this.#l.activationService.add(r,{moduleId:e,serviceId:n})},onDeactivation:(n,r)=>{this.#l.deactivationService.add(r,{moduleId:e,serviceId:n})},rebind:this.#y.rebind.bind(this.#y),rebindSync:this.#y.rebindSync.bind(this.#y),unbind:this.#y.unbind.bind(this.#y),unbindSync:this.#y.unbindSync.bind(this.#y)}}#w(e){for(let n of e)this.#l.activationService.removeAllByModuleId(n.id),this.#l.bindingService.removeAllByModuleId(n.id),this.#l.deactivationService.removeAllByModuleId(n.id);this.#l.planResultCacheService.clearCache()}#n(){for(var e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];return n.map(e=>e.load(this.#g(e.id)))}#m(e){this.#l.bindingService.set(e),this.#l.planResultCacheService.clearCache()}#E(){for(var e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];return n.map(e=>(function(e,n){let r=e.getBindingsFromModule(n);return ti(e,r)})(this.#d,e.id))}}class tC{#_;#M;#B;#l;constructor(e,n,r){this.#l=n,this.#B=r,this.#_=this.#x(e),this.#M=this.#C()}register(e,n){let r=new n(e,this.#M);if(!0!==r[ts])throw new tT(w.invalidOperation,"Invalid plugin. The plugin must extend the Plugin class");r.load(this.#_)}#x(e){return{define:(n,r)=>{if(Object.prototype.hasOwnProperty.call(e,n))throw new tT(w.invalidOperation,`Container already has a method named "${String(n)}"`);e[n]=r},onPlan:this.#B.onPlan.bind(this.#B)}}#C(){let e=this.#l;return{get activationService(){return e.activationService},get bindingService(){return e.bindingService},get deactivationService(){return e.deactivationService},get planResultCacheService(){return e.planResultCacheService}}}}class tI{#j;constructor(e,n,r,i){this.activationService=e,this.bindingService=n,this.deactivationService=r,this.planResultCacheService=i,this.#j=[]}reset(e,n,r){for(let i of(this.activationService=e,this.bindingService=n,this.deactivationService=r,this.planResultCacheService.clearCache(),this.#j))i()}onReset(e){this.#j.push(e)}}class tj{#P;#s;#N;#D;#L;#F;#l;#S;constructor(e,n,r){this.#l=e,this.#L=this.#A(),this.#P=n,this.#s=r,this.#N=e=>this.#l.activationService.get(e),this.#D=this.#l.bindingService.get.bind(this.#l.bindingService),this.#F=[],this.#S=this.#m.bind(this),this.#l.onReset(()=>{this.#T()})}get(e,n){let r=this.#U(!1,e,n),i=this.#q(r);if(P(i))throw new tT(w.invalidOperation,`Unexpected asynchronous service when resolving service "${N(e)}"`);return i}getAll(e,n){let r=this.#U(!0,e,n),i=this.#q(r);if(P(i))throw new tT(w.invalidOperation,`Unexpected asynchronous service when resolving service "${N(e)}"`);return i}async getAllAsync(e,n){let r=this.#U(!0,e,n);return this.#q(r)}async getAsync(e,n){let r=this.#U(!1,e,n);return this.#q(r)}onPlan(e){this.#F.push(e)}#T(){this.#D=this.#l.bindingService.get.bind(this.#l.bindingService),this.#S=this.#m.bind(this),this.#L=this.#A()}#H(e,n,r){return{isMultiple:e,name:null==r?void 0:r.name,optional:null==r?void 0:r.optional,serviceIdentifier:n,tag:null==r?void 0:r.tag}}#V(e,n,r){var i;let o={autobindOptions:(null!=(i=null==r?void 0:r.autobind)?i:this.#P)?{scope:this.#s}:void 0,getBindings:this.#D,getClassMetadata:eo,rootConstraints:{isMultiple:n,serviceIdentifier:e},servicesBranch:[],setBinding:this.#S};return this.#I(o,r),o}#U(e,n,r){let i=this.#H(e,n,r),o=this.#l.planResultCacheService.get(i);if(void 0!==o)return o;let s=function(e){try{let r=new Map;void 0!==e.rootConstraints.tag&&r.set(e.rootConstraints.tag.key,e.rootConstraints.tag.value);let i=new eM({elem:{name:e.rootConstraints.name,serviceIdentifier:e.rootConstraints.serviceIdentifier,tags:r},previous:void 0}),o=new eT(i.last),s=ex(e,o),a=[],c={bindings:a,parent:void 0,serviceIdentifier:e.rootConstraints.serviceIdentifier};if(a.push(...eN(e,i,s,c)),!e.rootConstraints.isMultiple){var n;eB(c,null!=(n=e.rootConstraints.isOptional)&&n,o);let[r]=a;c.bindings=r}return{tree:{root:c}}}catch(n){var r,i=e,o=n;if((r=o)instanceof Error&&(r instanceof RangeError&&/stack space|call stack|too much recursion/i.test(r.message)||"InternalError"===r.name&&/too much recursion/.test(r.message))){let e=function(e){let n=[...e];return 0===n.length?"(No dependency trace)":n.map(N).join(" -> ")}(function(e){let n=new Set;for(let r of e.servicesBranch){if(n.has(r))return[...n,r];n.add(r)}return[...n]}(i));throw new ei(m.planning,`Circular dependency found: ${e}`,{cause:o})}throw o}}(this.#V(n,e,r));for(let e of(this.#l.planResultCacheService.set(i,s),this.#F))e(i,s);return s}#A(){return{get:this.get.bind(this),getAll:this.getAll.bind(this),getAllAsync:this.getAllAsync.bind(this),getAsync:this.getAsync.bind(this)}}#q(e){var n;return e9(n={context:this.#L,getActivations:this.#N,planResult:e,requestScopeCache:new Map},n.planResult.tree.root)}#I(e,n){void 0!==n&&(void 0!==n.name&&(e.rootConstraints.name=n.name),!0===n.optional&&(e.rootConstraints.isOptional=!0),void 0!==n.tag&&(e.rootConstraints.tag={key:n.tag.key,value:n.tag.value}))}#m(e){this.#l.bindingService.set(e),this.#l.planResultCacheService.clearCache()}}class tA{#l;#X;constructor(e){this.#l=e,this.#X=[]}restore(){let e=this.#X.pop();if(void 0===e)throw new tT(w.invalidOperation,"No snapshot available to restore");this.#l.reset(e.activationService,e.bindingService,e.deactivationService)}snapshot(){this.#X.push({activationService:this.#l.activationService.clone(),bindingService:this.#l.bindingService.clone(),deactivationService:this.#l.deactivationService.clone()})}}let tk=X.Transient;class tB{#y;#W;#k;#l;#B;#$;constructor(e){var n,r,i;this.#l=this.#z(e);let o=null!=(n=null==e?void 0:e.autobind)&&n,s=null!=(r=null==e?void 0:e.defaultScope)?r:tk,a={getBindings:(i=this.#l).bindingService.get.bind(i.bindingService),getBindingsFromModule:i.bindingService.getByModuleId.bind(i.bindingService),getClassMetadata:eo,getDeactivations:i.deactivationService.get.bind(i.deactivationService)};this.#y=new tM(a,s,this.#l),this.#W=new tx(this.#y,a,s,this.#l),this.#B=new tj(this.#l,o,s),this.#k=new tC(this,this.#l,this.#B),this.#$=new tA(this.#l)}bind(e){return this.#y.bind(e)}get(e,n){return this.#B.get(e,n)}getAll(e,n){return this.#B.getAll(e,n)}async getAllAsync(e,n){return this.#B.getAllAsync(e,n)}async getAsync(e,n){return this.#B.getAsync(e,n)}isBound(e,n){return this.#y.isBound(e,n)}isCurrentBound(e,n){return this.#y.isCurrentBound(e,n)}async load(){for(var e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];return this.#W.load(...n)}loadSync(){for(var e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];this.#W.loadSync(...n)}onActivation(e,n){this.#l.activationService.add(n,{serviceId:e})}onDeactivation(e,n){this.#l.deactivationService.add(n,{serviceId:e})}register(e){this.#k.register(this,e)}restore(){this.#$.restore()}async rebind(e){return this.#y.rebind(e)}rebindSync(e){return this.#y.rebindSync(e)}snapshot(){this.#$.snapshot()}async unbind(e){await this.#y.unbind(e)}async unbindAll(){return this.#y.unbindAll()}unbindSync(e){this.#y.unbindSync(e)}async unload(){for(var e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];return this.#W.unload(...n)}unloadSync(){for(var e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];this.#W.unloadSync(...n)}#z(e){if(void 0===(null==e?void 0:e.parent))return new tI(G.build(void 0),J.build(void 0),Q.build(void 0),new eF);let n=new eF;return e.parent.#l.planResultCacheService.subscribe(n),new tI(G.build(e.parent.#l.activationService),J.build(e.parent.#l.bindingService),Q.build(e.parent.#l.deactivationService),n)}}let tP=new WeakMap,tN=new WeakMap,tD=new WeakMap,tL=Symbol("anyProducer"),tF=Promise.resolve(),tU=Symbol("listenerAdded"),tq=Symbol("listenerRemoved"),tH=!1,tV=!1,tX=e=>"string"==typeof e||"symbol"==typeof e||"number"==typeof e;function tW(e){if(!tX(e))throw TypeError("`eventName` must be a string, symbol, or number")}function t$(e){if("function"!=typeof e)throw TypeError("listener must be a function")}function tz(e,n){let r=tN.get(e);if(r.has(n))return r.get(n)}function tG(e,n){let r=tX(n)?n:tL,i=tD.get(e);if(i.has(r))return i.get(r)}function tK(e,n){n=Array.isArray(n)?n:[n];let r=!1,i=()=>{},o=[],s={enqueue(e){o.push(e),i()},finish(){r=!0,i()}};for(let r of n){let n=tG(e,r);n||(n=new Set,tD.get(e).set(r,n)),n.add(s)}return{async next(){return o?0===o.length?(r?o=void 0:await new Promise(e=>{i=e}),this.next()):{done:!1,value:await o.shift()}:{done:!0}},async return(r){for(let r of(o=void 0,n)){let n=tG(e,r);n&&(n.delete(s),0===n.size&&tD.get(e).delete(r))}return i(),arguments.length>0?{done:!0,value:await r}:{done:!0}},[Symbol.asyncIterator](){return this}}}function tY(e){if(void 0===e)return t0;if(!Array.isArray(e))throw TypeError("`methodNames` must be an array of strings");for(let n of e)if(!t0.includes(n)){if("string"!=typeof n)throw TypeError("`methodNames` element must be a string");throw Error(`${n} is not Emittery method`)}return e}let tJ=e=>e===tU||e===tq;function tQ(e,n,r){if(tJ(n))try{tH=!0,e.emit(n,r)}finally{tH=!1}}class tZ{static mixin(e,n){return n=tY(n),r=>{if("function"!=typeof r)throw TypeError("`target` must be function");for(let e of n)if(void 0!==r.prototype[e])throw Error(`The property \`${e}\` already exists on \`target\``);Object.defineProperty(r.prototype,e,{enumerable:!1,get:function(){return Object.defineProperty(this,e,{enumerable:!1,value:new tZ}),this[e]}});let i=n=>function(){for(var r=arguments.length,i=Array(r),o=0;o<r;o++)i[o]=arguments[o];return this[e][n](...i)};for(let e of n)Object.defineProperty(r.prototype,e,{enumerable:!1,value:i(e)});return r}}static get isDebugEnabled(){var e,n;if("object"!=typeof(null==(e=globalThis.process)?void 0:e.env))return tV;let{env:r}=null!=(n=globalThis.process)?n:{env:{}};return"emittery"===r.DEBUG||"*"===r.DEBUG||tV}static set isDebugEnabled(e){tV=e}constructor(e={}){var n;tP.set(this,new Set),tN.set(this,new Map),tD.set(this,new Map),tD.get(this).set(tL,new Set),this.debug=null!=(n=e.debug)?n:{},void 0===this.debug.enabled&&(this.debug.enabled=!1),this.debug.logger||(this.debug.logger=(e,n,r,i)=>{try{i=JSON.stringify(i)}catch{i=`Object with the following keys failed to stringify: ${Object.keys(i).join(",")}`}("symbol"==typeof r||"number"==typeof r)&&(r=r.toString());let o=new Date,s=`${o.getHours()}:${o.getMinutes()}:${o.getSeconds()}.${o.getMilliseconds()}`;console.log(`[${s}][emittery:${e}][${n}] Event Name: ${r}
44
- data: ${i}`)})}logIfDebugEnabled(e,n,r){(tZ.isDebugEnabled||this.debug.enabled)&&this.debug.logger(e,this.debug.name,n,r)}on(e,n){let{signal:r}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};for(let r of(t$(n),e=Array.isArray(e)?e:[e])){tW(r);let e=tz(this,r);e||(e=new Set,tN.get(this).set(r,e)),e.add(n),this.logIfDebugEnabled("subscribe",r,void 0),tJ(r)||tQ(this,tU,{eventName:r,listener:n})}let i=()=>{this.off(e,n),null==r||r.removeEventListener("abort",i)};return null==r||r.addEventListener("abort",i,{once:!0}),(null==r?void 0:r.aborted)&&i(),i}off(e,n){for(let r of(t$(n),e=Array.isArray(e)?e:[e])){tW(r);let e=tz(this,r);e&&(e.delete(n),0===e.size&&tN.get(this).delete(r)),this.logIfDebugEnabled("unsubscribe",r,void 0),tJ(r)||tQ(this,tq,{eventName:r,listener:n})}}once(e,n){let r;if(void 0!==n&&"function"!=typeof n)throw TypeError("predicate must be a function");let i=new Promise(i=>{r=this.on(e,e=>{(!n||n(e))&&(r(),i(e))})});return i.off=r,i}events(e){for(let n of e=Array.isArray(e)?e:[e])tW(n);return tK(this,e)}async emit(e,n){if(tW(e),tJ(e)&&!tH)throw TypeError("`eventName` cannot be meta event `listenerAdded` or `listenerRemoved`");this.logIfDebugEnabled("emit",e,n);var r,i=this,o=e,s=n;let a=tD.get(i);if(a.has(o))for(let e of a.get(o))e.enqueue(s);if(a.has(tL)){let e=Promise.all([o,s]);for(let n of a.get(tL))n.enqueue(e)}let c=null!=(r=tz(this,e))?r:new Set,l=tP.get(this),u=[...c],d=tJ(e)?[]:[...l];await tF,await Promise.all([...u.map(async e=>{if(c.has(e))return e(n)}),...d.map(async r=>{if(l.has(r))return r(e,n)})])}async emitSerial(e,n){var r;if(tW(e),tJ(e)&&!tH)throw TypeError("`eventName` cannot be meta event `listenerAdded` or `listenerRemoved`");this.logIfDebugEnabled("emitSerial",e,n);let i=null!=(r=tz(this,e))?r:new Set,o=tP.get(this),s=[...i],a=[...o];for(let e of(await tF,s))i.has(e)&&await e(n);for(let r of a)o.has(r)&&await r(e,n)}onAny(e){let{signal:n}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t$(e),this.logIfDebugEnabled("subscribeAny",void 0,void 0),tP.get(this).add(e),tQ(this,tU,{listener:e});let r=()=>{this.offAny(e),null==n||n.removeEventListener("abort",r)};return null==n||n.addEventListener("abort",r,{once:!0}),(null==n?void 0:n.aborted)&&r(),r}anyEvent(){return tK(this)}offAny(e){t$(e),this.logIfDebugEnabled("unsubscribeAny",void 0,void 0),tQ(this,tq,{listener:e}),tP.get(this).delete(e)}clearListeners(e){for(let n of e=Array.isArray(e)?e:[e])if(this.logIfDebugEnabled("clear",n,void 0),tX(n)){let e=tz(this,n);e&&e.clear();let r=tG(this,n);if(r){for(let e of r)e.finish();r.clear()}}else{for(let[e,n]of(tP.get(this).clear(),tN.get(this).entries()))n.clear(),tN.get(this).delete(e);for(let[e,n]of tD.get(this).entries()){for(let e of n)e.finish();n.clear(),tD.get(this).delete(e)}}}listenerCount(e){e=Array.isArray(e)?e:[e];let n=0;for(let l of e){if(tX(l)){var r,i,o,s,a,c;n+=tP.get(this).size+(null!=(s=null==(r=tz(this,l))?void 0:r.size)?s:0)+(null!=(a=null==(i=tG(this,l))?void 0:i.size)?a:0)+(null!=(c=null==(o=tG(this))?void 0:o.size)?c:0);continue}for(let e of(void 0!==l&&tW(l),n+=tP.get(this).size,tN.get(this).values()))n+=e.size;for(let e of tD.get(this).values())n+=e.size}return n}bindMethods(e,n){if("object"!=typeof e||null===e)throw TypeError("`target` must be an object");for(let r of n=tY(n)){if(void 0!==e[r])throw Error(`The property \`${r}\` already exists on \`target\``);Object.defineProperty(e,r,{enumerable:!1,value:this[r].bind(this)})}}}let t0=Object.getOwnPropertyNames(tZ.prototype).filter(e=>"constructor"!==e);Object.defineProperty(tZ,"listenerAdded",{value:tU,writable:!1,enumerable:!0,configurable:!1}),Object.defineProperty(tZ,"listenerRemoved",{value:tq,writable:!1,enumerable:!0,configurable:!1});let t1={AaaSPilotKitController:Symbol.for("AaaSPilotKitController"),SignalingService:Symbol.for("SignalingService"),ASRService:Symbol.for("ASRService"),AgentService:Symbol.for("AgentService"),DigitalHumanService:Symbol.for("DigitalHumanService"),ConversationService:Symbol.for("ConversationService"),CommonRequest:Symbol.for("CommonRequest"),ErrorManager:Symbol.for("ErrorManager"),IOptions:Symbol.for("IOptions")};class t2 extends Error{constructor(e,n,r){let i=e.status||0===e.status?e.status:"",o=e.statusText||"",s=`${i} ${o}`.trim();super(`Request failed with ${s?`status code ${s}`:"an unknown error"}: ${n.method} ${n.url}`),this.name="HTTPError",this.response=e,this.request=n,this.options=r}}class t3 extends Error{constructor(e){super(`Request timed out: ${e.method} ${e.url}`),this.name="TimeoutError",this.request=e}}__webpack_require__("../../node_modules/core-js/modules/es.typed-array.set.js");let t6=(()=>{let e=!1,n=!1,r="function"==typeof globalThis.Request;if("function"==typeof globalThis.ReadableStream&&r)try{n=new globalThis.Request("https://empty.invalid",{body:new globalThis.ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type")}catch(e){if(e instanceof Error&&"unsupported BodyInit type"===e.message)return!1;throw e}return e&&!n})(),t5="function"==typeof globalThis.AbortController,t4="function"==typeof globalThis.ReadableStream,t8="function"==typeof globalThis.FormData,t9=["get","post","put","patch","head","delete"],t7={json:"application/json",text:"text/*",formData:"multipart/form-data",arrayBuffer:"*/*",blob:"*/*"},ne=new TextEncoder().encode("------WebKitFormBoundaryaxpyiPgbbPti10Rw").length,nt=Symbol("stop"),nn={json:!0,parseJson:!0,stringifyJson:!0,searchParams:!0,prefixUrl:!0,retry:!0,timeout:!0,hooks:!0,throwHttpErrors:!0,onDownloadProgress:!0,onUploadProgress:!0,fetch:!0},nr={method:!0,headers:!0,body:!0,mode:!0,credentials:!0,cache:!0,redirect:!0,referrer:!0,referrerPolicy:!0,integrity:!0,keepalive:!0,signal:!0,window:!0,dispatcher:!0,duplex:!0,priority:!0},ni=e=>{if(!e)return 0;if(e instanceof FormData){let n=0;for(let[r,i]of e)n+=ne,n+=new TextEncoder().encode(`Content-Disposition: form-data; name="${r}"`).length,n+="string"==typeof i?new TextEncoder().encode(i).length:i.size;return n}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength;if("string"==typeof e)return new TextEncoder().encode(e).length;if(e instanceof URLSearchParams)return new TextEncoder().encode(e.toString()).length;if("byteLength"in e)return e.byteLength;if("object"==typeof e&&null!==e)try{let n=JSON.stringify(e);return new TextEncoder().encode(n).length}catch{}return 0},no=(e,n)=>{let r=Number(e.headers.get("content-length"))||0,i=0;return 204===e.status?(n&&n({percent:1,totalBytes:r,transferredBytes:i},new Uint8Array),new Response(null,{status:e.status,statusText:e.statusText,headers:e.headers})):new Response(new ReadableStream({async start(o){let s=e.body.getReader();async function a(){let{done:e,value:c}=await s.read();if(e)return void o.close();n&&(i+=c.byteLength,n({percent:0===r?0:i/r,transferredBytes:i,totalBytes:r},c)),o.enqueue(c),await a()}n&&n({percent:0,transferredBytes:0,totalBytes:r},new Uint8Array),await a()}}),{status:e.status,statusText:e.statusText,headers:e.headers})},ns=(e,n)=>{let r=ni(e.body),i=0;return new Request(e,{duplex:"half",body:new ReadableStream({async start(o){let s=e.body instanceof ReadableStream?e.body.getReader():new Response("").body.getReader();async function a(){let{done:e,value:c}=await s.read();if(e){n&&n({percent:1,transferredBytes:i,totalBytes:Math.max(r,i)},new Uint8Array),o.close();return}i+=c.byteLength;let l=0===r?0:i/r;(r<i||1===l)&&(l=.99),n&&n({percent:Number(l.toFixed(2)),transferredBytes:i,totalBytes:r},c),o.enqueue(c),await a()}await a()}})})},na=e=>null!==e&&"object"==typeof e,nc=function(){for(var e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];for(let e of n)if((!na(e)||Array.isArray(e))&&void 0!==e)throw TypeError("The `options` argument must be an object");return np({},...n)},nl=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=new globalThis.Headers(e),i=n instanceof globalThis.Headers;for(let[e,o]of new globalThis.Headers(n).entries())i&&"undefined"===o||void 0===o?r.delete(e):r.set(e,o);return r};function nu(e,n,r){var i,o;return Object.hasOwn(n,r)&&void 0===n[r]?[]:np(null!=(i=e[r])?i:[],null!=(o=n[r])?o:[])}let nd=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{beforeRequest:nu(e,n,"beforeRequest"),beforeRetry:nu(e,n,"beforeRetry"),afterResponse:nu(e,n,"afterResponse"),beforeError:nu(e,n,"beforeError")}},np=function(){for(var e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];let i={},o={},s={};for(let e of n)if(Array.isArray(e))Array.isArray(i)||(i=[]),i=[...i,...e];else if(na(e)){for(let[n,r]of Object.entries(e))na(r)&&n in i&&(r=np(i[n],r)),i={...i,[n]:r};na(e.hooks)&&(s=nd(s,e.hooks),i.hooks=s),na(e.headers)&&(o=nl(o,e.headers),i.headers=o)}return i},nh=e=>t9.includes(e)?e.toUpperCase():e,nf={limit:2,methods:["get","put","head","delete","options","trace"],statusCodes:[408,413,429,500,502,503,504],afterStatusCodes:[413,429,503],maxRetryAfter:Number.POSITIVE_INFINITY,backoffLimit:Number.POSITIVE_INFINITY,delay:e=>.3*2**(e-1)*1e3},nm=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if("number"==typeof e)return{...nf,limit:e};if(e.methods&&!Array.isArray(e.methods))throw Error("retry.methods must be an array");if(e.statusCodes&&!Array.isArray(e.statusCodes))throw Error("retry.statusCodes must be an array");return{...nf,...e}};async function ng(e,n,r,i){return new Promise((o,s)=>{let a=setTimeout(()=>{r&&r.abort(),s(new t3(e))},i.timeout);i.fetch(e,n).then(o).catch(s).then(()=>{clearTimeout(a)})})}async function nv(e,n){let{signal:r}=n;return new Promise((n,i)=>{function o(){clearTimeout(s),i(r.reason)}r&&(r.throwIfAborted(),r.addEventListener("abort",o,{once:!0}));let s=setTimeout(()=>{null==r||r.removeEventListener("abort",o),n()},e)})}let ny=(e,n)=>{let r={};for(let i in n)i in nr||i in nn||i in e||(r[i]=n[i]);return r};class nb{static create(e,n){let r=new nb(e,n),i=async()=>{if("number"==typeof r._options.timeout&&r._options.timeout>0x7fffffff)throw RangeError("The `timeout` option cannot be greater than 2147483647");await Promise.resolve();let e=await r._fetch();for(let n of r._options.hooks.afterResponse){let i=await n(r.request,r._options,r._decorateResponse(e.clone()));i instanceof globalThis.Response&&(e=i)}if(r._decorateResponse(e),!e.ok&&r._options.throwHttpErrors){let n=new t2(e,r.request,r._options);for(let e of r._options.hooks.beforeError)n=await e(n);throw n}if(r._options.onDownloadProgress){if("function"!=typeof r._options.onDownloadProgress)throw TypeError("The `onDownloadProgress` option must be a function");if(!t4)throw Error("Streams are not supported in your environment. `ReadableStream` is missing.");return no(e.clone(),r._options.onDownloadProgress)}return e},o=(r._options.retry.methods.includes(r.request.method.toLowerCase())?r._retry(i):i()).finally(async()=>{if(!r.request.bodyUsed){var e;await (null==(e=r.request.body)?void 0:e.cancel())}});for(let[e,i]of Object.entries(t7))o[e]=async()=>{r.request.headers.set("accept",r.request.headers.get("accept")||i);let s=await o;if("json"===e){if(204===s.status||0===(await s.clone().arrayBuffer()).byteLength)return"";if(n.parseJson)return n.parseJson(await s.text())}return s[e]()};return o}constructor(e,n={}){var r,i,o,s,a,c,l,u,d;if(this._retryCount=0,this._input=e,this._options={...n,headers:nl(this._input.headers,n.headers),hooks:nd({beforeRequest:[],beforeRetry:[],beforeError:[],afterResponse:[]},n.hooks),method:nh(null!=(i=null!=(r=n.method)?r:this._input.method)?i:"GET"),prefixUrl:String(n.prefixUrl||""),retry:nm(n.retry),throwHttpErrors:!1!==n.throwHttpErrors,timeout:null!=(o=n.timeout)?o:1e4,fetch:null!=(s=n.fetch)?s:globalThis.fetch.bind(globalThis)},"string"!=typeof this._input&&!(this._input instanceof URL||this._input instanceof globalThis.Request))throw TypeError("`input` must be a string, URL, or Request");if(this._options.prefixUrl&&"string"==typeof this._input){if(this._input.startsWith("/"))throw Error("`input` must not begin with a slash when using `prefixUrl`");this._options.prefixUrl.endsWith("/")||(this._options.prefixUrl+="/"),this._input=this._options.prefixUrl+this._input}if(t5){let e=null!=(a=this._options.signal)?a:this._input.signal;this.abortController=new globalThis.AbortController,this._options.signal=e?AbortSignal.any([e,this.abortController.signal]):this.abortController.signal}if(t6&&(this._options.duplex="half"),void 0!==this._options.json&&(this._options.body=null!=(u=null==(c=(l=this._options).stringifyJson)?void 0:c.call(l,this._options.json))?u:JSON.stringify(this._options.json),this._options.headers.set("content-type",null!=(d=this._options.headers.get("content-type"))?d:"application/json")),this.request=new globalThis.Request(this._input,this._options),this._options.searchParams){let e="string"==typeof this._options.searchParams?this._options.searchParams.replace(/^\?/,""):new URLSearchParams(this._options.searchParams).toString(),n=this.request.url.replace(/(?:\?.*?)?(?=#|$)/,"?"+e);(t8&&this._options.body instanceof globalThis.FormData||this._options.body instanceof URLSearchParams)&&!(this._options.headers&&this._options.headers["content-type"])&&this.request.headers.delete("content-type"),this.request=new globalThis.Request(new globalThis.Request(n,{...this.request}),this._options)}if(this._options.onUploadProgress){if("function"!=typeof this._options.onUploadProgress)throw TypeError("The `onUploadProgress` option must be a function");if(!t6)throw Error("Request streams are not supported in your environment. The `duplex` option for `Request` is not available.");this.request.body&&(this.request=ns(this.request,this._options.onUploadProgress))}}_calculateRetryDelay(e){if(this._retryCount++,this._retryCount>this._options.retry.limit||e instanceof t3)throw e;if(e instanceof t2){var n,r,i,o;if(!this._options.retry.statusCodes.includes(e.response.status))throw e;let s=null!=(i=null!=(r=null!=(n=e.response.headers.get("Retry-After"))?n:e.response.headers.get("RateLimit-Reset"))?r:e.response.headers.get("X-RateLimit-Reset"))?i:e.response.headers.get("X-Rate-Limit-Reset");if(s&&this._options.retry.afterStatusCodes.includes(e.response.status)){let e=1e3*Number(s);Number.isNaN(e)?e=Date.parse(s)-Date.now():e>=Date.parse("2024-01-01")&&(e-=Date.now());let n=null!=(o=this._options.retry.maxRetryAfter)?o:e;return e<n?e:n}if(413===e.response.status)throw e}let s=this._options.retry.delay(this._retryCount);return Math.min(this._options.retry.backoffLimit,s)}_decorateResponse(e){return this._options.parseJson&&(e.json=async()=>this._options.parseJson(await e.text())),e}async _retry(e){try{return await e()}catch(r){let n=Math.min(this._calculateRetryDelay(r),0x7fffffff);if(this._retryCount<1)throw r;for(let e of(await nv(n,{signal:this._options.signal}),this._options.hooks.beforeRetry))if(await e({request:this.request,options:this._options,error:r,retryCount:this._retryCount})===nt)return;return this._retry(e)}}async _fetch(){for(let e of this._options.hooks.beforeRequest){let n=await e(this.request,this._options);if(n instanceof Request){this.request=n;break}if(n instanceof Response)return n}let e=ny(this.request,this._options),n=this.request;return(this.request=n.clone(),!1===this._options.timeout)?this._options.fetch(n,e):ng(n,e,this.abortController,this._options)}}let n_=e=>{let n=(n,r)=>nb.create(n,nc(e,r));for(let r of t9)n[r]=(n,i)=>nb.create(n,nc(e,i,{method:r}));return n.create=e=>n_(nc(e)),n.extend=n=>("function"==typeof n&&(n=n(null!=e?e:{})),n_(nc(e,n))),n.stop=nt,n},nw=n_();function nO(e,n){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,n)}function nR(e,n){return function(r,i){n(r,i,e)}}class nS{static #k=this.ONLINE_HOST="https://ky.cloud.baidu.com";static #G=this.SANDBOX_HOST="https://ky-test.cloud.baidu.com";constructor(e){this.opts=e,"production"===this.opts.env?this.client=nw.create({prefixUrl:nS.ONLINE_HOST}):this.client=nw.create({prefixUrl:nS.SANDBOX_HOST})}}nS=function(e,n,r,i){var o,s=arguments.length,a=s<3?n:null===i?i=Object.getOwnPropertyDescriptor(n,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,n,r,i);else for(var c=e.length-1;c>=0;c--)(o=e[c])&&(a=(s<3?o(a):s>3?o(n,r,a):o(n,r))||a);return s>3&&a&&Object.defineProperty(n,r,a),a}([ey(),nR(0,em(t1.IOptions)),nR(0,eR()),nO("design:type",Function),nO("design:paramtypes",["undefined"==typeof IResolvedOptions?Object:IResolvedOptions])],nS);var nE=function(e){return e.NETWORK="NETWORK",e.TIMEOUT="TIMEOUT",e.AUTHENTICATION="AUTHENTICATION",e.AUTHORIZATION="AUTHORIZATION",e.RESOURCE="RESOURCE",e.CONFIGURATION="CONFIGURATION",e.PARSING="PARSING",e.SERVICE="SERVICE",e.VALIDATION="VALIDATION",e.INTERNAL="INTERNAL",e}({}),nT=function(e){return e.LOW="LOW",e.MEDIUM="MEDIUM",e.HIGH="HIGH",e.CRITICAL="CRITICAL",e}({});class nM extends Error{constructor(e,n,r,i=nT.MEDIUM,o={},s){super(n),this.name=this.constructor.name,this.code=e,this.category=r,this.severity=i,this.actionRequired=s,this.metadata={timestamp:Date.now(),stack:this.stack,...o},Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=Error(n).stack}static fromError(e,n,r){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:nT.MEDIUM;return new nM(n,e.message,r,i,{originalError:e,stack:e.stack})}toJSON(){return{code:this.code,message:this.message,category:this.category,severity:this.severity,metadata:this.metadata,actionRequired:this.actionRequired}}toString(){return`${this.name} [${this.code}]: ${this.message}`}}let nx={AGENT_QUERY_FAILED:"2001",AGENT_RESPONSE_PARSE_ERROR:"2002",AGENT_CONNECTION_FAILED:"2005",AGENT_INSTRUCTION_INVALID:"2006",ASR_INITIALIZATION_FAILED:"3001",ASR_STOP_FAILED:"3003",ASR_PERMISSION_DENIED:"3008",ASR_MESSAGE_PARSE_ERROR:"3010",ASR_MESSAGE_INTERVAL_TIMEOUT:"3013",ASR_RUNTIME_ERROR:"3014",DH_MOUNT_FAILED:"4001",DH_IFRAME_LOAD_ERROR:"4002",DH_RENDER_ERROR:"4003",DH_WEBSOCKET_ERROR:"4004",DH_RTC_ERROR:"4005",DH_AUTHENTICATION_ERROR:"4006",DH_RESOURCE_NOT_ENOUGH:"4008"},nC={1e3:"发生未知错误",1001:"网络连接错误",1002:"请求超时",1003:"配置无效",1004:"身份验证失败",1005:"权限验证失败",1006:"数据验证失败",1007:"资源未找到",1008:"资源不可用",1009:"内部错误",2001:"Agent查询失败",2002:"Agent响应解析错误",2003:"Agent请求超时",2004:"Agent响应无效",2005:"Agent连接失败",2006:"Agent指令无效",3001:"ASR初始化失败",3002:"ASR启动失败",3003:"ASR停止失败",3004:"ASR信令错误",3005:"ASR音频捕获错误",3006:"ASR识别错误",3007:"ASR网络错误",3008:"ASR权限被拒绝",3009:"ASR设备未找到",3010:"ASR消息解析错误",3011:"ASR会话无效",3012:"ASR静音失败",3013:"ASR消息间隔超时",3014:"ASR运行时错误",4001:"数字人挂载失败",4002:"数字人iframe加载错误",4003:"数字人渲染错误",4004:"数字人WebSocket错误",4005:"数字人RTC错误",4006:"数字人认证错误",4007:"数字人会话数量达到上限",4008:"数字人资源不足",4009:"数字人超时",4010:"数字人中断失败",4011:"数字人SSML解析错误",4012:"数字人形象ID无效",4013:"数字人token无效",4014:"数字人流式渲染错误",4015:"数字人控制器未就绪",4016:"数字人播报文本长度不匹配",5001:"会话创建失败",5002:"会话类型无效",5003:"会话快照无效",5004:"会话Bean未找到",5005:"会话序列化错误",5006:"会话反序列化错误",5007:"会话状态无效",5008:"会话清除失败"};class nI extends nM{constructor(e,n,r=nT.MEDIUM,i={},o){super(e,n||nC[e]||"Agent服务错误",nE.SERVICE,r,i,o)}}class nj extends nI{constructor(e,n={}){super(nx.AGENT_QUERY_FAILED,e,nT.HIGH,n)}}class nA extends nI{constructor(e,n={}){super(nx.AGENT_RESPONSE_PARSE_ERROR,e,nT.HIGH,n)}}class nk extends nI{constructor(e,n={}){super(nx.AGENT_CONNECTION_FAILED,e,nT.HIGH,n)}}class nB extends nI{constructor(e,n={}){super(nx.AGENT_INSTRUCTION_INVALID,e,nT.MEDIUM,n)}}var nP=__webpack_require__("../../node_modules/ua-parser-js/src/ua-parser.js"),nN=__webpack_require__.n(nP);let nD=()=>{let e=new(nN()),n=e.getBrowser(),r=e.getOS(),i=e.getDevice();return{userAgent:e.getUA(),browser:{name:n.name,version:n.version},os:{name:r.name,version:r.version},device:{type:i.type,vendor:i.vendor,model:i.model}}},nL=()=>{let e=new(nN()),n=e.getUA();return"WeChat"===e.getBrowser().name||/MicroMessenger/i.test(n)},nF=()=>"iOS"===new(nN())().getOS().name,nU=()=>{let e=new(nN()),n=e.getOS(),r=e.getDevice();return"Mac OS"===n.name&&"tablet"===r.type};class nq extends nM{constructor(e,n,r=nT.MEDIUM,i={}){super(e,n||nC[e]||"ASR服务错误",nE.SERVICE,r,i)}}class nH extends nq{constructor(e,n={}){super(nx.ASR_INITIALIZATION_FAILED,e,nT.HIGH,n)}}class nV extends nq{constructor(e,n={}){super(nx.ASR_STOP_FAILED,e,nT.MEDIUM,n)}}class nX extends nq{constructor(e,n={}){super(nx.ASR_PERMISSION_DENIED,e,nT.MEDIUM,{...n,context:{...n.context,browserInfo:nD()}})}}class nW extends nq{constructor(e,n={}){super(nx.ASR_MESSAGE_PARSE_ERROR,e,nT.MEDIUM,n)}}class n$ extends nq{constructor(e,n={}){super(nx.ASR_MESSAGE_INTERVAL_TIMEOUT,e,nT.MEDIUM,n)}}class nz extends nq{constructor(e,n={}){super(nx.ASR_RUNTIME_ERROR,e,nT.HIGH,n)}}class nG extends nM{constructor(e,n,r=nT.MEDIUM,i={}){super(e,n||nC[e]||"数字人服务错误",nE.SERVICE,r,i)}}class nK extends nG{constructor(e,n={}){super(nx.DH_MOUNT_FAILED,e,nT.HIGH,n)}}class nY extends nG{constructor(e,n={}){super(nx.DH_IFRAME_LOAD_ERROR,e,nT.HIGH,n)}}class nJ extends nG{constructor(e,n={}){super(nx.DH_RENDER_ERROR,e,nT.MEDIUM,n)}}class nQ extends nG{constructor(e,n={}){super(nx.DH_WEBSOCKET_ERROR,e,nT.HIGH,n)}}class nZ extends nG{constructor(e,n={}){super(nx.DH_RTC_ERROR,e,nT.HIGH,n)}}class n0 extends nG{constructor(e,n={}){super(nx.DH_AUTHENTICATION_ERROR,e,nT.CRITICAL,n)}}class n1 extends nG{constructor(e,n={}){super(nx.DH_RESOURCE_NOT_ENOUGH,e,nT.CRITICAL,n)}}class n2{constructor(e){this.opts=e,this.reporters=[]}addReporter(e){this.reporters.push(e)}removeReporter(e){let n=this.reporters.indexOf(e);n>-1&&this.reporters.splice(n,1)}async handle(e){let n;n=e instanceof nM?e.toJSON():this.isErrorDetails(e)?e:nM.fromError(e,"UNKNOWN_ERROR","INTERNAL").toJSON(),await this.processError(n)}async processError(e){try{this.shouldLogError()&&this.logError(e),this.shouldReportError(e)&&await this.reportError(e)}catch(e){console.error("Error in error handler:",e)}}shouldLogError(){var e;return(null==(e=this.opts)?void 0:e.enableErrorLogging)!==!1}shouldReportError(e){var n;return(null==(n=this.opts)?void 0:n.enableErrorReporting)!==!1&&e.severity!==nT.LOW&&this.reporters.length>0}logError(e){let n=this.getLogLevel(e.severity),r=`[${e.code}] ${e.message}`;"error"===n?console.error(r,e):"warn"===n?console.warn(r,e):console.log(r,e)}getLogLevel(e){switch(e){case nT.CRITICAL:case nT.HIGH:return"error";case nT.MEDIUM:return"warn";case nT.LOW:default:return"log"}}async reportError(e){let n=this.reporters.map(n=>n.report(e).catch(e=>{console.error("Error reporter failed:",e)}));await Promise.allSettled(n)}isErrorDetails(e){return e&&"object"==typeof e&&"code"in e&&"message"in e&&"category"in e&&"severity"in e}}class n3{async report(e){console.error("Error Report:",{code:e.code,message:e.message,category:e.category,severity:e.severity,timestamp:new Date(e.metadata.timestamp).toISOString(),sessionId:e.metadata.sessionId,requestId:e.metadata.requestId,context:e.metadata.context})}}class n6{constructor(e){this.options={timeout:5e3,headers:{"Content-Type":"application/json"},retryCount:3,retryDelay:1e3,...e}}async report(e){let n=this.buildPayload(e);for(let e=0;e<=this.options.retryCount;e++)try{await this.sendRequest(n);return}catch(n){if(e===this.options.retryCount)throw n;await this.delay(this.options.retryDelay*(e+1))}}buildPayload(e){return{error:{code:e.code,message:e.message,category:e.category,severity:e.severity,actionRequired:e.actionRequired},metadata:{timestamp:e.metadata.timestamp,sessionId:e.metadata.sessionId,requestId:e.metadata.requestId,userId:e.metadata.userId,context:e.metadata.context,userAgent:navigator.userAgent,url:window.location.href}}}async sendRequest(e){let n=new AbortController,r=setTimeout(()=>n.abort(),this.options.timeout);try{let r=await fetch(this.options.endpoint,{method:"POST",headers:this.options.headers,body:JSON.stringify(e),signal:n.signal});if(!r.ok)throw Error(`HTTP ${r.status}: ${r.statusText}`)}finally{clearTimeout(r)}}delay(e){return new Promise(n=>setTimeout(n,e))}}class n5{static getErrorSeverity(e){if(e instanceof nM)return e.severity;let n=e.message.toLowerCase();return n.includes("permission")||n.includes("unauthorized")||n.includes("forbidden")?nT.CRITICAL:n.includes("network")||n.includes("timeout")||n.includes("connection")?nT.HIGH:nT.MEDIUM}static shouldReport(e){return!(e instanceof nM)||e.severity!==nT.LOW}static extractMetadata(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={timestamp:Date.now(),context:n,stack:e.stack};return e instanceof nM?{...r,...e.metadata}:r}static getActionRequired(e){if(e instanceof nM){var n;return null!=(n=e.actionRequired)?n:null}let r=e.message.toLowerCase();return r.includes("permission")||r.includes("unauthorized")?"请检查用户权限":r.includes("network")||r.includes("timeout")?"请检查网络连接后重试":r.includes("validation")||r.includes("invalid")?"请检查输入数据的格式和有效性":null}}class n4{constructor(){this.emitter=new tZ,this.emit=e=>{let n=this.transformErrorToPayload(e);this.emitter.emit("error",n)},this.on=e=>{this.emitter.on("error",e)},this.off=e=>{this.emitter.off("error",e)},this.clearListeners=()=>{this.emitter.clearListeners()},this.transformErrorToPayload=e=>{if(e instanceof nM){var n;return{code:e.code,message:e.toString(),stack:e.stack,actionRequired:null!=(n=e.actionRequired)?n:null,severity:e.severity,metadata:{timestamp:e.metadata.timestamp,sessionId:e.metadata.sessionId,requestId:e.metadata.requestId,userId:e.metadata.userId,context:e.metadata.context,service:this.extractServiceFromError(e)},originalError:e}}return{code:"UNKNOWN_ERROR",message:e.toString(),stack:e.stack,actionRequired:n5.getActionRequired(e),severity:n5.getErrorSeverity(e),metadata:{timestamp:Date.now(),context:{errorName:e.name}},originalError:e}},this.extractServiceFromError=e=>{let n=e.constructor.name.toLowerCase();return n.includes("agent")?"agent":n.includes("asr")?"asr":n.includes("digitalHuman")||n.includes("dh")?"digital-human":n.includes("conversation")?"conversation":"unknown"}}}class n8 extends Error{constructor(e,n,r={}){super(n),this.name=e||"AaaSPilotKitError",this.message=n,this.data=r,Error.captureStackTrace?Error.captureStackTrace(this,n8):this.stack=Error().stack||"",Object.setPrototypeOf(this,n8.prototype)}static createForMonitoring(e,n,r){return new n8(e,n,r)}getMonitoringData(){return{type:this.name,message:this.message,stack:this.stack,timestamp:Date.now(),...this.data}}getSimplifiedData(){return{type:this.name,message:this.message,userId:this.data.userId,sessionId:this.data.sessionId,page:this.data.page}}toString(){return this.message}toJSON(){return this.getMonitoringData()}}function n9(e,n){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,n)}function n7(e,n){return function(r,i){n(r,i,e)}}class re extends n4{constructor(e){super(),this.opts=e,this.handleError=async e=>{await this.errorHandler.handle(e),this.emit(e)},this.getErrorHandler=()=>this.errorHandler,this.getActionRequired=e=>n5.getActionRequired(e),this.createMonitoringError=e=>{var n,r;let i=this.buildEnhancedMessage(e),o={page:null==(n=e.metadata.context)?void 0:n.page,userId:e.metadata.userId,sessionId:e.metadata.sessionId,requestId:e.metadata.requestId,context:e.metadata.context,severity:e.severity,category:e.metadata.service||"unknown",code:e.code,originalMessage:null==(r=e.originalError)?void 0:r.message};return n8.createForMonitoring(e.code,i,o)},this.buildEnhancedMessage=e=>{let n=[],r=e.severity.toUpperCase();n.push(`[${r}]: ${e.message}`),e.metadata.service&&n.push(`category=${e.metadata.service}`);let i=new Date(e.metadata.timestamp||Date.now()),o=i.getFullYear()+"-"+String(i.getMonth()+1).padStart(2,"0")+"-"+String(i.getDate()).padStart(2,"0")+" "+String(i.getHours()).padStart(2,"0")+":"+String(i.getMinutes()).padStart(2,"0")+":"+String(i.getSeconds()).padStart(2,"0");if(n.push(`time=${o}`),e.metadata&&Object.keys(e.metadata).length>0){let r=this.stringifyMetadata(e.metadata);r&&"{}"!==r&&n.push(`metadata=${r}`)}return n.join(" | ")},this.stringifyMetadata=e=>{if(!e||"object"!=typeof e)return"{}";let n=new Set(["timestamp","stack"]),r={};for(let[i,o]of Object.entries(e))n.has(i)||null==o||(r[i]=o);try{return JSON.stringify(r)}catch{return"{}"}},this.initializeReporters=()=>{this.options.enableConsoleReporter&&this.errorHandler.addReporter(new n3),this.options.enableHttpReporter&&this.options.httpReporterEndpoint&&this.errorHandler.addReporter(new n6({endpoint:this.options.httpReporterEndpoint}))},this.options={enableConsoleReporter:this.opts.enableDebugMode,enableHttpReporter:!1,enableErrorLogging:this.opts.enableDebugMode,enableErrorReporting:!0},this.errorHandler=new n2(this.options),this.initializeReporters()}}function rt(e,n){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,n)}function rn(e,n){return function(r,i){n(r,i,e)}}re=function(e,n,r,i){var o,s=arguments.length,a=s<3?n:null===i?i=Object.getOwnPropertyDescriptor(n,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,n,r,i);else for(var c=e.length-1;c>=0;c--)(o=e[c])&&(a=(s<3?o(a):s>3?o(n,r,a):o(n,r))||a);return s>3&&a&&Object.defineProperty(n,r,a),a}([ey(),n7(0,em(t1.IOptions)),n7(0,eR()),n9("design:type",Function),n9("design:paramtypes",["undefined"==typeof IOptions?Object:IOptions])],re);class rr{constructor(e,n,r){this.request=e,this.errorManager=n,this.opts=r,this.emitter=new tZ,this.conversationSessionId="",this.abortController=null,this._queryId="",this._lastQueryId="",this.setSessionId=e=>{this.conversationSessionId=e},this.setQueryId=e=>{this._queryId=e},this.setLastQueryId=e=>{this._lastQueryId=e},this.abort=e=>{var n;null==(n=this.abortController)||n.abort(e),this.abortController&&(this.abortController=null)},this.checkIsRepeat=()=>{let e=!!this.lastQueryId&&this.lastQueryId===this.queryId;return e&&this.opts.enableDebugMode&&console.warn("重复的completed查询被忽略:",this.queryId),e},this.onData=e=>{this.emitter.emit("data",e)},this.onCompleted=e=>{this.emitter.emit("completed",e)},this.onHangup=e=>{this.emitter.emit("hangup",e)},this.onTimeout=e=>{this.emitter.emit("timeout",e)},this.onInstructionReceived=e=>{this.emitter.emit("instruction_received",e)},this.onUsageQuotaReached=e=>{this.emitter.emit("usage_quota_reached",e)},this.onQuotaExpired=e=>{this.emitter.emit("quota_expired",e)},this._dispose=()=>{this.abort(),this.conversationSessionId="",this._queryId="",this._lastQueryId=""}}get sessionId(){return this.conversationSessionId}get queryId(){return this._queryId}get lastQueryId(){return this._lastQueryId}}rr=function(e,n,r,i){var o,s=arguments.length,a=s<3?n:null===i?i=Object.getOwnPropertyDescriptor(n,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,n,r,i);else for(var c=e.length-1;c>=0;c--)(o=e[c])&&(a=(s<3?o(a):s>3?o(n,r,a):o(n,r))||a);return s>3&&a&&Object.defineProperty(n,r,a),a}([ey(),rn(0,em(t1.CommonRequest)),rn(1,em(t1.ErrorManager)),rn(2,em(t1.IOptions)),rn(2,eR()),rt("design:type",Function),rt("design:paramtypes",[void 0===nS?Object:nS,void 0===re?Object:re,"undefined"==typeof IResolvedOptions?Object:IResolvedOptions])],rr),__webpack_require__("../../node_modules/core-js/modules/es.array.reduce.js");let ri=[{pattern:/客悦\s*one/gi,replacement:"客悦\xb7ONE"},{pattern:/\bSARS\b/gi,replacement:"SaaS"},{pattern:/\bSAS\b/gi,replacement:"SaaS"}],ro=function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ri;return n.reduce((e,n)=>{let{pattern:r,replacement:i}=n;return e.replace(r,i)},e)},rs={enableDebugMode:!1,minSplitLen:5,ttsModel:"02-turbo",env:"production",asrVad:600,interruptible:!0,rendererMode:"cloud",autoChromaKey:!0,typeDelay:163,enTypeDelay:45,inactivityPrompt:"您这么久没讲话,是不是有其它事情要忙,那我先挂断了",getMountContainer:()=>document.body,hotWordReplacementRules:ri,rtcID:"appreimunmd7utp"},ra={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)},rc=new Uint8Array(16),rl=[];for(let e=0;e<256;++e)rl.push((e+256).toString(16).slice(1));function ru(e,n=0){return(rl[e[n+0]]+rl[e[n+1]]+rl[e[n+2]]+rl[e[n+3]]+"-"+rl[e[n+4]]+rl[e[n+5]]+"-"+rl[e[n+6]]+rl[e[n+7]]+"-"+rl[e[n+8]]+rl[e[n+9]]+"-"+rl[e[n+10]]+rl[e[n+11]]+rl[e[n+12]]+rl[e[n+13]]+rl[e[n+14]]+rl[e[n+15]]).toLowerCase()}let rd=function(n,r,i){if(ra.randomUUID&&!r&&!n)return ra.randomUUID();var o=n,s=r,a=i;let c=(o=o||{}).random??o.rng?.()??function(){if(!e){if("undefined"==typeof crypto||!crypto.getRandomValues)throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");e=crypto.getRandomValues.bind(crypto)}return e(rc)}();if(c.length<16)throw Error("Random bytes length must be >= 16");if(c[6]=15&c[6]|64,c[8]=63&c[8]|128,s){if((a=a||0)<0||a+16>s.length)throw RangeError(`UUID byte range ${a}:${a+15} is out of buffer bounds`);for(let e=0;e<16;++e)s[a+e]=c[e];return s}return ru(c)};class rp{constructor(e,n){this.opts=n,this.emitter=new tZ,this.id="",this.text="",this.update=e=>{let{id:n,...r}=e;n?this.id=n:this.id||(this.id=rd()),Object.assign(this,r)},this.toJSON=()=>({id:this.id,type:this.type,text:this.text}),this.type=e.type,this.update(e)}}let rh=()=>{};class rf extends rp{constructor(e,n){super({...e,type:"client"},n),this.opts=n,this.appendText=e=>{this.text=e,this.emitter.emit("content_change",{mod:"text",content:e,completed:!0}).catch(rh)},this.dispose=()=>{},this.interrupt=()=>{}}static create(e){return new rf({},e)}}var rm=__webpack_require__("../../node_modules/p-queue/node_modules/eventemitter3/index.js"),rg=__webpack_require__.n(rm);class rv extends Error{constructor(e){super(e),this.name="TimeoutError"}}class ry extends Error{constructor(e){super(),this.name="AbortError",this.message=e}}let rb=e=>void 0===globalThis.DOMException?new ry(e):new DOMException(e),r_=e=>{let n=void 0===e.reason?rb("This operation was aborted."):e.reason;return n instanceof Error?n:rb(n)};class rw{#K=[];enqueue(e,n){let r={priority:(n={priority:0,...n}).priority,id:n.id,run:e};if(0===this.size||this.#K[this.size-1].priority>=n.priority)return void this.#K.push(r);let i=function(e,n,r){let i=0,o=e.length;for(;o>0;){let s=Math.trunc(o/2),a=i+s;0>=r(e[a],n)?(i=++a,o-=s+1):o=s}return i}(this.#K,r,(e,n)=>n.priority-e.priority);this.#K.splice(i,0,r)}setPriority(e,n){let r=this.#K.findIndex(n=>n.id===e);if(-1===r)throw ReferenceError(`No promise function with the id "${e}" exists in the queue.`);let[i]=this.#K.splice(r,1);this.enqueue(i.run,{priority:n,id:e})}dequeue(){let e=this.#K.shift();return e?.run}filter(e){return this.#K.filter(n=>n.priority===e.priority).map(e=>e.run)}get size(){return this.#K.length}}class rO extends rg(){#Y;#J;#Q=0;#Z;#ee;#et=0;#en;#er;#K;#ei;#eo=0;#es;#ea;#ec;#el=1n;timeout;constructor(e){if(super(),!("number"==typeof(e={carryoverConcurrencyCount:!1,intervalCap:Number.POSITIVE_INFINITY,interval:0,concurrency:Number.POSITIVE_INFINITY,autoStart:!0,queueClass:rw,...e}).intervalCap&&e.intervalCap>=1))throw TypeError(`Expected \`intervalCap\` to be a number from 1 and up, got \`${e.intervalCap?.toString()??""}\` (${typeof e.intervalCap})`);if(void 0===e.interval||!(Number.isFinite(e.interval)&&e.interval>=0))throw TypeError(`Expected \`interval\` to be a finite number >= 0, got \`${e.interval?.toString()??""}\` (${typeof e.interval})`);this.#Y=e.carryoverConcurrencyCount,this.#J=e.intervalCap===Number.POSITIVE_INFINITY||0===e.interval,this.#Z=e.intervalCap,this.#ee=e.interval,this.#K=new e.queueClass,this.#ei=e.queueClass,this.concurrency=e.concurrency,this.timeout=e.timeout,this.#ec=!0===e.throwOnTimeout,this.#ea=!1===e.autoStart}get #eu(){return this.#J||this.#Q<this.#Z}get #ed(){return this.#eo<this.#es}#ep(){this.#eo--,this.#eh(),this.emit("next")}#ef(){this.#em(),this.#eg(),this.#er=void 0}get #ev(){let e=Date.now();if(void 0===this.#en){let n=this.#et-e;if(!(n<0))return void 0===this.#er&&(this.#er=setTimeout(()=>{this.#ef()},n)),!0;this.#Q=this.#Y?this.#eo:0}return!1}#eh(){if(0===this.#K.size)return this.#en&&clearInterval(this.#en),this.#en=void 0,this.emit("empty"),0===this.#eo&&this.emit("idle"),!1;if(!this.#ea){let e=!this.#ev;if(this.#eu&&this.#ed){let n=this.#K.dequeue();return!!n&&(this.emit("active"),n(),e&&this.#eg(),!0)}}return!1}#eg(){this.#J||void 0!==this.#en||(this.#en=setInterval(()=>{this.#em()},this.#ee),this.#et=Date.now()+this.#ee)}#em(){0===this.#Q&&0===this.#eo&&this.#en&&(clearInterval(this.#en),this.#en=void 0),this.#Q=this.#Y?this.#eo:0,this.#ey()}#ey(){for(;this.#eh(););}get concurrency(){return this.#es}set concurrency(e){if(!("number"==typeof e&&e>=1))throw TypeError(`Expected \`concurrency\` to be a number from 1 and up, got \`${e}\` (${typeof e})`);this.#es=e,this.#ey()}async #eb(e){return new Promise((n,r)=>{e.addEventListener("abort",()=>{r(e.reason)},{once:!0})})}setPriority(e,n){this.#K.setPriority(e,n)}async add(e,n={}){return n.id??=(this.#el++).toString(),n={timeout:this.timeout,throwOnTimeout:this.#ec,...n},new Promise((r,i)=>{this.#K.enqueue(async()=>{this.#eo++,this.#Q++;try{n.signal?.throwIfAborted();let i=e({signal:n.signal});n.timeout&&(i=function(e,n){let r,i,{milliseconds:o,fallback:s,message:a,customTimers:c={setTimeout,clearTimeout}}=n,l=new Promise((l,u)=>{if("number"!=typeof o||1!==Math.sign(o))throw TypeError(`Expected \`milliseconds\` to be a positive number, got \`${o}\``);if(n.signal){let{signal:e}=n;e.aborted&&u(r_(e)),i=()=>{u(r_(e))},e.addEventListener("abort",i,{once:!0})}if(o===Number.POSITIVE_INFINITY)return void e.then(l,u);let d=new rv;r=c.setTimeout.call(void 0,()=>{if(s){try{l(s())}catch(e){u(e)}return}"function"==typeof e.cancel&&e.cancel(),!1===a?l():a instanceof Error?u(a):(d.message=a??`Promise timed out after ${o} milliseconds`,u(d))},o),(async()=>{try{l(await e)}catch(e){u(e)}})()}).finally(()=>{l.clear(),i&&n.signal&&n.signal.removeEventListener("abort",i)});return l.clear=()=>{c.clearTimeout.call(void 0,r),r=void 0},l}(Promise.resolve(i),{milliseconds:n.timeout})),n.signal&&(i=Promise.race([i,this.#eb(n.signal)]));let o=await i;r(o),this.emit("completed",o)}catch(e){if(e instanceof rv&&!n.throwOnTimeout)return void r();i(e),this.emit("error",e)}finally{this.#ep()}},n),this.emit("add"),this.#eh()})}async addAll(e,n){return Promise.all(e.map(async e=>this.add(e,n)))}start(){return this.#ea&&(this.#ea=!1,this.#ey()),this}pause(){this.#ea=!0}clear(){this.#K=new this.#ei}async onEmpty(){0!==this.#K.size&&await this.#e_("empty")}async onSizeLessThan(e){this.#K.size<e||await this.#e_("next",()=>this.#K.size<e)}async onIdle(){(0!==this.#eo||0!==this.#K.size)&&await this.#e_("idle")}async #e_(e,n){return new Promise(r=>{let i=()=>{(!n||n())&&(this.off(e,i),r())};this.on(e,i)})}get size(){return this.#K.size}sizeBy(e){return this.#K.filter(e).length}get pending(){return this.#eo}get isPaused(){return this.#ea}}class rR{constructor(e){this.id=rd(),this.createdAt=Date.now(),this.updatedAt=Date.now(),this.emitter=new tZ,this.getConfig=()=>({...this.config}),this.updateConfig=e=>{this.config={...this.config,...e},this.updatedAt=Date.now()},this.toJSON=()=>({id:this.id,mod:this.mod,config:this.getConfig(),createdAt:this.createdAt,updatedAt:this.updatedAt}),this.updateTimestamp=()=>{this.updatedAt=Date.now()},this._dispose=()=>{this.emitter.clearListeners()},this.config={...e},this.config.timestamp||(this.config.timestamp=this.createdAt)}}var rS=__webpack_require__("../../node_modules/typewriter-effect/dist/core.js"),rE=__webpack_require__.n(rS);let rT=e=>/[\u3400-\u4DBF\u4E00-\u9FFF\uF900-\uFAFF\u3000-\u303F]/.test(e);class rM extends rR{get mod(){return"text"}static fromSnapshot(e){return new rM(e.config)}static fromString(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new rM({content:e,...n})}setTargetElement(e){this.targetElement=e}isEmpty(){return!this.config.content}constructor(...e){super(...e),this.typewriter=null,this.targetElement=null,this.index=0,this.stopTypewriter=()=>{this.typewriter&&(this.typewriter.stop(),this.typewriter=null)},this.runTask=()=>new Promise((e,n)=>{if(this.ensureTarget(),this.isEmpty())return void e({mod:"text",content:""});try{var r,i,o,s,a;let n=null!=(o=null==(r=this.config.typewriterOptions)?void 0:r.delay)?o:163,c=null!=(s=null==(i=this.config.typewriterOptions)?void 0:i.enDelay)?s:n;this.typewriter=new(rE())(this.targetElement,{autoStart:!0,loop:!1,...this.config.typewriterOptions,delay:0,onCreateTextNode:e=>{let n=this.index===this.config.content.length-1;return this.emitter.emit("data",{char:e,index:this.index++,done:n}),document.createTextNode(e)}});let l=[],u="",d=null;for(let e of Array.from(this.config.content)){let n=rT(e);null===d||n===d?u+=e:(l.push({s:u,cn:d}),u=e),d=n}u&&l.push({s:u,cn:d});let p=this.typewriter;if(0===l.length)p=p.changeDelay(n).typeString(this.config.content);else for(let e=0;e<l.length;e++){let{s:r,cn:i}=l[e];if(0===e){let e=null!=(a=r[0])?a:"",o=r.slice(1);p=p.typeString(e),o&&(p=p.changeDelay(i?n:c).typeString(o));continue}p=p.changeDelay(i?n:c).typeString(r)}p.callFunction(()=>{e({mod:"text",content:this.config.content})}).start()}catch(e){n(e)}}),this.dispose=()=>{this._dispose(),this.stopTypewriter(),this.targetElement=null,this.index=0},this.interrupt=()=>{this.stopTypewriter()},this.ensureTarget=()=>{if(this.targetElement)return;let e=document.createElement("span");e.className="text-content-typewriter",this.targetElement=e}}}class rx extends rR{get mod(){return"image"}static fromSnapshot(e){return new rx(e.config)}static fromSrc(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new rx({src:e,...n})}isEmpty(){return!this.config.src}ensureImageElement(){if(this.imgElement)return this.imgElement;let e=document.createElement("img");return this.imgElement=e,e}constructor(...e){super(...e),this.imgElement=null,this.setTargetElement=e=>{this.imgElement=e},this.runTask=()=>new Promise((e,n)=>{var r;if(this.isEmpty())return void e({mod:"image",src:""});let i=this.ensureImageElement(),o=()=>{e({mod:"image",...this.config}),i.removeEventListener("load",o)},s=()=>{n(Error(`Failed to load image: ${this.config.src}`)),i.removeEventListener("error",s)};i.addEventListener("load",o,{once:!0}),i.addEventListener("error",s,{once:!0}),i.alt=null!=(r=this.config.alt)?r:"",this.config.width&&(i.width=this.config.width),this.config.height&&(i.height=this.config.height),i.src=this.config.src}),this.dispose=()=>{this._dispose(),this.imgElement&&(this.imgElement.src="",this.imgElement=null)},this.interrupt=()=>{}}}class rC extends rR{get mod(){return"video"}static fromSnapshot(e){return new rC(e.config)}static fromSrc(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new rC({src:e,...n})}isEmpty(){return!this.config.src}ensureVideoElement(){if(this.videoElement)return this.videoElement;let e=document.createElement("video");return e.muted=!0,e.playsInline=!0,this.videoElement=e,e}constructor(...e){super(...e),this.videoElement=null,this.setTargetElement=e=>{this.videoElement=e},this.runTask=()=>new Promise((e,n)=>{if(this.isEmpty())return void e({mod:"video",src:""});let r=this.ensureVideoElement(),i=()=>{e({mod:"video",...this.config}),r.removeEventListener("loadedmetadata",i)},o=()=>{n(Error(`Failed to load video: ${this.config.src}`)),r.removeEventListener("error",o)};r.addEventListener("loadedmetadata",i,{once:!0}),r.addEventListener("error",o,{once:!0}),this.config.poster&&(r.poster=this.config.poster),this.config.preload&&(r.preload=this.config.preload),this.config.width&&(r.width=this.config.width),this.config.height&&(r.height=this.config.height),r.src=this.config.src,r.load()}),this.dispose=()=>{this._dispose(),this.videoElement&&(this.videoElement.src="",this.videoElement.load(),this.videoElement=null)},this.interrupt=()=>{}}}let rI={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(e,n){return n},attributeValueProcessor:function(e,n){return n},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(e,n,r){return e},captureMetaData:!1},rj=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",rA=RegExp("^"+("["+rj+"]["+rj)+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$");function rk(e,n){let r=[],i=n.exec(e);for(;i;){let o=[];o.startIndex=n.lastIndex-i[0].length;let s=i.length;for(let e=0;e<s;e++)o.push(i[e]);r.push(o),i=n.exec(e)}return r}let rB=function(e){let n=rA.exec(e);return null!=n};n="function"!=typeof Symbol?"@@xmlMetadata":Symbol("XML Node Metadata");class rP{constructor(e){this.tagname=e,this.child=[],this[":@"]={}}add(e,n){"__proto__"===e&&(e="#__proto__"),this.child.push({[e]:n})}addChild(e,r){"__proto__"===e.tagname&&(e.tagname="#__proto__"),e[":@"]&&Object.keys(e[":@"]).length>0?this.child.push({[e.tagname]:e.child,":@":e[":@"]}):this.child.push({[e.tagname]:e.child}),void 0!==r&&(this.child[this.child.length-1][n]={startIndex:r})}static getMetaDataSymbol(){return n}}let rN=(e,n)=>{for(;n<e.length&&/\s/.test(e[n]);)n++;return n};function rD(e,n,r){let i="",o=e[n];if('"'!==o&&"'"!==o)throw Error(`Expected quoted string, found "${o}"`);for(n++;n<e.length&&e[n]!==o;)i+=e[n],n++;if(e[n]!==o)throw Error(`Unterminated ${r} value`);return[++n,i]}function rL(e,n,r){for(let i=0;i<n.length;i++)if(n[i]!==e[r+i+1])return!1;return!0}function rF(e){if(rB(e))return e;throw Error(`Invalid entity name ${e}`)}let rU=/^[-+]?0x[a-fA-F0-9]+$/,rq=/^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/,rH={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0},rV=/^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/;class rX{constructor(e){this.options=e,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"\xa2"},pound:{regex:/&(pound|#163);/g,val:"\xa3"},yen:{regex:/&(yen|#165);/g,val:"\xa5"},euro:{regex:/&(euro|#8364);/g,val:"€"},copyright:{regex:/&(copy|#169);/g,val:"\xa9"},reg:{regex:/&(reg|#174);/g,val:"\xae"},inr:{regex:/&(inr|#8377);/g,val:"₹"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(e,n)=>String.fromCodePoint(Number.parseInt(n,10))},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(e,n)=>String.fromCodePoint(Number.parseInt(n,16))}},this.addExternalEntities=rW,this.parseXml=rY,this.parseTextData=r$,this.resolveNameSpace=rz,this.buildAttributesMap=rK,this.isItStopNode=r0,this.replaceEntitiesValue=rQ,this.readStopNodeData=r3,this.saveTextToParentTag=rZ,this.addChild=rJ,this.ignoreAttributesFn=function(e){return"function"==typeof e?e:Array.isArray(e)?n=>{for(let r of e)if("string"==typeof r&&n===r||r instanceof RegExp&&r.test(n))return!0}:()=>!1}(this.options.ignoreAttributes)}}function rW(e){let n=Object.keys(e);for(let r=0;r<n.length;r++){let i=n[r];this.lastEntities[i]={regex:RegExp("&"+i+";","g"),val:e[i]}}}function r$(e,n,r,i,o,s,a){if(void 0!==e&&(this.options.trimValues&&!i&&(e=e.trim()),e.length>0)){a||(e=this.replaceEntitiesValue(e));let i=this.options.tagValueProcessor(n,e,r,o,s);return null==i?e:typeof i!=typeof e||i!==e?i:this.options.trimValues||e.trim()===e?r6(e,this.options.parseTagValue,this.options.numberParseOptions):e}}function rz(e){if(this.options.removeNSPrefix){let n=e.split(":"),r="/"===e.charAt(0)?"/":"";if("xmlns"===n[0])return"";2===n.length&&(e=r+n[1])}return e}let rG=RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?","gm");function rK(e,n,r){if(!0!==this.options.ignoreAttributes&&"string"==typeof e){let r=rk(e,rG),i=r.length,o={};for(let e=0;e<i;e++){let i=this.resolveNameSpace(r[e][1]);if(this.ignoreAttributesFn(i,n))continue;let s=r[e][4],a=this.options.attributeNamePrefix+i;if(i.length)if(this.options.transformAttributeName&&(a=this.options.transformAttributeName(a)),"__proto__"===a&&(a="#__proto__"),void 0!==s){this.options.trimValues&&(s=s.trim()),s=this.replaceEntitiesValue(s);let e=this.options.attributeValueProcessor(i,s,n);null==e?o[a]=s:typeof e!=typeof s||e!==s?o[a]=e:o[a]=r6(s,this.options.parseAttributeValue,this.options.numberParseOptions)}else this.options.allowBooleanAttributes&&(o[a]=!0)}if(Object.keys(o).length){if(this.options.attributesGroupName){let e={};return e[this.options.attributesGroupName]=o,e}return o}}}let rY=function(e){e=e.replace(/\r\n?/g,"\n");let n=new rP("!xml"),r=n,i="",o="";for(let s=0;s<e.length;s++)if("<"===e[s])if("/"===e[s+1]){let n=r1(e,">",s,"Closing Tag is not closed."),a=e.substring(s+2,n).trim();if(this.options.removeNSPrefix){let e=a.indexOf(":");-1!==e&&(a=a.substr(e+1))}this.options.transformTagName&&(a=this.options.transformTagName(a)),r&&(i=this.saveTextToParentTag(i,r,o));let c=o.substring(o.lastIndexOf(".")+1);if(a&&-1!==this.options.unpairedTags.indexOf(a))throw Error(`Unpaired tag can not be used as closing tag: </${a}>`);let l=0;c&&-1!==this.options.unpairedTags.indexOf(c)?(l=o.lastIndexOf(".",o.lastIndexOf(".")-1),this.tagsNodeStack.pop()):l=o.lastIndexOf("."),o=o.substring(0,l),r=this.tagsNodeStack.pop(),i="",s=n}else if("?"===e[s+1]){let n=r2(e,s,!1,"?>");if(!n)throw Error("Pi Tag is not closed.");if(i=this.saveTextToParentTag(i,r,o),this.options.ignoreDeclaration&&"?xml"===n.tagName||this.options.ignorePiTags);else{let e=new rP(n.tagName);e.add(this.options.textNodeName,""),n.tagName!==n.tagExp&&n.attrExpPresent&&(e[":@"]=this.buildAttributesMap(n.tagExp,o,n.tagName)),this.addChild(r,e,o,s)}s=n.closeIndex+1}else if("!--"===e.substr(s+1,3)){let n=r1(e,"--\x3e",s+4,"Comment is not closed.");if(this.options.commentPropName){let a=e.substring(s+4,n-2);i=this.saveTextToParentTag(i,r,o),r.add(this.options.commentPropName,[{[this.options.textNodeName]:a}])}s=n}else if("!D"===e.substr(s+1,2)){let n=function(e,n){let r={};if("O"===e[n+3]&&"C"===e[n+4]&&"T"===e[n+5]&&"Y"===e[n+6]&&"P"===e[n+7]&&"E"===e[n+8]){n+=9;let i=1,o=!1,s=!1,a="";for(;n<e.length;n++)if("<"!==e[n]||s)if(">"===e[n]){if(s?"-"===e[n-1]&&"-"===e[n-2]&&(s=!1,i--):i--,0===i)break}else"["===e[n]?o=!0:e[n];else{if(o&&rL(e,"!ENTITY",n)){let i,o;n+=7,[i,o,n]=function(e,n){n=rN(e,n);let r="";for(;n<e.length&&!/\s/.test(e[n])&&'"'!==e[n]&&"'"!==e[n];)r+=e[n],n++;if(rF(r),n=rN(e,n),"SYSTEM"===e.substring(n,n+6).toUpperCase())throw Error("External entities are not supported");if("%"===e[n])throw Error("Parameter entities are not supported");let i="";return[n,i]=rD(e,n,"entity"),[r,i,--n]}(e,n+1),-1===o.indexOf("&")&&(r[i]={regx:RegExp(`&${i};`,"g"),val:o})}else if(o&&rL(e,"!ELEMENT",n)){let{index:r}=function(e,n){n=rN(e,n);let r="";for(;n<e.length&&!/\s/.test(e[n]);)r+=e[n],n++;if(!rF(r))throw Error(`Invalid element name: "${r}"`);n=rN(e,n);let i="";if("E"===e[n]&&rL(e,"MPTY",n))n+=4;else if("A"===e[n]&&rL(e,"NY",n))n+=2;else if("("===e[n]){for(n++;n<e.length&&")"!==e[n];)i+=e[n],n++;if(")"!==e[n])throw Error("Unterminated content model")}else throw Error(`Invalid Element Expression, found "${e[n]}"`);return{elementName:r,contentModel:i.trim(),index:n}}(e,(n+=8)+1);n=r}else if(o&&rL(e,"!ATTLIST",n))n+=8;else if(o&&rL(e,"!NOTATION",n)){let{index:r}=function(e,n){n=rN(e,n);let r="";for(;n<e.length&&!/\s/.test(e[n]);)r+=e[n],n++;rF(r),n=rN(e,n);let i=e.substring(n,n+6).toUpperCase();if("SYSTEM"!==i&&"PUBLIC"!==i)throw Error(`Expected SYSTEM or PUBLIC, found "${i}"`);n+=i.length,n=rN(e,n);let o=null,s=null;if("PUBLIC"===i)[n,o]=rD(e,n,"publicIdentifier"),n=rN(e,n),('"'===e[n]||"'"===e[n])&&([n,s]=rD(e,n,"systemIdentifier"));else if("SYSTEM"===i&&([n,s]=rD(e,n,"systemIdentifier"),!s))throw Error("Missing mandatory system identifier for SYSTEM notation");return{notationName:r,publicIdentifier:o,systemIdentifier:s,index:--n}}(e,(n+=9)+1);n=r}else if(rL(e,"!--",n))s=!0;else throw Error("Invalid DOCTYPE");i++}if(0!==i)throw Error("Unclosed DOCTYPE")}else throw Error("Invalid Tag instead of DOCTYPE");return{entities:r,i:n}}(e,s);this.docTypeEntities=n.entities,s=n.i}else if("!["===e.substr(s+1,2)){let n=r1(e,"]]>",s,"CDATA is not closed.")-2,a=e.substring(s+9,n);i=this.saveTextToParentTag(i,r,o);let c=this.parseTextData(a,r.tagname,o,!0,!1,!0,!0);void 0==c&&(c=""),this.options.cdataPropName?r.add(this.options.cdataPropName,[{[this.options.textNodeName]:a}]):r.add(this.options.textNodeName,c),s=n+2}else{let a=r2(e,s,this.options.removeNSPrefix),c=a.tagName,l=a.rawTagName,u=a.tagExp,d=a.attrExpPresent,p=a.closeIndex;this.options.transformTagName&&(c=this.options.transformTagName(c)),r&&i&&"!xml"!==r.tagname&&(i=this.saveTextToParentTag(i,r,o,!1));let h=r;h&&-1!==this.options.unpairedTags.indexOf(h.tagname)&&(r=this.tagsNodeStack.pop(),o=o.substring(0,o.lastIndexOf("."))),c!==n.tagname&&(o+=o?"."+c:c);let f=s;if(this.isItStopNode(this.options.stopNodes,o,c)){let n="";if(u.length>0&&u.lastIndexOf("/")===u.length-1)"/"===c[c.length-1]?(c=c.substr(0,c.length-1),o=o.substr(0,o.length-1),u=c):u=u.substr(0,u.length-1),s=a.closeIndex;else if(-1!==this.options.unpairedTags.indexOf(c))s=a.closeIndex;else{let r=this.readStopNodeData(e,l,p+1);if(!r)throw Error(`Unexpected end of ${l}`);s=r.i,n=r.tagContent}let i=new rP(c);c!==u&&d&&(i[":@"]=this.buildAttributesMap(u,o,c)),n&&(n=this.parseTextData(n,c,o,!0,d,!0,!0)),o=o.substr(0,o.lastIndexOf(".")),i.add(this.options.textNodeName,n),this.addChild(r,i,o,f)}else{if(u.length>0&&u.lastIndexOf("/")===u.length-1){"/"===c[c.length-1]?(c=c.substr(0,c.length-1),o=o.substr(0,o.length-1),u=c):u=u.substr(0,u.length-1),this.options.transformTagName&&(c=this.options.transformTagName(c));let e=new rP(c);c!==u&&d&&(e[":@"]=this.buildAttributesMap(u,o,c)),this.addChild(r,e,o,f),o=o.substr(0,o.lastIndexOf("."))}else{let e=new rP(c);this.tagsNodeStack.push(r),c!==u&&d&&(e[":@"]=this.buildAttributesMap(u,o,c)),this.addChild(r,e,o,f),r=e}i="",s=p}}else i+=e[s];return n.child};function rJ(e,n,r,i){this.options.captureMetaData||(i=void 0);let o=this.options.updateTag(n.tagname,r,n[":@"]);!1===o||("string"==typeof o&&(n.tagname=o),e.addChild(n,i))}let rQ=function(e){if(this.options.processEntities){for(let n in this.docTypeEntities){let r=this.docTypeEntities[n];e=e.replace(r.regx,r.val)}for(let n in this.lastEntities){let r=this.lastEntities[n];e=e.replace(r.regex,r.val)}if(this.options.htmlEntities)for(let n in this.htmlEntities){let r=this.htmlEntities[n];e=e.replace(r.regex,r.val)}e=e.replace(this.ampEntity.regex,this.ampEntity.val)}return e};function rZ(e,n,r,i){return e&&(void 0===i&&(i=0===n.child.length),void 0!==(e=this.parseTextData(e,n.tagname,r,!1,!!n[":@"]&&0!==Object.keys(n[":@"]).length,i))&&""!==e&&n.add(this.options.textNodeName,e),e=""),e}function r0(e,n,r){let i="*."+r;for(let r in e){let o=e[r];if(i===o||n===o)return!0}return!1}function r1(e,n,r,i){let o=e.indexOf(n,r);if(-1!==o)return o+n.length-1;throw Error(i)}function r2(e,n,r,i=">"){let o=function(e,n,r=">"){let i,o="";for(let s=n;s<e.length;s++){let n=e[s];if(i)n===i&&(i="");else if('"'===n||"'"===n)i=n;else if(n===r[0]){if(!r[1])return{data:o,index:s};else if(e[s+1]===r[1])return{data:o,index:s}}else" "===n&&(n=" ");o+=n}}(e,n+1,i);if(!o)return;let s=o.data,a=o.index,c=s.search(/\s/),l=s,u=!0;-1!==c&&(l=s.substring(0,c),s=s.substring(c+1).trimStart());let d=l;if(r){let e=l.indexOf(":");-1!==e&&(u=(l=l.substr(e+1))!==o.data.substr(e+1))}return{tagName:l,tagExp:s,closeIndex:a,attrExpPresent:u,rawTagName:d}}function r3(e,n,r){let i=r,o=1;for(;r<e.length;r++)if("<"===e[r])if("/"===e[r+1]){let s=r1(e,">",r,`${n} is not closed`);if(e.substring(r+2,s).trim()===n&&0==--o)return{tagContent:e.substring(i,r),i:s};r=s}else if("?"===e[r+1])r=r1(e,"?>",r+1,"StopNode is not closed.");else if("!--"===e.substr(r+1,3))r=r1(e,"--\x3e",r+3,"StopNode is not closed.");else if("!["===e.substr(r+1,2))r=r1(e,"]]>",r,"StopNode is not closed.")-2;else{let i=r2(e,r,">");i&&((i&&i.tagName)===n&&"/"!==i.tagExp[i.tagExp.length-1]&&o++,r=i.closeIndex)}}function r6(e,n,r){if(n&&"string"==typeof e){let n=e.trim();return"true"===n||"false"!==n&&function(e,n={}){if(n=Object.assign({},rH,n),!e||"string"!=typeof e)return e;let r=e.trim();if(void 0!==n.skipLike&&n.skipLike.test(r))return e;{if("0"===e)return 0;if(n.hex&&rU.test(r)){var i,o=r,s=16;if(parseInt)return parseInt(o,16);if(Number.parseInt)return Number.parseInt(o,s);if(window&&window.parseInt)return window.parseInt(o,s);throw Error("parseInt, Number.parseInt, window.parseInt are not supported")}if(-1!==r.search(/.+[eE].+/))return function(e,n,r){if(!r.eNotation)return e;let i=n.match(rV);if(!i)return e;{let o=i[1]||"",s=-1===i[3].indexOf("e")?"E":"e",a=i[2],c=o?e[a.length+1]===s:e[a.length]===s;return a.length>1&&c?e:1===a.length&&(i[3].startsWith(`.${s}`)||i[3][0]===s)?Number(n):r.leadingZeros&&!c?Number(n=(i[1]||"")+i[3]):e}}(e,r,n);let a=rq.exec(r);if(!a)return e;{let o=a[1]||"",s=a[2],c=((i=a[3])&&-1!==i.indexOf(".")&&("."===(i=i.replace(/0+$/,""))?i="0":"."===i[0]?i="0"+i:"."===i[i.length-1]&&(i=i.substring(0,i.length-1))),i),l=o?"."===e[s.length+1]:"."===e[s.length];if(!n.leadingZeros&&(s.length>1||1===s.length&&!l))return e;{let i=Number(r),a=String(i);if(0===i)return i;if(-1!==a.search(/[eE]/))if(n.eNotation)return i;else return e;if(-1!==r.indexOf("."))if("0"===a)return i;else if(a===c)return i;else if(a===`${o}${c}`)return i;else return e;let l=s?c:r;return s?l===a||o+l===a?i:e:l===a||l===o+a?i:e}}}}(e,r)}return void 0!==e?e:""}let r5=rP.getMetaDataSymbol(),r4={allowBooleanAttributes:!1,unpairedTags:[]};function r8(e,n){n=Object.assign({},r4,n);let r=[],i=!1,o=!1;"\uFEFF"===e[0]&&(e=e.substr(1));for(let a=0;a<e.length;a++)if("<"===e[a]&&"?"===e[a+1]){if(a+=2,(a=r7(e,a)).err)return a}else if("<"===e[a]){let c=a;if("!"===e[++a]){a=ie(e,a);continue}{var s;let l=!1;"/"===e[a]&&(l=!0,a++);let u="";for(;a<e.length&&">"!==e[a]&&" "!==e[a]&&" "!==e[a]&&"\n"!==e[a]&&"\r"!==e[a];a++)u+=e[a];if("/"===(u=u.trim())[u.length-1]&&(u=u.substring(0,u.length-1),a--),!rB(s=u)){let n;return ii("InvalidTag",0===u.trim().length?"Invalid space after '<'.":"Tag '"+u+"' is an invalid name.",io(e,a))}let d=function(e,n){let r="",i="",o=!1;for(;n<e.length;n++){if('"'===e[n]||"'"===e[n])""===i?i=e[n]:i!==e[n]||(i="");else if(">"===e[n]&&""===i){o=!0;break}r+=e[n]}return""===i&&{value:r,index:n,tagClosed:o}}(e,a);if(!1===d)return ii("InvalidAttr","Attributes for '"+u+"' have open quote.",io(e,a));let p=d.value;if(a=d.index,"/"===p[p.length-1]){let r=a-p.length,o=ir(p=p.substring(0,p.length-1),n);if(!0!==o)return ii(o.err.code,o.err.msg,io(e,r+o.err.line));i=!0}else if(l)if(!d.tagClosed)return ii("InvalidTag","Closing tag '"+u+"' doesn't have proper closing.",io(e,a));else{if(p.trim().length>0)return ii("InvalidTag","Closing tag '"+u+"' can't have attributes or invalid starting.",io(e,c));if(0===r.length)return ii("InvalidTag","Closing tag '"+u+"' has not been opened.",io(e,c));let n=r.pop();if(u!==n.tagName){let r=io(e,n.tagStartPos);return ii("InvalidTag","Expected closing tag '"+n.tagName+"' (opened in line "+r.line+", col "+r.col+") instead of closing tag '"+u+"'.",io(e,c))}0==r.length&&(o=!0)}else{let s=ir(p,n);if(!0!==s)return ii(s.err.code,s.err.msg,io(e,a-p.length+s.err.line));if(!0===o)return ii("InvalidXml","Multiple possible root nodes found.",io(e,a));-1!==n.unpairedTags.indexOf(u)||r.push({tagName:u,tagStartPos:c}),i=!0}for(a++;a<e.length;a++)if("<"===e[a])if("!"===e[a+1]){a=ie(e,++a);continue}else if("?"===e[a+1]){if((a=r7(e,++a)).err)return a}else break;else if("&"===e[a]){let n=function(e,n){if(";"===e[++n])return -1;if("#"===e[n]){var r=e,i=++n;let o=/\d/;for("x"===r[i]&&(i++,o=/[\da-fA-F]/);i<r.length;i++){if(";"===r[i])return i;if(!r[i].match(o))break}return -1}let o=0;for(;n<e.length;n++,o++)if(!e[n].match(/\w/)||!(o<20)){if(";"===e[n])break;return -1}return n}(e,a);if(-1==n)return ii("InvalidChar","char '&' is not expected.",io(e,a));a=n}else if(!0===o&&!r9(e[a]))return ii("InvalidXml","Extra text at the end",io(e,a));"<"===e[a]&&a--}}else{if(r9(e[a]))continue;return ii("InvalidChar","char '"+e[a]+"' is not expected.",io(e,a))}return i?1==r.length?ii("InvalidTag","Unclosed tag '"+r[0].tagName+"'.",io(e,r[0].tagStartPos)):!(r.length>0)||ii("InvalidXml","Invalid '"+JSON.stringify(r.map(e=>e.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1}):ii("InvalidXml","Start tag expected.",1)}function r9(e){return" "===e||" "===e||"\n"===e||"\r"===e}function r7(e,n){let r=n;for(;n<e.length;n++)if("?"==e[n]||" "==e[n]){let i=e.substr(r,n-r);if(n>5&&"xml"===i)return ii("InvalidXml","XML declaration allowed only at the start of the document.",io(e,n));if("?"!=e[n]||">"!=e[n+1])continue;n++;break}return n}function ie(e,n){if(e.length>n+5&&"-"===e[n+1]&&"-"===e[n+2]){for(n+=3;n<e.length;n++)if("-"===e[n]&&"-"===e[n+1]&&">"===e[n+2]){n+=2;break}}else if(e.length>n+8&&"D"===e[n+1]&&"O"===e[n+2]&&"C"===e[n+3]&&"T"===e[n+4]&&"Y"===e[n+5]&&"P"===e[n+6]&&"E"===e[n+7]){let r=1;for(n+=8;n<e.length;n++)if("<"===e[n])r++;else if(">"===e[n]&&0==--r)break}else if(e.length>n+9&&"["===e[n+1]&&"C"===e[n+2]&&"D"===e[n+3]&&"A"===e[n+4]&&"T"===e[n+5]&&"A"===e[n+6]&&"["===e[n+7]){for(n+=8;n<e.length;n++)if("]"===e[n]&&"]"===e[n+1]&&">"===e[n+2]){n+=2;break}}return n}let it=RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?","g");function ir(e,n){let r=rk(e,it),i={};for(let e=0;e<r.length;e++){var o;if(0===r[e][1].length)return ii("InvalidAttr","Attribute '"+r[e][2]+"' has no space in starting.",is(r[e]));if(void 0!==r[e][3]&&void 0===r[e][4])return ii("InvalidAttr","Attribute '"+r[e][2]+"' is without value.",is(r[e]));if(void 0===r[e][3]&&!n.allowBooleanAttributes)return ii("InvalidAttr","boolean attribute '"+r[e][2]+"' is not allowed.",is(r[e]));let s=r[e][2];if(!rB(o=s))return ii("InvalidAttr","Attribute '"+s+"' is an invalid name.",is(r[e]));if(i.hasOwnProperty(s))return ii("InvalidAttr","Attribute '"+s+"' is repeated.",is(r[e]));i[s]=1}return!0}function ii(e,n,r){return{err:{code:e,msg:n,line:r.line||r,col:r.col}}}function io(e,n){let r=e.substring(0,n).split(/\r?\n/);return{line:r.length,col:r[r.length-1].length+1}}function is(e){return e.startIndex+e[1].length}class ia{constructor(e){this.externalEntities={},this.options=Object.assign({},rI,e)}parse(e,n){if("string"==typeof e);else if(e.toString)e=e.toString();else throw Error("XML data is accepted in String or Bytes[] form.");if(n){!0===n&&(n={});let r=r8(e,n);if(!0!==r)throw Error(`${r.err.msg}:${r.err.line}:${r.err.col}`)}let r=new rX(this.options);r.addExternalEntities(this.externalEntities);let i=r.parseXml(e);return this.options.preserveOrder||void 0===i?i:function e(n,r,i){let o,s={};for(let a=0;a<n.length;a++){let c=n[a],l=function(e){let n=Object.keys(e);for(let e=0;e<n.length;e++){let r=n[e];if(":@"!==r)return r}}(c),u="";if(u=void 0===i?l:i+"."+l,l===r.textNodeName)void 0===o?o=c[l]:o+=""+c[l];else if(void 0===l)continue;else if(c[l]){let n=e(c[l],r,u),i=function(e,n){let{textNodeName:r}=n,i=Object.keys(e).length;return 0===i||1===i&&(!!e[r]||"boolean"==typeof e[r]||0===e[r])}(n,r);void 0!==c[r5]&&(n[r5]=c[r5]),c[":@"]?function(e,n,r,i){if(n){let o=Object.keys(n),s=o.length;for(let a=0;a<s;a++){let s=o[a];i.isArray(s,r+"."+s,!0,!0)?e[s]=[n[s]]:e[s]=n[s]}}}(n,c[":@"],u,r):1!==Object.keys(n).length||void 0===n[r.textNodeName]||r.alwaysCreateTextNode?0===Object.keys(n).length&&(r.alwaysCreateTextNode?n[r.textNodeName]="":n=""):n=n[r.textNodeName],void 0!==s[l]&&s.hasOwnProperty(l)?(Array.isArray(s[l])||(s[l]=[s[l]]),s[l].push(n)):r.isArray(l,u,i)?s[l]=[n]:s[l]=n}}return"string"==typeof o?o.length>0&&(s[r.textNodeName]=o):void 0!==o&&(s[r.textNodeName]=o),s}(i,this.options)}addEntity(e,n){if(-1!==n.indexOf("&"))throw Error("Entity value can't have '&'");if(-1!==e.indexOf("&")||-1!==e.indexOf(";"))throw Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '&#xD;'");if("&"===n)throw Error("An entity with value '&' is not permitted");this.externalEntities[e]=n}static getMetaDataSymbol(){return rP.getMetaDataSymbol()}}let ic={validate:r8};class il{constructor(){this.isXml=e=>il.isXml(e),this.parseXmlOrText=e=>{try{let n=this.xmlParser.parse(e);if(Array.isArray(n)&&!n.length);else if(Array.isArray(n)&&n.length)return n;return e}catch(n){return e}},this.hasMixContentByParsedXml=e=>Array.isArray(e),this.xmlParser=new ia({preserveOrder:!0,ignoreAttributes:!1,attributeNamePrefix:"",textNodeName:"#text",alwaysCreateTextNode:!0})}static #k=this.isTextNode=e=>"text"in e;static #G=this.isImageNode=e=>"image"in e;static #ew=this.isVideoNode=e=>"video"in e;static #eO=this.isXml=e=>"string"==typeof e&&!0===ic.validate(e,{allowBooleanAttributes:!0})}class iu extends rp{constructor(e,n){super({...e,type:"aiWorker"},n),this.opts=n,this.contents=[],this.addContentRenderTask=e=>{iu.isTextContent(e)?(e.emitter.on("data",e=>{this.emitter.emit("content_change",{mod:"text",content:e.char,completed:e.done})}),this.queue.add(e.runTask).finally(()=>{e.dispose()})):iu.isImageContent(e)?this.queue.add(e.runTask).then(e=>{e&&this.emitter.emit("content_change",{mod:"image",content:e.src,completed:!0})}).finally(()=>{e.dispose()}):iu.isVideoContent(e)&&this.queue.add(e.runTask).then(e=>{e&&this.emitter.emit("content_change",{mod:"video",content:e.src,completed:!0})}).finally(()=>{e.dispose()})},this.addAllContents=e=>{for(let n of(this.contents=e,e))this.addContentRenderTask(n)},this.createContentsFromXmlString=e=>{let n=this.customXmlParser.parseXmlOrText(e);return this.customXmlParser.hasMixContentByParsedXml(n)?n[0].root[0].content.map(e=>il.isTextNode(e)?rM.fromString(e.text[0]["#text"],{typewriterOptions:{delay:this.opts.typeDelay,enDelay:this.opts.enTypeDelay}}):il.isImageNode(e)?rx.fromSrc(e.image[0]["#text"]):il.isVideoNode(e)?rC.fromSrc(e.video[0]["#text"]):null).filter(Boolean):[]},this.appendText=e=>{if(this.customXmlParser.isXml(e)){let n=this.createContentsFromXmlString(e);this.addAllContents(n)}else{let n=rM.fromString(e,{typewriterOptions:{delay:this.opts.typeDelay,enDelay:this.opts.enTypeDelay}});this.addContentRenderTask(n),this.contents.push(n)}},this.dispose=()=>{this.queue.removeAllListeners(),this.contents=[]},this.interrupt=()=>{for(let e of this.contents)e.interrupt();this.queue.clear(),this.emitter.emit("interrupt")},this.bindEvents=()=>{this.queue.on("empty",()=>{this.emitter.emit("queue_empty")})},this.queue=new rO({concurrency:1}),this.customXmlParser=new il,this.bindEvents()}get fulltext(){return this.contents.map(e=>iu.isTextContent(e)?e.getConfig().content:"").join("")}static #k=this.create=e=>new iu({},e);static #G=this.isAllTextContents=e=>e.every(e=>"text"===e.mod);static #ew=this.isTextContent=e=>e instanceof rM&&"text"===e.mod;static #eO=this.isImageContent=e=>e instanceof rx&&"image"===e.mod;static #eR=this.isVideoContent=e=>e instanceof rC&&"video"===e.mod}function id(e,n){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,n)}function ip(e,n){return function(r,i){n(r,i,e)}}class ih{constructor(e){var n=this;this.opts=e,this.beans=[],this.currentConversation=null,this.aiWorkerConversationFormatters=[],this.add=e=>{this.beans.push(e)},this.addBySnapshot=function(){let e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};switch(r.type){case"client":e=new rf(r,n.opts);break;case"aiWorker":e=new iu(r,n.opts);break;default:throw Error(`Unknown conversation type: ${r.type}`)}return n.beans.push(e),e},this.setCurrentConversation=e=>{this.currentConversation=e},this.clear=()=>{this.beans=[]},this.toJSON=()=>this.beans.map(e=>e.toJSON()),this.dispose=()=>{for(let e of this.beans)e.dispose();this.beans=[],this.currentConversation=null,this.aiWorkerConversationFormatters=[]},this.registerAIWorkerConversationFormatter=e=>{this.aiWorkerConversationFormatters.push(e)},this.runAIWorkerConversationFormatters=e=>{let n=e;for(let e of this.aiWorkerConversationFormatters)n=e(n);return n},this.interruptAll=()=>{for(let e of this.beans)e.interrupt()}}get last(){var e;return null!=(e=this.beans[this.beans.length-1])?e:null}get currentClientConversation(){return ih.isClientConversation(this.currentConversation)?this.currentConversation:null}get currentAIWorkerConversation(){return ih.isAIWorkerConversation(this.currentConversation)?this.currentConversation:null}static isClientConversation(e){return(null==e?void 0:e.type)==="client"}static isAIWorkerConversation(e){return(null==e?void 0:e.type)==="aiWorker"}}ih=function(e,n,r,i){var o,s=arguments.length,a=s<3?n:null===i?i=Object.getOwnPropertyDescriptor(n,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,n,r,i);else for(var c=e.length-1;c>=0;c--)(o=e[c])&&(a=(s<3?o(a):s>3?o(n,r,a):o(n,r))||a);return s>3&&a&&Object.defineProperty(n,r,a),a}([ey(),ip(0,em(t1.IOptions)),ip(0,eR()),id("design:type",Function),id("design:paramtypes",["undefined"==typeof IResolvedOptions?Object:IResolvedOptions])],ih);var im=__webpack_require__("../../node_modules/abort-signal-polyfill/dist/staticMethods/any.js"),ig=__webpack_require__("../../node_modules/abort-signal-polyfill/dist/staticMethods/timeout.js"),iv=__webpack_require__("../../node_modules/abort-signal-polyfill/dist/staticMethods/abort.js");let iy=(e,n)=>{e in AbortSignal||Object.defineProperty(AbortSignal,e,{value:n,configurable:!0,writable:!0})},ib=(e,n)=>{e in AbortSignal&&AbortSignal[e]===n&&delete AbortSignal[e]};var i_=function(){return(i_=Object.assign||function(e){for(var n,r=1,i=arguments.length;r<i;r++)for(var o in n=arguments[r])Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);return e}).apply(this,arguments)},iw=__webpack_require__("../../node_modules/@baidu/weirwood-perf/esm/index.js"),iO=function(){return(iO=Object.assign||function(e){for(var n,r=1,i=arguments.length;r<i;r++)for(var o in n=arguments[r])Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);return e}).apply(this,arguments)};function iR(e){var n="function"==typeof Symbol&&Symbol.iterator,r=n&&e[n],i=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")}function iS(){for(var e=[],n=0;n<arguments.length;n++)e=e.concat(function(e,n){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var i,o,s=r.call(e),a=[];try{for(;(void 0===n||n-- >0)&&!(i=s.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(r=s.return)&&r.call(s)}finally{if(o)throw o.error}}return a}(arguments[n]));return e}function iE(e){switch(Object.prototype.toString.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return e instanceof Error}}function iT(e){return"[object ErrorEvent]"===Object.prototype.toString.call(e)}function iM(e){return void 0===e}function ix(e){return"function"==typeof e}function iC(e){return"[object String]"===Object.prototype.toString.call(e)}function iI(e){return"[object Number]"===Object.prototype.toString.call(e)}function ij(e){return"[object Array]"===Object.prototype.toString.call(e)}function iA(e){return"[object Object]"===Object.prototype.toString.call(e)}function ik(e){if(!iA(e))return!1;for(var n in e)if(e.hasOwnProperty(n))return!1;return!0}var iB={};function iP(){return"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==__webpack_require__.g?__webpack_require__.g:"undefined"!=typeof self?self:iB}var iN=iP(),iD={wrap:function(){return function(){}},report:!1,collectWindowErrors:!1,computeStackTrace:!1,remoteFetching:!1,linesOfContext:!1,extendToAsynchronousCallbacks:!1},iL=[].slice,iF=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/;function iU(e,n){return Object.prototype.hasOwnProperty.call(e,n)}function iq(){return"undefined"==typeof document||null==document.location?"":document.location.href}iD.wrap=function(e){return function(){try{return e.apply(this,arguments)}catch(e){throw iD.report(e),e}}},iD.report=function(){var e,n,r,i,o=[],s=null,a=null;function c(e,n,r,i,s,a){var c=null;if(!n||iD.collectWindowErrors){for(var l in o)if(iU(o,l))try{o[l](e,n,r,i,s,a)}catch(e){c=e}if(c)throw c}}function l(n,r,i,o,s){var l=null;if(s=iT(s)?s.error:s,n=iT(n)?n.message:n,a)iD.computeStackTrace.augmentStackTraceWithInitialElement(a,r,i,n),d();else if(s&&iE(s))(l=iD.computeStackTrace(s)).mechanism="onerror",c(l,!0,s,r,i,o);else{var u,p={url:r,line:i,column:o},h=n;if("[object String]"===({}).toString.call(n)){var f=n.match(iF);f&&(u=f[1],h=f[2])}p.func=iD.computeStackTrace.guessFunctionName(p.url,p.line),p.context=iD.computeStackTrace.gatherContext(p.url,p.line),c(l={name:u,message:h,mode:"onerror",mechanism:"onerror",stack:[iO(iO({},p),{url:p.url||iq()})]},!0,null,r,i,o)}return!!e&&e.apply(this,arguments)}function u(e){var n=e&&(e.detail?e.detail.reason:e.reason)||e,r=iD.computeStackTrace(n);r.mechanism="onunhandledrejection",c(r,!0,n)}function d(){var e=a,n=s;a=null,s=null,c(e,!1,n)}function p(e){if(a)if(s===e)return;else d();var n=iD.computeStackTrace(e);throw a=n,s=e,setTimeout(function(){s===e&&d()},2e3*!!n.incomplete),e}return p.subscribe=function(e){o.push(e)},p.unsubscribe=function(s){for(var a=o.length-1;a>=0;--a)o[a]===s&&o.splice(a,1);0===o.length&&(n&&(iN.onerror=e,n=!1),i&&(iN.onunhandledrejection=r,i=!1))},p.installGlobalHandler=function(){!0!==n&&(e=iN.onerror,iN.onerror=l,n=!0)},p.installGlobalUnhandledRejectionHandler=function(){!0!==i&&(r=iN.onunhandledrejection,iN.onunhandledrejection=u,i=!0)},p}(),iD.computeStackTrace=function(){var e={};function n(n){if("string"!=typeof n)return[];if(!iU(e,n)){var r="",i="";try{i=iN.document.domain}catch(e){}var o=/(.*)\:\/\/([^:\/]+)([:\d]*)\/{0,1}([\s\S]*)/.exec(n);o&&o[2]===i&&(r=function(e){if(!iD.remoteFetching)return"";try{var n=function(){try{return new iN.XMLHttpRequest}catch(e){return new iN.ActiveXObject("Microsoft.XMLHTTP")}}();return n.open("GET",e,!1),n.send(""),n.responseText}catch(e){return""}}(n)),e[n]=r?r.split("\n"):[]}return e[n]}function r(e,r){var i,o=/function ([^(]*)\(([^)]*)\)/,s=/['"]?([0-9A-Za-z$_]+)['"]?\s*[:=]\s*(function|eval|new Function)/,a="",c=n(e);if(!c.length)return"?";for(var l=0;l<10;++l)if(!iM(a=c[r-l]+a)){if(i=s.exec(a))return i[1];else if(i=o.exec(a))return i[1]}return"?"}function i(e,r){var i=n(e);if(!i.length)return null;var o=[],s=Math.floor(iD.linesOfContext/2),a=s+iD.linesOfContext%2,c=Math.max(0,r-s-1),l=Math.min(i.length,r+a-1);r-=1;for(var u=c;u<l;++u)iM(i[u])||o.push(i[u]);return o.length>0?o:null}function o(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#]/g,"\\$&")}function s(e){return o(e).replace("<","(?:<|&lt;)").replace(">","(?:>|&gt;)").replace("&","(?:&|&amp;)").replace('"','(?:"|&quot;)').replace(/\s+/g,"\\s+")}function a(e,r){for(var i,o,s=0,a=r.length;s<a;++s)if((i=n(r[s])).length&&(i=i.join("\n"),o=e.exec(i)))return{url:r[s],line:i.substring(0,o.index).split("\n").length,column:o.index-i.lastIndexOf("\n",o.index)-1};return null}function c(e,r,i){var s,a=n(r),c=RegExp("\\b"+o(e)+"\\b");return(i-=1,a&&a.length>i&&(s=c.exec(a[i])))?s.index:null}function l(e){if(!e.stack)return null;for(var n,o,s,a,l=/^\s*at (?:(.*?) ?\()?((?:file|https?|blob|chrome-extension|native|eval|webpack|<anonymous>|[a-z]:|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,u=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|moz-extension).*?:\/.*?|\[native code\]|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,d=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,p=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,h=/\((\S*)(?::(\d+))(?::(\d+))\)/,f=e.stack.split("\n"),m=[],g=/^(.*) is undefined$/.exec(e.message),v=0,y=f.length;v<y;++v){if(s=l.exec(f[v])){var b=s[2]&&0===s[2].indexOf("native");s[2]&&0===s[2].indexOf("eval")&&(o=h.exec(s[2]))&&(s[2]=o[1]),a={url:b?null:s[2],func:s[1]||"?",args:b?[s[2]]:[],line:s[3]?+s[3]:null,column:s[4]?+s[4]:null}}else if(s=d.exec(f[v]))a={url:s[2],func:s[1]||"?",args:[],line:+s[3],column:s[4]?+s[4]:null};else{if(!(s=u.exec(f[v])))continue;s[3]&&s[3].indexOf(" > eval")>-1&&(o=p.exec(s[3]))?s[3]=o[1]:0!==v||s[5]||iM(e.columnNumber)||(m[0].column=e.columnNumber+1),a={url:s[3],func:s[1]||"?",args:s[2]?s[2].split(","):[],line:s[4]?+s[4]:null,column:s[5]?+s[5]:null}}if(!a.func&&a.line&&(a.func=r(a.url,a.line)),iD.remoteFetching&&a.url&&"blob:"===a.url.substr(0,5)){var _=new XMLHttpRequest;if(_.open("GET",a.url,!1),_.send(""),200===_.status){var w=_.responseText||"",O=(w=w.slice(-300)).match(/\/\/# sourceMappingURL=(.*)$/);if(O){var R=O[1];"~"===R.charAt(0)&&(R=("undefined"==typeof document||null==document.location?"":document.location.origin?document.location.origin:document.location.protocol+"//"+document.location.hostname+(document.location.port?":"+document.location.port:""))+R.slice(1)),a.url=R.slice(0,-4)}}}a.context=a.line?i(a.url,a.line):null,m.push(a)}return m.length?(m[0]&&m[0].line&&!m[0].column&&g&&(m[0].column=c(g[1],m[0].url,m[0].line)),{mode:"stack",name:e.name,message:e.message,stack:m}):null}function u(e,n,o,s){var a={url:n,line:o};if(a.url&&a.line){e.incomplete=!1,a.func||(a.func=r(a.url,a.line)),a.context||(a.context=i(a.url,a.line));var l=/ '([^']+)' /.exec(s);if(l&&(a.column=c(l[1],a.url,a.line)),e.stack.length>0&&e.stack[0].url===a.url){if(e.stack[0].line===a.line)return!1;else if(!e.stack[0].line&&e.stack[0].func===a.func)return e.stack[0].line=a.line,e.stack[0].context=a.context,!1}return e.stack.unshift(a),e.partial=!0,!0}return e.incomplete=!0,!1}function d(e,p){var h=null;p=null==p?0:+p;try{if(h=function(e){var n=e.stacktrace;if(n){for(var o,s=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,a=/ line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^\)]+))\((.*)\))? in (.*):\s*$/i,c=n.split("\n"),l=[],u=0;u<c.length;u+=2){var d=null;if((o=s.exec(c[u]))?d={url:o[2],line:+o[1],column:null,func:o[3],args:[]}:(o=a.exec(c[u]))&&(d={url:o[6],line:+o[1],column:+o[2],func:o[3]||o[4],args:o[5]?o[5].split(","):[]}),d){if(!d.func&&d.line&&(d.func=r(d.url,d.line)),d.line)try{d.context=i(d.url,d.line)}catch(e){}d.context||(d.context=[c[u+1]]),l.push(d)}}return l.length?{mode:"stacktrace",name:e.name,message:e.message,stack:l}:null}}(e))return h}catch(e){}try{if(h=l(e))return h}catch(e){}try{if(h=function(e){var o=e.message.split("\n");if(o.length<4)return null;var c,l=/^\s*Line (\d+) of linked script ((?:file|https?|blob)\S+)(?:: in function (\S+))?\s*$/i,u=/^\s*Line (\d+) of inline#(\d+) script in ((?:file|https?|blob)\S+)(?:: in function (\S+))?\s*$/i,d=/^\s*Line (\d+) of function script\s*$/i,p=[],h=iN&&iN.document&&iN.document.getElementsByTagName("script"),f=[];for(var m in h)iU(h,m)&&!h[m].src&&f.push(h[m]);for(var g=2;g<o.length;g+=2){var v=null;if(c=l.exec(o[g]))v={url:c[2],func:c[3],args:[],line:+c[1],column:null};else if(c=u.exec(o[g])){v={url:c[3],func:c[4],args:[],line:+c[1],column:null};var y=+c[1],b=f[c[2]-1];if(b){var _=n(v.url);if(_){var w=(_=_.join("\n")).indexOf(b.innerText);w>=0&&(v.line=y+_.substring(0,w).split("\n").length)}}}else if(c=d.exec(o[g])){var O=iq().replace(/#.*$/,""),R=a(new RegExp(s(o[g+1])),[O]);v={url:O,func:"",args:[],line:R?R.line:c[1],column:null}}if(v){v.func||(v.func=r(v.url,v.line));var S=i(v.url,v.line),E=S?S[Math.floor(S.length/2)]:null;S&&E.replace(/^\s*/,"")===o[g+1].replace(/^\s*/,"")?v.context=S:v.context=[o[g+1]],p.push(v)}}return p.length?{mode:"multiline",name:e.name,message:o[0],stack:p}:null}(e))return h}catch(e){}try{if(h=function e(n,i){for(var l,p,h,f=/function\s+([_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*)?\s*\(/i,m=[],g={},v=!1,y=e.caller;y&&!v;y=y.caller)if(y!==d&&y!==iD.report){if(p={url:null,func:"?",args:[],line:null,column:null},y.name?p.func=y.name:(l=f.exec(y.toString()))&&(p.func=l[1]),void 0===p.func)try{p.func=l.input.substring(0,l.input.indexOf("{"))}catch(e){}if(h=function(e){if(!iM(iN&&iN.document)){for(var n,r,i,c,l=[iq()],u=iN.document.getElementsByTagName("script"),d=""+e,p=0;p<u.length;++p){var h=u[p];h.src&&l.push(h.src)}if(i=/^function(?:\s+([\w$]+))?\s*\(([\w\s,]*)\)\s*\{\s*(\S[\s\S]*\S)\s*\}\s*$/.exec(d)){var f=i[1]?"\\s+"+i[1]:"",m=i[2].split(",").join("\\s*,\\s*");r=RegExp("function"+f+"\\s*\\(\\s*"+m+"\\s*\\)\\s*{\\s*"+(n=o(i[3]).replace(/;$/,";?"))+"\\s*}")}else r=new RegExp(o(d).replace(/\s+/g,"\\s+"));if(c=a(r,l))return c;if(i=/^function on([\w$]+)\s*\(event\)\s*\{\s*(\S[\s\S]*\S)\s*\}\s*$/.exec(d)){var g=i[1];if((c=a(r=RegExp("on"+g+"=[\\'\"]\\s*"+(n=s(i[2]))+"\\s*[\\'\"]","i"),l[0]))||(c=a(r=new RegExp(n),l)))return c}return null}}(y)){p.url=h.url,p.line=h.line,"?"===p.func&&(p.func=r(p.url,p.line));var b=/ '([^']+)' /.exec(n.message||n.description);b&&(p.column=c(b[1],h.url,h.line))}g[""+y]?v=!0:g[""+y]=!0,m.push(p)}i&&m.splice(0,i);var _={mode:"callers",name:n.name,message:n.message,stack:m};return u(_,n.sourceURL||n.fileName,n.line||n.lineNumber,n.message||n.description),_}(e,p+1))return h}catch(e){}return{original:e,name:e.name,message:e.message,mode:"failed"}}return d.augmentStackTraceWithInitialElement=u,d.computeStackTraceFromStackProp=l,d.guessFunctionName=r,d.gatherContext=i,d.ofCaller=function(e){e=(null==e?0:+e)+1;try{throw Error()}catch(n){return d(n,e+1)}},d.getSource=n,d}(),iD.extendToAsynchronousCallbacks=function(){var e=function(e){var n=iN[e];iN[e]=function(){var e=iL.call(arguments),r=e[0];return("function"==typeof r&&(e[0]=iD.wrap(r)),n.apply)?n.apply(this,e):n(e[0],e[1])}};e("setTimeout"),e("setInterval")},iD.remoteFetching=!1,iD.collectWindowErrors=!0,iD.linesOfContext=11,iD.report;var iH=iD.report.subscribe,iV=iD.report.unsubscribe,iX=iD.report.installGlobalHandler,iW=iD.report.installGlobalUnhandledRejectionHandler,i$=iD.computeStackTrace;function iz(e,n){var r=(65535&e)+(65535&n);return(e>>16)+(n>>16)+(r>>16)<<16|65535&r}function iG(e,n,r,i,o,s){var a,c;return iz((a=iz(iz(n,e),iz(i,s)))<<(c=o)|a>>>32-c,r)}function iK(e,n,r,i,o,s,a){return iG(n&r|~n&i,e,n,o,s,a)}function iY(e,n,r,i,o,s,a){return iG(n&i|r&~i,e,n,o,s,a)}function iJ(e,n,r,i,o,s,a){return iG(n^r^i,e,n,o,s,a)}function iQ(e,n,r,i,o,s,a){return iG(r^(n|~i),e,n,o,s,a)}function iZ(e,n){e[n>>5]|=128<<n%32,e[(n+64>>>9<<4)+14]=n;var r,i,o,s,a,c=0x67452301,l=-0x10325477,u=-0x67452302,d=0x10325476;for(r=0;r<e.length;r+=16)i=c,o=l,s=u,a=d,c=iK(c,l,u,d,e[r],7,-0x28955b88),d=iK(d,c,l,u,e[r+1],12,-0x173848aa),u=iK(u,d,c,l,e[r+2],17,0x242070db),l=iK(l,u,d,c,e[r+3],22,-0x3e423112),c=iK(c,l,u,d,e[r+4],7,-0xa83f051),d=iK(d,c,l,u,e[r+5],12,0x4787c62a),u=iK(u,d,c,l,e[r+6],17,-0x57cfb9ed),l=iK(l,u,d,c,e[r+7],22,-0x2b96aff),c=iK(c,l,u,d,e[r+8],7,0x698098d8),d=iK(d,c,l,u,e[r+9],12,-0x74bb0851),u=iK(u,d,c,l,e[r+10],17,-42063),l=iK(l,u,d,c,e[r+11],22,-0x76a32842),c=iK(c,l,u,d,e[r+12],7,0x6b901122),d=iK(d,c,l,u,e[r+13],12,-0x2678e6d),u=iK(u,d,c,l,e[r+14],17,-0x5986bc72),l=iK(l,u,d,c,e[r+15],22,0x49b40821),c=iY(c,l,u,d,e[r+1],5,-0x9e1da9e),d=iY(d,c,l,u,e[r+6],9,-0x3fbf4cc0),u=iY(u,d,c,l,e[r+11],14,0x265e5a51),l=iY(l,u,d,c,e[r],20,-0x16493856),c=iY(c,l,u,d,e[r+5],5,-0x29d0efa3),d=iY(d,c,l,u,e[r+10],9,0x2441453),u=iY(u,d,c,l,e[r+15],14,-0x275e197f),l=iY(l,u,d,c,e[r+4],20,-0x182c0438),c=iY(c,l,u,d,e[r+9],5,0x21e1cde6),d=iY(d,c,l,u,e[r+14],9,-0x3cc8f82a),u=iY(u,d,c,l,e[r+3],14,-0xb2af279),l=iY(l,u,d,c,e[r+8],20,0x455a14ed),c=iY(c,l,u,d,e[r+13],5,-0x561c16fb),d=iY(d,c,l,u,e[r+2],9,-0x3105c08),u=iY(u,d,c,l,e[r+7],14,0x676f02d9),l=iY(l,u,d,c,e[r+12],20,-0x72d5b376),c=iJ(c,l,u,d,e[r+5],4,-378558),d=iJ(d,c,l,u,e[r+8],11,-0x788e097f),u=iJ(u,d,c,l,e[r+11],16,0x6d9d6122),l=iJ(l,u,d,c,e[r+14],23,-0x21ac7f4),c=iJ(c,l,u,d,e[r+1],4,-0x5b4115bc),d=iJ(d,c,l,u,e[r+4],11,0x4bdecfa9),u=iJ(u,d,c,l,e[r+7],16,-0x944b4a0),l=iJ(l,u,d,c,e[r+10],23,-0x41404390),c=iJ(c,l,u,d,e[r+13],4,0x289b7ec6),d=iJ(d,c,l,u,e[r],11,-0x155ed806),u=iJ(u,d,c,l,e[r+3],16,-0x2b10cf7b),l=iJ(l,u,d,c,e[r+6],23,0x4881d05),c=iJ(c,l,u,d,e[r+9],4,-0x262b2fc7),d=iJ(d,c,l,u,e[r+12],11,-0x1924661b),u=iJ(u,d,c,l,e[r+15],16,0x1fa27cf8),l=iJ(l,u,d,c,e[r+2],23,-0x3b53a99b),c=iQ(c,l,u,d,e[r],6,-0xbd6ddbc),d=iQ(d,c,l,u,e[r+7],10,0x432aff97),u=iQ(u,d,c,l,e[r+14],15,-0x546bdc59),l=iQ(l,u,d,c,e[r+5],21,-0x36c5fc7),c=iQ(c,l,u,d,e[r+12],6,0x655b59c3),d=iQ(d,c,l,u,e[r+3],10,-0x70f3336e),u=iQ(u,d,c,l,e[r+10],15,-1051523),l=iQ(l,u,d,c,e[r+1],21,-0x7a7ba22f),c=iQ(c,l,u,d,e[r+8],6,0x6fa87e4f),d=iQ(d,c,l,u,e[r+15],10,-0x1d31920),u=iQ(u,d,c,l,e[r+6],15,-0x5cfebcec),l=iQ(l,u,d,c,e[r+13],21,0x4e0811a1),c=iQ(c,l,u,d,e[r+4],6,-0x8ac817e),d=iQ(d,c,l,u,e[r+11],10,-0x42c50dcb),u=iQ(u,d,c,l,e[r+2],15,0x2ad7d2bb),l=iQ(l,u,d,c,e[r+9],21,-0x14792c6f),c=iz(c,i),l=iz(l,o),u=iz(u,s),d=iz(d,a);return[c,l,u,d]}function i0(e){var n,r="",i=32*e.length;for(n=0;n<i;n+=8)r+=String.fromCharCode(e[n>>5]>>>n%32&255);return r}function i1(e){var n,r=[];for(n=0,r[(e.length>>2)-1]=void 0;n<r.length;n+=1)r[n]=0;var i=8*e.length;for(n=0;n<i;n+=8)r[n>>5]|=(255&e.charCodeAt(n/8))<<n%32;return r}function i2(e){var n,r,i="0123456789abcdef",o="";for(r=0;r<e.length;r+=1)n=e.charCodeAt(r),o+=i.charAt(n>>>4&15)+i.charAt(15&n);return o}function i3(e){return unescape(encodeURIComponent(e))}function i6(e){var n;return i0(iZ(i1(n=i3(e)),8*n.length))}function i5(e,n){return function(e,n){var r,i,o=i1(e),s=[],a=[];for(s[15]=a[15]=void 0,o.length>16&&(o=iZ(o,8*e.length)),r=0;r<16;r+=1)s[r]=0x36363636^o[r],a[r]=0x5c5c5c5c^o[r];return i=iZ(s.concat(i1(n)),512+8*n.length),i0(iZ(a.concat(i),640))}(i3(e),i3(n))}function i4(e,n,r){if(!n)return r?i6(e):i2(i6(e));return r?i5(n,e):i2(i5(n,e))}function i8(e){return(e||"").replace(/#.*$/,"").replace(/\?.*$/,"")}function i9(){if(!("fetch"in iP()))return!1;try{return new Headers,new Request(""),new Response,!0}catch(e){return!1}}function i7(e,n){for(var r=0;r<e.length;++r)if(e[r]===n)return r;return -1}function oe(e,n,r,i){var o,s,a,c;return JSON.stringify(e,(o=n,a=[],c=[],null==(s=i)&&(s=function(e,n){return a[0]===n?"[Circular ~]":"[Circular ~."+c.slice(0,i7(a,n)).join(".")+"]"}),function(e,n){if(a.length>0){var r=i7(a,this);~r?a.splice(r+1):a.push(this),~r?c.splice(r,1/0,e):c.push(e),~i7(a,n)&&(n=s.call(this,e,n))}else a.push(n);return null==o?n instanceof Error?function(e){var n={stack:e.stack,message:e.message,name:e.name};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(n):n:o.call(this,e,n)}),r)}function ot(e,n){if(Array.isArray(e))for(var r=e.length,i=0;i<r;i++)n.call(null,i,e[i]);else for(var o in e)Reflect.has(e,o)&&n.call(null,o,e[o])}function on(e){var n={};for(var r in e)if(e.hasOwnProperty(r)){var i=e[r];n[r]=ix(i)?i():i}return n}function or(e){var n;return iC(e)?oi(e,40):iI(e)||(n=e,"[object Boolean]"===Object.prototype.toString.call(n))||iM(e)?e+"":iA(e)?"[Object]":ij(e)?"[Array]":ix(e)?e.name?"[Function: "+e.name+"]":"[Function]":e}function oi(e,n){return 0===n||e.length<=n?e:e.substr(0,n)+"…"}function oo(e){var n={protocol:"",host:"",path:"",relative:""};if("string"!=typeof e)return n;var r=e.match(/^(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(r&&r.length){var i=r[6]||"",o=r[8]||"";return{protocol:r[2]||"",host:r[4]||"",path:r[5]||"",relative:(r[5]||"")+i+o}}return n}function os(e){var n=e.exception,r=[];return r.push("token="+n.token),r.push("type="+n.type),r.push("mechanism="+n.mechanism),r.push("value="+n.value),r.push("url="+n.url),n.stacktrace&&n.stacktrace.forEach(function(e){r.push("filename="+e.filename),r.push("lineno="+e.lineno),r.push("colno="+e.colno)}),r.join("***")}function oa(e){return e&&Array.isArray(e)&&e.length>0}function oc(e){for(var n=[],r=e.length,i=0;i<r;i++){var o=e[i];iC(o)?n.push(o.replace(/([.*+?^=!:${}()|\[\]\/\\])/g,"\\$1")):o&&o.source&&n.push(o.source)}return RegExp(n.join("|"),"i")}function ol(e,n){return!!iC(n)&&e.some(function(e){var r;if(!e)return!1;if(iC(e))return -1!==n.indexOf(e);if(r=e,"[object RegExp]"===Object.prototype.toString.call(r))try{return e.test(n)}catch(n){return console.error(e+"正则书写有误"),!1}return console.error(e+"忽略匹配项类型应该是String、RegExp"),!1})}function ou(e){return(iC(e)?e:JSON.stringify(e)).slice(0,256)}function od(e,n,r){var i,o,s=[];if(e.stack&&e.stack.length){try{for(var a=iR(e.stack),c=a.next();!c.done;c=a.next()){var l=c.value,u=function(e,n,r){var i={filename:e.url||n,lineno:e.line,colno:e.column,function:e.func||"?"};if(r&&r.length>0){var o=oc(r).test(i.filename),s=/(Weirwood|Tracekit)/.test(i.function),a=/weirwood\-sdk/.test(i.filename);i.in_app=o,(s||a)&&(i.in_app=!1)}else i.in_app=!1;return i}(l,e.url||"",n.includePaths);s.push(u)}}catch(e){i={error:e}}finally{try{c&&!c.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}if(n&&n.trimHeadFrames)for(var d=0;d<n.trimHeadFrames&&d<s.length;d++)s[d].in_app=!1}return s=(s=s.filter(function(e){var n,r,i;return r=-1!==(n=e.filename||"").indexOf("weirwood-sdk"),i=/captureException$/.test(n),!r&&!i})).slice(0,r)}function op(e,n,r,i){if(null!=e){var o=e[n];return e[n]=r(o),e[n].__raven__=!0,e[n].__orig__=o,o.__raven_wrapper__=e[n],i&&i.push([e,n,o]),e[n]}}function oh(e,n,r){if(void 0===e&&(e={}),iM(n)&&!ix(e))return e;if(ix(e)&&(n=e,e=void 0),!ix(n))return n;try{if(n.__raven__)return n;if(n.__raven_wrapper__)return n.__raven_wrapper__}catch(e){return n}function i(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];var s=[],a=i.length,c=!e||e&&!1!==e.deep;for(r&&ix(r)&&r.apply(this,i);a--;)s[a]=c?oh(e,i[a]):i[a];try{return n.apply(this,s)}catch(e){throw e}}for(var o in n)n.hasOwnProperty(o)&&(i[o]=n[o]);return i.prototype=n.prototype,n.__raven_wrapper__=i,i.__raven__=!0,i.__orig__=n,i}function of(e){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var i=n[0];return(ix(i)&&(n[0]=oh({mechanism:{type:"instrument",data:{function:(null==e?void 0:e.name)||"<anonymous>"}}},i)),e.apply)?e.apply(this,n):e(n[0],n[1])}}function om(e,n){return function(r){if(O=void 0,R!==r){R=r;try{i=function(e){for(var n,r=[],i=3,o=0,s=0;e&&o++<5;){var a="html"===(n=function(e){if(!e||!e.tagName)return"";var n,r,i,o,s=[e.tagName.toLowerCase()];e.id&&s.push("#"+e.id);var a=e.className?e.className.split(/\s+/):[];try{for(var c=iR(a),l=c.next();!l.done;l=c.next()){var u=l.value;s.push("."+u)}}catch(e){n={error:e}}finally{try{l&&!l.done&&(r=c.return)&&r.call(c)}finally{if(n)throw n.error}}try{for(var d=iR(["type","name","title","alt"]),p=d.next();!p.done;p=d.next()){var h=p.value,f=e.getAttribute(h);f&&s.push("["+h+"="+f+"]")}}catch(e){i={error:e}}finally{try{p&&!p.done&&(o=d.return)&&o.call(d)}finally{if(i)throw i.error}}return s.join("")}(e)),c=o>1&&s+r.length*i+n.length>=80;if(a||c)break;r.push(n),s+=n.length,e=e.parentNode}return r.reverse().join(" > ")}(r.target)}catch(e){i="<unknown>"}if(i){var i,o={category:"ui."+n,message:i,name:n};"input"===n&&"password"!==i.type&&(o.data=r.target.value||""),e.captureBehavior(o)}}}}function og(e){return function(n){try{r=n.target}catch(e){return}var r,i=r&&r.tagName;i&&("INPUT"===i||"TEXTAREA"===i||r.isContentEditable)&&(O||om(e,"input")(n),clearTimeout(O),O=setTimeout(function(){O=void 0},1e3))}}__webpack_require__("../../node_modules/@baidu/weirwood-error/esm/plugins/Plugin.js");var ov=iP(),oy=[301,302,304],ob=function(){function e(n){this.name=e.id,this.options=iO({beacon:!0,console:!0,dom:!0,fetch:!0,history:!0,weirwood:!0,xhr:!0},n)}return e.prototype.setupOnce=function(e){this.client=e;var n,r,i=Object.keys(this.options);try{for(var o=iR(i),s=o.next();!s.done;s=o.next()){var a=s.value,c="instrument"+a[0].toUpperCase()+a.slice(1);this.options[a]&&this[c]&&"function"==typeof this[c]&&this[c].call(this)}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}},e.prototype.instrumentDom=function(){if("document"in iP()){var e=ov.document;e.addEventListener("click",om.call(this,this.client,"click"),!1),e.addEventListener("keypress",og.call(this,this.client),!1)}},e.prototype.instrumentXhr=function(){var e=this.client,n=e.options,r=n.collectAutoAPIException,i=n.isApiException;if("XMLHttpRequest"in ov){var o=XMLHttpRequest.prototype,s=e._globalKey||"";op(o,"open",function(e){return function(n,r){return iC(r)&&-1===r.indexOf(s)&&(this.__raven_xhr={method:n,url:r,status_code:null}),e.apply(this,arguments)}},e._wrappedBuiltIns),op(o,"abort",function(e){return function(){return this.__raven_xhr&&(this.__raven_xhr.abortedFlag=!0),e.apply(this,arguments)}},e._wrappedBuiltIns),op(o,"send",function(n){return function(){var o=this,s=arguments;function a(){if(o.__raven_xhr&&4===o.readyState){try{o.__raven_xhr.status_code=o.status}catch(e){}var n=function(e,n){if(void 0===e&&(e=""),void 0===n&&(n=""),(""===e||"text"===e)&&iC(n)&&n.length)try{return JSON.parse(n)}catch(e){return n}return"json"===e?JSON.parse(JSON.stringify(n)):""}(o.responseType,o.response);if((e.captureBehavior({type:"http",category:"xhr",data:iO(iO({},o.__raven_xhr),{response:ou(n),params:ou(s&&s[0]?s[0]:"")})}),r)&&(!o.__raven_xhr||!o.__raven_xhr.abortedFlag)){var a=!1,c=o.status>=200&&o.status<=299,l=-1!==oy.indexOf(o.status);if(c||l||(a=!0),c&&i&&ix(i)&&(a=!!i({method:o.__raven_xhr.method,url:o.responseURL,status:o.status,responseType:o.responseType,response:n})),a){var u="";ix(o.getAllResponseHeaders)&&(u=o.getAllResponseHeaders().trim().replace(/[\r\n]+/g,"***")),e.captureAPIException({url:o.responseURL||o.__raven_xhr.url,method:o.__raven_xhr.method,params:s&&s[0]?s[0]:"",status:o.status,response:(iC(n)?n:JSON.stringify(n)).slice(0,8192),responseHeaders:u,user:"",extra:"AUTO_XHR"})}}}}for(var c=["onload","onerror","onprogress"],l=0;l<c.length;l++)!function(e,n){e in n&&ix(n[e])&&op(n,e,function(n){return oh({mechanism:{data:{function:e,handler:n&&n.name||"<anonymous>"},handled:!0,type:"instrument"}},n)})}(c[l],o);return"onreadystatechange"in o&&ix(o.onreadystatechange)?op(o,"onreadystatechange",function(e){return oh({mechanism:{type:"instrument",data:{function:"onreadystatechange",handler:e&&e.name||"<anonymous>"}}},e,a)}):o.onreadystatechange=a,n.apply(this,arguments)}},e._wrappedBuiltIns)}},e.prototype.instrumentFetch=function(){if(i9()){var e=iP(),n=this.client,r=n.options,i=r.collectAutoAPIException,o=r.isApiException,s=n._globalKey;op(ov,"fetch",function(r){return function(){for(var a,c=Array(arguments.length),l=0;l<c.length;++l)c[l]=arguments[l];var u=c[0],d="GET";if("string"==typeof u?a=u:"Request"in e&&u instanceof e.Request?(a=u.url,(null==u?void 0:u.method)&&(d=u.method)):a=""+u,-1!==a.indexOf(s))return r.apply(this,c);c[1]&&c[1].method&&(d=c[1].method);var p={method:d,url:a,status_code:null};return r.apply(this,c).then(function(e){p.status_code=e.status;var r,s,a="";c[1]&&c[1].body&&(a=c[1].body);var l=ix(e.clone)?e.clone():null,u={type:"http",category:"fetch",data:iO(iO({},p),{params:ou(a),response:""})};if(l?l.text().then(function(e){var r;try{r=JSON.parse(e)}catch(n){r=e}u.data.response=ou(r),n.captureBehavior(u)}):n.captureBehavior(u),!i)return e;var d=!1,h=ix(e.clone)?e.clone():null,f=oy.includes(e.status);e.ok||f||(d=!0);var m={method:p.method,url:p.url,status:e.status,response:""},g=[];try{for(var v=iR(e.headers.entries()),y=v.next();!y.done;y=v.next()){var b=y.value;g.push(b[0]+": "+b[1])}}catch(e){r={error:e}}finally{try{y&&!y.done&&(s=v.return)&&s.call(v)}finally{if(r)throw r.error}}var _=iO(iO({},m),{params:a,responseHeaders:g.join("***"),user:"",extra:"AUTO_FETCH"});return h?h.text().then(function(r){var i;try{i=JSON.parse(r)}catch(e){i=r}e.ok&&ix(o)&&(d=!!o(iO(iO({},m),{response:i}))),d&&n.captureAPIException(iO(iO({},_),{response:r.slice(0,8192)}))}).catch(function(e){console.error(e)}):(e.ok&&ix(o)&&(d=!!o(m)),d&&n.captureAPIException(_)),e}).catch(function(e){throw n.captureBehavior({type:"http",category:"fetch",data:p,level:"error"}),e})}},n._wrappedBuiltIns)}},e.prototype.instrumentHistory=function(){var e,n,r,i,o=this.client;if(r=(n=(e=iP()).chrome)&&n.app&&n.app.runtime,i="history"in e&&!!e.history.pushState&&!!e.history.replaceState,!r&&i){var s=function(e,n){var r=oo(ov.location.href),i=oo(n),s=oo(e);s.path||(s=r),S=n,r.protocol===i.protocol&&r.host===i.host&&(n=i.relative),r.protocol===s.protocol&&r.host===s.host&&(e=s.relative),o.captureBehavior({category:"navigation",data:{from:e,to:n}})},a=ov.onpopstate;ov.onpopstate=function(e){var n=ov.location.href;if(s(S,n),a)return a.apply(ov,e)},op(ov.history,"pushState",c),op(ov.history,"replaceState",c)}function c(e){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var i=n.length>2?n[2]:void 0;return i&&s(S,String(i)),e.apply(this,n)}}},e.prototype.instrumentConsole=function(){},e.prototype.instrumentBeacon=function(){},e.id="behaviors",e}(),o_=iP(),ow=function(){function e(n){this.name=e.id,this.options=iO({active:!0},n)}return e.prototype.setupOnce=function(e){this.client=e,this.options.active&&op(o_,"setTimeout",of,this.client._wrappedBuiltIns)},e.id="trycatch",e}(),oO=iP(),oR=function(){function e(){this.name=e.id}return e.prototype.setupOnce=function(e){this.client=e,this.client.captureUserAgent(this.getUserAgent())},e.prototype.getUserAgent=function(){return"navigator"in oO&&"document"in oO?{url:oO.location.href,headers:{"User-Agent":oO.navigator.userAgent,Referrer:oO.document.referrer}}:{}},e.id="UserAgent",e}(),oS={collectWindowErrors:!0,collectUnhandledRejections:!0,collectResourceLoadErrors:!1,collectAutoAPIException:!0,sampleRate:1,maxUrlLength:250,maxMessageLength:0,allowDuplicates:!1,stackTraceLimit:50,behaviorLimit:10,plugins:[],ignoreErrors:[],ignoreKeys:[],whitelistUrls:[],apiWhitelistUrls:[],resourceWhitelistUrls:[],ignoreUrls:[],ignoreJsUrls:[],ignoreApiUrls:[],ignoreApiStatus:[],ignoreResourceUrls:[],maxMessagePerMinute:10,endpoint:"https://fclog.baidu.com/log/weirwood?type=error"},oE="https://dmpstatic.cdn.bcebos.com/weirwood",oT=function(){function e(e){this.options=oS,this._globalContext={env:{},user:{},session_id:""},this._globalKey="fclog.baidu.com/log",this._currentExceptionContext={},this._currentExceptionStartTime=Date.now(),this._behaviors=[],this._lastData=null,this._lastAPIData=null,this._messagesSendLastMinute=0,this._messagesSendEmptyStartTime=Date.now(),this._installed=!1,this._globalErrorHandler=null,this._fetchDefaults={method:"POST",credentials:"include",referrerPolicy:!function(){if(!i9())return!1;try{return new Request("pickleRick",{referrerPolicy:"origin"}),!0}catch(e){return!1}}()?"":"origin"},this._wrappedBuiltIns=[],this._requestInfo=null,e&&this.config(e)}return e.prototype.init=function(e){return this.config(e)},e.prototype.config=function(e){this.options=iO(iO({},this.options),e),this.options.sendWindow=this.options.sendWindow||iP(),this._globalContext.session_id=this.options.uuid4();var n=this.options,r=n.token,i=n.buildid;if(!r||!i)throw Error("error: token and buildid must be provided");return this.setFilters(),this.install(),this},e.prototype.install=function(){var e,n=this;return this._installed?(console.error("error: Weirwood Error SDK has been installed and configured"),!1):(this.options.collectWindowErrors&&iX(),this.options.maxMessagePerMinute>=60&&(this.options.maxMessagePerMinute=60),this.options.collectUnhandledRejections&&iW(),this._globalErrorHandler=this._getErrorHandler().bind(this),iH(this._globalErrorHandler),this.options.collectResourceLoadErrors&&(e=function(e){if(window.performance&&window.performance.getEntriesByName){var r,i=window.performance.getEntriesByName(e.asset);i.length>0&&(r=i[0],["name","serverTiming"].forEach(function(e){delete r[e]}))}var o={mechanism:e.type,name:"ResourceError",message:e.asset,stack:[],mode:"onerror",timing:r,page:e.page,element:e.element,elementPath:e.path.slice(0,255)};n._handleStackInfo(o,{trimHeadFrames:0,mechanism:o.mechanism||"generic",includePaths:n.options.includePaths})},window.addEventListener("error",function(n){if(n&&n.target&&n.target!==window){var r,i=n.target,o=null!=(r=null==i?void 0:i.tagName)?r:"unknown tagname";if(-1!==["SCRIPT","LINK","IMG"].indexOf(o)){var s=i.src||i.href,a=window.location.href,c=function(e){for(var n=e.path||[],r="",i=0;i<n.length;i++){var o=n[i];if(o===window){r+="Window";continue}r+=o.nodeName,r+=o.id?"#"+o.id:"",r+=o.className?"."+o.className.split(" ").join("."):"",i<n.length&&(r+=" > ")}return r}(n),l={type:o,asset:i8(s)===i8(a)?"空资源":s,integrity:i.integrity,element:i&&i.outerHTML&&i.outerHTML.replace(/"/g,""),path:c.replace(/"/g,""),page:window.location.href.slice(0,255)};e&&e(l)}}},!0)),this._installed=!0,this.installPlugins(),this)},e.prototype.installPlugins=function(){var e,n;this.options.plugins=iS([new ob(this.options.behaviorOptions),new ow(this.options.tryCatchOptions),new oR],this.options.plugins||[]);try{for(var r=iR(this.options.plugins),i=r.next();!i.done;i=r.next())i.value.setupOnce(this)}catch(n){e={error:n}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}},e.prototype.setFilters=function(){var e=this.options;e.ignoreErrors&&(e.ignoreErrors=iS([/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,'{"isTrusted":true}','{"isTrusted":false}',"Network Error","ResizeObserver loop"],e.ignoreErrors||[])),e.ignoreJsUrls=iS(["chrome-extension","safari-extension","moz-extension",oE],e.ignoreJsUrls||[])},e.prototype._getErrorHandler=function(){var e=this;return function(n,r,i,o,s,a){if(i&&(i.stack||i.stacktrace)&&(n.originalStack=((i.stack||i.stacktrace)+"").slice(0,1e4)),n.stack&&!n.stack.length&&o&&(n.stack[0]={url:o,line:s,column:a}),!n.name&&!n.message&&"onunhandledrejection"===n.mechanism){var c=iP();n.name="unhandledrejection",n.url=n.url||c.location.href,n.message=i}e._handleStackInfo(n,{trimHeadFrames:0,mechanism:n.mechanism||"generic",includePaths:e.options.includePaths})}},e.prototype._handleStackInfo=function(e,n){var r=od(e,n,this.options.stackTraceLimit);this._processException(e,r,n)},e.prototype._processException=function(e,n,r){var i=this.options,o=i.ignoreErrors,s=void 0===o?[]:o,a=i.ignoreKeys,c=void 0===a?[]:a,l=i.whitelistUrls,u=void 0===l?[]:l,d=i.resourceWhitelistUrls,p=void 0===d?[]:d,h=i.ignoreUrls,f=void 0===h?[]:h,m=i.ignoreJsUrls,g=void 0===m?[]:m,v=i.ignoreResourceUrls,y=void 0===v?[]:v,b=e.name,_=e.message,w=e.url,O=void 0===w?"":w,R=e.page,S=void 0===R?window.location.href:R,E=e.lineno,T=e.originalStack;if(!(s.length&&ol(s,_)||f.length&&ol(f,S))){var M=(j=n,A=O,j&&j.length&&j[0].filename||A);if("ResourceError"===b){if(y.length&&ol(y,_)||p.length&&!ol(p,_))return}else if(c.length&&ol(c,b)||g.length&&ol(g,M)||u.length&&!ol(u,M))return;if(n&&n.length>0){var x=n[0].filename||"",C=-1!==x.indexOf("@baidu/weirwood-error"),I=-1!==x.indexOf(oE);if(C||I)return}if(-1===M.indexOf(oE)){var j,A,k,B,P,N=(k=n,B=O,P=void 0===E?0:E,k&&k.length?k.reverse():B?[{filename:B,lineno:P||0,in_app:!0}]:[]),D=iO(iO({},r),{exception:{type:b,value:_,originalStack:void 0===T?"":T,stacktrace:N,url:"ResourceError"===b?_:M,page:e.page,element:e.element,timing:e.timing,elementPath:e.elementPath}}),L=D.exception;null==L.type&&""===L.value&&(L.value="Unrecoverable error caught"),!D.exception.mechanism&&D.mechanism&&(D.exception.mechanism=D.mechanism,delete D.mechanism),this._send(D)}}},e.prototype.mergeGlobalContext=function(e){var n,r,i,o=iP();e.env=iO(iO(iO({},this._globalContext.env),e.env),{network:null==(i=o.navigator.connection)?void 0:i.effectiveType,windowHeight:(o.document.documentElement||o.document.body).clientHeight,windowWidth:(o.document.documentElement||o.document.body).clientWidth,documentTitle:o.document.title});try{for(var s=iR(Object.keys(this._currentExceptionContext)),a=s.next();!a.done;a=s.next()){var c=a.value;e.env[c]=this._currentExceptionContext[c]}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}e.env["session:duration"]=Date.now()-this._currentExceptionStartTime,this._globalContext.user&&(e.user=this._globalContext.user),this._globalContext.session_id&&(e.session_id=this._globalContext.session_id)},e.prototype._send=function(e){var n={request:this._requestInfo};if(iM(e.trimHeadFrames)||delete e.trimHeadFrames,e=iO(iO({},n),e),this.mergeGlobalContext(e),this._behaviors&&this._behaviors.length>0){var r=[].slice.call(this._behaviors,0);this.options.behaviorDataCallback&&(r=this.options.behaviorDataCallback(r)),e.behaviors=r}var i=this.options;if(i.token&&(e.token=i.token),i.buildid&&(e.buildid=i.buildid),Object.keys(e=this._sanitizeData(e)).forEach(function(n){(null==e[n]||""===e[n]||ik(e[n]))&&delete e[n]}),ix(i.dataCallback)&&(e=i.dataCallback(e)),!(!e||ik(e))){var o=Date.now()-this._messagesSendEmptyStartTime,s=this._messagesSendLastMinute>this.options.maxMessagePerMinute;if(o<6e4){if(s)return}else this._messagesSendEmptyStartTime=Date.now(),this._messagesSendLastMinute=1;"number"==typeof i.sampleRate?Math.random()<i.sampleRate&&(this._sendProcessedPayload(e),this._messagesSendLastMinute+=1):(this._sendProcessedPayload(e),this._messagesSendLastMinute+=1)}},e.prototype.isSetup=function(){return this._installed},e.prototype._trimPacket=function(e){var n,r,i=this.options.maxUrlLength||0,o=this.options.maxMessageLength||0;if(e.exception&&(e.exception.value=oi(e.exception.value,o)),e.request){var s=iP();e.request.url=oi(s.location.href,i);var a=e.request.headers.Referrer;e.request.headers.Referrer=oi(a,i)}if(e.behaviors&&e.behaviors.length){var c=["url","to","from"];try{for(var l=iR(e.behaviors),u=l.next();!u.done;u=l.next()){var d=u.value;!function(e){var n=e.data||{},r=function(e){n.hasOwnProperty(e)&&c.forEach(function(r){e===r&&(n[e]=oi(n[e],i))})};for(var o in n)r(o)}(d)}}catch(e){n={error:e}}finally{try{u&&!u.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}}return e},e.prototype._sendProcessedPayload=function(e,n){var r,i=this,o=this.options;if(e=this._trimPacket(e),!this.options.allowDuplicates&&this._isRepeatData(e))return void console.warn("Weirwood error SDK dropped repeat event:",e);var s=o.issueGroupby;s&&ix(s)&&(r=s(e.exception)),r&&iC(r)?(e.fingerprint=r.substr(0,255),e.event_id=i4(e.fingerprint)):e.event_id=i4(os(e)),e.data_id=i4(function(e){var n=os(e),r=[],i=e.request,o=e.env,s=e.behaviors;if(!i)return JSON.stringify(e);var a=i.headers,c=i.url;return r.push("Referrer="+a.Referrer),r.push("ua="+a["User-Agent"]),r.push("url="+c),ot(o,function(e,n){"session:duration"!==e&&r.push(e+"="+n)}),ot(s,function(e){r.push("behavior.category="+e.category),r.push("behavior.name="+e.name),r.push("behavior.message="+e.message)}),n+r.join("***")}(e)),e.version=this.options.version||"",e.sdkTimestamp=Date.now(),this._lastData=e;var a={weirwood_version:this.options.version||""};(o.transport||this._makeRequest).call(this,{url:this.options.endpoint,auth:a,data:e,options:o,onSuccess:function(){i._resetBackoff(),n&&n()},onError:function(e){e.request&&i._setBackoffState(e.request),e=e||Error("Raven send failed (no additional details provided)"),n&&n(e)}})},e.prototype._makeRequest=function(e){var n,r,i=this,o=e.url,s=null,a={};e.options.headers&&(s=on(e.options.headers)),e.options.fetchParameters&&(a=on(e.options.fetchParameters));var c=this.options.sendWindow;if(i9()){a.body=oe(e.data);var l=iO(iO({},this._fetchDefaults),a);if(s){var u=new Headers;try{for(var d=iR(Object.keys(s)),p=d.next();!p.done;p=d.next()){var h=p.value;u.append(h,s[h])}}catch(e){n={error:e}}finally{try{p&&!p.done&&(r=d.return)&&r.call(d)}finally{if(n)throw n.error}}u.append("Content-Type","text/plain"),l.headers=u}return c.fetch(o,l).then(function(n){if(n.ok)e.onSuccess&&e.onSuccess(),i._resetBackoff();else{var r=Error("Weirwood error SDK error code: "+n.status);r.request=n,e.onError&&e.onError(r)}}).catch(function(){e.onError&&e.onError(Error("Weirwood error SDK error code: network unavailable")),i._resetBackoff()})}var f=c.XMLHttpRequest&&new c.XMLHttpRequest;f&&("withCredentials"in f||"undefined"!=typeof XDomainRequest)&&("withCredentials"in f?f.onreadystatechange=function(){if(4!==f.readyState)return void i._resetBackoff();if(200===f.status)e.onSuccess&&e.onSuccess();else if(e.onError){i._resetBackoff();var n=Error("Weirwood error SDK error code: "+f.status);n.request=f,e.onError(n)}}:(f=new XDomainRequest,o=o.replace(/^https?:/,""),e.onSuccess&&(f.onload=e.onSuccess),e.onError&&(f.onerror=function(){var n=Error("Weirwood error SDK error code: XDomainRequest");n.request=f,e.onError(n)})),f.open("POST",o),s&&ot(s,function(e,n){f.setRequestHeader(e,n)}),f.send(oe(e.data)))},e.prototype._sanitizeData=function(e){var n=this.options.sanitizeKeys||[];if(n.length){var r=e,i=n;if(!Array.isArray(i)||Array.isArray(i)&&0===i.length)return r;var o,s=oc(i);try{o=JSON.parse(oe(r))}catch(e){return r}return function e(n){return Array.isArray(n)?n.map(function(n){return e(n)}):iA(n)?Object.keys(n).reduce(function(r,i){return s.test(i)?r[i]="********":r[i]=e(n[i]),r},{}):n}(o)}return e},e.prototype.captureUserAgent=function(e){this._requestInfo=e},e.prototype.captureException=function(e,n){if(n||(n={trimHeadFrames:0,includePaths:[],mechanism:"generic",message:""}),iE(e));else if(iT(e))e=e.error;else if(iA(e))e=Error((n=this._getCaptureExceptionOptionsFromPlainObject(n,e)).message);else{if(r=e,"[object DOMException]"!==Object.prototype.toString.call(r))return this.captureMessage(e,iO(iO({},n),{stacktrace:!0,trimHeadFrames:n.trimHeadFrames+1}));var r,i=e.name||"DOMException",o=e.message?i+": "+e.message:i;return this.captureMessage(o,n)}try{n=iO({trimHeadFrames:0,mechanism:"generic",includePaths:this.options.includePaths||[]},n);var s=i$(e);this._handleStackInfo(s,n)}catch(n){if(e!==n)throw n}return this},e.prototype._isRepeatData=function(e){var n,r,i=this._lastData,o=e.exception,s=i?i.exception:{};return n=o,r=s,n.mechanism===r.mechanism&&n.type===r.type&&n.value===r.value&&n.url===r.url&&(0===n.stacktrace.length&&0===r.stacktrace.length||function(e,n){if(oa(e)&&oa(n)){var r,i,o=e.length;if(o!==n.length)return!1;for(var s=0;s<o;s++){if(r=e[s],i=n[s],r.filename!==i.filename||r.lineno!==i.lineno||r.colno!==i.colno||r.function!==i.function)return!1}return!0}return!1}(n.stacktrace,r.stacktrace))},e.prototype._resetBackoff=function(){this._currentExceptionStartTime=Date.now(),this._currentExceptionContext={}},e.prototype._setBackoffState=function(e){console.log(e)},e.prototype.captureMessage=function(e,n){void 0===n&&(n={});var r,i,o=this.options,s=o.ignoreErrors||[],a=o.ignoreKeys||[],c=o.whitelistUrls||[],l=o.ignoreUrls||[],u=o.ignoreJsUrls||[];if(!(s.length&&ol(s,e))){try{throw Error(e)}catch(e){i=e}var d=i$(i),p=Array.isArray(d.stack)&&d.stack[1];(null==(r=null==p?void 0:p.func)?void 0:r.indexOf("captureException"))!==-1&&(p=d.stack[2]);var h=p&&p.url||"";if(!(l.length&&ol(l,window.location.href)||a.length&&ol(a,i.name)||u.length&&ol(u,h))&&(!c.length||ol(c,h))){n=iO(iO({},n),{trimHeadFrames:0,includePaths:o.includePaths}),n.trimHeadFrames+=1;var f=od(d,n),m={exception:{mechanism:"manual",type:i.name,value:i.message,stacktrace:f.slice(1).reverse(),url:h}};return this._send(m),this}}},e.prototype.captureAPIException=function(e){var n,r,i=this,o=iP(),s=this.options,a=s.ignoreUrls,c=void 0===a?[]:a,l=s.ignoreApiUrls,u=void 0===l?[]:l,d=s.ignoreApiStatus,p=void 0===d?[]:d,h=s.buildid,f=s.token,m=s.version,g=s.apiWhitelistUrls;if(!(e.url&&e.method&&!iM(e.status)))return void console.error("API异常参数至少需要包含 method、url、status 参数。");if(!(c.length&&ol(c,o.location.href)||u.length&&ol(u,e.url))&&(!g.length||ol(g,e.url))&&(!p.length||-1===p.indexOf(Number(e.status)))){var v=iO(iO({},e),{type:"APIError"}),y={request:{headers:{"User-Agent":o.navigator.userAgent},url:o.location.href},exception:v,buildid:h,token:f,version:m||""},b=this.options;if(ix(b.dataCallback)&&(y=b.dataCallback(y)),!(!y||ik(y))){this.mergeGlobalContext(y);var _=this.options.issueGroupby;if((_&&ix(_)&&(r=_(y.exception)),r&&iC(r))?(y.fingerprint=r.substr(0,255),y.event_id=i4(y.fingerprint)):y.event_id=i4((n=e).method+"***"+function(e){if(!iC(e))return"";var n=e.split("?");return n[1]?(n[1]=n[1].replace(/\d+/g,"*").replace(/[\u4e00-\u9fa5]+/gi,"*"),n.join("?")):e}(n.url)),y.data_id=i4(oe(y)),this._lastAPIData!==y.data_id){this._lastAPIData=y.data_id;var w=function(){var e;((null==(e=i.options.globalOptions)?void 0:e.transport)||i._makeRequest).call(i,{url:i.options.endpoint,data:y,options:{},onSuccess:function(){},onError:function(){}})};"number"==typeof b.sampleRate?Math.random()<b.sampleRate&&w():w()}}}},e.prototype.captureEvent=function(){},e.prototype.afterLoad=function(){var e=iP().RavenConfig;e&&this.init(e)},e.prototype._getCaptureExceptionOptionsFromPlainObject=function(e,n){var r=Object.keys(n).sort(),i=iO(iO({},e),{message:"Non-Error exception captured with keys: "+function(e,n){if(void 0===n&&(n=40),iI(e)||iC(e))return e.toString();if(!ij(e))return"";if(0===(e=e.filter(function(e){return iC(e)})).length)return"[object has no keys]";if(n=iI(n)?n:40,e[0].length>=n)return e[0];for(var r=e.length;r>0;r--){var i=e.slice(0,r).join(", ");if(!(i.length>n)){if(r===e.length)return i;return i+"…"}}return""}(r),fingerprint:[i4(r.join(""))],env:e&&e.env||{}});return i.env.__serialized__=function e(n,r,i){if(void 0===r&&(r=3),void 0===i&&(i=51200),!iA(n))return n+"";var o,s,a=function e(n,r){return 0===r?or(n):iA(n)?Object.keys(n).reduce(function(i,o){return i[o]=e(n[o],r-1),i},{}):Array.isArray(n)?n.map(function(n){return e(n,r-1)}):or(n)}(n,r);return~-encodeURI(s=JSON.stringify(o=oe(a))).split(/%..|./).length>i?e(n,r-1):a}(n),i},e.prototype.captureBehavior=function(e){var n=iO(iO({},e),{timestamp:Date.now()/1e3});if(ix(this.options.breadcrumbCallback)){var r,i=this.options.breadcrumbCallback(n);if("object"!=typeof(r=i)||null===r||ik(i)){if(!1===i)return this}else n=i}return this._behaviors.push(n),this._behaviors.length>(this.options.behaviorLimit||10)&&this._behaviors.shift(),this},e.prototype.setContext=function(e,n){for(var r in void 0===n&&(n={persist:!0}),e)Reflect.has(e,r)&&(n.persist?this._globalContext.env[r]=e[r]:this._currentExceptionContext[r]=e[r])},e.prototype.clearContext=function(){this._globalContext.env={},this._currentExceptionContext={}},e.prototype._restoreBuiltIns=function(){for(var e;this._wrappedBuiltIns.length;){var n=(e=this._wrappedBuiltIns.shift())[0],r=e[1],i=e[2];n[r]=i}},e.prototype.noConflict=function(){},e.prototype.uninstall=function(){this.dispose()},e.prototype.dispose=function(){iV(this._globalErrorHandler),this._restoreBuiltIns(),this._globalErrorHandler=null,this._installed=!1},e}(),oM={};function ox(){var e=window.crypto||window.msCrypto;if(void 0===e||!e.getRandomValues)return"xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx".replace(/[xy]/g,function(e){var n=16*Math.random()|0;return("x"===e?n:3&n|8).toString(16)});var n=new Uint16Array(8);e.getRandomValues(n),n[3]=4095&n[3]|16384,n[4]=16383&n[4]|32768;var r=function(e){for(var n=e.toString(16);n.length<4;)n="0"+n;return n};return r(n[0])+r(n[1])+r(n[2])+r(n[3])+r(n[4])+r(n[5])+r(n[6])+r(n[7])}var oC=function(){function e(e){this.version="1.3.15",this.lastRouteTime=0,e&&this.init(e)}return e.prototype.init=function(e){var n,r,i,o,s=this.getSendWindow();if(!e.perf||e.perf&&!e.perf.disable){var a=i_(i_(i_({},e.perf),e.common),{version:this.version,sendWindow:s});this.perf=new iw.PerfClient(a)}if(!e.error||e.error&&!e.error.disable){var c=i_(i_(i_({},e.error),e.common),{version:this.version,sendWindow:s,uuid4:ox});this.error=new oT(c)}this.routeChange(window.document.URL),n=this.routeChange.bind(this),"function"==typeof(r=window.history).pushState&&(i=r.pushState,r.pushState=function(e,r,o){return n(o),i.apply(this,arguments)}),"function"==typeof r.replaceState&&(o=r.replaceState,r.replaceState=function(e,r,i){return i!==window.document.URL&&n(i),o.apply(this,arguments)}),window.addEventListener("hashchange",function(e){n((e||{}).newURL)}),window.addEventListener("popstate",function(e){n(window.document.URL)})},e.prototype.routeChange=function(e){var n=new Date().getTime();if(n-this.lastRouteTime>100){this.lastRouteTime=n;var r=ox()+"-"+n;this.error&&this.error.setContext({pageId:r})}},e.prototype.getSendWindow=function(){var e="undefined"!=typeof window?window:void 0!==__webpack_require__.g?__webpack_require__.g:"undefined"!=typeof self?self:oM;if(["fetch","ajax","sendBeacon"].some(function(e){var n;return!((n=window[e])&&n.toString&&!n.hasOwnProperty("toString")&&/\[native code\]/.test(String(n)))})&&document.body){var n=document.createElement("iframe");n.style.setProperty("display","none","important"),document.body.appendChild(n),e=n?n.contentWindow:e}return e},e.prototype.afterLoad=function(){},e}();function oI(e,n){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,n)}function oj(e,n){return function(r,i){n(r,i,e)}}!function(e){var n;(n=e.EMessageType||(e.EMessageType={}))[n.Query=0]="Query",n[n.Event=1]="Event"}(E||(E={}));class oA{constructor(e,n,r){this.opts=e,this.signalingService=n,this.errorManager=r,this.disabled=!1,this.mutedByUser=!1,this.muted=!1,this.emitter=new tZ,this.started=!1,this.mute=e=>{this.signalingService.Mute(e),this.muted=e},this.setMutedByUser=e=>{this.mutedByUser=e},this.tryUnmuteAsr=()=>!this.disabled&&!this.mutedByUser&&(this.muted&&this.mute(!1),!0),this.disable=()=>{this.disabled=!0},this.enable=()=>{this.disabled=!1},this._stop=async()=>{this.started&&(await this.signalingService.Stop(),this.started=!1)},this._dispose=()=>{this.stop().finally(()=>{this.signalingService.Dispose()}).catch(rh),this.emitter.clearListeners()},this._ensureMicPermission=async()=>{var e;if("function"==typeof(null==(e=navigator.permissions)?void 0:e.query)){try{switch((await navigator.permissions.query({name:"microphone"})).state){case"granted":case"prompt":break;case"denied":this.errorManager.handleError(new nX("麦克风权限被浏览器/系统禁用,请检查后重试"))}}catch{await this._ensureMicPermissionPolyfill()}return}await this._ensureMicPermissionPolyfill()},this._ensureMicPermissionPolyfill=async()=>{try{(await navigator.mediaDevices.getUserMedia({audio:!0})).getTracks().forEach(e=>e.stop())}catch(e){e instanceof Error&&("NotAllowedError"===e.name||"SecurityError"===e.name?this.errorManager.handleError(new nX(`\u{7528}\u{6237}\u{62D2}\u{7EDD}\u{9EA6}\u{514B}\u{98CE}\u{6743}\u{9650}: ${e.message}`)):"NotFoundError"===e.name?this.errorManager.handleError(new nX(`\u{672A}\u{68C0}\u{6D4B}\u{5230}\u{9EA6}\u{514B}\u{98CE}\u{8BBE}\u{5907}: ${e.message}`)):this.errorManager.handleError(new nX(e.message)))}}}get sessionId(){return this.started?this.signalingService.GetSessionID():null}}function ok(e,n){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,n)}function oB(e,n){return function(r,i){n(r,i,e)}}oA=function(e,n,r,i){var o,s=arguments.length,a=s<3?n:null===i?i=Object.getOwnPropertyDescriptor(n,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,n,r,i);else for(var c=e.length-1;c>=0;c--)(o=e[c])&&(a=(s<3?o(a):s>3?o(n,r,a):o(n,r))||a);return s>3&&a&&Object.defineProperty(n,r,a),a}([ey(),oj(0,em(t1.IOptions)),oj(0,eR()),oj(1,em(t1.SignalingService)),oj(2,em(t1.ErrorManager)),oI("design:type",Function),oI("design:paramtypes",["undefined"==typeof IResolvedOptions?Object:IResolvedOptions,"undefined"==typeof BaseSignalingService?Object:BaseSignalingService,void 0===re?Object:re])],oA);class oP{static #k=this.GET_ACCESS_TOKEN_REQUEST_URI="employee-console/v1/access/r/ai-agent/get_digital_token";constructor(e,n,r){this.opts=e,this.request=n,this.errorManager=r,this.emitter=new tZ,this._isRendering=!1,this._isMuted=!1,this._canInterrupt=!0,this.ssmlHandlers=[],this.token="",this.getAccessToken=async()=>{try{let{data:e}=await this.request.client.get(oP.GET_ACCESS_TOKEN_REQUEST_URI,{retry:3,timeout:15e3}).json();return e.authorization}catch(e){throw e instanceof Error&&this.errorManager.handleError(new n0(e.message)),e}}}get isRendering(){return this._isRendering}get isMuted(){return this._isMuted}get canInterrupt(){return this._canInterrupt}setIsRendering(e){this._isRendering=e}setIsMuted(e){this._isMuted=e}setCanInterrupt(e){this._canInterrupt=e}registerSSMLHandler(e){return this.ssmlHandlers.push(e),this}runSsmlHandlers(e){let n=e;for(let e of this.ssmlHandlers)n=e(n);return n}}oP=function(e,n,r,i){var o,s=arguments.length,a=s<3?n:null===i?i=Object.getOwnPropertyDescriptor(n,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,n,r,i);else for(var c=e.length-1;c>=0;c--)(o=e[c])&&(a=(s<3?o(a):s>3?o(n,r,a):o(n,r))||a);return s>3&&a&&Object.defineProperty(n,r,a),a}([ey(),oB(0,em(t1.IOptions)),oB(1,em(t1.CommonRequest)),oB(2,em(t1.ErrorManager)),ok("design:type",Function),ok("design:paramtypes",["undefined"==typeof IOptions?Object:IOptions,void 0===nS?Object:nS,void 0===re?Object:re])],oP);let oN=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:500;return new Promise(n=>setTimeout(n,e))};function oD(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),r.push.apply(r,i)}return r}function oL(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?oD(Object(r),!0).forEach(function(n){oV(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):oD(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function oF(e){return(oF="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function oU(e,n){if(!(e instanceof n))throw TypeError("Cannot call a class as a function")}function oq(e,n){for(var r=0;r<n.length;r++){var i=n[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,oX(i.key),i)}}function oH(e,n,r){return n&&oq(e.prototype,n),r&&oq(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function oV(e,n,r){return(n=oX(n))in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function oX(e){var n=function(e,n){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,n||"default");if("object"!=typeof i)return i;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}(e,"string");return"symbol"==typeof n?n:String(n)}(T||(T={})).INIT="INIT";var oW=function(){function e(n){oU(this,e),oV(this,"iframeId",void 0),this.iframeId=n}return oH(e,[{key:"registerMessageReceived",value:function(e){void 0!==window.addEventListener&&"function"==typeof e&&window.addEventListener("message",e,!1)}},{key:"removeMessageReceived",value:function(e){void 0!==window.addEventListener&&window.removeEventListener("message",e,!1)}},{key:"sendMessageToIframe",value:function(e,n){if(this.iframeId){var r=document.getElementById(this.iframeId);e&&null!==r&&r.contentWindow.postMessage({type:e,content:n},"*")}else if(window.self!==window.top&&window&&window.parent&&window.parent.postMessage){var i=JSON.parse(JSON.stringify(n||{}));window.parent.postMessage({type:e,content:i},"*")}}},{key:"sendCommand",value:function(e){this.sendMessageToIframe("command",e)}},{key:"sendMessage",value:function(e){var n=e.requestId,r=void 0===n?rd():n;return this.sendMessageToIframe("message",oL(oL({},e),{},{requestId:r})),r}},{key:"textRender",value:function(e){return this.sendMessage({action:"TEXT_RENDER",body:e})}},{key:"textQuery",value:function(e){return this.sendMessage({action:"TEXT_QUERY",body:e})}},{key:"changeBackGround",value:function(e){return this.textRender("<display><background><type>image</type><source>http</source><value>".concat(e,"</value></background></display>"))}},{key:"mute",value:function(e){this.sendCommand({subType:"mute",subContent:e})}},{key:"muteAudio",value:function(e){this.sendCommand({subType:"muteAudio",subContent:e})}},{key:"muteRemoteAudio",value:function(e){this.sendCommand({subType:"muteRemoteAudio",subContent:e})}},{key:"playVideo",value:function(e){this.sendCommand({subType:"playVideo",subContent:e})}},{key:"sendAudioData",value:function(e){this.sendMessageToIframe("audioData",e)}},{key:"onStateUpdate",value:function(e){this.sendMessageToIframe("state",e)}},{key:"sendRtcState",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.sendMessageToIframe("rtcState",e)}},{key:"sendWsState",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.sendMessageToIframe("wsState",e)}}]),e}(),o$={LOAD:"LOAD",TEXT_RENDER:"TEXT_RENDER",TEXT_MT_RENDER:"TEXT_MT_RENDER",AUDIO_RENDER:"AUDIO_RENDER",TEXT_QUERY:"TEXT_QUERY",AUDIO_QUERY_START:"AUDIO_QUERY_START",AUDIO_QUERY_STOP:"AUDIO_QUERY_STOP",SET_MODEL_URLS:"SET_MODEL_URLS",CHANGE_CAMERA:"CHANGE_CAMERA",ANIMOJI_RENDER:"ANIMOJI_RENDER",DESTROY:"DESTROY",CHANGE_PARTS:"CHANGE_PARTS",SET_RENDER_CONFIG:"SET_RENDER_CONFIG",AUDIO_RENDER_START:"AUDIO_RENDER_START",AUDIO_RENDER_STOP:"AUDIO_RENDER_STOP",INTERRUPT:"INTERRUPT"};!function(){function e(n){oU(this,e),oV(this,"iframeId",void 0),oV(this,"namespace","dhIframeNameSpace"),oV(this,"listener",null),this.iframeId=n}oH(e,[{key:"onEventListener",value:function(e){var n=this;return function(r){if("object"===oF(r.data))if("onListener"===r.data.type&&r.data.content.listenerId){var i=window[n.namespace][r.data.content.listenerId];null==i||i(r.data.content.data)}else"onListenerRemove"===r.data.type&&r.data.content.listenerId?delete window[n.namespace][r.data.content.listenerId]:r.data.listenerId?e(r.data,function(e){n.sendMessage("onListener",{listenerId:r.data.listenerId,data:e})},function(){n.sendMessage("onListenerRemove",{listenerId:r.data.listenerId})}):e(r.data)}}},{key:"registerMessageReceived",value:function(e){void 0!==window.addEventListener&&"function"==typeof e&&(this.listener=this.onEventListener(e),window.addEventListener("message",this.listener,!1))}},{key:"removeMessageReceived",value:function(){void 0!==window.addEventListener&&this.listener&&(window[this.namespace]=void 0,window.removeEventListener("message",this.listener,!1))}},{key:"sendMessage",value:function(e,n,r){var i=this;if(this.iframeId){var o="";r&&(o=rd(),window[this.namespace]||(window[this.namespace]={}),window[this.namespace][o]=r);var s=document.getElementById(this.iframeId);return e&&null!==s&&s.contentWindow.postMessage({type:e,content:n,listenerId:o},"*"),function(){o&&(window[i.namespace][o]=void 0)}}if(window.self!==window.top&&window&&window.parent&&window.parent.postMessage){var a=JSON.parse(JSON.stringify(n||{}));window.parent.postMessage({type:e,content:a},"*")}}},{key:"textRender",value:function(e,n){return this.sendMessage(o$.TEXT_RENDER,e,n)}},{key:"textMTRender",value:function(e,n){return this.sendMessage(o$.TEXT_MT_RENDER,e,n)}},{key:"audioRender",value:function(e,n){return this.sendMessage(o$.AUDIO_RENDER,e,n)}},{key:"textQuery",value:function(e,n){return this.sendMessage(o$.TEXT_QUERY,e,n)}},{key:"startAudioQuery",value:function(e,n){return this.sendMessage(o$.AUDIO_QUERY_START,e,n)}},{key:"stopAudioQuery",value:function(){return this.sendMessage(o$.AUDIO_QUERY_STOP,{})}},{key:"setModelPackage",value:function(e,n){return this.sendMessage(o$.SET_MODEL_URLS,{urls:e,needInitConfig:n})}},{key:"changeCamera",value:function(e){return this.sendMessage(o$.CHANGE_CAMERA,e)}},{key:"changeParts",value:function(e){return this.sendMessage(o$.CHANGE_PARTS,e)}},{key:"setRenderConfig",value:function(e){return this.sendMessage(o$.SET_RENDER_CONFIG,e)}},{key:"animojiRender",value:function(e,n){return this.sendMessage(o$.ANIMOJI_RENDER,e,n)}},{key:"destroy",value:function(){return this.sendMessage(o$.DESTROY,{})}},{key:"startAudioRender",value:function(e,n){return this.sendMessage(o$.AUDIO_RENDER_START,e,n)}},{key:"stopAudioRender",value:function(){return this.sendMessage(o$.AUDIO_RENDER_STOP,{})}},{key:"interrupt",value:function(){return this.sendMessage(o$.INTERRUPT,{})}},{key:"load",value:function(e){return this.sendMessage(o$.LOAD,e)}},{key:"onStateUpdate",value:function(e){this.sendMessage("state",e)}}])}();let oz=e=>new URLSearchParams(Object.entries(e).filter(e=>{let[,n]=e;return null!=n&&""!==n}).reduce((e,n)=>{let[r,i]=n;return e[r]=String(i),e},{})).toString();var oG=function(e){return e[e.Success=0]="Success",e[e.ReachSessionLimit=1004]="ReachSessionLimit",e[e.ResourceNotEnough=3001]="ResourceNotEnough",e}({}),oK=function(e){return e[e.UNINSTANTIATED=-1]="UNINSTANTIATED",e[e.CONNECTING=0]="CONNECTING",e[e.OPEN=1]="OPEN",e[e.CLOSING=2]="CLOSING",e[e.CLOSED=3]="CLOSED",e}({});class oY extends oP{get ready(){return!!this.iframeController&&!!this.token}constructor(...e){super(...e),this.origin="https://open.xiling.baidu.com",this.iframeId=rd(),this.iframeController=null,this.iframe=null,this.$iframeContainer=null,this.requestId=rd(),this.isWSConnected=!1,this.isRtcReady=!1,this.silenceMessageRequestIds=[],this.isStreamTextRendering=!1,this.wsClosedCount=0,this.mount=async e=>{if(!e)return void this.errorManager.handleError(new nK("容器元素不能为空"));if(this.$iframeContainer=e,this.iframe){e.contains(this.iframe)||e.appendChild(this.iframe);return}this.opts.enableDebugMode&&"development"===this.opts.env&&!this.opts.token?this.token=await this.getAccessToken():this.token=this.opts.token,this.iframe=document.createElement("iframe"),this.applyOptions(),e.appendChild(this.iframe),this.iframeController=new oW(this.iframeId),this.bindEvents()},this.bindEvents=()=>{var e,n;return this.ready&&(null==(e=this.iframe)||e.addEventListener("error",this.onIFrameErrorHandler),null==(n=this.iframeController)||n.registerMessageReceived(this.onMessageHandler)),this},this.unbindEvents=()=>{var e,n;return this.ready&&(null==(e=this.iframe)||e.removeEventListener("error",this.onIFrameErrorHandler),null==(n=this.iframeController)||n.removeMessageReceived(this.onMessageHandler)),this},this.cancelMute=()=>{var e;null==(e=this.iframeController)||e.sendCommand({subType:"muteAudio",subContent:!1}),setTimeout(()=>{this._isMuted=!1},1500)},this.renderPlainText=e=>{var n;if(!this.ready)return this;let r=this.runSsmlHandlers(e);return this.refreshRequestId(),null==(n=this.iframeController)||n.sendMessage({action:"TEXT_RENDER",body:r,requestId:this.requestId}),this},this.renderStreamText=(e,n)=>{var r,i,o;if(!this.ready)return this;let s=this.runSsmlHandlers(e);return n?(this.isStreamTextRendering||this.refreshRequestId(),null==(i=this.iframeController)||i.sendMessage({action:"TEXT_STREAM_RENDER",body:JSON.stringify({first:!this.isStreamTextRendering,last:!0,text:s}),requestId:this.requestId}),this.isStreamTextRendering=!1):this.isStreamTextRendering?null==(r=this.iframeController)||r.sendMessage({action:"TEXT_STREAM_RENDER",body:JSON.stringify({first:!1,last:!1,text:s}),requestId:this.requestId}):(this.refreshRequestId(),this.isStreamTextRendering=!0,null==(o=this.iframeController)||o.sendMessage({action:"TEXT_STREAM_RENDER",body:JSON.stringify({first:!0,last:!1,text:s}),requestId:this.requestId})),this},this.interrupt=()=>{var e;return this.ready&&(null==(e=this.iframeController)||e.sendMessage({action:"TEXT_RENDER",body:"<interrupt></interrupt>",requestId:this.requestId}),this.isRendering||this.onRenderFinished(this.requestId)),this},this.sendSilenceMessage=()=>{var e;if(!this.ready)return this;let n=rd();return null==(e=this.iframeController)||e.sendMessage({action:"TEXT_RENDER",body:"",requestId:n}),this.silenceMessageRequestIds.push(n),this.emitter.emit("send_silence_message",{requestId:n}).catch(rh),this},this.dispose=()=>{if(this.unbindEvents(),this.silenceMessageRequestIds=[],this.ssmlHandlers=[],this.wsClosedCount=0,this.emitter.clearListeners(),this.iframe){var e;null==(e=this.$iframeContainer)||e.removeChild(this.iframe),this.iframe=null,this.iframeController=null}return this},this.GetRequestId=()=>this.requestId,this.checkIsReady=()=>{let e=this.isWSConnected&&this.isRtcReady;return e&&this.emitter.emit("ready").catch(rh),e},this.onIFrameErrorHandler=e=>{let n=new nY(`\u{6570}\u{5B57}\u{4EBA}iframe\u{52A0}\u{8F7D}\u{5931}\u{8D25}: ${e.message}`,{context:{method:"onIFrameErrorHandler",iframeId:this.iframeId,filename:e.filename,lineno:e.lineno,colno:e.colno,type:e.type,target:e.target}});this.errorManager.handleError(n)},this.onMessageHandler=e=>{if(e.origin!==this.origin)return;let n=e.data;switch(n.type){case"msg":this.onReceiveMsgTypedMessageHandler(n);break;case"rtcState":this.onReceiveRtcStateTypedMessageHandler(n);break;case"wsState":this.onReceiveWsStateTypedMessageHandler(n)}},this.onReceiveMsgTypedMessageHandler=e=>{let n=e.content.requestId;if((e.content.code===oG.ReachSessionLimit||e.content.code===oG.ResourceNotEnough)&&(this.emitter.emit("reach_session_limit",{requestId:n}).catch(rh),this.errorManager.handleError(new n1("资源配额已用尽,请联系技术支持申请扩容"))),["RENDER_START","FINISHED","DOWN_SUBTITLE","RENDER_INTERRUPTED","DOWN_SUBTITLE","TEXT_RENDER","TEXT_STREAM_RENDER"].includes(e.content.action)){if(n!==this.requestId)return;switch(e.content.action){case"RENDER_START":this._isRendering=!0,this.emitter.emit("is_rendering_change",!0).catch(rh);break;case"FINISHED":case"RENDER_INTERRUPTED":this.onRenderFinished(n);break;case"DOWN_SUBTITLE":{let r=JSON.parse(e.content.body);this.silenceMessageRequestIds.includes(n)?this.silenceMessageRequestIds=this.silenceMessageRequestIds.filter(e=>e!==n):this.emitter.emit("render_subtitle",{subtitle:r,requestId:n}).catch(rh);break}case"TEXT_RENDER":case"TEXT_STREAM_RENDER":0!==e.content.code&&this.onRenderFinished(n)}return}switch(e.content.action){case"RENDER_ERROR":this.onRenderFinished(n),this.errorManager.handleError(new nJ("数字员工文本驱动渲染失败,请确认配置后重试",{requestId:n,context:{msg:e.content.message}}));break;case"DISCONNECT_ALERT":this.emitter.emit("disconnect_alert",{requestId:n}).catch(rh);break;case"TIMEOUT_EXIT":this.onRenderFinished(n),this.emitter.emit("timeout",{requestId:e.content.requestId}).catch(rh)}},this.onReceiveRtcStateTypedMessageHandler=e=>{e.content.action,"localVideoMuted"===e.content.action&&e.content.body&&(this._isMuted=!0),"remotevideoon"===e.content.action&&(this.isRtcReady=!0,this.checkIsReady(),this.iframe&&(this.iframe.style.opacity="1")),"error"===e.content.action&&this.errorManager.handleError(new nZ("RTC 房间连接失败,请检查网络后重试"))},this.onReceiveWsStateTypedMessageHandler=e=>{e.content.readyState===oK.OPEN?(this.isWSConnected=!0,this.wsClosedCount=0,this.checkIsReady()):(e.content.readyState===oK.CLOSED||e.content.readyState===oK.CLOSING)&&(this.isWSConnected=!1),e.content.readyState===oK.CLOSED&&(this.wsClosedCount++,this.wsClosedCount>=3&&(this.emitter.emit("reconnect_failed").catch(rh),this.errorManager.handleError(new nQ("检测到 Websocket 链接异常断开,如长时间无法恢复,请联系技术支持。"))))},this.applyOptions=()=>{var e,n,r,i,o,s,a,c,l,u,d,p,h,f;if(!this.iframe)return;this.iframe.id=this.iframeId,this.iframe.allow="autoplay",this.iframe.style.border="none",this.iframe.style.opacity="0",this.iframe.style.pointerEvents="none",this.iframe.style.overflow="hidden";let m=null!=(o=null==(e=this.opts)?void 0:e.scaleX)?o:1,g=null!=(s=null==(n=this.opts)?void 0:n.scaleY)?s:1,v=null!=(a=null==(r=this.opts)?void 0:r.translateX)?a:0,y=null!=(c=null==(i=this.opts)?void 0:i.translateY)?c:0;this.iframe.style.width=`${100*m}% `,this.iframe.style.height=`${100*g}%`,this.iframe.style.transform=`translate(${v}px, ${y}px)`;let b=oz({figureId:this.opts.figureId,ttsPer:this.opts.ttsPer,initMode:"noAudio","cp-inactiveDisconnectSec":null!=(l=this.opts.timeoutSec)?l:130,"cp-preAlertSec":null!=(u=this.opts.disconnectAlertSec)?u:10,mode:"crop",resolutionWidth:null!=(d=this.opts.figureResolutionWidth)?d:1920,resolutionHeight:null!=(p=this.opts.figureResolutionHeight)?p:1080,ttsSpeed:null!=(h=this.opts.speechSpeed)?h:6,"cp-ttsSample":this.opts.ttsSample,"cp-minSplitLen":this.opts.minSplitLen,"cp-ttsModel":this.opts.ttsModel,"cp-positionV2":JSON.stringify(this.opts.position),autoChromaKey:this.opts.autoChromaKey,closeLog:null==(f=this.opts.enableDebugMode)||f,token:this.token});this.iframe.src=`${this.origin}/cloud/realtime?${b}`},this.refreshRequestId=()=>{this.requestId=rd()},this.onRenderFinished=e=>{this._isRendering=!1,this.emitter.emit("is_rendering_change",!1).catch(rh),this.refreshRequestId(),this.emitter.emit("render_finished",{requestId:e}).catch(rh)}}}function oJ(e,n){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,n)}function oQ(e,n){return function(r,i){n(r,i,e)}}oY=function(e,n,r,i){var o,s=arguments.length,a=s<3?n:null===i?i=Object.getOwnPropertyDescriptor(n,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,n,r,i);else for(var c=e.length-1;c>=0;c--)(o=e[c])&&(a=(s<3?o(a):s>3?o(n,r,a):o(n,r))||a);return s>3&&a&&Object.defineProperty(n,r,a),a}([ey(),eb()],oY);class oZ{static #k=this.ENTRY_EMITTER_NAME="AaaSPilotKitEmitter";constructor(e,n,r,i,o,s){this.opts=e,this.errorManager=n,this.agentService=r,this.asrService=i,this.digitalHumanService=o,this.conversationService=s,this.interruptible=!0,this.isRenderingMultiModConversation=!1,this.isDigitalHumanServiceReady=!1,this.isAsrServiceReady=!1,this.aiWorkerMessageCache=null,this.multiModAbortControllers=[],this.playWaitForListener=null,this.mount=async e=>{var n,r;let i=null!=e?e:null==(n=(r=this.opts).getMountContainer)?void 0:n.call(r);i&&(await Promise.all([this.digitalHumanService.mount(i),this.asrService.preloadDeps()]),this.asrService.start(),this.isAsrServiceReady=!0,this.checkServiceReady())},this.getOptions=()=>this.opts,this.checkNeedsManualActivation=()=>nF()||nU(),this.activateManually=async()=>{this.digitalHumanService instanceof oY&&(this.digitalHumanService.cancelMute(),nL()&&(nF()||nU())&&await oN(500))},this.keepAlive=()=>(this.digitalHumanService.sendSilenceMessage(),this),this.playWaitFor=async(e,n)=>(this.playWaitForListener&&this.digitalHumanService.emitter.off("render_finished",this.playWaitForListener),this.digitalHumanService.isRendering)?await new Promise(r=>{this.playWaitForListener=()=>{if(n&&!n())return void r(!1);this.digitalHumanService.renderPlainText(e),this.playWaitForListener&&this.digitalHumanService.emitter.off("render_finished",this.playWaitForListener),r(!0)},this.digitalHumanService.emitter.on("render_finished",this.playWaitForListener)}):(this.digitalHumanService.renderPlainText(e),!0),this.playFromFullText=e=>(this.digitalHumanService.renderPlainText(e),this),this.playFromStreamText=(e,n)=>(this.digitalHumanService.renderStreamText(e,n),this),this.mute=e=>(this.asrService.setMutedByUser(e),this.emitter.emit("mute",e).catch(rh),e?(this.asrService.mute(!0),this.conversationService.currentClientConversation&&this.query(this.conversationService.currentClientConversation.text,!0).catch(rh)):this.asrService.muted&&this.asrService.mute(!1),this),this.interrupt=()=>(this.interruptAIWorkerConversation(),this),this.playPrologue=()=>{if(this.opts.prologue&&this.opts.prologue.length>0)return void this.playFromFullText(this.opts.prologue);this.agentService.query("").catch(rh)},this.query=async(e,n)=>{if(this.checkServiceReady()){if(this.agentService.sessionId||this.agentService.setSessionId(rd()),this.digitalHumanService.sendSilenceMessage(),this.agentService.queryId||this.agentService.setQueryId(rd()),n){if(this.agentService.checkIsRepeat())return;this.agentService.setLastQueryId(this.agentService.queryId)}if(await this.emitter.emit("asr_message",{text:e,completed:n,id:this.agentService.queryId,sessionId:this.agentService.sessionId}),await this.handleClientConversation(e),n){this.asrService.mute(!0);let n=async()=>{this.agentService.setQueryId(""),this.digitalHumanService.canInterrupt&&(this.asrService.tryUnmuteAsr(),await this.emitter.emit("asr_start"),this.digitalHumanService.emitter.off("render_subtitle",n))};this.digitalHumanService.emitter.on("render_subtitle",n);let r=async()=>{this.agentService.setQueryId(""),this.asrService.tryUnmuteAsr(),await this.emitter.emit("asr_start"),this.digitalHumanService.emitter.off("render_finished",r)};this.digitalHumanService.emitter.on("render_finished",r),this.handleClientConversationCompleted(),await this.agentService.query(e)}}},this.input=e=>(this.digitalHumanService.isRendering&&!this.interruptible||this.query(e,!0).catch(rh),this),this.dispose=()=>(this.agentService.dispose(),this.asrService.dispose(),this.digitalHumanService.dispose(),this.conversationService.dispose(),this.emitter.clearListeners(),this.isDigitalHumanServiceReady=!1,this.isAsrServiceReady=!1,this.aiWorkerMessageCache=null,this.isRenderingMultiModConversation=!1,this.multiModAbortControllers=[],this),this.setInterruptible=e=>(this.interruptible=e,this),this.bindAsrServiceEvents=()=>{this.asrService.emitter.on("start",this.handleAsrServiceStarted),this.asrService.emitter.on("message",this.handleAsrMessage)},this.bindAgentServiceEvents=()=>{this.agentService.emitter.on("data",this.handleAgentAnswer),this.agentService.emitter.on("completed",this.handleAgentAnswerCompleted),this.agentService.emitter.on("instruction_received",this.handleAgentInstructionReceived),this.agentService.emitter.on("usage_quota_reached",async e=>{await this.emitter.emit("busy",{...e})})},this.bindDigitalHumanServiceEvents=()=>{this.digitalHumanService.bindEvents(),this.digitalHumanService.emitter.once("ready").then(()=>{this.isDigitalHumanServiceReady=!0,this.checkServiceReady()}),this.digitalHumanService.emitter.on("render_subtitle",this.aiWorkerSubtitleToConversation),this.digitalHumanService.emitter.on("is_rendering_change",e=>{this.emitter.emit("is_rendering_change",e).catch(rh)}),this.digitalHumanService.emitter.on("render_subtitle",async e=>{await this.emitter.emit("render_start",{...e,sessionId:this.agentService.sessionId,queryId:this.agentService.queryId})}),this.digitalHumanService.emitter.on("disconnect_alert",e=>{let n=this.digitalHumanService.emitter.on("render_finished",()=>{this.asrService.mute(!0),this.emitter.emit("inactivity",e).catch(rh),n()}),r=this.digitalHumanService.emitter.on("send_silence_message",()=>{n(),r()});this.playFromFullText(this.opts.inactivityPrompt)}),this.digitalHumanService.emitter.on("reach_session_limit",async e=>{this.isDigitalHumanServiceReady&&this.isAsrServiceReady&&await this.emitter.emit("busy",{...e})}),this.digitalHumanService.emitter.on("reconnect_failed",async()=>{await this.emitter.emit("busy",{requestId:"reconnect_failed"})});let e=this.digitalHumanService.emitter.on("render_finished",()=>{this.asrService.tryUnmuteAsr(),e()})},this.bindErrorEvents=()=>{this.errorManager.on(e=>{let n=this.errorManager.createMonitoringError(e);this.emitter.emit("error",e).catch(rh);try{this.weirwood.error.captureException(n)}catch(e){console.error(e)}})},this.bindEvents=()=>{this.bindErrorEvents(),this.bindAsrServiceEvents(),this.bindAgentServiceEvents(),this.bindDigitalHumanServiceEvents()},this.registerFormatters=()=>{var e,n;let r=null!=(e=this.opts.speechFormatters)?e:[],i=null!=(n=this.opts.conversationFormatters)?n:[];for(let e of r)this.digitalHumanService.registerSSMLHandler(e);for(let e of i)this.conversationService.registerAIWorkerConversationFormatter(e)},this.aiWorkerSubtitleToConversation=async e=>{let n=e.subtitle;if(this.isRenderingMultiModConversation)return;let r=this.conversationService;await this.createNewAIWorkerConversation();let i=r.currentAIWorkerConversation;i&&this.handleAIWorkerConversationChange(i);let o=r.runAIWorkerConversationFormatters(n.content);null==i||i.appendText(o),n.completed&&r.setCurrentConversation(null)},this.handleAgentAnswer=e=>{let{answer:n}=e;if(il.isXml(n))return void this.handleXmlAgentAnswer(e).catch(rh);this.aiWorkerMessageCache&&this.playFromStreamText(this.aiWorkerMessageCache,!1),this.aiWorkerMessageCache=n},this.handleXmlAgentAnswer=async e=>{let{answer:n}=e,r=this.conversationService;await this.createNewAIWorkerConversation();let i=r.currentAIWorkerConversation;if(!i)return;let o=()=>{this.emitter.emit("conversation_change",{...i.toJSON(),text:i.fulltext,completed:!1})};i.emitter.on("content_change",o),this.isRenderingMultiModConversation=!0;let s=r.runAIWorkerConversationFormatters(n),a=i.createContentsFromXmlString(s),c=new AbortController;for(let e of(this.multiModAbortControllers.push(c),a)){if(c.signal.aborted){i.emitter.off("content_change",o);break}if(iu.isTextContent(e)){let n=e.getConfig().content;this.playFromFullText(n),await this.digitalHumanService.emitter.once("render_subtitle")}i.addContentRenderTask(e),i.contents.push(e),await i.emitter.once("queue_empty")}this.isRenderingMultiModConversation=!1,i.emitter.off("content_change",o),await this.emitter.emit("conversation_change",{...i.toJSON(),text:i.fulltext,completed:!0})},this.createNewAIWorkerConversation=async()=>{let e=this.conversationService;if(!e.currentAIWorkerConversation){let n=iu.create(this.opts);e.setCurrentConversation(n),e.add(n),await this.emitter.emit("conversation_add",n)}},this.handleAgentAnswerCompleted=()=>{if(this.aiWorkerMessageCache){this.playFromStreamText(this.aiWorkerMessageCache,!0),this.aiWorkerMessageCache=null;return}this.asrService.tryUnmuteAsr()},this.handleAgentInstructionReceived=e=>{this.emitter.emit("instruction_received",e).catch(rh)},this.handleAsrServiceStarted=async()=>{await oN(800),this.asrService.mute(!0),this.interruptible&&this.emitter.once("render_start").then(()=>{this.asrService.tryUnmuteAsr()})},this.handleAsrMessage=async e=>{this.digitalHumanService.isRendering&&!this.digitalHumanService.canInterrupt||this.asrService.mutedByUser||e.type===E.EMessageType.Query&&(this.opts.enableDebugMode&&console.log("message",e,this.agentService.sessionId,Date.now()),await this.query(ro(e.data,this.opts.hotWordReplacementRules),e.completed))},this.handleClientConversation=async e=>{let n=this.conversationService;if(!n.currentClientConversation){let e=rf.create(this.opts);n.setCurrentConversation(e),n.add(e),await this.emitter.emit("conversation_add",e)}let r=n.currentClientConversation;(this.digitalHumanService.isRendering||this.isRenderingMultiModConversation)&&this.interruptAIWorkerConversation(),null==r||r.appendText(e)},this.handleClientConversationCompleted=()=>{this.conversationService.setCurrentConversation(null)},this.interruptAIWorkerConversation=()=>{for(let e of(this.aiWorkerMessageCache&&this.digitalHumanService.renderStreamText(this.aiWorkerMessageCache,!0),this.multiModAbortControllers))e.abort();this.multiModAbortControllers=[];let e=this.digitalHumanService.GetRequestId();this.digitalHumanService.interrupt(),this.conversationService.interruptAll(),this.agentService.abort(),this.aiWorkerMessageCache=null,this.emitter.emit("interrupt",{requestId:e,queryId:this.agentService.queryId?this.agentService.queryId:this.agentService.lastQueryId,sessionId:this.agentService.sessionId}).catch(rh)},this.checkServiceReady=()=>!!this.isDigitalHumanServiceReady&&!!this.isAsrServiceReady&&(this.emitter.emit("ready").catch(rh),!0),this.handleAIWorkerConversationChange=e=>{let n=r=>{this.emitter.emit("conversation_change",{...e.toJSON(),text:e.fulltext,completed:r.completed}).catch(rh),r.completed&&e.emitter.off("content_change",n)},r=()=>{e.emitter.off("interrupt",r),e.emitter.off("content_change",n)};e.emitter.on("content_change",n),e.emitter.on("interrupt",r)},this.weirwood=new oC({common:{buildid:"AAAS_PILOT_KIT_1.0.0",token:"8f3abab4743f4114bd632999224323af"},error:{collectWindowErrors:!1,collectUnhandledRejections:!1,collectResourceLoadErrors:!1,ignoreUrls:["localhost","127.0.0.1"]},perf:{disable:!0}}),this.emitter=new tZ(this.opts.enableDebugMode?{debug:{name:oZ.ENTRY_EMITTER_NAME,enabled:!0}}:void 0),this.bindEvents(),this.registerFormatters(),this.interruptible=this.opts.interruptible}}oZ=function(e,n,r,i){var o,s=arguments.length,a=s<3?n:null===i?i=Object.getOwnPropertyDescriptor(n,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,n,r,i);else for(var c=e.length-1;c>=0;c--)(o=e[c])&&(a=(s<3?o(a):s>3?o(n,r,a):o(n,r))||a);return s>3&&a&&Object.defineProperty(n,r,a),a}([ey(),oQ(0,em(t1.IOptions)),oQ(0,eR()),oQ(1,em(t1.ErrorManager)),oQ(2,em(t1.AgentService)),oQ(3,em(t1.ASRService)),oQ(4,em(t1.DigitalHumanService)),oQ(5,em(t1.ConversationService)),oJ("design:type",Function),oJ("design:paramtypes",["undefined"==typeof IResolvedOptions?Object:IResolvedOptions,void 0===re?Object:re,"undefined"==typeof AS?Object:AS,void 0===oA?Object:oA,void 0===oP?Object:oP,void 0===ih?Object:ih])],oZ);let o0=[239,187,191],o1=e=>async(n,r,i)=>{if(!i.ok||!i.body)return;let o=!1,s=n=>{var r;o||(o=!0,null==(r=e.onCompleted)||r.call(e,n))},a=i.body.getReader(),c=new TextDecoder("utf8"),l=function(e){let n,r,i,o,s,a,c;return l(),{feed:function(l){var u;r=r?r+l:l,n&&(u=r,o0.every((e,n)=>u.charCodeAt(n)===e))&&(r=r.slice(o0.length)),n=!1;let d=r.length,p=0,h=!1;for(;p<d;){let n;h&&("\n"===r[p]&&++p,h=!1);let l=-1,u=o;for(let e=i;l<0&&e<d;++e)":"===(n=r[e])&&u<0?u=e-p:"\r"===n?(h=!0,l=e-p):"\n"===n&&(l=e-p);if(l<0){i=d-p,o=u;break}i=0,o=-1,function(n,r,i,o){if(0===o){c.length>0&&(e({type:"event",id:s,event:a||void 0,data:c.slice(0,-1)}),c="",s=void 0),a=void 0;return}let l=i<0,u=n.slice(r,r+(l?o:i)),d=0;d=l?o:" "===n[r+i+1]?i+2:i+1;let p=r+d,h=o-d,f=n.slice(p,p+h).toString();if("data"===u)c+=f?"".concat(f,"\n"):"\n";else if("event"===u)a=f;else if("id"!==u||f.includes("\0")){if("retry"===u){let n=parseInt(f,10);Number.isNaN(n)||e({type:"reconnect-interval",value:n})}}else s=f}(r,p,u,l),p+=l+1}p===d?r="":p>0&&(r=r.slice(p))},reset:l};function l(){n=!0,r="",i=0,o=-1,s=void 0,a=void 0,c=""}}(n=>{var r,i,o;if("event"===n.type&&(null==(r=e.onMessage)||r.call(e,n)),"event"===n.type&&n.data)for(let r of(null==(i=e.onEvent)||i.call(e,n),n.data.split("\n")))e.onData(r);else"reconnect-interval"===n.type&&(null==(o=e.onReconnectInterval)||o.call(e,n.value))}),u=()=>{a.read().then(e=>{if(e.done)return void s();l.feed(c.decode(e.value,{stream:!0})),u()}).catch(r=>{var i;if(n.signal.aborted){null==(i=e.onAborted)||i.call(e);return}s(r)})};return u(),i};!function(e){var n,r,i;(n=e.EAiobAction||(e.EAiobAction={}))[n.silence=1]="silence",n[n.Interrupt=2]="Interrupt",n[n.Hangup=3]="Hangup",(r=e.EResponseType||(e.EResponseType={}))[r.Welcome=1]="Welcome",r[r.Normal=2]="Normal",r[r.Command=3]="Command",r[r.TakeOver=4]="TakeOver",(i=e.ETextType||(e.ETextType={}))[i.unit=0]="unit",i[i.llm=1]="llm"}(M||(M={}));class o2 extends rr{static #k=this.REQUEST_URI="aicc-service/aiob-server/text/stream/query2";constructor(...e){super(...e),this.query=async e=>{this.abortController=new AbortController;let n=o1({onData:e=>{try{let{answer:n,sessionId:r,action:i}=JSON.parse(e);if(r&&(this.conversationSessionId=r),i===M.EAiobAction.Hangup)return void this.onHangup({sessionId:this.conversationSessionId});n&&this.onData({sessionId:this.conversationSessionId,answer:n})}catch(e){e instanceof Error&&this.errorManager.handleError(new nA(e.message,{sessionId:this.conversationSessionId}))}},onCompleted:()=>{this.onCompleted({sessionId:this.conversationSessionId})}}),r=this.opts.agentConfig;if(!(null==r?void 0:r.robotId))return void this.errorManager.handleError(new nj(`\u{8C03}\u{7528} Agent API ${o2.REQUEST_URI} \u{65F6}\u{5FC5}\u{987B}\u{4F20}\u{5165} robotId \u{53C2}\u{6570}\u{FF0C}\u{8BF7}\u{786E}\u{8BA4}\u{540E}\u{91CD}\u{8BD5}\u{3002}`));let i={query:e,sessionId:this.conversationSessionId,robotId:r.robotId,isComplete:1,queryId:this.queryId};try{var o;await this.request.client.post(o2.REQUEST_URI,{retry:0,timeout:3e5,signal:null==(o=this.abortController)?void 0:o.signal,hooks:{afterResponse:[n]},json:{...i}})}catch(e){e instanceof t3?this.onTimeout({sessionId:this.conversationSessionId}):e instanceof Error&&this.errorManager.handleError(new nk(e.message,{sessionId:this.conversationSessionId}))}},this.hangup=async()=>{let e=this.opts.agentConfig;if(!(null==e?void 0:e.robotId))return void await this.errorManager.handleError(new nj(`\u{8C03}\u{7528} Agent API ${o2.REQUEST_URI} \u{65F6}\u{5FC5}\u{987B}\u{4F20}\u{5165} robotId \u{53C2}\u{6570}\u{FF0C}\u{8BF7}\u{786E}\u{8BA4}\u{540E}\u{91CD}\u{8BD5}\u{3002}`));let n={query:"",robotId:e.robotId,sessionId:this.conversationSessionId,action:M.EAiobAction.Hangup,isComplete:1};try{await this.request.client.post(o2.REQUEST_URI,{retry:0,timeout:3e5,json:{...n},keepalive:!0})}catch(e){e instanceof Error&&this.errorManager.handleError(new nk(e.message,{sessionId:this.conversationSessionId}))}},this.dispose=()=>{this._dispose(),this.hangup().finally(()=>{this.conversationSessionId=""})}}}o2=function(e,n,r,i){var o,s=arguments.length,a=s<3?n:null===i?i=Object.getOwnPropertyDescriptor(n,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,n,r,i);else for(var c=e.length-1;c>=0;c--)(o=e[c])&&(a=(s<3?o(a):s>3?o(n,r,a):o(n,r))||a);return s>3&&a&&Object.defineProperty(n,r,a),a}([ey(),eb()],o2),!function(e){var n;(n=e.EReplyType||(e.EReplyType={}))[n.PlainText=1]="PlainText",n[n.RichText=3]="RichText",n[n.Image=4]="Image",n[n.List=8]="List",e.REPLY_TYPE_MAPPING={1:"plainText",3:"richText",8:"list",4:"image"}}(x||(x={}));class o3 extends rr{static #k=this.REQUEST_URI="csp-service/online/core/v5/stream/query";constructor(...e){super(...e),this.query=async e=>{var n,r;this.abortController=new AbortController;let i=o1({onData:e=>{try{var n,r;let i=JSON.parse(e).answer[0],o=null!=(r=null==(n=i.reply)?void 0:n.text)?r:"";i&&o?this.onData({sessionId:this.conversationSessionId,answer:o}):i&&i.instruction&&(function(e){if("object"!=typeof e||null===e||"[object Object]"!==Object.prototype.toString.call(e))return!1;let n=Object.getPrototypeOf(e);return null===n||!!(Object.prototype.hasOwnProperty.call(n,"constructor")&&"function"==typeof n.constructor)&&Function.prototype.toString.call(n.constructor)===Function.prototype.toString.call(Object)}(i.instruction)?this.onInstructionReceived({sessionId:this.conversationSessionId,instruction:i.instruction}):this.errorManager.handleError(new nB("指令格式非法,请检查后重试",{sessionId:this.conversationSessionId})))}catch(e){e instanceof Error&&this.errorManager.handleError(new nA(e.message,{sessionId:this.conversationSessionId}))}},onCompleted:()=>{this.onCompleted({sessionId:this.conversationSessionId})}});this.conversationSessionId||(this.conversationSessionId=rd());let o=null==(n=this.opts.agentConfig)?void 0:n.token;if(!o)return void this.errorManager.handleError(new nj(`\u{8C03}\u{7528} Agent API ${o3.REQUEST_URI} \u{65F6}\u{5FC5}\u{987B}\u{4F20}\u{5165} token \u{53C2}\u{6570}\u{FF0C}\u{8BF7}\u{786E}\u{8BA4}\u{540E}\u{91CD}\u{8BD5}\u{3002}`));let s={query:e,sessionId:this.conversationSessionId};try{await this.request.client.post(o3.REQUEST_URI,{headers:{token:o},retry:0,timeout:3e5,signal:null==(r=this.abortController)?void 0:r.signal,hooks:{afterResponse:[i]},json:{...s}})}catch(e){e instanceof t3?this.onTimeout({sessionId:this.conversationSessionId}):e instanceof Error&&this.errorManager.handleError(new nk(e.message,{sessionId:this.conversationSessionId}))}},this.dispose=()=>{this._dispose()}}}function o6(e,n){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,n)}function o5(e,n){return function(r,i){n(r,i,e)}}o3=function(e,n,r,i){var o,s=arguments.length,a=s<3?n:null===i?i=Object.getOwnPropertyDescriptor(n,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,n,r,i);else for(var c=e.length-1;c>=0;c--)(o=e[c])&&(a=(s<3?o(a):s>3?o(n,r,a):o(n,r))||a);return s>3&&a&&Object.defineProperty(n,r,a),a}([ey(),eb()],o3);class o4{constructor(e,n){this.opts=e,this.errorManager=n,this.started=!1,this.sessionId="",this._dispose=()=>{this.started=!1,this.sessionId=""}}}o4=function(e,n,r,i){var o,s=arguments.length,a=s<3?n:null===i?i=Object.getOwnPropertyDescriptor(n,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,n,r,i);else for(var c=e.length-1;c>=0;c--)(o=e[c])&&(a=(s<3?o(a):s>3?o(n,r,a):o(n,r))||a);return s>3&&a&&Object.defineProperty(n,r,a),a}([ey(),o5(0,em(t1.IOptions)),o5(0,eR()),o5(1,em(t1.ErrorManager)),o6("design:type",Function),o6("design:paramtypes",["undefined"==typeof IResolvedOptions?Object:IResolvedOptions,void 0===re?Object:re])],o4);let o8=e=>{if(e)return"string"==typeof e?e:e.id};class o9 extends o4{static #k=this.ONLINE_PREFIX_URL="https://ky.cloud.baidu.com/employee-console";static #G=this.SANDBOX_PREFIX_URL="https://ai.agent.kaywang.cn/api";static #ew=this.AUTH_URL="https://ky.cloud.baidu.com/employee-console/v1/access/r/ai-agent/get-authorization";get prefixUrl(){return"production"===this.opts.env?o9.ONLINE_PREFIX_URL:o9.SANDBOX_PREFIX_URL}loginBRTC(e){if("function"!=typeof window.BRTC_Start)throw Error("BRTC_Start global function is missing. Ensure baidu.rtc.sdk.js is loaded.");let n={aspublisher:!0,usingdatachannel:!0,usingvideo:!1,usingaudio:!0,showvideobps:!1,autosubscribe:!0,autoplaymuted:!1,autopublish:!0,showspinner:!1,shownovideo:!1,userevent:!0,sessionevent:!0,logintimeout:1e4,linkdownevent:rh,linkupevent:rh,logintimeoutevent:rh,mediastate:rh,remotevideoon:rh,remotevideooff:rh,remotevideocoming:rh,remotevideoloading:rh,remotevideoconnected_state:rh,remotevideoleaving:rh,remotevideounpublished:rh,localvideoconnected_state:rh,localvideopublished_ok:rh,destroyed:rh,onlocalstream:rh,onlocalstream_end:rh,remotevideo_closed:rh,onmessage:e.onmessage,userevent_joinedroom:e.userevent_joinedroom,userevent_leavingroom:e.userevent_leavingroom,remotemediastating:e.remotemediastating,remotevideoviewid:o8(e.remotevideoviewid),localvideoviewid:o8(e.localvideoviewid)};window.BRTC_Start({...n,...e})}constructor(...e){super(...e),this.currentAppId="",this.Start=async e=>{var n,r,i,o,s;this.currentAppId=this.opts.rtcID;let a=this.prefixUrl,c={};"production"===this.opts.env&&(c.authorization=await this.getAuthToken("/api/v1/aiagent/generateAIAgentCall"));let l="production"===this.opts.env?"/v1/open/ai-agent/generateAIAgentCall":"/v1/aiagent/generateAIAgentCall",u=await nw.post(`${a}${l}`,{json:{app_id:this.currentAppId,quick_start:!0,config:JSON.stringify({...e.cfg})},headers:c}).json();if(!u.ai_agent_instance_id)throw Error("ai_agent_instance_id missing in response");this.started=!0,this.sessionId=u.ai_agent_instance_id;let d=this.sessionId,p=null!=(s=null==(n=u.context)?void 0:n.token)?s:"";(null==(r=u.context)?void 0:r.uid)&&(d=u.context.uid),(null==(i=u.context)?void 0:i.appid)&&(this.currentAppId=u.context.appid),this.loginBRTC({...e,appid:this.currentAppId,roomname:this.sessionId,userid:d,token:p}),null==(o=e.success)||o.call(e)},this.Stop=async()=>{if(this.started){this.started=!1;try{let e=this.prefixUrl,n={};"production"===this.opts.env&&(n.authorization=await this.getAuthToken("/api/v1/aiagent/stopAIAgentInstance"));let r="production"===this.opts.env?"/v1/open/ai-agent/stopAIAgentInstance":"/v1/aiagent/stopAIAgentInstance";await nw.post(`${e}${r}`,{json:{app_id:this.currentAppId,ai_agent_instance_id:this.sessionId},headers:n})}catch(e){if(e instanceof t2)throw Error(`stopAIAgentInstance failed (${e.response.status})`);throw e}"function"==typeof window.BRTC_Stop&&window.BRTC_Stop()}},this.Mute=e=>{"function"==typeof window.BRTC_MuteMicphone&&window.BRTC_MuteMicphone(e)},this.GetSessionID=()=>this.sessionId,this.Dispose=()=>{this._dispose()},this.getAuthToken=async e=>{try{let{data:n}=await nw.post(o9.AUTH_URL,{json:{http_method:"POST",path:e,headers:{host:"rtc-aiagent.baidubce.com"}}}).json();return n}catch(e){if(e instanceof t2)throw Error(`getAuthToken failed (${e.response.status})`);throw e}}}}o9=function(e,n,r,i){var o,s=arguments.length,a=s<3?n:null===i?i=Object.getOwnPropertyDescriptor(n,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,n,r,i);else for(var c=e.length-1;c>=0;c--)(o=e[c])&&(a=(s<3?o(a):s>3?o(n,r,a):o(n,r))||a);return s>3&&a&&Object.defineProperty(n,r,a),a}([ey(),eb()],o9);let o7=!0,se=!0;function st(e,n,r){let i=e.match(n);return i&&i.length>=r&&parseFloat(i[r],10)}function sn(e,n,r){if(!e.RTCPeerConnection)return;let i=e.RTCPeerConnection.prototype,o=i.addEventListener;i.addEventListener=function(e,i){if(e!==n)return o.apply(this,arguments);let s=e=>{let n=r(e);n&&(i.handleEvent?i.handleEvent(n):i(n))};return this._eventMap=this._eventMap||{},this._eventMap[n]||(this._eventMap[n]=new Map),this._eventMap[n].set(i,s),o.apply(this,[e,s])};let s=i.removeEventListener;i.removeEventListener=function(e,r){if(e!==n||!this._eventMap||!this._eventMap[n]||!this._eventMap[n].has(r))return s.apply(this,arguments);let i=this._eventMap[n].get(r);return this._eventMap[n].delete(r),0===this._eventMap[n].size&&delete this._eventMap[n],0===Object.keys(this._eventMap).length&&delete this._eventMap,s.apply(this,[e,i])},Object.defineProperty(i,"on"+n,{get(){return this["_on"+n]},set(e){this["_on"+n]&&(this.removeEventListener(n,this["_on"+n]),delete this["_on"+n]),e&&this.addEventListener(n,this["_on"+n]=e)},enumerable:!0,configurable:!0})}function sr(e){return"boolean"!=typeof e?Error("Argument type: "+typeof e+". Please use a boolean."):(o7=e,e?"adapter.js logging disabled":"adapter.js logging enabled")}function si(e){return"boolean"!=typeof e?Error("Argument type: "+typeof e+". Please use a boolean."):(se=!e,"adapter.js deprecation warnings "+(e?"disabled":"enabled"))}function so(){"object"==typeof window&&(o7||"undefined"!=typeof console&&"function"==typeof console.log&&console.log.apply(console,arguments))}function ss(e,n){se&&console.warn(e+" is deprecated, please use "+n+" instead.")}function sa(e){return"[object Object]"===Object.prototype.toString.call(e)}function sc(e,n,r){let i=r?"outbound-rtp":"inbound-rtp",o=new Map;if(null===n)return o;let s=[];return e.forEach(e=>{"track"===e.type&&e.trackIdentifier===n.id&&s.push(e)}),s.forEach(n=>{e.forEach(r=>{r.type===i&&r.trackId===n.id&&function e(n,r,i){!r||i.has(r.id)||(i.set(r.id,r),Object.keys(r).forEach(o=>{o.endsWith("Id")?e(n,n.get(r[o]),i):o.endsWith("Ids")&&r[o].forEach(r=>{e(n,n.get(r),i)})}))}(e,r,o)})}),o}function sl(e,n){let r=e&&e.navigator;if(!r.mediaDevices)return;let i=function(e){if("object"!=typeof e||e.mandatory||e.optional)return e;let n={};return Object.keys(e).forEach(r=>{if("require"===r||"advanced"===r||"mediaSource"===r)return;let i="object"==typeof e[r]?e[r]:{ideal:e[r]};void 0!==i.exact&&"number"==typeof i.exact&&(i.min=i.max=i.exact);let o=function(e,n){return e?e+n.charAt(0).toUpperCase()+n.slice(1):"deviceId"===n?"sourceId":n};if(void 0!==i.ideal){n.optional=n.optional||[];let e={};"number"==typeof i.ideal?(e[o("min",r)]=i.ideal,n.optional.push(e),(e={})[o("max",r)]=i.ideal):e[o("",r)]=i.ideal,n.optional.push(e)}void 0!==i.exact&&"number"!=typeof i.exact?(n.mandatory=n.mandatory||{},n.mandatory[o("",r)]=i.exact):["min","max"].forEach(e=>{void 0!==i[e]&&(n.mandatory=n.mandatory||{},n.mandatory[o(e,r)]=i[e])})}),e.advanced&&(n.optional=(n.optional||[]).concat(e.advanced)),n},o=function(e,o){if(n.version>=61)return o(e);if((e=JSON.parse(JSON.stringify(e)))&&"object"==typeof e.audio){let n=function(e,n,r){n in e&&!(r in e)&&(e[r]=e[n],delete e[n])};n((e=JSON.parse(JSON.stringify(e))).audio,"autoGainControl","googAutoGainControl"),n(e.audio,"noiseSuppression","googNoiseSuppression"),e.audio=i(e.audio)}if(e&&"object"==typeof e.video){let s=e.video.facingMode;s=s&&("object"==typeof s?s:{ideal:s});let a=n.version<66;if(s&&("user"===s.exact||"environment"===s.exact||"user"===s.ideal||"environment"===s.ideal)&&!(r.mediaDevices.getSupportedConstraints&&r.mediaDevices.getSupportedConstraints().facingMode&&!a)){let n;if(delete e.video.facingMode,"environment"===s.exact||"environment"===s.ideal?n=["back","rear"]:("user"===s.exact||"user"===s.ideal)&&(n=["front"]),n)return r.mediaDevices.enumerateDevices().then(r=>{let a=(r=r.filter(e=>"videoinput"===e.kind)).find(e=>n.some(n=>e.label.toLowerCase().includes(n)));return!a&&r.length&&n.includes("back")&&(a=r[r.length-1]),a&&(e.video.deviceId=s.exact?{exact:a.deviceId}:{ideal:a.deviceId}),e.video=i(e.video),so("chrome: "+JSON.stringify(e)),o(e)})}e.video=i(e.video)}return so("chrome: "+JSON.stringify(e)),o(e)},s=function(e){return n.version>=64?e:{name:({PermissionDeniedError:"NotAllowedError",PermissionDismissedError:"NotAllowedError",InvalidStateError:"NotAllowedError",DevicesNotFoundError:"NotFoundError",ConstraintNotSatisfiedError:"OverconstrainedError",TrackStartError:"NotReadableError",MediaDeviceFailedDueToShutdown:"NotAllowedError",MediaDeviceKillSwitchOn:"NotAllowedError",TabCaptureError:"AbortError",ScreenCaptureError:"AbortError",DeviceCaptureError:"AbortError"})[e.name]||e.name,message:e.message,constraint:e.constraint||e.constraintName,toString(){return this.name+(this.message&&": ")+this.message}}};if(r.getUserMedia=(function(e,n,i){o(e,e=>{r.webkitGetUserMedia(e,n,e=>{i&&i(s(e))})})}).bind(r),r.mediaDevices.getUserMedia){let e=r.mediaDevices.getUserMedia.bind(r.mediaDevices);r.mediaDevices.getUserMedia=function(n){return o(n,n=>e(n).then(e=>{if(n.audio&&!e.getAudioTracks().length||n.video&&!e.getVideoTracks().length)throw e.getTracks().forEach(e=>{e.stop()}),new DOMException("","NotFoundError");return e},e=>Promise.reject(s(e))))}}}function su(e){e.MediaStream=e.MediaStream||e.webkitMediaStream}function sd(e){if("object"!=typeof e||!e.RTCPeerConnection||"ontrack"in e.RTCPeerConnection.prototype)sn(e,"track",e=>(e.transceiver||Object.defineProperty(e,"transceiver",{value:{receiver:e.receiver}}),e));else{Object.defineProperty(e.RTCPeerConnection.prototype,"ontrack",{get(){return this._ontrack},set(e){this._ontrack&&this.removeEventListener("track",this._ontrack),this.addEventListener("track",this._ontrack=e)},enumerable:!0,configurable:!0});let n=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(){return this._ontrackpoly||(this._ontrackpoly=n=>{n.stream.addEventListener("addtrack",r=>{let i;i=e.RTCPeerConnection.prototype.getReceivers?this.getReceivers().find(e=>e.track&&e.track.id===r.track.id):{track:r.track};let o=new Event("track");o.track=r.track,o.receiver=i,o.transceiver={receiver:i},o.streams=[n.stream],this.dispatchEvent(o)}),n.stream.getTracks().forEach(r=>{let i;i=e.RTCPeerConnection.prototype.getReceivers?this.getReceivers().find(e=>e.track&&e.track.id===r.id):{track:r};let o=new Event("track");o.track=r,o.receiver=i,o.transceiver={receiver:i},o.streams=[n.stream],this.dispatchEvent(o)})},this.addEventListener("addstream",this._ontrackpoly)),n.apply(this,arguments)}}}function sp(e){if("object"==typeof e&&e.RTCPeerConnection&&!("getSenders"in e.RTCPeerConnection.prototype)&&"createDTMFSender"in e.RTCPeerConnection.prototype){let n=function(e,n){return{track:n,get dtmf(){return void 0===this._dtmf&&("audio"===n.kind?this._dtmf=e.createDTMFSender(n):this._dtmf=null),this._dtmf},_pc:e}};if(!e.RTCPeerConnection.prototype.getSenders){e.RTCPeerConnection.prototype.getSenders=function(){return this._senders=this._senders||[],this._senders.slice()};let r=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addTrack=function(e,i){let o=r.apply(this,arguments);return o||(o=n(this,e),this._senders.push(o)),o};let i=e.RTCPeerConnection.prototype.removeTrack;e.RTCPeerConnection.prototype.removeTrack=function(e){i.apply(this,arguments);let n=this._senders.indexOf(e);-1!==n&&this._senders.splice(n,1)}}let r=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(e){this._senders=this._senders||[],r.apply(this,[e]),e.getTracks().forEach(e=>{this._senders.push(n(this,e))})};let i=e.RTCPeerConnection.prototype.removeStream;e.RTCPeerConnection.prototype.removeStream=function(e){this._senders=this._senders||[],i.apply(this,[e]),e.getTracks().forEach(e=>{let n=this._senders.find(n=>n.track===e);n&&this._senders.splice(this._senders.indexOf(n),1)})}}else if("object"==typeof e&&e.RTCPeerConnection&&"getSenders"in e.RTCPeerConnection.prototype&&"createDTMFSender"in e.RTCPeerConnection.prototype&&e.RTCRtpSender&&!("dtmf"in e.RTCRtpSender.prototype)){let n=e.RTCPeerConnection.prototype.getSenders;e.RTCPeerConnection.prototype.getSenders=function(){let e=n.apply(this,[]);return e.forEach(e=>e._pc=this),e},Object.defineProperty(e.RTCRtpSender.prototype,"dtmf",{get(){return void 0===this._dtmf&&("audio"===this.track.kind?this._dtmf=this._pc.createDTMFSender(this.track):this._dtmf=null),this._dtmf}})}}function sh(e){if(!("object"==typeof e&&e.RTCPeerConnection&&e.RTCRtpSender&&e.RTCRtpReceiver))return;if(!("getStats"in e.RTCRtpSender.prototype)){let n=e.RTCPeerConnection.prototype.getSenders;n&&(e.RTCPeerConnection.prototype.getSenders=function(){let e=n.apply(this,[]);return e.forEach(e=>e._pc=this),e});let r=e.RTCPeerConnection.prototype.addTrack;r&&(e.RTCPeerConnection.prototype.addTrack=function(){let e=r.apply(this,arguments);return e._pc=this,e}),e.RTCRtpSender.prototype.getStats=function(){let e=this;return this._pc.getStats().then(n=>sc(n,e.track,!0))}}if(!("getStats"in e.RTCRtpReceiver.prototype)){let n=e.RTCPeerConnection.prototype.getReceivers;n&&(e.RTCPeerConnection.prototype.getReceivers=function(){let e=n.apply(this,[]);return e.forEach(e=>e._pc=this),e}),sn(e,"track",e=>(e.receiver._pc=e.srcElement,e)),e.RTCRtpReceiver.prototype.getStats=function(){let e=this;return this._pc.getStats().then(n=>sc(n,e.track,!1))}}if(!("getStats"in e.RTCRtpSender.prototype&&"getStats"in e.RTCRtpReceiver.prototype))return;let n=e.RTCPeerConnection.prototype.getStats;e.RTCPeerConnection.prototype.getStats=function(){if(arguments.length>0&&arguments[0]instanceof e.MediaStreamTrack){let e,n,r,i=arguments[0];return(this.getSenders().forEach(n=>{n.track===i&&(e?r=!0:e=n)}),this.getReceivers().forEach(e=>(e.track===i&&(n?r=!0:n=e),e.track===i)),r||e&&n)?Promise.reject(new DOMException("There are more than one sender or receiver for the track.","InvalidAccessError")):e?e.getStats():n?n.getStats():Promise.reject(new DOMException("There is no sender or receiver for the track.","InvalidAccessError"))}return n.apply(this,arguments)}}function sf(e){e.RTCPeerConnection.prototype.getLocalStreams=function(){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},Object.keys(this._shimmedLocalStreams).map(e=>this._shimmedLocalStreams[e][0])};let n=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addTrack=function(e,r){if(!r)return n.apply(this,arguments);this._shimmedLocalStreams=this._shimmedLocalStreams||{};let i=n.apply(this,arguments);return this._shimmedLocalStreams[r.id]?-1===this._shimmedLocalStreams[r.id].indexOf(i)&&this._shimmedLocalStreams[r.id].push(i):this._shimmedLocalStreams[r.id]=[r,i],i};let r=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(e){this._shimmedLocalStreams=this._shimmedLocalStreams||{},e.getTracks().forEach(e=>{if(this.getSenders().find(n=>n.track===e))throw new DOMException("Track already exists.","InvalidAccessError")});let n=this.getSenders();r.apply(this,arguments);let i=this.getSenders().filter(e=>-1===n.indexOf(e));this._shimmedLocalStreams[e.id]=[e].concat(i)};let i=e.RTCPeerConnection.prototype.removeStream;e.RTCPeerConnection.prototype.removeStream=function(e){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},delete this._shimmedLocalStreams[e.id],i.apply(this,arguments)};let o=e.RTCPeerConnection.prototype.removeTrack;e.RTCPeerConnection.prototype.removeTrack=function(e){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},e&&Object.keys(this._shimmedLocalStreams).forEach(n=>{let r=this._shimmedLocalStreams[n].indexOf(e);-1!==r&&this._shimmedLocalStreams[n].splice(r,1),1===this._shimmedLocalStreams[n].length&&delete this._shimmedLocalStreams[n]}),o.apply(this,arguments)}}function sm(e,n){if(!e.RTCPeerConnection)return;if(e.RTCPeerConnection.prototype.addTrack&&n.version>=65)return sf(e);let r=e.RTCPeerConnection.prototype.getLocalStreams;e.RTCPeerConnection.prototype.getLocalStreams=function(){let e=r.apply(this);return this._reverseStreams=this._reverseStreams||{},e.map(e=>this._reverseStreams[e.id])};let i=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(n){if(this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{},n.getTracks().forEach(e=>{if(this.getSenders().find(n=>n.track===e))throw new DOMException("Track already exists.","InvalidAccessError")}),!this._reverseStreams[n.id]){let r=new e.MediaStream(n.getTracks());this._streams[n.id]=r,this._reverseStreams[r.id]=n,n=r}i.apply(this,[n])};let o=e.RTCPeerConnection.prototype.removeStream;function s(e,n){let r=n.sdp;return Object.keys(e._reverseStreams||[]).forEach(n=>{let i=e._reverseStreams[n],o=e._streams[i.id];r=r.replace(RegExp(o.id,"g"),i.id)}),new RTCSessionDescription({type:n.type,sdp:r})}e.RTCPeerConnection.prototype.removeStream=function(e){this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{},o.apply(this,[this._streams[e.id]||e]),delete this._reverseStreams[this._streams[e.id]?this._streams[e.id].id:e.id],delete this._streams[e.id]},e.RTCPeerConnection.prototype.addTrack=function(n,r){if("closed"===this.signalingState)throw new DOMException("The RTCPeerConnection's signalingState is 'closed'.","InvalidStateError");let i=[].slice.call(arguments,1);if(1!==i.length||!i[0].getTracks().find(e=>e===n))throw new DOMException("The adapter.js addTrack polyfill only supports a single stream which is associated with the specified track.","NotSupportedError");if(this.getSenders().find(e=>e.track===n))throw new DOMException("Track already exists.","InvalidAccessError");this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{};let o=this._streams[r.id];if(o)o.addTrack(n),Promise.resolve().then(()=>{this.dispatchEvent(new Event("negotiationneeded"))});else{let i=new e.MediaStream([n]);this._streams[r.id]=i,this._reverseStreams[i.id]=r,this.addStream(i)}return this.getSenders().find(e=>e.track===n)},["createOffer","createAnswer"].forEach(function(n){let r=e.RTCPeerConnection.prototype[n];e.RTCPeerConnection.prototype[n]=({[n](){let e=arguments,n=arguments.length&&"function"==typeof arguments[0];return n?r.apply(this,[n=>{let r=s(this,n);e[0].apply(null,[r])},n=>{e[1]&&e[1].apply(null,n)},arguments[2]]):r.apply(this,arguments).then(e=>s(this,e))}})[n]});let a=e.RTCPeerConnection.prototype.setLocalDescription;e.RTCPeerConnection.prototype.setLocalDescription=function(){var e,n;let r;return arguments.length&&arguments[0].type?(arguments[0]=(e=this,n=arguments[0],r=n.sdp,Object.keys(e._reverseStreams||[]).forEach(n=>{let i=e._reverseStreams[n],o=e._streams[i.id];r=r.replace(RegExp(i.id,"g"),o.id)}),new RTCSessionDescription({type:n.type,sdp:r})),a.apply(this,arguments)):a.apply(this,arguments)};let c=Object.getOwnPropertyDescriptor(e.RTCPeerConnection.prototype,"localDescription");Object.defineProperty(e.RTCPeerConnection.prototype,"localDescription",{get(){let e=c.get.apply(this);return""===e.type?e:s(this,e)}}),e.RTCPeerConnection.prototype.removeTrack=function(e){let n;if("closed"===this.signalingState)throw new DOMException("The RTCPeerConnection's signalingState is 'closed'.","InvalidStateError");if(!e._pc)throw new DOMException("Argument 1 of RTCPeerConnection.removeTrack does not implement interface RTCRtpSender.","TypeError");if(e._pc!==this)throw new DOMException("Sender was not created by this connection.","InvalidAccessError");this._streams=this._streams||{},Object.keys(this._streams).forEach(r=>{this._streams[r].getTracks().find(n=>e.track===n)&&(n=this._streams[r])}),n&&(1===n.getTracks().length?this.removeStream(this._reverseStreams[n.id]):n.removeTrack(e.track),this.dispatchEvent(new Event("negotiationneeded")))}}function sg(e,n){!e.RTCPeerConnection&&e.webkitRTCPeerConnection&&(e.RTCPeerConnection=e.webkitRTCPeerConnection),e.RTCPeerConnection&&n.version<53&&["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach(function(n){let r=e.RTCPeerConnection.prototype[n];e.RTCPeerConnection.prototype[n]=({[n](){return arguments[0]=new("addIceCandidate"===n?e.RTCIceCandidate:e.RTCSessionDescription)(arguments[0]),r.apply(this,arguments)}})[n]})}function sv(e,n){sn(e,"negotiationneeded",e=>{let r=e.target;if(!(n.version<72)&&(!r.getConfiguration||"plan-b"!==r.getConfiguration().sdpSemantics)||"stable"===r.signalingState)return e})}function sy(e,n){let r=e&&e.navigator,i=e&&e.MediaStreamTrack;if(r.getUserMedia=function(e,n,i){ss("navigator.getUserMedia","navigator.mediaDevices.getUserMedia"),r.mediaDevices.getUserMedia(e).then(n,i)},!(n.version>55&&"autoGainControl"in r.mediaDevices.getSupportedConstraints())){let e=function(e,n,r){n in e&&!(r in e)&&(e[r]=e[n],delete e[n])},n=r.mediaDevices.getUserMedia.bind(r.mediaDevices);if(r.mediaDevices.getUserMedia=function(r){return"object"==typeof r&&"object"==typeof r.audio&&(e((r=JSON.parse(JSON.stringify(r))).audio,"autoGainControl","mozAutoGainControl"),e(r.audio,"noiseSuppression","mozNoiseSuppression")),n(r)},i&&i.prototype.getSettings){let n=i.prototype.getSettings;i.prototype.getSettings=function(){let r=n.apply(this,arguments);return e(r,"mozAutoGainControl","autoGainControl"),e(r,"mozNoiseSuppression","noiseSuppression"),r}}if(i&&i.prototype.applyConstraints){let n=i.prototype.applyConstraints;i.prototype.applyConstraints=function(r){return"audio"===this.kind&&"object"==typeof r&&(e(r=JSON.parse(JSON.stringify(r)),"autoGainControl","mozAutoGainControl"),e(r,"noiseSuppression","mozNoiseSuppression")),n.apply(this,[r])}}}}function sb(e,n){e.navigator.mediaDevices&&"getDisplayMedia"in e.navigator.mediaDevices||e.navigator.mediaDevices&&(e.navigator.mediaDevices.getDisplayMedia=function(r){if(!(r&&r.video)){let e=new DOMException("getDisplayMedia without video constraints is undefined");return e.name="NotFoundError",e.code=8,Promise.reject(e)}return!0===r.video?r.video={mediaSource:n}:r.video.mediaSource=n,e.navigator.mediaDevices.getUserMedia(r)})}function s_(e){"object"==typeof e&&e.RTCTrackEvent&&"receiver"in e.RTCTrackEvent.prototype&&!("transceiver"in e.RTCTrackEvent.prototype)&&Object.defineProperty(e.RTCTrackEvent.prototype,"transceiver",{get(){return{receiver:this.receiver}}})}function sw(e,n){if("object"!=typeof e||!(e.RTCPeerConnection||e.mozRTCPeerConnection))return;!e.RTCPeerConnection&&e.mozRTCPeerConnection&&(e.RTCPeerConnection=e.mozRTCPeerConnection),n.version<53&&["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach(function(n){let r=e.RTCPeerConnection.prototype[n];e.RTCPeerConnection.prototype[n]=({[n](){return arguments[0]=new("addIceCandidate"===n?e.RTCIceCandidate:e.RTCSessionDescription)(arguments[0]),r.apply(this,arguments)}})[n]});let r={inboundrtp:"inbound-rtp",outboundrtp:"outbound-rtp",candidatepair:"candidate-pair",localcandidate:"local-candidate",remotecandidate:"remote-candidate"},i=e.RTCPeerConnection.prototype.getStats;e.RTCPeerConnection.prototype.getStats=function(){let[e,o,s]=arguments;return i.apply(this,[e||null]).then(e=>{if(n.version<53&&!o)try{e.forEach(e=>{e.type=r[e.type]||e.type})}catch(n){if("TypeError"!==n.name)throw n;e.forEach((n,i)=>{e.set(i,Object.assign({},n,{type:r[n.type]||n.type}))})}return e}).then(o,s)}}function sO(e){if(!("object"==typeof e&&e.RTCPeerConnection&&e.RTCRtpSender)||e.RTCRtpSender&&"getStats"in e.RTCRtpSender.prototype)return;let n=e.RTCPeerConnection.prototype.getSenders;n&&(e.RTCPeerConnection.prototype.getSenders=function(){let e=n.apply(this,[]);return e.forEach(e=>e._pc=this),e});let r=e.RTCPeerConnection.prototype.addTrack;r&&(e.RTCPeerConnection.prototype.addTrack=function(){let e=r.apply(this,arguments);return e._pc=this,e}),e.RTCRtpSender.prototype.getStats=function(){return this.track?this._pc.getStats(this.track):Promise.resolve(new Map)}}function sR(e){if(!("object"==typeof e&&e.RTCPeerConnection&&e.RTCRtpSender)||e.RTCRtpSender&&"getStats"in e.RTCRtpReceiver.prototype)return;let n=e.RTCPeerConnection.prototype.getReceivers;n&&(e.RTCPeerConnection.prototype.getReceivers=function(){let e=n.apply(this,[]);return e.forEach(e=>e._pc=this),e}),sn(e,"track",e=>(e.receiver._pc=e.srcElement,e)),e.RTCRtpReceiver.prototype.getStats=function(){return this._pc.getStats(this.track)}}function sS(e){!e.RTCPeerConnection||"removeStream"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.removeStream=function(e){ss("removeStream","removeTrack"),this.getSenders().forEach(n=>{n.track&&e.getTracks().includes(n.track)&&this.removeTrack(n)})})}function sE(e){e.DataChannel&&!e.RTCDataChannel&&(e.RTCDataChannel=e.DataChannel)}function sT(e){if(!("object"==typeof e&&e.RTCPeerConnection))return;let n=e.RTCPeerConnection.prototype.addTransceiver;n&&(e.RTCPeerConnection.prototype.addTransceiver=function(){this.setParametersPromises=[];let e=arguments[1]&&arguments[1].sendEncodings;void 0===e&&(e=[]);let r=(e=[...e]).length>0;r&&e.forEach(e=>{if("rid"in e&&!/^[a-z0-9]{0,16}$/i.test(e.rid))throw TypeError("Invalid RID value provided.");if("scaleResolutionDownBy"in e&&!(parseFloat(e.scaleResolutionDownBy)>=1))throw RangeError("scale_resolution_down_by must be >= 1.0");if("maxFramerate"in e&&!(parseFloat(e.maxFramerate)>=0))throw RangeError("max_framerate must be >= 0.0")});let i=n.apply(this,arguments);if(r){let{sender:n}=i,r=n.getParameters();"encodings"in r&&(1!==r.encodings.length||0!==Object.keys(r.encodings[0]).length)||(r.encodings=e,n.sendEncodings=e,this.setParametersPromises.push(n.setParameters(r).then(()=>{delete n.sendEncodings}).catch(()=>{delete n.sendEncodings})))}return i})}function sM(e){if(!("object"==typeof e&&e.RTCRtpSender))return;let n=e.RTCRtpSender.prototype.getParameters;n&&(e.RTCRtpSender.prototype.getParameters=function(){let e=n.apply(this,arguments);return"encodings"in e||(e.encodings=[].concat(this.sendEncodings||[{}])),e})}function sx(e){if(!("object"==typeof e&&e.RTCPeerConnection))return;let n=e.RTCPeerConnection.prototype.createOffer;e.RTCPeerConnection.prototype.createOffer=function(){return this.setParametersPromises&&this.setParametersPromises.length?Promise.all(this.setParametersPromises).then(()=>n.apply(this,arguments)).finally(()=>{this.setParametersPromises=[]}):n.apply(this,arguments)}}function sC(e){if(!("object"==typeof e&&e.RTCPeerConnection))return;let n=e.RTCPeerConnection.prototype.createAnswer;e.RTCPeerConnection.prototype.createAnswer=function(){return this.setParametersPromises&&this.setParametersPromises.length?Promise.all(this.setParametersPromises).then(()=>n.apply(this,arguments)).finally(()=>{this.setParametersPromises=[]}):n.apply(this,arguments)}}function sI(e){if("object"==typeof e&&e.RTCPeerConnection){if("getLocalStreams"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.getLocalStreams=function(){return this._localStreams||(this._localStreams=[]),this._localStreams}),!("addStream"in e.RTCPeerConnection.prototype)){let n=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addStream=function(e){this._localStreams||(this._localStreams=[]),this._localStreams.includes(e)||this._localStreams.push(e),e.getAudioTracks().forEach(r=>n.call(this,r,e)),e.getVideoTracks().forEach(r=>n.call(this,r,e))},e.RTCPeerConnection.prototype.addTrack=function(e,...r){return r&&r.forEach(e=>{this._localStreams?this._localStreams.includes(e)||this._localStreams.push(e):this._localStreams=[e]}),n.apply(this,arguments)}}"removeStream"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.removeStream=function(e){this._localStreams||(this._localStreams=[]);let n=this._localStreams.indexOf(e);if(-1===n)return;this._localStreams.splice(n,1);let r=e.getTracks();this.getSenders().forEach(e=>{r.includes(e.track)&&this.removeTrack(e)})})}}function sj(e){if("object"==typeof e&&e.RTCPeerConnection&&("getRemoteStreams"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.getRemoteStreams=function(){return this._remoteStreams?this._remoteStreams:[]}),!("onaddstream"in e.RTCPeerConnection.prototype))){Object.defineProperty(e.RTCPeerConnection.prototype,"onaddstream",{get(){return this._onaddstream},set(e){this._onaddstream&&(this.removeEventListener("addstream",this._onaddstream),this.removeEventListener("track",this._onaddstreampoly)),this.addEventListener("addstream",this._onaddstream=e),this.addEventListener("track",this._onaddstreampoly=e=>{e.streams.forEach(e=>{if(this._remoteStreams||(this._remoteStreams=[]),this._remoteStreams.includes(e))return;this._remoteStreams.push(e);let n=new Event("addstream");n.stream=e,this.dispatchEvent(n)})})}});let n=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(){let e=this;return this._onaddstreampoly||this.addEventListener("track",this._onaddstreampoly=function(n){n.streams.forEach(n=>{if(e._remoteStreams||(e._remoteStreams=[]),e._remoteStreams.indexOf(n)>=0)return;e._remoteStreams.push(n);let r=new Event("addstream");r.stream=n,e.dispatchEvent(r)})}),n.apply(e,arguments)}}}function sA(e){if("object"!=typeof e||!e.RTCPeerConnection)return;let n=e.RTCPeerConnection.prototype,r=n.createOffer,i=n.createAnswer,o=n.setLocalDescription,s=n.setRemoteDescription,a=n.addIceCandidate;n.createOffer=function(e,n){let i=arguments.length>=2?arguments[2]:arguments[0],o=r.apply(this,[i]);return n?(o.then(e,n),Promise.resolve()):o},n.createAnswer=function(e,n){let r=arguments.length>=2?arguments[2]:arguments[0],o=i.apply(this,[r]);return n?(o.then(e,n),Promise.resolve()):o};let c=function(e,n,r){let i=o.apply(this,[e]);return r?(i.then(n,r),Promise.resolve()):i};n.setLocalDescription=c,n.setRemoteDescription=c=function(e,n,r){let i=s.apply(this,[e]);return r?(i.then(n,r),Promise.resolve()):i},n.addIceCandidate=function(e,n,r){let i=a.apply(this,[e]);return r?(i.then(n,r),Promise.resolve()):i}}function sk(e){let n=e&&e.navigator;if(n.mediaDevices&&n.mediaDevices.getUserMedia){let e=n.mediaDevices,r=e.getUserMedia.bind(e);n.mediaDevices.getUserMedia=e=>r(sB(e))}!n.getUserMedia&&n.mediaDevices&&n.mediaDevices.getUserMedia&&(n.getUserMedia=(function(e,r,i){n.mediaDevices.getUserMedia(e).then(r,i)}).bind(n))}function sB(e){return e&&void 0!==e.video?Object.assign({},e,{video:function e(n){return sa(n)?Object.keys(n).reduce(function(r,i){let o=sa(n[i]),s=o?e(n[i]):n[i],a=o&&!Object.keys(s).length;return void 0===s||a?r:Object.assign(r,{[i]:s})},{}):n}(e.video)}):e}function sP(e){if(!e.RTCPeerConnection)return;let n=e.RTCPeerConnection;e.RTCPeerConnection=function(e,r){if(e&&e.iceServers){let n=[];for(let r=0;r<e.iceServers.length;r++){let i=e.iceServers[r];void 0===i.urls&&i.url?(ss("RTCIceServer.url","RTCIceServer.urls"),(i=JSON.parse(JSON.stringify(i))).urls=i.url,delete i.url,n.push(i)):n.push(e.iceServers[r])}e.iceServers=n}return new n(e,r)},e.RTCPeerConnection.prototype=n.prototype,"generateCertificate"in n&&Object.defineProperty(e.RTCPeerConnection,"generateCertificate",{get:()=>n.generateCertificate})}function sN(e){"object"==typeof e&&e.RTCTrackEvent&&"receiver"in e.RTCTrackEvent.prototype&&!("transceiver"in e.RTCTrackEvent.prototype)&&Object.defineProperty(e.RTCTrackEvent.prototype,"transceiver",{get(){return{receiver:this.receiver}}})}function sD(e){let n=e.RTCPeerConnection.prototype.createOffer;e.RTCPeerConnection.prototype.createOffer=function(e){if(e){void 0!==e.offerToReceiveAudio&&(e.offerToReceiveAudio=!!e.offerToReceiveAudio);let n=this.getTransceivers().find(e=>"audio"===e.receiver.track.kind);!1===e.offerToReceiveAudio&&n?"sendrecv"===n.direction?n.setDirection?n.setDirection("sendonly"):n.direction="sendonly":"recvonly"===n.direction&&(n.setDirection?n.setDirection("inactive"):n.direction="inactive"):!0!==e.offerToReceiveAudio||n||this.addTransceiver("audio",{direction:"recvonly"}),void 0!==e.offerToReceiveVideo&&(e.offerToReceiveVideo=!!e.offerToReceiveVideo);let r=this.getTransceivers().find(e=>"video"===e.receiver.track.kind);!1===e.offerToReceiveVideo&&r?"sendrecv"===r.direction?r.setDirection?r.setDirection("sendonly"):r.direction="sendonly":"recvonly"===r.direction&&(r.setDirection?r.setDirection("inactive"):r.direction="inactive"):!0!==e.offerToReceiveVideo||r||this.addTransceiver("video",{direction:"recvonly"})}return n.apply(this,arguments)}}function sL(e){"object"!=typeof e||e.AudioContext||(e.AudioContext=e.webkitAudioContext)}var sF=__webpack_require__("../../node_modules/sdp/sdp.js"),sU=__webpack_require__.n(sF);function sq(e){if(!e.RTCIceCandidate||e.RTCIceCandidate&&"foundation"in e.RTCIceCandidate.prototype)return;let n=e.RTCIceCandidate;e.RTCIceCandidate=function(e){if("object"==typeof e&&e.candidate&&0===e.candidate.indexOf("a=")&&((e=JSON.parse(JSON.stringify(e))).candidate=e.candidate.substring(2)),e.candidate&&e.candidate.length){let r=new n(e),i=sU().parseCandidate(e.candidate);for(let e in i)e in r||Object.defineProperty(r,e,{value:i[e]});return r.toJSON=function(){return{candidate:r.candidate,sdpMid:r.sdpMid,sdpMLineIndex:r.sdpMLineIndex,usernameFragment:r.usernameFragment}},r}return new n(e)},e.RTCIceCandidate.prototype=n.prototype,sn(e,"icecandidate",n=>(n.candidate&&Object.defineProperty(n,"candidate",{value:new e.RTCIceCandidate(n.candidate),writable:"false"}),n))}function sH(e){!e.RTCIceCandidate||e.RTCIceCandidate&&"relayProtocol"in e.RTCIceCandidate.prototype||sn(e,"icecandidate",e=>{if(e.candidate){let n=sU().parseCandidate(e.candidate.candidate);"relay"===n.type&&(e.candidate.relayProtocol=({0:"tls",1:"tcp",2:"udp"})[n.priority>>24])}return e})}function sV(e,n){if(!e.RTCPeerConnection)return;"sctp"in e.RTCPeerConnection.prototype||Object.defineProperty(e.RTCPeerConnection.prototype,"sctp",{get(){return void 0===this._sctp?null:this._sctp}});let r=function(e){if(!e||!e.sdp)return!1;let n=sU().splitSections(e.sdp);return n.shift(),n.some(e=>{let n=sU().parseMLine(e);return n&&"application"===n.kind&&-1!==n.protocol.indexOf("SCTP")})},i=function(e){let n=e.sdp.match(/mozilla...THIS_IS_SDPARTA-(\d+)/);if(null===n||n.length<2)return -1;let r=parseInt(n[1],10);return r!=r?-1:r},o=function(e){let r=65536;return"firefox"===n.browser&&(r=n.version<57?-1===e?16384:0x7ffffff5:n.version<60?57===n.version?65535:65536:0x7ffffff5),r},s=function(e,r){let i=65536;"firefox"===n.browser&&57===n.version&&(i=65535);let o=sU().matchPrefix(e.sdp,"a=max-message-size:");return o.length>0?i=parseInt(o[0].substring(19),10):"firefox"===n.browser&&-1!==r&&(i=0x7ffffff5),i},a=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(){if(this._sctp=null,"chrome"===n.browser&&n.version>=76){let{sdpSemantics:e}=this.getConfiguration();"plan-b"===e&&Object.defineProperty(this,"sctp",{get(){return void 0===this._sctp?null:this._sctp},enumerable:!0,configurable:!0})}if(r(arguments[0])){let e,n=i(arguments[0]),r=o(n),a=s(arguments[0],n);e=0===r&&0===a?Number.POSITIVE_INFINITY:0===r||0===a?Math.max(r,a):Math.min(r,a);let c={};Object.defineProperty(c,"maxMessageSize",{get:()=>e}),this._sctp=c}return a.apply(this,arguments)}}function sX(e){if(!(e.RTCPeerConnection&&"createDataChannel"in e.RTCPeerConnection.prototype))return;function n(e,n){let r=e.send;e.send=function(){let i=arguments[0],o=i.length||i.size||i.byteLength;if("open"===e.readyState&&n.sctp&&o>n.sctp.maxMessageSize)throw TypeError("Message too large (can send a maximum of "+n.sctp.maxMessageSize+" bytes)");return r.apply(e,arguments)}}let r=e.RTCPeerConnection.prototype.createDataChannel;e.RTCPeerConnection.prototype.createDataChannel=function(){let e=r.apply(this,arguments);return n(e,this),e},sn(e,"datachannel",e=>(n(e.channel,e.target),e))}function sW(e){if(!e.RTCPeerConnection||"connectionState"in e.RTCPeerConnection.prototype)return;let n=e.RTCPeerConnection.prototype;Object.defineProperty(n,"connectionState",{get(){return({completed:"connected",checking:"connecting"})[this.iceConnectionState]||this.iceConnectionState},enumerable:!0,configurable:!0}),Object.defineProperty(n,"onconnectionstatechange",{get(){return this._onconnectionstatechange||null},set(e){this._onconnectionstatechange&&(this.removeEventListener("connectionstatechange",this._onconnectionstatechange),delete this._onconnectionstatechange),e&&this.addEventListener("connectionstatechange",this._onconnectionstatechange=e)},enumerable:!0,configurable:!0}),["setLocalDescription","setRemoteDescription"].forEach(e=>{let r=n[e];n[e]=function(){return this._connectionstatechangepoly||(this._connectionstatechangepoly=e=>{let n=e.target;if(n._lastConnectionState!==n.connectionState){n._lastConnectionState=n.connectionState;let r=new Event("connectionstatechange",e);n.dispatchEvent(r)}return e},this.addEventListener("iceconnectionstatechange",this._connectionstatechangepoly)),r.apply(this,arguments)}})}function s$(e,n){if(!e.RTCPeerConnection||"chrome"===n.browser&&n.version>=71||"safari"===n.browser&&n._safariVersion>=13.1)return;let r=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(n){if(n&&n.sdp&&-1!==n.sdp.indexOf("\na=extmap-allow-mixed")){let r=n.sdp.split("\n").filter(e=>"a=extmap-allow-mixed"!==e.trim()).join("\n");e.RTCSessionDescription&&n instanceof e.RTCSessionDescription?arguments[0]=new e.RTCSessionDescription({type:n.type,sdp:r}):n.sdp=r}return r.apply(this,arguments)}}function sz(e,n){if(!(e.RTCPeerConnection&&e.RTCPeerConnection.prototype))return;let r=e.RTCPeerConnection.prototype.addIceCandidate;r&&0!==r.length&&(e.RTCPeerConnection.prototype.addIceCandidate=function(){return arguments[0]?("chrome"===n.browser&&n.version<78||"firefox"===n.browser&&n.version<68||"safari"===n.browser)&&arguments[0]&&""===arguments[0].candidate?Promise.resolve():r.apply(this,arguments):(arguments[1]&&arguments[1].apply(null),Promise.resolve())})}function sG(e,n){if(!(e.RTCPeerConnection&&e.RTCPeerConnection.prototype))return;let r=e.RTCPeerConnection.prototype.setLocalDescription;r&&0!==r.length&&(e.RTCPeerConnection.prototype.setLocalDescription=function(){let e=arguments[0]||{};if("object"!=typeof e||e.type&&e.sdp)return r.apply(this,arguments);if(!(e={type:e.type,sdp:e.sdp}).type)switch(this.signalingState){case"stable":case"have-local-offer":case"have-remote-pranswer":e.type="offer";break;default:e.type="answer"}return e.sdp||"offer"!==e.type&&"answer"!==e.type?r.apply(this,[e]):("offer"===e.type?this.createOffer:this.createAnswer).apply(this).then(e=>r.apply(this,[e]))})}let sK=function({window:e}={},n={shimChrome:!0,shimFirefox:!0,shimSafari:!0}){let r=function(e){let n={browser:null,version:null};if(void 0===e||!e.navigator||!e.navigator.userAgent)return n.browser="Not a browser.",n;let{navigator:r}=e;if(r.userAgentData&&r.userAgentData.brands){let e=r.userAgentData.brands.find(e=>"Chromium"===e.brand);if(e)return{browser:"chrome",version:parseInt(e.version,10)}}return r.mozGetUserMedia?(n.browser="firefox",n.version=parseInt(st(r.userAgent,/Firefox\/(\d+)\./,1))):r.webkitGetUserMedia||!1===e.isSecureContext&&e.webkitRTCPeerConnection?(n.browser="chrome",n.version=parseInt(st(r.userAgent,/Chrom(e|ium)\/(\d+)\./,2))):e.RTCPeerConnection&&r.userAgent.match(/AppleWebKit\/(\d+)\./)?(n.browser="safari",n.version=parseInt(st(r.userAgent,/AppleWebKit\/(\d+)\./,1)),n.supportsUnifiedPlan=e.RTCRtpTransceiver&&"currentDirection"in e.RTCRtpTransceiver.prototype,n._safariVersion=st(r.userAgent,/Version\/(\d+(\.?\d+))/,1)):n.browser="Not a supported browser.",n}(e),i={browserDetails:r,commonShim:k,extractVersion:st,disableLog:sr,disableWarnings:si,sdp:sF};switch(r.browser){case"chrome":if(!I||!sg||!n.shimChrome){so("Chrome shim is not included in this adapter release.");break}if(null===r.version){so("Chrome shim can not determine version, not shimming.");break}so("adapter.js shimming chrome."),i.browserShim=I,sz(e,r),sG(e,r),sl(e,r),su(e,r),sg(e,r),sd(e,r),sm(e,r),sp(e,r),sh(e,r),sv(e,r),sq(e,r),sH(e,r),sW(e,r),sV(e,r),sX(e,r),s$(e,r);break;case"firefox":if(!j||!sw||!n.shimFirefox){so("Firefox shim is not included in this adapter release.");break}so("adapter.js shimming firefox."),i.browserShim=j,sz(e,r),sG(e,r),sy(e,r),sw(e,r),s_(e,r),sS(e,r),sO(e,r),sR(e,r),sE(e,r),sT(e,r),sM(e,r),sx(e,r),sC(e,r),sq(e,r),sW(e,r),sV(e,r),sX(e,r);break;case"safari":if(!A||!n.shimSafari){so("Safari shim is not included in this adapter release.");break}so("adapter.js shimming safari."),i.browserShim=A,sz(e,r),sG(e,r),sP(e,r),sD(e,r),sA(e,r),sI(e,r),sj(e,r),sN(e,r),sk(e,r),sL(e,r),sq(e,r),sH(e,r),sV(e,r),sX(e,r),s$(e,r);break;default:so("Unsupported browser!")}return i}({window:"undefined"==typeof window?void 0:window});!function(e){e.DEFAULT_BRTC_SDK_URL="https://brtc-sdk.cdn.bcebos.com/npm/baidurtc@1.2.19/baidu.rtc.sdk.js",e.DEFAULT_BRTC_CLIENT_CONFIG={displayName:"AaaSPilot Kit",debugLevel:!1,rtcOptions:{},cfg:{tag:"H5.SDK",llm:"LLMMute",tts:"MUTE"},silenceTimeoutMs:1e4}}(C||(C={}));let sY=e=>{if(e)return"string"==typeof e?e:e.id};class sJ extends oA{static #k=this.MESSAGE_INTERVAL_THRESHOLD=5e3;preloadDeps(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:C.DEFAULT_BRTC_SDK_URL;return"undefined"==typeof window||window.adapter||(window.adapter=null!=sK?sK:B),"function"==typeof window.BRTC_Start?Promise.resolve():(this.brtcLoadPromise||(this.brtcLoadPromise=new Promise((n,r)=>{let i=document.createElement("script");i.src=e,i.async=!0,i.onload=()=>n(),i.onerror=()=>{this.errorManager.handleError(new nH(`Failed to load BRTC SDK: ${e}`)),r(Error(`Failed to load BRTC SDK: ${e}`))},document.head.appendChild(i)})),this.brtcLoadPromise)}makeStartOptions(){return{...C.DEFAULT_BRTC_CLIENT_CONFIG,cfg:{...C.DEFAULT_BRTC_CLIENT_CONFIG.cfg,asr_vad:this.opts.asrVad}}}parseMessage(e){let n=e.replace(/\[Q\]:?|\[M\]:?|\[C\]:?|\[A\]:?|\[H\]:?|\[E\]:?|\[B\]:?|\[T\]:?/g,"").trim(),r=E.EMessageType.Event,i=!0,o=!1,s=!1;return s=e.includes("VOICE_COMING"),e.includes("[Q]")&&(r=E.EMessageType.Query),e.includes("[E]")&&(r=E.EMessageType.Event),i=!e.includes("[M]"),{type:r,continued:e.includes("[C]"),data:n,completed:i,isCollectingSounds:s}}constructor(...e){super(...e),this.brtcLoadPromise=null,this.silenceTimer=null,this.lastMessageTime=0,this.messageIntervalTimer=null,this.start=async()=>{if(this.started)return;await this._ensureMicPermission();let{displayName:e,debugLevel:n,rtcOptions:{remoteVideoElement:r,localVideoElement:i},cfg:o,silenceTimeoutMs:s}=this.makeStartOptions();return new Promise((a,c)=>{this.signalingService.Start({debuglevel:n,cfg:o,displayname:e,remotevideoviewid:sY(r),localvideoviewid:sY(i),usingremotemediastate:!0,success:()=>{this.started=!0,this.emitter.emit("start",{sessionId:this.sessionId}).catch(rh),a()},error:e=>{this.errorManager.handleError(new nz(e||"",{sessionId:this.sessionId})),c(Error(e||""))},onmessage:e=>{try{let n=this.parseMessage(e.data);if(e.data.includes("VOICE_COMING")||(this.emitter.emitSerial("message",{...n,sessionId:this.sessionId}).catch(rh),this.checkMessageInterval(n)),0!==s){let r=""===n.data;(e.data.includes("[E]")||e.data.includes("VOICE_COMING"))&&r?this.triggerSilence():this.resetSilenceTimer()}}catch(e){e instanceof Error&&this.errorManager.handleError(new nW(e.message,{sessionId:this.sessionId}))}},userevent_joinedroom:(e,n,r)=>{this.emitter.emit("user_joined_room",{id:e,display:n,attribute:r,sessionId:this.sessionId})},userevent_leavingroom:(e,n)=>{this.emitter.emit("user_leaving_room",{id:e,display:n,sessionId:this.sessionId})},remotemediastating:(e,n,r)=>{this.emitter.emit("media_state_changed",{id:e,medium:n,on:r,sessionId:this.sessionId})}})})},this.stop=async()=>{try{await this._stop()}catch(e){e instanceof Error&&this.errorManager.handleError(new nV(e.message,{sessionId:this.sessionId}))}this.emitter.emit("stop",{sessionId:this.signalingService.GetSessionID()})},this.dispose=()=>{this._dispose(),this.brtcLoadPromise=null,this.silenceTimer&&(window.clearTimeout(this.silenceTimer),this.silenceTimer=null),this.messageIntervalTimer&&(window.clearTimeout(this.messageIntervalTimer),this.messageIntervalTimer=null),this.lastMessageTime=0},this.resetSilenceTimer=()=>{null!==this.silenceTimer&&window.clearTimeout(this.silenceTimer),this.silenceTimer=window.setTimeout(()=>{this.emitter.emit("silence",{sessionId:this.signalingService.GetSessionID()})},this.makeStartOptions().silenceTimeoutMs)},this.triggerSilence=()=>{this.emitter.emit("silence",{sessionId:this.signalingService.GetSessionID()}),this.resetSilenceTimer()},this.checkMessageInterval=e=>{let n=Date.now();if(e.completed){this.messageIntervalTimer&&(window.clearTimeout(this.messageIntervalTimer),this.messageIntervalTimer=null),this.lastMessageTime=0;return}if(0===this.lastMessageTime)this.lastMessageTime=n,this.messageIntervalTimer=window.setTimeout(()=>{this.errorManager.handleError(new n$(`ASR\u{6D88}\u{606F}\u{95F4}\u{9694}\u{8D85}\u{8FC7}${sJ.MESSAGE_INTERVAL_THRESHOLD}ms\u{9608}\u{503C}`,{sessionId:this.sessionId,context:{lastMessageTime:this.lastMessageTime,currentTime:n,threshold:sJ.MESSAGE_INTERVAL_THRESHOLD}}))},sJ.MESSAGE_INTERVAL_THRESHOLD);else{let e=n-this.lastMessageTime;e>sJ.MESSAGE_INTERVAL_THRESHOLD&&this.errorManager.handleError(new n$(`ASR\u{6D88}\u{606F}\u{95F4}\u{9694}${e}ms\u{8D85}\u{8FC7}${sJ.MESSAGE_INTERVAL_THRESHOLD}ms\u{9608}\u{503C}`,{sessionId:this.sessionId,context:{lastMessageTime:this.lastMessageTime,currentTime:n,interval:e,threshold:sJ.MESSAGE_INTERVAL_THRESHOLD}})),this.lastMessageTime=n,this.messageIntervalTimer&&window.clearTimeout(this.messageIntervalTimer),this.messageIntervalTimer=window.setTimeout(()=>{this.errorManager.handleError(new n$(`ASR\u{6D88}\u{606F}\u{95F4}\u{9694}\u{8D85}\u{8FC7}${sJ.MESSAGE_INTERVAL_THRESHOLD}ms\u{9608}\u{503C}`,{sessionId:this.sessionId,context:{lastMessageTime:this.lastMessageTime,currentTime:Date.now(),threshold:sJ.MESSAGE_INTERVAL_THRESHOLD}}))},sJ.MESSAGE_INTERVAL_THRESHOLD)}}}}sJ=function(e,n,r,i){var o,s=arguments.length,a=s<3?n:null===i?i=Object.getOwnPropertyDescriptor(n,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,n,r,i);else for(var c=e.length-1;c>=0;c--)(o=e[c])&&(a=(s<3?o(a):s>3?o(n,r,a):o(n,r))||a);return s>3&&a&&Object.defineProperty(n,r,a),a}([ey(),eb()],sJ),function(){if("undefined"==typeof AbortSignal)return console.warn("AbortSignal is not defined in this environment. The polyfill will not be installed.");iy("any",im.abortSignalAny),iy("timeout",ig.abortSignalTimeout),iy("abort",iv.abortSignalAbort)}();let sQ=e=>{var n;let r=new tB({defaultScope:"Singleton"}),i={...rs,...e,hotWordReplacementRules:[...ri,...null!=(n=e.hotWordReplacementRules)?n:[]]};r.bind(t1.IOptions).toConstantValue(i),r.bind(t1.ErrorManager).to(re),r.bind(t1.CommonRequest).to(nS);let{agentConfig:o,agentService:s,enableDebugMode:a}=i,c=!!(null==o?void 0:o.robotId),l=!!(null==o?void 0:o.token),u=!!s;if(u&&o&&a&&console.warn("[createAaaSPilotKit] agentService 已提供,agentConfig 配置将被忽略。"),!u&&!c&&!l)throw Error("[createAaaSPilotKit] 未检测到有效的 agent 配置,请至少提供 agentService 或 agentConfig 中的 robotId/token。");s?(Reflect.hasOwnMetadata("@inversifyjs/core/classIsInjectableFlagReflectKey",s)||(Z(eb(),s),Z(ey(),s)),r.bind(t1.AgentService).to(s)):l?r.bind(t1.AgentService).to(o3):c&&r.bind(t1.AgentService).to(o2),r.bind(t1.SignalingService).to(o9),r.bind(t1.ASRService).to(sJ);let{rendererMode:d}=i;return r.bind(t1.DigitalHumanService).to(oY),r.bind(t1.ConversationService).to(ih),r.bind(t1.AaaSPilotKitController).to(oZ),r.get(t1.AaaSPilotKitController)}})(),exports.AIWorkerConversationBean=__webpack_exports__.AIWorkerConversationBean,exports.AaaSPilotKitController=__webpack_exports__.AaaSPilotKitController,exports.BaseAgentService=__webpack_exports__.BaseAgentService,exports.ClientConversationBean=__webpack_exports__.ClientConversationBean,exports.ConversationBean=__webpack_exports__.ConversationBean,exports.ConversationService=__webpack_exports__.ConversationService,exports.DEFAULT_OPTIONS=__webpack_exports__.DEFAULT_OPTIONS,exports.createAaaSPilotKit=__webpack_exports__.createAaaSPilotKit,__webpack_exports__)-1===["AIWorkerConversationBean","AaaSPilotKitController","BaseAgentService","ClientConversationBean","ConversationBean","ConversationService","DEFAULT_OPTIONS","createAaaSPilotKit"].indexOf(__webpack_i__)&&(exports[__webpack_i__]=__webpack_exports__[__webpack_i__]);Object.defineProperty(exports,"__esModule",{value:!0});
43
+ - name: ${null!=(r=null==(n=e.name)?void 0:n.toString())?r:"-"}${i}`}function eB(e,n,r){if(Array.isArray(e.bindings)&&1===e.bindings.length){let[i]=e.bindings;eC(i)&&function e(n,r,i){if(1!==n.redirections.length)eI(n.redirections,r,n,i);else{let[o]=n.redirections;eC(o)&&e(o,r,i)}}(i,n,r)}else eI(e.bindings,n,e,r)}function eP(e,n,r){if(r.kind===v.unmanaged)return;let i=L.is(r.value)?r.value.unwrap():r.value,o=n.concat({name:r.name,serviceIdentifier:i,tags:r.tags}),s=new eT(o.last),a=ex(e,s),c=[],l={bindings:c,parent:e.node,serviceIdentifier:i};if(c.push(...eN(e,o,a,l)),r.kind===v.singleInjection){eB(l,r.optional,s);let[e]=c;l.bindings=e}return l}function eN(e,n,r,i){let o=eC(i)?i.binding.targetServiceIdentifier:i.serviceIdentifier;e.servicesBranch.push(o);let s=[];for(let o of r)switch(o.type){case W.Instance:s.push(function(e,n,r,i){let o={binding:n,classMetadata:e.getClassMetadata(n.implementationType),constructorParams:[],parent:i,propertyParams:new Map};return eD({autobindOptions:e.autobindOptions,getBindings:e.getBindings,getClassMetadata:e.getClassMetadata,node:o,servicesBranch:e.servicesBranch,setBinding:e.setBinding},r)}(e,o,n,i));break;case W.ResolvedValue:var a,c,l,u;s.push((a=e,c=o,l=n,u=i,eD({autobindOptions:a.autobindOptions,getBindings:a.getBindings,getClassMetadata:a.getClassMetadata,node:{binding:c,params:[],parent:u},servicesBranch:a.servicesBranch,setBinding:a.setBinding},l)));break;case W.ServiceRedirection:{let r=function(e,n,r,i){let o={binding:r,parent:i,redirections:[]},s=ex(e,new eT(n.last),{customServiceIdentifier:r.targetServiceIdentifier});return o.redirections.push(...eN(e,n,s,o)),o}(e,n,o,i);s.push(r);break}default:s.push({binding:o,parent:i})}return e.servicesBranch.pop(),s}function eD(e,n){return e.node.binding.type===W.Instance?function(e,n,r){let i=n.classMetadata;for(let[o,s]of i.constructorArguments.entries())n.constructorParams[o]=eP(e,r,s);for(let[o,s]of i.properties){let i=eP(e,r,s);void 0!==i&&n.propertyParams.set(o,i)}return e.node}(e,e.node,n):function(e,n,r){for(let[i,o]of n.binding.metadata.arguments.entries())n.params[i]=function(e,n,r){let i=L.is(r.value)?r.value.unwrap():r.value,o=n.concat({name:r.name,serviceIdentifier:i,tags:r.tags}),s=new eT(o.last),a=ex(e,s),c=[],l={bindings:c,parent:e.node,serviceIdentifier:i};if(c.push(...eN(e,o,a,l)),r.kind===b.singleInjection){eB(l,r.optional,s);let[e]=c;l.bindings=e}return l}(e,r,o);return e.node}(e,e.node,n)}class eL{#y;#b;#_;constructor(){this.#y=[],this.#b=8,this.#_=1024}*[Symbol.iterator](){let e=0;for(let n of this.#y){let r=n.deref();void 0===r?++e:yield r}this.#y.length>=this.#b&&this.#w(e)&&this.#O(e)}push(e){let n=new WeakRef(e);if(this.#y.push(n),this.#y.length>=this.#b&&this.#y.length%this.#_==0){let e=0;for(let n of this.#y)void 0===n.deref()&&++e;this.#w(e)&&this.#O(e)}}#O(e){let n=Array(this.#y.length-e),r=0;for(let e of this.#y)e.deref()&&(n[r++]=e);this.#y=n}#w(e){return e>=.5*this.#y.length}}!function(e){e[e.singleMandatory=0]="singleMandatory",e[e.singleOptional=1]="singleOptional",e[e.multipleMandatory=2]="multipleMandatory",e[e.multipleOptional=3]="multipleOptional",e[e.length=4]="length"}(_||(_={}));class eF{#R;#S;#E;#T;#M;constructor(){this.#R=this.#x(),this.#S=this.#x(),this.#E=this.#x(),this.#T=this.#x(),this.#M=new eL}clearCache(){for(let e of this.#C())e.clear();for(let e of this.#M)e.clearCache()}get(e){var n,r,i,o,s,a;return void 0===e.name?void 0===e.tag?this.#I(this.#R,e).get(e.serviceIdentifier):null==(r=this.#I(this.#T,e).get(e.serviceIdentifier))||null==(n=r.get(e.tag.key))?void 0:n.get(e.tag.value):void 0===e.tag?null==(i=this.#I(this.#S,e).get(e.serviceIdentifier))?void 0:i.get(e.name):null==(a=this.#I(this.#E,e).get(e.serviceIdentifier))||null==(s=a.get(e.name))||null==(o=s.get(e.tag.key))?void 0:o.get(e.tag.value)}set(e,n){void 0===e.name?void 0===e.tag?this.#I(this.#R,e).set(e.serviceIdentifier,n):this.#j(this.#j(this.#I(this.#T,e),e.serviceIdentifier),e.tag.key).set(e.tag.value,n):void 0===e.tag?this.#j(this.#I(this.#S,e),e.serviceIdentifier).set(e.name,n):this.#j(this.#j(this.#j(this.#I(this.#E,e),e.serviceIdentifier),e.name),e.tag.key).set(e.tag.value,n)}subscribe(e){this.#M.push(e)}#x(){let e=Array(_.length);for(let n=0;n<e.length;++n)e[n]=new Map;return e}#j(e,n){let r=e.get(n);return void 0===r&&(r=new Map,e.set(n,r)),r}#I(e,n){return e[this.#A(n)]}#C(){return[...this.#R,...this.#S,...this.#E,...this.#T]}#A(e){return e.isMultiple?!0===e.optional?_.multipleOptional:_.multipleMandatory:!0===e.optional?_.singleOptional:_.singleMandatory}}function eU(e,n){return P(n)?(e.cache={isRight:!0,value:n},n.then(n=>eq(e,n))):eq(e,n)}function eq(e,n){return e.cache={isRight:!0,value:n},n}async function eH(e,n,r){let i=await n,o=r.next();for(;!0!==o.done;)i=await o.value(e.context,i),o=r.next();return i}function eV(e,n,r){let i=r;if(void 0!==n.onActivation){let r=n.onActivation;i=P(i)?i.then(n=>r(e.context,n)):r(e.context,i)}var o=e,s=n.serviceIdentifier,a=i;let c=o.getActivations(s);return void 0===c?a:P(a)?eH(o,a,c[Symbol.iterator]()):function(e,n,r){let i=n,o=r.next();for(;!0!==o.done;){let n=o.value(e.context,i);if(P(n))return eH(e,n,r);i=n,o=r.next()}return i}(o,a,c[Symbol.iterator]())}function eX(e){return(n,r)=>r.cache.isRight?r.cache.value:eU(r,eV(n,r,e(n,r)))}let eW=eX(function(e,n){return n.value});function e$(e){return e}function ez(e,n){return(r,i)=>{let o=e(i);switch(o.scope){case X.Singleton:if(o.cache.isRight)return o.cache.value;return eU(o,eV(r,o,n(r,i)));case X.Request:{if(r.requestScopeCache.has(o.id))return r.requestScopeCache.get(o.id);let e=eV(r,o,n(r,i));return r.requestScopeCache.set(o.id,e),e}case X.Transient:return eV(r,o,n(r,i))}}}let eG=ez(e$,function(e,n){return n.value(e.context)}),eK=eX(function(e,n){return n.factory(e.context)});function eY(e,n,r){let i=function(e,n,r){if(void 0!==r){if(!(r in e))throw new ei(m.resolution,`Expecting a "${r.toString()}" property when resolving "${n.implementationType.name}" class @postConstruct decorated method, none found.`);if("function"!=typeof e[r])throw new ei(m.resolution,`Expecting a "${r.toString()}" method when resolving "${n.implementationType.name}" class @postConstruct decorated method, a non function property was found instead.`);{let i;try{i=e[r]()}catch(e){throw new ei(m.resolution,`Unexpected error found when calling "${r.toString()}" @postConstruct decorated method on class "${n.implementationType.name}"`,{cause:e})}if(P(i))return async function(e,n,r){try{await r}catch(r){throw new ei(m.resolution,`Unexpected error found when calling "${n.toString()}" @postConstruct decorated method on class "${e.implementationType.name}"`,{cause:r})}}(n,r,i)}}}(e,n,r);return P(i)?i.then(()=>e):e}function eQ(e){return(n,r,i)=>{let o=new i.binding.implementationType(...n),s=e(r,o,i);return P(s)?s.then(()=>eY(o,i.binding,i.classMetadata.lifecycle.postConstructMethodName)):eY(o,i.binding,i.classMetadata.lifecycle.postConstructMethodName)}}let eJ=eX(function(e,n){return n.provider(e.context)});function eZ(e){return e.binding}function e0(e){return e.binding}let e1=(r=e9,(e,n,i)=>{let o=[];for(let[s,a]of i.propertyParams){let c=i.classMetadata.properties.get(s);if(void 0===c)throw new ei(m.resolution,`Expecting metadata at property "${s.toString()}", none found`);c.kind!==v.unmanaged&&void 0!==a.bindings&&(n[s]=r(e,a),P(n[s])&&o.push((async()=>{n[s]=await n[s]})()))}if(o.length>0)return Promise.all(o).then(()=>{})}),e2=(i=e8,function e(n,r){let o=[];for(let s of r.redirections)eC(s)?o.push(...e(n,s)):o.push(i(n,s));return o}),e3=(o=e9,a=(e,n)=>{let r=[];for(let i of n.constructorParams)void 0===i?r.push(void 0):r.push(o(e,i));return r.some(P)?Promise.all(r):r},s=eQ(e1),c=async(e,n,r)=>s(await e,n,r),l=eQ(e1),(e,n)=>{let r=a(e,n);return P(r)?c(r,e,n):l(r,e,n)}),e6=(u=e9,d=(e,n)=>{let r=[];for(let i of n.params)r.push(u(e,i));return r.some(P)?Promise.all(r):r},(e,n)=>{let r=d(e,n);return P(r)?r.then(e=>n.binding.factory(...e)):n.binding.factory(...r)}),e5=ez(eZ,e3),e4=ez(e0,e6);function e8(e,n){switch(n.binding.type){case W.ConstantValue:return eW(e,n.binding);case W.DynamicValue:return eG(e,n.binding);case W.Factory:return eK(e,n.binding);case W.Instance:return e5(e,n);case W.Provider:return eJ(e,n.binding);case W.ResolvedValue:return e4(e,n)}}function e9(e,n){if(void 0!==n.bindings)return Array.isArray(n.bindings)?function(e,n){let r=[];for(let i of n)eC(i)?r.push(...e2(e,i)):r.push(e8(e,i));return r.some(P)?Promise.all(r):r}(e,n.bindings):function(e,n){if(eC(n)){let r=e2(e,n);if(1===r.length)return r[0];throw new ei(m.resolution,"Unexpected multiple resolved values on single injection")}return e8(e,n)}(e,n.bindings)}function e7(e,n){if(void 0!==e.lifecycle.preDestroyMethodName&&"function"==typeof n[e.lifecycle.preDestroyMethodName])return n[e.lifecycle.preDestroyMethodName]()}function te(e,n,r){let i=e.getDeactivations(n);if(void 0!==i)return P(r)?tt(r,i[Symbol.iterator]()):function(e,n){let r=n.next();for(;!0!==r.done;){if(P(r.value(e)))return tt(e,n);r=n.next()}}(r,i[Symbol.iterator]())}async function tt(e,n){let r=await e,i=n.next();for(;!0!==i.done;)await i.value(r),i=n.next()}function tn(e,n){let r=n.cache;return P(r.value)?r.value.then(r=>tr(e,n,r)):tr(e,n,r.value)}function tr(e,n,r){let i;return void 0!==n.onDeactivation&&(i=(0,n.onDeactivation)(r)),void 0===i?te(e,n.serviceIdentifier,r):i.then(()=>te(e,n.serviceIdentifier,r))}function ti(e,n){if(void 0===n)return;let r=function(e){let n=[];for(let r of e)void 0!==r.scope&&r.scope===X.Singleton&&r.cache.isRight&&n.push(r);return n}(n),i=[];for(let n of r){let r=function(e,n){let r=function(e,n){if(n.type===W.Instance){let r=e.getClassMetadata(n.implementationType),i=n.cache.value;return P(i)?i.then(e=>e7(r,e)):e7(r,i)}}(e,n);return void 0===r?tn(e,n):r.then(()=>tn(e,n))}(e,n);void 0!==r&&i.push(r)}return i.length>0?Promise.all(i).then(()=>{}):void 0}function to(e,n){let r=e.getBindings(n);return ti(e,r)}let ts=Symbol.for("@inversifyjs/plugin/isPlugin"),ta=Symbol.for("@inversifyjs/container/bindingIdentifier");function tc(e){return"object"==typeof e&&null!==e&&!0===e[ta]}class tl{static #k=this.always=e=>!0}function tu(e){return{[ta]:!0,id:e.id}}function td(e){return n=>{for(let r=n.getAncestor();void 0!==r;r=r.getAncestor())if(e(r))return!0;return!1}}function tp(e){return n=>n.name===e}function th(e){return n=>n.serviceIdentifier===e}function tf(e,n){return r=>r.tags.has(e)&&r.tags.get(e)===n}function tm(e){return void 0===e.name&&0===e.tags.size}function tg(e){let n=td(e);return e=>!n(e)}function tv(e){return n=>{let r=n.getAncestor();return void 0===r||!e(r)}}function ty(e){return n=>{let r=n.getAncestor();return void 0!==r&&e(r)}}class tb{#r;constructor(e){this.#r=e}getIdentifier(){return tu(this.#r)}inRequestScope(){return this.#r.scope=X.Request,new tR(this.#r)}inSingletonScope(){return this.#r.scope=X.Singleton,new tR(this.#r)}inTransientScope(){return this.#r.scope=X.Transient,new tR(this.#r)}}class t_{#t;#o;#s;#a;constructor(e,n,r,i){this.#t=e,this.#o=n,this.#s=r,this.#a=i}to(e){var n;let r=eo(e),i={cache:{isRight:!1,value:void 0},id:V(),implementationType:e,isSatisfiedBy:tl.always,moduleId:this.#o,onActivation:void 0,onDeactivation:void 0,scope:null!=(n=r.scope)?n:this.#s,serviceIdentifier:this.#a,type:W.Instance};return this.#t(i),new tS(i)}toSelf(){if("function"!=typeof this.#a)throw Error('"toSelf" function can only be applied when a newable function is used as service identifier');return this.to(this.#a)}toConstantValue(e){let n={cache:{isRight:!1,value:void 0},id:V(),isSatisfiedBy:tl.always,moduleId:this.#o,onActivation:void 0,onDeactivation:void 0,scope:X.Singleton,serviceIdentifier:this.#a,type:W.ConstantValue,value:e};return this.#t(n),new tR(n)}toDynamicValue(e){let n={cache:{isRight:!1,value:void 0},id:V(),isSatisfiedBy:tl.always,moduleId:this.#o,onActivation:void 0,onDeactivation:void 0,scope:this.#s,serviceIdentifier:this.#a,type:W.DynamicValue,value:e};return this.#t(n),new tS(n)}toResolvedValue(e,n){let r={cache:{isRight:!1,value:void 0},factory:e,id:V(),isSatisfiedBy:tl.always,metadata:this.#i(n),moduleId:this.#o,onActivation:void 0,onDeactivation:void 0,scope:this.#s,serviceIdentifier:this.#a,type:W.ResolvedValue};return this.#t(r),new tS(r)}toFactory(e){let n={cache:{isRight:!1,value:void 0},factory:e,id:V(),isSatisfiedBy:tl.always,moduleId:this.#o,onActivation:void 0,onDeactivation:void 0,scope:X.Singleton,serviceIdentifier:this.#a,type:W.Factory};return this.#t(n),new tR(n)}toProvider(e){let n={cache:{isRight:!1,value:void 0},id:V(),isSatisfiedBy:tl.always,moduleId:this.#o,onActivation:void 0,onDeactivation:void 0,provider:e,scope:X.Singleton,serviceIdentifier:this.#a,type:W.Provider};return this.#t(n),new tR(n)}toService(e){let n={id:V(),isSatisfiedBy:tl.always,moduleId:this.#o,serviceIdentifier:this.#a,targetServiceIdentifier:e,type:W.ServiceRedirection};this.#t(n)}#i(e){return{arguments:(null!=e?e:[]).map(e=>{var n,r,i;return"object"!=typeof(i=e)||L.is(i)?{kind:b.singleInjection,name:void 0,optional:!1,tags:new Map,value:e}:{kind:!0===e.isMultiple?b.multipleInjection:b.singleInjection,name:e.name,optional:null!=(n=e.optional)&&n,tags:new Map((null!=(r=e.tags)?r:[]).map(e=>[e.key,e.value])),value:e.serviceIdentifier}})}}}class tw{#r;constructor(e){this.#r=e}getIdentifier(){return tu(this.#r)}onActivation(e){return this.#r.onActivation=e,new tO(this.#r)}onDeactivation(e){return this.#r.onDeactivation=e,new tO(this.#r)}}class tO{#r;constructor(e){this.#r=e}getIdentifier(){return tu(this.#r)}when(e){return this.#r.isSatisfiedBy=e,new tw(this.#r)}whenAnyAncestor(e){return this.when(td(e))}whenAnyAncestorIs(e){return this.when(td(th(e)))}whenAnyAncestorNamed(e){return this.when(td(tp(e)))}whenAnyAncestorTagged(e,n){return this.when(td(tf(e,n)))}whenDefault(){return this.when(tm)}whenNamed(e){return this.when(tp(e))}whenNoParent(e){return this.when(tv(e))}whenNoParentIs(e){return this.when(tv(th(e)))}whenNoParentNamed(e){return this.when(tv(tp(e)))}whenNoParentTagged(e,n){return this.when(tv(tf(e,n)))}whenParent(e){return this.when(ty(e))}whenParentIs(e){return this.when(ty(th(e)))}whenParentNamed(e){return this.when(ty(tp(e)))}whenParentTagged(e,n){return this.when(ty(tf(e,n)))}whenTagged(e,n){return this.when(tf(e,n))}whenNoAncestor(e){return this.when(tg(e))}whenNoAncestorIs(e){return this.when(tg(th(e)))}whenNoAncestorNamed(e){return this.when(tg(tp(e)))}whenNoAncestorTagged(e,n){return this.when(tg(tf(e,n)))}}class tR extends tO{#c;constructor(e){super(e),this.#c=new tw(e)}onActivation(e){return this.#c.onActivation(e)}onDeactivation(e){return this.#c.onDeactivation(e)}}class tS extends tR{#u;constructor(e){super(e),this.#u=new tb(e)}inRequestScope(){return this.#u.inRequestScope()}inSingletonScope(){return this.#u.inSingletonScope()}inTransientScope(){return this.#u.inTransientScope()}}let tE=Symbol.for("@inversifyjs/container/InversifyContainerError");class tT extends Error{constructor(e,n,r){super(n,r),this[tE]=!0,this.kind=e}static is(e){return"object"==typeof e&&null!==e&&!0===e[tE]}static isErrorOfKind(e,n){return tT.is(e)&&e.kind===n}}!function(e){e[e.invalidOperation=0]="invalidOperation"}(w||(w={}));class tM{#d;#s;#l;constructor(e,n,r){this.#d=e,this.#s=n,this.#l=r}bind(e){return new t_(e=>{this.#m(e)},void 0,this.#s,e)}isBound(e,n){let r=this.#l.bindingService.get(e);return this.#v(e,r,n)}isCurrentBound(e,n){let r=this.#l.bindingService.getNonParentBindings(e);return this.#v(e,r,n)}async rebind(e){return await this.unbind(e),this.bind(e)}rebindSync(e){return this.unbindSync(e),this.bind(e)}async unbind(e){await this.#f(e)}async unbindAll(){let e=[...this.#l.bindingService.getNonParentBoundServices()];for(let n of(await Promise.all(e.map(async e=>to(this.#d,e))),e))this.#l.activationService.removeAllByServiceId(n),this.#l.bindingService.removeAllByServiceId(n),this.#l.deactivationService.removeAllByServiceId(n);this.#l.planResultCacheService.clearCache()}unbindSync(e){void 0!==this.#f(e)&&this.#h(e)}#m(e){this.#l.bindingService.set(e),this.#l.planResultCacheService.clearCache()}#h(e){var n;let r;if(tc(e)){let i=this.#l.bindingService.getById(e.id),o=null==(n=function(e){if(void 0===e)return;let n=e.next();return!0!==n.done?n.value:void 0}(null==i?void 0:i[Symbol.iterator]()))?void 0:n.serviceIdentifier;r=void 0===o?"Unexpected asynchronous deactivation when unbinding binding identifier. Consider using Container.unbind() instead.":`Unexpected asynchronous deactivation when unbinding "${N(o)}" binding. Consider using Container.unbind() instead.`}else r=`Unexpected asynchronous deactivation when unbinding "${N(e)}" service. Consider using Container.unbind() instead.`;throw new tT(w.invalidOperation,r)}#f(e){return tc(e)?this.#O(e):this.#p(e)}#O(e){let n=this.#l.bindingService.getById(e.id),r=ti(this.#d,n);if(void 0!==r)return r.then(()=>{this.#R(e)});this.#R(e)}#R(e){this.#l.bindingService.removeById(e.id),this.#l.planResultCacheService.clearCache()}#p(e){let n=to(this.#d,e);if(void 0!==n)return n.then(()=>{this.#b(e)});this.#b(e)}#b(e){this.#l.activationService.removeAllByServiceId(e),this.#l.bindingService.removeAllByServiceId(e),this.#l.deactivationService.removeAllByServiceId(e),this.#l.planResultCacheService.clearCache()}#v(e,n,r){if(void 0===n)return!1;let i={getAncestor:()=>{},name:null==r?void 0:r.name,serviceIdentifier:e,tags:new Map};for(let e of(void 0!==(null==r?void 0:r.tag)&&i.tags.set(r.tag.key,r.tag.value),n))if(e.isSatisfiedBy(i))return!0;return!1}}class tx{#y;#d;#s;#l;constructor(e,n,r,i){this.#y=e,this.#d=n,this.#s=r,this.#l=i}async load(){for(var e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];await Promise.all(this.#n(...n))}loadSync(){for(var e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];for(let e of this.#n(...n))if(void 0!==e)throw new tT(w.invalidOperation,"Unexpected asynchronous module load. Consider using Container.load() instead.")}async unload(){for(var e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];await Promise.all(this.#E(...n)),this.#w(n)}unloadSync(){for(var e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];for(let e of this.#E(...n))if(void 0!==e)throw new tT(w.invalidOperation,"Unexpected asynchronous module unload. Consider using Container.unload() instead.");this.#w(n)}#g(e){return{bind:n=>new t_(e=>{this.#m(e)},e,this.#s,n),isBound:this.#y.isBound.bind(this.#y),onActivation:(n,r)=>{this.#l.activationService.add(r,{moduleId:e,serviceId:n})},onDeactivation:(n,r)=>{this.#l.deactivationService.add(r,{moduleId:e,serviceId:n})},rebind:this.#y.rebind.bind(this.#y),rebindSync:this.#y.rebindSync.bind(this.#y),unbind:this.#y.unbind.bind(this.#y),unbindSync:this.#y.unbindSync.bind(this.#y)}}#w(e){for(let n of e)this.#l.activationService.removeAllByModuleId(n.id),this.#l.bindingService.removeAllByModuleId(n.id),this.#l.deactivationService.removeAllByModuleId(n.id);this.#l.planResultCacheService.clearCache()}#n(){for(var e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];return n.map(e=>e.load(this.#g(e.id)))}#m(e){this.#l.bindingService.set(e),this.#l.planResultCacheService.clearCache()}#E(){for(var e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];return n.map(e=>(function(e,n){let r=e.getBindingsFromModule(n);return ti(e,r)})(this.#d,e.id))}}class tC{#_;#M;#B;#l;constructor(e,n,r){this.#l=n,this.#B=r,this.#_=this.#x(e),this.#M=this.#C()}register(e,n){let r=new n(e,this.#M);if(!0!==r[ts])throw new tT(w.invalidOperation,"Invalid plugin. The plugin must extend the Plugin class");r.load(this.#_)}#x(e){return{define:(n,r)=>{if(Object.prototype.hasOwnProperty.call(e,n))throw new tT(w.invalidOperation,`Container already has a method named "${String(n)}"`);e[n]=r},onPlan:this.#B.onPlan.bind(this.#B)}}#C(){let e=this.#l;return{get activationService(){return e.activationService},get bindingService(){return e.bindingService},get deactivationService(){return e.deactivationService},get planResultCacheService(){return e.planResultCacheService}}}}class tI{#j;constructor(e,n,r,i){this.activationService=e,this.bindingService=n,this.deactivationService=r,this.planResultCacheService=i,this.#j=[]}reset(e,n,r){for(let i of(this.activationService=e,this.bindingService=n,this.deactivationService=r,this.planResultCacheService.clearCache(),this.#j))i()}onReset(e){this.#j.push(e)}}class tj{#P;#s;#N;#D;#L;#F;#l;#S;constructor(e,n,r){this.#l=e,this.#L=this.#A(),this.#P=n,this.#s=r,this.#N=e=>this.#l.activationService.get(e),this.#D=this.#l.bindingService.get.bind(this.#l.bindingService),this.#F=[],this.#S=this.#m.bind(this),this.#l.onReset(()=>{this.#T()})}get(e,n){let r=this.#U(!1,e,n),i=this.#q(r);if(P(i))throw new tT(w.invalidOperation,`Unexpected asynchronous service when resolving service "${N(e)}"`);return i}getAll(e,n){let r=this.#U(!0,e,n),i=this.#q(r);if(P(i))throw new tT(w.invalidOperation,`Unexpected asynchronous service when resolving service "${N(e)}"`);return i}async getAllAsync(e,n){let r=this.#U(!0,e,n);return this.#q(r)}async getAsync(e,n){let r=this.#U(!1,e,n);return this.#q(r)}onPlan(e){this.#F.push(e)}#T(){this.#D=this.#l.bindingService.get.bind(this.#l.bindingService),this.#S=this.#m.bind(this),this.#L=this.#A()}#H(e,n,r){return{isMultiple:e,name:null==r?void 0:r.name,optional:null==r?void 0:r.optional,serviceIdentifier:n,tag:null==r?void 0:r.tag}}#V(e,n,r){var i;let o={autobindOptions:(null!=(i=null==r?void 0:r.autobind)?i:this.#P)?{scope:this.#s}:void 0,getBindings:this.#D,getClassMetadata:eo,rootConstraints:{isMultiple:n,serviceIdentifier:e},servicesBranch:[],setBinding:this.#S};return this.#I(o,r),o}#U(e,n,r){let i=this.#H(e,n,r),o=this.#l.planResultCacheService.get(i);if(void 0!==o)return o;let s=function(e){try{let r=new Map;void 0!==e.rootConstraints.tag&&r.set(e.rootConstraints.tag.key,e.rootConstraints.tag.value);let i=new eM({elem:{name:e.rootConstraints.name,serviceIdentifier:e.rootConstraints.serviceIdentifier,tags:r},previous:void 0}),o=new eT(i.last),s=ex(e,o),a=[],c={bindings:a,parent:void 0,serviceIdentifier:e.rootConstraints.serviceIdentifier};if(a.push(...eN(e,i,s,c)),!e.rootConstraints.isMultiple){var n;eB(c,null!=(n=e.rootConstraints.isOptional)&&n,o);let[r]=a;c.bindings=r}return{tree:{root:c}}}catch(n){var r,i=e,o=n;if((r=o)instanceof Error&&(r instanceof RangeError&&/stack space|call stack|too much recursion/i.test(r.message)||"InternalError"===r.name&&/too much recursion/.test(r.message))){let e=function(e){let n=[...e];return 0===n.length?"(No dependency trace)":n.map(N).join(" -> ")}(function(e){let n=new Set;for(let r of e.servicesBranch){if(n.has(r))return[...n,r];n.add(r)}return[...n]}(i));throw new ei(m.planning,`Circular dependency found: ${e}`,{cause:o})}throw o}}(this.#V(n,e,r));for(let e of(this.#l.planResultCacheService.set(i,s),this.#F))e(i,s);return s}#A(){return{get:this.get.bind(this),getAll:this.getAll.bind(this),getAllAsync:this.getAllAsync.bind(this),getAsync:this.getAsync.bind(this)}}#q(e){var n;return e9(n={context:this.#L,getActivations:this.#N,planResult:e,requestScopeCache:new Map},n.planResult.tree.root)}#I(e,n){void 0!==n&&(void 0!==n.name&&(e.rootConstraints.name=n.name),!0===n.optional&&(e.rootConstraints.isOptional=!0),void 0!==n.tag&&(e.rootConstraints.tag={key:n.tag.key,value:n.tag.value}))}#m(e){this.#l.bindingService.set(e),this.#l.planResultCacheService.clearCache()}}class tA{#l;#X;constructor(e){this.#l=e,this.#X=[]}restore(){let e=this.#X.pop();if(void 0===e)throw new tT(w.invalidOperation,"No snapshot available to restore");this.#l.reset(e.activationService,e.bindingService,e.deactivationService)}snapshot(){this.#X.push({activationService:this.#l.activationService.clone(),bindingService:this.#l.bindingService.clone(),deactivationService:this.#l.deactivationService.clone()})}}let tk=X.Transient;class tB{#y;#W;#k;#l;#B;#$;constructor(e){var n,r,i;this.#l=this.#z(e);let o=null!=(n=null==e?void 0:e.autobind)&&n,s=null!=(r=null==e?void 0:e.defaultScope)?r:tk,a={getBindings:(i=this.#l).bindingService.get.bind(i.bindingService),getBindingsFromModule:i.bindingService.getByModuleId.bind(i.bindingService),getClassMetadata:eo,getDeactivations:i.deactivationService.get.bind(i.deactivationService)};this.#y=new tM(a,s,this.#l),this.#W=new tx(this.#y,a,s,this.#l),this.#B=new tj(this.#l,o,s),this.#k=new tC(this,this.#l,this.#B),this.#$=new tA(this.#l)}bind(e){return this.#y.bind(e)}get(e,n){return this.#B.get(e,n)}getAll(e,n){return this.#B.getAll(e,n)}async getAllAsync(e,n){return this.#B.getAllAsync(e,n)}async getAsync(e,n){return this.#B.getAsync(e,n)}isBound(e,n){return this.#y.isBound(e,n)}isCurrentBound(e,n){return this.#y.isCurrentBound(e,n)}async load(){for(var e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];return this.#W.load(...n)}loadSync(){for(var e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];this.#W.loadSync(...n)}onActivation(e,n){this.#l.activationService.add(n,{serviceId:e})}onDeactivation(e,n){this.#l.deactivationService.add(n,{serviceId:e})}register(e){this.#k.register(this,e)}restore(){this.#$.restore()}async rebind(e){return this.#y.rebind(e)}rebindSync(e){return this.#y.rebindSync(e)}snapshot(){this.#$.snapshot()}async unbind(e){await this.#y.unbind(e)}async unbindAll(){return this.#y.unbindAll()}unbindSync(e){this.#y.unbindSync(e)}async unload(){for(var e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];return this.#W.unload(...n)}unloadSync(){for(var e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];this.#W.unloadSync(...n)}#z(e){if(void 0===(null==e?void 0:e.parent))return new tI(G.build(void 0),Q.build(void 0),J.build(void 0),new eF);let n=new eF;return e.parent.#l.planResultCacheService.subscribe(n),new tI(G.build(e.parent.#l.activationService),Q.build(e.parent.#l.bindingService),J.build(e.parent.#l.deactivationService),n)}}let tP=new WeakMap,tN=new WeakMap,tD=new WeakMap,tL=Symbol("anyProducer"),tF=Promise.resolve(),tU=Symbol("listenerAdded"),tq=Symbol("listenerRemoved"),tH=!1,tV=!1,tX=e=>"string"==typeof e||"symbol"==typeof e||"number"==typeof e;function tW(e){if(!tX(e))throw TypeError("`eventName` must be a string, symbol, or number")}function t$(e){if("function"!=typeof e)throw TypeError("listener must be a function")}function tz(e,n){let r=tN.get(e);if(r.has(n))return r.get(n)}function tG(e,n){let r=tX(n)?n:tL,i=tD.get(e);if(i.has(r))return i.get(r)}function tK(e,n){n=Array.isArray(n)?n:[n];let r=!1,i=()=>{},o=[],s={enqueue(e){o.push(e),i()},finish(){r=!0,i()}};for(let r of n){let n=tG(e,r);n||(n=new Set,tD.get(e).set(r,n)),n.add(s)}return{async next(){return o?0===o.length?(r?o=void 0:await new Promise(e=>{i=e}),this.next()):{done:!1,value:await o.shift()}:{done:!0}},async return(r){for(let r of(o=void 0,n)){let n=tG(e,r);n&&(n.delete(s),0===n.size&&tD.get(e).delete(r))}return i(),arguments.length>0?{done:!0,value:await r}:{done:!0}},[Symbol.asyncIterator](){return this}}}function tY(e){if(void 0===e)return t0;if(!Array.isArray(e))throw TypeError("`methodNames` must be an array of strings");for(let n of e)if(!t0.includes(n)){if("string"!=typeof n)throw TypeError("`methodNames` element must be a string");throw Error(`${n} is not Emittery method`)}return e}let tQ=e=>e===tU||e===tq;function tJ(e,n,r){if(tQ(n))try{tH=!0,e.emit(n,r)}finally{tH=!1}}class tZ{static mixin(e,n){return n=tY(n),r=>{if("function"!=typeof r)throw TypeError("`target` must be function");for(let e of n)if(void 0!==r.prototype[e])throw Error(`The property \`${e}\` already exists on \`target\``);Object.defineProperty(r.prototype,e,{enumerable:!1,get:function(){return Object.defineProperty(this,e,{enumerable:!1,value:new tZ}),this[e]}});let i=n=>function(){for(var r=arguments.length,i=Array(r),o=0;o<r;o++)i[o]=arguments[o];return this[e][n](...i)};for(let e of n)Object.defineProperty(r.prototype,e,{enumerable:!1,value:i(e)});return r}}static get isDebugEnabled(){var e,n;if("object"!=typeof(null==(e=globalThis.process)?void 0:e.env))return tV;let{env:r}=null!=(n=globalThis.process)?n:{env:{}};return"emittery"===r.DEBUG||"*"===r.DEBUG||tV}static set isDebugEnabled(e){tV=e}constructor(e={}){var n;tP.set(this,new Set),tN.set(this,new Map),tD.set(this,new Map),tD.get(this).set(tL,new Set),this.debug=null!=(n=e.debug)?n:{},void 0===this.debug.enabled&&(this.debug.enabled=!1),this.debug.logger||(this.debug.logger=(e,n,r,i)=>{try{i=JSON.stringify(i)}catch{i=`Object with the following keys failed to stringify: ${Object.keys(i).join(",")}`}("symbol"==typeof r||"number"==typeof r)&&(r=r.toString());let o=new Date,s=`${o.getHours()}:${o.getMinutes()}:${o.getSeconds()}.${o.getMilliseconds()}`;console.log(`[${s}][emittery:${e}][${n}] Event Name: ${r}
44
+ data: ${i}`)})}logIfDebugEnabled(e,n,r){(tZ.isDebugEnabled||this.debug.enabled)&&this.debug.logger(e,this.debug.name,n,r)}on(e,n){let{signal:r}=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};for(let r of(t$(n),e=Array.isArray(e)?e:[e])){tW(r);let e=tz(this,r);e||(e=new Set,tN.get(this).set(r,e)),e.add(n),this.logIfDebugEnabled("subscribe",r,void 0),tQ(r)||tJ(this,tU,{eventName:r,listener:n})}let i=()=>{this.off(e,n),null==r||r.removeEventListener("abort",i)};return null==r||r.addEventListener("abort",i,{once:!0}),(null==r?void 0:r.aborted)&&i(),i}off(e,n){for(let r of(t$(n),e=Array.isArray(e)?e:[e])){tW(r);let e=tz(this,r);e&&(e.delete(n),0===e.size&&tN.get(this).delete(r)),this.logIfDebugEnabled("unsubscribe",r,void 0),tQ(r)||tJ(this,tq,{eventName:r,listener:n})}}once(e,n){let r;if(void 0!==n&&"function"!=typeof n)throw TypeError("predicate must be a function");let i=new Promise(i=>{r=this.on(e,e=>{(!n||n(e))&&(r(),i(e))})});return i.off=r,i}events(e){for(let n of e=Array.isArray(e)?e:[e])tW(n);return tK(this,e)}async emit(e,n){if(tW(e),tQ(e)&&!tH)throw TypeError("`eventName` cannot be meta event `listenerAdded` or `listenerRemoved`");this.logIfDebugEnabled("emit",e,n);var r,i=this,o=e,s=n;let a=tD.get(i);if(a.has(o))for(let e of a.get(o))e.enqueue(s);if(a.has(tL)){let e=Promise.all([o,s]);for(let n of a.get(tL))n.enqueue(e)}let c=null!=(r=tz(this,e))?r:new Set,l=tP.get(this),u=[...c],d=tQ(e)?[]:[...l];await tF,await Promise.all([...u.map(async e=>{if(c.has(e))return e(n)}),...d.map(async r=>{if(l.has(r))return r(e,n)})])}async emitSerial(e,n){var r;if(tW(e),tQ(e)&&!tH)throw TypeError("`eventName` cannot be meta event `listenerAdded` or `listenerRemoved`");this.logIfDebugEnabled("emitSerial",e,n);let i=null!=(r=tz(this,e))?r:new Set,o=tP.get(this),s=[...i],a=[...o];for(let e of(await tF,s))i.has(e)&&await e(n);for(let r of a)o.has(r)&&await r(e,n)}onAny(e){let{signal:n}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t$(e),this.logIfDebugEnabled("subscribeAny",void 0,void 0),tP.get(this).add(e),tJ(this,tU,{listener:e});let r=()=>{this.offAny(e),null==n||n.removeEventListener("abort",r)};return null==n||n.addEventListener("abort",r,{once:!0}),(null==n?void 0:n.aborted)&&r(),r}anyEvent(){return tK(this)}offAny(e){t$(e),this.logIfDebugEnabled("unsubscribeAny",void 0,void 0),tJ(this,tq,{listener:e}),tP.get(this).delete(e)}clearListeners(e){for(let n of e=Array.isArray(e)?e:[e])if(this.logIfDebugEnabled("clear",n,void 0),tX(n)){let e=tz(this,n);e&&e.clear();let r=tG(this,n);if(r){for(let e of r)e.finish();r.clear()}}else{for(let[e,n]of(tP.get(this).clear(),tN.get(this).entries()))n.clear(),tN.get(this).delete(e);for(let[e,n]of tD.get(this).entries()){for(let e of n)e.finish();n.clear(),tD.get(this).delete(e)}}}listenerCount(e){e=Array.isArray(e)?e:[e];let n=0;for(let l of e){if(tX(l)){var r,i,o,s,a,c;n+=tP.get(this).size+(null!=(s=null==(r=tz(this,l))?void 0:r.size)?s:0)+(null!=(a=null==(i=tG(this,l))?void 0:i.size)?a:0)+(null!=(c=null==(o=tG(this))?void 0:o.size)?c:0);continue}for(let e of(void 0!==l&&tW(l),n+=tP.get(this).size,tN.get(this).values()))n+=e.size;for(let e of tD.get(this).values())n+=e.size}return n}bindMethods(e,n){if("object"!=typeof e||null===e)throw TypeError("`target` must be an object");for(let r of n=tY(n)){if(void 0!==e[r])throw Error(`The property \`${r}\` already exists on \`target\``);Object.defineProperty(e,r,{enumerable:!1,value:this[r].bind(this)})}}}let t0=Object.getOwnPropertyNames(tZ.prototype).filter(e=>"constructor"!==e);Object.defineProperty(tZ,"listenerAdded",{value:tU,writable:!1,enumerable:!0,configurable:!1}),Object.defineProperty(tZ,"listenerRemoved",{value:tq,writable:!1,enumerable:!0,configurable:!1});let t1={AaaSPilotKitController:Symbol.for("AaaSPilotKitController"),SignalingService:Symbol.for("SignalingService"),ASRService:Symbol.for("ASRService"),AgentService:Symbol.for("AgentService"),DigitalHumanService:Symbol.for("DigitalHumanService"),ConversationService:Symbol.for("ConversationService"),CommonRequest:Symbol.for("CommonRequest"),ErrorManager:Symbol.for("ErrorManager"),IOptions:Symbol.for("IOptions")};class t2 extends Error{constructor(e,n,r){let i=e.status||0===e.status?e.status:"",o=e.statusText||"",s=`${i} ${o}`.trim();super(`Request failed with ${s?`status code ${s}`:"an unknown error"}: ${n.method} ${n.url}`),this.name="HTTPError",this.response=e,this.request=n,this.options=r}}class t3 extends Error{constructor(e){super(`Request timed out: ${e.method} ${e.url}`),this.name="TimeoutError",this.request=e}}__webpack_require__("../../node_modules/core-js/modules/es.typed-array.set.js");let t6=(()=>{let e=!1,n=!1,r="function"==typeof globalThis.Request;if("function"==typeof globalThis.ReadableStream&&r)try{n=new globalThis.Request("https://empty.invalid",{body:new globalThis.ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type")}catch(e){if(e instanceof Error&&"unsupported BodyInit type"===e.message)return!1;throw e}return e&&!n})(),t5="function"==typeof globalThis.AbortController,t4="function"==typeof globalThis.ReadableStream,t8="function"==typeof globalThis.FormData,t9=["get","post","put","patch","head","delete"],t7={json:"application/json",text:"text/*",formData:"multipart/form-data",arrayBuffer:"*/*",blob:"*/*"},ne=new TextEncoder().encode("------WebKitFormBoundaryaxpyiPgbbPti10Rw").length,nt=Symbol("stop"),nn={json:!0,parseJson:!0,stringifyJson:!0,searchParams:!0,prefixUrl:!0,retry:!0,timeout:!0,hooks:!0,throwHttpErrors:!0,onDownloadProgress:!0,onUploadProgress:!0,fetch:!0},nr={method:!0,headers:!0,body:!0,mode:!0,credentials:!0,cache:!0,redirect:!0,referrer:!0,referrerPolicy:!0,integrity:!0,keepalive:!0,signal:!0,window:!0,dispatcher:!0,duplex:!0,priority:!0},ni=e=>{if(!e)return 0;if(e instanceof FormData){let n=0;for(let[r,i]of e)n+=ne,n+=new TextEncoder().encode(`Content-Disposition: form-data; name="${r}"`).length,n+="string"==typeof i?new TextEncoder().encode(i).length:i.size;return n}if(e instanceof Blob)return e.size;if(e instanceof ArrayBuffer)return e.byteLength;if("string"==typeof e)return new TextEncoder().encode(e).length;if(e instanceof URLSearchParams)return new TextEncoder().encode(e.toString()).length;if("byteLength"in e)return e.byteLength;if("object"==typeof e&&null!==e)try{let n=JSON.stringify(e);return new TextEncoder().encode(n).length}catch{}return 0},no=(e,n)=>{let r=Number(e.headers.get("content-length"))||0,i=0;return 204===e.status?(n&&n({percent:1,totalBytes:r,transferredBytes:i},new Uint8Array),new Response(null,{status:e.status,statusText:e.statusText,headers:e.headers})):new Response(new ReadableStream({async start(o){let s=e.body.getReader();async function a(){let{done:e,value:c}=await s.read();if(e)return void o.close();n&&(i+=c.byteLength,n({percent:0===r?0:i/r,transferredBytes:i,totalBytes:r},c)),o.enqueue(c),await a()}n&&n({percent:0,transferredBytes:0,totalBytes:r},new Uint8Array),await a()}}),{status:e.status,statusText:e.statusText,headers:e.headers})},ns=(e,n)=>{let r=ni(e.body),i=0;return new Request(e,{duplex:"half",body:new ReadableStream({async start(o){let s=e.body instanceof ReadableStream?e.body.getReader():new Response("").body.getReader();async function a(){let{done:e,value:c}=await s.read();if(e){n&&n({percent:1,transferredBytes:i,totalBytes:Math.max(r,i)},new Uint8Array),o.close();return}i+=c.byteLength;let l=0===r?0:i/r;(r<i||1===l)&&(l=.99),n&&n({percent:Number(l.toFixed(2)),transferredBytes:i,totalBytes:r},c),o.enqueue(c),await a()}await a()}})})},na=e=>null!==e&&"object"==typeof e,nc=function(){for(var e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];for(let e of n)if((!na(e)||Array.isArray(e))&&void 0!==e)throw TypeError("The `options` argument must be an object");return np({},...n)},nl=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=new globalThis.Headers(e),i=n instanceof globalThis.Headers;for(let[e,o]of new globalThis.Headers(n).entries())i&&"undefined"===o||void 0===o?r.delete(e):r.set(e,o);return r};function nu(e,n,r){var i,o;return Object.hasOwn(n,r)&&void 0===n[r]?[]:np(null!=(i=e[r])?i:[],null!=(o=n[r])?o:[])}let nd=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return{beforeRequest:nu(e,n,"beforeRequest"),beforeRetry:nu(e,n,"beforeRetry"),afterResponse:nu(e,n,"afterResponse"),beforeError:nu(e,n,"beforeError")}},np=function(){for(var e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];let i={},o={},s={};for(let e of n)if(Array.isArray(e))Array.isArray(i)||(i=[]),i=[...i,...e];else if(na(e)){for(let[n,r]of Object.entries(e))na(r)&&n in i&&(r=np(i[n],r)),i={...i,[n]:r};na(e.hooks)&&(s=nd(s,e.hooks),i.hooks=s),na(e.headers)&&(o=nl(o,e.headers),i.headers=o)}return i},nh=e=>t9.includes(e)?e.toUpperCase():e,nf={limit:2,methods:["get","put","head","delete","options","trace"],statusCodes:[408,413,429,500,502,503,504],afterStatusCodes:[413,429,503],maxRetryAfter:Number.POSITIVE_INFINITY,backoffLimit:Number.POSITIVE_INFINITY,delay:e=>.3*2**(e-1)*1e3},nm=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if("number"==typeof e)return{...nf,limit:e};if(e.methods&&!Array.isArray(e.methods))throw Error("retry.methods must be an array");if(e.statusCodes&&!Array.isArray(e.statusCodes))throw Error("retry.statusCodes must be an array");return{...nf,...e}};async function ng(e,n,r,i){return new Promise((o,s)=>{let a=setTimeout(()=>{r&&r.abort(),s(new t3(e))},i.timeout);i.fetch(e,n).then(o).catch(s).then(()=>{clearTimeout(a)})})}async function nv(e,n){let{signal:r}=n;return new Promise((n,i)=>{function o(){clearTimeout(s),i(r.reason)}r&&(r.throwIfAborted(),r.addEventListener("abort",o,{once:!0}));let s=setTimeout(()=>{null==r||r.removeEventListener("abort",o),n()},e)})}let ny=(e,n)=>{let r={};for(let i in n)i in nr||i in nn||i in e||(r[i]=n[i]);return r};class nb{static create(e,n){let r=new nb(e,n),i=async()=>{if("number"==typeof r._options.timeout&&r._options.timeout>0x7fffffff)throw RangeError("The `timeout` option cannot be greater than 2147483647");await Promise.resolve();let e=await r._fetch();for(let n of r._options.hooks.afterResponse){let i=await n(r.request,r._options,r._decorateResponse(e.clone()));i instanceof globalThis.Response&&(e=i)}if(r._decorateResponse(e),!e.ok&&r._options.throwHttpErrors){let n=new t2(e,r.request,r._options);for(let e of r._options.hooks.beforeError)n=await e(n);throw n}if(r._options.onDownloadProgress){if("function"!=typeof r._options.onDownloadProgress)throw TypeError("The `onDownloadProgress` option must be a function");if(!t4)throw Error("Streams are not supported in your environment. `ReadableStream` is missing.");return no(e.clone(),r._options.onDownloadProgress)}return e},o=(r._options.retry.methods.includes(r.request.method.toLowerCase())?r._retry(i):i()).finally(async()=>{if(!r.request.bodyUsed){var e;await (null==(e=r.request.body)?void 0:e.cancel())}});for(let[e,i]of Object.entries(t7))o[e]=async()=>{r.request.headers.set("accept",r.request.headers.get("accept")||i);let s=await o;if("json"===e){if(204===s.status||0===(await s.clone().arrayBuffer()).byteLength)return"";if(n.parseJson)return n.parseJson(await s.text())}return s[e]()};return o}constructor(e,n={}){var r,i,o,s,a,c,l,u,d;if(this._retryCount=0,this._input=e,this._options={...n,headers:nl(this._input.headers,n.headers),hooks:nd({beforeRequest:[],beforeRetry:[],beforeError:[],afterResponse:[]},n.hooks),method:nh(null!=(i=null!=(r=n.method)?r:this._input.method)?i:"GET"),prefixUrl:String(n.prefixUrl||""),retry:nm(n.retry),throwHttpErrors:!1!==n.throwHttpErrors,timeout:null!=(o=n.timeout)?o:1e4,fetch:null!=(s=n.fetch)?s:globalThis.fetch.bind(globalThis)},"string"!=typeof this._input&&!(this._input instanceof URL||this._input instanceof globalThis.Request))throw TypeError("`input` must be a string, URL, or Request");if(this._options.prefixUrl&&"string"==typeof this._input){if(this._input.startsWith("/"))throw Error("`input` must not begin with a slash when using `prefixUrl`");this._options.prefixUrl.endsWith("/")||(this._options.prefixUrl+="/"),this._input=this._options.prefixUrl+this._input}if(t5){let e=null!=(a=this._options.signal)?a:this._input.signal;this.abortController=new globalThis.AbortController,this._options.signal=e?AbortSignal.any([e,this.abortController.signal]):this.abortController.signal}if(t6&&(this._options.duplex="half"),void 0!==this._options.json&&(this._options.body=null!=(u=null==(c=(l=this._options).stringifyJson)?void 0:c.call(l,this._options.json))?u:JSON.stringify(this._options.json),this._options.headers.set("content-type",null!=(d=this._options.headers.get("content-type"))?d:"application/json")),this.request=new globalThis.Request(this._input,this._options),this._options.searchParams){let e="string"==typeof this._options.searchParams?this._options.searchParams.replace(/^\?/,""):new URLSearchParams(this._options.searchParams).toString(),n=this.request.url.replace(/(?:\?.*?)?(?=#|$)/,"?"+e);(t8&&this._options.body instanceof globalThis.FormData||this._options.body instanceof URLSearchParams)&&!(this._options.headers&&this._options.headers["content-type"])&&this.request.headers.delete("content-type"),this.request=new globalThis.Request(new globalThis.Request(n,{...this.request}),this._options)}if(this._options.onUploadProgress){if("function"!=typeof this._options.onUploadProgress)throw TypeError("The `onUploadProgress` option must be a function");if(!t6)throw Error("Request streams are not supported in your environment. The `duplex` option for `Request` is not available.");this.request.body&&(this.request=ns(this.request,this._options.onUploadProgress))}}_calculateRetryDelay(e){if(this._retryCount++,this._retryCount>this._options.retry.limit||e instanceof t3)throw e;if(e instanceof t2){var n,r,i,o;if(!this._options.retry.statusCodes.includes(e.response.status))throw e;let s=null!=(i=null!=(r=null!=(n=e.response.headers.get("Retry-After"))?n:e.response.headers.get("RateLimit-Reset"))?r:e.response.headers.get("X-RateLimit-Reset"))?i:e.response.headers.get("X-Rate-Limit-Reset");if(s&&this._options.retry.afterStatusCodes.includes(e.response.status)){let e=1e3*Number(s);Number.isNaN(e)?e=Date.parse(s)-Date.now():e>=Date.parse("2024-01-01")&&(e-=Date.now());let n=null!=(o=this._options.retry.maxRetryAfter)?o:e;return e<n?e:n}if(413===e.response.status)throw e}let s=this._options.retry.delay(this._retryCount);return Math.min(this._options.retry.backoffLimit,s)}_decorateResponse(e){return this._options.parseJson&&(e.json=async()=>this._options.parseJson(await e.text())),e}async _retry(e){try{return await e()}catch(r){let n=Math.min(this._calculateRetryDelay(r),0x7fffffff);if(this._retryCount<1)throw r;for(let e of(await nv(n,{signal:this._options.signal}),this._options.hooks.beforeRetry))if(await e({request:this.request,options:this._options,error:r,retryCount:this._retryCount})===nt)return;return this._retry(e)}}async _fetch(){for(let e of this._options.hooks.beforeRequest){let n=await e(this.request,this._options);if(n instanceof Request){this.request=n;break}if(n instanceof Response)return n}let e=ny(this.request,this._options),n=this.request;return(this.request=n.clone(),!1===this._options.timeout)?this._options.fetch(n,e):ng(n,e,this.abortController,this._options)}}let n_=e=>{let n=(n,r)=>nb.create(n,nc(e,r));for(let r of t9)n[r]=(n,i)=>nb.create(n,nc(e,i,{method:r}));return n.create=e=>n_(nc(e)),n.extend=n=>("function"==typeof n&&(n=n(null!=e?e:{})),n_(nc(e,n))),n.stop=nt,n},nw=n_();function nO(e,n){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,n)}function nR(e,n){return function(r,i){n(r,i,e)}}class nS{static #k=this.ONLINE_HOST="https://ky.cloud.baidu.com";static #G=this.SANDBOX_HOST="https://ky-test.cloud.baidu.com";constructor(e){this.opts=e,"production"===this.opts.env?this.client=nw.create({prefixUrl:nS.ONLINE_HOST}):this.client=nw.create({prefixUrl:nS.SANDBOX_HOST})}}nS=function(e,n,r,i){var o,s=arguments.length,a=s<3?n:null===i?i=Object.getOwnPropertyDescriptor(n,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,n,r,i);else for(var c=e.length-1;c>=0;c--)(o=e[c])&&(a=(s<3?o(a):s>3?o(n,r,a):o(n,r))||a);return s>3&&a&&Object.defineProperty(n,r,a),a}([ey(),nR(0,em(t1.IOptions)),nR(0,eR()),nO("design:type",Function),nO("design:paramtypes",["undefined"==typeof IResolvedOptions?Object:IResolvedOptions])],nS);var nE=function(e){return e.NETWORK="NETWORK",e.TIMEOUT="TIMEOUT",e.AUTHENTICATION="AUTHENTICATION",e.AUTHORIZATION="AUTHORIZATION",e.RESOURCE="RESOURCE",e.CONFIGURATION="CONFIGURATION",e.PARSING="PARSING",e.SERVICE="SERVICE",e.VALIDATION="VALIDATION",e.INTERNAL="INTERNAL",e}({}),nT=function(e){return e.LOW="LOW",e.MEDIUM="MEDIUM",e.HIGH="HIGH",e.CRITICAL="CRITICAL",e}({});class nM extends Error{constructor(e,n,r,i=nT.MEDIUM,o={},s){super(n),this.name=this.constructor.name,this.code=e,this.category=r,this.severity=i,this.actionRequired=s,this.metadata={timestamp:Date.now(),stack:this.stack,...o},Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=Error(n).stack}static fromError(e,n,r){let i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:nT.MEDIUM;return new nM(n,e.message,r,i,{originalError:e,stack:e.stack})}toJSON(){return{code:this.code,message:this.message,category:this.category,severity:this.severity,metadata:this.metadata,actionRequired:this.actionRequired}}toString(){return`${this.name} [${this.code}]: ${this.message}`}}let nx={AGENT_QUERY_FAILED:"2001",AGENT_RESPONSE_PARSE_ERROR:"2002",AGENT_CONNECTION_FAILED:"2005",AGENT_INSTRUCTION_INVALID:"2006",ASR_INITIALIZATION_FAILED:"3001",ASR_STOP_FAILED:"3003",ASR_PERMISSION_DENIED:"3008",ASR_MESSAGE_PARSE_ERROR:"3010",ASR_MESSAGE_INTERVAL_TIMEOUT:"3013",ASR_RUNTIME_ERROR:"3014",DH_MOUNT_FAILED:"4001",DH_IFRAME_LOAD_ERROR:"4002",DH_RENDER_ERROR:"4003",DH_WEBSOCKET_ERROR:"4004",DH_RTC_ERROR:"4005",DH_AUTHENTICATION_ERROR:"4006",DH_RESOURCE_NOT_ENOUGH:"4008"},nC={1e3:"发生未知错误",1001:"网络连接错误",1002:"请求超时",1003:"配置无效",1004:"身份验证失败",1005:"权限验证失败",1006:"数据验证失败",1007:"资源未找到",1008:"资源不可用",1009:"内部错误",2001:"Agent查询失败",2002:"Agent响应解析错误",2003:"Agent请求超时",2004:"Agent响应无效",2005:"Agent连接失败",2006:"Agent指令无效",3001:"ASR初始化失败",3002:"ASR启动失败",3003:"ASR停止失败",3004:"ASR信令错误",3005:"ASR音频捕获错误",3006:"ASR识别错误",3007:"ASR网络错误",3008:"ASR权限被拒绝",3009:"ASR设备未找到",3010:"ASR消息解析错误",3011:"ASR会话无效",3012:"ASR静音失败",3013:"ASR消息间隔超时",3014:"ASR运行时错误",4001:"数字人挂载失败",4002:"数字人iframe加载错误",4003:"数字人渲染错误",4004:"数字人WebSocket错误",4005:"数字人RTC错误",4006:"数字人认证错误",4007:"数字人会话数量达到上限",4008:"数字人资源不足",4009:"数字人超时",4010:"数字人中断失败",4011:"数字人SSML解析错误",4012:"数字人形象ID无效",4013:"数字人token无效",4014:"数字人流式渲染错误",4015:"数字人控制器未就绪",4016:"数字人播报文本长度不匹配",5001:"会话创建失败",5002:"会话类型无效",5003:"会话快照无效",5004:"会话Bean未找到",5005:"会话序列化错误",5006:"会话反序列化错误",5007:"会话状态无效",5008:"会话清除失败"};class nI extends nM{constructor(e,n,r=nT.MEDIUM,i={},o){super(e,n||nC[e]||"Agent服务错误",nE.SERVICE,r,i,o)}}class nj extends nI{constructor(e,n={}){super(nx.AGENT_QUERY_FAILED,e,nT.HIGH,n)}}class nA extends nI{constructor(e,n={}){super(nx.AGENT_RESPONSE_PARSE_ERROR,e,nT.HIGH,n)}}class nk extends nI{constructor(e,n={}){super(nx.AGENT_CONNECTION_FAILED,e,nT.HIGH,n)}}class nB extends nI{constructor(e,n={}){super(nx.AGENT_INSTRUCTION_INVALID,e,nT.MEDIUM,n)}}var nP=__webpack_require__("../../node_modules/ua-parser-js/src/ua-parser.js"),nN=__webpack_require__.n(nP);let nD=()=>{let e=new(nN()),n=e.getBrowser(),r=e.getOS(),i=e.getDevice();return{userAgent:e.getUA(),browser:{name:n.name,version:n.version},os:{name:r.name,version:r.version},device:{type:i.type,vendor:i.vendor,model:i.model}}},nL=()=>{let e=new(nN()),n=e.getUA();return"WeChat"===e.getBrowser().name||/MicroMessenger/i.test(n)},nF=()=>"iOS"===new(nN())().getOS().name,nU=()=>{let e=new(nN()),n=e.getOS(),r=e.getDevice();return"Mac OS"===n.name&&"tablet"===r.type};class nq extends nM{constructor(e,n,r=nT.MEDIUM,i={}){super(e,n||nC[e]||"ASR服务错误",nE.SERVICE,r,i)}}class nH extends nq{constructor(e,n={}){super(nx.ASR_INITIALIZATION_FAILED,e,nT.HIGH,n)}}class nV extends nq{constructor(e,n={}){super(nx.ASR_STOP_FAILED,e,nT.MEDIUM,n)}}class nX extends nq{constructor(e,n={}){super(nx.ASR_PERMISSION_DENIED,e,nT.MEDIUM,{...n,context:{...n.context,browserInfo:nD()}})}}class nW extends nq{constructor(e,n={}){super(nx.ASR_MESSAGE_PARSE_ERROR,e,nT.MEDIUM,n)}}class n$ extends nq{constructor(e,n={}){super(nx.ASR_MESSAGE_INTERVAL_TIMEOUT,e,nT.MEDIUM,n)}}class nz extends nq{constructor(e,n={}){super(nx.ASR_RUNTIME_ERROR,e,nT.HIGH,n)}}class nG extends nM{constructor(e,n,r=nT.MEDIUM,i={}){super(e,n||nC[e]||"数字人服务错误",nE.SERVICE,r,i)}}class nK extends nG{constructor(e,n={}){super(nx.DH_MOUNT_FAILED,e,nT.HIGH,n)}}class nY extends nG{constructor(e,n={}){super(nx.DH_IFRAME_LOAD_ERROR,e,nT.HIGH,n)}}class nQ extends nG{constructor(e,n={}){super(nx.DH_RENDER_ERROR,e,nT.MEDIUM,n)}}class nJ extends nG{constructor(e,n={}){super(nx.DH_WEBSOCKET_ERROR,e,nT.HIGH,n)}}class nZ extends nG{constructor(e,n={}){super(nx.DH_RTC_ERROR,e,nT.HIGH,n)}}class n0 extends nG{constructor(e,n={}){super(nx.DH_AUTHENTICATION_ERROR,e,nT.CRITICAL,n)}}class n1 extends nG{constructor(e,n={}){super(nx.DH_RESOURCE_NOT_ENOUGH,e,nT.CRITICAL,n)}}class n2{constructor(e){this.opts=e,this.reporters=[]}addReporter(e){this.reporters.push(e)}removeReporter(e){let n=this.reporters.indexOf(e);n>-1&&this.reporters.splice(n,1)}async handle(e){let n;n=e instanceof nM?e.toJSON():this.isErrorDetails(e)?e:nM.fromError(e,"UNKNOWN_ERROR","INTERNAL").toJSON(),await this.processError(n)}async processError(e){try{this.shouldLogError()&&this.logError(e),this.shouldReportError(e)&&await this.reportError(e)}catch(e){console.error("Error in error handler:",e)}}shouldLogError(){var e;return(null==(e=this.opts)?void 0:e.enableErrorLogging)!==!1}shouldReportError(e){var n;return(null==(n=this.opts)?void 0:n.enableErrorReporting)!==!1&&e.severity!==nT.LOW&&this.reporters.length>0}logError(e){let n=this.getLogLevel(e.severity),r=`[${e.code}] ${e.message}`;"error"===n?console.error(r,e):"warn"===n?console.warn(r,e):console.log(r,e)}getLogLevel(e){switch(e){case nT.CRITICAL:case nT.HIGH:return"error";case nT.MEDIUM:return"warn";case nT.LOW:default:return"log"}}async reportError(e){let n=this.reporters.map(n=>n.report(e).catch(e=>{console.error("Error reporter failed:",e)}));await Promise.allSettled(n)}isErrorDetails(e){return e&&"object"==typeof e&&"code"in e&&"message"in e&&"category"in e&&"severity"in e}}class n3{async report(e){console.error("Error Report:",{code:e.code,message:e.message,category:e.category,severity:e.severity,timestamp:new Date(e.metadata.timestamp).toISOString(),sessionId:e.metadata.sessionId,requestId:e.metadata.requestId,context:e.metadata.context})}}class n6{constructor(e){this.options={timeout:5e3,headers:{"Content-Type":"application/json"},retryCount:3,retryDelay:1e3,...e}}async report(e){let n=this.buildPayload(e);for(let e=0;e<=this.options.retryCount;e++)try{await this.sendRequest(n);return}catch(n){if(e===this.options.retryCount)throw n;await this.delay(this.options.retryDelay*(e+1))}}buildPayload(e){return{error:{code:e.code,message:e.message,category:e.category,severity:e.severity,actionRequired:e.actionRequired},metadata:{timestamp:e.metadata.timestamp,sessionId:e.metadata.sessionId,requestId:e.metadata.requestId,userId:e.metadata.userId,context:e.metadata.context,userAgent:navigator.userAgent,url:window.location.href}}}async sendRequest(e){let n=new AbortController,r=setTimeout(()=>n.abort(),this.options.timeout);try{let r=await fetch(this.options.endpoint,{method:"POST",headers:this.options.headers,body:JSON.stringify(e),signal:n.signal});if(!r.ok)throw Error(`HTTP ${r.status}: ${r.statusText}`)}finally{clearTimeout(r)}}delay(e){return new Promise(n=>setTimeout(n,e))}}class n5{static getErrorSeverity(e){if(e instanceof nM)return e.severity;let n=e.message.toLowerCase();return n.includes("permission")||n.includes("unauthorized")||n.includes("forbidden")?nT.CRITICAL:n.includes("network")||n.includes("timeout")||n.includes("connection")?nT.HIGH:nT.MEDIUM}static shouldReport(e){return!(e instanceof nM)||e.severity!==nT.LOW}static extractMetadata(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r={timestamp:Date.now(),context:n,stack:e.stack};return e instanceof nM?{...r,...e.metadata}:r}static getActionRequired(e){if(e instanceof nM){var n;return null!=(n=e.actionRequired)?n:null}let r=e.message.toLowerCase();return r.includes("permission")||r.includes("unauthorized")?"请检查用户权限":r.includes("network")||r.includes("timeout")?"请检查网络连接后重试":r.includes("validation")||r.includes("invalid")?"请检查输入数据的格式和有效性":null}}class n4{constructor(){this.emitter=new tZ,this.emit=e=>{let n=this.transformErrorToPayload(e);this.emitter.emit("error",n)},this.on=e=>{this.emitter.on("error",e)},this.off=e=>{this.emitter.off("error",e)},this.clearListeners=()=>{this.emitter.clearListeners()},this.transformErrorToPayload=e=>{if(e instanceof nM){var n;return{code:e.code,message:e.toString(),stack:e.stack,actionRequired:null!=(n=e.actionRequired)?n:null,severity:e.severity,metadata:{timestamp:e.metadata.timestamp,sessionId:e.metadata.sessionId,requestId:e.metadata.requestId,userId:e.metadata.userId,context:e.metadata.context,service:this.extractServiceFromError(e)},originalError:e}}return{code:"UNKNOWN_ERROR",message:e.toString(),stack:e.stack,actionRequired:n5.getActionRequired(e),severity:n5.getErrorSeverity(e),metadata:{timestamp:Date.now(),context:{errorName:e.name}},originalError:e}},this.extractServiceFromError=e=>{let n=e.constructor.name.toLowerCase();return n.includes("agent")?"agent":n.includes("asr")?"asr":n.includes("digitalHuman")||n.includes("dh")?"digital-human":n.includes("conversation")?"conversation":"unknown"}}}class n8 extends Error{constructor(e,n,r={}){super(n),this.name=e||"AaaSPilotKitError",this.message=n,this.data=r,Error.captureStackTrace?Error.captureStackTrace(this,n8):this.stack=Error().stack||"",Object.setPrototypeOf(this,n8.prototype)}static createForMonitoring(e,n,r){return new n8(e,n,r)}getMonitoringData(){return{type:this.name,message:this.message,stack:this.stack,timestamp:Date.now(),...this.data}}getSimplifiedData(){return{type:this.name,message:this.message,userId:this.data.userId,sessionId:this.data.sessionId,page:this.data.page}}toString(){return this.message}toJSON(){return this.getMonitoringData()}}function n9(e,n){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,n)}function n7(e,n){return function(r,i){n(r,i,e)}}class re extends n4{constructor(e){super(),this.opts=e,this.handleError=async e=>{await this.errorHandler.handle(e),this.emit(e)},this.getErrorHandler=()=>this.errorHandler,this.getActionRequired=e=>n5.getActionRequired(e),this.createMonitoringError=e=>{var n,r;let i=this.buildEnhancedMessage(e),o={page:null==(n=e.metadata.context)?void 0:n.page,userId:e.metadata.userId,sessionId:e.metadata.sessionId,requestId:e.metadata.requestId,context:e.metadata.context,severity:e.severity,category:e.metadata.service||"unknown",code:e.code,originalMessage:null==(r=e.originalError)?void 0:r.message};return n8.createForMonitoring(e.code,i,o)},this.buildEnhancedMessage=e=>{let n=[],r=e.severity.toUpperCase();n.push(`[${r}]: ${e.message}`),e.metadata.service&&n.push(`category=${e.metadata.service}`);let i=new Date(e.metadata.timestamp||Date.now()),o=i.getFullYear()+"-"+String(i.getMonth()+1).padStart(2,"0")+"-"+String(i.getDate()).padStart(2,"0")+" "+String(i.getHours()).padStart(2,"0")+":"+String(i.getMinutes()).padStart(2,"0")+":"+String(i.getSeconds()).padStart(2,"0");if(n.push(`time=${o}`),e.metadata&&Object.keys(e.metadata).length>0){let r=this.stringifyMetadata(e.metadata);r&&"{}"!==r&&n.push(`metadata=${r}`)}return n.join(" | ")},this.stringifyMetadata=e=>{if(!e||"object"!=typeof e)return"{}";let n=new Set(["timestamp","stack"]),r={};for(let[i,o]of Object.entries(e))n.has(i)||null==o||(r[i]=o);try{return JSON.stringify(r)}catch{return"{}"}},this.initializeReporters=()=>{this.options.enableConsoleReporter&&this.errorHandler.addReporter(new n3),this.options.enableHttpReporter&&this.options.httpReporterEndpoint&&this.errorHandler.addReporter(new n6({endpoint:this.options.httpReporterEndpoint}))},this.options={enableConsoleReporter:this.opts.enableDebugMode,enableHttpReporter:!1,enableErrorLogging:this.opts.enableDebugMode,enableErrorReporting:!0},this.errorHandler=new n2(this.options),this.initializeReporters()}}function rt(e,n){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,n)}function rn(e,n){return function(r,i){n(r,i,e)}}re=function(e,n,r,i){var o,s=arguments.length,a=s<3?n:null===i?i=Object.getOwnPropertyDescriptor(n,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,n,r,i);else for(var c=e.length-1;c>=0;c--)(o=e[c])&&(a=(s<3?o(a):s>3?o(n,r,a):o(n,r))||a);return s>3&&a&&Object.defineProperty(n,r,a),a}([ey(),n7(0,em(t1.IOptions)),n7(0,eR()),n9("design:type",Function),n9("design:paramtypes",["undefined"==typeof IOptions?Object:IOptions])],re);class rr{constructor(e,n,r){this.request=e,this.errorManager=n,this.opts=r,this.emitter=new tZ,this.conversationSessionId="",this.abortController=null,this._queryId="",this._lastQueryId="",this.setSessionId=e=>{this.conversationSessionId=e},this.setQueryId=e=>{this._queryId=e},this.setLastQueryId=e=>{this._lastQueryId=e},this.abort=e=>{var n;null==(n=this.abortController)||n.abort(e),this.abortController&&(this.abortController=null)},this.checkIsRepeat=()=>{let e=!!this.lastQueryId&&this.lastQueryId===this.queryId;return e&&this.opts.enableDebugMode&&console.warn("重复的completed查询被忽略:",this.queryId),e},this.onData=e=>{this.emitter.emit("data",e)},this.onCompleted=e=>{this.emitter.emit("completed",e)},this.onHangup=e=>{this.emitter.emit("hangup",e)},this.onTimeout=e=>{this.emitter.emit("timeout",e)},this.onInstructionReceived=e=>{this.emitter.emit("instruction_received",e)},this.onUsageQuotaReached=e=>{this.emitter.emit("usage_quota_reached",e)},this.onQuotaExpired=e=>{this.emitter.emit("quota_expired",e)},this._dispose=()=>{this.abort(),this.conversationSessionId="",this._queryId="",this._lastQueryId=""}}get sessionId(){return this.conversationSessionId}get queryId(){return this._queryId}get lastQueryId(){return this._lastQueryId}}rr=function(e,n,r,i){var o,s=arguments.length,a=s<3?n:null===i?i=Object.getOwnPropertyDescriptor(n,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,n,r,i);else for(var c=e.length-1;c>=0;c--)(o=e[c])&&(a=(s<3?o(a):s>3?o(n,r,a):o(n,r))||a);return s>3&&a&&Object.defineProperty(n,r,a),a}([ey(),rn(0,em(t1.CommonRequest)),rn(1,em(t1.ErrorManager)),rn(2,em(t1.IOptions)),rn(2,eR()),rt("design:type",Function),rt("design:paramtypes",[void 0===nS?Object:nS,void 0===re?Object:re,"undefined"==typeof IResolvedOptions?Object:IResolvedOptions])],rr),__webpack_require__("../../node_modules/core-js/modules/es.array.reduce.js");let ri=[{pattern:/客悦\s*one/gi,replacement:"客悦\xb7ONE"},{pattern:/\bSARS\b/gi,replacement:"SaaS"},{pattern:/\bSAS\b/gi,replacement:"SaaS"}],ro=function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ri;return n.reduce((e,n)=>{let{pattern:r,replacement:i}=n;return e.replace(r,i)},e)},rs={enableDebugMode:!1,minSplitLen:5,ttsModel:"02-turbo",env:"production",asrVad:600,interruptible:!0,rendererMode:"cloud",autoChromaKey:!0,typeDelay:163,enTypeDelay:45,inactivityPrompt:"您这么久没讲话,是不是有其它事情要忙,那我先挂断了",getMountContainer:()=>document.body,hotWordReplacementRules:ri,rtcID:"appreimunmd7utp"},ra={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)},rc=new Uint8Array(16),rl=[];for(let e=0;e<256;++e)rl.push((e+256).toString(16).slice(1));function ru(e,n=0){return(rl[e[n+0]]+rl[e[n+1]]+rl[e[n+2]]+rl[e[n+3]]+"-"+rl[e[n+4]]+rl[e[n+5]]+"-"+rl[e[n+6]]+rl[e[n+7]]+"-"+rl[e[n+8]]+rl[e[n+9]]+"-"+rl[e[n+10]]+rl[e[n+11]]+rl[e[n+12]]+rl[e[n+13]]+rl[e[n+14]]+rl[e[n+15]]).toLowerCase()}let rd=function(n,r,i){if(ra.randomUUID&&!r&&!n)return ra.randomUUID();var o=n,s=r,a=i;let c=(o=o||{}).random??o.rng?.()??function(){if(!e){if("undefined"==typeof crypto||!crypto.getRandomValues)throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");e=crypto.getRandomValues.bind(crypto)}return e(rc)}();if(c.length<16)throw Error("Random bytes length must be >= 16");if(c[6]=15&c[6]|64,c[8]=63&c[8]|128,s){if((a=a||0)<0||a+16>s.length)throw RangeError(`UUID byte range ${a}:${a+15} is out of buffer bounds`);for(let e=0;e<16;++e)s[a+e]=c[e];return s}return ru(c)};class rp{constructor(e,n){this.opts=n,this.emitter=new tZ,this.id="",this.text="",this.update=e=>{let{id:n,...r}=e;n?this.id=n:this.id||(this.id=rd()),Object.assign(this,r)},this.toJSON=()=>({id:this.id,type:this.type,text:this.text}),this.type=e.type,this.update(e)}}let rh=()=>{};class rf extends rp{constructor(e,n){super({...e,type:"client"},n),this.opts=n,this.appendText=e=>{this.text=e,this.emitter.emit("content_change",{mod:"text",content:e,completed:!0}).catch(rh)},this.dispose=()=>{},this.interrupt=()=>{}}static create(e){return new rf({},e)}}var rm=__webpack_require__("../../node_modules/p-queue/node_modules/eventemitter3/index.js"),rg=__webpack_require__.n(rm);class rv extends Error{constructor(e){super(e),this.name="TimeoutError"}}class ry extends Error{constructor(e){super(),this.name="AbortError",this.message=e}}let rb=e=>void 0===globalThis.DOMException?new ry(e):new DOMException(e),r_=e=>{let n=void 0===e.reason?rb("This operation was aborted."):e.reason;return n instanceof Error?n:rb(n)};class rw{#K=[];enqueue(e,n){let r={priority:(n={priority:0,...n}).priority,id:n.id,run:e};if(0===this.size||this.#K[this.size-1].priority>=n.priority)return void this.#K.push(r);let i=function(e,n,r){let i=0,o=e.length;for(;o>0;){let s=Math.trunc(o/2),a=i+s;0>=r(e[a],n)?(i=++a,o-=s+1):o=s}return i}(this.#K,r,(e,n)=>n.priority-e.priority);this.#K.splice(i,0,r)}setPriority(e,n){let r=this.#K.findIndex(n=>n.id===e);if(-1===r)throw ReferenceError(`No promise function with the id "${e}" exists in the queue.`);let[i]=this.#K.splice(r,1);this.enqueue(i.run,{priority:n,id:e})}dequeue(){let e=this.#K.shift();return e?.run}filter(e){return this.#K.filter(n=>n.priority===e.priority).map(e=>e.run)}get size(){return this.#K.length}}class rO extends rg(){#Y;#Q;#J=0;#Z;#ee;#et=0;#en;#er;#K;#ei;#eo=0;#es;#ea;#ec;#el=1n;timeout;constructor(e){if(super(),!("number"==typeof(e={carryoverConcurrencyCount:!1,intervalCap:Number.POSITIVE_INFINITY,interval:0,concurrency:Number.POSITIVE_INFINITY,autoStart:!0,queueClass:rw,...e}).intervalCap&&e.intervalCap>=1))throw TypeError(`Expected \`intervalCap\` to be a number from 1 and up, got \`${e.intervalCap?.toString()??""}\` (${typeof e.intervalCap})`);if(void 0===e.interval||!(Number.isFinite(e.interval)&&e.interval>=0))throw TypeError(`Expected \`interval\` to be a finite number >= 0, got \`${e.interval?.toString()??""}\` (${typeof e.interval})`);this.#Y=e.carryoverConcurrencyCount,this.#Q=e.intervalCap===Number.POSITIVE_INFINITY||0===e.interval,this.#Z=e.intervalCap,this.#ee=e.interval,this.#K=new e.queueClass,this.#ei=e.queueClass,this.concurrency=e.concurrency,this.timeout=e.timeout,this.#ec=!0===e.throwOnTimeout,this.#ea=!1===e.autoStart}get #eu(){return this.#Q||this.#J<this.#Z}get #ed(){return this.#eo<this.#es}#ep(){this.#eo--,this.#eh(),this.emit("next")}#ef(){this.#em(),this.#eg(),this.#er=void 0}get #ev(){let e=Date.now();if(void 0===this.#en){let n=this.#et-e;if(!(n<0))return void 0===this.#er&&(this.#er=setTimeout(()=>{this.#ef()},n)),!0;this.#J=this.#Y?this.#eo:0}return!1}#eh(){if(0===this.#K.size)return this.#en&&clearInterval(this.#en),this.#en=void 0,this.emit("empty"),0===this.#eo&&this.emit("idle"),!1;if(!this.#ea){let e=!this.#ev;if(this.#eu&&this.#ed){let n=this.#K.dequeue();return!!n&&(this.emit("active"),n(),e&&this.#eg(),!0)}}return!1}#eg(){this.#Q||void 0!==this.#en||(this.#en=setInterval(()=>{this.#em()},this.#ee),this.#et=Date.now()+this.#ee)}#em(){0===this.#J&&0===this.#eo&&this.#en&&(clearInterval(this.#en),this.#en=void 0),this.#J=this.#Y?this.#eo:0,this.#ey()}#ey(){for(;this.#eh(););}get concurrency(){return this.#es}set concurrency(e){if(!("number"==typeof e&&e>=1))throw TypeError(`Expected \`concurrency\` to be a number from 1 and up, got \`${e}\` (${typeof e})`);this.#es=e,this.#ey()}async #eb(e){return new Promise((n,r)=>{e.addEventListener("abort",()=>{r(e.reason)},{once:!0})})}setPriority(e,n){this.#K.setPriority(e,n)}async add(e,n={}){return n.id??=(this.#el++).toString(),n={timeout:this.timeout,throwOnTimeout:this.#ec,...n},new Promise((r,i)=>{this.#K.enqueue(async()=>{this.#eo++,this.#J++;try{n.signal?.throwIfAborted();let i=e({signal:n.signal});n.timeout&&(i=function(e,n){let r,i,{milliseconds:o,fallback:s,message:a,customTimers:c={setTimeout,clearTimeout}}=n,l=new Promise((l,u)=>{if("number"!=typeof o||1!==Math.sign(o))throw TypeError(`Expected \`milliseconds\` to be a positive number, got \`${o}\``);if(n.signal){let{signal:e}=n;e.aborted&&u(r_(e)),i=()=>{u(r_(e))},e.addEventListener("abort",i,{once:!0})}if(o===Number.POSITIVE_INFINITY)return void e.then(l,u);let d=new rv;r=c.setTimeout.call(void 0,()=>{if(s){try{l(s())}catch(e){u(e)}return}"function"==typeof e.cancel&&e.cancel(),!1===a?l():a instanceof Error?u(a):(d.message=a??`Promise timed out after ${o} milliseconds`,u(d))},o),(async()=>{try{l(await e)}catch(e){u(e)}})()}).finally(()=>{l.clear(),i&&n.signal&&n.signal.removeEventListener("abort",i)});return l.clear=()=>{c.clearTimeout.call(void 0,r),r=void 0},l}(Promise.resolve(i),{milliseconds:n.timeout})),n.signal&&(i=Promise.race([i,this.#eb(n.signal)]));let o=await i;r(o),this.emit("completed",o)}catch(e){if(e instanceof rv&&!n.throwOnTimeout)return void r();i(e),this.emit("error",e)}finally{this.#ep()}},n),this.emit("add"),this.#eh()})}async addAll(e,n){return Promise.all(e.map(async e=>this.add(e,n)))}start(){return this.#ea&&(this.#ea=!1,this.#ey()),this}pause(){this.#ea=!0}clear(){this.#K=new this.#ei}async onEmpty(){0!==this.#K.size&&await this.#e_("empty")}async onSizeLessThan(e){this.#K.size<e||await this.#e_("next",()=>this.#K.size<e)}async onIdle(){(0!==this.#eo||0!==this.#K.size)&&await this.#e_("idle")}async #e_(e,n){return new Promise(r=>{let i=()=>{(!n||n())&&(this.off(e,i),r())};this.on(e,i)})}get size(){return this.#K.size}sizeBy(e){return this.#K.filter(e).length}get pending(){return this.#eo}get isPaused(){return this.#ea}}class rR{constructor(e){this.id=rd(),this.createdAt=Date.now(),this.updatedAt=Date.now(),this.emitter=new tZ,this.getConfig=()=>({...this.config}),this.updateConfig=e=>{this.config={...this.config,...e},this.updatedAt=Date.now()},this.toJSON=()=>({id:this.id,mod:this.mod,config:this.getConfig(),createdAt:this.createdAt,updatedAt:this.updatedAt}),this.updateTimestamp=()=>{this.updatedAt=Date.now()},this._dispose=()=>{this.emitter.clearListeners()},this.config={...e},this.config.timestamp||(this.config.timestamp=this.createdAt)}}var rS=__webpack_require__("../../node_modules/typewriter-effect/dist/core.js"),rE=__webpack_require__.n(rS);let rT=e=>/[\u3400-\u4DBF\u4E00-\u9FFF\uF900-\uFAFF\u3000-\u303F]/.test(e);class rM extends rR{get mod(){return"text"}static fromSnapshot(e){return new rM(e.config)}static fromString(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new rM({content:e,...n})}setTargetElement(e){this.targetElement=e}isEmpty(){return!this.config.content}constructor(...e){super(...e),this.typewriter=null,this.targetElement=null,this.index=0,this.stopTypewriter=()=>{this.typewriter&&(this.typewriter.stop(),this.typewriter=null)},this.runTask=()=>new Promise((e,n)=>{if(this.ensureTarget(),this.isEmpty())return void e({mod:"text",content:""});try{var r,i,o,s,a;let n=null!=(o=null==(r=this.config.typewriterOptions)?void 0:r.delay)?o:163,c=null!=(s=null==(i=this.config.typewriterOptions)?void 0:i.enDelay)?s:n;this.typewriter=new(rE())(this.targetElement,{autoStart:!0,loop:!1,...this.config.typewriterOptions,delay:0,onCreateTextNode:e=>{let n=this.index===this.config.content.length-1;return this.emitter.emit("data",{char:e,index:this.index++,done:n}),document.createTextNode(e)}});let l=[],u="",d=null;for(let e of Array.from(this.config.content)){let n=rT(e);null===d||n===d?u+=e:(l.push({s:u,cn:d}),u=e),d=n}u&&l.push({s:u,cn:d});let p=this.typewriter;if(0===l.length)p=p.changeDelay(n).typeString(this.config.content);else for(let e=0;e<l.length;e++){let{s:r,cn:i}=l[e];if(0===e){let e=null!=(a=r[0])?a:"",o=r.slice(1);p=p.typeString(e),o&&(p=p.changeDelay(i?n:c).typeString(o));continue}p=p.changeDelay(i?n:c).typeString(r)}p.callFunction(()=>{e({mod:"text",content:this.config.content})}).start()}catch(e){n(e)}}),this.dispose=()=>{this._dispose(),this.stopTypewriter(),this.targetElement=null,this.index=0},this.interrupt=()=>{this.stopTypewriter()},this.ensureTarget=()=>{if(this.targetElement)return;let e=document.createElement("span");e.className="text-content-typewriter",this.targetElement=e}}}class rx extends rR{get mod(){return"image"}static fromSnapshot(e){return new rx(e.config)}static fromSrc(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new rx({src:e,...n})}isEmpty(){return!this.config.src}ensureImageElement(){if(this.imgElement)return this.imgElement;let e=document.createElement("img");return this.imgElement=e,e}constructor(...e){super(...e),this.imgElement=null,this.setTargetElement=e=>{this.imgElement=e},this.runTask=()=>new Promise((e,n)=>{var r;if(this.isEmpty())return void e({mod:"image",src:""});let i=this.ensureImageElement(),o=()=>{e({mod:"image",...this.config}),i.removeEventListener("load",o)},s=()=>{n(Error(`Failed to load image: ${this.config.src}`)),i.removeEventListener("error",s)};i.addEventListener("load",o,{once:!0}),i.addEventListener("error",s,{once:!0}),i.alt=null!=(r=this.config.alt)?r:"",this.config.width&&(i.width=this.config.width),this.config.height&&(i.height=this.config.height),i.src=this.config.src}),this.dispose=()=>{this._dispose(),this.imgElement&&(this.imgElement.src="",this.imgElement=null)},this.interrupt=()=>{}}}class rC extends rR{get mod(){return"video"}static fromSnapshot(e){return new rC(e.config)}static fromSrc(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new rC({src:e,...n})}isEmpty(){return!this.config.src}ensureVideoElement(){if(this.videoElement)return this.videoElement;let e=document.createElement("video");return e.muted=!0,e.playsInline=!0,this.videoElement=e,e}constructor(...e){super(...e),this.videoElement=null,this.setTargetElement=e=>{this.videoElement=e},this.runTask=()=>new Promise((e,n)=>{if(this.isEmpty())return void e({mod:"video",src:""});let r=this.ensureVideoElement(),i=()=>{e({mod:"video",...this.config}),r.removeEventListener("loadedmetadata",i)},o=()=>{n(Error(`Failed to load video: ${this.config.src}`)),r.removeEventListener("error",o)};r.addEventListener("loadedmetadata",i,{once:!0}),r.addEventListener("error",o,{once:!0}),this.config.poster&&(r.poster=this.config.poster),this.config.preload&&(r.preload=this.config.preload),this.config.width&&(r.width=this.config.width),this.config.height&&(r.height=this.config.height),r.src=this.config.src,r.load()}),this.dispose=()=>{this._dispose(),this.videoElement&&(this.videoElement.src="",this.videoElement.load(),this.videoElement=null)},this.interrupt=()=>{}}}let rI={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(e,n){return n},attributeValueProcessor:function(e,n){return n},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(e,n,r){return e},captureMetaData:!1},rj=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",rA=RegExp("^"+("["+rj+"]["+rj)+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$");function rk(e,n){let r=[],i=n.exec(e);for(;i;){let o=[];o.startIndex=n.lastIndex-i[0].length;let s=i.length;for(let e=0;e<s;e++)o.push(i[e]);r.push(o),i=n.exec(e)}return r}let rB=function(e){let n=rA.exec(e);return null!=n};n="function"!=typeof Symbol?"@@xmlMetadata":Symbol("XML Node Metadata");class rP{constructor(e){this.tagname=e,this.child=[],this[":@"]={}}add(e,n){"__proto__"===e&&(e="#__proto__"),this.child.push({[e]:n})}addChild(e,r){"__proto__"===e.tagname&&(e.tagname="#__proto__"),e[":@"]&&Object.keys(e[":@"]).length>0?this.child.push({[e.tagname]:e.child,":@":e[":@"]}):this.child.push({[e.tagname]:e.child}),void 0!==r&&(this.child[this.child.length-1][n]={startIndex:r})}static getMetaDataSymbol(){return n}}let rN=(e,n)=>{for(;n<e.length&&/\s/.test(e[n]);)n++;return n};function rD(e,n,r){let i="",o=e[n];if('"'!==o&&"'"!==o)throw Error(`Expected quoted string, found "${o}"`);for(n++;n<e.length&&e[n]!==o;)i+=e[n],n++;if(e[n]!==o)throw Error(`Unterminated ${r} value`);return[++n,i]}function rL(e,n,r){for(let i=0;i<n.length;i++)if(n[i]!==e[r+i+1])return!1;return!0}function rF(e){if(rB(e))return e;throw Error(`Invalid entity name ${e}`)}let rU=/^[-+]?0x[a-fA-F0-9]+$/,rq=/^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/,rH={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0},rV=/^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/;class rX{constructor(e){this.options=e,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"\xa2"},pound:{regex:/&(pound|#163);/g,val:"\xa3"},yen:{regex:/&(yen|#165);/g,val:"\xa5"},euro:{regex:/&(euro|#8364);/g,val:"€"},copyright:{regex:/&(copy|#169);/g,val:"\xa9"},reg:{regex:/&(reg|#174);/g,val:"\xae"},inr:{regex:/&(inr|#8377);/g,val:"₹"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(e,n)=>String.fromCodePoint(Number.parseInt(n,10))},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(e,n)=>String.fromCodePoint(Number.parseInt(n,16))}},this.addExternalEntities=rW,this.parseXml=rY,this.parseTextData=r$,this.resolveNameSpace=rz,this.buildAttributesMap=rK,this.isItStopNode=r0,this.replaceEntitiesValue=rJ,this.readStopNodeData=r3,this.saveTextToParentTag=rZ,this.addChild=rQ,this.ignoreAttributesFn=function(e){return"function"==typeof e?e:Array.isArray(e)?n=>{for(let r of e)if("string"==typeof r&&n===r||r instanceof RegExp&&r.test(n))return!0}:()=>!1}(this.options.ignoreAttributes)}}function rW(e){let n=Object.keys(e);for(let r=0;r<n.length;r++){let i=n[r];this.lastEntities[i]={regex:RegExp("&"+i+";","g"),val:e[i]}}}function r$(e,n,r,i,o,s,a){if(void 0!==e&&(this.options.trimValues&&!i&&(e=e.trim()),e.length>0)){a||(e=this.replaceEntitiesValue(e));let i=this.options.tagValueProcessor(n,e,r,o,s);return null==i?e:typeof i!=typeof e||i!==e?i:this.options.trimValues||e.trim()===e?r6(e,this.options.parseTagValue,this.options.numberParseOptions):e}}function rz(e){if(this.options.removeNSPrefix){let n=e.split(":"),r="/"===e.charAt(0)?"/":"";if("xmlns"===n[0])return"";2===n.length&&(e=r+n[1])}return e}let rG=RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?","gm");function rK(e,n,r){if(!0!==this.options.ignoreAttributes&&"string"==typeof e){let r=rk(e,rG),i=r.length,o={};for(let e=0;e<i;e++){let i=this.resolveNameSpace(r[e][1]);if(this.ignoreAttributesFn(i,n))continue;let s=r[e][4],a=this.options.attributeNamePrefix+i;if(i.length)if(this.options.transformAttributeName&&(a=this.options.transformAttributeName(a)),"__proto__"===a&&(a="#__proto__"),void 0!==s){this.options.trimValues&&(s=s.trim()),s=this.replaceEntitiesValue(s);let e=this.options.attributeValueProcessor(i,s,n);null==e?o[a]=s:typeof e!=typeof s||e!==s?o[a]=e:o[a]=r6(s,this.options.parseAttributeValue,this.options.numberParseOptions)}else this.options.allowBooleanAttributes&&(o[a]=!0)}if(Object.keys(o).length){if(this.options.attributesGroupName){let e={};return e[this.options.attributesGroupName]=o,e}return o}}}let rY=function(e){e=e.replace(/\r\n?/g,"\n");let n=new rP("!xml"),r=n,i="",o="";for(let s=0;s<e.length;s++)if("<"===e[s])if("/"===e[s+1]){let n=r1(e,">",s,"Closing Tag is not closed."),a=e.substring(s+2,n).trim();if(this.options.removeNSPrefix){let e=a.indexOf(":");-1!==e&&(a=a.substr(e+1))}this.options.transformTagName&&(a=this.options.transformTagName(a)),r&&(i=this.saveTextToParentTag(i,r,o));let c=o.substring(o.lastIndexOf(".")+1);if(a&&-1!==this.options.unpairedTags.indexOf(a))throw Error(`Unpaired tag can not be used as closing tag: </${a}>`);let l=0;c&&-1!==this.options.unpairedTags.indexOf(c)?(l=o.lastIndexOf(".",o.lastIndexOf(".")-1),this.tagsNodeStack.pop()):l=o.lastIndexOf("."),o=o.substring(0,l),r=this.tagsNodeStack.pop(),i="",s=n}else if("?"===e[s+1]){let n=r2(e,s,!1,"?>");if(!n)throw Error("Pi Tag is not closed.");if(i=this.saveTextToParentTag(i,r,o),this.options.ignoreDeclaration&&"?xml"===n.tagName||this.options.ignorePiTags);else{let e=new rP(n.tagName);e.add(this.options.textNodeName,""),n.tagName!==n.tagExp&&n.attrExpPresent&&(e[":@"]=this.buildAttributesMap(n.tagExp,o,n.tagName)),this.addChild(r,e,o,s)}s=n.closeIndex+1}else if("!--"===e.substr(s+1,3)){let n=r1(e,"--\x3e",s+4,"Comment is not closed.");if(this.options.commentPropName){let a=e.substring(s+4,n-2);i=this.saveTextToParentTag(i,r,o),r.add(this.options.commentPropName,[{[this.options.textNodeName]:a}])}s=n}else if("!D"===e.substr(s+1,2)){let n=function(e,n){let r={};if("O"===e[n+3]&&"C"===e[n+4]&&"T"===e[n+5]&&"Y"===e[n+6]&&"P"===e[n+7]&&"E"===e[n+8]){n+=9;let i=1,o=!1,s=!1,a="";for(;n<e.length;n++)if("<"!==e[n]||s)if(">"===e[n]){if(s?"-"===e[n-1]&&"-"===e[n-2]&&(s=!1,i--):i--,0===i)break}else"["===e[n]?o=!0:e[n];else{if(o&&rL(e,"!ENTITY",n)){let i,o;n+=7,[i,o,n]=function(e,n){n=rN(e,n);let r="";for(;n<e.length&&!/\s/.test(e[n])&&'"'!==e[n]&&"'"!==e[n];)r+=e[n],n++;if(rF(r),n=rN(e,n),"SYSTEM"===e.substring(n,n+6).toUpperCase())throw Error("External entities are not supported");if("%"===e[n])throw Error("Parameter entities are not supported");let i="";return[n,i]=rD(e,n,"entity"),[r,i,--n]}(e,n+1),-1===o.indexOf("&")&&(r[i]={regx:RegExp(`&${i};`,"g"),val:o})}else if(o&&rL(e,"!ELEMENT",n)){let{index:r}=function(e,n){n=rN(e,n);let r="";for(;n<e.length&&!/\s/.test(e[n]);)r+=e[n],n++;if(!rF(r))throw Error(`Invalid element name: "${r}"`);n=rN(e,n);let i="";if("E"===e[n]&&rL(e,"MPTY",n))n+=4;else if("A"===e[n]&&rL(e,"NY",n))n+=2;else if("("===e[n]){for(n++;n<e.length&&")"!==e[n];)i+=e[n],n++;if(")"!==e[n])throw Error("Unterminated content model")}else throw Error(`Invalid Element Expression, found "${e[n]}"`);return{elementName:r,contentModel:i.trim(),index:n}}(e,(n+=8)+1);n=r}else if(o&&rL(e,"!ATTLIST",n))n+=8;else if(o&&rL(e,"!NOTATION",n)){let{index:r}=function(e,n){n=rN(e,n);let r="";for(;n<e.length&&!/\s/.test(e[n]);)r+=e[n],n++;rF(r),n=rN(e,n);let i=e.substring(n,n+6).toUpperCase();if("SYSTEM"!==i&&"PUBLIC"!==i)throw Error(`Expected SYSTEM or PUBLIC, found "${i}"`);n+=i.length,n=rN(e,n);let o=null,s=null;if("PUBLIC"===i)[n,o]=rD(e,n,"publicIdentifier"),n=rN(e,n),('"'===e[n]||"'"===e[n])&&([n,s]=rD(e,n,"systemIdentifier"));else if("SYSTEM"===i&&([n,s]=rD(e,n,"systemIdentifier"),!s))throw Error("Missing mandatory system identifier for SYSTEM notation");return{notationName:r,publicIdentifier:o,systemIdentifier:s,index:--n}}(e,(n+=9)+1);n=r}else if(rL(e,"!--",n))s=!0;else throw Error("Invalid DOCTYPE");i++}if(0!==i)throw Error("Unclosed DOCTYPE")}else throw Error("Invalid Tag instead of DOCTYPE");return{entities:r,i:n}}(e,s);this.docTypeEntities=n.entities,s=n.i}else if("!["===e.substr(s+1,2)){let n=r1(e,"]]>",s,"CDATA is not closed.")-2,a=e.substring(s+9,n);i=this.saveTextToParentTag(i,r,o);let c=this.parseTextData(a,r.tagname,o,!0,!1,!0,!0);void 0==c&&(c=""),this.options.cdataPropName?r.add(this.options.cdataPropName,[{[this.options.textNodeName]:a}]):r.add(this.options.textNodeName,c),s=n+2}else{let a=r2(e,s,this.options.removeNSPrefix),c=a.tagName,l=a.rawTagName,u=a.tagExp,d=a.attrExpPresent,p=a.closeIndex;this.options.transformTagName&&(c=this.options.transformTagName(c)),r&&i&&"!xml"!==r.tagname&&(i=this.saveTextToParentTag(i,r,o,!1));let h=r;h&&-1!==this.options.unpairedTags.indexOf(h.tagname)&&(r=this.tagsNodeStack.pop(),o=o.substring(0,o.lastIndexOf("."))),c!==n.tagname&&(o+=o?"."+c:c);let f=s;if(this.isItStopNode(this.options.stopNodes,o,c)){let n="";if(u.length>0&&u.lastIndexOf("/")===u.length-1)"/"===c[c.length-1]?(c=c.substr(0,c.length-1),o=o.substr(0,o.length-1),u=c):u=u.substr(0,u.length-1),s=a.closeIndex;else if(-1!==this.options.unpairedTags.indexOf(c))s=a.closeIndex;else{let r=this.readStopNodeData(e,l,p+1);if(!r)throw Error(`Unexpected end of ${l}`);s=r.i,n=r.tagContent}let i=new rP(c);c!==u&&d&&(i[":@"]=this.buildAttributesMap(u,o,c)),n&&(n=this.parseTextData(n,c,o,!0,d,!0,!0)),o=o.substr(0,o.lastIndexOf(".")),i.add(this.options.textNodeName,n),this.addChild(r,i,o,f)}else{if(u.length>0&&u.lastIndexOf("/")===u.length-1){"/"===c[c.length-1]?(c=c.substr(0,c.length-1),o=o.substr(0,o.length-1),u=c):u=u.substr(0,u.length-1),this.options.transformTagName&&(c=this.options.transformTagName(c));let e=new rP(c);c!==u&&d&&(e[":@"]=this.buildAttributesMap(u,o,c)),this.addChild(r,e,o,f),o=o.substr(0,o.lastIndexOf("."))}else{let e=new rP(c);this.tagsNodeStack.push(r),c!==u&&d&&(e[":@"]=this.buildAttributesMap(u,o,c)),this.addChild(r,e,o,f),r=e}i="",s=p}}else i+=e[s];return n.child};function rQ(e,n,r,i){this.options.captureMetaData||(i=void 0);let o=this.options.updateTag(n.tagname,r,n[":@"]);!1===o||("string"==typeof o&&(n.tagname=o),e.addChild(n,i))}let rJ=function(e){if(this.options.processEntities){for(let n in this.docTypeEntities){let r=this.docTypeEntities[n];e=e.replace(r.regx,r.val)}for(let n in this.lastEntities){let r=this.lastEntities[n];e=e.replace(r.regex,r.val)}if(this.options.htmlEntities)for(let n in this.htmlEntities){let r=this.htmlEntities[n];e=e.replace(r.regex,r.val)}e=e.replace(this.ampEntity.regex,this.ampEntity.val)}return e};function rZ(e,n,r,i){return e&&(void 0===i&&(i=0===n.child.length),void 0!==(e=this.parseTextData(e,n.tagname,r,!1,!!n[":@"]&&0!==Object.keys(n[":@"]).length,i))&&""!==e&&n.add(this.options.textNodeName,e),e=""),e}function r0(e,n,r){let i="*."+r;for(let r in e){let o=e[r];if(i===o||n===o)return!0}return!1}function r1(e,n,r,i){let o=e.indexOf(n,r);if(-1!==o)return o+n.length-1;throw Error(i)}function r2(e,n,r,i=">"){let o=function(e,n,r=">"){let i,o="";for(let s=n;s<e.length;s++){let n=e[s];if(i)n===i&&(i="");else if('"'===n||"'"===n)i=n;else if(n===r[0]){if(!r[1])return{data:o,index:s};else if(e[s+1]===r[1])return{data:o,index:s}}else" "===n&&(n=" ");o+=n}}(e,n+1,i);if(!o)return;let s=o.data,a=o.index,c=s.search(/\s/),l=s,u=!0;-1!==c&&(l=s.substring(0,c),s=s.substring(c+1).trimStart());let d=l;if(r){let e=l.indexOf(":");-1!==e&&(u=(l=l.substr(e+1))!==o.data.substr(e+1))}return{tagName:l,tagExp:s,closeIndex:a,attrExpPresent:u,rawTagName:d}}function r3(e,n,r){let i=r,o=1;for(;r<e.length;r++)if("<"===e[r])if("/"===e[r+1]){let s=r1(e,">",r,`${n} is not closed`);if(e.substring(r+2,s).trim()===n&&0==--o)return{tagContent:e.substring(i,r),i:s};r=s}else if("?"===e[r+1])r=r1(e,"?>",r+1,"StopNode is not closed.");else if("!--"===e.substr(r+1,3))r=r1(e,"--\x3e",r+3,"StopNode is not closed.");else if("!["===e.substr(r+1,2))r=r1(e,"]]>",r,"StopNode is not closed.")-2;else{let i=r2(e,r,">");i&&((i&&i.tagName)===n&&"/"!==i.tagExp[i.tagExp.length-1]&&o++,r=i.closeIndex)}}function r6(e,n,r){if(n&&"string"==typeof e){let n=e.trim();return"true"===n||"false"!==n&&function(e,n={}){if(n=Object.assign({},rH,n),!e||"string"!=typeof e)return e;let r=e.trim();if(void 0!==n.skipLike&&n.skipLike.test(r))return e;{if("0"===e)return 0;if(n.hex&&rU.test(r)){var i,o=r,s=16;if(parseInt)return parseInt(o,16);if(Number.parseInt)return Number.parseInt(o,s);if(window&&window.parseInt)return window.parseInt(o,s);throw Error("parseInt, Number.parseInt, window.parseInt are not supported")}if(-1!==r.search(/.+[eE].+/))return function(e,n,r){if(!r.eNotation)return e;let i=n.match(rV);if(!i)return e;{let o=i[1]||"",s=-1===i[3].indexOf("e")?"E":"e",a=i[2],c=o?e[a.length+1]===s:e[a.length]===s;return a.length>1&&c?e:1===a.length&&(i[3].startsWith(`.${s}`)||i[3][0]===s)?Number(n):r.leadingZeros&&!c?Number(n=(i[1]||"")+i[3]):e}}(e,r,n);let a=rq.exec(r);if(!a)return e;{let o=a[1]||"",s=a[2],c=((i=a[3])&&-1!==i.indexOf(".")&&("."===(i=i.replace(/0+$/,""))?i="0":"."===i[0]?i="0"+i:"."===i[i.length-1]&&(i=i.substring(0,i.length-1))),i),l=o?"."===e[s.length+1]:"."===e[s.length];if(!n.leadingZeros&&(s.length>1||1===s.length&&!l))return e;{let i=Number(r),a=String(i);if(0===i)return i;if(-1!==a.search(/[eE]/))if(n.eNotation)return i;else return e;if(-1!==r.indexOf("."))if("0"===a)return i;else if(a===c)return i;else if(a===`${o}${c}`)return i;else return e;let l=s?c:r;return s?l===a||o+l===a?i:e:l===a||l===o+a?i:e}}}}(e,r)}return void 0!==e?e:""}let r5=rP.getMetaDataSymbol(),r4={allowBooleanAttributes:!1,unpairedTags:[]};function r8(e,n){n=Object.assign({},r4,n);let r=[],i=!1,o=!1;"\uFEFF"===e[0]&&(e=e.substr(1));for(let a=0;a<e.length;a++)if("<"===e[a]&&"?"===e[a+1]){if(a+=2,(a=r7(e,a)).err)return a}else if("<"===e[a]){let c=a;if("!"===e[++a]){a=ie(e,a);continue}{var s;let l=!1;"/"===e[a]&&(l=!0,a++);let u="";for(;a<e.length&&">"!==e[a]&&" "!==e[a]&&" "!==e[a]&&"\n"!==e[a]&&"\r"!==e[a];a++)u+=e[a];if("/"===(u=u.trim())[u.length-1]&&(u=u.substring(0,u.length-1),a--),!rB(s=u)){let n;return ii("InvalidTag",0===u.trim().length?"Invalid space after '<'.":"Tag '"+u+"' is an invalid name.",io(e,a))}let d=function(e,n){let r="",i="",o=!1;for(;n<e.length;n++){if('"'===e[n]||"'"===e[n])""===i?i=e[n]:i!==e[n]||(i="");else if(">"===e[n]&&""===i){o=!0;break}r+=e[n]}return""===i&&{value:r,index:n,tagClosed:o}}(e,a);if(!1===d)return ii("InvalidAttr","Attributes for '"+u+"' have open quote.",io(e,a));let p=d.value;if(a=d.index,"/"===p[p.length-1]){let r=a-p.length,o=ir(p=p.substring(0,p.length-1),n);if(!0!==o)return ii(o.err.code,o.err.msg,io(e,r+o.err.line));i=!0}else if(l)if(!d.tagClosed)return ii("InvalidTag","Closing tag '"+u+"' doesn't have proper closing.",io(e,a));else{if(p.trim().length>0)return ii("InvalidTag","Closing tag '"+u+"' can't have attributes or invalid starting.",io(e,c));if(0===r.length)return ii("InvalidTag","Closing tag '"+u+"' has not been opened.",io(e,c));let n=r.pop();if(u!==n.tagName){let r=io(e,n.tagStartPos);return ii("InvalidTag","Expected closing tag '"+n.tagName+"' (opened in line "+r.line+", col "+r.col+") instead of closing tag '"+u+"'.",io(e,c))}0==r.length&&(o=!0)}else{let s=ir(p,n);if(!0!==s)return ii(s.err.code,s.err.msg,io(e,a-p.length+s.err.line));if(!0===o)return ii("InvalidXml","Multiple possible root nodes found.",io(e,a));-1!==n.unpairedTags.indexOf(u)||r.push({tagName:u,tagStartPos:c}),i=!0}for(a++;a<e.length;a++)if("<"===e[a])if("!"===e[a+1]){a=ie(e,++a);continue}else if("?"===e[a+1]){if((a=r7(e,++a)).err)return a}else break;else if("&"===e[a]){let n=function(e,n){if(";"===e[++n])return -1;if("#"===e[n]){var r=e,i=++n;let o=/\d/;for("x"===r[i]&&(i++,o=/[\da-fA-F]/);i<r.length;i++){if(";"===r[i])return i;if(!r[i].match(o))break}return -1}let o=0;for(;n<e.length;n++,o++)if(!e[n].match(/\w/)||!(o<20)){if(";"===e[n])break;return -1}return n}(e,a);if(-1==n)return ii("InvalidChar","char '&' is not expected.",io(e,a));a=n}else if(!0===o&&!r9(e[a]))return ii("InvalidXml","Extra text at the end",io(e,a));"<"===e[a]&&a--}}else{if(r9(e[a]))continue;return ii("InvalidChar","char '"+e[a]+"' is not expected.",io(e,a))}return i?1==r.length?ii("InvalidTag","Unclosed tag '"+r[0].tagName+"'.",io(e,r[0].tagStartPos)):!(r.length>0)||ii("InvalidXml","Invalid '"+JSON.stringify(r.map(e=>e.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1}):ii("InvalidXml","Start tag expected.",1)}function r9(e){return" "===e||" "===e||"\n"===e||"\r"===e}function r7(e,n){let r=n;for(;n<e.length;n++)if("?"==e[n]||" "==e[n]){let i=e.substr(r,n-r);if(n>5&&"xml"===i)return ii("InvalidXml","XML declaration allowed only at the start of the document.",io(e,n));if("?"!=e[n]||">"!=e[n+1])continue;n++;break}return n}function ie(e,n){if(e.length>n+5&&"-"===e[n+1]&&"-"===e[n+2]){for(n+=3;n<e.length;n++)if("-"===e[n]&&"-"===e[n+1]&&">"===e[n+2]){n+=2;break}}else if(e.length>n+8&&"D"===e[n+1]&&"O"===e[n+2]&&"C"===e[n+3]&&"T"===e[n+4]&&"Y"===e[n+5]&&"P"===e[n+6]&&"E"===e[n+7]){let r=1;for(n+=8;n<e.length;n++)if("<"===e[n])r++;else if(">"===e[n]&&0==--r)break}else if(e.length>n+9&&"["===e[n+1]&&"C"===e[n+2]&&"D"===e[n+3]&&"A"===e[n+4]&&"T"===e[n+5]&&"A"===e[n+6]&&"["===e[n+7]){for(n+=8;n<e.length;n++)if("]"===e[n]&&"]"===e[n+1]&&">"===e[n+2]){n+=2;break}}return n}let it=RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?","g");function ir(e,n){let r=rk(e,it),i={};for(let e=0;e<r.length;e++){var o;if(0===r[e][1].length)return ii("InvalidAttr","Attribute '"+r[e][2]+"' has no space in starting.",is(r[e]));if(void 0!==r[e][3]&&void 0===r[e][4])return ii("InvalidAttr","Attribute '"+r[e][2]+"' is without value.",is(r[e]));if(void 0===r[e][3]&&!n.allowBooleanAttributes)return ii("InvalidAttr","boolean attribute '"+r[e][2]+"' is not allowed.",is(r[e]));let s=r[e][2];if(!rB(o=s))return ii("InvalidAttr","Attribute '"+s+"' is an invalid name.",is(r[e]));if(i.hasOwnProperty(s))return ii("InvalidAttr","Attribute '"+s+"' is repeated.",is(r[e]));i[s]=1}return!0}function ii(e,n,r){return{err:{code:e,msg:n,line:r.line||r,col:r.col}}}function io(e,n){let r=e.substring(0,n).split(/\r?\n/);return{line:r.length,col:r[r.length-1].length+1}}function is(e){return e.startIndex+e[1].length}class ia{constructor(e){this.externalEntities={},this.options=Object.assign({},rI,e)}parse(e,n){if("string"==typeof e);else if(e.toString)e=e.toString();else throw Error("XML data is accepted in String or Bytes[] form.");if(n){!0===n&&(n={});let r=r8(e,n);if(!0!==r)throw Error(`${r.err.msg}:${r.err.line}:${r.err.col}`)}let r=new rX(this.options);r.addExternalEntities(this.externalEntities);let i=r.parseXml(e);return this.options.preserveOrder||void 0===i?i:function e(n,r,i){let o,s={};for(let a=0;a<n.length;a++){let c=n[a],l=function(e){let n=Object.keys(e);for(let e=0;e<n.length;e++){let r=n[e];if(":@"!==r)return r}}(c),u="";if(u=void 0===i?l:i+"."+l,l===r.textNodeName)void 0===o?o=c[l]:o+=""+c[l];else if(void 0===l)continue;else if(c[l]){let n=e(c[l],r,u),i=function(e,n){let{textNodeName:r}=n,i=Object.keys(e).length;return 0===i||1===i&&(!!e[r]||"boolean"==typeof e[r]||0===e[r])}(n,r);void 0!==c[r5]&&(n[r5]=c[r5]),c[":@"]?function(e,n,r,i){if(n){let o=Object.keys(n),s=o.length;for(let a=0;a<s;a++){let s=o[a];i.isArray(s,r+"."+s,!0,!0)?e[s]=[n[s]]:e[s]=n[s]}}}(n,c[":@"],u,r):1!==Object.keys(n).length||void 0===n[r.textNodeName]||r.alwaysCreateTextNode?0===Object.keys(n).length&&(r.alwaysCreateTextNode?n[r.textNodeName]="":n=""):n=n[r.textNodeName],void 0!==s[l]&&s.hasOwnProperty(l)?(Array.isArray(s[l])||(s[l]=[s[l]]),s[l].push(n)):r.isArray(l,u,i)?s[l]=[n]:s[l]=n}}return"string"==typeof o?o.length>0&&(s[r.textNodeName]=o):void 0!==o&&(s[r.textNodeName]=o),s}(i,this.options)}addEntity(e,n){if(-1!==n.indexOf("&"))throw Error("Entity value can't have '&'");if(-1!==e.indexOf("&")||-1!==e.indexOf(";"))throw Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '&#xD;'");if("&"===n)throw Error("An entity with value '&' is not permitted");this.externalEntities[e]=n}static getMetaDataSymbol(){return rP.getMetaDataSymbol()}}let ic={validate:r8};class il{constructor(){this.isXml=e=>il.isXml(e),this.parseXmlOrText=e=>{try{let n=this.xmlParser.parse(e);if(Array.isArray(n)&&!n.length);else if(Array.isArray(n)&&n.length)return n;return e}catch(n){return e}},this.hasMixContentByParsedXml=e=>Array.isArray(e),this.xmlParser=new ia({preserveOrder:!0,ignoreAttributes:!1,attributeNamePrefix:"",textNodeName:"#text",alwaysCreateTextNode:!0})}static #k=this.isTextNode=e=>"text"in e;static #G=this.isImageNode=e=>"image"in e;static #ew=this.isVideoNode=e=>"video"in e;static #eO=this.isXml=e=>"string"==typeof e&&!0===ic.validate(e,{allowBooleanAttributes:!0})}class iu extends rp{constructor(e,n){super({...e,type:"aiWorker"},n),this.opts=n,this.contents=[],this.addContentRenderTask=e=>{iu.isTextContent(e)?(e.emitter.on("data",e=>{this.emitter.emit("content_change",{mod:"text",content:e.char,completed:e.done})}),this.queue.add(e.runTask).finally(()=>{e.dispose()})):iu.isImageContent(e)?this.queue.add(e.runTask).then(e=>{e&&this.emitter.emit("content_change",{mod:"image",content:e.src,completed:!0})}).finally(()=>{e.dispose()}):iu.isVideoContent(e)&&this.queue.add(e.runTask).then(e=>{e&&this.emitter.emit("content_change",{mod:"video",content:e.src,completed:!0})}).finally(()=>{e.dispose()})},this.addAllContents=e=>{for(let n of(this.contents=e,e))this.addContentRenderTask(n)},this.createContentsFromXmlString=e=>{let n=this.customXmlParser.parseXmlOrText(e);return this.customXmlParser.hasMixContentByParsedXml(n)?n[0].root[0].content.map(e=>il.isTextNode(e)?rM.fromString(e.text[0]["#text"],{typewriterOptions:{delay:this.opts.typeDelay,enDelay:this.opts.enTypeDelay}}):il.isImageNode(e)?rx.fromSrc(e.image[0]["#text"]):il.isVideoNode(e)?rC.fromSrc(e.video[0]["#text"]):null).filter(Boolean):[]},this.appendText=e=>{if(this.customXmlParser.isXml(e)){let n=this.createContentsFromXmlString(e);this.addAllContents(n)}else{let n=rM.fromString(e,{typewriterOptions:{delay:this.opts.typeDelay,enDelay:this.opts.enTypeDelay}});this.addContentRenderTask(n),this.contents.push(n)}},this.dispose=()=>{this.queue.removeAllListeners(),this.contents=[]},this.interrupt=()=>{for(let e of this.contents)e.interrupt();this.queue.clear(),this.emitter.emit("interrupt")},this.bindEvents=()=>{this.queue.on("empty",()=>{this.emitter.emit("queue_empty")})},this.queue=new rO({concurrency:1}),this.customXmlParser=new il,this.bindEvents()}get fulltext(){return this.contents.map(e=>iu.isTextContent(e)?e.getConfig().content:"").join("")}static #k=this.create=e=>new iu({},e);static #G=this.isAllTextContents=e=>e.every(e=>"text"===e.mod);static #ew=this.isTextContent=e=>e instanceof rM&&"text"===e.mod;static #eO=this.isImageContent=e=>e instanceof rx&&"image"===e.mod;static #eR=this.isVideoContent=e=>e instanceof rC&&"video"===e.mod}function id(e,n){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,n)}function ip(e,n){return function(r,i){n(r,i,e)}}class ih{constructor(e){var n=this;this.opts=e,this.beans=[],this.currentConversation=null,this.aiWorkerConversationFormatters=[],this.add=e=>{this.beans.push(e)},this.addBySnapshot=function(){let e,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};switch(r.type){case"client":e=new rf(r,n.opts);break;case"aiWorker":e=new iu(r,n.opts);break;default:throw Error(`Unknown conversation type: ${r.type}`)}return n.beans.push(e),e},this.setCurrentConversation=e=>{this.currentConversation=e},this.clear=()=>{this.beans=[]},this.toJSON=()=>this.beans.map(e=>e.toJSON()),this.dispose=()=>{for(let e of this.beans)e.dispose();this.beans=[],this.currentConversation=null,this.aiWorkerConversationFormatters=[]},this.registerAIWorkerConversationFormatter=e=>{this.aiWorkerConversationFormatters.push(e)},this.runAIWorkerConversationFormatters=e=>{let n=e;for(let e of this.aiWorkerConversationFormatters)n=e(n);return n},this.interruptAll=()=>{for(let e of this.beans)e.interrupt()}}get last(){var e;return null!=(e=this.beans[this.beans.length-1])?e:null}get currentClientConversation(){return ih.isClientConversation(this.currentConversation)?this.currentConversation:null}get currentAIWorkerConversation(){return ih.isAIWorkerConversation(this.currentConversation)?this.currentConversation:null}static isClientConversation(e){return(null==e?void 0:e.type)==="client"}static isAIWorkerConversation(e){return(null==e?void 0:e.type)==="aiWorker"}}ih=function(e,n,r,i){var o,s=arguments.length,a=s<3?n:null===i?i=Object.getOwnPropertyDescriptor(n,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,n,r,i);else for(var c=e.length-1;c>=0;c--)(o=e[c])&&(a=(s<3?o(a):s>3?o(n,r,a):o(n,r))||a);return s>3&&a&&Object.defineProperty(n,r,a),a}([ey(),ip(0,em(t1.IOptions)),ip(0,eR()),id("design:type",Function),id("design:paramtypes",["undefined"==typeof IResolvedOptions?Object:IResolvedOptions])],ih);var im=__webpack_require__("../../node_modules/abort-signal-polyfill/dist/staticMethods/any.js"),ig=__webpack_require__("../../node_modules/abort-signal-polyfill/dist/staticMethods/timeout.js"),iv=__webpack_require__("../../node_modules/abort-signal-polyfill/dist/staticMethods/abort.js");let iy=(e,n)=>{e in AbortSignal||Object.defineProperty(AbortSignal,e,{value:n,configurable:!0,writable:!0})},ib=(e,n)=>{e in AbortSignal&&AbortSignal[e]===n&&delete AbortSignal[e]};var i_=function(){return(i_=Object.assign||function(e){for(var n,r=1,i=arguments.length;r<i;r++)for(var o in n=arguments[r])Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);return e}).apply(this,arguments)},iw=__webpack_require__("../../node_modules/@baidu/weirwood-perf/esm/index.js"),iO=function(){return(iO=Object.assign||function(e){for(var n,r=1,i=arguments.length;r<i;r++)for(var o in n=arguments[r])Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);return e}).apply(this,arguments)};function iR(e){var n="function"==typeof Symbol&&Symbol.iterator,r=n&&e[n],i=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw TypeError(n?"Object is not iterable.":"Symbol.iterator is not defined.")}function iS(){for(var e=[],n=0;n<arguments.length;n++)e=e.concat(function(e,n){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var i,o,s=r.call(e),a=[];try{for(;(void 0===n||n-- >0)&&!(i=s.next()).done;)a.push(i.value)}catch(e){o={error:e}}finally{try{i&&!i.done&&(r=s.return)&&r.call(s)}finally{if(o)throw o.error}}return a}(arguments[n]));return e}function iE(e){switch(Object.prototype.toString.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return e instanceof Error}}function iT(e){return"[object ErrorEvent]"===Object.prototype.toString.call(e)}function iM(e){return void 0===e}function ix(e){return"function"==typeof e}function iC(e){return"[object String]"===Object.prototype.toString.call(e)}function iI(e){return"[object Number]"===Object.prototype.toString.call(e)}function ij(e){return"[object Array]"===Object.prototype.toString.call(e)}function iA(e){return"[object Object]"===Object.prototype.toString.call(e)}function ik(e){if(!iA(e))return!1;for(var n in e)if(e.hasOwnProperty(n))return!1;return!0}var iB={};function iP(){return"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==__webpack_require__.g?__webpack_require__.g:"undefined"!=typeof self?self:iB}var iN=iP(),iD={wrap:function(){return function(){}},report:!1,collectWindowErrors:!1,computeStackTrace:!1,remoteFetching:!1,linesOfContext:!1,extendToAsynchronousCallbacks:!1},iL=[].slice,iF=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/;function iU(e,n){return Object.prototype.hasOwnProperty.call(e,n)}function iq(){return"undefined"==typeof document||null==document.location?"":document.location.href}iD.wrap=function(e){return function(){try{return e.apply(this,arguments)}catch(e){throw iD.report(e),e}}},iD.report=function(){var e,n,r,i,o=[],s=null,a=null;function c(e,n,r,i,s,a){var c=null;if(!n||iD.collectWindowErrors){for(var l in o)if(iU(o,l))try{o[l](e,n,r,i,s,a)}catch(e){c=e}if(c)throw c}}function l(n,r,i,o,s){var l=null;if(s=iT(s)?s.error:s,n=iT(n)?n.message:n,a)iD.computeStackTrace.augmentStackTraceWithInitialElement(a,r,i,n),d();else if(s&&iE(s))(l=iD.computeStackTrace(s)).mechanism="onerror",c(l,!0,s,r,i,o);else{var u,p={url:r,line:i,column:o},h=n;if("[object String]"===({}).toString.call(n)){var f=n.match(iF);f&&(u=f[1],h=f[2])}p.func=iD.computeStackTrace.guessFunctionName(p.url,p.line),p.context=iD.computeStackTrace.gatherContext(p.url,p.line),c(l={name:u,message:h,mode:"onerror",mechanism:"onerror",stack:[iO(iO({},p),{url:p.url||iq()})]},!0,null,r,i,o)}return!!e&&e.apply(this,arguments)}function u(e){var n=e&&(e.detail?e.detail.reason:e.reason)||e,r=iD.computeStackTrace(n);r.mechanism="onunhandledrejection",c(r,!0,n)}function d(){var e=a,n=s;a=null,s=null,c(e,!1,n)}function p(e){if(a)if(s===e)return;else d();var n=iD.computeStackTrace(e);throw a=n,s=e,setTimeout(function(){s===e&&d()},2e3*!!n.incomplete),e}return p.subscribe=function(e){o.push(e)},p.unsubscribe=function(s){for(var a=o.length-1;a>=0;--a)o[a]===s&&o.splice(a,1);0===o.length&&(n&&(iN.onerror=e,n=!1),i&&(iN.onunhandledrejection=r,i=!1))},p.installGlobalHandler=function(){!0!==n&&(e=iN.onerror,iN.onerror=l,n=!0)},p.installGlobalUnhandledRejectionHandler=function(){!0!==i&&(r=iN.onunhandledrejection,iN.onunhandledrejection=u,i=!0)},p}(),iD.computeStackTrace=function(){var e={};function n(n){if("string"!=typeof n)return[];if(!iU(e,n)){var r="",i="";try{i=iN.document.domain}catch(e){}var o=/(.*)\:\/\/([^:\/]+)([:\d]*)\/{0,1}([\s\S]*)/.exec(n);o&&o[2]===i&&(r=function(e){if(!iD.remoteFetching)return"";try{var n=function(){try{return new iN.XMLHttpRequest}catch(e){return new iN.ActiveXObject("Microsoft.XMLHTTP")}}();return n.open("GET",e,!1),n.send(""),n.responseText}catch(e){return""}}(n)),e[n]=r?r.split("\n"):[]}return e[n]}function r(e,r){var i,o=/function ([^(]*)\(([^)]*)\)/,s=/['"]?([0-9A-Za-z$_]+)['"]?\s*[:=]\s*(function|eval|new Function)/,a="",c=n(e);if(!c.length)return"?";for(var l=0;l<10;++l)if(!iM(a=c[r-l]+a)){if(i=s.exec(a))return i[1];else if(i=o.exec(a))return i[1]}return"?"}function i(e,r){var i=n(e);if(!i.length)return null;var o=[],s=Math.floor(iD.linesOfContext/2),a=s+iD.linesOfContext%2,c=Math.max(0,r-s-1),l=Math.min(i.length,r+a-1);r-=1;for(var u=c;u<l;++u)iM(i[u])||o.push(i[u]);return o.length>0?o:null}function o(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#]/g,"\\$&")}function s(e){return o(e).replace("<","(?:<|&lt;)").replace(">","(?:>|&gt;)").replace("&","(?:&|&amp;)").replace('"','(?:"|&quot;)').replace(/\s+/g,"\\s+")}function a(e,r){for(var i,o,s=0,a=r.length;s<a;++s)if((i=n(r[s])).length&&(i=i.join("\n"),o=e.exec(i)))return{url:r[s],line:i.substring(0,o.index).split("\n").length,column:o.index-i.lastIndexOf("\n",o.index)-1};return null}function c(e,r,i){var s,a=n(r),c=RegExp("\\b"+o(e)+"\\b");return(i-=1,a&&a.length>i&&(s=c.exec(a[i])))?s.index:null}function l(e){if(!e.stack)return null;for(var n,o,s,a,l=/^\s*at (?:(.*?) ?\()?((?:file|https?|blob|chrome-extension|native|eval|webpack|<anonymous>|[a-z]:|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,u=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|moz-extension).*?:\/.*?|\[native code\]|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,d=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,p=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,h=/\((\S*)(?::(\d+))(?::(\d+))\)/,f=e.stack.split("\n"),m=[],g=/^(.*) is undefined$/.exec(e.message),v=0,y=f.length;v<y;++v){if(s=l.exec(f[v])){var b=s[2]&&0===s[2].indexOf("native");s[2]&&0===s[2].indexOf("eval")&&(o=h.exec(s[2]))&&(s[2]=o[1]),a={url:b?null:s[2],func:s[1]||"?",args:b?[s[2]]:[],line:s[3]?+s[3]:null,column:s[4]?+s[4]:null}}else if(s=d.exec(f[v]))a={url:s[2],func:s[1]||"?",args:[],line:+s[3],column:s[4]?+s[4]:null};else{if(!(s=u.exec(f[v])))continue;s[3]&&s[3].indexOf(" > eval")>-1&&(o=p.exec(s[3]))?s[3]=o[1]:0!==v||s[5]||iM(e.columnNumber)||(m[0].column=e.columnNumber+1),a={url:s[3],func:s[1]||"?",args:s[2]?s[2].split(","):[],line:s[4]?+s[4]:null,column:s[5]?+s[5]:null}}if(!a.func&&a.line&&(a.func=r(a.url,a.line)),iD.remoteFetching&&a.url&&"blob:"===a.url.substr(0,5)){var _=new XMLHttpRequest;if(_.open("GET",a.url,!1),_.send(""),200===_.status){var w=_.responseText||"",O=(w=w.slice(-300)).match(/\/\/# sourceMappingURL=(.*)$/);if(O){var R=O[1];"~"===R.charAt(0)&&(R=("undefined"==typeof document||null==document.location?"":document.location.origin?document.location.origin:document.location.protocol+"//"+document.location.hostname+(document.location.port?":"+document.location.port:""))+R.slice(1)),a.url=R.slice(0,-4)}}}a.context=a.line?i(a.url,a.line):null,m.push(a)}return m.length?(m[0]&&m[0].line&&!m[0].column&&g&&(m[0].column=c(g[1],m[0].url,m[0].line)),{mode:"stack",name:e.name,message:e.message,stack:m}):null}function u(e,n,o,s){var a={url:n,line:o};if(a.url&&a.line){e.incomplete=!1,a.func||(a.func=r(a.url,a.line)),a.context||(a.context=i(a.url,a.line));var l=/ '([^']+)' /.exec(s);if(l&&(a.column=c(l[1],a.url,a.line)),e.stack.length>0&&e.stack[0].url===a.url){if(e.stack[0].line===a.line)return!1;else if(!e.stack[0].line&&e.stack[0].func===a.func)return e.stack[0].line=a.line,e.stack[0].context=a.context,!1}return e.stack.unshift(a),e.partial=!0,!0}return e.incomplete=!0,!1}function d(e,p){var h=null;p=null==p?0:+p;try{if(h=function(e){var n=e.stacktrace;if(n){for(var o,s=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,a=/ line (\d+), column (\d+)\s*(?:in (?:<anonymous function: ([^>]+)>|([^\)]+))\((.*)\))? in (.*):\s*$/i,c=n.split("\n"),l=[],u=0;u<c.length;u+=2){var d=null;if((o=s.exec(c[u]))?d={url:o[2],line:+o[1],column:null,func:o[3],args:[]}:(o=a.exec(c[u]))&&(d={url:o[6],line:+o[1],column:+o[2],func:o[3]||o[4],args:o[5]?o[5].split(","):[]}),d){if(!d.func&&d.line&&(d.func=r(d.url,d.line)),d.line)try{d.context=i(d.url,d.line)}catch(e){}d.context||(d.context=[c[u+1]]),l.push(d)}}return l.length?{mode:"stacktrace",name:e.name,message:e.message,stack:l}:null}}(e))return h}catch(e){}try{if(h=l(e))return h}catch(e){}try{if(h=function(e){var o=e.message.split("\n");if(o.length<4)return null;var c,l=/^\s*Line (\d+) of linked script ((?:file|https?|blob)\S+)(?:: in function (\S+))?\s*$/i,u=/^\s*Line (\d+) of inline#(\d+) script in ((?:file|https?|blob)\S+)(?:: in function (\S+))?\s*$/i,d=/^\s*Line (\d+) of function script\s*$/i,p=[],h=iN&&iN.document&&iN.document.getElementsByTagName("script"),f=[];for(var m in h)iU(h,m)&&!h[m].src&&f.push(h[m]);for(var g=2;g<o.length;g+=2){var v=null;if(c=l.exec(o[g]))v={url:c[2],func:c[3],args:[],line:+c[1],column:null};else if(c=u.exec(o[g])){v={url:c[3],func:c[4],args:[],line:+c[1],column:null};var y=+c[1],b=f[c[2]-1];if(b){var _=n(v.url);if(_){var w=(_=_.join("\n")).indexOf(b.innerText);w>=0&&(v.line=y+_.substring(0,w).split("\n").length)}}}else if(c=d.exec(o[g])){var O=iq().replace(/#.*$/,""),R=a(new RegExp(s(o[g+1])),[O]);v={url:O,func:"",args:[],line:R?R.line:c[1],column:null}}if(v){v.func||(v.func=r(v.url,v.line));var S=i(v.url,v.line),E=S?S[Math.floor(S.length/2)]:null;S&&E.replace(/^\s*/,"")===o[g+1].replace(/^\s*/,"")?v.context=S:v.context=[o[g+1]],p.push(v)}}return p.length?{mode:"multiline",name:e.name,message:o[0],stack:p}:null}(e))return h}catch(e){}try{if(h=function e(n,i){for(var l,p,h,f=/function\s+([_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*)?\s*\(/i,m=[],g={},v=!1,y=e.caller;y&&!v;y=y.caller)if(y!==d&&y!==iD.report){if(p={url:null,func:"?",args:[],line:null,column:null},y.name?p.func=y.name:(l=f.exec(y.toString()))&&(p.func=l[1]),void 0===p.func)try{p.func=l.input.substring(0,l.input.indexOf("{"))}catch(e){}if(h=function(e){if(!iM(iN&&iN.document)){for(var n,r,i,c,l=[iq()],u=iN.document.getElementsByTagName("script"),d=""+e,p=0;p<u.length;++p){var h=u[p];h.src&&l.push(h.src)}if(i=/^function(?:\s+([\w$]+))?\s*\(([\w\s,]*)\)\s*\{\s*(\S[\s\S]*\S)\s*\}\s*$/.exec(d)){var f=i[1]?"\\s+"+i[1]:"",m=i[2].split(",").join("\\s*,\\s*");r=RegExp("function"+f+"\\s*\\(\\s*"+m+"\\s*\\)\\s*{\\s*"+(n=o(i[3]).replace(/;$/,";?"))+"\\s*}")}else r=new RegExp(o(d).replace(/\s+/g,"\\s+"));if(c=a(r,l))return c;if(i=/^function on([\w$]+)\s*\(event\)\s*\{\s*(\S[\s\S]*\S)\s*\}\s*$/.exec(d)){var g=i[1];if((c=a(r=RegExp("on"+g+"=[\\'\"]\\s*"+(n=s(i[2]))+"\\s*[\\'\"]","i"),l[0]))||(c=a(r=new RegExp(n),l)))return c}return null}}(y)){p.url=h.url,p.line=h.line,"?"===p.func&&(p.func=r(p.url,p.line));var b=/ '([^']+)' /.exec(n.message||n.description);b&&(p.column=c(b[1],h.url,h.line))}g[""+y]?v=!0:g[""+y]=!0,m.push(p)}i&&m.splice(0,i);var _={mode:"callers",name:n.name,message:n.message,stack:m};return u(_,n.sourceURL||n.fileName,n.line||n.lineNumber,n.message||n.description),_}(e,p+1))return h}catch(e){}return{original:e,name:e.name,message:e.message,mode:"failed"}}return d.augmentStackTraceWithInitialElement=u,d.computeStackTraceFromStackProp=l,d.guessFunctionName=r,d.gatherContext=i,d.ofCaller=function(e){e=(null==e?0:+e)+1;try{throw Error()}catch(n){return d(n,e+1)}},d.getSource=n,d}(),iD.extendToAsynchronousCallbacks=function(){var e=function(e){var n=iN[e];iN[e]=function(){var e=iL.call(arguments),r=e[0];return("function"==typeof r&&(e[0]=iD.wrap(r)),n.apply)?n.apply(this,e):n(e[0],e[1])}};e("setTimeout"),e("setInterval")},iD.remoteFetching=!1,iD.collectWindowErrors=!0,iD.linesOfContext=11,iD.report;var iH=iD.report.subscribe,iV=iD.report.unsubscribe,iX=iD.report.installGlobalHandler,iW=iD.report.installGlobalUnhandledRejectionHandler,i$=iD.computeStackTrace;function iz(e,n){var r=(65535&e)+(65535&n);return(e>>16)+(n>>16)+(r>>16)<<16|65535&r}function iG(e,n,r,i,o,s){var a,c;return iz((a=iz(iz(n,e),iz(i,s)))<<(c=o)|a>>>32-c,r)}function iK(e,n,r,i,o,s,a){return iG(n&r|~n&i,e,n,o,s,a)}function iY(e,n,r,i,o,s,a){return iG(n&i|r&~i,e,n,o,s,a)}function iQ(e,n,r,i,o,s,a){return iG(n^r^i,e,n,o,s,a)}function iJ(e,n,r,i,o,s,a){return iG(r^(n|~i),e,n,o,s,a)}function iZ(e,n){e[n>>5]|=128<<n%32,e[(n+64>>>9<<4)+14]=n;var r,i,o,s,a,c=0x67452301,l=-0x10325477,u=-0x67452302,d=0x10325476;for(r=0;r<e.length;r+=16)i=c,o=l,s=u,a=d,c=iK(c,l,u,d,e[r],7,-0x28955b88),d=iK(d,c,l,u,e[r+1],12,-0x173848aa),u=iK(u,d,c,l,e[r+2],17,0x242070db),l=iK(l,u,d,c,e[r+3],22,-0x3e423112),c=iK(c,l,u,d,e[r+4],7,-0xa83f051),d=iK(d,c,l,u,e[r+5],12,0x4787c62a),u=iK(u,d,c,l,e[r+6],17,-0x57cfb9ed),l=iK(l,u,d,c,e[r+7],22,-0x2b96aff),c=iK(c,l,u,d,e[r+8],7,0x698098d8),d=iK(d,c,l,u,e[r+9],12,-0x74bb0851),u=iK(u,d,c,l,e[r+10],17,-42063),l=iK(l,u,d,c,e[r+11],22,-0x76a32842),c=iK(c,l,u,d,e[r+12],7,0x6b901122),d=iK(d,c,l,u,e[r+13],12,-0x2678e6d),u=iK(u,d,c,l,e[r+14],17,-0x5986bc72),l=iK(l,u,d,c,e[r+15],22,0x49b40821),c=iY(c,l,u,d,e[r+1],5,-0x9e1da9e),d=iY(d,c,l,u,e[r+6],9,-0x3fbf4cc0),u=iY(u,d,c,l,e[r+11],14,0x265e5a51),l=iY(l,u,d,c,e[r],20,-0x16493856),c=iY(c,l,u,d,e[r+5],5,-0x29d0efa3),d=iY(d,c,l,u,e[r+10],9,0x2441453),u=iY(u,d,c,l,e[r+15],14,-0x275e197f),l=iY(l,u,d,c,e[r+4],20,-0x182c0438),c=iY(c,l,u,d,e[r+9],5,0x21e1cde6),d=iY(d,c,l,u,e[r+14],9,-0x3cc8f82a),u=iY(u,d,c,l,e[r+3],14,-0xb2af279),l=iY(l,u,d,c,e[r+8],20,0x455a14ed),c=iY(c,l,u,d,e[r+13],5,-0x561c16fb),d=iY(d,c,l,u,e[r+2],9,-0x3105c08),u=iY(u,d,c,l,e[r+7],14,0x676f02d9),l=iY(l,u,d,c,e[r+12],20,-0x72d5b376),c=iQ(c,l,u,d,e[r+5],4,-378558),d=iQ(d,c,l,u,e[r+8],11,-0x788e097f),u=iQ(u,d,c,l,e[r+11],16,0x6d9d6122),l=iQ(l,u,d,c,e[r+14],23,-0x21ac7f4),c=iQ(c,l,u,d,e[r+1],4,-0x5b4115bc),d=iQ(d,c,l,u,e[r+4],11,0x4bdecfa9),u=iQ(u,d,c,l,e[r+7],16,-0x944b4a0),l=iQ(l,u,d,c,e[r+10],23,-0x41404390),c=iQ(c,l,u,d,e[r+13],4,0x289b7ec6),d=iQ(d,c,l,u,e[r],11,-0x155ed806),u=iQ(u,d,c,l,e[r+3],16,-0x2b10cf7b),l=iQ(l,u,d,c,e[r+6],23,0x4881d05),c=iQ(c,l,u,d,e[r+9],4,-0x262b2fc7),d=iQ(d,c,l,u,e[r+12],11,-0x1924661b),u=iQ(u,d,c,l,e[r+15],16,0x1fa27cf8),l=iQ(l,u,d,c,e[r+2],23,-0x3b53a99b),c=iJ(c,l,u,d,e[r],6,-0xbd6ddbc),d=iJ(d,c,l,u,e[r+7],10,0x432aff97),u=iJ(u,d,c,l,e[r+14],15,-0x546bdc59),l=iJ(l,u,d,c,e[r+5],21,-0x36c5fc7),c=iJ(c,l,u,d,e[r+12],6,0x655b59c3),d=iJ(d,c,l,u,e[r+3],10,-0x70f3336e),u=iJ(u,d,c,l,e[r+10],15,-1051523),l=iJ(l,u,d,c,e[r+1],21,-0x7a7ba22f),c=iJ(c,l,u,d,e[r+8],6,0x6fa87e4f),d=iJ(d,c,l,u,e[r+15],10,-0x1d31920),u=iJ(u,d,c,l,e[r+6],15,-0x5cfebcec),l=iJ(l,u,d,c,e[r+13],21,0x4e0811a1),c=iJ(c,l,u,d,e[r+4],6,-0x8ac817e),d=iJ(d,c,l,u,e[r+11],10,-0x42c50dcb),u=iJ(u,d,c,l,e[r+2],15,0x2ad7d2bb),l=iJ(l,u,d,c,e[r+9],21,-0x14792c6f),c=iz(c,i),l=iz(l,o),u=iz(u,s),d=iz(d,a);return[c,l,u,d]}function i0(e){var n,r="",i=32*e.length;for(n=0;n<i;n+=8)r+=String.fromCharCode(e[n>>5]>>>n%32&255);return r}function i1(e){var n,r=[];for(n=0,r[(e.length>>2)-1]=void 0;n<r.length;n+=1)r[n]=0;var i=8*e.length;for(n=0;n<i;n+=8)r[n>>5]|=(255&e.charCodeAt(n/8))<<n%32;return r}function i2(e){var n,r,i="0123456789abcdef",o="";for(r=0;r<e.length;r+=1)n=e.charCodeAt(r),o+=i.charAt(n>>>4&15)+i.charAt(15&n);return o}function i3(e){return unescape(encodeURIComponent(e))}function i6(e){var n;return i0(iZ(i1(n=i3(e)),8*n.length))}function i5(e,n){return function(e,n){var r,i,o=i1(e),s=[],a=[];for(s[15]=a[15]=void 0,o.length>16&&(o=iZ(o,8*e.length)),r=0;r<16;r+=1)s[r]=0x36363636^o[r],a[r]=0x5c5c5c5c^o[r];return i=iZ(s.concat(i1(n)),512+8*n.length),i0(iZ(a.concat(i),640))}(i3(e),i3(n))}function i4(e,n,r){if(!n)return r?i6(e):i2(i6(e));return r?i5(n,e):i2(i5(n,e))}function i8(e){return(e||"").replace(/#.*$/,"").replace(/\?.*$/,"")}function i9(){if(!("fetch"in iP()))return!1;try{return new Headers,new Request(""),new Response,!0}catch(e){return!1}}function i7(e,n){for(var r=0;r<e.length;++r)if(e[r]===n)return r;return -1}function oe(e,n,r,i){var o,s,a,c;return JSON.stringify(e,(o=n,a=[],c=[],null==(s=i)&&(s=function(e,n){return a[0]===n?"[Circular ~]":"[Circular ~."+c.slice(0,i7(a,n)).join(".")+"]"}),function(e,n){if(a.length>0){var r=i7(a,this);~r?a.splice(r+1):a.push(this),~r?c.splice(r,1/0,e):c.push(e),~i7(a,n)&&(n=s.call(this,e,n))}else a.push(n);return null==o?n instanceof Error?function(e){var n={stack:e.stack,message:e.message,name:e.name};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n}(n):n:o.call(this,e,n)}),r)}function ot(e,n){if(Array.isArray(e))for(var r=e.length,i=0;i<r;i++)n.call(null,i,e[i]);else for(var o in e)Reflect.has(e,o)&&n.call(null,o,e[o])}function on(e){var n={};for(var r in e)if(e.hasOwnProperty(r)){var i=e[r];n[r]=ix(i)?i():i}return n}function or(e){var n;return iC(e)?oi(e,40):iI(e)||(n=e,"[object Boolean]"===Object.prototype.toString.call(n))||iM(e)?e+"":iA(e)?"[Object]":ij(e)?"[Array]":ix(e)?e.name?"[Function: "+e.name+"]":"[Function]":e}function oi(e,n){return 0===n||e.length<=n?e:e.substr(0,n)+"…"}function oo(e){var n={protocol:"",host:"",path:"",relative:""};if("string"!=typeof e)return n;var r=e.match(/^(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(r&&r.length){var i=r[6]||"",o=r[8]||"";return{protocol:r[2]||"",host:r[4]||"",path:r[5]||"",relative:(r[5]||"")+i+o}}return n}function os(e){var n=e.exception,r=[];return r.push("token="+n.token),r.push("type="+n.type),r.push("mechanism="+n.mechanism),r.push("value="+n.value),r.push("url="+n.url),n.stacktrace&&n.stacktrace.forEach(function(e){r.push("filename="+e.filename),r.push("lineno="+e.lineno),r.push("colno="+e.colno)}),r.join("***")}function oa(e){return e&&Array.isArray(e)&&e.length>0}function oc(e){for(var n=[],r=e.length,i=0;i<r;i++){var o=e[i];iC(o)?n.push(o.replace(/([.*+?^=!:${}()|\[\]\/\\])/g,"\\$1")):o&&o.source&&n.push(o.source)}return RegExp(n.join("|"),"i")}function ol(e,n){return!!iC(n)&&e.some(function(e){var r;if(!e)return!1;if(iC(e))return -1!==n.indexOf(e);if(r=e,"[object RegExp]"===Object.prototype.toString.call(r))try{return e.test(n)}catch(n){return console.error(e+"正则书写有误"),!1}return console.error(e+"忽略匹配项类型应该是String、RegExp"),!1})}function ou(e){return(iC(e)?e:JSON.stringify(e)).slice(0,256)}function od(e,n,r){var i,o,s=[];if(e.stack&&e.stack.length){try{for(var a=iR(e.stack),c=a.next();!c.done;c=a.next()){var l=c.value,u=function(e,n,r){var i={filename:e.url||n,lineno:e.line,colno:e.column,function:e.func||"?"};if(r&&r.length>0){var o=oc(r).test(i.filename),s=/(Weirwood|Tracekit)/.test(i.function),a=/weirwood\-sdk/.test(i.filename);i.in_app=o,(s||a)&&(i.in_app=!1)}else i.in_app=!1;return i}(l,e.url||"",n.includePaths);s.push(u)}}catch(e){i={error:e}}finally{try{c&&!c.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}if(n&&n.trimHeadFrames)for(var d=0;d<n.trimHeadFrames&&d<s.length;d++)s[d].in_app=!1}return s=(s=s.filter(function(e){var n,r,i;return r=-1!==(n=e.filename||"").indexOf("weirwood-sdk"),i=/captureException$/.test(n),!r&&!i})).slice(0,r)}function op(e,n,r,i){if(null!=e){var o=e[n];return e[n]=r(o),e[n].__raven__=!0,e[n].__orig__=o,o.__raven_wrapper__=e[n],i&&i.push([e,n,o]),e[n]}}function oh(e,n,r){if(void 0===e&&(e={}),iM(n)&&!ix(e))return e;if(ix(e)&&(n=e,e=void 0),!ix(n))return n;try{if(n.__raven__)return n;if(n.__raven_wrapper__)return n.__raven_wrapper__}catch(e){return n}function i(){for(var i=[],o=0;o<arguments.length;o++)i[o]=arguments[o];var s=[],a=i.length,c=!e||e&&!1!==e.deep;for(r&&ix(r)&&r.apply(this,i);a--;)s[a]=c?oh(e,i[a]):i[a];try{return n.apply(this,s)}catch(e){throw e}}for(var o in n)n.hasOwnProperty(o)&&(i[o]=n[o]);return i.prototype=n.prototype,n.__raven_wrapper__=i,i.__raven__=!0,i.__orig__=n,i}function of(e){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var i=n[0];return(ix(i)&&(n[0]=oh({mechanism:{type:"instrument",data:{function:(null==e?void 0:e.name)||"<anonymous>"}}},i)),e.apply)?e.apply(this,n):e(n[0],n[1])}}function om(e,n){return function(r){if(O=void 0,R!==r){R=r;try{i=function(e){for(var n,r=[],i=3,o=0,s=0;e&&o++<5;){var a="html"===(n=function(e){if(!e||!e.tagName)return"";var n,r,i,o,s=[e.tagName.toLowerCase()];e.id&&s.push("#"+e.id);var a=e.className?e.className.split(/\s+/):[];try{for(var c=iR(a),l=c.next();!l.done;l=c.next()){var u=l.value;s.push("."+u)}}catch(e){n={error:e}}finally{try{l&&!l.done&&(r=c.return)&&r.call(c)}finally{if(n)throw n.error}}try{for(var d=iR(["type","name","title","alt"]),p=d.next();!p.done;p=d.next()){var h=p.value,f=e.getAttribute(h);f&&s.push("["+h+"="+f+"]")}}catch(e){i={error:e}}finally{try{p&&!p.done&&(o=d.return)&&o.call(d)}finally{if(i)throw i.error}}return s.join("")}(e)),c=o>1&&s+r.length*i+n.length>=80;if(a||c)break;r.push(n),s+=n.length,e=e.parentNode}return r.reverse().join(" > ")}(r.target)}catch(e){i="<unknown>"}if(i){var i,o={category:"ui."+n,message:i,name:n};"input"===n&&"password"!==i.type&&(o.data=r.target.value||""),e.captureBehavior(o)}}}}function og(e){return function(n){try{r=n.target}catch(e){return}var r,i=r&&r.tagName;i&&("INPUT"===i||"TEXTAREA"===i||r.isContentEditable)&&(O||om(e,"input")(n),clearTimeout(O),O=setTimeout(function(){O=void 0},1e3))}}__webpack_require__("../../node_modules/@baidu/weirwood-error/esm/plugins/Plugin.js");var ov=iP(),oy=[301,302,304],ob=function(){function e(n){this.name=e.id,this.options=iO({beacon:!0,console:!0,dom:!0,fetch:!0,history:!0,weirwood:!0,xhr:!0},n)}return e.prototype.setupOnce=function(e){this.client=e;var n,r,i=Object.keys(this.options);try{for(var o=iR(i),s=o.next();!s.done;s=o.next()){var a=s.value,c="instrument"+a[0].toUpperCase()+a.slice(1);this.options[a]&&this[c]&&"function"==typeof this[c]&&this[c].call(this)}}catch(e){n={error:e}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(n)throw n.error}}},e.prototype.instrumentDom=function(){if("document"in iP()){var e=ov.document;e.addEventListener("click",om.call(this,this.client,"click"),!1),e.addEventListener("keypress",og.call(this,this.client),!1)}},e.prototype.instrumentXhr=function(){var e=this.client,n=e.options,r=n.collectAutoAPIException,i=n.isApiException;if("XMLHttpRequest"in ov){var o=XMLHttpRequest.prototype,s=e._globalKey||"";op(o,"open",function(e){return function(n,r){return iC(r)&&-1===r.indexOf(s)&&(this.__raven_xhr={method:n,url:r,status_code:null}),e.apply(this,arguments)}},e._wrappedBuiltIns),op(o,"abort",function(e){return function(){return this.__raven_xhr&&(this.__raven_xhr.abortedFlag=!0),e.apply(this,arguments)}},e._wrappedBuiltIns),op(o,"send",function(n){return function(){var o=this,s=arguments;function a(){if(o.__raven_xhr&&4===o.readyState){try{o.__raven_xhr.status_code=o.status}catch(e){}var n=function(e,n){if(void 0===e&&(e=""),void 0===n&&(n=""),(""===e||"text"===e)&&iC(n)&&n.length)try{return JSON.parse(n)}catch(e){return n}return"json"===e?JSON.parse(JSON.stringify(n)):""}(o.responseType,o.response);if((e.captureBehavior({type:"http",category:"xhr",data:iO(iO({},o.__raven_xhr),{response:ou(n),params:ou(s&&s[0]?s[0]:"")})}),r)&&(!o.__raven_xhr||!o.__raven_xhr.abortedFlag)){var a=!1,c=o.status>=200&&o.status<=299,l=-1!==oy.indexOf(o.status);if(c||l||(a=!0),c&&i&&ix(i)&&(a=!!i({method:o.__raven_xhr.method,url:o.responseURL,status:o.status,responseType:o.responseType,response:n})),a){var u="";ix(o.getAllResponseHeaders)&&(u=o.getAllResponseHeaders().trim().replace(/[\r\n]+/g,"***")),e.captureAPIException({url:o.responseURL||o.__raven_xhr.url,method:o.__raven_xhr.method,params:s&&s[0]?s[0]:"",status:o.status,response:(iC(n)?n:JSON.stringify(n)).slice(0,8192),responseHeaders:u,user:"",extra:"AUTO_XHR"})}}}}for(var c=["onload","onerror","onprogress"],l=0;l<c.length;l++)!function(e,n){e in n&&ix(n[e])&&op(n,e,function(n){return oh({mechanism:{data:{function:e,handler:n&&n.name||"<anonymous>"},handled:!0,type:"instrument"}},n)})}(c[l],o);return"onreadystatechange"in o&&ix(o.onreadystatechange)?op(o,"onreadystatechange",function(e){return oh({mechanism:{type:"instrument",data:{function:"onreadystatechange",handler:e&&e.name||"<anonymous>"}}},e,a)}):o.onreadystatechange=a,n.apply(this,arguments)}},e._wrappedBuiltIns)}},e.prototype.instrumentFetch=function(){if(i9()){var e=iP(),n=this.client,r=n.options,i=r.collectAutoAPIException,o=r.isApiException,s=n._globalKey;op(ov,"fetch",function(r){return function(){for(var a,c=Array(arguments.length),l=0;l<c.length;++l)c[l]=arguments[l];var u=c[0],d="GET";if("string"==typeof u?a=u:"Request"in e&&u instanceof e.Request?(a=u.url,(null==u?void 0:u.method)&&(d=u.method)):a=""+u,-1!==a.indexOf(s))return r.apply(this,c);c[1]&&c[1].method&&(d=c[1].method);var p={method:d,url:a,status_code:null};return r.apply(this,c).then(function(e){p.status_code=e.status;var r,s,a="";c[1]&&c[1].body&&(a=c[1].body);var l=ix(e.clone)?e.clone():null,u={type:"http",category:"fetch",data:iO(iO({},p),{params:ou(a),response:""})};if(l?l.text().then(function(e){var r;try{r=JSON.parse(e)}catch(n){r=e}u.data.response=ou(r),n.captureBehavior(u)}):n.captureBehavior(u),!i)return e;var d=!1,h=ix(e.clone)?e.clone():null,f=oy.includes(e.status);e.ok||f||(d=!0);var m={method:p.method,url:p.url,status:e.status,response:""},g=[];try{for(var v=iR(e.headers.entries()),y=v.next();!y.done;y=v.next()){var b=y.value;g.push(b[0]+": "+b[1])}}catch(e){r={error:e}}finally{try{y&&!y.done&&(s=v.return)&&s.call(v)}finally{if(r)throw r.error}}var _=iO(iO({},m),{params:a,responseHeaders:g.join("***"),user:"",extra:"AUTO_FETCH"});return h?h.text().then(function(r){var i;try{i=JSON.parse(r)}catch(e){i=r}e.ok&&ix(o)&&(d=!!o(iO(iO({},m),{response:i}))),d&&n.captureAPIException(iO(iO({},_),{response:r.slice(0,8192)}))}).catch(function(e){console.error(e)}):(e.ok&&ix(o)&&(d=!!o(m)),d&&n.captureAPIException(_)),e}).catch(function(e){throw n.captureBehavior({type:"http",category:"fetch",data:p,level:"error"}),e})}},n._wrappedBuiltIns)}},e.prototype.instrumentHistory=function(){var e,n,r,i,o=this.client;if(r=(n=(e=iP()).chrome)&&n.app&&n.app.runtime,i="history"in e&&!!e.history.pushState&&!!e.history.replaceState,!r&&i){var s=function(e,n){var r=oo(ov.location.href),i=oo(n),s=oo(e);s.path||(s=r),S=n,r.protocol===i.protocol&&r.host===i.host&&(n=i.relative),r.protocol===s.protocol&&r.host===s.host&&(e=s.relative),o.captureBehavior({category:"navigation",data:{from:e,to:n}})},a=ov.onpopstate;ov.onpopstate=function(e){var n=ov.location.href;if(s(S,n),a)return a.apply(ov,e)},op(ov.history,"pushState",c),op(ov.history,"replaceState",c)}function c(e){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var i=n.length>2?n[2]:void 0;return i&&s(S,String(i)),e.apply(this,n)}}},e.prototype.instrumentConsole=function(){},e.prototype.instrumentBeacon=function(){},e.id="behaviors",e}(),o_=iP(),ow=function(){function e(n){this.name=e.id,this.options=iO({active:!0},n)}return e.prototype.setupOnce=function(e){this.client=e,this.options.active&&op(o_,"setTimeout",of,this.client._wrappedBuiltIns)},e.id="trycatch",e}(),oO=iP(),oR=function(){function e(){this.name=e.id}return e.prototype.setupOnce=function(e){this.client=e,this.client.captureUserAgent(this.getUserAgent())},e.prototype.getUserAgent=function(){return"navigator"in oO&&"document"in oO?{url:oO.location.href,headers:{"User-Agent":oO.navigator.userAgent,Referrer:oO.document.referrer}}:{}},e.id="UserAgent",e}(),oS={collectWindowErrors:!0,collectUnhandledRejections:!0,collectResourceLoadErrors:!1,collectAutoAPIException:!0,sampleRate:1,maxUrlLength:250,maxMessageLength:0,allowDuplicates:!1,stackTraceLimit:50,behaviorLimit:10,plugins:[],ignoreErrors:[],ignoreKeys:[],whitelistUrls:[],apiWhitelistUrls:[],resourceWhitelistUrls:[],ignoreUrls:[],ignoreJsUrls:[],ignoreApiUrls:[],ignoreApiStatus:[],ignoreResourceUrls:[],maxMessagePerMinute:10,endpoint:"https://fclog.baidu.com/log/weirwood?type=error"},oE="https://dmpstatic.cdn.bcebos.com/weirwood",oT=function(){function e(e){this.options=oS,this._globalContext={env:{},user:{},session_id:""},this._globalKey="fclog.baidu.com/log",this._currentExceptionContext={},this._currentExceptionStartTime=Date.now(),this._behaviors=[],this._lastData=null,this._lastAPIData=null,this._messagesSendLastMinute=0,this._messagesSendEmptyStartTime=Date.now(),this._installed=!1,this._globalErrorHandler=null,this._fetchDefaults={method:"POST",credentials:"include",referrerPolicy:!function(){if(!i9())return!1;try{return new Request("pickleRick",{referrerPolicy:"origin"}),!0}catch(e){return!1}}()?"":"origin"},this._wrappedBuiltIns=[],this._requestInfo=null,e&&this.config(e)}return e.prototype.init=function(e){return this.config(e)},e.prototype.config=function(e){this.options=iO(iO({},this.options),e),this.options.sendWindow=this.options.sendWindow||iP(),this._globalContext.session_id=this.options.uuid4();var n=this.options,r=n.token,i=n.buildid;if(!r||!i)throw Error("error: token and buildid must be provided");return this.setFilters(),this.install(),this},e.prototype.install=function(){var e,n=this;return this._installed?(console.error("error: Weirwood Error SDK has been installed and configured"),!1):(this.options.collectWindowErrors&&iX(),this.options.maxMessagePerMinute>=60&&(this.options.maxMessagePerMinute=60),this.options.collectUnhandledRejections&&iW(),this._globalErrorHandler=this._getErrorHandler().bind(this),iH(this._globalErrorHandler),this.options.collectResourceLoadErrors&&(e=function(e){if(window.performance&&window.performance.getEntriesByName){var r,i=window.performance.getEntriesByName(e.asset);i.length>0&&(r=i[0],["name","serverTiming"].forEach(function(e){delete r[e]}))}var o={mechanism:e.type,name:"ResourceError",message:e.asset,stack:[],mode:"onerror",timing:r,page:e.page,element:e.element,elementPath:e.path.slice(0,255)};n._handleStackInfo(o,{trimHeadFrames:0,mechanism:o.mechanism||"generic",includePaths:n.options.includePaths})},window.addEventListener("error",function(n){if(n&&n.target&&n.target!==window){var r,i=n.target,o=null!=(r=null==i?void 0:i.tagName)?r:"unknown tagname";if(-1!==["SCRIPT","LINK","IMG"].indexOf(o)){var s=i.src||i.href,a=window.location.href,c=function(e){for(var n=e.path||[],r="",i=0;i<n.length;i++){var o=n[i];if(o===window){r+="Window";continue}r+=o.nodeName,r+=o.id?"#"+o.id:"",r+=o.className?"."+o.className.split(" ").join("."):"",i<n.length&&(r+=" > ")}return r}(n),l={type:o,asset:i8(s)===i8(a)?"空资源":s,integrity:i.integrity,element:i&&i.outerHTML&&i.outerHTML.replace(/"/g,""),path:c.replace(/"/g,""),page:window.location.href.slice(0,255)};e&&e(l)}}},!0)),this._installed=!0,this.installPlugins(),this)},e.prototype.installPlugins=function(){var e,n;this.options.plugins=iS([new ob(this.options.behaviorOptions),new ow(this.options.tryCatchOptions),new oR],this.options.plugins||[]);try{for(var r=iR(this.options.plugins),i=r.next();!i.done;i=r.next())i.value.setupOnce(this)}catch(n){e={error:n}}finally{try{i&&!i.done&&(n=r.return)&&n.call(r)}finally{if(e)throw e.error}}},e.prototype.setFilters=function(){var e=this.options;e.ignoreErrors&&(e.ignoreErrors=iS([/^Script error\.?$/,/^Javascript error: Script error\.? on line 0$/,'{"isTrusted":true}','{"isTrusted":false}',"Network Error","ResizeObserver loop"],e.ignoreErrors||[])),e.ignoreJsUrls=iS(["chrome-extension","safari-extension","moz-extension",oE],e.ignoreJsUrls||[])},e.prototype._getErrorHandler=function(){var e=this;return function(n,r,i,o,s,a){if(i&&(i.stack||i.stacktrace)&&(n.originalStack=((i.stack||i.stacktrace)+"").slice(0,1e4)),n.stack&&!n.stack.length&&o&&(n.stack[0]={url:o,line:s,column:a}),!n.name&&!n.message&&"onunhandledrejection"===n.mechanism){var c=iP();n.name="unhandledrejection",n.url=n.url||c.location.href,n.message=i}e._handleStackInfo(n,{trimHeadFrames:0,mechanism:n.mechanism||"generic",includePaths:e.options.includePaths})}},e.prototype._handleStackInfo=function(e,n){var r=od(e,n,this.options.stackTraceLimit);this._processException(e,r,n)},e.prototype._processException=function(e,n,r){var i=this.options,o=i.ignoreErrors,s=void 0===o?[]:o,a=i.ignoreKeys,c=void 0===a?[]:a,l=i.whitelistUrls,u=void 0===l?[]:l,d=i.resourceWhitelistUrls,p=void 0===d?[]:d,h=i.ignoreUrls,f=void 0===h?[]:h,m=i.ignoreJsUrls,g=void 0===m?[]:m,v=i.ignoreResourceUrls,y=void 0===v?[]:v,b=e.name,_=e.message,w=e.url,O=void 0===w?"":w,R=e.page,S=void 0===R?window.location.href:R,E=e.lineno,T=e.originalStack;if(!(s.length&&ol(s,_)||f.length&&ol(f,S))){var M=(j=n,A=O,j&&j.length&&j[0].filename||A);if("ResourceError"===b){if(y.length&&ol(y,_)||p.length&&!ol(p,_))return}else if(c.length&&ol(c,b)||g.length&&ol(g,M)||u.length&&!ol(u,M))return;if(n&&n.length>0){var x=n[0].filename||"",C=-1!==x.indexOf("@baidu/weirwood-error"),I=-1!==x.indexOf(oE);if(C||I)return}if(-1===M.indexOf(oE)){var j,A,k,B,P,N=(k=n,B=O,P=void 0===E?0:E,k&&k.length?k.reverse():B?[{filename:B,lineno:P||0,in_app:!0}]:[]),D=iO(iO({},r),{exception:{type:b,value:_,originalStack:void 0===T?"":T,stacktrace:N,url:"ResourceError"===b?_:M,page:e.page,element:e.element,timing:e.timing,elementPath:e.elementPath}}),L=D.exception;null==L.type&&""===L.value&&(L.value="Unrecoverable error caught"),!D.exception.mechanism&&D.mechanism&&(D.exception.mechanism=D.mechanism,delete D.mechanism),this._send(D)}}},e.prototype.mergeGlobalContext=function(e){var n,r,i,o=iP();e.env=iO(iO(iO({},this._globalContext.env),e.env),{network:null==(i=o.navigator.connection)?void 0:i.effectiveType,windowHeight:(o.document.documentElement||o.document.body).clientHeight,windowWidth:(o.document.documentElement||o.document.body).clientWidth,documentTitle:o.document.title});try{for(var s=iR(Object.keys(this._currentExceptionContext)),a=s.next();!a.done;a=s.next()){var c=a.value;e.env[c]=this._currentExceptionContext[c]}}catch(e){n={error:e}}finally{try{a&&!a.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}e.env["session:duration"]=Date.now()-this._currentExceptionStartTime,this._globalContext.user&&(e.user=this._globalContext.user),this._globalContext.session_id&&(e.session_id=this._globalContext.session_id)},e.prototype._send=function(e){var n={request:this._requestInfo};if(iM(e.trimHeadFrames)||delete e.trimHeadFrames,e=iO(iO({},n),e),this.mergeGlobalContext(e),this._behaviors&&this._behaviors.length>0){var r=[].slice.call(this._behaviors,0);this.options.behaviorDataCallback&&(r=this.options.behaviorDataCallback(r)),e.behaviors=r}var i=this.options;if(i.token&&(e.token=i.token),i.buildid&&(e.buildid=i.buildid),Object.keys(e=this._sanitizeData(e)).forEach(function(n){(null==e[n]||""===e[n]||ik(e[n]))&&delete e[n]}),ix(i.dataCallback)&&(e=i.dataCallback(e)),!(!e||ik(e))){var o=Date.now()-this._messagesSendEmptyStartTime,s=this._messagesSendLastMinute>this.options.maxMessagePerMinute;if(o<6e4){if(s)return}else this._messagesSendEmptyStartTime=Date.now(),this._messagesSendLastMinute=1;"number"==typeof i.sampleRate?Math.random()<i.sampleRate&&(this._sendProcessedPayload(e),this._messagesSendLastMinute+=1):(this._sendProcessedPayload(e),this._messagesSendLastMinute+=1)}},e.prototype.isSetup=function(){return this._installed},e.prototype._trimPacket=function(e){var n,r,i=this.options.maxUrlLength||0,o=this.options.maxMessageLength||0;if(e.exception&&(e.exception.value=oi(e.exception.value,o)),e.request){var s=iP();e.request.url=oi(s.location.href,i);var a=e.request.headers.Referrer;e.request.headers.Referrer=oi(a,i)}if(e.behaviors&&e.behaviors.length){var c=["url","to","from"];try{for(var l=iR(e.behaviors),u=l.next();!u.done;u=l.next()){var d=u.value;!function(e){var n=e.data||{},r=function(e){n.hasOwnProperty(e)&&c.forEach(function(r){e===r&&(n[e]=oi(n[e],i))})};for(var o in n)r(o)}(d)}}catch(e){n={error:e}}finally{try{u&&!u.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}}return e},e.prototype._sendProcessedPayload=function(e,n){var r,i=this,o=this.options;if(e=this._trimPacket(e),!this.options.allowDuplicates&&this._isRepeatData(e))return void console.warn("Weirwood error SDK dropped repeat event:",e);var s=o.issueGroupby;s&&ix(s)&&(r=s(e.exception)),r&&iC(r)?(e.fingerprint=r.substr(0,255),e.event_id=i4(e.fingerprint)):e.event_id=i4(os(e)),e.data_id=i4(function(e){var n=os(e),r=[],i=e.request,o=e.env,s=e.behaviors;if(!i)return JSON.stringify(e);var a=i.headers,c=i.url;return r.push("Referrer="+a.Referrer),r.push("ua="+a["User-Agent"]),r.push("url="+c),ot(o,function(e,n){"session:duration"!==e&&r.push(e+"="+n)}),ot(s,function(e){r.push("behavior.category="+e.category),r.push("behavior.name="+e.name),r.push("behavior.message="+e.message)}),n+r.join("***")}(e)),e.version=this.options.version||"",e.sdkTimestamp=Date.now(),this._lastData=e;var a={weirwood_version:this.options.version||""};(o.transport||this._makeRequest).call(this,{url:this.options.endpoint,auth:a,data:e,options:o,onSuccess:function(){i._resetBackoff(),n&&n()},onError:function(e){e.request&&i._setBackoffState(e.request),e=e||Error("Raven send failed (no additional details provided)"),n&&n(e)}})},e.prototype._makeRequest=function(e){var n,r,i=this,o=e.url,s=null,a={};e.options.headers&&(s=on(e.options.headers)),e.options.fetchParameters&&(a=on(e.options.fetchParameters));var c=this.options.sendWindow;if(i9()){a.body=oe(e.data);var l=iO(iO({},this._fetchDefaults),a);if(s){var u=new Headers;try{for(var d=iR(Object.keys(s)),p=d.next();!p.done;p=d.next()){var h=p.value;u.append(h,s[h])}}catch(e){n={error:e}}finally{try{p&&!p.done&&(r=d.return)&&r.call(d)}finally{if(n)throw n.error}}u.append("Content-Type","text/plain"),l.headers=u}return c.fetch(o,l).then(function(n){if(n.ok)e.onSuccess&&e.onSuccess(),i._resetBackoff();else{var r=Error("Weirwood error SDK error code: "+n.status);r.request=n,e.onError&&e.onError(r)}}).catch(function(){e.onError&&e.onError(Error("Weirwood error SDK error code: network unavailable")),i._resetBackoff()})}var f=c.XMLHttpRequest&&new c.XMLHttpRequest;f&&("withCredentials"in f||"undefined"!=typeof XDomainRequest)&&("withCredentials"in f?f.onreadystatechange=function(){if(4!==f.readyState)return void i._resetBackoff();if(200===f.status)e.onSuccess&&e.onSuccess();else if(e.onError){i._resetBackoff();var n=Error("Weirwood error SDK error code: "+f.status);n.request=f,e.onError(n)}}:(f=new XDomainRequest,o=o.replace(/^https?:/,""),e.onSuccess&&(f.onload=e.onSuccess),e.onError&&(f.onerror=function(){var n=Error("Weirwood error SDK error code: XDomainRequest");n.request=f,e.onError(n)})),f.open("POST",o),s&&ot(s,function(e,n){f.setRequestHeader(e,n)}),f.send(oe(e.data)))},e.prototype._sanitizeData=function(e){var n=this.options.sanitizeKeys||[];if(n.length){var r=e,i=n;if(!Array.isArray(i)||Array.isArray(i)&&0===i.length)return r;var o,s=oc(i);try{o=JSON.parse(oe(r))}catch(e){return r}return function e(n){return Array.isArray(n)?n.map(function(n){return e(n)}):iA(n)?Object.keys(n).reduce(function(r,i){return s.test(i)?r[i]="********":r[i]=e(n[i]),r},{}):n}(o)}return e},e.prototype.captureUserAgent=function(e){this._requestInfo=e},e.prototype.captureException=function(e,n){if(n||(n={trimHeadFrames:0,includePaths:[],mechanism:"generic",message:""}),iE(e));else if(iT(e))e=e.error;else if(iA(e))e=Error((n=this._getCaptureExceptionOptionsFromPlainObject(n,e)).message);else{if(r=e,"[object DOMException]"!==Object.prototype.toString.call(r))return this.captureMessage(e,iO(iO({},n),{stacktrace:!0,trimHeadFrames:n.trimHeadFrames+1}));var r,i=e.name||"DOMException",o=e.message?i+": "+e.message:i;return this.captureMessage(o,n)}try{n=iO({trimHeadFrames:0,mechanism:"generic",includePaths:this.options.includePaths||[]},n);var s=i$(e);this._handleStackInfo(s,n)}catch(n){if(e!==n)throw n}return this},e.prototype._isRepeatData=function(e){var n,r,i=this._lastData,o=e.exception,s=i?i.exception:{};return n=o,r=s,n.mechanism===r.mechanism&&n.type===r.type&&n.value===r.value&&n.url===r.url&&(0===n.stacktrace.length&&0===r.stacktrace.length||function(e,n){if(oa(e)&&oa(n)){var r,i,o=e.length;if(o!==n.length)return!1;for(var s=0;s<o;s++){if(r=e[s],i=n[s],r.filename!==i.filename||r.lineno!==i.lineno||r.colno!==i.colno||r.function!==i.function)return!1}return!0}return!1}(n.stacktrace,r.stacktrace))},e.prototype._resetBackoff=function(){this._currentExceptionStartTime=Date.now(),this._currentExceptionContext={}},e.prototype._setBackoffState=function(e){console.log(e)},e.prototype.captureMessage=function(e,n){void 0===n&&(n={});var r,i,o=this.options,s=o.ignoreErrors||[],a=o.ignoreKeys||[],c=o.whitelistUrls||[],l=o.ignoreUrls||[],u=o.ignoreJsUrls||[];if(!(s.length&&ol(s,e))){try{throw Error(e)}catch(e){i=e}var d=i$(i),p=Array.isArray(d.stack)&&d.stack[1];(null==(r=null==p?void 0:p.func)?void 0:r.indexOf("captureException"))!==-1&&(p=d.stack[2]);var h=p&&p.url||"";if(!(l.length&&ol(l,window.location.href)||a.length&&ol(a,i.name)||u.length&&ol(u,h))&&(!c.length||ol(c,h))){n=iO(iO({},n),{trimHeadFrames:0,includePaths:o.includePaths}),n.trimHeadFrames+=1;var f=od(d,n),m={exception:{mechanism:"manual",type:i.name,value:i.message,stacktrace:f.slice(1).reverse(),url:h}};return this._send(m),this}}},e.prototype.captureAPIException=function(e){var n,r,i=this,o=iP(),s=this.options,a=s.ignoreUrls,c=void 0===a?[]:a,l=s.ignoreApiUrls,u=void 0===l?[]:l,d=s.ignoreApiStatus,p=void 0===d?[]:d,h=s.buildid,f=s.token,m=s.version,g=s.apiWhitelistUrls;if(!(e.url&&e.method&&!iM(e.status)))return void console.error("API异常参数至少需要包含 method、url、status 参数。");if(!(c.length&&ol(c,o.location.href)||u.length&&ol(u,e.url))&&(!g.length||ol(g,e.url))&&(!p.length||-1===p.indexOf(Number(e.status)))){var v=iO(iO({},e),{type:"APIError"}),y={request:{headers:{"User-Agent":o.navigator.userAgent},url:o.location.href},exception:v,buildid:h,token:f,version:m||""},b=this.options;if(ix(b.dataCallback)&&(y=b.dataCallback(y)),!(!y||ik(y))){this.mergeGlobalContext(y);var _=this.options.issueGroupby;if((_&&ix(_)&&(r=_(y.exception)),r&&iC(r))?(y.fingerprint=r.substr(0,255),y.event_id=i4(y.fingerprint)):y.event_id=i4((n=e).method+"***"+function(e){if(!iC(e))return"";var n=e.split("?");return n[1]?(n[1]=n[1].replace(/\d+/g,"*").replace(/[\u4e00-\u9fa5]+/gi,"*"),n.join("?")):e}(n.url)),y.data_id=i4(oe(y)),this._lastAPIData!==y.data_id){this._lastAPIData=y.data_id;var w=function(){var e;((null==(e=i.options.globalOptions)?void 0:e.transport)||i._makeRequest).call(i,{url:i.options.endpoint,data:y,options:{},onSuccess:function(){},onError:function(){}})};"number"==typeof b.sampleRate?Math.random()<b.sampleRate&&w():w()}}}},e.prototype.captureEvent=function(){},e.prototype.afterLoad=function(){var e=iP().RavenConfig;e&&this.init(e)},e.prototype._getCaptureExceptionOptionsFromPlainObject=function(e,n){var r=Object.keys(n).sort(),i=iO(iO({},e),{message:"Non-Error exception captured with keys: "+function(e,n){if(void 0===n&&(n=40),iI(e)||iC(e))return e.toString();if(!ij(e))return"";if(0===(e=e.filter(function(e){return iC(e)})).length)return"[object has no keys]";if(n=iI(n)?n:40,e[0].length>=n)return e[0];for(var r=e.length;r>0;r--){var i=e.slice(0,r).join(", ");if(!(i.length>n)){if(r===e.length)return i;return i+"…"}}return""}(r),fingerprint:[i4(r.join(""))],env:e&&e.env||{}});return i.env.__serialized__=function e(n,r,i){if(void 0===r&&(r=3),void 0===i&&(i=51200),!iA(n))return n+"";var o,s,a=function e(n,r){return 0===r?or(n):iA(n)?Object.keys(n).reduce(function(i,o){return i[o]=e(n[o],r-1),i},{}):Array.isArray(n)?n.map(function(n){return e(n,r-1)}):or(n)}(n,r);return~-encodeURI(s=JSON.stringify(o=oe(a))).split(/%..|./).length>i?e(n,r-1):a}(n),i},e.prototype.captureBehavior=function(e){var n=iO(iO({},e),{timestamp:Date.now()/1e3});if(ix(this.options.breadcrumbCallback)){var r,i=this.options.breadcrumbCallback(n);if("object"!=typeof(r=i)||null===r||ik(i)){if(!1===i)return this}else n=i}return this._behaviors.push(n),this._behaviors.length>(this.options.behaviorLimit||10)&&this._behaviors.shift(),this},e.prototype.setContext=function(e,n){for(var r in void 0===n&&(n={persist:!0}),e)Reflect.has(e,r)&&(n.persist?this._globalContext.env[r]=e[r]:this._currentExceptionContext[r]=e[r])},e.prototype.clearContext=function(){this._globalContext.env={},this._currentExceptionContext={}},e.prototype._restoreBuiltIns=function(){for(var e;this._wrappedBuiltIns.length;){var n=(e=this._wrappedBuiltIns.shift())[0],r=e[1],i=e[2];n[r]=i}},e.prototype.noConflict=function(){},e.prototype.uninstall=function(){this.dispose()},e.prototype.dispose=function(){iV(this._globalErrorHandler),this._restoreBuiltIns(),this._globalErrorHandler=null,this._installed=!1},e}(),oM={};function ox(){var e=window.crypto||window.msCrypto;if(void 0===e||!e.getRandomValues)return"xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx".replace(/[xy]/g,function(e){var n=16*Math.random()|0;return("x"===e?n:3&n|8).toString(16)});var n=new Uint16Array(8);e.getRandomValues(n),n[3]=4095&n[3]|16384,n[4]=16383&n[4]|32768;var r=function(e){for(var n=e.toString(16);n.length<4;)n="0"+n;return n};return r(n[0])+r(n[1])+r(n[2])+r(n[3])+r(n[4])+r(n[5])+r(n[6])+r(n[7])}var oC=function(){function e(e){this.version="1.3.15",this.lastRouteTime=0,e&&this.init(e)}return e.prototype.init=function(e){var n,r,i,o,s=this.getSendWindow();if(!e.perf||e.perf&&!e.perf.disable){var a=i_(i_(i_({},e.perf),e.common),{version:this.version,sendWindow:s});this.perf=new iw.PerfClient(a)}if(!e.error||e.error&&!e.error.disable){var c=i_(i_(i_({},e.error),e.common),{version:this.version,sendWindow:s,uuid4:ox});this.error=new oT(c)}this.routeChange(window.document.URL),n=this.routeChange.bind(this),"function"==typeof(r=window.history).pushState&&(i=r.pushState,r.pushState=function(e,r,o){return n(o),i.apply(this,arguments)}),"function"==typeof r.replaceState&&(o=r.replaceState,r.replaceState=function(e,r,i){return i!==window.document.URL&&n(i),o.apply(this,arguments)}),window.addEventListener("hashchange",function(e){n((e||{}).newURL)}),window.addEventListener("popstate",function(e){n(window.document.URL)})},e.prototype.routeChange=function(e){var n=new Date().getTime();if(n-this.lastRouteTime>100){this.lastRouteTime=n;var r=ox()+"-"+n;this.error&&this.error.setContext({pageId:r})}},e.prototype.getSendWindow=function(){var e="undefined"!=typeof window?window:void 0!==__webpack_require__.g?__webpack_require__.g:"undefined"!=typeof self?self:oM;if(["fetch","ajax","sendBeacon"].some(function(e){var n;return!((n=window[e])&&n.toString&&!n.hasOwnProperty("toString")&&/\[native code\]/.test(String(n)))})&&document.body){var n=document.createElement("iframe");n.style.setProperty("display","none","important"),document.body.appendChild(n),e=n?n.contentWindow:e}return e},e.prototype.afterLoad=function(){},e}();function oI(e,n){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,n)}function oj(e,n){return function(r,i){n(r,i,e)}}!function(e){var n;(n=e.EMessageType||(e.EMessageType={}))[n.Query=0]="Query",n[n.Event=1]="Event"}(E||(E={}));class oA{constructor(e,n,r){this.opts=e,this.signalingService=n,this.errorManager=r,this.disabled=!1,this.mutedByUser=!1,this.muted=!1,this.emitter=new tZ,this.started=!1,this.mute=e=>{this.signalingService.Mute(e),this.muted=e},this.setMutedByUser=e=>{this.mutedByUser=e},this.tryUnmuteAsr=()=>!this.disabled&&!this.mutedByUser&&(this.muted&&this.mute(!1),!0),this.disable=()=>{this.disabled=!0},this.enable=()=>{this.disabled=!1},this._stop=async()=>{this.started&&(await this.signalingService.Stop(),this.started=!1)},this._dispose=()=>{this.stop().finally(()=>{this.signalingService.Dispose()}).catch(rh),this.emitter.clearListeners()},this._ensureMicPermission=async()=>{var e;if("function"==typeof(null==(e=navigator.permissions)?void 0:e.query)){try{switch((await navigator.permissions.query({name:"microphone"})).state){case"granted":case"prompt":break;case"denied":this.errorManager.handleError(new nX("麦克风权限被浏览器/系统禁用,请检查后重试"))}}catch{await this._ensureMicPermissionPolyfill()}return}await this._ensureMicPermissionPolyfill()},this._ensureMicPermissionPolyfill=async()=>{try{(await navigator.mediaDevices.getUserMedia({audio:!0})).getTracks().forEach(e=>e.stop())}catch(e){e instanceof Error&&("NotAllowedError"===e.name||"SecurityError"===e.name?this.errorManager.handleError(new nX(`\u{7528}\u{6237}\u{62D2}\u{7EDD}\u{9EA6}\u{514B}\u{98CE}\u{6743}\u{9650}: ${e.message}`)):"NotFoundError"===e.name?this.errorManager.handleError(new nX(`\u{672A}\u{68C0}\u{6D4B}\u{5230}\u{9EA6}\u{514B}\u{98CE}\u{8BBE}\u{5907}: ${e.message}`)):this.errorManager.handleError(new nX(e.message)))}}}get sessionId(){return this.started?this.signalingService.GetSessionID():null}}function ok(e,n){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,n)}function oB(e,n){return function(r,i){n(r,i,e)}}oA=function(e,n,r,i){var o,s=arguments.length,a=s<3?n:null===i?i=Object.getOwnPropertyDescriptor(n,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,n,r,i);else for(var c=e.length-1;c>=0;c--)(o=e[c])&&(a=(s<3?o(a):s>3?o(n,r,a):o(n,r))||a);return s>3&&a&&Object.defineProperty(n,r,a),a}([ey(),oj(0,em(t1.IOptions)),oj(0,eR()),oj(1,em(t1.SignalingService)),oj(2,em(t1.ErrorManager)),oI("design:type",Function),oI("design:paramtypes",["undefined"==typeof IResolvedOptions?Object:IResolvedOptions,"undefined"==typeof BaseSignalingService?Object:BaseSignalingService,void 0===re?Object:re])],oA);class oP{static #k=this.GET_ACCESS_TOKEN_REQUEST_URI="employee-console/v1/access/r/ai-agent/get_digital_token";constructor(e,n,r){this.opts=e,this.request=n,this.errorManager=r,this.emitter=new tZ,this._isRendering=!1,this._isMuted=!1,this._canInterrupt=!0,this.ssmlHandlers=[],this.token="",this.getAccessToken=async()=>{try{let{data:e}=await this.request.client.get(oP.GET_ACCESS_TOKEN_REQUEST_URI,{retry:3,timeout:15e3}).json();return e.authorization}catch(e){throw e instanceof Error&&this.errorManager.handleError(new n0(e.message)),e}}}get isRendering(){return this._isRendering}get isMuted(){return this._isMuted}get canInterrupt(){return this._canInterrupt}setIsRendering(e){this._isRendering=e}setIsMuted(e){this._isMuted=e}setCanInterrupt(e){this._canInterrupt=e}registerSSMLHandler(e){return this.ssmlHandlers.push(e),this}runSsmlHandlers(e){let n=e;for(let e of this.ssmlHandlers)n=e(n);return n}}oP=function(e,n,r,i){var o,s=arguments.length,a=s<3?n:null===i?i=Object.getOwnPropertyDescriptor(n,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,n,r,i);else for(var c=e.length-1;c>=0;c--)(o=e[c])&&(a=(s<3?o(a):s>3?o(n,r,a):o(n,r))||a);return s>3&&a&&Object.defineProperty(n,r,a),a}([ey(),oB(0,em(t1.IOptions)),oB(1,em(t1.CommonRequest)),oB(2,em(t1.ErrorManager)),ok("design:type",Function),ok("design:paramtypes",["undefined"==typeof IOptions?Object:IOptions,void 0===nS?Object:nS,void 0===re?Object:re])],oP);let oN=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:500;return new Promise(n=>setTimeout(n,e))};function oD(e,n){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),r.push.apply(r,i)}return r}function oL(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?oD(Object(r),!0).forEach(function(n){oV(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):oD(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function oF(e){return(oF="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function oU(e,n){if(!(e instanceof n))throw TypeError("Cannot call a class as a function")}function oq(e,n){for(var r=0;r<n.length;r++){var i=n[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,oX(i.key),i)}}function oH(e,n,r){return n&&oq(e.prototype,n),r&&oq(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e}function oV(e,n,r){return(n=oX(n))in e?Object.defineProperty(e,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[n]=r,e}function oX(e){var n=function(e,n){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,n||"default");if("object"!=typeof i)return i;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}(e,"string");return"symbol"==typeof n?n:String(n)}(T||(T={})).INIT="INIT";var oW=function(){function e(n){oU(this,e),oV(this,"iframeId",void 0),this.iframeId=n}return oH(e,[{key:"registerMessageReceived",value:function(e){void 0!==window.addEventListener&&"function"==typeof e&&window.addEventListener("message",e,!1)}},{key:"removeMessageReceived",value:function(e){void 0!==window.addEventListener&&window.removeEventListener("message",e,!1)}},{key:"sendMessageToIframe",value:function(e,n){if(this.iframeId){var r=document.getElementById(this.iframeId);e&&null!==r&&r.contentWindow.postMessage({type:e,content:n},"*")}else if(window.self!==window.top&&window&&window.parent&&window.parent.postMessage){var i=JSON.parse(JSON.stringify(n||{}));window.parent.postMessage({type:e,content:i},"*")}}},{key:"sendCommand",value:function(e){this.sendMessageToIframe("command",e)}},{key:"sendMessage",value:function(e){var n=e.requestId,r=void 0===n?rd():n;return this.sendMessageToIframe("message",oL(oL({},e),{},{requestId:r})),r}},{key:"textRender",value:function(e){return this.sendMessage({action:"TEXT_RENDER",body:e})}},{key:"textQuery",value:function(e){return this.sendMessage({action:"TEXT_QUERY",body:e})}},{key:"changeBackGround",value:function(e){return this.textRender("<display><background><type>image</type><source>http</source><value>".concat(e,"</value></background></display>"))}},{key:"mute",value:function(e){this.sendCommand({subType:"mute",subContent:e})}},{key:"muteAudio",value:function(e){this.sendCommand({subType:"muteAudio",subContent:e})}},{key:"muteRemoteAudio",value:function(e){this.sendCommand({subType:"muteRemoteAudio",subContent:e})}},{key:"playVideo",value:function(e){this.sendCommand({subType:"playVideo",subContent:e})}},{key:"sendAudioData",value:function(e){this.sendMessageToIframe("audioData",e)}},{key:"onStateUpdate",value:function(e){this.sendMessageToIframe("state",e)}},{key:"sendRtcState",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.sendMessageToIframe("rtcState",e)}},{key:"sendWsState",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.sendMessageToIframe("wsState",e)}}]),e}(),o$={LOAD:"LOAD",TEXT_RENDER:"TEXT_RENDER",TEXT_MT_RENDER:"TEXT_MT_RENDER",AUDIO_RENDER:"AUDIO_RENDER",TEXT_QUERY:"TEXT_QUERY",AUDIO_QUERY_START:"AUDIO_QUERY_START",AUDIO_QUERY_STOP:"AUDIO_QUERY_STOP",SET_MODEL_URLS:"SET_MODEL_URLS",CHANGE_CAMERA:"CHANGE_CAMERA",ANIMOJI_RENDER:"ANIMOJI_RENDER",DESTROY:"DESTROY",CHANGE_PARTS:"CHANGE_PARTS",SET_RENDER_CONFIG:"SET_RENDER_CONFIG",AUDIO_RENDER_START:"AUDIO_RENDER_START",AUDIO_RENDER_STOP:"AUDIO_RENDER_STOP",INTERRUPT:"INTERRUPT"};!function(){function e(n){oU(this,e),oV(this,"iframeId",void 0),oV(this,"namespace","dhIframeNameSpace"),oV(this,"listener",null),this.iframeId=n}oH(e,[{key:"onEventListener",value:function(e){var n=this;return function(r){if("object"===oF(r.data))if("onListener"===r.data.type&&r.data.content.listenerId){var i=window[n.namespace][r.data.content.listenerId];null==i||i(r.data.content.data)}else"onListenerRemove"===r.data.type&&r.data.content.listenerId?delete window[n.namespace][r.data.content.listenerId]:r.data.listenerId?e(r.data,function(e){n.sendMessage("onListener",{listenerId:r.data.listenerId,data:e})},function(){n.sendMessage("onListenerRemove",{listenerId:r.data.listenerId})}):e(r.data)}}},{key:"registerMessageReceived",value:function(e){void 0!==window.addEventListener&&"function"==typeof e&&(this.listener=this.onEventListener(e),window.addEventListener("message",this.listener,!1))}},{key:"removeMessageReceived",value:function(){void 0!==window.addEventListener&&this.listener&&(window[this.namespace]=void 0,window.removeEventListener("message",this.listener,!1))}},{key:"sendMessage",value:function(e,n,r){var i=this;if(this.iframeId){var o="";r&&(o=rd(),window[this.namespace]||(window[this.namespace]={}),window[this.namespace][o]=r);var s=document.getElementById(this.iframeId);return e&&null!==s&&s.contentWindow.postMessage({type:e,content:n,listenerId:o},"*"),function(){o&&(window[i.namespace][o]=void 0)}}if(window.self!==window.top&&window&&window.parent&&window.parent.postMessage){var a=JSON.parse(JSON.stringify(n||{}));window.parent.postMessage({type:e,content:a},"*")}}},{key:"textRender",value:function(e,n){return this.sendMessage(o$.TEXT_RENDER,e,n)}},{key:"textMTRender",value:function(e,n){return this.sendMessage(o$.TEXT_MT_RENDER,e,n)}},{key:"audioRender",value:function(e,n){return this.sendMessage(o$.AUDIO_RENDER,e,n)}},{key:"textQuery",value:function(e,n){return this.sendMessage(o$.TEXT_QUERY,e,n)}},{key:"startAudioQuery",value:function(e,n){return this.sendMessage(o$.AUDIO_QUERY_START,e,n)}},{key:"stopAudioQuery",value:function(){return this.sendMessage(o$.AUDIO_QUERY_STOP,{})}},{key:"setModelPackage",value:function(e,n){return this.sendMessage(o$.SET_MODEL_URLS,{urls:e,needInitConfig:n})}},{key:"changeCamera",value:function(e){return this.sendMessage(o$.CHANGE_CAMERA,e)}},{key:"changeParts",value:function(e){return this.sendMessage(o$.CHANGE_PARTS,e)}},{key:"setRenderConfig",value:function(e){return this.sendMessage(o$.SET_RENDER_CONFIG,e)}},{key:"animojiRender",value:function(e,n){return this.sendMessage(o$.ANIMOJI_RENDER,e,n)}},{key:"destroy",value:function(){return this.sendMessage(o$.DESTROY,{})}},{key:"startAudioRender",value:function(e,n){return this.sendMessage(o$.AUDIO_RENDER_START,e,n)}},{key:"stopAudioRender",value:function(){return this.sendMessage(o$.AUDIO_RENDER_STOP,{})}},{key:"interrupt",value:function(){return this.sendMessage(o$.INTERRUPT,{})}},{key:"load",value:function(e){return this.sendMessage(o$.LOAD,e)}},{key:"onStateUpdate",value:function(e){this.sendMessage("state",e)}}])}();let oz=e=>new URLSearchParams(Object.entries(e).filter(e=>{let[,n]=e;return null!=n&&""!==n}).reduce((e,n)=>{let[r,i]=n;return e[r]=String(i),e},{})).toString();var oG=function(e){return e[e.Success=0]="Success",e[e.ReachSessionLimit=1004]="ReachSessionLimit",e[e.ResourceNotEnough=3001]="ResourceNotEnough",e}({}),oK=function(e){return e[e.UNINSTANTIATED=-1]="UNINSTANTIATED",e[e.CONNECTING=0]="CONNECTING",e[e.OPEN=1]="OPEN",e[e.CLOSING=2]="CLOSING",e[e.CLOSED=3]="CLOSED",e}({});class oY extends oP{get ready(){return!!this.iframeController&&!!this.token}constructor(...e){super(...e),this.origin="https://open.xiling.baidu.com",this.iframeId=rd(),this.iframeController=null,this.iframe=null,this.$iframeContainer=null,this.requestId=rd(),this.isWSConnected=!1,this.isRtcReady=!1,this.silenceMessageRequestIds=[],this.isStreamTextRendering=!1,this.wsClosedCount=0,this.mount=async e=>{if(!e)return void this.errorManager.handleError(new nK("容器元素不能为空"));if(this.$iframeContainer=e,this.iframe){e.contains(this.iframe)||e.appendChild(this.iframe);return}this.opts.enableDebugMode&&"development"===this.opts.env&&!this.opts.token?this.token=await this.getAccessToken():this.token=this.opts.token,this.iframe=document.createElement("iframe"),this.applyOptions(),e.appendChild(this.iframe),this.iframeController=new oW(this.iframeId),this.bindEvents()},this.bindEvents=()=>{var e,n;return this.ready&&(null==(e=this.iframe)||e.addEventListener("error",this.onIFrameErrorHandler),null==(n=this.iframeController)||n.registerMessageReceived(this.onMessageHandler)),this},this.unbindEvents=()=>{var e,n;return this.ready&&(null==(e=this.iframe)||e.removeEventListener("error",this.onIFrameErrorHandler),null==(n=this.iframeController)||n.removeMessageReceived(this.onMessageHandler)),this},this.cancelMute=()=>{var e;null==(e=this.iframeController)||e.sendCommand({subType:"muteAudio",subContent:!1}),setTimeout(()=>{this._isMuted=!1},1500)},this.renderPlainText=e=>{var n;if(!this.ready)return this;let r=this.runSsmlHandlers(e);return this.refreshRequestId(),null==(n=this.iframeController)||n.sendMessage({action:"TEXT_RENDER",body:r,requestId:this.requestId}),this},this.renderStreamText=(e,n)=>{var r,i,o;if(!this.ready)return this;let s=this.runSsmlHandlers(e);return n?(this.isStreamTextRendering||this.refreshRequestId(),null==(i=this.iframeController)||i.sendMessage({action:"TEXT_STREAM_RENDER",body:JSON.stringify({first:!this.isStreamTextRendering,last:!0,text:s}),requestId:this.requestId}),this.isStreamTextRendering=!1):this.isStreamTextRendering?null==(r=this.iframeController)||r.sendMessage({action:"TEXT_STREAM_RENDER",body:JSON.stringify({first:!1,last:!1,text:s}),requestId:this.requestId}):(this.refreshRequestId(),this.isStreamTextRendering=!0,null==(o=this.iframeController)||o.sendMessage({action:"TEXT_STREAM_RENDER",body:JSON.stringify({first:!0,last:!1,text:s}),requestId:this.requestId})),this},this.interrupt=()=>{var e;return this.ready&&(null==(e=this.iframeController)||e.sendMessage({action:"TEXT_RENDER",body:"<interrupt></interrupt>",requestId:this.requestId}),this.isRendering||this.onRenderFinished(this.requestId)),this},this.sendSilenceMessage=()=>{var e;if(!this.ready)return this;let n=rd();return null==(e=this.iframeController)||e.sendMessage({action:"TEXT_RENDER",body:"",requestId:n}),this.silenceMessageRequestIds.push(n),this.emitter.emit("send_silence_message",{requestId:n}).catch(rh),this},this.dispose=()=>{if(this.unbindEvents(),this.silenceMessageRequestIds=[],this.ssmlHandlers=[],this.wsClosedCount=0,this.emitter.clearListeners(),this.iframe){var e;null==(e=this.$iframeContainer)||e.removeChild(this.iframe),this.iframe=null,this.iframeController=null}return this},this.GetRequestId=()=>this.requestId,this.checkIsReady=()=>{let e=this.isWSConnected&&this.isRtcReady;return e&&this.emitter.emit("ready").catch(rh),e},this.onIFrameErrorHandler=e=>{let n=new nY(`\u{6570}\u{5B57}\u{4EBA}iframe\u{52A0}\u{8F7D}\u{5931}\u{8D25}: ${e.message}`,{context:{method:"onIFrameErrorHandler",iframeId:this.iframeId,filename:e.filename,lineno:e.lineno,colno:e.colno,type:e.type,target:e.target}});this.errorManager.handleError(n)},this.onMessageHandler=e=>{if(e.origin!==this.origin)return;let n=e.data;switch(n.type){case"msg":this.onReceiveMsgTypedMessageHandler(n);break;case"rtcState":this.onReceiveRtcStateTypedMessageHandler(n);break;case"wsState":this.onReceiveWsStateTypedMessageHandler(n)}},this.onReceiveMsgTypedMessageHandler=e=>{let n=e.content.requestId;if((e.content.code===oG.ReachSessionLimit||e.content.code===oG.ResourceNotEnough)&&(this.emitter.emit("reach_session_limit",{requestId:n}).catch(rh),this.errorManager.handleError(new n1("资源配额已用尽,请联系技术支持申请扩容"))),["RENDER_START","FINISHED","DOWN_SUBTITLE","RENDER_INTERRUPTED","DOWN_SUBTITLE","TEXT_RENDER","TEXT_STREAM_RENDER"].includes(e.content.action)){if(n!==this.requestId)return;switch(e.content.action){case"RENDER_START":this._isRendering=!0,this.emitter.emit("is_rendering_change",!0).catch(rh);break;case"FINISHED":case"RENDER_INTERRUPTED":this.onRenderFinished(n);break;case"DOWN_SUBTITLE":{let r=JSON.parse(e.content.body);this.silenceMessageRequestIds.includes(n)?this.silenceMessageRequestIds=this.silenceMessageRequestIds.filter(e=>e!==n):this.emitter.emit("render_subtitle",{subtitle:r,requestId:n}).catch(rh);break}case"TEXT_RENDER":case"TEXT_STREAM_RENDER":0!==e.content.code&&this.onRenderFinished(n)}return}switch(e.content.action){case"RENDER_ERROR":this.onRenderFinished(n),this.errorManager.handleError(new nQ("数字员工文本驱动渲染失败,请确认配置后重试",{requestId:n,context:{msg:e.content.message}}));break;case"DISCONNECT_ALERT":this.emitter.emit("disconnect_alert",{requestId:n}).catch(rh);break;case"TIMEOUT_EXIT":this.onRenderFinished(n),this.emitter.emit("timeout",{requestId:e.content.requestId}).catch(rh)}},this.onReceiveRtcStateTypedMessageHandler=e=>{e.content.action,"localVideoMuted"===e.content.action&&e.content.body&&(this._isMuted=!0),"remotevideoon"===e.content.action&&(this.isRtcReady=!0,this.checkIsReady(),this.iframe&&(this.iframe.style.opacity="1")),"error"===e.content.action&&this.errorManager.handleError(new nZ("RTC 房间连接失败,请检查网络后重试"))},this.onReceiveWsStateTypedMessageHandler=e=>{e.content.readyState===oK.OPEN?(this.isWSConnected=!0,this.wsClosedCount=0,this.checkIsReady()):(e.content.readyState===oK.CLOSED||e.content.readyState===oK.CLOSING)&&(this.isWSConnected=!1),e.content.readyState===oK.CLOSED&&(this.wsClosedCount++,this.wsClosedCount>=3&&(this.emitter.emit("reconnect_failed").catch(rh),this.errorManager.handleError(new nJ("检测到 Websocket 链接异常断开,如长时间无法恢复,请联系技术支持。"))))},this.applyOptions=()=>{var e,n,r,i,o,s,a,c,l,u,d,p,h,f;if(!this.iframe)return;this.iframe.id=this.iframeId,this.iframe.allow="autoplay",this.iframe.style.border="none",this.iframe.style.opacity="0",this.iframe.style.pointerEvents="none",this.iframe.style.overflow="hidden";let m=null!=(o=null==(e=this.opts)?void 0:e.scaleX)?o:1,g=null!=(s=null==(n=this.opts)?void 0:n.scaleY)?s:1,v=null!=(a=null==(r=this.opts)?void 0:r.translateX)?a:0,y=null!=(c=null==(i=this.opts)?void 0:i.translateY)?c:0;this.iframe.style.width=`${100*m}% `,this.iframe.style.height=`${100*g}%`,this.iframe.style.transform=`translate(${v}px, ${y}px)`;let b=oz({figureId:this.opts.figureId,ttsPer:this.opts.ttsPer,initMode:"noAudio","cp-inactiveDisconnectSec":null!=(l=this.opts.timeoutSec)?l:130,"cp-preAlertSec":null!=(u=this.opts.disconnectAlertSec)?u:10,mode:"crop",resolutionWidth:null!=(d=this.opts.figureResolutionWidth)?d:1920,resolutionHeight:null!=(p=this.opts.figureResolutionHeight)?p:1080,ttsSpeed:null!=(h=this.opts.speechSpeed)?h:6,"cp-ttsSample":this.opts.ttsSample,"cp-minSplitLen":this.opts.minSplitLen,"cp-ttsModel":this.opts.ttsModel,"cp-positionV2":JSON.stringify(this.opts.position),autoChromaKey:this.opts.autoChromaKey,closeLog:null==(f=this.opts.enableDebugMode)||f,token:this.token});this.iframe.src=`${this.origin}/cloud/realtime?${b}`},this.refreshRequestId=()=>{this.requestId=rd()},this.onRenderFinished=e=>{this._isRendering=!1,this.emitter.emit("is_rendering_change",!1).catch(rh),this.refreshRequestId(),this.emitter.emit("render_finished",{requestId:e}).catch(rh)}}}function oQ(e,n){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,n)}function oJ(e,n){return function(r,i){n(r,i,e)}}oY=function(e,n,r,i){var o,s=arguments.length,a=s<3?n:null===i?i=Object.getOwnPropertyDescriptor(n,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,n,r,i);else for(var c=e.length-1;c>=0;c--)(o=e[c])&&(a=(s<3?o(a):s>3?o(n,r,a):o(n,r))||a);return s>3&&a&&Object.defineProperty(n,r,a),a}([ey(),eb()],oY);class oZ{static #k=this.ENTRY_EMITTER_NAME="AaaSPilotKitEmitter";constructor(e,n,r,i,o,s){this.opts=e,this.errorManager=n,this.agentService=r,this.asrService=i,this.digitalHumanService=o,this.conversationService=s,this.interruptible=!0,this.isRenderingMultiModConversation=!1,this.isDigitalHumanServiceReady=!1,this.isAsrServiceReady=!1,this.aiWorkerMessageCache=null,this.multiModAbortControllers=[],this.playWaitForListener=null,this.mount=async e=>{var n,r;let i=null!=e?e:null==(n=(r=this.opts).getMountContainer)?void 0:n.call(r);i&&(await Promise.all([this.digitalHumanService.mount(i),this.asrService.preloadDeps()]),this.asrService.start(),this.isAsrServiceReady=!0,this.checkServiceReady())},this.getOptions=()=>this.opts,this.checkNeedsManualActivation=()=>nF()||nU(),this.activateManually=async()=>{this.digitalHumanService instanceof oY&&(this.digitalHumanService.cancelMute(),nL()&&(nF()||nU())&&await oN(500))},this.keepAlive=()=>(this.digitalHumanService.sendSilenceMessage(),this),this.playWaitFor=async(e,n)=>(this.playWaitForListener&&this.digitalHumanService.emitter.off("render_finished",this.playWaitForListener),this.digitalHumanService.isRendering)?await new Promise(r=>{this.playWaitForListener=()=>{if(n&&!n())return void r(!1);this.digitalHumanService.renderPlainText(e),this.playWaitForListener&&this.digitalHumanService.emitter.off("render_finished",this.playWaitForListener),r(!0)},this.digitalHumanService.emitter.on("render_finished",this.playWaitForListener)}):(this.digitalHumanService.renderPlainText(e),!0),this.playFromFullText=e=>(this.digitalHumanService.renderPlainText(e),this),this.playFromStreamText=(e,n)=>(this.digitalHumanService.renderStreamText(e,n),this),this.mute=e=>(this.asrService.setMutedByUser(e),this.emitter.emit("mute",e).catch(rh),e?(this.asrService.mute(!0),this.conversationService.currentClientConversation&&this.query(this.conversationService.currentClientConversation.text,!0).catch(rh)):this.asrService.muted&&this.asrService.mute(!1),this),this.interrupt=()=>(this.interruptAIWorkerConversation(),this),this.playPrologue=()=>{if(this.opts.prologue&&this.opts.prologue.length>0)return void this.playFromFullText(this.opts.prologue);this.agentService.query("").catch(rh)},this.query=async(e,n)=>{if(this.checkServiceReady()){if(this.agentService.sessionId||this.agentService.setSessionId(rd()),this.digitalHumanService.sendSilenceMessage(),this.agentService.queryId||this.agentService.setQueryId(rd()),n){if(this.agentService.checkIsRepeat())return;this.agentService.setLastQueryId(this.agentService.queryId)}if(await this.emitter.emit("asr_message",{text:e,completed:n,id:this.agentService.queryId,sessionId:this.agentService.sessionId}),await this.handleClientConversation(e),n){this.asrService.mute(!0);let n=async()=>{this.agentService.setQueryId(""),this.digitalHumanService.canInterrupt&&(this.asrService.tryUnmuteAsr(),await this.emitter.emit("asr_start"),this.digitalHumanService.emitter.off("render_subtitle",n))};this.digitalHumanService.emitter.on("render_subtitle",n);let r=async()=>{this.agentService.setQueryId(""),this.asrService.tryUnmuteAsr(),await this.emitter.emit("asr_start"),this.digitalHumanService.emitter.off("render_finished",r)};this.digitalHumanService.emitter.on("render_finished",r),this.handleClientConversationCompleted(),await this.agentService.query(e)}}},this.input=e=>(this.digitalHumanService.isRendering&&!this.interruptible||this.query(e,!0).catch(rh),this),this.dispose=()=>(this.agentService.dispose(),this.asrService.dispose(),this.digitalHumanService.dispose(),this.conversationService.dispose(),this.emitter.clearListeners(),this.isDigitalHumanServiceReady=!1,this.isAsrServiceReady=!1,this.aiWorkerMessageCache=null,this.isRenderingMultiModConversation=!1,this.multiModAbortControllers=[],this),this.setInterruptible=e=>(this.interruptible=e,this),this.bindAsrServiceEvents=()=>{this.asrService.emitter.on("start",this.handleAsrServiceStarted),this.asrService.emitter.on("message",this.handleAsrMessage)},this.bindAgentServiceEvents=()=>{this.agentService.emitter.on("data",this.handleAgentAnswer),this.agentService.emitter.on("completed",this.handleAgentAnswerCompleted),this.agentService.emitter.on("instruction_received",this.handleAgentInstructionReceived),this.agentService.emitter.on("usage_quota_reached",async e=>{await this.emitter.emit("busy",{...e})})},this.bindDigitalHumanServiceEvents=()=>{this.digitalHumanService.bindEvents(),this.digitalHumanService.emitter.once("ready").then(()=>{this.isDigitalHumanServiceReady=!0,this.checkServiceReady()}),this.digitalHumanService.emitter.on("render_subtitle",this.aiWorkerSubtitleToConversation),this.digitalHumanService.emitter.on("is_rendering_change",e=>{this.emitter.emit("is_rendering_change",e).catch(rh)}),this.digitalHumanService.emitter.on("render_subtitle",async e=>{await this.emitter.emit("render_start",{...e,sessionId:this.agentService.sessionId,queryId:this.agentService.queryId})}),this.digitalHumanService.emitter.on("disconnect_alert",e=>{let n=this.digitalHumanService.emitter.on("render_finished",()=>{this.asrService.mute(!0),this.emitter.emit("inactivity",e).catch(rh),n()}),r=this.digitalHumanService.emitter.on("send_silence_message",()=>{n(),r()});this.playFromFullText(this.opts.inactivityPrompt)}),this.digitalHumanService.emitter.on("reach_session_limit",async e=>{this.isDigitalHumanServiceReady&&this.isAsrServiceReady&&await this.emitter.emit("busy",{...e})}),this.digitalHumanService.emitter.on("reconnect_failed",async()=>{await this.emitter.emit("busy",{requestId:"reconnect_failed"})});let e=this.digitalHumanService.emitter.on("render_finished",()=>{this.asrService.tryUnmuteAsr(),e()})},this.bindErrorEvents=()=>{this.errorManager.on(e=>{let n=this.errorManager.createMonitoringError(e);this.emitter.emit("error",e).catch(rh);try{this.weirwood.error.captureException(n)}catch(e){console.error(e)}})},this.bindEvents=()=>{this.bindErrorEvents(),this.bindAsrServiceEvents(),this.bindAgentServiceEvents(),this.bindDigitalHumanServiceEvents()},this.registerFormatters=()=>{var e,n;let r=null!=(e=this.opts.speechFormatters)?e:[],i=null!=(n=this.opts.conversationFormatters)?n:[];for(let e of r)this.digitalHumanService.registerSSMLHandler(e);for(let e of i)this.conversationService.registerAIWorkerConversationFormatter(e)},this.aiWorkerSubtitleToConversation=async e=>{let n=e.subtitle;if(this.isRenderingMultiModConversation)return;let r=this.conversationService;await this.createNewAIWorkerConversation();let i=r.currentAIWorkerConversation;i&&this.handleAIWorkerConversationChange(i);let o=r.runAIWorkerConversationFormatters(n.content);null==i||i.appendText(o),n.completed&&r.setCurrentConversation(null)},this.handleAgentAnswer=e=>{let{answer:n}=e;if(il.isXml(n))return void this.handleXmlAgentAnswer(e).catch(rh);this.aiWorkerMessageCache&&this.playFromStreamText(this.aiWorkerMessageCache,!1),this.aiWorkerMessageCache=n},this.handleXmlAgentAnswer=async e=>{let{answer:n}=e,r=this.conversationService;await this.createNewAIWorkerConversation();let i=r.currentAIWorkerConversation;if(!i)return;let o=()=>{this.emitter.emit("conversation_change",{...i.toJSON(),text:i.fulltext,completed:!1})};i.emitter.on("content_change",o),this.isRenderingMultiModConversation=!0;let s=r.runAIWorkerConversationFormatters(n),a=i.createContentsFromXmlString(s),c=new AbortController;for(let e of(this.multiModAbortControllers.push(c),a)){if(c.signal.aborted){i.emitter.off("content_change",o);break}if(iu.isTextContent(e)){let n=e.getConfig().content;this.playFromFullText(n),await this.digitalHumanService.emitter.once("render_subtitle")}i.addContentRenderTask(e),i.contents.push(e),await i.emitter.once("queue_empty")}this.isRenderingMultiModConversation=!1,i.emitter.off("content_change",o),await this.emitter.emit("conversation_change",{...i.toJSON(),text:i.fulltext,completed:!0})},this.createNewAIWorkerConversation=async()=>{let e=this.conversationService;if(!e.currentAIWorkerConversation){let n=iu.create(this.opts);e.setCurrentConversation(n),e.add(n),await this.emitter.emit("conversation_add",n)}},this.handleAgentAnswerCompleted=async()=>{if(this.aiWorkerMessageCache){this.playFromStreamText(this.aiWorkerMessageCache,!0),this.aiWorkerMessageCache=null;return}this.agentService.setQueryId(""),this.asrService.tryUnmuteAsr(),await this.emitter.emit("asr_start")},this.handleAgentInstructionReceived=e=>{this.emitter.emit("instruction_received",e).catch(rh)},this.handleAsrServiceStarted=async()=>{await oN(800),this.asrService.mute(!0),this.interruptible&&this.emitter.once("render_start").then(()=>{this.asrService.tryUnmuteAsr()})},this.handleAsrMessage=async e=>{this.digitalHumanService.isRendering&&!this.digitalHumanService.canInterrupt||this.asrService.mutedByUser||e.type===E.EMessageType.Query&&(this.opts.enableDebugMode&&console.log("message",e,this.agentService.sessionId,Date.now()),await this.query(ro(e.data,this.opts.hotWordReplacementRules),e.completed))},this.handleClientConversation=async e=>{let n=this.conversationService;if(!n.currentClientConversation){let e=rf.create(this.opts);n.setCurrentConversation(e),n.add(e),await this.emitter.emit("conversation_add",e)}let r=n.currentClientConversation;(this.digitalHumanService.isRendering||this.isRenderingMultiModConversation)&&this.interruptAIWorkerConversation(),null==r||r.appendText(e)},this.handleClientConversationCompleted=()=>{this.conversationService.setCurrentConversation(null)},this.interruptAIWorkerConversation=()=>{for(let e of(this.aiWorkerMessageCache&&this.digitalHumanService.renderStreamText(this.aiWorkerMessageCache,!0),this.multiModAbortControllers))e.abort();this.multiModAbortControllers=[];let e=this.digitalHumanService.GetRequestId();this.digitalHumanService.interrupt(),this.conversationService.interruptAll(),this.agentService.abort(),this.aiWorkerMessageCache=null,this.emitter.emit("interrupt",{requestId:e,queryId:this.agentService.queryId?this.agentService.queryId:this.agentService.lastQueryId,sessionId:this.agentService.sessionId}).catch(rh)},this.checkServiceReady=()=>!!this.isDigitalHumanServiceReady&&!!this.isAsrServiceReady&&(this.emitter.emit("ready").catch(rh),!0),this.handleAIWorkerConversationChange=e=>{let n=r=>{this.emitter.emit("conversation_change",{...e.toJSON(),text:e.fulltext,completed:r.completed}).catch(rh),r.completed&&e.emitter.off("content_change",n)},r=()=>{e.emitter.off("interrupt",r),e.emitter.off("content_change",n)};e.emitter.on("content_change",n),e.emitter.on("interrupt",r)},this.weirwood=new oC({common:{buildid:"AAAS_PILOT_KIT_1.0.0",token:"8f3abab4743f4114bd632999224323af"},error:{collectWindowErrors:!1,collectUnhandledRejections:!1,collectResourceLoadErrors:!1,ignoreUrls:["localhost","127.0.0.1"]},perf:{disable:!0}}),this.emitter=new tZ(this.opts.enableDebugMode?{debug:{name:oZ.ENTRY_EMITTER_NAME,enabled:!0}}:void 0),this.bindEvents(),this.registerFormatters(),this.interruptible=this.opts.interruptible}}oZ=function(e,n,r,i){var o,s=arguments.length,a=s<3?n:null===i?i=Object.getOwnPropertyDescriptor(n,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,n,r,i);else for(var c=e.length-1;c>=0;c--)(o=e[c])&&(a=(s<3?o(a):s>3?o(n,r,a):o(n,r))||a);return s>3&&a&&Object.defineProperty(n,r,a),a}([ey(),oJ(0,em(t1.IOptions)),oJ(0,eR()),oJ(1,em(t1.ErrorManager)),oJ(2,em(t1.AgentService)),oJ(3,em(t1.ASRService)),oJ(4,em(t1.DigitalHumanService)),oJ(5,em(t1.ConversationService)),oQ("design:type",Function),oQ("design:paramtypes",["undefined"==typeof IResolvedOptions?Object:IResolvedOptions,void 0===re?Object:re,"undefined"==typeof AS?Object:AS,void 0===oA?Object:oA,void 0===oP?Object:oP,void 0===ih?Object:ih])],oZ);let o0=[239,187,191],o1=e=>async(n,r,i)=>{if(!i.ok||!i.body)return;let o=!1,s=n=>{var r;o||(o=!0,null==(r=e.onCompleted)||r.call(e,n))},a=i.body.getReader(),c=new TextDecoder("utf8"),l=function(e){let n,r,i,o,s,a,c;return l(),{feed:function(l){var u;r=r?r+l:l,n&&(u=r,o0.every((e,n)=>u.charCodeAt(n)===e))&&(r=r.slice(o0.length)),n=!1;let d=r.length,p=0,h=!1;for(;p<d;){let n;h&&("\n"===r[p]&&++p,h=!1);let l=-1,u=o;for(let e=i;l<0&&e<d;++e)":"===(n=r[e])&&u<0?u=e-p:"\r"===n?(h=!0,l=e-p):"\n"===n&&(l=e-p);if(l<0){i=d-p,o=u;break}i=0,o=-1,function(n,r,i,o){if(0===o){c.length>0&&(e({type:"event",id:s,event:a||void 0,data:c.slice(0,-1)}),c="",s=void 0),a=void 0;return}let l=i<0,u=n.slice(r,r+(l?o:i)),d=0;d=l?o:" "===n[r+i+1]?i+2:i+1;let p=r+d,h=o-d,f=n.slice(p,p+h).toString();if("data"===u)c+=f?"".concat(f,"\n"):"\n";else if("event"===u)a=f;else if("id"!==u||f.includes("\0")){if("retry"===u){let n=parseInt(f,10);Number.isNaN(n)||e({type:"reconnect-interval",value:n})}}else s=f}(r,p,u,l),p+=l+1}p===d?r="":p>0&&(r=r.slice(p))},reset:l};function l(){n=!0,r="",i=0,o=-1,s=void 0,a=void 0,c=""}}(n=>{var r,i,o;if("event"===n.type&&(null==(r=e.onMessage)||r.call(e,n)),"event"===n.type&&n.data)for(let r of(null==(i=e.onEvent)||i.call(e,n),n.data.split("\n")))e.onData(r);else"reconnect-interval"===n.type&&(null==(o=e.onReconnectInterval)||o.call(e,n.value))}),u=()=>{a.read().then(e=>{if(e.done)return void s();l.feed(c.decode(e.value,{stream:!0})),u()}).catch(r=>{var i;if(n.signal.aborted){null==(i=e.onAborted)||i.call(e);return}s(r)})};return u(),i};!function(e){var n,r,i;(n=e.EAiobAction||(e.EAiobAction={}))[n.silence=1]="silence",n[n.Interrupt=2]="Interrupt",n[n.Hangup=3]="Hangup",(r=e.EResponseType||(e.EResponseType={}))[r.Welcome=1]="Welcome",r[r.Normal=2]="Normal",r[r.Command=3]="Command",r[r.TakeOver=4]="TakeOver",(i=e.ETextType||(e.ETextType={}))[i.unit=0]="unit",i[i.llm=1]="llm"}(M||(M={}));class o2 extends rr{static #k=this.REQUEST_URI="aicc-service/aiob-server/text/stream/query2";constructor(...e){super(...e),this.query=async e=>{this.abortController=new AbortController;let n=o1({onData:e=>{try{let{answer:n,sessionId:r,action:i}=JSON.parse(e);if(r&&(this.conversationSessionId=r),i===M.EAiobAction.Hangup)return void this.onHangup({sessionId:this.conversationSessionId});n&&this.onData({sessionId:this.conversationSessionId,answer:n})}catch(e){e instanceof Error&&this.errorManager.handleError(new nA(e.message,{sessionId:this.conversationSessionId}))}},onCompleted:()=>{this.onCompleted({sessionId:this.conversationSessionId})}}),r=this.opts.agentConfig;if(!(null==r?void 0:r.robotId))return void this.errorManager.handleError(new nj(`\u{8C03}\u{7528} Agent API ${o2.REQUEST_URI} \u{65F6}\u{5FC5}\u{987B}\u{4F20}\u{5165} robotId \u{53C2}\u{6570}\u{FF0C}\u{8BF7}\u{786E}\u{8BA4}\u{540E}\u{91CD}\u{8BD5}\u{3002}`));let i={query:e,sessionId:this.conversationSessionId,robotId:r.robotId,isComplete:1,queryId:this.queryId};try{var o;await this.request.client.post(o2.REQUEST_URI,{retry:0,timeout:3e5,signal:null==(o=this.abortController)?void 0:o.signal,hooks:{afterResponse:[n]},json:{...i}})}catch(e){e instanceof t3?this.onTimeout({sessionId:this.conversationSessionId}):e instanceof Error&&this.errorManager.handleError(new nk(e.message,{sessionId:this.conversationSessionId}))}},this.hangup=async()=>{let e=this.opts.agentConfig;if(!(null==e?void 0:e.robotId))return void await this.errorManager.handleError(new nj(`\u{8C03}\u{7528} Agent API ${o2.REQUEST_URI} \u{65F6}\u{5FC5}\u{987B}\u{4F20}\u{5165} robotId \u{53C2}\u{6570}\u{FF0C}\u{8BF7}\u{786E}\u{8BA4}\u{540E}\u{91CD}\u{8BD5}\u{3002}`));let n={query:"",robotId:e.robotId,sessionId:this.conversationSessionId,action:M.EAiobAction.Hangup,isComplete:1};try{await this.request.client.post(o2.REQUEST_URI,{retry:0,timeout:3e5,json:{...n},keepalive:!0})}catch(e){e instanceof Error&&this.errorManager.handleError(new nk(e.message,{sessionId:this.conversationSessionId}))}},this.dispose=()=>{this._dispose(),this.hangup().finally(()=>{this.conversationSessionId=""})}}}o2=function(e,n,r,i){var o,s=arguments.length,a=s<3?n:null===i?i=Object.getOwnPropertyDescriptor(n,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,n,r,i);else for(var c=e.length-1;c>=0;c--)(o=e[c])&&(a=(s<3?o(a):s>3?o(n,r,a):o(n,r))||a);return s>3&&a&&Object.defineProperty(n,r,a),a}([ey(),eb()],o2),!function(e){var n;(n=e.EReplyType||(e.EReplyType={}))[n.PlainText=1]="PlainText",n[n.RichText=3]="RichText",n[n.Image=4]="Image",n[n.List=8]="List",e.REPLY_TYPE_MAPPING={1:"plainText",3:"richText",8:"list",4:"image"}}(x||(x={}));class o3 extends rr{static #k=this.REQUEST_URI="csp-service/online/core/v5/stream/query";constructor(...e){super(...e),this.query=async e=>{var n,r;this.abortController=new AbortController;let i=o1({onData:e=>{try{var n,r;let i=JSON.parse(e).answer[0],o=null!=(r=null==(n=i.reply)?void 0:n.text)?r:"";i&&o?this.onData({sessionId:this.conversationSessionId,answer:o}):i&&i.instruction&&(function(e){if("object"!=typeof e||null===e||"[object Object]"!==Object.prototype.toString.call(e))return!1;let n=Object.getPrototypeOf(e);return null===n||!!(Object.prototype.hasOwnProperty.call(n,"constructor")&&"function"==typeof n.constructor)&&Function.prototype.toString.call(n.constructor)===Function.prototype.toString.call(Object)}(i.instruction)?this.onInstructionReceived({sessionId:this.conversationSessionId,instruction:i.instruction}):this.errorManager.handleError(new nB("指令格式非法,请检查后重试",{sessionId:this.conversationSessionId})))}catch(e){e instanceof Error&&this.errorManager.handleError(new nA(e.message,{sessionId:this.conversationSessionId}))}},onCompleted:()=>{this.onCompleted({sessionId:this.conversationSessionId})}});this.conversationSessionId||(this.conversationSessionId=rd());let o=null==(n=this.opts.agentConfig)?void 0:n.token;if(!o)return void this.errorManager.handleError(new nj(`\u{8C03}\u{7528} Agent API ${o3.REQUEST_URI} \u{65F6}\u{5FC5}\u{987B}\u{4F20}\u{5165} token \u{53C2}\u{6570}\u{FF0C}\u{8BF7}\u{786E}\u{8BA4}\u{540E}\u{91CD}\u{8BD5}\u{3002}`));let s={query:e,sessionId:this.conversationSessionId};try{await this.request.client.post(o3.REQUEST_URI,{headers:{token:o},retry:0,timeout:3e5,signal:null==(r=this.abortController)?void 0:r.signal,hooks:{afterResponse:[i]},json:{...s}})}catch(e){e instanceof t3?this.onTimeout({sessionId:this.conversationSessionId}):e instanceof Error&&this.errorManager.handleError(new nk(e.message,{sessionId:this.conversationSessionId}))}},this.dispose=()=>{this._dispose()}}}function o6(e,n){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,n)}function o5(e,n){return function(r,i){n(r,i,e)}}o3=function(e,n,r,i){var o,s=arguments.length,a=s<3?n:null===i?i=Object.getOwnPropertyDescriptor(n,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,n,r,i);else for(var c=e.length-1;c>=0;c--)(o=e[c])&&(a=(s<3?o(a):s>3?o(n,r,a):o(n,r))||a);return s>3&&a&&Object.defineProperty(n,r,a),a}([ey(),eb()],o3);class o4{constructor(e,n){this.opts=e,this.errorManager=n,this.started=!1,this.sessionId="",this._dispose=()=>{this.started=!1,this.sessionId=""}}}o4=function(e,n,r,i){var o,s=arguments.length,a=s<3?n:null===i?i=Object.getOwnPropertyDescriptor(n,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,n,r,i);else for(var c=e.length-1;c>=0;c--)(o=e[c])&&(a=(s<3?o(a):s>3?o(n,r,a):o(n,r))||a);return s>3&&a&&Object.defineProperty(n,r,a),a}([ey(),o5(0,em(t1.IOptions)),o5(0,eR()),o5(1,em(t1.ErrorManager)),o6("design:type",Function),o6("design:paramtypes",["undefined"==typeof IResolvedOptions?Object:IResolvedOptions,void 0===re?Object:re])],o4);let o8=e=>{if(e)return"string"==typeof e?e:e.id};class o9 extends o4{static #k=this.ONLINE_PREFIX_URL="https://ky.cloud.baidu.com/employee-console";static #G=this.SANDBOX_PREFIX_URL="https://ai.agent.kaywang.cn/api";static #ew=this.AUTH_URL="https://ky.cloud.baidu.com/employee-console/v1/access/r/ai-agent/get-authorization";get prefixUrl(){return"production"===this.opts.env?o9.ONLINE_PREFIX_URL:o9.SANDBOX_PREFIX_URL}loginBRTC(e){if("function"!=typeof window.BRTC_Start)throw Error("BRTC_Start global function is missing. Ensure baidu.rtc.sdk.js is loaded.");let n={aspublisher:!0,usingdatachannel:!0,usingvideo:!1,usingaudio:!0,showvideobps:!1,autosubscribe:!0,autoplaymuted:!1,autopublish:!0,showspinner:!1,shownovideo:!1,userevent:!0,sessionevent:!0,logintimeout:1e4,linkdownevent:rh,linkupevent:rh,logintimeoutevent:rh,mediastate:rh,remotevideoon:rh,remotevideooff:rh,remotevideocoming:rh,remotevideoloading:rh,remotevideoconnected_state:rh,remotevideoleaving:rh,remotevideounpublished:rh,localvideoconnected_state:rh,localvideopublished_ok:rh,destroyed:rh,onlocalstream:rh,onlocalstream_end:rh,remotevideo_closed:rh,onmessage:e.onmessage,userevent_joinedroom:e.userevent_joinedroom,userevent_leavingroom:e.userevent_leavingroom,remotemediastating:e.remotemediastating,remotevideoviewid:o8(e.remotevideoviewid),localvideoviewid:o8(e.localvideoviewid)};window.BRTC_Start({...n,...e})}constructor(...e){super(...e),this.currentAppId="",this.Start=async e=>{var n,r,i,o,s;this.currentAppId=this.opts.rtcID;let a=this.prefixUrl,c={};"production"===this.opts.env&&(c.authorization=await this.getAuthToken("/api/v1/aiagent/generateAIAgentCall"));let l="production"===this.opts.env?"/v1/open/ai-agent/generateAIAgentCall":"/v1/aiagent/generateAIAgentCall",u=await nw.post(`${a}${l}`,{json:{app_id:this.currentAppId,quick_start:!0,config:JSON.stringify({...e.cfg})},headers:c}).json();if(!u.ai_agent_instance_id)throw Error("ai_agent_instance_id missing in response");this.started=!0,this.sessionId=u.ai_agent_instance_id;let d=this.sessionId,p=null!=(s=null==(n=u.context)?void 0:n.token)?s:"";(null==(r=u.context)?void 0:r.uid)&&(d=u.context.uid),(null==(i=u.context)?void 0:i.appid)&&(this.currentAppId=u.context.appid),this.loginBRTC({...e,appid:this.currentAppId,roomname:this.sessionId,userid:d,token:p}),null==(o=e.success)||o.call(e)},this.Stop=async()=>{if(this.started){this.started=!1;try{let e=this.prefixUrl,n={};"production"===this.opts.env&&(n.authorization=await this.getAuthToken("/api/v1/aiagent/stopAIAgentInstance"));let r="production"===this.opts.env?"/v1/open/ai-agent/stopAIAgentInstance":"/v1/aiagent/stopAIAgentInstance";await nw.post(`${e}${r}`,{json:{app_id:this.currentAppId,ai_agent_instance_id:this.sessionId},headers:n})}catch(e){if(e instanceof t2)throw Error(`stopAIAgentInstance failed (${e.response.status})`);throw e}"function"==typeof window.BRTC_Stop&&window.BRTC_Stop()}},this.Mute=e=>{"function"==typeof window.BRTC_MuteMicphone&&window.BRTC_MuteMicphone(e)},this.GetSessionID=()=>this.sessionId,this.Dispose=()=>{this._dispose()},this.getAuthToken=async e=>{try{let{data:n}=await nw.post(o9.AUTH_URL,{json:{http_method:"POST",path:e,headers:{host:"rtc-aiagent.baidubce.com"}}}).json();return n}catch(e){if(e instanceof t2)throw Error(`getAuthToken failed (${e.response.status})`);throw e}}}}o9=function(e,n,r,i){var o,s=arguments.length,a=s<3?n:null===i?i=Object.getOwnPropertyDescriptor(n,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,n,r,i);else for(var c=e.length-1;c>=0;c--)(o=e[c])&&(a=(s<3?o(a):s>3?o(n,r,a):o(n,r))||a);return s>3&&a&&Object.defineProperty(n,r,a),a}([ey(),eb()],o9);let o7=!0,se=!0;function st(e,n,r){let i=e.match(n);return i&&i.length>=r&&parseFloat(i[r],10)}function sn(e,n,r){if(!e.RTCPeerConnection)return;let i=e.RTCPeerConnection.prototype,o=i.addEventListener;i.addEventListener=function(e,i){if(e!==n)return o.apply(this,arguments);let s=e=>{let n=r(e);n&&(i.handleEvent?i.handleEvent(n):i(n))};return this._eventMap=this._eventMap||{},this._eventMap[n]||(this._eventMap[n]=new Map),this._eventMap[n].set(i,s),o.apply(this,[e,s])};let s=i.removeEventListener;i.removeEventListener=function(e,r){if(e!==n||!this._eventMap||!this._eventMap[n]||!this._eventMap[n].has(r))return s.apply(this,arguments);let i=this._eventMap[n].get(r);return this._eventMap[n].delete(r),0===this._eventMap[n].size&&delete this._eventMap[n],0===Object.keys(this._eventMap).length&&delete this._eventMap,s.apply(this,[e,i])},Object.defineProperty(i,"on"+n,{get(){return this["_on"+n]},set(e){this["_on"+n]&&(this.removeEventListener(n,this["_on"+n]),delete this["_on"+n]),e&&this.addEventListener(n,this["_on"+n]=e)},enumerable:!0,configurable:!0})}function sr(e){return"boolean"!=typeof e?Error("Argument type: "+typeof e+". Please use a boolean."):(o7=e,e?"adapter.js logging disabled":"adapter.js logging enabled")}function si(e){return"boolean"!=typeof e?Error("Argument type: "+typeof e+". Please use a boolean."):(se=!e,"adapter.js deprecation warnings "+(e?"disabled":"enabled"))}function so(){"object"==typeof window&&(o7||"undefined"!=typeof console&&"function"==typeof console.log&&console.log.apply(console,arguments))}function ss(e,n){se&&console.warn(e+" is deprecated, please use "+n+" instead.")}function sa(e){return"[object Object]"===Object.prototype.toString.call(e)}function sc(e,n,r){let i=r?"outbound-rtp":"inbound-rtp",o=new Map;if(null===n)return o;let s=[];return e.forEach(e=>{"track"===e.type&&e.trackIdentifier===n.id&&s.push(e)}),s.forEach(n=>{e.forEach(r=>{r.type===i&&r.trackId===n.id&&function e(n,r,i){!r||i.has(r.id)||(i.set(r.id,r),Object.keys(r).forEach(o=>{o.endsWith("Id")?e(n,n.get(r[o]),i):o.endsWith("Ids")&&r[o].forEach(r=>{e(n,n.get(r),i)})}))}(e,r,o)})}),o}function sl(e,n){let r=e&&e.navigator;if(!r.mediaDevices)return;let i=function(e){if("object"!=typeof e||e.mandatory||e.optional)return e;let n={};return Object.keys(e).forEach(r=>{if("require"===r||"advanced"===r||"mediaSource"===r)return;let i="object"==typeof e[r]?e[r]:{ideal:e[r]};void 0!==i.exact&&"number"==typeof i.exact&&(i.min=i.max=i.exact);let o=function(e,n){return e?e+n.charAt(0).toUpperCase()+n.slice(1):"deviceId"===n?"sourceId":n};if(void 0!==i.ideal){n.optional=n.optional||[];let e={};"number"==typeof i.ideal?(e[o("min",r)]=i.ideal,n.optional.push(e),(e={})[o("max",r)]=i.ideal):e[o("",r)]=i.ideal,n.optional.push(e)}void 0!==i.exact&&"number"!=typeof i.exact?(n.mandatory=n.mandatory||{},n.mandatory[o("",r)]=i.exact):["min","max"].forEach(e=>{void 0!==i[e]&&(n.mandatory=n.mandatory||{},n.mandatory[o(e,r)]=i[e])})}),e.advanced&&(n.optional=(n.optional||[]).concat(e.advanced)),n},o=function(e,o){if(n.version>=61)return o(e);if((e=JSON.parse(JSON.stringify(e)))&&"object"==typeof e.audio){let n=function(e,n,r){n in e&&!(r in e)&&(e[r]=e[n],delete e[n])};n((e=JSON.parse(JSON.stringify(e))).audio,"autoGainControl","googAutoGainControl"),n(e.audio,"noiseSuppression","googNoiseSuppression"),e.audio=i(e.audio)}if(e&&"object"==typeof e.video){let s=e.video.facingMode;s=s&&("object"==typeof s?s:{ideal:s});let a=n.version<66;if(s&&("user"===s.exact||"environment"===s.exact||"user"===s.ideal||"environment"===s.ideal)&&!(r.mediaDevices.getSupportedConstraints&&r.mediaDevices.getSupportedConstraints().facingMode&&!a)){let n;if(delete e.video.facingMode,"environment"===s.exact||"environment"===s.ideal?n=["back","rear"]:("user"===s.exact||"user"===s.ideal)&&(n=["front"]),n)return r.mediaDevices.enumerateDevices().then(r=>{let a=(r=r.filter(e=>"videoinput"===e.kind)).find(e=>n.some(n=>e.label.toLowerCase().includes(n)));return!a&&r.length&&n.includes("back")&&(a=r[r.length-1]),a&&(e.video.deviceId=s.exact?{exact:a.deviceId}:{ideal:a.deviceId}),e.video=i(e.video),so("chrome: "+JSON.stringify(e)),o(e)})}e.video=i(e.video)}return so("chrome: "+JSON.stringify(e)),o(e)},s=function(e){return n.version>=64?e:{name:({PermissionDeniedError:"NotAllowedError",PermissionDismissedError:"NotAllowedError",InvalidStateError:"NotAllowedError",DevicesNotFoundError:"NotFoundError",ConstraintNotSatisfiedError:"OverconstrainedError",TrackStartError:"NotReadableError",MediaDeviceFailedDueToShutdown:"NotAllowedError",MediaDeviceKillSwitchOn:"NotAllowedError",TabCaptureError:"AbortError",ScreenCaptureError:"AbortError",DeviceCaptureError:"AbortError"})[e.name]||e.name,message:e.message,constraint:e.constraint||e.constraintName,toString(){return this.name+(this.message&&": ")+this.message}}};if(r.getUserMedia=(function(e,n,i){o(e,e=>{r.webkitGetUserMedia(e,n,e=>{i&&i(s(e))})})}).bind(r),r.mediaDevices.getUserMedia){let e=r.mediaDevices.getUserMedia.bind(r.mediaDevices);r.mediaDevices.getUserMedia=function(n){return o(n,n=>e(n).then(e=>{if(n.audio&&!e.getAudioTracks().length||n.video&&!e.getVideoTracks().length)throw e.getTracks().forEach(e=>{e.stop()}),new DOMException("","NotFoundError");return e},e=>Promise.reject(s(e))))}}}function su(e){e.MediaStream=e.MediaStream||e.webkitMediaStream}function sd(e){if("object"!=typeof e||!e.RTCPeerConnection||"ontrack"in e.RTCPeerConnection.prototype)sn(e,"track",e=>(e.transceiver||Object.defineProperty(e,"transceiver",{value:{receiver:e.receiver}}),e));else{Object.defineProperty(e.RTCPeerConnection.prototype,"ontrack",{get(){return this._ontrack},set(e){this._ontrack&&this.removeEventListener("track",this._ontrack),this.addEventListener("track",this._ontrack=e)},enumerable:!0,configurable:!0});let n=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(){return this._ontrackpoly||(this._ontrackpoly=n=>{n.stream.addEventListener("addtrack",r=>{let i;i=e.RTCPeerConnection.prototype.getReceivers?this.getReceivers().find(e=>e.track&&e.track.id===r.track.id):{track:r.track};let o=new Event("track");o.track=r.track,o.receiver=i,o.transceiver={receiver:i},o.streams=[n.stream],this.dispatchEvent(o)}),n.stream.getTracks().forEach(r=>{let i;i=e.RTCPeerConnection.prototype.getReceivers?this.getReceivers().find(e=>e.track&&e.track.id===r.id):{track:r};let o=new Event("track");o.track=r,o.receiver=i,o.transceiver={receiver:i},o.streams=[n.stream],this.dispatchEvent(o)})},this.addEventListener("addstream",this._ontrackpoly)),n.apply(this,arguments)}}}function sp(e){if("object"==typeof e&&e.RTCPeerConnection&&!("getSenders"in e.RTCPeerConnection.prototype)&&"createDTMFSender"in e.RTCPeerConnection.prototype){let n=function(e,n){return{track:n,get dtmf(){return void 0===this._dtmf&&("audio"===n.kind?this._dtmf=e.createDTMFSender(n):this._dtmf=null),this._dtmf},_pc:e}};if(!e.RTCPeerConnection.prototype.getSenders){e.RTCPeerConnection.prototype.getSenders=function(){return this._senders=this._senders||[],this._senders.slice()};let r=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addTrack=function(e,i){let o=r.apply(this,arguments);return o||(o=n(this,e),this._senders.push(o)),o};let i=e.RTCPeerConnection.prototype.removeTrack;e.RTCPeerConnection.prototype.removeTrack=function(e){i.apply(this,arguments);let n=this._senders.indexOf(e);-1!==n&&this._senders.splice(n,1)}}let r=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(e){this._senders=this._senders||[],r.apply(this,[e]),e.getTracks().forEach(e=>{this._senders.push(n(this,e))})};let i=e.RTCPeerConnection.prototype.removeStream;e.RTCPeerConnection.prototype.removeStream=function(e){this._senders=this._senders||[],i.apply(this,[e]),e.getTracks().forEach(e=>{let n=this._senders.find(n=>n.track===e);n&&this._senders.splice(this._senders.indexOf(n),1)})}}else if("object"==typeof e&&e.RTCPeerConnection&&"getSenders"in e.RTCPeerConnection.prototype&&"createDTMFSender"in e.RTCPeerConnection.prototype&&e.RTCRtpSender&&!("dtmf"in e.RTCRtpSender.prototype)){let n=e.RTCPeerConnection.prototype.getSenders;e.RTCPeerConnection.prototype.getSenders=function(){let e=n.apply(this,[]);return e.forEach(e=>e._pc=this),e},Object.defineProperty(e.RTCRtpSender.prototype,"dtmf",{get(){return void 0===this._dtmf&&("audio"===this.track.kind?this._dtmf=this._pc.createDTMFSender(this.track):this._dtmf=null),this._dtmf}})}}function sh(e){if(!("object"==typeof e&&e.RTCPeerConnection&&e.RTCRtpSender&&e.RTCRtpReceiver))return;if(!("getStats"in e.RTCRtpSender.prototype)){let n=e.RTCPeerConnection.prototype.getSenders;n&&(e.RTCPeerConnection.prototype.getSenders=function(){let e=n.apply(this,[]);return e.forEach(e=>e._pc=this),e});let r=e.RTCPeerConnection.prototype.addTrack;r&&(e.RTCPeerConnection.prototype.addTrack=function(){let e=r.apply(this,arguments);return e._pc=this,e}),e.RTCRtpSender.prototype.getStats=function(){let e=this;return this._pc.getStats().then(n=>sc(n,e.track,!0))}}if(!("getStats"in e.RTCRtpReceiver.prototype)){let n=e.RTCPeerConnection.prototype.getReceivers;n&&(e.RTCPeerConnection.prototype.getReceivers=function(){let e=n.apply(this,[]);return e.forEach(e=>e._pc=this),e}),sn(e,"track",e=>(e.receiver._pc=e.srcElement,e)),e.RTCRtpReceiver.prototype.getStats=function(){let e=this;return this._pc.getStats().then(n=>sc(n,e.track,!1))}}if(!("getStats"in e.RTCRtpSender.prototype&&"getStats"in e.RTCRtpReceiver.prototype))return;let n=e.RTCPeerConnection.prototype.getStats;e.RTCPeerConnection.prototype.getStats=function(){if(arguments.length>0&&arguments[0]instanceof e.MediaStreamTrack){let e,n,r,i=arguments[0];return(this.getSenders().forEach(n=>{n.track===i&&(e?r=!0:e=n)}),this.getReceivers().forEach(e=>(e.track===i&&(n?r=!0:n=e),e.track===i)),r||e&&n)?Promise.reject(new DOMException("There are more than one sender or receiver for the track.","InvalidAccessError")):e?e.getStats():n?n.getStats():Promise.reject(new DOMException("There is no sender or receiver for the track.","InvalidAccessError"))}return n.apply(this,arguments)}}function sf(e){e.RTCPeerConnection.prototype.getLocalStreams=function(){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},Object.keys(this._shimmedLocalStreams).map(e=>this._shimmedLocalStreams[e][0])};let n=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addTrack=function(e,r){if(!r)return n.apply(this,arguments);this._shimmedLocalStreams=this._shimmedLocalStreams||{};let i=n.apply(this,arguments);return this._shimmedLocalStreams[r.id]?-1===this._shimmedLocalStreams[r.id].indexOf(i)&&this._shimmedLocalStreams[r.id].push(i):this._shimmedLocalStreams[r.id]=[r,i],i};let r=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(e){this._shimmedLocalStreams=this._shimmedLocalStreams||{},e.getTracks().forEach(e=>{if(this.getSenders().find(n=>n.track===e))throw new DOMException("Track already exists.","InvalidAccessError")});let n=this.getSenders();r.apply(this,arguments);let i=this.getSenders().filter(e=>-1===n.indexOf(e));this._shimmedLocalStreams[e.id]=[e].concat(i)};let i=e.RTCPeerConnection.prototype.removeStream;e.RTCPeerConnection.prototype.removeStream=function(e){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},delete this._shimmedLocalStreams[e.id],i.apply(this,arguments)};let o=e.RTCPeerConnection.prototype.removeTrack;e.RTCPeerConnection.prototype.removeTrack=function(e){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},e&&Object.keys(this._shimmedLocalStreams).forEach(n=>{let r=this._shimmedLocalStreams[n].indexOf(e);-1!==r&&this._shimmedLocalStreams[n].splice(r,1),1===this._shimmedLocalStreams[n].length&&delete this._shimmedLocalStreams[n]}),o.apply(this,arguments)}}function sm(e,n){if(!e.RTCPeerConnection)return;if(e.RTCPeerConnection.prototype.addTrack&&n.version>=65)return sf(e);let r=e.RTCPeerConnection.prototype.getLocalStreams;e.RTCPeerConnection.prototype.getLocalStreams=function(){let e=r.apply(this);return this._reverseStreams=this._reverseStreams||{},e.map(e=>this._reverseStreams[e.id])};let i=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(n){if(this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{},n.getTracks().forEach(e=>{if(this.getSenders().find(n=>n.track===e))throw new DOMException("Track already exists.","InvalidAccessError")}),!this._reverseStreams[n.id]){let r=new e.MediaStream(n.getTracks());this._streams[n.id]=r,this._reverseStreams[r.id]=n,n=r}i.apply(this,[n])};let o=e.RTCPeerConnection.prototype.removeStream;function s(e,n){let r=n.sdp;return Object.keys(e._reverseStreams||[]).forEach(n=>{let i=e._reverseStreams[n],o=e._streams[i.id];r=r.replace(RegExp(o.id,"g"),i.id)}),new RTCSessionDescription({type:n.type,sdp:r})}e.RTCPeerConnection.prototype.removeStream=function(e){this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{},o.apply(this,[this._streams[e.id]||e]),delete this._reverseStreams[this._streams[e.id]?this._streams[e.id].id:e.id],delete this._streams[e.id]},e.RTCPeerConnection.prototype.addTrack=function(n,r){if("closed"===this.signalingState)throw new DOMException("The RTCPeerConnection's signalingState is 'closed'.","InvalidStateError");let i=[].slice.call(arguments,1);if(1!==i.length||!i[0].getTracks().find(e=>e===n))throw new DOMException("The adapter.js addTrack polyfill only supports a single stream which is associated with the specified track.","NotSupportedError");if(this.getSenders().find(e=>e.track===n))throw new DOMException("Track already exists.","InvalidAccessError");this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{};let o=this._streams[r.id];if(o)o.addTrack(n),Promise.resolve().then(()=>{this.dispatchEvent(new Event("negotiationneeded"))});else{let i=new e.MediaStream([n]);this._streams[r.id]=i,this._reverseStreams[i.id]=r,this.addStream(i)}return this.getSenders().find(e=>e.track===n)},["createOffer","createAnswer"].forEach(function(n){let r=e.RTCPeerConnection.prototype[n];e.RTCPeerConnection.prototype[n]=({[n](){let e=arguments,n=arguments.length&&"function"==typeof arguments[0];return n?r.apply(this,[n=>{let r=s(this,n);e[0].apply(null,[r])},n=>{e[1]&&e[1].apply(null,n)},arguments[2]]):r.apply(this,arguments).then(e=>s(this,e))}})[n]});let a=e.RTCPeerConnection.prototype.setLocalDescription;e.RTCPeerConnection.prototype.setLocalDescription=function(){var e,n;let r;return arguments.length&&arguments[0].type?(arguments[0]=(e=this,n=arguments[0],r=n.sdp,Object.keys(e._reverseStreams||[]).forEach(n=>{let i=e._reverseStreams[n],o=e._streams[i.id];r=r.replace(RegExp(i.id,"g"),o.id)}),new RTCSessionDescription({type:n.type,sdp:r})),a.apply(this,arguments)):a.apply(this,arguments)};let c=Object.getOwnPropertyDescriptor(e.RTCPeerConnection.prototype,"localDescription");Object.defineProperty(e.RTCPeerConnection.prototype,"localDescription",{get(){let e=c.get.apply(this);return""===e.type?e:s(this,e)}}),e.RTCPeerConnection.prototype.removeTrack=function(e){let n;if("closed"===this.signalingState)throw new DOMException("The RTCPeerConnection's signalingState is 'closed'.","InvalidStateError");if(!e._pc)throw new DOMException("Argument 1 of RTCPeerConnection.removeTrack does not implement interface RTCRtpSender.","TypeError");if(e._pc!==this)throw new DOMException("Sender was not created by this connection.","InvalidAccessError");this._streams=this._streams||{},Object.keys(this._streams).forEach(r=>{this._streams[r].getTracks().find(n=>e.track===n)&&(n=this._streams[r])}),n&&(1===n.getTracks().length?this.removeStream(this._reverseStreams[n.id]):n.removeTrack(e.track),this.dispatchEvent(new Event("negotiationneeded")))}}function sg(e,n){!e.RTCPeerConnection&&e.webkitRTCPeerConnection&&(e.RTCPeerConnection=e.webkitRTCPeerConnection),e.RTCPeerConnection&&n.version<53&&["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach(function(n){let r=e.RTCPeerConnection.prototype[n];e.RTCPeerConnection.prototype[n]=({[n](){return arguments[0]=new("addIceCandidate"===n?e.RTCIceCandidate:e.RTCSessionDescription)(arguments[0]),r.apply(this,arguments)}})[n]})}function sv(e,n){sn(e,"negotiationneeded",e=>{let r=e.target;if(!(n.version<72)&&(!r.getConfiguration||"plan-b"!==r.getConfiguration().sdpSemantics)||"stable"===r.signalingState)return e})}function sy(e,n){let r=e&&e.navigator,i=e&&e.MediaStreamTrack;if(r.getUserMedia=function(e,n,i){ss("navigator.getUserMedia","navigator.mediaDevices.getUserMedia"),r.mediaDevices.getUserMedia(e).then(n,i)},!(n.version>55&&"autoGainControl"in r.mediaDevices.getSupportedConstraints())){let e=function(e,n,r){n in e&&!(r in e)&&(e[r]=e[n],delete e[n])},n=r.mediaDevices.getUserMedia.bind(r.mediaDevices);if(r.mediaDevices.getUserMedia=function(r){return"object"==typeof r&&"object"==typeof r.audio&&(e((r=JSON.parse(JSON.stringify(r))).audio,"autoGainControl","mozAutoGainControl"),e(r.audio,"noiseSuppression","mozNoiseSuppression")),n(r)},i&&i.prototype.getSettings){let n=i.prototype.getSettings;i.prototype.getSettings=function(){let r=n.apply(this,arguments);return e(r,"mozAutoGainControl","autoGainControl"),e(r,"mozNoiseSuppression","noiseSuppression"),r}}if(i&&i.prototype.applyConstraints){let n=i.prototype.applyConstraints;i.prototype.applyConstraints=function(r){return"audio"===this.kind&&"object"==typeof r&&(e(r=JSON.parse(JSON.stringify(r)),"autoGainControl","mozAutoGainControl"),e(r,"noiseSuppression","mozNoiseSuppression")),n.apply(this,[r])}}}}function sb(e,n){e.navigator.mediaDevices&&"getDisplayMedia"in e.navigator.mediaDevices||e.navigator.mediaDevices&&(e.navigator.mediaDevices.getDisplayMedia=function(r){if(!(r&&r.video)){let e=new DOMException("getDisplayMedia without video constraints is undefined");return e.name="NotFoundError",e.code=8,Promise.reject(e)}return!0===r.video?r.video={mediaSource:n}:r.video.mediaSource=n,e.navigator.mediaDevices.getUserMedia(r)})}function s_(e){"object"==typeof e&&e.RTCTrackEvent&&"receiver"in e.RTCTrackEvent.prototype&&!("transceiver"in e.RTCTrackEvent.prototype)&&Object.defineProperty(e.RTCTrackEvent.prototype,"transceiver",{get(){return{receiver:this.receiver}}})}function sw(e,n){if("object"!=typeof e||!(e.RTCPeerConnection||e.mozRTCPeerConnection))return;!e.RTCPeerConnection&&e.mozRTCPeerConnection&&(e.RTCPeerConnection=e.mozRTCPeerConnection),n.version<53&&["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach(function(n){let r=e.RTCPeerConnection.prototype[n];e.RTCPeerConnection.prototype[n]=({[n](){return arguments[0]=new("addIceCandidate"===n?e.RTCIceCandidate:e.RTCSessionDescription)(arguments[0]),r.apply(this,arguments)}})[n]});let r={inboundrtp:"inbound-rtp",outboundrtp:"outbound-rtp",candidatepair:"candidate-pair",localcandidate:"local-candidate",remotecandidate:"remote-candidate"},i=e.RTCPeerConnection.prototype.getStats;e.RTCPeerConnection.prototype.getStats=function(){let[e,o,s]=arguments;return i.apply(this,[e||null]).then(e=>{if(n.version<53&&!o)try{e.forEach(e=>{e.type=r[e.type]||e.type})}catch(n){if("TypeError"!==n.name)throw n;e.forEach((n,i)=>{e.set(i,Object.assign({},n,{type:r[n.type]||n.type}))})}return e}).then(o,s)}}function sO(e){if(!("object"==typeof e&&e.RTCPeerConnection&&e.RTCRtpSender)||e.RTCRtpSender&&"getStats"in e.RTCRtpSender.prototype)return;let n=e.RTCPeerConnection.prototype.getSenders;n&&(e.RTCPeerConnection.prototype.getSenders=function(){let e=n.apply(this,[]);return e.forEach(e=>e._pc=this),e});let r=e.RTCPeerConnection.prototype.addTrack;r&&(e.RTCPeerConnection.prototype.addTrack=function(){let e=r.apply(this,arguments);return e._pc=this,e}),e.RTCRtpSender.prototype.getStats=function(){return this.track?this._pc.getStats(this.track):Promise.resolve(new Map)}}function sR(e){if(!("object"==typeof e&&e.RTCPeerConnection&&e.RTCRtpSender)||e.RTCRtpSender&&"getStats"in e.RTCRtpReceiver.prototype)return;let n=e.RTCPeerConnection.prototype.getReceivers;n&&(e.RTCPeerConnection.prototype.getReceivers=function(){let e=n.apply(this,[]);return e.forEach(e=>e._pc=this),e}),sn(e,"track",e=>(e.receiver._pc=e.srcElement,e)),e.RTCRtpReceiver.prototype.getStats=function(){return this._pc.getStats(this.track)}}function sS(e){!e.RTCPeerConnection||"removeStream"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.removeStream=function(e){ss("removeStream","removeTrack"),this.getSenders().forEach(n=>{n.track&&e.getTracks().includes(n.track)&&this.removeTrack(n)})})}function sE(e){e.DataChannel&&!e.RTCDataChannel&&(e.RTCDataChannel=e.DataChannel)}function sT(e){if(!("object"==typeof e&&e.RTCPeerConnection))return;let n=e.RTCPeerConnection.prototype.addTransceiver;n&&(e.RTCPeerConnection.prototype.addTransceiver=function(){this.setParametersPromises=[];let e=arguments[1]&&arguments[1].sendEncodings;void 0===e&&(e=[]);let r=(e=[...e]).length>0;r&&e.forEach(e=>{if("rid"in e&&!/^[a-z0-9]{0,16}$/i.test(e.rid))throw TypeError("Invalid RID value provided.");if("scaleResolutionDownBy"in e&&!(parseFloat(e.scaleResolutionDownBy)>=1))throw RangeError("scale_resolution_down_by must be >= 1.0");if("maxFramerate"in e&&!(parseFloat(e.maxFramerate)>=0))throw RangeError("max_framerate must be >= 0.0")});let i=n.apply(this,arguments);if(r){let{sender:n}=i,r=n.getParameters();"encodings"in r&&(1!==r.encodings.length||0!==Object.keys(r.encodings[0]).length)||(r.encodings=e,n.sendEncodings=e,this.setParametersPromises.push(n.setParameters(r).then(()=>{delete n.sendEncodings}).catch(()=>{delete n.sendEncodings})))}return i})}function sM(e){if(!("object"==typeof e&&e.RTCRtpSender))return;let n=e.RTCRtpSender.prototype.getParameters;n&&(e.RTCRtpSender.prototype.getParameters=function(){let e=n.apply(this,arguments);return"encodings"in e||(e.encodings=[].concat(this.sendEncodings||[{}])),e})}function sx(e){if(!("object"==typeof e&&e.RTCPeerConnection))return;let n=e.RTCPeerConnection.prototype.createOffer;e.RTCPeerConnection.prototype.createOffer=function(){return this.setParametersPromises&&this.setParametersPromises.length?Promise.all(this.setParametersPromises).then(()=>n.apply(this,arguments)).finally(()=>{this.setParametersPromises=[]}):n.apply(this,arguments)}}function sC(e){if(!("object"==typeof e&&e.RTCPeerConnection))return;let n=e.RTCPeerConnection.prototype.createAnswer;e.RTCPeerConnection.prototype.createAnswer=function(){return this.setParametersPromises&&this.setParametersPromises.length?Promise.all(this.setParametersPromises).then(()=>n.apply(this,arguments)).finally(()=>{this.setParametersPromises=[]}):n.apply(this,arguments)}}function sI(e){if("object"==typeof e&&e.RTCPeerConnection){if("getLocalStreams"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.getLocalStreams=function(){return this._localStreams||(this._localStreams=[]),this._localStreams}),!("addStream"in e.RTCPeerConnection.prototype)){let n=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addStream=function(e){this._localStreams||(this._localStreams=[]),this._localStreams.includes(e)||this._localStreams.push(e),e.getAudioTracks().forEach(r=>n.call(this,r,e)),e.getVideoTracks().forEach(r=>n.call(this,r,e))},e.RTCPeerConnection.prototype.addTrack=function(e,...r){return r&&r.forEach(e=>{this._localStreams?this._localStreams.includes(e)||this._localStreams.push(e):this._localStreams=[e]}),n.apply(this,arguments)}}"removeStream"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.removeStream=function(e){this._localStreams||(this._localStreams=[]);let n=this._localStreams.indexOf(e);if(-1===n)return;this._localStreams.splice(n,1);let r=e.getTracks();this.getSenders().forEach(e=>{r.includes(e.track)&&this.removeTrack(e)})})}}function sj(e){if("object"==typeof e&&e.RTCPeerConnection&&("getRemoteStreams"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.getRemoteStreams=function(){return this._remoteStreams?this._remoteStreams:[]}),!("onaddstream"in e.RTCPeerConnection.prototype))){Object.defineProperty(e.RTCPeerConnection.prototype,"onaddstream",{get(){return this._onaddstream},set(e){this._onaddstream&&(this.removeEventListener("addstream",this._onaddstream),this.removeEventListener("track",this._onaddstreampoly)),this.addEventListener("addstream",this._onaddstream=e),this.addEventListener("track",this._onaddstreampoly=e=>{e.streams.forEach(e=>{if(this._remoteStreams||(this._remoteStreams=[]),this._remoteStreams.includes(e))return;this._remoteStreams.push(e);let n=new Event("addstream");n.stream=e,this.dispatchEvent(n)})})}});let n=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(){let e=this;return this._onaddstreampoly||this.addEventListener("track",this._onaddstreampoly=function(n){n.streams.forEach(n=>{if(e._remoteStreams||(e._remoteStreams=[]),e._remoteStreams.indexOf(n)>=0)return;e._remoteStreams.push(n);let r=new Event("addstream");r.stream=n,e.dispatchEvent(r)})}),n.apply(e,arguments)}}}function sA(e){if("object"!=typeof e||!e.RTCPeerConnection)return;let n=e.RTCPeerConnection.prototype,r=n.createOffer,i=n.createAnswer,o=n.setLocalDescription,s=n.setRemoteDescription,a=n.addIceCandidate;n.createOffer=function(e,n){let i=arguments.length>=2?arguments[2]:arguments[0],o=r.apply(this,[i]);return n?(o.then(e,n),Promise.resolve()):o},n.createAnswer=function(e,n){let r=arguments.length>=2?arguments[2]:arguments[0],o=i.apply(this,[r]);return n?(o.then(e,n),Promise.resolve()):o};let c=function(e,n,r){let i=o.apply(this,[e]);return r?(i.then(n,r),Promise.resolve()):i};n.setLocalDescription=c,n.setRemoteDescription=c=function(e,n,r){let i=s.apply(this,[e]);return r?(i.then(n,r),Promise.resolve()):i},n.addIceCandidate=function(e,n,r){let i=a.apply(this,[e]);return r?(i.then(n,r),Promise.resolve()):i}}function sk(e){let n=e&&e.navigator;if(n.mediaDevices&&n.mediaDevices.getUserMedia){let e=n.mediaDevices,r=e.getUserMedia.bind(e);n.mediaDevices.getUserMedia=e=>r(sB(e))}!n.getUserMedia&&n.mediaDevices&&n.mediaDevices.getUserMedia&&(n.getUserMedia=(function(e,r,i){n.mediaDevices.getUserMedia(e).then(r,i)}).bind(n))}function sB(e){return e&&void 0!==e.video?Object.assign({},e,{video:function e(n){return sa(n)?Object.keys(n).reduce(function(r,i){let o=sa(n[i]),s=o?e(n[i]):n[i],a=o&&!Object.keys(s).length;return void 0===s||a?r:Object.assign(r,{[i]:s})},{}):n}(e.video)}):e}function sP(e){if(!e.RTCPeerConnection)return;let n=e.RTCPeerConnection;e.RTCPeerConnection=function(e,r){if(e&&e.iceServers){let n=[];for(let r=0;r<e.iceServers.length;r++){let i=e.iceServers[r];void 0===i.urls&&i.url?(ss("RTCIceServer.url","RTCIceServer.urls"),(i=JSON.parse(JSON.stringify(i))).urls=i.url,delete i.url,n.push(i)):n.push(e.iceServers[r])}e.iceServers=n}return new n(e,r)},e.RTCPeerConnection.prototype=n.prototype,"generateCertificate"in n&&Object.defineProperty(e.RTCPeerConnection,"generateCertificate",{get:()=>n.generateCertificate})}function sN(e){"object"==typeof e&&e.RTCTrackEvent&&"receiver"in e.RTCTrackEvent.prototype&&!("transceiver"in e.RTCTrackEvent.prototype)&&Object.defineProperty(e.RTCTrackEvent.prototype,"transceiver",{get(){return{receiver:this.receiver}}})}function sD(e){let n=e.RTCPeerConnection.prototype.createOffer;e.RTCPeerConnection.prototype.createOffer=function(e){if(e){void 0!==e.offerToReceiveAudio&&(e.offerToReceiveAudio=!!e.offerToReceiveAudio);let n=this.getTransceivers().find(e=>"audio"===e.receiver.track.kind);!1===e.offerToReceiveAudio&&n?"sendrecv"===n.direction?n.setDirection?n.setDirection("sendonly"):n.direction="sendonly":"recvonly"===n.direction&&(n.setDirection?n.setDirection("inactive"):n.direction="inactive"):!0!==e.offerToReceiveAudio||n||this.addTransceiver("audio",{direction:"recvonly"}),void 0!==e.offerToReceiveVideo&&(e.offerToReceiveVideo=!!e.offerToReceiveVideo);let r=this.getTransceivers().find(e=>"video"===e.receiver.track.kind);!1===e.offerToReceiveVideo&&r?"sendrecv"===r.direction?r.setDirection?r.setDirection("sendonly"):r.direction="sendonly":"recvonly"===r.direction&&(r.setDirection?r.setDirection("inactive"):r.direction="inactive"):!0!==e.offerToReceiveVideo||r||this.addTransceiver("video",{direction:"recvonly"})}return n.apply(this,arguments)}}function sL(e){"object"!=typeof e||e.AudioContext||(e.AudioContext=e.webkitAudioContext)}var sF=__webpack_require__("../../node_modules/sdp/sdp.js"),sU=__webpack_require__.n(sF);function sq(e){if(!e.RTCIceCandidate||e.RTCIceCandidate&&"foundation"in e.RTCIceCandidate.prototype)return;let n=e.RTCIceCandidate;e.RTCIceCandidate=function(e){if("object"==typeof e&&e.candidate&&0===e.candidate.indexOf("a=")&&((e=JSON.parse(JSON.stringify(e))).candidate=e.candidate.substring(2)),e.candidate&&e.candidate.length){let r=new n(e),i=sU().parseCandidate(e.candidate);for(let e in i)e in r||Object.defineProperty(r,e,{value:i[e]});return r.toJSON=function(){return{candidate:r.candidate,sdpMid:r.sdpMid,sdpMLineIndex:r.sdpMLineIndex,usernameFragment:r.usernameFragment}},r}return new n(e)},e.RTCIceCandidate.prototype=n.prototype,sn(e,"icecandidate",n=>(n.candidate&&Object.defineProperty(n,"candidate",{value:new e.RTCIceCandidate(n.candidate),writable:"false"}),n))}function sH(e){!e.RTCIceCandidate||e.RTCIceCandidate&&"relayProtocol"in e.RTCIceCandidate.prototype||sn(e,"icecandidate",e=>{if(e.candidate){let n=sU().parseCandidate(e.candidate.candidate);"relay"===n.type&&(e.candidate.relayProtocol=({0:"tls",1:"tcp",2:"udp"})[n.priority>>24])}return e})}function sV(e,n){if(!e.RTCPeerConnection)return;"sctp"in e.RTCPeerConnection.prototype||Object.defineProperty(e.RTCPeerConnection.prototype,"sctp",{get(){return void 0===this._sctp?null:this._sctp}});let r=function(e){if(!e||!e.sdp)return!1;let n=sU().splitSections(e.sdp);return n.shift(),n.some(e=>{let n=sU().parseMLine(e);return n&&"application"===n.kind&&-1!==n.protocol.indexOf("SCTP")})},i=function(e){let n=e.sdp.match(/mozilla...THIS_IS_SDPARTA-(\d+)/);if(null===n||n.length<2)return -1;let r=parseInt(n[1],10);return r!=r?-1:r},o=function(e){let r=65536;return"firefox"===n.browser&&(r=n.version<57?-1===e?16384:0x7ffffff5:n.version<60?57===n.version?65535:65536:0x7ffffff5),r},s=function(e,r){let i=65536;"firefox"===n.browser&&57===n.version&&(i=65535);let o=sU().matchPrefix(e.sdp,"a=max-message-size:");return o.length>0?i=parseInt(o[0].substring(19),10):"firefox"===n.browser&&-1!==r&&(i=0x7ffffff5),i},a=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(){if(this._sctp=null,"chrome"===n.browser&&n.version>=76){let{sdpSemantics:e}=this.getConfiguration();"plan-b"===e&&Object.defineProperty(this,"sctp",{get(){return void 0===this._sctp?null:this._sctp},enumerable:!0,configurable:!0})}if(r(arguments[0])){let e,n=i(arguments[0]),r=o(n),a=s(arguments[0],n);e=0===r&&0===a?Number.POSITIVE_INFINITY:0===r||0===a?Math.max(r,a):Math.min(r,a);let c={};Object.defineProperty(c,"maxMessageSize",{get:()=>e}),this._sctp=c}return a.apply(this,arguments)}}function sX(e){if(!(e.RTCPeerConnection&&"createDataChannel"in e.RTCPeerConnection.prototype))return;function n(e,n){let r=e.send;e.send=function(){let i=arguments[0],o=i.length||i.size||i.byteLength;if("open"===e.readyState&&n.sctp&&o>n.sctp.maxMessageSize)throw TypeError("Message too large (can send a maximum of "+n.sctp.maxMessageSize+" bytes)");return r.apply(e,arguments)}}let r=e.RTCPeerConnection.prototype.createDataChannel;e.RTCPeerConnection.prototype.createDataChannel=function(){let e=r.apply(this,arguments);return n(e,this),e},sn(e,"datachannel",e=>(n(e.channel,e.target),e))}function sW(e){if(!e.RTCPeerConnection||"connectionState"in e.RTCPeerConnection.prototype)return;let n=e.RTCPeerConnection.prototype;Object.defineProperty(n,"connectionState",{get(){return({completed:"connected",checking:"connecting"})[this.iceConnectionState]||this.iceConnectionState},enumerable:!0,configurable:!0}),Object.defineProperty(n,"onconnectionstatechange",{get(){return this._onconnectionstatechange||null},set(e){this._onconnectionstatechange&&(this.removeEventListener("connectionstatechange",this._onconnectionstatechange),delete this._onconnectionstatechange),e&&this.addEventListener("connectionstatechange",this._onconnectionstatechange=e)},enumerable:!0,configurable:!0}),["setLocalDescription","setRemoteDescription"].forEach(e=>{let r=n[e];n[e]=function(){return this._connectionstatechangepoly||(this._connectionstatechangepoly=e=>{let n=e.target;if(n._lastConnectionState!==n.connectionState){n._lastConnectionState=n.connectionState;let r=new Event("connectionstatechange",e);n.dispatchEvent(r)}return e},this.addEventListener("iceconnectionstatechange",this._connectionstatechangepoly)),r.apply(this,arguments)}})}function s$(e,n){if(!e.RTCPeerConnection||"chrome"===n.browser&&n.version>=71||"safari"===n.browser&&n._safariVersion>=13.1)return;let r=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(n){if(n&&n.sdp&&-1!==n.sdp.indexOf("\na=extmap-allow-mixed")){let r=n.sdp.split("\n").filter(e=>"a=extmap-allow-mixed"!==e.trim()).join("\n");e.RTCSessionDescription&&n instanceof e.RTCSessionDescription?arguments[0]=new e.RTCSessionDescription({type:n.type,sdp:r}):n.sdp=r}return r.apply(this,arguments)}}function sz(e,n){if(!(e.RTCPeerConnection&&e.RTCPeerConnection.prototype))return;let r=e.RTCPeerConnection.prototype.addIceCandidate;r&&0!==r.length&&(e.RTCPeerConnection.prototype.addIceCandidate=function(){return arguments[0]?("chrome"===n.browser&&n.version<78||"firefox"===n.browser&&n.version<68||"safari"===n.browser)&&arguments[0]&&""===arguments[0].candidate?Promise.resolve():r.apply(this,arguments):(arguments[1]&&arguments[1].apply(null),Promise.resolve())})}function sG(e,n){if(!(e.RTCPeerConnection&&e.RTCPeerConnection.prototype))return;let r=e.RTCPeerConnection.prototype.setLocalDescription;r&&0!==r.length&&(e.RTCPeerConnection.prototype.setLocalDescription=function(){let e=arguments[0]||{};if("object"!=typeof e||e.type&&e.sdp)return r.apply(this,arguments);if(!(e={type:e.type,sdp:e.sdp}).type)switch(this.signalingState){case"stable":case"have-local-offer":case"have-remote-pranswer":e.type="offer";break;default:e.type="answer"}return e.sdp||"offer"!==e.type&&"answer"!==e.type?r.apply(this,[e]):("offer"===e.type?this.createOffer:this.createAnswer).apply(this).then(e=>r.apply(this,[e]))})}let sK=function({window:e}={},n={shimChrome:!0,shimFirefox:!0,shimSafari:!0}){let r=function(e){let n={browser:null,version:null};if(void 0===e||!e.navigator||!e.navigator.userAgent)return n.browser="Not a browser.",n;let{navigator:r}=e;if(r.userAgentData&&r.userAgentData.brands){let e=r.userAgentData.brands.find(e=>"Chromium"===e.brand);if(e)return{browser:"chrome",version:parseInt(e.version,10)}}return r.mozGetUserMedia?(n.browser="firefox",n.version=parseInt(st(r.userAgent,/Firefox\/(\d+)\./,1))):r.webkitGetUserMedia||!1===e.isSecureContext&&e.webkitRTCPeerConnection?(n.browser="chrome",n.version=parseInt(st(r.userAgent,/Chrom(e|ium)\/(\d+)\./,2))):e.RTCPeerConnection&&r.userAgent.match(/AppleWebKit\/(\d+)\./)?(n.browser="safari",n.version=parseInt(st(r.userAgent,/AppleWebKit\/(\d+)\./,1)),n.supportsUnifiedPlan=e.RTCRtpTransceiver&&"currentDirection"in e.RTCRtpTransceiver.prototype,n._safariVersion=st(r.userAgent,/Version\/(\d+(\.?\d+))/,1)):n.browser="Not a supported browser.",n}(e),i={browserDetails:r,commonShim:k,extractVersion:st,disableLog:sr,disableWarnings:si,sdp:sF};switch(r.browser){case"chrome":if(!I||!sg||!n.shimChrome){so("Chrome shim is not included in this adapter release.");break}if(null===r.version){so("Chrome shim can not determine version, not shimming.");break}so("adapter.js shimming chrome."),i.browserShim=I,sz(e,r),sG(e,r),sl(e,r),su(e,r),sg(e,r),sd(e,r),sm(e,r),sp(e,r),sh(e,r),sv(e,r),sq(e,r),sH(e,r),sW(e,r),sV(e,r),sX(e,r),s$(e,r);break;case"firefox":if(!j||!sw||!n.shimFirefox){so("Firefox shim is not included in this adapter release.");break}so("adapter.js shimming firefox."),i.browserShim=j,sz(e,r),sG(e,r),sy(e,r),sw(e,r),s_(e,r),sS(e,r),sO(e,r),sR(e,r),sE(e,r),sT(e,r),sM(e,r),sx(e,r),sC(e,r),sq(e,r),sW(e,r),sV(e,r),sX(e,r);break;case"safari":if(!A||!n.shimSafari){so("Safari shim is not included in this adapter release.");break}so("adapter.js shimming safari."),i.browserShim=A,sz(e,r),sG(e,r),sP(e,r),sD(e,r),sA(e,r),sI(e,r),sj(e,r),sN(e,r),sk(e,r),sL(e,r),sq(e,r),sH(e,r),sV(e,r),sX(e,r),s$(e,r);break;default:so("Unsupported browser!")}return i}({window:"undefined"==typeof window?void 0:window});!function(e){e.DEFAULT_BRTC_SDK_URL="https://brtc-sdk.cdn.bcebos.com/npm/baidurtc@1.2.19/baidu.rtc.sdk.js",e.DEFAULT_BRTC_CLIENT_CONFIG={displayName:"AaaSPilot Kit",debugLevel:!1,rtcOptions:{},cfg:{tag:"H5.SDK",llm:"LLMMute",tts:"MUTE"},silenceTimeoutMs:1e4}}(C||(C={}));let sY=e=>{if(e)return"string"==typeof e?e:e.id};class sQ extends oA{static #k=this.MESSAGE_INTERVAL_THRESHOLD=5e3;preloadDeps(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:C.DEFAULT_BRTC_SDK_URL;return"undefined"==typeof window||window.adapter||(window.adapter=null!=sK?sK:B),"function"==typeof window.BRTC_Start?Promise.resolve():(this.brtcLoadPromise||(this.brtcLoadPromise=new Promise((n,r)=>{let i=document.createElement("script");i.src=e,i.async=!0,i.onload=()=>n(),i.onerror=()=>{this.errorManager.handleError(new nH(`Failed to load BRTC SDK: ${e}`)),r(Error(`Failed to load BRTC SDK: ${e}`))},document.head.appendChild(i)})),this.brtcLoadPromise)}makeStartOptions(){return{...C.DEFAULT_BRTC_CLIENT_CONFIG,cfg:{...C.DEFAULT_BRTC_CLIENT_CONFIG.cfg,asr_vad:this.opts.asrVad}}}parseMessage(e){let n=e.replace(/\[Q\]:?|\[M\]:?|\[C\]:?|\[A\]:?|\[H\]:?|\[E\]:?|\[B\]:?|\[T\]:?/g,"").trim(),r=E.EMessageType.Event,i=!0,o=!1,s=!1;return s=e.includes("VOICE_COMING"),e.includes("[Q]")&&(r=E.EMessageType.Query),e.includes("[E]")&&(r=E.EMessageType.Event),i=!e.includes("[M]"),{type:r,continued:e.includes("[C]"),data:n,completed:i,isCollectingSounds:s}}constructor(...e){super(...e),this.brtcLoadPromise=null,this.silenceTimer=null,this.lastMessageTime=0,this.messageIntervalTimer=null,this.start=async()=>{if(this.started)return;await this._ensureMicPermission();let{displayName:e,debugLevel:n,rtcOptions:{remoteVideoElement:r,localVideoElement:i},cfg:o,silenceTimeoutMs:s}=this.makeStartOptions();return new Promise((a,c)=>{this.signalingService.Start({debuglevel:n,cfg:o,displayname:e,remotevideoviewid:sY(r),localvideoviewid:sY(i),usingremotemediastate:!0,success:()=>{this.started=!0,this.emitter.emit("start",{sessionId:this.sessionId}).catch(rh),a()},error:e=>{this.errorManager.handleError(new nz(e||"",{sessionId:this.sessionId})),c(Error(e||""))},onmessage:e=>{try{let n=this.parseMessage(e.data);if(e.data.includes("VOICE_COMING")||(this.emitter.emitSerial("message",{...n,sessionId:this.sessionId}).catch(rh),this.checkMessageInterval(n)),0!==s){let r=""===n.data;(e.data.includes("[E]")||e.data.includes("VOICE_COMING"))&&r?this.triggerSilence():this.resetSilenceTimer()}}catch(e){e instanceof Error&&this.errorManager.handleError(new nW(e.message,{sessionId:this.sessionId}))}},userevent_joinedroom:(e,n,r)=>{this.emitter.emit("user_joined_room",{id:e,display:n,attribute:r,sessionId:this.sessionId})},userevent_leavingroom:(e,n)=>{this.emitter.emit("user_leaving_room",{id:e,display:n,sessionId:this.sessionId})},remotemediastating:(e,n,r)=>{this.emitter.emit("media_state_changed",{id:e,medium:n,on:r,sessionId:this.sessionId})}})})},this.stop=async()=>{try{await this._stop()}catch(e){e instanceof Error&&this.errorManager.handleError(new nV(e.message,{sessionId:this.sessionId}))}this.emitter.emit("stop",{sessionId:this.signalingService.GetSessionID()})},this.dispose=()=>{this._dispose(),this.brtcLoadPromise=null,this.silenceTimer&&(window.clearTimeout(this.silenceTimer),this.silenceTimer=null),this.messageIntervalTimer&&(window.clearTimeout(this.messageIntervalTimer),this.messageIntervalTimer=null),this.lastMessageTime=0},this.resetSilenceTimer=()=>{null!==this.silenceTimer&&window.clearTimeout(this.silenceTimer),this.silenceTimer=window.setTimeout(()=>{this.emitter.emit("silence",{sessionId:this.signalingService.GetSessionID()})},this.makeStartOptions().silenceTimeoutMs)},this.triggerSilence=()=>{this.emitter.emit("silence",{sessionId:this.signalingService.GetSessionID()}),this.resetSilenceTimer()},this.checkMessageInterval=e=>{let n=Date.now();if(e.completed){this.messageIntervalTimer&&(window.clearTimeout(this.messageIntervalTimer),this.messageIntervalTimer=null),this.lastMessageTime=0;return}if(0===this.lastMessageTime)this.lastMessageTime=n,this.messageIntervalTimer=window.setTimeout(()=>{this.errorManager.handleError(new n$(`ASR\u{6D88}\u{606F}\u{95F4}\u{9694}\u{8D85}\u{8FC7}${sQ.MESSAGE_INTERVAL_THRESHOLD}ms\u{9608}\u{503C}`,{sessionId:this.sessionId,context:{lastMessageTime:this.lastMessageTime,currentTime:n,threshold:sQ.MESSAGE_INTERVAL_THRESHOLD}}))},sQ.MESSAGE_INTERVAL_THRESHOLD);else{let e=n-this.lastMessageTime;e>sQ.MESSAGE_INTERVAL_THRESHOLD&&this.errorManager.handleError(new n$(`ASR\u{6D88}\u{606F}\u{95F4}\u{9694}${e}ms\u{8D85}\u{8FC7}${sQ.MESSAGE_INTERVAL_THRESHOLD}ms\u{9608}\u{503C}`,{sessionId:this.sessionId,context:{lastMessageTime:this.lastMessageTime,currentTime:n,interval:e,threshold:sQ.MESSAGE_INTERVAL_THRESHOLD}})),this.lastMessageTime=n,this.messageIntervalTimer&&window.clearTimeout(this.messageIntervalTimer),this.messageIntervalTimer=window.setTimeout(()=>{this.errorManager.handleError(new n$(`ASR\u{6D88}\u{606F}\u{95F4}\u{9694}\u{8D85}\u{8FC7}${sQ.MESSAGE_INTERVAL_THRESHOLD}ms\u{9608}\u{503C}`,{sessionId:this.sessionId,context:{lastMessageTime:this.lastMessageTime,currentTime:Date.now(),threshold:sQ.MESSAGE_INTERVAL_THRESHOLD}}))},sQ.MESSAGE_INTERVAL_THRESHOLD)}}}}sQ=function(e,n,r,i){var o,s=arguments.length,a=s<3?n:null===i?i=Object.getOwnPropertyDescriptor(n,r):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,n,r,i);else for(var c=e.length-1;c>=0;c--)(o=e[c])&&(a=(s<3?o(a):s>3?o(n,r,a):o(n,r))||a);return s>3&&a&&Object.defineProperty(n,r,a),a}([ey(),eb()],sQ),function(){if("undefined"==typeof AbortSignal)return console.warn("AbortSignal is not defined in this environment. The polyfill will not be installed.");iy("any",im.abortSignalAny),iy("timeout",ig.abortSignalTimeout),iy("abort",iv.abortSignalAbort)}();let sJ=e=>{var n;let r=new tB({defaultScope:"Singleton"}),i={...rs,...e,hotWordReplacementRules:[...ri,...null!=(n=e.hotWordReplacementRules)?n:[]]};r.bind(t1.IOptions).toConstantValue(i),r.bind(t1.ErrorManager).to(re),r.bind(t1.CommonRequest).to(nS);let{agentConfig:o,agentService:s,enableDebugMode:a}=i,c=!!(null==o?void 0:o.robotId),l=!!(null==o?void 0:o.token),u=!!s;if(u&&o&&a&&console.warn("[createAaaSPilotKit] agentService 已提供,agentConfig 配置将被忽略。"),!u&&!c&&!l)throw Error("[createAaaSPilotKit] 未检测到有效的 agent 配置,请至少提供 agentService 或 agentConfig 中的 robotId/token。");s?(Reflect.hasOwnMetadata("@inversifyjs/core/classIsInjectableFlagReflectKey",s)||(Z(eb(),s),Z(ey(),s)),r.bind(t1.AgentService).to(s)):l?r.bind(t1.AgentService).to(o3):c&&r.bind(t1.AgentService).to(o2),r.bind(t1.SignalingService).to(o9),r.bind(t1.ASRService).to(sQ);let{rendererMode:d}=i;return r.bind(t1.DigitalHumanService).to(oY),r.bind(t1.ConversationService).to(ih),r.bind(t1.AaaSPilotKitController).to(oZ),r.get(t1.AaaSPilotKitController)}})(),exports.AIWorkerConversationBean=__webpack_exports__.AIWorkerConversationBean,exports.AaaSPilotKitController=__webpack_exports__.AaaSPilotKitController,exports.BaseAgentService=__webpack_exports__.BaseAgentService,exports.ClientConversationBean=__webpack_exports__.ClientConversationBean,exports.ConversationBean=__webpack_exports__.ConversationBean,exports.ConversationService=__webpack_exports__.ConversationService,exports.DEFAULT_OPTIONS=__webpack_exports__.DEFAULT_OPTIONS,exports.createAaaSPilotKit=__webpack_exports__.createAaaSPilotKit,__webpack_exports__)-1===["AIWorkerConversationBean","AaaSPilotKitController","BaseAgentService","ClientConversationBean","ConversationBean","ConversationService","DEFAULT_OPTIONS","createAaaSPilotKit"].indexOf(__webpack_i__)&&(exports[__webpack_i__]=__webpack_exports__[__webpack_i__]);Object.defineProperty(exports,"__esModule",{value:!0});