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gEAAgE,yCAAyC,2CAA2C,+BAA+B,QAAQ,yBAAyB,gEAAgE,8GAA8G,aAA8G;AACl+oD","file":"vendor.launchdarkly-js-client-sdk.efddb20770221295b8d1.js","sourcesContent":["function e(e){function t(e,t){Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.message=e,this.code=t}return t.prototype=new Error,t.prototype.name=e,t.prototype.constructor=t,t}const t=e(\"LaunchDarklyUnexpectedResponseError\"),n=e(\"LaunchDarklyInvalidEnvironmentIdError\"),r=e(\"LaunchDarklyInvalidUserError\"),o=e(\"LaunchDarklyInvalidEventKeyError\"),i=e(\"LaunchDarklyInvalidArgumentError\"),a=e(\"LaunchDarklyFlagFetchError\");for(var s={LDUnexpectedResponseError:t,LDInvalidEnvironmentIdError:n,LDInvalidUserError:r,LDInvalidEventKeyError:o,LDInvalidArgumentError:i,LDInvalidDataError:e(\"LaunchDarklyInvalidDataError\"),LDFlagFetchError:a,isHttpErrorRecoverable:function(e){return!(e>=400&&e<500)||(400===e||408===e||429===e)}},c=function(e){var t=m(e),n=t[0],r=t[1];return 3*(n+r)/4-r},u=function(e){var t,n,r=m(e),o=r[0],i=r[1],a=new g(function(e,t,n){return 3*(t+n)/4-n}(0,o,i)),s=0,c=i>0?o-4:o;for(n=0;n>16&255,a[s++]=t>>8&255,a[s++]=255&t;2===i&&(t=f[e.charCodeAt(n)]<<2|f[e.charCodeAt(n+1)]>>4,a[s++]=255&t);1===i&&(t=f[e.charCodeAt(n)]<<10|f[e.charCodeAt(n+1)]<<4|f[e.charCodeAt(n+2)]>>2,a[s++]=t>>8&255,a[s++]=255&t);return a},l=function(e){for(var t,n=e.length,r=n%3,o=[],i=16383,a=0,s=n-r;as?s:a+i));1===r?(t=e[n-1],o.push(d[t>>2]+d[t<<4&63]+\"==\")):2===r&&(t=(e[n-2]<<8)+e[n-1],o.push(d[t>>10]+d[t>>4&63]+d[t<<2&63]+\"=\"));return o.join(\"\")},d=[],f=[],g=\"undefined\"!=typeof Uint8Array?Uint8Array:Array,v=\"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\",p=0;p<64;++p)d[p]=v[p],f[v.charCodeAt(p)]=p;function m(e){var t=e.length;if(t%4>0)throw new Error(\"Invalid string. Length must be a multiple of 4\");var n=e.indexOf(\"=\");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function h(e,t,n){for(var r,o,i=[],a=t;a>18&63]+d[o>>12&63]+d[o>>6&63]+d[63&o]);return i.join(\"\")}f[\"-\".charCodeAt(0)]=62,f[\"_\".charCodeAt(0)]=63;var y={byteLength:c,toByteArray:u,fromByteArray:l},w=Array.isArray,b=Object.keys,k=Object.prototype.hasOwnProperty,E=function e(t,n){if(t===n)return!0;if(t&&n&&\"object\"==typeof t&&\"object\"==typeof n){var r,o,i,a=w(t),s=w(n);if(a&&s){if((o=t.length)!=n.length)return!1;for(r=o;0!=r--;)if(!e(t[r],n[r]))return!1;return!0}if(a!=s)return!1;var c=t instanceof Date,u=n instanceof Date;if(c!=u)return!1;if(c&&u)return t.getTime()==n.getTime();var l=t instanceof RegExp,d=n instanceof RegExp;if(l!=d)return!1;if(l&&d)return t.toString()==n.toString();var f=b(t);if((o=f.length)!==b(n).length)return!1;for(r=o;0!=r--;)if(!k.call(n,f[r]))return!1;for(r=o;0!=r--;)if(!e(t[i=f[r]],n[i]))return!1;return!0}return t!=t&&n!=n};const D=[\"key\",\"ip\",\"country\",\"email\",\"firstName\",\"lastName\",\"avatar\",\"name\"];function C(e){const t=unescape(encodeURIComponent(e));return y.fromByteArray(function(e){const t=[];for(let n=0;n0;){for(o=[];i>0;){const e=n.shift();if(!e)break;i-=x(JSON.stringify(e)).length,i<0&&o.length>0?n.unshift(e):o.push(e)}i=e,r.push(o)}return r},clone:function(e){return JSON.parse(JSON.stringify(e))},deepEquals:function(e,t){return E(e,t)},extend:function(...e){return e.reduce(((e,t)=>({...e,...t})),{})},getLDUserAgentString:function(e){const t=e.version||\"?\";return e.userAgent+\"/\"+t},objectHasOwnProperty:P,onNextTick:function(e){setTimeout(e,0)},sanitizeContext:function(e){if(!e)return e;let t;return null!==e.kind&&void 0!==e.kind||D.forEach((n=>{const r=e[n];void 0!==r&&\"string\"!=typeof r&&(t=t||{...e},t[n]=String(r))})),t||e},transformValuesToVersionedValues:function(e){const t={};for(const n in e)P(e,n)&&(t[n]={value:e[n],version:0});return t},transformVersionedValuesToValues:function(e){const t={};for(const n in e)P(e,n)&&(t[n]=e[n].value);return t},wrapPromiseCallback:function(e,t){const n=e.then((e=>(t&&setTimeout((()=>{t(null,e)}),0),e)),(e=>{if(!t)return Promise.reject(e);setTimeout((()=>{t(e,null)}),0)}));return t?void 0:n}},O=new Uint8Array(16);function L(){if(!S&&!(S=\"undefined\"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||\"undefined\"!=typeof msCrypto&&\"function\"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error(\"crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported\");return S(O)}var U=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function T(e){return\"string\"==typeof e&&U.test(e)}for(var R,A,j=[],F=0;F<256;++F)j.push((F+256).toString(16).substr(1));function N(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(j[e[t+0]]+j[e[t+1]]+j[e[t+2]]+j[e[t+3]]+\"-\"+j[e[t+4]]+j[e[t+5]]+\"-\"+j[e[t+6]]+j[e[t+7]]+\"-\"+j[e[t+8]]+j[e[t+9]]+\"-\"+j[e[t+10]]+j[e[t+11]]+j[e[t+12]]+j[e[t+13]]+j[e[t+14]]+j[e[t+15]]).toLowerCase();if(!T(n))throw TypeError(\"Stringified UUID is invalid\");return n}var $=0,V=0;function H(e){if(!T(e))throw TypeError(\"Invalid UUID\");var t,n=new Uint8Array(16);return n[0]=(t=parseInt(e.slice(0,8),16))>>>24,n[1]=t>>>16&255,n[2]=t>>>8&255,n[3]=255&t,n[4]=(t=parseInt(e.slice(9,13),16))>>>8,n[5]=255&t,n[6]=(t=parseInt(e.slice(14,18),16))>>>8,n[7]=255&t,n[8]=(t=parseInt(e.slice(19,23),16))>>>8,n[9]=255&t,n[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,n[11]=t/4294967296&255,n[12]=t>>>24&255,n[13]=t>>>16&255,n[14]=t>>>8&255,n[15]=255&t,n}function q(e,t,n){function r(e,r,o,i){if(\"string\"==typeof e&&(e=function(e){e=unescape(encodeURIComponent(e));for(var t=[],n=0;n>>9<<4)+1}function K(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function _(e,t,n,r,o,i){return K((a=K(K(t,e),K(r,i)))<<(s=o)|a>>>32-s,n);var a,s}function J(e,t,n,r,o,i,a){return _(t&n|~t&r,e,t,o,i,a)}function z(e,t,n,r,o,i,a){return _(t&r|n&~r,e,t,o,i,a)}function B(e,t,n,r,o,i,a){return _(t^n^r,e,t,o,i,a)}function G(e,t,n,r,o,i,a){return _(n^(t|~r),e,t,o,i,a)}var W=q(\"v3\",48,(function(e){if(\"string\"==typeof e){var t=unescape(encodeURIComponent(e));e=new Uint8Array(t.length);for(var n=0;n>5]>>>o%32&255,a=parseInt(r.charAt(i>>>4&15)+r.charAt(15&i),16);t.push(a)}return t}(function(e,t){e[t>>5]|=128<>5]|=(255&e[r/8])<>>32-t}var Z=q(\"v5\",80,(function(e){var t=[1518500249,1859775393,2400959708,3395469782],n=[1732584193,4023233417,2562383102,271733878,3285377520];if(\"string\"==typeof e){var r=unescape(encodeURIComponent(e));e=[];for(var o=0;o>>0;w=y,y=h,h=Y(m,30)>>>0,m=p,p=E}n[0]=n[0]+p>>>0,n[1]=n[1]+m>>>0,n[2]=n[2]+h>>>0,n[3]=n[3]+y>>>0,n[4]=n[4]+w>>>0}return[n[0]>>24&255,n[0]>>16&255,n[0]>>8&255,255&n[0],n[1]>>24&255,n[1]>>16&255,n[1]>>8&255,255&n[1],n[2]>>24&255,n[2]>>16&255,n[2]>>8&255,255&n[2],n[3]>>24&255,n[3]>>16&255,n[3]>>8&255,255&n[3],n[4]>>24&255,n[4]>>16&255,n[4]>>8&255,255&n[4]]})),ee=Z;var te=Object.freeze({__proto__:null,v1:function(e,t,n){var r=t&&n||0,o=t||new Array(16),i=(e=e||{}).node||R,a=void 0!==e.clockseq?e.clockseq:A;if(null==i||null==a){var s=e.random||(e.rng||L)();null==i&&(i=R=[1|s[0],s[1],s[2],s[3],s[4],s[5]]),null==a&&(a=A=16383&(s[6]<<8|s[7]))}var c=void 0!==e.msecs?e.msecs:Date.now(),u=void 0!==e.nsecs?e.nsecs:V+1,l=c-$+(u-V)/1e4;if(l<0&&void 0===e.clockseq&&(a=a+1&16383),(l<0||c>$)&&void 0===e.nsecs&&(u=0),u>=1e4)throw new Error(\"uuid.v1(): Can't create more than 10M uuids/sec\");$=c,V=u,A=a;var d=(1e4*(268435455&(c+=122192928e5))+u)%4294967296;o[r++]=d>>>24&255,o[r++]=d>>>16&255,o[r++]=d>>>8&255,o[r++]=255&d;var f=c/4294967296*1e4&268435455;o[r++]=f>>>8&255,o[r++]=255&f,o[r++]=f>>>24&15|16,o[r++]=f>>>16&255,o[r++]=a>>>8|128,o[r++]=255&a;for(var g=0;g<6;++g)o[r+g]=i[g];return t||N(o)},v3:X,v4:function(e,t,n){var r=(e=e||{}).random||(e.rng||L)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var o=0;o<16;++o)t[n+o]=r[o];return t}return N(r)},v5:ee,NIL:\"00000000-0000-0000-0000-000000000000\",version:function(e){if(!T(e))throw TypeError(\"Invalid UUID\");return parseInt(e.substr(14,1),16)},validate:T,stringify:N,parse:H});const ne=[\"debug\",\"info\",\"warn\",\"error\",\"none\"];var re={commonBasicLogger:function(e,t){if(e&&e.destination&&\"function\"!=typeof e.destination)throw new Error(\"destination for basicLogger was set to a non-function\");function n(e){return function(t){console&&console[e]&&console[e].call(console,t)}}const r=e&&e.destination?[e.destination,e.destination,e.destination,e.destination]:[n(\"log\"),n(\"info\"),n(\"warn\"),n(\"error\")],o=!(!e||!e.destination),i=e&&void 0!==e.prefix&&null!==e.prefix?e.prefix:\"[LaunchDarkly] \";let a=1;if(e&&e.level)for(let t=0;t{};else{const n=e;c[t]=function(){s(n,t,arguments)}}}return c},validateLogger:function(e){ne.forEach((t=>{if(\"none\"!==t&&(!e[t]||\"function\"!=typeof e[t]))throw new Error(\"Provided logger instance must support logger.\"+t+\"(...) method\")}))}};function oe(e){return e&&e.message?e.message:\"string\"==typeof e||e instanceof String?e:JSON.stringify(e)}const ie=\" Please see https://docs.launchdarkly.com/sdk/client-side/javascript#initializing-the-client for instructions on SDK initialization.\";var ae={bootstrapInvalid:function(){return\"LaunchDarkly bootstrap data is not available because the back end could not read the flags.\"},bootstrapOldFormat:function(){return\"LaunchDarkly client was initialized with bootstrap data that did not include flag metadata. Events may not be sent correctly.\"+ie},clientInitialized:function(){return\"LaunchDarkly client initialized\"},clientNotReady:function(){return\"LaunchDarkly client is not ready\"},debugEnqueueingEvent:function(e){return'enqueueing \"'+e+'\" event'},debugPostingDiagnosticEvent:function(e){return\"sending diagnostic event (\"+e.kind+\")\"},debugPostingEvents:function(e){return\"sending \"+e+\" events\"},debugStreamDelete:function(e){return'received streaming deletion for flag \"'+e+'\"'},debugStreamDeleteIgnored:function(e){return'received streaming deletion for flag \"'+e+'\" but ignored due to version check'},debugStreamPatch:function(e){return'received streaming update for flag \"'+e+'\"'},debugStreamPatchIgnored:function(e){return'received streaming update for flag \"'+e+'\" but ignored due to version check'},debugStreamPing:function(){return\"received ping message from stream\"},debugPolling:function(e){return\"polling for feature flags at \"+e},debugStreamPut:function(){return\"received streaming update for all flags\"},deprecated:function(e,t){return t?'\"'+e+'\" is deprecated, please use \"'+t+'\"':'\"'+e+'\" is deprecated'},environmentNotFound:function(){return\"Environment not found. Double check that you specified a valid environment/client-side ID.\"+ie},environmentNotSpecified:function(){return\"No environment/client-side ID was specified.\"+ie},errorFetchingFlags:function(e){return\"Error fetching flag settings: \"+oe(e)},eventCapacityExceeded:function(){return\"Exceeded event queue capacity. Increase capacity to avoid dropping events.\"},eventWithoutContext:function(){return\"Be sure to call `identify` in the LaunchDarkly client: https://docs.launchdarkly.com/sdk/features/identify#javascript\"},httpErrorMessage:function(e,t,n){return\"Received error \"+e+(401===e?\" (invalid SDK key)\":\"\")+\" for \"+t+\" - \"+(s.isHttpErrorRecoverable(e)?n:\"giving up permanently\")},httpUnavailable:function(){return\"Cannot make HTTP requests in this environment.\"+ie},identifyDisabled:function(){return\"identify() has no effect here; it must be called on the main client instance\"},inspectorMethodError:(e,t)=>`an inspector: \"${t}\" of type: \"${e}\" generated an exception`,invalidContentType:function(e){return'Expected application/json content type but got \"'+e+'\"'},invalidData:function(){return\"Invalid data received from LaunchDarkly; connection may have been interrupted\"},invalidInspector:(e,t)=>`an inspector: \"${t}\" of an invalid type (${e}) was configured`,invalidKey:function(){return\"Event key must be a string\"},invalidContext:function(){return\"Invalid context specified.\"+ie},invalidTagValue:e=>`Config option \"${e}\" must only contain letters, numbers, ., _ or -.`,localStorageUnavailable:function(e){return\"local storage is unavailable: \"+oe(e)},networkError:e=>\"network error\"+(e?\" (\"+e+\")\":\"\"),optionBelowMinimum:(e,t,n)=>'Config option \"'+e+'\" was set to '+t+\", changing to minimum value of \"+n,streamClosing:function(){return\"Closing stream connection\"},streamConnecting:function(e){return\"Opening stream connection to \"+e},streamError:function(e,t){return\"Error on stream connection: \"+oe(e)+\", will continue retrying after \"+t+\" milliseconds.\"},tagValueTooLong:e=>`Value of \"${e}\" was longer than 64 characters and was discarded.`,unknownCustomEventKey:function(e){return'Custom event \"'+e+'\" does not exist'},unknownOption:e=>'Ignoring unknown config option \"'+e+'\"',contextNotSpecified:function(){return\"No context specified.\"+ie},unrecoverableStreamError:e=>`Error on stream connection ${oe(e)}, giving up permanently`,wrongOptionType:(e,t,n)=>'Config option \"'+e+'\" should be of type '+t+\", got \"+n+\", using default value\",wrongOptionTypeBoolean:(e,t)=>'Config option \"'+e+'\" should be a boolean, got '+t+\", converting to boolean\"};const{validateLogger:se}=re,ce={baseUrl:{default:\"https://app.launchdarkly.com\"},streamUrl:{default:\"https://clientstream.launchdarkly.com\"},eventsUrl:{default:\"https://events.launchdarkly.com\"},sendEvents:{default:!0},streaming:{type:\"boolean\"},sendLDHeaders:{default:!0},requestHeaderTransform:{type:\"function\"},sendEventsOnlyForVariation:{default:!1},useReport:{default:!1},evaluationReasons:{default:!1},eventCapacity:{default:100,minimum:1},flushInterval:{default:2e3,minimum:2e3},samplingInterval:{default:0,minimum:0},streamReconnectDelay:{default:1e3,minimum:0},allAttributesPrivate:{default:!1},privateAttributes:{default:[]},bootstrap:{type:\"string|object\"},diagnosticRecordingInterval:{default:9e5,minimum:2e3},diagnosticOptOut:{default:!1},wrapperName:{type:\"string\"},wrapperVersion:{type:\"string\"},stateProvider:{type:\"object\"},application:{validator:function(e,t,n){const r={};t.id&&(r.id=de(`${e}.id`,t.id,n));t.version&&(r.version=de(`${e}.version`,t.version,n));return r}},inspectors:{default:[]}},ue=/^(\\w|\\.|-)+$/;function le(e){return e&&e.replace(/\\/+$/,\"\")}function de(e,t,n){if(\"string\"==typeof t&&t.match(ue)){if(!(t.length>64))return t;n.warn(ae.tagValueTooLong(e))}else n.warn(ae.invalidTagValue(e))}var fe={baseOptionDefs:ce,validate:function(e,t,n,r){const o=I.extend({logger:{default:r}},ce,n),i={};function a(e){I.onNextTick((()=>{t&&t.maybeReportError(new s.LDInvalidArgumentError(e))}))}let c=I.extend({},e||{});return function(e){const t=e;Object.keys(i).forEach((e=>{if(void 0!==t[e]){const n=i[e];r&&r.warn(ae.deprecated(e,n)),n&&(void 0===t[n]&&(t[n]=t[e]),delete t[e])}}))}(c),c=function(e){const t=I.extend({},e);return Object.keys(o).forEach((e=>{void 0!==t[e]&&null!==t[e]||(t[e]=o[e]&&o[e].default)})),t}(c),c=function(e){const t=I.extend({},e),n=e=>{if(null===e)return\"any\";if(void 0===e)return;if(Array.isArray(e))return\"array\";const t=typeof e;return\"boolean\"===t||\"string\"===t||\"number\"===t||\"function\"===t?t:\"object\"};return Object.keys(e).forEach((i=>{const s=e[i];if(null!=s){const c=o[i];if(void 0===c)a(ae.unknownOption(i));else{const o=c.type||n(c.default),u=c.validator;if(u){const n=u(i,e[i],r);void 0!==n?t[i]=n:delete t[i]}else if(\"any\"!==o){const e=o.split(\"|\"),r=n(s);e.indexOf(r)<0?\"boolean\"===o?(t[i]=!!s,a(ae.wrongOptionTypeBoolean(i,r))):(a(ae.wrongOptionType(i,o,r)),t[i]=c.default):\"number\"===r&&void 0!==c.minimum&&sArray.isArray(r[e])?r[e].sort().map((t=>`${e}/${t}`)):[`${e}/${r[e]}`])).reduce(((e,t)=>e.concat(t)),[]).join(\" \")),n},transformHeaders:function(e,t){return t&&t.requestHeaderTransform?t.requestHeaderTransform({...e}):e}};const{v1:pe}=te,{getLDHeaders:me,transformHeaders:he}=ve;var ye=function(e,t,n){const r=\"/a/\"+t+\".gif\",o=I.extend({\"Content-Type\":\"application/json\"},me(e,n)),i=e.httpFallbackPing,a={};return a.sendChunk=(t,a,c,u)=>{const l=JSON.stringify(t),d=c?null:pe();return u?function t(r){const i=c?o:I.extend({},o,{\"X-LaunchDarkly-Event-Schema\":\"4\",\"X-LaunchDarkly-Payload-ID\":d});return e.httpRequest(\"POST\",a,he(i,n),l).promise.then((e=>{if(e)return e.status>=400&&s.isHttpErrorRecoverable(e.status)&&r?t(!1):function(e){const t={status:e.status},n=e.header(\"date\");if(n){const e=Date.parse(n);e&&(t.serverTime=e)}return t}(e)})).catch((()=>r?t(!1):Promise.reject()))}(!0).catch((()=>{})):(i&&i(a+r+\"?d=\"+I.base64URLEncode(l)),Promise.resolve())},a.sendEvents=function(t,n,r){if(!e.httpRequest)return Promise.resolve();const o=e.httpAllowsPost();let i;i=o?[t]:I.chunkEventsForUrl(2e3-n.length,t);const s=[];for(let e=0;e\"kind\"!==e));return i&&t.every((e=>be(e)))&&t.every((t=>{const n=e[t].key;return null!=n&&\"\"!==n}))}return i&&o}return!1},getContextKeys:function(e,t=we()){if(!e)return;const n={},{kind:r,key:o}=e;switch(r){case void 0:n.user=`${o}`;break;case\"multi\":Object.entries(e).filter((([e])=>\"kind\"!==e)).forEach((([e,t])=>{t&&t.key&&(n[e]=t.key)}));break;case null:t.warn(`null is not a valid context kind: ${e}`);break;case\"\":t.warn(`'' is not a valid context kind: ${e}`);break;default:n[r]=`${o}`}return n},getContextKinds:function(e){return e?null===e.kind||void 0===e.kind?[\"user\"]:\"multi\"!==e.kind?[e.kind]:Object.keys(e).filter((e=>\"kind\"!==e)):[]},getCanonicalKey:function(e){if(e){if((void 0===e.kind||null===e.kind||\"user\"===e.kind)&&e.key)return e.key;if(\"multi\"!==e.kind&&e.key)return`${e.kind}:${ke(e.key)}`;if(\"multi\"===e.kind)return Object.keys(e).sort().filter((e=>\"kind\"!==e)).map((t=>`${t}:${ke(e[t].key)}`)).join(\":\")}}};const{getContextKinds:De}=Ee;var Ce=function(){const e={};let t=0,n=0,r={},o={};return e.summarizeEvent=e=>{if(\"feature\"===e.kind){const i=e.key+\":\"+(null!==e.variation&&void 0!==e.variation?e.variation:\"\")+\":\"+(null!==e.version&&void 0!==e.version?e.version:\"\"),a=r[i];let s=o[e.key];s||(s=new Set,o[e.key]=s),function(e){return e.context?De(e.context):e.contextKeys?Object.keys(e.contextKeys):[]}(e).forEach((e=>s.add(e))),a?a.count=a.count+1:r[i]={count:1,key:e.key,version:e.version,variation:e.variation,value:e.value,default:e.default},(0===t||e.creationDaten&&(n=e.creationDate)}},e.getSummary=()=>{const e={};let i=!0;for(const t of Object.values(r)){let n=e[t.key];n||(n={default:t.default,counters:[],contextKinds:[...o[t.key]]},e[t.key]=n);const r={value:t.value,count:t.count};void 0!==t.variation&&null!==t.variation&&(r.variation=t.variation),void 0!==t.version&&null!==t.version?r.version=t.version:r.unknown=!0,n.counters.push(r),i=!1}return i?null:{startDate:t,endDate:n,features:e}},e.clearSummary=()=>{t=0,n=0,r={},o={}},e};function xe(e){return e.replace(/~/g,\"~0\").replace(/\\//g,\"~1\")}function Pe(e){return(e.startsWith(\"/\")?e.substring(1):e).split(\"/\").map((e=>e.indexOf(\"~\")>=0?e.replace(/~1/g,\"/\").replace(/~0/g,\"~\"):e))}function Se(e){return!e.startsWith(\"/\")}function Ie(e,t){const n=Se(e),r=Se(t);if(n&&r)return e===t;if(n){const n=Pe(t);return 1===n.length&&e===n[0]}if(r){const n=Pe(e);return 1===n.length&&t===n[0]}return e===t}function Oe(e){return`/${xe(e)}`}var Le={cloneExcluding:function(e,t){const n=[],r={},o=[];for(n.push(...Object.keys(e).map((t=>({key:t,ptr:Oe(t),source:e,parent:r,visited:[e]}))));n.length;){const e=n.pop();if(t.some((t=>Ie(t,e.ptr))))o.push(e.ptr);else{const t=e.source[e.key];if(null===t)e.parent[e.key]=t;else if(Array.isArray(t))e.parent[e.key]=[...t];else if(\"object\"==typeof t){if(e.visited.includes(t))continue;e.parent[e.key]={},n.push(...Object.keys(t).map((n=>{return{key:n,ptr:(r=e.ptr,o=xe(n),`${r}/${o}`),source:t,parent:e.parent[e.key],visited:[...e.visited,t]};var r,o})))}else e.parent[e.key]=t}}return{cloned:r,excluded:o.sort()}},compare:Ie,literalToReference:Oe};var Ue=function(e){const t={},n=e.allAttributesPrivate,r=e.privateAttributes||[],o=[\"key\",\"kind\",\"_meta\",\"anonymous\"],i=[\"name\",\"ip\",\"firstName\",\"lastName\",\"email\",\"avatar\",\"country\"],a=e=>{if(\"object\"!=typeof e||null===e||Array.isArray(e))return;const{cloned:t,excluded:i}=Le.cloneExcluding(e,(e=>(n?Object.keys(e):[...r,...e._meta&&e._meta.privateAttributes||[]]).filter((e=>!o.some((t=>Le.compare(e,t))))))(e));return t.key=String(t.key),i.length&&(t._meta||(t._meta={}),t._meta.redactedAttributes=i),t._meta&&(delete t._meta.privateAttributes,0===Object.keys(t._meta).length&&delete t._meta),void 0!==t.anonymous&&(t.anonymous=!!t.anonymous),t};return t.filter=e=>void 0===e.kind||null===e.kind?a((e=>{const t={...e.custom||{},kind:\"user\",key:e.key};void 0!==e.anonymous&&(t.anonymous=!!e.anonymous);for(const n of i)delete t[n],void 0!==e[n]&&null!==e[n]&&(t[n]=String(e[n]));return void 0!==e.privateAttributeNames&&null!==e.privateAttributeNames&&(t._meta=t._meta||{},t._meta.privateAttributes=e.privateAttributeNames.map((e=>e.startsWith(\"/\")?Le.literalToReference(e):e))),t})(e)):\"multi\"===e.kind?(e=>{const t={kind:e.kind},n=Object.keys(e);for(const r of n)if(\"kind\"!==r){const n=a(e[r]);n&&(t[r]=n)}return t})(e):a(e),t};const{getContextKeys:Te}=Ee;var Re=function(e,t,n,r=null,o=null,i=null){const a={},c=i||ye(e,n,t),u=I.appendUrlPath(t.eventsUrl,\"/events/bulk/\"+n),l=Ce(),d=Ue(t),f=t.samplingInterval,g=t.eventCapacity,v=t.flushInterval,p=t.logger;let m,h=[],y=0,w=!1,b=!1;function k(){return 0===f||0===Math.floor(Math.random()*f)}function E(e){const t=I.extend({},e);return\"identify\"===e.kind?t.context=d.filter(e.context):(t.contextKeys=Te(e.context,p),delete t.context),\"feature\"===e.kind&&(delete t.trackEvents,delete t.debugEventsUntilDate),t}function D(e){h.lengthy&&r.debugEventsUntilDate>(new Date).getTime()):t=k(),t&&D(E(e)),n){const t=I.extend({},e,{kind:\"debug\"});t.context=d.filter(t.context),delete t.trackEvents,delete t.debugEventsUntilDate,D(t)}},a.flush=function(){if(w)return Promise.resolve();const e=h,t=l.getSummary();return l.clearSummary(),t&&(t.kind=\"summary\",e.push(t)),r&&r.setEventsInLastBatch(e.length),0===e.length?Promise.resolve():(h=[],p.debug(ae.debugPostingEvents(e.length)),c.sendEvents(e,u).then((e=>{const t=e&&e[0];t&&(t.serverTime&&(y=t.serverTime),s.isHttpErrorRecoverable(t.status)||(w=!0),t.status>=400&&I.onNextTick((()=>{o.maybeReportError(new s.LDUnexpectedResponseError(ae.httpErrorMessage(t.status,\"event posting\",\"some events were dropped\")))})))})))},a.start=function(){const e=()=>{a.flush(),m=setTimeout(e,v)};m=setTimeout(e,v)},a.stop=function(){clearTimeout(m)},a};var Ae=function(e){const t={},n={};return t.on=function(e,t,r){n[e]=n[e]||[],n[e]=n[e].concat({handler:t,context:r})},t.off=function(e,t,r){if(n[e])for(let o=0;o{const n=()=>{e.off(je,n),t()};e.on(je,n)})).catch((()=>{}));return{getInitializationPromise:()=>o||(t?Promise.resolve():n?Promise.reject(r):(o=new Promise(((t,n)=>{const r=()=>{e.off(Fe,r),t()},o=t=>{e.off(Ne,o),n(t)};e.on(Fe,r),e.on(Ne,o)})),o)),getReadyPromise:()=>i,signalSuccess:()=>{t||n||(t=!0,e.emit(Fe),e.emit(je))},signalFailure:o=>{t||n||(n=!0,r=o,e.emit(Ne,o),e.emit(je)),e.maybeReportError(o)}}};var Ve=function(e,t,n,r){const o={};function i(){let e=\"\";const o=r.getContext();return o&&(e=n||I.btoa(JSON.stringify(o))),\"ld:\"+t+\":\"+e}return o.loadFlags=()=>e.get(i()).then((e=>{if(null==e)return null;try{let t=JSON.parse(e);if(t){const e=t.$schema;void 0===e||e<1?t=I.transformValuesToVersionedValues(t):delete t.$schema}return t}catch(e){return o.clearFlags().then((()=>null))}})),o.saveFlags=t=>{const n=I.extend({},t,{$schema:1});return e.set(i(),JSON.stringify(n))},o.clearFlags=()=>e.clear(i()),o};var He=function(e,t){const n={};let r=!1;const o=e=>{r||(r=!0,t.warn(ae.localStorageUnavailable(e)))};return n.isEnabled=()=>!!e,n.get=t=>new Promise((n=>{e?e.get(t).then(n).catch((e=>{o(e),n(void 0)})):n(void 0)})),n.set=(t,n)=>new Promise((r=>{e?e.set(t,n).then((()=>r(!0))).catch((e=>{o(e),r(!1)})):r(!1)})),n.clear=t=>new Promise((n=>{e?e.clear(t).then((()=>n(!0))).catch((e=>{o(e),n(!1)})):n(!1)})),n};const{appendUrlPath:qe,base64URLEncode:Me,objectHasOwnProperty:Ke}=I,{getLDHeaders:_e,transformHeaders:Je}=ve,{isHttpErrorRecoverable:ze}=s;var Be=function(e,t,n,r){const o=t.streamUrl,i=t.logger,a={},s=qe(o,\"/eval/\"+n),c=t.useReport,u=t.evaluationReasons,l=t.streamReconnectDelay,d=_e(e,t);let f,g=!1,v=null,p=null,m=null,h=null,y=null,w=0;function b(){const e=(t=function(){const e=l*Math.pow(2,w);return e>3e4?3e4:e}(),t-Math.trunc(.5*Math.random()*t));var t;return w+=1,e}function k(e){if(e.status&&\"number\"==typeof e.status&&!ze(e.status))return C(),i.error(ae.unrecoverableStreamError(e)),void(p&&(clearTimeout(p),p=null));const t=b();g||(i.warn(ae.streamError(e,t)),g=!0),x(!1),C(),E(t)}function E(e){p||(e?p=setTimeout(D,e):D())}function D(){let r;p=null;let a=\"\";const l={headers:d,readTimeoutMillis:3e5};if(e.eventSourceFactory){null!=h&&(a=\"h=\"+h),c?e.eventSourceAllowsReport?(r=s,l.method=\"REPORT\",l.headers[\"Content-Type\"]=\"application/json\",l.body=JSON.stringify(m)):(r=qe(o,\"/ping/\"+n),a=\"\"):r=s+\"/\"+Me(JSON.stringify(m)),l.headers=Je(l.headers,t),u&&(a=a+(a?\"&\":\"\")+\"withReasons=true\"),r=r+(a?\"?\":\"\")+a,C(),i.info(ae.streamConnecting(r)),f=(new Date).getTime(),v=e.eventSourceFactory(r,l);for(const e in y)Ke(y,e)&&v.addEventListener(e,y[e]);v.onerror=k,v.onopen=()=>{w=0}}}function C(){v&&(i.info(ae.streamClosing()),v.close(),v=null)}function x(e){f&&r&&r.recordStreamInit(f,!e,(new Date).getTime()-f),f=null}return a.connect=function(e,t,n){m=e,h=t,y={};for(const e in n||{})y[e]=function(t){g=!1,x(!0),n[e]&&n[e](t)};E()},a.disconnect=function(){clearTimeout(p),p=null,C()},a.isConnected=function(){return!!(v&&e.eventSourceIsActive&&e.eventSourceIsActive(v))},a};var Ge=function(e){let t,n,r,o;const i={addPromise:(i,a)=>{t=i,n&&n(),n=a,i.then((n=>{t===i&&(r(n),e&&e())}),(n=>{t===i&&(o(n),e&&e())}))}};return i.resultPromise=new Promise(((e,t)=>{r=e,o=t})),i};const{transformHeaders:We,getLDHeaders:Xe}=ve,Qe=\"application/json\";var Ye=function(e,t,n){const r=t.baseUrl,o=t.useReport,i=t.evaluationReasons,a=t.logger,c={},u={};function l(n,r){if(!e.httpRequest)return new Promise(((e,t)=>{t(new s.LDFlagFetchError(ae.httpUnavailable()))}));const o=r?\"REPORT\":\"GET\",i=Xe(e,t);r&&(i[\"Content-Type\"]=Qe);let a=u[n];a||(a=Ge((()=>{delete u[n]})),u[n]=a);const c=e.httpRequest(o,n,We(i,t),r),l=c.promise.then((e=>{if(200===e.status){if(e.header(\"content-type\")&&e.header(\"content-type\").substring(0,16)===Qe)return JSON.parse(e.body);{const t=ae.invalidContentType(e.header(\"content-type\")||\"\");return Promise.reject(new s.LDFlagFetchError(t))}}return Promise.reject(function(e){return 404===e.status?new s.LDInvalidEnvironmentIdError(ae.environmentNotFound()):new s.LDFlagFetchError(ae.errorFetchingFlags(e.statusText||String(e.status)))}(e))}),(e=>Promise.reject(new s.LDFlagFetchError(ae.networkError(e)))));return a.addPromise(l,(()=>{c.cancel&&c.cancel()})),a.resultPromise}return c.fetchJSON=function(e){return l(I.appendUrlPath(r,e),null)},c.fetchFlagSettings=function(e,t){let s,c,u,d=\"\";return o?(c=[r,\"/sdk/evalx/\",n,\"/context\"].join(\"\"),u=JSON.stringify(e)):(s=I.base64URLEncode(JSON.stringify(e)),c=[r,\"/sdk/evalx/\",n,\"/contexts/\",s].join(\"\")),t&&(d=\"h=\"+t),i&&(d=d+(d?\"&\":\"\")+\"withReasons=true\"),c=c+(d?\"?\":\"\")+d,a.debug(ae.debugPolling(c)),l(c,u)},c};var Ze=function(e,t){const n={};let r;return n.setContext=function(e){r=I.sanitizeContext(e),r&&t&&t(I.clone(r))},n.getContext=function(){return r?I.clone(r):null},e&&n.setContext(e),n};const{v1:et}=te,{getContextKinds:tt}=Ee;var nt=function(e){function t(e){return null==e||\"user\"===e?\"ld:$anonUserId\":`ld:$contextKey:${e}`}function n(n,r){return null!==r.key&&void 0!==r.key?(r.key=r.key.toString(),Promise.resolve(r)):r.anonymous?function(n){return e.get(t(n))}(n).then((o=>{if(o)return r.key=o,r;{const o=et();return r.key=o,function(n,r){return e.set(t(r),n)}(o,n).then((()=>r))}})):Promise.reject(new s.LDInvalidUserError(ae.invalidContext()))}this.processContext=e=>{if(!e)return Promise.reject(new s.LDInvalidUserError(ae.contextNotSpecified()));const t=I.clone(e);if(\"multi\"===e.kind){const e=tt(t);return Promise.all(e.map((e=>n(e,t[e])))).then((()=>t))}return n(e.kind,t)}};const{v1:rt}=te,{baseOptionDefs:ot}=fe,{appendUrlPath:it}=I;var at={DiagnosticId:function(e){const t={diagnosticId:rt()};return e&&(t.sdkKeySuffix=e.length>6?e.substring(e.length-6):e),t},DiagnosticsAccumulator:function(e){let t,n,r,o;function i(e){t=e,n=0,r=0,o=[]}return i(e),{getProps:()=>({dataSinceDate:t,droppedEvents:n,eventsInLastBatch:r,streamInits:o}),setProps:e=>{t=e.dataSinceDate,n=e.droppedEvents||0,r=e.eventsInLastBatch||0,o=e.streamInits||[]},incrementDroppedEvents:()=>{n++},setEventsInLastBatch:e=>{r=e},recordStreamInit:(e,t,n)=>{const r={timestamp:e,failed:t,durationMillis:n};o.push(r)},reset:i}},DiagnosticsManager:function(e,t,n,r,o,i,a){const s=!!e.diagnosticUseCombinedEvent,c=\"ld:\"+o+\":$diagnostics\",u=it(i.eventsUrl,\"/events/diagnostic/\"+o),l=i.diagnosticRecordingInterval,d=n;let f,g,v=!!i.streaming;const p={};function m(){return{sdk:w(),configuration:b(),platform:e.diagnosticPlatformData}}function h(e){i.logger&&i.logger.debug(ae.debugPostingDiagnosticEvent(e)),r.sendEvents(e,u,!0).then((()=>{})).catch((()=>{}))}function y(){h(function(){const e=(new Date).getTime();let t={kind:s?\"diagnostic-combined\":\"diagnostic\",id:a,creationDate:e,...d.getProps()};return s&&(t={...t,...m()}),d.reset(e),t}()),g=setTimeout(y,l),f=(new Date).getTime(),s&&function(){if(t.isEnabled()){const e={...d.getProps()};t.set(c,JSON.stringify(e))}}()}function w(){const t={...e.diagnosticSdkData};return i.wrapperName&&(t.wrapperName=i.wrapperName),i.wrapperVersion&&(t.wrapperVersion=i.wrapperVersion),t}function b(){return{customBaseURI:i.baseUrl!==ot.baseUrl.default,customStreamURI:i.streamUrl!==ot.streamUrl.default,customEventsURI:i.eventsUrl!==ot.eventsUrl.default,eventsCapacity:i.eventCapacity,eventsFlushIntervalMillis:i.flushInterval,reconnectTimeMillis:i.streamReconnectDelay,streamingDisabled:!v,allAttributesPrivate:!!i.allAttributesPrivate,diagnosticRecordingIntervalMillis:i.diagnosticRecordingInterval,usingSecureMode:!!i.hash,bootstrapMode:!!i.bootstrap,fetchGoalsDisabled:!i.fetchGoals,sendEventsOnlyForVariation:!!i.sendEventsOnlyForVariation}}return p.start=()=>{s?function(e){if(!t.isEnabled())return e(!1);t.get(c).then((t=>{if(t)try{const e=JSON.parse(t);d.setProps(e),f=e.dataSinceDate}catch(e){}e(!0)})).catch((()=>{e(!1)}))}((e=>{if(e){const e=(f||0)+l,t=(new Date).getTime();t>=e?y():g=setTimeout(y,e-t)}else 0===Math.floor(4*Math.random())?y():g=setTimeout(y,l)})):(h({kind:\"diagnostic-init\",id:a,creationDate:d.getProps().dataSinceDate,...m()}),g=setTimeout(y,l))},p.stop=()=>{g&&clearTimeout(g)},p.setStreaming=e=>{v=e},p}};var st=function(e,t){let n=!1;const r={type:e.type,name:e.name,method:(...o)=>{try{e.method(...o)}catch{n||(n=!0,t.warn(ae.inspectorMethodError(r.type,r.name)))}}};return r};const{onNextTick:ct}=I,ut={flagUsed:\"flag-used\",flagDetailsChanged:\"flag-details-changed\",flagDetailChanged:\"flag-detail-changed\",clientIdentityChanged:\"client-identity-changed\"};Object.freeze(ut);var lt={InspectorTypes:ut,InspectorManager:function(e,t){const n={},r={[ut.flagUsed]:[],[ut.flagDetailsChanged]:[],[ut.flagDetailChanged]:[],[ut.clientIdentityChanged]:[]},o=e&&e.map((e=>st(e,t)));return o&&o.forEach((e=>{Object.prototype.hasOwnProperty.call(r,e.type)?r[e.type].push(e):t.warn(ae.invalidInspector(e.type,e.name))})),n.hasListeners=e=>r[e]&&r[e].length,n.onFlagUsed=(e,t,n)=>{r[ut.flagUsed].length&&ct((()=>{r[ut.flagUsed].forEach((r=>r.method(e,t,n)))}))},n.onFlags=e=>{r[ut.flagDetailsChanged].length&&ct((()=>{r[ut.flagDetailsChanged].forEach((t=>t.method(e)))}))},n.onFlagChanged=(e,t)=>{r[ut.flagDetailChanged].length&&ct((()=>{r[ut.flagDetailChanged].forEach((n=>n.method(e,t)))}))},n.onIdentityChanged=e=>{r[ut.clientIdentityChanged].length&&ct((()=>{r[ut.clientIdentityChanged].forEach((t=>t.method(e)))}))},n}};const{commonBasicLogger:dt}=re,{checkContext:ft,getContextKeys:gt}=Ee,{InspectorTypes:vt,InspectorManager:pt}=lt,mt=\"change\",ht=\"internal-change\";var yt={initialize:function(e,t,n,r,o){const i=function(){if(n&&n.logger)return n.logger;return o&&o.logger&&o.logger.default||dt(\"warn\")}(),a=Ae(i),c=$e(a),u=fe.validate(n,a,o,i),l=pt(u.inspectors,i),d=u.sendEvents;let f=e,g=u.hash;const v=He(r.localStorage,i),p=ye(r,f,u),m=u.sendEvents&&!u.diagnosticOptOut,h=m?at.DiagnosticId(f):null,y=m?at.DiagnosticsAccumulator((new Date).getTime()):null,w=m?at.DiagnosticsManager(r,v,y,p,f,u,h):null,b=Be(r,u,f,y),k=u.eventProcessor||Re(r,u,f,y,a,p),E=Ye(r,u,f);let D,C,x,P={},S=u.streaming,O=!1,L=!1,U=!0;const T=u.stateProvider,R=Ze(null,(function(e){(function(e){if(T)return;e&&F({kind:\"identify\",context:e,creationDate:(new Date).getTime()})})(e),l.hasListeners(vt.clientIdentityChanged)&&l.onIdentityChanged(R.getContext())})),A=new nt(v),j=v.isEnabled()?Ve(v,f,g,R):null;function F(e){f&&(T&&T.enqueueEvent&&T.enqueueEvent(e)||(e.context?(U=!1,!d||L||r.isDoNotTrack()||(i.debug(ae.debugEnqueueingEvent(e.kind)),k.enqueue(e))):U&&(i.warn(ae.eventWithoutContext()),U=!1)))}function N(e,t){l.hasListeners(vt.flagDetailChanged)&&l.onFlagChanged(e.key,M(t))}function $(){l.hasListeners(vt.flagDetailsChanged)&&l.onFlags(Object.entries(P).map((([e,t])=>({key:e,detail:M(t)}))).reduce(((e,t)=>(e[t.key]=t.detail,e)),{}))}function V(e,t,n,r){const o=R.getContext(),i=new Date,a={kind:\"feature\",key:e,context:o,value:t?t.value:null,variation:t?t.variationIndex:null,default:n,creationDate:i.getTime()},s=P[e];s&&(a.version=s.flagVersion?s.flagVersion:s.version,a.trackEvents=s.trackEvents,a.debugEventsUntilDate=s.debugEventsUntilDate),(r||s&&s.trackReason)&&t&&(a.reason=t.reason),F(a)}function H(e){return ft(e,!1)?Promise.resolve(e):Promise.reject(new s.LDInvalidUserError(ae.invalidContext()))}function q(e,t,n,r,o){let i;if(P&&I.objectHasOwnProperty(P,e)&&P[e]&&!P[e].deleted){const n=P[e];i=M(n),null!==n.value&&void 0!==n.value||(i.value=t)}else i={value:t,variationIndex:null,reason:{kind:\"ERROR\",errorKind:\"FLAG_NOT_FOUND\"}};return n&&V(e,i,t,r),o||function(e,t){l.hasListeners(vt.flagUsed)&&l.onFlagUsed(e,t,R.getContext())}(e,i),i}function M(e){return{value:e.value,variationIndex:void 0===e.variation?null:e.variation,reason:e.reason||null}}function K(){if(C=!0,!R.getContext())return;const e=e=>{try{return JSON.parse(e)}catch(e){return void a.maybeReportError(new s.LDInvalidDataError(ae.invalidData()))}};b.connect(R.getContext(),g,{ping:function(){i.debug(ae.debugStreamPing());const e=R.getContext();E.fetchFlagSettings(e,g).then((t=>{I.deepEquals(e,R.getContext())&&J(t||{})})).catch((e=>{a.maybeReportError(new s.LDFlagFetchError(ae.errorFetchingFlags(e)))}))},put:function(t){const n=e(t.data);n&&(i.debug(ae.debugStreamPut()),J(n))},patch:function(t){const n=e(t.data);if(!n)return;const r=P[n.key];if(!r||!r.version||!n.version||r.version{}))}function z(e){const t=Object.keys(e);if(t.length>0){const n={};t.forEach((t=>{const r=e[t].current,o=r?r.value:void 0,i=e[t].previous;a.emit(mt+\":\"+t,o,i),n[t]=r?{current:o,previous:i}:{previous:i}})),a.emit(mt,n),a.emit(ht,P),u.sendEventsOnlyForVariation||T||t.forEach((t=>{V(t,e[t].current)}))}return D&&j?j.saveFlags(P):Promise.resolve()}function B(){const e=S||x&&void 0===S;e&&!C?K():!e&&C&&_(),w&&w.setStreaming(e)}function G(e){return e===mt||e.substr(0,7)===mt+\":\"}if(\"string\"==typeof u.bootstrap&&\"LOCALSTORAGE\"===u.bootstrap.toUpperCase()&&(j?D=!0:i.warn(ae.localStorageUnavailable())),\"object\"==typeof u.bootstrap&&(P=function(e){const t=Object.keys(e),n=\"$flagsState\",r=\"$valid\",o=e[n];!o&&t.length&&i.warn(ae.bootstrapOldFormat()),!1===e[r]&&i.warn(ae.bootstrapInvalid());const a={};return t.forEach((t=>{if(t!==n&&t!==r){let n={value:e[t]};o&&o[t]?n=I.extend(n,o[t]):n.version=0,a[t]=n}})),a}(u.bootstrap)),T){const e=T.getInitialState();e?W(e):T.on(\"init\",W),T.on(\"update\",(function(e){e.context&&R.setContext(e.context);e.flags&&J(e.flags)}))}else(function(){if(!e)return Promise.reject(new s.LDInvalidEnvironmentIdError(ae.environmentNotSpecified()));return A.processContext(t).then(H).then((e=>(R.setContext(e),\"object\"==typeof u.bootstrap?X():D?j.loadFlags().then((e=>null==e?(P={},E.fetchFlagSettings(R.getContext(),g).then((e=>J(e||{}))).then(X).catch((e=>{Q(new s.LDFlagFetchError(ae.errorFetchingFlags(e)))}))):(P=e,I.onNextTick(X),E.fetchFlagSettings(R.getContext(),g).then((e=>J(e))).catch((e=>a.maybeReportError(e)))))):E.fetchFlagSettings(R.getContext(),g).then((e=>{P=e||{},$(),X()})).catch((e=>{P={},Q(e)})))))})().catch(Q);function W(e){f=e.environment,R.setContext(e.context),P={...e.flags},I.onNextTick(X)}function X(){i.info(ae.clientInitialized()),O=!0,B(),c.signalSuccess()}function Q(e){c.signalFailure(e)}const Y={waitForInitialization:()=>c.getInitializationPromise(),waitUntilReady:()=>c.getReadyPromise(),identify:function(e,t,n){if(L)return I.wrapPromiseCallback(Promise.resolve({}),n);if(T)return i.warn(ae.identifyDisabled()),I.wrapPromiseCallback(Promise.resolve(I.transformVersionedValuesToValues(P)),n);const r=D&&j?j.clearFlags():Promise.resolve();return I.wrapPromiseCallback(r.then((()=>A.processContext(e))).then(H).then((e=>E.fetchFlagSettings(e,t).then((n=>{const r=I.transformVersionedValuesToValues(n);return R.setContext(e),g=t,n?J(n).then((()=>r)):r})))).then((e=>(C&&K(),e))).catch((e=>(a.maybeReportError(e),Promise.reject(e)))),n)},getContext:function(){return R.getContext()},variation:function(e,t){return q(e,t,!0,!1,!1).value},variationDetail:function(e,t){return q(e,t,!0,!0,!1)},track:function(e,t,n){if(\"string\"!=typeof e)return void a.maybeReportError(new s.LDInvalidEventKeyError(ae.unknownCustomEventKey(e)));r.customEventFilter&&!r.customEventFilter(e)&&i.warn(ae.unknownCustomEventKey(e));const o=R.getContext(),c={kind:\"custom\",key:e,context:o,url:r.getCurrentUrl(),creationDate:(new Date).getTime()};o&&o.anonymous&&(c.contextKind=o.anonymous?\"anonymousUser\":\"user\"),null!=t&&(c.data=t),null!=n&&(c.metricValue=n),F(c)},on:function(e,t,n){G(e)?(x=!0,O&&B(),a.on(e,t,n)):a.on(...arguments)},off:function(e){if(a.off(...arguments),G(e)){let e=!1;a.getEvents().forEach((t=>{G(t)&&a.getEventListenerCount(t)>0&&(e=!0)})),e||(x=!1,C&&void 0===S&&_())}},setStreaming:function(e){const t=null===e?void 0:e;t!==S&&(S=t,B())},flush:function(e){return I.wrapPromiseCallback(d?k.flush():Promise.resolve(),e)},allFlags:function(){const e={};if(!P)return e;for(const t in P)I.objectHasOwnProperty(P,t)&&!P[t].deleted&&(e[t]=q(t,null,!u.sendEventsOnlyForVariation,!1,!0).value);return e},close:function(e){if(L)return I.wrapPromiseCallback(Promise.resolve(),e);const t=()=>{L=!0,P={}},n=Promise.resolve().then((()=>{if(_(),w&&w.stop(),d)return k.stop(),k.flush()})).then(t).catch(t);return I.wrapPromiseCallback(n,e)}};return{client:Y,options:u,emitter:a,ident:R,logger:i,requestor:E,start:function(){d&&(w&&w.start(),k.start())},enqueueEvent:F,getFlagsInternal:function(){return P},getEnvironmentId:()=>f,internalChangeEventName:ht}},commonBasicLogger:dt,errors:s,messages:ae,utils:I,getContextKeys:gt},wt=yt.initialize,bt=yt.errors,kt=yt.messages;function Et(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Dt(e){for(var t=1;t{if(\"string\"!=typeof e)throw new TypeError(\"Expected a string\");return e.replace(/[|\\\\{}()[\\]^$+*?.]/g,\"\\\\$&\").replace(/-/g,\"\\\\x2d\")};function Lt(e,t,n,r){var o,i,a=((\"substring\"===e.kind||\"regex\"===e.kind)&&r.includes(\"/\")?t:t.replace(r,\"\")).replace(n,\"\");switch(e.kind){case\"exact\":i=t,o=new RegExp(\"^\"+Ot(e.url)+\"/?$\");break;case\"canonical\":i=a,o=new RegExp(\"^\"+Ot(e.url)+\"/?$\");break;case\"substring\":i=a,o=new RegExp(\".*\"+Ot(e.substring)+\".*$\");break;case\"regex\":i=a,o=new RegExp(e.pattern);break;default:return!1}return o.test(i)}function Ut(e,t){for(var n={},r=null,o=[],i=0;i0&&(r=function(e){for(var n=function(e,t){for(var n=[],r=0;r0;){for(var c=0;c0&&(r=Ut(n=e,i),function(e,t){var n,r=window.location.href;function o(){(n=window.location.href)!==r&&(r=n,t())}!function e(t,n){t(),setTimeout((function(){e(t,n)}),n)}(o,e),window.history&&window.history.pushState?window.addEventListener(\"popstate\",o):window.addEventListener(\"hashchange\",o)}(Tt,o)),t()})).catch((function(n){e.emitter.maybeReportError(new bt.LDUnexpectedResponseError((n&&n.message,n.message))),t()})),{}}var At=\"goalsReady\",jt={fetchGoals:{default:!0},hash:{type:\"string\"},eventProcessor:{type:\"object\"},eventUrlTransformer:{type:\"function\"},disableSyncEventPost:{default:!1}};function Ft(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=function(e){var t,n={userAgentHeaderName:\"X-LaunchDarkly-User-Agent\",synchronousFlush:!1};if(window.XMLHttpRequest){var r=e&&e.disableSyncEventPost;n.httpRequest=function(e,t,o,i){var a=n.synchronousFlush&!r;return n.synchronousFlush=!1,It(e,t,o,i,a)}}n.httpAllowsPost=function(){return void 0===t&&(t=!!window.XMLHttpRequest&&\"withCredentials\"in new window.XMLHttpRequest),t},n.httpFallbackPing=function(e){(new window.Image).src=e};var o,i=e&&e.eventUrlTransformer;n.getCurrentUrl=function(){return i?i(window.location.href):window.location.href},n.isDoNotTrack=function(){var e;return 1===(e=window.navigator&&void 0!==window.navigator.doNotTrack?window.navigator.doNotTrack:window.navigator&&void 0!==window.navigator.msDoNotTrack?window.navigator.msDoNotTrack:window.doNotTrack)||!0===e||\"1\"===e||\"yes\"===e};try{window.localStorage&&(n.localStorage={get:function(e){return new Promise((function(t){t(window.localStorage.getItem(e))}))},set:function(e,t){return new Promise((function(n){window.localStorage.setItem(e,t),n()}))},clear:function(e){return new Promise((function(t){window.localStorage.removeItem(e),t()}))}})}catch(e){n.localStorage=null}if(e&&e.useReport&&\"function\"==typeof window.EventSourcePolyfill&&window.EventSourcePolyfill.supportedOptions&&window.EventSourcePolyfill.supportedOptions.method?(n.eventSourceAllowsReport=!0,o=window.EventSourcePolyfill):(n.eventSourceAllowsReport=!1,o=window.EventSource),window.EventSource){var a=3e5;n.eventSourceFactory=function(e,t){var n=Dt(Dt({},{heartbeatTimeout:a,silentTimeout:a,skipDefaultHeaders:!0}),t);return new o(e,n)},n.eventSourceIsActive=function(e){return e.readyState===window.EventSource.OPEN||e.readyState===window.EventSource.CONNECTING}}return n.userAgent=\"JSClient\",n.version=\"3.1.4\",n.diagnosticSdkData={name:\"js-client-sdk\",version:\"3.1.4\"},n.diagnosticPlatformData={name:\"JS\"},n.diagnosticUseCombinedEvent=!0,n}(n),o=wt(e,t,n,r,jt),i=o.client,a=o.options,s=o.emitter,c=new Promise((function(e){var t=s.on(At,(function(){s.off(At,t),e()}))}));i.waitUntilGoalsReady=function(){return c},a.fetchGoals?Rt(o,(function(){return s.emit(At)})):s.emit(At),\"complete\"!==document.readyState?window.addEventListener(\"load\",o.start):o.start();var u=function(){r.synchronousFlush=!0,i.flush().catch((function(){})),r.synchronousFlush=!1};return document.addEventListener(\"visibilitychange\",(function(){\"hidden\"===document.visibilityState&&u()})),window.addEventListener(\"pagehide\",u),i}var Nt=Pt,$t=void 0,Vt=\"3.1.4\";var Ht={initialize:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return console&&console.warn&&console.warn(kt.deprecated(\"default export\",\"named LDClient export\")),Ft(e,t,n)},version:Vt};export{Nt as basicLogger,$t as createConsoleLogger,Ht as default,Ft as initialize,Vt as version};\n//# sourceMappingURL=ldclient.es.js.map\n"],"sourceRoot":""}