@flarehr/apollo-benefits 2.83.43343 → 2.85.47721

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- import{_ as Oo,a as je,u as Fo,w as te,m as Lo,s as yt,b as Q}from"./vendor-47fa603f.js";/*
1
+ import{_ as Oo,a as je,u as Fo,w as te,m as Lo,s as yt,b as Q}from"./vendor-1c5ad091.js";/*
2
2
  Adaptation of "object-assign" library (https://www.npmjs.com/package/object-assign)
3
3
  exported as an ES module instead of CommonJS, to avoid extra configuration steps when using
4
4
  the ESM build of the SDK with tools that doesn't support CommonJS by default (e.g. Rollup).
@@ -2,4 +2,4 @@ var De={log:"log",debug:"debug",info:"info",warn:"warn",error:"error"},pt=consol
2
2
  `).forEach(function(a){var i=yo(a)||wo(a)||Co(a)||Ro(a);i&&(!i.func&&i.line&&(i.func=ge),e.push(i))}),{message:Xe(t,"message"),name:Xe(t,"name"),stack:e}}var Wn="((?:file|https?|blob|chrome-extension|native|eval|webpack|snippet|<anonymous>|\\w+\\.|\\/).*?)",Kt="(?::(\\d+))",bo=new RegExp("^\\s*at (.*?) ?\\(".concat(Wn).concat(Kt,"?").concat(Kt,"?\\)?\\s*$"),"i"),So=new RegExp("\\((\\S*)".concat(Kt).concat(Kt,"\\)"));function yo(t){var e=bo.exec(t);if(e){var r=e[2]&&e[2].indexOf("native")===0,n=e[2]&&e[2].indexOf("eval")===0,a=So.exec(e[2]);return n&&a&&(e[2]=a[1],e[3]=a[2],e[4]=a[3]),{args:r?[e[2]]:[],column:e[4]?+e[4]:void 0,func:e[1]||ge,line:e[3]?+e[3]:void 0,url:r?void 0:e[2]}}}var Eo=new RegExp("^\\s*at ?".concat(Wn).concat(Kt,"?").concat(Kt,"??\\s*$"),"i");function wo(t){var e=Eo.exec(t);if(e)return{args:[],column:e[3]?+e[3]:void 0,func:ge,line:e[2]?+e[2]:void 0,url:e[1]}}var To=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i;function Co(t){var e=To.exec(t);if(e)return{args:[],column:e[4]?+e[4]:void 0,func:e[1]||ge,line:+e[3],url:e[2]}}var Io=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|capacitor|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,Ao=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;function Ro(t){var e=Io.exec(t);if(e){var r=e[3]&&e[3].indexOf(" > eval")>-1,n=Ao.exec(e[3]);return r&&n&&(e[3]=n[1],e[4]=n[2],e[5]=void 0),{args:e[2]?e[2].split(","):[],column:e[5]?+e[5]:void 0,func:e[1]||ge,line:e[4]?+e[4]:void 0,url:e[3]}}}function Xe(t,e){if(!(typeof t!="object"||!t||!(e in t))){var r=t[e];return typeof r=="string"?r:void 0}}function Oo(t,e,r,n){var a=[{url:e,column:n,line:r}],i=No(t),o=i.name,s=i.message;return{name:o,message:s,stack:a}}var xo=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?([\s\S]*)$/;function No(t){var e,r,n;return{}.toString.call(t)==="[object String]"&&(e=xo.exec(t),r=e[1],n=e[2]),{name:r,message:n}}var ko=220*Lt,Lo="$",Mo=3;function Q(t,e){var r;e===void 0&&(e=ko);var n=Ht(Object.prototype),a=Ht(Array.prototype),i=[],o=new WeakMap,s=Je(t,Lo,void 0,i,o),u=((r=JSON.stringify(s))===null||r===void 0?void 0:r.length)||0;if(u>e){$e(e,"discarded",t);return}for(;i.length>0&&u<e;){var c=i.shift(),l=0;if(Array.isArray(c.source))for(var d=0;d<c.source.length;d++){var f=Je(c.source[d],c.path,d,i,o);if(f!==void 0?u+=JSON.stringify(f).length:u+=4,u+=l,l=1,u>e){$e(e,"truncated",t);break}c.target[d]=f}else for(var d in c.source)if(Object.prototype.hasOwnProperty.call(c.source,d)){var f=Je(c.source[d],c.path,d,i,o);if(f!==void 0&&(u+=JSON.stringify(f).length+l+d.length+Mo,l=1),u>e){$e(e,"truncated",t);break}c.target[d]=f}}return n(),a(),s}function Je(t,e,r,n,a){var i=Do(t);if(!i||typeof i!="object")return Uo(i);var o=Po(i);if(o!=="[Object]"&&o!=="[Array]"&&o!=="[Error]")return o;var s=t;if(a.has(s))return"[Reference seen at ".concat(a.get(s),"]");var u=r!==void 0?"".concat(e,".").concat(r):e,c=Array.isArray(i)?[]:{};return a.set(s,u),n.push({source:i,target:c,path:u}),c}function Uo(t){return typeof t=="bigint"?"[BigInt] ".concat(t.toString()):typeof t=="function"?"[Function] ".concat(t.name||"unknown"):typeof t=="symbol"?"[Symbol] ".concat(t.description||t.toString()):t}function Po(t){try{if(t instanceof Event)return{isTrusted:t.isTrusted};var e=Object.prototype.toString.call(t),r=e.match(/\[object (.*)\]/);if(r&&r[1])return"[".concat(r[1],"]")}catch{}return"[Unserializable]"}function Do(t){var e=t;if(e&&typeof e.toJSON=="function")try{return e.toJSON()}catch{}return t}function $e(t,e,r){O.warn("The data provided has been ".concat(e," as it is over the limit of ").concat(t," characters:"),r)}var qn="No stack, consider using an instance of Error";function jn(t){var e=t.stackTrace,r=t.originalError,n=t.handlingStack,a=t.startClocks,i=t.nonErrorPrefix,o=t.source,s=t.handling,u=r instanceof Error,c=Fo(e,u,i,r),l=Bo(u,e)?$t(e):qn,d=u?zo(r,o):void 0,f=e==null?void 0:e.name,v=Zn(r);return{startClocks:a,source:o,handling:s,handlingStack:n,originalError:r,type:f,message:c,stack:l,causes:d,fingerprint:v}}function Fo(t,e,r,n){return t!=null&&t.message&&(t!=null&&t.name)?t.message:e?"Empty message":"".concat(r," ").concat(Pt(Q(n)))}function Bo(t,e){return e===void 0?!1:t?!0:e.stack.length>0&&(e.stack.length>1||e.stack[0].url!==void 0)}function Zn(t){return t instanceof Error&&"dd_fingerprint"in t?String(t.dd_fingerprint):void 0}function $t(t){var e=Xn(t);return t.stack.forEach(function(r){var n=r.func==="?"?"<anonymous>":r.func,a=r.args&&r.args.length>0?"(".concat(r.args.join(", "),")"):"",i=r.line?":".concat(r.line):"",o=r.line&&r.column?":".concat(r.column):"";e+=`
3
3
  at `.concat(n).concat(a," @ ").concat(r.url).concat(i).concat(o)}),e}function Xn(t){return"".concat(t.name||"Error",": ").concat(t.message)}function Jn(){var t=2,e=new Error,r;if(!e.stack)try{throw e}catch{}return Ct(function(){var n=At(e);n.stack=n.stack.slice(t),r=$t(n)}),r}function zo(t,e){for(var r=t,n=[];(r==null?void 0:r.cause)instanceof Error&&n.length<10;){var a=At(r.cause);n.push({message:r.cause.message,source:e,type:a==null?void 0:a.name,stack:a&&$t(a)}),r=r.cause}return n.length?n:void 0}var Qt={AGENT:"agent",CONSOLE:"console",CUSTOM:"custom",LOGGER:"logger",NETWORK:"network",SOURCE:"source",REPORT:"report"};function Vo(t){var e=function(a,i){var o=jn({stackTrace:a,originalError:i,startClocks:J(),nonErrorPrefix:"Uncaught",source:Qt.SOURCE,handling:"unhandled"});t.notify(o)},r=Ho(e).stop,n=Go(e).stop;return{stop:function(){r(),n()}}}function Ho(t){return X(window,"onerror",{before:function(e,r,n,a,i){var o;i instanceof Error?o=At(i):o=Oo(e,r,n,a),t(o,i??e)}})}function Go(t){return X(window,"onunhandledrejection",{before:function(e){var r=e.reason||"Empty reason",n=At(r);t(n,r)}})}function Yo(t){var e=C({version:"5.1.0",onReady:function(r){r()}},t);return Object.defineProperty(e,"_setDebug",{get:function(){return Ci},enumerable:!1}),e}function Ko(t,e,r){var n=t[e];t[e]=r,n&&n.q&&n.q.forEach(function(a){return On(a,"onReady callback threw an error:")()})}var _;(function(t){t.BEFORE_UNLOAD="beforeunload",t.CLICK="click",t.DBL_CLICK="dblclick",t.KEY_DOWN="keydown",t.LOAD="load",t.POP_STATE="popstate",t.SCROLL="scroll",t.TOUCH_START="touchstart",t.TOUCH_END="touchend",t.TOUCH_MOVE="touchmove",t.VISIBILITY_CHANGE="visibilitychange",t.PAGE_SHOW="pageshow",t.FREEZE="freeze",t.RESUME="resume",t.DOM_CONTENT_LOADED="DOMContentLoaded",t.POINTER_DOWN="pointerdown",t.POINTER_UP="pointerup",t.POINTER_CANCEL="pointercancel",t.HASH_CHANGE="hashchange",t.PAGE_HIDE="pagehide",t.MOUSE_DOWN="mousedown",t.MOUSE_UP="mouseup",t.MOUSE_MOVE="mousemove",t.FOCUS="focus",t.BLUR="blur",t.CONTEXT_MENU="contextmenu",t.RESIZE="resize",t.CHANGE="change",t.INPUT="input",t.PLAY="play",t.PAUSE="pause",t.SECURITY_POLICY_VIOLATION="securitypolicyviolation",t.SELECTION_CHANGE="selectionchange",t.STORAGE="storage"})(_||(_={}));function P(t,e,r,n,a){return W(t,e,[r],n,a)}function W(t,e,r,n,a){var i=a===void 0?{}:a,o=i.once,s=i.capture,u=i.passive,c=E(function(v){!v.isTrusted&&!v.__ddIsTrusted&&!t.allowUntrustedEvents||(o&&f(),n(v))}),l=u?{capture:s,passive:u}:s,d=Tt(e,"addEventListener");r.forEach(function(v){return d.call(e,v,c,l)});function f(){var v=Tt(e,"removeEventListener");r.forEach(function(p){return v.call(e,p,c,l)})}return{stop:f}}var Wt={intervention:"intervention",deprecation:"deprecation",cspViolation:"csp_violation"};function Wo(t,e){var r=[];_t(e,Wt.cspViolation)&&r.push(jo(t));var n=e.filter(function(a){return a!==Wt.cspViolation});return n.length&&r.push(qo(n)),Pn.apply(void 0,r)}function qo(t){var e=new L(function(){if(window.ReportingObserver){var r=E(function(a,i){return a.forEach(function(o){e.notify(Zo(o))})}),n=new window.ReportingObserver(r,{types:t,buffered:!0});return n.observe(),function(){n.disconnect()}}});return e}function jo(t){var e=new L(function(){var r=P(t,document,_.SECURITY_POLICY_VIOLATION,function(n){e.notify(Xo(n))}).stop;return r});return e}function Zo(t){var e=t.type,r=t.body;return{type:e,subtype:r.id,message:"".concat(e,": ").concat(r.message),stack:$n(r.id,r.message,r.sourceFile,r.lineNumber,r.columnNumber)}}function Xo(t){var e=Wt.cspViolation,r="'".concat(t.blockedURI,"' blocked by '").concat(t.effectiveDirective,"' directive");return{type:Wt.cspViolation,subtype:t.effectiveDirective,message:"".concat(e,": ").concat(r),stack:$n(t.effectiveDirective,t.originalPolicy?"".concat(r,' of the policy "').concat(Dn(t.originalPolicy,100,"..."),'"'):"no policy",t.sourceFile,t.lineNumber,t.columnNumber)}}function $n(t,e,r,n,a){return r?$t({name:t,message:e,stack:[{func:"?",url:r,line:n??void 0,column:a??void 0}]}):void 0}function xr(t,e){var r=window.__ddBrowserSdkExtensionCallback;r&&r({type:t,payload:e})}function Rt(t){return t===null?"null":Array.isArray(t)?"array":typeof t}function Me(t,e,r){if(r===void 0&&(r=Jo()),e===void 0)return t;if(typeof e!="object"||e===null)return e;if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){var n=e.flags||[e.global?"g":"",e.ignoreCase?"i":"",e.multiline?"m":"",e.sticky?"y":"",e.unicode?"u":""].join("");return new RegExp(e.source,n)}if(!r.hasAlreadyBeenSeen(e)){if(Array.isArray(e)){for(var a=Array.isArray(t)?t:[],i=0;i<e.length;++i)a[i]=Me(a[i],e[i],r);return a}var o=Rt(t)==="object"?t:{};for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&(o[s]=Me(o[s],e[s],r));return o}}function Nr(t){return Me(void 0,t)}function lt(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var r,n=0,a=t;n<a.length;n++){var i=a[n];i!=null&&(r=Me(r,i))}return r}function Jo(){if(typeof WeakSet<"u"){var t=new WeakSet;return{hasAlreadyBeenSeen:function(r){var n=t.has(r);return n||t.add(r),n}}}var e=[];return{hasAlreadyBeenSeen:function(r){var n=e.indexOf(r)>=0;return n||e.push(r),n}}}var kr={log:"log",configuration:"configuration"},$o=["https://www.datadoghq-browser-agent.com","https://www.datad0g-browser-agent.com","https://d3uc069fcn7uxw.cloudfront.net","https://d20xtzwzcl0ceb.cloudfront.net","http://localhost","<anonymous>"],Qo=[oo],at={maxEventsPerPage:0,sentEventCount:0,telemetryEnabled:!1,telemetryConfigurationEnabled:!1},hr;function ts(t,e){var r,n=new L;at.telemetryEnabled=!_t(Qo,e.site)&&Yt(e.telemetrySampleRate),at.telemetryConfigurationEnabled=at.telemetryEnabled&&Yt(e.telemetryConfigurationSampleRate);var a=es();hr=function(o){if(at.telemetryEnabled){var s=i(t,o,a);n.notify(s),xr("telemetry",s)}},Ti(Ue),C(at,{maxEventsPerPage:e.maxTelemetryEventsPerPage,sentEventCount:0});function i(o,s,u){return lt({type:"telemetry",date:F(),service:o,version:"5.1.0",source:"browser",_dd:{format_version:2},telemetry:lt(s,{runtime_env:u}),experimental_features:Mn(ci())},r!==void 0?r():{})}return{setContextProvider:function(o){r=o},observable:n,enabled:at.telemetryEnabled}}function es(){return{is_local_file:window.location.protocol==="file:",is_worker:"WorkerGlobalScope"in self}}function rs(t){return t.site===Yn}function Dt(t,e){fr(De.debug,t,e),Lr(C({type:kr.log,message:t,status:"debug"},e))}function Ue(t,e){Lr(C({type:kr.log,status:"error"},as(t),e))}function ns(t){at.telemetryConfigurationEnabled&&Lr({type:kr.configuration,configuration:t})}function Lr(t){hr&&at.sentEventCount<at.maxEventsPerPage&&(at.sentEventCount+=1,hr(t))}function as(t){if(t instanceof Error){var e=At(t);return{error:{kind:e.name,stack:$t(is(e))},message:e.message}}return{error:{stack:qn},message:"".concat("Uncaught"," ").concat(Pt(t))}}function is(t){return t.stack=t.stack.filter(function(e){return!e.url||$o.some(function(r){return Be(e.url,r)})}),t}var Re=1/0,os=q,te=function(){function t(e,r){var n=this;this.expireDelay=e,this.maxEntries=r,this.entries=[],this.clearOldValuesInterval=me(function(){return n.clearOldValues()},os)}return t.prototype.add=function(e,r){var n=this,a={value:e,startTime:r,endTime:Re,remove:function(){var i=n.entries.indexOf(a);i>=0&&n.entries.splice(i,1)},close:function(i){a.endTime=i}};return this.maxEntries&&this.entries.length>=this.maxEntries&&this.entries.pop(),this.entries.unshift(a),a},t.prototype.find=function(e){e===void 0&&(e=Re);for(var r=0,n=this.entries;r<n.length;r++){var a=n[r];if(a.startTime<=e){if(e<=a.endTime)return a.value;break}}},t.prototype.closeActive=function(e){var r=this.entries[0];r&&r.endTime===Re&&r.close(e)},t.prototype.findAll=function(e,r){e===void 0&&(e=Re),r===void 0&&(r=0);var n=Zt(e,r);return this.entries.filter(function(a){return a.startTime<=n&&e<=a.endTime}).map(function(a){return a.value})},t.prototype.reset=function(){this.entries=[]},t.prototype.stop=function(){Ir(this.clearOldValuesInterval)},t.prototype.clearOldValues=function(){for(var e=nt()-this.expireDelay;this.entries.length>0&&this.entries[this.entries.length-1].endTime<e;)this.entries.pop()},t}(),ss=q,us=Jt;function cs(t,e,r){var n=Qi(t.sessionStoreStrategyType,e,r),a=new te(us);n.renewObservable.subscribe(function(){a.add(i(),nt())}),n.expireObservable.subscribe(function(){a.closeActive(nt())}),n.expandOrRenewSession(),a.add(i(),Nn().relative),ls(t,function(){return n.expandOrRenewSession()}),ds(t,function(){return n.expandSession()});function i(){return{id:n.getSession().id,trackingType:n.getSession()[e]}}return{findActiveSession:function(o){return a.find(o)},renewObservable:n.renewObservable,expireObservable:n.expireObservable,expire:n.expire}}function ls(t,e){W(t,window,[_.CLICK,_.TOUCH_START,_.KEY_DOWN,_.SCROLL],e,{capture:!0,passive:!0}).stop}function ds(t,e){var r=function(){document.visibilityState==="visible"&&e()};P(t,document,_.VISIBILITY_CHANGE,r).stop,me(r,ss)}function fs(t){return t>=500}function vs(t){try{return t.clone()}catch{return}}var ps=80*Lt,hs=32,Qn=3*Ln,_s=q,ta=K;function ea(t,e,r,n,a){e.transportStatus===0&&e.queuedPayloads.size()===0&&e.bandwidthMonitor.canHandle(t)?na(t,e,r,{onSuccess:function(){return aa(0,e,r,n,a)},onFailure:function(){e.queuedPayloads.enqueue(t),ra(e,r,n,a)}}):e.queuedPayloads.enqueue(t)}function ra(t,e,r,n){t.transportStatus===2&&H(function(){var a=t.queuedPayloads.first();na(a,t,e,{onSuccess:function(){t.queuedPayloads.dequeue(),t.currentBackoffTime=ta,aa(1,t,e,r,n)},onFailure:function(){t.currentBackoffTime=Math.min(_s,t.currentBackoffTime*2),ra(t,e,r,n)}})},t.currentBackoffTime)}function na(t,e,r,n){var a=n.onSuccess,i=n.onFailure;e.bandwidthMonitor.add(t),r(t,function(o){e.bandwidthMonitor.remove(t),ms(o)?(e.transportStatus=e.bandwidthMonitor.ongoingRequestCount>0?1:2,t.retry={count:t.retry?t.retry.count+1:1,lastFailureStatus:o.status},i()):(e.transportStatus=0,a())})}function aa(t,e,r,n,a){t===0&&e.queuedPayloads.isFull()&&!e.queueFullReported&&(a({message:"Reached max ".concat(n," events size queued for upload: ").concat(Qn/Ln,"MiB"),source:Qt.AGENT,startClocks:J()}),e.queueFullReported=!0);var i=e.queuedPayloads;for(e.queuedPayloads=ia();i.size()>0;)ea(i.dequeue(),e,r,n,a)}function ms(t){return t.type!=="opaque"&&(t.status===0&&!navigator.onLine||t.status===408||t.status===429||fs(t.status))}function gs(){return{transportStatus:0,currentBackoffTime:ta,bandwidthMonitor:bs(),queuedPayloads:ia(),queueFullReported:!1}}function ia(){var t=[];return{bytesCount:0,enqueue:function(e){this.isFull()||(t.push(e),this.bytesCount+=e.bytesCount)},first:function(){return t[0]},dequeue:function(){var e=t.shift();return e&&(this.bytesCount-=e.bytesCount),e},size:function(){return t.length},isFull:function(){return this.bytesCount>=Qn}}}function bs(){return{ongoingRequestCount:0,ongoingByteCount:0,canHandle:function(t){return this.ongoingRequestCount===0||this.ongoingByteCount+t.bytesCount<=ps&&this.ongoingRequestCount<hs},add:function(t){this.ongoingRequestCount+=1,this.ongoingByteCount+=t.bytesCount},remove:function(t){this.ongoingRequestCount-=1,this.ongoingByteCount-=t.bytesCount}}}function oa(t,e,r,n){var a=gs(),i=function(o,s){return Es(t,e,r,o,s)};return{send:function(o){ea(o,a,i,e.trackType,n)},sendOnExit:function(o){Ss(t,e,r,o)}}}function Ss(t,e,r,n){var a=!!navigator.sendBeacon&&n.bytesCount<r;if(a)try{var i=e.build("beacon",n),o=navigator.sendBeacon(i,n.data);if(o)return}catch(u){ys(u)}var s=e.build("xhr",n);_r(t,s,n.data)}var Jr=!1;function ys(t){Jr||(Jr=!0,Ue(t))}function Es(t,e,r,n,a){var i=ws()&&n.bytesCount<r;if(i){var o=e.build("fetch",n);fetch(o,{method:"POST",body:n.data,keepalive:!0,mode:"cors"}).then(E(function(u){return a==null?void 0:a({status:u.status,type:u.type})}),E(function(){var u=e.build("xhr",n);_r(t,u,n.data,a)}))}else{var s=e.build("xhr",n);_r(t,s,n.data,a)}}function ws(){try{return window.Request&&"keepalive"in new Request("http://a")}catch{return!1}}function _r(t,e,r,n){var a=new XMLHttpRequest;a.open("POST",e,!0),P(t,a,"loadend",function(){n==null||n({status:a.status})},{once:!0}),a.send(r)}function Mr(){var t=Ts();if(t)return{getAllowedWebViewHosts:function(){return JSON.parse(t.getAllowedWebViewHosts())},send:function(e,r){t.send(JSON.stringify({eventType:e,event:r}))}}}function qt(t){var e;t===void 0&&(t=(e=It().location)===null||e===void 0?void 0:e.hostname);var r=Mr();return!!r&&r.getAllowedWebViewHosts().some(function(n){return t===n||Si(t,".".concat(n))})}function Ts(){return It().DatadogEventBridge}var Nt={HIDDEN:"visibility_hidden",UNLOADING:"before_unload",PAGEHIDE:"page_hide",FROZEN:"page_frozen"};function Cs(t){var e=new L(function(){var r=gt(tt.PAGEHIDE),n=W(t,window,[_.VISIBILITY_CHANGE,_.FREEZE,_.PAGE_HIDE],function(i){i.type===_.PAGE_HIDE&&r?e.notify({reason:Nt.PAGEHIDE}):i.type===_.VISIBILITY_CHANGE&&document.visibilityState==="hidden"?e.notify({reason:Nt.HIDDEN}):i.type===_.FREEZE&&e.notify({reason:Nt.FROZEN})},{capture:!0}).stop,a=N;return r||(a=P(t,window,_.BEFORE_UNLOAD,function(){e.notify({reason:Nt.UNLOADING})}).stop),function(){n(),a()}});return e}function sa(t){return _t(Fe(Nt),t)}var Is=function(){function t(e,r,n){var a=this;this.request=e,this.flushController=r,this.messageBytesLimit=n,this.pushOnlyBuffer=[],this.upsertBuffer={},this.flushSubscription=this.flushController.flushObservable.subscribe(function(i){return a.flush(i)})}return t.prototype.add=function(e){this.addOrUpdate(e)},t.prototype.upsert=function(e,r){this.addOrUpdate(e,r)},t.prototype.stop=function(){this.flushSubscription.unsubscribe()},t.prototype.flush=function(e){var r=this.pushOnlyBuffer.concat(Fe(this.upsertBuffer));this.pushOnlyBuffer=[],this.upsertBuffer={};var n={data:r.join(`
4
4
  `),bytesCount:e.bytesCount,flushReason:e.reason};sa(e.reason)?this.request.sendOnExit(n):this.request.send(n)},t.prototype.addOrUpdate=function(e,r){var n=this.process(e),a=n.processedMessage,i=n.messageBytesCount;if(i>=this.messageBytesLimit){O.warn("Discarded a message whose size was bigger than the maximum allowed size ".concat(this.messageBytesLimit,"KB."));return}this.hasMessageFor(r)&&this.remove(r),this.push(a,i,r)},t.prototype.process=function(e){var r=Pt(e),n=ve(r);return{processedMessage:r,messageBytesCount:n}},t.prototype.push=function(e,r,n){var a=this.flushController.messagesCount>0?1:0;this.flushController.notifyBeforeAddMessage(r+a),n!==void 0?this.upsertBuffer[n]=e:this.pushOnlyBuffer.push(e),this.flushController.notifyAfterAddMessage()},t.prototype.remove=function(e){var r=this.upsertBuffer[e];delete this.upsertBuffer[e];var n=ve(r),a=this.flushController.messagesCount>1?1:0;this.flushController.notifyAfterRemoveMessage(n+a)},t.prototype.hasMessageFor=function(e){return e!==void 0&&this.upsertBuffer[e]!==void 0},t}();function As(t){var e=t.messagesLimit,r=t.bytesLimit,n=t.durationLimit,a=t.pageExitObservable,i=t.sessionExpireObservable,o=a.subscribe(function(h){return d(h.reason)}),s=i.subscribe(function(){return d("session_expire")}),u=new L(function(){return function(){o.unsubscribe(),s.unsubscribe()}}),c=0,l=0;function d(h){if(l!==0){var m=l,y=c;l=0,c=0,p(),u.notify({reason:h,messagesCount:m,bytesCount:y})}}var f;function v(){f===void 0&&(f=H(function(){d("duration_limit")},n))}function p(){ot(f),f=void 0}return{flushObservable:u,get messagesCount(){return l},notifyBeforeAddMessage:function(h){c+h>=r&&d("bytes_limit"),l+=1,c+=h,v()},notifyAfterAddMessage:function(){l>=e?d("messages_limit"):c>=r&&d("bytes_limit")},notifyAfterRemoveMessage:function(h){c-=h,l-=1,l===0&&p()}}}function Rs(t,e,r,n,a,i){var o=u(t,e.endpoint),s=r&&u(t,r.endpoint);function u(c,l){return new Is(oa(c,l,c.batchBytesLimit,n),As({messagesLimit:c.batchMessagesLimit,bytesLimit:c.batchBytesLimit,durationLimit:c.flushTimeout,pageExitObservable:a,sessionExpireObservable:i}),c.messageBytesLimit)}return{flushObservable:o.flushController.flushObservable,add:function(c,l){l===void 0&&(l=!0),o.add(c),s&&l&&s.add(r.transformMessage?r.transformMessage(c):c)},upsert:function(c,l){o.upsert(c,l),s&&s.upsert(r.transformMessage?r.transformMessage(c):c,l)},stop:function(){o.stop(),s==null||s.stop()}}}var Os=function(){function t(){this.callbacks={}}return t.prototype.notify=function(e,r){var n=this.callbacks[e];n&&n.forEach(function(a){return a(r)})},t.prototype.subscribe=function(e,r){var n=this;return this.callbacks[e]||(this.callbacks[e]=[]),this.callbacks[e].push(r),{unsubscribe:function(){n.callbacks[e]=n.callbacks[e].filter(function(a){return r!==a})}}},t}();function $r(t,e,r){var n=0,a=!1;return{isLimitReached:function(){if(n===0&&H(function(){n=0},q),n+=1,n<=e||a)return a=!1,!1;if(n===e+1){a=!0;try{r({message:"Reached max number of ".concat(t,"s by minute: ").concat(e),source:Qt.AGENT,startClocks:J()})}finally{a=!1}}return!0}}}function Ur(t,e,r){if(document.readyState===e||document.readyState==="complete")r();else{var n=e==="complete"?_.LOAD:_.DOM_CONTENT_LOADED;P(t,window,n,r,{once:!0})}}var Qe,Pr=new WeakMap;function xs(t){return Qe||(Qe=Ns(t)),Qe}function Ns(t){var e=new L(function(){var r=X(XMLHttpRequest.prototype,"open",{before:ks}).stop,n=X(XMLHttpRequest.prototype,"send",{before:function(){Ls.call(this,t,e)}}).stop,a=X(XMLHttpRequest.prototype,"abort",{before:Ms}).stop;return function(){r(),n(),a()}});return e}function ks(t,e){Pr.set(this,{state:"open",method:t.toUpperCase(),url:Or(String(e))})}function Ls(t,e){var r=this,n=Pr.get(this);if(n){var a=n;a.state="start",a.startClocks=J(),a.isAborted=!1,a.xhr=this;var i=!1,o=X(this,"onreadystatechange",{before:function(){this.readyState===XMLHttpRequest.DONE&&s()}}).stop,s=function(){if(u(),o(),!i){i=!0;var c=n;c.state="complete",c.duration=$(a.startClocks.timeStamp,F()),c.status=r.status,e.notify(pe(c))}},u=P(t,this,"loadend",s).stop;e.notify(a)}}function Ms(){var t=Pr.get(this);t&&(t.isAborted=!0)}var tr;function Us(){return tr||(tr=Ps()),tr}function Ps(){var t=new L(function(){if(window.fetch){var e=Kn(window,"fetch",function(r){return function(n,a){var i,o=Ct(Ds,null,[t,n,a]);return o?(i=r.call(this,o.input,o.init),Ct(Fs,null,[t,i,o])):i=r.call(this,n,a),i}}).stop;return e}});return t}function Ds(t,e,r){var n=r&&r.method||e instanceof Request&&e.method,a=n?n.toUpperCase():"GET",i=e instanceof Request?e.url:Or(String(e)),o=J(),s={state:"start",init:r,input:e,method:a,startClocks:o,url:i};return t.notify(s),s}function Fs(t,e,r){var n=function(a){var i=r;i.state="resolve","stack"in a||a instanceof Error?(i.status=0,i.isAborted=a instanceof DOMException&&a.code===DOMException.ABORT_ERR,i.error=a):"status"in a&&(i.response=a,i.responseType=a.type,i.status=a.status,i.isAborted=!1),t.notify(i)};e.then(E(n),E(n))}var er={};function Bs(t){var e=t.map(function(r){return er[r]||(er[r]=zs(r)),er[r]});return Pn.apply(void 0,e)}function zs(t){var e=new L(function(){var r=pt[t];return pt[t]=function(){for(var n=[],a=0;a<arguments.length;a++)n[a]=arguments[a];r.apply(console,n);var i=Jn();Ct(function(){e.notify(Vs(n,t,i))})},function(){pt[t]=r}});return e}function Vs(t,e,r){var n=t.map(function(s){return Hs(s)}).join(" "),a,i;if(e===De.error){var o=Xt(t,function(s){return s instanceof Error});a=o?$t(At(o)):void 0,i=Zn(o)}return{api:e,message:n,stack:a,handlingStack:r,fingerprint:i}}function Hs(t){return typeof t=="string"?Q(t):t instanceof Error?Xn(At(t)):Pt(Q(t),void 0,2)}var Gs=500,Qr=function(){function t(){this.buffer=[]}return t.prototype.add=function(e){var r=this.buffer.push(e);r>Gs&&this.buffer.splice(0,1)},t.prototype.drain=function(){this.buffer.forEach(function(e){return e()}),this.buffer.length=0},t}(),Ft,tn=3*Lt,Ys=(Ft={},Ft[0]="feature flag evaluation",Ft[1]="user",Ft[2]="global context",Ft[3]="logger context",Ft);function ua(t,e){return t>tn?(O.warn("The ".concat(Ys[e]," data exceeds the recommended ").concat(tn/Lt,"KiB threshold. More details: https://docs.datadoghq.com/real_user_monitoring/browser/troubleshooting/#customer-data-exceeds-the-recommended-3kib-warning")),!0):!1}var Ks=200;function mr(t,e){e===void 0&&(e=ve);var r={},n,a=!1,i=new L,o=bt(function(u){n=e(Pt(u)),a||(a=ua(n,t))},Ks).throttled,s={getBytesCount:function(){return n},getContext:function(){return Nr(r)},setContext:function(u){Rt(u)==="object"?(r=Q(u),o(r)):s.clearContext(),i.notify()},setContextProperty:function(u,c){r[u]=Q(c),o(r),i.notify()},removeContextProperty:function(u){delete r[u],o(r),i.notify()},clearContext:function(){r={},n=0,i.notify()},changeObservable:i};return s}var Ws="_dd_c",qs=[];function en(t,e,r,n){n===void 0&&(n=ve);var a=js(e,r),i=mr(r,n);return o(),qs.push(P(t,window,_.STORAGE,function(u){var c=u.key;a===c&&o()})),i.changeObservable.subscribe(s),i;function o(){var u=localStorage.getItem(a),c=u!==null?JSON.parse(u):{};i.setContext(c)}function s(){localStorage.setItem(a,JSON.stringify(i.getContext()))}}function js(t,e){return"".concat(Ws,"_").concat(t,"_").concat(e)}function Zs(t,e,r){var n=t.getReader(),a=[],i=0;o();function o(){n.read().then(E(function(u){if(u.done){s();return}r.collectStreamBody&&a.push(u.value),i+=u.value.length,i>r.bytesLimit?s():o()}),E(function(u){return e(u)}))}function s(){n.cancel().catch(N);var u,c;if(r.collectStreamBody){var l;if(a.length===1)l=a[0];else{l=new Uint8Array(i);var d=0;a.forEach(function(f){l.set(f,d),d+=f.length})}u=l.slice(0,r.bytesLimit),c=l.length>r.bytesLimit}e(void 0,u,c)}}var Xs="datadog-synthetics-public-id",Js="datadog-synthetics-result-id",$s="datadog-synthetics-injects-rum";function ca(){return!!(window._DATADOG_SYNTHETICS_INJECTS_RUM||st($s))}function Qs(){var t=window._DATADOG_SYNTHETICS_PUBLIC_ID||st(Xs);return typeof t=="string"?t:void 0}function tu(){var t=window._DATADOG_SYNTHETICS_RESULT_ID||st(Js);return typeof t=="string"?t:void 0}function rn(t){var e=C({},t),r=["id","name","email"];return r.forEach(function(n){n in e&&(e[n]=String(e[n]))}),e}function eu(t){var e=Rt(t)==="object";return e||O.error("Unsupported user:",t),e}function Dr(t){var e=Rt(t);return e==="string"||e==="function"||t instanceof RegExp}function la(t,e,r){return r===void 0&&(r=!1),t.some(function(n){try{if(typeof n=="function")return n(e);if(n instanceof RegExp)return n.test(e);if(typeof n=="string")return r?Be(e,n):n===e}catch(a){O.error(a)}return!1})}function ru(t){var e=t;return Rt(e)==="object"&&Dr(e.match)&&Array.isArray(e.propagatorTypes)}function nu(t){t.status===0&&!t.isAborted&&(t.traceId=void 0,t.spanId=void 0,t.traceSampled=void 0)}function au(t,e){return{clearTracingIfNeeded:nu,traceFetch:function(r){return nn(t,r,e,function(n){var a;if(r.input instanceof Request&&!(!((a=r.init)===null||a===void 0)&&a.headers))r.input=new Request(r.input),Object.keys(n).forEach(function(o){r.input.headers.append(o,n[o])});else{r.init=pe(r.init);var i=[];r.init.headers instanceof Headers?r.init.headers.forEach(function(o,s){i.push([s,o])}):Array.isArray(r.init.headers)?r.init.headers.forEach(function(o){i.push(o)}):r.init.headers&&Object.keys(r.init.headers).forEach(function(o){i.push([o,r.init.headers[o]])}),r.init.headers=i.concat(Tr(n))}})},traceXhr:function(r,n){return nn(t,r,e,function(a){Object.keys(a).forEach(function(i){n.setRequestHeader(i,a[i])})})}}}function nn(t,e,r,n){if(!(!iu()||!r.findTrackedSession())){var a=Xt(t.allowedTracingUrls,function(i){return la([i.match],e.url,!0)});a&&(e.traceId=new an,e.spanId=new an,e.traceSampled=!jt(t.traceSampleRate)||Yt(t.traceSampleRate),n(ou(e.traceId,e.spanId,e.traceSampled,a.propagatorTypes)))}}function iu(){return da()!==void 0}function da(){return window.crypto||window.msCrypto}function ou(t,e,r,n){var a={};return n.forEach(function(i){switch(i){case"datadog":{C(a,{"x-datadog-origin":"rum","x-datadog-parent-id":e.toDecimalString(),"x-datadog-sampling-priority":r?"1":"0","x-datadog-trace-id":t.toDecimalString()});break}case"tracecontext":{C(a,{traceparent:"00-0000000000000000".concat(t.toPaddedHexadecimalString(),"-").concat(e.toPaddedHexadecimalString(),"-0").concat(r?"1":"0")});break}case"b3":{C(a,{b3:"".concat(t.toPaddedHexadecimalString(),"-").concat(e.toPaddedHexadecimalString(),"-").concat(r?"1":"0")});break}case"b3multi":{C(a,{"X-B3-TraceId":t.toPaddedHexadecimalString(),"X-B3-SpanId":e.toPaddedHexadecimalString(),"X-B3-Sampled":r?"1":"0"});break}}}),a}var an=function(){function t(){this.buffer=new Uint8Array(8),da().getRandomValues(this.buffer),this.buffer[0]=this.buffer[0]&127}return t.prototype.toString=function(e){var r=this.readInt32(0),n=this.readInt32(4),a="";do{var i=r%e*4294967296+n;r=Math.floor(r/e),n=Math.floor(i/e),a=(i%e).toString(e)+a}while(r||n);return a},t.prototype.toDecimalString=function(){return this.toString(10)},t.prototype.toPaddedHexadecimalString=function(){var e=this.toString(16);return Array(17-e.length).join("0")+e},t.prototype.readInt32=function(e){return this.buffer[e]*16777216+(this.buffer[e+1]<<16)+(this.buffer[e+2]<<8)+this.buffer[e+3]},t}(),fa=["tracecontext","datadog"];function su(t){var e,r;if(!t.applicationId){O.error("Application ID is not configured, no RUM data will be collected.");return}if(t.sessionReplaySampleRate!==void 0&&!ce(t.sessionReplaySampleRate)){O.error("Session Replay Sample Rate should be a number between 0 and 100");return}if(t.traceSampleRate!==void 0&&!ce(t.traceSampleRate)){O.error("Trace Sample Rate should be a number between 0 and 100");return}if(t.excludedActivityUrls!==void 0&&!Array.isArray(t.excludedActivityUrls)){O.error("Excluded Activity Urls should be an array");return}var n=uu(t);if(n){var a=mo(t);if(a)return C({applicationId:t.applicationId,version:t.version,actionNameAttribute:t.actionNameAttribute,sessionReplaySampleRate:(e=t.sessionReplaySampleRate)!==null&&e!==void 0?e:0,startSessionReplayRecordingManually:!!t.startSessionReplayRecordingManually,traceSampleRate:t.traceSampleRate,allowedTracingUrls:n,excludedActivityUrls:(r=t.excludedActivityUrls)!==null&&r!==void 0?r:[],workerUrl:t.workerUrl,trackUserInteractions:!!t.trackUserInteractions,trackViewsManually:!!t.trackViewsManually,trackResources:!!t.trackResources,trackLongTasks:!!t.trackLongTasks,subdomain:t.subdomain,defaultPrivacyLevel:Cr(fe,t.defaultPrivacyLevel)?t.defaultPrivacyLevel:fe.MASK,customerDataTelemetrySampleRate:1},a)}}function uu(t){if(t.allowedTracingUrls!==void 0){if(!Array.isArray(t.allowedTracingUrls)){O.error("Allowed Tracing URLs should be an array");return}if(t.allowedTracingUrls.length!==0&&t.service===void 0){O.error("Service needs to be configured when tracing is enabled");return}var e=[];return t.allowedTracingUrls.forEach(function(r){Dr(r)?e.push({match:r,propagatorTypes:fa}):ru(r)?e.push(r):O.warn("Allowed Tracing Urls parameters should be a string, RegExp, function, or an object. Ignoring parameter",r)}),e}return[]}function cu(t){var e=new Set;return Array.isArray(t.allowedTracingUrls)&&t.allowedTracingUrls.length>0&&t.allowedTracingUrls.forEach(function(r){Dr(r)?fa.forEach(function(n){return e.add(n)}):Rt(r)==="object"&&Array.isArray(r.propagatorTypes)&&r.propagatorTypes.forEach(function(n){return e.add(n)})}),Mn(e)}function lu(t){var e=go(t);return C({session_replay_sample_rate:t.sessionReplaySampleRate,start_session_replay_recording_manually:t.startSessionReplayRecordingManually,trace_sample_rate:t.traceSampleRate,action_name_attribute:t.actionNameAttribute,use_allowed_tracing_urls:Array.isArray(t.allowedTracingUrls)&&t.allowedTracingUrls.length>0,selected_tracing_propagators:cu(t),default_privacy_level:t.defaultPrivacyLevel,use_excluded_activity_urls:Array.isArray(t.excludedActivityUrls)&&t.excludedActivityUrls.length>0,use_worker_url:!!t.workerUrl,track_views_manually:t.trackViewsManually,track_user_interactions:t.trackUserInteractions,track_resources:t.trackResources,track_long_task:t.trackLongTasks},e)}function gr(t,e,r){return{context:t.getContext(),user:e.getContext(),hasReplay:r.isRecording()?!0:void 0}}var on="rum";function du(t,e,r){var n=r===void 0?{}:r,a=n.ignoreInitIfSyntheticsWillInjectRum,i=a===void 0?!0:a,o=!1,s=mr(2),u=mr(1),c=function(){},l=function(){},d=N,f=function(){},v=new Qr,p=function(g,S){S===void 0&&(S=F()),v.add(function(){return p(g,S)})},h=function(g,S){S===void 0&&(S=J()),v.add(function(){return h(g,S)})},m=function(g,S){S===void 0&&(S=gr(s,u,e)),v.add(function(){return m(g,S)})},y=function(g,S){S===void 0&&(S=gr(s,u,e)),v.add(function(){return y(g,S)})},A=function(){v.add(function(){return A()})},x=function(){v.add(function(){return x()})},R=function(g,S){v.add(function(){return R(g,S)})};function b(g){if(!g){O.error("Missing configuration");return}if(l=function(){return Nr(g)},!(i&&ca())){var S=qt();if(S&&(g=B(g)),!!Ot(g)){var D=su(g);if(D){if(!S&&!D.sessionStoreStrategyType){O.warn("No storage available for session. We will not send any data.");return}if(!D.trackViewsManually)T(g,D);else{var U=v;v=new Qr,h=function(dt){T(g,D,dt)},U.drain()}o=!0}}}}function T(g,S,D){if(g.storeContextsAcrossPages){var U=s.getContext();s=en(S,on,2),s.setContext(lt(s.getContext(),U));var dt=u.getContext();u=en(S,on,1),u.setContext(lt(u.getContext(),dt))}var G=t(g,S,e,s,u,D);f=function(){return e.getSessionReplayLink(S,G.session,G.viewContexts)},A=e.start,x=e.stop,h=G.startView,m=G.addAction,y=G.addError,p=G.addTiming,R=G.addFeatureFlagEvaluation,c=G.getInternalContext,d=G.stopSession,e.onRumStart(G.lifeCycle,S,G.session,G.viewContexts),v.drain()}var z=E(function(g){var S=typeof g=="object"?g:{name:g};h(S)}),Z=Yo({init:E(b),setGlobalContextProperty:E(function(g,S){return s.setContextProperty(g,S)}),removeGlobalContextProperty:E(function(g){return s.removeContextProperty(g)}),getGlobalContext:E(function(){return s.getContext()}),setGlobalContext:E(function(g){return s.setContext(g)}),clearGlobalContext:E(function(){return s.clearContext()}),getInternalContext:E(function(g){return c(g)}),getInitConfiguration:E(function(){return l()}),addAction:E(function(g,S){m({name:Q(g),context:Q(S),startClocks:J(),type:"custom"})}),addError:function(g,S){var D=Jn();Ct(function(){y({error:g,handlingStack:D,context:Q(S),startClocks:J()})})},addTiming:E(function(g,S){p(Q(g),S)}),setUser:E(function(g){eu(g)&&u.setContext(rn(g))}),getUser:E(function(){return u.getContext()}),setUserProperty:E(function(g,S){var D,U=rn((D={},D[g]=S,D))[g];u.setContextProperty(g,U)}),removeUserProperty:E(function(g){return u.removeContextProperty(g)}),clearUser:E(function(){return u.clearContext()}),startView:z,stopSession:E(function(){d()}),startSessionReplayRecording:E(function(){return A()}),stopSessionReplayRecording:E(function(){return x()}),addFeatureFlagEvaluation:E(function(g,S){R(Q(g),Q(S))}),getSessionReplayLink:E(function(){return f()})});return Z;function Ot(g){return o?(g.silentMultipleInit||O.error("DD_RUM is already initialized."),!1):!0}function B(g){return C({},g,{applicationId:"00000000-aaaa-0000-aaaa-000000000000",clientToken:"empty",sessionSampleRate:100})}}function fu(){var t=va(),e=new L(function(){if(t){var r=new t(E(function(){return e.notify()}));return r.observe(document,{attributes:!0,characterData:!0,childList:!0,subtree:!0}),function(){return r.disconnect()}}});return e}function va(){var t,e=window;if(e.Zone&&(t=Tt(e,"MutationObserver"),e.MutationObserver&&t===e.MutationObserver)){var r=new e.MutationObserver(N),n=Tt(r,"originalInstance");t=n&&n.constructor}return t||(t=e.MutationObserver),t}var pa="initial_document",vu=[["document",function(t){return pa===t}],["xhr",function(t){return t==="xmlhttprequest"}],["fetch",function(t){return t==="fetch"}],["beacon",function(t){return t==="beacon"}],["css",function(t,e){return/\.css$/i.test(e)}],["js",function(t,e){return/\.js$/i.test(e)}],["image",function(t,e){return _t(["image","img","icon"],t)||/\.(gif|jpg|jpeg|tiff|png|svg|ico)$/i.exec(e)!==null}],["font",function(t,e){return/\.(woff|eot|woff2|ttf)$/i.exec(e)!==null}],["media",function(t,e){return _t(["audio","video"],t)||/\.(mp3|mp4)$/i.exec(e)!==null}]];function pu(t){var e=t.name;if(!to(e))return Dt('Failed to construct URL for "'.concat(t.name,'"')),"other";for(var r=eo(e),n=0,a=vu;n<a.length;n++){var i=a[n],o=i[0],s=i[1];if(s(t.initiatorType,r))return o}return"other"}function br(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var r=1;r<t.length;r+=1)if(t[r-1]>t[r])return!1;return!0}function hu(t){return t.initiatorType==="xmlhttprequest"||t.initiatorType==="fetch"}function _u(t){var e=t.duration,r=t.startTime,n=t.responseEnd;return e===0&&r<n?k($(r,n)):k(e)}function mu(t){var e=ha(t);if(e){var r=e.startTime,n=e.fetchStart,a=e.redirectStart,i=e.redirectEnd,o=e.domainLookupStart,s=e.domainLookupEnd,u=e.connectStart,c=e.secureConnectionStart,l=e.connectEnd,d=e.requestStart,f=e.responseStart,v=e.responseEnd,p={download:Bt(r,f,v),first_byte:Bt(r,d,f)};return l!==n&&(p.connect=Bt(r,u,l),br(u,c,l)&&(p.ssl=Bt(r,c,l))),s!==n&&(p.dns=Bt(r,o,s)),_a(t)&&(p.redirect=Bt(r,a,i)),p}}function ha(t){if(br(t.startTime,t.fetchStart,t.domainLookupStart,t.domainLookupEnd,t.connectStart,t.connectEnd,t.requestStart,t.responseStart,t.responseEnd)){if(!_a(t))return t;var e=t.redirectStart,r=t.redirectEnd;if(e<t.startTime&&(e=t.startTime),r<t.startTime&&(r=t.fetchStart),!!br(t.startTime,e,r,t.fetchStart))return C({},t,{redirectEnd:r,redirectStart:e})}}function _a(t){return t.fetchStart!==t.startTime}function Bt(t,e,r){return{duration:k($(e,r)),start:k($(t,e))}}function gu(t){if(t.startTime<t.responseStart)return t.decodedBodySize}function Fr(t,e){return e&&!t.isIntakeUrl(e)}function ma(t){return t.nodeType===Node.TEXT_NODE}function bu(t){return t.nodeType===Node.COMMENT_NODE}function ee(t){return t.nodeType===Node.ELEMENT_NODE}function He(t){return ee(t)&&!!t.shadowRoot}function Br(t){var e=t;return!!e.host&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&ee(e.host)}function Su(t){return t.childNodes.length>0||He(t)}function ga(t,e){t.childNodes.forEach(e),He(t)&&e(t.shadowRoot)}function Ge(t){return Br(t)?t.host:t.parentNode}var yu=2*q;function Eu(t){var e=wu(t)||Tu(t);if(!(!e||e.traceTime<=ut()-yu))return e.traceId}function wu(t){var e=t.querySelector("meta[name=dd-trace-id]"),r=t.querySelector("meta[name=dd-trace-time]");return ba(e&&e.content,r&&r.content)}function Tu(t){var e=Cu(t);if(e)return ba(vr(e,"trace-id"),vr(e,"trace-time"))}function ba(t,e){var r=e&&Number(e);if(!(!t||!r))return{traceId:t,traceTime:r}}function Cu(t){for(var e=0;e<t.childNodes.length;e+=1){var r=sn(t.childNodes[e]);if(r)return r}if(t.body)for(var e=t.body.childNodes.length-1;e>=0;e-=1){var n=t.body.childNodes[e],r=sn(n);if(r)return r;if(!ma(n))break}}function sn(t){if(t&&bu(t)){var e=/^\s*DATADOG;(.*?)\s*$/.exec(t.data);if(e)return e[1]}}var I;(function(t){t.EVENT="event",t.FIRST_INPUT="first-input",t.LARGEST_CONTENTFUL_PAINT="largest-contentful-paint",t.LAYOUT_SHIFT="layout-shift",t.LONG_TASK="longtask",t.NAVIGATION="navigation",t.PAINT="paint",t.RESOURCE="resource"})(I||(I={}));function un(){return window.performance!==void 0&&"getEntries"in performance}function he(t){return window.PerformanceObserver&&PerformanceObserver.supportedEntryTypes!==void 0&&PerformanceObserver.supportedEntryTypes.includes(t)}function Iu(t,e){if(Au(e,function(s){oe(t,e,[s])}),un()){var r=performance.getEntries();H(function(){return oe(t,e,r)})}if(window.PerformanceObserver){var n=E(function(s){return oe(t,e,s.getEntries())}),a=[I.RESOURCE,I.NAVIGATION,I.LONG_TASK,I.PAINT],i=[I.LARGEST_CONTENTFUL_PAINT,I.FIRST_INPUT,I.LAYOUT_SHIFT,I.EVENT];try{i.forEach(function(s){var u=new window.PerformanceObserver(n);u.observe({type:s,buffered:!0,durationThreshold:40})})}catch{a.push.apply(a,i)}var o=new PerformanceObserver(n);o.observe({entryTypes:a}),un()&&"addEventListener"in performance&&P(e,performance,"resourcetimingbufferfull",function(){performance.clearResourceTimings()})}he(I.NAVIGATION)||Ru(e,function(s){oe(t,e,[s])}),he(I.FIRST_INPUT)||Ou(e,function(s){oe(t,e,[s])})}function Au(t,e){Ur(t,"interactive",function(){var r,n={entryType:I.RESOURCE,initiatorType:pa,traceId:Eu(document),toJSON:function(){return C({},r,{toJSON:void 0})}};if(he(I.NAVIGATION)&&performance.getEntriesByType(I.NAVIGATION).length>0){var a=performance.getEntriesByType(I.NAVIGATION)[0];r=C(a.toJSON(),n)}else{var i=Sa();r=C(i,{decodedBodySize:0,duration:i.responseEnd,name:window.location.href,startTime:0},n)}e(r)})}function Ru(t,e){function r(){e(C(Sa(),{entryType:I.NAVIGATION}))}Ur(t,"complete",function(){H(r)})}function Ou(t,e){var r=ut(),n=!1,a=W(t,window,[_.CLICK,_.MOUSE_DOWN,_.KEY_DOWN,_.TOUCH_START,_.POINTER_DOWN],function(s){if(s.cancelable){var u={entryType:I.FIRST_INPUT,processingStart:nt(),processingEnd:nt(),startTime:s.timeStamp,duration:0,name:""};s.type===_.POINTER_DOWN?i(t,u):o(u)}},{passive:!0,capture:!0}).stop;function i(s,u){W(s,window,[_.POINTER_UP,_.POINTER_CANCEL],function(c){c.type===_.POINTER_UP&&o(u)},{once:!0})}function o(s){if(!n){n=!0,a();var u=s.processingStart-s.startTime;u>=0&&u<ut()-r&&e(s)}}}function Sa(){var t={},e=performance.timing;for(var r in e)if(jt(e[r])){var n=r,a=e[n];t[n]=a===0?0:kn(a)}return t}function oe(t,e,r){var n=r.filter(function(i){return Cr(I,i.entryType)}),a=n.filter(function(i){return!xu(i)&&!Nu(e,i)});a.length&&t.notify(0,a)}function xu(t){return t.entryType===I.NAVIGATION&&t.loadEventEnd<=0}function Nu(t,e){return e.entryType===I.RESOURCE&&!Fr(t,e.name)}function ku(){var t=Qs(),e=tu();if(t&&e)return{test_id:t,result_id:e,injected:ca()}}function Lu(){var t,e=(t=window.Cypress)===null||t===void 0?void 0:t.env("traceId");if(typeof e=="string")return{test_execution_id:e}}function Mu(t,e,r){var n=Nr(t),a=r(n);return Tr(e).forEach(function(i){var o=i[0],s=i[1],u=Uu(n,o),c=Rt(u);c===s?cn(t,o,Q(u)):s==="object"&&(c==="undefined"||c==="null")&&cn(t,o,{})}),a}function Uu(t,e){for(var r=t,n=0,a=e.split(".");n<a.length;n++){var i=a[n];if(!Pu(r,i))return;r=r[i]}return r}function cn(t,e,r){for(var n=t,a=e.split("."),i=0;i<a.length;i+=1){var o=a[i];if(!ya(n))return;i!==a.length-1?n=n[o]:n[o]=r}}function ya(t){return Rt(t)==="object"}function Pu(t,e){return ya(t)&&Object.prototype.hasOwnProperty.call(t,e)}var se={"view.name":"string","view.url":"string","view.referrer":"string"},Oe={context:"object"},Ea;function Du(t,e,r,n,a,i,o,s,u){var c,l;Ea=(c={},c.view=se,c.error=C({"error.message":"string","error.stack":"string","error.resource.url":"string","error.fingerprint":"string"},Oe,se),c.resource=C({"resource.url":"string"},Oe,se),c.action=C({"action.target.name":"string"},Oe,se),c.long_task=C({},Oe,se),c);var d=(l={},l.error=$r("error",t.eventRateLimiterThreshold,u),l.action=$r("action",t.eventRateLimiterThreshold,u),l),f=ku(),v=Lu();e.subscribe(10,function(p){var h=p.startTime,m=p.rawRumEvent,y=p.domainContext,A=p.savedCommonContext,x=p.customerContext,R=n.findView(h),b=a.findUrl(h),T=r.findTrackedSession(h);if(T&&R&&b){var z=A||s(),Z=i.findActionId(h),Ot={_dd:{format_version:2,drift:vi(),configuration:{session_sample_rate:Le(t.sessionSampleRate,3),session_replay_sample_rate:Le(t.sessionReplaySampleRate,3)},browser_sdk_version:qt()?"5.1.0":void 0},application:{id:t.applicationId},date:F(),service:R.service||t.service,version:R.version||t.version,source:"browser",session:{id:T.id,type:f?"synthetics":v?"ci_test":"user"},view:{id:R.id,name:R.name,url:b.url,referrer:b.referrer},action:Bu(m)&&Z?{id:Z}:void 0,synthetics:f,ci_test:v,display:o.get()},B=lt(Ot,m);B.context=lt(z.context,x),"has_replay"in B.session||(B.session.has_replay=z.hasReplay),B.type==="view"&&(B.session.sampled_for_replay=T.sessionReplayAllowed),ht(z.user)||(B.usr=z.user),Fu(B,t.beforeSend,y,d)&&(ht(B.context)&&delete B.context,e.notify(11,B))}})}function Fu(t,e,r,n){var a;if(e){var i=Mu(t,Ea[t.type],function(s){return e(s,r)});if(i===!1&&t.type!=="view")return!1;i===!1&&O.warn("Can't dismiss view events using beforeSend!")}var o=(a=n[t.type])===null||a===void 0?void 0:a.isLimitReached();return!o}function Bu(t){return["error","resource","long_task"].indexOf(t.type)!==-1}function zu(t,e,r,n,a){return{get:function(i){var o=r.findView(i),s=a.findUrl(i),u=e.findTrackedSession(i);if(u&&o&&s){var c=n.findActionId(i);return{application_id:t,session_id:u.id,user_action:c?{id:c}:void 0,view:{id:o.id,name:o.name,referrer:s.referrer,url:s.url}}}}}}var Vu=Os,Hu=Jt;function Gu(t){var e=new te(Hu);t.subscribe(2,function(n){e.add(r(n),n.startClocks.relative)}),t.subscribe(4,function(n){var a=n.endClocks;e.closeActive(a.relative)}),t.subscribe(8,function(){e.reset()});function r(n){return{service:n.service,version:n.version,id:n.id,name:n.name,startClocks:n.startClocks}}return{findView:function(n){return e.find(n)},stop:function(){e.stop()}}}var ln=1;function Yu(t,e,r){var n=au(e,r);Ku(t,e,n),Wu(t,e,n)}function Ku(t,e,r){var n=xs(e).subscribe(function(a){var i=a;if(Fr(e,i.url))switch(i.state){case"start":r.traceXhr(i,i.xhr),i.requestIndex=wa(),t.notify(5,{requestIndex:i.requestIndex,url:i.url});break;case"complete":r.clearTracingIfNeeded(i),t.notify(6,{duration:i.duration,method:i.method,requestIndex:i.requestIndex,spanId:i.spanId,startClocks:i.startClocks,status:i.status,traceId:i.traceId,traceSampled:i.traceSampled,type:"xhr",url:i.url,xhr:i.xhr});break}});return{stop:function(){return n.unsubscribe()}}}function Wu(t,e,r){var n=Us().subscribe(function(a){var i=a;if(Fr(e,i.url))switch(i.state){case"start":r.traceFetch(i),i.requestIndex=wa(),t.notify(5,{requestIndex:i.requestIndex,url:i.url});break;case"resolve":qu(i,function(o){r.clearTracingIfNeeded(i),t.notify(6,{duration:o,method:i.method,requestIndex:i.requestIndex,responseType:i.responseType,spanId:i.spanId,startClocks:i.startClocks,status:i.status,traceId:i.traceId,traceSampled:i.traceSampled,type:"fetch",url:i.url,response:i.response,init:i.init,input:i.input})});break}});return{stop:function(){return n.unsubscribe()}}}function wa(){var t=ln;return ln+=1,t}function qu(t,e){var r=t.response&&vs(t.response);!r||!r.body?e($(t.startClocks.timeStamp,F())):Zs(r.body,function(){e($(t.startClocks.timeStamp,F()))},{bytesLimit:Number.POSITIVE_INFINITY,collectStreamBody:!1})}function Ta(t){var e=t.lifeCycle,r=t.isChildEvent,n=t.onChange,a=n===void 0?N:n,i={errorCount:0,longTaskCount:0,resourceCount:0,actionCount:0,frustrationCount:0},o=e.subscribe(11,function(s){var u;if(!(s.type==="view"||!r(s)))switch(s.type){case"error":i.errorCount+=1,a();break;case"action":i.actionCount+=1,s.action.frustration&&(i.frustrationCount+=s.action.frustration.type.length),a();break;case"long_task":i.longTaskCount+=1,a();break;case"resource":!((u=s._dd)===null||u===void 0)&&u.discarded||(i.resourceCount+=1,a());break}});return{stop:function(){o.unsubscribe()},eventCounts:i}}var Ca=100,ju=100;function zr(t,e,r,n,a){var i=Xu(t,e,r);return Zu(i,n,a)}function Zu(t,e,r){var n,a=!1,i=H(E(function(){return c({hadActivity:!1})}),Ca),o=r!==void 0?H(E(function(){return c({hadActivity:!0,end:F()})}),r):void 0,s=t.subscribe(function(l){var d=l.isBusy;ot(i),ot(n);var f=F();d||(n=H(E(function(){return c({hadActivity:!0,end:f})}),ju))}),u=function(){a=!0,ot(i),ot(n),ot(o),s.unsubscribe()};function c(l){a||(u(),e(l))}return{stop:u}}function Xu(t,e,r){var n=new L(function(){var a=[],i,o=0;a.push(e.subscribe(u),t.subscribe(0,function(c){c.some(function(l){return l.entryType===I.RESOURCE&&!rr(r,l.name)})&&u()}),t.subscribe(5,function(c){rr(r,c.url)||(i===void 0&&(i=c.requestIndex),o+=1,u())}),t.subscribe(6,function(c){rr(r,c.url)||i===void 0||c.requestIndex<i||(o-=1,u())}));var s=Ju(u).stop;return function(){s(),a.forEach(function(c){return c.unsubscribe()})};function u(){n.notify({isBusy:o>0})}});return n}function rr(t,e){return la(t.excludedActivityUrls,e)}function Ju(t){return X(window,"open",{before:t})}var Vr="data-dd-action-name";function $u(t,e){return dn(t,Vr)||e&&dn(t,e)||fn(t,e,Qu)||fn(t,e,tc)||""}function dn(t,e){var r;if(ic())r=t.closest("[".concat(e,"]"));else for(var n=t;n;){if(n.hasAttribute(e)){r=n;break}n=n.parentElement}if(r){var a=r.getAttribute(e);return Aa(Ia(a.trim()))}}var Qu=[function(t,e){if(ac()){if("labels"in t&&t.labels&&t.labels.length>0)return Vt(t.labels[0],e)}else if(t.id){var r=t.ownerDocument&&Xt(t.ownerDocument.querySelectorAll("label"),function(n){return n.htmlFor===t.id});return r&&Vt(r,e)}},function(t){if(t.nodeName==="INPUT"){var e=t,r=e.getAttribute("type");if(r==="button"||r==="submit"||r==="reset")return e.value}},function(t,e){if(t.nodeName==="BUTTON"||t.nodeName==="LABEL"||t.getAttribute("role")==="button")return Vt(t,e)},function(t){return t.getAttribute("aria-label")},function(t,e){var r=t.getAttribute("aria-labelledby");if(r)return r.split(/\s+/).map(function(n){return rc(t,n)}).filter(function(n){return!!n}).map(function(n){return Vt(n,e)}).join(" ")},function(t){return t.getAttribute("alt")},function(t){return t.getAttribute("name")},function(t){return t.getAttribute("title")},function(t){return t.getAttribute("placeholder")},function(t,e){if("options"in t&&t.options.length>0)return Vt(t.options[0],e)}],tc=[function(t,e){return Vt(t,e)}],ec=10;function fn(t,e,r){for(var n=t,a=0;a<=ec&&n&&n.nodeName!=="BODY"&&n.nodeName!=="HTML"&&n.nodeName!=="HEAD";){for(var i=0,o=r;i<o.length;i++){var s=o[i],u=s(n,e);if(typeof u=="string"){var c=u.trim();if(c)return Aa(Ia(c))}}if(n.nodeName==="FORM")break;n=n.parentElement,a+=1}}function Ia(t){return t.replace(/\s+/g," ")}function Aa(t){return t.length>100?"".concat(Dn(t,100)," [...]"):t}function rc(t,e){return t.ownerDocument?t.ownerDocument.getElementById(e):null}function Vt(t,e){if(!t.isContentEditable){if("innerText"in t){var r=t.innerText,n=function(a){for(var i=t.querySelectorAll(a),o=0;o<i.length;o+=1){var s=i[o];if("innerText"in s){var u=s.innerText;u&&u.trim().length>0&&(r=r.replace(u,""))}}};return nc()||n("script, style"),n("[".concat(Vr,"]")),e&&n("[".concat(e,"]")),r}return t.textContent}}function nc(){return!Ii()}var nr;function ac(){return nr===void 0&&(nr="labels"in HTMLInputElement.prototype),nr}var ar;function ic(){return ar===void 0&&(ar="closest"in HTMLElement.prototype),ar}var Ra=[Vr,"data-testid","data-test","data-qa","data-cy","data-test-id","data-qa-id","data-testing","data-component","data-element","data-source-file"],oc=[xa,uc],sc=[xa,cc,lc];function be(t,e){for(var r="",n=t;n&&n.nodeName!=="HTML";){var a=vn(n,oc,fc,e,r);if(a)return a;n.parentElement||Dt("selector from element without parent",{debug:{selector:Pe(mt(n.tagName),r),isConnected:n.isConnected}});var i=vn(n,sc,vc,e,r);r=i||Pe(dc(n),r),n=n.parentElement}return r}function Oa(t){return/[0-9]/.test(t)}function uc(t){if(t.id&&!Oa(t.id))return"#".concat(mt(t.id))}function cc(t){if(t.tagName!=="BODY"&&t.classList.length>0)for(var e=0;e<t.classList.length;e+=1){var r=t.classList[e];if(!Oa(r))return"".concat(mt(t.tagName),".").concat(mt(r))}}function lc(t){return mt(t.tagName)}function xa(t,e){if(e){var r=o(e);if(r)return r}for(var n=0,a=Ra;n<a.length;n++){var i=a[n],r=o(i);if(r)return r}function o(s){if(t.hasAttribute(s))return"".concat(mt(t.tagName),"[").concat(s,'="').concat(mt(t.getAttribute(s)),'"]')}}function dc(t){for(var e=t.parentElement.firstElementChild,r=1;e&&e!==t;)e.tagName===t.tagName&&(r+=1),e=e.nextElementSibling;return"".concat(mt(t.tagName),":nth-of-type(").concat(r,")")}function vn(t,e,r,n,a){for(var i=0,o=e;i<o.length;i++){var s=o[i],u=s(t,n);if(u){var c=Pe(u,a);if(r(t,c))return c}}}function fc(t,e){return t.ownerDocument.querySelectorAll(e).length===1}function vc(t,e){return t.parentElement.querySelectorAll(pc()?Pe(":scope",e):e).length===1}function Pe(t,e){return e?"".concat(t,">").concat(e):t}var xe;function pc(){if(xe===void 0)try{document.querySelector(":scope"),xe=!0}catch{xe=!1}return xe}var Na=K,hc=100;function _c(t,e){var r=[],n=0,a;i(t);function i(u){u.stopObservable.subscribe(o),r.push(u),ot(a),a=H(s,Na)}function o(){n===1&&r.every(function(u){return u.isStopped()})&&(n=2,e(r))}function s(){ot(a),n===0&&(n=1,o())}return{tryAppend:function(u){return n!==0?!1:r.length>0&&!mc(r[r.length-1].event,u.event)?(s(),!1):(i(u),!0)},stop:function(){s()}}}function mc(t,e){return t.target===e.target&&gc(t,e)<=hc&&t.timeStamp-e.timeStamp<=Na}function gc(t,e){return Math.sqrt(Math.pow(t.clientX-e.clientX,2)+Math.pow(t.clientY-e.clientY,2))}function bc(t,e){var r=e.onPointerDown,n=e.onPointerUp,a,i={selection:!1,input:!1},o,s=[P(t,window,_.POINTER_DOWN,function(u){hn(u)&&(a=pn(),i={selection:!1,input:!1},o=r(u))},{capture:!0}),P(t,window,_.SELECTION_CHANGE,function(){(!a||!pn())&&(i.selection=!0)},{capture:!0}),P(t,window,_.POINTER_UP,function(u){if(hn(u)&&o){var c=i;n(o,u,function(){return c}),o=void 0}},{capture:!0}),P(t,window,_.INPUT,function(){i.input=!0},{capture:!0})];return{stop:function(){s.forEach(function(u){return u.stop()})}}}function pn(){var t=window.getSelection();return!t||t.isCollapsed}function hn(t){return t.target instanceof Element&&t.isPrimary!==!1}var _n=3;function Sc(t,e){if(yc(t))return e.addFrustration("rage_click"),t.some(mn)&&e.addFrustration("dead_click"),e.hasError&&e.addFrustration("error_click"),{isRage:!0};var r=t.some(function(n){return n.getUserActivity().selection});return t.forEach(function(n){n.hasError&&n.addFrustration("error_click"),mn(n)&&!r&&n.addFrustration("dead_click")}),{isRage:!1}}function yc(t){if(t.some(function(r){return r.getUserActivity().selection}))return!1;for(var e=0;e<t.length-(_n-1);e+=1)if(t[e+_n-1].event.timeStamp-t[e].event.timeStamp<=K)return!0;return!1}var Ec='input:not([type="checkbox"]):not([type="radio"]):not([type="button"]):not([type="submit"]):not([type="reset"]):not([type="range"]),textarea,select,[contenteditable],[contenteditable] *,canvas,a[href],a[href] *';function mn(t){return t.hasPageActivity||t.getUserActivity().input?!1:!yi(t.event.target,Ec)}var wc=10*K,Tc=5*q;function Cc(t,e,r){var n=new te(Tc),a=new L,i;t.subscribe(8,function(){n.reset()}),t.subscribe(4,c);var o=bc(r,{onPointerDown:function(l){return Ic(r,t,e,l)},onPointerUp:function(l,d,f){var v=l.clickActionBase,p=l.hadActivityOnPointerDown;return Ac(r,t,e,n,a,u,v,d,f,p)}}).stop,s={findActionId:function(l){return n.findAll(l)}};return{stop:function(){c(),a.notify(),o()},actionContexts:s};function u(l){if(!i||!i.tryAppend(l)){var d=l.clone();i=_c(l,function(f){Oc(f,d)})}}function c(){i&&i.stop()}}function Ic(t,e,r,n){var a=Rc(n,t.actionNameAttribute),i=!1;return zr(e,r,t,function(o){i=o.hadActivity},Ca),{clickActionBase:a,hadActivityOnPointerDown:function(){return i}}}function Ac(t,e,r,n,a,i,o,s,u,c){var l=ka(e,n,u,o,s);i(l);var d=zr(e,r,t,function(p){p.hadActivity&&p.end<l.startClocks.timeStamp?l.discard():p.hadActivity?l.stop(p.end):c()?l.stop(l.startClocks.timeStamp):l.stop()},wc).stop,f=e.subscribe(4,function(p){var h=p.endClocks;l.stop(h.timeStamp)}),v=a.subscribe(function(){l.stop()});l.stopObservable.subscribe(function(){f.unsubscribe(),d(),v.unsubscribe()})}function Rc(t,e){var r=t.target.getBoundingClientRect();return{type:"click",target:{width:Math.round(r.width),height:Math.round(r.height),selector:be(t.target,e)},position:{x:Math.round(t.clientX-r.left),y:Math.round(t.clientY-r.top)},name:$u(t.target,e)}}function ka(t,e,r,n,a){var i=j(),o=J(),s=e.add(i,o.relative),u=Ta({lifeCycle:t,isChildEvent:function(p){return p.action!==void 0&&(Array.isArray(p.action.id)?_t(p.action.id,i):p.action.id===i)}}),c=0,l,d=[],f=new L;function v(p){c===0&&(l=p,c=1,l?s.close(kn(l)):s.remove(),u.stop(),f.notify())}return{event:a,stop:v,stopObservable:f,get hasError(){return u.eventCounts.errorCount>0},get hasPageActivity(){return l!==void 0},getUserActivity:r,addFrustration:function(p){d.push(p)},startClocks:o,isStopped:function(){return c===1||c===2},clone:function(){return ka(t,e,r,n,a)},validate:function(p){if(v(),c===1){var h=u.eventCounts,m=h.resourceCount,y=h.errorCount,A=h.longTaskCount,x=C({type:"click",duration:l&&$(o.timeStamp,l),startClocks:o,id:i,frustrationTypes:d,counts:{resourceCount:m,errorCount:y,longTaskCount:A},events:p??[a],event:a},n);t.notify(1,x),c=2}},discard:function(){v(),c=2}}}function Oc(t,e){var r=Sc(t,e).isRage;r?(t.forEach(function(n){return n.discard()}),e.stop(F()),e.validate(t.map(function(n){return n.event}))):(e.discard(),t.forEach(function(n){return n.validate()}))}function xc(t,e,r,n){t.subscribe(1,function(i){return t.notify(10,gn(i,n))});var a={findActionId:N};return r.trackUserInteractions&&(a=Cc(t,e,r).actionContexts),{addAction:function(i,o){t.notify(10,C({savedCommonContext:o},gn(i,n)))},actionContexts:a}}function gn(t,e){var r=ir(t)?{action:{id:t.id,loading_time:k(t.duration),frustration:{type:t.frustrationTypes},error:{count:t.counts.errorCount},long_task:{count:t.counts.longTaskCount},resource:{count:t.counts.resourceCount}},_dd:{action:{target:t.target,position:t.position}}}:void 0,n=ir(t)?void 0:t.context,a=lt({action:{id:j(),target:{name:t.name},type:t.type},date:t.startClocks.timeStamp,type:"action",view:{in_foreground:e.isInActivePageStateAt(t.startClocks.relative)}},r);return{customerContext:n,rawRumEvent:a,startTime:t.startClocks.relative,domainContext:ir(t)?{events:t.events}:{}}}function ir(t){return t.type!=="custom"}function Nc(t){var e=Bs([De.error]).subscribe(function(r){return t.notify({startClocks:J(),message:r.message,stack:r.stack,fingerprint:r.fingerprint,source:Qt.CONSOLE,handling:"handled",handlingStack:r.handlingStack})});return{stop:function(){e.unsubscribe()}}}function kc(t,e){var r=Wo(t,[Wt.cspViolation,Wt.intervention]).subscribe(function(n){return e.notify({startClocks:J(),message:n.message,stack:n.stack,type:n.subtype,source:Qt.REPORT,handling:"unhandled"})});return{stop:function(){r.unsubscribe()}}}function Lc(t,e,r,n){var a=new L;return Nc(a),Vo(a),kc(e,a),a.subscribe(function(i){return t.notify(12,{error:i})}),Mc(t,r,n)}function Mc(t,e,r){return t.subscribe(12,function(n){var a=n.error,i=n.customerContext,o=n.savedCommonContext;t.notify(10,C({customerContext:i,savedCommonContext:o},Uc(a,e,r)))}),{addError:function(n,a){var i=n.error,o=n.handlingStack,s=n.startClocks,u=n.context,c=i instanceof Error?At(i):void 0,l=jn({stackTrace:c,originalError:i,handlingStack:o,startClocks:s,nonErrorPrefix:"Provided",source:Qt.CUSTOM,handling:"handled"});t.notify(12,{customerContext:u,savedCommonContext:a,error:l})}}}function Uc(t,e,r){var n={date:t.startClocks.timeStamp,error:{id:j(),message:t.message,source:t.source,stack:t.stack,handling_stack:t.handlingStack,type:t.type,handling:t.handling,causes:t.causes,source_type:"browser",fingerprint:t.fingerprint},type:"error",view:{in_foreground:e.isInActivePageStateAt(t.startClocks.relative)}},a=r.findFeatureFlagEvaluations(t.startClocks.relative);return a&&!ht(a)&&(n.feature_flags=a),{rawRumEvent:n,startTime:t.startClocks.relative,domainContext:{error:t.originalError}}}function Pc(t,e,r){t.subscribe(0,function(n){for(var a=0,i=n;a<i.length;a++){var o=i[a];if(o.entryType!==I.LONG_TASK)break;var s=r.findTrackedSession(o.startTime);if(!s||!e.trackLongTasks)break;var u=wr(o.startTime),c={date:u.timeStamp,long_task:{id:j(),duration:k(o.duration)},type:"long_task",_dd:{discarded:!1}};t.notify(10,{rawRumEvent:c,startTime:u.relative,domainContext:{performanceEntry:o}})}})}function Dc(t){if(!(!performance||!("getEntriesByName"in performance))){var e=performance.getEntriesByName(t.url,"resource");if(!(!e.length||!("toJSON"in e[0]))){var r=e.map(function(n){return n.toJSON()}).filter(ha).filter(function(n){return Fc(n,t.startClocks.relative,La({startTime:t.startClocks.relative,duration:t.duration}))});if(r.length===1)return r[0]}}}function La(t){return Zt(t.startTime,t.duration)}function Fc(t,e,r){var n=1;return t.startTime>=e-n&&La(t)<=Zt(r,n)}function Bc(t,e,r,n){t.subscribe(6,function(a){t.notify(10,zc(a,e,r,n))}),t.subscribe(0,function(a){for(var i=0,o=a;i<o.length;i++){var s=o[i];s.entryType===I.RESOURCE&&!hu(s)&&t.notify(10,Vc(s,e,r,n))}})}function zc(t,e,r,n){var a,i=t.type==="xhr"?"xhr":"fetch",o=Dc(t),s=o?wr(o.startTime):t.startClocks,u=o?Ma(o):void 0,c=Hc(t,e),l=Pa(e,r,s),d=Yc(n,s,t.duration),f=Da(n,s,(a=o==null?void 0:o.duration)!==null&&a!==void 0?a:t.duration),v=lt({date:s.timeStamp,resource:{id:j(),type:i,duration:d,method:t.method,status_code:t.status,url:t.url},type:"resource"},c,u,l,f);return{startTime:s.relative,rawRumEvent:v,domainContext:{performanceEntry:o,xhr:t.xhr,response:t.response,requestInput:t.input,requestInit:t.init,error:t.error}}}function Vc(t,e,r,n){var a=pu(t),i=Ma(t),o=wr(t.startTime),s=Gc(t,e),u=Pa(e,r,o),c=Da(n,o,t.duration),l=lt({date:o.timeStamp,resource:{id:j(),type:a,url:t.name},type:"resource"},s,i,u,c);return{startTime:o.relative,rawRumEvent:l,domainContext:{performanceEntry:t}}}function Ma(t){return{resource:C({duration:_u(t),size:gu(t)},mu(t))}}function Hc(t,e){var r=t.traceSampled&&t.traceId&&t.spanId;if(r)return{_dd:{span_id:t.spanId.toDecimalString(),trace_id:t.traceId.toDecimalString(),rule_psr:Ua(e)}}}function Gc(t,e){var r=t.traceId;if(r)return{_dd:{trace_id:t.traceId,rule_psr:Ua(e)}}}function Ua(t){return jt(t.traceSampleRate)?t.traceSampleRate/100:void 0}function Pa(t,e,r){var n=e.findTrackedSession(r.relative);return{_dd:{discarded:!n||!t.trackResources}}}function Da(t,e,r){if(gt(tt.RESOURCE_PAGE_STATES))return{_dd:{page_states:t.findAll(e.relative,r),page_was_discarded:String(document.wasDiscarded)}}}function Yc(t,e,r){var n,a=(n=t.findAll(e.relative,r))===null||n===void 0?void 0:n.some(function(i){return i.state==="frozen"});return a?void 0:k(r)}function Kc(t,e,r){var n=Ta({lifeCycle:t,isChildEvent:function(o){return o.view.id===e},onChange:r}),a=n.stop,i=n.eventCounts;return{stop:a,eventCounts:i}}var Wc=10*q;function qc(t,e,r){var n=t.subscribe(0,function(a){var i=Xt(a,function(o){return o.entryType===I.PAINT&&o.name==="first-contentful-paint"&&o.startTime<e.timeStamp&&o.startTime<Wc});i&&r(i.startTime)}).unsubscribe;return{stop:n}}function jc(t,e,r,n){var a=t.subscribe(0,function(i){var o=Xt(i,function(c){return c.entryType===I.FIRST_INPUT&&c.startTime<r.timeStamp});if(o){var s=$(o.startTime,o.processingStart),u=void 0;gt(tt.WEB_VITALS_ATTRIBUTION)&&o.target&&ee(o.target)&&(u=be(o.target,e.actionNameAttribute)),n({delay:s>=0?s:0,time:o.startTime,targetSelector:u})}}).unsubscribe;return{stop:a}}function Zc(t,e){var r=t.subscribe(0,function(n){for(var a=0,i=n;a<i.length;a++){var o=i[a];o.entryType===I.NAVIGATION&&e({domComplete:o.domComplete,domContentLoaded:o.domContentLoadedEventEnd,domInteractive:o.domInteractive,loadEvent:o.loadEventEnd,firstByte:o.responseStart>=0&&o.responseStart<=nt()?o.responseStart:void 0})}}).unsubscribe;return{stop:r}}var Xc=10*q;function Jc(t,e,r,n,a){var i=1/0,o=W(e,n,[_.POINTER_DOWN,_.KEY_DOWN],function(u){i=u.timeStamp},{capture:!0,once:!0}).stop,s=t.subscribe(0,function(u){var c=gi(u,function(d){return d.entryType===I.LARGEST_CONTENTFUL_PAINT&&d.startTime<i&&d.startTime<r.timeStamp&&d.startTime<Xc});if(c){var l=void 0;gt(tt.WEB_VITALS_ATTRIBUTION)&&c.element&&(l=be(c.element,e.actionNameAttribute)),a({value:c.startTime,targetSelector:l})}}).unsubscribe;return{stop:function(){o(),s()}}}function $c(t,e){e===void 0&&(e=window);var r,n;return document.visibilityState==="hidden"?r=0:(r=1/0,n=W(t,e,[_.PAGE_HIDE,_.VISIBILITY_CHANGE],function(a){(a.type===_.PAGE_HIDE||document.visibilityState==="hidden")&&(r=a.timeStamp,n())},{capture:!0}).stop),{get timeStamp(){return r},stop:function(){n==null||n()}}}function Qc(t,e,r,n){var a={},i=Zc(t,function(d){r(d.loadEvent),a.navigationTimings=d,n()}).stop,o=$c(e),s=qc(t,o,function(d){a.firstContentfulPaint=d,n()}).stop,u=Jc(t,e,o,window,function(d){a.largestContentfulPaint=d,n()}).stop,c=jc(t,e,o,function(d){a.firstInput=d,n()}).stop;function l(){i(),s(),u(),c(),o.stop()}return{stop:l,initialViewMetrics:a}}function tl(t,e,r){if(!rl())return{stop:N};var n=0;r({value:0});var a=el(),i=e.subscribe(0,function(o){for(var s=0,u=o;s<u.length;s++){var c=u[s];if(c.entryType===I.LAYOUT_SHIFT&&!c.hadRecentInput&&(a.update(c),a.value()>n)){n=a.value();var l=Le(n,4),d=a.largestLayoutShiftTarget(),f=void 0;gt(tt.WEB_VITALS_ATTRIBUTION)&&d&&(f=be(d,t.actionNameAttribute)),r({value:l,targetSelector:f})}}}).unsubscribe;return{stop:i}}function el(){var t=0,e,r,n=0,a,i;return{update:function(o){var s,u,c=e===void 0||o.startTime-r>=K||o.startTime-e>=5*K;c?(e=r=o.startTime,t=o.value,n=0,a=void 0):(t+=o.value,r=o.startTime),o.value>n&&(n=o.value,i=o.startTime,!((s=o.sources)===null||s===void 0)&&s.length?a=(u=Xt(o.sources,function(l){return!!l.node&&ee(l.node)}))===null||u===void 0?void 0:u.node:a=void 0)},value:function(){return t},largestLayoutShiftTarget:function(){return a},largestLayoutShiftTime:function(){return i}}}function rl(){return he(I.LAYOUT_SHIFT)}var ke,Fa=0,or=1/0,sr=0;function nl(){"interactionCount"in performance||ke||(ke=new window.PerformanceObserver(E(function(t){t.getEntries().forEach(function(e){var r=e;r.interactionId&&(or=Math.min(or,r.interactionId),sr=Math.max(sr,r.interactionId),Fa=(sr-or)/7+1)})})),ke.observe({type:"event",buffered:!0,durationThreshold:0}))}var bn=function(){return ke?Fa:window.performance.interactionCount||0},Sn=10,al=1*q;function il(t,e,r,n){if(!ul())return{getInteractionToNextPaint:function(){},setViewEnd:N,stop:N};var a=sl(r),i=a.getViewInteractionCount,o=a.stopViewInteractionCount,s=1/0,u=ol(i),c=-1,l,d=n.subscribe(0,function(f){for(var v=0,p=f;v<p.length;v++){var h=p[v];(h.entryType===I.EVENT||h.entryType===I.FIRST_INPUT)&&h.interactionId&&h.startTime>=e&&h.startTime<=s&&u.process(h)}var m=u.estimateP98Interaction();m&&(c=m.duration,gt(tt.WEB_VITALS_ATTRIBUTION)&&m.target&&ee(m.target)?l=be(m.target,t.actionNameAttribute):l=void 0)}).unsubscribe;return{getInteractionToNextPaint:function(){if(c>=0)return{value:Math.min(c,al),targetSelector:l};if(i())return{value:0}},setViewEnd:function(f){s=f,o()},stop:d}}function ol(t){var e=[];function r(){e.sort(function(n,a){return a.duration-n.duration}).splice(Sn)}return{process:function(n){var a=e.findIndex(function(o){return n.interactionId===o.interactionId}),i=e[e.length-1];a!==-1?n.duration>e[a].duration&&(e[a]=n,r()):(e.length<Sn||n.duration>i.duration)&&(e.push(n),r())},estimateP98Interaction:function(){var n=Math.min(e.length-1,Math.floor(t()/50));return e[n]}}}function sl(t){nl();var e=t==="initial_load"?0:bn(),r={stopped:!1};function n(){return bn()-e}return{getViewInteractionCount:function(){return r.stopped?r.interactionCount:n()},stopViewInteractionCount:function(){r={stopped:!0,interactionCount:n()}}}}function ul(){return he(I.EVENT)&&window.PerformanceEventTiming&&"interactionId"in PerformanceEventTiming.prototype}function cl(t,e,r,n,a,i){var o=n==="initial_load",s=!0,u=[];function c(){!s&&!o&&u.length>0&&i(Math.max.apply(Math,u))}var l=zr(t,e,r,function(d){s&&(s=!1,d.hadActivity&&u.push($(a.timeStamp,d.end)),c())}).stop;return{stop:l,setLoadEvent:function(d){o&&(o=!1,u.push(d),c())}}}function Ba(){var t,e=window.visualViewport;return e?t=e.pageLeft-e.offsetLeft:window.scrollX!==void 0?t=window.scrollX:t=window.pageXOffset||0,Math.round(t)}function Hr(){var t,e=window.visualViewport;return e?t=e.pageTop-e.offsetTop:window.scrollY!==void 0?t=window.scrollY:t=window.pageYOffset||0,Math.round(t)}var ur;function za(t){return ur||(ur=ll(t)),ur}function ll(t){var e=new L(function(){var r=bt(function(){e.notify(Ye())},200).throttled;return P(t,window,_.RESIZE,r,{capture:!0,passive:!0}).stop});return e}function Ye(){var t=window.visualViewport;return t?{width:Number(t.width*t.scale),height:Number(t.height*t.scale)}:{width:Number(window.innerWidth||0),height:Number(window.innerHeight||0)}}var dl=K;function fl(t,e,r,n){n===void 0&&(n=pl(t));var a=0,i=0,o=0,s=n.subscribe(function(u){var c=u.scrollDepth,l=u.scrollTop,d=u.scrollHeight,f=!1;if(c>a&&(a=c,f=!0),d>i){i=d;var v=nt();o=$(e.relative,v),f=!0}f&&r({maxDepth:Math.min(a,i),maxDepthScrollTop:l,maxScrollHeight:i,maxScrollHeightTime:o})});return{stop:function(){return s.unsubscribe()}}}function vl(){var t=Hr(),e=Ye().height,r=Math.round((document.scrollingElement||document.documentElement).scrollHeight),n=Math.round(e+t);return{scrollHeight:r,scrollDepth:n,scrollTop:t}}function pl(t,e){e===void 0&&(e=dl);var r=new L(function(){function n(){r.notify(vl())}if(window.ResizeObserver){var a=bt(n,e,{leading:!1,trailing:!0}),i=document.scrollingElement||document.documentElement,o=new ResizeObserver(E(a.throttled));o.observe(i);var s=P(t,window,_.SCROLL,a.throttled,{passive:!0});return function(){a.cancel(),o.unobserve(i),s.stop()}}});return r}function hl(t,e,r,n,a,i){var o={},s=cl(t,e,r,a,i,function(m){o.loadingTime=m,n()}),u=s.stop,c=s.setLoadEvent,l=fl(r,i,function(m){o.scroll=m}).stop,d=tl(r,t,function(m){o.cumulativeLayoutShift=m,n()}).stop,f=il(r,i.relative,a,t),v=f.stop,p=f.getInteractionToNextPaint,h=f.setViewEnd;return{stop:function(){u(),d(),l()},stopINPTracking:v,setLoadEvent:c,setViewEnd:h,getCommonViewMetrics:function(){return o.interactionToNextPaint=p(),o}}}var _l=3e3,ml=5*q,gl=5*q;function bl(t,e,r,n,a,i,o){var s=new Set,u=l("initial_load",Nn(),o);d();var c;i&&(c=f(a));function l(v,p,h){var m=Sl(e,r,n,t,v,p,h);return s.add(m),m.stopObservable.subscribe(function(){s.delete(m)}),m}function d(){e.subscribe(8,function(){u=l("route_change",void 0,{name:u.name,service:u.service,version:u.version})}),e.subscribe(7,function(){u.end({sessionIsActive:!1})}),e.subscribe(9,function(v){(v.reason===Nt.UNLOADING||v.reason===Nt.PAGEHIDE)&&u.end()})}function f(v){return v.subscribe(function(p){var h=p.oldLocation,m=p.newLocation;El(h,m)&&(u.end(),u=l("route_change"))})}return{addTiming:function(v,p){p===void 0&&(p=F()),u.addTiming(v,p)},startView:function(v,p){u.end({endClocks:p}),u=l("route_change",p,v)},stop:function(){c==null||c.unsubscribe(),u.end(),s.forEach(function(v){return v.stop()})}}}function Sl(t,e,r,n,a,i,o){i===void 0&&(i=J());var s=j(),u=new L,c={},l=0,d,f=pe(n),v=!0,p,h,m;o&&(p=o.name,h=o.service,m=o.version),t.notify(2,{id:s,name:p,startClocks:i,service:h,version:m});var y=bt(ye,_l,{leading:!1}),A=y.throttled,x=y.cancel,R=hl(t,e,r,A,a,i),b=R.setLoadEvent,T=R.setViewEnd,z=R.stop,Z=R.stopINPTracking,Ot=R.getCommonViewMetrics,B=a==="initial_load"?Qc(t,r,b,A):{stop:N,initialViewMetrics:{}},g=B.stop,S=B.initialViewMetrics,D=Kc(t,s,A),U=D.stop,dt=D.eventCounts,G=me(ye,ml);ye();function ye(){x(),l+=1;var yt=d===void 0?F():d.timeStamp;t.notify(3,{customTimings:c,documentVersion:l,id:s,name:p,service:h,version:m,loadingType:a,location:f,startClocks:i,commonViewMetrics:Ot(),initialViewMetrics:S,duration:$(i.timeStamp,yt),isActive:d===void 0,sessionIsActive:v,eventCounts:dt})}return{name:p,service:h,version:m,stopObservable:u,end:function(yt){var re=this,ne,qe;yt===void 0&&(yt={}),!d&&(d=(ne=yt.endClocks)!==null&&ne!==void 0?ne:J(),v=(qe=yt.sessionIsActive)!==null&&qe!==void 0?qe:!0,t.notify(4,{endClocks:d}),Ir(G),T(d.relative),z(),ye(),H(function(){re.stop()},gl))},stop:function(){g(),U(),Z(),u.notify()},addTiming:function(yt,re){if(!d){var ne=hi(re)?re:$(i.timeStamp,re);c[yl(yt)]=ne,A()}}}}function yl(t){var e=t.replace(/[^a-zA-Z0-9-_.@$]/g,"_");return e!==t&&O.warn("Invalid timing name: ".concat(t,", sanitized to: ").concat(e)),e}function El(t,e){return t.pathname!==e.pathname||!wl(e.hash)&&yn(e.hash)!==yn(t.hash)}function wl(t){var e=t.substring(1);return e!==""&&!!document.getElementById(e)}function yn(t){var e=t.indexOf("?");return e<0?t:t.slice(0,e)}function Tl(t,e,r,n,a,i,o,s,u){return t.subscribe(3,function(c){return t.notify(10,Cl(c,e,i,s,o))}),bl(r,t,n,e,a,!e.trackViewsManually,u)}function Cl(t,e,r,n,a){var i,o,s,u,c,l,d,f,v,p,h,m,y,A,x=n.getReplayStats(t.id),R=r.findFeatureFlagEvaluations(t.startClocks.relative),b=a.findAll(t.startClocks.relative,t.duration),T={_dd:{document_version:t.documentVersion,replay_stats:x,page_states:b},date:t.startClocks.timeStamp,type:"view",view:{action:{count:t.eventCounts.actionCount},frustration:{count:t.eventCounts.frustrationCount},cumulative_layout_shift:(i=t.commonViewMetrics.cumulativeLayoutShift)===null||i===void 0?void 0:i.value,cumulative_layout_shift_target_selector:(o=t.commonViewMetrics.cumulativeLayoutShift)===null||o===void 0?void 0:o.targetSelector,first_byte:k((s=t.initialViewMetrics.navigationTimings)===null||s===void 0?void 0:s.firstByte),dom_complete:k((u=t.initialViewMetrics.navigationTimings)===null||u===void 0?void 0:u.domComplete),dom_content_loaded:k((c=t.initialViewMetrics.navigationTimings)===null||c===void 0?void 0:c.domContentLoaded),dom_interactive:k((l=t.initialViewMetrics.navigationTimings)===null||l===void 0?void 0:l.domInteractive),error:{count:t.eventCounts.errorCount},first_contentful_paint:k(t.initialViewMetrics.firstContentfulPaint),first_input_delay:k((d=t.initialViewMetrics.firstInput)===null||d===void 0?void 0:d.delay),first_input_time:k((f=t.initialViewMetrics.firstInput)===null||f===void 0?void 0:f.time),first_input_target_selector:(v=t.initialViewMetrics.firstInput)===null||v===void 0?void 0:v.targetSelector,interaction_to_next_paint:k((p=t.commonViewMetrics.interactionToNextPaint)===null||p===void 0?void 0:p.value),interaction_to_next_paint_target_selector:(h=t.commonViewMetrics.interactionToNextPaint)===null||h===void 0?void 0:h.targetSelector,is_active:t.isActive,name:t.name,largest_contentful_paint:k((m=t.initialViewMetrics.largestContentfulPaint)===null||m===void 0?void 0:m.value),largest_contentful_paint_target_selector:(y=t.initialViewMetrics.largestContentfulPaint)===null||y===void 0?void 0:y.targetSelector,load_event:k((A=t.initialViewMetrics.navigationTimings)===null||A===void 0?void 0:A.loadEvent),loading_time:Il(k(t.commonViewMetrics.loadingTime)),loading_type:t.loadingType,long_task:{count:t.eventCounts.longTaskCount},resource:{count:t.eventCounts.resourceCount},time_spent:k(t.duration)},feature_flags:R&&!ht(R)?R:void 0,display:t.commonViewMetrics.scroll?{scroll:{max_depth:t.commonViewMetrics.scroll.maxDepth,max_depth_scroll_top:t.commonViewMetrics.scroll.maxDepthScrollTop,max_scroll_height:t.commonViewMetrics.scroll.maxScrollHeight,max_scroll_height_time:k(t.commonViewMetrics.scroll.maxScrollHeightTime)}}:void 0,session:{has_replay:x?!0:void 0,is_active:t.sessionIsActive?void 0:!1},privacy:{replay_level:e.defaultPrivacyLevel}};return ht(t.customTimings)||(T.view.custom_timings=Ei(t.customTimings,k)),{rawRumEvent:T,startTime:t.startClocks.relative,domainContext:{location:t.location}}}function Il(t){return jt(t)&&t<0?void 0:t}var Al="rum";function Rl(t,e){var r=cs(t,Al,function(n){return xl(t,n)});return r.expireObservable.subscribe(function(){e.notify(7)}),r.renewObservable.subscribe(function(){e.notify(8)}),{findTrackedSession:function(n){var a=r.findActiveSession(n);if(!(!a||!Va(a.trackingType)))return{id:a.id,sessionReplayAllowed:a.trackingType==="1"}},expire:r.expire,expireObservable:r.expireObservable}}function Ol(){var t={id:"00000000-aaaa-0000-aaaa-000000000000",sessionReplayAllowed:!1};return{findTrackedSession:function(){return t},expire:N,expireObservable:new L}}function xl(t,e){var r;return Nl(e)?r=e:Yt(t.sessionSampleRate)?Yt(t.sessionReplaySampleRate)?r="1":r="2":r="0",{trackingType:r,isTracked:Va(r)}}function Nl(t){return t==="0"||t==="1"||t==="2"}function Va(t){return t==="2"||t==="1"}function kl(t,e,r,n,a,i){var o=t.replica,s=Rs(t,{endpoint:t.rumEndpointBuilder},o&&{endpoint:o.rumEndpointBuilder,transformMessage:function(u){return lt(u,{application:{id:o.applicationId}})}},n,a,i);return e.subscribe(11,function(u){u.type==="view"?s.upsert(u,u.view.id):s.add(u)}),r.subscribe(function(u){return s.add(u,rs(t))}),s}function Ll(t){var e=Mr();t.subscribe(11,function(r){e.send("rum",r)})}var Ml=Jt;function Ul(t,e,r){var n=new te(Ml),a;t.subscribe(4,function(s){var u=s.endClocks;n.closeActive(u.relative)}),t.subscribe(2,function(s){var u=s.startClocks,c=r.href;n.add(o({url:c,referrer:a||document.referrer}),u.relative),a=c});var i=e.subscribe(function(s){var u=s.newLocation,c=n.find();if(c){var l=nt();n.closeActive(l),n.add(o({url:u.href,referrer:c.referrer}),l)}});function o(s){var u=s.url,c=s.referrer;return{url:u,referrer:c}}return{findUrl:function(s){return n.find(s)},stop:function(){i.unsubscribe(),n.stop()}}}function Pl(t,e){var r=pe(e),n=new L(function(){var i=Dl(t,a).stop,o=Fl(t,a).stop;return function(){i(),o()}});function a(){if(r.href!==e.href){var i=pe(e);n.notify({newLocation:i,oldLocation:r}),r=i}}return n}function Dl(t,e){var r=X(history,"pushState",{after:e}).stop,n=X(history,"replaceState",{after:e}).stop,a=P(t,window,_.POP_STATE,e).stop;return{stop:function(){r(),n(),a()}}}function Fl(t,e){return P(t,window,_.HASH_CHANGE,e)}var Bl=Jt,zl=200;function Vl(t,e){if(e===void 0&&(e=ve),!gt(tt.FEATURE_FLAGS))return{findFeatureFlagEvaluations:function(){},getFeatureFlagBytesCount:function(){return 0},addFeatureFlagEvaluation:N,stop:N};var r=new te(Bl),n=0,a=!1;t.subscribe(4,function(u){var c=u.endClocks;r.closeActive(c.relative)}),t.subscribe(2,function(u){var c=u.startClocks;r.add({},c.relative),n=0});var i=bt(function(u){n=e(Pt(u)),a||(a=ua(n,0))},zl),o=i.throttled,s=i.cancel;return{findFeatureFlagEvaluations:function(u){return r.find(u)},getFeatureFlagBytesCount:function(){var u=r.find();return u?n:0},addFeatureFlagEvaluation:function(u,c){var l=r.find();l&&(l[u]=c,o(l))},stop:s}}var Hl=10*K,ft,xt,Sr;function Gl(t,e,r,n,a,i,o){var s=e.enabled&&Yt(t.customerDataTelemetrySampleRate);s&&(Ha(),En(),r.subscribe(11,function(u){Sr=!0,ue(xt.globalContextBytes,ht(n.getContext())?0:n.getBytesCount()),ue(xt.userContextBytes,ht(a.getContext())?0:a.getBytesCount());var c=i.findFeatureFlagEvaluations(),l=_t(["view","error"],u.type)&&c&&!ht(c);ue(xt.featureFlagBytes,l?i.getFeatureFlagBytesCount():0)}),o.subscribe(function(u){var c=u.bytesCount,l=u.messagesCount;Sr&&(ft.batchCount+=1,ue(ft.batchBytesCount,c),ue(ft.batchMessagesCount,l),cr(ft.globalContextBytes,xt.globalContextBytes),cr(ft.userContextBytes,xt.userContextBytes),cr(ft.featureFlagBytes,xt.featureFlagBytes),En())}),me(Yl,Hl))}function Yl(){ft.batchCount!==0&&(Dt("Customer data measures",ft),Ha())}function wt(){return{min:1/0,max:0,sum:0}}function ue(t,e){t.sum+=e,t.min=Math.min(t.min,e),t.max=Math.max(t.max,e)}function cr(t,e){t.sum+=e.sum,t.min=Math.min(t.min,e.min),t.max=Math.max(t.max,e.max)}function Ha(){ft={batchCount:0,batchBytesCount:wt(),batchMessagesCount:wt(),globalContextBytes:wt(),userContextBytes:wt(),featureFlagBytes:wt()}}function En(){Sr=!1,xt={globalContextBytes:wt(),userContextBytes:wt(),featureFlagBytes:wt()}}var Kl=4e3,Wl=500,ql=Jt;function jl(t,e){e===void 0&&(e=Wl);var r=new te(ql,Kl),n;i(Ga(),nt());var a=W(t,window,[_.PAGE_SHOW,_.FOCUS,_.BLUR,_.VISIBILITY_CHANGE,_.RESUME,_.FREEZE,_.PAGE_HIDE],function(o){i(Zl(o),o.timeStamp)},{capture:!0}).stop;function i(o,s){s===void 0&&(s=nt()),o!==n&&(n=o,r.closeActive(s),r.add({state:n,startTime:s},s))}return{findAll:function(o,s){var u=r.findAll(o,s);if(u.length!==0){for(var c=[],l=Math.max(0,u.length-e),d=u.length-1;d>=l;d--){var f=u[d],v=$(o,f.startTime);c.push({state:f.state,start:k(v)})}return c}},isInActivePageStateAt:function(o){var s=r.find(o);return s!==void 0&&s.state==="active"},addPageState:i,stop:function(){a(),r.stop()}}}function Zl(t){return t.type===_.FREEZE?"frozen":t.type===_.PAGE_HIDE?t.persisted?"frozen":"terminated":Ga()}function Ga(){return document.visibilityState==="hidden"?"hidden":document.hasFocus()?"active":"passive"}function Xl(t){var e=Ye(),r=za(t).subscribe(function(n){e=n}).unsubscribe;return{get:function(){return{viewport:e}},stop:r}}function Jl(t,e,r,n,a,i){var o=[],s=new Vu;s.subscribe(11,function(U){return xr("rum",U)});var u=$l(e);u.setContextProvider(function(){var U,dt;return{application:{id:e.applicationId},session:{id:(U=v.findTrackedSession())===null||U===void 0?void 0:U.id},view:{id:(dt=A.findView())===null||dt===void 0?void 0:dt.id},action:{id:b.findActionId()}}});var c=function(U){s.notify(12,{error:U}),Dt("Error reported to customer",{"error.message":U.message})},l=Vl(s),d=Cs(e),f=d.subscribe(function(U){s.notify(9,U)});o.push(function(){return f.unsubscribe()});var v=qt()?Ol():Rl(e,s);if(qt())Ll(s);else{var p=kl(e,s,u.observable,c,d,v.expireObservable);o.push(function(){return p.stop()}),Gl(e,u,s,n,a,l,p.flushObservable)}var h=fu(),m=Pl(e,location),y=Ql(s,e,location,v,m,h,function(){return gr(n,a,r)},c),A=y.viewContexts,x=y.pageStateHistory,R=y.urlContexts,b=y.actionContexts,T=y.addAction,z=y.stop;o.push(z),ns(lu(t)),Pc(s,e,v),Bc(s,e,v,x);var Z=Tl(s,e,location,h,m,l,x,r,i),Ot=Z.addTiming,B=Z.startView,g=Z.stop;o.push(g);var S=Lc(s,e,x,l).addError;Yu(s,e,v),Iu(s,e);var D=zu(e.applicationId,v,A,b,R);return{addAction:T,addError:S,addTiming:Ot,addFeatureFlagEvaluation:l.addFeatureFlagEvaluation,startView:B,lifeCycle:s,viewContexts:A,session:v,stopSession:function(){return v.expire()},getInternalContext:D.get,stop:function(){o.forEach(function(U){return U()})}}}function $l(t){var e=ts("browser-rum-sdk",t);if(qt()){var r=Mr();e.observable.subscribe(function(n){return r.send("internal_telemetry",n)})}return e}function Ql(t,e,r,n,a,i,o,s){var u=Gu(t),c=Ul(t,a,r),l=jl(e),d=xc(t,i,e,l),f=d.addAction,v=d.actionContexts,p=Xl(e);return Du(e,t,n,u,c,v,p,o,s),{viewContexts:u,pageStateHistory:l,urlContexts:c,addAction:f,actionContexts:v,stop:function(){p.stop(),l.stop(),c.stop(),u.stop(),l.stop()}}}function td(t,e){var r=e.session,n=e.viewContext,a=e.errorType,i=r?r.id:"no-session-id",o=[];a!==void 0&&o.push("error-type=".concat(a)),n&&(o.push("seed=".concat(n.id)),o.push("from=".concat(n.startClocks.timeStamp)));var s=ed(t),u="/rum/replay/sessions/".concat(i);return"".concat(s).concat(u,"?").concat(o.join("&"))}function ed(t){var e=t.site,r=t.subdomain||rd(t);return"https://".concat(r?"".concat(r,"."):"").concat(e)}function rd(t){switch(t.site){case Gt:case io:return"app";case Yn:return"dd";default:return}}var it={FullSnapshot:2,IncrementalSnapshot:3,Meta:4,Focus:6,ViewEnd:7,VisualViewport:8,FrustrationRecord:9},Mt={Document:0,DocumentType:1,Element:2,Text:3,CDATA:4,DocumentFragment:11},vt={Mutation:0,MouseMove:1,MouseInteraction:2,Scroll:3,ViewportResize:4,Input:5,TouchMove:6,MediaInteraction:7,StyleSheetRule:8},rt={MouseUp:0,MouseDown:1,Click:2,ContextMenu:3,DblClick:4,Focus:5,Blur:6,TouchStart:7,TouchEnd:9},wn={Play:0,Pause:1};function Et(t,e){return{data:C({source:t},e),type:it.IncrementalSnapshot,timestamp:F()}}var w={IGNORE:"ignore",HIDDEN:"hidden",ALLOW:fe.ALLOW,MASK:fe.MASK,MASK_USER_INPUT:fe.MASK_USER_INPUT},Gr="data-dd-privacy",nd="allow",ad="mask",id="mask-user-input",Ya="hidden",od="dd-privacy-allow",sd="dd-privacy-mask",ud="dd-privacy-mask-user-input",cd="dd-privacy-hidden",kt="***",ld="data:image/gif;base64,R0lGODlhAQABAIAAAMLCwgAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==",dd={INPUT:!0,OUTPUT:!0,TEXTAREA:!0,SELECT:!0,OPTION:!0,DATALIST:!0,OPTGROUP:!0},fd=1e5,vd="x";function St(t,e){var r=Ge(t),n=r?St(r,e):e,a=Wa(t);return Ka(a,n)}function Ka(t,e){switch(e){case w.HIDDEN:case w.IGNORE:return e}switch(t){case w.ALLOW:case w.MASK:case w.MASK_USER_INPUT:case w.HIDDEN:case w.IGNORE:return t;default:return e}}function Wa(t){if(ee(t)){var e=t.getAttribute(Gr);if(t.tagName==="BASE")return w.ALLOW;if(t.tagName==="INPUT"){var r=t;if(r.type==="password"||r.type==="email"||r.type==="tel"||r.type==="hidden")return w.MASK;var n=r.getAttribute("autocomplete");if(n&&n.indexOf("cc-")===0)return w.MASK}if(e===Ya||t.classList.contains(cd))return w.HIDDEN;if(e===ad||t.classList.contains(sd))return w.MASK;if(e===id||t.classList.contains(ud))return w.MASK_USER_INPUT;if(e===nd||t.classList.contains(od))return w.ALLOW;if(hd(t))return w.IGNORE}}function Ke(t,e){switch(e){case w.MASK:case w.HIDDEN:case w.IGNORE:return!0;case w.MASK_USER_INPUT:return ma(t)?Tn(t.parentNode):Tn(t);default:return!1}}function Tn(t){if(!t||t.nodeType!==t.ELEMENT_NODE)return!1;var e=t;if(e.tagName==="INPUT")switch(e.type){case"button":case"color":case"reset":case"submit":return!1}return!!dd[e.tagName]}var pd=function(t){return t.replace(/\S/g,vd)};function qa(t,e,r){var n,a=(n=t.parentElement)===null||n===void 0?void 0:n.tagName,i=t.textContent||"";if(!(e&&!i.trim())){var o=r,s=a==="SCRIPT";if(s)i=kt;else if(o===w.HIDDEN)i=kt;else if(Ke(t,o))if(a==="DATALIST"||a==="SELECT"||a==="OPTGROUP"){if(!i.trim())return}else a==="OPTION"?i=kt:i=pd(i);return i}}function hd(t){if(t.nodeName==="SCRIPT")return!0;if(t.nodeName==="LINK"){var e=a("rel");return/preload|prefetch/i.test(e)&&a("as")==="script"||e==="shortcut icon"||e==="icon"}if(t.nodeName==="META"){var r=a("name"),e=a("rel"),n=a("property");return/^msapplication-tile(image|color)$/.test(r)||r==="application-name"||e==="icon"||e==="apple-touch-icon"||e==="shortcut icon"||r==="keywords"||r==="description"||/^(og|twitter|fb):/.test(n)||/^(og|twitter):/.test(r)||r==="pinterest"||r==="robots"||r==="googlebot"||r==="bingbot"||t.hasAttribute("http-equiv")||r==="author"||r==="generator"||r==="framework"||r==="publisher"||r==="progid"||/^article:/.test(n)||/^product:/.test(n)||r==="google-site-verification"||r==="yandex-verification"||r==="csrf-token"||r==="p:domain_verify"||r==="verify-v1"||r==="verification"||r==="shopify-checkout-api-token"}function a(i){return(t.getAttribute(i)||"").toLowerCase()}return!1}var Yr=new WeakMap;function ct(t){return Yr.has(t)}function _d(t){for(var e=t;e;){if(!ct(e)&&!Br(e))return!1;e=Ge(e)}return!0}function Y(t){return Yr.get(t)}function md(t,e){Yr.set(t,e)}function Kr(t,e){var r=t.tagName,n=t.value;if(Ke(t,e)){var a=t.type;return r==="INPUT"&&(a==="button"||a==="submit"||a==="reset")?n:!n||r==="OPTION"?void 0:kt}if(r==="OPTION"||r==="SELECT")return t.value;if(!(r!=="INPUT"&&r!=="TEXTAREA"))return n}var gd=/url\((?:(')([^']*)'|(")([^"]*)"|([^)]*))\)/gm,bd=/^[A-Za-z]+:|^\/\//,Sd=/^data:.*,/i;function yd(t,e){return t.replace(gd,function(r,n,a,i,o,s){var u=a||o||s;if(!e||!u||bd.test(u)||Sd.test(u))return r;var c=n||i||"";return"url(".concat(c).concat(Ed(u,e)).concat(c,")")})}function Ed(t,e){try{return Ve(t,e).href}catch{return t}}var wd=/[^a-z1-6-_]/;function ja(t){var e=t.toLowerCase().trim();return wd.test(e)?"div":e}function Za(t){if(!(t===void 0||t.length===0))return t.map(function(e){var r=e.cssRules||e.rules,n=Array.from(r,function(i){return i.cssText}),a={cssRules:n,disabled:e.disabled||void 0,media:e.media.length>0?Array.from(e.media):void 0};return a})}function Xa(t,e,r,n){if(e===w.HIDDEN)return null;var a=t.getAttribute(r);if(e===w.MASK&&r!==Gr&&!Ra.includes(r)&&r!==n.actionNameAttribute){var i=t.tagName;switch(r){case"title":case"alt":case"placeholder":return kt}if((i==="IMG"||i==="SOURCE")&&(r==="src"||r==="srcset"))return ld;if(i==="A"&&r==="href"||a&&Be(r,"data-"))return kt}return!a||typeof a!="string"?a:a.length>fd&&a.slice(0,5)==="data:"?"data:truncated":a}function Td(t,e,r){var n;if(e===w.HIDDEN)return{};for(var a={},i=ja(t.tagName),o=t.ownerDocument,s=0;s<t.attributes.length;s+=1){var u=t.attributes.item(s),c=u.name,l=Xa(t,e,c,r.configuration);l!==null&&(a[c]=l)}if(t.value&&(i==="textarea"||i==="select"||i==="option"||i==="input")){var d=Kr(t,e);d!==void 0&&(a.value=d)}if(i==="option"&&e===w.ALLOW){var f=t;f.selected&&(a.selected=f.selected)}if(i==="link"){var v=Array.from(o.styleSheets).find(function(R){return R.href===t.href}),p=yr(v);p&&v&&!gt(tt.DISABLE_REPLAY_INLINE_CSS)&&(a._cssText=p)}if(i==="style"&&t.sheet){var p=yr(t.sheet);p&&(a._cssText=p)}var h=t;if(i==="input"&&(h.type==="radio"||h.type==="checkbox")&&(e===w.ALLOW?a.checked=!!h.checked:Ke(h,e)&&delete a.checked),i==="audio"||i==="video"){var m=t;a.rr_mediaState=m.paused?"paused":"played"}var y,A,x=r.serializationContext;switch(x.status){case 0:y=Math.round(t.scrollTop),A=Math.round(t.scrollLeft),(y||A)&&x.elementsScrollPositions.set(t,{scrollTop:y,scrollLeft:A});break;case 1:x.elementsScrollPositions.has(t)&&(n=x.elementsScrollPositions.get(t),y=n.scrollTop,A=n.scrollLeft);break}return A&&(a.rr_scrollLeft=A),y&&(a.rr_scrollTop=y),a}function yr(t){if(!t)return null;var e;try{e=t.rules||t.cssRules}catch{}if(!e)return null;var r=Array.from(e,Ri()?Cd:Ja).join("");return yd(r,t.href)}function Cd(t){if(Ad(t)&&t.selectorText.includes(":")){var e=/(\[[\w-]+[^\\])(:[^\]]+\])/g;return t.cssText.replace(e,"$1\\$2")}return Ja(t)}function Ja(t){return Id(t)&&yr(t.styleSheet)||t.cssText}function Id(t){return"styleSheet"in t}function Ad(t){return"selectorText"in t}function Wr(t,e){var r=xd(t,e);if(!r)return null;var n=Y(t)||Od(),a=r;return a.id=n,md(t,n),e.serializedNodeIds&&e.serializedNodeIds.add(n),a}var Rd=1;function Od(){return Rd++}function qr(t,e){var r=[];return ga(t,function(n){var a=Wr(n,e);a&&r.push(a)}),r}function xd(t,e){switch(t.nodeType){case t.DOCUMENT_NODE:return Nd(t,e);case t.DOCUMENT_FRAGMENT_NODE:return kd(t,e);case t.DOCUMENT_TYPE_NODE:return Ld(t);case t.ELEMENT_NODE:return Md(t,e);case t.TEXT_NODE:return Pd(t,e);case t.CDATA_SECTION_NODE:return Dd()}}function Nd(t,e){return{type:Mt.Document,childNodes:qr(t,e),adoptedStyleSheets:Za(t.adoptedStyleSheets)}}function kd(t,e){var r=Br(t);return r&&e.serializationContext.shadowRootsController.addShadowRoot(t),{type:Mt.DocumentFragment,childNodes:qr(t,e),isShadowRoot:r,adoptedStyleSheets:r?Za(t.adoptedStyleSheets):void 0}}function Ld(t){return{type:Mt.DocumentType,name:t.name,publicId:t.publicId,systemId:t.systemId}}function Md(t,e){var r,n=ja(t.tagName),a=Ud(t)||void 0,i=Ka(Wa(t),e.parentNodePrivacyLevel);if(i===w.HIDDEN){var o=t.getBoundingClientRect(),s=o.width,u=o.height;return{type:Mt.Element,tagName:n,attributes:(r={rr_width:"".concat(s,"px"),rr_height:"".concat(u,"px")},r[Gr]=Ya,r),childNodes:[],isSVG:a}}if(i!==w.IGNORE){var c=Td(t,i,e),l=[];if(Su(t)&&n!=="style"){var d=void 0;e.parentNodePrivacyLevel===i&&e.ignoreWhiteSpace===(n==="head")?d=e:d=C({},e,{parentNodePrivacyLevel:i,ignoreWhiteSpace:n==="head"}),l=qr(t,d)}return{type:Mt.Element,tagName:n,attributes:c,childNodes:l,isSVG:a}}}function Ud(t){return t.tagName==="svg"||t instanceof SVGElement}function Pd(t,e){var r=qa(t,e.ignoreWhiteSpace||!1,e.parentNodePrivacyLevel);if(r!==void 0)return{type:Mt.Text,textContent:r}}function Dd(){return{type:Mt.CDATA,textContent:""}}function Fd(t,e,r){return Wr(t,{serializationContext:r,parentNodePrivacyLevel:e.defaultPrivacyLevel,configuration:e})}function $a(t){return!!t.changedTouches}function Se(t){return t.composed===!0&&He(t.target)?t.composedPath()[0]:t.target}var Cn=25;function Bd(t){return Math.abs(t.pageTop-t.offsetTop-window.scrollY)>Cn||Math.abs(t.pageLeft-t.offsetLeft-window.scrollX)>Cn}var zd=function(t,e){var r=window.visualViewport,n={layoutViewportX:t,layoutViewportY:e,visualViewportX:t,visualViewportY:e};if(r)Bd(r)?(n.layoutViewportX=Math.round(t+r.offsetLeft),n.layoutViewportY=Math.round(e+r.offsetTop)):(n.visualViewportX=Math.round(t-r.offsetLeft),n.visualViewportY=Math.round(e-r.offsetTop));else return n;return n},Qa=function(t){return{scale:t.scale,offsetLeft:t.offsetLeft,offsetTop:t.offsetTop,pageLeft:t.pageLeft,pageTop:t.pageTop,height:t.height,width:t.width}},Vd=50;function Hd(t,e){var r=bt(function(n){var a=Se(n);if(ct(a)){var i=ti(n);if(!i)return;var o={id:Y(a),timeOffset:0,x:i.x,y:i.y};e([o],$a(n)?vt.TouchMove:vt.MouseMove)}},Vd,{trailing:!1}).throttled;return W(t,document,[_.MOUSE_MOVE,_.TOUCH_MOVE],r,{capture:!0,passive:!0}).stop}function ti(t){var e=$a(t)?t.changedTouches[0]:t,r=e.clientX,n=e.clientY;if(window.visualViewport){var a=zd(r,n),i=a.visualViewportX,o=a.visualViewportY;r=i,n=o}if(!Number.isFinite(r)||!Number.isFinite(n)){t.isTrusted&&Dt("mouse/touch event without x/y");return}return{x:r,y:n}}var Gd=100;function Yd(t,e,r,n){var a=bt(function(i){var o=Se(i);if(!(!o||St(o,r)===w.HIDDEN||!ct(o))){var s=Y(o),u=o===document?{scrollTop:Hr(),scrollLeft:Ba()}:{scrollTop:Math.round(o.scrollTop),scrollLeft:Math.round(o.scrollLeft)};n.set(o,u),e({id:s,x:u.scrollLeft,y:u.scrollTop})}},Gd).throttled;return P(t,document,_.SCROLL,a,{capture:!0,passive:!0}).stop}var et,In=(et={},et[_.POINTER_UP]=rt.MouseUp,et[_.MOUSE_DOWN]=rt.MouseDown,et[_.CLICK]=rt.Click,et[_.CONTEXT_MENU]=rt.ContextMenu,et[_.DBL_CLICK]=rt.DblClick,et[_.FOCUS]=rt.Focus,et[_.BLUR]=rt.Blur,et[_.TOUCH_START]=rt.TouchStart,et[_.TOUCH_END]=rt.TouchEnd,et);function Kd(t,e,r){var n=function(a){var i=Se(a);if(!(St(i,t.defaultPrivacyLevel)===w.HIDDEN||!ct(i))){var o=Y(i),s=In[a.type],u;if(s!==rt.Blur&&s!==rt.Focus){var c=ti(a);if(!c)return;u={id:o,type:s,x:c.x,y:c.y}}else u={id:o,type:s};var l=C({id:r.getIdForEvent(a)},Et(vt.MouseInteraction,u));e(l)}};return W(t,document,Object.keys(In),n,{capture:!0,passive:!0}).stop}function ei(t,e,r){r===void 0&&(r=document);var n=t.defaultPrivacyLevel,a=new WeakMap,i=r!==document,o=W(t,r,i?[_.CHANGE]:[_.INPUT,_.CHANGE],function(d){var f=Se(d);(f instanceof HTMLInputElement||f instanceof HTMLTextAreaElement||f instanceof HTMLSelectElement)&&c(f)},{capture:!0,passive:!0}).stop,s;if(i)s=N;else{var u=[ie(HTMLInputElement.prototype,"value",c),ie(HTMLInputElement.prototype,"checked",c),ie(HTMLSelectElement.prototype,"value",c),ie(HTMLTextAreaElement.prototype,"value",c),ie(HTMLSelectElement.prototype,"selectedIndex",c)];s=function(){u.forEach(function(d){return d.stop()})}}return function(){s(),o()};function c(d){var f=St(d,n);if(f!==w.HIDDEN){var v=d.type,p;if(v==="radio"||v==="checkbox"){if(Ke(d,f))return;p={isChecked:d.checked}}else{var h=Kr(d,f);if(h===void 0)return;p={text:h}}l(d,p);var m=d.name;v==="radio"&&m&&d.checked&&bi(document.querySelectorAll('input[type="radio"][name="'.concat(mt(m),'"]')),function(y){y!==d&&l(y,{isChecked:!1})})}}function l(d,f){if(ct(d)){var v=a.get(d);(!v||v.text!==f.text||v.isChecked!==f.isChecked)&&(a.set(d,f),e(C({id:Y(d)},f)))}}}function Wd(t){function e(a,i){a&&ct(a.ownerNode)&&i(Y(a.ownerNode))}var r=[X(CSSStyleSheet.prototype,"insertRule",{before:function(a,i){e(this,function(o){return t({id:o,adds:[{rule:a,index:i}]})})}}),X(CSSStyleSheet.prototype,"deleteRule",{before:function(a){e(this,function(i){return t({id:i,removes:[{index:a}]})})}})];typeof CSSGroupingRule<"u"?n(CSSGroupingRule):(n(CSSMediaRule),n(CSSSupportsRule));function n(a){r.push(X(a.prototype,"insertRule",{before:function(i,o){var s=this;e(this.parentStyleSheet,function(u){var c=An(s);c&&(c.push(o||0),t({id:u,adds:[{rule:i,index:c}]}))})}}),X(a.prototype,"deleteRule",{before:function(i){var o=this;e(this.parentStyleSheet,function(s){var u=An(o);u&&(u.push(i),t({id:s,removes:[{index:u}]}))})}}))}return function(){return r.forEach(function(a){return a.stop()})}}function An(t){for(var e=[],r=t;r.parentRule;){var n=Array.from(r.parentRule.cssRules),a=n.indexOf(r);e.unshift(a),r=r.parentRule}if(r.parentStyleSheet){var i=Array.from(r.parentStyleSheet.cssRules),o=i.indexOf(r);return e.unshift(o),e}}function qd(t,e,r){return W(t,document,[_.PLAY,_.PAUSE],function(n){var a=Se(n);!a||St(a,r)===w.HIDDEN||!ct(a)||e({id:Y(a),type:n.type===_.PLAY?wn.Play:wn.Pause})},{capture:!0,passive:!0}).stop}function jd(t,e,r){return t.subscribe(10,function(n){var a,i,o;n.rawRumEvent.type==="action"&&n.rawRumEvent.action.type==="click"&&(!((i=(a=n.rawRumEvent.action.frustration)===null||a===void 0?void 0:a.type)===null||i===void 0)&&i.length)&&"events"in n.domainContext&&(!((o=n.domainContext.events)===null||o===void 0)&&o.length)&&e({timestamp:n.rawRumEvent.date,type:it.FrustrationRecord,data:{frustrationTypes:n.rawRumEvent.action.frustration.type,recordIds:n.domainContext.events.map(function(s){return r.getIdForEvent(s)})}})}).unsubscribe}var Zd=200;function Xd(t,e){return za(t).subscribe(e).unsubscribe}function Jd(t,e){var r=window.visualViewport;if(!r)return N;var n=bt(function(){e(Qa(r))},Zd,{trailing:!1}),a=n.throttled,i=n.cancel,o=W(t,r,[_.RESIZE,_.SCROLL],a,{capture:!0,passive:!0}).stop;return function(){o(),i()}}var $d=100;function Qd(t){var e=N,r=[];function n(){e(),t(r),r=[]}return{addMutations:function(a){r.length===0&&(e=tf(n,{timeout:$d})),r.push.apply(r,a)},flush:n,stop:function(){e()}}}function tf(t,e){if(window.requestIdleCallback&&window.cancelIdleCallback){var r=window.requestIdleCallback(E(t),e);return function(){return window.cancelIdleCallback(r)}}var n=window.requestAnimationFrame(E(t));return function(){return window.cancelAnimationFrame(n)}}function ri(t,e,r,n){var a=va();if(!a)return{stop:N,flush:N};var i=Qd(function(s){ef(s.concat(o.takeRecords()),t,e,r)}),o=new a(E(i.addMutations));return o.observe(n,{attributeOldValue:!0,attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),{stop:function(){o.disconnect(),i.stop()},flush:function(){i.flush()}}}function ef(t,e,r,n){t.filter(function(d){return d.type==="childList"}).forEach(function(d){d.removedNodes.forEach(function(f){ni(f,n.removeShadowRoot)})});var a=t.filter(function(d){return d.target.isConnected&&_d(d.target)&&St(d.target,r.defaultPrivacyLevel)!==w.HIDDEN}),i=rf(a.filter(function(d){return d.type==="childList"}),r,n),o=i.adds,s=i.removes,u=i.hasBeenSerialized,c=nf(a.filter(function(d){return d.type==="characterData"&&!u(d.target)}),r),l=af(a.filter(function(d){return d.type==="attributes"&&!u(d.target)}),r);!c.length&&!l.length&&!s.length&&!o.length||e({adds:o,removes:s,texts:c,attributes:l})}function rf(t,e,r){for(var n=new Set,a=new Map,i=function(b){b.addedNodes.forEach(function(T){n.add(T)}),b.removedNodes.forEach(function(T){n.has(T)||a.set(T,b.target),n.delete(T)})},o=0,s=t;o<s.length;o++){var u=s[o];i(u)}var c=Array.from(n);of(c);for(var l=new Set,d=[],f=0,v=c;f<v.length;f++){var p=v[f];if(!x(p)){var h=St(p.parentNode,e.defaultPrivacyLevel);if(!(h===w.HIDDEN||h===w.IGNORE)){var m=Wr(p,{serializedNodeIds:l,parentNodePrivacyLevel:h,serializationContext:{status:2,shadowRootsController:r},configuration:e});if(m){var y=Ge(p);d.push({nextId:R(p),parentId:Y(y),node:m})}}}}var A=[];return a.forEach(function(b,T){ct(T)&&A.push({parentId:Y(b),id:Y(T)})}),{adds:d,removes:A,hasBeenSerialized:x};function x(b){return ct(b)&&l.has(Y(b))}function R(b){for(var T=b.nextSibling;T;){if(ct(T))return Y(T);T=T.nextSibling}return null}}function nf(t,e){for(var r,n=[],a=new Set,i=t.filter(function(d){return a.has(d.target)?!1:(a.add(d.target),!0)}),o=0,s=i;o<s.length;o++){var u=s[o],c=u.target.textContent;if(c!==u.oldValue){var l=St(Ge(u.target),e.defaultPrivacyLevel);l===w.HIDDEN||l===w.IGNORE||n.push({id:Y(u.target),value:(r=qa(u.target,!1,l))!==null&&r!==void 0?r:null})}}return n}function af(t,e){for(var r=[],n=new Map,a=t.filter(function(h){var m=n.get(h.target);return m!=null&&m.has(h.attributeName)?!1:(m?m.add(h.attributeName):n.set(h.target,new Set([h.attributeName])),!0)}),i=new Map,o=0,s=a;o<s.length;o++){var u=s[o],c=u.target.getAttribute(u.attributeName);if(c!==u.oldValue){var l=St(u.target,e.defaultPrivacyLevel),d=Xa(u.target,l,u.attributeName,e),f=void 0;if(u.attributeName==="value"){var v=Kr(u.target,l);if(v===void 0)continue;f=v}else typeof d=="string"?f=d:f=null;var p=i.get(u.target);p||(p={id:Y(u.target),attributes:{}},r.push(p),i.set(u.target,p)),p.attributes[u.attributeName]=f}}return r}function of(t){t.sort(function(e,r){var n=e.compareDocumentPosition(r);return n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_CONTAINS||n&Node.DOCUMENT_POSITION_FOLLOWING?1:n&Node.DOCUMENT_POSITION_PRECEDING?-1:0})}function ni(t,e){He(t)&&e(t.shadowRoot),ga(t,function(r){return ni(r,e)})}function sf(t,e){return W(t,window,[_.FOCUS,_.BLUR],function(){e({has_focus:document.hasFocus()})}).stop}function uf(){var t=new WeakMap,e=1;return{getIdForEvent:function(r){return t.has(r)||t.set(r,e++),t.get(r)}}}function cf(t,e){var r=uf(),n=ri(e.mutationCb,e.configuration,e.shadowRootsController,document),a=Hd(t,e.mousemoveCb),i=Kd(t,e.mouseInteractionCb,r),o=Yd(t,e.scrollCb,e.configuration.defaultPrivacyLevel,e.elementsScrollPositions),s=Xd(t,e.viewportResizeCb),u=ei(t,e.inputCb),c=qd(t,e.mediaInteractionCb,e.configuration.defaultPrivacyLevel),l=Wd(e.styleSheetCb),d=sf(t,e.focusCb),f=Jd(t,e.visualViewportResizeCb),v=jd(e.lifeCycle,e.frustrationCb,r);return{flush:function(){n.flush()},stop:function(){n.stop(),a(),i(),o(),s(),u(),c(),l(),d(),f(),v()}}}function lf(){var t=new WeakMap;return{set:function(e,r){e===document&&!document.scrollingElement||t.set(e===document?document.scrollingElement:e,r)},get:function(e){return t.get(e)},has:function(e){return t.has(e)}}}var df=function(t,e){var r=e.mutationCb,n=e.inputCb,a=new Map,i={addShadowRoot:function(o){var s=ri(r,t,i,o),u=s.stop,c=s.flush,l=ei(t,n,o);a.set(o,{flush:c,stop:function(){u(),l()}})},removeShadowRoot:function(o){var s=a.get(o);s&&(s.stop(),a.delete(o))},stop:function(){a.forEach(function(o){var s=o.stop;return s()})},flush:function(){a.forEach(function(o){var s=o.flush;return s()})}};return i};function ff(t){var e=t.emit,r=t.configuration;if(!e)throw new Error("emit function is required");var n=lf(),a=function(f){e(Et(vt.Mutation,f))},i=function(f){return e(Et(vt.Input,f))},o=df(r,{mutationCb:a,inputCb:i}),s=function(f,v){f===void 0&&(f=F()),v===void 0&&(v={status:0,elementsScrollPositions:n,shadowRootsController:o});var p=Ye(),h=p.width,m=p.height;e({data:{height:m,href:window.location.href,width:h},type:it.Meta,timestamp:f}),e({data:{has_focus:document.hasFocus()},type:it.Focus,timestamp:f}),e({data:{node:Fd(document,r,v),initialOffset:{left:Ba(),top:Hr()}},type:it.FullSnapshot,timestamp:f}),window.visualViewport&&e({data:Qa(window.visualViewport),type:it.VisualViewport,timestamp:f})};s();var u=cf(r,{lifeCycle:t.lifeCycle,configuration:r,elementsScrollPositions:n,inputCb:i,mediaInteractionCb:function(f){return e(Et(vt.MediaInteraction,f))},mouseInteractionCb:function(f){return e(f)},mousemoveCb:function(f,v){return e(Et(v,{positions:f}))},mutationCb:a,scrollCb:function(f){return e(Et(vt.Scroll,f))},styleSheetCb:function(f){return e(Et(vt.StyleSheetRule,f))},viewportResizeCb:function(f){return e(Et(vt.ViewportResize,f))},frustrationCb:function(f){return e(f)},focusCb:function(f){return e({data:f,type:it.Focus,timestamp:F()})},visualViewportResizeCb:function(f){e({data:f,type:it.VisualViewport,timestamp:F()})},shadowRootsController:o}),c=u.stop,l=u.flush;function d(){o.flush(),l()}return{stop:function(){o.stop(),c()},takeSubsequentFullSnapshot:function(f){d(),s(f,{shadowRootsController:o,status:1,elementsScrollPositions:n})},flushMutations:d,shadowRootsController:o}}function vf(t,e,r){var n=new FormData;n.append("segment",new Blob([t],{type:"application/octet-stream"}),"".concat(e.session.id,"-").concat(e.start));var a=C({raw_segment_size:r,compressed_segment_size:t.byteLength},e),i=JSON.stringify(a);return n.append("event",new Blob([i],{type:"application/json"})),{data:n,bytesCount:t.byteLength}}var pf=10,V;function hf(t){return We(t).segments_count}function _f(t){We(t).segments_count+=1}function mf(t){We(t).records_count+=1}function gf(t,e){We(t).segments_total_raw_size+=e}function bf(t){return V==null?void 0:V.get(t)}function We(t){V||(V=new Map);var e;return V.has(t)?e=V.get(t):(e={records_count:0,segments_count:0,segments_total_raw_size:0},V.set(t,e),V.size>pf&&Sf()),e}function Sf(){if(V)if(V.keys)V.delete(V.keys().next().value);else{var t=!0;V.forEach(function(e,r){t&&(V.delete(r),t=!1)})}}var yf=function(){function t(e,r,n){this.encoder=e;var a=r.view.id;this.metadata=C({start:1/0,end:-1/0,creation_reason:n,records_count:0,has_full_snapshot:!1,index_in_view:hf(a),source:"browser"},r),_f(a)}return t.prototype.addRecord=function(e,r){var n;this.metadata.start=Math.min(this.metadata.start,e.timestamp),this.metadata.end=Math.max(this.metadata.end,e.timestamp),this.metadata.records_count+=1,(n=this.metadata).has_full_snapshot||(n.has_full_snapshot=e.type===it.FullSnapshot),xr("record",{record:e,segment:this.metadata}),mf(this.metadata.view.id);var a=this.metadata.records_count===1?'{"records":[':",";this.encoder.write(a+JSON.stringify(e),r)},t.prototype.flush=function(e){var r=this;if(this.metadata.records_count===0)throw new Error("Empty segment flushed");this.encoder.write("],".concat(JSON.stringify(this.metadata).slice(1),`
5
- `),function(){gf(r.metadata.view.id,r.encoder.rawBytesCount),e(r.metadata)}),this.encoder.reset()},t}(),Ef=30*K,ai=6e4;function wf(t,e,r,n,a,i){return Tf(t,function(){return Cf(e.applicationId,r,n)},a,i)}function Tf(t,e,r,n){var a={status:0,nextSegmentCreationReason:"init"},i=t.subscribe(2,function(){s("view_change")}).unsubscribe,o=t.subscribe(9,function(u){s(u.reason)}).unsubscribe;function s(u){a.status===1&&(a.segment.flush(function(c){var l=vf(n.encodedBytes,c,n.rawBytesCount);sa(u)?r.sendOnExit(l):r.send(l)}),ot(a.expirationTimeoutId)),u!=="stop"?a={status:0,nextSegmentCreationReason:u}:a={status:2}}return{addRecord:function(u){if(a.status!==2){if(a.status===0){var c=e();if(!c)return;a={status:1,segment:new yf(n,c,a.nextSegmentCreationReason),expirationTimeoutId:H(function(){s("segment_duration_limit")},Ef)}}var l=a.segment;l.addRecord(u,function(){a.status===1&&a.segment===l&&n.encodedBytesCount>ai&&s("segment_bytes_limit")})}},stop:function(){s("stop"),i(),o()}}}function Cf(t,e,r){var n=e.findTrackedSession(),a=r.findView();if(!(!n||!a))return{application:{id:t},session:{id:n.id},view:{id:a.id}}}function If(t,e,r,n,a,i){var o=function(y){t.notify(12,{error:y}),Dt("Error reported to customer",{"error.message":y.message})},s=i||oa(e,e.sessionReplayEndpointBuilder,ai,o),u=wf(t,e,r,n,s,a),c=u.addRecord,l=u.stop,d=ff({emit:c,configuration:e,lifeCycle:t}),f=d.stop,v=d.takeSubsequentFullSnapshot,p=d.flushMutations,h=t.subscribe(4,function(){p(),c({timestamp:F(),type:it.ViewEnd})}).unsubscribe,m=t.subscribe(2,function(y){v(y.startClocks.timeStamp)}).unsubscribe;return{stop:function(){h(),m(),f(),l()}}}function ii(){return typeof Array.from=="function"&&typeof CSSSupportsRule=="function"&&typeof URL.createObjectURL=="function"&&"forEach"in NodeList.prototype}function Af(t,e,r,n){var a=e.findTrackedSession(),i=Rf(a,n),o=r.findView();return td(t,{viewContext:o,errorType:i,session:a})}function Rf(t,e){if(!ii())return"browser-not-supported";if(!t)return"rum-not-tracked";if(!t.sessionReplayAllowed)return"incorrect-session-plan";if(!e)return"replay-not-started"}function Of(t,e,r){var n=0,a=[],i,o=0,s=[],u=P(t,e,"message",function(c){var l=c.data;if(!(l.type!=="wrote"||l.streamId!==r)){var d=s.shift();d&&d.id===l.id?(l.id===0?(n=l.additionalBytesCount,a=[l.result]):(n+=l.additionalBytesCount,a.push(l.result)),i=l.trailer,d.callback()):(u(),Dt("Worker responses received out of order."))}}).stop;return{get encodedBytes(){return a.length?mi(a.concat(i)):new Uint8Array(0)},get encodedBytesCount(){return a.length?a.reduce(function(c,l){return c+l.length},0)+i.length:0},get rawBytesCount(){return n},write:function(c,l){e.postMessage({action:"write",id:o,data:c,streamId:r}),s.push({id:o,callback:l}),o+=1},reset:function(){e.postMessage({action:"reset",streamId:r}),o=0},stop:function(){u()}}}var xf=10*K;function oi(t){return new Worker(t.workerUrl||URL.createObjectURL(new Blob(['!function(){"use strict";function t(t){for(var e=t.reduce((function(t,e){return t+e.length}),0),a=new Uint8Array(e),n=0,r=0,i=t;r<i.length;r++){var s=i[r];a.set(s,n),n+=s.length}return a}function e(t){for(var e=t.length;--e>=0;)t[e]=0}var a=256,n=286,r=30,i=15,s=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),_=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),h=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),l=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),o=new Array(576);e(o);var d=new Array(60);e(d);var u=new Array(512);e(u);var f=new Array(256);e(f);var c=new Array(29);e(c);var p,g,w,v=new Array(r);function b(t,e,a,n,r){this.static_tree=t,this.extra_bits=e,this.extra_base=a,this.elems=n,this.max_length=r,this.has_stree=t&&t.length}function m(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}e(v);var y=function(t){return t<256?u[t]:u[256+(t>>>7)]},k=function(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255},z=function(t,e,a){t.bi_valid>16-a?(t.bi_buf|=e<<t.bi_valid&65535,k(t,t.bi_buf),t.bi_buf=e>>16-t.bi_valid,t.bi_valid+=a-16):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=a)},x=function(t,e,a){z(t,a[2*e],a[2*e+1])},A=function(t,e){var a=0;do{a|=1&t,t>>>=1,a<<=1}while(--e>0);return a>>>1},E=function(t,e,a){var n,r,s=new Array(16),_=0;for(n=1;n<=i;n++)s[n]=_=_+a[n-1]<<1;for(r=0;r<=e;r++){var h=t[2*r+1];0!==h&&(t[2*r]=A(s[h]++,h))}},Z=function(t){var e;for(e=0;e<n;e++)t.dyn_ltree[2*e]=0;for(e=0;e<r;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.last_lit=t.matches=0},U=function(t){t.bi_valid>8?k(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0},S=function(t,e,a,n){var r=2*e,i=2*a;return t[r]<t[i]||t[r]===t[i]&&n[e]<=n[a]},R=function(t,e,a){for(var n=t.heap[a],r=a<<1;r<=t.heap_len&&(r<t.heap_len&&S(e,t.heap[r+1],t.heap[r],t.depth)&&r++,!S(e,n,t.heap[r],t.depth));)t.heap[a]=t.heap[r],a=r,r<<=1;t.heap[a]=n},L=function(t,e,n){var r,i,h,l,o=0;if(0!==t.last_lit)do{r=t.pending_buf[t.d_buf+2*o]<<8|t.pending_buf[t.d_buf+2*o+1],i=t.pending_buf[t.l_buf+o],o++,0===r?x(t,i,e):(h=f[i],x(t,h+a+1,e),0!==(l=s[h])&&(i-=c[h],z(t,i,l)),r--,h=y(r),x(t,h,n),0!==(l=_[h])&&(r-=v[h],z(t,r,l)))}while(o<t.last_lit);x(t,256,e)},F=function(t,e){var a,n,r,s=e.dyn_tree,_=e.stat_desc.static_tree,h=e.stat_desc.has_stree,l=e.stat_desc.elems,o=-1;for(t.heap_len=0,t.heap_max=573,a=0;a<l;a++)0!==s[2*a]?(t.heap[++t.heap_len]=o=a,t.depth[a]=0):s[2*a+1]=0;for(;t.heap_len<2;)s[2*(r=t.heap[++t.heap_len]=o<2?++o:0)]=1,t.depth[r]=0,t.opt_len--,h&&(t.static_len-=_[2*r+1]);for(e.max_code=o,a=t.heap_len>>1;a>=1;a--)R(t,s,a);r=l;do{a=t.heap[1],t.heap[1]=t.heap[t.heap_len--],R(t,s,1),n=t.heap[1],t.heap[--t.heap_max]=a,t.heap[--t.heap_max]=n,s[2*r]=s[2*a]+s[2*n],t.depth[r]=(t.depth[a]>=t.depth[n]?t.depth[a]:t.depth[n])+1,s[2*a+1]=s[2*n+1]=r,t.heap[1]=r++,R(t,s,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],function(t,e){var a,n,r,s,_,h,l=e.dyn_tree,o=e.max_code,d=e.stat_desc.static_tree,u=e.stat_desc.has_stree,f=e.stat_desc.extra_bits,c=e.stat_desc.extra_base,p=e.stat_desc.max_length,g=0;for(s=0;s<=i;s++)t.bl_count[s]=0;for(l[2*t.heap[t.heap_max]+1]=0,a=t.heap_max+1;a<573;a++)(s=l[2*l[2*(n=t.heap[a])+1]+1]+1)>p&&(s=p,g++),l[2*n+1]=s,n>o||(t.bl_count[s]++,_=0,n>=c&&(_=f[n-c]),h=l[2*n],t.opt_len+=h*(s+_),u&&(t.static_len+=h*(d[2*n+1]+_)));if(0!==g){do{for(s=p-1;0===t.bl_count[s];)s--;t.bl_count[s]--,t.bl_count[s+1]+=2,t.bl_count[p]--,g-=2}while(g>0);for(s=p;0!==s;s--)for(n=t.bl_count[s];0!==n;)(r=t.heap[--a])>o||(l[2*r+1]!==s&&(t.opt_len+=(s-l[2*r+1])*l[2*r],l[2*r+1]=s),n--)}}(t,e),E(s,o,t.bl_count)},T=function(t,e,a){var n,r,i=-1,s=e[1],_=0,h=7,l=4;for(0===s&&(h=138,l=3),e[2*(a+1)+1]=65535,n=0;n<=a;n++)r=s,s=e[2*(n+1)+1],++_<h&&r===s||(_<l?t.bl_tree[2*r]+=_:0!==r?(r!==i&&t.bl_tree[2*r]++,t.bl_tree[32]++):_<=10?t.bl_tree[34]++:t.bl_tree[36]++,_=0,i=r,0===s?(h=138,l=3):r===s?(h=6,l=3):(h=7,l=4))},I=function(t,e,a){var n,r,i=-1,s=e[1],_=0,h=7,l=4;for(0===s&&(h=138,l=3),n=0;n<=a;n++)if(r=s,s=e[2*(n+1)+1],!(++_<h&&r===s)){if(_<l)do{x(t,r,t.bl_tree)}while(0!=--_);else 0!==r?(r!==i&&(x(t,r,t.bl_tree),_--),x(t,16,t.bl_tree),z(t,_-3,2)):_<=10?(x(t,17,t.bl_tree),z(t,_-3,3)):(x(t,18,t.bl_tree),z(t,_-11,7));_=0,i=r,0===s?(h=138,l=3):r===s?(h=6,l=3):(h=7,l=4)}},N=!1,O=function(t,e,a,n){z(t,0+(n?1:0),3),function(t,e,a,n){U(t),n&&(k(t,a),k(t,~a)),t.pending_buf.set(t.window.subarray(e,e+a),t.pending),t.pending+=a}(t,e,a,!0)},D=function(t,e,n,r){var i,s,_=0;t.level>0?(2===t.strm.data_type&&(t.strm.data_type=function(t){var e,n=4093624447;for(e=0;e<=31;e++,n>>>=1)if(1&n&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e<a;e++)if(0!==t.dyn_ltree[2*e])return 1;return 0}(t)),F(t,t.l_desc),F(t,t.d_desc),_=function(t){var e;for(T(t,t.dyn_ltree,t.l_desc.max_code),T(t,t.dyn_dtree,t.d_desc.max_code),F(t,t.bl_desc),e=18;e>=3&&0===t.bl_tree[2*l[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(t),i=t.opt_len+3+7>>>3,(s=t.static_len+3+7>>>3)<=i&&(i=s)):i=s=n+5,n+4<=i&&-1!==e?O(t,e,n,r):4===t.strategy||s===i?(z(t,2+(r?1:0),3),L(t,o,d)):(z(t,4+(r?1:0),3),function(t,e,a,n){var r;for(z(t,e-257,5),z(t,a-1,5),z(t,n-4,4),r=0;r<n;r++)z(t,t.bl_tree[2*l[r]+1],3);I(t,t.dyn_ltree,e-1),I(t,t.dyn_dtree,a-1)}(t,t.l_desc.max_code+1,t.d_desc.max_code+1,_+1),L(t,t.dyn_ltree,t.dyn_dtree)),Z(t),r&&U(t)},B={_tr_init:function(t){N||(!function(){var t,e,a,l,m,y=new Array(16);for(a=0,l=0;l<28;l++)for(c[l]=a,t=0;t<1<<s[l];t++)f[a++]=l;for(f[a-1]=l,m=0,l=0;l<16;l++)for(v[l]=m,t=0;t<1<<_[l];t++)u[m++]=l;for(m>>=7;l<r;l++)for(v[l]=m<<7,t=0;t<1<<_[l]-7;t++)u[256+m++]=l;for(e=0;e<=i;e++)y[e]=0;for(t=0;t<=143;)o[2*t+1]=8,t++,y[8]++;for(;t<=255;)o[2*t+1]=9,t++,y[9]++;for(;t<=279;)o[2*t+1]=7,t++,y[7]++;for(;t<=287;)o[2*t+1]=8,t++,y[8]++;for(E(o,287,y),t=0;t<r;t++)d[2*t+1]=5,d[2*t]=A(t,5);p=new b(o,s,257,n,i),g=new b(d,_,0,r,i),w=new b(new Array(0),h,0,19,7)}(),N=!0),t.l_desc=new m(t.dyn_ltree,p),t.d_desc=new m(t.dyn_dtree,g),t.bl_desc=new m(t.bl_tree,w),t.bi_buf=0,t.bi_valid=0,Z(t)},_tr_stored_block:O,_tr_flush_block:D,_tr_tally:function(t,e,n){return t.pending_buf[t.d_buf+2*t.last_lit]=e>>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&n,t.last_lit++,0===e?t.dyn_ltree[2*n]++:(t.matches++,e--,t.dyn_ltree[2*(f[n]+a+1)]++,t.dyn_dtree[2*y(e)]++),t.last_lit===t.lit_bufsize-1},_tr_align:function(t){z(t,2,3),x(t,256,o),function(t){16===t.bi_valid?(k(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}(t)}},C=function(t,e,a,n){for(var r=65535&t|0,i=t>>>16&65535|0,s=0;0!==a;){a-=s=a>2e3?2e3:a;do{i=i+(r=r+e[n++]|0)|0}while(--s);r%=65521,i%=65521}return r|i<<16|0},H=new Uint32Array(function(){for(var t,e=[],a=0;a<256;a++){t=a;for(var n=0;n<8;n++)t=1&t?3988292384^t>>>1:t>>>1;e[a]=t}return e}()),M=function(t,e,a,n){var r=H,i=n+a;t^=-1;for(var s=n;s<i;s++)t=t>>>8^r[255&(t^e[s])];return-1^t},Y={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},K={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8},P=B._tr_init,j=B._tr_stored_block,G=B._tr_flush_block,X=B._tr_tally,W=B._tr_align,q=K.Z_NO_FLUSH,J=K.Z_PARTIAL_FLUSH,Q=K.Z_FULL_FLUSH,V=K.Z_FINISH,$=K.Z_BLOCK,tt=K.Z_OK,et=K.Z_STREAM_END,at=K.Z_STREAM_ERROR,nt=K.Z_DATA_ERROR,rt=K.Z_BUF_ERROR,it=K.Z_DEFAULT_COMPRESSION,st=K.Z_FILTERED,_t=K.Z_HUFFMAN_ONLY,ht=K.Z_RLE,lt=K.Z_FIXED,ot=K.Z_DEFAULT_STRATEGY,dt=K.Z_UNKNOWN,ut=K.Z_DEFLATED,ft=258,ct=262,pt=103,gt=113,wt=666,vt=function(t,e){return t.msg=Y[e],e},bt=function(t){return(t<<1)-(t>4?9:0)},mt=function(t){for(var e=t.length;--e>=0;)t[e]=0},yt=function(t,e,a){return(e<<t.hash_shift^a)&t.hash_mask},kt=function(t){var e=t.state,a=e.pending;a>t.avail_out&&(a=t.avail_out),0!==a&&(t.output.set(e.pending_buf.subarray(e.pending_out,e.pending_out+a),t.next_out),t.next_out+=a,e.pending_out+=a,t.total_out+=a,t.avail_out-=a,e.pending-=a,0===e.pending&&(e.pending_out=0))},zt=function(t,e){G(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,kt(t.strm)},xt=function(t,e){t.pending_buf[t.pending++]=e},At=function(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e},Et=function(t,e){var a,n,r=t.max_chain_length,i=t.strstart,s=t.prev_length,_=t.nice_match,h=t.strstart>t.w_size-ct?t.strstart-(t.w_size-ct):0,l=t.window,o=t.w_mask,d=t.prev,u=t.strstart+ft,f=l[i+s-1],c=l[i+s];t.prev_length>=t.good_match&&(r>>=2),_>t.lookahead&&(_=t.lookahead);do{if(l[(a=e)+s]===c&&l[a+s-1]===f&&l[a]===l[i]&&l[++a]===l[i+1]){i+=2,a++;do{}while(l[++i]===l[++a]&&l[++i]===l[++a]&&l[++i]===l[++a]&&l[++i]===l[++a]&&l[++i]===l[++a]&&l[++i]===l[++a]&&l[++i]===l[++a]&&l[++i]===l[++a]&&i<u);if(n=ft-(u-i),i=u-ft,n>s){if(t.match_start=e,s=n,n>=_)break;f=l[i+s-1],c=l[i+s]}}}while((e=d[e&o])>h&&0!=--r);return s<=t.lookahead?s:t.lookahead},Zt=function(t){var e,a,n,r,i,s,_,h,l,o,d=t.w_size;do{if(r=t.window_size-t.lookahead-t.strstart,t.strstart>=d+(d-ct)){t.window.set(t.window.subarray(d,d+d),0),t.match_start-=d,t.strstart-=d,t.block_start-=d,e=a=t.hash_size;do{n=t.head[--e],t.head[e]=n>=d?n-d:0}while(--a);e=a=d;do{n=t.prev[--e],t.prev[e]=n>=d?n-d:0}while(--a);r+=d}if(0===t.strm.avail_in)break;if(s=t.strm,_=t.window,h=t.strstart+t.lookahead,l=r,o=void 0,(o=s.avail_in)>l&&(o=l),a=0===o?0:(s.avail_in-=o,_.set(s.input.subarray(s.next_in,s.next_in+o),h),1===s.state.wrap?s.adler=C(s.adler,_,o,h):2===s.state.wrap&&(s.adler=M(s.adler,_,o,h)),s.next_in+=o,s.total_in+=o,o),t.lookahead+=a,t.lookahead+t.insert>=3)for(i=t.strstart-t.insert,t.ins_h=t.window[i],t.ins_h=yt(t,t.ins_h,t.window[i+1]);t.insert&&(t.ins_h=yt(t,t.ins_h,t.window[i+3-1]),t.prev[i&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=i,i++,t.insert--,!(t.lookahead+t.insert<3)););}while(t.lookahead<ct&&0!==t.strm.avail_in)},Ut=function(t,e){for(var a,n;;){if(t.lookahead<ct){if(Zt(t),t.lookahead<ct&&e===q)return 1;if(0===t.lookahead)break}if(a=0,t.lookahead>=3&&(t.ins_h=yt(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==a&&t.strstart-a<=t.w_size-ct&&(t.match_length=Et(t,a)),t.match_length>=3)if(n=X(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){t.match_length--;do{t.strstart++,t.ins_h=yt(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart}while(0!=--t.match_length);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=yt(t,t.ins_h,t.window[t.strstart+1]);else n=X(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(n&&(zt(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,e===V?(zt(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(zt(t,!1),0===t.strm.avail_out)?1:2},St=function(t,e){for(var a,n,r;;){if(t.lookahead<ct){if(Zt(t),t.lookahead<ct&&e===q)return 1;if(0===t.lookahead)break}if(a=0,t.lookahead>=3&&(t.ins_h=yt(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=2,0!==a&&t.prev_length<t.max_lazy_match&&t.strstart-a<=t.w_size-ct&&(t.match_length=Et(t,a),t.match_length<=5&&(t.strategy===st||3===t.match_length&&t.strstart-t.match_start>4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){r=t.strstart+t.lookahead-3,n=X(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=r&&(t.ins_h=yt(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart)}while(0!=--t.prev_length);if(t.match_available=0,t.match_length=2,t.strstart++,n&&(zt(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if((n=X(t,0,t.window[t.strstart-1]))&&zt(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return 1}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(n=X(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,e===V?(zt(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(zt(t,!1),0===t.strm.avail_out)?1:2};function Rt(t,e,a,n,r){this.good_length=t,this.max_lazy=e,this.nice_length=a,this.max_chain=n,this.func=r}var Lt=[new Rt(0,0,0,0,(function(t,e){var a=65535;for(a>t.pending_buf_size-5&&(a=t.pending_buf_size-5);;){if(t.lookahead<=1){if(Zt(t),0===t.lookahead&&e===q)return 1;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var n=t.block_start+a;if((0===t.strstart||t.strstart>=n)&&(t.lookahead=t.strstart-n,t.strstart=n,zt(t,!1),0===t.strm.avail_out))return 1;if(t.strstart-t.block_start>=t.w_size-ct&&(zt(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===V?(zt(t,!0),0===t.strm.avail_out?3:4):(t.strstart>t.block_start&&(zt(t,!1),t.strm.avail_out),1)})),new Rt(4,4,8,4,Ut),new Rt(4,5,16,8,Ut),new Rt(4,6,32,32,Ut),new Rt(4,4,16,16,St),new Rt(8,16,32,32,St),new Rt(8,16,128,128,St),new Rt(8,32,128,256,St),new Rt(32,128,258,1024,St),new Rt(32,258,258,4096,St)];function Ft(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=ut,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),mt(this.dyn_ltree),mt(this.dyn_dtree),mt(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),mt(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),mt(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}var Tt=function(t){if(!t||!t.state)return vt(t,at);t.total_in=t.total_out=0,t.data_type=dt;var e=t.state;return e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?42:gt,t.adler=2===e.wrap?0:1,e.last_flush=q,P(e),tt},It=function(t){var e,a=Tt(t);return a===tt&&((e=t.state).window_size=2*e.w_size,mt(e.head),e.max_lazy_match=Lt[e.level].max_lazy,e.good_match=Lt[e.level].good_length,e.nice_match=Lt[e.level].nice_length,e.max_chain_length=Lt[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=2,e.match_available=0,e.ins_h=0),a},Nt=function(t,e,a,n,r,i){if(!t)return at;var s=1;if(e===it&&(e=6),n<0?(s=0,n=-n):n>15&&(s=2,n-=16),r<1||r>9||a!==ut||n<8||n>15||e<0||e>9||i<0||i>lt)return vt(t,at);8===n&&(n=9);var _=new Ft;return t.state=_,_.strm=t,_.wrap=s,_.gzhead=null,_.w_bits=n,_.w_size=1<<_.w_bits,_.w_mask=_.w_size-1,_.hash_bits=r+7,_.hash_size=1<<_.hash_bits,_.hash_mask=_.hash_size-1,_.hash_shift=~~((_.hash_bits+3-1)/3),_.window=new Uint8Array(2*_.w_size),_.head=new Uint16Array(_.hash_size),_.prev=new Uint16Array(_.w_size),_.lit_bufsize=1<<r+6,_.pending_buf_size=4*_.lit_bufsize,_.pending_buf=new Uint8Array(_.pending_buf_size),_.d_buf=1*_.lit_bufsize,_.l_buf=3*_.lit_bufsize,_.level=e,_.strategy=i,_.method=a,It(t)},Ot={deflateInit:function(t,e){return Nt(t,e,ut,15,8,ot)},deflateInit2:Nt,deflateReset:It,deflateResetKeep:Tt,deflateSetHeader:function(t,e){return t&&t.state?2!==t.state.wrap?at:(t.state.gzhead=e,tt):at},deflate:function(t,e){var a,n;if(!t||!t.state||e>$||e<0)return t?vt(t,at):at;var r=t.state;if(!t.output||!t.input&&0!==t.avail_in||r.status===wt&&e!==V)return vt(t,0===t.avail_out?rt:at);r.strm=t;var i=r.last_flush;if(r.last_flush=e,42===r.status)if(2===r.wrap)t.adler=0,xt(r,31),xt(r,139),xt(r,8),r.gzhead?(xt(r,(r.gzhead.text?1:0)+(r.gzhead.hcrc?2:0)+(r.gzhead.extra?4:0)+(r.gzhead.name?8:0)+(r.gzhead.comment?16:0)),xt(r,255&r.gzhead.time),xt(r,r.gzhead.time>>8&255),xt(r,r.gzhead.time>>16&255),xt(r,r.gzhead.time>>24&255),xt(r,9===r.level?2:r.strategy>=_t||r.level<2?4:0),xt(r,255&r.gzhead.os),r.gzhead.extra&&r.gzhead.extra.length&&(xt(r,255&r.gzhead.extra.length),xt(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(t.adler=M(t.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=69):(xt(r,0),xt(r,0),xt(r,0),xt(r,0),xt(r,0),xt(r,9===r.level?2:r.strategy>=_t||r.level<2?4:0),xt(r,3),r.status=gt);else{var s=ut+(r.w_bits-8<<4)<<8;s|=(r.strategy>=_t||r.level<2?0:r.level<6?1:6===r.level?2:3)<<6,0!==r.strstart&&(s|=32),s+=31-s%31,r.status=gt,At(r,s),0!==r.strstart&&(At(r,t.adler>>>16),At(r,65535&t.adler)),t.adler=1}if(69===r.status)if(r.gzhead.extra){for(a=r.pending;r.gzindex<(65535&r.gzhead.extra.length)&&(r.pending!==r.pending_buf_size||(r.gzhead.hcrc&&r.pending>a&&(t.adler=M(t.adler,r.pending_buf,r.pending-a,a)),kt(t),a=r.pending,r.pending!==r.pending_buf_size));)xt(r,255&r.gzhead.extra[r.gzindex]),r.gzindex++;r.gzhead.hcrc&&r.pending>a&&(t.adler=M(t.adler,r.pending_buf,r.pending-a,a)),r.gzindex===r.gzhead.extra.length&&(r.gzindex=0,r.status=73)}else r.status=73;if(73===r.status)if(r.gzhead.name){a=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>a&&(t.adler=M(t.adler,r.pending_buf,r.pending-a,a)),kt(t),a=r.pending,r.pending===r.pending_buf_size)){n=1;break}n=r.gzindex<r.gzhead.name.length?255&r.gzhead.name.charCodeAt(r.gzindex++):0,xt(r,n)}while(0!==n);r.gzhead.hcrc&&r.pending>a&&(t.adler=M(t.adler,r.pending_buf,r.pending-a,a)),0===n&&(r.gzindex=0,r.status=91)}else r.status=91;if(91===r.status)if(r.gzhead.comment){a=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>a&&(t.adler=M(t.adler,r.pending_buf,r.pending-a,a)),kt(t),a=r.pending,r.pending===r.pending_buf_size)){n=1;break}n=r.gzindex<r.gzhead.comment.length?255&r.gzhead.comment.charCodeAt(r.gzindex++):0,xt(r,n)}while(0!==n);r.gzhead.hcrc&&r.pending>a&&(t.adler=M(t.adler,r.pending_buf,r.pending-a,a)),0===n&&(r.status=pt)}else r.status=pt;if(r.status===pt&&(r.gzhead.hcrc?(r.pending+2>r.pending_buf_size&&kt(t),r.pending+2<=r.pending_buf_size&&(xt(r,255&t.adler),xt(r,t.adler>>8&255),t.adler=0,r.status=gt)):r.status=gt),0!==r.pending){if(kt(t),0===t.avail_out)return r.last_flush=-1,tt}else if(0===t.avail_in&&bt(e)<=bt(i)&&e!==V)return vt(t,rt);if(r.status===wt&&0!==t.avail_in)return vt(t,rt);if(0!==t.avail_in||0!==r.lookahead||e!==q&&r.status!==wt){var _=r.strategy===_t?function(t,e){for(var a;;){if(0===t.lookahead&&(Zt(t),0===t.lookahead)){if(e===q)return 1;break}if(t.match_length=0,a=X(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,a&&(zt(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===V?(zt(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(zt(t,!1),0===t.strm.avail_out)?1:2}(r,e):r.strategy===ht?function(t,e){for(var a,n,r,i,s=t.window;;){if(t.lookahead<=ft){if(Zt(t),t.lookahead<=ft&&e===q)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&t.strstart>0&&(n=s[r=t.strstart-1])===s[++r]&&n===s[++r]&&n===s[++r]){i=t.strstart+ft;do{}while(n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&r<i);t.match_length=ft-(i-r),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(a=X(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(a=X(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),a&&(zt(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===V?(zt(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(zt(t,!1),0===t.strm.avail_out)?1:2}(r,e):Lt[r.level].func(r,e);if(3!==_&&4!==_||(r.status=wt),1===_||3===_)return 0===t.avail_out&&(r.last_flush=-1),tt;if(2===_&&(e===J?W(r):e!==$&&(j(r,0,0,!1),e===Q&&(mt(r.head),0===r.lookahead&&(r.strstart=0,r.block_start=0,r.insert=0))),kt(t),0===t.avail_out))return r.last_flush=-1,tt}return e!==V?tt:r.wrap<=0?et:(2===r.wrap?(xt(r,255&t.adler),xt(r,t.adler>>8&255),xt(r,t.adler>>16&255),xt(r,t.adler>>24&255),xt(r,255&t.total_in),xt(r,t.total_in>>8&255),xt(r,t.total_in>>16&255),xt(r,t.total_in>>24&255)):(At(r,t.adler>>>16),At(r,65535&t.adler)),kt(t),r.wrap>0&&(r.wrap=-r.wrap),0!==r.pending?tt:et)},deflateEnd:function(t){if(!t||!t.state)return at;var e=t.state.status;return 42!==e&&69!==e&&73!==e&&91!==e&&e!==pt&&e!==gt&&e!==wt?vt(t,at):(t.state=null,e===gt?vt(t,nt):tt)},deflateSetDictionary:function(t,e){var a=e.length;if(!t||!t.state)return at;var n=t.state,r=n.wrap;if(2===r||1===r&&42!==n.status||n.lookahead)return at;if(1===r&&(t.adler=C(t.adler,e,a,0)),n.wrap=0,a>=n.w_size){0===r&&(mt(n.head),n.strstart=0,n.block_start=0,n.insert=0);var i=new Uint8Array(n.w_size);i.set(e.subarray(a-n.w_size,a),0),e=i,a=n.w_size}var s=t.avail_in,_=t.next_in,h=t.input;for(t.avail_in=a,t.next_in=0,t.input=e,Zt(n);n.lookahead>=3;){var l=n.strstart,o=n.lookahead-2;do{n.ins_h=yt(n,n.ins_h,n.window[l+3-1]),n.prev[l&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=l,l++}while(--o);n.strstart=l,n.lookahead=2,Zt(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=2,n.match_available=0,t.next_in=_,t.input=h,t.avail_in=s,n.wrap=r,tt},deflateInfo:"pako deflate (from Nodeca project)"};for(var Dt=new Uint8Array(256),Bt=0;Bt<256;Bt++)Dt[Bt]=Bt>=252?6:Bt>=248?5:Bt>=240?4:Bt>=224?3:Bt>=192?2:1;Dt[254]=Dt[254]=1;var Ct=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0},Ht=Object.prototype.toString,Mt=K.Z_NO_FLUSH,Yt=K.Z_SYNC_FLUSH,Kt=K.Z_FULL_FLUSH,Pt=K.Z_FINISH,jt=K.Z_OK,Gt=K.Z_STREAM_END,Xt=K.Z_DEFAULT_COMPRESSION,Wt=K.Z_DEFAULT_STRATEGY,qt=K.Z_DEFLATED;function Jt(){this.options={level:Xt,method:qt,chunkSize:16384,windowBits:15,memLevel:8,strategy:Wt};var t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Ct,this.strm.avail_out=0;var e=Ot.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(e!==jt)throw new Error(Y[e]);if(t.header&&Ot.deflateSetHeader(this.strm,t.header),t.dictionary){var a;if(a="[object ArrayBuffer]"===Ht.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,(e=Ot.deflateSetDictionary(this.strm,a))!==jt)throw new Error(Y[e]);this._dict_set=!0}}function Qt(t,e,a){try{t.postMessage({type:"errored",error:e,streamId:a})}catch(n){t.postMessage({type:"errored",error:String(e),streamId:a})}}function Vt(t){var e=t.strm.adler;return new Uint8Array([3,0,e>>>24&255,e>>>16&255,e>>>8&255,255&e])}Jt.prototype.push=function(t,e){var a,n,r=this.strm,i=this.options.chunkSize;if(this.ended)return!1;for(n=e===~~e?e:!0===e?Pt:Mt,"[object ArrayBuffer]"===Ht.call(t)?r.input=new Uint8Array(t):r.input=t,r.next_in=0,r.avail_in=r.input.length;;)if(0===r.avail_out&&(r.output=new Uint8Array(i),r.next_out=0,r.avail_out=i),(n===Yt||n===Kt)&&r.avail_out<=6)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else{if((a=Ot.deflate(r,n))===Gt)return r.next_out>0&&this.onData(r.output.subarray(0,r.next_out)),a=Ot.deflateEnd(this.strm),this.onEnd(a),this.ended=!0,a===jt;if(0!==r.avail_out){if(n>0&&r.next_out>0)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else if(0===r.avail_in)break}else this.onData(r.output)}return!0},Jt.prototype.onData=function(t){this.chunks.push(t)},Jt.prototype.onEnd=function(t){t===jt&&(this.result=function(t){for(var e=0,a=0,n=t.length;a<n;a++)e+=t[a].length;for(var r=new Uint8Array(e),i=0,s=0,_=t.length;i<_;i++){var h=t[i];r.set(h,s),s+=h.length}return r}(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},function(e){void 0===e&&(e=self);try{var a=new Map;e.addEventListener("message",(function(n){try{var r=function(e,a){switch(a.action){case"init":return{type:"initialized",version:"5.1.0"};case"write":var n=e.get(a.streamId);n||(n=new Jt,e.set(a.streamId,n));var r=n.chunks.length,i=function(t){if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(t);var e,a,n,r,i,s=t.length,_=0;for(r=0;r<s;r++)55296==(64512&(a=t.charCodeAt(r)))&&r+1<s&&56320==(64512&(n=t.charCodeAt(r+1)))&&(a=65536+(a-55296<<10)+(n-56320),r++),_+=a<128?1:a<2048?2:a<65536?3:4;for(e=new Uint8Array(_),i=0,r=0;i<_;r++)55296==(64512&(a=t.charCodeAt(r)))&&r+1<s&&56320==(64512&(n=t.charCodeAt(r+1)))&&(a=65536+(a-55296<<10)+(n-56320),r++),a<128?e[i++]=a:a<2048?(e[i++]=192|a>>>6,e[i++]=128|63&a):a<65536?(e[i++]=224|a>>>12,e[i++]=128|a>>>6&63,e[i++]=128|63&a):(e[i++]=240|a>>>18,e[i++]=128|a>>>12&63,e[i++]=128|a>>>6&63,e[i++]=128|63&a);return e}(a.data);return n.push(i,K.Z_SYNC_FLUSH),{type:"wrote",id:a.id,streamId:a.streamId,result:t(n.chunks.slice(r)),trailer:Vt(n),additionalBytesCount:i.length};case"reset":e.delete(a.streamId)}}(a,n.data);r&&e.postMessage(r)}catch(t){Qt(e,t,n.data&&"streamId"in n.data?n.data.streamId:void 0)}}))}catch(t){Qt(e,t)}}()}();'])))}var M={status:0};function Nf(t,e,r,n){switch(n===void 0&&(n=oi),M.status===0&&kf(t,e,n),M.status){case 1:return M.initializationFailureCallbacks.push(r),M.worker;case 3:return M.worker}}function Rn(){return M.status}function kf(t,e,r){r===void 0&&(r=oi);try{var n=r(t),a=P(t,n,"error",function(s){lr(t,e,s)}).stop,i=P(t,n,"message",function(s){var u=s.data;u.type==="errored"?lr(t,e,u.error,u.streamId):u.type==="initialized"&&Mf(u.version)}).stop;n.postMessage({action:"init"}),H(function(){return Lf(e)},xf);var o=function(){a(),i()};M={status:1,worker:n,stop:o,initializationFailureCallbacks:[]}}catch(s){lr(t,e,s)}}function Lf(t){M.status===1&&(O.error("".concat(t," failed to start: a timeout occurred while initializing the Worker")),M.initializationFailureCallbacks.forEach(function(e){return e()}),M={status:2})}function Mf(t){M.status===1&&(M={status:3,worker:M.worker,stop:M.stop,version:t})}function lr(t,e,r,n){if(M.status===1||M.status===0){if(O.error("".concat(e," failed to start: an error occurred while creating the Worker:"),r),r instanceof Event||r instanceof Error&&Uf(r.message)){var a=void 0;t.workerUrl?a="Please make sure the Worker URL ".concat(t.workerUrl," is correct and CSP is correctly configured."):a="Please make sure CSP is correctly configured.",O.error("".concat(a," See documentation at https://docs.datadoghq.com/integrations/content_security_policy_logs/#use-csp-with-real-user-monitoring-and-session-replay"))}else Ue(r);M.status===1&&M.initializationFailureCallbacks.forEach(function(i){return i()}),M={status:2}}else Ue(r,{worker_version:M.status===3&&M.version,stream_id:n})}function Uf(t){return _t(t,"Content Security Policy")||_t(t,"requires 'TrustedScriptURL'")}function Pf(t,e){if(qt()||!ii())return{start:N,stop:N,getReplayStats:function(){},onRumStart:N,isRecording:function(){return!1},getSessionReplayLink:function(){}};var r={status:1},n=function(){r={status:1}},a=function(){r={status:0}};return{start:function(){return n()},stop:function(){return a()},getSessionReplayLink:function(i,o,s){return Af(i,o,s,r.status!==0)},onRumStart:function(i,o,s,u){o.startSessionReplayRecordingManually&&(r={status:0}),i.subscribe(7,function(){(r.status===2||r.status===3)&&(a(),r={status:1})}),i.subscribe(8,function(){r.status===1&&n()}),n=function(){var c=s.findTrackedSession();if(!c||!c.sessionReplayAllowed){r={status:1};return}r.status===2||r.status===3||(r={status:2},Ur(o,"interactive",function(){if(r.status===2){var l=Nf(o,"Datadog Session Replay",function(){a()},e);if(!l){r={status:0};return}var d=t(i,o,s,u,Of(o,l,1)).stop;r={status:3,stopRecording:d}}}))},a=function(){r.status!==0&&(r.status===3&&r.stopRecording(),r={status:0})},r.status===1&&n()},isRecording:function(){return Rn()===3&&r.status===3},getReplayStats:function(i){return Rn()===3?bf(i):void 0}}}var Df=Pf(If),si=du(Jl,Df);Ko(It(),"DD_RUM",si);const Ff=()=>window.location.hostname.toLocaleLowerCase().replace(/[^.a-z]/,""),Bf=()=>"2.83.43343".toLocaleLowerCase().replace(/[^0-9a-z.]/,""),zf=()=>si.init({applicationId:"cb2e3b66-3ab8-404f-bf6f-f988a2c063c4",clientToken:"pub457932dc74411c968aec6f5d9f0ba68e",site:"datadoghq.com",service:"apollo-benefits",env:`${Ff()}`,version:`${Bf()}`,sessionSampleRate:100,sessionReplaySampleRate:20,trackUserInteractions:!0,trackResources:!0,trackLongTasks:!0,defaultPrivacyLevel:"mask-user-input",beforeSend:(t,e)=>(t.view.url=t.view.url.replace("#",""),!0)});export{zf as i};
5
+ `),function(){gf(r.metadata.view.id,r.encoder.rawBytesCount),e(r.metadata)}),this.encoder.reset()},t}(),Ef=30*K,ai=6e4;function wf(t,e,r,n,a,i){return Tf(t,function(){return Cf(e.applicationId,r,n)},a,i)}function Tf(t,e,r,n){var a={status:0,nextSegmentCreationReason:"init"},i=t.subscribe(2,function(){s("view_change")}).unsubscribe,o=t.subscribe(9,function(u){s(u.reason)}).unsubscribe;function s(u){a.status===1&&(a.segment.flush(function(c){var l=vf(n.encodedBytes,c,n.rawBytesCount);sa(u)?r.sendOnExit(l):r.send(l)}),ot(a.expirationTimeoutId)),u!=="stop"?a={status:0,nextSegmentCreationReason:u}:a={status:2}}return{addRecord:function(u){if(a.status!==2){if(a.status===0){var c=e();if(!c)return;a={status:1,segment:new yf(n,c,a.nextSegmentCreationReason),expirationTimeoutId:H(function(){s("segment_duration_limit")},Ef)}}var l=a.segment;l.addRecord(u,function(){a.status===1&&a.segment===l&&n.encodedBytesCount>ai&&s("segment_bytes_limit")})}},stop:function(){s("stop"),i(),o()}}}function Cf(t,e,r){var n=e.findTrackedSession(),a=r.findView();if(!(!n||!a))return{application:{id:t},session:{id:n.id},view:{id:a.id}}}function If(t,e,r,n,a,i){var o=function(y){t.notify(12,{error:y}),Dt("Error reported to customer",{"error.message":y.message})},s=i||oa(e,e.sessionReplayEndpointBuilder,ai,o),u=wf(t,e,r,n,s,a),c=u.addRecord,l=u.stop,d=ff({emit:c,configuration:e,lifeCycle:t}),f=d.stop,v=d.takeSubsequentFullSnapshot,p=d.flushMutations,h=t.subscribe(4,function(){p(),c({timestamp:F(),type:it.ViewEnd})}).unsubscribe,m=t.subscribe(2,function(y){v(y.startClocks.timeStamp)}).unsubscribe;return{stop:function(){h(),m(),f(),l()}}}function ii(){return typeof Array.from=="function"&&typeof CSSSupportsRule=="function"&&typeof URL.createObjectURL=="function"&&"forEach"in NodeList.prototype}function Af(t,e,r,n){var a=e.findTrackedSession(),i=Rf(a,n),o=r.findView();return td(t,{viewContext:o,errorType:i,session:a})}function Rf(t,e){if(!ii())return"browser-not-supported";if(!t)return"rum-not-tracked";if(!t.sessionReplayAllowed)return"incorrect-session-plan";if(!e)return"replay-not-started"}function Of(t,e,r){var n=0,a=[],i,o=0,s=[],u=P(t,e,"message",function(c){var l=c.data;if(!(l.type!=="wrote"||l.streamId!==r)){var d=s.shift();d&&d.id===l.id?(l.id===0?(n=l.additionalBytesCount,a=[l.result]):(n+=l.additionalBytesCount,a.push(l.result)),i=l.trailer,d.callback()):(u(),Dt("Worker responses received out of order."))}}).stop;return{get encodedBytes(){return a.length?mi(a.concat(i)):new Uint8Array(0)},get encodedBytesCount(){return a.length?a.reduce(function(c,l){return c+l.length},0)+i.length:0},get rawBytesCount(){return n},write:function(c,l){e.postMessage({action:"write",id:o,data:c,streamId:r}),s.push({id:o,callback:l}),o+=1},reset:function(){e.postMessage({action:"reset",streamId:r}),o=0},stop:function(){u()}}}var xf=10*K;function oi(t){return new Worker(t.workerUrl||URL.createObjectURL(new Blob(['!function(){"use strict";function t(t){for(var e=t.reduce((function(t,e){return t+e.length}),0),a=new Uint8Array(e),n=0,r=0,i=t;r<i.length;r++){var s=i[r];a.set(s,n),n+=s.length}return a}function e(t){for(var e=t.length;--e>=0;)t[e]=0}var a=256,n=286,r=30,i=15,s=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),_=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),h=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),l=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),o=new Array(576);e(o);var d=new Array(60);e(d);var u=new Array(512);e(u);var f=new Array(256);e(f);var c=new Array(29);e(c);var p,g,w,v=new Array(r);function b(t,e,a,n,r){this.static_tree=t,this.extra_bits=e,this.extra_base=a,this.elems=n,this.max_length=r,this.has_stree=t&&t.length}function m(t,e){this.dyn_tree=t,this.max_code=0,this.stat_desc=e}e(v);var y=function(t){return t<256?u[t]:u[256+(t>>>7)]},k=function(t,e){t.pending_buf[t.pending++]=255&e,t.pending_buf[t.pending++]=e>>>8&255},z=function(t,e,a){t.bi_valid>16-a?(t.bi_buf|=e<<t.bi_valid&65535,k(t,t.bi_buf),t.bi_buf=e>>16-t.bi_valid,t.bi_valid+=a-16):(t.bi_buf|=e<<t.bi_valid&65535,t.bi_valid+=a)},x=function(t,e,a){z(t,a[2*e],a[2*e+1])},A=function(t,e){var a=0;do{a|=1&t,t>>>=1,a<<=1}while(--e>0);return a>>>1},E=function(t,e,a){var n,r,s=new Array(16),_=0;for(n=1;n<=i;n++)s[n]=_=_+a[n-1]<<1;for(r=0;r<=e;r++){var h=t[2*r+1];0!==h&&(t[2*r]=A(s[h]++,h))}},Z=function(t){var e;for(e=0;e<n;e++)t.dyn_ltree[2*e]=0;for(e=0;e<r;e++)t.dyn_dtree[2*e]=0;for(e=0;e<19;e++)t.bl_tree[2*e]=0;t.dyn_ltree[512]=1,t.opt_len=t.static_len=0,t.last_lit=t.matches=0},U=function(t){t.bi_valid>8?k(t,t.bi_buf):t.bi_valid>0&&(t.pending_buf[t.pending++]=t.bi_buf),t.bi_buf=0,t.bi_valid=0},S=function(t,e,a,n){var r=2*e,i=2*a;return t[r]<t[i]||t[r]===t[i]&&n[e]<=n[a]},R=function(t,e,a){for(var n=t.heap[a],r=a<<1;r<=t.heap_len&&(r<t.heap_len&&S(e,t.heap[r+1],t.heap[r],t.depth)&&r++,!S(e,n,t.heap[r],t.depth));)t.heap[a]=t.heap[r],a=r,r<<=1;t.heap[a]=n},L=function(t,e,n){var r,i,h,l,o=0;if(0!==t.last_lit)do{r=t.pending_buf[t.d_buf+2*o]<<8|t.pending_buf[t.d_buf+2*o+1],i=t.pending_buf[t.l_buf+o],o++,0===r?x(t,i,e):(h=f[i],x(t,h+a+1,e),0!==(l=s[h])&&(i-=c[h],z(t,i,l)),r--,h=y(r),x(t,h,n),0!==(l=_[h])&&(r-=v[h],z(t,r,l)))}while(o<t.last_lit);x(t,256,e)},F=function(t,e){var a,n,r,s=e.dyn_tree,_=e.stat_desc.static_tree,h=e.stat_desc.has_stree,l=e.stat_desc.elems,o=-1;for(t.heap_len=0,t.heap_max=573,a=0;a<l;a++)0!==s[2*a]?(t.heap[++t.heap_len]=o=a,t.depth[a]=0):s[2*a+1]=0;for(;t.heap_len<2;)s[2*(r=t.heap[++t.heap_len]=o<2?++o:0)]=1,t.depth[r]=0,t.opt_len--,h&&(t.static_len-=_[2*r+1]);for(e.max_code=o,a=t.heap_len>>1;a>=1;a--)R(t,s,a);r=l;do{a=t.heap[1],t.heap[1]=t.heap[t.heap_len--],R(t,s,1),n=t.heap[1],t.heap[--t.heap_max]=a,t.heap[--t.heap_max]=n,s[2*r]=s[2*a]+s[2*n],t.depth[r]=(t.depth[a]>=t.depth[n]?t.depth[a]:t.depth[n])+1,s[2*a+1]=s[2*n+1]=r,t.heap[1]=r++,R(t,s,1)}while(t.heap_len>=2);t.heap[--t.heap_max]=t.heap[1],function(t,e){var a,n,r,s,_,h,l=e.dyn_tree,o=e.max_code,d=e.stat_desc.static_tree,u=e.stat_desc.has_stree,f=e.stat_desc.extra_bits,c=e.stat_desc.extra_base,p=e.stat_desc.max_length,g=0;for(s=0;s<=i;s++)t.bl_count[s]=0;for(l[2*t.heap[t.heap_max]+1]=0,a=t.heap_max+1;a<573;a++)(s=l[2*l[2*(n=t.heap[a])+1]+1]+1)>p&&(s=p,g++),l[2*n+1]=s,n>o||(t.bl_count[s]++,_=0,n>=c&&(_=f[n-c]),h=l[2*n],t.opt_len+=h*(s+_),u&&(t.static_len+=h*(d[2*n+1]+_)));if(0!==g){do{for(s=p-1;0===t.bl_count[s];)s--;t.bl_count[s]--,t.bl_count[s+1]+=2,t.bl_count[p]--,g-=2}while(g>0);for(s=p;0!==s;s--)for(n=t.bl_count[s];0!==n;)(r=t.heap[--a])>o||(l[2*r+1]!==s&&(t.opt_len+=(s-l[2*r+1])*l[2*r],l[2*r+1]=s),n--)}}(t,e),E(s,o,t.bl_count)},T=function(t,e,a){var n,r,i=-1,s=e[1],_=0,h=7,l=4;for(0===s&&(h=138,l=3),e[2*(a+1)+1]=65535,n=0;n<=a;n++)r=s,s=e[2*(n+1)+1],++_<h&&r===s||(_<l?t.bl_tree[2*r]+=_:0!==r?(r!==i&&t.bl_tree[2*r]++,t.bl_tree[32]++):_<=10?t.bl_tree[34]++:t.bl_tree[36]++,_=0,i=r,0===s?(h=138,l=3):r===s?(h=6,l=3):(h=7,l=4))},I=function(t,e,a){var n,r,i=-1,s=e[1],_=0,h=7,l=4;for(0===s&&(h=138,l=3),n=0;n<=a;n++)if(r=s,s=e[2*(n+1)+1],!(++_<h&&r===s)){if(_<l)do{x(t,r,t.bl_tree)}while(0!=--_);else 0!==r?(r!==i&&(x(t,r,t.bl_tree),_--),x(t,16,t.bl_tree),z(t,_-3,2)):_<=10?(x(t,17,t.bl_tree),z(t,_-3,3)):(x(t,18,t.bl_tree),z(t,_-11,7));_=0,i=r,0===s?(h=138,l=3):r===s?(h=6,l=3):(h=7,l=4)}},N=!1,O=function(t,e,a,n){z(t,0+(n?1:0),3),function(t,e,a,n){U(t),n&&(k(t,a),k(t,~a)),t.pending_buf.set(t.window.subarray(e,e+a),t.pending),t.pending+=a}(t,e,a,!0)},D=function(t,e,n,r){var i,s,_=0;t.level>0?(2===t.strm.data_type&&(t.strm.data_type=function(t){var e,n=4093624447;for(e=0;e<=31;e++,n>>>=1)if(1&n&&0!==t.dyn_ltree[2*e])return 0;if(0!==t.dyn_ltree[18]||0!==t.dyn_ltree[20]||0!==t.dyn_ltree[26])return 1;for(e=32;e<a;e++)if(0!==t.dyn_ltree[2*e])return 1;return 0}(t)),F(t,t.l_desc),F(t,t.d_desc),_=function(t){var e;for(T(t,t.dyn_ltree,t.l_desc.max_code),T(t,t.dyn_dtree,t.d_desc.max_code),F(t,t.bl_desc),e=18;e>=3&&0===t.bl_tree[2*l[e]+1];e--);return t.opt_len+=3*(e+1)+5+5+4,e}(t),i=t.opt_len+3+7>>>3,(s=t.static_len+3+7>>>3)<=i&&(i=s)):i=s=n+5,n+4<=i&&-1!==e?O(t,e,n,r):4===t.strategy||s===i?(z(t,2+(r?1:0),3),L(t,o,d)):(z(t,4+(r?1:0),3),function(t,e,a,n){var r;for(z(t,e-257,5),z(t,a-1,5),z(t,n-4,4),r=0;r<n;r++)z(t,t.bl_tree[2*l[r]+1],3);I(t,t.dyn_ltree,e-1),I(t,t.dyn_dtree,a-1)}(t,t.l_desc.max_code+1,t.d_desc.max_code+1,_+1),L(t,t.dyn_ltree,t.dyn_dtree)),Z(t),r&&U(t)},B={_tr_init:function(t){N||(!function(){var t,e,a,l,m,y=new Array(16);for(a=0,l=0;l<28;l++)for(c[l]=a,t=0;t<1<<s[l];t++)f[a++]=l;for(f[a-1]=l,m=0,l=0;l<16;l++)for(v[l]=m,t=0;t<1<<_[l];t++)u[m++]=l;for(m>>=7;l<r;l++)for(v[l]=m<<7,t=0;t<1<<_[l]-7;t++)u[256+m++]=l;for(e=0;e<=i;e++)y[e]=0;for(t=0;t<=143;)o[2*t+1]=8,t++,y[8]++;for(;t<=255;)o[2*t+1]=9,t++,y[9]++;for(;t<=279;)o[2*t+1]=7,t++,y[7]++;for(;t<=287;)o[2*t+1]=8,t++,y[8]++;for(E(o,287,y),t=0;t<r;t++)d[2*t+1]=5,d[2*t]=A(t,5);p=new b(o,s,257,n,i),g=new b(d,_,0,r,i),w=new b(new Array(0),h,0,19,7)}(),N=!0),t.l_desc=new m(t.dyn_ltree,p),t.d_desc=new m(t.dyn_dtree,g),t.bl_desc=new m(t.bl_tree,w),t.bi_buf=0,t.bi_valid=0,Z(t)},_tr_stored_block:O,_tr_flush_block:D,_tr_tally:function(t,e,n){return t.pending_buf[t.d_buf+2*t.last_lit]=e>>>8&255,t.pending_buf[t.d_buf+2*t.last_lit+1]=255&e,t.pending_buf[t.l_buf+t.last_lit]=255&n,t.last_lit++,0===e?t.dyn_ltree[2*n]++:(t.matches++,e--,t.dyn_ltree[2*(f[n]+a+1)]++,t.dyn_dtree[2*y(e)]++),t.last_lit===t.lit_bufsize-1},_tr_align:function(t){z(t,2,3),x(t,256,o),function(t){16===t.bi_valid?(k(t,t.bi_buf),t.bi_buf=0,t.bi_valid=0):t.bi_valid>=8&&(t.pending_buf[t.pending++]=255&t.bi_buf,t.bi_buf>>=8,t.bi_valid-=8)}(t)}},C=function(t,e,a,n){for(var r=65535&t|0,i=t>>>16&65535|0,s=0;0!==a;){a-=s=a>2e3?2e3:a;do{i=i+(r=r+e[n++]|0)|0}while(--s);r%=65521,i%=65521}return r|i<<16|0},H=new Uint32Array(function(){for(var t,e=[],a=0;a<256;a++){t=a;for(var n=0;n<8;n++)t=1&t?3988292384^t>>>1:t>>>1;e[a]=t}return e}()),M=function(t,e,a,n){var r=H,i=n+a;t^=-1;for(var s=n;s<i;s++)t=t>>>8^r[255&(t^e[s])];return-1^t},Y={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},K={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8},P=B._tr_init,j=B._tr_stored_block,G=B._tr_flush_block,X=B._tr_tally,W=B._tr_align,q=K.Z_NO_FLUSH,J=K.Z_PARTIAL_FLUSH,Q=K.Z_FULL_FLUSH,V=K.Z_FINISH,$=K.Z_BLOCK,tt=K.Z_OK,et=K.Z_STREAM_END,at=K.Z_STREAM_ERROR,nt=K.Z_DATA_ERROR,rt=K.Z_BUF_ERROR,it=K.Z_DEFAULT_COMPRESSION,st=K.Z_FILTERED,_t=K.Z_HUFFMAN_ONLY,ht=K.Z_RLE,lt=K.Z_FIXED,ot=K.Z_DEFAULT_STRATEGY,dt=K.Z_UNKNOWN,ut=K.Z_DEFLATED,ft=258,ct=262,pt=103,gt=113,wt=666,vt=function(t,e){return t.msg=Y[e],e},bt=function(t){return(t<<1)-(t>4?9:0)},mt=function(t){for(var e=t.length;--e>=0;)t[e]=0},yt=function(t,e,a){return(e<<t.hash_shift^a)&t.hash_mask},kt=function(t){var e=t.state,a=e.pending;a>t.avail_out&&(a=t.avail_out),0!==a&&(t.output.set(e.pending_buf.subarray(e.pending_out,e.pending_out+a),t.next_out),t.next_out+=a,e.pending_out+=a,t.total_out+=a,t.avail_out-=a,e.pending-=a,0===e.pending&&(e.pending_out=0))},zt=function(t,e){G(t,t.block_start>=0?t.block_start:-1,t.strstart-t.block_start,e),t.block_start=t.strstart,kt(t.strm)},xt=function(t,e){t.pending_buf[t.pending++]=e},At=function(t,e){t.pending_buf[t.pending++]=e>>>8&255,t.pending_buf[t.pending++]=255&e},Et=function(t,e){var a,n,r=t.max_chain_length,i=t.strstart,s=t.prev_length,_=t.nice_match,h=t.strstart>t.w_size-ct?t.strstart-(t.w_size-ct):0,l=t.window,o=t.w_mask,d=t.prev,u=t.strstart+ft,f=l[i+s-1],c=l[i+s];t.prev_length>=t.good_match&&(r>>=2),_>t.lookahead&&(_=t.lookahead);do{if(l[(a=e)+s]===c&&l[a+s-1]===f&&l[a]===l[i]&&l[++a]===l[i+1]){i+=2,a++;do{}while(l[++i]===l[++a]&&l[++i]===l[++a]&&l[++i]===l[++a]&&l[++i]===l[++a]&&l[++i]===l[++a]&&l[++i]===l[++a]&&l[++i]===l[++a]&&l[++i]===l[++a]&&i<u);if(n=ft-(u-i),i=u-ft,n>s){if(t.match_start=e,s=n,n>=_)break;f=l[i+s-1],c=l[i+s]}}}while((e=d[e&o])>h&&0!=--r);return s<=t.lookahead?s:t.lookahead},Zt=function(t){var e,a,n,r,i,s,_,h,l,o,d=t.w_size;do{if(r=t.window_size-t.lookahead-t.strstart,t.strstart>=d+(d-ct)){t.window.set(t.window.subarray(d,d+d),0),t.match_start-=d,t.strstart-=d,t.block_start-=d,e=a=t.hash_size;do{n=t.head[--e],t.head[e]=n>=d?n-d:0}while(--a);e=a=d;do{n=t.prev[--e],t.prev[e]=n>=d?n-d:0}while(--a);r+=d}if(0===t.strm.avail_in)break;if(s=t.strm,_=t.window,h=t.strstart+t.lookahead,l=r,o=void 0,(o=s.avail_in)>l&&(o=l),a=0===o?0:(s.avail_in-=o,_.set(s.input.subarray(s.next_in,s.next_in+o),h),1===s.state.wrap?s.adler=C(s.adler,_,o,h):2===s.state.wrap&&(s.adler=M(s.adler,_,o,h)),s.next_in+=o,s.total_in+=o,o),t.lookahead+=a,t.lookahead+t.insert>=3)for(i=t.strstart-t.insert,t.ins_h=t.window[i],t.ins_h=yt(t,t.ins_h,t.window[i+1]);t.insert&&(t.ins_h=yt(t,t.ins_h,t.window[i+3-1]),t.prev[i&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=i,i++,t.insert--,!(t.lookahead+t.insert<3)););}while(t.lookahead<ct&&0!==t.strm.avail_in)},Ut=function(t,e){for(var a,n;;){if(t.lookahead<ct){if(Zt(t),t.lookahead<ct&&e===q)return 1;if(0===t.lookahead)break}if(a=0,t.lookahead>=3&&(t.ins_h=yt(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),0!==a&&t.strstart-a<=t.w_size-ct&&(t.match_length=Et(t,a)),t.match_length>=3)if(n=X(t,t.strstart-t.match_start,t.match_length-3),t.lookahead-=t.match_length,t.match_length<=t.max_lazy_match&&t.lookahead>=3){t.match_length--;do{t.strstart++,t.ins_h=yt(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart}while(0!=--t.match_length);t.strstart++}else t.strstart+=t.match_length,t.match_length=0,t.ins_h=t.window[t.strstart],t.ins_h=yt(t,t.ins_h,t.window[t.strstart+1]);else n=X(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++;if(n&&(zt(t,!1),0===t.strm.avail_out))return 1}return t.insert=t.strstart<2?t.strstart:2,e===V?(zt(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(zt(t,!1),0===t.strm.avail_out)?1:2},St=function(t,e){for(var a,n,r;;){if(t.lookahead<ct){if(Zt(t),t.lookahead<ct&&e===q)return 1;if(0===t.lookahead)break}if(a=0,t.lookahead>=3&&(t.ins_h=yt(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart),t.prev_length=t.match_length,t.prev_match=t.match_start,t.match_length=2,0!==a&&t.prev_length<t.max_lazy_match&&t.strstart-a<=t.w_size-ct&&(t.match_length=Et(t,a),t.match_length<=5&&(t.strategy===st||3===t.match_length&&t.strstart-t.match_start>4096)&&(t.match_length=2)),t.prev_length>=3&&t.match_length<=t.prev_length){r=t.strstart+t.lookahead-3,n=X(t,t.strstart-1-t.prev_match,t.prev_length-3),t.lookahead-=t.prev_length-1,t.prev_length-=2;do{++t.strstart<=r&&(t.ins_h=yt(t,t.ins_h,t.window[t.strstart+3-1]),a=t.prev[t.strstart&t.w_mask]=t.head[t.ins_h],t.head[t.ins_h]=t.strstart)}while(0!=--t.prev_length);if(t.match_available=0,t.match_length=2,t.strstart++,n&&(zt(t,!1),0===t.strm.avail_out))return 1}else if(t.match_available){if((n=X(t,0,t.window[t.strstart-1]))&&zt(t,!1),t.strstart++,t.lookahead--,0===t.strm.avail_out)return 1}else t.match_available=1,t.strstart++,t.lookahead--}return t.match_available&&(n=X(t,0,t.window[t.strstart-1]),t.match_available=0),t.insert=t.strstart<2?t.strstart:2,e===V?(zt(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(zt(t,!1),0===t.strm.avail_out)?1:2};function Rt(t,e,a,n,r){this.good_length=t,this.max_lazy=e,this.nice_length=a,this.max_chain=n,this.func=r}var Lt=[new Rt(0,0,0,0,(function(t,e){var a=65535;for(a>t.pending_buf_size-5&&(a=t.pending_buf_size-5);;){if(t.lookahead<=1){if(Zt(t),0===t.lookahead&&e===q)return 1;if(0===t.lookahead)break}t.strstart+=t.lookahead,t.lookahead=0;var n=t.block_start+a;if((0===t.strstart||t.strstart>=n)&&(t.lookahead=t.strstart-n,t.strstart=n,zt(t,!1),0===t.strm.avail_out))return 1;if(t.strstart-t.block_start>=t.w_size-ct&&(zt(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===V?(zt(t,!0),0===t.strm.avail_out?3:4):(t.strstart>t.block_start&&(zt(t,!1),t.strm.avail_out),1)})),new Rt(4,4,8,4,Ut),new Rt(4,5,16,8,Ut),new Rt(4,6,32,32,Ut),new Rt(4,4,16,16,St),new Rt(8,16,32,32,St),new Rt(8,16,128,128,St),new Rt(8,32,128,256,St),new Rt(32,128,258,1024,St),new Rt(32,258,258,4096,St)];function Ft(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=ut,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(1146),this.dyn_dtree=new Uint16Array(122),this.bl_tree=new Uint16Array(78),mt(this.dyn_ltree),mt(this.dyn_dtree),mt(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(16),this.heap=new Uint16Array(573),mt(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(573),mt(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}var Tt=function(t){if(!t||!t.state)return vt(t,at);t.total_in=t.total_out=0,t.data_type=dt;var e=t.state;return e.pending=0,e.pending_out=0,e.wrap<0&&(e.wrap=-e.wrap),e.status=e.wrap?42:gt,t.adler=2===e.wrap?0:1,e.last_flush=q,P(e),tt},It=function(t){var e,a=Tt(t);return a===tt&&((e=t.state).window_size=2*e.w_size,mt(e.head),e.max_lazy_match=Lt[e.level].max_lazy,e.good_match=Lt[e.level].good_length,e.nice_match=Lt[e.level].nice_length,e.max_chain_length=Lt[e.level].max_chain,e.strstart=0,e.block_start=0,e.lookahead=0,e.insert=0,e.match_length=e.prev_length=2,e.match_available=0,e.ins_h=0),a},Nt=function(t,e,a,n,r,i){if(!t)return at;var s=1;if(e===it&&(e=6),n<0?(s=0,n=-n):n>15&&(s=2,n-=16),r<1||r>9||a!==ut||n<8||n>15||e<0||e>9||i<0||i>lt)return vt(t,at);8===n&&(n=9);var _=new Ft;return t.state=_,_.strm=t,_.wrap=s,_.gzhead=null,_.w_bits=n,_.w_size=1<<_.w_bits,_.w_mask=_.w_size-1,_.hash_bits=r+7,_.hash_size=1<<_.hash_bits,_.hash_mask=_.hash_size-1,_.hash_shift=~~((_.hash_bits+3-1)/3),_.window=new Uint8Array(2*_.w_size),_.head=new Uint16Array(_.hash_size),_.prev=new Uint16Array(_.w_size),_.lit_bufsize=1<<r+6,_.pending_buf_size=4*_.lit_bufsize,_.pending_buf=new Uint8Array(_.pending_buf_size),_.d_buf=1*_.lit_bufsize,_.l_buf=3*_.lit_bufsize,_.level=e,_.strategy=i,_.method=a,It(t)},Ot={deflateInit:function(t,e){return Nt(t,e,ut,15,8,ot)},deflateInit2:Nt,deflateReset:It,deflateResetKeep:Tt,deflateSetHeader:function(t,e){return t&&t.state?2!==t.state.wrap?at:(t.state.gzhead=e,tt):at},deflate:function(t,e){var a,n;if(!t||!t.state||e>$||e<0)return t?vt(t,at):at;var r=t.state;if(!t.output||!t.input&&0!==t.avail_in||r.status===wt&&e!==V)return vt(t,0===t.avail_out?rt:at);r.strm=t;var i=r.last_flush;if(r.last_flush=e,42===r.status)if(2===r.wrap)t.adler=0,xt(r,31),xt(r,139),xt(r,8),r.gzhead?(xt(r,(r.gzhead.text?1:0)+(r.gzhead.hcrc?2:0)+(r.gzhead.extra?4:0)+(r.gzhead.name?8:0)+(r.gzhead.comment?16:0)),xt(r,255&r.gzhead.time),xt(r,r.gzhead.time>>8&255),xt(r,r.gzhead.time>>16&255),xt(r,r.gzhead.time>>24&255),xt(r,9===r.level?2:r.strategy>=_t||r.level<2?4:0),xt(r,255&r.gzhead.os),r.gzhead.extra&&r.gzhead.extra.length&&(xt(r,255&r.gzhead.extra.length),xt(r,r.gzhead.extra.length>>8&255)),r.gzhead.hcrc&&(t.adler=M(t.adler,r.pending_buf,r.pending,0)),r.gzindex=0,r.status=69):(xt(r,0),xt(r,0),xt(r,0),xt(r,0),xt(r,0),xt(r,9===r.level?2:r.strategy>=_t||r.level<2?4:0),xt(r,3),r.status=gt);else{var s=ut+(r.w_bits-8<<4)<<8;s|=(r.strategy>=_t||r.level<2?0:r.level<6?1:6===r.level?2:3)<<6,0!==r.strstart&&(s|=32),s+=31-s%31,r.status=gt,At(r,s),0!==r.strstart&&(At(r,t.adler>>>16),At(r,65535&t.adler)),t.adler=1}if(69===r.status)if(r.gzhead.extra){for(a=r.pending;r.gzindex<(65535&r.gzhead.extra.length)&&(r.pending!==r.pending_buf_size||(r.gzhead.hcrc&&r.pending>a&&(t.adler=M(t.adler,r.pending_buf,r.pending-a,a)),kt(t),a=r.pending,r.pending!==r.pending_buf_size));)xt(r,255&r.gzhead.extra[r.gzindex]),r.gzindex++;r.gzhead.hcrc&&r.pending>a&&(t.adler=M(t.adler,r.pending_buf,r.pending-a,a)),r.gzindex===r.gzhead.extra.length&&(r.gzindex=0,r.status=73)}else r.status=73;if(73===r.status)if(r.gzhead.name){a=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>a&&(t.adler=M(t.adler,r.pending_buf,r.pending-a,a)),kt(t),a=r.pending,r.pending===r.pending_buf_size)){n=1;break}n=r.gzindex<r.gzhead.name.length?255&r.gzhead.name.charCodeAt(r.gzindex++):0,xt(r,n)}while(0!==n);r.gzhead.hcrc&&r.pending>a&&(t.adler=M(t.adler,r.pending_buf,r.pending-a,a)),0===n&&(r.gzindex=0,r.status=91)}else r.status=91;if(91===r.status)if(r.gzhead.comment){a=r.pending;do{if(r.pending===r.pending_buf_size&&(r.gzhead.hcrc&&r.pending>a&&(t.adler=M(t.adler,r.pending_buf,r.pending-a,a)),kt(t),a=r.pending,r.pending===r.pending_buf_size)){n=1;break}n=r.gzindex<r.gzhead.comment.length?255&r.gzhead.comment.charCodeAt(r.gzindex++):0,xt(r,n)}while(0!==n);r.gzhead.hcrc&&r.pending>a&&(t.adler=M(t.adler,r.pending_buf,r.pending-a,a)),0===n&&(r.status=pt)}else r.status=pt;if(r.status===pt&&(r.gzhead.hcrc?(r.pending+2>r.pending_buf_size&&kt(t),r.pending+2<=r.pending_buf_size&&(xt(r,255&t.adler),xt(r,t.adler>>8&255),t.adler=0,r.status=gt)):r.status=gt),0!==r.pending){if(kt(t),0===t.avail_out)return r.last_flush=-1,tt}else if(0===t.avail_in&&bt(e)<=bt(i)&&e!==V)return vt(t,rt);if(r.status===wt&&0!==t.avail_in)return vt(t,rt);if(0!==t.avail_in||0!==r.lookahead||e!==q&&r.status!==wt){var _=r.strategy===_t?function(t,e){for(var a;;){if(0===t.lookahead&&(Zt(t),0===t.lookahead)){if(e===q)return 1;break}if(t.match_length=0,a=X(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++,a&&(zt(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===V?(zt(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(zt(t,!1),0===t.strm.avail_out)?1:2}(r,e):r.strategy===ht?function(t,e){for(var a,n,r,i,s=t.window;;){if(t.lookahead<=ft){if(Zt(t),t.lookahead<=ft&&e===q)return 1;if(0===t.lookahead)break}if(t.match_length=0,t.lookahead>=3&&t.strstart>0&&(n=s[r=t.strstart-1])===s[++r]&&n===s[++r]&&n===s[++r]){i=t.strstart+ft;do{}while(n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&n===s[++r]&&r<i);t.match_length=ft-(i-r),t.match_length>t.lookahead&&(t.match_length=t.lookahead)}if(t.match_length>=3?(a=X(t,1,t.match_length-3),t.lookahead-=t.match_length,t.strstart+=t.match_length,t.match_length=0):(a=X(t,0,t.window[t.strstart]),t.lookahead--,t.strstart++),a&&(zt(t,!1),0===t.strm.avail_out))return 1}return t.insert=0,e===V?(zt(t,!0),0===t.strm.avail_out?3:4):t.last_lit&&(zt(t,!1),0===t.strm.avail_out)?1:2}(r,e):Lt[r.level].func(r,e);if(3!==_&&4!==_||(r.status=wt),1===_||3===_)return 0===t.avail_out&&(r.last_flush=-1),tt;if(2===_&&(e===J?W(r):e!==$&&(j(r,0,0,!1),e===Q&&(mt(r.head),0===r.lookahead&&(r.strstart=0,r.block_start=0,r.insert=0))),kt(t),0===t.avail_out))return r.last_flush=-1,tt}return e!==V?tt:r.wrap<=0?et:(2===r.wrap?(xt(r,255&t.adler),xt(r,t.adler>>8&255),xt(r,t.adler>>16&255),xt(r,t.adler>>24&255),xt(r,255&t.total_in),xt(r,t.total_in>>8&255),xt(r,t.total_in>>16&255),xt(r,t.total_in>>24&255)):(At(r,t.adler>>>16),At(r,65535&t.adler)),kt(t),r.wrap>0&&(r.wrap=-r.wrap),0!==r.pending?tt:et)},deflateEnd:function(t){if(!t||!t.state)return at;var e=t.state.status;return 42!==e&&69!==e&&73!==e&&91!==e&&e!==pt&&e!==gt&&e!==wt?vt(t,at):(t.state=null,e===gt?vt(t,nt):tt)},deflateSetDictionary:function(t,e){var a=e.length;if(!t||!t.state)return at;var n=t.state,r=n.wrap;if(2===r||1===r&&42!==n.status||n.lookahead)return at;if(1===r&&(t.adler=C(t.adler,e,a,0)),n.wrap=0,a>=n.w_size){0===r&&(mt(n.head),n.strstart=0,n.block_start=0,n.insert=0);var i=new Uint8Array(n.w_size);i.set(e.subarray(a-n.w_size,a),0),e=i,a=n.w_size}var s=t.avail_in,_=t.next_in,h=t.input;for(t.avail_in=a,t.next_in=0,t.input=e,Zt(n);n.lookahead>=3;){var l=n.strstart,o=n.lookahead-2;do{n.ins_h=yt(n,n.ins_h,n.window[l+3-1]),n.prev[l&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=l,l++}while(--o);n.strstart=l,n.lookahead=2,Zt(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=2,n.match_available=0,t.next_in=_,t.input=h,t.avail_in=s,n.wrap=r,tt},deflateInfo:"pako deflate (from Nodeca project)"};for(var Dt=new Uint8Array(256),Bt=0;Bt<256;Bt++)Dt[Bt]=Bt>=252?6:Bt>=248?5:Bt>=240?4:Bt>=224?3:Bt>=192?2:1;Dt[254]=Dt[254]=1;var Ct=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0},Ht=Object.prototype.toString,Mt=K.Z_NO_FLUSH,Yt=K.Z_SYNC_FLUSH,Kt=K.Z_FULL_FLUSH,Pt=K.Z_FINISH,jt=K.Z_OK,Gt=K.Z_STREAM_END,Xt=K.Z_DEFAULT_COMPRESSION,Wt=K.Z_DEFAULT_STRATEGY,qt=K.Z_DEFLATED;function Jt(){this.options={level:Xt,method:qt,chunkSize:16384,windowBits:15,memLevel:8,strategy:Wt};var t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Ct,this.strm.avail_out=0;var e=Ot.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(e!==jt)throw new Error(Y[e]);if(t.header&&Ot.deflateSetHeader(this.strm,t.header),t.dictionary){var a;if(a="[object ArrayBuffer]"===Ht.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,(e=Ot.deflateSetDictionary(this.strm,a))!==jt)throw new Error(Y[e]);this._dict_set=!0}}function Qt(t,e,a){try{t.postMessage({type:"errored",error:e,streamId:a})}catch(n){t.postMessage({type:"errored",error:String(e),streamId:a})}}function Vt(t){var e=t.strm.adler;return new Uint8Array([3,0,e>>>24&255,e>>>16&255,e>>>8&255,255&e])}Jt.prototype.push=function(t,e){var a,n,r=this.strm,i=this.options.chunkSize;if(this.ended)return!1;for(n=e===~~e?e:!0===e?Pt:Mt,"[object ArrayBuffer]"===Ht.call(t)?r.input=new Uint8Array(t):r.input=t,r.next_in=0,r.avail_in=r.input.length;;)if(0===r.avail_out&&(r.output=new Uint8Array(i),r.next_out=0,r.avail_out=i),(n===Yt||n===Kt)&&r.avail_out<=6)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else{if((a=Ot.deflate(r,n))===Gt)return r.next_out>0&&this.onData(r.output.subarray(0,r.next_out)),a=Ot.deflateEnd(this.strm),this.onEnd(a),this.ended=!0,a===jt;if(0!==r.avail_out){if(n>0&&r.next_out>0)this.onData(r.output.subarray(0,r.next_out)),r.avail_out=0;else if(0===r.avail_in)break}else this.onData(r.output)}return!0},Jt.prototype.onData=function(t){this.chunks.push(t)},Jt.prototype.onEnd=function(t){t===jt&&(this.result=function(t){for(var e=0,a=0,n=t.length;a<n;a++)e+=t[a].length;for(var r=new Uint8Array(e),i=0,s=0,_=t.length;i<_;i++){var h=t[i];r.set(h,s),s+=h.length}return r}(this.chunks)),this.chunks=[],this.err=t,this.msg=this.strm.msg},function(e){void 0===e&&(e=self);try{var a=new Map;e.addEventListener("message",(function(n){try{var r=function(e,a){switch(a.action){case"init":return{type:"initialized",version:"5.1.0"};case"write":var n=e.get(a.streamId);n||(n=new Jt,e.set(a.streamId,n));var r=n.chunks.length,i=function(t){if("function"==typeof TextEncoder&&TextEncoder.prototype.encode)return(new TextEncoder).encode(t);var e,a,n,r,i,s=t.length,_=0;for(r=0;r<s;r++)55296==(64512&(a=t.charCodeAt(r)))&&r+1<s&&56320==(64512&(n=t.charCodeAt(r+1)))&&(a=65536+(a-55296<<10)+(n-56320),r++),_+=a<128?1:a<2048?2:a<65536?3:4;for(e=new Uint8Array(_),i=0,r=0;i<_;r++)55296==(64512&(a=t.charCodeAt(r)))&&r+1<s&&56320==(64512&(n=t.charCodeAt(r+1)))&&(a=65536+(a-55296<<10)+(n-56320),r++),a<128?e[i++]=a:a<2048?(e[i++]=192|a>>>6,e[i++]=128|63&a):a<65536?(e[i++]=224|a>>>12,e[i++]=128|a>>>6&63,e[i++]=128|63&a):(e[i++]=240|a>>>18,e[i++]=128|a>>>12&63,e[i++]=128|a>>>6&63,e[i++]=128|63&a);return e}(a.data);return n.push(i,K.Z_SYNC_FLUSH),{type:"wrote",id:a.id,streamId:a.streamId,result:t(n.chunks.slice(r)),trailer:Vt(n),additionalBytesCount:i.length};case"reset":e.delete(a.streamId)}}(a,n.data);r&&e.postMessage(r)}catch(t){Qt(e,t,n.data&&"streamId"in n.data?n.data.streamId:void 0)}}))}catch(t){Qt(e,t)}}()}();'])))}var M={status:0};function Nf(t,e,r,n){switch(n===void 0&&(n=oi),M.status===0&&kf(t,e,n),M.status){case 1:return M.initializationFailureCallbacks.push(r),M.worker;case 3:return M.worker}}function Rn(){return M.status}function kf(t,e,r){r===void 0&&(r=oi);try{var n=r(t),a=P(t,n,"error",function(s){lr(t,e,s)}).stop,i=P(t,n,"message",function(s){var u=s.data;u.type==="errored"?lr(t,e,u.error,u.streamId):u.type==="initialized"&&Mf(u.version)}).stop;n.postMessage({action:"init"}),H(function(){return Lf(e)},xf);var o=function(){a(),i()};M={status:1,worker:n,stop:o,initializationFailureCallbacks:[]}}catch(s){lr(t,e,s)}}function Lf(t){M.status===1&&(O.error("".concat(t," failed to start: a timeout occurred while initializing the Worker")),M.initializationFailureCallbacks.forEach(function(e){return e()}),M={status:2})}function Mf(t){M.status===1&&(M={status:3,worker:M.worker,stop:M.stop,version:t})}function lr(t,e,r,n){if(M.status===1||M.status===0){if(O.error("".concat(e," failed to start: an error occurred while creating the Worker:"),r),r instanceof Event||r instanceof Error&&Uf(r.message)){var a=void 0;t.workerUrl?a="Please make sure the Worker URL ".concat(t.workerUrl," is correct and CSP is correctly configured."):a="Please make sure CSP is correctly configured.",O.error("".concat(a," See documentation at https://docs.datadoghq.com/integrations/content_security_policy_logs/#use-csp-with-real-user-monitoring-and-session-replay"))}else Ue(r);M.status===1&&M.initializationFailureCallbacks.forEach(function(i){return i()}),M={status:2}}else Ue(r,{worker_version:M.status===3&&M.version,stream_id:n})}function Uf(t){return _t(t,"Content Security Policy")||_t(t,"requires 'TrustedScriptURL'")}function Pf(t,e){if(qt()||!ii())return{start:N,stop:N,getReplayStats:function(){},onRumStart:N,isRecording:function(){return!1},getSessionReplayLink:function(){}};var r={status:1},n=function(){r={status:1}},a=function(){r={status:0}};return{start:function(){return n()},stop:function(){return a()},getSessionReplayLink:function(i,o,s){return Af(i,o,s,r.status!==0)},onRumStart:function(i,o,s,u){o.startSessionReplayRecordingManually&&(r={status:0}),i.subscribe(7,function(){(r.status===2||r.status===3)&&(a(),r={status:1})}),i.subscribe(8,function(){r.status===1&&n()}),n=function(){var c=s.findTrackedSession();if(!c||!c.sessionReplayAllowed){r={status:1};return}r.status===2||r.status===3||(r={status:2},Ur(o,"interactive",function(){if(r.status===2){var l=Nf(o,"Datadog Session Replay",function(){a()},e);if(!l){r={status:0};return}var d=t(i,o,s,u,Of(o,l,1)).stop;r={status:3,stopRecording:d}}}))},a=function(){r.status!==0&&(r.status===3&&r.stopRecording(),r={status:0})},r.status===1&&n()},isRecording:function(){return Rn()===3&&r.status===3},getReplayStats:function(i){return Rn()===3?bf(i):void 0}}}var Df=Pf(If),si=du(Jl,Df);Ko(It(),"DD_RUM",si);const Ff=()=>window.location.hostname.toLocaleLowerCase().replace(/[^.a-z]/,""),Bf=()=>"2.85.47721".toLocaleLowerCase().replace(/[^0-9a-z.]/,""),zf=()=>si.init({applicationId:"cb2e3b66-3ab8-404f-bf6f-f988a2c063c4",clientToken:"pub457932dc74411c968aec6f5d9f0ba68e",site:"datadoghq.com",service:"apollo-benefits",env:`${Ff()}`,version:`${Bf()}`,sessionSampleRate:100,sessionReplaySampleRate:20,trackUserInteractions:!0,trackResources:!0,trackLongTasks:!0,defaultPrivacyLevel:"mask-user-input",beforeSend:(t,e)=>(t.view.url=t.view.url.replace("#",""),!0)});export{zf as i};