(()=>{var t={69089:t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n="",r=void 0!==e[5];return e[4]&&(n+="@supports (".concat(e[4],") {")),e[2]&&(n+="@media ".concat(e[2]," {")),r&&(n+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),n+=t(e),r&&(n+="}"),e[2]&&(n+="}"),e[4]&&(n+="}"),n})).join("")},e.i=function(t,n,r,i,o){"string"==typeof t&&(t=[[null,t,void 0]]);var a={};if(r)for(var s=0;s<this.length;s++){var u=this[s][0];null!=u&&(a[u]=!0)}for(var c=0;c<t.length;c++){var l=[].concat(t[c]);r&&a[l[0]]||(void 0!==o&&(void 0===l[5]||(l[1]="@layer".concat(l[5].length>0?" ".concat(l[5]):""," {").concat(l[1],"}")),l[5]=o),n&&(l[2]?(l[1]="@media ".concat(l[2]," {").concat(l[1],"}"),l[2]=n):l[2]=n),i&&(l[4]?(l[1]="@supports (".concat(l[4],") {").concat(l[1],"}"),l[4]=i):l[4]="".concat(i)),e.push(l))}},e}},9248:t=>{"use strict";t.exports=function(t){return t[1]}},56654:function(t,e,n){"use strict";var r=n(49091);!function(t){function e(){}function n(){}var r=String.fromCharCode,i={}.toString,o=i.call(t.SharedArrayBuffer),a=i(),s=t.Uint8Array,u=s||Array,c=s?ArrayBuffer:u,l=c.isView||function(t){return t&&"length"in t},d=i.call(c.prototype);c=n.prototype;var f=t.TextEncoder,h=new(s?Uint16Array:u)(32);e.prototype.decode=function(t){if(!l(t)){var e=i.call(t);if(e!==d&&e!==o&&e!==a)throw TypeError("Failed to execute 'decode' on 'TextDecoder': The provided value is not of type '(ArrayBuffer or ArrayBufferView)'");t=s?new u(t):t||[]}for(var n,c,f,p=e="",v=0,m=0|t.length,_=m-32|0,g=0,y=0,b=0,w=-1;v<m;){for(n=v<=_?32:m-v|0;b<n;v=v+1|0,b=b+1|0){switch((c=255&t[v])>>4){case 15:if(2!=(f=255&t[v=v+1|0])>>6||247<c){v=v-1|0;break}g=(7&c)<<6|63&f,y=5,c=256;case 14:g<<=6,g|=(15&c)<<6|63&(f=255&t[v=v+1|0]),y=2==f>>6?y+4|0:24,c=c+256&768;case 13:case 12:g<<=6,g|=(31&c)<<6|63&(f=255&t[v=v+1|0]),y=y+7|0,v<m&&2==f>>6&&g>>y&&1114112>g?(c=g,0<=(g=g-65536|0)&&(w=55296+(g>>10)|0,c=56320+(1023&g)|0,31>b?(h[b]=w,b=b+1|0,w=-1):(f=w,w=c,c=f))):(v=v-(c>>=8)-1|0,c=65533),g=y=0,n=v<=_?32:m-v|0;default:h[b]=c;continue;case 11:case 10:case 9:case 8:}h[b]=65533}if(p+=r(h[0],h[1],h[2],h[3],h[4],h[5],h[6],h[7],h[8],h[9],h[10],h[11],h[12],h[13],h[14],h[15],h[16],h[17],h[18],h[19],h[20],h[21],h[22],h[23],h[24],h[25],h[26],h[27],h[28],h[29],h[30],h[31]),32>b&&(p=p.slice(0,b-32|0)),v<m){if(h[0]=w,b=~w>>>31,w=-1,p.length<e.length)continue}else-1!==w&&(p+=r(w));e+=p,p=""}return e},c.encode=function(t){var e,n=0|(t=void 0===t?"":""+t).length,r=new u(8+(n<<1)|0),i=0,o=!s;for(e=0;e<n;e=e+1|0,i=i+1|0){var a=0|t.charCodeAt(e);if(127>=a)r[i]=a;else{if(2047>=a)r[i]=192|a>>6;else{t:{if(55296<=a)if(56319>=a){var c=0|t.charCodeAt(e=e+1|0);if(56320<=c&&57343>=c){if(65535<(a=(a<<10)+c-56613888|0)){r[i]=240|a>>18,r[i=i+1|0]=128|a>>12&63,r[i=i+1|0]=128|a>>6&63,r[i=i+1|0]=128|63&a;continue}break t}a=65533}else 57343>=a&&(a=65533);!o&&e<<1<i&&e<<1<(i-7|0)&&(o=!0,(c=new u(3*n)).set(r),r=c)}r[i]=224|a>>12,r[i=i+1|0]=128|a>>6&63}r[i=i+1|0]=128|63&a}}return s?r.subarray(0,i):r.slice(0,i)},f||(t.TextDecoder=e,t.TextEncoder=n)}(""+void 0==(void 0===n.g?"undefined":r(n.g))?""+void 0==("undefined"==typeof self?"undefined":r(self))?this:self:n.g)},25330:(t,e,n)=>{"use strict";n.d(e,{Ay:()=>Ln});var r=n(60901);function i(t){var e=arguments.length,n=void 0,r=void 0;for(n=1;n<e;n++)for(r in arguments[n])t[r]=arguments[n][r];return t}function o(t,e){var n,r,o=arguments.length,a=void 0;for(t.prototype=(n=e.prototype,(r=function(){}).prototype=n,new r),t.prototype.constructor=t,a=2;a<o;a++)i(t.prototype,arguments[a]);return t}t=n.hmd(t);var a=["<nothing>"],s="end",u="value",c="error",l="any";function d(t,e){var n=void 0,r=void 0,i=void 0,o=void 0;if(0===t.length)return e;if(0===e.length)return t;for(o=0,n=new Array(t.length+e.length),r=t.length,i=0;i<r;i++,o++)n[o]=t[i];for(r=e.length,i=0;i<r;i++,o++)n[o]=e[i];return n}function f(t,e){var n=t.length,r=void 0;for(r=0;r<n;r++)if(t[r]===e)return r;return-1}function h(t,e){var n=t.length,r=void 0;for(r=0;r<n;r++)if(e(t[r]))return r;return-1}function p(t){var e=t.length,n=new Array(e),r=void 0;for(r=0;r<e;r++)n[r]=t[r];return n}function v(t,e){var n=t.length,r=void 0,i=void 0,o=void 0;if(e>=0&&e<n){if(1===n)return[];for(r=new Array(n-1),i=0,o=0;i<n;i++)i!==e&&(r[o]=t[i],o++);return r}return t}function m(t,e){var n=t.length,r=new Array(n),i=void 0;for(i=0;i<n;i++)r[i]=e(t[i]);return r}function _(t,e,n){t===l?e(n):t===n.type&&(t===u||t===c?e(n.value):e())}function g(){this._items=[],this._spies=[],this._inLoop=0,this._removedItems=null}function y(){this._dispatcher=new g,this._active=!1,this._alive=!0,this._activating=!1,this._logHandlers=null,this._spyHandlers=null}function b(){y.call(this)}function w(){y.call(this),this._currentEvent=null}i(g.prototype,{add:function(t,e){return this._items=d(this._items,[{type:t,fn:e}]),this._items.length},remove:function(t,e){var n=h(this._items,(function(n){return n.type===t&&n.fn===e}));return 0!==this._inLoop&&-1!==n&&(null===this._removedItems&&(this._removedItems=[]),this._removedItems.push(this._items[n])),this._items=v(this._items,n),this._items.length},addSpy:function(t){return this._spies=d(this._spies,[t]),this._spies.length},removeSpy:function(t){return this._spies=v(this._spies,this._spies.indexOf(t)),this._spies.length},dispatch:function(t){this._inLoop++;for(var e=0,n=this._spies;null!==this._spies&&e<n.length;e++)n[e](t);for(var r=0,i=this._items;r<i.length&&null!==this._items;r++)null!==this._removedItems&&(o=this._removedItems,a=i[r],-1!==f(o,a))||_(i[r].type,i[r].fn,t);var o,a;this._inLoop--,0===this._inLoop&&(this._removedItems=null)},cleanup:function(){this._items=null,this._spies=null}}),i(y.prototype,{_name:"observable",_onActivation:function(){},_onDeactivation:function(){},_setActive:function(t){this._active!==t&&(this._active=t,t?(this._activating=!0,this._onActivation(),this._activating=!1):this._onDeactivation())},_clear:function(){this._setActive(!1),this._dispatcher.cleanup(),this._dispatcher=null,this._logHandlers=null},_emit:function(t,e){switch(t){case u:return this._emitValue(e);case c:return this._emitError(e);case s:return this._emitEnd()}},_emitValue:function(t){this._alive&&this._dispatcher.dispatch({type:u,value:t})},_emitError:function(t){this._alive&&this._dispatcher.dispatch({type:c,value:t})},_emitEnd:function(){this._alive&&(this._alive=!1,this._dispatcher.dispatch({type:s}),this._clear())},_on:function(t,e){return this._alive?(this._dispatcher.add(t,e),this._setActive(!0)):_(t,e,{type:s}),this},_off:function(t,e){this._alive&&(0===this._dispatcher.remove(t,e)&&this._setActive(!1));return this},onValue:function(t){return this._on(u,t)},onError:function(t){return this._on(c,t)},onEnd:function(t){return this._on(s,t)},onAny:function(t){return this._on(l,t)},offValue:function(t){return this._off(u,t)},offError:function(t){return this._off(c,t)},offEnd:function(t){return this._off(s,t)},offAny:function(t){return this._off(l,t)},observe:function(t,e,n){var r=this,i=!1,o=t&&"function"!=typeof t?t:{value:t,error:e,end:n},a=function(t){t.type===s&&(i=!0),t.type===u&&o.value?o.value(t.value):t.type===c&&o.error?o.error(t.value):t.type===s&&o.end&&o.end(t.value)};return this.onAny(a),{unsubscribe:function(){i||(r.offAny(a),i=!0)},get closed(){return i}}},_ofSameType:function(t,e){return t.prototype.getType()===this.getType()?t:e},setName:function(t,e){return this._name=e?t._name+"."+e:t,this},log:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.toString(),e=void 0,n=function(n){var r="<"+n.type+(e?":current":"")+">";n.type===s?console.log(t,r):console.log(t,r,n.value)};return this._alive&&(this._logHandlers||(this._logHandlers=[]),this._logHandlers.push({name:t,handler:n})),e=!0,this.onAny(n),e=!1,this},offLog:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.toString();if(this._logHandlers){var e=h(this._logHandlers,(function(e){return e.name===t}));-1!==e&&(this.offAny(this._logHandlers[e].handler),this._logHandlers.splice(e,1))}return this},spy:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.toString(),e=function(e){var n="<"+e.type+">";e.type===s?console.log(t,n):console.log(t,n,e.value)};return this._alive&&(this._spyHandlers||(this._spyHandlers=[]),this._spyHandlers.push({name:t,handler:e}),this._dispatcher.addSpy(e)),this},offSpy:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.toString();if(this._spyHandlers){var e=h(this._spyHandlers,(function(e){return e.name===t}));-1!==e&&(this._dispatcher.removeSpy(this._spyHandlers[e].handler),this._spyHandlers.splice(e,1))}return this}}),y.prototype.toString=function(){return"["+this._name+"]"},o(b,y,{_name:"stream",getType:function(){return"stream"}}),o(w,y,{_name:"property",_emitValue:function(t){this._alive&&(this._currentEvent={type:u,value:t},this._activating||this._dispatcher.dispatch({type:u,value:t}))},_emitError:function(t){this._alive&&(this._currentEvent={type:c,value:t},this._activating||this._dispatcher.dispatch({type:c,value:t}))},_emitEnd:function(){this._alive&&(this._alive=!1,this._activating||this._dispatcher.dispatch({type:s}),this._clear())},_on:function(t,e){return this._alive&&(this._dispatcher.add(t,e),this._setActive(!0)),null!==this._currentEvent&&_(t,e,this._currentEvent),this._alive||_(t,e,{type:s}),this},getType:function(){return"property"}});var S=new b;function E(){return S}function O(t){function e(t,e){var n=this;b.call(this),this._wait=t,this._intervalId=null,this._$onTick=function(){return n._onTick()},this._init(e)}return o(e,b,{_init:function(){},_free:function(){},_onTick:function(){},_onActivation:function(){this._intervalId=setInterval(this._$onTick,this._wait)},_onDeactivation:function(){null!==this._intervalId&&(clearInterval(this._intervalId),this._intervalId=null)},_clear:function(){b.prototype._clear.call(this),this._$onTick=null,this._free()}},t),e}S._emitEnd(),S._name="never";var k=O({_name:"later",_init:function(t){var e=t.x;this._x=e},_free:function(){this._x=null},_onTick:function(){this._emitValue(this._x),this._emitEnd()}});var A=O({_name:"interval",_init:function(t){var e=t.x;this._x=e},_free:function(){this._x=null},_onTick:function(){this._emitValue(this._x)}});var T=O({_name:"sequentially",_init:function(t){var e=t.xs;this._xs=p(e)},_free:function(){this._xs=null},_onTick:function(){1===this._xs.length?(this._emitValue(this._xs[0]),this._emitEnd()):this._emitValue(this._xs.shift())}});var x=O({_name:"fromPoll",_init:function(t){var e=t.fn;this._fn=e},_free:function(){this._fn=null},_onTick:function(){var t=this._fn;this._emitValue(t())}});function C(t){function e(e){return t._emitValue(e),t._active}function n(e){return t._emit(e.type,e.value),t._active}return{value:e,error:function(e){return t._emitError(e),t._active},end:function(){return t._emitEnd(),t._active},event:n,emit:e,emitEvent:n}}var I=O({_name:"withInterval",_init:function(t){var e=t.fn;this._fn=e,this._emitter=C(this)},_free:function(){this._fn=null,this._emitter=null},_onTick:function(){(0,this._fn)(this._emitter)}});function P(t){b.call(this),this._fn=t,this._unsubscribe=null}function R(t){return new P(t)}function N(t,e){switch(e){case 0:return function(){return t()};case 1:return function(e){return t(e[0])};case 2:return function(e){return t(e[0],e[1])};case 3:return function(e){return t(e[0],e[1],e[2])};case 4:return function(e){return t(e[0],e[1],e[2],e[3])};default:return function(e){return t.apply(null,e)}}}o(P,b,{_name:"stream",_onActivation:function(){var t=(0,this._fn)(C(this));this._unsubscribe="function"==typeof t?t:null,this._active||this._callUnsubscribe()},_callUnsubscribe:function(){null!==this._unsubscribe&&(this._unsubscribe(),this._unsubscribe=null)},_onDeactivation:function(){this._callUnsubscribe()},_clear:function(){b.prototype._clear.call(this),this._fn=null}});var L=[["addEventListener","removeEventListener"],["addListener","removeListener"],["on","off"]];function M(t){this._currentEvent={type:"value",value:t,current:!0}}function D(t){return new M(t)}function j(t){this._currentEvent={type:"error",value:t,current:!0}}function U(t,e){return function(n,r){var i=this;t.call(this),this._source=n,this._name=n._name+"."+e,this._init(r),this._$handleAny=function(t){return i._handleAny(t)}}}function F(t){return{_init:function(){},_free:function(){},_handleValue:function(t){this._emitValue(t)},_handleError:function(t){this._emitError(t)},_handleEnd:function(){this._emitEnd()},_handleAny:function(t){switch(t.type){case u:return this._handleValue(t.value);case c:return this._handleError(t.value);case s:return this._handleEnd()}},_onActivation:function(){this._source.onAny(this._$handleAny)},_onDeactivation:function(){this._source.offAny(this._$handleAny)},_clear:function(){t.prototype._clear.call(this),this._source=null,this._$handleAny=null,this._free()}}}function B(t,e){var n=U(b,t);return o(n,b,F(b),e),n}function V(t,e){var n=U(w,t);return o(n,w,F(w),e),n}o(M,w,{_name:"constant",_active:!1,_activating:!1,_alive:!1,_dispatcher:null,_logHandlers:null}),o(j,w,{_name:"constantError",_active:!1,_activating:!1,_alive:!1,_dispatcher:null,_logHandlers:null});var z=V("toProperty",{_init:function(t){var e=t.fn;this._getInitialCurrent=e},_onActivation:function(){if(null!==this._getInitialCurrent){var t=this._getInitialCurrent;this._emitValue(t())}this._source.onAny(this._$handleAny)}});function q(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(null!==e&&"function"!=typeof e)throw new Error("You should call toProperty() with a function or no arguments.");return new z(t,{fn:e})}var H=B("changes",{_handleValue:function(t){this._activating||this._emitValue(t)},_handleError:function(t){this._activating||this._emitError(t)}});function G(){if("function"==typeof Promise)return Promise;throw new Error("There isn't default Promise, use shim or parameter")}var Y=function(t){var e,n=t.Symbol;return"function"==typeof n?n.observable?e=n.observable:(e=n("observable"),n.observable=e):e="@@observable",e}("undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==n.g?n.g:t),K=Y.default?Y.default:Y;function W(t){this._observable=t.takeErrors(1)}function $(){return new W(this)}function Z(t,e,n){for(var r in t)t.hasOwnProperty(r)&&(e.push(r),n.push(t[r]))}function J(t,e,n){var r=this;b.call(this),this._activeCount=t.length,this._sources=d(t,e),this._combinator=n,this._aliveCount=0,this._latestValues=new Array(this._sources.length),this._latestErrors=new Array(this._sources.length),function(t,e){var n=t.length,r=void 0;for(r=0;r<n;r++)t[r]=e}(this._latestValues,a),this._emitAfterActivation=!1,this._endAfterActivation=!1,this._latestErrorIndex=0,this._$handlers=[];for(var i=function(t){r._$handlers.push((function(e){return r._handleAny(t,e)}))},o=0;o<this._sources.length;o++)i(o)}function X(t,e,n){return"function"==typeof e&&(n=e,e=void 0),Array.isArray(t)?function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments[2];if(!Array.isArray(e))throw new Error("Combine can only combine active and passive collections of the same type.");return n=n?N(n,t.length+e.length):function(t){return t},0===t.length?E():new J(t,e,n)}(t,e,n):function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments[2];if("object"!==(0,r.A)(e)||Array.isArray(e))throw new Error("Combine can only combine active and passive collections of the same type.");var i=[],o=[],a=[];return Z(t,i,o),Z(e,i,a),0===o.length?E():new J(o,a,(function(t){for(var e={},r=t.length-1;0<=r;r--)e[i[r]]=t[r];return n?n(e):e}))}(t,e,n)}i(W.prototype,{subscribe:function(t,e,n){var r=this,i="function"==typeof t?{next:t,error:e,complete:n}:t,o=function(t){t.type===s&&(a=!0),t.type===u&&i.next?i.next(t.value):t.type===c&&i.error?i.error(t.value):t.type===s&&i.complete&&i.complete(t.value)};this._observable.onAny(o);var a=!1;return{unsubscribe:function(){a=!0,r._observable.offAny(o)},get closed(){return a}}}}),W.prototype[K]=function(){return this},o(J,b,{_name:"combine",_onActivation:function(){this._aliveCount=this._activeCount;for(var t=this._activeCount;t<this._sources.length;t++)this._sources[t].onAny(this._$handlers[t]);for(var e=0;e<this._activeCount;e++)this._sources[e].onAny(this._$handlers[e]);this._emitAfterActivation&&(this._emitAfterActivation=!1,this._emitIfFull()),this._endAfterActivation&&this._emitEnd()},_onDeactivation:function(){var t=this._sources.length,e=void 0;for(e=0;e<t;e++)this._sources[e].offAny(this._$handlers[e])},_emitIfFull:function(){for(var t=!0,e=!1,n=this._latestValues.length,r=new Array(n),i=new Array(n),o=0;o<n;o++)r[o]=this._latestValues[o],i[o]=this._latestErrors[o],r[o]===a&&(t=!1),void 0!==i[o]&&(e=!0);if(t){var s=this._combinator;this._emitValue(s(r))}e&&this._emitError(function(t){for(var e=void 0,n=0;n<t.length;n++)void 0!==t[n]&&(void 0===e||e.index<t[n].index)&&(e=t[n]);return e.error}(i))},_handleAny:function(t,e){e.type===u||e.type===c?(e.type===u&&(this._latestValues[t]=e.value,this._latestErrors[t]=void 0),e.type===c&&(this._latestValues[t]=a,this._latestErrors[t]={index:this._latestErrorIndex++,error:e.value}),t<this._activeCount&&(this._activating?this._emitAfterActivation=!0:this._emitIfFull())):t<this._activeCount&&(this._aliveCount--,0===this._aliveCount&&(this._activating?this._endAfterActivation=!0:this._emitEnd()))},_clear:function(){b.prototype._clear.call(this),this._sources=null,this._latestValues=null,this._latestErrors=null,this._combinator=null,this._$handlers=null}});var Q={empty:function(){return E()},concat:function(t,e){return t.merge(e)},of:function(t){return D(t)},map:function(t,e){return e.map(t)},bimap:function(t,e,n){return n.mapErrors(t).map(e)},ap:function(t,e){return X([t,e],(function(t,e){return t(e)}))},chain:function(t,e){return e.flatMap(t)}},tt=Object.freeze({Observable:Q}),et={_init:function(t){var e=t.fn;this._fn=e},_free:function(){this._fn=null},_handleValue:function(t){var e=this._fn;this._emitValue(e(t))}},nt=B("map",et),rt=V("map",et),it=function(t){return t};function ot(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:it;return new(t._ofSameType(nt,rt))(t,{fn:e})}var at={_init:function(t){var e=t.fn;this._fn=e},_free:function(){this._fn=null},_handleValue:function(t){(0,this._fn)(t)&&this._emitValue(t)}},st=B("filter",at),ut=V("filter",at),ct=function(t){return t};var lt={_init:function(t){var e=t.n;this._n=e,e<=0&&this._emitEnd()},_handleValue:function(t){0!==this._n&&(this._n--,this._emitValue(t),0===this._n&&this._emitEnd())}},dt=B("take",lt),ft=V("take",lt);var ht={_init:function(t){var e=t.n;this._n=e,e<=0&&this._emitEnd()},_handleError:function(t){0!==this._n&&(this._n--,this._emitError(t),0===this._n&&this._emitEnd())}},pt=B("takeErrors",ht),vt=V("takeErrors",ht);var mt={_init:function(t){var e=t.fn;this._fn=e},_free:function(){this._fn=null},_handleValue:function(t){(0,this._fn)(t)?this._emitValue(t):this._emitEnd()}},_t=B("takeWhile",mt),gt=V("takeWhile",mt),yt=function(t){return t};var bt={_init:function(){this._lastValue=a},_free:function(){this._lastValue=null},_handleValue:function(t){this._lastValue=t},_handleEnd:function(){this._lastValue!==a&&this._emitValue(this._lastValue),this._emitEnd()}},wt=B("last",bt),St=V("last",bt);var Et={_init:function(t){var e=t.n;this._n=Math.max(0,e)},_handleValue:function(t){0===this._n?this._emitValue(t):this._n--}},Ot=B("skip",Et),kt=V("skip",Et);var At={_init:function(t){var e=t.fn;this._fn=e},_free:function(){this._fn=null},_handleValue:function(t){var e=this._fn;null===this._fn||e(t)||(this._fn=null),null===this._fn&&this._emitValue(t)}},Tt=B("skipWhile",At),xt=V("skipWhile",At),Ct=function(t){return t};var It={_init:function(t){var e=t.fn;this._fn=e,this._prev=a},_free:function(){this._fn=null,this._prev=null},_handleValue:function(t){var e=this._fn;this._prev!==a&&e(this._prev,t)||(this._prev=t,this._emitValue(t))}},Pt=B("skipDuplicates",It),Rt=V("skipDuplicates",It),Nt=function(t,e){return t===e};function Lt(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Nt;return new(t._ofSameType(Pt,Rt))(t,{fn:e})}var Mt={_init:function(t){var e=t.fn,n=t.seed;this._fn=e,this._prev=n},_free:function(){this._prev=null,this._fn=null},_handleValue:function(t){if(this._prev!==a){var e=this._fn;this._emitValue(e(this._prev,t))}this._prev=t}},Dt=B("diff",Mt),jt=V("diff",Mt);function Ut(t,e){return[t,e]}var Ft=V("scan",{_init:function(t){var e=t.fn,n=t.seed;this._fn=e,this._seed=n,n!==a&&this._emitValue(n)},_free:function(){this._fn=null,this._seed=null},_handleValue:function(t){var e=this._fn;null===this._currentEvent||this._currentEvent.type===c?this._emitValue(this._seed===a?t:e(this._seed,t)):this._emitValue(e(this._currentEvent.value,t))}});var Bt=B("flatten",{_init:function(t){var e=t.fn;this._fn=e},_free:function(){this._fn=null},_handleValue:function(t){for(var e=(0,this._fn)(t),n=0;n<e.length;n++)this._emitValue(e[n])}}),Vt=function(t){return t};var zt={},qt={_init:function(t){var e=this,n=t.wait;this._wait=Math.max(0,n),this._buff=[],this._$shiftBuff=function(){var t=e._buff.shift();t===zt?e._emitEnd():e._emitValue(t)}},_free:function(){this._buff=null,this._$shiftBuff=null},_handleValue:function(t){this._activating?this._emitValue(t):(this._buff.push(t),setTimeout(this._$shiftBuff,this._wait))},_handleEnd:function(){this._activating?this._emitEnd():(this._buff.push(zt),setTimeout(this._$shiftBuff,this._wait))}},Ht=B("delay",qt),Gt=V("delay",qt);var Yt=Date.now?function(){return Date.now()}:function(){return(new Date).getTime()},Kt={_init:function(t){var e=this,n=t.wait,r=t.leading,i=t.trailing;this._wait=Math.max(0,n),this._leading=r,this._trailing=i,this._trailingValue=null,this._timeoutId=null,this._endLater=!1,this._lastCallTime=0,this._$trailingCall=function(){return e._trailingCall()}},_free:function(){this._trailingValue=null,this._$trailingCall=null},_handleValue:function(t){if(this._activating)this._emitValue(t);else{var e=Yt();0!==this._lastCallTime||this._leading||(this._lastCallTime=e);var n=this._wait-(e-this._lastCallTime);n<=0?(this._cancelTrailing(),this._lastCallTime=e,this._emitValue(t)):this._trailing&&(this._cancelTrailing(),this._trailingValue=t,this._timeoutId=setTimeout(this._$trailingCall,n))}},_handleEnd:function(){this._activating?this._emitEnd():this._timeoutId?this._endLater=!0:this._emitEnd()},_cancelTrailing:function(){null!==this._timeoutId&&(clearTimeout(this._timeoutId),this._timeoutId=null)},_trailingCall:function(){this._emitValue(this._trailingValue),this._timeoutId=null,this._trailingValue=null,this._lastCallTime=this._leading?Yt():0,this._endLater&&this._emitEnd()}},Wt=B("throttle",Kt),$t=V("throttle",Kt);var Zt={_init:function(t){var e=this,n=t.wait,r=t.immediate;this._wait=Math.max(0,n),this._immediate=r,this._lastAttempt=0,this._timeoutId=null,this._laterValue=null,this._endLater=!1,this._$later=function(){return e._later()}},_free:function(){this._laterValue=null,this._$later=null},_handleValue:function(t){this._activating?this._emitValue(t):(this._lastAttempt=Yt(),this._immediate&&!this._timeoutId&&this._emitValue(t),this._timeoutId||(this._timeoutId=setTimeout(this._$later,this._wait)),this._immediate||(this._laterValue=t))},_handleEnd:function(){this._activating?this._emitEnd():this._timeoutId&&!this._immediate?this._endLater=!0:this._emitEnd()},_later:function(){var t=Yt()-this._lastAttempt;if(t<this._wait&&t>=0)this._timeoutId=setTimeout(this._$later,this._wait-t);else{if(this._timeoutId=null,!this._immediate){var e=this._laterValue;this._laterValue=null,this._emitValue(e)}this._endLater&&this._emitEnd()}}},Jt=B("debounce",Zt),Xt=V("debounce",Zt);var Qt={_init:function(t){var e=t.fn;this._fn=e},_free:function(){this._fn=null},_handleError:function(t){var e=this._fn;this._emitError(e(t))}},te=B("mapErrors",Qt),ee=V("mapErrors",Qt),ne=function(t){return t};var re={_init:function(t){var e=t.fn;this._fn=e},_free:function(){this._fn=null},_handleError:function(t){(0,this._fn)(t)&&this._emitError(t)}},ie=B("filterErrors",re),oe=V("filterErrors",re),ae=function(t){return t};var se={_handleValue:function(){}},ue=B("ignoreValues",se),ce=V("ignoreValues",se);var le={_handleError:function(){}},de=B("ignoreErrors",le),fe=V("ignoreErrors",le);var he={_handleEnd:function(){}},pe=B("ignoreEnd",he),ve=V("ignoreEnd",he);var me={_init:function(t){var e=t.fn;this._fn=e},_free:function(){this._fn=null},_handleEnd:function(){var t=this._fn;this._emitValue(t()),this._emitEnd()}},_e=B("beforeEnd",me),ge=V("beforeEnd",me);var ye={_init:function(t){var e=t.min,n=t.max;this._max=n,this._min=e,this._buff=[]},_free:function(){this._buff=null},_handleValue:function(t){this._buff=function(t,e,n){var r=Math.min(n,t.length+1),i=t.length-r+1,o=new Array(r),a=void 0;for(a=i;a<r;a++)o[a-i]=t[a];return o[r-1]=e,o}(this._buff,t,this._max),this._buff.length>=this._min&&this._emitValue(this._buff)}},be=B("slidingWindow",ye),we=V("slidingWindow",ye);var Se={_init:function(t){var e=t.fn,n=t.flushOnEnd;this._fn=e,this._flushOnEnd=n,this._buff=[]},_free:function(){this._buff=null},_flush:function(){null!==this._buff&&0!==this._buff.length&&(this._emitValue(this._buff),this._buff=[])},_handleValue:function(t){this._buff.push(t),(0,this._fn)(t)||this._flush()},_handleEnd:function(){this._flushOnEnd&&this._flush(),this._emitEnd()}},Ee=B("bufferWhile",Se),Oe=V("bufferWhile",Se),ke=function(t){return t};var Ae={_init:function(t){var e=t.count,n=t.flushOnEnd;this._count=e,this._flushOnEnd=n,this._buff=[]},_free:function(){this._buff=null},_flush:function(){null!==this._buff&&0!==this._buff.length&&(this._emitValue(this._buff),this._buff=[])},_handleValue:function(t){this._buff.push(t),this._buff.length>=this._count&&this._flush()},_handleEnd:function(){this._flushOnEnd&&this._flush(),this._emitEnd()}},Te=B("bufferWithCount",Ae),xe=V("bufferWithCount",Ae);var Ce={_init:function(t){var e=this,n=t.wait,r=t.count,i=t.flushOnEnd;this._wait=n,this._count=r,this._flushOnEnd=i,this._intervalId=null,this._$onTick=function(){return e._flush()},this._buff=[]},_free:function(){this._$onTick=null,this._buff=null},_flush:function(){null!==this._buff&&(this._emitValue(this._buff),this._buff=[])},_handleValue:function(t){this._buff.push(t),this._buff.length>=this._count&&(clearInterval(this._intervalId),this._flush(),this._intervalId=setInterval(this._$onTick,this._wait))},_handleEnd:function(){this._flushOnEnd&&0!==this._buff.length&&this._flush(),this._emitEnd()},_onActivation:function(){this._intervalId=setInterval(this._$onTick,this._wait),this._source.onAny(this._$handleAny)},_onDeactivation:function(){null!==this._intervalId&&(clearInterval(this._intervalId),this._intervalId=null),this._source.offAny(this._$handleAny)}},Ie=B("bufferWithTimeOrCount",Ce),Pe=V("bufferWithTimeOrCount",Ce);var Re={_init:function(t){var e,n=t.transducer;this._xform=n((e=this,{"@@transducer/step":function(t,n){return e._emitValue(n),null},"@@transducer/result":function(){return e._emitEnd(),null}}))},_free:function(){this._xform=null},_handleValue:function(t){null!==this._xform["@@transducer/step"](null,t)&&this._xform["@@transducer/result"](null)},_handleEnd:function(){this._xform["@@transducer/result"](null)}},Ne=B("transduce",Re),Le=V("transduce",Re);var Me={_init:function(t){var e=t.fn;this._handler=e,this._emitter=C(this)},_free:function(){this._handler=null,this._emitter=null},_handleAny:function(t){this._handler(this._emitter,t)}},De=B("withHandler",Me),je=V("withHandler",Me);var Ue=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function Fe(t,e){var n=this;b.call(this),this._buffers=m(t,(function(t){return Ue(t)?p(t):[]})),this._sources=m(t,(function(t){return Ue(t)?E():t})),this._combinator=e?N(e,this._sources.length):function(t){return t},this._aliveCount=0,this._$handlers=[];for(var r=function(t){n._$handlers.push((function(e){return n._handleAny(t,e)}))},i=0;i<this._sources.length;i++)r(i)}function Be(t,e){return 0===t.length?E():new Fe(t,e)}o(Fe,b,{_name:"zip",_onActivation:function(){for(;this._isFull();)this._emit();var t=this._sources.length;this._aliveCount=t;for(var e=0;e<t&&this._active;e++)this._sources[e].onAny(this._$handlers[e])},_onDeactivation:function(){for(var t=0;t<this._sources.length;t++)this._sources[t].offAny(this._$handlers[t])},_emit:function(){for(var t=new Array(this._buffers.length),e=0;e<this._buffers.length;e++)t[e]=this._buffers[e].shift();var n=this._combinator;this._emitValue(n(t))},_isFull:function(){for(var t=0;t<this._buffers.length;t++)if(0===this._buffers[t].length)return!1;return!0},_handleAny:function(t,e){e.type===u&&(this._buffers[t].push(e.value),this._isFull()&&this._emit()),e.type===c&&this._emitError(e.value),e.type===s&&(this._aliveCount--,0===this._aliveCount&&this._emitEnd())},_clear:function(){b.prototype._clear.call(this),this._sources=null,this._buffers=null,this._combinator=null,this._$handlers=null}});var Ve=function(t){return t};function ze(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.queueLim,r=void 0===n?0:n,i=e.concurLim,o=void 0===i?-1:i,a=e.drop,s=void 0===a?"new":a;b.call(this),this._queueLim=r<0?-1:r,this._concurLim=o<0?-1:o,this._drop=s,this._queue=[],this._curSources=[],this._$handleSubAny=function(e){return t._handleSubAny(e)},this._$endHandlers=[],this._currentlyAdding=null,0===this._concurLim&&this._emitEnd()}function qe(t){ze.call(this),this._addAll(t),this._initialised=!0}function He(t){return 0===t.length?E():new qe(t)}function Ge(t){var e=this;b.call(this),this._generator=t,this._source=null,this._inLoop=!1,this._iteration=0,this._$handleAny=function(t){return e._handleAny(t)}}o(ze,b,{_name:"abstractPool",_add:function(t,e){e=e||Ve,-1===this._concurLim||this._curSources.length<this._concurLim?this._addToCur(e(t)):-1===this._queueLim||this._queue.length<this._queueLim?this._addToQueue(e(t)):"old"===this._drop&&(this._removeOldest(),this._add(t,e))},_addAll:function(t){var e=this;!function(t,e){var n=t.length,r=void 0;for(r=0;r<n;r++)e(t[r])}(t,(function(t){return e._add(t)}))},_remove:function(t){-1===this._removeCur(t)&&this._removeQueue(t)},_addToQueue:function(t){this._queue=d(this._queue,[t])},_addToCur:function(t){if(this._active){if(!t._alive)return t._currentEvent&&this._emit(t._currentEvent.type,t._currentEvent.value),void(this._active&&(0!==this._queue.length?this._pullQueue():0===this._curSources.length&&this._onEmpty()));this._currentlyAdding=t,t.onAny(this._$handleSubAny),this._currentlyAdding=null,t._alive?(this._curSources=d(this._curSources,[t]),this._active&&this._subToEnd(t)):0!==this._queue.length?this._pullQueue():0===this._curSources.length&&this._onEmpty()}else this._curSources=d(this._curSources,[t])},_subToEnd:function(t){var e=this,n=function(){return e._removeCur(t)};this._$endHandlers.push({obs:t,handler:n}),t.onEnd(n)},_subscribe:function(t){t.onAny(this._$handleSubAny),this._active&&this._subToEnd(t)},_unsubscribe:function(t){t.offAny(this._$handleSubAny);var e=h(this._$endHandlers,(function(e){return e.obs===t}));-1!==e&&(t.offEnd(this._$endHandlers[e].handler),this._$endHandlers.splice(e,1))},_handleSubAny:function(t){t.type===u?this._emitValue(t.value):t.type===c&&this._emitError(t.value)},_removeQueue:function(t){var e=f(this._queue,t);return this._queue=v(this._queue,e),e},_removeCur:function(t){this._active&&this._unsubscribe(t);var e=f(this._curSources,t);return this._curSources=v(this._curSources,e),-1!==e&&(0!==this._queue.length?this._pullQueue():0===this._curSources.length&&this._onEmpty()),e},_removeOldest:function(){this._removeCur(this._curSources[0])},_pullQueue:function(){0!==this._queue.length&&(this._queue=p(this._queue),this._addToCur(this._queue.shift()))},_onActivation:function(){for(var t=0,e=this._curSources;t<e.length&&this._active;t++)this._subscribe(e[t])},_onDeactivation:function(){for(var t=0,e=this._curSources;t<e.length;t++)this._unsubscribe(e[t]);null!==this._currentlyAdding&&this._unsubscribe(this._currentlyAdding)},_isEmpty:function(){return 0===this._curSources.length},_onEmpty:function(){},_clear:function(){b.prototype._clear.call(this),this._queue=null,this._curSources=null,this._$handleSubAny=null,this._$endHandlers=null}}),o(qe,ze,{_name:"merge",_onEmpty:function(){this._initialised&&this._emitEnd()}}),o(Ge,b,{_name:"repeat",_handleAny:function(t){t.type===s?(this._source=null,this._getSource()):this._emit(t.type,t.value)},_getSource:function(){if(!this._inLoop){this._inLoop=!0;for(var t=this._generator;null===this._source&&this._alive&&this._active;)this._source=t(this._iteration++),this._source?this._source.onAny(this._$handleAny):this._emitEnd();this._inLoop=!1}},_onActivation:function(){this._source?this._source.onAny(this._$handleAny):this._getSource()},_onDeactivation:function(){this._source&&this._source.offAny(this._$handleAny)},_clear:function(){b.prototype._clear.call(this),this._generator=null,this._source=null,this._$handleAny=null}});var Ye=function(t){return new Ge(t)};function Ke(t){return Ye((function(e){return t.length>e&&t[e]})).setName("concat")}function We(){ze.call(this)}function $e(t,e,n){var r=this;ze.call(this,n),this._source=t,this._fn=e,this._mainEnded=!1,this._lastCurrent=null,this._$handleMain=function(t){return r._handleMain(t)}}function Ze(t,e){$e.call(this,t,e)}function Je(t,e){return function(n,r,i){var o=this;t.call(this),this._primary=n,this._secondary=r,this._name=n._name+"."+e,this._lastSecondary=a,this._$handleSecondaryAny=function(t){return o._handleSecondaryAny(t)},this._$handlePrimaryAny=function(t){return o._handlePrimaryAny(t)},this._init(i)}}function Xe(t){return{_init:function(){},_free:function(){},_handlePrimaryValue:function(t){this._emitValue(t)},_handlePrimaryError:function(t){this._emitError(t)},_handlePrimaryEnd:function(){this._emitEnd()},_handleSecondaryValue:function(t){this._lastSecondary=t},_handleSecondaryError:function(t){this._emitError(t)},_handleSecondaryEnd:function(){},_handlePrimaryAny:function(t){switch(t.type){case u:return this._handlePrimaryValue(t.value);case c:return this._handlePrimaryError(t.value);case s:return this._handlePrimaryEnd(t.value)}},_handleSecondaryAny:function(t){switch(t.type){case u:return this._handleSecondaryValue(t.value);case c:return this._handleSecondaryError(t.value);case s:this._handleSecondaryEnd(t.value),this._removeSecondary()}},_removeSecondary:function(){null!==this._secondary&&(this._secondary.offAny(this._$handleSecondaryAny),this._$handleSecondaryAny=null,this._secondary=null)},_onActivation:function(){null!==this._secondary&&this._secondary.onAny(this._$handleSecondaryAny),this._active&&this._primary.onAny(this._$handlePrimaryAny)},_onDeactivation:function(){null!==this._secondary&&this._secondary.offAny(this._$handleSecondaryAny),this._primary.offAny(this._$handlePrimaryAny)},_clear:function(){t.prototype._clear.call(this),this._primary=null,this._secondary=null,this._lastSecondary=null,this._$handleSecondaryAny=null,this._$handlePrimaryAny=null,this._free()}}}function Qe(t,e){var n=Je(b,t);return o(n,b,Xe(b),e),n}function tn(t,e){var n=Je(w,t);return o(n,w,Xe(w),e),n}o(We,ze,{_name:"pool",plug:function(t){return this._add(t),this},unplug:function(t){return this._remove(t),this}}),o($e,ze,{_onActivation:function(){ze.prototype._onActivation.call(this),this._active&&this._source.onAny(this._$handleMain)},_onDeactivation:function(){ze.prototype._onDeactivation.call(this),this._source.offAny(this._$handleMain),this._hadNoEvSinceDeact=!0},_handleMain:function(t){t.type===u&&(this._activating&&this._hadNoEvSinceDeact&&this._lastCurrent===t.value||this._add(t.value,this._fn),this._lastCurrent=t.value,this._hadNoEvSinceDeact=!1);t.type===c&&this._emitError(t.value),t.type===s&&(this._isEmpty()?this._emitEnd():this._mainEnded=!0)},_onEmpty:function(){this._mainEnded&&this._emitEnd()},_clear:function(){ze.prototype._clear.call(this),this._source=null,this._lastCurrent=null,this._$handleMain=null}}),o(Ze,$e,{_handleMain:function(t){t.type===c&&(this._activating&&this._hadNoEvSinceDeact&&this._lastCurrent===t.value||this._add(t.value,this._fn),this._lastCurrent=t.value,this._hadNoEvSinceDeact=!1);t.type===u&&this._emitValue(t.value),t.type===s&&(this._isEmpty()?this._emitEnd():this._mainEnded=!0)}});var en={_handlePrimaryValue:function(t){this._lastSecondary!==a&&this._lastSecondary&&this._emitValue(t)},_handleSecondaryEnd:function(){this._lastSecondary!==a&&this._lastSecondary||this._emitEnd()}},nn=Qe("filterBy",en),rn=tn("filterBy",en);var on=function(t,e){return e};var an={_handlePrimaryValue:function(t){this._lastSecondary!==a&&this._emitValue(t)},_handleSecondaryEnd:function(){this._lastSecondary===a&&this._emitEnd()}},sn=Qe("skipUntilBy",an),un=tn("skipUntilBy",an);var cn={_handleSecondaryValue:function(){this._emitEnd()}},ln=Qe("takeUntilBy",cn),dn=tn("takeUntilBy",cn);var fn={_init:function(){var t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}).flushOnEnd,e=void 0===t||t;this._buff=[],this._flushOnEnd=e},_free:function(){this._buff=null},_flush:function(){null!==this._buff&&(this._emitValue(this._buff),this._buff=[])},_handlePrimaryEnd:function(){this._flushOnEnd&&this._flush(),this._emitEnd()},_onActivation:function(){this._primary.onAny(this._$handlePrimaryAny),this._alive&&null!==this._secondary&&this._secondary.onAny(this._$handleSecondaryAny)},_handlePrimaryValue:function(t){this._buff.push(t)},_handleSecondaryValue:function(){this._flush()},_handleSecondaryEnd:function(){this._flushOnEnd||this._emitEnd()}},hn=Qe("bufferBy",fn),pn=tn("bufferBy",fn);var vn={_init:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.flushOnEnd,n=void 0===e||e,r=t.flushOnChange,i=void 0!==r&&r;this._buff=[],this._flushOnEnd=n,this._flushOnChange=i},_free:function(){this._buff=null},_flush:function(){null!==this._buff&&(this._emitValue(this._buff),this._buff=[])},_handlePrimaryEnd:function(){this._flushOnEnd&&this._flush(),this._emitEnd()},_handlePrimaryValue:function(t){this._buff.push(t),this._lastSecondary===a||this._lastSecondary||this._flush()},_handleSecondaryEnd:function(){this._flushOnEnd||this._lastSecondary!==a&&!this._lastSecondary||this._emitEnd()},_handleSecondaryValue:function(t){this._flushOnChange&&!t&&this._flush(),this._lastSecondary=t}},mn=Qe("bufferWhileBy",vn),_n=tn("bufferWhileBy",vn);var gn=function(){return!1},yn=function(){return!0};var bn={_init:function(t){var e=t.fn;this._fn=e},_free:function(){this._fn=null},_handleValue:function(t){var e=(0,this._fn)(t);e.convert?this._emitError(e.error):this._emitValue(t)}},wn=B("valuesToErrors",bn),Sn=V("valuesToErrors",bn),En=function(t){return{convert:!0,error:t}};var On={_init:function(t){var e=t.fn;this._fn=e},_free:function(){this._fn=null},_handleError:function(t){var e=(0,this._fn)(t);e.convert?this._emitValue(e.value):this._emitError(t)}},kn=B("errorsToValues",On),An=V("errorsToValues",On),Tn=function(t){return{convert:!0,value:t}};var xn={_handleError:function(t){this._emitError(t),this._emitEnd()}},Cn=B("endOnError",xn),In=V("endOnError",xn);y.prototype.toProperty=function(t){return q(this,t)},y.prototype.changes=function(){return new H(this)},y.prototype.toPromise=function(t){return function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:G(),n=null;return new e((function(e,r){t.onAny((function(t){t.type===s&&null!==n?((n.type===u?e:r)(n.value),n=null):n=t}))}))}(this,t)},y.prototype.toESObservable=$,y.prototype[K]=$,y.prototype.map=function(t){return ot(this,t)},y.prototype.filter=function(t){return function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ct;return new(t._ofSameType(st,ut))(t,{fn:e})}(this,t)},y.prototype.take=function(t){return function(t,e){return new(t._ofSameType(dt,ft))(t,{n:e})}(this,t)},y.prototype.takeErrors=function(t){return function(t,e){return new(t._ofSameType(pt,vt))(t,{n:e})}(this,t)},y.prototype.takeWhile=function(t){return function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:yt;return new(t._ofSameType(_t,gt))(t,{fn:e})}(this,t)},y.prototype.last=function(){return new((t=this)._ofSameType(wt,St))(t);var t},y.prototype.skip=function(t){return function(t,e){return new(t._ofSameType(Ot,kt))(t,{n:e})}(this,t)},y.prototype.skipWhile=function(t){return function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ct;return new(t._ofSameType(Tt,xt))(t,{fn:e})}(this,t)},y.prototype.skipDuplicates=function(t){return Lt(this,t)},y.prototype.diff=function(t,e){return function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:a;return new(t._ofSameType(Dt,jt))(t,{fn:e||Ut,seed:n})}(this,t,e)},y.prototype.scan=function(t,e){return function(t,e){return new Ft(t,{fn:e,seed:arguments.length>2&&void 0!==arguments[2]?arguments[2]:a})}(this,t,e)},y.prototype.flatten=function(t){return function(t){return new Bt(t,{fn:arguments.length>1&&void 0!==arguments[1]?arguments[1]:Vt})}(this,t)},y.prototype.delay=function(t){return function(t,e){return new(t._ofSameType(Ht,Gt))(t,{wait:e})}(this,t)},y.prototype.throttle=function(t,e){return function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.leading,i=void 0===r||r,o=n.trailing,a=void 0===o||o;return new(t._ofSameType(Wt,$t))(t,{wait:e,leading:i,trailing:a})}(this,t,e)},y.prototype.debounce=function(t,e){return function(t,e){var n=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).immediate,r=void 0!==n&&n;return new(t._ofSameType(Jt,Xt))(t,{wait:e,immediate:r})}(this,t,e)},y.prototype.mapErrors=function(t){return function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ne;return new(t._ofSameType(te,ee))(t,{fn:e})}(this,t)},y.prototype.filterErrors=function(t){return function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:ae;return new(t._ofSameType(ie,oe))(t,{fn:e})}(this,t)},y.prototype.ignoreValues=function(){return new((t=this)._ofSameType(ue,ce))(t);var t},y.prototype.ignoreErrors=function(){return new((t=this)._ofSameType(de,fe))(t);var t},y.prototype.ignoreEnd=function(){return new((t=this)._ofSameType(pe,ve))(t);var t},y.prototype.beforeEnd=function(t){return function(t,e){return new(t._ofSameType(_e,ge))(t,{fn:e})}(this,t)},y.prototype.slidingWindow=function(t,e){return function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return new(t._ofSameType(be,we))(t,{min:n,max:e})}(this,t,e)},y.prototype.bufferWhile=function(t,e){return function(t,e){var n=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).flushOnEnd,r=void 0===n||n;return new(t._ofSameType(Ee,Oe))(t,{fn:e||ke,flushOnEnd:r})}(this,t,e)},y.prototype.bufferWithCount=function(t,e){return function(t,e){var n=(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).flushOnEnd,r=void 0===n||n;return new(t._ofSameType(Te,xe))(t,{count:e,flushOnEnd:r})}(this,t,e)},y.prototype.bufferWithTimeOrCount=function(t,e,n){return function(t,e,n){var r=(arguments.length>3&&void 0!==arguments[3]?arguments[3]:{}).flushOnEnd,i=void 0===r||r;return new(t._ofSameType(Ie,Pe))(t,{wait:e,count:n,flushOnEnd:i})}(this,t,e,n)},y.prototype.transduce=function(t){return function(t,e){return new(t._ofSameType(Ne,Le))(t,{transducer:e})}(this,t)},y.prototype.withHandler=function(t){return function(t,e){return new(t._ofSameType(De,je))(t,{fn:e})}(this,t)},y.prototype.thru=function(t){return t(this)},y.prototype.combine=function(t,e){return X([this,t],e)},y.prototype.zip=function(t,e){return Be([this,t],e)},y.prototype.merge=function(t){return He([this,t])},y.prototype.concat=function(t){return Ke([this,t])};y.prototype.flatMap=function(t){return new $e(this,t).setName(this,"flatMap")},y.prototype.flatMapLatest=function(t){return new $e(this,t,{concurLim:1,drop:"old"}).setName(this,"flatMapLatest")},y.prototype.flatMapFirst=function(t){return new $e(this,t,{concurLim:1}).setName(this,"flatMapFirst")},y.prototype.flatMapConcat=function(t){return new $e(this,t,{queueLim:-1,concurLim:1}).setName(this,"flatMapConcat")},y.prototype.flatMapConcurLimit=function(t,e){return new $e(this,t,{queueLim:-1,concurLim:e}).setName(this,"flatMapConcurLimit")},y.prototype.flatMapErrors=function(t){return new Ze(this,t).setName(this,"flatMapErrors")},y.prototype.filterBy=function(t){return n=t,new((e=this)._ofSameType(nn,rn))(e,n);var e,n},y.prototype.sampledBy=function(t,e){return function(t,e,n){return X([e],[t],n?function(t,e){return n(e,t)}:on).setName(t,"sampledBy")}(this,t,e)},y.prototype.skipUntilBy=function(t){return n=t,new((e=this)._ofSameType(sn,un))(e,n);var e,n},y.prototype.takeUntilBy=function(t){return n=t,new((e=this)._ofSameType(ln,dn))(e,n);var e,n},y.prototype.bufferBy=function(t,e){return function(t,e,n){return new(t._ofSameType(hn,pn))(t,e,n)}(this,t,e)},y.prototype.bufferWhileBy=function(t,e){return function(t,e,n){return new(t._ofSameType(mn,_n))(t,e,n)}(this,t,e)};var Pn=!0;function Rn(t){if(Pn&&console&&"function"==typeof console.warn){console.warn(t,"\nHere is an Error object for you containing the call stack:",new Error)}}y.prototype.awaiting=function(t){return Rn("You are using deprecated .awaiting() method, see https://github.com/kefirjs/kefir/issues/145"),function(t,e){var n=He([ot(t,yn),ot(e,gn)]);return(n=q(n=Lt(n),gn)).setName(t,"awaiting")}(this,t)},y.prototype.valuesToErrors=function(t){return Rn("You are using deprecated .valuesToErrors() method, see https://github.com/kefirjs/kefir/issues/149"),function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:En;return new(t._ofSameType(wn,Sn))(t,{fn:e})}(this,t)},y.prototype.errorsToValues=function(t){return Rn("You are using deprecated .errorsToValues() method, see https://github.com/kefirjs/kefir/issues/149"),function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Tn;return new(t._ofSameType(kn,An))(t,{fn:e})}(this,t)},y.prototype.endOnError=function(){return Rn("You are using deprecated .endOnError() method, see https://github.com/kefirjs/kefir/issues/150"),new((t=this)._ofSameType(Cn,In))(t);var t};var Nn={Observable:y,Stream:b,Property:w,never:E,later:function(t,e){return new k(t,{x:e})},interval:function(t,e){return new A(t,{x:e})},sequentially:function(t,e){return 0===e.length?E():new T(t,{xs:e})},fromPoll:function(t,e){return new x(t,{fn:e})},withInterval:function(t,e){return new I(t,{fn:e})},fromCallback:function(t){var e=!1;return R((function(n){e||(t((function(t){n.emit(t),n.end()})),e=!0)})).setName("fromCallback")},fromNodeCallback:function(t){var e=!1;return R((function(n){e||(t((function(t,e){t?n.error(t):n.emit(e),n.end()})),e=!0)})).setName("fromNodeCallback")},fromEvents:function(t,e,n){for(var r=void 0,i=void 0,o=0;o<L.length;o++)if("function"==typeof t[L[o][0]]&&"function"==typeof t[L[o][1]]){r=L[o][0],i=L[o][1];break}if(void 0===r)throw new Error("target don't support any of addEventListener/removeEventListener, addListener/removeListener, on/off method pair");return function(t,e,n){return R((function(r){var i=n?function(){r.emit(function(t,e,n){var r=n?n.length:0;if(null!=e)return 0===r?t.call(e):t.apply(e,n);switch(r){case 0:return t();case 1:return t(n[0]);case 2:return t(n[0],n[1]);case 3:return t(n[0],n[1],n[2]);case 4:return t(n[0],n[1],n[2],n[3]);default:return t.apply(null,n)}}(n,this,arguments))}:function(t){r.emit(t)};return t(i),function(){return e(i)}})).setName("fromSubUnsub")}((function(n){return t[r](e,n)}),(function(n){return t[i](e,n)}),n).setName("fromEvents")},stream:R,constant:D,constantError:function(t){return new j(t)},fromPromise:function(t){var e=!1,n=R((function(n){if(!e){var r=t.then((function(t){n.emit(t),n.end()}),(function(t){n.error(t),n.end()}));r&&"function"==typeof r.done&&r.done(),e=!0}}));return q(n,null).setName("fromPromise")},fromESObservable:function(t){var e=t[K]?t[K]():t;return R((function(t){var n=e.subscribe({error:function(e){t.error(e),t.end()},next:function(e){t.emit(e)},complete:function(){t.end()}});return n.unsubscribe?function(){n.unsubscribe()}:n})).setName("fromESObservable")},combine:X,zip:Be,merge:He,concat:Ke,Pool:We,pool:function(){return new We},repeat:Ye,staticLand:tt};Nn.Kefir=Nn;const Ln=Nn},15224:(t,e,n)=>{"use strict";n.d(e,{A:()=>s});var r=n(9248),i=n.n(r),o=n(69089),a=n.n(o)()(i());a.push([t.id,".quiz-body .card__body {\n  padding-left: 0;\n  padding-right: 0;\n}\n\n.quiz-card {\n  padding: 2rem 0 2rem;\n}\n\n.quiz-body .u--text-danger {\n  padding-left: 0.25rem;\n}\n\n.quiz-body .error-block {\n  max-width: 27rem;\n  padding: 0;\n  margin: 0 auto;\n}\n\n.quiz-body,\n.quiz-footer-mount-point {\n  width: 80%;\n  max-width: 45rem;\n  margin: 0 auto;\n}\n\n.quiz-card .progress__bar {\n  background: #080;\n}\n\n.quiz-lead-form {\n  max-width: 25rem;\n  margin: 0 auto\n}\n\n.quiz-body input, .quiz-body select {\n  border-radius: 0.5rem;\n}\n\n.quiz-body select.control {\n  background-size: 1.5rem;\n}\n\n.quiz-footer-container .progress__max {\n  width: 80%;\n  margin: auto ;\n  background-color: #C5C5C5;\n}\n\n.quiz-footer-container .straight-line {\n  position: relative;\n  top: -1.3rem;\n  height: 0.15rem;\n  background-color: #C5C5C5;\n  width: 100%;\n}\n\n.quiz-footer-container .progress__max,\n.quiz-footer-container .progress__bar {\n  position: relative;\n  border-radius: 1rem;\n  height: 0.5rem;\n  z-index: 100;\n}\n\n.quiz-footer-container .progress__bar {\n  background: #4AB010;\n}\n\n@media only screen and (min-width: 768px) {\n  .quiz-main-next {\n    width: 8rem;\n  }\n}\n\n.quiz-navigation {\n  width: 80%;\n  margin: 0 auto;\n}\n\n.quiz-body .label,\n.quiz-body .input,\n.quiz-body .control {\n  font-size: 1.1rem;\n  color: #565656;\n}\n.quiz-body .checkbox .control,\n.quiz-body .radio .control {\n  transform: scale(1.5);\n  top: 31%;\n}\n\n.quiz-body .checkbox .control {\n  padding-left: 2rem;\n}\n\n.quiz-body .checkbox .label,\n.quiz-body .radio .label {\n  padding-left: 2.5rem;\n}\n\n.quiz-body .checkbox,\n.quiz-body .radio {\n  border: none;\n}\n\n.big-step-display:focus {\n  -webkit-box-shadow: 0 0 0 2px white, 0 0 0 4px #036ad2;\n  box-shadow: 0 0 0 2px white, 0 0 0 4px #036ad2;\n  outline: none;\n  -webkit-border-radius: 2px;\n  border-radius: 2px;\n}\n\n.small-step-display,\n.small-step-display p {\n  margin: 0;\n}\n\n.quiz-body .info-text {\n  padding: 0 0 1rem !important;\n}\n\n.quiz-footer-mount-point .info-text {\n  text-align: center;\n}\n\n.spinner--small {\n  margin: 0 10px 2px 0;\n  vertical-align: middle;\n}\n.spinner--small::before,\n.spinner--small::after {\n  border-color: white white white transparent;\n  border-width: 2px;\n  left: -2px;\n  top: -2px;\n}\n",""]);const s=a},85072:(t,e,n)=>{"use strict";var r,i=function(){return void 0===r&&(r=Boolean(window&&document&&document.all&&!window.atob)),r},o=function(){var t={};return function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(t){n=null}t[e]=n}return t[e]}}(),a=[];function s(t){for(var e=-1,n=0;n<a.length;n++)if(a[n].identifier===t){e=n;break}return e}function u(t,e){for(var n={},r=[],i=0;i<t.length;i++){var o=t[i],u=e.base?o[0]+e.base:o[0],c=n[u]||0,l="".concat(u," ").concat(c);n[u]=c+1;var d=s(l),f={css:o[1],media:o[2],sourceMap:o[3]};-1!==d?(a[d].references++,a[d].updater(f)):a.push({identifier:l,updater:m(f,e),references:1}),r.push(l)}return r}function c(t){var e=document.createElement("style"),r=t.attributes||{};if(void 0===r.nonce){var i=n.nc;i&&(r.nonce=i)}if(Object.keys(r).forEach((function(t){e.setAttribute(t,r[t])})),"function"==typeof t.insert)t.insert(e);else{var a=o(t.insert||"head");if(!a)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");a.appendChild(e)}return e}var l,d=(l=[],function(t,e){return l[t]=e,l.filter(Boolean).join("\n")});function f(t,e,n,r){var i=n?"":r.media?"@media ".concat(r.media," {").concat(r.css,"}"):r.css;if(t.styleSheet)t.styleSheet.cssText=d(e,i);else{var o=document.createTextNode(i),a=t.childNodes;a[e]&&t.removeChild(a[e]),a.length?t.insertBefore(o,a[e]):t.appendChild(o)}}function h(t,e,n){var r=n.css,i=n.media,o=n.sourceMap;if(i?t.setAttribute("media",i):t.removeAttribute("media"),o&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),t.styleSheet)t.styleSheet.cssText=r;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(r))}}var p=null,v=0;function m(t,e){var n,r,i;if(e.singleton){var o=v++;n=p||(p=c(e)),r=f.bind(null,n,o,!1),i=f.bind(null,n,o,!0)}else n=c(e),r=h.bind(null,n,e),i=function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(n)};return r(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;r(t=e)}else i()}}t.exports=function(t,e){(e=e||{}).singleton||"boolean"==typeof e.singleton||(e.singleton=i());var n=u(t=t||[],e);return function(t){if(t=t||[],"[object Array]"===Object.prototype.toString.call(t)){for(var r=0;r<n.length;r++){var i=s(n[r]);a[i].references--}for(var o=u(t,e),c=0;c<n.length;c++){var l=s(n[c]);0===a[l].references&&(a[l].updater(),a.splice(l,1))}n=o}}}},58636:(t,e,n)=>{var r=n(49091).default;function i(){"use strict";
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */t.exports=i=function(){return n},t.exports.__esModule=!0,t.exports.default=t.exports;var e,n={},o=Object.prototype,a=o.hasOwnProperty,s=Object.defineProperty||function(t,e,n){t[e]=n.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",l=u.asyncIterator||"@@asyncIterator",d=u.toStringTag||"@@toStringTag";function f(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(e){f=function(t,e,n){return t[e]=n}}function h(t,e,n,r){var i=e&&e.prototype instanceof b?e:b,o=Object.create(i.prototype),a=new N(r||[]);return s(o,"_invoke",{value:C(t,n,a)}),o}function p(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}n.wrap=h;var v="suspendedStart",m="suspendedYield",_="executing",g="completed",y={};function b(){}function w(){}function S(){}var E={};f(E,c,(function(){return this}));var O=Object.getPrototypeOf,k=O&&O(O(L([])));k&&k!==o&&a.call(k,c)&&(E=k);var A=S.prototype=b.prototype=Object.create(E);function T(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function n(i,o,s,u){var c=p(t[i],t,o);if("throw"!==c.type){var l=c.arg,d=l.value;return d&&"object"==r(d)&&a.call(d,"__await")?e.resolve(d.__await).then((function(t){n("next",t,s,u)}),(function(t){n("throw",t,s,u)})):e.resolve(d).then((function(t){l.value=t,s(l)}),(function(t){return n("throw",t,s,u)}))}u(c.arg)}var i;s(this,"_invoke",{value:function(t,r){function o(){return new e((function(e,i){n(t,r,e,i)}))}return i=i?i.then(o,o):o()}})}function C(t,n,r){var i=v;return function(o,a){if(i===_)throw new Error("Generator is already running");if(i===g){if("throw"===o)throw a;return{value:e,done:!0}}for(r.method=o,r.arg=a;;){var s=r.delegate;if(s){var u=I(s,r);if(u){if(u===y)continue;return u}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(i===v)throw i=g,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);i=_;var c=p(t,n,r);if("normal"===c.type){if(i=r.done?g:m,c.arg===y)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(i=g,r.method="throw",r.arg=c.arg)}}}function I(t,n){var r=n.method,i=t.iterator[r];if(i===e)return n.delegate=null,"throw"===r&&t.iterator.return&&(n.method="return",n.arg=e,I(t,n),"throw"===n.method)||"return"!==r&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+r+"' method")),y;var o=p(i,t.iterator,n.arg);if("throw"===o.type)return n.method="throw",n.arg=o.arg,n.delegate=null,y;var a=o.arg;return a?a.done?(n[t.resultName]=a.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,y):a:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,y)}function P(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function R(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function N(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(P,this),this.reset(!0)}function L(t){if(t||""===t){var n=t[c];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,o=function n(){for(;++i<t.length;)if(a.call(t,i))return n.value=t[i],n.done=!1,n;return n.value=e,n.done=!0,n};return o.next=o}}throw new TypeError(r(t)+" is not iterable")}return w.prototype=S,s(A,"constructor",{value:S,configurable:!0}),s(S,"constructor",{value:w,configurable:!0}),w.displayName=f(S,d,"GeneratorFunction"),n.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},n.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,S):(t.__proto__=S,f(t,d,"GeneratorFunction")),t.prototype=Object.create(A),t},n.awrap=function(t){return{__await:t}},T(x.prototype),f(x.prototype,l,(function(){return this})),n.AsyncIterator=x,n.async=function(t,e,r,i,o){void 0===o&&(o=Promise);var a=new x(h(t,e,r,i),o);return n.isGeneratorFunction(e)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},T(A),f(A,d,"Generator"),f(A,c,(function(){return this})),f(A,"toString",(function(){return"[object Generator]"})),n.keys=function(t){var e=Object(t),n=[];for(var r in e)n.push(r);return n.reverse(),function t(){for(;n.length;){var r=n.pop();if(r in e)return t.value=r,t.done=!1,t}return t.done=!0,t}},n.values=L,N.prototype={constructor:N,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(R),!t)for(var n in this)"t"===n.charAt(0)&&a.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var n=this;function r(r,i){return s.type="throw",s.arg=t,n.next=r,i&&(n.method="next",n.arg=e),!!i}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],s=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var u=a.call(o,"catchLoc"),c=a.call(o,"finallyLoc");if(u&&c){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(u){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&a.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var o=i?i.completion:{};return o.type=t,o.arg=e,i?(this.method="next",this.next=i.finallyLoc,y):this.complete(o)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),R(n),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;R(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,r){return this.delegate={iterator:L(t),resultName:n,nextLoc:r},"next"===this.method&&(this.arg=e),y}},n}t.exports=i,t.exports.__esModule=!0,t.exports.default=t.exports},49091:t=>{function e(n){return t.exports=e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.__esModule=!0,t.exports.default=t.exports,e(n)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports},2971:(t,e,n)=>{var r=n(49091),i=n(58636)();t.exports=i;try{regeneratorRuntime=i}catch(t){"object"===("undefined"==typeof globalThis?"undefined":r(globalThis))?globalThis.regeneratorRuntime=i:Function("r","regeneratorRuntime = r")(i)}},60901:(t,e,n)=>{"use strict";function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}n.d(e,{A:()=>r})}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var o=e[r]={id:r,loaded:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.loaded=!0,o.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.hmd=t=>((t=Object.create(t)).children||(t.children=[]),Object.defineProperty(t,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+t.id)}}),t),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.nc=void 0,(()=>{"use strict";var t=n(60901);function e(e){var n=function(e,n){if("object"!==(0,t.A)(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var i=r.call(e,n||"default");if("object"!==(0,t.A)(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}(e,"string");return"symbol"===(0,t.A)(n)?n:String(n)}function r(t,n,r){return(n=e(n))in t?Object.defineProperty(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r,t}var i={log:"log",debug:"debug",info:"info",warn:"warn",error:"error"},o=console,a={};Object.keys(i).forEach((function(t){a[t]=o[t]}));var s="Datadog Browser SDK:",u={debug:a.debug.bind(o,s),log:a.log.bind(o,s),info:a.info.bind(o,s),warn:a.warn.bind(o,s),error:a.error.bind(o,s)};function c(t,e){return function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];try{return t.apply(void 0,n)}catch(t){u.error(e,t)}}}var l,d=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,o=e.length;i<o;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))},f=!1;function h(t){f=t}function p(t,e,n){var r=n.value;n.value=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return(l?v(r):r).apply(this,t)}}function v(t){return function(){return m(t,this,arguments)}}function m(t,e,n){try{return t.apply(e,n)}catch(t){if(_(t),l)try{l(t)}catch(t){_(t)}}}function _(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];f&&u.error.apply(u,d(["[MONITOR]"],t,!1))}function g(t,e){return-1!==t.indexOf(e)}function y(t){if(Array.from)return Array.from(t);var e=[];if(t instanceof Set)t.forEach((function(t){return e.push(t)}));else for(var n=0;n<t.length;n++)e.push(t[n]);return e}function b(t,e){for(var n=0;n<t.length;n+=1){var r=t[n];if(e(r,n))return r}}function w(t){return Object.keys(t).map((function(e){return t[e]}))}function S(t){return Object.keys(t).map((function(e){return[e,t[e]]}))}function E(t,e){return t.slice(0,e.length)===e}function O(t){return window.CSS&&window.CSS.escape?window.CSS.escape(t):t.replace(/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g,(function(t,e){return e?"\0"===t?"�":"".concat(t.slice(0,-1),"\\").concat(t.charCodeAt(t.length-1).toString(16)," "):"\\".concat(t)}))}function k(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return e.forEach((function(e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})),t}function A(t){var e=k({version:"5.3.0",onReady:function(t){t()}},t);return Object.defineProperty(e,"_setDebug",{get:function(){return h},enumerable:!1}),e}function T(t,e,n){var r=t[e];t[e]=n,r&&r.q&&r.q.forEach((function(t){return c(t,"onReady callback threw an error:")()}))}function x(){if("object"===("undefined"==typeof globalThis?"undefined":(0,t.A)(globalThis)))return globalThis;Object.defineProperty(Object.prototype,"_dd_temp_",{get:function(){return this},configurable:!0});var e=_dd_temp_;return delete Object.prototype._dd_temp_,"object"!==(0,t.A)(e)&&(e="object"===("undefined"==typeof self?"undefined":(0,t.A)(self))?self:"object"===("undefined"==typeof window?"undefined":(0,t.A)(window))?window:{}),e}var C=1024,I=1024*C,P=/[^\u0000-\u007F]/;function R(t){return P.test(t)?void 0!==window.TextEncoder?(new TextEncoder).encode(t).length:new Blob([t]).size:t.length}function N(t,e){var n,r=x();return r.Zone&&"function"==typeof r.Zone.__symbol__&&(n=t[r.Zone.__symbol__(e)]),n||(n=t[e]),n}function L(t,e){return N(x(),"setTimeout")(v(t),e)}function M(t){N(x(),"clearTimeout")(t)}function D(t,e){return N(x(),"setInterval")(v(t),e)}function j(t){N(x(),"clearInterval")(t)}function U(t,e,n){var r,i,o=!n||void 0===n.leading||n.leading,a=!n||void 0===n.trailing||n.trailing,s=!1;return{throttled:function(){for(var n=[],u=0;u<arguments.length;u++)n[u]=arguments[u];s?r=n:(o?t.apply(void 0,n):r=n,s=!0,i=L((function(){a&&r&&t.apply(void 0,r),s=!1,r=void 0}),e))},cancel:function(){M(i),s=!1,r=void 0}}}function F(){}function B(e){return null===e?"null":Array.isArray(e)?"array":(0,t.A)(e)}function V(e,n,r){if(void 0===r&&(r=function(){if("undefined"!=typeof WeakSet){var t=new WeakSet;return{hasAlreadyBeenSeen:function(e){var n=t.has(e);return n||t.add(e),n}}}var e=[];return{hasAlreadyBeenSeen:function(t){var n=e.indexOf(t)>=0;return n||e.push(t),n}}}()),void 0===n)return e;if("object"!==(0,t.A)(n)||null===n)return n;if(n instanceof Date)return new Date(n.getTime());if(n instanceof RegExp){var i=n.flags||[n.global?"g":"",n.ignoreCase?"i":"",n.multiline?"m":"",n.sticky?"y":"",n.unicode?"u":""].join("");return new RegExp(n.source,i)}if(!r.hasAlreadyBeenSeen(n)){if(Array.isArray(n)){for(var o=Array.isArray(e)?e:[],a=0;a<n.length;++a)o[a]=V(o[a],n[a],r);return o}var s="object"===B(e)?e:{};for(var u in n)Object.prototype.hasOwnProperty.call(n,u)&&(s[u]=V(s[u],n[u],r));return s}}function z(t){return V(void 0,t)}function q(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];for(var r=0,i=e;r<i.length;r++){var o=i[r];null!=o&&(t=V(t,o))}return t}function H(e,n,r){if("object"!==(0,t.A)(e)||null===e)return JSON.stringify(e);var i=G(Object.prototype),o=G(Array.prototype),a=G(Object.getPrototypeOf(e)),s=G(e);try{return JSON.stringify(e,n,r)}catch(t){return"<error: unable to serialize object>"}finally{i(),o(),a(),s()}}function G(t){var e=t,n=e.toJSON;return n?(delete e.toJSON,function(){e.toJSON=n}):F}var Y=220*C,K="$",W=3;function $(t,e){var n;void 0===e&&(e=Y);var r=G(Object.prototype),i=G(Array.prototype),o=[],a=new WeakMap,s=Z(t,K,void 0,o,a),u=(null===(n=JSON.stringify(s))||void 0===n?void 0:n.length)||0;if(!(u>e)){for(;o.length>0&&u<e;){var c=o.shift(),l=0;if(Array.isArray(c.source))for(var d=0;d<c.source.length;d++){if(u+=void 0!==(f=Z(c.source[d],c.path,d,o,a))?JSON.stringify(f).length:4,u+=l,l=1,u>e){J(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;if(void 0!==(f=Z(c.source[d],c.path,d,o,a))&&(u+=JSON.stringify(f).length+l+d.length+W,l=1),u>e){J(e,"truncated",t);break}c.target[d]=f}}return r(),i(),s}J(e,"discarded",t)}function Z(e,n,r,i,o){var a=function(t){var e=t;if(e&&"function"==typeof e.toJSON)try{return e.toJSON()}catch(t){}return t}(e);if(!a||"object"!==(0,t.A)(a))return function(e){if("bigint"==typeof e)return"[BigInt] ".concat(e.toString());if("function"==typeof e)return"[Function] ".concat(e.name||"unknown");if("symbol"===(0,t.A)(e))return"[Symbol] ".concat(e.description||e.toString());return e}(a);var s=function(t){try{if(t instanceof Event)return{isTrusted:t.isTrusted};var e=Object.prototype.toString.call(t).match(/\[object (.*)\]/);if(e&&e[1])return"[".concat(e[1],"]")}catch(t){}return"[Unserializable]"}(a);if("[Object]"!==s&&"[Array]"!==s&&"[Error]"!==s)return s;var u=e;if(o.has(u))return"[Reference seen at ".concat(o.get(u),"]");var c=void 0!==r?"".concat(n,".").concat(r):n,l=Array.isArray(a)?[]:{};return o.set(u,c),i.push({source:a,target:l,path:c}),l}function J(t,e,n){u.warn("The data provided has been ".concat(e," as it is over the limit of ").concat(t," characters:"),n)}var X,Q=function(){function t(t){this.onFirstSubscribe=t,this.observers=[]}return t.prototype.subscribe=function(t){var e=this;return!this.observers.length&&this.onFirstSubscribe&&(this.onLastUnsubscribe=this.onFirstSubscribe()||void 0),this.observers.push(t),{unsubscribe:function(){e.observers=e.observers.filter((function(e){return t!==e})),!e.observers.length&&e.onLastUnsubscribe&&e.onLastUnsubscribe()}}},t.prototype.notify=function(t){this.observers.forEach((function(e){return e(t)}))},t}();function tt(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=new Q((function(){var e=t.map((function(t){return t.subscribe((function(t){return n.notify(t)}))}));return function(){return e.forEach((function(t){return t.unsubscribe()}))}}));return n}var et=3*C,nt=((X={})[0]="feature flag evaluation",X[1]="user",X[2]="global context",X[3]="logger context",X);function rt(t,e){return t>et&&(u.warn("The ".concat(nt[e]," data exceeds the recommended ").concat(et/C,"KiB threshold. More details: https://docs.datadoghq.com/real_user_monitoring/browser/troubleshooting/#customer-data-exceeds-the-recommended-3kib-warning")),!0)}var it=200;function ot(t,e){void 0===e&&(e=R);var n,r={},i=!1,o=new Q,a=U((function(r){n=e(H(r)),i||(i=rt(n,t))}),it).throttled,s={getBytesCount:function(){return n},getContext:function(){return z(r)},setContext:function(t){"object"===B(t)?(r=$(t),a(r)):s.clearContext(),o.notify()},setContextProperty:function(t,e){r[t]=$(e),a(r),o.notify()},removeContextProperty:function(t){delete r[t],a(r),o.notify()},clearContext:function(){r={},n=0,o.notify()},changeObservable:o};return s}var at=function(){function t(){this.buffer=[]}return t.prototype.add=function(t){this.buffer.push(t)>500&&this.buffer.splice(0,1)},t.prototype.drain=function(){this.buffer.forEach((function(t){return t()})),this.buffer.length=0},t}();function st(t){return 0!==t&&100*Math.random()<=t}function ut(t,e){return+t.toFixed(e)}function ct(t){return lt(t)&&t>=0&&t<=100}function lt(t){return"number"==typeof t}var dt,ft=1e3,ht=60*ft,pt=60*ht,vt=365*(24*pt);function mt(t){return{relative:t,timeStamp:_t(t)}}function _t(t){var e=yt()-performance.now();return e>Tt()?Math.round(kt(e,t)):function(t){return Math.round(kt(Tt(),t))}(t)}function gt(t){return lt(t)?ut(1e6*t,0):t}function yt(){return(new Date).getTime()}function bt(){return yt()}function wt(){return performance.now()}function St(){return{relative:wt(),timeStamp:bt()}}function Et(){return{relative:0,timeStamp:Tt()}}function Ot(t,e){return e-t}function kt(t,e){return t+e}function At(t){return t-Tt()}function Tt(){return void 0===dt&&(dt=performance.timing.navigationStart),dt}function xt(t){return t?(parseInt(t,10)^16*Math.random()>>parseInt(t,10)/4).toString(16):"".concat(1e7,"-").concat(1e3,"-").concat(4e3,"-").concat(8e3,"-").concat(1e11).replace(/[018]/g,xt)}var Ct,It,Pt=/([\w-]+)\s*=\s*([^;]+)/g;function Rt(t,e){for(Pt.lastIndex=0;;){var n=Pt.exec(t);if(!n)break;if(n[1]===e)return n[2]}}function Nt(t,e,n){void 0===n&&(n="");var r=t.charCodeAt(e-1),i=r>=55296&&r<=56319?e+1:e;return t.length<=i?t:"".concat(t.slice(0,i)).concat(n)}function Lt(t,e,n,r){var i=new Date;i.setTime(i.getTime()+n);var o="expires=".concat(i.toUTCString()),a=r&&r.crossSite?"none":"strict",s=r&&r.domain?";domain=".concat(r.domain):"",u=r&&r.secure?";secure":"";document.cookie="".concat(t,"=").concat(e,";").concat(o,";path=/;samesite=").concat(a).concat(s).concat(u)}function Mt(t){return Rt(document.cookie,t)}function Dt(t){return Ct||(Ct=function(t){var e=new Map;for(Pt.lastIndex=0;;){var n=Pt.exec(t);if(!n)break;e.set(n[1],n[2])}return e}(document.cookie)),Ct.get(t)}function jt(t,e){Lt(t,"",0,e)}var Ut,Ft="datadog-synthetics-public-id",Bt="datadog-synthetics-result-id",Vt="datadog-synthetics-injects-rum";function zt(){return Boolean(window._DATADOG_SYNTHETICS_INJECTS_RUM||Dt(Vt))}function qt(){var t=window._DATADOG_SYNTHETICS_PUBLIC_ID||Dt(Ft);return"string"==typeof t?t:void 0}function Ht(){var t=window._DATADOG_SYNTHETICS_RESULT_ID||Dt(Bt);return"string"==typeof t?t:void 0}function Gt(){var t=x().DatadogEventBridge;if(t)return{getAllowedWebViewHosts:function(){return JSON.parse(t.getAllowedWebViewHosts())},send:function(e,n){t.send(JSON.stringify({eventType:e,event:n}))}}}function Yt(t){var e;void 0===t&&(t=null===(e=x().location)||void 0===e?void 0:e.hostname);var n=Gt();return!!n&&n.getAllowedWebViewHosts().some((function(e){return t===e||(n=t,r=".".concat(e),n.slice(-r.length)===r);var n,r}))}function Kt(t,e,n,r,i){return Wt(t,e,[n],r,i)}function Wt(t,e,n,r,i){var o=void 0===i?{}:i,a=o.once,s=o.capture,u=o.passive,c=v((function(e){(e.isTrusted||e.__ddIsTrusted||t.allowUntrustedEvents)&&(a&&f(),r(e))})),l=u?{capture:s,passive:u}:s,d=N(e,"addEventListener");function f(){var t=N(e,"removeEventListener");n.forEach((function(n){return t.call(e,n,c,l)}))}return n.forEach((function(t){return d.call(e,t,c,l)})),{stop:f}}!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"}(Ut||(Ut={}));var $t="_dd_c",Zt=[];function Jt(t,e,n,r){void 0===r&&(r=R);var i=function(t,e){return"".concat($t,"_").concat(t,"_").concat(e)}(e,n),o=ot(n,r);return a(),Zt.push(Kt(t,window,Ut.STORAGE,(function(t){var e=t.key;i===e&&a()}))),o.changeObservable.subscribe((function(){localStorage.setItem(i,JSON.stringify(o.getContext()))})),o;function a(){var t=localStorage.getItem(i),e=null!==t?JSON.parse(t):{};o.setContext(e)}}function Xt(){var t="",e=0;return{isAsync:!1,get isEmpty(){return!t},write:function(n,r){var i=R(n);e+=i,t+=n,r&&r(i)},finish:function(t){t(this.finishSync())},finishSync:function(){var n={output:t,outputBytesCount:e,rawBytesCount:e,pendingData:""};return t="",e=0,n},estimateEncodedBytesCount:function(t){return t.length}}}var Qt="?";function te(t){var e=[],n=ce(t,"stack"),r=String(t);return n&&E(n,r)&&(n=n.slice(r.length)),n&&n.split("\n").forEach((function(t){var n=function(t){var e=re.exec(t);if(!e)return;var n=e[2]&&0===e[2].indexOf("native"),r=e[2]&&0===e[2].indexOf("eval"),i=ie.exec(e[2]);r&&i&&(e[2]=i[1],e[3]=i[2],e[4]=i[3]);return{args:n?[e[2]]:[],column:e[4]?+e[4]:void 0,func:e[1]||Qt,line:e[3]?+e[3]:void 0,url:n?void 0:e[2]}}(t)||function(t){var e=oe.exec(t);if(!e)return;return{args:[],column:e[3]?+e[3]:void 0,func:Qt,line:e[2]?+e[2]:void 0,url:e[1]}}(t)||function(t){var e=ae.exec(t);if(!e)return;return{args:[],column:e[4]?+e[4]:void 0,func:e[1]||Qt,line:+e[3],url:e[2]}}(t)||function(t){var e=se.exec(t);if(!e)return;var n=e[3]&&e[3].indexOf(" > eval")>-1,r=ue.exec(e[3]);n&&r&&(e[3]=r[1],e[4]=r[2],e[5]=void 0);return{args:e[2]?e[2].split(","):[],column:e[5]?+e[5]:void 0,func:e[1]||Qt,line:e[4]?+e[4]:void 0,url:e[3]}}(t);n&&(!n.func&&n.line&&(n.func=Qt),e.push(n))})),{message:ce(t,"message"),name:ce(t,"name"),stack:e}}var ee="((?:file|https?|blob|chrome-extension|native|eval|webpack|snippet|<anonymous>|\\w+\\.|\\/).*?)",ne="(?::(\\d+))",re=new RegExp("^\\s*at (.*?) ?\\(".concat(ee).concat(ne,"?").concat(ne,"?\\)?\\s*$"),"i"),ie=new RegExp("\\((\\S*)".concat(ne).concat(ne,"\\)"));var oe=new RegExp("^\\s*at ?".concat(ee).concat(ne,"?").concat(ne,"??\\s*$"),"i");var ae=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i;var se=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|capacitor|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,ue=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i;function ce(e,n){if("object"===(0,t.A)(e)&&e&&n in e){var r=e[n];return"string"==typeof r?r:void 0}}function le(t,e,n,r){var i=[{url:e,column:r,line:n}],o=function(t){var e,n,r;"[object String]"==={}.toString.call(t)&&(n=(e=de.exec(t))[1],r=e[2]);return{name:n,message:r}}(t);return{name:o.name,message:o.message,stack:i}}var de=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?([\s\S]*)$/;var fe,he="No stack, consider using an instance of Error";function pe(t){var e=t.stackTrace,n=t.originalError,r=t.handlingStack,i=t.startClocks,o=t.nonErrorPrefix,a=t.source,s=t.handling,u=n instanceof Error,c=function(t,e,n,r){return(null==t?void 0:t.message)&&(null==t?void 0:t.name)?t.message:e?"Empty message":"".concat(n," ").concat(H($(r)))}(e,u,o,n),l=function(t,e){if(void 0===e)return!1;if(t)return!0;return e.stack.length>0&&(e.stack.length>1||void 0!==e.stack[0].url)}(u,e)?me(e):he,d=u?function(t,e){var n=t,r=[];for(;(null==n?void 0:n.cause)instanceof Error&&r.length<10;){var i=te(n.cause);r.push({message:n.cause.message,source:e,type:null==i?void 0:i.name,stack:i&&me(i)}),n=n.cause}return r.length?r:void 0}(n,a):void 0;return{startClocks:i,source:a,handling:s,handlingStack:r,originalError:n,type:null==e?void 0:e.name,message:c,stack:l,causes:d,fingerprint:ve(n)}}function ve(t){return t instanceof Error&&"dd_fingerprint"in t?String(t.dd_fingerprint):void 0}function me(t){var e=_e(t);return t.stack.forEach((function(t){var n="?"===t.func?"<anonymous>":t.func,r=t.args&&t.args.length>0?"(".concat(t.args.join(", "),")"):"",i=t.line?":".concat(t.line):"",o=t.line&&t.column?":".concat(t.column):"";e+="\n  at ".concat(n).concat(r," @ ").concat(t.url).concat(i).concat(o)})),e}function _e(t){return"".concat(t.name||"Error",": ").concat(t.message)}function ge(){var t,e=new Error;if(!e.stack)try{throw e}catch(t){}return m((function(){var n=te(e);n.stack=n.stack.slice(2),t=me(n)})),t}function ye(t){var e=k({},t);return["id","name","email"].forEach((function(t){t in e&&(e[t]=String(e[t]))})),e}function be(t){var e="object"===B(t);return e||u.error("Unsupported user:",t),e}!function(t){t.PAGEHIDE="pagehide",t.FEATURE_FLAGS="feature_flags",t.RESOURCE_PAGE_STATES="resource_page_states",t.COLLECT_FLUSH_REASON="collect_flush_reason",t.SCROLLMAP="scrollmap",t.WEB_VITALS_ATTRIBUTION="web_vitals_attribution",t.DISABLE_REPLAY_INLINE_CSS="disable_replay_inline_css"}(fe||(fe={}));var we=new Set;function Se(t){return we.has(t)}function Ee(){return we}function Oe(t){return k({},t)}function ke(t,e){return Object.keys(t).some((function(n){return t[n]===e}))}function Ae(t){return 0===Object.keys(t).length}var Te,xe=4*pt,Ce=15*ht;function Ie(){return null!=Te?Te:Te=function(t){var e;void 0===t&&(t=window);var n=t.navigator.userAgent;if(t.chrome||/HeadlessChrome/.test(n))return 1;if(0===(null===(e=t.navigator.vendor)||void 0===e?void 0:e.indexOf("Apple"))||/safari/i.test(n)&&!/chrome|android/i.test(n))return 2;if(t.document.documentMode)return 0;return 3}()}var Pe="_dd_s",Re=/^([a-z]+)=([a-z0-9-]+)$/,Ne="&";function Le(t){return Ae(t)}function Me(t){t.expire=String(yt()+Ce)}function De(t){return S(t).map((function(t){var e=t[0],n=t[1];return"".concat(e,"=").concat(n)})).join(Ne)}function je(t){var e={};return function(t){return!!t&&(-1!==t.indexOf(Ne)||Re.test(t))}(t)&&t.split(Ne).forEach((function(t){var n=Re.exec(t);if(null!==n){var r=n[1],i=n[2];e[r]=i}})),e}var Ue="_dd",Fe="_dd_r",Be="_dd_l",Ve="rum",ze="logs";function qe(t){var e=function(t){var e={};e.secure=!!t.useSecureSessionCookie||!!t.useCrossSiteSessionCookie,e.crossSite=!!t.useCrossSiteSessionCookie,t.trackSessionAcrossSubdomains&&(e.domain=function(){if(void 0===It){for(var t="dd_site_test_".concat(xt()),e=window.location.hostname.split("."),n=e.pop();e.length&&!Mt(t);)n="".concat(e.pop(),".").concat(n),Lt(t,"test",ft,{domain:n});jt(t,{domain:n}),It=n}return It}());return e}(t);return function(t){if(void 0===document.cookie||null===document.cookie)return!1;try{var e="dd_cookie_test_".concat(xt()),n="test";Lt(e,n,ht,t);var r=Mt(e)===n;return jt(e,t),r}catch(t){return u.error(t),!1}}(e)?{type:"Cookie",cookieOptions:e}:void 0}function He(t){var e={isLockEnabled:1===Ie(),persistSession:Ge(t),retrieveSession:Ye,clearSession:Ke(t)};return function(t){if(!Dt(Pe)){var e=Dt(Ue),n=Dt(Fe),r=Dt(Be),i={};e&&(i.id=e),r&&/^[01]$/.test(r)&&(i[ze]=r),n&&/^[012]$/.test(n)&&(i[Ve]=n),Le(i)||(Me(i),t.persistSession(i))}}(e),e}function Ge(t){return function(e){Lt(Pe,De(e),Ce,t)}}function Ye(){return je(Mt(Pe))}function Ke(t){return function(){jt(Pe,t)}}var We="_dd_test_";function $e(t){localStorage.setItem(Pe,De(t))}function Ze(){return je(localStorage.getItem(Pe))}function Je(){localStorage.removeItem(Pe)}var Xe,Qe=10,tn=100,en=[];function nn(t,e,n){var r;void 0===n&&(n=0);var i=e.isLockEnabled,o=e.retrieveSession,a=e.persistSession,s=e.clearSession;if(Xe||(Xe=t),t===Xe)if(i&&n>=tn)on(e);else{var u,c=o();if(i){if(c.lock)return void rn(t,e,n);if(u=xt(),c.lock=u,a(c),(c=o()).lock!==u)return void rn(t,e,n)}var l=t.process(c);if(i&&(c=o()).lock!==u)rn(t,e,n);else{if(l&&(Le(l)?s():(Me(l),a(l))),i&&(!l||!Le(l))){if((c=o()).lock!==u)return void rn(t,e,n);delete c.lock,a(c),l=c}null===(r=t.after)||void 0===r||r.call(t,l||c),on(e)}}else en.push(t)}function rn(t,e,n){L((function(){nn(t,e,n+1)}),Qe)}function on(t){Xe=void 0;var e=en.shift();e&&nn(e,t)}var an=ft;function sn(t){var e=qe(t);return!e&&t.allowFallbackToLocalStorage&&(e=function(){try{var t=xt(),e="".concat(We).concat(t);localStorage.setItem(e,t);var n=localStorage.getItem(e);return localStorage.removeItem(e),t===n?{type:"LocalStorage"}:void 0}catch(t){return}}()),e}function un(t,e,n){var r=new Q,i=new Q,o="Cookie"===t.type?He(t.cookieOptions):{isLockEnabled:!1,persistSession:$e,retrieveSession:Ze,clearSession:Je},a=o.clearSession,s=o.retrieveSession,u=D((function(){nn({process:function(t){return f(t)?void 0:{}},after:l},o)}),an),c=function(){var t=s();if(f(t))return t;return{}}();function l(t){return f(t)||(t={}),d()&&(!function(t){return c.id!==t.id||c[e]!==t[e]}(t)?c=t:(c={},i.notify())),t}function d(){return void 0!==c[e]}function f(t){return(void 0===t.created||yt()-Number(t.created)<xe)&&(void 0===t.expire||yt()<Number(t.expire))}return{expandOrRenewSession:U((function(){var t;nn({process:function(r){var i=l(r);return t=function(t){var r=n(t[e]),i=r.trackingType,o=r.isTracked;t[e]=i,o&&!t.id&&(t.id=xt(),t.created=String(yt()));return o}(i),i},after:function(e){t&&!d()&&function(t){c=t,r.notify()}(e),c=e}},o)}),an).throttled,expandSession:function(){nn({process:function(t){return d()?l(t):void 0}},o)},getSession:function(){return c},renewObservable:r,expireObservable:i,expire:function(){a(),l({})},stop:function(){j(u)}}}function cn(t){return ln(t,hn(window.location)).href}function ln(t,e){var n=function(){if(void 0===dn)try{var t=new fn("http://test/path");dn="http://test/path"===t.href}catch(t){dn=!1}return dn?fn:void 0}();if(n)try{return void 0!==e?new n(t,e):new n(t)}catch(n){throw new Error("Failed to construct URL: ".concat(String(n)," ").concat(H({url:t,base:e})))}if(void 0===e&&!/:/.test(t))throw new Error("Invalid URL: '".concat(t,"'"));var r=document,i=r.createElement("a");if(void 0!==e){var o=(r=document.implementation.createHTMLDocument("")).createElement("base");o.href=e,r.head.appendChild(o),r.body.appendChild(i)}return i.href=t,i}var dn,fn=URL;function hn(t){if(t.origin&&"null"!==t.origin)return t.origin;var e=t.host.replace(/(:80|:443)$/,"");return"".concat(t.protocol,"//").concat(e)}var pn="datad0g.com",vn="datadoghq.com",mn="datadoghq.eu";function _n(t,e,n){var r=function(t,e){var n="/api/v2/".concat(e),r=t.proxy;if(r){var i=cn(r);return function(t){return"".concat(i,"?ddforward=").concat(encodeURIComponent("".concat(n,"?").concat(t)))}}var o=function(t){var e=t.site,n=void 0===e?vn:e,r=t.internalAnalyticsSubdomain;if(r&&n===vn)return"".concat(r,".").concat(vn);var i=n.split("."),o=i.pop();return"browser-intake-".concat(i.join("-"),".").concat(o)}(t);return function(t){return"https://".concat(o).concat(n,"?").concat(t)}}(t,e);return{build:function(i,o){var a=function(t,e,n,r,i){var o=t.clientToken,a=t.internalAnalyticsSubdomain,s=i.retry,u=i.flushReason,c=i.encoding,l=["sdk_version:".concat("5.3.0"),"api:".concat(r)].concat(n);u&&Se(fe.COLLECT_FLUSH_REASON)&&l.push("flush_reason:".concat(u));s&&l.push("retry_count:".concat(s.count),"retry_after:".concat(s.lastFailureStatus));var d=["ddsource=browser","ddtags=".concat(encodeURIComponent(l.join(","))),"dd-api-key=".concat(o),"dd-evp-origin-version=".concat(encodeURIComponent("5.3.0")),"dd-evp-origin=browser","dd-request-id=".concat(xt())];c&&d.push("dd-evp-encoding=".concat(c));"rum"===e&&d.push("batch_time=".concat(bt()));a&&d.reverse();return d.join("&")}(t,e,n,i,o);return r(a)},urlPrefix:r(""),trackType:e}}var gn=200;var yn=/[^a-z0-9_:./-]/;function bn(t,e){var n=gn-t.length-1;(e.length>n||yn.test(e))&&u.warn("".concat(t," value doesn't meet tag requirements and will be sanitized"));var r=e.replace(/,/g,"_");return"".concat(t,":").concat(r)}function wn(t){var e=function(t){var e=t.env,n=t.service,r=t.version,i=t.datacenter,o=[];return e&&o.push(bn("env",e)),n&&o.push(bn("service",n)),r&&o.push(bn("version",r)),i&&o.push(bn("datacenter",i)),o}(t),n=function(t,e){return{logsEndpointBuilder:_n(t,"logs",e),rumEndpointBuilder:_n(t,"rum",e),sessionReplayEndpointBuilder:_n(t,"replay",e)}}(t,e),r=w(n).map((function(t){return t.urlPrefix})),i=function(t,e,n){if(!t.replica)return;var r=k({},t,{site:vn,clientToken:t.replica.clientToken}),i={logsEndpointBuilder:_n(r,"logs",n),rumEndpointBuilder:_n(r,"rum",n)};return e.push.apply(e,w(i).map((function(t){return t.urlPrefix}))),k({applicationId:t.replica.applicationId},i)}(t,r,e);return k({isIntakeUrl:function(t){return r.some((function(e){return 0===t.indexOf(e)}))},replica:i,site:t.site||vn},n)}var Sn={ALLOW:"allow",MASK:"mask",MASK_USER_INPUT:"mask-user-input"};function En(t){var e,n,r;if(t&&t.clientToken)if(void 0===t.sessionSampleRate||ct(t.sessionSampleRate))if(void 0===t.telemetrySampleRate||ct(t.telemetrySampleRate)){if(void 0===t.telemetryConfigurationSampleRate||ct(t.telemetryConfigurationSampleRate))return Array.isArray(t.enableExperimentalFeatures)&&t.enableExperimentalFeatures.filter((function(t){return ke(fe,t)})).forEach((function(t){we.add(t)})),k({beforeSend:t.beforeSend&&c(t.beforeSend,"beforeSend threw an error:"),sessionStoreStrategyType:sn(t),sessionSampleRate:null!==(e=t.sessionSampleRate)&&void 0!==e?e:100,telemetrySampleRate:null!==(n=t.telemetrySampleRate)&&void 0!==n?n:20,telemetryConfigurationSampleRate:null!==(r=t.telemetryConfigurationSampleRate)&&void 0!==r?r:5,service:t.service,silentMultipleInit:!!t.silentMultipleInit,allowUntrustedEvents:!!t.allowUntrustedEvents,batchBytesLimit:16*C,eventRateLimiterThreshold:3e3,maxTelemetryEventsPerPage:15,flushTimeout:30*ft,batchMessagesLimit:50,messageBytesLimit:256*C},wn(t));u.error("Telemetry Configuration Sample Rate should be a number between 0 and 100")}else u.error("Telemetry Sample Rate should be a number between 0 and 100");else u.error("Session Sample Rate should be a number between 0 and 100");else u.error("Client Token is not configured, we will not send any data.")}function On(t){return{session_sample_rate:t.sessionSampleRate,telemetry_sample_rate:t.telemetrySampleRate,telemetry_configuration_sample_rate:t.telemetryConfigurationSampleRate,use_before_send:!!t.beforeSend,use_cross_site_session_cookie:t.useCrossSiteSessionCookie,use_secure_session_cookie:t.useSecureSessionCookie,use_proxy:!!t.proxy,silent_multiple_init:t.silentMultipleInit,track_session_across_subdomains:t.trackSessionAcrossSubdomains,allow_fallback_to_local_storage:!!t.allowFallbackToLocalStorage,store_contexts_across_pages:!!t.storeContextsAcrossPages,allow_untrusted_events:!!t.allowUntrustedEvents}}function kn(t){var e=B(t);return"string"===e||"function"===e||t instanceof RegExp}function An(t,e,n){return void 0===n&&(n=!1),t.some((function(t){try{if("function"==typeof t)return t(e);if(t instanceof RegExp)return t.test(e);if("string"==typeof t)return n?E(e,t):t===e}catch(t){u.error(t)}return!1}))}function Tn(t){0!==t.status||t.isAborted||(t.traceId=void 0,t.spanId=void 0,t.traceSampled=void 0)}function xn(t,e,n,r){if(void 0!==Cn()&&n.findTrackedSession()){var i,o,a,s,u,c=b(t.allowedTracingUrls,(function(t){return An([t.match],e.url,!0)}));if(c)e.traceId=new In,e.spanId=new In,e.traceSampled=!lt(t.traceSampleRate)||st(t.traceSampleRate),r((i=e.traceId,o=e.spanId,a=e.traceSampled,s=c.propagatorTypes,u={},s.forEach((function(t){switch(t){case"datadog":k(u,{"x-datadog-origin":"rum","x-datadog-parent-id":o.toDecimalString(),"x-datadog-sampling-priority":a?"1":"0","x-datadog-trace-id":i.toDecimalString()});break;case"tracecontext":k(u,{traceparent:"00-0000000000000000".concat(i.toPaddedHexadecimalString(),"-").concat(o.toPaddedHexadecimalString(),"-0").concat(a?"1":"0")});break;case"b3":k(u,{b3:"".concat(i.toPaddedHexadecimalString(),"-").concat(o.toPaddedHexadecimalString(),"-").concat(a?"1":"0")});break;case"b3multi":k(u,{"X-B3-TraceId":i.toPaddedHexadecimalString(),"X-B3-SpanId":o.toPaddedHexadecimalString(),"X-B3-Sampled":a?"1":"0"})}})),u))}}function Cn(){return window.crypto||window.msCrypto}var In=function(){function t(){this.buffer=new Uint8Array(8),Cn().getRandomValues(this.buffer),this.buffer[0]=127&this.buffer[0]}return t.prototype.toString=function(t){var e=this.readInt32(0),n=this.readInt32(4),r="";do{var i=e%t*4294967296+n;e=Math.floor(e/t),n=Math.floor(i/t),r=(i%t).toString(t)+r}while(e||n);return r},t.prototype.toDecimalString=function(){return this.toString(10)},t.prototype.toPaddedHexadecimalString=function(){var t=this.toString(16);return Array(17-t.length).join("0")+t},t.prototype.readInt32=function(t){return 16777216*this.buffer[t]+(this.buffer[t+1]<<16)+(this.buffer[t+2]<<8)+this.buffer[t+3]},t}(),Pn=["tracecontext","datadog"];function Rn(t){var e,n;if(t.applicationId)if(void 0===t.sessionReplaySampleRate||ct(t.sessionReplaySampleRate))if(void 0===t.traceSampleRate||ct(t.traceSampleRate))if(void 0===t.excludedActivityUrls||Array.isArray(t.excludedActivityUrls)){var r=function(t){if(void 0!==t.allowedTracingUrls){if(!Array.isArray(t.allowedTracingUrls))return void u.error("Allowed Tracing URLs should be an array");if(0!==t.allowedTracingUrls.length&&void 0===t.service)return void u.error("Service needs to be configured when tracing is enabled");var e=[];return t.allowedTracingUrls.forEach((function(t){var n;kn(t)?e.push({match:t,propagatorTypes:Pn}):"object"===B(n=t)&&kn(n.match)&&Array.isArray(n.propagatorTypes)?e.push(t):u.warn("Allowed Tracing Urls parameters should be a string, RegExp, function, or an object. Ignoring parameter",t)})),e}return[]}(t);if(r){var i=En(t);if(i)return k({applicationId:t.applicationId,version:t.version,actionNameAttribute:t.actionNameAttribute,sessionReplaySampleRate:null!==(e=t.sessionReplaySampleRate)&&void 0!==e?e:0,startSessionReplayRecordingManually:!!t.startSessionReplayRecordingManually,traceSampleRate:t.traceSampleRate,allowedTracingUrls:r,excludedActivityUrls:null!==(n=t.excludedActivityUrls)&&void 0!==n?n:[],workerUrl:t.workerUrl,compressIntakeRequests:!!t.compressIntakeRequests,trackUserInteractions:!!t.trackUserInteractions,trackViewsManually:!!t.trackViewsManually,trackResources:!!t.trackResources,trackLongTasks:!!t.trackLongTasks,subdomain:t.subdomain,defaultPrivacyLevel:ke(Sn,t.defaultPrivacyLevel)?t.defaultPrivacyLevel:Sn.MASK,customerDataTelemetrySampleRate:1},i)}}else u.error("Excluded Activity Urls should be an array");else u.error("Trace Sample Rate should be a number between 0 and 100");else u.error("Session Replay Sample Rate should be a number between 0 and 100");else u.error("Application ID is not configured, no RUM data will be collected.")}function Nn(t){var e=new Set;return Array.isArray(t.allowedTracingUrls)&&t.allowedTracingUrls.length>0&&t.allowedTracingUrls.forEach((function(t){kn(t)?Pn.forEach((function(t){return e.add(t)})):"object"===B(t)&&Array.isArray(t.propagatorTypes)&&t.propagatorTypes.forEach((function(t){return e.add(t)}))})),y(e)}function Ln(t,e,n){return{context:t.getContext(),user:e.getContext(),hasReplay:!!n.isRecording()||void 0}}function Mn(t,e){var n=window.__ddBrowserSdkExtensionCallback;n&&n({type:t,payload:e})}var Dn,jn={log:"log",configuration:"configuration"},Un=["https://www.datadoghq-browser-agent.com","https://www.datad0g-browser-agent.com","https://d3uc069fcn7uxw.cloudfront.net","https://d20xtzwzcl0ceb.cloudfront.net","http://localhost","<anonymous>"],Fn=["ddog-gov.com"],Bn={maxEventsPerPage:0,sentEventCount:0,telemetryEnabled:!1,telemetryConfigurationEnabled:!1};function Vn(t,e){var n,r=new Q;Bn.telemetryEnabled=!g(Fn,e.site)&&st(e.telemetrySampleRate),Bn.telemetryConfigurationEnabled=Bn.telemetryEnabled&&st(e.telemetryConfigurationSampleRate);var i={is_local_file:"file:"===window.location.protocol,is_worker:"WorkerGlobalScope"in self};return Dn=function(e){if(Bn.telemetryEnabled){var o=function(t,e,r){return q({type:"telemetry",date:bt(),service:t,version:"5.3.0",source:"browser",_dd:{format_version:2},telemetry:q(e,{runtime_env:r}),experimental_features:y(Ee())},void 0!==n?n():{})}(t,e,i);r.notify(o),Mn("telemetry",o)}},l=Hn,k(Bn,{maxEventsPerPage:e.maxTelemetryEventsPerPage,sentEventCount:0}),{setContextProvider:function(t){n=t},observable:r,enabled:Bn.telemetryEnabled}}function zn(t){return t.site===pn}function qn(t,e){_(i.debug,t,e),Yn(k({type:jn.log,message:t,status:"debug"},e))}function Hn(t,e){Yn(k({type:jn.log,status:"error"},function(t){if(t instanceof Error){var e=te(t);return{error:{kind:e.name,stack:me(Kn(e))},message:e.message}}return{error:{stack:he},message:"".concat("Uncaught"," ").concat(H(t))}}(t),e))}function Gn(t){Bn.telemetryConfigurationEnabled&&Yn({type:jn.configuration,configuration:t})}function Yn(t){Dn&&Bn.sentEventCount<Bn.maxEventsPerPage&&(Bn.sentEventCount+=1,Dn(t))}function Kn(t){return t.stack=t.stack.filter((function(t){return!t.url||Un.some((function(e){return E(t.url,e)}))})),t}var Wn={HIDDEN:"visibility_hidden",UNLOADING:"before_unload",PAGEHIDE:"page_hide",FROZEN:"page_frozen"};function $n(t){var e=new Q((function(){var n=Se(fe.PAGEHIDE),r=Wt(t,window,[Ut.VISIBILITY_CHANGE,Ut.FREEZE,Ut.PAGE_HIDE],(function(t){t.type===Ut.PAGE_HIDE&&n?e.notify({reason:Wn.PAGEHIDE}):t.type===Ut.VISIBILITY_CHANGE&&"hidden"===document.visibilityState?e.notify({reason:Wn.HIDDEN}):t.type===Ut.FREEZE&&e.notify({reason:Wn.FROZEN})}),{capture:!0}).stop,i=F;return n||(i=Kt(t,window,Ut.BEFORE_UNLOAD,(function(){e.notify({reason:Wn.UNLOADING})})).stop),function(){r(),i()}}));return e}function Zn(t){return g(w(Wn),t)}function Jn(){var t,e=window;if(e.Zone&&(t=N(e,"MutationObserver"),e.MutationObserver&&t===e.MutationObserver)){var n=N(new e.MutationObserver(F),"originalInstance");t=n&&n.constructor}return t||(t=e.MutationObserver),t}function Xn(t,e,n){if(document.readyState===e||"complete"===document.readyState)n();else{var r="complete"===e?Ut.LOAD:Ut.DOM_CONTENT_LOADED;Kt(t,window,r,n,{once:!0})}}var Qn="initial_document",tr=[["document",function(t){return Qn===t}],["xhr",function(t){return"xmlhttprequest"===t}],["fetch",function(t){return"fetch"===t}],["beacon",function(t){return"beacon"===t}],["css",function(t,e){return/\.css$/i.test(e)}],["js",function(t,e){return/\.js$/i.test(e)}],["image",function(t,e){return g(["image","img","icon"],t)||null!==/\.(gif|jpg|jpeg|tiff|png|svg|ico)$/i.exec(e)}],["font",function(t,e){return null!==/\.(woff|eot|woff2|ttf)$/i.exec(e)}],["media",function(t,e){return g(["audio","video"],t)||null!==/\.(mp3|mp4)$/i.exec(e)}]];function er(t){var e=t.name;if(!function(t){try{return!!ln(t)}catch(t){return!1}}(e))return qn('Failed to construct URL for "'.concat(t.name,'"')),"other";for(var n=function(t){var e=ln(t).pathname;return"/"===e[0]?e:"/".concat(e)}(e),r=0,i=tr;r<i.length;r++){var o=i[r],a=o[0];if((0,o[1])(t.initiatorType,n))return a}return"other"}function nr(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var n=1;n<t.length;n+=1)if(t[n-1]>t[n])return!1;return!0}function rr(t){var e=ir(t);if(e){var n=e.startTime,r=e.fetchStart,i=e.redirectStart,o=e.redirectEnd,a=e.domainLookupStart,s=e.domainLookupEnd,u=e.connectStart,c=e.secureConnectionStart,l=e.connectEnd,d=e.requestStart,f=e.responseStart,h={download:ar(n,f,e.responseEnd),first_byte:ar(n,d,f)};return l!==r&&(h.connect=ar(n,u,l),nr(u,c,l)&&(h.ssl=ar(n,c,l))),s!==r&&(h.dns=ar(n,a,s)),or(t)&&(h.redirect=ar(n,i,o)),h}}function ir(t){if(nr(t.startTime,t.fetchStart,t.domainLookupStart,t.domainLookupEnd,t.connectStart,t.connectEnd,t.requestStart,t.responseStart,t.responseEnd)){if(!or(t))return t;var e=t.redirectStart,n=t.redirectEnd;if(e<t.startTime&&(e=t.startTime),n<t.startTime&&(n=t.fetchStart),nr(t.startTime,e,n,t.fetchStart))return k({},t,{redirectEnd:n,redirectStart:e})}}function or(t){return t.fetchStart!==t.startTime}function ar(t,e,n){return{duration:gt(Ot(e,n)),start:gt(Ot(t,e))}}function sr(t){if(t.startTime<t.responseStart)return t.decodedBodySize}function ur(t,e){return e&&!t.isIntakeUrl(e)}function cr(t){return t.nodeType===Node.TEXT_NODE}function lr(t){return t.nodeType===Node.ELEMENT_NODE}function dr(t){return lr(t)&&Boolean(t.shadowRoot)}function fr(t){var e=t;return!!e.host&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&lr(e.host)}function hr(t,e){t.childNodes.forEach(e),dr(t)&&e(t.shadowRoot)}function pr(t){return fr(t)?t.host:t.parentNode}var vr,mr=2*ht;function _r(t){var e=function(t){var e=t.querySelector("meta[name=dd-trace-id]"),n=t.querySelector("meta[name=dd-trace-time]");return gr(e&&e.content,n&&n.content)}(t)||function(t){var e=function(t){for(var e=0;e<t.childNodes.length;e+=1){if(n=yr(t.childNodes[e]))return n}if(t.body)for(e=t.body.childNodes.length-1;e>=0;e-=1){var n,r=t.body.childNodes[e];if(n=yr(r))return n;if(!cr(r))break}}(t);if(!e)return;return gr(Rt(e,"trace-id"),Rt(e,"trace-time"))}(t);if(e&&!(e.traceTime<=yt()-mr))return e.traceId}function gr(t,e){var n=e&&Number(e);if(t&&n)return{traceId:t,traceTime:n}}function yr(t){if(t&&function(t){return t.nodeType===Node.COMMENT_NODE}(t)){var e=/^\s*DATADOG;(.*?)\s*$/.exec(t.data);if(e)return e[1]}}function br(){return void 0!==window.performance&&"getEntries"in performance}function wr(t){return window.PerformanceObserver&&void 0!==PerformanceObserver.supportedEntryTypes&&PerformanceObserver.supportedEntryTypes.includes(t)}function Sr(t,e){if(function(t,e){Xn(t,"interactive",(function(){var t,n={entryType:vr.RESOURCE,initiatorType:Qn,traceId:_r(document),toJSON:function(){return k({},t,{toJSON:void 0})}};if(wr(vr.NAVIGATION)&&performance.getEntriesByType(vr.NAVIGATION).length>0){var r=performance.getEntriesByType(vr.NAVIGATION)[0];t=k(r.toJSON(),n)}else{var i=Er();t=k(i,{decodedBodySize:0,duration:i.responseEnd,name:window.location.href,startTime:0},n)}e(t)}))}(e,(function(n){Or(t,e,[n])})),br()){var n=performance.getEntries();L((function(){return Or(t,e,n)}))}if(window.PerformanceObserver){var r=v((function(n){return Or(t,e,n.getEntries())})),i=[vr.RESOURCE,vr.NAVIGATION,vr.LONG_TASK,vr.PAINT],o=[vr.LARGEST_CONTENTFUL_PAINT,vr.FIRST_INPUT,vr.LAYOUT_SHIFT,vr.EVENT];try{o.forEach((function(t){new window.PerformanceObserver(r).observe({type:t,buffered:!0,durationThreshold:40})}))}catch(t){i.push.apply(i,o)}new PerformanceObserver(r).observe({entryTypes:i}),br()&&"addEventListener"in performance&&Kt(e,performance,"resourcetimingbufferfull",(function(){performance.clearResourceTimings()}))}wr(vr.NAVIGATION)||function(t,e){function n(){e(k(Er(),{entryType:vr.NAVIGATION}))}Xn(t,"complete",(function(){L(n)}))}(e,(function(n){Or(t,e,[n])})),wr(vr.FIRST_INPUT)||function(t,e){var n=yt(),r=!1,i=Wt(t,window,[Ut.CLICK,Ut.MOUSE_DOWN,Ut.KEY_DOWN,Ut.TOUCH_START,Ut.POINTER_DOWN],(function(e){if(e.cancelable){var n={entryType:vr.FIRST_INPUT,processingStart:wt(),processingEnd:wt(),startTime:e.timeStamp,duration:0,name:""};e.type===Ut.POINTER_DOWN?o(t,n):a(n)}}),{passive:!0,capture:!0}).stop;function o(t,e){Wt(t,window,[Ut.POINTER_UP,Ut.POINTER_CANCEL],(function(t){t.type===Ut.POINTER_UP&&a(e)}),{once:!0})}function a(t){if(!r){r=!0,i();var o=t.processingStart-t.startTime;o>=0&&o<yt()-n&&e(t)}}}(e,(function(n){Or(t,e,[n])}))}function Er(){var t={},e=performance.timing;for(var n in e)if(lt(e[n])){var r=n,i=e[r];t[r]=0===i?0:At(i)}return t}function Or(t,e,n){var r=n.filter((function(t){return ke(vr,t.entryType)})).filter((function(t){return!function(t){return t.entryType===vr.NAVIGATION&&t.loadEventEnd<=0}(t)&&!function(t,e){return e.entryType===vr.RESOURCE&&!ur(t,e.name)}(e,t)}));r.length&&t.notify(0,r)}!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"}(vr||(vr={}));var kr={AGENT:"agent",CONSOLE:"console",CUSTOM:"custom",LOGGER:"logger",NETWORK:"network",SOURCE:"source",REPORT:"report"};function Ar(t,e,n){var r=0,i=!1;return{isLimitReached:function(){if(0===r&&L((function(){r=0}),ht),(r+=1)<=e||i)return i=!1,!1;if(r===e+1){i=!0;try{n({message:"Reached max number of ".concat(t,"s by minute: ").concat(e),source:kr.AGENT,startClocks:St()})}finally{i=!1}}return!0}}}function Tr(t,e,n){var r=z(t),i=n(r);return S(e).forEach((function(e){var n=e[0],i=e[1],o=function(t,e){for(var n=t,r=0,i=e.split(".");r<i.length;r++){var o=i[r];if(!Ir(n,o))return;n=n[o]}return n}(r,n),a=B(o);a===i?xr(t,n,$(o)):"object"!==i||"undefined"!==a&&"null"!==a||xr(t,n,{})})),i}function xr(t,e,n){for(var r=t,i=e.split("."),o=0;o<i.length;o+=1){var a=i[o];if(!Cr(r))return;o!==i.length-1?r=r[a]:r[a]=n}}function Cr(t){return"object"===B(t)}function Ir(t,e){return Cr(t)&&Object.prototype.hasOwnProperty.call(t,e)}var Pr,Rr={"view.name":"string","view.url":"string","view.referrer":"string"},Nr={context:"object"};function Lr(t,e,n,r,i,o,a,s,c){var l,d;(l={}).view=Rr,l.error=k({"error.message":"string","error.stack":"string","error.resource.url":"string","error.fingerprint":"string"},Nr,Rr),l.resource=k({"resource.url":"string"},Nr,Rr),l.action=k({"action.target.name":"string"},Nr,Rr),l.long_task=k({},Nr,Rr),Pr=l;var f=((d={}).error=Ar("error",t.eventRateLimiterThreshold,c),d.action=Ar("action",t.eventRateLimiterThreshold,c),d),h=function(){var t=qt(),e=Ht();if(t&&e)return{test_id:t,result_id:e,injected:zt()}}(),p=function(){var t,e=null===(t=window.Cypress)||void 0===t?void 0:t.env("traceId");if("string"==typeof e)return{test_execution_id:e}}();e.subscribe(10,(function(c){var l,d=c.startTime,v=c.rawRumEvent,m=c.domainContext,_=c.savedCommonContext,g=c.customerContext,y=r.findView(d),b=i.findUrl(d),w=n.findTrackedSession(d);if(w&&y&&b){var S=_||s(),E=o.findActionId(d),O=q({_dd:{format_version:2,drift:Math.round(yt()-kt(Tt(),performance.now())),configuration:{session_sample_rate:ut(t.sessionSampleRate,3),session_replay_sample_rate:ut(t.sessionReplaySampleRate,3)},browser_sdk_version:Yt()?"5.3.0":void 0},application:{id:t.applicationId},date:bt(),service:y.service||t.service,version:y.version||t.version,source:"browser",session:{id:w.id,type:h?"synthetics":p?"ci_test":"user"},view:{id:y.id,name:y.name,url:b.url,referrer:b.referrer},action:(l=v,-1!==["error","resource","long_task"].indexOf(l.type)&&E?{id:E}:void 0),synthetics:h,ci_test:p,display:a.get()},v);O.context=q(S.context,g),"has_replay"in O.session||(O.session.has_replay=S.hasReplay),"view"===O.type&&(O.session.sampled_for_replay=w.sessionReplayAllowed),Ae(S.user)||(O.usr=S.user),function(t,e,n,r){var i;if(e){var o=Tr(t,Pr[t.type],(function(t){return e(t,n)}));if(!1===o&&"view"!==t.type)return!1;!1===o&&u.warn("Can't dismiss view events using beforeSend!")}var a=null===(i=r[t.type])||void 0===i?void 0:i.isLimitReached();return!a}(O,t.beforeSend,m,f)&&(Ae(O.context)&&delete O.context,e.notify(11,O))}}))}var Mr,Dr=function(){function t(){this.callbacks={}}return t.prototype.notify=function(t,e){var n=this.callbacks[t];n&&n.forEach((function(t){return t(e)}))},t.prototype.subscribe=function(t,e){var n=this;return this.callbacks[t]||(this.callbacks[t]=[]),this.callbacks[t].push(e),{unsubscribe:function(){n.callbacks[t]=n.callbacks[t].filter((function(t){return e!==t}))}}},t}(),jr=Dr,Ur=1/0,Fr=ht,Br=function(){function t(t,e){var n=this;this.expireDelay=t,this.maxEntries=e,this.entries=[],this.clearOldValuesInterval=D((function(){return n.clearOldValues()}),Fr)}return t.prototype.add=function(t,e){var n=this,r={value:t,startTime:e,endTime:Ur,remove:function(){var t=n.entries.indexOf(r);t>=0&&n.entries.splice(t,1)},close:function(t){r.endTime=t}};return this.maxEntries&&this.entries.length>=this.maxEntries&&this.entries.pop(),this.entries.unshift(r),r},t.prototype.find=function(t){void 0===t&&(t=Ur);for(var e=0,n=this.entries;e<n.length;e++){var r=n[e];if(r.startTime<=t){if(t<=r.endTime)return r.value;break}}},t.prototype.closeActive=function(t){var e=this.entries[0];e&&e.endTime===Ur&&e.close(t)},t.prototype.findAll=function(t,e){void 0===t&&(t=Ur),void 0===e&&(e=0);var n=kt(t,e);return this.entries.filter((function(e){return e.startTime<=n&&t<=e.endTime})).map((function(t){return t.value}))},t.prototype.reset=function(){this.entries=[]},t.prototype.stop=function(){j(this.clearOldValuesInterval)},t.prototype.clearOldValues=function(){for(var t=wt()-this.expireDelay;this.entries.length>0&&this.entries[this.entries.length-1].endTime<t;)this.entries.pop()},t}(),Vr=xe;function zr(t,e,n){var r=t[e],i=n(r),o=function(){if("function"==typeof i)return i.apply(this,arguments)};return t[e]=o,{stop:function(){t[e]===o?t[e]=r:i=r}}}function qr(t,e,n){var r=n.before,i=n.after;return zr(t,e,(function(t){return function(){var e,n=arguments;return r&&m(r,this,n),"function"==typeof t&&(e=t.apply(this,n)),i&&m(i,this,n),e}}))}function Hr(t,e,n){var r=Object.getOwnPropertyDescriptor(t,e);if(!r||!r.set||!r.configurable)return{stop:F};var i=function(t,e){L((function(){n(t,e)}),0)},o=function(t){r.set.call(this,t),i(this,t)};return Object.defineProperty(t,e,{set:o}),{stop:function(){var n;(null===(n=Object.getOwnPropertyDescriptor(t,e))||void 0===n?void 0:n.set)===o?Object.defineProperty(t,e,r):i=F}}}var Gr,Yr=new WeakMap;function Kr(t){return Mr||(Mr=function(t){var e=new Q((function(){var n=qr(XMLHttpRequest.prototype,"open",{before:Wr}).stop,r=qr(XMLHttpRequest.prototype,"send",{before:function(){$r.call(this,t,e)}}).stop,i=qr(XMLHttpRequest.prototype,"abort",{before:Zr}).stop;return function(){n(),r(),i()}}));return e}(t)),Mr}function Wr(t,e){Yr.set(this,{state:"open",method:t.toUpperCase(),url:cn(String(e))})}function $r(t,e){var n=this,r=Yr.get(this);if(r){var i=r;i.state="start",i.startClocks=St(),i.isAborted=!1,i.xhr=this;var o=!1,a=qr(this,"onreadystatechange",{before:function(){this.readyState===XMLHttpRequest.DONE&&s()}}).stop,s=function(){if(u(),a(),!o){o=!0;var t=r;t.state="complete",t.duration=Ot(i.startClocks.timeStamp,bt()),t.status=n.status,e.notify(Oe(t))}},u=Kt(t,this,"loadend",s).stop;e.notify(i)}}function Zr(){var t=Yr.get(this);t&&(t.isAborted=!0)}function Jr(){var t;return Gr||(t=new Q((function(){if(window.fetch)return zr(window,"fetch",(function(e){return function(n,r){var i,o=m(Xr,null,[t,n,r]);return o?(i=e.call(this,o.input,o.init),m(Qr,null,[t,i,o])):i=e.call(this,n,r),i}})).stop})),Gr=t),Gr}function Xr(t,e,n){var r=n&&n.method||e instanceof Request&&e.method,i=r?r.toUpperCase():"GET",o=e instanceof Request?e.url:cn(String(e)),a={state:"start",init:n,input:e,method:i,startClocks:St(),url:o};return t.notify(a),a}function Qr(t,e,n){var r=function(e){var r=n;r.state="resolve","stack"in e||e instanceof Error?(r.status=0,r.isAborted=e instanceof DOMException&&e.code===DOMException.ABORT_ERR,r.error=e):"status"in e&&(r.response=e,r.responseType=e.type,r.status=e.status,r.isAborted=!1),t.notify(r)};e.then(v(r),v(r))}function ti(t){return t>=500}function ei(t){try{return t.clone()}catch(t){return}}function ni(t,e,n){var r=t.getReader(),i=[],o=0;function a(){var t,a;if(r.cancel().catch(F),n.collectStreamBody){var s;if(1===i.length)s=i[0];else{s=new Uint8Array(o);var u=0;i.forEach((function(t){s.set(t,u),u+=t.length}))}t=s.slice(0,n.bytesLimit),a=s.length>n.bytesLimit}e(void 0,t,a)}!function t(){r.read().then(v((function(e){e.done?a():(n.collectStreamBody&&i.push(e.value),(o+=e.value.length)>n.bytesLimit?a():t())})),v((function(t){return e(t)})))}()}var ri=1;function ii(t,e,n){var r=function(t,e){return{clearTracingIfNeeded:Tn,traceFetch:function(n){return xn(t,n,e,(function(t){var e;if(n.input instanceof Request&&!(null===(e=n.init)||void 0===e?void 0:e.headers))n.input=new Request(n.input),Object.keys(t).forEach((function(e){n.input.headers.append(e,t[e])}));else{n.init=Oe(n.init);var r=[];n.init.headers instanceof Headers?n.init.headers.forEach((function(t,e){r.push([e,t])})):Array.isArray(n.init.headers)?n.init.headers.forEach((function(t){r.push(t)})):n.init.headers&&Object.keys(n.init.headers).forEach((function(t){r.push([t,n.init.headers[t]])})),n.init.headers=r.concat(S(t))}}))},traceXhr:function(n,r){return xn(t,n,e,(function(t){Object.keys(t).forEach((function(e){r.setRequestHeader(e,t[e])}))}))}}}(e,n);!function(t,e,n){var r=Kr(e).subscribe((function(r){var i=r;if(ur(e,i.url))switch(i.state){case"start":n.traceXhr(i,i.xhr),i.requestIndex=oi(),t.notify(5,{requestIndex:i.requestIndex,url:i.url});break;case"complete":n.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})}}))}(t,e,r),function(t,e,n){var r=Jr().subscribe((function(r){var i=r;if(ur(e,i.url))switch(i.state){case"start":n.traceFetch(i),i.requestIndex=oi(),t.notify(5,{requestIndex:i.requestIndex,url:i.url});break;case"resolve":!function(t,e){var n=t.response&&ei(t.response);n&&n.body?ni(n.body,(function(){e(Ot(t.startClocks.timeStamp,bt()))}),{bytesLimit:Number.POSITIVE_INFINITY,collectStreamBody:!1}):e(Ot(t.startClocks.timeStamp,bt()))}(i,(function(e){n.clearTracingIfNeeded(i),t.notify(6,{duration:e,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})}))}}))}(t,e,r)}function oi(){var t=ri;return ri+=1,t}function ai(t){var e=t.lifeCycle,n=t.isChildEvent,r=t.onChange,i=void 0===r?F:r,o={errorCount:0,longTaskCount:0,resourceCount:0,actionCount:0,frustrationCount:0},a=e.subscribe(11,(function(t){var e;if("view"!==t.type&&n(t))switch(t.type){case"error":o.errorCount+=1,i();break;case"action":o.actionCount+=1,t.action.frustration&&(o.frustrationCount+=t.action.frustration.type.length),i();break;case"long_task":o.longTaskCount+=1,i();break;case"resource":(null===(e=t._dd)||void 0===e?void 0:e.discarded)||(o.resourceCount+=1,i())}}));return{stop:function(){a.unsubscribe()},eventCounts:o}}var si=100,ui=100;function ci(t,e,n,r,i){var o=function(t,e,n){var r=new Q((function(){var i,o=[],a=0;o.push(e.subscribe(c),t.subscribe(0,(function(t){t.some((function(t){return t.entryType===vr.RESOURCE&&!li(n,t.name)}))&&c()})),t.subscribe(5,(function(t){li(n,t.url)||(void 0===i&&(i=t.requestIndex),a+=1,c())})),t.subscribe(6,(function(t){li(n,t.url)||void 0===i||t.requestIndex<i||(a-=1,c())})));var s,u=(s=c,qr(window,"open",{before:s})).stop;return function(){u(),o.forEach((function(t){return t.unsubscribe()}))};function c(){r.notify({isBusy:a>0})}}));return r}(t,e,n);return function(t,e,n){var r,i=!1,o=L(v((function(){return c({hadActivity:!1})})),si),a=void 0!==n?L(v((function(){return c({hadActivity:!0,end:bt()})})),n):void 0,s=t.subscribe((function(t){var e=t.isBusy;M(o),M(r);var n=bt();e||(r=L(v((function(){return c({hadActivity:!0,end:n})})),ui))})),u=function(){i=!0,M(o),M(r),M(a),s.unsubscribe()};function c(t){i||(u(),e(t))}return{stop:u}}(o,r,i)}function li(t,e){return An(t.excludedActivityUrls,e)}var di="data-dd-action-name";function fi(t,e){return hi(t,di)||e&&hi(t,e)||yi(t,e,mi)||yi(t,e,_i)||""}function hi(t,e){var n;if(function(){void 0===vi&&(vi="closest"in HTMLElement.prototype);return vi}())n=t.closest("[".concat(e,"]"));else for(var r=t;r;){if(r.hasAttribute(e)){n=r;break}r=r.parentElement}if(n)return wi(bi(n.getAttribute(e).trim()))}var pi,vi,mi=[function(t,e){if(function(){void 0===pi&&(pi="labels"in HTMLInputElement.prototype);return pi}()){if("labels"in t&&t.labels&&t.labels.length>0)return Si(t.labels[0],e)}else if(t.id){var n=t.ownerDocument&&b(t.ownerDocument.querySelectorAll("label"),(function(e){return e.htmlFor===t.id}));return n&&Si(n,e)}},function(t){if("INPUT"===t.nodeName){var e=t,n=e.getAttribute("type");if("button"===n||"submit"===n||"reset"===n)return e.value}},function(t,e){if("BUTTON"===t.nodeName||"LABEL"===t.nodeName||"button"===t.getAttribute("role"))return Si(t,e)},function(t){return t.getAttribute("aria-label")},function(t,e){var n=t.getAttribute("aria-labelledby");if(n)return n.split(/\s+/).map((function(e){return function(t,e){return t.ownerDocument?t.ownerDocument.getElementById(e):null}(t,e)})).filter((function(t){return Boolean(t)})).map((function(t){return Si(t,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 Si(t.options[0],e)}],_i=[function(t,e){return Si(t,e)}],gi=10;function yi(t,e,n){for(var r=t,i=0;i<=gi&&r&&"BODY"!==r.nodeName&&"HTML"!==r.nodeName&&"HEAD"!==r.nodeName;){for(var o=0,a=n;o<a.length;o++){var s=(0,a[o])(r,e);if("string"==typeof s){var u=s.trim();if(u)return wi(bi(u))}}if("FORM"===r.nodeName)break;r=r.parentElement,i+=1}}function bi(t){return t.replace(/\s+/g," ")}function wi(t){return t.length>100?"".concat(Nt(t,100)," [...]"):t}function Si(t,e){if(!t.isContentEditable){if("innerText"in t){var n=t.innerText,r=function(e){for(var r=t.querySelectorAll(e),i=0;i<r.length;i+=1){var o=r[i];if("innerText"in o){var a=o.innerText;a&&a.trim().length>0&&(n=n.replace(a,""))}}};return 0===Ie()&&r("script, style"),r("[".concat(di,"]")),e&&r("[".concat(e,"]")),n}return t.textContent}}var Ei,Oi=[di,"data-testid","data-test","data-qa","data-cy","data-test-id","data-qa-id","data-testing","data-component","data-element","data-source-file"],ki=[Ci,function(t){if(t.id&&!xi(t.id))return"#".concat(O(t.id))}],Ai=[Ci,function(t){if("BODY"===t.tagName)return;if(t.classList.length>0)for(var e=0;e<t.classList.length;e+=1){var n=t.classList[e];if(!xi(n))return"".concat(O(t.tagName),".").concat(O(n))}},function(t){return O(t.tagName)}];function Ti(t,e){for(var n="",r=t;r&&"HTML"!==r.nodeName;){var i=Pi(r,ki,Ri,e,n);if(i)return i;n=Pi(r,Ai,Ni,e,n)||Li(Ii(r),n),r=r.parentElement}return n}function xi(t){return/[0-9]/.test(t)}function Ci(t,e){if(e&&(i=o(e)))return i;for(var n=0,r=Oi;n<r.length;n++){var i;if(i=o(r[n]))return i}function o(e){if(t.hasAttribute(e))return"".concat(O(t.tagName),"[").concat(e,'="').concat(O(t.getAttribute(e)),'"]')}}function Ii(t){for(var e=t.parentElement.firstElementChild,n=1;e&&e!==t;)e.tagName===t.tagName&&(n+=1),e=e.nextElementSibling;return"".concat(O(t.tagName),":nth-of-type(").concat(n,")")}function Pi(t,e,n,r,i){for(var o=0,a=e;o<a.length;o++){var s=(0,a[o])(t,r);if(s){var u=Li(s,i);if(n(t,u))return u}}}function Ri(t,e){return 1===t.ownerDocument.querySelectorAll(e).length}function Ni(t,e){return 1===t.parentElement.querySelectorAll(function(){if(void 0===Ei)try{document.querySelector(":scope"),Ei=!0}catch(t){Ei=!1}return Ei}()?Li(":scope",e):e).length}function Li(t,e){return e?"".concat(t,">").concat(e):t}var Mi=ft,Di=100;function ji(t,e){var n,r=[],i=0;function o(t){t.stopObservable.subscribe(a),r.push(t),M(n),n=L(s,Mi)}function a(){1===i&&r.every((function(t){return t.isStopped()}))&&(i=2,e(r))}function s(){M(n),0===i&&(i=1,a())}return o(t),{tryAppend:function(t){return 0===i&&(r.length>0&&(e=r[r.length-1].event,n=t.event,!(e.target===n.target&&(a=e,u=n,Math.sqrt(Math.pow(a.clientX-u.clientX,2)+Math.pow(a.clientY-u.clientY,2))<=Di)&&e.timeStamp-n.timeStamp<=Mi))?(s(),!1):(o(t),!0));var e,n,a,u},stop:function(){s()}}}function Ui(){var t=window.getSelection();return!t||t.isCollapsed}function Fi(t){return t.target instanceof Element&&!1!==t.isPrimary}var Bi=3;function Vi(t,e){if(function(t){if(t.some((function(t){return t.getUserActivity().selection})))return!1;for(var e=0;e<t.length-(Bi-1);e+=1)if(t[e+Bi-1].event.timeStamp-t[e].event.timeStamp<=ft)return!0;return!1}(t))return e.addFrustration("rage_click"),t.some(qi)&&e.addFrustration("dead_click"),e.hasError&&e.addFrustration("error_click"),{isRage:!0};var n=t.some((function(t){return t.getUserActivity().selection}));return t.forEach((function(t){t.hasError&&t.addFrustration("error_click"),qi(t)&&!n&&t.addFrustration("dead_click")})),{isRage:!1}}var zi='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 qi(t){return!t.hasPageActivity&&!t.getUserActivity().input&&(e=t.event.target,n=zi,!(e.matches?e.matches(n):e.msMatchesSelector&&e.msMatchesSelector(n)));var e,n}var Hi=10*ft,Gi=5*ht;function Yi(t,e,n){var r,i=new Br(Gi),o=new Q;t.subscribe(8,(function(){i.reset()})),t.subscribe(4,u);var a=function(t,e){var n,r,i=e.onPointerDown,o=e.onPointerUp,a={selection:!1,input:!1},s=[Kt(t,window,Ut.POINTER_DOWN,(function(t){Fi(t)&&(n=Ui(),a={selection:!1,input:!1},r=i(t))}),{capture:!0}),Kt(t,window,Ut.SELECTION_CHANGE,(function(){n&&Ui()||(a.selection=!0)}),{capture:!0}),Kt(t,window,Ut.POINTER_UP,(function(t){if(Fi(t)&&r){var e=a;o(r,t,(function(){return e})),r=void 0}}),{capture:!0}),Kt(t,window,Ut.INPUT,(function(){a.input=!0}),{capture:!0})];return{stop:function(){s.forEach((function(t){return t.stop()}))}}}(n,{onPointerDown:function(r){return function(t,e,n,r){var i=(a=r,s=t.actionNameAttribute,u=a.target.getBoundingClientRect(),{type:"click",target:{width:Math.round(u.width),height:Math.round(u.height),selector:Ti(a.target,s)},position:{x:Math.round(a.clientX-u.left),y:Math.round(a.clientY-u.top)},name:fi(a.target,s)}),o=!1;var a,s,u;return ci(e,n,t,(function(t){o=t.hadActivity}),si),{clickActionBase:i,hadActivityOnPointerDown:function(){return o}}}(n,t,e,r)},onPointerUp:function(r,a,u){var c=r.clickActionBase,l=r.hadActivityOnPointerDown;return function(t,e,n,r,i,o,a,s,u,c){var l=Ki(e,r,u,a,s);o(l);var d=ci(e,n,t,(function(t){t.hadActivity&&t.end<l.startClocks.timeStamp?l.discard():t.hadActivity?l.stop(t.end):c()?l.stop(l.startClocks.timeStamp):l.stop()}),Hi).stop,f=e.subscribe(4,(function(t){var e=t.endClocks;l.stop(e.timeStamp)})),h=i.subscribe((function(){l.stop()}));l.stopObservable.subscribe((function(){f.unsubscribe(),d(),h.unsubscribe()}))}(n,t,e,i,o,s,c,a,u,l)}}).stop;return{stop:function(){u(),o.notify(),a()},actionContexts:{findActionId:function(t){return i.findAll(t)}}};function s(t){if(!r||!r.tryAppend(t)){var e=t.clone();r=ji(t,(function(t){!function(t,e){var n=Vi(t,e).isRage;n?(t.forEach((function(t){return t.discard()})),e.stop(bt()),e.validate(t.map((function(t){return t.event})))):(e.discard(),t.forEach((function(t){return t.validate()})))}(t,e)}))}}function u(){r&&r.stop()}}function Ki(t,e,n,r,i){var o,a=xt(),s=St(),u=e.add(a,s.relative),c=ai({lifeCycle:t,isChildEvent:function(t){return void 0!==t.action&&(Array.isArray(t.action.id)?g(t.action.id,a):t.action.id===a)}}),l=0,d=[],f=new Q;function h(t){0===l&&(l=1,(o=t)?u.close(At(o)):u.remove(),c.stop(),f.notify())}return{event:i,stop:h,stopObservable:f,get hasError(){return c.eventCounts.errorCount>0},get hasPageActivity(){return void 0!==o},getUserActivity:n,addFrustration:function(t){d.push(t)},startClocks:s,isStopped:function(){return 1===l||2===l},clone:function(){return Ki(t,e,n,r,i)},validate:function(e){if(h(),1===l){var n=c.eventCounts,u=n.resourceCount,f=n.errorCount,p=n.longTaskCount,v=k({type:"click",duration:o&&Ot(s.timeStamp,o),startClocks:s,id:a,frustrationTypes:d,counts:{resourceCount:u,errorCount:f,longTaskCount:p},events:null!=e?e:[i],event:i},r);t.notify(1,v),l=2}},discard:function(){h(),l=2}}}function Wi(t,e){var n=$i(t)?{action:{id:t.id,loading_time:gt(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;return{customerContext:$i(t)?void 0:t.context,rawRumEvent:q({action:{id:xt(),target:{name:t.name},type:t.type},date:t.startClocks.timeStamp,type:"action",view:{in_foreground:e.isInActivePageStateAt(t.startClocks.relative)}},n),startTime:t.startClocks.relative,domainContext:$i(t)?{events:t.events}:{}}}function $i(t){return"custom"!==t.type}function Zi(t){var e,n=function(e,n){var r=pe({stackTrace:e,originalError:n,startClocks:St(),nonErrorPrefix:"Uncaught",source:kr.SOURCE,handling:"unhandled"});t.notify(r)},r=(e=n,qr(window,"onerror",{before:function(t,n,r,i,o){var a;a=o instanceof Error?te(o):le(t,n,r,i),e(a,null!=o?o:t)}})).stop,i=function(t){return qr(window,"onunhandledrejection",{before:function(e){var n=e.reason||"Empty reason",r=te(n);t(r,n)}})}(n).stop;return{stop:function(){r(),i()}}}var Ji={};function Xi(t){var e=t.map((function(t){return Ji[t]||(Ji[t]=function(t){var e=new Q((function(){var n=o[t];return o[t]=function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];n.apply(console,r);var a=ge();m((function(){e.notify(function(t,e,n){var r,o,a=t.map((function(t){return function(t){if("string"==typeof t)return $(t);if(t instanceof Error)return _e(te(t));return H($(t),void 0,2)}(t)})).join(" ");if(e===i.error){var s=b(t,(function(t){return t instanceof Error}));r=s?me(te(s)):void 0,o=ve(s)}return{api:e,message:a,stack:r,handlingStack:n,fingerprint:o}}(r,t,a))}))},function(){o[t]=n}}));return e}(t)),Ji[t]}));return tt.apply(void 0,e)}var Qi={intervention:"intervention",deprecation:"deprecation",cspViolation:"csp_violation"};function to(t,e){var n=[];g(e,Qi.cspViolation)&&n.push(function(t){var e=new Q((function(){return Kt(t,document,Ut.SECURITY_POLICY_VIOLATION,(function(t){e.notify(function(t){var e=Qi.cspViolation,n="'".concat(t.blockedURI,"' blocked by '").concat(t.effectiveDirective,"' directive");return{type:Qi.cspViolation,subtype:t.effectiveDirective,message:"".concat(e,": ").concat(n),stack:eo(t.effectiveDirective,t.originalPolicy?"".concat(n,' of the policy "').concat(Nt(t.originalPolicy,100,"..."),'"'):"no policy",t.sourceFile,t.lineNumber,t.columnNumber)}}(t))})).stop}));return e}(t));var r=e.filter((function(t){return t!==Qi.cspViolation}));return r.length&&n.push(function(t){var e=new Q((function(){if(window.ReportingObserver){var n=v((function(t,n){return t.forEach((function(t){e.notify(function(t){var e=t.type,n=t.body;return{type:e,subtype:n.id,message:"".concat(e,": ").concat(n.message),stack:eo(n.id,n.message,n.sourceFile,n.lineNumber,n.columnNumber)}}(t))}))})),r=new window.ReportingObserver(n,{types:t,buffered:!0});return r.observe(),function(){r.disconnect()}}}));return e}(r)),tt.apply(void 0,n)}function eo(t,e,n,r,i){return n?me({name:t,message:e,stack:[{func:"?",url:n,line:null!=r?r:void 0,column:null!=i?i:void 0}]}):void 0}function no(t,e,n,r){var o=new Q;return function(t){var e=Xi([i.error]).subscribe((function(e){return t.notify({startClocks:St(),message:e.message,stack:e.stack,fingerprint:e.fingerprint,source:kr.CONSOLE,handling:"handled",handlingStack:e.handlingStack})}))}(o),Zi(o),function(t,e){var n=to(t,[Qi.cspViolation,Qi.intervention]).subscribe((function(t){return e.notify({startClocks:St(),message:t.message,stack:t.stack,type:t.subtype,source:kr.REPORT,handling:"unhandled"})}))}(e,o),o.subscribe((function(e){return t.notify(12,{error:e})})),function(t,e,n){return t.subscribe(12,(function(r){var i=r.error,o=r.customerContext,a=r.savedCommonContext;t.notify(10,k({customerContext:o,savedCommonContext:a},function(t,e,n){var r={date:t.startClocks.timeStamp,error:{id:xt(),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)}},i=n.findFeatureFlagEvaluations(t.startClocks.relative);i&&!Ae(i)&&(r.feature_flags=i);return{rawRumEvent:r,startTime:t.startClocks.relative,domainContext:{error:t.originalError}}}(i,e,n)))})),{addError:function(e,n){var r=e.error,i=e.handlingStack,o=e.startClocks,a=e.context,s=pe({stackTrace:r instanceof Error?te(r):void 0,originalError:r,handlingStack:i,startClocks:o,nonErrorPrefix:"Provided",source:kr.CUSTOM,handling:"handled"});t.notify(12,{customerContext:a,savedCommonContext:n,error:s})}}}(t,n,r)}function ro(t){if(performance&&"getEntriesByName"in performance){var e=performance.getEntriesByName(t.url,"resource");if(e.length&&"toJSON"in e[0]){var n=e.map((function(t){return t.toJSON()})).filter(ir).filter((function(e){return n=e,r=t.startClocks.relative,i=io({startTime:t.startClocks.relative,duration:t.duration}),o=1,n.startTime>=r-o&&io(n)<=kt(i,o);var n,r,i,o}));return 1===n.length?n[0]:void 0}}}function io(t){return kt(t.startTime,t.duration)}function oo(t,e,n,r){t.subscribe(6,(function(i){var o=function(t,e,n,r){var i,o=ro(t),a=o?mt(o.startTime):t.startClocks,s=so(e,n,a),u=function(t,e){var n=t.traceSampled&&t.traceId&&t.spanId;if(!n)return;return{_dd:{span_id:t.spanId.toDecimalString(),trace_id:t.traceId.toDecimalString(),rule_psr:co(e)}}}(t,e);if(!s&&!u)return;var c="xhr"===t.type?"xhr":"fetch",l=o?uo(o):void 0,d=function(t,e,n){var r,i=null===(r=t.findAll(e.relative,n))||void 0===r?void 0:r.some((function(t){return"frozen"===t.state}));return i?void 0:gt(n)}(r,a,t.duration),f=lo(r,a,null!==(i=null==o?void 0:o.duration)&&void 0!==i?i:t.duration),h=q({date:a.timeStamp,resource:{id:xt(),type:c,duration:d,method:t.method,status_code:t.status,url:t.url},type:"resource",_dd:{discarded:!s}},u,l,f);return{startTime:a.relative,rawRumEvent:h,domainContext:{performanceEntry:o,xhr:t.xhr,response:t.response,requestInput:t.input,requestInit:t.init,error:t.error}}}(i,e,n,r);o&&t.notify(10,o)})),t.subscribe(0,(function(i){for(var o=0,a=i;o<a.length;o++){var s=a[o];if(s.entryType===vr.RESOURCE&&("xmlhttprequest"!==(c=s).initiatorType&&"fetch"!==c.initiatorType)){var u=ao(s,e,n,r);u&&t.notify(10,u)}}var c}))}function ao(t,e,n,r){var i=mt(t.startTime),o=so(e,n,i),a=function(t,e){var n=t.traceId;if(!n)return;return{_dd:{trace_id:t.traceId,rule_psr:co(e)}}}(t,e);if(o||a){var s=er(t),u=uo(t),c=lo(r,i,t.duration),l=q({date:i.timeStamp,resource:{id:xt(),type:s,url:t.name},type:"resource",_dd:{discarded:!o}},a,u,c);return{startTime:i.relative,rawRumEvent:l,domainContext:{performanceEntry:t}}}}function so(t,e,n){return t.trackResources&&e.findTrackedSession(n.relative)}function uo(t){return{resource:k({duration:(e=t,n=e.duration,r=e.startTime,i=e.responseEnd,gt(0===n&&r<i?Ot(r,i):n)),size:sr(t)},rr(t))};var e,n,r,i}function co(t){return lt(t.traceSampleRate)?t.traceSampleRate/100:void 0}function lo(t,e,n){if(Se(fe.RESOURCE_PAGE_STATES))return{_dd:{page_states:t.findAll(e.relative,n),page_was_discarded:String(document.wasDiscarded)}}}var fo=10*ht;var ho,po=10*ht;function vo(t,e,n,r){var i={},o=function(t,e){return{stop:t.subscribe(0,(function(t){for(var n=0,r=t;n<r.length;n++){var i=r[n];i.entryType===vr.NAVIGATION&&e({domComplete:i.domComplete,domContentLoaded:i.domContentLoadedEventEnd,domInteractive:i.domInteractive,loadEvent:i.loadEventEnd,firstByte:i.responseStart>=0&&i.responseStart<=wt()?i.responseStart:void 0})}})).unsubscribe}}(t,(function(t){n(t.loadEvent),i.navigationTimings=t,r()})).stop,a=function(t,e){var n,r;return void 0===e&&(e=window),"hidden"===document.visibilityState?n=0:(n=1/0,r=Wt(t,e,[Ut.PAGE_HIDE,Ut.VISIBILITY_CHANGE],(function(t){t.type!==Ut.PAGE_HIDE&&"hidden"!==document.visibilityState||(n=t.timeStamp,r())}),{capture:!0}).stop),{get timeStamp(){return n},stop:function(){null==r||r()}}}(e),s=function(t,e,n){return{stop:t.subscribe(0,(function(t){var r=b(t,(function(t){return t.entryType===vr.PAINT&&"first-contentful-paint"===t.name&&t.startTime<e.timeStamp&&t.startTime<fo}));r&&n(r.startTime)})).unsubscribe}}(t,a,(function(t){i.firstContentfulPaint=t,r()})).stop,u=function(t,e,n,r,i){var o=1/0,a=Wt(e,r,[Ut.POINTER_DOWN,Ut.KEY_DOWN],(function(t){o=t.timeStamp}),{capture:!0,once:!0}).stop,s=t.subscribe(0,(function(t){var r=function(t,e){for(var n=t.length-1;n>=0;n-=1){var r=t[n];if(e(r,n,t))return r}}(t,(function(t){return t.entryType===vr.LARGEST_CONTENTFUL_PAINT&&t.startTime<o&&t.startTime<n.timeStamp&&t.startTime<po}));if(r){var a=void 0;Se(fe.WEB_VITALS_ATTRIBUTION)&&r.element&&(a=Ti(r.element,e.actionNameAttribute)),i({value:r.startTime,targetSelector:a})}})).unsubscribe;return{stop:function(){a(),s()}}}(t,e,a,window,(function(t){i.largestContentfulPaint=t,r()})).stop,c=function(t,e,n,r){return{stop:t.subscribe(0,(function(t){var i=b(t,(function(t){return t.entryType===vr.FIRST_INPUT&&t.startTime<n.timeStamp}));if(i){var o=Ot(i.startTime,i.processingStart),a=void 0;Se(fe.WEB_VITALS_ATTRIBUTION)&&i.target&&lr(i.target)&&(a=Ti(i.target,e.actionNameAttribute)),r({delay:o>=0?o:0,time:i.startTime,targetSelector:a})}})).unsubscribe}}(t,e,a,(function(t){i.firstInput=t,r()})).stop;return{stop:function(){o(),s(),u(),c(),a.stop()},initialViewMetrics:i}}function mo(t,e,n){if(!wr(vr.LAYOUT_SHIFT))return{stop:F};var r=0;n({value:0});var i=function(){var t,e,n,r,i=0,o=0;return{update:function(a){var s,u;void 0===t||a.startTime-e>=ft||a.startTime-t>=5*ft?(t=e=a.startTime,i=a.value,o=0,n=void 0):(i+=a.value,e=a.startTime),a.value>o&&(o=a.value,r=a.startTime,n=(null===(s=a.sources)||void 0===s?void 0:s.length)?null===(u=b(a.sources,(function(t){return!!t.node&&lr(t.node)})))||void 0===u?void 0:u.node:void 0)},value:function(){return i},largestLayoutShiftTarget:function(){return n},largestLayoutShiftTime:function(){return r}}}();return{stop:e.subscribe(0,(function(e){for(var o=0,a=e;o<a.length;o++){var s=a[o];if(s.entryType===vr.LAYOUT_SHIFT&&!s.hadRecentInput&&(i.update(s),i.value()>r)){var u=ut(r=i.value(),4),c=i.largestLayoutShiftTarget(),l=void 0;Se(fe.WEB_VITALS_ATTRIBUTION)&&c&&c.isConnected&&(l=Ti(c,t.actionNameAttribute)),n({value:u,targetSelector:l})}}})).unsubscribe}}var _o=0,go=1/0,yo=0;var bo,wo=function(){return ho?_o:window.performance.interactionCount||0},So=10,Eo=1*ht;function Oo(t,e,n,r){if(!(wr(vr.EVENT)&&window.PerformanceEventTiming&&"interactionId"in PerformanceEventTiming.prototype))return{getInteractionToNextPaint:function(){},setViewEnd:F,stop:F};var i,o=function(t){"interactionCount"in performance||ho||(ho=new window.PerformanceObserver(v((function(t){t.getEntries().forEach((function(t){var e=t;e.interactionId&&(go=Math.min(go,e.interactionId),yo=Math.max(yo,e.interactionId),_o=(yo-go)/7+1)}))})))).observe({type:"event",buffered:!0,durationThreshold:0});var e="initial_load"===t?0:wo(),n={stopped:!1};function r(){return wo()-e}return{getViewInteractionCount:function(){return n.stopped?n.interactionCount:r()},stopViewInteractionCount:function(){n={stopped:!0,interactionCount:r()}}}}(n),a=o.getViewInteractionCount,s=o.stopViewInteractionCount,u=1/0,c=function(t){var e=[];function n(){e.sort((function(t,e){return e.duration-t.duration})).splice(So)}return{process:function(t){var r=e.findIndex((function(e){return t.interactionId===e.interactionId})),i=e[e.length-1];-1!==r?t.duration>e[r].duration&&(e[r]=t,n()):(e.length<So||t.duration>i.duration)&&(e.push(t),n())},estimateP98Interaction:function(){var n=Math.min(e.length-1,Math.floor(t()/50));return e[n]}}}(a),l=-1;return{getInteractionToNextPaint:function(){return l>=0?{value:Math.min(l,Eo),targetSelector:i}:a()?{value:0}:void 0},setViewEnd:function(t){u=t,s()},stop:r.subscribe(0,(function(n){for(var r=0,o=n;r<o.length;r++){var a=o[r];(a.entryType===vr.EVENT||a.entryType===vr.FIRST_INPUT)&&a.interactionId&&a.startTime>=e&&a.startTime<=u&&c.process(a)}var s=c.estimateP98Interaction();s&&(l=s.duration,i=Se(fe.WEB_VITALS_ATTRIBUTION)&&s.target&&lr(s.target)?Ti(s.target,t.actionNameAttribute):void 0)})).unsubscribe}}function ko(){var t,e=window.visualViewport;return t=e?e.pageLeft-e.offsetLeft:void 0!==window.scrollX?window.scrollX:window.pageXOffset||0,Math.round(t)}function Ao(){var t,e=window.visualViewport;return t=e?e.pageTop-e.offsetTop:void 0!==window.scrollY?window.scrollY:window.pageYOffset||0,Math.round(t)}function To(t){return bo||(bo=function(t){var e=new Q((function(){var n=U((function(){e.notify(xo())}),200).throttled;return Kt(t,window,Ut.RESIZE,n,{capture:!0,passive:!0}).stop}));return e}(t)),bo}function xo(){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 Co=ft;function Io(t,e,n,r){void 0===r&&(r=function(t,e){void 0===e&&(e=Co);var n=new Q((function(){function r(){var t,e,r,i;n.notify((t=Ao(),e=xo().height,r=Math.round((document.scrollingElement||document.documentElement).scrollHeight),i=Math.round(e+t),{scrollHeight:r,scrollDepth:i,scrollTop:t}))}if(window.ResizeObserver){var i=U(r,e,{leading:!1,trailing:!0}),o=document.scrollingElement||document.documentElement,a=new ResizeObserver(v(i.throttled));a.observe(o);var s=Kt(t,window,Ut.SCROLL,i.throttled,{passive:!0});return function(){i.cancel(),a.unobserve(o),s.stop()}}}));return n}(t));var i=0,o=0,a=0,s=r.subscribe((function(t){var r=t.scrollDepth,s=t.scrollTop,u=t.scrollHeight,c=!1;if(r>i&&(i=r,c=!0),u>o){o=u;var l=wt();a=Ot(e.relative,l),c=!0}c&&n({maxDepth:Math.min(i,o),maxDepthScrollTop:s,maxScrollHeight:o,maxScrollHeightTime:a})}));return{stop:function(){return s.unsubscribe()}}}function Po(t,e,n,r,i,o){var a={},s=function(t,e,n,r,i,o){var a="initial_load"===r,s=!0,u=[];function c(){!s&&!a&&u.length>0&&o(Math.max.apply(Math,u))}return{stop:ci(t,e,n,(function(t){s&&(s=!1,t.hadActivity&&u.push(Ot(i.timeStamp,t.end)),c())})).stop,setLoadEvent:function(t){a&&(a=!1,u.push(t),c())}}}(t,e,n,i,o,(function(t){a.loadingTime=t,r()})),u=s.stop,c=s.setLoadEvent,l=Io(n,o,(function(t){a.scroll=t})).stop,d=mo(n,t,(function(t){a.cumulativeLayoutShift=t,r()})).stop,f=Oo(n,o.relative,i,t),h=f.stop,p=f.getInteractionToNextPaint;return{stop:function(){u(),d(),l()},stopINPTracking:h,setLoadEvent:c,setViewEnd:f.setViewEnd,getCommonViewMetrics:function(){return a.interactionToNextPaint=p(),a}}}var Ro=3e3,No=5*ht,Lo=5*ht;function Mo(t,e,n,r,i,o,a){var s,c=new Set,l=d("initial_load",Et(),a);function d(i,o,a){var s=function(t,e,n,r,i,o,a){void 0===o&&(o=St());var s,c,l,d,f=xt(),h=new Q,p={},v=0,m=Oe(r),_=!0;a&&(c=a.name,l=a.service,d=a.version);t.notify(2,{id:f,name:c,startClocks:o,service:l,version:d});var g=U(M,Ro,{leading:!1}),y=g.throttled,b=g.cancel,w=Po(t,e,n,y,i,o),S=w.setLoadEvent,E=w.setViewEnd,O=w.stop,k=w.stopINPTracking,A=w.getCommonViewMetrics,T="initial_load"===i?vo(t,n,S,y):{stop:F,initialViewMetrics:{}},x=T.stop,C=T.initialViewMetrics,I=function(t,e,n){var r=ai({lifeCycle:t,isChildEvent:function(t){return t.view.id===e},onChange:n});return{stop:r.stop,eventCounts:r.eventCounts}}(t,f,y),P=I.stop,R=I.eventCounts,N=D(M,No);function M(){b(),v+=1;var e=void 0===s?bt():s.timeStamp;t.notify(3,{customTimings:p,documentVersion:v,id:f,name:c,service:l,version:d,loadingType:i,location:m,startClocks:o,commonViewMetrics:A(),initialViewMetrics:C,duration:Ot(o.timeStamp,e),isActive:void 0===s,sessionIsActive:_,eventCounts:R})}return M(),{name:c,service:l,version:d,stopObservable:h,end:function(e){var n,r,i=this;void 0===e&&(e={}),s||(s=null!==(n=e.endClocks)&&void 0!==n?n:St(),_=null===(r=e.sessionIsActive)||void 0===r||r,t.notify(4,{endClocks:s}),j(N),E(s.relative),O(),M(),L((function(){i.stop()}),Lo))},stop:function(){x(),P(),k(),h.notify()},addTiming:function(t,e){if(!s){var n=function(t){return t<vt}(e)?e:Ot(o.timeStamp,e);p[function(t){var e=t.replace(/[^a-zA-Z0-9-_.@$]/g,"_");e!==t&&u.warn("Invalid timing name: ".concat(t,", sanitized to: ").concat(e));return e}(t)]=n,y()}}}}(e,n,r,t,i,o,a);return c.add(s),s.stopObservable.subscribe((function(){c.delete(s)})),s}return e.subscribe(8,(function(){l=d("route_change",void 0,{name:l.name,service:l.service,version:l.version})})),e.subscribe(7,(function(){l.end({sessionIsActive:!1})})),e.subscribe(9,(function(t){t.reason!==Wn.UNLOADING&&t.reason!==Wn.PAGEHIDE||l.end()})),o&&(s=function(t){return t.subscribe((function(t){var e,n,r,i,o=t.oldLocation,a=t.newLocation;n=a,(e=o).pathname===n.pathname&&(r=n.hash,""!==(i=r.substring(1))&&document.getElementById(i)||Do(n.hash)===Do(e.hash))||(l.end(),l=d("route_change"))}))}(i)),{addTiming:function(t,e){void 0===e&&(e=bt()),l.addTiming(t,e)},startView:function(t,e){l.end({endClocks:e}),l=d("route_change",e,t)},stop:function(){null==s||s.unsubscribe(),l.end(),c.forEach((function(t){return t.stop()}))}}}function Do(t){var e=t.indexOf("?");return e<0?t:t.slice(0,e)}function jo(t,e,n,r,i,o,a,s,u){return t.subscribe(3,(function(n){return t.notify(10,function(t,e,n,r,i){var o,a,s,u,c,l,d,f,h,p,v,m,_,g,y=r.getReplayStats(t.id),b=n.findFeatureFlagEvaluations(t.startClocks.relative),w=i.findAll(t.startClocks.relative,t.duration),S={_dd:{document_version:t.documentVersion,replay_stats:y,page_states:w,configuration:{start_session_replay_recording_manually:e.startSessionReplayRecordingManually}},date:t.startClocks.timeStamp,type:"view",view:{action:{count:t.eventCounts.actionCount},frustration:{count:t.eventCounts.frustrationCount},cumulative_layout_shift:null===(o=t.commonViewMetrics.cumulativeLayoutShift)||void 0===o?void 0:o.value,cumulative_layout_shift_target_selector:null===(a=t.commonViewMetrics.cumulativeLayoutShift)||void 0===a?void 0:a.targetSelector,first_byte:gt(null===(s=t.initialViewMetrics.navigationTimings)||void 0===s?void 0:s.firstByte),dom_complete:gt(null===(u=t.initialViewMetrics.navigationTimings)||void 0===u?void 0:u.domComplete),dom_content_loaded:gt(null===(c=t.initialViewMetrics.navigationTimings)||void 0===c?void 0:c.domContentLoaded),dom_interactive:gt(null===(l=t.initialViewMetrics.navigationTimings)||void 0===l?void 0:l.domInteractive),error:{count:t.eventCounts.errorCount},first_contentful_paint:gt(t.initialViewMetrics.firstContentfulPaint),first_input_delay:gt(null===(d=t.initialViewMetrics.firstInput)||void 0===d?void 0:d.delay),first_input_time:gt(null===(f=t.initialViewMetrics.firstInput)||void 0===f?void 0:f.time),first_input_target_selector:null===(h=t.initialViewMetrics.firstInput)||void 0===h?void 0:h.targetSelector,interaction_to_next_paint:gt(null===(p=t.commonViewMetrics.interactionToNextPaint)||void 0===p?void 0:p.value),interaction_to_next_paint_target_selector:null===(v=t.commonViewMetrics.interactionToNextPaint)||void 0===v?void 0:v.targetSelector,is_active:t.isActive,name:t.name,largest_contentful_paint:gt(null===(m=t.initialViewMetrics.largestContentfulPaint)||void 0===m?void 0:m.value),largest_contentful_paint_target_selector:null===(_=t.initialViewMetrics.largestContentfulPaint)||void 0===_?void 0:_.targetSelector,load_event:gt(null===(g=t.initialViewMetrics.navigationTimings)||void 0===g?void 0:g.loadEvent),loading_time:Uo(gt(t.commonViewMetrics.loadingTime)),loading_type:t.loadingType,long_task:{count:t.eventCounts.longTaskCount},resource:{count:t.eventCounts.resourceCount},time_spent:gt(t.duration)},feature_flags:b&&!Ae(b)?b: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:gt(t.commonViewMetrics.scroll.maxScrollHeightTime)}}:void 0,session:{has_replay:!!y||void 0,is_active:!!t.sessionIsActive&&void 0},privacy:{replay_level:e.defaultPrivacyLevel}};Ae(t.customTimings)||(S.view.custom_timings=function(t,e){for(var n={},r=0,i=Object.keys(t);r<i.length;r++){var o=i[r];n[o]=e(t[o])}return n}(t.customTimings,gt));return{rawRumEvent:S,startTime:t.startClocks.relative,domainContext:{location:t.location}}}(n,e,o,s,a))})),Mo(n,t,r,e,i,!e.trackViewsManually,u)}function Uo(t){return lt(t)&&t<0?void 0:t}var Fo=ht,Bo=xe,Vo=[];function zo(t,e,n){var r=un(t.sessionStoreStrategyType,e,n);Vo.push((function(){return r.stop()}));var i=new Br(Bo);function o(){return{id:r.getSession().id,trackingType:r.getSession()[e]}}return Vo.push((function(){return i.stop()})),r.renewObservable.subscribe((function(){i.add(o(),wt())})),r.expireObservable.subscribe((function(){i.closeActive(wt())})),r.expandOrRenewSession(),i.add(o(),Et().relative),function(t,e){var n=Wt(t,window,[Ut.CLICK,Ut.TOUCH_START,Ut.KEY_DOWN,Ut.SCROLL],e,{capture:!0,passive:!0}).stop;Vo.push(n)}(t,(function(){return r.expandOrRenewSession()})),function(t,e){var n=function(){"visible"===document.visibilityState&&e()},r=Kt(t,document,Ut.VISIBILITY_CHANGE,n).stop;Vo.push(r);var i=D(n,Fo);Vo.push((function(){j(i)}))}(t,(function(){return r.expandSession()})),{findActiveSession:function(t){return i.find(t)},renewObservable:r.renewObservable,expireObservable:r.expireObservable,expire:r.expire}}var qo="rum";function Ho(t,e){var n=zo(t,qo,(function(e){return function(t,e){var n;n=function(t){return"0"===t||"1"===t||"2"===t}(e)?e:st(t.sessionSampleRate)?st(t.sessionReplaySampleRate)?"1":"2":"0";return{trackingType:n,isTracked:Go(n)}}(t,e)}));return n.expireObservable.subscribe((function(){e.notify(7)})),n.renewObservable.subscribe((function(){e.notify(8)})),{findTrackedSession:function(t){var e=n.findActiveSession(t);if(e&&Go(e.trackingType))return{id:e.id,sessionReplayAllowed:"1"===e.trackingType}},expire:n.expire,expireObservable:n.expireObservable}}function Go(t){return"2"===t||"1"===t}var Yo=function(){function t(t,e,n,r){var i=this;this.encoder=t,this.request=e,this.flushController=n,this.messageBytesLimit=r,this.upsertBuffer={},this.flushSubscription=this.flushController.flushObservable.subscribe((function(t){return i.flush(t)}))}return t.prototype.add=function(t){this.addOrUpdate(t)},t.prototype.upsert=function(t,e){this.addOrUpdate(t,e)},t.prototype.stop=function(){this.flushSubscription.unsubscribe()},t.prototype.flush=function(t){var e=w(this.upsertBuffer).join("\n");this.upsertBuffer={};var n=Zn(t.reason),r=n?this.request.sendOnExit:this.request.send;if(n&&this.encoder.isAsync){var i=this.encoder.finishSync();i.outputBytesCount&&r(Ko(i,t));var o=[i.pendingData,e].filter(Boolean).join("\n");o&&r({data:o,bytesCount:R(o),flushReason:t.reason})}else e&&this.encoder.write(this.encoder.isEmpty?e:"\n".concat(e)),this.encoder.finish((function(e){r(Ko(e,t))}))},t.prototype.addOrUpdate=function(t,e){var n=H(t),r=this.encoder.estimateEncodedBytesCount(n);r>=this.messageBytesLimit?u.warn("Discarded a message whose size was bigger than the maximum allowed size ".concat(this.messageBytesLimit,"KB.")):(this.hasMessageFor(e)&&this.remove(e),this.push(n,r,e))},t.prototype.push=function(t,e,n){var r=this;this.flushController.notifyBeforeAddMessage(e),void 0!==n?(this.upsertBuffer[n]=t,this.flushController.notifyAfterAddMessage()):this.encoder.write(this.encoder.isEmpty?t:"\n".concat(t),(function(t){r.flushController.notifyAfterAddMessage(t-e)}))},t.prototype.remove=function(t){var e=this.upsertBuffer[t];delete this.upsertBuffer[t];var n=this.encoder.estimateEncodedBytesCount(e);this.flushController.notifyAfterRemoveMessage(n)},t.prototype.hasMessageFor=function(t){return void 0!==t&&void 0!==this.upsertBuffer[t]},t}();function Ko(t,e){return{data:"string"==typeof t.output?t.output:new Blob([t.output],{type:"text/plain"}),bytesCount:t.outputBytesCount,encoding:t.encoding,flushReason:e.reason}}var Wo=80*C,$o=32,Zo=3*I,Jo=ht,Xo=ft;function Qo(t,e,n,r,i){0===e.transportStatus&&0===e.queuedPayloads.size()&&e.bandwidthMonitor.canHandle(t)?ea(t,e,n,{onSuccess:function(){return na(0,e,n,r,i)},onFailure:function(){e.queuedPayloads.enqueue(t),ta(e,n,r,i)}}):e.queuedPayloads.enqueue(t)}function ta(t,e,n,r){2===t.transportStatus&&L((function(){ea(t.queuedPayloads.first(),t,e,{onSuccess:function(){t.queuedPayloads.dequeue(),t.currentBackoffTime=Xo,na(1,t,e,n,r)},onFailure:function(){t.currentBackoffTime=Math.min(Jo,2*t.currentBackoffTime),ta(t,e,n,r)}})}),t.currentBackoffTime)}function ea(t,e,n,r){var i=r.onSuccess,o=r.onFailure;e.bandwidthMonitor.add(t),n(t,(function(n){e.bandwidthMonitor.remove(t),!function(t){return"opaque"!==t.type&&(0===t.status&&!navigator.onLine||408===t.status||429===t.status||ti(t.status))}(n)?(e.transportStatus=0,i()):(e.transportStatus=e.bandwidthMonitor.ongoingRequestCount>0?1:2,t.retry={count:t.retry?t.retry.count+1:1,lastFailureStatus:n.status},o())}))}function na(t,e,n,r,i){0===t&&e.queuedPayloads.isFull()&&!e.queueFullReported&&(i({message:"Reached max ".concat(r," events size queued for upload: ").concat(Zo/I,"MiB"),source:kr.AGENT,startClocks:St()}),e.queueFullReported=!0);var o=e.queuedPayloads;for(e.queuedPayloads=ra();o.size()>0;)Qo(o.dequeue(),e,n,r,i)}function ra(){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>=Zo}}}function ia(t,e,n,r){var i={transportStatus:0,currentBackoffTime:Xo,bandwidthMonitor:{ongoingRequestCount:0,ongoingByteCount:0,canHandle:function(t){return 0===this.ongoingRequestCount||this.ongoingByteCount+t.bytesCount<=Wo&&this.ongoingRequestCount<$o},add:function(t){this.ongoingRequestCount+=1,this.ongoingByteCount+=t.bytesCount},remove:function(t){this.ongoingRequestCount-=1,this.ongoingByteCount-=t.bytesCount}},queuedPayloads:ra(),queueFullReported:!1},o=function(r,i){return function(t,e,n,r,i){var o=function(){try{return window.Request&&"keepalive"in new Request("http://a")}catch(t){return!1}}()&&r.bytesCount<n;if(o){var a=e.build("fetch",r);fetch(a,{method:"POST",body:r.data,keepalive:!0,mode:"cors"}).then(v((function(t){return null==i?void 0:i({status:t.status,type:t.type})})),v((function(){var n=e.build("xhr",r);aa(t,n,r.data,i)})))}else{var s=e.build("xhr",r);aa(t,s,r.data,i)}}(t,e,n,r,i)};return{send:function(t){Qo(t,i,o,e.trackType,r)},sendOnExit:function(r){!function(t,e,n,r){var i=!!navigator.sendBeacon&&r.bytesCount<n;if(i)try{var o=e.build("beacon",r);if(navigator.sendBeacon(o,r.data))return}catch(t){!function(t){oa||(oa=!0,Hn(t))}(t)}var a=e.build("xhr",r);aa(t,a,r.data)}(t,e,n,r)}}}var oa=!1;function aa(t,e,n,r){var i=new XMLHttpRequest;i.open("POST",e,!0),n instanceof Blob&&i.setRequestHeader("Content-Type",n.type),Kt(t,i,"loadend",(function(){null==r||r({status:i.status})}),{once:!0}),i.send(n)}function sa(t){var e,n=t.messagesLimit,r=t.bytesLimit,i=t.durationLimit,o=t.pageExitObservable,a=t.sessionExpireObservable,s=o.subscribe((function(t){return f(t.reason)})),u=a.subscribe((function(){return f("session_expire")})),c=new Q((function(){return function(){s.unsubscribe(),u.unsubscribe()}})),l=0,d=0;function f(t){if(0!==d){var e=d,n=l;d=0,l=0,h(),c.notify({reason:t,messagesCount:e,bytesCount:n})}}function h(){M(e),e=void 0}return{flushObservable:c,get messagesCount(){return d},notifyBeforeAddMessage:function(t){l+t>=r&&f("bytes_limit"),d+=1,l+=t,void 0===e&&(e=L((function(){f("duration_limit")}),i))},notifyAfterAddMessage:function(t){void 0===t&&(t=0),l+=t,d>=n?f("messages_limit"):l>=r&&f("bytes_limit")},notifyAfterRemoveMessage:function(t){l-=t,0===(d-=1)&&h()}}}function ua(t,e,n,r,i,o){var a=u(t,e),s=n&&u(t,n);function u(t,e){var n=e.endpoint,a=e.encoder;return new Yo(a,ia(t,n,t.batchBytesLimit,r),sa({messagesLimit:t.batchMessagesLimit,bytesLimit:t.batchBytesLimit,durationLimit:t.flushTimeout,pageExitObservable:i,sessionExpireObservable:o}),t.messageBytesLimit)}return{flushObservable:a.flushController.flushObservable,add:function(t,e){void 0===e&&(e=!0),a.add(t),s&&e&&s.add(n.transformMessage?n.transformMessage(t):t)},upsert:function(t,e){a.upsert(t,e),s&&s.upsert(n.transformMessage?n.transformMessage(t):t,e)},stop:function(){a.stop(),null==s||s.stop()}}}var ca=xe;function la(t,e){var n=Oe(e),r=new Q((function(){var e=function(t,e){var n=qr(history,"pushState",{after:e}).stop,r=qr(history,"replaceState",{after:e}).stop,i=Kt(t,window,Ut.POP_STATE,e).stop;return{stop:function(){n(),r(),i()}}}(t,i).stop,n=function(t,e){return Kt(t,window,Ut.HASH_CHANGE,e)}(t,i).stop;return function(){e(),n()}}));function i(){if(n.href!==e.href){var t=Oe(e);r.notify({newLocation:t,oldLocation:n}),n=t}}return r}var da=xe,fa=200;var ha,pa,va,ma=10*ft;function _a(){0!==ha.batchCount&&(qn("Customer data measures",ha),ba())}function ga(t,e){t.sum+=e,t.min=Math.min(t.min,e),t.max=Math.max(t.max,e)}function ya(t,e){t.sum+=e.sum,t.min=Math.min(t.min,e.min),t.max=Math.max(t.max,e.max)}function ba(){ha={batchCount:0,batchBytesCount:{min:1/0,max:0,sum:0},batchMessagesCount:{min:1/0,max:0,sum:0},globalContextBytes:{min:1/0,max:0,sum:0},userContextBytes:{min:1/0,max:0,sum:0},featureFlagBytes:{min:1/0,max:0,sum:0}}}function wa(){va=!1,pa={globalContextBytes:{min:1/0,max:0,sum:0},userContextBytes:{min:1/0,max:0,sum:0},featureFlagBytes:{min:1/0,max:0,sum:0}}}var Sa=4e3,Ea=500,Oa=xe;function ka(t,e){void 0===e&&(e=Ea);var n,r=new Br(Oa,Sa);o(Aa(),wt());var i=Wt(t,window,[Ut.PAGE_SHOW,Ut.FOCUS,Ut.BLUR,Ut.VISIBILITY_CHANGE,Ut.RESUME,Ut.FREEZE,Ut.PAGE_HIDE],(function(t){o(function(t){if(t.type===Ut.FREEZE)return"frozen";if(t.type===Ut.PAGE_HIDE)return t.persisted?"frozen":"terminated";return Aa()}(t),t.timeStamp)}),{capture:!0}).stop;function o(t,e){void 0===e&&(e=wt()),t!==n&&(n=t,r.closeActive(e),r.add({state:n,startTime:e},e))}return{findAll:function(t,n){var i=r.findAll(t,n);if(0!==i.length){for(var o=[],a=Math.max(0,i.length-e),s=i.length-1;s>=a;s--){var u=i[s],c=Ot(t,u.startTime);o.push({state:u.state,start:gt(c)})}return o}},isInActivePageStateAt:function(t){var e=r.find(t);return void 0!==e&&"active"===e.state},addPageState:o,stop:function(){i(),r.stop()}}}function Aa(){return"hidden"===document.visibilityState?"hidden":document.hasFocus()?"active":"passive"}function Ta(t,e){var n=e.session,r=e.viewContext,i=e.errorType,o=n?n.id:"no-session-id",a=[];void 0!==i&&a.push("error-type=".concat(i)),r&&(a.push("seed=".concat(r.id)),a.push("from=".concat(r.startClocks.timeStamp)));var s,u,c,l=(u=(s=t).site,c=s.subdomain||function(t){switch(t.site){case vn:case mn:return"app";case pn:return"dd";default:return}}(s),"https://".concat(c?"".concat(c,"."):"").concat(u)),d="/rum/replay/sessions/".concat(o);return"".concat(l).concat(d,"?").concat(a.join("&"))}var xa={FullSnapshot:2,IncrementalSnapshot:3,Meta:4,Focus:6,ViewEnd:7,VisualViewport:8,FrustrationRecord:9},Ca={Document:0,DocumentType:1,Element:2,Text:3,CDATA:4,DocumentFragment:11},Ia={Mutation:0,MouseMove:1,MouseInteraction:2,Scroll:3,ViewportResize:4,Input:5,TouchMove:6,MediaInteraction:7,StyleSheetRule:8},Pa={MouseUp:0,MouseDown:1,Click:2,ContextMenu:3,DblClick:4,Focus:5,Blur:6,TouchStart:7,TouchEnd:9},Ra={Play:0,Pause:1};function Na(t,e){return{data:k({source:t},e),type:xa.IncrementalSnapshot,timestamp:bt()}}var La={IGNORE:"ignore",HIDDEN:"hidden",ALLOW:Sn.ALLOW,MASK:Sn.MASK,MASK_USER_INPUT:Sn.MASK_USER_INPUT},Ma="data-dd-privacy",Da="allow",ja="mask",Ua="mask-user-input",Fa="hidden",Ba="dd-privacy-allow",Va="dd-privacy-mask",za="dd-privacy-mask-user-input",qa="dd-privacy-hidden",Ha="***",Ga="data:image/gif;base64,R0lGODlhAQABAIAAAMLCwgAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==",Ya={INPUT:!0,OUTPUT:!0,TEXTAREA:!0,SELECT:!0,OPTION:!0,DATALIST:!0,OPTGROUP:!0},Ka=1e5;function Wa(t,e){var n=pr(t),r=n?Wa(n,e):e;return $a(Za(t),r)}function $a(t,e){switch(e){case La.HIDDEN:case La.IGNORE:return e}switch(t){case La.ALLOW:case La.MASK:case La.MASK_USER_INPUT:case La.HIDDEN:case La.IGNORE:return t;default:return e}}function Za(t){if(lr(t)){var e=t.getAttribute(Ma);if("BASE"===t.tagName)return La.ALLOW;if("INPUT"===t.tagName){var n=t;if("password"===n.type||"email"===n.type||"tel"===n.type)return La.MASK;if("hidden"===n.type)return La.MASK;var r=n.getAttribute("autocomplete");if(r&&0===r.indexOf("cc-"))return La.MASK}return e===Fa||t.classList.contains(qa)?La.HIDDEN:e===ja||t.classList.contains(Va)?La.MASK:e===Ua||t.classList.contains(za)?La.MASK_USER_INPUT:e===Da||t.classList.contains(Ba)?La.ALLOW:function(t){if("SCRIPT"===t.nodeName)return!0;if("LINK"===t.nodeName){var e=i("rel");return/preload|prefetch/i.test(e)&&"script"===i("as")||"shortcut icon"===e||"icon"===e}if("META"===t.nodeName){var n=i("name"),r=(e=i("rel"),i("property"));return/^msapplication-tile(image|color)$/.test(n)||"application-name"===n||"icon"===e||"apple-touch-icon"===e||"shortcut icon"===e||"keywords"===n||"description"===n||/^(og|twitter|fb):/.test(r)||/^(og|twitter):/.test(n)||"pinterest"===n||"robots"===n||"googlebot"===n||"bingbot"===n||t.hasAttribute("http-equiv")||"author"===n||"generator"===n||"framework"===n||"publisher"===n||"progid"===n||/^article:/.test(r)||/^product:/.test(r)||"google-site-verification"===n||"yandex-verification"===n||"csrf-token"===n||"p:domain_verify"===n||"verify-v1"===n||"verification"===n||"shopify-checkout-api-token"===n}function i(e){return(t.getAttribute(e)||"").toLowerCase()}return!1}(t)?La.IGNORE:void 0}}function Ja(t,e){switch(e){case La.MASK:case La.HIDDEN:case La.IGNORE:return!0;case La.MASK_USER_INPUT:return cr(t)?Xa(t.parentNode):Xa(t);default:return!1}}function Xa(t){if(!t||t.nodeType!==t.ELEMENT_NODE)return!1;var e=t;if("INPUT"===e.tagName)switch(e.type){case"button":case"color":case"reset":case"submit":return!1}return!!Ya[e.tagName]}var Qa=function(t){return t.replace(/\S/g,"x")};function ts(t,e,n){var r,i=null===(r=t.parentElement)||void 0===r?void 0:r.tagName,o=t.textContent||"";if(!e||o.trim()){var a=n;if("SCRIPT"===i)o=Ha;else if(a===La.HIDDEN)o=Ha;else if(Ja(t,a))if("DATALIST"===i||"SELECT"===i||"OPTGROUP"===i){if(!o.trim())return}else o="OPTION"===i?Ha:Qa(o);return o}}var es=new WeakMap;function ns(t){return es.has(t)}function rs(t){return es.get(t)}function is(t,e){var n=t.tagName,r=t.value;if(Ja(t,e)){var i=t.type;if("INPUT"===n&&("button"===i||"submit"===i||"reset"===i))return r;if(!r||"OPTION"===n)return;return Ha}return"OPTION"===n||"SELECT"===n?t.value:"INPUT"===n||"TEXTAREA"===n?r:void 0}var os=/url\((?:(')([^']*)'|(")([^"]*)"|([^)]*))\)/gm,as=/^[A-Za-z]+:|^\/\//,ss=/^data:.*,/i;function us(t,e){return t.replace(os,(function(t,n,r,i,o,a){var s=r||o||a;if(!e||!s||as.test(s)||ss.test(s))return t;var u=n||i||"";return"url(".concat(u).concat(function(t,e){try{return ln(t,e).href}catch(e){return t}}(s,e)).concat(u,")")}))}var cs=/[^a-z1-6-_]/;function ls(t){var e=t.toLowerCase().trim();return cs.test(e)?"div":e}function ds(t){if(void 0!==t&&0!==t.length)return t.map((function(t){var e=t.cssRules||t.rules;return{cssRules:Array.from(e,(function(t){return t.cssText})),disabled:t.disabled||void 0,media:t.media.length>0?Array.from(t.media):void 0}}))}function fs(t,e,n,r){if(e===La.HIDDEN)return null;var i=t.getAttribute(n);if(e===La.MASK&&n!==Ma&&!Oi.includes(n)&&n!==r.actionNameAttribute){var o=t.tagName;switch(n){case"title":case"alt":case"placeholder":return Ha}if(!("IMG"!==o&&"SOURCE"!==o||"src"!==n&&"srcset"!==n))return Ga;if("A"===o&&"href"===n)return Ha;if(i&&E(n,"data-"))return Ha}return i&&"string"==typeof i&&i.length>Ka&&"data:"===i.slice(0,5)?"data:truncated":i}function hs(t){if(!t)return null;var e;try{e=t.rules||t.cssRules}catch(t){}return e?us(Array.from(e,2===Ie()?ps:vs).join(""),t.href):null}function ps(t){if(function(t){return"selectorText"in t}(t)&&t.selectorText.includes(":")){return t.cssText.replace(/(\[[\w-]+[^\\])(:[^\]]+\])/g,"$1\\$2")}return vs(t)}function vs(t){return function(t){return"styleSheet"in t}(t)&&hs(t.styleSheet)||t.cssText}function ms(t,e){var n=function(t,e){switch(t.nodeType){case t.DOCUMENT_NODE:return function(t,e){return{type:Ca.Document,childNodes:gs(t,e),adoptedStyleSheets:ds(t.adoptedStyleSheets)}}(t,e);case t.DOCUMENT_FRAGMENT_NODE:return function(t,e){var n=fr(t);n&&e.serializationContext.shadowRootsController.addShadowRoot(t);return{type:Ca.DocumentFragment,childNodes:gs(t,e),isShadowRoot:n,adoptedStyleSheets:n?ds(t.adoptedStyleSheets):void 0}}(t,e);case t.DOCUMENT_TYPE_NODE:return n=t,{type:Ca.DocumentType,name:n.name,publicId:n.publicId,systemId:n.systemId};case t.ELEMENT_NODE:return function(t,e){var n,r=ls(t.tagName),i=(a=t,"svg"===a.tagName||a instanceof SVGElement||void 0),o=$a(Za(t),e.parentNodePrivacyLevel);var a;if(o===La.HIDDEN){var s=t.getBoundingClientRect(),u=s.width,c=s.height;return{type:Ca.Element,tagName:r,attributes:(n={rr_width:"".concat(u,"px"),rr_height:"".concat(c,"px")},n[Ma]=Fa,n),childNodes:[],isSVG:i}}if(o===La.IGNORE)return;var l=function(t,e,n){var r;if(e===La.HIDDEN)return{};for(var i={},o=ls(t.tagName),a=t.ownerDocument,s=0;s<t.attributes.length;s+=1){var u=t.attributes.item(s).name,c=fs(t,e,u,n.configuration);null!==c&&(i[u]=c)}if(t.value&&("textarea"===o||"select"===o||"option"===o||"input"===o)){var l=is(t,e);void 0!==l&&(i.value=l)}if("option"===o&&e===La.ALLOW){var d=t;d.selected&&(i.selected=d.selected)}if("link"===o){var f,h=Array.from(a.styleSheets).find((function(e){return e.href===t.href}));(f=hs(h))&&h&&!Se(fe.DISABLE_REPLAY_INLINE_CSS)&&(i._cssText=f)}"style"===o&&t.sheet&&(f=hs(t.sheet))&&(i._cssText=f);var p,v,m=t;if("input"!==o||"radio"!==m.type&&"checkbox"!==m.type||(e===La.ALLOW?i.checked=!!m.checked:Ja(m,e)&&delete i.checked),"audio"===o||"video"===o){var _=t;i.rr_mediaState=_.paused?"paused":"played"}var g=n.serializationContext;switch(g.status){case 0:p=Math.round(t.scrollTop),v=Math.round(t.scrollLeft),(p||v)&&g.elementsScrollPositions.set(t,{scrollTop:p,scrollLeft:v});break;case 1:g.elementsScrollPositions.has(t)&&(p=(r=g.elementsScrollPositions.get(t)).scrollTop,v=r.scrollLeft)}return v&&(i.rr_scrollLeft=v),p&&(i.rr_scrollTop=p),i}(t,o,e),d=[];if(function(t){return t.childNodes.length>0||dr(t)}(t)&&"style"!==r){d=gs(t,e.parentNodePrivacyLevel===o&&e.ignoreWhiteSpace===("head"===r)?e:k({},e,{parentNodePrivacyLevel:o,ignoreWhiteSpace:"head"===r}))}return{type:Ca.Element,tagName:r,attributes:l,childNodes:d,isSVG:i}}(t,e);case t.TEXT_NODE:return function(t,e){var n=ts(t,e.ignoreWhiteSpace||!1,e.parentNodePrivacyLevel);if(void 0===n)return;return{type:Ca.Text,textContent:n}}(t,e);case t.CDATA_SECTION_NODE:return{type:Ca.CDATA,textContent:""}}var n}(t,e);if(!n)return null;var r=rs(t)||_s++,i=n;return i.id=r,function(t,e){es.set(t,e)}(t,r),e.serializedNodeIds&&e.serializedNodeIds.add(r),i}var _s=1;function gs(t,e){var n=[];return hr(t,(function(t){var r=ms(t,e);r&&n.push(r)})),n}function ys(t,e,n){return ms(t,{serializationContext:n,parentNodePrivacyLevel:e.defaultPrivacyLevel,configuration:e})}function bs(t){return Boolean(t.changedTouches)}function ws(t){return!0===t.composed&&dr(t.target)?t.composedPath()[0]:t.target}var Ss=function(t,e){var n=window.visualViewport,r={layoutViewportX:t,layoutViewportY:e,visualViewportX:t,visualViewportY:e};return n?(!function(t){return Math.abs(t.pageTop-t.offsetTop-window.scrollY)>25||Math.abs(t.pageLeft-t.offsetLeft-window.scrollX)>25}(n)?(r.visualViewportX=Math.round(t-n.offsetLeft),r.visualViewportY=Math.round(e-n.offsetTop)):(r.layoutViewportX=Math.round(t+n.offsetLeft),r.layoutViewportY=Math.round(e+n.offsetTop)),r):r},Es=function(t){return{scale:t.scale,offsetLeft:t.offsetLeft,offsetTop:t.offsetTop,pageLeft:t.pageLeft,pageTop:t.pageTop,height:t.height,width:t.width}},Os=50;function ks(t){var e=bs(t)?t.changedTouches[0]:t,n=e.clientX,r=e.clientY;if(window.visualViewport){var i=Ss(n,r);n=i.visualViewportX,r=i.visualViewportY}if(Number.isFinite(n)&&Number.isFinite(r))return{x:n,y:r};t.isTrusted&&qn("mouse/touch event without x/y")}var As,Ts=100;var xs=((As={})[Ut.POINTER_UP]=Pa.MouseUp,As[Ut.MOUSE_DOWN]=Pa.MouseDown,As[Ut.CLICK]=Pa.Click,As[Ut.CONTEXT_MENU]=Pa.ContextMenu,As[Ut.DBL_CLICK]=Pa.DblClick,As[Ut.FOCUS]=Pa.Focus,As[Ut.BLUR]=Pa.Blur,As[Ut.TOUCH_START]=Pa.TouchStart,As[Ut.TOUCH_END]=Pa.TouchEnd,As);function Cs(t,e,n){void 0===n&&(n=document);var r,i=t.defaultPrivacyLevel,o=new WeakMap,a=n!==document,s=Wt(t,n,a?[Ut.CHANGE]:[Ut.INPUT,Ut.CHANGE],(function(t){var e=ws(t);(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement||e instanceof HTMLSelectElement)&&c(e)}),{capture:!0,passive:!0}).stop;if(a)r=F;else{var u=[Hr(HTMLInputElement.prototype,"value",c),Hr(HTMLInputElement.prototype,"checked",c),Hr(HTMLSelectElement.prototype,"value",c),Hr(HTMLTextAreaElement.prototype,"value",c),Hr(HTMLSelectElement.prototype,"selectedIndex",c)];r=function(){u.forEach((function(t){return t.stop()}))}}return function(){r(),s()};function c(t){var e=Wa(t,i);if(e!==La.HIDDEN){var n,r=t.type;if("radio"===r||"checkbox"===r){if(Ja(t,e))return;n={isChecked:t.checked}}else{var o=is(t,e);if(void 0===o)return;n={text:o}}l(t,n);var a,s,u=t.name;"radio"===r&&u&&t.checked&&(a=document.querySelectorAll('input[type="radio"][name="'.concat(O(u),'"]')),s=function(e){e!==t&&l(e,{isChecked:!1})},Array.prototype.forEach.call(a,s))}}function l(t,n){if(ns(t)){var r=o.get(t);r&&r.text===n.text&&r.isChecked===n.isChecked||(o.set(t,n),e(k({id:rs(t)},n)))}}}function Is(t){for(var e=[],n=t;n.parentRule;){var r=Array.from(n.parentRule.cssRules).indexOf(n);e.unshift(r),n=n.parentRule}if(n.parentStyleSheet){var i=Array.from(n.parentStyleSheet.cssRules).indexOf(n);return e.unshift(i),e}}var Ps=200;var Rs=100;function Ns(t){var e=F,n=[];function r(){e(),t(n),n=[]}return{addMutations:function(t){0===n.length&&(e=function(t,e){if(window.requestIdleCallback&&window.cancelIdleCallback){var n=window.requestIdleCallback(v(t),e);return function(){return window.cancelIdleCallback(n)}}var r=window.requestAnimationFrame(v(t));return function(){return window.cancelAnimationFrame(r)}}(r,{timeout:Rs})),n.push.apply(n,t)},flush:r,stop:function(){e()}}}function Ls(t,e,n,r){var i=Jn();if(!i)return{stop:F,flush:F};var o=Ns((function(r){!function(t,e,n,r){t.filter((function(t){return"childList"===t.type})).forEach((function(t){t.removedNodes.forEach((function(t){Ms(t,r.removeShadowRoot)}))}));var i=t.filter((function(t){return t.target.isConnected&&function(t){for(var e=t;e;){if(!ns(e)&&!fr(e))return!1;e=pr(e)}return!0}(t.target)&&Wa(t.target,n.defaultPrivacyLevel)!==La.HIDDEN})),o=function(t,e,n){for(var r=new Set,i=new Map,o=function(t){t.addedNodes.forEach((function(t){r.add(t)})),t.removedNodes.forEach((function(e){r.has(e)||i.set(e,t.target),r.delete(e)}))},a=0,s=t;a<s.length;a++){o(s[a])}var u=Array.from(r);c=u,c.sort((function(t,e){var n=t.compareDocumentPosition(e);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}));var c;for(var l=new Set,d=[],f=0,h=u;f<h.length;f++){var p=h[f];if(!y(p)){var v=Wa(p.parentNode,e.defaultPrivacyLevel);if(v!==La.HIDDEN&&v!==La.IGNORE){var m=ms(p,{serializedNodeIds:l,parentNodePrivacyLevel:v,serializationContext:{status:2,shadowRootsController:n},configuration:e});if(m){var _=pr(p);d.push({nextId:b(p),parentId:rs(_),node:m})}}}}var g=[];return i.forEach((function(t,e){ns(e)&&g.push({parentId:rs(t),id:rs(e)})})),{adds:d,removes:g,hasBeenSerialized:y};function y(t){return ns(t)&&l.has(rs(t))}function b(t){for(var e=t.nextSibling;e;){if(ns(e))return rs(e);e=e.nextSibling}return null}}(i.filter((function(t){return"childList"===t.type})),n,r),a=o.adds,s=o.removes,u=o.hasBeenSerialized,c=function(t,e){for(var n,r=[],i=new Set,o=t.filter((function(t){return!i.has(t.target)&&(i.add(t.target),!0)})),a=0,s=o;a<s.length;a++){var u=s[a];if(u.target.textContent!==u.oldValue){var c=Wa(pr(u.target),e.defaultPrivacyLevel);c!==La.HIDDEN&&c!==La.IGNORE&&r.push({id:rs(u.target),value:null!==(n=ts(u.target,!1,c))&&void 0!==n?n:null})}}return r}(i.filter((function(t){return"characterData"===t.type&&!u(t.target)})),n),l=function(t,e){for(var n=[],r=new Map,i=t.filter((function(t){var e=r.get(t.target);return!(null==e?void 0:e.has(t.attributeName))&&(e?e.add(t.attributeName):r.set(t.target,new Set([t.attributeName])),!0)})),o=new Map,a=0,s=i;a<s.length;a++){var u=s[a];if(u.target.getAttribute(u.attributeName)!==u.oldValue){var c=Wa(u.target,e.defaultPrivacyLevel),l=fs(u.target,c,u.attributeName,e),d=void 0;if("value"===u.attributeName){var f=is(u.target,c);if(void 0===f)continue;d=f}else d="string"==typeof l?l:null;var h=o.get(u.target);h||(h={id:rs(u.target),attributes:{}},n.push(h),o.set(u.target,h)),h.attributes[u.attributeName]=d}}return n}(i.filter((function(t){return"attributes"===t.type&&!u(t.target)})),n);if(!(c.length||l.length||s.length||a.length))return;e({adds:a,removes:s,texts:c,attributes:l})}(r.concat(a.takeRecords()),t,e,n)})),a=new i(v(o.addMutations));return a.observe(r,{attributeOldValue:!0,attributes:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),{stop:function(){a.disconnect(),o.stop()},flush:function(){o.flush()}}}function Ms(t,e){dr(t)&&e(t.shadowRoot),hr(t,(function(t){return Ms(t,e)}))}function Ds(t,e){var n=function(){var t=new WeakMap,e=1;return{getIdForEvent:function(n){return t.has(n)||t.set(n,e++),t.get(n)}}}(),r=Ls(e.mutationCb,e.configuration,e.shadowRootsController,document),i=function(t,e){var n=U((function(t){var n=ws(t);if(ns(n)){var r=ks(t);if(!r)return;var i={id:rs(n),timeOffset:0,x:r.x,y:r.y};e([i],bs(t)?Ia.TouchMove:Ia.MouseMove)}}),Os,{trailing:!1}).throttled;return Wt(t,document,[Ut.MOUSE_MOVE,Ut.TOUCH_MOVE],n,{capture:!0,passive:!0}).stop}(t,e.mousemoveCb),o=function(t,e,n){return Wt(t,document,Object.keys(xs),(function(r){var i=ws(r);if(Wa(i,t.defaultPrivacyLevel)!==La.HIDDEN&&ns(i)){var o,a=rs(i),s=xs[r.type];if(s!==Pa.Blur&&s!==Pa.Focus){var u=ks(r);if(!u)return;o={id:a,type:s,x:u.x,y:u.y}}else o={id:a,type:s};var c=k({id:n.getIdForEvent(r)},Na(Ia.MouseInteraction,o));e(c)}}),{capture:!0,passive:!0}).stop}(t,e.mouseInteractionCb,n),a=function(t,e,n,r){var i=U((function(t){var i=ws(t);if(i&&Wa(i,n)!==La.HIDDEN&&ns(i)){var o=rs(i),a=i===document?{scrollTop:Ao(),scrollLeft:ko()}:{scrollTop:Math.round(i.scrollTop),scrollLeft:Math.round(i.scrollLeft)};r.set(i,a),e({id:o,x:a.scrollLeft,y:a.scrollTop})}}),Ts).throttled;return Kt(t,document,Ut.SCROLL,i,{capture:!0,passive:!0}).stop}(t,e.scrollCb,e.configuration.defaultPrivacyLevel,e.elementsScrollPositions),s=function(t,e){return To(t).subscribe(e).unsubscribe}(t,e.viewportResizeCb),u=Cs(t,e.inputCb),c=function(t,e,n){return Wt(t,document,[Ut.PLAY,Ut.PAUSE],(function(t){var r=ws(t);r&&Wa(r,n)!==La.HIDDEN&&ns(r)&&e({id:rs(r),type:t.type===Ut.PLAY?Ra.Play:Ra.Pause})}),{capture:!0,passive:!0}).stop}(t,e.mediaInteractionCb,e.configuration.defaultPrivacyLevel),l=function(t){function e(t,e){t&&ns(t.ownerNode)&&e(rs(t.ownerNode))}var n=[qr(CSSStyleSheet.prototype,"insertRule",{before:function(n,r){e(this,(function(e){return t({id:e,adds:[{rule:n,index:r}]})}))}}),qr(CSSStyleSheet.prototype,"deleteRule",{before:function(n){e(this,(function(e){return t({id:e,removes:[{index:n}]})}))}})];function r(r){n.push(qr(r.prototype,"insertRule",{before:function(n,r){var i=this;e(this.parentStyleSheet,(function(e){var o=Is(i);o&&(o.push(r||0),t({id:e,adds:[{rule:n,index:o}]}))}))}}),qr(r.prototype,"deleteRule",{before:function(n){var r=this;e(this.parentStyleSheet,(function(e){var i=Is(r);i&&(i.push(n),t({id:e,removes:[{index:i}]}))}))}}))}return"undefined"!=typeof CSSGroupingRule?r(CSSGroupingRule):(r(CSSMediaRule),r(CSSSupportsRule)),function(){return n.forEach((function(t){return t.stop()}))}}(e.styleSheetCb),d=function(t,e){return Wt(t,window,[Ut.FOCUS,Ut.BLUR],(function(){e({has_focus:document.hasFocus()})})).stop}(t,e.focusCb),f=function(t,e){var n=window.visualViewport;if(!n)return F;var r=U((function(){e(Es(n))}),Ps,{trailing:!1}),i=r.throttled,o=r.cancel,a=Wt(t,n,[Ut.RESIZE,Ut.SCROLL],i,{capture:!0,passive:!0}).stop;return function(){a(),o()}}(t,e.visualViewportResizeCb),h=function(t,e,n){return t.subscribe(10,(function(t){var r,i,o;"action"===t.rawRumEvent.type&&"click"===t.rawRumEvent.action.type&&(null===(i=null===(r=t.rawRumEvent.action.frustration)||void 0===r?void 0:r.type)||void 0===i?void 0:i.length)&&"events"in t.domainContext&&(null===(o=t.domainContext.events)||void 0===o?void 0:o.length)&&e({timestamp:t.rawRumEvent.date,type:xa.FrustrationRecord,data:{frustrationTypes:t.rawRumEvent.action.frustration.type,recordIds:t.domainContext.events.map((function(t){return n.getIdForEvent(t)}))}})})).unsubscribe}(e.lifeCycle,e.frustrationCb,n);return{flush:function(){r.flush()},stop:function(){r.stop(),i(),o(),a(),s(),u(),c(),l(),d(),f(),h()}}}var js=function(t,e){var n=e.mutationCb,r=e.inputCb,i=new Map,o={addShadowRoot:function(e){var a=Ls(n,t,o,e),s=a.stop,u=a.flush,c=Cs(t,r,e);i.set(e,{flush:u,stop:function(){s(),c()}})},removeShadowRoot:function(t){var e=i.get(t);e&&(e.stop(),i.delete(t))},stop:function(){i.forEach((function(t){return(0,t.stop)()}))},flush:function(){i.forEach((function(t){return(0,t.flush)()}))}};return o};function Us(t){var e=t.emit,n=t.configuration;if(!e)throw new Error("emit function is required");var r,i=(r=new WeakMap,{set:function(t,e){(t!==document||document.scrollingElement)&&r.set(t===document?document.scrollingElement:t,e)},get:function(t){return r.get(t)},has:function(t){return r.has(t)}}),o=function(t){e(Na(Ia.Mutation,t))},a=function(t){return e(Na(Ia.Input,t))},s=js(n,{mutationCb:o,inputCb:a}),u=function(t,r){void 0===t&&(t=bt()),void 0===r&&(r={status:0,elementsScrollPositions:i,shadowRootsController:s});var o=xo(),a=o.width,u=o.height;e({data:{height:u,href:window.location.href,width:a},type:xa.Meta,timestamp:t}),e({data:{has_focus:document.hasFocus()},type:xa.Focus,timestamp:t}),e({data:{node:ys(document,n,r),initialOffset:{left:ko(),top:Ao()}},type:xa.FullSnapshot,timestamp:t}),window.visualViewport&&e({data:Es(window.visualViewport),type:xa.VisualViewport,timestamp:t})};u();var c=Ds(n,{lifeCycle:t.lifeCycle,configuration:n,elementsScrollPositions:i,inputCb:a,mediaInteractionCb:function(t){return e(Na(Ia.MediaInteraction,t))},mouseInteractionCb:function(t){return e(t)},mousemoveCb:function(t,n){return e(Na(n,{positions:t}))},mutationCb:o,scrollCb:function(t){return e(Na(Ia.Scroll,t))},styleSheetCb:function(t){return e(Na(Ia.StyleSheetRule,t))},viewportResizeCb:function(t){return e(Na(Ia.ViewportResize,t))},frustrationCb:function(t){return e(t)},focusCb:function(t){return e({data:t,type:xa.Focus,timestamp:bt()})},visualViewportResizeCb:function(t){e({data:t,type:xa.VisualViewport,timestamp:bt()})},shadowRootsController:s}),l=c.stop,d=c.flush;function f(){s.flush(),d()}return{stop:function(){s.stop(),l()},takeSubsequentFullSnapshot:function(t){f(),u(t,{shadowRootsController:s,status:1,elementsScrollPositions:i})},flushMutations:f,shadowRootsController:s}}var Fs,Bs=10;function Vs(t){return zs(t).segments_count}function zs(t){var e;return Fs||(Fs=new Map),Fs.has(t)?e=Fs.get(t):(e={records_count:0,segments_count:0,segments_total_raw_size:0},Fs.set(t,e),Fs.size>Bs&&function(){if(!Fs)return;if(Fs.keys)Fs.delete(Fs.keys().next().value);else{var t=!0;Fs.forEach((function(e,n){t&&(Fs.delete(n),t=!1)}))}}()),e}var qs=function(){function t(t,e,n){this.encoder=t,this.encodedBytesCount=0;var r=e.view.id;this.metadata=k({start:1/0,end:-1/0,creation_reason:n,records_count:0,has_full_snapshot:!1,index_in_view:Vs(r),source:"browser"},e),function(t){zs(t).segments_count+=1}(r)}return t.prototype.addRecord=function(t,e){var n,r=this;this.metadata.start=Math.min(this.metadata.start,t.timestamp),this.metadata.end=Math.max(this.metadata.end,t.timestamp),this.metadata.records_count+=1,(n=this.metadata).has_full_snapshot||(n.has_full_snapshot=t.type===xa.FullSnapshot),Mn("record",{record:t,segment:this.metadata}),zs(this.metadata.view.id).records_count+=1;var i=this.encoder.isEmpty?'{"records":[':",";this.encoder.write(i+JSON.stringify(t),(function(t){r.encodedBytesCount+=t,e(r.encodedBytesCount)}))},t.prototype.flush=function(t){var e=this;if(this.encoder.isEmpty)throw new Error("Empty segment flushed");this.encoder.write("],".concat(JSON.stringify(this.metadata).slice(1),"\n")),this.encoder.finish((function(n){var r,i;r=e.metadata.view.id,i=n.rawBytesCount,zs(r).segments_total_raw_size+=i,t(e.metadata,n)}))},t}(),Hs=30*ft,Gs=6e4;function Ys(t,e,n,r,i,o){return function(t,e,n,r){var i={status:0,nextSegmentCreationReason:"init"},o=t.subscribe(2,(function(){s("view_change")})).unsubscribe,a=t.subscribe(9,(function(t){s(t.reason)})).unsubscribe;function s(t){1===i.status&&(i.segment.flush((function(e,r){var i=function(t,e,n){var r=new FormData;r.append("segment",new Blob([t],{type:"application/octet-stream"}),"".concat(e.session.id,"-").concat(e.start));var i=k({raw_segment_size:n,compressed_segment_size:t.byteLength},e),o=JSON.stringify(i);return r.append("event",new Blob([o],{type:"application/json"})),{data:r,bytesCount:t.byteLength}}(r.output,e,r.rawBytesCount);Zn(t)?n.sendOnExit(i):n.send(i)})),M(i.expirationTimeoutId)),i="stop"!==t?{status:0,nextSegmentCreationReason:t}:{status:2}}return{addRecord:function(t){if(2!==i.status){if(0===i.status){var n=e();if(!n)return;i={status:1,segment:new qs(r,n,i.nextSegmentCreationReason),expirationTimeoutId:L((function(){s("segment_duration_limit")}),Hs)}}i.segment.addRecord(t,(function(t){t>Gs&&s("segment_bytes_limit")}))}},stop:function(){s("stop"),o(),a()}}}(t,(function(){return function(t,e,n){var r=e.findTrackedSession(),i=n.findView();if(!r||!i)return;return{application:{id:t},session:{id:r.id},view:{id:i.id}}}(e.applicationId,n,r)}),i,o)}function Ks(){return"function"==typeof Array.from&&"function"==typeof CSSSupportsRule&&"function"==typeof URL.createObjectURL&&"forEach"in NodeList.prototype}function Ws(t,e,n,r){var i=e.findTrackedSession(),o=function(t,e){if(!Ks())return"browser-not-supported";if(!t)return"rum-not-tracked";if(!t.sessionReplayAllowed)return"incorrect-session-plan";if(!e)return"replay-not-started"}(i,r);return Ta(t,{viewContext:n.findView(),errorType:o,session:i})}function $s(t,e,n){var r,i=0,o=[],a=0,s=[],u=Kt(t,e,"message",(function(t){var e=t.data;if("wrote"===e.type&&e.streamId===n){i+=e.additionalBytesCount,o.push(e.result),r=e.trailer;var a=s.shift();a&&a.id===e.id?a.writeCallback?a.writeCallback(e.result.byteLength):a.finishCallback&&a.finishCallback():(u(),qn("Worker responses received out of order."))}})).stop;function c(){var t=0===o.length?new Uint8Array(0):function(t){for(var e=t.reduce((function(t,e){return t+e.length}),0),n=new Uint8Array(e),r=0,i=0,o=t;i<o.length;i++){var a=o[i];n.set(a,r),r+=a.length}return n}(o.concat(r)),e={rawBytesCount:i,output:t,outputBytesCount:t.byteLength,encoding:"deflate"};return i=0,o=[],e}function l(){a>0&&(e.postMessage({action:"reset",streamId:n}),a=0)}return{isAsync:!0,get isEmpty(){return 0===a},write:function(t,r){e.postMessage({action:"write",id:a,data:t,streamId:n}),s.push({id:a,writeCallback:r,data:t}),a+=1},finish:function(t){l(),s.length?(s.forEach((function(t){delete t.writeCallback})),s[s.length-1].finishCallback=function(){return t(c())}):t(c())},finishSync:function(){l();var t=s.map((function(t){return delete t.writeCallback,delete t.finishCallback,t.data})).join("");return k(c(),{pendingData:t})},estimateEncodedBytesCount:function(t){return t.length/8},stop:function(){u()}}}var Zs=10*ft;function Js(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.3.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 Xs={status:0};function Qs(t,e,n,r){switch(void 0===r&&(r=Js),0===Xs.status&&function(t,e,n){void 0===n&&(n=Js);try{var r=n(t),i=Kt(t,r,"error",(function(n){eu(t,e,n)})).stop,o=Kt(t,r,"message",(function(n){var r=n.data;"errored"===r.type?eu(t,e,r.error,r.streamId):"initialized"===r.type&&function(t){1===Xs.status&&(Xs={status:3,worker:Xs.worker,stop:Xs.stop,version:t})}(r.version)})).stop;r.postMessage({action:"init"}),L((function(){return function(t){1===Xs.status&&(u.error("".concat(t," failed to start: a timeout occurred while initializing the Worker")),Xs.initializationFailureCallbacks.forEach((function(t){return t()})),Xs={status:2})}(e)}),Zs),Xs={status:1,worker:r,stop:function(){i(),o()},initializationFailureCallbacks:[]}}catch(n){eu(t,e,n)}}(t,e,r),Xs.status){case 1:return Xs.initializationFailureCallbacks.push(n),Xs.worker;case 3:return Xs.worker}}function tu(){return Xs.status}function eu(t,e,n,r){if(1===Xs.status||0===Xs.status){if(u.error("".concat(e," failed to start: an error occurred while creating the Worker:"),n),n instanceof Event||n instanceof Error&&(g(o=n.message,"Content Security Policy")||g(o,"requires 'TrustedScriptURL'"))){var i=void 0;i=t.workerUrl?"Please make sure the Worker URL ".concat(t.workerUrl," is correct and CSP is correctly configured."):"Please make sure CSP is correctly configured.",u.error("".concat(i," See documentation at https://docs.datadoghq.com/integrations/content_security_policy_logs/#use-csp-with-real-user-monitoring-and-session-replay"))}else Hn(n);1===Xs.status&&Xs.initializationFailureCallbacks.forEach((function(t){return t()})),Xs={status:2}}else Hn(n,{worker_version:3===Xs.status&&Xs.version,stream_id:r});var o}var nu=function(t,e){if(Yt()||!Ks())return{start:F,stop:F,getReplayStats:function(){},onRumStart:F,isRecording:function(){return!1},getSessionReplayLink:function(){}};var n={status:1},r=function(){n={status:1}},i=function(){n={status:0}};return{start:function(){return r()},stop:function(){return i()},getSessionReplayLink:function(t,e,r){return Ws(t,e,r,0!==n.status)},onRumStart:function(o,a,s,u,c){a.startSessionReplayRecordingManually&&(n={status:0}),o.subscribe(7,(function(){2!==n.status&&3!==n.status||(i(),n={status:1})})),o.subscribe(8,(function(){1===n.status&&r()})),r=function(){var r=s.findTrackedSession();r&&r.sessionReplayAllowed?2!==n.status&&3!==n.status&&(n={status:2},Xn(a,"interactive",(function(){if(2===n.status)if(c||(c=Qs(a,"Datadog Session Replay",(function(){i()}),e))){var r=t(o,a,s,u,$s(a,c,1)).stop;n={status:3,stopRecording:r}}else n={status:0}}))):n={status:1}},i=function(){0!==n.status&&(3===n.status&&n.stopRecording(),n={status:0})},1===n.status&&r()},isRecording:function(){return 3===tu()&&3===n.status},getReplayStats:function(t){return 3===tu()?function(t){return null==Fs?void 0:Fs.get(t)}(t):void 0}}}((function(t,e,n,r,i,o){var a=o||ia(e,e.sessionReplayEndpointBuilder,Gs,(function(e){t.notify(12,{error:e}),qn("Error reported to customer",{"error.message":e.message})})),s=Ys(t,e,n,r,a,i),u=s.addRecord,c=s.stop,l=Us({emit:u,configuration:e,lifeCycle:t}),d=l.stop,f=l.takeSubsequentFullSnapshot,h=l.flushMutations,p=t.subscribe(4,(function(){h(),u({timestamp:bt(),type:xa.ViewEnd})})).unsubscribe,v=t.subscribe(2,(function(t){f(t.startClocks.timeStamp)})).unsubscribe;return{stop:function(){p(),v(),d(),c()}}})),ru=function(e,n,r){var i,o=void 0===r?{}:r,a=o.ignoreInitIfSyntheticsWillInjectRum,s=void 0===a||a,c=o.startDeflateWorker,l=o.createDeflateEncoder,d=!1,f=ot(2),h=ot(1),p=function(){},_=function(){},g=F,y=function(){},b=new at,w=function(t,e){void 0===e&&(e=bt()),b.add((function(){return w(t,e)}))},S=function(t,e){void 0===e&&(e=St()),b.add((function(){return S(t,e)}))},E=function(t,e){void 0===e&&(e=Ln(f,h,n)),b.add((function(){return E(t,e)}))},O=function(t,e){void 0===e&&(e=Ln(f,h,n)),b.add((function(){return O(t,e)}))},T=function(){b.add((function(){return T()}))},x=function(){b.add((function(){return x()}))},C=function(t,e){b.add((function(){return C(t,e)}))};function I(t,r,o){if(t.storeContextsAcrossPages){var a=f.getContext();(f=Jt(r,"rum",2)).setContext(q(f.getContext(),a));var s=h.getContext();(h=Jt(r,"rum",1)).setContext(q(h.getContext(),s))}var u=e(t,r,n,f,h,o,i&&l?function(t){return l(r,i,t)}:Xt);y=function(){return n.getSessionReplayLink(r,u.session,u.viewContexts)},T=n.start,x=n.stop,S=u.startView,E=u.addAction,O=u.addError,w=u.addTiming,C=u.addFeatureFlagEvaluation,p=u.getInternalContext,g=u.stopSession,n.onRumStart(u.lifeCycle,r,u.session,u.viewContexts,i),b.drain()}var P=v((function(e){var n="object"===(0,t.A)(e)?e:{name:e};S(n)})),R=A({init:v((function(t){if(t){if(_=function(){return z(t)},!s||!zt()){var e=Yt();if(e&&(t=function(t){return k({},t,{applicationId:"00000000-aaaa-0000-aaaa-000000000000",clientToken:"empty",sessionSampleRate:100})}(t)),function(t){if(d)return t.silentMultipleInit||u.error("DD_RUM is already initialized."),!1;return!0}(t)){var n=Rn(t);if(n)if(e||n.sessionStoreStrategyType){if(!n.compressIntakeRequests||e||!c||(i=c(n,"Datadog RUM",F))){if(n.trackViewsManually){var r=b;b=new at,S=function(e){I(t,n,e)},r.drain()}else I(t,n);d=!0}}else u.warn("No storage available for session. We will not send any data.")}}}else u.error("Missing configuration")})),setGlobalContextProperty:v((function(t,e){return f.setContextProperty(t,e)})),removeGlobalContextProperty:v((function(t){return f.removeContextProperty(t)})),getGlobalContext:v((function(){return f.getContext()})),setGlobalContext:v((function(t){return f.setContext(t)})),clearGlobalContext:v((function(){return f.clearContext()})),getInternalContext:v((function(t){return p(t)})),getInitConfiguration:v((function(){return _()})),addAction:v((function(t,e){E({name:$(t),context:$(e),startClocks:St(),type:"custom"})})),addError:function(t,e){var n=ge();m((function(){O({error:t,handlingStack:n,context:$(e),startClocks:St()})}))},addTiming:v((function(t,e){w($(t),e)})),setUser:v((function(t){be(t)&&h.setContext(ye(t))})),getUser:v((function(){return h.getContext()})),setUserProperty:v((function(t,e){var n,r=ye((n={},n[t]=e,n))[t];h.setContextProperty(t,r)})),removeUserProperty:v((function(t){return h.removeContextProperty(t)})),clearUser:v((function(){return h.clearContext()})),startView:P,stopSession:v((function(){g()})),startSessionReplayRecording:v((function(){return T()})),stopSessionReplayRecording:v((function(){return x()})),addFeatureFlagEvaluation:v((function(t,e){C($(t),$(e))})),getSessionReplayLink:v((function(){return y()}))});return R}((function(t,e,n,r,i,o,a){var s=[],u=new jr;u.subscribe(11,(function(t){return Mn("rum",t)}));var c=function(t){var e=Vn("browser-rum-sdk",t);if(Yt()){var n=Gt();e.observable.subscribe((function(t){return n.send("internal_telemetry",t)}))}return e}(e);c.setContextProvider((function(){var t,n;return{application:{id:e.applicationId},session:{id:null===(t=p.findTrackedSession())||void 0===t?void 0:t.id},view:{id:null===(n=E.findView())||void 0===n?void 0:n.id},action:{id:T.findActionId()}}}));var l=function(t){u.notify(12,{error:t}),qn("Error reported to customer",{"error.message":t.message})},d=function(t,e){if(void 0===e&&(e=R),!Se(fe.FEATURE_FLAGS))return{findFeatureFlagEvaluations:function(){},getFeatureFlagBytesCount:function(){return 0},addFeatureFlagEvaluation:F,stop:F};var n=new Br(da),r=0,i=!1;t.subscribe(4,(function(t){var e=t.endClocks;n.closeActive(e.relative)})),t.subscribe(2,(function(t){var e=t.startClocks;n.add({},e.relative),r=0}));var o=U((function(t){r=e(H(t)),i||(i=rt(r,0))}),fa),a=o.throttled;return{findFeatureFlagEvaluations:function(t){return n.find(t)},getFeatureFlagBytesCount:function(){return n.find()?r:0},addFeatureFlagEvaluation:function(t,e){var r=n.find();r&&(r[t]=e,a(r))},stop:o.cancel}}(u),f=$n(e),h=f.subscribe((function(t){u.notify(9,t)}));s.push((function(){return h.unsubscribe()}));var p=Yt()?function(){var t={id:"00000000-aaaa-0000-aaaa-000000000000",sessionReplayAllowed:!1};return{findTrackedSession:function(){return t},expire:F,expireObservable:new Q}}():Ho(e,u);if(Yt())!function(t){var e=Gt();t.subscribe(11,(function(t){e.send("rum",t)}))}(u);else{var m=function(t,e,n,r,i,o,a){var s=t.replica,u=ua(t,{endpoint:t.rumEndpointBuilder,encoder:a(2)},s&&{endpoint:s.rumEndpointBuilder,transformMessage:function(t){return q(t,{application:{id:s.applicationId}})},encoder:a(3)},r,i,o);return e.subscribe(11,(function(t){"view"===t.type?u.upsert(t,t.view.id):u.add(t)})),n.subscribe((function(e){return u.add(e,zn(t))})),u}(e,u,c.observable,l,f,p.expireObservable,a);s.push((function(){return m.stop()})),function(t,e,n,r,i,o,a){e.enabled&&st(t.customerDataTelemetrySampleRate)&&(ba(),wa(),n.subscribe(11,(function(t){va=!0,ga(pa.globalContextBytes,Ae(r.getContext())?0:r.getBytesCount()),ga(pa.userContextBytes,Ae(i.getContext())?0:i.getBytesCount());var e=o.findFeatureFlagEvaluations(),n=g(["view","error"],t.type)&&e&&!Ae(e);ga(pa.featureFlagBytes,n?o.getFeatureFlagBytesCount():0)})),a.subscribe((function(t){var e=t.bytesCount,n=t.messagesCount;va&&(ha.batchCount+=1,ga(ha.batchBytesCount,e),ga(ha.batchMessagesCount,n),ya(ha.globalContextBytes,pa.globalContextBytes),ya(ha.userContextBytes,pa.userContextBytes),ya(ha.featureFlagBytes,pa.featureFlagBytes),wa())})),D(_a,ma))}(e,c,u,r,i,d,m.flushObservable)}var _,y,b=(_=Jn(),y=new Q((function(){if(_){var t=new _(v((function(){return y.notify()})));return t.observe(document,{attributes:!0,characterData:!0,childList:!0,subtree:!0}),function(){return t.disconnect()}}})),y),w=la(e,location),S=function(t,e,n,r,i,o,a,s){var u=function(t){var e=new Br(Vr);return t.subscribe(2,(function(t){e.add(function(t){return{service:t.service,version:t.version,id:t.id,name:t.name,startClocks:t.startClocks}}(t),t.startClocks.relative)})),t.subscribe(4,(function(t){var n=t.endClocks;e.closeActive(n.relative)})),t.subscribe(8,(function(){e.reset()})),{findView:function(t){return e.find(t)},stop:function(){e.stop()}}}(t),c=function(t,e,n){var r,i=new Br(ca);t.subscribe(4,(function(t){var e=t.endClocks;i.closeActive(e.relative)})),t.subscribe(2,(function(t){var e=t.startClocks,o=n.href;i.add(a({url:o,referrer:r||document.referrer}),e.relative),r=o}));var o=e.subscribe((function(t){var e=t.newLocation,n=i.find();if(n){var r=wt();i.closeActive(r),i.add(a({url:e.href,referrer:n.referrer}),r)}}));function a(t){return{url:t.url,referrer:t.referrer}}return{findUrl:function(t){return i.find(t)},stop:function(){o.unsubscribe(),i.stop()}}}(t,i,n),l=ka(e),d=function(t,e,n,r){t.subscribe(1,(function(e){return t.notify(10,Wi(e,r))}));var i={findActionId:F};return n.trackUserInteractions&&(i=Yi(t,e,n).actionContexts),{addAction:function(e,n){t.notify(10,k({savedCommonContext:n},Wi(e,r)))},actionContexts:i}}(t,o,e,l),f=d.addAction,h=d.actionContexts,p=function(t){var e=xo();return{get:function(){return{viewport:e}},stop:To(t).subscribe((function(t){e=t})).unsubscribe}}(e);return Lr(e,t,r,u,c,h,p,a,s),{viewContexts:u,pageStateHistory:l,urlContexts:c,addAction:f,actionContexts:h,stop:function(){p.stop(),l.stop(),c.stop(),u.stop(),l.stop()}}}(u,e,location,p,w,b,(function(){return Ln(r,i,n)}),l),E=S.viewContexts,O=S.pageStateHistory,A=S.urlContexts,T=S.actionContexts,x=S.addAction,C=S.stop;s.push(C),Gn(function(t){var e=On(t);return k({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:Nn(t),default_privacy_level:t.defaultPrivacyLevel,use_excluded_activity_urls:Array.isArray(t.excludedActivityUrls)&&t.excludedActivityUrls.length>0,use_worker_url:!!t.workerUrl,compress_intake_requests:t.compressIntakeRequests,track_views_manually:t.trackViewsManually,track_user_interactions:t.trackUserInteractions,track_resources:t.trackResources,track_long_task:t.trackLongTasks},e)}(t)),function(t,e,n){t.subscribe(0,(function(r){for(var i=0,o=r;i<o.length;i++){var a=o[i];if(a.entryType!==vr.LONG_TASK)break;if(!n.findTrackedSession(a.startTime)||!e.trackLongTasks)break;var s=mt(a.startTime),u={date:s.timeStamp,long_task:{id:xt(),duration:gt(a.duration)},type:"long_task",_dd:{discarded:!1}};t.notify(10,{rawRumEvent:u,startTime:s.relative,domainContext:{performanceEntry:a}})}}))}(u,e,p),oo(u,e,p,O);var I=jo(u,e,location,b,w,d,O,n,o),P=I.addTiming,N=I.startView,L=I.stop;s.push(L);var M=no(u,e,O,d).addError;ii(u,e,p),Sr(u,e);var j=function(t,e,n,r,i){return{get:function(o){var a=n.findView(o),s=i.findUrl(o),u=e.findTrackedSession(o);if(u&&a&&s){var c=r.findActionId(o);return{application_id:t,session_id:u.id,user_action:c?{id:c}:void 0,view:{id:a.id,name:a.name,referrer:s.referrer,url:s.url}}}}}}(e.applicationId,p,E,T,A);return{addAction:x,addError:M,addTiming:P,addFeatureFlagEvaluation:d.addFeatureFlagEvaluation,startView:N,lifeCycle:u,viewContexts:E,session:p,stopSession:function(){return p.expire()},getInternalContext:j.get,stop:function(){s.forEach((function(t){return t()}))}}}),nu,{startDeflateWorker:Qs,createDeflateEncoder:$s});T(x(),"DD_RUM",ru);var iu=32*C;function ou(t,e,n){return void 0===t?[]:"all"===t||Array.isArray(t)&&t.every((function(t){return g(e,t)}))?"all"===t?e:function(t){var e=new Set;return t.forEach((function(t){return e.add(t)})),y(e)}(t):void u.error("".concat(n,' should be "all" or an array with allowed values "').concat(e.join('", "'),'"'))}var au=function(e,n,r,i){var o,a=arguments.length,s=a<3?n:null===i?i=Object.getOwnPropertyDescriptor(n,r):i;if("object"===("undefined"==typeof Reflect?"undefined":(0,t.A)(Reflect))&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,n,r,i);else for(var u=e.length-1;u>=0;u--)(o=e[u])&&(s=(a<3?o(s):a>3?o(n,r,s):o(n,r))||s);return a>3&&s&&Object.defineProperty(n,r,s),s},su={debug:"debug",error:"error",info:"info",warn:"warn"},uu={console:"console",http:"http",silent:"silent"},cu=Object.keys(su),lu=function(){function t(t,e,n,r,i){void 0===n&&(n=uu.http),void 0===r&&(r=su.debug),void 0===i&&(i={}),this.handleLogStrategy=t,this.handlerType=n,this.level=r,this.contextManager=ot(3),this.contextManager.setContext(i),e&&this.contextManager.setContextProperty("logger",{name:e})}return t.prototype.log=function(t,e,n,r){var i;if(void 0===n&&(n=su.info),null!=r){var o=pe({stackTrace:r instanceof Error?te(r):void 0,originalError:r,nonErrorPrefix:"Provided",source:kr.LOGGER,handling:"handled",startClocks:St()});i={stack:o.stack,kind:o.type,message:o.message}}var a=$(e),s=i?q({error:i},a):a;this.handleLogStrategy({message:$(t),context:s,status:n},this)},t.prototype.debug=function(t,e,n){this.log(t,e,su.debug,n)},t.prototype.info=function(t,e,n){this.log(t,e,su.info,n)},t.prototype.warn=function(t,e,n){this.log(t,e,su.warn,n)},t.prototype.error=function(t,e,n){this.log(t,e,su.error,n)},t.prototype.setContext=function(t){this.contextManager.setContext(t)},t.prototype.getContext=function(){return this.contextManager.getContext()},t.prototype.setContextProperty=function(t,e){this.contextManager.setContextProperty(t,e)},t.prototype.removeContextProperty=function(t){this.contextManager.removeContextProperty(t)},t.prototype.clearContext=function(){this.contextManager.clearContext()},t.prototype.setHandler=function(t){this.handlerType=t},t.prototype.getHandler=function(){return this.handlerType},t.prototype.setLevel=function(t){this.level=t},t.prototype.getLevel=function(){return this.level},au([p],t.prototype,"log",null),t}(),du="logs";var fu="logs";function hu(t){var e=zo(t,fu,(function(e){return function(t,e){var n=function(t){return"0"===t||"1"===t}(e)?e:pu(t);return{trackingType:n,isTracked:"1"===n}}(t,e)}));return{findTrackedSession:function(t){var n=e.findActiveSession(t);return n&&"1"===n.trackingType?{id:n.id}:void 0},expireObservable:e.expireObservable}}function pu(t){return st(t.sessionSampleRate)?"1":"0"}var vu,mu=!1;function _u(t){var e=window;if(zt()){var n=r(e.DD_RUM_SYNTHETICS);return n||mu||(mu=!0,qn("Logs sent before RUM is injected by the synthetics worker",{testId:qt(),resultId:Ht()})),n}return r(e.DD_RUM);function r(e){if(e&&e.getInternalContext)return e.getInternalContext(t)}}var gu,yu=((vu={})[i.log]=su.info,vu[i.debug]=su.debug,vu[i.info]=su.info,vu[i.warn]=su.warn,vu[i.error]=su.error,vu);var bu=((gu={})[Qi.cspViolation]=su.error,gu[Qi.intervention]=su.error,gu[Qi.deprecation]=su.warn,gu);function wu(t,e){if(!t.forwardErrorsToLogs)return{stop:F};var n=Kr(t).subscribe((function(t){"complete"===t.state&&i("xhr",t)})),r=Jr().subscribe((function(t){"resolve"===t.state&&i("fetch",t)}));function i(n,r){function i(t){e.notify(0,{rawLogsEvent:{message:"".concat(Eu(n)," error ").concat(r.method," ").concat(r.url),date:r.startClocks.timeStamp,error:{stack:t||"Failed to load"},http:{method:r.method,status_code:r.status,url:r.url},status:su.error,origin:kr.NETWORK}})}t.isIntakeUrl(r.url)||!function(t){return 0===t.status&&"opaque"!==t.responseType}(r)&&!ti(r.status)||("xhr"in r?function(t,e,n){"string"==typeof t.response?n(Su(t.response,e)):n(t.response)}(r.xhr,t,i):r.response?function(t,e,n){var r=ei(t);r&&r.body?window.TextDecoder?function(t,e,n){ni(t,(function(t,e,r){if(t)n(t);else{var i=(new TextDecoder).decode(e);r&&(i+="..."),n(void 0,i)}}),{bytesLimit:e,collectStreamBody:!0})}(r.body,e.requestErrorResponseLengthLimit,(function(t,e){n(t?"Unable to retrieve response: ".concat(t):e)})):r.text().then(v((function(t){return n(Su(t,e))})),v((function(t){return n("Unable to retrieve response: ".concat(t))}))):n()}(r.response,t,i):r.error&&function(t,e,n){n(Su(me(te(t)),e))}(r.error,t,i))}return{stop:function(){n.unsubscribe(),r.unsubscribe()}}}function Su(t,e){return t.length>e.requestErrorResponseLengthLimit?"".concat(t.substring(0,e.requestErrorResponseLengthLimit),"..."):t}function Eu(t){return"xhr"===t?"XHR":"Fetch"}var Ou,ku=Dr,Au=((Ou={})[su.debug]=0,Ou[su.info]=1,Ou[su.warn]=2,Ou[su.error]=3,Ou);function Tu(t){return{handleLog:function(e,n,r,i){var s=q(n.getContext(),e.context);xu(e.status,uu.console,n)&&function(t,e){a[t.status].call(o,t.message,e)}(e,s),xu(e.status,uu.http,n)&&t.notify(0,{rawLogsEvent:{date:i||bt(),message:e.message,status:e.status,origin:kr.LOGGER},messageContext:s,savedCommonContext:r})}}}function xu(t,e,n){var r=n.getHandler(),i=Array.isArray(r)?r:[r];return Au[t]>=Au[n.getLevel()]&&g(i,e)}var Cu=function(t){var e=!1,n=ot(2),r=ot(1),o={},a=function(){},s=new at,c=function(t,e,n,r){void 0===n&&(n=z(d())),void 0===r&&(r=bt()),s.add((function(){return c(t,e,n,r)}))},l=function(){};function d(){return{view:{referrer:document.referrer,url:window.location.href},context:n.getContext(),user:r.getContext()}}return A({logger:new lu((function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return c.apply(void 0,t)})),init:v((function(o){var f;if(o){if(l=function(){return z(o)},Yt()&&(o=function(t){return k({},t,{clientToken:"empty"})}(o)),function(t){if(e)return t.silentMultipleInit||u.error("DD_LOGS is already initialized."),!1;return!0}(o)){var h=function(t){var e=En(t),n=ou(t.forwardConsoleLogs,w(i),"Forward Console Logs"),r=ou(t.forwardReports,w(Qi),"Forward Reports");if(e&&n&&r)return t.forwardErrorsToLogs&&!g(n,i.error)&&n.push(i.error),k({forwardErrorsToLogs:!1!==t.forwardErrorsToLogs,forwardConsoleLogs:n,forwardReports:r,requestErrorResponseLengthLimit:iu},e)}(o);if(h){if(o.storeContextsAcrossPages){var p=n.getContext();(n=Jt(h,du,2)).setContext(q(n.getContext(),p));var v=r.getContext();(r=Jt(h,du,1)).setContext(q(r.getContext(),v))}f=t(o,h,d),c=f.handleLog,a=f.getInternalContext,s.drain(),e=!0}}}else u.error("Missing configuration")})),getGlobalContext:v((function(){return n.getContext()})),setGlobalContext:v((function(t){return n.setContext(t)})),setGlobalContextProperty:v((function(t,e){return n.setContextProperty(t,e)})),removeGlobalContextProperty:v((function(t){return n.removeContextProperty(t)})),clearGlobalContext:v((function(){return n.clearContext()})),createLogger:v((function(t,e){return void 0===e&&(e={}),o[t]=new lu((function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return c.apply(void 0,t)}),$(t),e.handler,e.level,$(e.context)),o[t]})),getLogger:v((function(t){return o[t]})),getInitConfiguration:v((function(){return l()})),getInternalContext:v((function(t){return a(t)})),setUser:v((function(t){be(t)&&r.setContext(ye(t))})),getUser:v((function(){return r.getContext()})),setUserProperty:v((function(t,e){var n,i=ye((n={},n[t]=e,n))[t];r.setContextProperty(t,i)})),removeUserProperty:v((function(t){return r.removeContextProperty(t)})),clearUser:v((function(){return r.clearContext()}))})}((function(t,e,n){var r=new ku,o=[];r.subscribe(1,(function(t){return Mn("logs",t)}));var a=function(t){r.notify(0,{rawLogsEvent:{message:t.message,date:t.startClocks.timeStamp,origin:kr.AGENT,status:su.error}}),qn("Error reported to customer",{"error.message":t.message})},s=$n(e),u=!e.sessionStoreStrategyType||Yt()||zt()?function(t){var e="1"===pu(t)?{}:void 0;return{findTrackedSession:function(){return e},expireObservable:new Q}}(e):hu(e),c=function(t,e,n,r){var i=Vn("browser-logs-sdk",t),o=[];if(Yt()){var a=Gt(),s=i.observable.subscribe((function(t){return a.send("internal_telemetry",t)}));o.push((function(){return s.unsubscribe()}))}else{var u=ua(t,{endpoint:t.rumEndpointBuilder,encoder:Xt()},t.replica&&{endpoint:t.replica.rumEndpointBuilder,encoder:Xt()},e,n,r);o.push((function(){return u.stop()}));var c=i.observable.subscribe((function(e){return u.add(e,zn(t))}));o.push((function(){return c.unsubscribe()}))}return{telemetry:i,stop:function(){o.forEach((function(t){return t()}))}}}(e,a,s,u.expireObservable),l=c.telemetry,d=c.stop;o.push((function(){return d()})),l.setContextProvider((function(){var t,e,n,r,i,o;return{application:{id:null===(t=_u())||void 0===t?void 0:t.application_id},session:{id:null===(e=u.findTrackedSession())||void 0===e?void 0:e.id},view:{id:null===(r=null===(n=_u())||void 0===n?void 0:n.view)||void 0===r?void 0:r.id},action:{id:null===(o=null===(i=_u())||void 0===i?void 0:i.user_action)||void 0===o?void 0:o.id}}})),wu(e,r),function(t,e){if(!t.forwardErrorsToLogs)return{stop:F};var n=new Q,r=Zi(n).stop,i=n.subscribe((function(t){e.notify(0,{rawLogsEvent:{message:t.message,date:t.startClocks.timeStamp,error:{kind:t.type,stack:t.stack},origin:kr.SOURCE,status:su.error}})}))}(e,r),function(t,e){var n=Xi(t.forwardConsoleLogs).subscribe((function(t){e.notify(0,{rawLogsEvent:{date:bt(),message:t.message,origin:kr.CONSOLE,error:t.api===i.error?{stack:t.stack,fingerprint:t.fingerprint}:void 0,status:yu[t.api]}})}))}(e,r),function(t,e){var n=to(t,t.forwardReports).subscribe((function(t){var n,r=t.message,i=bu[t.type];i===su.error?n={kind:t.subtype,stack:t.stack}:t.stack&&(r+=" Found in ".concat(function(t){var e;return null===(e=/@ (.+)/.exec(t))||void 0===e?void 0:e[1]}(t.stack))),e.notify(0,{rawLogsEvent:{date:bt(),message:r,origin:kr.REPORT,error:n,status:i}})}))}(e,r);var f,h=Tu(r).handleLog;if(function(t,e,n,r,i){var o=cu.concat(["custom"]),a={};o.forEach((function(t){a[t]=Ar(t,e.eventRateLimiterThreshold,i)})),n.subscribe(0,(function(i){var o,s,u=i.rawLogsEvent,c=i.messageContext,l=void 0===c?void 0:c,d=i.savedCommonContext,f=void 0===d?void 0:d,h=At(u.date),p=t.findTrackedSession(h);if(p){var v=f||r(),m=q({service:e.service,session_id:p.id,usr:Ae(v.user)?void 0:v.user,view:v.view},v.context,_u(h),u,l);!1===(null===(o=e.beforeSend)||void 0===o?void 0:o.call(e,m))||m.origin!==kr.AGENT&&(null!==(s=a[m.status])&&void 0!==s?s:a.custom).isLimitReached()||n.notify(1,m)}}))}(u,e,r,n,a),Yt())!function(t){var e=Gt();t.subscribe(1,(function(t){e.send("log",t)}))}(r);else{var p=function(t,e,n,r,i){var o=ua(t,{endpoint:t.logsEndpointBuilder,encoder:Xt()},t.replica&&{endpoint:t.replica.logsEndpointBuilder,encoder:Xt()},n,r,i);return e.subscribe(1,(function(t){o.add(t)})),o}(e,r,a,s,u.expireObservable).stop;o.push((function(){return p()}))}return Gn(function(t){var e=On(t);return k({forward_errors_to_logs:t.forwardErrorsToLogs,forward_console_logs:t.forwardConsoleLogs,forward_reports:t.forwardReports},e)}(t)),{handleLog:h,getInternalContext:(f=u,{get:function(t){var e=f.findTrackedSession(t);if(e)return{session_id:e.id}}}).get,stop:function(){o.forEach((function(t){return t()}))}}}));T(x(),"DD_LOGS",Cu);const Iu="2.17.3";function Pu(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ru(t,n){for(var r=0;r<n.length;r++){var i=n[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,e(i.key),i)}}function Nu(t,e,n){return e&&Ru(t.prototype,e),n&&Ru(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function Lu(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n<e;n++)r[n]=t[n];return r}function Mu(t,e){if(t){if("string"==typeof t)return Lu(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Lu(t,e):void 0}}function Du(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var r,i,o,a,s=[],u=!0,c=!1;try{if(o=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;u=!1}else for(;!(u=(r=o.call(n)).done)&&(s.push(r.value),s.length!==e);u=!0);}catch(t){c=!0,i=t}finally{try{if(!u&&null!=n.return&&(a=n.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(t,e)||Mu(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ju(t){return function(t){if(Array.isArray(t))return Lu(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||Mu(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Uu(t,e,n,r,i,o,a){try{var s=t[o](a),u=s.value}catch(t){return void n(t)}s.done?e(u):Promise.resolve(u).then(r,i)}function Fu(t){return function(){var e=this,n=arguments;return new Promise((function(r,i){var o=t.apply(e,n);function a(t){Uu(o,r,i,a,s,"next",t)}function s(t){Uu(o,r,i,a,s,"throw",t)}a(void 0)}))}}function Bu(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Vu(t,e){return Vu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Vu(t,e)}function zu(t){return zu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},zu(t)}var qu=n(2971),Hu=n.n(qu),Gu=n(25330);function Yu(t){return{source:t,ok:!0}}function Ku(t,e){return{ok:!1,source:t,error:e}}const Wu={shouldHaveTextContent:function(t,e,n){return n.get(t.name)&&n.get(t.name).trim().length?Yu(t):Ku(t,e)},shouldHaveValue:function(t,e,n){return n.get(t.name)&&null!==n.get(t.name)&&""!==n.get(t.name)?Yu(t):Ku(t,e)},shouldHaveCheckedInput:function(t,e,n){var r=!1;return ju(t.querySelectorAll('input[type="radio"]')).some((function(t){return!!t.checked&&(r=!0,!0)})),r?Yu(e):Ku(e,n)},isValidEmail:function(t,e,n){var r=n.get(t.name);return r&&0!==r.length?r&&/^([!#-'*+/-9=?A-Z^-~-]+(\.[!#-'*+/-9=?A-Z^-~-]+)*|"([]!#-[^-~ \t]|(\\[\t -~]))+")@(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,})$/.test(r)?Yu(t):Ku(t,e):Ku(t,"Please enter your email")},matchesEmail:function(t,e,n,r){return r.get(t.name)!==r.get(e)?Ku(t,n):Yu(t)},makeError:Ku,isEightCharacters:function(t,e,n){return n.get(t.name).length<8?Ku(t,e):Yu(t)},containsLowercase:function(t,e,n){var r=n.get(t.name);return/[a-z]/g.test(r)?Yu(t):Ku(t,e)},containsUppercase:function(t,e,n){var r=n.get(t.name);return/[A-Z]/g.test(r)?Yu(t):Ku(t,e)},containsNumber:function(t,e,n){var r=n.get(t.name);return/[0-9]/g.test(r)?Yu(t):Ku(t,e)},containsSymbol:function(t,e,n){var r=n.get(t.name);return/[^a-zA-Z\d]/g.test(r)&&!/[^\x00-\x7F]/g.test(r)?Yu(t):Ku(t,e)}};var $u="nextScreenTransitionSucceeded",Zu="screenTransitionNextSuccess",Ju="screenTransitionSkip",Xu="fieldFocused",Qu="fieldBlurred",tc="fieldInteraction",ec=0,nc=1,rc=2,ic={klondike:!0},oc=["first_name","last_name","email","areas_of_interest"],ac="An error occurred while trying to communicate with the server. Please try again later.",sc={first_name:"first_name",last_name:"last_name",email:"email",email_confirm:"email"},uc="QUIZ",cc="STANDARD",lc="PROGRESSIVE",dc="AUTH",fc="EXEC_ED",hc="EMBED_PROGRESSIVE",pc="EMBED_AUTH",vc="EMBED",mc="element",_c="fetch",gc="element",yc="embed-inline",bc=["email","phone","sms"],wc={retail:{email:"email_opt_out",phone:"do_not_call",sms:"sms_opt_in"},share:{email:"share_email_opt_out",phone:"share_do_not_call",sms:"share_sms_opt_in"}},Sc={production:"https://prospect-form-plugin.2u.com/assets",staging:"https://d22rx3tmdeslyv.cloudfront.net/assets",development:"https://corp-mktg.s3.amazonaws.com/taxi/development/plugin/assets"},Ec={FORM_ID:"form_id",GROUPING:"grouping",PAGE_URL:"page_url",UUID:"uuid",CREDENTIAL_TYPE:"credential_type",DEGREE_OFFERING:"degree_offering",PROGRAMS_OF_STUDY:"programs_of_study",LEAD_SOURCE:"lead_source",USER_EMAIL:"email",INTEREST_ACTION:"interest_action",INTEREST_SUBMISSION_TIME:"interest_submission_time",SUBMISSION_URL:"submission_url",REQUEST_RESPONSE_ERROR:"request_response_error",REQUEST_RESPONSE_STATUS_ERROR:"request_response_status_error",REQUEST_RESPONSE_ERROR_MSG:"request_response_error_message",STATUS_CODE:"status_code",FETCH_URL:"fetch_url",INTEREST_SUBMISSION_ENDPOINT:"interest_submission_endpoint",SUBMITTED_PAGE_HOST:"submitted_page_host",TAXI_FORM_TYPE:"taxi_form_type",RV_SESSION_ID_AVAILABLE:"rv_session_id_available",RV_LEAD_SOURCE:"rv_source"},Oc="RV_SESSION_ID_NOT_FOUND",kc="CREATE",Ac="auth-v2/auto-signup",Tc="auth-v2/co-callback",xc="mounted",Cc="not_mounted",Ic="data-package-type",Pc=["Iceland","Liechtenstein","Norway","Switzerland","Brazil","Colombia","Singapore","Thailand","Australia","China","Japan","Egypt","Israel","Kenya","Saudi Arabia","South Africa","Turkey","United Arab Emirates","India","Qatar","New Zealand"],Rc="BOOTCAMP",Nc="SHORT_COURSE",Lc=["SHORT_COURSE","DEGREE","GRADUATE_CERTIFICATE"];function Mc(t){var e=new RegExp("; ".concat(t,"=([^;]+)")).exec("; ".concat(document.cookie));return null!=e?e[1]:null}function Dc(t,e,n,r){t.forEach((function(t){var i=-1===Object.values(r).indexOf(t);e[t]&&(document.cookie=function(t,e,n,r){var i=e;r&&(i=btoa(encodeURIComponent(i)));return"taxi-".concat(t,"=").concat(i,";path=/;secure=true;max-age=").concat(n,";samesite=strict")}(t,e[t],n,i))}))}var jc=function(t,e){return t&&"bodega-taxi"!==t?"".concat(t,"-").concat(e):e},Uc=function(t,e,n){return t.getElementById(jc(e,n))},Fc=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=t?"development":"dev";return"staging"==="production".toLowerCase()?e=t?"staging":"stg":"production"==="production".toLowerCase()&&(e=t?"production":"prod"),e},Bc=function(t){return Boolean(null==t?void 0:t.document)?ju(t.document.body.querySelectorAll("[".concat(Ic,'="').concat(_c,'"]'))):null!=t&&t.getAttribute&&t.getAttribute(Ic)===_c?[t]:null!=t&&t.querySelectorAll?ju(t.querySelectorAll("[".concat(Ic,'="').concat(_c,'"]'))):[]},Vc=function e(n){var r={};return Object.getOwnPropertyNames(n).forEach((function(i){var o=Object.getOwnPropertyDescriptor(n,i);o.enumerable=!0,"object"===(0,t.A)(n[i])&&null!==n[i]&&(o.value=e(n[i])),Object.defineProperty(r,i,o)})),r},zc=function(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";ru.addError(new Error(n),void 0,"source"),Cu.logger.error(n,"object"===(0,t.A)(e)&&null!==e?Vc(e):e),r&&console.error(r)},qc=function(t){return"_INTERNAL_FEATURE_FLAG_"+t},Hc=function(t){t.setAttribute("required","required"),t.setAttribute("aria-required","true")},Gc=function(t,e){var n,i,o,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=Ec.CREDENTIAL_TYPE,u=Ec.DEGREE_OFFERING,c=Ec.FORM_ID,l=Ec.GROUPING,d=Ec.INTEREST_ACTION,f=Ec.INTEREST_SUBMISSION_TIME,h=Ec.LEAD_SOURCE,p=Ec.PAGE_URL,v=Ec.PROGRAMS_OF_STUDY,m=Ec.RV_LEAD_SOURCE,_=Ec.SUBMITTED_PAGE_HOST,g=Ec.TAXI_FORM_TYPE,y=Ec.USER_EMAIL,b=Ec.UUID,w=t.form_id;return r(r(r(r(r(r(r(r(r(r(n={},s,t.credential_type||"Credential type unavailable"),u,t.degree_offering||"Degree offering unavailable"),c,null!=w?w:"Form ID unavailable"),l,a.grouping||"Grouping unavailable"),d,e),f,(o={epoch_time:"Submission time unavailable",gmt_time:"Submission time unavailable"},(i=t).submission_time_ms&&(o.epoch_time=i.submission_time_ms,o.gmt_time=new Date(parseInt(i.submission_time_ms,10)).toUTCString()),o)),h,t.lead_source||"Lead source unavailable"),p,t.page_url||"Page url unavailable"),v,t.programs_of_study||"Programs of study unavailable"),m,t.rv_source||"RV Lead Source unavailable"),r(r(r(r(n,_,t.submitted_page_host||"Submitted page host unavailable"),g,t.taxi_form_type||"Taxi form type unavailable"),y,t.email||"Email unavailable"),b,t.uuid||"UUID unavailable")},Yc=/\[--link:(.*?)\](.*?)\[link--\]/g,Kc=/\[--tip:(.*?)\](.*?)\[tip--\]/g,Wc={key:null,userDoesConsent:!1,userDoesNotConsent:!0};const $c=function(t,e,n){var r=t.createElement("a"),i=e.split(" ");return r.href=i[0],i.length>=2&&0===i[1].indexOf("id:")&&(r.id=i[1].substring(3)),r.textContent=n,r.setAttribute("target","_blank"),r.setAttribute("rel","noopener"),r.style.color="#2071AB",r},Zc=function(t,e,n){var r=t.createDocumentFragment(),i=t.createElement("sup"),o=t.createElement("span"),a=t.createElement("button");o.textContent=n,i.textContent="?",o.style.borderBottom="1px dotted",a.style.backgroundColor="transparent",a.style.border="0 none",a.style.padding="0",a.className="tooltip",o.className="tooltip",a.appendChild(i),r.appendChild(o),r.appendChild(a),a.setAttribute("aria-label",e),o.setAttribute("aria-label",e);var s=function(e){var n=e.currentTarget,r=t.body.clientWidth,i=n.getBoundingClientRect().x/r*100,o="top-right";i>20&&i<70&&(o="top"),i>70&&(o="top-left"),a.className="tooltip tooltip--".concat(o)};return a.addEventListener("mouseover",s),a.addEventListener("focus",s),r};const Jc=function(t,e){var n=t.createDocumentFragment();return e.split(/(\[--.*?\[*--])/g).reduce((function(e,r){var i=function(t){var e={link:{tagRegex:Yc,tagRenderer:$c},tip:{tagRegex:Kc,tagRenderer:Zc}},n=t.match(/\[--(\w*)/);return n?e[n[1]]:null}(r);if(i)return function(t,e,n,r){var i=r.tagRegex,o=r.tagRenderer,a=n.split(i),s=o(e,a[1],a[2]);return t.appendChild(s),t}(e,t,r,i);var o=t.createTextNode(r);return e.appendChild(o),n}),n)};function Xc(t,e,n){var r=t.createElement("label");return r.setAttribute("for",e),r.className="label",r.appendChild(Jc(t,n)),r}var Qc=function(t){return"fieldset"===t.tagName.toLowerCase()},tl=function(t,e){t.setAttribute("aria-describedby",e)},el=function(t,e,n,r){var i=n.id.concat("-helpText"),o=function(t,e,n){var r=t.createElement("div");return r.className="form-group__help-text",r.setAttribute("id",e),r.appendChild(Jc(t,n)),r}(t,i,r);Qc(n)?(!function(t,e){t.querySelectorAll("input").forEach((function(t){return tl(t,e)}))}(n,i),n.appendChild(o),e.appendChild(n)):(tl(n,i),e.appendChild(o))};const nl=function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"form-group",i=n.helpText,o=n.hidden,a=n.label,s=t.createElement("div");if(s.className=r,!Qc(e)){var u=Xc(t,e.id,o?"":a);s.appendChild(u)}return s.appendChild(e),i&&el(t,s,e,i),o&&(s.style.display="none"),s};function rl(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function il(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?rl(Object(n),!0).forEach((function(e){r(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):rl(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function ol(t,e,n){var r=t.createElement("select"),i="".concat(e.salt||"","select-field-").concat(e.name),o=[];r.setAttribute("id",i),r.setAttribute("name",e.name);var a=t.createElement("option");a.text="— Select —",a.value="",a.setAttribute("title",""),r.add(a),n&&n.options&&n.options.length&&(n.options.forEach((function(e){var i=t.createElement("option");e.value===n.defaultOption&&i.setAttribute("selected","selected"),i.text=e.label,i.value=e.value,r.add(i)})),e.required&&(e.hidden||Hc(r),o.push({field:e.name,fieldId:i,validation:Wu.shouldHaveTextContent.bind(null,{name:e.name,type:"element",id:i},e.errorMessage||"Please select an option for ".concat(e.label.toLowerCase()))}))),e.hidden&&r.setAttribute("style","display:none"),r.className="control";var s=Gu.Ay.fromEvents(r,"keyup").map((function(t){return t.target.value})),u=Gu.Ay.fromEvents(r,"change").map((function(t){return t.target.value})),c=Gu.Ay.constant(n.defaultOption?n.defaultOption:void 0),l=Gu.Ay.fromEvents(r,"blur",(function(){return{type:Qu}})),d=Gu.Ay.fromEvents(r,"change",(function(){return{type:tc}})),f=Gu.Ay.fromEvents(r,"focus",(function(){return{type:Xu}})),h=Gu.Ay.merge([l,d,f]).map((function(t){return il(il({},t),{},{name:e.name,html_id:i,field_type:e.type})}));return{el:nl(t,r,e),ev:Gu.Ay.merge([s,u,c]),telemetryStream:h,validations:o}}function al(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}var sl=["United States","Afghanistan","Akrotiri and Dhekelia","Åland Islands","Albania ","Algeria","American Samoa","Andorra","Angola","Anguilla","Antarctica","Antigua and Barbuda","Argentina","Armenia","Aruba","Australia","Austria","Azerbaijan ","Bahamas","Bahrain","Bangladesh","Barbados","Belarus","Belgium","Belize","Benin","Bermuda","Bhutan","Bolivia, Plurinational State of","Bosnia and Herzegovina","Botswana","Bouvet Island","Brazil","British Indian Ocean Territory","Brunei Darussalam","Bulgaria","Burkina Faso","Burundi","Cambodia","Cameroon","Canada","Cape Verde","Cayman Islands","Central African Republic","Chad","Chile","China","Christmas Island","Cocos (Keeling) Islands","Colombia","Comoros","Congo","Congo, Democratic Republic of the","Cook Islands","Costa Rica","Côte D'Ivoire","Croatia","Cuba","Cyprus","Czech Republic","Denmark","Djibouti","Dominica","Dominican Republic","Ecuador","Egypt","El Salvador","Equatorial Guinea","Eritrea","Estonia","Ethiopia","Falkland Islands (Malvinas)","Faroe Islands","Fiji","Finland","France","French Guiana","French Polynesia","French Southern Territories","Gabon","Gambia","Georgia","Germany","Ghana","Gibraltar","Greece","Greenland","Grenada","Guadeloupe","Guam","Guatemala","Guernsey","Guinea","Guinea-bissau","Guyana","Haiti","Heard Island and Mcdonald Islands","Holy See (Vatican City State)","Honduras","Hong Kong","Hungary","Iceland","India","Indonesia","Iran, Islamic Republic of","Iraq","Ireland","Isle of Man","Israel","Italy","Jamaica","Japan","Jersey","Jordan","Kazakhstan","Kenya","Kiribati","Korea, Democratic People's Republic of","Korea, Republic of","Kuwait","Kyrgyzstan","Lao People's Democratic Republic","Latvia","Lebanon","Lesotho","Liberia","Libyan Arab Jamahiriya","Liechtenstein","Lithuania","Luxembourg","Macao","Macedonia, The Former Yugoslav Republic of","Madagascar","Malawi","Malaysia","Maldives","Mali","Malta","Marshall Islands","Martinique","Mauritania","Mauritius","Mayotte","Mexico","Micronesia, Federated States of","Moldova, Republic of","Monaco","Mongolia","Montenegro","Montserrat","Morocco","Mozambique","Myanmar","Namibia","Nauru","Nepal","Netherlands","Netherlands Antilles","New Caledonia","New Zealand","Nicaragua","Niger","Nigeria","Niue","Norfolk Island","Northern Mariana Islands","Norway","Oman","Pakistan","Palau","Palestinian Territory, Occupied","Panama","Papua New Guinea","Paraguay","Peru","Philippines","Pitcairn","Poland","Portugal","Puerto Rico","Qatar","Réunion","Romania","Russian Federation","Rwanda","Saint Barthélemy","Saint Helena, Ascension and Tristan Da Cunha","Saint Kitts and Nevis","Saint Lucia","Saint Martin","Saint Pierre and Miquelon","Saint Vincent and The Grenadines","Samoa","San Marino","Sao Tome and Principe","Saudi Arabia","Senegal","Serbia","Seychelles","Sierra Leone","Singapore","Slovakia","Slovenia","Solomon Islands","Somalia","South Africa","South Georgia and The South Sandwich Islands","Spain","Sri Lanka","Sudan","Suriname","Svalbard and Jan Mayen","Swaziland","Sweden","Switzerland","Syrian Arab Republic","Taiwan","Tajikistan","Tanzania, United Republic of","Thailand","Timor-leste","Togo","Tokelau","Tonga","Trinidad and Tobago","Tunisia","Turkey","Turkmenistan","Turks and Caicos Islands","Tuvalu","Uganda","Ukraine","United Arab Emirates","United Kingdom","United States Minor Outlying Islands","Uruguay","Uzbekistan","Vanuatu","Venezuela, Bolivarian Republic of","Viet Nam","Virgin Islands, British","Virgin Islands, U.S.","Wallis and Futuna","Western Sahara","Yemen","Zambia","Zimbabwe"];function ul(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function cl(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ul(Object(n),!0).forEach((function(e){r(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ul(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function ll(t,e){var n=t.createElement("legend");return n.className="label",n.appendChild(Jc(t,e)),n}function dl(t,e,n){var r=t.createElement("fieldset");return r.setAttribute("class","form-group"),e.forEach((function(t){r.appendChild(t)})),n.hidden?r.setAttribute("style","display: none;"):n.required&&Hc(r),r}function fl(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"form-group",i=t.createElement("div");return i.className=r,e.forEach((function(t){i.appendChild(t)})),n&&i.setAttribute("style","display: none;"),i}function hl(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function pl(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?hl(Object(n),!0).forEach((function(e){r(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):hl(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function vl(t,e,n){var r=[],i="".concat(e.salt||"","radio-field-").concat(e.name),o=[],a=e.strictValidation,s=void 0===a||a,u=n.options.map((function(r){var a=r.label,s=r.value,u="".concat(i,"-").concat(s.split(" ").join("-")),c=Xc(t,u,a),l=t.createElement("input");l.setAttribute("type","radio"),l.setAttribute("id",u),l.setAttribute("name",e.name),l.setAttribute("value",s),l.classList.add("control"),!e.hidden&&e.required&&Hc(l),n.defaultOption===s&&l.setAttribute("checked",!0);var d=Gu.Ay.fromEvents(l,"focus",(function(){return{type:Xu}})),f=Gu.Ay.fromEvents(l,"blur",(function(){return{type:Qu}})),h=Gu.Ay.fromEvents(l,"change",(function(){return{type:tc}})),p=Gu.Ay.merge([f,h,d]).map((function(t){return pl(pl({},t),{},{html_id:u,field_type:e.type,name:e.name})}));o.push(p);var v=t.createElement("div");return v.classList.add("radio"),v.appendChild(c),v.appendChild(l),v})),c=fl(t,u,!1,"radio-group");n.stacked||c.classList.add("radio-group--inline");var l=ll(t,e.label),d=dl(t,[l,c],e);d.setAttribute("id",i);var f=n.defaultOption?Gu.Ay.constant(n.defaultOption):Gu.Ay.never(),h=Gu.Ay.merge([f,Gu.Ay.fromEvents(d,"change").map((function(t){return t.target.value}))]),p="Please select an option for ".concat(e.label.length>0?e.label.toLowerCase():e.validationLabel),v="".concat(i,"-").concat(n.options[0].value.split(" ").join("-"));return s?e.required&&r.push({field:e.name,fieldId:i,validation:Wu.shouldHaveValue.bind(null,{name:e.name,type:"element",id:i,focusElement:v},e.errorMessage||p)}):r.push({field:e.name,fieldId:i,validation:Wu.shouldHaveCheckedInput.bind(null,c,{name:e.name,type:"element",id:i,focusElement:v},e.errorMessage||p)}),{el:nl(t,d,e),ev:h,telemetryStream:Gu.Ay.merge(o),validations:r}}function ml(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function _l(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ml(Object(n),!0).forEach((function(e){r(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ml(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function gl(t,e,n){var r={options:[{label:"Yes",value:"yes"},{label:"No",value:"no"}],defaultOption:n.defaultOption||"none"},i="".concat(e.name.startsWith("share")?"share ":"").concat(n.channel.includes("sms")?n.channel.toUpperCase():n.channel," communication"),o=_l(_l({},e),{},{label:"",validationLabel:i,strictValidation:!1}),a=fl(t,[]);a.innerText=n.text;var s=vl(t,o,r),u=s.el,c=s.ev,l=s.telemetryStream,d=s.validations,f=c.map((function(t){return"sms"===n.channel?"yes"===t:"yes"!==t}));a.style.flexBasis="45%",u.style.flexBasis="45%";var h=fl(t,[a,u]);return h.classList.add("u--show-flex","u--justify-space-between","u--align-items-center","u--m0"),h.setAttribute("aria-label",n.text),{el:h,ev:{raw:c,conformed:f},telemetryStream:l,validations:d}}function yl(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function bl(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?yl(Object(n),!0).forEach((function(e){r(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):yl(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function wl(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Sl(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?wl(Object(n),!0).forEach((function(e){r(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):wl(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function El(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Ol(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?El(Object(n),!0).forEach((function(e){r(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):El(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function kl(t,e,n){var r,i="radio"===n.format,o=i?function(t,e,n){var r={options:[{label:"Yes",value:"yes"},{label:"No",value:"no"}],defaultOption:n.defaultRadio},i=vl(t,Sl(Sl({},e),{},{label:n.checkboxText,strictValidation:!1}),r),o=i.el,a=i.ev,s=i.validations,u=i.telemetryStream;return{element:o,stream:a.map((function(t){return"yes"===t})),validations:s,telemetryStream:u}}(t,e,n):function(t,e,n){var r="".concat(e.salt||"","check-box-").concat(e.name),i=t.createElement("input"),o={id:r,name:e.name,value:n.optInValue,type:e.hidden?"hidden":"checkbox",class:"control"};!e.hidden&&e.required&&Hc(i),n.defaultChecked&&i.setAttribute("checked",!0),Object.keys(o).forEach((function(t){return i.setAttribute(t,o[t])}));var a=t.createElement("div"),s=t.createElement("div");a.classList.add("checkbox"),s.classList.add("checkbox-group");var u=Xc(t,r,n.checkboxText);a.appendChild(i),a.appendChild(u),s.appendChild(a);var c=Gu.Ay.merge([n.defaultChecked?Gu.Ay.constant(n.defaultChecked):Gu.Ay.never()].concat(ju(["keyup","change"].map((function(t){return Gu.Ay.fromEvents(s,t).map((function(t){return t.target.checked}))}))))),l=Gu.Ay.fromEvents(i,"blur",(function(){return{type:Qu}})),d=Gu.Ay.fromEvents(i,"change",(function(){return{type:tc}})),f=Gu.Ay.fromEvents(i,"focus",(function(){return{type:Xu}})),h=Gu.Ay.merge([l,f,d]).map((function(t){return Ol(Ol({},t),{},{html_id:r,field_type:e.type,name:e.name})}));return{element:s,stream:c,telemetryStream:h,validations:[]}}(t,e,n),a=o.element,s=o.stream,u=o.validations,c=o.telemetryStream,l=ll(t,e.hidden?"":n.disclaimer),d=[n.disclaimer?l:null,n.checkboxText?a:null].filter(Boolean);(i&&n.defaultRadio&&"yes"===n.defaultRadio.toLowerCase()||!i&&n.defaultChecked)&&(r=n.optInValue);var f=s.map((function(t){return t?n.optInValue:void 0})),h=dl(t,d,e);return i&&h.classList.add("u--margin-bottom-0"),{el:h,ev:{_:Gu.Ay.merge([f,Gu.Ay.constant(r)])},validations:u,telemetryStream:c}}function Al(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}var Tl=["Afghan","Albanian","Algerian","American Samoan","Andorran","Angolan","Anguilla","Antigua and Barbuda","Argentine","Armenian","Australian","Austrian","Azerbaijani","Bahamian","Bahraini","Bangladeshi","Barbadian","Belarusian","Belgian","Belizean","Beninese","Bermuda","Bhutanese","Bolivian","Bosnian","Botswanan","Brazilian","British Indian Ocean Territory","British National","British National (Overseas)","British Overseas Citizen","Bruneian","Bulgarian","Burkinan","Burmese","Burundian","Cambodian","Cameroonian","Canadian","Cape Verdean","Cayman Islands","Central African","Chadian","Chilean","Chinese","Colombian","Comoran","Congolese (DRC)","Congolese (PR)","Costa Rican","Croatian","Cuban","Cypriot (European Union)","Cypriot (Non-European Union)","Czech","Danish","Djiboutian","Dominican","Dominican Republic","Dutch","East Timorese","Ecuadorian","Egyptian","Emirati","Equatorial Guinean","Eritrean","Estonian","Ethiopian","Falkland Islands","Faroese","Fijian","Finnish","French","Gabonese","Gambian","Georgian","German","Ghanaian","Gibraltar","Greek","Greenlander","Grenadian","Guamanian","Guatemalan","Guernsey","Guinea-Bissau","Guinean","Guyanese","Haitian","Honduran","Hong Kong","Hungarian","Icelander","Indian","Indonesian","Iranian","Iraqi","Irish","Isle of Man","Israeli","Italian","Ivorian","Jamaican","Japanese","Jersey","Jordanian","Kazakh","Kenyan","Kiribati","Kosovan","Kuwaiti","Kyrgyz","Lao","Latvian","Lebanese","Lesotho","Liberian","Libyan","Lichtensteiner","Lithuanian","Luxembourger","Macanese","Macedonian","Malagasy","Malawian","Malaysian","Maldivian","Malian","Maltese","Manx","Marshall Islander","Mauritanian","Mauritian","Mexican","Micronesian","Moldovan","Monegasque","Mongolian","Montenegrin","Montserrat","Moroccan","Mozambican","Namibian","Nauruan","Nepalese","New Zealander","Nicaraguan","Niger","Nigerian","North Korean","Northern Mariana Islands","Norwegian","Not Known","Omani","Pakistani","Palauan","Palestinian","Panamanian","Papua New Guinean","Paraguayan","Peruvian","Philippine","Pitcairn Islands","Polish","Portuguese","Qatari","Romanian","Russian","Rwandan","Sahrawi","Salvadorean","Samoan","San Marino","Sao Tome and Principe","Saudi Arabian","Senegalese","Serbian","Seychelles","Sierra Leone","Singaporean","Slovak","Slovenian","Solomon Islands","Somali","South African","South Georgia and South Sandwich Islands","South Korean","South Sudanese","Spanish","Sri Lankan","St Helena","St Kitts and Nevis","St Lucia","St Vincent","Stateless","Sudanese","Surinamese","Swazi","Swedish","Swiss","Syrian","Taiwanese","Tajik","Tanzanian","Thai","Togolese","Tongan","Trinidad and Tobago","Tunisian","Turkish","Turkmen","Turks and Caicos Islands","Tuvaluan","Ugandan","Ukrainian","United Kingdom","United States citizen","Uruguayan","Uzbek","Vanuatu","Vatican City","Venezuelan","Vietnamese","Virgin Islander (British)","Yemeni","Zambian","Zimbabwean"];function xl(t,e,n){return{el:Xc(t,"","Unsupported field ".concat(JSON.stringify(e)," with value ").concat(JSON.stringify(n))),ev:Gu.Ay.never(),telemetryStream:Gu.Ay.never(),validations:[]}}function Cl(){return{el:null,ev:Gu.Ay.never(),telemetryStream:null,validations:[]}}function Il(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}var Pl=["N/A","Alabama","Alaska","Arizona","Arkansas","California","Colorado","Connecticut","Delaware","District of Columbia","Florida","Georgia","Hawaii","Idaho","Illinois","Indiana","Iowa","Kansas","Kentucky","Louisiana","Maine","Maryland","Massachusetts","Michigan","Minnesota","Mississippi","Missouri","Montana","Nebraska","Nevada","New Hampshire","New Jersey","New Mexico","New York","North Carolina","North Dakota","Ohio","Oklahoma","Oregon","Pennsylvania","Rhode Island","South Carolina","South Dakota","Tennessee","Texas","Utah","Vermont","Virginia","Washington","West Virginia","Wisconsin","Wyoming"];function Rl(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Nl(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Rl(Object(n),!0).forEach((function(e){r(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Rl(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function Ll(t,e,n){var r=t.createElement("input"),i="".concat(e.salt||"","text-field-").concat(e.name),o=[];if(r.setAttribute("id",i),r.setAttribute("name",e.name),n&&n.text&&n.text.length&&r.setAttribute("value",n.text),"email"===e.name)!e.hidden&&e.required&&Hc(r),o.push({field:e.name,fieldId:i,validation:Wu.isValidEmail.bind(null,{name:e.name,type:"element",id:i},e.errorMessage||"Please enter a valid email format")});else if("email_confirm"===e.name){var a={name:"email",label:"Email"};!e.hidden&&e.required&&Hc(r),o.push({field:e.name,fieldId:i,validation:Wu.matchesEmail.bind(null,{name:e.name,type:"element",id:i},a.name,e.errorMessage||"".concat(e.label," field must match ").concat(a.label))})}else e.required&&(e.hidden||Hc(r),o.push({field:e.name,fieldId:i,validation:Wu.shouldHaveTextContent.bind(null,{name:e.name,type:"element",id:i},e.errorMessage||"Please enter your ".concat(e.label.toLowerCase()))}));r.className="control","phone"===e.name?r.setAttribute("type",e.hidden?"hidden":"tel"):"email"===e.name||"email_confirm"===e.name?r.setAttribute("type",e.hidden?"hidden":"email"):r.setAttribute("type",e.hidden?"hidden":"text");var s=Gu.Ay.constant(n?n.text:""),u=Gu.Ay.fromEvents(r,"keyup").map((function(t){return t.target.value})),c=Gu.Ay.fromEvents(r,"change").map((function(t){return t.target.value})),l=Gu.Ay.fromEvents(r,"blur",(function(){return{type:Qu}})),d=Gu.Ay.fromEvents(r,"keydown",(function(){return{type:tc}})).take(1),f=Gu.Ay.fromEvents(r,"focus",(function(){return{type:Xu}})),h=Gu.Ay.merge([l,d,f]).map((function(t){return Nl(Nl({},t),{},{name:e.name,html_id:i,field_type:e.type})}));return{el:nl(t,r,e),ev:Gu.Ay.merge([s,u,c]),telemetryStream:h,validations:o}}function Ml(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Dl(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Ml(Object(n),!0).forEach((function(e){r(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ml(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function jl(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Ul(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?jl(Object(n),!0).forEach((function(e){r(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):jl(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var Fl=[Ll,xl,vl,ol,kl,function(t,e,n){var i={options:Pl.map((function(t){return{label:t,value:t}})),defaultOption:n.defaultOption||""},o=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Il(Object(n),!0).forEach((function(e){r(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Il(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({errorMessage:"Please select a state"},e);return ol(t,o,i)},function(t,e,n){var i={options:sl.map((function(t){return{label:t,value:t}})),defaultOption:n.defaultOption||""},o=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?al(Object(n),!0).forEach((function(e){r(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):al(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({errorMessage:"Please select a country"},e);return ol(t,o,i)},function(t,e,n){var r=t.createElement("div");return r.appendChild(Jc(t,n.text)),r.classList.add("u--align-left","u--padding-top-2","u--font-size-0875","info-text"),e.hidden&&r.classList.add("u--hide"),{el:r,ev:Gu.Ay.never(),telemetryStream:Gu.Ay.never(),validations:[]}},function(t,e,n){var r={_:Gu.Ay.never()},i=[],o=ll(t,n.retailOptIn.text);o.classList.add("u--mb2");var a=[],s=[];bc.forEach((function(o){if(n.retailOptIn[o].length>0){var u=gl(t,bl(bl({},e),{},{name:wc.retail[o]}),{channel:o,text:n.retailOptIn[o]}),c=u.el,l=u.ev,d=u.telemetryStream,f=u.validations;a.push(c),s=s.concat(f),r[wc.retail[o]]=l.conformed,i.push(d)}}));var u,c,l,d=dl(t,[o].concat(a),e);if(d.classList.add("u--m0"),n.leadShareOptIn.text){(u=ll(t,n.leadShareOptIn.text)).classList.add("u--mb2");var f=[],h=[];bc.forEach((function(o){if(n.leadShareOptIn[o].length>0){var a=gl(t,bl(bl({},e),{},{name:wc.share[o]}),{channel:o,text:n.leadShareOptIn[o]}),u=a.el,c=a.ev,l=a.telemetryStream,d=a.validations;f.push(u),s=s.concat(d),r[wc.share[o]]=c.conformed,h.push(c.raw.map((function(t){return{channel:o,value:t}}))),i.push(l)}}));var p=Gu.Ay.merge(h).scan((function(t,e){return t[e.channel]=e.value,t}),{}).map((function(t){for(var e=Object.keys(t),r=0;r<e.length;r++)if("yes"===t[e[r]])return n.leadShareOptIn.leadShareValue;return""}));(c=dl(t,[u].concat(f),e)).classList.add("u--m0"),r._=p}n.disclaimer&&(l=ll(t,n.disclaimer));var v=fl(t,[d,c,l].filter(Boolean));return v.classList.add("u--mb0"),{el:v,ev:r,telemetryStream:Gu.Ay.merge(i),validations:s}},Cl,function(t,e,n){var i={options:Tl.map((function(t){return{label:t,value:t}})),defaultOption:n.defaultOption||""},o=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Al(Object(n),!0).forEach((function(e){r(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Al(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({errorMessage:"Please select a nationality"},e);return ol(t,o,i)},kl,function(t,e,n){return{el:null,ev:Gu.Ay.constant(n.degreeOffering),telemetryStream:Gu.Ay.never(),validations:[]}},function(t,e,n){var r=["At least eight characters","At least one lowercase letter","At least one uppercase letter","At least one number","At least one symbol, e.g. @#$!"],i="development";["staging","production"].includes("production".toLowerCase())&&(i="production");var o="".concat(Sc[i],"/visibility-blue.svg"),a="".concat(Sc[i],"/visibility_off-blue.svg"),s=Ll(t,e,n),u=s.el,c=s.ev,l=s.telemetryStream,d=u.lastElementChild;d.setAttribute("type","password");var f=t.createElement("p");f.innerText="Password must contain:",f.className+=" u--font-size-075 u--text-color-gray u--margin-bottom-0 u--margin-top-1";var h=t.createElement("ul");h.className="u--list-unstyled  u--padding-left-1 u--font-size-075 u--text-color-gray u--border-thick u--border-right-0 u--border-top-0 u--border-bottom-0 u--margin-bottom-0",r.forEach((function(e){var n=t.createElement("li");n.innerHTML=e,h.appendChild(n)}));var p=fl(t,[f,h]);p.className="u--pull-left";var v=t.createElement("img");v.setAttribute("src",o),v.setAttribute("aria-hidden",!0),v.className+=" u--pull-left u--margin-right-1";var m=t.createElement("p");m.className="u--pull-left u--font-size-0875 u--text-color-primary u--margin-bottom-0",m.style.width="32px",m.innerText="Show";var _=t.createElement("span");_.className+=" u--sr-only",_.innerText="password",m.appendChild(_);var g=fl(t,[v,m]);function y(){"password"===d.getAttribute("type")?(d.setAttribute("type","text"),v.setAttribute("src",a),m.childNodes[0].nodeValue="Hide"):(d.setAttribute("type","password"),v.setAttribute("src",o),m.childNodes[0].nodeValue="Show")}g.className="u--pull-right u--margin-top-1",g.setAttribute("tabindex","0"),g.setAttribute("role","button"),g.style.cursor="pointer",g.onclick=y,g.addEventListener("keydown",(function(t){13!==t.keyCode&&32!==t.keyCode||(t.preventDefault(),y())}));var b=fl(t,[p,g]);b.className="u--clearfix",u.appendChild(b);var w=[],S="".concat(e.salt||"","text-field-").concat(e.name);return w.push({field:e.name,fieldId:S,validation:Wu.isEightCharacters.bind(null,{name:e.name,type:"element",id:S},e.errorMessage||r[0])}),w.push({field:e.name,fieldId:S,validation:Wu.containsLowercase.bind(null,{name:e.name,type:"element",id:S},e.errorMessage||r[1])}),w.push({field:e.name,fieldId:S,validation:Wu.containsUppercase.bind(null,{name:e.name,type:"element",id:S},e.errorMessage||r[2])}),w.push({field:e.name,fieldId:S,validation:Wu.containsNumber.bind(null,{name:e.name,type:"element",id:S},e.errorMessage||r[3])}),w.push({field:e.name,fieldId:S,validation:Wu.containsSymbol.bind(null,{name:e.name,type:"element",id:S},e.errorMessage||r[4])}),{el:u,ev:c,telemetryStream:l,validations:w}},function(t,e,n){var r=t.createElement("div"),i="".concat(e.salt||"","multipicklist-box-").concat(e.name),o=[],a=[],s=function(){var t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").split(";"),e={};return t.forEach((function(t){e[t]=!0})),e}(n.defaultOption);n&&n.options&&n.options.length&&(n.options.forEach((function(n){var o="".concat(i,"-").concat(n.value.split(" ").join("-")),u=t.createElement("div");u.classList.add("checkbox");var c=t.createElement("input");c.setAttribute("type","checkbox"),c.setAttribute("id",o),c.classList.add("control"),c.setAttribute("data-value",n.value),!e.hidden&&e.required&&Hc(c),s[n.value]&&c.setAttribute("checked","true"),a.push(c);var l=t.createElement("label");l.innerHTML=n.label,l.classList.add("label"),l.setAttribute("for",o),u.appendChild(c),u.appendChild(l),r.appendChild(u)})),e.required&&(e.hidden||Hc(r),o.push({field:e.name,fieldId:i,validation:Wu.shouldHaveTextContent.bind(null,{name:e.name,type:"element",id:i},e.errorMessage||"Please select at least one option for ".concat(e.label.toLowerCase()))}))),e.hidden&&r.setAttribute("style","display:none");var u=ll(t,e.hidden?"":e.label),c=dl(t,[u,r],e);c.setAttribute("id",i),c.setAttribute("name",e.name);var l=Gu.Ay.fromEvents(c,"change",(function(){return a.reduce((function(t,e){var n=e.getAttribute("data-value");return e.checked?"".concat(t).concat(t.length?";":"").concat(n):t}),"")})),d=Gu.Ay.constant(n.defaultOption?n.defaultOption:void 0),f=[];a.forEach((function(t){f.push(Gu.Ay.fromEvents(t,"blur",(function(){return{type:Qu}}))),f.push(Gu.Ay.fromEvents(t,"change",(function(){return{type:tc}}))),f.push(Gu.Ay.fromEvents(t,"focus",(function(){return{type:Xu}})))}));var h=Gu.Ay.merge(f).map((function(t){return Ul(Ul({},t),{},{name:e.name,html_id:i,field_type:e.type})}));return{el:nl(t,c,e),ev:Gu.Ay.merge([l,d]),telemetryStream:h,validations:o}},Cl,function(t,e,n){var r=e.salt,i=e.name,o=e.type,a=e.hidden,s=e.required,u=n||{},c=u.includeImpliedConsent,l=void 0===c||c,d=u.impliedConsentData,f=void 0===d?[cl(cl({},Wc),{},{key:"email_opt_out"})]:d,h=t.createElement("input"),p="".concat(r||"").concat(i);h.setAttribute("id",p),h.setAttribute("name",i),h.setAttribute("value",""),a?h.setAttribute("type","hidden"):(h.setAttribute("type","email"),s&&Hc(h)),h.className="control";var v=[];v.push({field:e.name,fieldId:p,validation:Wu.isValidEmail.bind(null,{name:e.name,type:"element",id:p},e.errorMessage||"Please enter a valid email format")});var m=Gu.Ay.constant(!1),_=Gu.Ay.constant(""),g=Gu.Ay.fromEvents(h,"keyup").map((function(t){return t.target.value})),y=Gu.Ay.fromEvents(h,"change").map((function(t){return t.target.value})),b=Gu.Ay.merge([_,g,y]),w=b.map((function(t){return!!t})),S=Gu.Ay.merge([m,w]),E={email:b};l&&f.reduce((function(t,e){var n=e.key,r=e.userDoesConsent,i=e.userDoesNotConsent;return t[n]=S.map((function(t){return t?r:i})),t}),E);var O=Gu.Ay.fromEvents(h,"blur",(function(){return{type:Qu}})),k=Gu.Ay.fromEvents(h,"keydown",(function(){return{type:tc}})).take(1),A=Gu.Ay.fromEvents(h,"focus",(function(){return{type:Xu}})),T=Gu.Ay.merge([O,k,A]).map((function(t){return cl(cl({},t),{},{name:i,html_id:p,field_type:o})}));return{el:nl(t,h,e),ev:E,telemetryStream:T,validations:v}},function(t,e,n){var r=e.salt,i=e.name,o=e.type,a=e.hidden,s=e.required,u=n||{},c=u.includeImpliedConsent,l=void 0===c||c,d=u.impliedConsentData,f=void 0===d?[Dl(Dl({},Wc),{},{key:"do_not_call"})]:d,h=t.createElement("input"),p="".concat(r||"","phone-field-").concat(i);h.setAttribute("id",p),h.setAttribute("name",i),h.setAttribute("value",""),a?h.setAttribute("type","hidden"):(h.setAttribute("type","tel"),s&&Hc(h)),h.className="control";var v=Gu.Ay.constant(!1),m=Gu.Ay.constant(""),_=Gu.Ay.fromEvents(h,"keyup").map((function(t){return t.target.value})),g=Gu.Ay.fromEvents(h,"change").map((function(t){return t.target.value})),y=Gu.Ay.merge([m,_,g]),b=y.map((function(t){return!!t})),w=Gu.Ay.merge([v,b]),S={phone:y};l&&f.reduce((function(t,e){var n=e.key,r=e.userDoesConsent,i=e.userDoesNotConsent;return t[n]=w.map((function(t){return t?r:i})),t}),S);var E=Gu.Ay.fromEvents(h,"blur",(function(){return{type:Qu}})),O=Gu.Ay.fromEvents(h,"keydown",(function(){return{type:tc}})).take(1),k=Gu.Ay.fromEvents(h,"focus",(function(){return{type:Xu}})),A=Gu.Ay.merge([E,O,k]).map((function(t){return Dl(Dl({},t),{},{name:i,html_id:p,field_type:o})}));return{el:nl(t,h,e),ev:S,telemetryStream:A,validations:[]}},function(t,e,n){var r=t.createElement("div"),i="".concat(e.salt||"","info-text-submit-field-").concat(e.name);return r.setAttribute("id",i),r.appendChild(Jc(t,n.text)),r.classList.add("u--align-left","u--padding-top-2","u--font-size-0875","info-text"),e.hidden&&r.classList.add("u--hide"),{el:r,ev:Gu.Ay.never(),telemetryStream:Gu.Ay.never(),validations:[]}}];const Bl=Fl;var Vl=["password"],zl={password:"Password is missing the following required criteria:"};function ql(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Hl(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ql(Object(n),!0).forEach((function(e){r(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ql(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var Gl={BLOCK:"__validation_errors",HEADER:"__validation_errors_header"},Yl=function(t){for(var e=0;e<t.length;e++){var n=t[e];"email"===n.name?t[e]=Hl(Hl({},n),{},{type:16}):"phone"===n.name&&(t[e]=Hl(Hl({},n),{},{type:17}))}return t};function Kl(e,n,r){var i=[],o=[],a={},s=[];for(n.forEach((function(n){var u=r.getFeatureFlag("formType")===uc?function(e,n){var r=n.current(),i=Object.prototype.hasOwnProperty.call(r,e.name),o=r[e.name];i&&e.value&&(!{0:!0,18:!0}[e.type]?{1:!0}[e.type]?e.value=o:{4:!0,11:!0}[e.type]?"radio"===e.value.format?e.value.defaultRadio=o:"checkbox"===e.value.format&&""!==o&&(e.value.defaultChecked=!!o):{2:!0,3:!0,5:!0,6:!0,10:!0,14:!0}[e.type]&&(e.value.defaultOption="object"===(0,t.A)(o)?"":o):e.value.text=o);return e.value}(n,r):n.value,c=(Bl[n.type]||xl)(e.ownerDocument,n,u);i=i.concat(c.el),c.ev.offValue?a[n.name]=c.ev:(a[n.name]=c.ev._,Object.keys(c.ev).filter((function(t){return"_"!==t})).forEach((function(t){a[t]=c.ev[t]}))),c.telemetryStream&&s.push(c.telemetryStream),o=o.concat(c.validations)}));e.firstChild;)e.removeChild(e.firstChild);return i.filter((function(t){return t})).forEach((function(t){e.appendChild(t)})),{streams:a,telemetryStream:Gu.Ay.merge(s),validations:o}}function Wl(t){var e=t.getElementById(Gl.HEADER);e&&e.focus()}function $l(t,e,n){var r=t.createElement(e);return Object.keys(n).forEach((function(t){r.setAttribute(t,n[t])})),r}function Zl(t,e,n,r){n.filter((function(t){return!e.includes(t)})).forEach((function(e){t.getElementById(e).parentElement.classList.remove(r)})),e.forEach((function(e){t.getElementById(e).parentElement.classList.add(r)}))}function Jl(t,e,n){if(e.length){var r=t.ownerDocument,i=1===e.length?"The following item requires your attention:":"The following ".concat(e.length," items require your attention"),o=$l(r,"div",{id:Gl.HEADER,class:"h4 u--text-danger",role:"heading",tabindex:"-1","aria-level":"2"});o.appendChild(r.createTextNode(i));for(var a=$l(r,"div",{class:"card__body"}),s=$l(r,"div",{id:Gl.BLOCK,class:"u--border-danger u--border-left u--padding-2",tabindex:"-1",role:"dialog","aria-describedBy":Gl.BLOCK,"aria-label":"Errors",style:"display: block; border-left-width: 3px;"}),u={},c=e.reduce((function(t,e){var n=e.source.name;return Vl.includes(n)?Object.keys(u).includes(n)?t[u[n]].push(e):(u[n]=t.length,t.push([e])):t.push(e),t}),[]),l=[o].concat(c.map((function(t){return function(t,e){if(Array.isArray(e))return function(t,e){var n=Hl(Hl({},e[0]),{},{error:zl[e[0].source.name]}),r=Ql(t,n),i=$l(t,"ul",{class:"u--text-danger u--margin-bottom-0"});return e.forEach((function(e){var n=t.createElement("li");n.innerHTML=Xl(e.error),i.appendChild(n)})),r.appendChild(i),r}(t,e);return Ql(t,e)}(r,t)}))),d=!1;t.firstChild;)t.removeChild(t.firstChild),d=!0;l.forEach((function(t){s.appendChild(t)})),a.appendChild(s),t.appendChild(a),d||Wl(r),Zl(r,e.filter((function(t){return"element"===t.source.type})).map((function(t){return t.source.id})),n,["is--invalid"])}else{for(var f=!1;t.firstChild;)f=!0,t.removeChild(t.firstChild);f&&Zl(t.ownerDocument,[],n,["is--invalid"])}}var Xl=function(t){return t.split(/(\[--.*?\[*--])/g).map((function(t){return t.match(/\[--.*?:.*?].*?\[.*?]/)?t.match(/\](.*)\[/)[1]:t})).join("")};function Ql(t,e){var n,r=$l(t,"div",{}),i=$l(t,"label",{for:e.source.id,class:"is--invalid",style:"display-inline"}),o=$l(t,"a",{id:"linkto--".concat(e.source.id),href:"#",class:"u--text-danger"});return"element"===e.source.type&&(o.onclick=(n=e.source.focusElement||e.source.id,function(t){t.stopPropagation(),t.preventDefault(),t.target.ownerDocument.getElementById(n).focus()})),o.appendChild(t.createTextNode(Xl(e.error))),i.appendChild(o),r.appendChild(i),r}var td=[function(t){var e=t.pop(),n=t.pop();return t.push(n===e),t},function(t){var e=t.pop(),n=t.pop();return t.push(n!==e),t},function(t){var e=t.pop(),n=t.pop();return t.push(n>e),t},function(t){var e=t.pop(),n=t.pop();return t.push(n>=e),t},function(t){var e=t.pop(),n=t.pop();return t.push(n<e),t},function(t){var e=t.pop(),n=t.pop();return t.push(n<=e),t},function(t){var e=t.pop();return t.push(!e),t},function(t){var e=t.pop(),n=t.pop();return t.push(n&&e),t},function(t){var e=t.pop(),n=t.pop();return t.push(n||e),t}];function ed(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if("string"==typeof t){if(t.toLowerCase().startsWith("state.")){var r=e[t.slice(6)];return void 0===r?{ready:!0,element:t}:r&&"function"==typeof r.pending_value?{ready:!1}:{ready:!0,element:r}}if(t.startsWith("$"))return{ready:!0,element:n[t]}}return{ready:!0,element:t}}const nd=function(t,e,n){for(var r=[],i=0;i<t.length;i++){var o=t[i];if("number"==typeof o.op)td[o.op](r);else{var a=ed(o.data,e,n);if(!a.ready)return{ready:!1};r.push(a.element)}}return{ready:!0,result:r[0]}};function rd(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function id(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?rd(Object(n),!0).forEach((function(e){r(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):rd(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function od(t,e){return nd(e,t.current(),{})}const ad=[function(t,e,n){var r=id({},n),i=od(t,e);return i.ready?(i.result?r.hidden=!1:r.hidden=!0,{ready:!0,result:r}):{ready:!1,result:{}}},function(t,e,n){var r=od(t,e);return r.ready?r.result?{ready:!0,result:n}:{ready:!0,result:null}:{ready:!1,result:{}}},function(t,e,n,r){var i=od(t,e);if(!i.ready)return{ready:!1,result:{}};if(i.result){var o=r.split("=");if(o.length<2)return{ready:!0,result:n};o.length>2&&(o[0]=o.slice(1).join("=")),t.set(o[0],o[1])}return{ready:!0,result:n}},function(t,e,n){var r=id({},n),i=od(t,e);return i.ready?(i.result&&(r.required=!1),{ready:!0,result:r}):{ready:!1,result:{}}},function(t,e,n){var r=id({},n),i=od(t,e);return i.ready?(i.result&&(r.required=!0),{ready:!0,result:r}):{ready:!1,result:{}}}];var sd=function(){function t(e,n,r,i,o,a,s){Pu(this,t),this.doc=e,this.progressBarMountElement=n,this.bigStepMountElement=a,this.smallStepMountElement=s,this.isQuiz=o,this.progressBarMountElement&&this.init(r,i)}return Nu(t,[{key:"initProgressBar",value:function(t,e){this.progressBarMountElement.classList.add("progress");var n=$l(this.doc,"div",{class:"progress__max"}),r=$l(this.doc,"div",{class:"progress__bar",role:"progressbar","aria-valuemin":0,"aria-valuemax":100});this.progressBar=r,n.appendChild(r),this.progressBarMountElement.appendChild(n),this.setFillWidth(t,e)}},{key:"init",value:function(t,e){if(this.isQuiz)this.initProgressBar(t,e),this.setQuizStepText(t,e);else{this.initProgressBar(t,e);var n=$l(this.doc,"div",{class:"progress__label",tabIndex:"-1"});this.standardStepLabel=n,this.progressBarMountElement.appendChild(n),this.setStandardStepText(t,e)}}},{key:"update",value:function(t,e){this.isQuiz?(this.setQuizStepText(t,e),this.bigStepMountElement.focus()):(this.setStandardStepText(t,e),this.standardStepLabel.focus()),this.setFillWidth(t,e)}},{key:"setStandardStepText",value:function(t,e){var n="Step ".concat(parseInt(t,10)+1," of ").concat(e);this.standardStepLabel.textContent=n,this.standardStepLabel.setAttribute("aria-label",n)}},{key:"setQuizStepText",value:function(t,e){var n="".concat(parseInt(t,10)+1," of ").concat(e),r='<h2 class="u--font-weight-700">Step '.concat(parseInt(t,10)+1,"<span class='u--font-weight-400 u--text-color-gray'> of ").concat(e,"</span></h2>");this.smallStepMountElement.innerHTML='<p class="u--font-weight-700">'.concat(parseInt(t,10)+1,"<span class='u--font-weight-400 u--text-color-gray'> of ").concat(e,"</span></p>"),this.smallStepMountElement.setAttribute("aria-label",n),this.bigStepMountElement.innerHTML=r,this.bigStepMountElement.setAttribute("aria-label","step ".concat(n))}},{key:"setFillWidth",value:function(t,e){var n=Math.min(Math.max(t/(e-1)*100,5),95);this.progressBar.style.width="".concat(n,"%"),this.progressBar.setAttribute("aria-valuenow",n)}}]),t}();const ud=sd;const cd={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};var ld,dd=new Uint8Array(16);function fd(){if(!ld&&!(ld="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return ld(dd)}for(var hd=[],pd=0;pd<256;++pd)hd.push((pd+256).toString(16).slice(1));function vd(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return hd[t[e+0]]+hd[t[e+1]]+hd[t[e+2]]+hd[t[e+3]]+"-"+hd[t[e+4]]+hd[t[e+5]]+"-"+hd[t[e+6]]+hd[t[e+7]]+"-"+hd[t[e+8]]+hd[t[e+9]]+"-"+hd[t[e+10]]+hd[t[e+11]]+hd[t[e+12]]+hd[t[e+13]]+hd[t[e+14]]+hd[t[e+15]]}const md=function(t,e,n){if(cd.randomUUID&&!e&&!t)return cd.randomUUID();var r=(t=t||{}).random||(t.rng||fd)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,e){n=n||0;for(var i=0;i<16;++i)e[n+i]=r[i];return e}return vd(r)};function _d(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}var gd=function(t){return t?"Opt In":"Opt Out"},yd=function(t){return t?"Opt Out":"Opt In"},bd=function(t){return t?"0":"1"},wd={call_opt_in:{getFrom:"do_not_call",fx:function(t){return yd(t)}},email_opt_in:{getFrom:"email_opt_out",fx:function(t){return yd(t)}},lead_share_opt_in:{getFrom:"gdprProspect2uOptIn",fx:function(t){var e=JSON.parse(t);return gd(e)}},lead_capture_form_url:{getFrom:"page_url",fx:function(t){return t}},sms_opt_in:{getFrom:"sms_opt_in",fx:function(t){return gd(t)}},gdpr_prospectpartner_opt_in:{getFrom:"gdpr_prospectpartner_opt_in",fx:function(t){return"true"===t}},country_inferred:{keepOldKey:!0,getFrom:"taxi_determined_geo",fx:function(t){return t}},ip_inferred_country:{keepOldKey:!0,getFrom:"taxi_determined_geo",fx:function(t){return t}}},Sd={Broad_All_Biz_Email_Opt_In:{getFrom:"lead_share_opt_in",fx:function(t){return t?"1":"0"}},consent_by_email_mktg:{getFrom:"email_opt_out",fx:function(t){return bd(t)}},consent_by_telephone:{getFrom:"do_not_call",fx:function(t){return bd(t)}},final_url:{getFrom:"page_url",fx:function(t){return t}},sms_opt_out:{getFrom:"sms_opt_in",fx:function(t){return bd(t)}},UUID:{getFrom:"uuid",fx:function(t){return t},defaultValue:md()},State:{getFrom:"state",fx:function(t){return t}}},Ed=function(t,e){for(var n=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?_d(Object(n),!0).forEach((function(e){r(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):_d(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},t),i=Object.entries(e),o=0;o<i.length;o++){var a=i[o][0],s=i[o][1],u=s.getFrom,c=Boolean(s.keepOldKey);u in n?n[a]=s.fx(n[u]):null!=s&&s.defaultValue&&(n[a]=s.fx(s.defaultValue)),a===u||c||delete n[u]}return n};function Od(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}var kd="";"production"!=="production".toLowerCase()&&(kd="stg.");var Ad="https://imq.".concat(kd,"2u.com/v2/interest-create"),Td="https://imq.".concat(kd,"2u.com/v2/interest-update");function xd(t){var e,n,i,o,a,s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:kc,u=s===kc?Ad:Td;!t.uuid&&window.TAXI_FORM&&window.TAXI_FORM.createAnalytics&&(e=window.TAXI_FORM.createAnalytics().getUserId(),t.uuid=e||"");if(function(t){return Boolean(t.rv_source)}(t)&&(t.rv_session_id=(null===(o=window)||void 0===o||null===(o=o._Cohesion)||void 0===o||null===(o=o.session)||void 0===o?void 0:o.sessionId)||Oc,!t.uuid&&(i=t.credential_type,Lc.includes(i))&&(t.uuid=(window.analytics&&window.analytics.user&&"function"==typeof window.analytics.user&&window.analytics.user().anonymousId&&"function"==typeof window.analytics.user().anonymousId&&(n=window.analytics.user().anonymousId()),n||""),!t.uuid))){zc(Gc(t,s),"Segment Anonymous ID could not be found for Red Ventures form.")}return a=t.credential_type===Rc?Ed(t,Sd):t.credential_type===Nc?Ed(t,wd):function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Od(Object(n),!0).forEach((function(e){r(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Od(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},t),fetch(u,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)}).then((function(t){return t.status>=400?t.json().then((function(t){throw t})):{success:!0}})).catch((function(t){return Cd(t)}))}var Cd=function(t){return{success:!1,error:{event:"imqSubmissionFailed",logMessage:"Interest Message Queue request failed with error: ".concat(JSON.stringify(t.message),", ").concat(JSON.stringify(t.validation_error)),uiMessageArray:[ac],rawError:t}}};function Id(t,e){return fetch(e+Ac,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)})}function Pd(t,e,n,r){return Rd.apply(this,arguments)}function Rd(){return(Rd=Fu(Hu().mark((function t(e,n,r,i){var o,a,s;return Hu().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:o=n+Tc,(a=r.createElement("form")).setAttribute("method","post"),a.setAttribute("action",o),a.setAttribute("id","sesame-callback-form"),(s=r.createElement("input")).setAttribute("id","sesame-callback-token-input"),s.setAttribute("type","text"),s.setAttribute("name","token"),s.setAttribute("value",e),a.appendChild(s),r.body.appendChild(a);try{a.submit()}catch(t){i[Ec.REQUEST_RESPONSE_ERROR]=t,zc(i,"Submission to Sesame callback endpoint failed with error ".concat(JSON.stringify(Vc(t))),"Submission to Sesame callback endpoint failed with error ".concat(JSON.stringify(Vc(t))))}case 13:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var Nd="stg.";"production"==="production".toLowerCase()&&(Nd="prod.");var Ld="https://tmq.".concat(Nd,"2u.com/v1/tmq");function Md(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Dd(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Md(Object(n),!0).forEach((function(e){r(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Md(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var jd=function(){function t(e){var r=e.enabled,i=void 0===r||r,o=e.globalScope,a=void 0===o?null:o,s=e.opts,u=void 0===s?{}:s,c=e.sink,l=void 0===c?null:c;Pu(this,t),i||(this.emitEvent=function(){}),this.sink=l||this.defaultSink,this.globalScope=a||window||n.g||{},this.opts=u,this.formTelemUUID=md()}return Nu(t,[{key:"defaultSink",value:function(t){return(e=t,fetch(Ld,{method:"POST",cors:"no-cors",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}).catch((function(t){return console.log(t)}))).then((function(t){return t.status&&t.status>=400?t.json().then((function(t){throw t})):t.json()})).catch((function(t){return console.log(t)}));var e}},{key:"emitEvent",value:function(t){var e=Dd(Dd({},t),{},{session:this.formTelemUUID,formId:this.opts.formId,grouping:this.opts.grouping,userAgent:this.opts.userAgent});return this.sink(e)}}]),t}();function Ud(t){return t.value&&t.value.text?t.value.text:""}function Fd(t){return t.value&&t.value.defaultOption?t.value.defaultOption:null}function Bd(t){return t.value}function Vd(){return""}var zd=[Ud,Bd,Fd,Fd,Vd,Bd,Bd,function(){},function(){return""},function(t){return t.value?t.value.gdprOnly:"false"},Bd,Vd,function(t){return t.value&&t.value.degreeOffering?t.value.degreeOffering:""},Ud,Fd,function(t){return t.value?t.value.text:"never"},Bd,Bd,Ud];const qd=function(t){return zd[t]||Bd};function Hd(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Gd(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Hd(Object(n),!0).forEach((function(e){r(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Hd(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}const Yd=function(){function t(e){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Pu(this,t),this.fields=Gd(Gd({},r),{},{_errors:[]}),this.activeSubs={},this.subscribable={emit:function(){}},this.changeStream=Gu.Ay.stream((function(t){n.subscribable=t})),e.reduce((function(t,e){return e.conditionallyRendered||void 0!==t[e.name]||(t[e.name]=qd(e.type)(e)),t}),this.fields)}return Nu(t,[{key:"attachStreams",value:function(t){var e=this;Object.keys(t).forEach((function(n){t[n].onValue((function(t){e.fields[n]=t,e.subscribable.emit({name:n,value:t})}))}))}},{key:"set",value:function(t,e){this.fields[t]=e,this.subscribable.emit({name:t,value:e})}},{key:"get",value:function(t){return this.fields[t]}},{key:"current",value:function(){return this.fields}},{key:"observe",value:function(t){return this.activeSubs[t]||(this.activeSubs[t]={subscription:this.changeStream.filter((function(e){return e.name===t})).map((function(t){return t.value}))}),this.activeSubs[t].subscription}},{key:"observeMany",value:function(t,e){return e?this.changeStream.debounce(e).filter((function(e){return e&&t.includes(e.name)})):this.changeStream.filter((function(e){return t.includes(e.name)}))}},{key:"setFeatureFlags",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object.entries(e).forEach((function(e){var n=Du(e,2),r=n[0],i=n[1];t.set(qc(r),i)}))}},{key:"getFeatureFlag",value:function(t){return this.fields[qc(t)]}}]),t}();function Kd(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Wd(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Kd(Object(n),!0).forEach((function(e){r(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Kd(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var $d=function(){function t(){Pu(this,t)}return Nu(t,[{key:"getNthScreen",value:function(t){for(var e=0,n=0;n<t;n++){if("-1"===(e=Du(Object.keys(this.package.screens[e].out),1)[0]))return console.warn("Attempt to find screen number ".concat(n+1," found end of form")),0}return parseInt(e,10)}},{key:"getTaximeterEventByOrigin",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"nextButton";return{nextButton:Zu,forwardButton:this.anyRequiredFields()?Zu:Ju}[t]}},{key:"startTelemetry",value:function(){this.telemetryService.emitEvent({type:"started",grouping:this.package.grouping,formType:this.formAttributes.formType,degreeOffering:this.package.degreeOffering,htmlSalt:this.salt,url:this.doc.location,taxiPluginVersion:Iu,startStep:this.currentStepMarker,loopback:Object.prototype.hasOwnProperty.call(this.currentScreen.out,"0")})}},{key:"mountErrorLogger",value:function(t,e,n){"error"===t?console.error("Taxi can't ".concat(e,'. Template must include element with ID ending in "').concat(n,'".')):console.warn("Taxi can't ".concat(e,'. Template must include element with ID ending in "').concat(n,'".'))}},{key:"getEnvSubDomain",value:function(){var t="";return"development"==="production".toLowerCase()?t="dev.":"staging"==="production".toLowerCase()&&(t="stg."),t}},{key:"getGeo",value:function(){var t=this,e=Date.now(),n="https://geo.".concat(this.getEnvSubDomain(),"mktg.2u.com");return fetch(n).then((function(t){return t.status>=400?t.json().then((function(t){throw t})):t.json()})).then((function(n){var r=n.data||{};return Pc.includes(r.country_name)&&(r.is_restricted_geo=!0),t.dataStore.set("taxi_determined_geo",r.country_name||"undetermined"),t.dataStore.set("taxi_is_restricted",r.is_restricted_geo||!1),t.dataStore.set("_INTERNAL_carmen_sandiego_fetch_status",nc),t.dataStore.set("_INTERNAL_carmen_sandiego_fetch_value",r),r.is_restricted_geo?t.dataStore.set("no_klondike_carmen_sandiego_region","eu"):t.dataStore.set("no_klondike_carmen_sandiego_region","us"),ru.addTiming("taxi_plugin_csd_response",Date.now()-e),r})).catch((function(e){t.dataStore.set("taxi_determined_geo","undetermined"),t.dataStore.set("taxi_is_restricted",!1),t.dataStore.set("no_klondike_carmen_sandiego_region","us"),t.dataStore.set("_INTERNAL_carmen_sandiego_fetch_status",rc),t.dataStore.set("_INTERNAL_carmen_sandiego_fetch_value",e)}))}},{key:"initDataStore",value:function(){this.dataStore=new Yd(this.package.fields,this.presetFields),this.dataStore.set("no_klondike_carmen_sandiego_region",{pending_value:this.getGeo}),this.dataStore.set("_INTERNAL_carmen_sandiego_fetch_status",ec),this.dataStore.setFeatureFlags(this.package.featureFlags),this.validationErrorStream=this.dataStore.observe("_errors").onValue(this.renderErrors.bind(this))}},{key:"initBaseElements",value:function(){this.currentScreen=this.package.screens[this.startScreen],this.mountPoint.innerHTML=this.template,this.elementId={nextButton:"lead-form-next-action-button",errors:"lead-form-error-mount-point",fields:"lead-form-field-mount-point",footer:"lead-form-footer-mount-point",progress:"lead-form-progress-bar-mount-point"},this.fieldMountPoint=Uc(this.doc,this.salt,this.elementId.fields),this.errorMountPoint=Uc(this.doc,this.salt,this.elementId.errors),this.progressBarMountPoint=Uc(this.doc,this.salt,this.elementId.progress),this.nextButton=Uc(this.doc,this.salt,this.elementId.nextButton),this.footerMountPoint=Uc(this.doc,this.salt,this.elementId.footer)}},{key:"initQuizElements",value:function(){this.elementId=Wd(Wd({},this.elementId),{},{bigStepDisplay:"lead-form-big-step-display-mount-point",smallStepDisplay:"lead-form-small-step-display-mount-point",backButton:"lead-form-back-button",forwardButton:"lead-form-forward-button"}),this.bigStepDisplayMountPoint=Uc(this.doc,this.salt,this.elementId.bigStepDisplay),this.smallStepDisplayMountPoint=Uc(this.doc,this.salt,this.elementId.smallStepDisplay),this.backButton=Uc(this.doc,this.salt,this.elementId.backButton),this.forwardButton=Uc(this.doc,this.salt,this.elementId.forwardButton)}},{key:"makeFormMetadata",value:function(t,e){var n={credential_type:t.credentialType,form_id:t.id,programs_of_study:t.programsOfStudy,taxi_form_type:e.formType,user_agent:navigator.userAgent,version:"compiler: ".concat(t.version," plugin: ").concat(Iu)};return"BOOTCAMP"===n.credential_type&&t.universityProgramId&&(n.university_program_id=t.universityProgramId),n}},{key:"setSubmitTargets",value:function(){this.submitTargets=this.package.submitTargets?Wd(Wd({},ic),this.package.submitTargets):ic}},{key:"status",value:function(){return{currentScreen:this.currentScreen,dataStore:this.dataStore,submitted:this.submissionInProgress,klondikeOpts:this.klondikeOpts}}},{key:"isScreenValid",value:function(){var t=this,e=this.dataStore.get("_errors").reduce((function(t,e){return t+e.error}),""),n=this.activeValidations.map((function(e){return e.validation(t.dataStore)})).filter((function(t){return!t.ok}));return this.suppressValidationErrors||e!==n.reduce((function(t,e){return t+e.error}),"")&&this.dataStore.set("_errors",n),0===n.length}},{key:"handleInvalidEngineVariables",value:function(){this.telemetryService.emitEvent({type:"screenTransitionNextFailed",step:this.currentStepMarker}),this.emitEngineEvent("nextScreenTransitionFailed",{multiFormIdentifier:this.salt,failureReason:"The screen is not valid for transition"}),this.validatedFieldWatchStream=this.dataStore.observeMany(this.activeValidations.map((function(t){return t.field})),250),this.validatedFieldWatchStream.onValue(this.isScreenValid)}},{key:"didFieldExistOnUserPath",value:function(t){var e=this.package.fields[t],n=this.package.screens.find((function(e){return e.allFields.includes(parseInt(t,10))})).conditional[t];if(!n)return!0;var r=n[0],i=n[2];return!!ad[r](this.dataStore,i,e).result}},{key:"handleThankYouPageRouting",value:function(){var t=this;Object.keys(this.package.thankYouPageURLs).forEach((function(e){var n=t.package.fields[e];if(t.didFieldExistOnUserPath(e)){var r=t.dataStore.get(n.name),i=t.package.thankYouPageURLs[e][r];i&&(t.hasSelectedTYRouteAnswer=!0,t.thankYouPageURL=i)}}))}},{key:"handleSkipLink",value:function(){var t=this.formAttributes,e=t.createStep,n=t.hasSkipLink,r="".concat(this.salt,"-skip-link"),i=this.currentStepMarker>e,o=!this.doc.getElementById(r);n&&i&&o&&this.addSkipLink(r)}},{key:"addSkipLink",value:function(t){var e=this,n=this.doc.createElement("a");if(n.id="".concat(this.salt,"-skip-link"),n.id=t,n.text="Skip",Object.assign(n.style,{display:"block",textAlign:"center",marginTop:"1rem"}),this.formAttributes.hardCodeSkipLink)return n.href=this.formAttributes.hardCodeSkipLink,void this.nextButton.after(n);n.href=this.thankYouPageURL;n.onclick=function(t){t.preventDefault(),e.package.thankYouPageURLs&&e.handleThankYouPageRouting(),e.telemetryService.emitEvent({type:Ju,step:e.currentStepMarker}).then((function(){window.location.assign(e.thankYouPageURL)})),setTimeout((function(){window.location.assign(e.thankYouPageURL)}),400)},this.nextButton.after(n)}}]),t}(),Zd=function(t){return{first_name:t.first_name,last_name:t.last_name,email:t.email,password:t.password}},Jd=function(t){var e=t.applyDomain,n=e?e.trim():"";return n.toLowerCase().startsWith("http")||(n="https://".concat(n)),n.endsWith("/")||(n="".concat(n,"/")),n},Xd=function(){var t=Fu(Hu().mark((function t(e,n,r,i,o,a,s,u){var c,l,d,f;return Hu().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,e("sesameSubmissionAttempt",{multiFormIdentifier:n}),c=Jd(i),l=Zd(a),o[Ec.SUBMISSION_URL]=c+Ac,t.next=7,Id(l,c);case 7:return d=t.sent,t.next=10,d.json();case 10:if(f=t.sent,!(d.status>=400)&&f.token){t.next=13;break}throw f;case 13:return Cu.logger.info("Request to the Sesame Signup Endpoint completed",o),o[Ec.SUBMISSION_URL]=c+Tc,t.abrupt("return",Pd(f.token,c,u,o));case 18:return t.prev=18,t.t0=t.catch(0),t.abrupt("return",s(t.t0,"sesameSubmissionFailed"));case 21:case"end":return t.stop()}}),t,null,[[0,18]])})));return function(e,n,r,i,o,a,s,u){return t.apply(this,arguments)}}(),Qd=function(t,e,n,i,o,a,s,u,c){var l=c.createElement("div");l.id="".concat(s.id,"-spinner"),l.setAttribute("class","spinner spinner--small"),s.prepend(l);var d=function(t){var e=t.form_id;return r(r(r(r(r(r(r({},Ec.USER_EMAIL,t.email||""),Ec.FORM_ID,null!=e?e:""),Ec.LEAD_SOURCE,t.lead_source||""),Ec.SUBMISSION_URL,""),Ec.INTEREST_SUBMISSION_ENDPOINT,"SESAME"),Ec.SUBMITTED_PAGE_HOST,t.submitted_page_host||""),Ec.TAXI_FORM_TYPE,t.taxi_form_type||"")}(i);return Cu.logger.info("Taxi Plugin attempting Sesame authentication",d),Xd(e,o,t,n,d,i,(function(t,n){var r;l.remove();var i="An unknown error occurred while trying to create a user. Please try again later.",u="submit",c="Unexpected error format received from Sesame Signup Endpoint (submission_url may be incorrect)";d[Ec.REQUEST_RESPONSE_ERROR]=t;var f=t.code&&t.errorInfo&&t.errorInfo.code||t.type&&t.code&&t.message,h=t.code&&t.errors&&t.message&&(null===(r=t.errors[0])||void 0===r?void 0:r.inputName);if(f)t.errorInfo&&"invalid_password"===t.errorInfo.code?(i="Password must be at least eight characters and contain three of the following: Uppercase Character, Lowercase Character, Number, Special Character",u="password",c="".concat(t.errorInfo.name,": ").concat(t.errorInfo.message)):t.errorInfo&&"invalid_signup"===t.errorInfo.code||"Duplicate username or email"===t.message?(i="A user with that email address already exists",u="email",c="".concat(t.errorInfo&&t.errorInfo.name?t.errorInfo.name:"BadRequestError",": ").concat(t.message)):c="".concat(t.errorInfo&&t.errorInfo.name?t.errorInfo.name:t.code,": ").concat(t.message);else if(h){var p;i=t.message,u=null===(p=t.errors[0])||void 0===p?void 0:p.inputName,c="".concat(t.message,", inputName:").concat(t.errors[0].inputName)}d[Ec.REQUEST_RESPONSE_ERROR_MSG]=c,zc(d,"Request to Sesame Signup Endpoint failed with error. ".concat(c),"Request to Sesame Signup Endpoint failed with error. ".concat(c)),e(n,{multiFormIdentifier:o,failureReason:t});var v=Wu.makeError(u,i);a.set("_errors",[].concat(ju(a.get("_errors")),[v])),s.disabled=!1,!1}),c)};function tf(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function ef(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?tf(Object(n),!0).forEach((function(e){r(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):tf(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function nf(e){var n=rf();return function(){var r,i=zu(e);if(n){var o=zu(this).constructor;r=Reflect.construct(i,arguments,o)}else r=i.apply(this,arguments);return function(e,n){if(n&&("object"===(0,t.A)(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return Bu(e)}(this,r)}}function rf(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(rf=function(){return!!t})()}var of=Ec.REQUEST_RESPONSE_ERROR,af=function(e){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Vu(t,e)}(i,e);var n=nf(i);function i(t){var e,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:document;return Pu(this,i),(e=n.call(this)).firstScreenRenderingTime=t.firstScreenRenderingTime,e.package=t.formPackage,e.experimentalTrialAttribs=t.formPackage.experimentalTrialAttributes,e.mountPoint=t.mountPoint,e.hostProvidedThankYouPageURL=t.thankYouURL,e.thankYouPageURL=t.thankYouURL,e.formAttributes=t.formAttributes,e.template=t.template,e.screenPath=[0],e.salt=t.salt,e.eventSubscriptions=t.eventSubscriptions||{},e.activeValidations=[],e.validatedFieldWatchStream=null,e.doc=o,e.klondikeOpts=r,e.currentStepMarker=t.startScreen||0,e.startScreen=e.getNthScreen(e.currentStepMarker),e.initialProgress=t.initialProgress||0,e.presetFields=t.presetFields,e.isScreenValid=e.isScreenValid.bind(Bu(e)),e.suppressValidationErrors=t.suppressValidationErrors,e.formMetadata=e.makeFormMetadata(e.package,e.formAttributes),e.telemetryService=new jd({enabled:t.telemetryEnabled,globalScope:o.defaultView,opts:{grouping:e.package.grouping,formId:e.formMetadata.form_id,userAgent:e.formMetadata.user_agent}}),e.engineEventStream=Gu.Ay.stream((function(t){e.engineEventEmitter=t})),e.engineEventStream.onValue((function(t){e.eventSubscriptions[t.type]&&e.eventSubscriptions[t.type](t)})),e}return Nu(i,[{key:"hasAcceptedCookieGroup",value:function(t,e){if(!t)return!0;var n=",C000".concat(e,",");return t.includes(n)}},{key:"subscribe",value:function(t,e){this.eventSubscriptions[t]=e}},{key:"unsubscribe",value:function(t){this.eventSubscriptions[t]=void 0}},{key:"getSubscription",value:function(t){return this.eventSubscriptions[t]}},{key:"emitEngineEvent",value:function(t,e){var n={campaign:this.dataStore.get("campaign_id"),creative_id:this.dataStore.get("creative_id"),ef_id:this.dataStore.get("ef_id"),lead_source:this.dataStore.get("lead_source"),landing_page:this.dataStore.get("landing_page"),permguid:this.dataStore.get("ignition_one_id"),sendid:this.dataStore.get("send_id")};Object.keys(n).forEach((function(t){return null==n[t]&&delete n[t]})),this.engineEventEmitter.emit({type:t,details:ef(ef({},e),{},{urlParams:n})})}},{key:"start",value:function(){this.initDataStore(),this.getGeo(),this.initBaseElements(),this.attachKefirToActionButton(this.nextButton),this.formAttributes.isQuizForm&&(this.initQuizElements(),this.attachKefirToActionButton(this.forwardButton),this.attachKefirToActionButton(this.backButton,!1)),this.emitEngineEvent("started",{multiFormIdentifier:this.salt}),this.startTelemetry(),this.setSubmitTargets(),this.renderProgress(),this.fieldMountPoint?this.renderState():this.mountErrorLogger("error","render form fields",this.elementId.fields)}},{key:"renderErrors",value:function(t){null!==this.errorMountPoint?Jl(this.errorMountPoint,t,this.activeValidations.map((function(t){return t.fieldId}))):this.mountErrorLogger("error","render form errors",this.elementId.errors)}},{key:"attachKefirToActionButton",value:function(e){var n=this,r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=this.formAttributes.createStep;e&&"object"===(0,t.A)(e)?Gu.Ay.fromEvents(e,"click").onValue(function(){var e=Fu(Hu().mark((function e(o){var a,s,u;return Hu().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(Wl(n.doc),!r){e.next=12;break}if(a="object"===(0,t.A)(n.currentScreen.out[-1]),s=n.currentStepMarker>=i,u=!0,!s||!n.isScreenValid()||a){e.next=9;break}return e.next=8,n.submitForm();case 8:u=e.sent;case 9:u&&n.transition(o.target.dataset.transitionOrigin),e.next=13;break;case 12:n.backTransition();case 13:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()):this.mountErrorLogger("error","find Next Step button",this.elementId.nextButton)}},{key:"passValuesFromCookies",value:function(){this.onScreenFields.forEach((function(t){if(Object.keys(sc).includes(t.result.name)){0!==t.result.type&&console.warn("".concat(t.result.name," is type ").concat(t.result.type,", not type 0 (text field). Only text fields support autofilling from cookie data."));var e=Mc("taxi-".concat(sc[t.result.name]));null!=e&&(t.result.value.text=e)}}))}},{key:"anyRequiredFields",value:function(){return this.onScreenFields.some((function(t){return!t.hidden&&t.required}))}},{key:"setForwardButtonText",value:function(){this.forwardButton.textContent=this.anyRequiredFields()?"Next >":"Skip for now >"}},{key:"setNavigationButtonsVisibility",value:function(){this.backButton.style.visibility=this.screenPath&&1!==this.screenPath.length?"visible":"hidden",this.forwardButton.style.visibility="object"===(0,t.A)(this.currentScreen.out[-1])?"hidden":"visible"}},{key:"removeFutureScreenFields",value:function(t){for(var e=this,n=function(n){for(var r=0;r<n.length;r++){var i=n[r],o=e.package.fields[i];delete t[o.name]}},r=this.currentStepMarker+1;r<=this.package.screens.length-1;r++){n(this.package.screens[r].allFields)}}},{key:"removeAbandonedConditionalFields",value:function(e){for(var n=[],r={},i=0;i<this.screenPath.length;i++)for(var o=this.screenPath[i],a=this.package.screens[o],s=a.allFields,u=a.conditional,c=0;c<s.length;c++){var l=s[c],d=this.package.fields[l];if("object"===(0,t.A)(u[l])){n.push(d.name);var f=u[l][0],h=u[l][2],p=ad[f](this.dataStore,h,d);p.result&&(r[p.result.name]=!0)}}n.forEach((function(t){r[t]||delete e[t]}))}},{key:"setNextButtonText",value:function(){var e=this.formAttributes,n=e.nonSubmitNonEnd,r=e.submitNonEnd,i=e.submitEnd,o=e.createStep;if("object"===(0,t.A)(this.currentScreen.out[-1]))this.nextButton.textContent=i;else if(void 0===o)this.nextButton.textContent=n;else{var a=this.currentStepMarker>=o;this.nextButton.textContent=a?r:n}}},{key:"resetFooterElement",value:function(t){if(!t.length&&this.footerMountPoint.firstChild)for(;this.footerMountPoint.firstChild;)this.footerMountPoint.removeChild(this.footerMountPoint.firstChild)}},{key:"renderState",value:function(){var e=this,n=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],r=this.currentScreen.allFields,i=this.currentScreen.conditional;if(this.setNextButtonText(),this.formAttributes.isQuizForm&&this.setNavigationButtonsVisibility(),this.onScreenFields=this.currentScreen.allFields.map((function(t){return e.package.fields[t]})).map((function(n,o){var a=r[o];return"object"!==(0,t.A)(i[a])?{ready:!0,result:n}:ad[i[a][0]](e.dataStore,i[a][2],n)})).filter((function(t){return null!==t.result})).map((function(t){return t.result.salt=e.salt,t})),this.passValuesFromCookies(),this.onScreenFields.filter((function(t){return!t.ready})).length)return window.setTimeout((function(){e.renderState()}),1e3);this.onScreenFields=this.onScreenFields.map((function(t){return t.result})),this.formAttributes.isQuizForm&&this.setForwardButtonText();var o=this.onScreenFields.filter((function(t){return!t.mountPoint||1===t.mountPoint})),a=this.onScreenFields.filter((function(t){return 2===t.mountPoint}));this.experimentalTrialAttribs&&Object.keys(this.experimentalTrialAttribs).includes("restricted-geo-implied-consent")&&(o=Yl(o));var s=Kl(this.fieldMountPoint,o,this.dataStore),u=s.streams,c=s.validations,l=s.telemetryStream;return this.resetFooterElement(a),a.length?(this.footerMountPoint&&"object"===(0,t.A)(this.footerMountPoint)?Kl(this.footerMountPoint,a,this.dataStore):this.mountErrorLogger("error","render form footer",this.elementId.footer),this.emitEngineEvent("footerContentRendered",{multiFormIdentifier:this.salt})):this.emitEngineEvent("noFooterContentRendered",{multiFormIdentifier:this.salt}),this.handleSkipLink(),this.handleAddingStepContextInfo(),this.dataStore.attachStreams(u),l.onValue((function(t){return e.telemetryService.emitEvent(t)})),this.activeValidations=c,o.filter((function(t){return!t.hidden})).length||(n?this.transition():this.backTransition()),this.firstScreenRenderingTime.hasAlreadyReported||(this.firstScreenRenderingTime.hasAlreadyReported=!0,ru.addTiming("taxi_plugin_rendering",Date.now()-this.firstScreenRenderingTime.startTime)),{}}},{key:"handleAddingStepContextInfo",value:function(){var t=this.formAttributes.contextForSteps;if(t){var e=jc(this.salt,"step-context-info"),n=this.doc.getElementById(e);n&&this.fieldMountPoint.removeChild(n);var r=t[this.currentStepMarker];if(r){var i=this.doc.createElement("p");i.id=e,i.textContent=r,i.style.marginBottom="1rem",this.fieldMountPoint.insertBefore(i,this.fieldMountPoint.firstChild);var o=this.fieldMountPoint.querySelector(".control");if(o){var a=o.getAttribute("aria-describedby")||"";o.setAttribute("aria-describedby",[a,e].join(" ").trim())}}}}},{key:"renderProgress",value:function(){this.package.screens.length>1&&(null!==this.progressBarMountPoint?this.progressBar=new ud(this.doc,this.progressBarMountPoint,this.initialProgress,this.package.screens.length,this.formAttributes.isQuizForm,this.bigStepDisplayMountPoint,this.smallStepDisplayMountPoint):this.mountErrorLogger("warn","render form progress",this.elementId.progress))}},{key:"handleInferredFields",value:function(){var t=this.package.inferredFields||{};if(t.country)if(this.dataStore.get("_INTERNAL_carmen_sandiego_fetch_status")===nc){var e=this.dataStore.get("_INTERNAL_carmen_sandiego_fetch_value");this.dataStore.set("country",e.country_name||"undetermined")}else this.dataStore.set("country","undetermined");t.zip_code&&this.dataStore.set("state_used_inferred_geo",!0),(t.zip_code||t.country)&&this.dataStore.set("country_used_inferred_geo",!0)}},{key:"createSubmissionPackage",value:function(){var t=this,e=this.formAttributes,n=e.createStep,r=e.isQuizForm,i=Object.keys(this.dataStore.current()).reduce((function(e,n){return n.startsWith("no_klondike_")||n.startsWith("_INTERNAL_")||(e[n]=t.dataStore.get(n)),e}),{}),o={page_url:window.location.href,submitted_page_host:window.location.host};r&&this.removeAbandonedConditionalFields(i),Number.isNaN(n)||this.removeFutureScreenFields(i);var a=ef(ef(ef(ef({},o),this.klondikeOpts.fields||{}),i),{},{_errors:void 0,submission_time_ms:Date.now()},this.formMetadata);if(window.Optanon)if(a.ot_category_4_consent=this.hasAcceptedCookieGroup(window.OptanonActiveGroups,4),"function"==typeof window.Optanon.getDataSubjectId){var s=window.Optanon.getDataSubjectId();s&&(a.ot_consent_id=s)}else{var u=Gc(a,kc,this.package);Cu.logger.warn("OneTrust is enabled on site, but could not collect a consentId",u)}return Mc("barnacle_do_not_sell")&&(a.barnacle_do_not_sell=!0),a}},{key:"navigateToThankYouPage",value:function(){var t=-1===this.thankYouPageURL.indexOf("?")?this.doc.location.search:"&".concat(this.doc.location.search.slice(1));return window.location.assign("".concat(this.thankYouPageURL).concat(t))}},{key:"submitForm",value:function(){var e=this,n=this.formAttributes.createStep;this.submissionInProgress=!0,this.handleInferredFields(),this.nextButton.disabled=!0,this.package.thankYouPageURLs&&this.handleThankYouPageRouting();var r=Number.isNaN(parseInt(n,10))||n===this.currentStepMarker?kc:"UPDATE",i=this.createSubmissionPackage();if(this.formAttributes.isAuthForm)return Qd(this.submitTargets,this.emitEngineEvent.bind(this),this.package,i,this.salt,this.dataStore,this.nextButton,this.submissionInProgress,this.doc);var o=Gc(i,r,this.package);return Cu.logger.info("Taxi Plugin attempting submission requests",o),i.credential_type||zc(o,"submissionPackage does not have credential_type","submissionPackage does not have credential_type"),Dc(oc,i,30,sc),this.emitEngineEvent("imqSubmissionAttempt",{multiFormIdentifier:this.salt}),xd(i,r).then((function(n){if(o[Ec.INTEREST_SUBMISSION_ENDPOINT]="IMQ",!n.success)return e.handleSubmissionErrors(o,n.error),!1;if(Cu.logger.info("Request to Interest Message Queue completed",o),"object"===(0,t.A)(e.currentScreen.out[-1])||e.shouldImmediatelyGoToThankYouPage()){try{e.navigateToThankYouPage()}catch(t){o[of]=t,zc(o,"Redirecting user to thank you page failed with error: ".concat(t.message),"Redirecting user to thank you page failed with error: ".concat(t.message))}return!1}return e.nextButton.disabled=!1,n.success})).catch((function(t){return e.handleSubmissionErrors(o,Cd(t))}))}},{key:"handleSubmissionErrors",value:function(t,e){var n=e.rawError,i=e.logMessage,o=e.uiMessageArray,a=e.event,s=ef(ef({},t),{},r({},of,n));zc(s,i,i),this.emitEngineEvent(a,{multiFormIdentifier:this.salt,failureReason:n});var u=o.map((function(t){return Wu.makeError("submit",t||ac)}));this.dataStore.set("_errors",[].concat(ju(this.dataStore.get("_errors")),ju(u))),this.submissionInProgress=!1,this.nextButton.disabled=!1}},{key:"shouldImmediatelyGoToThankYouPage",value:function(){var t=this.formAttributes,e=t.createStep,n=t.shouldFillOutUpdateSteps;return this.hasSelectedTYRouteAnswer&&e<=this.currentStepMarker&&!n}},{key:"updateScreenPath",value:function(t,e){t&&"-1"!==e&&this.screenPath.push(parseInt(e,10))}},{key:"renderNewScreen",value:function(t,e){this.currentScreen=this.package.screens[parseInt(t,10)],this.telemetryService.emitEvent({type:this.getTaximeterEventByOrigin(e),step:this.currentStepMarker}),this.emitEngineEvent($u,{multiFormIdentifier:this.salt}),this.renderState(),this.progressBar&&this.progressBar.update(this.currentStepMarker,this.package.screens.length)}},{key:"transition",value:function(t){var e=this;this.validatedFieldWatchStream&&this.validatedFieldWatchStream.offValue(this.isScreenValid);var n={$valid:this.isScreenValid()};n.$valid?this.currentStepMarker+=1:this.handleInvalidEngineVariables();var r=Object.keys(this.currentScreen.out)[0],i=Du(this.currentScreen.out[r],2),o=i[0],a=i[1];if("$next"===o){this.updateScreenPath(n.$valid,r);var s=nd(a,this.dataStore.current(),n);s.ready?s.result&&"-1"===r?(this.telemetryService.emitEvent({type:"interestSubmit"}),this.submitForm()):s.result&&this.renderNewScreen(r,t):(this.telemetryService.emitEvent({type:"screenTransitionWait"}),setTimeout((function(){e.transition()}),1e3))}}},{key:"backTransition",value:function(){this.dataStore.set("_errors",[]),this.currentStepMarker-=1,this.screenPath.pop();var t=this.screenPath[this.screenPath.length-1]||0;this.currentScreen=this.package.screens[t],this.telemetryService.emitEvent({type:"screenTransitionBack",step:this.currentStepMarker}),this.emitEngineEvent($u,{multiFormIdentifier:this.salt}),this.renderState(!1),this.progressBar&&this.progressBar.update(this.currentStepMarker,this.package.screens.length)}}]),i}($d);const sf=af;function uf(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}var cf={ef_id:"ef_id",l:"landing_page",c:"creative_id",permguid:"ignition_one_id",campaign:"campaign_id",sendid:"send_id",s:"lead_source",lsrc:"lead_source",utm_source:"lead_source",utm_term:"utm_term",utm_AdID:"utm_AdID",utm_AdSetID:"utm_AdSetID",utm_CampaignID:"utm_CampaignID",utm_adgroupid:"utm_adgroupid",utm_adsetname:"utm_adsetname",utm_campaign:"utm_campaign",utm_campaignname:"utm_campaignname",utm_content:"utm_content",utm_cost:"utm_cost",utm_creative:"utm_creative",utm_device:"utm_device",utm_locationphysicalms:"utm_locationphysicalms",utm_matchtype:"utm_matchtype",utm_medium:"utm_medium",utm_network:"utm_network",utm_placement:"utm_placement",gclid:"GCLID",fbclid:"facebook_click_id"};function lf(t){var e=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?uf(Object(n),!0).forEach((function(e){r(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):uf(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},cf);return"BOOTCAMP"===t&&(e.utm_source="utm_source",e.lead_source="lead_source"),e}var df=n(56654),ff=(window.TextEncoder||df.TextEncoder,window.TextDecoder||df.TextDecoder);!function(){for(var t=[],e="A".charCodeAt(0),n="a".charCodeAt(0),r="0".charCodeAt(0),i=0;i<26;++i)t.push(String.fromCharCode(e+i));for(var o=0;o<26;++o)t.push(String.fromCharCode(n+o));for(var a=0;a<10;++a)t.push(String.fromCharCode(r+a));t.push("+"),t.push("/")}();function hf(t){return new ff("utf-8").decode(function(t){for(var e,n=t.replace(/[^A-Za-z0-9+/]/g,""),r=Math.ceil(3*n.length+1>>2),i=new Uint8Array(r),o=0,a=0,s=0;s<n.length;s++){var u=3&s;if(a|=((e=n.charCodeAt(s))>64&&e<91?e-65:e>96&&e<123?e-71:e>47&&e<58?e+4:43===e?62:47===e?63:0)<<18-6*u,3===u||n.length-s==1){for(var c=0;c<3;c++)i[o++]=a>>>(16>>>c&24)&255;a=0}}return i}(t))}var pf=function(t,e,n){if(!n)return t;var r=function(t,e){var n=(new DOMParser).parseFromString(t,"text/html"),r=Uc(n,e,"title"),i=Uc(n,e,"intro_text"),o=Uc(n,e,"intro_sub_text");return{title:r&&r.textContent,introText:i&&i.textContent,introSubText:o&&o.textContent}}(t,e),i=r.title,o=r.introText;return n===uc?function(t,e,n){return'\n  <div class="lead_forms_widget lead_forms_widget_inline u--background-light quiz-template">\n      <div id="'.concat(jc(t,"lead-form-dialog"),'" class="card quiz-card">\n          <div class="quiz-body">\n              <div class="form-message quiz-header">\n                  <div class="header-wrapper">\n                      <h2\n                          id="').concat(jc(t,"title"),'"\n                          class="h3 u--font-weight-400 u--text-color-primary"\n                      >\n                          ').concat(e,'\n                      </h1>\n                  </div>\n                  <p id="').concat(jc(t,"intro_text"),'">').concat(n,'</p>\n              </div>\n              <div class="form-body quiz-form-body">\n                  <div name="leadForm" class="lead-form quiz-lead-form validate form-vertical" onsubmit="">\n                      <div\n                          id="').concat(jc(t,"lead-form-big-step-display-mount-point"),'"\n                          class="big-step-display" tabindex="-1"\n                      >\n                      </div>\n                      <div id="').concat(jc(t,"lead-form-error-mount-point"),'"></div>\n                      <div class="lead-form-steps auto-wrapper">\n                          <div id="').concat(jc(t,"lead-form-field-mount-point"),'"></div>\n                          <button\n                              id="').concat(jc(t,"lead-form-next-action-button"),'"\n                              class="lead-form-next-step button button--theme-cta button--block quiz-main-next"\n                              data-transition-origin=\'nextButton\'\n                          >\n                              Next\n                          </button>\n                      </div>\n                  </div>\n              </div>\n          </div>\n\n          <div id="').concat(jc(t,"footer"),'" class="u--margin-top-4 quiz-footer-container">\n              <div id="').concat(jc(t,"lead-form-progress-bar-mount-point"),'" class="quiz-progress-bar"></div>\n              <div class="straight-line"></div>\n              <div class="quiz-navigation u--show-flex u--justify-space-between u--align-items-center">\n                  <button\n                      id="').concat(jc(t,"lead-form-back-button"),'"\n                      class="lead-form-previous-step button button--hover u--text-color-primary"\n                      data-transition-origin=\'backButton\'\n                  >\n                      < Back\n                  </button>\n                  <div\n                      id="').concat(jc(t,"lead-form-small-step-display-mount-point"),'"\n                      class="small-step-display progress__label"\n                      tabindex="-1"\n                  >\n                  </div>\n                  <button\n                      id="').concat(jc(t,"lead-form-forward-button"),'"\n                      class="lead-form-next-step button button--hover u--text-color-primary"\n                      data-transition-origin=\'forwardButton\'\n                  >\n                      Next >\n                  </button>\n            </div>\n            <div id="').concat(jc(t,"lead-form-footer-mount-point"),'" class="quiz-footer-mount-point"></div>\n          </div>\n      </div>\n  </div>\n  ')}(e,i,o):t};function vf(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function mf(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?vf(Object(n),!0).forEach((function(e){r(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):vf(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var _f=function(t){var e,n,r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=JSON.parse(JSON.stringify(i)),a={};e=t.submitTargets,Boolean(e&&e.sesame)&&(a.isAuthForm=!0),n=t.featureFlags,Boolean(n&&n.formType===uc)&&(a.isQuizForm=!0),r=t.formAttributesConfig,Boolean(r&&void 0!==r.createStep)&&(a.isProgressiveForm=!0),function(t){var e=!!t.wasEmbedMounted;return e&&delete t.wasEmbedMounted,e}(o)&&(a.isEmbedForm=!0),function(t){return t.isExecEdForm}(o)&&(a.isExecEdForm=!0),function(t){return t.credentialType===Nc}(t)&&(a.isShortCourseForm=!0);var s,u,c,l,d,f,h=(u=(s=a).isAuthForm,c=s.isProgressiveForm,l=s.isQuizForm,d=s.isEmbedForm,f=s.isExecEdForm,d?c?hc:u?pc:vc:u?dc:c?lc:l?uc:f?fc:cc);return h===cc&&(a.isStandardForm=!0),mf(mf(mf({},o),a),{},{formType:h})};function gf(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function yf(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?gf(Object(n),!0).forEach((function(e){r(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):gf(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var bf=function(t){var e=t.formAttributesConfig,n=_f(t,e);return n=function(t){return t.isQuizForm?yf(yf({},t),{},{templateOverride:uc}):t}(n=function(t){var e="Next Step",n="Submit";return t.isShortCourseForm&&!t.isEmbedForm&&(n="Request more info"),t.isProgressiveForm&&(n="Submit and Complete"),t.isAuthForm&&(n="Start Application"),t.isQuizForm&&(e="Next"),yf(yf({},t),{},{nonSubmitNonEnd:t.nonSubmitNonEnd||e,submitNonEnd:t.submitNonEnd||"Submit and Continue",submitEnd:t.submitEnd||n})}(n))},wf=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,n=arguments.length>1?arguments[1]:void 0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];Pu(this,t),this.firstScreenRenderingTime={startTime:Date.now(),hasAlreadyReported:!1},this.doc=e,this.mpElement=this.doc.getElementById(n),this.opts=r,this.salt=this.getSalt(this.opts),this.packageType=r.packageType||this.mpElement.getAttribute("data-package-type"),this.formPackage=r.package||this.getPackage(),this.formAttributes=bf(this.formPackage),this.templateType=r.templateType||this.mpElement.getAttribute("data-template-type"),this.template=r.template||this.getTemplate(),this.thankYouURL=r.thankYouURL||this.mpElement.getAttribute("data-thank-you-url"),this.startScreen=r.startScreen||0,this.initialProgress=r.initialProgress||0,this.telemetryEnabled=r.telemetryEnabled||!0,this.engineEventListeners=r.engineEventListeners,this.suppressValidationErrors=r.suppressValidationErrors,this.presetFields=this.getPresetFields(r.hostPresetFields),this.klondikeOpts=this.getMountOpts(r,this.formPackage,i)}return Nu(t,[{key:"getSalt",value:function(t){return t.salt||this.mpElement.getAttribute("data-salt")||new Array(10).fill(!0).map((function(){var t=Math.floor(26*Math.random());return String.fromCharCode(97+t)})).join("")}},{key:"getElementTypePackage",value:function(){var t=this.opts.packageFrom||this.mpElement.getAttribute("data-package-location");try{return JSON.parse(this.doc.getElementById(t).innerText.trim())}catch(e){console.error("Taxi plugin could not parse JSON package from element with ID:",t,"Failed with:",e)}return""}},{key:"getPackage",value:function(){var t;return this.packageType===mc?t=this.getElementTypePackage():console.warn("Taxi doesn't know how to load from package type: ",this.packageType),t}},{key:"getElementTypeTemplate",value:function(){var t=this.opts.templateFrom||this.mpElement.getAttribute("data-template-location"),e=this.doc.getElementById(t),n="";if(e.dataset.encoded&&"base64"===e.dataset.encoded)try{n=hf(e.innerHTML.trim())}catch(t){return console.error("Taxi plugin could not parse an encoded template from element with ID: ".concat(this.templateFrom,". Failed with: ").concat(t)),""}else n=e.innerHTML.trim();return pf(n,this.salt,this.formAttributes.templateOverride)}},{key:"getTemplate",value:function(){var t,e,n,r,i,o,a,s,u="";return this.templateType===gc?u=this.getElementTypeTemplate():this.templateType===yc?(t=this.salt,e=this.formPackage.embedFormData,n=e.title,r=void 0===n?"":n,i=e.introText,o=void 0===i?"":i,a=e.introSubText,s=void 0===a?"":a,u='\n<div class="lead_forms_widget lead_forms_widget_inline u--background-light">\n  <div id="'.concat(t,'-lead-form-dialog" class="card">\n    <div class="card__body">\n      <div class="form-message">\n        \x3c!-- Copy added from program config --\x3e\n        <div class="header-wrapper">\n          <h2 id="').concat(t,'-title" class="h3">').concat(r,'</h2>\n        </div>\n        <p id="').concat(t,'-intro_text">').concat(o,'</p>\n        <p id="').concat(t,'-intro_sub_text">').concat(s,'</p>\n      </div>\n        <div id="').concat(t,'-lead-form-progress-bar-mount-point"></div>\n    </div>\n    <div id="').concat(t,'-lead-form-error-mount-point"></div>\n    <div class="form-body steps">\n      <div name="leadForm" class="lead-form validate form-vertical" onsubmit="">\n        <div class="lead-form-steps auto-wrapper card__body u--border-top">\n          <div id="').concat(t,'-lead-form-field-mount-point"></div>\n        </div>\n        <div class="card__footer">\n          <button class="lead-form-next-step button button--theme-cta button--block" id="').concat(t,'-lead-form-next-action-button">Next Step</button>\n          <div id="').concat(t,'-lead-form-footer-mount-point"></div>\n        </div>\n      </div>\n    </div>\n  </div>\n</div>')):console.warn("Taxi doesn't know how to load from location type: ",this.templateType),u}},{key:"getPresetFields",value:function(t){var e=function(t){for(var e=lf(arguments.length>1&&void 0!==arguments[1]?arguments[1]:"DEGREE"),n=Object.keys(e),r=t.slice(1).split("&"),i={},o={},a=0;a<r.length;a++){var s=r[a].split("="),u=decodeURIComponent(s[0]).toLocaleLowerCase(),c=decodeURIComponent(s[1]||"");i[u]=c}for(var l=0;l<n.length;l++){var d=n[l],f=d.toLocaleLowerCase();void 0!==i[f]&&(o[e[d]]=i[f])}return o}(this.doc.location.search,this.formPackage.credentialType);return Object.assign({lead_source:"missingsource"},t,e)}},{key:"getMountOpts",value:function(t,e,n){var r=t.klondike||{fields:{}};return n&&e.degreeOffering&&r.fields&&(r.fields.degree_offering=e.degreeOffering),r}},{key:"start",value:function(){var t={formPackage:this.formPackage,template:this.template,telemetryEnabled:this.telemetryEnabled,startScreen:this.startScreen,initialProgress:this.initialProgress,salt:this.salt,formAttributes:this.formAttributes,mountPoint:this.mpElement,thankYouURL:this.thankYouURL,presetFields:this.presetFields,eventSubscriptions:this.engineEventListeners,suppressValidationErrors:this.suppressValidationErrors,firstScreenRenderingTime:this.firstScreenRenderingTime};this.engine=new sf(t,this.klondikeOpts,this.doc),this.engine.start()}}]),t}();const Sf=wf;function Ef(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Of(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Ef(Object(n),!0).forEach((function(e){r(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ef(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var kf=Ec.DEGREE_OFFERING,Af=Ec.FORM_ID,Tf=Ec.GROUPING,xf=Ec.PAGE_URL,Cf=Ec.PROGRAMS_OF_STUDY,If=Ec.STATUS_CODE,Pf=Ec.FETCH_URL,Rf=Ec.REQUEST_RESPONSE_ERROR,Nf=Ec.REQUEST_RESPONSE_ERROR_MSG,Lf=xc,Mf=Cc,Df=function(t,e){return e.map((function(e){var n=e.dataset,i=n.grouping,o=n.packageId,a=e.hasAttribute("data-grouping")?i:"all",s="Embedded form cannot fetch package ".concat(o," from grouping ").concat(a," for mount point with <div> id = ").concat(e.id,'. Please verify the embedded form snippet\'s "data-package-id" and "data-grouping" attributes have the correct values.'),u={dev:"https://prospect-form-packages.dev.2u.com",stg:"https://prospect-form-packages.stg.2u.com",prod:"https://prospect-form-packages.2u.com"}[Fc()],c="".concat(u,"/").concat(a,"/").concat(o,".json"),l=t.location.href,d={hasFailedFetch:!0},f=function(){return r(r(r(r({},Af,parseInt(o,10)),Tf,a),xf,l),Pf,c)};return t.taxiPluginPackagesCache[c]?t.taxiPluginPackagesCache[c]:fetch(c).then((function(e){if(e.ok){var n=e.json();return t.taxiPluginPackagesCache[c]=n,n}return function(t){var e=Of(Of({},f()),{},r({},If,t.status)),n=function(t,e){return"Fetching package failed for Package ".concat(t," on page ").concat(e)}(o,l);return zc(e,n,s),d}(e)})).catch((function(t){var e=Of(Of({},f()),{},r(r({},Nf,t.message),Rf,t));return zc(e,function(t,e){return"Fetch error occured for Package ".concat(t," on page ").concat(e)}(o,l),s),d}))}))},jf=function(t,e,n,i){!function(t){t.formAttributesConfig=t.formAttributesConfig||{},t.formAttributesConfig.wasEmbedMounted=!0}(e),function(t,e,n){var r=t.document.createElement("code");r.style="display:none;",r.id="".concat(n.id,"-package"),r.innerHTML=JSON.stringify(e),t.document.getElementsByTagName("body")[0].appendChild(r)}(t,e,n),function(t,e){var n=e.id,i=e.grouping,o=e.embedFormData,a=e.hasFailedFetch,s=e.applyDomain;if(a)return!1;var u=t.location.href,c=r(r(r(r(r({},Af,n),Tf,i),xf,u),kf,e.degreeOffering),Cf,e.programsOfStudy);return o?!(!o.thankYouURL&&!s&&(zc(c,function(t,e){return"thankYouURL is missing from Package ".concat(t," on page ").concat(e)}(n,u),"The Embedded package ".concat(n,' is missing the thankYouURL property. Please add it to the "Embeddable Form Data" section in Taxi, then save and publish the form.')),1)):(zc(c,function(t,e){return"embedFormData is missing from Package ".concat(t," on page ").concat(e)}(n,u),"The Embedded package ".concat(n,' is missing the embedFormData property. Please fill in the "Embeddable Form Data" section in Taxi, then save and publish the form.')),!1)}(t,e)&&(!function(t,e,n){var r,i,o={package:e,thankYouURL:e.embedFormData.thankYouURL||"",telemetryEnabled:!0};o.hostPresetFields={lead_source:(null==e||null===(r=e.embedFormData)||void 0===r?void 0:r.leadSource)||"embedmissingsource",splash_creative:(null==e||null===(i=e.embedFormData)||void 0===i?void 0:i.splashCreative)||""},new Sf(t.document,n.id,o).start(),t.embedFormsState[n.id]=Lf}(t,e,n),ru.addTiming("taxi_plugin_embed_rendering",Date.now()-i))},Uf=function(){var t=Fu(Hu().mark((function t(e,n){var r,i,o,a,s,u;return Hu().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r=n.filter((function(t){return!e.embedFormsState[t.id]&&(e.embedFormsState[t.id]=Mf,!0)})),i=Date.now(),t.next=4,Promise.all(Df(e,r));case 4:for(o=t.sent,a=0;a<o.length;a++)s=o[a],u=n[a],jf(e,s,u,i);return t.abrupt("return",!0);case 7:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}(),Ff=function(t){Bc(t).forEach((function(e){if(t.embedFormsState[e.id]!==Lf){var n=t.location.href,i="Failed to load Lead Form with mount point id of ".concat(e.id,". Please check the form implementation."),o="Failed to load embed form on page ".concat(n," with mount point id ").concat(e.id),a=r(r({},xf,n),"mount_point_id",e.id);zc(a,o,i)}}))},Bf=function(t){t.embedFormsLastHref=t.location.href,t.embedFormsState={},t.embedFormsLoadedTimeoutId&&clearTimeout(t.embedFormsLoadedTimeoutId),t.embedFormsLoadedTimeoutId=setTimeout(Ff,15e3,t)},Vf=function(t){return function(e){t.location.href!==t.embedFormsLastHref&&Bf(t);var n=e.filter((function(t){return"childList"===t.type})).flatMap((function(t){return Array.from(t.addedNodes)})).flatMap((function(t){return Bc(t)}));return n.length>0&&(Uf(t,n),n.length)}},zf=function(){var t=Fu(Hu().mark((function t(e){var n,r;return Hu().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!e.embedFormsLastHref){t.next=2;break}return t.abrupt("return");case 2:e.taxiPluginPackagesCache={};case 3:if(null!=e&&null!==(n=e.document)&&void 0!==n&&n.body){t.next=8;break}return t.next=6,new Promise((function(t){return setTimeout(t,100)}));case 6:t.next=3;break;case 8:if(Bf(e),!((r=Bc(e.document.body)).length>0)){t.next=13;break}return t.next=13,Uf(e,r);case 13:new e.MutationObserver(Vf(e)).observe(e.document.body,{childList:!0,subtree:!0});case 15:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),qf=n(85072),Hf=n.n(qf),Gf=n(15224),Yf={insert:"head",singleton:!1};Hf()(Gf.A,Yf);Gf.A.locals;function Kf(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Wf(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Kf(Object(n),!0).forEach((function(e){r(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Kf(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}window.LeadFormPlugin=Sf;var $f;$f={applicationId:"4cdae478-7066-472c-a520-b85f5cafa276",clientToken:"pubd373056d358f696ec764c7ede84c5de1",site:"datadoghq.com",service:"Taxi-Plugin",silentMultipleInit:!0,env:Fc(),version:Iu,sessionSampleRate:100,sessionReplaySampleRate:0},ru.init(Wf(Wf({},$f),{},{sessionReplaySampleRate:10,trackResources:!0})),Cu.init(Wf(Wf({},$f),{},{forwardErrorsToLogs:!1})),window.addEventListener("load",(function(){var t=window.document.getElementsByTagName("body")[0];if("self"===t.getAttribute("data-lead-form-mount")){var e=t.getAttribute("data-lead-form-mount-point");console.log("self mount detected, mounting at",e);var n={server:"https://prospects.api.2u.com/prospects",fields:{degree_offering:"unc-mba"}};window.LeadFormPlugin=new Sf(window.document,e,{klondike:n,telemetryEnabled:!0},!0),window.LeadFormPlugin.start();var r=document.getElementById("lead-forms-reset");r&&(r.onclick=function(){window.LeadFormPlugin=new Sf(window.document,e,{klondike:n,telemetryEnabled:!0},!0),window.LeadFormPlugin.start()})}})),zf(window)})()})();