(window.webpackJsonp=window.webpackJsonp||[]).push([[28],{1149:function(e,t,n){var i=n(1);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n,i,s=this;if(!(0,a.default)({capturePerformance:!0},t).capturePerformance)return;var l=function(){(0,r.default)(this,s),void 0!==n&&-1!==n&&(n++,requestAnimationFrame(l))}.bind(this);e.ticker.attach(function(){(0,r.default)(this,s),void 0!==i&&-1!==i&&i++}.bind(this),0,!1);var d=function(){(0,r.default)(this,s),void 0!==n&&void 0!==i&&(e.send((0,o.PerformanceTrack)(n,i,u.memory.totalJSHeapSize||0,u.memory.usedJSHeapSize||0)),i=n=document.hidden?-1:0)}.bind(this);e.attachStartCallback(function(){(0,r.default)(this,s),i=n=-1,d(),l()}.bind(this)),e.attachStopCallback(function(){(0,r.default)(this,s),i=n=void 0}.bind(this)),e.ticker.attach(d,40,!1),void 0!==document.hidden&&e.attachEventListener(document,"visibilitychange",d,!1,!1)},t.jsHeapSizeLimit=t.deviceMemory=void 0;var r=i(n(3)),a=i(n(36)),s=n(97),o=n(71),u=s.IN_BROWSER&&"performance"in window&&"memory"in performance?performance:{memory:{}};t.deviceMemory=s.IN_BROWSER?1024*(navigator.deviceMemory||0):0,t.jsHeapSizeLimit=u.memory.jsHeapSizeLimit||0},1150:function(e,t,n){var i=n(1);Object.defineProperty(t,"__esModule",{value:!0}),t.titleWidgetStyle=t.titleStyle=t.taskTextStyle=t.taskNumberDone=t.taskNumberActive=t.taskDescriptionStyle=t.taskDescriptionCard=t.taskButtonsRow=t.taskButtonStyle=t.taskButtonBorderedStyle=t.symbolIcon=t.stopWidgetStyle=t.spinnerStyles=t.sectionTitleStyle=t.paginationStyle=t.noticeStyle=t.endSectionStyle=t.descriptionWidgetStyle=t.descriptionStyle=t.contentStyle=t.containerWidgetStyle=t.containerStyle=t.buttonWidgetStyle=t.buttonStyle=t.bgStyle=void 0;var r=i(n(8));function a(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?a(Object(n),!0).forEach((function(t){(0,r.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t.bgStyle={position:"fixed",top:0,left:0,width:"100vw",height:"100vh",background:"rgba(0, 0, 0, 0.40)",display:"flex",alignItems:"center",justifyContent:"center",zIndex:999999,fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"'},t.containerStyle={display:"flex",flexDirection:"column",gap:"2rem",alignItems:"center",padding:"1.5rem",borderRadius:"2px",border:"1px solid #D9D9D9",background:"#FFF",width:"22rem"},t.containerWidgetStyle={display:"flex","flex-direction":"column",gap:"unset","align-items":"center",padding:"unset",fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',"border-radius":"2px",border:"1px solid #D9D9D9",background:"rgba(255, 255, 255, 0.75)",width:"22rem"},t.titleStyle={fontFamily:"Verdana, sans-serif",fontSize:"1.25rem",fontStyle:"normal",fontWeight:"500",lineHeight:"1.75rem",color:"rgba(0, 0, 0, 0.85)"},t.descriptionStyle={borderTop:"1px solid rgba(0, 0, 0, 0.06)",borderBottom:"1px solid rgba(0, 0, 0, 0.06)",padding:"1.25rem 0rem",color:"rgba(0, 0, 0, 0.85)",fontFamily:"Verdana, sans-serif",fontSize:"13px",fontStyle:"normal",fontWeight:"400",lineHeight:"auto",whiteSpace:"pre-wrap"},t.noticeStyle={color:"rgba(0, 0, 0, 0.85)",fontFamily:"Verdana, sans-serif",fontSize:"0.875rem",fontStyle:"normal",fontWeight:"400",lineHeight:"1.375rem"},t.buttonStyle={display:"flex",padding:"0.4rem 0.9375rem",justifyContent:"center",alignItems:"center",gap:"0.625rem",borderRadius:"0.25rem",border:"1px solid #394EFF",background:"#394EFF",boxShadow:"0px 2px 0px 0px rgba(0, 0, 0, 0.04)",color:"#FFF",textAlign:"center",fontFamily:"Verdana, sans-serif",fontSize:"1rem",fontStyle:"normal",fontWeight:"500",lineHeight:"1.5rem",cursor:"pointer"},t.sectionTitleStyle={fontFamily:"Verdana, sans-serif",fontSize:"13px",fontWeight:"500",lineHeight:"auto",display:"flex",justifyContent:"space-between",width:"100%",cursor:"pointer"},t.contentStyle={display:"flex",flexDirection:"column",alignItems:"flex-start",gap:"0.625rem",fontSize:"13px",lineHeight:"auto"},t.titleWidgetStyle={padding:"0.5rem",gap:"0.5rem",fontFamily:"Verdana, sans-serif",fontSize:"16px",fontStyle:"normal",fontWeight:"500",lineHeight:"auto",color:"white",display:"flex",alignItems:"center",width:"100%",borderRadius:"2px",background:"rgba(0, 0, 0, 0.75)",boxSizing:"border-box"};var o=t.descriptionWidgetStyle={boxSizing:"border-box",display:"block",width:"100%",borderBottom:"1px solid #D9D9D9",background:"#FFF",padding:"0.65rem",alignSelf:"stretch",color:"#000",fontFamily:"Verdana, sans-serif",fontStyle:"normal",fontWeight:"400"},u=(t.endSectionStyle=s(s({},o),{},{display:"flex",flexDirection:"column",alignItems:"center",gap:"0.625rem"}),t.symbolIcon={fontSize:"1.25rem",fontWeight:"500",cursor:"pointer",color:"#394EFF"},t.buttonWidgetStyle={display:"flex",padding:"0.4rem 0.9375rem",justifyContent:"center",alignItems:"center",gap:"0.625rem",borderRadius:"0.25rem",border:"1px solid #394EFF",background:"#394EFF",boxShadow:"0px 2px 0px 0px rgba(0, 0, 0, 0.04)",color:"#FFF",textAlign:"center",fontFamily:"Verdana, sans-serif",fontSize:"1rem",fontStyle:"normal",fontWeight:"500",lineHeight:"1.5rem",width:"100%",boxSizing:"border-box",cursor:"pointer"},t.stopWidgetStyle={marginTop:"1rem",marginBottom:"1rem",cursor:"pointer",display:"block",fontWeight:"500",fontSize:"13px!important",lineHeight:"auto"},t.paginationStyle={display:"flex",justifyContent:"space-between",alignItems:"center",gap:"1rem",padding:"0.5rem",width:"100%",boxSizing:"border-box"},t.taskNumberActive={display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",borderRadius:"6.25em",outline:"1px solid #394EFF",fontSize:"13px",height:"24px",width:"24px"},t.taskNumberDone={display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",borderRadius:"6.25em",outline:"1px solid #D2DFFF",boxShadow:"0px 2px 0px 0px rgba(0, 0, 0, 0.04)",background:"#D2DFFF",fontSize:"13px",height:"24px",width:"24px"},t.taskDescriptionCard={borderRadius:"0.375rem",border:"1px solid rgba(0, 0, 0, 0.06)",background:"#F5F7FF",boxShadow:"0px 2px 0px 0px rgba(0, 0, 0, 0.04)",display:"flex",flexDirection:"column",padding:"0.625rem 0.9375rem",gap:"0.5rem",alignSelf:"stretch"},t.taskTextStyle={fontWeight:"bold"},t.taskDescriptionStyle={fontSize:"13px",lineHeight:"auto"},t.taskButtonStyle={marginRight:"0.5rem",cursor:"pointer",color:"#394EFF",textAlign:"center",fontFamily:"Verdana, sans-serif",fontSize:"13px",fontStyle:"normal",fontWeight:"500",lineHeight:"auto"});t.taskButtonBorderedStyle=s(s({},u),{},{display:"flex",padding:"0.25rem 0.9375rem",justifyContent:"center",alignItems:"center",gap:"0.5rem",borderRadius:"0.25rem",border:"1px solid #394EFF"}),t.taskButtonsRow={display:"flex",justifyContent:"space-between",alignItems:"center",width:"100%",boxSizing:"border-box"},t.spinnerStyles={border:"4px solid rgba(255, 255, 255, 0.4)",width:"16px",height:"16px",borderRadius:"50%",borderLeftColor:"#fff",animation:"spin 0.5s linear infinite"}},1151:function(e,t,n){var i=n(1);Object.defineProperty(t,"__esModule",{value:!0}),t.TEST_START=t.TEST_ID=t.TASK_IND=t.SESSION_ID=void 0,t.addKeyframes=s,t.createElement=function(e,t,n,i,a){var s=document.createElement(e);s.className=t,(0,r.default)(s.style,n),i&&(s.textContent=i);a&&(s.id=a);return s},t.createSpinner=function(){s();var e=document.createElement("div");return e.classList.add("spinner"),(0,r.default)(e.style,a.spinnerStyles),e},t.generateChevron=function(){var e=document.createElement("div");(0,r.default)(e.style,{width:"0",height:"0",borderLeft:"7px solid transparent",borderRight:"7px solid transparent",borderBottom:"7px solid white"});var t=document.createElement("div");return t.appendChild(e),(0,r.default)(t.style,{display:"flex",alignItems:"center",justifyContent:"center",width:"16px",height:"16px",cursor:"pointer",marginLeft:"auto",transform:"rotate(180deg)"}),t},t.generateGrid=function(){var e=document.createElement("div");e.className="grid";for(var t=0;t<16;t++){var n=document.createElement("div");(0,r.default)(n.style,{width:"2px",height:"2px",borderRadius:"10px",background:"white"}),n.className="cell",e.appendChild(n)}return(0,r.default)(e.style,{display:"grid",gridTemplateColumns:"repeat(4, 1fr)",gridTemplateRows:"repeat(4, 1fr)",gap:"2px",cursor:"grab"}),e};var r=i(n(36)),a=n(1150);function s(){var e=document.createElement("style");e.type="text/css",e.innerText="@keyframes spin {\n        0% { transform: rotate(0deg); }\n        100% { transform: rotate(360deg); }\n    }",document.head.appendChild(e)}t.TEST_START="or_uxt_test_start",t.TASK_IND="or_uxt_task_index",t.SESSION_ID="or_uxt_session_id",t.TEST_ID="or_uxt_test_id"},1152:function(e,t,n){var i=n(1);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){function n(t){function n(n){var i=d(n,t);null!=i&&e.send(i)}e.attachEventListener(t,"unhandledrejection",n),e.attachEventListener(t,"error",n)}(0,r.default)({captureExceptions:!0},t).captureExceptions&&(e.observer.attachContextCallback(n),n(window))},t.getExceptionMessage=l,t.getExceptionMessageFromEvent=d;var r=i(n(36)),a=i(n(10)),s=n(71),o=i(n(2515));function u(e){return[{columnNumber:e.colno,lineNumber:e.lineno,fileName:e.filename,functionName:"",source:""}]}function l(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=t;try{i=o.default.parse(e)}catch(e){}return(0,s.JSException)(e.name,e.message,JSON.stringify(i),JSON.stringify(n))}function d(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(e instanceof ErrorEvent){if(e.error instanceof Error)return l(e.error,u(e),n);var i=e.message.split(":"),r=(0,a.default)(i,2),o=r[0],d=r[1];return d||(o="Error",d=e.message),(0,s.JSException)(o,d,JSON.stringify(u(e)),JSON.stringify(n))}if("PromiseRejectionEvent"in t&&e instanceof t.PromiseRejectionEvent){if(e.reason instanceof Error)return l(e.reason,[],n);var c;try{c=JSON.stringify(e.reason)}catch(t){c=String(e.reason)}return(0,s.JSException)("Unhandled Promise Rejection",c,"[]",JSON.stringify(n))}return null}},1153:function(e,t,n){var i=n(1);Object.defineProperty(t,"__esModule",{value:!0}),t.InputMode=void 0,t.default=function(e,t){var n=this,i=(0,r.default)({obscureInputNumbers:!0,obscureInputEmails:!0,defaultInputMode:f.Obscured,obscureInputDates:!1},t);function l(t,n){var r=n.value,a=i.defaultInputMode;"password"===n.type||e.sanitizer.isHidden(t)?a=f.Hidden:(e.sanitizer.isObscured(t)||a===f.Plain&&(i.obscureInputNumbers&&"date"!==n.type&&/\d\d\d\d/.test(r)||i.obscureInputDates&&"date"===n.type||i.obscureInputEmails&&("email"===n.type||~r.indexOf("@"))))&&(a=f.Obscured);var s=0;switch(a){case f.Hidden:s=-1,r="";break;case f.Obscured:s=r.length,r=""}return{value:r,mask:s}}function c(t,n){var i=l(t,n),r=i.value,a=i.mask;e.send((0,u.SetInputValue)(t,r,a))}var p=new Map,v=new Map;function g(e,t){p.get(e)!==t.value&&(p.set(e,t.value),c(e,t))}function y(t,n){v.get(t)!==n&&(v.set(t,n),e.send((0,u.SetInputChecked)(t,n)))}e.attachStopCallback(function(){(0,a.default)(this,n),p.clear(),v.clear()}.bind(this)),e.ticker.attach(function(){var t=this;(0,a.default)(this,n),p.forEach(function(n,i){(0,a.default)(this,t);var r=e.nodes.getNode(i);if(!r)return p.delete(i);g(i,r)}.bind(this)),v.forEach(function(n,i){(0,a.default)(this,t);var r=e.nodes.getNode(i);if(!r)return v.delete(i);y(i,r.checked)}.bind(this))}.bind(this),3),e.nodes.attachNodeCallback(e.safe(function(t){var i=this;(0,a.default)(this,n);var r=e.nodes.getID(t);if(void 0!==r){if((0,o.hasTag)(t,"select")&&(c(r,t),e.nodes.attachNodeListener(t,"change",function(){return(0,a.default)(this,i),c(r,t)}.bind(this))),function(e){if((0,o.hasTag)(e,"textarea"))return!0;if(!(0,o.hasTag)(e,"input"))return!1;return d.includes(e.type)}(t)){g(r,t);var f=0,p=0,v=0,m=function(){(0,a.default)(this,i),f=(0,s.now)()}.bind(this),b=function(){(0,a.default)(this,i),0===p&&0!==f&&(p=(0,s.now)()-f)}.bind(this),S=function(){(0,a.default)(this,i),0!==f&&(v=(0,s.now)()-f),function(t,n,i,r){var a=l(t,n),s=a.value,o=a.mask,d=h(n);e.send((0,u.InputChange)(t,s,0!==o,d,i,r))}(r,t,p,v),p=0,v=0,f=0}.bind(this);return e.nodes.attachNodeListener(t,"focus",m),e.nodes.attachNodeListener(t,"input",b),void e.nodes.attachNodeListener(t,"change",S)}return function(e){if(!(0,o.hasTag)(e,"input"))return!1;var t=e.type;return"checkbox"===t||"radio"===t}(t)?(y(r,t.checked),void e.nodes.attachNodeListener(t,"change",function(){return(0,a.default)(this,i),y(r,t.checked)}.bind(this))):void 0}}.bind(this)))},t.getInputLabel=h;var r=i(n(36)),a=i(n(3)),s=n(97),o=n(122),u=n(71),l=this,d=["text","password","email","search","number","range","date","tel","time"];var c=s.IN_BROWSER&&"labels"in HTMLInputElement.prototype?function(e){(0,a.default)(this,l);for(var t=e;null!==(t=t.parentNode);)if((0,o.hasTag)(t,"label"))return t;var n=e.labels;if(null!==n&&1===n.length)return n[0]}.bind(this):function(e){(0,a.default)(this,l);for(var t=e;null!==(t=t.parentNode);)if((0,o.hasTag)(t,"label"))return t;var n=e.id;if(n){var i=e.ownerDocument.querySelectorAll('label[for="'+n+'"]');if(null!==i&&1===i.length)return i[0]}}.bind(this);function h(e){var t=(0,s.getLabelAttribute)(e);if(null===t){var n=c(e);t=n&&n.innerText||e.placeholder||e.name||e.id||e.className||e.type}return(0,s.normSpaces)(t).slice(0,100)}var f=t.InputMode={Plain:0,Obscured:1,Hidden:2}},1154:function(e,t,n){var i=n(1);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=this;if(null===e)return;if(!h(document))return;var n=new Map,i=new Map,r=function(r){var o=this;return(0,a.default)(this,t),setTimeout(function(){(0,a.default)(this,o);var t=e.nodes.getID(r);if(r===document&&(t=0),void 0!==t){var u=i.get(t);u||(u=[]);var l=[],c=r.adoptedStyleSheets;if(c&&Symbol.iterator in c){var h,f=d(c);try{for(f.s();!(h=f.n()).done;){var v=h.value,g=n.get(v),y=!g;if(g||(g=p(),n.set(v,g)),u.includes(g)||e.send((0,s.AdoptedSSAddOwner)(g,t)),y)for(var m=v.cssRules,b=0;b<m.length;b++)e.send((0,s.AdoptedSSInsertRuleURLBased)(g,m[b].cssText,b,e.getBaseHref()));l.push(g)}}catch(e){f.e(e)}finally{f.f()}}if(Symbol.iterator in u){var S,k=d(u);try{for(k.s();!(S=k.n()).done;){var w=S.value;l.includes(w)||e.send((0,s.AdoptedSSRemoveOwner)(w,t))}}catch(e){k.e(e)}finally{k.f()}}i.set(t,l)}}.bind(this),20)}.bind(this);function o(e){var t=Object.getOwnPropertyDescriptor(e,"adoptedStyleSheets");t&&Object.defineProperty(e,"adoptedStyleSheets",l(l({},t),{},{set:function(e){var n=t.set.call(this,e);return r(this),n}}))}var u=function(i){if((0,a.default)(this,t),!i.__openreplay_adpss_patched__){i.__openreplay_adpss_patched__=!0,o(i.Document.prototype),o(i.ShadowRoot.prototype);var r=i.CSSStyleSheet.prototype,u=r.replace,l=r.replaceSync;i.CSSStyleSheet.prototype.replace=function(t){var i=this;return u.call(this,t).then(function(r){(0,a.default)(this,i);var o=n.get(this);return o&&e.send((0,s.AdoptedSSReplaceURLBased)(o,t,e.getBaseHref())),r}.bind(this))},i.CSSStyleSheet.prototype.replaceSync=function(t){var i=n.get(this);return i&&e.send((0,s.AdoptedSSReplaceURLBased)(i,t,e.getBaseHref())),l.call(this,t)}}}.bind(this);u(window),e.observer.attachContextCallback(e.safe(u)),e.attachStopCallback(function(){(0,a.default)(this,t),n.clear(),i.clear()}.bind(this)),e.attachStartCallback(function(){(0,a.default)(this,t),r(document)}.bind(this)),e.nodes.attachNodeCallback(function(e){(0,a.default)(this,t),h(e)&&r(e)}.bind(this))},t.nextID=p,t.styleSheetIDMap=void 0;var r=i(n(8)),a=i(n(3)),s=n(71),o=n(122);function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){(0,r.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function d(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return c(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,r=function(){};return{s:r,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,o=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){o=!0,a=e},f:function(){try{s||null==n.return||n.return()}finally{if(o)throw a}}}}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}function h(e){return(0,o.isRootNode)(e)&&!!e.adoptedStyleSheets}var f=15;function p(){return f++}t.styleSheetIDMap=new Map},2494:function(e,t,n){var i=n(1),r=n(2);Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"App",{enumerable:!0,get:function(){return u.default}}),t.Messages=void 0,Object.defineProperty(t,"SanitizeLevel",{enumerable:!0,get:function(){return c.SanitizeLevel}}),t.default=void 0;var a=i(n(3)),s=i(n(29)),o=i(n(28)),u=D(n(2495)),l=D(n(71)),d=l,c=n(1147),h=i(n(2513)),f=i(n(2514)),p=D(n(1152)),v=i(n(2517)),g=i(n(1153)),y=i(n(2518)),m=i(n(2520)),b=i(n(1149)),S=i(n(2521)),k=i(n(2522)),w=i(n(2523)),T=i(n(2524)),O=i(n(2525)),E=i(n(2526)),_=i(n(1154)),x=i(n(2532)),I=i(n(2533)),R=n(97);function j(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(j=function(e){return e?n:t})(e)}function D(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=r(e)&&"function"!=typeof e)return{default:e};var n=j(t);if(n&&n.has(e))return n.get(e);var i={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if("default"!==s&&{}.hasOwnProperty.call(e,s)){var o=a?Object.getOwnPropertyDescriptor(e,s):null;o&&(o.get||o.set)?Object.defineProperty(i,s,o):i[s]=e[s]}return i.default=e,n&&n.set(e,i),i}function M(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return C(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?C(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,r=function(){};return{s:r,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,o=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){o=!0,a=e},f:function(){try{s||null==n.return||n.return()}finally{if(o)throw a}}}}function C(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}t.Messages=d;var A="/installation/javascript-sdk";t.default=(0,o.default)((function e(t){var n=this;if((0,s.default)(this,e),this.options=t,this.app=null,this.checkDoNotTrack=function(){return(0,a.default)(this,n),this.options.respectDoNotTrack&&("1"==navigator.doNotTrack||"1"==window.doNotTrack)}.bind(this),this.signalStartIssue=function(e,t){(0,a.default)(this,n);var i=this.checkDoNotTrack(),r=new XMLHttpRequest,s=this.options.ingestPoint||u.DEFAULT_INGEST_POINT;r.open("POST",s+"/v1/web/not-started"),r.send(JSON.stringify({trackerVersion:"13.0.2",projectKey:this.options.projectKey,doNotTrack:i,reason:t.length?"missing api: ".concat(t.join(",")):e}))}.bind(this),this.restartCanvasTracking=function(){(0,a.default)(this,n),null!==this.app&&this.app.restartCanvasTracking()}.bind(this),this.handleError=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(null!==n.app)if(e instanceof Error){var i=(0,p.getExceptionMessage)(e,[],t);n.app.send(i)}else if(e instanceof ErrorEvent||"PromiseRejectionEvent"in window&&e instanceof PromiseRejectionEvent){var r=(0,p.getExceptionMessageFromEvent)(e,void 0,t);null!=r&&n.app.send(r)}},R.IN_BROWSER&&function(e){if(null==e)return console.error("OpenReplay: invalid options argument type. Please, check documentation on ".concat(R.DOCS_HOST).concat(A)),!1;if("string"!=typeof e.projectKey)if("number"!=typeof e.projectKey){if("number"!=typeof e.projectID)return console.error("OpenReplay: projectKey is missing or wrong type (string is expected). Please, check ".concat(R.DOCS_HOST).concat(A," for more information.")),!1;e.projectKey=e.projectID.toString(),(0,R.deprecationWarn)("`projectID` option","`projectKey` option",A)}else console.warn("OpenReplay: projectKey is expected to have a string type."),e.projectKey=e.projectKey.toString();return null!=e.sessionToken&&(0,R.deprecationWarn)("`sessionToken` option","`sessionHash` start() option","/"),!0}(t))if(window.__OPENREPLAY__)console.error("OpenReplay: one tracker instance has been initialised already");else if(t.__DISABLE_SECURE_MODE||"https:"===location.protocol){var i=[];if(this.checkDoNotTrack())i.push("doNotTrack");else{var r,o=M(["Map","Set","MutationObserver","performance","timing","startsWith","Blob","Worker"]);try{for(o.s();!(r=o.n()).done;){var l=r.value;if("timing"===l){if("performance"in window&&!(l in performance)){i.push(l);break}}else if("startsWith"===l){if(!(l in String.prototype)){i.push(l);break}}else if(!(l in window)){i.push(l);break}}}catch(e){o.e(e)}finally{o.f()}}if(i.length>0){var d=i.join(",");return console.error("OpenReplay: browser doesn't support API required for tracking or doNotTrack is set to 1. Reason: ".concat(d)),void this.signalStartIssue("missing_api",i)}var c=new u.default(t.projectKey,t.sessionToken,t,this.signalStartIssue);this.app=c,(0,k.default)(c),(0,w.default)(c),(0,_.default)(c),(0,h.default)(c),(0,f.default)(c,t),(0,p.default)(c,t),(0,v.default)(c),(0,g.default)(c,t),(0,y.default)(c,t.mouse),(0,m.default)(c,t),(0,b.default)(c,t),(0,S.default)(c),(0,T.default)(c),(0,O.default)(c),(0,E.default)(c,t.network),(0,x.default)(c),(0,I.default)(c),window.__OPENREPLAY__=this,t.flags&&t.flags.onFlagsLoad&&this.onFlagsLoad(t.flags.onFlagsLoad);var j=window.open;(t.autoResetOnWindowOpen||t.resetTabOnWindowOpen)&&(c.attachStartCallback(function(){var e;(0,a.default)(this,n);var i=c.getTabId(),r=null!==(e=c.sessionStorage)&&void 0!==e?e:window.sessionStorage;window.open=function(){t.autoResetOnWindowOpen&&c.resetNextPageSession(!0),t.resetTabOnWindowOpen&&r.removeItem(t.session_tabid_key||"__openreplay_tabid"),c.resetNextPageSession(!1),r.setItem(t.session_tabid_key||"__openreplay_tabid",i);for(var e=arguments.length,n=new Array(e),a=0;a<e;a++)n[a]=arguments[a];return j.call.apply(j,[window].concat(n))}}.bind(this)),c.attachStopCallback(function(){(0,a.default)(this,n),window.open=j}.bind(this)))}else console.error("OpenReplay: Your website must be publicly accessible and running on SSL in order for OpenReplay to properly capture and replay the user session. You can disable this check by setting `__DISABLE_SECURE_MODE` option to `true` if you are testing in localhost. Keep in mind, that asset files on a local machine are not available to the outside world. This might affect tracking if you use css files.")}),[{key:"isFlagEnabled",value:function(e){return this.featureFlags.isFlagEnabled(e)}},{key:"onFlagsLoad",value:function(e){var t;null===(t=this.app)||void 0===t||t.featureFlags.onFlagsLoad(e)}},{key:"clearPersistFlags",value:function(){var e;null===(e=this.app)||void 0===e||e.featureFlags.clearPersistFlags()}},{key:"reloadFlags",value:function(){var e;return null===(e=this.app)||void 0===e?void 0:e.featureFlags.reloadFlags()}},{key:"getFeatureFlag",value:function(e){var t;return null===(t=this.app)||void 0===t?void 0:t.featureFlags.getFeatureFlag(e)}},{key:"getAllFeatureFlags",value:function(){var e;return null===(e=this.app)||void 0===e?void 0:e.featureFlags.flags}},{key:"use",value:function(e){return e(this.app,this.options)}},{key:"isActive",value:function(){return null!==this.app&&this.app.active()}},{key:"trackWs",value:function(e){if(null!==this.app)return this.app.trackWs(e)}},{key:"start",value:function(e){return this.browserEnvCheck()?null===this.app?Promise.reject("Browser doesn't support required api, or doNotTrack is active."):this.app.start(e):Promise.reject("Trying to start not in browser.")}},{key:"browserEnvCheck",value:function(){return!!R.IN_BROWSER||(console.error("OpenReplay: you are trying to start Tracker on a node.js environment. If you want to use OpenReplay with SSR, please, use componentDidMount or useEffect API for placing the `tracker.start()` line. Check documentation on ".concat(R.DOCS_HOST).concat(A)),!1)}},{key:"coldStart",value:function(e,t){return this.browserEnvCheck()?null===this.app?Promise.reject("Tracker not initialized"):void this.app.coldStart(e,t):Promise.reject("Trying to start not in browser.")}},{key:"startOfflineRecording",value:function(e,t){return this.browserEnvCheck()?null===this.app?Promise.reject("Tracker not initialized"):this.app.offlineRecording(e,t):Promise.reject("Trying to start not in browser.")}},{key:"uploadOfflineRecording",value:function(){if(null!==this.app)return this.app.uploadOfflineRecording()}},{key:"stop",value:function(){if(null!==this.app)return this.app.stop(),this.app.session.getSessionHash()}},{key:"forceFlushBatch",value:function(){null!==this.app&&this.app.forceFlushBatch()}},{key:"getSessionToken",value:function(){return null===this.app?null:this.app.getSessionToken()}},{key:"getSessionInfo",value:function(){return null===this.app?null:this.app.session.getInfo()}},{key:"getSessionID",value:function(){return null===this.app?null:this.app.getSessionID()}},{key:"getTabId",value:function(){return null===this.app?null:this.app.getTabId()}},{key:"getUxId",value:function(){return null===this.app?null:this.app.getUxtId()}},{key:"sessionID",value:function(){return(0,R.deprecationWarn)("'sessionID' method","'getSessionID' method","/"),this.getSessionID()}},{key:"getSessionURL",value:function(e){if(null!==this.app)return this.app.getSessionURL(e)}},{key:"setUserID",value:function(e){"string"==typeof e&&null!==this.app&&this.app.session.setUserID(e)}},{key:"userID",value:function(e){(0,R.deprecationWarn)("'userID' method","'setUserID' method","/"),this.setUserID(e)}},{key:"setUserAnonymousID",value:function(e){"string"==typeof e&&null!==this.app&&this.app.send((0,l.UserAnonymousID)(e))}},{key:"userAnonymousID",value:function(e){(0,R.deprecationWarn)("'userAnonymousID' method","'setUserAnonymousID' method","/"),this.setUserAnonymousID(e)}},{key:"setMetadata",value:function(e,t){"string"==typeof e&&"string"==typeof t&&null!==this.app&&this.app.session.setMetadata(e,t)}},{key:"metadata",value:function(e,t){(0,R.deprecationWarn)("'metadata' method","'setMetadata' method","/"),this.setMetadata(e,t)}},{key:"event",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if("string"==typeof e&&null!==this.app){if(n)return this.issue(e,t);try{t=JSON.stringify(t)}catch(e){return}this.app.send((0,l.CustomEvent)(e,t))}}},{key:"issue",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if("string"==typeof e&&null!==this.app){try{t=JSON.stringify(t)}catch(e){return}this.app.send((0,l.CustomIssue)(e,t))}}}])},2496:function(e,t,n){var i=n(1);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=i(n(34)),a=i(n(8)),s=i(n(35)),o=i(n(3)),u=i(n(29)),l=i(n(28)),d=this;function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function h(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(Object(n),!0).forEach((function(t){(0,a.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t.default=(0,l.default)((function e(t,n){var i=this;(0,u.default)(this,e),this.app=t,this.startParams=n,this.conditions=[],this.hasStarted=!1,this.createConditionFromFilter=function(e){if((0,o.default)(this,i),e.value.length){var t=v(e);if(t.type)return t}}.bind(this),this.durationInt=null}),[{key:"setConditions",value:function(e){this.conditions=e}},{key:"fetchConditions",value:(f=(0,s.default)(r.default.mark((function e(t,n){var i,a,s,u,l=this;return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,fetch("".concat(this.app.options.ingestPoint,"/v1/web/conditions/").concat(t),{method:"GET",headers:{Authorization:"Bearer ".concat(n)}});case 3:return i=e.sent,e.next=6,i.json();case 6:a=e.sent,s=a.conditions,u=[],s.forEach(function(e){var t=this;(0,o.default)(this,l),e.filters.forEach(function(n){var i,r=this;(0,o.default)(this,t),"fetch"===n.type?(i={type:"network_request",subConditions:[],name:e.name},n.filters.forEach(function(e){(0,o.default)(this,r);var t=this.createConditionFromFilter(e);t&&i.subConditions.push(t)}.bind(this))):i=this.createConditionFromFilter(n),i&&("session_duration"===i.type&&this.processDuration(i.value[0],e.name),u.push(h(h({},i),{},{name:e.name})))}.bind(this))}.bind(this)),this.conditions=u,e.next=16;break;case 13:e.prev=13,e.t0=e.catch(0),this.app.debug.error("Critical: cannot fetch start conditions");case 16:case"end":return e.stop()}}),e,this,[[0,13]])}))),function(e,t){return f.apply(this,arguments)})},{key:"trigger",value:function(e){if(!this.hasStarted)try{this.hasStarted=!0,this.app.start(this.startParams,void 0,e)}catch(e){this.app.debug.error(e)}}},{key:"processMessage",value:function(e){if(!this.hasStarted)switch(e[0]){case 78:this.jsExceptionEvent(e);break;case 27:this.customEvent(e);break;case 69:this.clickEvent(e);break;case 4:this.pageLocationEvent(e);break;case 83:this.networkRequest(e)}}},{key:"processFlags",value:function(e){var t=this,n=this.conditions.filter(function(e){return(0,o.default)(this,t),"feature_flag"===e.type}.bind(this));n.length&&n.forEach(function(n){var i=this;(0,o.default)(this,t);var r=p[n.operator];r&&e.find(function(e){return(0,o.default)(this,i),r(e.key,n.value)}.bind(this))&&this.trigger(n.name)}.bind(this))}},{key:"processDuration",value:function(e,t){var n=this;this.durationInt=setInterval(function(){(0,o.default)(this,n),performance.now()>e&&this.trigger(t)}.bind(this),1e3),this.app.attachStopCallback(function(){(0,o.default)(this,n),this.durationInt&&clearInterval(this.durationInt)}.bind(this))}},{key:"networkRequest",value:function(e){var t=this,n=this.conditions.filter(function(e){return(0,o.default)(this,t),"network_request"===e.type}.bind(this));n.length&&n.forEach(function(n){var i=this;(0,o.default)(this,t);var r=n.subConditions.filter(function(e){return(0,o.default)(this,i),"isAny"!==e.operator}.bind(this));r.length?r.every(function(t){var n;switch((0,o.default)(this,i),t.key){case"url":n=e[3];break;case"status":n=e[6];break;case"method":n=e[2];break;case"duration":n=e[8]}var r=p[t.operator];if(r&&r(n,t.value))return!0}.bind(this))&&this.trigger(n.name):0===r.length&&n.subConditions.length&&this.trigger(n.name)}.bind(this))}},{key:"customEvent",value:function(e){var t=this,n=this.conditions.filter(function(e){return(0,o.default)(this,t),"custom_event"===e.type}.bind(this));n.length&&n.forEach(function(n){(0,o.default)(this,t);var i=p[n.operator];i&&(i(e[1],n.value)||i(e[2],n.value))&&this.trigger(n.name)}.bind(this))}},{key:"clickEvent",value:function(e){var t=this,n=this.conditions.filter(function(e){return(0,o.default)(this,t),"click"===e.type}.bind(this));n.length&&n.forEach(function(n){(0,o.default)(this,t);var i=p[n.operator];i&&(i(e[3],n.value)||i(e[4],n.value))&&this.trigger(n.name)}.bind(this))}},{key:"pageLocationEvent",value:function(e){var t=this,n=this.conditions.filter(function(e){return(0,o.default)(this,t),"visited_url"===e.type}.bind(this));n&&n.forEach(function(n){(0,o.default)(this,t);var i=p[n.operator];i&&i(e[1],n.value)&&this.trigger(n.name)}.bind(this))}},{key:"jsExceptionEvent",value:function(e){var t=this,n=[e[1],e[2],e[3]],i=this.conditions.filter(function(e){return(0,o.default)(this,t),"exception"===e.type}.bind(this));i&&i.forEach(function(e){var i=this;(0,o.default)(this,t);var r=p[e.operator];r&&n.some(function(t){return(0,o.default)(this,i),r(t,e.value)}.bind(this))&&this.trigger(e.name)}.bind(this))}}]);var f,p={is:function(e,t){var n=this;return(0,o.default)(this,d),t.some(function(t){return(0,o.default)(this,n),e.includes(t)}.bind(this))}.bind(this),isAny:function(){return(0,o.default)(this,d),!0}.bind(this),isNot:function(e,t){var n=this;return(0,o.default)(this,d),!t.some(function(t){return(0,o.default)(this,n),e.includes(t)}.bind(this))}.bind(this),contains:function(e,t){var n=this;return(0,o.default)(this,d),t.some(function(t){return(0,o.default)(this,n),e.includes(t)}.bind(this))}.bind(this),notContains:function(e,t){var n=this;return(0,o.default)(this,d),!t.some(function(t){return(0,o.default)(this,n),e.includes(t)}.bind(this))}.bind(this),startsWith:function(e,t){var n=this;return(0,o.default)(this,d),t.some(function(t){return(0,o.default)(this,n),e.startsWith(t)}.bind(this))}.bind(this),endsWith:function(e,t){var n=this;return(0,o.default)(this,d),t.some(function(t){return(0,o.default)(this,n),e.endsWith(t)}.bind(this))}.bind(this),greaterThan:function(e,t){return(0,o.default)(this,d),e>t}.bind(this),greaterOrEqual:function(e,t){return(0,o.default)(this,d),e>=t}.bind(this),lessOrEqual:function(e,t){return(0,o.default)(this,d),e<=t}.bind(this),lessThan:function(e,t){return(0,o.default)(this,d),e<t}.bind(this)},v=function(e){var t=this;(0,o.default)(this,d);var n={on:"is",notOn:"isNot",">":"greaterThan","<":"lessThan","=":"is","<=":"lessOrEqual",">=":"greaterOrEqual"},i=function(e){if((0,o.default)(this,t),Object.keys(n).includes(e))return n[e]}.bind(this),r={type:"",operator:"",value:e.value,key:""};switch(e.type){case"click":r={type:"click",operator:i(e.operator),value:e.value,key:""};break;case"location":r={type:"visited_url",operator:e.operator,value:e.value,key:""};break;case"custom":r={type:"custom_event",operator:e.operator,value:e.value,key:""};break;case"metadata":r={type:"featureFlag"===e.source?"feature_flag":e.type,operator:e.operator,value:e.value,key:""};break;case"error":r={type:"exception",operator:e.operator,value:e.value,key:""};break;case"duration":r={type:"session_duration",value:e.value[0],key:""};break;case"fetchUrl":r={type:"network_request",key:"url",operator:e.operator,value:e.value};break;case"fetchStatusCode":r={type:"network_request",key:"status",operator:i(e.operator),value:e.value};break;case"fetchMethod":r={type:"network_request",key:"method",operator:i(e.operator),value:e.value};break;case"fetchDuration":r={type:"network_request",key:"duration",operator:i(e.operator),value:e.value}}return r}.bind(this)},2497:function(e,t,n){var i=n(1);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,a=i(n(34)),s=i(n(35)),o=i(n(3)),u=i(n(29)),l=i(n(28));t.default=(0,l.default)((function e(t){var n=this;(0,u.default)(this,e),this.app=t,this.flags=[],this.storageKey="__openreplay_flags";var i=this.app.sessionStorage.getItem(this.storageKey);if(i){var r=i.split(";").filter(Boolean);this.flags=r.map(function(e){return(0,o.default)(this,n),JSON.parse(e)}.bind(this))}}),[{key:"getFeatureFlag",value:function(e){var t=this;return this.flags.find(function(n){return(0,o.default)(this,t),n.key===e}.bind(this))}},{key:"isFlagEnabled",value:function(e){var t=this;return-1!==this.flags.findIndex(function(n){return(0,o.default)(this,t),n.key===e}.bind(this))}},{key:"onFlagsLoad",value:function(e){this.onFlagsCb=e}},{key:"reloadFlags",value:(r=(0,s.default)(a.default.mark((function e(t){var n,i,r,s,u,l,d,c,h=this;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=this.app.sessionStorage.getItem(this.storageKey),i={},n&&n.split(";").filter(Boolean).forEach(function(e){(0,o.default)(this,h);var t=JSON.parse(e);i[t.key]={key:t.key,value:t.value}}.bind(this)),r=this.app.session.getInfo(),s=this.app.session.userInfo,u={projectID:r.projectID,userID:r.userID,metadata:r.metadata,referrer:document.referrer,os:s.userOS,device:s.userDevice,country:s.userCountry,state:s.userState,city:s.userCity,browser:s.userBrowser,persistFlags:i},l=null!=t?t:this.app.session.getSessionToken(),e.next=9,fetch(this.app.options.ingestPoint+"/v1/web/feature-flags",{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(l)},body:JSON.stringify(u)});case 9:if(200!==(d=e.sent).status){e.next=15;break}return e.next=13,d.json();case 13:return c=e.sent,e.abrupt("return",this.handleFlags(c.flags));case 15:case"end":return e.stop()}}),e,this)}))),function(e){return r.apply(this,arguments)})},{key:"handleFlags",value:function(e){var t,n=this,i=[];e.forEach(function(e){(0,o.default)(this,n),e.is_persist&&i.push(e)}.bind(this));var r="";return this.diffPersist(i).forEach(function(e){(0,o.default)(this,n),r+="".concat(JSON.stringify(e),";")}.bind(this)),this.app.sessionStorage.setItem(this.storageKey,r),this.flags=e,null===(t=this.onFlagsCb)||void 0===t?void 0:t.call(this,e)}},{key:"clearPersistFlags",value:function(){this.app.sessionStorage.removeItem(this.storageKey)}},{key:"diffPersist",value:function(e){var t=this,n=this.app.sessionStorage.getItem(this.storageKey);if(!n)return e;var i=n.split(";").filter(Boolean).map(function(e){return(0,o.default)(this,t),JSON.parse(e)}.bind(this));return e.filter(function(e){var n=this;return(0,o.default)(this,t),-1===i.findIndex(function(t){return(0,o.default)(this,n),t.key===e.key}.bind(this))}.bind(this))}}])},2506:function(e,t,n){var i=n(1);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.StringDictionary=void 0;var r=i(n(10)),a=i(n(29)),s=i(n(28)),o=t.StringDictionary=(0,s.default)((function e(){(0,a.default)(this,e),this.idx=1,this.backDict={}}),[{key:"getKey",value:function(e){var t=!1;return this.backDict[e]||(t=!0,this.backDict[e]=this.idx++),[this.backDict[e],t]}}]);t.default=(0,s.default)((function e(t,n){(0,a.default)(this,e),this.app=t,this.isDictDisabled=n,this.dict=new o}),[{key:"sendSetAttribute",value:function(e,t,n){if(this.isDictDisabled){var i=[12,e,t,n];return this.app.send(i)}var r=[51,e,this.applyDict(t),this.applyDict(n)];return this.app.send(r)}},{key:"applyDict",value:function(e){var t=this.dict.getKey(e),n=(0,r.default)(t,2),i=n[0];return n[1]&&this.app.send([50,i,e]),i}},{key:"clear",value:function(){this.dict=new o}}])},2508:function(e,t,n){var i=n(1),r=n(2);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=i(n(36)),s=i(n(3)),o=i(n(29)),u=i(n(28)),l=v(n(1150)),d=v(n(2509)),c=i(n(2510)),h=n(1151),f=i(n(2511));function p(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(p=function(e){return e?n:t})(e)}function v(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=r(e)&&"function"!=typeof e)return{default:e};var n=p(t);if(n&&n.has(e))return n.get(e);var i={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if("default"!==s&&{}.hasOwnProperty.call(e,s)){var o=a?Object.getOwnPropertyDescriptor(e,s):null;o&&(o.get||o.set)?Object.defineProperty(i,s,o):i[s]=e[s]}return i.default=e,n&&n.set(e,i),i}t.default=(0,u.default)((function e(t,n){var i=this;(0,o.default)(this,e),this.app=t,this.storageKey=n,this.bg=(0,h.createElement)("div","bg",l.bgStyle,void 0,"__or_ut_bg"),this.container=(0,h.createElement)("div","container",l.containerStyle,void 0,"__or_ut_ct"),this.widgetGuidelinesVisible=!0,this.widgetTasksVisible=!1,this.widgetVisible=!0,this.isActive=!1,this.descriptionSection=null,this.taskSection=null,this.endSection=null,this.stopButton=null,this.stopButtonContainer=null,this.test=null,this.testId=null,this.signalManager=null,this.getTest=function(e,t,n){var r=this;(0,s.default)(this,i),this.testId=e;var a=this.app.options.ingestPoint;return fetch("".concat(a,"/v1/web/uxt/test/").concat(e),{headers:{Authorization:"Bearer ".concat(t)}}).then(function(e){return(0,s.default)(this,r),e.json()}.bind(this)).then(function(i){var a=this;(0,s.default)(this,r);var o=i.test;this.isActive=!0,this.test=o,this.signalManager=new f.default(this.app.options.ingestPoint,function(){return(0,s.default)(this,a),this.app.timestamp()}.bind(this),t,e,this.storageKey,function(e,t){return(0,s.default)(this,a),this.app.localStorage.setItem(e,t)}.bind(this),function(e){return(0,s.default)(this,a),this.app.localStorage.removeItem(e)}.bind(this),function(e){return(0,s.default)(this,a),this.app.localStorage.getItem(e)}.bind(this),function(){return(0,s.default)(this,a),this.app.getSessionID()}.bind(this)),this.createGreeting(o.title,o.reqMic,o.reqCamera),n&&((o.reqMic||o.reqCamera)&&this.userRecorder.startRecording(30,d.Quality.Standard,o.reqMic,o.reqCamera),this.showWidget(o.description,o.tasks,!0),this.showTaskSection())}.bind(this)).then(function(){return(0,s.default)(this,r),e}.bind(this)).catch(function(e){(0,s.default)(this,r),console.log("OR: Error fetching test",e)}.bind(this))}.bind(this),this.hideTaskSection=function(){return(0,s.default)(this,i),!1}.bind(this),this.showTaskSection=function(){return(0,s.default)(this,i),!0}.bind(this),this.collapseWidget=function(){return(0,s.default)(this,i),!1}.bind(this),this.removeGreeting=function(){return(0,s.default)(this,i),!1}.bind(this),this.toggleDescriptionVisibility=function(){(0,s.default)(this,i)}.bind(this),this.currentTaskIndex=0,this.userRecorder=new d.default(t),this.app.getSessionID()!==this.app.localStorage.getItem(h.SESSION_ID)&&(this.app.localStorage.removeItem(this.storageKey),this.app.localStorage.removeItem(h.SESSION_ID),this.app.localStorage.removeItem(h.TEST_ID),this.app.localStorage.removeItem(h.TASK_IND),this.app.localStorage.removeItem(h.TEST_START));var r=this.app.localStorage.getItem(h.TASK_IND);r&&(this.currentTaskIndex=parseInt(r,10))}),[{key:"getTestId",value:function(){return this.testId}},{key:"createGreeting",value:function(e,t,n){var i=this,r=(0,h.createElement)("div","title",l.titleStyle,e),o=(0,h.createElement)("div","description",l.descriptionStyle,"Welcome, you're here to help us improve, not to be judged. Your insights matter!\n\n📹 We're recording this browser tab to learn from your experience.\n🎤 Please enable mic and camera if asked, to give us a complete picture."),u=(0,h.createElement)("div","button",l.buttonStyle,"Read guidelines to begin");this.removeGreeting=function(){return(0,s.default)(this,i),(t||n)&&this.userRecorder.startRecording(30,d.Quality.Standard,t,n),this.container.removeChild(u),this.container.removeChild(o),this.container.removeChild(r),!1}.bind(this),u.onclick=function(){var e,t,n,r;(0,s.default)(this,i),this.removeGreeting();var o=null===(e=this.signalManager)||void 0===e?void 0:e.getDurations();o&&this.signalManager&&(o.testStart=this.app.timestamp(),this.signalManager.setDurations(o)),null===(t=this.signalManager)||void 0===t||t.signalTest("begin"),this.container.style.fontFamily='-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',(0,a.default)(this.container.style,l.containerWidgetStyle),this.showWidget((null===(n=this.test)||void 0===n?void 0:n.guidelines)||"",(null===(r=this.test)||void 0===r?void 0:r.tasks)||[])}.bind(this),this.container.append(r,o,u),this.bg.appendChild(this.container),document.body.appendChild(this.bg)}},{key:"showWidget",value:function(e,t,n){var i=this;this.container.innerHTML="",(0,a.default)(this.bg.style,{position:"fixed",zIndex:99999999999999,right:"8px",left:"unset",width:"fit-content",top:"8px",height:"fit-content",background:"unset",display:"unset",alignItems:"unset",justifyContent:"unset"});var r=this.createTitleSection();this.container.style.fontFamily='-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',(0,a.default)(this.container.style,l.containerWidgetStyle);var o=this.createDescriptionSection(e),u=this.createTasksSection(t),d=(0,h.createElement)("div","stop_bn_or",l.stopWidgetStyle,"Abort Session"),c=(0,h.createElement)("div","stop_ct_or",{fontSize:"13px!important"});c.style.fontSize="13px",c.append(d),this.container.append(r,o,u,c),this.taskSection=u,this.descriptionSection=o,this.stopButton=d,this.stopButtonContainer=c,d.onclick=function(){var e;(0,s.default)(this,i),this.userRecorder.discard(),null===(e=this.signalManager)||void 0===e||e.signalTest("skipped"),document.body.removeChild(this.bg),window.close()}.bind(this),n?this.toggleDescriptionVisibility():this.hideTaskSection()}},{key:"createTitleSection",value:function(){var e,t=this,n=(0,h.createElement)("div","title",l.titleWidgetStyle),i=(0,h.generateGrid)(),r=(0,h.createElement)("div","title_text",{maxWidth:"19rem",overflow:"hidden",textOverflow:"ellipsis",width:"100%",fontSize:16,lineHeight:"auto",cursor:"pointer"},null===(e=this.test)||void 0===e?void 0:e.title),o=(0,h.generateChevron)();n.append(i,r,o);var u=function(e){return(0,s.default)(this,t),this.widgetVisible=e,this.container.style.fontFamily='-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',(0,a.default)(this.container.style,this.widgetVisible?l.containerWidgetStyle:{border:"none",background:"none",padding:0}),this.taskSection&&(0,a.default)(this.taskSection.style,this.widgetVisible?l.descriptionWidgetStyle:{display:"none"}),this.descriptionSection&&(0,a.default)(this.descriptionSection.style,this.widgetVisible?l.descriptionWidgetStyle:{display:"none"}),this.endSection&&(0,a.default)(this.endSection.style,this.widgetVisible?l.descriptionWidgetStyle:{display:"none"}),this.stopButton&&(0,a.default)(this.stopButton.style,this.widgetVisible?l.stopWidgetStyle:{display:"none"}),e}.bind(this),d=function(){(0,s.default)(this,t),(0,a.default)(o.style,{transform:this.widgetVisible?"rotate(0deg)":"rotate(180deg)"}),u(!this.widgetVisible)}.bind(this);return r.onclick=d,o.onclick=d,(0,c.default)(this.bg,i),this.collapseWidget=function(){return(0,s.default)(this,t),u(!1)}.bind(this),n}},{key:"createDescriptionSection",value:function(e){var t=this,n=(0,h.createElement)("div","description_section_or",l.descriptionWidgetStyle),i=(0,h.createElement)("div","description_s_title_or",l.sectionTitleStyle),r=(0,h.createElement)("div","title",{fontSize:13,fontWeight:500,lineHeight:"auto"},"Introduction & Guidelines"),o=(0,h.createElement)("div","icon",l.symbolIcon,"-"),u=(0,h.createElement)("div","content",l.contentStyle),d=(0,h.createElement)("div","text_description",{maxHeight:"250px",overflowY:"auto",whiteSpace:"pre-wrap",fontSize:13,color:"#454545",lineHeight:"auto"});d.innerHTML=e;var c=(0,h.createElement)("div","button_begin_or",l.buttonWidgetStyle,"Begin Test");i.append(r,o),u.append(d,c),n.append(i,u);var f=function(){(0,s.default)(this,t),this.widgetGuidelinesVisible=!this.widgetGuidelinesVisible,o.textContent=this.widgetGuidelinesVisible?"-":"+",(0,a.default)(u.style,this.widgetGuidelinesVisible?l.contentStyle:{display:"none"})}.bind(this);return i.onclick=f,this.toggleDescriptionVisibility=function(){(0,s.default)(this,t),this.widgetGuidelinesVisible=!1,o.textContent=this.widgetGuidelinesVisible?"-":"+",(0,a.default)(u.style,this.widgetGuidelinesVisible?l.contentStyle:{display:"none"}),u.removeChild(c)}.bind(this),c.onclick=function(){var e=this;if((0,s.default)(this,t),f(),this.test){var n,i,r,a=null===(n=this.signalManager)||void 0===n?void 0:n.getDurations(),o=a?a.tasks.findIndex(function(t){return(0,s.default)(this,e),this.test&&t.taskId===this.test.tasks[0].task_id}.bind(this)):null;a&&-1===o&&(a.tasks.push({taskId:this.test.tasks[0].task_id,started:this.app.timestamp()}),null===(r=this.signalManager)||void 0===r||r.setDurations(a)),null===(i=this.signalManager)||void 0===i||i.signalTask(this.test.tasks[0].task_id,"begin")}this.showTaskSection(),u.removeChild(c)}.bind(this),n}},{key:"createTasksSection",value:function(e){var t=this;this.container.style.fontFamily='-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',(0,a.default)(this.container.style,l.containerWidgetStyle);var n=(0,h.createElement)("div","task_section_or",l.descriptionWidgetStyle),i=(0,h.createElement)("div","description_t_title_or",l.sectionTitleStyle),r=(0,h.createElement)("div","title",{fontSize:"13px",fontWeight:"500",lineHeight:"auto"},"Tasks"),o=(0,h.createElement)("div","icon",l.symbolIcon,"-"),u=(0,h.createElement)("div","content",l.contentStyle),d=(0,h.createElement)("div","pagination",l.paginationStyle),c=(0,h.createElement)("div","taskCard",l.taskDescriptionCard),f=(0,h.createElement)("div","taskText",l.taskTextStyle),p=(0,h.createElement)("div","taskDescription",l.taskDescriptionStyle),v=(0,h.createElement)("div","taskButtons",l.taskButtonsRow),g=(0,h.createElement)("div","taskText",l.taskTextStyle);g.textContent="Your answer";var y=(0,h.createElement)("textarea","taskDescription",{resize:"vertical"}),m=(0,h.createElement)("div","inputArea",l.taskDescriptionCard);m.append(g,y);var b=(0,h.createElement)("div","closePanelButton",l.taskButtonStyle,"Collapse Panel"),S=(0,h.createElement)("div","nextButton",l.taskButtonBorderedStyle,"Done, Next");i.append(r,o),c.append(f,p),v.append(b,S),u.append(d,c,m,v),n.append(i,u);var k=function(){(0,s.default)(this,t);var n=e[this.currentTaskIndex];f.textContent=n.title,p.textContent=n.description,n.allow_typing?m.style.display="flex":m.style.display="none"}.bind(this);e.forEach(function(e,n){(0,s.default)(this,t);var i=(0,h.createElement)("span","or_task_".concat(n),{outline:"1px solid #efefef",fontSize:"13px",height:"24px",width:"24px",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",borderRadius:"6.25em"},(n+1).toString());i.id="or_task_".concat(n),d.append(i)}.bind(this));var w=function(){(0,s.default)(this,t),this.widgetTasksVisible=!this.widgetTasksVisible,o.textContent=this.widgetTasksVisible?"-":"+",(0,a.default)(u.style,this.widgetTasksVisible?l.contentStyle:{display:"none"})}.bind(this);this.hideTaskSection=function(){return(0,s.default)(this,t),o.textContent="+",(0,a.default)(u.style,{display:"none"}),this.widgetTasksVisible=!1,!1}.bind(this),this.showTaskSection=function(){return(0,s.default)(this,t),o.textContent="-",(0,a.default)(u.style,l.contentStyle),this.widgetTasksVisible=!0,!0}.bind(this);var T=function(){(0,s.default)(this,t);var e=document.getElementById("or_task_".concat(this.currentTaskIndex));e&&(0,a.default)(e.style,l.taskNumberActive);for(var n=0;n<this.currentTaskIndex;n++){var i=document.getElementById("or_task_".concat(n));i&&(0,a.default)(i.style,l.taskNumberDone)}}.bind(this);return i.onclick=w,b.onclick=this.collapseWidget,S.onclick=function(){var n,i=this;(0,s.default)(this,t);var r=e[this.currentTaskIndex].allow_typing?y.value:void 0;if(y.value="",null===(n=this.signalManager)||void 0===n||n.signalTask(e[this.currentTaskIndex].task_id,"done",r),this.currentTaskIndex<e.length-1){var a,o;this.currentTaskIndex++,k();var u,l=null===(a=this.signalManager)||void 0===a?void 0:a.getDurations();l&&-1===l.tasks.findIndex(function(t){return(0,s.default)(this,i),t.taskId===e[this.currentTaskIndex].task_id}.bind(this))&&(l.tasks.push({taskId:e[this.currentTaskIndex].task_id,started:this.app.timestamp()}),null===(u=this.signalManager)||void 0===u||u.setDurations(l)),null===(o=this.signalManager)||void 0===o||o.signalTask(e[this.currentTaskIndex].task_id,"begin"),T()}else this.showEndSection();this.app.localStorage.setItem("or_uxt_task_index",this.currentTaskIndex.toString())}.bind(this),setTimeout(function(){(0,s.default)(this,t);var e=document.getElementById("or_task_0");e&&(0,a.default)(e.style,l.taskNumberActive),k(),T()}.bind(this),1),n}},{key:"showEndSection",value:function(){var e,t,n,i,r,a=this,o=!0;null===(e=this.signalManager)||void 0===e||e.signalTest("done");var u=(0,h.createElement)("div","end_section_or",l.endSectionStyle),d=(0,h.createElement)("div","end_title_or",{fontSize:"1.25rem",fontWeight:"500"},"Thank you! 👍"),c=(0,h.createElement)("div","end_description_or",{},null!==(t=null===(n=this.test)||void 0===n?void 0:n.conclusion)&&void 0!==t?t:"Thank you for participating in our usability test. Your feedback has been captured and will be used to enhance our website. \n\nWe appreciate your time and valuable input."),f=(0,h.createElement)("div","end_button_or",l.buttonWidgetStyle,"Submitting Feedback"),p=(0,h.createSpinner)();f.appendChild(p),null!==(i=this.test)&&void 0!==i&&i.reqMic||null!==(r=this.test)&&void 0!==r&&r.reqCamera?this.userRecorder.sendToAPI().then(function(){(0,s.default)(this,a),f.removeChild(p),f.textContent="End Session",o=!1}.bind(this)).catch(function(e){(0,s.default)(this,a),console.error(e),f.removeChild(p),f.textContent="End Session",o=!1}.bind(this)):(f.removeChild(p),f.textContent="End Session",o=!1),this.taskSection&&this.container.removeChild(this.taskSection),this.descriptionSection&&this.container.removeChild(this.descriptionSection),this.stopButton&&this.stopButtonContainer&&this.container.removeChild(this.stopButtonContainer),f.onclick=function(){(0,s.default)(this,a),o||(window.close(),document.body.removeChild(this.bg))}.bind(this),u.append(d,c,f),this.endSection=u,this.container.append(u)}}])},2509:function(e,t,n){var i=n(1);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.Quality=void 0;var r=i(n(34)),a=i(n(3)),s=i(n(8)),o=i(n(35)),u=i(n(29)),l=i(n(28));function d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?d(Object(n),!0).forEach((function(t){(0,s.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var h,f,p,v;t.Quality={Standard:{width:1280,height:720},High:{width:1920,height:1080}},t.default=(0,l.default)((function e(t){(0,u.default)(this,e),this.app=t,this.mediaRecorder=null,this.recordedChunks=[],this.stream=null,this.recStartTs=null}),[{key:"startRecording",value:(v=(0,o.default)(r.default.mark((function e(t,n,i,s){var o,u=this;return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.recStartTs=this.app.timestamp(),o=n,e.prev=2,e.next=5,navigator.mediaDevices.getUserMedia({video:!!s&&c(c({},o),{},{frameRate:{ideal:t}}),audio:i});case 5:this.stream=e.sent,this.mediaRecorder=new MediaRecorder(this.stream,{mimeType:"video/webm;codecs=vp9"}),this.recordedChunks=[],this.mediaRecorder.ondataavailable=function(e){(0,a.default)(this,u),e.data.size>0&&this.recordedChunks.push(e.data)}.bind(this),this.mediaRecorder.start(),e.next=15;break;case 12:e.prev=12,e.t0=e.catch(2),console.error(e.t0);case 15:case"end":return e.stop()}}),e,this,[[2,12]])}))),function(e,t,n,i){return v.apply(this,arguments)})},{key:"stopRecording",value:(p=(0,o.default)(r.default.mark((function e(){var t=this;return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(e){var n=this;(0,a.default)(this,t),this.mediaRecorder&&(this.mediaRecorder.onstop=function(){(0,a.default)(this,n);var t=new Blob(this.recordedChunks,{type:"video/webm"});e(t)}.bind(this),this.mediaRecorder.stop())}.bind(this)));case 1:case"end":return e.stop()}}),e,this)}))),function(){return p.apply(this,arguments)})},{key:"sendToAPI",value:(f=(0,o.default)(r.default.mark((function e(){var t,n=this;return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.stopRecording();case 2:return t=e.sent,e.abrupt("return",fetch("".concat(this.app.options.ingestPoint,"/v1/web/uxt/upload-url"),{headers:{Authorization:"Bearer ".concat(this.app.session.getSessionToken())}}).then(function(e){if((0,a.default)(this,n),e.ok)return e.json();throw new Error("Failed to get upload url")}.bind(this)).then(function(e){(0,a.default)(this,n);var i=e.url;return fetch(i,{method:"PUT",headers:{"Content-Type":"video/webm"},body:t})}.bind(this)).catch(console.error).finally(function(){(0,a.default)(this,n),this.discard()}.bind(this)));case 4:case"end":return e.stop()}}),e,this)}))),function(){return f.apply(this,arguments)})},{key:"saveToFile",value:(h=(0,o.default)(r.default.mark((function e(){var t,n,i,a,s=arguments;return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=s.length>0&&void 0!==s[0]?s[0]:"recorded-video.webm",e.next=3,this.stopRecording();case 3:n=e.sent,i=URL.createObjectURL(n),(a=document.createElement("a")).style.display="none",a.href=i,a.download=t,document.body.appendChild(a),a.click(),window.URL.revokeObjectURL(i),document.body.removeChild(a);case 13:case"end":return e.stop()}}),e,this)}))),function(){return h.apply(this,arguments)})},{key:"discard",value:function(){var e,t,n=this;null===(e=this.mediaRecorder)||void 0===e||e.stop(),null===(t=this.stream)||void 0===t||t.getTracks().forEach(function(e){return(0,a.default)(this,n),e.stop()}.bind(this))}}])},2510:function(e,t,n){var i=n(1);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){t.onmousedown=function(t){var n=this,i=e.getBoundingClientRect(),a=t.clientX-i.left,s=t.clientY-i.top;function o(t,n){var r=t-a,o=n-s;r<=5&&(r=5),o<=5&&(o=5),r>=window.innerWidth-i.width&&(r=window.innerWidth-i.width),o>=window.innerHeight-i.height&&(o=window.innerHeight-i.height),e.style.left="".concat(r,"px"),e.style.top="".concat(o,"px")}function u(e){o(e.pageX,e.pageY)}e.style.position="fixed",e.style.zIndex=99999999999999,o(t.pageX,t.pageY),document.addEventListener("mousemove",u);var l=function(){(0,r.default)(this,n),document.removeEventListener("mousemove",u),document.removeEventListener("mouseup",l)}.bind(this);document.addEventListener("mouseup",l)},t.ondragstart=function(){return!1}};var r=i(n(3))},2511:function(e,t,n){var i=n(1);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=i(n(3)),a=i(n(28)),s=i(n(29)),o=n(1151);t.default=(0,a.default)((function e(t,n,i,a,u,l,d,c,h){var f=this;(0,s.default)(this,e),this.ingestPoint=t,this.getTimestamp=n,this.token=i,this.testId=a,this.storageKey=u,this.setStorageKey=l,this.removeStorageKey=d,this.getStorageKey=c,this.getSessionId=h,this.durations={testStart:0,tasks:[]},this.getDurations=function(){return(0,r.default)(this,f),this.durations}.bind(this),this.setDurations=function(e){(0,r.default)(this,f),this.durations.testStart=e.testStart,this.durations.tasks=e.tasks}.bind(this),this.signalTask=function(e,t,n){var i=this;if((0,r.default)(this,f),!e)return console.error("User Testing: No Task ID Given");var a=this.durations.tasks.find(function(t){return(0,r.default)(this,i),t.taskId===e}.bind(this)),s=this.getTimestamp(),o=a?s-a.started:0;return fetch("".concat(this.ingestPoint,"/v1/web/uxt/signals/task"),{method:"POST",headers:{Authorization:"Bearer ".concat(this.token)},body:JSON.stringify({testId:this.testId,taskId:e,status:t,duration:o,timestamp:s,taskAnswer:n})})}.bind(this),this.signalTest=function(e){(0,r.default)(this,f);var t=this.getTimestamp();if("begin"===e&&this.testId){var n=this.getSessionId();this.setStorageKey(o.SESSION_ID,n),this.setStorageKey(this.storageKey,this.testId.toString()),this.setStorageKey(o.TEST_START,t.toString())}else this.removeStorageKey(this.storageKey),this.removeStorageKey(o.TASK_IND),this.removeStorageKey(o.TEST_START);var i=t-(this.durations.testStart||t);return fetch("".concat(this.ingestPoint,"/v1/web/uxt/signals/test"),{method:"POST",headers:{Authorization:"Bearer ".concat(this.token)},body:JSON.stringify({testId:this.testId,status:e,duration:i,timestamp:t})})}.bind(this);var p=this.getStorageKey(o.TEST_START);p&&(this.durations.testStart=parseInt(p,10))}))},2512:function(e,t,n){var i=n(1);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.WATCHED_TAGS_KEY=void 0;var r,a=i(n(34)),s=i(n(35)),o=i(n(3)),u=i(n(29)),l=i(n(28)),d=t.WATCHED_TAGS_KEY="__or__watched_tags__",c=(0,l.default)((function e(t,n,i){var r,a=this;(0,u.default)(this,e),this.sessionStorage=t,this.errLog=n,this.onTag=i,this.intervals={},this.tags=[];var s=JSON.parse(null!==(r=t.getItem(d))&&void 0!==r?r:"[]");this.setTags(s),this.observer=new IntersectionObserver(function(e){var t=this;(0,o.default)(this,a),e.forEach(function(e){if((0,o.default)(this,t),e.isIntersecting&&e.target){var n=e.target.__or_watcher_tagname;n&&this.onTagRendered(n),this.observer.unobserve(e.target)}}.bind(this))}.bind(this))}),[{key:"fetchTags",value:(r=(0,s.default)(a.default.mark((function e(t,n){var i=this;return a.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",fetch("".concat(t,"/v1/web/tags"),{method:"GET",headers:{Authorization:"Bearer ".concat(n)}}).then(function(e){return(0,o.default)(this,i),e.json()}.bind(this)).then(function(e){(0,o.default)(this,i);var t=e.tags;if(t&&t.length){this.setTags(t);var n=JSON.stringify(t);this.sessionStorage.setItem(d,n||"")}}.bind(this)).catch(function(e){return(0,o.default)(this,i),this.errLog(e)}.bind(this)));case 1:case"end":return e.stop()}}),e,this)}))),function(e,t){return r.apply(this,arguments)})},{key:"setTags",value:function(e){var t=this;this.tags=e,this.intervals={},e.forEach(function(e){var n=this;(0,o.default)(this,t),this.intervals[e.id]=setInterval(function(){(0,o.default)(this,n);var t=document.querySelectorAll(e.selector);if(t.length>0){var i=t[0];i.__or_watcher_tagname=e.id,this.observer.observe(i)}}.bind(this),500)}.bind(this))}},{key:"onTagRendered",value:function(e){this.intervals[e]&&clearInterval(this.intervals[e]),this.onTag(e)}},{key:"clear",value:function(){var e=this;this.tags.forEach(function(t){(0,o.default)(this,e),clearInterval(this.intervals[t.id])}.bind(this)),this.tags=[],this.intervals={},this.observer.disconnect()}}]);t.default=c},2513:function(e,t,n){var i=n(1);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=this,n=navigator.connection||navigator.mozConnection||navigator.webkitConnection;if(void 0===n)return;var i=function(){return(0,r.default)(this,t),e.send((0,a.ConnectionInformation)(Math.round(1e3*n.downlink),n.type||"unknown"))}.bind(this);i(),n.addEventListener("change",i)};var r=i(n(3)),a=n(71)},2514:function(e,t,n){var i=n(1);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=this,i=(0,r.default)({consoleMethods:f,consoleThrottling:30},t);if(!Array.isArray(i.consoleMethods)||0===i.consoleMethods.length)return;var a=e.safe(function(t,i){return(0,s.default)(this,n),e.send((0,u.ConsoleLog)(t,function(e){var t=this;"string"==typeof e[0]&&e.unshift(e.shift().replace(/%(o|s|f|d|i)/g,function(n,i){(0,s.default)(this,t);var r=e.shift();if(void 0===r)return n;switch(i){case"o":return h(r);case"s":return c(r);case"f":return function(e){return"number"!=typeof e?"NaN":e.toString()}(r);case"d":case"i":return function(e){return"number"!=typeof e?"NaN":Math.floor(e).toString()}(r);default:return n}}.bind(this)));return e.map(h).join(" ")}(i)))}.bind(this)),o=0,l=function(){(0,s.default)(this,n),o=0}.bind(this);e.attachStartCallback(l),e.ticker.attach(l,33,!1);var d=function(t,r){var u=this;(0,s.default)(this,n);var l={apply:function(e,t,n){Reflect.apply(e,r,n),(o+=1)>i.consoleThrottling||a(e.name,n)}};i.consoleMethods.forEach(function(n){if((0,s.default)(this,u),-1!==f.indexOf(n)){var i=r.console[n];t[n]=new Proxy(i,l)}else e.debug.error('OpenReplay: unsupported console method "'.concat(n,'"'))}.bind(this))}.bind(this),p=e.safe(function(e){return(0,s.default)(this,n),d(e.console,e)}.bind(this));p(window),e.observer.attachContextCallback(p)};var r=i(n(36)),a=i(n(2)),s=i(n(3)),o=n(97),u=n(71),l=this,d=o.IN_BROWSER&&"InstallTrigger"in window?function(e){return(0,s.default)(this,l),e.message+"\n"+e.stack}.bind(this):function(e){return(0,s.default)(this,l),e.stack||e.message}.bind(this);function c(e){return void 0===e?"undefined":null===e?"null":e instanceof Error?d(e):Array.isArray(e)?"Array(".concat(e.length,")"):String(e)}function h(e){if(void 0===e)return"undefined";if(null===e)return"null";if(e instanceof Error)return d(e);if(Array.isArray(e)){var t=e.length,n=e.slice(0,10).map(c).join(", ");return"Array(".concat(t,")[").concat(n,"]")}if("object"===(0,a.default)(e)){var i=[],r=0;for(var s in e){if(10==++r)break;var o=e[s];i.push(s+": "+c(o))}return"{"+i.join(", ")+"}"}return e.toString()}var f=["log","info","warn","error","debug","assert"]},2517:function(e,t,n){var i=n(1);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=this;function n(t,n){e.attributeSender.sendSetAttribute(t,"src","https://static.openreplay.com/tracker/placeholder.jpeg");var i=n.getBoundingClientRect(),r=i.width,a=i.height;n.hasAttribute("width")||e.attributeSender.sendSetAttribute(t,"width",String(r)),n.hasAttribute("height")||e.attributeSender.sendSetAttribute(t,"height",String(a))}var i=function(t,n){var i=this,a=n.srcset;if(a){var s=a.split(a.match(/,\s+/)?/,\s+/:",").map(function(e){return(0,r.default)(this,i),l(e)}.bind(this)).join(", ");e.attributeSender.sendSetAttribute(t,"srcset",s)}},d=function(t,i){i.src.length>a.MAX_STR_LEN&&n(t,i),e.send((0,s.SetNodeAttributeURLBased)(t,"src",i.src,e.getBaseHref()))},c=e.safe((function(t){var n=l(t.src||"");(0,a.isURL)(n)&&e.send((0,s.ResourceTiming)(e.timestamp(),0,0,0,0,0,n,"img",0,!1))})),h=e.safe((function(t){var r,s=e.nodes.getID(t);void 0!==s&&(t.complete&&(0!==t.naturalHeight||0!==t.naturalWidth||(r=t.src,a.IS_FIREFOX&&(r.startsWith("data:image/svg+xml")||r.match(/.svg$|/i)))?e.sanitizer.isHidden(s)||e.sanitizer.isObscured(s)?n(s,t):(d(s,t),i(s,t)):c(t)))})),f=(0,a.createMutationObserver)(e.safe(function(n){(0,r.default)(this,t);var a,s=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return u(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?u(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,r=function(){};return{s:r,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,o=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){o=!0,a=e},f:function(){try{s||null==n.return||n.return()}finally{if(o)throw a}}}}(n);try{for(s.s();!(a=s.n()).done;){var o=a.value;if("attributes"===o.type){var l=o.target,c=e.nodes.getID(l);if(void 0===c)return;"src"===o.attributeName&&d(c,l),"srcset"===o.attributeName&&i(c,l)}}}catch(e){s.e(e)}finally{s.f()}}.bind(this)));e.attachStopCallback(function(){(0,r.default)(this,t),f.disconnect()}.bind(this)),e.nodes.attachNodeCallback(function(n){var i=this;(0,r.default)(this,t),(0,o.hasTag)(n,"img")&&(e.nodes.attachNodeListener(n,"error",function(){return(0,r.default)(this,i),c(n)}.bind(this)),e.nodes.attachNodeListener(n,"load",function(){return(0,r.default)(this,i),h(n)}.bind(this)),h(n),f.observe(n,{attributes:!0,attributeFilter:["src","srcset"]}))}.bind(this))};var r=i(n(3)),a=n(97),s=n(71),o=n(122);function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}function l(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document.location;return(e=e.trim()).startsWith("//")||e.startsWith("http://")||e.startsWith("https://")||e.startsWith("data:")?e:e.startsWith("/")?t.origin+e:t.origin+t.pathname+e}},2518:function(e,t,n){var i=n(1);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=this,i=(t||{}).disableClickmaps,d=void 0!==i&&i;function p(t){var n=(0,o.getLabelAttribute)(t);if(null!==n)return n;if((0,s.hasTag)(t,"input"))return(0,l.getInputLabel)(t);if(h(t)){var i="";return t instanceof HTMLElement&&(i=e.sanitizer.getInnerTextSecure(t)),i=i||t.id||t.className,(0,o.normSpaces)(i).slice(0,100)}return""}var v,g=-1,y=-1,m=!1,b=null,S=0,k={},w=0,T=0,O=0,E=0;e.attachStartCallback(function(){var t=this;(0,a.default)(this,n),v=setInterval(function(){return(0,a.default)(this,t),n=E/225,void(w?(O>4&&(n-w)/225>.008&&e.send((0,u.MouseThrashing)((0,o.now)())),E=0,O=0,w=n):w=n);var n}.bind(this),225)}.bind(this)),e.attachStopCallback(function(){(0,a.default)(this,n),g=-1,y=-1,m=!1,b=null,k={},v&&clearInterval(v)}.bind(this));var _=function(){(0,a.default)(this,n),m&&(e.send((0,u.MouseMove)(g,y)),m=!1)}.bind(this),x=function(n){var i=this,s=arguments.length>1&&void 0!==arguments[1]&&arguments[1];function o(e,t,i){return k[e]=k[e]||c(t,n,i)}var l=s?e.attachEventListener.bind(e):e.nodes.attachNodeListener.bind(e.nodes);l(n.documentElement,"mouseover",function(e){(0,a.default)(this,i);var t=f(e.target,n);t!==b&&(b=t,S=performance.now())}.bind(this)),l(n,"mousemove",function(t){(0,a.default)(this,i);var s=e.observer.getDocumentOffset(n),o=(0,r.default)(s,2),u=o[0],l=o[1];g=t.clientX+u,y=t.clientY+l,m=!0;var d=Math.sign(t.movementX);E+=Math.abs(t.movementX)+Math.abs(t.movementY),d!==T&&(T=d,O++)}.bind(this),!1),l(n,"click",function(r){(0,a.default)(this,i);var s=f(r.target,n);if((r.clientX||r.clientY)&&null!==s){var l=e.nodes.getID(s);void 0!==l&&(_(),e.send((0,u.MouseClick)(l,b===s?Math.round(performance.now()-S):0,p(s),h(s)&&!d?o(l,s,t):""),!0)),b=null}}.bind(this))};e.nodes.attachNodeCallback(function(e){(0,a.default)(this,n),(0,s.isDocument)(e)&&x(e)}.bind(this)),x(document,!0),e.ticker.attach(_,(null==t?void 0:t.trackingOffset)||7)};var r=i(n(10)),a=i(n(3)),s=n(122),o=n(97),u=n(71),l=n(1153),d=n(2519);function c(e,t,n){return(0,d.finder)(e,{root:t.body,seedMinLength:3,optimizedMinLength:(null==n?void 0:n.minSelectorDepth)||2,threshold:(null==n?void 0:n.nthThreshold)||1e3,maxNumberOfTries:(null==n?void 0:n.maxOptimiseTries)||1e4})}function h(e){var t=e.tagName.toUpperCase();return"BUTTON"===t||"A"===t||"LI"===t||"SELECT"===t||"TR"===t||"TH"===t||null!=e.onclick||"button"===e.getAttribute("role")}function f(e,t){return e instanceof Element?function(e,t){var n=e;for(;null!==n&&n!==t.documentElement;){if((0,o.hasOpenreplayAttribute)(n,"masked"))return null;n=n.parentElement}if((0,s.isSVGElement)(e))for(var i=e.ownerSVGElement;null!==i;)e=i,i=i.ownerSVGElement;n=e;for(;null!==n&&n!==t.documentElement;){var r=n.tagName.toUpperCase();if("LABEL"===r)return null;if("INPUT"===r)return n;if(h(n)||null!==(0,o.getLabelAttribute)(n))return n;n=n.parentElement}return e===t.documentElement?null:e}(e,t):null}},2520:function(e,t,n){var i=n(1);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){var n=this,i=(0,a.default)({captureResourceTimings:!0,capturePageLoadTimings:!0,capturePageRenderTimings:!0,excludedResourceUrls:[]},t);"PerformanceObserver"in window||(i.captureResourceTimings=!1);if(!i.captureResourceTimings)return;var l={};function d(t){var n,a=this;if(!(t.duration<0||!(0,o.isURL)(t.name)||e.isServiceURL(t.name))){null!==l&&(l[t.name]=t.startTime+t.duration);var s=!1;null===(n=i.excludedResourceUrls)||void 0===n||n.forEach(function(e){(0,r.default)(this,a),t.name.startsWith(e)&&(s=!0)}.bind(this)),s||e.send((0,u.ResourceTiming)(t.startTime+(0,o.getTimeOrigin)(),t.duration,t.responseStart&&t.startTime?t.responseStart-t.startTime:0,t.transferSize>t.encodedBodySize?t.transferSize-t.encodedBodySize:0,t.encodedBodySize||0,t.decodedBodySize||0,t.name,t.initiatorType,t.transferSize,t.responseStatus&&304===t.responseStatus||0===t.transferSize))}}var c,h=new PerformanceObserver(function(e){return(0,r.default)(this,n),e.getEntries().forEach(d)}.bind(this));e.attachStartCallback((function(e){var t=e.sessionID;t!==c&&(performance.getEntriesByType("resource").forEach(d),c=t),h.observe({entryTypes:["resource"]})})),e.attachStopCallback((function(){h.disconnect()}));var f=0,p=0;if(i.capturePageLoadTimings){var v=!1;e.ticker.attach(function(){var t=this;if((0,r.default)(this,n),!v&&(0!==f&&0!==p||performance.getEntriesByType("paint").forEach(function(e){(0,r.default)(this,t);var n=e.name,i=e.startTime;switch(n){case"first-paint":f=i;break;case"first-contentful-paint":p=i}}.bind(this)),performance.timing.loadEventEnd||performance.now()>3e4)){v=!0;var i=performance.timing,a=i.navigationStart,s=i.requestStart,o=i.responseStart,l=i.responseEnd,d=i.domContentLoadedEventStart,c=i.domContentLoadedEventEnd,h=i.loadEventStart,g=i.loadEventEnd;e.send((0,u.PageLoadTiming)(s-a||0,o-a||0,l-a||0,d-a||0,c-a||0,h-a||0,g-a||0,f,p))}}.bind(this),30)}if(i.capturePageRenderTimings){var g=0,y=0,m=0,b=null,S=!1;e.ticker.attach(function(){var t=this;if((0,r.default)(this,n),!S){var i=performance.now();if(null!==l&&i-(g=Math.max.apply(null,Object.keys(l).map(function(e){return(0,r.default)(this,t),l[e]}.bind(this))))>1e3&&(b=function(e){for(var t=[],n=document.getElementsByTagName("*"),i=/url\(("[^"]*"|'[^']*'|[^)]*)\)/i,r=0;r<n.length;r++){var a=n[r],o="";if((0,s.hasTag)(a,"img")&&(o=a.currentSrc||a.src),!o){var u=getComputedStyle(a).getPropertyValue("background-image");if(u){var l=i.exec(u);null!==l&&((o=l[1]).startsWith('"')||o.startsWith("'"))&&(o=o.substr(1,o.length-2))}}if(o){var d="data:image"===o.substr(0,10)?0:e[o];if(void 0!==d){var c=a.getBoundingClientRect(),h=Math.max(c.top,0),f=Math.max(c.left,0),p=Math.min(c.bottom,window.innerHeight||document.documentElement&&document.documentElement.clientHeight||0),v=Math.min(c.right,window.innerWidth||document.documentElement&&document.documentElement.clientWidth||0);if(!(p<=h||v<=f)){var g=(p-h)*(v-f);t.push({time:d,area:g})}}}}return t}(l),l=null),null!==m&&(i-m>50&&(y=i),m=i-y>5e3?null:i),null!==b&&null===m||i>3e4){S=!0,l=null;var a=null===b?0:function(e,t){for(var n=Math.max(document.documentElement&&document.documentElement.clientWidth||0,window.innerWidth||0)*Math.max(document.documentElement&&document.documentElement.clientHeight||0,window.innerHeight||0)/10,i=n*e,r=0;r<t.length;r++){var a=t[r],s=a.time,o=a.area;n+=o,i+=o*(s>e?s:e)}return 0===n?0:i/n}(p||f,b),o=performance.timing,d=o.domContentLoadedEventEnd,c=o.navigationStart,h=null===m?Math.max(y,p,d-c||0):0;e.send((0,u.PageRenderTiming)(a,p>g?p:g,h))}}}.bind(this))}};var r=i(n(3)),a=i(n(36)),s=n(122),o=n(97),u=n(71)},2521:function(e,t,n){var i=n(1);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=this,n=!1,i=new Map;function l(e){(0,o.isNode)(e)&&((0,o.isElementNode)(e)&&i.set(e,[e.scrollLeft,e.scrollTop]),(0,o.isDocument)(e)&&i.set(e,u(e)))}var d=e.safe(function(){return(0,a.default)(this,t),e.send(s.SetViewportScroll.apply(void 0,(0,r.default)(u(document))))}.bind(this)),c=e.safe(function(n,i){(0,a.default)(this,t);var r=e.nodes.getID(i);void 0!==r&&e.send((0,s.SetNodeScroll)(r,n[0],n[1]))}.bind(this));e.attachStartCallback(d),e.attachStopCallback(function(){(0,a.default)(this,t),n=!1,i.clear()}.bind(this)),e.nodes.attachNodeCallback(function(n,r){var s=this;(0,a.default)(this,t),r&&((0,o.isElementNode)(n)&&n.scrollLeft+n.scrollTop>0?i.set(n,[n.scrollLeft,n.scrollTop]):(0,o.isDocument)(n)&&i.set(n,u(n))),(0,o.isRootNode)(n)&&e.nodes.attachNodeListener(n,"scroll",function(e){(0,a.default)(this,s),l(e.target)}.bind(this))}.bind(this)),e.attachEventListener(document,"scroll",function(e){(0,a.default)(this,t);var i=e.target;i!==document?l(i):n=!0}.bind(this)),e.ticker.attach(function(){(0,a.default)(this,t),n&&(d(),n=!1),i.forEach(c),i.clear()}.bind(this),5,!1)};var r=i(n(33)),a=i(n(3)),s=n(71),o=n(122);function u(e){var t=e.defaultView;return[t&&t.pageXOffset||e.documentElement&&e.documentElement.scrollLeft||e.body&&e.body.scrollLeft||0,t&&t.pageYOffset||e.documentElement&&e.documentElement.scrollTop||e.body&&e.body.scrollTop||0]}},2522:function(e,t,n){var i=n(1);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t,n,i,o,u=this,l=document.referrer,d=e.safe(function(){(0,r.default)(this,u);var n=document.URL;n!==t&&(t=n,e.send((0,s.SetPageLocation)(t,l,o)),o=0,l=t)}.bind(this)),c=e.safe(function(){(0,r.default)(this,u);var t=window,a=t.innerWidth,o=t.innerHeight;a===n&&o===i||(n=a,i=o,e.send((0,s.SetViewportSize)(n,i)))}.bind(this)),h=void 0===document.hidden?Function.prototype:e.safe(function(){return(0,r.default)(this,u),e.send((0,s.SetPageVisibility)(document.hidden))}.bind(this));e.attachStartCallback(function(){(0,r.default)(this,u),t="",o=(0,a.getTimeOrigin)(),n=i=-1,d(),c(),h()}.bind(this)),void 0!==document.hidden&&e.attachEventListener(document,"visibilitychange",h,!1,!1);e.ticker.attach(d,1,!1),e.ticker.attach(c,5,!1)};var r=i(n(3)),a=n(97),s=n(71)},2523:function(e,t,n){var i=n(1);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=this;if(null===e)return;if(!window.CSSStyleSheet)return void e.send((0,a.TechnicalInfo)("no_stylesheet_prototype_in_window",""));var n=e.safe(function(n,i,s){(0,r.default)(this,t);var u=o.styleSheetIDMap.get(n);u&&("string"==typeof s?e.send((0,a.AdoptedSSInsertRuleURLBased)(u,s,i,e.getBaseHref())):e.send((0,a.AdoptedSSDeleteRule)(u,i)))}.bind(this)),i=e.safe(function(n){(0,r.default)(this,t);for(var i=n;i.parentRule;)i=i.parentRule;var s=i.parentStyleSheet;if(s){var u=o.styleSheetIDMap.get(s);if(u){var l=i.cssText,d=s.cssRules,c=Array.from(d).indexOf(i);c>=0?(e.send((0,a.AdoptedSSInsertRuleURLBased)(u,l,c,e.getBaseHref())),e.send((0,a.AdoptedSSDeleteRule)(u,c+1))):e.debug.warn("Rule index not found in",s,i)}else e.debug.warn("No sheedID found for",s,o.styleSheetIDMap)}else e.debug.warn("No parent StyleSheet found for",i,n)}.bind(this)),u=e.safe(function(e){(0,r.default)(this,t);var a=e.CSSStyleSheet.prototype,s=a.insertRule,o=a.deleteRule,u=e.CSSGroupingRule.prototype,l=u.insertRule,d=u.deleteRule;e.CSSStyleSheet.prototype.insertRule=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return n(this,t,e),s.call(this,e,t)},e.CSSStyleSheet.prototype.deleteRule=function(e){return n(this,e),o.call(this,e)},e.CSSGroupingRule.prototype.insertRule=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=l.call(this,e,t);return i(this),n},e.CSSGroupingRule.prototype.deleteRule=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=d.call(this,e);return i(this),t}}.bind(this));u(window),e.observer.attachContextCallback(u),e.nodes.attachNodeCallback(function(i){if((0,r.default)(this,t),(0,s.hasTag)(i,"style")&&i.sheet&&!(null!==i.textContent&&i.textContent.trim().length>0)){var u=e.nodes.getID(i);if(u){var l=i.sheet,d=(0,o.nextID)();o.styleSheetIDMap.set(l,d),e.send((0,a.AdoptedSSAddOwner)(d,u));for(var c=l.cssRules,h=0;h<c.length;h++)n(l,h,c[h].cssText)}}}.bind(this))};var r=i(n(3)),a=n(71),s=n(122),o=n(1154)},2524:function(e,t,n){var i=n(1);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=this;function n(t){var n=e.nodes.getID(t);void 0!==n&&e.send((0,s.SetNodeFocus)(n))}var i=!1;e.nodes.attachNodeCallback(function(o){var u=this;(0,r.default)(this,t),(0,a.hasTag)(o,"body")&&(e.nodes.attachNodeListener(o,"focus",function(e){(0,r.default)(this,u),(0,a.isNode)(e.target)&&(n(e.target),i=!1)}.bind(this)),e.nodes.attachNodeListener(o,"blur",function(t){var n=this;(0,r.default)(this,u),null===t.relatedTarget&&(i=!0,setTimeout(function(){(0,r.default)(this,n),i&&e.send((0,s.SetNodeFocus)(-1))}.bind(this),0))}.bind(this)))}.bind(this)),e.attachStartCallback(function(){(0,r.default)(this,t);for(var e=document.activeElement;e&&(0,a.hasTag)(e,"iframe")&&e.contentDocument;)e=e.contentDocument.activeElement;e&&e!==e.ownerDocument.body&&n(e)}.bind(this),!0)};var r=i(n(3)),a=n(122),s=n(71)},2525:function(e,t,n){var i=n(1);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=this;if(!window.FontFace)return;var n=new Map,i=function(i){(0,d.default)(this,t);var r=function(t){function r(){for(var t,a=this,u=arguments.length,l=new Array(u),c=0;c<u;c++)l[c]=arguments[c];if((0,s.default)(this,r),"string"==typeof l[1]){var p="";l[2]&&e.safe(function(){(0,d.default)(this,a),p=JSON.stringify(l[2])}.bind(this));var v=[l[0],l[1],p],g=n.get(i.document)||[];g.push(v),n.set(i.document,g);var y=i===window?0:e.nodes.getID(i.document);if(void 0===y)return(0,o.default)(t);e.active()&&e.send(h.LoadFontFace.apply(void 0,[y].concat(v)))}return f(this,r,[].concat(l))}return(0,l.default)(r,t),(0,a.default)(r)}(i.FontFace);i.FontFace=r}.bind(this);e.observer.attachContextCallback(i),i(window),e.nodes.attachNodeCallback(e.safe(function(i){var a=this;if((0,d.default)(this,t),(0,c.isDocument)(i)){var s=n.get(i);if(s){var o=i.defaultView===window?0:e.nodes.getID(i);void 0!==o&&s.forEach(function(t){(0,d.default)(this,a),e.send(h.LoadFontFace.apply(void 0,[o].concat((0,r.default)(t))))}.bind(this))}}}.bind(this)))};var r=i(n(33)),a=i(n(28)),s=i(n(29)),o=i(n(62)),u=i(n(55)),l=i(n(63)),d=i(n(3)),c=n(122),h=n(71);function f(e,t,n){return t=(0,u.default)(t),(0,o.default)(e,function(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return function(){return!!e}()}()?Reflect.construct(t,n||[],(0,u.default)(e).constructor):t.apply(e,n))}},2526:function(e,t,n){var i=n(1);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=(0,o.default)({failuresOnly:!1,ignoreHeaders:["cookie","set-cookie","authorization"],capturePayload:!1,sessionTokenHeader:!1,captureInIframes:!0,axiosInstances:void 0,useProxy:!0},n);!1===i.useProxy&&e.debug.warn("Network module is migrating to proxy api, to gradually migrate and test it set useProxy to true");var p=i.ignoreHeaders,v=Array.isArray(p)?function(e){return(0,s.default)(this,t),p.includes(e)}.bind(this):function(){return(0,s.default)(this,t),p}.bind(this),g=!0===i.sessionTokenHeader?"X-OpenReplay-SessionToken":i.sessionTokenHeader;function y(t){if(g){var n=e.getSessionToken();n&&e.safe(t)(g,n)}}function m(e){if(i.capturePayload||(delete e.request.body,delete e.response.body),i.sanitizer){var t=e.response.body;if("string"==typeof t)try{e.response.body=JSON.parse(t)}catch(e){}return i.sanitizer(e)}return e}function b(t){if(t&&"string"!=typeof t.body)try{t.body=JSON.stringify(t.body)}catch(n){t.body="<unable to stringify>",e.notify.warn("Openreplay fetch couldn't stringify body:",t.body)}return JSON.stringify(t)}var S=function(n){var o=this;if((0,s.default)(this,t),i.useProxy)return(0,c.default)(n,i.ignoreHeaders,y,m,function(t){return(0,s.default)(this,o),e.send(t)}.bind(this),function(t){return(0,s.default)(this,o),e.isServiceURL(t)}.bind(this),i.tokenUrlMatcher);var d=n.fetch.bind(n);n.fetch=function(t){var n=this,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!("string"==typeof t||t instanceof URL)||e.isServiceURL(String(t)))return d(t,o);y((function(e,t){void 0===o.headers&&(o.headers={}),o.headers instanceof Headers?o.headers.append(e,t):Array.isArray(o.headers)?o.headers.push([e,t]):o.headers[e]=t}));var c=performance.now();return d(t,o).then(function(d){var h=this;(0,s.default)(this,n);var g=performance.now()-c;if(i.failuresOnly&&d.status<400)return d;var y=d.clone();return y.text().then(function(n){var i=this;(0,s.default)(this,h);var d={},S={};if(!0!==p){var k=function(e){(0,s.default)(this,i);var t=(0,a.default)(e,2),n=t[0],r=t[1];v(n)||(d[n]=r)}.bind(this);o.headers instanceof Headers?o.headers.forEach(function(e,t){return(0,s.default)(this,i),k([t,e])}.bind(this)):Array.isArray(o.headers)?o.headers.forEach(k):"object"===(0,r.default)(o.headers)&&Object.entries(o.headers).forEach(k),y.headers.forEach(function(e,t){(0,s.default)(this,i),v(t)||(S[t]=e)}.bind(this))}var w=f(o.method),T=m({url:String(t),method:w,status:y.status,request:{headers:d,body:o.body||null},response:{headers:S,body:n}});T&&e.send((0,u.NetworkRequest)("fetch",w,String(T.url),b(T.request),b(T.response),y.status,c+(0,l.getTimeOrigin)(),g,0))}.bind(this)).catch(function(t){return(0,s.default)(this,h),e.debug.error("Could not process Fetch response:",t)}.bind(this)),d}.bind(this))};var g=n.XMLHttpRequest.prototype.open,S=n.XMLHttpRequest.prototype.setRequestHeader,k=n.XMLHttpRequest.prototype.send;i.axiosInstances||(n.XMLHttpRequest.prototype.open=function(t,n){var i=this,r=this;y(function(e,t){return(0,s.default)(this,i),r.setRequestHeader(e,t)}.bind(this));var a=0;return r.addEventListener("loadstart",function(e){(0,s.default)(this,i),a=e.timeStamp}.bind(this)),r.addEventListener("load",e.safe(function(o){(0,s.default)(this,i);var d=h(r),c=d.headers,p=d.body,g=a>0?o.timeStamp-a:0,y=(r.getAllResponseHeaders()||"").trim().split(/[\r\n]+/),S={};y.forEach((function(e){var t=e.split(": "),n=t.shift();v(n)||(S[n]=t.join(": "))}));var k=f(t),w=m({url:String(n),method:k,status:r.status,request:{headers:c,body:p||null},response:{headers:S,body:r.response}});w&&e.send((0,u.NetworkRequest)("xhr",k,String(w.url),b(w.request),b(w.response),r.status,a+(0,l.getTimeOrigin)(),g,0))}.bind(this))),g.apply(this,arguments)},n.XMLHttpRequest.prototype.send=function(e){var t=h(this);return t.body=e,k.apply(this,arguments)},n.XMLHttpRequest.prototype.setRequestHeader=function(e,t){if(!v(e)){var n=h(this);n.headers[e]=t}return S.apply(this,arguments)})}.bind(this);S(window),i.axiosInstances&&i.axiosInstances.forEach(function(n){(0,s.default)(this,t),(0,d.default)(e,n,i,m,b)}.bind(this));i.captureInIframes&&e.observer.attachContextCallback(e.safe(S))};var r=i(n(2)),a=i(n(10)),s=i(n(3)),o=i(n(36)),u=n(71),l=n(97),d=i(n(2527)),c=i(n(2528));function h(e){return e.__or_req_data__||(e.__or_req_data__={body:void 0,headers:{}}),e.__or_req_data__}function f(e){return"string"==typeof e?e.toUpperCase():"GET"}},2527:function(e,t,n){var i=n(1);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n,i,d){var c=this;function h(t){var l=this;e.debug.log("Openreplay: capturing axios response data",t);var c=t.config,h=c.headers,f=c.data,p=c.method,v=c.url,g=(c.baseURL,t.data),y=t.headers,m=t.status,b=t.response||{},S=b.data,k=b.headers,w=b.status,T=n.ignoreHeaders,O=Array.isArray(T)?function(e){return(0,s.default)(this,l),T.includes(e)}.bind(this):function(){return(0,s.default)(this,l),T}.bind(this);function E(e,t){O(t[0])||(e[t[0]]=t[1])}var _={},x={};h.toJSON?_=h.toJSON():h instanceof Headers?h.forEach(function(e,t){return(0,s.default)(this,l),E(_,[t,e])}.bind(this)):Array.isArray(h)?h.forEach(function(e){return(0,s.default)(this,l),E(_,e)}.bind(this)):"object"===(0,a.default)(h)&&Object.entries(h).forEach(function(e){return(0,s.default)(this,l),E(_,e)}.bind(this));var I=k||y;I.toJSON?x=I.toJSON():I instanceof Headers?I.forEach(function(e,t){return(0,s.default)(this,l),E(x,[t,e])}.bind(this)):Array.isArray(I)?I.forEach(function(e){return(0,s.default)(this,l),E(x,e)}.bind(this)):"object"===(0,a.default)(I)&&Object.entries(I).forEach(function(e){(0,s.default)(this,l);var t=(0,r.default)(e,2),n=t[0],i=t[1];O(n)||(x[n]=i)}.bind(this));var R=i({url:v,method:p||"",status:m||w||0,request:{headers:_,body:f},response:{headers:x,body:S||g}});if(R){var j=t.config.__openreplay_timing,D=performance.now()-j;e.debug.log("Openreplay: final req object",R),e.send((0,o.NetworkRequest)("xhr",String(p),String(R.url),d(R.request),d(R.response),R.status,j+(0,u.getTimeOrigin)(),D,0))}else e.debug.log("Openreplay: empty request/response info, skipping")}e.debug.log("Openreplay: attaching axios spy to instance",t);var f=t.interceptors.request.use((function(t){if(e.debug.log("Openreplay: capturing API request",t),t.__openreplay_timing=performance.now(),n.sessionTokenHeader){var i="string"==typeof n.sessionTokenHeader?n.sessionTokenHeader:"X-OpenReplay-Session-Token",r=e.getSessionToken();r&&t.headers.set(i,r)}return t}),(function(t){e.debug.log("Openreplay: failed API request, skipping",t)}),{synchronous:!0}),p=t.interceptors.response.use((function(e){return n.failuresOnly||h(e),e}),(function(t){var n,i;return e.debug.log("Openreplay: capturing API request error",t),null!==(i=n=t)&&"object"===(0,a.default)(i)&&!0===n.isAxiosError&&Boolean(t.response)?h(t.response):t instanceof Error&&e.send((0,l.getExceptionMessage)(t,[])),Promise.reject(t)}),{synchronous:!0});e.attachStopCallback(function(){var e,n,i,r;(0,s.default)(this,c),null===(e=(n=t.interceptors.request).eject)||void 0===e||e.call(n,f),null===(i=(r=t.interceptors.response).eject)||void 0===i||i.call(r,p)}.bind(this))};var r=i(n(10)),a=i(n(2)),s=i(n(3)),o=n(71),u=n(97),l=n(1152)},2528:function(e,t,n){var i=n(1);Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t,n,i,r,u,d){var c;e.XMLHttpRequest?e.XMLHttpRequest=s.default.create(t,n,i,r,u,d):l("XMLHttpRequest");e.fetch?e.fetch=a.default.create(t,n,i,r,u,d):l("fetch");null!=e&&null!==(c=e.navigator)&&void 0!==c&&c.sendBeacon&&(e.navigator.sendBeacon=o.default.create(t,n,i,r,u))};var r=i(n(3)),a=i(n(2529)),s=i(n(2530)),o=i(n(2531)),u=this,l=function(e){return(0,r.default)(this,u),console.warn("Openreplay: Can't find ".concat(e," in global context. \nIf you're using serverside rendering in your app, make sure that tracker is loaded dynamically, otherwise ").concat(e," won't be tracked."))}.bind(this)},2529:function(e,t,n){var i=n(1),r=n(2);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.ResponseProxyHandler=t.FetchProxyHandler=void 0;var a=i(n(10)),s=i(n(8)),o=i(n(3)),u=i(n(29)),l=i(n(28)),d=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=r(e)&&"function"!=typeof e)return{default:e};var n=h(t);if(n&&n.has(e))return n.get(e);var i={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if("default"!==s&&{}.hasOwnProperty.call(e,s)){var o=a?Object.getOwnPropertyDescriptor(e,s):null;o&&(o.get||o.set)?Object.defineProperty(i,s,o):i[s]=e[s]}return i.default=e,n&&n.set(e,i),i}(n(585)),c=n(586);function h(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(h=function(e){return e?n:t})(e)}function f(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return p(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?p(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,r=function(){};return{s:r,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,o=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){o=!0,a=e},f:function(){try{s||null==n.return||n.return()}finally{if(o)throw a}}}}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}function v(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,i)}return n}function g(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?v(Object(n),!0).forEach((function(t){(0,s.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var y=t.ResponseProxyHandler=(0,l.default)((function e(t,n){(0,u.default)(this,e),this.resp=t,this.item=n,this.mockReader()}),[{key:"set",value:function(e,t,n){return Reflect.set(e,t,n)}},{key:"get",value:function(e,t){var n=this,i=Reflect.get(e,t);switch(t){case"arrayBuffer":case"blob":case"formData":case"json":case"text":return function(){var r=this;return(0,o.default)(this,n),this.item.responseType=t.toLowerCase(),i.apply(e).then(function(e){return(0,o.default)(this,r),this.item.response=(0,c.getStringResponseByType)(this.item.responseType,e),e}.bind(this))}.bind(this)}return"function"==typeof i?i.bind(e):i}},{key:"mockReader",value:function(){var e,t=this;if(this.resp.body&&"function"==typeof this.resp.body.getReader){var n=this.resp.body.getReader;this.resp.body.getReader=function(){var i=this;(0,o.default)(this,t);var r=n.apply(this.resp.body);if(this.item.readyState===d.RequestState.DONE)return r;var a=r.read,s=r.cancel;return this.item.responseType="arraybuffer",r.read=function(){var t=this;return(0,o.default)(this,i),a.apply(r).then(function(n){if((0,o.default)(this,t),e){var i=new Uint8Array(e.length+n.value.length);i.set(e),i.set(n.value,e.length),e=i}else e=new Uint8Array(n.value);return this.item.endTime=performance.now(),this.item.duration=this.item.endTime-(this.item.startTime||this.item.endTime),this.item.readyState=n.done?4:3,this.item.statusText=n.done?String(this.item.status):"Loading",this.item.responseSize=e.length,this.item.responseSizeText=(0,c.formatByteSize)(this.item.responseSize),n.done&&(this.item.response=(0,c.getStringResponseByType)(this.item.responseType,e)),n}.bind(this))}.bind(this),r.cancel=function(){i.item.cancelState=2,i.item.statusText="Cancel",i.item.endTime=performance.now(),i.item.duration=i.item.endTime-(i.item.startTime||i.item.endTime),i.item.response=(0,c.getStringResponseByType)(i.item.responseType,e);for(var t=arguments.length,n=new Array(t),a=0;a<t;a++)n[a]=arguments[a];return s.apply(r,n)},r}.bind(this)}}}]),m=t.FetchProxyHandler=(0,l.default)((function e(t,n,i,r,a,s){(0,u.default)(this,e),this.ignoredHeaders=t,this.setSessionTokenHeader=n,this.sanitize=i,this.sendMessage=r,this.isServiceUrl=a,this.tokenUrlMatcher=s}),[{key:"apply",value:function(e,t,n){var i=this,r=n[0],a=n[1];if(!r||"string"!=typeof r&&(null==r||!r.url))return e.apply(window,n);if(r instanceof URL||"string"==typeof r?this.isServiceUrl(String(r)):this.isServiceUrl(String(r.url)))return e.apply(window,n);var s=new d.default(this.ignoredHeaders,this.setSessionTokenHeader,this.sanitize);return this.beforeFetch(s,r,a),this.setSessionTokenHeader(function(e,t){if((0,o.default)(this,i),void 0===this.tokenUrlMatcher||this.tokenUrlMatcher(s.url))return void 0===n[1]&&n[0]instanceof Request?n[0].headers.append(e,t):(n[1]||(n[1]={}),void 0===n[1].headers&&(n[1]=g(g({},n[1]),{},{headers:{}})),void(n[1].headers instanceof Headers?n[1].headers.append(e,t):Array.isArray(n[1].headers)?n[1].headers.push([e,t]):n[1].headers[e]=t))}.bind(this)),e.apply(window,n).then(this.afterFetch(s)).catch(function(e){throw(0,o.default)(this,i),s.endTime=performance.now(),s.duration=s.endTime-(s.startTime||s.endTime),e}.bind(this))}},{key:"beforeFetch",value:function(e,t,n){var i,r="GET",s={};if("string"==typeof t?(r=(null==n?void 0:n.method)||"GET",i=(0,c.getURL)(t),s=(null==n?void 0:n.headers)||{}):(r=t.method||"GET",i=(0,c.getURL)(t.url),s=t.headers),e.method=r,e.requestType="fetch",e.requestHeader=s,e.url=i.toString(),e.name=(i.pathname.split("/").pop()||"")+i.search,e.status=0,e.statusText="Pending",e.readyState=1,e.startTime||(e.startTime=performance.now()),"[object Headers]"===Object.prototype.toString.call(s)){e.requestHeader={};var o,u=f(s);try{for(u.s();!(o=u.n()).done;){var l=(0,a.default)(o.value,2),d=l[0],h=l[1];e.requestHeader[d]=h}}catch(e){u.e(e)}finally{u.f()}}else e.requestHeader=s;if(i.search&&i.searchParams){e.getData={};var p,v=f(i.searchParams);try{for(v.s();!(p=v.n()).done;){var g=(0,a.default)(p.value,2),y=g[0],m=g[1];e.getData[y]=m}}catch(e){v.e(e)}finally{v.f()}}null!=n&&n.body&&(e.requestData=(0,c.genStringBody)(n.body))}},{key:"afterFetch",value:function(e){var t=this;return function(n){var i=this;(0,o.default)(this,t),e.endTime=performance.now(),e.duration=e.endTime-(e.startTime||e.endTime),e.status=n.status,e.statusText=String(n.status);var r=!1;e.header={};var s,u=f(n.headers);try{for(u.s();!(s=u.n()).done;){var l=(0,a.default)(s.value,2),d=l[0],h=l[1];e.header[d]=h,r=h.toLowerCase().indexOf("chunked")>-1||r}}catch(e){u.e(e)}finally{u.f()}return r?e.readyState=3:(e.readyState=4,this.handleResponseBody(n.clone(),e).then(function(t){(0,o.default)(this,i),e.responseSize="string"==typeof t?t.length:t.byteLength,e.responseSizeText=(0,c.formatByteSize)(e.responseSize),e.response=(0,c.getStringResponseByType)(e.responseType,t);var n=e.getMessage();n&&this.sendMessage(n)}.bind(this)).catch(function(e){if((0,o.default)(this,i),"AbortError"!==e.name)throw e}.bind(this))),new Proxy(n,new y(n,e))}.bind(this)}},{key:"handleResponseBody",value:function(e,t){var n=e.headers.get("content-type");return n&&n.includes("application/json")?(t.responseType="json",e.text()):n&&(n.includes("text/html")||n.includes("text/plain"))?(t.responseType="text",e.text()):(t.responseType="arraybuffer",e.arrayBuffer())}}]);t.default=(0,l.default)((function e(){(0,u.default)(this,e)}),null,[{key:"create",value:function(e,t,n,i,r,a){return new Proxy(fetch,new m(e,t,n,i,r,a))}}])},2530:function(e,t,n){var i=n(1),r=n(2);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.XHRProxyHandler=void 0;var a=i(n(3)),s=i(n(29)),o=i(n(28)),u=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=r(e)&&"function"!=typeof e)return{default:e};var n=d(t);if(n&&n.has(e))return n.get(e);var i={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if("default"!==s&&{}.hasOwnProperty.call(e,s)){var o=a?Object.getOwnPropertyDescriptor(e,s):null;o&&(o.get||o.set)?Object.defineProperty(i,s,o):i[s]=e[s]}return i.default=e,n&&n.set(e,i),i}(n(585)),l=n(586);function d(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(d=function(e){return e?n:t})(e)}var c=t.XHRProxyHandler=(0,o.default)((function e(t,n,i,r,o,l,d){var c=this;(0,s.default)(this,e),this.ignoredHeaders=n,this.setSessionTokenHeader=i,this.sanitize=r,this.sendMessage=o,this.isServiceUrl=l,this.tokenUrlMatcher=d,this.XMLReq=t,this.XMLReq.onreadystatechange=function(){(0,a.default)(this,c),this.onReadyStateChange()}.bind(this),this.XMLReq.onabort=function(){(0,a.default)(this,c),this.onAbort()}.bind(this),this.XMLReq.ontimeout=function(){(0,a.default)(this,c),this.onTimeout()}.bind(this),this.item=new u.default(n,i,r),this.item.requestType="xhr"}),[{key:"get",value:function(e,t){var n=this;switch(t){case"open":return this.getOpen(e);case"send":return this.setSessionTokenHeader(function(t,i){(0,a.default)(this,n),(void 0===this.tokenUrlMatcher||this.tokenUrlMatcher(this.item.url))&&e.setRequestHeader(t,i)}.bind(this)),this.getSend(e);case"setRequestHeader":return this.getSetRequestHeader(e);default:var i=Reflect.get(e,t);return"function"==typeof i?i.bind(e):i}}},{key:"set",value:function(e,t,n){switch(t){case"onreadystatechange":return this.setOnReadyStateChange(e,t,n);case"onabort":return this.setOnAbort(e,t,n);case"ontimeout":return this.setOnTimeout(e,t,n)}return Reflect.set(e,t,n)}},{key:"onReadyStateChange",value:function(){var e=this;if(!(this.item.url&&this.isServiceUrl(this.item.url)||(this.item.readyState=this.XMLReq.readyState,this.item.responseType=this.XMLReq.responseType,this.item.endTime=performance.now(),this.item.duration=this.item.endTime-this.item.startTime,this.updateItemByReadyState(),setTimeout(function(){(0,a.default)(this,e),this.item.response=(0,l.getStringResponseByType)(this.item.responseType,this.item.response)}.bind(this),0),this.XMLReq.readyState!==u.RequestState.DONE))){var t=this.item.getMessage();t&&this.sendMessage(t)}}},{key:"onAbort",value:function(){this.item.cancelState=1,this.item.statusText="Abort";var e=this.item.getMessage();e&&this.sendMessage(e)}},{key:"onTimeout",value:function(){this.item.cancelState=3,this.item.statusText="Timeout";var e=this.item.getMessage();e&&this.sendMessage(e)}},{key:"getOpen",value:function(e){var t=this,n=Reflect.get(e,"open");return function(){for(var i,r,a,s=arguments.length,o=new Array(s),u=0;u<s;u++)o[u]=arguments[u];var d=o[0],c=o[1];return t.item.method=d?d.toUpperCase():"GET",t.item.url=(null===(i=c.toString)||void 0===i?void 0:i.call(c))||"",t.item.name=null!==(r=null===(a=t.item.url)||void 0===a?void 0:a.replace(new RegExp("/*$"),"").split("/").pop())&&void 0!==r?r:"",t.item.getData=(0,l.genGetDataByUrl)(t.item.url,{}),n.apply(e,o)}}},{key:"getSend",value:function(e){var t=this,n=Reflect.get(e,"send");return function(){for(var i=arguments.length,r=new Array(i),a=0;a<i;a++)r[a]=arguments[a];var s=r[0];return t.item.requestData=(0,l.genStringBody)(s),n.apply(e,r)}}},{key:"getSetRequestHeader",value:function(e){var t=this,n=Reflect.get(e,"setRequestHeader");return function(){t.item.requestHeader||(t.item.requestHeader={});for(var i=arguments.length,r=new Array(i),a=0;a<i;a++)r[a]=arguments[a];return t.item.requestHeader[r[0]]=r[1],n.apply(e,r)}}},{key:"setOnReadyStateChange",value:function(e,t,n){var i=this;return Reflect.set(e,t,(function(){i.onReadyStateChange();for(var t=arguments.length,r=new Array(t),a=0;a<t;a++)r[a]=arguments[a];null==n||n.apply(e,r)}))}},{key:"setOnAbort",value:function(e,t,n){var i=this;return Reflect.set(e,t,(function(){i.onAbort();for(var t=arguments.length,r=new Array(t),a=0;a<t;a++)r[a]=arguments[a];n.apply(e,r)}))}},{key:"setOnTimeout",value:function(e,t,n){var i=this;return Reflect.set(e,t,(function(){i.onTimeout();for(var t=arguments.length,r=new Array(t),a=0;a<t;a++)r[a]=arguments[a];n.apply(e,r)}))}},{key:"updateItemByReadyState",value:function(){switch(this.XMLReq.readyState){case u.RequestState.UNSENT:case u.RequestState.OPENED:this.item.status=u.RequestState.UNSENT,this.item.statusText="Pending",this.item.startTime||(this.item.startTime=performance.now());break;case u.RequestState.HEADERS_RECEIVED:this.item.status=this.XMLReq.status,this.item.statusText="Loading",this.item.header={};for(var e=(this.XMLReq.getAllResponseHeaders()||"").split("\n"),t=0;t<e.length;t++){var n=e[t];if(n){var i=n.split(": "),r=i[0];this.item.header[r]=i.slice(1).join(": ")}}break;case u.RequestState.LOADING:this.item.status=this.XMLReq.status,this.item.statusText="Loading",this.XMLReq.response&&this.XMLReq.response.length&&(this.item.responseSize=this.XMLReq.response.length,this.item.responseSizeText=(0,l.formatByteSize)(this.item.responseSize));break;case u.RequestState.DONE:this.item.status=this.XMLReq.status||this.item.status||0,this.item.statusText=String(this.item.status),this.item.endTime=performance.now(),this.item.duration=this.item.endTime-(this.item.startTime||this.item.endTime),this.item.response=this.XMLReq.response,this.XMLReq.response&&this.XMLReq.response.length&&(this.item.responseSize=this.XMLReq.response.length,this.item.responseSizeText=(0,l.formatByteSize)(this.item.responseSize));break;default:this.item.status=this.XMLReq.status,this.item.statusText="Unknown"}}}]);t.default=(0,o.default)((function e(){(0,s.default)(this,e)}),null,[{key:"create",value:function(e,t,n,i,r,a){return new Proxy(XMLHttpRequest,{construct:function(s){var o=new s;return new Proxy(o,new c(o,e,t,n,i,r,a))}})}}])},2531:function(e,t,n){var i=n(1);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.BeaconProxyHandler=void 0;var r,a=i(n(10)),s=i(n(29)),o=i(n(28)),u=i(n(3)),l=i(n(585)),d=n(586),c=this;function h(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return f(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?f(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,r=function(){};return{s:r,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,o=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){o=!0,a=e},f:function(){try{s||null==n.return||n.return()}finally{if(o)throw a}}}}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}var p=function(e){return(0,u.default)(this,c),e instanceof Blob?e.type:e instanceof FormData?"multipart/form-data":e instanceof URLSearchParams?"application/x-www-form-urlencoded;charset=UTF-8":"text/plain;charset=UTF-8"}.bind(this),v=t.BeaconProxyHandler=(0,o.default)((function e(t,n,i,r,a){(0,s.default)(this,e),this.ignoredHeaders=t,this.setSessionTokenHeader=n,this.sanitize=i,this.sendMessage=r,this.isServiceUrl=a}),[{key:"apply",value:function(e,t,n){var i=n[0],r=n[1],s=new l.default(this.ignoredHeaders,this.setSessionTokenHeader,this.sanitize);if(this.isServiceUrl(i))return e.apply(t,n);var o=(0,d.getURL)(i);if(s.method="POST",s.url=i,s.name=(o.pathname.split("/").pop()||"")+o.search,s.requestType="beacon",s.requestHeader={"Content-Type":p(r)},s.status=0,s.statusText="Pending",o.search&&o.searchParams){s.getData={};var u,c=h(o.searchParams);try{for(c.s();!(u=c.n()).done;){var f=(0,a.default)(u.value,2),v=f[0],g=f[1];s.getData[v]=g}}catch(e){c.e(e)}finally{c.f()}}s.requestData=(0,d.genStringBody)(r),s.startTime||(s.startTime=performance.now());var y=e.apply(t,n);y?(s.endTime=performance.now(),s.duration=s.endTime-(s.startTime||s.endTime),s.status=0,s.statusText="Sent",s.readyState=4):(s.status=500,s.statusText="Unknown");var m=s.getMessage();return m&&this.sendMessage(m),y}}]);(t.default=function(){function e(){(0,s.default)(this,e)}return(0,o.default)(e,null,[{key:"hasSendBeacon",value:function(){return!!e.origSendBeacon}},{key:"create",value:function(t,n,i,r,a){if(e.hasSendBeacon())return new Proxy(e.origSendBeacon,new v(t,n,i,r,a))}}])}()).origSendBeacon=null===(r=window)||void 0===r||null===(r=r.navigator)||void 0===r?void 0:r.sendBeacon},2532:function(e,t,n){var i=n(1);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=i(n(3)),a=n(71);t.default=function(e){var t=this;e.attachEventListener(document,"selectionchange",function(){(0,r.default)(this,t);var n=document.getSelection();if(null===n||n.isCollapsed)e.send((0,a.SelectionChange)(-1,-1,""));else{var i=e.nodes.getID(n.anchorNode),s=e.nodes.getID(n.focusNode),o=n.toString().replace(/\s+/g," ");i&&s&&e.send((0,a.SelectionChange)(i,s,o))}}.bind(this))}},2533:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){e.attachEventListener(window,"focus",(function(){document.hidden||(e.debug.log("Openreplay: tab change to"+e.session.getTabId()),e.send((0,i.TabChange)(e.session.getTabId())))}),!1,!1)};var i=n(71)},585:function(e,t,n){var i=n(1);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.RequestState=void 0;var r,a=i(n(10)),s=i(n(3)),o=i(n(29)),u=i(n(28)),l=n(71),d=n(97);!function(e){e[e.UNSENT=0]="UNSENT",e[e.OPENED=1]="OPENED",e[e.HEADERS_RECEIVED=2]="HEADERS_RECEIVED",e[e.LOADING=3]="LOADING",e[e.DONE=4]="DONE"}(r||(t.RequestState=r={}));t.default=(0,u.default)((function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1?arguments[1]:void 0,i=arguments.length>2?arguments[2]:void 0;(0,o.default)(this,e),this.ignoredHeaders=t,this.setSessionTokenHeader=n,this.sanitize=i,this.id="",this.name="",this.method="",this.url="",this.status=0,this.statusText="",this.cancelState=0,this.readyState=0,this.header={},this.responseType="",this.requestHeader={},this.responseSize=0,this.responseSizeText="",this.startTime=0,this.endTime=0,this.duration=0,this.getData={},this.requestData=null}),[{key:"getMessage",value:function(){var e=this.writeHeaders(),t=e.reqHs,n=e.resHs,i={headers:t,body:"GET"===this.method?JSON.stringify(this.getData):this.requestData},r={headers:n,body:this.response},a=this.sanitize({url:this.url,method:this.method,status:this.status,request:i,response:r});if(a)return(0,l.NetworkRequest)(this.requestType,a.method,a.url,JSON.stringify(a.request),JSON.stringify(a.response),a.status,this.startTime+(0,d.getTimeOrigin)(),this.duration,this.responseSize)}},{key:"writeHeaders",value:function(){var e=this,t={};Object.entries(this.requestHeader).forEach(function(n){(0,s.default)(this,e);var i=(0,a.default)(n,2),r=i[0],o=i[1];this.isHeaderIgnored(r)||(t[r]=o)}.bind(this)),this.setSessionTokenHeader(function(n,i){(0,s.default)(this,e),t[n]=i}.bind(this));var n={};return Object.entries(this.header).forEach(function(t){(0,s.default)(this,e);var i=(0,a.default)(t,2),r=i[0],o=i[1];this.isHeaderIgnored(r)||(n[r]=o)}.bind(this)),{reqHs:t,resHs:n}}},{key:"isHeaderIgnored",value:function(e){var t=this;return Array.isArray(this.ignoredHeaders)?this.ignoredHeaders.map(function(e){return(0,s.default)(this,t),e.toLowerCase()}.bind(this)).includes(e.toLowerCase()):this.ignoredHeaders}}])},586:function(e,t,n){var i=n(1);Object.defineProperty(t,"__esModule",{value:!0}),t.formatByteSize=function(e){if(e<=0)return"";if(e>=1e6)return(e/1e3/1e3).toFixed(1)+" MB";if(e>=1e3)return(e/1e3).toFixed(1)+" KB";return"".concat(e,"B")},t.getURL=t.getStringResponseByType=t.genStringBody=t.genResponseByType=t.genGetDataByUrl=t.genFormattedBody=void 0,t.isIterable=c,t.isPureObject=d;var r=i(n(2)),a=i(n(10)),s=i(n(3)),o=this;function u(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return l(e,t);var n={}.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?l(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,r=function(){};return{s:r,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,o=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){o=!0,a=e},f:function(){try{s||null==n.return||n.return()}finally{if(o)throw a}}}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,i=Array(t);n<t;n++)i[n]=e[n];return i}t.genResponseByType=function(e,t){(0,s.default)(this,o);var n="";switch(e){case"":case"text":case"json":if("string"==typeof t)try{n=JSON.parse(t)}catch(e){n=t.slice(0,1e4)}else d(t)||Array.isArray(t)?n=JSON.stringify(t):void 0!==t&&(n=Object.prototype.toString.call(t));break;case"blob":case"document":case"arraybuffer":default:void 0!==t&&(n=Object.prototype.toString.call(t))}return n}.bind(this),t.getStringResponseByType=function(e,t){(0,s.default)(this,o);var n="";switch(e){case"":case"text":case"json":"string"==typeof t?n=t:d(t)||Array.isArray(t)?n=JSON.stringify(t):void 0!==t&&(n=Object.prototype.toString.call(t));break;case"blob":case"document":case"arraybuffer":default:void 0!==t&&(n=Object.prototype.toString.call(t))}return n}.bind(this),t.genStringBody=function(e){if((0,s.default)(this,o),!e)return null;var t;if("string"==typeof e){"{"!==e[0]&&"["!==e[0]||(t=e);var n=e.split("&");t=1===n.length?e:n.join(",")}else if(c(e)){var i,l=[],h=u(e);try{for(h.s();!(i=h.n()).done;){var f=(0,a.default)(i.value,2),p=f[0],v=f[1];l.push("".concat(p,"=").concat("string"==typeof v?v:"[object Object]"))}}catch(e){h.e(e)}finally{h.f()}t=l.join(",")}else t=e instanceof Blob||e instanceof ReadableStream||e instanceof ArrayBuffer?"byte data":d(e)?e:"can't parse body ".concat((0,r.default)(e));return t}.bind(this),t.genGetDataByUrl=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};d(t)||(t={});var n=e?e.split("?"):[];if(n.shift(),n.length>0){var i,r=u(n=n.join("?").split("&"));try{for(r.s();!(i=r.n()).done;){var a=i.value,s=a.split("=");try{t[s[0]]=decodeURIComponent(s[1])}catch(e){t[s[0]]=s[1]}}}catch(e){r.e(e)}finally{r.f()}}return t},t.genFormattedBody=function(e){if((0,s.default)(this,o),!e)return null;var t;if("string"==typeof e)try{t=JSON.parse(e)}catch(r){t={};var n,i=u(e.split("&"));try{for(i.s();!(n=i.n()).done;){var l=n.value.split("=");t[l[0]]=void 0===l[1]?"undefined":l[1]}}catch(e){i.e(e)}finally{i.f()}}else if(c(e)){t={};var h,f=u(e);try{for(f.s();!(h=f.n()).done;){var p=(0,a.default)(h.value,2),v=p[0],g=p[1];t[v]="string"==typeof g?g:"[object Object]"}}catch(e){f.e(e)}finally{f.f()}}else t=ArrayBuffer.isView(e)||e instanceof Blob||e instanceof ReadableStream||e instanceof ArrayBuffer?"[byte data]":d(e)?e:"can't parse body ".concat((0,r.default)(e));return t}.bind(this);function d(e){return null!==e&&"object"===(0,r.default)(e)}function c(e){return null!=e&&(!ArrayBuffer.isView(e)&&("undefined"!=typeof Symbol&&"function"==typeof e[Symbol.iterator]))}t.getURL=function(e){if((0,s.default)(this,o),e.startsWith("//")){var t=new URL(window.location.href);e="".concat(t.protocol).concat(e)}return e.startsWith("http")?new URL(e):new URL(e,window.location.href)}.bind(this)},97:function(e,t,n){var i=n(1);Object.defineProperty(t,"__esModule",{value:!0}),t.MAX_STR_LEN=t.IS_FIREFOX=t.IN_BROWSER=t.DOCS_HOST=void 0,t.adjustTimeOrigin=function(){d=Date.now()-performance.now()},t.canAccessIframe=function(e){try{return Boolean(e.contentDocument)}catch(e){return!1}},t.createEventListener=function(e,t,n,i){var r=v("addEventListener");try{e[r](t,n,i)}catch(e){console.debug("Openreplay: ".concat(e.messages,"; if this error is caused by an IframeObserver, ignore it"))}},t.createMutationObserver=function(e){var t=v("MutationObserver");return new window[t](e)},t.deleteEventListener=function(e,t,n,i){var r=v("removeEventListener");try{e[r](t,n,i)}catch(e){console.debug("Openreplay: ".concat(e.messages,"; if this error is caused by an IframeObserver, ignore it"))}},t.deprecationWarn=f,t.generateRandomId=function(e){var t=new Uint8Array((e||40)/2);return(window.crypto||window.msCrypto).getRandomValues(t),Array.from(t,p).join("")},t.getLabelAttribute=function(e){var t=e.getAttribute("data-openreplay-label");if(null!==t)return t;null!==(t=e.getAttribute("data-asayer-label"))&&f('"data-asayer-label" attribute','"data-openreplay-label" attribute',"/");return t},t.getTimeOrigin=function(){return d},t.hasOpenreplayAttribute=function(e,t){var n="data-openreplay-".concat(t);if(e.hasAttribute(n))return u[t]&&f('"'.concat(n,'" attribute'),'"'.concat(u[t],'" attribute'),"/installation/sanitize-data"),!0;return!1},t.inIframe=function(){try{return window.self!==window.top}catch(e){return!0}},t.isURL=function(e){return e.startsWith("https://")||e.startsWith("http://")},t.ngSafeBrowserMethod=v,t.normSpaces=function(e){return e.trim().replace(/\s+/g," ")},t.now=void 0,t.requestIdleCb=function(e){g.addTask(e)},t.stars=void 0;var r=i(n(29)),a=i(n(28)),s=i(n(3)),o=this,u={htmlmasked:"hidden",masked:"obscured"},l=t.IN_BROWSER=!("undefined"==typeof window),d=(t.IS_FIREFOX=l&&navigator.userAgent.match(/firefox|fxios/i),t.MAX_STR_LEN=1e5,l?Date.now()-performance.now():0);t.now=l&&performance.now?function(){return(0,s.default)(this,o),Math.round(performance.now()+d)}.bind(this):function(){return(0,s.default)(this,o),Date.now()}.bind(this),t.stars="repeat"in String.prototype?function(e){return(0,s.default)(this,o),"*".repeat(e.length)}.bind(this):function(e){return(0,s.default)(this,o),e.replace(/./g,"*")}.bind(this);var c=t.DOCS_HOST="https://docs.openreplay.com",h={};function f(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"/";h[e]||(console.warn("OpenReplay: ".concat(e," is deprecated. ").concat(t?"Please, use ".concat(t," instead."):""," Visit ").concat(c).concat(n," for more information.")),h[e]=!0)}function p(e){return e.toString(16).padStart(2,"0")}function v(e){return window.Zone&&"__symbol__"in window.Zone?window.Zone.__symbol__(e):e}var g=new((0,a.default)((function e(){(0,r.default)(this,e),this.taskQueue=[],this.isRunning=!1}),[{key:"addTask",value:function(e){this.taskQueue.push(e),this.runTasks()}},{key:"runTasks",value:function(){var e=this;if(!this.isRunning&&0!==this.taskQueue.length){this.isRunning=!0;var t=function(){var n=this;if((0,s.default)(this,e),0!==this.taskQueue.length){var i=this.taskQueue.shift();Promise.resolve(i()).then(function(){var e=this;(0,s.default)(this,n),requestAnimationFrame(function(){return(0,s.default)(this,e),t()}.bind(this))}.bind(this))}else this.isRunning=!1}.bind(this);t()}}}]))}}]);